@strapi/ui-primitives 1.7.5 → 1.7.7

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.
package/dist/index.js CHANGED
@@ -1,18 +1,19 @@
1
1
  import { jsx as d, jsxs as Ne, Fragment as Ae } from "react/jsx-runtime";
2
- import * as r from "react";
2
+ import * as l from "react";
3
3
  import { composeEventHandlers as T } from "@radix-ui/primitive";
4
+ import { composeEventHandlers as Rn } from "@radix-ui/primitive";
4
5
  import { useComposedRefs as _ } from "@radix-ui/react-compose-refs";
5
6
  import { createContextScope as Qe, createContext as et } from "@radix-ui/react-context";
6
7
  import { DismissableLayer as tt } from "@radix-ui/react-dismissable-layer";
7
8
  import { useFocusGuards as ot } from "@radix-ui/react-focus-guards";
8
9
  import { FocusScope as nt } from "@radix-ui/react-focus-scope";
9
- import { useId as ne } from "@radix-ui/react-id";
10
- import * as le from "@radix-ui/react-popper";
10
+ import { useId as oe } from "@radix-ui/react-id";
11
+ import * as re from "@radix-ui/react-popper";
11
12
  import { createPopperScope as rt } from "@radix-ui/react-popper";
12
13
  import { Portal as lt } from "@radix-ui/react-portal";
13
14
  import { Primitive as N } from "@radix-ui/react-primitive";
14
15
  import { useControllableState as ie } from "@radix-ui/react-use-controllable-state";
15
- import { useLayoutEffect as H } from "@radix-ui/react-use-layout-effect";
16
+ import { useLayoutEffect as B } from "@radix-ui/react-use-layout-effect";
16
17
  import { hideOthers as st } from "aria-hidden";
17
18
  import * as _e from "react-dom";
18
19
  import { RemoveScroll as ct } from "react-remove-scroll";
@@ -21,19 +22,19 @@ import { clamp as Ze } from "@radix-ui/number";
21
22
  import { createCollection as Rt } from "@radix-ui/react-collection";
22
23
  import { useDirection as Nt } from "@radix-ui/react-direction";
23
24
  import { useCallbackRef as At } from "@radix-ui/react-use-callback-ref";
24
- import { useCallbackRef as Rn } from "@radix-ui/react-use-callback-ref";
25
+ import { useCallbackRef as An } from "@radix-ui/react-use-callback-ref";
25
26
  import { usePrevious as _t } from "@radix-ui/react-use-previous";
26
27
  import { VisuallyHidden as Mt } from "@radix-ui/react-visually-hidden";
27
28
  let ye = /* @__PURE__ */ new Map();
28
- function Ot(n, s) {
29
- let e = n + (s ? Object.entries(s).sort((o, l) => o[0] < l[0] ? -1 : 1).join() : "");
29
+ function Ot(r, s) {
30
+ let e = r + (s ? Object.entries(s).sort((o, n) => o[0] < n[0] ? -1 : 1).join() : "");
30
31
  if (ye.has(e))
31
32
  return ye.get(e);
32
- let t = new Intl.Collator(n, s);
33
+ let t = new Intl.Collator(r, s);
33
34
  return ye.set(e, t), t;
34
35
  }
35
- function Me(n, s) {
36
- let e = Ot(n, {
36
+ function Me(r, s) {
37
+ let e = Ot(r, {
37
38
  usage: "search",
38
39
  ...s
39
40
  });
@@ -48,9 +49,9 @@ function Me(n, s) {
48
49
  if (o.length === 0)
49
50
  return !0;
50
51
  t = t.normalize("NFC"), o = o.normalize("NFC");
51
- let l = 0, i = o.length;
52
- for (; l + i <= t.length; l++) {
53
- let c = t.slice(l, l + i);
52
+ let n = 0, i = o.length;
53
+ for (; n + i <= t.length; n++) {
54
+ let c = t.slice(n, n + i);
54
55
  if (e.compare(o, c) === 0)
55
56
  return !0;
56
57
  }
@@ -58,84 +59,84 @@ function Me(n, s) {
58
59
  }
59
60
  };
60
61
  }
61
- const Dt = (n) => {
62
- const s = r.useRef();
63
- return r.useEffect(() => {
64
- s.current = n;
62
+ const Dt = (r) => {
63
+ const s = l.useRef();
64
+ return l.useEffect(() => {
65
+ s.current = r;
65
66
  }), s.current;
66
67
  };
67
- function kt(n) {
68
- const s = `${n}CollectionProvider`, [e, t] = Qe(s), [o, l] = e(s, {
68
+ function kt(r) {
69
+ const s = `${r}CollectionProvider`, [e, t] = Qe(s), [o, n] = e(s, {
69
70
  collectionRef: { current: null },
70
71
  itemMap: /* @__PURE__ */ new Map(),
71
72
  listeners: /* @__PURE__ */ new Set()
72
73
  }), i = (u) => {
73
- const { scope: m, children: S } = u, x = r.useRef(null), C = r.useRef(/* @__PURE__ */ new Map()).current, h = r.useRef(/* @__PURE__ */ new Set()).current;
74
- return /* @__PURE__ */ d(o, { scope: m, itemMap: C, collectionRef: x, listeners: h, children: S });
74
+ const { scope: m, children: S } = u, C = l.useRef(null), x = l.useRef(/* @__PURE__ */ new Map()).current, h = l.useRef(/* @__PURE__ */ new Set()).current;
75
+ return /* @__PURE__ */ d(o, { scope: m, itemMap: x, collectionRef: C, listeners: h, children: S });
75
76
  };
76
77
  i.displayName = s;
77
- const c = `${n}CollectionSlot`, a = r.forwardRef((u, m) => {
78
- const { scope: S, children: x } = u, C = l(c, S), h = _(m, C.collectionRef);
79
- return /* @__PURE__ */ d(Ie, { ref: h, children: x });
78
+ const c = `${r}CollectionSlot`, a = l.forwardRef((u, m) => {
79
+ const { scope: S, children: C } = u, x = n(c, S), h = _(m, x.collectionRef);
80
+ return /* @__PURE__ */ d(Ie, { ref: h, children: C });
80
81
  });
81
82
  a.displayName = c;
82
- const g = `${n}CollectionItemSlot`, f = "data-radix-collection-item", v = r.forwardRef((u, m) => {
83
- const { scope: S, children: x, ...C } = u, h = r.useRef(null), w = _(m, h), A = l(g, S);
84
- return r.useEffect(() => {
83
+ const g = `${r}CollectionItemSlot`, p = "data-radix-collection-item", v = l.forwardRef((u, m) => {
84
+ const { scope: S, children: C, ...x } = u, h = l.useRef(null), w = _(m, h), A = n(g, S);
85
+ return l.useEffect(() => {
85
86
  const V = Array.from(A.itemMap.values());
86
- return A.itemMap.set(h, { ref: h, ...C }), A.listeners.forEach((M) => M(Array.from(A.itemMap.values()), V)), () => {
87
+ return A.itemMap.set(h, { ref: h, ...x }), A.listeners.forEach((M) => M(Array.from(A.itemMap.values()), V)), () => {
87
88
  const M = Array.from(A.itemMap.values());
88
- A.itemMap.delete(h), A.listeners.forEach((E) => E(Array.from(A.itemMap.values()), M));
89
+ A.itemMap.delete(h), A.listeners.forEach((P) => P(Array.from(A.itemMap.values()), M));
89
90
  };
90
- }), /* @__PURE__ */ d(Ie, { [f]: "", ref: w, children: x });
91
+ }), /* @__PURE__ */ d(Ie, { [p]: "", ref: w, children: C });
91
92
  });
92
93
  v.displayName = g;
93
- function p(u) {
94
- const m = l(`${n}CollectionConsumer`, u), S = r.useCallback(() => {
95
- const C = m.collectionRef.current;
96
- if (!C)
94
+ function f(u) {
95
+ const m = n(`${r}CollectionConsumer`, u), S = l.useCallback(() => {
96
+ const x = m.collectionRef.current;
97
+ if (!x)
97
98
  return [];
98
- const h = Array.from(C.querySelectorAll(`[${f}]`));
99
+ const h = Array.from(x.querySelectorAll(`[${p}]`));
99
100
  return Array.from(m.itemMap.values()).sort(
100
101
  (V, M) => h.indexOf(V.ref.current) - h.indexOf(M.ref.current)
101
102
  );
102
- }, [m.collectionRef, m.itemMap]), x = r.useCallback(
103
- (C) => (m.listeners.add(C), () => m.listeners.delete(C)),
103
+ }, [m.collectionRef, m.itemMap]), C = l.useCallback(
104
+ (x) => (m.listeners.add(x), () => m.listeners.delete(x)),
104
105
  [m.listeners]
105
106
  );
106
- return { getItems: S, subscribe: x };
107
+ return { getItems: S, subscribe: C };
107
108
  }
108
109
  return [
109
110
  { Provider: i, Slot: a, ItemSlot: v },
110
- p,
111
+ f,
111
112
  t
112
113
  ];
113
114
  }
114
- const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (n) => !!(n.length === 1 && n.match(/\S| /)), it = "Combobox", [pe, xe] = kt(it), [Bt, Y] = et(it), Ht = ({ children: n }) => /* @__PURE__ */ d(le.Root, { children: /* @__PURE__ */ d(pe.Provider, { scope: void 0, children: n }) }), $t = (n) => {
115
+ const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (r) => !!(r.length === 1 && r.match(/\S| /)), it = "Combobox", [fe, Ce] = kt(it), [Bt, j] = et(it), Ht = ({ children: r }) => /* @__PURE__ */ d(re.Root, { children: /* @__PURE__ */ d(fe.Provider, { scope: void 0, children: r }) }), $t = (r) => {
115
116
  const {
116
117
  allowCustomValue: s = !1,
117
118
  autocomplete: e = "none",
118
119
  children: t,
119
120
  open: o,
120
- defaultOpen: l,
121
+ defaultOpen: n,
121
122
  onOpenChange: i,
122
123
  value: c,
123
124
  defaultValue: a,
124
125
  onValueChange: g,
125
- disabled: f,
126
+ disabled: p,
126
127
  required: v = !1,
127
- locale: p = "en-EN",
128
+ locale: f = "en-EN",
128
129
  onTextValueChange: u,
129
130
  textValue: m,
130
131
  defaultTextValue: S,
131
- filterValue: x,
132
- defaultFilterValue: C,
132
+ filterValue: C,
133
+ defaultFilterValue: x,
133
134
  onFilterValueChange: h
134
- } = n, [w, A] = r.useState(null), [V, M] = r.useState(null), [E, k] = r.useState(null), [$, G] = r.useState(null), [F = !1, O] = ie({
135
+ } = r, [w, A] = l.useState(null), [V, M] = l.useState(null), [P, k] = l.useState(null), [H, z] = l.useState(null), [$ = !1, O] = ie({
135
136
  prop: o,
136
- defaultProp: l,
137
+ defaultProp: n,
137
138
  onChange: i
138
- }), [L, B] = ie({
139
+ }), [F, L] = ie({
139
140
  prop: c,
140
141
  defaultProp: a,
141
142
  onChange: g
@@ -143,17 +144,17 @@ const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (n) => !
143
144
  prop: m,
144
145
  defaultProp: S,
145
146
  onChange: u
146
- }), [X, Z] = ie({
147
- prop: x,
148
- defaultProp: C,
147
+ }), [q, X] = ie({
148
+ prop: C,
149
+ defaultProp: x,
149
150
  onChange: h
150
- }), W = ne(), ue = r.useCallback(
151
- (z, se) => {
152
- const de = se.map((y) => y.ref.current), [J, ...ce] = de, [ee] = ce.slice(-1), b = $;
153
- for (const y of z) {
151
+ }), W = oe(), ue = l.useCallback(
152
+ (le, se) => {
153
+ const de = se.map((y) => y.ref.current), [Z, ...ce] = de, [Q] = ce.slice(-1), b = H;
154
+ for (const y of le) {
154
155
  if (y === b)
155
156
  return;
156
- if (y?.scrollIntoView({ block: "nearest" }), y === J && V && (V.scrollTop = 0), y === ee && V && (V.scrollTop = V.scrollHeight), G(y), e === "both") {
157
+ if (y?.scrollIntoView({ block: "nearest" }), y === Z && V && (V.scrollTop = 0), y === Q && V && (V.scrollTop = V.scrollHeight), z(y), e === "both") {
157
158
  const D = se.find((I) => I.ref.current === y);
158
159
  D && K(D.textValue);
159
160
  }
@@ -161,14 +162,14 @@ const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (n) => !
161
162
  return;
162
163
  }
163
164
  },
164
- [e, K, V, $]
165
+ [e, K, V, H]
165
166
  );
166
- return r.useEffect(() => {
167
- e !== "both" && G(null);
168
- }, [U, e]), r.useEffect(() => {
169
- if (E && w)
170
- return st([E, w]);
171
- }, [E, w]), /* @__PURE__ */ d(Ht, { children: /* @__PURE__ */ d(
167
+ return l.useEffect(() => {
168
+ e !== "both" && z(null);
169
+ }, [U, e]), l.useEffect(() => {
170
+ if (P && w)
171
+ return st([P, w]);
172
+ }, [P, w]), /* @__PURE__ */ d(Ht, { children: /* @__PURE__ */ d(
172
173
  Bt,
173
174
  {
174
175
  allowCustomValue: s,
@@ -177,54 +178,71 @@ const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (n) => !
177
178
  trigger: w,
178
179
  onTriggerChange: A,
179
180
  contentId: W,
180
- value: L,
181
- onValueChange: B,
182
- open: F,
181
+ value: F,
182
+ onValueChange: L,
183
+ open: $,
183
184
  onOpenChange: O,
184
- disabled: f,
185
- locale: p,
185
+ disabled: p,
186
+ locale: f,
186
187
  focusFirst: ue,
187
188
  textValue: U,
188
189
  onTextValueChange: K,
189
190
  onViewportChange: M,
190
191
  onContentChange: k,
191
- visuallyFocussedItem: $,
192
- filterValue: X,
193
- onFilterValueChange: Z,
194
- onVisuallyFocussedItemChange: G,
192
+ visuallyFocussedItem: H,
193
+ filterValue: q,
194
+ onFilterValueChange: X,
195
+ onVisuallyFocussedItemChange: z,
196
+ children: t
197
+ }
198
+ ) });
199
+ }, Ut = "ComboboxTrigger", Kt = l.forwardRef((r, s) => {
200
+ const { ...e } = r, t = j(Ut), o = () => {
201
+ t.disabled || t.onOpenChange(!0);
202
+ };
203
+ return /* @__PURE__ */ d(re.Anchor, { asChild: !0, children: /* @__PURE__ */ d(
204
+ nt,
205
+ {
206
+ asChild: !0,
207
+ trapped: t.open,
208
+ onMountAutoFocus: (n) => {
209
+ n.preventDefault();
210
+ },
211
+ onUnmountAutoFocus: (n) => {
212
+ t.trigger?.focus({ preventScroll: !0 }), document.getSelection()?.empty(), n.preventDefault();
213
+ },
195
214
  children: /* @__PURE__ */ d(
196
- nt,
215
+ "div",
197
216
  {
198
- trapped: F,
199
- onMountAutoFocus: (z) => {
200
- z.preventDefault();
201
- },
202
- onUnmountAutoFocus: (z) => {
203
- w?.focus({ preventScroll: !0 }), document.getSelection()?.empty(), z.preventDefault();
204
- },
205
- children: t
217
+ ref: s,
218
+ "data-disabled": t.disabled ? "" : void 0,
219
+ ...e,
220
+ onClick: T(e.onClick, () => {
221
+ t.trigger?.focus();
222
+ }),
223
+ onPointerDown: T(e.onPointerDown, (n) => {
224
+ const i = n.target;
225
+ i.hasPointerCapture(n.pointerId) && i.releasePointerCapture(n.pointerId), (i.closest("button") ?? i.closest("div")) === n.currentTarget && n.button === 0 && n.ctrlKey === !1 && (o(), t.trigger?.focus());
226
+ })
206
227
  }
207
228
  )
208
229
  }
209
230
  ) });
210
- }, Ut = "ComboboxTrigger", Kt = r.forwardRef((n, s) => {
211
- const { ...e } = n, t = Y(Ut);
212
- return /* @__PURE__ */ d(le.Anchor, { asChild: !0, children: /* @__PURE__ */ d("div", { ref: s, "data-disabled": t.disabled ? "" : void 0, ...e }) });
213
- }), at = "ComboboxInput", Wt = r.forwardRef((n, s) => {
214
- const e = Y(at), t = r.useRef(null), { getItems: o } = xe(void 0), { startsWith: l } = Me(e.locale, { sensitivity: "base" }), i = e.disabled, c = _(t, s, e.onTriggerChange), a = () => {
231
+ }), at = "ComboboxInput", Wt = l.forwardRef((r, s) => {
232
+ const e = j(at), t = l.useRef(null), { getItems: o } = Ce(void 0), { startsWith: n } = Me(e.locale, { sensitivity: "base" }), i = e.disabled, c = _(t, s, e.onTriggerChange), a = () => {
215
233
  i || e.onOpenChange(!0);
216
234
  }, g = Dt(e.filterValue);
217
- return H(() => {
218
- const f = setTimeout(() => {
235
+ return B(() => {
236
+ const p = setTimeout(() => {
219
237
  if (e.textValue === "" || e.textValue === void 0 || e.filterValue === "" || e.filterValue === void 0)
220
238
  return;
221
239
  const v = o().find(
222
- (u) => u.type === "option" && l(u.textValue, e.textValue)
223
- ), p = vo(g ?? "", e.filterValue);
224
- v && !e.visuallyFocussedItem && p === e.filterValue.length && t.current.setSelectionRange(e.filterValue.length, e.textValue.length);
240
+ (u) => u.type === "option" && n(u.textValue, e.textValue)
241
+ ), f = vo(g ?? "", e.filterValue);
242
+ v && !e.visuallyFocussedItem && f === e.filterValue.length && t.current?.setSelectionRange(e.filterValue.length, e.textValue.length);
225
243
  });
226
- return () => clearTimeout(f);
227
- }, [e.textValue, e.filterValue, l, e.visuallyFocussedItem, o, g]), /* @__PURE__ */ d(
244
+ return () => clearTimeout(p);
245
+ }, [e.textValue, e.filterValue, n, e.visuallyFocussedItem, o, g]), /* @__PURE__ */ d(
228
246
  "input",
229
247
  {
230
248
  type: "text",
@@ -240,84 +258,80 @@ const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (n) => !
240
258
  "data-disabled": i ? "" : void 0,
241
259
  "data-placeholder": e.textValue === void 0 ? "" : void 0,
242
260
  value: e.textValue ?? "",
243
- ...n,
261
+ ...r,
244
262
  ref: c,
245
- onClick: T(n.onClick, (f) => {
246
- f.currentTarget.focus();
247
- }),
248
- onPointerDown: T(n.onPointerDown, (f) => {
249
- f.button === 0 && f.ctrlKey === !1 && (a(), f.currentTarget.focus());
250
- }),
251
- onKeyDown: T(n.onKeyDown, (f) => {
252
- if (["ArrowUp", "ArrowDown", "Home", "End"].includes(f.key))
263
+ onKeyDown: T(r.onKeyDown, (p) => {
264
+ if (["ArrowUp", "ArrowDown", "Home", "End"].includes(p.key))
253
265
  setTimeout(() => {
254
- let p = o().filter((u) => !u.disabled).map((u) => u.ref.current);
255
- if (["ArrowUp", "End"].includes(f.key) && (p = p.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(f.key)) {
256
- const u = e.visuallyFocussedItem ?? f.target;
257
- let m = p.indexOf(u);
258
- m === p.length - 1 && (m = -1), p = p.slice(m + 1);
266
+ let f = o().filter((u) => !u.disabled).map((u) => u.ref.current);
267
+ if (["ArrowUp", "End"].includes(p.key) && (f = f.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(p.key)) {
268
+ const u = e.visuallyFocussedItem ?? p.target;
269
+ let m = f.indexOf(u);
270
+ m === f.length - 1 && (m = -1), f = f.slice(m + 1);
259
271
  }
260
- if (["ArrowDown"].includes(f.key) && e.autocomplete === "both" && p.length > 1) {
261
- const [u, ...m] = p, S = o().find((x) => x.ref.current === u).textValue;
262
- e.textValue === S && (p = m);
272
+ if (["ArrowDown"].includes(p.key) && e.autocomplete === "both" && f.length > 1) {
273
+ const [u, ...m] = f, S = o().find((C) => C.ref.current === u).textValue;
274
+ e.textValue === S && (f = m);
263
275
  }
264
- e.focusFirst(p, o());
265
- }), f.preventDefault();
266
- else if (["Escape"].includes(f.key))
267
- e.open ? e.onOpenChange(!1) : (e.onValueChange(void 0), e.onTextValueChange("")), f.preventDefault();
268
- else if (Lt.includes(f.key)) {
276
+ e.focusFirst(f, o());
277
+ }), p.preventDefault();
278
+ else if (["Tab"].includes(p.key) && e.open)
279
+ p.preventDefault();
280
+ else if (["Escape"].includes(p.key))
281
+ e.open ? e.onOpenChange(!1) : (e.onValueChange(void 0), e.onTextValueChange("")), p.preventDefault();
282
+ else if (Lt.includes(p.key)) {
269
283
  if (e.visuallyFocussedItem) {
270
- const v = o().find((p) => p.ref.current === e.visuallyFocussedItem);
284
+ const v = o().find((f) => f.ref.current === e.visuallyFocussedItem);
271
285
  v && (e.onValueChange(v.value), e.onTextValueChange(v.textValue), e.autocomplete === "both" && e.onFilterValueChange(v.textValue), v.ref.current?.click());
272
286
  } else {
273
287
  const v = o().find(
274
- (p) => p.type === "option" && !p.disabled && p.textValue === e.textValue
288
+ (f) => f.type === "option" && !f.disabled && f.textValue === e.textValue
275
289
  );
276
290
  v && (e.onValueChange(v.value), e.onTextValueChange(v.textValue), e.autocomplete === "both" && e.onFilterValueChange(v.textValue), v.ref.current?.click());
277
291
  }
278
- e.onOpenChange(!1), f.preventDefault();
292
+ e.onOpenChange(!1), p.preventDefault();
279
293
  } else
280
294
  e.onVisuallyFocussedItemChange(null);
281
295
  }),
282
- onChange: T(n.onChange, (f) => {
283
- e.onTextValueChange(f.currentTarget.value), e.autocomplete === "both" && e.onFilterValueChange(f.currentTarget.value);
296
+ onChange: T(r.onChange, (p) => {
297
+ e.onTextValueChange(p.currentTarget.value), e.autocomplete === "both" && e.onFilterValueChange(p.currentTarget.value);
284
298
  }),
285
- onKeyUp: T(n.onKeyUp, (f) => {
286
- !e.open && (Je(f.key) || ["ArrowUp", "ArrowDown", "Home", "End", "Backspace"].includes(f.key)) && a(), setTimeout(() => {
287
- if (e.autocomplete === "both" && Je(f.key) && e.filterValue !== void 0) {
288
- const v = e.filterValue, p = o().find((u) => l(u.textValue, v));
289
- p && e.onTextValueChange(p.textValue);
299
+ onKeyUp: T(r.onKeyUp, (p) => {
300
+ !e.open && (Je(p.key) || ["ArrowUp", "ArrowDown", "Home", "End", "Backspace"].includes(p.key)) && a(), setTimeout(() => {
301
+ if (e.autocomplete === "both" && Je(p.key) && e.filterValue !== void 0) {
302
+ const v = e.filterValue, f = o().find((u) => n(u.textValue, v));
303
+ f && e.onTextValueChange(f.textValue);
290
304
  }
291
305
  });
292
306
  }),
293
- onBlur: T(n.onBlur, () => {
307
+ onBlur: T(r.onBlur, () => {
294
308
  e.onVisuallyFocussedItemChange(null);
295
- const [f] = o().filter(
296
- (p) => p.textValue === e.textValue && p.type === "option"
309
+ const [p] = o().filter(
310
+ (f) => f.textValue === e.textValue && f.type === "option"
297
311
  );
298
312
  if (e.allowCustomValue) {
299
- f && (e.onValueChange(f.value), e.autocomplete === "both" && e.onFilterValueChange(f.textValue));
313
+ p && (e.onValueChange(p.value), e.autocomplete === "both" && e.onFilterValueChange(p.textValue));
300
314
  return;
301
315
  }
302
- const [v] = o().filter((p) => p.value === e.value && p.type === "option");
303
- f ? e.onValueChange(f.value) : v && e.textValue !== "" ? (e.onTextValueChange(v.textValue), e.autocomplete === "both" && e.onFilterValueChange(v.textValue)) : (e.onValueChange(void 0), e.onTextValueChange(""));
316
+ const [v] = o().filter((f) => f.value === e.value && f.type === "option");
317
+ p ? e.onValueChange(p.value) : v && e.textValue !== "" ? (e.onTextValueChange(v.textValue), e.autocomplete === "both" && e.onFilterValueChange(v.textValue)) : (e.onValueChange(void 0), e.onTextValueChange(""));
304
318
  })
305
319
  }
306
320
  );
307
- }), zt = r.forwardRef((n, s) => {
308
- const { children: e, ...t } = n, o = Y(at), l = o.disabled, i = () => {
309
- l || (o.onOpenChange(!0), o.trigger?.focus());
321
+ }), zt = l.forwardRef((r, s) => {
322
+ const { children: e, ...t } = r, o = j(at), n = o.disabled, i = () => {
323
+ n || (o.onOpenChange(!0), o.trigger?.focus());
310
324
  };
311
325
  return /* @__PURE__ */ d(
312
326
  N.button,
313
327
  {
314
328
  "aria-hidden": !0,
315
329
  type: "button",
316
- "aria-disabled": l,
330
+ "aria-disabled": n,
317
331
  "aria-controls": o.contentId,
318
332
  "aria-expanded": o.open,
319
- disabled: l,
320
- "data-disabled": l ? "" : void 0,
333
+ disabled: n,
334
+ "data-disabled": n ? "" : void 0,
321
335
  ...t,
322
336
  tabIndex: -1,
323
337
  ref: s,
@@ -333,24 +347,24 @@ const Ft = [" ", "Enter", "ArrowUp", "ArrowDown"], Lt = ["Enter"], Je = (n) => !
333
347
  children: e || "▼"
334
348
  }
335
349
  );
336
- }), Gt = "ComboboxPortal", ut = (n) => /* @__PURE__ */ d(lt, { asChild: !0, ...n });
350
+ }), Gt = "ComboboxPortal", ut = (r) => /* @__PURE__ */ d(lt, { asChild: !0, ...r });
337
351
  ut.displayName = Gt;
338
- const dt = "ComboboxContent", jt = r.forwardRef((n, s) => {
339
- const e = Y(dt), [t, o] = r.useState();
340
- if (H(() => {
352
+ const dt = "ComboboxContent", jt = l.forwardRef((r, s) => {
353
+ const e = j(dt), [t, o] = l.useState();
354
+ if (B(() => {
341
355
  o(new DocumentFragment());
342
356
  }, []), !e.open) {
343
- const l = t;
344
- return l ? _e.createPortal(
345
- /* @__PURE__ */ d(pe.Slot, { scope: void 0, children: /* @__PURE__ */ d("div", { children: n.children }) }),
346
- l
357
+ const n = t;
358
+ return n ? _e.createPortal(
359
+ /* @__PURE__ */ d(fe.Slot, { scope: void 0, children: /* @__PURE__ */ d("div", { children: r.children }) }),
360
+ n
347
361
  ) : null;
348
362
  }
349
- return /* @__PURE__ */ d(qt, { ...n, ref: s });
350
- }), Yt = 10, qt = r.forwardRef(
351
- (n, s) => {
352
- const { onEscapeKeyDown: e, onPointerDownOutside: t, ...o } = n, l = Y(dt), i = _(s, (a) => l.onContentChange(a)), { onOpenChange: c } = l;
353
- return ot(), r.useEffect(() => {
363
+ return /* @__PURE__ */ d(qt, { ...r, ref: s });
364
+ }), Yt = 10, qt = l.forwardRef(
365
+ (r, s) => {
366
+ const { onEscapeKeyDown: e, onPointerDownOutside: t, ...o } = r, n = j(dt), i = _(s, (a) => n.onContentChange(a)), { onOpenChange: c } = n;
367
+ return ot(), l.useEffect(() => {
354
368
  const a = () => {
355
369
  c(!1);
356
370
  };
@@ -367,14 +381,14 @@ const dt = "ComboboxContent", jt = r.forwardRef((n, s) => {
367
381
  a.preventDefault();
368
382
  },
369
383
  onDismiss: () => {
370
- l.onOpenChange(!1), l.trigger?.focus({ preventScroll: !0 });
384
+ n.onOpenChange(!1), n.trigger?.focus({ preventScroll: !0 });
371
385
  },
372
386
  children: /* @__PURE__ */ d(
373
387
  Xt,
374
388
  {
375
389
  role: "listbox",
376
- id: l.contentId,
377
- "data-state": l.open ? "open" : "closed",
390
+ id: n.contentId,
391
+ "data-state": n.open ? "open" : "closed",
378
392
  onContextMenu: (a) => a.preventDefault(),
379
393
  ...o,
380
394
  ref: i,
@@ -391,11 +405,11 @@ const dt = "ComboboxContent", jt = r.forwardRef((n, s) => {
391
405
  }
392
406
  ) });
393
407
  }
394
- ), Xt = r.forwardRef(
395
- (n, s) => {
396
- const { align: e = "start", collisionPadding: t = Yt, ...o } = n;
408
+ ), Xt = l.forwardRef(
409
+ (r, s) => {
410
+ const { align: e = "start", collisionPadding: t = Yt, ...o } = r;
397
411
  return /* @__PURE__ */ d(
398
- le.Content,
412
+ re.Content,
399
413
  {
400
414
  ...o,
401
415
  ref: s,
@@ -414,8 +428,8 @@ const dt = "ComboboxContent", jt = r.forwardRef((n, s) => {
414
428
  }
415
429
  );
416
430
  }
417
- ), Zt = "ComboboxViewport", Jt = r.forwardRef((n, s) => {
418
- const e = Y(Zt), t = _(s, e.onViewportChange);
431
+ ), Zt = "ComboboxViewport", Jt = l.forwardRef((r, s) => {
432
+ const e = j(Zt), t = _(s, e.onViewportChange);
419
433
  return /* @__PURE__ */ Ne(Ae, { children: [
420
434
  /* @__PURE__ */ d(
421
435
  "style",
@@ -425,12 +439,12 @@ const dt = "ComboboxContent", jt = r.forwardRef((n, s) => {
425
439
  }
426
440
  }
427
441
  ),
428
- /* @__PURE__ */ d(pe.Slot, { scope: void 0, children: /* @__PURE__ */ d(
442
+ /* @__PURE__ */ d(fe.Slot, { scope: void 0, children: /* @__PURE__ */ d(
429
443
  N.div,
430
444
  {
431
445
  "data-radix-combobox-viewport": "",
432
446
  role: "presentation",
433
- ...n,
447
+ ...r,
434
448
  ref: t,
435
449
  style: {
436
450
  // we use position: 'relative' here on the `viewport` so that when we call
@@ -439,76 +453,76 @@ const dt = "ComboboxContent", jt = r.forwardRef((n, s) => {
439
453
  position: "relative",
440
454
  flex: 1,
441
455
  overflow: "auto",
442
- ...n.style
456
+ ...r.style
443
457
  }
444
458
  }
445
459
  ) })
446
460
  ] });
447
- }), ft = "ComboboxItem", [Qt, pt] = et(ft), mt = r.forwardRef((n, s) => {
448
- const { value: e, disabled: t = !1, textValue: o, ...l } = n, i = r.useRef(null), c = _(s, i), { getItems: a } = xe(void 0), {
461
+ }), pt = "ComboboxItem", [Qt, ft] = et(pt), mt = l.forwardRef((r, s) => {
462
+ const { value: e, disabled: t = !1, textValue: o, ...n } = r, i = l.useRef(null), c = _(s, i), { getItems: a } = Ce(void 0), {
449
463
  onTextValueChange: g,
450
- textValue: f,
464
+ textValue: p,
451
465
  visuallyFocussedItem: v,
452
- ...p
453
- } = Y(ft), u = ne(), [m, S] = r.useState(o ?? ""), x = r.useMemo(() => v === a().find((M) => M.ref.current === i.current)?.ref.current, [a, v]), C = p.value === e, h = () => {
454
- t || (p.onValueChange(e), g(m), p.onOpenChange(!1), p.autocomplete === "both" && p.onFilterValueChange(m), p.trigger?.focus({ preventScroll: !0 }));
455
- }, { startsWith: w } = Me(p.locale, { sensitivity: "base" }), A = r.useCallback((M) => {
456
- S((E) => E || (M?.textContent ?? "").trim());
466
+ ...f
467
+ } = j(pt), u = oe(), [m, S] = l.useState(o ?? ""), C = l.useMemo(() => v === a().find((M) => M.ref.current === i.current)?.ref.current, [a, v]), x = f.value === e, h = () => {
468
+ t || (f.onValueChange(e), g(m), f.onOpenChange(!1), f.autocomplete === "both" && f.onFilterValueChange(m), f.trigger?.focus({ preventScroll: !0 }));
469
+ }, { startsWith: w } = Me(f.locale, { sensitivity: "base" }), A = l.useCallback((M) => {
470
+ S((P) => P || (M?.textContent ?? "").trim());
457
471
  }, []);
458
- r.useEffect(() => {
459
- C && f === void 0 && m !== "" && g(m);
460
- }, [m, C, f, g]);
461
- const V = ne();
462
- return p.autocomplete === "list" && m && f && !w(m, f) || p.autocomplete === "both" && m && p.filterValue && !w(m, p.filterValue) ? null : /* @__PURE__ */ d(Qt, { textId: u, onTextValueChange: A, isSelected: C, children: /* @__PURE__ */ d(pe.ItemSlot, { scope: void 0, value: e, textValue: m, disabled: t, type: "option", children: /* @__PURE__ */ d(
472
+ l.useEffect(() => {
473
+ x && p === void 0 && m !== "" && g(m);
474
+ }, [m, x, p, g]);
475
+ const V = oe();
476
+ return f.autocomplete === "list" && m && p && !w(m, p) || f.autocomplete === "both" && m && f.filterValue && !w(m, f.filterValue) ? null : /* @__PURE__ */ d(Qt, { textId: u, onTextValueChange: A, isSelected: x, children: /* @__PURE__ */ d(fe.ItemSlot, { scope: void 0, value: e, textValue: m, disabled: t, type: "option", children: /* @__PURE__ */ d(
463
477
  N.div,
464
478
  {
465
479
  role: "option",
466
480
  "aria-labelledby": u,
467
- "data-highlighted": x ? "" : void 0,
468
- "aria-selected": C && x,
469
- "data-state": C ? "checked" : "unchecked",
481
+ "data-highlighted": C ? "" : void 0,
482
+ "aria-selected": x && C,
483
+ "data-state": x ? "checked" : "unchecked",
470
484
  "aria-disabled": t || void 0,
471
485
  "data-disabled": t ? "" : void 0,
472
486
  tabIndex: t ? void 0 : -1,
473
- ...l,
487
+ ...n,
474
488
  id: V,
475
489
  ref: c,
476
- onPointerUp: T(l.onPointerUp, h)
490
+ onPointerUp: T(n.onPointerUp, h)
477
491
  }
478
492
  ) }) });
479
- }), eo = "ComboboxItemText", to = r.forwardRef((n, s) => {
480
- const { className: e, style: t, ...o } = n, l = pt(eo), i = _(s, l.onTextValueChange);
481
- return /* @__PURE__ */ d(N.span, { id: l.textId, ...o, ref: i });
482
- }), oo = "ComboboxItemIndicator", no = r.forwardRef((n, s) => {
483
- const { isSelected: e } = pt(oo);
484
- return e ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...n, ref: s }) : null;
485
- }), ht = "ComboboxNoValueFound", ro = r.forwardRef((n, s) => {
486
- const { textValue: e = "", locale: t } = Y(ht), [o, l] = r.useState([]), { subscribe: i } = xe(void 0), { startsWith: c } = Me(t, { sensitivity: "base" });
487
- return r.useEffect(() => {
493
+ }), eo = "ComboboxItemText", to = l.forwardRef((r, s) => {
494
+ const { className: e, style: t, ...o } = r, n = ft(eo), i = _(s, n.onTextValueChange);
495
+ return /* @__PURE__ */ d(N.span, { id: n.textId, ...o, ref: i });
496
+ }), oo = "ComboboxItemIndicator", no = l.forwardRef((r, s) => {
497
+ const { isSelected: e } = ft(oo);
498
+ return e ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...r, ref: s }) : null;
499
+ }), ht = "ComboboxNoValueFound", ro = l.forwardRef((r, s) => {
500
+ const { textValue: e = "", locale: t } = j(ht), [o, n] = l.useState([]), { subscribe: i } = Ce(void 0), { startsWith: c } = Me(t, { sensitivity: "base" });
501
+ return l.useEffect(() => {
488
502
  const a = i((g) => {
489
- l(g);
503
+ n(g);
490
504
  });
491
505
  return () => {
492
506
  a();
493
507
  };
494
- }, [i]), o.some((a) => c(a.textValue, e)) ? null : /* @__PURE__ */ d(N.div, { ...n, ref: s });
495
- }), lo = r.forwardRef((n, s) => {
496
- const { disabled: e = !1, ...t } = n, o = Y(ht), { textValue: l, visuallyFocussedItem: i } = o, { getItems: c, subscribe: a } = xe(void 0), g = r.useRef(null), [f, v] = r.useState(!1), p = _(s, g), u = r.useMemo(() => i === c().find((x) => x.ref.current === g.current)?.ref.current, [c, i]), m = ne(), S = () => {
497
- !e && l && (o.onValueChange(l), o.onTextValueChange(l), o.onOpenChange(!1), o.autocomplete === "both" && o.onFilterValueChange(l), o.trigger?.focus({ preventScroll: !0 }));
508
+ }, [i]), o.some((a) => c(a.textValue, e)) ? null : /* @__PURE__ */ d(N.div, { ...r, ref: s });
509
+ }), lo = l.forwardRef((r, s) => {
510
+ const { disabled: e = !1, ...t } = r, o = j(ht), { textValue: n, visuallyFocussedItem: i } = o, { getItems: c, subscribe: a } = Ce(void 0), g = l.useRef(null), [p, v] = l.useState(!1), f = _(s, g), u = l.useMemo(() => i === c().find((C) => C.ref.current === g.current)?.ref.current, [c, i]), m = oe(), S = () => {
511
+ !e && n && (o.onValueChange(n), o.onTextValueChange(n), o.onOpenChange(!1), o.autocomplete === "both" && o.onFilterValueChange(n), o.trigger?.focus({ preventScroll: !0 }));
498
512
  };
499
- return H(() => {
500
- const x = a((C) => {
501
- v(!C.some((h) => h.textValue === l && h.type !== "create"));
513
+ return B(() => {
514
+ const C = a((x) => {
515
+ v(!x.some((h) => h.textValue === n && h.type !== "create"));
502
516
  });
503
517
  return c().length === 0 && v(!0), () => {
504
- x();
518
+ C();
505
519
  };
506
- }, [l, a, c]), !l || !f ? null : /* @__PURE__ */ d(
507
- pe.ItemSlot,
520
+ }, [n, a, c]), !n || !p ? null : /* @__PURE__ */ d(
521
+ fe.ItemSlot,
508
522
  {
509
523
  scope: void 0,
510
- value: l ?? "",
511
- textValue: l ?? "",
524
+ value: n ?? "",
525
+ textValue: n ?? "",
512
526
  disabled: e,
513
527
  type: "create",
514
528
  children: /* @__PURE__ */ d(
@@ -521,96 +535,96 @@ const dt = "ComboboxContent", jt = r.forwardRef((n, s) => {
521
535
  "data-highlighted": u ? "" : void 0,
522
536
  ...t,
523
537
  id: m,
524
- ref: p,
538
+ ref: f,
525
539
  onPointerUp: T(t.onPointerUp, S)
526
540
  }
527
541
  )
528
542
  }
529
543
  );
530
- }), so = $t, co = Kt, io = Wt, ao = zt, uo = ut, fo = jt, po = Jt, mo = mt, ho = to, go = no, xo = ro, Co = lo;
531
- function vo(n, s) {
532
- const e = Math.min(n.length, s.length);
544
+ }), so = $t, co = Kt, io = Wt, ao = zt, uo = ut, po = jt, fo = Jt, mo = mt, ho = to, go = no, Co = ro, xo = lo;
545
+ function vo(r, s) {
546
+ const e = Math.min(r.length, s.length);
533
547
  for (let t = 0; t < e; t++)
534
- if (n[t] !== s[t])
548
+ if (r[t] !== s[t])
535
549
  return t;
536
550
  return e;
537
551
  }
538
552
  const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
539
553
  __proto__: null,
540
554
  ComboboxItem: mt,
541
- Content: fo,
542
- CreateItem: Co,
555
+ Content: po,
556
+ CreateItem: xo,
543
557
  Icon: ao,
544
558
  Item: mo,
545
559
  ItemIndicator: go,
546
560
  ItemText: ho,
547
- NoValueFound: xo,
561
+ NoValueFound: Co,
548
562
  Portal: uo,
549
563
  Root: so,
550
564
  TextInput: io,
551
565
  Trigger: co,
552
- Viewport: po
553
- }, Symbol.toStringTag, { value: "Module" })), So = [" ", "Enter", "ArrowUp", "ArrowDown"], bo = [" ", "Enter"], me = "Select", [Ce, he, wo] = Rt(me), [ae, yo] = Qe(me, [
566
+ Viewport: fo
567
+ }, Symbol.toStringTag, { value: "Module" })), So = [" ", "Enter", "ArrowUp", "ArrowDown"], bo = [" ", "Enter"], me = "Select", [xe, he, wo] = Rt(me), [ae, yo] = Qe(me, [
554
568
  wo,
555
569
  rt
556
- ]), ve = rt(), [Io, q] = ae(me), [To, Vo] = ae(me), Oe = (n) => {
570
+ ]), ve = rt(), [Io, Y] = ae(me), [To, Vo] = ae(me), Oe = (r) => {
557
571
  const {
558
572
  __scopeSelect: s,
559
573
  children: e,
560
574
  open: t,
561
575
  defaultOpen: o,
562
- onOpenChange: l,
576
+ onOpenChange: n,
563
577
  value: i,
564
578
  defaultValue: c,
565
579
  onValueChange: a,
566
580
  dir: g,
567
581
  // name,
568
582
  // autoComplete,
569
- disabled: f,
583
+ disabled: p,
570
584
  required: v,
571
- multi: p = !1
572
- } = n, u = ve(s), [m, S] = r.useState(null), [x, C] = r.useState(null), [h, w] = r.useState(!1), A = Nt(g), [V = !1, M] = ie({
585
+ multi: f = !1
586
+ } = r, u = ve(s), [m, S] = l.useState(null), [C, x] = l.useState(null), [h, w] = l.useState(!1), A = Nt(g), [V = !1, M] = ie({
573
587
  prop: t,
574
588
  defaultProp: o,
575
- onChange: l
576
- }), [E, k] = ie({
589
+ onChange: n
590
+ }), [P, k] = ie({
577
591
  prop: i,
578
592
  defaultProp: c,
579
593
  onChange(O) {
580
594
  a && (Array.isArray(O), a(O));
581
595
  }
582
- }), $ = r.useRef(null), [G, F] = r.useState(/* @__PURE__ */ new Set());
583
- return /* @__PURE__ */ d(le.Root, { ...u, children: /* @__PURE__ */ d(
596
+ }), H = l.useRef(null), [z, $] = l.useState(/* @__PURE__ */ new Set());
597
+ return /* @__PURE__ */ d(re.Root, { ...u, children: /* @__PURE__ */ d(
584
598
  Io,
585
599
  {
586
600
  required: v,
587
601
  scope: s,
588
602
  trigger: m,
589
603
  onTriggerChange: S,
590
- valueNode: x,
591
- onValueNodeChange: C,
604
+ valueNode: C,
605
+ onValueNodeChange: x,
592
606
  valueNodeHasChildren: h,
593
607
  onValueNodeHasChildrenChange: w,
594
- contentId: ne(),
595
- value: E,
608
+ contentId: oe(),
609
+ value: P,
596
610
  onValueChange: k,
597
611
  open: V,
598
612
  onOpenChange: M,
599
613
  dir: A,
600
- triggerPointerDownPosRef: $,
601
- disabled: f,
602
- multi: p,
603
- children: /* @__PURE__ */ d(Ce.Provider, { scope: s, children: /* @__PURE__ */ d(
614
+ triggerPointerDownPosRef: H,
615
+ disabled: p,
616
+ multi: f,
617
+ children: /* @__PURE__ */ d(xe.Provider, { scope: s, children: /* @__PURE__ */ d(
604
618
  To,
605
619
  {
606
- scope: n.__scopeSelect,
607
- onNativeOptionAdd: r.useCallback((O) => {
608
- F((L) => new Set(L).add(O));
620
+ scope: r.__scopeSelect,
621
+ onNativeOptionAdd: l.useCallback((O) => {
622
+ $((F) => new Set(F).add(O));
609
623
  }, []),
610
- onNativeOptionRemove: r.useCallback((O) => {
611
- F((L) => {
612
- const B = new Set(L);
613
- return B.delete(O), B;
624
+ onNativeOptionRemove: l.useCallback((O) => {
625
+ $((F) => {
626
+ const L = new Set(F);
627
+ return L.delete(O), L;
614
628
  });
615
629
  }, []),
616
630
  children: e
@@ -620,29 +634,29 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
620
634
  ) });
621
635
  };
622
636
  Oe.displayName = me;
623
- const gt = "SelectTrigger", De = r.forwardRef(
624
- (n, s) => {
625
- const { __scopeSelect: e, ...t } = n, o = ve(e), l = q(gt, e), i = l.disabled, c = _(s, l.onTriggerChange), a = he(e), [g, f, v] = Vt((u) => {
626
- const m = a().filter((C) => !C.disabled), S = m.find((C) => C.value === l.value), x = Et(m, u, S);
627
- if (x !== void 0 && !Array.isArray(x.value)) {
628
- const C = l.multi ? [x.value] : x.value;
629
- l.onValueChange(C);
637
+ const gt = "SelectTrigger", De = l.forwardRef(
638
+ (r, s) => {
639
+ const { __scopeSelect: e, ...t } = r, o = ve(e), n = Y(gt, e), i = n.disabled, c = _(s, n.onTriggerChange), a = he(e), [g, p, v] = Vt((u) => {
640
+ const m = a().filter((x) => !x.disabled), S = m.find((x) => x.value === n.value), C = Pt(m, u, S);
641
+ if (C !== void 0 && !Array.isArray(C.value)) {
642
+ const x = n.multi ? [C.value] : C.value;
643
+ n.onValueChange(x);
630
644
  }
631
- }), p = () => {
632
- i || (l.onOpenChange(!0), v());
645
+ }), f = () => {
646
+ i || (n.onOpenChange(!0), v());
633
647
  };
634
- return /* @__PURE__ */ d(le.Anchor, { asChild: !0, ...o, children: /* @__PURE__ */ d(
648
+ return /* @__PURE__ */ d(re.Anchor, { asChild: !0, ...o, children: /* @__PURE__ */ d(
635
649
  N.div,
636
650
  {
637
651
  role: "combobox",
638
- "aria-controls": l.contentId,
639
- "aria-expanded": l.open,
640
- "aria-required": l.required,
652
+ "aria-controls": n.contentId,
653
+ "aria-expanded": n.open,
654
+ "aria-required": n.required,
641
655
  "aria-autocomplete": "none",
642
- dir: l.dir,
643
- "data-state": l.open ? "open" : "closed",
656
+ dir: n.dir,
657
+ "data-state": n.open ? "open" : "closed",
644
658
  "data-disabled": i ? "" : void 0,
645
- "data-placeholder": l.value === void 0 ? "" : void 0,
659
+ "data-placeholder": n.value === void 0 ? "" : void 0,
646
660
  tabIndex: i ? void 0 : 0,
647
661
  ...t,
648
662
  ref: c,
@@ -651,30 +665,30 @@ const gt = "SelectTrigger", De = r.forwardRef(
651
665
  }),
652
666
  onPointerDown: T(t.onPointerDown, (u) => {
653
667
  const m = u.target;
654
- m.hasPointerCapture(u.pointerId) && m.releasePointerCapture(u.pointerId), (m.closest("button") ?? m.closest("div")) === u.currentTarget && u.button === 0 && u.ctrlKey === !1 && (p(), l.triggerPointerDownPosRef.current = {
668
+ m.hasPointerCapture(u.pointerId) && m.releasePointerCapture(u.pointerId), (m.closest("button") ?? m.closest("div")) === u.currentTarget && u.button === 0 && u.ctrlKey === !1 && (f(), n.triggerPointerDownPosRef.current = {
655
669
  x: Math.round(u.pageX),
656
670
  y: Math.round(u.pageY)
657
671
  }, u.preventDefault());
658
672
  }),
659
673
  onKeyDown: T(t.onKeyDown, (u) => {
660
- const m = g.current !== "", S = u.ctrlKey || u.altKey || u.metaKey, x = u.target;
661
- (x.closest("button") ?? x.closest("div")) === u.currentTarget && (!S && u.key.length === 1 && f(u.key), !(m && u.key === " ") && So.includes(u.key) && (p(), u.preventDefault()));
674
+ const m = g.current !== "", S = u.ctrlKey || u.altKey || u.metaKey, C = u.target;
675
+ (C.closest("button") ?? C.closest("div")) === u.currentTarget && (!S && u.key.length === 1 && p(u.key), !(m && u.key === " ") && So.includes(u.key) && (f(), u.preventDefault()));
662
676
  })
663
677
  }
664
678
  ) });
665
679
  }
666
680
  );
667
681
  De.displayName = gt;
668
- const xt = "SelectValue", ke = r.forwardRef(
669
- (n, s) => {
670
- const { __scopeSelect: e, children: t, placeholder: o, ...l } = n, i = q(xt, e), { onValueNodeHasChildrenChange: c } = i, a = t !== void 0, g = _(s, i.onValueNodeChange), [f, v] = r.useState([]), p = he(e);
671
- H(() => {
682
+ const Ct = "SelectValue", ke = l.forwardRef(
683
+ (r, s) => {
684
+ const { __scopeSelect: e, children: t, placeholder: o, ...n } = r, i = Y(Ct, e), { onValueNodeHasChildrenChange: c } = i, a = t !== void 0, g = _(s, i.onValueNodeChange), [p, v] = l.useState([]), f = he(e);
685
+ B(() => {
672
686
  c(a);
673
- }, [c, a]), r.useLayoutEffect(() => {
674
- if (Array.isArray(i.value) && f.length !== i.value.length) {
687
+ }, [c, a]), l.useLayoutEffect(() => {
688
+ if (Array.isArray(i.value) && p.length !== i.value.length) {
675
689
  const m = setTimeout(() => {
676
- const S = p().filter(
677
- (x) => Array.isArray(x.value) ? !1 : i.value?.includes(x.value)
690
+ const S = f().filter(
691
+ (C) => Array.isArray(C.value) ? !1 : i.value?.includes(C.value)
678
692
  );
679
693
  v(S);
680
694
  });
@@ -682,94 +696,94 @@ const xt = "SelectValue", ke = r.forwardRef(
682
696
  clearTimeout(m);
683
697
  };
684
698
  }
685
- }, [i.value, p, f]);
699
+ }, [i.value, f, p]);
686
700
  let u;
687
701
  if ((i.value === void 0 || i.value.length === 0) && o !== void 0)
688
702
  u = /* @__PURE__ */ d("span", { children: o });
689
703
  else if (typeof t == "function")
690
704
  if (Array.isArray(i.value)) {
691
705
  const m = i.value.map((S) => {
692
- const x = f.find((C) => C.value === S);
693
- return x ? t({ value: S, textValue: x?.textValue }) : null;
706
+ const C = p.find((x) => x.value === S);
707
+ return C ? t({ value: S, textValue: C?.textValue }) : null;
694
708
  });
695
709
  u = m.every((S) => S === null) ? o : m;
696
710
  } else
697
711
  u = t(i.value);
698
712
  else
699
713
  u = t;
700
- return /* @__PURE__ */ d(N.span, { ...l, ref: g, children: u || null });
714
+ return /* @__PURE__ */ d(N.span, { ...n, ref: g, children: u || null });
701
715
  }
702
716
  );
703
- ke.displayName = xt;
704
- const Eo = "SelectIcon", Fe = r.forwardRef(
705
- (n, s) => {
706
- const { __scopeSelect: e, children: t, ...o } = n;
717
+ ke.displayName = Ct;
718
+ const Po = "SelectIcon", Fe = l.forwardRef(
719
+ (r, s) => {
720
+ const { __scopeSelect: e, children: t, ...o } = r;
707
721
  return /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...o, ref: s, children: t || "▼" });
708
722
  }
709
723
  );
710
- Fe.displayName = Eo;
711
- const Po = "SelectPortal", Le = (n) => /* @__PURE__ */ d(lt, { asChild: !0, ...n });
712
- Le.displayName = Po;
713
- const re = "SelectContent", Be = r.forwardRef(
714
- (n, s) => {
715
- const e = q(re, n.__scopeSelect), [t, o] = r.useState();
716
- if (H(() => {
724
+ Fe.displayName = Po;
725
+ const Eo = "SelectPortal", Le = (r) => /* @__PURE__ */ d(lt, { asChild: !0, ...r });
726
+ Le.displayName = Eo;
727
+ const ne = "SelectContent", Be = l.forwardRef(
728
+ (r, s) => {
729
+ const e = Y(ne, r.__scopeSelect), [t, o] = l.useState();
730
+ if (B(() => {
717
731
  o(new DocumentFragment());
718
732
  }, []), !e.open) {
719
- const l = t;
720
- return l ? _e.createPortal(
721
- /* @__PURE__ */ d(Ct, { scope: n.__scopeSelect, children: /* @__PURE__ */ d(Ce.Slot, { scope: n.__scopeSelect, children: /* @__PURE__ */ d("div", { children: n.children }) }) }),
722
- l
733
+ const n = t;
734
+ return n ? _e.createPortal(
735
+ /* @__PURE__ */ d(xt, { scope: r.__scopeSelect, children: /* @__PURE__ */ d(xe.Slot, { scope: r.__scopeSelect, children: /* @__PURE__ */ d("div", { children: r.children }) }) }),
736
+ n
723
737
  ) : null;
724
738
  }
725
- return /* @__PURE__ */ d(vt, { ...n, ref: s });
739
+ return /* @__PURE__ */ d(vt, { ...r, ref: s });
726
740
  }
727
741
  );
728
- Be.displayName = re;
729
- const j = 10, [Ct, Q] = ae(re), Ro = "SelectContentImpl", vt = r.forwardRef(
730
- (n, s) => {
742
+ Be.displayName = ne;
743
+ const G = 10, [xt, J] = ae(ne), Ro = "SelectContentImpl", vt = l.forwardRef(
744
+ (r, s) => {
731
745
  const {
732
746
  __scopeSelect: e,
733
747
  position: t = "item-aligned",
734
748
  onCloseAutoFocus: o,
735
- onEscapeKeyDown: l,
749
+ onEscapeKeyDown: n,
736
750
  onPointerDownOutside: i,
737
751
  //
738
752
  // PopperContent props
739
753
  side: c,
740
754
  sideOffset: a,
741
755
  align: g,
742
- alignOffset: f,
756
+ alignOffset: p,
743
757
  arrowPadding: v,
744
- collisionBoundary: p,
758
+ collisionBoundary: f,
745
759
  collisionPadding: u,
746
760
  sticky: m,
747
761
  hideWhenDetached: S,
748
- avoidCollisions: x,
762
+ avoidCollisions: C,
749
763
  //
750
- ...C
751
- } = n, h = q(re, e), [w, A] = r.useState(null), [V, M] = r.useState(null), E = _(s, (b) => A(b)), [k, $] = r.useState(null), [G, F] = r.useState(null), O = he(e), [L, B] = r.useState(!1), U = r.useRef(!1);
752
- r.useEffect(() => {
764
+ ...x
765
+ } = r, h = Y(ne, e), [w, A] = l.useState(null), [V, M] = l.useState(null), P = _(s, (b) => A(b)), [k, H] = l.useState(null), [z, $] = l.useState(null), O = he(e), [F, L] = l.useState(!1), U = l.useRef(!1);
766
+ l.useEffect(() => {
753
767
  if (w)
754
768
  return st(w);
755
769
  }, [w]), ot();
756
- const K = r.useCallback(
770
+ const K = l.useCallback(
757
771
  (b) => {
758
- const [y, ...D] = O().map((R) => R.ref.current), [I] = D.slice(-1), P = document.activeElement;
772
+ const [y, ...D] = O().map((R) => R.ref.current), [I] = D.slice(-1), E = document.activeElement;
759
773
  for (const R of b)
760
- if (R === P || (R?.scrollIntoView({ block: "nearest" }), R === y && V && (V.scrollTop = 0), R === I && V && (V.scrollTop = V.scrollHeight), R?.focus(), document.activeElement !== P))
774
+ if (R === E || (R?.scrollIntoView({ block: "nearest" }), R === y && V && (V.scrollTop = 0), R === I && V && (V.scrollTop = V.scrollHeight), R?.focus(), document.activeElement !== E))
761
775
  return;
762
776
  },
763
777
  [O, V]
764
- ), X = r.useCallback(
778
+ ), q = l.useCallback(
765
779
  () => K([k, w]),
766
780
  [K, k, w]
767
781
  );
768
- r.useEffect(() => {
769
- L && X();
770
- }, [L, X]);
771
- const { onOpenChange: Z, triggerPointerDownPosRef: W } = h;
772
- r.useEffect(() => {
782
+ l.useEffect(() => {
783
+ F && q();
784
+ }, [F, q]);
785
+ const { onOpenChange: X, triggerPointerDownPosRef: W } = h;
786
+ l.useEffect(() => {
773
787
  if (w) {
774
788
  let b = { x: 0, y: 0 };
775
789
  const y = (I) => {
@@ -778,47 +792,47 @@ const j = 10, [Ct, Q] = ae(re), Ro = "SelectContentImpl", vt = r.forwardRef(
778
792
  y: Math.abs(Math.round(I.pageY) - (W.current?.y ?? 0))
779
793
  };
780
794
  }, D = (I) => {
781
- b.x <= 10 && b.y <= 10 ? I.preventDefault() : w.contains(I.target) || Z(!1), document.removeEventListener("pointermove", y), W.current = null;
795
+ b.x <= 10 && b.y <= 10 ? I.preventDefault() : w.contains(I.target) || X(!1), document.removeEventListener("pointermove", y), W.current = null;
782
796
  };
783
797
  return W.current !== null && (document.addEventListener("pointermove", y), document.addEventListener("pointerup", D, { capture: !0, once: !0 })), () => {
784
798
  document.removeEventListener("pointermove", y), document.removeEventListener("pointerup", D, { capture: !0 });
785
799
  };
786
800
  }
787
- }, [w, Z, W]), r.useEffect(() => {
788
- const b = () => Z(!1);
801
+ }, [w, X, W]), l.useEffect(() => {
802
+ const b = () => X(!1);
789
803
  return window.addEventListener("blur", b), window.addEventListener("resize", b), () => {
790
804
  window.removeEventListener("blur", b), window.removeEventListener("resize", b);
791
805
  };
792
- }, [Z]);
793
- const [ue, z] = Vt((b) => {
794
- const y = O().filter((P) => !P.disabled), D = y.find((P) => P.ref.current === document.activeElement), I = Et(y, b, D);
806
+ }, [X]);
807
+ const [ue, le] = Vt((b) => {
808
+ const y = O().filter((E) => !E.disabled), D = y.find((E) => E.ref.current === document.activeElement), I = Pt(y, b, D);
795
809
  I && setTimeout(() => I.ref.current.focus());
796
- }), se = r.useCallback(
810
+ }), se = l.useCallback(
797
811
  (b, y, D) => {
798
812
  const I = !U.current && !D;
799
- (h.value !== void 0 && h.value === y || I) && ($(b), I && (U.current = !0));
813
+ (h.value !== void 0 && h.value === y || I) && (H(b), I && (U.current = !0));
800
814
  },
801
815
  [h.value]
802
- ), de = r.useCallback(() => w?.focus(), [w]), J = r.useCallback(
816
+ ), de = l.useCallback(() => w?.focus(), [w]), Z = l.useCallback(
803
817
  (b, y, D) => {
804
818
  const I = !U.current && !D;
805
- (h.value !== void 0 && (Array.isArray(y) ? y.every((R) => h.value?.includes(R)) : h.value === y) || I) && F(b);
819
+ (h.value !== void 0 && (Array.isArray(y) ? y.every((R) => h.value?.includes(R)) : h.value === y) || I) && $(b);
806
820
  },
807
821
  [h.value]
808
- ), ce = t === "popper" ? Te : St, ee = ce === Te ? {
822
+ ), ce = t === "popper" ? Te : St, Q = ce === Te ? {
809
823
  side: c,
810
824
  sideOffset: a,
811
825
  align: g,
812
- alignOffset: f,
826
+ alignOffset: p,
813
827
  arrowPadding: v,
814
- collisionBoundary: p,
828
+ collisionBoundary: f,
815
829
  collisionPadding: u,
816
830
  sticky: m,
817
831
  hideWhenDetached: S,
818
- avoidCollisions: x
832
+ avoidCollisions: C
819
833
  } : {};
820
834
  return /* @__PURE__ */ d(
821
- Ct,
835
+ xt,
822
836
  {
823
837
  scope: e,
824
838
  content: w,
@@ -827,11 +841,11 @@ const j = 10, [Ct, Q] = ae(re), Ro = "SelectContentImpl", vt = r.forwardRef(
827
841
  itemRefCallback: se,
828
842
  selectedItem: k,
829
843
  onItemLeave: de,
830
- itemTextRefCallback: J,
831
- focusSelectedItem: X,
832
- selectedItemText: G,
844
+ itemTextRefCallback: Z,
845
+ focusSelectedItem: q,
846
+ selectedItemText: z,
833
847
  position: t,
834
- isPositioned: L,
848
+ isPositioned: F,
835
849
  searchRef: ue,
836
850
  children: /* @__PURE__ */ d(ct, { as: Ie, allowPinchZoom: !0, children: /* @__PURE__ */ d(
837
851
  nt,
@@ -849,7 +863,7 @@ const j = 10, [Ct, Q] = ae(re), Ro = "SelectContentImpl", vt = r.forwardRef(
849
863
  {
850
864
  asChild: !0,
851
865
  disableOutsidePointerEvents: !0,
852
- onEscapeKeyDown: l,
866
+ onEscapeKeyDown: n,
853
867
  onPointerDownOutside: i,
854
868
  onFocusOutside: (b) => b.preventDefault(),
855
869
  onDismiss: () => h.onOpenChange(!1),
@@ -862,24 +876,24 @@ const j = 10, [Ct, Q] = ae(re), Ro = "SelectContentImpl", vt = r.forwardRef(
862
876
  "aria-multiselectable": h.multi ? "true" : void 0,
863
877
  dir: h.dir,
864
878
  onContextMenu: (b) => b.preventDefault(),
865
- ...C,
866
- ...ee,
867
- onPlaced: () => B(!0),
868
- ref: E,
879
+ ...x,
880
+ ...Q,
881
+ onPlaced: () => L(!0),
882
+ ref: P,
869
883
  style: {
870
884
  // flex layout so we can place the scroll buttons properly
871
885
  display: "flex",
872
886
  flexDirection: "column",
873
887
  // reset the outline by default as the content MAY get focused
874
888
  outline: "none",
875
- ...C.style
889
+ ...x.style
876
890
  },
877
- onKeyDown: T(C.onKeyDown, (b) => {
891
+ onKeyDown: T(x.onKeyDown, (b) => {
878
892
  const y = b.ctrlKey || b.altKey || b.metaKey;
879
- if (b.key === "Tab" && b.preventDefault(), !y && b.key.length === 1 && z(b.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(b.key)) {
880
- let I = O().filter((P) => !P.disabled).map((P) => P.ref.current);
893
+ if (b.key === "Tab" && b.preventDefault(), !y && b.key.length === 1 && le(b.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(b.key)) {
894
+ let I = O().filter((E) => !E.disabled).map((E) => E.ref.current);
881
895
  if (["ArrowUp", "End"].includes(b.key) && (I = I.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(b.key)) {
882
- const P = b.target, R = I.indexOf(P);
896
+ const E = b.target, R = I.indexOf(E);
883
897
  I = I.slice(R + 1);
884
898
  }
885
899
  setTimeout(() => K(I)), b.preventDefault();
@@ -896,60 +910,60 @@ const j = 10, [Ct, Q] = ae(re), Ro = "SelectContentImpl", vt = r.forwardRef(
896
910
  }
897
911
  );
898
912
  vt.displayName = Ro;
899
- const No = "SelectItemAlignedPosition", St = r.forwardRef(
900
- (n, s) => {
901
- const { __scopeSelect: e, onPlaced: t, ...o } = n, l = q(re, e), i = Q(re, e), [c, a] = r.useState(null), [g, f] = r.useState(null), v = _(s, (E) => f(E)), p = he(e), u = r.useRef(!1), m = r.useRef(!0), { viewport: S, selectedItem: x, selectedItemText: C, focusSelectedItem: h } = i, w = r.useCallback(() => {
902
- if (l.trigger && l.valueNode && c && g && S && x && C) {
903
- const E = l.trigger.getBoundingClientRect(), k = g.getBoundingClientRect(), $ = l.valueNode.getBoundingClientRect(), G = C.getBoundingClientRect();
904
- if (l.dir !== "rtl") {
905
- const P = G.left - k.left, R = $.left - P, te = E.left - R, oe = E.width + te, Se = Math.max(oe, k.width), be = window.innerWidth - j, we = Ze(R, [j, be - Se]);
906
- c.style.minWidth = `${oe}px`, c.style.left = `${we}px`;
913
+ const No = "SelectItemAlignedPosition", St = l.forwardRef(
914
+ (r, s) => {
915
+ const { __scopeSelect: e, onPlaced: t, ...o } = r, n = Y(ne, e), i = J(ne, e), [c, a] = l.useState(null), [g, p] = l.useState(null), v = _(s, (P) => p(P)), f = he(e), u = l.useRef(!1), m = l.useRef(!0), { viewport: S, selectedItem: C, selectedItemText: x, focusSelectedItem: h } = i, w = l.useCallback(() => {
916
+ if (n.trigger && n.valueNode && c && g && S && C && x) {
917
+ const P = n.trigger.getBoundingClientRect(), k = g.getBoundingClientRect(), H = n.valueNode.getBoundingClientRect(), z = x.getBoundingClientRect();
918
+ if (n.dir !== "rtl") {
919
+ const E = z.left - k.left, R = H.left - E, ee = P.left - R, te = P.width + ee, Se = Math.max(te, k.width), be = window.innerWidth - G, we = Ze(R, [G, be - Se]);
920
+ c.style.minWidth = `${te}px`, c.style.left = `${we}px`;
907
921
  } else {
908
- const P = k.right - G.right, R = window.innerWidth - $.right - P, te = window.innerWidth - E.right - R, oe = E.width + te, Se = Math.max(oe, k.width), be = window.innerWidth - j, we = Ze(R, [j, be - Se]);
909
- c.style.minWidth = `${oe}px`, c.style.right = `${we}px`;
922
+ const E = k.right - z.right, R = window.innerWidth - H.right - E, ee = window.innerWidth - P.right - R, te = P.width + ee, Se = Math.max(te, k.width), be = window.innerWidth - G, we = Ze(R, [G, be - Se]);
923
+ c.style.minWidth = `${te}px`, c.style.right = `${we}px`;
910
924
  }
911
- const F = p(), O = window.innerHeight - j * 2, L = S.scrollHeight, B = window.getComputedStyle(g), U = parseInt(B.borderTopWidth, 10), K = parseInt(B.paddingTop, 10), X = parseInt(B.borderBottomWidth, 10), Z = parseInt(B.paddingBottom, 10), W = U + K + L + Z + X, ue = Math.min(x.offsetHeight * 5, W), z = window.getComputedStyle(S), se = parseInt(z.paddingTop, 10), de = parseInt(z.paddingBottom, 10), J = E.top + E.height / 2 - j, ce = O - J, ee = x.offsetHeight / 2, b = x.offsetTop + ee, y = U + K + b, D = W - y;
912
- if (y <= J) {
913
- const P = x === F[F.length - 1].ref.current;
925
+ const $ = f(), O = window.innerHeight - G * 2, F = S.scrollHeight, L = window.getComputedStyle(g), U = parseInt(L.borderTopWidth, 10), K = parseInt(L.paddingTop, 10), q = parseInt(L.borderBottomWidth, 10), X = parseInt(L.paddingBottom, 10), W = U + K + F + X + q, ue = Math.min(C.offsetHeight * 5, W), le = window.getComputedStyle(S), se = parseInt(le.paddingTop, 10), de = parseInt(le.paddingBottom, 10), Z = P.top + P.height / 2 - G, ce = O - Z, Q = C.offsetHeight / 2, b = C.offsetTop + Q, y = U + K + b, D = W - y;
926
+ if (y <= Z) {
927
+ const E = C === $[$.length - 1].ref.current;
914
928
  c.style.bottom = "0px";
915
- const R = g.clientHeight - S.offsetTop - S.offsetHeight, te = Math.max(
929
+ const R = g.clientHeight - S.offsetTop - S.offsetHeight, ee = Math.max(
916
930
  ce,
917
- ee + // viewport might have padding bottom, include it to avoid a scrollable viewport
918
- (P ? de : 0) + R + X
919
- ), oe = y + te;
920
- c.style.height = `${oe}px`;
931
+ Q + // viewport might have padding bottom, include it to avoid a scrollable viewport
932
+ (E ? de : 0) + R + q
933
+ ), te = y + ee;
934
+ c.style.height = `${te}px`;
921
935
  } else {
922
- const P = x === F[0].ref.current;
936
+ const E = C === $[0].ref.current;
923
937
  c.style.top = "0px";
924
- const te = Math.max(
925
- J,
938
+ const ee = Math.max(
939
+ Z,
926
940
  U + S.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
927
- (P ? se : 0) + ee
941
+ (E ? se : 0) + Q
928
942
  ) + D;
929
- c.style.height = `${te}px`, S.scrollTop = y - J + S.offsetTop;
943
+ c.style.height = `${ee}px`, S.scrollTop = y - Z + S.offsetTop;
930
944
  }
931
- c.style.margin = `${j}px 0`, c.style.minHeight = `${ue}px`, c.style.maxHeight = `${O}px`, t?.(), requestAnimationFrame(() => u.current = !0);
945
+ c.style.margin = `${G}px 0`, c.style.minHeight = `${ue}px`, c.style.maxHeight = `${O}px`, t?.(), requestAnimationFrame(() => u.current = !0);
932
946
  }
933
947
  }, [
934
- p,
935
- l.trigger,
936
- l.valueNode,
948
+ f,
949
+ n.trigger,
950
+ n.valueNode,
937
951
  c,
938
952
  g,
939
953
  S,
940
- x,
941
954
  C,
942
- l.dir,
955
+ x,
956
+ n.dir,
943
957
  t
944
958
  ]);
945
- H(() => w(), [w]);
946
- const [A, V] = r.useState();
947
- H(() => {
959
+ B(() => w(), [w]);
960
+ const [A, V] = l.useState();
961
+ B(() => {
948
962
  g && V(window.getComputedStyle(g).zIndex);
949
963
  }, [g]);
950
- const M = r.useCallback(
951
- (E) => {
952
- E && m.current === !0 && (w(), h?.(), m.current = !1);
964
+ const M = l.useCallback(
965
+ (P) => {
966
+ P && m.current === !0 && (w(), h?.(), m.current = !1);
953
967
  },
954
968
  [w, h]
955
969
  );
@@ -992,21 +1006,21 @@ const No = "SelectItemAlignedPosition", St = r.forwardRef(
992
1006
  }
993
1007
  );
994
1008
  St.displayName = No;
995
- const Ao = "SelectPopperPosition", Te = r.forwardRef(
996
- (n, s) => {
997
- const { __scopeSelect: e, align: t = "start", collisionPadding: o = j, ...l } = n, i = ve(e);
1009
+ const Ao = "SelectPopperPosition", Te = l.forwardRef(
1010
+ (r, s) => {
1011
+ const { __scopeSelect: e, align: t = "start", collisionPadding: o = G, ...n } = r, i = ve(e);
998
1012
  return /* @__PURE__ */ d(
999
- le.Content,
1013
+ re.Content,
1000
1014
  {
1001
1015
  ...i,
1002
- ...l,
1016
+ ...n,
1003
1017
  ref: s,
1004
1018
  align: t,
1005
1019
  collisionPadding: o,
1006
1020
  style: {
1007
1021
  // Ensure border-box for floating-ui calculations
1008
1022
  boxSizing: "border-box",
1009
- ...l.style,
1023
+ ...n.style,
1010
1024
  "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
1011
1025
  "--radix-select-content-available-width": "var(--radix-popper-available-width)",
1012
1026
  "--radix-select-content-available-height": "var(--radix-popper-available-height)",
@@ -1019,11 +1033,11 @@ const Ao = "SelectPopperPosition", Te = r.forwardRef(
1019
1033
  );
1020
1034
  Te.displayName = Ao;
1021
1035
  const [_o, He] = ae(
1022
- re,
1036
+ ne,
1023
1037
  {}
1024
- ), Ve = "SelectViewport", $e = r.forwardRef(
1025
- (n, s) => {
1026
- const { __scopeSelect: e, ...t } = n, o = Q(Ve, e), l = He(Ve, e), i = _(s, o.onViewportChange), c = r.useRef(0);
1038
+ ), Ve = "SelectViewport", $e = l.forwardRef(
1039
+ (r, s) => {
1040
+ const { __scopeSelect: e, ...t } = r, o = J(Ve, e), n = He(Ve, e), i = _(s, o.onViewportChange), c = l.useRef(0);
1027
1041
  return /* @__PURE__ */ Ne(Ae, { children: [
1028
1042
  /* @__PURE__ */ d(
1029
1043
  "style",
@@ -1033,7 +1047,7 @@ const [_o, He] = ae(
1033
1047
  }
1034
1048
  }
1035
1049
  ),
1036
- /* @__PURE__ */ d(Ce.Slot, { scope: e, children: /* @__PURE__ */ d(
1050
+ /* @__PURE__ */ d(xe.Slot, { scope: e, children: /* @__PURE__ */ d(
1037
1051
  N.div,
1038
1052
  {
1039
1053
  "data-radix-select-viewport": "",
@@ -1050,14 +1064,14 @@ const [_o, He] = ae(
1050
1064
  ...t.style
1051
1065
  },
1052
1066
  onScroll: T(t.onScroll, (a) => {
1053
- const g = a.currentTarget, { contentWrapper: f, shouldExpandOnScrollRef: v } = l;
1054
- if (v?.current && f) {
1055
- const p = Math.abs(c.current - g.scrollTop);
1056
- if (p > 0) {
1057
- const u = window.innerHeight - j * 2, m = parseFloat(f.style.minHeight), S = parseFloat(f.style.height), x = Math.max(m, S);
1058
- if (x < u) {
1059
- const C = x + p, h = Math.min(u, C), w = C - h;
1060
- f.style.height = `${h}px`, f.style.bottom === "0px" && (g.scrollTop = w > 0 ? w : 0, f.style.justifyContent = "flex-end");
1067
+ const g = a.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: v } = n;
1068
+ if (v?.current && p) {
1069
+ const f = Math.abs(c.current - g.scrollTop);
1070
+ if (f > 0) {
1071
+ const u = window.innerHeight - G * 2, m = parseFloat(p.style.minHeight), S = parseFloat(p.style.height), C = Math.max(m, S);
1072
+ if (C < u) {
1073
+ const x = C + f, h = Math.min(u, x), w = x - h;
1074
+ p.style.height = `${h}px`, p.style.bottom === "0px" && (g.scrollTop = w > 0 ? w : 0, p.style.justifyContent = "flex-end");
1061
1075
  }
1062
1076
  }
1063
1077
  }
@@ -1069,29 +1083,29 @@ const [_o, He] = ae(
1069
1083
  }
1070
1084
  );
1071
1085
  $e.displayName = Ve;
1072
- const bt = "SelectGroup", [Mo, Oo] = ae(bt), Ue = r.forwardRef(
1073
- (n, s) => {
1074
- const { __scopeSelect: e, ...t } = n, o = ne();
1086
+ const bt = "SelectGroup", [Mo, Oo] = ae(bt), Ue = l.forwardRef(
1087
+ (r, s) => {
1088
+ const { __scopeSelect: e, ...t } = r, o = oe();
1075
1089
  return /* @__PURE__ */ d(Mo, { scope: e, id: o, children: /* @__PURE__ */ d(N.div, { role: "group", "aria-labelledby": o, ...t, ref: s }) });
1076
1090
  }
1077
1091
  );
1078
1092
  Ue.displayName = bt;
1079
- const wt = "SelectLabel", Ke = r.forwardRef(
1080
- (n, s) => {
1081
- const { __scopeSelect: e, ...t } = n, o = Oo(wt, e);
1093
+ const wt = "SelectLabel", Ke = l.forwardRef(
1094
+ (r, s) => {
1095
+ const { __scopeSelect: e, ...t } = r, o = Oo(wt, e);
1082
1096
  return /* @__PURE__ */ d(N.div, { id: o.id, ...t, ref: s });
1083
1097
  }
1084
1098
  );
1085
1099
  Ke.displayName = wt;
1086
- const ge = "SelectItem", [Do, yt] = ae(ge), We = r.forwardRef(
1087
- (n, s) => {
1088
- const { __scopeSelect: e, value: t, disabled: o = !1, textValue: l, ...i } = n, c = q(ge, e), a = Q(ge, e), g = typeof t == "string" ? Array.isArray(c.value) ? c.value.includes(t) : c.value === t : t.every((h) => c.value?.includes(h)), f = Array.isArray(c.value) && Array.isArray(t) && t.some((h) => c.value?.includes(h)), [v, p] = r.useState(l ?? ""), [u, m] = r.useState(!1), S = _(
1100
+ const ge = "SelectItem", [Do, yt] = ae(ge), We = l.forwardRef(
1101
+ (r, s) => {
1102
+ const { __scopeSelect: e, value: t, disabled: o = !1, textValue: n, ...i } = r, c = Y(ge, e), a = J(ge, e), g = typeof t == "string" ? Array.isArray(c.value) ? c.value.includes(t) : c.value === t : t.every((h) => c.value?.includes(h)), p = Array.isArray(c.value) && Array.isArray(t) && t.some((h) => c.value?.includes(h)), [v, f] = l.useState(n ?? ""), [u, m] = l.useState(!1), S = _(
1089
1103
  s,
1090
1104
  (h) => a.itemRefCallback?.(h, t, o)
1091
- ), x = ne(), C = () => {
1105
+ ), C = oe(), x = () => {
1092
1106
  if (!o) {
1093
1107
  let h = c.multi && typeof t == "string" ? [t] : t;
1094
- f && !g ? c.onValueChange(h) : Array.isArray(c.value) && (h = Pt(t, c.value)), c.onValueChange(h), c.multi || c.onOpenChange(!1);
1108
+ p && !g ? c.onValueChange(h) : Array.isArray(c.value) && (h = Et(t, c.value)), c.onValueChange(h), c.multi || c.onOpenChange(!1);
1095
1109
  }
1096
1110
  };
1097
1111
  if (!c.multi && Array.isArray(t))
@@ -1102,17 +1116,17 @@ const ge = "SelectItem", [Do, yt] = ae(ge), We = r.forwardRef(
1102
1116
  scope: e,
1103
1117
  value: t,
1104
1118
  disabled: o,
1105
- textId: x,
1119
+ textId: C,
1106
1120
  isSelected: g,
1107
- isIntermediate: f,
1108
- onItemTextChange: r.useCallback((h) => {
1109
- p((w) => w || (h?.textContent ?? "").trim());
1121
+ isIntermediate: p,
1122
+ onItemTextChange: l.useCallback((h) => {
1123
+ f((w) => w || (h?.textContent ?? "").trim());
1110
1124
  }, []),
1111
- children: /* @__PURE__ */ d(Ce.ItemSlot, { scope: e, value: t, disabled: o, textValue: v, children: /* @__PURE__ */ d(
1125
+ children: /* @__PURE__ */ d(xe.ItemSlot, { scope: e, value: t, disabled: o, textValue: v, children: /* @__PURE__ */ d(
1112
1126
  N.div,
1113
1127
  {
1114
1128
  role: "option",
1115
- "aria-labelledby": x,
1129
+ "aria-labelledby": C,
1116
1130
  "data-highlighted": u ? "" : void 0,
1117
1131
  "aria-selected": c.multi ? void 0 : g && u,
1118
1132
  "aria-checked": c.multi ? g : void 0,
@@ -1124,7 +1138,7 @@ const ge = "SelectItem", [Do, yt] = ae(ge), We = r.forwardRef(
1124
1138
  ref: S,
1125
1139
  onFocus: T(i.onFocus, () => m(!0)),
1126
1140
  onBlur: T(i.onBlur, () => m(!1)),
1127
- onPointerUp: T(i.onPointerUp, C),
1141
+ onPointerUp: T(i.onPointerUp, x),
1128
1142
  onPointerMove: T(i.onPointerMove, (h) => {
1129
1143
  o ? a.onItemLeave?.() : h.currentTarget.focus({ preventScroll: !0 });
1130
1144
  }),
@@ -1132,7 +1146,7 @@ const ge = "SelectItem", [Do, yt] = ae(ge), We = r.forwardRef(
1132
1146
  h.currentTarget === document.activeElement && a.onItemLeave?.();
1133
1147
  }),
1134
1148
  onKeyDown: T(i.onKeyDown, (h) => {
1135
- a.searchRef?.current !== "" && h.key === " " || (bo.includes(h.key) && C(), h.key === " " && h.preventDefault());
1149
+ a.searchRef?.current !== "" && h.key === " " || (bo.includes(h.key) && x(), h.key === " " && h.preventDefault());
1136
1150
  })
1137
1151
  }
1138
1152
  ) })
@@ -1141,14 +1155,14 @@ const ge = "SelectItem", [Do, yt] = ae(ge), We = r.forwardRef(
1141
1155
  }
1142
1156
  );
1143
1157
  We.displayName = ge;
1144
- const fe = "SelectItemText", ze = r.forwardRef(
1145
- (n, s) => {
1146
- const { __scopeSelect: e, className: t, style: o, ...l } = n, i = q(fe, e), c = Q(fe, e), a = yt(fe, e), g = Vo(fe, e), [f, v] = r.useState(null), p = _(
1158
+ const pe = "SelectItemText", ze = l.forwardRef(
1159
+ (r, s) => {
1160
+ const { __scopeSelect: e, className: t, style: o, ...n } = r, i = Y(pe, e), c = J(pe, e), a = yt(pe, e), g = Vo(pe, e), [p, v] = l.useState(null), f = _(
1147
1161
  s,
1148
- (C) => v(C),
1162
+ (x) => v(x),
1149
1163
  a.onItemTextChange,
1150
- (C) => c.itemTextRefCallback?.(C, a.value, a.disabled)
1151
- ), u = f?.textContent, m = r.useMemo(
1164
+ (x) => c.itemTextRefCallback?.(x, a.value, a.disabled)
1165
+ ), u = p?.textContent, m = l.useMemo(
1152
1166
  () => /* @__PURE__ */ d(
1153
1167
  "option",
1154
1168
  {
@@ -1159,39 +1173,39 @@ const fe = "SelectItemText", ze = r.forwardRef(
1159
1173
  Array.isArray(a.value) ? a.value.join(";") : a.value
1160
1174
  ),
1161
1175
  [a.disabled, a.value, u]
1162
- ), { onNativeOptionAdd: S, onNativeOptionRemove: x } = g;
1163
- return H(() => (S(m), () => x(m)), [S, x, m]), /* @__PURE__ */ Ne(Ae, { children: [
1164
- /* @__PURE__ */ d(N.span, { id: a.textId, ...l, ref: p }),
1165
- a.isSelected && i.valueNode && !i.valueNodeHasChildren ? _e.createPortal(l.children, i.valueNode) : null
1176
+ ), { onNativeOptionAdd: S, onNativeOptionRemove: C } = g;
1177
+ return B(() => (S(m), () => C(m)), [S, C, m]), /* @__PURE__ */ Ne(Ae, { children: [
1178
+ /* @__PURE__ */ d(N.span, { id: a.textId, ...n, ref: f }),
1179
+ a.isSelected && i.valueNode && !i.valueNodeHasChildren ? _e.createPortal(n.children, i.valueNode) : null
1166
1180
  ] });
1167
1181
  }
1168
1182
  );
1169
- ze.displayName = fe;
1170
- const It = "SelectItemIndicator", Ge = r.forwardRef(
1171
- (n, s) => {
1172
- const { __scopeSelect: e, children: t, ...o } = n, l = yt(It, e);
1183
+ ze.displayName = pe;
1184
+ const It = "SelectItemIndicator", Ge = l.forwardRef(
1185
+ (r, s) => {
1186
+ const { __scopeSelect: e, children: t, ...o } = r, n = yt(It, e);
1173
1187
  return typeof t == "function" ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...o, ref: s, children: t({
1174
- isSelected: l.isSelected,
1175
- isIntermediate: l.isIntermediate
1176
- }) }) : l.isSelected ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...o, ref: s, children: t }) : null;
1188
+ isSelected: n.isSelected,
1189
+ isIntermediate: n.isIntermediate
1190
+ }) }) : n.isSelected ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...o, ref: s, children: t }) : null;
1177
1191
  }
1178
1192
  );
1179
1193
  Ge.displayName = It;
1180
- const Ee = "SelectScrollUpButton", je = r.forwardRef(
1181
- (n, s) => {
1182
- const e = Q(Ee, n.__scopeSelect), t = He(Ee, n.__scopeSelect), [o, l] = r.useState(!1), i = _(s, t.onScrollButtonChange);
1183
- return H(() => {
1194
+ const Pe = "SelectScrollUpButton", je = l.forwardRef(
1195
+ (r, s) => {
1196
+ const e = J(Pe, r.__scopeSelect), t = He(Pe, r.__scopeSelect), [o, n] = l.useState(!1), i = _(s, t.onScrollButtonChange);
1197
+ return B(() => {
1184
1198
  if (e.viewport && e.isPositioned) {
1185
1199
  const c = e.viewport, a = () => {
1186
1200
  const g = c.scrollTop > 0;
1187
- l(g);
1201
+ n(g);
1188
1202
  };
1189
1203
  return a(), c.addEventListener("scroll", a), () => c.removeEventListener("scroll", a);
1190
1204
  }
1191
1205
  }, [e.viewport, e.isPositioned]), o ? /* @__PURE__ */ d(
1192
1206
  Tt,
1193
1207
  {
1194
- ...n,
1208
+ ...r,
1195
1209
  ref: i,
1196
1210
  onAutoScroll: () => {
1197
1211
  const { viewport: c, selectedItem: a } = e;
@@ -1201,22 +1215,22 @@ const Ee = "SelectScrollUpButton", je = r.forwardRef(
1201
1215
  ) : null;
1202
1216
  }
1203
1217
  );
1204
- je.displayName = Ee;
1205
- const Pe = "SelectScrollDownButton", Ye = r.forwardRef(
1206
- (n, s) => {
1207
- const e = Q(Pe, n.__scopeSelect), t = He(Pe, n.__scopeSelect), [o, l] = r.useState(!1), i = _(s, t.onScrollButtonChange);
1208
- return H(() => {
1218
+ je.displayName = Pe;
1219
+ const Ee = "SelectScrollDownButton", Ye = l.forwardRef(
1220
+ (r, s) => {
1221
+ const e = J(Ee, r.__scopeSelect), t = He(Ee, r.__scopeSelect), [o, n] = l.useState(!1), i = _(s, t.onScrollButtonChange);
1222
+ return B(() => {
1209
1223
  if (e.viewport && e.isPositioned) {
1210
1224
  const c = e.viewport, a = () => {
1211
- const g = c.scrollHeight - c.clientHeight, f = Math.ceil(c.scrollTop) < g;
1212
- l(f);
1225
+ const g = c.scrollHeight - c.clientHeight, p = Math.ceil(c.scrollTop) < g;
1226
+ n(p);
1213
1227
  };
1214
1228
  return a(), c.addEventListener("scroll", a), () => c.removeEventListener("scroll", a);
1215
1229
  }
1216
1230
  }, [e.viewport, e.isPositioned]), o ? /* @__PURE__ */ d(
1217
1231
  Tt,
1218
1232
  {
1219
- ...n,
1233
+ ...r,
1220
1234
  ref: i,
1221
1235
  onAutoScroll: () => {
1222
1236
  const { viewport: c, selectedItem: a } = e;
@@ -1226,14 +1240,14 @@ const Pe = "SelectScrollDownButton", Ye = r.forwardRef(
1226
1240
  ) : null;
1227
1241
  }
1228
1242
  );
1229
- Ye.displayName = Pe;
1230
- const Tt = r.forwardRef(
1231
- (n, s) => {
1232
- const { __scopeSelect: e, onAutoScroll: t, ...o } = n, l = Q("SelectScrollButton", e), i = r.useRef(null), c = he(e), a = r.useCallback(() => {
1243
+ Ye.displayName = Ee;
1244
+ const Tt = l.forwardRef(
1245
+ (r, s) => {
1246
+ const { __scopeSelect: e, onAutoScroll: t, ...o } = r, n = J("SelectScrollButton", e), i = l.useRef(null), c = he(e), a = l.useCallback(() => {
1233
1247
  i.current !== null && (window.clearInterval(i.current), i.current = null);
1234
1248
  }, []);
1235
- return r.useEffect(() => () => a(), [a]), H(() => {
1236
- c().find((f) => f.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
1249
+ return l.useEffect(() => () => a(), [a]), B(() => {
1250
+ c().find((p) => p.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
1237
1251
  }, [c]), /* @__PURE__ */ d(
1238
1252
  N.div,
1239
1253
  {
@@ -1242,7 +1256,7 @@ const Tt = r.forwardRef(
1242
1256
  ref: s,
1243
1257
  style: { flexShrink: 0, ...o.style },
1244
1258
  onPointerMove: T(o.onPointerMove, () => {
1245
- l.onItemLeave?.(), i.current === null && (i.current = window.setInterval(t, 50));
1259
+ n.onItemLeave?.(), i.current === null && (i.current = window.setInterval(t, 50));
1246
1260
  }),
1247
1261
  onPointerLeave: T(o.onPointerLeave, () => {
1248
1262
  a();
@@ -1250,28 +1264,28 @@ const Tt = r.forwardRef(
1250
1264
  }
1251
1265
  );
1252
1266
  }
1253
- ), ko = "SelectSeparator", qe = r.forwardRef(
1254
- (n, s) => {
1255
- const { __scopeSelect: e, ...t } = n;
1267
+ ), ko = "SelectSeparator", qe = l.forwardRef(
1268
+ (r, s) => {
1269
+ const { __scopeSelect: e, ...t } = r;
1256
1270
  return /* @__PURE__ */ d(N.div, { "aria-hidden": !0, ...t, ref: s });
1257
1271
  }
1258
1272
  );
1259
1273
  qe.displayName = ko;
1260
- const Re = "SelectArrow", Xe = r.forwardRef(
1261
- (n, s) => {
1262
- const { __scopeSelect: e, ...t } = n, o = ve(e), l = q(Re, e), i = Q(Re, e);
1263
- return l.open && i.position === "popper" ? /* @__PURE__ */ d(le.Arrow, { ...o, ...t, ref: s }) : null;
1274
+ const Re = "SelectArrow", Xe = l.forwardRef(
1275
+ (r, s) => {
1276
+ const { __scopeSelect: e, ...t } = r, o = ve(e), n = Y(Re, e), i = J(Re, e);
1277
+ return n.open && i.position === "popper" ? /* @__PURE__ */ d(re.Arrow, { ...o, ...t, ref: s }) : null;
1264
1278
  }
1265
1279
  );
1266
1280
  Xe.displayName = Re;
1267
- const Fo = "BubbleSelect", Lo = r.forwardRef(
1268
- (n, s) => {
1269
- const { value: e, ...t } = n, o = r.useRef(null), l = _(s, o), i = _t(e), c = q(Fo, void 0);
1270
- r.useEffect(() => {
1271
- const g = o.current, f = window.HTMLSelectElement.prototype, p = Object.getOwnPropertyDescriptor(f, "value").set;
1272
- if (i !== e && p) {
1281
+ const Fo = "BubbleSelect", Lo = l.forwardRef(
1282
+ (r, s) => {
1283
+ const { value: e, ...t } = r, o = l.useRef(null), n = _(s, o), i = _t(e), c = Y(Fo, void 0);
1284
+ l.useEffect(() => {
1285
+ const g = o.current, p = window.HTMLSelectElement.prototype, f = Object.getOwnPropertyDescriptor(p, "value").set;
1286
+ if (i !== e && f) {
1273
1287
  const u = new Event("change", { bubbles: !0 });
1274
- p.call(g, e), g.dispatchEvent(u);
1288
+ f.call(g, e), g.dispatchEvent(u);
1275
1289
  }
1276
1290
  }, [i, e]);
1277
1291
  let a = e;
@@ -1280,15 +1294,15 @@ const Fo = "BubbleSelect", Lo = r.forwardRef(
1280
1294
  {
1281
1295
  ...t,
1282
1296
  multiple: c.multi ? !0 : void 0,
1283
- ref: l,
1297
+ ref: n,
1284
1298
  defaultValue: a
1285
1299
  }
1286
1300
  ) });
1287
1301
  }
1288
1302
  );
1289
1303
  Lo.displayName = "BubbleSelect";
1290
- function Vt(n) {
1291
- const s = At(n), e = r.useRef(""), t = r.useRef(0), o = r.useCallback(
1304
+ function Vt(r) {
1305
+ const s = At(r), e = l.useRef(""), t = l.useRef(0), o = l.useCallback(
1292
1306
  (i) => {
1293
1307
  const c = e.current + i;
1294
1308
  s(c), function a(g) {
@@ -1296,26 +1310,26 @@ function Vt(n) {
1296
1310
  }(c);
1297
1311
  },
1298
1312
  [s]
1299
- ), l = r.useCallback(() => {
1313
+ ), n = l.useCallback(() => {
1300
1314
  e.current = "", window.clearTimeout(t.current);
1301
1315
  }, []);
1302
- return r.useEffect(() => () => window.clearTimeout(t.current), []), [e, o, l];
1316
+ return l.useEffect(() => () => window.clearTimeout(t.current), []), [e, o, n];
1303
1317
  }
1304
- function Et(n, s, e) {
1305
- const o = s.length > 1 && Array.from(s).every((g) => g === s[0]) ? s[0] : s, l = e ? n.indexOf(e) : -1;
1306
- let i = Bo(n, Math.max(l, 0));
1318
+ function Pt(r, s, e) {
1319
+ const o = s.length > 1 && Array.from(s).every((g) => g === s[0]) ? s[0] : s, n = e ? r.indexOf(e) : -1;
1320
+ let i = Bo(r, Math.max(n, 0));
1307
1321
  o.length === 1 && (i = i.filter((g) => g !== e));
1308
1322
  const a = i.find((g) => g.textValue.toLowerCase().startsWith(o.toLowerCase()));
1309
1323
  return a !== e ? a : void 0;
1310
1324
  }
1311
- function Bo(n, s) {
1312
- return n.map((e, t) => n[(s + t) % n.length]);
1325
+ function Bo(r, s) {
1326
+ return r.map((e, t) => r[(s + t) % r.length]);
1313
1327
  }
1314
- const Pt = (n, s = []) => {
1315
- if (Array.isArray(n))
1316
- return n.reduce((t, o) => Pt(o, t), s);
1317
- const e = s.indexOf(n);
1318
- return e === -1 ? [...s, n] : [...s.slice(0, e), ...s.slice(e + 1)];
1328
+ const Et = (r, s = []) => {
1329
+ if (Array.isArray(r))
1330
+ return r.reduce((t, o) => Et(o, t), s);
1331
+ const e = s.indexOf(r);
1332
+ return e === -1 ? [...s, r] : [...s.slice(0, e), ...s.slice(e + 1)];
1319
1333
  }, Ho = Oe, $o = De, Uo = ke, Ko = Fe, Wo = Le, zo = Be, Go = $e, jo = Ue, Yo = Ke, qo = We, Xo = ze, Zo = Ge, Jo = je, Qo = Ye, en = qe, tn = Xe, Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1320
1334
  __proto__: null,
1321
1335
  Arrow: tn,
@@ -1355,5 +1369,6 @@ const Pt = (n, s = []) => {
1355
1369
  export {
1356
1370
  Tn as Combobox,
1357
1371
  Vn as Select,
1358
- Rn as useCallbackRef
1372
+ Rn as composeEventHandlers,
1373
+ An as useCallbackRef
1359
1374
  };