@alfadocs/ui-kit 0.42.0 → 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.
Files changed (84) hide show
  1. package/dist/_chunks/{ar-Cn_NxqkN.js → ar-DEz65ZJW.js} +2 -2
  2. package/dist/_chunks/bmi-calculator-DuVSFDuw.js +259 -0
  3. package/dist/_chunks/{booking-4mCw3Mpl.js → booking-CtLwaxkK.js} +4 -4
  4. package/dist/_chunks/{calculator-dialog-B74fqpFZ.js → calculator-dialog-DdexHrTP.js} +2 -2
  5. package/dist/_chunks/{chart-Cbt0_sKv.js → chart-Cg3e9EH9.js} +101 -99
  6. package/dist/_chunks/{cycle-calculator-DsZbyzX6.js → cycle-calculator-Dln-y1k_.js} +43 -42
  7. package/dist/_chunks/{date-picker-CvQfs6Xh.js → date-picker-Bq7xhMA-.js} +109 -108
  8. package/dist/_chunks/date-picker-variants-DLi1Va_e.js +3238 -0
  9. package/dist/_chunks/{date-range-picker-U9fn1g9d.js → date-range-picker-DcXuI9y7.js} +20 -19
  10. package/dist/_chunks/{date-time-picker-Cva0ZCWw.js → date-time-picker-RimumeLR.js} +18 -17
  11. package/dist/_chunks/{de-BMM2H7Bs.js → de-bTBGdjPS.js} +2 -2
  12. package/dist/_chunks/{dialog-Cee13rHU.js → dialog-DOYgd75U.js} +46 -37
  13. package/dist/_chunks/{due-date-calculator-s_CBgaFs.js → due-date-calculator-Cc4dRqTI.js} +46 -38
  14. package/dist/_chunks/{editable-currency-cell-renderer-BhUkRiPZ.js → editable-currency-cell-renderer-9jqwDv5x.js} +2 -2
  15. package/dist/_chunks/{el-BYPonAaK.js → el-BWG5RXxa.js} +6 -6
  16. package/dist/_chunks/{es-CMkVCQ4F.js → es-DfO_G435.js} +2 -2
  17. package/dist/_chunks/{fr-BcuWxqft.js → fr-BTn24bs8.js} +2 -2
  18. package/dist/_chunks/{gestation-BXEgDGmP.js → gestation-mWF4AXea.js} +3 -3
  19. package/dist/_chunks/{gestational-age-calculator-CWOG3bkI.js → gestational-age-calculator-ZMSrzkRW.js} +42 -41
  20. package/dist/_chunks/{header-CTZWX-tm.js → header-Ce1Br27u.js} +70 -75
  21. package/dist/_chunks/{hi-wkq_rQAh.js → hi-Dj3oYd84.js} +2 -2
  22. package/dist/_chunks/{insert-result-DtQQeSSf.js → insert-result-DisOY2G-.js} +91 -75
  23. package/dist/_chunks/{isSameWeek-Bim5ftRd.js → isSameWeek-HfxKk6Lz.js} +2 -2
  24. package/dist/_chunks/{it-GiQrQ9p4.js → it-Y85ofIQQ.js} +7 -7
  25. package/dist/_chunks/{ja-qfYg3Rua.js → ja-CQ7J6YoA.js} +2 -2
  26. package/dist/_chunks/{marketplace-app-shell-kVAVycz_.js → marketplace-app-shell-Dc5cTIt8.js} +186 -149
  27. package/dist/_chunks/{nl-xOogO4sZ.js → nl-D9kHCmp3.js} +2 -2
  28. package/dist/_chunks/{patient-shell-lDX3wwu6.js → patient-shell-CnT4L8gn.js} +2 -2
  29. package/dist/_chunks/{pl-GnOW6eGK.js → pl-B3Smqpkr.js} +3 -3
  30. package/dist/_chunks/{pregnancy-weight-gain-B7kBK-ZR.js → pregnancy-weight-gain-zZL5Ir2-.js} +49 -48
  31. package/dist/_chunks/{pt-_bV5b5RW.js → pt-D3J-1c_7.js} +6 -6
  32. package/dist/_chunks/{ro-BEcyh5Nj.js → ro-BKAbbEA3.js} +2 -2
  33. package/dist/_chunks/{ru-Bi86hqMf.js → ru-BeG8f0Ep.js} +3 -3
  34. package/dist/_chunks/{sign-document-QHfcNKFj.js → sign-document-B-3k_0LO.js} +165 -137
  35. package/dist/_chunks/{sq-BujHSAWu.js → sq-_hRPaeUy.js} +6 -6
  36. package/dist/_chunks/subDays-Dv7q9S7u.js +8 -0
  37. package/dist/_chunks/{sv-C8AeDrTA.js → sv-g009fSpe.js} +2 -2
  38. package/dist/_chunks/{tab-bar-C4II-7ej.js → tab-bar-Xetknddo.js} +53 -34
  39. package/dist/_chunks/{tr-CMSs_Vgf.js → tr-OKUOuhMW.js} +2 -2
  40. package/dist/_chunks/{unit-converter-D1UrEUxa.js → unit-converter-CuXCXJhK.js} +2 -2
  41. package/dist/_chunks/{zh-CN-eXB-PFu4.js → zh-CN-De4zwEhx.js} +3 -3
  42. package/dist/agent-catalog.json +1 -1
  43. package/dist/components/_shared/calendar-class-names.d.ts +8 -0
  44. package/dist/components/_shared/index.d.ts +2 -0
  45. package/dist/components/_shared/insert-result.d.ts +57 -2
  46. package/dist/components/badge/badge.d.ts +1 -1
  47. package/dist/components/bmi-calculator/index.js +1 -1
  48. package/dist/components/booking/index.js +1 -1
  49. package/dist/components/calculator-dialog/index.js +1 -1
  50. package/dist/components/card/card.d.ts +1 -1
  51. package/dist/components/chart/chart.d.ts +10 -0
  52. package/dist/components/chart/index.js +1 -1
  53. package/dist/components/cycle-calculator/index.js +1 -1
  54. package/dist/components/data-table/index.js +1 -1
  55. package/dist/components/date-picker/date-picker.d.ts +0 -1
  56. package/dist/components/date-picker/index.js +1 -1
  57. package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
  58. package/dist/components/date-range-picker/index.js +1 -1
  59. package/dist/components/date-time-picker/date-time-picker.d.ts +0 -1
  60. package/dist/components/date-time-picker/index.js +1 -1
  61. package/dist/components/dialog/index.js +1 -1
  62. package/dist/components/due-date-calculator/index.js +2 -2
  63. package/dist/components/gestational-age-calculator/index.js +1 -1
  64. package/dist/components/header/header.d.ts +8 -0
  65. package/dist/components/header/index.js +1 -1
  66. package/dist/components/index.d.ts +1 -1
  67. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  68. package/dist/components/public-header/public-header.d.ts +1 -1
  69. package/dist/components/sign-document/index.js +1 -1
  70. package/dist/components/sign-document/sign-document.d.ts +12 -0
  71. package/dist/components/stat/stat.d.ts +1 -1
  72. package/dist/components/tab-bar/index.d.ts +1 -1
  73. package/dist/components/tab-bar/index.js +1 -1
  74. package/dist/components/tab-bar/tab-bar.d.ts +44 -1
  75. package/dist/components/unit-converter/index.js +1 -1
  76. package/dist/index.js +495 -494
  77. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  78. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +57 -1
  79. package/dist/patterns/patient-shell/index.js +1 -1
  80. package/dist/tokens.css +1411 -2
  81. package/package.json +1 -1
  82. package/dist/_chunks/bmi-calculator-D4juUcyF.js +0 -219
  83. package/dist/_chunks/react-day-picker-CdtIiKjx.js +0 -3174
  84. package/dist/_chunks/subDays-_T9YeKPX.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-CdtIiKjx.js";
1
+ import { q as s, r, v as i, w as d } from "./date-picker-variants-DLi1Va_e.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-Cn_NxqkN.js.map
399
+ //# sourceMappingURL=ar-DEz65ZJW.js.map
@@ -0,0 +1,259 @@
1
+ import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as q, useId as J, useState as c, useMemo as Q, useEffect as k } from "react";
3
+ import { c as K } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as X } from "react-i18next";
5
+ import { R as E } from "./radio-TWf9Q-mp.js";
6
+ import { R as Z } from "./radio-group-CLjK-SlK.js";
7
+ import { F as S } from "./form-field-BOm9hK35.js";
8
+ import { N as C } from "./number-input-Dj5L3pXK.js";
9
+ import { C as ee } from "./chart-Cg3e9EH9.js";
10
+ import { C as H } from "./card-DPmk26CL.js";
11
+ import { B as te } from "./badge-zsf5i5bH.js";
12
+ import { I as ae } from "./insert-result-DisOY2G-.js";
13
+ import { a as le, b as ie, e as re, c as oe, f as L, l as V, k as ne } from "./bmi-BxD-tFzU.js";
14
+ const se = K("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
15
+ variants: {
16
+ width: {
17
+ full: "ds:w-full",
18
+ auto: "ds:inline-flex"
19
+ }
20
+ },
21
+ defaultVariants: { width: "full" }
22
+ }), ce = {
23
+ underweight: "info",
24
+ normal: "success",
25
+ overweight: "warning",
26
+ obese: "error"
27
+ }, me = K("", {
28
+ variants: {
29
+ category: {
30
+ underweight: "--info",
31
+ normal: "--success",
32
+ overweight: "--warning",
33
+ obese: "--destructive"
34
+ }
35
+ }
36
+ }), ue = "--color-orange-600";
37
+ function de(i) {
38
+ if (typeof document > "u") return;
39
+ const r = document.documentElement, o = getComputedStyle(r), n = i === "overweight" && r.classList.contains("theme-light") && !r.classList.contains("theme-accessible") ? ue : me({ category: i });
40
+ return o.getPropertyValue(n).trim() || void 0;
41
+ }
42
+ function ge(i) {
43
+ const [r, o] = c(void 0);
44
+ return k(() => {
45
+ if (i === null) {
46
+ o(void 0);
47
+ return;
48
+ }
49
+ const n = () => o(de(i));
50
+ if (n(), typeof document > "u") return;
51
+ const f = new MutationObserver(n);
52
+ return f.observe(document.documentElement, {
53
+ attributes: !0,
54
+ attributeFilter: ["class"]
55
+ }), () => f.disconnect();
56
+ }, [i]), r;
57
+ }
58
+ const y = (i) => Math.round(i * 10) / 10, be = q(
59
+ ({
60
+ defaultUnitSystem: i = "metric",
61
+ onResultChange: r,
62
+ onInsert: o,
63
+ insertVariant: n = "insert",
64
+ onCopy: f,
65
+ onError: A,
66
+ id: M,
67
+ width: O,
68
+ className: W
69
+ }, D) => {
70
+ const { t: e, i18n: w } = X(), N = J(), [m, _] = c(i), [h, F] = c(null), [p, I] = c(null), [u, $] = c(null), [d, B] = c(null), [g, T] = c(null), j = (R) => {
71
+ const x = R;
72
+ if (x !== m) {
73
+ if (x === "imperial") {
74
+ if (h !== null) {
75
+ const { ft: U, in: Y } = oe(h);
76
+ $(U), B(y(Y));
77
+ }
78
+ p !== null && T(y(ne(p)));
79
+ } else
80
+ (u !== null || d !== null) && F(y(L(u ?? 0, d ?? 0))), g !== null && I(y(V(g)));
81
+ _(x);
82
+ }
83
+ }, z = m === "metric" ? h : u !== null || d !== null ? L(u ?? 0, d ?? 0) : null, P = m === "metric" ? p : g !== null ? V(g) : null, l = re(P, z), a = l !== null ? ie(l) : null, G = ge(a), v = Q(
84
+ () => new Intl.NumberFormat(w.language, {
85
+ minimumFractionDigits: 1,
86
+ maximumFractionDigits: 1
87
+ }),
88
+ [w.language]
89
+ );
90
+ k(() => {
91
+ r == null || r(
92
+ l !== null && a !== null ? { bmi: l, category: a } : null
93
+ );
94
+ }, [l, a, r]);
95
+ const b = m === "metric";
96
+ return /* @__PURE__ */ s(
97
+ "div",
98
+ {
99
+ ref: D,
100
+ "data-component": "bmi-calculator",
101
+ "data-component-id": M,
102
+ className: se({ width: O, className: W }),
103
+ children: [
104
+ /* @__PURE__ */ s(
105
+ Z,
106
+ {
107
+ label: e("bmiCalculator.unitSystem.label"),
108
+ variant: "horizontal",
109
+ value: m,
110
+ onValueChange: j,
111
+ children: [
112
+ /* @__PURE__ */ t(E, { label: e("bmiCalculator.unitSystem.metric"), value: "metric" }),
113
+ /* @__PURE__ */ t(
114
+ E,
115
+ {
116
+ label: e("bmiCalculator.unitSystem.imperial"),
117
+ value: "imperial"
118
+ }
119
+ )
120
+ ]
121
+ }
122
+ ),
123
+ /* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
124
+ b ? /* @__PURE__ */ t(
125
+ S,
126
+ {
127
+ label: `${e("bmiCalculator.height")} (${e("bmiCalculator.units.cm")})`,
128
+ children: /* @__PURE__ */ t(
129
+ C,
130
+ {
131
+ mode: "decimal",
132
+ min: 0,
133
+ step: 0.5,
134
+ value: h,
135
+ onChange: F
136
+ }
137
+ )
138
+ }
139
+ ) : /* @__PURE__ */ s("div", { role: "group", "aria-labelledby": N, children: [
140
+ /* @__PURE__ */ t(
141
+ "span",
142
+ {
143
+ id: N,
144
+ className: "type-label ds:mb-[var(--spacing-xs)] ds:block ds:text-foreground",
145
+ children: e("bmiCalculator.height")
146
+ }
147
+ ),
148
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
149
+ /* @__PURE__ */ t(
150
+ C,
151
+ {
152
+ mode: "integer",
153
+ min: 0,
154
+ value: u,
155
+ onChange: $,
156
+ "aria-label": e("bmiCalculator.feet")
157
+ }
158
+ ),
159
+ /* @__PURE__ */ t("span", { className: "type-label ds:text-muted-foreground", children: e("bmiCalculator.units.ft") }),
160
+ /* @__PURE__ */ t(
161
+ C,
162
+ {
163
+ mode: "decimal",
164
+ min: 0,
165
+ max: 11.9,
166
+ step: 0.5,
167
+ value: d,
168
+ onChange: B,
169
+ "aria-label": e("bmiCalculator.inches")
170
+ }
171
+ ),
172
+ /* @__PURE__ */ t("span", { className: "type-label ds:text-muted-foreground", children: e("bmiCalculator.units.in") })
173
+ ] })
174
+ ] }),
175
+ /* @__PURE__ */ t(
176
+ S,
177
+ {
178
+ label: `${e("bmiCalculator.weight")} (${e(
179
+ b ? "bmiCalculator.units.kg" : "bmiCalculator.units.lb"
180
+ )})`,
181
+ children: /* @__PURE__ */ t(
182
+ C,
183
+ {
184
+ mode: "decimal",
185
+ min: 0,
186
+ step: b ? 0.1 : 0.5,
187
+ value: b ? p : g,
188
+ onChange: b ? I : T
189
+ }
190
+ )
191
+ }
192
+ )
193
+ ] }),
194
+ /* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: l !== null && a !== null ? e("bmiCalculator.gaugeAria", {
195
+ bmi: v.format(l),
196
+ category: e(`bmiCalculator.category.${a}`)
197
+ }) : "" }),
198
+ l !== null && a !== null ? /* @__PURE__ */ t(H, { variant: "elevated", children: /* @__PURE__ */ s(H.Body, { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-md)]", children: [
199
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
200
+ /* @__PURE__ */ t("span", { className: "type-label ds:text-muted-foreground", children: e("bmiCalculator.category.label") }),
201
+ /* @__PURE__ */ t(te, { variant: ce[a], size: "lg", children: e(`bmiCalculator.category.${a}`) }),
202
+ /* @__PURE__ */ t("p", { className: "type-body ds:text-muted-foreground", children: e(`bmiCalculator.range.${a}`) })
203
+ ] }),
204
+ /* @__PURE__ */ t(
205
+ "div",
206
+ {
207
+ "data-bmi-category": a,
208
+ className: "ds:w-[240px] ds:max-w-full",
209
+ children: /* @__PURE__ */ t(
210
+ ee,
211
+ {
212
+ type: "radialBar",
213
+ title: e("bmiCalculator.gaugeAria", {
214
+ bmi: v.format(l),
215
+ category: e(`bmiCalculator.category.${a}`)
216
+ }),
217
+ series: [le(l)],
218
+ labels: [e(`bmiCalculator.category.${a}`)],
219
+ colors: G ? [G] : void 0,
220
+ radialValueFormatter: () => v.format(l),
221
+ height: 240
222
+ }
223
+ )
224
+ }
225
+ ),
226
+ n === "copy" || o ? /* @__PURE__ */ t(
227
+ ae,
228
+ {
229
+ onInsert: o,
230
+ variant: n,
231
+ onCopy: f,
232
+ onError: A,
233
+ card: {
234
+ title: e("insert.title.bmi"),
235
+ highlight: e(`bmiCalculator.category.${a}`),
236
+ fields: [
237
+ {
238
+ label: e("insert.title.bmi"),
239
+ value: v.format(l)
240
+ },
241
+ {
242
+ label: e("bmiCalculator.category.label"),
243
+ value: e(`bmiCalculator.category.${a}`)
244
+ }
245
+ ]
246
+ }
247
+ }
248
+ ) : null
249
+ ] }) }) : /* @__PURE__ */ t("p", { className: "type-body ds:text-muted-foreground", children: e("bmiCalculator.empty") })
250
+ ]
251
+ }
252
+ );
253
+ }
254
+ );
255
+ be.displayName = "BmiCalculator";
256
+ export {
257
+ be as B
258
+ };
259
+ //# sourceMappingURL=bmi-calculator-DuVSFDuw.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-CvQfs6Xh.js";
10
+ import { D as Et } from "./date-picker-Bq7xhMA-.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-Dki6r9ZE.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, i as ce, a as je, n as jt, h as ye, f as qt, j as _e, x as Me } from "./react-day-picker-CdtIiKjx.js";
28
- import { s as Ht } from "./subDays-_T9YeKPX.js";
27
+ import { x as lt, i as ce, a as je, o as jt, h as ye, f as qt, j as _e, y as Me } from "./date-picker-variants-DLi1Va_e.js";
28
+ import { s as Ht } from "./subDays-Dv7q9S7u.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-4mCw3Mpl.js.map
2700
+ //# sourceMappingURL=booking-CtLwaxkK.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-Cee13rHU.js";
3
+ import { D as r } from "./dialog-DOYgd75U.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-B74fqpFZ.js.map
40
+ //# sourceMappingURL=calculator-dialog-DdexHrTP.js.map
@@ -1,13 +1,13 @@
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 P, useEffect as $, 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 k from "apexcharts";
7
- import { u as nt, g as G } 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 = {
1
+ import { jsxs as x, jsx as c } from "react/jsx-runtime";
2
+ import { forwardRef as X, useId as tt, useMemo as d, useRef as et, useState as $, useEffect as k, useImperativeHandle as ot } from "react";
3
+ import { c as at } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as rt } from "react-i18next";
5
+ import nt from "react-apexcharts";
6
+ import G from "apexcharts";
7
+ import { u as st, g as H } from "./apexcharts-theme-BJigns_V.js";
8
+ import { u as it } from "./use-prefers-reduced-motion-BMwIQRjB.js";
9
+ import { u as ct } from "./registry-nPAVE19X.js";
10
+ const dt = {
11
11
  id: "chart",
12
12
  capabilities: [],
13
13
  state: {},
@@ -34,7 +34,7 @@ const ct = {
34
34
  description: "Sourced from the id prop."
35
35
  }
36
36
  }
37
- }, dt = ot("ds:relative ds:block ds:w-full", {
37
+ }, lt = at("ds:relative ds:block ds:w-full", {
38
38
  variants: {
39
39
  density: {
40
40
  compact: "ds:min-h-[var(--chart-min-height-compact)]",
@@ -46,65 +46,66 @@ const ct = {
46
46
  }
47
47
  },
48
48
  defaultVariants: { density: "comfortable" }
49
- }), lt = [
49
+ }), mt = [
50
50
  "verticalLines",
51
51
  "horizontalLines",
52
52
  "slantedLines",
53
53
  "squares",
54
54
  "circles"
55
- ], mt = ["line", "bar", "area"], ut = ["pie", "donut", "radialBar"];
56
- function x(r) {
57
- return ut.includes(r);
55
+ ], ut = ["line", "bar", "area"], ht = ["pie", "donut", "radialBar"];
56
+ function R(r) {
57
+ return ht.includes(r);
58
58
  }
59
- function ht(r) {
60
- return mt.includes(r);
59
+ function pt(r) {
60
+ return ut.includes(r);
61
61
  }
62
- function pt(r, l) {
63
- return x(l) ? [
62
+ function ft(r, l) {
63
+ return R(l) ? [
64
64
  {
65
65
  name: "",
66
66
  data: r
67
67
  }
68
68
  ] : r;
69
69
  }
70
- const ft = Q(
70
+ const bt = X(
71
71
  ({
72
72
  title: r,
73
73
  id: l,
74
74
  type: o,
75
75
  series: p,
76
- categories: v,
77
- labels: g,
78
- height: L,
79
- width: H,
80
- patterns: O = !1,
81
- toolbar: R = !1,
82
- locale: _,
76
+ categories: g,
77
+ labels: v,
78
+ height: O,
79
+ width: _,
80
+ patterns: A = !1,
81
+ colors: T,
82
+ toolbar: S = !1,
83
+ locale: M,
83
84
  radialValueFormatter: m,
84
- density: M,
85
- className: U
86
- }, D) => {
87
- const { t: a, i18n: W } = at(), A = X(), u = d(
88
- () => `chart-${A.replace(/[^a-zA-Z0-9-_]/g, "")}`,
89
- [A]
90
- ), S = `${u}-summary`, y = tt(null), [z, Y] = P(0);
91
- nt(y);
92
- const h = _ ?? W.language ?? "en", [N, Z] = P(
85
+ density: U,
86
+ className: D
87
+ }, W) => {
88
+ const { t: a, i18n: Y } = rt(), z = tt(), u = d(
89
+ () => `chart-${z.replace(/[^a-zA-Z0-9-_]/g, "")}`,
90
+ [z]
91
+ ), y = `${u}-summary`, I = et(null), [N, Z] = $(0);
92
+ st(I);
93
+ const h = M ?? Y.language ?? "en", [B, j] = $(
93
94
  () => {
94
95
  try {
95
- return G();
96
+ return H();
96
97
  } catch {
97
98
  return {};
98
99
  }
99
100
  }
100
101
  );
101
- $(() => {
102
+ k(() => {
102
103
  if (typeof document > "u") return;
103
104
  let t;
104
105
  const e = new MutationObserver(() => {
105
106
  clearTimeout(t), t = setTimeout(() => {
106
107
  try {
107
- Z(G());
108
+ j(H());
108
109
  } catch {
109
110
  }
110
111
  }, 50);
@@ -115,36 +116,36 @@ const ft = Q(
115
116
  }), () => {
116
117
  clearTimeout(t), e.disconnect();
117
118
  };
118
- }, []), $(() => {
119
- const t = y.current;
119
+ }, []), k(() => {
120
+ const t = I.current;
120
121
  if (!t || typeof ResizeObserver > "u") return;
121
122
  const e = new ResizeObserver((n) => {
122
123
  const s = n[0];
123
- s && Y(Math.floor(s.contentRect.width));
124
+ s && Z(Math.floor(s.contentRect.width));
124
125
  });
125
126
  return e.observe(t), () => e.disconnect();
126
127
  }, []);
127
- const I = d(
128
+ const C = d(
128
129
  () => ({
129
130
  async dataURI() {
130
- const t = k.getChartByID(u);
131
+ const t = G.getChartByID(u);
131
132
  return t ? (await t.dataURI()).imgURI : "";
132
133
  },
133
134
  updateSeries(t) {
134
- const e = k.getChartByID(u);
135
- e && (x(o), e.updateSeries(t));
135
+ const e = G.getChartByID(u);
136
+ e && (R(o), e.updateSeries(t));
136
137
  }
137
138
  }),
138
139
  [u, o]
139
140
  );
140
- et(D, () => I, [I]), it(ct, I, l);
141
- const C = typeof document < "u" && document.documentElement.dir === "rtl", B = d(
142
- () => pt(p, o),
141
+ ot(W, () => C, [C]), ct(dt, C, l);
142
+ const w = typeof document < "u" && document.documentElement.dir === "rtl", E = d(
143
+ () => ft(p, o),
143
144
  [p, o]
144
145
  ), f = d(
145
146
  () => new Intl.NumberFormat(h),
146
147
  [h]
147
- ), E = d(
148
+ ), P = d(
148
149
  () => ({
149
150
  name: h,
150
151
  options: {
@@ -163,24 +164,24 @@ const ft = Q(
163
164
  }
164
165
  }),
165
166
  [h, a]
166
- ), w = st(), j = d(() => {
167
+ ), L = it(), q = d(() => {
167
168
  var n, s, b;
168
- const t = N, e = {
169
+ const t = B, e = {
169
170
  ...t,
170
171
  chart: {
171
172
  ...t.chart,
172
173
  id: u,
173
- toolbar: { show: R },
174
- zoom: { enabled: R },
174
+ toolbar: { show: S },
175
+ zoom: { enabled: S },
175
176
  animations: {
176
- enabled: !w,
177
- dynamicAnimation: { enabled: !w }
177
+ enabled: !L,
178
+ dynamicAnimation: { enabled: !L }
178
179
  },
179
- locales: [E],
180
+ locales: [P],
180
181
  defaultLocale: h,
181
182
  parentHeightOffset: 0
182
183
  },
183
- labels: g,
184
+ labels: v,
184
185
  legend: {
185
186
  ...t.legend,
186
187
  position: "bottom",
@@ -188,7 +189,7 @@ const ft = Q(
188
189
  // to the chart's own text flow. For RTL we flip via `yaxis.opposite`
189
190
  // and ApexCharts' own `direction: 'rtl'` handling; legend stays anchored
190
191
  // to the inline-start by asking for 'left' on LTR and 'right' on RTL.
191
- horizontalAlign: C ? "right" : "left",
192
+ horizontalAlign: w ? "right" : "left",
192
193
  fontFamily: "inherit"
193
194
  },
194
195
  tooltip: {
@@ -201,12 +202,12 @@ const ft = Q(
201
202
  text: a("chart.noData")
202
203
  }
203
204
  };
204
- if (ht(o) && (e.xaxis = {
205
+ if (T && T.length > 0 && (e.colors = T), pt(o) && (e.xaxis = {
205
206
  ...t.xaxis,
206
- categories: v ?? []
207
+ categories: g ?? []
207
208
  }, e.yaxis = {
208
209
  ...t.yaxis,
209
- opposite: C,
210
+ opposite: w,
210
211
  labels: {
211
212
  formatter: (i) => f.format(i)
212
213
  }
@@ -223,17 +224,17 @@ const ft = Q(
223
224
  ...((n = i.radialBar) == null ? void 0 : n.dataLabels) ?? {},
224
225
  value: {
225
226
  ...((b = (s = i.radialBar) == null ? void 0 : s.dataLabels) == null ? void 0 : b.value) ?? {},
226
- formatter: (K) => m(Number(K))
227
+ formatter: (Q) => m(Number(Q))
227
228
  }
228
229
  }
229
230
  }
230
231
  };
231
232
  }
232
- return O ? e.fill = {
233
+ return A ? e.fill = {
233
234
  type: "pattern",
234
235
  opacity: o === "area" ? 0.3 : 1,
235
236
  pattern: {
236
- style: [...lt],
237
+ style: [...mt],
237
238
  strokeWidth: 2
238
239
  }
239
240
  } : o === "area" && (e.fill = {
@@ -241,69 +242,70 @@ const ft = Q(
241
242
  opacity: 0.3
242
243
  }), e;
243
244
  }, [
244
- N,
245
+ B,
245
246
  u,
246
- R,
247
- w,
248
- E,
247
+ S,
248
+ L,
249
+ P,
249
250
  h,
250
- g,
251
+ v,
251
252
  f,
252
253
  a,
253
254
  o,
254
- v,
255
- C,
256
- O,
255
+ g,
256
+ w,
257
+ A,
258
+ T,
257
259
  m
258
- ]), q = H ?? (z > 0 ? z : "100%"), V = L ?? 320, F = d(() => {
259
- const t = x(o) ? g ?? [] : v ?? [], e = B;
260
- return /* @__PURE__ */ T("table", { id: S, className: "ds:sr-only", children: [
260
+ ]), V = _ ?? (N > 0 ? N : "100%"), F = O ?? 320, J = d(() => {
261
+ const t = R(o) ? v ?? [] : g ?? [], e = E;
262
+ return /* @__PURE__ */ x("table", { id: y, className: "ds:sr-only", children: [
261
263
  /* @__PURE__ */ c("caption", { children: r }),
262
- /* @__PURE__ */ c("thead", { children: /* @__PURE__ */ T("tr", { children: [
264
+ /* @__PURE__ */ c("thead", { children: /* @__PURE__ */ x("tr", { children: [
263
265
  /* @__PURE__ */ c("th", { scope: "col", children: a("chart.table.series") }),
264
266
  t.map((n, s) => /* @__PURE__ */ c("th", { scope: "col", children: n }, `${n}-${s}`))
265
267
  ] }) }),
266
- /* @__PURE__ */ c("tbody", { children: e.map((n, s) => /* @__PURE__ */ T("tr", { children: [
268
+ /* @__PURE__ */ c("tbody", { children: e.map((n, s) => /* @__PURE__ */ x("tr", { children: [
267
269
  /* @__PURE__ */ c("th", { scope: "row", children: n.name || a("chart.table.value") }),
268
270
  n.data.map((b, i) => /* @__PURE__ */ c("td", { children: o === "radialBar" && m ? m(b) : f.format(b) }, `${s}-${i}`))
269
271
  ] }, `${n.name}-${s}`)) })
270
272
  ] });
271
273
  }, [
272
274
  o,
273
- B,
274
- g,
275
+ E,
275
276
  v,
276
- S,
277
+ g,
278
+ y,
277
279
  r,
278
280
  a,
279
281
  f,
280
282
  m
281
- ]), J = d(() => (x(o), p), [p, o]);
282
- return /* @__PURE__ */ T(
283
+ ]), K = d(() => (R(o), p), [p, o]);
284
+ return /* @__PURE__ */ x(
283
285
  "div",
284
286
  {
285
- ref: y,
287
+ ref: I,
286
288
  role: "img",
287
289
  "aria-label": r,
288
- "aria-describedby": S,
289
- className: dt({
290
+ "aria-describedby": y,
291
+ className: lt({
290
292
  // Explicit height wins over the density min-height unless the
291
293
  // caller also asked for a density explicitly.
292
- density: M ?? (L !== void 0 ? "none" : void 0),
293
- className: U
294
+ density: U ?? (O !== void 0 ? "none" : void 0),
295
+ className: D
294
296
  }),
295
297
  "data-component": "chart",
296
298
  "data-component-id": l,
297
299
  children: [
298
- F,
300
+ J,
299
301
  /* @__PURE__ */ c(
300
- rt,
302
+ nt,
301
303
  {
302
304
  type: o,
303
- series: J,
304
- options: j,
305
- width: q,
306
- height: V,
305
+ series: K,
306
+ options: q,
307
+ width: V,
308
+ height: F,
307
309
  "aria-hidden": "true"
308
310
  }
309
311
  )
@@ -312,10 +314,10 @@ const ft = Q(
312
314
  );
313
315
  }
314
316
  );
315
- ft.displayName = "Chart";
317
+ bt.displayName = "Chart";
316
318
  export {
317
- ft as C,
318
- dt as a,
319
- ct as c
319
+ bt as C,
320
+ lt as a,
321
+ dt as c
320
322
  };
321
- //# sourceMappingURL=chart-Cbt0_sKv.js.map
323
+ //# sourceMappingURL=chart-Cg3e9EH9.js.map