@boxcustodia/library 2.0.0-alpha.32 → 2.0.0-alpha.33

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,56 +1,57 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as p, Fragment as j } from "react/jsx-runtime";
2
+ import { jsx as t, jsxs as p, Fragment as P } from "react/jsx-runtime";
3
3
  import * as x from "react";
4
4
  import { Input as A, inputBaseClasses as B } from "../input/input.es.js";
5
- import P from "../../node_modules/lucide-react/dist/esm/icons/chevrons-up-down.es.js";
5
+ import T from "../../node_modules/lucide-react/dist/esm/icons/chevrons-up-down.es.js";
6
6
  import { useIsInsideFieldRoot as O } from "../field/field.es.js";
7
- import T from "../../node_modules/lucide-react/dist/esm/icons/x.es.js";
8
- import { useIsomorphicLayoutEffect as H } from "../../hooks/internal/use-isomorphic-layout-effect.es.js";
9
- import { useComboboxFilter as q } from "../../node_modules/@base-ui/react/combobox/root/utils/useFilter.es.js";
10
- import { ComboboxRoot as K } from "../../node_modules/@base-ui/react/combobox/root/ComboboxRoot.es.js";
7
+ import G from "../../node_modules/lucide-react/dist/esm/icons/x.es.js";
8
+ import { defaultGetId as H, defaultGetLabel as q } from "../../utils/internal/item.es.js";
9
+ import { useIsomorphicLayoutEffect as K } from "../../hooks/internal/use-isomorphic-layout-effect.es.js";
10
+ import { useComboboxFilter as X } from "../../node_modules/@base-ui/react/combobox/root/utils/useFilter.es.js";
11
+ import { ComboboxRoot as Q } from "../../node_modules/@base-ui/react/combobox/root/ComboboxRoot.es.js";
11
12
  import { ComboboxInput as $ } from "../../node_modules/@base-ui/react/combobox/input/ComboboxInput.es.js";
12
- import { cn as u } from "../../lib/cn.es.js";
13
- import { ComboboxInputGroup as X } from "../../node_modules/@base-ui/react/combobox/input-group/ComboboxInputGroup.es.js";
14
- import { ComboboxTrigger as I } from "../../node_modules/@base-ui/react/combobox/trigger/ComboboxTrigger.es.js";
13
+ import { cn as b } from "../../lib/cn.es.js";
14
+ import { ComboboxInputGroup as U } from "../../node_modules/@base-ui/react/combobox/input-group/ComboboxInputGroup.es.js";
15
+ import { ComboboxTrigger as S } from "../../node_modules/@base-ui/react/combobox/trigger/ComboboxTrigger.es.js";
15
16
  import { ComboboxValue as R } from "../../node_modules/@base-ui/react/combobox/value/ComboboxValue.es.js";
16
- import { ComboboxPortal as Q } from "../../node_modules/@base-ui/react/combobox/portal/ComboboxPortal.es.js";
17
- import { ComboboxPositioner as U } from "../../node_modules/@base-ui/react/combobox/positioner/ComboboxPositioner.es.js";
18
- import { ComboboxPopup as J } from "../../node_modules/@base-ui/react/combobox/popup/ComboboxPopup.es.js";
19
- import { ComboboxItem as Y } from "../../node_modules/@base-ui/react/combobox/item/ComboboxItem.es.js";
20
- import { ComboboxItemIndicator as Z } from "../../node_modules/@base-ui/react/combobox/item-indicator/ComboboxItemIndicator.es.js";
21
- import { Separator as oo } from "../../node_modules/@base-ui/react/separator/Separator.es.js";
22
- import { ComboboxGroup as eo } from "../../node_modules/@base-ui/react/combobox/group/ComboboxGroup.es.js";
23
- import { ComboboxGroupLabel as to } from "../../node_modules/@base-ui/react/combobox/group-label/ComboboxGroupLabel.es.js";
24
- import { ComboboxEmpty as ro } from "../../node_modules/@base-ui/react/combobox/empty/ComboboxEmpty.es.js";
25
- import { ComboboxRow as no } from "../../node_modules/@base-ui/react/combobox/row/ComboboxRow.es.js";
26
- import { ScrollArea as so } from "../scroll-area/scroll-area.es.js";
27
- import { ComboboxList as io } from "../../node_modules/@base-ui/react/combobox/list/ComboboxList.es.js";
28
- import { ComboboxClear as ao } from "../../node_modules/@base-ui/react/combobox/clear/ComboboxClear.es.js";
29
- import { ComboboxStatus as lo } from "../../node_modules/@base-ui/react/combobox/status/ComboboxStatus.es.js";
30
- import { ComboboxCollection as co } from "../../node_modules/@base-ui/react/combobox/collection/ComboboxCollection.es.js";
31
- import { FieldValidity as mo } from "../../node_modules/@base-ui/react/field/validity/FieldValidity.es.js";
32
- import { ComboboxChip as uo } from "../../node_modules/@base-ui/react/combobox/chip/ComboboxChip.es.js";
33
- import { ComboboxChipRemove as bo } from "../../node_modules/@base-ui/react/combobox/chip-remove/ComboboxChipRemove.es.js";
34
- import { ComboboxIcon as po } from "../../node_modules/@base-ui/react/combobox/icon/ComboboxIcon.es.js";
35
- import { ComboboxChips as fo } from "../../node_modules/@base-ui/react/combobox/chips/ComboboxChips.es.js";
36
- const w = x.createContext({
17
+ import { ComboboxPortal as J } from "../../node_modules/@base-ui/react/combobox/portal/ComboboxPortal.es.js";
18
+ import { ComboboxPositioner as Y } from "../../node_modules/@base-ui/react/combobox/positioner/ComboboxPositioner.es.js";
19
+ import { ComboboxPopup as Z } from "../../node_modules/@base-ui/react/combobox/popup/ComboboxPopup.es.js";
20
+ import { ComboboxItem as oo } from "../../node_modules/@base-ui/react/combobox/item/ComboboxItem.es.js";
21
+ import { ComboboxItemIndicator as eo } from "../../node_modules/@base-ui/react/combobox/item-indicator/ComboboxItemIndicator.es.js";
22
+ import { Separator as to } from "../../node_modules/@base-ui/react/separator/Separator.es.js";
23
+ import { ComboboxGroup as ro } from "../../node_modules/@base-ui/react/combobox/group/ComboboxGroup.es.js";
24
+ import { ComboboxGroupLabel as so } from "../../node_modules/@base-ui/react/combobox/group-label/ComboboxGroupLabel.es.js";
25
+ import { ComboboxEmpty as no } from "../../node_modules/@base-ui/react/combobox/empty/ComboboxEmpty.es.js";
26
+ import { ComboboxRow as io } from "../../node_modules/@base-ui/react/combobox/row/ComboboxRow.es.js";
27
+ import { ScrollArea as ao } from "../scroll-area/scroll-area.es.js";
28
+ import { ComboboxList as lo } from "../../node_modules/@base-ui/react/combobox/list/ComboboxList.es.js";
29
+ import { ComboboxClear as co } from "../../node_modules/@base-ui/react/combobox/clear/ComboboxClear.es.js";
30
+ import { ComboboxStatus as mo } from "../../node_modules/@base-ui/react/combobox/status/ComboboxStatus.es.js";
31
+ import { ComboboxCollection as bo } from "../../node_modules/@base-ui/react/combobox/collection/ComboboxCollection.es.js";
32
+ import { FieldValidity as uo } from "../../node_modules/@base-ui/react/field/validity/FieldValidity.es.js";
33
+ import { ComboboxChip as po } from "../../node_modules/@base-ui/react/combobox/chip/ComboboxChip.es.js";
34
+ import { ComboboxChipRemove as fo } from "../../node_modules/@base-ui/react/combobox/chip-remove/ComboboxChipRemove.es.js";
35
+ import { ComboboxIcon as xo } from "../../node_modules/@base-ui/react/combobox/icon/ComboboxIcon.es.js";
36
+ import { ComboboxChips as ho } from "../../node_modules/@base-ui/react/combobox/chips/ComboboxChips.es.js";
37
+ const y = x.createContext({
37
38
  chipsRef: null,
38
39
  multiple: !1
39
40
  });
40
- function xo({
41
+ function go({
41
42
  ...o
42
43
  }) {
43
44
  const e = x.useRef(null);
44
- return /* @__PURE__ */ t(w.Provider, { value: { chipsRef: e, multiple: !!o.multiple }, children: /* @__PURE__ */ t(K, { ...o }) });
45
+ return /* @__PURE__ */ t(y.Provider, { value: { chipsRef: e, multiple: !!o.multiple }, children: /* @__PURE__ */ t(Q, { ...o }) });
45
46
  }
46
- function ho({
47
+ function Co({
47
48
  className: o,
48
49
  ...e
49
50
  }) {
50
51
  return /* @__PURE__ */ t(
51
52
  $,
52
53
  {
53
- className: u(
54
+ className: b(
54
55
  "min-w-12 flex-1 text-base outline-none placeholder:text-muted-foreground sm:text-sm [[data-slot=combobox-chip]+&]:ps-0.5",
55
56
  o
56
57
  ),
@@ -59,17 +60,17 @@ function ho({
59
60
  }
60
61
  );
61
62
  }
62
- function go({
63
+ function vo({
63
64
  className: o,
64
65
  showTrigger: e = !0,
65
66
  showClear: r = !1,
66
67
  startAddon: i,
67
68
  triggerProps: a,
68
- clearProps: n,
69
+ clearProps: s,
69
70
  ...l
70
71
  }) {
71
72
  return /* @__PURE__ */ p(
72
- X,
73
+ U,
73
74
  {
74
75
  className: "relative not-has-[>*.w-full]:w-fit w-full text-foreground has-disabled:opacity-64",
75
76
  "data-slot": "combobox-input-group",
@@ -86,13 +87,13 @@ function go({
86
87
  /* @__PURE__ */ t(
87
88
  $,
88
89
  {
89
- className: u(
90
+ className: b(
90
91
  i && "*:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]",
91
92
  "pr-6",
92
93
  o
93
94
  ),
94
95
  "data-slot": "combobox-input",
95
- render: (s) => /* @__PURE__ */ t(A, { className: "has-disabled:opacity-100", nativeInput: !0, ...s }),
96
+ render: (n) => /* @__PURE__ */ t(A, { className: "has-disabled:opacity-100", nativeInput: !0, ...n }),
96
97
  ...l
97
98
  }
98
99
  ),
@@ -102,20 +103,20 @@ function go({
102
103
  showTrigger: e,
103
104
  showClear: r,
104
105
  triggerProps: a,
105
- clearProps: n
106
+ clearProps: s
106
107
  }
107
108
  )
108
109
  ]
109
110
  }
110
111
  );
111
112
  }
112
- function Co({
113
+ function wo({
113
114
  className: o,
114
115
  children: e,
115
116
  ...r
116
117
  }) {
117
118
  return /* @__PURE__ */ t(
118
- I,
119
+ S,
119
120
  {
120
121
  className: o,
121
122
  "data-slot": "combobox-trigger",
@@ -124,18 +125,18 @@ function Co({
124
125
  }
125
126
  );
126
127
  }
127
- function ge({
128
+ function Ce({
128
129
  className: o,
129
130
  placeholder: e,
130
131
  children: r,
131
132
  showClear: i,
132
133
  clearProps: a,
133
- ...n
134
+ ...s
134
135
  }) {
135
136
  const l = /* @__PURE__ */ t(
136
- I,
137
+ S,
137
138
  {
138
- className: u(
139
+ className: b(
139
140
  "relative flex w-full items-center rounded-md border border-input bg-background px-3 py-2 pe-9 text-sm outline-none transition-shadow",
140
141
  "focus-visible:border-ring",
141
142
  "aria-invalid:border-error focus-visible:aria-invalid:ring-error/20",
@@ -144,7 +145,7 @@ function ge({
144
145
  o
145
146
  ),
146
147
  "data-slot": "combobox-select-trigger",
147
- ...n,
148
+ ...s,
148
149
  children: r ?? /* @__PURE__ */ t(R, { placeholder: e })
149
150
  }
150
151
  );
@@ -159,9 +160,9 @@ function ge({
159
160
  ]
160
161
  }
161
162
  ) : /* @__PURE__ */ t(
162
- I,
163
+ S,
163
164
  {
164
- className: u(
165
+ className: b(
165
166
  "relative flex w-full items-center rounded-md border border-input bg-background px-3 py-2 pe-9 text-sm outline-none transition-shadow",
166
167
  "focus-visible:border-ring",
167
168
  "aria-invalid:border-error focus-visible:aria-invalid:ring-error/20",
@@ -170,29 +171,29 @@ function ge({
170
171
  o
171
172
  ),
172
173
  "data-slot": "combobox-select-trigger",
173
- ...n,
174
- children: r ?? /* @__PURE__ */ p(j, { children: [
174
+ ...s,
175
+ children: r ?? /* @__PURE__ */ p(P, { children: [
175
176
  /* @__PURE__ */ t(R, { placeholder: e }),
176
177
  /* @__PURE__ */ t(
177
178
  "div",
178
179
  {
179
180
  "aria-hidden": "true",
180
181
  className: "pointer-events-none absolute end-0.5 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center text-muted-foreground opacity-80 sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4",
181
- children: /* @__PURE__ */ t(P, {})
182
+ children: /* @__PURE__ */ t(T, {})
182
183
  }
183
184
  )
184
185
  ] })
185
186
  }
186
187
  );
187
188
  }
188
- function Ce({
189
+ function ve({
189
190
  className: o,
190
191
  ...e
191
192
  }) {
192
193
  return /* @__PURE__ */ t("div", { className: "border-b p-2", "data-slot": "combobox-search-input-wrapper", children: /* @__PURE__ */ t(
193
194
  $,
194
195
  {
195
- className: u(
196
+ className: b(
196
197
  "flex h-9 w-full rounded-md bg-transparent text-base placeholder:text-muted-foreground outline-none disabled:cursor-not-allowed disabled:opacity-64 sm:h-8 sm:text-sm",
197
198
  o
198
199
  ),
@@ -202,22 +203,22 @@ function Ce({
202
203
  }
203
204
  ) });
204
205
  }
205
- function vo({
206
+ function yo({
206
207
  className: o,
207
208
  children: e,
208
209
  side: r = "bottom",
209
210
  sideOffset: i = 4,
210
211
  alignOffset: a,
211
- align: n = "start",
212
+ align: s = "start",
212
213
  anchor: l,
213
- portalProps: s,
214
+ portalProps: n,
214
215
  ...m
215
216
  }) {
216
- const { chipsRef: d } = x.useContext(w);
217
- return /* @__PURE__ */ t(Q, { ...s, children: /* @__PURE__ */ t(
218
- U,
217
+ const { chipsRef: d } = x.useContext(y);
218
+ return /* @__PURE__ */ t(J, { ...n, children: /* @__PURE__ */ t(
219
+ Y,
219
220
  {
220
- align: n,
221
+ align: s,
221
222
  alignOffset: a,
222
223
  anchor: l ?? d,
223
224
  className: "z-50 select-none",
@@ -225,9 +226,9 @@ function vo({
225
226
  side: r,
226
227
  sideOffset: i,
227
228
  children: /* @__PURE__ */ t(
228
- J,
229
+ Z,
229
230
  {
230
- className: u(
231
+ className: b(
231
232
  "relative flex max-h-[min(var(--available-height),23rem)] min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) flex-1 flex-col rounded-lg border bg-popover not-dark:bg-clip-padding text-foreground shadow-lg/5",
232
233
  "before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",
233
234
  "duration-100 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
@@ -242,15 +243,15 @@ function vo({
242
243
  }
243
244
  ) });
244
245
  }
245
- function yo({
246
+ function No({
246
247
  className: o,
247
248
  children: e,
248
249
  ...r
249
250
  }) {
250
251
  return /* @__PURE__ */ p(
251
- Y,
252
+ oo,
252
253
  {
253
- className: u(
254
+ className: b(
254
255
  "flex justify-between min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 px-2 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
255
256
  o
256
257
  ),
@@ -258,7 +259,7 @@ function yo({
258
259
  ...r,
259
260
  children: [
260
261
  e,
261
- /* @__PURE__ */ t(Z, { className: "col-end-1", children: /* @__PURE__ */ t(
262
+ /* @__PURE__ */ t(eo, { className: "col-end-1", children: /* @__PURE__ */ t(
262
263
  "svg",
263
264
  {
264
265
  "aria-hidden": "true",
@@ -278,14 +279,14 @@ function yo({
278
279
  }
279
280
  );
280
281
  }
281
- function ve({
282
+ function we({
282
283
  className: o,
283
284
  ...e
284
285
  }) {
285
286
  return /* @__PURE__ */ t(
286
- oo,
287
+ to,
287
288
  {
288
- className: u("mx-2 my-1 h-px bg-border last:hidden", o),
289
+ className: b("mx-2 my-1 h-px bg-border last:hidden", o),
289
290
  "data-slot": "combobox-separator",
290
291
  ...e
291
292
  }
@@ -296,22 +297,22 @@ function ye({
296
297
  ...e
297
298
  }) {
298
299
  return /* @__PURE__ */ t(
299
- eo,
300
+ ro,
300
301
  {
301
- className: u("[[role=group]+&]:mt-1.5", o),
302
+ className: b("[[role=group]+&]:mt-1.5", o),
302
303
  "data-slot": "combobox-group",
303
304
  ...e
304
305
  }
305
306
  );
306
307
  }
307
- function we({
308
+ function Ne({
308
309
  className: o,
309
310
  ...e
310
311
  }) {
311
312
  return /* @__PURE__ */ t(
312
- to,
313
+ so,
313
314
  {
314
- className: u(
315
+ className: b(
315
316
  "px-2 py-1.5 font-medium text-muted-foreground text-xs",
316
317
  o
317
318
  ),
@@ -320,14 +321,14 @@ function we({
320
321
  }
321
322
  );
322
323
  }
323
- function wo({
324
+ function zo({
324
325
  className: o,
325
326
  ...e
326
327
  }) {
327
328
  return /* @__PURE__ */ t(
328
- ro,
329
+ no,
329
330
  {
330
- className: u(
331
+ className: b(
331
332
  "not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm",
332
333
  o
333
334
  ),
@@ -336,12 +337,12 @@ function wo({
336
337
  }
337
338
  );
338
339
  }
339
- function Ne({
340
+ function ze({
340
341
  className: o,
341
342
  ...e
342
343
  }) {
343
344
  return /* @__PURE__ */ t(
344
- no,
345
+ io,
345
346
  {
346
347
  className: o,
347
348
  "data-slot": "combobox-row",
@@ -349,19 +350,19 @@ function Ne({
349
350
  }
350
351
  );
351
352
  }
352
- function No({
353
+ function _o({
353
354
  ...o
354
355
  }) {
355
356
  return /* @__PURE__ */ t(R, { "data-slot": "combobox-value", ...o });
356
357
  }
357
- function zo({
358
+ function Io({
358
359
  className: o,
359
360
  ...e
360
361
  }) {
361
- return /* @__PURE__ */ t(so, { scrollbarGutter: !0, scrollFade: !0, children: /* @__PURE__ */ t(
362
- io,
362
+ return /* @__PURE__ */ t(ao, { scrollbarGutter: !0, scrollFade: !0, children: /* @__PURE__ */ t(
363
+ lo,
363
364
  {
364
- className: u(
365
+ className: b(
365
366
  "not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1 in-data-has-overflow-y:pe-3",
366
367
  o
367
368
  ),
@@ -370,12 +371,12 @@ function zo({
370
371
  }
371
372
  ) });
372
373
  }
373
- function _o({
374
+ function So({
374
375
  className: o,
375
376
  ...e
376
377
  }) {
377
378
  return /* @__PURE__ */ t(
378
- ao,
379
+ co,
379
380
  {
380
381
  className: o,
381
382
  "data-slot": "combobox-clear",
@@ -392,27 +393,27 @@ function k({
392
393
  }) {
393
394
  return !o && !e ? null : /* @__PURE__ */ p("div", { className: "text-muted-foreground hover:text-foreground transition-colors", children: [
394
395
  o && /* @__PURE__ */ t(
395
- Co,
396
+ wo,
396
397
  {
397
- className: u(
398
+ className: b(
398
399
  L,
399
400
  "text-muted-foreground has-[+[data-slot=combobox-clear]]:hidden"
400
401
  ),
401
402
  ...r,
402
- children: /* @__PURE__ */ t(po, { "data-slot": "combobox-icon", children: /* @__PURE__ */ t(P, {}) })
403
+ children: /* @__PURE__ */ t(xo, { "data-slot": "combobox-icon", children: /* @__PURE__ */ t(T, {}) })
403
404
  }
404
405
  ),
405
- e && /* @__PURE__ */ t(_o, { className: L, ...i, children: /* @__PURE__ */ t(T, {}) })
406
+ e && /* @__PURE__ */ t(So, { className: L, ...i, children: /* @__PURE__ */ t(G, {}) })
406
407
  ] });
407
408
  }
408
- function ze({
409
+ function _e({
409
410
  className: o,
410
411
  ...e
411
412
  }) {
412
413
  return /* @__PURE__ */ t(
413
- lo,
414
+ mo,
414
415
  {
415
- className: u(
416
+ className: b(
416
417
  "px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0",
417
418
  o
418
419
  ),
@@ -421,20 +422,20 @@ function ze({
421
422
  }
422
423
  );
423
424
  }
424
- function _e(o) {
425
- return /* @__PURE__ */ t(co, { "data-slot": "combobox-collection", ...o });
425
+ function Ie(o) {
426
+ return /* @__PURE__ */ t(bo, { "data-slot": "combobox-collection", ...o });
426
427
  }
427
- function So({
428
+ function Ro({
428
429
  className: o,
429
430
  children: e,
430
431
  startAddon: r,
431
432
  ...i
432
433
  }) {
433
- const { chipsRef: a } = x.useContext(w), n = O(), l = (s) => /* @__PURE__ */ p(
434
- fo,
434
+ const { chipsRef: a } = x.useContext(y), s = O(), l = (n) => /* @__PURE__ */ p(
435
+ ho,
435
436
  {
436
- "aria-invalid": s,
437
- className: u(
437
+ "aria-invalid": n,
438
+ className: b(
438
439
  B,
439
440
  "relative inline-flex pr-6 w-full flex-wrap gap-1",
440
441
  "placeholder:text-muted-foreground",
@@ -460,138 +461,117 @@ function So({
460
461
  ]
461
462
  }
462
463
  );
463
- return n ? /* @__PURE__ */ t(mo, { children: ({ validity: s }) => l(s.valid === !1 ? !0 : void 0) }) : l(void 0);
464
+ return s ? /* @__PURE__ */ t(uo, { children: ({ validity: n }) => l(n.valid === !1 ? !0 : void 0) }) : l(void 0);
464
465
  }
465
- function Io({
466
+ function $o({
466
467
  children: o,
467
468
  removeProps: e,
468
469
  ...r
469
470
  }) {
470
471
  return /* @__PURE__ */ p(
471
- uo,
472
+ po,
472
473
  {
473
474
  className: "flex my-auto items-center pl-1 rounded-[calc(var(--radius-md)-1px)] bg-accent font-medium text-accent-foreground text-sm outline-none sm:text-xs/(--text-xs--line-height) [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5 h-6",
474
475
  "data-slot": "combobox-chip",
475
476
  ...r,
476
477
  children: [
477
478
  o,
478
- /* @__PURE__ */ t(Ro, { ...e })
479
+ /* @__PURE__ */ t(ko, { ...e })
479
480
  ]
480
481
  }
481
482
  );
482
483
  }
483
- function Ro(o) {
484
+ function ko(o) {
484
485
  return /* @__PURE__ */ t(
485
- bo,
486
+ fo,
486
487
  {
487
488
  "aria-label": "Quitar",
488
489
  className: "h-full shrink-0 cursor-pointer px-1 opacity-80 hover:opacity-100 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5",
489
490
  "data-slot": "combobox-chip-remove",
490
491
  ...o,
491
- children: /* @__PURE__ */ t(T, {})
492
+ children: /* @__PURE__ */ t(G, {})
492
493
  }
493
494
  );
494
495
  }
495
- const _ = 4, $o = 24, ko = 36, Eo = 68;
496
- function S(o, e) {
497
- const r = o - $o - ko;
496
+ const _ = 4, Eo = 24, Vo = 36, Lo = 68;
497
+ function I(o, e) {
498
+ const r = o - Eo - Vo;
498
499
  let i = 0, a = 0;
499
- for (let n = 0; n < e.length; n++) {
500
- const l = e[n], s = n < e.length - 1;
501
- if (i + (n > 0 ? _ : 0) + l + (s ? _ + Eo : 0) > r) break;
502
- i += (n > 0 ? _ : 0) + l, a++;
500
+ for (let s = 0; s < e.length; s++) {
501
+ const l = e[s], n = s < e.length - 1;
502
+ if (i + (s > 0 ? _ : 0) + l + (n ? _ + Lo : 0) > r) break;
503
+ i += (s > 0 ? _ : 0) + l, a++;
503
504
  }
504
505
  return a;
505
506
  }
506
- function Vo(o, e) {
507
- const [r, i] = x.useState(null), a = x.useRef([]), n = r === null || r.items !== o;
508
- return H(() => {
509
- if (!n) return;
507
+ function Po(o, e) {
508
+ const [r, i] = x.useState(null), a = x.useRef([]), s = r === null || r.items !== o;
509
+ return K(() => {
510
+ if (!s) return;
510
511
  const l = e?.current;
511
512
  if (!l) return;
512
- const s = l.querySelectorAll('[data-slot="combobox-chip"]');
513
- a.current = Array.from(s).map(
513
+ const n = l.querySelectorAll('[data-slot="combobox-chip"]');
514
+ a.current = Array.from(n).map(
514
515
  (d) => d.offsetWidth
515
516
  );
516
- const m = S(
517
+ const m = I(
517
518
  l.clientWidth,
518
519
  a.current
519
520
  );
520
521
  i({ items: o, visible: m });
521
- }, [n, o, e]), x.useEffect(() => {
522
+ }, [s, o, e]), x.useEffect(() => {
522
523
  const l = a.current.length > 0 && a.current.every((f) => f === 0);
523
- if (!n && !l) return;
524
- const s = e?.current;
525
- if (!s) return;
526
- const m = s.querySelectorAll('[data-slot="combobox-chip"]');
524
+ if (!s && !l) return;
525
+ const n = e?.current;
526
+ if (!n) return;
527
+ const m = n.querySelectorAll('[data-slot="combobox-chip"]');
527
528
  if (!m.length) return;
528
529
  const d = Array.from(m).map(
529
530
  (f) => f.offsetWidth
530
531
  );
531
532
  if (d.every((f) => f === 0)) return;
532
533
  a.current = d;
533
- const h = S(s.clientWidth, d);
534
+ const h = I(n.clientWidth, d);
534
535
  i(
535
536
  (f) => f ? { ...f, visible: h } : { items: o, visible: h }
536
537
  );
537
- }, [n, o, e]), x.useEffect(() => {
538
+ }, [s, o, e]), x.useEffect(() => {
538
539
  const l = e?.current;
539
540
  if (!l) return;
540
- const s = new ResizeObserver(() => {
541
+ const n = new ResizeObserver(() => {
541
542
  if (!a.current.length) return;
542
- const m = S(
543
+ const m = I(
543
544
  l.clientWidth,
544
545
  a.current
545
546
  );
546
547
  i((d) => d ? { ...d, visible: m } : null);
547
548
  });
548
- return s.observe(l), () => s.disconnect();
549
- }, [e]), { visibleCount: r?.visible ?? o, isMeasuring: n };
549
+ return n.observe(l), () => n.disconnect();
550
+ }, [e]), { visibleCount: r?.visible ?? o, isMeasuring: s };
550
551
  }
551
- function Lo({
552
+ function To({
552
553
  value: o,
553
554
  getLabel: e,
554
555
  getId: r
555
556
  }) {
556
- const { chipsRef: i } = x.useContext(w), { visibleCount: a, isMeasuring: n } = Vo(o.length, i), l = n ? o : o.slice(0, a), s = n ? 0 : o.length - a;
557
- return /* @__PURE__ */ p(j, { children: [
558
- l.map((m) => /* @__PURE__ */ t(Io, { "aria-label": e(m), children: e(m) }, r(m))),
559
- s > 0 && /* @__PURE__ */ p("span", { className: "flex items-center whitespace-nowrap px-1 text-sm text-muted-foreground", children: [
557
+ const { chipsRef: i } = x.useContext(y), { visibleCount: a, isMeasuring: s } = Po(o.length, i), l = s ? o : o.slice(0, a), n = s ? 0 : o.length - a;
558
+ return /* @__PURE__ */ p(P, { children: [
559
+ l.map((m) => /* @__PURE__ */ t($o, { "aria-label": e(m), children: e(m) }, r(m))),
560
+ n > 0 && /* @__PURE__ */ p("span", { className: "flex items-center whitespace-nowrap px-1 text-sm text-muted-foreground", children: [
560
561
  "+",
561
- s,
562
+ n,
562
563
  " más"
563
564
  ] })
564
565
  ] });
565
566
  }
566
- function jo(o) {
567
- if (o == null) return "";
568
- if (typeof o == "string" || typeof o == "number") return String(o);
569
- if (typeof o == "object") {
570
- const e = o;
571
- if ("label" in e) return String(e.label);
572
- if ("name" in e) return String(e.name);
573
- if ("title" in e) return String(e.title);
574
- }
575
- return String(o);
576
- }
577
- function Po(o) {
578
- if (o == null) return "";
579
- if (typeof o == "string" || typeof o == "number") return String(o);
580
- if (typeof o == "object") {
581
- const e = o;
582
- if ("id" in e) return String(e.id);
583
- if ("value" in e) return String(e.value);
584
- }
585
- return String(o);
586
- }
587
- function To({
567
+ function Go({
588
568
  placeholder: o,
589
569
  showClear: e,
590
570
  startAddon: r,
591
571
  className: i
592
572
  }) {
593
573
  return /* @__PURE__ */ t(
594
- go,
574
+ vo,
595
575
  {
596
576
  className: i,
597
577
  placeholder: o,
@@ -600,18 +580,18 @@ function To({
600
580
  }
601
581
  );
602
582
  }
603
- function Go({
583
+ function jo({
604
584
  getLabel: o,
605
585
  getId: e,
606
586
  showClear: r,
607
587
  startAddon: i,
608
588
  className: a
609
589
  }) {
610
- return /* @__PURE__ */ p(So, { className: a, startAddon: i, children: [
611
- /* @__PURE__ */ t(No, { children: (n) => /* @__PURE__ */ t(
612
- Lo,
590
+ return /* @__PURE__ */ p(Ro, { className: a, startAddon: i, children: [
591
+ /* @__PURE__ */ t(_o, { children: (s) => /* @__PURE__ */ t(
592
+ To,
613
593
  {
614
- value: n,
594
+ value: s,
615
595
  getLabel: o,
616
596
  getId: e
617
597
  }
@@ -625,54 +605,54 @@ function Se(o) {
625
605
  getLabel: r,
626
606
  getId: i,
627
607
  renderItem: a,
628
- placeholder: n,
608
+ placeholder: s,
629
609
  emptyText: l = "Sin resultados.",
630
- multiple: s,
610
+ multiple: n,
631
611
  onValueChange: m,
632
612
  value: d,
633
613
  defaultValue: h,
634
614
  startAddon: f,
635
615
  classNames: g,
636
616
  showClear: E = !0,
637
- searchable: G = !0,
617
+ searchable: j = !0,
638
618
  ...F
639
- } = o, N = r ?? jo, C = i ?? Po, v = (c) => String(C(c)), y = (c) => e.find((b) => v(b) === c) ?? null, V = x.useRef(!1);
619
+ } = o, N = r ?? q, C = i ?? H, v = (c) => String(C(c)), w = (c) => e.find((u) => v(u) === c) ?? null, V = x.useRef(!1);
640
620
  if (process.env.NODE_ENV !== "production" && !V.current) {
641
- const c = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
621
+ const c = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
642
622
  for (const M of e) {
643
623
  const z = v(M);
644
- c.has(z) && b.add(z), c.add(z);
624
+ c.has(z) && u.add(z), c.add(z);
645
625
  }
646
- b.size > 0 && (V.current = !0, console.warn(
647
- `[Combobox] Multiple items resolve to the same id (${[...b].join(", ")}). Provide a \`getId\` that returns a unique value per item.`
626
+ u.size > 0 && (V.current = !0, console.warn(
627
+ `[Combobox] Multiple items resolve to the same id (${[...u].join(", ")}). Provide a \`getId\` that returns a unique value per item.`
648
628
  ));
649
629
  }
650
- const W = s ? d?.map((c) => y(String(c))).filter(Boolean) : d == null ? d : y(String(d)), D = s ? h?.map((c) => y(String(c))).filter(Boolean) : h == null ? void 0 : y(String(h));
630
+ const W = n ? d?.map((c) => w(String(c))).filter(Boolean) : d == null ? d : w(String(d)), D = n ? h?.map((c) => w(String(c))).filter(Boolean) : h == null ? void 0 : w(String(h));
651
631
  return /* @__PURE__ */ p(
652
- xo,
632
+ go,
653
633
  {
654
634
  items: e,
655
635
  itemToStringLabel: N,
656
636
  itemToStringValue: C,
657
- multiple: s,
637
+ multiple: n,
658
638
  onValueChange: (c) => {
659
- if (s) {
660
- const b = c ?? [];
661
- m?.(b.map(C), b);
639
+ if (n) {
640
+ const u = c ?? [];
641
+ m?.(u.map(C), u);
662
642
  } else {
663
- const b = c ?? null;
664
- m?.(b ? C(b) : null, b);
643
+ const u = c ?? null;
644
+ m?.(u ? C(u) : null, u);
665
645
  }
666
646
  },
667
647
  value: W,
668
648
  defaultValue: D,
669
- isItemEqualToValue: (c, b) => v(c) === v(b),
649
+ isItemEqualToValue: (c, u) => v(c) === v(u),
670
650
  autoHighlight: !0,
671
651
  loopFocus: !0,
672
652
  ...F,
673
653
  children: [
674
- s ? /* @__PURE__ */ t(
675
- Go,
654
+ n ? /* @__PURE__ */ t(
655
+ jo,
676
656
  {
677
657
  getLabel: N,
678
658
  getId: C,
@@ -681,32 +661,32 @@ function Se(o) {
681
661
  className: g?.chips
682
662
  }
683
663
  ) : /* @__PURE__ */ t(
684
- To,
664
+ Go,
685
665
  {
686
- placeholder: n,
666
+ placeholder: s,
687
667
  showClear: E,
688
668
  startAddon: f,
689
669
  className: g?.input
690
670
  }
691
671
  ),
692
- /* @__PURE__ */ p(vo, { className: g?.popup, children: [
693
- s && G && /* @__PURE__ */ t(
672
+ /* @__PURE__ */ p(yo, { className: g?.popup, children: [
673
+ n && j && /* @__PURE__ */ t(
694
674
  "div",
695
675
  {
696
676
  className: "border-b p-2",
697
677
  "data-slot": "combobox-chips-input-wrapper",
698
678
  children: /* @__PURE__ */ t(
699
- ho,
679
+ Co,
700
680
  {
701
681
  className: g?.chipsInput,
702
- placeholder: n
682
+ placeholder: s
703
683
  }
704
684
  )
705
685
  }
706
686
  ),
707
- /* @__PURE__ */ t(wo, { className: g?.empty, children: l }),
708
- /* @__PURE__ */ t(zo, { className: g?.list, children: (c) => /* @__PURE__ */ t(
709
- yo,
687
+ /* @__PURE__ */ t(zo, { className: g?.empty, children: l }),
688
+ /* @__PURE__ */ t(Io, { className: g?.list, children: (c) => /* @__PURE__ */ t(
689
+ No,
710
690
  {
711
691
  value: c,
712
692
  className: g?.item,
@@ -719,30 +699,30 @@ function Se(o) {
719
699
  }
720
700
  );
721
701
  }
722
- const Ie = q;
702
+ const Re = X;
723
703
  export {
724
704
  Se as Combobox,
725
- Io as ComboboxChip,
726
- Ro as ComboboxChipRemove,
727
- So as ComboboxChips,
728
- ho as ComboboxChipsInput,
729
- _o as ComboboxClear,
730
- _e as ComboboxCollection,
731
- w as ComboboxContext,
732
- wo as ComboboxEmpty,
705
+ $o as ComboboxChip,
706
+ ko as ComboboxChipRemove,
707
+ Ro as ComboboxChips,
708
+ Co as ComboboxChipsInput,
709
+ So as ComboboxClear,
710
+ Ie as ComboboxCollection,
711
+ y as ComboboxContext,
712
+ zo as ComboboxEmpty,
733
713
  ye as ComboboxGroup,
734
- we as ComboboxGroupLabel,
735
- go as ComboboxInput,
736
- yo as ComboboxItem,
737
- zo as ComboboxList,
738
- vo as ComboboxPopup,
739
- xo as ComboboxRoot,
740
- Ne as ComboboxRow,
741
- Ce as ComboboxSearchInput,
742
- ge as ComboboxSelectTrigger,
743
- ve as ComboboxSeparator,
744
- ze as ComboboxStatus,
745
- Co as ComboboxTrigger,
746
- No as ComboboxValue,
747
- Ie as useComboboxFilter
714
+ Ne as ComboboxGroupLabel,
715
+ vo as ComboboxInput,
716
+ No as ComboboxItem,
717
+ Io as ComboboxList,
718
+ yo as ComboboxPopup,
719
+ go as ComboboxRoot,
720
+ ze as ComboboxRow,
721
+ ve as ComboboxSearchInput,
722
+ Ce as ComboboxSelectTrigger,
723
+ we as ComboboxSeparator,
724
+ _e as ComboboxStatus,
725
+ wo as ComboboxTrigger,
726
+ _o as ComboboxValue,
727
+ Re as useComboboxFilter
748
728
  };