UNPKG

15.6 kBSource Map (JSON)View Raw
1{"version":3,"file":"CalendarDayGrid.styles.js","sourceRoot":"../src/","sources":["components/CalendarDayGrid/CalendarDayGrid.styles.ts"],"names":[],"mappings":";;;;AAAA,6DASmC;AACnC,qEAA8D;AAC9D,6DAAgE;AAIhE,IAAM,gBAAgB,GAAG;IACvB,UAAU,EAAE,2BAA2B;IACvC,YAAY,EAAE,6BAA6B;IAC3C,eAAe,EAAE,2BAA2B;IAC5C,gBAAgB,EAAE,4BAA4B;CAC/C,CAAC;AAEF,IAAM,0BAA0B,GAAG,2BAAS,CAAC;IAC3C,MAAM,EAAE;QACN,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,QAAQ,EAAE,QAAQ;KACnB;IACD,OAAO,EAAE;QACP,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,SAAS;KACpB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,SAAS;KACpB;CACF,CAAC,CAAC;AAEI,IAAM,MAAM,GAAG,UAAC,KAAiC;;IAEpD,IAAA,KAAK,GAMH,KAAK,MANF,EACL,aAAa,GAKX,KAAK,cALM,EACb,eAAe,GAIb,KAAK,gBAJQ,EACf,gCAAgC,GAG9B,KAAK,iCAHyB,EAChC,gBAAgB,GAEd,KAAK,iBAFS,EAChB,kBAAkB,GAChB,KAAK,mBADW,CACV;IACF,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;IAE1B,IAAM,UAAU,GAAG,qCAAmB,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IAEhE,IAAI,iBAAiB,GAAc,EAAE,CAAC;IACtC,IAAI,gBAAgB,KAAK,SAAS,EAAE;QAClC,IAAI,kBAAkB,KAAK,mCAAkB,CAAC,UAAU,EAAE;YACxD,iBAAiB,GAAG,gBAAgB,CAAC,CAAC,CAAC,iCAAe,CAAC,cAAc,CAAC,CAAC,CA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E,CAAC;YACR,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,MAAM;YACd,SAAS;gBACP,GAAC,GAAG,GAAG,UAAU,CAAC,eAAe,GAAG,IAAI,IAAG;oBACzC,eAAe,EAAE,OAAO,CAAC,KAAK;oBAC9B,SAAS;wBACP,GAAC,sCAAoB,IAAG;4BACtB,eAAe,EAAE,QAAQ;yBAC1B;2BACF;iBACF;gBACD,GAAC,GAAG,GAAG,UAAU,CAAC,gBAAgB,GAAG,IAAI,IAAG;oBAC1C,SAAS;wBACP,GAAC,sCAAoB,IAAG;4BACtB,eAAe,EAAE,eAAe;yBACjC;2BACF;iBACF;gBACD,GAAC,sCAAoB,uBACnB,eAAe,EAAE,YAAY,IAC1B,8CAA4B,EAAE,CAClC;mBACF;SACF;QACD,kBAAkB,EAAE;YAClB,oBAAoB,EAAE,KAAK;SAC5B;QACD,iBAAiB,EAAE;YACjB,mBAAmB,EAAE,KAAK;SAC3B;QACD,qBAAqB,EAAE;YACrB,uBAAuB,EAAE,KAAK;SAC/B;QACD,oBAAoB,EAAE;YACpB,sBAAsB,EAAE,KAAK;SAC9B;QACD,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,SAAS,EAAE,eAAa,OAAO,CAAC,gBAAkB;aACnD;SACF;QACD,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,YAAY,EAAE,eAAa,OAAO,CAAC,gBAAkB;aACtD;SACF;QACD,SAAS,EAAE;YACT,WAAW,EAAE;gBACX,UAAU,EAAE,eAAa,OAAO,CAAC,gBAAkB;aACpD;SACF;QACD,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,WAAW,EAAE,eAAa,OAAO,CAAC,gBAAkB;aACrD;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AArRW,QAAA,MAAM,UAqRjB","sourcesContent":["import {\n FontSizes,\n FontWeights,\n getFocusStyle,\n getGlobalClassNames,\n AnimationStyles,\n keyframes,\n HighContrastSelector,\n getHighContrastNoAdjustStyle,\n} from '@fluentui/style-utilities';\nimport { DateRangeType } from '@fluentui/date-time-utilities';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport type { ICalendarDayGridStyleProps, ICalendarDayGridStyles } from './CalendarDayGrid.types';\nimport type { IRawStyle } from '@fluentui/style-utilities';\n\nconst GlobalClassNames = {\n hoverStyle: 'ms-CalendarDay-hoverStyle',\n pressedStyle: 'ms-CalendarDay-pressedStyle',\n dayIsTodayStyle: 'ms-CalendarDay-dayIsToday',\n daySelectedStyle: 'ms-CalendarDay-daySelected',\n};\n\nconst transitionRowDisappearance = keyframes({\n '100%': {\n width: 0,\n height: 0,\n overflow: 'hidden',\n },\n '99.9%': {\n width: '100%',\n height: 28,\n overflow: 'visible',\n },\n '0%': {\n width: '100%',\n height: 28,\n overflow: 'visible',\n },\n});\n\nexport const styles = (props: ICalendarDayGridStyleProps): ICalendarDayGridStyles => {\n const {\n theme,\n dateRangeType,\n showWeekNumbers,\n lightenDaysOutsideNavigatedMonth,\n animateBackwards,\n animationDirection,\n } = props;\n const { palette } = theme;\n\n const classNames = getGlobalClassNames(GlobalClassNames, theme);\n\n let rowAnimationStyle: IRawStyle = {};\n if (animateBackwards !== undefined) {\n if (animationDirection === AnimationDirection.Horizontal) {\n rowAnimationStyle = animateBackwards ? AnimationStyles.slideRightIn20 : AnimationStyles.slideLeftIn20;\n } else {\n rowAnimationStyle = animateBackwards ? AnimationStyles.slideDownIn20 : AnimationStyles.slideUpIn20;\n }\n }\n\n let firstTransitionRowAnimationStyle: IRawStyle = {};\n let lastTransitionRowAnimationStyle: IRawStyle = {};\n if (animateBackwards !== undefined) {\n if (animationDirection !== AnimationDirection.Horizontal) {\n firstTransitionRowAnimationStyle = animateBackwards ? { animationName: '' } : AnimationStyles.slideUpOut20;\n lastTransitionRowAnimationStyle = animateBackwards ? AnimationStyles.slideDownOut20 : { animationName: '' };\n }\n }\n\n const disabledStyle = {\n selectors: {\n '&, &:disabled, & button': {\n color: palette.neutralTertiaryAlt,\n pointerEvents: 'none',\n },\n },\n };\n\n return {\n wrapper: {\n paddingBottom: 10,\n },\n table: [\n {\n textAlign: 'center',\n borderCollapse: 'collapse',\n borderSpacing: '0',\n tableLayout: 'fixed',\n fontSize: 'inherit',\n marginTop: 4,\n width: 196,\n position: 'relative',\n paddingBottom: 10,\n },\n showWeekNumbers && {\n width: 226,\n },\n ],\n dayCell: [\n getFocusStyle(theme, { inset: -3 }),\n {\n margin: 0,\n padding: 0,\n width: 28,\n height: 28,\n lineHeight: 28,\n fontSize: FontSizes.small,\n fontWeight: FontWeights.regular,\n color: palette.neutralPrimary,\n cursor: 'pointer',\n position: 'relative',\n selectors: {\n [HighContrastSelector]: {\n color: 'WindowText',\n backgroundColor: 'Window',\n zIndex: 0,\n ...getHighContrastNoAdjustStyle(),\n },\n ['&.' + classNames.hoverStyle]: {\n backgroundColor: palette.neutralLighter,\n selectors: {\n [HighContrastSelector]: {\n zIndex: 3,\n backgroundColor: 'Window',\n outline: '1px solid Highlight',\n },\n },\n },\n ['&.' + classNames.pressedStyle]: {\n backgroundColor: palette.neutralLight,\n selectors: {\n [HighContrastSelector]: {\n borderColor: 'Highlight',\n color: 'Highlight',\n backgroundColor: 'Window',\n },\n },\n },\n ['&.' + classNames.pressedStyle + '.' + classNames.hoverStyle]: {\n selectors: {\n [HighContrastSelector]: {\n backgroundColor: 'Window',\n outline: '1px solid Highlight',\n },\n },\n },\n },\n },\n ],\n daySelected: [\n dateRangeType !== DateRangeType.Month && {\n backgroundColor: palette.neutralLight + '!important',\n selectors: {\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n },\n ['&:hover, &.' + classNames.hoverStyle + ', &.' + classNames.pressedStyle]: {\n backgroundColor: palette.neutralLight + '!important',\n [HighContrastSelector]: {\n color: 'HighlightText!important',\n background: 'Highlight!important',\n },\n },\n [HighContrastSelector]: {\n background: 'Highlight!important',\n color: 'HighlightText!important',\n borderColor: 'Highlight!important',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n },\n ],\n weekRow: rowAnimationStyle,\n weekDayLabelCell: AnimationStyles.fadeIn200,\n weekNumberCell: {\n margin: 0,\n padding: 0,\n borderRight: '1px solid',\n borderColor: palette.neutralLight,\n backgroundColor: palette.neutralLighterAlt,\n color: palette.neutralSecondary,\n boxSizing: 'border-box',\n width: 28,\n height: 28,\n fontWeight: FontWeights.regular,\n fontSize: FontSizes.small,\n },\n dayOutsideBounds: disabledStyle,\n dayOutsideNavigatedMonth: lightenDaysOutsideNavigatedMonth && {\n color: palette.neutralSecondary,\n fontWeight: FontWeights.regular,\n },\n dayButton: {\n width: 24,\n height: 24,\n lineHeight: 24,\n fontSize: FontSizes.small,\n fontWeight: 'inherit',\n borderRadius: 2,\n border: 'none',\n padding: 0,\n color: 'inherit',\n backgroundColor: 'transparent',\n cursor: 'pointer',\n overflow: 'visible', // explicitly specify for IE11\n selectors: {\n span: {\n height: 'inherit',\n lineHeight: 'inherit',\n },\n },\n },\n dayIsToday: {\n backgroundColor: palette.themePrimary + '!important',\n borderRadius: '100%',\n color: palette.white + '!important',\n fontWeight: (FontWeights.semibold + '!important') as 'initial',\n selectors: {\n [HighContrastSelector]: {\n background: 'WindowText!important',\n color: 'Window!important',\n borderColor: 'WindowText!important',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n },\n firstTransitionWeek: {\n position: 'absolute',\n opacity: 0,\n width: 0,\n height: 0,\n overflow: 'hidden',\n ...firstTransitionRowAnimationStyle,\n animationName: firstTransitionRowAnimationStyle.animationName + ',' + transitionRowDisappearance,\n },\n lastTransitionWeek: {\n position: 'absolute',\n opacity: 0,\n width: 0,\n height: 0,\n overflow: 'hidden',\n marginTop: -28,\n ...lastTransitionRowAnimationStyle,\n animationName: lastTransitionRowAnimationStyle.animationName + ',' + transitionRowDisappearance,\n },\n dayMarker: {\n width: 4,\n height: 4,\n backgroundColor: palette.neutralSecondary,\n borderRadius: '100%',\n bottom: 1,\n left: 0,\n right: 0,\n position: 'absolute',\n margin: 'auto',\n selectors: {\n ['.' + classNames.dayIsTodayStyle + ' &']: {\n backgroundColor: palette.white,\n selectors: {\n [HighContrastSelector]: {\n backgroundColor: 'Window',\n },\n },\n },\n ['.' + classNames.daySelectedStyle + ' &']: {\n selectors: {\n [HighContrastSelector]: {\n backgroundColor: 'HighlightText',\n },\n },\n },\n [HighContrastSelector]: {\n backgroundColor: 'WindowText',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n },\n topRightCornerDate: {\n borderTopRightRadius: '2px',\n },\n topLeftCornerDate: {\n borderTopLeftRadius: '2px',\n },\n bottomRightCornerDate: {\n borderBottomRightRadius: '2px',\n },\n bottomLeftCornerDate: {\n borderBottomLeftRadius: '2px',\n },\n datesAbove: {\n '&::before': {\n borderTop: `1px solid ${palette.neutralSecondary}`,\n },\n },\n datesBelow: {\n '&::before': {\n borderBottom: `1px solid ${palette.neutralSecondary}`,\n },\n },\n datesLeft: {\n '&::before': {\n borderLeft: `1px solid ${palette.neutralSecondary}`,\n },\n },\n datesRight: {\n '&::before': {\n borderRight: `1px solid ${palette.neutralSecondary}`,\n },\n },\n };\n};\n"]}
\No newline at end of file