@alfadocs/ui-kit-debug 1.25.1-calendar.7 → 1.26.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 (179) hide show
  1. package/dist/_chunks/{address-fields-jFfjxOQR.js → address-fields-CZ0pEdEI.js} +3 -3
  2. package/dist/_chunks/{address-fields-jFfjxOQR.js.map → address-fields-CZ0pEdEI.js.map} +1 -1
  3. package/dist/_chunks/{appointment-card-CvUFFEdS.js → appointment-card-Dzr3GeVz.js} +6 -8
  4. package/dist/_chunks/appointment-card-Dzr3GeVz.js.map +1 -0
  5. package/dist/_chunks/{appointment-timeline-DsMZY7U9.js → appointment-timeline-DhHwmHo1.js} +2 -2
  6. package/dist/_chunks/{appointment-timeline-DsMZY7U9.js.map → appointment-timeline-DhHwmHo1.js.map} +1 -1
  7. package/dist/_chunks/{appointment-tray-Z2GaOIYQ.js → appointment-tray-4FUu_5NX.js} +2 -2
  8. package/dist/_chunks/{appointment-tray-Z2GaOIYQ.js.map → appointment-tray-4FUu_5NX.js.map} +1 -1
  9. package/dist/_chunks/{booking-B8C7jMrn.js → booking-BtSOKjQu.js} +401 -384
  10. package/dist/_chunks/{booking-B8C7jMrn.js.map → booking-BtSOKjQu.js.map} +1 -1
  11. package/dist/_chunks/{calendar-CBqU-UIR.js → calendar-CI9MINcR.js} +2 -4
  12. package/dist/_chunks/calendar-CI9MINcR.js.map +1 -0
  13. package/dist/_chunks/calendar-workspace-CTXjHC4R.js +7506 -0
  14. package/dist/_chunks/calendar-workspace-CTXjHC4R.js.map +1 -0
  15. package/dist/_chunks/{color-picker-Bl5f0iK1.js → color-picker-CU303VjY.js} +25 -28
  16. package/dist/_chunks/color-picker-CU303VjY.js.map +1 -0
  17. package/dist/_chunks/{combobox-DnSdYssy.js → combobox-D7_NLE2Z.js} +215 -216
  18. package/dist/_chunks/combobox-D7_NLE2Z.js.map +1 -0
  19. package/dist/_chunks/{country-select-CfDNFG5c.js → country-select-DzbPFktV.js} +2 -2
  20. package/dist/_chunks/{country-select-CfDNFG5c.js.map → country-select-DzbPFktV.js.map} +1 -1
  21. package/dist/_chunks/{face-scheme-l-CQyLs-.js → face-scheme-DA2vjqaM.js} +2 -2
  22. package/dist/_chunks/{face-scheme-l-CQyLs-.js.map → face-scheme-DA2vjqaM.js.map} +1 -1
  23. package/dist/_chunks/{notes-panel-D4S2VwDx.js → notes-panel-CTNpsByN.js} +2 -2
  24. package/dist/_chunks/{notes-panel-D4S2VwDx.js.map → notes-panel-CTNpsByN.js.map} +1 -1
  25. package/dist/_chunks/{patient-details-CdfursHt.js → patient-details-DYAmq76G.js} +3 -3
  26. package/dist/_chunks/{patient-details-CdfursHt.js.map → patient-details-DYAmq76G.js.map} +1 -1
  27. package/dist/_chunks/{province-select-BaUnkg4S.js → province-select-BBc7s7vR.js} +2 -2
  28. package/dist/_chunks/{province-select-BaUnkg4S.js.map → province-select-BBc7s7vR.js.map} +1 -1
  29. package/dist/_chunks/{rich-text-editor-VJATL1Tk.js → rich-text-editor-lSCiE0Zz.js} +2 -2
  30. package/dist/_chunks/{rich-text-editor-VJATL1Tk.js.map → rich-text-editor-lSCiE0Zz.js.map} +1 -1
  31. package/dist/_chunks/signature-status-chip-n57D-hhv.js +179 -0
  32. package/dist/_chunks/signature-status-chip-n57D-hhv.js.map +1 -0
  33. package/dist/agent-catalog.json +3 -6
  34. package/dist/agent-i18n/en.json +2 -2
  35. package/dist/components/address-fields/index.js +1 -1
  36. package/dist/components/appointment-card/appointment-card.d.ts.map +1 -1
  37. package/dist/components/appointment-card/index.js +2 -2
  38. package/dist/components/appointment-timeline/index.js +1 -1
  39. package/dist/components/booking/booking.d.ts.map +1 -1
  40. package/dist/components/booking/index.js +1 -1
  41. package/dist/components/calendar/calendar.d.ts.map +1 -1
  42. package/dist/components/calendar/index.js +1 -1
  43. package/dist/components/color-picker/color-utils.d.ts.map +1 -1
  44. package/dist/components/color-picker/index.js +1 -1
  45. package/dist/components/combobox/combobox.d.ts +0 -5
  46. package/dist/components/combobox/combobox.d.ts.map +1 -1
  47. package/dist/components/combobox/index.js +1 -1
  48. package/dist/components/country-select/index.js +1 -1
  49. package/dist/components/face-scheme/index.js +1 -1
  50. package/dist/components/notes-panel/index.js +1 -1
  51. package/dist/components/patient-details/index.js +1 -1
  52. package/dist/components/province-select/index.js +1 -1
  53. package/dist/components/rich-text-editor/index.js +1 -1
  54. package/dist/components/signature-status-chip/index.d.ts +2 -2
  55. package/dist/components/signature-status-chip/index.d.ts.map +1 -1
  56. package/dist/components/signature-status-chip/index.js +4 -3
  57. package/dist/components/signature-status-chip/signature-status-chip.d.ts +100 -1
  58. package/dist/components/signature-status-chip/signature-status-chip.d.ts.map +1 -1
  59. package/dist/i18n/locales/ar.d.ts +13 -0
  60. package/dist/i18n/locales/ar.d.ts.map +1 -1
  61. package/dist/i18n/locales/ar.js +17 -1
  62. package/dist/i18n/locales/ar.js.map +1 -1
  63. package/dist/i18n/locales/de.d.ts +13 -0
  64. package/dist/i18n/locales/de.d.ts.map +1 -1
  65. package/dist/i18n/locales/de.js +17 -1
  66. package/dist/i18n/locales/de.js.map +1 -1
  67. package/dist/i18n/locales/el.d.ts +13 -0
  68. package/dist/i18n/locales/el.d.ts.map +1 -1
  69. package/dist/i18n/locales/el.js +17 -1
  70. package/dist/i18n/locales/el.js.map +1 -1
  71. package/dist/i18n/locales/en.d.ts +13 -0
  72. package/dist/i18n/locales/en.d.ts.map +1 -1
  73. package/dist/i18n/locales/en.js +17 -1
  74. package/dist/i18n/locales/en.js.map +1 -1
  75. package/dist/i18n/locales/es.d.ts +13 -0
  76. package/dist/i18n/locales/es.d.ts.map +1 -1
  77. package/dist/i18n/locales/es.js +17 -1
  78. package/dist/i18n/locales/es.js.map +1 -1
  79. package/dist/i18n/locales/fr.d.ts +13 -0
  80. package/dist/i18n/locales/fr.d.ts.map +1 -1
  81. package/dist/i18n/locales/fr.js +17 -1
  82. package/dist/i18n/locales/fr.js.map +1 -1
  83. package/dist/i18n/locales/hi.d.ts +13 -0
  84. package/dist/i18n/locales/hi.d.ts.map +1 -1
  85. package/dist/i18n/locales/hi.js +13 -1
  86. package/dist/i18n/locales/hi.js.map +1 -1
  87. package/dist/i18n/locales/it.d.ts +13 -0
  88. package/dist/i18n/locales/it.d.ts.map +1 -1
  89. package/dist/i18n/locales/it.js +17 -1
  90. package/dist/i18n/locales/it.js.map +1 -1
  91. package/dist/i18n/locales/ja.d.ts +13 -0
  92. package/dist/i18n/locales/ja.d.ts.map +1 -1
  93. package/dist/i18n/locales/ja.js +17 -1
  94. package/dist/i18n/locales/ja.js.map +1 -1
  95. package/dist/i18n/locales/nl.d.ts +13 -0
  96. package/dist/i18n/locales/nl.d.ts.map +1 -1
  97. package/dist/i18n/locales/nl.js +17 -1
  98. package/dist/i18n/locales/nl.js.map +1 -1
  99. package/dist/i18n/locales/pl.d.ts +13 -0
  100. package/dist/i18n/locales/pl.d.ts.map +1 -1
  101. package/dist/i18n/locales/pl.js +17 -1
  102. package/dist/i18n/locales/pl.js.map +1 -1
  103. package/dist/i18n/locales/pt.d.ts +13 -0
  104. package/dist/i18n/locales/pt.d.ts.map +1 -1
  105. package/dist/i18n/locales/pt.js +17 -1
  106. package/dist/i18n/locales/pt.js.map +1 -1
  107. package/dist/i18n/locales/ro.d.ts +13 -0
  108. package/dist/i18n/locales/ro.d.ts.map +1 -1
  109. package/dist/i18n/locales/ro.js +17 -1
  110. package/dist/i18n/locales/ro.js.map +1 -1
  111. package/dist/i18n/locales/ru.d.ts +13 -0
  112. package/dist/i18n/locales/ru.d.ts.map +1 -1
  113. package/dist/i18n/locales/ru.js +17 -1
  114. package/dist/i18n/locales/ru.js.map +1 -1
  115. package/dist/i18n/locales/sq.d.ts +13 -0
  116. package/dist/i18n/locales/sq.d.ts.map +1 -1
  117. package/dist/i18n/locales/sq.js +17 -1
  118. package/dist/i18n/locales/sq.js.map +1 -1
  119. package/dist/i18n/locales/sv.d.ts +13 -0
  120. package/dist/i18n/locales/sv.d.ts.map +1 -1
  121. package/dist/i18n/locales/sv.js +17 -1
  122. package/dist/i18n/locales/sv.js.map +1 -1
  123. package/dist/i18n/locales/tr.d.ts +13 -0
  124. package/dist/i18n/locales/tr.d.ts.map +1 -1
  125. package/dist/i18n/locales/tr.js +17 -1
  126. package/dist/i18n/locales/tr.js.map +1 -1
  127. package/dist/i18n/locales/zh.d.ts +13 -0
  128. package/dist/i18n/locales/zh.d.ts.map +1 -1
  129. package/dist/i18n/locales/zh.js +13 -1
  130. package/dist/i18n/locales/zh.js.map +1 -1
  131. package/dist/index.js +281 -280
  132. package/dist/locales/ar.json +14 -1
  133. package/dist/locales/de.json +14 -1
  134. package/dist/locales/el.json +14 -1
  135. package/dist/locales/en.json +14 -1
  136. package/dist/locales/es.json +14 -1
  137. package/dist/locales/fr.json +14 -1
  138. package/dist/locales/hi.json +14 -1
  139. package/dist/locales/it.json +14 -1
  140. package/dist/locales/ja.json +14 -1
  141. package/dist/locales/nl.json +14 -1
  142. package/dist/locales/pl.json +14 -1
  143. package/dist/locales/pt.json +14 -1
  144. package/dist/locales/ro.json +14 -1
  145. package/dist/locales/ru.json +14 -1
  146. package/dist/locales/sq.json +14 -1
  147. package/dist/locales/sv.json +14 -1
  148. package/dist/locales/tr.json +14 -1
  149. package/dist/locales/zh.json +14 -1
  150. package/dist/patterns/calendar/calendar-workspace.d.ts +1 -21
  151. package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
  152. package/dist/patterns/calendar/calendar-workspace.model.d.ts +3 -1
  153. package/dist/patterns/calendar/calendar-workspace.model.d.ts.map +1 -1
  154. package/dist/patterns/calendar/calendar.data.d.ts +0 -17
  155. package/dist/patterns/calendar/calendar.data.d.ts.map +1 -1
  156. package/dist/patterns/calendar/calendar.journey.d.ts +1 -3
  157. package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
  158. package/dist/patterns/calendar/calendar.model.d.ts +0 -9
  159. package/dist/patterns/calendar/calendar.model.d.ts.map +1 -1
  160. package/dist/patterns/calendar/calendar.sheets.d.ts +4 -12
  161. package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
  162. package/dist/patterns/calendar/calendar.surface.d.ts +1 -3
  163. package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
  164. package/dist/patterns/calendar/index.d.ts +2 -3
  165. package/dist/patterns/calendar/index.d.ts.map +1 -1
  166. package/dist/patterns/calendar/index.js +1 -1
  167. package/package.json +2 -3
  168. package/dist/_chunks/appointment-card-CvUFFEdS.js.map +0 -1
  169. package/dist/_chunks/calendar-CBqU-UIR.js.map +0 -1
  170. package/dist/_chunks/calendar-workspace-CDhW8tPy.js +0 -7881
  171. package/dist/_chunks/calendar-workspace-CDhW8tPy.js.map +0 -1
  172. package/dist/_chunks/color-picker-Bl5f0iK1.js.map +0 -1
  173. package/dist/_chunks/combobox-DnSdYssy.js.map +0 -1
  174. package/dist/_chunks/signature-status-chip-DqrPIJtH.js +0 -97
  175. package/dist/_chunks/signature-status-chip-DqrPIJtH.js.map +0 -1
  176. package/dist/patterns/calendar/calendar-editor-hydration.d.ts +0 -36
  177. package/dist/patterns/calendar/calendar-editor-hydration.d.ts.map +0 -1
  178. package/dist/patterns/calendar/calendar-patient-picker.d.ts +0 -11
  179. package/dist/patterns/calendar/calendar-patient-picker.d.ts.map +0 -1
@@ -1,20 +1,20 @@
1
- import { jsx as t, jsxs as R } from "react/jsx-runtime";
2
- import { forwardRef as Ke, useContext as Oe, useMemo as U, useState as re, useRef as g, useEffect as F, useCallback as Te } from "react";
3
- import * as E from "@radix-ui/react-popover";
4
- import { R as $e, _ as u, P as Be } from "./index-4xgbg-sn.js";
5
- import { c as V } from "./index-D2ZczOXr.js";
6
- import { useTranslation as Ue } from "react-i18next";
7
- import { u as He, F as Ge } from "./form-field-context-B3APVHKx.js";
8
- import { c as Me } from "./compose-refs-C0k0tdqF.js";
9
- import { n as H } from "./normalize-diacritics-BNGbFNlJ.js";
10
- import { g as Le } from "./group-options-BvKhQ3xb.js";
11
- import { u as Xe } from "./use-controllable-state-BiY4xTzM.js";
12
- import { u as We } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
13
- import { I as Je, a as G, d as M, c as Ye } from "./input-surface-xyERuLU_.js";
14
- import { u as Ze } from "./registry-DvAUVLHh.js";
15
- import { X as Qe } from "./x-B5YnXwCz.js";
16
- import { C as et } from "./check-DrFSN__t.js";
17
- const tt = {
1
+ import { jsx as t, jsxs as S } from "react/jsx-runtime";
2
+ import { forwardRef as ke, useContext as Ke, useMemo as B, useState as oe, useRef as g, useEffect as I, useCallback as Oe } from "react";
3
+ import * as _ from "@radix-ui/react-popover";
4
+ import { R as Te, _ as c, P as $e } from "./index-4xgbg-sn.js";
5
+ import { c as F } from "./index-D2ZczOXr.js";
6
+ import { useTranslation as Be } from "react-i18next";
7
+ import { u as Ue, F as He } from "./form-field-context-B3APVHKx.js";
8
+ import { c as Ge } from "./compose-refs-C0k0tdqF.js";
9
+ import { n as U } from "./normalize-diacritics-BNGbFNlJ.js";
10
+ import { g as Me } from "./group-options-BvKhQ3xb.js";
11
+ import { u as Le } from "./use-controllable-state-BiY4xTzM.js";
12
+ import { u as Qe } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
13
+ import { I as Xe, a as H, d as G, c as We } from "./input-surface-xyERuLU_.js";
14
+ import { u as Je } from "./registry-DvAUVLHh.js";
15
+ import { X as Ye } from "./x-B5YnXwCz.js";
16
+ import { C as Ze } from "./check-DrFSN__t.js";
17
+ const et = {
18
18
  id: "combobox",
19
19
  // Persisted single choice (value state + set_value) → select_single + set_value,
20
20
  // plus type-to-filter and open/close of the option list.
@@ -58,8 +58,8 @@ const tt = {
58
58
  descriptionKey: "ui.agent.combobox.actions.setValue",
59
59
  description: "Set the selected value programmatically.",
60
60
  examples: [{ args: { value: "it" }, note: 'Select the "it" option.' }],
61
- invoke: (s, n) => {
62
- s.setValue(n.value);
61
+ invoke: (s, a) => {
62
+ s.setValue(a.value);
63
63
  }
64
64
  },
65
65
  apply_filter: {
@@ -76,8 +76,8 @@ const tt = {
76
76
  idempotent: !0,
77
77
  descriptionKey: "ui.agent.combobox.actions.applyFilter",
78
78
  description: "Set the filter query for the option list.",
79
- invoke: (s, n) => {
80
- s.setQuery(n.query);
79
+ invoke: (s, a) => {
80
+ s.setQuery(a.query);
81
81
  }
82
82
  },
83
83
  clear_selection: {
@@ -121,7 +121,7 @@ const tt = {
121
121
  description: "Each option emits its value as data-option-id."
122
122
  }
123
123
  }
124
- }, st = V(
124
+ }, tt = F(
125
125
  [
126
126
  "ds:peer ds:w-full ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground",
127
127
  "ds:outline-none ds:border-0",
@@ -139,26 +139,26 @@ const tt = {
139
139
  size: "md"
140
140
  }
141
141
  }
142
- ), ot = V(
142
+ ), st = F(
143
143
  [
144
144
  "ds:group ds:relative ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)] ds:w-full",
145
- Ye
145
+ We
146
146
  ].join(" "),
147
147
  {
148
148
  variants: {
149
149
  size: {
150
- sm: `${G.sm} ${M.sm}`,
151
- md: `${G.md} ${M.md}`,
152
- lg: `${G.lg} ${M.lg}`
150
+ sm: `${H.sm} ${G.sm}`,
151
+ md: `${H.md} ${G.md}`,
152
+ lg: `${H.lg} ${G.lg}`
153
153
  },
154
- tone: Je
154
+ tone: Xe
155
155
  },
156
156
  defaultVariants: {
157
157
  size: "md",
158
158
  tone: "default"
159
159
  }
160
160
  }
161
- ), rt = V(
161
+ ), ot = F(
162
162
  [
163
163
  "ds:z-[var(--z-popover)] ds:overflow-hidden ds:w-[var(--radix-popover-trigger-width)]",
164
164
  "ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground",
@@ -170,7 +170,7 @@ const tt = {
170
170
  "ds:data-[side=top]:slide-in-from-bottom-2",
171
171
  "ds:motion-reduce:animate-none"
172
172
  ].join(" ")
173
- ), ie = V(
173
+ ), ne = F(
174
174
  [
175
175
  "ds:relative ds:flex ds:cursor-pointer ds:items-center ds:gap-[var(--spacing-sm)]",
176
176
  "ds:rounded-[var(--radius-sm)]",
@@ -192,212 +192,211 @@ const tt = {
192
192
  size: "md"
193
193
  }
194
194
  }
195
- ), it = [
195
+ ), nt = [
196
196
  "ds:ps-3 ds:pe-3 ds:py-1.5",
197
197
  "type-eyebrow ds:text-muted-foreground"
198
- ].join(" "), at = "ds:max-h-[18rem] ds:overflow-y-auto ds:p-[var(--spacing-xs)]", nt = "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", dt = {
198
+ ].join(" "), rt = "ds:max-h-[18rem] ds:overflow-y-auto ds:p-[var(--spacing-xs)]", at = "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", it = {
199
199
  sm: "ds:size-3.5",
200
200
  md: "ds:size-4",
201
201
  lg: "ds:size-5"
202
202
  };
203
- function lt({
203
+ function dt({
204
204
  search: s,
205
- label: n,
206
- iconClass: C,
207
- size: j,
208
- onSelect: A
205
+ label: a,
206
+ iconClass: E,
207
+ size: V,
208
+ onSelect: j
209
209
  }) {
210
- return Be((q) => q.filtered.count) > 0 ? null : /* @__PURE__ */ R(
211
- u.Item,
210
+ return $e((q) => q.filtered.count) > 0 ? null : /* @__PURE__ */ S(
211
+ c.Item,
212
212
  {
213
213
  value: `__combobox-create__${s}`,
214
214
  keywords: [],
215
215
  forceMount: !0,
216
- onSelect: () => A(s),
217
- className: ie({ size: j }),
216
+ onSelect: () => j(s),
217
+ className: ne({ size: V }),
218
218
  children: [
219
219
  /* @__PURE__ */ t(
220
220
  "span",
221
221
  {
222
222
  "aria-hidden": "true",
223
- className: `ds:inline-flex ds:items-center ds:justify-center ${C}`
223
+ className: `ds:inline-flex ds:items-center ds:justify-center ${E}`
224
224
  }
225
225
  ),
226
- /* @__PURE__ */ t("span", { className: "ds:flex-1 ds:truncate", children: n })
226
+ /* @__PURE__ */ t("span", { className: "ds:flex-1 ds:truncate", children: a })
227
227
  ]
228
228
  }
229
229
  );
230
230
  }
231
- const ae = Ke(
231
+ const re = ke(
232
232
  function({
233
- options: n,
234
- value: C,
235
- defaultValue: j,
236
- onValueChange: A,
237
- placeholder: L,
233
+ options: a,
234
+ value: E,
235
+ defaultValue: V,
236
+ onValueChange: j,
237
+ placeholder: M,
238
238
  clearable: q = !1,
239
- disabled: ne,
240
- readOnly: de,
241
- required: le,
242
- name: ce,
243
- id: D,
244
- size: x = "md",
245
- tone: ue = "default",
246
- filter: P,
247
- allowCreate: me = !1,
248
- onCreate: k,
249
- open: X,
250
- onOpenChange: m,
251
- onQueryChange: r,
252
- emptyMessage: pe,
253
- className: fe,
254
- "aria-label": W,
255
- "aria-invalid": be,
256
- "aria-describedby": ve,
239
+ disabled: ae,
240
+ readOnly: ie,
241
+ required: de,
242
+ name: le,
243
+ id: A,
244
+ size: v = "md",
245
+ tone: ce = "default",
246
+ filter: D,
247
+ allowCreate: ue = !1,
248
+ onCreate: P,
249
+ open: L,
250
+ onOpenChange: u,
251
+ emptyMessage: me,
252
+ className: pe,
253
+ "aria-label": Q,
254
+ "aria-invalid": fe,
255
+ "aria-describedby": be,
257
256
  autoComplete: he
258
257
  }, ge) {
259
- const { t: y } = Ue(), v = He(), S = Oe(Ge) !== null, [xe, w] = Xe({
260
- value: C,
261
- defaultValue: j ?? "",
262
- onChange: A
263
- }), p = xe ?? "", K = U(
264
- () => n.find((e) => e.value === p),
265
- [n, p]
266
- ), N = (K == null ? void 0 : K.label) ?? "", [f, d] = re(N), [ye, J] = re(!1), I = X !== void 0, l = I ? X : ye, z = g(!1), _ = g(null), Y = g(null);
267
- We(() => {
258
+ const { t: y } = Be(), b = Ue(), x = Ke(He) !== null, [ve, N] = Le({
259
+ value: E,
260
+ defaultValue: V ?? "",
261
+ onChange: j
262
+ }), m = ve ?? "", k = B(
263
+ () => a.find((e) => e.value === m),
264
+ [a, m]
265
+ ), C = (k == null ? void 0 : k.label) ?? "", [p, i] = oe(C), [ye, X] = oe(!1), z = L !== void 0, d = z ? L : ye, R = g(!1), w = g(null), W = g(null);
266
+ Qe(() => {
268
267
  var e;
269
- (e = _.current) == null || e.setAttribute("aria-expanded", String(l));
270
- }), F(() => {
271
- l || d(N);
272
- }, [N, l]);
273
- const Se = D ?? (S ? v.id : void 0), O = (S ? v.disabled : !1) || !!ne, h = !!de, Ne = (S ? v.required : !1) || !!le, Z = S ? v.invalid : !!be, ze = Z ? "error" : ue, Re = S && v.describedBy ? v.describedBy : ve, Q = L ?? y("inputs.combobox.placeholder", "Search…"), we = U(
274
- () => (e, o, a) => {
275
- if (z.current) return 1;
276
- const b = H(e), i = H(o), B = a == null ? void 0 : a.map(H);
277
- return P ? P(b, i) : $e(
278
- b,
279
- i,
280
- B
268
+ (e = w.current) == null || e.setAttribute("aria-expanded", String(d));
269
+ }), I(() => {
270
+ d || i(C);
271
+ }, [C, d]);
272
+ const xe = A ?? (x ? b.id : void 0), K = (x ? b.disabled : !1) || !!ae, h = !!ie, Ce = (x ? b.required : !1) || !!de, J = x ? b.invalid : !!fe, Se = J ? "error" : ce, Ne = x && b.describedBy ? b.describedBy : be, Y = M ?? y("inputs.combobox.placeholder", "Search…"), ze = B(
273
+ () => (e, o, r) => {
274
+ if (R.current) return 1;
275
+ const f = U(e), n = U(o), $ = r == null ? void 0 : r.map(U);
276
+ return D ? D(f, n) : Te(
277
+ f,
278
+ n,
279
+ $
281
280
  );
282
281
  },
283
- [P]
284
- ), ee = (e) => {
285
- w(e);
286
- }, c = (e) => {
287
- I || J(e), m == null || m(e);
282
+ [D]
283
+ ), Z = (e) => {
284
+ N(e);
285
+ }, l = (e) => {
286
+ z || X(e), u == null || u(e);
287
+ }, Re = (e) => {
288
+ const o = a.find((r) => r.value === e);
289
+ Z(e), i((o == null ? void 0 : o.label) ?? ""), l(!1);
290
+ }, we = (e) => {
291
+ P == null || P(e), l(!1);
288
292
  }, Ie = (e) => {
289
- const o = n.find((a) => a.value === e);
290
- ee(e), d((o == null ? void 0 : o.label) ?? ""), c(!1);
291
- }, _e = (e) => {
292
- k == null || k(e), c(!1);
293
- }, Fe = (e) => {
294
- h || (d(e), z.current || r == null || r(e), !l && e.length > 0 && !z.current && c(!0));
293
+ h || (i(e), !d && e.length > 0 && !R.current && l(!0));
294
+ }, _e = () => {
295
+ !K && !h && l(!0);
296
+ }, Fe = () => {
297
+ R.current = !0;
295
298
  }, Ee = () => {
296
- !O && !h && c(!0);
297
- }, Ve = () => {
298
- z.current = !0;
299
- }, Ce = () => {
300
299
  var o;
301
- if (z.current = !1, h) return;
302
- const e = ((o = _.current) == null ? void 0 : o.value) ?? "";
303
- d(e), r == null || r(e), e.length > 0 && c(!0);
300
+ if (R.current = !1, h) return;
301
+ const e = ((o = w.current) == null ? void 0 : o.value) ?? "";
302
+ i(e), e.length > 0 && l(!0);
303
+ }, Ve = (e) => {
304
+ e.nativeEvent.isComposing || e.key === "Escape" && d && (e.preventDefault(), l(!1), i(C));
304
305
  }, je = (e) => {
305
- e.nativeEvent.isComposing || e.key === "Escape" && l && (e.preventDefault(), c(!1), d(N));
306
- }, Ae = (e) => {
307
306
  var o;
308
- e.preventDefault(), e.stopPropagation(), ee(""), d(""), r == null || r(""), c(!0), (o = _.current) == null || o.focus();
307
+ e.preventDefault(), e.stopPropagation(), Z(""), i(""), l(!0), (o = w.current) == null || o.focus();
309
308
  }, qe = (e) => {
310
- h && e || (c(e), e || d(N));
311
- }, te = g(p);
312
- F(() => {
309
+ h && e || (l(e), e || i(C));
310
+ }, ee = g(m);
311
+ I(() => {
312
+ ee.current = m;
313
+ }, [m]);
314
+ const te = g(p);
315
+ I(() => {
313
316
  te.current = p;
314
317
  }, [p]);
315
- const se = g(f);
316
- F(() => {
317
- se.current = f;
318
- }, [f]);
319
- const oe = g(l);
320
- F(() => {
321
- oe.current = l;
322
- }, [l]);
323
- const T = Te(
318
+ const se = g(d);
319
+ I(() => {
320
+ se.current = d;
321
+ }, [d]);
322
+ const O = Oe(
324
323
  (e) => {
325
- I || J(e), m == null || m(e);
324
+ z || X(e), u == null || u(e);
326
325
  },
327
- [I, m]
328
- ), De = U(
326
+ [z, u]
327
+ ), Ae = B(
329
328
  () => ({
330
- getValue: () => te.current || null,
331
- getQuery: () => se.current,
332
- getIsOpen: () => oe.current,
329
+ getValue: () => ee.current || null,
330
+ getQuery: () => te.current,
331
+ getIsOpen: () => se.current,
333
332
  setValue: (e) => {
334
333
  const o = e ?? "";
335
- w(o);
336
- const a = n.find((b) => b.value === o);
337
- d((a == null ? void 0 : a.label) ?? "");
334
+ N(o);
335
+ const r = a.find((f) => f.value === o);
336
+ i((r == null ? void 0 : r.label) ?? "");
338
337
  },
339
338
  setQuery: (e) => {
340
- d(e), r == null || r(e);
339
+ i(e);
341
340
  },
342
341
  clear: () => {
343
- w(""), d(""), r == null || r("");
342
+ N(""), i("");
344
343
  },
345
- open: () => T(!0),
346
- close: () => T(!1)
344
+ open: () => O(!0),
345
+ close: () => O(!1)
347
346
  }),
348
- [w, n, T, r]
347
+ [N, a, O]
349
348
  );
350
- Ze(tt, De, D);
351
- const Pe = q && !!p && !O && !h, ke = Le(n), $ = dt[x];
352
- return /* @__PURE__ */ t(E.Root, { open: l, onOpenChange: qe, children: /* @__PURE__ */ R(
353
- u,
349
+ Je(et, Ae, A);
350
+ const De = q && !!m && !K && !h, Pe = Me(a), T = it[v];
351
+ return /* @__PURE__ */ t(_.Root, { open: d, onOpenChange: qe, children: /* @__PURE__ */ S(
352
+ c,
354
353
  {
355
- filter: we,
354
+ filter: ze,
356
355
  shouldFilter: !0,
357
356
  loop: !0,
358
- label: W ?? Q,
357
+ label: Q ?? Y,
359
358
  className: "ds:w-full",
360
359
  children: [
361
- /* @__PURE__ */ t(E.Anchor, { asChild: !0, children: /* @__PURE__ */ R(
360
+ /* @__PURE__ */ t(_.Anchor, { asChild: !0, children: /* @__PURE__ */ S(
362
361
  "div",
363
362
  {
364
- ref: Y,
365
- className: ot({
366
- size: x,
367
- tone: ze,
368
- className: fe
363
+ ref: W,
364
+ className: st({
365
+ size: v,
366
+ tone: Se,
367
+ className: pe
369
368
  }),
370
369
  "data-component": "combobox",
371
- "data-component-id": D,
370
+ "data-component-id": A,
372
371
  children: [
373
372
  /* @__PURE__ */ t(
374
- u.Input,
373
+ c.Input,
375
374
  {
376
- ref: Me(ge, _),
377
- value: f,
378
- onValueChange: Fe,
379
- id: Se,
380
- name: ce,
381
- placeholder: Q,
382
- disabled: O,
375
+ ref: Ge(ge, w),
376
+ value: p,
377
+ onValueChange: Ie,
378
+ id: xe,
379
+ name: le,
380
+ placeholder: Y,
381
+ disabled: K,
383
382
  readOnly: h,
384
- required: Ne,
383
+ required: Ce,
385
384
  autoComplete: he,
386
- "aria-describedby": Re,
387
- "aria-invalid": Z || void 0,
388
- onFocus: Ee,
389
- onKeyDown: je,
390
- onCompositionStart: Ve,
391
- onCompositionEnd: Ce,
392
- className: st({ size: x })
385
+ "aria-describedby": Ne,
386
+ "aria-invalid": J || void 0,
387
+ onFocus: _e,
388
+ onKeyDown: Ve,
389
+ onCompositionStart: Fe,
390
+ onCompositionEnd: Ee,
391
+ className: tt({ size: v })
393
392
  }
394
393
  ),
395
- Pe ? /* @__PURE__ */ t(
394
+ De ? /* @__PURE__ */ t(
396
395
  "button",
397
396
  {
398
397
  type: "button",
399
398
  "aria-label": y("inputs.combobox.clear", "Clear selection"),
400
- onClick: Ae,
399
+ onClick: je,
401
400
  onPointerDown: (e) => e.stopPropagation(),
402
401
  className: [
403
402
  "ds:inline-flex ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)]",
@@ -407,52 +406,52 @@ const ae = Ke(
407
406
  "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
408
407
  "ds:size-4"
409
408
  ].join(" "),
410
- children: /* @__PURE__ */ t(Qe, { "aria-hidden": "true", className: "ds:size-3.5" })
409
+ children: /* @__PURE__ */ t(Ye, { "aria-hidden": "true", className: "ds:size-3.5" })
411
410
  }
412
411
  ) : null
413
412
  ]
414
413
  }
415
414
  ) }),
416
- /* @__PURE__ */ t(E.Portal, { forceMount: !0, children: /* @__PURE__ */ t(
417
- E.Content,
415
+ /* @__PURE__ */ t(_.Portal, { forceMount: !0, children: /* @__PURE__ */ t(
416
+ _.Content,
418
417
  {
419
418
  forceMount: !0,
420
- hidden: !l,
421
- "aria-label": W ?? y("inputs.combobox.popupLabel", "Options"),
419
+ hidden: !d,
420
+ "aria-label": Q ?? y("inputs.combobox.popupLabel", "Options"),
422
421
  onOpenAutoFocus: (e) => e.preventDefault(),
423
422
  onCloseAutoFocus: (e) => e.preventDefault(),
424
423
  onInteractOutside: (e) => {
425
- var a;
424
+ var r;
426
425
  const o = e.target;
427
- o && ((a = Y.current) != null && a.contains(o)) && e.preventDefault();
426
+ o && ((r = W.current) != null && r.contains(o)) && e.preventDefault();
428
427
  },
429
428
  sideOffset: 4,
430
429
  align: "start",
431
- className: rt(),
432
- children: /* @__PURE__ */ R(u.List, { className: at, children: [
433
- /* @__PURE__ */ t(u.Empty, { className: nt, children: /* @__PURE__ */ t("div", { role: "option", "aria-selected": !1, "aria-disabled": "true", children: pe ?? y("inputs.combobox.empty", "No results found") }) }),
434
- ke.map(({ group: e, items: o }, a) => {
435
- const b = o.map((i) => {
436
- const B = i.value === p;
437
- return /* @__PURE__ */ R(
438
- u.Item,
430
+ className: ot(),
431
+ children: /* @__PURE__ */ S(c.List, { className: rt, children: [
432
+ /* @__PURE__ */ t(c.Empty, { className: at, children: me ?? y("inputs.combobox.empty", "No results found") }),
433
+ Pe.map(({ group: e, items: o }, r) => {
434
+ const f = o.map((n) => {
435
+ const $ = n.value === m;
436
+ return /* @__PURE__ */ S(
437
+ c.Item,
439
438
  {
440
- value: i.value,
441
- "data-option-id": i.value,
442
- keywords: [i.label],
443
- disabled: i.disabled,
444
- onSelect: Ie,
445
- className: ie({ size: x }),
439
+ value: n.value,
440
+ "data-option-id": n.value,
441
+ keywords: [n.label],
442
+ disabled: n.disabled,
443
+ onSelect: Re,
444
+ className: ne({ size: v }),
446
445
  children: [
447
446
  /* @__PURE__ */ t(
448
447
  "span",
449
448
  {
450
449
  "aria-hidden": "true",
451
- className: `ds:inline-flex ds:items-center ds:justify-center ${$}`,
452
- children: B ? /* @__PURE__ */ t(et, { className: $ }) : null
450
+ className: `ds:inline-flex ds:items-center ds:justify-center ${T}`,
451
+ children: $ ? /* @__PURE__ */ t(Ze, { className: T }) : null
453
452
  }
454
453
  ),
455
- i.startAdornment ? (
454
+ n.startAdornment ? (
456
455
  // Decorative by contract — the option's accessible
457
456
  // name comes from its label. Hide so a text-bearing
458
457
  // adornment can't leak into the computed name.
@@ -461,44 +460,44 @@ const ae = Ke(
461
460
  {
462
461
  "aria-hidden": "true",
463
462
  className: "ds:inline-flex ds:items-center ds:shrink-0",
464
- children: i.startAdornment
463
+ children: n.startAdornment
465
464
  }
466
465
  )
467
466
  ) : null,
468
- /* @__PURE__ */ t("span", { className: "ds:flex-1 ds:truncate", children: i.label }),
469
- i.description ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-muted-foreground", children: i.description }) : null,
470
- i.endContent ? (
467
+ /* @__PURE__ */ t("span", { className: "ds:flex-1 ds:truncate", children: n.label }),
468
+ n.description ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-muted-foreground", children: n.description }) : null,
469
+ n.endContent ? (
471
470
  // Deliberately NOT aria-hidden — unlike
472
471
  // `startAdornment`, this slot carries meaning
473
472
  // (a price, a count) and must reach the
474
473
  // option's accessible name. `ms-auto` pins it
475
474
  // to the inline-end and flips under RTL.
476
- /* @__PURE__ */ t("span", { className: "ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0", children: i.endContent })
475
+ /* @__PURE__ */ t("span", { className: "ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0", children: n.endContent })
477
476
  ) : null
478
477
  ]
479
478
  },
480
- i.value
479
+ n.value
481
480
  );
482
481
  });
483
482
  return e ? /* @__PURE__ */ t(
484
- u.Group,
483
+ c.Group,
485
484
  {
486
- heading: /* @__PURE__ */ t("span", { className: it, children: e }),
487
- children: b
485
+ heading: /* @__PURE__ */ t("span", { className: nt, children: e }),
486
+ children: f
488
487
  },
489
488
  `group-${e}`
490
- ) : /* @__PURE__ */ t(u.Group, { children: b }, `group-${a}`);
489
+ ) : /* @__PURE__ */ t(c.Group, { children: f }, `group-${r}`);
491
490
  }),
492
- me && f.length > 0 ? /* @__PURE__ */ t(
493
- lt,
491
+ ue && p.length > 0 ? /* @__PURE__ */ t(
492
+ dt,
494
493
  {
495
- search: f,
494
+ search: p,
496
495
  label: y("inputs.combobox.create", 'Create "{{value}}"', {
497
- value: f
496
+ value: p
498
497
  }),
499
- iconClass: $,
500
- size: x,
501
- onSelect: _e
498
+ iconClass: T,
499
+ size: v,
500
+ onSelect: we
502
501
  }
503
502
  ) : null
504
503
  ] })
@@ -509,14 +508,14 @@ const ae = Ke(
509
508
  ) });
510
509
  }
511
510
  );
512
- ae.displayName = "Combobox";
513
- const wt = ae;
511
+ re.displayName = "Combobox";
512
+ const zt = re;
514
513
  export {
515
- wt as C,
516
- rt as a,
517
- st as b,
518
- tt as c,
519
- ie as d,
520
- ot as e
514
+ zt as C,
515
+ ot as a,
516
+ tt as b,
517
+ et as c,
518
+ ne as d,
519
+ st as e
521
520
  };
522
- //# sourceMappingURL=combobox-DnSdYssy.js.map
521
+ //# sourceMappingURL=combobox-D7_NLE2Z.js.map