@fluentui/react-calendar-compat 0.1.8 → 0.1.10
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.
- package/CHANGELOG.md +26 -2
- package/dist/index.d.ts +11 -1
- package/lib/components/Calendar/Calendar.js +6 -19
- package/lib/components/Calendar/Calendar.js.map +1 -1
- package/lib/components/Calendar/useCalendarStyles.styles.js +89 -53
- package/lib/components/Calendar/useCalendarStyles.styles.js.map +1 -1
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js +84 -46
- package/lib/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarDayGrid.types.js.map +1 -1
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js +2 -1
- package/lib/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +245 -114
- package/lib/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
- package/lib/components/CalendarMonth/CalendarMonth.js +1 -1
- package/lib/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/lib/components/CalendarMonth/index.js +1 -1
- package/lib/components/CalendarMonth/index.js.map +1 -1
- package/lib/components/CalendarMonth/{useCalendarMonthStyles.js → useCalendarMonthStyles.styles.js} +4 -2
- package/lib/components/CalendarMonth/useCalendarMonthStyles.styles.js.map +1 -0
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js +169 -79
- package/lib/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
- package/lib/utils/animations.js +5 -6
- package/lib/utils/animations.js.map +1 -1
- package/lib/utils/dateGrid/dateGrid.types.js.map +1 -1
- package/lib/utils/dateGrid/getDayGrid.js +1 -0
- package/lib/utils/dateGrid/getDayGrid.js.map +1 -1
- package/lib-commonjs/components/Calendar/Calendar.js +6 -19
- package/lib-commonjs/components/Calendar/Calendar.js.map +1 -1
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js +126 -155
- package/lib-commonjs/components/Calendar/useCalendarStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js +133 -137
- package/lib-commonjs/components/CalendarDay/useCalendarDayStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js +2 -1
- package/lib-commonjs/components/CalendarDayGrid/CalendarGridDayCell.js.map +1 -1
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js +417 -333
- package/lib-commonjs/components/CalendarDayGrid/useCalendarDayGridStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js +2 -2
- package/lib-commonjs/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/index.js +1 -1
- package/lib-commonjs/components/CalendarMonth/index.js.map +1 -1
- package/lib-commonjs/components/CalendarMonth/{useCalendarMonthStyles.js → useCalendarMonthStyles.styles.js} +1 -1
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.styles.js.map +1 -0
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js +255 -225
- package/lib-commonjs/components/CalendarPicker/useCalendarPickerStyles.styles.js.map +1 -1
- package/lib-commonjs/utils/animations.js +4 -5
- package/lib-commonjs/utils/animations.js.map +1 -1
- package/lib-commonjs/utils/dateGrid/getDayGrid.js +1 -0
- package/lib-commonjs/utils/dateGrid/getDayGrid.js.map +1 -1
- package/package.json +4 -4
- package/lib/components/CalendarMonth/useCalendarMonthStyles.js.map +0 -1
- package/lib-commonjs/components/CalendarMonth/useCalendarMonthStyles.js.map +0 -1
@@ -21,28 +21,40 @@ export const calendarPickerClassNames = {
|
|
21
21
|
const useRootStyles = /*#__PURE__*/__styles({
|
22
22
|
base: {
|
23
23
|
B7ck84d: "f1e4lqlz",
|
24
|
-
B68tc82:
|
25
|
-
Bmxbyg5:
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
B68tc82: 0,
|
25
|
+
Bmxbyg5: 0,
|
26
|
+
Bpg54ce: "f1a3p1vp",
|
27
|
+
Byoj8tv: 0,
|
28
|
+
uwmqm3: 0,
|
29
|
+
z189sj: 0,
|
30
|
+
z8tnut: 0,
|
31
|
+
B0ocmuz: "f1sy4kr4",
|
30
32
|
a9b677: "f4m2ahc"
|
31
33
|
},
|
32
34
|
normalize: {
|
33
35
|
E5pizo: "f1couhl3",
|
34
36
|
B7ck84d: "f1ewtqcl",
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
jrapky: 0,
|
38
|
+
Frg6f3: 0,
|
39
|
+
t21cq0: 0,
|
40
|
+
B6of3ja: 0,
|
41
|
+
B74szlk: "f1s184ao",
|
42
|
+
Byoj8tv: 0,
|
43
|
+
uwmqm3: 0,
|
44
|
+
z189sj: 0,
|
45
|
+
z8tnut: 0,
|
46
|
+
B0ocmuz: "f1mk8lai"
|
43
47
|
}
|
44
48
|
}, {
|
45
|
-
d: [".f1e4lqlz{box-sizing:content-box;}", ".
|
49
|
+
d: [".f1e4lqlz{box-sizing:content-box;}", [".f1a3p1vp{overflow:hidden;}", {
|
50
|
+
p: -1
|
51
|
+
}], [".f1sy4kr4{padding:12px;}", {
|
52
|
+
p: -1
|
53
|
+
}], ".f4m2ahc{width:196px;}", ".f1couhl3{box-shadow:none;}", ".f1ewtqcl{box-sizing:border-box;}", [".f1s184ao{margin:0;}", {
|
54
|
+
p: -1
|
55
|
+
}], [".f1mk8lai{padding:0;}", {
|
56
|
+
p: -1
|
57
|
+
}]]
|
46
58
|
});
|
47
59
|
const useHeaderContainerStyles = /*#__PURE__*/__styles({
|
48
60
|
base: {
|
@@ -58,17 +70,24 @@ const useCurrentItemButtonStyles = /*#__PURE__*/__styles({
|
|
58
70
|
vrafjx: ["f1n71otn", "f1deefiw"],
|
59
71
|
oivjwe: "f1h8hb77",
|
60
72
|
wvpqe5: ["f1deefiw", "f1n71otn"],
|
73
|
+
Beyfa6y: 0,
|
74
|
+
Bbmb7ep: 0,
|
75
|
+
Btl43ni: 0,
|
76
|
+
B7oj6ja: 0,
|
77
|
+
Dimara: "ft85np5",
|
61
78
|
sj55zd: "f1ym3bx4",
|
62
79
|
Bh6795r: "fqerorx",
|
63
80
|
Bahqtrf: "f1mo0ibp",
|
64
81
|
Be2twd7: "fkhj508",
|
65
82
|
Bhrd7zp: "fl43uef",
|
66
|
-
B68tc82:
|
67
|
-
Bmxbyg5:
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
83
|
+
B68tc82: 0,
|
84
|
+
Bmxbyg5: 0,
|
85
|
+
Bpg54ce: "f1gl81tg",
|
86
|
+
Byoj8tv: 0,
|
87
|
+
uwmqm3: 0,
|
88
|
+
z189sj: 0,
|
89
|
+
z8tnut: 0,
|
90
|
+
B0ocmuz: ["f1td8mcv", "f1udkdxo"],
|
72
91
|
fsow6f: ["f1o700av", "fes3tcz"]
|
73
92
|
},
|
74
93
|
animation: {
|
@@ -81,20 +100,34 @@ const useCurrentItemButtonStyles = /*#__PURE__*/__styles({
|
|
81
100
|
Jwef8y: "f18a0fwf",
|
82
101
|
Bi91k9c: "f3sdaeg",
|
83
102
|
eoavqd: "f8491dx",
|
84
|
-
|
85
|
-
ukgb2i:
|
86
|
-
|
103
|
+
pugfm4: 0,
|
104
|
+
ukgb2i: 0,
|
105
|
+
Dwtyhm: 0,
|
106
|
+
Biisq0s: "f15rpok4",
|
87
107
|
iro3zm: "f1wvkgvo",
|
88
108
|
B2d53fq: "f1wdoaqd",
|
89
109
|
c3iz72: "f13c0t7h",
|
90
|
-
|
91
|
-
Bx68yb:
|
92
|
-
|
110
|
+
mghro0: 0,
|
111
|
+
Bx68yb: 0,
|
112
|
+
syojd9: 0,
|
113
|
+
E5hylx: "fy2scak"
|
93
114
|
}
|
94
115
|
}, {
|
95
|
-
d: [".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".
|
116
|
+
d: [".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", [".ft85np5{border-radius:var(--borderRadiusMedium);}", {
|
117
|
+
p: -1
|
118
|
+
}], ".f1ym3bx4{color:inherit;}", ".fqerorx{flex-grow:1;}", ".f1mo0ibp{font-family:inherit;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", [".f1gl81tg{overflow:visible;}", {
|
119
|
+
p: -1
|
120
|
+
}], [".f1td8mcv{padding:0 4px 0 10px;}", {
|
121
|
+
p: -1
|
122
|
+
}], [".f1udkdxo{padding:0 10px 0 4px;}", {
|
123
|
+
p: -1
|
124
|
+
}], ".f1o700av{text-align:left;}", ".fes3tcz{text-align:right;}", ".fhsqnsn{animation-duration:0.267s;}", ".fywypte{animation-fill-mode:both;}", ".f1h7u52p{animation-name:f5j8bii;}", ".fjq4c94{animation-timing-function:cubic-bezier(.1,.25,.75,.9);}"],
|
96
125
|
k: ["@keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}"],
|
97
|
-
h: [".f18a0fwf:hover{background-color:var(--colorBrandBackgroundInvertedHover);}", ".f3sdaeg:hover{color:var(--colorBrandForegroundOnLightHover);}", ".f8491dx:hover{cursor:pointer;}", ".
|
126
|
+
h: [".f18a0fwf:hover{background-color:var(--colorBrandBackgroundInvertedHover);}", ".f3sdaeg:hover{color:var(--colorBrandForegroundOnLightHover);}", ".f8491dx:hover{cursor:pointer;}", [".f15rpok4:hover{outline:1px solid var(--colorTransparentStroke);}", {
|
127
|
+
p: -1
|
128
|
+
}], ".f1wvkgvo:hover:active{background-color:var(--colorBrandBackgroundInvertedPressed);}", ".f1wdoaqd:hover:active{color:var(--colorBrandForegroundOnLightPressed);}", ".f13c0t7h:hover:active{cursor:pointer;}", [".fy2scak:hover:active{outline:1px solid var(--colorTransparentStroke);}", {
|
129
|
+
p: -1
|
130
|
+
}]]
|
98
131
|
});
|
99
132
|
const useNavigationButtonsContainerStyles = /*#__PURE__*/__styles({
|
100
133
|
base: {
|
@@ -107,14 +140,28 @@ const useNavigationButtonsContainerStyles = /*#__PURE__*/__styles({
|
|
107
140
|
const useNavigationButtonStyles = /*#__PURE__*/__styles({
|
108
141
|
base: {
|
109
142
|
De3pzq: "f1c21dwh",
|
110
|
-
|
111
|
-
|
112
|
-
oivjwe:
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
143
|
+
Bgfg5da: 0,
|
144
|
+
B9xav0g: 0,
|
145
|
+
oivjwe: 0,
|
146
|
+
Bn0qgzm: 0,
|
147
|
+
B4g9neb: 0,
|
148
|
+
zhjwy3: 0,
|
149
|
+
wvpqe5: 0,
|
150
|
+
ibv6hh: 0,
|
151
|
+
u1mtju: 0,
|
152
|
+
h3c5rm: 0,
|
153
|
+
vrafjx: 0,
|
154
|
+
Bekrc4i: 0,
|
155
|
+
i8vvqc: 0,
|
156
|
+
g2u3we: 0,
|
157
|
+
icvyot: 0,
|
158
|
+
B4j52fo: 0,
|
159
|
+
irswps: "f3bhgqh",
|
160
|
+
Beyfa6y: 0,
|
161
|
+
Bbmb7ep: 0,
|
162
|
+
Btl43ni: 0,
|
163
|
+
B7oj6ja: 0,
|
164
|
+
Dimara: "ft85np5",
|
118
165
|
sj55zd: "f19n0e5",
|
119
166
|
mc9l5x: "ftgm304",
|
120
167
|
Bahqtrf: "f1mo0ibp",
|
@@ -123,27 +170,40 @@ const useNavigationButtonStyles = /*#__PURE__*/__styles({
|
|
123
170
|
Bg96gwp: "f336tjw",
|
124
171
|
sshi5w: "f1ysfysz",
|
125
172
|
Bf4jedk: "f107v6xj",
|
126
|
-
B68tc82:
|
127
|
-
Bmxbyg5:
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
173
|
+
B68tc82: 0,
|
174
|
+
Bmxbyg5: 0,
|
175
|
+
Bpg54ce: "f1gl81tg",
|
176
|
+
Byoj8tv: 0,
|
177
|
+
uwmqm3: 0,
|
178
|
+
z189sj: 0,
|
179
|
+
z8tnut: 0,
|
180
|
+
B0ocmuz: "f1mk8lai",
|
132
181
|
qhf8xq: "f10pi13n",
|
133
182
|
fsow6f: "f17mccla",
|
134
183
|
a9b677: "f1w9dchk",
|
135
184
|
Jwef8y: "f18a0fwf",
|
136
185
|
Bi91k9c: "f3sdaeg",
|
137
186
|
eoavqd: "f8491dx",
|
138
|
-
|
139
|
-
ukgb2i:
|
140
|
-
|
187
|
+
pugfm4: 0,
|
188
|
+
ukgb2i: 0,
|
189
|
+
Dwtyhm: 0,
|
190
|
+
Biisq0s: "f15rpok4",
|
141
191
|
iro3zm: "f1wvkgvo",
|
142
192
|
B2d53fq: "f1wdoaqd"
|
143
193
|
}
|
144
194
|
}, {
|
145
|
-
d: [".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".
|
146
|
-
|
195
|
+
d: [".f1c21dwh{background-color:var(--colorTransparentBackground);}", [".f3bhgqh{border:none;}", {
|
196
|
+
p: -2
|
197
|
+
}], [".ft85np5{border-radius:var(--borderRadiusMedium);}", {
|
198
|
+
p: -1
|
199
|
+
}], ".f19n0e5{color:var(--colorNeutralForeground1);}", ".ftgm304{display:block;}", ".f1mo0ibp{font-family:inherit;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fxldao9{height:28px;}", ".f336tjw{line-height:28px;}", ".f1ysfysz{min-height:28px;}", ".f107v6xj{min-width:28px;}", [".f1gl81tg{overflow:visible;}", {
|
200
|
+
p: -1
|
201
|
+
}], [".f1mk8lai{padding:0;}", {
|
202
|
+
p: -1
|
203
|
+
}], ".f10pi13n{position:relative;}", ".f17mccla{text-align:center;}", ".f1w9dchk{width:28px;}"],
|
204
|
+
h: [".f18a0fwf:hover{background-color:var(--colorBrandBackgroundInvertedHover);}", ".f3sdaeg:hover{color:var(--colorBrandForegroundOnLightHover);}", ".f8491dx:hover{cursor:pointer;}", [".f15rpok4:hover{outline:1px solid var(--colorTransparentStroke);}", {
|
205
|
+
p: -1
|
206
|
+
}], ".f1wvkgvo:hover:active{background-color:var(--colorBrandBackgroundInvertedPressed);}", ".f1wdoaqd:hover:active{color:var(--colorBrandForegroundOnLightPressed);}"]
|
147
207
|
});
|
148
208
|
const useGridContainerStyles = /*#__PURE__*/__styles({
|
149
209
|
base: {
|
@@ -181,14 +241,28 @@ const useButtonRowStyles = /*#__PURE__*/__styles({
|
|
181
241
|
const useItemButtonStyles = /*#__PURE__*/__styles({
|
182
242
|
base: {
|
183
243
|
De3pzq: "f1c21dwh",
|
184
|
-
|
185
|
-
|
186
|
-
oivjwe:
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
244
|
+
Bgfg5da: 0,
|
245
|
+
B9xav0g: 0,
|
246
|
+
oivjwe: 0,
|
247
|
+
Bn0qgzm: 0,
|
248
|
+
B4g9neb: 0,
|
249
|
+
zhjwy3: 0,
|
250
|
+
wvpqe5: 0,
|
251
|
+
ibv6hh: 0,
|
252
|
+
u1mtju: 0,
|
253
|
+
h3c5rm: 0,
|
254
|
+
vrafjx: 0,
|
255
|
+
Bekrc4i: 0,
|
256
|
+
i8vvqc: 0,
|
257
|
+
g2u3we: 0,
|
258
|
+
icvyot: 0,
|
259
|
+
B4j52fo: 0,
|
260
|
+
irswps: "f3bhgqh",
|
261
|
+
Beyfa6y: 0,
|
262
|
+
Bbmb7ep: 0,
|
263
|
+
Btl43ni: 0,
|
264
|
+
B7oj6ja: 0,
|
265
|
+
Dimara: "ft85np5",
|
192
266
|
sj55zd: "f11d4kpn",
|
193
267
|
Bahqtrf: "f1mo0ibp",
|
194
268
|
Be2twd7: "fy9rknc",
|
@@ -196,16 +270,19 @@ const useItemButtonStyles = /*#__PURE__*/__styles({
|
|
196
270
|
Bg96gwp: "fc76cdq",
|
197
271
|
sshi5w: "f1w5jphr",
|
198
272
|
Bf4jedk: "f12clzc2",
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
Byoj8tv:
|
208
|
-
uwmqm3:
|
273
|
+
jrapky: 0,
|
274
|
+
Frg6f3: 0,
|
275
|
+
t21cq0: 0,
|
276
|
+
B6of3ja: 0,
|
277
|
+
B74szlk: ["f1ytixos", "fqk6p8t"],
|
278
|
+
B68tc82: 0,
|
279
|
+
Bmxbyg5: 0,
|
280
|
+
Bpg54ce: "f1gl81tg",
|
281
|
+
Byoj8tv: 0,
|
282
|
+
uwmqm3: 0,
|
283
|
+
z189sj: 0,
|
284
|
+
z8tnut: 0,
|
285
|
+
B0ocmuz: "f1mk8lai",
|
209
286
|
a9b677: "feqmc2u",
|
210
287
|
Btgfwho: ["f65zstl", "f1yt3tqw"],
|
211
288
|
xrote9: "flfbxit",
|
@@ -213,34 +290,47 @@ const useItemButtonStyles = /*#__PURE__*/__styles({
|
|
213
290
|
Jwef8y: "f18a0fwf",
|
214
291
|
Bi91k9c: "f1u69ym5",
|
215
292
|
eoavqd: "f8491dx",
|
216
|
-
|
217
|
-
ukgb2i:
|
218
|
-
|
293
|
+
pugfm4: 0,
|
294
|
+
ukgb2i: 0,
|
295
|
+
Dwtyhm: 0,
|
296
|
+
Biisq0s: "f15rpok4",
|
219
297
|
Bqrx1nm: "f9ep5xw",
|
220
298
|
ze5xyy: "f1qvjex",
|
221
299
|
iyr2r2: "fd2qbv0",
|
222
|
-
|
223
|
-
Bnosqey:
|
224
|
-
|
300
|
+
Bx7pl5v: 0,
|
301
|
+
Bnosqey: 0,
|
302
|
+
Bv57zgv: 0,
|
303
|
+
Bbxjs3m: "fm3bo9w",
|
225
304
|
iro3zm: "f1wvkgvo",
|
226
305
|
g2kj27: "f1b9qfq3",
|
227
306
|
pc6evw: "f9ddjv3",
|
228
307
|
B76w7ga: "fr4cgi0"
|
229
308
|
}
|
230
309
|
}, {
|
231
|
-
d: [".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".
|
232
|
-
|
310
|
+
d: [".f1c21dwh{background-color:var(--colorTransparentBackground);}", [".f3bhgqh{border:none;}", {
|
311
|
+
p: -2
|
312
|
+
}], [".ft85np5{border-radius:var(--borderRadiusMedium);}", {
|
313
|
+
p: -1
|
314
|
+
}], ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".f1mo0ibp{font-family:inherit;}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fbhnoac{height:40px;}", ".fc76cdq{line-height:40px;}", ".f1w5jphr{min-height:40px;}", ".f12clzc2{min-width:40px;}", [".f1ytixos{margin:0 12px 0 0;}", {
|
315
|
+
p: -1
|
316
|
+
}], [".fqk6p8t{margin:0 0 0 12px;}", {
|
317
|
+
p: -1
|
318
|
+
}], [".f1gl81tg{overflow:visible;}", {
|
319
|
+
p: -1
|
320
|
+
}], [".f1mk8lai{padding:0;}", {
|
321
|
+
p: -1
|
322
|
+
}], ".feqmc2u{width:40px;}", ".f65zstl:nth-child(4n + 4){margin-right:0;}", ".f1yt3tqw:nth-child(4n + 4){margin-left:0;}", ".flfbxit:nth-child(n + 9){margin-bottom:0;}", ".ff5vbxt div{font-weight:var(--fontWeightRegular);}"],
|
323
|
+
h: [".f18a0fwf:hover{background-color:var(--colorBrandBackgroundInvertedHover);}", ".f1u69ym5:hover{color:var(--colorNeutralForeground1Static);}", ".f8491dx:hover{cursor:pointer;}", [".f15rpok4:hover{outline:1px solid var(--colorTransparentStroke);}", {
|
324
|
+
p: -1
|
325
|
+
}], ".f1wvkgvo:hover:active{background-color:var(--colorBrandBackgroundInvertedPressed);}"],
|
233
326
|
m: [["@media (forced-colors: active){.f9ep5xw:hover{background-color:Window;}}", {
|
234
327
|
m: "(forced-colors: active)"
|
235
328
|
}], ["@media (forced-colors: active){.f1qvjex:hover{color:WindowText;}}", {
|
236
329
|
m: "(forced-colors: active)"
|
237
330
|
}], ["@media (forced-colors: active){.fd2qbv0:hover{forced-color-adjust:none;}}", {
|
238
331
|
m: "(forced-colors: active)"
|
239
|
-
}], ["@media (forced-colors: active){.
|
240
|
-
|
241
|
-
}], ["@media (forced-colors: active){.f7lk14:hover{outline-style:solid;}}", {
|
242
|
-
m: "(forced-colors: active)"
|
243
|
-
}], ["@media (forced-colors: active){.f143n69s:hover{outline-color:Highlight;}}", {
|
332
|
+
}], ["@media (forced-colors: active){.fm3bo9w:hover{outline:1px solid Highlight;}}", {
|
333
|
+
p: -1,
|
244
334
|
m: "(forced-colors: active)"
|
245
335
|
}], ["@media (forced-colors: active){.f1b9qfq3:hover:active{background-color:Window;}}", {
|
246
336
|
m: "(forced-colors: active)"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["tokens","__styles","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","B7ck84d","B68tc82","Bmxbyg5","z8tnut","z189sj","Byoj8tv","uwmqm3","a9b677","normalize","E5pizo","B6of3ja","t21cq0","jrapky","Frg6f3","d","useHeaderContainerStyles","mc9l5x","useCurrentItemButtonStyles","De3pzq","icvyot","vrafjx","oivjwe","wvpqe5","sj55zd","Bh6795r","Bahqtrf","Be2twd7","Bhrd7zp","fsow6f","animation","vin17d","Bf5fcs","Bv12yb3","Ezkn3b","hasHeaderClickCallback","Jwef8y","Bi91k9c","eoavqd","Dwtyhm","ukgb2i","pugfm4","iro3zm","B2d53fq","c3iz72","syojd9","Bx68yb","mghro0","k","h","useNavigationButtonsContainerStyles","Bt984gj","useNavigationButtonStyles","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","Bqenvij","Bg96gwp","sshi5w","Bf4jedk","qhf8xq","useGridContainerStyles","useButtonRowStyles","sw9gdo","horizontalBackward","horizontalForward","verticalBackward","verticalForward","useItemButtonStyles","Btgfwho","xrote9","Bja5ulm","Bqrx1nm","ze5xyy","iyr2r2","Bv57zgv","Bnosqey","Bx7pl5v","g2kj27","pc6evw","B76w7ga","m","useCurrentStyles","highlightCurrent","Bsw6fvg","Bbusuzp","ycbfsm","mk428o","B1lrsqs","z0vste","Bgjd7nk","kur00z","useSelectedStyles","highlightSelected","useDisabledStyles","Bg33ivm","t69wg0","useCalendarPickerStyles_unstable","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","undefined","Horizontal"],"sources":["useCalendarPickerStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { 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';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\n/**\n * @internal\n */ export const calendarPickerClassNames = {\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};\nconst useRootStyles = makeStyles({\n base: {\n boxSizing: 'content-box',\n ...shorthands.overflow('hidden'),\n ...shorthands.padding('12px'),\n width: '196px'\n },\n normalize: {\n boxShadow: 'none',\n boxSizing: 'border-box',\n ...shorthands.margin(0),\n ...shorthands.padding(0)\n }\n});\nconst useHeaderContainerStyles = makeStyles({\n base: {\n display: 'flex'\n }\n});\nconst useCurrentItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n color: 'inherit',\n flexGrow: 1,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n ...shorthands.overflow('visible'),\n ...shorthands.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 ...shorthands.outline('1px', 'solid', tokens.colorTransparentStroke)\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed,\n cursor: 'pointer',\n ...shorthands.outline('1px', 'solid', tokens.colorTransparentStroke)\n }\n }\n});\nconst useNavigationButtonsContainerStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'flex'\n }\n});\nconst useNavigationButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n ...shorthands.borderRadius('2px'),\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 ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n position: 'relative',\n textAlign: 'center',\n width: '28px',\n '&:hover': {\n backgroundColor: tokens.colorBrandBackgroundInvertedHover,\n color: tokens.colorBrandForegroundOnLightHover,\n cursor: 'pointer',\n ...shorthands.outline('1px', 'solid', tokens.colorTransparentStroke)\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n color: tokens.colorBrandForegroundOnLightPressed\n }\n }\n});\nconst useGridContainerStyles = makeStyles({\n base: {\n marginTop: '4px'\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: [\n FADE_IN,\n SLIDE_RIGHT_IN20\n ]\n },\n horizontalForward: {\n animationName: [\n FADE_IN,\n SLIDE_LEFT_IN20\n ]\n },\n verticalBackward: {\n animationName: [\n FADE_IN,\n SLIDE_DOWN_IN20\n ]\n },\n verticalForward: {\n animationName: [\n FADE_IN,\n SLIDE_UP_IN20\n ]\n }\n});\nconst useItemButtonStyles = makeStyles({\n base: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderStyle('none'),\n ...shorthands.borderRadius('2px'),\n color: tokens.colorNeutralForeground3,\n fontFamily: 'inherit',\n fontSize: tokens.fontSizeBase200,\n height: '40px',\n lineHeight: '40px',\n minHeight: '40px',\n minWidth: '40px',\n ...shorthands.margin(0, '12px', 0, 0),\n ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n width: '40px',\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 ...shorthands.outline('1px', 'solid', tokens.colorTransparentStroke),\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n forcedColorAdjust: 'none',\n ...shorthands.outline('1px', 'solid', 'Highlight')\n }\n },\n '&:hover:active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedPressed,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'Highlight',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useCurrentStyles = makeStyles({\n highlightCurrent: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\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 '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useSelectedStyles = makeStyles({\n highlightSelected: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n fontWeight: tokens.fontWeightSemibold,\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 '@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});\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 * @internal\n *\n * Apply styling to the CalendarPicker slots based on the state\n */ export const useCalendarPickerStyles_unstable = (props)=>{\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 const { animateBackwards, animationDirection, className, hasHeaderClickCallback, highlightCurrent, highlightSelected } = props;\n return {\n root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),\n headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),\n currentItemButton: mergeClasses(calendarPickerClassNames.currentItemButton, currentItemButtonStyles.base, animateBackwards !== undefined && currentItemButtonStyles.animation, hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback),\n navigationButtonsContainer: mergeClasses(calendarPickerClassNames.navigationButtonsContainer, navigationButtonsContainerStyles.base),\n navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),\n gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),\n buttonRow: mergeClasses(calendarPickerClassNames.buttonRow, buttonRowStyles.base, buttonRowStyles.animation, animateBackwards !== undefined && (animationDirection === AnimationDirection.Horizontal ? animateBackwards ? buttonRowStyles.horizontalBackward : buttonRowStyles.horizontalForward : animateBackwards ? buttonRowStyles.verticalBackward : buttonRowStyles.verticalForward)),\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"],"mappings":"AAAA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAA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B,YAAY,CAACY,wBAAwB,CAACM,aAAa,EAAEgH,mBAAmB,CAACzG,IAAI,CAAC;IAC7FN,SAAS,EAAEnB,YAAY,CAACY,wBAAwB,CAACO,SAAS,EAAEgH,eAAe,CAAC1G,IAAI,EAAE0G,eAAe,CAAC5E,SAAS,EAAEiF,gBAAgB,KAAKG,SAAS,KAAKF,kBAAkB,KAAK9H,kBAAkB,CAACiI,UAAU,GAAGJ,gBAAgB,GAAGL,eAAe,CAACzC,kBAAkB,GAAGyC,eAAe,CAACxC,iBAAiB,GAAG6C,gBAAgB,GAAGL,eAAe,CAACvC,gBAAgB,GAAGuC,eAAe,CAACtC,eAAe,CAAC,CAAC;IAC1XzE,UAAU,EAAEpB,YAAY,CAACY,wBAAwB,CAACQ,UAAU,EAAEgH,gBAAgB,CAAC3G,IAAI,CAAC;IACpFH,QAAQ,EAAEtB,YAAY,CAACY,wBAAwB,CAACU,QAAQ,EAAEiG,iBAAiB,IAAIe,cAAc,CAACf,iBAAiB,CAAC;IAChHlG,OAAO,EAAErB,YAAY,CAACY,wBAAwB,CAACS,OAAO,EAAEwF,gBAAgB,IAAIwB,aAAa,CAACxB,gBAAgB,CAAC;IAC3GtF,QAAQ,EAAEvB,YAAY,CAACY,wBAAwB,CAACW,QAAQ,EAAEgH,cAAc,CAAC9G,IAAI;EACjF,CAAC;AACL,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"names":["tokens","__styles","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","B7ck84d","B68tc82","Bmxbyg5","Bpg54ce","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","a9b677","normalize","E5pizo","jrapky","Frg6f3","t21cq0","B6of3ja","B74szlk","d","p","useHeaderContainerStyles","mc9l5x","useCurrentItemButtonStyles","De3pzq","icvyot","vrafjx","oivjwe","wvpqe5","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","sj55zd","Bh6795r","Bahqtrf","Be2twd7","Bhrd7zp","fsow6f","animation","vin17d","Bf5fcs","Bv12yb3","Ezkn3b","hasHeaderClickCallback","Jwef8y","Bi91k9c","eoavqd","pugfm4","ukgb2i","Dwtyhm","Biisq0s","iro3zm","B2d53fq","c3iz72","mghro0","Bx68yb","syojd9","E5hylx","k","h","useNavigationButtonsContainerStyles","Bt984gj","useNavigationButtonStyles","Bgfg5da","B9xav0g","Bn0qgzm","B4g9neb","zhjwy3","ibv6hh","u1mtju","h3c5rm","Bekrc4i","i8vvqc","g2u3we","B4j52fo","irswps","Bqenvij","Bg96gwp","sshi5w","Bf4jedk","qhf8xq","useGridContainerStyles","useButtonRowStyles","sw9gdo","horizontalBackward","horizontalForward","verticalBackward","verticalForward","useItemButtonStyles","Btgfwho","xrote9","Bja5ulm","Bqrx1nm","ze5xyy","iyr2r2","Bx7pl5v","Bnosqey","Bv57zgv","Bbxjs3m","g2kj27","pc6evw","B76w7ga","m","useCurrentStyles","highlightCurrent","Bsw6fvg","Bbusuzp","ycbfsm","mk428o","B1lrsqs","z0vste","Bgjd7nk","kur00z","useSelectedStyles","highlightSelected","useDisabledStyles","Bg33ivm","t69wg0","useCalendarPickerStyles_unstable","props","rootStyles","headerContainerStyles","currentItemButtonStyles","navigationButtonsContainerStyles","navigationButtonStyles","gridContainerStyles","buttonRowStyles","itemButtonStyles","currentStyles","selectedStyles","disabledStyles","animateBackwards","animationDirection","className","undefined","Horizontal"],"sources":["useCalendarPickerStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { 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';\nimport { AnimationDirection } from '../Calendar/Calendar.types';\n/**\n * @internal\n */ export const calendarPickerClassNames = {\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};\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});\nconst useHeaderContainerStyles = makeStyles({\n base: {\n display: 'flex'\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});\nconst useNavigationButtonsContainerStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'flex'\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 '&: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 }\n }\n});\nconst useGridContainerStyles = makeStyles({\n base: {\n marginTop: '4px'\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: [\n FADE_IN,\n SLIDE_RIGHT_IN20\n ]\n },\n horizontalForward: {\n animationName: [\n FADE_IN,\n SLIDE_LEFT_IN20\n ]\n },\n verticalBackward: {\n animationName: [\n FADE_IN,\n SLIDE_DOWN_IN20\n ]\n },\n verticalForward: {\n animationName: [\n FADE_IN,\n 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 '&: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 '@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 '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'Highlight',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useCurrentStyles = makeStyles({\n highlightCurrent: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n fontWeight: tokens.fontWeightSemibold,\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 '@media (forced-colors: active)': {\n backgroundColor: 'WindowText',\n color: 'Window',\n forcedColorAdjust: 'none'\n }\n }\n }\n});\nconst useSelectedStyles = makeStyles({\n highlightSelected: {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n color: tokens.colorNeutralForeground1Static,\n fontWeight: tokens.fontWeightSemibold,\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 '@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});\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 * @internal\n *\n * Apply styling to the CalendarPicker slots based on the state\n */ export const useCalendarPickerStyles_unstable = (props)=>{\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 const { animateBackwards, animationDirection, className, hasHeaderClickCallback, highlightCurrent, highlightSelected } = props;\n return {\n root: mergeClasses(calendarPickerClassNames.root, rootStyles.normalize, rootStyles.base, className),\n headerContainer: mergeClasses(calendarPickerClassNames.headerContainer, headerContainerStyles.base),\n currentItemButton: mergeClasses(calendarPickerClassNames.currentItemButton, currentItemButtonStyles.base, animateBackwards !== undefined && currentItemButtonStyles.animation, hasHeaderClickCallback && currentItemButtonStyles.hasHeaderClickCallback),\n navigationButtonsContainer: mergeClasses(calendarPickerClassNames.navigationButtonsContainer, navigationButtonsContainerStyles.base),\n navigationButton: mergeClasses(calendarPickerClassNames.navigationButton, navigationButtonStyles.base),\n gridContainer: mergeClasses(calendarPickerClassNames.gridContainer, gridContainerStyles.base),\n buttonRow: mergeClasses(calendarPickerClassNames.buttonRow, buttonRowStyles.base, buttonRowStyles.animation, animateBackwards !== undefined && (animationDirection === AnimationDirection.Horizontal ? animateBackwards ? buttonRowStyles.horizontalBackward : buttonRowStyles.horizontalForward : animateBackwards ? buttonRowStyles.verticalBackward : buttonRowStyles.verticalForward)),\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"],"mappings":"AAAA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAAAC,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,UAAU,EAAEC,UAAU,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,OAAO,EAAEC,eAAe,EAAEC,eAAe,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,wBAAwB;AACjL,SAASC,kBAAkB,QAAQ,4BAA4B;AAC/D;AACA;AACA;AAAI,OAAO,MAAMC,wBAAwB,GAAG;EACxCC,IAAI,EAAE,oBAAoB;EAC1BC,eAAe,EAAE,qCAAqC;EACtDC,iBAAiB,EAAE,uCAAuC;EAC1DC,0BAA0B,EAAE,gDAAgD;EAC5EC,gBAAgB,EAAE,sCAAsC;EACxDC,aAAa,EAAE,mCAAmC;EAClDC,SAAS,EAAE,+BAA+B;EAC1CC,UAAU,EAAE,gCAAgC;EAC5CC,OAAO,EAAE,6BAA6B;EACtCC,QAAQ,EAAE,8BAA8B;EACxCC,QAAQ,EAAE;AACd,CAAC;AACD,MAAMC,aAAa,gBAAGzB,QAAA;EAAA0B,IAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,SAAA;IAAAC,MAAA;IA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ezier(.1,.9,.2,1)';
|
3
2
|
export const EASING_FUNCTION_2 = 'cubic-bezier(.1,.25,.75,.9)';
|
4
3
|
export const DURATION_1 = '0.167s';
|
@@ -78,20 +77,20 @@ export const SLIDE_UP_OUT20 = {
|
|
78
77
|
transform: 'translate3d(0, -20px, 0)'
|
79
78
|
}
|
80
79
|
};
|
81
|
-
|
80
|
+
export const TRANSITION_ROW_DISAPPEARANCE = {
|
82
81
|
'100%': {
|
83
82
|
height: '0px',
|
84
|
-
|
83
|
+
overflow: 'hidden',
|
85
84
|
width: '0px'
|
86
85
|
},
|
87
86
|
'99.9%': {
|
88
87
|
height: '28px',
|
89
|
-
|
88
|
+
overflow: 'visible',
|
90
89
|
width: '100%'
|
91
90
|
},
|
92
91
|
'0%': {
|
93
92
|
height: '28px',
|
94
|
-
|
93
|
+
overflow: 'visible',
|
95
94
|
width: '100%'
|
96
95
|
}
|
97
|
-
};
|
96
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["animations.ts"],"sourcesContent":["
|
1
|
+
{"version":3,"sources":["animations.ts"],"sourcesContent":["export const EASING_FUNCTION_1 = 'cubic-bezier(.1,.9,.2,1)';\nexport const EASING_FUNCTION_2 = 'cubic-bezier(.1,.25,.75,.9)';\nexport const DURATION_1 = '0.167s';\nexport const DURATION_2 = '0.267s';\nexport const DURATION_3 = '0.367s';\nexport const DURATION_4 = '0.467s';\n\nexport const FADE_IN = {\n from: {\n opacity: 0,\n },\n to: {\n opacity: 1,\n },\n};\nexport const FADE_OUT = {\n from: {\n opacity: 1,\n },\n to: {\n opacity: 0,\n visibility: 'hidden' as const,\n },\n};\nexport const SLIDE_DOWN_IN20 = {\n from: {\n pointerEvents: 'none' as const,\n transform: 'translate3d(0, -20px, 0)',\n },\n to: {\n pointerEvents: 'auto' as const,\n transform: 'translate3d(0, 0, 0)',\n },\n};\nexport const SLIDE_LEFT_IN20 = {\n from: {\n pointerEvents: 'none' as const,\n transform: 'translate3d(20px, 0, 0)',\n },\n to: {\n pointerEvents: 'auto' as const,\n transform: 'translate3d(0, 0, 0)',\n },\n};\nexport const SLIDE_RIGHT_IN20 = {\n from: {\n pointerEvents: 'none' as const,\n transform: 'translate3d(-20px, 0, 0)',\n },\n to: {\n pointerEvents: 'auto' as const,\n transform: 'translate3d(0, 0, 0)',\n },\n};\nexport const SLIDE_UP_IN20 = {\n from: {\n pointerEvents: 'none' as const,\n transform: 'translate3d(0, 20px, 0)',\n },\n to: {\n pointerEvents: 'auto' as const,\n transform: 'translate3d(0, 0, 0)',\n },\n};\nexport const SLIDE_DOWN_OUT20 = {\n from: {\n transform: 'translate3d(0, 0, 0)',\n },\n to: {\n transform: 'translate3d(0, 20px, 0)',\n },\n};\nexport const SLIDE_UP_OUT20 = {\n from: {\n transform: 'translate3d(0, 0, 0)',\n },\n to: {\n transform: 'translate3d(0, -20px, 0)',\n },\n};\n\nexport const TRANSITION_ROW_DISAPPEARANCE = {\n '100%': {\n height: '0px',\n overflow: 'hidden',\n\n width: '0px',\n },\n '99.9%': {\n height: '28px',\n overflow: 'visible',\n width: '100%',\n },\n '0%': {\n height: '28px',\n overflow: 'visible',\n width: '100%',\n },\n};\n"],"names":["EASING_FUNCTION_1","EASING_FUNCTION_2","DURATION_1","DURATION_2","DURATION_3","DURATION_4","FADE_IN","from","opacity","to","FADE_OUT","visibility","SLIDE_DOWN_IN20","pointerEvents","transform","SLIDE_LEFT_IN20","SLIDE_RIGHT_IN20","SLIDE_UP_IN20","SLIDE_DOWN_OUT20","SLIDE_UP_OUT20","TRANSITION_ROW_DISAPPEARANCE","height","overflow","width"],"mappings":"AAAA,OAAO,MAAMA,oBAAoB,2BAA2B;AAC5D,OAAO,MAAMC,oBAAoB,8BAA8B;AAC/D,OAAO,MAAMC,aAAa,SAAS;AACnC,OAAO,MAAMC,aAAa,SAAS;AACnC,OAAO,MAAMC,aAAa,SAAS;AACnC,OAAO,MAAMC,aAAa,SAAS;AAEnC,OAAO,MAAMC,UAAU;IACrBC,MAAM;QACJC,SAAS;IACX;IACAC,IAAI;QACFD,SAAS;IACX;AACF,EAAE;AACF,OAAO,MAAME,WAAW;IACtBH,MAAM;QACJC,SAAS;IACX;IACAC,IAAI;QACFD,SAAS;QACTG,YAAY;IACd;AACF,EAAE;AACF,OAAO,MAAMC,kBAAkB;IAC7BL,MAAM;QACJM,eAAe;QACfC,WAAW;IACb;IACAL,IAAI;QACFI,eAAe;QACfC,WAAW;IACb;AACF,EAAE;AACF,OAAO,MAAMC,kBAAkB;IAC7BR,MAAM;QACJM,eAAe;QACfC,WAAW;IACb;IACAL,IAAI;QACFI,eAAe;QACfC,WAAW;IACb;AACF,EAAE;AACF,OAAO,MAAME,mBAAmB;IAC9BT,MAAM;QACJM,eAAe;QACfC,WAAW;IACb;IACAL,IAAI;QACFI,eAAe;QACfC,WAAW;IACb;AACF,EAAE;AACF,OAAO,MAAMG,gBAAgB;IAC3BV,MAAM;QACJM,eAAe;QACfC,WAAW;IACb;IACAL,IAAI;QACFI,eAAe;QACfC,WAAW;IACb;AACF,EAAE;AACF,OAAO,MAAMI,mBAAmB;IAC9BX,MAAM;QACJO,WAAW;IACb;IACAL,IAAI;QACFK,WAAW;IACb;AACF,EAAE;AACF,OAAO,MAAMK,iBAAiB;IAC5BZ,MAAM;QACJO,WAAW;IACb;IACAL,IAAI;QACFK,WAAW;IACb;AACF,EAAE;AAEF,OAAO,MAAMM,+BAA+B;IAC1C,QAAQ;QACNC,QAAQ;QACRC,UAAU;QAEVC,OAAO;IACT;IACA,SAAS;QACPF,QAAQ;QACRC,UAAU;QACVC,OAAO;IACT;IACA,MAAM;QACJF,QAAQ;QACRC,UAAU;QACVC,OAAO;IACT;AACF,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["dateGrid.types.ts"],"sourcesContent":["import { DayOfWeek, DateRangeType, FirstWeekOfYear } from '../constants';\n\nexport interface Day {\n /** `Date.toString()` value of current date */\n key: string;\n /** `Date.getDate()` value of current date */\n date: string;\n /** `Date` object of current date */\n originalDate: Date;\n /** Is current date is in the same month as \"today\" date */\n isInMonth: boolean;\n /** Is current date is \"today\" date */\n isToday: boolean;\n /** Is current date is selected */\n isSelected: boolean;\n /** Is current date within restriction boundaries */\n isInBounds: boolean;\n /** Is current date marked */\n isMarked: boolean;\n}\n\nexport interface AvailableDateOptions extends RestrictedDatesOptions {\n /** Date from which we start the search */\n initialDate: Date;\n /** Ideal available date */\n targetDate: Date;\n /** Direction of search (`1` - search in future / `-1` search in past) */\n direction: number;\n}\n\nexport interface RestrictedDatesOptions {\n /**\n * If set the Calendar will not allow navigation to or selection of a date earlier than this value.\n */\n minDate?: Date;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date later than this value.\n */\n maxDate?: Date;\n\n /**\n * If set the Calendar will not allow selection of dates in this array.\n */\n restrictedDates?: Date[];\n}\n\nexport interface DayGridOptions extends RestrictedDatesOptions {\n /**\n * The first day of the week for your locale.\n */\n firstDayOfWeek: DayOfWeek;\n\n /**\n * Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,\n * FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values\n */\n firstWeekOfYear: FirstWeekOfYear;\n\n /**\n * The date range type indicating how many days should be selected as the user\n * selects days\n */\n dateRangeType: DateRangeType;\n\n /**\n * The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day\n * views.\n */\n daysToSelectInDayView?: number;\n\n /**\n * Value of today. If unspecified, current time in client machine will be used.\n */\n today?: Date;\n\n /**\n * Whether the calendar should show the week number (weeks 1 to 53) before each week row\n */\n showWeekNumbers?: boolean;\n\n /**\n * The days that are selectable when `dateRangeType` is WorkWeek.\n * If `dateRangeType` is not WorkWeek this property does nothing.\n */\n workWeekDays?: DayOfWeek[];\n\n /**\n * Which days in the generated grid should be marked.\n */\n markedDays?: Date[];\n\n /**\n * The currently selected date\n */\n selectedDate: Date;\n\n /**\n * The currently navigated date\n */\n navigatedDate: Date;\n\n /**\n * How many weeks to show by default. If not provided, will show enough weeks to display the current\n * month, between 4 and 6 depending\n */\n weeksToShow?: number;\n}\n"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"sources":["dateGrid.types.ts"],"sourcesContent":["import { DayOfWeek, DateRangeType, FirstWeekOfYear } from '../constants';\n\nexport interface Day {\n /** `Date.toString()` value of current date */\n key: string;\n /** `Date.getDate()` value of current date */\n date: string;\n /** `Date` object of current date */\n originalDate: Date;\n /** Is current date is in the same month as \"today\" date */\n isInMonth: boolean;\n /** Is current date is \"today\" date */\n isToday: boolean;\n /** Is current date is selected in range */\n isSelected: boolean;\n /** Is current date is selected */\n isSingleSelected: boolean;\n /** Is current date within restriction boundaries */\n isInBounds: boolean;\n /** Is current date marked */\n isMarked: boolean;\n}\n\nexport interface AvailableDateOptions extends RestrictedDatesOptions {\n /** Date from which we start the search */\n initialDate: Date;\n /** Ideal available date */\n targetDate: Date;\n /** Direction of search (`1` - search in future / `-1` search in past) */\n direction: number;\n}\n\nexport interface RestrictedDatesOptions {\n /**\n * If set the Calendar will not allow navigation to or selection of a date earlier than this value.\n */\n minDate?: Date;\n\n /**\n * If set the Calendar will not allow navigation to or selection of a date later than this value.\n */\n maxDate?: Date;\n\n /**\n * If set the Calendar will not allow selection of dates in this array.\n */\n restrictedDates?: Date[];\n}\n\nexport interface DayGridOptions extends RestrictedDatesOptions {\n /**\n * The first day of the week for your locale.\n */\n firstDayOfWeek: DayOfWeek;\n\n /**\n * Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,\n * FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values\n */\n firstWeekOfYear: FirstWeekOfYear;\n\n /**\n * The date range type indicating how many days should be selected as the user\n * selects days\n */\n dateRangeType: DateRangeType;\n\n /**\n * The number of days to select while dateRangeType === DateRangeType.Day. Used in order to have multi-day\n * views.\n */\n daysToSelectInDayView?: number;\n\n /**\n * Value of today. If unspecified, current time in client machine will be used.\n */\n today?: Date;\n\n /**\n * Whether the calendar should show the week number (weeks 1 to 53) before each week row\n */\n showWeekNumbers?: boolean;\n\n /**\n * The days that are selectable when `dateRangeType` is WorkWeek.\n * If `dateRangeType` is not WorkWeek this property does nothing.\n */\n workWeekDays?: DayOfWeek[];\n\n /**\n * Which days in the generated grid should be marked.\n */\n markedDays?: Date[];\n\n /**\n * The currently selected date\n */\n selectedDate: Date;\n\n /**\n * The currently navigated date\n */\n navigatedDate: Date;\n\n /**\n * How many weeks to show by default. If not provided, will show enough weeks to display the current\n * month, between 4 and 6 depending\n */\n weeksToShow?: number;\n}\n"],"names":[],"mappings":"AAAA,WA6GC"}
|
@@ -53,6 +53,7 @@ import { isRestrictedDate } from './isRestrictedDate';
|
|
53
53
|
isInMonth: date.getMonth() === navigatedDate.getMonth(),
|
54
54
|
isToday: compareDates(todaysDate, date),
|
55
55
|
isSelected: isInDateRangeArray(date, selectedDates),
|
56
|
+
isSingleSelected: selectedDates.length === 1 && compareDates(date, selectedDate),
|
56
57
|
isInBounds: !isRestrictedDate(date, restrictedDateOptions),
|
57
58
|
isMarked: (markedDays === null || markedDays === void 0 ? void 0 : markedDays.some((markedDay)=>compareDates(originalDate, markedDay))) || false
|
58
59
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["getDayGrid.ts"],"sourcesContent":["import { addDays, compareDates, getDateRangeArray, isInDateRangeArray } from '../dateMath/dateMath';\nimport { DAYS_IN_WEEK } from '../constants';\nimport { Day, DayGridOptions } from './dateGrid.types';\nimport { getDateRangeTypeToUse } from './getDateRangeTypeToUse';\nimport { getBoundedDateRange } from './getBoundedDateRange';\nimport { isRestrictedDate } from './isRestrictedDate';\n\n/**\n * Generates a grid of days, given the `options`.\n * Returns one additional week at the begining from the previous range\n * and one at the end from the future range\n * @param options - parameters to specify date related restrictions for the resulting grid\n */\nexport const getDayGrid = (options: DayGridOptions): Day[][] => {\n const {\n selectedDate,\n dateRangeType,\n firstDayOfWeek,\n today,\n minDate,\n maxDate,\n weeksToShow,\n workWeekDays,\n daysToSelectInDayView,\n restrictedDates,\n markedDays,\n } = options;\n const restrictedDateOptions = { minDate, maxDate, restrictedDates };\n\n const todaysDate = today || new Date();\n\n const navigatedDate = options.navigatedDate ? options.navigatedDate : todaysDate;\n\n let date;\n if (weeksToShow && weeksToShow <= 4) {\n // if showing less than a full month, just use date == navigatedDate\n date = new Date(navigatedDate.getFullYear(), navigatedDate.getMonth(), navigatedDate.getDate());\n } else {\n date = new Date(navigatedDate.getFullYear(), navigatedDate.getMonth(), 1);\n }\n const weeks: Day[][] = [];\n\n // Cycle the date backwards to get to the first day of the week.\n while (date.getDay() !== firstDayOfWeek) {\n date.setDate(date.getDate() - 1);\n }\n\n // add the transition week as last week of previous range\n date = addDays(date, -DAYS_IN_WEEK);\n\n // a flag to indicate whether all days of the week are outside the month\n let isAllDaysOfWeekOutOfMonth = false;\n\n // in work week view if the days aren't contiguous we use week view instead\n const selectedDateRangeType = getDateRangeTypeToUse(dateRangeType, workWeekDays, firstDayOfWeek);\n\n let selectedDates: Date[] = [];\n\n if (selectedDate) {\n selectedDates = getDateRangeArray(\n selectedDate,\n selectedDateRangeType,\n firstDayOfWeek,\n workWeekDays,\n daysToSelectInDayView,\n );\n selectedDates = getBoundedDateRange(selectedDates, minDate, maxDate);\n }\n\n let shouldGetWeeks = true;\n\n for (let weekIndex = 0; shouldGetWeeks; weekIndex++) {\n const week: Day[] = [];\n\n isAllDaysOfWeekOutOfMonth = true;\n\n for (let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++) {\n const originalDate = new Date(date.getTime());\n const dayInfo: Day = {\n key: date.toString(),\n date: date.getDate().toString(),\n originalDate,\n isInMonth: date.getMonth() === navigatedDate.getMonth(),\n isToday: compareDates(todaysDate, date),\n isSelected: isInDateRangeArray(date, selectedDates),\n isInBounds: !isRestrictedDate(date, restrictedDateOptions),\n isMarked: markedDays?.some((markedDay: Date) => compareDates(originalDate, markedDay)) || false,\n };\n\n week.push(dayInfo);\n\n if (dayInfo.isInMonth) {\n isAllDaysOfWeekOutOfMonth = false;\n }\n\n date.setDate(date.getDate() + 1);\n }\n\n // We append the condition of the loop depending upon the showSixWeeksByDefault prop.\n shouldGetWeeks = weeksToShow ? weekIndex < weeksToShow + 1 : !isAllDaysOfWeekOutOfMonth || weekIndex === 0;\n\n // we don't check shouldGetWeeks before pushing because we want to add one extra week for transition state\n weeks.push(week);\n }\n\n return weeks;\n};\n"],"names":["addDays","compareDates","getDateRangeArray","isInDateRangeArray","DAYS_IN_WEEK","getDateRangeTypeToUse","getBoundedDateRange","isRestrictedDate","getDayGrid","options","selectedDate","dateRangeType","firstDayOfWeek","today","minDate","maxDate","weeksToShow","workWeekDays","daysToSelectInDayView","restrictedDates","markedDays","restrictedDateOptions","todaysDate","Date","navigatedDate","date","getFullYear","getMonth","getDate","weeks","getDay","setDate","isAllDaysOfWeekOutOfMonth","selectedDateRangeType","selectedDates","shouldGetWeeks","weekIndex","week","dayIndex","originalDate","getTime","dayInfo","key","toString","isInMonth","isToday","isSelected","isInBounds","isMarked","some","markedDay","push"],"mappings":"AAAA,SAASA,OAAO,EAAEC,YAAY,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,uBAAuB;AACpG,SAASC,YAAY,QAAQ,eAAe;AAE5C,SAASC,qBAAqB,QAAQ,0BAA0B;AAChE,SAASC,mBAAmB,QAAQ,wBAAwB;AAC5D,SAASC,gBAAgB,QAAQ,qBAAqB;AAEtD;;;;;CAKC,GACD,OAAO,MAAMC,aAAa,CAACC;IACzB,MAAM,EACJC,YAAY,EACZC,aAAa,EACbC,cAAc,EACdC,KAAK,EACLC,OAAO,EACPC,OAAO,EACPC,WAAW,EACXC,YAAY,EACZC,qBAAqB,EACrBC,eAAe,EACfC,UAAU,EACX,GAAGX;IACJ,MAAMY,wBAAwB;QAAEP;QAASC;QAASI;IAAgB;IAElE,MAAMG,aAAaT,SAAS,IAAIU;IAEhC,MAAMC,gBAAgBf,QAAQe,aAAa,GAAGf,QAAQ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RangeArray } from '../dateMath/dateMath';\nimport { DAYS_IN_WEEK } from '../constants';\nimport { Day, DayGridOptions } from './dateGrid.types';\nimport { getDateRangeTypeToUse } from './getDateRangeTypeToUse';\nimport { getBoundedDateRange } from './getBoundedDateRange';\nimport { isRestrictedDate } from './isRestrictedDate';\n\n/**\n * Generates a grid of days, given the `options`.\n * Returns one additional week at the begining from the previous range\n * and one at the end from the future range\n * @param options - parameters to specify date related restrictions for the resulting grid\n */\nexport const getDayGrid = (options: DayGridOptions): Day[][] => {\n const {\n selectedDate,\n dateRangeType,\n firstDayOfWeek,\n today,\n minDate,\n maxDate,\n weeksToShow,\n workWeekDays,\n daysToSelectInDayView,\n restrictedDates,\n markedDays,\n } = options;\n const restrictedDateOptions = { minDate, maxDate, restrictedDates };\n\n const todaysDate = today || new Date();\n\n const navigatedDate = options.navigatedDate ? options.navigatedDate : todaysDate;\n\n let date;\n if (weeksToShow && weeksToShow <= 4) {\n // if showing less than a full month, just use date == navigatedDate\n date = new Date(navigatedDate.getFullYear(), navigatedDate.getMonth(), navigatedDate.getDate());\n } else {\n date = new Date(navigatedDate.getFullYear(), navigatedDate.getMonth(), 1);\n }\n const weeks: Day[][] = [];\n\n // Cycle the date backwards to get to the first day of the week.\n while (date.getDay() !== firstDayOfWeek) {\n date.setDate(date.getDate() - 1);\n }\n\n // add the transition week as last week of previous range\n date = addDays(date, -DAYS_IN_WEEK);\n\n // a flag to indicate whether all days of the week are outside the month\n let isAllDaysOfWeekOutOfMonth = false;\n\n // in work week view if the days aren't contiguous we use week view instead\n const selectedDateRangeType = getDateRangeTypeToUse(dateRangeType, workWeekDays, firstDayOfWeek);\n\n let selectedDates: Date[] = [];\n\n if (selectedDate) {\n selectedDates = getDateRangeArray(\n selectedDate,\n selectedDateRangeType,\n firstDayOfWeek,\n workWeekDays,\n daysToSelectInDayView,\n );\n selectedDates = getBoundedDateRange(selectedDates, minDate, maxDate);\n }\n\n let shouldGetWeeks = true;\n\n for (let weekIndex = 0; shouldGetWeeks; weekIndex++) {\n const week: Day[] = [];\n\n isAllDaysOfWeekOutOfMonth = true;\n\n for (let dayIndex = 0; dayIndex < DAYS_IN_WEEK; dayIndex++) {\n const originalDate = new Date(date.getTime());\n const dayInfo: Day = {\n key: date.toString(),\n date: date.getDate().toString(),\n originalDate,\n isInMonth: date.getMonth() === navigatedDate.getMonth(),\n isToday: compareDates(todaysDate, date),\n isSelected: isInDateRangeArray(date, selectedDates),\n isSingleSelected: selectedDates.length === 1 && compareDates(date, selectedDate),\n isInBounds: !isRestrictedDate(date, restrictedDateOptions),\n isMarked: markedDays?.some((markedDay: Date) => compareDates(originalDate, markedDay)) || false,\n };\n\n week.push(dayInfo);\n\n if (dayInfo.isInMonth) {\n isAllDaysOfWeekOutOfMonth = false;\n }\n\n date.setDate(date.getDate() + 1);\n }\n\n // We append the condition of the loop depending upon the showSixWeeksByDefault prop.\n shouldGetWeeks = weeksToShow ? weekIndex < weeksToShow + 1 : !isAllDaysOfWeekOutOfMonth || weekIndex === 0;\n\n // we don't check shouldGetWeeks before pushing because we want to add one extra week for transition state\n weeks.push(week);\n }\n\n return weeks;\n};\n"],"names":["addDays","compareDates","getDateRangeArray","isInDateRangeArray","DAYS_IN_WEEK","getDateRangeTypeToUse","getBoundedDateRange","isRestrictedDate","getDayGrid","options","selectedDate","dateRangeType","firstDayOfWeek","today","minDate","maxDate","weeksToShow","workWeekDays","daysToSelectInDayView","restrictedDates","markedDays","restrictedDateOptions","todaysDate","Date","navigatedDate","date","getFullYear","getMonth","getDate","weeks","getDay","setDate","isAllDaysOfWeekOutOfMonth","selectedDateRangeType","selectedDates","shouldGetWeeks","weekIndex","week","dayIndex","originalDate","getTime","dayInfo","key","toString","isInMonth","isToday","isSelected","isSingleSelected","length","isInBounds","isMarked","some","markedDay","push"],"mappings":"AAAA,SAASA,OAAO,EAAEC,YAAY,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,uBAAuB;AACpG,SAASC,YAAY,QAAQ,eAAe;AAE5C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;QAEtBL,4BAA4B;QAE5B,IAAK,IAAIM,WAAW,GAAGA,WAAWlC,cAAckC,WAAY;YAC1D,MAAMC,eAAe,IAAIhB,KAAKE,KAAKe,OAAO;YAC1C,MAAMC,UAAe;gBACnBC,KAAKjB,KAAKkB,QAAQ;gBAClBlB,MAAMA,KAAKG,OAAO,GAAGe,QAAQ;gBAC7BJ;gBACAK,WAAWnB,KAAKE,QAAQ,OAAOH,cAAcG,QAAQ;gBACrDkB,SAAS5C,aAAaqB,YAAYG;gBAClCqB,YAAY3C,mBAAmBsB,MAAMS;gBACrCa,kBAAkBb,cAAcc,MAAM,KAAK,KAAK/C,aAAawB,MAAMf;gBACnEuC,YAAY,CAAC1C,iBAAiBkB,MAAMJ;gBACpC6B,UAAU9B,CAAAA,uBAAAA,iCAAAA,WAAY+B,IAAI,CAAC,CAACC,YAAoBnD,aAAasC,cAAca,gBAAe;YAC5F;YAEAf,KAAKgB,IAAI,CAACZ;YAEV,IAAIA,QAAQG,SAAS,EAAE;gBACrBZ,4BAA4B;YAC9B;YAEAP,KAAKM,OAAO,CAACN,KAAKG,OAAO,KAAK;QAChC;QAEA,qFAAqF;QACrFO,iBAAiBnB,cAAcoB,YAAYpB,cAAc,IAAI,CAACgB,6BAA6BI,cAAc;QAEzG,0GAA0G;QAC1GP,MAAMwB,IAAI,CAAChB;IACb;IAEA,OAAOR;AACT,EAAE"}
|
@@ -28,18 +28,13 @@ const defaultWorkWeekDays = [
|
|
28
28
|
];
|
29
29
|
function useDateState(props) {
|
30
30
|
const { value, today: todayProp, onSelectDate } = props;
|
31
|
-
const today = _react.useMemo(()=>
|
32
|
-
if (todayProp === undefined) {
|
33
|
-
return new Date();
|
34
|
-
}
|
35
|
-
return todayProp;
|
36
|
-
}, [
|
31
|
+
const today = _react.useMemo(()=>todayProp !== null && todayProp !== void 0 ? todayProp : new Date(), [
|
37
32
|
todayProp
|
38
33
|
]);
|
39
34
|
/** The currently selected date in the calendar */ const [selectedDate, setSelectedDate] = (0, _reactutilities.useControllableState)({
|
40
|
-
|
41
|
-
|
42
|
-
|
35
|
+
state: value,
|
36
|
+
defaultState: value ? undefined : today,
|
37
|
+
initialState: today
|
43
38
|
});
|
44
39
|
/** The currently focused date in the day picker, but not necessarily selected */ const [navigatedDay = today, setNavigatedDay] = _react.useState(value);
|
45
40
|
/** The currently focused date in the month picker, but not necessarily selected */ const [navigatedMonth = today, setNavigatedMonth] = _react.useState(value);
|
@@ -76,16 +71,8 @@ function useVisibilityState({ isDayPickerVisible: isDayPickerVisibleProp, isMont
|
|
76
71
|
isDayPickerVisible: isDayPickerVisibleProp,
|
77
72
|
showMonthPickerAsOverlay
|
78
73
|
});
|
79
|
-
const [isMonthPickerVisible, setIsMonthPickerVisible] = (0
|
80
|
-
|
81
|
-
initialState: true,
|
82
|
-
state: showMonthPickerAsOverlayState ? undefined : isMonthPickerVisibleProp
|
83
|
-
});
|
84
|
-
/** State used to show/hide day picker */ const [isDayPickerVisible, setIsDayPickerVisible] = (0, _reactutilities.useControllableState)({
|
85
|
-
defaultState: true,
|
86
|
-
initialState: true,
|
87
|
-
state: showMonthPickerAsOverlayState ? undefined : isDayPickerVisibleProp
|
88
|
-
});
|
74
|
+
const [isMonthPickerVisible, setIsMonthPickerVisible] = _react.useState(()=>showMonthPickerAsOverlayState ? false : isMonthPickerVisibleProp !== null && isMonthPickerVisibleProp !== void 0 ? isMonthPickerVisibleProp : false);
|
75
|
+
/** State used to show/hide day picker */ const [isDayPickerVisible, setIsDayPickerVisible] = _react.useState(()=>showMonthPickerAsOverlayState ? true : isDayPickerVisibleProp !== null && isDayPickerVisibleProp !== void 0 ? isDayPickerVisibleProp : true);
|
89
76
|
const toggleDayMonthPickerVisibility = ()=>{
|
90
77
|
setIsMonthPickerVisible(!isMonthPickerVisible);
|
91
78
|
setIsDayPickerVisible(!isDayPickerVisible);
|