@alfadocs/ui-kit 1.132.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 (257) 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-BSkIYGlW.js +13773 -0
  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 +514 -1
  133. package/dist/i18n/locales/ar.js +512 -4
  134. package/dist/i18n/locales/de.d.ts +514 -1
  135. package/dist/i18n/locales/de.js +520 -5
  136. package/dist/i18n/locales/el.d.ts +514 -1
  137. package/dist/i18n/locales/el.js +515 -5
  138. package/dist/i18n/locales/en.d.ts +516 -1
  139. package/dist/i18n/locales/en.js +522 -4
  140. package/dist/i18n/locales/es.d.ts +514 -1
  141. package/dist/i18n/locales/es.js +513 -5
  142. package/dist/i18n/locales/fr.d.ts +514 -1
  143. package/dist/i18n/locales/fr.js +513 -5
  144. package/dist/i18n/locales/hi.d.ts +514 -1
  145. package/dist/i18n/locales/hi.js +513 -5
  146. package/dist/i18n/locales/it.d.ts +514 -1
  147. package/dist/i18n/locales/it.js +520 -5
  148. package/dist/i18n/locales/ja.d.ts +514 -1
  149. package/dist/i18n/locales/ja.js +513 -5
  150. package/dist/i18n/locales/nl.d.ts +514 -1
  151. package/dist/i18n/locales/nl.js +520 -5
  152. package/dist/i18n/locales/pl.d.ts +514 -1
  153. package/dist/i18n/locales/pl.js +520 -5
  154. package/dist/i18n/locales/pt.d.ts +514 -1
  155. package/dist/i18n/locales/pt.js +520 -5
  156. package/dist/i18n/locales/ro.d.ts +514 -1
  157. package/dist/i18n/locales/ro.js +520 -5
  158. package/dist/i18n/locales/ru.d.ts +514 -1
  159. package/dist/i18n/locales/ru.js +512 -4
  160. package/dist/i18n/locales/sq.d.ts +514 -1
  161. package/dist/i18n/locales/sq.js +513 -5
  162. package/dist/i18n/locales/sv.d.ts +514 -1
  163. package/dist/i18n/locales/sv.js +513 -5
  164. package/dist/i18n/locales/tr.d.ts +514 -1
  165. package/dist/i18n/locales/tr.js +515 -5
  166. package/dist/i18n/locales/zh.d.ts +514 -1
  167. package/dist/i18n/locales/zh.js +513 -5
  168. package/dist/index.js +1271 -1204
  169. package/dist/locales/ar.json +516 -3
  170. package/dist/locales/de.json +517 -4
  171. package/dist/locales/el.json +517 -4
  172. package/dist/locales/en.json +516 -3
  173. package/dist/locales/es.json +517 -4
  174. package/dist/locales/fr.json +517 -4
  175. package/dist/locales/hi.json +517 -4
  176. package/dist/locales/it.json +517 -4
  177. package/dist/locales/ja.json +517 -4
  178. package/dist/locales/nl.json +517 -4
  179. package/dist/locales/pl.json +517 -4
  180. package/dist/locales/pt.json +517 -4
  181. package/dist/locales/ro.json +517 -4
  182. package/dist/locales/ru.json +516 -3
  183. package/dist/locales/sq.json +517 -4
  184. package/dist/locales/sv.json +517 -4
  185. package/dist/locales/tr.json +517 -4
  186. package/dist/locales/zh.json +517 -4
  187. package/dist/patterns/calendar/calendar.journey.d.ts +4 -0
  188. package/dist/patterns/calendar/calendar.surface.d.ts +15 -1
  189. package/dist/patterns/calendar/calendar.types.d.ts +4 -0
  190. package/dist/patterns/calendar/index.js +1 -1
  191. package/dist/patterns/check-in-documents/check-in-documents.d.ts +61 -0
  192. package/dist/patterns/check-in-documents/check-in-signable-document.d.ts +32 -0
  193. package/dist/patterns/check-in-documents/index.d.ts +4 -0
  194. package/dist/patterns/check-in-documents/index.js +5 -0
  195. package/dist/patterns/error-page/index.js +1 -1
  196. package/dist/patterns/patient-account-settings/index.d.ts +4 -0
  197. package/dist/patterns/patient-account-settings/index.js +5 -0
  198. package/dist/patterns/patient-account-settings/patient-account-settings-panels.d.ts +36 -0
  199. package/dist/patterns/patient-account-settings/patient-account-settings.d.ts +94 -0
  200. package/dist/patterns/patient-account-settings/patient-account-settings.types.d.ts +91 -0
  201. package/dist/patterns/patient-check-in/index.d.ts +20 -0
  202. package/dist/patterns/patient-check-in/index.js +13 -0
  203. package/dist/patterns/patient-check-in/patient-check-in-changed.d.ts +33 -0
  204. package/dist/patterns/patient-check-in/patient-check-in-connection-notice.d.ts +29 -0
  205. package/dist/patterns/patient-check-in/patient-check-in-done.d.ts +25 -0
  206. package/dist/patterns/patient-check-in/patient-check-in-entry.d.ts +29 -0
  207. package/dist/patterns/patient-check-in/patient-check-in-hub-empty.d.ts +23 -0
  208. package/dist/patterns/patient-check-in/patient-check-in-hub.d.ts +61 -0
  209. package/dist/patterns/patient-check-in/patient-check-in-personal-data.d.ts +73 -0
  210. package/dist/patterns/patient-check-in/patient-check-in-privacy.d.ts +9 -0
  211. package/dist/patterns/patient-check-in/patient-check-in-resume.d.ts +29 -0
  212. package/dist/patterns/patient-check-in/patient-check-in-shell.d.ts +60 -0
  213. package/dist/patterns/patient-check-in/patient-check-in-types.d.ts +92 -0
  214. package/dist/patterns/patient-portal/index.d.ts +12 -0
  215. package/dist/patterns/patient-portal/index.js +13 -0
  216. package/dist/patterns/patient-portal/portal-appointments.d.ts +70 -0
  217. package/dist/patterns/patient-portal/portal-details.d.ts +148 -0
  218. package/dist/patterns/patient-portal/portal-documents.d.ts +74 -0
  219. package/dist/patterns/patient-portal/portal-format.d.ts +14 -0
  220. package/dist/patterns/patient-portal/portal-home.d.ts +71 -0
  221. package/dist/patterns/patient-portal/portal-parts.d.ts +107 -0
  222. package/dist/patterns/patient-portal/portal-shell.d.ts +84 -0
  223. package/dist/patterns/patient-portal/portal-types.d.ts +157 -0
  224. package/dist/patterns/patient-sign-in/index.d.ts +7 -0
  225. package/dist/patterns/patient-sign-in/index.js +15 -0
  226. package/dist/patterns/patient-sign-in/patient-card.d.ts +74 -0
  227. package/dist/patterns/patient-sign-in/patient-sign-in-email.d.ts +109 -0
  228. package/dist/patterns/patient-sign-in/patient-sign-in-pin.d.ts +157 -0
  229. package/dist/patterns/patient-sign-in/patient-sign-in-steps.d.ts +143 -0
  230. package/dist/patterns/registration-form/index.js +1 -1
  231. package/dist/patterns/signature-request/index.js +1 -1
  232. package/dist/patterns/signing/index.d.ts +25 -0
  233. package/dist/patterns/signing/index.js +16 -0
  234. package/dist/patterns/signing/multi-field-signer.d.ts +117 -0
  235. package/dist/patterns/signing/signing-awaiting-screen.d.ts +25 -0
  236. package/dist/patterns/signing/signing-chrome.d.ts +30 -0
  237. package/dist/patterns/signing/signing-document-screen.d.ts +87 -0
  238. package/dist/patterns/signing/signing-end-screen.d.ts +27 -0
  239. package/dist/patterns/signing/signing-finished-screen.d.ts +34 -0
  240. package/dist/patterns/signing/signing-footer.d.ts +56 -0
  241. package/dist/patterns/signing/signing-handoff-screen.d.ts +37 -0
  242. package/dist/patterns/signing/signing-message-dialog.d.ts +29 -0
  243. package/dist/patterns/signing/signing-progress-chip.d.ts +27 -0
  244. package/dist/patterns/signing/signing-roster.d.ts +44 -0
  245. package/dist/patterns/signing/signing-staff-id-confirmation.d.ts +49 -0
  246. package/dist/patterns/verify-identity/index.js +1 -1
  247. package/dist/tokens.css +1 -1
  248. package/package.json +49 -1
  249. package/dist/_chunks/appointment-card-OAOur8lH.js +0 -434
  250. package/dist/_chunks/appointment-tray-DSFqO5Rm.js +0 -193
  251. package/dist/_chunks/calendar-appointment-editor-dialog-WW6V1SGh.js +0 -13663
  252. package/dist/_chunks/document-preview-_kQ9QvZV.js +0 -291
  253. package/dist/_chunks/finished-terminal-FR8uc_Ws.js +0 -122
  254. package/dist/_chunks/is-safe-url-DkETxeHz.js +0 -7
  255. package/dist/_chunks/otp-input-gV1446Dw.js +0 -301
  256. package/dist/_chunks/session-countdown-C4tzbJVc.js +0 -223
  257. package/dist/_chunks/use-zoom-drilldown-qCX34w9I.js +0 -210
@@ -2,7 +2,8 @@ import { jsx as a, jsxs as f, Fragment as K } from "react/jsx-runtime";
2
2
  import { forwardRef as re } from "react";
3
3
  import { useTranslation as de } from "react-i18next";
4
4
  import { c as s } from "./index-D2ZczOXr.js";
5
- import { U as se, B as te, T as ie } from "./user-x-DYszNtIg.js";
5
+ import { U as se, T as te } from "./user-x-BJZg4kaP.js";
6
+ import { B as ie } from "./ban-CiSCCcOE.js";
6
7
  import { C as le } from "./check-DrFSN__t.js";
7
8
  import { S as ce } from "./stethoscope-sZXGC43m.js";
8
9
  import { C as oe } from "./clock-Drd4Wtis.js";
@@ -34,18 +35,18 @@ function xe([t, d, n]) {
34
35
  const e = (i) => i <= 0.03928 ? i / 12.92 : Math.pow((i + 0.055) / 1.055, 2.4);
35
36
  return 0.2126 * e(t) + 0.7152 * e(d) + 0.0722 * e(n);
36
37
  }
37
- function tn(t, d, n) {
38
+ function ln(t, d, n) {
38
39
  }
39
40
  function ye(t) {
40
41
  const d = be(t);
41
42
  return d ? xe(d) > 0.1791 ? "on-light" : "on-dark" : null;
42
43
  }
43
44
  const ke = {
44
- confirmed: ie,
45
+ confirmed: te,
45
46
  waiting: oe,
46
47
  in_care: ce,
47
48
  done: le,
48
- cancelled: te,
49
+ cancelled: ie,
49
50
  absent: se
50
51
  }, _e = "ds:shrink-0 ds:items-center ds:justify-center ds:rounded-[var(--radius-full)] ds:bg-[color:var(--card)] ds:border ds:border-[color:var(--border)] ds:shadow-[var(--shadow-sm)]", Se = "ds:inline-block ds:h-3 ds:w-[6ch] ds:align-middle ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)] ds:animate-[skeleton-pulse_calc(var(--animation-duration)*8)_ease-in-out_infinite] ds:motion-reduce:animate-none ds:forced-colors:bg-[GrayText] ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText] ds:forced-colors:animate-none", Ne = {
51
52
  success: "ds:text-[color:var(--success-foreground)]",
@@ -608,6 +609,6 @@ export {
608
609
  ze as E,
609
610
  ke as S,
610
611
  O as a,
611
- tn as w
612
+ ln as w
612
613
  };
613
- //# sourceMappingURL=calendar-event-card-BNEzkjm-.js.map
614
+ //# sourceMappingURL=calendar-event-card-BJifpYZQ.js.map
@@ -7,10 +7,10 @@ import { P as A } from "./progress-D_g_Sl2g.js";
7
7
  import { T as C } from "./timestamp-DPLDWdxA.js";
8
8
  import { T as L } from "./transaction-chip-CkYd-3ky.js";
9
9
  import { A as O, b as G, c as Y, a as $ } from "./accordion-Ch3xp0mX.js";
10
- import { C as q } from "./care-plan-entry-card-AG1y3nyW.js";
10
+ import { C as q } from "./care-plan-entry-card-DY1toF6E.js";
11
11
  import { u as J } from "./registry-DvAUVLHh.js";
12
- import { C as Q, e as W } from "./entity-card-fpm-KUKc.js";
13
- import { i as X } from "./is-safe-url-DkETxeHz.js";
12
+ import { i as Q } from "./is-safe-url-CEy9CEml.js";
13
+ import { C as W, e as X } from "./entity-card-p-LANpYt.js";
14
14
  const Z = {
15
15
  id: "care-plan-card",
16
16
  // `expand` is host-delegated: the treatment-line list is an in-component
@@ -85,7 +85,7 @@ const Z = {
85
85
  );
86
86
  const K = d(`carePlanCard.state.${o}`, {
87
87
  defaultValue: ae[o]
88
- }), R = Q[o], U = !!u && X(u), k = !!m && m.length > 0, i = s == null ? void 0 : s.dueCents, p = s == null ? void 0 : s.billedAmountCents, h = s == null ? void 0 : s.overdueDays, z = typeof h == "number" && h > 0 && typeof i == "number" && i > 0, y = /* @__PURE__ */ e(
88
+ }), R = W[o], U = !!u && Q(u), k = !!m && m.length > 0, i = s == null ? void 0 : s.dueCents, p = s == null ? void 0 : s.billedAmountCents, h = s == null ? void 0 : s.overdueDays, z = typeof h == "number" && h > 0 && typeof i == "number" && i > 0, y = /* @__PURE__ */ e(
89
89
  "h3",
90
90
  {
91
91
  id: x,
@@ -104,7 +104,7 @@ const Z = {
104
104
  "data-component-id": l,
105
105
  "data-state": o,
106
106
  id: l,
107
- className: W({ surface: I, className: D }),
107
+ className: X({ surface: I, className: D }),
108
108
  ...S,
109
109
  children: /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
110
110
  /* @__PURE__ */ t("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)]", children: [
@@ -253,4 +253,4 @@ export {
253
253
  de as C,
254
254
  Z as c
255
255
  };
256
- //# sourceMappingURL=care-plan-card-DKScH9Ss.js.map
256
+ //# sourceMappingURL=care-plan-card-CjHq6PLo.js.map
@@ -10,7 +10,7 @@ import { T as J } from "./tooth-scheme-BtnFgugP.js";
10
10
  import { C as Q, b as X, a as Z } from "./collapsible-DVPM46bq.js";
11
11
  import { u as ee } from "./registry-DvAUVLHh.js";
12
12
  import { C as ae } from "./chevron-down-DWE7GSq9.js";
13
- import { e as te } from "./entity-card-fpm-KUKc.js";
13
+ import { e as te } from "./entity-card-p-LANpYt.js";
14
14
  const re = {
15
15
  id: "care-plan-entry-card",
16
16
  // `expand` is host-delegated: the per-phase breakdown is an in-component
@@ -319,4 +319,4 @@ export {
319
319
  le as C,
320
320
  re as c
321
321
  };
322
- //# sourceMappingURL=care-plan-entry-card-AG1y3nyW.js.map
322
+ //# sourceMappingURL=care-plan-entry-card-DY1toF6E.js.map
@@ -7,8 +7,8 @@ import { L as O } from "./link-CeV7FoI6.js";
7
7
  import { S as $ } from "./separator-Bdc9bqoJ.js";
8
8
  import { T as A } from "./timestamp-DPLDWdxA.js";
9
9
  import { u as q } from "./registry-DvAUVLHh.js";
10
- import { C as J, e as Q } from "./entity-card-fpm-KUKc.js";
11
- import { i as W } from "./is-safe-url-DkETxeHz.js";
10
+ import { i as J } from "./is-safe-url-CEy9CEml.js";
11
+ import { C as Q, e as W } from "./entity-card-p-LANpYt.js";
12
12
  const X = {
13
13
  id: "care-plan-header",
14
14
  capabilities: [],
@@ -83,7 +83,7 @@ const X = {
83
83
  defaultValue: "Care plan {{number}}"
84
84
  }), B = l(`carePlanCard.state.${s}`, {
85
85
  defaultValue: Y[s]
86
- }), R = t != null && t !== "", V = !!p && W(p), z = !!d && d.length > 0, x = !!m && m.length > 0, y = s === "accepted" ? e == null ? void 0 : e.acceptedIso : s === "closed" ? e == null ? void 0 : e.closedIso : s === "discarded" ? e == null ? void 0 : e.discardedIso : void 0, i = [];
86
+ }), R = t != null && t !== "", V = !!p && J(p), z = !!d && d.length > 0, x = !!m && m.length > 0, y = s === "accepted" ? e == null ? void 0 : e.acceptedIso : s === "closed" ? e == null ? void 0 : e.closedIso : s === "discarded" ? e == null ? void 0 : e.discardedIso : void 0, i = [];
87
87
  e != null && e.acceptedIso && s !== "accepted" && i.push({
88
88
  key: "accepted",
89
89
  label: l("carePlanCard.date.accepted", "Accepted on"),
@@ -125,7 +125,7 @@ const X = {
125
125
  "data-component-id": c,
126
126
  "data-state": s,
127
127
  id: c,
128
- className: Q({ surface: L, density: T, className: S }),
128
+ className: W({ surface: L, density: T, className: S }),
129
129
  ...k,
130
130
  children: /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
131
131
  /* @__PURE__ */ n("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)]", children: [
@@ -143,7 +143,7 @@ const X = {
143
143
  f ? /* @__PURE__ */ r("div", { className: "ds:flex ds:shrink-0 ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: f }) : null
144
144
  ] }),
145
145
  /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
146
- /* @__PURE__ */ n(P, { variant: J[s], size: "md", withDot: !0, children: [
146
+ /* @__PURE__ */ n(P, { variant: Q[s], size: "md", withDot: !0, children: [
147
147
  B,
148
148
  y ? /* @__PURE__ */ n(N, { children: [
149
149
  " · ",
@@ -195,4 +195,4 @@ export {
195
195
  ee as C,
196
196
  X as c
197
197
  };
198
- //# sourceMappingURL=care-plan-header-Dx5OMkc9.js.map
198
+ //# sourceMappingURL=care-plan-header-CeFXUDnL.js.map
@@ -0,0 +1,136 @@
1
+ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
+ import { useRef as y, useEffect as b } from "react";
3
+ import { useTranslation as w, Trans as T } from "react-i18next";
4
+ import { A as c } from "./alert-C4WKViaS.js";
5
+ import { B as g } from "./badge-BUk4RjTS.js";
6
+ import { B as p } from "./button-DohK_Ak_.js";
7
+ import { C as v } from "./card-n6W6LW-N.js";
8
+ import { f as C } from "./intl-locale-FWh-Y5_3.js";
9
+ function B(t, l) {
10
+ const r = new Date(t);
11
+ if (Number.isNaN(r.getTime())) return t;
12
+ try {
13
+ return new Intl.DateTimeFormat(C(l), {
14
+ dateStyle: "long",
15
+ timeZone: "UTC"
16
+ }).format(r);
17
+ } catch {
18
+ return t;
19
+ }
20
+ }
21
+ function K({
22
+ documents: t,
23
+ onSign: l,
24
+ onContinue: r,
25
+ noMobile: u = !1,
26
+ noMobileMessage: x,
27
+ headingLevel: m = 1,
28
+ focusOnMount: D = !1,
29
+ className: k
30
+ }) {
31
+ const { t: s, i18n: N } = w("ui"), f = y(null);
32
+ b(() => {
33
+ var n;
34
+ D && ((n = f.current) == null || n.focus({ preventScroll: !0 }));
35
+ }, []);
36
+ const a = t.length, h = t.filter((n) => n.signed).length, d = a > 0 && h === a, I = m === 1 ? "h1" : "h2";
37
+ return /* @__PURE__ */ e("div", { "data-component": "check-in-documents", className: k, children: /* @__PURE__ */ e(v, { variant: "elevated", className: "ds:w-full", children: /* @__PURE__ */ e(v.Body, { children: /* @__PURE__ */ i("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
38
+ /* @__PURE__ */ i("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
39
+ /* @__PURE__ */ e(
40
+ I,
41
+ {
42
+ ref: f,
43
+ tabIndex: -1,
44
+ className: m === 1 ? "type-title-page ds:m-0 ds:text-foreground ds:outline-none" : "type-title-card ds:m-0 ds:text-foreground ds:outline-none",
45
+ children: s("checkInDocuments.title")
46
+ }
47
+ ),
48
+ /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: s("checkInDocuments.intro") })
49
+ ] }),
50
+ a > 0 ? /* @__PURE__ */ e("span", { role: "status", "aria-live": "polite", className: "ds:self-start", children: /* @__PURE__ */ e(g, { variant: d ? "success" : "neutral", children: s("checkInDocuments.progress", {
51
+ signed: h,
52
+ total: a
53
+ }) }) }) : null,
54
+ a > 0 ? (
55
+ // eslint-disable-next-line jsx-a11y/no-redundant-roles -- role="list" restores list semantics that ds:list-none strips in Safari/VoiceOver
56
+ /* @__PURE__ */ e(
57
+ "ul",
58
+ {
59
+ role: "list",
60
+ "aria-label": s("checkInDocuments.listLabel"),
61
+ className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0",
62
+ children: t.map((n) => {
63
+ const o = n.signed ? void 0 : n.changedOn;
64
+ return /* @__PURE__ */ i(
65
+ "li",
66
+ {
67
+ "data-document-id": n.id,
68
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)] ds:p-[var(--spacing-md)]",
69
+ children: [
70
+ /* @__PURE__ */ i("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
71
+ /* @__PURE__ */ e(
72
+ "span",
73
+ {
74
+ dir: "auto",
75
+ className: "type-title-item ds:min-w-0 ds:break-words",
76
+ children: n.title
77
+ }
78
+ ),
79
+ /* @__PURE__ */ e(
80
+ g,
81
+ {
82
+ variant: n.signed ? "success" : o ? "error" : "warning",
83
+ children: n.signed ? s("checkInDocuments.statusSigned") : s(o ? "checkInDocuments.statusSignAgain" : "checkInDocuments.statusToSign")
84
+ }
85
+ )
86
+ ] }),
87
+ o ? /* @__PURE__ */ e(c, { variant: "warning", announce: "off", children: /* @__PURE__ */ e(c.Description, { children: /* @__PURE__ */ e(
88
+ T,
89
+ {
90
+ t: s,
91
+ ns: "ui",
92
+ i18nKey: "checkInDocuments.reSignNotice",
93
+ values: {
94
+ title: n.title,
95
+ date: B(o, N.language)
96
+ },
97
+ components: { title: /* @__PURE__ */ e("bdi", {}) }
98
+ }
99
+ ) }) }) : null
100
+ ]
101
+ },
102
+ n.id
103
+ );
104
+ })
105
+ }
106
+ )
107
+ ) : null,
108
+ u && !d && a > 0 ? /* @__PURE__ */ i(c, { variant: "warning", announce: "off", children: [
109
+ /* @__PURE__ */ e(c.Title, { as: m === 1 ? "h2" : "h3", children: s("checkInDocuments.noMobileTitle") }),
110
+ /* @__PURE__ */ e(c.Description, { children: x ?? s("checkInDocuments.noMobileBody") })
111
+ ] }) : null,
112
+ d && r ? /* @__PURE__ */ e(
113
+ p,
114
+ {
115
+ intent: "primary",
116
+ className: "ds:min-h-[var(--min-target-size)] ds:w-full",
117
+ "data-action": "documents-continue",
118
+ onClick: r,
119
+ children: s("checkInDocuments.continue")
120
+ }
121
+ ) : !d && a > 0 && !u && l ? /* @__PURE__ */ e(
122
+ p,
123
+ {
124
+ intent: "primary",
125
+ className: "ds:min-h-[var(--min-target-size)] ds:w-full",
126
+ "data-action": "sign-all",
127
+ onClick: l,
128
+ children: s("checkInDocuments.signAll")
129
+ }
130
+ ) : null
131
+ ] }) }) }) });
132
+ }
133
+ export {
134
+ K as C
135
+ };
136
+ //# sourceMappingURL=check-in-documents-CEVcgcYZ.js.map
@@ -7,7 +7,7 @@ import { B as b } from "./badge-BUk4RjTS.js";
7
7
  import { C as S } from "./card-n6W6LW-N.js";
8
8
  import { T as B } from "./timestamp-DPLDWdxA.js";
9
9
  import { SafeHtml as ie } from "../safe-html/index.js";
10
- import { n as te, P as I, F as O, N as re } from "./note-attachment-MNTIqdSz.js";
10
+ import { n as te, P as I, F as O, N as re } from "./note-attachment-JTIy9iXN.js";
11
11
  import { u as de } from "./use-clamp-overflow-DQE2kwZ9.js";
12
12
  import { u as ne } from "./registry-DvAUVLHh.js";
13
13
  const oe = {
@@ -337,4 +337,4 @@ export {
337
337
  ue as C,
338
338
  oe as c
339
339
  };
340
- //# sourceMappingURL=clinical-note-card-pPaeWWnu.js.map
340
+ //# sourceMappingURL=clinical-note-card-D--IwbZa.js.map
@@ -0,0 +1,385 @@
1
+ import { jsxs as c, Fragment as _, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as oe, useMemo as z, useImperativeHandle as de, Fragment as le } from "react";
3
+ import { c as $ } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as ce } from "react-i18next";
5
+ import { B as N } from "./badge-BUk4RjTS.js";
6
+ import { I as j } from "./icon-button-S8_weU3g.js";
7
+ import { C as q } from "./card-n6W6LW-N.js";
8
+ import { E as me } from "./empty-state-DwJ5YNzz.js";
9
+ import { P as ue } from "./panel-header-CbtlTe85.js";
10
+ import { P as pe } from "./pdf-viewer-TRC5jEm5.js";
11
+ import { T as fe, b as he, c as ve, a as ge } from "./tabs-CRIDBLP7.js";
12
+ import { a as we } from "./format-number-DdzqwMs1.js";
13
+ import { c as ye } from "./intl-locale-FWh-Y5_3.js";
14
+ import { a as be } from "./privacy-mask-C19dJFMk.js";
15
+ import { u as Pe } from "./use-controllable-state-BiY4xTzM.js";
16
+ import { u as Ne } from "./registry-DvAUVLHh.js";
17
+ import { F as xe } from "./file-image-cDgE-BTy.js";
18
+ import { F as Te } from "./file-text-5yv6r2ls.js";
19
+ import { F as Ae } from "./file-BuG1VMAy.js";
20
+ import { D as ke } from "./download-CfYKJO_j.js";
21
+ import { X as Ie } from "./x-B5YnXwCz.js";
22
+ import { c as ze } from "./createLucideIcon-DhHxpK9K.js";
23
+ /**
24
+ * @license lucide-react v1.22.0 - ISC
25
+ *
26
+ * This source code is licensed under the ISC license.
27
+ * See the LICENSE file in the root directory of this source tree.
28
+ */
29
+ const Be = [
30
+ ["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" }],
31
+ [
32
+ "path",
33
+ {
34
+ 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",
35
+ key: "1970lx"
36
+ }
37
+ ],
38
+ ["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" }]
39
+ ], De = ze("files", Be), Ce = {
40
+ id: "document-preview",
41
+ capabilities: ["close"],
42
+ state: {
43
+ kind: {
44
+ type: "'pdf' | 'image' | 'metadata' | 'empty'",
45
+ descriptionKey: "ui.agent.documentPreview.state.kind",
46
+ description: "Which render branch is active: pdf, image, metadata (no inline preview), or empty (no document). Structural — never the document name.",
47
+ read: (s) => s.getKind()
48
+ }
49
+ },
50
+ actions: {
51
+ get_name: {
52
+ // phi (not read): resolves the document display name, which can identify
53
+ // patients. PRS §26, phi outranks read so the host gates it behind
54
+ // stricter confirm + audit. The always-on kind slot stays name-free.
55
+ safety: "phi",
56
+ returns: "string | undefined",
57
+ returnsSchema: { type: ["string", "null"] },
58
+ idempotent: !0,
59
+ descriptionKey: "ui.agent.documentPreview.actions.getName",
60
+ description: "Read the display name of the previewed document. May identify a patient (PHI).",
61
+ invoke: (s) => s.getName()
62
+ }
63
+ },
64
+ domHooks: {
65
+ root: {
66
+ attr: "data-component",
67
+ value: "document-preview",
68
+ description: 'Marks the DocumentPreview region. When the host passes onClose and onDownload, the header buttons carry data-action="close-document" and data-action="download-document"; both only call the host.'
69
+ },
70
+ instanceId: {
71
+ attr: "data-component-id",
72
+ sourceProp: "id",
73
+ description: "Sourced from the id prop."
74
+ }
75
+ }
76
+ }, Fe = $(
77
+ [
78
+ "ds:flex ds:h-full ds:min-h-0 ds:min-w-0 ds:flex-col ds:overflow-auto",
79
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
80
+ "ds:focus-visible:outline-solid",
81
+ "ds:focus-visible:outline-ring",
82
+ // Drawn inside the box: the region fills its host, and a clipping
83
+ // ancestor would hide a ring drawn outside it.
84
+ "ds:focus-visible:outline-offset-[length:calc(var(--focus-ring-width)*-1)]"
85
+ ].join(" ")
86
+ ), Se = $(
87
+ [
88
+ "ds:flex ds:aspect-[4/3] ds:items-center ds:justify-center",
89
+ "ds:border-b ds:border-[color:var(--card-border)] ds:bg-muted"
90
+ ].join(" "),
91
+ {
92
+ variants: {
93
+ withheld: {
94
+ false: "ds:min-h-0 ds:overflow-hidden",
95
+ true: ""
96
+ }
97
+ },
98
+ defaultVariants: { withheld: !1 }
99
+ }
100
+ ), Le = {
101
+ signed: "success",
102
+ pending: "warning"
103
+ };
104
+ function E(s, d, l) {
105
+ if (!s) return "empty";
106
+ const r = d ?? "";
107
+ return r === "application/pdf" && l ? "pdf" : r.startsWith("image/") && l ? "image" : "metadata";
108
+ }
109
+ function B(s) {
110
+ const d = s ?? "";
111
+ return d.startsWith("image/") ? xe : d === "application/pdf" || d.startsWith("text/") || d.includes("word") ? Te : Ae;
112
+ }
113
+ const Me = [
114
+ "documentPreview.units.bytes",
115
+ "documentPreview.units.kilobytes",
116
+ "documentPreview.units.megabytes",
117
+ "documentPreview.units.gigabytes"
118
+ ], H = ["B", "KB", "MB", "GB"];
119
+ function Re(s, d, l) {
120
+ let r = s, m = 0;
121
+ for (; r >= 1024 && m < H.length - 1; )
122
+ r /= 1024, m++;
123
+ return `${we(r, d, {
124
+ maximumFractionDigits: m === 0 ? 0 : 1
125
+ })} ${l(Me[m], H[m])}`;
126
+ }
127
+ const Ve = oe((s, d) => {
128
+ const {
129
+ id: l,
130
+ name: r,
131
+ mimeType: m,
132
+ src: x,
133
+ metadata: D,
134
+ documents: b,
135
+ activeDocumentId: U,
136
+ defaultActiveDocumentId: G,
137
+ onActiveDocumentChange: X,
138
+ onDownload: T,
139
+ onClose: A,
140
+ privacy: h = !1,
141
+ locale: Y,
142
+ className: J
143
+ } = s, { t: i, i18n: C } = ce("ui"), k = ye(
144
+ Y ?? C.language ?? "en",
145
+ C.language
146
+ ), O = z(
147
+ () => new Intl.DateTimeFormat(k, { dateStyle: "medium" }),
148
+ [k]
149
+ ), u = z(() => b && b.length > 0 ? b : r ? [{ id: l ?? r, name: r, mimeType: m, src: x, metadata: D }] : [], [b, l, r, m, x, D]), g = u.length > 1, F = i("documentPreview.privateName", "Document"), S = (a, p) => h ? g ? i("documentPreview.privateTab", "Document {{position}}", {
150
+ position: p + 1
151
+ }) : F : a.name, [Q, Z] = Pe({
152
+ value: U,
153
+ defaultValue: G,
154
+ onChange: X
155
+ }), n = u.find((a) => a.id === Q) ?? u[0], I = z(
156
+ () => ({
157
+ getKind: () => n ? E(n.name, n.mimeType, n.src) : "empty",
158
+ getName: () => n == null ? void 0 : n.name
159
+ }),
160
+ [n]
161
+ );
162
+ de(d, () => I, [I]), Ne(Ce, I, l);
163
+ const L = (a) => {
164
+ const p = E(a.name, a.mimeType, a.src), e = a.metadata, se = B(a.mimeType), K = h && (p === "pdf" || p === "image");
165
+ let w;
166
+ K ? w = /* @__PURE__ */ t(be, {}) : p === "pdf" && a.src ? w = /* @__PURE__ */ t(
167
+ pe,
168
+ {
169
+ src: a.src,
170
+ toolbarVariant: "minimal",
171
+ ariaLabel: a.name,
172
+ className: "ds:h-full ds:w-full"
173
+ }
174
+ ) : p === "image" && a.src ? w = /* @__PURE__ */ t(
175
+ "img",
176
+ {
177
+ src: a.src,
178
+ alt: i("documentPreview.imageAlt", "Preview of {{name}}", {
179
+ name: a.name
180
+ }),
181
+ className: "ds:max-h-full ds:max-w-full ds:object-contain"
182
+ }
183
+ ) : w = /* @__PURE__ */ c("span", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)] ds:text-muted-foreground", children: [
184
+ /* @__PURE__ */ t(se, { "aria-hidden": "true", className: "ds:size-10" }),
185
+ /* @__PURE__ */ t("span", { className: "type-body-sm", children: i("documentPreview.noPreview", "No preview available.") })
186
+ ] });
187
+ const f = e == null ? void 0 : e.signatureStatus, W = !!(e != null && e.documentType) || !!(e != null && e.clinical) || f !== void 0 && f !== "none", v = (y) => O.format(new Date(y)), o = [];
188
+ e != null && e.createdBy && !h && o.push({
189
+ key: "createdBy",
190
+ label: i("documentPreview.fields.createdBy", "Created by"),
191
+ value: e.createdBy
192
+ }), e != null && e.createdAt && o.push({
193
+ key: "created",
194
+ label: i("documentPreview.fields.created", "Created"),
195
+ value: v(e.createdAt)
196
+ }), e != null && e.updatedAt && o.push({
197
+ key: "modified",
198
+ label: i("documentPreview.fields.modified", "Modified"),
199
+ value: v(e.updatedAt)
200
+ }), e != null && e.signatureRequestedAt && o.push({
201
+ key: "signatureRequested",
202
+ label: i(
203
+ "documentPreview.fields.signatureRequested",
204
+ "Signature requested"
205
+ ),
206
+ value: v(e.signatureRequestedAt)
207
+ }), e != null && e.signedAt && o.push({
208
+ key: "signed",
209
+ label: i("documentPreview.fields.signed", "Signed"),
210
+ value: v(e.signedAt)
211
+ }), e != null && e.sharedAt && o.push({
212
+ key: "sharedWithPatient",
213
+ label: i(
214
+ "documentPreview.fields.sharedWithPatient",
215
+ "Shared with patient"
216
+ ),
217
+ value: v(e.sharedAt)
218
+ }), (e == null ? void 0 : e.size) !== void 0 && o.push({
219
+ key: "size",
220
+ label: i("documentPreview.fields.size", "Size"),
221
+ value: Re(e.size, k, i)
222
+ }), e != null && e.expiresAt && o.push({
223
+ key: "expires",
224
+ label: i("documentPreview.fields.expires", "Expires"),
225
+ value: v(e.expiresAt)
226
+ });
227
+ const re = W || o.length > 0;
228
+ return /* @__PURE__ */ t("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ c(
229
+ q,
230
+ {
231
+ variant: "elevated",
232
+ className: "ds:flex ds:flex-col ds:overflow-hidden",
233
+ children: [
234
+ /* @__PURE__ */ t("div", { className: Se({ withheld: K }), children: w }),
235
+ re && /* @__PURE__ */ c(q.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
236
+ /* @__PURE__ */ t("h3", { className: "type-eyebrow ds:m-0 ds:text-muted-foreground", children: i("documentPreview.detailsTitle", "Details") }),
237
+ W && /* @__PURE__ */ c("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
238
+ (e == null ? void 0 : e.documentType) && /* @__PURE__ */ t(N, { variant: "neutral", size: "sm", children: e.documentType }),
239
+ (e == null ? void 0 : e.clinical) && /* @__PURE__ */ t(N, { variant: "info", size: "sm", children: i("documentPreview.clinical", "Clinical") }),
240
+ f && f !== "none" && /* @__PURE__ */ t(
241
+ N,
242
+ {
243
+ variant: Le[f],
244
+ size: "sm",
245
+ withDot: !0,
246
+ children: i(`documentPreview.signature.${f}`, f)
247
+ }
248
+ )
249
+ ] }),
250
+ o.length > 0 && /* @__PURE__ */ t("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: o.map((y) => /* @__PURE__ */ c(le, { children: [
251
+ /* @__PURE__ */ t("dt", { className: "ds:text-muted-foreground", children: y.label }),
252
+ /* @__PURE__ */ t("dd", { className: "ds:m-0", children: y.value })
253
+ ] }, y.key)) })
254
+ ] })
255
+ ]
256
+ }
257
+ ) });
258
+ }, ee = B(n == null ? void 0 : n.mimeType), te = g ? /* @__PURE__ */ t(De, { "aria-hidden": "true" }) : /* @__PURE__ */ t(ee, { "aria-hidden": "true" }), ie = g ? /* @__PURE__ */ c(_, { children: [
259
+ i("documentPreview.multiTitle", "Documents"),
260
+ /* @__PURE__ */ t(N, { variant: "neutral", size: "sm", children: u.length })
261
+ ] }) : n ? h ? F : /* @__PURE__ */ t("span", { dir: "auto", children: n.name }) : void 0, ae = !!(T || A), M = h ? i("documentPreview.downloadPrivate", "Download document") : i("documentPreview.download", "Download {{name}}", {
262
+ name: (n == null ? void 0 : n.name) ?? ""
263
+ }), R = i("documentPreview.close", "Close preview"), V = "ds:sm:[min-block-size:var(--accessible-target-floor,0px)] ds:[min-inline-size:var(--accessible-target-floor,auto)]", ne = ae ? /* @__PURE__ */ c(_, { children: [
264
+ T ? /* @__PURE__ */ t(
265
+ j,
266
+ {
267
+ icon: /* @__PURE__ */ t(ke, { "aria-hidden": "true" }),
268
+ intent: "ghost",
269
+ size: "sm",
270
+ className: V,
271
+ "aria-label": M,
272
+ tooltip: M,
273
+ "data-action": "download-document",
274
+ onClick: () => T()
275
+ }
276
+ ) : null,
277
+ A ? /* @__PURE__ */ t(
278
+ j,
279
+ {
280
+ icon: /* @__PURE__ */ t(Ie, { "aria-hidden": "true" }),
281
+ intent: "ghost",
282
+ size: "sm",
283
+ className: V,
284
+ "aria-label": R,
285
+ tooltip: R,
286
+ "data-action": "close-document",
287
+ onClick: () => A()
288
+ }
289
+ ) : null
290
+ ] }) : void 0;
291
+ let P;
292
+ return u.length === 0 ? P = /* @__PURE__ */ t(
293
+ me,
294
+ {
295
+ variant: "first-use",
296
+ size: "sm",
297
+ title: i("documentPreview.emptyTitle", "No document selected"),
298
+ description: i(
299
+ "documentPreview.emptyDescription",
300
+ "Select a document to preview it here."
301
+ )
302
+ }
303
+ ) : g ? P = /* @__PURE__ */ c(
304
+ fe,
305
+ {
306
+ value: (n == null ? void 0 : n.id) ?? "",
307
+ onValueChange: Z,
308
+ variant: "underlined",
309
+ size: "sm",
310
+ className: "ds:min-h-0 ds:flex-1 ds:pt-[var(--spacing-sm)]",
311
+ children: [
312
+ /* @__PURE__ */ t(
313
+ he,
314
+ {
315
+ "aria-label": i("documentPreview.tabsLabel", "Selected documents"),
316
+ className: "ds:gap-[var(--spacing-sm)]",
317
+ children: u.map((a, p) => {
318
+ const e = B(a.mimeType);
319
+ return /* @__PURE__ */ t(
320
+ ve,
321
+ {
322
+ value: a.id,
323
+ icon: /* @__PURE__ */ t(
324
+ e,
325
+ {
326
+ "aria-hidden": "true",
327
+ className: "ds:size-4 ds:text-[color:var(--accent)]"
328
+ }
329
+ ),
330
+ className: "ds:[min-inline-size:0]",
331
+ children: /* @__PURE__ */ t(
332
+ "span",
333
+ {
334
+ dir: h ? void 0 : "auto",
335
+ className: "ds:block ds:truncate ds:[min-inline-size:0]",
336
+ children: S(a, p)
337
+ }
338
+ )
339
+ },
340
+ a.id
341
+ );
342
+ })
343
+ }
344
+ ),
345
+ u.map((a) => /* @__PURE__ */ t(
346
+ ge,
347
+ {
348
+ value: a.id,
349
+ className: "ds:min-h-0 ds:flex-1",
350
+ children: L(a)
351
+ },
352
+ a.id
353
+ ))
354
+ ]
355
+ }
356
+ ) : P = L(n), /* @__PURE__ */ c(
357
+ "section",
358
+ {
359
+ "data-component": "document-preview",
360
+ "data-component-id": l,
361
+ tabIndex: 0,
362
+ "aria-label": i("documentPreview.regionLabel", "Document preview"),
363
+ className: Fe({ className: J }),
364
+ children: [
365
+ u.length > 0 && /* @__PURE__ */ t(
366
+ ue,
367
+ {
368
+ sticky: !0,
369
+ icon: te,
370
+ title: ie,
371
+ titleTooltip: !g && n ? S(n, 0) : void 0,
372
+ actions: ne
373
+ }
374
+ ),
375
+ P
376
+ ]
377
+ }
378
+ );
379
+ });
380
+ Ve.displayName = "DocumentPreview";
381
+ export {
382
+ Ve as D,
383
+ Ce as d
384
+ };
385
+ //# sourceMappingURL=document-preview-DLVIrOYV.js.map