@alfadocs/ui-kit-debug 1.80.0 → 1.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/_chunks/{address-fields-GnoSkvh6.js → address-fields-CfnXK8RT.js} +4 -4
  2. package/dist/_chunks/{address-fields-GnoSkvh6.js.map → address-fields-CfnXK8RT.js.map} +1 -1
  3. package/dist/_chunks/{ai-prompt-input-M6u29f87.js → ai-prompt-input-DH_rnV-F.js} +33 -26
  4. package/dist/_chunks/{ai-prompt-input-M6u29f87.js.map → ai-prompt-input-DH_rnV-F.js.map} +1 -1
  5. package/dist/_chunks/{anamnesis-summary-rows-lONg-zja.js → anamnesis-summary-rows-BYtpwCyn.js} +2 -2
  6. package/dist/_chunks/{anamnesis-summary-rows-lONg-zja.js.map → anamnesis-summary-rows-BYtpwCyn.js.map} +1 -1
  7. package/dist/_chunks/{autocomplete-DosDnGie.js → autocomplete-CnB1mHGc.js} +65 -64
  8. package/dist/_chunks/{autocomplete-DosDnGie.js.map → autocomplete-CnB1mHGc.js.map} +1 -1
  9. package/dist/_chunks/{balance-badge-cell-Dzd-Z_5W.js → balance-badge-cell-NoEPeFdj.js} +2 -2
  10. package/dist/_chunks/{balance-badge-cell-Dzd-Z_5W.js.map → balance-badge-cell-NoEPeFdj.js.map} +1 -1
  11. package/dist/_chunks/{benefit-card-BWBClvdF.js → benefit-card-BcPtRHgM.js} +37 -36
  12. package/dist/_chunks/{benefit-card-BWBClvdF.js.map → benefit-card-BcPtRHgM.js.map} +1 -1
  13. package/dist/_chunks/{booking-By4I_1A-.js → booking-CxrB0e6d.js} +474 -463
  14. package/dist/_chunks/booking-CxrB0e6d.js.map +1 -0
  15. package/dist/_chunks/{calendar-appointment-editor-dialog-DhTTWgXw.js → calendar-appointment-editor-dialog-BuumJbcv.js} +4 -4
  16. package/dist/_chunks/{calendar-appointment-editor-dialog-DhTTWgXw.js.map → calendar-appointment-editor-dialog-BuumJbcv.js.map} +1 -1
  17. package/dist/_chunks/{city-input-3J3bz9EO.js → city-input-CJVGswxp.js} +2 -2
  18. package/dist/_chunks/{city-input-3J3bz9EO.js.map → city-input-CJVGswxp.js.map} +1 -1
  19. package/dist/_chunks/{combobox-vF9O-QoG.js → combobox-CDPm_n0p.js} +93 -92
  20. package/dist/_chunks/{combobox-vF9O-QoG.js.map → combobox-CDPm_n0p.js.map} +1 -1
  21. package/dist/_chunks/{command-palette-D9TBzmOG.js → command-palette-B3dVqm9D.js} +68 -68
  22. package/dist/_chunks/{command-palette-D9TBzmOG.js.map → command-palette-B3dVqm9D.js.map} +1 -1
  23. package/dist/_chunks/{contact-profile-card-DKk94l-d.js → contact-profile-card-Da1vmJQI.js} +115 -102
  24. package/dist/_chunks/contact-profile-card-Da1vmJQI.js.map +1 -0
  25. package/dist/_chunks/{country-select-CSE2Zm_s.js → country-select-DQ8q7ypA.js} +2 -2
  26. package/dist/_chunks/{country-select-CSE2Zm_s.js.map → country-select-DQ8q7ypA.js.map} +1 -1
  27. package/dist/_chunks/{face-scheme-BIPJqw9f.js → face-scheme-BgJGFDTa.js} +2 -2
  28. package/dist/_chunks/{face-scheme-BIPJqw9f.js.map → face-scheme-BgJGFDTa.js.map} +1 -1
  29. package/dist/_chunks/{header-settings-BYpVmLip.js → header-settings-CifwJEKB.js} +2 -2
  30. package/dist/_chunks/{header-settings-BYpVmLip.js.map → header-settings-CifwJEKB.js.map} +1 -1
  31. package/dist/_chunks/{link-cell-renderer-B0riA_h_.js → link-cell-renderer-Dwp_DCYT.js} +3 -3
  32. package/dist/_chunks/{link-cell-renderer-B0riA_h_.js.map → link-cell-renderer-Dwp_DCYT.js.map} +1 -1
  33. package/dist/_chunks/{locale-picker-DzdGDSBI.js → locale-picker-QbT1p60X.js} +39 -38
  34. package/dist/_chunks/{locale-picker-DzdGDSBI.js.map → locale-picker-QbT1p60X.js.map} +1 -1
  35. package/dist/_chunks/{map-view-C6MIVaqn.js → map-view-Bvi06RVh.js} +2 -2
  36. package/dist/_chunks/{map-view-C6MIVaqn.js.map → map-view-Bvi06RVh.js.map} +1 -1
  37. package/dist/_chunks/{marketplace-app-shell-mS7Q2-81.js → marketplace-app-shell-vON3WhD0.js} +2 -2
  38. package/dist/_chunks/{marketplace-app-shell-mS7Q2-81.js.map → marketplace-app-shell-vON3WhD0.js.map} +1 -1
  39. package/dist/_chunks/{multi-select-BOad3za9.js → multi-select-IOVnOGlP.js} +106 -106
  40. package/dist/_chunks/{multi-select-BOad3za9.js.map → multi-select-IOVnOGlP.js.map} +1 -1
  41. package/dist/_chunks/{patient-details-B-I9Xkh9.js → patient-details-D0P5eog5.js} +2 -2
  42. package/dist/_chunks/{patient-details-B-I9Xkh9.js.map → patient-details-D0P5eog5.js.map} +1 -1
  43. package/dist/_chunks/{patient-field-row-Bn0z6lAZ.js → patient-field-row-R73dZJY6.js} +5 -5
  44. package/dist/_chunks/{patient-field-row-Bn0z6lAZ.js.map → patient-field-row-R73dZJY6.js.map} +1 -1
  45. package/dist/_chunks/{patient-search-CxqNcth4.js → patient-search-Dy0sxcwv.js} +2 -2
  46. package/dist/_chunks/{patient-search-CxqNcth4.js.map → patient-search-Dy0sxcwv.js.map} +1 -1
  47. package/dist/_chunks/{patient-summary-card-bhDo0gVX.js → patient-summary-card-6U74-ivO.js} +2 -2
  48. package/dist/_chunks/{patient-summary-card-bhDo0gVX.js.map → patient-summary-card-6U74-ivO.js.map} +1 -1
  49. package/dist/_chunks/{payment-automation-upsell-AQpHOS1X.js → payment-automation-upsell-D1YdO1xY.js} +2 -2
  50. package/dist/_chunks/{payment-automation-upsell-AQpHOS1X.js.map → payment-automation-upsell-D1YdO1xY.js.map} +1 -1
  51. package/dist/_chunks/{phone-input-C3NrD-nl.js → phone-input-DJ4BN8tG.js} +70 -63
  52. package/dist/_chunks/{phone-input-C3NrD-nl.js.map → phone-input-DJ4BN8tG.js.map} +1 -1
  53. package/dist/_chunks/{practice-results-CtOanuzZ.js → practice-results-B61krlwu.js} +2 -2
  54. package/dist/_chunks/{practice-results-CtOanuzZ.js.map → practice-results-B61krlwu.js.map} +1 -1
  55. package/dist/_chunks/{province-select-CDjs5obD.js → province-select-CPdTwEob.js} +2 -2
  56. package/dist/_chunks/{province-select-CDjs5obD.js.map → province-select-CPdTwEob.js.map} +1 -1
  57. package/dist/_chunks/{registration-form-CNBfUduG.js → registration-form-e9oYscB7.js} +2 -2
  58. package/dist/_chunks/{registration-form-CNBfUduG.js.map → registration-form-e9oYscB7.js.map} +1 -1
  59. package/dist/_chunks/{send-registration-link-form-vTn1HxjA.js → send-registration-link-form-CZYOO7NO.js} +2 -2
  60. package/dist/_chunks/{send-registration-link-form-vTn1HxjA.js.map → send-registration-link-form-CZYOO7NO.js.map} +1 -1
  61. package/dist/_chunks/{task-editor-Cpw-NmND.js → task-editor-BOETWbjU.js} +2 -2
  62. package/dist/_chunks/{task-editor-Cpw-NmND.js.map → task-editor-BOETWbjU.js.map} +1 -1
  63. package/dist/_chunks/{use-appointment-details-read-lFUL4kkd.js → use-appointment-details-read-CWN-nJCZ.js} +2 -2
  64. package/dist/_chunks/{use-appointment-details-read-lFUL4kkd.js.map → use-appointment-details-read-CWN-nJCZ.js.map} +1 -1
  65. package/dist/agent-catalog.json +1 -1
  66. package/dist/components/address-fields/index.js +1 -1
  67. package/dist/components/ai-prompt-input/ai-prompt-input.d.ts.map +1 -1
  68. package/dist/components/ai-prompt-input/index.js +1 -1
  69. package/dist/components/appointment-details-panel/index.js +1 -1
  70. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  71. package/dist/components/autocomplete/index.js +1 -1
  72. package/dist/components/benefit-card/benefit-card.d.ts +7 -1
  73. package/dist/components/benefit-card/benefit-card.d.ts.map +1 -1
  74. package/dist/components/benefit-card/index.js +1 -1
  75. package/dist/components/booking/booking.d.ts.map +1 -1
  76. package/dist/components/booking/index.js +1 -1
  77. package/dist/components/city-input/index.js +1 -1
  78. package/dist/components/combobox/combobox.d.ts.map +1 -1
  79. package/dist/components/combobox/index.js +1 -1
  80. package/dist/components/command-palette/index.js +1 -1
  81. package/dist/components/contact-profile-card/contact-profile-card.d.ts +4 -1
  82. package/dist/components/contact-profile-card/contact-profile-card.d.ts.map +1 -1
  83. package/dist/components/contact-profile-card/index.js +1 -1
  84. package/dist/components/country-select/index.js +1 -1
  85. package/dist/components/data-table/index.js +1 -1
  86. package/dist/components/face-scheme/index.js +1 -1
  87. package/dist/components/header-settings/index.js +1 -1
  88. package/dist/components/locale-picker/index.js +1 -1
  89. package/dist/components/locale-picker/locale-picker.d.ts.map +1 -1
  90. package/dist/components/map-view/index.js +1 -1
  91. package/dist/components/multi-select/index.js +1 -1
  92. package/dist/components/multi-select/multi-select.d.ts.map +1 -1
  93. package/dist/components/patient-details/index.js +1 -1
  94. package/dist/components/patient-search/index.js +1 -1
  95. package/dist/components/patient-summary-card/index.js +1 -1
  96. package/dist/components/patient-table/index.js +1 -1
  97. package/dist/components/phone-input/index.js +1 -1
  98. package/dist/components/phone-input/phone-input.d.ts.map +1 -1
  99. package/dist/components/practice-results/index.js +1 -1
  100. package/dist/components/province-select/index.js +1 -1
  101. package/dist/components/task-editor/index.js +1 -1
  102. package/dist/index.js +29 -29
  103. package/dist/patterns/anamnesis/index.js +1 -1
  104. package/dist/patterns/calendar/index.js +1 -1
  105. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  106. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  107. package/dist/patterns/registration-form/index.js +1 -1
  108. package/dist/patterns/send-registration-link-form/index.js +1 -1
  109. package/dist/tokens.css +1 -1
  110. package/package.json +1 -1
  111. package/dist/_chunks/booking-By4I_1A-.js.map +0 -1
  112. package/dist/_chunks/contact-profile-card-DKk94l-d.js.map +0 -1
@@ -1,18 +1,18 @@
1
1
  import { jsx as r, jsxs as b, Fragment as Ze } from "react/jsx-runtime";
2
- import { forwardRef as et, useContext as tt, useState as D, useRef as y, useId as st, useMemo as R, useEffect as X, useCallback as pe } from "react";
2
+ import { forwardRef as et, useContext as tt, useState as D, useRef as y, useId as st, useMemo as R, useEffect as W, useCallback as fe } from "react";
3
3
  import * as q from "@radix-ui/react-popover";
4
4
  import { _ as c } from "./index-4xgbg-sn.js";
5
- import { c as be } from "./index-D2ZczOXr.js";
5
+ import { c as ve } from "./index-D2ZczOXr.js";
6
6
  import { useTranslation as rt } from "react-i18next";
7
7
  import { u as nt, F as it, b as at } from "./form-field-context-DtiROUJV.js";
8
- import { T as fe } from "./tooltip-uEBdD1-5.js";
8
+ import { T as he } from "./tooltip-uEBdD1-5.js";
9
9
  import { c as ot } from "./compose-refs-C0k0tdqF.js";
10
10
  import { u as lt } from "./use-controllable-state-BiY4xTzM.js";
11
11
  import { u as M } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
12
12
  import { g as dt } from "./group-options-BvKhQ3xb.js";
13
- import { b as ve } from "./menu-row-BAr8bx1I.js";
13
+ import { b as ye } from "./menu-row-BAr8bx1I.js";
14
14
  import { O as ct, a as ut, o as mt, b as pt, c as ft } from "./option-row-Dc7BrbK8.js";
15
- import { b as J, c as ht } from "./input-surface-iBmxVBfr.js";
15
+ import { b as X, c as ht } from "./input-surface-iBmxVBfr.js";
16
16
  import { u as gt } from "./registry-DvAUVLHh.js";
17
17
  import { X as bt } from "./x-B5YnXwCz.js";
18
18
  import { C as vt } from "./check-DrFSN__t.js";
@@ -129,7 +129,7 @@ const yt = {
129
129
  description: "Each option emits its value as data-option-id."
130
130
  }
131
131
  }
132
- }, St = be(
132
+ }, St = ve(
133
133
  [
134
134
  "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-1 ds:w-full",
135
135
  ht,
@@ -139,14 +139,14 @@ const yt = {
139
139
  {
140
140
  variants: {
141
141
  size: {
142
- sm: `ds:min-h-8 ds:ps-2 ds:pe-2 ds:py-1 ${J.sm}`,
143
- md: `ds:min-h-[var(--min-target-size)] ds:ps-3 ds:pe-3 ds:py-1.5 ${J.md}`,
144
- lg: `ds:min-h-12 ds:ps-4 ds:pe-4 ds:py-2 ${J.lg}`
142
+ sm: `ds:min-h-8 ds:ps-2 ds:pe-2 ds:py-1 ${X.sm}`,
143
+ md: `ds:min-h-[var(--min-target-size)] ds:ps-3 ds:pe-3 ds:py-1.5 ${X.md}`,
144
+ lg: `ds:min-h-12 ds:ps-4 ds:pe-4 ds:py-2 ${X.lg}`
145
145
  }
146
146
  },
147
147
  defaultVariants: { size: "md" }
148
148
  }
149
- ), he = be(
149
+ ), ge = ve(
150
150
  [
151
151
  "ds:inline-flex ds:items-center ds:gap-1",
152
152
  "ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-muted",
@@ -194,30 +194,30 @@ const yt = {
194
194
  "ds:relative ds:flex ds:cursor-pointer ds:items-center",
195
195
  "ds:rounded-[var(--radius-sm)] ds:ps-2 ds:pe-2 ds:py-1.5",
196
196
  "ds:text-[var(--font-size-sm)] ds:text-foreground ds:outline-none ds:select-none",
197
- ve.selected,
197
+ ye.selected,
198
198
  "ds:aria-[disabled=true]:pointer-events-none ds:aria-[disabled=true]:opacity-50",
199
199
  "ds:data-[disabled=true]:pointer-events-none ds:data-[disabled=true]:opacity-50"
200
- ].join(" "), ge = [
200
+ ].join(" "), be = [
201
201
  "ds:relative ds:flex ds:cursor-pointer ds:items-center",
202
202
  "ds:rounded-[var(--radius-sm)] ds:ps-2 ds:pe-2 ds:py-1.5",
203
203
  "ds:text-[var(--font-size-sm)] ds:font-medium ds:text-primary ds:outline-none ds:select-none",
204
- ve.selected
205
- ].join(" "), wt = "__ui-multiselect-select-all__", Ct = "__ui-multiselect-clear-all__", ye = et(
204
+ ye.selected
205
+ ].join(" "), wt = "__ui-multiselect-select-all__", Ct = "__ui-multiselect-clear-all__", Se = et(
206
206
  function({
207
207
  options: l,
208
- value: Se,
209
- defaultValue: xe,
210
- onChange: Ie,
208
+ value: xe,
209
+ defaultValue: Ie,
210
+ onChange: Ne,
211
211
  onComplete: z,
212
- placeholder: Ne,
212
+ placeholder: we,
213
213
  maxSelections: I,
214
- allowSelectAll: Z = !1,
215
- allowClear: ee = !1,
214
+ allowSelectAll: J = !1,
215
+ allowClear: Z = !1,
216
216
  filter: P,
217
217
  size: T = "md",
218
- disabled: we,
219
- wrapOptionLabels: te = !1,
220
- className: Ce,
218
+ disabled: Ce,
219
+ wrapOptionLabels: ee = !1,
220
+ className: Ae,
221
221
  id: j,
222
222
  // Pull `aria-label` out of the div spread so it names the combobox
223
223
  // INPUT (the interactive control) rather than the wrapper div. Lets a
@@ -226,61 +226,61 @@ const yt = {
226
226
  // after its column). Untouched callers fall back to the placeholder.
227
227
  // Inside a FormField the field's label names the input and this is
228
228
  // ignored, so it can never override the visible text (WCAG 2.5.3).
229
- "aria-label": se,
230
- ...Ae
231
- }, _e) {
232
- const { t: u } = rt("ui"), m = nt(), S = tt(it) !== null, [ke, B] = lt({
233
- value: Se,
234
- defaultValue: xe ?? [],
235
- onChange: Ie
236
- }), i = ke ?? [], [w, p] = D(!1), [f, K] = D(""), v = y(null), re = `${st()}-count`, N = y([]), $ = y(null), Re = ot(_e, $), x = S && m.disabled || !!we, Te = S && m.required, ne = S && m.invalid, Ee = S && m.describedBy ? m.describedBy : void 0, Oe = j ?? (S ? m.id : void 0);
229
+ "aria-label": te,
230
+ ..._e
231
+ }, ke) {
232
+ const { t: u } = rt("ui"), m = nt(), S = tt(it) !== null, [Re, B] = lt({
233
+ value: xe,
234
+ defaultValue: Ie ?? [],
235
+ onChange: Ne
236
+ }), i = Re ?? [], [w, p] = D(!1), [f, K] = D(""), v = y(null), se = `${st()}-count`, N = y([]), $ = y(null), Te = ot(ke, $), x = S && m.disabled || !!Ce, Ee = S && m.required, re = S && m.invalid, Oe = S && m.describedBy ? m.describedBy : void 0, Fe = j ?? (S ? m.id : void 0);
237
237
  at(m, v);
238
- const Fe = R(() => {
238
+ const Ve = R(() => {
239
239
  const e = /* @__PURE__ */ new Map();
240
240
  for (const t of l) e.set(t.value, t.label);
241
241
  return e;
242
- }, [l]), Ve = R(() => {
242
+ }, [l]), Le = R(() => {
243
243
  const e = /* @__PURE__ */ new Map();
244
244
  for (const t of l) e.set(t.value, t.dir);
245
245
  return e;
246
- }, [l]), ie = typeof I == "number" && i.length >= I, C = (e) => {
246
+ }, [l]), ne = typeof I == "number" && i.length >= I, C = (e) => {
247
247
  B(e);
248
- }, Le = (e) => {
248
+ }, De = (e) => {
249
249
  if (i.includes(e)) {
250
250
  C(i.filter((t) => t !== e));
251
251
  return;
252
252
  }
253
- ie || C([...i, e]);
253
+ ne || C([...i, e]);
254
254
  }, U = (e) => {
255
255
  const t = i.filter((n, a) => a !== e);
256
256
  return C(t), t;
257
- }, De = () => {
257
+ }, qe = () => {
258
258
  const e = l.filter((n) => !n.disabled).map((n) => n.value), t = typeof I == "number" ? I : e.length;
259
259
  C(e.slice(0, t));
260
- }, qe = () => {
260
+ }, Me = () => {
261
261
  C([]);
262
- }, ae = y(i);
263
- X(() => {
264
- ae.current = i;
262
+ }, ie = y(i);
263
+ W(() => {
264
+ ie.current = i;
265
265
  }, [i]);
266
- const oe = y(f);
267
- X(() => {
268
- oe.current = f;
266
+ const ae = y(f);
267
+ W(() => {
268
+ ae.current = f;
269
269
  }, [f]);
270
- const le = y(w);
271
- X(() => {
272
- le.current = w;
270
+ const oe = y(w);
271
+ W(() => {
272
+ oe.current = w;
273
273
  }, [w]);
274
- const H = pe(
274
+ const H = fe(
275
275
  (e) => {
276
276
  B(e);
277
277
  },
278
278
  [B]
279
- ), Me = R(
279
+ ), ze = R(
280
280
  () => ({
281
- getSelection: () => [...ae.current],
282
- getQuery: () => oe.current,
283
- getIsOpen: () => le.current,
281
+ getSelection: () => [...ie.current],
282
+ getQuery: () => ae.current,
283
+ getIsOpen: () => oe.current,
284
284
  setSelection: (e) => H(e),
285
285
  clearSelection: () => H([]),
286
286
  setQuery: (e) => K(e),
@@ -289,15 +289,15 @@ const yt = {
289
289
  }),
290
290
  [H]
291
291
  );
292
- gt(yt, Me, j);
293
- const Y = Ne ?? u("inputs.multiSelect.placeholder", "Select…"), de = R(() => {
292
+ gt(yt, ze, j);
293
+ const le = we ?? u("inputs.multiSelect.placeholder", "Select…"), de = R(() => {
294
294
  if (!f) return l;
295
295
  const e = f.toLowerCase();
296
296
  return l.filter((t) => P ? P(f, t) : t.label.toLowerCase().includes(e));
297
- }, [l, f, P]), ze = R(
297
+ }, [l, f, P]), Pe = R(
298
298
  () => dt(de),
299
299
  [de]
300
- ), Pe = (e) => {
300
+ ), je = (e) => {
301
301
  var a;
302
302
  const t = e.currentTarget;
303
303
  if (e.key === "Backspace" && f === "" && i.length > 0) {
@@ -324,7 +324,7 @@ const yt = {
324
324
  return;
325
325
  }
326
326
  !w && (e.key === "ArrowDown" || e.key === "Enter") && p(!0);
327
- }, je = (e) => (t) => {
327
+ }, Be = (e) => (t) => {
328
328
  var h, d, g, _;
329
329
  if (t.key === "Backspace" || t.key === "Delete" || t.key === "Enter" || t.key === " ") {
330
330
  t.preventDefault(), t.stopPropagation();
@@ -355,10 +355,10 @@ const yt = {
355
355
  return;
356
356
  }
357
357
  t.key === "Escape" && (p(!1), (_ = v.current) == null || _.focus());
358
- }, [E, G] = D(
358
+ }, [E, Y] = D(
359
359
  Number.POSITIVE_INFINITY
360
- ), [Be, Ke] = D(0), ce = y(-1), O = pe(() => {
361
- G(Number.POSITIVE_INFINITY), Ke((e) => e + 1);
360
+ ), [Ke, $e] = D(0), ce = y(-1), O = fe(() => {
361
+ Y(Number.POSITIVE_INFINITY), $e((e) => e + 1);
362
362
  }, []);
363
363
  M(() => {
364
364
  const e = $.current;
@@ -367,7 +367,7 @@ const yt = {
367
367
  e.querySelectorAll('[data-ui-chip="true"]')
368
368
  );
369
369
  if (t.length === 0) {
370
- G(Number.POSITIVE_INFINITY);
370
+ Y(Number.POSITIVE_INFINITY);
371
371
  return;
372
372
  }
373
373
  const n = t[0].offsetTop;
@@ -375,10 +375,10 @@ const yt = {
375
375
  for (const s of t)
376
376
  if (s.offsetTop === n) a++;
377
377
  else break;
378
- G(
378
+ Y(
379
379
  a === t.length ? Number.POSITIVE_INFINITY : Math.max(1, a - 1)
380
380
  );
381
- }, [Be]), M(() => {
381
+ }, [Ke]), M(() => {
382
382
  O();
383
383
  }, [i.length, T, O]), M(() => {
384
384
  const e = $.current;
@@ -394,48 +394,48 @@ const yt = {
394
394
  }, [O]);
395
395
  const F = i.map((e) => ({
396
396
  value: e,
397
- label: Fe.get(e) ?? e
398
- })), ue = E === Number.POSITIVE_INFINITY || E >= F.length, $e = ue ? F : F.slice(0, E), me = ue ? [] : F.slice(E), A = me.length, Ue = (e) => {
397
+ label: Ve.get(e) ?? e
398
+ })), ue = E === Number.POSITIVE_INFINITY || E >= F.length, Ue = ue ? F : F.slice(0, E), me = ue ? [] : F.slice(E), A = me.length, He = (e) => {
399
399
  var n;
400
400
  if (x) return;
401
401
  const t = e.target;
402
402
  t.closest('[data-ui-chip="true"]') || t.closest('[data-ui-chip-dismiss="true"]') || (p(!0), (n = v.current) == null || n.focus());
403
- }, He = (e) => {
403
+ }, Ye = (e) => {
404
404
  if (x) {
405
405
  p(!1);
406
406
  return;
407
407
  }
408
408
  p(e), e || (K(""), z == null || z(i));
409
- }, Ye = Z || ee, Ge = u("inputs.multiSelect.selected", {
409
+ }, Ge = J || Z, Qe = u("inputs.multiSelect.selected", {
410
410
  count: i.length,
411
411
  defaultValue: `${i.length} selected`
412
- }), Qe = S && m.label || se || Y, We = [re, Ee].filter(Boolean).join(" "), Q = S ? `${m.id}-label` : void 0, V = y(null);
412
+ }), pe = S && m.label || te || le, We = [se, Oe].filter(Boolean).join(" "), G = S ? `${m.id}-label` : void 0, V = y(null);
413
413
  M(() => {
414
414
  const e = v.current;
415
415
  if (!e) return;
416
416
  const t = e.getAttribute("aria-labelledby");
417
- if (Q) {
418
- if (t === Q) return;
419
- V.current = t, e.setAttribute("aria-labelledby", Q);
417
+ if (G) {
418
+ if (t === G) return;
419
+ V.current = t, e.setAttribute("aria-labelledby", G);
420
420
  } else V.current !== null && (e.setAttribute("aria-labelledby", V.current), V.current = null);
421
421
  });
422
- const { onClick: W, ...Xe } = Ae;
423
- return /* @__PURE__ */ r(c, { shouldFilter: !1, label: Qe, children: /* @__PURE__ */ b(q.Root, { open: w, onOpenChange: He, children: [
422
+ const { onClick: Q, ...Xe } = _e;
423
+ return /* @__PURE__ */ r(c, { shouldFilter: !1, label: pe, children: /* @__PURE__ */ b(q.Root, { open: w, onOpenChange: Ye, children: [
424
424
  /* @__PURE__ */ r(q.Anchor, { asChild: !0, children: /* @__PURE__ */ b(
425
425
  "div",
426
426
  {
427
- ref: Re,
428
- className: St({ size: T, className: Ce }),
427
+ ref: Te,
428
+ className: St({ size: T, className: Ae }),
429
429
  "aria-disabled": x || void 0,
430
- "aria-invalid": ne || void 0,
430
+ "aria-invalid": re || void 0,
431
431
  "data-component": "multi-select",
432
432
  "data-component-id": j,
433
433
  onClick: (e) => {
434
- W == null || W(e), Ue(e);
434
+ Q == null || Q(e), He(e);
435
435
  },
436
436
  ...Xe,
437
437
  children: [
438
- $e.map((e, t) => (
438
+ Ue.map((e, t) => (
439
439
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions -- chip pill receives focus via roving tabindex; chip removal uses an inner button
440
440
  /* @__PURE__ */ b(
441
441
  "span",
@@ -445,11 +445,11 @@ const yt = {
445
445
  },
446
446
  tabIndex: x ? -1 : 0,
447
447
  "data-ui-chip": "true",
448
- className: he({ size: T }),
449
- onKeyDown: je(t),
448
+ className: ge({ size: T }),
449
+ onKeyDown: Be(t),
450
450
  "aria-label": e.label,
451
451
  children: [
452
- /* @__PURE__ */ r("span", { dir: Ve.get(e.value), children: e.label }),
452
+ /* @__PURE__ */ r("span", { dir: Le.get(e.value), children: e.label }),
453
453
  /* @__PURE__ */ r(
454
454
  "button",
455
455
  {
@@ -477,14 +477,14 @@ const yt = {
477
477
  )
478
478
  )),
479
479
  A > 0 ? /* @__PURE__ */ r(
480
- fe,
480
+ he,
481
481
  {
482
482
  label: me.map((e) => e.label).join(", "),
483
483
  delayDuration: 200,
484
484
  children: /* @__PURE__ */ r(
485
485
  "span",
486
486
  {
487
- className: he({ size: T }),
487
+ className: ge({ size: T }),
488
488
  tabIndex: 0,
489
489
  role: "button",
490
490
  "aria-label": u("inputs.multiSelect.overflow", {
@@ -505,15 +505,15 @@ const yt = {
505
505
  ref: v,
506
506
  value: f,
507
507
  onValueChange: K,
508
- onKeyDown: Pe,
508
+ onKeyDown: je,
509
509
  onFocus: () => {
510
510
  x || p(!0);
511
511
  },
512
- placeholder: i.length === 0 ? Y : "",
513
- id: Oe,
512
+ placeholder: i.length === 0 ? le : "",
513
+ id: Fe,
514
514
  "aria-describedby": We,
515
- "aria-invalid": ne || void 0,
516
- "aria-required": Te || void 0,
515
+ "aria-invalid": re || void 0,
516
+ "aria-required": Ee || void 0,
517
517
  disabled: x,
518
518
  className: [
519
519
  "ds:flex-1 ds:min-w-[6rem] ds:bg-transparent ds:outline-none",
@@ -522,7 +522,7 @@ const yt = {
522
522
  ].join(" ")
523
523
  }
524
524
  ),
525
- /* @__PURE__ */ r("span", { id: re, hidden: !0, children: Ge })
525
+ /* @__PURE__ */ r("span", { id: se, hidden: !0, children: Qe })
526
526
  ]
527
527
  }
528
528
  ) }),
@@ -541,40 +541,40 @@ const yt = {
541
541
  {
542
542
  role: "listbox",
543
543
  "aria-multiselectable": "true",
544
- "aria-label": Y,
544
+ label: pe,
545
545
  className: "ds:max-h-[20rem] ds:overflow-y-auto ds:p-1",
546
546
  children: [
547
- Ye ? /* @__PURE__ */ b(c.Group, { children: [
548
- Z ? /* @__PURE__ */ r(
547
+ Ge ? /* @__PURE__ */ b(c.Group, { children: [
548
+ J ? /* @__PURE__ */ r(
549
549
  c.Item,
550
550
  {
551
551
  value: wt,
552
- onSelect: De,
553
- className: ge,
552
+ onSelect: qe,
553
+ className: be,
554
554
  children: u("inputs.multiSelect.selectAll", "Select all")
555
555
  }
556
556
  ) : null,
557
- ee ? /* @__PURE__ */ r(
557
+ Z ? /* @__PURE__ */ r(
558
558
  c.Item,
559
559
  {
560
560
  value: Ct,
561
- onSelect: qe,
562
- className: ge,
561
+ onSelect: Me,
562
+ className: be,
563
563
  children: u("inputs.multiSelect.clearAll", "Clear all")
564
564
  }
565
565
  ) : null
566
566
  ] }) : null,
567
567
  /* @__PURE__ */ r(c.Empty, { className: "ds:ps-2 ds:pe-2 ds:py-2 type-body-sm ds:text-muted-foreground", children: u("inputs.multiSelect.noOptions", "No options found") }),
568
- ze.map(({ group: e, items: t }, n) => {
568
+ Pe.map(({ group: e, items: t }, n) => {
569
569
  const a = t.map((s) => {
570
- const h = i.includes(s.value), d = !h && ie, g = !!s.disabled || d, _ = /* @__PURE__ */ b(
570
+ const h = i.includes(s.value), d = !h && ne, g = !!s.disabled || d, _ = /* @__PURE__ */ b(
571
571
  c.Item,
572
572
  {
573
573
  value: s.value,
574
574
  "data-option-id": s.value,
575
575
  disabled: g,
576
576
  onSelect: () => {
577
- g || Le(s.value);
577
+ g || De(s.value);
578
578
  },
579
579
  "aria-selected": h,
580
580
  "aria-disabled": g || void 0,
@@ -604,7 +604,7 @@ const yt = {
604
604
  }
605
605
  )
606
606
  ) : null,
607
- s.description || te ? (
607
+ s.description || ee ? (
608
608
  // Stacked, as in Combobox: the label and its end
609
609
  // content on one row, the description under them.
610
610
  // The option's name reads in that order.
@@ -615,7 +615,7 @@ const yt = {
615
615
  {
616
616
  dir: s.dir,
617
617
  className: mt({
618
- wrap: te,
618
+ wrap: ee,
619
619
  className: "ds:flex-1 ds:text-start"
620
620
  }),
621
621
  children: s.label
@@ -660,7 +660,7 @@ const yt = {
660
660
  s.value
661
661
  );
662
662
  return d ? /* @__PURE__ */ r(
663
- fe,
663
+ he,
664
664
  {
665
665
  label: u("inputs.multiSelect.maxReached", {
666
666
  count: I,
@@ -690,11 +690,11 @@ const yt = {
690
690
  ] }) });
691
691
  }
692
692
  );
693
- ye.displayName = "MultiSelect";
694
- const Kt = ye;
693
+ Se.displayName = "MultiSelect";
694
+ const Kt = Se;
695
695
  export {
696
696
  Kt as M,
697
697
  St as a,
698
698
  yt as m
699
699
  };
700
- //# sourceMappingURL=multi-select-BOad3za9.js.map
700
+ //# sourceMappingURL=multi-select-IOVnOGlP.js.map