@alfadocs/ui-kit 1.4.13 → 1.4.15
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/{address-fields-D-8akw2m.js → address-fields-CZP4Wncx.js} +2 -2
- package/dist/_chunks/{agenda-card-BQDs2ZMp.js → agenda-card-pdN49pMu.js} +2 -2
- package/dist/_chunks/{agenda-tray-BTyWsVwT.js → agenda-tray-CYR-znfE.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-gVcoiXxv.js → ai-consent-banner-DLF6FNXv.js} +2 -2
- package/dist/_chunks/{anamnesis-card-Bt0twrML.js → anamnesis-card-BylMLHYj.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-card-BKGVcwny.js → anamnesis-summary-card-DGVKBQoq.js} +134 -116
- package/dist/_chunks/{anamnesis-summary-rows-B5MAYkJ-.js → anamnesis-summary-rows-ESkjwenu.js} +2438 -2353
- package/dist/_chunks/{antenatal-schedule-timeline-BSLrOQ3S.js → antenatal-schedule-timeline-BjlF2rTz.js} +2 -2
- package/dist/_chunks/{appointment-card-kcUC7vWR.js → appointment-card-BhcPJpXh.js} +2 -2
- package/dist/_chunks/{appointment-timeline-BC3dlZu5.js → appointment-timeline-DT1uFp8z.js} +2 -2
- package/dist/_chunks/{appointment-tray-BPY5rATW.js → appointment-tray-DvyVK7um.js} +2 -2
- package/dist/_chunks/{badge-CIt-UFEx.js → badge-sTusUqZD.js} +23 -18
- package/dist/_chunks/{bishop-score-B6iYYO0c.js → bishop-score-BV1JAEMV.js} +3 -3
- package/dist/_chunks/{bmi-calculator-DC5SaqXT.js → bmi-calculator-CdR-RLFj.js} +5 -5
- package/dist/_chunks/{booking-CmHX15dh.js → booking-CGKof8QU.js} +2 -2
- package/dist/_chunks/{care-plan-card-9tLgsDYY.js → care-plan-card-C83Hb9EE.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-CSan4h7A.js → care-plan-entry-card-CHMPSTCz.js} +2 -2
- package/dist/_chunks/{care-plan-header-D_BTi77b.js → care-plan-header-_B0TTWT1.js} +2 -2
- package/dist/_chunks/{clinical-note-card-ByzQ86uz.js → clinical-note-card-BBgFd2nB.js} +2 -2
- package/dist/_chunks/{connection-status-D8mZ4klk.js → connection-status-NT8hUtYl.js} +2 -2
- package/dist/_chunks/{contact-profile-card-DuW6VpzY.js → contact-profile-card-BxHiG8e6.js} +2 -2
- package/dist/_chunks/{cycle-calculator-B_NlctlQ.js → cycle-calculator-DJZYvNhw.js} +4 -4
- package/dist/_chunks/{dependent-selector-BUvrZRi0.js → dependent-selector-cJlJFAKD.js} +2 -2
- package/dist/_chunks/{document-preview-Di15VrpQ.js → document-preview-Aae2yKvY.js} +2 -2
- package/dist/_chunks/{due-date-calculator-le1z3KpW.js → due-date-calculator-ajaQ4ya5.js} +6 -6
- package/dist/_chunks/{fetal-weight-DXA6ZpMq.js → fetal-weight-jon6GIfQ.js} +4 -4
- package/dist/_chunks/{field-value-BCFLVBmu.js → field-value-BbiDRyNh.js} +2 -2
- package/dist/_chunks/{file-manager-BjCM2fZB.js → file-manager-CML_C6_h.js} +2 -2
- package/dist/_chunks/form-field-CahJzTxp.js +131 -0
- package/dist/_chunks/{gestational-age-calculator-Ch8vmJAl.js → gestational-age-calculator-dEpQDWcb.js} +5 -5
- package/dist/_chunks/{hcg-doubling-BT6lki_i.js → hcg-doubling-CC6TLtHd.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-C7GvyK66.js → link-cell-renderer-D3IsW_2R.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-BhRH7Zi4.js → marketplace-app-shell-b5hN-Q0m.js} +2 -2
- package/dist/_chunks/{notes-panel-Bz83SO4-.js → notes-panel-D6HKLLS-.js} +2 -2
- package/dist/_chunks/{number-input-CM1q9zvH.js → number-input-Cgu2TtA8.js} +30 -21
- package/dist/_chunks/{operator-hero-CpJkDNAM.js → operator-hero-CCDnIa1S.js} +2 -2
- package/dist/_chunks/{optical-prescription-CQR_WJiS.js → optical-prescription-DtzEqFQm.js} +2 -2
- package/dist/_chunks/{patient-details-CnFgF3MU.js → patient-details-rENrE_qY.js} +3 -3
- package/dist/_chunks/{patient-summary-card-DfbOtOV6.js → patient-summary-card-DQJgOOrA.js} +3 -3
- package/dist/_chunks/{patient-table-BXzcrC79.js → patient-table-BubxfOWL.js} +3 -3
- package/dist/_chunks/{payment-automation-upsell-Ckh3b7Xx.js → payment-automation-upsell-CnaBPt5e.js} +2 -2
- package/dist/_chunks/{payment-request-card-Dn6-tH-D.js → payment-request-card-CvhDzDNk.js} +2 -2
- package/dist/_chunks/{periodontal-chart-B0yko9Xm.js → periodontal-chart-brakjj0s.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-HbYTmWlo.js → periodontal-chart-card-Bz-ebteE.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-Qk4F3Wc_.js → periodontal-diagnosis-HrFsVi-C.js} +3 -3
- package/dist/_chunks/{periodontal-risk-chart-ByKuM4cF.js → periodontal-risk-chart-0x7KVZjL.js} +2 -2
- package/dist/_chunks/{practice-results-C5exrEn0.js → practice-results-DWUZRm2x.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-4tPV_Yko.js → pregnancy-dating-DQVpFs_f.js} +6 -6
- package/dist/_chunks/{pregnancy-weight-gain-BBgbWBGe.js → pregnancy-weight-gain-hm3QJALe.js} +5 -5
- package/dist/_chunks/radio-group-rXDJADzW.js +175 -0
- package/dist/_chunks/{radiograph-panel.agent-Drj0hYVV.js → radiograph-panel.agent-CAXFgCyn.js} +3 -3
- package/dist/_chunks/{signature-status-chip-DlLJk1VA.js → signature-status-chip-DqrPIJtH.js} +2 -2
- package/dist/_chunks/{tab-bar-Ddp_ZbnL.js → tab-bar-DvFJIQfL.js} +2 -2
- package/dist/_chunks/{tasks-panel-T7vaKJcA.js → tasks-panel-BBkZuejF.js} +2 -2
- package/dist/_chunks/{unit-converter-Dsk__pjA.js → unit-converter-iDxlxKmm.js} +3 -3
- package/dist/_chunks/{widget-picker-DqMbjQy_.js → widget-picker-em4xGgv0.js} +2 -2
- package/dist/_chunks/{workflow-map-BNBeG2zn.js → workflow-map-BVofnDYh.js} +2 -2
- package/dist/agent-catalog.json +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anamnesis-summary-card/anamnesis-summary-card.d.ts +2 -2
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/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/connection-status/index.js +1 -1
- 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/dependent-selector/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/form-field/form-field.d.ts +8 -0
- package/dist/components/form-field/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.d.ts +5 -2
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/periodontal-risk-chart/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/radio-group.d.ts +5 -0
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/signature-status-chip/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/host-compat.css +4 -1
- package/dist/index.js +56 -56
- package/dist/patterns/anamnesis/anamnesis-evolution.d.ts +7 -1
- package/dist/patterns/anamnesis/anamnesis-field.d.ts +9 -1
- package/dist/patterns/anamnesis/anamnesis-indicators.d.ts +3 -1
- package/dist/patterns/anamnesis/anamnesis-intake.d.ts +3 -2
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +3 -0
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/tokens.css +3 -3
- package/package.json +1 -1
- package/dist/_chunks/form-field-D1oqYisL.js +0 -127
- package/dist/_chunks/radio-group-BmIqhIT2.js +0 -171
|
@@ -7,7 +7,7 @@ import { P as B } from "./province-select-BDywtmL-.js";
|
|
|
7
7
|
import { P as q } from "./postal-code-input-BznBxVxf.js";
|
|
8
8
|
import { C as H } from "./city-input-towzBenY.js";
|
|
9
9
|
import { T as K } from "./text-input-CUvCb6ST.js";
|
|
10
|
-
import { F as l } from "./form-field-
|
|
10
|
+
import { F as l } from "./form-field-CahJzTxp.js";
|
|
11
11
|
import { A as M } from "./address-autocomplete-Bq-1n1UX.js";
|
|
12
12
|
import { u as U } from "./registry-DvAUVLHh.js";
|
|
13
13
|
const W = {
|
|
@@ -243,4 +243,4 @@ export {
|
|
|
243
243
|
Z as A,
|
|
244
244
|
Y as a
|
|
245
245
|
};
|
|
246
|
-
//# sourceMappingURL=address-fields-
|
|
246
|
+
//# sourceMappingURL=address-fields-CZP4Wncx.js.map
|
|
@@ -3,7 +3,7 @@ import { forwardRef as h } from "react";
|
|
|
3
3
|
import { c as x } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as y } from "react-i18next";
|
|
5
5
|
import { A as N } from "./avatar-BNQNhoyL.js";
|
|
6
|
-
import { B as C } from "./badge-
|
|
6
|
+
import { B as C } from "./badge-sTusUqZD.js";
|
|
7
7
|
import { i as w } from "./is-safe-url-DkETxeHz.js";
|
|
8
8
|
import { C as k } from "./chevron-right-I9AeSxH2.js";
|
|
9
9
|
const L = x(
|
|
@@ -144,4 +144,4 @@ z.displayName = "AgendaCard";
|
|
|
144
144
|
export {
|
|
145
145
|
z as A
|
|
146
146
|
};
|
|
147
|
-
//# sourceMappingURL=agenda-card-
|
|
147
|
+
//# sourceMappingURL=agenda-card-pdN49pMu.js.map
|
|
@@ -5,7 +5,7 @@ import { useTranslation as K } from "react-i18next";
|
|
|
5
5
|
import { I as M } from "./icon-button-9c9Gp41m.js";
|
|
6
6
|
import { S as A } from "./skeleton-CZbwyJAA.js";
|
|
7
7
|
import { E as D } from "./empty-state-Df0tM6Kn.js";
|
|
8
|
-
import { A as V } from "./agenda-card-
|
|
8
|
+
import { A as V } from "./agenda-card-pdN49pMu.js";
|
|
9
9
|
import { u as F } from "./registry-DvAUVLHh.js";
|
|
10
10
|
import { C as G } from "./calendar-days-BGWklvE-.js";
|
|
11
11
|
import { P as J } from "./plus-DzMQ_c6b.js";
|
|
@@ -212,4 +212,4 @@ export {
|
|
|
212
212
|
U as A,
|
|
213
213
|
L as a
|
|
214
214
|
};
|
|
215
|
-
//# sourceMappingURL=agenda-tray-
|
|
215
|
+
//# sourceMappingURL=agenda-tray-CYR-znfE.js.map
|
|
@@ -3,7 +3,7 @@ import { forwardRef as N, useState as k, useRef as q, useMemo as I } from "react
|
|
|
3
3
|
import { c as L } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as R } from "react-i18next";
|
|
5
5
|
import { A as d } from "./alert-CiJT540z.js";
|
|
6
|
-
import { B as w } from "./badge-
|
|
6
|
+
import { B as w } from "./badge-sTusUqZD.js";
|
|
7
7
|
import { B as T } from "./button-BvNtqHAS.js";
|
|
8
8
|
import { C as V } from "./checkbox-BuZ1u__2.js";
|
|
9
9
|
import { S as j } from "./spinner-hbwuKwMf.js";
|
|
@@ -167,4 +167,4 @@ export {
|
|
|
167
167
|
P as A,
|
|
168
168
|
K as a
|
|
169
169
|
};
|
|
170
|
-
//# sourceMappingURL=ai-consent-banner-
|
|
170
|
+
//# sourceMappingURL=ai-consent-banner-DLF6FNXv.js.map
|
|
@@ -2,7 +2,7 @@ import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as M, useId as C, useMemo as R } from "react";
|
|
3
3
|
import { c as q } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as z } from "react-i18next";
|
|
5
|
-
import { B as n } from "./badge-
|
|
5
|
+
import { B as n } from "./badge-sTusUqZD.js";
|
|
6
6
|
import { C as N } from "./card-DPmk26CL.js";
|
|
7
7
|
import { A as G, b as O, c as Q, a as S } from "./accordion-C11v9ouP.js";
|
|
8
8
|
import { D as t } from "./description-list-Ck7fKdt5.js";
|
|
@@ -153,4 +153,4 @@ J.displayName = "AnamnesisCard";
|
|
|
153
153
|
export {
|
|
154
154
|
J as A
|
|
155
155
|
};
|
|
156
|
-
//# sourceMappingURL=anamnesis-card-
|
|
156
|
+
//# sourceMappingURL=anamnesis-card-BylMLHYj.js.map
|
package/dist/_chunks/{anamnesis-summary-card-BKGVcwny.js → anamnesis-summary-card-DGVKBQoq.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as i, jsx as a, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as re, useId as de, useMemo as E, useImperativeHandle as ne } from "react";
|
|
3
3
|
import { c as h } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { B as
|
|
6
|
-
import { C as
|
|
7
|
-
import { S as
|
|
8
|
-
import { a as
|
|
9
|
-
import { u as
|
|
4
|
+
import { useTranslation as ie } from "react-i18next";
|
|
5
|
+
import { B as H } from "./badge-sTusUqZD.js";
|
|
6
|
+
import { C as oe } from "./card-DPmk26CL.js";
|
|
7
|
+
import { S as k } 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
10
|
import { H as P } from "./heart-pulse-BCppJyN2.js";
|
|
11
|
-
const
|
|
11
|
+
const ue = {
|
|
12
12
|
id: "anamnesis-summary-card",
|
|
13
13
|
// The card is read-only: the only handle method is a getSummary
|
|
14
14
|
// projection, so there is no capability to declare.
|
|
@@ -18,7 +18,7 @@ const ce = {
|
|
|
18
18
|
type: "{ id?: string; sectionCount: number; answerCount: number; highlightedCount: number; unansweredCount: number }",
|
|
19
19
|
descriptionKey: "ui.agent.anamnesisSummaryCard.state.summary",
|
|
20
20
|
description: "Structural summary of the anamnesis card — section, answer, highlighted and unanswered counts plus the consumer id. Never question labels or answer values.",
|
|
21
|
-
read: (
|
|
21
|
+
read: (t) => t.getSummary()
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
actions: {},
|
|
@@ -38,13 +38,15 @@ const ce = {
|
|
|
38
38
|
description: "One per answer row (KeyValuePair); the value is the intake field key. Highlighted rows also carry data-highlighted."
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
},
|
|
41
|
+
}, ge = h("ds:w-full ds:text-[color:var(--foreground)]", {
|
|
42
42
|
variants: {
|
|
43
|
-
// Same `surface` vocabulary as PatientSummaryCard / ContactProfileCard
|
|
44
|
-
//
|
|
43
|
+
// Same `surface` vocabulary as PatientSummaryCard / ContactProfileCard,
|
|
44
|
+
// plus `bare` for a host that already frames the card — an expanded
|
|
45
|
+
// table row, where a card inside a row inside a table was three layers.
|
|
45
46
|
surface: {
|
|
46
47
|
flat: "",
|
|
47
|
-
elevated: ""
|
|
48
|
+
elevated: "",
|
|
49
|
+
bare: ""
|
|
48
50
|
},
|
|
49
51
|
density: {
|
|
50
52
|
comfortable: "",
|
|
@@ -55,7 +57,7 @@ const ce = {
|
|
|
55
57
|
surface: "elevated",
|
|
56
58
|
density: "comfortable"
|
|
57
59
|
}
|
|
58
|
-
}),
|
|
60
|
+
}), he = h("ds:flex ds:flex-col", {
|
|
59
61
|
variants: {
|
|
60
62
|
density: {
|
|
61
63
|
comfortable: "ds:gap-[var(--spacing-lg)]",
|
|
@@ -63,7 +65,7 @@ const ce = {
|
|
|
63
65
|
}
|
|
64
66
|
},
|
|
65
67
|
defaultVariants: { density: "comfortable" }
|
|
66
|
-
}),
|
|
68
|
+
}), pe = h("", {
|
|
67
69
|
variants: {
|
|
68
70
|
density: {
|
|
69
71
|
comfortable: "",
|
|
@@ -71,7 +73,7 @@ const ce = {
|
|
|
71
73
|
}
|
|
72
74
|
},
|
|
73
75
|
defaultVariants: { density: "comfortable" }
|
|
74
|
-
}),
|
|
76
|
+
}), fe = h("", {
|
|
75
77
|
variants: {
|
|
76
78
|
density: {
|
|
77
79
|
comfortable: "",
|
|
@@ -79,7 +81,7 @@ const ce = {
|
|
|
79
81
|
}
|
|
80
82
|
},
|
|
81
83
|
defaultVariants: { density: "comfortable" }
|
|
82
|
-
}),
|
|
84
|
+
}), ve = h("", {
|
|
83
85
|
variants: {
|
|
84
86
|
density: {
|
|
85
87
|
comfortable: "",
|
|
@@ -87,114 +89,130 @@ const ce = {
|
|
|
87
89
|
}
|
|
88
90
|
},
|
|
89
91
|
defaultVariants: { density: "comfortable" }
|
|
90
|
-
}),
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
92
|
+
}), be = /^(\d{4})-(\d{2})-(\d{2})$/, ye = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/, xe = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/;
|
|
93
|
+
function Ne(t) {
|
|
94
|
+
const d = be.exec(t);
|
|
95
|
+
if (d)
|
|
94
96
|
return {
|
|
95
|
-
date: new Date(Number(
|
|
97
|
+
date: new Date(Number(d[1]), Number(d[2]) - 1, Number(d[3])),
|
|
96
98
|
hasTime: !1
|
|
97
99
|
};
|
|
98
|
-
const
|
|
99
|
-
if (
|
|
100
|
+
const r = ye.exec(t);
|
|
101
|
+
if (r)
|
|
100
102
|
return {
|
|
101
103
|
date: new Date(
|
|
102
|
-
Number(
|
|
103
|
-
Number(
|
|
104
|
-
Number(
|
|
105
|
-
Number(
|
|
106
|
-
Number(
|
|
107
|
-
|
|
104
|
+
Number(r[1]),
|
|
105
|
+
Number(r[2]) - 1,
|
|
106
|
+
Number(r[3]),
|
|
107
|
+
Number(r[4]),
|
|
108
|
+
Number(r[5]),
|
|
109
|
+
r[6] ? Number(r[6]) : 0
|
|
108
110
|
),
|
|
109
111
|
hasTime: !0
|
|
110
112
|
};
|
|
111
|
-
const
|
|
112
|
-
return Number.isNaN(
|
|
113
|
+
const o = new Date(t);
|
|
114
|
+
return Number.isNaN(o.getTime()) ? null : { date: o, hasTime: xe.test(t) };
|
|
113
115
|
}
|
|
114
|
-
function R(
|
|
115
|
-
const
|
|
116
|
-
if (!
|
|
117
|
-
const
|
|
116
|
+
function R(t, d) {
|
|
117
|
+
const r = Ne(t);
|
|
118
|
+
if (!r) return null;
|
|
119
|
+
const o = r.hasTime ? { dateStyle: "medium", timeStyle: "short" } : { dateStyle: "medium" };
|
|
118
120
|
try {
|
|
119
|
-
return new Intl.DateTimeFormat(
|
|
121
|
+
return new Intl.DateTimeFormat(d, o).format(r.date);
|
|
120
122
|
} catch {
|
|
121
|
-
return new Intl.DateTimeFormat(void 0,
|
|
123
|
+
return new Intl.DateTimeFormat(void 0, o).format(r.date);
|
|
122
124
|
}
|
|
123
125
|
}
|
|
124
|
-
const
|
|
126
|
+
const Ce = '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]', Se = "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)] ds:border-s-2 ds:ps-[var(--spacing-sm)]", Ae = "ds:border-[color:var(--border)]", Le = "ds:border-[color:var(--accent)]", y = "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", Te = Object.assign(
|
|
127
|
+
({ children: t }) => /* @__PURE__ */ a(te, { children: t }),
|
|
128
|
+
{
|
|
129
|
+
Header: ({
|
|
130
|
+
children: t,
|
|
131
|
+
className: d
|
|
132
|
+
}) => /* @__PURE__ */ a("div", { className: d, children: t }),
|
|
133
|
+
Body: ({
|
|
134
|
+
children: t,
|
|
135
|
+
className: d
|
|
136
|
+
}) => /* @__PURE__ */ a("div", { className: d, children: t }),
|
|
137
|
+
Footer: ({
|
|
138
|
+
children: t,
|
|
139
|
+
className: d
|
|
140
|
+
}) => /* @__PURE__ */ a("div", { className: d, children: t })
|
|
141
|
+
}
|
|
142
|
+
), we = re(
|
|
125
143
|
({
|
|
126
|
-
sections:
|
|
127
|
-
title:
|
|
128
|
-
subtitle:
|
|
129
|
-
unansweredCount:
|
|
144
|
+
sections: t,
|
|
145
|
+
title: d,
|
|
146
|
+
subtitle: r,
|
|
147
|
+
unansweredCount: o = 0,
|
|
130
148
|
locale: D,
|
|
131
|
-
highlightedFirst:
|
|
132
|
-
highlightedGroup:
|
|
149
|
+
highlightedFirst: S = !0,
|
|
150
|
+
highlightedGroup: j = !0,
|
|
133
151
|
highlightedOnly: m = !1,
|
|
134
|
-
surface:
|
|
152
|
+
surface: x = "elevated",
|
|
135
153
|
density: c = "comfortable",
|
|
136
154
|
loading: p = !1,
|
|
137
155
|
actionSlot: A,
|
|
138
156
|
id: g,
|
|
139
|
-
className:
|
|
140
|
-
"aria-label":
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
const { t:
|
|
144
|
-
() =>
|
|
157
|
+
className: M,
|
|
158
|
+
"aria-label": F,
|
|
159
|
+
...$
|
|
160
|
+
}, z) => {
|
|
161
|
+
const { t: l, i18n: K } = ie(), O = de(), L = D ?? K.language ?? "en", u = E(
|
|
162
|
+
() => t.filter((e) => e.answers.length > 0).map((e) => ({
|
|
145
163
|
...e,
|
|
146
|
-
answers:
|
|
147
|
-
(s,
|
|
164
|
+
answers: S ? [...e.answers].sort(
|
|
165
|
+
(s, n) => +!!n.highlighted - +!!s.highlighted
|
|
148
166
|
) : e.answers
|
|
149
167
|
})),
|
|
150
|
-
[
|
|
168
|
+
[t, S]
|
|
151
169
|
), T = u.reduce(
|
|
152
170
|
(e, s) => e + s.answers.length,
|
|
153
171
|
0
|
|
154
172
|
), f = u.reduce(
|
|
155
|
-
(e, s) => e + s.answers.filter((
|
|
173
|
+
(e, s) => e + s.answers.filter((n) => n.highlighted).length,
|
|
156
174
|
0
|
|
157
|
-
), w = u.length,
|
|
175
|
+
), w = u.length, N = u.flatMap(
|
|
158
176
|
(e) => e.answers.filter((s) => s.highlighted)
|
|
159
|
-
),
|
|
160
|
-
const s = e.reportedAtIso ? R(e.reportedAtIso, L) : null,
|
|
161
|
-
(
|
|
177
|
+
), q = m ? [] : u, G = (e) => {
|
|
178
|
+
const s = e.reportedAtIso ? R(e.reportedAtIso, L) : null, n = [e.sourceLabel, s].filter(
|
|
179
|
+
(b) => !!b
|
|
162
180
|
);
|
|
163
|
-
return
|
|
164
|
-
},
|
|
181
|
+
return n.length > 0 ? n.join(" · ") : null;
|
|
182
|
+
}, C = E(
|
|
165
183
|
() => ({
|
|
166
184
|
getSummary: () => ({
|
|
167
185
|
id: g,
|
|
168
186
|
sectionCount: w,
|
|
169
187
|
answerCount: T,
|
|
170
188
|
highlightedCount: f,
|
|
171
|
-
unansweredCount:
|
|
189
|
+
unansweredCount: o
|
|
172
190
|
})
|
|
173
191
|
}),
|
|
174
|
-
[g, w, T, f,
|
|
192
|
+
[g, w, T, f, o]
|
|
175
193
|
);
|
|
176
|
-
|
|
177
|
-
const U =
|
|
194
|
+
ne(z, () => C, [C]), me(ue, C, g);
|
|
195
|
+
const U = l("anamnesisSummaryCard.regionLabel", {
|
|
178
196
|
defaultValue: "Anamnesis summary"
|
|
179
|
-
}), V =
|
|
197
|
+
}), V = d ?? U, Y = F ?? V, _ = l("anamnesisSummaryCard.highlighted", {
|
|
180
198
|
defaultValue: "Highlighted"
|
|
181
199
|
}), J = c === "comfortable" ? "type-title-card" : "type-title-item", Q = c === "comfortable" ? "md" : "sm", W = (e) => {
|
|
182
|
-
const s = e.reportedAtIso ? R(e.reportedAtIso, L) : null,
|
|
200
|
+
const s = e.reportedAtIso ? R(e.reportedAtIso, L) : null, n = s && e.sourceLabel ? l("anamnesisSummaryCard.reportedOnFrom", {
|
|
183
201
|
date: s,
|
|
184
202
|
source: e.sourceLabel,
|
|
185
203
|
defaultValue: "Highlighted on {{date}} · {{source}}"
|
|
186
|
-
}) : s ?
|
|
204
|
+
}) : s ? l("anamnesisSummaryCard.reportedOn", {
|
|
187
205
|
date: s,
|
|
188
206
|
defaultValue: "Highlighted on {{date}}"
|
|
189
207
|
}) : _;
|
|
190
|
-
return /* @__PURE__ */ a(
|
|
208
|
+
return /* @__PURE__ */ a(ce, { label: n, side: "top", children: /* @__PURE__ */ a(
|
|
191
209
|
"button",
|
|
192
210
|
{
|
|
193
211
|
type: "button",
|
|
194
|
-
className:
|
|
212
|
+
className: Ce,
|
|
195
213
|
"data-highlighted-chip": "",
|
|
196
214
|
children: /* @__PURE__ */ a(
|
|
197
|
-
|
|
215
|
+
H,
|
|
198
216
|
{
|
|
199
217
|
variant: "accentSoft",
|
|
200
218
|
size: "sm",
|
|
@@ -204,88 +222,88 @@ const xe = 'ds:relative ds:inline-flex ds:appearance-none ds:border-0 ds:bg-tran
|
|
|
204
222
|
)
|
|
205
223
|
}
|
|
206
224
|
) });
|
|
207
|
-
}, X = /* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
225
|
+
}, X = /* @__PURE__ */ i("div", { className: "ds:flex ds:flex-wrap ds:items-start ds:gap-[var(--spacing-sm)]", children: [
|
|
226
|
+
/* @__PURE__ */ i("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
209
227
|
/* @__PURE__ */ a(
|
|
210
228
|
"h3",
|
|
211
229
|
{
|
|
212
|
-
id:
|
|
230
|
+
id: O,
|
|
213
231
|
className: `ds:m-0 ${J} ds:text-[color:var(--foreground)]`,
|
|
214
232
|
children: V
|
|
215
233
|
}
|
|
216
234
|
),
|
|
217
|
-
|
|
235
|
+
r ? /* @__PURE__ */ a("p", { className: y, children: r }) : null
|
|
218
236
|
] }),
|
|
219
237
|
!p && f > 0 ? /* @__PURE__ */ a(
|
|
220
|
-
|
|
238
|
+
H,
|
|
221
239
|
{
|
|
222
240
|
variant: "accentSoft",
|
|
223
241
|
size: "sm",
|
|
224
242
|
leading: /* @__PURE__ */ a(P, { "aria-hidden": "true" }),
|
|
225
243
|
className: "ds:shrink-0",
|
|
226
|
-
children:
|
|
244
|
+
children: l("anamnesisSummaryCard.highlightedCount", {
|
|
227
245
|
count: f,
|
|
228
246
|
defaultValue: "{{count}} highlighted"
|
|
229
247
|
})
|
|
230
248
|
}
|
|
231
249
|
) : null,
|
|
232
250
|
A ? /* @__PURE__ */ a("div", { className: "ds:ms-auto ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)]", children: A }) : null
|
|
233
|
-
] }), Z = /* @__PURE__ */
|
|
234
|
-
/* @__PURE__ */ a(
|
|
235
|
-
/* @__PURE__ */ a(
|
|
236
|
-
] }), ee = /* @__PURE__ */ a("p", { className: y, children:
|
|
251
|
+
] }), Z = /* @__PURE__ */ i("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
252
|
+
/* @__PURE__ */ a(k, { variant: "text", width: "40%" }),
|
|
253
|
+
/* @__PURE__ */ a(k, { variant: "text", lines: 4 })
|
|
254
|
+
] }), ee = /* @__PURE__ */ a("p", { className: y, children: l("anamnesisSummaryCard.empty", {
|
|
237
255
|
defaultValue: "No answers recorded yet"
|
|
238
|
-
}) }),
|
|
256
|
+
}) }), B = [
|
|
239
257
|
"ds:m-0 ds:grid ds:grid-cols-1 ds:@[672px]/afields:grid-cols-2",
|
|
240
258
|
"ds:gap-x-[var(--spacing-lg)]",
|
|
241
259
|
Q === "md" ? "ds:gap-y-[var(--spacing-md)]" : "ds:gap-y-[var(--spacing-sm)]"
|
|
242
|
-
].join(" "),
|
|
243
|
-
const
|
|
244
|
-
return /* @__PURE__ */
|
|
260
|
+
].join(" "), I = (e, s) => {
|
|
261
|
+
const n = s.chip && e.highlighted, b = s.recorded ? G(e) : null;
|
|
262
|
+
return /* @__PURE__ */ i(
|
|
245
263
|
"div",
|
|
246
264
|
{
|
|
247
265
|
"data-answer-id": e.id,
|
|
248
266
|
"data-highlighted": e.highlighted ? "" : void 0,
|
|
249
267
|
className: [
|
|
250
|
-
|
|
251
|
-
s.accentBar ||
|
|
268
|
+
Se,
|
|
269
|
+
s.accentBar || n ? Le : Ae
|
|
252
270
|
].join(" "),
|
|
253
271
|
children: [
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
-
|
|
272
|
+
/* @__PURE__ */ i("dt", { className: "type-title-item ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-xs)] ds:font-semibold ds:text-[color:var(--foreground)]", children: [
|
|
273
|
+
n ? W(e) : null,
|
|
256
274
|
/* @__PURE__ */ a("span", { children: e.label })
|
|
257
275
|
] }),
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ i("dd", { className: "type-body-sm ds:m-0 ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)] ds:text-[color:var(--foreground)]", children: [
|
|
277
|
+
/* @__PURE__ */ i("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-xs)] ds:gap-y-[var(--spacing-2xs)]", children: [
|
|
260
278
|
/* @__PURE__ */ a("span", { children: e.value }),
|
|
261
279
|
e.unit ? /* @__PURE__ */ a("span", { className: "ds:text-[color:var(--muted-foreground)]", children: e.unit }) : null
|
|
262
280
|
] }),
|
|
263
|
-
|
|
281
|
+
b ? /* @__PURE__ */ a("span", { className: y, children: b }) : null
|
|
264
282
|
] })
|
|
265
283
|
]
|
|
266
284
|
},
|
|
267
285
|
`${s.keyPrefix}${e.id}`
|
|
268
286
|
);
|
|
269
|
-
}, ae = /* @__PURE__ */
|
|
287
|
+
}, ae = /* @__PURE__ */ i(
|
|
270
288
|
"div",
|
|
271
289
|
{
|
|
272
290
|
role: "group",
|
|
273
|
-
"aria-label":
|
|
291
|
+
"aria-label": l("anamnesisSummaryCard.sectionsLabel", {
|
|
274
292
|
defaultValue: "Anamnesis sections"
|
|
275
293
|
}),
|
|
276
|
-
className:
|
|
294
|
+
className: he({ density: c }),
|
|
277
295
|
children: [
|
|
278
|
-
(
|
|
296
|
+
(j || m) && N.length > 0 ? /* @__PURE__ */ i(
|
|
279
297
|
"div",
|
|
280
298
|
{
|
|
281
299
|
"data-highlighted-group": "",
|
|
282
300
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
283
301
|
children: [
|
|
284
|
-
m ? null : /* @__PURE__ */ a("h4", { className: "type-label ds:m-0 ds:font-semibold ds:text-[color:var(--foreground)]", children:
|
|
302
|
+
m ? null : /* @__PURE__ */ a("h4", { className: "type-label ds:m-0 ds:font-semibold ds:text-[color:var(--foreground)]", children: l("anamnesisSummaryCard.highlightedGroup", {
|
|
285
303
|
defaultValue: "Highlighted answers"
|
|
286
304
|
}) }),
|
|
287
|
-
/* @__PURE__ */ a("div", { className: "ds:@container/afields", children: /* @__PURE__ */ a("dl", { className:
|
|
288
|
-
(e) =>
|
|
305
|
+
/* @__PURE__ */ a("div", { className: "ds:@container/afields", children: /* @__PURE__ */ a("dl", { className: B, children: N.map(
|
|
306
|
+
(e) => I(e, {
|
|
289
307
|
recorded: !0,
|
|
290
308
|
chip: !1,
|
|
291
309
|
accentBar: !0,
|
|
@@ -295,15 +313,15 @@ const xe = 'ds:relative ds:inline-flex ds:appearance-none ds:border-0 ds:bg-tran
|
|
|
295
313
|
]
|
|
296
314
|
}
|
|
297
315
|
) : null,
|
|
298
|
-
|
|
316
|
+
q.map((e) => /* @__PURE__ */ i(
|
|
299
317
|
"div",
|
|
300
318
|
{
|
|
301
319
|
"data-section-id": e.id,
|
|
302
320
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
303
321
|
children: [
|
|
304
322
|
/* @__PURE__ */ a("h4", { className: "type-label ds:m-0 ds:font-semibold ds:text-[color:var(--foreground)]", children: e.heading }),
|
|
305
|
-
/* @__PURE__ */ a("div", { className: "ds:@container/afields", children: /* @__PURE__ */ a("dl", { className:
|
|
306
|
-
(s) =>
|
|
323
|
+
/* @__PURE__ */ a("div", { className: "ds:@container/afields", children: /* @__PURE__ */ a("dl", { className: B, children: e.answers.map(
|
|
324
|
+
(s) => I(s, {
|
|
307
325
|
recorded: !1,
|
|
308
326
|
chip: !0,
|
|
309
327
|
accentBar: !1,
|
|
@@ -316,7 +334,7 @@ const xe = 'ds:relative ds:inline-flex ds:appearance-none ds:border-0 ds:bg-tran
|
|
|
316
334
|
))
|
|
317
335
|
]
|
|
318
336
|
}
|
|
319
|
-
), se = p ? Z : u.length === 0 || m &&
|
|
337
|
+
), se = p ? Z : u.length === 0 || m && N.length === 0 ? ee : ae, v = x === "bare" ? Te : oe;
|
|
320
338
|
return /* @__PURE__ */ a(
|
|
321
339
|
"div",
|
|
322
340
|
{
|
|
@@ -328,13 +346,13 @@ const xe = 'ds:relative ds:inline-flex ds:appearance-none ds:border-0 ds:bg-tran
|
|
|
328
346
|
"data-density": c,
|
|
329
347
|
"data-highlighted-only": m ? "" : void 0,
|
|
330
348
|
id: g,
|
|
331
|
-
className:
|
|
332
|
-
|
|
333
|
-
children: /* @__PURE__ */
|
|
334
|
-
/* @__PURE__ */ a(
|
|
335
|
-
/* @__PURE__ */ a(
|
|
336
|
-
!p && !m &&
|
|
337
|
-
count:
|
|
349
|
+
className: ge({ surface: x, density: c, className: M }),
|
|
350
|
+
...$,
|
|
351
|
+
children: /* @__PURE__ */ i(v, { variant: x === "flat" ? "outlined" : "elevated", children: [
|
|
352
|
+
/* @__PURE__ */ a(v.Header, { className: pe({ density: c }), children: X }),
|
|
353
|
+
/* @__PURE__ */ a(le, { children: /* @__PURE__ */ a(v.Body, { className: fe({ density: c }), children: se }) }),
|
|
354
|
+
!p && !m && o > 0 ? /* @__PURE__ */ a(v.Footer, { className: ve({ density: c }), children: /* @__PURE__ */ a("p", { className: y, children: l("anamnesisSummaryCard.unanswered", {
|
|
355
|
+
count: o,
|
|
338
356
|
defaultValue: "{{count}} questions not answered"
|
|
339
357
|
}) }) }) : null
|
|
340
358
|
] })
|
|
@@ -342,9 +360,9 @@ const xe = 'ds:relative ds:inline-flex ds:appearance-none ds:border-0 ds:bg-tran
|
|
|
342
360
|
);
|
|
343
361
|
}
|
|
344
362
|
);
|
|
345
|
-
|
|
363
|
+
we.displayName = "AnamnesisSummaryCard";
|
|
346
364
|
export {
|
|
347
|
-
|
|
348
|
-
|
|
365
|
+
we as A,
|
|
366
|
+
ue as a
|
|
349
367
|
};
|
|
350
|
-
//# sourceMappingURL=anamnesis-summary-card-
|
|
368
|
+
//# sourceMappingURL=anamnesis-summary-card-DGVKBQoq.js.map
|