office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
68 lines • 2.42 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
var Styling_1 = require("../../Styling");
var GlobalClassNames = {
root: 'ms-DatePicker',
callout: 'ms-DatePicker-callout',
withLabel: 'ms-DatePicker-event--with-label',
withoutLabel: 'ms-DatePicker-event--without-label',
disabled: 'msDatePickerDisabled '
};
exports.styles = function (props) {
var className = props.className, theme = props.theme, disabled = props.disabled, label = props.label, isDatePickerShown = props.isDatePickerShown;
var palette = theme.palette, semanticColors = theme.semanticColors, effects = theme.effects, fonts = theme.fonts;
var classNames = Styling_1.getGlobalClassNames(GlobalClassNames, theme);
var DatePickerEvent = {
color: palette.neutralSecondary,
fontSize: fonts.mediumPlus.fontSize,
lineHeight: '18px',
pointerEvents: 'none',
position: 'absolute',
right: '9px'
};
return {
root: [classNames.root, theme.fonts.medium, isDatePickerShown && 'is-open', Styling_1.normalize, className],
textField: [
{
position: 'relative',
selectors: {
'& input[readonly]': {
cursor: 'pointer'
},
input: {
selectors: {
'::-ms-clear': {
display: 'none'
}
}
}
}
},
disabled && {
selectors: {
'& input[readonly]': {
cursor: 'default'
}
}
}
],
callout: [classNames.callout, { boxShadow: effects.elevation8 }],
icon: [
DatePickerEvent,
!label && [classNames.withoutLabel, { top: '7px' }],
label && [classNames.withLabel, { bottom: '5px' }],
!disabled && [
classNames.disabled,
{
pointerEvents: 'initial',
cursor: 'pointer'
}
],
disabled && {
color: semanticColors.disabledText,
cursor: 'default'
}
]
};
};
//# sourceMappingURL=DatePicker.styles.js.map
;