@alfadocs/ui-kit 0.44.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/{cycle-calculator-ChHBcjet.js → cycle-calculator-KxA8dqDf.js} +31 -20
- package/dist/_chunks/{due-date-calculator-CYXKLoof.js → due-date-calculator-mFxpHLml.js} +51 -39
- 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-sRmoqgVr.js → gestational-age-calculator-gWI_uRA1.js} +52 -39
- 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-C5YhfYnL.js → pregnancy-weight-gain-BtEHaSqy.js} +26 -13
- 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-Ds9jalbN.js → unit-converter-u3CwNDpP.js} +63 -52
- 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/insert-result.d.ts +81 -8
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +2 -2
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +2 -2
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +2 -2
- 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 +2 -2
- package/dist/components/gestational-age-calculator/index.js +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 +2 -2
- 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 +2 -2
- 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 +25 -25
- 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-DFPWL2OJ.js +0 -273
- package/dist/_chunks/insert-result-CoC1oo6R.js +0 -334
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { R as
|
|
2
|
+
import { forwardRef as E, useState as h, useMemo as g, useEffect as L } from "react";
|
|
3
|
+
import { c as I } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as S } from "react-i18next";
|
|
5
|
+
import { R as x } from "./radio-TWf9Q-mp.js";
|
|
6
6
|
import { R as B } from "./radio-group-CLjK-SlK.js";
|
|
7
7
|
import { F } from "./form-field-BOm9hK35.js";
|
|
8
8
|
import { D as M } from "./date-picker-Bq7xhMA-.js";
|
|
9
|
-
import { C as
|
|
10
|
-
import { B as
|
|
11
|
-
import { I as R } from "./insert-result-
|
|
12
|
-
import { c as
|
|
9
|
+
import { C as A } from "./card-DPmk26CL.js";
|
|
10
|
+
import { B as v } from "./badge-zsf5i5bH.js";
|
|
11
|
+
import { I as R } from "./insert-result-C5ABnzDl.js";
|
|
12
|
+
import { c as H, g as _, G as j } from "./gestation-mWF4AXea.js";
|
|
13
13
|
import { s as z } from "./subDays-Dv7q9S7u.js";
|
|
14
14
|
import { i as O } from "./date-picker-variants-DLi1Va_e.js";
|
|
15
|
-
const V =
|
|
15
|
+
const V = I("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
16
16
|
variants: {
|
|
17
17
|
width: { full: "ds:w-full", auto: "ds:inline-flex" }
|
|
18
18
|
},
|
|
@@ -27,14 +27,18 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
27
27
|
preconception: "--muted",
|
|
28
28
|
first: "--info",
|
|
29
29
|
second: "--success",
|
|
30
|
-
third: "--warning",
|
|
30
|
+
third: "--warning-readable",
|
|
31
31
|
postterm: "--destructive"
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
|
+
function Y(c) {
|
|
34
|
+
return P[c];
|
|
35
|
+
}
|
|
36
|
+
const q = E(
|
|
33
37
|
({
|
|
34
|
-
defaultMethod:
|
|
38
|
+
defaultMethod: c = "lmp",
|
|
35
39
|
onResultChange: d,
|
|
36
|
-
onInsert:
|
|
37
|
-
insertVariant:
|
|
40
|
+
onInsert: u,
|
|
41
|
+
insertVariant: p = "insert",
|
|
38
42
|
onCopy: b,
|
|
39
43
|
onError: y,
|
|
40
44
|
insertBrand: C,
|
|
@@ -42,25 +46,25 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
42
46
|
width: D,
|
|
43
47
|
className: T
|
|
44
48
|
}, w) => {
|
|
45
|
-
const { t: e, i18n:
|
|
49
|
+
const { t: e, i18n: f } = S(), [o, G] = h(c), [i, $] = h(void 0), n = g(() => /* @__PURE__ */ new Date(), []), a = g(() => {
|
|
46
50
|
if (!i) return null;
|
|
47
|
-
const s = o === "lmp" ? i : z(i,
|
|
51
|
+
const s = o === "lmp" ? i : z(i, j), r = H({ method: "lmp", date: s }, n);
|
|
48
52
|
return {
|
|
49
53
|
result: {
|
|
50
54
|
gestationalAge: r.gestationalAge,
|
|
51
55
|
trimester: r.trimester,
|
|
52
56
|
dueDate: r.dueDate
|
|
53
57
|
},
|
|
54
|
-
milestones:
|
|
58
|
+
milestones: _(r.gestationalStart)
|
|
55
59
|
};
|
|
56
|
-
}, [o, i, n]),
|
|
57
|
-
() => new Intl.DateTimeFormat(
|
|
58
|
-
[
|
|
60
|
+
}, [o, i, n]), k = g(
|
|
61
|
+
() => new Intl.DateTimeFormat(f.language, { dateStyle: "medium" }),
|
|
62
|
+
[f.language]
|
|
59
63
|
);
|
|
60
|
-
|
|
64
|
+
L(() => {
|
|
61
65
|
d == null || d((a == null ? void 0 : a.result) ?? null);
|
|
62
66
|
}, [a, d]);
|
|
63
|
-
const
|
|
67
|
+
const m = (s) => s ? e("gestationalAgeCalculator.gestation", {
|
|
64
68
|
weeks: s.weeks,
|
|
65
69
|
days: s.days
|
|
66
70
|
}) : "—";
|
|
@@ -80,8 +84,8 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
80
84
|
value: o,
|
|
81
85
|
onValueChange: (s) => G(s),
|
|
82
86
|
children: [
|
|
83
|
-
/* @__PURE__ */ t(
|
|
84
|
-
/* @__PURE__ */ t(
|
|
87
|
+
/* @__PURE__ */ t(x, { label: e("gestationalAgeCalculator.method.lmp"), value: "lmp" }),
|
|
88
|
+
/* @__PURE__ */ t(x, { label: e("gestationalAgeCalculator.method.edd"), value: "edd" })
|
|
85
89
|
]
|
|
86
90
|
}
|
|
87
91
|
),
|
|
@@ -101,17 +105,17 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
101
105
|
)
|
|
102
106
|
}
|
|
103
107
|
),
|
|
104
|
-
/* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: a ? `${e("gestationalAgeCalculator.gestationLabel")}: ${
|
|
108
|
+
/* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: a ? `${e("gestationalAgeCalculator.gestationLabel")}: ${m(
|
|
105
109
|
a.result.gestationalAge
|
|
106
110
|
)}. ${e("gestationalAgeCalculator.trimesterLabel")}: ${e(
|
|
107
111
|
`gestationalAgeCalculator.trimester.${a.result.trimester}`
|
|
108
112
|
)}.` : "" }),
|
|
109
|
-
a ? /* @__PURE__ */ t(
|
|
113
|
+
a ? /* @__PURE__ */ t(A, { variant: "elevated", children: /* @__PURE__ */ l(A.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
110
114
|
/* @__PURE__ */ l("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
111
115
|
/* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
|
|
112
116
|
/* @__PURE__ */ t("dt", { className: "type-label ds:text-muted-foreground", children: e("gestationalAgeCalculator.trimesterLabel") }),
|
|
113
117
|
/* @__PURE__ */ t("dd", { children: /* @__PURE__ */ t(
|
|
114
|
-
|
|
118
|
+
v,
|
|
115
119
|
{
|
|
116
120
|
variant: K[a.result.trimester],
|
|
117
121
|
size: "lg",
|
|
@@ -123,7 +127,7 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
123
127
|
] }),
|
|
124
128
|
/* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-xs)] ds:text-end", children: [
|
|
125
129
|
/* @__PURE__ */ t("dt", { className: "type-label ds:text-muted-foreground", children: e("gestationalAgeCalculator.gestationLabel") }),
|
|
126
|
-
/* @__PURE__ */ t("dd", { className: "type-metric ds:text-foreground", children:
|
|
130
|
+
/* @__PURE__ */ t("dd", { className: "type-metric ds:text-foreground", children: m(a.result.gestationalAge) })
|
|
127
131
|
] })
|
|
128
132
|
] }),
|
|
129
133
|
/* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
@@ -137,8 +141,8 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
137
141
|
children: [
|
|
138
142
|
/* @__PURE__ */ t("span", { className: "type-body ds:text-foreground", children: e(`gestationalAgeCalculator.milestone.${s.key}`) }),
|
|
139
143
|
/* @__PURE__ */ l("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
140
|
-
/* @__PURE__ */ t("span", { className: "type-body ds:text-muted-foreground", children:
|
|
141
|
-
r ? /* @__PURE__ */ t(
|
|
144
|
+
/* @__PURE__ */ t("span", { className: "type-body ds:text-muted-foreground", children: k.format(s.date) }),
|
|
145
|
+
r ? /* @__PURE__ */ t(v, { variant: "success", children: e("gestationalAgeCalculator.reached") }) : null
|
|
142
146
|
] })
|
|
143
147
|
]
|
|
144
148
|
},
|
|
@@ -146,28 +150,37 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
146
150
|
);
|
|
147
151
|
}) })
|
|
148
152
|
] }),
|
|
149
|
-
|
|
153
|
+
p === "copy" || u ? /* @__PURE__ */ t(
|
|
150
154
|
R,
|
|
151
155
|
{
|
|
152
|
-
onInsert:
|
|
153
|
-
variant:
|
|
156
|
+
onInsert: u,
|
|
157
|
+
variant: p,
|
|
154
158
|
onCopy: b,
|
|
155
159
|
onError: y,
|
|
156
160
|
card: {
|
|
157
161
|
title: e("insert.title.gestationalAge"),
|
|
162
|
+
icon: "baby",
|
|
158
163
|
highlight: e(
|
|
159
164
|
`gestationalAgeCalculator.trimester.${a.result.trimester}`
|
|
160
165
|
),
|
|
161
166
|
// Chip shares the trimester's semantic token so the
|
|
162
|
-
// inserted PNG chip matches the on-screen trimester badge
|
|
163
|
-
|
|
167
|
+
// inserted PNG chip matches the on-screen trimester badge —
|
|
168
|
+
// with the contrast-safe orange override for the
|
|
169
|
+
// `--warning` third trimester.
|
|
170
|
+
highlightToken: Y(
|
|
171
|
+
a.result.trimester
|
|
172
|
+
),
|
|
164
173
|
brand: C,
|
|
165
174
|
fields: [
|
|
166
175
|
{
|
|
176
|
+
// Gestational age is an elapsed duration → clock glyph.
|
|
177
|
+
icon: "clock",
|
|
167
178
|
label: e("gestationalAgeCalculator.gestationLabel"),
|
|
168
|
-
value:
|
|
179
|
+
value: m(a.result.gestationalAge)
|
|
169
180
|
},
|
|
170
181
|
{
|
|
182
|
+
// Trimester is a clinical-stage classification → tag.
|
|
183
|
+
icon: "tag",
|
|
171
184
|
label: e("gestationalAgeCalculator.trimesterLabel"),
|
|
172
185
|
value: e(
|
|
173
186
|
`gestationalAgeCalculator.trimester.${a.result.trimester}`
|
|
@@ -183,8 +196,8 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
183
196
|
);
|
|
184
197
|
}
|
|
185
198
|
);
|
|
186
|
-
|
|
199
|
+
q.displayName = "GestationalAgeCalculator";
|
|
187
200
|
export {
|
|
188
|
-
|
|
201
|
+
q as G
|
|
189
202
|
};
|
|
190
|
-
//# sourceMappingURL=gestational-age-calculator-
|
|
203
|
+
//# sourceMappingURL=gestational-age-calculator-gWI_uRA1.js.map
|