@alfadocs/ui-kit-debug 1.94.0 → 1.95.1

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 (277) hide show
  1. package/dist/_chunks/{actions-cell-renderer-B1yaOfQM.js → actions-cell-renderer-BVn3vDTg.js} +3 -3
  2. package/dist/_chunks/{actions-cell-renderer-B1yaOfQM.js.map → actions-cell-renderer-BVn3vDTg.js.map} +1 -1
  3. package/dist/_chunks/{anamnesis-summary-rows-IMohuz0D.js → anamnesis-summary-rows-krsCC-F4.js} +5 -5
  4. package/dist/_chunks/{anamnesis-summary-rows-IMohuz0D.js.map → anamnesis-summary-rows-krsCC-F4.js.map} +1 -1
  5. package/dist/_chunks/{appointment-card-Bstc1p7a.js → appointment-card-Csx4544A.js} +2 -2
  6. package/dist/_chunks/{appointment-card-Bstc1p7a.js.map → appointment-card-Csx4544A.js.map} +1 -1
  7. package/dist/_chunks/{appointment-peek-C0kKqnFk.js → appointment-peek-CcDCWb-F.js} +2 -2
  8. package/dist/_chunks/{appointment-peek-C0kKqnFk.js.map → appointment-peek-CcDCWb-F.js.map} +1 -1
  9. package/dist/_chunks/{appointment-timeline-rbt9AwHO.js → appointment-timeline-DW6FN6u8.js} +3 -3
  10. package/dist/_chunks/{appointment-timeline-rbt9AwHO.js.map → appointment-timeline-DW6FN6u8.js.map} +1 -1
  11. package/dist/_chunks/{appointment-tray-6zd8RLIL.js → appointment-tray-CZfXwHWz.js} +2 -2
  12. package/dist/_chunks/{appointment-tray-6zd8RLIL.js.map → appointment-tray-CZfXwHWz.js.map} +1 -1
  13. package/dist/_chunks/{balance-badge-cell-vZxbOFgP.js → balance-badge-cell-DbgEQsou.js} +3 -3
  14. package/dist/_chunks/{balance-badge-cell-vZxbOFgP.js.map → balance-badge-cell-DbgEQsou.js.map} +1 -1
  15. package/dist/_chunks/{button-group-ZVb1Q-w4.js → button-group-CUnNnt8a.js} +2 -2
  16. package/dist/_chunks/{button-group-ZVb1Q-w4.js.map → button-group-CUnNnt8a.js.map} +1 -1
  17. package/dist/_chunks/{calendar-appointment-editor-dialog-CsVWoRcP.js → calendar-appointment-editor-dialog-D3tQ8N34.js} +12 -12
  18. package/dist/_chunks/{calendar-appointment-editor-dialog-CsVWoRcP.js.map → calendar-appointment-editor-dialog-D3tQ8N34.js.map} +1 -1
  19. package/dist/_chunks/{care-plan-card-DD9rEWYN.js → care-plan-card-YWKV8Kjq.js} +2 -2
  20. package/dist/_chunks/{care-plan-card-DD9rEWYN.js.map → care-plan-card-YWKV8Kjq.js.map} +1 -1
  21. package/dist/_chunks/{care-plan-entry-card-4VaY2c96.js → care-plan-entry-card-CApivtMW.js} +2 -2
  22. package/dist/_chunks/{care-plan-entry-card-4VaY2c96.js.map → care-plan-entry-card-CApivtMW.js.map} +1 -1
  23. package/dist/_chunks/{care-plan-header-CXUJQt8Q.js → care-plan-header-BBh0X7EO.js} +2 -2
  24. package/dist/_chunks/{care-plan-header-CXUJQt8Q.js.map → care-plan-header-BBh0X7EO.js.map} +1 -1
  25. package/dist/_chunks/chart-bddVIElM.js +1550 -0
  26. package/dist/_chunks/chart-bddVIElM.js.map +1 -0
  27. package/dist/_chunks/{dashboard-grid-DwJ_HV3d.js → dashboard-grid-DrOkTtya.js} +2 -2
  28. package/dist/_chunks/{dashboard-grid-DwJ_HV3d.js.map → dashboard-grid-DrOkTtya.js.map} +1 -1
  29. package/dist/_chunks/{data-table-C_nnpJ-Q.js → data-table-Bh9_IEj4.js} +3 -3
  30. package/dist/_chunks/{data-table-C_nnpJ-Q.js.map → data-table-Bh9_IEj4.js.map} +1 -1
  31. package/dist/_chunks/{date-time-picker-n-yrlMJq.js → date-time-picker-cwsWiB4q.js} +2 -2
  32. package/dist/_chunks/{date-time-picker-n-yrlMJq.js.map → date-time-picker-cwsWiB4q.js.map} +1 -1
  33. package/dist/_chunks/{document-preview-ytR1FcWA.js → document-preview-CL1xsnLS.js} +2 -2
  34. package/dist/_chunks/{document-preview-ytR1FcWA.js.map → document-preview-CL1xsnLS.js.map} +1 -1
  35. package/dist/_chunks/{dropdown-menu-D1we7oAY.js → dropdown-menu-CqxBthww.js} +2 -2
  36. package/dist/_chunks/{dropdown-menu-D1we7oAY.js.map → dropdown-menu-CqxBthww.js.map} +1 -1
  37. package/dist/_chunks/{editable-currency-cell-renderer-rWYiF4EI.js → editable-currency-cell-renderer-BQYL5GjP.js} +2 -2
  38. package/dist/_chunks/{editable-currency-cell-renderer-rWYiF4EI.js.map → editable-currency-cell-renderer-BQYL5GjP.js.map} +1 -1
  39. package/dist/_chunks/{face-scheme-BKSE98bo.js → face-scheme-DyHc3zPt.js} +4 -4
  40. package/dist/_chunks/{face-scheme-BKSE98bo.js.map → face-scheme-DyHc3zPt.js.map} +1 -1
  41. package/dist/_chunks/{file-manager-CAIbuaSs.js → file-manager-Cgf2yc10.js} +4 -4
  42. package/dist/_chunks/{file-manager-CAIbuaSs.js.map → file-manager-Cgf2yc10.js.map} +1 -1
  43. package/dist/_chunks/{hcg-doubling-K41Wy7LB.js → hcg-doubling-DQe1ptNB.js} +2 -2
  44. package/dist/_chunks/{hcg-doubling-K41Wy7LB.js.map → hcg-doubling-DQe1ptNB.js.map} +1 -1
  45. package/dist/_chunks/{header-settings-BeA2fnol.js → header-settings-DittkpqU.js} +2 -2
  46. package/dist/_chunks/{header-settings-BeA2fnol.js.map → header-settings-DittkpqU.js.map} +1 -1
  47. package/dist/_chunks/{heatmap-DdF8qTTV.js → heatmap-9Ql8Ny9d.js} +2 -2
  48. package/dist/_chunks/{heatmap-DdF8qTTV.js.map → heatmap-9Ql8Ny9d.js.map} +1 -1
  49. package/dist/_chunks/{icon-button-group-CRKFR48b.js → icon-button-group-mXvYDaba.js} +2 -2
  50. package/dist/_chunks/{icon-button-group-CRKFR48b.js.map → icon-button-group-mXvYDaba.js.map} +1 -1
  51. package/dist/_chunks/{marketplace-app-shell-CJQtx3sv.js → marketplace-app-shell-C8nHixB8.js} +4 -4
  52. package/dist/_chunks/{marketplace-app-shell-CJQtx3sv.js.map → marketplace-app-shell-C8nHixB8.js.map} +1 -1
  53. package/dist/_chunks/{message-tray-Cllf-v0G.js → message-tray-18_TrLCy.js} +2 -2
  54. package/dist/_chunks/{message-tray-Cllf-v0G.js.map → message-tray-18_TrLCy.js.map} +1 -1
  55. package/dist/_chunks/{muscle-scheme-B7qMW0ho.js → muscle-scheme-CznhrQlo.js} +2 -2
  56. package/dist/_chunks/{muscle-scheme-B7qMW0ho.js.map → muscle-scheme-CznhrQlo.js.map} +1 -1
  57. package/dist/_chunks/{notes-panel-ib7I3aNf.js → notes-panel-D6YhNGHU.js} +2 -2
  58. package/dist/_chunks/{notes-panel-ib7I3aNf.js.map → notes-panel-D6YhNGHU.js.map} +1 -1
  59. package/dist/_chunks/{notification-tray-0OkA2duS.js → notification-tray-CQK3lw87.js} +2 -2
  60. package/dist/_chunks/{notification-tray-0OkA2duS.js.map → notification-tray-CQK3lw87.js.map} +1 -1
  61. package/dist/_chunks/{patient-details-DTlpBYHJ.js → patient-details-DQQpgx4A.js} +2 -2
  62. package/dist/_chunks/{patient-details-DTlpBYHJ.js.map → patient-details-DQQpgx4A.js.map} +1 -1
  63. package/dist/_chunks/{patient-field-row-DWTKV1hF.js → patient-field-row-Cb5jUd5Q.js} +2 -2
  64. package/dist/_chunks/{patient-field-row-DWTKV1hF.js.map → patient-field-row-Cb5jUd5Q.js.map} +1 -1
  65. package/dist/_chunks/{patient-search-Ca9j5cWb.js → patient-search-Cp2efqHs.js} +2 -2
  66. package/dist/_chunks/{patient-search-Ca9j5cWb.js.map → patient-search-Cp2efqHs.js.map} +1 -1
  67. package/dist/_chunks/{patient-summary-card-C61AR4Tn.js → patient-summary-card-BvMI0eMu.js} +2 -2
  68. package/dist/_chunks/{patient-summary-card-C61AR4Tn.js.map → patient-summary-card-BvMI0eMu.js.map} +1 -1
  69. package/dist/_chunks/{practice-results-BWX9y6mS.js → practice-results-ZOVlrb43.js} +3 -3
  70. package/dist/_chunks/practice-results-ZOVlrb43.js.map +1 -0
  71. package/dist/_chunks/{product-hub-panel-bHi7lkVD.js → product-hub-panel-CqRJlmb7.js} +2 -2
  72. package/dist/_chunks/{product-hub-panel-bHi7lkVD.js.map → product-hub-panel-CqRJlmb7.js.map} +1 -1
  73. package/dist/_chunks/{public-footer-IoRWoAMz.js → public-footer-BiPiU_lk.js} +2 -2
  74. package/dist/_chunks/{public-footer-IoRWoAMz.js.map → public-footer-BiPiU_lk.js.map} +1 -1
  75. package/dist/_chunks/{reserved.agent-XU88crNW.js → reserved.agent-BvwjDyne.js} +2 -2
  76. package/dist/_chunks/{reserved.agent-XU88crNW.js.map → reserved.agent-BvwjDyne.js.map} +1 -1
  77. package/dist/_chunks/{rich-text-editor-BfEu57dk.js → rich-text-editor-iw2tJLKA.js} +2 -2
  78. package/dist/_chunks/{rich-text-editor-BfEu57dk.js.map → rich-text-editor-iw2tJLKA.js.map} +1 -1
  79. package/dist/_chunks/{separator-CYU_bGFn.js → separator-Bdc9bqoJ.js} +18 -19
  80. package/dist/_chunks/separator-Bdc9bqoJ.js.map +1 -0
  81. package/dist/_chunks/{signature-request-BVGeF0qB.js → signature-request-CLtMgQKi.js} +3 -3
  82. package/dist/_chunks/{signature-request-BVGeF0qB.js.map → signature-request-CLtMgQKi.js.map} +1 -1
  83. package/dist/_chunks/{signed-out-frame-CgRXOUzi.js → signed-out-frame-CRwVTCjY.js} +2 -2
  84. package/dist/_chunks/{signed-out-frame-CgRXOUzi.js.map → signed-out-frame-CRwVTCjY.js.map} +1 -1
  85. package/dist/_chunks/{slot-grid-B-IAFX3C.js → slot-grid-BhjaLJ0o.js} +229 -214
  86. package/dist/_chunks/{slot-grid-B-IAFX3C.js.map → slot-grid-BhjaLJ0o.js.map} +1 -1
  87. package/dist/_chunks/{tab-bar-BEODTG6k.js → tab-bar-C_pggqVr.js} +2 -2
  88. package/dist/_chunks/{tab-bar-BEODTG6k.js.map → tab-bar-C_pggqVr.js.map} +1 -1
  89. package/dist/_chunks/{tabs-BmxQu-TJ.js → tabs-DYHgRVSJ.js} +2 -2
  90. package/dist/_chunks/{tabs-BmxQu-TJ.js.map → tabs-DYHgRVSJ.js.map} +1 -1
  91. package/dist/_chunks/{task-editor-BZeSBxwU.js → task-editor-BlGdXR9F.js} +3 -3
  92. package/dist/_chunks/{task-editor-BZeSBxwU.js.map → task-editor-BlGdXR9F.js.map} +1 -1
  93. package/dist/_chunks/{tasks-panel-BTCYGLGA.js → tasks-panel-Q0CiEAff.js} +2 -2
  94. package/dist/_chunks/{tasks-panel-BTCYGLGA.js.map → tasks-panel-Q0CiEAff.js.map} +1 -1
  95. package/dist/_chunks/{theme-toggle-DKpzb0-M.js → theme-toggle-jZRbAidE.js} +3 -3
  96. package/dist/_chunks/{theme-toggle-DKpzb0-M.js.map → theme-toggle-jZRbAidE.js.map} +1 -1
  97. package/dist/_chunks/time-picker-DSt-ns5F.js +914 -0
  98. package/dist/_chunks/time-picker-DSt-ns5F.js.map +1 -0
  99. package/dist/_chunks/{token-insert-menu-DtAnBd0x.js → token-insert-menu-Dl3x2ekR.js} +2 -2
  100. package/dist/_chunks/{token-insert-menu-DtAnBd0x.js.map → token-insert-menu-Dl3x2ekR.js.map} +1 -1
  101. package/dist/_chunks/{tooth-scheme-COJJkdsi.js → tooth-scheme-Bd7xECuj.js} +2 -2
  102. package/dist/_chunks/{tooth-scheme-COJJkdsi.js.map → tooth-scheme-Bd7xECuj.js.map} +1 -1
  103. package/dist/_chunks/{use-appointment-details-read-B6uhmNdV.js → use-appointment-details-read-CpXRSfPI.js} +5 -5
  104. package/dist/_chunks/{use-appointment-details-read-B6uhmNdV.js.map → use-appointment-details-read-CpXRSfPI.js.map} +1 -1
  105. package/dist/_chunks/{workflow-map-BcfOwsSB.js → workflow-map-BWJhlZbC.js} +2 -2
  106. package/dist/_chunks/{workflow-map-BcfOwsSB.js.map → workflow-map-BWJhlZbC.js.map} +1 -1
  107. package/dist/_chunks/{workflow-status-Dc_CyEz5.js → workflow-status-HQ6ziE46.js} +2 -2
  108. package/dist/_chunks/{workflow-status-Dc_CyEz5.js.map → workflow-status-HQ6ziE46.js.map} +1 -1
  109. package/dist/_chunks/{workflow-webhook-action-B_nBJ_ht.js → workflow-webhook-action-Uhyfr6_6.js} +2 -2
  110. package/dist/_chunks/{workflow-webhook-action-B_nBJ_ht.js.map → workflow-webhook-action-Uhyfr6_6.js.map} +1 -1
  111. package/dist/agent-catalog.json +12 -4
  112. package/dist/agent-i18n/en.json +2 -2
  113. package/dist/apexcharts.css +4 -1
  114. package/dist/components/appointment-card/index.js +2 -2
  115. package/dist/components/appointment-details-panel/index.js +1 -1
  116. package/dist/components/appointment-peek/index.js +1 -1
  117. package/dist/components/appointment-timeline/index.js +1 -1
  118. package/dist/components/booking/index.js +1 -1
  119. package/dist/components/button-group/index.js +1 -1
  120. package/dist/components/care-plan-card/index.js +1 -1
  121. package/dist/components/care-plan-entry-card/index.js +1 -1
  122. package/dist/components/care-plan-header/index.js +1 -1
  123. package/dist/components/chart/chart-axis-scale.d.ts +21 -0
  124. package/dist/components/chart/chart-axis-scale.d.ts.map +1 -0
  125. package/dist/components/chart/chart.agent.d.ts.map +1 -1
  126. package/dist/components/chart/chart.d.ts +55 -0
  127. package/dist/components/chart/chart.d.ts.map +1 -1
  128. package/dist/components/chart/index.d.ts +1 -1
  129. package/dist/components/chart/index.d.ts.map +1 -1
  130. package/dist/components/chart/index.js +1 -1
  131. package/dist/components/dashboard-grid/index.js +1 -1
  132. package/dist/components/data-table/index.js +3 -3
  133. package/dist/components/date-time-picker/index.js +1 -1
  134. package/dist/components/document-preview/index.js +1 -1
  135. package/dist/components/dropdown-menu/index.js +1 -1
  136. package/dist/components/face-scheme/index.js +1 -1
  137. package/dist/components/file-manager/index.js +1 -1
  138. package/dist/components/hcg-doubling/index.js +1 -1
  139. package/dist/components/header-settings/index.js +1 -1
  140. package/dist/components/heatmap/index.js +1 -1
  141. package/dist/components/icon-button-group/index.js +1 -1
  142. package/dist/components/message-tray/index.js +1 -1
  143. package/dist/components/muscle-scheme/index.js +1 -1
  144. package/dist/components/notes-panel/index.js +1 -1
  145. package/dist/components/notification-tray/index.js +1 -1
  146. package/dist/components/patient-details/index.js +1 -1
  147. package/dist/components/patient-search/index.js +1 -1
  148. package/dist/components/patient-summary-card/index.js +1 -1
  149. package/dist/components/patient-table/index.js +1 -1
  150. package/dist/components/practice-results/index.js +1 -1
  151. package/dist/components/product-hub-tray/index.js +1 -1
  152. package/dist/components/public-footer/index.js +1 -1
  153. package/dist/components/rich-text-editor/index.js +1 -1
  154. package/dist/components/separator/index.js +1 -1
  155. package/dist/components/separator/separator.d.ts.map +1 -1
  156. package/dist/components/skeleton-scheme/index.js +1 -1
  157. package/dist/components/slot-grid/index.js +1 -1
  158. package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
  159. package/dist/components/tab-bar/index.js +1 -1
  160. package/dist/components/tabs/index.js +1 -1
  161. package/dist/components/task-editor/index.js +1 -1
  162. package/dist/components/tasks-panel/index.js +1 -1
  163. package/dist/components/theme-toggle/index.js +1 -1
  164. package/dist/components/time-picker/index.js +1 -1
  165. package/dist/components/time-picker/time-picker.d.ts +15 -8
  166. package/dist/components/time-picker/time-picker.d.ts.map +1 -1
  167. package/dist/components/token-insert-menu/index.js +1 -1
  168. package/dist/components/tooth-scheme/index.js +1 -1
  169. package/dist/components/workflow/index.js +1 -1
  170. package/dist/components/workflow-status/index.js +1 -1
  171. package/dist/core.css +1 -1
  172. package/dist/host-compat.css +4 -1
  173. package/dist/i18n/locales/ar.d.ts +4 -1
  174. package/dist/i18n/locales/ar.d.ts.map +1 -1
  175. package/dist/i18n/locales/ar.js +6 -3
  176. package/dist/i18n/locales/ar.js.map +1 -1
  177. package/dist/i18n/locales/de.d.ts +5 -2
  178. package/dist/i18n/locales/de.d.ts.map +1 -1
  179. package/dist/i18n/locales/de.js +7 -4
  180. package/dist/i18n/locales/de.js.map +1 -1
  181. package/dist/i18n/locales/el.d.ts +5 -2
  182. package/dist/i18n/locales/el.d.ts.map +1 -1
  183. package/dist/i18n/locales/el.js +7 -4
  184. package/dist/i18n/locales/el.js.map +1 -1
  185. package/dist/i18n/locales/en.d.ts +5 -2
  186. package/dist/i18n/locales/en.d.ts.map +1 -1
  187. package/dist/i18n/locales/en.js +6 -3
  188. package/dist/i18n/locales/en.js.map +1 -1
  189. package/dist/i18n/locales/es.d.ts +5 -2
  190. package/dist/i18n/locales/es.d.ts.map +1 -1
  191. package/dist/i18n/locales/es.js +7 -4
  192. package/dist/i18n/locales/es.js.map +1 -1
  193. package/dist/i18n/locales/fr.d.ts +4 -1
  194. package/dist/i18n/locales/fr.d.ts.map +1 -1
  195. package/dist/i18n/locales/fr.js +6 -3
  196. package/dist/i18n/locales/fr.js.map +1 -1
  197. package/dist/i18n/locales/hi.d.ts +5 -2
  198. package/dist/i18n/locales/hi.d.ts.map +1 -1
  199. package/dist/i18n/locales/hi.js +7 -4
  200. package/dist/i18n/locales/hi.js.map +1 -1
  201. package/dist/i18n/locales/it.d.ts +5 -2
  202. package/dist/i18n/locales/it.d.ts.map +1 -1
  203. package/dist/i18n/locales/it.js +7 -4
  204. package/dist/i18n/locales/it.js.map +1 -1
  205. package/dist/i18n/locales/ja.d.ts +5 -2
  206. package/dist/i18n/locales/ja.d.ts.map +1 -1
  207. package/dist/i18n/locales/ja.js +7 -4
  208. package/dist/i18n/locales/ja.js.map +1 -1
  209. package/dist/i18n/locales/nl.d.ts +5 -2
  210. package/dist/i18n/locales/nl.d.ts.map +1 -1
  211. package/dist/i18n/locales/nl.js +7 -4
  212. package/dist/i18n/locales/nl.js.map +1 -1
  213. package/dist/i18n/locales/pl.d.ts +5 -2
  214. package/dist/i18n/locales/pl.d.ts.map +1 -1
  215. package/dist/i18n/locales/pl.js +7 -4
  216. package/dist/i18n/locales/pl.js.map +1 -1
  217. package/dist/i18n/locales/pt.d.ts +4 -1
  218. package/dist/i18n/locales/pt.d.ts.map +1 -1
  219. package/dist/i18n/locales/pt.js +6 -3
  220. package/dist/i18n/locales/pt.js.map +1 -1
  221. package/dist/i18n/locales/ro.d.ts +5 -2
  222. package/dist/i18n/locales/ro.d.ts.map +1 -1
  223. package/dist/i18n/locales/ro.js +7 -4
  224. package/dist/i18n/locales/ro.js.map +1 -1
  225. package/dist/i18n/locales/ru.d.ts +5 -2
  226. package/dist/i18n/locales/ru.d.ts.map +1 -1
  227. package/dist/i18n/locales/ru.js +7 -4
  228. package/dist/i18n/locales/ru.js.map +1 -1
  229. package/dist/i18n/locales/sq.d.ts +5 -2
  230. package/dist/i18n/locales/sq.d.ts.map +1 -1
  231. package/dist/i18n/locales/sq.js +7 -4
  232. package/dist/i18n/locales/sq.js.map +1 -1
  233. package/dist/i18n/locales/sv.d.ts +5 -2
  234. package/dist/i18n/locales/sv.d.ts.map +1 -1
  235. package/dist/i18n/locales/sv.js +7 -4
  236. package/dist/i18n/locales/sv.js.map +1 -1
  237. package/dist/i18n/locales/tr.d.ts +5 -2
  238. package/dist/i18n/locales/tr.d.ts.map +1 -1
  239. package/dist/i18n/locales/tr.js +7 -4
  240. package/dist/i18n/locales/tr.js.map +1 -1
  241. package/dist/i18n/locales/zh.d.ts +5 -2
  242. package/dist/i18n/locales/zh.d.ts.map +1 -1
  243. package/dist/i18n/locales/zh.js +7 -4
  244. package/dist/i18n/locales/zh.js.map +1 -1
  245. package/dist/index.js +53 -53
  246. package/dist/locales/ar.json +6 -3
  247. package/dist/locales/de.json +7 -4
  248. package/dist/locales/el.json +7 -4
  249. package/dist/locales/en.json +6 -3
  250. package/dist/locales/es.json +7 -4
  251. package/dist/locales/fr.json +6 -3
  252. package/dist/locales/hi.json +7 -4
  253. package/dist/locales/it.json +7 -4
  254. package/dist/locales/ja.json +7 -4
  255. package/dist/locales/nl.json +7 -4
  256. package/dist/locales/pl.json +7 -4
  257. package/dist/locales/pt.json +6 -3
  258. package/dist/locales/ro.json +7 -4
  259. package/dist/locales/ru.json +7 -4
  260. package/dist/locales/sq.json +7 -4
  261. package/dist/locales/sv.json +7 -4
  262. package/dist/locales/tr.json +7 -4
  263. package/dist/locales/zh.json +7 -4
  264. package/dist/patterns/anamnesis/index.js +1 -1
  265. package/dist/patterns/calendar/index.js +1 -1
  266. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  267. package/dist/patterns/signature-request/index.js +1 -1
  268. package/dist/patterns/signed-out-frame/index.js +1 -1
  269. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  270. package/dist/tokens.css +4 -1
  271. package/package.json +1 -1
  272. package/dist/_chunks/chart-D4huJSru.js +0 -1340
  273. package/dist/_chunks/chart-D4huJSru.js.map +0 -1
  274. package/dist/_chunks/practice-results-BWX9y6mS.js.map +0 -1
  275. package/dist/_chunks/separator-CYU_bGFn.js.map +0 -1
  276. package/dist/_chunks/time-picker-DVfyAR81.js +0 -871
  277. package/dist/_chunks/time-picker-DVfyAR81.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-picker-DSt-ns5F.js","sources":["../../src/components/time-picker/time-picker.agent.ts","../../src/components/time-picker/time-picker.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — TimePicker. */\n/* */\n/* TimePicker is a segmented time input. With the `dropdown` prop it also */\n/* has a list to pick from (hour, minute and AM/PM columns), which */\n/* `open` / `close` drive. Without `dropdown` there is no list and they */\n/* resolve to no-ops on the curated handle (kept for shape parity with */\n/* the other pickers, see PRS §26 §15 on curated handles). */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` §15. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { TimePickerHandle } from './time-picker';\n\nexport const timePickerAgent: AgentAdapter<TimePickerHandle> = {\n id: 'time-picker',\n capabilities: ['select_single', 'set_value', 'open', 'close'],\n state: {\n value: {\n type: 'HH:MM | null',\n descriptionKey: 'ui.agent.timePicker.state.value',\n description:\n 'Currently selected time as 24h HH:MM. Null when unset with allowEmpty; otherwise defaults to 00:00.',\n read: (handle) => {\n const value = handle.getValue();\n if (!value) return null;\n const hh = String(value.hours).padStart(2, '0');\n const mm = String(value.minutes).padStart(2, '0');\n return `${hh}:${mm}`;\n },\n },\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.timePicker.state.isOpen',\n description:\n 'Whether the time dropdown is open. Always false unless the picker has the dropdown prop.',\n read: (handle) => handle.isOpen(),\n },\n },\n actions: {\n set_time: {\n safety: 'write',\n argsType: '{ time: string }',\n argsSchema: {\n type: 'object',\n properties: {\n time: { type: 'string', pattern: '^([01][0-9]|2[0-3]):[0-5][0-9]$' },\n },\n required: ['time'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.timePicker.actions.setTime',\n description: 'Set the time using a 24h HH:MM string.',\n examples: [{ args: { time: '14:30' }, note: '2:30 PM in 24h form.' }],\n invoke: (handle, args: { time: string }) => {\n const [hStr, mStr] = args.time.split(':');\n handle.setValue({\n hours: Number.parseInt(hStr ?? '0', 10),\n minutes: Number.parseInt(mStr ?? '0', 10),\n });\n },\n },\n clear: {\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.timePicker.actions.clear',\n description: 'Clear to null with allowEmpty; otherwise reset to 00:00.',\n invoke: (handle) => {\n handle.clear();\n },\n },\n open: {\n safety: 'read',\n descriptionKey: 'ui.agent.timePicker.actions.open',\n description:\n 'Open the time dropdown without moving focus. A no-op unless the picker has the dropdown prop and is enabled.',\n invoke: (handle) => {\n handle.open();\n },\n },\n close: {\n safety: 'read',\n descriptionKey: 'ui.agent.timePicker.actions.close',\n description:\n 'Close the time dropdown. A no-op unless the picker has the dropdown prop.',\n invoke: (handle) => {\n handle.close();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'time-picker',\n description: 'Marks the TimePicker wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type KeyboardEvent,\n type MouseEvent,\n type MutableRefObject,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport * as Popover from '@radix-ui/react-popover';\nimport { Clock, X } from 'lucide-react';\nimport {\n FormFieldContext,\n useFormField,\n useFormFieldControlId,\n} from '../form-field/form-field-context';\nimport type { TimeValue } from '../_shared/time';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { useAgentRegistration } from '../../agent';\nimport { timePickerAgent } from './time-picker.agent';\n\n/* -------------------------------------------------------------------------- */\n/* Imperative handle */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Curated imperative handle, registered with the agent registry and consumed\n * by the agent adapter. (The forwarded `ref` is the root element.)\n */\nexport interface TimePickerHandle {\n /** Get the current time value, or null when unset. */\n getValue: () => TimeValue | null;\n /** Set the time value. Hours are kept within 0–23 and minutes within 0–59. */\n setValue: (value: TimeValue) => void;\n /** Clear to null with allowEmpty; otherwise reset to 00:00. */\n clear: () => void;\n /** Whether the time dropdown is open. Always false unless `dropdown` is on. */\n isOpen: () => boolean;\n /** Open the time dropdown without moving focus. A no-op unless `dropdown` is on and the picker is enabled. */\n open: () => void;\n /** Close the time dropdown. A no-op unless `dropdown` is on. */\n close: () => void;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------------- */\n\n/** Detect 12h vs 24h from the browser locale. */\nfunction detectHour12(locale: string): boolean {\n try {\n const resolved = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n }).resolvedOptions();\n return resolved.hourCycle === 'h12' || resolved.hourCycle === 'h11';\n } catch {\n return false;\n }\n}\n\n/** Get localised AM/PM labels via Intl. */\nfunction getLocalePeriodLabels(locale: string): { am: string; pm: string } {\n try {\n const am =\n new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n hour12: true,\n })\n .formatToParts(new Date(2000, 0, 1, 9))\n .find((p) => p.type === 'dayPeriod')?.value ?? 'AM';\n\n const pm =\n new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n hour12: true,\n })\n .formatToParts(new Date(2000, 0, 1, 15))\n .find((p) => p.type === 'dayPeriod')?.value ?? 'PM';\n\n return { am, pm };\n } catch {\n return { am: 'AM', pm: 'PM' };\n }\n}\n\n/** Clamp a number between min and max. */\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, value));\n}\n\n/** The last minute of the hour on the step grid: 55 for step 5, 30 for step 30. */\nfunction lastMinuteOnGrid(step: number): number {\n return Math.floor(59 / step) * step;\n}\n\n/**\n * Snap a typed minute to the nearest step. Never past the last grid value of\n * the hour: 58 with step 5 is 55, not 60, which a consumer setting minutes on\n * a Date would roll into the next hour (or day, from 23:58).\n */\nfunction snapMinuteToStep(value: number, step: number): number {\n const rounded = Math.round(clamp(value, 0, 59) / step) * step;\n return clamp(rounded, 0, lastMinuteOnGrid(step));\n}\n\n/** The next or previous minute on the step grid, wrapping within the hour. An off-grid value moves to its neighbouring grid value. */\nfunction stepMinute(value: number, step: number, direction: 1 | -1): number {\n const last = lastMinuteOnGrid(step);\n if (direction === 1) {\n const next = Math.floor(value / step) * step + step;\n return next > last ? 0 : next;\n }\n const previous = Math.ceil(value / step) * step - step;\n return previous < 0 ? last : previous;\n}\n\n/** Keep a value from outside (handle, agent) within 00:00–23:59. */\nfunction normaliseTime(value: TimeValue): TimeValue {\n const whole = (n: number) => (Number.isFinite(n) ? Math.trunc(n) : 0);\n return {\n hours: clamp(whole(value.hours), 0, 23),\n minutes: clamp(whole(value.minutes), 0, 59),\n };\n}\n\n/** Convert 24h hour to 12h display hour. */\nfunction to12Hour(h24: number): number {\n if (h24 === 0) return 12;\n if (h24 > 12) return h24 - 12;\n return h24;\n}\n\n/** Convert 12h display hour + period to 24h hour. */\nfunction to24Hour(h12: number, isPM: boolean): number {\n if (isPM) return h12 === 12 ? 12 : h12 + 12;\n return h12 === 12 ? 0 : h12;\n}\n\nconst pad2 = (n: number): string => String(n).padStart(2, '0');\n\n/** See `contentCallbackRef`: keeps a host scroll lock from cancelling the event. */\nfunction stopScrollLockPropagation(event: Event): void {\n event.stopPropagation();\n}\n\n/* -------------------------------------------------------------------------- */\n/* CVA variants */\n/* -------------------------------------------------------------------------- */\n\nconst wrapperVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--control-border)] ds:bg-background',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-within:outline-[length:var(--focus-ring-width)] ds:focus-within:outline-solid',\n 'ds:focus-within:outline-ring ds:focus-within:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-within:outline-[CanvasText]',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:h-8 ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:text-[length:var(--font-size-sm)]',\n md: 'ds:h-[var(--min-target-size)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-base)]',\n lg: 'ds:h-12 ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-lg)]',\n },\n tone: {\n default: 'ds:border-[color:var(--control-border)]',\n error: 'ds:border-destructive',\n },\n isDisabled: {\n true: 'ds:cursor-not-allowed ds:opacity-50',\n false: '',\n },\n /** `dropdown` on and enabled: a click anywhere on the field opens the list. */\n opensOnClick: {\n true: 'ds:cursor-pointer',\n false: '',\n },\n },\n defaultVariants: {\n size: 'md',\n tone: 'default',\n isDisabled: false,\n opensOnClick: false,\n },\n },\n);\n\nconst segmentVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:rounded-[var(--radius-sm)] ds:text-center ds:tabular-nums',\n 'ds:bg-transparent ds:text-foreground',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:select-none',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:min-w-6 ds:h-6 ds:text-[length:var(--font-size-sm)]',\n md: 'ds:min-w-8 ds:h-8 ds:text-[length:var(--font-size-base)]',\n lg: 'ds:min-w-10 ds:h-10 ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst periodButtonVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:rounded-[var(--radius-sm)] ds:text-center',\n 'ds:bg-transparent ds:text-foreground ds:cursor-pointer',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:select-none',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:hover:bg-muted',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:min-w-8 ds:h-6 ds:text-[length:var(--font-size-sm)] ds:ps-1 ds:pe-1',\n md: 'ds:min-w-10 ds:h-8 ds:text-[length:var(--font-size-base)] ds:ps-1.5 ds:pe-1.5',\n lg: 'ds:min-w-12 ds:h-10 ds:text-[length:var(--font-size-lg)] ds:ps-2 ds:pe-2',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst separatorVariants = cva('ds:text-muted-foreground ds:select-none', {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-sm)]',\n md: 'ds:text-[length:var(--font-size-base)]',\n lg: 'ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: { size: 'md' },\n});\n\n/**\n * The clock button: flush with the field's inline-end edge (the negative\n * margin cancels the wrapper's end padding) and stretched to its inner\n * height. The `before:` hit area reaches over the field's 1px border, so\n * the target is the field's full height: 44px in `md`, 48px accessible.\n */\nconst clockButtonVariants = cva(\n [\n 'ds:relative ds:inline-flex ds:shrink-0 ds:self-stretch ds:items-center ds:justify-center',\n 'ds:before:absolute ds:before:inset-x-0 ds:before:-inset-y-px',\n 'ds:bg-transparent ds:text-muted-foreground ds:cursor-pointer',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:hover:bg-muted ds:hover:text-foreground',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring',\n 'ds:focus-visible:[outline-offset:calc(var(--focus-ring-width)*-1)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n 'ds:disabled:cursor-not-allowed ds:disabled:hover:bg-transparent',\n ].join(' '),\n {\n variants: {\n // Only the button that ends the field rounds its inline-end corner.\n trailing: { true: 'ds:rounded-e-[var(--radius-sm)]', false: '' },\n size: {\n sm: 'ds:min-w-8 ds:[&_svg]:size-4',\n md: 'ds:min-w-[var(--min-target-size)] ds:[&_svg]:size-4',\n lg: 'ds:min-w-12 ds:[&_svg]:size-5',\n },\n },\n defaultVariants: { size: 'md', trailing: true },\n compoundVariants: [\n { size: 'sm', trailing: true, className: 'ds:-me-[var(--spacing-sm)]' },\n {\n size: ['md', 'lg'],\n trailing: true,\n className: 'ds:-me-[var(--spacing-md)]',\n },\n ],\n },\n);\n\n/**\n * The dropdown panel. `--time-picker-option-size` is one option's block size:\n * 2rem for `sm` and 3rem for `lg` (the field heights), `--min-target-size`\n * for `md`, so it grows to 48px under `.theme-accessible`.\n */\nconst dropdownContentVariants = cva(\n [\n 'ds:z-[var(--z-popover)] ds:flex ds:rounded-[var(--radius-md)]',\n 'ds:border ds:border-border ds:bg-background ds:text-foreground ds:shadow-[var(--shadow-lg)]',\n 'ds:p-[var(--spacing-xs)]',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:[--time-picker-option-size:var(--spacing-xl)] ds:text-[length:var(--font-size-sm)]',\n md: 'ds:[--time-picker-option-size:var(--min-target-size)] ds:text-[length:var(--font-size-base)]',\n lg: 'ds:[--time-picker-option-size:var(--spacing-2xl)] ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\n/** One column: six and a half options tall, so a part-visible option at the edge shows it scrolls. */\nconst columnVariants = cva(\n [\n 'ds:relative ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]',\n 'ds:max-h-[calc(var(--time-picker-option-size)*6.5)] ds:overflow-y-auto ds:overscroll-contain',\n 'ds:p-[var(--spacing-2xs)]',\n ].join(' '),\n {\n variants: {\n separated: {\n true: 'ds:border-s ds:border-border',\n false: '',\n },\n },\n defaultVariants: { separated: false },\n },\n);\n\nconst optionVariants = cva(\n [\n 'ds:flex ds:shrink-0 ds:items-center ds:justify-center',\n 'ds:h-[var(--time-picker-option-size)] ds:min-w-[var(--time-picker-option-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)] ds:tabular-nums ds:whitespace-nowrap',\n 'ds:cursor-pointer ds:select-none',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n // Inset ring: the column scrolls, so an outset ring would be clipped.\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:[outline-offset:calc(var(--focus-ring-width)*-1)]',\n ].join(' '),\n {\n variants: {\n // The kit's selected treatment (the calendar's selected day): solid\n // primary. Paired with aria-selected, so not colour alone.\n selected: {\n true: [\n 'ds:bg-primary ds:text-primary-foreground ds:font-semibold ds:hover:bg-primary-hover',\n 'ds:focus-visible:outline-primary-foreground',\n 'ds:forced-colors:bg-[Highlight] ds:forced-colors:text-[HighlightText]',\n // CanvasText can sit close to Highlight in some contrast themes.\n 'ds:forced-colors:focus-visible:outline-[HighlightText]',\n ].join(' '),\n false: [\n 'ds:text-foreground ds:hover:bg-muted ds:focus-visible:outline-ring',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n ].join(' '),\n },\n },\n defaultVariants: { selected: false },\n },\n);\n\n/* -------------------------------------------------------------------------- */\n/* Props */\n/* -------------------------------------------------------------------------- */\n\ntype MinuteStep = 1 | 5 | 10 | 15 | 30;\n\ninterface TimePickerBaseProps extends Pick<\n VariantProps<typeof wrapperVariants>,\n 'size'\n> {\n /** Force 12h/24h mode. Defaults to locale detection. */\n hour12?: boolean;\n /** Minute increment step. */\n minuteStep?: MinuteStep;\n /** Use full-width colon separator for CJK apps. */\n fullWidthSeparator?: boolean;\n /** Custom AM/PM labels. */\n periodLabels?: { am: string; pm: string };\n /** Component size. */\n size?: 'sm' | 'md' | 'lg';\n /**\n * Adds a list to pick the time from: a clock button at the field's end,\n * and a click anywhere on the field opens a panel with an hour column, a\n * minute column (in `minuteStep` steps) and, in 12h mode, an AM/PM column.\n * Typing still works while it is open. For pointer and touch-first forms\n * such as business hours. Off by default: the typed field is unchanged.\n */\n dropdown?: boolean;\n /** Whether the input is disabled. */\n disabled?: boolean;\n /** Additional class names. */\n className?: string;\n /** id override. */\n id?: string;\n /**\n * Accessible name for the time group when it is NOT in a `FormField`, or\n * to override the field's label (two pickers in one field, say). Without\n * a name of its own the group is called \"Time\". Inside a `FormField` the\n * group takes the field's label.\n */\n 'aria-label'?: string;\n /** Accessible name by reference. Wins over `aria-label` and the FormField label. */\n 'aria-labelledby'?: string;\n}\n\n/** Empty values are opt-in, keeping existing onChange callbacks non-nullable. */\nexport type TimePickerProps = TimePickerBaseProps &\n (\n | {\n allowEmpty?: false;\n value?: TimeValue;\n defaultValue?: TimeValue;\n onChange?: (value: TimeValue) => void;\n }\n | {\n /** Start unset and allow clearing to null, distinct from midnight. */\n allowEmpty: true;\n value?: TimeValue | null;\n defaultValue?: TimeValue | null;\n onChange?: (value: TimeValue | null) => void;\n }\n );\n\n/* -------------------------------------------------------------------------- */\n/* Dropdown columns */\n/* -------------------------------------------------------------------------- */\n\ntype Segment = 'hour' | 'minute' | 'period';\n\ninterface ColumnOption {\n value: number;\n label: string;\n}\n\ninterface DropdownColumn {\n key: Segment;\n label: string;\n options: ColumnOption[];\n /** Index of the selected option, or -1 (a minute off the step grid). */\n selectedIndex: number;\n /** Index of the option that takes focus when the column is entered. */\n anchorIndex: number;\n}\n\ninterface TimePickerDropdownColumnsProps {\n columns: DropdownColumn[];\n columnRefs: MutableRefObject<Partial<Record<Segment, HTMLDivElement | null>>>;\n onPick: (column: Segment, value: number) => void;\n onOptionKeyDown: (\n event: KeyboardEvent<HTMLDivElement>,\n columnIndex: number,\n optionIndex: number,\n ) => void;\n}\n\n/** The listbox columns. Mounted with the panel, so its layout effect runs once the panel is in the DOM. */\nfunction TimePickerDropdownColumns({\n columns,\n columnRefs,\n onPick,\n onOptionKeyDown,\n}: TimePickerDropdownColumnsProps) {\n const selectionKey = columns.map((c) => c.selectedIndex).join(':');\n const hasCentredRef = useRef(false);\n\n // Centre each column's selected option when the panel opens; afterwards\n // (typed values update the columns live) only scroll one that is out of\n // view, so a pointer pick never jumps the list under the pointer.\n useIsomorphicLayoutEffect(() => {\n const centreAll = !hasCentredRef.current;\n hasCentredRef.current = true;\n for (const list of Object.values(columnRefs.current)) {\n if (!list) continue;\n const option =\n list.querySelector<HTMLElement>('[aria-selected=\"true\"]') ??\n list.querySelector<HTMLElement>('[role=\"option\"][tabindex=\"0\"]');\n if (!option) continue;\n const top = option.offsetTop;\n const bottom = top + option.offsetHeight;\n const inView =\n top >= list.scrollTop && bottom <= list.scrollTop + list.clientHeight;\n if (centreAll || !inView) {\n list.scrollTop = top - (list.clientHeight - option.offsetHeight) / 2;\n }\n }\n }, [selectionKey, columnRefs]);\n\n return (\n <>\n {columns.map((column, columnIndex) => (\n <div\n key={column.key}\n ref={(node) => {\n columnRefs.current[column.key] = node;\n }}\n role=\"listbox\"\n aria-label={column.label}\n data-column={column.key}\n className={columnVariants({ separated: columnIndex > 0 })}\n >\n {column.options.map((option, optionIndex) => {\n const selected = optionIndex === column.selectedIndex;\n return (\n <div\n key={option.value}\n role=\"option\"\n aria-selected={selected}\n tabIndex={optionIndex === column.anchorIndex ? 0 : -1}\n data-value={option.value}\n className={optionVariants({ selected })}\n onClick={() => onPick(column.key, option.value)}\n onKeyDown={(event) =>\n onOptionKeyDown(event, columnIndex, optionIndex)\n }\n >\n {option.label}\n </div>\n );\n })}\n </div>\n ))}\n </>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------------- */\n\nexport const TimePicker = forwardRef<HTMLDivElement, TimePickerProps>(\n (props, ref) => {\n const {\n value,\n allowEmpty = false,\n defaultValue,\n onChange,\n hour12: hour12Prop,\n minuteStep = 1,\n fullWidthSeparator = false,\n periodLabels: periodLabelsProp,\n size = 'md',\n dropdown = false,\n disabled,\n className,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n } = props;\n const onEmptyChange = props.allowEmpty ? props.onChange : undefined;\n const { t, i18n } = useTranslation('ui');\n const ctx = useFormField();\n // Inside a FormField the group is named by the field's label.\n const inFormField = useContext(FormFieldContext) !== null;\n const effectiveId = useFormFieldControlId(ctx, id);\n const effectiveDisabled = Boolean(ctx.disabled || disabled);\n const effectiveTone = ctx.invalid ? 'error' : 'default';\n\n const isHour12 =\n hour12Prop !== undefined ? hour12Prop : detectHour12(i18n.language);\n const localePeriods = getLocalePeriodLabels(i18n.language);\n const periods = periodLabelsProp ?? localePeriods;\n\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState<TimeValue | null>(\n value !== undefined\n ? value\n : defaultValue !== undefined\n ? defaultValue\n : allowEmpty\n ? null\n : { hours: 0, minutes: 0 },\n );\n const rawValue = isControlled ? value : internalValue;\n const currentValue = useMemo(\n () => (allowEmpty ? rawValue : (rawValue ?? { hours: 0, minutes: 0 })),\n [allowEmpty, rawValue],\n );\n // An explicit edit starts from midnight; focus and opening never commit it.\n const editBase = () => latestValueRef.current ?? { hours: 0, minutes: 0 };\n\n // The latest value, for timers and blur commits that outlive the render\n // which scheduled them. `emit` moves it ahead of the next render.\n const latestValueRef = useRef(currentValue);\n latestValueRef.current = currentValue;\n\n const emit = useCallback(\n (next: TimeValue | null) => {\n latestValueRef.current = next;\n if (!isControlled) setInternalValue(next);\n if (next === null) onEmptyChange?.(null);\n else onChange?.(next);\n },\n [isControlled, onChange, onEmptyChange],\n );\n\n // Segment refs\n const rootRef = useRef<HTMLDivElement>(null);\n const hourRef = useRef<HTMLSpanElement>(null);\n const minuteRef = useRef<HTMLSpanElement>(null);\n const periodRef = useRef<HTMLSpanElement>(null);\n\n /* ---------------------------------------------------------------- */\n /* Typing: a first digit that could start a two-digit value waits */\n /* for the second. It commits after a second or when the user */\n /* leaves the segment; stepping with the arrows replaces it. */\n /* ---------------------------------------------------------------- */\n\n const hourPendingRef = useRef('');\n const minutePendingRef = useRef('');\n const hourTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const minuteTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const cancelHourPending = () => {\n hourPendingRef.current = '';\n if (hourTimerRef.current) {\n clearTimeout(hourTimerRef.current);\n hourTimerRef.current = null;\n }\n };\n\n const cancelMinutePending = () => {\n minutePendingRef.current = '';\n if (minuteTimerRef.current) {\n clearTimeout(minuteTimerRef.current);\n minuteTimerRef.current = null;\n }\n };\n\n // A parent reset or a disabled field must not be undone by a pending digit.\n useIsomorphicLayoutEffect(() => {\n if (value === null || effectiveDisabled) {\n cancelHourPending();\n cancelMinutePending();\n }\n }, [value, effectiveDisabled]);\n\n const clearValue = useCallback(() => {\n hourPendingRef.current = '';\n minutePendingRef.current = '';\n if (hourTimerRef.current) clearTimeout(hourTimerRef.current);\n if (minuteTimerRef.current) clearTimeout(minuteTimerRef.current);\n hourTimerRef.current = null;\n minuteTimerRef.current = null;\n emit(allowEmpty ? null : { hours: 0, minutes: 0 });\n }, [allowEmpty, emit]);\n\n const clearFromKeyboard = (e: KeyboardEvent<HTMLSpanElement>): boolean => {\n if (!allowEmpty || (e.key !== 'Backspace' && e.key !== 'Delete'))\n return false;\n e.preventDefault();\n clearValue();\n return true;\n };\n\n const commitHourDigits = (digits: string) => {\n const base = editBase();\n const clamped = clamp(\n parseInt(digits, 10),\n isHour12 ? 1 : 0,\n isHour12 ? 12 : 23,\n );\n emit({\n ...base,\n hours: isHour12 ? to24Hour(clamped, base.hours >= 12) : clamped,\n });\n };\n\n const commitMinuteDigits = (digits: string) => {\n emit({\n ...editBase(),\n minutes: snapMinuteToStep(parseInt(digits, 10), minuteStep),\n });\n };\n\n const flushHourPending = () => {\n const pending = hourPendingRef.current;\n cancelHourPending();\n if (pending) commitHourDigits(pending);\n };\n\n const flushMinutePending = () => {\n const pending = minutePendingRef.current;\n cancelMinutePending();\n if (pending) commitMinuteDigits(pending);\n };\n\n // Timers call the latest render's flush, so a commit uses the current\n // `onChange` and 12h/step settings.\n const flushRef = useRef({\n hour: flushHourPending,\n minute: flushMinutePending,\n });\n flushRef.current = { hour: flushHourPending, minute: flushMinutePending };\n\n // Cleanup timers\n useEffect(() => {\n return () => {\n if (hourTimerRef.current) clearTimeout(hourTimerRef.current);\n if (minuteTimerRef.current) clearTimeout(minuteTimerRef.current);\n };\n }, []);\n\n const separator = fullWidthSeparator ? ':' : ':';\n\n // Display values\n const unsetLabel = t('inputs.timePicker.unset', 'No time set');\n const displayHour =\n currentValue === null\n ? '--'\n : isHour12\n ? pad2(to12Hour(currentValue.hours))\n : pad2(currentValue.hours);\n const displayMinute =\n currentValue === null ? '--' : pad2(currentValue.minutes);\n const isPM = (currentValue?.hours ?? 0) >= 12;\n\n /* ---------------------------------------------------------------- */\n /* Dropdown state */\n /* ---------------------------------------------------------------- */\n\n const [open, setOpenState] = useState(false);\n const isOpen = dropdown && open;\n // Read by the handle, so `open()` then `isOpen()` agree before a render.\n const openRef = useRef(open);\n openRef.current = open;\n const setOpen = useCallback((next: boolean) => {\n openRef.current = next;\n setOpenState(next);\n }, []);\n const [dropdownDir, setDropdownDir] = useState<'ltr' | 'rtl'>('ltr');\n /** `keyboard` moves focus into the list on open; `pointer` leaves it where it is. */\n const openModeRef = useRef<'pointer' | 'keyboard'>('pointer');\n const initialColumnRef = useRef<Segment>('hour');\n /** Where Escape (and a close with focus inside the list) sends focus. */\n const returnFocusRef = useRef<HTMLElement | null>(null);\n /** Set when focus moved on by itself (outside click, Tab): leave it there on close. */\n const skipFocusReturnRef = useRef(false);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const clockButtonRef = useRef<HTMLButtonElement>(null);\n const columnRefs = useRef<Partial<Record<Segment, HTMLDivElement | null>>>(\n {},\n );\n\n const focusColumn = useCallback((column: Segment) => {\n columnRefs.current[column]\n ?.querySelector<HTMLElement>('[role=\"option\"][tabindex=\"0\"]')\n ?.focus({ preventScroll: true });\n }, []);\n\n const handleOpenChange = useCallback(\n (next: boolean) => {\n if (next) {\n if (effectiveDisabled) return;\n // Portalled to <body>, so the panel inherits no direction: copy\n // the field's.\n const root = rootRef.current;\n setDropdownDir(\n root && window.getComputedStyle(root).direction === 'rtl'\n ? 'rtl'\n : 'ltr',\n );\n skipFocusReturnRef.current = false;\n }\n setOpen(next);\n },\n [effectiveDisabled, setOpen],\n );\n\n const openDropdown = (\n mode: 'pointer' | 'keyboard',\n column: Segment,\n returnTo: HTMLElement | null,\n ) => {\n if (!dropdown || effectiveDisabled) return;\n openModeRef.current = mode;\n initialColumnRef.current = column;\n returnFocusRef.current = returnTo;\n if (open) {\n if (mode === 'keyboard') focusColumn(column);\n return;\n }\n handleOpenChange(true);\n };\n\n // Turning `dropdown` off, or disabling the picker, closes the list.\n useEffect(() => {\n if (open && (!dropdown || effectiveDisabled)) setOpen(false);\n }, [open, dropdown, effectiveDisabled, setOpen]);\n\n // Alt+ArrowDown on a segment opens the list on that segment's column;\n // with the list open, Alt+ArrowUp closes it, as it does in the list.\n const openFromSegment = (\n e: KeyboardEvent<HTMLSpanElement>,\n column: Segment,\n ): boolean => {\n if (!dropdown || !e.altKey) return false;\n if (e.key === 'ArrowUp' && open) {\n e.preventDefault();\n setOpen(false);\n return true;\n }\n if (e.key !== 'ArrowDown') return false;\n e.preventDefault();\n flushHourPending();\n flushMinutePending();\n openDropdown('keyboard', column, e.currentTarget);\n return true;\n };\n\n // Hour segment keyboard handler\n const handleHourKeyDown = (e: KeyboardEvent<HTMLSpanElement>) => {\n if (effectiveDisabled) return;\n if (clearFromKeyboard(e)) return;\n if (openFromSegment(e, 'hour')) return;\n\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n e.preventDefault();\n cancelHourPending();\n const base = editBase();\n const delta = e.key === 'ArrowUp' ? 1 : -1;\n const maxH = 23;\n let newH = base.hours + delta;\n if (newH < 0) newH = maxH;\n if (newH > maxH) newH = 0;\n emit({ ...base, hours: newH });\n return;\n }\n\n if (e.key === 'Tab' && !e.shiftKey) {\n e.preventDefault();\n // Leaving the segment commits a pending digit (see the blur handler).\n minuteRef.current?.focus();\n return;\n }\n\n if (e.key.length === 1 && e.key >= '0' && e.key <= '9') {\n e.preventDefault();\n if (hourTimerRef.current) clearTimeout(hourTimerRef.current);\n const next = hourPendingRef.current + e.key;\n // A first digit that cannot start a two-digit hour commits now.\n const complete =\n next.length >= 2 || parseInt(next, 10) > (isHour12 ? 1 : 2);\n if (complete) {\n cancelHourPending();\n commitHourDigits(next);\n minuteRef.current?.focus();\n } else {\n hourPendingRef.current = next;\n hourTimerRef.current = setTimeout(\n () => flushRef.current.hour(),\n 1000,\n );\n }\n }\n };\n\n // Minute segment keyboard handler\n const handleMinuteKeyDown = (e: KeyboardEvent<HTMLSpanElement>) => {\n if (effectiveDisabled) return;\n if (clearFromKeyboard(e)) return;\n if (openFromSegment(e, 'minute')) return;\n\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n e.preventDefault();\n cancelMinutePending();\n const base = editBase();\n emit({\n ...base,\n minutes: stepMinute(\n base.minutes,\n minuteStep,\n e.key === 'ArrowUp' ? 1 : -1,\n ),\n });\n return;\n }\n\n if (e.key === 'Tab' && !e.shiftKey && isHour12) {\n e.preventDefault();\n periodRef.current?.focus();\n return;\n }\n\n if (e.key === 'Tab' && e.shiftKey) {\n e.preventDefault();\n hourRef.current?.focus();\n return;\n }\n\n if (e.key.length === 1 && e.key >= '0' && e.key <= '9') {\n e.preventDefault();\n if (minuteTimerRef.current) clearTimeout(minuteTimerRef.current);\n const next = minutePendingRef.current + e.key;\n // 6–9 cannot start a two-digit minute, so it commits now.\n const complete = next.length >= 2 || parseInt(next, 10) > 5;\n if (complete) {\n cancelMinutePending();\n commitMinuteDigits(next);\n if (isHour12) {\n periodRef.current?.focus();\n }\n } else {\n minutePendingRef.current = next;\n minuteTimerRef.current = setTimeout(\n () => flushRef.current.minute(),\n 1000,\n );\n }\n }\n };\n\n // Period toggle handler\n const handlePeriodKeyDown = (e: KeyboardEvent<HTMLSpanElement>) => {\n if (effectiveDisabled) return;\n if (clearFromKeyboard(e)) return;\n if (openFromSegment(e, 'period')) return;\n const base = editBase();\n const basePM = base.hours >= 12;\n\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n e.preventDefault();\n const newH = basePM ? base.hours - 12 : base.hours + 12;\n emit({ ...base, hours: clamp(newH, 0, 23) });\n return;\n }\n\n if (e.key === 'Tab' && e.shiftKey) {\n e.preventDefault();\n minuteRef.current?.focus();\n return;\n }\n\n // a/p keys toggle AM/PM\n if (e.key === 'a' || e.key === 'A') {\n e.preventDefault();\n if (latestValueRef.current === null || basePM) {\n emit({ ...base, hours: basePM ? base.hours - 12 : base.hours });\n }\n }\n if (e.key === 'p' || e.key === 'P') {\n e.preventDefault();\n if (!basePM) {\n emit({ ...base, hours: base.hours + 12 });\n }\n }\n };\n\n // Leaving a segment commits a lone typed digit (\"5\" then a click on Save\n // is 05) and rounds nothing else: an untouched 12:58 stays 12:58.\n const handleHourBlur = () => {\n flushHourPending();\n };\n\n const handleMinuteBlur = () => {\n flushMinutePending();\n };\n\n const hourLabel = t('inputs.timePicker.hour', 'Hour');\n const minuteLabel = t('inputs.timePicker.minute', 'Minute');\n const periodLabel = t('inputs.timePicker.period', 'Period');\n const groupLabel = t('inputs.timePicker.groupLabel', 'Time');\n const openDropdownLabel = t(\n 'inputs.timePicker.openDropdown',\n 'Choose time',\n );\n\n // The FormField's label names this picker only while its `for` points\n // here. Several controls can share one field (DateTimePicker's trigger\n // and its own TimePicker): the others keep their own name.\n const formFieldLabelId = `${ctx.id}-label`;\n const hasFormFieldLabel = inFormField && Boolean(ctx.label);\n const [isLabelTarget, setIsLabelTarget] = useState(true);\n\n // Accessible name: an explicit aria-labelledby, then an explicit\n // aria-label, then the FormField's label, then \"Time\".\n const groupLabelledBy =\n ariaLabelledBy ??\n (!ariaLabel && hasFormFieldLabel && isLabelTarget\n ? formFieldLabelId\n : undefined);\n const groupAriaLabel = groupLabelledBy\n ? undefined\n : (ariaLabel ?? groupLabel);\n\n // The clear button names its field when a text label is known.\n const clearFieldLabel =\n ariaLabel ?? (hasFormFieldLabel ? ctx.label : undefined);\n const clearLabel = clearFieldLabel\n ? t('inputs.timePicker.clearNamed', { label: clearFieldLabel })\n : t('inputs.text.clear');\n\n // FormField's `<label for>` points at this group, which is not labelable,\n // so the browser does nothing with a click on it. Focus the hours instead.\n useEffect(() => {\n if (!hasFormFieldLabel) return undefined;\n const scope = rootRef.current?.getRootNode();\n const label =\n scope instanceof Document || scope instanceof ShadowRoot\n ? scope.getElementById(formFieldLabelId)\n : null;\n if (!(label instanceof HTMLLabelElement)) {\n setIsLabelTarget(false);\n return undefined;\n }\n const sync = () => setIsLabelTarget(label.htmlFor === effectiveId);\n sync();\n // The field moves `for` to a control that registers after mount.\n const observer = new MutationObserver(sync);\n observer.observe(label, { attributes: true, attributeFilter: ['for'] });\n const onLabelClick = () => {\n if (label.htmlFor !== effectiveId || effectiveDisabled) return;\n hourRef.current?.focus();\n };\n label.addEventListener('click', onLabelClick);\n return () => {\n observer.disconnect();\n label.removeEventListener('click', onLabelClick);\n };\n }, [hasFormFieldLabel, formFieldLabelId, effectiveId, effectiveDisabled]);\n\n /* ---------------------------------------------------------------- */\n /* Dropdown columns and handlers */\n /* ---------------------------------------------------------------- */\n\n const hourOptions = useMemo<ColumnOption[]>(\n () =>\n Array.from({ length: isHour12 ? 12 : 24 }, (_, i) =>\n isHour12 ? i + 1 : i,\n ).map((hour) => ({ value: hour, label: pad2(hour) })),\n [isHour12],\n );\n const minuteOptions = useMemo<ColumnOption[]>(() => {\n const options: ColumnOption[] = [];\n for (let minute = 0; minute <= 59; minute += minuteStep) {\n options.push({ value: minute, label: pad2(minute) });\n }\n return options;\n }, [minuteStep]);\n\n const columns: DropdownColumn[] = [];\n if (dropdown) {\n const hourSelected = hourOptions.findIndex(\n (o) =>\n o.value ===\n (currentValue === null\n ? undefined\n : isHour12\n ? to12Hour(currentValue.hours)\n : currentValue.hours),\n );\n columns.push({\n key: 'hour',\n label: hourLabel,\n options: hourOptions,\n selectedIndex: hourSelected,\n anchorIndex: Math.max(hourSelected, 0),\n });\n // A minute off the step grid (07 with step 5) selects nothing; focus\n // enters the column at the grid value just before it.\n const minuteSelected = minuteOptions.findIndex(\n (o) => o.value === currentValue?.minutes,\n );\n columns.push({\n key: 'minute',\n label: minuteLabel,\n options: minuteOptions,\n selectedIndex: minuteSelected,\n anchorIndex:\n minuteSelected >= 0\n ? minuteSelected\n : clamp(\n Math.floor((currentValue?.minutes ?? 0) / minuteStep),\n 0,\n minuteOptions.length - 1,\n ),\n });\n if (isHour12) {\n columns.push({\n key: 'period',\n label: periodLabel,\n options: [\n { value: 0, label: periods.am },\n { value: 1, label: periods.pm },\n ],\n selectedIndex: currentValue === null ? -1 : isPM ? 1 : 0,\n anchorIndex: isPM ? 1 : 0,\n });\n }\n }\n\n // An hour or AM/PM pick keeps the list open; a minute pick closes it and\n // returns focus to the minute segment.\n const pickOption = (column: Segment, optionValue: number) => {\n cancelHourPending();\n cancelMinutePending();\n const base = editBase();\n if (column === 'hour') {\n const hours = isHour12\n ? to24Hour(optionValue, base.hours >= 12)\n : optionValue;\n if (latestValueRef.current === null || hours !== base.hours)\n emit({ ...base, hours });\n return;\n }\n if (column === 'period') {\n const wantPM = optionValue === 1;\n if (latestValueRef.current === null || wantPM !== base.hours >= 12) {\n emit({ ...base, hours: (base.hours % 12) + (wantPM ? 12 : 0) });\n }\n return;\n }\n if (latestValueRef.current === null || optionValue !== base.minutes) {\n emit({ ...base, minutes: optionValue });\n }\n minuteRef.current?.focus();\n setOpen(false);\n };\n\n const handleOptionKeyDown = (\n e: KeyboardEvent<HTMLDivElement>,\n columnIndex: number,\n optionIndex: number,\n ) => {\n const column = columns[columnIndex];\n if (!column) return;\n const last = column.options.length - 1;\n const focusOption = (index: number) => {\n columnRefs.current[column.key]\n ?.querySelectorAll<HTMLElement>('[role=\"option\"]')\n [index]?.focus();\n };\n\n if (e.altKey && e.key === 'ArrowUp') {\n e.preventDefault();\n returnFocusRef.current?.focus();\n setOpen(false);\n return;\n }\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n focusOption(Math.min(optionIndex + 1, last));\n break;\n case 'ArrowUp':\n e.preventDefault();\n focusOption(Math.max(optionIndex - 1, 0));\n break;\n case 'Home':\n e.preventDefault();\n focusOption(0);\n break;\n case 'End':\n e.preventDefault();\n focusOption(last);\n break;\n case 'ArrowLeft':\n case 'ArrowRight': {\n e.preventDefault();\n // Columns follow the reading direction: in RTL the hours are on\n // the right, so ArrowLeft moves on to the minutes.\n const forward = (e.key === 'ArrowRight') === (dropdownDir === 'ltr');\n const target = columns[columnIndex + (forward ? 1 : -1)];\n if (target) focusColumn(target.key);\n break;\n }\n case 'Enter':\n case ' ': {\n e.preventDefault();\n const option = column.options[optionIndex];\n if (option) pickOption(column.key, option.value);\n break;\n }\n case 'Tab':\n // Leave the picker in the direction of travel and close. No\n // preventDefault: the browser moves on from the new focus, even\n // out of the page, so the close must not bring it back.\n skipFocusReturnRef.current = true;\n if (e.shiftKey) {\n hourRef.current?.focus();\n } else {\n clockButtonRef.current?.focus();\n }\n setOpen(false);\n break;\n default:\n break;\n }\n };\n\n // A click anywhere on the field opens the list. Focus stays on the\n // segment that was clicked, so typing still works.\n const handleFieldClick = (e: MouseEvent<HTMLDivElement>) => {\n if (!dropdown || effectiveDisabled) return;\n const target = e.target;\n if (!(target instanceof Node)) return;\n // The clock button opens and closes the list itself.\n if (clockButtonRef.current?.contains(target)) return;\n const segments = [hourRef.current, minuteRef.current, periodRef.current];\n let segment = segments.find((s) => s?.contains(target)) ?? null;\n if (!segment) {\n // The padding or the separator: keep a focused segment, else hours.\n const active = target.ownerDocument?.activeElement;\n segment = segments.find((s) => s && s === active) ?? hourRef.current;\n if (segment && segment !== active) segment.focus();\n }\n openDropdown('pointer', 'hour', segment);\n };\n\n // Child handlers run before Radix's toggle, so the mode is set first.\n const handleClockClick = (e: MouseEvent<HTMLButtonElement>) => {\n // Enter and Space reach a button as a click with no pointer detail.\n openModeRef.current = e.detail === 0 ? 'keyboard' : 'pointer';\n initialColumnRef.current = 'hour';\n returnFocusRef.current = e.currentTarget;\n };\n\n const handleContentOpenAutoFocus = (e: Event) => {\n // Never steal focus on a pointer open.\n e.preventDefault();\n if (openModeRef.current === 'keyboard') {\n focusColumn(initialColumnRef.current);\n }\n };\n\n const handleContentCloseAutoFocus = (e: Event) => {\n e.preventDefault();\n const skip = skipFocusReturnRef.current;\n skipFocusReturnRef.current = false;\n if (skip) return;\n // Focus went down with the panel: send it back where it came from.\n const active = document.activeElement;\n if (!active || active === document.body) {\n returnFocusRef.current?.focus();\n }\n };\n\n const handleContentInteractOutside = (e: Event) => {\n const target = e.target;\n // The field is the panel's anchor: clicking or focusing a segment\n // keeps the list open.\n if (target instanceof Node && rootRef.current?.contains(target)) {\n e.preventDefault();\n return;\n }\n skipFocusReturnRef.current = true;\n };\n\n const handleContentEscapeKeyDown = () => {\n if (contentRef.current?.contains(document.activeElement)) {\n returnFocusRef.current?.focus();\n }\n };\n\n // Inside a modal Dialog, its scroll lock cancels every wheel and\n // touchmove that starts outside the dialog's own DOM, and the panel is\n // portalled outside it, so the columns would not scroll by mouse or\n // touch. Stopping the two events at the panel keeps them from the\n // lock's document listener; the column scrolls natively and\n // `overscroll-contain` keeps the page still.\n const contentCallbackRef = useCallback((node: HTMLDivElement | null) => {\n const stop = stopScrollLockPropagation;\n contentRef.current?.removeEventListener('wheel', stop);\n contentRef.current?.removeEventListener('touchmove', stop);\n contentRef.current = node;\n node?.addEventListener('wheel', stop, { passive: true });\n node?.addEventListener('touchmove', stop, { passive: true });\n }, []);\n\n const handleContentMouseDown = (e: MouseEvent<HTMLDivElement>) => {\n // After a pointer open focus stays on the segment, so typing works:\n // a click in the list must not take it.\n if (!contentRef.current?.contains(document.activeElement)) {\n e.preventDefault();\n }\n };\n\n const handle = useMemo<TimePickerHandle>(\n () => ({\n getValue: () => currentValue,\n setValue: (next) => emit(normaliseTime(next)),\n clear: clearValue,\n isOpen: () => dropdown && openRef.current,\n open: () => {\n if (!dropdown || effectiveDisabled) return;\n openModeRef.current = 'pointer';\n handleOpenChange(true);\n },\n close: () => {\n if (dropdown) setOpen(false);\n },\n }),\n [\n currentValue,\n emit,\n clearValue,\n dropdown,\n effectiveDisabled,\n handleOpenChange,\n setOpen,\n ],\n );\n\n useImperativeHandle(ref, () => rootRef.current as HTMLDivElement, []);\n useAgentRegistration(timePickerAgent, handle, effectiveId);\n\n const field = (\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props, jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions -- aria-invalid is a global ARIA state conveying group-level validation; the click is a pointer shortcut to the list, which the keyboard opens with Alt+ArrowDown or the clock button\n <div\n ref={rootRef}\n id={effectiveId}\n role=\"group\"\n aria-label={groupAriaLabel}\n aria-labelledby={groupLabelledBy}\n aria-describedby={ctx.describedBy || undefined}\n aria-invalid={ctx.invalid || undefined}\n // `aria-required` is not valid on `role=\"group\"` per ARIA 1.2 — the\n // FormField label's visible asterisk + `aria-describedby` link\n // communicate the required state instead.\n aria-disabled={effectiveDisabled || undefined}\n data-component=\"time-picker\"\n data-component-id={effectiveId}\n className={wrapperVariants({\n size,\n tone: effectiveTone,\n isDisabled: effectiveDisabled,\n opensOnClick: dropdown && !effectiveDisabled,\n className,\n })}\n onClick={dropdown ? handleFieldClick : undefined}\n >\n {/* Hour segment */}\n <span\n ref={hourRef}\n role=\"spinbutton\"\n aria-disabled={effectiveDisabled || undefined}\n aria-label={hourLabel}\n aria-valuemin={isHour12 ? 1 : 0}\n aria-valuemax={isHour12 ? 12 : 23}\n aria-valuenow={\n currentValue === null\n ? undefined\n : isHour12\n ? to12Hour(currentValue.hours)\n : currentValue.hours\n }\n aria-valuetext={currentValue === null ? unsetLabel : displayHour}\n aria-keyshortcuts={dropdown ? 'Alt+ArrowDown' : undefined}\n tabIndex={effectiveDisabled ? -1 : 0}\n inputMode=\"numeric\"\n onKeyDown={handleHourKeyDown}\n onBlur={handleHourBlur}\n className={segmentVariants({ size })}\n >\n {displayHour}\n </span>\n\n {/* Separator */}\n <span aria-hidden=\"true\" className={separatorVariants({ size })}>\n {separator}\n </span>\n\n {/* Minute segment */}\n <span\n ref={minuteRef}\n role=\"spinbutton\"\n aria-disabled={effectiveDisabled || undefined}\n aria-label={minuteLabel}\n aria-valuemin={0}\n aria-valuemax={59}\n aria-valuenow={currentValue?.minutes}\n aria-valuetext={currentValue === null ? unsetLabel : displayMinute}\n aria-keyshortcuts={dropdown ? 'Alt+ArrowDown' : undefined}\n tabIndex={effectiveDisabled ? -1 : 0}\n inputMode=\"numeric\"\n onKeyDown={handleMinuteKeyDown}\n onBlur={handleMinuteBlur}\n className={segmentVariants({ size })}\n >\n {displayMinute}\n </span>\n\n {/* AM/PM toggle (12h mode only) */}\n {isHour12 ? (\n <span\n ref={periodRef}\n role=\"spinbutton\"\n aria-disabled={effectiveDisabled || undefined}\n aria-label={periodLabel}\n aria-valuemin={0}\n aria-valuemax={1}\n aria-valuenow={currentValue === null ? undefined : isPM ? 1 : 0}\n aria-valuetext={\n currentValue === null\n ? unsetLabel\n : isPM\n ? periods.pm\n : periods.am\n }\n aria-keyshortcuts={dropdown ? 'Alt+ArrowDown' : undefined}\n tabIndex={effectiveDisabled ? -1 : 0}\n onKeyDown={handlePeriodKeyDown}\n className={periodButtonVariants({ size })}\n >\n {currentValue === null ? '--' : isPM ? periods.pm : periods.am}\n </span>\n ) : null}\n\n {allowEmpty ? (\n <button\n type=\"button\"\n aria-label={clearLabel}\n disabled={effectiveDisabled || currentValue === null}\n // Prevent blur from committing pending digits before the clear.\n onPointerDown={(event) => {\n event.preventDefault();\n cancelHourPending();\n cancelMinutePending();\n }}\n onClick={(event) => {\n event.stopPropagation();\n clearValue();\n hourRef.current?.focus();\n }}\n // An empty field has nothing to clear: keep the slot, hide the control.\n className={clockButtonVariants({\n size,\n trailing: !dropdown,\n className: currentValue === null ? 'ds:invisible' : undefined,\n })}\n >\n <X aria-hidden=\"true\" />\n </button>\n ) : null}\n\n {/* Clock button: opens the list (dropdown only). Radix adds\n aria-haspopup=\"dialog\", aria-expanded and aria-controls. */}\n {dropdown ? (\n <Popover.Trigger asChild>\n <button\n ref={clockButtonRef}\n type=\"button\"\n aria-label={openDropdownLabel}\n disabled={effectiveDisabled}\n onClick={handleClockClick}\n className={clockButtonVariants({ size })}\n >\n <Clock aria-hidden=\"true\" />\n </button>\n </Popover.Trigger>\n ) : null}\n </div>\n );\n\n if (!dropdown) return field;\n\n return (\n <Popover.Root open={isOpen} onOpenChange={handleOpenChange}>\n {/* The whole field anchors the panel, so it lines up with the\n field's start rather than the clock button. */}\n <Popover.Anchor asChild>{field}</Popover.Anchor>\n <Popover.Portal>\n <Popover.Content\n ref={contentCallbackRef}\n side=\"bottom\"\n align=\"start\"\n sideOffset={4}\n dir={dropdownDir}\n /* Portalled to <body>, outside the field's [data-component]\n scope: it needs its own marker for the kit's baselines. */\n data-component=\"time-picker-dropdown\"\n aria-label={groupAriaLabel}\n aria-labelledby={groupLabelledBy}\n className={dropdownContentVariants({ size })}\n onOpenAutoFocus={handleContentOpenAutoFocus}\n onCloseAutoFocus={handleContentCloseAutoFocus}\n onInteractOutside={handleContentInteractOutside}\n onEscapeKeyDown={handleContentEscapeKeyDown}\n onMouseDown={handleContentMouseDown}\n >\n <TimePickerDropdownColumns\n columns={columns}\n columnRefs={columnRefs}\n onPick={pickOption}\n onOptionKeyDown={handleOptionKeyDown}\n />\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n },\n);\n\nTimePicker.displayName = 'TimePicker';\n"],"names":["timePickerAgent","handle","value","hh","mm","args","hStr","mStr","detectHour12","locale","resolved","getLocalePeriodLabels","am","_a","p","pm","_b","clamp","min","max","lastMinuteOnGrid","step","snapMinuteToStep","rounded","stepMinute","direction","last","next","previous","normaliseTime","whole","n","to12Hour","h24","to24Hour","h12","isPM","pad2","stopScrollLockPropagation","event","wrapperVariants","cva","segmentVariants","periodButtonVariants","separatorVariants","clockButtonVariants","dropdownContentVariants","columnVariants","optionVariants","TimePickerDropdownColumns","columns","columnRefs","onPick","onOptionKeyDown","selectionKey","c","hasCentredRef","useRef","useIsomorphicLayoutEffect","centreAll","list","option","top","bottom","inView","jsx","Fragment","column","columnIndex","node","optionIndex","selected","TimePicker","forwardRef","props","ref","allowEmpty","defaultValue","onChange","hour12Prop","minuteStep","fullWidthSeparator","periodLabelsProp","size","dropdown","disabled","className","id","ariaLabel","ariaLabelledBy","onEmptyChange","t","i18n","useTranslation","ctx","useFormField","inFormField","useContext","FormFieldContext","effectiveId","useFormFieldControlId","effectiveDisabled","effectiveTone","isHour12","localePeriods","periods","isControlled","internalValue","setInternalValue","useState","rawValue","currentValue","useMemo","editBase","latestValueRef","emit","useCallback","rootRef","hourRef","minuteRef","periodRef","hourPendingRef","minutePendingRef","hourTimerRef","minuteTimerRef","cancelHourPending","cancelMinutePending","clearValue","clearFromKeyboard","commitHourDigits","digits","base","clamped","commitMinuteDigits","flushHourPending","pending","flushMinutePending","flushRef","useEffect","separator","unsetLabel","displayHour","displayMinute","open","setOpenState","isOpen","openRef","setOpen","dropdownDir","setDropdownDir","openModeRef","initialColumnRef","returnFocusRef","skipFocusReturnRef","contentRef","clockButtonRef","focusColumn","handleOpenChange","root","openDropdown","mode","returnTo","openFromSegment","handleHourKeyDown","delta","maxH","newH","handleMinuteKeyDown","_c","handlePeriodKeyDown","basePM","handleHourBlur","handleMinuteBlur","hourLabel","minuteLabel","periodLabel","groupLabel","openDropdownLabel","formFieldLabelId","hasFormFieldLabel","isLabelTarget","setIsLabelTarget","groupLabelledBy","groupAriaLabel","clearFieldLabel","clearLabel","scope","label","sync","observer","onLabelClick","hourOptions","_","i","hour","minuteOptions","options","minute","hourSelected","o","minuteSelected","pickOption","optionValue","hours","wantPM","handleOptionKeyDown","focusOption","index","forward","target","handleFieldClick","segments","segment","s","active","handleClockClick","handleContentOpenAutoFocus","handleContentCloseAutoFocus","skip","handleContentInteractOutside","handleContentEscapeKeyDown","contentCallbackRef","stop","handleContentMouseDown","useImperativeHandle","useAgentRegistration","field","jsxs","X","Popover","Clock"],"mappings":";;;;;;;;;;AAeO,MAAMA,KAAkD;AAAA,EAC7D,IAAI;AAAA,EACJ,cAAc,CAAC,iBAAiB,aAAa,QAAQ,OAAO;AAAA,EAC5D,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAW;AAChB,cAAMC,IAAQD,EAAO,SAAA;AACrB,YAAI,CAACC,EAAO,QAAO;AACnB,cAAMC,IAAK,OAAOD,EAAM,KAAK,EAAE,SAAS,GAAG,GAAG,GACxCE,IAAK,OAAOF,EAAM,OAAO,EAAE,SAAS,GAAG,GAAG;AAChD,eAAO,GAAGC,CAAE,IAAIC,CAAE;AAAA,MACpB;AAAA,IAAA;AAAA,IAEF,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACH,MAAWA,EAAO,OAAA;AAAA,IAAO;AAAA,EAClC;AAAA,EAEF,SAAS;AA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AGFiJ,EAAQ,MAAR,EAAa,MAAMpF,IAAQ,cAAcY,IAGxC,UAAA;AAAA,MAAA,gBAAA5F,EAACoK,EAAQ,QAAR,EAAe,SAAO,IAAE,UAAAH,IAAM;AAAA,MAC/B,gBAAAjK,EAACoK,EAAQ,QAAR,EACC,UAAA,gBAAApK;AAAA,QAACoK,EAAQ;AAAA,QAAR;AAAA,UACC,KAAKR;AAAA,UACL,MAAK;AAAA,UACL,OAAM;AAAA,UACN,YAAY;AAAA,UACZ,KAAKzE;AAAA,UAGL,kBAAe;AAAA,UACf,cAAYmC;AAAA,UACZ,mBAAiBD;AAAA,UACjB,WAAWxI,GAAwB,EAAE,MAAAqC,GAAM;AAAA,UAC3C,iBAAiBqI;AAAA,UACjB,kBAAkBC;AAAA,UAClB,mBAAmBE;AAAA,UACnB,iBAAiBC;AAAA,UACjB,aAAaG;AAAA,UAEb,UAAA,gBAAA9J;AAAA,YAAChB;AAAA,YAAA;AAAA,cACC,SAAAC;AAAA,cACA,YAAAC;AAAA,cACA,QAAQsJ;AAAA,cACR,iBAAiBI;AAAA,YAAA;AAAA,UAAA;AAAA,QACnB;AAAA,MAAA,EACF,CACF;AAAA,IAAA,GACF,IAlCoBqB;AAAA,EAoCxB;AACF;AAEA1J,GAAW,cAAc;"}
@@ -1,7 +1,7 @@
1
1
  import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
2
  import { forwardRef as v, useState as O, useRef as w, useEffect as x, useMemo as y, Fragment as R } from "react";
3
3
  import { B as S } from "./button-DohK_Ak_.js";
4
- import { D as r } from "./dropdown-menu-D1we7oAY.js";
4
+ import { D as r } from "./dropdown-menu-CqxBthww.js";
5
5
  import { u as C } from "./registry-DvAUVLHh.js";
6
6
  const K = {
7
7
  id: "token-insert-menu",
@@ -144,4 +144,4 @@ export {
144
144
  j as T,
145
145
  K as t
146
146
  };
147
- //# sourceMappingURL=token-insert-menu-DtAnBd0x.js.map
147
+ //# sourceMappingURL=token-insert-menu-Dl3x2ekR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"token-insert-menu-DtAnBd0x.js","sources":["../../src/components/token-insert-menu/token-insert-menu.agent.ts","../../src/components/token-insert-menu/token-insert-menu.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — TokenInsertMenu. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { TokenInsertMenuHandle } from './token-insert-menu';\n\nexport const tokenInsertMenuAgent: AgentAdapter<TokenInsertMenuHandle> = {\n id: 'token-insert-menu',\n capabilities: ['open', 'close'],\n state: {\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.tokenInsertMenu.state.isOpen',\n description: 'True when the token menu is currently open.',\n read: (handle) => handle.isOpen(),\n },\n },\n actions: {\n open: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.tokenInsertMenu.actions.open',\n description: 'Open the token menu.',\n invoke: (handle) => {\n handle.open();\n },\n },\n close: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.tokenInsertMenu.actions.close',\n description: 'Close the token menu.',\n invoke: (handle) => {\n handle.close();\n },\n },\n insert: {\n safety: 'write',\n argsType: '{ token: string }',\n argsSchema: {\n type: 'object',\n properties: { token: { type: 'string' } },\n required: ['token'],\n },\n descriptionKey: 'ui.agent.tokenInsertMenu.actions.insert',\n description: 'Emit a merge-token to the consumer for cursor insertion.',\n examples: [\n {\n args: { token: '{{patient.name}}' },\n note: 'Emit the patient-name placeholder for cursor insertion.',\n },\n ],\n invoke: (handle, args: { token: string }) => {\n handle.insert(args.token);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'token-insert-menu',\n description: 'Marks the TokenInsertMenu wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useEffect,\n useMemo,\n useRef,\n useState,\n Fragment,\n} from 'react';\nimport { Button } from '../button/button';\nimport { DropdownMenu } from '../dropdown-menu/dropdown-menu';\nimport { useAgentRegistration } from '../../agent';\nimport { tokenInsertMenuAgent } from './token-insert-menu.agent';\n\n/** One selectable merge-token. */\nexport interface TokenInsertMenuToken {\n /** Raw token text inserted verbatim (e.g. `\"{{patient.name}}\"`). */\n value: string;\n /** Human-readable label shown in the menu. Already localised by the consumer. */\n label: string;\n /** Optional section heading — when ANY token has one, the menu renders grouped. */\n group?: string;\n}\n\n/** Agent-readiness curated handle for TokenInsertMenu. */\nexport interface TokenInsertMenuHandle {\n isOpen: () => boolean;\n open: () => void;\n close: () => void;\n /** Emit a token to the consumer (mirrors a user selecting it). */\n insert: (token: string) => void;\n}\n\nexport interface TokenInsertMenuProps {\n /** The merge-tokens to offer. `value` is inserted; `label` is shown. */\n tokens: TokenInsertMenuToken[];\n /** Called with the chosen token's raw `value`. The consumer inserts it at\n * the caret of their target field — this component never owns the field. */\n onInsert: (token: string) => void;\n /** The trigger button's visible text (already localised by the consumer). */\n triggerLabel: string;\n disabled?: boolean;\n /** Opaque instance id — surfaced as `data-component-id` + agent instance id. */\n id?: string;\n /** Extra classes for the trigger button. */\n className?: string;\n}\n\ninterface TokenSection {\n heading: string;\n items: TokenInsertMenuToken[];\n}\n\nexport const TokenInsertMenu = forwardRef<\n HTMLButtonElement,\n TokenInsertMenuProps\n>(function TokenInsertMenu(\n { tokens, onInsert, triggerLabel, disabled, id, className },\n ref,\n) {\n const [open, setOpen] = useState(false);\n\n // Mirror the open flag into a ref so the agent handle reads a fresh value\n // without re-subscribing on every toggle (matches DropdownMenu.Root).\n const openRef = useRef(open);\n useEffect(() => {\n openRef.current = open;\n }, [open]);\n\n // Group tokens only when at least one carries a `group`; otherwise flat.\n const sections = useMemo<TokenSection[] | null>(() => {\n if (!tokens.some((token) => token.group)) return null;\n const order: string[] = [];\n const byGroup = new Map<string, TokenInsertMenuToken[]>();\n for (const token of tokens) {\n const key = token.group ?? '';\n const bucket = byGroup.get(key);\n if (bucket) {\n bucket.push(token);\n } else {\n byGroup.set(key, [token]);\n order.push(key);\n }\n }\n return order.map((heading) => ({\n heading,\n items: byGroup.get(heading) ?? [],\n }));\n }, [tokens]);\n\n const handle = useMemo<TokenInsertMenuHandle>(\n () => ({\n isOpen: () => openRef.current,\n open: () => setOpen(true),\n close: () => setOpen(false),\n insert: (token) => onInsert(token),\n }),\n [onInsert],\n );\n useAgentRegistration(tokenInsertMenuAgent, handle, id);\n\n const renderItem = (token: TokenInsertMenuToken) => (\n <DropdownMenu.Item\n key={token.value}\n // Raw token shown as a muted monospace hint beneath the label.\n description={\n <span className=\"ds:font-mono ds:text-muted-foreground\">\n {token.value}\n </span>\n }\n onSelect={() => onInsert(token.value)}\n >\n {token.label}\n </DropdownMenu.Item>\n );\n\n return (\n <DropdownMenu.Root\n open={open}\n // `asChild` hides the trigger's native `disabled` from Radix, so gate\n // opening here too — a disabled menu must never expand on interaction.\n onOpenChange={(next) => {\n if (disabled) return;\n setOpen(next);\n }}\n >\n <span\n className=\"ds:inline-flex\"\n data-component=\"token-insert-menu\"\n data-component-id={id}\n >\n <DropdownMenu.Trigger asChild>\n <Button\n ref={ref}\n type=\"button\"\n intent=\"outline\"\n disabled={disabled}\n className={className}\n >\n {triggerLabel}\n </Button>\n </DropdownMenu.Trigger>\n </span>\n <DropdownMenu.Content align=\"start\">\n {sections\n ? sections.map((section, index) => (\n <Fragment key={section.heading || `section-${index}`}>\n {index > 0 ? <DropdownMenu.Separator /> : null}\n <DropdownMenu.Group>\n {section.heading ? (\n <DropdownMenu.Label>{section.heading}</DropdownMenu.Label>\n ) : null}\n {section.items.map(renderItem)}\n </DropdownMenu.Group>\n </Fragment>\n ))\n : tokens.map(renderItem)}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n});\n\nTokenInsertMenu.displayName = 'TokenInsertMenu';\n"],"names":["tokenInsertMenuAgent","handle","args","TokenInsertMenu","forwardRef","tokens","onInsert","triggerLabel","disabled","id","className","ref","open","setOpen","useState","openRef","useRef","useEffect","sections","useMemo","token","order","byGroup","key","bucket","heading","useAgentRegistration","renderItem","jsx","DropdownMenu","jsxs","next","Button","section","index","Fragment"],"mappings":";;;;;AASO,MAAMA,IAA4D;AAAA,EACvE,IAAI;AAAA,EACJ,cAAc,CAAC,QAAQ,OAAO;AAAA,EAC9B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,OAAA;AAAA,IAAO;AAAA,EAClC;AAAA,EAEF,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,KAAA;AAAA,MACT;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,MAAA;AAAA,MACT;AAAA,IAAA;AAAA,IAEF,QAAQ;AAAA,MACN,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,OAAO,EAAE,MAAM,WAAS;AAAA,QACtC,UAAU,CAAC,OAAO;AAAA,MAAA;AAAA,MAEpB,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,UAAU;AAAA,QACR;AAAA,UACE,MAAM,EAAE,OAAO,mBAAA;AAAA,UACf,MAAM;AAAA,QAAA;AAAA,MACR;AAAA,MAEF,QAAQ,CAACA,GAAQC,MAA4B;AAC3C,QAAAD,EAAO,OAAOC,EAAK,KAAK;AAAA,MAC1B;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MAC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EAAQ,WAAW,WAAWC,CAAK,EAQlD,CACD,IACD7B,EAAO,IAAIsB,CAAU,EAAA,CAC3B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AAEDxB,EAAgB,cAAc;"}
1
+ {"version":3,"file":"token-insert-menu-Dl3x2ekR.js","sources":["../../src/components/token-insert-menu/token-insert-menu.agent.ts","../../src/components/token-insert-menu/token-insert-menu.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — TokenInsertMenu. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { TokenInsertMenuHandle } from './token-insert-menu';\n\nexport const tokenInsertMenuAgent: AgentAdapter<TokenInsertMenuHandle> = {\n id: 'token-insert-menu',\n capabilities: ['open', 'close'],\n state: {\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.tokenInsertMenu.state.isOpen',\n description: 'True when the token menu is currently open.',\n read: (handle) => handle.isOpen(),\n },\n },\n actions: {\n open: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.tokenInsertMenu.actions.open',\n description: 'Open the token menu.',\n invoke: (handle) => {\n handle.open();\n },\n },\n close: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.tokenInsertMenu.actions.close',\n description: 'Close the token menu.',\n invoke: (handle) => {\n handle.close();\n },\n },\n insert: {\n safety: 'write',\n argsType: '{ token: string }',\n argsSchema: {\n type: 'object',\n properties: { token: { type: 'string' } },\n required: ['token'],\n },\n descriptionKey: 'ui.agent.tokenInsertMenu.actions.insert',\n description: 'Emit a merge-token to the consumer for cursor insertion.',\n examples: [\n {\n args: { token: '{{patient.name}}' },\n note: 'Emit the patient-name placeholder for cursor insertion.',\n },\n ],\n invoke: (handle, args: { token: string }) => {\n handle.insert(args.token);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'token-insert-menu',\n description: 'Marks the TokenInsertMenu wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useEffect,\n useMemo,\n useRef,\n useState,\n Fragment,\n} from 'react';\nimport { Button } from '../button/button';\nimport { DropdownMenu } from '../dropdown-menu/dropdown-menu';\nimport { useAgentRegistration } from '../../agent';\nimport { tokenInsertMenuAgent } from './token-insert-menu.agent';\n\n/** One selectable merge-token. */\nexport interface TokenInsertMenuToken {\n /** Raw token text inserted verbatim (e.g. `\"{{patient.name}}\"`). */\n value: string;\n /** Human-readable label shown in the menu. Already localised by the consumer. */\n label: string;\n /** Optional section heading — when ANY token has one, the menu renders grouped. */\n group?: string;\n}\n\n/** Agent-readiness curated handle for TokenInsertMenu. */\nexport interface TokenInsertMenuHandle {\n isOpen: () => boolean;\n open: () => void;\n close: () => void;\n /** Emit a token to the consumer (mirrors a user selecting it). */\n insert: (token: string) => void;\n}\n\nexport interface TokenInsertMenuProps {\n /** The merge-tokens to offer. `value` is inserted; `label` is shown. */\n tokens: TokenInsertMenuToken[];\n /** Called with the chosen token's raw `value`. The consumer inserts it at\n * the caret of their target field — this component never owns the field. */\n onInsert: (token: string) => void;\n /** The trigger button's visible text (already localised by the consumer). */\n triggerLabel: string;\n disabled?: boolean;\n /** Opaque instance id — surfaced as `data-component-id` + agent instance id. */\n id?: string;\n /** Extra classes for the trigger button. */\n className?: string;\n}\n\ninterface TokenSection {\n heading: string;\n items: TokenInsertMenuToken[];\n}\n\nexport const TokenInsertMenu = forwardRef<\n HTMLButtonElement,\n TokenInsertMenuProps\n>(function TokenInsertMenu(\n { tokens, onInsert, triggerLabel, disabled, id, className },\n ref,\n) {\n const [open, setOpen] = useState(false);\n\n // Mirror the open flag into a ref so the agent handle reads a fresh value\n // without re-subscribing on every toggle (matches DropdownMenu.Root).\n const openRef = useRef(open);\n useEffect(() => {\n openRef.current = open;\n }, [open]);\n\n // Group tokens only when at least one carries a `group`; otherwise flat.\n const sections = useMemo<TokenSection[] | null>(() => {\n if (!tokens.some((token) => token.group)) return null;\n const order: string[] = [];\n const byGroup = new Map<string, TokenInsertMenuToken[]>();\n for (const token of tokens) {\n const key = token.group ?? '';\n const bucket = byGroup.get(key);\n if (bucket) {\n bucket.push(token);\n } else {\n byGroup.set(key, [token]);\n order.push(key);\n }\n }\n return order.map((heading) => ({\n heading,\n items: byGroup.get(heading) ?? [],\n }));\n }, [tokens]);\n\n const handle = useMemo<TokenInsertMenuHandle>(\n () => ({\n isOpen: () => openRef.current,\n open: () => setOpen(true),\n close: () => setOpen(false),\n insert: (token) => onInsert(token),\n }),\n [onInsert],\n );\n useAgentRegistration(tokenInsertMenuAgent, handle, id);\n\n const renderItem = (token: TokenInsertMenuToken) => (\n <DropdownMenu.Item\n key={token.value}\n // Raw token shown as a muted monospace hint beneath the label.\n description={\n <span className=\"ds:font-mono ds:text-muted-foreground\">\n {token.value}\n </span>\n }\n onSelect={() => onInsert(token.value)}\n >\n {token.label}\n </DropdownMenu.Item>\n );\n\n return (\n <DropdownMenu.Root\n open={open}\n // `asChild` hides the trigger's native `disabled` from Radix, so gate\n // opening here too — a disabled menu must never expand on interaction.\n onOpenChange={(next) => {\n if (disabled) return;\n setOpen(next);\n }}\n >\n <span\n className=\"ds:inline-flex\"\n data-component=\"token-insert-menu\"\n data-component-id={id}\n >\n <DropdownMenu.Trigger asChild>\n <Button\n ref={ref}\n type=\"button\"\n intent=\"outline\"\n disabled={disabled}\n className={className}\n >\n {triggerLabel}\n </Button>\n </DropdownMenu.Trigger>\n </span>\n <DropdownMenu.Content align=\"start\">\n {sections\n ? sections.map((section, index) => (\n <Fragment key={section.heading || `section-${index}`}>\n {index > 0 ? <DropdownMenu.Separator /> : null}\n <DropdownMenu.Group>\n {section.heading ? (\n <DropdownMenu.Label>{section.heading}</DropdownMenu.Label>\n ) : null}\n {section.items.map(renderItem)}\n </DropdownMenu.Group>\n </Fragment>\n ))\n : tokens.map(renderItem)}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n});\n\nTokenInsertMenu.displayName = 'TokenInsertMenu';\n"],"names":["tokenInsertMenuAgent","handle","args","TokenInsertMenu","forwardRef","tokens","onInsert","triggerLabel","disabled","id","className","ref","open","setOpen","useState","openRef","useRef","useEffect","sections","useMemo","token","order","byGroup","key","bucket","heading","useAgentRegistration","renderItem","jsx","DropdownMenu","jsxs","next","Button","section","index","Fragment"],"mappings":";;;;;AASO,MAAMA,IAA4D;AAAA,EACvE,IAAI;AAAA,EACJ,cAAc,CAAC,QAAQ,OAAO;AAAA,EAC9B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,OAAA;AAAA,IAAO;AAAA,EAClC;AAAA,EAEF,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,KAAA;AAAA,MACT;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,MAAA;AAAA,MACT;AAAA,IAAA;AAAA,IAEF,QAAQ;AAAA,MACN,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,OAAO,EAAE,MAAM,WAAS;AAAA,QACtC,UAAU,CAAC,OAAO;AAAA,MAAA;AAAA,MAEpB,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,UAAU;AAAA,QACR;AAAA,UACE,MAAM,EAAE,OAAO,mBAAA;AAAA,UACf,MAAM;AAAA,QAAA;AAAA,MACR;AAAA,MAEF,QAAQ,CAACA,GAAQC,MAA4B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C,EAAa,OAAb,EAAoB,UAAAI,EAAQ,SAAQ,IACnC;AAAA,YACHA,EAAQ,MAAM,IAAIN,CAAU;AAAA,UAAA,EAAA,CAC/B;AAAA,QAAA,EAAA,GAPaM,EAAQ,WAAW,WAAWC,CAAK,EAQlD,CACD,IACD7B,EAAO,IAAIsB,CAAU,EAAA,CAC3B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AAEDxB,EAAgB,cAAc;"}
@@ -6,7 +6,7 @@ import { c as re } from "./index-D2ZczOXr.js";
6
6
  import { useTranslation as oo } from "react-i18next";
7
7
  import { u as Go } from "./registry-DvAUVLHh.js";
8
8
  import { I as Qo } from "./icon-button-S8_weU3g.js";
9
- import { D as H } from "./dropdown-menu-D1we7oAY.js";
9
+ import { D as H } from "./dropdown-menu-CqxBthww.js";
10
10
  import { S as Zo } from "./switch-D--x7n6h.js";
11
11
  import { o as Ut, K as Xo, a0 as Jo, J as Ue, R as Ye, u as no, U as io, G as en, S as tn, w as Be, X as F, f as le, $ as at, _ as Yt, E as ut, a1 as de, H as zt, z as lt, y as on, l as st, A as ro, L as nn, t as ht, W as ct, s as ao, Y as so, x as rn, V as an, a2 as sn, a3 as $, a4 as U, a5 as cn, Z as dn, C as co, Q as ln, a6 as hn, k as Vt, T as un, O as pn, q as fn, N as mn } from "./tooth-data-DR8Kdnup.js";
12
12
  import { S as gn } from "./settings-d25ju_6L.js";
@@ -1993,4 +1993,4 @@ export {
1993
1993
  On as r,
1994
1994
  _n as t
1995
1995
  };
1996
- //# sourceMappingURL=tooth-scheme-COJJkdsi.js.map
1996
+ //# sourceMappingURL=tooth-scheme-Bd7xECuj.js.map