@alfadocs/ui-kit 1.4.8 → 1.4.10
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/anamnesis-summary-card-CpQViN5l.js +392 -0
- package/dist/_chunks/{anamnesis-summary-rows-Co3BA0ro.js → anamnesis-summary-rows-BWjPUp0m.js} +695 -693
- package/dist/_chunks/{booking-BHziT711.js → booking-DuSkvE5x.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-DIKlJhEq.js → link-cell-renderer-C8npOgmM.js} +2 -2
- package/dist/_chunks/{multi-select-CC52Qws6.js → multi-select-DqL4o0qV.js} +2 -1
- package/dist/_chunks/{patient-table-DQKcWowi.js → patient-table-zifAcsjV.js} +2 -2
- package/dist/agent-catalog.json +1 -1
- package/dist/components/anamnesis-summary-card/anamnesis-summary-card.d.ts +12 -0
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +1 -0
- package/dist/i18n/locales/ar.js +1 -0
- package/dist/i18n/locales/de.d.ts +1 -0
- package/dist/i18n/locales/de.js +1 -0
- package/dist/i18n/locales/el.d.ts +1 -0
- package/dist/i18n/locales/el.js +1 -0
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/es.d.ts +1 -0
- package/dist/i18n/locales/es.js +1 -0
- package/dist/i18n/locales/fr.d.ts +1 -0
- package/dist/i18n/locales/fr.js +1 -0
- package/dist/i18n/locales/hi.d.ts +1 -0
- package/dist/i18n/locales/hi.js +1 -0
- package/dist/i18n/locales/it.d.ts +1 -0
- package/dist/i18n/locales/it.js +1 -0
- package/dist/i18n/locales/ja.d.ts +1 -0
- package/dist/i18n/locales/ja.js +1 -0
- package/dist/i18n/locales/nl.d.ts +1 -0
- package/dist/i18n/locales/nl.js +1 -0
- package/dist/i18n/locales/pl.d.ts +1 -0
- package/dist/i18n/locales/pl.js +1 -0
- package/dist/i18n/locales/pt.d.ts +1 -0
- package/dist/i18n/locales/pt.js +1 -0
- package/dist/i18n/locales/ro.d.ts +1 -0
- package/dist/i18n/locales/ro.js +1 -0
- package/dist/i18n/locales/ru.d.ts +1 -0
- package/dist/i18n/locales/ru.js +1 -0
- package/dist/i18n/locales/sq.d.ts +1 -0
- package/dist/i18n/locales/sq.js +1 -0
- package/dist/i18n/locales/sv.d.ts +1 -0
- package/dist/i18n/locales/sv.js +1 -0
- package/dist/i18n/locales/tr.d.ts +1 -0
- package/dist/i18n/locales/tr.js +1 -0
- package/dist/i18n/locales/zh.d.ts +1 -0
- package/dist/i18n/locales/zh.js +1 -0
- package/dist/index.js +6 -6
- package/dist/locales/ar.json +1 -0
- package/dist/locales/de.json +1 -0
- package/dist/locales/el.json +1 -0
- package/dist/locales/en.json +1 -0
- package/dist/locales/es.json +1 -0
- package/dist/locales/fr.json +1 -0
- package/dist/locales/hi.json +1 -0
- package/dist/locales/it.json +1 -0
- package/dist/locales/ja.json +1 -0
- package/dist/locales/nl.json +1 -0
- package/dist/locales/pl.json +1 -0
- package/dist/locales/pt.json +1 -0
- package/dist/locales/ro.json +1 -0
- package/dist/locales/ru.json +1 -0
- package/dist/locales/sq.json +1 -0
- package/dist/locales/sv.json +1 -0
- package/dist/locales/tr.json +1 -0
- package/dist/locales/zh.json +1 -0
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/anamnesis-summary-card-BvaSnAbI.js +0 -302
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as de, useId as ne, useMemo as H, useImperativeHandle as ie } from "react";
|
|
3
|
+
import { c as g } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as oe } from "react-i18next";
|
|
5
|
+
import { B as M } from "./badge-DCOqV9mI.js";
|
|
6
|
+
import { C as y } from "./card-DPmk26CL.js";
|
|
7
|
+
import { S as P } from "./skeleton-CZbwyJAA.js";
|
|
8
|
+
import { a as le, T as ce } from "./tooltip-DvmfrNvB.js";
|
|
9
|
+
import { u as me } from "./registry-DvAUVLHh.js";
|
|
10
|
+
import { H as E } from "./heart-pulse-BCppJyN2.js";
|
|
11
|
+
import { c as R } from "./createLucideIcon-DhHxpK9K.js";
|
|
12
|
+
/**
|
|
13
|
+
* @license lucide-react v1.22.0 - ISC
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the ISC license.
|
|
16
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
18
|
+
const ue = [
|
|
19
|
+
[
|
|
20
|
+
"path",
|
|
21
|
+
{
|
|
22
|
+
d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
|
|
23
|
+
key: "1sd12s"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
27
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
28
|
+
], pe = R("message-circle-question-mark", ue);
|
|
29
|
+
/**
|
|
30
|
+
* @license lucide-react v1.22.0 - ISC
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the ISC license.
|
|
33
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/
|
|
35
|
+
const ge = [
|
|
36
|
+
[
|
|
37
|
+
"path",
|
|
38
|
+
{
|
|
39
|
+
d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
|
|
40
|
+
key: "1sd12s"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
["path", { d: "m10 15-3-3 3-3", key: "1pgupc" }],
|
|
44
|
+
["path", { d: "M7 12h8a2 2 0 0 1 2 2v1", key: "89sh1g" }]
|
|
45
|
+
], he = R("message-circle-reply", ge), fe = {
|
|
46
|
+
id: "anamnesis-summary-card",
|
|
47
|
+
// The card is read-only: the only handle method is a getSummary
|
|
48
|
+
// projection, so there is no capability to declare.
|
|
49
|
+
capabilities: [],
|
|
50
|
+
state: {
|
|
51
|
+
summary: {
|
|
52
|
+
type: "{ id?: string; sectionCount: number; answerCount: number; highlightedCount: number; unansweredCount: number }",
|
|
53
|
+
descriptionKey: "ui.agent.anamnesisSummaryCard.state.summary",
|
|
54
|
+
description: "Structural summary of the anamnesis card — section, answer, highlighted and unanswered counts plus the consumer id. Never question labels or answer values.",
|
|
55
|
+
read: (d) => d.getSummary()
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
actions: {},
|
|
59
|
+
domHooks: {
|
|
60
|
+
root: {
|
|
61
|
+
attr: "data-component",
|
|
62
|
+
value: "anamnesis-summary-card",
|
|
63
|
+
description: "Marks the AnamnesisSummaryCard root region."
|
|
64
|
+
},
|
|
65
|
+
instanceId: {
|
|
66
|
+
attr: "data-component-id",
|
|
67
|
+
sourceProp: "id",
|
|
68
|
+
description: "Sourced from the id prop."
|
|
69
|
+
},
|
|
70
|
+
item: {
|
|
71
|
+
attr: "data-answer-id",
|
|
72
|
+
description: "One per answer row (KeyValuePair); the value is the intake field key. Highlighted rows also carry data-highlighted."
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}, ve = g("ds:w-full ds:text-[color:var(--foreground)]", {
|
|
76
|
+
variants: {
|
|
77
|
+
// Same `surface` vocabulary as PatientSummaryCard / ContactProfileCard.
|
|
78
|
+
// Both surfaces keep the Card chrome — `flat` only drops the shadow.
|
|
79
|
+
surface: {
|
|
80
|
+
flat: "",
|
|
81
|
+
elevated: ""
|
|
82
|
+
},
|
|
83
|
+
density: {
|
|
84
|
+
comfortable: "",
|
|
85
|
+
compact: ""
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
defaultVariants: {
|
|
89
|
+
surface: "elevated",
|
|
90
|
+
density: "comfortable"
|
|
91
|
+
}
|
|
92
|
+
}), ye = g("ds:flex ds:flex-col", {
|
|
93
|
+
variants: {
|
|
94
|
+
density: {
|
|
95
|
+
comfortable: "ds:gap-[var(--spacing-lg)]",
|
|
96
|
+
compact: "ds:gap-[var(--spacing-md)]"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
defaultVariants: { density: "comfortable" }
|
|
100
|
+
}), be = g("", {
|
|
101
|
+
variants: {
|
|
102
|
+
density: {
|
|
103
|
+
comfortable: "",
|
|
104
|
+
compact: "ds:p-[var(--spacing-sm)] ds:pb-0"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
defaultVariants: { density: "comfortable" }
|
|
108
|
+
}), xe = g("", {
|
|
109
|
+
variants: {
|
|
110
|
+
density: {
|
|
111
|
+
comfortable: "",
|
|
112
|
+
compact: "ds:p-[var(--spacing-sm)]"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
defaultVariants: { density: "comfortable" }
|
|
116
|
+
}), Ne = g("", {
|
|
117
|
+
variants: {
|
|
118
|
+
density: {
|
|
119
|
+
comfortable: "",
|
|
120
|
+
compact: "ds:p-[var(--spacing-sm)] ds:pt-0"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
defaultVariants: { density: "comfortable" }
|
|
124
|
+
}), Ce = /^(\d{4})-(\d{2})-(\d{2})$/, Se = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/, we = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/;
|
|
125
|
+
function Ae(d) {
|
|
126
|
+
const l = Ce.exec(d);
|
|
127
|
+
if (l)
|
|
128
|
+
return {
|
|
129
|
+
date: new Date(Number(l[1]), Number(l[2]) - 1, Number(l[3])),
|
|
130
|
+
hasTime: !1
|
|
131
|
+
};
|
|
132
|
+
const t = Se.exec(d);
|
|
133
|
+
if (t)
|
|
134
|
+
return {
|
|
135
|
+
date: new Date(
|
|
136
|
+
Number(t[1]),
|
|
137
|
+
Number(t[2]) - 1,
|
|
138
|
+
Number(t[3]),
|
|
139
|
+
Number(t[4]),
|
|
140
|
+
Number(t[5]),
|
|
141
|
+
t[6] ? Number(t[6]) : 0
|
|
142
|
+
),
|
|
143
|
+
hasTime: !0
|
|
144
|
+
};
|
|
145
|
+
const i = new Date(d);
|
|
146
|
+
return Number.isNaN(i.getTime()) ? null : { date: i, hasTime: we.test(d) };
|
|
147
|
+
}
|
|
148
|
+
function B(d, l) {
|
|
149
|
+
const t = Ae(d);
|
|
150
|
+
if (!t) return null;
|
|
151
|
+
const i = t.hasTime ? { dateStyle: "medium", timeStyle: "short" } : { dateStyle: "medium" };
|
|
152
|
+
try {
|
|
153
|
+
return new Intl.DateTimeFormat(l, i).format(t.date);
|
|
154
|
+
} catch {
|
|
155
|
+
return new Intl.DateTimeFormat(void 0, i).format(t.date);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
const Te = "ds:rounded-[var(--radius-md)] ds:bg-[color:color-mix(in_srgb,var(--accent)_6%,transparent)] ds:px-[var(--spacing-xs)] ds:-mx-[var(--spacing-xs)]", Le = 'ds:relative ds:inline-flex ds:appearance-none ds:border-0 ds:bg-transparent ds:p-0 ds:m-0 ds:cursor-default ds:rounded-[var(--radius-full)] ds:before:absolute ds:before:content-[""] ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:sm:before:inset-x-[calc((var(--spacing-lg)-100%)/-2)] ds:sm:before:inset-y-[calc((var(--spacing-lg)-100%)/-2)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]', D = "ds:mt-[var(--spacing-2xs)] ds:size-4 ds:shrink-0 ds:text-[color:var(--accent)]", b = "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", ke = de(
|
|
159
|
+
({
|
|
160
|
+
sections: d,
|
|
161
|
+
title: l,
|
|
162
|
+
subtitle: t,
|
|
163
|
+
unansweredCount: i = 0,
|
|
164
|
+
locale: $,
|
|
165
|
+
highlightedFirst: C = !0,
|
|
166
|
+
highlightedGroup: j = !0,
|
|
167
|
+
highlightedOnly: m = !1,
|
|
168
|
+
surface: S = "elevated",
|
|
169
|
+
density: c = "comfortable",
|
|
170
|
+
loading: h = !1,
|
|
171
|
+
actionSlot: w,
|
|
172
|
+
id: p,
|
|
173
|
+
className: z,
|
|
174
|
+
"aria-label": G,
|
|
175
|
+
...O
|
|
176
|
+
}, q) => {
|
|
177
|
+
const { t: o, i18n: F } = oe(), K = ne(), A = $ ?? F.language ?? "en", u = H(
|
|
178
|
+
() => d.filter((e) => e.answers.length > 0).map((e) => ({
|
|
179
|
+
...e,
|
|
180
|
+
answers: C ? [...e.answers].sort(
|
|
181
|
+
(s, n) => +!!n.highlighted - +!!s.highlighted
|
|
182
|
+
) : e.answers
|
|
183
|
+
})),
|
|
184
|
+
[d, C]
|
|
185
|
+
), T = u.reduce(
|
|
186
|
+
(e, s) => e + s.answers.length,
|
|
187
|
+
0
|
|
188
|
+
), f = u.reduce(
|
|
189
|
+
(e, s) => e + s.answers.filter((n) => n.highlighted).length,
|
|
190
|
+
0
|
|
191
|
+
), L = u.length, x = u.flatMap(
|
|
192
|
+
(e) => e.answers.filter((s) => s.highlighted)
|
|
193
|
+
), Q = m ? [] : u, U = (e) => {
|
|
194
|
+
const s = e.reportedAtIso ? B(e.reportedAtIso, A) : null, n = [e.sourceLabel, s].filter(
|
|
195
|
+
(v) => !!v
|
|
196
|
+
);
|
|
197
|
+
return n.length > 0 ? n.join(" · ") : null;
|
|
198
|
+
}, N = H(
|
|
199
|
+
() => ({
|
|
200
|
+
getSummary: () => ({
|
|
201
|
+
id: p,
|
|
202
|
+
sectionCount: L,
|
|
203
|
+
answerCount: T,
|
|
204
|
+
highlightedCount: f,
|
|
205
|
+
unansweredCount: i
|
|
206
|
+
})
|
|
207
|
+
}),
|
|
208
|
+
[p, L, T, f, i]
|
|
209
|
+
);
|
|
210
|
+
ie(q, () => N, [N]), me(fe, N, p);
|
|
211
|
+
const W = o("anamnesisSummaryCard.regionLabel", {
|
|
212
|
+
defaultValue: "Anamnesis summary"
|
|
213
|
+
}), k = l ?? W, Y = G ?? k, V = o("anamnesisSummaryCard.highlighted", {
|
|
214
|
+
defaultValue: "Highlighted"
|
|
215
|
+
}), J = c === "comfortable" ? "type-title-card" : "type-title-item", X = c === "comfortable" ? "md" : "sm", Z = (e) => {
|
|
216
|
+
const s = e.reportedAtIso ? B(e.reportedAtIso, A) : null, n = s && e.sourceLabel ? o("anamnesisSummaryCard.reportedOnFrom", {
|
|
217
|
+
date: s,
|
|
218
|
+
source: e.sourceLabel,
|
|
219
|
+
defaultValue: "Highlighted on {{date}} · {{source}}"
|
|
220
|
+
}) : s ? o("anamnesisSummaryCard.reportedOn", {
|
|
221
|
+
date: s,
|
|
222
|
+
defaultValue: "Highlighted on {{date}}"
|
|
223
|
+
}) : V;
|
|
224
|
+
return /* @__PURE__ */ a(ce, { label: n, side: "top", children: /* @__PURE__ */ a(
|
|
225
|
+
"button",
|
|
226
|
+
{
|
|
227
|
+
type: "button",
|
|
228
|
+
className: Le,
|
|
229
|
+
"data-highlighted-chip": "",
|
|
230
|
+
children: /* @__PURE__ */ a(
|
|
231
|
+
M,
|
|
232
|
+
{
|
|
233
|
+
variant: "accentSoft",
|
|
234
|
+
size: "sm",
|
|
235
|
+
leading: /* @__PURE__ */ a(E, { "aria-hidden": "true" }),
|
|
236
|
+
children: V
|
|
237
|
+
}
|
|
238
|
+
)
|
|
239
|
+
}
|
|
240
|
+
) });
|
|
241
|
+
}, ee = /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-wrap ds:items-start ds:gap-[var(--spacing-sm)]", children: [
|
|
242
|
+
/* @__PURE__ */ r("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
243
|
+
/* @__PURE__ */ a(
|
|
244
|
+
"h3",
|
|
245
|
+
{
|
|
246
|
+
id: K,
|
|
247
|
+
className: `ds:m-0 ${J} ds:text-[color:var(--foreground)]`,
|
|
248
|
+
children: k
|
|
249
|
+
}
|
|
250
|
+
),
|
|
251
|
+
t ? /* @__PURE__ */ a("p", { className: b, children: t }) : null
|
|
252
|
+
] }),
|
|
253
|
+
!h && f > 0 ? /* @__PURE__ */ a(
|
|
254
|
+
M,
|
|
255
|
+
{
|
|
256
|
+
variant: "accentSoft",
|
|
257
|
+
size: "sm",
|
|
258
|
+
leading: /* @__PURE__ */ a(E, { "aria-hidden": "true" }),
|
|
259
|
+
className: "ds:shrink-0",
|
|
260
|
+
children: o("anamnesisSummaryCard.highlightedCount", {
|
|
261
|
+
count: f,
|
|
262
|
+
defaultValue: "{{count}} highlighted"
|
|
263
|
+
})
|
|
264
|
+
}
|
|
265
|
+
) : null,
|
|
266
|
+
w ? /* @__PURE__ */ a("div", { className: "ds:ms-auto ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)]", children: w }) : null
|
|
267
|
+
] }), ae = /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
268
|
+
/* @__PURE__ */ a(P, { variant: "text", width: "40%" }),
|
|
269
|
+
/* @__PURE__ */ a(P, { variant: "text", lines: 4 })
|
|
270
|
+
] }), se = /* @__PURE__ */ a("p", { className: b, children: o("anamnesisSummaryCard.empty", {
|
|
271
|
+
defaultValue: "No answers recorded yet"
|
|
272
|
+
}) }), _ = [
|
|
273
|
+
"ds:m-0 ds:grid ds:grid-cols-1 ds:@[672px]/afields:grid-cols-2",
|
|
274
|
+
"ds:gap-x-[var(--spacing-lg)]",
|
|
275
|
+
X === "md" ? "ds:gap-y-[var(--spacing-md)]" : "ds:gap-y-[var(--spacing-sm)]"
|
|
276
|
+
].join(" "), I = (e, s) => {
|
|
277
|
+
const n = s.chip && e.highlighted, v = s.recorded ? U(e) : null;
|
|
278
|
+
return /* @__PURE__ */ r(
|
|
279
|
+
"div",
|
|
280
|
+
{
|
|
281
|
+
"data-answer-id": e.id,
|
|
282
|
+
"data-highlighted": e.highlighted ? "" : void 0,
|
|
283
|
+
className: [
|
|
284
|
+
"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
285
|
+
n ? Te : ""
|
|
286
|
+
].filter(Boolean).join(" "),
|
|
287
|
+
children: [
|
|
288
|
+
/* @__PURE__ */ r("dt", { className: "type-label ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
|
|
289
|
+
/* @__PURE__ */ a(
|
|
290
|
+
pe,
|
|
291
|
+
{
|
|
292
|
+
"aria-hidden": "true",
|
|
293
|
+
className: D
|
|
294
|
+
}
|
|
295
|
+
),
|
|
296
|
+
/* @__PURE__ */ a("span", { children: e.label })
|
|
297
|
+
] }),
|
|
298
|
+
/* @__PURE__ */ r("dd", { className: "type-body ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-xs)] ds:text-[color:var(--foreground)]", children: [
|
|
299
|
+
/* @__PURE__ */ a(he, { "aria-hidden": "true", className: D }),
|
|
300
|
+
/* @__PURE__ */ r("span", { className: "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
301
|
+
/* @__PURE__ */ r("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-xs)] ds:gap-y-[var(--spacing-2xs)]", children: [
|
|
302
|
+
/* @__PURE__ */ a("span", { children: e.value }),
|
|
303
|
+
e.unit ? /* @__PURE__ */ a("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: e.unit }) : null,
|
|
304
|
+
n ? Z(e) : null
|
|
305
|
+
] }),
|
|
306
|
+
v ? /* @__PURE__ */ a("span", { className: b, children: v }) : null
|
|
307
|
+
] })
|
|
308
|
+
] })
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
`${s.keyPrefix}${e.id}`
|
|
312
|
+
);
|
|
313
|
+
}, te = /* @__PURE__ */ r(
|
|
314
|
+
"div",
|
|
315
|
+
{
|
|
316
|
+
role: "group",
|
|
317
|
+
"aria-label": o("anamnesisSummaryCard.sectionsLabel", {
|
|
318
|
+
defaultValue: "Anamnesis sections"
|
|
319
|
+
}),
|
|
320
|
+
className: ye({ density: c }),
|
|
321
|
+
children: [
|
|
322
|
+
(j || m) && x.length > 0 ? /* @__PURE__ */ r(
|
|
323
|
+
"div",
|
|
324
|
+
{
|
|
325
|
+
"data-highlighted-group": "",
|
|
326
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
327
|
+
children: [
|
|
328
|
+
m ? null : /* @__PURE__ */ a("h4", { className: "ds:m-0 type-eyebrow ds:text-[color:var(--muted-foreground)]", children: o("anamnesisSummaryCard.highlightedGroup", {
|
|
329
|
+
defaultValue: "Highlighted answers"
|
|
330
|
+
}) }),
|
|
331
|
+
/* @__PURE__ */ a("div", { className: "ds:@container/afields", children: /* @__PURE__ */ a("dl", { className: _, children: x.map(
|
|
332
|
+
(e) => I(e, {
|
|
333
|
+
recorded: !0,
|
|
334
|
+
chip: !1,
|
|
335
|
+
keyPrefix: "highlighted-"
|
|
336
|
+
})
|
|
337
|
+
) }) })
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
) : null,
|
|
341
|
+
Q.map((e) => /* @__PURE__ */ r(
|
|
342
|
+
"div",
|
|
343
|
+
{
|
|
344
|
+
"data-section-id": e.id,
|
|
345
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
346
|
+
children: [
|
|
347
|
+
/* @__PURE__ */ a("h4", { className: "ds:m-0 type-eyebrow ds:text-[color:var(--muted-foreground)]", children: e.heading }),
|
|
348
|
+
/* @__PURE__ */ a("div", { className: "ds:@container/afields", children: /* @__PURE__ */ a("dl", { className: _, children: e.answers.map(
|
|
349
|
+
(s) => I(s, {
|
|
350
|
+
recorded: !1,
|
|
351
|
+
chip: !0,
|
|
352
|
+
keyPrefix: ""
|
|
353
|
+
})
|
|
354
|
+
) }) })
|
|
355
|
+
]
|
|
356
|
+
},
|
|
357
|
+
e.id
|
|
358
|
+
))
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
), re = h ? ae : u.length === 0 || m && x.length === 0 ? se : te;
|
|
362
|
+
return /* @__PURE__ */ a(
|
|
363
|
+
"div",
|
|
364
|
+
{
|
|
365
|
+
role: "region",
|
|
366
|
+
"aria-label": Y,
|
|
367
|
+
"aria-busy": h || void 0,
|
|
368
|
+
"data-component": "anamnesis-summary-card",
|
|
369
|
+
"data-component-id": p,
|
|
370
|
+
"data-density": c,
|
|
371
|
+
"data-highlighted-only": m ? "" : void 0,
|
|
372
|
+
id: p,
|
|
373
|
+
className: ve({ surface: S, density: c, className: z }),
|
|
374
|
+
...O,
|
|
375
|
+
children: /* @__PURE__ */ r(y, { variant: S === "flat" ? "outlined" : "elevated", children: [
|
|
376
|
+
/* @__PURE__ */ a(y.Header, { className: be({ density: c }), children: ee }),
|
|
377
|
+
/* @__PURE__ */ a(le, { children: /* @__PURE__ */ a(y.Body, { className: xe({ density: c }), children: re }) }),
|
|
378
|
+
!h && !m && i > 0 ? /* @__PURE__ */ a(y.Footer, { className: Ne({ density: c }), children: /* @__PURE__ */ a("p", { className: b, children: o("anamnesisSummaryCard.unanswered", {
|
|
379
|
+
count: i,
|
|
380
|
+
defaultValue: "{{count}} questions not answered"
|
|
381
|
+
}) }) }) : null
|
|
382
|
+
] })
|
|
383
|
+
}
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
);
|
|
387
|
+
ke.displayName = "AnamnesisSummaryCard";
|
|
388
|
+
export {
|
|
389
|
+
ke as A,
|
|
390
|
+
fe as a
|
|
391
|
+
};
|
|
392
|
+
//# sourceMappingURL=anamnesis-summary-card-CpQViN5l.js.map
|