@alfadocs/ui-kit 1.4.10 → 1.4.12
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-pHsfkXGk.js → address-fields-D-8akw2m.js} +2 -2
- package/dist/_chunks/{agenda-card-BCGaQazD.js → agenda-card-BQDs2ZMp.js} +2 -2
- package/dist/_chunks/{agenda-tray-CG6FuccE.js → agenda-tray-BTyWsVwT.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-CpF_rbG9.js → ai-consent-banner-gVcoiXxv.js} +2 -2
- package/dist/_chunks/{anamnesis-card-C4FVp9wO.js → anamnesis-card-Bt0twrML.js} +2 -2
- package/dist/_chunks/anamnesis-summary-card-BKGVcwny.js +350 -0
- package/dist/_chunks/{anamnesis-summary-rows-BWjPUp0m.js → anamnesis-summary-rows-DAIpD0Or.js} +2919 -3002
- package/dist/_chunks/{antenatal-schedule-timeline-u8TsS2QJ.js → antenatal-schedule-timeline-BSLrOQ3S.js} +2 -2
- package/dist/_chunks/{appointment-card-DgKI5QKD.js → appointment-card-kcUC7vWR.js} +2 -2
- package/dist/_chunks/{appointment-timeline-CUijZCxZ.js → appointment-timeline-BC3dlZu5.js} +2 -2
- package/dist/_chunks/{appointment-tray-B1aUk46V.js → appointment-tray-BPY5rATW.js} +2 -2
- package/dist/_chunks/{badge-DCOqV9mI.js → badge-CIt-UFEx.js} +28 -28
- package/dist/_chunks/{bishop-score-Bpe20Ctl.js → bishop-score-B6iYYO0c.js} +3 -3
- package/dist/_chunks/{bmi-calculator-DF5bNsDD.js → bmi-calculator-CxPn0T0s.js} +4 -4
- package/dist/_chunks/{booking-DuSkvE5x.js → booking-CmHX15dh.js} +2 -2
- package/dist/_chunks/{care-plan-card-DiyK3Eys.js → care-plan-card-9tLgsDYY.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-6du8PYVk.js → care-plan-entry-card-CSan4h7A.js} +2 -2
- package/dist/_chunks/{care-plan-header-BWvDvly-.js → care-plan-header-D_BTi77b.js} +2 -2
- package/dist/_chunks/{clinical-note-card-D63x_AkK.js → clinical-note-card-ByzQ86uz.js} +2 -2
- package/dist/_chunks/{connection-status-Bi4Hwpd1.js → connection-status-D8mZ4klk.js} +2 -2
- package/dist/_chunks/{contact-profile-card-CGS_NABR.js → contact-profile-card-DuW6VpzY.js} +2 -2
- package/dist/_chunks/{cycle-calculator-Bd4_fJhq.js → cycle-calculator-D9M7IKfh.js} +3 -3
- package/dist/_chunks/{date-time-picker-DafkGDGO.js → date-time-picker-DVETwpzc.js} +2 -2
- package/dist/_chunks/{dependent-selector-DyFpdzZV.js → dependent-selector-BUvrZRi0.js} +2 -2
- package/dist/_chunks/{document-preview-DuMzmupZ.js → document-preview-Di15VrpQ.js} +2 -2
- package/dist/_chunks/{due-date-calculator-Do67C-Z-.js → due-date-calculator-BkqZEvL4.js} +5 -5
- package/dist/_chunks/{fetal-weight-DHxXx7Uz.js → fetal-weight-C7JXGg6E.js} +3 -3
- package/dist/_chunks/{field-value-C5A4t4OE.js → field-value-BCFLVBmu.js} +2 -2
- package/dist/_chunks/{file-manager-BY6FdHAt.js → file-manager-DzWYcRpE.js} +2 -2
- package/dist/_chunks/form-field-D1oqYisL.js +127 -0
- package/dist/_chunks/{gestational-age-calculator-CMhOtFE_.js → gestational-age-calculator-Ch8vmJAl.js} +5 -5
- package/dist/_chunks/{hcg-doubling-DNG9Q2go.js → hcg-doubling-CFJlMH7Z.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-C8npOgmM.js → link-cell-renderer-DCCca2m3.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-BxOiy25s.js → marketplace-app-shell-BhRH7Zi4.js} +2 -2
- package/dist/_chunks/{notes-panel-BoyzMHI_.js → notes-panel-Bz83SO4-.js} +2 -2
- package/dist/_chunks/{operator-hero-DVy0RGoD.js → operator-hero-CpJkDNAM.js} +2 -2
- package/dist/_chunks/{patient-details-Bf4iTAPp.js → patient-details-CGhnfdUB.js} +2 -2
- package/dist/_chunks/{patient-summary-card-dkV6a53T.js → patient-summary-card-DfbOtOV6.js} +3 -3
- package/dist/_chunks/{patient-table-zifAcsjV.js → patient-table-D2fhV4mV.js} +3 -3
- package/dist/_chunks/{payment-automation-upsell-CZZPGfs0.js → payment-automation-upsell-Ckh3b7Xx.js} +2 -2
- package/dist/_chunks/{payment-request-card-Dy7_DA-2.js → payment-request-card-Dn6-tH-D.js} +2 -2
- package/dist/_chunks/{periodontal-chart-CfFgKXWa.js → periodontal-chart-B0yko9Xm.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card--6yTUsrQ.js → periodontal-chart-card-HbYTmWlo.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-cco40xTa.js → periodontal-diagnosis-Qk4F3Wc_.js} +3 -3
- package/dist/_chunks/{periodontal-risk-chart-bUGkMwDg.js → periodontal-risk-chart-ByKuM4cF.js} +2 -2
- package/dist/_chunks/{practice-results-Mys11x9p.js → practice-results-C5exrEn0.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-t3oM4ZzC.js → pregnancy-dating-iI6_j2K2.js} +5 -5
- package/dist/_chunks/{pregnancy-weight-gain-Bfz7SbIw.js → pregnancy-weight-gain-Co-YFMJZ.js} +4 -4
- package/dist/_chunks/radio-group-BmIqhIT2.js +171 -0
- package/dist/_chunks/{radiograph-panel.agent-DyA4wsZA.js → radiograph-panel.agent-Drj0hYVV.js} +3 -3
- package/dist/_chunks/signature-status-chip-DUcTgQ0E.js +95 -0
- package/dist/_chunks/{tab-bar-BYESZINM.js → tab-bar-Ddp_ZbnL.js} +2 -2
- package/dist/_chunks/{tasks-panel-CoESdfZI.js → tasks-panel-T7vaKJcA.js} +2 -2
- package/dist/_chunks/{time-picker-BPlJWm8w.js → time-picker-D0RS391l.js} +66 -63
- package/dist/_chunks/{unit-converter-lUW9Q888.js → unit-converter-BeTicruA.js} +2 -2
- package/dist/_chunks/{widget-picker-DEmTVuFL.js → widget-picker-DqMbjQy_.js} +2 -2
- package/dist/_chunks/{workflow-map-C5PGP6cD.js → workflow-map-BNBeG2zn.js} +2 -2
- package/dist/agent-catalog.json +22 -28
- package/dist/agent-i18n/en.json +2 -3
- 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/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/badge.d.ts +1 -0
- 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/date-time-picker/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 +6 -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/index.d.ts +1 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/operator-hero/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 +3 -0
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/signature-status-chip/index.d.ts +3 -0
- package/dist/components/signature-status-chip/index.js +6 -0
- package/dist/components/signature-status-chip/signature-status-chip.d.ts +29 -0
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/time-picker/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/i18n/locales/ar.d.ts +16 -0
- package/dist/i18n/locales/ar.js +10 -0
- package/dist/i18n/locales/de.d.ts +16 -0
- package/dist/i18n/locales/de.js +10 -0
- package/dist/i18n/locales/el.d.ts +16 -0
- package/dist/i18n/locales/el.js +10 -0
- package/dist/i18n/locales/en.d.ts +16 -0
- package/dist/i18n/locales/en.js +10 -0
- package/dist/i18n/locales/es.d.ts +16 -0
- package/dist/i18n/locales/es.js +10 -0
- package/dist/i18n/locales/fr.d.ts +16 -0
- package/dist/i18n/locales/fr.js +10 -0
- package/dist/i18n/locales/hi.d.ts +16 -0
- package/dist/i18n/locales/hi.js +10 -0
- package/dist/i18n/locales/it.d.ts +16 -0
- package/dist/i18n/locales/it.js +10 -0
- package/dist/i18n/locales/ja.d.ts +16 -0
- package/dist/i18n/locales/ja.js +10 -0
- package/dist/i18n/locales/nl.d.ts +16 -0
- package/dist/i18n/locales/nl.js +10 -0
- package/dist/i18n/locales/pl.d.ts +16 -0
- package/dist/i18n/locales/pl.js +10 -0
- package/dist/i18n/locales/pt.d.ts +16 -0
- package/dist/i18n/locales/pt.js +10 -0
- package/dist/i18n/locales/ro.d.ts +16 -0
- package/dist/i18n/locales/ro.js +10 -0
- package/dist/i18n/locales/ru.d.ts +16 -0
- package/dist/i18n/locales/ru.js +10 -0
- package/dist/i18n/locales/sq.d.ts +16 -0
- package/dist/i18n/locales/sq.js +10 -0
- package/dist/i18n/locales/sv.d.ts +16 -0
- package/dist/i18n/locales/sv.js +10 -0
- package/dist/i18n/locales/tr.d.ts +16 -0
- package/dist/i18n/locales/tr.js +10 -0
- package/dist/i18n/locales/zh.d.ts +16 -0
- package/dist/i18n/locales/zh.js +10 -0
- package/dist/index.js +261 -258
- package/dist/locales/ar.json +16 -0
- package/dist/locales/de.json +16 -0
- package/dist/locales/el.json +16 -0
- package/dist/locales/en.json +16 -0
- package/dist/locales/es.json +16 -0
- package/dist/locales/fr.json +16 -0
- package/dist/locales/hi.json +16 -0
- package/dist/locales/it.json +16 -0
- package/dist/locales/ja.json +16 -0
- package/dist/locales/nl.json +16 -0
- package/dist/locales/pl.json +16 -0
- package/dist/locales/pt.json +16 -0
- package/dist/locales/ro.json +16 -0
- package/dist/locales/ru.json +16 -0
- package/dist/locales/sq.json +16 -0
- package/dist/locales/sv.json +16 -0
- package/dist/locales/tr.json +16 -0
- package/dist/locales/zh.json +16 -0
- package/dist/patterns/anamnesis/anamnesis-baseline.d.ts +35 -0
- package/dist/patterns/anamnesis/anamnesis-compile.d.ts +4 -1
- package/dist/patterns/anamnesis/anamnesis-evolution-grid.d.ts +15 -9
- package/dist/patterns/anamnesis/anamnesis-evolution.d.ts +24 -12
- package/dist/patterns/anamnesis/anamnesis-matrix.d.ts +6 -2
- package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +4 -1
- package/dist/patterns/anamnesis/anamnesis-readonly.d.ts +4 -1
- package/dist/patterns/anamnesis/anamnesis-source-blocks.d.ts +29 -0
- package/dist/patterns/anamnesis/anamnesis-window.d.ts +6 -5
- package/dist/patterns/anamnesis/anamnesis.d.ts +4 -1
- 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 +1 -1
- package/package.json +5 -1
- package/dist/_chunks/anamnesis-summary-card-CpQViN5l.js +0 -392
- package/dist/_chunks/form-field-M5UpX65Z.js +0 -123
- package/dist/_chunks/radio-group-CI-6SmSw.js +0 -167
- package/dist/patterns/anamnesis/anamnesis-compare-panel.d.ts +0 -86
|
@@ -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-D1oqYisL.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-D-8akw2m.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-CIt-UFEx.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-BQDs2ZMp.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-BQDs2ZMp.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-BTyWsVwT.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-CIt-UFEx.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-gVcoiXxv.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-CIt-UFEx.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-Bt0twrML.js.map
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as te, useId as re, useMemo as E, useImperativeHandle as de } from "react";
|
|
3
|
+
import { c as h } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as ne } from "react-i18next";
|
|
5
|
+
import { B as k } from "./badge-CIt-UFEx.js";
|
|
6
|
+
import { C as b } from "./card-DPmk26CL.js";
|
|
7
|
+
import { S as H } from "./skeleton-CZbwyJAA.js";
|
|
8
|
+
import { a as ie, T as oe } from "./tooltip-DvmfrNvB.js";
|
|
9
|
+
import { u as le } from "./registry-DvAUVLHh.js";
|
|
10
|
+
import { H as P } from "./heart-pulse-BCppJyN2.js";
|
|
11
|
+
const ce = {
|
|
12
|
+
id: "anamnesis-summary-card",
|
|
13
|
+
// The card is read-only: the only handle method is a getSummary
|
|
14
|
+
// projection, so there is no capability to declare.
|
|
15
|
+
capabilities: [],
|
|
16
|
+
state: {
|
|
17
|
+
summary: {
|
|
18
|
+
type: "{ id?: string; sectionCount: number; answerCount: number; highlightedCount: number; unansweredCount: number }",
|
|
19
|
+
descriptionKey: "ui.agent.anamnesisSummaryCard.state.summary",
|
|
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: (r) => r.getSummary()
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
actions: {},
|
|
25
|
+
domHooks: {
|
|
26
|
+
root: {
|
|
27
|
+
attr: "data-component",
|
|
28
|
+
value: "anamnesis-summary-card",
|
|
29
|
+
description: "Marks the AnamnesisSummaryCard root region."
|
|
30
|
+
},
|
|
31
|
+
instanceId: {
|
|
32
|
+
attr: "data-component-id",
|
|
33
|
+
sourceProp: "id",
|
|
34
|
+
description: "Sourced from the id prop."
|
|
35
|
+
},
|
|
36
|
+
item: {
|
|
37
|
+
attr: "data-answer-id",
|
|
38
|
+
description: "One per answer row (KeyValuePair); the value is the intake field key. Highlighted rows also carry data-highlighted."
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}, me = h("ds:w-full ds:text-[color:var(--foreground)]", {
|
|
42
|
+
variants: {
|
|
43
|
+
// Same `surface` vocabulary as PatientSummaryCard / ContactProfileCard.
|
|
44
|
+
// Both surfaces keep the Card chrome — `flat` only drops the shadow.
|
|
45
|
+
surface: {
|
|
46
|
+
flat: "",
|
|
47
|
+
elevated: ""
|
|
48
|
+
},
|
|
49
|
+
density: {
|
|
50
|
+
comfortable: "",
|
|
51
|
+
compact: ""
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
surface: "elevated",
|
|
56
|
+
density: "comfortable"
|
|
57
|
+
}
|
|
58
|
+
}), ue = h("ds:flex ds:flex-col", {
|
|
59
|
+
variants: {
|
|
60
|
+
density: {
|
|
61
|
+
comfortable: "ds:gap-[var(--spacing-lg)]",
|
|
62
|
+
compact: "ds:gap-[var(--spacing-md)]"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: { density: "comfortable" }
|
|
66
|
+
}), ge = h("", {
|
|
67
|
+
variants: {
|
|
68
|
+
density: {
|
|
69
|
+
comfortable: "",
|
|
70
|
+
compact: "ds:p-[var(--spacing-sm)] ds:pb-0"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: { density: "comfortable" }
|
|
74
|
+
}), he = h("", {
|
|
75
|
+
variants: {
|
|
76
|
+
density: {
|
|
77
|
+
comfortable: "",
|
|
78
|
+
compact: "ds:p-[var(--spacing-sm)]"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
defaultVariants: { density: "comfortable" }
|
|
82
|
+
}), pe = h("", {
|
|
83
|
+
variants: {
|
|
84
|
+
density: {
|
|
85
|
+
comfortable: "",
|
|
86
|
+
compact: "ds:p-[var(--spacing-sm)] ds:pt-0"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
defaultVariants: { density: "comfortable" }
|
|
90
|
+
}), fe = /^(\d{4})-(\d{2})-(\d{2})$/, ve = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/, be = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/;
|
|
91
|
+
function ye(r) {
|
|
92
|
+
const l = fe.exec(r);
|
|
93
|
+
if (l)
|
|
94
|
+
return {
|
|
95
|
+
date: new Date(Number(l[1]), Number(l[2]) - 1, Number(l[3])),
|
|
96
|
+
hasTime: !1
|
|
97
|
+
};
|
|
98
|
+
const t = ve.exec(r);
|
|
99
|
+
if (t)
|
|
100
|
+
return {
|
|
101
|
+
date: new Date(
|
|
102
|
+
Number(t[1]),
|
|
103
|
+
Number(t[2]) - 1,
|
|
104
|
+
Number(t[3]),
|
|
105
|
+
Number(t[4]),
|
|
106
|
+
Number(t[5]),
|
|
107
|
+
t[6] ? Number(t[6]) : 0
|
|
108
|
+
),
|
|
109
|
+
hasTime: !0
|
|
110
|
+
};
|
|
111
|
+
const i = new Date(r);
|
|
112
|
+
return Number.isNaN(i.getTime()) ? null : { date: i, hasTime: be.test(r) };
|
|
113
|
+
}
|
|
114
|
+
function R(r, l) {
|
|
115
|
+
const t = ye(r);
|
|
116
|
+
if (!t) return null;
|
|
117
|
+
const i = t.hasTime ? { dateStyle: "medium", timeStyle: "short" } : { dateStyle: "medium" };
|
|
118
|
+
try {
|
|
119
|
+
return new Intl.DateTimeFormat(l, i).format(t.date);
|
|
120
|
+
} catch {
|
|
121
|
+
return new Intl.DateTimeFormat(void 0, i).format(t.date);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const xe = '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]', Ne = "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)] ds:border-s-2 ds:ps-[var(--spacing-sm)]", Ce = "ds:border-[color:var(--border)]", Se = "ds:border-[color:var(--accent)]", y = "type-meta ds:m-0 ds:text-[color:var(--muted-foreground)]", Ae = te(
|
|
125
|
+
({
|
|
126
|
+
sections: r,
|
|
127
|
+
title: l,
|
|
128
|
+
subtitle: t,
|
|
129
|
+
unansweredCount: i = 0,
|
|
130
|
+
locale: D,
|
|
131
|
+
highlightedFirst: C = !0,
|
|
132
|
+
highlightedGroup: M = !0,
|
|
133
|
+
highlightedOnly: m = !1,
|
|
134
|
+
surface: S = "elevated",
|
|
135
|
+
density: c = "comfortable",
|
|
136
|
+
loading: p = !1,
|
|
137
|
+
actionSlot: A,
|
|
138
|
+
id: g,
|
|
139
|
+
className: j,
|
|
140
|
+
"aria-label": $,
|
|
141
|
+
...z
|
|
142
|
+
}, F) => {
|
|
143
|
+
const { t: o, i18n: K } = ne(), q = re(), L = D ?? K.language ?? "en", u = E(
|
|
144
|
+
() => r.filter((e) => e.answers.length > 0).map((e) => ({
|
|
145
|
+
...e,
|
|
146
|
+
answers: C ? [...e.answers].sort(
|
|
147
|
+
(s, d) => +!!d.highlighted - +!!s.highlighted
|
|
148
|
+
) : e.answers
|
|
149
|
+
})),
|
|
150
|
+
[r, C]
|
|
151
|
+
), T = u.reduce(
|
|
152
|
+
(e, s) => e + s.answers.length,
|
|
153
|
+
0
|
|
154
|
+
), f = u.reduce(
|
|
155
|
+
(e, s) => e + s.answers.filter((d) => d.highlighted).length,
|
|
156
|
+
0
|
|
157
|
+
), w = u.length, x = u.flatMap(
|
|
158
|
+
(e) => e.answers.filter((s) => s.highlighted)
|
|
159
|
+
), G = m ? [] : u, O = (e) => {
|
|
160
|
+
const s = e.reportedAtIso ? R(e.reportedAtIso, L) : null, d = [e.sourceLabel, s].filter(
|
|
161
|
+
(v) => !!v
|
|
162
|
+
);
|
|
163
|
+
return d.length > 0 ? d.join(" · ") : null;
|
|
164
|
+
}, N = E(
|
|
165
|
+
() => ({
|
|
166
|
+
getSummary: () => ({
|
|
167
|
+
id: g,
|
|
168
|
+
sectionCount: w,
|
|
169
|
+
answerCount: T,
|
|
170
|
+
highlightedCount: f,
|
|
171
|
+
unansweredCount: i
|
|
172
|
+
})
|
|
173
|
+
}),
|
|
174
|
+
[g, w, T, f, i]
|
|
175
|
+
);
|
|
176
|
+
de(F, () => N, [N]), le(ce, N, g);
|
|
177
|
+
const U = o("anamnesisSummaryCard.regionLabel", {
|
|
178
|
+
defaultValue: "Anamnesis summary"
|
|
179
|
+
}), V = l ?? U, Y = $ ?? V, _ = o("anamnesisSummaryCard.highlighted", {
|
|
180
|
+
defaultValue: "Highlighted"
|
|
181
|
+
}), 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, d = s && e.sourceLabel ? o("anamnesisSummaryCard.reportedOnFrom", {
|
|
183
|
+
date: s,
|
|
184
|
+
source: e.sourceLabel,
|
|
185
|
+
defaultValue: "Highlighted on {{date}} · {{source}}"
|
|
186
|
+
}) : s ? o("anamnesisSummaryCard.reportedOn", {
|
|
187
|
+
date: s,
|
|
188
|
+
defaultValue: "Highlighted on {{date}}"
|
|
189
|
+
}) : _;
|
|
190
|
+
return /* @__PURE__ */ a(oe, { label: d, side: "top", children: /* @__PURE__ */ a(
|
|
191
|
+
"button",
|
|
192
|
+
{
|
|
193
|
+
type: "button",
|
|
194
|
+
className: xe,
|
|
195
|
+
"data-highlighted-chip": "",
|
|
196
|
+
children: /* @__PURE__ */ a(
|
|
197
|
+
k,
|
|
198
|
+
{
|
|
199
|
+
variant: "accentSoft",
|
|
200
|
+
size: "sm",
|
|
201
|
+
"aria-label": _,
|
|
202
|
+
leading: /* @__PURE__ */ a(P, { "aria-hidden": "true" })
|
|
203
|
+
}
|
|
204
|
+
)
|
|
205
|
+
}
|
|
206
|
+
) });
|
|
207
|
+
}, X = /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-wrap ds:items-start ds:gap-[var(--spacing-sm)]", children: [
|
|
208
|
+
/* @__PURE__ */ n("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
209
|
+
/* @__PURE__ */ a(
|
|
210
|
+
"h3",
|
|
211
|
+
{
|
|
212
|
+
id: q,
|
|
213
|
+
className: `ds:m-0 ${J} ds:text-[color:var(--foreground)]`,
|
|
214
|
+
children: V
|
|
215
|
+
}
|
|
216
|
+
),
|
|
217
|
+
t ? /* @__PURE__ */ a("p", { className: y, children: t }) : null
|
|
218
|
+
] }),
|
|
219
|
+
!p && f > 0 ? /* @__PURE__ */ a(
|
|
220
|
+
k,
|
|
221
|
+
{
|
|
222
|
+
variant: "accentSoft",
|
|
223
|
+
size: "sm",
|
|
224
|
+
leading: /* @__PURE__ */ a(P, { "aria-hidden": "true" }),
|
|
225
|
+
className: "ds:shrink-0",
|
|
226
|
+
children: o("anamnesisSummaryCard.highlightedCount", {
|
|
227
|
+
count: f,
|
|
228
|
+
defaultValue: "{{count}} highlighted"
|
|
229
|
+
})
|
|
230
|
+
}
|
|
231
|
+
) : null,
|
|
232
|
+
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__ */ n("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
234
|
+
/* @__PURE__ */ a(H, { variant: "text", width: "40%" }),
|
|
235
|
+
/* @__PURE__ */ a(H, { variant: "text", lines: 4 })
|
|
236
|
+
] }), ee = /* @__PURE__ */ a("p", { className: y, children: o("anamnesisSummaryCard.empty", {
|
|
237
|
+
defaultValue: "No answers recorded yet"
|
|
238
|
+
}) }), I = [
|
|
239
|
+
"ds:m-0 ds:grid ds:grid-cols-1 ds:@[672px]/afields:grid-cols-2",
|
|
240
|
+
"ds:gap-x-[var(--spacing-lg)]",
|
|
241
|
+
Q === "md" ? "ds:gap-y-[var(--spacing-md)]" : "ds:gap-y-[var(--spacing-sm)]"
|
|
242
|
+
].join(" "), B = (e, s) => {
|
|
243
|
+
const d = s.chip && e.highlighted, v = s.recorded ? O(e) : null;
|
|
244
|
+
return /* @__PURE__ */ n(
|
|
245
|
+
"div",
|
|
246
|
+
{
|
|
247
|
+
"data-answer-id": e.id,
|
|
248
|
+
"data-highlighted": e.highlighted ? "" : void 0,
|
|
249
|
+
className: [
|
|
250
|
+
Ne,
|
|
251
|
+
s.accentBar || d ? Se : Ce
|
|
252
|
+
].join(" "),
|
|
253
|
+
children: [
|
|
254
|
+
/* @__PURE__ */ n("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: [
|
|
255
|
+
d ? W(e) : null,
|
|
256
|
+
/* @__PURE__ */ a("span", { children: e.label })
|
|
257
|
+
] }),
|
|
258
|
+
/* @__PURE__ */ n("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: [
|
|
259
|
+
/* @__PURE__ */ n("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
|
+
/* @__PURE__ */ a("span", { children: e.value }),
|
|
261
|
+
e.unit ? /* @__PURE__ */ a("span", { className: "ds:text-[color:var(--muted-foreground)]", children: e.unit }) : null
|
|
262
|
+
] }),
|
|
263
|
+
v ? /* @__PURE__ */ a("span", { className: y, children: v }) : null
|
|
264
|
+
] })
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
`${s.keyPrefix}${e.id}`
|
|
268
|
+
);
|
|
269
|
+
}, ae = /* @__PURE__ */ n(
|
|
270
|
+
"div",
|
|
271
|
+
{
|
|
272
|
+
role: "group",
|
|
273
|
+
"aria-label": o("anamnesisSummaryCard.sectionsLabel", {
|
|
274
|
+
defaultValue: "Anamnesis sections"
|
|
275
|
+
}),
|
|
276
|
+
className: ue({ density: c }),
|
|
277
|
+
children: [
|
|
278
|
+
(M || m) && x.length > 0 ? /* @__PURE__ */ n(
|
|
279
|
+
"div",
|
|
280
|
+
{
|
|
281
|
+
"data-highlighted-group": "",
|
|
282
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
283
|
+
children: [
|
|
284
|
+
m ? null : /* @__PURE__ */ a("h4", { className: "type-label ds:m-0 ds:font-semibold ds:text-[color:var(--foreground)]", children: o("anamnesisSummaryCard.highlightedGroup", {
|
|
285
|
+
defaultValue: "Highlighted answers"
|
|
286
|
+
}) }),
|
|
287
|
+
/* @__PURE__ */ a("div", { className: "ds:@container/afields", children: /* @__PURE__ */ a("dl", { className: I, children: x.map(
|
|
288
|
+
(e) => B(e, {
|
|
289
|
+
recorded: !0,
|
|
290
|
+
chip: !1,
|
|
291
|
+
accentBar: !0,
|
|
292
|
+
keyPrefix: "highlighted-"
|
|
293
|
+
})
|
|
294
|
+
) }) })
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
) : null,
|
|
298
|
+
G.map((e) => /* @__PURE__ */ n(
|
|
299
|
+
"div",
|
|
300
|
+
{
|
|
301
|
+
"data-section-id": e.id,
|
|
302
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
303
|
+
children: [
|
|
304
|
+
/* @__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: I, children: e.answers.map(
|
|
306
|
+
(s) => B(s, {
|
|
307
|
+
recorded: !1,
|
|
308
|
+
chip: !0,
|
|
309
|
+
accentBar: !1,
|
|
310
|
+
keyPrefix: ""
|
|
311
|
+
})
|
|
312
|
+
) }) })
|
|
313
|
+
]
|
|
314
|
+
},
|
|
315
|
+
e.id
|
|
316
|
+
))
|
|
317
|
+
]
|
|
318
|
+
}
|
|
319
|
+
), se = p ? Z : u.length === 0 || m && x.length === 0 ? ee : ae;
|
|
320
|
+
return /* @__PURE__ */ a(
|
|
321
|
+
"div",
|
|
322
|
+
{
|
|
323
|
+
role: "region",
|
|
324
|
+
"aria-label": Y,
|
|
325
|
+
"aria-busy": p || void 0,
|
|
326
|
+
"data-component": "anamnesis-summary-card",
|
|
327
|
+
"data-component-id": g,
|
|
328
|
+
"data-density": c,
|
|
329
|
+
"data-highlighted-only": m ? "" : void 0,
|
|
330
|
+
id: g,
|
|
331
|
+
className: me({ surface: S, density: c, className: j }),
|
|
332
|
+
...z,
|
|
333
|
+
children: /* @__PURE__ */ n(b, { variant: S === "flat" ? "outlined" : "elevated", children: [
|
|
334
|
+
/* @__PURE__ */ a(b.Header, { className: ge({ density: c }), children: X }),
|
|
335
|
+
/* @__PURE__ */ a(ie, { children: /* @__PURE__ */ a(b.Body, { className: he({ density: c }), children: se }) }),
|
|
336
|
+
!p && !m && i > 0 ? /* @__PURE__ */ a(b.Footer, { className: pe({ density: c }), children: /* @__PURE__ */ a("p", { className: y, children: o("anamnesisSummaryCard.unanswered", {
|
|
337
|
+
count: i,
|
|
338
|
+
defaultValue: "{{count}} questions not answered"
|
|
339
|
+
}) }) }) : null
|
|
340
|
+
] })
|
|
341
|
+
}
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
);
|
|
345
|
+
Ae.displayName = "AnamnesisSummaryCard";
|
|
346
|
+
export {
|
|
347
|
+
Ae as A,
|
|
348
|
+
ce as a
|
|
349
|
+
};
|
|
350
|
+
//# sourceMappingURL=anamnesis-summary-card-BKGVcwny.js.map
|