@alfadocs/ui-kit 0.49.0 → 0.50.1
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/{antenatal-schedule-timeline-Dg0m0yFl.js → antenatal-schedule-timeline-CdiqkF05.js} +9 -8
- package/dist/_chunks/{bishop-score-2MzAz8NE.js → bishop-score-CMQxsdy4.js} +2 -2
- package/dist/_chunks/{bmi-calculator-DdylQzT6.js → bmi-calculator-DuUneHuZ.js} +2 -2
- package/dist/_chunks/{cycle-calculator-oOkj5wlB.js → cycle-calculator-vTtZZAmn.js} +2 -2
- package/dist/_chunks/{due-date-calculator-tDqZXPWO.js → due-date-calculator-CUm5KJbf.js} +3 -3
- package/dist/_chunks/{fetal-weight-Da-B4P4k.js → fetal-weight-Xf8-ZoDy.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-DbDfTJU2.js → gestational-age-calculator-830KJql3.js} +3 -3
- package/dist/_chunks/{hcg-doubling-DAnpbale.js → hcg-doubling-kVOpDfny.js} +2 -2
- package/dist/_chunks/insert-result-njqBthzT.js +742 -0
- package/dist/_chunks/pregnancy-dating-DT_244bG.js +421 -0
- package/dist/_chunks/{pregnancy-weight-gain-CCGrvarh.js → pregnancy-weight-gain-BMRBeA8V.js} +2 -2
- package/dist/_chunks/{unit-converter-jWp3Z85y.js → unit-converter-BQ6lEYvd.js} +2 -2
- package/dist/agent-catalog.json +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +6 -0
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +7 -0
- 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/pregnancy-dating/index.d.ts +3 -0
- package/dist/components/pregnancy-dating/index.js +5 -0
- package/dist/components/pregnancy-dating/pregnancy-dating.d.ts +60 -0
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +52 -0
- package/dist/i18n/locales/ar.js +52 -0
- package/dist/i18n/locales/de.d.ts +52 -0
- package/dist/i18n/locales/de.js +52 -0
- package/dist/i18n/locales/el.d.ts +52 -0
- package/dist/i18n/locales/el.js +52 -0
- package/dist/i18n/locales/en.d.ts +52 -0
- package/dist/i18n/locales/en.js +52 -0
- package/dist/i18n/locales/es.d.ts +52 -0
- package/dist/i18n/locales/es.js +52 -0
- package/dist/i18n/locales/fr.d.ts +52 -0
- package/dist/i18n/locales/fr.js +52 -0
- package/dist/i18n/locales/hi.d.ts +52 -0
- package/dist/i18n/locales/hi.js +52 -0
- package/dist/i18n/locales/it.d.ts +52 -0
- package/dist/i18n/locales/it.js +52 -0
- package/dist/i18n/locales/ja.d.ts +52 -0
- package/dist/i18n/locales/ja.js +52 -0
- package/dist/i18n/locales/nl.d.ts +52 -0
- package/dist/i18n/locales/nl.js +52 -0
- package/dist/i18n/locales/pl.d.ts +52 -0
- package/dist/i18n/locales/pl.js +52 -0
- package/dist/i18n/locales/pt.d.ts +52 -0
- package/dist/i18n/locales/pt.js +52 -0
- package/dist/i18n/locales/ro.d.ts +52 -0
- package/dist/i18n/locales/ro.js +52 -0
- package/dist/i18n/locales/ru.d.ts +52 -0
- package/dist/i18n/locales/ru.js +52 -0
- package/dist/i18n/locales/sq.d.ts +52 -0
- package/dist/i18n/locales/sq.js +52 -0
- package/dist/i18n/locales/sv.d.ts +52 -0
- package/dist/i18n/locales/sv.js +52 -0
- package/dist/i18n/locales/tr.d.ts +52 -0
- package/dist/i18n/locales/tr.js +52 -0
- package/dist/i18n/locales/zh.d.ts +52 -0
- package/dist/i18n/locales/zh.js +52 -0
- package/dist/index.js +632 -630
- package/dist/locales/ar.json +52 -0
- package/dist/locales/de.json +52 -0
- package/dist/locales/el.json +52 -0
- package/dist/locales/en.json +52 -0
- package/dist/locales/es.json +52 -0
- package/dist/locales/fr.json +52 -0
- package/dist/locales/hi.json +52 -0
- package/dist/locales/it.json +52 -0
- package/dist/locales/ja.json +52 -0
- package/dist/locales/nl.json +52 -0
- package/dist/locales/pl.json +52 -0
- package/dist/locales/pt.json +52 -0
- package/dist/locales/ro.json +52 -0
- package/dist/locales/ru.json +52 -0
- package/dist/locales/sq.json +52 -0
- package/dist/locales/sv.json +52 -0
- package/dist/locales/tr.json +52 -0
- package/dist/locales/zh.json +52 -0
- package/package.json +5 -1
- package/dist/_chunks/insert-result-DNdi_JYW.js +0 -683
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { jsxs as l, jsx as a, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as fe, useState as i, useMemo as o, useEffect as De } from "react";
|
|
3
|
+
import { c as ve } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as be } from "react-i18next";
|
|
5
|
+
import { R as r } from "./radio-TWf9Q-mp.js";
|
|
6
|
+
import { R as L } from "./radio-group-CLjK-SlK.js";
|
|
7
|
+
import { F as g } from "./form-field-BOm9hK35.js";
|
|
8
|
+
import { D as O } from "./date-picker-BfHblqwA.js";
|
|
9
|
+
import { N as _ } from "./number-input-Dj5L3pXK.js";
|
|
10
|
+
import { S as xe } from "./select-hsCaJSX3.js";
|
|
11
|
+
import { S as Ne } from "./switch-BJ6HD3Mn.js";
|
|
12
|
+
import { C as M } from "./card-DPmk26CL.js";
|
|
13
|
+
import { B as j } from "./badge-zsf5i5bH.js";
|
|
14
|
+
import { I as Se } from "./insert-result-njqBthzT.js";
|
|
15
|
+
import { D as k, r as Ae, c as Le, g as ke, e as Ce, f as Te, A as we, h as Ee, i as Re, j as P, G as Fe } from "./antenatal-schedule-timeline-CdiqkF05.js";
|
|
16
|
+
import { s as C } from "./subDays-Bs00akhK.js";
|
|
17
|
+
import { i as Ie } from "./date-picker-variants-CXEAx3O_.js";
|
|
18
|
+
const Oe = ve("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
19
|
+
variants: {
|
|
20
|
+
width: { full: "ds:w-full", auto: "ds:inline-flex" }
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: { width: "full" }
|
|
23
|
+
}), _e = {
|
|
24
|
+
lmp: "pregnancyDating.lmpDate",
|
|
25
|
+
conception: "pregnancyDating.conceptionDate",
|
|
26
|
+
ivf: "pregnancyDating.transferDate",
|
|
27
|
+
edd: "pregnancyDating.eddDate"
|
|
28
|
+
}, je = fe(
|
|
29
|
+
({
|
|
30
|
+
defaultMethod: z = "lmp",
|
|
31
|
+
defaultReferenceDate: Y,
|
|
32
|
+
onResultChange: y,
|
|
33
|
+
onInsert: $,
|
|
34
|
+
insertVariant: B = "insert",
|
|
35
|
+
onCopy: K,
|
|
36
|
+
onError: U,
|
|
37
|
+
insertBrand: q,
|
|
38
|
+
showSchedule: T = !1,
|
|
39
|
+
defaultPlurality: J = "singleton",
|
|
40
|
+
defaultChorionicity: Q = "unknown",
|
|
41
|
+
defaultRhNegative: W = !1,
|
|
42
|
+
defaultGdmRisk: X,
|
|
43
|
+
scheduleOptions: V,
|
|
44
|
+
id: Z,
|
|
45
|
+
width: ee,
|
|
46
|
+
className: ae
|
|
47
|
+
}, te) => {
|
|
48
|
+
const { t: e, i18n: f } = be(), [s, ne] = i(z), [d, le] = i(
|
|
49
|
+
Y
|
|
50
|
+
), [w, se] = i(
|
|
51
|
+
k
|
|
52
|
+
), [E, ie] = i(5), [D, re] = i(null), [v, de] = i(void 0), [b, ce] = i(
|
|
53
|
+
null
|
|
54
|
+
), [m, oe] = i(() => /* @__PURE__ */ new Date()), [x, ge] = i(J), [R, me] = i(Q), [F, pe] = i(W), [N, ue] = i(
|
|
55
|
+
X ?? "none"
|
|
56
|
+
), G = o(() => /* @__PURE__ */ new Date(), []), c = o(() => s !== "lmp" || !d || D === null || !v ? null : Ae({ lmp: d, scanDate: v, crlMm: D }), [s, d, D, v]), p = o(() => {
|
|
57
|
+
if (!d) return null;
|
|
58
|
+
let t, u = k;
|
|
59
|
+
s === "lmp" ? (t = d, u = w ?? k) : s === "conception" ? t = C(d, P) : s === "ivf" ? t = C(d, E + P) : t = C(d, Fe), s === "lmp" && (c != null && c.redated) ? (t = c.gestationalStart, u = k) : b && (t = C(t, b));
|
|
60
|
+
const h = Le(
|
|
61
|
+
{ method: "lmp", date: t, cycleLength: u },
|
|
62
|
+
m
|
|
63
|
+
);
|
|
64
|
+
return {
|
|
65
|
+
result: {
|
|
66
|
+
dueDate: h.dueDate,
|
|
67
|
+
gestationalStart: h.gestationalStart,
|
|
68
|
+
gestationalAge: h.gestationalAge,
|
|
69
|
+
trimester: h.trimester
|
|
70
|
+
},
|
|
71
|
+
milestones: ke(h.gestationalStart)
|
|
72
|
+
};
|
|
73
|
+
}, [
|
|
74
|
+
s,
|
|
75
|
+
d,
|
|
76
|
+
w,
|
|
77
|
+
E,
|
|
78
|
+
c,
|
|
79
|
+
b,
|
|
80
|
+
m
|
|
81
|
+
]), n = (p == null ? void 0 : p.result) ?? null, S = o(() => !T || !n ? null : Ce(n.gestationalStart, {
|
|
82
|
+
...V,
|
|
83
|
+
today: m,
|
|
84
|
+
plurality: x,
|
|
85
|
+
chorionicity: R,
|
|
86
|
+
rhNegative: F,
|
|
87
|
+
gdmRisk: N === "none" ? void 0 : N
|
|
88
|
+
}), [
|
|
89
|
+
T,
|
|
90
|
+
n,
|
|
91
|
+
m,
|
|
92
|
+
V,
|
|
93
|
+
x,
|
|
94
|
+
R,
|
|
95
|
+
F,
|
|
96
|
+
N
|
|
97
|
+
]), A = o(
|
|
98
|
+
() => new Intl.DateTimeFormat(f.language, { dateStyle: "long" }),
|
|
99
|
+
[f.language]
|
|
100
|
+
), H = o(
|
|
101
|
+
() => new Intl.DateTimeFormat(f.language, { dateStyle: "medium" }),
|
|
102
|
+
[f.language]
|
|
103
|
+
);
|
|
104
|
+
De(() => {
|
|
105
|
+
y == null || y(n);
|
|
106
|
+
}, [n, y]);
|
|
107
|
+
const he = o(
|
|
108
|
+
() => [
|
|
109
|
+
"unknown",
|
|
110
|
+
"dichorionic-diamniotic",
|
|
111
|
+
"monochorionic-diamniotic",
|
|
112
|
+
"monochorionic-monoamniotic"
|
|
113
|
+
].map((t) => ({
|
|
114
|
+
value: t,
|
|
115
|
+
label: e(`antenatalSchedule.chorionicity.${t}`)
|
|
116
|
+
})),
|
|
117
|
+
[e]
|
|
118
|
+
), I = (t) => t ? e("pregnancyDating.result.gestation", {
|
|
119
|
+
weeks: t.weeks,
|
|
120
|
+
days: t.days
|
|
121
|
+
}) : "—";
|
|
122
|
+
return /* @__PURE__ */ l(
|
|
123
|
+
"div",
|
|
124
|
+
{
|
|
125
|
+
ref: te,
|
|
126
|
+
"data-component": "pregnancy-dating",
|
|
127
|
+
"data-component-id": Z,
|
|
128
|
+
className: Oe({ width: ee, className: ae }),
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ l(
|
|
131
|
+
L,
|
|
132
|
+
{
|
|
133
|
+
label: e("pregnancyDating.method.label"),
|
|
134
|
+
variant: "horizontal",
|
|
135
|
+
value: s,
|
|
136
|
+
onValueChange: (t) => ne(t),
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ a(r, { label: e("pregnancyDating.method.lmp"), value: "lmp" }),
|
|
139
|
+
/* @__PURE__ */ a(
|
|
140
|
+
r,
|
|
141
|
+
{
|
|
142
|
+
label: e("pregnancyDating.method.conception"),
|
|
143
|
+
value: "conception"
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ a(r, { label: e("pregnancyDating.method.ivf"), value: "ivf" }),
|
|
147
|
+
/* @__PURE__ */ a(r, { label: e("pregnancyDating.method.edd"), value: "edd" })
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
/* @__PURE__ */ l("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
152
|
+
/* @__PURE__ */ a(g, { label: e(_e[s]), children: /* @__PURE__ */ a(
|
|
153
|
+
O,
|
|
154
|
+
{
|
|
155
|
+
value: d,
|
|
156
|
+
onChange: le,
|
|
157
|
+
maxDate: s === "edd" ? void 0 : G
|
|
158
|
+
}
|
|
159
|
+
) }),
|
|
160
|
+
s === "lmp" && /* @__PURE__ */ a(
|
|
161
|
+
g,
|
|
162
|
+
{
|
|
163
|
+
label: e("pregnancyDating.cycleLength"),
|
|
164
|
+
description: e("pregnancyDating.cycleLengthHint"),
|
|
165
|
+
children: /* @__PURE__ */ a(
|
|
166
|
+
_,
|
|
167
|
+
{
|
|
168
|
+
mode: "integer",
|
|
169
|
+
min: 20,
|
|
170
|
+
max: 45,
|
|
171
|
+
value: w,
|
|
172
|
+
onChange: se
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
s === "ivf" && /* @__PURE__ */ l(
|
|
178
|
+
L,
|
|
179
|
+
{
|
|
180
|
+
label: e("pregnancyDating.embryoAge"),
|
|
181
|
+
variant: "horizontal",
|
|
182
|
+
value: String(E),
|
|
183
|
+
onValueChange: (t) => ie(Number(t)),
|
|
184
|
+
children: [
|
|
185
|
+
/* @__PURE__ */ a(r, { label: e("pregnancyDating.day3"), value: "3" }),
|
|
186
|
+
/* @__PURE__ */ a(r, { label: e("pregnancyDating.day5"), value: "5" })
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
),
|
|
190
|
+
/* @__PURE__ */ a(
|
|
191
|
+
g,
|
|
192
|
+
{
|
|
193
|
+
label: e("pregnancyDating.datingAdjustment"),
|
|
194
|
+
description: e("pregnancyDating.datingAdjustmentHint"),
|
|
195
|
+
children: /* @__PURE__ */ a(
|
|
196
|
+
_,
|
|
197
|
+
{
|
|
198
|
+
mode: "integer",
|
|
199
|
+
value: b,
|
|
200
|
+
onChange: ce
|
|
201
|
+
}
|
|
202
|
+
)
|
|
203
|
+
}
|
|
204
|
+
),
|
|
205
|
+
/* @__PURE__ */ a(
|
|
206
|
+
g,
|
|
207
|
+
{
|
|
208
|
+
label: e("pregnancyDating.asOfDate"),
|
|
209
|
+
description: e("pregnancyDating.asOfDateHint"),
|
|
210
|
+
children: /* @__PURE__ */ a(
|
|
211
|
+
O,
|
|
212
|
+
{
|
|
213
|
+
value: m,
|
|
214
|
+
onChange: (t) => t && oe(t)
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
}
|
|
218
|
+
)
|
|
219
|
+
] }),
|
|
220
|
+
s === "lmp" ? /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
221
|
+
/* @__PURE__ */ l("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
222
|
+
/* @__PURE__ */ a(
|
|
223
|
+
g,
|
|
224
|
+
{
|
|
225
|
+
label: e("pregnancyDating.crl"),
|
|
226
|
+
description: e("pregnancyDating.crlHint"),
|
|
227
|
+
children: /* @__PURE__ */ a(
|
|
228
|
+
_,
|
|
229
|
+
{
|
|
230
|
+
mode: "decimal",
|
|
231
|
+
min: 0,
|
|
232
|
+
step: 0.1,
|
|
233
|
+
value: D,
|
|
234
|
+
onChange: re
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
}
|
|
238
|
+
),
|
|
239
|
+
/* @__PURE__ */ a(g, { label: e("pregnancyDating.scanDate"), children: /* @__PURE__ */ a(
|
|
240
|
+
O,
|
|
241
|
+
{
|
|
242
|
+
value: v,
|
|
243
|
+
onChange: de,
|
|
244
|
+
maxDate: G
|
|
245
|
+
}
|
|
246
|
+
) })
|
|
247
|
+
] }),
|
|
248
|
+
c ? /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
249
|
+
/* @__PURE__ */ a(j, { variant: c.redated ? "warning" : "success", children: c.redated ? e("pregnancyDating.redated", {
|
|
250
|
+
days: c.discrepancyDays
|
|
251
|
+
}) : e("pregnancyDating.datesAgree") }),
|
|
252
|
+
c.crlInRange ? null : /* @__PURE__ */ a("span", { className: "type-meta ds:text-muted-foreground", children: e("pregnancyDating.crlOutOfRange") })
|
|
253
|
+
] }) : null
|
|
254
|
+
] }) : null,
|
|
255
|
+
T ? /* @__PURE__ */ l(ye, { children: [
|
|
256
|
+
/* @__PURE__ */ l(
|
|
257
|
+
L,
|
|
258
|
+
{
|
|
259
|
+
label: e("antenatalSchedule.plurality.label"),
|
|
260
|
+
variant: "horizontal",
|
|
261
|
+
value: x,
|
|
262
|
+
onValueChange: (t) => ge(t),
|
|
263
|
+
children: [
|
|
264
|
+
/* @__PURE__ */ a(
|
|
265
|
+
r,
|
|
266
|
+
{
|
|
267
|
+
label: e("antenatalSchedule.plurality.singleton"),
|
|
268
|
+
value: "singleton"
|
|
269
|
+
}
|
|
270
|
+
),
|
|
271
|
+
/* @__PURE__ */ a(
|
|
272
|
+
r,
|
|
273
|
+
{
|
|
274
|
+
label: e("antenatalSchedule.plurality.twin"),
|
|
275
|
+
value: "twin"
|
|
276
|
+
}
|
|
277
|
+
),
|
|
278
|
+
/* @__PURE__ */ a(
|
|
279
|
+
r,
|
|
280
|
+
{
|
|
281
|
+
label: e("antenatalSchedule.plurality.triplet"),
|
|
282
|
+
value: "triplet"
|
|
283
|
+
}
|
|
284
|
+
)
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
),
|
|
288
|
+
x !== "singleton" ? /* @__PURE__ */ a(g, { label: e("antenatalSchedule.chorionicity.label"), children: /* @__PURE__ */ a(
|
|
289
|
+
xe,
|
|
290
|
+
{
|
|
291
|
+
options: he,
|
|
292
|
+
value: R,
|
|
293
|
+
onValueChange: (t) => me(t)
|
|
294
|
+
}
|
|
295
|
+
) }) : null,
|
|
296
|
+
/* @__PURE__ */ a(
|
|
297
|
+
Ne,
|
|
298
|
+
{
|
|
299
|
+
label: e("antenatalSchedule.rhNegative"),
|
|
300
|
+
checked: F,
|
|
301
|
+
onCheckedChange: pe
|
|
302
|
+
}
|
|
303
|
+
),
|
|
304
|
+
/* @__PURE__ */ l(
|
|
305
|
+
L,
|
|
306
|
+
{
|
|
307
|
+
label: e("antenatalSchedule.gdmRisk.label"),
|
|
308
|
+
variant: "horizontal",
|
|
309
|
+
value: N,
|
|
310
|
+
onValueChange: (t) => ue(t),
|
|
311
|
+
children: [
|
|
312
|
+
/* @__PURE__ */ a(r, { label: e("antenatalSchedule.gdmRisk.none"), value: "none" }),
|
|
313
|
+
/* @__PURE__ */ a(
|
|
314
|
+
r,
|
|
315
|
+
{
|
|
316
|
+
label: e("antenatalSchedule.gdmRisk.medium"),
|
|
317
|
+
value: "medium"
|
|
318
|
+
}
|
|
319
|
+
),
|
|
320
|
+
/* @__PURE__ */ a(r, { label: e("antenatalSchedule.gdmRisk.high"), value: "high" })
|
|
321
|
+
]
|
|
322
|
+
}
|
|
323
|
+
)
|
|
324
|
+
] }) : null,
|
|
325
|
+
/* @__PURE__ */ a("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: n ? `${e("pregnancyDating.result.dueDateLabel")}: ${A.format(
|
|
326
|
+
n.dueDate
|
|
327
|
+
)}. ${e("pregnancyDating.result.gestationLabel")}: ${I(
|
|
328
|
+
n.gestationalAge
|
|
329
|
+
)}.` : "" }),
|
|
330
|
+
p && n ? /* @__PURE__ */ a(M, { variant: "elevated", children: /* @__PURE__ */ l(M.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
331
|
+
/* @__PURE__ */ l("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
|
|
332
|
+
/* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
|
|
333
|
+
/* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("pregnancyDating.result.dueDateLabel") }),
|
|
334
|
+
/* @__PURE__ */ a("dd", { className: "type-metric ds:text-foreground", children: A.format(n.dueDate) })
|
|
335
|
+
] }),
|
|
336
|
+
/* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
|
|
337
|
+
/* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("pregnancyDating.result.gestationLabel") }),
|
|
338
|
+
/* @__PURE__ */ a("dd", { className: "type-body ds:text-foreground", children: I(n.gestationalAge) })
|
|
339
|
+
] }),
|
|
340
|
+
/* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-xs)] ds:text-end", children: [
|
|
341
|
+
/* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("pregnancyDating.result.trimesterLabel") }),
|
|
342
|
+
/* @__PURE__ */ a("dd", { children: /* @__PURE__ */ a(
|
|
343
|
+
j,
|
|
344
|
+
{
|
|
345
|
+
variant: Te[n.trimester],
|
|
346
|
+
size: "lg",
|
|
347
|
+
children: e(`pregnancyDating.trimester.${n.trimester}`)
|
|
348
|
+
}
|
|
349
|
+
) })
|
|
350
|
+
] })
|
|
351
|
+
] }),
|
|
352
|
+
/* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
353
|
+
/* @__PURE__ */ a("span", { className: "type-label ds:text-muted-foreground", children: e("pregnancyDating.milestonesLabel") }),
|
|
354
|
+
/* @__PURE__ */ a("ul", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: p.milestones.map((t) => {
|
|
355
|
+
const u = Ie(m, t.date);
|
|
356
|
+
return /* @__PURE__ */ l(
|
|
357
|
+
"li",
|
|
358
|
+
{
|
|
359
|
+
className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-md)]",
|
|
360
|
+
children: [
|
|
361
|
+
/* @__PURE__ */ a("span", { className: "type-body ds:text-foreground", children: e(`pregnancyDating.milestone.${t.key}`) }),
|
|
362
|
+
/* @__PURE__ */ l("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
363
|
+
/* @__PURE__ */ a("span", { className: "type-body ds:text-muted-foreground", children: H.format(t.date) }),
|
|
364
|
+
u ? /* @__PURE__ */ a(j, { variant: "success", children: e("pregnancyDating.reached") }) : null
|
|
365
|
+
] })
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
t.key
|
|
369
|
+
);
|
|
370
|
+
}) })
|
|
371
|
+
] })
|
|
372
|
+
] }) }) : /* @__PURE__ */ a("p", { className: "type-body ds:text-muted-foreground", children: e("pregnancyDating.empty") }),
|
|
373
|
+
S ? /* @__PURE__ */ a(we, { events: S }) : null,
|
|
374
|
+
n && (B === "copy" || $) ? /* @__PURE__ */ a(
|
|
375
|
+
Se,
|
|
376
|
+
{
|
|
377
|
+
onInsert: $,
|
|
378
|
+
variant: B,
|
|
379
|
+
onCopy: K,
|
|
380
|
+
onError: U,
|
|
381
|
+
card: {
|
|
382
|
+
title: e("insert.title.pregnancyDating"),
|
|
383
|
+
icon: "calendar-heart",
|
|
384
|
+
highlight: A.format(n.dueDate),
|
|
385
|
+
highlightToken: Re(n.trimester),
|
|
386
|
+
brand: q,
|
|
387
|
+
fields: [
|
|
388
|
+
{
|
|
389
|
+
icon: "calendar",
|
|
390
|
+
label: e("pregnancyDating.result.dueDateLabel"),
|
|
391
|
+
value: A.format(n.dueDate)
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
icon: "clock",
|
|
395
|
+
label: e("pregnancyDating.result.gestationLabel"),
|
|
396
|
+
value: I(n.gestationalAge)
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
icon: "tag",
|
|
400
|
+
label: e("pregnancyDating.result.trimesterLabel"),
|
|
401
|
+
value: e(`pregnancyDating.trimester.${n.trimester}`)
|
|
402
|
+
},
|
|
403
|
+
...S ? Ee(
|
|
404
|
+
S,
|
|
405
|
+
e,
|
|
406
|
+
(t) => H.format(t)
|
|
407
|
+
) : []
|
|
408
|
+
]
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
) : null
|
|
412
|
+
]
|
|
413
|
+
}
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
);
|
|
417
|
+
je.displayName = "PregnancyDating";
|
|
418
|
+
export {
|
|
419
|
+
je as P
|
|
420
|
+
};
|
|
421
|
+
//# sourceMappingURL=pregnancy-dating-DT_244bG.js.map
|
package/dist/_chunks/{pregnancy-weight-gain-CCGrvarh.js → pregnancy-weight-gain-BMRBeA8V.js}
RENAMED
|
@@ -8,7 +8,7 @@ import { F as $ } from "./form-field-BOm9hK35.js";
|
|
|
8
8
|
import { N as R } from "./number-input-Dj5L3pXK.js";
|
|
9
9
|
import { C as P } from "./card-DPmk26CL.js";
|
|
10
10
|
import { B as k } from "./badge-zsf5i5bH.js";
|
|
11
|
-
import { I as X } from "./insert-result-
|
|
11
|
+
import { I as X } from "./insert-result-njqBthzT.js";
|
|
12
12
|
import { b as Y, e as Z } from "./bmi-BxD-tFzU.js";
|
|
13
13
|
const ee = {
|
|
14
14
|
underweight: { min: 12.5, max: 18 },
|
|
@@ -319,4 +319,4 @@ export {
|
|
|
319
319
|
ie as a,
|
|
320
320
|
te as r
|
|
321
321
|
};
|
|
322
|
-
//# sourceMappingURL=pregnancy-weight-gain-
|
|
322
|
+
//# sourceMappingURL=pregnancy-weight-gain-BMRBeA8V.js.map
|
|
@@ -5,7 +5,7 @@ import { useTranslation as j } from "react-i18next";
|
|
|
5
5
|
import { F as v } from "./form-field-BOm9hK35.js";
|
|
6
6
|
import { N as B } from "./number-input-Dj5L3pXK.js";
|
|
7
7
|
import { S as C } from "./select-hsCaJSX3.js";
|
|
8
|
-
import { I as L } from "./insert-result-
|
|
8
|
+
import { I as L } from "./insert-result-njqBthzT.js";
|
|
9
9
|
const _ = {
|
|
10
10
|
// weight → base kg
|
|
11
11
|
kg: { id: "kg", category: "weight", factor: 1, offset: 0 },
|
|
@@ -193,4 +193,4 @@ export {
|
|
|
193
193
|
P as b,
|
|
194
194
|
K as c
|
|
195
195
|
};
|
|
196
|
-
//# sourceMappingURL=unit-converter-
|
|
196
|
+
//# sourceMappingURL=unit-converter-BQ6lEYvd.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as m } from "../../_chunks/bmi-calculator-
|
|
1
|
+
import { B as m } from "../../_chunks/bmi-calculator-DuUneHuZ.js";
|
|
2
2
|
import { b as e, a as t, c as r, d as T, e as c, f as i, i as b, k as n, l as f } from "../../_chunks/bmi-BxD-tFzU.js";
|
|
3
3
|
export {
|
|
4
4
|
m as BmiCalculator,
|
|
@@ -44,6 +44,12 @@ export interface DueDateCalculatorProps extends VariantProps<typeof rootVariants
|
|
|
44
44
|
/** Extra class names on the wrapper. */
|
|
45
45
|
className?: string;
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Superseded by `PregnancyDating`, which unifies the due-date and
|
|
49
|
+
* gestational-age calculators (any anchor → both EDD and current GA) and adds a
|
|
50
|
+
* manual ±days dating adjustment. This component will be removed in a future
|
|
51
|
+
* release; migrate to `PregnancyDating` (`defaultMethod="lmp"`).
|
|
52
|
+
*/
|
|
47
53
|
export declare const DueDateCalculator: import("react").ForwardRefExoticComponent<DueDateCalculatorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
48
54
|
export {};
|
|
49
55
|
//# sourceMappingURL=due-date-calculator.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as e } from "../../_chunks/due-date-calculator-
|
|
2
|
-
import { C as r, a as o, D, G as _, M as T, T as M, c as E, b as l, g as C, p as A, r as N, d as i, t as n } from "../../_chunks/antenatal-schedule-timeline-
|
|
1
|
+
import { D as e } from "../../_chunks/due-date-calculator-CUm5KJbf.js";
|
|
2
|
+
import { C as r, a as o, D, G as _, M as T, T as M, c as E, b as l, g as C, p as A, r as N, d as i, t as n } from "../../_chunks/antenatal-schedule-timeline-CdiqkF05.js";
|
|
3
3
|
export {
|
|
4
4
|
r as CRL_DATING_MAX_MM,
|
|
5
5
|
o as CRL_DATING_MIN_MM,
|
|
@@ -62,6 +62,13 @@ export interface GestationalAgeCalculatorProps extends VariantProps<typeof rootV
|
|
|
62
62
|
/** Extra class names on the wrapper. */
|
|
63
63
|
className?: string;
|
|
64
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated Superseded by `PregnancyDating`, which unifies the due-date and
|
|
67
|
+
* gestational-age calculators (any anchor → both EDD and current GA) and adds a
|
|
68
|
+
* manual ±days dating adjustment. This component will be removed in a future
|
|
69
|
+
* release; migrate to `PregnancyDating` (`defaultMethod="edd"` for the
|
|
70
|
+
* date-back-from-EDD flow).
|
|
71
|
+
*/
|
|
65
72
|
export declare const GestationalAgeCalculator: import("react").ForwardRefExoticComponent<GestationalAgeCalculatorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
66
73
|
export {};
|
|
67
74
|
//# sourceMappingURL=gestational-age-calculator.d.ts.map
|
|
@@ -19,6 +19,7 @@ export * from './copy-field';
|
|
|
19
19
|
export * from './date-picker';
|
|
20
20
|
export * from './date-range-picker';
|
|
21
21
|
export * from './date-time-picker';
|
|
22
|
+
export * from './pregnancy-dating';
|
|
22
23
|
export * from './due-date-calculator';
|
|
23
24
|
export * from './gestational-age-calculator';
|
|
24
25
|
export * from './bishop-score';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result';
|
|
3
|
+
import { type GestationalAge, type DueDateResult, type Plurality, type Chorionicity } from '../_shared/obstetrics';
|
|
4
|
+
import { type AntenatalScheduleOptions, type GdmRisk } from '../_shared/antenatal-schedule';
|
|
5
|
+
declare const rootVariants: (props?: ({
|
|
6
|
+
width?: "auto" | "full" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
/** Any known anchor the pregnancy can be dated from. */
|
|
9
|
+
export type DatingMethod = 'lmp' | 'conception' | 'ivf' | 'edd';
|
|
10
|
+
export interface PregnancyDatingResult {
|
|
11
|
+
/** Estimated date of delivery. */
|
|
12
|
+
dueDate: Date;
|
|
13
|
+
/** GA day-0 anchor (effective LMP) after any re-dating / adjustment. */
|
|
14
|
+
gestationalStart: Date;
|
|
15
|
+
/** Gestational age as of the evaluation date; `null` before conception. */
|
|
16
|
+
gestationalAge: GestationalAge | null;
|
|
17
|
+
trimester: DueDateResult['trimester'];
|
|
18
|
+
}
|
|
19
|
+
export interface PregnancyDatingProps extends VariantProps<typeof rootVariants> {
|
|
20
|
+
/** Initial dating method. Defaults to `'lmp'`. */
|
|
21
|
+
defaultMethod?: DatingMethod;
|
|
22
|
+
/** Pre-fill the reference date (e.g. a known LMP from the patient record). */
|
|
23
|
+
defaultReferenceDate?: Date;
|
|
24
|
+
/** Fires whenever a result can be computed (and `null` when it can't). */
|
|
25
|
+
onResultChange?: (result: PregnancyDatingResult | null) => void;
|
|
26
|
+
/** When provided, shows the result-action buttons that emit / copy the result. */
|
|
27
|
+
onInsert?: (payload: InsertPayload) => void;
|
|
28
|
+
/** Which verb the result button performs. Defaults to `'insert'`. */
|
|
29
|
+
insertVariant?: InsertVariant;
|
|
30
|
+
/** `copy` variant only — fired after a successful clipboard write. */
|
|
31
|
+
onCopy?: (mode: InsertMode) => void;
|
|
32
|
+
/** `copy` variant only — fired if the clipboard write can't proceed. */
|
|
33
|
+
onError?: (error: unknown) => void;
|
|
34
|
+
/** Brand wordmark printed in the inserted/copied result-card footer. */
|
|
35
|
+
insertBrand?: string | false;
|
|
36
|
+
/** Append the antenatal exam schedule + reveal the plurality / risk inputs. */
|
|
37
|
+
showSchedule?: boolean;
|
|
38
|
+
/** `showSchedule` only — initial number of babies. Defaults to `'singleton'`. */
|
|
39
|
+
defaultPlurality?: Plurality;
|
|
40
|
+
/** `showSchedule` only — initial chorionicity for multiples. Defaults to `'unknown'`. */
|
|
41
|
+
defaultChorionicity?: Chorionicity;
|
|
42
|
+
/** `showSchedule` only — initial Rh-negative state (surfaces anti-D). */
|
|
43
|
+
defaultRhNegative?: boolean;
|
|
44
|
+
/** `showSchedule` only — initial gestational-diabetes risk tier (surfaces OGTT). */
|
|
45
|
+
defaultGdmRisk?: GdmRisk;
|
|
46
|
+
/**
|
|
47
|
+
* Passthrough options for the appended schedule (national `schedule`,
|
|
48
|
+
* `includeOnIndication`, `birthGuideline`). `today`, `plurality`,
|
|
49
|
+
* `chorionicity`, `rhNegative` and `gdmRisk` come from the component's own
|
|
50
|
+
* inputs. Ignored unless `showSchedule` is set.
|
|
51
|
+
*/
|
|
52
|
+
scheduleOptions?: Omit<AntenatalScheduleOptions, 'today' | 'plurality' | 'chorionicity' | 'rhNegative' | 'gdmRisk'>;
|
|
53
|
+
/** Opaque instance id, emitted as `data-component-id`. */
|
|
54
|
+
id?: string;
|
|
55
|
+
/** Extra class names on the wrapper. */
|
|
56
|
+
className?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare const PregnancyDating: import("react").ForwardRefExoticComponent<PregnancyDatingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=pregnancy-dating.d.ts.map
|