@alfadocs/ui-kit 1.30.0 → 1.32.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 (233) hide show
  1. package/dist/_chunks/{address-fields-CZ0pEdEI.js → address-fields-jFfjxOQR.js} +3 -3
  2. package/dist/_chunks/{agenda-card-pdN49pMu.js → agenda-card-DVz3jwTf.js} +2 -2
  3. package/dist/_chunks/{agenda-tray-BweO8pDo.js → agenda-tray-1oDWCJdB.js} +2 -2
  4. package/dist/_chunks/{ai-prompt-input-CrHr-5H8.js → ai-prompt-input-Dt7tpCBh.js} +2 -2
  5. package/dist/_chunks/{alia-sidebar-BWcWZivN.js → alia-sidebar-D18kp3p9.js} +3 -3
  6. package/dist/_chunks/{anamnesis-summary-rows-DMO3MWSt.js → anamnesis-summary-rows-BYgyp_i2.js} +6 -6
  7. package/dist/_chunks/{appointment-card-Dzr3GeVz.js → appointment-card-D-oj_ugh.js} +9 -7
  8. package/dist/_chunks/{appointment-timeline-DhHwmHo1.js → appointment-timeline-CymGHyIP.js} +2 -2
  9. package/dist/_chunks/{appointment-tray-4FUu_5NX.js → appointment-tray-DCk8gHod.js} +2 -2
  10. package/dist/_chunks/{audio-recorder-DXG6LTtO.js → audio-recorder-11wClczr.js} +2 -2
  11. package/dist/_chunks/{avatar-BNQNhoyL.js → avatar-CkDeQOSI.js} +37 -37
  12. package/dist/_chunks/{balance-badge-cell-CX6b0ML4.js → balance-badge-cell-DhBtFRoW.js} +4 -4
  13. package/dist/_chunks/{bishop-score-CJUVBfAu.js → bishop-score-CAl7C5hm.js} +2 -2
  14. package/dist/_chunks/{bmi-calculator-CcH6upht.js → bmi-calculator-Dwkih9a4.js} +3 -3
  15. package/dist/_chunks/{booking-AabCk7CI.js → booking-l6UGNiE1.js} +3 -3
  16. package/dist/_chunks/{calculator-dialog-12d3Sxaz.js → calculator-dialog-C0ixc3SU.js} +2 -2
  17. package/dist/_chunks/{calendar-CI9MINcR.js → calendar-Dgvl5L4T.js} +494 -438
  18. package/dist/_chunks/{calendar-event-card-66CEEWU6.js → calendar-event-card-DSh-69HT.js} +130 -122
  19. package/dist/_chunks/calendar-workspace-BX-zDyVR.js +9392 -0
  20. package/dist/_chunks/{care-plan-card-CQVboTn1.js → care-plan-card-CZW476Kg.js} +2 -2
  21. package/dist/_chunks/{care-plan-entry-card-jxHkzez5.js → care-plan-entry-card-BMUYagEw.js} +2 -2
  22. package/dist/_chunks/{chat-message-DBQu10rs.js → chat-message-C-8UU2av.js} +2 -2
  23. package/dist/_chunks/{clinical-note-card-BBgFd2nB.js → clinical-note-card-D2WTV2CO.js} +185 -188
  24. package/dist/_chunks/{color-picker-CU303VjY.js → color-picker-Bl5f0iK1.js} +28 -25
  25. package/dist/_chunks/{combobox-D7_NLE2Z.js → combobox-DnSdYssy.js} +216 -215
  26. package/dist/_chunks/{country-select-DzbPFktV.js → country-select-CfDNFG5c.js} +2 -2
  27. package/dist/_chunks/{data-table-DB5BiVQ0.js → data-table-DC96JJIq.js} +2 -2
  28. package/dist/_chunks/{dependent-selector-cJlJFAKD.js → dependent-selector-yTKKsuc9.js} +2 -2
  29. package/dist/_chunks/{dialog-UbKJCi1X.js → dialog-BJiLqhx6.js} +54 -46
  30. package/dist/_chunks/{document-preview-CDb-n_W7.js → document-preview-BrhMHNh8.js} +2 -2
  31. package/dist/_chunks/{due-date-calculator-BtgWeFqp.js → due-date-calculator-CxgK8vzt.js} +3 -3
  32. package/dist/_chunks/{entity-summary-B_vO5Ur4.js → entity-summary-5o768XLU.js} +2 -2
  33. package/dist/_chunks/{face-scheme-DA2vjqaM.js → face-scheme-l-CQyLs-.js} +2 -2
  34. package/dist/_chunks/{file-manager-Cd8V9IcZ.js → file-manager-CI2Qn8qW.js} +3 -3
  35. package/dist/_chunks/{gestational-age-calculator-KdMg9z9H.js → gestational-age-calculator-CZHVrERT.js} +4 -4
  36. package/dist/_chunks/{link-cell-renderer-tWEOv3Sc.js → link-cell-renderer-BEpMNtAa.js} +3 -3
  37. package/dist/_chunks/{marketplace-app-shell-C4AjQmvz.js → marketplace-app-shell-CK_ND8Tr.js} +2 -2
  38. package/dist/_chunks/{message-card-D8GB4FdF.js → message-card-BUMv16un.js} +2 -2
  39. package/dist/_chunks/{message-tray-CGIRQjx5.js → message-tray-0zsv27xX.js} +2 -2
  40. package/dist/_chunks/{muscle-scheme-BSJsI4-I.js → muscle-scheme-UVz_x4iE.js} +2 -2
  41. package/dist/_chunks/notes-panel-C4G-mhZ9.js +380 -0
  42. package/dist/_chunks/{operator-hero-BnFv-Uef.js → operator-hero-D7-iiFQ9.js} +2 -2
  43. package/dist/_chunks/{optical-prescription-BvwuqTpl.js → optical-prescription-DUJOhKz_.js} +2 -2
  44. package/dist/_chunks/{patient-details-DYAmq76G.js → patient-details-BGiawUHd.js} +5 -5
  45. package/dist/_chunks/{patient-summary-card-C9WBwct-.js → patient-summary-card--CT_gbaQ.js} +2 -2
  46. package/dist/_chunks/{periodontal-diagnosis-HrFsVi-C.js → periodontal-diagnosis-lEwA8wqX.js} +3 -3
  47. package/dist/_chunks/{practice-profile-hero-YQ7h2K4o.js → practice-profile-hero-DQyDvpJL.js} +2 -2
  48. package/dist/_chunks/{practice-results-CxIsU2YO.js → practice-results-DjEzPgAK.js} +2 -2
  49. package/dist/_chunks/{pregnancy-dating-m-c05DOI.js → pregnancy-dating-n5j5dAKy.js} +4 -4
  50. package/dist/_chunks/{pregnancy-weight-gain-CJwbs9W-.js → pregnancy-weight-gain-D5A8vPjj.js} +3 -3
  51. package/dist/_chunks/{province-select-BBc7s7vR.js → province-select-BaUnkg4S.js} +2 -2
  52. package/dist/_chunks/qr-code-DOJs4suh.js +750 -0
  53. package/dist/_chunks/radio-DNRe6H_8.js +193 -0
  54. package/dist/_chunks/radio-group-DyVBgnA3.js +297 -0
  55. package/dist/_chunks/{radiograph-panel.agent-ByM9M3qm.js → radiograph-panel.agent-o4jwEJPC.js} +2 -2
  56. package/dist/_chunks/{rich-text-editor-lSCiE0Zz.js → rich-text-editor-CQ7yZdG3.js} +3 -3
  57. package/dist/_chunks/select-CLSUnKjF.js +520 -0
  58. package/dist/_chunks/signature-request-vihDT8On.js +2232 -0
  59. package/dist/_chunks/{tabs-DqKtTIjZ.js → tabs-BnRaLT0y.js} +2 -2
  60. package/dist/_chunks/{tasks-panel-DPCNaRko.js → tasks-panel-DQuaVvl5.js} +2 -2
  61. package/dist/_chunks/{timeline-r-8IUoBS.js → timeline-Bs9Erxlo.js} +38 -36
  62. package/dist/_chunks/{tooth-scheme-C9jssOmy.js → tooth-scheme-Qe7LO5Di.js} +2 -2
  63. package/dist/_chunks/{unit-converter-C6jMjqL9.js → unit-converter-BTgU50gk.js} +2 -2
  64. package/dist/_chunks/{widget-picker-em4xGgv0.js → widget-picker-DvUkBemi.js} +2 -2
  65. package/dist/agent-catalog.json +366 -29
  66. package/dist/agent-i18n/en.json +27 -15
  67. package/dist/components/_shared/get-error-message.d.ts +3 -0
  68. package/dist/components/address-fields/index.js +1 -1
  69. package/dist/components/agenda-card/index.js +1 -1
  70. package/dist/components/agenda-tray/index.js +1 -1
  71. package/dist/components/ai-prompt-input/index.js +1 -1
  72. package/dist/components/appointment-card/index.js +2 -2
  73. package/dist/components/appointment-timeline/index.js +1 -1
  74. package/dist/components/audio-recorder/index.js +1 -1
  75. package/dist/components/avatar/avatar.d.ts +2 -0
  76. package/dist/components/avatar/index.js +1 -1
  77. package/dist/components/bishop-score/index.js +1 -1
  78. package/dist/components/bmi-calculator/index.js +1 -1
  79. package/dist/components/booking/index.js +1 -1
  80. package/dist/components/calculator-dialog/index.js +1 -1
  81. package/dist/components/calendar/calendar.d.ts +26 -2
  82. package/dist/components/calendar/index.js +1 -1
  83. package/dist/components/calendar-event-card/calendar-event-card.d.ts +9 -0
  84. package/dist/components/calendar-event-card/index.js +1 -1
  85. package/dist/components/care-plan-card/index.js +1 -1
  86. package/dist/components/care-plan-entry-card/index.js +1 -1
  87. package/dist/components/chat-message/index.js +1 -1
  88. package/dist/components/clinical-note-card/clinical-note-card.d.ts +16 -1
  89. package/dist/components/clinical-note-card/index.js +1 -1
  90. package/dist/components/color-picker/index.js +1 -1
  91. package/dist/components/combobox/combobox.d.ts +5 -0
  92. package/dist/components/combobox/index.js +1 -1
  93. package/dist/components/country-select/index.js +1 -1
  94. package/dist/components/data-table/index.js +2 -2
  95. package/dist/components/dependent-selector/index.js +1 -1
  96. package/dist/components/dialog/dialog.d.ts +9 -0
  97. package/dist/components/dialog/index.js +1 -1
  98. package/dist/components/document-preview/index.js +1 -1
  99. package/dist/components/due-date-calculator/index.js +1 -1
  100. package/dist/components/entity-summary/index.js +1 -1
  101. package/dist/components/face-scheme/index.js +1 -1
  102. package/dist/components/file-manager/index.js +1 -1
  103. package/dist/components/gestational-age-calculator/index.js +1 -1
  104. package/dist/components/message-card/index.js +1 -1
  105. package/dist/components/message-tray/index.js +1 -1
  106. package/dist/components/muscle-scheme/index.js +1 -1
  107. package/dist/components/notes-panel/index.d.ts +1 -1
  108. package/dist/components/notes-panel/index.js +1 -1
  109. package/dist/components/notes-panel/notes-panel.d.ts +24 -5
  110. package/dist/components/operator-hero/index.js +1 -1
  111. package/dist/components/optical-prescription/index.js +1 -1
  112. package/dist/components/patient-details/index.js +1 -1
  113. package/dist/components/patient-summary-card/index.js +1 -1
  114. package/dist/components/patient-table/index.js +1 -1
  115. package/dist/components/periodontal-diagnosis/index.js +1 -1
  116. package/dist/components/practice-profile-hero/index.js +1 -1
  117. package/dist/components/practice-results/index.js +1 -1
  118. package/dist/components/pregnancy-dating/index.js +1 -1
  119. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  120. package/dist/components/province-select/index.js +1 -1
  121. package/dist/components/qr-code/index.js +1 -1
  122. package/dist/components/qr-code/qr-encode.d.ts +14 -16
  123. package/dist/components/radio/index.js +1 -1
  124. package/dist/components/radio-group/index.js +2 -2
  125. package/dist/components/radio-group/radio-group-context.d.ts +4 -1
  126. package/dist/components/radio-group/radio-group.d.ts +13 -1
  127. package/dist/components/radio-group/radio.d.ts +24 -1
  128. package/dist/components/radiograph-panel/index.js +1 -1
  129. package/dist/components/rich-text-editor/index.js +1 -1
  130. package/dist/components/select/index.js +1 -1
  131. package/dist/components/select/select.d.ts +33 -0
  132. package/dist/components/skeleton-scheme/index.js +1 -1
  133. package/dist/components/tabs/index.js +1 -1
  134. package/dist/components/tasks-panel/index.js +1 -1
  135. package/dist/components/timeline/index.js +1 -1
  136. package/dist/components/timeline/timeline.d.ts +2 -0
  137. package/dist/components/tooth-scheme/index.js +1 -1
  138. package/dist/components/unit-converter/index.js +1 -1
  139. package/dist/components/widget-picker/index.js +1 -1
  140. package/dist/host-compat.css +7 -1
  141. package/dist/i18n/locales/ar.d.ts +118 -0
  142. package/dist/i18n/locales/ar.js +123 -5
  143. package/dist/i18n/locales/de.d.ts +128 -10
  144. package/dist/i18n/locales/de.js +135 -15
  145. package/dist/i18n/locales/el.d.ts +118 -0
  146. package/dist/i18n/locales/el.js +123 -5
  147. package/dist/i18n/locales/en.d.ts +118 -0
  148. package/dist/i18n/locales/en.js +123 -5
  149. package/dist/i18n/locales/es.d.ts +118 -0
  150. package/dist/i18n/locales/es.js +123 -5
  151. package/dist/i18n/locales/fr.d.ts +118 -0
  152. package/dist/i18n/locales/fr.js +122 -4
  153. package/dist/i18n/locales/hi.d.ts +118 -0
  154. package/dist/i18n/locales/hi.js +123 -5
  155. package/dist/i18n/locales/it.d.ts +128 -10
  156. package/dist/i18n/locales/it.js +133 -15
  157. package/dist/i18n/locales/ja.d.ts +118 -0
  158. package/dist/i18n/locales/ja.js +123 -5
  159. package/dist/i18n/locales/nl.d.ts +118 -0
  160. package/dist/i18n/locales/nl.js +123 -5
  161. package/dist/i18n/locales/pl.d.ts +118 -0
  162. package/dist/i18n/locales/pl.js +123 -5
  163. package/dist/i18n/locales/pt.d.ts +118 -0
  164. package/dist/i18n/locales/pt.js +123 -5
  165. package/dist/i18n/locales/ro.d.ts +118 -0
  166. package/dist/i18n/locales/ro.js +122 -4
  167. package/dist/i18n/locales/ru.d.ts +118 -0
  168. package/dist/i18n/locales/ru.js +123 -5
  169. package/dist/i18n/locales/sq.d.ts +118 -0
  170. package/dist/i18n/locales/sq.js +123 -5
  171. package/dist/i18n/locales/sv.d.ts +118 -0
  172. package/dist/i18n/locales/sv.js +123 -5
  173. package/dist/i18n/locales/tr.d.ts +118 -0
  174. package/dist/i18n/locales/tr.js +123 -5
  175. package/dist/i18n/locales/zh.d.ts +118 -0
  176. package/dist/i18n/locales/zh.js +123 -5
  177. package/dist/index.js +131 -130
  178. package/dist/locales/ar.json +123 -5
  179. package/dist/locales/de.json +133 -15
  180. package/dist/locales/el.json +123 -5
  181. package/dist/locales/en.json +123 -5
  182. package/dist/locales/es.json +123 -5
  183. package/dist/locales/fr.json +122 -4
  184. package/dist/locales/hi.json +123 -5
  185. package/dist/locales/it.json +133 -15
  186. package/dist/locales/ja.json +123 -5
  187. package/dist/locales/nl.json +123 -5
  188. package/dist/locales/pl.json +123 -5
  189. package/dist/locales/pt.json +123 -5
  190. package/dist/locales/ro.json +122 -4
  191. package/dist/locales/ru.json +123 -5
  192. package/dist/locales/sq.json +123 -5
  193. package/dist/locales/sv.json +123 -5
  194. package/dist/locales/tr.json +123 -5
  195. package/dist/locales/zh.json +123 -5
  196. package/dist/patterns/alia-assistant/index.js +1 -1
  197. package/dist/patterns/anamnesis/index.js +1 -1
  198. package/dist/patterns/calendar/calendar-appointment-details.d.ts +145 -0
  199. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +32 -0
  200. package/dist/patterns/calendar/calendar-editor-hydration.d.ts +59 -0
  201. package/dist/patterns/calendar/calendar-notes-tool.d.ts +14 -0
  202. package/dist/patterns/calendar/calendar-patient-picker.d.ts +11 -0
  203. package/dist/patterns/calendar/calendar-series-scope-chooser.d.ts +18 -0
  204. package/dist/patterns/calendar/calendar-workspace.d.ts +26 -1
  205. package/dist/patterns/calendar/calendar-workspace.model.d.ts +8 -5
  206. package/dist/patterns/calendar/calendar.data.d.ts +66 -1
  207. package/dist/patterns/calendar/calendar.host.d.ts +2 -0
  208. package/dist/patterns/calendar/calendar.journey.d.ts +42 -7
  209. package/dist/patterns/calendar/calendar.model.d.ts +54 -5
  210. package/dist/patterns/calendar/calendar.sheets.d.ts +68 -15
  211. package/dist/patterns/calendar/calendar.surface.d.ts +12 -2
  212. package/dist/patterns/calendar/calendar.types.d.ts +29 -1
  213. package/dist/patterns/calendar/index.d.ts +9 -6
  214. package/dist/patterns/calendar/index.js +15 -14
  215. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  216. package/dist/patterns/signature-request/channel-meta.d.ts +27 -0
  217. package/dist/patterns/signature-request/index.d.ts +1 -1
  218. package/dist/patterns/signature-request/index.js +1 -1
  219. package/dist/patterns/signature-request/load-status.d.ts +13 -0
  220. package/dist/patterns/signature-request/person-grid.d.ts +32 -0
  221. package/dist/patterns/signature-request/required-documents.d.ts +127 -0
  222. package/dist/patterns/signature-request/signature-history.d.ts +57 -0
  223. package/dist/patterns/signature-request/signature-outcome.d.ts +29 -0
  224. package/dist/patterns/signature-request/signature-request.d.ts +390 -26
  225. package/dist/tokens.css +10 -2
  226. package/package.json +3 -1
  227. package/dist/_chunks/calendar-workspace-a84AHQwj.js +0 -7506
  228. package/dist/_chunks/notes-panel-CTNpsByN.js +0 -353
  229. package/dist/_chunks/qr-code-CPkEs5mG.js +0 -574
  230. package/dist/_chunks/radio-TWf9Q-mp.js +0 -108
  231. package/dist/_chunks/radio-group-rXDJADzW.js +0 -175
  232. package/dist/_chunks/select-Bi8zril7.js +0 -471
  233. package/dist/_chunks/signature-request-C-IsbkPf.js +0 -417
@@ -0,0 +1,520 @@
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
+ import { forwardRef as r, useId as ye, useContext as xe, useState as M, useRef as U, useMemo as Se } from "react";
3
+ import { u as Ne } from "./registry-DvAUVLHh.js";
4
+ import * as a from "@radix-ui/react-select";
5
+ import { c as O } from "./index-D2ZczOXr.js";
6
+ import { useTranslation as we } from "react-i18next";
7
+ import { u as Ce, F as ze } from "./form-field-context-B3APVHKx.js";
8
+ import { g as Ie } from "./group-options-BvKhQ3xb.js";
9
+ import { C as je } from "./chevron-up-umRGgtJA.js";
10
+ import { C as W } from "./chevron-down-DWE7GSq9.js";
11
+ import { C as ke } from "./check-DrFSN__t.js";
12
+ import { u as Te } from "./use-direction-Dp8h70PP.js";
13
+ import { X as Ve } from "./x-B5YnXwCz.js";
14
+ const Re = {
15
+ id: "select",
16
+ // Persisted single choice (value state + set_value) → select_single + set_value,
17
+ // plus open/close of the option list.
18
+ capabilities: ["select_single", "set_value", "open", "close"],
19
+ state: {
20
+ value: {
21
+ type: "string",
22
+ descriptionKey: "ui.agent.select.state.value",
23
+ description: "Currently selected option value, or empty string when none.",
24
+ read: (s) => s.getValue()
25
+ },
26
+ isOpen: {
27
+ type: "boolean",
28
+ descriptionKey: "ui.agent.select.state.isOpen",
29
+ description: "Whether the option list is open.",
30
+ read: (s) => s.isOpen()
31
+ }
32
+ },
33
+ actions: {
34
+ set_value: {
35
+ // Persists the chosen option — reversible by selecting another value.
36
+ safety: "write",
37
+ argsType: "{ value: string }",
38
+ argsSchema: {
39
+ type: "object",
40
+ properties: {
41
+ value: { type: "string", description: "Option value to select." }
42
+ },
43
+ required: ["value"]
44
+ },
45
+ idempotent: !0,
46
+ descriptionKey: "ui.agent.select.actions.setValue",
47
+ description: "Select the option with the given value. A value that is not among the options, or belongs to a disabled option, is ignored and the selection stays as it was.",
48
+ examples: [{ args: { value: "it" }, note: 'Select the "it" option.' }],
49
+ invoke: (s, t) => {
50
+ s.setValue(t.value);
51
+ }
52
+ },
53
+ clear: {
54
+ // Discards the persisted choice — destructive (loses the selection).
55
+ safety: "destructive",
56
+ idempotent: !0,
57
+ descriptionKey: "ui.agent.select.actions.clear",
58
+ description: "Clear the current selection.",
59
+ invoke: (s) => {
60
+ s.clear();
61
+ }
62
+ },
63
+ open: {
64
+ safety: "read",
65
+ idempotent: !0,
66
+ descriptionKey: "ui.agent.select.actions.open",
67
+ description: "Open the option list.",
68
+ invoke: (s) => {
69
+ s.open();
70
+ }
71
+ },
72
+ close: {
73
+ safety: "read",
74
+ idempotent: !0,
75
+ descriptionKey: "ui.agent.select.actions.close",
76
+ description: "Close the option list.",
77
+ invoke: (s) => {
78
+ s.close();
79
+ }
80
+ }
81
+ },
82
+ domHooks: {
83
+ root: {
84
+ attr: "data-component",
85
+ value: "select",
86
+ description: "Marks the Select trigger."
87
+ },
88
+ instanceId: {
89
+ attr: "data-component-id",
90
+ sourceProp: "id",
91
+ description: "Sourced from the id prop."
92
+ },
93
+ item: {
94
+ attr: "data-option-id",
95
+ description: "Stable opaque option value emitted on each rendered option."
96
+ }
97
+ }
98
+ }, E = O(
99
+ [
100
+ "ds:group ds:inline-flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full",
101
+ "ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-input",
102
+ "ds:shadow-[var(--shadow-input)]",
103
+ "ds:text-foreground ds:placeholder:text-muted-foreground",
104
+ "ds:data-[placeholder]:text-muted-foreground",
105
+ "ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
106
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
107
+ "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
108
+ "ds:forced-colors:focus-visible:outline-[CanvasText]",
109
+ "ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
110
+ ].join(" "),
111
+ {
112
+ variants: {
113
+ size: {
114
+ sm: "ds:h-8 ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-sm)]",
115
+ md: "ds:h-[var(--min-target-size)] ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-base)]",
116
+ lg: "ds:h-12 ds:ps-4 ds:pe-4 ds:text-[length:var(--font-size-lg)]"
117
+ },
118
+ tone: {
119
+ default: "",
120
+ error: "ds:border-destructive ds:focus-visible:outline-destructive"
121
+ }
122
+ },
123
+ defaultVariants: {
124
+ size: "md",
125
+ tone: "default"
126
+ }
127
+ }
128
+ ), Be = O(
129
+ [
130
+ "ds:z-[var(--z-dropdown)] ds:overflow-hidden",
131
+ "ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground",
132
+ "ds:shadow-[var(--shadow-lg)]",
133
+ "ds:animate-in ds:fade-in ds:zoom-in-95",
134
+ "ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out",
135
+ "ds:data-[state=closed]:zoom-out-95",
136
+ "ds:data-[side=bottom]:slide-in-from-top-2",
137
+ "ds:data-[side=top]:slide-in-from-bottom-2",
138
+ "ds:motion-reduce:animate-none"
139
+ ].join(" ")
140
+ ), Oe = O(
141
+ [
142
+ "ds:relative ds:flex ds:cursor-pointer ds:items-center",
143
+ "ds:rounded-[var(--radius-sm)]",
144
+ "ds:text-foreground ds:outline-none ds:select-none",
145
+ "ds:data-[highlighted]:bg-muted ds:data-[highlighted]:text-foreground",
146
+ "ds:data-[disabled]:pointer-events-none ds:data-[disabled]:opacity-50"
147
+ ].join(" "),
148
+ {
149
+ variants: {
150
+ size: {
151
+ sm: "ds:min-h-8 ds:ps-8 ds:pe-3 ds:text-[length:var(--font-size-sm)]",
152
+ md: "ds:min-h-[var(--min-target-size)] ds:ps-8 ds:pe-3 ds:text-[length:var(--font-size-base)]",
153
+ lg: "ds:min-h-12 ds:ps-10 ds:pe-4 ds:text-[length:var(--font-size-lg)]"
154
+ }
155
+ },
156
+ defaultVariants: {
157
+ size: "md"
158
+ }
159
+ }
160
+ ), De = [
161
+ "ds:ps-8 ds:pe-3 ds:py-1.5",
162
+ "type-eyebrow ds:text-muted-foreground",
163
+ "ds:sticky ds:top-0 ds:bg-background"
164
+ ].join(" "), Fe = {
165
+ sm: "ds:size-3.5",
166
+ md: "ds:size-4",
167
+ lg: "ds:size-5"
168
+ }, Ke = {
169
+ sm: "ds:start-2",
170
+ md: "ds:start-2",
171
+ lg: "ds:start-3"
172
+ };
173
+ function Pe(...s) {
174
+ return (t) => {
175
+ for (const d of s)
176
+ d && (typeof d == "function" ? d(t) : d.current = t);
177
+ };
178
+ }
179
+ const X = (s) => /* @__PURE__ */ e(a.Root, { ...s });
180
+ X.displayName = "Select.Root";
181
+ const J = r(
182
+ ({ size: s, tone: t, className: d, children: c, ...u }, i) => /* @__PURE__ */ e(
183
+ a.Trigger,
184
+ {
185
+ ref: i,
186
+ className: E({ size: s, tone: t, className: d }),
187
+ ...u,
188
+ children: c
189
+ }
190
+ )
191
+ );
192
+ J.displayName = "Select.Trigger";
193
+ const Q = r((s, t) => /* @__PURE__ */ e(a.Value, { ref: t, ...s }));
194
+ Q.displayName = "Select.Value";
195
+ const D = r(
196
+ ({
197
+ className: s,
198
+ children: t,
199
+ position: d = "popper",
200
+ sideOffset: c = 4,
201
+ container: u,
202
+ ...i
203
+ }, S) => /* @__PURE__ */ e(a.Portal, { container: u ?? void 0, children: /* @__PURE__ */ l(
204
+ a.Content,
205
+ {
206
+ ref: S,
207
+ position: d,
208
+ sideOffset: c,
209
+ "data-component": "select-content",
210
+ className: Be({ className: s }),
211
+ ...i,
212
+ children: [
213
+ /* @__PURE__ */ e(a.ScrollUpButton, { className: "ds:flex ds:items-center ds:justify-center ds:h-6 ds:bg-background ds:cursor-default", children: /* @__PURE__ */ e(je, { "aria-hidden": "true", className: "ds:size-4" }) }),
214
+ t,
215
+ /* @__PURE__ */ e(a.ScrollDownButton, { className: "ds:flex ds:items-center ds:justify-center ds:h-6 ds:bg-background ds:cursor-default", children: /* @__PURE__ */ e(W, { "aria-hidden": "true", className: "ds:size-4" }) })
216
+ ]
217
+ }
218
+ ) })
219
+ );
220
+ D.displayName = "Select.Content";
221
+ const F = r(({ className: s, ...t }, d) => /* @__PURE__ */ e(
222
+ a.Viewport,
223
+ {
224
+ ref: d,
225
+ className: ["ds:p-1", s].filter(Boolean).join(" "),
226
+ ...t
227
+ }
228
+ ));
229
+ F.displayName = "Select.Viewport";
230
+ const K = r(
231
+ ({
232
+ size: s = "md",
233
+ className: t,
234
+ children: d,
235
+ startAdornment: c,
236
+ endContent: u,
237
+ description: i,
238
+ ...S
239
+ }, C) => {
240
+ const z = Ke[s ?? "md"], I = Fe[s ?? "md"], h = ye(), p = i != null && i !== "", v = p ? "ds:group-data-[disabled]/select-item:opacity-50" : "", N = u ? (
241
+ // Radix points the item's `aria-labelledby` at `ItemText`, so
242
+ // anything rendered outside it is dropped from the accessible
243
+ // name — a price there would be visible but never announced.
244
+ // It therefore goes INSIDE `ItemText`, wrapped in a flex row so
245
+ // `ms-auto` still pins it to the inline-end (and flips in RTL).
246
+ //
247
+ // The trade-off is deliberate: Radix mirrors `ItemText` into the
248
+ // closed trigger, so the selected item's trailing content shows
249
+ // there too. For the case this exists for — a price — that reads
250
+ // as a feature, not a leak. The wrapper is rendered ONLY when
251
+ // `endContent` is supplied, so every existing item keeps its
252
+ // previous DOM exactly.
253
+ //
254
+ // `asChild` is required, not stylistic. `SelectItemText`
255
+ // destructures `className` and `style` off its props and never
256
+ // applies them, so styling it directly is silently discarded.
257
+ // It must also GROW: as a plain flex item of the row it sizes to
258
+ // its content, leaving `ms-auto` no free space to absorb, and the
259
+ // chip would sit against the label instead of the row's end —
260
+ // the ragged column this change exists to remove. `asChild` makes
261
+ // our own span become the ItemText element, so `flex-1` lands.
262
+ /* @__PURE__ */ e(a.ItemText, { asChild: !0, children: /* @__PURE__ */ l(
263
+ "span",
264
+ {
265
+ className: `ds:flex ds:flex-1 ds:min-w-0 ds:items-center ds:gap-[var(--spacing-sm)] ${v}`,
266
+ children: [
267
+ /* @__PURE__ */ e("span", { className: "ds:min-w-0 ds:truncate", children: d }),
268
+ /* @__PURE__ */ e("span", { className: "ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0", children: u })
269
+ ]
270
+ }
271
+ ) })
272
+ ) : p ? /* @__PURE__ */ e(a.ItemText, { asChild: !0, children: /* @__PURE__ */ e("span", { className: v, children: d }) }) : /* @__PURE__ */ e(a.ItemText, { children: d });
273
+ return /* @__PURE__ */ l(
274
+ a.Item,
275
+ {
276
+ ref: C,
277
+ "aria-describedby": p ? h : void 0,
278
+ className: Oe({
279
+ size: s,
280
+ className: p ? [
281
+ "ds:group/select-item ds:data-[disabled]:!opacity-100",
282
+ t
283
+ ].filter(Boolean).join(" ") : t
284
+ }),
285
+ ...S,
286
+ children: [
287
+ /* @__PURE__ */ e(
288
+ "span",
289
+ {
290
+ className: `ds:absolute ${z} ds:inline-flex ds:items-center ds:justify-center ${v}`,
291
+ "aria-hidden": "true",
292
+ children: /* @__PURE__ */ e(a.ItemIndicator, { children: /* @__PURE__ */ e(ke, { className: I }) })
293
+ }
294
+ ),
295
+ c ? (
296
+ // Decorative by contract — accessible name comes from the item text.
297
+ /* @__PURE__ */ e(
298
+ "span",
299
+ {
300
+ "aria-hidden": "true",
301
+ className: `ds:inline-flex ds:items-center ds:shrink-0 ds:me-[var(--spacing-xs)] ${v}`,
302
+ children: c
303
+ }
304
+ )
305
+ ) : null,
306
+ p ? /* @__PURE__ */ l("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:py-[var(--spacing-xs)]", children: [
307
+ N,
308
+ /* @__PURE__ */ e(
309
+ "span",
310
+ {
311
+ id: h,
312
+ className: "type-meta ds:text-muted-foreground",
313
+ children: i
314
+ }
315
+ )
316
+ ] }) : N
317
+ ]
318
+ }
319
+ );
320
+ }
321
+ );
322
+ K.displayName = "Select.Item";
323
+ const Y = r((s, t) => /* @__PURE__ */ e(a.ItemText, { ref: t, ...s }));
324
+ Y.displayName = "Select.ItemText";
325
+ const Z = r((s, t) => /* @__PURE__ */ e(a.Group, { ref: t, ...s }));
326
+ Z.displayName = "Select.Group";
327
+ const P = r(({ className: s, ...t }, d) => /* @__PURE__ */ e(
328
+ a.Label,
329
+ {
330
+ ref: d,
331
+ className: [De, s].filter(Boolean).join(" "),
332
+ ...t
333
+ }
334
+ ));
335
+ P.displayName = "Select.Label";
336
+ const ee = r(({ className: s, ...t }, d) => /* @__PURE__ */ e(
337
+ a.Separator,
338
+ {
339
+ ref: d,
340
+ className: ["ds:my-1 ds:h-px ds:bg-border", s].filter(Boolean).join(" "),
341
+ ...t
342
+ }
343
+ ));
344
+ ee.displayName = "Select.Separator";
345
+ const se = r(function({
346
+ options: t,
347
+ value: d,
348
+ defaultValue: c,
349
+ onValueChange: u,
350
+ placeholder: i,
351
+ clearable: S = !1,
352
+ disabled: C,
353
+ required: z,
354
+ name: I,
355
+ id: h,
356
+ size: p = "md",
357
+ tone: v = "default",
358
+ className: N,
359
+ container: te,
360
+ "aria-label": $,
361
+ "aria-describedby": ae,
362
+ adornmentInTrigger: de = !1,
363
+ showDescriptions: ne = !1
364
+ }, oe) {
365
+ var _;
366
+ const { t: j } = we(), b = Ce(), f = xe(ze) !== null, [ie, w] = M(
367
+ d ?? c ?? ""
368
+ ), y = d !== void 0, x = y ? d : ie, [k, T] = M(!1), A = U(x);
369
+ A.current = x;
370
+ const re = h ?? (f ? b.id : void 0), G = (f ? b.disabled : !1) || !!C, le = (f ? b.required : !1) || !!z, q = f ? b.invalid : !1, ce = q ? "error" : v, ue = [f ? b.describedBy : void 0, ae].filter(Boolean).join(" ") || void 0, L = de ? (_ = t.find((n) => n.value === x)) == null ? void 0 : _.startAdornment : void 0, V = U(null), pe = Pe(oe, V), me = Te(V), o = u, fe = (n) => {
371
+ y || w(n), o == null || o(n);
372
+ }, ge = (n) => {
373
+ var g;
374
+ n.preventDefault(), n.stopPropagation(), y || w(""), o == null || o(""), (g = V.current) == null || g.focus();
375
+ }, R = i ?? j("inputs.select.placeholder", "Select…"), he = S && !!x && !G, ve = Ie(t), be = Se(
376
+ () => ({
377
+ getValue: () => A.current,
378
+ setValue: (n) => {
379
+ const g = t.find((B) => B.value === n);
380
+ !g || g.disabled || (y || w(n), o == null || o(n));
381
+ },
382
+ clear: () => {
383
+ y || w(""), o == null || o("");
384
+ },
385
+ open: () => T(!0),
386
+ close: () => T(!1),
387
+ isOpen: () => k
388
+ }),
389
+ [o, y, k, t]
390
+ );
391
+ return Ne(Re, be, h), /* @__PURE__ */ l(
392
+ a.Root,
393
+ {
394
+ value: x === "" ? void 0 : x,
395
+ onValueChange: fe,
396
+ open: k,
397
+ onOpenChange: T,
398
+ disabled: G,
399
+ required: le,
400
+ name: I,
401
+ dir: me,
402
+ children: [
403
+ /* @__PURE__ */ l(
404
+ a.Trigger,
405
+ {
406
+ ref: pe,
407
+ id: re,
408
+ "aria-label": $ ?? (f ? void 0 : R),
409
+ "aria-labelledby": !$ && f ? `${b.id}-label` : void 0,
410
+ "aria-describedby": ue,
411
+ "aria-invalid": q || void 0,
412
+ "data-component": "select",
413
+ "data-component-id": h,
414
+ className: E({
415
+ size: p,
416
+ tone: ce,
417
+ className: N
418
+ }),
419
+ children: [
420
+ L ? /* @__PURE__ */ l("span", { className: "ds:flex ds:min-w-0 ds:items-center ds:gap-[var(--spacing-sm)]", children: [
421
+ /* @__PURE__ */ e(
422
+ "span",
423
+ {
424
+ "aria-hidden": "true",
425
+ "data-select-trigger-adornment": "",
426
+ className: "ds:inline-flex ds:shrink-0 ds:items-center",
427
+ children: L
428
+ }
429
+ ),
430
+ /* @__PURE__ */ e("span", { className: "ds:min-w-0 ds:truncate ds:text-start", children: /* @__PURE__ */ e(a.Value, { placeholder: R }) })
431
+ ] }) : /* @__PURE__ */ e("span", { className: "ds:min-w-0 ds:truncate ds:text-start", children: /* @__PURE__ */ e(a.Value, { placeholder: R }) }),
432
+ /* @__PURE__ */ l("span", { className: "ds:ms-auto ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
433
+ he ? /* @__PURE__ */ e(
434
+ "button",
435
+ {
436
+ type: "button",
437
+ "aria-label": j("inputs.select.clear", "Clear selection"),
438
+ onClick: ge,
439
+ onPointerDown: (n) => n.stopPropagation(),
440
+ onKeyDown: (n) => {
441
+ (n.key === "Enter" || n.key === " ") && n.stopPropagation();
442
+ },
443
+ className: [
444
+ "ds:inline-flex ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)]",
445
+ "ds:text-muted-foreground ds:hover:text-foreground",
446
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
447
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
448
+ "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
449
+ "ds:size-4"
450
+ ].join(" "),
451
+ children: /* @__PURE__ */ e(Ve, { "aria-hidden": "true", className: "ds:size-3.5" })
452
+ }
453
+ ) : null,
454
+ /* @__PURE__ */ e(a.Icon, { asChild: !0, children: /* @__PURE__ */ e(
455
+ W,
456
+ {
457
+ "aria-hidden": "true",
458
+ className: [
459
+ "ds:size-4 ds:shrink-0 ds:text-muted-foreground",
460
+ "ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
461
+ "ds:group-data-[state=open]:rotate-180"
462
+ ].join(" ")
463
+ }
464
+ ) })
465
+ ] })
466
+ ]
467
+ }
468
+ ),
469
+ /* @__PURE__ */ e(D, { container: te, children: /* @__PURE__ */ e(F, { children: t.length === 0 ? /* @__PURE__ */ e("div", { className: "ds:ps-8 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", children: j("inputs.select.noOptions", "No options") }) : ve.map(({ group: n, items: g }, B) => {
470
+ const H = g.map((m) => /* @__PURE__ */ e(
471
+ K,
472
+ {
473
+ value: m.value,
474
+ disabled: m.disabled,
475
+ size: p,
476
+ "data-option-id": m.value,
477
+ startAdornment: m.startAdornment,
478
+ endContent: m.endContent,
479
+ description: ne ? m.description : void 0,
480
+ children: m.label
481
+ },
482
+ m.value
483
+ ));
484
+ return n ? /* @__PURE__ */ l(a.Group, { children: [
485
+ /* @__PURE__ */ e(P, { children: n }),
486
+ H
487
+ ] }, `group-${n}`) : /* @__PURE__ */ e(a.Group, { children: H }, `group-${B}`);
488
+ }) }) })
489
+ ]
490
+ }
491
+ );
492
+ });
493
+ se.displayName = "Select";
494
+ const $e = Object.assign(se, {
495
+ Root: X,
496
+ Trigger: J,
497
+ Value: Q,
498
+ Content: D,
499
+ Viewport: F,
500
+ Item: K,
501
+ ItemText: Y,
502
+ Group: Z,
503
+ Label: P,
504
+ Separator: ee
505
+ }), Qe = $e;
506
+ export {
507
+ Qe as S,
508
+ D as a,
509
+ Z as b,
510
+ K as c,
511
+ Y as d,
512
+ P as e,
513
+ X as f,
514
+ ee as g,
515
+ J as h,
516
+ Q as i,
517
+ F as j,
518
+ E as s
519
+ };
520
+ //# sourceMappingURL=select-CLSUnKjF.js.map