@xds/react 0.1.0 → 0.2.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 (140) hide show
  1. package/dist/Accordion.js +191 -33
  2. package/dist/Avatar.js +65 -6
  3. package/dist/AvatarStack.js +101 -6
  4. package/dist/Badge.js +61 -4
  5. package/dist/Banner.js +161 -5
  6. package/dist/Button.js +152 -24
  7. package/dist/Card.js +171 -12
  8. package/dist/Checkbox.js +138 -3
  9. package/dist/Chip.js +71 -4
  10. package/dist/ChipBar.js +36 -3
  11. package/dist/CountBadge.js +62 -9
  12. package/dist/DatePicker.js +421 -25
  13. package/dist/DateRangePicker.js +362 -40
  14. package/dist/Defaults.js +42 -7
  15. package/dist/Dialog.js +128 -24
  16. package/dist/Divider.js +29 -3
  17. package/dist/EmptyState.js +83 -3
  18. package/dist/Icon.js +74 -4
  19. package/dist/IconButton.js +113 -18
  20. package/dist/ListRow.js +180 -10
  21. package/dist/MediaCard.js +273 -11
  22. package/dist/Menu.js +234 -58
  23. package/dist/ProgressBar.js +63 -4
  24. package/dist/RadioGroup.js +173 -12
  25. package/dist/SearchField.js +148 -16
  26. package/dist/SectionHeader.js +121 -5
  27. package/dist/SegmentedControl.js +104 -5
  28. package/dist/Select.js +307 -55
  29. package/dist/Sidebar.js +212 -19
  30. package/dist/Skeleton.js +61 -5
  31. package/dist/Slider.js +142 -35
  32. package/dist/Spinner.js +93 -4
  33. package/dist/Switch.js +114 -3
  34. package/dist/Tabs.js +130 -14
  35. package/dist/Text.js +42 -4
  36. package/dist/TextField.js +209 -26
  37. package/dist/Thumbnail.js +146 -7
  38. package/dist/Toast.js +118 -30
  39. package/dist/Tooltip.js +154 -20
  40. package/dist/base.d.ts +11 -0
  41. package/dist/base.js +10 -0
  42. package/dist/modal-popover.js +32 -10
  43. package/dist/picture.d.ts +6 -4
  44. package/dist/picture.js +72 -17
  45. package/dist/portal.js +24 -4
  46. package/dist/presence.js +30 -9
  47. package/dist/preview.d.ts +14 -3
  48. package/dist/preview.js +118 -74
  49. package/dist/root.js +1 -0
  50. package/dist/trigger.d.ts +7 -0
  51. package/dist/trigger.js +41 -8
  52. package/eject/files/Accordion.tsx +157 -0
  53. package/eject/files/Avatar.tsx +41 -0
  54. package/eject/files/AvatarStack.tsx +47 -0
  55. package/eject/files/Badge.tsx +33 -0
  56. package/eject/files/Banner.tsx +70 -0
  57. package/eject/files/Button.tsx +88 -0
  58. package/eject/files/Card.tsx +85 -0
  59. package/eject/files/Checkbox.tsx +59 -0
  60. package/eject/files/Chip.tsx +43 -0
  61. package/eject/files/ChipBar.tsx +31 -0
  62. package/eject/files/CountBadge.tsx +50 -0
  63. package/eject/files/DatePicker.tsx +192 -0
  64. package/eject/files/DateRangePicker.tsx +271 -0
  65. package/eject/files/Dialog.tsx +108 -0
  66. package/eject/files/Divider.tsx +13 -0
  67. package/eject/files/EmptyState.tsx +39 -0
  68. package/eject/files/Icon.tsx +38 -0
  69. package/eject/files/IconButton.tsx +62 -0
  70. package/eject/files/ListRow.tsx +86 -0
  71. package/eject/files/MediaCard.tsx +111 -0
  72. package/eject/files/Menu.tsx +168 -0
  73. package/eject/files/ProgressBar.tsx +34 -0
  74. package/eject/files/RadioGroup.tsx +112 -0
  75. package/eject/files/SearchField.tsx +88 -0
  76. package/eject/files/SectionHeader.tsx +56 -0
  77. package/eject/files/SegmentedControl.tsx +57 -0
  78. package/eject/files/Select.tsx +228 -0
  79. package/eject/files/Sidebar.tsx +149 -0
  80. package/eject/files/Skeleton.tsx +28 -0
  81. package/eject/files/Slider.tsx +109 -0
  82. package/eject/files/Spinner.tsx +36 -0
  83. package/eject/files/Switch.tsx +53 -0
  84. package/eject/files/Tabs.tsx +71 -0
  85. package/eject/files/Text.tsx +31 -0
  86. package/eject/files/TextField.tsx +122 -0
  87. package/eject/files/Thumbnail.tsx +66 -0
  88. package/eject/files/Toast.tsx +88 -0
  89. package/eject/files/Tooltip.tsx +120 -0
  90. package/eject/files/accordion.css +89 -0
  91. package/eject/files/accordion.ts +67 -0
  92. package/eject/files/avatar-stack.ts +57 -0
  93. package/eject/files/avatar.ts +42 -0
  94. package/eject/files/badge.ts +30 -0
  95. package/eject/files/banner.ts +68 -0
  96. package/eject/files/base.css +38 -0
  97. package/eject/files/button.css +241 -0
  98. package/eject/files/button.ts +106 -0
  99. package/eject/files/card.ts +58 -0
  100. package/eject/files/checkbox.ts +32 -0
  101. package/eject/files/chip-bar.ts +16 -0
  102. package/eject/files/chip.ts +35 -0
  103. package/eject/files/count-badge.ts +32 -0
  104. package/eject/files/date-picker.css +352 -0
  105. package/eject/files/date-picker.ts +250 -0
  106. package/eject/files/date-range-picker.ts +323 -0
  107. package/eject/files/dialog.css +139 -0
  108. package/eject/files/dialog.ts +15 -0
  109. package/eject/files/divider.ts +5 -0
  110. package/eject/files/empty-state.ts +22 -0
  111. package/eject/files/icon.ts +36 -0
  112. package/eject/files/list-row.ts +66 -0
  113. package/eject/files/media-card.ts +66 -0
  114. package/eject/files/menu.css +176 -0
  115. package/eject/files/menu.ts +84 -0
  116. package/eject/files/parts.ts +17 -0
  117. package/eject/files/progress-bar.ts +23 -0
  118. package/eject/files/radio-group.css +160 -0
  119. package/eject/files/radio-group.ts +24 -0
  120. package/eject/files/section-header.ts +32 -0
  121. package/eject/files/segmented-control.ts +30 -0
  122. package/eject/files/select.css +285 -0
  123. package/eject/files/select.ts +36 -0
  124. package/eject/files/sidebar.ts +75 -0
  125. package/eject/files/skeleton.ts +51 -0
  126. package/eject/files/slider.css +136 -0
  127. package/eject/files/slider.ts +65 -0
  128. package/eject/files/spinner.ts +22 -0
  129. package/eject/files/switch.ts +34 -0
  130. package/eject/files/tabs.css +112 -0
  131. package/eject/files/tabs.ts +35 -0
  132. package/eject/files/text-field.css +229 -0
  133. package/eject/files/text-field.ts +48 -0
  134. package/eject/files/text.ts +38 -0
  135. package/eject/files/thumbnail.ts +51 -0
  136. package/eject/files/toast.ts +31 -0
  137. package/eject/files/tooltip.css +104 -0
  138. package/eject/files/tooltip.ts +21 -0
  139. package/eject/manifest.json +814 -0
  140. package/package.json +9 -4
@@ -1,11 +1,64 @@
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { countBadgeAnchorClass, countBadgeClass, classes, countBadgeText, rootPart } from "@xds/core";
1
3
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { countBadgeAnchorClass, countBadgeClass, classes, countBadgeText, rootPart, } from "@xds/core";
3
- export function CountBadge({ count, max, label, className, style, children }) {
4
- const anchored = children !== undefined;
5
- const badge = count > 0 && (_jsx("span", { ...(label ? { role: "img", "aria-label": label } : {}), className: anchored
6
- ? countBadgeClass(true)
7
- : classes(rootPart("CountBadge"), countBadgeClass(false), className), style: anchored ? undefined : style, children: countBadgeText(count, max) }));
8
- if (!anchored)
9
- return badge || null;
10
- return (_jsxs("span", { className: classes(rootPart("CountBadge"), countBadgeAnchorClass, className), style: style, children: [children, badge] }));
4
+ export function CountBadge(t0) {
5
+ const $ = _c(14);
6
+ const {
7
+ count,
8
+ max,
9
+ label,
10
+ className,
11
+ style,
12
+ children
13
+ } = t0;
14
+ const anchored = children !== undefined;
15
+ let t1;
16
+ if ($[0] !== anchored || $[1] !== className || $[2] !== count || $[3] !== label || $[4] !== max || $[5] !== style) {
17
+ t1 = count > 0 && /*#__PURE__*/_jsx("span", {
18
+ ...(label ? {
19
+ role: "img",
20
+ "aria-label": label
21
+ } : {}),
22
+ className: anchored ? countBadgeClass(true) : classes(rootPart("CountBadge"), countBadgeClass(false), className),
23
+ style: anchored ? undefined : style,
24
+ children: countBadgeText(count, max)
25
+ });
26
+ $[0] = anchored;
27
+ $[1] = className;
28
+ $[2] = count;
29
+ $[3] = label;
30
+ $[4] = max;
31
+ $[5] = style;
32
+ $[6] = t1;
33
+ } else {
34
+ t1 = $[6];
35
+ }
36
+ const badge = t1;
37
+ if (!anchored) {
38
+ return badge || null;
39
+ }
40
+ let t2;
41
+ if ($[7] !== className) {
42
+ t2 = classes(rootPart("CountBadge"), countBadgeAnchorClass, className);
43
+ $[7] = className;
44
+ $[8] = t2;
45
+ } else {
46
+ t2 = $[8];
47
+ }
48
+ let t3;
49
+ if ($[9] !== badge || $[10] !== children || $[11] !== style || $[12] !== t2) {
50
+ t3 = /*#__PURE__*/_jsxs("span", {
51
+ className: t2,
52
+ style: style,
53
+ children: [children, badge]
54
+ });
55
+ $[9] = badge;
56
+ $[10] = children;
57
+ $[11] = style;
58
+ $[12] = t2;
59
+ $[13] = t3;
60
+ } else {
61
+ t3 = $[13];
62
+ }
63
+ return t3;
11
64
  }
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { classes, DATE_PICKER_NAV_CLASS, datePickerContentAttrs, datePickerIds, datePickerLocale, datePickerMachineProps, datePickerTriggerAttrs, focusOpeningDay, formatDay, keepCalendarFocus, keepDayFocused, } from "@xds/core";
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";
3
3
  import * as datePicker from "@zag-js/date-picker";
4
4
  import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
5
5
  import { useEffect, useId, useRef } from "react";
@@ -7,27 +7,423 @@ import { Icon } from "./Icon.js";
7
7
  import { useModalPopover } from "./modal-popover.js";
8
8
  import { Portal } from "./portal.js";
9
9
  import { usePresence } from "./presence.js";
10
- export function DatePicker({ onChange, className, style, ...props }) {
11
- const { label, value, placeholder, description, error, name } = props;
12
- const id = useId();
13
- const ids = datePickerIds(id);
14
- const locale = datePickerLocale();
15
- const service = useMachine(datePicker.machine, datePickerMachineProps(props, { id, locale, onChange }));
16
- const api = datePicker.connect(service, normalizeProps);
17
- const trigger = api.getTriggerProps();
18
- const positioner = useRef(null);
19
- const surface = useRef(null);
20
- useModalPopover(api.open, () => positioner.current);
21
- const present = usePresence(api.open, () => [surface.current]);
22
- const focused = api.focusedValue.toString();
23
- const month = api.visibleRange.start.toString();
24
- useEffect(() => keepDayFocused(api.open, surface.current), [api.open, focused, month]);
25
- const invalid = error !== undefined;
26
- return (_jsxs("div", { ...mergeProps(api.getRootProps(), {
27
- className: classes("xds-date-picker", className),
28
- style,
29
- }), children: [_jsx("span", { id: ids.label, className: "xds-date-picker__label", children: label }), _jsx("div", { ...api.getControlProps(), className: "xds-date-picker__control", children: _jsxs("button", { ...trigger, ...datePickerTriggerAttrs(props, ids), type: "button", onClick: (event) => {
30
- focusOpeningDay(api, props);
31
- trigger.onClick?.(event);
32
- }, className: "xds-date-picker__trigger", children: [_jsx("span", { id: ids.value, className: "xds-date-picker__value", children: value === undefined ? placeholder : formatDay(value, locale) }), _jsx(Icon, { name: "calendar", size: "sm", className: "text-xds-field-placeholder" })] }) }), (invalid || description) && (_jsx("div", { className: "xds-date-picker__footer", children: invalid ? (_jsx("span", { id: ids.error, className: "xds-date-picker__error", children: error })) : (_jsx("span", { id: ids.description, className: "xds-date-picker__description", children: description })) })), name !== undefined && _jsx("input", { type: "hidden", name: name, value: value ?? "" }), _jsxs(Portal, { children: [api.open && (_jsx("div", { className: "xds-date-picker__underlay", onMouseDown: (event) => event.preventDefault() })), _jsx("div", { ...api.getPositionerProps(), ref: positioner, className: "xds-date-picker__positioner", children: _jsxs("div", { ...api.getContentProps(), ...datePickerContentAttrs(ids), ref: surface, hidden: !present, onKeyDown: (event) => keepCalendarFocus(event, surface.current), className: "xds-date-picker__content", children: [_jsxs("div", { className: "xds-date-picker__header", children: [_jsx("button", { ...api.getPreviousTriggerProps(), type: "button", className: DATE_PICKER_NAV_CLASS, children: _jsx(Icon, { name: "chevron-left", size: "sm" }) }), _jsx("span", { ...api.getRangeTextProps(), className: "xds-date-picker__heading", children: api.visibleRangeText.start }), _jsx("button", { ...api.getNextTriggerProps(), type: "button", className: DATE_PICKER_NAV_CLASS, children: _jsx(Icon, { name: "chevron-right", size: "sm" }) })] }), _jsxs("table", { ...api.getTableProps({ view: "day" }), className: "xds-date-picker__grid", children: [_jsx("thead", { ...api.getTableHeadProps({ view: "day" }), children: _jsx("tr", { ...api.getTableRowProps({ view: "day" }), children: api.weekDays.map((weekDay) => (_jsx("th", { scope: "col", className: "xds-date-picker__weekday", children: weekDay.narrow }, weekDay.long))) }) }), _jsx("tbody", { ...api.getTableBodyProps({ view: "day" }), children: api.weeks.map((week) => (_jsx("tr", { ...api.getTableRowProps({ view: "day" }), children: week.map((date) => (_jsx("td", { ...api.getDayTableCellProps({ value: date }), className: "xds-date-picker__cell", children: _jsx("div", { ...api.getDayTableCellTriggerProps({ value: date }), className: "xds-date-picker__day", children: date.day }) }, date.toString()))) }, week[0]?.toString()))) })] })] }) })] })] }));
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ export function DatePicker(t0) {
12
+ const $ = _c(67);
13
+ const {
14
+ onChange,
15
+ className,
16
+ style,
17
+ ...props
18
+ } = t0;
19
+ const {
20
+ label,
21
+ value,
22
+ placeholder,
23
+ description,
24
+ error,
25
+ name
26
+ } = props;
27
+ const id = useId();
28
+ const ids = datePickerIds(id);
29
+ const locale = datePickerLocale();
30
+ const service = useMachine(datePicker.machine, datePickerMachineProps(props, {
31
+ id,
32
+ locale,
33
+ onChange
34
+ }));
35
+ const api = datePicker.connect(service, normalizeProps);
36
+ const trigger = api.getTriggerProps();
37
+ const positioner = useRef(null);
38
+ const surface = useRef(null);
39
+ let t1;
40
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
41
+ t1 = () => positioner.current;
42
+ $[0] = t1;
43
+ } else {
44
+ t1 = $[0];
45
+ }
46
+ useModalPopover(api.open, t1);
47
+ let t2;
48
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
49
+ t2 = () => [surface.current];
50
+ $[1] = t2;
51
+ } else {
52
+ t2 = $[1];
53
+ }
54
+ const present = usePresence(api.open, t2);
55
+ const focused = api.focusedValue.toString();
56
+ const month = api.visibleRange.start.toString();
57
+ useEffect(() => keepDayFocused(api.open, surface.current), [api.open, focused, month]);
58
+ const invalid = error !== undefined;
59
+ const t3 = mergeProps(api.getRootProps(), {
60
+ className: classes("xds-date-picker", className),
61
+ style
62
+ });
63
+ let t4;
64
+ if ($[2] !== api) {
65
+ t4 = api.getControlProps();
66
+ $[2] = api;
67
+ $[3] = t4;
68
+ } else {
69
+ t4 = $[3];
70
+ }
71
+ let t5;
72
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
73
+ t5 = /*#__PURE__*/_jsx(Icon, {
74
+ name: "calendar",
75
+ size: "sm",
76
+ className: "text-xds-field-placeholder"
77
+ });
78
+ $[4] = t5;
79
+ } else {
80
+ t5 = $[4];
81
+ }
82
+ const T0 = Portal;
83
+ const t6 = api.open && /*#__PURE__*/_jsx("div", {
84
+ className: "xds-date-picker__underlay",
85
+ onMouseDown: _temp
86
+ });
87
+ let t7;
88
+ if ($[5] !== api) {
89
+ t7 = api.getPositionerProps();
90
+ $[5] = api;
91
+ $[6] = t7;
92
+ } else {
93
+ t7 = $[6];
94
+ }
95
+ const t8 = "xds-date-picker__positioner";
96
+ let t9;
97
+ if ($[7] !== api) {
98
+ t9 = api.getContentProps();
99
+ $[7] = api;
100
+ $[8] = t9;
101
+ } else {
102
+ t9 = $[8];
103
+ }
104
+ const t10 = datePickerContentAttrs(ids);
105
+ const t11 = !present;
106
+ let t12;
107
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
108
+ t12 = event_1 => keepCalendarFocus(event_1, surface.current);
109
+ $[9] = t12;
110
+ } else {
111
+ t12 = $[9];
112
+ }
113
+ let t13;
114
+ if ($[10] !== api) {
115
+ t13 = api.getPreviousTriggerProps();
116
+ $[10] = api;
117
+ $[11] = t13;
118
+ } else {
119
+ t13 = $[11];
120
+ }
121
+ let t14;
122
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
123
+ t14 = /*#__PURE__*/_jsx(Icon, {
124
+ name: "chevron-left",
125
+ size: "sm"
126
+ });
127
+ $[12] = t14;
128
+ } else {
129
+ t14 = $[12];
130
+ }
131
+ 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;
140
+ $[14] = t15;
141
+ } else {
142
+ t15 = $[14];
143
+ }
144
+ 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,
156
+ className: "xds-date-picker__heading",
157
+ children: api.visibleRangeText.start
158
+ });
159
+ $[17] = api.visibleRangeText.start;
160
+ $[18] = t16;
161
+ $[19] = t17;
162
+ } else {
163
+ t17 = $[19];
164
+ }
165
+ let t18;
166
+ if ($[20] !== api) {
167
+ t18 = api.getNextTriggerProps();
168
+ $[20] = api;
169
+ $[21] = t18;
170
+ } else {
171
+ t18 = $[21];
172
+ }
173
+ let t19;
174
+ if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
175
+ t19 = /*#__PURE__*/_jsx(Icon, {
176
+ name: "chevron-right",
177
+ size: "sm"
178
+ });
179
+ $[22] = t19;
180
+ } else {
181
+ t19 = $[22];
182
+ }
183
+ 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
190
+ });
191
+ $[23] = t18;
192
+ $[24] = t20;
193
+ } else {
194
+ t20 = $[24];
195
+ }
196
+ 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]
201
+ });
202
+ $[25] = t15;
203
+ $[26] = t17;
204
+ $[27] = t20;
205
+ $[28] = t21;
206
+ } else {
207
+ t21 = $[28];
208
+ }
209
+ let t22;
210
+ if ($[29] !== api) {
211
+ t22 = api.getTableProps({
212
+ view: "day"
213
+ });
214
+ $[29] = api;
215
+ $[30] = t22;
216
+ } else {
217
+ t22 = $[30];
218
+ }
219
+ let t23;
220
+ if ($[31] !== api) {
221
+ t23 = api.getTableHeadProps({
222
+ view: "day"
223
+ });
224
+ $[31] = api;
225
+ $[32] = t23;
226
+ } else {
227
+ t23 = $[32];
228
+ }
229
+ let t24;
230
+ if ($[33] !== api) {
231
+ t24 = api.getTableRowProps({
232
+ view: "day"
233
+ });
234
+ $[33] = api;
235
+ $[34] = t24;
236
+ } else {
237
+ t24 = $[34];
238
+ }
239
+ let t25;
240
+ if ($[35] !== api.weekDays) {
241
+ t25 = api.weekDays.map(_temp2);
242
+ $[35] = api.weekDays;
243
+ $[36] = t25;
244
+ } else {
245
+ t25 = $[36];
246
+ }
247
+ let t26;
248
+ if ($[37] !== t24 || $[38] !== t25) {
249
+ t26 = /*#__PURE__*/_jsx("tr", {
250
+ ...t24,
251
+ children: t25
252
+ });
253
+ $[37] = t24;
254
+ $[38] = t25;
255
+ $[39] = t26;
256
+ } else {
257
+ t26 = $[39];
258
+ }
259
+ let t27;
260
+ if ($[40] !== t23 || $[41] !== t26) {
261
+ t27 = /*#__PURE__*/_jsx("thead", {
262
+ ...t23,
263
+ children: t26
264
+ });
265
+ $[40] = t23;
266
+ $[41] = t26;
267
+ $[42] = t27;
268
+ } else {
269
+ t27 = $[42];
270
+ }
271
+ let t28;
272
+ 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", {
284
+ ...api.getTableRowProps({
285
+ view: "day"
286
+ }),
287
+ children: week.map(date => /*#__PURE__*/_jsx("td", {
288
+ ...api.getDayTableCellProps({
289
+ value: date
290
+ }),
291
+ className: "xds-date-picker__cell",
292
+ children: /*#__PURE__*/_jsx("div", {
293
+ ...api.getDayTableCellTriggerProps({
294
+ value: date
295
+ }),
296
+ className: "xds-date-picker__day",
297
+ children: date.day
298
+ })
299
+ }, date.toString()))
300
+ }, week[0]?.toString()));
301
+ $[45] = api;
302
+ $[46] = t29;
303
+ } else {
304
+ t29 = $[46];
305
+ }
306
+ let t30;
307
+ if ($[47] !== t28 || $[48] !== t29) {
308
+ t30 = /*#__PURE__*/_jsx("tbody", {
309
+ ...t28,
310
+ children: t29
311
+ });
312
+ $[47] = t28;
313
+ $[48] = t29;
314
+ $[49] = t30;
315
+ } else {
316
+ t30 = $[49];
317
+ }
318
+ let t31;
319
+ if ($[50] !== t22 || $[51] !== t27 || $[52] !== t30) {
320
+ t31 = /*#__PURE__*/_jsxs("table", {
321
+ ...t22,
322
+ className: "xds-date-picker__grid",
323
+ children: [t27, t30]
324
+ });
325
+ $[50] = t22;
326
+ $[51] = t27;
327
+ $[52] = t30;
328
+ $[53] = t31;
329
+ } else {
330
+ t31 = $[53];
331
+ }
332
+ let t32;
333
+ if ($[54] !== t10 || $[55] !== t11 || $[56] !== t21 || $[57] !== t31 || $[58] !== t9) {
334
+ t32 = /*#__PURE__*/_jsxs("div", {
335
+ ...t9,
336
+ ...t10,
337
+ ref: surface,
338
+ hidden: t11,
339
+ onKeyDown: t12,
340
+ className: "xds-date-picker__content",
341
+ children: [t21, t31]
342
+ });
343
+ $[54] = t10;
344
+ $[55] = t11;
345
+ $[56] = t21;
346
+ $[57] = t31;
347
+ $[58] = t9;
348
+ $[59] = t32;
349
+ } else {
350
+ t32 = $[59];
351
+ }
352
+ let t33;
353
+ if ($[60] !== t32 || $[61] !== t7) {
354
+ t33 = /*#__PURE__*/_jsx("div", {
355
+ ...t7,
356
+ ref: positioner,
357
+ className: t8,
358
+ children: t32
359
+ });
360
+ $[60] = t32;
361
+ $[61] = t7;
362
+ $[62] = t33;
363
+ } else {
364
+ t33 = $[62];
365
+ }
366
+ let t34;
367
+ if ($[63] !== T0 || $[64] !== t33 || $[65] !== t6) {
368
+ t34 = /*#__PURE__*/_jsxs(T0, {
369
+ children: [t6, t33]
370
+ });
371
+ $[63] = T0;
372
+ $[64] = t33;
373
+ $[65] = t6;
374
+ $[66] = t34;
375
+ } else {
376
+ t34 = $[66];
377
+ }
378
+ return /*#__PURE__*/_jsxs("div", {
379
+ ...t3,
380
+ children: [/*#__PURE__*/_jsx("span", {
381
+ id: ids.label,
382
+ className: "xds-date-picker__label",
383
+ children: label
384
+ }), /*#__PURE__*/_jsx("div", {
385
+ ...t4,
386
+ className: "xds-date-picker__control",
387
+ children: /*#__PURE__*/_jsxs("button", {
388
+ ...trigger,
389
+ ...datePickerTriggerAttrs(props, ids),
390
+ type: "button",
391
+ onClick: event => {
392
+ focusOpeningDay(api, props);
393
+ trigger.onClick?.(event);
394
+ },
395
+ className: "xds-date-picker__trigger",
396
+ children: [/*#__PURE__*/_jsx("span", {
397
+ id: ids.value,
398
+ className: "xds-date-picker__value",
399
+ children: value === undefined ? placeholder : formatDay(value, locale)
400
+ }), t5]
401
+ })
402
+ }), (invalid || description) && /*#__PURE__*/_jsx("div", {
403
+ 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", {
409
+ id: ids.description,
410
+ className: "xds-date-picker__description",
411
+ children: description
412
+ })
413
+ }), name !== undefined && /*#__PURE__*/_jsx("input", {
414
+ type: "hidden",
415
+ name: name,
416
+ value: value ?? ""
417
+ }), t34]
418
+ });
419
+ }
420
+ function _temp2(weekDay) {
421
+ return /*#__PURE__*/_jsx("th", {
422
+ scope: "col",
423
+ className: "xds-date-picker__weekday",
424
+ children: weekDay.narrow
425
+ }, weekDay.long);
426
+ }
427
+ function _temp(event_0) {
428
+ return event_0.preventDefault();
33
429
  }