@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.
Files changed (185) hide show
  1. package/dist/_chunks/agenda-card.agent-Cb5tuEh3.js +28 -0
  2. package/dist/_chunks/{alia-sidebar-DzNz1gDf.js → alia-sidebar-DSBZMick.js} +3 -3
  3. package/dist/_chunks/{anamnesis-i18n-CfC0qYzy.js → anamnesis-i18n-BA631X4t.js} +2209 -2144
  4. package/dist/_chunks/{antenatal-schedule-timeline-BMMpi2lb.js → antenatal-schedule-timeline-u8TsS2QJ.js} +27 -26
  5. package/dist/_chunks/{appointment-timeline-B630OT_J.js → appointment-timeline-Bqf1sTU5.js} +2 -2
  6. package/dist/_chunks/{ar-THMLfSoN.js → ar-BR1FGFP2.js} +14 -14
  7. package/dist/_chunks/{bmi-calculator-CM0-G2mg.js → bmi-calculator-CpyY13MV.js} +2 -2
  8. package/dist/_chunks/{booking-DjNbd7C1.js → booking-BjsA7j1-.js} +699 -688
  9. package/dist/_chunks/calculator-dialog-12d3Sxaz.js +48 -0
  10. package/dist/_chunks/{care-plan-card-1G_f4I5s.js → care-plan-card-BvQy366X.js} +3 -3
  11. package/dist/_chunks/{care-plan-entry-card-DmBsffHS.js → care-plan-entry-card-apk_5B3O.js} +2 -2
  12. package/dist/_chunks/{chat-container-HlFnoEIl.js → chat-container-CYYego1W.js} +105 -81
  13. package/dist/_chunks/cycle-calculator-B7fyH-h4.js +425 -0
  14. package/dist/_chunks/{date-picker-ZHejTVAJ.js → date-picker-Bp64zk2p.js} +19 -19
  15. package/dist/_chunks/date-picker-variants-pKAJfnWr.js +2089 -0
  16. package/dist/_chunks/{date-range-picker-pEG3Ln3i.js → date-range-picker-CDrZ8Zh0.js} +27 -27
  17. package/dist/_chunks/{date-time-picker-695QvBGj.js → date-time-picker-DafkGDGO.js} +10 -10
  18. package/dist/_chunks/{de-DmZ-8rTN.js → de-3iM4rGqo.js} +7 -7
  19. package/dist/_chunks/{document-preview-D3gg4MXB.js → document-preview-DOrsqiN1.js} +2 -2
  20. package/dist/_chunks/due-date-calculator-CnkbbAej.js +571 -0
  21. package/dist/_chunks/{editor-overlay-DE3esyio.js → editor-overlay-B1tr2i7B.js} +22 -21
  22. package/dist/_chunks/{el-Bela9mxs.js → el-C96rGJvU.js} +2 -2
  23. package/dist/_chunks/{es-BNncHKex.js → es-Cxiqjx8r.js} +12 -12
  24. package/dist/_chunks/fetal-weight-avlj-l-S.js +223 -0
  25. package/dist/_chunks/format-4HNwNGrN.js +1315 -0
  26. package/dist/_chunks/{fr-CH8ADfhN.js → fr-Bhr6SYKj.js} +21 -21
  27. package/dist/_chunks/{freemium-paywall-C_Ue6wxU.js → freemium-paywall-DRDdWuOg.js} +3 -3
  28. package/dist/_chunks/gestational-age-calculator-BljY_DVJ.js +488 -0
  29. package/dist/_chunks/hcg-doubling-Cv_vH61p.js +312 -0
  30. package/dist/_chunks/header-settings-Cn5fPXCE.js +335 -0
  31. package/dist/_chunks/{hi-Bppfxp8l.js → hi-BxXX26d_.js} +12 -12
  32. package/dist/_chunks/isSameWeek-B73MagWB.js +13 -0
  33. package/dist/_chunks/{it-B4ySaRyK.js → it-Xmjomvyj.js} +24 -24
  34. package/dist/_chunks/{ja-CGF6Io9P.js → ja-mfZvt1ZV.js} +16 -16
  35. package/dist/_chunks/{link-cell-renderer-C5XLwVXQ.js → link-cell-renderer-CJ_gk7gl.js} +3 -3
  36. package/dist/_chunks/{locale-picker-BfBUdT1m.js → locale-picker-D9Kv2zrK.js} +153 -132
  37. package/dist/_chunks/map-view-2yZCQW2l.js +445 -0
  38. package/dist/_chunks/{marketplace-app-shell-DwcFMxzp.js → marketplace-app-shell-BLRvg-M0.js} +49 -40
  39. package/dist/_chunks/{nl-DuShqwuV.js → nl-DDs-KEnD.js} +15 -15
  40. package/dist/_chunks/{notes-panel-DPsgB4Mv.js → notes-panel-CiFN3sLW.js} +2 -2
  41. package/dist/_chunks/{number-input-DrozbZAU.js → number-input-DOe5VYei.js} +64 -64
  42. package/dist/_chunks/{optical-prescription-BDHJr8Zz.js → optical-prescription-CRemE8fL.js} +2 -2
  43. package/dist/_chunks/{parse-DvA97ro9.js → parse-JqixfsU0.js} +43 -43
  44. package/dist/_chunks/parseISO-fOGpHKXm.js +120 -0
  45. package/dist/_chunks/{patient-details-DqjjwPmt.js → patient-details-CpunD0qx.js} +3 -3
  46. package/dist/_chunks/{patient-table-BmIDrLIS.js → patient-table-2eWx-Rrk.js} +2 -2
  47. package/dist/_chunks/{payment-form-h-BZ8onk.js → payment-form-Ds1I9KqB.js} +308 -231
  48. package/dist/_chunks/{pdf-viewer-Ddx-T053.js → pdf-viewer-DUIsV9s5.js} +429 -369
  49. package/dist/_chunks/{pl-CKQwX9Fk.js → pl-BYYMnEWP.js} +18 -18
  50. package/dist/_chunks/{practice-results-B-HPc13W.js → practice-results-SjCniMd2.js} +2 -2
  51. package/dist/_chunks/pregnancy-dating-BmpHScZ0.js +770 -0
  52. package/dist/_chunks/pregnancy-weight-gain-B5KSJzdc.js +553 -0
  53. package/dist/_chunks/progress-CK8otcQ-.js +343 -0
  54. package/dist/_chunks/{pt-_njpXyOZ.js → pt-BSPnVrQ7.js} +20 -20
  55. package/dist/_chunks/{radiograph-panel.agent-BQZ64Riy.js → radiograph-panel.agent-CtFtNMzk.js} +3 -3
  56. package/dist/_chunks/{rich-text-editor-CfeXPPWs.js → rich-text-editor-BedTpWzL.js} +2 -2
  57. package/dist/_chunks/{ro-3X6_4FcN.js → ro-BbiylGmG.js} +14 -14
  58. package/dist/_chunks/{ru-bAcgmnS-.js → ru-BX_qsV67.js} +14 -14
  59. package/dist/_chunks/{session-countdown-Bc70VXN1.js → session-countdown-BL-Psg8u.js} +2 -2
  60. package/dist/_chunks/{sign-document-CW_ByDUh.js → sign-document-jF4fZDJ5.js} +2 -2
  61. package/dist/_chunks/slot-grid-DNiUcXy2.js +640 -0
  62. package/dist/_chunks/{sparkline-BTY4B5tv.js → sparkline-BmGcEyZO.js} +209 -164
  63. package/dist/_chunks/{sq-jYFqr4Ga.js → sq-i9UOk4P7.js} +10 -10
  64. package/dist/_chunks/subDays-CAUv47M1.js +8 -0
  65. package/dist/_chunks/{sv-BSGEJ-8B.js → sv-CpTdtmDQ.js} +8 -8
  66. package/dist/_chunks/{tab-bar-Axhk6xzx.js → tab-bar-BYESZINM.js} +83 -77
  67. package/dist/_chunks/task-card.agent-CF2N_uu4.js +29 -0
  68. package/dist/_chunks/{tr-CTpgUtw6.js → tr-DXG2QN1K.js} +17 -17
  69. package/dist/_chunks/{unit-converter-COgkN7YP.js → unit-converter-CHPDuV7W.js} +2 -2
  70. package/dist/_chunks/{warning-stack-BtjmJChC.js → warning-stack-B7t_8jRE.js} +42 -37
  71. package/dist/_chunks/{zh-CN-BgM0Io2O.js → zh-CN-vPkPEK6H.js} +18 -18
  72. package/dist/agent-catalog.json +6426 -3382
  73. package/dist/agent-i18n/en.json +234 -15
  74. package/dist/components/agenda-card/index.js +1 -1
  75. package/dist/components/appointment-timeline/index.js +1 -1
  76. package/dist/components/bmi-calculator/index.js +1 -1
  77. package/dist/components/booking/index.js +1 -1
  78. package/dist/components/calculator-dialog/index.js +1 -1
  79. package/dist/components/care-plan-card/index.js +1 -1
  80. package/dist/components/care-plan-entry-card/index.js +1 -1
  81. package/dist/components/chat-container/chat-container.d.ts +14 -0
  82. package/dist/components/chat-container/index.js +1 -1
  83. package/dist/components/cycle-calculator/cycle-calculator.agent.d.ts +4 -0
  84. package/dist/components/cycle-calculator/cycle-calculator.d.ts +42 -0
  85. package/dist/components/cycle-calculator/index.d.ts +1 -1
  86. package/dist/components/cycle-calculator/index.js +1 -1
  87. package/dist/components/data-table/index.js +1 -1
  88. package/dist/components/date-picker/index.js +1 -1
  89. package/dist/components/date-range-picker/index.js +1 -1
  90. package/dist/components/date-time-picker/index.js +1 -1
  91. package/dist/components/document-preview/index.js +1 -1
  92. package/dist/components/due-date-calculator/due-date-calculator.agent.d.ts +4 -0
  93. package/dist/components/due-date-calculator/due-date-calculator.d.ts +61 -1
  94. package/dist/components/due-date-calculator/index.d.ts +1 -1
  95. package/dist/components/due-date-calculator/index.js +2 -2
  96. package/dist/components/editor-overlay/editor-overlay.d.ts +7 -1
  97. package/dist/components/editor-overlay/index.js +1 -1
  98. package/dist/components/fetal-weight/fetal-weight.agent.d.ts +4 -0
  99. package/dist/components/fetal-weight/fetal-weight.d.ts +26 -0
  100. package/dist/components/fetal-weight/index.d.ts +1 -1
  101. package/dist/components/fetal-weight/index.js +1 -1
  102. package/dist/components/freemium-paywall/index.js +1 -1
  103. package/dist/components/gestational-age-calculator/gestational-age-calculator.agent.d.ts +4 -0
  104. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +44 -2
  105. package/dist/components/gestational-age-calculator/index.d.ts +1 -1
  106. package/dist/components/gestational-age-calculator/index.js +1 -1
  107. package/dist/components/hcg-doubling/hcg-doubling.agent.d.ts +4 -0
  108. package/dist/components/hcg-doubling/hcg-doubling.d.ts +30 -0
  109. package/dist/components/hcg-doubling/index.d.ts +1 -1
  110. package/dist/components/hcg-doubling/index.js +1 -1
  111. package/dist/components/header-settings/header-settings.d.ts +13 -1
  112. package/dist/components/header-settings/index.js +1 -1
  113. package/dist/components/locale-picker/index.js +1 -1
  114. package/dist/components/locale-picker/locale-picker.d.ts +9 -0
  115. package/dist/components/map-view/index.js +1 -1
  116. package/dist/components/map-view/map-view.d.ts +22 -0
  117. package/dist/components/notes-panel/index.js +1 -1
  118. package/dist/components/number-input/index.js +1 -1
  119. package/dist/components/number-input/number-input.d.ts +2 -1
  120. package/dist/components/optical-prescription/index.js +1 -1
  121. package/dist/components/patient-details/index.js +1 -1
  122. package/dist/components/patient-table/index.js +1 -1
  123. package/dist/components/payment-form/index.d.ts +1 -1
  124. package/dist/components/payment-form/index.js +1 -1
  125. package/dist/components/payment-form/payment-form.d.ts +32 -1
  126. package/dist/components/pdf-viewer/index.js +1 -1
  127. package/dist/components/pdf-viewer/pdf-viewer.d.ts +13 -0
  128. package/dist/components/practice-results/index.js +1 -1
  129. package/dist/components/pregnancy-dating/index.d.ts +1 -1
  130. package/dist/components/pregnancy-dating/index.js +1 -1
  131. package/dist/components/pregnancy-dating/pregnancy-dating.agent.d.ts +4 -0
  132. package/dist/components/pregnancy-dating/pregnancy-dating.d.ts +65 -1
  133. package/dist/components/pregnancy-weight-gain/index.d.ts +2 -1
  134. package/dist/components/pregnancy-weight-gain/index.js +6 -5
  135. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.agent.d.ts +4 -0
  136. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +35 -0
  137. package/dist/components/progress/index.js +1 -1
  138. package/dist/components/progress/progress.d.ts +13 -0
  139. package/dist/components/radiograph-panel/index.js +1 -1
  140. package/dist/components/rich-text-editor/index.js +1 -1
  141. package/dist/components/session-countdown/index.js +1 -1
  142. package/dist/components/sign-document/index.js +1 -1
  143. package/dist/components/slot-grid/index.d.ts +2 -1
  144. package/dist/components/slot-grid/index.js +5 -4
  145. package/dist/components/slot-grid/slot-grid.agent.d.ts +4 -0
  146. package/dist/components/slot-grid/slot-grid.d.ts +34 -0
  147. package/dist/components/sparkline/index.js +1 -1
  148. package/dist/components/sparkline/sparkline.d.ts +10 -0
  149. package/dist/components/tab-bar/index.js +1 -1
  150. package/dist/components/tab-bar/tab-bar.d.ts +13 -0
  151. package/dist/components/task-card/index.js +1 -1
  152. package/dist/components/unit-converter/index.js +1 -1
  153. package/dist/components/warning-stack/index.js +1 -1
  154. package/dist/index.js +630 -627
  155. package/dist/patterns/alia-assistant/index.js +1 -1
  156. package/dist/patterns/anamnesis/anamnesis-derive.d.ts +27 -8
  157. package/dist/patterns/anamnesis/anamnesis-format.d.ts +11 -3
  158. package/dist/patterns/anamnesis/anamnesis-highlight.d.ts +6 -0
  159. package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +23 -9
  160. package/dist/patterns/anamnesis/anamnesis-types.d.ts +7 -0
  161. package/dist/patterns/anamnesis/anamnesis.d.ts +16 -7
  162. package/dist/patterns/anamnesis/index.d.ts +3 -2
  163. package/dist/patterns/anamnesis/index.js +7 -6
  164. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  165. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +6 -0
  166. package/dist/tokens.css +1 -1
  167. package/package.json +1 -1
  168. package/dist/_chunks/agenda-card.agent-mTCrkKSZ.js +0 -27
  169. package/dist/_chunks/calculator-dialog-DuXMQSdm.js +0 -40
  170. package/dist/_chunks/cycle-calculator-BwqYVPB4.js +0 -252
  171. package/dist/_chunks/date-picker-variants-eL6HjWvw.js +0 -3363
  172. package/dist/_chunks/due-date-calculator-CwfsFd3T.js +0 -256
  173. package/dist/_chunks/fetal-weight-ePlLjJPc.js +0 -122
  174. package/dist/_chunks/gestational-age-calculator-DdgbH69Z.js +0 -311
  175. package/dist/_chunks/hcg-doubling-BBqD2wI2.js +0 -170
  176. package/dist/_chunks/header-settings--pjYOe6g.js +0 -284
  177. package/dist/_chunks/isSameDay-DUEiAT0G.js +0 -39
  178. package/dist/_chunks/isSameWeek-CK4HS9lH.js +0 -14
  179. package/dist/_chunks/map-view-CsaHfoo6.js +0 -378
  180. package/dist/_chunks/pregnancy-dating-DzYTlBkT.js +0 -421
  181. package/dist/_chunks/pregnancy-weight-gain-O6J0sUIi.js +0 -322
  182. package/dist/_chunks/progress-DA413-zn.js +0 -299
  183. package/dist/_chunks/slot-grid-CQSULZjd.js +0 -502
  184. package/dist/_chunks/subDays-BcNi04uf.js +0 -8
  185. package/dist/_chunks/task-card.agent-Bt14CzUd.js +0 -25
@@ -1,421 +0,0 @@
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-CI-6SmSw.js";
7
- import { F as g } from "./form-field-M5UpX65Z.js";
8
- import { D as O } from "./date-picker-ZHejTVAJ.js";
9
- import { N as _ } from "./number-input-DrozbZAU.js";
10
- import { S as xe } from "./select-BW5ecXlX.js";
11
- import { S as Ne } from "./switch-OILsBLWo.js";
12
- import { C as M } from "./card-DPmk26CL.js";
13
- import { B as j } from "./badge-DCOqV9mI.js";
14
- import { I as Se } from "./insert-result-D074GtHX.js";
15
- import { D as k, r as Ae, c as Le, g as ke, e as Ce, f as we, A as Te, h as Ee, i as Re, j as P, G as Fe } from "./antenatal-schedule-timeline-BMMpi2lb.js";
16
- import { s as C } from "./subDays-BcNi04uf.js";
17
- import { i as Ie } from "./date-picker-variants-eL6HjWvw.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: w = !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
- ), [T, 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 = T ?? 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
- T,
77
- E,
78
- c,
79
- b,
80
- m
81
- ]), n = (p == null ? void 0 : p.result) ?? null, S = o(() => !w || !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
- w,
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: T,
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
- w ? /* @__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:flex ds:flex-wrap ds:items-start ds:gap-x-[var(--spacing-xl)] ds:gap-y-[var(--spacing-md)]", children: [
332
- /* @__PURE__ */ l("div", { className: "ds:basis-full 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-start ds:gap-[var(--spacing-xs)]", 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: we[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(Te, { 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-DzYTlBkT.js.map