@fluentui/react-calendar-compat 0.0.0-nightly-20250703-1103.1 → 0.0.0-nightly-20250704-0407.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +12 -12
  2. package/package.json +9 -9
  3. package/lib/components/Calendar/useCalendarStyles.styles.raw.js +0 -115
  4. package/lib/components/Calendar/useCalendarStyles.styles.raw.js.map +0 -1
  5. package/lib/components/CalendarDay/useCalendarDayStyles.styles.raw.js +0 -142
  6. package/lib/components/CalendarDay/useCalendarDayStyles.styles.raw.js.map +0 -1
  7. package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js +0 -395
  8. package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js.map +0 -1
  9. package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js +0 -92
  10. package/lib/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js.map +0 -1
  11. package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js +0 -9
  12. package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js.map +0 -1
  13. package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js +0 -291
  14. package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js.map +0 -1
  15. package/lib/components/CalendarYear/useCalendarYearStyles.styles.raw.js +0 -9
  16. package/lib/components/CalendarYear/useCalendarYearStyles.styles.raw.js.map +0 -1
  17. package/lib-commonjs/components/Calendar/useCalendarStyles.styles.raw.js +0 -127
  18. package/lib-commonjs/components/Calendar/useCalendarStyles.styles.raw.js.map +0 -1
  19. package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.raw.js +0 -154
  20. package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.raw.js.map +0 -1
  21. package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js +0 -408
  22. package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.raw.js.map +0 -1
  23. package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js +0 -106
  24. package/lib-commonjs/components/CalendarDayGrid/useWeekCornerStyles.styles.raw.js.map +0 -1
  25. package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js +0 -15
  26. package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.raw.js.map +0 -1
  27. package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js +0 -303
  28. package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.raw.js.map +0 -1
  29. package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.raw.js +0 -15
  30. package/lib-commonjs/components/CalendarYear/useCalendarYearStyles.styles.raw.js.map +0 -1
@@ -1,291 +0,0 @@
1
- import { tokens } from '@fluentui/react-theme';
2
- import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
3
- import { DURATION_2, DURATION_3, EASING_FUNCTION_1, EASING_FUNCTION_2, FADE_IN, SLIDE_DOWN_IN20, SLIDE_LEFT_IN20, SLIDE_RIGHT_IN20, SLIDE_UP_IN20 } from '../../utils/animations';
4
- import { AnimationDirection } from '../Calendar/Calendar.types';
5
- /**
6
- * @internal
7
- */ export const calendarPickerClassNames = {
8
- root: 'fui-CalendarPicker',
9
- headerContainer: 'fui-CalendarPicker__headerContainer',
10
- currentItemButton: 'fui-CalendarPicker__currentItemButton',
11
- navigationButtonsContainer: 'fui-CalendarPicker__navigationButtonsContainer',
12
- navigationButton: 'fui-CalendarPicker__navigationButton',
13
- gridContainer: 'fui-CalendarPicker__gridContainer',
14
- buttonRow: 'fui-CalendarPicker__buttonRow',
15
- itemButton: 'fui-CalendarPicker__itemButton',
16
- current: 'fui-CalendarPicker__current',
17
- selected: 'fui-CalendarPicker__selected',
18
- disabled: 'fui-CalendarPicker__disabled'
19
- };
20
- const useRootStyles = makeStyles({
21
- base: {
22
- boxSizing: 'content-box',
23
- overflow: 'hidden',
24
- padding: '12px',
25
- width: '196px'
26
- },
27
- normalize: {
28
- boxShadow: 'none',
29
- boxSizing: 'border-box',
30
- margin: '0',
31
- padding: '0'
32
- }
33
- });
34
- const useHeaderContainerStyles = makeStyles({
35
- base: {
36
- display: 'flex'
37
- }
38
- });
39
- const useCurrentItemButtonStyles = makeStyles({
40
- base: {
41
- backgroundColor: tokens.colorTransparentBackground,
42
- ...shorthands.borderStyle('none'),
43
- borderRadius: tokens.borderRadiusMedium,
44
- color: 'inherit',
45
- flexGrow: 1,
46
- fontFamily: 'inherit',
47
- fontSize: tokens.fontSizeBase300,
48
- fontWeight: tokens.fontWeightSemibold,
49
- overflow: 'visible',
50
- padding: '0 4px 0 10px',
51
- textAlign: 'left'
52
- },
53
- animation: {
54
- animationDuration: DURATION_2,
55
- animationFillMode: 'both',
56
- animationName: FADE_IN,
57
- animationTimingFunction: EASING_FUNCTION_2
58
- },
59
- hasHeaderClickCallback: {
60
- // If this is updated, make sure to update headerIsClickable in useCalendarDayStyles as well
61
- '&:hover': {
62
- backgroundColor: tokens.colorBrandBackgroundInvertedHover,
63
- color: tokens.colorBrandForegroundOnLightHover,
64
- cursor: 'pointer',
65
- outline: `1px solid ${tokens.colorTransparentStroke}`
66
- },
67
- '&:hover:active': {
68
- backgroundColor: tokens.colorBrandBackgroundInvertedPressed,
69
- color: tokens.colorBrandForegroundOnLightPressed,
70
- cursor: 'pointer',
71
- outline: `1px solid ${tokens.colorTransparentStroke}`
72
- }
73
- }
74
- });
75
- const useNavigationButtonsContainerStyles = makeStyles({
76
- base: {
77
- alignItems: 'center',
78
- display: 'flex'
79
- }
80
- });
81
- const useNavigationButtonStyles = makeStyles({
82
- base: {
83
- backgroundColor: tokens.colorTransparentBackground,
84
- border: 'none',
85
- borderRadius: tokens.borderRadiusMedium,
86
- color: tokens.colorNeutralForeground1,
87
- display: 'block',
88
- fontFamily: 'inherit',
89
- fontSize: tokens.fontSizeBase200,
90
- height: '28px',
91
- lineHeight: '28px',
92
- minHeight: '28px',
93
- minWidth: '28px',
94
- overflow: 'visible',
95
- padding: '0',
96
- position: 'relative',
97
- textAlign: 'center',
98
- width: '28px',
99
- '&:hover': {
100
- backgroundColor: tokens.colorBrandBackgroundInvertedHover,
101
- color: tokens.colorBrandForegroundOnLightHover,
102
- cursor: 'pointer',
103
- outline: `1px solid ${tokens.colorTransparentStroke}`
104
- },
105
- '&:hover:active': {
106
- backgroundColor: tokens.colorBrandBackgroundInvertedPressed,
107
- color: tokens.colorBrandForegroundOnLightPressed
108
- }
109
- }
110
- });
111
- const useGridContainerStyles = makeStyles({
112
- base: {
113
- marginTop: '4px'
114
- }
115
- });
116
- const useButtonRowStyles = makeStyles({
117
- base: {
118
- marginBottom: '16px',
119
- '&:last-of-type': {
120
- marginBottom: 0
121
- }
122
- },
123
- animation: {
124
- animationDuration: DURATION_3,
125
- animationFillMode: 'both',
126
- animationTimingFunction: EASING_FUNCTION_1
127
- },
128
- horizontalBackward: {
129
- animationName: [
130
- FADE_IN,
131
- SLIDE_RIGHT_IN20
132
- ]
133
- },
134
- horizontalForward: {
135
- animationName: [
136
- FADE_IN,
137
- SLIDE_LEFT_IN20
138
- ]
139
- },
140
- verticalBackward: {
141
- animationName: [
142
- FADE_IN,
143
- SLIDE_DOWN_IN20
144
- ]
145
- },
146
- verticalForward: {
147
- animationName: [
148
- FADE_IN,
149
- SLIDE_UP_IN20
150
- ]
151
- }
152
- });
153
- const useItemButtonStyles = makeStyles({
154
- base: {
155
- backgroundColor: tokens.colorTransparentBackground,
156
- border: 'none',
157
- borderRadius: tokens.borderRadiusMedium,
158
- color: tokens.colorNeutralForeground3,
159
- fontFamily: 'inherit',
160
- fontSize: tokens.fontSizeBase200,
161
- height: '40px',
162
- lineHeight: '40px',
163
- minHeight: '40px',
164
- minWidth: '40px',
165
- margin: '0 12px 0 0',
166
- overflow: 'visible',
167
- padding: '0',
168
- width: '40px',
169
- '&:nth-child(4n + 4)': {
170
- marginRight: 0
171
- },
172
- '&:nth-child(n + 9)': {
173
- marginBottom: 0
174
- },
175
- '& div': {
176
- fontWeight: tokens.fontWeightRegular
177
- },
178
- '&:hover': {
179
- backgroundColor: tokens.colorBrandBackgroundInvertedHover,
180
- color: tokens.colorNeutralForeground1Static,
181
- cursor: 'pointer',
182
- outline: `1px solid ${tokens.colorTransparentStroke}`,
183
- '@media (forced-colors: active)': {
184
- backgroundColor: 'Window',
185
- color: 'WindowText',
186
- forcedColorAdjust: 'none',
187
- outline: '1px solid Highlight'
188
- }
189
- },
190
- '&:hover:active': {
191
- backgroundColor: tokens.colorBrandBackgroundInvertedPressed,
192
- '@media (forced-colors: active)': {
193
- backgroundColor: 'Window',
194
- color: 'Highlight',
195
- forcedColorAdjust: 'none'
196
- }
197
- }
198
- }
199
- });
200
- const useCurrentStyles = makeStyles({
201
- highlightCurrent: {
202
- backgroundColor: tokens.colorBrandBackground,
203
- color: tokens.colorNeutralForegroundOnBrand,
204
- fontWeight: tokens.fontWeightSemibold,
205
- '@media (forced-colors: active)': {
206
- backgroundColor: 'WindowText',
207
- color: 'Window',
208
- forcedColorAdjust: 'none'
209
- },
210
- '&:hover, &:hover:active': {
211
- backgroundColor: tokens.colorBrandBackground,
212
- color: tokens.colorNeutralForegroundOnBrand,
213
- '@media (forced-colors: active)': {
214
- backgroundColor: 'WindowText',
215
- color: 'Window',
216
- forcedColorAdjust: 'none'
217
- }
218
- }
219
- }
220
- });
221
- const useSelectedStyles = makeStyles({
222
- highlightSelected: {
223
- backgroundColor: tokens.colorBrandBackgroundInvertedSelected,
224
- color: tokens.colorNeutralForeground1Static,
225
- fontWeight: tokens.fontWeightSemibold,
226
- '@media (forced-colors: active)': {
227
- backgroundColor: 'Highlight',
228
- color: 'Window',
229
- forcedColorAdjust: 'none'
230
- },
231
- '& div': {
232
- fontWeight: tokens.fontWeightSemibold
233
- },
234
- '&:hover': {
235
- backgroundColor: tokens.colorBrandBackgroundInvertedSelected,
236
- color: tokens.colorNeutralForeground1Static,
237
- '@media (forced-colors: active)': {
238
- backgroundColor: 'Highlight',
239
- color: 'Window',
240
- forcedColorAdjust: 'none'
241
- }
242
- },
243
- '&:hover:active': {
244
- backgroundColor: tokens.colorBrandBackgroundInvertedPressed
245
- }
246
- }
247
- });
248
- const useDisabledStyles = makeStyles({
249
- base: {
250
- '&, &:disabled, & button': {
251
- color: tokens.colorNeutralForegroundDisabled,
252
- pointerEvents: 'none'
253
- },
254
- '@media (forced-colors: active)': {
255
- color: 'GrayText',
256
- forcedColorAdjust: 'none'
257
- }
258
- }
259
- });
260
- /**
261
- * @internal
262
- *
263
- * Apply styling to the CalendarPicker slots based on the state
264
- */ export const useCalendarPickerStyles_unstable = (props)=>{
265
- 'use no memo';
266
- const rootStyles = useRootStyles();
267
- const headerContainerStyles = useHeaderContainerStyles();
268
- const currentItemButtonStyles = useCurrentItemButtonStyles();
269
- const navigationButtonsContainerStyles = useNavigationButtonsContainerStyles();
270
- const navigationButtonStyles = useNavigationButtonStyles();
271
- const gridContainerStyles = useGridContainerStyles();
272
- const buttonRowStyles = useButtonRowStyles();
273
- const itemButtonStyles = useItemButtonStyles();
274
- const currentStyles = useCurrentStyles();
275
- const selectedStyles = useSelectedStyles();
276
- const disabledStyles = useDisabledStyles();
277
- const { animateBackwards, animationDirection, className, hasHeaderClickCallback, highlightCurrent, highlightSelected } = props;
278
- return {
279
- root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),
280
- headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),
281
- currentItemButton: mergeClasses(calendarPickerClassNames.currentItemButton, currentItemButtonStyles.base, animateBackwards !== undefined && currentItemButtonStyles.animation, hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback),
282
- navigationButtonsContainer: mergeClasses(calendarPickerClassNames.navigationButtonsContainer, navigationButtonsContainerStyles.base),
283
- navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),
284
- gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),
285
- buttonRow: mergeClasses(calendarPickerClassNames.buttonRow, buttonRowStyles.base, buttonRowStyles.animation, animateBackwards !== undefined && (animationDirection === AnimationDirection.Horizontal ? animateBackwards ? buttonRowStyles.horizontalBackward : buttonRowStyles.horizontalForward : animateBackwards ? buttonRowStyles.verticalBackward : buttonRowStyles.verticalForward)),
286
- itemButton: mergeClasses(calendarPickerClassNames.itemButton, itemButtonStyles.base),
287
- selected: mergeClasses(calendarPickerClassNames.selected, highlightSelected && selectedStyles.highlightSelected),
288
- current: mergeClasses(calendarPickerClassNames.current, highlightCurrent && currentStyles.highlightCurrent),
289
- disabled: mergeClasses(calendarPickerClassNames.disabled, disabledStyles.base)
290
- };
291
- };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/CalendarPicker/useCalendarPickerStyles.styles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport {\n DURATION_2,\n DURATION_3,\n EASING_FUNCTION_1,\n EASING_FUNCTION_2,\n FADE_IN,\n SLIDE_DOWN_IN20,\n SLIDE_LEFT_IN20,\n SLIDE_RIGHT_IN20,\n SLIDE_UP_IN20,\n} from '../../utils/animations';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CalendarPickerStyles, CalendarPickerStyleProps } from './CalendarPicker.types';\n\n/**\n * @internal\n */\nexport const calendarPickerClassNames: SlotClassNames<CalendarPickerStyles> = {\n root: 'fui-CalendarPicker',\n headerContainer: 'fui-CalendarPicker__headerContainer',\n currentItemButton: 'fui-CalendarPicker__currentItemButton',\n navigationButtonsContainer: 'fui-CalendarPicker__navigationButtonsContainer',\n navigationButton: 'fui-CalendarPicker__navigationButton',\n gridContainer: 'fui-CalendarPicker__gridContainer',\n buttonRow: 'fui-CalendarPicker__buttonRow',\n itemButton: 'fui-CalendarPicker__itemButton',\n current: 'fui-CalendarPicker__current',\n selected: 'fui-CalendarPicker__selected',\n disabled: 'fui-CalendarPicker__disabled',\n};\n\nconst useRootStyles = makeStyles({\n base: {\n boxSizing: 'content-box',\n overflow: 'hidden',\n padding: '12px',\n width: '196px',\n },\n normalize: {\n boxShadow: 'none',\n boxSizing: 'border-box',\n margin: '0',\n padding: '0',\n },\n});\n\nconst useHeaderContainerStyles = makeStyles({\n base: {\n display: 'flex',\n },\n});\n\nconst useCurrentItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n borderRadius: tokens.borderRadiusMedium,\n color: 'inherit',\n flexGrow: 1,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n overflow: 'visible',\n padding: '0 4px 0 10px',\n textAlign: 'left',\n },\n animation: {\n animationDuration: DURATION_2,\n animationFillMode: 'both',\n animationName: FADE_IN,\n animationTimingFunction: EASING_FUNCTION_2,\n },\n hasHeaderClickCallback: {\n // If this is updated, make sure to update headerIsClickable in useCalendarDayStyles as well\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n },\n },\n});\n\nconst useNavigationButtonsContainerStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'flex',\n },\n});\n\nconst useNavigationButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground1,\n display: 'block',\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '28px',\n lineHeight: '28px',\n minHeight: '28px',\n minWidth: '28px',\n overflow: 'visible',\n padding: '0',\n position: 'relative',\n textAlign: 'center',\n width: '28px',\n\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n },\n\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n },\n },\n});\n\nconst useGridContainerStyles = makeStyles({\n base: {\n marginTop: '4px',\n },\n});\n\nconst useButtonRowStyles = makeStyles({\n base: {\n marginBottom: '16px',\n '&:last-of-type': {\n marginBottom: 0,\n },\n },\n animation: {\n animationDuration: DURATION_3,\n animationFillMode: 'both',\n animationTimingFunction: EASING_FUNCTION_1,\n },\n horizontalBackward: {\n animationName: [FADE_IN, SLIDE_RIGHT_IN20],\n },\n horizontalForward: {\n animationName: [FADE_IN, SLIDE_LEFT_IN20],\n },\n verticalBackward: {\n animationName: [FADE_IN, SLIDE_DOWN_IN20],\n },\n verticalForward: {\n animationName: [FADE_IN, SLIDE_UP_IN20],\n },\n});\n\nconst useItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground3,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '40px',\n lineHeight: '40px',\n minHeight: '40px',\n minWidth: '40px',\n margin: '0 12px 0 0',\n overflow: 'visible',\n padding: '0',\n width: '40px',\n\n '&:nth-child(4n + 4)': {\n marginRight: 0,\n },\n '&:nth-child(n + 9)': {\n marginBottom: 0,\n },\n '& div': {\n fontWeight: tokens.fontWeightRegular,\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorNeutralForeground1Static,\n cursor: 'pointer',\n outline: `1px solid ${tokens.colorTransparentStroke}`,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n forcedColorAdjust: 'none',\n outline: '1px solid Highlight',\n },\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useCurrentStyles = makeStyles({\n highlightCurrent: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n '&:hover, &:hover:active': {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n },\n },\n});\n\nconst useSelectedStyles = makeStyles({\n highlightSelected: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n fontWeight: tokens.fontWeightSemibold,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n '& div': {\n fontWeight: tokens.fontWeightSemibold,\n },\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'Window',\n forcedColorAdjust: 'none',\n },\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n },\n },\n});\n\nconst useDisabledStyles = makeStyles({\n base: {\n '&, &:disabled, & button': {\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none',\n },\n '@media (forced-colors: active)': {\n color: 'GrayText',\n forcedColorAdjust: 'none',\n },\n },\n});\n\n/**\n * @internal\n *\n * Apply styling to the CalendarPicker slots based on the state\n */\nexport const useCalendarPickerStyles_unstable = (props: CalendarPickerStyleProps): CalendarPickerStyles => {\n 'use no memo';\n\n const rootStyles = useRootStyles();\n const headerContainerStyles = useHeaderContainerStyles();\n const currentItemButtonStyles = useCurrentItemButtonStyles();\n const navigationButtonsContainerStyles = useNavigationButtonsContainerStyles();\n const navigationButtonStyles = useNavigationButtonStyles();\n const gridContainerStyles = useGridContainerStyles();\n const buttonRowStyles = useButtonRowStyles();\n const itemButtonStyles = useItemButtonStyles();\n const currentStyles = useCurrentStyles();\n const selectedStyles = useSelectedStyles();\n const disabledStyles = useDisabledStyles();\n\n const {\n animateBackwards,\n animationDirection,\n className,\n hasHeaderClickCallback,\n highlightCurrent,\n highlightSelected,\n } = props;\n\n return {\n root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),\n headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),\n currentItemButton: mergeClasses(\n calendarPickerClassNames.currentItemButton,\n currentItemButtonStyles.base,\n animateBackwards !== undefined && currentItemButtonStyles.animation,\n hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback,\n ),\n navigationButtonsContainer: mergeClasses(\n calendarPickerClassNames.navigationButtonsContainer,\n navigationButtonsContainerStyles.base,\n ),\n navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),\n gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),\n buttonRow: mergeClasses(\n calendarPickerClassNames.buttonRow,\n buttonRowStyles.base,\n buttonRowStyles.animation,\n animateBackwards !== undefined &&\n (animationDirection === AnimationDirection.Horizontal\n ? animateBackwards\n ? buttonRowStyles.horizontalBackward\n : buttonRowStyles.horizontalForward\n : animateBackwards\n ? buttonRowStyles.verticalBackward\n : buttonRowStyles.verticalForward),\n ),\n itemButton: mergeClasses(calendarPickerClassNames.itemButton, itemButtonStyles.base),\n selected: mergeClasses(calendarPickerClassNames.selected, highlightSelected && selectedStyles.highlightSelected),\n current: mergeClasses(calendarPickerClassNames.current, highlightCurrent && currentStyles.highlightCurrent),\n disabled: mergeClasses(calendarPickerClassNames.disabled, disabledStyles.base),\n };\n};\n"],"names":["tokens","makeStyles","mergeClasses","shorthands","DURATION_2","DURATION_3","EASING_FUNCTION_1","EASING_FUNCTION_2","FADE_IN","SLIDE_DOWN_IN20","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","AnimationDirection","calendarPickerClassNames","root","headerContainer","currentItemButton","navigationButtonsContainer","navigationButton","gridContainer","buttonRow","itemButton","current","selected","disabled","useRootStyles","base","boxSizing","overflow","padding","width","normalize","boxShadow","margin","useHeaderContainerStyles","display","useCurrentItemButtonStyles","backgroundColor","colorTransparentBackground","borderStyle","borderRadius","borderRadiusMedium","color","flexGrow","fontFamily","fontSize","fontSizeBase300","fontWeight","fontWeightSemibold","textAlign","animation","animationDuration","animationFillMode","animationName","animationTimingFunction","hasHeaderClickCallback","colorBrandBackgroundInvertedHover","colorBrandForegroundOnLightHover","cursor","outline","colorTransparentStroke","colorBrandBackgroundInvertedPressed","colorBrandForegroundOnLightPressed","useNavigationButtonsContainerStyles","alignItems","useNavigationButtonStyles","border","colorNeutralForeground1","fontSizeBase200","height","lineHeight","minHeight","minWidth","position","useGridContainerStyles","marginTop","useButtonRowStyles","marginBottom","horizontalBackward","horizontalForward","verticalBackward","verticalForward","useItemButtonStyles","colorNeutralForeground3","marginRight","fontWeightRegular","colorNeutralForeground1Static","forcedColorAdjust","useCurrentStyles","highlightCurrent","colorBrandBackground","colorNeutralForegroundOnBrand","useSelectedStyles","highlightSelected","colorBrandBackgroundInvertedSelected","useDisabledStyles","colorNeutralForegroundDisabled","pointerEvents","useCalendarPickerStyles_unstable","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","undefined","Horizontal"],"rangeMappings":";;;;;;;;;;;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AAEsE,qBAAqBgB,eAAehB,iBAAiB;QAC/GvE,SAASrB,aAAaY,yBAAyBS,OAAO,EAAEmE,oBAAoBmB,cAAcnB,gBAAgB;QAC1GjE,UAAUvB,aAAaY,yBAAyBW,QAAQ,EAAEsF,eAAepF,IAAI;IAC/E;AACF,EAAE"}
@@ -1,9 +0,0 @@
1
- import { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';
2
- /**
3
- * @internal
4
- *
5
- * Apply styling to the CalendarYear slots based on the state
6
- */ export const useCalendarYearStyles_unstable = (props)=>{
7
- 'use no memo';
8
- return useCalendarPickerStyles_unstable(props);
9
- };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/CalendarYear/useCalendarYearStyles.styles.ts"],"sourcesContent":["import { useCalendarPickerStyles_unstable } from '../CalendarPicker/useCalendarPickerStyles.styles';\nimport type { CalendarYearStyleProps, CalendarYearStyles } from './CalendarYear.types';\n\n/**\n * @internal\n *\n * Apply styling to the CalendarYear slots based on the state\n */\nexport const useCalendarYearStyles_unstable = (props: CalendarYearStyleProps): CalendarYearStyles => {\n 'use no memo';\n\n return useCalendarPickerStyles_unstable(props);\n};\n"],"names":["useCalendarPickerStyles_unstable","useCalendarYearStyles_unstable","props"],"rangeMappings":";;;;;;;;","mappings":"AAAA,SAASA,gCAAgC,QAAQ,mDAAmD;AAGpG;;;;CAIC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7C;IAEA,OAAOF,iCAAiCE;AAC1C,EAAE"}
@@ -1,127 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: all[name]
9
- });
10
- }
11
- _export(exports, {
12
- calendarClassNames: function() {
13
- return calendarClassNames;
14
- },
15
- useCalendarStyles_unstable: function() {
16
- return useCalendarStyles_unstable;
17
- }
18
- });
19
- const _reacttheme = require("@fluentui/react-theme");
20
- const _react = require("@griffel/react");
21
- const calendarClassNames = {
22
- root: 'fui-Calendar',
23
- divider: 'fui-Calendar__divider',
24
- goTodayButton: 'fui-Calendar__goTodayButton',
25
- monthPickerWrapper: 'fui-Calendar__monthPickerWrapper',
26
- liveRegion: 'fui-Calendar__liveRegion'
27
- };
28
- const useRootStyles = (0, _react.makeStyles)({
29
- base: {
30
- display: 'flex',
31
- width: '220px'
32
- },
33
- normalize: {
34
- boxShadow: 'none',
35
- boxSizing: 'border-box',
36
- margin: '0',
37
- padding: '0'
38
- },
39
- monthPickerNotVisible: {
40
- flexDirection: 'column'
41
- },
42
- dayAndMonthPickersVisible: {
43
- width: '440px'
44
- },
45
- dayPickerVisibleAndWeekNumbersShown: {
46
- width: '250px'
47
- },
48
- dayAndMonthPickersVisibleAndWeekNumbersShown: {
49
- width: '470px'
50
- }
51
- });
52
- const useDividerStyles = (0, _react.makeStyles)({
53
- base: {
54
- borderRight: `1px solid ${_reacttheme.tokens.colorNeutralStroke2}`,
55
- top: 0
56
- }
57
- });
58
- const useMonthPickerWrapperStyles = (0, _react.makeStyles)({
59
- base: {
60
- display: 'flex',
61
- flexDirection: 'column'
62
- }
63
- });
64
- const useGoTodayButtonStyles = (0, _react.makeStyles)({
65
- base: {
66
- alignSelf: 'flex-end',
67
- backgroundColor: _reacttheme.tokens.colorTransparentBackground,
68
- ..._react.shorthands.borderStyle('none'),
69
- bottom: 0,
70
- boxSizing: 'content-box',
71
- color: _reacttheme.tokens.colorNeutralForeground1,
72
- fontFamily: 'inherit',
73
- fontSize: _reacttheme.tokens.fontSizeBase200,
74
- height: '30px',
75
- lineHeight: '30px',
76
- marginRight: '16px',
77
- marginTop: '3px',
78
- overflow: 'visible',
79
- padding: '0 4px',
80
- '& div': {
81
- fontSize: _reacttheme.tokens.fontSizeBase200
82
- },
83
- '&:hover': {
84
- backgroundColor: _reacttheme.tokens.colorTransparentBackground,
85
- color: _reacttheme.tokens.colorBrandForeground1,
86
- cursor: 'pointer',
87
- '@media (forced-colors: active)': {
88
- outline: _reacttheme.tokens.strokeWidthThin,
89
- borderRadius: _reacttheme.tokens.borderRadiusSmall
90
- }
91
- },
92
- '&:hover:active': {
93
- color: _reacttheme.tokens.colorBrandForeground2
94
- },
95
- '&:disabled': {
96
- color: _reacttheme.tokens.colorNeutralForegroundDisabled,
97
- pointerEvents: 'none'
98
- }
99
- }
100
- });
101
- const useLiveRegionStyles = (0, _react.makeStyles)({
102
- base: {
103
- border: 'none',
104
- height: '1px',
105
- margin: '-1px',
106
- overflow: 'hidden',
107
- padding: '0',
108
- position: 'absolute',
109
- width: '1px'
110
- }
111
- });
112
- const useCalendarStyles_unstable = (props)=>{
113
- 'use no memo';
114
- const rootStyles = useRootStyles();
115
- const dividerStyles = useDividerStyles();
116
- const monthPickerWrapperStyles = useMonthPickerWrapperStyles();
117
- const goTodayButtonStyles = useGoTodayButtonStyles();
118
- const liveRegionStyles = useLiveRegionStyles();
119
- const { className, isDayPickerVisible, isMonthPickerVisible, showWeekNumbers } = props;
120
- return {
121
- root: (0, _react.mergeClasses)(calendarClassNames.root, rootStyles.base, rootStyles.normalize, !isMonthPickerVisible && rootStyles.monthPickerNotVisible, isDayPickerVisible && isMonthPickerVisible && !showWeekNumbers && rootStyles.dayAndMonthPickersVisible, isDayPickerVisible && !isMonthPickerVisible && showWeekNumbers && rootStyles.dayPickerVisibleAndWeekNumbersShown, isDayPickerVisible && isMonthPickerVisible && showWeekNumbers && rootStyles.dayAndMonthPickersVisibleAndWeekNumbersShown, className),
122
- divider: (0, _react.mergeClasses)(calendarClassNames.divider, dividerStyles.base),
123
- monthPickerWrapper: (0, _react.mergeClasses)(calendarClassNames.monthPickerWrapper, monthPickerWrapperStyles.base),
124
- goTodayButton: (0, _react.mergeClasses)(calendarClassNames.goTodayButton, goTodayButtonStyles.base),
125
- liveRegion: (0, _react.mergeClasses)(calendarClassNames.liveRegion, liveRegionStyles.base)
126
- };
127
- };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/Calendar/useCalendarStyles.styles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CalendarStyles, CalendarStyleProps } from './Calendar.types';\n\n/**\n * @internal\n */\nexport const calendarClassNames: SlotClassNames<CalendarStyles> = {\n root: 'fui-Calendar',\n divider: 'fui-Calendar__divider',\n goTodayButton: 'fui-Calendar__goTodayButton',\n monthPickerWrapper: 'fui-Calendar__monthPickerWrapper',\n liveRegion: 'fui-Calendar__liveRegion',\n};\n\nconst useRootStyles = makeStyles({\n base: {\n display: 'flex',\n width: '220px',\n },\n normalize: {\n boxShadow: 'none',\n boxSizing: 'border-box',\n margin: '0',\n padding: '0',\n },\n monthPickerNotVisible: {\n flexDirection: 'column',\n },\n dayAndMonthPickersVisible: {\n width: '440px',\n },\n dayPickerVisibleAndWeekNumbersShown: {\n width: '250px',\n },\n dayAndMonthPickersVisibleAndWeekNumbersShown: {\n width: '470px',\n },\n});\n\nconst useDividerStyles = makeStyles({\n base: {\n borderRight: `1px solid ${tokens.colorNeutralStroke2}`,\n top: 0,\n },\n});\n\nconst useMonthPickerWrapperStyles = makeStyles({\n base: {\n display: 'flex',\n flexDirection: 'column',\n },\n});\n\nconst useGoTodayButtonStyles = makeStyles({\n base: {\n alignSelf: 'flex-end',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n bottom: 0,\n boxSizing: 'content-box',\n color: tokens.colorNeutralForeground1,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '30px',\n lineHeight: '30px',\n marginRight: '16px',\n marginTop: '3px',\n overflow: 'visible',\n padding: '0 4px',\n\n '& div': {\n fontSize: tokens.fontSizeBase200,\n },\n '&:hover': {\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorBrandForeground1,\n cursor: 'pointer',\n\n '@media (forced-colors: active)': {\n outline: tokens.strokeWidthThin,\n borderRadius: tokens.borderRadiusSmall,\n },\n },\n '&:hover:active': {\n color: tokens.colorBrandForeground2,\n },\n '&:disabled': {\n color: tokens.colorNeutralForegroundDisabled,\n pointerEvents: 'none',\n },\n },\n});\n\nconst useLiveRegionStyles = makeStyles({\n base: {\n border: 'none',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n width: '1px',\n },\n});\n\n/**\n * @internal\n *\n * Apply styling to the Calendar slots based on the state\n */\nexport const useCalendarStyles_unstable = (props: CalendarStyleProps): CalendarStyles => {\n 'use no memo';\n\n const rootStyles = useRootStyles();\n const dividerStyles = useDividerStyles();\n const monthPickerWrapperStyles = useMonthPickerWrapperStyles();\n const goTodayButtonStyles = useGoTodayButtonStyles();\n const liveRegionStyles = useLiveRegionStyles();\n\n const { className, isDayPickerVisible, isMonthPickerVisible, showWeekNumbers } = props;\n\n return {\n root: mergeClasses(\n calendarClassNames.root,\n rootStyles.base,\n rootStyles.normalize,\n !isMonthPickerVisible && rootStyles.monthPickerNotVisible,\n isDayPickerVisible && isMonthPickerVisible && !showWeekNumbers && rootStyles.dayAndMonthPickersVisible,\n isDayPickerVisible && !isMonthPickerVisible && showWeekNumbers && rootStyles.dayPickerVisibleAndWeekNumbersShown,\n isDayPickerVisible &&\n isMonthPickerVisible &&\n showWeekNumbers &&\n rootStyles.dayAndMonthPickersVisibleAndWeekNumbersShown,\n className,\n ),\n divider: mergeClasses(calendarClassNames.divider, dividerStyles.base),\n monthPickerWrapper: mergeClasses(calendarClassNames.monthPickerWrapper, monthPickerWrapperStyles.base),\n goTodayButton: mergeClasses(calendarClassNames.goTodayButton, goTodayButtonStyles.base),\n liveRegion: mergeClasses(calendarClassNames.liveRegion, liveRegionStyles.base),\n };\n};\n"],"names":["calendarClassNames","useCalendarStyles_unstable","root","divider","goTodayButton","monthPickerWrapper","liveRegion","useRootStyles","makeStyles","base","display","width","normalize","boxShadow","boxSizing","margin","padding","monthPickerNotVisible","flexDirection","dayAndMonthPickersVisible","dayPickerVisibleAndWeekNumbersShown","dayAndMonthPickersVisibleAndWeekNumbersShown","useDividerStyles","borderRight","tokens","colorNeutralStroke2","top","useMonthPickerWrapperStyles","useGoTodayButtonStyles","alignSelf","backgroundColor","colorTransparentBackground","shorthands","borderStyle","bottom","color","colorNeutralForeground1","fontFamily","fontSize","fontSizeBase200","height","lineHeight","marginRight","marginTop","overflow","colorBrandForeground1","cursor","outline","strokeWidthThin","borderRadius","borderRadiusSmall","colorBrandForeground2","colorNeutralForegroundDisabled","pointerEvents","useLiveRegionStyles","border","position","props","rootStyles","dividerStyles","monthPickerWrapperStyles","goTodayButtonStyles","liveRegionStyles","className","isDayPickerVisible","isMonthPickerVisible","showWeekNumbers","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAQaA,kBAAAA;eAAAA;;IAwGAC,0BAAAA;eAAAA;;;4BAhHU;uBAC8B;AAO9C,MAAMD,qBAAqD;IAChEE,MAAM;IACNC,SAAS;IACTC,eAAe;IACfC,oBAAoB;IACpBC,YAAY;AACd;AAEA,MAAMC,gBAAgBC,IAAAA,iBAAAA,EAAW;IAC/BC,MAAM;QACJC,SAAS;QACTC,OAAO;IACT;IACAC,WAAW;QACTC,WAAW;QACXC,WAAW;QACXC,QAAQ;QACRC,SAAS;IACX;IACAC,uBAAuB;QACrBC,eAAe;IACjB;IACAC,2BAA2B;QACzBR,OAAO;IACT;IACAS,qCAAqC;QACnCT,OAAO;IACT;IACAU,8CAA8C;QAC5CV,OAAO;IACT;AACF;AAEA,MAAMW,mBAAmBd,IAAAA,iBAAAA,EAAW;IAClCC,MAAM;QACJc,aAAa,CAAC,UAAU,EAAEC,kBAAAA,CAAOC,mBAAmB,CAAC,CAAC;QACtDC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,oBAAoB,EAAEC,eAAe,EAAE,GAAGT;IAEjF,OAAO;QACLvD,MAAMiE,IAAAA,mBAAAA,EACJnE,mBAAmBE,IAAI,EACvBwD,WAAWjD,IAAI,EACfiD,WAAW9C,SAAS,EACpB,CAACqD,wBAAwBP,WAAWzC,qBAAqB,EACzD+C,sBAAsBC,wBAAwB,CAACC,mBAAmBR,WAAWvC,yBAAyB,EACtG6C,sBAAsB,CAACC,wBAAwBC,mBAAmBR,WAAWtC,mCAAmC,EAChH4C,sBACEC,wBACAC,mBACAR,WAAWrC,4CAA4C,EACzD0C;QAEF5D,SAASgE,IAAAA,mBAAAA,EAAanE,mBAAmBG,OAAO,EAAEwD,cAAclD,IAAI;QACpEJ,oBAAoB8D,IAAAA,mBAAAA,EAAanE,mBAAmBK,kBAAkB,EAAEuD,yBAAyBnD,IAAI;QACrGL,eAAe+D,IAAAA,mBAAAA,EAAanE,mBAAmBI,aAAa,EAAEyD,oBAAoBpD,IAAI;QACtFH,YAAY6D,IAAAA,mBAAAA,EAAanE,mBAAmBM,UAAU,EAAEwD,iBAAiBrD,IAAI;IAC/E;AACF"}
@@ -1,154 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: all[name]
9
- });
10
- }
11
- _export(exports, {
12
- calendarDayClassNames: function() {
13
- return calendarDayClassNames;
14
- },
15
- useCalendarDayStyles_unstable: function() {
16
- return useCalendarDayStyles_unstable;
17
- }
18
- });
19
- const _reacttheme = require("@fluentui/react-theme");
20
- const _react = require("@griffel/react");
21
- const _animations = require("../../utils/animations");
22
- const calendarDayClassNames = {
23
- root: 'fui-CalendarDay',
24
- header: 'fui-CalendarDay__header',
25
- monthAndYear: 'fui-CalendarDay__monthAndYear',
26
- monthComponents: 'fui-CalendarDay__monthComponents',
27
- headerIconButton: 'fui-CalendarDay__headerIconButton',
28
- disabledStyle: 'fui-CalendarDay__disabledStyle'
29
- };
30
- const useRootStyles = (0, _react.makeStyles)({
31
- base: {
32
- boxSizing: 'content-box',
33
- padding: '12px',
34
- width: '196px'
35
- },
36
- normalize: {
37
- boxShadow: 'none',
38
- boxSizing: 'border-box',
39
- margin: '0',
40
- padding: '0'
41
- },
42
- showWeekNumbers: {
43
- width: '226px'
44
- }
45
- });
46
- const useHeaderStyles = (0, _react.makeStyles)({
47
- base: {
48
- display: 'inline-flex',
49
- height: '28px',
50
- lineHeight: '44px',
51
- position: 'relative',
52
- width: '100%'
53
- }
54
- });
55
- const useMonthAndYearStyles = (0, _react.makeStyles)({
56
- base: {
57
- alignItems: 'center',
58
- backgroundColor: _reacttheme.tokens.colorTransparentBackground,
59
- ..._react.shorthands.borderStyle('none'),
60
- borderRadius: _reacttheme.tokens.borderRadiusMedium,
61
- color: _reacttheme.tokens.colorNeutralForeground1,
62
- display: 'inline-block',
63
- flexGrow: 1,
64
- fontFamily: 'inherit',
65
- fontSize: _reacttheme.tokens.fontSizeBase300,
66
- fontWeight: _reacttheme.tokens.fontWeightSemibold,
67
- lineHeight: '28px',
68
- overflow: 'hidden',
69
- padding: '0 4px 0 10px',
70
- textAlign: 'left',
71
- textOverflow: 'ellipsis',
72
- whiteSpace: 'nowrap'
73
- },
74
- animation: {
75
- animationDuration: _animations.DURATION_2,
76
- animationFillMode: 'both',
77
- animationName: _animations.FADE_IN,
78
- animationTimingFunction: _animations.EASING_FUNCTION_2
79
- },
80
- headerIsClickable: {
81
- '&:hover': {
82
- backgroundColor: _reacttheme.tokens.colorBrandBackgroundInvertedHover,
83
- color: _reacttheme.tokens.colorBrandForegroundOnLightHover,
84
- cursor: 'pointer',
85
- outline: `1px solid ${_reacttheme.tokens.colorTransparentStroke}`
86
- },
87
- '&:hover:active': {
88
- backgroundColor: _reacttheme.tokens.colorBrandBackgroundInvertedPressed,
89
- color: _reacttheme.tokens.colorBrandForegroundOnLightPressed,
90
- cursor: 'pointer',
91
- outline: `1px solid ${_reacttheme.tokens.colorTransparentStroke}`
92
- }
93
- }
94
- });
95
- const useMonthComponentsStyles = (0, _react.makeStyles)({
96
- base: {
97
- alignSelf: 'flex-end',
98
- display: 'inline-flex'
99
- }
100
- });
101
- const useHeaderIconButtonStyles = (0, _react.makeStyles)({
102
- base: {
103
- backgroundColor: _reacttheme.tokens.colorTransparentBackground,
104
- ..._react.shorthands.borderStyle('none'),
105
- borderRadius: _reacttheme.tokens.borderRadiusMedium,
106
- color: _reacttheme.tokens.colorNeutralForeground3,
107
- display: 'block',
108
- fontFamily: 'inherit',
109
- fontSize: _reacttheme.tokens.fontSizeBase200,
110
- height: '28px',
111
- lineHeight: '28px',
112
- overflow: 'visible',
113
- padding: '0',
114
- position: 'relative',
115
- textAlign: 'center',
116
- width: '28px',
117
- '&:hover': {
118
- backgroundColor: _reacttheme.tokens.colorBrandBackgroundInvertedHover,
119
- color: _reacttheme.tokens.colorBrandForegroundOnLightHover,
120
- cursor: 'pointer',
121
- outline: `1px solid ${_reacttheme.tokens.colorTransparentStroke}`
122
- },
123
- '&:hover:active': {
124
- backgroundColor: _reacttheme.tokens.colorBrandBackgroundInvertedPressed,
125
- color: _reacttheme.tokens.colorBrandForegroundOnLightPressed
126
- }
127
- }
128
- });
129
- const useDisabledStyleStyles = (0, _react.makeStyles)({
130
- base: {
131
- '&, &:disabled, & button': {
132
- color: _reacttheme.tokens.colorNeutralForegroundDisabled,
133
- pointerEvents: 'none'
134
- }
135
- }
136
- });
137
- const useCalendarDayStyles_unstable = (props)=>{
138
- 'use no memo';
139
- const rootStyles = useRootStyles();
140
- const headerStyles = useHeaderStyles();
141
- const monthAndYearStyles = useMonthAndYearStyles();
142
- const monthComponentsStyles = useMonthComponentsStyles();
143
- const headerIconButtonStyles = useHeaderIconButtonStyles();
144
- const disabledStyleStyles = useDisabledStyleStyles();
145
- const { className, headerIsClickable, showWeekNumbers } = props;
146
- return {
147
- root: (0, _react.mergeClasses)(calendarDayClassNames.root, rootStyles.normalize, rootStyles.base, showWeekNumbers && rootStyles.showWeekNumbers, className),
148
- header: (0, _react.mergeClasses)(calendarDayClassNames.header, headerStyles.base),
149
- monthAndYear: (0, _react.mergeClasses)(calendarDayClassNames.monthAndYear, monthAndYearStyles.base, monthAndYearStyles.animation, headerIsClickable && monthAndYearStyles.headerIsClickable),
150
- monthComponents: (0, _react.mergeClasses)(calendarDayClassNames.monthComponents, monthComponentsStyles.base),
151
- headerIconButton: (0, _react.mergeClasses)(calendarDayClassNames.headerIconButton, headerIconButtonStyles.base),
152
- disabledStyle: (0, _react.mergeClasses)(calendarDayClassNames.disabledStyle, disabledStyleStyles.base)
153
- };
154
- };