@xds/react 0.2.0 → 1.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 (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
@@ -1,5 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { classes, DATE_PICKER_NAV_CLASS, dateRangeMachineProps, datePickerContentAttrs, datePickerIds, datePickerLocale, datePickerTriggerAttrs, endRangeChoiceOnClose, focusOpeningDay, formatRange, keepCalendarFocus, keepDayFocused, keepRangePreview, rangeDayClick, rangeGridKeyDown, rangeMonths, rangeMonthViews, rangeSummary, shownRange } from "@xds/core";
2
+ import { space } from "@xds/tokens";
3
+ import { classes, DATE_PICKER_NAV_CLASS, dateRangeMachineProps, datePickerContentAttrs, datePickerIds, datePickerLocale, datePickerTriggerAttrs, endRangeChoiceOnClose, focusOpeningDay, formatRange, keepCalendarFocus, keepDayFocused, keepRangePreview, rangeDayClick, rangeGridKeyDown, rangeMonths, rangeMonthViews, rangeSummary, readCssPx, shownRange, 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, useState } 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 DateRangePicker(t0) {
12
- const $ = _c(39);
13
+ const $ = _c(37);
13
14
  const {
14
15
  onChange,
15
16
  className,
@@ -27,7 +28,7 @@ export function DateRangePicker(t0) {
27
28
  } = props;
28
29
  const id = useId();
29
30
  const ids = datePickerIds(id);
30
- const locale = datePickerLocale();
31
+ const locale = datePickerLocale(props.locale);
31
32
  const [draft, setDraft] = useState(null);
32
33
  const [months, setMonths] = useState(1);
33
34
  const shown = shownRange(value, draft);
@@ -36,7 +37,8 @@ export function DateRangePicker(t0) {
36
37
  locale,
37
38
  months,
38
39
  onDraft: setDraft,
39
- onChange
40
+ onChange,
41
+ gutter: readCssPx(null, "--xds-space-1", space[1])
40
42
  }));
41
43
  const api = datePicker.connect(service, normalizeProps);
42
44
  const trigger = api.getTriggerProps();
@@ -73,6 +75,7 @@ export function DateRangePicker(t0) {
73
75
  useEffect(() => keepRangePreview(service, shown, api.open), [focused]);
74
76
  const summary = rangeSummary(shown, props, locale);
75
77
  const invalid = error !== undefined;
78
+ const positionerProps = api.getPositionerProps();
76
79
  const t4 = mergeProps(api.getRootProps(), {
77
80
  className: classes("xds-date-picker xds-date-range-picker", className),
78
81
  style
@@ -99,70 +102,63 @@ export function DateRangePicker(t0) {
99
102
  const T0 = Portal;
100
103
  const t7 = api.open && /*#__PURE__*/_jsx("div", {
101
104
  className: "xds-date-picker__underlay",
105
+ style: underlayLayerStyle(positionerProps.style),
102
106
  onMouseDown: _temp
103
107
  });
104
- let t8;
108
+ const t8 = "xds-date-picker__positioner";
109
+ let t9;
105
110
  if ($[7] !== api) {
106
- t8 = api.getPositionerProps();
111
+ t9 = api.getContentProps();
107
112
  $[7] = api;
108
- $[8] = t8;
113
+ $[8] = t9;
109
114
  } else {
110
- t8 = $[8];
115
+ t9 = $[8];
111
116
  }
112
- const t9 = "xds-date-picker__positioner";
113
- let t10;
114
- if ($[9] !== api) {
115
- t10 = api.getContentProps();
116
- $[9] = api;
117
- $[10] = t10;
117
+ const t10 = datePickerContentAttrs(ids);
118
+ const t11 = !present;
119
+ let t12;
120
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
121
+ t12 = event_1 => keepCalendarFocus(event_1, surface.current);
122
+ $[9] = t12;
118
123
  } else {
119
- t10 = $[10];
124
+ t12 = $[9];
120
125
  }
121
- const t11 = datePickerContentAttrs(ids);
122
- const t12 = !present;
123
126
  let t13;
124
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
125
- t13 = event_1 => keepCalendarFocus(event_1, surface.current);
127
+ if ($[10] !== summary.start) {
128
+ t13 = /*#__PURE__*/_jsx("span", {
129
+ children: summary.start
130
+ });
131
+ $[10] = summary.start;
126
132
  $[11] = t13;
127
133
  } else {
128
134
  t13 = $[11];
129
135
  }
130
136
  let t14;
131
- if ($[12] !== summary.start) {
137
+ if ($[12] !== summary.end) {
132
138
  t14 = /*#__PURE__*/_jsx("span", {
133
- children: summary.start
139
+ children: summary.end
134
140
  });
135
- $[12] = summary.start;
141
+ $[12] = summary.end;
136
142
  $[13] = t14;
137
143
  } else {
138
144
  t14 = $[13];
139
145
  }
140
146
  let t15;
141
- if ($[14] !== summary.end) {
142
- t15 = /*#__PURE__*/_jsx("span", {
143
- children: summary.end
144
- });
145
- $[14] = summary.end;
146
- $[15] = t15;
147
- } else {
148
- t15 = $[15];
149
- }
150
- let t16;
151
- if ($[16] !== t14 || $[17] !== t15) {
152
- t16 = /*#__PURE__*/_jsxs("div", {
147
+ if ($[14] !== t13 || $[15] !== t14) {
148
+ t15 = /*#__PURE__*/_jsxs("div", {
153
149
  className: "xds-date-range-picker__summary",
154
150
  "aria-live": "polite",
155
- children: [t14, t15]
151
+ children: [t13, t14]
156
152
  });
157
- $[16] = t14;
158
- $[17] = t15;
159
- $[18] = t16;
153
+ $[14] = t13;
154
+ $[15] = t14;
155
+ $[16] = t15;
160
156
  } else {
161
- t16 = $[18];
157
+ t15 = $[16];
162
158
  }
163
- let t17;
164
- if ($[19] !== api || $[20] !== months || $[21] !== props || $[22] !== shown) {
165
- t17 = rangeMonthViews(api, months).map(view => {
159
+ let t16;
160
+ if ($[17] !== api || $[18] !== months || $[19] !== props || $[20] !== shown) {
161
+ t16 = rangeMonthViews(api, months).map(view => {
166
162
  const table = api.getTableProps({
167
163
  view: "day",
168
164
  id: view.table.id
@@ -241,70 +237,70 @@ export function DateRangePicker(t0) {
241
237
  })]
242
238
  }, view.index);
243
239
  });
244
- $[19] = api;
245
- $[20] = months;
246
- $[21] = props;
247
- $[22] = shown;
248
- $[23] = t17;
240
+ $[17] = api;
241
+ $[18] = months;
242
+ $[19] = props;
243
+ $[20] = shown;
244
+ $[21] = t16;
249
245
  } else {
250
- t17 = $[23];
246
+ t16 = $[21];
251
247
  }
252
- let t18;
253
- if ($[24] !== t17) {
254
- t18 = /*#__PURE__*/_jsx("div", {
248
+ let t17;
249
+ if ($[22] !== t16) {
250
+ t17 = /*#__PURE__*/_jsx("div", {
255
251
  className: "xds-date-range-picker__months",
256
- children: t17
252
+ children: t16
257
253
  });
258
- $[24] = t17;
259
- $[25] = t18;
254
+ $[22] = t16;
255
+ $[23] = t17;
260
256
  } else {
261
- t18 = $[25];
257
+ t17 = $[23];
262
258
  }
263
- let t19;
264
- if ($[26] !== t10 || $[27] !== t11 || $[28] !== t12 || $[29] !== t16 || $[30] !== t18) {
265
- t19 = /*#__PURE__*/_jsxs("div", {
259
+ let t18;
260
+ if ($[24] !== t10 || $[25] !== t11 || $[26] !== t15 || $[27] !== t17 || $[28] !== t9) {
261
+ t18 = /*#__PURE__*/_jsxs("div", {
262
+ ...t9,
266
263
  ...t10,
267
- ...t11,
268
264
  ref: surface,
269
- hidden: t12,
270
- onKeyDown: t13,
265
+ hidden: t11,
266
+ onKeyDown: t12,
271
267
  className: "xds-date-picker__content xds-date-range-picker__content",
272
- children: [t16, t18]
268
+ children: [t15, t17]
273
269
  });
274
- $[26] = t10;
275
- $[27] = t11;
276
- $[28] = t12;
277
- $[29] = t16;
278
- $[30] = t18;
279
- $[31] = t19;
270
+ $[24] = t10;
271
+ $[25] = t11;
272
+ $[26] = t15;
273
+ $[27] = t17;
274
+ $[28] = t9;
275
+ $[29] = t18;
280
276
  } else {
281
- t19 = $[31];
277
+ t18 = $[29];
282
278
  }
283
- let t20;
284
- if ($[32] !== t19 || $[33] !== t8) {
285
- t20 = /*#__PURE__*/_jsx("div", {
286
- ...t8,
279
+ let t19;
280
+ if ($[30] !== positionerProps || $[31] !== t18) {
281
+ t19 = /*#__PURE__*/_jsx("div", {
282
+ ...positionerProps,
287
283
  ref: positioner,
288
- className: t9,
289
- children: t19
284
+ className: t8,
285
+ children: t18
290
286
  });
287
+ $[30] = positionerProps;
288
+ $[31] = t18;
291
289
  $[32] = t19;
292
- $[33] = t8;
293
- $[34] = t20;
294
290
  } else {
295
- t20 = $[34];
291
+ t19 = $[32];
296
292
  }
297
- let t21;
298
- if ($[35] !== T0 || $[36] !== t20 || $[37] !== t7) {
299
- t21 = /*#__PURE__*/_jsxs(T0, {
300
- children: [t7, t20]
293
+ let t20;
294
+ if ($[33] !== T0 || $[34] !== t19 || $[35] !== t7) {
295
+ t20 = /*#__PURE__*/_jsxs(T0, {
296
+ children: [t7, t19]
301
297
  });
302
- $[35] = T0;
298
+ $[33] = T0;
299
+ $[34] = t19;
300
+ $[35] = t7;
303
301
  $[36] = t20;
304
- $[37] = t7;
305
- $[38] = t21;
306
302
  } else {
307
- t21 = $[38];
303
+ t20 = $[36];
308
304
  }
309
305
  return /*#__PURE__*/_jsxs("div", {
310
306
  ...t4,
@@ -336,17 +332,18 @@ export function DateRangePicker(t0) {
336
332
  children: value === undefined ? placeholder : formatRange(value, locale)
337
333
  }), t6]
338
334
  })
339
- }), (invalid || description) && /*#__PURE__*/_jsx("div", {
335
+ }), /*#__PURE__*/_jsxs("div", {
340
336
  className: "xds-date-picker__footer",
341
- children: invalid ? /*#__PURE__*/_jsx("span", {
342
- id: ids.error,
343
- className: "xds-date-picker__error",
344
- children: error
345
- }) : /*#__PURE__*/_jsx("span", {
337
+ children: [!invalid && description && /*#__PURE__*/_jsx("span", {
346
338
  id: ids.description,
347
339
  className: "xds-date-picker__description",
348
340
  children: description
349
- })
341
+ }), /*#__PURE__*/_jsx("span", {
342
+ id: ids.error,
343
+ className: "xds-date-picker__error",
344
+ "aria-live": "polite",
345
+ children: error
346
+ })]
350
347
  }), startName !== undefined && /*#__PURE__*/_jsx("input", {
351
348
  type: "hidden",
352
349
  name: startName,
@@ -355,7 +352,7 @@ export function DateRangePicker(t0) {
355
352
  type: "hidden",
356
353
  name: endName,
357
354
  value: value?.end ?? ""
358
- }), t21]
355
+ }), t20]
359
356
  });
360
357
  }
361
358
  function _temp2(weekDay) {
package/dist/Menu.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
2
  import { space } from "@xds/tokens";
3
- import { classes, firstMenuValue, keepListKeys, layoutRect, leaveEscapeToFields, menuItemClass, opensOnPress } from "@xds/core";
3
+ import { classes, firstMenuValue, keepListKeys, layoutRect, leaveEscapeToFields, menuItemClass, opensOnPress, readCssPx, underlayLayerStyle } from "@xds/core";
4
4
  import * as menu from "@zag-js/menu";
5
5
  import { normalizeProps, useMachine } from "@zag-js/react";
6
6
  import { useId, useRef } from "react";
@@ -11,7 +11,7 @@ import { usePresence } from "./presence.js";
11
11
  import { TriggerContext, useMergedProps, useProvideTrigger } from "./trigger.js";
12
12
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
13
  export function Menu(t0) {
14
- const $ = _c(31);
14
+ const $ = _c(32);
15
15
  const {
16
16
  trigger,
17
17
  label,
@@ -24,49 +24,56 @@ export function Menu(t0) {
24
24
  const t2 = useId();
25
25
  const t3 = `bottom-${align}`;
26
26
  let t4;
27
- if ($[0] !== t3) {
28
- t4 = {
27
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
28
+ t4 = readCssPx(null, "--xds-space-1", space[1]);
29
+ $[0] = t4;
30
+ } else {
31
+ t4 = $[0];
32
+ }
33
+ let t5;
34
+ if ($[1] !== t3) {
35
+ t5 = {
29
36
  placement: t3,
30
- gutter: space[1],
37
+ gutter: t4,
31
38
  getAnchorRect: _temp
32
39
  };
33
- $[0] = t3;
34
- $[1] = t4;
40
+ $[1] = t3;
41
+ $[2] = t5;
35
42
  } else {
36
- t4 = $[1];
43
+ t5 = $[2];
37
44
  }
38
- let t5;
39
- if ($[2] !== items) {
40
- t5 = details => {
45
+ let t6;
46
+ if ($[3] !== items) {
47
+ t6 = details => {
41
48
  const item = items[Number(details.value)];
42
49
  if (item && item !== "separator") {
43
50
  item.onSelect();
44
51
  }
45
52
  };
46
- $[2] = items;
47
- $[3] = t5;
53
+ $[3] = items;
54
+ $[4] = t6;
48
55
  } else {
49
- t5 = $[3];
56
+ t6 = $[4];
50
57
  }
51
- let t6;
52
- if ($[4] !== label || $[5] !== t2 || $[6] !== t4 || $[7] !== t5) {
53
- t6 = {
58
+ let t7;
59
+ if ($[5] !== label || $[6] !== t2 || $[7] !== t5 || $[8] !== t6) {
60
+ t7 = {
54
61
  id: t2,
55
62
  "aria-label": label,
56
- positioning: t4,
57
- onSelect: t5,
63
+ positioning: t5,
64
+ onSelect: t6,
58
65
  onEscapeKeyDown: leaveEscapeToFields,
59
66
  loopFocus: true
60
67
  };
61
- $[4] = label;
62
- $[5] = t2;
63
- $[6] = t4;
68
+ $[5] = label;
69
+ $[6] = t2;
64
70
  $[7] = t5;
65
71
  $[8] = t6;
72
+ $[9] = t7;
66
73
  } else {
67
- t6 = $[8];
74
+ t7 = $[9];
68
75
  }
69
- const service = useMachine(menu.machine, t6);
76
+ const service = useMachine(menu.machine, t7);
70
77
  const api = menu.connect(service, normalizeProps);
71
78
  const {
72
79
  onPointerDown: _onPointerDown,
@@ -105,47 +112,48 @@ export function Menu(t0) {
105
112
  }));
106
113
  const positioner = useRef(null);
107
114
  const surface = useRef(null);
108
- let t7;
109
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
110
- t7 = () => positioner.current;
111
- $[9] = t7;
112
- } else {
113
- t7 = $[9];
114
- }
115
- useModalPopover(api.open, t7);
116
115
  let t8;
117
116
  if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
118
- t8 = () => [surface.current];
117
+ t8 = () => positioner.current;
119
118
  $[10] = t8;
120
119
  } else {
121
120
  t8 = $[10];
122
121
  }
123
- const present = usePresence(api.open, t8);
122
+ useModalPopover(api.open, t8);
123
+ let t9;
124
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
125
+ t9 = () => [surface.current];
126
+ $[11] = t9;
127
+ } else {
128
+ t9 = $[11];
129
+ }
130
+ const present = usePresence(api.open, t9);
124
131
  const content = useMergedProps(api.getContentProps(), {
125
132
  className: classes("xds-menu", className),
126
133
  style,
127
134
  onKeyDown: event_1 => keepListKeys(event_1, surface.current, ".xds-menu__item:not([data-disabled])", value => api.setHighlightedValue(value))
128
135
  });
129
- let t9;
130
- if ($[11] !== provided || $[12] !== trigger) {
131
- t9 = /*#__PURE__*/_jsx(TriggerContext, {
136
+ const positionerProps = api.getPositionerProps();
137
+ let t10;
138
+ if ($[12] !== provided || $[13] !== trigger) {
139
+ t10 = /*#__PURE__*/_jsx(TriggerContext, {
132
140
  value: provided,
133
141
  children: trigger
134
142
  });
135
- $[11] = provided;
136
- $[12] = trigger;
137
- $[13] = t9;
143
+ $[12] = provided;
144
+ $[13] = trigger;
145
+ $[14] = t10;
138
146
  } else {
139
- t9 = $[13];
147
+ t10 = $[14];
140
148
  }
141
149
  const T0 = Portal;
142
150
  const T1 = TriggerContext;
143
- const t10 = null;
144
- const t11 = api.open && /*#__PURE__*/_jsx("div", {
151
+ const t11 = null;
152
+ const t12 = api.open && /*#__PURE__*/_jsx("div", {
145
153
  className: "xds-menu__underlay",
154
+ style: underlayLayerStyle(positionerProps.style),
146
155
  onMouseDown: _temp2
147
156
  });
148
- const t12 = api.getPositionerProps();
149
157
  const t13 = "xds-menu__positioner";
150
158
  const t14 = !present;
151
159
  const t15 = items.map((item_0, index) => item_0 === "separator" ? /*#__PURE__*/_jsx("div", {
@@ -171,68 +179,68 @@ export function Menu(t0) {
171
179
  })]
172
180
  }, index));
173
181
  let t16;
174
- if ($[14] !== content || $[15] !== t14 || $[16] !== t15) {
182
+ if ($[15] !== content || $[16] !== t14 || $[17] !== t15) {
175
183
  t16 = /*#__PURE__*/_jsx("div", {
176
184
  ...content,
177
185
  ref: surface,
178
186
  hidden: t14,
179
187
  children: t15
180
188
  });
181
- $[14] = content;
182
- $[15] = t14;
183
- $[16] = t15;
184
- $[17] = t16;
189
+ $[15] = content;
190
+ $[16] = t14;
191
+ $[17] = t15;
192
+ $[18] = t16;
185
193
  } else {
186
- t16 = $[17];
194
+ t16 = $[18];
187
195
  }
188
196
  let t17;
189
- if ($[18] !== t12 || $[19] !== t16) {
197
+ if ($[19] !== positionerProps || $[20] !== t16) {
190
198
  t17 = /*#__PURE__*/_jsx("div", {
191
- ...t12,
199
+ ...positionerProps,
192
200
  ref: positioner,
193
201
  className: t13,
194
202
  children: t16
195
203
  });
196
- $[18] = t12;
197
- $[19] = t16;
198
- $[20] = t17;
204
+ $[19] = positionerProps;
205
+ $[20] = t16;
206
+ $[21] = t17;
199
207
  } else {
200
- t17 = $[20];
208
+ t17 = $[21];
201
209
  }
202
210
  let t18;
203
- if ($[21] !== T1 || $[22] !== t11 || $[23] !== t17) {
211
+ if ($[22] !== T1 || $[23] !== t12 || $[24] !== t17) {
204
212
  t18 = /*#__PURE__*/_jsxs(T1, {
205
- value: t10,
206
- children: [t11, t17]
213
+ value: t11,
214
+ children: [t12, t17]
207
215
  });
208
- $[21] = T1;
209
- $[22] = t11;
210
- $[23] = t17;
211
- $[24] = t18;
216
+ $[22] = T1;
217
+ $[23] = t12;
218
+ $[24] = t17;
219
+ $[25] = t18;
212
220
  } else {
213
- t18 = $[24];
221
+ t18 = $[25];
214
222
  }
215
223
  let t19;
216
- if ($[25] !== T0 || $[26] !== t18) {
224
+ if ($[26] !== T0 || $[27] !== t18) {
217
225
  t19 = /*#__PURE__*/_jsx(T0, {
218
226
  children: t18
219
227
  });
220
- $[25] = T0;
221
- $[26] = t18;
222
- $[27] = t19;
228
+ $[26] = T0;
229
+ $[27] = t18;
230
+ $[28] = t19;
223
231
  } else {
224
- t19 = $[27];
232
+ t19 = $[28];
225
233
  }
226
234
  let t20;
227
- if ($[28] !== t19 || $[29] !== t9) {
235
+ if ($[29] !== t10 || $[30] !== t19) {
228
236
  t20 = /*#__PURE__*/_jsxs(_Fragment, {
229
- children: [t9, t19]
237
+ children: [t10, t19]
230
238
  });
231
- $[28] = t19;
232
- $[29] = t9;
233
- $[30] = t20;
239
+ $[29] = t10;
240
+ $[30] = t19;
241
+ $[31] = t20;
234
242
  } else {
235
- t20 = $[30];
243
+ t20 = $[31];
236
244
  }
237
245
  return t20;
238
246
  }
@@ -55,8 +55,9 @@ export function SearchField(t0) {
55
55
  if (event_0.nativeEvent.isComposing) {
56
56
  return;
57
57
  }
58
- if (event_0.key === "Enter") {
59
- onSubmit?.(value);
58
+ if (event_0.key === "Enter" && onSubmit) {
59
+ event_0.preventDefault();
60
+ onSubmit(value);
60
61
  }
61
62
  if (event_0.key === "Escape" && value !== "") {
62
63
  event_0.stopPropagation();
@@ -75,6 +76,7 @@ export function SearchField(t0) {
75
76
  t8 = /*#__PURE__*/_jsx("input", {
76
77
  ref: input,
77
78
  type: "text",
79
+ role: "searchbox",
78
80
  className: "xds-text-field__input",
79
81
  "aria-label": label,
80
82
  enterKeyHint: "search",