@zendeskgarden/react-datepickers 9.0.0-next.9 → 9.0.0

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 (37) hide show
  1. package/dist/esm/elements/DatePicker/DatePicker.js +5 -5
  2. package/dist/esm/elements/DatePicker/components/Calendar.js +12 -12
  3. package/dist/esm/elements/DatePicker/components/MonthSelector.js +4 -4
  4. package/dist/esm/elements/DatePickerRange/components/Calendar.js +1 -1
  5. package/dist/esm/elements/DatePickerRange/components/Month.js +26 -26
  6. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-left-stroke.svg.js +1 -1
  7. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-right-stroke.svg.js +1 -1
  8. package/dist/esm/styled/StyledCalendar.js +4 -6
  9. package/dist/esm/styled/StyledCalendarItem.js +8 -10
  10. package/dist/esm/styled/StyledDatePicker.js +19 -14
  11. package/dist/esm/styled/StyledDay.js +71 -33
  12. package/dist/esm/styled/StyledDayLabel.js +4 -6
  13. package/dist/esm/styled/StyledHeader.js +4 -6
  14. package/dist/esm/styled/StyledHeaderLabel.js +4 -6
  15. package/dist/esm/styled/StyledHeaderPaddle.js +45 -15
  16. package/dist/esm/styled/StyledHighlight.js +26 -23
  17. package/dist/esm/styled/StyledMenu.js +2 -5
  18. package/dist/esm/styled/StyledMenuWrapper.js +8 -9
  19. package/dist/esm/styled/StyledRangeCalendar.js +3 -5
  20. package/dist/index.cjs.js +234 -174
  21. package/dist/typings/elements/DatePicker/utils/date-picker-reducer.d.ts +4 -4
  22. package/dist/typings/elements/DatePicker/utils/useDatePickerContext.d.ts +0 -1
  23. package/dist/typings/elements/DatePickerRange/DatePickerRange.d.ts +4 -2
  24. package/dist/typings/elements/DatePickerRange/utils/date-picker-range-reducer.d.ts +4 -4
  25. package/dist/typings/styled/StyledCalendar.d.ts +3 -2
  26. package/dist/typings/styled/StyledCalendarItem.d.ts +4 -3
  27. package/dist/typings/styled/StyledDatePicker.d.ts +3 -2
  28. package/dist/typings/styled/StyledDay.d.ts +5 -5
  29. package/dist/typings/styled/StyledDayLabel.d.ts +3 -2
  30. package/dist/typings/styled/StyledHeader.d.ts +3 -2
  31. package/dist/typings/styled/StyledHeaderLabel.d.ts +3 -2
  32. package/dist/typings/styled/StyledHeaderPaddle.d.ts +7 -4
  33. package/dist/typings/styled/StyledHighlight.d.ts +5 -4
  34. package/dist/typings/styled/StyledMenuWrapper.d.ts +4 -4
  35. package/dist/typings/styled/StyledRangeCalendar.d.ts +2 -1
  36. package/package.json +7 -8
  37. package/LICENSE.md +0 -176
package/dist/index.cjs.js CHANGED
@@ -62,134 +62,157 @@ const PLACEMENT = ['auto', ...reactTheming.PLACEMENT];
62
62
  const COMPONENT_ID$b = 'datepickers.menu';
63
63
  const StyledMenu = styled__default.default.div.attrs({
64
64
  'data-garden-id': COMPONENT_ID$b,
65
- 'data-garden-version': '9.0.0-next.9'
65
+ 'data-garden-version': '9.0.0'
66
66
  }).withConfig({
67
67
  displayName: "StyledMenu",
68
68
  componentId: "sc-1npbkk0-0"
69
69
  })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
70
- StyledMenu.defaultProps = {
71
- theme: reactTheming.DEFAULT_THEME
72
- };
73
70
 
74
71
  const COMPONENT_ID$a = 'datepickers.menu_wrapper';
75
72
  const StyledMenuWrapper = styled__default.default.div.attrs(props => ({
76
- className: props.isAnimated && 'is-animated'
73
+ 'data-garden-id': COMPONENT_ID$a,
74
+ 'data-garden-version': '9.0.0',
75
+ className: props.$isAnimated && 'is-animated'
77
76
  })).withConfig({
78
77
  displayName: "StyledMenuWrapper",
79
78
  componentId: "sc-6fowoz-0"
80
- })(["top:0;left:0;", ";", ";"], props => reactTheming.menuStyles(reactTheming.getMenuPosition(props.placement), {
79
+ })(["top:0;left:0;", ";", ";"], props => reactTheming.menuStyles(reactTheming.getMenuPosition(props.$placement), {
81
80
  theme: props.theme,
82
- hidden: props.isHidden,
81
+ hidden: props['aria-hidden'],
83
82
  margin: `${props.theme.space.base}px`,
84
- zIndex: props.zIndex,
85
- animationModifier: props.isAnimated ? '.is-animated' : undefined
83
+ zIndex: props.$zIndex,
84
+ animationModifier: props.$isAnimated ? '.is-animated' : undefined
86
85
  }), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
87
- StyledMenuWrapper.defaultProps = {
88
- theme: reactTheming.DEFAULT_THEME
89
- };
90
86
 
91
87
  const COMPONENT_ID$9 = 'datepickers.datepicker';
92
- const retrievePadding = _ref => {
88
+ const sizeStyles$4 = _ref => {
93
89
  let {
94
- isCompact,
90
+ $isCompact,
95
91
  theme
96
92
  } = _ref;
97
- let value = theme.space.base * 5;
98
- if (isCompact) {
99
- value = theme.space.base * 4;
100
- }
101
- return `margin: ${value}px;`;
93
+ const margin = theme.space.base * ($isCompact ? 4 : 5);
94
+ return styled.css(["margin:", "px;"], margin);
95
+ };
96
+ const colorStyles$3 = _ref2 => {
97
+ let {
98
+ theme
99
+ } = _ref2;
100
+ const foreground = reactTheming.getColor({
101
+ variable: 'foreground.default',
102
+ theme
103
+ });
104
+ return styled.css(["background-color:transparent;color:", ";"], foreground);
102
105
  };
103
106
  const StyledDatePicker = styled__default.default.div.attrs({
104
- 'data-garden-id': COMPONENT_ID$9
107
+ 'data-garden-id': COMPONENT_ID$9,
108
+ 'data-garden-version': '9.0.0'
105
109
  }).withConfig({
106
110
  displayName: "StyledDatePicker",
107
111
  componentId: "sc-15hwqzh-0"
108
- })(["direction:", ";", " background-color:", ";color:", ";", ";"], props => props.theme.rtl && 'rtl', retrievePadding, props => reactTheming.getColorV8('background', 600 , props.theme), props => reactTheming.getColorV8('foreground', 600 , props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
109
- StyledDatePicker.defaultProps = {
110
- theme: reactTheming.DEFAULT_THEME
111
- };
112
+ })(["direction:", ";", " ", " ", ";"], p => p.theme.rtl && 'rtl', sizeStyles$4, colorStyles$3, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
112
113
 
113
114
  const COMPONENT_ID$8 = 'datepickers.range_calendar';
114
115
  const StyledRangeCalendar = styled__default.default.div.attrs({
115
- 'data-garden-id': COMPONENT_ID$8
116
+ 'data-garden-id': COMPONENT_ID$8,
117
+ 'data-garden-version': '9.0.0'
116
118
  }).withConfig({
117
119
  displayName: "StyledRangeCalendar",
118
120
  componentId: "sc-1og46sy-0"
119
121
  })(["display:flex;overflow:auto;", "{margin:0;", "}", ";"], StyledDatePicker, props => props.theme.rtl ? `&:last-of-type {margin-right: ${props.theme.space.base * 5}px}` : `&:first-of-type {margin-right: ${props.theme.space.base * 5}px}`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
120
- StyledRangeCalendar.defaultProps = {
121
- theme: reactTheming.DEFAULT_THEME
122
- };
123
122
 
124
123
  const COMPONENT_ID$7 = 'datepickers.header';
125
124
  const StyledHeader = styled__default.default.div.attrs({
126
- 'data-garden-id': COMPONENT_ID$7
125
+ 'data-garden-id': COMPONENT_ID$7,
126
+ 'data-garden-version': '9.0.0'
127
127
  }).withConfig({
128
128
  displayName: "StyledHeader",
129
129
  componentId: "sc-upq318-0"
130
- })(["display:flex;width:", "px;", ";"], props => props.isCompact ? props.theme.space.base * 56 : props.theme.space.base * 70, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
131
- StyledHeader.defaultProps = {
132
- theme: reactTheming.DEFAULT_THEME
133
- };
130
+ })(["display:flex;width:", "px;", ";"], props => props.$isCompact ? props.theme.space.base * 56 : props.theme.space.base * 70, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
134
131
 
135
- const retrieveSizing = _ref => {
132
+ const sizeStyles$3 = _ref => {
136
133
  let {
137
- isCompact,
134
+ $isCompact,
138
135
  theme
139
136
  } = _ref;
140
- let size = theme.space.base * 10;
141
- if (isCompact) {
142
- size = theme.space.base * 8;
143
- }
144
- return styled.css(["width:", "px;height:", "px;"], size, size);
137
+ const iconSize = theme.iconSizes.md;
138
+ const size = theme.space.base * ($isCompact ? 8 : 10);
139
+ return styled.css(["width:", "px;height:", "px;svg{width:", ";height:", ";}"], size, size, iconSize, iconSize);
145
140
  };
146
- const retrieveColor$1 = _ref2 => {
141
+ const colorStyles$2 = _ref2 => {
147
142
  let {
148
143
  theme
149
144
  } = _ref2;
150
- return styled.css([":hover{background-color:", ";color:", ";}:active{background-color:", ";color:", ";}color:", ";"], reactTheming.getColorV8('primaryHue', 600, theme, 0.08), reactTheming.getColorV8('foreground', 600 , theme), reactTheming.getColorV8('primaryHue', 600, theme, 0.2), reactTheming.getColorV8('foreground', 600 , theme), reactTheming.getColorV8('neutralHue', 600, theme));
145
+ const foreground = reactTheming.getColor({
146
+ variable: 'foreground.subtle',
147
+ theme
148
+ });
149
+ const foregroundHover = reactTheming.getColor({
150
+ variable: 'foreground.subtle',
151
+ light: {
152
+ offset: 100
153
+ },
154
+ dark: {
155
+ offset: -100
156
+ },
157
+ theme
158
+ });
159
+ const backgroundHover = reactTheming.getColor({
160
+ variable: 'background.primaryEmphasis',
161
+ theme,
162
+ transparency: theme.opacity[100]
163
+ });
164
+ const foregroundActive = reactTheming.getColor({
165
+ variable: 'foreground.subtle',
166
+ light: {
167
+ offset: 200
168
+ },
169
+ dark: {
170
+ offset: -200
171
+ },
172
+ theme
173
+ });
174
+ const backgroundActive = reactTheming.getColor({
175
+ variable: 'background.primaryEmphasis',
176
+ theme,
177
+ transparency: theme.opacity[200]
178
+ });
179
+ return styled.css(["color:", ";:hover{background-color:", ";color:", ";}:active{background-color:", ";color:", ";}"], foreground, backgroundHover, foregroundHover, backgroundActive, foregroundActive);
151
180
  };
152
181
  const COMPONENT_ID$6 = 'datepickers.header_paddle';
153
182
  const StyledHeaderPaddle = styled__default.default.div.attrs({
154
- 'data-garden-id': COMPONENT_ID$6
183
+ 'data-garden-id': COMPONENT_ID$6,
184
+ 'data-garden-version': '9.0.0'
155
185
  }).withConfig({
156
186
  displayName: "StyledHeaderPaddle",
157
187
  componentId: "sc-2oqh0g-0"
158
- })(["display:flex;align-items:center;justify-content:center;transform:", ";visibility:", ";border-radius:50%;cursor:pointer;", " ", " svg{width:", ";height:", ";}", ";"], props => props.theme.rtl && 'rotate(180deg)', props => props.isHidden && 'hidden', retrieveSizing, retrieveColor$1, props => `${props.theme.iconSizes.md}`, props => `${props.theme.iconSizes.md}`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
159
- StyledHeaderPaddle.defaultProps = {
160
- theme: reactTheming.DEFAULT_THEME
161
- };
188
+ })(["display:flex;align-items:center;justify-content:center;transform:", ";border-radius:50%;cursor:pointer;&[aria-hidden]{visibility:hidden;}", " ", " ", ";"], props => props.theme.rtl && 'rotate(180deg)', sizeStyles$3, colorStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
162
189
 
163
190
  const COMPONENT_ID$5 = 'datepickers.header_label';
164
191
  const StyledHeaderLabel = styled__default.default.div.attrs({
165
- 'data-garden-id': COMPONENT_ID$5
192
+ 'data-garden-id': COMPONENT_ID$5,
193
+ 'data-garden-version': '9.0.0'
166
194
  }).withConfig({
167
195
  displayName: "StyledHeaderLabel",
168
196
  componentId: "sc-1ryf5ub-0"
169
- })(["display:flex;flex-grow:1;align-items:center;justify-content:center;font-size:", ";font-weight:", ";", ";"], props => props.isCompact ? props.theme.fontSizes.sm : props.theme.fontSizes.md, props => props.theme.fontWeights.semibold, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
170
- StyledHeaderLabel.defaultProps = {
171
- theme: reactTheming.DEFAULT_THEME
172
- };
197
+ })(["display:flex;flex-grow:1;align-items:center;justify-content:center;font-size:", ";font-weight:", ";", ";"], props => props.$isCompact ? props.theme.fontSizes.sm : props.theme.fontSizes.md, props => props.theme.fontWeights.semibold, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
173
198
 
174
199
  const COMPONENT_ID$4 = 'datepickers.calendar';
175
200
  const StyledCalendar = styled__default.default.div.attrs({
176
- 'data-garden-id': COMPONENT_ID$4
201
+ 'data-garden-id': COMPONENT_ID$4,
202
+ 'data-garden-version': '9.0.0'
177
203
  }).withConfig({
178
204
  displayName: "StyledCalendar",
179
205
  componentId: "sc-g5hoe8-0"
180
- })(["width:", "px;", ";"], props => props.isCompact ? props.theme.space.base * 56 : props.theme.space.base * 70, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
181
- StyledCalendar.defaultProps = {
182
- theme: reactTheming.DEFAULT_THEME
183
- };
206
+ })(["width:", "px;", ";"], props => props.$isCompact ? props.theme.space.base * 56 : props.theme.space.base * 70, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
184
207
 
185
208
  const COMPONENT_ID$3 = 'datepickers.calendar_item';
186
- const retrieveSize = _ref => {
209
+ const sizeStyles$2 = _ref => {
187
210
  let {
188
- isCompact,
211
+ $isCompact,
189
212
  theme
190
213
  } = _ref;
191
214
  let size;
192
- if (isCompact) {
215
+ if ($isCompact) {
193
216
  size = `${theme.space.base * 8}px`;
194
217
  } else {
195
218
  size = `${theme.space.base * 10}px`;
@@ -197,109 +220,146 @@ const retrieveSize = _ref => {
197
220
  return styled.css(["width:", ";height:", ";"], size, size);
198
221
  };
199
222
  const StyledCalendarItem = styled__default.default.div.attrs({
200
- 'data-garden-id': COMPONENT_ID$3
223
+ 'data-garden-id': COMPONENT_ID$3,
224
+ 'data-garden-version': '9.0.0'
201
225
  }).withConfig({
202
226
  displayName: "StyledCalendarItem",
203
227
  componentId: "sc-143w8wb-0"
204
- })(["display:inline-block;position:relative;vertical-align:top;", " ", ";"], retrieveSize, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
205
- StyledCalendarItem.defaultProps = {
206
- theme: reactTheming.DEFAULT_THEME
207
- };
228
+ })(["display:inline-block;position:relative;vertical-align:top;", " ", ";"], sizeStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
208
229
 
209
230
  const COMPONENT_ID$2 = 'datepickers.day_label';
210
231
  const StyledDayLabel = styled__default.default.div.attrs({
211
- 'data-garden-id': COMPONENT_ID$2
232
+ 'data-garden-id': COMPONENT_ID$2,
233
+ 'data-garden-version': '9.0.0'
212
234
  }).withConfig({
213
235
  displayName: "StyledDayLabel",
214
236
  componentId: "sc-9bh1p7-0"
215
- })(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:", ";font-weight:", ";", ";"], props => props.isCompact ? props.theme.fontSizes.sm : props.theme.fontSizes.md, props => props.theme.fontWeights.semibold, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
216
- StyledDayLabel.defaultProps = {
217
- theme: reactTheming.DEFAULT_THEME
218
- };
237
+ })(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:", ";font-weight:", ";", ";"], props => props.$isCompact ? props.theme.fontSizes.sm : props.theme.fontSizes.md, props => props.theme.fontWeights.semibold, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
219
238
 
220
239
  const COMPONENT_ID$1 = 'datepickers.highlight';
221
- const retrieveBorderRadius = _ref => {
240
+ const sizeStyles$1 = _ref => {
222
241
  let {
223
242
  theme,
224
- isEnd,
225
- isStart
243
+ $isEnd,
244
+ $isStart
226
245
  } = _ref;
227
- const startValue = 'border-radius: 0 50% 50% 0;';
228
- const endValue = 'border-radius: 50% 0 0 50%;';
246
+ let borderRadius;
247
+ const startValue = '0 50% 50% 0;';
248
+ const endValue = '50% 0 0 50%;';
229
249
  if (theme.rtl) {
230
- if (isStart) {
231
- return startValue;
232
- } else if (isEnd) {
233
- return endValue;
250
+ if ($isStart) {
251
+ borderRadius = startValue;
252
+ } else if ($isEnd) {
253
+ borderRadius = endValue;
234
254
  }
235
255
  }
236
- if (isStart) {
237
- return endValue;
238
- } else if (isEnd) {
239
- return startValue;
256
+ if ($isStart) {
257
+ borderRadius = endValue;
258
+ } else if ($isEnd) {
259
+ borderRadius = startValue;
240
260
  }
241
- return '';
261
+ return styled.css(["border-radius:", ";width:100%;height:100%;"], borderRadius);
242
262
  };
243
- const retrieveColor = _ref2 => {
263
+ const colorStyles$1 = _ref2 => {
244
264
  let {
245
- isHighlighted,
265
+ $isHighlighted,
246
266
  theme
247
267
  } = _ref2;
248
- return styled.css(["background-color:", ";"], isHighlighted && reactTheming.getColorV8('primaryHue', 600, theme, 0.08));
268
+ return styled.css(["background-color:", ";"], $isHighlighted && reactTheming.getColor({
269
+ variable: 'background.primaryEmphasis',
270
+ transparency: theme.opacity[100],
271
+ theme
272
+ }));
249
273
  };
250
274
  const StyledHighlight = styled__default.default.div.attrs({
251
- 'data-garden-id': COMPONENT_ID$1
275
+ 'data-garden-id': COMPONENT_ID$1,
276
+ 'data-garden-version': '9.0.0'
252
277
  }).withConfig({
253
278
  displayName: "StyledHighlight",
254
279
  componentId: "sc-16vr32x-0"
255
- })(["position:absolute;top:0;left:0;width:100%;height:100%;", " ", " ", ";"], retrieveBorderRadius, retrieveColor, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
256
- StyledHighlight.defaultProps = {
257
- theme: reactTheming.DEFAULT_THEME
258
- };
280
+ })(["position:absolute;top:0;left:0;", " ", " ", ";"], sizeStyles$1, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
259
281
 
260
- const retrieveStyledDayColors = _ref => {
282
+ const sizeStyles = () => {
283
+ return styled.css(["border-radius:50%;width:100%;height:100%;"]);
284
+ };
285
+ const colorStyles = _ref => {
261
286
  let {
262
- isSelected,
263
- isDisabled,
264
- isToday,
265
- isPreviousMonth,
266
- theme
287
+ $isToday,
288
+ $isPreviousMonth,
289
+ theme,
290
+ ...props
267
291
  } = _ref;
292
+ const isSelected = props['aria-selected'];
293
+ const isDisabled = props['aria-disabled'];
268
294
  let backgroundColor = 'inherit';
269
- let color = reactTheming.getColorV8('primaryHue', 600, theme);
295
+ let foreground;
296
+ const backgroundHover = reactTheming.getColor({
297
+ variable: 'background.primaryEmphasis',
298
+ theme,
299
+ transparency: theme.opacity[100]
300
+ });
301
+ const foregroundHover = !$isToday && reactTheming.getColor({
302
+ variable: 'foreground.primary',
303
+ light: {
304
+ offset: 100
305
+ },
306
+ dark: {
307
+ offset: -100
308
+ },
309
+ theme
310
+ });
311
+ const backgroundActive = reactTheming.getColor({
312
+ variable: 'background.primaryEmphasis',
313
+ theme,
314
+ transparency: theme.opacity[200]
315
+ });
316
+ const foregroundActive = !$isToday && reactTheming.getColor({
317
+ variable: 'foreground.primary',
318
+ light: {
319
+ offset: 200
320
+ },
321
+ dark: {
322
+ offset: -200
323
+ },
324
+ theme
325
+ });
270
326
  if (isSelected && !isDisabled) {
271
- backgroundColor = reactTheming.getColorV8('primaryHue', 600, theme);
272
- color = reactTheming.getColorV8('background', 600 , theme);
327
+ backgroundColor = reactTheming.getColor({
328
+ variable: 'background.primaryEmphasis',
329
+ theme
330
+ });
331
+ foreground = reactTheming.getColor({
332
+ variable: 'foreground.onEmphasis',
333
+ theme
334
+ });
273
335
  } else if (isDisabled) {
274
- color = reactTheming.getColorV8('neutralHue', 400, theme);
275
- } else if (isToday) {
276
- color = 'inherit';
277
- } else if (isPreviousMonth) {
278
- color = reactTheming.getColorV8('neutralHue', 600, theme);
336
+ foreground = reactTheming.getColor({
337
+ variable: 'foreground.disabled',
338
+ theme
339
+ });
340
+ } else if ($isToday) {
341
+ foreground = 'inherit';
342
+ } else if ($isPreviousMonth) {
343
+ foreground = reactTheming.getColor({
344
+ variable: 'foreground.subtle',
345
+ theme
346
+ });
347
+ } else {
348
+ foreground = reactTheming.getColor({
349
+ variable: 'foreground.primary',
350
+ theme
351
+ });
279
352
  }
280
- return styled.css(["background-color:", ";color:", ";", ""], backgroundColor, color, !isSelected && !isDisabled && `
281
- :hover {
282
- background-color: ${reactTheming.getColorV8('primaryHue', 600, theme, 0.08)};
283
- color: ${reactTheming.getColorV8('primaryHue', 800, theme)};
284
- }
285
-
286
- :active {
287
- background-color: ${reactTheming.getColorV8('primaryHue', 600, theme, 0.2)};
288
- color: ${reactTheming.getColorV8('primaryHue', 800, theme)};
289
- }
290
- `);
353
+ return styled.css(["background-color:", ";color:", ";&:not([aria-disabled]):not([aria-selected]):hover{background-color:", ";color:", ";}&:not([aria-disabled]):not([aria-selected]):active{background-color:", ";color:", ";}"], backgroundColor, foreground, backgroundHover, foregroundHover, backgroundActive, foregroundActive);
291
354
  };
292
355
  const COMPONENT_ID = 'datepickers.day';
293
- const StyledDay = styled__default.default.div.attrs(props => ({
356
+ const StyledDay = styled__default.default.div.attrs({
294
357
  'data-garden-id': COMPONENT_ID,
295
- 'aria-disabled': props.isDisabled ? 'true' : 'false'
296
- })).withConfig({
358
+ 'data-garden-version': '9.0.0'
359
+ }).withConfig({
297
360
  displayName: "StyledDay",
298
361
  componentId: "sc-v42uk5-0"
299
- })(["display:flex;position:absolute;align-items:center;justify-content:center;border-radius:50%;cursor:", ";width:100%;height:100%;font-size:", ";font-weight:", ";", " ", ";"], props => props.isDisabled ? 'inherit' : 'pointer', props => props.isCompact ? props.theme.fontSizes.sm : props.theme.fontSizes.md, props => props.isToday && !props.isDisabled ? props.theme.fontWeights.semibold : 'inherit', retrieveStyledDayColors, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
300
- StyledDay.defaultProps = {
301
- theme: reactTheming.DEFAULT_THEME
302
- };
362
+ })(["display:flex;position:absolute;align-items:center;justify-content:center;cursor:", ";font-size:", ";font-weight:", ";", " ", " ", ";"], props => props['aria-disabled'] ? 'inherit' : 'pointer', props => props.$isCompact ? props.theme.fontSizes.sm : props.theme.fontSizes.md, props => props.$isToday && !props['aria-disabled'] ? props.theme.fontWeights.semibold : 'inherit', sizeStyles, colorStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
303
363
 
304
364
  const DatePickerContext = React.createContext(undefined);
305
365
  const useDatePickerContext$1 = () => {
@@ -388,7 +448,7 @@ function getStartOfWeek(locale) {
388
448
  }
389
449
 
390
450
  var _path$1;
391
- function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
451
+ function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
392
452
  var SvgChevronLeftStroke = function SvgChevronLeftStroke(props) {
393
453
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
394
454
  xmlns: "http://www.w3.org/2000/svg",
@@ -404,7 +464,7 @@ var SvgChevronLeftStroke = function SvgChevronLeftStroke(props) {
404
464
  };
405
465
 
406
466
  var _path;
407
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
467
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
408
468
  var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
409
469
  return /*#__PURE__*/React__namespace.createElement("svg", _extends({
410
470
  xmlns: "http://www.w3.org/2000/svg",
@@ -436,18 +496,18 @@ const MonthSelector = _ref => {
436
496
  return formatter.format(date);
437
497
  }, [locale]);
438
498
  return React__namespace.default.createElement(StyledHeader, {
439
- isCompact: isCompact
499
+ $isCompact: isCompact
440
500
  }, React__namespace.default.createElement(StyledHeaderPaddle, {
441
- isCompact: isCompact,
501
+ $isCompact: isCompact,
442
502
  onClick: () => {
443
503
  dispatch({
444
504
  type: 'PREVIEW_PREVIOUS_MONTH'
445
505
  });
446
506
  }
447
507
  }, React__namespace.default.createElement(SvgChevronLeftStroke, null)), React__namespace.default.createElement(StyledHeaderLabel, {
448
- isCompact: isCompact
508
+ $isCompact: isCompact
449
509
  }, headerLabelFormatter(state.previewDate)), React__namespace.default.createElement(StyledHeaderPaddle, {
450
- isCompact: isCompact,
510
+ $isCompact: isCompact,
451
511
  onClick: () => {
452
512
  dispatch({
453
513
  type: 'PREVIEW_NEXT_MONTH'
@@ -491,15 +551,15 @@ const Calendar$1 = React.forwardRef((_ref, ref) => {
491
551
  const formattedDayLabel = dayLabelFormatter(date);
492
552
  return React__namespace.default.createElement(StyledCalendarItem, {
493
553
  key: `day-label-${formattedDayLabel}`,
494
- isCompact: isCompact
554
+ $isCompact: isCompact
495
555
  }, React__namespace.default.createElement(StyledDayLabel, {
496
- isCompact: isCompact
556
+ $isCompact: isCompact
497
557
  }, formattedDayLabel));
498
558
  });
499
559
  const items = eachDayOfInterval.eachDayOfInterval({
500
560
  start: startDate,
501
561
  end: endDate
502
- }).map((date, itemsIndex) => {
562
+ }).map(date => {
503
563
  const formattedDayLabel = getDate.getDate(date);
504
564
  const isCurrentDate = isToday.isToday(date);
505
565
  const isPreviousMonth = !isSameMonth.isSameMonth(date, state.previewDate);
@@ -512,14 +572,14 @@ const Calendar$1 = React.forwardRef((_ref, ref) => {
512
572
  isDisabled = isDisabled || isAfter.isAfter(date, maxValue) && !isSameDay.isSameDay(date, maxValue);
513
573
  }
514
574
  return React__namespace.default.createElement(StyledCalendarItem, {
515
- key: `day-${itemsIndex}`,
516
- isCompact: isCompact
575
+ key: date.toISOString(),
576
+ $isCompact: isCompact
517
577
  }, React__namespace.default.createElement(StyledDay, {
518
- isToday: isCurrentDate,
519
- isPreviousMonth: isPreviousMonth,
520
- isSelected: isSelected,
521
- isDisabled: isDisabled,
522
- isCompact: isCompact,
578
+ $isToday: isCurrentDate,
579
+ $isPreviousMonth: isPreviousMonth,
580
+ $isCompact: isCompact,
581
+ "aria-selected": isSelected || undefined,
582
+ "aria-disabled": isDisabled || undefined,
523
583
  onClick: () => {
524
584
  if (!isDisabled) {
525
585
  dispatch({
@@ -532,7 +592,7 @@ const Calendar$1 = React.forwardRef((_ref, ref) => {
532
592
  });
533
593
  return React__namespace.default.createElement(StyledDatePicker, {
534
594
  ref: ref,
535
- isCompact: isCompact,
595
+ $isCompact: isCompact,
536
596
  onMouseDown: e => {
537
597
  e.preventDefault();
538
598
  }
@@ -540,7 +600,7 @@ const Calendar$1 = React.forwardRef((_ref, ref) => {
540
600
  locale: locale,
541
601
  isCompact: isCompact
542
602
  }), React__namespace.default.createElement(StyledCalendar, {
543
- isCompact: isCompact
603
+ $isCompact: isCompact
544
604
  }, dayLabels, items));
545
605
  });
546
606
  Calendar$1.displayName = 'Calendar';
@@ -883,11 +943,11 @@ const DatePicker = React.forwardRef((props, calendarRef) => {
883
943
  style: {
884
944
  transform
885
945
  },
886
- isHidden: !state.isOpen,
887
- isAnimated: isAnimated && (state.isOpen || isVisible),
888
- placement: placement,
889
- zIndex: zIndex
890
- }, (state.isOpen || isVisible) && React__namespace.default.createElement(StyledMenu, menuProps, React__namespace.default.createElement(Calendar$1, {
946
+ $isAnimated: !!isAnimated && (state.isOpen || isVisible),
947
+ $placement: placement,
948
+ $zIndex: zIndex,
949
+ "aria-hidden": !state.isOpen || undefined
950
+ }, !!(state.isOpen || isVisible) && React__namespace.default.createElement(StyledMenu, menuProps, React__namespace.default.createElement(Calendar$1, {
891
951
  ref: calendarRef,
892
952
  isCompact: isCompact,
893
953
  value: value,
@@ -1410,26 +1470,26 @@ const Month = React.forwardRef((_ref, ref) => {
1410
1470
  const formattedDayLabel = dayLabelFormatter(date);
1411
1471
  return React__namespace.default.createElement(StyledCalendarItem, {
1412
1472
  key: `day-label-${formattedDayLabel}`,
1413
- isCompact: isCompact
1473
+ $isCompact: isCompact
1414
1474
  }, React__namespace.default.createElement(StyledDayLabel, {
1415
- isCompact: isCompact
1475
+ $isCompact: isCompact
1416
1476
  }, formattedDayLabel));
1417
1477
  });
1418
1478
  const items = eachDayOfInterval.eachDayOfInterval({
1419
1479
  start: startDate,
1420
1480
  end: endDate
1421
- }).map((date, itemsIndex) => {
1481
+ }).map(date => {
1422
1482
  const formattedDayLabel = dayFormatter(date);
1423
1483
  const isCurrentDate = isToday.isToday(date);
1424
1484
  const isPreviousMonth = !isSameMonth.isSameMonth(date, displayDate);
1425
1485
  if (isPreviousMonth) {
1426
1486
  return React__namespace.default.createElement(StyledCalendarItem, {
1427
- key: `day-${itemsIndex}`,
1428
- isCompact: isCompact
1487
+ key: date.toISOString(),
1488
+ $isCompact: isCompact
1429
1489
  }, React__namespace.default.createElement(StyledDay, {
1430
- isCompact: isCompact,
1431
- isPreviousMonth: true,
1432
- isDisabled: true
1490
+ $isCompact: isCompact,
1491
+ $isPreviousMonth: true,
1492
+ "aria-disabled": true
1433
1493
  }, "\xA0"));
1434
1494
  }
1435
1495
  let isSelected = false;
@@ -1472,18 +1532,18 @@ const Month = React.forwardRef((_ref, ref) => {
1472
1532
  }
1473
1533
  }
1474
1534
  return React__namespace.default.createElement(StyledCalendarItem, {
1475
- key: `day-${itemsIndex}`,
1476
- isCompact: isCompact
1535
+ key: date.toISOString(),
1536
+ $isCompact: isCompact
1477
1537
  }, React__namespace.default.createElement(StyledHighlight, {
1478
- isHighlighted: !isInvalidDateRange && isHighlighted && !isDisabled,
1479
- isStart: !isInvalidDateRange && isHighlightStart,
1480
- isEnd: !isInvalidDateRange && isHighlightEnd
1538
+ $isHighlighted: !isInvalidDateRange && !!isHighlighted && !isDisabled,
1539
+ $isStart: !isInvalidDateRange && isHighlightStart,
1540
+ $isEnd: !isInvalidDateRange && isHighlightEnd
1481
1541
  }), React__namespace.default.createElement(StyledDay, {
1482
- isToday: isCurrentDate,
1483
- isPreviousMonth: isPreviousMonth,
1484
- isSelected: !isInvalidDateRange && isSelected,
1485
- isDisabled: isDisabled,
1486
- isCompact: isCompact,
1542
+ $isToday: isCurrentDate,
1543
+ $isPreviousMonth: isPreviousMonth,
1544
+ "aria-selected": !isInvalidDateRange && isSelected || undefined,
1545
+ "aria-disabled": isDisabled || undefined,
1546
+ $isCompact: isCompact,
1487
1547
  onClick: () => {
1488
1548
  if (!isDisabled) {
1489
1549
  dispatch({
@@ -1553,32 +1613,32 @@ const Month = React.forwardRef((_ref, ref) => {
1553
1613
  });
1554
1614
  return React__namespace.default.createElement(StyledDatePicker, {
1555
1615
  ref: ref,
1556
- isCompact: isCompact,
1616
+ $isCompact: isCompact,
1557
1617
  onMouseDown: e => {
1558
1618
  e.preventDefault();
1559
1619
  }
1560
1620
  }, React__namespace.default.createElement(StyledHeader, {
1561
- isCompact: isCompact
1621
+ $isCompact: isCompact
1562
1622
  }, React__namespace.default.createElement(StyledHeaderPaddle, {
1563
- isCompact: isCompact,
1623
+ $isCompact: isCompact,
1564
1624
  onClick: () => {
1565
1625
  dispatch({
1566
1626
  type: 'PREVIEW_PREVIOUS_MONTH'
1567
1627
  });
1568
1628
  },
1569
- isHidden: isPreviousHidden
1629
+ "aria-hidden": isPreviousHidden || undefined
1570
1630
  }, React__namespace.default.createElement(SvgChevronLeftStroke, null)), React__namespace.default.createElement(StyledHeaderLabel, {
1571
- isCompact: isCompact
1631
+ $isCompact: isCompact
1572
1632
  }, headerLabelFormatter(displayDate)), React__namespace.default.createElement(StyledHeaderPaddle, {
1573
- isCompact: isCompact,
1574
- isHidden: isNextHidden,
1633
+ $isCompact: isCompact,
1634
+ "aria-hidden": isNextHidden || undefined,
1575
1635
  onClick: () => {
1576
1636
  dispatch({
1577
1637
  type: 'PREVIEW_NEXT_MONTH'
1578
1638
  });
1579
1639
  }
1580
1640
  }, React__namespace.default.createElement(SvgChevronRightStroke, null))), React__namespace.default.createElement(StyledCalendar, {
1581
- isCompact: isCompact,
1641
+ $isCompact: isCompact,
1582
1642
  onMouseLeave: () => {
1583
1643
  dispatch({
1584
1644
  type: 'HOVER_DATE',
@@ -1596,7 +1656,7 @@ const Calendar = React.forwardRef((props, ref) => {
1596
1656
  return React__namespace.default.createElement(StyledRangeCalendar, Object.assign({
1597
1657
  ref: ref,
1598
1658
  "data-garden-id": "datepickers.range",
1599
- "data-garden-version": '9.0.0-next.9'
1659
+ "data-garden-version": '9.0.0'
1600
1660
  }, props), React__namespace.default.createElement(Month, {
1601
1661
  displayDate: state.previewDate,
1602
1662
  isNextHidden: true