@alfadocs/ui-kit 0.35.0 → 0.37.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/{ar-CEpIJtcO.js → ar-D1RwVZFj.js} +2 -2
- package/dist/_chunks/bmi-calculator-DQD5_nE-.js +214 -0
- package/dist/_chunks/{booking-eM0y0NIR.js → booking-DqXsd1Mv.js} +4 -4
- package/dist/_chunks/chart-DnHvmiDX.js +312 -0
- package/dist/_chunks/{date-picker-B94HAV4A.js → date-picker-CXFpu-qY.js} +2 -2
- package/dist/_chunks/{date-range-picker-D8CHNYQT.js → date-range-picker-I-q5rifj.js} +3 -3
- package/dist/_chunks/{date-time-picker-D1GEzf8p.js → date-time-picker-CqpGPlcH.js} +2 -2
- package/dist/_chunks/{de-Dfbeau59.js → de-HTQ4b4-J.js} +2 -2
- package/dist/_chunks/due-date-calculator-kf9U_g7O.js +173 -0
- package/dist/_chunks/{editable-currency-cell-renderer-CZcVWBPo.js → editable-currency-cell-renderer-DnjwZNZP.js} +2 -2
- package/dist/_chunks/{el-Dro3J7CP.js → el-Dr1pjuDq.js} +2 -2
- package/dist/_chunks/{es-Dvg8u70B.js → es-CvyTjLS0.js} +2 -2
- package/dist/_chunks/{fr-VOGjBSPP.js → fr-CS7aqaFR.js} +2 -2
- package/dist/_chunks/{hi-BSDxWU_y.js → hi-3uy8KpsH.js} +2 -2
- package/dist/_chunks/{isSameWeek-Dfzu29cW.js → isSameWeek-DRpMibi9.js} +2 -2
- package/dist/_chunks/{it-CuonvcI_.js → it-B_RF5VSw.js} +3 -3
- package/dist/_chunks/{ja-DO57gIOT.js → ja-C1mEYy35.js} +2 -2
- package/dist/_chunks/marketplace-app-shell-DXHxy9dj.js +295 -0
- package/dist/_chunks/{nl-DjPaaWaW.js → nl-Dl7lO2t3.js} +2 -2
- package/dist/_chunks/{pl-Cl4lOx2N.js → pl-Dgsogljx.js} +3 -3
- package/dist/_chunks/{pt-D7qO5CzD.js → pt-Dm2JF4bc.js} +2 -2
- package/dist/_chunks/{react-day-picker-DsjfS7uI.js → react-day-picker-DYDdR8Vv.js} +22 -22
- package/dist/_chunks/{ro-CP2-VJ_O.js → ro-BXFZ_xIX.js} +2 -2
- package/dist/_chunks/{ru-RPn9_Lpq.js → ru-BPQkNRRV.js} +3 -3
- package/dist/_chunks/{sq-AQvefouo.js → sq-ChTlGFcJ.js} +2 -2
- package/dist/_chunks/subDays-D-WYRpdW.js +8 -0
- package/dist/_chunks/{sv-zkx9eBtD.js → sv-Do_gs6ir.js} +2 -2
- package/dist/_chunks/{tr-Dmr412Ac.js → tr-da_UnkYH.js} +2 -2
- package/dist/_chunks/{zh-CN-DxVt64Zk.js → zh-CN-C9qi5oak.js} +3 -3
- package/dist/agent-catalog.json +1 -1
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +24 -0
- package/dist/components/bmi-calculator/bmi.d.ts +37 -0
- package/dist/components/bmi-calculator/index.d.ts +4 -0
- package/dist/components/bmi-calculator/index.js +14 -0
- package/dist/components/booking/index.js +1 -1
- package/dist/components/chart/chart.d.ts +7 -0
- package/dist/components/chart/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +18 -0
- package/dist/components/due-date-calculator/gestation.d.ts +44 -0
- package/dist/components/due-date-calculator/index.d.ts +4 -0
- package/dist/components/due-date-calculator/index.js +10 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/skeleton/skeleton.d.ts +1 -1
- package/dist/i18n/locales/ar.d.ts +64 -0
- package/dist/i18n/locales/ar.js +58 -0
- package/dist/i18n/locales/de.d.ts +64 -0
- package/dist/i18n/locales/de.js +58 -0
- package/dist/i18n/locales/el.d.ts +64 -0
- package/dist/i18n/locales/el.js +58 -0
- package/dist/i18n/locales/en.d.ts +64 -0
- package/dist/i18n/locales/en.js +58 -0
- package/dist/i18n/locales/es.d.ts +64 -0
- package/dist/i18n/locales/es.js +58 -0
- package/dist/i18n/locales/fr.d.ts +64 -0
- package/dist/i18n/locales/fr.js +58 -0
- package/dist/i18n/locales/hi.d.ts +64 -0
- package/dist/i18n/locales/hi.js +58 -0
- package/dist/i18n/locales/it.d.ts +64 -0
- package/dist/i18n/locales/it.js +58 -0
- package/dist/i18n/locales/ja.d.ts +64 -0
- package/dist/i18n/locales/ja.js +58 -0
- package/dist/i18n/locales/nl.d.ts +64 -0
- package/dist/i18n/locales/nl.js +58 -0
- package/dist/i18n/locales/pl.d.ts +64 -0
- package/dist/i18n/locales/pl.js +58 -0
- package/dist/i18n/locales/pt.d.ts +64 -0
- package/dist/i18n/locales/pt.js +58 -0
- package/dist/i18n/locales/ro.d.ts +64 -0
- package/dist/i18n/locales/ro.js +58 -0
- package/dist/i18n/locales/ru.d.ts +64 -0
- package/dist/i18n/locales/ru.js +58 -0
- package/dist/i18n/locales/sq.d.ts +64 -0
- package/dist/i18n/locales/sq.js +58 -0
- package/dist/i18n/locales/sv.d.ts +64 -0
- package/dist/i18n/locales/sv.js +58 -0
- package/dist/i18n/locales/tr.d.ts +64 -0
- package/dist/i18n/locales/tr.js +58 -0
- package/dist/i18n/locales/zh.d.ts +64 -0
- package/dist/i18n/locales/zh.js +58 -0
- package/dist/index.js +543 -600
- package/dist/locales/ar.json +64 -0
- package/dist/locales/de.json +64 -0
- package/dist/locales/el.json +64 -0
- package/dist/locales/en.json +64 -0
- package/dist/locales/es.json +64 -0
- package/dist/locales/fr.json +64 -0
- package/dist/locales/hi.json +64 -0
- package/dist/locales/it.json +64 -0
- package/dist/locales/ja.json +64 -0
- package/dist/locales/nl.json +64 -0
- package/dist/locales/pl.json +64 -0
- package/dist/locales/pt.json +64 -0
- package/dist/locales/ro.json +64 -0
- package/dist/locales/ru.json +64 -0
- package/dist/locales/sq.json +64 -0
- package/dist/locales/sv.json +64 -0
- package/dist/locales/tr.json +64 -0
- package/dist/locales/zh.json +64 -0
- package/dist/patterns/marketplace-app-shell/index.d.ts +3 -0
- package/dist/patterns/marketplace-app-shell/index.js +6 -0
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +111 -0
- package/dist/tokens.css +1 -1
- package/package.json +19 -7
- package/dist/_chunks/chart-DLkVn_ex.js +0 -292
- package/dist/_chunks/subDays-CANHP9hz.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as s, q as r, r as i, v as d } from "./react-day-picker-
|
|
1
|
+
import { o as s, q as r, r as i, v as d } from "./react-day-picker-DYDdR8Vv.js";
|
|
2
2
|
const h = {
|
|
3
3
|
lessThanXSeconds: {
|
|
4
4
|
one: "أقل من ثانية",
|
|
@@ -396,4 +396,4 @@ const h = {
|
|
|
396
396
|
export {
|
|
397
397
|
z as ar
|
|
398
398
|
};
|
|
399
|
-
//# sourceMappingURL=ar-
|
|
399
|
+
//# sourceMappingURL=ar-D1RwVZFj.js.map
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { jsxs as s, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as z, useId as K, useState as o, useMemo as O, useEffect as X } from "react";
|
|
3
|
+
import { c as Y } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as q } from "react-i18next";
|
|
5
|
+
import { R as _ } from "./radio-TWf9Q-mp.js";
|
|
6
|
+
import { R as J } from "./radio-group-BcF92GEF.js";
|
|
7
|
+
import { F as G } from "./form-field-BOm9hK35.js";
|
|
8
|
+
import { N as p } from "./number-input-Dj5L3pXK.js";
|
|
9
|
+
import { C as Q } from "./chart-DnHvmiDX.js";
|
|
10
|
+
import { B as Z } from "./badge-zsf5i5bH.js";
|
|
11
|
+
const A = 0.45359237, S = 2.54, y = 12, T = (a) => a * A, aa = (a) => a / A, ta = (a) => a * S, la = (a) => a / S;
|
|
12
|
+
function ea(a) {
|
|
13
|
+
const e = la(a), r = Math.floor(e / y);
|
|
14
|
+
return { ft: r, in: e - r * y };
|
|
15
|
+
}
|
|
16
|
+
const $ = (a, e) => ta(a * y + e);
|
|
17
|
+
function ia(a, e) {
|
|
18
|
+
if (a === null || e === null || !Number.isFinite(a) || !Number.isFinite(e) || a <= 0 || e <= 0)
|
|
19
|
+
return null;
|
|
20
|
+
const r = e / 100;
|
|
21
|
+
return a / (r * r);
|
|
22
|
+
}
|
|
23
|
+
function na(a) {
|
|
24
|
+
return a < 18.5 ? "underweight" : a < 25 ? "normal" : a < 30 ? "overweight" : "obese";
|
|
25
|
+
}
|
|
26
|
+
const E = 12, ra = 40;
|
|
27
|
+
function sa(a) {
|
|
28
|
+
const e = (a - E) / (ra - E) * 100;
|
|
29
|
+
return Math.min(100, Math.max(0, e));
|
|
30
|
+
}
|
|
31
|
+
const oa = Y("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
32
|
+
variants: {
|
|
33
|
+
width: {
|
|
34
|
+
full: "ds:w-full",
|
|
35
|
+
auto: "ds:inline-flex"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: { width: "full" }
|
|
39
|
+
}), ca = {
|
|
40
|
+
underweight: "info",
|
|
41
|
+
normal: "success",
|
|
42
|
+
overweight: "warning",
|
|
43
|
+
obese: "error"
|
|
44
|
+
}, h = (a) => Math.round(a * 10) / 10, ma = z(
|
|
45
|
+
({ defaultUnitSystem: a = "metric", onResultChange: e, id: r, width: k, className: H }, L) => {
|
|
46
|
+
const { t, i18n: x } = q(), N = K(), [c, P] = o(a), [b, I] = o(null), [f, F] = o(null), [m, w] = o(null), [u, M] = o(null), [d, B] = o(null), R = (D) => {
|
|
47
|
+
const v = D;
|
|
48
|
+
if (v !== c) {
|
|
49
|
+
if (v === "imperial") {
|
|
50
|
+
if (b !== null) {
|
|
51
|
+
const { ft: W, in: j } = ea(b);
|
|
52
|
+
w(W), M(h(j));
|
|
53
|
+
}
|
|
54
|
+
f !== null && B(h(aa(f)));
|
|
55
|
+
} else
|
|
56
|
+
(m !== null || u !== null) && I(h($(m ?? 0, u ?? 0))), d !== null && F(h(T(d)));
|
|
57
|
+
P(v);
|
|
58
|
+
}
|
|
59
|
+
}, U = c === "metric" ? b : m !== null || u !== null ? $(m ?? 0, u ?? 0) : null, V = c === "metric" ? f : d !== null ? T(d) : null, i = ia(V, U), n = i !== null ? na(i) : null, C = O(
|
|
60
|
+
() => new Intl.NumberFormat(x.language, {
|
|
61
|
+
minimumFractionDigits: 1,
|
|
62
|
+
maximumFractionDigits: 1
|
|
63
|
+
}),
|
|
64
|
+
[x.language]
|
|
65
|
+
);
|
|
66
|
+
X(() => {
|
|
67
|
+
e == null || e(
|
|
68
|
+
i !== null && n !== null ? { bmi: i, category: n } : null
|
|
69
|
+
);
|
|
70
|
+
}, [i, n, e]);
|
|
71
|
+
const g = c === "metric";
|
|
72
|
+
return /* @__PURE__ */ s(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
ref: L,
|
|
76
|
+
"data-component": "bmi-calculator",
|
|
77
|
+
"data-component-id": r,
|
|
78
|
+
className: oa({ width: k, className: H }),
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ s(
|
|
81
|
+
J,
|
|
82
|
+
{
|
|
83
|
+
label: t("bmiCalculator.unitSystem.label"),
|
|
84
|
+
variant: "horizontal",
|
|
85
|
+
value: c,
|
|
86
|
+
onValueChange: R,
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ l(_, { label: t("bmiCalculator.unitSystem.metric"), value: "metric" }),
|
|
89
|
+
/* @__PURE__ */ l(
|
|
90
|
+
_,
|
|
91
|
+
{
|
|
92
|
+
label: t("bmiCalculator.unitSystem.imperial"),
|
|
93
|
+
value: "imperial"
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
100
|
+
g ? /* @__PURE__ */ l(
|
|
101
|
+
G,
|
|
102
|
+
{
|
|
103
|
+
label: `${t("bmiCalculator.height")} (${t("bmiCalculator.units.cm")})`,
|
|
104
|
+
children: /* @__PURE__ */ l(
|
|
105
|
+
p,
|
|
106
|
+
{
|
|
107
|
+
mode: "decimal",
|
|
108
|
+
min: 0,
|
|
109
|
+
step: 0.5,
|
|
110
|
+
value: b,
|
|
111
|
+
onChange: I
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
) : /* @__PURE__ */ s("div", { role: "group", "aria-labelledby": N, children: [
|
|
116
|
+
/* @__PURE__ */ l(
|
|
117
|
+
"span",
|
|
118
|
+
{
|
|
119
|
+
id: N,
|
|
120
|
+
className: "type-label ds:mb-[var(--spacing-xs)] ds:block ds:text-foreground",
|
|
121
|
+
children: t("bmiCalculator.height")
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
125
|
+
/* @__PURE__ */ l(
|
|
126
|
+
p,
|
|
127
|
+
{
|
|
128
|
+
mode: "integer",
|
|
129
|
+
min: 0,
|
|
130
|
+
value: m,
|
|
131
|
+
onChange: w,
|
|
132
|
+
"aria-label": t("bmiCalculator.feet")
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ l("span", { className: "type-label ds:text-muted-foreground", children: t("bmiCalculator.units.ft") }),
|
|
136
|
+
/* @__PURE__ */ l(
|
|
137
|
+
p,
|
|
138
|
+
{
|
|
139
|
+
mode: "decimal",
|
|
140
|
+
min: 0,
|
|
141
|
+
max: 11.9,
|
|
142
|
+
step: 0.5,
|
|
143
|
+
value: u,
|
|
144
|
+
onChange: M,
|
|
145
|
+
"aria-label": t("bmiCalculator.inches")
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ l("span", { className: "type-label ds:text-muted-foreground", children: t("bmiCalculator.units.in") })
|
|
149
|
+
] })
|
|
150
|
+
] }),
|
|
151
|
+
/* @__PURE__ */ l(
|
|
152
|
+
G,
|
|
153
|
+
{
|
|
154
|
+
label: `${t("bmiCalculator.weight")} (${t(
|
|
155
|
+
g ? "bmiCalculator.units.kg" : "bmiCalculator.units.lb"
|
|
156
|
+
)})`,
|
|
157
|
+
children: /* @__PURE__ */ l(
|
|
158
|
+
p,
|
|
159
|
+
{
|
|
160
|
+
mode: "decimal",
|
|
161
|
+
min: 0,
|
|
162
|
+
step: g ? 0.1 : 0.5,
|
|
163
|
+
value: g ? f : d,
|
|
164
|
+
onChange: g ? F : B
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
] }),
|
|
170
|
+
/* @__PURE__ */ l("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: i !== null && n !== null ? t("bmiCalculator.gaugeAria", {
|
|
171
|
+
bmi: C.format(i),
|
|
172
|
+
category: t(`bmiCalculator.category.${n}`)
|
|
173
|
+
}) : "" }),
|
|
174
|
+
i !== null && n !== null ? /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-md)] ds:sm:flex-row ds:sm:items-center ds:sm:gap-[var(--spacing-lg)]", children: [
|
|
175
|
+
/* @__PURE__ */ l(
|
|
176
|
+
Q,
|
|
177
|
+
{
|
|
178
|
+
type: "radialBar",
|
|
179
|
+
title: t("bmiCalculator.gaugeAria", {
|
|
180
|
+
bmi: C.format(i),
|
|
181
|
+
category: t(`bmiCalculator.category.${n}`)
|
|
182
|
+
}),
|
|
183
|
+
series: [sa(i)],
|
|
184
|
+
labels: [t(`bmiCalculator.category.${n}`)],
|
|
185
|
+
radialValueFormatter: () => C.format(i),
|
|
186
|
+
height: 240,
|
|
187
|
+
width: 240
|
|
188
|
+
}
|
|
189
|
+
),
|
|
190
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
191
|
+
/* @__PURE__ */ l("span", { className: "type-label ds:text-muted-foreground", children: t("bmiCalculator.category.label") }),
|
|
192
|
+
/* @__PURE__ */ l(Z, { variant: ca[n], size: "lg", children: t(`bmiCalculator.category.${n}`) }),
|
|
193
|
+
/* @__PURE__ */ l("p", { className: "type-body ds:text-muted-foreground", children: t(`bmiCalculator.range.${n}`) })
|
|
194
|
+
] })
|
|
195
|
+
] }) : /* @__PURE__ */ l("p", { className: "type-body ds:text-muted-foreground", children: t("bmiCalculator.empty") })
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
ma.displayName = "BmiCalculator";
|
|
202
|
+
export {
|
|
203
|
+
ma as B,
|
|
204
|
+
sa as a,
|
|
205
|
+
na as b,
|
|
206
|
+
ea as c,
|
|
207
|
+
la as d,
|
|
208
|
+
ia as e,
|
|
209
|
+
$ as f,
|
|
210
|
+
ta as i,
|
|
211
|
+
aa as k,
|
|
212
|
+
T as l
|
|
213
|
+
};
|
|
214
|
+
//# sourceMappingURL=bmi-calculator-DQD5_nE-.js.map
|
|
@@ -7,7 +7,7 @@ import { A as z } from "./alert-ywPR59NE.js";
|
|
|
7
7
|
import { B as ie } from "./button-DD_0Xdmr.js";
|
|
8
8
|
import { C as Ke } from "./checkbox-DRcOdmXv.js";
|
|
9
9
|
import { C as Bt } from "./checkbox-group-CpUwlHug.js";
|
|
10
|
-
import { D as Et } from "./date-picker-
|
|
10
|
+
import { D as Et } from "./date-picker-CXFpu-qY.js";
|
|
11
11
|
import { E as Vt } from "./email-input-lQivsFrw.js";
|
|
12
12
|
import { F as Z } from "./form-field-BOm9hK35.js";
|
|
13
13
|
import { P as Lt } from "./phone-input-DfZbPPvh.js";
|
|
@@ -24,8 +24,8 @@ import { S as $t } from "./stepper-accordion-BfS6lUB9.js";
|
|
|
24
24
|
import { S as zt } from "./stepper-progress-DDjq5nei.js";
|
|
25
25
|
import { p as F, S as Kt } from "./slot-grid-BlHHP9Qy.js";
|
|
26
26
|
import { s as le, i as at } from "./isSameDay-DUEiAT0G.js";
|
|
27
|
-
import { w as lt, n as ce, a as je, m as jt,
|
|
28
|
-
import { s as Ht } from "./subDays-
|
|
27
|
+
import { w as lt, n as ce, a as je, m as jt, h as ye, f as qt, i as _e, x as Me } from "./react-day-picker-DYDdR8Vv.js";
|
|
28
|
+
import { s as Ht } from "./subDays-D-WYRpdW.js";
|
|
29
29
|
import { C as Gt } from "./chevron-left-CX1jqD2M.js";
|
|
30
30
|
import { C as Ut } from "./chevron-right-BrpYejk0.js";
|
|
31
31
|
import { c as V } from "./createLucideIcon-CrFbzy84.js";
|
|
@@ -2697,4 +2697,4 @@ export {
|
|
|
2697
2697
|
X as O,
|
|
2698
2698
|
Da as b
|
|
2699
2699
|
};
|
|
2700
|
-
//# sourceMappingURL=booking-
|
|
2700
|
+
//# sourceMappingURL=booking-DqXsd1Mv.js.map
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { jsxs as T, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Q, useId as X, useMemo as d, useRef as tt, useState as E, useEffect as P, useImperativeHandle as et } from "react";
|
|
3
|
+
import { c as ot } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as at } from "react-i18next";
|
|
5
|
+
import rt from "react-apexcharts";
|
|
6
|
+
import $ from "apexcharts";
|
|
7
|
+
import { u as nt, g as k } from "./apexcharts-theme-BJigns_V.js";
|
|
8
|
+
import { u as st } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
9
|
+
import { u as it } from "./registry-nPAVE19X.js";
|
|
10
|
+
const ct = {
|
|
11
|
+
id: "chart",
|
|
12
|
+
capabilities: [],
|
|
13
|
+
state: {},
|
|
14
|
+
actions: {
|
|
15
|
+
update_series: {
|
|
16
|
+
safety: "read",
|
|
17
|
+
argsType: "series",
|
|
18
|
+
description: "Replace the chart series without remounting.",
|
|
19
|
+
invoke: (r, l) => {
|
|
20
|
+
r.updateSeries(l.series);
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
export_png: {
|
|
24
|
+
safety: "read",
|
|
25
|
+
description: "Return a PNG data URI of the chart for export or screenshotting.",
|
|
26
|
+
invoke: (r) => r.dataURI()
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
domHooks: {
|
|
30
|
+
root: { attr: "data-component", value: "chart" },
|
|
31
|
+
instanceId: {
|
|
32
|
+
attr: "data-component-id",
|
|
33
|
+
sourceProp: "id",
|
|
34
|
+
description: "Sourced from the id prop."
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, dt = ot("ds:relative ds:block ds:w-full", {
|
|
38
|
+
variants: {
|
|
39
|
+
density: {
|
|
40
|
+
compact: "ds:min-h-[var(--chart-min-height-compact)]",
|
|
41
|
+
comfortable: "ds:min-h-[var(--chart-min-height-comfortable)]"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: { density: "comfortable" }
|
|
45
|
+
}), lt = [
|
|
46
|
+
"verticalLines",
|
|
47
|
+
"horizontalLines",
|
|
48
|
+
"slantedLines",
|
|
49
|
+
"squares",
|
|
50
|
+
"circles"
|
|
51
|
+
], mt = ["line", "bar", "area"], ut = ["pie", "donut", "radialBar"];
|
|
52
|
+
function x(r) {
|
|
53
|
+
return ut.includes(r);
|
|
54
|
+
}
|
|
55
|
+
function ht(r) {
|
|
56
|
+
return mt.includes(r);
|
|
57
|
+
}
|
|
58
|
+
function pt(r, l) {
|
|
59
|
+
return x(l) ? [
|
|
60
|
+
{
|
|
61
|
+
name: "",
|
|
62
|
+
data: r
|
|
63
|
+
}
|
|
64
|
+
] : r;
|
|
65
|
+
}
|
|
66
|
+
const ft = Q(
|
|
67
|
+
({
|
|
68
|
+
title: r,
|
|
69
|
+
id: l,
|
|
70
|
+
type: o,
|
|
71
|
+
series: p,
|
|
72
|
+
categories: g,
|
|
73
|
+
labels: v,
|
|
74
|
+
height: G,
|
|
75
|
+
width: H,
|
|
76
|
+
patterns: L = !1,
|
|
77
|
+
toolbar: R = !1,
|
|
78
|
+
locale: _,
|
|
79
|
+
radialValueFormatter: m,
|
|
80
|
+
density: M,
|
|
81
|
+
className: U
|
|
82
|
+
}, D) => {
|
|
83
|
+
const { t: a, i18n: W } = at(), O = X(), u = d(
|
|
84
|
+
() => `chart-${O.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
85
|
+
[O]
|
|
86
|
+
), S = `${u}-summary`, y = tt(null), [A, Y] = E(0);
|
|
87
|
+
nt(y);
|
|
88
|
+
const h = _ ?? W.language ?? "en", [z, Z] = E(
|
|
89
|
+
() => {
|
|
90
|
+
try {
|
|
91
|
+
return k();
|
|
92
|
+
} catch {
|
|
93
|
+
return {};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
P(() => {
|
|
98
|
+
if (typeof document > "u") return;
|
|
99
|
+
let t;
|
|
100
|
+
const e = new MutationObserver(() => {
|
|
101
|
+
clearTimeout(t), t = setTimeout(() => {
|
|
102
|
+
try {
|
|
103
|
+
Z(k());
|
|
104
|
+
} catch {
|
|
105
|
+
}
|
|
106
|
+
}, 50);
|
|
107
|
+
});
|
|
108
|
+
return e.observe(document.documentElement, {
|
|
109
|
+
attributes: !0,
|
|
110
|
+
attributeFilter: ["class"]
|
|
111
|
+
}), () => {
|
|
112
|
+
clearTimeout(t), e.disconnect();
|
|
113
|
+
};
|
|
114
|
+
}, []), P(() => {
|
|
115
|
+
const t = y.current;
|
|
116
|
+
if (!t || typeof ResizeObserver > "u") return;
|
|
117
|
+
const e = new ResizeObserver((n) => {
|
|
118
|
+
const s = n[0];
|
|
119
|
+
s && Y(Math.floor(s.contentRect.width));
|
|
120
|
+
});
|
|
121
|
+
return e.observe(t), () => e.disconnect();
|
|
122
|
+
}, []);
|
|
123
|
+
const I = d(
|
|
124
|
+
() => ({
|
|
125
|
+
async dataURI() {
|
|
126
|
+
const t = $.getChartByID(u);
|
|
127
|
+
return t ? (await t.dataURI()).imgURI : "";
|
|
128
|
+
},
|
|
129
|
+
updateSeries(t) {
|
|
130
|
+
const e = $.getChartByID(u);
|
|
131
|
+
e && (x(o), e.updateSeries(t));
|
|
132
|
+
}
|
|
133
|
+
}),
|
|
134
|
+
[u, o]
|
|
135
|
+
);
|
|
136
|
+
et(D, () => I, [I]), it(ct, I, l);
|
|
137
|
+
const C = typeof document < "u" && document.documentElement.dir === "rtl", N = d(
|
|
138
|
+
() => pt(p, o),
|
|
139
|
+
[p, o]
|
|
140
|
+
), f = d(
|
|
141
|
+
() => new Intl.NumberFormat(h),
|
|
142
|
+
[h]
|
|
143
|
+
), B = d(
|
|
144
|
+
() => ({
|
|
145
|
+
name: h,
|
|
146
|
+
options: {
|
|
147
|
+
toolbar: {
|
|
148
|
+
download: a("chart.toolbar.download"),
|
|
149
|
+
selection: a("chart.toolbar.selection"),
|
|
150
|
+
selectionZoom: a("chart.toolbar.selectionZoom"),
|
|
151
|
+
zoomIn: a("chart.toolbar.zoomIn"),
|
|
152
|
+
zoomOut: a("chart.toolbar.zoomOut"),
|
|
153
|
+
pan: a("chart.toolbar.pan"),
|
|
154
|
+
reset: a("chart.toolbar.reset"),
|
|
155
|
+
exportToSVG: a("chart.toolbar.exportToSVG"),
|
|
156
|
+
exportToPNG: a("chart.toolbar.exportToPNG"),
|
|
157
|
+
exportToCSV: a("chart.toolbar.exportToCSV")
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}),
|
|
161
|
+
[h, a]
|
|
162
|
+
), w = st(), j = d(() => {
|
|
163
|
+
var n, s, b;
|
|
164
|
+
const t = z, e = {
|
|
165
|
+
...t,
|
|
166
|
+
chart: {
|
|
167
|
+
...t.chart,
|
|
168
|
+
id: u,
|
|
169
|
+
toolbar: { show: R },
|
|
170
|
+
zoom: { enabled: R },
|
|
171
|
+
animations: {
|
|
172
|
+
enabled: !w,
|
|
173
|
+
dynamicAnimation: { enabled: !w }
|
|
174
|
+
},
|
|
175
|
+
locales: [B],
|
|
176
|
+
defaultLocale: h,
|
|
177
|
+
parentHeightOffset: 0
|
|
178
|
+
},
|
|
179
|
+
labels: v,
|
|
180
|
+
legend: {
|
|
181
|
+
...t.legend,
|
|
182
|
+
position: "bottom",
|
|
183
|
+
// ApexCharts legend.horizontalAlign is a physical prop mapped internally
|
|
184
|
+
// to the chart's own text flow. For RTL we flip via `yaxis.opposite`
|
|
185
|
+
// and ApexCharts' own `direction: 'rtl'` handling; legend stays anchored
|
|
186
|
+
// to the inline-start by asking for 'left' on LTR and 'right' on RTL.
|
|
187
|
+
horizontalAlign: C ? "right" : "left",
|
|
188
|
+
fontFamily: "inherit"
|
|
189
|
+
},
|
|
190
|
+
tooltip: {
|
|
191
|
+
...t.tooltip,
|
|
192
|
+
y: {
|
|
193
|
+
formatter: (i) => f.format(i)
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
noData: {
|
|
197
|
+
text: a("chart.noData")
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
if (ht(o) && (e.xaxis = {
|
|
201
|
+
...t.xaxis,
|
|
202
|
+
categories: g ?? []
|
|
203
|
+
}, e.yaxis = {
|
|
204
|
+
...t.yaxis,
|
|
205
|
+
opposite: C,
|
|
206
|
+
labels: {
|
|
207
|
+
formatter: (i) => f.format(i)
|
|
208
|
+
}
|
|
209
|
+
}, e.stroke = {
|
|
210
|
+
curve: "smooth",
|
|
211
|
+
width: o === "bar" ? 0 : 2
|
|
212
|
+
}, e.dataLabels = { enabled: !1 }), o === "radialBar" && m) {
|
|
213
|
+
const i = t.plotOptions ?? {};
|
|
214
|
+
e.plotOptions = {
|
|
215
|
+
...i,
|
|
216
|
+
radialBar: {
|
|
217
|
+
...i.radialBar ?? {},
|
|
218
|
+
dataLabels: {
|
|
219
|
+
...((n = i.radialBar) == null ? void 0 : n.dataLabels) ?? {},
|
|
220
|
+
value: {
|
|
221
|
+
...((b = (s = i.radialBar) == null ? void 0 : s.dataLabels) == null ? void 0 : b.value) ?? {},
|
|
222
|
+
formatter: (K) => m(Number(K))
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
return L ? e.fill = {
|
|
229
|
+
type: "pattern",
|
|
230
|
+
opacity: o === "area" ? 0.3 : 1,
|
|
231
|
+
pattern: {
|
|
232
|
+
style: [...lt],
|
|
233
|
+
strokeWidth: 2
|
|
234
|
+
}
|
|
235
|
+
} : o === "area" && (e.fill = {
|
|
236
|
+
type: "gradient",
|
|
237
|
+
opacity: 0.3
|
|
238
|
+
}), e;
|
|
239
|
+
}, [
|
|
240
|
+
z,
|
|
241
|
+
u,
|
|
242
|
+
R,
|
|
243
|
+
w,
|
|
244
|
+
B,
|
|
245
|
+
h,
|
|
246
|
+
v,
|
|
247
|
+
f,
|
|
248
|
+
a,
|
|
249
|
+
o,
|
|
250
|
+
g,
|
|
251
|
+
C,
|
|
252
|
+
L,
|
|
253
|
+
m
|
|
254
|
+
]), q = H ?? (A > 0 ? A : "100%"), V = G ?? 320, F = d(() => {
|
|
255
|
+
const t = x(o) ? v ?? [] : g ?? [], e = N;
|
|
256
|
+
return /* @__PURE__ */ T("table", { id: S, className: "ds:sr-only", children: [
|
|
257
|
+
/* @__PURE__ */ c("caption", { children: r }),
|
|
258
|
+
/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ T("tr", { children: [
|
|
259
|
+
/* @__PURE__ */ c("th", { scope: "col", children: a("chart.table.series") }),
|
|
260
|
+
t.map((n, s) => /* @__PURE__ */ c("th", { scope: "col", children: n }, `${n}-${s}`))
|
|
261
|
+
] }) }),
|
|
262
|
+
/* @__PURE__ */ c("tbody", { children: e.map((n, s) => /* @__PURE__ */ T("tr", { children: [
|
|
263
|
+
/* @__PURE__ */ c("th", { scope: "row", children: n.name || a("chart.table.value") }),
|
|
264
|
+
n.data.map((b, i) => /* @__PURE__ */ c("td", { children: o === "radialBar" && m ? m(b) : f.format(b) }, `${s}-${i}`))
|
|
265
|
+
] }, `${n.name}-${s}`)) })
|
|
266
|
+
] });
|
|
267
|
+
}, [
|
|
268
|
+
o,
|
|
269
|
+
N,
|
|
270
|
+
v,
|
|
271
|
+
g,
|
|
272
|
+
S,
|
|
273
|
+
r,
|
|
274
|
+
a,
|
|
275
|
+
f,
|
|
276
|
+
m
|
|
277
|
+
]), J = d(() => (x(o), p), [p, o]);
|
|
278
|
+
return /* @__PURE__ */ T(
|
|
279
|
+
"div",
|
|
280
|
+
{
|
|
281
|
+
ref: y,
|
|
282
|
+
role: "img",
|
|
283
|
+
"aria-label": r,
|
|
284
|
+
"aria-describedby": S,
|
|
285
|
+
className: dt({ density: M, className: U }),
|
|
286
|
+
"data-component": "chart",
|
|
287
|
+
"data-component-id": l,
|
|
288
|
+
children: [
|
|
289
|
+
F,
|
|
290
|
+
/* @__PURE__ */ c(
|
|
291
|
+
rt,
|
|
292
|
+
{
|
|
293
|
+
type: o,
|
|
294
|
+
series: J,
|
|
295
|
+
options: j,
|
|
296
|
+
width: q,
|
|
297
|
+
height: V,
|
|
298
|
+
"aria-hidden": "true"
|
|
299
|
+
}
|
|
300
|
+
)
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
);
|
|
306
|
+
ft.displayName = "Chart";
|
|
307
|
+
export {
|
|
308
|
+
ft as C,
|
|
309
|
+
dt as a,
|
|
310
|
+
ct as c
|
|
311
|
+
};
|
|
312
|
+
//# sourceMappingURL=chart-DnHvmiDX.js.map
|
|
@@ -7,7 +7,7 @@ import { useTranslation as Ee } from "react-i18next";
|
|
|
7
7
|
import * as Z from "@radix-ui/react-popover";
|
|
8
8
|
import { u as He } from "./use-controllable-state-BiY4xTzM.js";
|
|
9
9
|
import { u as qe } from "./form-field-context-B3APVHKx.js";
|
|
10
|
-
import { y as ce, z as Ce, s as S, A as ue, B as Le, E as Ne, a as le, F as de, G as Re, H as ae, I as Qe, J as ie, K as We, u as Ae, g as Fe,
|
|
10
|
+
import { y as ce, z as Ce, s as S, A as ue, B as Le, E as Ne, a as le, F as de, G as Re, H as ae, I as Qe, J as ie, K as We, u as Ae, g as Fe, i as oe, c as Be, m as Ge, n as Ve, t as Xe, C as Ke, j as ze, p as Ze, D as $e, k as je, l as Ue, L as Je } from "./react-day-picker-DYDdR8Vv.js";
|
|
11
11
|
import { u as Se } from "./registry-nPAVE19X.js";
|
|
12
12
|
import { t as E, c as O, m as et, a as tt, b as rt } from "./isSameDay-DUEiAT0G.js";
|
|
13
13
|
function nt() {
|
|
@@ -1821,4 +1821,4 @@ export {
|
|
|
1821
1821
|
rr as D,
|
|
1822
1822
|
tr as d
|
|
1823
1823
|
};
|
|
1824
|
-
//# sourceMappingURL=date-picker-
|
|
1824
|
+
//# sourceMappingURL=date-picker-CXFpu-qY.js.map
|
|
@@ -4,8 +4,8 @@ import { useTranslation as ee } from "react-i18next";
|
|
|
4
4
|
import * as f from "@radix-ui/react-popover";
|
|
5
5
|
import { u as te } from "./use-controllable-state-BiY4xTzM.js";
|
|
6
6
|
import { u as ae } from "./form-field-context-B3APVHKx.js";
|
|
7
|
-
import { b as ne, u as re, g as se, c as oe, e as T, s as W,
|
|
8
|
-
import { s as R } from "./subDays-
|
|
7
|
+
import { b as ne, u as re, g as se, c as oe, e as T, s as W, f as ie, h as de, i as v, d as ce, C as le, j as pe, t as ge, p as ue, D as me, k as fe, l as he } from "./react-day-picker-DYDdR8Vv.js";
|
|
8
|
+
import { s as R } from "./subDays-D-WYRpdW.js";
|
|
9
9
|
import { u as ke } from "./registry-nPAVE19X.js";
|
|
10
10
|
function ye(a, s, i) {
|
|
11
11
|
return ne(a, -1, i);
|
|
@@ -284,4 +284,4 @@ export {
|
|
|
284
284
|
ve as D,
|
|
285
285
|
be as d
|
|
286
286
|
};
|
|
287
|
-
//# sourceMappingURL=date-range-picker-
|
|
287
|
+
//# sourceMappingURL=date-range-picker-I-q5rifj.js.map
|
|
@@ -6,7 +6,7 @@ import * as k from "@radix-ui/react-popover";
|
|
|
6
6
|
import { u as me } from "./use-controllable-state-BiY4xTzM.js";
|
|
7
7
|
import { u as pe } from "./form-field-context-B3APVHKx.js";
|
|
8
8
|
import { T as fe } from "./time-picker-B5umYwfv.js";
|
|
9
|
-
import { u as ge, c as he, m as ve, n as be,
|
|
9
|
+
import { u as ge, c as he, m as ve, n as be, i as ye, C as Te, j as ke, t as we, D as De, k as Ce, l as Pe } from "./react-day-picker-DYDdR8Vv.js";
|
|
10
10
|
import { u as xe } from "./registry-nPAVE19X.js";
|
|
11
11
|
import { t as j } from "./isSameDay-DUEiAT0G.js";
|
|
12
12
|
function K(e, t, r) {
|
|
@@ -307,4 +307,4 @@ export {
|
|
|
307
307
|
Se as D,
|
|
308
308
|
Oe as d
|
|
309
309
|
};
|
|
310
|
-
//# sourceMappingURL=date-time-picker-
|
|
310
|
+
//# sourceMappingURL=date-time-picker-CqpGPlcH.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as s, q as n, r as o, v as u } from "./react-day-picker-
|
|
1
|
+
import { o as s, q as n, r as o, v as u } from "./react-day-picker-DYDdR8Vv.js";
|
|
2
2
|
const d = {
|
|
3
3
|
lessThanXSeconds: {
|
|
4
4
|
standalone: {
|
|
@@ -474,4 +474,4 @@ const d = {
|
|
|
474
474
|
export {
|
|
475
475
|
O as de
|
|
476
476
|
};
|
|
477
|
-
//# sourceMappingURL=de-
|
|
477
|
+
//# sourceMappingURL=de-HTQ4b4-J.js.map
|