@alfadocs/ui-kit-debug 1.36.1 → 1.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/dist/_chunks/{agenda-tray-DYGCTIWB.js → agenda-tray-CG6jUjKc.js} +2 -2
  2. package/dist/_chunks/{agenda-tray-DYGCTIWB.js.map → agenda-tray-CG6jUjKc.js.map} +1 -1
  3. package/dist/_chunks/{anamnesis-summary-card-GYHa7VGp.js → anamnesis-summary-card-CclBbiXg.js} +2 -2
  4. package/dist/_chunks/{anamnesis-summary-card-GYHa7VGp.js.map → anamnesis-summary-card-CclBbiXg.js.map} +1 -1
  5. package/dist/_chunks/appointment-peek-5S4O1VQP.js +115 -0
  6. package/dist/_chunks/appointment-peek-5S4O1VQP.js.map +1 -0
  7. package/dist/_chunks/appointment-peek.agent-C539tNFM.js +17 -0
  8. package/dist/_chunks/appointment-peek.agent-C539tNFM.js.map +1 -0
  9. package/dist/_chunks/{appointment-timeline-ByfovxqR.js → appointment-timeline-D-rNwKpS.js} +2 -2
  10. package/dist/_chunks/{appointment-timeline-ByfovxqR.js.map → appointment-timeline-D-rNwKpS.js.map} +1 -1
  11. package/dist/_chunks/{appointment-tray-D6UyJHej.js → appointment-tray-CK2CULg_.js} +2 -2
  12. package/dist/_chunks/{appointment-tray-D6UyJHej.js.map → appointment-tray-CK2CULg_.js.map} +1 -1
  13. package/dist/_chunks/{balance-badge-cell-B0Z8Dwn8.js → balance-badge-cell-DHs5p0bA.js} +2 -2
  14. package/dist/_chunks/{balance-badge-cell-B0Z8Dwn8.js.map → balance-badge-cell-DHs5p0bA.js.map} +1 -1
  15. package/dist/_chunks/{booking-Dp-9qR6F.js → booking-x3J7sS2G.js} +3 -3
  16. package/dist/_chunks/{booking-Dp-9qR6F.js.map → booking-x3J7sS2G.js.map} +1 -1
  17. package/dist/_chunks/building-2-D33bLCWL.js +24 -0
  18. package/dist/_chunks/building-2-D33bLCWL.js.map +1 -0
  19. package/dist/_chunks/calendar-workspace-Cc1LRVWY.js +9900 -0
  20. package/dist/_chunks/calendar-workspace-Cc1LRVWY.js.map +1 -0
  21. package/dist/_chunks/{control-room-rail-Ds45_g4f.js → control-room-rail-DQoHdE1U.js} +2 -2
  22. package/dist/_chunks/{control-room-rail-Ds45_g4f.js.map → control-room-rail-DQoHdE1U.js.map} +1 -1
  23. package/dist/_chunks/{data-table-BYGK-gUJ.js → data-table-Dy1lyumT.js} +2 -2
  24. package/dist/_chunks/{data-table-BYGK-gUJ.js.map → data-table-Dy1lyumT.js.map} +1 -1
  25. package/dist/_chunks/editable-description-7ptNpJEg.js +142 -0
  26. package/dist/_chunks/editable-description-7ptNpJEg.js.map +1 -0
  27. package/dist/_chunks/editable-description.agent-Bm_LBV2j.js +21 -0
  28. package/dist/_chunks/editable-description.agent-Bm_LBV2j.js.map +1 -0
  29. package/dist/_chunks/{file-manager-DvkFgj7d.js → file-manager-UlcYQv8n.js} +3 -3
  30. package/dist/_chunks/{file-manager-DvkFgj7d.js.map → file-manager-UlcYQv8n.js.map} +1 -1
  31. package/dist/_chunks/{message-tray-BcLyaO-G.js → message-tray-CXjVsKqp.js} +2 -2
  32. package/dist/_chunks/{message-tray-BcLyaO-G.js.map → message-tray-CXjVsKqp.js.map} +1 -1
  33. package/dist/_chunks/{money.agent-Dw55UxUA.js → money-BY-HmKhZ.js} +33 -47
  34. package/dist/_chunks/money-BY-HmKhZ.js.map +1 -0
  35. package/dist/_chunks/money.agent-BjJ6gOkx.js +17 -0
  36. package/dist/_chunks/money.agent-BjJ6gOkx.js.map +1 -0
  37. package/dist/_chunks/{note-timeline-CXfSV3yX.js → note-timeline-D2oPuQP6.js} +134 -73
  38. package/dist/_chunks/note-timeline-D2oPuQP6.js.map +1 -0
  39. package/dist/_chunks/notes-panel-CkbfDDzj.js +614 -0
  40. package/dist/_chunks/notes-panel-CkbfDDzj.js.map +1 -0
  41. package/dist/_chunks/{notification-tray-CJ8jOe-U.js → notification-tray-_NoChRKi.js} +2 -2
  42. package/dist/_chunks/{notification-tray-CJ8jOe-U.js.map → notification-tray-_NoChRKi.js.map} +1 -1
  43. package/dist/_chunks/panel-subview-BNXN8OEL.js +160 -0
  44. package/dist/_chunks/panel-subview-BNXN8OEL.js.map +1 -0
  45. package/dist/_chunks/panel-subview.agent-BIBvE-IW.js +17 -0
  46. package/dist/_chunks/panel-subview.agent-BIBvE-IW.js.map +1 -0
  47. package/dist/_chunks/{patient-details-f7SSXkTJ.js → patient-details-2cIaL-Zb.js} +2 -2
  48. package/dist/_chunks/{patient-details-f7SSXkTJ.js.map → patient-details-2cIaL-Zb.js.map} +1 -1
  49. package/dist/_chunks/{patient-field-row-BQZoP4m2.js → patient-field-row-IHb2VFc2.js} +193 -172
  50. package/dist/_chunks/patient-field-row-IHb2VFc2.js.map +1 -0
  51. package/dist/_chunks/{patient-summary-card-Bz7KdUin.js → patient-summary-card-B131Q7Bp.js} +3 -3
  52. package/dist/_chunks/{patient-summary-card-Bz7KdUin.js.map → patient-summary-card-B131Q7Bp.js.map} +1 -1
  53. package/dist/_chunks/{practice-results-DOcORTkP.js → practice-results-CBNRJNnY.js} +2 -2
  54. package/dist/_chunks/{practice-results-DOcORTkP.js.map → practice-results-CBNRJNnY.js.map} +1 -1
  55. package/dist/_chunks/{product-hub-panel-C0TO69P7.js → product-hub-panel-C3bMjscm.js} +2 -2
  56. package/dist/_chunks/{product-hub-panel-C0TO69P7.js.map → product-hub-panel-C3bMjscm.js.map} +1 -1
  57. package/dist/_chunks/{reviews-panel-BaHZb_ai.js → reviews-panel-Cy969x7q.js} +2 -2
  58. package/dist/_chunks/{reviews-panel-BaHZb_ai.js.map → reviews-panel-Cy969x7q.js.map} +1 -1
  59. package/dist/_chunks/{section-card.agent-W18CHEgX.js → section-card-XR2bW1Ie.js} +20 -34
  60. package/dist/_chunks/{section-card.agent-W18CHEgX.js.map → section-card-XR2bW1Ie.js.map} +1 -1
  61. package/dist/_chunks/section-card.agent-Bz1BhM_j.js +17 -0
  62. package/dist/_chunks/section-card.agent-Bz1BhM_j.js.map +1 -0
  63. package/dist/_chunks/{signature-request-Dej2g86d.js → signature-request-b-86AGlT.js} +2 -2
  64. package/dist/_chunks/{signature-request-Dej2g86d.js.map → signature-request-b-86AGlT.js.map} +1 -1
  65. package/dist/_chunks/{skeleton-CZbwyJAA.js → skeleton-B1KTdJ4N.js} +46 -33
  66. package/dist/_chunks/skeleton-B1KTdJ4N.js.map +1 -0
  67. package/dist/_chunks/{slot-grid-8Ko6thzz.js → slot-grid-Bk3GZL1p.js} +2 -2
  68. package/dist/_chunks/{slot-grid-8Ko6thzz.js.map → slot-grid-Bk3GZL1p.js.map} +1 -1
  69. package/dist/_chunks/smartphone-DaPcFw-X.js +32 -0
  70. package/dist/_chunks/smartphone-DaPcFw-X.js.map +1 -0
  71. package/dist/_chunks/{task-card-BalrLkSz.js → task-card-qTKD1fIT.js} +39 -57
  72. package/dist/_chunks/task-card-qTKD1fIT.js.map +1 -0
  73. package/dist/_chunks/{task-tray-wl9eti6J.js → task-tray-5co9Jr2L.js} +3 -3
  74. package/dist/_chunks/{task-tray-wl9eti6J.js.map → task-tray-5co9Jr2L.js.map} +1 -1
  75. package/dist/_chunks/{tasks-panel-BDNB7hsZ.js → tasks-panel-BpH-x7U3.js} +3 -3
  76. package/dist/_chunks/{tasks-panel-BDNB7hsZ.js.map → tasks-panel-BpH-x7U3.js.map} +1 -1
  77. package/dist/_chunks/{tool-rail-Bq5eiFMG.js → tool-rail-BP8sjxCw.js} +310 -231
  78. package/dist/_chunks/tool-rail-BP8sjxCw.js.map +1 -0
  79. package/dist/_chunks/treatment-receipt-dUm99mdn.js +160 -0
  80. package/dist/_chunks/treatment-receipt-dUm99mdn.js.map +1 -0
  81. package/dist/_chunks/treatment-receipt.agent-bpFm2RPH.js +21 -0
  82. package/dist/_chunks/treatment-receipt.agent-bpFm2RPH.js.map +1 -0
  83. package/dist/_chunks/use-presence-transition-cDwWUXV-.js +58 -0
  84. package/dist/_chunks/use-presence-transition-cDwWUXV-.js.map +1 -0
  85. package/dist/_chunks/{workflow-map-D-LEni11.js → workflow-map-CXdsxvUj.js} +140 -156
  86. package/dist/_chunks/workflow-map-CXdsxvUj.js.map +1 -0
  87. package/dist/agent-catalog.json +65 -1
  88. package/dist/components/agenda-tray/index.js +1 -1
  89. package/dist/components/anamnesis-summary-card/index.js +1 -1
  90. package/dist/components/appointment-card/index.js +1 -1
  91. package/dist/components/appointment-peek/appointment-peek.agent.d.ts +3 -0
  92. package/dist/components/appointment-peek/appointment-peek.agent.d.ts.map +1 -0
  93. package/dist/components/appointment-peek/appointment-peek.d.ts +45 -0
  94. package/dist/components/appointment-peek/appointment-peek.d.ts.map +1 -0
  95. package/dist/components/appointment-peek/index.d.ts +4 -0
  96. package/dist/components/appointment-peek/index.d.ts.map +1 -0
  97. package/dist/components/appointment-peek/index.js +7 -0
  98. package/dist/components/appointment-peek/index.js.map +1 -0
  99. package/dist/components/appointment-timeline/index.js +1 -1
  100. package/dist/components/booking/index.js +1 -1
  101. package/dist/components/control-room-rail/index.js +1 -1
  102. package/dist/components/data-table/index.js +1 -1
  103. package/dist/components/editable-description/editable-description.agent.d.ts +3 -0
  104. package/dist/components/editable-description/editable-description.agent.d.ts.map +1 -0
  105. package/dist/components/editable-description/editable-description.d.ts +26 -0
  106. package/dist/components/editable-description/editable-description.d.ts.map +1 -0
  107. package/dist/components/editable-description/index.d.ts +4 -0
  108. package/dist/components/editable-description/index.d.ts.map +1 -0
  109. package/dist/components/editable-description/index.js +7 -0
  110. package/dist/components/editable-description/index.js.map +1 -0
  111. package/dist/components/file-manager/index.js +1 -1
  112. package/dist/components/index.d.ts +4 -0
  113. package/dist/components/index.d.ts.map +1 -1
  114. package/dist/components/message-tray/index.js +1 -1
  115. package/dist/components/money/index.js +2 -1
  116. package/dist/components/money/index.js.map +1 -1
  117. package/dist/components/note-timeline/index.js +1 -1
  118. package/dist/components/note-timeline/note-timeline.d.ts +8 -0
  119. package/dist/components/note-timeline/note-timeline.d.ts.map +1 -1
  120. package/dist/components/notes-panel/index.js +1 -1
  121. package/dist/components/notes-panel/notes-panel.d.ts +16 -0
  122. package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
  123. package/dist/components/notification-tray/index.js +1 -1
  124. package/dist/components/panel-subview/index.d.ts +4 -0
  125. package/dist/components/panel-subview/index.d.ts.map +1 -0
  126. package/dist/components/panel-subview/index.js +7 -0
  127. package/dist/components/panel-subview/index.js.map +1 -0
  128. package/dist/components/panel-subview/panel-subview.agent.d.ts +3 -0
  129. package/dist/components/panel-subview/panel-subview.agent.d.ts.map +1 -0
  130. package/dist/components/panel-subview/panel-subview.d.ts +32 -0
  131. package/dist/components/panel-subview/panel-subview.d.ts.map +1 -0
  132. package/dist/components/patient-details/index.js +1 -1
  133. package/dist/components/patient-summary-card/index.js +1 -1
  134. package/dist/components/patient-table/index.js +1 -1
  135. package/dist/components/practice-results/index.js +1 -1
  136. package/dist/components/product-hub-tray/index.js +1 -1
  137. package/dist/components/reviews-panel/index.js +1 -1
  138. package/dist/components/section-card/index.js +4 -3
  139. package/dist/components/section-card/index.js.map +1 -1
  140. package/dist/components/skeleton/index.d.ts +1 -1
  141. package/dist/components/skeleton/index.d.ts.map +1 -1
  142. package/dist/components/skeleton/index.js +3 -2
  143. package/dist/components/skeleton/skeleton.d.ts +12 -0
  144. package/dist/components/skeleton/skeleton.d.ts.map +1 -1
  145. package/dist/components/slot-grid/index.js +1 -1
  146. package/dist/components/task-card/index.js +1 -1
  147. package/dist/components/task-tray/index.js +1 -1
  148. package/dist/components/tasks-panel/index.js +1 -1
  149. package/dist/components/tool-rail/index.js +1 -1
  150. package/dist/components/tool-rail/tool-rail.d.ts.map +1 -1
  151. package/dist/components/treatment-receipt/index.d.ts +4 -0
  152. package/dist/components/treatment-receipt/index.d.ts.map +1 -0
  153. package/dist/components/treatment-receipt/index.js +7 -0
  154. package/dist/components/treatment-receipt/index.js.map +1 -0
  155. package/dist/components/treatment-receipt/treatment-receipt.agent.d.ts +3 -0
  156. package/dist/components/treatment-receipt/treatment-receipt.agent.d.ts.map +1 -0
  157. package/dist/components/treatment-receipt/treatment-receipt.d.ts +38 -0
  158. package/dist/components/treatment-receipt/treatment-receipt.d.ts.map +1 -0
  159. package/dist/components/workflow/index.js +1 -1
  160. package/dist/hooks/index.d.ts +1 -0
  161. package/dist/hooks/index.d.ts.map +1 -1
  162. package/dist/hooks/index.js +9 -7
  163. package/dist/hooks/index.js.map +1 -1
  164. package/dist/hooks/use-presence-transition.d.ts +40 -0
  165. package/dist/hooks/use-presence-transition.d.ts.map +1 -0
  166. package/dist/host-compat.css +7 -1
  167. package/dist/i18n/locales/ar.d.ts +29 -5
  168. package/dist/i18n/locales/ar.d.ts.map +1 -1
  169. package/dist/i18n/locales/ar.js +29 -5
  170. package/dist/i18n/locales/ar.js.map +1 -1
  171. package/dist/i18n/locales/de.d.ts +29 -5
  172. package/dist/i18n/locales/de.d.ts.map +1 -1
  173. package/dist/i18n/locales/de.js +29 -5
  174. package/dist/i18n/locales/de.js.map +1 -1
  175. package/dist/i18n/locales/el.d.ts +29 -5
  176. package/dist/i18n/locales/el.d.ts.map +1 -1
  177. package/dist/i18n/locales/el.js +29 -5
  178. package/dist/i18n/locales/el.js.map +1 -1
  179. package/dist/i18n/locales/en.d.ts +29 -5
  180. package/dist/i18n/locales/en.d.ts.map +1 -1
  181. package/dist/i18n/locales/en.js +29 -5
  182. package/dist/i18n/locales/en.js.map +1 -1
  183. package/dist/i18n/locales/es.d.ts +29 -5
  184. package/dist/i18n/locales/es.d.ts.map +1 -1
  185. package/dist/i18n/locales/es.js +29 -5
  186. package/dist/i18n/locales/es.js.map +1 -1
  187. package/dist/i18n/locales/fr.d.ts +29 -5
  188. package/dist/i18n/locales/fr.d.ts.map +1 -1
  189. package/dist/i18n/locales/fr.js +29 -5
  190. package/dist/i18n/locales/fr.js.map +1 -1
  191. package/dist/i18n/locales/hi.d.ts +29 -5
  192. package/dist/i18n/locales/hi.d.ts.map +1 -1
  193. package/dist/i18n/locales/hi.js +29 -5
  194. package/dist/i18n/locales/hi.js.map +1 -1
  195. package/dist/i18n/locales/it.d.ts +29 -5
  196. package/dist/i18n/locales/it.d.ts.map +1 -1
  197. package/dist/i18n/locales/it.js +29 -5
  198. package/dist/i18n/locales/it.js.map +1 -1
  199. package/dist/i18n/locales/ja.d.ts +29 -5
  200. package/dist/i18n/locales/ja.d.ts.map +1 -1
  201. package/dist/i18n/locales/ja.js +29 -5
  202. package/dist/i18n/locales/ja.js.map +1 -1
  203. package/dist/i18n/locales/nl.d.ts +29 -5
  204. package/dist/i18n/locales/nl.d.ts.map +1 -1
  205. package/dist/i18n/locales/nl.js +29 -5
  206. package/dist/i18n/locales/nl.js.map +1 -1
  207. package/dist/i18n/locales/pl.d.ts +29 -5
  208. package/dist/i18n/locales/pl.d.ts.map +1 -1
  209. package/dist/i18n/locales/pl.js +29 -5
  210. package/dist/i18n/locales/pl.js.map +1 -1
  211. package/dist/i18n/locales/pt.d.ts +29 -5
  212. package/dist/i18n/locales/pt.d.ts.map +1 -1
  213. package/dist/i18n/locales/pt.js +29 -5
  214. package/dist/i18n/locales/pt.js.map +1 -1
  215. package/dist/i18n/locales/ro.d.ts +29 -5
  216. package/dist/i18n/locales/ro.d.ts.map +1 -1
  217. package/dist/i18n/locales/ro.js +29 -5
  218. package/dist/i18n/locales/ro.js.map +1 -1
  219. package/dist/i18n/locales/ru.d.ts +29 -5
  220. package/dist/i18n/locales/ru.d.ts.map +1 -1
  221. package/dist/i18n/locales/ru.js +29 -5
  222. package/dist/i18n/locales/ru.js.map +1 -1
  223. package/dist/i18n/locales/sq.d.ts +29 -5
  224. package/dist/i18n/locales/sq.d.ts.map +1 -1
  225. package/dist/i18n/locales/sq.js +29 -5
  226. package/dist/i18n/locales/sq.js.map +1 -1
  227. package/dist/i18n/locales/sv.d.ts +29 -5
  228. package/dist/i18n/locales/sv.d.ts.map +1 -1
  229. package/dist/i18n/locales/sv.js +29 -5
  230. package/dist/i18n/locales/sv.js.map +1 -1
  231. package/dist/i18n/locales/tr.d.ts +29 -5
  232. package/dist/i18n/locales/tr.d.ts.map +1 -1
  233. package/dist/i18n/locales/tr.js +29 -5
  234. package/dist/i18n/locales/tr.js.map +1 -1
  235. package/dist/i18n/locales/zh.d.ts +29 -5
  236. package/dist/i18n/locales/zh.d.ts.map +1 -1
  237. package/dist/i18n/locales/zh.js +29 -5
  238. package/dist/i18n/locales/zh.js.map +1 -1
  239. package/dist/index.js +959 -940
  240. package/dist/index.js.map +1 -1
  241. package/dist/locales/ar.json +29 -5
  242. package/dist/locales/de.json +29 -5
  243. package/dist/locales/el.json +29 -5
  244. package/dist/locales/en.json +29 -5
  245. package/dist/locales/es.json +29 -5
  246. package/dist/locales/fr.json +29 -5
  247. package/dist/locales/hi.json +29 -5
  248. package/dist/locales/it.json +29 -5
  249. package/dist/locales/ja.json +29 -5
  250. package/dist/locales/nl.json +29 -5
  251. package/dist/locales/pl.json +29 -5
  252. package/dist/locales/pt.json +29 -5
  253. package/dist/locales/ro.json +29 -5
  254. package/dist/locales/ru.json +29 -5
  255. package/dist/locales/sq.json +29 -5
  256. package/dist/locales/sv.json +29 -5
  257. package/dist/locales/tr.json +29 -5
  258. package/dist/locales/zh.json +29 -5
  259. package/dist/patterns/calendar/calendar-appointment-details.d.ts +16 -7
  260. package/dist/patterns/calendar/calendar-appointment-details.d.ts.map +1 -1
  261. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +23 -23
  262. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts.map +1 -1
  263. package/dist/patterns/calendar/calendar-editor-hydration.d.ts +0 -2
  264. package/dist/patterns/calendar/calendar-editor-hydration.d.ts.map +1 -1
  265. package/dist/patterns/calendar/calendar-info-hover.d.ts +18 -0
  266. package/dist/patterns/calendar/calendar-info-hover.d.ts.map +1 -0
  267. package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
  268. package/dist/patterns/calendar/calendar.journey.d.ts +10 -0
  269. package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
  270. package/dist/patterns/calendar/calendar.sheets.d.ts +2 -2
  271. package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
  272. package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
  273. package/dist/patterns/calendar/index.js +1 -1
  274. package/dist/patterns/signature-request/index.js +1 -1
  275. package/dist/tokens.css +1 -1
  276. package/package.json +17 -1
  277. package/dist/_chunks/calendar-workspace-BYwQK7fz.js +0 -9478
  278. package/dist/_chunks/calendar-workspace-BYwQK7fz.js.map +0 -1
  279. package/dist/_chunks/hourglass-BEAzW1wE.js +0 -26
  280. package/dist/_chunks/hourglass-BEAzW1wE.js.map +0 -1
  281. package/dist/_chunks/money.agent-Dw55UxUA.js.map +0 -1
  282. package/dist/_chunks/note-timeline-CXfSV3yX.js.map +0 -1
  283. package/dist/_chunks/notes-panel-Co8D3uDd.js +0 -469
  284. package/dist/_chunks/notes-panel-Co8D3uDd.js.map +0 -1
  285. package/dist/_chunks/patient-field-row-BQZoP4m2.js.map +0 -1
  286. package/dist/_chunks/skeleton-CZbwyJAA.js.map +0 -1
  287. package/dist/_chunks/smartphone-C0rFF2if.js +0 -15
  288. package/dist/_chunks/smartphone-C0rFF2if.js.map +0 -1
  289. package/dist/_chunks/task-card-BalrLkSz.js.map +0 -1
  290. package/dist/_chunks/tool-rail-Bq5eiFMG.js.map +0 -1
  291. package/dist/_chunks/workflow-map-D-LEni11.js.map +0 -1
@@ -1,26 +0,0 @@
1
- import { c as a } from "./createLucideIcon-DhHxpK9K.js";
2
- /**
3
- * @license lucide-react v1.22.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const e = [
9
- ["path", { d: "M5 22h14", key: "ehvnwv" }],
10
- ["path", { d: "M5 2h14", key: "pdyrp9" }],
11
- [
12
- "path",
13
- {
14
- d: "M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",
15
- key: "1d314k"
16
- }
17
- ],
18
- [
19
- "path",
20
- { d: "M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2", key: "1vvvr6" }
21
- ]
22
- ], t = a("hourglass", e);
23
- export {
24
- t as H
25
- };
26
- //# sourceMappingURL=hourglass-BEAzW1wE.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hourglass-BEAzW1wE.js","sources":["../../node_modules/lucide-react/dist/esm/icons/hourglass.mjs"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M5 22h14\", key: \"ehvnwv\" }],\n [\"path\", { d: \"M5 2h14\", key: \"pdyrp9\" }],\n [\n \"path\",\n {\n d: \"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22\",\n key: \"1d314k\"\n }\n ],\n [\n \"path\",\n { d: \"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2\", key: \"1vvvr6\" }\n ]\n];\nconst Hourglass = createLucideIcon(\"hourglass\", __iconNode);\n\nexport { __iconNode, Hourglass as default };\n//# sourceMappingURL=hourglass.mjs.map\n"],"names":["__iconNode","Hourglass","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AAAA,EACE;AAAA,IACE;AAAA,IACA,EAAE,GAAG,0EAA0E,KAAK,SAAQ;AAAA,EAChG;AACA,GACMC,IAAYC,EAAiB,aAAaF,CAAU;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"money.agent-Dw55UxUA.js","sources":["../../src/components/money/money.tsx","../../src/components/money/money.agent.ts"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Money — a formatted monetary amount. */\n/* */\n/* Every price in the kit arrives as an integer in the smallest currency */\n/* unit plus an ISO-4217 code, and the kit formats it (see */\n/* `_shared/format-price`). This is the read-only leaf that renders one, */\n/* so a price is not re-implemented per surface with its own */\n/* `Intl.NumberFormat` call and its own alignment and tone decisions. */\n/* */\n/* What it adds over a bare formatted string: */\n/* - tabular figures, so a column of prices lines up on the decimal; */\n/* - the fraction can be de-emphasised or dropped when it is zero, so */\n/* the whole units read first; */\n/* - tone follows the sign when asked, so money owed reads as owed; */\n/* - the visual parts are hidden from assistive tech and the full */\n/* formatted amount is announced once, so splitting the fraction into */\n/* its own element cannot fragment what a screen reader says. */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, useMemo, type HTMLAttributes } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\n\nimport { VisuallyHidden } from '../visually-hidden';\nimport { formatPrice, formatPriceParts } from '../_shared/format-price';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst moneyVariants = cva(\n [\n 'ds:inline-flex ds:items-baseline ds:whitespace-nowrap',\n // Lining, fixed-width figures: without these a column of amounts\n // wanders because glyph widths differ between digits.\n 'ds:tabular-nums',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'type-body-sm',\n md: 'type-body',\n lg: 'type-title-item',\n },\n tone: {\n default: 'ds:text-[color:var(--foreground)]',\n muted: 'ds:text-[color:var(--muted-foreground)]',\n positive: 'ds:text-[color:var(--success-foreground)]',\n negative: 'ds:text-[color:var(--destructive)]',\n },\n strikethrough: {\n true: 'ds:line-through ds:decoration-from-font',\n false: '',\n },\n },\n defaultVariants: { size: 'md', tone: 'default', strikethrough: false },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport type MoneyDecimals = 'full' | 'muted' | 'hideWhenZero';\n\nexport interface MoneyProps\n extends\n Omit<HTMLAttributes<HTMLSpanElement>, 'children'>,\n Omit<VariantProps<typeof moneyVariants>, 'tone'> {\n /**\n * Amount in the SMALLEST currency unit (cents), the kit's price\n * convention — never a pre-formatted string. Zero-decimal currencies\n * (JPY, KRW …) take the major amount, as `formatPrice` expects.\n */\n value: number;\n /** ISO-4217 code. Defaults to EUR, the practice currency. */\n currency?: string;\n /** BCP 47 locale. Defaults to the active i18n language. */\n locale?: string;\n /**\n * Colour. `auto` follows the sign — a negative amount reads destructive,\n * everything else inherits the default. Explicit tones always win.\n */\n tone?: 'default' | 'muted' | 'positive' | 'negative' | 'auto';\n /**\n * What to do with the fraction:\n * `full` (default) leaves it alone;\n * `muted` de-emphasises it so the whole units read first;\n * `hideWhenZero` drops it ONLY when it is all zeros, so a price is\n * never rounded away in the display.\n */\n decimals?: MoneyDecimals;\n /** Force a leading `+` on positive amounts (a credit, a movement). */\n signDisplay?: 'auto' | 'always';\n}\n\n/* ------------------------------------------------------------------ */\n/* Component */\n/* ------------------------------------------------------------------ */\n\nexport const Money = forwardRef<HTMLSpanElement, MoneyProps>(\n (\n {\n value,\n currency = 'EUR',\n locale,\n size,\n tone = 'default',\n decimals = 'full',\n signDisplay = 'auto',\n strikethrough,\n className,\n ...rest\n },\n ref,\n ) => {\n const { i18n } = useTranslation();\n const resolvedLocale = locale ?? i18n.language;\n\n const { nodes, full } = useMemo(() => {\n const signOptions =\n signDisplay === 'always'\n ? ({ signDisplay: 'exceptZero' } as const)\n : {};\n const parts = formatPriceParts(\n value,\n currency,\n resolvedLocale,\n signOptions,\n );\n const plain = formatPrice(value, currency, resolvedLocale);\n\n // No parts means the locale or currency was rejected; the plain\n // string still honours the zero-decimal rule, so show that whole.\n if (!parts)\n return { nodes: [{ text: plain, muted: false }], full: plain };\n\n const text = parts.map((part) => part.value).join('');\n const fractionIsZero = parts\n .filter((part) => part.type === 'fraction')\n .every((part) => /^0+$/.test(part.value));\n\n // `decimal` and `fraction` are labelled by Intl, so this holds\n // wherever the locale puts them and whatever glyph it uses — an\n // it-IT group separator is a `group` part and is never touched.\n const isFractionPart = (type: Intl.NumberFormatPartTypes): boolean =>\n type === 'decimal' || type === 'fraction';\n\n if (decimals === 'hideWhenZero' && fractionIsZero) {\n const kept = parts.filter((part) => !isFractionPart(part.type));\n const trimmed = kept\n .map((part) => part.value)\n .join('')\n .trim();\n return { nodes: [{ text: trimmed, muted: false }], full: trimmed };\n }\n\n if (decimals === 'muted') {\n return {\n nodes: parts.map((part) => ({\n text: part.value,\n muted: isFractionPart(part.type),\n })),\n full: text,\n };\n }\n\n return { nodes: [{ text, muted: false }], full: text };\n }, [value, currency, resolvedLocale, decimals, signDisplay]);\n\n const resolvedTone =\n tone === 'auto' ? (value < 0 ? 'negative' : 'default') : tone;\n\n return (\n <span\n ref={ref}\n data-component=\"money\"\n data-currency={currency.toUpperCase()}\n className={moneyVariants({\n size,\n tone: resolvedTone,\n strikethrough,\n className,\n })}\n {...rest}\n >\n {/* The visual pieces are decorative: the amount is announced once,\n below, so a split fraction cannot be read as two numbers. */}\n {nodes.map((node, index) => (\n <span\n // Parts are positional and re-derived together, so the index is\n // the identity here.\n key={`${index}-${node.text}`}\n aria-hidden=\"true\"\n className={\n node.muted ? 'ds:opacity-70 ds:[font-size:0.85em]' : undefined\n }\n >\n {node.text}\n </span>\n ))}\n <VisuallyHidden>{full}</VisuallyHidden>\n </span>\n );\n },\n);\n\nMoney.displayName = 'Money';\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — Money. */\n/* */\n/* A read-only formatted amount. It holds no state an agent can change */\n/* and exposes no actions. The root also carries `data-currency` (the */\n/* ISO-4217 code) so a reader can tell two amounts apart without */\n/* parsing the glyph; the hook vocabulary has no slot to declare it. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\n\nexport const moneyAgent: AgentAdapter = {\n id: 'money',\n capabilities: [],\n state: {},\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'money',\n description: 'Marks the element as a kit Money amount.',\n },\n },\n};\n"],"names":["moneyVariants","cva","Money","forwardRef","value","currency","locale","size","tone","decimals","signDisplay","strikethrough","className","rest","ref","i18n","useTranslation","resolvedLocale","nodes","full","useMemo","parts","formatPriceParts","plain","formatPrice","text","part","fractionIsZero","isFractionPart","type","trimmed","resolvedTone","jsxs","node","index","jsx","VisuallyHidden","moneyAgent"],"mappings":";;;;;;AA8BA,MAAMA,IAAgBC;AAAA,EACpB;AAAA,IACE;AAAA;AAAA;AAAA,IAGA;AAAA,EAAA,EACA,KAAK,GAAG;AAAA,EACV;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,MAEN,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,OAAO;AAAA,QACP,UAAU;AAAA,QACV,UAAU;AAAA,MAAA;AAAA,MAEZ,eAAe;AAAA,QACb,MAAM;AAAA,QACN,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,iBAAiB,EAAE,MAAM,MAAM,MAAM,WAAW,eAAe,GAAA;AAAA,EAAM;AAEzE,GA2CaC,IAAQC;AAAA,EACnB,CACE;AAAA,IACE,OAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,QAAAC;AAAA,IACA,MAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,UAAAC,IAAW;AAAA,IACX,aAAAC,IAAc;AAAA,IACd,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,EAAE,MAAAC,EAAA,IAASC,EAA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AAUJ,IAAQ,IAAI,aAAa,YAAaI;AAE3D,WACE,gBAAAwB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAlB;AAAA,QACA,kBAAe;AAAA,QACf,iBAAeT,EAAS,YAAA;AAAA,QACxB,WAAWL,EAAc;AAAA,UACvB,MAAAO;AAAA,UACA,MAAMwB;AAAA,UACN,eAAApB;AAAA,UACA,WAAAC;AAAA,QAAA,CACD;AAAA,QACA,GAAGC;AAAA,QAIH,UAAA;AAAA,UAAAK,EAAM,IAAI,CAACe,GAAMC,MAChB,gBAAAC;AAAA,YAAC;AAAA,YAAA;AAAA,cAIC,eAAY;AAAA,cACZ,WACEF,EAAK,QAAQ,wCAAwC;AAAA,cAGtD,UAAAA,EAAK;AAAA,YAAA;AAAA,YAND,GAAGC,CAAK,IAAID,EAAK,IAAI;AAAA,UAAA,CAQ7B;AAAA,UACD,gBAAAE,EAACC,KAAgB,UAAAjB,EAAA,CAAK;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG5B;AACF;AAEAjB,EAAM,cAAc;ACpMb,MAAMmC,IAA2B;AAAA,EACtC,IAAI;AAAA,EACJ,cAAc,CAAA;AAAA,EACd,OAAO,CAAA;AAAA,EACP,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"note-timeline-CXfSV3yX.js","sources":["../../src/components/note-timeline/note-timeline.agent.ts","../../src/components/note-timeline/note-timeline.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — NoteTimeline. */\n/* */\n/* Read-only presentation surface. Exposes the STRUCTURE of the rendered */\n/* rows — ids plus pinned / flagged / clinical flags — and how many rows */\n/* survived `maxItems`, so a future MCP UI bridge can locate and describe */\n/* what is on screen. It NEVER reads a note body, an author or a date: */\n/* all three are PHI and stay out of the agent layer, exactly as the */\n/* ClinicalNoteCard adapter does. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { NoteTimelineHandle } from './note-timeline';\n\nexport const noteTimelineAgent: AgentAdapter<NoteTimelineHandle> = {\n id: 'note-timeline',\n capabilities: [],\n state: {\n notes: {\n type: 'Array<{ id?: string; pinned: boolean; flagged: boolean; clinical: boolean }>',\n descriptionKey: 'ui.agent.noteTimeline.state.notes',\n description:\n 'Structural snapshot of the rendered rows: ids and flags only, never note content or author.',\n read: (handle) => handle.getNotes(),\n },\n visibleCount: {\n type: 'number',\n descriptionKey: 'ui.agent.noteTimeline.state.visibleCount',\n description:\n 'How many notes are rendered, after the maxItems cap is applied.',\n read: (handle) => handle.getVisibleCount(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'note-timeline',\n description:\n 'Marks the NoteTimeline root. Emits data-empty when there is nothing to show.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop — addresses a specific timeline.',\n },\n },\n};\n","import {\n forwardRef,\n useMemo,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Flag, Pin } from 'lucide-react';\nimport { SafeHtml } from '../_shared/safe-html';\nimport { noteMarkdownToHtml } from '../_shared/note-markdown';\nimport {\n NoteAttachmentChip,\n type NoteAttachment,\n} from '../_shared/note-attachment';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { noteTimelineAgent } from './note-timeline.agent';\n\n/* -------------------------------------------------------------------- */\n/* NoteTimeline */\n/* */\n/* A compact dated list of notes — the reading surface for a handful of */\n/* recent notes beside something else (an appointment, a care plan), */\n/* where a full ClinicalNoteCard per note would swamp the panel. */\n/* */\n/* It takes the SAME note objects a host already gives NotesPanel, so a */\n/* page can show a preview here and the full panel elsewhere without */\n/* reshaping its data. */\n/* */\n/* Deliberately READ-ONLY and deliberately without a \"+N more\" footer: */\n/* it shows the first `maxItems` and stops. The host owns the affordance */\n/* that opens the rest, because only the host knows where the rest live. */\n/* */\n/* Pinned and flagged are never colour-only: each carries a glyph and an */\n/* `sr-only` label, so the state survives greyscale, forced colours and */\n/* a screen reader (05-accessibility.mdx §Colour is not the only cue). */\n/* -------------------------------------------------------------------- */\n\n/** The note author — name, plus an optional avatar the timeline never shows. */\nexport interface NoteTimelineAuthor {\n /** Display name. */\n name: string;\n /** Optional avatar image URL. Unused here; kept so a `NotesPanelNote`\n * passes straight through without reshaping. */\n avatarUrl?: string;\n}\n\n/**\n * One note. Structurally a subset of `NotesPanelNote` / `ClinicalNoteCardProps`\n * so a host can pass the very objects it already gives `NotesPanel`.\n */\nexport interface NoteTimelineNote {\n /** Stable identifier. Surfaced as `data-note-id` — the ONLY note field that\n * ever reaches an attribute, because it is the only one that is not PHI. */\n id?: string;\n /** ISO-8601 timestamp the note refers to (the clinical date). Drives the\n * date gutter and the sort. */\n dateIso: string;\n /** ISO-8601 timestamp the note was written, when it differs from `dateIso`. */\n createdAtIso?: string;\n /** Who wrote it. Omit for a system-generated note — the byline is then\n * dropped entirely rather than rendered empty. */\n author?: NoteTimelineAuthor;\n /** The note body. */\n content: string;\n /** How `content` is authored. `'markdown'` (default) runs the small Markdown\n * subset through the shared converter; `'html'` treats it as rich HTML.\n * Either way `SafeHtml` is the only carrier. */\n contentFormat?: 'markdown' | 'html';\n /** Pinned notes sort to the top and take an accent dot. */\n pinned?: boolean;\n /** Flagged for follow-up — a warning dot and a Flag glyph. */\n flagged?: boolean;\n /** The entity the note is bound to; renders the shared attachment chip. */\n attachedTo?: NoteAttachment;\n /** Whether the note is clinical. Structural only — it drives no styling\n * here, but it is carried so the same objects serve both surfaces. */\n clinical?: boolean;\n}\n\n/** Imperative handle for the agent runtime — identifiers / flags only. */\nexport interface NoteTimelineHandle {\n /** Structural snapshot of the RENDERED rows: ids + flags, never a body or\n * an author (both PHI). */\n getNotes: () => Array<{\n id?: string;\n pinned: boolean;\n flagged: boolean;\n clinical: boolean;\n }>;\n /** How many rows are rendered, after `maxItems` is applied. */\n getVisibleCount: () => number;\n}\n\nconst rowVariants = cva(\n [\n // Named group so the rail's connector can ask \"is my ROW the last one?\".\n // A bare `last:` on the rail asks \"am I the last child of my row?\", which\n // is never true — it is the middle of three — so the line ran on past the\n // final dot and read as more content below.\n 'ds:group/note-row ds:relative ds:flex ds:gap-[var(--spacing-sm)]',\n 'ds:pb-3 ds:last:pb-0',\n ].join(' '),\n);\n\nconst bodyVariants = cva(\n [\n 'type-body-sm ds:[overflow-wrap:break-word]',\n // `[&_p]:m-0` — the converter wraps each block in <p>; the timeline\n // controls its own rhythm, so the paragraph margins are dropped.\n 'ds:[&_p]:m-0',\n ].join(' '),\n {\n variants: {\n // Literal classes, one per supported value: Tailwind generates what it\n // can see in the source, so an interpolated arbitrary value emits\n // nothing and the body would silently never clamp.\n lines: {\n 1: 'ds:line-clamp-1',\n 2: 'ds:line-clamp-2',\n 3: 'ds:line-clamp-3',\n 4: 'ds:line-clamp-4',\n 5: 'ds:line-clamp-5',\n },\n },\n defaultVariants: { lines: 3 },\n },\n);\n\nconst dotVariants = cva(\n [\n 'ds:absolute ds:top-1 ds:start-0 ds:size-[9px]',\n 'ds:rounded-[var(--radius-full)] ds:border-2',\n 'ds:bg-[color:var(--background)]',\n 'ds:forced-colors:border-[CanvasText]',\n ].join(' '),\n {\n variants: {\n tone: {\n default: 'ds:border-[color:var(--border)]',\n pinned: [\n 'ds:border-[color:var(--accent)]',\n 'ds:bg-[color:color-mix(in_srgb,var(--accent)_20%,var(--background))]',\n ].join(' '),\n flagged: [\n 'ds:border-[color:var(--warning-readable)]',\n 'ds:bg-[color:color-mix(in_srgb,var(--warning-readable)_20%,var(--background))]',\n ].join(' '),\n },\n },\n defaultVariants: { tone: 'default' },\n },\n);\n\nexport interface NoteTimelineProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'children'>,\n VariantProps<typeof rowVariants> {\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n /** The notes. Sorted pinned-first, then `dateIso` descending. */\n notes: readonly NoteTimelineNote[];\n /** How many rows to render after sorting. Default 3. The remainder is NOT\n * counted or footered here — the host owns that affordance. */\n maxItems?: number;\n /** Lines each note body clamps to. Default 3. */\n lines?: 1 | 2 | 3 | 4 | 5;\n /** Locale for the date gutter. Defaults to the active i18n language. */\n locale?: string;\n /** Rendered in place of the list when `notes` is empty. */\n emptyState?: ReactNode;\n /** Accessible name for the list region. Defaults to `ui.noteTimeline.regionLabel`. */\n 'aria-label'?: string;\n}\n\n/** Pinned first, then newest by `dateIso`. Stable for equal dates. */\nfunction sortNotes(\n notes: readonly NoteTimelineNote[],\n): readonly NoteTimelineNote[] {\n return [...notes].sort((a, b) => {\n if (!!a.pinned !== !!b.pinned) return a.pinned ? -1 : 1;\n return b.dateIso.localeCompare(a.dateIso);\n });\n}\n\nexport const NoteTimeline = forwardRef<HTMLDivElement, NoteTimelineProps>(\n (\n {\n id,\n notes,\n maxItems = 3,\n lines = 3,\n locale,\n emptyState,\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const resolvedLocale = locale ?? i18n.language;\n\n const visible = useMemo(\n () => sortNotes(notes).slice(0, Math.max(0, maxItems)),\n [notes, maxItems],\n );\n\n // Two formatters, not one: the gutter stacks \"20 JUN\" over \"2026\", so the\n // day/month and the year are formatted apart and both stay locale-aware.\n const fmt = useMemo(\n () => ({\n dayMonth: new Intl.DateTimeFormat(resolvedLocale, {\n day: 'numeric',\n month: 'short',\n }),\n year: new Intl.DateTimeFormat(resolvedLocale, { year: 'numeric' }),\n }),\n [resolvedLocale],\n );\n\n useAgentRegistration(\n noteTimelineAgent,\n {\n getNotes: () =>\n visible.map((note) => ({\n id: note.id,\n pinned: !!note.pinned,\n flagged: !!note.flagged,\n clinical: !!note.clinical,\n })),\n getVisibleCount: () => visible.length,\n },\n id,\n );\n\n if (visible.length === 0) {\n return (\n <div\n ref={ref}\n data-component=\"note-timeline\"\n data-component-id={id}\n data-empty=\"\"\n className={className}\n {...rest}\n >\n {emptyState}\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n data-component=\"note-timeline\"\n data-component-id={id}\n role=\"list\"\n aria-label={ariaLabel ?? t('noteTimeline.regionLabel')}\n className={['ds:flex ds:flex-col', className ?? ''].join(' ').trim()}\n {...rest}\n >\n {visible.map((note) => {\n const date = new Date(note.dateIso);\n const tone = note.pinned\n ? ('pinned' as const)\n : note.flagged\n ? ('flagged' as const)\n : ('default' as const);\n const html =\n note.contentFormat === 'html'\n ? note.content\n : noteMarkdownToHtml(note.content);\n\n return (\n <div\n key={note.id ?? note.dateIso}\n role=\"listitem\"\n /* id ONLY. Body, author and dates are PHI and never reach an\n attribute, where a DOM scrape or a screenshot would carry\n them out of the component. */\n data-note-id={note.id}\n data-pinned={note.pinned ? '' : undefined}\n data-flagged={note.flagged ? '' : undefined}\n className={rowVariants()}\n >\n {/* 1 — date gutter */}\n {/* Sized from the --type-meta-size ROLE token, not the raw\n --font-size-2xs ramp step: `.theme-accessible` scales type by\n re-pointing the role aliases (meta xs → sm), so a raw ramp\n value would stay 10px for exactly the readers who asked for\n bigger text. The token rather than the `type-meta` CLASS,\n because that class also sets transform / weight / tracking\n and would quietly flatten the gutter's own treatment. */}\n <div className=\"ds:w-12 ds:shrink-0 ds:pt-px ds:text-end ds:text-[length:var(--type-meta-size)] ds:leading-[1.3]\">\n <div className=\"ds:font-semibold ds:tracking-[0.03em] ds:uppercase\">\n {fmt.dayMonth.format(date)}\n </div>\n <div className=\"ds:text-[color:var(--muted-foreground)]\">\n {fmt.year.format(date)}\n </div>\n </div>\n\n {/* 2 — rail: dot over the connector. The connector is a\n pseudo-element so it never lands in the a11y tree, and it is\n hidden on the last row rather than dangling into nothing. */}\n <div\n aria-hidden=\"true\"\n className={[\n 'ds:relative ds:w-[9px] ds:shrink-0',\n 'ds:before:absolute ds:before:start-[4px] ds:before:top-[14px]',\n 'ds:before:bottom-[-12px] ds:before:w-px',\n 'ds:before:bg-[color:var(--border)] ds:before:content-[\"\"]',\n 'ds:group-last/note-row:before:hidden',\n ].join(' ')}\n >\n <span className={dotVariants({ tone })} />\n </div>\n\n {/* 3 — body + byline */}\n <div className=\"ds:min-w-0 ds:flex-1\">\n <SafeHtml\n html={html}\n profile={\n note.contentFormat === 'html' ? 'rich-text' : 'markdown'\n }\n className={bodyVariants({ lines })}\n />\n {note.author ||\n note.pinned ||\n note.flagged ||\n note.attachedTo ? (\n <div className=\"ds:mt-[var(--spacing-2xs)] ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)] type-meta ds:text-[color:var(--muted-foreground)]\">\n {note.author ? <span>{note.author.name}</span> : null}\n {note.pinned ? (\n <span className=\"ds:inline-flex ds:items-center\">\n <Pin\n aria-hidden=\"true\"\n className=\"ds:size-3 ds:text-[color:var(--accent)]\"\n />\n <span className=\"ds:sr-only\">\n {t('noteTimeline.pinned')}\n </span>\n </span>\n ) : null}\n {note.flagged ? (\n <span className=\"ds:inline-flex ds:items-center\">\n <Flag\n aria-hidden=\"true\"\n className=\"ds:size-3 ds:text-[color:var(--warning-readable)]\"\n />\n <span className=\"ds:sr-only\">\n {t('noteTimeline.flagged')}\n </span>\n </span>\n ) : null}\n <NoteAttachmentChip attachedTo={note.attachedTo} />\n </div>\n ) : null}\n </div>\n </div>\n );\n })}\n </div>\n );\n },\n);\n\nNoteTimeline.displayName = 'NoteTimeline';\n"],"names":["noteTimelineAgent","handle","rowVariants","cva","bodyVariants","dotVariants","sortNotes","notes","a","b","NoteTimeline","forwardRef","id","maxItems","lines","locale","emptyState","ariaLabel","className","rest","ref","t","i18n","useTranslation","resolvedLocale","visible","useMemo","fmt","useAgentRegistration","note","jsx","date","tone","html","noteMarkdownToHtml","jsxs","SafeHtml","Pin","Flag","NoteAttachmentChip"],"mappings":";;;;;;;AAcO,MAAMA,IAAsD;AAA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jB,EAAE,sBAAsB,EAAA,CAC3B;AAAA,oBAAA,EAAA,CACF,IACE;AAAA,oBACJ,gBAAAS,EAACS,GAAA,EAAmB,YAAYV,EAAK,WAAA,CAAY;AAAA,kBAAA,EAAA,CACnD,IACE;AAAA,gBAAA,EAAA,CACN;AAAA,cAAA;AAAA,YAAA;AAAA,YAnFKA,EAAK,MAAMA,EAAK;AAAA,UAAA;AAAA,QAsF3B,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAnB,EAAa,cAAc;"}
@@ -1,469 +0,0 @@
1
- import { jsxs as l, jsx as t, Fragment as Ie } from "react/jsx-runtime";
2
- import { forwardRef as Ee, useRef as c, useState as P, useId as ze, useCallback as O, useEffect as Se, useImperativeHandle as He, useMemo as Le } from "react";
3
- import { c as _e } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Be } from "react-i18next";
5
- import { u as qe } from "./registry-DvAUVLHh.js";
6
- import { C as Ke } from "./clinical-note-card-DdsGYMmI.js";
7
- import { R as Me } from "./rich-text-editor-BTXlorm5.js";
8
- import { T as We } from "./text-area-Bt3p7Pt0.js";
9
- import { A as C } from "./alert-CiQ5Pa3Q.js";
10
- import { B as A } from "./button-nJaPh_HC.js";
11
- import { I as Fe } from "./icon-button-8xqRnkdG.js";
12
- import { C as Oe } from "./checkbox-CZkipDn7.js";
13
- import { S as De } from "./spinner-hbwuKwMf.js";
14
- import { D as f } from "./dialog-BJiLqhx6.js";
15
- import { P as Ge } from "./panel-header-D_mTdhUp.js";
16
- import { a as Ye, u as Je, R as Qe } from "./use-list-reflow-Cw43nxw5.js";
17
- import { u as Ue } from "./use-theme-CAuo6EYT.js";
18
- import { N as Xe } from "./notebook-pen-CO7HoM-W.js";
19
- import { T as Ze } from "./trash-2-uumy3fy1.js";
20
- function ie(i, s) {
21
- return typeof i == "object" && i !== null && "message" in i && typeof i.message == "string" && i.message.trim() ? i.message : s;
22
- }
23
- const $e = {
24
- id: "notes-panel",
25
- // 'submit' backs add_note (compose + commit a note). pin / flag are toggles
26
- // with no dedicated capability in the closed vocabulary.
27
- capabilities: ["submit"],
28
- state: {
29
- notes: {
30
- type: "Array<{ id?: string; pinned: boolean; flagged: boolean; clinical: boolean }>",
31
- descriptionKey: "ui.agent.notesPanel.state.notes",
32
- description: "Timeline note ids + pinned / flagged / clinical flags. Never the note body or author (both PHI).",
33
- read: (i) => i.getNotes()
34
- },
35
- canAddClinical: {
36
- type: "boolean",
37
- descriptionKey: "ui.agent.notesPanel.state.canAddClinical",
38
- description: "Whether the current user may write clinical notes (the practice_add_clinical_note permission gate).",
39
- read: (i) => i.canAddClinical()
40
- },
41
- currentNoteId: {
42
- type: "string | null",
43
- descriptionKey: "ui.agent.notesPanel.state.currentNoteId",
44
- description: "Id of the note the host has addressed — the one marked, scrolled to and focused. Null when none is. An id only, never note content.",
45
- read: (i) => i.getCurrentNoteId()
46
- }
47
- },
48
- actions: {
49
- add_note: {
50
- // Writes a clinical/admin note body — patient-identifiable content. PHI.
51
- safety: "phi",
52
- argsType: "{ content: string; clinical: boolean }",
53
- argsSchema: {
54
- type: "object",
55
- properties: {
56
- content: {
57
- type: "string",
58
- description: "Note body. Rich HTML for the rich composer, else plain text."
59
- },
60
- clinical: {
61
- type: "boolean",
62
- description: "Whether the note is clinical. Requires the clinical-note permission; the submission is dropped when the gate is closed."
63
- }
64
- },
65
- required: ["content", "clinical"]
66
- },
67
- openWorld: !0,
68
- descriptionKey: "ui.agent.notesPanel.actions.addNote",
69
- description: "Compose and commit a new note. A clinical note requires the clinical-note permission (read canAddClinical first).",
70
- examples: [
71
- {
72
- args: { content: "Patient reported improvement.", clinical: !0 },
73
- note: "Add a clinical note."
74
- }
75
- ],
76
- invoke: (i, s) => i.addNote(s)
77
- },
78
- toggle_pin: {
79
- // Re-orders the timeline (pinned notes lead) — reversible view write.
80
- safety: "write",
81
- argsType: "{ id: string }",
82
- argsSchema: {
83
- type: "object",
84
- properties: { id: { type: "string" } },
85
- required: ["id"]
86
- },
87
- idempotent: !1,
88
- descriptionKey: "ui.agent.notesPanel.actions.togglePin",
89
- description: "Toggle the pinned state of the note with the given id. Refused for a deleted note or one whose actions.pin is false.",
90
- invoke: (i, s) => {
91
- i.togglePin(s.id);
92
- }
93
- },
94
- toggle_flag: {
95
- safety: "write",
96
- argsType: "{ id: string }",
97
- argsSchema: {
98
- type: "object",
99
- properties: { id: { type: "string" } },
100
- required: ["id"]
101
- },
102
- idempotent: !1,
103
- descriptionKey: "ui.agent.notesPanel.actions.toggleFlag",
104
- description: "Toggle the flagged state of the note with the given id.",
105
- invoke: (i, s) => {
106
- i.toggleFlag(s.id);
107
- }
108
- }
109
- },
110
- domHooks: {
111
- root: {
112
- attr: "data-component",
113
- value: "notes-panel",
114
- description: "Marks the NotesPanel region."
115
- },
116
- instanceId: {
117
- attr: "data-component-id",
118
- sourceProp: "id",
119
- description: "Sourced from the id prop. Required to address a specific notes panel from the agent."
120
- }
121
- }
122
- }, en = _e(
123
- "ds:flex ds:flex-col ds:rounded-[var(--radius-md)] ds:border-s-2 ds:ps-[var(--spacing-sm)]",
124
- {
125
- variants: {
126
- current: {
127
- true: "ds:border-[color:var(--info)] ds:bg-[color:var(--info)]/10 ds:focus:outline-[length:var(--focus-ring-width)] ds:focus:outline-solid ds:focus:outline-[color:var(--ring)] ds:focus:outline-offset-[length:var(--focus-ring-offset)]",
128
- false: "ds:border-transparent"
129
- }
130
- },
131
- defaultVariants: { current: !1 }
132
- }
133
- ), nn = "ds:opacity-0", tn = [
134
- "ds:transition-opacity ds:duration-[var(--animation-duration)]",
135
- "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
136
- ].join(" ");
137
- function re(i) {
138
- return i ? /<img\b/i.test(i) ? !0 : i.replace(/<[^>]*>/g, "").replace(/&nbsp;/gi, " ").trim().length > 0 : !1;
139
- }
140
- const Rn = Ee(
141
- function({
142
- id: s,
143
- notes: I,
144
- onAddNote: m,
145
- status: E = "ready",
146
- onRetry: D,
147
- currentNoteId: g,
148
- currentNoteKey: ae,
149
- composer: x = "rich",
150
- editorToolbar: se = "standard",
151
- redactor: oe,
152
- imageUploadUrl: le,
153
- showClinicalToggle: G = !0,
154
- canAddClinicalNote: R = !0,
155
- clinicalGatedReason: de,
156
- defaultClinical: z = !1,
157
- onRequestAiDraft: ce,
158
- aiDraftFormat: ue,
159
- aiPrivacyNotice: fe,
160
- onDictate: pe,
161
- onProofread: me,
162
- onAutoFormat: ge,
163
- onTogglePin: w,
164
- onToggleFlag: k,
165
- noteActions: Y,
166
- onDeleteNote: u,
167
- confirmDelete: S = !0,
168
- title: he,
169
- composerPlaceholder: ve,
170
- addNoteLabel: ye,
171
- emptyState: be,
172
- className: Pe,
173
- "aria-label": H,
174
- ...Ce
175
- }, xe) {
176
- const { t: r } = Be(), L = c(null), [h, _] = P(""), [B, J] = P(z), [v, Q] = P(!1), [U, q] = P(null), Re = he ?? r("notesPanel.title", { defaultValue: "Notes" }), X = ze(), Z = ve ?? r("notesPanel.placeholder", { defaultValue: "Add a note…" }), $ = r("notesPanel.composerLabel", {
177
- defaultValue: "New note"
178
- }), we = x === "rich" ? re(h) : h.trim().length > 0, ke = O(() => {
179
- var o;
180
- if (!m || v) return;
181
- const e = x === "rich", n = e ? ((o = L.current) == null ? void 0 : o.getHTML()) ?? h : h.trim();
182
- if (e ? !re(n) : !n) return;
183
- const p = () => {
184
- var d;
185
- e && ((d = L.current) == null || d.clear()), _(""), J(z);
186
- };
187
- q(null);
188
- let a;
189
- try {
190
- a = m({ content: n, clinical: B });
191
- } catch (d) {
192
- q(ie(d, r("notesPanel.addFailed")));
193
- return;
194
- }
195
- if (!a || typeof a.then != "function") return p();
196
- Q(!0), Promise.resolve(a).then(
197
- p,
198
- (d) => q(ie(d, r("notesPanel.addFailed")))
199
- ).finally(() => Q(!1));
200
- }, [x, h, B, z, m, v, r]), K = [...I].sort(
201
- (e, n) => Number(n.pinned ?? !1) - Number(e.pinned ?? !1)
202
- ), { resolvedTheme: Ne } = Ue(), ee = Ne.endsWith("-accessible") || void 0, { containerRef: Ve } = Ye({
203
- key: K.map((e) => e.id).join(),
204
- reduceMotion: ee
205
- }), y = Je({ reduceMotion: ee }), [N, V] = P(null), Te = O(
206
- (e) => {
207
- u && (S ? V(e) : y.leave(e, () => u(e)));
208
- },
209
- [S, y, u]
210
- ), je = O(() => {
211
- if (!N || !u) return;
212
- const e = N;
213
- V(null), y.leave(e, () => u(e));
214
- }, [N, u, y]), M = c(null);
215
- Se(() => {
216
- var e, n;
217
- g && ((e = M.current) == null || e.scrollIntoView({ block: "center" }), (n = M.current) == null || n.focus());
218
- }, [g, ae]);
219
- const W = c(I);
220
- W.current = I;
221
- const b = c(m);
222
- b.current = m;
223
- const T = c(w);
224
- T.current = w;
225
- const j = c(k);
226
- j.current = k;
227
- const F = c(R);
228
- F.current = R;
229
- const ne = c(g);
230
- ne.current = g;
231
- const te = c(null);
232
- He(xe, () => te.current, []);
233
- const Ae = Le(
234
- () => ({
235
- // Ids + flags only — never the note body or author (both PHI).
236
- getNotes: () => W.current.map((e) => ({
237
- id: e.id,
238
- pinned: !!e.pinned,
239
- flagged: !!e.flagged,
240
- clinical: !!e.clinical
241
- })),
242
- canAddNote: () => !!b.current,
243
- canAddClinical: () => F.current,
244
- getCurrentNoteId: () => ne.current ?? null,
245
- addNote: (e) => {
246
- var n;
247
- if (!(e.clinical && !F.current))
248
- return (n = b.current) == null ? void 0 : n.call(b, e);
249
- },
250
- togglePin: (e) => {
251
- var p, a;
252
- const n = W.current.find((o) => o.id === e);
253
- n && (n.deleted || ((p = n.actions) == null ? void 0 : p.pin) === !1) || (a = T.current) == null || a.call(T, e);
254
- },
255
- toggleFlag: (e) => {
256
- var n;
257
- return (n = j.current) == null ? void 0 : n.call(j, e);
258
- }
259
- }),
260
- []
261
- );
262
- return qe($e, Ae, s), /* @__PURE__ */ l(
263
- "section",
264
- {
265
- ref: te,
266
- "data-component": "notes-panel",
267
- "data-component-id": s,
268
- "aria-labelledby": H ? void 0 : X,
269
- "aria-label": H,
270
- className: ["ds:flex ds:flex-col", Pe].filter(Boolean).join(" "),
271
- ...Ce,
272
- children: [
273
- /* @__PURE__ */ t(
274
- Ge,
275
- {
276
- title: Re,
277
- icon: /* @__PURE__ */ t(Xe, { "aria-hidden": "true" }),
278
- headingId: H ? void 0 : X,
279
- sticky: !0,
280
- divider: !0
281
- }
282
- ),
283
- /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
284
- m ? /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
285
- x === "rich" ? /* @__PURE__ */ t(
286
- Me,
287
- {
288
- ref: L,
289
- ariaLabel: $,
290
- placeholder: Z,
291
- toolbar: se,
292
- minHeight: "fill",
293
- redactor: oe,
294
- imageUploadUrl: le,
295
- readOnly: v,
296
- onChange: ({ html: e }) => _(e),
297
- onRequestAiDraft: ce,
298
- aiDraftFormat: ue,
299
- aiPrivacyNotice: fe,
300
- onDictate: pe,
301
- onProofread: me,
302
- onAutoFormat: ge
303
- }
304
- ) : /* @__PURE__ */ t(
305
- We,
306
- {
307
- value: h,
308
- readOnly: v,
309
- onChange: (e) => _(e.target.value),
310
- placeholder: Z,
311
- autoResize: !0,
312
- minRows: 2,
313
- maxRows: 6,
314
- "aria-label": $
315
- }
316
- ),
317
- /* @__PURE__ */ l(
318
- "div",
319
- {
320
- className: [
321
- "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
322
- G ? "ds:justify-between" : "ds:justify-end"
323
- ].join(" "),
324
- children: [
325
- G ? /* @__PURE__ */ t(
326
- Oe,
327
- {
328
- size: "sm",
329
- label: r("notesPanel.clinicalToggle", {
330
- defaultValue: "Clinical note"
331
- }),
332
- checked: B,
333
- onCheckedChange: (e) => J(e === !0),
334
- disabled: v || !R,
335
- disabledReason: R ? void 0 : de ?? r("notesPanel.clinicalGated", {
336
- defaultValue: "You do not have permission to write clinical notes."
337
- })
338
- }
339
- ) : null,
340
- /* @__PURE__ */ t(
341
- A,
342
- {
343
- type: "button",
344
- size: "sm",
345
- onClick: ke,
346
- disabled: !we,
347
- loading: v,
348
- children: ye ?? r("notesPanel.add", { defaultValue: "Add note" })
349
- }
350
- )
351
- ]
352
- }
353
- ),
354
- U ? /* @__PURE__ */ t(C, { variant: "error", children: /* @__PURE__ */ t(C.Description, { children: U }) }) : null
355
- ] }) : null,
356
- E === "loading" ? /* @__PURE__ */ l("p", { className: "ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-xs)] type-body-sm ds:text-[color:var(--muted-foreground)]", children: [
357
- /* @__PURE__ */ t(De, { size: "sm", label: r("notesPanel.loading") }),
358
- /* @__PURE__ */ t("span", { "aria-hidden": "true", children: r("notesPanel.loading") })
359
- ] }) : E === "error" ? /* @__PURE__ */ l(C, { variant: "error", children: [
360
- /* @__PURE__ */ t(C.Description, { children: r("notesPanel.loadError") }),
361
- D ? /* @__PURE__ */ t(C.Action, { children: /* @__PURE__ */ t(A, { intent: "secondary", size: "sm", onClick: D, children: r("notesPanel.retry") }) }) : null
362
- ] }) : null,
363
- K.length > 0 ? /* @__PURE__ */ t(
364
- "ul",
365
- {
366
- ref: Ve,
367
- className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0",
368
- children: K.map(({ actions: e, ...n }, p) => {
369
- const a = g != null && n.id === g, o = n.id, d = o != null && y.isLeaving(o);
370
- return /* @__PURE__ */ l(
371
- "li",
372
- {
373
- ref: a ? M : void 0,
374
- tabIndex: a ? -1 : void 0,
375
- "aria-current": a ? "true" : void 0,
376
- "data-reflow-id": o,
377
- "data-leaving": d ? "" : void 0,
378
- className: [
379
- en({ current: a }),
380
- tn,
381
- Qe,
382
- d ? nn : ""
383
- ].filter(Boolean).join(" "),
384
- children: [
385
- a ? /* @__PURE__ */ t("span", { className: "ds:sr-only", children: r("notesPanel.current", {
386
- defaultValue: "Current note"
387
- }) }) : null,
388
- /* @__PURE__ */ t(
389
- Ke,
390
- {
391
- surface: "elevated",
392
- truncate: !a,
393
- headerActions: /* @__PURE__ */ l(Ie, { children: [
394
- Y ? Y({ ...n, actions: e }) : null,
395
- u && o && !n.deleted ? /* @__PURE__ */ t(
396
- Fe,
397
- {
398
- icon: /* @__PURE__ */ t(Ze, {}),
399
- intent: "ghost",
400
- size: "sm",
401
- "aria-label": r("notesPanel.delete", {
402
- defaultValue: "Delete note"
403
- }),
404
- onClick: () => Te(o)
405
- }
406
- ) : null
407
- ] }),
408
- ...n,
409
- onTogglePin: w && n.id && (e == null ? void 0 : e.pin) !== !1 && !n.deleted ? () => w(n.id) : void 0,
410
- onToggleFlag: k && n.id ? () => k(n.id) : void 0
411
- }
412
- )
413
- ]
414
- },
415
- n.id ?? p
416
- );
417
- })
418
- }
419
- ) : E !== "ready" ? null : be ?? /* @__PURE__ */ t("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: r("notesPanel.empty", { defaultValue: "No notes yet." }) })
420
- ] }),
421
- u && S ? /* @__PURE__ */ t(
422
- f,
423
- {
424
- open: N !== null,
425
- onOpenChange: (e) => !e && V(null),
426
- children: /* @__PURE__ */ l(f.Content, { variant: "alert", size: "sm", children: [
427
- /* @__PURE__ */ t(f.Header, { children: /* @__PURE__ */ t(f.Title, { children: r("notesPanel.deleteConfirmTitle", {
428
- defaultValue: "Delete this note?"
429
- }) }) }),
430
- /* @__PURE__ */ t(f.Body, { children: /* @__PURE__ */ t(f.Description, { children: r("notesPanel.deleteConfirmBody", {
431
- defaultValue: "The note will be removed from the record."
432
- }) }) }),
433
- /* @__PURE__ */ l(f.Footer, { children: [
434
- /* @__PURE__ */ t(f.Close, { asChild: !0, children: /* @__PURE__ */ t(
435
- A,
436
- {
437
- intent: "secondary",
438
- size: "sm",
439
- onClick: () => V(null),
440
- children: r("notesPanel.deleteConfirmCancel", {
441
- defaultValue: "Cancel"
442
- })
443
- }
444
- ) }),
445
- /* @__PURE__ */ t(
446
- A,
447
- {
448
- intent: "destructive",
449
- size: "sm",
450
- onClick: je,
451
- children: r("notesPanel.deleteConfirmAction", {
452
- defaultValue: "Delete"
453
- })
454
- }
455
- )
456
- ] })
457
- ] })
458
- }
459
- ) : null
460
- ]
461
- }
462
- );
463
- }
464
- );
465
- export {
466
- Rn as N,
467
- ie as g
468
- };
469
- //# sourceMappingURL=notes-panel-Co8D3uDd.js.map