@alfadocs/ui-kit 0.44.0 → 0.46.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 (121) hide show
  1. package/dist/_chunks/{alia-sidebar-BpX4z_af.js → alia-sidebar-Be8FhKYd.js} +332 -237
  2. package/dist/_chunks/{autocomplete-DIgdhCGJ.js → autocomplete-CDqxB68B.js} +2 -2
  3. package/dist/_chunks/bmi-calculator-CQqXTVNL.js +258 -0
  4. package/dist/_chunks/{booking-CtLwaxkK.js → booking-DlDVuWMd.js} +2 -2
  5. package/dist/_chunks/{cycle-calculator-ChHBcjet.js → cycle-calculator-KxA8dqDf.js} +31 -20
  6. package/dist/_chunks/{due-date-calculator-CYXKLoof.js → due-date-calculator-mFxpHLml.js} +51 -39
  7. package/dist/_chunks/{editable-currency-cell-renderer-9jqwDv5x.js → editable-currency-cell-renderer-BEBUQl9P.js} +2 -2
  8. package/dist/_chunks/{freemium-paywall-BLXESpH4.js → freemium-paywall-DzpD63WY.js} +2 -2
  9. package/dist/_chunks/{gestational-age-calculator-sRmoqgVr.js → gestational-age-calculator-gWI_uRA1.js} +52 -39
  10. package/dist/_chunks/insert-result-C5ABnzDl.js +711 -0
  11. package/dist/_chunks/{marketplace-app-shell-Dc5cTIt8.js → marketplace-app-shell-Gfsf78ge.js} +2 -2
  12. package/dist/_chunks/{patient-search-DPe2ZYEL.js → patient-search-CocVcGJ3.js} +2 -2
  13. package/dist/_chunks/payment-form-BNTx4876.js +671 -0
  14. package/dist/_chunks/{pdf-viewer-B6MC6VTx.js → pdf-viewer-CWEXTlwq.js} +2 -2
  15. package/dist/_chunks/{practice-results-CrLpEiiW.js → practice-results-DDi-kvaD.js} +2 -2
  16. package/dist/_chunks/{pregnancy-weight-gain-C5YhfYnL.js → pregnancy-weight-gain-BtEHaSqy.js} +26 -13
  17. package/dist/_chunks/{search-bar-CP6wUJFY.js → search-bar-CvN_S0jW.js} +2 -2
  18. package/dist/_chunks/{search-input-C1C3jQpD.js → search-input-D3aMvi4l.js} +2 -2
  19. package/dist/_chunks/{sign-document-B-3k_0LO.js → sign-document-BCyLpFHJ.js} +2 -2
  20. package/dist/_chunks/{sign-in-with-alfadocs-button-DeHBFRNS.js → sign-in-with-alfadocs-button-CuYn_kKP.js} +2 -2
  21. package/dist/_chunks/{social-sign-in-button-X54ySJr1.js → social-sign-in-button-uJYLM366.js} +2 -2
  22. package/dist/_chunks/{spinner-CCByyvcb.js → spinner-OjQNn8oN.js} +7 -3
  23. package/dist/_chunks/{transcript-panel-CR7VY1uw.js → transcript-panel-B4HiC7ed.js} +2 -2
  24. package/dist/_chunks/{unit-converter-Ds9jalbN.js → unit-converter-u3CwNDpP.js} +63 -52
  25. package/dist/_chunks/{wallet-pay-button-DK4ESYge.js → wallet-pay-button-DuDPBlCO.js} +2 -2
  26. package/dist/agent-catalog.json +1 -1
  27. package/dist/components/_shared/banded-gauge.d.ts +193 -0
  28. package/dist/components/_shared/insert-result.d.ts +81 -8
  29. package/dist/components/autocomplete/index.js +1 -1
  30. package/dist/components/bmi-calculator/bmi-calculator.d.ts +2 -2
  31. package/dist/components/bmi-calculator/index.js +1 -1
  32. package/dist/components/booking/index.js +1 -1
  33. package/dist/components/cycle-calculator/cycle-calculator.d.ts +2 -2
  34. package/dist/components/cycle-calculator/index.js +1 -1
  35. package/dist/components/data-table/index.js +1 -1
  36. package/dist/components/due-date-calculator/due-date-calculator.d.ts +2 -2
  37. package/dist/components/due-date-calculator/index.js +1 -1
  38. package/dist/components/freemium-paywall/index.js +1 -1
  39. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +2 -2
  40. package/dist/components/gestational-age-calculator/index.js +1 -1
  41. package/dist/components/patient-search/index.js +1 -1
  42. package/dist/components/payment-form/index.js +1 -1
  43. package/dist/components/payment-form/payment-form.d.ts +30 -2
  44. package/dist/components/pdf-viewer/index.js +1 -1
  45. package/dist/components/practice-results/index.js +1 -1
  46. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  47. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +2 -2
  48. package/dist/components/search-bar/index.js +1 -1
  49. package/dist/components/search-input/index.js +1 -1
  50. package/dist/components/sign-document/index.js +1 -1
  51. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  52. package/dist/components/social-sign-in-button/index.js +1 -1
  53. package/dist/components/spinner/index.js +1 -1
  54. package/dist/components/spinner/spinner.d.ts +2 -2
  55. package/dist/components/transcript-panel/index.js +1 -1
  56. package/dist/components/unit-converter/index.js +1 -1
  57. package/dist/components/unit-converter/unit-converter.d.ts +2 -2
  58. package/dist/components/wallet-pay-button/index.js +1 -1
  59. package/dist/i18n/locales/ar.d.ts +1 -1
  60. package/dist/i18n/locales/ar.js +1 -1
  61. package/dist/i18n/locales/de.d.ts +1 -1
  62. package/dist/i18n/locales/de.js +1 -1
  63. package/dist/i18n/locales/el.d.ts +1 -1
  64. package/dist/i18n/locales/el.js +1 -1
  65. package/dist/i18n/locales/en.d.ts +1 -1
  66. package/dist/i18n/locales/en.js +1 -1
  67. package/dist/i18n/locales/es.d.ts +1 -1
  68. package/dist/i18n/locales/es.js +1 -1
  69. package/dist/i18n/locales/fr.d.ts +1 -1
  70. package/dist/i18n/locales/fr.js +1 -1
  71. package/dist/i18n/locales/hi.d.ts +1 -1
  72. package/dist/i18n/locales/hi.js +1 -1
  73. package/dist/i18n/locales/it.d.ts +1 -1
  74. package/dist/i18n/locales/it.js +1 -1
  75. package/dist/i18n/locales/ja.d.ts +1 -1
  76. package/dist/i18n/locales/ja.js +1 -1
  77. package/dist/i18n/locales/nl.d.ts +1 -1
  78. package/dist/i18n/locales/nl.js +1 -1
  79. package/dist/i18n/locales/pl.d.ts +1 -1
  80. package/dist/i18n/locales/pl.js +1 -1
  81. package/dist/i18n/locales/pt.d.ts +1 -1
  82. package/dist/i18n/locales/pt.js +1 -1
  83. package/dist/i18n/locales/ro.d.ts +1 -1
  84. package/dist/i18n/locales/ro.js +1 -1
  85. package/dist/i18n/locales/ru.d.ts +1 -1
  86. package/dist/i18n/locales/ru.js +1 -1
  87. package/dist/i18n/locales/sq.d.ts +1 -1
  88. package/dist/i18n/locales/sq.js +1 -1
  89. package/dist/i18n/locales/sv.d.ts +1 -1
  90. package/dist/i18n/locales/sv.js +1 -1
  91. package/dist/i18n/locales/tr.d.ts +1 -1
  92. package/dist/i18n/locales/tr.js +1 -1
  93. package/dist/i18n/locales/zh.d.ts +1 -1
  94. package/dist/i18n/locales/zh.js +1 -1
  95. package/dist/index.js +25 -25
  96. package/dist/locales/ar.json +1 -1
  97. package/dist/locales/de.json +1 -1
  98. package/dist/locales/el.json +1 -1
  99. package/dist/locales/en.json +1 -1
  100. package/dist/locales/es.json +1 -1
  101. package/dist/locales/fr.json +1 -1
  102. package/dist/locales/hi.json +1 -1
  103. package/dist/locales/it.json +1 -1
  104. package/dist/locales/ja.json +1 -1
  105. package/dist/locales/nl.json +1 -1
  106. package/dist/locales/pl.json +1 -1
  107. package/dist/locales/pt.json +1 -1
  108. package/dist/locales/ro.json +1 -1
  109. package/dist/locales/ru.json +1 -1
  110. package/dist/locales/sq.json +1 -1
  111. package/dist/locales/sv.json +1 -1
  112. package/dist/locales/tr.json +1 -1
  113. package/dist/locales/zh.json +1 -1
  114. package/dist/patterns/alia-assistant/alia-types.d.ts +20 -0
  115. package/dist/patterns/alia-assistant/index.js +1 -1
  116. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  117. package/dist/tokens.css +1 -1
  118. package/package.json +1 -1
  119. package/dist/_chunks/bmi-calculator-DFPWL2OJ.js +0 -273
  120. package/dist/_chunks/insert-result-CoC1oo6R.js +0 -334
  121. package/dist/_chunks/payment-form-BzVsG6Ks.js +0 -590
@@ -4,7 +4,7 @@ import { _ as f } from "./index-4xgbg-sn.js";
4
4
  import * as T from "@radix-ui/react-popover";
5
5
  import { c as A } from "./index-D2ZczOXr.js";
6
6
  import { useTranslation as Ze } from "react-i18next";
7
- import { S as pe } from "./spinner-CCByyvcb.js";
7
+ import { S as pe } from "./spinner-OjQNn8oN.js";
8
8
  import { u as et } from "./form-field-context-B3APVHKx.js";
9
9
  import { u as tt } from "./use-controllable-state-BiY4xTzM.js";
10
10
  import { g as st } from "./group-options-BvKhQ3xb.js";
@@ -466,4 +466,4 @@ export {
466
466
  it as a,
467
467
  dt as b
468
468
  };
469
- //# sourceMappingURL=autocomplete-DIgdhCGJ.js.map
469
+ //# sourceMappingURL=autocomplete-CDqxB68B.js.map
@@ -0,0 +1,258 @@
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as Z, useId as aa, useState as r, useMemo as A, useEffect as ea } from "react";
3
+ import { c as la } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as ta } from "react-i18next";
5
+ import { R as H } from "./radio-TWf9Q-mp.js";
6
+ import { R as ia } from "./radio-group-CLjK-SlK.js";
7
+ import { F as D } from "./form-field-BOm9hK35.js";
8
+ import { N as p } from "./number-input-Dj5L3pXK.js";
9
+ import { C as M } from "./card-DPmk26CL.js";
10
+ import { B as na } from "./badge-zsf5i5bH.js";
11
+ import { B as ra, I as sa, b as oa } from "./insert-result-C5ABnzDl.js";
12
+ import { b as ca, e as ma, c as da, f as O, l as W, k as ua } from "./bmi-BxD-tFzU.js";
13
+ const ga = la("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
14
+ variants: {
15
+ width: {
16
+ full: "ds:w-full",
17
+ auto: "ds:inline-flex"
18
+ }
19
+ },
20
+ defaultVariants: { width: "full" }
21
+ }), ba = {
22
+ underweight: "info",
23
+ normal: "success",
24
+ overweight: "warning",
25
+ obese: "error"
26
+ }, ha = {
27
+ underweight: "--info",
28
+ normal: "--success",
29
+ overweight: "--warning-readable",
30
+ obese: "--destructive"
31
+ }, f = (v) => Math.round(v * 10) / 10, pa = Z(
32
+ ({
33
+ defaultUnitSystem: v = "metric",
34
+ onResultChange: g,
35
+ onInsert: L,
36
+ insertVariant: N = "insert",
37
+ onCopy: j,
38
+ onError: z,
39
+ insertBrand: R,
40
+ id: U,
41
+ width: V,
42
+ className: Y
43
+ }, _) => {
44
+ const { t: a, i18n: w } = ta(), B = aa(), [s, q] = r(v), [b, F] = r(null), [h, I] = r(null), [o, T] = r(null), [c, k] = r(null), [m, $] = r(null), J = (C) => {
45
+ const u = C;
46
+ if (u !== s) {
47
+ if (u === "imperial") {
48
+ if (b !== null) {
49
+ const { ft: y, in: x } = da(b);
50
+ T(y), k(f(x));
51
+ }
52
+ h !== null && $(f(ua(h)));
53
+ } else
54
+ (o !== null || c !== null) && F(f(O(o ?? 0, c ?? 0))), m !== null && I(f(W(m)));
55
+ q(u);
56
+ }
57
+ }, P = s === "metric" ? b : o !== null || c !== null ? O(o ?? 0, c ?? 0) : null, Q = s === "metric" ? h : m !== null ? W(m) : null, i = ma(Q, P), t = i !== null ? ca(i) : null, G = A(
58
+ () => new Intl.NumberFormat(w.language, {
59
+ minimumFractionDigits: 1,
60
+ maximumFractionDigits: 1
61
+ }),
62
+ [w.language]
63
+ );
64
+ ea(() => {
65
+ g == null || g(
66
+ i !== null && t !== null ? { bmi: i, category: t } : null
67
+ );
68
+ }, [i, t, g]);
69
+ const d = s === "metric", l = A(() => {
70
+ if (i === null || t === null) return null;
71
+ const { bands: C, min: u, max: y, ticks: x } = oa(), S = G.format(i), E = a(`bmiCalculator.category.${t}`), K = a(`bmiCalculator.range.${t}`), X = a("bmiCalculator.gaugeAria", {
72
+ bmi: S,
73
+ category: E,
74
+ range: K
75
+ });
76
+ return {
77
+ value: i,
78
+ bands: C,
79
+ min: u,
80
+ max: y,
81
+ ticks: x,
82
+ valueLabel: S,
83
+ categoryLabel: E,
84
+ rangeLabel: K,
85
+ ariaLabel: X
86
+ };
87
+ }, [i, t, G, a]);
88
+ return /* @__PURE__ */ n(
89
+ "div",
90
+ {
91
+ ref: _,
92
+ "data-component": "bmi-calculator",
93
+ "data-component-id": U,
94
+ className: ga({ width: V, className: Y }),
95
+ children: [
96
+ /* @__PURE__ */ n(
97
+ ia,
98
+ {
99
+ label: a("bmiCalculator.unitSystem.label"),
100
+ variant: "horizontal",
101
+ value: s,
102
+ onValueChange: J,
103
+ children: [
104
+ /* @__PURE__ */ e(H, { label: a("bmiCalculator.unitSystem.metric"), value: "metric" }),
105
+ /* @__PURE__ */ e(
106
+ H,
107
+ {
108
+ label: a("bmiCalculator.unitSystem.imperial"),
109
+ value: "imperial"
110
+ }
111
+ )
112
+ ]
113
+ }
114
+ ),
115
+ /* @__PURE__ */ n("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
116
+ d ? /* @__PURE__ */ e(
117
+ D,
118
+ {
119
+ label: `${a("bmiCalculator.height")} (${a("bmiCalculator.units.cm")})`,
120
+ children: /* @__PURE__ */ e(
121
+ p,
122
+ {
123
+ mode: "decimal",
124
+ min: 0,
125
+ step: 0.5,
126
+ value: b,
127
+ onChange: F
128
+ }
129
+ )
130
+ }
131
+ ) : /* @__PURE__ */ n("div", { role: "group", "aria-labelledby": B, children: [
132
+ /* @__PURE__ */ e(
133
+ "span",
134
+ {
135
+ id: B,
136
+ className: "type-label ds:mb-[var(--spacing-xs)] ds:block ds:text-foreground",
137
+ children: a("bmiCalculator.height")
138
+ }
139
+ ),
140
+ /* @__PURE__ */ n("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
141
+ /* @__PURE__ */ e(
142
+ p,
143
+ {
144
+ mode: "integer",
145
+ min: 0,
146
+ value: o,
147
+ onChange: T,
148
+ "aria-label": a("bmiCalculator.feet")
149
+ }
150
+ ),
151
+ /* @__PURE__ */ e("span", { className: "type-label ds:text-muted-foreground", children: a("bmiCalculator.units.ft") }),
152
+ /* @__PURE__ */ e(
153
+ p,
154
+ {
155
+ mode: "decimal",
156
+ min: 0,
157
+ max: 11.9,
158
+ step: 0.5,
159
+ value: c,
160
+ onChange: k,
161
+ "aria-label": a("bmiCalculator.inches")
162
+ }
163
+ ),
164
+ /* @__PURE__ */ e("span", { className: "type-label ds:text-muted-foreground", children: a("bmiCalculator.units.in") })
165
+ ] })
166
+ ] }),
167
+ /* @__PURE__ */ e(
168
+ D,
169
+ {
170
+ label: `${a("bmiCalculator.weight")} (${a(
171
+ d ? "bmiCalculator.units.kg" : "bmiCalculator.units.lb"
172
+ )})`,
173
+ children: /* @__PURE__ */ e(
174
+ p,
175
+ {
176
+ mode: "decimal",
177
+ min: 0,
178
+ step: d ? 0.1 : 0.5,
179
+ value: d ? h : m,
180
+ onChange: d ? I : $
181
+ }
182
+ )
183
+ }
184
+ )
185
+ ] }),
186
+ /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: l ? l.ariaLabel : "" }),
187
+ i !== null && t !== null && l !== null ? /* @__PURE__ */ e(M, { variant: "elevated", children: /* @__PURE__ */ n(M.Body, { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-md)]", children: [
188
+ /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
189
+ /* @__PURE__ */ e("span", { className: "type-label ds:text-muted-foreground", children: a("bmiCalculator.category.label") }),
190
+ /* @__PURE__ */ e(na, { variant: ba[t], size: "lg", children: a(`bmiCalculator.category.${t}`) }),
191
+ /* @__PURE__ */ e("p", { className: "type-body ds:text-muted-foreground", children: l.rangeLabel })
192
+ ] }),
193
+ /* @__PURE__ */ e(
194
+ "div",
195
+ {
196
+ "data-bmi-category": t,
197
+ className: "ds:w-full ds:max-w-[320px]",
198
+ children: /* @__PURE__ */ e(ra, { model: l, className: "ds:w-full" })
199
+ }
200
+ ),
201
+ N === "copy" || L ? /* @__PURE__ */ e(
202
+ sa,
203
+ {
204
+ onInsert: L,
205
+ variant: N,
206
+ onCopy: j,
207
+ onError: z,
208
+ card: {
209
+ title: a("insert.title.bmi"),
210
+ icon: "scale",
211
+ highlight: a(`bmiCalculator.category.${t}`),
212
+ // Chip shares the WHO-category semantic token so the
213
+ // inserted PNG chip matches the on-screen band colour.
214
+ highlightToken: ha[t],
215
+ brand: R,
216
+ // Banded gauge: the SAME geometry + WHO bands as the
217
+ // on-screen widget, baked into the card PNG with
218
+ // probe-resolved theme colours.
219
+ gauge: {
220
+ variant: "banded",
221
+ value: i,
222
+ bands: l.bands,
223
+ min: l.min,
224
+ max: l.max,
225
+ valueLabel: l.valueLabel,
226
+ categoryLabel: l.categoryLabel,
227
+ rangeLabel: l.rangeLabel,
228
+ ariaLabel: l.ariaLabel,
229
+ ticks: l.ticks
230
+ },
231
+ fields: [
232
+ {
233
+ // Mirrors the on-screen scale glyph + header icon.
234
+ icon: "scale",
235
+ label: a("insert.title.bmi"),
236
+ value: l.valueLabel
237
+ },
238
+ {
239
+ // WHO band is a classification → tag glyph.
240
+ icon: "tag",
241
+ label: a("bmiCalculator.category.label"),
242
+ value: l.categoryLabel
243
+ }
244
+ ]
245
+ }
246
+ }
247
+ ) : null
248
+ ] }) }) : /* @__PURE__ */ e("p", { className: "type-body ds:text-muted-foreground", children: a("bmiCalculator.empty") })
249
+ ]
250
+ }
251
+ );
252
+ }
253
+ );
254
+ pa.displayName = "BmiCalculator";
255
+ export {
256
+ pa as B
257
+ };
258
+ //# sourceMappingURL=bmi-calculator-CQqXTVNL.js.map
@@ -13,7 +13,7 @@ import { F as Z } from "./form-field-BOm9hK35.js";
13
13
  import { P as Lt } from "./phone-input-DfZbPPvh.js";
14
14
  import { T as Rt } from "./text-area-BIx0tZ05.js";
15
15
  import { T as Ce } from "./text-input-BaClJL8Y.js";
16
- import { S as Ft } from "./spinner-CCByyvcb.js";
16
+ import { S as Ft } from "./spinner-OjQNn8oN.js";
17
17
  import { I as tt } from "./icon-button-CKEOrN37.js";
18
18
  import { S as Oe } from "./select-hsCaJSX3.js";
19
19
  import { C as Ge } from "./combobox-BC-DFx8G.js";
@@ -2697,4 +2697,4 @@ export {
2697
2697
  X as O,
2698
2698
  Da as b
2699
2699
  };
2700
- //# sourceMappingURL=booking-CtLwaxkK.js.map
2700
+ //# sourceMappingURL=booking-DlDVuWMd.js.map
@@ -1,5 +1,5 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as F, useState as L, useMemo as h, useEffect as H } from "react";
2
+ import { forwardRef as F, useState as L, useMemo as y, useEffect as H } from "react";
3
3
  import { c as $ } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as A } from "react-i18next";
5
5
  import { F as w } from "./form-field-BOm9hK35.js";
@@ -7,7 +7,7 @@ import { D as I } from "./date-picker-Bq7xhMA-.js";
7
7
  import { N as S } from "./number-input-Dj5L3pXK.js";
8
8
  import { C as P } from "./card-DPmk26CL.js";
9
9
  import { B as v } from "./badge-zsf5i5bH.js";
10
- import { I as k } from "./insert-result-CoC1oo6R.js";
10
+ import { I as k } from "./insert-result-C5ABnzDl.js";
11
11
  import { a as s } from "./date-picker-variants-DLi1Va_e.js";
12
12
  import { C as z } from "./check-DPdL_Sm7.js";
13
13
  import { H as B } from "./heart-C0faivFf.js";
@@ -28,14 +28,14 @@ const Y = [
28
28
  ]
29
29
  ], j = G("droplet", Y), x = 28, M = 14, U = 1;
30
30
  function K(n, c = 3) {
31
- const d = n.cycleLength ?? x, { lastPeriodStart: i } = n, o = s(i, d - M), u = {
32
- start: s(o, -5),
33
- end: s(o, U)
34
- }, f = s(i, d), p = Array.from(
31
+ const d = n.cycleLength ?? x, { lastPeriodStart: o } = n, i = s(o, d - M), u = {
32
+ start: s(i, -5),
33
+ end: s(i, U)
34
+ }, f = s(o, d), p = Array.from(
35
35
  { length: c },
36
- (C, g) => s(i, d * (g + 1))
36
+ (C, g) => s(o, d * (g + 1))
37
37
  );
38
- return { nextPeriod: f, ovulation: o, fertileWindow: u, upcomingPeriods: p };
38
+ return { nextPeriod: f, ovulation: i, fertileWindow: u, upcomingPeriods: p };
39
39
  }
40
40
  const O = $("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
41
41
  variants: {
@@ -47,27 +47,27 @@ const O = $("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
47
47
  defaultCycleLength: n = x,
48
48
  onResultChange: c,
49
49
  onInsert: d,
50
- insertVariant: i = "insert",
51
- onCopy: o,
50
+ insertVariant: o = "insert",
51
+ onCopy: i,
52
52
  onError: u,
53
53
  insertBrand: f,
54
54
  id: p,
55
55
  width: C,
56
56
  className: g
57
57
  }, b) => {
58
- const { t: a, i18n: N } = A(), [m, D] = L(void 0), [y, E] = L(
58
+ const { t: a, i18n: N } = A(), [m, D] = L(void 0), [h, E] = L(
59
59
  n
60
- ), t = h(() => m ? K({
60
+ ), t = y(() => m ? K({
61
61
  lastPeriodStart: m,
62
- cycleLength: y ?? x
63
- }) : null, [m, y]), T = h(
62
+ cycleLength: h ?? x
63
+ }) : null, [m, h]), T = y(
64
64
  () => new Intl.DateTimeFormat(N.language, { dateStyle: "medium" }),
65
65
  [N.language]
66
66
  );
67
67
  H(() => {
68
68
  c == null || c(t);
69
69
  }, [t, c]);
70
- const _ = h(() => /* @__PURE__ */ new Date(), []), l = (W) => T.format(W);
70
+ const _ = y(() => /* @__PURE__ */ new Date(), []), l = (W) => T.format(W);
71
71
  return /* @__PURE__ */ r(
72
72
  "div",
73
73
  {
@@ -96,7 +96,7 @@ const O = $("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
96
96
  mode: "integer",
97
97
  min: 20,
98
98
  max: 45,
99
- value: y,
99
+ value: h,
100
100
  onChange: E
101
101
  }
102
102
  )
@@ -150,15 +150,16 @@ const O = $("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
150
150
  ) })
151
151
  ] })
152
152
  ] }),
153
- i === "copy" || d ? /* @__PURE__ */ e(
153
+ o === "copy" || d ? /* @__PURE__ */ e(
154
154
  k,
155
155
  {
156
156
  onInsert: d,
157
- variant: i,
158
- onCopy: o,
157
+ variant: o,
158
+ onCopy: i,
159
159
  onError: u,
160
160
  card: {
161
161
  title: a("insert.title.cycle"),
162
+ icon: "heart",
162
163
  highlight: `${l(t.fertileWindow.start)} – ${l(
163
164
  t.fertileWindow.end
164
165
  )}`,
@@ -168,16 +169,26 @@ const O = $("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
168
169
  brand: f,
169
170
  fields: [
170
171
  {
172
+ // Ovulation is a predicted date → calendar glyph (the
173
+ // on-screen badge uses a Check tick, which ICON_GEOMETRY
174
+ // does not carry, so the calendar reads the date meaning).
175
+ icon: "calendar",
171
176
  label: a("cycleCalculator.ovulation"),
172
177
  value: l(t.ovulation)
173
178
  },
174
179
  {
180
+ // Fertile window → heart glyph, matching the on-screen
181
+ // fertile-window badge's Heart icon.
182
+ icon: "heart",
175
183
  label: a("cycleCalculator.fertileWindow"),
176
184
  value: `${l(t.fertileWindow.start)} – ${l(
177
185
  t.fertileWindow.end
178
186
  )}`
179
187
  },
180
188
  {
189
+ // Next period → droplets glyph, matching the on-screen
190
+ // next-period badge's Droplet icon.
191
+ icon: "droplets",
181
192
  label: a("cycleCalculator.nextPeriod"),
182
193
  value: l(t.nextPeriod)
183
194
  }
@@ -197,4 +208,4 @@ export {
197
208
  M as L,
198
209
  K as p
199
210
  };
200
- //# sourceMappingURL=cycle-calculator-ChHBcjet.js.map
211
+ //# sourceMappingURL=cycle-calculator-KxA8dqDf.js.map
@@ -1,17 +1,17 @@
1
1
  import { jsxs as l, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as F, useState as c, useMemo as g, useEffect as G } from "react";
3
- import { c as H } from "./index-D2ZczOXr.js";
2
+ import { forwardRef as F, useState as c, useMemo as p, useEffect as H } from "react";
3
+ import { c as G } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as R } from "react-i18next";
5
5
  import { R as s } from "./radio-TWf9Q-mp.js";
6
- import { R as h } from "./radio-group-CLjK-SlK.js";
7
- import { F as v } from "./form-field-BOm9hK35.js";
6
+ import { R as v } from "./radio-group-CLjK-SlK.js";
7
+ import { F as b } from "./form-field-BOm9hK35.js";
8
8
  import { D as S } from "./date-picker-Bq7xhMA-.js";
9
9
  import { N as M } from "./number-input-Dj5L3pXK.js";
10
- import { C as b } from "./card-DPmk26CL.js";
10
+ import { C } from "./card-DPmk26CL.js";
11
11
  import { B as z } from "./badge-zsf5i5bH.js";
12
- import { I as V } from "./insert-result-CoC1oo6R.js";
13
- import { D as C, c as j } from "./gestation-mWF4AXea.js";
14
- const K = H("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
12
+ import { I as V } from "./insert-result-C5ABnzDl.js";
13
+ import { D as y, c as j } from "./gestation-mWF4AXea.js";
14
+ const K = G("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
15
15
  variants: {
16
16
  width: { full: "ds:w-full", auto: "ds:inline-flex" }
17
17
  },
@@ -26,17 +26,21 @@ const K = H("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
26
26
  preconception: "--muted",
27
27
  first: "--info",
28
28
  second: "--success",
29
- third: "--warning",
29
+ third: "--warning-readable",
30
30
  postterm: "--destructive"
31
- }, P = {
31
+ };
32
+ function P(n) {
33
+ return O[n];
34
+ }
35
+ const U = {
32
36
  lmp: "dueDateCalculator.lmpDate",
33
37
  conception: "dueDateCalculator.conceptionDate",
34
38
  ivf: "dueDateCalculator.transferDate"
35
- }, U = F(
39
+ }, q = F(
36
40
  ({
37
- defaultMethod: y = "lmp",
41
+ defaultMethod: n = "lmp",
38
42
  onResultChange: d,
39
- onInsert: p,
43
+ onInsert: f,
40
44
  insertVariant: D = "insert",
41
45
  onCopy: x,
42
46
  onError: N,
@@ -45,24 +49,24 @@ const K = H("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
45
49
  width: w,
46
50
  className: A
47
51
  }, T) => {
48
- const { t: e, i18n: f } = R(), [r, I] = c(y), [o, _] = c(void 0), [u, $] = c(
49
- C
50
- ), [n, k] = c(5), t = g(() => o ? j(
52
+ const { t: e, i18n: h } = R(), [r, k] = c(n), [o, I] = c(void 0), [u, _] = c(
53
+ y
54
+ ), [m, $] = c(5), t = p(() => o ? j(
51
55
  {
52
56
  method: r,
53
57
  date: o,
54
- cycleLength: u ?? C,
55
- embryoAge: n
58
+ cycleLength: u ?? y,
59
+ embryoAge: m
56
60
  },
57
61
  /* @__PURE__ */ new Date()
58
- ) : null, [r, o, u, n]), i = g(
59
- () => new Intl.DateTimeFormat(f.language, { dateStyle: "long" }),
60
- [f.language]
62
+ ) : null, [r, o, u, m]), i = p(
63
+ () => new Intl.DateTimeFormat(h.language, { dateStyle: "long" }),
64
+ [h.language]
61
65
  );
62
- G(() => {
66
+ H(() => {
63
67
  d == null || d(t);
64
68
  }, [t, d]);
65
- const B = g(() => /* @__PURE__ */ new Date(), []);
69
+ const B = p(() => /* @__PURE__ */ new Date(), []);
66
70
  return /* @__PURE__ */ l(
67
71
  "div",
68
72
  {
@@ -72,12 +76,12 @@ const K = H("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
72
76
  className: K({ width: w, className: A }),
73
77
  children: [
74
78
  /* @__PURE__ */ l(
75
- h,
79
+ v,
76
80
  {
77
81
  label: e("dueDateCalculator.method.label"),
78
82
  variant: "horizontal",
79
83
  value: r,
80
- onValueChange: (m) => I(m),
84
+ onValueChange: (g) => k(g),
81
85
  children: [
82
86
  /* @__PURE__ */ a(s, { label: e("dueDateCalculator.method.lmp"), value: "lmp" }),
83
87
  /* @__PURE__ */ a(
@@ -92,9 +96,9 @@ const K = H("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
92
96
  }
93
97
  ),
94
98
  /* @__PURE__ */ l("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
95
- /* @__PURE__ */ a(v, { label: e(P[r]), children: /* @__PURE__ */ a(S, { value: o, onChange: _, maxDate: B }) }),
99
+ /* @__PURE__ */ a(b, { label: e(U[r]), children: /* @__PURE__ */ a(S, { value: o, onChange: I, maxDate: B }) }),
96
100
  r === "lmp" && /* @__PURE__ */ a(
97
- v,
101
+ b,
98
102
  {
99
103
  label: e("dueDateCalculator.cycleLength"),
100
104
  description: e("dueDateCalculator.cycleLengthHint"),
@@ -105,18 +109,18 @@ const K = H("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
105
109
  min: 20,
106
110
  max: 45,
107
111
  value: u,
108
- onChange: $
112
+ onChange: _
109
113
  }
110
114
  )
111
115
  }
112
116
  ),
113
117
  r === "ivf" && /* @__PURE__ */ l(
114
- h,
118
+ v,
115
119
  {
116
120
  label: e("dueDateCalculator.embryoAge"),
117
121
  variant: "horizontal",
118
- value: String(n),
119
- onValueChange: (m) => k(Number(m)),
122
+ value: String(m),
123
+ onValueChange: (g) => $(Number(g)),
120
124
  children: [
121
125
  /* @__PURE__ */ a(s, { label: e("dueDateCalculator.day3"), value: "3" }),
122
126
  /* @__PURE__ */ a(s, { label: e("dueDateCalculator.day5"), value: "5" })
@@ -129,7 +133,7 @@ const K = H("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
129
133
  )}. ${e("dueDateCalculator.result.trimesterLabel")}: ${e(
130
134
  `dueDateCalculator.trimester.${t.trimester}`
131
135
  )}.` : "" }),
132
- t ? /* @__PURE__ */ a(b, { variant: "elevated", children: /* @__PURE__ */ l(b.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
136
+ t ? /* @__PURE__ */ a(C, { variant: "elevated", children: /* @__PURE__ */ l(C.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
133
137
  /* @__PURE__ */ l("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
134
138
  /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
135
139
  /* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("dueDateCalculator.result.trimesterLabel") }),
@@ -154,27 +158,33 @@ const K = H("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
154
158
  /* @__PURE__ */ a("dd", { className: "type-metric ds:text-foreground", children: i.format(t.dueDate) })
155
159
  ] })
156
160
  ] }),
157
- D === "copy" || p ? /* @__PURE__ */ a(
161
+ D === "copy" || f ? /* @__PURE__ */ a(
158
162
  V,
159
163
  {
160
164
  variant: D,
161
- onInsert: p,
165
+ onInsert: f,
162
166
  onCopy: x,
163
167
  onError: N,
164
168
  card: {
165
169
  title: e("insert.title.dueDate"),
170
+ icon: "calendar-heart",
166
171
  highlight: i.format(t.dueDate),
167
172
  // Chip tinted with the trimester's semantic token so the
168
173
  // inserted PNG carries the same clinical-stage colour as
169
- // the on-screen trimester badge.
170
- highlightToken: O[t.trimester],
174
+ // the on-screen trimester badge — with the contrast-safe
175
+ // orange override for the `--warning` third trimester.
176
+ highlightToken: P(t.trimester),
171
177
  brand: L,
172
178
  fields: [
173
179
  {
180
+ // The estimated date of delivery → calendar glyph.
181
+ icon: "calendar",
174
182
  label: e("dueDateCalculator.result.dueDateLabel"),
175
183
  value: i.format(t.dueDate)
176
184
  },
177
185
  {
186
+ // Gestational age is an elapsed duration → clock glyph.
187
+ icon: "clock",
178
188
  label: e("dueDateCalculator.result.gestationLabel"),
179
189
  value: t.gestationalAge ? e("dueDateCalculator.result.gestation", {
180
190
  weeks: t.gestationalAge.weeks,
@@ -182,6 +192,8 @@ const K = H("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
182
192
  }) : "—"
183
193
  },
184
194
  {
195
+ // Trimester is a clinical-stage classification → tag.
196
+ icon: "tag",
185
197
  label: e("dueDateCalculator.result.trimesterLabel"),
186
198
  value: e(
187
199
  `dueDateCalculator.trimester.${t.trimester}`
@@ -197,8 +209,8 @@ const K = H("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
197
209
  );
198
210
  }
199
211
  );
200
- U.displayName = "DueDateCalculator";
212
+ q.displayName = "DueDateCalculator";
201
213
  export {
202
- U as D
214
+ q as D
203
215
  };
204
- //# sourceMappingURL=due-date-calculator-CYXKLoof.js.map
216
+ //# sourceMappingURL=due-date-calculator-mFxpHLml.js.map
@@ -28,7 +28,7 @@ import { u as At } from "./use-theme-C2dHKUAN.js";
28
28
  import { u as Pt } from "./registry-nPAVE19X.js";
29
29
  import { D as ze } from "./date-range-picker-DcXuI9y7.js";
30
30
  import { M as Ot } from "./multi-select-DOLO3K_z.js";
31
- import { A as Ae } from "./autocomplete-DIgdhCGJ.js";
31
+ import { A as Ae } from "./autocomplete-CDqxB68B.js";
32
32
  import { N as ee } from "./number-input-Dj5L3pXK.js";
33
33
  import { B as Mt } from "./badge-zsf5i5bH.js";
34
34
  import { A as Pe } from "./avatar-BNQNhoyL.js";
@@ -2332,4 +2332,4 @@ export {
2332
2332
  Be as q,
2333
2333
  xn as u
2334
2334
  };
2335
- //# sourceMappingURL=editable-currency-cell-renderer-9jqwDv5x.js.map
2335
+ //# sourceMappingURL=editable-currency-cell-renderer-BEBUQl9P.js.map
@@ -8,7 +8,7 @@ import { u as X } from "./use-controllable-state-BiY4xTzM.js";
8
8
  import { u as Y } from "./registry-nPAVE19X.js";
9
9
  import { B as I } from "./button-DD_0Xdmr.js";
10
10
  import { P as Z } from "./progress-kzIRcdaq.js";
11
- import { f as $ } from "./payment-form-BzVsG6Ks.js";
11
+ import { f as $ } from "./payment-form-BNTx4876.js";
12
12
  import { T as ee } from "./triangle-alert-CBPUIzQo.js";
13
13
  import { C as se } from "./check-DPdL_Sm7.js";
14
14
  const ae = {
@@ -265,4 +265,4 @@ export {
265
265
  te as F,
266
266
  ae as f
267
267
  };
268
- //# sourceMappingURL=freemium-paywall-BLXESpH4.js.map
268
+ //# sourceMappingURL=freemium-paywall-DzpD63WY.js.map