@alfadocs/ui-kit 1.133.0 → 1.134.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 (253) hide show
  1. package/dist/_chunks/{agenda-card-B8hV3dZV.js → agenda-card-B9wgX_Ed.js} +2 -2
  2. package/dist/_chunks/{agenda-tray-Bu46s3dI.js → agenda-tray-CGcS_qoM.js} +2 -2
  3. package/dist/_chunks/appointment-card-DG3m9yN-.js +504 -0
  4. package/dist/_chunks/{appointment-peek-DZa6xyUb.js → appointment-peek-BK0tDs4C.js} +2 -2
  5. package/dist/_chunks/{appointment-timeline-DQePqpyH.js → appointment-timeline-BiI2riRZ.js} +2 -2
  6. package/dist/_chunks/appointment-tray-ClJCtYQj.js +200 -0
  7. package/dist/_chunks/{appointment-workflow-status-DMjuIK90.js → appointment-workflow-status-S-lx81Yz.js} +2 -2
  8. package/dist/_chunks/ban-CiSCCcOE.js +15 -0
  9. package/dist/_chunks/{calendar-BIoOeBTT.js → calendar-CyLtLBNP.js} +2 -2
  10. package/dist/_chunks/{calendar-appointment-editor-dialog-BHx6kUhX.js → calendar-appointment-editor-dialog-BSkIYGlW.js} +13 -13
  11. package/dist/_chunks/{calendar-event-card-BNEzkjm-.js → calendar-event-card-BJifpYZQ.js} +7 -6
  12. package/dist/_chunks/{care-plan-card-DKScH9Ss.js → care-plan-card-CjHq6PLo.js} +6 -6
  13. package/dist/_chunks/{care-plan-entry-card-AG1y3nyW.js → care-plan-entry-card-DY1toF6E.js} +2 -2
  14. package/dist/_chunks/{care-plan-header-Dx5OMkc9.js → care-plan-header-CeFXUDnL.js} +6 -6
  15. package/dist/_chunks/check-in-documents-CEVcgcYZ.js +136 -0
  16. package/dist/_chunks/{clinical-note-card-pPaeWWnu.js → clinical-note-card-D--IwbZa.js} +2 -2
  17. package/dist/_chunks/document-preview-DLVIrOYV.js +385 -0
  18. package/dist/_chunks/{entity-card-fpm-KUKc.js → entity-card-p-LANpYt.js} +18 -17
  19. package/dist/_chunks/{error-page-B0fGNTRB.js → error-page-WLhmWUTq.js} +100 -115
  20. package/dist/_chunks/finished-terminal-unDnXT4j.js +191 -0
  21. package/dist/_chunks/house-DGCypGTo.js +21 -0
  22. package/dist/_chunks/is-safe-url-CEy9CEml.js +8 -0
  23. package/dist/_chunks/keypad-DBH_keVs.js +152 -0
  24. package/dist/_chunks/keypad-button-mOaPQRrH.js +114 -0
  25. package/dist/_chunks/{message-card-BG3_3nN1.js → message-card-Bw_q1qKx.js} +2 -2
  26. package/dist/_chunks/{message-tray-BjZv0Fsk.js → message-tray-pLGgLmoG.js} +2 -2
  27. package/dist/_chunks/{note-attachment-MNTIqdSz.js → note-attachment-JTIy9iXN.js} +2 -2
  28. package/dist/_chunks/{note-timeline-BQeW0VZY.js → note-timeline-BbjHMhkL.js} +2 -2
  29. package/dist/_chunks/{notes-panel-Cm-_pCRJ.js → notes-panel-BAyPOr8N.js} +2 -2
  30. package/dist/_chunks/{operator-hero-CnfWckNQ.js → operator-hero-D4wfVu2l.js} +2 -2
  31. package/dist/_chunks/otp-input-BNOTlxq3.js +342 -0
  32. package/dist/_chunks/patient-account-settings-BkAtIxJW.js +546 -0
  33. package/dist/_chunks/patient-card-DTh3QTyS.js +125 -0
  34. package/dist/_chunks/patient-check-in-resume-xhqjC6gf.js +742 -0
  35. package/dist/_chunks/patient-sign-in-pin-CDBqV254.js +432 -0
  36. package/dist/_chunks/patient-sign-in-steps-C2JSqlok.js +199 -0
  37. package/dist/_chunks/{patient-summary-card-BUcZ-gaL.js → patient-summary-card-Bl2NknPe.js} +2 -2
  38. package/dist/_chunks/{payment-request-card-Dv4WbRBe.js → payment-request-card-CNW00DCx.js} +6 -6
  39. package/dist/_chunks/{pdf-viewer-BnBKdx0y.js → pdf-viewer-TRC5jEm5.js} +472 -425
  40. package/dist/_chunks/pin-entry-BugWQMOS.js +219 -0
  41. package/dist/_chunks/pin-indicator-Cb-n40UI.js +124 -0
  42. package/dist/_chunks/portal-details-CTEsm705.js +478 -0
  43. package/dist/_chunks/portal-documents-D8skew0h.js +902 -0
  44. package/dist/_chunks/portal-parts-BdR29P7z.js +285 -0
  45. package/dist/_chunks/{privacy-mask-DJ1gee4c.js → privacy-mask-C19dJFMk.js} +5 -5
  46. package/dist/_chunks/{product-hub-panel-a8wdVOUt.js → product-hub-panel-K4QbULG7.js} +2 -2
  47. package/dist/_chunks/{registration-form-CwbhtKcy.js → registration-form-DS3RuKHu.js} +2 -2
  48. package/dist/_chunks/{reserved.agent-W8mR179D.js → reserved.agent-DOzOBUW7.js} +2 -2
  49. package/dist/_chunks/session-countdown-DOx1IBUB.js +232 -0
  50. package/dist/_chunks/{sign-document-CQZVzfpk.js → sign-document-DDZbmYHu.js} +2 -2
  51. package/dist/_chunks/{signature-field-DjabvRZm.js → signature-field-BjlY_yXH.js} +39 -34
  52. package/dist/_chunks/{signature-request-4pGq3YBe.js → signature-request-CHsM_iWi.js} +2 -2
  53. package/dist/_chunks/{signature-status-chip-pIoQjvH8.js → signature-status-chip-DS9hHwIt.js} +66 -69
  54. package/dist/_chunks/signing-end-screen-an9P8DOT.js +1041 -0
  55. package/dist/_chunks/sms-code-entry-Dgp4GwlM.js +316 -0
  56. package/dist/_chunks/step-up-dialog-C2JqJmCA.js +132 -0
  57. package/dist/_chunks/{task-editor-BL2hHxNz.js → task-editor-g1AGfxhr.js} +38 -38
  58. package/dist/_chunks/{use-appointment-details-read-_b7FRB1x.js → use-appointment-details-read-Dzc6fEzG.js} +6 -6
  59. package/dist/_chunks/use-zoom-drilldown-Cr1baU5X.js +221 -0
  60. package/dist/_chunks/{user-x-DYszNtIg.js → user-x-BJZg4kaP.js} +8 -19
  61. package/dist/_chunks/{verify-identity-types-CxtrBXsZ.js → verify-identity-types-C6Bam8v6.js} +2 -2
  62. package/dist/agent-catalog.json +723 -364
  63. package/dist/agent-i18n/en.json +75 -18
  64. package/dist/browser-support.js +1 -1
  65. package/dist/components/_shared/is-safe-url.d.ts +3 -1
  66. package/dist/components/agenda-card/index.js +2 -2
  67. package/dist/components/agenda-tray/index.js +1 -1
  68. package/dist/components/appointment-card/appointment-card.d.ts +45 -0
  69. package/dist/components/appointment-card/appointment-tray.d.ts +11 -0
  70. package/dist/components/appointment-card/index.js +3 -3
  71. package/dist/components/appointment-details-panel/index.js +1 -1
  72. package/dist/components/appointment-peek/index.js +1 -1
  73. package/dist/components/appointment-timeline/index.js +1 -1
  74. package/dist/components/booking/index.js +1 -1
  75. package/dist/components/calendar/index.js +1 -1
  76. package/dist/components/calendar-event-card/index.js +1 -1
  77. package/dist/components/care-plan-card/index.js +1 -1
  78. package/dist/components/care-plan-entry-card/index.js +1 -1
  79. package/dist/components/care-plan-header/index.js +1 -1
  80. package/dist/components/clinical-note-card/index.js +1 -1
  81. package/dist/components/document-preview/document-preview.d.ts +61 -7
  82. package/dist/components/document-preview/index.js +1 -1
  83. package/dist/components/finished-terminal/finished-terminal.d.ts +63 -6
  84. package/dist/components/finished-terminal/index.d.ts +1 -1
  85. package/dist/components/finished-terminal/index.js +1 -1
  86. package/dist/components/index.d.ts +12 -0
  87. package/dist/components/keypad/index.d.ts +3 -0
  88. package/dist/components/keypad/index.js +6 -0
  89. package/dist/components/keypad/keypad.d.ts +54 -0
  90. package/dist/components/keypad-button/index.d.ts +3 -0
  91. package/dist/components/keypad-button/index.js +6 -0
  92. package/dist/components/keypad-button/keypad-button.d.ts +33 -0
  93. package/dist/components/message-card/index.js +2 -2
  94. package/dist/components/message-tray/index.js +1 -1
  95. package/dist/components/note-timeline/index.js +1 -1
  96. package/dist/components/notes-panel/index.js +1 -1
  97. package/dist/components/operator-hero/index.js +1 -1
  98. package/dist/components/otp-input/index.js +1 -1
  99. package/dist/components/otp-input/otp-input.d.ts +11 -0
  100. package/dist/components/patient-summary-card/index.js +1 -1
  101. package/dist/components/payment-card/index.js +1 -1
  102. package/dist/components/pdf-viewer/index.js +1 -1
  103. package/dist/components/pdf-viewer/pdf-viewer.d.ts +7 -0
  104. package/dist/components/pin-entry/index.d.ts +3 -0
  105. package/dist/components/pin-entry/index.js +5 -0
  106. package/dist/components/pin-entry/pin-entry.agent.d.ts +4 -0
  107. package/dist/components/pin-entry/pin-entry.d.ts +64 -0
  108. package/dist/components/pin-indicator/index.d.ts +3 -0
  109. package/dist/components/pin-indicator/index.js +9 -0
  110. package/dist/components/pin-indicator/pin-indicator.d.ts +34 -0
  111. package/dist/components/product-hub-tray/index.js +2 -2
  112. package/dist/components/session-countdown/index.js +1 -1
  113. package/dist/components/session-countdown/session-countdown.d.ts +19 -0
  114. package/dist/components/sign-document/index.js +1 -1
  115. package/dist/components/signature-field/index.js +1 -1
  116. package/dist/components/signature-field/signature-field.d.ts +17 -6
  117. package/dist/components/signature-status-chip/index.js +1 -1
  118. package/dist/components/signature-status-chip/signature-status-chip.d.ts +3 -2
  119. package/dist/components/sms-code-entry/index.d.ts +3 -0
  120. package/dist/components/sms-code-entry/index.js +5 -0
  121. package/dist/components/sms-code-entry/sms-code-entry.agent.d.ts +4 -0
  122. package/dist/components/sms-code-entry/sms-code-entry.d.ts +156 -0
  123. package/dist/components/step-up-dialog/index.d.ts +3 -0
  124. package/dist/components/step-up-dialog/index.js +5 -0
  125. package/dist/components/step-up-dialog/step-up-dialog.d.ts +108 -0
  126. package/dist/components/task-editor/index.js +1 -1
  127. package/dist/components/workflow-status/index.js +1 -1
  128. package/dist/core.css +1 -1
  129. package/dist/hooks/index.js +1 -1
  130. package/dist/hooks/use-signing-session.d.ts +7 -2
  131. package/dist/host-compat.css +10 -1
  132. package/dist/i18n/locales/ar.d.ts +512 -1
  133. package/dist/i18n/locales/ar.js +509 -3
  134. package/dist/i18n/locales/de.d.ts +512 -1
  135. package/dist/i18n/locales/de.js +517 -4
  136. package/dist/i18n/locales/el.d.ts +512 -1
  137. package/dist/i18n/locales/el.js +512 -4
  138. package/dist/i18n/locales/en.d.ts +514 -1
  139. package/dist/i18n/locales/en.js +520 -4
  140. package/dist/i18n/locales/es.d.ts +512 -1
  141. package/dist/i18n/locales/es.js +510 -4
  142. package/dist/i18n/locales/fr.d.ts +512 -1
  143. package/dist/i18n/locales/fr.js +510 -4
  144. package/dist/i18n/locales/hi.d.ts +512 -1
  145. package/dist/i18n/locales/hi.js +510 -4
  146. package/dist/i18n/locales/it.d.ts +512 -1
  147. package/dist/i18n/locales/it.js +517 -4
  148. package/dist/i18n/locales/ja.d.ts +512 -1
  149. package/dist/i18n/locales/ja.js +510 -4
  150. package/dist/i18n/locales/nl.d.ts +512 -1
  151. package/dist/i18n/locales/nl.js +517 -4
  152. package/dist/i18n/locales/pl.d.ts +512 -1
  153. package/dist/i18n/locales/pl.js +517 -4
  154. package/dist/i18n/locales/pt.d.ts +512 -1
  155. package/dist/i18n/locales/pt.js +517 -4
  156. package/dist/i18n/locales/ro.d.ts +512 -1
  157. package/dist/i18n/locales/ro.js +517 -4
  158. package/dist/i18n/locales/ru.d.ts +512 -1
  159. package/dist/i18n/locales/ru.js +509 -3
  160. package/dist/i18n/locales/sq.d.ts +512 -1
  161. package/dist/i18n/locales/sq.js +510 -4
  162. package/dist/i18n/locales/sv.d.ts +512 -1
  163. package/dist/i18n/locales/sv.js +510 -4
  164. package/dist/i18n/locales/tr.d.ts +512 -1
  165. package/dist/i18n/locales/tr.js +512 -4
  166. package/dist/i18n/locales/zh.d.ts +512 -1
  167. package/dist/i18n/locales/zh.js +510 -4
  168. package/dist/index.js +1271 -1204
  169. package/dist/locales/ar.json +513 -2
  170. package/dist/locales/de.json +514 -3
  171. package/dist/locales/el.json +514 -3
  172. package/dist/locales/en.json +514 -3
  173. package/dist/locales/es.json +514 -3
  174. package/dist/locales/fr.json +514 -3
  175. package/dist/locales/hi.json +514 -3
  176. package/dist/locales/it.json +514 -3
  177. package/dist/locales/ja.json +514 -3
  178. package/dist/locales/nl.json +514 -3
  179. package/dist/locales/pl.json +514 -3
  180. package/dist/locales/pt.json +514 -3
  181. package/dist/locales/ro.json +514 -3
  182. package/dist/locales/ru.json +513 -2
  183. package/dist/locales/sq.json +514 -3
  184. package/dist/locales/sv.json +514 -3
  185. package/dist/locales/tr.json +514 -3
  186. package/dist/locales/zh.json +514 -3
  187. package/dist/patterns/calendar/index.js +1 -1
  188. package/dist/patterns/check-in-documents/check-in-documents.d.ts +61 -0
  189. package/dist/patterns/check-in-documents/check-in-signable-document.d.ts +32 -0
  190. package/dist/patterns/check-in-documents/index.d.ts +4 -0
  191. package/dist/patterns/check-in-documents/index.js +5 -0
  192. package/dist/patterns/error-page/index.js +1 -1
  193. package/dist/patterns/patient-account-settings/index.d.ts +4 -0
  194. package/dist/patterns/patient-account-settings/index.js +5 -0
  195. package/dist/patterns/patient-account-settings/patient-account-settings-panels.d.ts +36 -0
  196. package/dist/patterns/patient-account-settings/patient-account-settings.d.ts +94 -0
  197. package/dist/patterns/patient-account-settings/patient-account-settings.types.d.ts +91 -0
  198. package/dist/patterns/patient-check-in/index.d.ts +20 -0
  199. package/dist/patterns/patient-check-in/index.js +13 -0
  200. package/dist/patterns/patient-check-in/patient-check-in-changed.d.ts +33 -0
  201. package/dist/patterns/patient-check-in/patient-check-in-connection-notice.d.ts +29 -0
  202. package/dist/patterns/patient-check-in/patient-check-in-done.d.ts +25 -0
  203. package/dist/patterns/patient-check-in/patient-check-in-entry.d.ts +29 -0
  204. package/dist/patterns/patient-check-in/patient-check-in-hub-empty.d.ts +23 -0
  205. package/dist/patterns/patient-check-in/patient-check-in-hub.d.ts +61 -0
  206. package/dist/patterns/patient-check-in/patient-check-in-personal-data.d.ts +73 -0
  207. package/dist/patterns/patient-check-in/patient-check-in-privacy.d.ts +9 -0
  208. package/dist/patterns/patient-check-in/patient-check-in-resume.d.ts +29 -0
  209. package/dist/patterns/patient-check-in/patient-check-in-shell.d.ts +60 -0
  210. package/dist/patterns/patient-check-in/patient-check-in-types.d.ts +92 -0
  211. package/dist/patterns/patient-portal/index.d.ts +12 -0
  212. package/dist/patterns/patient-portal/index.js +13 -0
  213. package/dist/patterns/patient-portal/portal-appointments.d.ts +70 -0
  214. package/dist/patterns/patient-portal/portal-details.d.ts +148 -0
  215. package/dist/patterns/patient-portal/portal-documents.d.ts +74 -0
  216. package/dist/patterns/patient-portal/portal-format.d.ts +14 -0
  217. package/dist/patterns/patient-portal/portal-home.d.ts +71 -0
  218. package/dist/patterns/patient-portal/portal-parts.d.ts +107 -0
  219. package/dist/patterns/patient-portal/portal-shell.d.ts +84 -0
  220. package/dist/patterns/patient-portal/portal-types.d.ts +157 -0
  221. package/dist/patterns/patient-sign-in/index.d.ts +7 -0
  222. package/dist/patterns/patient-sign-in/index.js +15 -0
  223. package/dist/patterns/patient-sign-in/patient-card.d.ts +74 -0
  224. package/dist/patterns/patient-sign-in/patient-sign-in-email.d.ts +109 -0
  225. package/dist/patterns/patient-sign-in/patient-sign-in-pin.d.ts +157 -0
  226. package/dist/patterns/patient-sign-in/patient-sign-in-steps.d.ts +143 -0
  227. package/dist/patterns/registration-form/index.js +1 -1
  228. package/dist/patterns/signature-request/index.js +1 -1
  229. package/dist/patterns/signing/index.d.ts +25 -0
  230. package/dist/patterns/signing/index.js +16 -0
  231. package/dist/patterns/signing/multi-field-signer.d.ts +117 -0
  232. package/dist/patterns/signing/signing-awaiting-screen.d.ts +25 -0
  233. package/dist/patterns/signing/signing-chrome.d.ts +30 -0
  234. package/dist/patterns/signing/signing-document-screen.d.ts +87 -0
  235. package/dist/patterns/signing/signing-end-screen.d.ts +27 -0
  236. package/dist/patterns/signing/signing-finished-screen.d.ts +34 -0
  237. package/dist/patterns/signing/signing-footer.d.ts +56 -0
  238. package/dist/patterns/signing/signing-handoff-screen.d.ts +37 -0
  239. package/dist/patterns/signing/signing-message-dialog.d.ts +29 -0
  240. package/dist/patterns/signing/signing-progress-chip.d.ts +27 -0
  241. package/dist/patterns/signing/signing-roster.d.ts +44 -0
  242. package/dist/patterns/signing/signing-staff-id-confirmation.d.ts +49 -0
  243. package/dist/patterns/verify-identity/index.js +1 -1
  244. package/dist/tokens.css +1 -1
  245. package/package.json +49 -1
  246. package/dist/_chunks/appointment-card-OAOur8lH.js +0 -434
  247. package/dist/_chunks/appointment-tray-DSFqO5Rm.js +0 -193
  248. package/dist/_chunks/document-preview-_kQ9QvZV.js +0 -291
  249. package/dist/_chunks/finished-terminal-FR8uc_Ws.js +0 -122
  250. package/dist/_chunks/is-safe-url-DkETxeHz.js +0 -7
  251. package/dist/_chunks/otp-input-gV1446Dw.js +0 -301
  252. package/dist/_chunks/session-countdown-C4tzbJVc.js +0 -223
  253. package/dist/_chunks/use-zoom-drilldown-qCX34w9I.js +0 -210
@@ -1,193 +0,0 @@
1
- import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
- import { forwardRef as j, useRef as h, useImperativeHandle as z, useMemo as P } from "react";
3
- import { c as E } from "./index-D2ZczOXr.js";
4
- import { useTranslation as H } from "react-i18next";
5
- import { I as M } from "./icon-button-S8_weU3g.js";
6
- import { S as q } from "./skeleton-tTWJpvAq.js";
7
- import { E as K } from "./empty-state-DwJ5YNzz.js";
8
- import { A as V } from "./appointment-card-OAOur8lH.js";
9
- import { u as B } from "./registry-DvAUVLHh.js";
10
- import { C as D } from "./calendar-days-BGWklvE-.js";
11
- import { P as L } from "./plus-DzMQ_c6b.js";
12
- const ae = {
13
- id: "appointment-card",
14
- // 'pick' (non-persisting activation) is host-delegated: the card exposes no
15
- // handle of its own — its enclosing AppointmentTray performs the pick via
16
- // `appointment-tray.select_item`, addressing this card by its data-component-id.
17
- capabilities: ["pick"],
18
- state: {},
19
- actions: {},
20
- domHooks: {
21
- root: {
22
- attr: "data-component",
23
- value: "appointment-card",
24
- description: "Marks the element as a kit AppointmentCard. The root also emits data-component-id sourced from item.id, data-state with the appointment lifecycle, and data-type with the delivery channel."
25
- },
26
- instanceId: {
27
- attr: "data-component-id",
28
- sourceProp: "item.id",
29
- description: "Sourced from item.id — the stable appointment identifier."
30
- }
31
- }
32
- }, _ = {
33
- id: "appointment-tray",
34
- // 'pick' (non-persisting activation): select_item routes an activation
35
- // through onActivate — it does not persist a "selected appointment" value,
36
- // so this is a focus/pick, not a select_single.
37
- capabilities: ["pick"],
38
- state: {
39
- items: {
40
- type: "Array<{ id: string; state: string }>",
41
- descriptionKey: "ui.agent.appointmentTray.state.items",
42
- description: "Currently-displayed appointments. Ids + lifecycle state only — never patient identity.",
43
- read: (a) => a.getItems()
44
- }
45
- },
46
- actions: {
47
- select_item: {
48
- safety: "read",
49
- argsType: "{ id: string }",
50
- argsSchema: {
51
- type: "object",
52
- properties: { id: { type: "string" } },
53
- required: ["id"]
54
- },
55
- idempotent: !0,
56
- descriptionKey: "ui.agent.appointmentTray.actions.selectItem",
57
- description: "Activate the appointment with the given id.",
58
- invoke: (a, i) => {
59
- a.selectItem(i.id);
60
- }
61
- }
62
- },
63
- domHooks: {
64
- root: {
65
- attr: "data-component",
66
- value: "appointment-tray",
67
- description: "Marks the AppointmentTray wrapper."
68
- },
69
- instanceId: {
70
- attr: "data-component-id",
71
- sourceProp: "id",
72
- description: "Sourced from the id prop. Required to address a specific tray from the agent."
73
- },
74
- item: {
75
- attr: "data-appointment-id",
76
- description: "Stable appointment id emitted on each rendered AppointmentCard inside the tray."
77
- }
78
- }
79
- }, F = E(
80
- [
81
- "ds:flex ds:flex-col",
82
- "ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]",
83
- "ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)]",
84
- "ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]",
85
- "ds:overflow-hidden"
86
- ].join(" "),
87
- {
88
- variants: {
89
- size: {
90
- sm: "",
91
- md: ""
92
- }
93
- },
94
- defaultVariants: {
95
- size: "sm"
96
- }
97
- }
98
- ), G = j(
99
- ({
100
- id: a,
101
- items: i,
102
- title: g,
103
- caption: c,
104
- size: p = "sm",
105
- locale: v,
106
- currency: x,
107
- onOpenAppointment: r,
108
- onAddAppointment: m,
109
- addLabel: b,
110
- loading: l = !1,
111
- emptyTitle: w,
112
- emptyDescription: T,
113
- className: I,
114
- ...k
115
- }, N) => {
116
- const { t: s } = H("ui"), f = g ?? s("appointmentTray.title"), C = b ?? s("appointmentTray.add"), A = !l && i.length === 0;
117
- let n;
118
- l ? n = /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [0, 1, 2].map((e) => /* @__PURE__ */ t(q, { variant: "rectangular", height: "3.5rem" }, e)) }) : A ? n = /* @__PURE__ */ t("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ t(
119
- K,
120
- {
121
- variant: "first-use",
122
- size: "sm",
123
- title: w ?? s("appointmentTray.empty.title"),
124
- description: T ?? s("appointmentTray.empty.description")
125
- }
126
- ) }) : n = /* @__PURE__ */ t("ul", { className: "ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-[var(--spacing-2xs)]", children: i.map((e) => /* @__PURE__ */ t(
127
- V,
128
- {
129
- item: e,
130
- size: p,
131
- locale: v,
132
- currency: x,
133
- onActivate: r,
134
- "data-appointment-id": e.id
135
- },
136
- e.id
137
- )) });
138
- const o = h(i);
139
- o.current = i;
140
- const u = h(null);
141
- z(N, () => u.current, []);
142
- const S = P(
143
- () => ({
144
- getItems: () => o.current.map((e) => ({ id: e.id, state: e.state })),
145
- selectItem: (e) => {
146
- const y = o.current.find((R) => R.id === e);
147
- y && (r == null || r(y));
148
- }
149
- }),
150
- [r]
151
- );
152
- return B(_, S, a), /* @__PURE__ */ d(
153
- "section",
154
- {
155
- ref: u,
156
- "aria-label": f,
157
- "data-component": "appointment-tray",
158
- "data-component-id": a,
159
- className: F({ size: p, className: I }),
160
- ...k,
161
- children: [
162
- /* @__PURE__ */ d("header", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [
163
- /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:min-w-0", children: [
164
- /* @__PURE__ */ d("h3", { className: "ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card", children: [
165
- /* @__PURE__ */ t(D, { "aria-hidden": "true", className: "ds:size-4" }),
166
- f
167
- ] }),
168
- c ? /* @__PURE__ */ t("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: c }) : null
169
- ] }),
170
- m ? /* @__PURE__ */ t(
171
- M,
172
- {
173
- icon: /* @__PURE__ */ t(L, {}),
174
- intent: "outline",
175
- size: "sm",
176
- "aria-label": C,
177
- onClick: m
178
- }
179
- ) : null
180
- ] }),
181
- n
182
- ]
183
- }
184
- );
185
- }
186
- );
187
- G.displayName = "AppointmentTray";
188
- export {
189
- G as A,
190
- ae as a,
191
- _ as b
192
- };
193
- //# sourceMappingURL=appointment-tray-DSFqO5Rm.js.map
@@ -1,291 +0,0 @@
1
- import { jsxs as m, Fragment as W, jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as j, useMemo as I, useState as q, useImperativeHandle as E, Fragment as H } from "react";
3
- import { c as $ } from "./index-D2ZczOXr.js";
4
- import { useTranslation as U } from "react-i18next";
5
- import { B as b } from "./badge-BUk4RjTS.js";
6
- import { C as B } from "./card-n6W6LW-N.js";
7
- import { E as G } from "./empty-state-DwJ5YNzz.js";
8
- import { P as Y } from "./panel-header-CbtlTe85.js";
9
- import { P as J } from "./pdf-viewer-BnBKdx0y.js";
10
- import { T as O, b as Q, c as X, a as Z } from "./tabs-CRIDBLP7.js";
11
- import { u as ee } from "./registry-DvAUVLHh.js";
12
- import { F as ie } from "./file-image-cDgE-BTy.js";
13
- import { F as te } from "./file-text-5yv6r2ls.js";
14
- import { F as se } from "./file-BuG1VMAy.js";
15
- import { c as ne } from "./createLucideIcon-DhHxpK9K.js";
16
- /**
17
- * @license lucide-react v1.22.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */
22
- const ae = [
23
- ["path", { d: "M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8", key: "14sh0y" }],
24
- [
25
- "path",
26
- {
27
- d: "M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",
28
- key: "1970lx"
29
- }
30
- ],
31
- ["path", { d: "M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1", key: "l4dndm" }]
32
- ], re = ne("files", ae), de = {
33
- id: "document-preview",
34
- capabilities: [],
35
- state: {
36
- kind: {
37
- type: "'pdf' | 'image' | 'metadata' | 'empty'",
38
- descriptionKey: "ui.agent.documentPreview.state.kind",
39
- description: "Which render branch is active: pdf, image, metadata (no inline preview), or empty (no document). Structural — never the document name.",
40
- read: (a) => a.getKind()
41
- }
42
- },
43
- actions: {
44
- get_name: {
45
- // phi (not read): resolves the document display name, which can identify
46
- // patients. PRS §26 — phi outranks read so the host gates it behind
47
- // stricter confirm + audit. The always-on kind slot stays name-free.
48
- safety: "phi",
49
- returns: "string | undefined",
50
- returnsSchema: { type: ["string", "null"] },
51
- idempotent: !0,
52
- descriptionKey: "ui.agent.documentPreview.actions.getName",
53
- description: "Read the display name of the previewed document. May identify a patient (PHI).",
54
- invoke: (a) => a.getName()
55
- }
56
- },
57
- domHooks: {
58
- root: {
59
- attr: "data-component",
60
- value: "document-preview",
61
- description: "Marks the DocumentPreview region."
62
- },
63
- instanceId: {
64
- attr: "data-component-id",
65
- sourceProp: "id",
66
- description: "Sourced from the id prop."
67
- }
68
- }
69
- }, le = $(
70
- [
71
- "ds:flex ds:h-full ds:min-h-0 ds:min-w-0 ds:flex-col ds:overflow-auto",
72
- "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
73
- "ds:focus-visible:outline-solid",
74
- "ds:focus-visible:outline-ring"
75
- ].join(" ")
76
- ), oe = {
77
- signed: "success",
78
- pending: "warning"
79
- };
80
- function z(a, r, u) {
81
- if (!a) return "empty";
82
- const l = r ?? "";
83
- return l === "application/pdf" && u ? "pdf" : l.startsWith("image/") && u ? "image" : "metadata";
84
- }
85
- function N(a) {
86
- const r = a ?? "";
87
- return r.startsWith("image/") ? ie : r === "application/pdf" || r.startsWith("text/") || r.includes("word") ? te : se;
88
- }
89
- const ce = [
90
- "documentPreview.units.bytes",
91
- "documentPreview.units.kilobytes",
92
- "documentPreview.units.megabytes",
93
- "documentPreview.units.gigabytes"
94
- ], F = ["B", "KB", "MB", "GB"];
95
- function me(a, r, u) {
96
- let l = a, o = 0;
97
- for (; l >= 1024 && o < F.length - 1; )
98
- l /= 1024, o++;
99
- return `${new Intl.NumberFormat(r, {
100
- maximumFractionDigits: o === 0 ? 0 : 1
101
- }).format(l)} ${u(ce[o], F[o])}`;
102
- }
103
- const ue = j(({ id: a, name: r, mimeType: u, src: l, metadata: o, documents: h, className: S }, M) => {
104
- const { t: s, i18n: T } = U("ui"), c = I(() => h && h.length > 0 ? h : r ? [{ id: a ?? r, name: r, mimeType: u, src: l, metadata: o }] : [], [h, a, r, u, l, o]), P = c.length > 1, [R, C] = q(void 0), n = c.find((t) => t.id === R) ?? c[0], x = I(
105
- () => ({
106
- getKind: () => n ? z(n.name, n.mimeType, n.src) : "empty",
107
- getName: () => n == null ? void 0 : n.name
108
- }),
109
- [n]
110
- );
111
- E(M, () => x, [x]), ee(de, x, a);
112
- const A = (t) => {
113
- const w = z(t.name, t.mimeType, t.src), e = t.metadata, _ = N(t.mimeType);
114
- let y;
115
- w === "pdf" && t.src ? y = /* @__PURE__ */ i(
116
- J,
117
- {
118
- src: t.src,
119
- toolbarVariant: "minimal",
120
- ariaLabel: t.name,
121
- className: "ds:h-full ds:w-full"
122
- }
123
- ) : w === "image" && t.src ? y = /* @__PURE__ */ i(
124
- "img",
125
- {
126
- src: t.src,
127
- alt: s("documentPreview.imageAlt", "Preview of {{name}}", {
128
- name: t.name
129
- }),
130
- className: "ds:max-h-full ds:max-w-full ds:object-contain"
131
- }
132
- ) : y = /* @__PURE__ */ m("span", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)] ds:text-muted-foreground", children: [
133
- /* @__PURE__ */ i(_, { "aria-hidden": "true", className: "ds:size-10" }),
134
- /* @__PURE__ */ i("span", { className: "type-body-sm", children: s("documentPreview.noPreview", "No preview available.") })
135
- ] });
136
- const p = e == null ? void 0 : e.signatureStatus, k = !!(e != null && e.documentType) || !!(e != null && e.clinical) || p !== void 0 && p !== "none", f = (v) => new Intl.DateTimeFormat(T.language, { dateStyle: "medium" }).format(
137
- new Date(v)
138
- ), d = [];
139
- e != null && e.createdBy && d.push({
140
- key: "createdBy",
141
- label: s("documentPreview.fields.createdBy", "Created by"),
142
- value: e.createdBy
143
- }), e != null && e.createdAt && d.push({
144
- key: "created",
145
- label: s("documentPreview.fields.created", "Created"),
146
- value: f(e.createdAt)
147
- }), e != null && e.updatedAt && d.push({
148
- key: "modified",
149
- label: s("documentPreview.fields.modified", "Modified"),
150
- value: f(e.updatedAt)
151
- }), e != null && e.signatureRequestedAt && d.push({
152
- key: "signatureRequested",
153
- label: s(
154
- "documentPreview.fields.signatureRequested",
155
- "Signature requested"
156
- ),
157
- value: f(e.signatureRequestedAt)
158
- }), e != null && e.signedAt && d.push({
159
- key: "signed",
160
- label: s("documentPreview.fields.signed", "Signed"),
161
- value: f(e.signedAt)
162
- }), e != null && e.sharedAt && d.push({
163
- key: "sharedWithPatient",
164
- label: s(
165
- "documentPreview.fields.sharedWithPatient",
166
- "Shared with patient"
167
- ),
168
- value: f(e.sharedAt)
169
- }), (e == null ? void 0 : e.size) !== void 0 && d.push({
170
- key: "size",
171
- label: s("documentPreview.fields.size", "Size"),
172
- value: me(e.size, T.language, s)
173
- }), e != null && e.expiresAt && d.push({
174
- key: "expires",
175
- label: s("documentPreview.fields.expires", "Expires"),
176
- value: f(e.expiresAt)
177
- });
178
- const V = k || d.length > 0;
179
- return /* @__PURE__ */ i("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ m(
180
- B,
181
- {
182
- variant: "elevated",
183
- className: "ds:flex ds:flex-col ds:overflow-hidden",
184
- children: [
185
- /* @__PURE__ */ i("div", { className: "ds:flex ds:aspect-[4/3] ds:min-h-0 ds:items-center ds:justify-center ds:overflow-hidden ds:border-b ds:border-[color:var(--card-border)] ds:bg-muted", children: y }),
186
- V && /* @__PURE__ */ m(B.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
187
- /* @__PURE__ */ i("h3", { className: "type-eyebrow ds:m-0 ds:text-muted-foreground", children: s("documentPreview.detailsTitle", "Details") }),
188
- k && /* @__PURE__ */ m("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
189
- (e == null ? void 0 : e.documentType) && /* @__PURE__ */ i(b, { variant: "neutral", size: "sm", children: e.documentType }),
190
- (e == null ? void 0 : e.clinical) && /* @__PURE__ */ i(b, { variant: "info", size: "sm", children: s("documentPreview.clinical", "Clinical") }),
191
- p && p !== "none" && /* @__PURE__ */ i(
192
- b,
193
- {
194
- variant: oe[p],
195
- size: "sm",
196
- withDot: !0,
197
- children: s(`documentPreview.signature.${p}`, p)
198
- }
199
- )
200
- ] }),
201
- d.length > 0 && /* @__PURE__ */ i("dl", { className: "ds:grid ds:grid-cols-[auto_1fr] ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] type-body-sm", children: d.map((v) => /* @__PURE__ */ m(H, { children: [
202
- /* @__PURE__ */ i("dt", { className: "ds:text-muted-foreground", children: v.label }),
203
- /* @__PURE__ */ i("dd", { className: "ds:m-0", children: v.value })
204
- ] }, v.key)) })
205
- ] })
206
- ]
207
- }
208
- ) });
209
- }, D = N(n == null ? void 0 : n.mimeType), K = P ? /* @__PURE__ */ i(re, { "aria-hidden": "true" }) : /* @__PURE__ */ i(D, { "aria-hidden": "true" }), L = P ? /* @__PURE__ */ m(W, { children: [
210
- s("documentPreview.multiTitle", "Documents"),
211
- /* @__PURE__ */ i(b, { variant: "neutral", size: "sm", children: c.length })
212
- ] }) : n == null ? void 0 : n.name;
213
- let g;
214
- return c.length === 0 ? g = /* @__PURE__ */ i(
215
- G,
216
- {
217
- variant: "first-use",
218
- size: "sm",
219
- title: s("documentPreview.emptyTitle", "No document selected"),
220
- description: s(
221
- "documentPreview.emptyDescription",
222
- "Select a document to preview it here."
223
- )
224
- }
225
- ) : P ? g = /* @__PURE__ */ m(
226
- O,
227
- {
228
- value: (n == null ? void 0 : n.id) ?? "",
229
- onValueChange: C,
230
- variant: "underlined",
231
- size: "sm",
232
- className: "ds:min-h-0 ds:flex-1 ds:pt-[var(--spacing-sm)]",
233
- children: [
234
- /* @__PURE__ */ i(
235
- Q,
236
- {
237
- "aria-label": s("documentPreview.tabsLabel", "Selected documents"),
238
- className: "ds:gap-[var(--spacing-sm)]",
239
- children: c.map((t) => {
240
- const w = N(t.mimeType);
241
- return /* @__PURE__ */ i(
242
- X,
243
- {
244
- value: t.id,
245
- icon: /* @__PURE__ */ i(
246
- w,
247
- {
248
- "aria-hidden": "true",
249
- className: "ds:size-4 ds:text-[color:var(--accent)]"
250
- }
251
- ),
252
- className: "ds:[min-inline-size:0]",
253
- children: /* @__PURE__ */ i("span", { className: "ds:block ds:truncate ds:[min-inline-size:0]", children: t.name })
254
- },
255
- t.id
256
- );
257
- })
258
- }
259
- ),
260
- c.map((t) => /* @__PURE__ */ i(
261
- Z,
262
- {
263
- value: t.id,
264
- className: "ds:min-h-0 ds:flex-1",
265
- children: A(t)
266
- },
267
- t.id
268
- ))
269
- ]
270
- }
271
- ) : g = A(n), /* @__PURE__ */ m(
272
- "section",
273
- {
274
- "data-component": "document-preview",
275
- "data-component-id": a,
276
- tabIndex: 0,
277
- "aria-label": s("documentPreview.regionLabel", "Document preview"),
278
- className: le({ className: S }),
279
- children: [
280
- c.length > 0 && /* @__PURE__ */ i(Y, { sticky: !0, icon: K, title: L }),
281
- g
282
- ]
283
- }
284
- );
285
- });
286
- ue.displayName = "DocumentPreview";
287
- export {
288
- ue as D,
289
- de as d
290
- };
291
- //# sourceMappingURL=document-preview-_kQ9QvZV.js.map
@@ -1,122 +0,0 @@
1
- import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
- import { forwardRef as k, useState as A, useRef as g, useEffect as F, useCallback as j } from "react";
3
- import { useTranslation as z } from "react-i18next";
4
- import { C as w } from "./card-n6W6LW-N.js";
5
- import { B as E } from "./button-DohK_Ak_.js";
6
- import { u as D } from "./use-countdown-Yd6ts0_a.js";
7
- import { C as L } from "./circle-check-BN6rz4NV.js";
8
- function W(s) {
9
- const t = globalThis.window !== void 0 && globalThis;
10
- return !!(t && (/Chromatic/.test(t.navigator.userAgent) || /chromatic=true/.test(t.location.href)));
11
- }
12
- const _ = "https://www.alfadocs.com";
13
- function x(s) {
14
- if (typeof s != "string" || s.length === 0 || s.startsWith("//")) return !1;
15
- if (s.startsWith("/")) return !0;
16
- try {
17
- const { protocol: t } = new URL(s, window.location.origin);
18
- return t === "https:" || t === "http:";
19
- } catch {
20
- return !1;
21
- }
22
- }
23
- const I = k(
24
- ({
25
- title: s,
26
- body: t,
27
- autoCloseSeconds: i = 10,
28
- redirectUrl: n,
29
- brandUrl: o = _,
30
- onClose: r,
31
- countdownLabel: d,
32
- closeNowLabel: v,
33
- redirectingLabel: y,
34
- className: N,
35
- ...C
36
- }, T) => {
37
- const { t: a } = z("ui"), [R, b] = A(!1), c = g(!1), l = g(null);
38
- F(() => {
39
- var h;
40
- (h = l.current) == null || h.focus({ preventScroll: !0 });
41
- }, []);
42
- const m = j(() => {
43
- if (!c.current) {
44
- if (c.current = !0, b(!0), r) {
45
- r();
46
- return;
47
- }
48
- n ? x(n) && window.location.assign(n) : (window.close(), x(o) && window.location.assign(o));
49
- }
50
- }, [r, n, o]), { remaining: f } = D(i, {
51
- autoStart: i > 0 && !W(),
52
- onElapsed: m
53
- }), u = i > 0, B = d ? d(f) : a("finishedTerminal.autoClose", { seconds: f });
54
- return /* @__PURE__ */ e(
55
- "div",
56
- {
57
- ref: T,
58
- "data-component": "finished-terminal",
59
- className: [
60
- "ds:flex ds:flex-1 ds:flex-col ds:items-center ds:overflow-y-auto ds:p-[var(--spacing-lg)]",
61
- N
62
- ].filter(Boolean).join(" "),
63
- ...C,
64
- children: /* @__PURE__ */ e(
65
- w,
66
- {
67
- variant: "elevated",
68
- className: "ds:my-auto ds:min-w-0 ds:[inline-size:100%] ds:max-w-[28rem] ds:text-center",
69
- children: /* @__PURE__ */ e(w.Body, { children: /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-md)]", children: [
70
- /* @__PURE__ */ e(
71
- L,
72
- {
73
- "aria-hidden": "true",
74
- className: "ds:size-12 ds:text-[var(--success)]"
75
- }
76
- ),
77
- /* @__PURE__ */ e(
78
- "h1",
79
- {
80
- ref: l,
81
- tabIndex: -1,
82
- className: "type-title-card ds:m-0 ds:outline-none",
83
- children: s
84
- }
85
- ),
86
- /* @__PURE__ */ e("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: t }),
87
- u && R ? (
88
- // Mounts once when closing begins → role="status" announces the
89
- // hand-off exactly once (no churn).
90
- /* @__PURE__ */ e(
91
- "p",
92
- {
93
- role: "status",
94
- className: "type-body-sm ds:m-0 ds:text-[var(--muted-foreground)]",
95
- children: y ?? a("finishedTerminal.redirecting")
96
- }
97
- )
98
- ) : u ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)]", children: [
99
- /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:text-[var(--muted-foreground)]", children: B }),
100
- /* @__PURE__ */ e(
101
- E,
102
- {
103
- intent: "secondary",
104
- size: "lg",
105
- type: "button",
106
- onClick: m,
107
- children: v ?? a("finishedTerminal.closeNow")
108
- }
109
- )
110
- ] }) : null
111
- ] }) })
112
- }
113
- )
114
- }
115
- );
116
- }
117
- );
118
- I.displayName = "FinishedTerminal";
119
- export {
120
- I as F
121
- };
122
- //# sourceMappingURL=finished-terminal-FR8uc_Ws.js.map
@@ -1,7 +0,0 @@
1
- function e(t) {
2
- return /^(https?:\/\/(?!\/)|\/(?!\/)|#)/.test(t);
3
- }
4
- export {
5
- e as i
6
- };
7
- //# sourceMappingURL=is-safe-url-DkETxeHz.js.map