@alfadocs/ui-kit 1.115.0 → 1.116.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 (268) hide show
  1. package/dist/_chunks/accessible-target-Bs9ELM3l.js +6 -0
  2. package/dist/_chunks/{actions-cell-renderer-bI27uXXC.js → actions-cell-renderer-DzHxDyI7.js} +3 -3
  3. package/dist/_chunks/{address-fields-D5Ije0S2.js → address-fields-BFVCtfP2.js} +3 -3
  4. package/dist/_chunks/{anamnesis-summary-rows-BZ36ULQk.js → anamnesis-summary-rows-gEXqU5i5.js} +6 -6
  5. package/dist/_chunks/{appointment-card-D_-aBrx5.js → appointment-card-BMZoXaGx.js} +3 -3
  6. package/dist/_chunks/{appointment-peek-DWfcpoGy.js → appointment-peek-B1CCv-7J.js} +2 -2
  7. package/dist/_chunks/{appointment-timeline-DxLu3afn.js → appointment-timeline-0k4LxODn.js} +3 -3
  8. package/dist/_chunks/{appointment-tray-BhXOJpIJ.js → appointment-tray-DIxpgIXM.js} +2 -2
  9. package/dist/_chunks/arrow-down-left-DECv-dJt.js +15 -0
  10. package/dist/_chunks/{balance-badge-cell-CXHihM22.js → balance-badge-cell-L7bD0Nsh.js} +6 -6
  11. package/dist/_chunks/bill-line-table-WEIRDcv6.js +1563 -0
  12. package/dist/_chunks/{bmi-calculator-Ba4yoR31.js → bmi-calculator-BjUfXqcY.js} +2 -2
  13. package/dist/_chunks/{button-group-CUnNnt8a.js → button-group-BvU9vRnX.js} +2 -2
  14. package/dist/_chunks/{calculator-dialog-D4TyJwqy.js → calculator-dialog-BGX5XQCM.js} +2 -2
  15. package/dist/_chunks/{calendar-appointment-editor-dialog-BVzFi4hH.js → calendar-appointment-editor-dialog-DqZMb4yd.js} +16 -16
  16. package/dist/_chunks/{care-plan-card-BA3MfdfZ.js → care-plan-card-CfV8jiF0.js} +3 -3
  17. package/dist/_chunks/{care-plan-entry-card-CUtFZ813.js → care-plan-entry-card-Bt01kyTl.js} +3 -3
  18. package/dist/_chunks/{chart-DebrFZ6L.js → chart-BSx8cfMm.js} +2 -2
  19. package/dist/_chunks/circle-off-DuT9pVy2.js +16 -0
  20. package/dist/_chunks/combobox-BBCVQS-S.js +935 -0
  21. package/dist/_chunks/{compact-editor-fields-cP6yh7xv.js → compact-editor-fields-6sTWRLtf.js} +3 -3
  22. package/dist/_chunks/{contact-profile-card-DMXWBBkU.js → contact-profile-card-BRCHbQ3-.js} +2 -2
  23. package/dist/_chunks/{country-select-CUuGOAoZ.js → country-select-C2GdvRtS.js} +2 -2
  24. package/dist/_chunks/{cycle-calculator-C68V9rdH.js → cycle-calculator-Brd0PP4U.js} +2 -2
  25. package/dist/_chunks/{dashboard-grid-DrOkTtya.js → dashboard-grid-3aidD-IQ.js} +2 -2
  26. package/dist/_chunks/{toolbar-Bc3pjfG5.js → data-grid-ByhrYGVw.js} +3013 -3106
  27. package/dist/_chunks/{data-grid-tabs-CsLbIv0h.js → data-grid-tabs-D9Y4DeeH.js} +2 -2
  28. package/dist/_chunks/{data-table-DXaE2Ret.js → data-table-B47iw2CO.js} +101 -100
  29. package/dist/_chunks/{date-range-panel-CBFfkgmz.js → date-range-panel-B-DUtfw3.js} +7 -7
  30. package/dist/_chunks/default-tabs-BQcSqcNG.js +2250 -0
  31. package/dist/_chunks/dialog-CIUn5oLb.js +348 -0
  32. package/dist/_chunks/{document-preview-WvJKHJOP.js → document-preview-B_JGHsEW.js} +2 -2
  33. package/dist/_chunks/{dropdown-menu-CqxBthww.js → dropdown-menu-Dmbak7q6.js} +320 -248
  34. package/dist/_chunks/{due-date-calculator-C1UA5jpS.js → due-date-calculator-DzIQXEX5.js} +2 -2
  35. package/dist/_chunks/{editable-currency-cell-renderer-CtlMhLai.js → editable-currency-cell-renderer-p-Q1UkZS.js} +2 -2
  36. package/dist/_chunks/export-files-BByoK9Cg.js +248 -0
  37. package/dist/_chunks/{face-scheme-DkoxiDCh.js → face-scheme-CEjJUnNe.js} +19 -18
  38. package/dist/_chunks/{fetal-weight-DmZzMRzB.js → fetal-weight-CJTlfh_k.js} +2 -2
  39. package/dist/_chunks/{file-manager-DFFExyym.js → file-manager-DEe51ZDe.js} +5 -5
  40. package/dist/_chunks/format-price-CIX0YJZn.js +179 -0
  41. package/dist/_chunks/{grid-context-AwsLJRhH.js → grid-context-jn9y8tNE.js} +4 -4
  42. package/dist/_chunks/{hcg-doubling-CC-dbKE8.js → hcg-doubling-BUZQkSYC.js} +2 -2
  43. package/dist/_chunks/{header-settings-Df9q1uHt.js → header-settings-DNgvO8fS.js} +2 -2
  44. package/dist/_chunks/{heatmap-eXdtmEoU.js → heatmap-tn1WxoMT.js} +3 -3
  45. package/dist/_chunks/{help-me-write-templates-CWxgjDZl.js → help-me-write-templates-C28E_rOt.js} +2 -2
  46. package/dist/_chunks/highlighter-DSkckT2Q.js +15 -0
  47. package/dist/_chunks/{icon-button-group-C9mPK-bX.js → icon-button-group-Ca2VkXy5.js} +2 -2
  48. package/dist/_chunks/{kit-extensions-CzG0RmhQ.js → kit-extensions-BFfLg7c-.js} +6 -6
  49. package/dist/_chunks/{link-cell-renderer-Ditt5mvT.js → link-cell-renderer-D-Io828l.js} +4 -4
  50. package/dist/_chunks/{marketplace-app-shell-CcEHJgDd.js → marketplace-app-shell-CBHNg8x-.js} +4 -4
  51. package/dist/_chunks/money-OE6_oDPH.js +138 -0
  52. package/dist/_chunks/{muscle-scheme-BkmDUTmk.js → muscle-scheme-7UsRsCHP.js} +2 -2
  53. package/dist/_chunks/{notes-panel-BVYG_MJE.js → notes-panel-DexbfrFo.js} +3 -3
  54. package/dist/_chunks/number-input-DUSvP7Dq.js +625 -0
  55. package/dist/_chunks/{optical-prescription-CvbN8yD2.js → optical-prescription-Da_r8pMr.js} +2 -2
  56. package/dist/_chunks/parts-CtcTW1PN.js +869 -0
  57. package/dist/_chunks/{patient-details-DlT-vpSe.js → patient-details-PJ0Y__7t.js} +2 -2
  58. package/dist/_chunks/{patient-field-row-B54uzvu-.js → patient-field-row-0QP8KCVp.js} +5 -5
  59. package/dist/_chunks/{patient-search-DDRDCjZi.js → patient-search-Bdx_Ob3y.js} +2 -2
  60. package/dist/_chunks/{patient-summary-card-Dy9-CzON.js → patient-summary-card-BOfXDP8a.js} +3 -3
  61. package/dist/_chunks/{payment-request-card-BmV2pLoM.js → payment-request-card-_04afZEx.js} +14 -13
  62. package/dist/_chunks/{practice-results-BlxfBx-D.js → practice-results-CrBjScXX.js} +3 -3
  63. package/dist/_chunks/{pregnancy-dating-qZpw3zj8.js → pregnancy-dating-Bg_VUPwl.js} +2 -2
  64. package/dist/_chunks/{pregnancy-weight-gain-DQoOM8QV.js → pregnancy-weight-gain-B-eXFdmq.js} +2 -2
  65. package/dist/_chunks/{province-select-cVOlwEc5.js → province-select-CTM8A9SM.js} +2 -2
  66. package/dist/_chunks/{radiograph-panel.agent-C1LGeX-G.js → radiograph-panel.agent-9jwXlOXB.js} +2 -2
  67. package/dist/_chunks/{reserved.agent-6p3Hm4oH.js → reserved.agent-C1zRHaya.js} +4 -4
  68. package/dist/_chunks/{rich-text-editor-efaMWbYz.js → rich-text-editor-r80Zw8ll.js} +12 -11
  69. package/dist/_chunks/row-actions-Df7TJbNR.js +213 -0
  70. package/dist/_chunks/{signature-request-BnTihryS.js → signature-request-CgvjLic3.js} +3 -3
  71. package/dist/_chunks/{tab-bar-C_pggqVr.js → tab-bar-DTn8pHqH.js} +2 -2
  72. package/dist/_chunks/{tabs-CXYjr_8O.js → tabs-CsmgkiG6.js} +2 -2
  73. package/dist/_chunks/{task-editor-CSa6vQ9r.js → task-editor-DgUjtqpX.js} +168 -178
  74. package/dist/_chunks/{tasks-panel-CVjY1d7Q.js → tasks-panel-B5Nsf10r.js} +2 -2
  75. package/dist/_chunks/{theme-toggle-CObX2Ffa.js → theme-toggle-DfvdEg_V.js} +3 -3
  76. package/dist/_chunks/{token-insert-menu-Dl3x2ekR.js → token-insert-menu-BdcmK5Um.js} +2 -2
  77. package/dist/_chunks/toolbar-DbUQBrq4.js +159 -0
  78. package/dist/_chunks/{tooth-scheme-C-ALCHaV.js → tooth-scheme-LTkT4EXd.js} +2 -2
  79. package/dist/_chunks/{transaction-chip-CohY6sTA.js → transaction-chip-CkYd-3ky.js} +47 -57
  80. package/dist/_chunks/{treatment-receipt-BydbojdD.js → treatment-receipt-1VnuinhY.js} +2 -2
  81. package/dist/_chunks/undo-2-EBxWjj1W.js +15 -0
  82. package/dist/_chunks/{unit-converter-D77vmlzN.js → unit-converter-YKlHyUC2.js} +2 -2
  83. package/dist/_chunks/{use-appointment-details-read-BMAiQYo6.js → use-appointment-details-read-_r7cjTtm.js} +7 -7
  84. package/dist/_chunks/{verify-identity-types-C85EXNzy.js → verify-identity-types-D_LdByCp.js} +2 -2
  85. package/dist/_chunks/{widget-picker-U4JsEhQE.js → widget-picker-DrxJjEkv.js} +2 -2
  86. package/dist/_chunks/{workflow-map-B4XkcET0.js → workflow-map-D-u8_YSr.js} +2 -2
  87. package/dist/_chunks/{workflow-status-9wb7iWUd.js → workflow-status-fykpTxfb.js} +2 -2
  88. package/dist/_chunks/{workflow-webhook-action-DNSe65yd.js → workflow-webhook-action-DM3W8XZE.js} +2 -2
  89. package/dist/agent-catalog.json +1080 -1
  90. package/dist/agent-i18n/en.json +50 -0
  91. package/dist/components/_shared/accessible-target.d.ts +12 -0
  92. package/dist/components/_shared/decimal.d.ts +171 -0
  93. package/dist/components/_shared/format-price.d.ts +54 -2
  94. package/dist/components/address-fields/index.js +1 -1
  95. package/dist/components/appointment-card/index.js +2 -2
  96. package/dist/components/appointment-details-panel/index.js +1 -1
  97. package/dist/components/appointment-peek/index.js +1 -1
  98. package/dist/components/appointment-timeline/index.js +1 -1
  99. package/dist/components/bill-line-table/bill-line-table.agent.d.ts +4 -0
  100. package/dist/components/bill-line-table/bill-line-table.columns.d.ts +47 -0
  101. package/dist/components/bill-line-table/bill-line-table.d.ts +4 -0
  102. package/dist/components/bill-line-table/bill-line-table.model.d.ts +173 -0
  103. package/dist/components/bill-line-table/bill-line-table.types.d.ts +443 -0
  104. package/dist/components/bill-line-table/bill-line-table.variants.d.ts +34 -0
  105. package/dist/components/bill-line-table/index.d.ts +6 -0
  106. package/dist/components/bill-line-table/index.js +23 -0
  107. package/dist/components/bill-table/bill-table.agent.d.ts +4 -0
  108. package/dist/components/bill-table/bill-table.d.ts +13 -0
  109. package/dist/components/bill-table/bill-table.variants.d.ts +55 -0
  110. package/dist/components/bill-table/cells.d.ts +89 -0
  111. package/dist/components/bill-table/columns.d.ts +21 -0
  112. package/dist/components/bill-table/default-tabs.d.ts +21 -0
  113. package/dist/components/bill-table/handle.d.ts +19 -0
  114. package/dist/components/bill-table/index.d.ts +7 -0
  115. package/dist/components/bill-table/index.js +19 -0
  116. package/dist/components/bill-table/model.d.ts +103 -0
  117. package/dist/components/bill-table/row-actions.d.ts +27 -0
  118. package/dist/components/bill-table/status-maps.d.ts +225 -0
  119. package/dist/components/bill-table/types.d.ts +542 -0
  120. package/dist/components/bmi-calculator/index.js +1 -1
  121. package/dist/components/booking/index.js +1 -1
  122. package/dist/components/button-group/index.js +1 -1
  123. package/dist/components/calculator-dialog/index.js +1 -1
  124. package/dist/components/care-plan-card/index.js +1 -1
  125. package/dist/components/care-plan-entry-card/index.js +1 -1
  126. package/dist/components/chart/index.js +1 -1
  127. package/dist/components/combobox/combobox.d.ts +59 -1
  128. package/dist/components/combobox/index.d.ts +1 -1
  129. package/dist/components/combobox/index.js +1 -1
  130. package/dist/components/contact-profile-card/index.js +1 -1
  131. package/dist/components/country-select/index.js +1 -1
  132. package/dist/components/cycle-calculator/index.js +1 -1
  133. package/dist/components/dashboard-grid/index.js +1 -1
  134. package/dist/components/data-grid/body.d.ts +6 -0
  135. package/dist/components/data-grid/data-grid.variants.d.ts +1 -9
  136. package/dist/components/data-grid/editors.d.ts +7 -1
  137. package/dist/components/data-grid/index.js +9 -8
  138. package/dist/components/data-grid/selection.d.ts +10 -0
  139. package/dist/components/data-grid/types.d.ts +61 -11
  140. package/dist/components/data-grid-tabs/index.js +1 -1
  141. package/dist/components/data-table/index.js +4 -4
  142. package/dist/components/dialog/focus-return.d.ts +12 -0
  143. package/dist/components/dialog/index.js +1 -1
  144. package/dist/components/document-preview/index.js +1 -1
  145. package/dist/components/dropdown-menu/dropdown-menu.d.ts +11 -0
  146. package/dist/components/dropdown-menu/index.js +1 -1
  147. package/dist/components/due-date-calculator/index.js +1 -1
  148. package/dist/components/face-scheme/index.js +1 -1
  149. package/dist/components/fetal-weight/index.js +1 -1
  150. package/dist/components/file-manager/index.js +1 -1
  151. package/dist/components/hcg-doubling/index.js +1 -1
  152. package/dist/components/header-settings/index.js +1 -1
  153. package/dist/components/heatmap/index.js +1 -1
  154. package/dist/components/icon-button-group/index.js +1 -1
  155. package/dist/components/index.d.ts +6 -0
  156. package/dist/components/money/index.js +1 -1
  157. package/dist/components/money/money.d.ts +39 -6
  158. package/dist/components/muscle-scheme/index.js +1 -1
  159. package/dist/components/notes-panel/index.js +1 -1
  160. package/dist/components/number-input/index.d.ts +2 -2
  161. package/dist/components/number-input/index.js +1 -1
  162. package/dist/components/number-input/number-input.d.ts +43 -2
  163. package/dist/components/number-input/use-locale-number.d.ts +67 -3
  164. package/dist/components/optical-prescription/index.js +1 -1
  165. package/dist/components/patient-details/index.js +1 -1
  166. package/dist/components/patient-search/index.js +1 -1
  167. package/dist/components/patient-summary-card/index.js +1 -1
  168. package/dist/components/patient-table/index.js +1 -1
  169. package/dist/components/payment-card/index.js +1 -1
  170. package/dist/components/practice-results/index.js +1 -1
  171. package/dist/components/pregnancy-dating/index.js +1 -1
  172. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  173. package/dist/components/province-select/index.js +1 -1
  174. package/dist/components/radiograph-panel/index.js +1 -1
  175. package/dist/components/rich-text-editor/index.js +2 -2
  176. package/dist/components/row-actions/index.d.ts +3 -0
  177. package/dist/components/row-actions/index.js +5 -0
  178. package/dist/components/row-actions/row-actions.d.ts +63 -0
  179. package/dist/components/skeleton-scheme/index.js +1 -1
  180. package/dist/components/smart-date/smart-date.d.ts +1 -1
  181. package/dist/components/tab-bar/index.js +1 -1
  182. package/dist/components/tabs/index.js +1 -1
  183. package/dist/components/task-editor/index.js +1 -1
  184. package/dist/components/tasks-panel/index.js +1 -1
  185. package/dist/components/theme-toggle/index.js +1 -1
  186. package/dist/components/token-insert-menu/index.js +1 -1
  187. package/dist/components/tooth-scheme/index.js +1 -1
  188. package/dist/components/transaction-chip/index.js +1 -1
  189. package/dist/components/transaction-chip/transaction-chip.d.ts +1 -1
  190. package/dist/components/treatment-receipt/index.js +1 -1
  191. package/dist/components/unit-converter/index.js +1 -1
  192. package/dist/components/widget-picker/index.js +1 -1
  193. package/dist/components/workflow/index.js +1 -1
  194. package/dist/components/workflow-status/index.js +1 -1
  195. package/dist/core.css +1 -1
  196. package/dist/decimal/index.js +149 -0
  197. package/dist/host-compat.css +4 -1
  198. package/dist/i18n/locales/ar.d.ts +248 -0
  199. package/dist/i18n/locales/ar.js +249 -1
  200. package/dist/i18n/locales/de.d.ts +248 -0
  201. package/dist/i18n/locales/de.js +249 -1
  202. package/dist/i18n/locales/el.d.ts +248 -0
  203. package/dist/i18n/locales/el.js +249 -1
  204. package/dist/i18n/locales/en.d.ts +248 -0
  205. package/dist/i18n/locales/en.js +249 -1
  206. package/dist/i18n/locales/es.d.ts +248 -0
  207. package/dist/i18n/locales/es.js +249 -1
  208. package/dist/i18n/locales/fr.d.ts +248 -0
  209. package/dist/i18n/locales/fr.js +249 -1
  210. package/dist/i18n/locales/hi.d.ts +248 -0
  211. package/dist/i18n/locales/hi.js +249 -1
  212. package/dist/i18n/locales/it.d.ts +248 -0
  213. package/dist/i18n/locales/it.js +249 -1
  214. package/dist/i18n/locales/ja.d.ts +248 -0
  215. package/dist/i18n/locales/ja.js +249 -1
  216. package/dist/i18n/locales/nl.d.ts +248 -0
  217. package/dist/i18n/locales/nl.js +249 -1
  218. package/dist/i18n/locales/pl.d.ts +248 -0
  219. package/dist/i18n/locales/pl.js +249 -1
  220. package/dist/i18n/locales/pt.d.ts +248 -0
  221. package/dist/i18n/locales/pt.js +249 -1
  222. package/dist/i18n/locales/ro.d.ts +248 -0
  223. package/dist/i18n/locales/ro.js +249 -1
  224. package/dist/i18n/locales/ru.d.ts +248 -0
  225. package/dist/i18n/locales/ru.js +249 -1
  226. package/dist/i18n/locales/sq.d.ts +248 -0
  227. package/dist/i18n/locales/sq.js +249 -1
  228. package/dist/i18n/locales/sv.d.ts +248 -0
  229. package/dist/i18n/locales/sv.js +249 -1
  230. package/dist/i18n/locales/tr.d.ts +248 -0
  231. package/dist/i18n/locales/tr.js +249 -1
  232. package/dist/i18n/locales/zh.d.ts +248 -0
  233. package/dist/i18n/locales/zh.js +249 -1
  234. package/dist/index.js +1298 -1246
  235. package/dist/locales/ar.json +249 -1
  236. package/dist/locales/de.json +249 -1
  237. package/dist/locales/el.json +249 -1
  238. package/dist/locales/en.json +249 -1
  239. package/dist/locales/es.json +249 -1
  240. package/dist/locales/fr.json +249 -1
  241. package/dist/locales/hi.json +249 -1
  242. package/dist/locales/it.json +249 -1
  243. package/dist/locales/ja.json +249 -1
  244. package/dist/locales/nl.json +249 -1
  245. package/dist/locales/pl.json +249 -1
  246. package/dist/locales/pt.json +249 -1
  247. package/dist/locales/ro.json +249 -1
  248. package/dist/locales/ru.json +249 -1
  249. package/dist/locales/sq.json +249 -1
  250. package/dist/locales/sv.json +249 -1
  251. package/dist/locales/tr.json +249 -1
  252. package/dist/locales/zh.json +249 -1
  253. package/dist/patterns/anamnesis/index.js +1 -1
  254. package/dist/patterns/calendar/index.js +1 -1
  255. package/dist/patterns/help-me-write-templates/index.js +1 -1
  256. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  257. package/dist/patterns/signature-request/index.js +1 -1
  258. package/dist/patterns/verify-identity/index.js +1 -1
  259. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  260. package/dist/tokens.css +1 -1
  261. package/package.json +17 -1
  262. package/dist/_chunks/combobox-duuDRI1t.js +0 -688
  263. package/dist/_chunks/dialog-BTjSQjdY.js +0 -274
  264. package/dist/_chunks/format-price-BcFBa-WP.js +0 -52
  265. package/dist/_chunks/money-Tsczpjfz.js +0 -102
  266. package/dist/_chunks/number-input-CVwI1ltI.js +0 -423
  267. package/dist/_chunks/parts-Wz2LeGnH.js +0 -1113
  268. package/dist/_chunks/undo-2-CYNAzclj.js +0 -26
@@ -1,688 +0,0 @@
1
- import { jsx as r, jsxs as y, Fragment as at } from "react/jsx-runtime";
2
- import { forwardRef as lt, useContext as ct, useMemo as te, useState as L, useRef as f, useEffect as E, useCallback as se } from "react";
3
- import * as $ from "@radix-ui/react-popover";
4
- import { R as dt, _ as S, P as ut } from "./index-4xgbg-sn.js";
5
- import { c as j } from "./index-D2ZczOXr.js";
6
- import { useTranslation as ft } from "react-i18next";
7
- import { u as mt, F as pt, b as bt } from "./form-field-context-DtiROUJV.js";
8
- import { c as vt } from "./compose-refs-C0k0tdqF.js";
9
- import { n as w } from "./normalize-diacritics-BNGbFNlJ.js";
10
- import { g as ht } from "./group-options-BvKhQ3xb.js";
11
- import { b as gt } from "./menu-row-BAr8bx1I.js";
12
- import { O as xt, a as yt, o as St, b as Rt, c as Nt } from "./option-row-Dc7BrbK8.js";
13
- import { u as Et } from "./use-controllable-state-BiY4xTzM.js";
14
- import { u as re } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
15
- import { I as wt, a as ne, d as oe, c as At } from "./input-surface-BMffm2Vd.js";
16
- import { u as _t } from "./registry-DvAUVLHh.js";
17
- import { X as It } from "./x-B5YnXwCz.js";
18
- import { C as kt } from "./check-DrFSN__t.js";
19
- const Ft = {
20
- id: "combobox",
21
- // Persisted single choice (value state + set_value) → select_single + set_value,
22
- // plus type-to-filter and open/close of the option list.
23
- capabilities: ["select_single", "set_value", "filter", "open", "close"],
24
- state: {
25
- value: {
26
- type: "string | null",
27
- descriptionKey: "ui.agent.combobox.state.value",
28
- description: "Currently-selected option value, or null when nothing is selected.",
29
- read: (i) => i.getValue()
30
- },
31
- query: {
32
- type: "string",
33
- descriptionKey: "ui.agent.combobox.state.query",
34
- description: "Current filter query in the combobox input.",
35
- read: (i) => i.getQuery()
36
- },
37
- isOpen: {
38
- type: "boolean",
39
- descriptionKey: "ui.agent.combobox.state.isOpen",
40
- description: "True when the option list is visible.",
41
- read: (i) => i.getIsOpen()
42
- }
43
- },
44
- actions: {
45
- set_value: {
46
- // Persists the user's chosen option — reversible via the same UI.
47
- safety: "write",
48
- argsType: "{ value: string | null }",
49
- argsSchema: {
50
- type: "object",
51
- properties: {
52
- value: {
53
- type: ["string", "null"],
54
- description: "Option value to select, or null to clear."
55
- }
56
- },
57
- required: ["value"]
58
- },
59
- idempotent: !0,
60
- descriptionKey: "ui.agent.combobox.actions.setValue",
61
- description: "Set the selected value programmatically.",
62
- examples: [{ args: { value: "it" }, note: 'Select the "it" option.' }],
63
- invoke: (i, c) => {
64
- i.setValue(c.value);
65
- }
66
- },
67
- apply_filter: {
68
- // Pure ephemeral filter of the visible options — no persisted change.
69
- safety: "read",
70
- argsType: "{ query: string }",
71
- argsSchema: {
72
- type: "object",
73
- properties: {
74
- query: { type: "string", description: "Filter text for the list." }
75
- },
76
- required: ["query"]
77
- },
78
- idempotent: !0,
79
- descriptionKey: "ui.agent.combobox.actions.applyFilter",
80
- description: "Set the filter query for the option list.",
81
- invoke: (i, c) => {
82
- i.setQuery(c.query);
83
- }
84
- },
85
- clear_selection: {
86
- // Discards the persisted choice — destructive (loses the selection).
87
- safety: "destructive",
88
- idempotent: !0,
89
- descriptionKey: "ui.agent.combobox.actions.clearSelection",
90
- description: "Clear the current selection.",
91
- invoke: (i) => {
92
- i.clear();
93
- }
94
- },
95
- open: {
96
- safety: "read",
97
- idempotent: !0,
98
- descriptionKey: "ui.agent.combobox.actions.open",
99
- description: "Open the option list.",
100
- invoke: (i) => {
101
- i.open();
102
- }
103
- },
104
- close: {
105
- safety: "read",
106
- idempotent: !0,
107
- descriptionKey: "ui.agent.combobox.actions.close",
108
- description: "Close the option list.",
109
- invoke: (i) => {
110
- i.close();
111
- }
112
- }
113
- },
114
- domHooks: {
115
- root: { attr: "data-component", value: "combobox" },
116
- instanceId: {
117
- attr: "data-component-id",
118
- sourceProp: "id",
119
- description: "Sourced from the id prop."
120
- },
121
- item: {
122
- attr: "data-option-id",
123
- description: "Each option emits its value as data-option-id."
124
- }
125
- }
126
- }, Ct = j(
127
- [
128
- "ds:peer ds:w-full ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground",
129
- "ds:outline-none ds:border-0",
130
- "ds:disabled:cursor-not-allowed"
131
- ].join(" "),
132
- {
133
- variants: {
134
- size: {
135
- sm: "ds:text-[length:var(--font-size-sm)]",
136
- md: "ds:text-[length:var(--font-size-base)]",
137
- lg: "ds:text-[length:var(--font-size-lg)]"
138
- }
139
- },
140
- defaultVariants: {
141
- size: "md"
142
- }
143
- }
144
- ), zt = j(
145
- [
146
- "ds:group ds:relative ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)] ds:w-full",
147
- At
148
- ].join(" "),
149
- {
150
- variants: {
151
- size: {
152
- sm: `${ne.sm} ${oe.sm}`,
153
- md: `${ne.md} ${oe.md}`,
154
- lg: `${ne.lg} ${oe.lg}`
155
- },
156
- tone: wt
157
- },
158
- defaultVariants: {
159
- size: "md",
160
- tone: "default"
161
- }
162
- }
163
- ), Dt = j(
164
- [
165
- "ds:z-[var(--z-popover)] ds:overflow-hidden ds:w-[var(--radix-popover-trigger-width)]",
166
- // A guard: the list is as wide as the field, so only a field that is
167
- // itself wider than the screen could take it past the edge.
168
- "ds:max-w-[var(--radix-popover-content-available-width)]",
169
- "ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground",
170
- "ds:shadow-[var(--shadow-lg)]",
171
- "ds:animate-in ds:fade-in ds:zoom-in-95",
172
- "ds:data-[side=bottom]:slide-in-from-top-2",
173
- "ds:data-[side=top]:slide-in-from-bottom-2",
174
- "ds:motion-reduce:animate-none"
175
- ].join(" ")
176
- ), Re = j(
177
- [
178
- "ds:relative ds:flex ds:cursor-pointer ds:items-center ds:gap-[var(--spacing-sm)]",
179
- "ds:rounded-[var(--radius-sm)]",
180
- "ds:text-foreground ds:outline-none ds:select-none",
181
- gt.selected,
182
- "ds:aria-disabled:pointer-events-none ds:aria-disabled:opacity-50"
183
- ].join(" "),
184
- {
185
- variants: {
186
- size: {
187
- sm: "ds:min-h-8 ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-sm)]",
188
- md: "ds:min-h-[var(--min-target-size)] ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-base)]",
189
- lg: "ds:min-h-12 ds:ps-4 ds:pe-4 ds:text-[length:var(--font-size-lg)]"
190
- }
191
- },
192
- defaultVariants: {
193
- size: "md"
194
- }
195
- }
196
- ), Tt = [
197
- "ds:ps-3 ds:pe-3 ds:py-1.5",
198
- "type-eyebrow ds:text-muted-foreground"
199
- ].join(" "), Ot = "ds:max-h-[18rem] ds:overflow-y-auto ds:p-[var(--spacing-xs)]", Pt = "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", Vt = {
200
- sm: "ds:size-3.5",
201
- md: "ds:size-4",
202
- lg: "ds:size-5"
203
- };
204
- function Lt({
205
- search: i,
206
- label: c,
207
- iconClass: q,
208
- size: H,
209
- onSelect: B
210
- }) {
211
- return ut((U) => U.filtered.count) > 0 ? null : /* @__PURE__ */ y(
212
- S.Item,
213
- {
214
- value: `__combobox-create__${i}`,
215
- keywords: [],
216
- forceMount: !0,
217
- onSelect: () => B(i),
218
- className: Re({ size: H }),
219
- children: [
220
- /* @__PURE__ */ r(
221
- "span",
222
- {
223
- "aria-hidden": "true",
224
- className: `ds:inline-flex ds:items-center ds:justify-center ${q}`
225
- }
226
- ),
227
- /* @__PURE__ */ r("span", { className: "ds:flex-1 ds:truncate", children: c })
228
- ]
229
- }
230
- );
231
- }
232
- const Ne = lt(
233
- function({
234
- options: c,
235
- value: q,
236
- defaultValue: H,
237
- onValueChange: B,
238
- placeholder: ie,
239
- clearable: U = !1,
240
- disabled: Ee,
241
- readOnly: we,
242
- required: Ae,
243
- name: _e,
244
- id: ae,
245
- size: A = "md",
246
- tone: Ie = "default",
247
- filter: K,
248
- allowCreate: ke = !1,
249
- onCreate: M,
250
- open: le,
251
- onOpenChange: R,
252
- onQueryChange: a,
253
- emptyMessage: Fe,
254
- className: Ce,
255
- "aria-label": G,
256
- "aria-invalid": ze,
257
- "aria-describedby": De,
258
- autoComplete: D,
259
- matchAutofill: ce,
260
- wrapOptionLabels: de = !1
261
- }, Te) {
262
- const { t: _ } = ft("ui"), h = mt(), T = ct(pt) !== null, [Oe, O] = Et({
263
- value: q,
264
- defaultValue: H ?? "",
265
- onChange: B
266
- }), p = Oe ?? "", N = te(
267
- () => c.find((e) => e.value === p),
268
- [c, p]
269
- ), m = (N == null ? void 0 : N.label) ?? "", [b, d] = L(m), [Pe, ue] = L(!1), P = le !== void 0, n = P ? le : Pe, I = f(!1), k = m !== "" && b === m, g = f(null), fe = f(null), V = f(null), [me, Ve] = L(null);
270
- bt(h, g);
271
- const [Le, $e] = L(0), pe = f(!1);
272
- re(() => {
273
- if (!pe.current) {
274
- pe.current = !0;
275
- return;
276
- }
277
- k && $e((e) => e + 1);
278
- }, [k]);
279
- const F = f(!1);
280
- E(() => {
281
- F.current = !1;
282
- }, [b, n]);
283
- const W = f(!1), be = f(null);
284
- re(() => {
285
- var s;
286
- const e = V.current;
287
- if (e !== me || !n || !k || !p || e === be.current) return;
288
- const t = e == null ? void 0 : e.querySelector(
289
- `[data-option-id="${CSS.escape(p)}"]`
290
- );
291
- if (!e || !t) return;
292
- be.current = e;
293
- const o = () => {
294
- if (F.current) return;
295
- const v = e.getBoundingClientRect(), ye = t.getBoundingClientRect(), Se = e.offsetHeight > 0 ? v.height / e.offsetHeight : 1, ot = (ye.top - v.top) / (Se || 1), it = ye.height / (Se || 1);
296
- e.scrollTop += ot - (e.clientHeight - it) / 2;
297
- };
298
- o();
299
- const l = requestAnimationFrame(o);
300
- W.current = !0;
301
- try {
302
- t.dispatchEvent(new PointerEvent("pointermove", { bubbles: !0 }));
303
- } finally {
304
- W.current = !1;
305
- }
306
- return (s = g.current) == null || s.setAttribute("aria-activedescendant", t.id), () => cancelAnimationFrame(l);
307
- }, [n, me, k, p]);
308
- const C = D && D !== "off" ? D : void 0, X = se(() => {
309
- var t;
310
- const e = g.current;
311
- e && (e.setAttribute("aria-expanded", String(n)), n && ((t = V.current) != null && t.id) ? e.setAttribute("aria-controls", V.current.id) : n || (e.removeAttribute("aria-controls"), e.removeAttribute("aria-activedescendant")), C && e.setAttribute("autocomplete", C));
312
- }, [n, C]);
313
- re(X);
314
- const je = se(
315
- (e) => {
316
- V.current = e, X(), e && Ve(e);
317
- },
318
- [X]
319
- ), Y = f(!1);
320
- E(() => {
321
- const e = g.current;
322
- if (!e || !C) return;
323
- const t = (o) => {
324
- const l = o.inputType;
325
- Y.current = !l || l === "insertReplacementText";
326
- };
327
- return e.addEventListener("input", t), () => e.removeEventListener("input", t);
328
- }, [C]), E(() => {
329
- n || d(m);
330
- }, [m, n]);
331
- const z = (T ? h.disabled : !1) || !!Ee, x = !!we, qe = (T ? h.required : !1) || !!Ae, ve = T ? h.invalid : !!ze, He = ve ? "error" : Ie, Be = T && h.describedBy ? h.describedBy : De, J = ie ?? _("inputs.combobox.placeholder", "Search…"), Ue = te(
332
- () => (e, t, o) => {
333
- if (I.current || m !== "" && t === m) return 1;
334
- const l = w(e), s = w(t), v = o == null ? void 0 : o.map(w);
335
- return K ? K(
336
- l,
337
- s,
338
- (v == null ? void 0 : v[0]) ?? ""
339
- ) : dt(
340
- l,
341
- s,
342
- v
343
- );
344
- },
345
- [K, m]
346
- ), Z = (e) => {
347
- O(e);
348
- }, u = (e) => {
349
- P || ue(e), R == null || R(e);
350
- }, Ke = (e) => {
351
- const t = c.find((o) => o.value === e);
352
- Z(e), d((t == null ? void 0 : t.label) ?? ""), u(!1);
353
- }, Me = (e) => {
354
- M == null || M(e), u(!1);
355
- }, Ge = (e) => {
356
- var l;
357
- const t = w(e.trim());
358
- if (!t) return;
359
- const o = ce ? ce(e.trim()) : (l = c.find(
360
- (s) => w(s.value) === t || w(s.label) === t
361
- )) == null ? void 0 : l.value;
362
- return c.find((s) => s.value === o && !s.disabled);
363
- }, We = (e) => {
364
- if (!x) {
365
- if (Y.current) {
366
- Y.current = !1;
367
- const t = Ge(e);
368
- if (t) {
369
- Z(t.value), d(t.label), n && u(!1);
370
- return;
371
- }
372
- if (document.activeElement !== g.current) {
373
- d(m);
374
- return;
375
- }
376
- }
377
- d(e), I.current || a == null || a(e), !n && e.length > 0 && !I.current && u(!0);
378
- }
379
- }, Xe = () => {
380
- !z && !x && u(!0);
381
- }, Ye = () => {
382
- !n && !z && !x && u(!0);
383
- }, Je = () => {
384
- I.current = !0;
385
- }, Ze = () => {
386
- var t;
387
- if (I.current = !1, x) return;
388
- const e = ((t = g.current) == null ? void 0 : t.value) ?? "";
389
- d(e), a == null || a(e), e.length > 0 && u(!0);
390
- }, Qe = (e) => {
391
- if (!e.nativeEvent.isComposing) {
392
- if ((e.key === "ArrowDown" || e.key === "ArrowUp") && !n && !z && !x) {
393
- e.preventDefault(), u(!0);
394
- return;
395
- }
396
- if ((e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Home" || e.key === "End" || /* cmdk's own Ctrl+N, J, P and K move the highlight too. */
397
- e.ctrlKey && ["n", "j", "p", "k"].includes(e.key)) && (F.current = !0), e.key === "Enter" && (!n || !F.current && (k || b === ""))) {
398
- e.preventDefault(), n && u(!1);
399
- return;
400
- }
401
- e.key === "Escape" && n && (e.preventDefault(), u(!1), d(m));
402
- }
403
- }, et = (e) => {
404
- var t;
405
- e.preventDefault(), e.stopPropagation(), Z(""), d(""), a == null || a(""), u(!0), (t = g.current) == null || t.focus();
406
- }, tt = (e) => {
407
- x && e || (u(e), e || d(m));
408
- }, he = f(p);
409
- E(() => {
410
- he.current = p;
411
- }, [p]);
412
- const ge = f(b);
413
- E(() => {
414
- ge.current = b;
415
- }, [b]);
416
- const xe = f(n);
417
- E(() => {
418
- xe.current = n;
419
- }, [n]);
420
- const Q = se(
421
- (e) => {
422
- P || ue(e), R == null || R(e);
423
- },
424
- [P, R]
425
- ), st = te(
426
- () => ({
427
- getValue: () => he.current || null,
428
- getQuery: () => ge.current,
429
- getIsOpen: () => xe.current,
430
- setValue: (e) => {
431
- const t = e ?? "";
432
- O(t);
433
- const o = c.find((l) => l.value === t);
434
- d((o == null ? void 0 : o.label) ?? "");
435
- },
436
- setQuery: (e) => {
437
- d(e), a == null || a(e);
438
- },
439
- clear: () => {
440
- O(""), d(""), a == null || a("");
441
- },
442
- open: () => Q(!0),
443
- close: () => Q(!1)
444
- }),
445
- [O, c, Q, a]
446
- );
447
- _t(Ft, st, ae);
448
- const rt = U && !!p && !z && !x, nt = ht(c), ee = Vt[A];
449
- return /* @__PURE__ */ r($.Root, { open: n, onOpenChange: tt, children: /* @__PURE__ */ y(
450
- S,
451
- {
452
- filter: Ue,
453
- shouldFilter: !0,
454
- loop: !0,
455
- label: G ?? (h.label || J),
456
- className: "ds:w-full",
457
- children: [
458
- /* @__PURE__ */ r($.Anchor, { asChild: !0, children: /* @__PURE__ */ y(
459
- "div",
460
- {
461
- ref: fe,
462
- className: zt({
463
- size: A,
464
- tone: He,
465
- className: Ce
466
- }),
467
- "data-component": "combobox",
468
- "data-component-id": ae,
469
- children: [
470
- /* @__PURE__ */ r(
471
- S.Input,
472
- {
473
- ref: vt(Te, g),
474
- value: b,
475
- onValueChange: We,
476
- dir: N == null ? void 0 : N.dir,
477
- name: _e,
478
- placeholder: J,
479
- disabled: z,
480
- readOnly: x,
481
- required: qe,
482
- autoComplete: D,
483
- "aria-describedby": Be,
484
- "aria-invalid": ve || void 0,
485
- onFocus: Xe,
486
- onClick: Ye,
487
- onKeyDown: Qe,
488
- onCompositionStart: Je,
489
- onCompositionEnd: Ze,
490
- className: Ct({ size: A })
491
- }
492
- ),
493
- rt ? /* @__PURE__ */ r(
494
- "button",
495
- {
496
- type: "button",
497
- "aria-label": _("inputs.combobox.clear", "Clear selection"),
498
- onClick: et,
499
- onPointerDown: (e) => e.stopPropagation(),
500
- className: [
501
- "ds:inline-flex ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)]",
502
- "ds:text-muted-foreground ds:hover:text-foreground",
503
- "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
504
- "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
505
- "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
506
- "ds:size-4 ds:shrink-0",
507
- /* A 24px hit area with no visual change. */
508
- "ds:relative ds:before:absolute ds:before:inset-[calc(var(--spacing-xs)*-1)] ds:before:content-['']"
509
- ].join(" "),
510
- children: /* @__PURE__ */ r(It, { "aria-hidden": "true", className: "ds:size-3.5" })
511
- }
512
- ) : null
513
- ]
514
- }
515
- ) }),
516
- /* @__PURE__ */ r($.Portal, { forceMount: !0, children: n ? /* @__PURE__ */ r(
517
- $.Content,
518
- {
519
- "aria-label": G ?? _("inputs.combobox.popupLabel", "Options"),
520
- onOpenAutoFocus: (e) => e.preventDefault(),
521
- onCloseAutoFocus: (e) => e.preventDefault(),
522
- onInteractOutside: (e) => {
523
- var o;
524
- const t = e.target;
525
- t && ((o = fe.current) != null && o.contains(t)) && e.preventDefault();
526
- },
527
- sideOffset: 4,
528
- align: "start",
529
- className: Dt(),
530
- children: /* @__PURE__ */ y(
531
- S.List,
532
- {
533
- ref: je,
534
- label: G ?? (h.label || J),
535
- className: Ot,
536
- onPointerMove: () => {
537
- W.current || (F.current = !0);
538
- },
539
- onMouseDown: (e) => e.preventDefault(),
540
- children: [
541
- /* @__PURE__ */ r(S.Empty, { className: Pt, children: /* @__PURE__ */ r(
542
- "div",
543
- {
544
- role: "option",
545
- "aria-selected": !1,
546
- "aria-disabled": "true",
547
- children: Fe ?? _("inputs.combobox.empty", "No results found")
548
- }
549
- ) }),
550
- nt.map(({ group: e, items: t }, o) => {
551
- const l = t.map((s) => {
552
- const v = s.value === p;
553
- return /* @__PURE__ */ y(
554
- S.Item,
555
- {
556
- value: s.value,
557
- "data-option-id": s.value,
558
- keywords: [s.label],
559
- disabled: s.disabled,
560
- onSelect: Ke,
561
- className: Re({ size: A }),
562
- children: [
563
- /* @__PURE__ */ r(
564
- "span",
565
- {
566
- "aria-hidden": "true",
567
- className: `ds:inline-flex ds:items-center ds:justify-center ${ee}`,
568
- children: v ? /* @__PURE__ */ r(kt, { className: ee }) : null
569
- }
570
- ),
571
- s.startAdornment ? (
572
- // Decorative by contract — the option's accessible
573
- // name comes from its label. Hide so a text-bearing
574
- // adornment can't leak into the computed name.
575
- /* @__PURE__ */ r(
576
- "span",
577
- {
578
- "aria-hidden": "true",
579
- className: "ds:inline-flex ds:items-center ds:shrink-0",
580
- children: s.startAdornment
581
- }
582
- )
583
- ) : null,
584
- s.description || de ? (
585
- // Stacked: the label and its end content on one
586
- // row, the description on a line of its own
587
- // under them. In this DOM order the option's
588
- // name reads label, end content, description.
589
- /* @__PURE__ */ y(
590
- "span",
591
- {
592
- className: `${xt} ds:py-[var(--spacing-xs)]`,
593
- children: [
594
- /* @__PURE__ */ y("span", { className: yt, children: [
595
- /* @__PURE__ */ r(
596
- "span",
597
- {
598
- dir: s.dir,
599
- className: St({
600
- wrap: de,
601
- className: "ds:flex-1"
602
- }),
603
- children: s.label
604
- }
605
- ),
606
- s.endContent ? (
607
- // Announced, as below.
608
- /* @__PURE__ */ r("span", { className: Rt, children: s.endContent })
609
- ) : null
610
- ] }),
611
- s.description ? /* @__PURE__ */ r(
612
- "span",
613
- {
614
- className: Nt({
615
- tone: s.descriptionTone
616
- }),
617
- children: s.description
618
- }
619
- ) : null
620
- ]
621
- }
622
- )
623
- ) : /* @__PURE__ */ y(at, { children: [
624
- /* @__PURE__ */ r(
625
- "span",
626
- {
627
- dir: s.dir,
628
- className: "ds:flex-1 ds:truncate",
629
- children: s.label
630
- }
631
- ),
632
- s.endContent ? (
633
- // Deliberately NOT aria-hidden — unlike
634
- // `startAdornment`, this slot carries meaning
635
- // (a price, a count) and must reach the
636
- // option's accessible name. `ms-auto` pins it
637
- // to the inline-end and flips under RTL.
638
- /* @__PURE__ */ r("span", { className: "ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0", children: s.endContent })
639
- ) : null
640
- ] })
641
- ]
642
- },
643
- `${s.value}\0${s.label}`
644
- );
645
- });
646
- return e ? /* @__PURE__ */ r(
647
- S.Group,
648
- {
649
- heading: /* @__PURE__ */ r("span", { className: Tt, children: e }),
650
- children: l
651
- },
652
- `group-${e}`
653
- ) : /* @__PURE__ */ r(S.Group, { children: l }, `group-${o}`);
654
- }),
655
- ke && b.length > 0 ? /* @__PURE__ */ r(
656
- Lt,
657
- {
658
- search: b,
659
- label: _("inputs.combobox.create", 'Create "{{value}}"', {
660
- value: b
661
- }),
662
- iconClass: ee,
663
- size: A,
664
- onSelect: Me
665
- }
666
- ) : null
667
- ]
668
- },
669
- Le
670
- )
671
- }
672
- ) : null })
673
- ]
674
- }
675
- ) });
676
- }
677
- );
678
- Ne.displayName = "Combobox";
679
- const ss = Ne;
680
- export {
681
- ss as C,
682
- Dt as a,
683
- Ct as b,
684
- Ft as c,
685
- Re as d,
686
- zt as e
687
- };
688
- //# sourceMappingURL=combobox-duuDRI1t.js.map