@alfadocs/ui-kit 0.47.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-CVIPrdc9.js → alia-sidebar-DlvyXgVC.js} +3 -2
- package/dist/_chunks/anamnesis-card-CmkBVAln.js +156 -0
- package/dist/_chunks/appointment-tray-BwDHhWWC.js +419 -0
- 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-message-B5JpFj0F.js → chat-message-Dm8U2RY1.js} +36 -35
- package/dist/_chunks/clinical-note-card-BYo437dU.js +333 -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/{due-date-calculator-mFxpHLml.js → due-date-calculator-BXd3ANj7.js} +2 -2
- 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/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/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/{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-Djn1QMJc.js → workflow-map-ZXw-zsZ8.js} +138 -156
- package/dist/agent-catalog.json +324 -1
- 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/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-message/chat-message.d.ts +7 -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/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/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 +351 -0
- package/dist/i18n/locales/ar.js +351 -0
- package/dist/i18n/locales/de.d.ts +351 -0
- package/dist/i18n/locales/de.js +351 -0
- package/dist/i18n/locales/el.d.ts +351 -0
- package/dist/i18n/locales/el.js +351 -0
- package/dist/i18n/locales/en.d.ts +351 -0
- package/dist/i18n/locales/en.js +351 -0
- package/dist/i18n/locales/es.d.ts +351 -0
- package/dist/i18n/locales/es.js +351 -0
- package/dist/i18n/locales/fr.d.ts +351 -0
- package/dist/i18n/locales/fr.js +351 -0
- package/dist/i18n/locales/hi.d.ts +351 -0
- package/dist/i18n/locales/hi.js +351 -0
- package/dist/i18n/locales/it.d.ts +351 -0
- package/dist/i18n/locales/it.js +351 -0
- package/dist/i18n/locales/ja.d.ts +351 -0
- package/dist/i18n/locales/ja.js +351 -0
- package/dist/i18n/locales/nl.d.ts +351 -0
- package/dist/i18n/locales/nl.js +351 -0
- package/dist/i18n/locales/pl.d.ts +351 -0
- package/dist/i18n/locales/pl.js +351 -0
- package/dist/i18n/locales/pt.d.ts +351 -0
- package/dist/i18n/locales/pt.js +351 -0
- package/dist/i18n/locales/ro.d.ts +351 -0
- package/dist/i18n/locales/ro.js +351 -0
- package/dist/i18n/locales/ru.d.ts +351 -0
- package/dist/i18n/locales/ru.js +351 -0
- package/dist/i18n/locales/sq.d.ts +351 -0
- package/dist/i18n/locales/sq.js +351 -0
- package/dist/i18n/locales/sv.d.ts +351 -0
- package/dist/i18n/locales/sv.js +351 -0
- package/dist/i18n/locales/tr.d.ts +351 -0
- package/dist/i18n/locales/tr.js +351 -0
- package/dist/i18n/locales/zh.d.ts +351 -0
- package/dist/i18n/locales/zh.js +351 -0
- package/dist/index.js +527 -491
- package/dist/locales/ar.json +351 -0
- package/dist/locales/de.json +351 -0
- package/dist/locales/el.json +351 -0
- package/dist/locales/en.json +351 -0
- package/dist/locales/es.json +351 -0
- package/dist/locales/fr.json +351 -0
- package/dist/locales/hi.json +351 -0
- package/dist/locales/it.json +351 -0
- package/dist/locales/ja.json +351 -0
- package/dist/locales/nl.json +351 -0
- package/dist/locales/pl.json +351 -0
- package/dist/locales/pt.json +351 -0
- package/dist/locales/ro.json +351 -0
- package/dist/locales/ru.json +351 -0
- package/dist/locales/sq.json +351 -0
- package/dist/locales/sv.json +351 -0
- package/dist/locales/tr.json +351 -0
- package/dist/locales/zh.json +351 -0
- package/dist/patterns/alia-assistant/alia-types.d.ts +15 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +42 -1
- package/dist/_chunks/operator-hero-7LiiP7zi.js +0 -171
- package/dist/_chunks/shield-check-C73ma9Cs.js +0 -36
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as H, useId as P } from "react";
|
|
3
|
+
import { useTranslation as M } from "react-i18next";
|
|
4
|
+
import { B as N } from "./badge-zsf5i5bH.js";
|
|
5
|
+
import { L as F } from "./link-DrD_cRUg.js";
|
|
6
|
+
import { P as A } from "./progress-kzIRcdaq.js";
|
|
7
|
+
import { T as C } from "./timestamp-BV2lC-wV.js";
|
|
8
|
+
import { T as L } from "./transaction-chip-BZCa6XDn.js";
|
|
9
|
+
import { A as O, b as G, c as Y, a as $ } from "./accordion-9lJSMMsZ.js";
|
|
10
|
+
import { C as q } from "./care-plan-entry-card-Cnra7vUc.js";
|
|
11
|
+
import { u as J } from "./registry-nPAVE19X.js";
|
|
12
|
+
import { C as Q, e as W } from "./entity-card-COhmqHly.js";
|
|
13
|
+
import { i as X } from "./is-safe-url-DkETxeHz.js";
|
|
14
|
+
const Z = {
|
|
15
|
+
id: "care-plan-card",
|
|
16
|
+
capabilities: ["view_change", "expand"],
|
|
17
|
+
state: {
|
|
18
|
+
state: {
|
|
19
|
+
type: "'estimate' | 'accepted' | 'discarded' | 'closed'",
|
|
20
|
+
descriptionKey: "ui.agent.carePlanCard.state.state",
|
|
21
|
+
description: "The plan lifecycle state. Enum value only — never the localised label or any PHI.",
|
|
22
|
+
read: (l) => l.getState()
|
|
23
|
+
},
|
|
24
|
+
progress: {
|
|
25
|
+
type: "{ done: number; total: number }",
|
|
26
|
+
descriptionKey: "ui.agent.carePlanCard.state.progress",
|
|
27
|
+
description: "Line progress as done / total counts. Counts only — never treatment names or operator identity.",
|
|
28
|
+
read: (l) => l.getProgress()
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
actions: {},
|
|
32
|
+
domHooks: {
|
|
33
|
+
root: {
|
|
34
|
+
attr: "data-component",
|
|
35
|
+
value: "care-plan-card",
|
|
36
|
+
description: "Marks the CarePlanCard root region."
|
|
37
|
+
},
|
|
38
|
+
instanceId: {
|
|
39
|
+
attr: "data-component-id",
|
|
40
|
+
sourceProp: "id",
|
|
41
|
+
description: "Sourced from the id prop. Addresses a specific plan."
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}, ee = "EUR", ae = {
|
|
45
|
+
estimate: "Estimate",
|
|
46
|
+
accepted: "Accepted",
|
|
47
|
+
discarded: "Discarded",
|
|
48
|
+
closed: "Closed"
|
|
49
|
+
}, de = H(
|
|
50
|
+
({
|
|
51
|
+
id: l,
|
|
52
|
+
number: E,
|
|
53
|
+
name: T,
|
|
54
|
+
state: o,
|
|
55
|
+
url: u,
|
|
56
|
+
amounts: s,
|
|
57
|
+
progress: a,
|
|
58
|
+
dates: r,
|
|
59
|
+
discardReason: v,
|
|
60
|
+
dentitionMode: te,
|
|
61
|
+
entries: m,
|
|
62
|
+
locale: w,
|
|
63
|
+
currency: f = ee,
|
|
64
|
+
surface: I = "elevated",
|
|
65
|
+
onActivate: g,
|
|
66
|
+
"aria-label": b,
|
|
67
|
+
className: D,
|
|
68
|
+
...S
|
|
69
|
+
}, V) => {
|
|
70
|
+
const { t: d, i18n: _ } = M(), x = P(), B = P(), c = w ?? _.language ?? "en";
|
|
71
|
+
J(
|
|
72
|
+
Z,
|
|
73
|
+
{
|
|
74
|
+
getState: () => o,
|
|
75
|
+
getProgress: () => ({
|
|
76
|
+
done: (a == null ? void 0 : a.done) ?? 0,
|
|
77
|
+
total: (a == null ? void 0 : a.total) ?? 0
|
|
78
|
+
})
|
|
79
|
+
},
|
|
80
|
+
l
|
|
81
|
+
);
|
|
82
|
+
const K = d(`carePlanCard.state.${o}`, {
|
|
83
|
+
defaultValue: ae[o]
|
|
84
|
+
}), 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(
|
|
85
|
+
"h3",
|
|
86
|
+
{
|
|
87
|
+
id: x,
|
|
88
|
+
className: "type-title-card ds:m-0 ds:text-[color:var(--foreground)]",
|
|
89
|
+
children: T ?? d("carePlanCard.untitled", "Untitled plan")
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
return /* @__PURE__ */ e(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
ref: V,
|
|
96
|
+
role: "region",
|
|
97
|
+
"aria-label": b,
|
|
98
|
+
"aria-labelledby": b ? void 0 : x,
|
|
99
|
+
"data-component": "care-plan-card",
|
|
100
|
+
"data-component-id": l,
|
|
101
|
+
"data-state": o,
|
|
102
|
+
id: l,
|
|
103
|
+
className: W({ surface: I, className: D }),
|
|
104
|
+
...S,
|
|
105
|
+
children: /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
106
|
+
/* @__PURE__ */ t("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)]", children: [
|
|
107
|
+
/* @__PURE__ */ t("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
108
|
+
/* @__PURE__ */ e("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)] ds:tabular-nums", children: d("carePlanCard.number", {
|
|
109
|
+
number: E,
|
|
110
|
+
defaultValue: "Plan #{{number}}"
|
|
111
|
+
}) }),
|
|
112
|
+
U ? /* @__PURE__ */ e(
|
|
113
|
+
F,
|
|
114
|
+
{
|
|
115
|
+
href: u,
|
|
116
|
+
weight: "strong",
|
|
117
|
+
onClick: (n) => {
|
|
118
|
+
n.defaultPrevented || n.metaKey || n.ctrlKey || n.shiftKey || g == null || g();
|
|
119
|
+
},
|
|
120
|
+
children: y
|
|
121
|
+
}
|
|
122
|
+
) : y
|
|
123
|
+
] }),
|
|
124
|
+
/* @__PURE__ */ e(
|
|
125
|
+
N,
|
|
126
|
+
{
|
|
127
|
+
variant: R,
|
|
128
|
+
size: "sm",
|
|
129
|
+
withDot: !0,
|
|
130
|
+
className: "ds:shrink-0",
|
|
131
|
+
children: K
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
] }),
|
|
135
|
+
o === "discarded" && v ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: [
|
|
136
|
+
/* @__PURE__ */ e("span", { className: "ds:font-medium ds:text-[color:var(--foreground)]", children: d("carePlanCard.discardReasonLabel", "Discard reason:") }),
|
|
137
|
+
" ",
|
|
138
|
+
v
|
|
139
|
+
] }) : null,
|
|
140
|
+
r ? /* @__PURE__ */ t("div", { className: "type-body-sm ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-md)] ds:text-[color:var(--muted-foreground)]", children: [
|
|
141
|
+
r.acceptedIso ? /* @__PURE__ */ t("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
142
|
+
/* @__PURE__ */ e("span", { children: d("carePlanCard.date.accepted", "Accepted") }),
|
|
143
|
+
/* @__PURE__ */ e(
|
|
144
|
+
C,
|
|
145
|
+
{
|
|
146
|
+
value: r.acceptedIso,
|
|
147
|
+
format: "absolute",
|
|
148
|
+
locale: c
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
] }) : null,
|
|
152
|
+
r.closedIso ? /* @__PURE__ */ t("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
153
|
+
/* @__PURE__ */ e("span", { children: d("carePlanCard.date.closed", "Closed") }),
|
|
154
|
+
/* @__PURE__ */ e(
|
|
155
|
+
C,
|
|
156
|
+
{
|
|
157
|
+
value: r.closedIso,
|
|
158
|
+
format: "absolute",
|
|
159
|
+
locale: c
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
] }) : null,
|
|
163
|
+
r.discardedIso ? /* @__PURE__ */ t("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
164
|
+
/* @__PURE__ */ e("span", { children: d("carePlanCard.date.discarded", "Discarded") }),
|
|
165
|
+
/* @__PURE__ */ e(
|
|
166
|
+
C,
|
|
167
|
+
{
|
|
168
|
+
value: r.discardedIso,
|
|
169
|
+
format: "absolute",
|
|
170
|
+
locale: c
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
] }) : null
|
|
174
|
+
] }) : null,
|
|
175
|
+
typeof i == "number" || typeof p == "number" ? /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
176
|
+
typeof i == "number" && i > 0 ? /* @__PURE__ */ t("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
177
|
+
/* @__PURE__ */ e(
|
|
178
|
+
L,
|
|
179
|
+
{
|
|
180
|
+
state: "debt",
|
|
181
|
+
amount: i / 100,
|
|
182
|
+
currency: f,
|
|
183
|
+
locale: c,
|
|
184
|
+
showLabel: !0,
|
|
185
|
+
size: "md"
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
z ? /* @__PURE__ */ e(N, { variant: "error", size: "sm", withDot: !0, children: d("carePlanCard.overdue", {
|
|
189
|
+
count: h,
|
|
190
|
+
defaultValue: "Overdue {{count}}d"
|
|
191
|
+
}) }) : null
|
|
192
|
+
] }) : null,
|
|
193
|
+
typeof p == "number" && p > 0 ? /* @__PURE__ */ e(
|
|
194
|
+
L,
|
|
195
|
+
{
|
|
196
|
+
state: "settled",
|
|
197
|
+
amount: p / 100,
|
|
198
|
+
currency: f,
|
|
199
|
+
locale: c,
|
|
200
|
+
showLabel: !0,
|
|
201
|
+
size: "md"
|
|
202
|
+
}
|
|
203
|
+
) : null
|
|
204
|
+
] }) : null,
|
|
205
|
+
a && a.total > 0 ? /* @__PURE__ */ e(
|
|
206
|
+
A,
|
|
207
|
+
{
|
|
208
|
+
value: a.done,
|
|
209
|
+
max: a.total,
|
|
210
|
+
size: "sm",
|
|
211
|
+
"aria-label": d("carePlanCard.progressLabel", {
|
|
212
|
+
done: a.done,
|
|
213
|
+
total: a.total,
|
|
214
|
+
defaultValue: "Progress: {{done}} of {{total}} completed"
|
|
215
|
+
}),
|
|
216
|
+
children: /* @__PURE__ */ t("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
217
|
+
/* @__PURE__ */ e(A.Label, { id: B, children: d("carePlanCard.progressHeading", "Progress") }),
|
|
218
|
+
/* @__PURE__ */ e("span", { className: "type-body-sm ds:tabular-nums ds:text-[color:var(--muted-foreground)]", children: d("carePlanCard.progressCount", {
|
|
219
|
+
done: a.done,
|
|
220
|
+
total: a.total,
|
|
221
|
+
defaultValue: "{{done}} / {{total}}"
|
|
222
|
+
}) })
|
|
223
|
+
] })
|
|
224
|
+
}
|
|
225
|
+
) : null,
|
|
226
|
+
k ? /* @__PURE__ */ e(O, { type: "single", collapsible: !0, variant: "separated", children: /* @__PURE__ */ t(G, { value: "entries", children: [
|
|
227
|
+
/* @__PURE__ */ e(Y, { children: d("carePlanCard.entries.toggle", {
|
|
228
|
+
count: m.length,
|
|
229
|
+
defaultValue: "Treatment lines ({{count}})"
|
|
230
|
+
}) }),
|
|
231
|
+
/* @__PURE__ */ e($, { children: /* @__PURE__ */ e("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: m.map(({ entryId: n, ...j }) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
232
|
+
q,
|
|
233
|
+
{
|
|
234
|
+
id: n,
|
|
235
|
+
surface: "flat",
|
|
236
|
+
locale: c,
|
|
237
|
+
currency: f,
|
|
238
|
+
...j
|
|
239
|
+
}
|
|
240
|
+
) }, n)) }) })
|
|
241
|
+
] }) }) : null
|
|
242
|
+
] })
|
|
243
|
+
}
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
de.displayName = "CarePlanCard";
|
|
248
|
+
export {
|
|
249
|
+
de as C,
|
|
250
|
+
Z as c
|
|
251
|
+
};
|
|
252
|
+
//# sourceMappingURL=care-plan-card-QmNpGggC.js.map
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Y, useId as v } from "react";
|
|
3
|
+
import { useTranslation as R } from "react-i18next";
|
|
4
|
+
import { B as c } from "./badge-zsf5i5bH.js";
|
|
5
|
+
import { P as O } from "./progress-kzIRcdaq.js";
|
|
6
|
+
import { T as q } from "./tag-CdA0s_VV.js";
|
|
7
|
+
import { T as b } from "./timestamp-BV2lC-wV.js";
|
|
8
|
+
import { T as G } from "./transaction-chip-BZCa6XDn.js";
|
|
9
|
+
import { f as J } from "./tooth-scheme-CxlsLjfN.js";
|
|
10
|
+
import { C as Q, b as X, a as Z } from "./collapsible-X3oaLPU3.js";
|
|
11
|
+
import { u as ee } from "./registry-nPAVE19X.js";
|
|
12
|
+
import { C as ae } from "./chevron-down-BX_NP2Yh.js";
|
|
13
|
+
import { e as te } from "./entity-card-COhmqHly.js";
|
|
14
|
+
const re = {
|
|
15
|
+
id: "care-plan-entry-card",
|
|
16
|
+
capabilities: ["view_change"],
|
|
17
|
+
state: {
|
|
18
|
+
done: {
|
|
19
|
+
type: "boolean",
|
|
20
|
+
descriptionKey: "ui.agent.carePlanEntryCard.state.done",
|
|
21
|
+
description: "Whether the treatment line is marked executed.",
|
|
22
|
+
read: (t) => t.isDone()
|
|
23
|
+
},
|
|
24
|
+
phaseProgress: {
|
|
25
|
+
type: "{ executed: number; total: number }",
|
|
26
|
+
descriptionKey: "ui.agent.carePlanEntryCard.state.phaseProgress",
|
|
27
|
+
description: "Phase progress as executed / total counts. Counts only — never phase labels or operator identity.",
|
|
28
|
+
read: (t) => t.getPhaseProgress()
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
actions: {},
|
|
32
|
+
domHooks: {
|
|
33
|
+
root: {
|
|
34
|
+
attr: "data-component",
|
|
35
|
+
value: "care-plan-entry-card",
|
|
36
|
+
description: "Marks the CarePlanEntryCard root region."
|
|
37
|
+
},
|
|
38
|
+
instanceId: {
|
|
39
|
+
attr: "data-component-id",
|
|
40
|
+
sourceProp: "id",
|
|
41
|
+
description: "Sourced from the id prop. Addresses a specific line."
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}, se = "EUR";
|
|
45
|
+
function ne(t) {
|
|
46
|
+
const o = {};
|
|
47
|
+
for (const l of t)
|
|
48
|
+
o[l] = ["filled"];
|
|
49
|
+
return o;
|
|
50
|
+
}
|
|
51
|
+
const le = Y(
|
|
52
|
+
({
|
|
53
|
+
id: t,
|
|
54
|
+
careName: o,
|
|
55
|
+
code: l,
|
|
56
|
+
label: h,
|
|
57
|
+
elements: u,
|
|
58
|
+
done: g = !1,
|
|
59
|
+
executionDateIso: C,
|
|
60
|
+
plannedAppointment: P,
|
|
61
|
+
operator: i,
|
|
62
|
+
price: n,
|
|
63
|
+
phases: a,
|
|
64
|
+
billed: E = !1,
|
|
65
|
+
outsideOfEstimate: k = !1,
|
|
66
|
+
notesCount: p,
|
|
67
|
+
toothDisplay: S = "chips",
|
|
68
|
+
locale: j,
|
|
69
|
+
currency: N = se,
|
|
70
|
+
surface: A = "elevated",
|
|
71
|
+
"aria-label": w,
|
|
72
|
+
className: U,
|
|
73
|
+
...B
|
|
74
|
+
}, F) => {
|
|
75
|
+
var L;
|
|
76
|
+
const { t: r, i18n: H } = R(), D = v(), K = v(), T = v(), V = v(), m = j ?? H.language ?? "en";
|
|
77
|
+
ee(
|
|
78
|
+
re,
|
|
79
|
+
{
|
|
80
|
+
isDone: () => g,
|
|
81
|
+
getPhaseProgress: () => ({
|
|
82
|
+
executed: (a == null ? void 0 : a.executed) ?? 0,
|
|
83
|
+
total: (a == null ? void 0 : a.total) ?? 0
|
|
84
|
+
})
|
|
85
|
+
},
|
|
86
|
+
t
|
|
87
|
+
);
|
|
88
|
+
const M = !!u && u.length > 0, z = !!(a != null && a.detail) && a.detail.length > 0, _ = E ? "settled" : "to-invoice", f = n == null ? void 0 : n.priceCents, x = n == null ? void 0 : n.discountedPriceCents, I = x !== void 0 && f !== void 0 && x < f, y = x ?? f, $ = (d) => new Intl.NumberFormat(m, {
|
|
89
|
+
style: "currency",
|
|
90
|
+
currency: N
|
|
91
|
+
}).format(d / 100);
|
|
92
|
+
return /* @__PURE__ */ e(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
ref: F,
|
|
96
|
+
role: "region",
|
|
97
|
+
"aria-label": w,
|
|
98
|
+
"aria-labelledby": w ? void 0 : D,
|
|
99
|
+
"data-component": "care-plan-entry-card",
|
|
100
|
+
"data-component-id": t,
|
|
101
|
+
"data-done": g ? "true" : "false",
|
|
102
|
+
id: t,
|
|
103
|
+
className: te({ surface: A, className: U }),
|
|
104
|
+
...B,
|
|
105
|
+
children: /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
106
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)]", children: [
|
|
107
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
108
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-wrap ds:items-baseline ds:gap-[var(--spacing-xs)]", children: [
|
|
109
|
+
/* @__PURE__ */ e(
|
|
110
|
+
"h3",
|
|
111
|
+
{
|
|
112
|
+
id: D,
|
|
113
|
+
className: "type-title-item ds:m-0 ds:text-[color:var(--foreground)]",
|
|
114
|
+
children: o
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
l ? /* @__PURE__ */ e("span", { className: "type-meta ds:text-[color:var(--muted-foreground)] ds:tabular-nums", children: l }) : null
|
|
118
|
+
] }),
|
|
119
|
+
h ? /* @__PURE__ */ e("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: h }) : null
|
|
120
|
+
] }),
|
|
121
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:shrink-0 ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-2xs)]", children: [
|
|
122
|
+
g ? /* @__PURE__ */ e(c, { variant: "success", size: "sm", withDot: !0, children: r("carePlanEntryCard.flag.done", "Done") }) : null,
|
|
123
|
+
k ? /* @__PURE__ */ e(c, { variant: "warning", size: "sm", withDot: !0, children: r(
|
|
124
|
+
"carePlanEntryCard.flag.outsideOfEstimate",
|
|
125
|
+
"Outside estimate"
|
|
126
|
+
) }) : null,
|
|
127
|
+
E ? /* @__PURE__ */ e(c, { variant: "neutral", size: "sm", children: r("carePlanEntryCard.flag.billed", "Billed") }) : null,
|
|
128
|
+
typeof p == "number" && p > 0 ? /* @__PURE__ */ e(
|
|
129
|
+
c,
|
|
130
|
+
{
|
|
131
|
+
variant: "neutral",
|
|
132
|
+
size: "sm",
|
|
133
|
+
"aria-label": r("carePlanEntryCard.notesLabel", {
|
|
134
|
+
count: p,
|
|
135
|
+
defaultValue: "{{count}} notes"
|
|
136
|
+
}),
|
|
137
|
+
children: p
|
|
138
|
+
}
|
|
139
|
+
) : null
|
|
140
|
+
] })
|
|
141
|
+
] }),
|
|
142
|
+
M ? S === "scheme" ? /* @__PURE__ */ e(
|
|
143
|
+
J,
|
|
144
|
+
{
|
|
145
|
+
mode: "display",
|
|
146
|
+
conditions: ne(u),
|
|
147
|
+
ariaLabel: r("carePlanEntryCard.toothSchemeLabel", {
|
|
148
|
+
count: u.length,
|
|
149
|
+
defaultValue: "Teeth involved: {{count}}"
|
|
150
|
+
})
|
|
151
|
+
}
|
|
152
|
+
) : /* @__PURE__ */ e(
|
|
153
|
+
"div",
|
|
154
|
+
{
|
|
155
|
+
role: "list",
|
|
156
|
+
"aria-label": r(
|
|
157
|
+
"carePlanEntryCard.elementsLabel",
|
|
158
|
+
"Teeth involved"
|
|
159
|
+
),
|
|
160
|
+
className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]",
|
|
161
|
+
children: u.map((d) => /* @__PURE__ */ e("div", { role: "listitem", children: /* @__PURE__ */ e(q, { label: d, variant: "info", size: "sm" }) }, d))
|
|
162
|
+
}
|
|
163
|
+
) : null,
|
|
164
|
+
g && C ? /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0 ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
|
|
165
|
+
/* @__PURE__ */ e("span", { children: r("carePlanEntryCard.executedOn", "Executed on") }),
|
|
166
|
+
/* @__PURE__ */ e(
|
|
167
|
+
b,
|
|
168
|
+
{
|
|
169
|
+
value: C,
|
|
170
|
+
format: "absolute",
|
|
171
|
+
locale: m
|
|
172
|
+
}
|
|
173
|
+
),
|
|
174
|
+
i ? /* @__PURE__ */ e("span", { children: r("carePlanEntryCard.byOperator", {
|
|
175
|
+
operator: i.name,
|
|
176
|
+
defaultValue: "by {{operator}}"
|
|
177
|
+
}) }) : null
|
|
178
|
+
] }) : P ? /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0 ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
|
|
179
|
+
/* @__PURE__ */ e("span", { children: r("carePlanEntryCard.plannedFor", "Planned for") }),
|
|
180
|
+
/* @__PURE__ */ e(
|
|
181
|
+
b,
|
|
182
|
+
{
|
|
183
|
+
value: P.dateIso,
|
|
184
|
+
format: "absolute",
|
|
185
|
+
locale: m
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
i ? /* @__PURE__ */ e("span", { children: r("carePlanEntryCard.byOperator", {
|
|
189
|
+
operator: i.name,
|
|
190
|
+
defaultValue: "by {{operator}}"
|
|
191
|
+
}) }) : null
|
|
192
|
+
] }) : i ? /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: r("carePlanEntryCard.assignedTo", {
|
|
193
|
+
operator: i.name,
|
|
194
|
+
defaultValue: "Assigned to {{operator}}"
|
|
195
|
+
}) }) : null,
|
|
196
|
+
a && a.total > 0 ? /* @__PURE__ */ e(
|
|
197
|
+
O,
|
|
198
|
+
{
|
|
199
|
+
value: a.executed,
|
|
200
|
+
max: a.total,
|
|
201
|
+
size: "sm",
|
|
202
|
+
"aria-label": r("carePlanEntryCard.phasesLabel", {
|
|
203
|
+
executed: a.executed,
|
|
204
|
+
total: a.total,
|
|
205
|
+
defaultValue: "Phases: {{executed}} of {{total}} executed"
|
|
206
|
+
}),
|
|
207
|
+
children: /* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
208
|
+
/* @__PURE__ */ e(O.Label, { id: K, children: r("carePlanEntryCard.phasesHeading", "Phases") }),
|
|
209
|
+
/* @__PURE__ */ e("span", { className: "type-body-sm ds:tabular-nums ds:text-[color:var(--muted-foreground)]", children: r("carePlanEntryCard.phasesCount", {
|
|
210
|
+
executed: a.executed,
|
|
211
|
+
total: a.total,
|
|
212
|
+
defaultValue: "{{executed}} / {{total}}"
|
|
213
|
+
}) })
|
|
214
|
+
] })
|
|
215
|
+
}
|
|
216
|
+
) : null,
|
|
217
|
+
y !== void 0 || z ? /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
218
|
+
y !== void 0 ? /* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
219
|
+
/* @__PURE__ */ e(
|
|
220
|
+
G,
|
|
221
|
+
{
|
|
222
|
+
state: _,
|
|
223
|
+
amount: y / 100,
|
|
224
|
+
currency: N,
|
|
225
|
+
locale: m,
|
|
226
|
+
size: "md"
|
|
227
|
+
}
|
|
228
|
+
),
|
|
229
|
+
I && f !== void 0 ? /* @__PURE__ */ e("span", { className: "type-meta ds:text-[color:var(--muted-foreground)] ds:line-through ds:tabular-nums", children: $(f) }) : null,
|
|
230
|
+
I && (n == null ? void 0 : n.discountPercentage) !== void 0 ? /* @__PURE__ */ e(c, { variant: "success", size: "sm", children: r("carePlanEntryCard.discountLabel", {
|
|
231
|
+
percentage: n.discountPercentage,
|
|
232
|
+
defaultValue: "-{{percentage}}%"
|
|
233
|
+
}) }) : null
|
|
234
|
+
] }) : null,
|
|
235
|
+
z ? /* @__PURE__ */ s(
|
|
236
|
+
Q,
|
|
237
|
+
{
|
|
238
|
+
variant: "default",
|
|
239
|
+
className: "ds:ms-auto ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
240
|
+
children: [
|
|
241
|
+
/* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ s(
|
|
242
|
+
"button",
|
|
243
|
+
{
|
|
244
|
+
type: "button",
|
|
245
|
+
id: T,
|
|
246
|
+
"aria-controls": V,
|
|
247
|
+
className: "ds:group ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:rounded-[var(--radius-sm)] ds:border-0 ds:bg-transparent type-body-sm ds:text-[color:var(--foreground)] ds:cursor-pointer ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
248
|
+
children: [
|
|
249
|
+
/* @__PURE__ */ e("span", { children: r(
|
|
250
|
+
"carePlanEntryCard.phaseDetail.toggle",
|
|
251
|
+
"Phase detail"
|
|
252
|
+
) }),
|
|
253
|
+
/* @__PURE__ */ e(
|
|
254
|
+
ae,
|
|
255
|
+
{
|
|
256
|
+
"aria-hidden": "true",
|
|
257
|
+
className: "ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:group-data-[state=open]:rotate-180"
|
|
258
|
+
}
|
|
259
|
+
)
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
) }),
|
|
263
|
+
/* @__PURE__ */ e(
|
|
264
|
+
Z,
|
|
265
|
+
{
|
|
266
|
+
id: V,
|
|
267
|
+
"aria-labelledby": T,
|
|
268
|
+
children: /* @__PURE__ */ e("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-xs)] ds:p-0", children: (L = a == null ? void 0 : a.detail) == null ? void 0 : L.map((d, W) => /* @__PURE__ */ e(
|
|
269
|
+
de,
|
|
270
|
+
{
|
|
271
|
+
phase: d,
|
|
272
|
+
locale: m
|
|
273
|
+
},
|
|
274
|
+
`${d.label}-${W}`
|
|
275
|
+
)) })
|
|
276
|
+
}
|
|
277
|
+
)
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
) : null
|
|
281
|
+
] }) : null
|
|
282
|
+
] })
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
);
|
|
287
|
+
le.displayName = "CarePlanEntryCard";
|
|
288
|
+
function de({
|
|
289
|
+
phase: t,
|
|
290
|
+
locale: o
|
|
291
|
+
}) {
|
|
292
|
+
const { t: l } = R();
|
|
293
|
+
return /* @__PURE__ */ s("li", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
294
|
+
/* @__PURE__ */ e(c, { variant: t.executed ? "success" : "neutral", size: "sm", withDot: !0, children: t.executed ? l("carePlanEntryCard.phaseDetail.executed", "Executed") : l("carePlanEntryCard.phaseDetail.pending", "Pending") }),
|
|
295
|
+
/* @__PURE__ */ e("span", { className: "type-body-sm ds:text-[color:var(--foreground)]", children: t.label }),
|
|
296
|
+
t.executed && t.executionDateIso ? /* @__PURE__ */ e(
|
|
297
|
+
b,
|
|
298
|
+
{
|
|
299
|
+
value: t.executionDateIso,
|
|
300
|
+
format: "absolute",
|
|
301
|
+
locale: o
|
|
302
|
+
}
|
|
303
|
+
) : null,
|
|
304
|
+
t.operator ? /* @__PURE__ */ e("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: l("carePlanEntryCard.byOperator", {
|
|
305
|
+
operator: t.operator,
|
|
306
|
+
defaultValue: "by {{operator}}"
|
|
307
|
+
}) }) : null,
|
|
308
|
+
t.udi ? /* @__PURE__ */ e("span", { className: "type-meta ds:text-[color:var(--muted-foreground)] ds:tabular-nums", children: l("carePlanEntryCard.phaseDetail.udi", {
|
|
309
|
+
udi: t.udi,
|
|
310
|
+
defaultValue: "UDI {{udi}}"
|
|
311
|
+
}) }) : null
|
|
312
|
+
] });
|
|
313
|
+
}
|
|
314
|
+
export {
|
|
315
|
+
le as C,
|
|
316
|
+
re as c
|
|
317
|
+
};
|
|
318
|
+
//# sourceMappingURL=care-plan-entry-card-Cnra7vUc.js.map
|