@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.
- package/dist/_chunks/{agenda-card-B8hV3dZV.js → agenda-card-B9wgX_Ed.js} +2 -2
- package/dist/_chunks/{agenda-tray-Bu46s3dI.js → agenda-tray-CGcS_qoM.js} +2 -2
- package/dist/_chunks/appointment-card-DG3m9yN-.js +504 -0
- package/dist/_chunks/{appointment-peek-DZa6xyUb.js → appointment-peek-BK0tDs4C.js} +2 -2
- package/dist/_chunks/{appointment-timeline-DQePqpyH.js → appointment-timeline-BiI2riRZ.js} +2 -2
- package/dist/_chunks/appointment-tray-ClJCtYQj.js +200 -0
- package/dist/_chunks/{appointment-workflow-status-DMjuIK90.js → appointment-workflow-status-S-lx81Yz.js} +2 -2
- package/dist/_chunks/ban-CiSCCcOE.js +15 -0
- package/dist/_chunks/{calendar-BIoOeBTT.js → calendar-CyLtLBNP.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-BHx6kUhX.js → calendar-appointment-editor-dialog-BSkIYGlW.js} +13 -13
- package/dist/_chunks/{calendar-event-card-BNEzkjm-.js → calendar-event-card-BJifpYZQ.js} +7 -6
- package/dist/_chunks/{care-plan-card-DKScH9Ss.js → care-plan-card-CjHq6PLo.js} +6 -6
- package/dist/_chunks/{care-plan-entry-card-AG1y3nyW.js → care-plan-entry-card-DY1toF6E.js} +2 -2
- package/dist/_chunks/{care-plan-header-Dx5OMkc9.js → care-plan-header-CeFXUDnL.js} +6 -6
- package/dist/_chunks/check-in-documents-CEVcgcYZ.js +136 -0
- package/dist/_chunks/{clinical-note-card-pPaeWWnu.js → clinical-note-card-D--IwbZa.js} +2 -2
- package/dist/_chunks/document-preview-DLVIrOYV.js +385 -0
- package/dist/_chunks/{entity-card-fpm-KUKc.js → entity-card-p-LANpYt.js} +18 -17
- package/dist/_chunks/{error-page-B0fGNTRB.js → error-page-WLhmWUTq.js} +100 -115
- package/dist/_chunks/finished-terminal-unDnXT4j.js +191 -0
- package/dist/_chunks/house-DGCypGTo.js +21 -0
- package/dist/_chunks/is-safe-url-CEy9CEml.js +8 -0
- package/dist/_chunks/keypad-DBH_keVs.js +152 -0
- package/dist/_chunks/keypad-button-mOaPQRrH.js +114 -0
- package/dist/_chunks/{message-card-BG3_3nN1.js → message-card-Bw_q1qKx.js} +2 -2
- package/dist/_chunks/{message-tray-BjZv0Fsk.js → message-tray-pLGgLmoG.js} +2 -2
- package/dist/_chunks/{note-attachment-MNTIqdSz.js → note-attachment-JTIy9iXN.js} +2 -2
- package/dist/_chunks/{note-timeline-BQeW0VZY.js → note-timeline-BbjHMhkL.js} +2 -2
- package/dist/_chunks/{notes-panel-Cm-_pCRJ.js → notes-panel-BAyPOr8N.js} +2 -2
- package/dist/_chunks/{operator-hero-CnfWckNQ.js → operator-hero-D4wfVu2l.js} +2 -2
- package/dist/_chunks/otp-input-BNOTlxq3.js +342 -0
- package/dist/_chunks/patient-account-settings-BkAtIxJW.js +546 -0
- package/dist/_chunks/patient-card-DTh3QTyS.js +125 -0
- package/dist/_chunks/patient-check-in-resume-xhqjC6gf.js +742 -0
- package/dist/_chunks/patient-sign-in-pin-CDBqV254.js +432 -0
- package/dist/_chunks/patient-sign-in-steps-C2JSqlok.js +199 -0
- package/dist/_chunks/{patient-summary-card-BUcZ-gaL.js → patient-summary-card-Bl2NknPe.js} +2 -2
- package/dist/_chunks/{payment-request-card-Dv4WbRBe.js → payment-request-card-CNW00DCx.js} +6 -6
- package/dist/_chunks/{pdf-viewer-BnBKdx0y.js → pdf-viewer-TRC5jEm5.js} +472 -425
- package/dist/_chunks/pin-entry-BugWQMOS.js +219 -0
- package/dist/_chunks/pin-indicator-Cb-n40UI.js +124 -0
- package/dist/_chunks/portal-details-CTEsm705.js +478 -0
- package/dist/_chunks/portal-documents-D8skew0h.js +902 -0
- package/dist/_chunks/portal-parts-BdR29P7z.js +285 -0
- package/dist/_chunks/{privacy-mask-DJ1gee4c.js → privacy-mask-C19dJFMk.js} +5 -5
- package/dist/_chunks/{product-hub-panel-a8wdVOUt.js → product-hub-panel-K4QbULG7.js} +2 -2
- package/dist/_chunks/{registration-form-CwbhtKcy.js → registration-form-DS3RuKHu.js} +2 -2
- package/dist/_chunks/{reserved.agent-W8mR179D.js → reserved.agent-DOzOBUW7.js} +2 -2
- package/dist/_chunks/session-countdown-DOx1IBUB.js +232 -0
- package/dist/_chunks/{sign-document-CQZVzfpk.js → sign-document-DDZbmYHu.js} +2 -2
- package/dist/_chunks/{signature-field-DjabvRZm.js → signature-field-BjlY_yXH.js} +39 -34
- package/dist/_chunks/{signature-request-4pGq3YBe.js → signature-request-CHsM_iWi.js} +2 -2
- package/dist/_chunks/{signature-status-chip-pIoQjvH8.js → signature-status-chip-DS9hHwIt.js} +66 -69
- package/dist/_chunks/signing-end-screen-an9P8DOT.js +1041 -0
- package/dist/_chunks/sms-code-entry-Dgp4GwlM.js +316 -0
- package/dist/_chunks/step-up-dialog-C2JqJmCA.js +132 -0
- package/dist/_chunks/{task-editor-BL2hHxNz.js → task-editor-g1AGfxhr.js} +38 -38
- package/dist/_chunks/{use-appointment-details-read-_b7FRB1x.js → use-appointment-details-read-Dzc6fEzG.js} +6 -6
- package/dist/_chunks/use-zoom-drilldown-Cr1baU5X.js +221 -0
- package/dist/_chunks/{user-x-DYszNtIg.js → user-x-BJZg4kaP.js} +8 -19
- package/dist/_chunks/{verify-identity-types-CxtrBXsZ.js → verify-identity-types-C6Bam8v6.js} +2 -2
- package/dist/agent-catalog.json +723 -364
- package/dist/agent-i18n/en.json +75 -18
- package/dist/browser-support.js +1 -1
- package/dist/components/_shared/is-safe-url.d.ts +3 -1
- package/dist/components/agenda-card/index.js +2 -2
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/appointment-card/appointment-card.d.ts +45 -0
- package/dist/components/appointment-card/appointment-tray.d.ts +11 -0
- package/dist/components/appointment-card/index.js +3 -3
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/document-preview/document-preview.d.ts +61 -7
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/finished-terminal/finished-terminal.d.ts +63 -6
- package/dist/components/finished-terminal/index.d.ts +1 -1
- package/dist/components/finished-terminal/index.js +1 -1
- package/dist/components/index.d.ts +12 -0
- package/dist/components/keypad/index.d.ts +3 -0
- package/dist/components/keypad/index.js +6 -0
- package/dist/components/keypad/keypad.d.ts +54 -0
- package/dist/components/keypad-button/index.d.ts +3 -0
- package/dist/components/keypad-button/index.js +6 -0
- package/dist/components/keypad-button/keypad-button.d.ts +33 -0
- package/dist/components/message-card/index.js +2 -2
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/otp-input/otp-input.d.ts +11 -0
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts +7 -0
- package/dist/components/pin-entry/index.d.ts +3 -0
- package/dist/components/pin-entry/index.js +5 -0
- package/dist/components/pin-entry/pin-entry.agent.d.ts +4 -0
- package/dist/components/pin-entry/pin-entry.d.ts +64 -0
- package/dist/components/pin-indicator/index.d.ts +3 -0
- package/dist/components/pin-indicator/index.js +9 -0
- package/dist/components/pin-indicator/pin-indicator.d.ts +34 -0
- package/dist/components/product-hub-tray/index.js +2 -2
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/session-countdown/session-countdown.d.ts +19 -0
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/signature-field/index.js +1 -1
- package/dist/components/signature-field/signature-field.d.ts +17 -6
- package/dist/components/signature-status-chip/index.js +1 -1
- package/dist/components/signature-status-chip/signature-status-chip.d.ts +3 -2
- package/dist/components/sms-code-entry/index.d.ts +3 -0
- package/dist/components/sms-code-entry/index.js +5 -0
- package/dist/components/sms-code-entry/sms-code-entry.agent.d.ts +4 -0
- package/dist/components/sms-code-entry/sms-code-entry.d.ts +156 -0
- package/dist/components/step-up-dialog/index.d.ts +3 -0
- package/dist/components/step-up-dialog/index.js +5 -0
- package/dist/components/step-up-dialog/step-up-dialog.d.ts +108 -0
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/workflow-status/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-signing-session.d.ts +7 -2
- package/dist/host-compat.css +10 -1
- package/dist/i18n/locales/ar.d.ts +512 -1
- package/dist/i18n/locales/ar.js +509 -3
- package/dist/i18n/locales/de.d.ts +512 -1
- package/dist/i18n/locales/de.js +517 -4
- package/dist/i18n/locales/el.d.ts +512 -1
- package/dist/i18n/locales/el.js +512 -4
- package/dist/i18n/locales/en.d.ts +514 -1
- package/dist/i18n/locales/en.js +520 -4
- package/dist/i18n/locales/es.d.ts +512 -1
- package/dist/i18n/locales/es.js +510 -4
- package/dist/i18n/locales/fr.d.ts +512 -1
- package/dist/i18n/locales/fr.js +510 -4
- package/dist/i18n/locales/hi.d.ts +512 -1
- package/dist/i18n/locales/hi.js +510 -4
- package/dist/i18n/locales/it.d.ts +512 -1
- package/dist/i18n/locales/it.js +517 -4
- package/dist/i18n/locales/ja.d.ts +512 -1
- package/dist/i18n/locales/ja.js +510 -4
- package/dist/i18n/locales/nl.d.ts +512 -1
- package/dist/i18n/locales/nl.js +517 -4
- package/dist/i18n/locales/pl.d.ts +512 -1
- package/dist/i18n/locales/pl.js +517 -4
- package/dist/i18n/locales/pt.d.ts +512 -1
- package/dist/i18n/locales/pt.js +517 -4
- package/dist/i18n/locales/ro.d.ts +512 -1
- package/dist/i18n/locales/ro.js +517 -4
- package/dist/i18n/locales/ru.d.ts +512 -1
- package/dist/i18n/locales/ru.js +509 -3
- package/dist/i18n/locales/sq.d.ts +512 -1
- package/dist/i18n/locales/sq.js +510 -4
- package/dist/i18n/locales/sv.d.ts +512 -1
- package/dist/i18n/locales/sv.js +510 -4
- package/dist/i18n/locales/tr.d.ts +512 -1
- package/dist/i18n/locales/tr.js +512 -4
- package/dist/i18n/locales/zh.d.ts +512 -1
- package/dist/i18n/locales/zh.js +510 -4
- package/dist/index.js +1271 -1204
- package/dist/locales/ar.json +513 -2
- package/dist/locales/de.json +514 -3
- package/dist/locales/el.json +514 -3
- package/dist/locales/en.json +514 -3
- package/dist/locales/es.json +514 -3
- package/dist/locales/fr.json +514 -3
- package/dist/locales/hi.json +514 -3
- package/dist/locales/it.json +514 -3
- package/dist/locales/ja.json +514 -3
- package/dist/locales/nl.json +514 -3
- package/dist/locales/pl.json +514 -3
- package/dist/locales/pt.json +514 -3
- package/dist/locales/ro.json +514 -3
- package/dist/locales/ru.json +513 -2
- package/dist/locales/sq.json +514 -3
- package/dist/locales/sv.json +514 -3
- package/dist/locales/tr.json +514 -3
- package/dist/locales/zh.json +514 -3
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/check-in-documents/check-in-documents.d.ts +61 -0
- package/dist/patterns/check-in-documents/check-in-signable-document.d.ts +32 -0
- package/dist/patterns/check-in-documents/index.d.ts +4 -0
- package/dist/patterns/check-in-documents/index.js +5 -0
- package/dist/patterns/error-page/index.js +1 -1
- package/dist/patterns/patient-account-settings/index.d.ts +4 -0
- package/dist/patterns/patient-account-settings/index.js +5 -0
- package/dist/patterns/patient-account-settings/patient-account-settings-panels.d.ts +36 -0
- package/dist/patterns/patient-account-settings/patient-account-settings.d.ts +94 -0
- package/dist/patterns/patient-account-settings/patient-account-settings.types.d.ts +91 -0
- package/dist/patterns/patient-check-in/index.d.ts +20 -0
- package/dist/patterns/patient-check-in/index.js +13 -0
- package/dist/patterns/patient-check-in/patient-check-in-changed.d.ts +33 -0
- package/dist/patterns/patient-check-in/patient-check-in-connection-notice.d.ts +29 -0
- package/dist/patterns/patient-check-in/patient-check-in-done.d.ts +25 -0
- package/dist/patterns/patient-check-in/patient-check-in-entry.d.ts +29 -0
- package/dist/patterns/patient-check-in/patient-check-in-hub-empty.d.ts +23 -0
- package/dist/patterns/patient-check-in/patient-check-in-hub.d.ts +61 -0
- package/dist/patterns/patient-check-in/patient-check-in-personal-data.d.ts +73 -0
- package/dist/patterns/patient-check-in/patient-check-in-privacy.d.ts +9 -0
- package/dist/patterns/patient-check-in/patient-check-in-resume.d.ts +29 -0
- package/dist/patterns/patient-check-in/patient-check-in-shell.d.ts +60 -0
- package/dist/patterns/patient-check-in/patient-check-in-types.d.ts +92 -0
- package/dist/patterns/patient-portal/index.d.ts +12 -0
- package/dist/patterns/patient-portal/index.js +13 -0
- package/dist/patterns/patient-portal/portal-appointments.d.ts +70 -0
- package/dist/patterns/patient-portal/portal-details.d.ts +148 -0
- package/dist/patterns/patient-portal/portal-documents.d.ts +74 -0
- package/dist/patterns/patient-portal/portal-format.d.ts +14 -0
- package/dist/patterns/patient-portal/portal-home.d.ts +71 -0
- package/dist/patterns/patient-portal/portal-parts.d.ts +107 -0
- package/dist/patterns/patient-portal/portal-shell.d.ts +84 -0
- package/dist/patterns/patient-portal/portal-types.d.ts +157 -0
- package/dist/patterns/patient-sign-in/index.d.ts +7 -0
- package/dist/patterns/patient-sign-in/index.js +15 -0
- package/dist/patterns/patient-sign-in/patient-card.d.ts +74 -0
- package/dist/patterns/patient-sign-in/patient-sign-in-email.d.ts +109 -0
- package/dist/patterns/patient-sign-in/patient-sign-in-pin.d.ts +157 -0
- package/dist/patterns/patient-sign-in/patient-sign-in-steps.d.ts +143 -0
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signing/index.d.ts +25 -0
- package/dist/patterns/signing/index.js +16 -0
- package/dist/patterns/signing/multi-field-signer.d.ts +117 -0
- package/dist/patterns/signing/signing-awaiting-screen.d.ts +25 -0
- package/dist/patterns/signing/signing-chrome.d.ts +30 -0
- package/dist/patterns/signing/signing-document-screen.d.ts +87 -0
- package/dist/patterns/signing/signing-end-screen.d.ts +27 -0
- package/dist/patterns/signing/signing-finished-screen.d.ts +34 -0
- package/dist/patterns/signing/signing-footer.d.ts +56 -0
- package/dist/patterns/signing/signing-handoff-screen.d.ts +37 -0
- package/dist/patterns/signing/signing-message-dialog.d.ts +29 -0
- package/dist/patterns/signing/signing-progress-chip.d.ts +27 -0
- package/dist/patterns/signing/signing-roster.d.ts +44 -0
- package/dist/patterns/signing/signing-staff-id-confirmation.d.ts +49 -0
- package/dist/patterns/verify-identity/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +49 -1
- package/dist/_chunks/appointment-card-OAOur8lH.js +0 -434
- package/dist/_chunks/appointment-tray-DSFqO5Rm.js +0 -193
- package/dist/_chunks/document-preview-_kQ9QvZV.js +0 -291
- package/dist/_chunks/finished-terminal-FR8uc_Ws.js +0 -122
- package/dist/_chunks/is-safe-url-DkETxeHz.js +0 -7
- package/dist/_chunks/otp-input-gV1446Dw.js +0 -301
- package/dist/_chunks/session-countdown-C4tzbJVc.js +0 -223
- package/dist/_chunks/use-zoom-drilldown-qCX34w9I.js +0 -210
|
@@ -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
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { c as t } from "./index-D2ZczOXr.js";
|
|
2
|
-
import { U as c,
|
|
2
|
+
import { U as c, T as s } from "./user-x-BJZg4kaP.js";
|
|
3
|
+
import { B as i } from "./ban-CiSCCcOE.js";
|
|
3
4
|
import { C as d } from "./check-DrFSN__t.js";
|
|
4
5
|
import { S as l } from "./stethoscope-sZXGC43m.js";
|
|
5
6
|
import { C as e } from "./clock-Drd4Wtis.js";
|
|
6
|
-
const
|
|
7
|
+
const _ = t(
|
|
7
8
|
[
|
|
8
9
|
"ds:relative ds:rounded-[var(--radius-lg)]",
|
|
9
10
|
"ds:text-[color:var(--card-foreground)]",
|
|
@@ -28,20 +29,20 @@ const T = t(
|
|
|
28
29
|
density: "comfortable"
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
|
-
),
|
|
32
|
+
), I = {
|
|
32
33
|
estimate: "info",
|
|
33
34
|
accepted: "success",
|
|
34
35
|
discarded: "error",
|
|
35
36
|
closed: "neutral"
|
|
36
37
|
}, v = {
|
|
37
|
-
confirmed: { tone: "success", Icon:
|
|
38
|
+
confirmed: { tone: "success", Icon: s },
|
|
38
39
|
waiting: { tone: "info", Icon: e },
|
|
39
40
|
in_care: { tone: "accent", Icon: l },
|
|
40
41
|
done: { tone: "success", Icon: d },
|
|
41
|
-
cancelled: { tone: "error", Icon:
|
|
42
|
+
cancelled: { tone: "error", Icon: i },
|
|
42
43
|
absent: { tone: "warning", Icon: c }
|
|
43
44
|
};
|
|
44
|
-
function
|
|
45
|
+
function O(r) {
|
|
45
46
|
return v[r] ?? { tone: "neutral", Icon: e };
|
|
46
47
|
}
|
|
47
48
|
const a = [
|
|
@@ -55,7 +56,7 @@ const a = [
|
|
|
55
56
|
"var(--color-indigo-500)",
|
|
56
57
|
"var(--color-orange-500)",
|
|
57
58
|
"var(--color-fuchsia-500)"
|
|
58
|
-
], u = "var(--color-grey-700)",
|
|
59
|
+
], u = "var(--color-grey-700)", m = [
|
|
59
60
|
"var(--color-violet-700)",
|
|
60
61
|
"var(--color-purple-700)",
|
|
61
62
|
"var(--color-magenta-700)",
|
|
@@ -66,26 +67,26 @@ const a = [
|
|
|
66
67
|
"var(--color-indigo-700)",
|
|
67
68
|
"var(--color-orange-700)",
|
|
68
69
|
"var(--color-fuchsia-700)"
|
|
69
|
-
],
|
|
70
|
+
], f = "var(--color-grey-900)";
|
|
70
71
|
function n(r) {
|
|
71
72
|
if (r == null) return -1;
|
|
72
73
|
const o = typeof r == "number" ? r : Number.parseInt(r, 10);
|
|
73
74
|
return Number.isFinite(o) ? (Math.trunc(o) % a.length + a.length) % a.length : -1;
|
|
74
75
|
}
|
|
75
|
-
function
|
|
76
|
+
function C(r) {
|
|
76
77
|
const o = n(r);
|
|
77
78
|
return o < 0 ? u : a[o];
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function w(r) {
|
|
80
81
|
const o = n(r);
|
|
81
|
-
return o < 0 ?
|
|
82
|
+
return o < 0 ? f : m[o];
|
|
82
83
|
}
|
|
83
84
|
export {
|
|
84
85
|
v as A,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
I as C,
|
|
87
|
+
O as a,
|
|
88
|
+
w as b,
|
|
89
|
+
C as c,
|
|
90
|
+
_ as e
|
|
90
91
|
};
|
|
91
|
-
//# sourceMappingURL=entity-card-
|
|
92
|
+
//# sourceMappingURL=entity-card-p-LANpYt.js.map
|