@alfadocs/ui-kit 0.36.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/{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 +2 -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 +532 -514
- 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/tokens.css +1 -1
- package/package.json +9 -1
- package/dist/_chunks/chart-DLkVn_ex.js +0 -292
- package/dist/_chunks/subDays-CANHP9hz.js +0 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfadocs/ui-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -91,6 +91,10 @@
|
|
|
91
91
|
"types": "./dist/components/benefit-card/index.d.ts",
|
|
92
92
|
"import": "./dist/components/benefit-card/index.js"
|
|
93
93
|
},
|
|
94
|
+
"./bmi-calculator": {
|
|
95
|
+
"types": "./dist/components/bmi-calculator/index.d.ts",
|
|
96
|
+
"import": "./dist/components/bmi-calculator/index.js"
|
|
97
|
+
},
|
|
94
98
|
"./booking": {
|
|
95
99
|
"types": "./dist/components/booking/index.d.ts",
|
|
96
100
|
"import": "./dist/components/booking/index.js"
|
|
@@ -195,6 +199,10 @@
|
|
|
195
199
|
"types": "./dist/components/dropdown-menu/index.d.ts",
|
|
196
200
|
"import": "./dist/components/dropdown-menu/index.js"
|
|
197
201
|
},
|
|
202
|
+
"./due-date-calculator": {
|
|
203
|
+
"types": "./dist/components/due-date-calculator/index.d.ts",
|
|
204
|
+
"import": "./dist/components/due-date-calculator/index.js"
|
|
205
|
+
},
|
|
198
206
|
"./email-input": {
|
|
199
207
|
"types": "./dist/components/email-input/index.d.ts",
|
|
200
208
|
"import": "./dist/components/email-input/index.js"
|
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
import { jsxs as b, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as J, useId as K, useMemo as i, useRef as Q, useState as O, useEffect as E, useImperativeHandle as X } from "react";
|
|
3
|
-
import { c as tt } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as et } from "react-i18next";
|
|
5
|
-
import ot from "react-apexcharts";
|
|
6
|
-
import N from "apexcharts";
|
|
7
|
-
import { u as rt, g as P } from "./apexcharts-theme-BJigns_V.js";
|
|
8
|
-
import { u as at } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
9
|
-
import { u as nt } from "./registry-nPAVE19X.js";
|
|
10
|
-
const st = {
|
|
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: (a, l) => {
|
|
20
|
-
a.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: (a) => a.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
|
-
}, it = tt("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
|
-
}), ct = [
|
|
46
|
-
"verticalLines",
|
|
47
|
-
"horizontalLines",
|
|
48
|
-
"slantedLines",
|
|
49
|
-
"squares",
|
|
50
|
-
"circles"
|
|
51
|
-
], lt = ["line", "bar", "area"], dt = ["pie", "donut", "radialBar"];
|
|
52
|
-
function g(a) {
|
|
53
|
-
return dt.includes(a);
|
|
54
|
-
}
|
|
55
|
-
function mt(a) {
|
|
56
|
-
return lt.includes(a);
|
|
57
|
-
}
|
|
58
|
-
function ut(a, l) {
|
|
59
|
-
return g(l) ? [
|
|
60
|
-
{
|
|
61
|
-
name: "",
|
|
62
|
-
data: a
|
|
63
|
-
}
|
|
64
|
-
] : a;
|
|
65
|
-
}
|
|
66
|
-
const ht = J(
|
|
67
|
-
({
|
|
68
|
-
title: a,
|
|
69
|
-
id: l,
|
|
70
|
-
type: r,
|
|
71
|
-
series: u,
|
|
72
|
-
categories: p,
|
|
73
|
-
labels: f,
|
|
74
|
-
height: $,
|
|
75
|
-
width: k,
|
|
76
|
-
patterns: I = !1,
|
|
77
|
-
toolbar: v = !1,
|
|
78
|
-
locale: G,
|
|
79
|
-
density: H,
|
|
80
|
-
className: V
|
|
81
|
-
}, _) => {
|
|
82
|
-
const { t: o, i18n: F } = et(), C = K(), d = i(
|
|
83
|
-
() => `chart-${C.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
84
|
-
[C]
|
|
85
|
-
), T = `${d}-summary`, x = Q(null), [w, M] = O(0);
|
|
86
|
-
rt(x);
|
|
87
|
-
const m = G ?? F.language ?? "en", [A, U] = O(
|
|
88
|
-
() => {
|
|
89
|
-
try {
|
|
90
|
-
return P();
|
|
91
|
-
} catch {
|
|
92
|
-
return {};
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
E(() => {
|
|
97
|
-
if (typeof document > "u") return;
|
|
98
|
-
let t;
|
|
99
|
-
const e = new MutationObserver(() => {
|
|
100
|
-
clearTimeout(t), t = setTimeout(() => {
|
|
101
|
-
try {
|
|
102
|
-
U(P());
|
|
103
|
-
} catch {
|
|
104
|
-
}
|
|
105
|
-
}, 50);
|
|
106
|
-
});
|
|
107
|
-
return e.observe(document.documentElement, {
|
|
108
|
-
attributes: !0,
|
|
109
|
-
attributeFilter: ["class"]
|
|
110
|
-
}), () => {
|
|
111
|
-
clearTimeout(t), e.disconnect();
|
|
112
|
-
};
|
|
113
|
-
}, []), E(() => {
|
|
114
|
-
const t = x.current;
|
|
115
|
-
if (!t || typeof ResizeObserver > "u") return;
|
|
116
|
-
const e = new ResizeObserver((n) => {
|
|
117
|
-
const c = n[0];
|
|
118
|
-
c && M(Math.floor(c.contentRect.width));
|
|
119
|
-
});
|
|
120
|
-
return e.observe(t), () => e.disconnect();
|
|
121
|
-
}, []);
|
|
122
|
-
const y = i(
|
|
123
|
-
() => ({
|
|
124
|
-
async dataURI() {
|
|
125
|
-
const t = N.getChartByID(d);
|
|
126
|
-
return t ? (await t.dataURI()).imgURI : "";
|
|
127
|
-
},
|
|
128
|
-
updateSeries(t) {
|
|
129
|
-
const e = N.getChartByID(d);
|
|
130
|
-
e && (g(r), e.updateSeries(t));
|
|
131
|
-
}
|
|
132
|
-
}),
|
|
133
|
-
[d, r]
|
|
134
|
-
);
|
|
135
|
-
X(_, () => y, [y]), nt(st, y, l);
|
|
136
|
-
const R = typeof document < "u" && document.documentElement.dir === "rtl", z = i(
|
|
137
|
-
() => ut(u, r),
|
|
138
|
-
[u, r]
|
|
139
|
-
), h = i(
|
|
140
|
-
() => new Intl.NumberFormat(m),
|
|
141
|
-
[m]
|
|
142
|
-
), L = i(
|
|
143
|
-
() => ({
|
|
144
|
-
name: m,
|
|
145
|
-
options: {
|
|
146
|
-
toolbar: {
|
|
147
|
-
download: o("chart.toolbar.download"),
|
|
148
|
-
selection: o("chart.toolbar.selection"),
|
|
149
|
-
selectionZoom: o("chart.toolbar.selectionZoom"),
|
|
150
|
-
zoomIn: o("chart.toolbar.zoomIn"),
|
|
151
|
-
zoomOut: o("chart.toolbar.zoomOut"),
|
|
152
|
-
pan: o("chart.toolbar.pan"),
|
|
153
|
-
reset: o("chart.toolbar.reset"),
|
|
154
|
-
exportToSVG: o("chart.toolbar.exportToSVG"),
|
|
155
|
-
exportToPNG: o("chart.toolbar.exportToPNG"),
|
|
156
|
-
exportToCSV: o("chart.toolbar.exportToCSV")
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}),
|
|
160
|
-
[m, o]
|
|
161
|
-
), S = at(), D = i(() => {
|
|
162
|
-
const t = A, e = {
|
|
163
|
-
...t,
|
|
164
|
-
chart: {
|
|
165
|
-
...t.chart,
|
|
166
|
-
id: d,
|
|
167
|
-
toolbar: { show: v },
|
|
168
|
-
zoom: { enabled: v },
|
|
169
|
-
animations: {
|
|
170
|
-
enabled: !S,
|
|
171
|
-
dynamicAnimation: { enabled: !S }
|
|
172
|
-
},
|
|
173
|
-
locales: [L],
|
|
174
|
-
defaultLocale: m,
|
|
175
|
-
parentHeightOffset: 0
|
|
176
|
-
},
|
|
177
|
-
labels: f,
|
|
178
|
-
legend: {
|
|
179
|
-
...t.legend,
|
|
180
|
-
position: "bottom",
|
|
181
|
-
// ApexCharts legend.horizontalAlign is a physical prop mapped internally
|
|
182
|
-
// to the chart's own text flow. For RTL we flip via `yaxis.opposite`
|
|
183
|
-
// and ApexCharts' own `direction: 'rtl'` handling; legend stays anchored
|
|
184
|
-
// to the inline-start by asking for 'left' on LTR and 'right' on RTL.
|
|
185
|
-
horizontalAlign: R ? "right" : "left",
|
|
186
|
-
fontFamily: "inherit"
|
|
187
|
-
},
|
|
188
|
-
tooltip: {
|
|
189
|
-
...t.tooltip,
|
|
190
|
-
y: {
|
|
191
|
-
formatter: (n) => h.format(n)
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
noData: {
|
|
195
|
-
text: o("chart.noData")
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
return mt(r) && (e.xaxis = {
|
|
199
|
-
...t.xaxis,
|
|
200
|
-
categories: p ?? []
|
|
201
|
-
}, e.yaxis = {
|
|
202
|
-
...t.yaxis,
|
|
203
|
-
opposite: R,
|
|
204
|
-
labels: {
|
|
205
|
-
formatter: (n) => h.format(n)
|
|
206
|
-
}
|
|
207
|
-
}, e.stroke = {
|
|
208
|
-
curve: "smooth",
|
|
209
|
-
width: r === "bar" ? 0 : 2
|
|
210
|
-
}, e.dataLabels = { enabled: !1 }), I ? e.fill = {
|
|
211
|
-
type: "pattern",
|
|
212
|
-
opacity: r === "area" ? 0.3 : 1,
|
|
213
|
-
pattern: {
|
|
214
|
-
style: [...ct],
|
|
215
|
-
strokeWidth: 2
|
|
216
|
-
}
|
|
217
|
-
} : r === "area" && (e.fill = {
|
|
218
|
-
type: "gradient",
|
|
219
|
-
opacity: 0.3
|
|
220
|
-
}), e;
|
|
221
|
-
}, [
|
|
222
|
-
A,
|
|
223
|
-
d,
|
|
224
|
-
v,
|
|
225
|
-
S,
|
|
226
|
-
L,
|
|
227
|
-
m,
|
|
228
|
-
f,
|
|
229
|
-
h,
|
|
230
|
-
o,
|
|
231
|
-
r,
|
|
232
|
-
p,
|
|
233
|
-
R,
|
|
234
|
-
I
|
|
235
|
-
]), W = k ?? (w > 0 ? w : "100%"), B = $ ?? 320, Y = i(() => {
|
|
236
|
-
const t = g(r) ? f ?? [] : p ?? [], e = z;
|
|
237
|
-
return /* @__PURE__ */ b("table", { id: T, className: "ds:sr-only", children: [
|
|
238
|
-
/* @__PURE__ */ s("caption", { children: a }),
|
|
239
|
-
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ b("tr", { children: [
|
|
240
|
-
/* @__PURE__ */ s("th", { scope: "col", children: o("chart.table.series") }),
|
|
241
|
-
t.map((n, c) => /* @__PURE__ */ s("th", { scope: "col", children: n }, `${n}-${c}`))
|
|
242
|
-
] }) }),
|
|
243
|
-
/* @__PURE__ */ s("tbody", { children: e.map((n, c) => /* @__PURE__ */ b("tr", { children: [
|
|
244
|
-
/* @__PURE__ */ s("th", { scope: "row", children: n.name || o("chart.table.value") }),
|
|
245
|
-
n.data.map((j, q) => /* @__PURE__ */ s("td", { children: h.format(j) }, `${c}-${q}`))
|
|
246
|
-
] }, `${n.name}-${c}`)) })
|
|
247
|
-
] });
|
|
248
|
-
}, [
|
|
249
|
-
r,
|
|
250
|
-
z,
|
|
251
|
-
f,
|
|
252
|
-
p,
|
|
253
|
-
T,
|
|
254
|
-
a,
|
|
255
|
-
o,
|
|
256
|
-
h
|
|
257
|
-
]), Z = i(() => (g(r), u), [u, r]);
|
|
258
|
-
return /* @__PURE__ */ b(
|
|
259
|
-
"div",
|
|
260
|
-
{
|
|
261
|
-
ref: x,
|
|
262
|
-
role: "img",
|
|
263
|
-
"aria-label": a,
|
|
264
|
-
"aria-describedby": T,
|
|
265
|
-
className: it({ density: H, className: V }),
|
|
266
|
-
"data-component": "chart",
|
|
267
|
-
"data-component-id": l,
|
|
268
|
-
children: [
|
|
269
|
-
Y,
|
|
270
|
-
/* @__PURE__ */ s(
|
|
271
|
-
ot,
|
|
272
|
-
{
|
|
273
|
-
type: r,
|
|
274
|
-
series: Z,
|
|
275
|
-
options: D,
|
|
276
|
-
width: W,
|
|
277
|
-
height: B,
|
|
278
|
-
"aria-hidden": "true"
|
|
279
|
-
}
|
|
280
|
-
)
|
|
281
|
-
]
|
|
282
|
-
}
|
|
283
|
-
);
|
|
284
|
-
}
|
|
285
|
-
);
|
|
286
|
-
ht.displayName = "Chart";
|
|
287
|
-
export {
|
|
288
|
-
ht as C,
|
|
289
|
-
it as a,
|
|
290
|
-
st as c
|
|
291
|
-
};
|
|
292
|
-
//# sourceMappingURL=chart-DLkVn_ex.js.map
|