@xds/react 1.0.0-rc.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/Accordion.js +3 -2
  2. package/dist/Button.js +5 -3
  3. package/dist/Card.js +1 -1
  4. package/dist/DatePicker.js +167 -170
  5. package/dist/DateRangePicker.js +91 -94
  6. package/dist/Menu.js +83 -75
  7. package/dist/SearchField.js +4 -2
  8. package/dist/Select.js +123 -98
  9. package/dist/Slider.d.ts +1 -1
  10. package/dist/Slider.js +44 -35
  11. package/dist/TextField.js +130 -107
  12. package/dist/Toast.d.ts +1 -1
  13. package/dist/Toast.js +50 -45
  14. package/dist/Tooltip.js +54 -40
  15. package/dist/base.d.ts +1 -1
  16. package/dist/base.js +1 -1
  17. package/dist/picture.js +2 -2
  18. package/dist/portal.d.ts +6 -4
  19. package/dist/portal.js +61 -9
  20. package/eject/files/Accordion.tsx +5 -2
  21. package/eject/files/Avatar.tsx +1 -1
  22. package/eject/files/AvatarStack.tsx +1 -1
  23. package/eject/files/Badge.tsx +1 -1
  24. package/eject/files/Banner.tsx +1 -1
  25. package/eject/files/Button.tsx +9 -5
  26. package/eject/files/Card.tsx +2 -2
  27. package/eject/files/Checkbox.tsx +1 -1
  28. package/eject/files/Chip.tsx +1 -1
  29. package/eject/files/ChipBar.tsx +1 -1
  30. package/eject/files/CountBadge.tsx +1 -1
  31. package/eject/files/DatePicker.tsx +32 -23
  32. package/eject/files/DateRangePicker.tsx +34 -23
  33. package/eject/files/Dialog.tsx +1 -1
  34. package/eject/files/Divider.tsx +1 -1
  35. package/eject/files/EmptyState.tsx +1 -1
  36. package/eject/files/Icon.tsx +1 -1
  37. package/eject/files/IconButton.tsx +1 -1
  38. package/eject/files/ListRow.tsx +1 -1
  39. package/eject/files/MediaCard.tsx +1 -1
  40. package/eject/files/Menu.tsx +7 -7
  41. package/eject/files/ProgressBar.tsx +1 -1
  42. package/eject/files/RadioGroup.tsx +1 -1
  43. package/eject/files/SearchField.tsx +6 -2
  44. package/eject/files/SectionHeader.tsx +1 -1
  45. package/eject/files/SegmentedControl.tsx +1 -1
  46. package/eject/files/Select.tsx +20 -22
  47. package/eject/files/Sidebar.tsx +1 -1
  48. package/eject/files/Skeleton.tsx +1 -1
  49. package/eject/files/Slider.tsx +11 -5
  50. package/eject/files/Spinner.tsx +1 -1
  51. package/eject/files/Switch.tsx +1 -1
  52. package/eject/files/Tabs.tsx +1 -1
  53. package/eject/files/Text.tsx +1 -1
  54. package/eject/files/TextField.tsx +18 -4
  55. package/eject/files/Thumbnail.tsx +1 -1
  56. package/eject/files/Toast.tsx +11 -15
  57. package/eject/files/Tooltip.tsx +9 -3
  58. package/eject/files/accordion.css +1 -1
  59. package/eject/files/accordion.ts +1 -1
  60. package/eject/files/avatar-stack.ts +1 -1
  61. package/eject/files/avatar.ts +1 -1
  62. package/eject/files/badge.ts +1 -1
  63. package/eject/files/banner.ts +1 -1
  64. package/eject/files/base.css +1 -1
  65. package/eject/files/button.css +3 -3
  66. package/eject/files/button.ts +1 -1
  67. package/eject/files/card.ts +1 -1
  68. package/eject/files/checkbox.ts +1 -1
  69. package/eject/files/chip-bar.ts +1 -1
  70. package/eject/files/chip.ts +1 -1
  71. package/eject/files/count-badge.ts +1 -1
  72. package/eject/files/date-picker.css +5 -5
  73. package/eject/files/date-picker.ts +30 -11
  74. package/eject/files/date-range-picker.ts +16 -8
  75. package/eject/files/dialog.css +6 -6
  76. package/eject/files/dialog.ts +1 -1
  77. package/eject/files/divider.ts +1 -1
  78. package/eject/files/empty-state.ts +1 -1
  79. package/eject/files/icon.ts +1 -1
  80. package/eject/files/list-row.ts +1 -1
  81. package/eject/files/media-card.ts +1 -1
  82. package/eject/files/menu.css +4 -4
  83. package/eject/files/menu.ts +1 -1
  84. package/eject/files/overlay.css +40 -0
  85. package/eject/files/parts.ts +1 -1
  86. package/eject/files/progress-bar.ts +1 -1
  87. package/eject/files/radio-group.css +1 -1
  88. package/eject/files/radio-group.ts +1 -1
  89. package/eject/files/section-header.ts +1 -1
  90. package/eject/files/segmented-control.ts +1 -1
  91. package/eject/files/select.css +17 -6
  92. package/eject/files/select.ts +1 -1
  93. package/eject/files/sidebar.ts +1 -1
  94. package/eject/files/skeleton.ts +1 -1
  95. package/eject/files/slider.css +1 -1
  96. package/eject/files/slider.ts +17 -5
  97. package/eject/files/spinner.ts +1 -1
  98. package/eject/files/switch.ts +1 -1
  99. package/eject/files/tabs.css +1 -1
  100. package/eject/files/tabs.ts +1 -1
  101. package/eject/files/text-field.css +4 -8
  102. package/eject/files/text-field.ts +1 -1
  103. package/eject/files/text.ts +1 -1
  104. package/eject/files/thumbnail.ts +1 -1
  105. package/eject/files/toast.ts +1 -1
  106. package/eject/files/tooltip.css +3 -3
  107. package/eject/files/tooltip.ts +1 -1
  108. package/eject/manifest.json +4 -2
  109. package/package.json +3 -3
  110. package/styles.css +15 -11
  111. package/tailwind.css +21 -14
package/dist/Accordion.js CHANGED
@@ -2,7 +2,8 @@ import { c as _c } from "react/compiler-runtime";
2
2
  import { ACCORDION_PARTS, classes, focusTitleOnClick, setPanelOpen } from "@xds/core";
3
3
  import * as accordion from "@zag-js/accordion";
4
4
  import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
5
- import { useId, useLayoutEffect, useRef, useState } from "react";
5
+ import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
6
+ const useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
6
7
  import { Icon } from "./Icon.js";
7
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
9
  export function Accordion(t0) {
@@ -160,7 +161,7 @@ function Panel(t0) {
160
161
  t1 = $[1];
161
162
  t2 = $[2];
162
163
  }
163
- useLayoutEffect(t1, t2);
164
+ useIsomorphicLayoutEffect(t1, t2);
164
165
  const t3 = closedAtFirst || undefined;
165
166
  const t4 = open ? undefined : true;
166
167
  let t5;
package/dist/Button.js CHANGED
@@ -52,10 +52,12 @@ export function Button(props) {
52
52
  const t6 = loading ? "" : undefined;
53
53
  let t7;
54
54
  if ($[8] !== loading || $[9] !== onPress) {
55
- t7 = () => {
56
- if (!loading) {
57
- onPress?.();
55
+ t7 = event => {
56
+ if (loading) {
57
+ event.preventDefault();
58
+ return;
58
59
  }
60
+ onPress?.();
59
61
  };
60
62
  $[8] = loading;
61
63
  $[9] = onPress;
package/dist/Card.js CHANGED
@@ -56,7 +56,7 @@ export function Card(t0) {
56
56
  }
57
57
  let t5;
58
58
  if ($[11] !== Box || $[12] !== Header || $[13] !== Line || $[14] !== Title || $[15] !== actions || $[16] !== description || $[17] !== onPress || $[18] !== title) {
59
- t5 = (title || actions && !onPress) && /*#__PURE__*/_jsxs(Header, {
59
+ t5 = (title || description || actions && !onPress) && /*#__PURE__*/_jsxs(Header, {
60
60
  className: CARD_PARTS.header,
61
61
  children: [/*#__PURE__*/_jsxs(Box, {
62
62
  className: CARD_PARTS.heading,
@@ -1,5 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { classes, DATE_PICKER_NAV_CLASS, datePickerContentAttrs, datePickerIds, datePickerLocale, datePickerMachineProps, datePickerTriggerAttrs, focusOpeningDay, formatDay, keepCalendarFocus, keepDayFocused } from "@xds/core";
2
+ import { space } from "@xds/tokens";
3
+ import { classes, DATE_PICKER_NAV_CLASS, datePickerContentAttrs, datePickerIds, datePickerLocale, datePickerMachineProps, datePickerTriggerAttrs, focusOpeningDay, formatDay, keepCalendarFocus, keepDayFocused, readCssPx, underlayLayerStyle } from "@xds/core";
3
4
  import * as datePicker from "@zag-js/date-picker";
4
5
  import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
5
6
  import { useEffect, useId, useRef } from "react";
@@ -9,7 +10,7 @@ import { Portal } from "./portal.js";
9
10
  import { usePresence } from "./presence.js";
10
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
12
  export function DatePicker(t0) {
12
- const $ = _c(67);
13
+ const $ = _c(65);
13
14
  const {
14
15
  onChange,
15
16
  className,
@@ -26,11 +27,12 @@ export function DatePicker(t0) {
26
27
  } = props;
27
28
  const id = useId();
28
29
  const ids = datePickerIds(id);
29
- const locale = datePickerLocale();
30
+ const locale = datePickerLocale(props.locale);
30
31
  const service = useMachine(datePicker.machine, datePickerMachineProps(props, {
31
32
  id,
32
33
  locale,
33
- onChange
34
+ onChange,
35
+ gutter: readCssPx(null, "--xds-space-1", space[1])
34
36
  }));
35
37
  const api = datePicker.connect(service, normalizeProps);
36
38
  const trigger = api.getTriggerProps();
@@ -56,6 +58,7 @@ export function DatePicker(t0) {
56
58
  const month = api.visibleRange.start.toString();
57
59
  useEffect(() => keepDayFocused(api.open, surface.current), [api.open, focused, month]);
58
60
  const invalid = error !== undefined;
61
+ const positionerProps = api.getPositionerProps();
59
62
  const t3 = mergeProps(api.getRootProps(), {
60
63
  className: classes("xds-date-picker", className),
61
64
  style
@@ -82,133 +85,136 @@ export function DatePicker(t0) {
82
85
  const T0 = Portal;
83
86
  const t6 = api.open && /*#__PURE__*/_jsx("div", {
84
87
  className: "xds-date-picker__underlay",
88
+ style: underlayLayerStyle(positionerProps.style),
85
89
  onMouseDown: _temp
86
90
  });
87
- let t7;
91
+ const t7 = "xds-date-picker__positioner";
92
+ let t8;
88
93
  if ($[5] !== api) {
89
- t7 = api.getPositionerProps();
94
+ t8 = api.getContentProps();
90
95
  $[5] = api;
91
- $[6] = t7;
96
+ $[6] = t8;
92
97
  } else {
93
- t7 = $[6];
98
+ t8 = $[6];
94
99
  }
95
- const t8 = "xds-date-picker__positioner";
96
- let t9;
97
- if ($[7] !== api) {
98
- t9 = api.getContentProps();
99
- $[7] = api;
100
- $[8] = t9;
100
+ const t9 = datePickerContentAttrs(ids);
101
+ const t10 = !present;
102
+ let t11;
103
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
104
+ t11 = event_1 => keepCalendarFocus(event_1, surface.current);
105
+ $[7] = t11;
101
106
  } else {
102
- t9 = $[8];
107
+ t11 = $[7];
103
108
  }
104
- const t10 = datePickerContentAttrs(ids);
105
- const t11 = !present;
106
109
  let t12;
107
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
108
- t12 = event_1 => keepCalendarFocus(event_1, surface.current);
110
+ if ($[8] !== api) {
111
+ t12 = api.getPreviousTriggerProps();
112
+ $[8] = api;
109
113
  $[9] = t12;
110
114
  } else {
111
115
  t12 = $[9];
112
116
  }
113
117
  let t13;
114
- if ($[10] !== api) {
115
- t13 = api.getPreviousTriggerProps();
116
- $[10] = api;
117
- $[11] = t13;
118
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
119
+ t13 = /*#__PURE__*/_jsx(Icon, {
120
+ name: "chevron-left",
121
+ size: "sm"
122
+ });
123
+ $[10] = t13;
118
124
  } else {
119
- t13 = $[11];
125
+ t13 = $[10];
120
126
  }
121
127
  let t14;
122
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
123
- t14 = /*#__PURE__*/_jsx(Icon, {
124
- name: "chevron-left",
125
- size: "sm"
128
+ if ($[11] !== t12) {
129
+ t14 = /*#__PURE__*/_jsx("button", {
130
+ ...t12,
131
+ type: "button",
132
+ className: DATE_PICKER_NAV_CLASS,
133
+ children: t13
126
134
  });
135
+ $[11] = t12;
127
136
  $[12] = t14;
128
137
  } else {
129
138
  t14 = $[12];
130
139
  }
131
140
  let t15;
132
- if ($[13] !== t13) {
133
- t15 = /*#__PURE__*/_jsx("button", {
134
- ...t13,
135
- type: "button",
136
- className: DATE_PICKER_NAV_CLASS,
137
- children: t14
138
- });
139
- $[13] = t13;
141
+ if ($[13] !== api) {
142
+ t15 = api.getRangeTextProps();
143
+ $[13] = api;
140
144
  $[14] = t15;
141
145
  } else {
142
146
  t15 = $[14];
143
147
  }
144
148
  let t16;
145
- if ($[15] !== api) {
146
- t16 = api.getRangeTextProps();
147
- $[15] = api;
148
- $[16] = t16;
149
- } else {
150
- t16 = $[16];
151
- }
152
- let t17;
153
- if ($[17] !== api.visibleRangeText.start || $[18] !== t16) {
154
- t17 = /*#__PURE__*/_jsx("span", {
155
- ...t16,
149
+ if ($[15] !== api.visibleRangeText.start || $[16] !== t15) {
150
+ t16 = /*#__PURE__*/_jsx("span", {
151
+ ...t15,
156
152
  className: "xds-date-picker__heading",
157
153
  children: api.visibleRangeText.start
158
154
  });
159
- $[17] = api.visibleRangeText.start;
160
- $[18] = t16;
155
+ $[15] = api.visibleRangeText.start;
156
+ $[16] = t15;
157
+ $[17] = t16;
158
+ } else {
159
+ t16 = $[17];
160
+ }
161
+ let t17;
162
+ if ($[18] !== api) {
163
+ t17 = api.getNextTriggerProps();
164
+ $[18] = api;
161
165
  $[19] = t17;
162
166
  } else {
163
167
  t17 = $[19];
164
168
  }
165
169
  let t18;
166
- if ($[20] !== api) {
167
- t18 = api.getNextTriggerProps();
168
- $[20] = api;
169
- $[21] = t18;
170
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
171
+ t18 = /*#__PURE__*/_jsx(Icon, {
172
+ name: "chevron-right",
173
+ size: "sm"
174
+ });
175
+ $[20] = t18;
170
176
  } else {
171
- t18 = $[21];
177
+ t18 = $[20];
172
178
  }
173
179
  let t19;
174
- if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
175
- t19 = /*#__PURE__*/_jsx(Icon, {
176
- name: "chevron-right",
177
- size: "sm"
180
+ if ($[21] !== t17) {
181
+ t19 = /*#__PURE__*/_jsx("button", {
182
+ ...t17,
183
+ type: "button",
184
+ className: DATE_PICKER_NAV_CLASS,
185
+ children: t18
178
186
  });
187
+ $[21] = t17;
179
188
  $[22] = t19;
180
189
  } else {
181
190
  t19 = $[22];
182
191
  }
183
192
  let t20;
184
- if ($[23] !== t18) {
185
- t20 = /*#__PURE__*/_jsx("button", {
186
- ...t18,
187
- type: "button",
188
- className: DATE_PICKER_NAV_CLASS,
189
- children: t19
193
+ if ($[23] !== t14 || $[24] !== t16 || $[25] !== t19) {
194
+ t20 = /*#__PURE__*/_jsxs("div", {
195
+ className: "xds-date-picker__header",
196
+ children: [t14, t16, t19]
190
197
  });
191
- $[23] = t18;
192
- $[24] = t20;
198
+ $[23] = t14;
199
+ $[24] = t16;
200
+ $[25] = t19;
201
+ $[26] = t20;
193
202
  } else {
194
- t20 = $[24];
203
+ t20 = $[26];
195
204
  }
196
205
  let t21;
197
- if ($[25] !== t15 || $[26] !== t17 || $[27] !== t20) {
198
- t21 = /*#__PURE__*/_jsxs("div", {
199
- className: "xds-date-picker__header",
200
- children: [t15, t17, t20]
206
+ if ($[27] !== api) {
207
+ t21 = api.getTableProps({
208
+ view: "day"
201
209
  });
202
- $[25] = t15;
203
- $[26] = t17;
204
- $[27] = t20;
210
+ $[27] = api;
205
211
  $[28] = t21;
206
212
  } else {
207
213
  t21 = $[28];
208
214
  }
209
215
  let t22;
210
216
  if ($[29] !== api) {
211
- t22 = api.getTableProps({
217
+ t22 = api.getTableHeadProps({
212
218
  view: "day"
213
219
  });
214
220
  $[29] = api;
@@ -218,7 +224,7 @@ export function DatePicker(t0) {
218
224
  }
219
225
  let t23;
220
226
  if ($[31] !== api) {
221
- t23 = api.getTableHeadProps({
227
+ t23 = api.getTableRowProps({
222
228
  view: "day"
223
229
  });
224
230
  $[31] = api;
@@ -227,60 +233,50 @@ export function DatePicker(t0) {
227
233
  t23 = $[32];
228
234
  }
229
235
  let t24;
230
- if ($[33] !== api) {
231
- t24 = api.getTableRowProps({
232
- view: "day"
233
- });
234
- $[33] = api;
236
+ if ($[33] !== api.weekDays) {
237
+ t24 = api.weekDays.map(_temp2);
238
+ $[33] = api.weekDays;
235
239
  $[34] = t24;
236
240
  } else {
237
241
  t24 = $[34];
238
242
  }
239
243
  let t25;
240
- if ($[35] !== api.weekDays) {
241
- t25 = api.weekDays.map(_temp2);
242
- $[35] = api.weekDays;
243
- $[36] = t25;
244
+ if ($[35] !== t23 || $[36] !== t24) {
245
+ t25 = /*#__PURE__*/_jsx("tr", {
246
+ ...t23,
247
+ children: t24
248
+ });
249
+ $[35] = t23;
250
+ $[36] = t24;
251
+ $[37] = t25;
244
252
  } else {
245
- t25 = $[36];
253
+ t25 = $[37];
246
254
  }
247
255
  let t26;
248
- if ($[37] !== t24 || $[38] !== t25) {
249
- t26 = /*#__PURE__*/_jsx("tr", {
250
- ...t24,
256
+ if ($[38] !== t22 || $[39] !== t25) {
257
+ t26 = /*#__PURE__*/_jsx("thead", {
258
+ ...t22,
251
259
  children: t25
252
260
  });
253
- $[37] = t24;
254
- $[38] = t25;
255
- $[39] = t26;
261
+ $[38] = t22;
262
+ $[39] = t25;
263
+ $[40] = t26;
256
264
  } else {
257
- t26 = $[39];
265
+ t26 = $[40];
258
266
  }
259
267
  let t27;
260
- if ($[40] !== t23 || $[41] !== t26) {
261
- t27 = /*#__PURE__*/_jsx("thead", {
262
- ...t23,
263
- children: t26
268
+ if ($[41] !== api) {
269
+ t27 = api.getTableBodyProps({
270
+ view: "day"
264
271
  });
265
- $[40] = t23;
266
- $[41] = t26;
272
+ $[41] = api;
267
273
  $[42] = t27;
268
274
  } else {
269
275
  t27 = $[42];
270
276
  }
271
277
  let t28;
272
278
  if ($[43] !== api) {
273
- t28 = api.getTableBodyProps({
274
- view: "day"
275
- });
276
- $[43] = api;
277
- $[44] = t28;
278
- } else {
279
- t28 = $[44];
280
- }
281
- let t29;
282
- if ($[45] !== api) {
283
- t29 = api.weeks.map(week => /*#__PURE__*/_jsx("tr", {
279
+ t28 = api.weeks.map(week => /*#__PURE__*/_jsx("tr", {
284
280
  ...api.getTableRowProps({
285
281
  view: "day"
286
282
  }),
@@ -298,82 +294,82 @@ export function DatePicker(t0) {
298
294
  })
299
295
  }, date.toString()))
300
296
  }, week[0]?.toString()));
301
- $[45] = api;
302
- $[46] = t29;
297
+ $[43] = api;
298
+ $[44] = t28;
303
299
  } else {
304
- t29 = $[46];
300
+ t28 = $[44];
305
301
  }
306
- let t30;
307
- if ($[47] !== t28 || $[48] !== t29) {
308
- t30 = /*#__PURE__*/_jsx("tbody", {
309
- ...t28,
310
- children: t29
302
+ let t29;
303
+ if ($[45] !== t27 || $[46] !== t28) {
304
+ t29 = /*#__PURE__*/_jsx("tbody", {
305
+ ...t27,
306
+ children: t28
311
307
  });
312
- $[47] = t28;
313
- $[48] = t29;
314
- $[49] = t30;
308
+ $[45] = t27;
309
+ $[46] = t28;
310
+ $[47] = t29;
315
311
  } else {
316
- t30 = $[49];
312
+ t29 = $[47];
317
313
  }
318
- let t31;
319
- if ($[50] !== t22 || $[51] !== t27 || $[52] !== t30) {
320
- t31 = /*#__PURE__*/_jsxs("table", {
321
- ...t22,
314
+ let t30;
315
+ if ($[48] !== t21 || $[49] !== t26 || $[50] !== t29) {
316
+ t30 = /*#__PURE__*/_jsxs("table", {
317
+ ...t21,
322
318
  className: "xds-date-picker__grid",
323
- children: [t27, t30]
319
+ children: [t26, t29]
324
320
  });
325
- $[50] = t22;
326
- $[51] = t27;
327
- $[52] = t30;
328
- $[53] = t31;
321
+ $[48] = t21;
322
+ $[49] = t26;
323
+ $[50] = t29;
324
+ $[51] = t30;
329
325
  } else {
330
- t31 = $[53];
326
+ t30 = $[51];
331
327
  }
332
- let t32;
333
- if ($[54] !== t10 || $[55] !== t11 || $[56] !== t21 || $[57] !== t31 || $[58] !== t9) {
334
- t32 = /*#__PURE__*/_jsxs("div", {
328
+ let t31;
329
+ if ($[52] !== t10 || $[53] !== t20 || $[54] !== t30 || $[55] !== t8 || $[56] !== t9) {
330
+ t31 = /*#__PURE__*/_jsxs("div", {
331
+ ...t8,
335
332
  ...t9,
336
- ...t10,
337
333
  ref: surface,
338
- hidden: t11,
339
- onKeyDown: t12,
334
+ hidden: t10,
335
+ onKeyDown: t11,
340
336
  className: "xds-date-picker__content",
341
- children: [t21, t31]
337
+ children: [t20, t30]
342
338
  });
343
- $[54] = t10;
344
- $[55] = t11;
345
- $[56] = t21;
339
+ $[52] = t10;
340
+ $[53] = t20;
341
+ $[54] = t30;
342
+ $[55] = t8;
343
+ $[56] = t9;
346
344
  $[57] = t31;
347
- $[58] = t9;
348
- $[59] = t32;
349
345
  } else {
350
- t32 = $[59];
346
+ t31 = $[57];
351
347
  }
352
- let t33;
353
- if ($[60] !== t32 || $[61] !== t7) {
354
- t33 = /*#__PURE__*/_jsx("div", {
355
- ...t7,
348
+ let t32;
349
+ if ($[58] !== positionerProps || $[59] !== t31) {
350
+ t32 = /*#__PURE__*/_jsx("div", {
351
+ ...positionerProps,
356
352
  ref: positioner,
357
- className: t8,
358
- children: t32
353
+ className: t7,
354
+ children: t31
359
355
  });
356
+ $[58] = positionerProps;
357
+ $[59] = t31;
360
358
  $[60] = t32;
361
- $[61] = t7;
362
- $[62] = t33;
363
359
  } else {
364
- t33 = $[62];
360
+ t32 = $[60];
365
361
  }
366
- let t34;
367
- if ($[63] !== T0 || $[64] !== t33 || $[65] !== t6) {
368
- t34 = /*#__PURE__*/_jsxs(T0, {
369
- children: [t6, t33]
362
+ let t33;
363
+ if ($[61] !== T0 || $[62] !== t32 || $[63] !== t6) {
364
+ t33 = /*#__PURE__*/_jsxs(T0, {
365
+ children: [t6, t32]
370
366
  });
371
- $[63] = T0;
367
+ $[61] = T0;
368
+ $[62] = t32;
369
+ $[63] = t6;
372
370
  $[64] = t33;
373
- $[65] = t6;
374
- $[66] = t34;
375
371
  } else {
376
- t34 = $[66];
372
+ t33 = $[64];
377
373
  }
378
374
  return /*#__PURE__*/_jsxs("div", {
379
375
  ...t3,
@@ -399,22 +395,23 @@ export function DatePicker(t0) {
399
395
  children: value === undefined ? placeholder : formatDay(value, locale)
400
396
  }), t5]
401
397
  })
402
- }), (invalid || description) && /*#__PURE__*/_jsx("div", {
398
+ }), /*#__PURE__*/_jsxs("div", {
403
399
  className: "xds-date-picker__footer",
404
- children: invalid ? /*#__PURE__*/_jsx("span", {
405
- id: ids.error,
406
- className: "xds-date-picker__error",
407
- children: error
408
- }) : /*#__PURE__*/_jsx("span", {
400
+ children: [!invalid && description && /*#__PURE__*/_jsx("span", {
409
401
  id: ids.description,
410
402
  className: "xds-date-picker__description",
411
403
  children: description
412
- })
404
+ }), /*#__PURE__*/_jsx("span", {
405
+ id: ids.error,
406
+ className: "xds-date-picker__error",
407
+ "aria-live": "polite",
408
+ children: error
409
+ })]
413
410
  }), name !== undefined && /*#__PURE__*/_jsx("input", {
414
411
  type: "hidden",
415
412
  name: name,
416
413
  value: value ?? ""
417
- }), t34]
414
+ }), t33]
418
415
  });
419
416
  }
420
417
  function _temp2(weekDay) {