@slotted/react 0.1.0-beta.1 → 0.1.0-beta.2

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 (91) hide show
  1. package/README.md +4 -0
  2. package/dist/{action-sheet-D8Glxl7l.js → action-sheet-DgwzC3iY.js} +1 -1
  3. package/dist/action-sheet.js +1 -1
  4. package/dist/{chart-BNzfIfQe.js → chart-Gb_P3Kdq.js} +344 -333
  5. package/dist/chart.js +1 -1
  6. package/dist/{column-manager-CNZ7Xk5_.js → column-manager-B7_a_jDK.js} +1 -1
  7. package/dist/column-manager.js +1 -1
  8. package/dist/{combobox-C46GRqAA.js → combobox-C66dNlMR.js} +176 -172
  9. package/dist/combobox.js +1 -1
  10. package/dist/dashboard-grid-CKdyO4j6.js +1043 -0
  11. package/dist/dashboard-grid.js +1 -1
  12. package/dist/{data-grid-BUgOJuGp.js → data-grid-rWMDNl-6.js} +2 -2
  13. package/dist/data-grid.js +1 -1
  14. package/dist/docs/AGENTS.snippet.md +10 -0
  15. package/dist/docs/event-calendar.json +7 -0
  16. package/dist/docs/event-calendar.md +1 -0
  17. package/dist/docs/guidelines/README.md +27 -0
  18. package/dist/docs/guidelines/async-feedback.md +108 -0
  19. package/dist/docs/guidelines/browsing.md +74 -0
  20. package/dist/docs/guidelines/builders.md +97 -0
  21. package/dist/docs/guidelines/composition.md +129 -0
  22. package/dist/docs/guidelines/conversations.md +59 -0
  23. package/dist/docs/guidelines/errors-and-conflicts.md +71 -0
  24. package/dist/docs/guidelines/forms.md +192 -0
  25. package/dist/docs/guidelines/index.md +121 -0
  26. package/dist/docs/guidelines/layout-alignment.md +95 -0
  27. package/dist/docs/guidelines/ledgers.md +45 -0
  28. package/dist/docs/guidelines/list-pages.md +165 -0
  29. package/dist/docs/guidelines/overviews.md +66 -0
  30. package/dist/docs/guidelines/own-elements.md +115 -0
  31. package/dist/docs/guidelines/reading-permissions.md +55 -0
  32. package/dist/docs/guidelines/record-pages.md +178 -0
  33. package/dist/docs/guidelines/reports.md +123 -0
  34. package/dist/docs/guidelines/shell-composition.md +94 -0
  35. package/dist/docs/guidelines/workspaces.md +46 -0
  36. package/dist/docs/index.md +12 -0
  37. package/dist/docs/progress-indicator.json +1 -2
  38. package/dist/docs/progress-indicator.md +2 -2
  39. package/dist/docs/skills/build-own-element/SKILL.md +90 -0
  40. package/dist/docs/skills/compose-screen/SKILL.md +76 -0
  41. package/dist/docs/skills/index.md +9 -0
  42. package/dist/docs/skills/review-screen/SKILL.md +70 -0
  43. package/dist/docs/skills/theme-app/SKILL.md +74 -0
  44. package/dist/docs/skills/waiting-states/SKILL.md +139 -0
  45. package/dist/docs/stat-card.json +1 -0
  46. package/dist/docs/stat-card.md +1 -1
  47. package/dist/docs/tabs.json +1 -4
  48. package/dist/docs/tabs.md +1 -1
  49. package/dist/docs/tokens.md +424 -0
  50. package/dist/{drawer-Ci3wuCVa.js → drawer-Dtospdqk.js} +1 -1
  51. package/dist/drawer.js +1 -1
  52. package/dist/{entity-picker-UGhbVwkC.js → entity-picker-Dm-y0RNE.js} +1 -1
  53. package/dist/entity-picker.js +1 -1
  54. package/dist/{event-calendar-BFdeGfC-.js → event-calendar-DYjVwTI6.js} +387 -386
  55. package/dist/event-calendar.js +1 -1
  56. package/dist/{filter-bar-b2Q9BZHf.js → filter-bar-Bh7cbqDE.js} +3 -3
  57. package/dist/filter-bar.js +1 -1
  58. package/dist/{import-export-center-D8xbCLWs.js → import-export-center-CkZ_Ar9w.js} +1 -1
  59. package/dist/import-export-center.js +1 -1
  60. package/dist/index.js +14 -14
  61. package/dist/{multi-select-CfzsvAeI.js → multi-select-B-tuIwAu.js} +226 -231
  62. package/dist/multi-select.js +1 -1
  63. package/dist/{select-UTwKjheK.js → select-hRFp8nCj.js} +128 -141
  64. package/dist/select.js +1 -1
  65. package/dist/styles.css +1 -1
  66. package/dist/{table-CzBIw9ng.js → table-Bd79IwDC.js} +1 -1
  67. package/dist/table.js +1 -1
  68. package/dist/types/chart/chart.d.ts.map +1 -1
  69. package/dist/types/combobox/combobox-collection.d.ts +1 -0
  70. package/dist/types/combobox/combobox-collection.d.ts.map +1 -1
  71. package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
  72. package/dist/types/combobox/combobox.d.ts.map +1 -1
  73. package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
  74. package/dist/types/dashboard-grid/dashboard-widget.d.ts +1 -1
  75. package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
  76. package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
  77. package/dist/types/event-calendar/event-calendar.d.ts +1 -1
  78. package/dist/types/event-calendar/event-calendar.d.ts.map +1 -1
  79. package/dist/types/event-calendar/event-calendar.types.d.ts +6 -0
  80. package/dist/types/event-calendar/event-calendar.types.d.ts.map +1 -1
  81. package/dist/types/menu/menu.types.d.ts +3 -1
  82. package/dist/types/menu/menu.types.d.ts.map +1 -1
  83. package/dist/types/multi-select/multi-select-collection.d.ts +0 -2
  84. package/dist/types/multi-select/multi-select-collection.d.ts.map +1 -1
  85. package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
  86. package/dist/types/multi-select/multi-select.d.ts.map +1 -1
  87. package/dist/types/select/select-collection.d.ts +0 -2
  88. package/dist/types/select/select-collection.d.ts.map +1 -1
  89. package/dist/types/select/select.d.ts.map +1 -1
  90. package/package.json +6 -6
  91. package/dist/dashboard-grid-nfhEewA4.js +0 -1005
package/dist/chart.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, r, t as i } from "./chart-BNzfIfQe.js";
1
+ import { a as e, i as t, n, r, t as i } from "./chart-Gb_P3Kdq.js";
2
2
  export { n as Chart, t as ChartDefaultsProvider, r as ChartTooltipContent, i as preloadChartEngine, e as useChartDefaults };
@@ -1,7 +1,7 @@
1
1
  import { n as e, t } from "./icon-T9Yt4tnm.js";
2
2
  import { _ as n, c as r, n as i, t as a } from "./menu-parts-BQej6eU9.js";
3
3
  import { r as o } from "./i18n-DpW8lqJ1.js";
4
- import { d as s, o as c, u as l } from "./drawer-Ci3wuCVa.js";
4
+ import { d as s, o as c, u as l } from "./drawer-Dtospdqk.js";
5
5
  import { n as u } from "./icon-button-TnvMhK4o.js";
6
6
  import { t as d } from "./checkbox-CwUOc-3u.js";
7
7
  import { t as f } from "./text-field-BktZbmzD.js";
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, r, t as i } from "./column-manager-CNZ7Xk5_.js";
1
+ import { a as e, i as t, n, r, t as i } from "./column-manager-B7_a_jDK.js";
2
2
  export { i as ColumnManager, t as ColumnManagerProvider, n as ColumnManagerRoot, r as ColumnManagerTrigger, e as useColumnManagerDefaults };
@@ -11,10 +11,10 @@ import { createPortalRoot as S, setPortalContainer as C } from "@slotted/core/po
11
11
  import { createDismissableLayer as w, pressOrigin as T } from "@slotted/core/dismissable-layer";
12
12
  import { createPositioner as ee } from "@slotted/core/positioner";
13
13
  import { comboboxMessages as E } from "@slotted/core/i18n";
14
- import { createFilter as te, moveIndex as D } from "@slotted/core/collection";
15
- import { matchRanges as O } from "@slotted/core/highlight";
14
+ import { createFilter as te, moveIndex as D, revealWithin as O } from "@slotted/core/collection";
15
+ import { matchRanges as k } from "@slotted/core/highlight";
16
16
  //#region src/combobox/combobox-defaults.tsx
17
- var k = {
17
+ var A = {
18
18
  align: "start",
19
19
  alignOffset: 0,
20
20
  allowsCustomValue: !1,
@@ -45,12 +45,12 @@ var k = {
45
45
  strategy: "absolute",
46
46
  variant: "outline",
47
47
  width: "content"
48
- }, A = c(k);
49
- function j() {
50
- return u(A);
48
+ }, j = c(A);
49
+ function M() {
50
+ return u(j);
51
51
  }
52
52
  function ne({ children: e, container: t, ...n }) {
53
- let r = j();
53
+ let r = M();
54
54
  d(() => {
55
55
  if (t !== void 0) return C(t), () => C(null);
56
56
  }, [t]);
@@ -86,7 +86,7 @@ function ne({ children: e, container: t, ...n }) {
86
86
  variant: n.variant ?? r.variant,
87
87
  width: n.width ?? r.width
88
88
  };
89
- return /* @__PURE__ */ y(A.Provider, {
89
+ return /* @__PURE__ */ y(j.Provider, {
90
90
  value: i,
91
91
  children: e
92
92
  });
@@ -94,119 +94,119 @@ function ne({ children: e, container: t, ...n }) {
94
94
  //#endregion
95
95
  //#region src/combobox/combobox.tsx
96
96
  var re = c(void 0);
97
- function M() {
97
+ function N() {
98
98
  let e = u(re);
99
99
  if (e === void 0) throw Error("ComboboxInput, ComboboxContent and every option have to be inside a Combobox.");
100
100
  return e;
101
101
  }
102
- var N = (e) => "options" in e;
102
+ var P = (e) => "options" in e;
103
103
  function ie(e) {
104
- return e === void 0 ? [] : e.flatMap((e) => N(e) ? e.options : [e]);
104
+ return e === void 0 ? [] : e.flatMap((e) => P(e) ? e.options : [e]);
105
105
  }
106
- function ae({ align: e, alignOffset: t, allowsCustomValue: n, autocomplete: o, autoHighlight: c, children: u, clearable: d, closeOnEscape: m, closeOnOutsidePress: v, closeOnSelect: b, collisionPadding: x, onCreate: S, defaultHighlightedValue: C = null, defaultInputValue: w = "", defaultOpen: T = !1, defaultValue: ee = null, disabled: D, filter: O, flip: k, form: A, fullWidth: ne, hideWhenDetached: M, highlightedValue: N, highlightMatch: ae, inputValue: P, invalid: oe, items: F, loading: I, locale: L, loop: R, messages: z, mount: se, name: ce, onHighlightedValueChange: le, onInputValueChange: ue, onInputReset: B, onLoadMore: de, onOpenChange: V, onValueChange: fe, open: H, openOn: pe, portal: me, readOnly: he, ref: ge, required: _e, shift: ve, side: ye, sideOffset: be, size: xe, strategy: Se, total: Ce, value: we, variant: Te, width: Ee }) {
107
- let U = j(), W = a(), De = i(E, z), Oe = r(), ke = L ?? Oe, Ae = f(), je = `${Ae}listbox`, Me = `${Ae}input`, [Ne, Pe] = _(T), [Fe, Ie] = _(ee), [Le, Re] = _(w), [ze, Be] = _(C), [Ve, He] = _(null), [Ue, We] = _(null), Ge = D ?? W?.disabled ?? U.disabled, Ke = he ?? W?.readOnly ?? U.readOnly, G = (H ?? Ne) && !Ge, K = we === void 0 ? Fe : we, q = P ?? Le, qe = N === void 0 ? ze : N, Je = g(G);
108
- G && (Je.current = !0);
106
+ function F({ align: e, alignOffset: t, allowsCustomValue: n, autocomplete: o, autoHighlight: c, children: u, clearable: d, closeOnEscape: m, closeOnOutsidePress: v, closeOnSelect: b, collisionPadding: x, onCreate: S, defaultHighlightedValue: C = null, defaultInputValue: w = "", defaultOpen: T = !1, defaultValue: ee = null, disabled: D, filter: k, flip: A, form: j, fullWidth: ne, hideWhenDetached: N, highlightedValue: P, highlightMatch: F, inputValue: ae, invalid: oe, items: I, loading: L, locale: R, loop: z, messages: B, mount: se, name: ce, onHighlightedValueChange: le, onInputValueChange: ue, onInputReset: V, onLoadMore: de, onOpenChange: fe, onValueChange: pe, open: H, openOn: me, portal: he, readOnly: ge, ref: _e, required: ve, shift: ye, side: be, sideOffset: xe, size: Se, strategy: Ce, total: we, value: Te, variant: Ee, width: De }) {
107
+ let U = M(), W = a(), Oe = i(E, B), ke = r(), Ae = R ?? ke, je = f(), Me = `${je}listbox`, Ne = `${je}input`, [Pe, Fe] = _(T), [Ie, Le] = _(ee), [Re, ze] = _(w), [Be, Ve] = _(C), [He, Ue] = _(null), [G, We] = _(null), Ge = D ?? W?.disabled ?? U.disabled, Ke = ge ?? W?.readOnly ?? U.readOnly, K = (H ?? Pe) && !Ge, q = Te === void 0 ? Ie : Te, J = ae ?? Re, qe = P === void 0 ? Be : P, Je = g(K);
108
+ K && (Je.current = !0);
109
109
  let Ye = g("none"), [Xe, Ze] = _(null), Qe = g(!1), $e = g(/* @__PURE__ */ new Map()), [et, tt] = _(0), nt = h(() => {
110
110
  let e = /* @__PURE__ */ new Map();
111
- for (let t of ie(F)) e.set(t.value, t.label);
111
+ for (let t of ie(I)) e.set(t.value, t.label);
112
112
  return e;
113
- }, [F]), rt = l((e, t) => {
113
+ }, [I]), rt = l((e, t) => {
114
114
  $e.current.get(e) !== t && ($e.current.set(e, t), tt((e) => e + 1));
115
- }, []), it = l((e) => nt.get(e) ?? $e.current.get(e), [nt, et]), at = l((e) => `${Ae}option-${encodeURIComponent(e)}`, [Ae]), J = q === (K === null ? void 0 : it(K)) ? "" : q, Y = h(() => te({ locale: ke }), [ke]), ot = l((e) => J === "" || O === null ? !0 : O === void 0 ? Y.contains(e, J) : O(e, J), [
116
- Y,
117
- O,
118
- J
119
- ]), X = g({
115
+ }, []), it = l((e) => nt.get(e) ?? $e.current.get(e), [nt, et]), at = l((e) => `${je}option-${encodeURIComponent(e)}`, [je]), Y = J === (q === null ? void 0 : it(q)) ? "" : J, X = h(() => te({ locale: Ae }), [Ae]), ot = l((e) => Y === "" || k === null ? !0 : k === void 0 ? X.contains(e, Y) : k(e, Y), [
116
+ X,
117
+ k,
118
+ Y
119
+ ]), Z = g({
120
120
  currentHighlighted: qe,
121
- currentInput: q,
122
- currentOpen: G,
123
- currentValue: K,
124
- highlightedValue: N,
125
- inputNode: Ve,
126
- inputValue: P,
121
+ currentInput: J,
122
+ currentOpen: K,
123
+ currentValue: q,
124
+ highlightedValue: P,
125
+ inputNode: He,
126
+ inputValue: ae,
127
127
  onHighlightedValueChange: le,
128
128
  onInputValueChange: ue,
129
129
  onCreate: S,
130
- onOpenChange: V,
131
- onValueChange: fe,
130
+ onOpenChange: fe,
131
+ onValueChange: pe,
132
132
  open: H,
133
- value: we
133
+ value: Te
134
134
  });
135
- X.current = {
135
+ Z.current = {
136
136
  currentHighlighted: qe,
137
- currentInput: q,
138
- currentOpen: G,
139
- currentValue: K,
140
- highlightedValue: N,
141
- inputNode: Ve,
142
- inputValue: P,
137
+ currentInput: J,
138
+ currentOpen: K,
139
+ currentValue: q,
140
+ highlightedValue: P,
141
+ inputNode: He,
142
+ inputValue: ae,
143
143
  onHighlightedValueChange: le,
144
144
  onInputValueChange: ue,
145
145
  onCreate: S,
146
- onOpenChange: V,
147
- onValueChange: fe,
146
+ onOpenChange: fe,
147
+ onValueChange: pe,
148
148
  open: H,
149
- value: we
149
+ value: Te
150
150
  };
151
- let Z = l((e, t, n) => {
152
- let r = X.current;
151
+ let st = l((e, t, n) => {
152
+ let r = Z.current;
153
153
  e !== r.currentOpen && s({
154
154
  controlled: r.open,
155
155
  initial: r.currentOpen,
156
156
  onRequest: (e) => r.onOpenChange?.(e.value, e)
157
- }).request(e, t, n) && (Pe(e), e || (Be(null), Ye.current = "none"));
158
- }, []), st = l((e, t, n) => {
159
- let r = X.current;
157
+ }).request(e, t, n) && (Fe(e), e || (Ve(null), Ye.current = "none"));
158
+ }, []), ct = l((e, t, n) => {
159
+ let r = Z.current;
160
160
  e !== r.currentHighlighted && s({
161
161
  controlled: r.highlightedValue,
162
162
  initial: r.currentHighlighted,
163
163
  onRequest: (e) => r.onHighlightedValueChange?.(e.value, e)
164
- }).request(e, t, n) && Be(e);
165
- }, []), ct = l((e) => {
164
+ }).request(e, t, n) && Ve(e);
165
+ }, []), lt = l((e) => {
166
166
  if (e !== "") {
167
- for (let [t, n] of nt) if (Y.equals(n, e)) return t;
168
- for (let [t, n] of $e.current) if (Y.equals(n, e)) return t;
167
+ for (let [t, n] of nt) if (X.equals(n, e)) return t;
168
+ for (let [t, n] of $e.current) if (X.equals(n, e)) return t;
169
169
  }
170
170
  }, [
171
171
  nt,
172
- Y,
172
+ X,
173
173
  et
174
174
  ]), Q = l((e, t, n) => {
175
- let r = X.current;
175
+ let r = Z.current;
176
176
  Ze(null), e !== r.currentInput && s({
177
177
  controlled: r.inputValue,
178
178
  initial: r.currentInput,
179
179
  onRequest: (e) => r.onInputValueChange?.(e.value, e)
180
- }).request(e, t, n) && Re(e);
180
+ }).request(e, t, n) && ze(e);
181
181
  }, []), $ = l((e, t, n) => {
182
- let r = X.current;
182
+ let r = Z.current;
183
183
  e !== r.currentValue && s({
184
184
  controlled: r.value,
185
185
  initial: r.currentValue,
186
186
  onRequest: (e) => r.onValueChange?.(e.value, e)
187
- }).request(e, t, n) && Ie(e);
188
- }, []), lt = g({
187
+ }).request(e, t, n) && Le(e);
188
+ }, []), ut = g({
189
189
  allowsCustomValue: !1,
190
- currentInput: q,
191
- currentValue: K,
190
+ currentInput: J,
191
+ currentValue: q,
192
192
  labelFor: it,
193
- onInputReset: B,
193
+ onInputReset: V,
194
194
  select: $,
195
195
  setInputValue: Q,
196
- valueForLabel: ct
196
+ valueForLabel: lt
197
197
  });
198
- lt.current = {
198
+ ut.current = {
199
199
  allowsCustomValue: n ?? U.allowsCustomValue,
200
- currentInput: q,
201
- currentValue: K,
200
+ currentInput: J,
201
+ currentValue: q,
202
202
  labelFor: it,
203
- onInputReset: B,
203
+ onInputReset: V,
204
204
  select: $,
205
205
  setInputValue: Q,
206
- valueForLabel: ct
206
+ valueForLabel: lt
207
207
  };
208
- let ut = l((e) => {
209
- let t = lt.current, n = t.currentInput, r = t.valueForLabel(n);
208
+ let dt = l((e) => {
209
+ let t = ut.current, n = t.currentInput, r = t.valueForLabel(n);
210
210
  if (r !== void 0) {
211
211
  r !== t.currentValue && t.select(r, "blur", e), t.setInputValue(t.labelFor(r) ?? n, "blur", e);
212
212
  return;
@@ -224,137 +224,137 @@ function ae({ align: e, alignOffset: t, allowsCustomValue: n, autocomplete: o, a
224
224
  reason: "blur",
225
225
  source: e
226
226
  });
227
- }, []), dt = l((e, t, n) => {
228
- X.current.onCreate?.(e, {
227
+ }, []), ft = l((e, t, n) => {
228
+ Z.current.onCreate?.(e, {
229
229
  reason: t,
230
230
  source: n
231
231
  });
232
- }, []), ft = l((e, t) => {
232
+ }, []), pt = l((e, t) => {
233
233
  $(null, e, t), Q("", e === "clear" ? "clear" : "programmatic", t);
234
234
  }, [$, Q]);
235
- p(ge, () => ({
236
- close: () => Z(!1, "programmatic"),
237
- focus: () => X.current.inputNode?.focus({ preventScroll: !0 }),
238
- open: () => Z(!0, "programmatic"),
235
+ p(_e, () => ({
236
+ close: () => st(!1, "programmatic"),
237
+ focus: () => Z.current.inputNode?.focus({ preventScroll: !0 }),
238
+ open: () => st(!0, "programmatic"),
239
239
  scrollToKey: (e) => {
240
- let t = Ue?.querySelector(`[data-part='item'][data-value="${CSS.escape(e)}"]`);
241
- typeof t?.scrollIntoView == "function" && t.scrollIntoView({ block: "nearest" });
240
+ let t = G?.querySelector(`[data-part='item'][data-value="${CSS.escape(e)}"]`);
241
+ t != null && G !== null && O(t, G);
242
242
  }
243
- }), [Ue, Z]);
244
- let pt = {
243
+ }), [G, st]);
244
+ let mt = {
245
245
  align: e ?? U.align,
246
246
  alignOffset: t ?? U.alignOffset,
247
247
  allowsCustomValue: n ?? U.allowsCustomValue,
248
248
  autocomplete: o ?? U.autocomplete,
249
249
  autoHighlight: c ?? U.autoHighlight,
250
- clear: ft,
250
+ clear: pt,
251
251
  clearable: d ?? U.clearable,
252
252
  closeOnEscape: m ?? U.closeOnEscape,
253
253
  closeOnOutsidePress: v ?? U.closeOnOutsidePress,
254
254
  closeOnSelect: b ?? U.closeOnSelect,
255
255
  collisionPadding: x ?? U.collisionPadding,
256
256
  completion: Xe,
257
- contentId: je,
258
- contentNode: Ue,
257
+ contentId: Me,
258
+ contentNode: G,
259
259
  canCreate: S !== void 0,
260
- create: dt,
260
+ create: ft,
261
261
  disabled: Ge,
262
262
  entry: Ye,
263
- flip: k ?? U.flip,
264
- form: A,
263
+ flip: A ?? U.flip,
264
+ form: j,
265
265
  fullWidth: ne ?? U.fullWidth,
266
- hideWhenDetached: M ?? U.hideWhenDetached,
266
+ hideWhenDetached: N ?? U.hideWhenDetached,
267
267
  highlighted: qe,
268
- highlightMatch: ae ?? U.highlightMatch,
269
- inputId: Me,
270
- inputNode: Ve,
271
- inputValue: q,
268
+ highlightMatch: F ?? U.highlightMatch,
269
+ inputId: Ne,
270
+ inputNode: He,
271
+ inputValue: J,
272
272
  invalid: oe ?? W?.invalid ?? U.invalid,
273
273
  labelFor: it,
274
- loading: I ?? U.loading,
275
- locale: ke,
276
- loop: R ?? U.loop,
274
+ loading: L ?? U.loading,
275
+ locale: Ae,
276
+ loop: z ?? U.loop,
277
277
  matches: ot,
278
278
  mount: se ?? U.mount,
279
279
  name: ce,
280
280
  onLoadMore: de,
281
- open: G,
282
- openOn: pe ?? U.openOn,
281
+ open: K,
282
+ openOn: me ?? U.openOn,
283
283
  optionId: at,
284
- portal: me ?? U.portal,
285
- query: J,
284
+ portal: he ?? U.portal,
285
+ query: Y,
286
286
  readOnly: Ke,
287
287
  registerLabel: rt,
288
- required: _e ?? W?.required ?? U.required,
288
+ required: ve ?? W?.required ?? U.required,
289
289
  seen: Je.current,
290
290
  select: $,
291
291
  setCompletion: Ze,
292
292
  setContentNode: We,
293
- setHighlighted: st,
294
- setInputNode: He,
293
+ setHighlighted: ct,
294
+ setInputNode: Ue,
295
295
  setInputValue: Q,
296
- setOpen: Z,
297
- settleInput: ut,
298
- shift: ve ?? U.shift,
299
- side: ye ?? U.side,
300
- sideOffset: be ?? U.sideOffset,
301
- size: xe ?? W?.size ?? U.size,
302
- strategy: Se ?? U.strategy,
303
- t: De,
304
- total: Ce,
305
- value: K,
306
- variant: Te ?? U.variant,
296
+ setOpen: st,
297
+ settleInput: dt,
298
+ shift: ye ?? U.shift,
299
+ side: be ?? U.side,
300
+ sideOffset: xe ?? U.sideOffset,
301
+ size: Se ?? W?.size ?? U.size,
302
+ strategy: Ce ?? U.strategy,
303
+ t: Oe,
304
+ total: we,
305
+ value: q,
306
+ variant: Ee ?? U.variant,
307
307
  wantsCompletion: Qe,
308
- width: Ee ?? U.width
308
+ width: De ?? U.width
309
309
  };
310
310
  return /* @__PURE__ */ y(re.Provider, {
311
- value: pt,
311
+ value: mt,
312
312
  children: u
313
313
  });
314
314
  }
315
315
  //#endregion
316
316
  //#region src/combobox/combobox-collection.ts
317
- var P = e(), oe = "[data-part='item']";
318
- function F(e) {
317
+ var ae = e(), oe = "[data-part='item']";
318
+ function I(e) {
319
319
  return e === null ? [] : [...e.querySelectorAll(oe)];
320
320
  }
321
- var I = (e) => e.dataset.value ?? "", L = (e) => e.dataset.disabled === void 0, R = (e) => e.dataset.textValue ?? e.querySelector("[data-part='label']")?.textContent?.trim() ?? e.textContent?.trim() ?? "";
322
- function z(e, t, n, r) {
323
- let i = F(e);
321
+ var L = (e) => e.dataset.value ?? "", R = (e) => e.dataset.disabled === void 0, z = (e) => e.dataset.textValue ?? e.querySelector("[data-part='label']")?.textContent?.trim() ?? e.textContent?.trim() ?? "";
322
+ function B(e, t, n, r) {
323
+ let i = I(e);
324
324
  if (i.length === 0) return null;
325
325
  let a = D({
326
- enabled: i.map(L),
327
- from: t === null ? -1 : i.findIndex((e) => I(e) === t),
326
+ enabled: i.map(R),
327
+ from: t === null ? -1 : i.findIndex((e) => L(e) === t),
328
328
  intent: n,
329
329
  loop: r
330
330
  });
331
- return a === -1 ? null : I(i[a]);
331
+ return a === -1 ? null : L(i[a]);
332
332
  }
333
333
  function se(e, t, n, r) {
334
334
  if (n === "none") return null;
335
335
  if (n === "selected") {
336
336
  if (t === null) return null;
337
- let n = F(e).find((e) => I(e) === t && L(e));
338
- return n === void 0 ? null : I(n);
337
+ let n = I(e).find((e) => L(e) === t && R(e));
338
+ return n === void 0 ? null : L(n);
339
339
  }
340
- return z(e, null, n, r);
340
+ return B(e, null, n, r);
341
341
  }
342
342
  function ce(e) {
343
- let t = F(e).find(L);
344
- return t === void 0 ? null : R(t);
343
+ let t = I(e).find(R);
344
+ return t === void 0 ? null : z(t);
345
345
  }
346
346
  function le(e, t) {
347
- let n = F(e).find((e) => R(e) === t);
348
- return n === void 0 ? null : I(n);
347
+ let n = I(e).find((e) => z(e) === t);
348
+ return n === void 0 ? null : L(n);
349
349
  }
350
350
  function ue(e, t) {
351
351
  if (e === null || t === null) return;
352
- let n = F(e).find((e) => I(e) === t);
353
- typeof n?.scrollIntoView == "function" && n.scrollIntoView({ block: "nearest" });
352
+ let n = I(e).find((e) => L(e) === t);
353
+ n !== void 0 && O(n, e);
354
354
  }
355
355
  //#endregion
356
356
  //#region src/combobox/combobox-parts.tsx
357
- function B(e, t) {
357
+ function V(e, t) {
358
358
  return (n) => {
359
359
  e?.(n), n.defaultPrevented || t(n);
360
360
  };
@@ -362,8 +362,8 @@ function B(e, t) {
362
362
  function de(e, ...t) {
363
363
  for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
364
364
  }
365
- function V({ ref: e, render: r, ...i }) {
366
- let o = M(), s = a(), [c, u] = _(null);
365
+ function fe({ ref: e, render: r, ...i }) {
366
+ let o = N(), s = a(), [c, u] = _(null);
367
367
  d(() => {
368
368
  o.setInputNode(c);
369
369
  }, [o, c]), m(() => {
@@ -374,7 +374,7 @@ function V({ ref: e, render: r, ...i }) {
374
374
  c
375
375
  ]);
376
376
  let f = (e, t) => {
377
- let n = z(o.contentNode, o.highlighted, e, o.loop);
377
+ let n = B(o.contentNode, o.highlighted, e, o.loop);
378
378
  n !== null && o.setHighlighted(n, "keyboard", t);
379
379
  }, p = (e) => {
380
380
  if (o.highlighted === null && o.completion !== null) {
@@ -385,7 +385,7 @@ function V({ ref: e, render: r, ...i }) {
385
385
  }
386
386
  }
387
387
  let t = o.highlighted;
388
- if (t !== null && fe(o.contentNode, t)) {
388
+ if (t !== null && pe(o.contentNode, t)) {
389
389
  o.create(t, "keyboard", e), o.setOpen(!1, "select", e);
390
390
  return;
391
391
  }
@@ -475,11 +475,11 @@ function V({ ref: e, render: r, ...i }) {
475
475
  "data-part": "input",
476
476
  disabled: o.disabled,
477
477
  id: i.id ?? s?.ids.control ?? o.inputId,
478
- onBlur: B(i.onBlur, w),
479
- onChange: B(i.onChange, x),
480
- onClick: B(i.onClick, C),
481
- onFocus: B(i.onFocus, S),
482
- onKeyDown: B(i.onKeyDown, g),
478
+ onBlur: V(i.onBlur, w),
479
+ onChange: V(i.onChange, x),
480
+ onClick: V(i.onClick, C),
481
+ onFocus: V(i.onFocus, S),
482
+ onKeyDown: V(i.onKeyDown, g),
483
483
  readOnly: o.readOnly,
484
484
  ref: te,
485
485
  required: o.required,
@@ -540,11 +540,11 @@ function V({ ref: e, render: r, ...i }) {
540
540
  children: A
541
541
  });
542
542
  }
543
- function fe(e, t) {
543
+ function pe(e, t) {
544
544
  return e !== null && e.querySelector(`[data-part='item'][data-value="${CSS.escape(t)}"]`)?.hasAttribute("data-create") === !0;
545
545
  }
546
546
  function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
547
- let o = M(), [s, c] = _(null), [l, u] = _(null), [f, p] = _(null), [h, v] = _("unmounted"), [C, T] = _(!1), [E, te] = _(0), D = g(null), O = g(null), k = g(o);
547
+ let o = N(), [s, c] = _(null), [l, u] = _(null), [f, p] = _(null), [h, v] = _("unmounted"), [C, T] = _(!1), [E, te] = _(0), D = g(null), O = g(null), k = g(o);
548
548
  k.current = o, d(() => {
549
549
  let e = x({
550
550
  present: k.current.open,
@@ -570,19 +570,19 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
570
570
  o.portal,
571
571
  A
572
572
  ]);
573
- let { align: j, alignOffset: ne, collisionPadding: re, flip: N, hideWhenDetached: ie, shift: ae, side: oe, sideOffset: L, strategy: R, width: z } = o;
573
+ let { align: j, alignOffset: M, collisionPadding: ne, flip: re, hideWhenDetached: P, shift: ie, side: F, sideOffset: oe, strategy: R, width: z } = o;
574
574
  if (d(() => {
575
575
  if (s === null || o.inputNode === null) return;
576
576
  let e = !0, t = o.inputNode.closest("[data-part='root']") ?? o.inputNode, n = ee(t, s, {
577
577
  align: j,
578
- alignOffset: ne,
579
- boundaryPadding: re,
580
- flip: N,
581
- hideWhenDetached: ie,
578
+ alignOffset: M,
579
+ boundaryPadding: ne,
580
+ flip: re,
581
+ hideWhenDetached: P,
582
582
  matchWidth: z === "anchor",
583
- shift: ae,
584
- side: oe,
585
- sideOffset: L,
583
+ shift: ie,
584
+ side: F,
585
+ sideOffset: oe,
586
586
  strategy: R
587
587
  });
588
588
  return n.update().then(() => {
@@ -592,15 +592,15 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
592
592
  };
593
593
  }, [
594
594
  j,
595
+ M,
595
596
  ne,
596
- re,
597
597
  o.inputNode,
598
- N,
599
- ie,
598
+ re,
599
+ P,
600
600
  s,
601
- ae,
601
+ ie,
602
+ F,
602
603
  oe,
603
- L,
604
604
  R,
605
605
  z
606
606
  ]), d(() => {
@@ -624,7 +624,7 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
624
624
  o.open,
625
625
  s
626
626
  ]), m(() => {
627
- let e = F(l).filter((e) => e.dataset.create === void 0).length;
627
+ let e = I(l).filter((e) => e.dataset.create === void 0).length;
628
628
  te((t) => t === e ? t : e);
629
629
  }), m(() => {
630
630
  let e = k.current;
@@ -634,7 +634,7 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
634
634
  t !== null && e.setHighlighted(t, "keyboard");
635
635
  return;
636
636
  }
637
- e.highlighted !== null && (F(l).some((t) => I(t) === e.highlighted) || e.setHighlighted(null, "keyboard"));
637
+ e.highlighted !== null && (I(l).some((t) => L(t) === e.highlighted) || e.setHighlighted(null, "keyboard"));
638
638
  }
639
639
  }, [
640
640
  o.open,
@@ -643,11 +643,15 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
643
643
  l
644
644
  ]), d(() => {
645
645
  ue(l, o.highlighted);
646
- }, [o.highlighted, l]), m(() => {
646
+ }, [
647
+ o.highlighted,
648
+ C,
649
+ l
650
+ ]), m(() => {
647
651
  let e = k.current;
648
652
  if (!e.wantsCompletion.current || l === null) return;
649
653
  e.wantsCompletion.current = !1;
650
- let t = pe(l, e.inputValue);
654
+ let t = me(l, e.inputValue);
651
655
  t !== null && t !== e.inputValue && e.setCompletion(t);
652
656
  }, [
653
657
  o.inputValue,
@@ -665,7 +669,7 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
665
669
  E,
666
670
  l
667
671
  ]), !A) return null;
668
- let ce = {
672
+ let B = {
669
673
  "data-align": j,
670
674
  ...o.open ? {} : { inert: !0 },
671
675
  ...o.open && C ? { "data-open": "" } : {},
@@ -673,8 +677,8 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
673
677
  "data-size": o.size,
674
678
  "data-ui": "combobox",
675
679
  "data-width": o.width
676
- }, le = i === void 0 ? o.loading ? o.t("loading") : E === 0 ? null : o.t("count", { count: E }) : i, B = /* @__PURE__ */ y("div", {
677
- ...ce,
680
+ }, ce = i === void 0 ? o.loading ? o.t("loading") : E === 0 ? null : o.t("count", { count: E }) : i, le = /* @__PURE__ */ y("div", {
681
+ ...B,
678
682
  ref: (e) => {
679
683
  c(e), de(e, n);
680
684
  },
@@ -732,25 +736,25 @@ function H({ children: e, empty: t, ref: n, render: r, status: i, ...a }) {
732
736
  "data-part": "status",
733
737
  ...o.loading ? { "data-loading": "" } : {},
734
738
  role: "status",
735
- children: le
739
+ children: ce
736
740
  })
737
741
  ]
738
742
  })
739
- }), V = r === void 0 ? B : r({
740
- ...ce,
743
+ }), V = r === void 0 ? le : r({
744
+ ...B,
741
745
  children: e
742
746
  });
743
- return f === null ? V : (0, P.createPortal)(V, f);
747
+ return f === null ? V : (0, ae.createPortal)(V, f);
744
748
  }
745
- function pe(e, t) {
749
+ function me(e, t) {
746
750
  if (t === "") return null;
747
751
  let n = ce(e);
748
752
  return n === null ? null : n.toLowerCase().startsWith(t.toLowerCase()) ? n : null;
749
753
  }
750
754
  //#endregion
751
755
  //#region src/combobox/combobox-items.tsx
752
- function me({ children: e, description: r, disabled: i = !1, icon: a, position: s, ref: c, textValue: l, value: u, ...f }) {
753
- let p = M(), [m, v] = _(null), x = g(null), S = l ?? (typeof e == "string" ? e : void 0);
756
+ function he({ children: e, description: r, disabled: i = !1, icon: a, position: s, ref: c, textValue: l, value: u, ...f }) {
757
+ let p = N(), [m, v] = _(null), x = g(null), S = l ?? (typeof e == "string" ? e : void 0);
754
758
  d(() => {
755
759
  if (m === null) return;
756
760
  let e = S ?? m.querySelector("[data-part='label']")?.textContent?.trim() ?? "";
@@ -763,7 +767,7 @@ function me({ children: e, description: r, disabled: i = !1, icon: a, position:
763
767
  ]);
764
768
  let C = h(() => {
765
769
  if (!p.highlightMatch || p.query === "" || S === void 0) return e;
766
- let t = O(S, p.query, { locale: p.locale });
770
+ let t = k(S, p.query, { locale: p.locale });
767
771
  return t.length === 0 ? e : /* @__PURE__ */ y(o, {
768
772
  ranges: t,
769
773
  text: S
@@ -823,8 +827,8 @@ function me({ children: e, description: r, disabled: i = !1, icon: a, position:
823
827
  ]
824
828
  });
825
829
  }
826
- function he({ children: e, label: t, ...n }) {
827
- let r = `${f()}group`, { query: i } = M(), [a, o] = _(null), [s, c] = _(!1);
830
+ function ge({ children: e, label: t, ...n }) {
831
+ let r = `${f()}group`, { query: i } = N(), [a, o] = _(null), [s, c] = _(!1);
828
832
  return d(() => {
829
833
  a !== null && c(a.querySelector("[data-part='item']") === null);
830
834
  }, [a, i]), /* @__PURE__ */ b("div", {
@@ -841,7 +845,7 @@ function he({ children: e, label: t, ...n }) {
841
845
  }), e]
842
846
  });
843
847
  }
844
- function ge(e) {
848
+ function _e(e) {
845
849
  return /* @__PURE__ */ y("div", {
846
850
  "data-part": "separator",
847
851
  ref: e.ref,
@@ -849,4 +853,4 @@ function ge(e) {
849
853
  });
850
854
  }
851
855
  //#endregion
852
- export { V as a, k as c, H as i, ne as l, me as n, ae as o, ge as r, M as s, he as t, j as u };
856
+ export { fe as a, A as c, H as i, ne as l, he as n, F as o, _e as r, N as s, ge as t, M as u };