@alfadocs/ui-kit 1.3.13 → 1.4.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.agent-Cb5tuEh3.js +28 -0
- package/dist/_chunks/{alia-sidebar-DzNz1gDf.js → alia-sidebar-DSBZMick.js} +3 -3
- package/dist/_chunks/{anamnesis-i18n-CfC0qYzy.js → anamnesis-i18n-BA631X4t.js} +2209 -2144
- package/dist/_chunks/{antenatal-schedule-timeline-BMMpi2lb.js → antenatal-schedule-timeline-u8TsS2QJ.js} +27 -26
- package/dist/_chunks/{appointment-timeline-B630OT_J.js → appointment-timeline-Bqf1sTU5.js} +2 -2
- package/dist/_chunks/{ar-THMLfSoN.js → ar-BR1FGFP2.js} +14 -14
- package/dist/_chunks/{bmi-calculator-CM0-G2mg.js → bmi-calculator-CpyY13MV.js} +2 -2
- package/dist/_chunks/{booking-DjNbd7C1.js → booking-BjsA7j1-.js} +699 -688
- package/dist/_chunks/calculator-dialog-12d3Sxaz.js +48 -0
- package/dist/_chunks/{care-plan-card-1G_f4I5s.js → care-plan-card-BvQy366X.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-DmBsffHS.js → care-plan-entry-card-apk_5B3O.js} +2 -2
- package/dist/_chunks/{chat-container-HlFnoEIl.js → chat-container-CYYego1W.js} +105 -81
- package/dist/_chunks/cycle-calculator-B7fyH-h4.js +425 -0
- package/dist/_chunks/{date-picker-ZHejTVAJ.js → date-picker-Bp64zk2p.js} +19 -19
- package/dist/_chunks/date-picker-variants-pKAJfnWr.js +2089 -0
- package/dist/_chunks/{date-range-picker-pEG3Ln3i.js → date-range-picker-CDrZ8Zh0.js} +27 -27
- package/dist/_chunks/{date-time-picker-695QvBGj.js → date-time-picker-DafkGDGO.js} +10 -10
- package/dist/_chunks/{de-DmZ-8rTN.js → de-3iM4rGqo.js} +7 -7
- package/dist/_chunks/{document-preview-D3gg4MXB.js → document-preview-DOrsqiN1.js} +2 -2
- package/dist/_chunks/due-date-calculator-CnkbbAej.js +571 -0
- package/dist/_chunks/{editor-overlay-DE3esyio.js → editor-overlay-B1tr2i7B.js} +22 -21
- package/dist/_chunks/{el-Bela9mxs.js → el-C96rGJvU.js} +2 -2
- package/dist/_chunks/{es-BNncHKex.js → es-Cxiqjx8r.js} +12 -12
- package/dist/_chunks/fetal-weight-avlj-l-S.js +223 -0
- package/dist/_chunks/format-4HNwNGrN.js +1315 -0
- package/dist/_chunks/{fr-CH8ADfhN.js → fr-Bhr6SYKj.js} +21 -21
- package/dist/_chunks/{freemium-paywall-C_Ue6wxU.js → freemium-paywall-DRDdWuOg.js} +3 -3
- package/dist/_chunks/gestational-age-calculator-BljY_DVJ.js +488 -0
- package/dist/_chunks/hcg-doubling-Cv_vH61p.js +312 -0
- package/dist/_chunks/header-settings-Cn5fPXCE.js +335 -0
- package/dist/_chunks/{hi-Bppfxp8l.js → hi-BxXX26d_.js} +12 -12
- package/dist/_chunks/isSameWeek-B73MagWB.js +13 -0
- package/dist/_chunks/{it-B4ySaRyK.js → it-Xmjomvyj.js} +24 -24
- package/dist/_chunks/{ja-CGF6Io9P.js → ja-mfZvt1ZV.js} +16 -16
- package/dist/_chunks/{link-cell-renderer-C5XLwVXQ.js → link-cell-renderer-CJ_gk7gl.js} +3 -3
- package/dist/_chunks/{locale-picker-BfBUdT1m.js → locale-picker-D9Kv2zrK.js} +153 -132
- package/dist/_chunks/map-view-2yZCQW2l.js +445 -0
- package/dist/_chunks/{marketplace-app-shell-DwcFMxzp.js → marketplace-app-shell-BLRvg-M0.js} +49 -40
- package/dist/_chunks/{nl-DuShqwuV.js → nl-DDs-KEnD.js} +15 -15
- package/dist/_chunks/{notes-panel-DPsgB4Mv.js → notes-panel-CiFN3sLW.js} +2 -2
- package/dist/_chunks/{number-input-DrozbZAU.js → number-input-DOe5VYei.js} +64 -64
- package/dist/_chunks/{optical-prescription-BDHJr8Zz.js → optical-prescription-CRemE8fL.js} +2 -2
- package/dist/_chunks/{parse-DvA97ro9.js → parse-JqixfsU0.js} +43 -43
- package/dist/_chunks/parseISO-fOGpHKXm.js +120 -0
- package/dist/_chunks/{patient-details-DqjjwPmt.js → patient-details-CpunD0qx.js} +3 -3
- package/dist/_chunks/{patient-table-BmIDrLIS.js → patient-table-2eWx-Rrk.js} +2 -2
- package/dist/_chunks/{payment-form-h-BZ8onk.js → payment-form-Ds1I9KqB.js} +308 -231
- package/dist/_chunks/{pdf-viewer-Ddx-T053.js → pdf-viewer-DUIsV9s5.js} +429 -369
- package/dist/_chunks/{pl-CKQwX9Fk.js → pl-BYYMnEWP.js} +18 -18
- package/dist/_chunks/{practice-results-B-HPc13W.js → practice-results-SjCniMd2.js} +2 -2
- package/dist/_chunks/pregnancy-dating-BmpHScZ0.js +770 -0
- package/dist/_chunks/pregnancy-weight-gain-B5KSJzdc.js +553 -0
- package/dist/_chunks/progress-CK8otcQ-.js +343 -0
- package/dist/_chunks/{pt-_njpXyOZ.js → pt-BSPnVrQ7.js} +20 -20
- package/dist/_chunks/{radiograph-panel.agent-BQZ64Riy.js → radiograph-panel.agent-CtFtNMzk.js} +3 -3
- package/dist/_chunks/{rich-text-editor-CfeXPPWs.js → rich-text-editor-BedTpWzL.js} +2 -2
- package/dist/_chunks/{ro-3X6_4FcN.js → ro-BbiylGmG.js} +14 -14
- package/dist/_chunks/{ru-bAcgmnS-.js → ru-BX_qsV67.js} +14 -14
- package/dist/_chunks/{session-countdown-Bc70VXN1.js → session-countdown-BL-Psg8u.js} +2 -2
- package/dist/_chunks/{sign-document-CW_ByDUh.js → sign-document-jF4fZDJ5.js} +2 -2
- package/dist/_chunks/slot-grid-DNiUcXy2.js +640 -0
- package/dist/_chunks/{sparkline-BTY4B5tv.js → sparkline-BmGcEyZO.js} +209 -164
- package/dist/_chunks/{sq-jYFqr4Ga.js → sq-i9UOk4P7.js} +10 -10
- package/dist/_chunks/subDays-CAUv47M1.js +8 -0
- package/dist/_chunks/{sv-BSGEJ-8B.js → sv-CpTdtmDQ.js} +8 -8
- package/dist/_chunks/{tab-bar-Axhk6xzx.js → tab-bar-BYESZINM.js} +83 -77
- package/dist/_chunks/task-card.agent-CF2N_uu4.js +29 -0
- package/dist/_chunks/{tr-CTpgUtw6.js → tr-DXG2QN1K.js} +17 -17
- package/dist/_chunks/{unit-converter-COgkN7YP.js → unit-converter-CHPDuV7W.js} +2 -2
- package/dist/_chunks/{warning-stack-BtjmJChC.js → warning-stack-B7t_8jRE.js} +42 -37
- package/dist/_chunks/{zh-CN-BgM0Io2O.js → zh-CN-vPkPEK6H.js} +18 -18
- package/dist/agent-catalog.json +6426 -3382
- package/dist/agent-i18n/en.json +234 -15
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +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/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/chat-container/chat-container.d.ts +14 -0
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.agent.d.ts +4 -0
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +42 -0
- package/dist/components/cycle-calculator/index.d.ts +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.agent.d.ts +4 -0
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +61 -1
- package/dist/components/due-date-calculator/index.d.ts +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editor-overlay/editor-overlay.d.ts +7 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/fetal-weight/fetal-weight.agent.d.ts +4 -0
- package/dist/components/fetal-weight/fetal-weight.d.ts +26 -0
- package/dist/components/fetal-weight/index.d.ts +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.agent.d.ts +4 -0
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +44 -2
- package/dist/components/gestational-age-calculator/index.d.ts +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/hcg-doubling.agent.d.ts +4 -0
- package/dist/components/hcg-doubling/hcg-doubling.d.ts +30 -0
- package/dist/components/hcg-doubling/index.d.ts +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts +13 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/locale-picker/locale-picker.d.ts +9 -0
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +22 -0
- 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 +2 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-form/index.d.ts +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/payment-form/payment-form.d.ts +32 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts +13 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.d.ts +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-dating/pregnancy-dating.agent.d.ts +4 -0
- package/dist/components/pregnancy-dating/pregnancy-dating.d.ts +65 -1
- package/dist/components/pregnancy-weight-gain/index.d.ts +2 -1
- package/dist/components/pregnancy-weight-gain/index.js +6 -5
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.agent.d.ts +4 -0
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +35 -0
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/progress.d.ts +13 -0
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/slot-grid/index.d.ts +2 -1
- package/dist/components/slot-grid/index.js +5 -4
- package/dist/components/slot-grid/slot-grid.agent.d.ts +4 -0
- package/dist/components/slot-grid/slot-grid.d.ts +34 -0
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts +10 -0
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +13 -0
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/index.js +630 -627
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/anamnesis-derive.d.ts +27 -8
- package/dist/patterns/anamnesis/anamnesis-format.d.ts +11 -3
- package/dist/patterns/anamnesis/anamnesis-highlight.d.ts +6 -0
- package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +23 -9
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +7 -0
- package/dist/patterns/anamnesis/anamnesis.d.ts +16 -7
- package/dist/patterns/anamnesis/index.d.ts +3 -2
- package/dist/patterns/anamnesis/index.js +7 -6
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +6 -0
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/agenda-card.agent-mTCrkKSZ.js +0 -27
- package/dist/_chunks/calculator-dialog-DuXMQSdm.js +0 -40
- package/dist/_chunks/cycle-calculator-BwqYVPB4.js +0 -252
- package/dist/_chunks/date-picker-variants-eL6HjWvw.js +0 -3363
- package/dist/_chunks/due-date-calculator-CwfsFd3T.js +0 -256
- package/dist/_chunks/fetal-weight-ePlLjJPc.js +0 -122
- package/dist/_chunks/gestational-age-calculator-DdgbH69Z.js +0 -311
- package/dist/_chunks/hcg-doubling-BBqD2wI2.js +0 -170
- package/dist/_chunks/header-settings--pjYOe6g.js +0 -284
- package/dist/_chunks/isSameDay-DUEiAT0G.js +0 -39
- package/dist/_chunks/isSameWeek-CK4HS9lH.js +0 -14
- package/dist/_chunks/map-view-CsaHfoo6.js +0 -378
- package/dist/_chunks/pregnancy-dating-DzYTlBkT.js +0 -421
- package/dist/_chunks/pregnancy-weight-gain-O6J0sUIi.js +0 -322
- package/dist/_chunks/progress-DA413-zn.js +0 -299
- package/dist/_chunks/slot-grid-CQSULZjd.js +0 -502
- package/dist/_chunks/subDays-BcNi04uf.js +0 -8
- package/dist/_chunks/task-card.agent-Bt14CzUd.js +0 -25
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as q, useState as c, useMemo as u, useEffect as J } from "react";
|
|
3
|
-
import { c as Q } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as W } from "react-i18next";
|
|
5
|
-
import { R as m } from "./radio-TWf9Q-mp.js";
|
|
6
|
-
import { R as T } from "./radio-group-CI-6SmSw.js";
|
|
7
|
-
import { F as g } from "./form-field-M5UpX65Z.js";
|
|
8
|
-
import { D as b } from "./date-picker-ZHejTVAJ.js";
|
|
9
|
-
import { N as S } from "./number-input-DrozbZAU.js";
|
|
10
|
-
import { C as k } from "./card-DPmk26CL.js";
|
|
11
|
-
import { B } from "./badge-DCOqV9mI.js";
|
|
12
|
-
import { I as X } from "./insert-result-D074GtHX.js";
|
|
13
|
-
import { D as y, r as Z, c as ee, e as ae, f as te, A as le, h as re, i as se } from "./antenatal-schedule-timeline-BMMpi2lb.js";
|
|
14
|
-
const de = Q("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
15
|
-
variants: {
|
|
16
|
-
width: { full: "ds:w-full", auto: "ds:inline-flex" }
|
|
17
|
-
},
|
|
18
|
-
defaultVariants: { width: "full" }
|
|
19
|
-
}), oe = {
|
|
20
|
-
lmp: "dueDateCalculator.lmpDate",
|
|
21
|
-
conception: "dueDateCalculator.conceptionDate",
|
|
22
|
-
ivf: "dueDateCalculator.transferDate"
|
|
23
|
-
}, ce = q(
|
|
24
|
-
({
|
|
25
|
-
defaultMethod: F = "lmp",
|
|
26
|
-
onResultChange: p,
|
|
27
|
-
onInsert: x,
|
|
28
|
-
insertVariant: N = "insert",
|
|
29
|
-
onCopy: I,
|
|
30
|
-
onError: $,
|
|
31
|
-
insertBrand: R,
|
|
32
|
-
showSchedule: A = !1,
|
|
33
|
-
scheduleOptions: L,
|
|
34
|
-
id: _,
|
|
35
|
-
width: H,
|
|
36
|
-
className: M
|
|
37
|
-
}, O) => {
|
|
38
|
-
const { t: e, i18n: w } = W(), [r, V] = c(F), [o, z] = c(void 0), [v, G] = c(
|
|
39
|
-
y
|
|
40
|
-
), [C, j] = c(5), [D, Y] = c(null), [f, K] = c(void 0), E = u(() => /* @__PURE__ */ new Date(), []), [n, P] = c(() => /* @__PURE__ */ new Date()), l = u(() => r !== "lmp" || !o || D === null || !f ? null : Z({ lmp: o, scanDate: f, crlMm: D }), [r, o, D, f]), t = u(() => {
|
|
41
|
-
if (!o) return null;
|
|
42
|
-
const d = r === "lmp" && (l != null && l.redated) ? l.gestationalStart : o, U = r === "lmp" && (l != null && l.redated) ? y : v ?? y;
|
|
43
|
-
return ee(
|
|
44
|
-
{
|
|
45
|
-
method: r,
|
|
46
|
-
date: d,
|
|
47
|
-
cycleLength: U,
|
|
48
|
-
embryoAge: C
|
|
49
|
-
},
|
|
50
|
-
n
|
|
51
|
-
);
|
|
52
|
-
}, [r, o, v, C, l, n]), i = u(
|
|
53
|
-
() => new Intl.DateTimeFormat(w.language, { dateStyle: "long" }),
|
|
54
|
-
[w.language]
|
|
55
|
-
);
|
|
56
|
-
J(() => {
|
|
57
|
-
p == null || p(t);
|
|
58
|
-
}, [t, p]);
|
|
59
|
-
const h = u(() => !A || !t ? null : ae(t.gestationalStart, {
|
|
60
|
-
...L,
|
|
61
|
-
today: n
|
|
62
|
-
}), [A, t, n, L]);
|
|
63
|
-
return /* @__PURE__ */ s(
|
|
64
|
-
"div",
|
|
65
|
-
{
|
|
66
|
-
ref: O,
|
|
67
|
-
"data-component": "due-date-calculator",
|
|
68
|
-
"data-component-id": _,
|
|
69
|
-
className: de({ width: H, className: M }),
|
|
70
|
-
children: [
|
|
71
|
-
/* @__PURE__ */ s(
|
|
72
|
-
T,
|
|
73
|
-
{
|
|
74
|
-
label: e("dueDateCalculator.method.label"),
|
|
75
|
-
variant: "horizontal",
|
|
76
|
-
value: r,
|
|
77
|
-
onValueChange: (d) => V(d),
|
|
78
|
-
children: [
|
|
79
|
-
/* @__PURE__ */ a(m, { label: e("dueDateCalculator.method.lmp"), value: "lmp" }),
|
|
80
|
-
/* @__PURE__ */ a(
|
|
81
|
-
m,
|
|
82
|
-
{
|
|
83
|
-
label: e("dueDateCalculator.method.conception"),
|
|
84
|
-
value: "conception"
|
|
85
|
-
}
|
|
86
|
-
),
|
|
87
|
-
/* @__PURE__ */ a(m, { label: e("dueDateCalculator.method.ivf"), value: "ivf" })
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
/* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
92
|
-
/* @__PURE__ */ a(g, { label: e(oe[r]), children: /* @__PURE__ */ a(b, { value: o, onChange: z, maxDate: E }) }),
|
|
93
|
-
r === "lmp" && /* @__PURE__ */ a(
|
|
94
|
-
g,
|
|
95
|
-
{
|
|
96
|
-
label: e("dueDateCalculator.cycleLength"),
|
|
97
|
-
description: e("dueDateCalculator.cycleLengthHint"),
|
|
98
|
-
children: /* @__PURE__ */ a(
|
|
99
|
-
S,
|
|
100
|
-
{
|
|
101
|
-
mode: "integer",
|
|
102
|
-
min: 20,
|
|
103
|
-
max: 45,
|
|
104
|
-
value: v,
|
|
105
|
-
onChange: G
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
),
|
|
110
|
-
r === "ivf" && /* @__PURE__ */ s(
|
|
111
|
-
T,
|
|
112
|
-
{
|
|
113
|
-
label: e("dueDateCalculator.embryoAge"),
|
|
114
|
-
variant: "horizontal",
|
|
115
|
-
value: String(C),
|
|
116
|
-
onValueChange: (d) => j(Number(d)),
|
|
117
|
-
children: [
|
|
118
|
-
/* @__PURE__ */ a(m, { label: e("dueDateCalculator.day3"), value: "3" }),
|
|
119
|
-
/* @__PURE__ */ a(m, { label: e("dueDateCalculator.day5"), value: "5" })
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
] }),
|
|
124
|
-
/* @__PURE__ */ a(
|
|
125
|
-
g,
|
|
126
|
-
{
|
|
127
|
-
label: e("dueDateCalculator.asOfDate"),
|
|
128
|
-
description: e("dueDateCalculator.asOfDateHint"),
|
|
129
|
-
children: /* @__PURE__ */ a(b, { value: n, onChange: (d) => d && P(d) })
|
|
130
|
-
}
|
|
131
|
-
),
|
|
132
|
-
r === "lmp" ? /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
133
|
-
/* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
134
|
-
/* @__PURE__ */ a(
|
|
135
|
-
g,
|
|
136
|
-
{
|
|
137
|
-
label: e("dueDateCalculator.crl"),
|
|
138
|
-
description: e("dueDateCalculator.crlHint"),
|
|
139
|
-
children: /* @__PURE__ */ a(
|
|
140
|
-
S,
|
|
141
|
-
{
|
|
142
|
-
mode: "decimal",
|
|
143
|
-
min: 0,
|
|
144
|
-
step: 0.1,
|
|
145
|
-
value: D,
|
|
146
|
-
onChange: Y
|
|
147
|
-
}
|
|
148
|
-
)
|
|
149
|
-
}
|
|
150
|
-
),
|
|
151
|
-
/* @__PURE__ */ a(g, { label: e("dueDateCalculator.scanDate"), children: /* @__PURE__ */ a(
|
|
152
|
-
b,
|
|
153
|
-
{
|
|
154
|
-
value: f,
|
|
155
|
-
onChange: K,
|
|
156
|
-
maxDate: E
|
|
157
|
-
}
|
|
158
|
-
) })
|
|
159
|
-
] }),
|
|
160
|
-
l ? /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
161
|
-
/* @__PURE__ */ a(B, { variant: l.redated ? "warning" : "success", children: l.redated ? e("dueDateCalculator.redated", {
|
|
162
|
-
days: l.discrepancyDays
|
|
163
|
-
}) : e("dueDateCalculator.datesAgree") }),
|
|
164
|
-
l.crlInRange ? null : /* @__PURE__ */ a("span", { className: "type-meta ds:text-muted-foreground", children: e("dueDateCalculator.crlOutOfRange") })
|
|
165
|
-
] }) : null
|
|
166
|
-
] }) : null,
|
|
167
|
-
/* @__PURE__ */ a("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: t ? `${e("dueDateCalculator.result.dueDateLabel")}: ${i.format(
|
|
168
|
-
t.dueDate
|
|
169
|
-
)}. ${e("dueDateCalculator.result.trimesterLabel")}: ${e(
|
|
170
|
-
`dueDateCalculator.trimester.${t.trimester}`
|
|
171
|
-
)}.` : "" }),
|
|
172
|
-
t ? /* @__PURE__ */ a(k, { variant: "elevated", children: /* @__PURE__ */ a(k.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: /* @__PURE__ */ s("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
|
|
173
|
-
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
|
|
174
|
-
/* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("dueDateCalculator.result.trimesterLabel") }),
|
|
175
|
-
/* @__PURE__ */ a("dd", { children: /* @__PURE__ */ a(
|
|
176
|
-
B,
|
|
177
|
-
{
|
|
178
|
-
variant: te[t.trimester],
|
|
179
|
-
size: "lg",
|
|
180
|
-
children: e(`dueDateCalculator.trimester.${t.trimester}`)
|
|
181
|
-
}
|
|
182
|
-
) })
|
|
183
|
-
] }),
|
|
184
|
-
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
185
|
-
/* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("dueDateCalculator.result.gestationLabel") }),
|
|
186
|
-
/* @__PURE__ */ a("dd", { className: "type-body ds:text-foreground", children: t.gestationalAge ? e("dueDateCalculator.result.gestation", {
|
|
187
|
-
weeks: t.gestationalAge.weeks,
|
|
188
|
-
days: t.gestationalAge.days
|
|
189
|
-
}) : "—" })
|
|
190
|
-
] }),
|
|
191
|
-
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
192
|
-
/* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("dueDateCalculator.result.dueDateLabel") }),
|
|
193
|
-
/* @__PURE__ */ a("dd", { className: "type-metric ds:text-foreground", children: i.format(t.dueDate) })
|
|
194
|
-
] })
|
|
195
|
-
] }) }) }) : /* @__PURE__ */ a("p", { className: "type-body ds:text-muted-foreground", children: e("dueDateCalculator.empty") }),
|
|
196
|
-
h ? /* @__PURE__ */ a(le, { events: h }) : null,
|
|
197
|
-
t && (N === "copy" || x) ? /* @__PURE__ */ a(
|
|
198
|
-
X,
|
|
199
|
-
{
|
|
200
|
-
variant: N,
|
|
201
|
-
onInsert: x,
|
|
202
|
-
onCopy: I,
|
|
203
|
-
onError: $,
|
|
204
|
-
card: {
|
|
205
|
-
title: e("insert.title.dueDate"),
|
|
206
|
-
icon: "calendar-heart",
|
|
207
|
-
highlight: i.format(t.dueDate),
|
|
208
|
-
// Chip tinted with the trimester's semantic token so the inserted
|
|
209
|
-
// PNG carries the same clinical-stage colour as the on-screen
|
|
210
|
-
// trimester badge — with the contrast-safe orange override for the
|
|
211
|
-
// `--warning` third trimester.
|
|
212
|
-
highlightToken: se(t.trimester),
|
|
213
|
-
brand: R,
|
|
214
|
-
fields: [
|
|
215
|
-
{
|
|
216
|
-
// The estimated date of delivery → calendar glyph.
|
|
217
|
-
icon: "calendar",
|
|
218
|
-
label: e("dueDateCalculator.result.dueDateLabel"),
|
|
219
|
-
value: i.format(t.dueDate)
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
// Gestational age is an elapsed duration → clock glyph.
|
|
223
|
-
icon: "clock",
|
|
224
|
-
label: e("dueDateCalculator.result.gestationLabel"),
|
|
225
|
-
value: t.gestationalAge ? e("dueDateCalculator.result.gestation", {
|
|
226
|
-
weeks: t.gestationalAge.weeks,
|
|
227
|
-
days: t.gestationalAge.days
|
|
228
|
-
}) : "—"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
// Trimester is a clinical-stage classification → tag.
|
|
232
|
-
icon: "tag",
|
|
233
|
-
label: e("dueDateCalculator.result.trimesterLabel"),
|
|
234
|
-
value: e(`dueDateCalculator.trimester.${t.trimester}`)
|
|
235
|
-
},
|
|
236
|
-
// When the schedule is shown, the single Insert button carries
|
|
237
|
-
// the exam windows too (no second button).
|
|
238
|
-
...h ? re(
|
|
239
|
-
h,
|
|
240
|
-
e,
|
|
241
|
-
(d) => i.format(d)
|
|
242
|
-
) : []
|
|
243
|
-
]
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
) : null
|
|
247
|
-
]
|
|
248
|
-
}
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
|
-
);
|
|
252
|
-
ce.displayName = "DueDateCalculator";
|
|
253
|
-
export {
|
|
254
|
-
ce as D
|
|
255
|
-
};
|
|
256
|
-
//# sourceMappingURL=due-date-calculator-CwfsFd3T.js.map
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as T, useState as g, useMemo as W, useEffect as j } from "react";
|
|
3
|
-
import { c as V } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as A } from "react-i18next";
|
|
5
|
-
import { F as D } from "./form-field-M5UpX65Z.js";
|
|
6
|
-
import { N as E } from "./number-input-DrozbZAU.js";
|
|
7
|
-
import { C as N } from "./card-DPmk26CL.js";
|
|
8
|
-
import { B as H } from "./badge-DCOqV9mI.js";
|
|
9
|
-
import { I as S } from "./insert-result-D074GtHX.js";
|
|
10
|
-
function h(l) {
|
|
11
|
-
return typeof l == "number" && Number.isFinite(l) && l > 0 ? l / 10 : null;
|
|
12
|
-
}
|
|
13
|
-
function q(l) {
|
|
14
|
-
const n = h(l.bpdMm), r = h(l.hcMm), s = h(l.acMm), d = h(l.flMm);
|
|
15
|
-
if (s === null || d === null) return null;
|
|
16
|
-
let o, c;
|
|
17
|
-
return n !== null && r !== null ? (o = 1.3596 - 386e-5 * s * d + 64e-4 * r + 61e-5 * n * s + 0.0424 * s + 0.174 * d, c = "hadlock4") : (o = 1.304 + 0.05281 * s + 0.1938 * d - 4e-3 * s * d, c = "hadlock1"), { grams: Math.round(10 ** o), method: c };
|
|
18
|
-
}
|
|
19
|
-
const z = V("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
20
|
-
variants: {
|
|
21
|
-
width: { full: "ds:w-full", auto: "ds:inline-flex" }
|
|
22
|
-
},
|
|
23
|
-
defaultVariants: { width: "full" }
|
|
24
|
-
}), G = T(
|
|
25
|
-
({
|
|
26
|
-
onResultChange: l,
|
|
27
|
-
onInsert: n,
|
|
28
|
-
insertVariant: r = "insert",
|
|
29
|
-
onCopy: s,
|
|
30
|
-
onError: d,
|
|
31
|
-
insertBrand: o,
|
|
32
|
-
id: c,
|
|
33
|
-
width: y,
|
|
34
|
-
className: M
|
|
35
|
-
}, w) => {
|
|
36
|
-
const { t: e, i18n: x } = A(), [u, F] = g(null), [p, $] = g(null), [b, B] = g(null), [v, L] = g(null), a = W(
|
|
37
|
-
() => q({ bpdMm: u, hcMm: p, acMm: b, flMm: v }),
|
|
38
|
-
[u, p, b, v]
|
|
39
|
-
);
|
|
40
|
-
j(() => {
|
|
41
|
-
l == null || l(a);
|
|
42
|
-
}, [a, l]);
|
|
43
|
-
const k = W(
|
|
44
|
-
() => new Intl.NumberFormat(x.language, { maximumFractionDigits: 0 }),
|
|
45
|
-
[x.language]
|
|
46
|
-
), C = e("fetalWeight.units.mm"), f = (i) => e("fetalWeight.efwValue", { grams: k.format(i.grams) }), I = [
|
|
47
|
-
{ label: e("fetalWeight.bpd"), value: u, onChange: F },
|
|
48
|
-
{ label: e("fetalWeight.hc"), value: p, onChange: $ },
|
|
49
|
-
{ label: e("fetalWeight.ac"), value: b, onChange: B },
|
|
50
|
-
{ label: e("fetalWeight.fl"), value: v, onChange: L }
|
|
51
|
-
];
|
|
52
|
-
return /* @__PURE__ */ m(
|
|
53
|
-
"div",
|
|
54
|
-
{
|
|
55
|
-
ref: w,
|
|
56
|
-
"data-component": "fetal-weight",
|
|
57
|
-
"data-component-id": c,
|
|
58
|
-
className: z({ width: y, className: M }),
|
|
59
|
-
children: [
|
|
60
|
-
/* @__PURE__ */ t("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: I.map((i) => /* @__PURE__ */ t(D, { label: `${i.label} (${C})`, children: /* @__PURE__ */ t(
|
|
61
|
-
E,
|
|
62
|
-
{
|
|
63
|
-
mode: "decimal",
|
|
64
|
-
min: 0,
|
|
65
|
-
step: 0.1,
|
|
66
|
-
value: i.value,
|
|
67
|
-
onChange: i.onChange
|
|
68
|
-
}
|
|
69
|
-
) }, i.label)) }),
|
|
70
|
-
/* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: a ? `${e("fetalWeight.efwLabel")}: ${f(a)}.` : "" }),
|
|
71
|
-
a ? /* @__PURE__ */ t(N, { variant: "elevated", children: /* @__PURE__ */ m(N.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
72
|
-
/* @__PURE__ */ m("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
73
|
-
/* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
|
|
74
|
-
/* @__PURE__ */ t("dt", { className: "type-label ds:text-muted-foreground", children: e("fetalWeight.efwLabel") }),
|
|
75
|
-
/* @__PURE__ */ t("dd", { className: "type-metric ds:text-foreground", children: f(a) })
|
|
76
|
-
] }),
|
|
77
|
-
/* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-xs)] ds:text-end", children: [
|
|
78
|
-
/* @__PURE__ */ t("dt", { className: "type-label ds:text-muted-foreground", children: e("fetalWeight.methodLabel") }),
|
|
79
|
-
/* @__PURE__ */ t("dd", { children: /* @__PURE__ */ t(H, { variant: "info", children: e(`fetalWeight.method.${a.method}`) }) })
|
|
80
|
-
] })
|
|
81
|
-
] }),
|
|
82
|
-
/* @__PURE__ */ t("p", { className: "type-body-sm ds:text-muted-foreground", children: e("fetalWeight.disclaimer") }),
|
|
83
|
-
r === "copy" || n ? /* @__PURE__ */ t(
|
|
84
|
-
S,
|
|
85
|
-
{
|
|
86
|
-
onInsert: n,
|
|
87
|
-
variant: r,
|
|
88
|
-
onCopy: s,
|
|
89
|
-
onError: d,
|
|
90
|
-
card: {
|
|
91
|
-
title: e("insert.title.fetalWeight"),
|
|
92
|
-
icon: "scale",
|
|
93
|
-
highlight: f(a),
|
|
94
|
-
highlightToken: "--info",
|
|
95
|
-
brand: o,
|
|
96
|
-
fields: [
|
|
97
|
-
{
|
|
98
|
-
icon: "scale",
|
|
99
|
-
label: e("fetalWeight.efwLabel"),
|
|
100
|
-
value: f(a)
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
icon: "activity",
|
|
104
|
-
label: e("fetalWeight.methodLabel"),
|
|
105
|
-
value: e(`fetalWeight.method.${a.method}`)
|
|
106
|
-
}
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
) : null
|
|
111
|
-
] }) }) : /* @__PURE__ */ t("p", { className: "type-body ds:text-muted-foreground", children: e("fetalWeight.empty") })
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
G.displayName = "FetalWeight";
|
|
118
|
-
export {
|
|
119
|
-
G as F,
|
|
120
|
-
q as e
|
|
121
|
-
};
|
|
122
|
-
//# sourceMappingURL=fetal-weight-ePlLjJPc.js.map
|
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import { jsxs as s, jsx as a, Fragment as X } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Z, useState as o, useMemo as m, useEffect as ee } from "react";
|
|
3
|
-
import { c as ae } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as te } from "react-i18next";
|
|
5
|
-
import { R as i } from "./radio-TWf9Q-mp.js";
|
|
6
|
-
import { R as y } from "./radio-group-CI-6SmSw.js";
|
|
7
|
-
import { F as x } from "./form-field-M5UpX65Z.js";
|
|
8
|
-
import { D as w } from "./date-picker-ZHejTVAJ.js";
|
|
9
|
-
import { S as le } from "./select-BW5ecXlX.js";
|
|
10
|
-
import { S as se } from "./switch-OILsBLWo.js";
|
|
11
|
-
import { C as R } from "./card-DPmk26CL.js";
|
|
12
|
-
import { B as T } from "./badge-DCOqV9mI.js";
|
|
13
|
-
import { I as ie } from "./insert-result-D074GtHX.js";
|
|
14
|
-
import { c as ne, g as oe, e as re, f as de, A as ce, h as me, i as ge, G as ue } from "./antenatal-schedule-timeline-BMMpi2lb.js";
|
|
15
|
-
import { s as he } from "./subDays-BcNi04uf.js";
|
|
16
|
-
import { i as pe } from "./date-picker-variants-eL6HjWvw.js";
|
|
17
|
-
const fe = ae("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
18
|
-
variants: {
|
|
19
|
-
width: { full: "ds:w-full", auto: "ds:inline-flex" }
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: { width: "full" }
|
|
22
|
-
}), ve = Z(
|
|
23
|
-
({
|
|
24
|
-
defaultMethod: $ = "lmp",
|
|
25
|
-
defaultReferenceDate: G,
|
|
26
|
-
onResultChange: g,
|
|
27
|
-
onInsert: C,
|
|
28
|
-
insertVariant: S = "insert",
|
|
29
|
-
onCopy: F,
|
|
30
|
-
onError: L,
|
|
31
|
-
insertBrand: I,
|
|
32
|
-
showSchedule: f = !1,
|
|
33
|
-
defaultPlurality: V = "singleton",
|
|
34
|
-
defaultChorionicity: B = "unknown",
|
|
35
|
-
defaultRhNegative: E = !1,
|
|
36
|
-
defaultGdmRisk: O,
|
|
37
|
-
scheduleOptions: N,
|
|
38
|
-
id: z,
|
|
39
|
-
width: M,
|
|
40
|
-
className: j
|
|
41
|
-
}, _) => {
|
|
42
|
-
const { t: e, i18n: D } = te(), [d, H] = o($), [c, P] = o(
|
|
43
|
-
G
|
|
44
|
-
), [r, Y] = o(() => /* @__PURE__ */ new Date()), q = m(() => /* @__PURE__ */ new Date(), []), [u, J] = o(V), [v, K] = o(B), [b, Q] = o(E), [h, U] = o(
|
|
45
|
-
O ?? "none"
|
|
46
|
-
), l = m(() => {
|
|
47
|
-
if (!c) return null;
|
|
48
|
-
const t = d === "lmp" ? c : he(c, ue), n = ne({ method: "lmp", date: t }, r);
|
|
49
|
-
return {
|
|
50
|
-
result: {
|
|
51
|
-
gestationalAge: n.gestationalAge,
|
|
52
|
-
trimester: n.trimester,
|
|
53
|
-
dueDate: n.dueDate
|
|
54
|
-
},
|
|
55
|
-
milestones: oe(n.gestationalStart),
|
|
56
|
-
gestationalStart: n.gestationalStart
|
|
57
|
-
};
|
|
58
|
-
}, [d, c, r]), p = m(() => !f || !l ? null : re(l.gestationalStart, {
|
|
59
|
-
...N,
|
|
60
|
-
today: r,
|
|
61
|
-
plurality: u,
|
|
62
|
-
chorionicity: v,
|
|
63
|
-
rhNegative: b,
|
|
64
|
-
gdmRisk: h === "none" ? void 0 : h
|
|
65
|
-
}), [
|
|
66
|
-
f,
|
|
67
|
-
l,
|
|
68
|
-
r,
|
|
69
|
-
N,
|
|
70
|
-
u,
|
|
71
|
-
v,
|
|
72
|
-
b,
|
|
73
|
-
h
|
|
74
|
-
]), W = m(
|
|
75
|
-
() => [
|
|
76
|
-
"unknown",
|
|
77
|
-
"dichorionic-diamniotic",
|
|
78
|
-
"monochorionic-diamniotic",
|
|
79
|
-
"monochorionic-monoamniotic"
|
|
80
|
-
].map((t) => ({
|
|
81
|
-
value: t,
|
|
82
|
-
label: e(`antenatalSchedule.chorionicity.${t}`)
|
|
83
|
-
})),
|
|
84
|
-
[e]
|
|
85
|
-
), k = m(
|
|
86
|
-
() => new Intl.DateTimeFormat(D.language, { dateStyle: "medium" }),
|
|
87
|
-
[D.language]
|
|
88
|
-
);
|
|
89
|
-
ee(() => {
|
|
90
|
-
g == null || g((l == null ? void 0 : l.result) ?? null);
|
|
91
|
-
}, [l, g]);
|
|
92
|
-
const A = (t) => t ? e("gestationalAgeCalculator.gestation", {
|
|
93
|
-
weeks: t.weeks,
|
|
94
|
-
days: t.days
|
|
95
|
-
}) : "—";
|
|
96
|
-
return /* @__PURE__ */ s(
|
|
97
|
-
"div",
|
|
98
|
-
{
|
|
99
|
-
ref: _,
|
|
100
|
-
"data-component": "gestational-age-calculator",
|
|
101
|
-
"data-component-id": z,
|
|
102
|
-
className: fe({ width: M, className: j }),
|
|
103
|
-
children: [
|
|
104
|
-
/* @__PURE__ */ s(
|
|
105
|
-
y,
|
|
106
|
-
{
|
|
107
|
-
label: e("gestationalAgeCalculator.method.label"),
|
|
108
|
-
variant: "horizontal",
|
|
109
|
-
value: d,
|
|
110
|
-
onValueChange: (t) => H(t),
|
|
111
|
-
children: [
|
|
112
|
-
/* @__PURE__ */ a(i, { label: e("gestationalAgeCalculator.method.lmp"), value: "lmp" }),
|
|
113
|
-
/* @__PURE__ */ a(i, { label: e("gestationalAgeCalculator.method.edd"), value: "edd" })
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
),
|
|
117
|
-
/* @__PURE__ */ a(
|
|
118
|
-
x,
|
|
119
|
-
{
|
|
120
|
-
label: e(
|
|
121
|
-
d === "lmp" ? "gestationalAgeCalculator.lmpDate" : "gestationalAgeCalculator.eddDate"
|
|
122
|
-
),
|
|
123
|
-
children: /* @__PURE__ */ a(
|
|
124
|
-
w,
|
|
125
|
-
{
|
|
126
|
-
value: c,
|
|
127
|
-
onChange: P,
|
|
128
|
-
maxDate: d === "lmp" ? q : void 0
|
|
129
|
-
}
|
|
130
|
-
)
|
|
131
|
-
}
|
|
132
|
-
),
|
|
133
|
-
/* @__PURE__ */ a(
|
|
134
|
-
x,
|
|
135
|
-
{
|
|
136
|
-
label: e("gestationalAgeCalculator.asOfDate"),
|
|
137
|
-
description: e("gestationalAgeCalculator.asOfDateHint"),
|
|
138
|
-
children: /* @__PURE__ */ a(w, { value: r, onChange: (t) => t && Y(t) })
|
|
139
|
-
}
|
|
140
|
-
),
|
|
141
|
-
f ? /* @__PURE__ */ s(X, { children: [
|
|
142
|
-
/* @__PURE__ */ s(
|
|
143
|
-
y,
|
|
144
|
-
{
|
|
145
|
-
label: e("antenatalSchedule.plurality.label"),
|
|
146
|
-
variant: "horizontal",
|
|
147
|
-
value: u,
|
|
148
|
-
onValueChange: (t) => J(t),
|
|
149
|
-
children: [
|
|
150
|
-
/* @__PURE__ */ a(
|
|
151
|
-
i,
|
|
152
|
-
{
|
|
153
|
-
label: e("antenatalSchedule.plurality.singleton"),
|
|
154
|
-
value: "singleton"
|
|
155
|
-
}
|
|
156
|
-
),
|
|
157
|
-
/* @__PURE__ */ a(
|
|
158
|
-
i,
|
|
159
|
-
{
|
|
160
|
-
label: e("antenatalSchedule.plurality.twin"),
|
|
161
|
-
value: "twin"
|
|
162
|
-
}
|
|
163
|
-
),
|
|
164
|
-
/* @__PURE__ */ a(
|
|
165
|
-
i,
|
|
166
|
-
{
|
|
167
|
-
label: e("antenatalSchedule.plurality.triplet"),
|
|
168
|
-
value: "triplet"
|
|
169
|
-
}
|
|
170
|
-
)
|
|
171
|
-
]
|
|
172
|
-
}
|
|
173
|
-
),
|
|
174
|
-
u !== "singleton" ? /* @__PURE__ */ a(x, { label: e("antenatalSchedule.chorionicity.label"), children: /* @__PURE__ */ a(
|
|
175
|
-
le,
|
|
176
|
-
{
|
|
177
|
-
options: W,
|
|
178
|
-
value: v,
|
|
179
|
-
onValueChange: (t) => K(t)
|
|
180
|
-
}
|
|
181
|
-
) }) : null,
|
|
182
|
-
/* @__PURE__ */ a(
|
|
183
|
-
se,
|
|
184
|
-
{
|
|
185
|
-
label: e("antenatalSchedule.rhNegative"),
|
|
186
|
-
checked: b,
|
|
187
|
-
onCheckedChange: Q
|
|
188
|
-
}
|
|
189
|
-
),
|
|
190
|
-
/* @__PURE__ */ s(
|
|
191
|
-
y,
|
|
192
|
-
{
|
|
193
|
-
label: e("antenatalSchedule.gdmRisk.label"),
|
|
194
|
-
variant: "horizontal",
|
|
195
|
-
value: h,
|
|
196
|
-
onValueChange: (t) => U(t),
|
|
197
|
-
children: [
|
|
198
|
-
/* @__PURE__ */ a(i, { label: e("antenatalSchedule.gdmRisk.none"), value: "none" }),
|
|
199
|
-
/* @__PURE__ */ a(
|
|
200
|
-
i,
|
|
201
|
-
{
|
|
202
|
-
label: e("antenatalSchedule.gdmRisk.medium"),
|
|
203
|
-
value: "medium"
|
|
204
|
-
}
|
|
205
|
-
),
|
|
206
|
-
/* @__PURE__ */ a(i, { label: e("antenatalSchedule.gdmRisk.high"), value: "high" })
|
|
207
|
-
]
|
|
208
|
-
}
|
|
209
|
-
)
|
|
210
|
-
] }) : null,
|
|
211
|
-
/* @__PURE__ */ a("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: l ? `${e("gestationalAgeCalculator.gestationLabel")}: ${A(
|
|
212
|
-
l.result.gestationalAge
|
|
213
|
-
)}. ${e("gestationalAgeCalculator.trimesterLabel")}: ${e(
|
|
214
|
-
`gestationalAgeCalculator.trimester.${l.result.trimester}`
|
|
215
|
-
)}.` : "" }),
|
|
216
|
-
l ? /* @__PURE__ */ a(R, { variant: "elevated", children: /* @__PURE__ */ s(R.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
217
|
-
/* @__PURE__ */ s("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
218
|
-
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
|
|
219
|
-
/* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("gestationalAgeCalculator.trimesterLabel") }),
|
|
220
|
-
/* @__PURE__ */ a("dd", { children: /* @__PURE__ */ a(
|
|
221
|
-
T,
|
|
222
|
-
{
|
|
223
|
-
variant: de[l.result.trimester],
|
|
224
|
-
size: "lg",
|
|
225
|
-
children: e(
|
|
226
|
-
`gestationalAgeCalculator.trimester.${l.result.trimester}`
|
|
227
|
-
)
|
|
228
|
-
}
|
|
229
|
-
) })
|
|
230
|
-
] }),
|
|
231
|
-
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-xs)] ds:text-end", children: [
|
|
232
|
-
/* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("gestationalAgeCalculator.gestationLabel") }),
|
|
233
|
-
/* @__PURE__ */ a("dd", { className: "type-metric ds:text-foreground", children: A(l.result.gestationalAge) })
|
|
234
|
-
] })
|
|
235
|
-
] }),
|
|
236
|
-
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
237
|
-
/* @__PURE__ */ a("span", { className: "type-label ds:text-muted-foreground", children: e("gestationalAgeCalculator.milestonesLabel") }),
|
|
238
|
-
/* @__PURE__ */ a("ul", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: l.milestones.map((t) => {
|
|
239
|
-
const n = pe(r, t.date);
|
|
240
|
-
return /* @__PURE__ */ s(
|
|
241
|
-
"li",
|
|
242
|
-
{
|
|
243
|
-
className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-md)]",
|
|
244
|
-
children: [
|
|
245
|
-
/* @__PURE__ */ a("span", { className: "type-body ds:text-foreground", children: e(`gestationalAgeCalculator.milestone.${t.key}`) }),
|
|
246
|
-
/* @__PURE__ */ s("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
247
|
-
/* @__PURE__ */ a("span", { className: "type-body ds:text-muted-foreground", children: k.format(t.date) }),
|
|
248
|
-
n ? /* @__PURE__ */ a(T, { variant: "success", children: e("gestationalAgeCalculator.reached") }) : null
|
|
249
|
-
] })
|
|
250
|
-
]
|
|
251
|
-
},
|
|
252
|
-
t.key
|
|
253
|
-
);
|
|
254
|
-
}) })
|
|
255
|
-
] })
|
|
256
|
-
] }) }) : /* @__PURE__ */ a("p", { className: "type-body ds:text-muted-foreground", children: e("gestationalAgeCalculator.empty") }),
|
|
257
|
-
p ? /* @__PURE__ */ a(ce, { events: p }) : null,
|
|
258
|
-
l && (S === "copy" || C) ? /* @__PURE__ */ a(
|
|
259
|
-
ie,
|
|
260
|
-
{
|
|
261
|
-
onInsert: C,
|
|
262
|
-
variant: S,
|
|
263
|
-
onCopy: F,
|
|
264
|
-
onError: L,
|
|
265
|
-
card: {
|
|
266
|
-
title: e("insert.title.gestationalAge"),
|
|
267
|
-
icon: "baby",
|
|
268
|
-
highlight: e(
|
|
269
|
-
`gestationalAgeCalculator.trimester.${l.result.trimester}`
|
|
270
|
-
),
|
|
271
|
-
// Chip shares the trimester's semantic token so the inserted PNG
|
|
272
|
-
// chip matches the on-screen trimester badge — with the
|
|
273
|
-
// contrast-safe orange override for the `--warning` third trimester.
|
|
274
|
-
highlightToken: ge(l.result.trimester),
|
|
275
|
-
brand: I,
|
|
276
|
-
fields: [
|
|
277
|
-
{
|
|
278
|
-
// Gestational age is an elapsed duration → clock glyph.
|
|
279
|
-
icon: "clock",
|
|
280
|
-
label: e("gestationalAgeCalculator.gestationLabel"),
|
|
281
|
-
value: A(l.result.gestationalAge)
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
// Trimester is a clinical-stage classification → tag.
|
|
285
|
-
icon: "tag",
|
|
286
|
-
label: e("gestationalAgeCalculator.trimesterLabel"),
|
|
287
|
-
value: e(
|
|
288
|
-
`gestationalAgeCalculator.trimester.${l.result.trimester}`
|
|
289
|
-
)
|
|
290
|
-
},
|
|
291
|
-
// When the schedule is shown, the single Insert button carries
|
|
292
|
-
// the exam windows too (no second button).
|
|
293
|
-
...p ? me(
|
|
294
|
-
p,
|
|
295
|
-
e,
|
|
296
|
-
(t) => k.format(t)
|
|
297
|
-
) : []
|
|
298
|
-
]
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
) : null
|
|
302
|
-
]
|
|
303
|
-
}
|
|
304
|
-
);
|
|
305
|
-
}
|
|
306
|
-
);
|
|
307
|
-
ve.displayName = "GestationalAgeCalculator";
|
|
308
|
-
export {
|
|
309
|
-
ve as G
|
|
310
|
-
};
|
|
311
|
-
//# sourceMappingURL=gestational-age-calculator-DdgbH69Z.js.map
|