@serendie/ui 2.1.3 → 2.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 (122) hide show
  1. package/dist/client.js +79 -74
  2. package/dist/components/Accordion/Accordion.d.ts +1 -1
  3. package/dist/components/Avatar/Avatar.d.ts +1 -1
  4. package/dist/components/Banner/Banner.d.ts +1 -1
  5. package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
  6. package/dist/components/Button/Button.d.ts +2 -2
  7. package/dist/components/Button/Button.js +22 -21
  8. package/dist/components/DatePicker/DatePicker.d.ts +13 -0
  9. package/dist/components/DatePicker/DatePicker.js +203 -0
  10. package/dist/components/DatePicker/index.d.ts +2 -0
  11. package/dist/components/DatePicker/index.js +6 -0
  12. package/dist/components/DatePicker/parseDate.d.ts +1 -0
  13. package/dist/components/DatePicker/styles.d.ts +1 -0
  14. package/dist/components/DatePicker/styles.js +224 -0
  15. package/dist/components/IconButton/IconButton.d.ts +3 -3
  16. package/dist/components/List/ListItem.d.ts +1 -1
  17. package/dist/components/ModalDialog/ModalDialog.d.ts +1 -1
  18. package/dist/components/NotificationBadge/NotificationBadge.d.ts +1 -1
  19. package/dist/components/Pagination/Pagination.d.ts +1 -1
  20. package/dist/components/ProgressIndicator/AnimatedArc.d.ts +6 -0
  21. package/dist/components/ProgressIndicator/AnimatedArc.js +46 -0
  22. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +11 -29
  23. package/dist/components/ProgressIndicator/ProgressIndicator.js +201 -43
  24. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +10 -0
  25. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +215 -0
  26. package/dist/components/ProgressIndicator/index.d.ts +4 -1
  27. package/dist/components/ProgressIndicator/index.js +3 -2
  28. package/dist/components/ProgressIndicator/util.d.ts +1 -0
  29. package/dist/components/ProgressIndicator/util.js +13 -0
  30. package/dist/components/Search/Search.d.ts +1 -1
  31. package/dist/components/Select/Select.d.ts +1 -1
  32. package/dist/components/Switch/Switch.d.ts +1 -1
  33. package/dist/components/Tabs/Tabs.d.ts +1 -1
  34. package/dist/components/TextField/TextField.js +59 -156
  35. package/dist/components/Toast/Toast.d.ts +1 -1
  36. package/dist/components/TopAppBar/TopAppBar.d.ts +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.js +80 -75
  39. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js +15 -0
  40. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js +5 -0
  41. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js +13 -0
  42. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js +14 -0
  43. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js +13 -0
  44. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js +13 -0
  45. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js +14 -0
  46. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js +14 -0
  47. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js +14 -0
  48. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js +55 -0
  49. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js +14 -0
  50. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js +19 -0
  51. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js +26 -0
  52. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js +14 -0
  53. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js +14 -0
  54. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js +14 -0
  55. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js +16 -0
  56. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js +13 -0
  57. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js +14 -0
  58. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js +23 -0
  59. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js +13 -0
  60. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.anatomy.js +5 -0
  61. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-context.js +10 -0
  62. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-cell-props-context.js +10 -0
  63. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-props-context.js +10 -0
  64. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-view-props-context.js +12 -0
  65. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker.js +18 -0
  66. package/dist/node_modules/@ark-ui/react/dist/components/factory.js +11 -12
  67. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +5 -4
  68. package/dist/node_modules/@ark-ui/react/dist/utils/use-event.js +0 -1
  69. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +36 -36
  70. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +238 -235
  71. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +88 -83
  72. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +68 -67
  73. package/dist/node_modules/@internationalized/date/dist/CalendarDate.js +178 -0
  74. package/dist/node_modules/@internationalized/date/dist/DateFormatter.js +99 -0
  75. package/dist/node_modules/@internationalized/date/dist/GregorianCalendar.js +98 -0
  76. package/dist/node_modules/@internationalized/date/dist/conversion.js +135 -0
  77. package/dist/node_modules/@internationalized/date/dist/manipulation.js +205 -0
  78. package/dist/node_modules/@internationalized/date/dist/queries.js +202 -0
  79. package/dist/node_modules/@internationalized/date/dist/string.js +41 -0
  80. package/dist/node_modules/@internationalized/date/dist/utils.js +6 -0
  81. package/dist/node_modules/@internationalized/date/dist/weekStartData.js +100 -0
  82. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +7 -0
  83. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.js +7 -0
  84. package/dist/node_modules/@zag-js/anatomy/dist/index.js +15 -14
  85. package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +23 -23
  86. package/dist/node_modules/@zag-js/collection/dist/index.js +102 -71
  87. package/dist/node_modules/@zag-js/combobox/dist/index.js +482 -426
  88. package/dist/node_modules/@zag-js/date-picker/dist/index.js +1826 -0
  89. package/dist/node_modules/@zag-js/date-utils/dist/index.js +366 -0
  90. package/dist/node_modules/@zag-js/dialog/dist/index.js +66 -64
  91. package/dist/node_modules/@zag-js/dismissable/dist/index.js +94 -69
  92. package/dist/node_modules/@zag-js/dom-query/dist/index.js +359 -300
  93. package/dist/node_modules/@zag-js/live-region/dist/index.js +39 -0
  94. package/dist/node_modules/@zag-js/menu/dist/index.js +357 -340
  95. package/dist/node_modules/@zag-js/popper/dist/index.js +123 -120
  96. package/dist/node_modules/@zag-js/presence/dist/index.js +17 -17
  97. package/dist/node_modules/@zag-js/radio-group/dist/index.js +118 -117
  98. package/dist/node_modules/@zag-js/react/dist/index.js +124 -121
  99. package/dist/node_modules/@zag-js/select/dist/index.js +211 -197
  100. package/dist/node_modules/@zag-js/toast/dist/index.js +73 -71
  101. package/dist/node_modules/@zag-js/tooltip/dist/index.js +31 -30
  102. package/dist/node_modules/@zag-js/utils/dist/index.js +150 -104
  103. package/dist/preset.d.ts +11 -1
  104. package/dist/recipes/index.d.ts +3 -2
  105. package/dist/recipes/index.js +5 -2
  106. package/dist/recipes/textFieldRecipe.d.ts +6 -0
  107. package/dist/recipes/textFieldRecipe.js +107 -0
  108. package/dist/styled-system/css/cva.js +43 -38
  109. package/dist/styled-system/recipes/create-recipe.js +37 -0
  110. package/dist/styled-system/recipes/text-field-recipe.js +61 -0
  111. package/dist/styles.css +1 -1
  112. package/dist/tokens/keyframes/index.d.ts +8 -0
  113. package/dist/tokens/keyframes/index.js +6 -2
  114. package/package.json +3 -3
  115. package/styled-system/recipes/create-recipe.js +82 -0
  116. package/styled-system/recipes/index.d.ts +2 -0
  117. package/styled-system/recipes/index.js +1 -0
  118. package/styled-system/recipes/text-field-recipe.d.ts +28 -0
  119. package/styled-system/recipes/text-field-recipe.js +72 -0
  120. package/styled-system/types/prop-type.d.ts +1 -1
  121. package/dist/node_modules/@zag-js/store/dist/index.js +0 -131
  122. package/dist/node_modules/proxy-compare/dist/index.js +0 -7
@@ -1,12 +1,12 @@
1
- import { createAnatomy as te } from "../../anatomy/dist/index.js";
2
- import { ListCollection as J } from "../../collection/dist/index.js";
3
- import { raf as N, observeAttributes as ie, trackFormControl as le, getByTypeahead as H, isSelfTarget as ne, isValidTabEvent as ae, getEventKey as $, getEventTarget as se, isEditableElement as oe, visuallyHiddenStyle as re, dataAttr as r, ariaAttr as de, getInitialFocus as ce, scrollIntoView as ue } from "../../dom-query/dist/index.js";
4
- import { getPlacement as K, getPlacementStyles as ge } from "../../popper/dist/index.js";
5
- import { addOrRemove as B, isEqual as he, ensure as me } from "../../utils/dist/index.js";
6
- import { createMachine as Ie, createGuards as pe } from "../../core/dist/index.js";
7
- import { trackDismissableElement as Ee } from "../../dismissable/dist/index.js";
1
+ import { createAnatomy as ie } from "../../anatomy/dist/index.js";
2
+ import { ListCollection as Q } from "../../collection/dist/index.js";
3
+ import { raf as N, observeAttributes as le, trackFormControl as ne, getByTypeahead as D, isSelfTarget as ae, isValidTabEvent as se, getEventKey as K, getEventTarget as oe, isEditableElement as re, visuallyHiddenStyle as de, dataAttr as r, ariaAttr as ce, getInitialFocus as ue, scrollIntoView as ge } from "../../dom-query/dist/index.js";
4
+ import { getPlacement as B, getPlacementStyles as he } from "../../popper/dist/index.js";
5
+ import { addOrRemove as Y, isEqual as me, ensure as Ie } from "../../utils/dist/index.js";
6
+ import { createMachine as pe, createGuards as Ee } from "../../core/dist/index.js";
7
+ import { trackDismissableElement as ve } from "../../dismissable/dist/index.js";
8
8
  import { createProps as G } from "../../types/dist/index.js";
9
- var ve = te("select").parts(
9
+ var fe = ie("select").parts(
10
10
  "label",
11
11
  "positioner",
12
12
  "trigger",
@@ -22,103 +22,106 @@ var ve = te("select").parts(
22
22
  "root",
23
23
  "control",
24
24
  "valueText"
25
- ), h = ve.build(), Q = (e) => new J(e);
26
- Q.empty = () => new J({ items: [] });
27
- var fe = (e) => {
25
+ ), h = fe.build(), X = (e) => new Q(e);
26
+ X.empty = () => new Q({ items: [] });
27
+ var Te = (e) => {
28
28
  var t;
29
29
  return ((t = e.ids) == null ? void 0 : t.root) ?? `select:${e.id}`;
30
- }, D = (e) => {
30
+ }, M = (e) => {
31
31
  var t;
32
32
  return ((t = e.ids) == null ? void 0 : t.content) ?? `select:${e.id}:content`;
33
- }, M = (e) => {
33
+ }, w = (e) => {
34
34
  var t;
35
35
  return ((t = e.ids) == null ? void 0 : t.trigger) ?? `select:${e.id}:trigger`;
36
- }, X = (e) => {
36
+ }, Z = (e) => {
37
37
  var t;
38
38
  return ((t = e.ids) == null ? void 0 : t.clearTrigger) ?? `select:${e.id}:clear-trigger`;
39
39
  }, b = (e) => {
40
40
  var t;
41
41
  return ((t = e.ids) == null ? void 0 : t.label) ?? `select:${e.id}:label`;
42
- }, Te = (e) => {
42
+ }, Oe = (e) => {
43
43
  var t;
44
44
  return ((t = e.ids) == null ? void 0 : t.control) ?? `select:${e.id}:control`;
45
- }, w = (e, t) => {
45
+ }, _ = (e, t) => {
46
46
  var i, l;
47
47
  return ((l = (i = e.ids) == null ? void 0 : i.item) == null ? void 0 : l.call(i, t)) ?? `select:${e.id}:option:${t}`;
48
- }, _ = (e) => {
48
+ }, U = (e) => {
49
49
  var t;
50
50
  return ((t = e.ids) == null ? void 0 : t.hiddenSelect) ?? `select:${e.id}:select`;
51
- }, Z = (e) => {
51
+ }, x = (e) => {
52
52
  var t;
53
53
  return ((t = e.ids) == null ? void 0 : t.positioner) ?? `select:${e.id}:positioner`;
54
- }, Oe = (e, t) => {
54
+ }, Re = (e, t) => {
55
55
  var i, l;
56
56
  return ((l = (i = e.ids) == null ? void 0 : i.itemGroup) == null ? void 0 : l.call(i, t)) ?? `select:${e.id}:optgroup:${t}`;
57
- }, Y = (e, t) => {
57
+ }, q = (e, t) => {
58
58
  var i, l;
59
59
  return ((l = (i = e.ids) == null ? void 0 : i.itemGroupLabel) == null ? void 0 : l.call(i, t)) ?? `select:${e.id}:optgroup-label:${t}`;
60
- }, k = (e) => e.getById(_(e)), R = (e) => e.getById(D(e)), f = (e) => e.getById(M(e)), ye = (e) => e.getById(X(e)), q = (e) => e.getById(Z(e)), Re = (e, t) => e.getById(w(e, t));
60
+ }, H = (e) => e.getById(U(e)), y = (e) => e.getById(M(e)), v = (e) => e.getById(w(e)), ye = (e) => e.getById(Z(e)), j = (e) => e.getById(x(e)), k = (e, t) => t == null ? null : e.getById(_(e, t));
61
61
  function Ne(e, t) {
62
- const { context: i, prop: l, scope: a, state: d, computed: c, send: o } = e, g = l("disabled") || i.get("fieldsetDisabled"), m = l("invalid"), I = l("readOnly"), p = l("composite"), S = l("collection"), E = d.hasTag("open"), P = d.matches("focused"), y = i.get("highlightedValue"), x = i.get("highlightedItem"), z = i.get("selectedItems"), L = i.get("currentPlacement"), U = c("isTypingAhead"), F = c("isInteractive"), A = y ? w(a, y) : void 0;
63
- function V(n) {
64
- const s = S.getItemDisabled(n.item), u = S.getItemValue(n.item);
65
- return me(u, () => `[zag-js] No value found for item ${JSON.stringify(n.item)}`), {
62
+ const { context: i, prop: l, scope: a, state: c, computed: d, send: s } = e, g = l("disabled") || i.get("fieldsetDisabled"), m = l("invalid"), f = l("readOnly"), I = l("composite"), V = l("collection"), p = c.hasTag("open"), L = c.matches("focused"), R = i.get("highlightedValue"), z = i.get("highlightedItem"), ee = i.get("selectedItems"), P = i.get("currentPlacement"), W = d("isTypingAhead"), F = d("isInteractive"), A = R ? _(a, R) : void 0;
63
+ function S(n) {
64
+ const o = V.getItemDisabled(n.item), u = V.getItemValue(n.item);
65
+ return Ie(u, () => `[zag-js] No value found for item ${JSON.stringify(n.item)}`), {
66
66
  value: u,
67
- disabled: !!(g || s),
68
- highlighted: y === u,
67
+ disabled: !!(g || o),
68
+ highlighted: R === u,
69
69
  selected: i.get("value").includes(u)
70
70
  };
71
71
  }
72
- const ee = ge({
72
+ const te = he({
73
73
  ...l("positioning"),
74
- placement: L
74
+ placement: P
75
75
  });
76
76
  return {
77
- open: E,
78
- focused: P,
77
+ open: p,
78
+ focused: L,
79
79
  empty: i.get("value").length === 0,
80
- highlightedItem: x,
81
- highlightedValue: y,
82
- selectedItems: z,
83
- hasSelectedItems: c("hasSelectedItems"),
80
+ highlightedItem: z,
81
+ highlightedValue: R,
82
+ selectedItems: ee,
83
+ hasSelectedItems: d("hasSelectedItems"),
84
84
  value: i.get("value"),
85
- valueAsString: i.get("valueAsString"),
86
- collection: S,
85
+ valueAsString: d("valueAsString"),
86
+ collection: V,
87
87
  multiple: !!l("multiple"),
88
88
  disabled: !!g,
89
89
  reposition(n = {}) {
90
- o({ type: "POSITIONING.SET", options: n });
90
+ s({ type: "POSITIONING.SET", options: n });
91
91
  },
92
92
  focus() {
93
93
  var n;
94
- (n = f(a)) == null || n.focus({ preventScroll: !0 });
94
+ (n = v(a)) == null || n.focus({ preventScroll: !0 });
95
95
  },
96
96
  setOpen(n) {
97
- d.hasTag("open") !== n && o({ type: n ? "OPEN" : "CLOSE" });
97
+ c.hasTag("open") !== n && s({ type: n ? "OPEN" : "CLOSE" });
98
98
  },
99
99
  selectValue(n) {
100
- o({ type: "ITEM.SELECT", value: n });
100
+ s({ type: "ITEM.SELECT", value: n });
101
101
  },
102
102
  setValue(n) {
103
- o({ type: "VALUE.SET", value: n });
103
+ s({ type: "VALUE.SET", value: n });
104
104
  },
105
105
  selectAll() {
106
- o({ type: "VALUE.SET", value: S.getValues() });
106
+ s({ type: "VALUE.SET", value: V.getValues() });
107
+ },
108
+ setHighlightValue(n) {
109
+ s({ type: "HIGHLIGHTED_VALUE.SET", value: n });
107
110
  },
108
- highlightValue(n) {
109
- o({ type: "HIGHLIGHTED_VALUE.SET", value: n });
111
+ clearHighlightValue() {
112
+ s({ type: "HIGHLIGHTED_VALUE.CLEAR" });
110
113
  },
111
114
  clearValue(n) {
112
- o(n ? { type: "ITEM.CLEAR", value: n } : { type: "VALUE.CLEAR" });
115
+ s(n ? { type: "ITEM.CLEAR", value: n } : { type: "VALUE.CLEAR" });
113
116
  },
114
- getItemState: V,
117
+ getItemState: S,
115
118
  getRootProps() {
116
119
  return t.element({
117
120
  ...h.root.attrs,
118
121
  dir: l("dir"),
119
- id: fe(a),
122
+ id: Te(a),
120
123
  "data-invalid": r(m),
121
- "data-readonly": r(I)
124
+ "data-readonly": r(f)
122
125
  });
123
126
  },
124
127
  getLabelProps() {
@@ -128,11 +131,11 @@ function Ne(e, t) {
128
131
  ...h.label.attrs,
129
132
  "data-disabled": r(g),
130
133
  "data-invalid": r(m),
131
- "data-readonly": r(I),
132
- htmlFor: _(a),
134
+ "data-readonly": r(f),
135
+ htmlFor: U(a),
133
136
  onClick(n) {
134
- var s;
135
- n.defaultPrevented || g || (s = f(a)) == null || s.focus({ preventScroll: !0 });
137
+ var o;
138
+ n.defaultPrevented || g || (o = v(a)) == null || o.focus({ preventScroll: !0 });
136
139
  }
137
140
  });
138
141
  },
@@ -140,9 +143,9 @@ function Ne(e, t) {
140
143
  return t.element({
141
144
  ...h.control.attrs,
142
145
  dir: l("dir"),
143
- id: Te(a),
144
- "data-state": E ? "open" : "closed",
145
- "data-focus": r(P),
146
+ id: Oe(a),
147
+ "data-state": p ? "open" : "closed",
148
+ "data-focus": r(L),
146
149
  "data-disabled": r(g),
147
150
  "data-invalid": r(m)
148
151
  });
@@ -153,65 +156,65 @@ function Ne(e, t) {
153
156
  dir: l("dir"),
154
157
  "data-disabled": r(g),
155
158
  "data-invalid": r(m),
156
- "data-focus": r(P)
159
+ "data-focus": r(L)
157
160
  });
158
161
  },
159
162
  getTriggerProps() {
160
163
  return t.button({
161
- id: M(a),
164
+ id: w(a),
162
165
  disabled: g,
163
166
  dir: l("dir"),
164
167
  type: "button",
165
168
  role: "combobox",
166
- "aria-controls": D(a),
167
- "aria-expanded": E,
169
+ "aria-controls": M(a),
170
+ "aria-expanded": p,
168
171
  "aria-haspopup": "listbox",
169
- "data-state": E ? "open" : "closed",
172
+ "data-state": p ? "open" : "closed",
170
173
  "aria-invalid": m,
171
174
  "aria-labelledby": b(a),
172
175
  ...h.trigger.attrs,
173
176
  "data-disabled": r(g),
174
177
  "data-invalid": r(m),
175
- "data-readonly": r(I),
176
- "data-placement": L,
177
- "data-placeholder-shown": r(!c("hasSelectedItems")),
178
+ "data-readonly": r(f),
179
+ "data-placement": P,
180
+ "data-placeholder-shown": r(!d("hasSelectedItems")),
178
181
  onClick(n) {
179
- F && (n.defaultPrevented || o({ type: "TRIGGER.CLICK" }));
182
+ F && (n.defaultPrevented || s({ type: "TRIGGER.CLICK" }));
180
183
  },
181
184
  onFocus() {
182
- o({ type: "TRIGGER.FOCUS" });
185
+ s({ type: "TRIGGER.FOCUS" });
183
186
  },
184
187
  onBlur() {
185
- o({ type: "TRIGGER.BLUR" });
188
+ s({ type: "TRIGGER.BLUR" });
186
189
  },
187
190
  onKeyDown(n) {
188
191
  if (n.defaultPrevented || !F) return;
189
192
  const u = {
190
193
  ArrowUp() {
191
- o({ type: "TRIGGER.ARROW_UP" });
194
+ s({ type: "TRIGGER.ARROW_UP" });
192
195
  },
193
196
  ArrowDown(T) {
194
- o({ type: T.altKey ? "OPEN" : "TRIGGER.ARROW_DOWN" });
197
+ s({ type: T.altKey ? "OPEN" : "TRIGGER.ARROW_DOWN" });
195
198
  },
196
199
  ArrowLeft() {
197
- o({ type: "TRIGGER.ARROW_LEFT" });
200
+ s({ type: "TRIGGER.ARROW_LEFT" });
198
201
  },
199
202
  ArrowRight() {
200
- o({ type: "TRIGGER.ARROW_RIGHT" });
203
+ s({ type: "TRIGGER.ARROW_RIGHT" });
201
204
  },
202
205
  Home() {
203
- o({ type: "TRIGGER.HOME" });
206
+ s({ type: "TRIGGER.HOME" });
204
207
  },
205
208
  End() {
206
- o({ type: "TRIGGER.END" });
209
+ s({ type: "TRIGGER.END" });
207
210
  },
208
211
  Enter() {
209
- o({ type: "TRIGGER.ENTER" });
212
+ s({ type: "TRIGGER.ENTER" });
210
213
  },
211
214
  Space(T) {
212
- o(U ? { type: "TRIGGER.TYPEAHEAD", key: T.key } : { type: "TRIGGER.ENTER" });
215
+ s(W ? { type: "TRIGGER.TYPEAHEAD", key: T.key } : { type: "TRIGGER.ENTER" });
213
216
  }
214
- }[$(n, {
217
+ }[K(n, {
215
218
  dir: l("dir"),
216
219
  orientation: "vertical"
217
220
  })];
@@ -219,7 +222,7 @@ function Ne(e, t) {
219
222
  u(n), n.preventDefault();
220
223
  return;
221
224
  }
222
- H.isValidEvent(n) && (o({ type: "TRIGGER.TYPEAHEAD", key: n.key }), n.preventDefault());
225
+ D.isValidEvent(n) && (s({ type: "TRIGGER.TYPEAHEAD", key: n.key }), n.preventDefault());
223
226
  }
224
227
  });
225
228
  },
@@ -228,71 +231,71 @@ function Ne(e, t) {
228
231
  ...h.indicator.attrs,
229
232
  dir: l("dir"),
230
233
  "aria-hidden": !0,
231
- "data-state": E ? "open" : "closed",
234
+ "data-state": p ? "open" : "closed",
232
235
  "data-disabled": r(g),
233
236
  "data-invalid": r(m),
234
- "data-readonly": r(I)
237
+ "data-readonly": r(f)
235
238
  });
236
239
  },
237
240
  getItemProps(n) {
238
- const s = V(n);
241
+ const o = S(n);
239
242
  return t.element({
240
- id: w(a, s.value),
243
+ id: _(a, o.value),
241
244
  role: "option",
242
245
  ...h.item.attrs,
243
246
  dir: l("dir"),
244
- "data-value": s.value,
245
- "aria-selected": s.selected,
246
- "data-state": s.selected ? "checked" : "unchecked",
247
- "data-highlighted": r(s.highlighted),
248
- "data-disabled": r(s.disabled),
249
- "aria-disabled": de(s.disabled),
247
+ "data-value": o.value,
248
+ "aria-selected": o.selected,
249
+ "data-state": o.selected ? "checked" : "unchecked",
250
+ "data-highlighted": r(o.highlighted),
251
+ "data-disabled": r(o.disabled),
252
+ "aria-disabled": ce(o.disabled),
250
253
  onPointerMove(u) {
251
- s.disabled || u.pointerType !== "mouse" || s.value !== y && o({ type: "ITEM.POINTER_MOVE", value: s.value });
254
+ o.disabled || u.pointerType !== "mouse" || o.value !== R && s({ type: "ITEM.POINTER_MOVE", value: o.value });
252
255
  },
253
256
  onClick(u) {
254
- u.defaultPrevented || s.disabled || o({ type: "ITEM.CLICK", src: "pointerup", value: s.value });
257
+ u.defaultPrevented || o.disabled || s({ type: "ITEM.CLICK", src: "pointerup", value: o.value });
255
258
  },
256
259
  onPointerLeave(u) {
257
260
  var O;
258
- s.disabled || n.persistFocus || u.pointerType !== "mouse" || !((O = e.event.previous()) != null && O.type.includes("POINTER")) || o({ type: "ITEM.POINTER_LEAVE" });
261
+ o.disabled || n.persistFocus || u.pointerType !== "mouse" || !((O = e.event.previous()) != null && O.type.includes("POINTER")) || s({ type: "ITEM.POINTER_LEAVE" });
259
262
  }
260
263
  });
261
264
  },
262
265
  getItemTextProps(n) {
263
- const s = V(n);
266
+ const o = S(n);
264
267
  return t.element({
265
268
  ...h.itemText.attrs,
266
- "data-state": s.selected ? "checked" : "unchecked",
267
- "data-disabled": r(s.disabled),
268
- "data-highlighted": r(s.highlighted)
269
+ "data-state": o.selected ? "checked" : "unchecked",
270
+ "data-disabled": r(o.disabled),
271
+ "data-highlighted": r(o.highlighted)
269
272
  });
270
273
  },
271
274
  getItemIndicatorProps(n) {
272
- const s = V(n);
275
+ const o = S(n);
273
276
  return t.element({
274
277
  "aria-hidden": !0,
275
278
  ...h.itemIndicator.attrs,
276
- "data-state": s.selected ? "checked" : "unchecked",
277
- hidden: !s.selected
279
+ "data-state": o.selected ? "checked" : "unchecked",
280
+ hidden: !o.selected
278
281
  });
279
282
  },
280
283
  getItemGroupLabelProps(n) {
281
- const { htmlFor: s } = n;
284
+ const { htmlFor: o } = n;
282
285
  return t.element({
283
286
  ...h.itemGroupLabel.attrs,
284
- id: Y(a, s),
287
+ id: q(a, o),
285
288
  dir: l("dir"),
286
289
  role: "presentation"
287
290
  });
288
291
  },
289
292
  getItemGroupProps(n) {
290
- const { id: s } = n;
293
+ const { id: o } = n;
291
294
  return t.element({
292
295
  ...h.itemGroup.attrs,
293
296
  "data-disabled": r(g),
294
- id: Oe(a, s),
295
- "aria-labelledby": Y(a, s),
297
+ id: Re(a, o),
298
+ "aria-labelledby": q(a, o),
296
299
  role: "group",
297
300
  dir: l("dir")
298
301
  });
@@ -300,20 +303,20 @@ function Ne(e, t) {
300
303
  getClearTriggerProps() {
301
304
  return t.button({
302
305
  ...h.clearTrigger.attrs,
303
- id: X(a),
306
+ id: Z(a),
304
307
  type: "button",
305
308
  "aria-label": "Clear value",
306
309
  "data-invalid": r(m),
307
310
  disabled: g,
308
- hidden: !c("hasSelectedItems"),
311
+ hidden: !d("hasSelectedItems"),
309
312
  dir: l("dir"),
310
313
  onClick(n) {
311
- n.defaultPrevented || o({ type: "CLEAR.CLICK" });
314
+ n.defaultPrevented || s({ type: "CLEAR.CLICK" });
312
315
  }
313
316
  });
314
317
  },
315
318
  getHiddenSelectProps() {
316
- const n = i.get("value"), s = l("multiple") ? n : n == null ? void 0 : n[0];
319
+ const n = i.get("value"), o = l("multiple") ? n : n == null ? void 0 : n[0];
317
320
  return t.select({
318
321
  name: l("name"),
319
322
  form: l("form"),
@@ -321,15 +324,15 @@ function Ne(e, t) {
321
324
  multiple: l("multiple"),
322
325
  required: l("required"),
323
326
  "aria-hidden": !0,
324
- id: _(a),
325
- defaultValue: s,
326
- style: re,
327
+ id: U(a),
328
+ defaultValue: o,
329
+ style: de,
327
330
  tabIndex: -1,
328
331
  // Some browser extensions will focus the hidden select.
329
332
  // Let's forward the focus to the trigger.
330
333
  onFocus() {
331
334
  var u;
332
- (u = f(a)) == null || u.focus({ preventScroll: !0 });
335
+ (u = v(a)) == null || u.focus({ preventScroll: !0 });
333
336
  },
334
337
  "aria-labelledby": b(a)
335
338
  });
@@ -338,57 +341,57 @@ function Ne(e, t) {
338
341
  return t.element({
339
342
  ...h.positioner.attrs,
340
343
  dir: l("dir"),
341
- id: Z(a),
342
- style: ee.floating
344
+ id: x(a),
345
+ style: te.floating
343
346
  });
344
347
  },
345
348
  getContentProps() {
346
349
  return t.element({
347
- hidden: !E,
350
+ hidden: !p,
348
351
  dir: l("dir"),
349
- id: D(a),
350
- role: p ? "listbox" : "dialog",
352
+ id: M(a),
353
+ role: I ? "listbox" : "dialog",
351
354
  ...h.content.attrs,
352
- "data-state": E ? "open" : "closed",
353
- "data-placement": L,
355
+ "data-state": p ? "open" : "closed",
356
+ "data-placement": P,
354
357
  "data-activedescendant": A,
355
- "aria-activedescendant": p ? A : void 0,
356
- "aria-multiselectable": l("multiple") && p ? !0 : void 0,
358
+ "aria-activedescendant": I ? A : void 0,
359
+ "aria-multiselectable": l("multiple") && I ? !0 : void 0,
357
360
  "aria-labelledby": b(a),
358
361
  tabIndex: 0,
359
362
  onKeyDown(n) {
360
- if (!F || !ne(n)) return;
361
- if (n.key === "Tab" && !ae(n)) {
363
+ if (!F || !ae(n)) return;
364
+ if (n.key === "Tab" && !se(n)) {
362
365
  n.preventDefault();
363
366
  return;
364
367
  }
365
- const s = {
368
+ const o = {
366
369
  ArrowUp() {
367
- o({ type: "CONTENT.ARROW_UP" });
370
+ s({ type: "CONTENT.ARROW_UP" });
368
371
  },
369
372
  ArrowDown() {
370
- o({ type: "CONTENT.ARROW_DOWN" });
373
+ s({ type: "CONTENT.ARROW_DOWN" });
371
374
  },
372
375
  Home() {
373
- o({ type: "CONTENT.HOME" });
376
+ s({ type: "CONTENT.HOME" });
374
377
  },
375
378
  End() {
376
- o({ type: "CONTENT.END" });
379
+ s({ type: "CONTENT.END" });
377
380
  },
378
381
  Enter() {
379
- o({ type: "ITEM.CLICK", src: "keydown.enter" });
382
+ s({ type: "ITEM.CLICK", src: "keydown.enter" });
380
383
  },
381
384
  Space(O) {
382
- var W;
383
- U ? o({ type: "CONTENT.TYPEAHEAD", key: O.key }) : (W = s.Enter) == null || W.call(s, O);
385
+ var $;
386
+ W ? s({ type: "CONTENT.TYPEAHEAD", key: O.key }) : ($ = o.Enter) == null || $.call(o, O);
384
387
  }
385
- }, u = s[$(n)];
388
+ }, u = o[K(n)];
386
389
  if (u) {
387
390
  u(n), n.preventDefault();
388
391
  return;
389
392
  }
390
- const T = se(n);
391
- oe(T) || H.isValidEvent(n) && (o({ type: "CONTENT.TYPEAHEAD", key: n.key }), n.preventDefault());
393
+ const T = oe(n);
394
+ re(T) || D.isValidEvent(n) && (s({ type: "CONTENT.TYPEAHEAD", key: n.key }), n.preventDefault());
392
395
  }
393
396
  });
394
397
  },
@@ -396,15 +399,15 @@ function Ne(e, t) {
396
399
  return t.element({
397
400
  ...h.list.attrs,
398
401
  tabIndex: 0,
399
- role: p ? void 0 : "listbox",
400
- "aria-labelledby": M(a),
401
- "aria-activedescendant": p ? void 0 : A,
402
- "aria-multiselectable": !p && l("multiple") ? !0 : void 0
402
+ role: I ? void 0 : "listbox",
403
+ "aria-labelledby": w(a),
404
+ "aria-activedescendant": I ? void 0 : A,
405
+ "aria-multiselectable": !I && l("multiple") ? !0 : void 0
403
406
  });
404
407
  }
405
408
  };
406
409
  }
407
- var { and: C, not: v, or: Ce } = pe(), ke = Ie({
410
+ var { and: C, not: E, or: Ce } = Ee(), He = pe({
408
411
  props({ props: e }) {
409
412
  return {
410
413
  loopFocus: !1,
@@ -412,7 +415,7 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
412
415
  composite: !0,
413
416
  defaultValue: [],
414
417
  ...e,
415
- collection: e.collection ?? Q.empty(),
418
+ collection: e.collection ?? X.empty(),
416
419
  positioning: {
417
420
  placement: "bottom-start",
418
421
  gutter: 8,
@@ -425,7 +428,7 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
425
428
  value: t(() => ({
426
429
  defaultValue: e("defaultValue"),
427
430
  value: e("value"),
428
- isEqual: he,
431
+ isEqual: me,
429
432
  onChange(i) {
430
433
  var a;
431
434
  const l = e("collection").findMany(i);
@@ -456,23 +459,20 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
456
459
  selectedItems: t(() => {
457
460
  const i = e("value") ?? e("defaultValue") ?? [];
458
461
  return { defaultValue: e("collection").findMany(i) };
459
- }),
460
- valueAsString: t(() => {
461
- const i = e("value") ?? e("defaultValue") ?? [];
462
- return { defaultValue: e("collection").stringifyMany(i) };
463
462
  })
464
463
  };
465
464
  },
466
465
  refs() {
467
466
  return {
468
- typeahead: { ...H.defaultOptions }
467
+ typeahead: { ...D.defaultOptions }
469
468
  };
470
469
  },
471
470
  computed: {
472
471
  hasSelectedItems: ({ context: e }) => e.get("value").length > 0,
473
472
  isTypingAhead: ({ refs: e }) => e.get("typeahead").keysSoFar !== "",
474
473
  isDisabled: ({ prop: e, context: t }) => !!e("disabled") || !!t.get("fieldsetDisabled"),
475
- isInteractive: ({ prop: e }) => !(e("disabled") || e("readOnly"))
474
+ isInteractive: ({ prop: e }) => !(e("disabled") || e("readOnly")),
475
+ valueAsString: ({ context: e, prop: t }) => t("collection").stringifyItems(e.get("selectedItems"))
476
476
  },
477
477
  initialState({ prop: e }) {
478
478
  return e("open") || e("defaultOpen") ? "open" : "idle";
@@ -493,6 +493,9 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
493
493
  "HIGHLIGHTED_VALUE.SET": {
494
494
  actions: ["setHighlightedItem"]
495
495
  },
496
+ "HIGHLIGHTED_VALUE.CLEAR": {
497
+ actions: ["clearHighlightedItem"]
498
+ },
496
499
  "ITEM.SELECT": {
497
500
  actions: ["selectItem"]
498
501
  },
@@ -629,34 +632,34 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
629
632
  ],
630
633
  "TRIGGER.ARROW_LEFT": [
631
634
  {
632
- guard: C(v("multiple"), "hasSelectedItems"),
635
+ guard: C(E("multiple"), "hasSelectedItems"),
633
636
  actions: ["selectPreviousItem"]
634
637
  },
635
638
  {
636
- guard: v("multiple"),
639
+ guard: E("multiple"),
637
640
  actions: ["selectLastItem"]
638
641
  }
639
642
  ],
640
643
  "TRIGGER.ARROW_RIGHT": [
641
644
  {
642
- guard: C(v("multiple"), "hasSelectedItems"),
645
+ guard: C(E("multiple"), "hasSelectedItems"),
643
646
  actions: ["selectNextItem"]
644
647
  },
645
648
  {
646
- guard: v("multiple"),
649
+ guard: E("multiple"),
647
650
  actions: ["selectFirstItem"]
648
651
  }
649
652
  ],
650
653
  "TRIGGER.HOME": {
651
- guard: v("multiple"),
654
+ guard: E("multiple"),
652
655
  actions: ["selectFirstItem"]
653
656
  },
654
657
  "TRIGGER.END": {
655
- guard: v("multiple"),
658
+ guard: E("multiple"),
656
659
  actions: ["selectLastItem"]
657
660
  },
658
661
  "TRIGGER.TYPEAHEAD": {
659
- guard: v("multiple"),
662
+ guard: E("multiple"),
660
663
  actions: ["selectMatchingItem"]
661
664
  }
662
665
  }
@@ -772,7 +775,7 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
772
775
  isFirstItemHighlighted: ({ context: e, prop: t }) => e.get("highlightedValue") === t("collection").firstValue,
773
776
  isLastItemHighlighted: ({ context: e, prop: t }) => e.get("highlightedValue") === t("collection").lastValue,
774
777
  closeOnSelect: ({ prop: e, event: t }) => !!(t.closeOnSelect ?? e("closeOnSelect")),
775
- restoreFocus: ({ event: e }) => j(e),
778
+ restoreFocus: ({ event: e }) => J(e),
776
779
  // guard assertions (for controlled mode)
777
780
  isOpenControlled: ({ prop: e }) => e("open") !== void 0,
778
781
  isTriggerClickEvent: ({ event: e }) => {
@@ -794,7 +797,7 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
794
797
  },
795
798
  effects: {
796
799
  trackFormControlState({ context: e, scope: t }) {
797
- return le(k(t), {
800
+ return ne(H(t), {
798
801
  onFieldsetDisabledChange(i) {
799
802
  e.set("fieldsetDisabled", i);
800
803
  },
@@ -805,16 +808,16 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
805
808
  });
806
809
  },
807
810
  trackDismissableElement({ scope: e, send: t, prop: i }) {
808
- const l = () => R(e);
811
+ const l = () => y(e);
809
812
  let a = !0;
810
- return Ee(l, {
813
+ return ve(l, {
811
814
  defer: !0,
812
- exclude: [f(e), ye(e)],
815
+ exclude: [v(e), ye(e)],
813
816
  onFocusOutside: i("onFocusOutside"),
814
817
  onPointerDownOutside: i("onPointerDownOutside"),
815
- onInteractOutside(d) {
816
- var c;
817
- (c = i("onInteractOutside")) == null || c(d), a = !(d.detail.focusable || d.detail.contextmenu);
818
+ onInteractOutside(c) {
819
+ var d;
820
+ (d = i("onInteractOutside")) == null || d(c), a = !(c.detail.focusable || c.detail.contextmenu);
818
821
  },
819
822
  onDismiss() {
820
823
  t({ type: "CLOSE", src: "interact-outside", restoreFocus: a });
@@ -823,27 +826,32 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
823
826
  },
824
827
  computePlacement({ context: e, prop: t, scope: i }) {
825
828
  const l = t("positioning");
826
- return e.set("currentPlacement", l.placement), K(() => f(i), () => q(i), {
829
+ return e.set("currentPlacement", l.placement), B(() => v(i), () => j(i), {
827
830
  defer: !0,
828
831
  ...l,
829
- onComplete(c) {
830
- e.set("currentPlacement", c.placement);
832
+ onComplete(d) {
833
+ e.set("currentPlacement", d.placement);
831
834
  }
832
835
  });
833
836
  },
834
837
  scrollToHighlightedItem({ context: e, prop: t, scope: i, event: l }) {
835
- const a = (c) => {
836
- const o = e.get("highlightedValue");
837
- if (o == null || l.current().type.includes("POINTER")) return;
838
- const g = Re(i, o), m = R(i), I = t("scrollToIndexFn");
839
- if (I) {
840
- const p = t("collection").indexOf(o);
841
- I == null || I({ index: p, immediate: c });
838
+ const a = (d) => {
839
+ const s = e.get("highlightedValue");
840
+ if (s == null || l.current().type.includes("POINTER")) return;
841
+ const g = y(i), m = t("scrollToIndexFn");
842
+ if (m) {
843
+ const I = t("collection").indexOf(s);
844
+ m == null || m({
845
+ index: I,
846
+ immediate: d,
847
+ getElement: () => k(i, s)
848
+ });
842
849
  return;
843
850
  }
844
- ue(g, { rootEl: m, block: "nearest" });
851
+ const f = k(i, s);
852
+ ge(f, { rootEl: g, block: "nearest" });
845
853
  };
846
- return N(() => a(!0)), ie(() => R(i), {
854
+ return N(() => a(!0)), le(() => y(i), {
847
855
  defer: !0,
848
856
  attributes: ["data-activedescendant"],
849
857
  callback() {
@@ -854,14 +862,14 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
854
862
  },
855
863
  actions: {
856
864
  reposition({ context: e, prop: t, scope: i, event: l }) {
857
- const a = () => q(i);
858
- K(f(i), a, {
865
+ const a = () => j(i);
866
+ B(v(i), a, {
859
867
  ...t("positioning"),
860
868
  ...l.options,
861
869
  defer: !0,
862
870
  listeners: !1,
863
- onComplete(d) {
864
- e.set("currentPlacement", d.placement);
871
+ onComplete(c) {
872
+ e.set("currentPlacement", c.placement);
865
873
  }
866
874
  });
867
875
  },
@@ -890,23 +898,23 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
890
898
  },
891
899
  setInitialFocus({ scope: e }) {
892
900
  N(() => {
893
- const t = ce({
894
- root: R(e)
901
+ const t = ue({
902
+ root: y(e)
895
903
  });
896
904
  t == null || t.focus({ preventScroll: !0 });
897
905
  });
898
906
  },
899
907
  focusTriggerEl({ event: e, scope: t }) {
900
- j(e) && N(() => {
901
- const i = f(t);
908
+ J(e) && N(() => {
909
+ const i = v(t);
902
910
  i == null || i.focus({ preventScroll: !0 });
903
911
  });
904
912
  },
905
913
  selectHighlightedItem({ context: e, prop: t, event: i }) {
906
- var d;
914
+ var c;
907
915
  let l = i.value ?? e.get("highlightedValue");
908
- if (l == null) return;
909
- (d = t("onSelect")) == null || d({ value: l }), l = t("deselectable") && !t("multiple") && e.get("value").includes(l) ? null : l, e.set("value", (c) => l == null ? [] : t("multiple") ? B(c, l) : [l]);
916
+ if (l == null || !t("collection").has(l)) return;
917
+ (c = t("onSelect")) == null || c({ value: l }), l = t("deselectable") && !t("multiple") && e.get("value").includes(l) ? null : l, e.set("value", (d) => l == null ? [] : t("multiple") ? Y(d, l) : [l]);
910
918
  },
911
919
  highlightComputedFirstItem({ context: e, prop: t, computed: i }) {
912
920
  const l = t("collection"), a = i("hasSelectedItems") ? l.sort(e.get("value"))[0] : l.firstValue;
@@ -938,10 +946,10 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
938
946
  e.set("highlightedValue", null);
939
947
  },
940
948
  selectItem({ context: e, prop: t, event: i }) {
941
- var d;
942
- (d = t("onSelect")) == null || d({ value: i.value });
949
+ var c;
950
+ (c = t("onSelect")) == null || c({ value: i.value });
943
951
  const a = t("deselectable") && !t("multiple") && e.get("value").includes(i.value) ? null : i.value;
944
- e.set("value", (c) => a == null ? [] : t("multiple") ? B(c, a) : [a]);
952
+ e.set("value", (d) => a == null ? [] : t("multiple") ? Y(d, a) : [a]);
945
953
  },
946
954
  clearItem({ context: e, event: t }) {
947
955
  e.set("value", (i) => i.filter((l) => l !== t.value));
@@ -977,7 +985,15 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
977
985
  },
978
986
  scrollContentToTop({ prop: e, scope: t }) {
979
987
  var i, l;
980
- e("scrollToIndexFn") ? (i = e("scrollToIndexFn")) == null || i({ index: 0, immediate: !0 }) : (l = R(t)) == null || l.scrollTo(0, 0);
988
+ if (e("scrollToIndexFn")) {
989
+ const a = e("collection").firstValue;
990
+ (i = e("scrollToIndexFn")) == null || i({
991
+ index: 0,
992
+ immediate: !0,
993
+ getElement: () => k(t, a)
994
+ });
995
+ } else
996
+ (l = y(t)) == null || l.scrollTo(0, 0);
981
997
  },
982
998
  invokeOnOpen({ prop: e }) {
983
999
  var t;
@@ -988,7 +1004,7 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
988
1004
  (t = e("onOpenChange")) == null || t({ open: !1 });
989
1005
  },
990
1006
  syncSelectElement({ context: e, prop: t, scope: i }) {
991
- const l = k(i);
1007
+ const l = H(i);
992
1008
  if (l) {
993
1009
  if (e.get("value").length === 0 && !t("multiple")) {
994
1010
  l.selectedIndex = -1;
@@ -1003,12 +1019,10 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
1003
1019
  l && e.set("highlightedItem", l);
1004
1020
  const a = i.findMany(e.get("value"));
1005
1021
  e.set("selectedItems", a);
1006
- const d = i.stringifyItems(a);
1007
- e.set("valueAsString", d);
1008
1022
  },
1009
1023
  syncSelectedItems({ context: e, prop: t }) {
1010
- const i = t("collection"), l = e.get("selectedItems"), d = e.get("value").map((c) => l.find((g) => i.getItemValue(g) === c) || i.find(c));
1011
- e.set("selectedItems", d), e.set("valueAsString", i.stringifyItems(d));
1024
+ const i = t("collection"), l = e.get("selectedItems"), c = e.get("value").map((d) => l.find((g) => i.getItemValue(g) === d) || i.find(d));
1025
+ e.set("selectedItems", c);
1012
1026
  },
1013
1027
  syncHighlightedItem({ context: e, prop: t }) {
1014
1028
  const i = t("collection"), l = e.get("highlightedValue"), a = l ? i.find(l) : null;
@@ -1016,7 +1030,7 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
1016
1030
  },
1017
1031
  dispatchChangeEvent({ scope: e }) {
1018
1032
  queueMicrotask(() => {
1019
- const t = k(e);
1033
+ const t = H(e);
1020
1034
  if (!t) return;
1021
1035
  const i = e.getWin(), l = new i.Event("change", { bubbles: !0, composed: !0 });
1022
1036
  t.dispatchEvent(l);
@@ -1025,7 +1039,7 @@ var { and: C, not: v, or: Ce } = pe(), ke = Ie({
1025
1039
  }
1026
1040
  }
1027
1041
  });
1028
- function j(e) {
1042
+ function J(e) {
1029
1043
  var i;
1030
1044
  const t = e.restoreFocus ?? ((i = e.previousEvent) == null ? void 0 : i.restoreFocus);
1031
1045
  return t == null || !!t;
@@ -1067,8 +1081,8 @@ G()(["item", "persistFocus"]);
1067
1081
  G()(["id"]);
1068
1082
  G()(["htmlFor"]);
1069
1083
  export {
1070
- ve as anatomy,
1071
- Q as collection,
1084
+ fe as anatomy,
1085
+ X as collection,
1072
1086
  Ne as connect,
1073
- ke as machine
1087
+ He as machine
1074
1088
  };