@alfadocs/ui-kit 0.48.0 → 0.50.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 (180) hide show
  1. package/dist/_chunks/{address-autocomplete-CSjMrBvu.js → address-autocomplete-CT-9AOli.js} +2 -2
  2. package/dist/_chunks/{ai-consent-banner-DO5ingMq.js → ai-consent-banner-F2md5JD3.js} +2 -2
  3. package/dist/_chunks/{ai-tools-rail-CxYG04cw.js → ai-tools-rail-CYLWrRmm.js} +6 -6
  4. package/dist/_chunks/{alert-ywPR59NE.js → alert-CUTxnym2.js} +56 -35
  5. package/dist/_chunks/antenatal-schedule-timeline-CdiqkF05.js +413 -0
  6. package/dist/_chunks/{ar-DEz65ZJW.js → ar-C68WKG5a.js} +2 -2
  7. package/dist/_chunks/{audio-recorder-DC-v9YFW.js → audio-recorder-DVJXV7_k.js} +2 -2
  8. package/dist/_chunks/bishop-score-2MzAz8NE.js +185 -0
  9. package/dist/_chunks/{booking-WV2GSru5.js → booking-DljH0JkS.js} +5 -5
  10. package/dist/_chunks/circle-arrow-up-CC_85SuH.js +16 -0
  11. package/dist/_chunks/cycle-calculator-oOkj5wlB.js +252 -0
  12. package/dist/_chunks/{date-picker-Bq7xhMA-.js → date-picker-BfHblqwA.js} +2 -2
  13. package/dist/_chunks/{date-picker-variants-DLi1Va_e.js → date-picker-variants-CXEAx3O_.js} +22 -22
  14. package/dist/_chunks/{date-range-picker-DcXuI9y7.js → date-range-picker-hcAMs1wO.js} +3 -3
  15. package/dist/_chunks/{date-time-picker-RimumeLR.js → date-time-picker-H-3Pwqlb.js} +9 -9
  16. package/dist/_chunks/{de-bTBGdjPS.js → de-DK4A9_a8.js} +2 -2
  17. package/dist/_chunks/{document-scanner-BqLsGs4Y.js → document-scanner-Cxqvq7GR.js} +2 -2
  18. package/dist/_chunks/due-date-calculator-DykajWzh.js +256 -0
  19. package/dist/_chunks/{editable-currency-cell-renderer-CLil9B29.js → editable-currency-cell-renderer-Bh48OHRv.js} +2 -2
  20. package/dist/_chunks/{el-BWG5RXxa.js → el-B29HXhG5.js} +2 -2
  21. package/dist/_chunks/{es-DfO_G435.js → es-BOwPVwWn.js} +2 -2
  22. package/dist/_chunks/fetal-weight-Da-B4P4k.js +122 -0
  23. package/dist/_chunks/{fr-BTn24bs8.js → fr-DoDBtn0T.js} +2 -2
  24. package/dist/_chunks/{freemium-paywall-DzpD63WY.js → freemium-paywall-BWaLWje-.js} +2 -2
  25. package/dist/_chunks/gestational-age-calculator-Bc55hq6t.js +311 -0
  26. package/dist/_chunks/hcg-doubling-DAnpbale.js +170 -0
  27. package/dist/_chunks/{hi-Dj3oYd84.js → hi-DGByrKby.js} +2 -2
  28. package/dist/_chunks/{isSameWeek-HfxKk6Lz.js → isSameWeek-B1odL2vR.js} +2 -2
  29. package/dist/_chunks/{it-Y85ofIQQ.js → it-B16rEecm.js} +3 -3
  30. package/dist/_chunks/{ja-CQ7J6YoA.js → ja-B0viOgft.js} +2 -2
  31. package/dist/_chunks/{marketplace-app-shell-Gfsf78ge.js → marketplace-app-shell-UKSLx9K_.js} +3 -3
  32. package/dist/_chunks/{nl-D9kHCmp3.js → nl-cBxEX2QU.js} +2 -2
  33. package/dist/_chunks/{patient-search-CocVcGJ3.js → patient-search-BJOmTmDA.js} +2 -2
  34. package/dist/_chunks/{patient-shell-CnT4L8gn.js → patient-shell-DUmhXnFq.js} +2 -2
  35. package/dist/_chunks/{payment-form-BNTx4876.js → payment-form-xmeCkxas.js} +2 -2
  36. package/dist/_chunks/{pdf-viewer-G8SU6Azw.js → pdf-viewer-q1D3Uion.js} +2 -2
  37. package/dist/_chunks/{pl-B3Smqpkr.js → pl-DtS08ioY.js} +3 -3
  38. package/dist/_chunks/{practice-results-BFL_mcDW.js → practice-results-Cq1y8JFD.js} +2 -2
  39. package/dist/_chunks/pregnancy-dating-48Gfvod1.js +421 -0
  40. package/dist/_chunks/pregnancy-weight-gain-CCGrvarh.js +322 -0
  41. package/dist/_chunks/product-hub-panel-CkfZBA3t.js +620 -0
  42. package/dist/_chunks/{pt-D3J-1c_7.js → pt-yFXs1VvH.js} +2 -2
  43. package/dist/_chunks/{ro-BKAbbEA3.js → ro-DsCzSrzR.js} +2 -2
  44. package/dist/_chunks/{ru-BeG8f0Ep.js → ru-DgDxL0pc.js} +3 -3
  45. package/dist/_chunks/{sidebar-_vJXI9rB.js → sidebar-h78cTNLh.js} +440 -338
  46. package/dist/_chunks/{sign-document-DPI2pY9V.js → sign-document-CZkAf28g.js} +2 -2
  47. package/dist/_chunks/{sq-_hRPaeUy.js → sq-DHlCYN67.js} +2 -2
  48. package/dist/_chunks/subDays-Bs00akhK.js +8 -0
  49. package/dist/_chunks/{sv-g009fSpe.js → sv-O0QaQs_s.js} +2 -2
  50. package/dist/_chunks/{tr-OKUOuhMW.js → tr-BmNDRuio.js} +2 -2
  51. package/dist/_chunks/warning-stack-CXfoAT-_.js +220 -0
  52. package/dist/_chunks/{workflow-map-ZXw-zsZ8.js → workflow-map-DzX_LI4y.js} +2 -2
  53. package/dist/_chunks/{zh-CN-De4zwEhx.js → zh-CN-CgVJZEzz.js} +3 -3
  54. package/dist/agent-catalog.json +44 -1
  55. package/dist/components/_shared/antenatal-schedule-timeline.d.ts +18 -0
  56. package/dist/components/_shared/antenatal-schedule.d.ts +68 -0
  57. package/dist/components/_shared/index.d.ts +3 -0
  58. package/dist/components/_shared/obstetrics.d.ts +138 -0
  59. package/dist/components/address-autocomplete/index.js +1 -1
  60. package/dist/components/ai-consent-banner/index.js +1 -1
  61. package/dist/components/ai-tools-rail/index.js +1 -1
  62. package/dist/components/alert/alert.d.ts +2 -2
  63. package/dist/components/alert/index.js +1 -1
  64. package/dist/components/audio-recorder/index.js +1 -1
  65. package/dist/components/bishop-score/bishop-score.d.ts +27 -0
  66. package/dist/components/bishop-score/bishop.d.ts +30 -0
  67. package/dist/components/bishop-score/index.d.ts +4 -0
  68. package/dist/components/bishop-score/index.js +10 -0
  69. package/dist/components/booking/index.js +1 -1
  70. package/dist/components/cycle-calculator/cycle.d.ts +5 -0
  71. package/dist/components/cycle-calculator/index.js +1 -1
  72. package/dist/components/data-table/index.js +1 -1
  73. package/dist/components/date-picker/index.js +1 -1
  74. package/dist/components/date-range-picker/index.js +1 -1
  75. package/dist/components/date-time-picker/index.js +1 -1
  76. package/dist/components/document-scanner/index.js +1 -1
  77. package/dist/components/due-date-calculator/due-date-calculator.d.ts +19 -1
  78. package/dist/components/due-date-calculator/gestation.d.ts +1 -59
  79. package/dist/components/due-date-calculator/index.d.ts +1 -1
  80. package/dist/components/due-date-calculator/index.js +16 -10
  81. package/dist/components/fetal-weight/efw.d.ts +25 -0
  82. package/dist/components/fetal-weight/fetal-weight.d.ts +27 -0
  83. package/dist/components/fetal-weight/index.d.ts +4 -0
  84. package/dist/components/fetal-weight/index.js +6 -0
  85. package/dist/components/freemium-paywall/index.js +1 -1
  86. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +32 -1
  87. package/dist/components/gestational-age-calculator/index.js +1 -1
  88. package/dist/components/hcg-doubling/hcg-doubling.d.ts +31 -0
  89. package/dist/components/hcg-doubling/hcg.d.ts +33 -0
  90. package/dist/components/hcg-doubling/index.d.ts +4 -0
  91. package/dist/components/hcg-doubling/index.js +7 -0
  92. package/dist/components/index.d.ts +5 -0
  93. package/dist/components/patient-search/index.js +1 -1
  94. package/dist/components/payment-form/index.js +1 -1
  95. package/dist/components/pdf-viewer/index.js +1 -1
  96. package/dist/components/practice-results/index.js +1 -1
  97. package/dist/components/pregnancy-dating/index.d.ts +3 -0
  98. package/dist/components/pregnancy-dating/index.js +5 -0
  99. package/dist/components/pregnancy-dating/pregnancy-dating.d.ts +60 -0
  100. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  101. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +7 -0
  102. package/dist/components/pregnancy-weight-gain/weight-gain.d.ts +33 -8
  103. package/dist/components/product-hub-tray/index.d.ts +8 -0
  104. package/dist/components/product-hub-tray/index.js +10 -0
  105. package/dist/components/product-hub-tray/product-hub-panel.agent.d.ts +4 -0
  106. package/dist/components/product-hub-tray/product-hub-panel.d.ts +54 -0
  107. package/dist/components/product-hub-tray/product-hub-tray.agent.d.ts +4 -0
  108. package/dist/components/product-hub-tray/product-hub-tray.d.ts +115 -0
  109. package/dist/components/sidebar/index.d.ts +2 -2
  110. package/dist/components/sidebar/index.js +12 -11
  111. package/dist/components/sidebar/sidebar.d.ts +14 -1
  112. package/dist/components/sign-document/index.js +1 -1
  113. package/dist/components/warning-stack/index.js +1 -1
  114. package/dist/components/workflow/index.js +1 -1
  115. package/dist/i18n/locales/ar.d.ts +262 -1
  116. package/dist/i18n/locales/ar.js +261 -2
  117. package/dist/i18n/locales/de.d.ts +262 -1
  118. package/dist/i18n/locales/de.js +261 -2
  119. package/dist/i18n/locales/el.d.ts +262 -1
  120. package/dist/i18n/locales/el.js +261 -2
  121. package/dist/i18n/locales/en.d.ts +262 -1
  122. package/dist/i18n/locales/en.js +261 -2
  123. package/dist/i18n/locales/es.d.ts +262 -1
  124. package/dist/i18n/locales/es.js +261 -2
  125. package/dist/i18n/locales/fr.d.ts +262 -1
  126. package/dist/i18n/locales/fr.js +261 -2
  127. package/dist/i18n/locales/hi.d.ts +262 -1
  128. package/dist/i18n/locales/hi.js +261 -2
  129. package/dist/i18n/locales/it.d.ts +262 -1
  130. package/dist/i18n/locales/it.js +261 -2
  131. package/dist/i18n/locales/ja.d.ts +262 -1
  132. package/dist/i18n/locales/ja.js +261 -2
  133. package/dist/i18n/locales/nl.d.ts +262 -1
  134. package/dist/i18n/locales/nl.js +261 -2
  135. package/dist/i18n/locales/pl.d.ts +262 -1
  136. package/dist/i18n/locales/pl.js +261 -2
  137. package/dist/i18n/locales/pt.d.ts +262 -1
  138. package/dist/i18n/locales/pt.js +261 -2
  139. package/dist/i18n/locales/ro.d.ts +262 -1
  140. package/dist/i18n/locales/ro.js +261 -2
  141. package/dist/i18n/locales/ru.d.ts +262 -1
  142. package/dist/i18n/locales/ru.js +261 -2
  143. package/dist/i18n/locales/sq.d.ts +262 -1
  144. package/dist/i18n/locales/sq.js +261 -2
  145. package/dist/i18n/locales/sv.d.ts +262 -1
  146. package/dist/i18n/locales/sv.js +261 -2
  147. package/dist/i18n/locales/tr.d.ts +262 -1
  148. package/dist/i18n/locales/tr.js +261 -2
  149. package/dist/i18n/locales/zh.d.ts +262 -1
  150. package/dist/i18n/locales/zh.js +261 -2
  151. package/dist/index.js +661 -632
  152. package/dist/locales/ar.json +263 -2
  153. package/dist/locales/de.json +263 -2
  154. package/dist/locales/el.json +263 -2
  155. package/dist/locales/en.json +263 -2
  156. package/dist/locales/es.json +263 -2
  157. package/dist/locales/fr.json +263 -2
  158. package/dist/locales/hi.json +263 -2
  159. package/dist/locales/it.json +263 -2
  160. package/dist/locales/ja.json +263 -2
  161. package/dist/locales/nl.json +263 -2
  162. package/dist/locales/pl.json +263 -2
  163. package/dist/locales/pt.json +263 -2
  164. package/dist/locales/ro.json +263 -2
  165. package/dist/locales/ru.json +263 -2
  166. package/dist/locales/sq.json +263 -2
  167. package/dist/locales/sv.json +263 -2
  168. package/dist/locales/tr.json +263 -2
  169. package/dist/locales/zh.json +263 -2
  170. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  171. package/dist/patterns/patient-shell/index.js +1 -1
  172. package/dist/tokens.css +1 -1
  173. package/package.json +21 -1
  174. package/dist/_chunks/cycle-calculator-DYvGm_m1.js +0 -211
  175. package/dist/_chunks/due-date-calculator-BXd3ANj7.js +0 -216
  176. package/dist/_chunks/gestation-mWF4AXea.js +0 -50
  177. package/dist/_chunks/gestational-age-calculator-Crj6FgZw.js +0 -203
  178. package/dist/_chunks/pregnancy-weight-gain-C7dK89jE.js +0 -246
  179. package/dist/_chunks/subDays-Dv7q9S7u.js +0 -8
  180. package/dist/_chunks/warning-stack-DNR3-IbP.js +0 -180
@@ -0,0 +1,311 @@
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-CLjK-SlK.js";
7
+ import { F as x } from "./form-field-BOm9hK35.js";
8
+ import { D as w } from "./date-picker-BfHblqwA.js";
9
+ import { S as le } from "./select-hsCaJSX3.js";
10
+ import { S as se } from "./switch-BJ6HD3Mn.js";
11
+ import { C as R } from "./card-DPmk26CL.js";
12
+ import { B as T } from "./badge-zsf5i5bH.js";
13
+ import { I as ie } from "./insert-result-DNdi_JYW.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-CdiqkF05.js";
15
+ import { s as he } from "./subDays-Bs00akhK.js";
16
+ import { i as pe } from "./date-picker-variants-CXEAx3O_.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-Bc55hq6t.js.map
@@ -0,0 +1,170 @@
1
+ import { jsxs as t, jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as k, useState as p, useMemo as T, useEffect as S } from "react";
3
+ import { c as V } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as j } from "react-i18next";
5
+ import { F as f } from "./form-field-BOm9hK35.js";
6
+ import { N as L } from "./number-input-Dj5L3pXK.js";
7
+ import { D as M } from "./date-time-picker-H-3Pwqlb.js";
8
+ import { C as _ } from "./card-DPmk26CL.js";
9
+ import { B as A } from "./badge-zsf5i5bH.js";
10
+ import { I as C } from "./insert-result-DNdi_JYW.js";
11
+ const O = 1e3 * 60 * 60, z = 35;
12
+ function G(D) {
13
+ const { hcg1: r, hcg2: s, date1: d, date2: o } = D;
14
+ if (!(r > 0) || !(s > 0)) return null;
15
+ const i = (o.getTime() - d.getTime()) / O;
16
+ if (!(i > 0)) return null;
17
+ const a = s / r, v = (a - 1) * 100, c = (a ** (48 / i) - 1) * 100, x = a > 1 ? i * Math.LN2 / Math.log(a) : null, N = a <= 1 ? "plateau-falling" : c >= z ? "rising-normal" : "rising-slow";
18
+ return {
19
+ intervalHours: i,
20
+ ratio: a,
21
+ percentRise: v,
22
+ twoDayRisePercent: c,
23
+ doublingTimeHours: x,
24
+ trend: N
25
+ };
26
+ }
27
+ const K = V("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
28
+ variants: {
29
+ width: { full: "ds:w-full", auto: "ds:inline-flex" }
30
+ },
31
+ defaultVariants: { width: "full" }
32
+ }), U = {
33
+ "rising-normal": "success",
34
+ "rising-slow": "warning",
35
+ "plateau-falling": "error"
36
+ }, q = {
37
+ "rising-normal": "--success",
38
+ "rising-slow": "--warning-readable",
39
+ "plateau-falling": "--destructive"
40
+ }, J = k(
41
+ ({
42
+ defaultDate1: D,
43
+ defaultDate2: r,
44
+ onResultChange: s,
45
+ onInsert: d,
46
+ insertVariant: o = "insert",
47
+ onCopy: i,
48
+ onError: a,
49
+ insertBrand: v,
50
+ id: c,
51
+ width: x,
52
+ className: N
53
+ }, I) => {
54
+ const { t: e, i18n: w } = j(), [g, B] = p(null), [u, F] = p(D), [m, P] = p(null), [h, R] = p(r), H = T(() => /* @__PURE__ */ new Date(), []), n = T(() => g === null || m === null || !u || !h ? null : G({ hcg1: g, date1: u, hcg2: m, date2: h }), [g, u, m, h]);
55
+ S(() => {
56
+ s == null || s(n);
57
+ }, [n, s]);
58
+ const $ = T(
59
+ () => new Intl.NumberFormat(w.language, { maximumFractionDigits: 0 }),
60
+ [w.language]
61
+ ), y = (b) => b.doublingTimeHours === null ? "—" : e("hcgDoubling.hoursValue", {
62
+ hours: $.format(b.doublingTimeHours)
63
+ }), E = (b) => e("hcgDoubling.percentValue", { value: $.format(b.twoDayRisePercent) });
64
+ return /* @__PURE__ */ t(
65
+ "div",
66
+ {
67
+ ref: I,
68
+ "data-component": "hcg-doubling",
69
+ "data-component-id": c,
70
+ className: K({ width: x, className: N }),
71
+ children: [
72
+ /* @__PURE__ */ t("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
73
+ /* @__PURE__ */ l(
74
+ f,
75
+ {
76
+ label: `${e("hcgDoubling.hcg1")} (${e("hcgDoubling.units")})`,
77
+ children: /* @__PURE__ */ l(
78
+ L,
79
+ {
80
+ mode: "decimal",
81
+ min: 0,
82
+ value: g,
83
+ onChange: B
84
+ }
85
+ )
86
+ }
87
+ ),
88
+ /* @__PURE__ */ l(f, { label: e("hcgDoubling.date1"), children: /* @__PURE__ */ l(M, { value: u, onChange: F, maxDate: H }) }),
89
+ /* @__PURE__ */ l(
90
+ f,
91
+ {
92
+ label: `${e("hcgDoubling.hcg2")} (${e("hcgDoubling.units")})`,
93
+ children: /* @__PURE__ */ l(
94
+ L,
95
+ {
96
+ mode: "decimal",
97
+ min: 0,
98
+ value: m,
99
+ onChange: P
100
+ }
101
+ )
102
+ }
103
+ ),
104
+ /* @__PURE__ */ l(f, { label: e("hcgDoubling.date2"), children: /* @__PURE__ */ l(M, { value: h, onChange: R, maxDate: H }) })
105
+ ] }),
106
+ /* @__PURE__ */ l("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: n ? `${e("hcgDoubling.doublingLabel")}: ${y(n)}. ${e(
107
+ `hcgDoubling.trend.${n.trend}`
108
+ )}.` : "" }),
109
+ n ? /* @__PURE__ */ l(_, { variant: "elevated", children: /* @__PURE__ */ t(_.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
110
+ /* @__PURE__ */ t("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
111
+ /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
112
+ /* @__PURE__ */ l("dt", { className: "type-label ds:text-muted-foreground", children: e("hcgDoubling.doublingLabel") }),
113
+ /* @__PURE__ */ l("dd", { className: "type-metric ds:text-foreground", children: y(n) })
114
+ ] }),
115
+ /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
116
+ /* @__PURE__ */ l("dt", { className: "type-label ds:text-muted-foreground", children: e("hcgDoubling.riseLabel") }),
117
+ /* @__PURE__ */ l("dd", { className: "type-body ds:text-foreground", children: E(n) })
118
+ ] }),
119
+ /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-xs)] ds:text-end", children: [
120
+ /* @__PURE__ */ l("dt", { className: "type-label ds:text-muted-foreground", children: e("hcgDoubling.trendLabel") }),
121
+ /* @__PURE__ */ l("dd", { children: /* @__PURE__ */ l(A, { variant: U[n.trend], size: "lg", children: e(`hcgDoubling.trend.${n.trend}`) }) })
122
+ ] })
123
+ ] }),
124
+ /* @__PURE__ */ l("p", { className: "type-body-sm ds:text-muted-foreground", children: e("hcgDoubling.disclaimer") }),
125
+ o === "copy" || d ? /* @__PURE__ */ l(
126
+ C,
127
+ {
128
+ onInsert: d,
129
+ variant: o,
130
+ onCopy: i,
131
+ onError: a,
132
+ card: {
133
+ title: e("insert.title.hcg"),
134
+ icon: "activity",
135
+ highlight: e(`hcgDoubling.trend.${n.trend}`),
136
+ highlightToken: q[n.trend],
137
+ brand: v,
138
+ fields: [
139
+ {
140
+ icon: "clock",
141
+ label: e("hcgDoubling.doublingLabel"),
142
+ value: y(n)
143
+ },
144
+ {
145
+ icon: "trending-up",
146
+ label: e("hcgDoubling.riseLabel"),
147
+ value: E(n)
148
+ },
149
+ {
150
+ icon: "tag",
151
+ label: e("hcgDoubling.trendLabel"),
152
+ value: e(`hcgDoubling.trend.${n.trend}`)
153
+ }
154
+ ]
155
+ }
156
+ }
157
+ ) : null
158
+ ] }) }) : /* @__PURE__ */ l("p", { className: "type-body ds:text-muted-foreground", children: e("hcgDoubling.empty") })
159
+ ]
160
+ }
161
+ );
162
+ }
163
+ );
164
+ J.displayName = "HcgDoubling";
165
+ export {
166
+ J as H,
167
+ z as M,
168
+ G as a
169
+ };
170
+ //# sourceMappingURL=hcg-doubling-DAnpbale.js.map
@@ -1,4 +1,4 @@
1
- import { r as o, q as s, v as r, w as u } from "./date-picker-variants-DLi1Va_e.js";
1
+ import { r as o, q as s, v as r, w as u } from "./date-picker-variants-CXEAx3O_.js";
2
2
  const d = {
3
3
  locale: {
4
4
  1: "१",
@@ -430,4 +430,4 @@ const y = {
430
430
  export {
431
431
  H as hi
432
432
  };
433
- //# sourceMappingURL=hi-Dj3oYd84.js.map
433
+ //# sourceMappingURL=hi-DGByrKby.js.map
@@ -1,5 +1,5 @@
1
1
  import { n as l } from "./isSameDay-DUEiAT0G.js";
2
- import { s as r } from "./date-picker-variants-DLi1Va_e.js";
2
+ import { s as r } from "./date-picker-variants-CXEAx3O_.js";
3
3
  function i(a, m, e) {
4
4
  const [t, f] = l(
5
5
  e == null ? void 0 : e.in,
@@ -11,4 +11,4 @@ function i(a, m, e) {
11
11
  export {
12
12
  i
13
13
  };
14
- //# sourceMappingURL=isSameWeek-HfxKk6Lz.js.map
14
+ //# sourceMappingURL=isSameWeek-B1odL2vR.js.map
@@ -1,5 +1,5 @@
1
- import { q as s, r as i, v as r, w as l } from "./date-picker-variants-DLi1Va_e.js";
2
- import { i as d } from "./isSameWeek-HfxKk6Lz.js";
1
+ import { q as s, r as i, v as r, w as l } from "./date-picker-variants-CXEAx3O_.js";
2
+ import { i as d } from "./isSameWeek-B1odL2vR.js";
3
3
  const c = {
4
4
  lessThanXSeconds: {
5
5
  one: "meno di un secondo",
@@ -398,4 +398,4 @@ const P = {
398
398
  export {
399
399
  I as it
400
400
  };
401
- //# sourceMappingURL=it-Y85ofIQQ.js.map
401
+ //# sourceMappingURL=it-B16rEecm.js.map
@@ -1,4 +1,4 @@
1
- import { q as s, r as o, v as i, w as d } from "./date-picker-variants-DLi1Va_e.js";
1
+ import { q as s, r as o, v as i, w as d } from "./date-picker-variants-CXEAx3O_.js";
2
2
  const u = {
3
3
  lessThanXSeconds: {
4
4
  one: "1秒未満",
@@ -363,4 +363,4 @@ const u = {
363
363
  export {
364
364
  L as ja
365
365
  };
366
- //# sourceMappingURL=ja-CQ7J6YoA.js.map
366
+ //# sourceMappingURL=ja-B0viOgft.js.map
@@ -4,14 +4,14 @@ import { useTranslation as M } from "react-i18next";
4
4
  import { c as p } from "./index-D2ZczOXr.js";
5
5
  import { A as E } from "./app-frame-BYx1gcV7.js";
6
6
  import { A as $ } from "./avatar-BNQNhoyL.js";
7
- import { A as D } from "./alert-ywPR59NE.js";
7
+ import { A as D } from "./alert-CUTxnym2.js";
8
8
  import { C } from "./card-DPmk26CL.js";
9
9
  import { D as i } from "./dropdown-menu-CUEXqKis.js";
10
10
  import { T as F } from "./tab-bar-Xetknddo.js";
11
11
  import { a as S, H as q, g as G, f as w, e as J, c as K, d as Q } from "./header-Ce1Br27u.js";
12
12
  import { H as U } from "./header-settings-Bx0Biimh.js";
13
13
  import { S as X } from "./sign-in-with-alfadocs-button-CuYn_kKP.js";
14
- import { S as Y, a as Z, j as _, k as ee, i as ae, h as A } from "./sidebar-_vJXI9rB.js";
14
+ import { S as Y, a as Z, j as _, k as ee, i as ae, h as A } from "./sidebar-h78cTNLh.js";
15
15
  import { T as se } from "./theme-root-BOO73p5t.js";
16
16
  import { a as te } from "./tooltip-DvmfrNvB.js";
17
17
  import { u as re } from "./use-theme-C2dHKUAN.js";
@@ -425,4 +425,4 @@ export {
425
425
  pe as M,
426
426
  h as P
427
427
  };
428
- //# sourceMappingURL=marketplace-app-shell-Gfsf78ge.js.map
428
+ //# sourceMappingURL=marketplace-app-shell-UKSLx9K_.js.map
@@ -1,4 +1,4 @@
1
- import { q as d, r as n, v as r, w as s } from "./date-picker-variants-DLi1Va_e.js";
1
+ import { q as d, r as n, v as r, w as s } from "./date-picker-variants-CXEAx3O_.js";
2
2
  const m = {
3
3
  lessThanXSeconds: {
4
4
  one: "minder dan een seconde",
@@ -323,4 +323,4 @@ const m = {
323
323
  export {
324
324
  S as nl
325
325
  };
326
- //# sourceMappingURL=nl-D9kHCmp3.js.map
326
+ //# sourceMappingURL=nl-cBxEX2QU.js.map
@@ -6,7 +6,7 @@ import { A as se } from "./autocomplete-CDqxB68B.js";
6
6
  import { B as ue } from "./button-DD_0Xdmr.js";
7
7
  import { C as M } from "./card-DPmk26CL.js";
8
8
  import { S as fe } from "./slider-BHWzXdjt.js";
9
- import { A as Z } from "./alert-ywPR59NE.js";
9
+ import { A as Z } from "./alert-CUTxnym2.js";
10
10
  import { D as F } from "./dropdown-menu-CUEXqKis.js";
11
11
  import { u as pe } from "./registry-nPAVE19X.js";
12
12
  import { S as re } from "./search-BonnQsHv.js";
@@ -1155,4 +1155,4 @@ export {
1155
1155
  Oe as P,
1156
1156
  ye as p
1157
1157
  };
1158
- //# sourceMappingURL=patient-search-CocVcGJ3.js.map
1158
+ //# sourceMappingURL=patient-search-BJOmTmDA.js.map
@@ -6,7 +6,7 @@ import { I as C } from "./icon-button-CKEOrN37.js";
6
6
  import { D as i } from "./dropdown-menu-CUEXqKis.js";
7
7
  import { H, g as x, f as N, e as B, a as M, c as T, d as O } from "./header-Ce1Br27u.js";
8
8
  import { L as P } from "./logo-yituK7sE.js";
9
- import { S as W, a as j, h as R, j as _, k as z, i as D } from "./sidebar-_vJXI9rB.js";
9
+ import { S as W, a as j, h as R, j as _, k as z, i as D } from "./sidebar-h78cTNLh.js";
10
10
  import { T as E } from "./theme-root-BOO73p5t.js";
11
11
  import { a as q } from "./tooltip-DvmfrNvB.js";
12
12
  import { u as F } from "./use-theme-C2dHKUAN.js";
@@ -171,4 +171,4 @@ $.displayName = "PatientShell";
171
171
  export {
172
172
  $ as P
173
173
  };
174
- //# sourceMappingURL=patient-shell-CnT4L8gn.js.map
174
+ //# sourceMappingURL=patient-shell-DUmhXnFq.js.map
@@ -3,7 +3,7 @@ import { forwardRef as de, useState as _, useEffect as D, useRef as G, useMemo a
3
3
  import { c as A } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as W } from "react-i18next";
5
5
  import { S as te } from "./spinner-OjQNn8oN.js";
6
- import { A as ee } from "./alert-ywPR59NE.js";
6
+ import { A as ee } from "./alert-CUTxnym2.js";
7
7
  import { loadStripe as ue } from "@stripe/stripe-js";
8
8
  import { Elements as pe, useStripe as fe, useElements as be, PaymentElement as ye, AddressElement as ge } from "@stripe/react-stripe-js";
9
9
  import { u as ve } from "./registry-nPAVE19X.js";
@@ -668,4 +668,4 @@ export {
668
668
  we as p,
669
669
  se as s
670
670
  };
671
- //# sourceMappingURL=payment-form-BNTx4876.js.map
671
+ //# sourceMappingURL=payment-form-xmeCkxas.js.map
@@ -6,7 +6,7 @@ import { useTranslation as pe } from "react-i18next";
6
6
  import * as ee from "@radix-ui/react-popover";
7
7
  import Ce from "pdfjs-dist/legacy/build/pdf.worker.min.mjs?url";
8
8
  import { S as Ze } from "./spinner-OjQNn8oN.js";
9
- import { A as we } from "./alert-ywPR59NE.js";
9
+ import { A as we } from "./alert-CUTxnym2.js";
10
10
  import { u as Ke } from "./registry-nPAVE19X.js";
11
11
  import { X as Be } from "./x-CCcI3eJp.js";
12
12
  import { C as He } from "./chevron-left-CX1jqD2M.js";
@@ -957,4 +957,4 @@ export {
957
957
  at as P,
958
958
  Ge as p
959
959
  };
960
- //# sourceMappingURL=pdf-viewer-G8SU6Azw.js.map
960
+ //# sourceMappingURL=pdf-viewer-q1D3Uion.js.map
@@ -1,5 +1,5 @@
1
- import { q as s, r as a, v as r, w as l } from "./date-picker-variants-DLi1Va_e.js";
2
- import { i as p } from "./isSameWeek-HfxKk6Lz.js";
1
+ import { q as s, r as a, v as r, w as l } from "./date-picker-variants-CXEAx3O_.js";
2
+ import { i as p } from "./isSameWeek-B1odL2vR.js";
3
3
  const w = {
4
4
  lessThanXSeconds: {
5
5
  one: {
@@ -511,4 +511,4 @@ const I = {
511
511
  export {
512
512
  Z as pl
513
513
  };
514
- //# sourceMappingURL=pl-B3Smqpkr.js.map
514
+ //# sourceMappingURL=pl-DtS08ioY.js.map
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as p, Fragment as Ge } from "react/jsx-runtime";
2
2
  import { forwardRef as Ze, useState as me, useRef as I, useMemo as D, useImperativeHandle as Qe, useCallback as B, useEffect as J } from "react";
3
3
  import { c as Z } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as C } from "react-i18next";
5
- import { A as Y } from "./alert-ywPR59NE.js";
5
+ import { A as Y } from "./alert-CUTxnym2.js";
6
6
  import { A as ke } from "./avatar-BNQNhoyL.js";
7
7
  import { B as G } from "./button-DD_0Xdmr.js";
8
8
  import { D as H } from "./dropdown-menu-CUEXqKis.js";
@@ -1570,4 +1570,4 @@ export {
1570
1570
  Ct as P,
1571
1571
  rt as p
1572
1572
  };
1573
- //# sourceMappingURL=practice-results-BFL_mcDW.js.map
1573
+ //# sourceMappingURL=practice-results-Cq1y8JFD.js.map