@telegraph/combobox 0.0.76 → 0.0.78

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.
@@ -1,62 +1,330 @@
1
- import { jsx as p, jsxs as S, Fragment as K } from "react/jsx-runtime";
2
- import { DismissableLayer as U } from "@radix-ui/react-dismissable-layer";
3
- import * as W from "@radix-ui/react-portal";
4
- import { useControllableState as J } from "@radix-ui/react-use-controllable-state";
5
- import * as Z from "@radix-ui/react-visually-hidden";
6
- import { Button as E } from "@telegraph/button";
7
- import { useComposedRefs as j } from "@telegraph/compose-refs";
8
- import { RefToTgphRef as ee } from "@telegraph/helpers";
9
- import { Lucide as R, Icon as N } from "@telegraph/icon";
10
- import { Input as te } from "@telegraph/input";
11
- import { Stack as I, Box as _ } from "@telegraph/layout";
1
+ import { jsx as l, jsxs as R, Fragment as _ } from "react/jsx-runtime";
2
+ import { DismissableLayer as Z } from "@radix-ui/react-dismissable-layer";
3
+ import * as ee from "@radix-ui/react-portal";
4
+ import { useControllableState as te } from "@radix-ui/react-use-controllable-state";
5
+ import * as oe from "@radix-ui/react-visually-hidden";
6
+ import { Button as B } from "@telegraph/button";
7
+ import { useComposedRefs as $ } from "@telegraph/compose-refs";
8
+ import { RefToTgphRef as re } from "@telegraph/helpers";
9
+ import { Lucide as E, Icon as z } from "@telegraph/icon";
10
+ import { Input as ne } from "@telegraph/input";
11
+ import { Stack as I, Box as G } from "@telegraph/layout";
12
12
  import { Menu as Q } from "@telegraph/menu";
13
- import { motion as B, AnimatePresence as P } from "@telegraph/motion";
14
- import { Tag as L } from "@telegraph/tag";
15
- import { Tooltip as oe } from "@telegraph/tooltip";
16
- import { Text as M } from "@telegraph/typography";
17
- import i from "react";
18
- const ne = {
13
+ import { Text as H } from "@telegraph/typography";
14
+ import s from "react";
15
+ import { motion as P, AnimatePresence as M } from "@telegraph/motion";
16
+ import { Tag as K } from "@telegraph/tag";
17
+ import { Tooltip as ae } from "@telegraph/tooltip";
18
+ const ie = {
19
19
  0: "5",
20
20
  1: "6",
21
21
  2: "8",
22
22
  3: "10"
23
- }, k = (t) => Array.isArray(t), T = (t) => typeof t == "object" && !Array.isArray(t) || typeof t == "string" || !t, re = (t) => {
24
- const a = (r, c = []) => (i.Children.toArray(r).forEach((n) => {
25
- i.isValidElement(n) && (n.props.value ? c.push(n) : n.props.children && a(n.props.children, c));
23
+ }, S = (t) => Array.isArray(t), k = (t) => typeof t == "object" && !Array.isArray(t) || typeof t == "string" || !t, ce = (t) => {
24
+ const o = (a, c = []) => (s.Children.toArray(a).forEach((i) => {
25
+ s.isValidElement(i) && (i.props.value ? c.push(i) : i.props.children && o(i.props.children, c));
26
26
  }), c);
27
- return a(t).map((r) => {
28
- var o;
29
- const c = r;
27
+ return o(t).map((a) => {
28
+ var n;
29
+ const c = a;
30
30
  return {
31
31
  value: c.props.value,
32
- label: ((o = c.props) == null ? void 0 : o.label) || c.props.children || c.props.value
32
+ label: ((n = c.props) == null ? void 0 : n.label) || c.props.children || c.props.value
33
33
  };
34
34
  });
35
- }, C = (t, a) => {
35
+ }, C = (t, o) => {
36
36
  if (t)
37
- return a === !0 ? t == null ? void 0 : t.value : t;
38
- }, F = (t, a, e) => {
39
- if (!t || !a || a.length === 0) return;
40
- const l = a.find(
41
- (r) => r.value === C(t, e)
37
+ return o === !0 ? t == null ? void 0 : t.value : t;
38
+ }, F = (t, o, e) => {
39
+ if (!t || !o || o.length === 0) return;
40
+ const r = o.find(
41
+ (a) => a.value === C(t, e)
42
42
  );
43
- if (l)
44
- return l;
45
- }, ae = ({
43
+ if (r)
44
+ return r;
45
+ }, se = ({
46
46
  children: t,
47
- value: a,
47
+ value: o,
48
48
  searchQuery: e
49
49
  }) => {
50
- const l = $(t);
51
- return (a == null ? void 0 : a.toLowerCase().includes(e.toLowerCase())) || l.some(
52
- (r) => r.toLowerCase().includes(e.toLowerCase())
50
+ const r = Y(t);
51
+ return (o == null ? void 0 : o.toLowerCase().includes(e.toLowerCase())) || r.some(
52
+ (a) => a.toLowerCase().includes(e.toLowerCase())
53
53
  );
54
- }, $ = (t) => {
55
- const a = i.Children.toArray(t), e = [];
56
- return a.forEach((l) => {
57
- typeof l == "string" && e.push(l), i.isValidElement(l) && l.props.children && e.push(...$(l.props.children));
54
+ }, Y = (t) => {
55
+ const o = s.Children.toArray(t), e = [];
56
+ return o.forEach((r) => {
57
+ typeof r == "string" && e.push(r), s.isValidElement(r) && r.props.children && e.push(...Y(r.props.children));
58
58
  }), e;
59
- }, ie = ["ArrowDown", "PageUp", "Home"], ce = ["ArrowUp", "PageDown", "End"], z = ["Enter", " "], x = i.createContext({
59
+ }, le = ({
60
+ icon: t = E.ChevronDown,
61
+ "aria-hidden": o = !0,
62
+ ...e
63
+ }) => {
64
+ const r = s.useContext(y);
65
+ return /* @__PURE__ */ l(
66
+ B.Icon,
67
+ {
68
+ as: P.span,
69
+ animate: { rotate: r.open ? 180 : 0 },
70
+ transition: { duration: 150, type: "spring" },
71
+ icon: t,
72
+ "aria-hidden": o,
73
+ ...e
74
+ }
75
+ );
76
+ }, ue = ({
77
+ tooltipProps: t,
78
+ ...o
79
+ }) => {
80
+ const e = s.useContext(y), r = () => {
81
+ var c, n;
82
+ if (S(e.value)) {
83
+ const i = e.onValueChange;
84
+ i == null || i([]);
85
+ }
86
+ if (k(e.value)) {
87
+ const i = e.onValueChange;
88
+ i == null || i(void 0);
89
+ }
90
+ (n = (c = e.triggerRef) == null ? void 0 : c.current) == null || n.focus();
91
+ };
92
+ return s.useMemo(() => {
93
+ var c;
94
+ if (k(e.value))
95
+ return e.clearable && e.value;
96
+ if (S(e.value))
97
+ return e.clearable && ((c = e.value) == null ? void 0 : c.length) > 0;
98
+ }, [e.clearable, e.value]) ? /* @__PURE__ */ l(ae, { label: "Clear field", ...t, children: /* @__PURE__ */ l(
99
+ B,
100
+ {
101
+ type: "button",
102
+ icon: { icon: E.X, alt: "Clear field" },
103
+ size: "1",
104
+ variant: "ghost",
105
+ onClick: (c) => {
106
+ e.value && (c.stopPropagation(), r());
107
+ },
108
+ onKeyDown: (c) => {
109
+ (c.key === "Enter" || c.key === " ") && (c.stopPropagation(), r());
110
+ },
111
+ "data-tgph-combobox-clear": !0,
112
+ style: {
113
+ // Remove margin to make the clear button flush
114
+ // with the trigger button
115
+ marginTop: "calc(-1 * var(--tgph-spacing-1)",
116
+ marginBottom: "calc(-1 * var(--tgph-spacing-1)"
117
+ },
118
+ ...o
119
+ }
120
+ ) }) : null;
121
+ }, pe = ({
122
+ children: t,
123
+ ...o
124
+ }) => {
125
+ const e = s.useContext(y), r = s.useMemo(() => {
126
+ var i;
127
+ if (!k(e.value)) return;
128
+ const a = F(
129
+ e.value,
130
+ e.options,
131
+ e.legacyBehavior
132
+ ), c = (a == null ? void 0 : a.label) || (a == null ? void 0 : a.value) || e.placeholder, n = e.legacyBehavior && ((i = e == null ? void 0 : e.value) == null ? void 0 : i.label);
133
+ return n || c;
134
+ }, [
135
+ e.value,
136
+ e.options,
137
+ e.legacyBehavior,
138
+ e.placeholder
139
+ ]);
140
+ return /* @__PURE__ */ l(
141
+ B.Text,
142
+ {
143
+ color: e.value ? "default" : "gray",
144
+ textOverflow: "ellipsis",
145
+ overflow: "hidden",
146
+ ...o,
147
+ children: t || r
148
+ }
149
+ );
150
+ }, ge = ({
151
+ children: t,
152
+ ...o
153
+ }) => {
154
+ const e = s.useContext(y);
155
+ return /* @__PURE__ */ l(B.Text, { color: "gray", ...o, children: t || e.placeholder });
156
+ }, fe = ({ children: t }) => {
157
+ const o = s.useContext(y);
158
+ if (!S(o.value)) return null;
159
+ const e = o.layout || "truncate", a = (o.value.length - 2).toString().split("");
160
+ return /* @__PURE__ */ R(
161
+ I,
162
+ {
163
+ gap: "1",
164
+ w: "full",
165
+ wrap: e === "wrap" ? "wrap" : "nowrap",
166
+ align: "center",
167
+ style: {
168
+ position: "relative",
169
+ flexGrow: 1
170
+ },
171
+ children: [
172
+ /* @__PURE__ */ l(
173
+ M,
174
+ {
175
+ presenceMap: o.value.map((c) => ({
176
+ "tgph-motion-key": C(c, o.legacyBehavior) || "",
177
+ value: !0
178
+ })),
179
+ children: t
180
+ }
181
+ ),
182
+ /* @__PURE__ */ l(
183
+ M,
184
+ {
185
+ presenceMap: [
186
+ {
187
+ "tgph-motion-key": "combobox-more",
188
+ value: !0
189
+ }
190
+ ],
191
+ children: e === "truncate" && o.value.length > 2 && /* @__PURE__ */ l(
192
+ I,
193
+ {
194
+ as: P.div,
195
+ initial: { opacity: 0 },
196
+ animate: { opacity: 1 },
197
+ exit: { opacity: 0 },
198
+ transition: { duration: 100, type: "spring" },
199
+ h: "full",
200
+ pr: "1",
201
+ pl: "8",
202
+ align: "center",
203
+ "aria-label": `${o.value.length - 2} more selected`,
204
+ position: "absolute",
205
+ right: "0",
206
+ style: {
207
+ backgroundImage: "linear-gradient(to left, var(--tgph-surface-1) 0 60%, transparent 90% 100%)"
208
+ },
209
+ children: /* @__PURE__ */ R(H, { as: "span", size: "1", style: { whiteSpace: "nowrap" }, children: [
210
+ "+",
211
+ /* @__PURE__ */ R(
212
+ M,
213
+ {
214
+ presenceMap: a.map((c) => ({
215
+ "tgph-motion-key": c,
216
+ value: !0
217
+ })),
218
+ children: [
219
+ a.map((c) => /* @__PURE__ */ l(
220
+ G,
221
+ {
222
+ as: P.span,
223
+ initial: { opacity: 0 },
224
+ animate: { opacity: 1 },
225
+ exit: { opacity: 0 },
226
+ transition: { duration: 100, type: "spring" },
227
+ w: "2",
228
+ display: "inline-block",
229
+ "tgph-motion-key": c,
230
+ children: c
231
+ },
232
+ c
233
+ )),
234
+ " "
235
+ ]
236
+ }
237
+ ),
238
+ "more"
239
+ ] })
240
+ }
241
+ )
242
+ }
243
+ )
244
+ ]
245
+ }
246
+ );
247
+ }, j = s.createContext({
248
+ value: ""
249
+ }), he = ({
250
+ value: t,
251
+ children: o,
252
+ ...e
253
+ }) => /* @__PURE__ */ l(j.Provider, { value: { value: t }, children: /* @__PURE__ */ l(
254
+ K.Root,
255
+ {
256
+ as: P.span,
257
+ initializeWithAnimation: !1,
258
+ initial: { opacity: 0, scale: 0.5 },
259
+ animate: { opacity: 1, scale: 1 },
260
+ exit: { opacity: 0, scale: 0.5 },
261
+ transition: { duration: 100, type: "spring" },
262
+ "tgph-motion-key": t,
263
+ size: "1",
264
+ layout: "position",
265
+ ...e,
266
+ children: o
267
+ }
268
+ ) }), de = ({
269
+ children: t,
270
+ ...o
271
+ }) => {
272
+ const e = s.useContext(y), r = s.useContext(j), a = s.useMemo(() => {
273
+ const c = e.options.find(
274
+ (p) => p.value === r.value
275
+ );
276
+ if (c) return c.label || c.value;
277
+ if (!e.value) return;
278
+ const i = e.value.find(
279
+ (p) => C(p, e.legacyBehavior) === r.value
280
+ );
281
+ if (i)
282
+ return i;
283
+ }, [
284
+ e.options,
285
+ e.value,
286
+ r.value,
287
+ e.legacyBehavior
288
+ ]);
289
+ return /* @__PURE__ */ l(K.Text, { ...o, children: t || a });
290
+ }, me = ({
291
+ children: t,
292
+ ...o
293
+ }) => {
294
+ const e = s.useContext(y), r = s.useContext(j);
295
+ return /* @__PURE__ */ l(
296
+ K.Button,
297
+ {
298
+ icon: { icon: E.X, alt: `Remove ${r.value}` },
299
+ onClick: (a) => {
300
+ if (!e.onValueChange) return;
301
+ const c = e.onValueChange, i = e.value.filter((p) => C(p, e.legacyBehavior) !== r.value);
302
+ c == null || c(i), a.stopPropagation(), a.preventDefault();
303
+ },
304
+ ...o,
305
+ children: t
306
+ }
307
+ );
308
+ }, ye = ({
309
+ value: t,
310
+ children: o,
311
+ ...e
312
+ }) => /* @__PURE__ */ R(D.Root, { value: t, ...e, children: [
313
+ /* @__PURE__ */ l(D.Text, { children: o }),
314
+ /* @__PURE__ */ l(D.Button, {})
315
+ ] }), D = {
316
+ Root: he,
317
+ Text: de,
318
+ Button: me,
319
+ Default: ye
320
+ }, T = {
321
+ TriggerIndicator: le,
322
+ TriggerClear: ue,
323
+ TriggerText: pe,
324
+ TriggerPlaceholder: ge,
325
+ TriggerTagsContainer: fe,
326
+ TriggerTag: D
327
+ }, be = ["ArrowDown", "PageUp", "Home"], xe = ["ArrowUp", "PageDown", "End"], X = ["Enter", " "], y = s.createContext({
60
328
  value: void 0,
61
329
  onValueChange: () => {
62
330
  },
@@ -71,405 +339,210 @@ const ne = {
71
339
  disabled: !1,
72
340
  options: [],
73
341
  legacyBehavior: !1
74
- }), se = ({
342
+ }), ve = ({
75
343
  modal: t = !0,
76
- closeOnSelect: a = !0,
344
+ closeOnSelect: o = !0,
77
345
  clearable: e = !1,
78
- disabled: l = !1,
79
- legacyBehavior: r = !1,
346
+ disabled: r = !1,
347
+ legacyBehavior: a = !1,
80
348
  open: c,
81
- onOpenChange: o,
82
- defaultOpen: n,
83
- value: s,
84
- onValueChange: f,
85
- errored: y,
349
+ onOpenChange: n,
350
+ defaultOpen: i,
351
+ value: p,
352
+ onValueChange: g,
353
+ errored: b,
86
354
  placeholder: v,
87
355
  layout: d,
88
356
  children: u,
89
- ...g
357
+ ...f
90
358
  }) => {
91
- const m = i.useId(), b = i.useId(), h = i.useRef(null), w = i.useRef(null), V = i.useRef(null), D = i.useMemo(() => re(u), [u]), [Y, H] = i.useState(""), [O = !1, A] = J({
359
+ const m = s.useId(), x = s.useId(), h = s.useRef(null), w = s.useRef(null), L = s.useRef(null), V = s.useMemo(() => ce(u), [u]), [U, N] = s.useState(""), [O = !1, A] = te({
92
360
  prop: c,
93
- defaultProp: n,
94
- onChange: o
95
- }), X = i.useCallback(() => {
96
- A((q) => !q);
361
+ defaultProp: i,
362
+ onChange: n
363
+ }), W = s.useCallback(() => {
364
+ A((J) => !J);
97
365
  }, [A]);
98
- return i.useEffect(() => {
99
- O || H("");
100
- }, [O]), /* @__PURE__ */ p(
101
- x.Provider,
366
+ return s.useEffect(() => {
367
+ O || N("");
368
+ }, [O]), /* @__PURE__ */ l(
369
+ y.Provider,
102
370
  {
103
371
  value: {
104
372
  contentId: m,
105
- triggerId: b,
106
- value: s,
373
+ triggerId: x,
374
+ value: p,
107
375
  // Need to cast this to avoid type errors
108
376
  // because the type of onValueChange is not
109
377
  // consistent with the value type
110
- onValueChange: f,
378
+ onValueChange: g,
111
379
  placeholder: v,
112
380
  open: O,
113
381
  setOpen: A,
114
- onOpenToggle: X,
115
- closeOnSelect: a,
382
+ onOpenToggle: W,
383
+ closeOnSelect: o,
116
384
  clearable: e,
117
- disabled: l,
118
- searchQuery: Y,
119
- setSearchQuery: H,
385
+ disabled: r,
386
+ searchQuery: U,
387
+ setSearchQuery: N,
120
388
  triggerRef: h,
121
389
  searchRef: w,
122
- contentRef: V,
123
- errored: y,
390
+ contentRef: L,
391
+ errored: b,
124
392
  layout: d,
125
- options: D,
126
- legacyBehavior: r
393
+ options: V,
394
+ legacyBehavior: a
127
395
  },
128
- children: /* @__PURE__ */ p(
396
+ children: /* @__PURE__ */ l(
129
397
  Q.Root,
130
398
  {
131
399
  open: O,
132
400
  onOpenChange: A,
133
401
  modal: t,
134
- ...g,
402
+ ...f,
135
403
  children: u
136
404
  }
137
405
  )
138
406
  }
139
407
  );
140
- }, le = ({ value: t, ...a }) => {
141
- const e = i.useContext(x), l = i.useMemo(() => {
142
- const r = e.options.find((n) => n.value === t);
143
- if (r) return r.label || r.value;
144
- if (!e.value) return;
145
- const o = e.value.find(
146
- (n) => C(n, e.legacyBehavior) === t
147
- );
148
- if (o)
149
- return o;
150
- }, [e.options, e.value, t, e.legacyBehavior]);
151
- return /* @__PURE__ */ S(
152
- L.Root,
153
- {
154
- as: B.span,
155
- initializeWithAnimation: !1,
156
- initial: { opacity: 0, scale: 0.5 },
157
- animate: { opacity: 1, scale: 1 },
158
- exit: { opacity: 0, scale: 0.5 },
159
- transition: { duration: 100, type: "spring" },
160
- "tgph-motion-key": t,
161
- size: "1",
162
- layout: "position",
163
- ...a,
164
- children: [
165
- /* @__PURE__ */ p(L.Text, { children: l }),
166
- /* @__PURE__ */ p(
167
- L.Button,
168
- {
169
- icon: { icon: R.X, alt: `Remove ${t}` },
170
- onClick: (r) => {
171
- if (!e.onValueChange) return;
172
- const c = e.onValueChange, n = e.value.filter((s) => C(s, e.legacyBehavior) !== t);
173
- c == null || c(n), r.stopPropagation(), r.preventDefault();
174
- }
175
- }
176
- )
177
- ]
178
- }
179
- );
180
- }, ue = () => {
181
- var a;
182
- const t = i.useContext(x);
183
- if (t.value && k(t.value)) {
184
- const e = t.layout || "truncate", l = t.value.length - 2, r = l.toString().split("");
185
- return t.value.length === 0 ? /* @__PURE__ */ p(E.Text, { color: "gray", children: t.placeholder }) : /* @__PURE__ */ S(
186
- I,
187
- {
188
- gap: "1",
189
- w: "full",
190
- wrap: e === "wrap" ? "wrap" : "nowrap",
191
- align: "center",
192
- style: {
193
- position: "relative",
194
- flexGrow: 1
195
- },
196
- children: [
197
- /* @__PURE__ */ p(
198
- P,
199
- {
200
- presenceMap: t.value.map((c) => ({
201
- "tgph-motion-key": C(c, t.legacyBehavior) || "",
202
- value: !0
203
- })),
204
- children: t.value.map((c, o) => {
205
- const n = C(c, t.legacyBehavior);
206
- if (n && (e === "truncate" && o <= 1 || e === "wrap"))
207
- return /* @__PURE__ */ p(ee, { children: /* @__PURE__ */ p(le, { value: n }) }, n);
208
- })
209
- }
210
- ),
211
- /* @__PURE__ */ p(
212
- P,
213
- {
214
- presenceMap: [
215
- {
216
- "tgph-motion-key": "combobox-more",
217
- value: !0
218
- }
219
- ],
220
- children: e === "truncate" && t.value.length > 2 && /* @__PURE__ */ p(
221
- I,
222
- {
223
- as: B.div,
224
- initial: { opacity: 0 },
225
- animate: { opacity: 1 },
226
- exit: { opacity: 0 },
227
- transition: { duration: 100, type: "spring" },
228
- h: "full",
229
- pr: "1",
230
- pl: "8",
231
- align: "center",
232
- "aria-label": `${l} more selected`,
233
- position: "absolute",
234
- right: "0",
235
- style: {
236
- backgroundImage: "linear-gradient(to left, var(--tgph-surface-1) 0 60%, transparent 90% 100%)"
237
- },
238
- children: /* @__PURE__ */ S(M, { as: "span", size: "1", style: { whiteSpace: "nowrap" }, children: [
239
- "+",
240
- /* @__PURE__ */ S(
241
- P,
242
- {
243
- presenceMap: r.map((c) => ({
244
- "tgph-motion-key": c,
245
- value: !0
246
- })),
247
- children: [
248
- r.map((c) => /* @__PURE__ */ p(
249
- _,
250
- {
251
- as: B.span,
252
- initial: { opacity: 0 },
253
- animate: { opacity: 1 },
254
- exit: { opacity: 0 },
255
- transition: { duration: 100, type: "spring" },
256
- w: "2",
257
- display: "inline-block",
258
- "tgph-motion-key": c,
259
- children: c
260
- },
261
- c
262
- )),
263
- " "
264
- ]
265
- }
266
- ),
267
- "more"
268
- ] })
269
- }
270
- )
271
- }
272
- )
273
- ]
274
- }
275
- );
408
+ }, Ce = () => {
409
+ const t = s.useContext(y);
410
+ if (t.value && S(t.value)) {
411
+ const o = t.layout || "truncate";
412
+ return t.value.length === 0 ? /* @__PURE__ */ l(T.TriggerPlaceholder, {}) : /* @__PURE__ */ l(T.TriggerTagsContainer, { children: t.value.map((e, r) => {
413
+ const a = C(e, t.legacyBehavior);
414
+ if (a && (o === "truncate" && r <= 1 || o === "wrap"))
415
+ return /* @__PURE__ */ l(re, { children: /* @__PURE__ */ l(T.TriggerTag.Default, { value: a }) }, a);
416
+ }) });
276
417
  }
277
- if (t && T(t.value)) {
278
- const e = F(
279
- t.value,
280
- t.options,
281
- t.legacyBehavior
282
- ), l = (e == null ? void 0 : e.label) || (e == null ? void 0 : e.value) || t.placeholder, r = t.legacyBehavior && ((a = t == null ? void 0 : t.value) == null ? void 0 : a.label);
283
- return /* @__PURE__ */ p(
284
- E.Text,
285
- {
286
- color: t.value ? "default" : "gray",
287
- textOverflow: "ellipsis",
288
- overflow: "hidden",
289
- children: r || l
290
- }
291
- );
292
- }
293
- }, pe = ({ size: t = "2", ...a }) => {
294
- const e = i.useContext(x), l = i.useCallback(() => {
295
- var o;
296
- if (!e.value) return e.placeholder;
297
- if (T(e.value)) {
298
- const n = F(
299
- e.value,
300
- e.options,
301
- e.legacyBehavior
302
- );
303
- return (n == null ? void 0 : n.label) || e.placeholder;
304
- }
305
- if (k(e.value))
306
- return ((o = e.value) == null ? void 0 : o.map((n) => {
307
- const s = F(
308
- n,
309
- e.options,
310
- e.legacyBehavior
418
+ if (t && k(t.value))
419
+ return t.value ? /* @__PURE__ */ l(T.TriggerText, {}) : /* @__PURE__ */ l(T.TriggerPlaceholder, {});
420
+ }, Te = ({
421
+ size: t = "2",
422
+ children: o,
423
+ ...e
424
+ }) => {
425
+ const r = s.useContext(y), a = s.useMemo(() => {
426
+ if (r.value) {
427
+ if (k(r.value))
428
+ return F(
429
+ r.value,
430
+ r.options,
431
+ r.legacyBehavior
432
+ );
433
+ if (S(r.value))
434
+ return r.value.map(
435
+ (n) => F(n, r.options, r.legacyBehavior)
311
436
  );
312
- return s == null ? void 0 : s.label;
313
- }).join(", ")) || e.placeholder;
314
- }, [
315
- e.value,
316
- e.placeholder,
317
- e.options,
318
- e.legacyBehavior
319
- ]), r = i.useMemo(() => {
320
- var o;
321
- if (T(e.value))
322
- return e.clearable && e.value;
323
- if (k(e.value))
324
- return e.clearable && ((o = e.value) == null ? void 0 : o.length) > 0;
325
- }, [e.clearable, e.value]), c = () => {
326
- var o, n;
327
- if (k(e.value)) {
328
- const s = e.onValueChange;
329
- s == null || s([]);
330
- }
331
- if (T(e.value)) {
332
- const s = e.onValueChange;
333
- s == null || s(void 0);
334
437
  }
335
- (n = (o = e.triggerRef) == null ? void 0 : o.current) == null || n.focus();
336
- };
337
- return /* @__PURE__ */ p(
438
+ }, [r.value, r.options, r.legacyBehavior]), c = s.useCallback(() => a ? k(a) ? (a == null ? void 0 : a.label) || (a == null ? void 0 : a.value) || r.placeholder : S(a) && a.map((n) => (n == null ? void 0 : n.label) || (n == null ? void 0 : n.value)).join(", ") || r.placeholder : r.placeholder, [a, r.placeholder]);
439
+ return /* @__PURE__ */ l(
338
440
  Q.Trigger,
339
441
  {
340
- ...a,
442
+ ...e,
341
443
  asChild: !0,
342
- onClick: (o) => {
343
- var n, s;
344
- o.preventDefault(), e.onOpenToggle(), (s = (n = e.triggerRef) == null ? void 0 : n.current) == null || s.focus();
444
+ onClick: (n) => {
445
+ var i, p;
446
+ n.preventDefault(), r.onOpenToggle(), (p = (i = r.triggerRef) == null ? void 0 : i.current) == null || p.focus();
345
447
  },
346
- onKeyDown: (o) => {
347
- if (o.key === "Tab") {
348
- o.stopPropagation();
448
+ onKeyDown: (n) => {
449
+ if (n.key === "Tab") {
450
+ n.stopPropagation();
349
451
  return;
350
452
  }
351
- if (z.includes(o.key)) {
352
- o.preventDefault();
453
+ if (X.includes(n.key)) {
454
+ n.preventDefault();
353
455
  return;
354
456
  }
355
- if (o.key === "ArrowDown") {
356
- o.stopPropagation(), o.preventDefault(), e.onOpenToggle();
457
+ if (n.key === "ArrowDown") {
458
+ n.stopPropagation(), n.preventDefault(), r.onOpenToggle();
357
459
  return;
358
460
  }
359
461
  },
360
- tgphRef: e.triggerRef,
361
- children: /* @__PURE__ */ S(
362
- E.Root,
462
+ tgphRef: r.triggerRef,
463
+ children: /* @__PURE__ */ R(
464
+ B.Root,
363
465
  {
364
- id: e.triggerId,
466
+ id: r.triggerId,
365
467
  type: "button",
366
468
  bg: "surface-1",
367
469
  variant: "outline",
368
470
  align: "center",
369
- minH: ne[t],
471
+ minH: ie[t],
370
472
  h: "full",
371
473
  w: "full",
372
474
  py: "1",
373
475
  size: t,
374
- color: e.errored ? "red" : "gray",
476
+ color: r.errored ? "red" : "gray",
375
477
  justify: "space-between",
376
478
  role: "combobox",
377
- "aria-label": l(),
378
- "aria-controls": e.contentId,
379
- "aria-expanded": e.open,
479
+ "aria-label": c(),
480
+ "aria-controls": r.contentId,
481
+ "aria-expanded": r.open,
380
482
  "aria-haspopup": "listbox",
381
483
  "data-tgph-combobox-trigger": !0,
382
- "data-tgph-combobox-trigger-open": e.open,
383
- disabled: e.disabled,
484
+ "data-tgph-combobox-trigger-open": r.open,
485
+ disabled: r.disabled,
486
+ ...e,
384
487
  children: [
385
- /* @__PURE__ */ p(ue, {}),
386
- /* @__PURE__ */ S(I, { align: "center", gap: "1", children: [
387
- r && /* @__PURE__ */ p(oe, { label: "Clear field", children: /* @__PURE__ */ p(
388
- E,
389
- {
390
- type: "button",
391
- icon: { icon: R.X, alt: "Clear field" },
392
- size: "1",
393
- variant: "ghost",
394
- onClick: (o) => {
395
- e.value && (o.stopPropagation(), c());
396
- },
397
- onKeyDown: (o) => {
398
- (o.key === "Enter" || o.key === " ") && (o.stopPropagation(), c());
399
- },
400
- "data-tgph-combobox-clear": !0,
401
- style: {
402
- // Remove margin to make the clear button flush
403
- // with the trigger button
404
- marginTop: "calc(-1 * var(--tgph-spacing-1)",
405
- marginBottom: "calc(-1 * var(--tgph-spacing-1)"
406
- }
407
- }
408
- ) }),
409
- /* @__PURE__ */ p(
410
- E.Icon,
411
- {
412
- as: B.span,
413
- animate: { rotate: e.open ? 180 : 0 },
414
- transition: { duration: 150, type: "spring" },
415
- icon: R.ChevronDown,
416
- "aria-hidden": !0
417
- }
418
- )
488
+ o ? typeof o == "function" ? o({ value: a }) : o : /* @__PURE__ */ l(Ce, {}),
489
+ /* @__PURE__ */ R(I, { align: "center", gap: "1", children: [
490
+ /* @__PURE__ */ l(T.TriggerClear, {}),
491
+ /* @__PURE__ */ l(T.TriggerIndicator, {})
419
492
  ] })
420
493
  ]
421
494
  }
422
495
  )
423
496
  }
424
497
  );
425
- }, fe = ({
498
+ }, Re = ({
426
499
  style: t,
427
- children: a,
500
+ children: o,
428
501
  tgphRef: e,
429
- ...l
502
+ ...r
430
503
  }) => {
431
- const r = i.useContext(x), c = i.useRef(!1), o = j(e, r.contentRef), n = i.useRef(null), [s, f] = i.useState(0), [y, v] = i.useState(!1), d = i.useCallback(
504
+ const a = s.useContext(y), c = s.useRef(!1), n = $(e, a.contentRef), i = s.useRef(null), [p, g] = s.useState(0), [b, v] = s.useState(!1), d = s.useCallback(
432
505
  (u) => {
433
- const g = u == null ? void 0 : u.getBoundingClientRect();
434
- g && f(g.height), y || v(!0);
506
+ const f = u == null ? void 0 : u.getBoundingClientRect();
507
+ f && g(f.height), b || v(!0);
435
508
  },
436
- [y]
509
+ [b]
437
510
  );
438
- return i.useEffect(() => {
439
- const u = new ResizeObserver((g) => {
440
- for (const m of g) {
441
- const b = m.target;
442
- d(b);
511
+ return s.useEffect(() => {
512
+ const u = new ResizeObserver((f) => {
513
+ for (const m of f) {
514
+ const x = m.target;
515
+ d(x);
443
516
  }
444
517
  });
445
- return n.current && y && u.observe(n.current), () => u.disconnect();
446
- }, [y, d]), i.useEffect(() => {
447
- y === !0 && r.open === !1 && v(!1);
448
- }, [r.open, y]), i.useEffect(() => {
518
+ return i.current && b && u.observe(i.current), () => u.disconnect();
519
+ }, [b, d]), s.useEffect(() => {
520
+ b === !0 && a.open === !1 && v(!1);
521
+ }, [a.open, b]), s.useEffect(() => {
449
522
  let u;
450
- return r.open && (u = setTimeout(() => {
451
- d(n.current);
523
+ return a.open && (u = setTimeout(() => {
524
+ d(i.current);
452
525
  }, 10)), () => u && clearTimeout(u);
453
- }, [r.open, d]), /* @__PURE__ */ p(W.Root, { asChild: !0, children: /* @__PURE__ */ p(
454
- U,
526
+ }, [a.open, d]), /* @__PURE__ */ l(ee.Root, { asChild: !0, children: /* @__PURE__ */ l(
527
+ Z,
455
528
  {
456
529
  onEscapeKeyDown: (u) => {
457
- r.open && (u.stopPropagation(), u.preventDefault(), r.setOpen(!1));
530
+ a.open && (u.stopPropagation(), u.preventDefault(), a.setOpen(!1));
458
531
  },
459
- children: /* @__PURE__ */ p(
532
+ children: /* @__PURE__ */ l(
460
533
  Q.Content,
461
534
  {
462
535
  className: "tgph",
463
536
  mt: "1",
464
537
  onCloseAutoFocus: (u) => {
465
- var g, m;
466
- c.current || (m = (g = r.triggerRef) == null ? void 0 : g.current) == null || m.focus(), c.current = !1, u.preventDefault();
538
+ var f, m;
539
+ c.current || (m = (f = a.triggerRef) == null ? void 0 : f.current) == null || m.focus(), c.current = !1, u.preventDefault();
467
540
  },
468
541
  bg: "surface-1",
469
542
  style: {
470
543
  width: "var(--tgph-combobox-trigger-width)",
471
544
  transition: "min-height 200ms ease-in-out",
472
- minHeight: s ? `${s}px` : "0",
545
+ minHeight: p ? `${p}px` : "0",
473
546
  ...t,
474
547
  "--tgph-combobox-content-transform-origin": "var(--radix-popper-transform-origin)",
475
548
  "--tgph-combobox-content-available-width": "var(--radix-popper-available-width)",
@@ -477,31 +550,31 @@ const ne = {
477
550
  "--tgph-combobox-trigger-width": "var(--radix-popper-anchor-width)",
478
551
  "--tgph-combobox-trigger-height": "var(--radix-popper-anchor-height)"
479
552
  },
480
- ...l,
481
- tgphRef: o,
553
+ ...r,
554
+ tgphRef: n,
482
555
  "data-tgph-combobox-content": !0,
483
- "data-tgph-combobox-content-open": r.open,
556
+ "data-tgph-combobox-content-open": a.open,
484
557
  role: void 0,
485
558
  "aria-orientation": void 0,
486
559
  onKeyDown: (u) => {
487
- var m, b, h, w;
560
+ var m, x, h, w;
488
561
  u.stopPropagation();
489
- const g = (b = (m = r.contentRef) == null ? void 0 : m.current) == null ? void 0 : b.querySelectorAll(
562
+ const f = (x = (m = a.contentRef) == null ? void 0 : m.current) == null ? void 0 : x.querySelectorAll(
490
563
  "[data-tgph-combobox-option]"
491
564
  );
492
- document.activeElement === (g == null ? void 0 : g[0]) && ce.includes(u.key) && ((w = (h = r.searchRef) == null ? void 0 : h.current) == null || w.focus());
565
+ document.activeElement === (f == null ? void 0 : f[0]) && xe.includes(u.key) && ((w = (h = a.searchRef) == null ? void 0 : h.current) == null || w.focus());
493
566
  },
494
- children: /* @__PURE__ */ p(I, { direction: "column", gap: "1", tgphRef: n, children: a })
567
+ children: /* @__PURE__ */ l(I, { direction: "column", gap: "1", tgphRef: i, children: o })
495
568
  }
496
569
  )
497
570
  }
498
571
  ) });
499
- }, ge = ({ ...t }) => {
500
- const a = i.useContext(x);
501
- return /* @__PURE__ */ p(
572
+ }, Se = ({ ...t }) => {
573
+ const o = s.useContext(y);
574
+ return /* @__PURE__ */ l(
502
575
  I,
503
576
  {
504
- id: a.contentId,
577
+ id: o.contentId,
505
578
  direction: "column",
506
579
  gap: "1",
507
580
  style: {
@@ -513,131 +586,131 @@ const ne = {
513
586
  ...t
514
587
  }
515
588
  );
516
- }, G = ({
589
+ }, q = ({
517
590
  value: t,
518
- label: a,
591
+ label: o,
519
592
  selected: e,
520
- onSelect: l,
521
- children: r,
593
+ onSelect: r,
594
+ children: a,
522
595
  ...c
523
596
  }) => {
524
- const o = i.useContext(x), [n, s] = i.useState(!1), f = o.value, y = !o.searchQuery || ae({
525
- children: a || r,
597
+ const n = s.useContext(y), [i, p] = s.useState(!1), g = n.value, b = !n.searchQuery || se({
598
+ children: o || a,
526
599
  value: t,
527
- searchQuery: o.searchQuery
528
- }), v = k(f) ? f.some(
529
- (u) => C(u, o.legacyBehavior) === t
530
- ) : C(f, o.legacyBehavior) === t, d = (u) => {
531
- var m, b;
600
+ searchQuery: n.searchQuery
601
+ }), v = S(g) ? g.some(
602
+ (u) => C(u, n.legacyBehavior) === t
603
+ ) : C(g, n.legacyBehavior) === t, d = (u) => {
604
+ var m, x;
532
605
  u.stopPropagation();
533
- const g = u;
534
- if (!(g.key && !z.includes(g.key))) {
535
- if (u.preventDefault(), o.closeOnSelect === !0 && o.setOpen(!1), l)
536
- return l(u);
537
- if (T(f)) {
538
- const h = o.onValueChange;
539
- o.legacyBehavior === !0 ? h == null || h({ value: t, label: a }) : h == null || h(t);
540
- } else if (k(f)) {
541
- const h = o.onValueChange, w = o.value, V = v ? w.filter(
542
- (D) => C(D, o.legacyBehavior) !== t
606
+ const f = u;
607
+ if (!(f.key && !X.includes(f.key))) {
608
+ if (u.preventDefault(), n.closeOnSelect === !0 && n.setOpen(!1), r)
609
+ return r(u);
610
+ if (k(g)) {
611
+ const h = n.onValueChange;
612
+ n.legacyBehavior === !0 ? h == null || h({ value: t, label: o }) : h == null || h(t);
613
+ } else if (S(g)) {
614
+ const h = n.onValueChange, w = n.value, L = v ? w.filter(
615
+ (V) => C(V, n.legacyBehavior) !== t
543
616
  ) : [
544
617
  ...w,
545
618
  // TODO: Remove this once { value, label } option is deprecated
546
- o.legacyBehavior === !0 ? { value: t, label: a } : t
619
+ n.legacyBehavior === !0 ? { value: t, label: o } : t
547
620
  ];
548
- h == null || h(V);
621
+ h == null || h(L);
549
622
  }
550
- (b = (m = o.triggerRef) == null ? void 0 : m.current) == null || b.focus();
623
+ (x = (m = n.triggerRef) == null ? void 0 : m.current) == null || x.focus();
551
624
  }
552
625
  };
553
- if (y)
554
- return /* @__PURE__ */ p(
626
+ if (b)
627
+ return /* @__PURE__ */ l(
555
628
  Q.Button,
556
629
  {
557
630
  type: "button",
558
631
  onSelect: d,
559
632
  onKeyDown: d,
560
633
  selected: e === null ? null : e ?? v,
561
- onFocus: () => s(!0),
562
- onBlur: () => s(!1),
634
+ onFocus: () => p(!0),
635
+ onBlur: () => p(!1),
563
636
  role: "option",
564
637
  "aria-selected": v ? "true" : "false",
565
638
  "data-tgph-combobox-option": !0,
566
- "data-tgph-combobox-option-focused": n,
639
+ "data-tgph-combobox-option-focused": i,
567
640
  "data-tgph-combobox-option-value": t,
568
- "data-tgph-combobox-option-label": a,
641
+ "data-tgph-combobox-option-label": o,
569
642
  ...c,
570
- children: a || r || t
643
+ children: o || a || t
571
644
  }
572
645
  );
573
- }, he = ({
646
+ }, we = ({
574
647
  label: t = "Search",
575
- placeholder: a = "Search",
648
+ placeholder: o = "Search",
576
649
  tgphRef: e,
577
- value: l,
578
- onValueChange: r,
650
+ value: r,
651
+ onValueChange: a,
579
652
  ...c
580
653
  }) => {
581
654
  var v;
582
- const o = i.useId(), n = i.useContext(x), s = j(e, n.searchRef), f = l ?? n.searchQuery, y = r ?? n.setSearchQuery;
583
- return i.useEffect(() => {
584
- var g;
655
+ const n = s.useId(), i = s.useContext(y), p = $(e, i.searchRef), g = r ?? i.searchQuery, b = a ?? i.setSearchQuery;
656
+ return s.useEffect(() => {
657
+ var f;
585
658
  const d = (m) => {
586
- var b, h;
587
- ie.includes(m.key) && ((h = (b = n.contentRef) == null ? void 0 : b.current) == null || h.focus({ preventScroll: !0 })), m.key === "Escape" && n.setOpen(!1), m.stopPropagation();
588
- }, u = (g = n.searchRef) == null ? void 0 : g.current;
659
+ var x, h;
660
+ be.includes(m.key) && ((h = (x = i.contentRef) == null ? void 0 : x.current) == null || h.focus({ preventScroll: !0 })), m.key === "Escape" && i.setOpen(!1), m.stopPropagation();
661
+ }, u = (f = i.searchRef) == null ? void 0 : f.current;
589
662
  if (u)
590
663
  return u.addEventListener("keydown", d), () => {
591
664
  u.removeEventListener("keydown", d);
592
665
  };
593
- }, [n]), /* @__PURE__ */ S(_, { borderBottom: "px", px: "1", pb: "1", children: [
594
- /* @__PURE__ */ p(Z.Root, { children: /* @__PURE__ */ p(M, { as: "label", htmlFor: o, children: t }) }),
595
- /* @__PURE__ */ p(
596
- te,
666
+ }, [i]), /* @__PURE__ */ R(G, { borderBottom: "px", px: "1", pb: "1", children: [
667
+ /* @__PURE__ */ l(oe.Root, { children: /* @__PURE__ */ l(H, { as: "label", htmlFor: n, children: t }) }),
668
+ /* @__PURE__ */ l(
669
+ ne,
597
670
  {
598
- id: o,
671
+ id: n,
599
672
  variant: "ghost",
600
- placeholder: a,
601
- value: f,
673
+ placeholder: o,
674
+ value: g,
602
675
  onChange: (d) => {
603
- y(d.target.value);
676
+ b(d.target.value);
604
677
  },
605
- LeadingComponent: /* @__PURE__ */ p(N, { icon: R.Search, alt: "Search Icon" }),
606
- TrailingComponent: n != null && n.searchQuery && ((v = n == null ? void 0 : n.searchQuery) == null ? void 0 : v.length) > 0 ? /* @__PURE__ */ p(
607
- E,
678
+ LeadingComponent: /* @__PURE__ */ l(z, { icon: E.Search, alt: "Search Icon" }),
679
+ TrailingComponent: i != null && i.searchQuery && ((v = i == null ? void 0 : i.searchQuery) == null ? void 0 : v.length) > 0 ? /* @__PURE__ */ l(
680
+ B,
608
681
  {
609
682
  variant: "ghost",
610
683
  color: "gray",
611
- icon: { icon: R.X, alt: "Clear Search Query" },
684
+ icon: { icon: E.X, alt: "Clear Search Query" },
612
685
  onClick: () => {
613
686
  var d;
614
- return (d = n.setSearchQuery) == null ? void 0 : d.call(n, "");
687
+ return (d = i.setSearchQuery) == null ? void 0 : d.call(i, "");
615
688
  }
616
689
  }
617
690
  ) : null,
618
691
  autoFocus: !0,
619
692
  "data-tgph-combobox-search": !0,
620
- "aria-controls": n.contentId,
693
+ "aria-controls": i.contentId,
621
694
  ...c,
622
- tgphRef: s
695
+ tgphRef: p
623
696
  }
624
697
  )
625
698
  ] });
626
- }, de = ({
627
- icon: t = { icon: R.Search, alt: "Search Icon" },
628
- message: a = "No results found",
699
+ }, Ee = ({
700
+ icon: t = { icon: E.Search, alt: "Search Icon" },
701
+ message: o = "No results found",
629
702
  children: e,
630
- ...l
703
+ ...r
631
704
  }) => {
632
- const r = i.useContext(x), [c, o] = i.useState(!1);
633
- if (i.useEffect(() => {
634
- var s, f;
635
- const n = (f = (s = r.contentRef) == null ? void 0 : s.current) == null ? void 0 : f.querySelectorAll(
705
+ const a = s.useContext(y), [c, n] = s.useState(!1);
706
+ if (s.useEffect(() => {
707
+ var p, g;
708
+ const i = (g = (p = a.contentRef) == null ? void 0 : p.current) == null ? void 0 : g.querySelectorAll(
636
709
  "[data-tgph-combobox-option]"
637
710
  );
638
- (n == null ? void 0 : n.length) === 0 ? o(!0) : o(!1);
639
- }, [r.searchQuery, r.contentRef, e]), c)
640
- return /* @__PURE__ */ S(
711
+ (i == null ? void 0 : i.length) === 0 ? n(!0) : n(!1);
712
+ }, [a.searchQuery, a.contentRef, e]), c)
713
+ return /* @__PURE__ */ R(
641
714
  I,
642
715
  {
643
716
  gap: "1",
@@ -646,58 +719,59 @@ const ne = {
646
719
  w: "full",
647
720
  my: "8",
648
721
  "data-tgph-combobox-empty": !0,
649
- ...l,
722
+ ...r,
650
723
  children: [
651
- t === null ? /* @__PURE__ */ p(K, {}) : /* @__PURE__ */ p(N, { ...t }),
652
- a === null ? /* @__PURE__ */ p(K, {}) : /* @__PURE__ */ p(M, { as: "span", children: a })
724
+ t === null ? /* @__PURE__ */ l(_, {}) : /* @__PURE__ */ l(z, { ...t }),
725
+ o === null ? /* @__PURE__ */ l(_, {}) : /* @__PURE__ */ l(H, { as: "span", children: o })
653
726
  ]
654
727
  }
655
728
  );
656
- }, me = ({
729
+ }, ke = ({
657
730
  leadingText: t = "Create",
658
- values: a,
731
+ values: o,
659
732
  onCreate: e,
660
- selected: l = null,
661
- legacyBehavior: r = !1,
733
+ selected: r = null,
734
+ legacyBehavior: a = !1,
662
735
  ...c
663
736
  }) => {
664
- const o = i.useContext(x), n = i.useCallback(
665
- (s) => !a || (a == null ? void 0 : a.length) === 0 ? !1 : a.some(
666
- (f) => C(f, r) === s
737
+ const n = s.useContext(y), i = s.useCallback(
738
+ (p) => !o || (o == null ? void 0 : o.length) === 0 ? !1 : o.some(
739
+ (g) => C(g, a) === p
667
740
  ),
668
- [a, r]
741
+ [o, a]
669
742
  );
670
- if (o.searchQuery && !n(o.searchQuery))
671
- return /* @__PURE__ */ p(
672
- G,
743
+ if (n.searchQuery && !i(n.searchQuery))
744
+ return /* @__PURE__ */ l(
745
+ q,
673
746
  {
674
- leadingIcon: { icon: R.Plus, "aria-hidden": !0 },
747
+ leadingIcon: { icon: E.Plus, "aria-hidden": !0 },
675
748
  mx: "1",
676
- value: o.searchQuery,
677
- label: `${t} "${o.searchQuery}"`,
678
- selected: l,
749
+ value: n.searchQuery,
750
+ label: `${t} "${n.searchQuery}"`,
751
+ selected: r,
679
752
  onSelect: () => {
680
- var s;
681
- if (e && o.value && o.searchQuery) {
682
- const f = r === !0 ? { value: o.searchQuery } : o.searchQuery;
683
- e(f), (s = o.setSearchQuery) == null || s.call(o, "");
753
+ var p;
754
+ if (e && n.value && n.searchQuery) {
755
+ const g = a === !0 ? { value: n.searchQuery } : n.searchQuery;
756
+ e(g), (p = n.setSearchQuery) == null || p.call(n, "");
684
757
  }
685
758
  },
686
759
  ...c
687
760
  }
688
761
  );
689
- }, ye = {};
690
- Object.assign(ye, {
691
- Root: se,
692
- Trigger: pe,
693
- Content: fe,
694
- Options: ge,
695
- Option: G,
696
- Search: he,
697
- Empty: de,
698
- Create: me
762
+ }, Ie = {};
763
+ Object.assign(Ie, {
764
+ Root: ve,
765
+ Trigger: Te,
766
+ Content: Re,
767
+ Options: Se,
768
+ Option: q,
769
+ Search: we,
770
+ Empty: Ee,
771
+ Create: ke,
772
+ Primitives: T
699
773
  });
700
774
  export {
701
- ye as Combobox
775
+ Ie as Combobox
702
776
  };
703
777
  //# sourceMappingURL=index.mjs.map