@alfadocs/ui-kit 0.46.0 → 0.48.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-CFyWSX7Z.js → agenda-card-BaSfVfrL.js} +25 -29
- package/dist/_chunks/{agenda-tray-Dyj9ChHC.js → agenda-tray-DQayYmQ0.js} +50 -67
- package/dist/_chunks/ai-consent-banner-DO5ingMq.js +169 -0
- package/dist/_chunks/ai-tools-rail-CxYG04cw.js +280 -0
- package/dist/_chunks/alia-sidebar-DlvyXgVC.js +1126 -0
- package/dist/_chunks/anamnesis-card-CmkBVAln.js +156 -0
- package/dist/_chunks/appointment-tray-BwDHhWWC.js +419 -0
- package/dist/_chunks/{audio-recorder-C1rhKhSN.js → audio-recorder-DC-v9YFW.js} +81 -91
- package/dist/_chunks/{bmi-calculator-CQqXTVNL.js → bmi-calculator-DdylQzT6.js} +2 -2
- package/dist/_chunks/{booking-DlDVuWMd.js → booking-WV2GSru5.js} +291 -303
- package/dist/_chunks/{calculator-dialog-D-nfvteH.js → calculator-dialog-CFk4I91b.js} +2 -2
- package/dist/_chunks/calendar-days-C4BmpCZg.js +23 -0
- package/dist/_chunks/{calendar-YHFknAGv.js → calendar-oYWOCrnf.js} +195 -210
- package/dist/_chunks/care-plan-card-QmNpGggC.js +252 -0
- package/dist/_chunks/care-plan-entry-card-Cnra7vUc.js +318 -0
- package/dist/_chunks/{chat-input-CQe7nR_v.js → chat-input-CFwc7JxL.js} +2 -1
- package/dist/_chunks/{chat-message-ASgGtj-L.js → chat-message-Dm8U2RY1.js} +81 -74
- package/dist/_chunks/clinical-note-card-BYo437dU.js +333 -0
- package/dist/_chunks/code-block-HoddNOKJ.js +106 -0
- package/dist/_chunks/{contact-profile-card-DHyuAPXM.js → contact-profile-card-DvvVfAA2.js} +102 -115
- package/dist/_chunks/{cycle-calculator-KxA8dqDf.js → cycle-calculator-DYvGm_m1.js} +2 -2
- package/dist/_chunks/{dialog-BTpZV6It.js → dialog-DMGnSelc.js} +55 -55
- package/dist/_chunks/download-CDF1sbL9.js +16 -0
- package/dist/_chunks/{due-date-calculator-mFxpHLml.js → due-date-calculator-BXd3ANj7.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-BEBUQl9P.js → editable-currency-cell-renderer-CLil9B29.js} +283 -293
- package/dist/_chunks/entity-card-COhmqHly.js +69 -0
- package/dist/_chunks/{gestational-age-calculator-gWI_uRA1.js → gestational-age-calculator-Crj6FgZw.js} +2 -2
- package/dist/_chunks/{insert-result-C5ABnzDl.js → insert-result-DNdi_JYW.js} +140 -168
- package/dist/_chunks/is-safe-url-DkETxeHz.js +7 -0
- package/dist/_chunks/languages-DsVf_WzT.js +19 -0
- package/dist/_chunks/layers-pzGcbLPj.js +34 -0
- package/dist/_chunks/{message-card-DSPw5ghw.js → message-card-Dvl1TgaN.js} +15 -19
- package/dist/_chunks/{message-tray-hSQff9u4.js → message-tray-Dl6GQaaV.js} +2 -2
- package/dist/_chunks/mic-B4Gog3Gi.js +16 -0
- package/dist/_chunks/operator-hero-CM8949Hd.js +198 -0
- package/dist/_chunks/patient-summary-card-BnTqxcTr.js +443 -0
- package/dist/_chunks/payment-request-card-B_lyobd0.js +478 -0
- package/dist/_chunks/{pdf-viewer-CWEXTlwq.js → pdf-viewer-G8SU6Azw.js} +3 -3
- package/dist/_chunks/pencil-CfQX-0Qc.js +21 -0
- package/dist/_chunks/periodontal-chart-card-BYs9hax1.js +455 -0
- package/dist/_chunks/phone-Bi5yUm4I.js +20 -0
- package/dist/_chunks/{practice-results-DDi-kvaD.js → practice-results-BFL_mcDW.js} +3 -2
- package/dist/_chunks/{pregnancy-weight-gain-BtEHaSqy.js → pregnancy-weight-gain-C7dK89jE.js} +2 -2
- package/dist/_chunks/scan-line-lGioFwLC.js +18 -0
- package/dist/_chunks/shield-check-BjCGH_Sr.js +21 -0
- package/dist/_chunks/{sign-document-BCyLpFHJ.js → sign-document-DPI2pY9V.js} +2 -2
- package/dist/_chunks/{streaming-text-GH07yIYh.js → streaming-text-CfhDqtIT.js} +49 -45
- package/dist/_chunks/{transaction-chip-B8ujzowA.js → transaction-chip-BZCa6XDn.js} +8 -6
- package/dist/_chunks/{unit-converter-u3CwNDpP.js → unit-converter-jWp3Z85y.js} +2 -2
- package/dist/_chunks/user-cog-BS_qc8nA.js +24 -0
- package/dist/_chunks/video-BAeICxCT.js +21 -0
- package/dist/_chunks/{workflow-map-BFNpzTiw.js → workflow-map-ZXw-zsZ8.js} +186 -219
- package/dist/agent-catalog.json +324 -1
- package/dist/components/_shared/code-block.d.ts +39 -0
- package/dist/components/_shared/entity-card/entity-card.d.ts +40 -0
- package/dist/components/_shared/entity-card/index.d.ts +3 -0
- package/dist/components/_shared/index.d.ts +2 -0
- package/dist/components/_shared/is-safe-url.d.ts +13 -0
- package/dist/components/agenda-card/agenda-card.d.ts +1 -2
- package/dist/components/agenda-card/index.d.ts +2 -1
- package/dist/components/agenda-card/index.js +6 -5
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/ai-consent-banner.agent.d.ts +4 -0
- package/dist/components/ai-consent-banner/ai-consent-banner.d.ts +45 -0
- package/dist/components/ai-consent-banner/index.d.ts +4 -0
- package/dist/components/ai-consent-banner/index.js +6 -0
- package/dist/components/ai-tools-rail/ai-tools-rail.agent.d.ts +4 -0
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +60 -0
- package/dist/components/ai-tools-rail/index.d.ts +4 -0
- package/dist/components/ai-tools-rail/index.js +6 -0
- package/dist/components/anamnesis-card/anamnesis-card.d.ts +68 -0
- package/dist/components/anamnesis-card/index.d.ts +3 -0
- package/dist/components/anamnesis-card/index.js +5 -0
- package/dist/components/appointment-card/appointment-card.agent.d.ts +3 -0
- package/dist/components/appointment-card/appointment-card.d.ts +93 -0
- package/dist/components/appointment-card/appointment-tray.agent.d.ts +4 -0
- package/dist/components/appointment-card/appointment-tray.d.ts +48 -0
- package/dist/components/appointment-card/index.d.ts +8 -0
- package/dist/components/appointment-card/index.js +10 -0
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/care-plan-card/care-plan-card.agent.d.ts +4 -0
- package/dist/components/care-plan-card/care-plan-card.d.ts +102 -0
- package/dist/components/care-plan-card/index.d.ts +4 -0
- package/dist/components/care-plan-card/index.js +6 -0
- package/dist/components/care-plan-entry-card/care-plan-entry-card.agent.d.ts +4 -0
- package/dist/components/care-plan-entry-card/care-plan-entry-card.d.ts +110 -0
- package/dist/components/care-plan-entry-card/index.d.ts +4 -0
- package/dist/components/care-plan-entry-card/index.js +6 -0
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/chat-message.d.ts +13 -0
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.agent.d.ts +4 -0
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +98 -0
- package/dist/components/clinical-note-card/index.d.ts +4 -0
- package/dist/components/clinical-note-card/index.js +6 -0
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +7 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/index.d.ts +10 -0
- package/dist/components/message-card/index.js +5 -4
- package/dist/components/message-card/message-card.d.ts +1 -2
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts +9 -0
- package/dist/components/patient-summary-card/index.d.ts +4 -0
- package/dist/components/patient-summary-card/index.js +6 -0
- package/dist/components/patient-summary-card/patient-summary-card.agent.d.ts +4 -0
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +120 -0
- package/dist/components/payment-card/index.d.ts +7 -0
- package/dist/components/payment-card/index.js +8 -0
- package/dist/components/payment-card/payment-card.agent.d.ts +4 -0
- package/dist/components/payment-card/payment-card.d.ts +71 -0
- package/dist/components/payment-card/payment-request-card.agent.d.ts +4 -0
- package/dist/components/payment-card/payment-request-card.d.ts +43 -0
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.d.ts +4 -0
- package/dist/components/periodontal-chart-card/index.js +7 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.agent.d.ts +4 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.d.ts +74 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +366 -0
- package/dist/i18n/locales/ar.js +367 -1
- package/dist/i18n/locales/de.d.ts +366 -0
- package/dist/i18n/locales/de.js +367 -1
- package/dist/i18n/locales/el.d.ts +366 -0
- package/dist/i18n/locales/el.js +367 -1
- package/dist/i18n/locales/en.d.ts +366 -0
- package/dist/i18n/locales/en.js +367 -1
- package/dist/i18n/locales/es.d.ts +366 -0
- package/dist/i18n/locales/es.js +367 -1
- package/dist/i18n/locales/fr.d.ts +366 -0
- package/dist/i18n/locales/fr.js +367 -1
- package/dist/i18n/locales/hi.d.ts +366 -0
- package/dist/i18n/locales/hi.js +367 -1
- package/dist/i18n/locales/it.d.ts +366 -0
- package/dist/i18n/locales/it.js +367 -1
- package/dist/i18n/locales/ja.d.ts +366 -0
- package/dist/i18n/locales/ja.js +367 -1
- package/dist/i18n/locales/nl.d.ts +366 -0
- package/dist/i18n/locales/nl.js +367 -1
- package/dist/i18n/locales/pl.d.ts +366 -0
- package/dist/i18n/locales/pl.js +367 -1
- package/dist/i18n/locales/pt.d.ts +366 -0
- package/dist/i18n/locales/pt.js +367 -1
- package/dist/i18n/locales/ro.d.ts +366 -0
- package/dist/i18n/locales/ro.js +367 -1
- package/dist/i18n/locales/ru.d.ts +366 -0
- package/dist/i18n/locales/ru.js +367 -1
- package/dist/i18n/locales/sq.d.ts +366 -0
- package/dist/i18n/locales/sq.js +367 -1
- package/dist/i18n/locales/sv.d.ts +366 -0
- package/dist/i18n/locales/sv.js +367 -1
- package/dist/i18n/locales/tr.d.ts +366 -0
- package/dist/i18n/locales/tr.js +367 -1
- package/dist/i18n/locales/zh.d.ts +366 -0
- package/dist/i18n/locales/zh.js +367 -1
- package/dist/index.js +527 -491
- package/dist/locales/ar.json +367 -1
- package/dist/locales/de.json +367 -1
- package/dist/locales/el.json +367 -1
- package/dist/locales/en.json +367 -1
- package/dist/locales/es.json +367 -1
- package/dist/locales/fr.json +367 -1
- package/dist/locales/hi.json +367 -1
- package/dist/locales/it.json +367 -1
- package/dist/locales/ja.json +367 -1
- package/dist/locales/nl.json +367 -1
- package/dist/locales/pl.json +367 -1
- package/dist/locales/pt.json +367 -1
- package/dist/locales/ro.json +367 -1
- package/dist/locales/ru.json +367 -1
- package/dist/locales/sq.json +367 -1
- package/dist/locales/sv.json +367 -1
- package/dist/locales/tr.json +367 -1
- package/dist/locales/zh.json +367 -1
- package/dist/patterns/alia-assistant/alia-types.d.ts +76 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +42 -1
- package/dist/_chunks/alia-sidebar-Be8FhKYd.js +0 -837
- package/dist/_chunks/operator-hero-7LiiP7zi.js +0 -171
- package/dist/_chunks/shield-check-C73ma9Cs.js +0 -36
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as va, useId as ba, useMemo as xa } from "react";
|
|
3
|
+
import { c as Sa } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as Ca } from "react-i18next";
|
|
5
|
+
import { A as H } from "./avatar-BNQNhoyL.js";
|
|
6
|
+
import { B as w } from "./badge-zsf5i5bH.js";
|
|
7
|
+
import { C as O } from "./card-DPmk26CL.js";
|
|
8
|
+
import { K as Na, a as Aa } from "./key-value-pair-CkQIb9EG.js";
|
|
9
|
+
import { L as S } from "./link-DrD_cRUg.js";
|
|
10
|
+
import { S as C } from "./skeleton-CZbwyJAA.js";
|
|
11
|
+
import { T as W } from "./tag-CdA0s_VV.js";
|
|
12
|
+
import { T as ka } from "./transaction-chip-BZCa6XDn.js";
|
|
13
|
+
import { i as J } from "./is-safe-url-DkETxeHz.js";
|
|
14
|
+
import { u as Va } from "./registry-nPAVE19X.js";
|
|
15
|
+
import { M as Ma } from "./mail-C8irm52s.js";
|
|
16
|
+
import { P as La } from "./phone-Bi5yUm4I.js";
|
|
17
|
+
import { M as Pa } from "./map-pin-B8STOPMJ.js";
|
|
18
|
+
import { S as wa } from "./shield-check-BjCGH_Sr.js";
|
|
19
|
+
import { S as $a } from "./sparkles-CuYXqQLg.js";
|
|
20
|
+
import { c as $ } from "./createLucideIcon-CrFbzy84.js";
|
|
21
|
+
/**
|
|
22
|
+
* @license lucide-react v1.8.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/
|
|
27
|
+
const Ea = [
|
|
28
|
+
[
|
|
29
|
+
"path",
|
|
30
|
+
{
|
|
31
|
+
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
32
|
+
key: "1oefj6"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
36
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
37
|
+
], _a = $("file-exclamation-point", Ea);
|
|
38
|
+
/**
|
|
39
|
+
* @license lucide-react v1.8.0 - ISC
|
|
40
|
+
*
|
|
41
|
+
* This source code is licensed under the ISC license.
|
|
42
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
+
*/
|
|
44
|
+
const Da = [
|
|
45
|
+
[
|
|
46
|
+
"path",
|
|
47
|
+
{
|
|
48
|
+
d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
|
|
49
|
+
key: "18887p"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
["path", { d: "M12 15h.01", key: "q59x07" }],
|
|
53
|
+
["path", { d: "M12 7v4", key: "xawao1" }]
|
|
54
|
+
], Ta = $("message-square-warning", Da);
|
|
55
|
+
/**
|
|
56
|
+
* @license lucide-react v1.8.0 - ISC
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the ISC license.
|
|
59
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/
|
|
61
|
+
const Ga = [
|
|
62
|
+
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
63
|
+
["path", { d: "M16 3.128a4 4 0 0 1 0 7.744", key: "16gr8j" }],
|
|
64
|
+
["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
|
|
65
|
+
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
|
|
66
|
+
], Fa = $("users", Ga), za = {
|
|
67
|
+
id: "patient-summary-card",
|
|
68
|
+
capabilities: ["view_change"],
|
|
69
|
+
state: {
|
|
70
|
+
summary: {
|
|
71
|
+
type: "{ id?: string; hasUnpaid: boolean; unsignedDocumentsCount: number; highlightedAnamnesisCount: number; aiConsentGranted: boolean }",
|
|
72
|
+
descriptionKey: "ui.agent.patientSummaryCard.state.summary",
|
|
73
|
+
description: "Structural summary of the patient card — identifiers, counts, and consent flags only. Never patient identity or clinical content.",
|
|
74
|
+
read: (r) => r.getSummary()
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
actions: {},
|
|
78
|
+
domHooks: {
|
|
79
|
+
root: {
|
|
80
|
+
attr: "data-component",
|
|
81
|
+
value: "patient-summary-card",
|
|
82
|
+
description: "Marks the PatientSummaryCard root region."
|
|
83
|
+
},
|
|
84
|
+
instanceId: {
|
|
85
|
+
attr: "data-component-id",
|
|
86
|
+
sourceProp: "id",
|
|
87
|
+
description: "Sourced from the id prop."
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, Ba = Sa("ds:w-full ds:text-[color:var(--foreground)]", {
|
|
91
|
+
variants: {
|
|
92
|
+
// Matches the kit's other `surface` props (ContactProfileCard,
|
|
93
|
+
// OperatorHero). `'elevated'` wraps the content in `<Card>`.
|
|
94
|
+
surface: {
|
|
95
|
+
flat: "",
|
|
96
|
+
elevated: ""
|
|
97
|
+
},
|
|
98
|
+
// Density tunes the avatar size + body padding. `comfortable` reads
|
|
99
|
+
// as a page header; `compact` fits an embedded sidebar / aside.
|
|
100
|
+
density: {
|
|
101
|
+
comfortable: "",
|
|
102
|
+
compact: ""
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
defaultVariants: {
|
|
106
|
+
surface: "elevated",
|
|
107
|
+
density: "comfortable"
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
function Ia(r) {
|
|
111
|
+
return r.replace(/[^\d+]/g, "");
|
|
112
|
+
}
|
|
113
|
+
const Ua = {
|
|
114
|
+
highlightedAnamnesis: Ta,
|
|
115
|
+
unsignedDocuments: _a
|
|
116
|
+
}, ja = {
|
|
117
|
+
highlightedAnamnesis: "warning",
|
|
118
|
+
unsignedDocuments: "error"
|
|
119
|
+
}, Ra = {
|
|
120
|
+
highlightedAnamnesis: "{{count}} highlighted anamnesis answers",
|
|
121
|
+
unsignedDocuments: "{{count}} unsigned documents"
|
|
122
|
+
}, Ka = {
|
|
123
|
+
yes: "Yes",
|
|
124
|
+
no: "No",
|
|
125
|
+
not_specified: "Not specified"
|
|
126
|
+
}, qa = va(
|
|
127
|
+
({
|
|
128
|
+
name: r,
|
|
129
|
+
title: N,
|
|
130
|
+
ageYears: E,
|
|
131
|
+
dateOfBirth: _,
|
|
132
|
+
gender: A,
|
|
133
|
+
avatarUrl: Q,
|
|
134
|
+
patientUrl: k,
|
|
135
|
+
email: p,
|
|
136
|
+
emailEnabled: X = !1,
|
|
137
|
+
phone: d,
|
|
138
|
+
cityProvince: D,
|
|
139
|
+
marketingConsent: o,
|
|
140
|
+
aiConsent: l,
|
|
141
|
+
flags: s,
|
|
142
|
+
familyRelations: V,
|
|
143
|
+
assignedTo: h,
|
|
144
|
+
currency: Y = "EUR",
|
|
145
|
+
locale: Z,
|
|
146
|
+
loading: f = !1,
|
|
147
|
+
actionSlot: T,
|
|
148
|
+
onActivate: G,
|
|
149
|
+
surface: F = "elevated",
|
|
150
|
+
density: c = "comfortable",
|
|
151
|
+
"aria-label": z,
|
|
152
|
+
id: m,
|
|
153
|
+
className: aa,
|
|
154
|
+
...ea
|
|
155
|
+
}, ta) => {
|
|
156
|
+
const { t: e, i18n: na } = Ca(), M = ba(), sa = Z ?? na.language ?? "en", L = s == null ? void 0 : s.unpaidAmountCents, y = (s == null ? void 0 : s.unsignedDocumentsCount) ?? 0, g = (s == null ? void 0 : s.highlightedAnamnesisCount) ?? 0, v = L != null && L > 0, ia = xa(
|
|
157
|
+
() => ({
|
|
158
|
+
getSummary: () => ({
|
|
159
|
+
id: m,
|
|
160
|
+
hasUnpaid: v,
|
|
161
|
+
unsignedDocumentsCount: y,
|
|
162
|
+
highlightedAnamnesisCount: g,
|
|
163
|
+
aiConsentGranted: l != null
|
|
164
|
+
})
|
|
165
|
+
}),
|
|
166
|
+
[
|
|
167
|
+
m,
|
|
168
|
+
v,
|
|
169
|
+
y,
|
|
170
|
+
g,
|
|
171
|
+
l
|
|
172
|
+
]
|
|
173
|
+
);
|
|
174
|
+
Va(za, ia, m);
|
|
175
|
+
const ra = z ?? e("patientSummaryCard.regionLabel", { defaultValue: "Patient overview" }), la = {
|
|
176
|
+
mr: "Mr.",
|
|
177
|
+
ms: "Ms."
|
|
178
|
+
}, B = N ? e(`patientSummaryCard.title.${N}`, {
|
|
179
|
+
defaultValue: la[N]
|
|
180
|
+
}) : void 0, I = B ? `${B} ${r}` : r, da = {
|
|
181
|
+
m: "Male",
|
|
182
|
+
f: "Female"
|
|
183
|
+
}, b = [];
|
|
184
|
+
A && b.push(
|
|
185
|
+
e(`patientSummaryCard.gender.${A}`, {
|
|
186
|
+
defaultValue: da[A]
|
|
187
|
+
})
|
|
188
|
+
), E != null && b.push(
|
|
189
|
+
e("patientSummaryCard.identity.age", {
|
|
190
|
+
count: E,
|
|
191
|
+
defaultValue: "{{count}} yrs"
|
|
192
|
+
})
|
|
193
|
+
), _ && b.push(
|
|
194
|
+
e("patientSummaryCard.identity.bornOn", {
|
|
195
|
+
date: _,
|
|
196
|
+
defaultValue: "Born {{date}}"
|
|
197
|
+
})
|
|
198
|
+
);
|
|
199
|
+
const U = b.join(
|
|
200
|
+
e("patientSummaryCard.identity.separator", { defaultValue: " · " })
|
|
201
|
+
), oa = !!k && J(k), ca = c === "comfortable" ? "xl" : "lg", j = c === "comfortable" ? "type-title-card" : "type-title-item", R = c === "comfortable" ? "ds:gap-[var(--spacing-md)]" : "ds:gap-[var(--spacing-sm)]", i = [];
|
|
202
|
+
p && i.push({
|
|
203
|
+
key: "email",
|
|
204
|
+
icon: /* @__PURE__ */ a(Ma, { "aria-hidden": "true" }),
|
|
205
|
+
label: e("patientSummaryCard.label.email", { defaultValue: "Email" }),
|
|
206
|
+
value: X ? /* @__PURE__ */ a(S, { href: `mailto:${p}`, intent: "default", onClick: G, children: p }) : /* @__PURE__ */ a("span", { className: "ds:text-[color:var(--muted-foreground)]", children: p })
|
|
207
|
+
}), d && i.push({
|
|
208
|
+
key: "phone",
|
|
209
|
+
icon: /* @__PURE__ */ a(La, { "aria-hidden": "true" }),
|
|
210
|
+
label: d.label ?? e("patientSummaryCard.label.phone", { defaultValue: "Phone" }),
|
|
211
|
+
value: /* @__PURE__ */ n("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
212
|
+
/* @__PURE__ */ a(
|
|
213
|
+
S,
|
|
214
|
+
{
|
|
215
|
+
href: `tel:${Ia(d.prefixAndNumber)}`,
|
|
216
|
+
intent: "default",
|
|
217
|
+
children: d.prefixAndNumber
|
|
218
|
+
}
|
|
219
|
+
),
|
|
220
|
+
d.smsEnabled ? /* @__PURE__ */ a(w, { variant: "success", size: "sm", children: e("patientSummaryCard.value.smsEnabled", {
|
|
221
|
+
defaultValue: "SMS"
|
|
222
|
+
}) }) : null
|
|
223
|
+
] })
|
|
224
|
+
}), D && i.push({
|
|
225
|
+
key: "cityProvince",
|
|
226
|
+
icon: /* @__PURE__ */ a(Pa, { "aria-hidden": "true" }),
|
|
227
|
+
label: e("patientSummaryCard.label.cityProvince", {
|
|
228
|
+
defaultValue: "City / province"
|
|
229
|
+
}),
|
|
230
|
+
value: D
|
|
231
|
+
}), o && i.push({
|
|
232
|
+
key: "marketingConsent",
|
|
233
|
+
icon: /* @__PURE__ */ a(wa, { "aria-hidden": "true" }),
|
|
234
|
+
label: e("patientSummaryCard.label.marketingConsent", {
|
|
235
|
+
defaultValue: "Marketing consent"
|
|
236
|
+
}),
|
|
237
|
+
value: /* @__PURE__ */ a(
|
|
238
|
+
w,
|
|
239
|
+
{
|
|
240
|
+
variant: o === "yes" ? "success" : o === "no" ? "error" : "neutral",
|
|
241
|
+
size: "sm",
|
|
242
|
+
withDot: !0,
|
|
243
|
+
children: e(`patientSummaryCard.marketingConsent.${o}`, {
|
|
244
|
+
defaultValue: Ka[o]
|
|
245
|
+
})
|
|
246
|
+
}
|
|
247
|
+
)
|
|
248
|
+
}), l && i.push({
|
|
249
|
+
key: "aiConsent",
|
|
250
|
+
icon: /* @__PURE__ */ a($a, { "aria-hidden": "true" }),
|
|
251
|
+
label: e("patientSummaryCard.label.aiConsent", {
|
|
252
|
+
defaultValue: "AI consent"
|
|
253
|
+
}),
|
|
254
|
+
value: l.grantedBy ? e("patientSummaryCard.value.aiConsentGrantedBy", {
|
|
255
|
+
date: l.grantedAt,
|
|
256
|
+
by: l.grantedBy,
|
|
257
|
+
defaultValue: "Granted {{date}} by {{by}}"
|
|
258
|
+
}) : e("patientSummaryCard.value.aiConsentGrantedAt", {
|
|
259
|
+
date: l.grantedAt,
|
|
260
|
+
defaultValue: "Granted {{date}}"
|
|
261
|
+
})
|
|
262
|
+
}), h && i.push({
|
|
263
|
+
key: "assignedTo",
|
|
264
|
+
icon: /* @__PURE__ */ a(Fa, { "aria-hidden": "true" }),
|
|
265
|
+
label: e("patientSummaryCard.label.assignedTo", {
|
|
266
|
+
defaultValue: "Assigned to"
|
|
267
|
+
}),
|
|
268
|
+
value: /* @__PURE__ */ n("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
269
|
+
/* @__PURE__ */ a(
|
|
270
|
+
H,
|
|
271
|
+
{
|
|
272
|
+
size: "xs",
|
|
273
|
+
name: h.name,
|
|
274
|
+
src: h.avatarUrl
|
|
275
|
+
}
|
|
276
|
+
),
|
|
277
|
+
/* @__PURE__ */ a("span", { children: h.name })
|
|
278
|
+
] })
|
|
279
|
+
});
|
|
280
|
+
const x = [];
|
|
281
|
+
g > 0 && x.push({
|
|
282
|
+
key: "highlightedAnamnesis",
|
|
283
|
+
count: g
|
|
284
|
+
}), y > 0 && x.push({
|
|
285
|
+
key: "unsignedDocuments",
|
|
286
|
+
count: y
|
|
287
|
+
});
|
|
288
|
+
const ma = v || x.length > 0, ua = /* @__PURE__ */ n("div", { className: `ds:flex ds:flex-col ${R}`, children: [
|
|
289
|
+
/* @__PURE__ */ n("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-md)]", children: [
|
|
290
|
+
/* @__PURE__ */ a(C, { variant: "circular", size: "lg" }),
|
|
291
|
+
/* @__PURE__ */ n("div", { className: "ds:flex ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
292
|
+
/* @__PURE__ */ a(C, { variant: "text", width: "60%" }),
|
|
293
|
+
/* @__PURE__ */ a(C, { variant: "text", width: "40%" })
|
|
294
|
+
] })
|
|
295
|
+
] }),
|
|
296
|
+
/* @__PURE__ */ a(C, { variant: "text", lines: 3 })
|
|
297
|
+
] }), pa = oa ? /* @__PURE__ */ a(
|
|
298
|
+
S,
|
|
299
|
+
{
|
|
300
|
+
href: k,
|
|
301
|
+
intent: "default",
|
|
302
|
+
weight: "strong",
|
|
303
|
+
onClick: G,
|
|
304
|
+
className: `${j} ds:no-underline`,
|
|
305
|
+
children: /* @__PURE__ */ a("span", { id: M, children: I })
|
|
306
|
+
}
|
|
307
|
+
) : /* @__PURE__ */ a(
|
|
308
|
+
"span",
|
|
309
|
+
{
|
|
310
|
+
id: M,
|
|
311
|
+
className: `${j} ds:text-[color:var(--foreground)]`,
|
|
312
|
+
children: I
|
|
313
|
+
}
|
|
314
|
+
), ha = /* @__PURE__ */ n("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)]", children: [
|
|
315
|
+
/* @__PURE__ */ a(
|
|
316
|
+
H,
|
|
317
|
+
{
|
|
318
|
+
size: ca,
|
|
319
|
+
name: r,
|
|
320
|
+
src: Q,
|
|
321
|
+
className: "ds:shrink-0"
|
|
322
|
+
}
|
|
323
|
+
),
|
|
324
|
+
/* @__PURE__ */ n("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
325
|
+
pa,
|
|
326
|
+
U ? /* @__PURE__ */ a("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: U }) : null
|
|
327
|
+
] }),
|
|
328
|
+
T ? /* @__PURE__ */ a("div", { className: "ds:ms-auto ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)]", children: T }) : null
|
|
329
|
+
] }), fa = ma ? /* @__PURE__ */ n(
|
|
330
|
+
"div",
|
|
331
|
+
{
|
|
332
|
+
role: "list",
|
|
333
|
+
"aria-label": e("patientSummaryCard.flagsLabel", {
|
|
334
|
+
defaultValue: "Patient attention flags"
|
|
335
|
+
}),
|
|
336
|
+
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
337
|
+
children: [
|
|
338
|
+
v ? /* @__PURE__ */ a("span", { role: "listitem", children: /* @__PURE__ */ a(
|
|
339
|
+
ka,
|
|
340
|
+
{
|
|
341
|
+
state: "debt",
|
|
342
|
+
amount: L / 100,
|
|
343
|
+
currency: Y,
|
|
344
|
+
locale: sa,
|
|
345
|
+
size: "sm",
|
|
346
|
+
showLabel: !0
|
|
347
|
+
}
|
|
348
|
+
) }) : null,
|
|
349
|
+
x.map(({ key: t, count: u }) => {
|
|
350
|
+
const P = Ua[t];
|
|
351
|
+
return /* @__PURE__ */ a(
|
|
352
|
+
"span",
|
|
353
|
+
{
|
|
354
|
+
role: "listitem",
|
|
355
|
+
"aria-label": e(`patientSummaryCard.flag.${t}`, {
|
|
356
|
+
count: u,
|
|
357
|
+
defaultValue: Ra[t]
|
|
358
|
+
}),
|
|
359
|
+
className: "ds:inline-flex",
|
|
360
|
+
children: /* @__PURE__ */ a(
|
|
361
|
+
w,
|
|
362
|
+
{
|
|
363
|
+
"aria-hidden": "true",
|
|
364
|
+
variant: ja[t],
|
|
365
|
+
size: "md",
|
|
366
|
+
withDot: !0,
|
|
367
|
+
leading: /* @__PURE__ */ a(P, { "aria-hidden": "true" }),
|
|
368
|
+
children: u
|
|
369
|
+
}
|
|
370
|
+
)
|
|
371
|
+
},
|
|
372
|
+
t
|
|
373
|
+
);
|
|
374
|
+
})
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
) : null, ya = V && V.length > 0 ? /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
378
|
+
/* @__PURE__ */ a("span", { className: "type-label ds:text-[color:var(--muted-foreground)]", children: e("patientSummaryCard.label.familyRelations", {
|
|
379
|
+
defaultValue: "Family relations"
|
|
380
|
+
}) }),
|
|
381
|
+
/* @__PURE__ */ a("div", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: V.map((t, u) => {
|
|
382
|
+
const P = !!t.relatedPatient.url && J(t.relatedPatient.url), q = e("patientSummaryCard.value.familyRelation", {
|
|
383
|
+
relation: t.relation,
|
|
384
|
+
name: t.relatedPatient.name,
|
|
385
|
+
defaultValue: "{{relation}}: {{name}}"
|
|
386
|
+
});
|
|
387
|
+
return P ? /* @__PURE__ */ a(
|
|
388
|
+
S,
|
|
389
|
+
{
|
|
390
|
+
href: t.relatedPatient.url,
|
|
391
|
+
intent: "default",
|
|
392
|
+
className: "ds:no-underline",
|
|
393
|
+
children: /* @__PURE__ */ a(W, { label: q, variant: "neutral" })
|
|
394
|
+
},
|
|
395
|
+
`${t.relation}-${u}`
|
|
396
|
+
) : /* @__PURE__ */ a(
|
|
397
|
+
W,
|
|
398
|
+
{
|
|
399
|
+
label: q,
|
|
400
|
+
variant: "neutral"
|
|
401
|
+
},
|
|
402
|
+
`${t.relation}-${u}`
|
|
403
|
+
);
|
|
404
|
+
}) })
|
|
405
|
+
] }) : null, ga = /* @__PURE__ */ n("div", { className: `ds:flex ds:flex-col ${R}`, children: [
|
|
406
|
+
ha,
|
|
407
|
+
fa,
|
|
408
|
+
i.length > 0 ? /* @__PURE__ */ a(Na, { rowGap: "sm", children: i.map((t) => /* @__PURE__ */ a(
|
|
409
|
+
Aa,
|
|
410
|
+
{
|
|
411
|
+
icon: t.icon,
|
|
412
|
+
label: t.label,
|
|
413
|
+
value: t.value
|
|
414
|
+
},
|
|
415
|
+
t.key
|
|
416
|
+
)) }) : null,
|
|
417
|
+
ya
|
|
418
|
+
] }), K = f ? ua : ga;
|
|
419
|
+
return /* @__PURE__ */ a(
|
|
420
|
+
"div",
|
|
421
|
+
{
|
|
422
|
+
ref: ta,
|
|
423
|
+
role: "region",
|
|
424
|
+
"aria-label": f || z ? ra : void 0,
|
|
425
|
+
"aria-labelledby": f ? void 0 : M,
|
|
426
|
+
"aria-busy": f || void 0,
|
|
427
|
+
"data-component": "patient-summary-card",
|
|
428
|
+
"data-component-id": m,
|
|
429
|
+
"data-density": c,
|
|
430
|
+
id: m,
|
|
431
|
+
className: Ba({ surface: F, density: c, className: aa }),
|
|
432
|
+
...ea,
|
|
433
|
+
children: F === "elevated" ? /* @__PURE__ */ a(O, { variant: "elevated", children: /* @__PURE__ */ a(O.Body, { children: K }) }) : K
|
|
434
|
+
}
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
);
|
|
438
|
+
qa.displayName = "PatientSummaryCard";
|
|
439
|
+
export {
|
|
440
|
+
qa as P,
|
|
441
|
+
za as p
|
|
442
|
+
};
|
|
443
|
+
//# sourceMappingURL=patient-summary-card-BnTqxcTr.js.map
|