@alfadocs/ui-kit 1.138.0 → 1.139.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 (232) hide show
  1. package/dist/_chunks/{address-fields-DvSWdeR0.js → address-fields-Bh9JZJHZ.js} +4 -4
  2. package/dist/_chunks/{ai-prompt-input-CVNeusoW.js → ai-prompt-input-B2QFwuJ1.js} +2 -2
  3. package/dist/_chunks/{anamnesis-summary-rows-Dr2V1Rtf.js → anamnesis-summary-rows-BgfBnjp0.js} +4 -4
  4. package/dist/_chunks/{audio-recorder-BOF5YYoC.js → audio-recorder-6dUq8I38.js} +2 -2
  5. package/dist/_chunks/autocomplete-HZNW7_Pa.js +642 -0
  6. package/dist/_chunks/{balance-badge-cell-BSB02Bwo.js → balance-badge-cell-CRrIv2hy.js} +4 -4
  7. package/dist/_chunks/{bill-line-table-By-YL2ms.js → bill-line-table-DCqxhode.js} +3 -3
  8. package/dist/_chunks/{bishop-score-DWGESRP9.js → bishop-score-M7Fi-ykx.js} +2 -2
  9. package/dist/_chunks/{calendar-appointment-editor-dialog-SxSkOTnO.js → calendar-appointment-editor-dialog-GdnaPIOV.js} +7 -7
  10. package/dist/_chunks/{calendar-editor-discard-host-DjUhoFr2.js → calendar-editor-discard-host-BcMEgVEq.js} +2 -2
  11. package/dist/_chunks/{calendar-waiting-list-panel-331vzAdl.js → calendar-waiting-list-panel-CkZBAv_E.js} +3 -3
  12. package/dist/_chunks/{calendar.sheets-aodjllWd.js → calendar.sheets-B0jP2Yt0.js} +112 -111
  13. package/dist/_chunks/{calls-panel-BIfatK90.js → calls-panel-CtxJAzkJ.js} +2 -2
  14. package/dist/_chunks/{city-input-DXipzTfZ.js → city-input-DARVDJhH.js} +2 -2
  15. package/dist/_chunks/{combobox-BBCVQS-S.js → combobox-BYl6mY4c.js} +12 -13
  16. package/dist/_chunks/{communications-panel-SQ-55e3V.js → communications-panel-DBWM9II9.js} +2 -2
  17. package/dist/_chunks/{country-select-C2GdvRtS.js → country-select-BPISkYVU.js} +3 -3
  18. package/dist/_chunks/{data-grid-CxKz8flO.js → data-grid-bQ6iFm10.js} +15 -7
  19. package/dist/_chunks/{data-table-_tgj0C_T.js → data-table-CnLfOwxg.js} +2 -2
  20. package/dist/_chunks/{default-tabs-oDWQzbN7.js → default-tabs-Dm_vk6hd.js} +3 -3
  21. package/dist/_chunks/{document-preview-CirR3C_m.js → document-preview-FTCHXYhk.js} +2 -2
  22. package/dist/_chunks/{face-scheme-D_Y1StPl.js → face-scheme-Bxt7ZnJn.js} +2 -2
  23. package/dist/_chunks/{file-manager-CEi4z2i0.js → file-manager-Bsccb8Jj.js} +2 -2
  24. package/dist/_chunks/{forgot-password-form-YvI9vX-G.js → forgot-password-form-B4ufmBFn.js} +5 -4
  25. package/dist/_chunks/{gestational-age-calculator-CHbpC4vL.js → gestational-age-calculator-DXSPWG8u.js} +2 -2
  26. package/dist/_chunks/{heatmap-_546qI2V.js → heatmap-CFPaEKD_.js} +2 -2
  27. package/dist/_chunks/{invoice-upload-list-CQI9MUl6.js → invoice-upload-list-Dz3CXHPP.js} +3 -3
  28. package/dist/_chunks/{kit-extensions-BNBf4m8O.js → kit-extensions-BB_ksnVl.js} +3 -3
  29. package/dist/_chunks/{link-cell-renderer-Xx5T8u5Q.js → link-cell-renderer-CSA0KKPe.js} +5 -5
  30. package/dist/_chunks/{login-dev-card-Dz3ezx1o.js → login-dev-card-oRh9h7N2.js} +18 -17
  31. package/dist/_chunks/medication-I6QvOq6k.js +21 -0
  32. package/dist/_chunks/medication-line-CHdlh-F7.js +222 -0
  33. package/dist/_chunks/medication-search-DoEDakoM.js +380 -0
  34. package/dist/_chunks/{multi-select-Df3R8lv_.js → multi-select-DeMiHm8T.js} +4 -5
  35. package/dist/_chunks/{muscle-scheme-D_rSyGDj.js → muscle-scheme-BB2eBfww.js} +2 -2
  36. package/dist/_chunks/normalize-diacritics-DhJjQ3Bp.js +7 -0
  37. package/dist/_chunks/{notes-panel-DsEKNtsw.js → notes-panel-CnmQqhwq.js} +2 -2
  38. package/dist/_chunks/{optical-prescription-DaSbsh4p.js → optical-prescription-C4jpDFOE.js} +2 -2
  39. package/dist/_chunks/{option-row-Dc7BrbK8.js → option-row-DpCnuUqo.js} +25 -12
  40. package/dist/_chunks/{patient-account-settings-Cs9y-pVA.js → patient-account-settings-DfEPHmCh.js} +2 -2
  41. package/dist/_chunks/{patient-check-in-resume-4qi_klQV.js → patient-check-in-resume-TWs8CPQr.js} +3 -3
  42. package/dist/_chunks/{patient-details-Dv7EiTCo.js → patient-details-DQTxSWY4.js} +2 -2
  43. package/dist/_chunks/{patient-field-row-DuHWGlLz.js → patient-field-row-CXuWQeQJ.js} +6 -6
  44. package/dist/_chunks/patient-picker-CQNsqYn2.js +163 -0
  45. package/dist/_chunks/{patient-search-DBvLFArV.js → patient-search-aTFd7p9s.js} +2 -2
  46. package/dist/_chunks/{patient-summary-card-D-cDzOim.js → patient-summary-card-j5u7c5Us.js} +2 -2
  47. package/dist/_chunks/{phone-input-BL8Sj6OG.js → phone-input-DRKcJUi4.js} +2 -2
  48. package/dist/_chunks/{portal-details-BGc_FLQk.js → portal-details-VfeOI4PB.js} +2 -2
  49. package/dist/_chunks/{portal-documents-BSI1U5lI.js → portal-documents-hGHlwmbv.js} +2 -2
  50. package/dist/_chunks/{pregnancy-dating-lJbzai73.js → pregnancy-dating-C-3NLI6K.js} +2 -2
  51. package/dist/_chunks/prescription-history-748qDVwZ.js +1544 -0
  52. package/dist/_chunks/print-sheet-CSeqkM3_.js +318 -0
  53. package/dist/_chunks/{province-select-CTM8A9SM.js → province-select-D-iY9bQG.js} +3 -3
  54. package/dist/_chunks/{registration-form-CuLiTA52.js → registration-form-Cs9o6e5q.js} +7 -6
  55. package/dist/_chunks/{reserved.agent-CabZHFJC.js → reserved.agent-L2ElYPuj.js} +7 -7
  56. package/dist/_chunks/{reset-password-form-D_TePSM1.js → reset-password-form-DwtSNhnA.js} +18 -17
  57. package/dist/_chunks/{rich-text-editor-C48omVjq.js → rich-text-editor-DFsH5RAj.js} +2 -2
  58. package/dist/_chunks/save-Dn8uje3f.js +22 -0
  59. package/dist/_chunks/{search-bar-CQ9_V3EJ.js → search-bar-k1mS5yZl.js} +2 -2
  60. package/dist/_chunks/{select-CIXKyUMw.js → select-Bm8s3q-X.js} +16 -17
  61. package/dist/_chunks/{send-registration-link-form-BjkXr0TD.js → send-registration-link-form-C1vw6H1M.js} +6 -5
  62. package/dist/_chunks/{signature-request-vJDSHZld.js → signature-request-D3sLLOM6.js} +2 -2
  63. package/dist/_chunks/sync-tray-BhnkgXKK.js +567 -0
  64. package/dist/_chunks/{tabs-Czkmw5ou.js → tabs-BXr5XeGq.js} +2 -2
  65. package/dist/_chunks/{task-editor-wKbFbGqW.js → task-editor-DDVDPKJf.js} +26 -25
  66. package/dist/_chunks/{tasks-panel-DbtJS4QI.js → tasks-panel-BHXaPNOZ.js} +2 -2
  67. package/dist/_chunks/{toolbar-DjG-cpD_.js → toolbar-Dz_hAUIZ.js} +2 -2
  68. package/dist/_chunks/{unit-converter-CUAUTu2B.js → unit-converter-CBy7S4Tl.js} +2 -2
  69. package/dist/_chunks/{use-appointment-details-read-jGkJalX8.js → use-appointment-details-read-CBSpX4DI.js} +2 -2
  70. package/dist/_chunks/use-error-summary-CecJZo6w.js +32 -0
  71. package/dist/_chunks/use-registration-submit-CVukOAQk.js +84 -0
  72. package/dist/_chunks/{variables-menu-DQl8H4Gh.js → variables-menu-C4NcClKi.js} +2 -2
  73. package/dist/_chunks/{voice-control-panel-Cp4vs1iy.js → voice-control-panel-Dc_NFH2R.js} +2 -2
  74. package/dist/agent-catalog.json +455 -1
  75. package/dist/agent-i18n/en.json +53 -0
  76. package/dist/appointment-editor-panel/index.js +2 -2
  77. package/dist/browser-support.js +1 -1
  78. package/dist/components/_shared/medication.d.ts +28 -0
  79. package/dist/components/_shared/normalize-diacritics.d.ts +5 -0
  80. package/dist/components/_shared/patient-picker.d.ts +7 -0
  81. package/dist/components/address-fields/index.js +1 -1
  82. package/dist/components/ai-prompt-input/index.js +1 -1
  83. package/dist/components/appointment-details-panel/index.js +1 -1
  84. package/dist/components/audio-recorder/index.js +1 -1
  85. package/dist/components/autocomplete/autocomplete.d.ts +50 -0
  86. package/dist/components/autocomplete/index.d.ts +1 -1
  87. package/dist/components/autocomplete/index.js +1 -1
  88. package/dist/components/bill-line-table/index.js +1 -1
  89. package/dist/components/bill-table/index.js +1 -1
  90. package/dist/components/bishop-score/index.js +1 -1
  91. package/dist/components/booking/index.js +1 -1
  92. package/dist/components/calls-panel/index.js +1 -1
  93. package/dist/components/city-input/index.js +1 -1
  94. package/dist/components/combobox/index.js +1 -1
  95. package/dist/components/communications-panel/index.js +1 -1
  96. package/dist/components/country-select/index.js +1 -1
  97. package/dist/components/data-grid/index.js +2 -2
  98. package/dist/components/data-table/index.js +2 -2
  99. package/dist/components/document-preview/index.js +1 -1
  100. package/dist/components/face-scheme/index.js +1 -1
  101. package/dist/components/file-manager/index.js +1 -1
  102. package/dist/components/gestational-age-calculator/index.js +1 -1
  103. package/dist/components/heatmap/index.js +1 -1
  104. package/dist/components/index.d.ts +5 -0
  105. package/dist/components/invoice-upload-list/index.js +1 -1
  106. package/dist/components/medication-line/index.d.ts +6 -0
  107. package/dist/components/medication-line/index.js +7 -0
  108. package/dist/components/medication-line/medication-line.agent.d.ts +14 -0
  109. package/dist/components/medication-line/medication-line.d.ts +40 -0
  110. package/dist/components/medication-search/index.d.ts +6 -0
  111. package/dist/components/medication-search/index.js +10 -0
  112. package/dist/components/medication-search/medication-search.agent.d.ts +15 -0
  113. package/dist/components/medication-search/medication-search.d.ts +49 -0
  114. package/dist/components/multi-select/index.js +1 -1
  115. package/dist/components/muscle-scheme/index.js +1 -1
  116. package/dist/components/notes-panel/index.js +1 -1
  117. package/dist/components/optical-prescription/index.js +1 -1
  118. package/dist/components/patient-details/index.js +1 -1
  119. package/dist/components/patient-search/index.js +1 -1
  120. package/dist/components/patient-summary-card/index.js +1 -1
  121. package/dist/components/patient-table/index.js +1 -1
  122. package/dist/components/phone-input/index.js +1 -1
  123. package/dist/components/pregnancy-dating/index.js +1 -1
  124. package/dist/components/print-sheet/index.d.ts +5 -0
  125. package/dist/components/print-sheet/index.js +6 -0
  126. package/dist/components/print-sheet/print-isolation.d.ts +17 -0
  127. package/dist/components/print-sheet/print-sheet.agent.d.ts +19 -0
  128. package/dist/components/print-sheet/print-sheet.d.ts +54 -0
  129. package/dist/components/province-select/index.js +1 -1
  130. package/dist/components/rich-text-editor/index.js +2 -2
  131. package/dist/components/search-bar/index.js +1 -1
  132. package/dist/components/select/index.js +1 -1
  133. package/dist/components/skeleton-scheme/index.js +1 -1
  134. package/dist/components/sync-tray/index.d.ts +4 -0
  135. package/dist/components/sync-tray/index.js +7 -0
  136. package/dist/components/sync-tray/sync-tray.agent.d.ts +15 -0
  137. package/dist/components/sync-tray/sync-tray.d.ts +77 -0
  138. package/dist/components/tabs/index.js +1 -1
  139. package/dist/components/task-editor/index.js +1 -1
  140. package/dist/components/tasks-panel/index.js +1 -1
  141. package/dist/components/unit-converter/index.js +1 -1
  142. package/dist/components/variables-menu/index.js +1 -1
  143. package/dist/components/voice-control-panel/index.js +1 -1
  144. package/dist/core.css +1 -1
  145. package/dist/find-free-slots-panel/index.js +1 -1
  146. package/dist/host-compat.css +13 -1
  147. package/dist/i18n/locales/ar.d.ts +134 -0
  148. package/dist/i18n/locales/ar.js +134 -0
  149. package/dist/i18n/locales/de.d.ts +134 -0
  150. package/dist/i18n/locales/de.js +134 -0
  151. package/dist/i18n/locales/el.d.ts +134 -0
  152. package/dist/i18n/locales/el.js +134 -0
  153. package/dist/i18n/locales/en.d.ts +134 -0
  154. package/dist/i18n/locales/en.js +134 -0
  155. package/dist/i18n/locales/es.d.ts +134 -0
  156. package/dist/i18n/locales/es.js +134 -0
  157. package/dist/i18n/locales/fr.d.ts +134 -0
  158. package/dist/i18n/locales/fr.js +134 -0
  159. package/dist/i18n/locales/hi.d.ts +134 -0
  160. package/dist/i18n/locales/hi.js +134 -0
  161. package/dist/i18n/locales/it.d.ts +134 -0
  162. package/dist/i18n/locales/it.js +134 -0
  163. package/dist/i18n/locales/ja.d.ts +134 -0
  164. package/dist/i18n/locales/ja.js +134 -0
  165. package/dist/i18n/locales/nl.d.ts +134 -0
  166. package/dist/i18n/locales/nl.js +134 -0
  167. package/dist/i18n/locales/pl.d.ts +134 -0
  168. package/dist/i18n/locales/pl.js +134 -0
  169. package/dist/i18n/locales/pt.d.ts +134 -0
  170. package/dist/i18n/locales/pt.js +134 -0
  171. package/dist/i18n/locales/ro.d.ts +134 -0
  172. package/dist/i18n/locales/ro.js +134 -0
  173. package/dist/i18n/locales/ru.d.ts +134 -0
  174. package/dist/i18n/locales/ru.js +134 -0
  175. package/dist/i18n/locales/sq.d.ts +134 -0
  176. package/dist/i18n/locales/sq.js +134 -0
  177. package/dist/i18n/locales/sv.d.ts +134 -0
  178. package/dist/i18n/locales/sv.js +134 -0
  179. package/dist/i18n/locales/tr.d.ts +134 -0
  180. package/dist/i18n/locales/tr.js +134 -0
  181. package/dist/i18n/locales/zh.d.ts +134 -0
  182. package/dist/i18n/locales/zh.js +134 -0
  183. package/dist/index.js +1002 -974
  184. package/dist/locales/ar.json +134 -0
  185. package/dist/locales/de.json +134 -0
  186. package/dist/locales/el.json +134 -0
  187. package/dist/locales/en.json +134 -0
  188. package/dist/locales/es.json +134 -0
  189. package/dist/locales/fr.json +134 -0
  190. package/dist/locales/hi.json +134 -0
  191. package/dist/locales/it.json +134 -0
  192. package/dist/locales/ja.json +134 -0
  193. package/dist/locales/nl.json +134 -0
  194. package/dist/locales/pl.json +134 -0
  195. package/dist/locales/pt.json +134 -0
  196. package/dist/locales/ro.json +134 -0
  197. package/dist/locales/ru.json +134 -0
  198. package/dist/locales/sq.json +134 -0
  199. package/dist/locales/sv.json +134 -0
  200. package/dist/locales/tr.json +134 -0
  201. package/dist/locales/zh.json +134 -0
  202. package/dist/online-bookings-panel/index.js +1 -1
  203. package/dist/patterns/anamnesis/index.js +1 -1
  204. package/dist/patterns/calendar/index.js +3 -3
  205. package/dist/patterns/forgot-password-form/index.js +1 -1
  206. package/dist/patterns/login-form/index.js +1 -1
  207. package/dist/patterns/patient-account-settings/index.js +1 -1
  208. package/dist/patterns/patient-check-in/index.js +1 -1
  209. package/dist/patterns/patient-portal/index.js +2 -2
  210. package/dist/patterns/prescription/index.d.ts +11 -0
  211. package/dist/patterns/prescription/index.js +13 -0
  212. package/dist/patterns/prescription/prescription-composer-errors.d.ts +6 -0
  213. package/dist/patterns/prescription/prescription-composer-item.d.ts +34 -0
  214. package/dist/patterns/prescription/prescription-composer.d.ts +89 -0
  215. package/dist/patterns/prescription/prescription-history.d.ts +48 -0
  216. package/dist/patterns/prescription/prescription-patient-block.d.ts +13 -0
  217. package/dist/patterns/prescription/prescription-sheet.d.ts +52 -0
  218. package/dist/patterns/prescription/prescription-status-badge.d.ts +5 -0
  219. package/dist/patterns/prescription/prescription-types.d.ts +97 -0
  220. package/dist/patterns/prescription/prescription-validation.d.ts +40 -0
  221. package/dist/patterns/registration-form/index.js +1 -1
  222. package/dist/patterns/reset-password-form/index.js +1 -1
  223. package/dist/patterns/send-registration-link-form/index.js +1 -1
  224. package/dist/patterns/signature-request/index.js +1 -1
  225. package/dist/tokens.css +1 -1
  226. package/dist/waiting-list-panel/index.js +2 -2
  227. package/package.json +21 -1
  228. package/dist/_chunks/autocomplete-D10ydpgi.js +0 -562
  229. package/dist/_chunks/group-options-BvKhQ3xb.js +0 -16
  230. package/dist/_chunks/normalize-diacritics-BNGbFNlJ.js +0 -7
  231. package/dist/_chunks/patient-picker-BZJuOgMw.js +0 -173
  232. package/dist/_chunks/use-registration-submit-CLGHxwoT.js +0 -112
@@ -4,8 +4,8 @@ import { useTranslation as K } from "react-i18next";
4
4
  import { d as s, b as L } from "../_chunks/toast-DQ1Zu1kk.js";
5
5
  import { a as M } from "../_chunks/tooltip-uEBdD1-5.js";
6
6
  import { C as Q } from "../_chunks/calendar-editor-guard-9fShhNIA.js";
7
- import { S as V } from "../_chunks/calendar.sheets-aodjllWd.js";
8
- import { W as X } from "../_chunks/calendar-waiting-list-panel-331vzAdl.js";
7
+ import { S as V } from "../_chunks/calendar.sheets-B0jP2Yt0.js";
8
+ import { W as X } from "../_chunks/calendar-waiting-list-panel-CkZBAv_E.js";
9
9
  import { P as Y } from "../_chunks/privacy-mask-C2ZLKrMh.js";
10
10
  import { H as Z } from "../_chunks/hourglass-BEAzW1wE.js";
11
11
  const q = { open: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "1.138.0",
3
+ "version": "1.139.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",
@@ -517,6 +517,14 @@
517
517
  "types": "./dist/components/matrix-rain/index.d.ts",
518
518
  "import": "./dist/components/matrix-rain/index.js"
519
519
  },
520
+ "./medication-line": {
521
+ "types": "./dist/components/medication-line/index.d.ts",
522
+ "import": "./dist/components/medication-line/index.js"
523
+ },
524
+ "./medication-search": {
525
+ "types": "./dist/components/medication-search/index.d.ts",
526
+ "import": "./dist/components/medication-search/index.js"
527
+ },
520
528
  "./message-card": {
521
529
  "types": "./dist/components/message-card/index.d.ts",
522
530
  "import": "./dist/components/message-card/index.js"
@@ -653,6 +661,10 @@
653
661
  "types": "./dist/components/position-grid/index.d.ts",
654
662
  "import": "./dist/components/position-grid/index.js"
655
663
  },
664
+ "./print-sheet": {
665
+ "types": "./dist/components/print-sheet/index.d.ts",
666
+ "import": "./dist/components/print-sheet/index.js"
667
+ },
656
668
  "./privacy-lock": {
657
669
  "types": "./dist/components/privacy-lock/index.d.ts",
658
670
  "import": "./dist/components/privacy-lock/index.js"
@@ -841,6 +853,10 @@
841
853
  "types": "./dist/components/switch/index.d.ts",
842
854
  "import": "./dist/components/switch/index.js"
843
855
  },
856
+ "./sync-tray": {
857
+ "types": "./dist/components/sync-tray/index.d.ts",
858
+ "import": "./dist/components/sync-tray/index.js"
859
+ },
844
860
  "./tab-bar": {
845
861
  "types": "./dist/components/tab-bar/index.d.ts",
846
862
  "import": "./dist/components/tab-bar/index.js"
@@ -1038,6 +1054,10 @@
1038
1054
  "types": "./dist/patterns/payment-automation-upsell/index.d.ts",
1039
1055
  "import": "./dist/patterns/payment-automation-upsell/index.js"
1040
1056
  },
1057
+ "./patterns/prescription": {
1058
+ "types": "./dist/patterns/prescription/index.d.ts",
1059
+ "import": "./dist/patterns/prescription/index.js"
1060
+ },
1041
1061
  "./patterns/registration-form": {
1042
1062
  "types": "./dist/patterns/registration-form/index.d.ts",
1043
1063
  "import": "./dist/patterns/registration-form/index.js"
@@ -1,562 +0,0 @@
1
- import { jsx as s, jsxs as R } from "react/jsx-runtime";
2
- import { forwardRef as at, useId as ot, useState as T, useRef as p, useCallback as V, useEffect as E, useMemo as Y } from "react";
3
- import { _ as g } from "./index-4xgbg-sn.js";
4
- import * as B from "@radix-ui/react-popover";
5
- import { c as P } from "./index-D2ZczOXr.js";
6
- import { useTranslation as rt } from "react-i18next";
7
- import { S as he } from "./spinner-CoflYlEx.js";
8
- import { u as it, b as lt } from "./form-field-context-DtiROUJV.js";
9
- import { u as dt } from "./use-controllable-state-BiY4xTzM.js";
10
- import { u as ve } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
11
- import { g as ut } from "./group-options-BvKhQ3xb.js";
12
- import { b as ct } from "./menu-row-BAr8bx1I.js";
13
- import { I as pt, a as Z, b as ee, c as mt } from "./input-surface-BMffm2Vd.js";
14
- import { u as ft } from "./registry-DvAUVLHh.js";
15
- import { u as gt } from "./use-debounced-callback-BisrB-Fq.js";
16
- const ht = {
17
- id: "autocomplete",
18
- capabilities: ["select_single", "filter", "open", "close"],
19
- state: {
20
- value: {
21
- type: "string | null",
22
- descriptionKey: "ui.agent.autocomplete.state.value",
23
- description: "Currently-selected option value, or null when nothing is committed.",
24
- read: (a) => a.getValue()
25
- },
26
- query: {
27
- type: "string",
28
- descriptionKey: "ui.agent.autocomplete.state.query",
29
- description: "Current free-text query in the input.",
30
- read: (a) => a.getQuery()
31
- },
32
- isOpen: {
33
- type: "boolean",
34
- descriptionKey: "ui.agent.autocomplete.state.isOpen",
35
- description: "True when the suggestion popup is visible. Open with no suggestions to show reads false.",
36
- read: (a) => a.getIsOpen()
37
- }
38
- },
39
- actions: {
40
- set_value: {
41
- safety: "write",
42
- argsType: "{ value: string | null }",
43
- argsSchema: {
44
- type: "object",
45
- properties: { value: { type: ["string", "null"] } },
46
- required: ["value"]
47
- },
48
- idempotent: !0,
49
- descriptionKey: "ui.agent.autocomplete.actions.setValue",
50
- description: "Set the committed value programmatically.",
51
- invoke: (a, d) => {
52
- a.setValue(d.value);
53
- }
54
- },
55
- apply_filter: {
56
- safety: "read",
57
- argsType: "{ query: string }",
58
- argsSchema: {
59
- type: "object",
60
- properties: { query: { type: "string" } },
61
- required: ["query"]
62
- },
63
- idempotent: !0,
64
- descriptionKey: "ui.agent.autocomplete.actions.applyFilter",
65
- description: "Set the input query, which filters the suggestion list.",
66
- invoke: (a, d) => {
67
- a.setQuery(d.query);
68
- }
69
- },
70
- clear: {
71
- safety: "destructive",
72
- idempotent: !0,
73
- descriptionKey: "ui.agent.autocomplete.actions.clear",
74
- description: "Clear the committed value and the query. Discards the typed input.",
75
- invoke: (a) => {
76
- a.clear();
77
- }
78
- },
79
- open: {
80
- safety: "read",
81
- idempotent: !0,
82
- descriptionKey: "ui.agent.autocomplete.actions.open",
83
- description: "Open the suggestion list.",
84
- invoke: (a) => {
85
- a.open();
86
- }
87
- },
88
- close: {
89
- safety: "read",
90
- idempotent: !0,
91
- descriptionKey: "ui.agent.autocomplete.actions.close",
92
- description: "Close the suggestion list.",
93
- invoke: (a) => {
94
- a.close();
95
- }
96
- }
97
- },
98
- domHooks: {
99
- root: { attr: "data-component", value: "autocomplete" },
100
- instanceId: {
101
- attr: "data-component-id",
102
- sourceProp: "id",
103
- description: "Sourced from the id prop."
104
- },
105
- item: {
106
- attr: "data-option-id",
107
- description: "Each suggestion emits its value as data-option-id."
108
- }
109
- }
110
- }, vt = P(
111
- ["ds:flex ds:w-full ds:items-center", mt].join(" "),
112
- {
113
- variants: {
114
- size: {
115
- sm: `${Z.sm} ${ee.sm}`,
116
- md: `${Z.md} ${ee.md}`,
117
- lg: `${Z.lg} ${ee.lg}`
118
- },
119
- tone: pt
120
- },
121
- defaultVariants: { size: "md", tone: "default" }
122
- }
123
- ), bt = P(
124
- [
125
- "ds:flex-1 ds:min-w-0 ds:bg-transparent ds:text-foreground",
126
- "ds:placeholder:text-muted-foreground",
127
- "ds:outline-none ds:focus:outline-none ds:focus-visible:outline-none",
128
- "ds:disabled:cursor-not-allowed",
129
- "ds:read-only:cursor-default"
130
- ].join(" "),
131
- {
132
- variants: {
133
- hasStart: { true: "ds:ps-2", false: "ds:ps-3" },
134
- hasEnd: { true: "ds:pe-2", false: "ds:pe-3" }
135
- },
136
- defaultVariants: { hasStart: !1, hasEnd: !1 }
137
- }
138
- ), yt = P(
139
- [
140
- "ds:z-[var(--z-dropdown)] ds:overflow-hidden",
141
- "ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-background",
142
- "ds:shadow-[var(--shadow-md)]",
143
- "ds:w-[var(--radix-popover-trigger-width)]",
144
- "ds:animate-in ds:fade-in ds:zoom-in-95",
145
- "ds:motion-reduce:animate-none"
146
- ].join(" ")
147
- ), be = P(
148
- [
149
- "ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
150
- "ds:ps-3 ds:pe-3 ds:py-2 ds:text-[length:var(--font-size-sm)] ds:text-foreground",
151
- "ds:rounded-[var(--radius-sm)] ds:select-none ds:cursor-pointer",
152
- "ds:data-[disabled=true]:pointer-events-none ds:data-[disabled=true]:opacity-50",
153
- // cmdk moves the selection on pointer move, so hover needs no tint.
154
- ct.selected
155
- ].join(" ")
156
- ), ye = [
157
- "ds:[&_[cmdk-group-heading]]:ps-3",
158
- "ds:[&_[cmdk-group-heading]]:pe-3",
159
- "ds:[&_[cmdk-group-heading]]:py-1.5",
160
- "ds:[&_[cmdk-group-heading]]:type-eyebrow",
161
- "ds:[&_[cmdk-group-heading]]:text-muted-foreground"
162
- ].join(" "), te = "ds:inline-flex ds:items-center ds:shrink-0 ds:text-muted-foreground ds:[&_svg]:size-4";
163
- function se(a, d, q) {
164
- return `${a}-${d}-${q}`;
165
- }
166
- function we(a, d) {
167
- return `${a}:${d}`;
168
- }
169
- const wt = at(
170
- function({
171
- loadOptions: d,
172
- debounceMs: q = 250,
173
- value: Ce,
174
- defaultValue: xe,
175
- onChange: ke,
176
- onSelect: u,
177
- recents: w,
178
- onRecentSelect: K,
179
- snapOnBlur: Ne = !1,
180
- size: Re = "md",
181
- tone: Ve = "default",
182
- startAdornment: M,
183
- endAdornment: j,
184
- placeholder: z,
185
- disabled: Ae,
186
- readOnly: C,
187
- required: Ie,
188
- name: Ee,
189
- id: O,
190
- className: _e,
191
- "aria-label": U,
192
- "aria-invalid": $e,
193
- "aria-describedby": De,
194
- autoComplete: H
195
- }, A) {
196
- const { t: h, i18n: Fe } = rt("ui"), c = it(), Te = ot(), v = O ?? c.id ?? Te, ne = `${v}-listbox`, Be = `${v}-live`, b = !!(c.disabled || Ae), Pe = !!(c.required || Ie), ae = c.invalid || !!$e, qe = ae ? "error" : Ve ?? "default", Ke = c.describedBy || De || void 0, [Me, oe] = dt({
197
- value: Ce,
198
- defaultValue: xe ?? "",
199
- onChange: ke
200
- }), r = Me ?? "", [x, i] = T(!1), [k, re] = T([]), [I, S] = T(!1), [m, je] = T(""), _ = p(!1), L = p(null), G = p(r), ie = p(/* @__PURE__ */ new Map()), le = p(/* @__PURE__ */ new Map()), y = p(null), $ = p(null);
201
- lt(c, y);
202
- const Q = H && H !== "off" ? H : void 0;
203
- ve(() => {
204
- var e;
205
- Q && ((e = y.current) == null || e.setAttribute("autocomplete", Q));
206
- });
207
- const ze = V(
208
- (e) => {
209
- y.current = e, typeof A == "function" ? A(e) : A && (A.current = e);
210
- },
211
- [A]
212
- ), de = Fe.language;
213
- E(() => {
214
- const e = /* @__PURE__ */ new Map();
215
- for (const t of k) e.set(t.value, t);
216
- ie.current = e;
217
- }, [k]), E(() => {
218
- const e = /* @__PURE__ */ new Map();
219
- if (w) for (const t of w) e.set(t.value, t);
220
- le.current = e;
221
- }, [w]);
222
- const Oe = V(
223
- (e) => {
224
- var n;
225
- if (b || C || _.current) return;
226
- (n = L.current) == null || n.abort();
227
- const t = new AbortController();
228
- L.current = t, G.current = e, S(!0), d(e, { signal: t.signal, locale: de }).then((o) => {
229
- t.signal.aborted || G.current === e && (re(o), S(!1));
230
- }).catch((o) => {
231
- t.signal.aborted || o && typeof o == "object" && "name" in o && o.name === "AbortError" || G.current === e && (re([]), S(!1));
232
- });
233
- },
234
- [b, C, d, de]
235
- ), N = gt(Oe, q);
236
- E(() => () => {
237
- var e;
238
- N.cancel(), (e = L.current) == null || e.abort();
239
- }, [N]);
240
- const f = V(
241
- (e) => {
242
- oe(e);
243
- },
244
- [oe]
245
- ), ue = V(
246
- (e) => {
247
- const [t, n] = e.split(":");
248
- if (!n || t !== "recent" && t !== "option") return null;
249
- const ge = (t === "recent" ? le.current : ie.current).get(n);
250
- return ge ? { kind: t, option: ge } : null;
251
- },
252
- []
253
- ), Ue = (e) => {
254
- f(e), !(b || C) && (Q && document.activeElement !== y.current || (x || i(!0), !_.current && N(e)));
255
- }, He = (e) => {
256
- _.current = !0;
257
- }, Se = (e) => {
258
- _.current = !1;
259
- const t = e.currentTarget.value;
260
- N(t);
261
- }, Le = (e) => {
262
- b || C || (i(!0), r && N(r));
263
- }, Ge = (e) => {
264
- const t = e.relatedTarget;
265
- if (!(t && $.current && $.current.contains(t))) {
266
- if (Ne && m) {
267
- const n = ue(m);
268
- n && (f(n.option.label), u == null || u(n.option));
269
- }
270
- i(!1);
271
- }
272
- }, Qe = (e) => {
273
- if (!e.nativeEvent.isComposing) {
274
- if (e.key === "Escape") {
275
- x && (e.preventDefault(), e.stopPropagation(), i(!1));
276
- return;
277
- }
278
- if (e.key === "ArrowDown" && !x) {
279
- e.preventDefault(), i(!0), r && N(r);
280
- return;
281
- }
282
- if (e.key === "Tab" && x && m) {
283
- const t = ue(m);
284
- t && (f(t.option.label), u == null || u(t.option), i(!1));
285
- }
286
- }
287
- }, ce = (e, t) => {
288
- var n;
289
- f(t.label), e === "recent" ? K == null || K(t) : u == null || u(t), i(!1), (n = y.current) == null || n.focus();
290
- }, W = (e) => {
291
- e.preventDefault();
292
- }, D = !!(w && w.length > 0) && r.length === 0, We = Y(
293
- () => ut(k),
294
- [k]
295
- ), Xe = !!M, Je = !!j || I, Ye = vt({
296
- size: Re,
297
- tone: qe,
298
- className: _e
299
- }), Ze = Y(() => {
300
- if (!m) return;
301
- const [e, t] = m.split(":");
302
- if (!(!t || e !== "recent" && e !== "option"))
303
- return se(v, e, t);
304
- }, [m, v]), F = k.length > 0, pe = !D && !F && !I && r.length > 0, me = I && !F, l = x && !b && !C && (D || F || pe || me), X = V(() => {
305
- var n;
306
- const e = y.current;
307
- if (!e) return;
308
- e.setAttribute("aria-expanded", String(l));
309
- const t = (n = $.current) == null ? void 0 : n.querySelector("[cmdk-list]");
310
- l && (t != null && t.id) ? e.setAttribute("aria-controls", t.id) : l || (e.removeAttribute("aria-controls"), e.removeAttribute("aria-activedescendant"));
311
- }, [l]);
312
- ve(X);
313
- const et = V(
314
- (e) => {
315
- $.current = e, X();
316
- },
317
- [X]
318
- ), J = p(r);
319
- E(() => {
320
- J.current = r;
321
- }, [r]);
322
- const fe = p(l);
323
- E(() => {
324
- fe.current = l;
325
- }, [l]);
326
- const tt = Y(
327
- () => ({
328
- getValue: () => J.current || null,
329
- getQuery: () => J.current,
330
- getIsOpen: () => fe.current,
331
- setValue: (e) => {
332
- f(e ?? "");
333
- },
334
- setQuery: (e) => {
335
- f(e);
336
- },
337
- clear: () => {
338
- f("");
339
- },
340
- open: () => {
341
- i(!0);
342
- },
343
- close: () => {
344
- i(!1);
345
- }
346
- }),
347
- [f]
348
- );
349
- ft(ht, tt, O);
350
- const st = k.length, nt = I ? h("common.loading", "Loading…") : x && r.length > 0 ? h("inputs.autocomplete.results", {
351
- count: st,
352
- defaultValue: "{{count}} results"
353
- }) : "";
354
- return /* @__PURE__ */ s(
355
- g,
356
- {
357
- shouldFilter: !1,
358
- value: m,
359
- onValueChange: je,
360
- label: U ?? (c.label || z),
361
- className: "ds:w-full",
362
- children: /* @__PURE__ */ R(B.Root, { open: l, children: [
363
- /* @__PURE__ */ s(B.Anchor, { asChild: !0, children: /* @__PURE__ */ R(
364
- "div",
365
- {
366
- className: Ye,
367
- "data-component": "autocomplete",
368
- "data-component-id": O,
369
- "data-disabled": b || void 0,
370
- children: [
371
- M ? /* @__PURE__ */ s("span", { "aria-hidden": "true", className: `${te} ds:ps-3`, children: M }) : null,
372
- /* @__PURE__ */ s(
373
- g.Input,
374
- {
375
- ref: ze,
376
- id: v,
377
- name: Ee,
378
- placeholder: z,
379
- value: r,
380
- onValueChange: Ue,
381
- onFocus: Le,
382
- onBlur: Ge,
383
- onKeyDown: Qe,
384
- onCompositionStart: He,
385
- onCompositionEnd: Se,
386
- disabled: b,
387
- readOnly: C,
388
- required: Pe,
389
- role: "combobox",
390
- "aria-autocomplete": "both",
391
- "aria-expanded": l,
392
- "aria-controls": l ? ne : void 0,
393
- "aria-activedescendant": Ze,
394
- "aria-describedby": Ke,
395
- "aria-invalid": ae || void 0,
396
- "aria-label": U ?? (c.label || h("inputs.autocomplete.ariaLabel")),
397
- autoComplete: "off",
398
- className: bt({ hasStart: Xe, hasEnd: Je })
399
- }
400
- ),
401
- I ? /* @__PURE__ */ s("span", { className: `${te} ds:pe-3`, "aria-hidden": "true", children: /* @__PURE__ */ s(he, { variant: "pulse", size: "sm" }) }) : j ? /* @__PURE__ */ s("span", { "aria-hidden": "true", className: `${te} ds:pe-3`, children: j }) : null,
402
- /* @__PURE__ */ s(
403
- "span",
404
- {
405
- id: Be,
406
- role: "status",
407
- "aria-live": "polite",
408
- "aria-atomic": "true",
409
- className: "ds:sr-only",
410
- children: nt
411
- }
412
- )
413
- ]
414
- }
415
- ) }),
416
- l ? /* @__PURE__ */ s(B.Portal, { children: /* @__PURE__ */ s(
417
- B.Content,
418
- {
419
- ref: et,
420
- role: "presentation",
421
- side: "bottom",
422
- align: "start",
423
- sideOffset: 4,
424
- onOpenAutoFocus: (e) => e.preventDefault(),
425
- onCloseAutoFocus: (e) => e.preventDefault(),
426
- onPointerDownOutside: (e) => {
427
- var n;
428
- const t = e.target;
429
- if (t && ((n = y.current) != null && n.contains(t))) {
430
- e.preventDefault();
431
- return;
432
- }
433
- i(!1);
434
- },
435
- onEscapeKeyDown: () => i(!1),
436
- onMouseDown: W,
437
- className: yt(),
438
- children: /* @__PURE__ */ R(
439
- g.List,
440
- {
441
- id: ne,
442
- label: U ?? (c.label || z || h("inputs.autocomplete.ariaLabel")),
443
- className: "ds:max-h-[min(24rem,var(--radix-popover-content-available-height))] ds:overflow-auto ds:p-1",
444
- children: [
445
- D ? /* @__PURE__ */ s(
446
- g.Group,
447
- {
448
- heading: h("inputs.autocomplete.recent", "Recent"),
449
- className: ye,
450
- children: (w ?? []).map((e) => /* @__PURE__ */ R(
451
- g.Item,
452
- {
453
- id: se(v, "recent", e.value),
454
- "data-option-id": e.value,
455
- value: we("recent", e.value),
456
- disabled: e.disabled,
457
- onSelect: () => ce("recent", e),
458
- onMouseDown: W,
459
- className: be(),
460
- children: [
461
- e.startAdornment ? /* @__PURE__ */ s(
462
- "span",
463
- {
464
- "aria-hidden": "true",
465
- className: "ds:inline-flex ds:items-center ds:shrink-0",
466
- children: e.startAdornment
467
- }
468
- ) : null,
469
- /* @__PURE__ */ s("span", { className: "ds:flex-1 ds:truncate", children: e.label }),
470
- e.endContent ? (
471
- // Deliberately NOT aria-hidden — unlike
472
- // `startAdornment`, this slot carries meaning
473
- // and must reach the option's accessible name.
474
- /* @__PURE__ */ s("span", { className: "ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0", children: e.endContent })
475
- ) : null
476
- ]
477
- },
478
- `recent-${e.value}`
479
- ))
480
- }
481
- ) : null,
482
- pe ? /* @__PURE__ */ s(
483
- "div",
484
- {
485
- role: "option",
486
- "aria-disabled": "true",
487
- "aria-selected": "false",
488
- className: "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground",
489
- children: h("inputs.autocomplete.noResults", "No results")
490
- }
491
- ) : null,
492
- me ? /* @__PURE__ */ R(
493
- "div",
494
- {
495
- role: "option",
496
- "aria-disabled": "true",
497
- "aria-selected": "false",
498
- className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground",
499
- children: [
500
- /* @__PURE__ */ s(he, { variant: "pulse", size: "sm" }),
501
- /* @__PURE__ */ s("span", { children: h("common.loading", "Loading…") })
502
- ]
503
- }
504
- ) : null,
505
- !D && F ? We.map((e, t) => {
506
- const n = e.items.map((o) => /* @__PURE__ */ R(
507
- g.Item,
508
- {
509
- id: se(v, "option", o.value),
510
- "data-option-id": o.value,
511
- value: we("option", o.value),
512
- disabled: o.disabled,
513
- onSelect: () => ce("option", o),
514
- onMouseDown: W,
515
- className: be(),
516
- children: [
517
- o.startAdornment ? /* @__PURE__ */ s(
518
- "span",
519
- {
520
- "aria-hidden": "true",
521
- className: "ds:inline-flex ds:items-center ds:shrink-0",
522
- children: o.startAdornment
523
- }
524
- ) : null,
525
- /* @__PURE__ */ s("span", { className: "ds:flex-1 ds:truncate", children: o.label }),
526
- o.endContent ? (
527
- // Deliberately NOT aria-hidden — unlike
528
- // `startAdornment`, this slot carries meaning
529
- // and must reach the option's accessible name.
530
- /* @__PURE__ */ s("span", { className: "ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0", children: o.endContent })
531
- ) : null
532
- ]
533
- },
534
- `option-${o.value}`
535
- ));
536
- return e.group ? /* @__PURE__ */ s(
537
- g.Group,
538
- {
539
- heading: e.group,
540
- className: ye,
541
- children: n
542
- },
543
- `group-${e.group}`
544
- ) : /* @__PURE__ */ s(g.Group, { children: n }, `group-${t}`);
545
- }) : null
546
- ]
547
- }
548
- )
549
- }
550
- ) }) : null
551
- ] })
552
- }
553
- );
554
- }
555
- ), Ct = wt;
556
- Ct.displayName = "Autocomplete";
557
- export {
558
- Ct as A,
559
- ht as a,
560
- vt as b
561
- };
562
- //# sourceMappingURL=autocomplete-D10ydpgi.js.map
@@ -1,16 +0,0 @@
1
- function u(s) {
2
- if (!s.some((o) => o.group)) return [{ group: void 0, items: s }];
3
- const t = /* @__PURE__ */ new Map();
4
- for (const o of s) {
5
- const r = o.group ?? "", e = t.get(r);
6
- e ? e.push(o) : t.set(r, [o]);
7
- }
8
- return Array.from(t.entries()).map(([o, r]) => ({
9
- group: o || void 0,
10
- items: r
11
- }));
12
- }
13
- export {
14
- u as g
15
- };
16
- //# sourceMappingURL=group-options-BvKhQ3xb.js.map
@@ -1,7 +0,0 @@
1
- function r(e) {
2
- return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
3
- }
4
- export {
5
- r as n
6
- };
7
- //# sourceMappingURL=normalize-diacritics-BNGbFNlJ.js.map