@alfadocs/ui-kit 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{alia-sidebar-BpX4z_af.js → alia-sidebar-Be8FhKYd.js} +332 -237
- package/dist/_chunks/{autocomplete-DIgdhCGJ.js → autocomplete-CDqxB68B.js} +2 -2
- package/dist/_chunks/bmi-calculator-CQqXTVNL.js +258 -0
- package/dist/_chunks/{booking-CtLwaxkK.js → booking-DlDVuWMd.js} +2 -2
- package/dist/_chunks/{calculator-dialog-DdexHrTP.js → calculator-dialog-D-nfvteH.js} +2 -2
- package/dist/_chunks/{cycle-calculator-Dln-y1k_.js → cycle-calculator-KxA8dqDf.js} +73 -54
- package/dist/_chunks/dialog-BTpZV6It.js +223 -0
- package/dist/_chunks/{due-date-calculator-Cc4dRqTI.js → due-date-calculator-mFxpHLml.js} +73 -49
- package/dist/_chunks/{editable-currency-cell-renderer-9jqwDv5x.js → editable-currency-cell-renderer-BEBUQl9P.js} +2 -2
- package/dist/_chunks/{freemium-paywall-BLXESpH4.js → freemium-paywall-BYist2sJ.js} +2 -2
- package/dist/_chunks/gestational-age-calculator-gWI_uRA1.js +203 -0
- package/dist/_chunks/insert-result-C5ABnzDl.js +711 -0
- package/dist/_chunks/{marketplace-app-shell-Dc5cTIt8.js → marketplace-app-shell-Gfsf78ge.js} +2 -2
- package/dist/_chunks/{patient-search-DPe2ZYEL.js → patient-search-CocVcGJ3.js} +2 -2
- package/dist/_chunks/{payment-form-BzVsG6Ks.js → payment-form-DqEiEJRO.js} +247 -195
- package/dist/_chunks/{pdf-viewer-B6MC6VTx.js → pdf-viewer-CWEXTlwq.js} +2 -2
- package/dist/_chunks/{practice-results-CrLpEiiW.js → practice-results-DDi-kvaD.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-zZL5Ir2-.js → pregnancy-weight-gain-BtEHaSqy.js} +78 -56
- package/dist/_chunks/{search-bar-CP6wUJFY.js → search-bar-CvN_S0jW.js} +2 -2
- package/dist/_chunks/{search-input-C1C3jQpD.js → search-input-D3aMvi4l.js} +2 -2
- package/dist/_chunks/{sign-document-B-3k_0LO.js → sign-document-BCyLpFHJ.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-DeHBFRNS.js → sign-in-with-alfadocs-button-CuYn_kKP.js} +2 -2
- package/dist/_chunks/{social-sign-in-button-X54ySJr1.js → social-sign-in-button-uJYLM366.js} +2 -2
- package/dist/_chunks/{spinner-CCByyvcb.js → spinner-OjQNn8oN.js} +7 -3
- package/dist/_chunks/{transcript-panel-CR7VY1uw.js → transcript-panel-B4HiC7ed.js} +2 -2
- package/dist/_chunks/{unit-converter-CuXCXJhK.js → unit-converter-u3CwNDpP.js} +96 -74
- package/dist/_chunks/{wallet-pay-button-DK4ESYge.js → wallet-pay-button-DuDPBlCO.js} +2 -2
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/banded-gauge.d.ts +193 -0
- package/dist/components/_shared/index.d.ts +1 -1
- package/dist/components/_shared/insert-result.d.ts +173 -10
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +6 -0
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +6 -0
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +1 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +6 -0
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +6 -0
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/payment-form/payment-form.d.ts +24 -2
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +6 -0
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/social-sign-in-button/index.js +1 -1
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/spinner/spinner.d.ts +2 -2
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/unit-converter/unit-converter.d.ts +6 -0
- package/dist/components/wallet-pay-button/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +1 -1
- package/dist/i18n/locales/ar.js +1 -1
- package/dist/i18n/locales/de.d.ts +1 -1
- package/dist/i18n/locales/de.js +1 -1
- package/dist/i18n/locales/el.d.ts +1 -1
- package/dist/i18n/locales/el.js +1 -1
- package/dist/i18n/locales/en.d.ts +1 -1
- package/dist/i18n/locales/en.js +1 -1
- package/dist/i18n/locales/es.d.ts +1 -1
- package/dist/i18n/locales/es.js +1 -1
- package/dist/i18n/locales/fr.d.ts +1 -1
- package/dist/i18n/locales/fr.js +1 -1
- package/dist/i18n/locales/hi.d.ts +1 -1
- package/dist/i18n/locales/hi.js +1 -1
- package/dist/i18n/locales/it.d.ts +1 -1
- package/dist/i18n/locales/it.js +1 -1
- package/dist/i18n/locales/ja.d.ts +1 -1
- package/dist/i18n/locales/ja.js +1 -1
- package/dist/i18n/locales/nl.d.ts +1 -1
- package/dist/i18n/locales/nl.js +1 -1
- package/dist/i18n/locales/pl.d.ts +1 -1
- package/dist/i18n/locales/pl.js +1 -1
- package/dist/i18n/locales/pt.d.ts +1 -1
- package/dist/i18n/locales/pt.js +1 -1
- package/dist/i18n/locales/ro.d.ts +1 -1
- package/dist/i18n/locales/ro.js +1 -1
- package/dist/i18n/locales/ru.d.ts +1 -1
- package/dist/i18n/locales/ru.js +1 -1
- package/dist/i18n/locales/sq.d.ts +1 -1
- package/dist/i18n/locales/sq.js +1 -1
- package/dist/i18n/locales/sv.d.ts +1 -1
- package/dist/i18n/locales/sv.js +1 -1
- package/dist/i18n/locales/tr.d.ts +1 -1
- package/dist/i18n/locales/tr.js +1 -1
- package/dist/i18n/locales/zh.d.ts +1 -1
- package/dist/i18n/locales/zh.js +1 -1
- package/dist/index.js +497 -496
- package/dist/locales/ar.json +1 -1
- package/dist/locales/de.json +1 -1
- package/dist/locales/el.json +1 -1
- package/dist/locales/en.json +1 -1
- package/dist/locales/es.json +1 -1
- package/dist/locales/fr.json +1 -1
- package/dist/locales/hi.json +1 -1
- package/dist/locales/it.json +1 -1
- package/dist/locales/ja.json +1 -1
- package/dist/locales/nl.json +1 -1
- package/dist/locales/pl.json +1 -1
- package/dist/locales/pt.json +1 -1
- package/dist/locales/ro.json +1 -1
- package/dist/locales/ru.json +1 -1
- package/dist/locales/sq.json +1 -1
- package/dist/locales/sv.json +1 -1
- package/dist/locales/tr.json +1 -1
- package/dist/locales/zh.json +1 -1
- package/dist/patterns/alia-assistant/alia-types.d.ts +20 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/bmi-calculator-DuVSFDuw.js +0 -259
- package/dist/_chunks/dialog-DOYgd75U.js +0 -224
- package/dist/_chunks/gestational-age-calculator-ZMSrzkRW.js +0 -179
- package/dist/_chunks/insert-result-DisOY2G-.js +0 -243
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
2700
|
+
//# sourceMappingURL=booking-DlDVuWMd.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as a, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p } from "react";
|
|
3
|
-
import { D as r } from "./dialog-
|
|
3
|
+
import { D as r } from "./dialog-BTpZV6It.js";
|
|
4
4
|
const u = p(
|
|
5
5
|
({
|
|
6
6
|
trigger: i,
|
|
@@ -37,4 +37,4 @@ u.displayName = "CalculatorDialog";
|
|
|
37
37
|
export {
|
|
38
38
|
u as C
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=calculator-dialog-
|
|
40
|
+
//# sourceMappingURL=calculator-dialog-D-nfvteH.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { F as
|
|
6
|
-
import { D as
|
|
7
|
-
import { N as
|
|
8
|
-
import { C as
|
|
9
|
-
import { B as
|
|
10
|
-
import { I } from "./insert-result-
|
|
11
|
-
import { a as
|
|
2
|
+
import { forwardRef as F, useState as L, useMemo as y, useEffect as H } from "react";
|
|
3
|
+
import { c as $ } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as A } from "react-i18next";
|
|
5
|
+
import { F as w } from "./form-field-BOm9hK35.js";
|
|
6
|
+
import { D as I } from "./date-picker-Bq7xhMA-.js";
|
|
7
|
+
import { N as S } from "./number-input-Dj5L3pXK.js";
|
|
8
|
+
import { C as P } from "./card-DPmk26CL.js";
|
|
9
|
+
import { B as v } from "./badge-zsf5i5bH.js";
|
|
10
|
+
import { I as k } from "./insert-result-C5ABnzDl.js";
|
|
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";
|
|
14
|
-
import { c as
|
|
14
|
+
import { c as G } from "./createLucideIcon-CrFbzy84.js";
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-react v1.8.0 - ISC
|
|
17
17
|
*
|
|
@@ -26,77 +26,78 @@ const Y = [
|
|
|
26
26
|
key: "c7niix"
|
|
27
27
|
}
|
|
28
28
|
]
|
|
29
|
-
], j =
|
|
30
|
-
function
|
|
31
|
-
const d = n.cycleLength ??
|
|
32
|
-
start: i
|
|
33
|
-
end: i
|
|
34
|
-
}, f =
|
|
29
|
+
], j = G("droplet", Y), x = 28, M = 14, U = 1;
|
|
30
|
+
function K(n, c = 3) {
|
|
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) =>
|
|
36
|
+
(C, g) => s(o, d * (g + 1))
|
|
37
37
|
);
|
|
38
|
-
return { nextPeriod: f, ovulation:
|
|
38
|
+
return { nextPeriod: f, ovulation: i, fertileWindow: u, upcomingPeriods: p };
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const O = $("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
41
41
|
variants: {
|
|
42
42
|
width: { full: "ds:w-full", auto: "ds:inline-flex" }
|
|
43
43
|
},
|
|
44
44
|
defaultVariants: { width: "full" }
|
|
45
|
-
}), q =
|
|
45
|
+
}), V = "--accent", q = F(
|
|
46
46
|
({
|
|
47
|
-
defaultCycleLength: n =
|
|
47
|
+
defaultCycleLength: n = x,
|
|
48
48
|
onResultChange: c,
|
|
49
49
|
onInsert: d,
|
|
50
|
-
insertVariant:
|
|
51
|
-
onCopy:
|
|
50
|
+
insertVariant: o = "insert",
|
|
51
|
+
onCopy: i,
|
|
52
52
|
onError: u,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
insertBrand: f,
|
|
54
|
+
id: p,
|
|
55
|
+
width: C,
|
|
56
|
+
className: g
|
|
57
|
+
}, b) => {
|
|
58
|
+
const { t: a, i18n: N } = A(), [m, D] = L(void 0), [h, E] = L(
|
|
58
59
|
n
|
|
59
|
-
), t =
|
|
60
|
+
), t = y(() => m ? K({
|
|
60
61
|
lastPeriodStart: m,
|
|
61
|
-
cycleLength:
|
|
62
|
-
}) : null, [m,
|
|
62
|
+
cycleLength: h ?? x
|
|
63
|
+
}) : null, [m, h]), T = y(
|
|
63
64
|
() => new Intl.DateTimeFormat(N.language, { dateStyle: "medium" }),
|
|
64
65
|
[N.language]
|
|
65
66
|
);
|
|
66
|
-
|
|
67
|
+
H(() => {
|
|
67
68
|
c == null || c(t);
|
|
68
69
|
}, [t, c]);
|
|
69
|
-
const _ =
|
|
70
|
+
const _ = y(() => /* @__PURE__ */ new Date(), []), l = (W) => T.format(W);
|
|
70
71
|
return /* @__PURE__ */ r(
|
|
71
72
|
"div",
|
|
72
73
|
{
|
|
73
|
-
ref:
|
|
74
|
+
ref: b,
|
|
74
75
|
"data-component": "cycle-calculator",
|
|
75
|
-
"data-component-id":
|
|
76
|
-
className:
|
|
76
|
+
"data-component-id": p,
|
|
77
|
+
className: O({ width: C, className: g }),
|
|
77
78
|
children: [
|
|
78
79
|
/* @__PURE__ */ r("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
79
|
-
/* @__PURE__ */ e(
|
|
80
|
-
|
|
80
|
+
/* @__PURE__ */ e(w, { label: a("cycleCalculator.lastPeriod"), children: /* @__PURE__ */ e(
|
|
81
|
+
I,
|
|
81
82
|
{
|
|
82
83
|
value: m,
|
|
83
|
-
onChange:
|
|
84
|
+
onChange: D,
|
|
84
85
|
maxDate: _
|
|
85
86
|
}
|
|
86
87
|
) }),
|
|
87
88
|
/* @__PURE__ */ e(
|
|
88
|
-
|
|
89
|
+
w,
|
|
89
90
|
{
|
|
90
91
|
label: a("cycleCalculator.cycleLength"),
|
|
91
92
|
description: a("cycleCalculator.cycleLengthHint"),
|
|
92
93
|
children: /* @__PURE__ */ e(
|
|
93
|
-
|
|
94
|
+
S,
|
|
94
95
|
{
|
|
95
96
|
mode: "integer",
|
|
96
97
|
min: 20,
|
|
97
98
|
max: 45,
|
|
98
|
-
value:
|
|
99
|
-
onChange:
|
|
99
|
+
value: h,
|
|
100
|
+
onChange: E
|
|
100
101
|
}
|
|
101
102
|
)
|
|
102
103
|
}
|
|
@@ -105,12 +106,12 @@ const V = T("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
105
106
|
/* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: t ? `${a("cycleCalculator.ovulation")}: ${l(t.ovulation)}. ${a(
|
|
106
107
|
"cycleCalculator.nextPeriod"
|
|
107
108
|
)}: ${l(t.nextPeriod)}.` : "" }),
|
|
108
|
-
t ? /* @__PURE__ */ e(
|
|
109
|
+
t ? /* @__PURE__ */ e(P, { variant: "elevated", children: /* @__PURE__ */ r(P.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
109
110
|
/* @__PURE__ */ r("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
|
|
110
111
|
/* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
|
|
111
112
|
/* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: a("cycleCalculator.ovulation") }),
|
|
112
113
|
/* @__PURE__ */ e("dd", { children: /* @__PURE__ */ e(
|
|
113
|
-
|
|
114
|
+
v,
|
|
114
115
|
{
|
|
115
116
|
variant: "success",
|
|
116
117
|
size: "lg",
|
|
@@ -122,7 +123,7 @@ const V = T("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
122
123
|
/* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
|
|
123
124
|
/* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: a("cycleCalculator.fertileWindow") }),
|
|
124
125
|
/* @__PURE__ */ e("dd", { children: /* @__PURE__ */ r(
|
|
125
|
-
|
|
126
|
+
v,
|
|
126
127
|
{
|
|
127
128
|
variant: "accent",
|
|
128
129
|
size: "lg",
|
|
@@ -139,7 +140,7 @@ const V = T("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
139
140
|
/* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
|
|
140
141
|
/* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: a("cycleCalculator.nextPeriod") }),
|
|
141
142
|
/* @__PURE__ */ e("dd", { children: /* @__PURE__ */ e(
|
|
142
|
-
|
|
143
|
+
v,
|
|
143
144
|
{
|
|
144
145
|
variant: "error",
|
|
145
146
|
size: "lg",
|
|
@@ -149,27 +150,45 @@ const V = T("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
149
150
|
) })
|
|
150
151
|
] })
|
|
151
152
|
] }),
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
o === "copy" || d ? /* @__PURE__ */ e(
|
|
154
|
+
k,
|
|
154
155
|
{
|
|
155
156
|
onInsert: d,
|
|
156
|
-
variant:
|
|
157
|
-
onCopy:
|
|
157
|
+
variant: o,
|
|
158
|
+
onCopy: i,
|
|
158
159
|
onError: u,
|
|
159
160
|
card: {
|
|
160
161
|
title: a("insert.title.cycle"),
|
|
162
|
+
icon: "heart",
|
|
163
|
+
highlight: `${l(t.fertileWindow.start)} – ${l(
|
|
164
|
+
t.fertileWindow.end
|
|
165
|
+
)}`,
|
|
166
|
+
// Chip reuses the on-screen fertile-window badge's accent
|
|
167
|
+
// token so the inserted PNG chip matches the screen.
|
|
168
|
+
highlightToken: V,
|
|
169
|
+
brand: f,
|
|
161
170
|
fields: [
|
|
162
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",
|
|
163
176
|
label: a("cycleCalculator.ovulation"),
|
|
164
177
|
value: l(t.ovulation)
|
|
165
178
|
},
|
|
166
179
|
{
|
|
180
|
+
// Fertile window → heart glyph, matching the on-screen
|
|
181
|
+
// fertile-window badge's Heart icon.
|
|
182
|
+
icon: "heart",
|
|
167
183
|
label: a("cycleCalculator.fertileWindow"),
|
|
168
184
|
value: `${l(t.fertileWindow.start)} – ${l(
|
|
169
185
|
t.fertileWindow.end
|
|
170
186
|
)}`
|
|
171
187
|
},
|
|
172
188
|
{
|
|
189
|
+
// Next period → droplets glyph, matching the on-screen
|
|
190
|
+
// next-period badge's Droplet icon.
|
|
191
|
+
icon: "droplets",
|
|
173
192
|
label: a("cycleCalculator.nextPeriod"),
|
|
174
193
|
value: l(t.nextPeriod)
|
|
175
194
|
}
|
|
@@ -187,6 +206,6 @@ q.displayName = "CycleCalculator";
|
|
|
187
206
|
export {
|
|
188
207
|
q as C,
|
|
189
208
|
M as L,
|
|
190
|
-
|
|
209
|
+
K as p
|
|
191
210
|
};
|
|
192
|
-
//# sourceMappingURL=cycle-calculator-
|
|
211
|
+
//# sourceMappingURL=cycle-calculator-KxA8dqDf.js.map
|