@alfadocs/ui-kit 0.41.2 → 0.43.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/address-autocomplete-CSjMrBvu.js +358 -0
- package/dist/_chunks/{alia-sidebar-DXsYPinm.js → alia-sidebar-BpX4z_af.js} +2 -2
- package/dist/_chunks/{ar-Cn_NxqkN.js → ar-DEz65ZJW.js} +2 -2
- package/dist/_chunks/bmi-calculator-DuVSFDuw.js +259 -0
- package/dist/_chunks/{booking-4mCw3Mpl.js → booking-CtLwaxkK.js} +4 -4
- package/dist/_chunks/{breadcrumb-CLlhx7qo.js → breadcrumb-OTbaY70e.js} +4 -4
- package/dist/_chunks/{calculator-dialog-B74fqpFZ.js → calculator-dialog-DdexHrTP.js} +2 -2
- package/dist/_chunks/{chart-Cbt0_sKv.js → chart-Cg3e9EH9.js} +101 -99
- package/dist/_chunks/cycle-calculator-Dln-y1k_.js +192 -0
- package/dist/_chunks/{date-picker-CvQfs6Xh.js → date-picker-Bq7xhMA-.js} +109 -108
- package/dist/_chunks/date-picker-variants-DLi1Va_e.js +3238 -0
- package/dist/_chunks/{date-range-picker-U9fn1g9d.js → date-range-picker-DcXuI9y7.js} +20 -19
- package/dist/_chunks/{date-time-picker-Cva0ZCWw.js → date-time-picker-RimumeLR.js} +18 -17
- package/dist/_chunks/{de-BMM2H7Bs.js → de-bTBGdjPS.js} +2 -2
- package/dist/_chunks/{dialog-Cee13rHU.js → dialog-DOYgd75U.js} +46 -37
- package/dist/_chunks/{document-scanner-CqS_klIr.js → document-scanner-BqLsGs4Y.js} +7 -7
- package/dist/_chunks/{dropdown-menu-BC5ZdOMo.js → dropdown-menu-CUEXqKis.js} +2 -2
- package/dist/_chunks/{due-date-calculator-CUspKSTw.js → due-date-calculator-Cc4dRqTI.js} +62 -41
- package/dist/_chunks/{editable-currency-cell-renderer-DgkCIIcO.js → editable-currency-cell-renderer-9jqwDv5x.js} +3 -3
- package/dist/_chunks/{el-BYPonAaK.js → el-BWG5RXxa.js} +6 -6
- package/dist/_chunks/{es-CMkVCQ4F.js → es-DfO_G435.js} +2 -2
- package/dist/_chunks/{fr-BcuWxqft.js → fr-BTn24bs8.js} +2 -2
- package/dist/_chunks/{freemium-paywall-BAk3a6er.js → freemium-paywall-BLXESpH4.js} +2 -2
- package/dist/_chunks/{gestation-BXEgDGmP.js → gestation-mWF4AXea.js} +3 -3
- package/dist/_chunks/{gestational-age-calculator-CsQ05qDy.js → gestational-age-calculator-ZMSrzkRW.js} +59 -45
- package/dist/_chunks/{header-CTZWX-tm.js → header-Ce1Br27u.js} +70 -75
- package/dist/_chunks/{header-settings-CBLwUK6t.js → header-settings-Bx0Biimh.js} +2 -2
- package/dist/_chunks/{hi-wkq_rQAh.js → hi-Dj3oYd84.js} +2 -2
- package/dist/_chunks/index.modern-D2LGACWg.js +1529 -0
- package/dist/_chunks/insert-result-DisOY2G-.js +243 -0
- package/dist/_chunks/{isSameWeek-Bim5ftRd.js → isSameWeek-HfxKk6Lz.js} +2 -2
- package/dist/_chunks/{it-GiQrQ9p4.js → it-Y85ofIQQ.js} +7 -7
- package/dist/_chunks/{ja-qfYg3Rua.js → ja-CQ7J6YoA.js} +2 -2
- package/dist/_chunks/{kbd-Cglkd7CY.js → kbd-D855ZXIW.js} +2 -2
- package/dist/_chunks/map-view-Tb5VfK9Y.js +333 -0
- package/dist/_chunks/marketplace-app-shell-Dc5cTIt8.js +428 -0
- package/dist/_chunks/{nl-xOogO4sZ.js → nl-D9kHCmp3.js} +2 -2
- package/dist/_chunks/{patient-search-CBq62kmL.js → patient-search-DPe2ZYEL.js} +2 -2
- package/dist/_chunks/{patient-shell-DF81lALv.js → patient-shell-CnT4L8gn.js} +3 -3
- package/dist/_chunks/{payment-form-Dy3WIIsC.js → payment-form-BzVsG6Ks.js} +5 -5
- package/dist/_chunks/{pdf-viewer-Cy6Ul3hZ.js → pdf-viewer-B6MC6VTx.js} +139 -126
- package/dist/_chunks/{pl-GnOW6eGK.js → pl-B3Smqpkr.js} +3 -3
- package/dist/_chunks/{practice-results-C0d4IL5E.js → practice-results-CrLpEiiW.js} +4 -4
- package/dist/_chunks/pregnancy-weight-gain-zZL5Ir2-.js +224 -0
- package/dist/_chunks/{pt-_bV5b5RW.js → pt-D3J-1c_7.js} +6 -6
- package/dist/_chunks/{public-header.agent-B2dDg2_d.js → public-header.agent-BY6FH71R.js} +2 -2
- package/dist/_chunks/radio-group-CLjK-SlK.js +167 -0
- package/dist/_chunks/{rich-text-editor-DLbg2852.js → rich-text-editor-DhGIBd4a.js} +10 -10
- package/dist/_chunks/{ro-BEcyh5Nj.js → ro-BKAbbEA3.js} +2 -2
- package/dist/_chunks/{ru-Bi86hqMf.js → ru-BeG8f0Ep.js} +3 -3
- package/dist/_chunks/{sheet-BV-yuLE2.js → sheet-xbzu4YiY.js} +7 -7
- package/dist/_chunks/sign-document-B-3k_0LO.js +344 -0
- package/dist/_chunks/{signature-capture-DoiBd6i3.js → signature-capture-CpMBhqQ9.js} +6 -6
- package/dist/_chunks/{sq-BujHSAWu.js → sq-_hRPaeUy.js} +6 -6
- package/dist/_chunks/subDays-Dv7q9S7u.js +8 -0
- package/dist/_chunks/{sv-C8AeDrTA.js → sv-g009fSpe.js} +2 -2
- package/dist/_chunks/tab-bar-Xetknddo.js +105 -0
- package/dist/_chunks/{theme-toggle-DpC28kt5.js → theme-toggle-ClATnY4Q.js} +2 -2
- package/dist/_chunks/{toast.agent-WHHfw5VX.js → toast.agent-B0MCsvdZ.js} +2 -2
- package/dist/_chunks/{tr-CMSs_Vgf.js → tr-OKUOuhMW.js} +2 -2
- package/dist/_chunks/{unit-converter-EUwO6QYq.js → unit-converter-CuXCXJhK.js} +46 -40
- package/dist/_chunks/{workflow-map-C3gB0FvB.js → workflow-map-BFNpzTiw.js} +2 -2
- package/dist/_chunks/{zh-CN-eXB-PFu4.js → zh-CN-De4zwEhx.js} +3 -3
- package/dist/agent-catalog.json +1 -1
- package/dist/brand/product-lockup/product-lockup.d.ts +16 -0
- package/dist/components/_shared/calendar-class-names.d.ts +8 -0
- package/dist/components/_shared/index.d.ts +2 -0
- package/dist/components/_shared/insert-result.d.ts +78 -6
- package/dist/components/address-autocomplete/address-autocomplete.d.ts +77 -0
- package/dist/components/address-autocomplete/index.d.ts +4 -0
- package/dist/components/address-autocomplete/index.js +6 -0
- package/dist/components/address-autocomplete/parse-address.d.ts +52 -0
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +11 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/chart/chart.d.ts +10 -0
- package/dist/components/chart/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +12 -2
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/date-picker.d.ts +0 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/date-time-picker.d.ts +0 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +11 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +12 -2
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/header/header.d.ts +8 -0
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/kbd/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/matrix-rain/matrix-rain.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/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 +12 -2
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-document/sign-document.d.ts +12 -0
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/tab-bar/index.d.ts +3 -0
- package/dist/components/tab-bar/index.js +5 -0
- package/dist/components/tab-bar/tab-bar.d.ts +104 -0
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/unit-converter/unit-converter.d.ts +11 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +17 -0
- package/dist/i18n/locales/ar.js +18 -1
- package/dist/i18n/locales/de.d.ts +17 -0
- package/dist/i18n/locales/de.js +18 -1
- package/dist/i18n/locales/el.d.ts +17 -0
- package/dist/i18n/locales/el.js +18 -1
- package/dist/i18n/locales/en.d.ts +17 -0
- package/dist/i18n/locales/en.js +18 -1
- package/dist/i18n/locales/es.d.ts +17 -0
- package/dist/i18n/locales/es.js +18 -1
- package/dist/i18n/locales/fr.d.ts +17 -0
- package/dist/i18n/locales/fr.js +18 -1
- package/dist/i18n/locales/hi.d.ts +17 -0
- package/dist/i18n/locales/hi.js +18 -1
- package/dist/i18n/locales/it.d.ts +17 -0
- package/dist/i18n/locales/it.js +18 -1
- package/dist/i18n/locales/ja.d.ts +17 -0
- package/dist/i18n/locales/ja.js +18 -1
- package/dist/i18n/locales/nl.d.ts +17 -0
- package/dist/i18n/locales/nl.js +18 -1
- package/dist/i18n/locales/pl.d.ts +17 -0
- package/dist/i18n/locales/pl.js +18 -1
- package/dist/i18n/locales/pt.d.ts +17 -0
- package/dist/i18n/locales/pt.js +18 -1
- package/dist/i18n/locales/ro.d.ts +17 -0
- package/dist/i18n/locales/ro.js +18 -1
- package/dist/i18n/locales/ru.d.ts +17 -0
- package/dist/i18n/locales/ru.js +18 -1
- package/dist/i18n/locales/sq.d.ts +17 -0
- package/dist/i18n/locales/sq.js +18 -1
- package/dist/i18n/locales/sv.d.ts +17 -0
- package/dist/i18n/locales/sv.js +18 -1
- package/dist/i18n/locales/tr.d.ts +17 -0
- package/dist/i18n/locales/tr.js +18 -1
- package/dist/i18n/locales/zh.d.ts +17 -0
- package/dist/i18n/locales/zh.js +18 -1
- package/dist/index.js +605 -599
- package/dist/locales/ar.json +18 -1
- package/dist/locales/de.json +18 -1
- package/dist/locales/el.json +18 -1
- package/dist/locales/en.json +18 -1
- package/dist/locales/es.json +18 -1
- package/dist/locales/fr.json +18 -1
- package/dist/locales/hi.json +18 -1
- package/dist/locales/it.json +18 -1
- package/dist/locales/ja.json +18 -1
- package/dist/locales/nl.json +18 -1
- package/dist/locales/pl.json +18 -1
- package/dist/locales/pt.json +18 -1
- package/dist/locales/ro.json +18 -1
- package/dist/locales/ru.json +18 -1
- package/dist/locales/sq.json +18 -1
- package/dist/locales/sv.json +18 -1
- package/dist/locales/tr.json +18 -1
- package/dist/locales/zh.json +18 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +87 -4
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1411 -2
- package/package.json +16 -1
- package/dist/_chunks/bmi-calculator-DnEr513I.js +0 -213
- package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +0 -185
- package/dist/_chunks/insert-result-yJ0QavoN.js +0 -133
- package/dist/_chunks/map-view-qJLybrmN.js +0 -1850
- package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +0 -296
- package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +0 -209
- package/dist/_chunks/radio-group-BcF92GEF.js +0 -152
- package/dist/_chunks/react-day-picker-CdtIiKjx.js +0 -3174
- package/dist/_chunks/sign-document-CpLDZ6Db.js +0 -316
- package/dist/_chunks/subDays-_T9YeKPX.js +0 -8
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
2
|
+
import { forwardRef as j, useState as g, useMemo as _, useEffect as A } from "react";
|
|
3
|
+
import { c as B } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as G } from "react-i18next";
|
|
5
5
|
import { F as v } from "./form-field-BOm9hK35.js";
|
|
6
|
-
import { N as
|
|
6
|
+
import { N as Y } from "./number-input-Dj5L3pXK.js";
|
|
7
7
|
import { S as y } from "./select-hsCaJSX3.js";
|
|
8
|
-
import { I as
|
|
8
|
+
import { I as D } from "./insert-result-DisOY2G-.js";
|
|
9
9
|
const F = {
|
|
10
10
|
// weight → base kg
|
|
11
11
|
kg: { id: "kg", category: "weight", factor: 1, offset: 0 },
|
|
@@ -28,53 +28,56 @@ const F = {
|
|
|
28
28
|
length: ["cm", "m", "in", "ft"],
|
|
29
29
|
temperature: ["c", "f"],
|
|
30
30
|
glucose: ["mmol_l", "mg_dl"]
|
|
31
|
-
},
|
|
31
|
+
}, L = [
|
|
32
32
|
"weight",
|
|
33
33
|
"length",
|
|
34
34
|
"temperature",
|
|
35
35
|
"glucose"
|
|
36
36
|
];
|
|
37
|
-
function
|
|
38
|
-
const
|
|
39
|
-
if (!
|
|
40
|
-
if (
|
|
37
|
+
function M(c, r, f) {
|
|
38
|
+
const o = F[r], n = F[f];
|
|
39
|
+
if (!o || !n) throw new Error(`Unknown unit: ${r} → ${f}`);
|
|
40
|
+
if (o.category !== n.category)
|
|
41
41
|
throw new Error(
|
|
42
|
-
`Cannot convert across categories: ${
|
|
42
|
+
`Cannot convert across categories: ${o.category} → ${n.category}`
|
|
43
43
|
);
|
|
44
|
-
return (c *
|
|
44
|
+
return (c * o.factor + o.offset - n.offset) / n.factor;
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const q = B("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
47
47
|
variants: {
|
|
48
48
|
width: { full: "ds:w-full", auto: "ds:inline-flex" }
|
|
49
49
|
},
|
|
50
50
|
defaultVariants: { width: "full" }
|
|
51
|
-
}),
|
|
51
|
+
}), H = j(
|
|
52
52
|
({
|
|
53
53
|
defaultCategory: c = "weight",
|
|
54
|
-
onResultChange:
|
|
54
|
+
onResultChange: r,
|
|
55
55
|
onInsert: f,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
insertVariant: o = "insert",
|
|
57
|
+
onCopy: n,
|
|
58
|
+
onError: C,
|
|
59
|
+
id: U,
|
|
60
|
+
width: E,
|
|
61
|
+
className: S
|
|
62
|
+
}, T) => {
|
|
63
|
+
const { t, i18n: b } = G(), [$, V] = g(c), [i, k] = g(null), [m, w] = g(
|
|
61
64
|
p[c][0]
|
|
62
65
|
), [l, x] = g(
|
|
63
66
|
p[c][1]
|
|
64
|
-
),
|
|
67
|
+
), O = (s) => {
|
|
65
68
|
const I = s, h = p[I];
|
|
66
|
-
|
|
69
|
+
V(I), w(h[0]), x(h[1] ?? h[0]);
|
|
67
70
|
}, a = _(
|
|
68
|
-
() => i === null ? null :
|
|
71
|
+
() => i === null ? null : M(i, m, l),
|
|
69
72
|
[i, m, l]
|
|
70
73
|
), u = _(
|
|
71
74
|
() => new Intl.NumberFormat(b.language, { maximumFractionDigits: 3 }),
|
|
72
75
|
[b.language]
|
|
73
76
|
);
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}, [a,
|
|
77
|
-
const
|
|
77
|
+
A(() => {
|
|
78
|
+
r == null || r(a);
|
|
79
|
+
}, [a, r]);
|
|
80
|
+
const z = L.map((s) => ({
|
|
78
81
|
value: s,
|
|
79
82
|
label: t(`unitConverter.category.${s}`)
|
|
80
83
|
})), N = p[$].map((s) => ({
|
|
@@ -84,21 +87,21 @@ const D = z("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
84
87
|
return /* @__PURE__ */ d(
|
|
85
88
|
"div",
|
|
86
89
|
{
|
|
87
|
-
ref:
|
|
90
|
+
ref: T,
|
|
88
91
|
"data-component": "unit-converter",
|
|
89
|
-
"data-component-id":
|
|
90
|
-
className:
|
|
92
|
+
"data-component-id": U,
|
|
93
|
+
className: q({ width: E, className: S }),
|
|
91
94
|
children: [
|
|
92
95
|
/* @__PURE__ */ e(v, { label: t("unitConverter.categoryLabel"), children: /* @__PURE__ */ e(
|
|
93
96
|
y,
|
|
94
97
|
{
|
|
95
|
-
options:
|
|
98
|
+
options: z,
|
|
96
99
|
value: $,
|
|
97
|
-
onValueChange:
|
|
100
|
+
onValueChange: O
|
|
98
101
|
}
|
|
99
102
|
) }),
|
|
100
103
|
/* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
|
|
101
|
-
/* @__PURE__ */ e(v, { label: t("unitConverter.value"), children: /* @__PURE__ */ e(
|
|
104
|
+
/* @__PURE__ */ e(v, { label: t("unitConverter.value"), children: /* @__PURE__ */ e(Y, { mode: "decimal", value: i, onChange: k }) }),
|
|
102
105
|
/* @__PURE__ */ e(v, { label: t("unitConverter.from"), children: /* @__PURE__ */ e(
|
|
103
106
|
y,
|
|
104
107
|
{
|
|
@@ -128,10 +131,13 @@ const D = z("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
128
131
|
" ",
|
|
129
132
|
t(`unitConverter.units.${l}`)
|
|
130
133
|
] }),
|
|
131
|
-
f ? /* @__PURE__ */ e(
|
|
132
|
-
|
|
134
|
+
o === "copy" || f ? /* @__PURE__ */ e(
|
|
135
|
+
D,
|
|
133
136
|
{
|
|
137
|
+
variant: o,
|
|
134
138
|
onInsert: f,
|
|
139
|
+
onCopy: n,
|
|
140
|
+
onError: C,
|
|
135
141
|
card: {
|
|
136
142
|
title: t("insert.title.unitConverter"),
|
|
137
143
|
fields: [
|
|
@@ -157,12 +163,12 @@ const D = z("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
|
157
163
|
);
|
|
158
164
|
}
|
|
159
165
|
);
|
|
160
|
-
|
|
166
|
+
H.displayName = "UnitConverter";
|
|
161
167
|
export {
|
|
162
|
-
|
|
168
|
+
L as C,
|
|
163
169
|
F as U,
|
|
164
170
|
p as a,
|
|
165
|
-
|
|
166
|
-
|
|
171
|
+
H as b,
|
|
172
|
+
M as c
|
|
167
173
|
};
|
|
168
|
-
//# sourceMappingURL=unit-converter-
|
|
174
|
+
//# sourceMappingURL=unit-converter-CuXCXJhK.js.map
|
|
@@ -12,7 +12,7 @@ import { C as Ne } from "./circle-BkqTgYmt.js";
|
|
|
12
12
|
import { u as Ce } from "./registry-nPAVE19X.js";
|
|
13
13
|
import { A as V } from "./alert-ywPR59NE.js";
|
|
14
14
|
import { B as _e } from "./button-DD_0Xdmr.js";
|
|
15
|
-
import { D as N } from "./dropdown-menu-
|
|
15
|
+
import { D as N } from "./dropdown-menu-CUEXqKis.js";
|
|
16
16
|
import { E } from "./empty-state-BLy7tigq.js";
|
|
17
17
|
import { P as ae } from "./plus-CYKNmfuA.js";
|
|
18
18
|
import { G as ne } from "./globe-BkEFMNSg.js";
|
|
@@ -1399,4 +1399,4 @@ export {
|
|
|
1399
1399
|
ee as r,
|
|
1400
1400
|
D as w
|
|
1401
1401
|
};
|
|
1402
|
-
//# sourceMappingURL=workflow-map-
|
|
1402
|
+
//# sourceMappingURL=workflow-map-BFNpzTiw.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as u } from "./isSameWeek-
|
|
1
|
+
import { q as s, r as i, v as o, w as m } from "./date-picker-variants-DLi1Va_e.js";
|
|
2
|
+
import { i as u } from "./isSameWeek-HfxKk6Lz.js";
|
|
3
3
|
const c = {
|
|
4
4
|
lessThanXSeconds: {
|
|
5
5
|
one: "不到 1 秒",
|
|
@@ -385,4 +385,4 @@ const b = {
|
|
|
385
385
|
export {
|
|
386
386
|
Q as zhCN
|
|
387
387
|
};
|
|
388
|
-
//# sourceMappingURL=zh-CN-
|
|
388
|
+
//# sourceMappingURL=zh-CN-De4zwEhx.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -19,6 +19,14 @@ export type ProductLockupProps = {
|
|
|
19
19
|
* gradient/serif treatment is inappropriate.
|
|
20
20
|
*/
|
|
21
21
|
monochrome?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Ink resolution. `'auto'` (default) uses the lockup's intended ink
|
|
24
|
+
* (`--foreground` for monochrome). `'inherit'` makes the whole lockup ride
|
|
25
|
+
* `currentColor` — use it with `monochrome` on a coloured brand surface (a
|
|
26
|
+
* tinted header or split-login panel) so the wordmark + name both take the
|
|
27
|
+
* surface's text colour rather than clashing with a fixed `--foreground`.
|
|
28
|
+
*/
|
|
29
|
+
tone?: 'auto' | 'inherit';
|
|
22
30
|
/** Lockup size. Drives both the wordmark and the name's cap height. */
|
|
23
31
|
size?: LockupSize;
|
|
24
32
|
className?: string;
|
|
@@ -46,6 +54,14 @@ export declare const ProductLockup: import("react").ForwardRefExoticComponent<{
|
|
|
46
54
|
* gradient/serif treatment is inappropriate.
|
|
47
55
|
*/
|
|
48
56
|
monochrome?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Ink resolution. `'auto'` (default) uses the lockup's intended ink
|
|
59
|
+
* (`--foreground` for monochrome). `'inherit'` makes the whole lockup ride
|
|
60
|
+
* `currentColor` — use it with `monochrome` on a coloured brand surface (a
|
|
61
|
+
* tinted header or split-login panel) so the wordmark + name both take the
|
|
62
|
+
* surface's text colour rather than clashing with a fixed `--foreground`.
|
|
63
|
+
*/
|
|
64
|
+
tone?: "auto" | "inherit";
|
|
49
65
|
/** Lockup size. Drives both the wordmark and the name's cap height. */
|
|
50
66
|
size?: LockupSize;
|
|
51
67
|
className?: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ClassNames } from 'react-day-picker';
|
|
2
|
+
/**
|
|
3
|
+
* Partial class-name map passed to every `<DayPicker classNames=…>` in the
|
|
4
|
+
* kit. Keyed by the rdp v9 enums so a future rdp upgrade surfaces missing
|
|
5
|
+
* keys at the type level.
|
|
6
|
+
*/
|
|
7
|
+
export declare const calendarClassNames: Partial<ClassNames>;
|
|
8
|
+
//# sourceMappingURL=calendar-class-names.d.ts.map
|
|
@@ -2,6 +2,7 @@ export { composeRefs } from './compose-refs';
|
|
|
2
2
|
export { isSafeImageSrc, safeImageSrc } from './safe-image-src';
|
|
3
3
|
export { SafeHtml, sanitiseHtml, type SafeHtmlProfile, type SafeHtmlProps, } from './safe-html';
|
|
4
4
|
export { groupOptions } from './group-options';
|
|
5
|
+
export { InsertButton, buildResultText, buildResultHtml, buildResultCardSvg, svgCardToPngDataUri, type InsertButtonProps, type InsertVariant, type InsertPayload, type InsertMode, type InsertCardData, type InsertCardField, type SvgCardToPngOptions, } from './insert-result';
|
|
5
6
|
export { normalizeDiacritics } from './normalize-diacritics';
|
|
6
7
|
export { useDebouncedCallback } from './use-debounced-callback';
|
|
7
8
|
export { useFocusTrap, type UseFocusTrapOptions } from './use-focus-trap';
|
|
@@ -11,6 +12,7 @@ export { INPUT_SURFACE_CHROME, INPUT_SURFACE_TONE, INPUT_SURFACE_HEIGHT, INPUT_S
|
|
|
11
12
|
export { getDateFnsLocale, getShortDateFormat, useDateFnsLocale, } from './date-locale';
|
|
12
13
|
export { buildDisabledMatcher } from './date-utils';
|
|
13
14
|
export { CalendarChevron } from './calendar-chevron';
|
|
15
|
+
export { calendarClassNames } from './calendar-class-names';
|
|
14
16
|
export { triggerVariants, calendarIconVariants, popoverContentVariants, presetButtonVariants, } from './date-picker-variants';
|
|
15
17
|
export type { OptionShape } from './option';
|
|
16
18
|
export type { TimeValue } from './time';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { type ButtonProps } from '../button';
|
|
1
2
|
export type InsertMode = 'text' | 'image' | 'text-image';
|
|
3
|
+
export type InsertVariant = 'insert' | 'copy';
|
|
2
4
|
export interface InsertCardField {
|
|
3
5
|
label: string;
|
|
4
6
|
value: string;
|
|
@@ -12,24 +14,68 @@ export interface InsertCardData {
|
|
|
12
14
|
highlight?: string;
|
|
13
15
|
}
|
|
14
16
|
export interface InsertPayload {
|
|
15
|
-
/** Which
|
|
17
|
+
/** Which button the user chose. */
|
|
16
18
|
mode: InsertMode;
|
|
17
19
|
/** Plain-text summary. Always present. */
|
|
18
20
|
text: string;
|
|
19
21
|
/** Rich HTML summary (heading + list). Always present. */
|
|
20
22
|
html: string;
|
|
21
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Branded SVG result-card markup. Empty for mode `'text'`.
|
|
25
|
+
*
|
|
26
|
+
* Kept for back-compat and for callers that need the live, copy-pasteable
|
|
27
|
+
* vector. NOTE: SVG can carry `<script>` and is routinely stripped by
|
|
28
|
+
* rich-text sanitisers, so it is NOT the format to insert into an editor —
|
|
29
|
+
* use {@link InsertPayload.pngDataUri} for that.
|
|
30
|
+
*/
|
|
22
31
|
svg: string;
|
|
23
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* SVG as an `image/svg+xml` data URI for `<img src>`. Empty for `'text'`.
|
|
34
|
+
*
|
|
35
|
+
* Same caveat as {@link InsertPayload.svg}: fine for a preview `<img>`, but a
|
|
36
|
+
* sanitiser-stripped vector once it reaches an editor. Prefer
|
|
37
|
+
* {@link InsertPayload.pngDataUri}.
|
|
38
|
+
*/
|
|
24
39
|
imageDataUri: string;
|
|
40
|
+
/**
|
|
41
|
+
* Async thunk that resolves the result-card to an `image/png` data URI —
|
|
42
|
+
* the format intended for editor insertion. PNG is a flat raster: it carries
|
|
43
|
+
* no script and survives the rich-text sanitiser that strips SVG. Resolves to
|
|
44
|
+
* an empty string for mode `'text'` (no image is built). The PNG is rendered
|
|
45
|
+
* lazily so the synchronous payload stays cheap; `await payload.pngDataUri()`
|
|
46
|
+
* only when you actually need the raster.
|
|
47
|
+
*/
|
|
48
|
+
pngDataUri: () => Promise<string>;
|
|
25
49
|
}
|
|
26
50
|
export interface InsertButtonProps {
|
|
27
51
|
/** Structured result used to build every payload representation. */
|
|
28
52
|
card: InsertCardData;
|
|
29
|
-
/**
|
|
30
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Verb the buttons perform. Defaults to `'insert'`.
|
|
55
|
+
*
|
|
56
|
+
* - `'insert'` — fires `onInsert(payload)` (editor-extension context).
|
|
57
|
+
* - `'copy'` — writes the chosen representation(s) to the clipboard as a
|
|
58
|
+
* multi-format `ClipboardItem` (app-shell context).
|
|
59
|
+
*/
|
|
60
|
+
variant?: InsertVariant;
|
|
61
|
+
/**
|
|
62
|
+
* Receives the built payload when a button is pressed.
|
|
63
|
+
*
|
|
64
|
+
* Required for the `insert` variant; optional (and ignored) for `copy`.
|
|
65
|
+
*/
|
|
66
|
+
onInsert?: (payload: InsertPayload) => void;
|
|
67
|
+
/** `copy` variant only — fired after a successful clipboard write. */
|
|
68
|
+
onCopy?: (mode: InsertMode) => void;
|
|
69
|
+
/** `copy` variant only — fired if the clipboard write can't proceed. */
|
|
70
|
+
onError?: (error: unknown) => void;
|
|
31
71
|
/** Trigger size. Defaults to `'sm'`. */
|
|
32
72
|
size?: 'sm' | 'md' | 'lg';
|
|
73
|
+
/**
|
|
74
|
+
* Visual intent of the three trigger buttons (text / image / text+image).
|
|
75
|
+
* Mirrors the `Button` `intent` prop and applies to every trigger uniformly
|
|
76
|
+
* so the three stay visually consistent. Defaults to `'primary'`.
|
|
77
|
+
*/
|
|
78
|
+
intent?: ButtonProps['intent'];
|
|
33
79
|
}
|
|
34
80
|
interface ThemeColours {
|
|
35
81
|
fg: string;
|
|
@@ -42,6 +88,32 @@ interface ThemeColours {
|
|
|
42
88
|
export declare function buildResultText(card: InsertCardData): string;
|
|
43
89
|
export declare function buildResultHtml(card: InsertCardData): string;
|
|
44
90
|
export declare function buildResultCardSvg(card: InsertCardData, c: ThemeColours): string;
|
|
45
|
-
|
|
91
|
+
/** Options for {@link svgCardToPngDataUri}. */
|
|
92
|
+
export interface SvgCardToPngOptions {
|
|
93
|
+
/**
|
|
94
|
+
* Resolved theme colours to paint into the card. When omitted, the card
|
|
95
|
+
* renders with `currentColor` / transparent fallbacks (see
|
|
96
|
+
* {@link buildResultCardSvg}) — pass sampled colours for a branded raster.
|
|
97
|
+
*/
|
|
98
|
+
colours?: ThemeColours;
|
|
99
|
+
/**
|
|
100
|
+
* Device-pixel scale factor for the raster. `2` yields a retina-sharp PNG.
|
|
101
|
+
* Defaults to `1`.
|
|
102
|
+
*/
|
|
103
|
+
scale?: number;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Render an {@link InsertCardData} result card to an `image/png` data URI.
|
|
107
|
+
*
|
|
108
|
+
* This is the format intended for editor insertion: a flat raster carries no
|
|
109
|
+
* `<script>` and survives the rich-text sanitiser that strips inline SVG. The
|
|
110
|
+
* card is built as SVG, loaded into an `<img>`, painted onto a canvas at the
|
|
111
|
+
* card's intrinsic size (optionally scaled), and read back as `image/png`.
|
|
112
|
+
*
|
|
113
|
+
* Browser-only — relies on `Image`, `<canvas>`, and `canvas.toBlob`. Throws if
|
|
114
|
+
* called in a non-DOM context or if the SVG fails to decode.
|
|
115
|
+
*/
|
|
116
|
+
export declare function svgCardToPngDataUri(card: InsertCardData, opts?: SvgCardToPngOptions): Promise<string>;
|
|
117
|
+
export declare const InsertButton: import("react").ForwardRefExoticComponent<InsertButtonProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
118
|
export {};
|
|
47
119
|
//# sourceMappingURL=insert-result.d.ts.map
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type StructuredAddress, type RawAddressComponent } from './parse-address';
|
|
2
|
+
export type { StructuredAddress, RawAddressComponent };
|
|
3
|
+
/**
|
|
4
|
+
* A single address suggestion surfaced in the listbox.
|
|
5
|
+
*
|
|
6
|
+
* `placeId` keys the row and (in real Google mode) is used to fetch full
|
|
7
|
+
* details on selection. In MOCK mode the suggestion carries a pre-parsed
|
|
8
|
+
* `address` so selection resolves without any network call.
|
|
9
|
+
*/
|
|
10
|
+
export interface AddressSuggestion {
|
|
11
|
+
/** Stable id — the Google place id, or any unique string in mock mode. */
|
|
12
|
+
placeId: string;
|
|
13
|
+
/** Primary line shown in the row (e.g. "Via Roma 12"). */
|
|
14
|
+
primaryText: string;
|
|
15
|
+
/** Secondary line shown muted under the primary (e.g. "Milan, Italy"). */
|
|
16
|
+
secondaryText?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Pre-parsed structured address. Required in MOCK mode (so selection can
|
|
19
|
+
* resolve without Google). In real Google mode this is omitted and the
|
|
20
|
+
* details are fetched on selection.
|
|
21
|
+
*/
|
|
22
|
+
address?: StructuredAddress;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Test/story injector. Given the current query it returns the suggestions
|
|
26
|
+
* to show. Each returned suggestion MUST carry a pre-parsed `address` so
|
|
27
|
+
* selection resolves without a real Google call.
|
|
28
|
+
*/
|
|
29
|
+
export type GetSuggestions = (query: string) => AddressSuggestion[] | Promise<AddressSuggestion[]>;
|
|
30
|
+
export interface AddressAutocompleteProps {
|
|
31
|
+
/**
|
|
32
|
+
* Google Maps JS API key. Consumer-owned; never cached by the kit. When
|
|
33
|
+
* absent (and no `getSuggestions` injector is given) the field degrades
|
|
34
|
+
* to a plain free-text input with no suggestions.
|
|
35
|
+
*/
|
|
36
|
+
apiKey?: string;
|
|
37
|
+
/** Controlled text value of the input. */
|
|
38
|
+
value?: string;
|
|
39
|
+
/** Fires on every keystroke with the new input text. */
|
|
40
|
+
onValueChange?: (value: string) => void;
|
|
41
|
+
/** Uncontrolled initial text. Ignored once `value` is set. */
|
|
42
|
+
defaultValue?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Fires when the user picks a suggestion, with the parsed structured
|
|
45
|
+
* address. In real Google mode the details are fetched first, so this
|
|
46
|
+
* is async relative to the click.
|
|
47
|
+
*/
|
|
48
|
+
onSelect?: (address: StructuredAddress) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Test-only / mock injector. When provided, the listbox is driven from
|
|
51
|
+
* its return value instead of a real Google call — even when `apiKey` is
|
|
52
|
+
* also set (the injector wins, so stories/tests are deterministic).
|
|
53
|
+
*/
|
|
54
|
+
getSuggestions?: GetSuggestions;
|
|
55
|
+
/**
|
|
56
|
+
* Restrict predictions to these CLDR region codes (e.g. `['it']`).
|
|
57
|
+
* Real-Google mode only.
|
|
58
|
+
*/
|
|
59
|
+
regionCodes?: string[];
|
|
60
|
+
/** Visible label is owned by a wrapping FormField; this is a fallback name. */
|
|
61
|
+
'aria-label'?: string;
|
|
62
|
+
/** Placeholder text. Falls back to the translated default. */
|
|
63
|
+
placeholder?: string;
|
|
64
|
+
/** Debounce before firing a suggestion fetch. Default 250ms. */
|
|
65
|
+
debounceMs?: number;
|
|
66
|
+
disabled?: boolean;
|
|
67
|
+
required?: boolean;
|
|
68
|
+
readOnly?: boolean;
|
|
69
|
+
name?: string;
|
|
70
|
+
/** Field id. Falls back to FormField context id. */
|
|
71
|
+
id?: string;
|
|
72
|
+
size?: 'sm' | 'md' | 'lg';
|
|
73
|
+
tone?: 'default' | 'error';
|
|
74
|
+
className?: string;
|
|
75
|
+
}
|
|
76
|
+
export declare const AddressAutocomplete: import("react").ForwardRefExoticComponent<AddressAutocompleteProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
77
|
+
//# sourceMappingURL=address-autocomplete.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AddressAutocomplete } from './address-autocomplete';
|
|
2
|
+
export type { AddressAutocompleteProps, AddressSuggestion, GetSuggestions, } from './address-autocomplete';
|
|
3
|
+
export { parseAddressComponents, type StructuredAddress, type RawAddressComponent, } from './parse-address';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured, app-friendly address. Field semantics match the AlfaDocs
|
|
3
|
+
* Italian patient-address model: `province` is the 2-letter IT province
|
|
4
|
+
* code (UPPERCASED) and `country` is the ISO 3166-1 alpha-2 code
|
|
5
|
+
* (lowercased), matching how the platform stores them.
|
|
6
|
+
*/
|
|
7
|
+
export interface StructuredAddress {
|
|
8
|
+
/** Street line — route, with the street number joined when present. */
|
|
9
|
+
street: string;
|
|
10
|
+
/** Town / city (locality, falling back to postal_town / admin level 3). */
|
|
11
|
+
city: string;
|
|
12
|
+
/** Postal / ZIP code. */
|
|
13
|
+
postcode: string;
|
|
14
|
+
/** Province — admin level 2 short code, UPPERCASED (e.g. "MI", "RM"). */
|
|
15
|
+
province: string;
|
|
16
|
+
/** Country — ISO alpha-2, lowercased (e.g. "it", "gb"). */
|
|
17
|
+
country: string;
|
|
18
|
+
/** Google's human-readable formatted address (whole line). */
|
|
19
|
+
formatted: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Loosened address-component shape accepted by {@link parseAddressComponents}.
|
|
23
|
+
* Mirrors both Places-API (`longText`/`shortText`) and classic Geocoder
|
|
24
|
+
* (`long_name`/`short_name`) field names so either source parses without a
|
|
25
|
+
* pre-pass. `types` is required; the text fields are individually optional.
|
|
26
|
+
*/
|
|
27
|
+
export interface RawAddressComponent {
|
|
28
|
+
types: string[];
|
|
29
|
+
longText?: string | null;
|
|
30
|
+
shortText?: string | null;
|
|
31
|
+
long_name?: string | null;
|
|
32
|
+
short_name?: string | null;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Maps an array of Google address components to a {@link StructuredAddress}.
|
|
36
|
+
*
|
|
37
|
+
* Pure: no SDK calls, no DOM, no I/O. `formatted` is passed through from the
|
|
38
|
+
* caller (Google's `formattedAddress` / `formatted_address`) because it is
|
|
39
|
+
* not derivable from the component list.
|
|
40
|
+
*
|
|
41
|
+
* Mapping rules:
|
|
42
|
+
* - `street` = `route`, prefixed with `street_number` when present
|
|
43
|
+
* (e.g. "Via Roma 12"). Either part alone is used if the
|
|
44
|
+
* other is missing.
|
|
45
|
+
* - `city` = `locality`, falling back to `postal_town`, then
|
|
46
|
+
* `administrative_area_level_3`.
|
|
47
|
+
* - `postcode` = `postal_code`.
|
|
48
|
+
* - `province` = `administrative_area_level_2` SHORT text, UPPERCASED.
|
|
49
|
+
* - `country` = `country` SHORT text (ISO alpha-2), lowercased.
|
|
50
|
+
*/
|
|
51
|
+
export declare function parseAddressComponents(components: readonly RawAddressComponent[], formatted?: string): StructuredAddress;
|
|
52
|
+
//# sourceMappingURL=parse-address.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "error" | "neutral" | "info" | "success" | "warning" | "brand" |
|
|
4
|
+
variant?: "error" | "accent" | "neutral" | "info" | "success" | "warning" | "brand" | null | undefined;
|
|
5
5
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
6
|
shape?: "pill" | "rectangular" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { type InsertPayload } from '../_shared/insert-result';
|
|
2
|
+
import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result';
|
|
3
3
|
import { type UnitSystem, type BmiCategory } from './bmi';
|
|
4
4
|
export interface BmiResult {
|
|
5
5
|
/** BMI in kg/m². */
|
|
@@ -17,6 +17,16 @@ export interface BmiCalculatorProps extends VariantProps<typeof rootVariants> {
|
|
|
17
17
|
onResultChange?: (result: BmiResult | null) => void;
|
|
18
18
|
/** When provided, shows an "Insert" button that emits the result for an editor. */
|
|
19
19
|
onInsert?: (payload: InsertPayload) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Which verb the result button performs. Defaults to `'insert'`.
|
|
22
|
+
* Use `'copy'` in an app-shell surface (no editor to insert into) — the
|
|
23
|
+
* button writes the result to the clipboard as a multi-format `ClipboardItem`.
|
|
24
|
+
*/
|
|
25
|
+
insertVariant?: InsertVariant;
|
|
26
|
+
/** `copy` variant only — fired after a successful clipboard write. */
|
|
27
|
+
onCopy?: (mode: InsertMode) => void;
|
|
28
|
+
/** `copy` variant only — fired if the clipboard write can't proceed. */
|
|
29
|
+
onError?: (error: unknown) => void;
|
|
20
30
|
/** Opaque instance id, emitted as `data-component-id`. */
|
|
21
31
|
id?: string;
|
|
22
32
|
/** Extra class names on the wrapper. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as m } from "../../_chunks/bmi-calculator-
|
|
1
|
+
import { B as m } from "../../_chunks/bmi-calculator-DuVSFDuw.js";
|
|
2
2
|
import { b as e, a as t, c as r, d as T, e as c, f as i, i as b, k as n, l as f } from "../../_chunks/bmi-BxD-tFzU.js";
|
|
3
3
|
export {
|
|
4
4
|
m as BmiCalculator,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const cardVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "outlined" | "elevated" | null | undefined;
|
|
5
5
|
interactive?: boolean | null | undefined;
|
|
6
6
|
stretch?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -29,6 +29,16 @@ export interface ChartProps extends VariantProps<typeof chartVariants> {
|
|
|
29
29
|
width?: number | string;
|
|
30
30
|
/** Opt-in pattern fills for colour-blind users. */
|
|
31
31
|
patterns?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Override the series colour ramp. Pass **already-resolved** colour strings
|
|
34
|
+
* (e.g. the live value of `var(--success)` sampled by the consumer) — these
|
|
35
|
+
* are handed straight to ApexCharts, which can't read CSS custom properties.
|
|
36
|
+
* When omitted, the theme bridge's `colors` ramp from `apexcharts-theme.ts`
|
|
37
|
+
* is used, so existing consumers are unaffected. Typical use: a single-arc
|
|
38
|
+
* `radialBar` gauge (e.g. BMI) that must change hue with the value —
|
|
39
|
+
* green in the healthy band, amber/red outside it.
|
|
40
|
+
*/
|
|
41
|
+
colors?: string[];
|
|
32
42
|
/** Show the ApexCharts toolbar. Defaults to false. */
|
|
33
43
|
toolbar?: boolean;
|
|
34
44
|
/** Locale override — defaults to the active i18next language. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { type InsertPayload } from '../_shared/insert-result';
|
|
2
|
+
import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result';
|
|
3
3
|
import { type CyclePrediction } from './cycle';
|
|
4
4
|
declare const rootVariants: (props?: ({
|
|
5
5
|
width?: "auto" | "full" | null | undefined;
|
|
@@ -9,8 +9,18 @@ export interface CycleCalculatorProps extends VariantProps<typeof rootVariants>
|
|
|
9
9
|
defaultCycleLength?: number;
|
|
10
10
|
/** Fires whenever a prediction can be computed (and `null` when it can't). */
|
|
11
11
|
onResultChange?: (result: CyclePrediction | null) => void;
|
|
12
|
-
/** When provided, shows
|
|
12
|
+
/** When provided, shows the result-action buttons that emit / copy the result. */
|
|
13
13
|
onInsert?: (payload: InsertPayload) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Which verb the result button performs. Defaults to `'insert'`.
|
|
16
|
+
* Use `'copy'` in an app-shell surface (no editor to insert into) — the
|
|
17
|
+
* button writes the result to the clipboard as a multi-format `ClipboardItem`.
|
|
18
|
+
*/
|
|
19
|
+
insertVariant?: InsertVariant;
|
|
20
|
+
/** `copy` variant only — fired after a successful clipboard write. */
|
|
21
|
+
onCopy?: (mode: InsertMode) => void;
|
|
22
|
+
/** `copy` variant only — fired if the clipboard write can't proceed. */
|
|
23
|
+
onError?: (error: unknown) => void;
|
|
14
24
|
/** Opaque instance id, emitted as `data-component-id`. */
|
|
15
25
|
id?: string;
|
|
16
26
|
/** Extra class names on the wrapper. */
|