elij-ui-library 0.1.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/README.md +100 -0
- package/dist/components/ActionLinkButton/ActionLinkButton.d.ts +13 -0
- package/dist/components/ActionLinkButton/index.d.ts +2 -0
- package/dist/components/Alert/Alert.d.ts +10 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +9 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Badge/Badge.d.ts +7 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +12 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +10 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +9 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Charts/Charts.d.ts +52 -0
- package/dist/components/Charts/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Dialog/Dialog.d.ts +12 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Divider/Divider.d.ts +6 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.d.ts +13 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Dropdown/Dropdown.d.ts +13 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Empty/Empty.d.ts +9 -0
- package/dist/components/Empty/index.d.ts +2 -0
- package/dist/components/EventCarousel/EventCarousel.d.ts +13 -0
- package/dist/components/EventCarousel/index.d.ts +2 -0
- package/dist/components/FilterTabs/FilterTabs.d.ts +14 -0
- package/dist/components/FilterTabs/index.d.ts +2 -0
- package/dist/components/Flex/Flex.d.ts +11 -0
- package/dist/components/Flex/index.d.ts +2 -0
- package/dist/components/Grid/Grid.d.ts +15 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +9 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Layout/Layout.d.ts +6 -0
- package/dist/components/Layout/index.d.ts +1 -0
- package/dist/components/Menu/Menu.d.ts +18 -0
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +10 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Progress/Progress.d.ts +9 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +18 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/Result/Result.d.ts +10 -0
- package/dist/components/Result/index.d.ts +2 -0
- package/dist/components/SectionHeading/SectionHeading.d.ts +8 -0
- package/dist/components/SectionHeading/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +16 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.d.ts +8 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Space/Space.d.ts +9 -0
- package/dist/components/Space/index.d.ts +2 -0
- package/dist/components/Spinner/Spinner.d.ts +6 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Steps/Steps.d.ts +16 -0
- package/dist/components/Steps/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +8 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +18 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +17 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tag/Tag.d.ts +9 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/Textarea/Textarea.d.ts +9 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +8 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Typography/Typography.d.ts +15 -0
- package/dist/components/Typography/index.d.ts +2 -0
- package/dist/components/WhatsAppButton/WhatsAppButton.d.ts +13 -0
- package/dist/components/WhatsAppButton/index.d.ts +2 -0
- package/dist/i18n/messages.d.ts +59 -0
- package/dist/icons/WhatsAppIcon.d.ts +6 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +778 -0
- package/dist/provider/UIContext.d.ts +10 -0
- package/dist/provider/UIProvider.d.ts +10 -0
- package/dist/provider/index.d.ts +5 -0
- package/dist/ui-library.css +1 -0
- package/package.json +77 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,778 @@
|
|
|
1
|
+
import { jsx as e, jsxs as p, Fragment as J } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as x, createContext as O, useContext as Q, useMemo as ee, useRef as w, useEffect as I, useId as C, useState as N, isValidElement as U, cloneElement as F, Children as te } from "react";
|
|
3
|
+
import { ResponsiveContainer as E, BarChart as X, CartesianGrid as M, XAxis as R, YAxis as D, Tooltip as K, Legend as L, Bar as j, PieChart as re, Pie as ae, Cell as ne, ComposedChart as ie, Line as V, Area as le, AreaChart as oe, LineChart as se } from "recharts";
|
|
4
|
+
const ce = x(function({
|
|
5
|
+
children: r,
|
|
6
|
+
variant: a = "primary",
|
|
7
|
+
size: n = "medium",
|
|
8
|
+
fullWidth: i = !1,
|
|
9
|
+
className: l = "",
|
|
10
|
+
type: c = "button",
|
|
11
|
+
...o
|
|
12
|
+
}, s) {
|
|
13
|
+
const u = [
|
|
14
|
+
"ui-button",
|
|
15
|
+
`ui-button--${a}`,
|
|
16
|
+
`ui-button--${n}`,
|
|
17
|
+
i ? "ui-button--full-width" : "",
|
|
18
|
+
l
|
|
19
|
+
].filter(Boolean).join(" ");
|
|
20
|
+
return /* @__PURE__ */ e("button", { ref: s, className: u, type: c, ...o, children: r });
|
|
21
|
+
}), S = {
|
|
22
|
+
en: {
|
|
23
|
+
close: "Close",
|
|
24
|
+
loading: "Loading",
|
|
25
|
+
clear: "Clear",
|
|
26
|
+
previous: "Previous",
|
|
27
|
+
next: "Next",
|
|
28
|
+
pagination: "Pagination",
|
|
29
|
+
page: "Page",
|
|
30
|
+
noData: "No data",
|
|
31
|
+
breadcrumb: "Breadcrumb",
|
|
32
|
+
menu: "Menu",
|
|
33
|
+
tabs: "Tabs",
|
|
34
|
+
steps: "Steps",
|
|
35
|
+
progress: "Progress",
|
|
36
|
+
previousPage: "Previous page",
|
|
37
|
+
nextPage: "Next page",
|
|
38
|
+
pageSuffix: "",
|
|
39
|
+
confirm: "Confirm",
|
|
40
|
+
cancel: "Cancel",
|
|
41
|
+
open: "Open",
|
|
42
|
+
chart: "Chart",
|
|
43
|
+
pieChart: "Pie chart",
|
|
44
|
+
donutChart: "Donut chart",
|
|
45
|
+
horizontalBarChart: "Horizontal bar chart",
|
|
46
|
+
combinationChart: "Combination chart",
|
|
47
|
+
dualAxisChart: "Dual-axis chart"
|
|
48
|
+
},
|
|
49
|
+
"zh-CN": {
|
|
50
|
+
close: "关闭",
|
|
51
|
+
loading: "加载中",
|
|
52
|
+
clear: "清除",
|
|
53
|
+
previous: "上一步",
|
|
54
|
+
next: "下一步",
|
|
55
|
+
pagination: "分页",
|
|
56
|
+
page: "第",
|
|
57
|
+
noData: "暂无数据",
|
|
58
|
+
breadcrumb: "面包屑导航",
|
|
59
|
+
menu: "菜单",
|
|
60
|
+
tabs: "标签页",
|
|
61
|
+
steps: "步骤",
|
|
62
|
+
progress: "进度",
|
|
63
|
+
previousPage: "上一页",
|
|
64
|
+
nextPage: "下一页",
|
|
65
|
+
pageSuffix: "页",
|
|
66
|
+
confirm: "确认",
|
|
67
|
+
cancel: "取消",
|
|
68
|
+
open: "打开",
|
|
69
|
+
chart: "图表",
|
|
70
|
+
pieChart: "饼图",
|
|
71
|
+
donutChart: "环形图",
|
|
72
|
+
horizontalBarChart: "横向条形图",
|
|
73
|
+
combinationChart: "组合图",
|
|
74
|
+
dualAxisChart: "双轴图"
|
|
75
|
+
}
|
|
76
|
+
}, W = S.en, q = O({
|
|
77
|
+
locale: "en",
|
|
78
|
+
messages: W,
|
|
79
|
+
theme: "light",
|
|
80
|
+
t: (t, r) => r ?? W[t] ?? t
|
|
81
|
+
});
|
|
82
|
+
function k() {
|
|
83
|
+
return Q(q);
|
|
84
|
+
}
|
|
85
|
+
const G = S.en;
|
|
86
|
+
function ge({
|
|
87
|
+
children: t,
|
|
88
|
+
locale: r = "en",
|
|
89
|
+
messages: a,
|
|
90
|
+
theme: n = "light",
|
|
91
|
+
className: i = "",
|
|
92
|
+
style: l,
|
|
93
|
+
...c
|
|
94
|
+
}) {
|
|
95
|
+
const o = ee(() => {
|
|
96
|
+
const u = r in S ? S[r] : G, f = Object.fromEntries(
|
|
97
|
+
Object.entries({ ...G, ...u, ...a }).filter(
|
|
98
|
+
(d) => d[1] !== void 0
|
|
99
|
+
)
|
|
100
|
+
);
|
|
101
|
+
return {
|
|
102
|
+
locale: r,
|
|
103
|
+
messages: f,
|
|
104
|
+
theme: n,
|
|
105
|
+
t: (d, m) => f[d] ?? m ?? d
|
|
106
|
+
};
|
|
107
|
+
}, [r, a, n]), s = {
|
|
108
|
+
colorScheme: n === "dark" ? "dark" : "light",
|
|
109
|
+
...l
|
|
110
|
+
};
|
|
111
|
+
return /* @__PURE__ */ e(q.Provider, { value: o, children: /* @__PURE__ */ e(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
className: ["ui-provider", i].filter(Boolean).join(" "),
|
|
115
|
+
"data-ui-locale": r,
|
|
116
|
+
"data-ui-theme": n,
|
|
117
|
+
lang: r,
|
|
118
|
+
style: s,
|
|
119
|
+
...c,
|
|
120
|
+
children: t
|
|
121
|
+
}
|
|
122
|
+
) });
|
|
123
|
+
}
|
|
124
|
+
function $e({ children: t, title: r, variant: a = "info", onDismiss: n, dismissLabel: i, className: l = "", ...c }) {
|
|
125
|
+
const { t: o } = k();
|
|
126
|
+
return /* @__PURE__ */ p("div", { role: a === "error" ? "alert" : "status", className: `ui-alert ui-alert--${a}${l ? ` ${l}` : ""}`, ...c, children: [
|
|
127
|
+
/* @__PURE__ */ p("div", { className: "ui-alert__content", children: [
|
|
128
|
+
r && /* @__PURE__ */ e("strong", { className: "ui-alert__title", children: r }),
|
|
129
|
+
/* @__PURE__ */ e("div", { children: t })
|
|
130
|
+
] }),
|
|
131
|
+
n && /* @__PURE__ */ e("button", { className: "ui-alert__dismiss", type: "button", "aria-label": i ?? o("close"), onClick: n, children: "×" })
|
|
132
|
+
] });
|
|
133
|
+
}
|
|
134
|
+
function ke({ children: t, variant: r = "neutral", className: a = "", ...n }) {
|
|
135
|
+
return /* @__PURE__ */ e("span", { className: `ui-badge ui-badge--${r}${a ? ` ${a}` : ""}`, ...n, children: t });
|
|
136
|
+
}
|
|
137
|
+
function _e({ children: t, interactive: r = !1, className: a = "", ...n }) {
|
|
138
|
+
return /* @__PURE__ */ e("div", { className: `ui-card${r ? " ui-card--interactive" : ""}${a ? ` ${a}` : ""}`, ...n, children: t });
|
|
139
|
+
}
|
|
140
|
+
function Ce({ className: t = "", ...r }) {
|
|
141
|
+
return /* @__PURE__ */ e("div", { className: `ui-card__header${t ? ` ${t}` : ""}`, ...r });
|
|
142
|
+
}
|
|
143
|
+
function we({ className: t = "", ...r }) {
|
|
144
|
+
return /* @__PURE__ */ e("div", { className: `ui-card__body${t ? ` ${t}` : ""}`, ...r });
|
|
145
|
+
}
|
|
146
|
+
function Ne({ className: t = "", ...r }) {
|
|
147
|
+
return /* @__PURE__ */ e("div", { className: `ui-card__footer${t ? ` ${t}` : ""}`, ...r });
|
|
148
|
+
}
|
|
149
|
+
const xe = x(function({ label: r, indeterminate: a = !1, className: n = "", ...i }, l) {
|
|
150
|
+
const c = w(null);
|
|
151
|
+
I(() => {
|
|
152
|
+
c.current && (c.current.indeterminate = a);
|
|
153
|
+
}, [a]);
|
|
154
|
+
const o = (s) => {
|
|
155
|
+
c.current = s, typeof l == "function" ? l(s) : l && (l.current = s);
|
|
156
|
+
};
|
|
157
|
+
return /* @__PURE__ */ p("label", { className: `ui-check${i.disabled ? " ui-check--disabled" : ""}`, children: [
|
|
158
|
+
/* @__PURE__ */ e("input", { ref: o, className: `ui-check__input${n ? ` ${n}` : ""}`, type: "checkbox", ...i }),
|
|
159
|
+
/* @__PURE__ */ e("span", { className: "ui-check__control", "aria-hidden": "true" }),
|
|
160
|
+
r && /* @__PURE__ */ e("span", { className: "ui-check__label", children: r })
|
|
161
|
+
] });
|
|
162
|
+
});
|
|
163
|
+
function Ie({ open: t, onOpenChange: r, title: a, description: n, children: i, footer: l, closeLabel: c, closeOnOverlayClick: o = !0 }) {
|
|
164
|
+
const { t: s } = k(), u = C(), f = C(), d = w(null);
|
|
165
|
+
return I(() => {
|
|
166
|
+
if (!t) return;
|
|
167
|
+
const m = document.activeElement, v = document.body.style.overflow;
|
|
168
|
+
document.body.style.overflow = "hidden", d.current?.focus();
|
|
169
|
+
const b = (h) => {
|
|
170
|
+
if (h.key === "Escape" && r(!1), h.key !== "Tab" || !d.current) return;
|
|
171
|
+
const g = Array.from(d.current.querySelectorAll('button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])'));
|
|
172
|
+
if (!g.length) {
|
|
173
|
+
h.preventDefault();
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const y = g[0], $ = g[g.length - 1];
|
|
177
|
+
h.shiftKey && document.activeElement === y ? (h.preventDefault(), $.focus()) : !h.shiftKey && document.activeElement === $ && (h.preventDefault(), y.focus());
|
|
178
|
+
};
|
|
179
|
+
return document.addEventListener("keydown", b), () => {
|
|
180
|
+
document.removeEventListener("keydown", b), document.body.style.overflow = v, m?.focus();
|
|
181
|
+
};
|
|
182
|
+
}, [t, r]), t ? /* @__PURE__ */ e("div", { className: "ui-dialog__backdrop", onMouseDown: (m) => {
|
|
183
|
+
o && m.target === m.currentTarget && r(!1);
|
|
184
|
+
}, children: /* @__PURE__ */ p("div", { ref: d, className: "ui-dialog", role: "dialog", "aria-modal": "true", "aria-labelledby": u, "aria-describedby": n ? f : void 0, tabIndex: -1, children: [
|
|
185
|
+
/* @__PURE__ */ p("header", { className: "ui-dialog__header", children: [
|
|
186
|
+
/* @__PURE__ */ p("div", { children: [
|
|
187
|
+
/* @__PURE__ */ e("h2", { id: u, children: a }),
|
|
188
|
+
n && /* @__PURE__ */ e("p", { id: f, children: n })
|
|
189
|
+
] }),
|
|
190
|
+
/* @__PURE__ */ e("button", { type: "button", className: "ui-dialog__close", "aria-label": c ?? s("close"), onClick: () => r(!1), children: "×" })
|
|
191
|
+
] }),
|
|
192
|
+
/* @__PURE__ */ e("div", { className: "ui-dialog__body", children: i }),
|
|
193
|
+
l && /* @__PURE__ */ e("footer", { className: "ui-dialog__footer", children: l })
|
|
194
|
+
] }) }) : null;
|
|
195
|
+
}
|
|
196
|
+
function Ae({ orientation: t = "horizontal", label: r, className: a = "", ...n }) {
|
|
197
|
+
return /* @__PURE__ */ e("div", { className: `ui-divider ui-divider--${t}${r ? " ui-divider--labelled" : ""}${a ? ` ${a}` : ""}`, role: "separator", "aria-orientation": t, ...n, children: r && /* @__PURE__ */ e("span", { children: r }) });
|
|
198
|
+
}
|
|
199
|
+
const De = x(function({
|
|
200
|
+
id: r,
|
|
201
|
+
label: a,
|
|
202
|
+
helperText: n,
|
|
203
|
+
error: i = !1,
|
|
204
|
+
errorMessage: l,
|
|
205
|
+
fullWidth: c = !1,
|
|
206
|
+
className: o = "",
|
|
207
|
+
...s
|
|
208
|
+
}, u) {
|
|
209
|
+
const f = C(), d = r ?? f, m = i && l ? `${d}-error` : n ? `${d}-helper` : void 0;
|
|
210
|
+
return /* @__PURE__ */ p("div", { className: `ui-field${c ? " ui-field--full" : ""}`, children: [
|
|
211
|
+
a && /* @__PURE__ */ e("label", { className: "ui-field__label", htmlFor: d, children: a }),
|
|
212
|
+
/* @__PURE__ */ e(
|
|
213
|
+
"input",
|
|
214
|
+
{
|
|
215
|
+
ref: u,
|
|
216
|
+
id: d,
|
|
217
|
+
className: `ui-input${i ? " ui-input--error" : ""}${o ? ` ${o}` : ""}`,
|
|
218
|
+
"aria-invalid": i || void 0,
|
|
219
|
+
"aria-describedby": m,
|
|
220
|
+
...s
|
|
221
|
+
}
|
|
222
|
+
),
|
|
223
|
+
i && l ? /* @__PURE__ */ e("span", { className: "ui-field__message ui-field__message--error", id: `${d}-error`, children: l }) : n ? /* @__PURE__ */ e("span", { className: "ui-field__message", id: `${d}-helper`, children: n }) : null
|
|
224
|
+
] });
|
|
225
|
+
});
|
|
226
|
+
function Se({ name: t, label: r, options: a, value: n, defaultValue: i, onValueChange: l, disabled: c = !1, orientation: o = "vertical", className: s = "" }) {
|
|
227
|
+
const u = C();
|
|
228
|
+
return /* @__PURE__ */ p("fieldset", { className: `ui-radio-group ui-radio-group--${o}${s ? ` ${s}` : ""}`, disabled: c, children: [
|
|
229
|
+
r && /* @__PURE__ */ e("legend", { className: "ui-field__label", children: r }),
|
|
230
|
+
/* @__PURE__ */ e("div", { className: "ui-radio-group__options", children: a.map((f) => /* @__PURE__ */ p("label", { className: "ui-radio", children: [
|
|
231
|
+
/* @__PURE__ */ e("input", { type: "radio", name: t ?? u, value: f.value, checked: n === void 0 ? void 0 : n === f.value, defaultChecked: n === void 0 ? i === f.value : void 0, disabled: f.disabled, onChange: () => l?.(f.value) }),
|
|
232
|
+
/* @__PURE__ */ e("span", { className: "ui-radio__control", "aria-hidden": "true" }),
|
|
233
|
+
/* @__PURE__ */ e("span", { children: f.label })
|
|
234
|
+
] }, f.value)) })
|
|
235
|
+
] });
|
|
236
|
+
}
|
|
237
|
+
const Ee = x(function({ id: r, label: a, helperText: n, error: i = !1, errorMessage: l, options: c, placeholder: o, fullWidth: s = !1, className: u = "", ...f }, d) {
|
|
238
|
+
const m = C(), v = r ?? m, b = i && l ? `${v}-error` : n ? `${v}-helper` : void 0;
|
|
239
|
+
return /* @__PURE__ */ p("div", { className: `ui-field${s ? " ui-field--full" : ""}`, children: [
|
|
240
|
+
a && /* @__PURE__ */ e("label", { className: "ui-field__label", htmlFor: v, children: a }),
|
|
241
|
+
/* @__PURE__ */ p("select", { ref: d, id: v, className: `ui-select${i ? " ui-select--error" : ""}${u ? ` ${u}` : ""}`, "aria-invalid": i || void 0, "aria-describedby": b, ...f, children: [
|
|
242
|
+
o && /* @__PURE__ */ e("option", { value: "", disabled: !0, children: o }),
|
|
243
|
+
c.map((h) => /* @__PURE__ */ e("option", { value: h.value, disabled: h.disabled, children: h.label }, h.value))
|
|
244
|
+
] }),
|
|
245
|
+
i && l ? /* @__PURE__ */ e("span", { className: "ui-field__message ui-field__message--error", id: `${v}-error`, children: l }) : n ? /* @__PURE__ */ e("span", { className: "ui-field__message", id: `${v}-helper`, children: n }) : null
|
|
246
|
+
] });
|
|
247
|
+
});
|
|
248
|
+
function ue({ size: t = "medium", label: r, className: a = "", ...n }) {
|
|
249
|
+
const { t: i } = k();
|
|
250
|
+
return /* @__PURE__ */ e("span", { className: `ui-spinner ui-spinner--${t}${a ? ` ${a}` : ""}`, role: "status", "aria-label": r ?? i("loading"), ...n });
|
|
251
|
+
}
|
|
252
|
+
const Ke = x(function({ checked: r, defaultChecked: a = !1, onCheckedChange: n, label: i, disabled: l, className: c = "", ...o }, s) {
|
|
253
|
+
const [u, f] = N(a), d = r ?? u, m = () => {
|
|
254
|
+
if (l) return;
|
|
255
|
+
const v = !d;
|
|
256
|
+
r === void 0 && f(v), n?.(v);
|
|
257
|
+
};
|
|
258
|
+
return /* @__PURE__ */ p("div", { className: `ui-switch-row${l ? " ui-switch-row--disabled" : ""}`, children: [
|
|
259
|
+
/* @__PURE__ */ e("button", { ref: s, type: "button", role: "switch", "aria-checked": d, "aria-label": typeof i == "string" ? i : void 0, disabled: l, className: `ui-switch${c ? ` ${c}` : ""}`, onClick: m, ...o, children: /* @__PURE__ */ e("span", { className: "ui-switch__thumb" }) }),
|
|
260
|
+
i && /* @__PURE__ */ e("span", { children: i })
|
|
261
|
+
] });
|
|
262
|
+
}), Le = x(function({
|
|
263
|
+
id: r,
|
|
264
|
+
label: a,
|
|
265
|
+
helperText: n,
|
|
266
|
+
error: i = !1,
|
|
267
|
+
errorMessage: l,
|
|
268
|
+
fullWidth: c = !1,
|
|
269
|
+
className: o = "",
|
|
270
|
+
...s
|
|
271
|
+
}, u) {
|
|
272
|
+
const f = C(), d = r ?? f, m = i && l ? `${d}-error` : n ? `${d}-helper` : void 0;
|
|
273
|
+
return /* @__PURE__ */ p("div", { className: `ui-field${c ? " ui-field--full" : ""}`, children: [
|
|
274
|
+
a && /* @__PURE__ */ e("label", { className: "ui-field__label", htmlFor: d, children: a }),
|
|
275
|
+
/* @__PURE__ */ e("textarea", { ref: u, id: d, className: `ui-textarea${i ? " ui-textarea--error" : ""}${o ? ` ${o}` : ""}`, "aria-invalid": i || void 0, "aria-describedby": m, ...s }),
|
|
276
|
+
i && l ? /* @__PURE__ */ e("span", { className: "ui-field__message ui-field__message--error", id: `${d}-error`, children: l }) : n ? /* @__PURE__ */ e("span", { className: "ui-field__message", id: `${d}-helper`, children: n }) : null
|
|
277
|
+
] });
|
|
278
|
+
});
|
|
279
|
+
function Be({ src: t, alt: r = "", children: a, size: n = "medium", shape: i = "circle", className: l = "", style: c, ...o }) {
|
|
280
|
+
const [s, u] = N(!1), f = typeof n == "number" ? n : { small: 28, medium: 40, large: 56 }[n];
|
|
281
|
+
return /* @__PURE__ */ e("span", { className: `ui-avatar ui-avatar--${i}${l ? ` ${l}` : ""}`, style: { width: f, height: f, ...c }, ...o, children: t && !s ? /* @__PURE__ */ e("img", { src: t, alt: r, onError: () => u(!0) }) : a });
|
|
282
|
+
}
|
|
283
|
+
function Pe({ items: t, separator: r = "/", ariaLabel: a, className: n = "" }) {
|
|
284
|
+
const { t: i } = k();
|
|
285
|
+
return /* @__PURE__ */ e("nav", { "aria-label": a ?? i("breadcrumb"), className: `ui-breadcrumb${n ? ` ${n}` : ""}`, children: /* @__PURE__ */ e("ol", { children: t.map((l, c) => /* @__PURE__ */ p("li", { children: [
|
|
286
|
+
c > 0 && /* @__PURE__ */ e("span", { className: "ui-breadcrumb__separator", "aria-hidden": "true", children: r }),
|
|
287
|
+
c === t.length - 1 ? /* @__PURE__ */ e("span", { "aria-current": "page", children: l.label }) : l.href ? /* @__PURE__ */ e("a", { href: l.href, children: l.label }) : /* @__PURE__ */ e("span", { children: l.label })
|
|
288
|
+
] }, c)) }) });
|
|
289
|
+
}
|
|
290
|
+
function Te({ open: t, onOpenChange: r, title: a, children: n, footer: i, placement: l = "right", width: c = 400, closeLabel: o, closeOnOverlayClick: s = !0 }) {
|
|
291
|
+
const { t: u } = k(), f = C(), d = w(null);
|
|
292
|
+
return I(() => {
|
|
293
|
+
if (!t) return;
|
|
294
|
+
const m = document.activeElement, v = document.body.style.overflow;
|
|
295
|
+
document.body.style.overflow = "hidden", d.current?.focus();
|
|
296
|
+
const b = (h) => {
|
|
297
|
+
if (h.key === "Escape" && r(!1), h.key === "Tab" && d.current) {
|
|
298
|
+
const g = Array.from(d.current.querySelectorAll('button:not(:disabled), [href], input:not(:disabled), [tabindex]:not([tabindex="-1"])'));
|
|
299
|
+
if (!g.length) {
|
|
300
|
+
h.preventDefault();
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
const y = g[0], $ = g[g.length - 1];
|
|
304
|
+
h.shiftKey && document.activeElement === y ? (h.preventDefault(), $.focus()) : !h.shiftKey && document.activeElement === $ && (h.preventDefault(), y.focus());
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
return document.addEventListener("keydown", b), () => {
|
|
308
|
+
document.removeEventListener("keydown", b), document.body.style.overflow = v, m?.focus();
|
|
309
|
+
};
|
|
310
|
+
}, [t, r]), t ? /* @__PURE__ */ e("div", { className: "ui-drawer__backdrop", onMouseDown: (m) => {
|
|
311
|
+
s && m.target === m.currentTarget && r(!1);
|
|
312
|
+
}, children: /* @__PURE__ */ p("div", { ref: d, tabIndex: -1, role: "dialog", "aria-modal": "true", "aria-labelledby": f, className: `ui-drawer ui-drawer--${l}`, style: { width: c }, children: [
|
|
313
|
+
/* @__PURE__ */ p("header", { children: [
|
|
314
|
+
/* @__PURE__ */ e("h2", { id: f, children: a }),
|
|
315
|
+
/* @__PURE__ */ e("button", { type: "button", "aria-label": o ?? u("close"), onClick: () => r(!1), children: "×" })
|
|
316
|
+
] }),
|
|
317
|
+
/* @__PURE__ */ e("div", { className: "ui-drawer__body", children: n }),
|
|
318
|
+
i && /* @__PURE__ */ e("footer", { children: i })
|
|
319
|
+
] }) }) : null;
|
|
320
|
+
}
|
|
321
|
+
function de({ items: t, selectedKey: r, defaultSelectedKey: a, onSelect: n, mode: i = "vertical", ariaLabel: l, className: c = "" }) {
|
|
322
|
+
const { t: o } = k(), s = w([]), [u, f] = N(a), d = r ?? u, m = (b) => {
|
|
323
|
+
b.disabled || (r === void 0 && f(b.key), n?.(b.key));
|
|
324
|
+
}, v = (b, h) => {
|
|
325
|
+
const g = i === "horizontal" ? "ArrowRight" : "ArrowDown", y = i === "horizontal" ? "ArrowLeft" : "ArrowUp";
|
|
326
|
+
if (![g, y, "Home", "End"].includes(b.key)) return;
|
|
327
|
+
b.preventDefault();
|
|
328
|
+
let $ = b.key === "Home" ? 0 : b.key === "End" ? t.length - 1 : (h + (b.key === g ? 1 : -1) + t.length) % t.length;
|
|
329
|
+
for (; t[$]?.disabled && $ !== h; ) $ = ($ + (b.key === y ? -1 : 1) + t.length) % t.length;
|
|
330
|
+
s.current[$]?.focus();
|
|
331
|
+
};
|
|
332
|
+
return /* @__PURE__ */ e("div", { className: `ui-menu ui-menu--${i}${c ? ` ${c}` : ""}`, role: "menu", "aria-label": l ?? o("menu"), children: t.map((b, h) => {
|
|
333
|
+
const g = d === b.key;
|
|
334
|
+
return /* @__PURE__ */ p("button", { ref: (y) => {
|
|
335
|
+
s.current[h] = y;
|
|
336
|
+
}, type: "button", role: "menuitem", disabled: b.disabled, "aria-current": g ? "page" : void 0, className: `ui-menu__item${g ? " ui-menu__item--active" : ""}${b.danger ? " ui-menu__item--danger" : ""}`, onClick: () => m(b), onKeyDown: (y) => v(y, h), children: [
|
|
337
|
+
b.icon,
|
|
338
|
+
/* @__PURE__ */ e("span", { children: b.label })
|
|
339
|
+
] }, b.key);
|
|
340
|
+
}) });
|
|
341
|
+
}
|
|
342
|
+
function Fe({ trigger: t, items: r, open: a, defaultOpen: n = !1, onOpenChange: i, onSelect: l, placement: c = "bottom-start" }) {
|
|
343
|
+
const [o, s] = N(n), u = a ?? o, f = w(null), d = (v) => {
|
|
344
|
+
a === void 0 && s(v), i?.(v);
|
|
345
|
+
};
|
|
346
|
+
I(() => {
|
|
347
|
+
if (!u) return;
|
|
348
|
+
const v = (h) => {
|
|
349
|
+
f.current?.contains(h.target) || d(!1);
|
|
350
|
+
}, b = (h) => {
|
|
351
|
+
h.key === "Escape" && d(!1);
|
|
352
|
+
};
|
|
353
|
+
return document.addEventListener("mousedown", v), document.addEventListener("keydown", b), () => {
|
|
354
|
+
document.removeEventListener("mousedown", v), document.removeEventListener("keydown", b);
|
|
355
|
+
};
|
|
356
|
+
});
|
|
357
|
+
const m = U(t) ? F(t, { onClick: () => d(!u), "aria-haspopup": "menu", "aria-expanded": u }) : t;
|
|
358
|
+
return /* @__PURE__ */ p("div", { className: "ui-dropdown", ref: f, children: [
|
|
359
|
+
m,
|
|
360
|
+
u && /* @__PURE__ */ e("div", { className: `ui-dropdown__panel ui-dropdown__panel--${c}`, children: /* @__PURE__ */ e(de, { items: r, onSelect: (v) => {
|
|
361
|
+
l?.(v), d(!1);
|
|
362
|
+
} }) })
|
|
363
|
+
] });
|
|
364
|
+
}
|
|
365
|
+
function Z({ description: t, image: r, children: a, compact: n = !1, className: i = "" }) {
|
|
366
|
+
const { t: l } = k();
|
|
367
|
+
return /* @__PURE__ */ p("div", { className: `ui-empty${n ? " ui-empty--compact" : ""}${i ? ` ${i}` : ""}`, children: [
|
|
368
|
+
r ?? /* @__PURE__ */ e("span", { className: "ui-empty__image", "aria-hidden": "true", children: "◇" }),
|
|
369
|
+
/* @__PURE__ */ e("span", { children: t ?? l("noData") }),
|
|
370
|
+
a
|
|
371
|
+
] });
|
|
372
|
+
}
|
|
373
|
+
function Me({ children: t, vertical: r = !1, gap: a, align: n, justify: i, wrap: l, flex: c, className: o = "", style: s, ...u }) {
|
|
374
|
+
return /* @__PURE__ */ e("div", { className: `ui-flex${o ? ` ${o}` : ""}`, style: { flexDirection: r ? "column" : "row", gap: a, alignItems: n, justifyContent: i, flexWrap: l, flex: c, ...s }, ...u, children: t });
|
|
375
|
+
}
|
|
376
|
+
function Re({ children: t, gutter: r = 0, align: a, justify: n, className: i = "", style: l, ...c }) {
|
|
377
|
+
const o = te.map(t, (s) => U(s) ? F(s, { gutter: s.props.gutter ?? r }) : s);
|
|
378
|
+
return /* @__PURE__ */ e("div", { className: `ui-row${i ? ` ${i}` : ""}`, style: { marginInline: -r / 2, rowGap: r, alignItems: a, justifyContent: n, ...l }, ...c, children: o });
|
|
379
|
+
}
|
|
380
|
+
function je({ children: t, span: r = 24, offset: a = 0, gutter: n = 0, className: i = "", style: l, ...c }) {
|
|
381
|
+
return /* @__PURE__ */ e("div", { className: `ui-col${i ? ` ${i}` : ""}`, style: { width: `${r / 24 * 100}%`, marginInlineStart: `${a / 24 * 100}%`, paddingInline: n / 2, ...l }, ...c, children: t });
|
|
382
|
+
}
|
|
383
|
+
function B(t) {
|
|
384
|
+
return function({ className: a = "", ...n }) {
|
|
385
|
+
return /* @__PURE__ */ e("section", { className: `ui-layout__${t}${a ? ` ${a}` : ""}`, ...n });
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
function ze({ className: t = "", ...r }) {
|
|
389
|
+
return /* @__PURE__ */ e("div", { className: `ui-layout${t ? ` ${t}` : ""}`, ...r });
|
|
390
|
+
}
|
|
391
|
+
const He = B("header"), We = B("sider"), Ge = B("content"), Ue = B("footer");
|
|
392
|
+
function Xe({ current: t, total: r, pageSize: a = 10, onChange: n, siblingCount: i = 1, ariaLabel: l, className: c = "" }) {
|
|
393
|
+
const { t: o } = k(), s = Math.max(1, Math.ceil(r / a)), u = Array.from({ length: s }, (d, m) => m + 1).filter((d) => d === 1 || d === s || Math.abs(d - t) <= i), f = (d) => `${o("page")} ${d}${o("pageSuffix") ? ` ${o("pageSuffix")}` : ""}`;
|
|
394
|
+
return /* @__PURE__ */ p("nav", { "aria-label": l ?? o("pagination"), className: `ui-pagination${c ? ` ${c}` : ""}`, children: [
|
|
395
|
+
/* @__PURE__ */ e("button", { type: "button", disabled: t <= 1, "aria-label": o("previousPage"), onClick: () => n(t - 1), children: "‹" }),
|
|
396
|
+
u.map((d, m) => /* @__PURE__ */ p("span", { children: [
|
|
397
|
+
m > 0 && d - u[m - 1] > 1 && /* @__PURE__ */ e("span", { className: "ui-pagination__ellipsis", children: "…" }),
|
|
398
|
+
/* @__PURE__ */ e("button", { type: "button", "aria-current": d === t ? "page" : void 0, "aria-label": f(d), onClick: () => n(d), children: d })
|
|
399
|
+
] }, d)),
|
|
400
|
+
/* @__PURE__ */ e("button", { type: "button", disabled: t >= s, "aria-label": o("nextPage"), onClick: () => n(t + 1), children: "›" })
|
|
401
|
+
] });
|
|
402
|
+
}
|
|
403
|
+
function Ve({ percent: t, type: r = "line", status: a = "normal", showInfo: n = !0, label: i, className: l = "", ...c }) {
|
|
404
|
+
const { t: o } = k(), s = Math.min(100, Math.max(0, t)), u = i ?? o("progress");
|
|
405
|
+
if (r === "circle") {
|
|
406
|
+
const d = 2 * Math.PI * 42;
|
|
407
|
+
return /* @__PURE__ */ p("div", { className: `ui-progress ui-progress--circle ui-progress--${a}${l ? ` ${l}` : ""}`, role: "progressbar", "aria-label": u, "aria-valuenow": s, "aria-valuemin": 0, "aria-valuemax": 100, ...c, children: [
|
|
408
|
+
/* @__PURE__ */ p("svg", { viewBox: "0 0 100 100", children: [
|
|
409
|
+
/* @__PURE__ */ e("circle", { className: "ui-progress__trail", cx: "50", cy: "50", r: 42 }),
|
|
410
|
+
/* @__PURE__ */ e("circle", { className: "ui-progress__value", cx: "50", cy: "50", r: 42, strokeDasharray: d, strokeDashoffset: d * (1 - s / 100) })
|
|
411
|
+
] }),
|
|
412
|
+
n && /* @__PURE__ */ p("span", { children: [
|
|
413
|
+
s,
|
|
414
|
+
"%"
|
|
415
|
+
] })
|
|
416
|
+
] });
|
|
417
|
+
}
|
|
418
|
+
return /* @__PURE__ */ p("div", { className: `ui-progress ui-progress--line ui-progress--${a}${l ? ` ${l}` : ""}`, ...c, children: [
|
|
419
|
+
/* @__PURE__ */ e("div", { className: "ui-progress__track", role: "progressbar", "aria-label": u, "aria-valuenow": s, "aria-valuemin": 0, "aria-valuemax": 100, children: /* @__PURE__ */ e("span", { style: { width: `${s}%` } }) }),
|
|
420
|
+
n && /* @__PURE__ */ p("span", { children: [
|
|
421
|
+
s,
|
|
422
|
+
"%"
|
|
423
|
+
] })
|
|
424
|
+
] });
|
|
425
|
+
}
|
|
426
|
+
function qe({ status: t = "info", title: r, description: a, icon: n, actions: i, className: l = "" }) {
|
|
427
|
+
const c = { success: "✓", info: "i", warning: "!", error: "×" };
|
|
428
|
+
return /* @__PURE__ */ p("section", { className: `ui-result ui-result--${t}${l ? ` ${l}` : ""}`, children: [
|
|
429
|
+
/* @__PURE__ */ e("div", { className: "ui-result__icon", "aria-hidden": "true", children: n ?? c[t] }),
|
|
430
|
+
/* @__PURE__ */ e("h2", { children: r }),
|
|
431
|
+
a && /* @__PURE__ */ e("p", { children: a }),
|
|
432
|
+
i && /* @__PURE__ */ e("div", { className: "ui-result__actions", children: i })
|
|
433
|
+
] });
|
|
434
|
+
}
|
|
435
|
+
function Ze({ variant: t = "text", width: r, height: a, animated: n = !0, className: i = "", style: l, ...c }) {
|
|
436
|
+
return /* @__PURE__ */ e("span", { "aria-hidden": "true", className: `ui-skeleton ui-skeleton--${t}${n ? " ui-skeleton--animated" : ""}${i ? ` ${i}` : ""}`, style: { width: r, height: a, ...l }, ...c });
|
|
437
|
+
}
|
|
438
|
+
function Ye({ children: t, direction: r = "horizontal", size: a = "medium", wrap: n = !1, align: i = "center", className: l = "", style: c, ...o }) {
|
|
439
|
+
const s = typeof a == "number" ? a : { small: 8, medium: 16, large: 24 }[a];
|
|
440
|
+
return /* @__PURE__ */ e("div", { className: `ui-space ui-space--${r}${l ? ` ${l}` : ""}`, style: { gap: s, flexWrap: n ? "wrap" : "nowrap", alignItems: i, ...c }, ...o, children: t });
|
|
441
|
+
}
|
|
442
|
+
function Je({ items: t, current: r = 0, direction: a = "horizontal", onChange: n, ariaLabel: i, className: l = "" }) {
|
|
443
|
+
const { t: c } = k();
|
|
444
|
+
return /* @__PURE__ */ e("ol", { "aria-label": i ?? c("steps"), className: `ui-steps ui-steps--${a}${l ? ` ${l}` : ""}`, children: t.map((o, s) => {
|
|
445
|
+
const u = o.status ?? (s < r ? "finish" : s === r ? "process" : "wait");
|
|
446
|
+
return /* @__PURE__ */ e("li", { className: `ui-step ui-step--${u}`, "aria-current": s === r ? "step" : void 0, children: /* @__PURE__ */ p("button", { type: "button", disabled: !n || o.disabled, onClick: () => n?.(s), children: [
|
|
447
|
+
/* @__PURE__ */ e("span", { className: "ui-step__icon", children: u === "finish" ? "✓" : s + 1 }),
|
|
448
|
+
/* @__PURE__ */ p("span", { children: [
|
|
449
|
+
/* @__PURE__ */ e("strong", { children: o.title }),
|
|
450
|
+
o.description && /* @__PURE__ */ e("small", { children: o.description })
|
|
451
|
+
] })
|
|
452
|
+
] }) }, s);
|
|
453
|
+
}) });
|
|
454
|
+
}
|
|
455
|
+
function Oe({ columns: t, data: r, rowKey: a, caption: n, emptyText: i, className: l = "" }) {
|
|
456
|
+
const c = (o) => typeof a == "function" ? a(o) : o[a];
|
|
457
|
+
return /* @__PURE__ */ p("div", { className: `ui-table-wrap${l ? ` ${l}` : ""}`, children: [
|
|
458
|
+
/* @__PURE__ */ p("table", { className: "ui-table", children: [
|
|
459
|
+
n && /* @__PURE__ */ e("caption", { children: n }),
|
|
460
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: t.map((o) => /* @__PURE__ */ e("th", { scope: "col", style: { textAlign: o.align, width: o.width }, children: o.title }, o.key)) }) }),
|
|
461
|
+
/* @__PURE__ */ e("tbody", { children: r.map((o, s) => /* @__PURE__ */ e("tr", { children: t.map((u) => {
|
|
462
|
+
const f = u.dataIndex ? o[u.dataIndex] : void 0;
|
|
463
|
+
return /* @__PURE__ */ e("td", { style: { textAlign: u.align }, children: u.render ? u.render(f, o, s) : f }, u.key);
|
|
464
|
+
}) }, c(o))) })
|
|
465
|
+
] }),
|
|
466
|
+
r.length === 0 && /* @__PURE__ */ e(Z, { description: i, compact: !0 })
|
|
467
|
+
] });
|
|
468
|
+
}
|
|
469
|
+
function Qe({ items: t, activeKey: r, defaultActiveKey: a, onChange: n, orientation: i = "horizontal", ariaLabel: l, className: c = "" }) {
|
|
470
|
+
const { t: o } = k(), [s, u] = N(a ?? t.find((h) => !h.disabled)?.key), f = r ?? s, d = C(), m = (h) => {
|
|
471
|
+
r === void 0 && u(h), n?.(h);
|
|
472
|
+
}, v = (h, g) => {
|
|
473
|
+
const y = i === "horizontal" ? ["ArrowRight", "ArrowLeft"] : ["ArrowDown", "ArrowUp"];
|
|
474
|
+
if (!y.includes(h.key)) return;
|
|
475
|
+
h.preventDefault();
|
|
476
|
+
let $ = (g + (h.key === y[0] ? 1 : -1) + t.length) % t.length;
|
|
477
|
+
for (; t[$].disabled && $ !== g; ) $ = ($ + 1) % t.length;
|
|
478
|
+
m(t[$].key);
|
|
479
|
+
}, b = t.find((h) => h.key === f);
|
|
480
|
+
return /* @__PURE__ */ p("div", { className: `ui-tabs ui-tabs--${i}${c ? ` ${c}` : ""}`, children: [
|
|
481
|
+
/* @__PURE__ */ e("div", { role: "tablist", "aria-label": l ?? o("tabs"), "aria-orientation": i, className: "ui-tabs__list", children: t.map((h, g) => /* @__PURE__ */ e("button", { id: `${d}-${h.key}-tab`, type: "button", role: "tab", "aria-selected": f === h.key, "aria-controls": `${d}-${h.key}-panel`, tabIndex: f === h.key ? 0 : -1, disabled: h.disabled, onClick: () => m(h.key), onKeyDown: (y) => v(y, g), children: h.label }, h.key)) }),
|
|
482
|
+
b && /* @__PURE__ */ e("div", { role: "tabpanel", id: `${d}-${b.key}-panel`, "aria-labelledby": `${d}-${b.key}-tab`, className: "ui-tabs__panel", children: b.children })
|
|
483
|
+
] });
|
|
484
|
+
}
|
|
485
|
+
function et({ items: t, activeKey: r, onChange: a, ariaLabel: n = "Filter options", className: i = "" }) {
|
|
486
|
+
return /* @__PURE__ */ e("div", { className: `ui-filter-tabs${i ? ` ${i}` : ""}`, role: "group", "aria-label": n, children: t.map((l) => /* @__PURE__ */ e("button", { type: "button", "aria-pressed": r === l.id, disabled: l.disabled, onClick: () => a?.(l.id), children: l.label }, l.id)) });
|
|
487
|
+
}
|
|
488
|
+
function he({ level: t = 2, className: r = "", children: a, ...n }) {
|
|
489
|
+
const i = `h${t}`;
|
|
490
|
+
return /* @__PURE__ */ e(i, { className: `ui-title ui-title--${t}${r ? ` ${r}` : ""}`, ...n, children: a });
|
|
491
|
+
}
|
|
492
|
+
function tt({ children: t, tone: r = "default", strong: a, code: n, className: i = "", ...l }) {
|
|
493
|
+
return /* @__PURE__ */ e(n ? "code" : "span", { className: `ui-text ui-text--${r}${a ? " ui-text--strong" : ""}${n ? " ui-text--code" : ""}${i ? ` ${i}` : ""}`, ...l, children: t });
|
|
494
|
+
}
|
|
495
|
+
function Y({ className: t = "", ...r }) {
|
|
496
|
+
return /* @__PURE__ */ e("p", { className: `ui-paragraph${t ? ` ${t}` : ""}`, ...r });
|
|
497
|
+
}
|
|
498
|
+
function rt({ className: t = "", ...r }) {
|
|
499
|
+
return /* @__PURE__ */ e("a", { className: `ui-link${t ? ` ${t}` : ""}`, ...r });
|
|
500
|
+
}
|
|
501
|
+
function at({ eyebrow: t, title: r, description: a, className: n = "" }) {
|
|
502
|
+
return /* @__PURE__ */ p("div", { className: `ui-section-heading${n ? ` ${n}` : ""}`, children: [
|
|
503
|
+
/* @__PURE__ */ p("div", { children: [
|
|
504
|
+
/* @__PURE__ */ e("p", { className: "eyebrow", children: t }),
|
|
505
|
+
/* @__PURE__ */ e(he, { level: 2, children: r })
|
|
506
|
+
] }),
|
|
507
|
+
a ? /* @__PURE__ */ e(Y, { children: a }) : null
|
|
508
|
+
] });
|
|
509
|
+
}
|
|
510
|
+
function fe({
|
|
511
|
+
href: t,
|
|
512
|
+
children: r,
|
|
513
|
+
icon: a,
|
|
514
|
+
size: n = "medium",
|
|
515
|
+
variant: i = "primary",
|
|
516
|
+
className: l,
|
|
517
|
+
target: c,
|
|
518
|
+
rel: o
|
|
519
|
+
}) {
|
|
520
|
+
return /* @__PURE__ */ e("a", { href: t, target: c, rel: o, children: /* @__PURE__ */ p(ce, { size: n, variant: i, className: l, style: { columnGap: 10 }, children: [
|
|
521
|
+
a,
|
|
522
|
+
r
|
|
523
|
+
] }) });
|
|
524
|
+
}
|
|
525
|
+
function nt({
|
|
526
|
+
href: t,
|
|
527
|
+
children: r,
|
|
528
|
+
icon: a,
|
|
529
|
+
size: n = "large",
|
|
530
|
+
variant: i = "primary",
|
|
531
|
+
className: l,
|
|
532
|
+
target: c = "_blank",
|
|
533
|
+
rel: o = "noreferrer"
|
|
534
|
+
}) {
|
|
535
|
+
return /* @__PURE__ */ e(
|
|
536
|
+
fe,
|
|
537
|
+
{
|
|
538
|
+
href: t,
|
|
539
|
+
target: c,
|
|
540
|
+
rel: o,
|
|
541
|
+
size: n,
|
|
542
|
+
variant: i,
|
|
543
|
+
className: l,
|
|
544
|
+
icon: a,
|
|
545
|
+
children: r
|
|
546
|
+
}
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
function it({ title: t, description: r, media: a, className: n = "" }) {
|
|
550
|
+
const [i, l] = N(0), c = w(null), o = (s) => {
|
|
551
|
+
a.length !== 0 && l((u) => (u + s + a.length) % a.length);
|
|
552
|
+
};
|
|
553
|
+
return /* @__PURE__ */ p("article", { className: `event-carousel${n ? ` ${n}` : ""}`, children: [
|
|
554
|
+
/* @__PURE__ */ e("div", { className: "event-carousel-header", children: /* @__PURE__ */ e("strong", { children: t }) }),
|
|
555
|
+
/* @__PURE__ */ p("div", { className: "event-carousel-viewport", onTouchStart: (s) => {
|
|
556
|
+
c.current = s.changedTouches[0]?.clientX ?? null;
|
|
557
|
+
}, onTouchEnd: (s) => {
|
|
558
|
+
if (c.current === null) return;
|
|
559
|
+
const u = (s.changedTouches[0]?.clientX ?? 0) - c.current;
|
|
560
|
+
Math.abs(u) > 40 && o(u < 0 ? 1 : -1), c.current = null;
|
|
561
|
+
}, children: [
|
|
562
|
+
/* @__PURE__ */ e("div", { className: "event-carousel-track", style: { transform: `translateX(-${i * 100}%)` }, children: a.map((s, u) => /* @__PURE__ */ e("div", { className: "event-carousel-slide", children: s.type === "video" || s.src.endsWith(".mp4") ? /* @__PURE__ */ e("video", { src: s.src, "aria-label": s.alt ?? `${String(t)}, video`, autoPlay: !0, muted: !0, loop: !0, playsInline: !0, controls: !0, preload: "metadata" }) : /* @__PURE__ */ e("img", { src: s.src, alt: s.alt ?? `${String(t)}, photo ${u + 1}` }) }, s.src)) }),
|
|
563
|
+
/* @__PURE__ */ e("button", { className: "event-carousel-control event-carousel-control--prev", type: "button", "aria-label": "Previous photo", onClick: () => o(-1), children: "←" }),
|
|
564
|
+
/* @__PURE__ */ e("button", { className: "event-carousel-control event-carousel-control--next", type: "button", "aria-label": "Next photo", onClick: () => o(1), children: "→" })
|
|
565
|
+
] }),
|
|
566
|
+
r ? /* @__PURE__ */ e("div", { className: "event-carousel-footer", children: /* @__PURE__ */ e(Y, { children: r }) }) : null,
|
|
567
|
+
/* @__PURE__ */ e("div", { className: "event-carousel-dots", "aria-label": `${String(t)} photos`, children: a.map((s, u) => /* @__PURE__ */ e("button", { type: "button", "aria-label": `View photo ${u + 1}`, "aria-current": i === u, onClick: () => l(u) }, s.src)) })
|
|
568
|
+
] });
|
|
569
|
+
}
|
|
570
|
+
function lt({
|
|
571
|
+
size: t = 24,
|
|
572
|
+
title: r,
|
|
573
|
+
className: a,
|
|
574
|
+
...n
|
|
575
|
+
}) {
|
|
576
|
+
return /* @__PURE__ */ e(
|
|
577
|
+
"svg",
|
|
578
|
+
{
|
|
579
|
+
"aria-hidden": r ? void 0 : !0,
|
|
580
|
+
"aria-label": r,
|
|
581
|
+
className: a,
|
|
582
|
+
height: t,
|
|
583
|
+
role: r ? "img" : void 0,
|
|
584
|
+
viewBox: "0 0 48 48",
|
|
585
|
+
width: t,
|
|
586
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
587
|
+
...n,
|
|
588
|
+
children: /* @__PURE__ */ p("g", { transform: "translate(-700 -360)", children: [
|
|
589
|
+
/* @__PURE__ */ e(
|
|
590
|
+
"path",
|
|
591
|
+
{
|
|
592
|
+
fill: "#67C15E",
|
|
593
|
+
d: "M723.993033,360 C710.762252,360 700,370.765287 700,383.999801 C700,389.248451 701.692661,394.116025 704.570026,398.066947 L701.579605,406.983798 L710.804449,404.035539 C714.598605,406.546975 719.126434,408 724.006967,408 C737.237748,408 748,397.234315 748,384.000199 C748,370.765685 737.237748,360.000398 724.006967,360.000398 L723.993033,360.000398 L723.993033,360 Z"
|
|
594
|
+
}
|
|
595
|
+
),
|
|
596
|
+
/* @__PURE__ */ e(
|
|
597
|
+
"path",
|
|
598
|
+
{
|
|
599
|
+
fill: "#FFFFFF",
|
|
600
|
+
d: "M717.29285,372.190836 C716.827488,371.07628 716.474784,371.034071 715.769774,371.005401 C715.529728,370.991464 715.262214,370.977527 714.96564,370.977527 C714.04845,370.977527 713.089462,371.245514 712.511043,371.838033 C711.806033,372.557577 710.056843,374.23638 710.056843,377.679202 C710.056843,381.122023 712.567571,384.451756 712.905944,384.917648 C713.258648,385.382743 717.800808,392.55031 724.853297,395.471492 C730.368379,397.757149 732.00491,397.545307 733.260074,397.27732 C735.093658,396.882308 737.393002,395.527239 737.971421,393.891043 C738.54984,392.25405 738.54984,390.857171 738.380255,390.560912 C738.211068,390.264652 737.745308,390.095816 737.040298,389.742615 C736.335288,389.389811 732.90737,387.696673 732.25849,387.470894 C731.623543,387.231179 731.017259,387.315995 730.537963,387.99333 C729.860819,388.938653 729.198006,389.89831 728.661785,390.476494 C728.238619,390.928051 727.547144,390.984595 726.969123,390.744481 C726.193254,390.420348 724.021298,389.657798 721.340985,387.273388 C719.267356,385.42535 717.856938,383.125756 717.448104,382.434484 C717.038871,381.729275 717.405907,381.319529 717.729948,380.938852 C718.082653,380.501232 718.421026,380.191036 718.77373,379.781688 C719.126434,379.372738 719.323884,379.160897 719.549599,378.681068 C719.789645,378.215575 719.62006,377.735746 719.450874,377.382942 C719.281687,377.030139 717.871269,373.587317 717.29285,372.190836 Z"
|
|
601
|
+
}
|
|
602
|
+
)
|
|
603
|
+
] })
|
|
604
|
+
}
|
|
605
|
+
);
|
|
606
|
+
}
|
|
607
|
+
function ot({ children: t, color: r = "default", closable: a, onClose: n, closeLabel: i, className: l = "", ...c }) {
|
|
608
|
+
const { t: o } = k();
|
|
609
|
+
return /* @__PURE__ */ p("span", { className: `ui-tag ui-tag--${r}${l ? ` ${l}` : ""}`, ...c, children: [
|
|
610
|
+
t,
|
|
611
|
+
a && /* @__PURE__ */ e("button", { type: "button", "aria-label": i ?? o("close"), onClick: n, children: "×" })
|
|
612
|
+
] });
|
|
613
|
+
}
|
|
614
|
+
function st({ title: t, children: r, placement: a = "top", delay: n = 150 }) {
|
|
615
|
+
const [i, l] = N(!1), c = C(), o = w(void 0);
|
|
616
|
+
I(() => () => clearTimeout(o.current), []);
|
|
617
|
+
const s = () => {
|
|
618
|
+
clearTimeout(o.current), o.current = setTimeout(() => l(!0), n);
|
|
619
|
+
}, u = () => {
|
|
620
|
+
clearTimeout(o.current), l(!1);
|
|
621
|
+
};
|
|
622
|
+
return /* @__PURE__ */ p("span", { className: "ui-tooltip", onMouseEnter: s, onMouseLeave: u, onFocus: s, onBlur: u, onKeyDown: (f) => {
|
|
623
|
+
f.key === "Escape" && u();
|
|
624
|
+
}, children: [
|
|
625
|
+
F(r, { "aria-describedby": i ? c : void 0 }),
|
|
626
|
+
i && /* @__PURE__ */ e("span", { id: c, role: "tooltip", className: `ui-tooltip__bubble ui-tooltip__bubble--${a}`, children: t })
|
|
627
|
+
] });
|
|
628
|
+
}
|
|
629
|
+
const _ = ["var(--ui-chart-1)", "var(--ui-chart-2)", "var(--ui-chart-3)", "var(--ui-chart-4)", "var(--ui-chart-5)"];
|
|
630
|
+
function P({ loading: t, empty: r, height: a, label: n, className: i, children: l }) {
|
|
631
|
+
return /* @__PURE__ */ e("div", { className: `ui-chart${i ? ` ${i}` : ""}`, style: { height: a }, role: "img", "aria-label": n, children: t ? /* @__PURE__ */ e(ue, {}) : r ? /* @__PURE__ */ e(Z, { compact: !0 }) : l });
|
|
632
|
+
}
|
|
633
|
+
function T(t) {
|
|
634
|
+
return t ? (r) => t(r) : void 0;
|
|
635
|
+
}
|
|
636
|
+
function z({ kind: t, data: r, series: a, xKey: n, height: i = 320, loading: l, showGrid: c = !0, showLegend: o = !0, showTooltip: s = !0, ariaLabel: u, valueFormatter: f, barSize: d, className: m }) {
|
|
637
|
+
const { t: v } = k(), b = u ?? v("chart"), h = /* @__PURE__ */ p(J, { children: [
|
|
638
|
+
c && /* @__PURE__ */ e(M, { strokeDasharray: "3 3", stroke: "var(--ui-color-border)" }),
|
|
639
|
+
/* @__PURE__ */ e(R, { dataKey: n }),
|
|
640
|
+
/* @__PURE__ */ e(D, {}),
|
|
641
|
+
s && /* @__PURE__ */ e(K, { formatter: T(f) }),
|
|
642
|
+
o && /* @__PURE__ */ e(L, {})
|
|
643
|
+
] }), g = a.map((y, $) => {
|
|
644
|
+
const A = y.color ?? _[$ % _.length];
|
|
645
|
+
return t === "bar" ? /* @__PURE__ */ e(j, { dataKey: y.dataKey, name: y.name, fill: A, stackId: y.stackId, yAxisId: y.yAxisId, barSize: d, radius: [4, 4, 0, 0] }, y.dataKey) : t === "area" ? /* @__PURE__ */ e(le, { type: "monotone", dataKey: y.dataKey, name: y.name, stroke: A, fill: A, fillOpacity: 0.18 }, y.dataKey) : /* @__PURE__ */ e(V, { type: "monotone", dataKey: y.dataKey, name: y.name, stroke: A, strokeWidth: 2, dot: !1 }, y.dataKey);
|
|
646
|
+
});
|
|
647
|
+
return /* @__PURE__ */ e(P, { loading: l, empty: !r.length, height: i, label: b, className: m, children: /* @__PURE__ */ e(E, { width: "100%", height: "100%", children: t === "bar" ? /* @__PURE__ */ p(X, { data: r, children: [
|
|
648
|
+
h,
|
|
649
|
+
g
|
|
650
|
+
] }) : t === "area" ? /* @__PURE__ */ p(oe, { data: r, children: [
|
|
651
|
+
h,
|
|
652
|
+
g
|
|
653
|
+
] }) : /* @__PURE__ */ p(se, { data: r, children: [
|
|
654
|
+
h,
|
|
655
|
+
g
|
|
656
|
+
] }) }) });
|
|
657
|
+
}
|
|
658
|
+
function ct(t) {
|
|
659
|
+
return /* @__PURE__ */ e(z, { ...t, kind: "line" });
|
|
660
|
+
}
|
|
661
|
+
function H(t) {
|
|
662
|
+
return /* @__PURE__ */ e(z, { ...t, kind: "bar" });
|
|
663
|
+
}
|
|
664
|
+
function ut(t) {
|
|
665
|
+
return /* @__PURE__ */ e(z, { ...t, kind: "area" });
|
|
666
|
+
}
|
|
667
|
+
function dt(t) {
|
|
668
|
+
return /* @__PURE__ */ e(H, { ...t });
|
|
669
|
+
}
|
|
670
|
+
function ht(t) {
|
|
671
|
+
return /* @__PURE__ */ e(H, { ...t });
|
|
672
|
+
}
|
|
673
|
+
function ft({ series: t, ...r }) {
|
|
674
|
+
return /* @__PURE__ */ e(H, { ...r, series: t.map((a) => ({ ...a, stackId: a.stackId ?? "stack" })) });
|
|
675
|
+
}
|
|
676
|
+
function pt({ data: t, series: r, xKey: a, height: n = 320, loading: i, showGrid: l = !0, showLegend: c = !0, showTooltip: o = !0, ariaLabel: s, valueFormatter: u, barSize: f, className: d }) {
|
|
677
|
+
const { t: m } = k();
|
|
678
|
+
return /* @__PURE__ */ e(P, { loading: i, empty: !t.length, height: n, label: s ?? m("horizontalBarChart"), className: d, children: /* @__PURE__ */ e(E, { width: "100%", height: "100%", children: /* @__PURE__ */ p(X, { data: t, layout: "vertical", children: [
|
|
679
|
+
l && /* @__PURE__ */ e(M, { strokeDasharray: "3 3", stroke: "var(--ui-color-border)" }),
|
|
680
|
+
/* @__PURE__ */ e(R, { type: "number" }),
|
|
681
|
+
/* @__PURE__ */ e(D, { type: "category", dataKey: a, width: 80 }),
|
|
682
|
+
o && /* @__PURE__ */ e(K, { formatter: T(u) }),
|
|
683
|
+
c && /* @__PURE__ */ e(L, {}),
|
|
684
|
+
r.map((v, b) => /* @__PURE__ */ e(j, { dataKey: v.dataKey, name: v.name, stackId: v.stackId, fill: v.color ?? _[b % _.length], barSize: f, radius: [0, 4, 4, 0] }, v.dataKey))
|
|
685
|
+
] }) }) });
|
|
686
|
+
}
|
|
687
|
+
function pe({ data: t, barSeries: r, lineSeries: a, xKey: n, dualAxis: i = !1, height: l = 320, loading: c, showGrid: o = !0, showLegend: s = !0, showTooltip: u = !0, ariaLabel: f, valueFormatter: d, barSize: m, className: v }) {
|
|
688
|
+
const { t: b } = k();
|
|
689
|
+
return /* @__PURE__ */ e(P, { loading: c, empty: !t.length, height: l, label: f ?? b(i ? "dualAxisChart" : "combinationChart"), className: v, children: /* @__PURE__ */ e(E, { width: "100%", height: "100%", children: /* @__PURE__ */ p(ie, { data: t, children: [
|
|
690
|
+
o && /* @__PURE__ */ e(M, { strokeDasharray: "3 3", stroke: "var(--ui-color-border)" }),
|
|
691
|
+
/* @__PURE__ */ e(R, { dataKey: n }),
|
|
692
|
+
/* @__PURE__ */ e(D, { yAxisId: "left" }),
|
|
693
|
+
i && /* @__PURE__ */ e(D, { yAxisId: "right", orientation: "right" }),
|
|
694
|
+
u && /* @__PURE__ */ e(K, { formatter: T(d) }),
|
|
695
|
+
s && /* @__PURE__ */ e(L, {}),
|
|
696
|
+
r.map((h, g) => /* @__PURE__ */ e(j, { dataKey: h.dataKey, name: h.name, stackId: h.stackId ?? "stack", yAxisId: h.yAxisId ?? "left", fill: h.color ?? _[g % _.length], barSize: m }, h.dataKey)),
|
|
697
|
+
a.map((h, g) => /* @__PURE__ */ e(V, { dataKey: h.dataKey, name: h.name, yAxisId: h.yAxisId ?? (i ? "right" : "left"), stroke: h.color ?? _[(g + r.length) % _.length], strokeWidth: 2 }, h.dataKey))
|
|
698
|
+
] }) }) });
|
|
699
|
+
}
|
|
700
|
+
function bt(t) {
|
|
701
|
+
return /* @__PURE__ */ e(pe, { ...t, dualAxis: !0 });
|
|
702
|
+
}
|
|
703
|
+
function be({ data: t, nameKey: r, valueKey: a, height: n = 320, loading: i, donut: l = !1, colors: c = _, showLegend: o = !0, showTooltip: s = !0, ariaLabel: u, valueFormatter: f, className: d }) {
|
|
704
|
+
const { t: m } = k();
|
|
705
|
+
return /* @__PURE__ */ e(P, { loading: i, empty: !t.length, height: n, label: u ?? m(l ? "donutChart" : "pieChart"), className: d, children: /* @__PURE__ */ e(E, { width: "100%", height: "100%", children: /* @__PURE__ */ p(re, { children: [
|
|
706
|
+
s && /* @__PURE__ */ e(K, { formatter: T(f) }),
|
|
707
|
+
o && /* @__PURE__ */ e(L, {}),
|
|
708
|
+
/* @__PURE__ */ e(ae, { data: t, dataKey: a, nameKey: r, innerRadius: l ? "55%" : 0, outerRadius: "78%", paddingAngle: 2, children: t.map((v, b) => /* @__PURE__ */ e(ne, { fill: c[b % c.length] }, b)) })
|
|
709
|
+
] }) }) });
|
|
710
|
+
}
|
|
711
|
+
function mt(t) {
|
|
712
|
+
return /* @__PURE__ */ e(be, { ...t, donut: !0 });
|
|
713
|
+
}
|
|
714
|
+
export {
|
|
715
|
+
fe as ActionLinkButton,
|
|
716
|
+
$e as Alert,
|
|
717
|
+
ut as AreaChart,
|
|
718
|
+
Be as Avatar,
|
|
719
|
+
ke as Badge,
|
|
720
|
+
H as BarChart,
|
|
721
|
+
Pe as Breadcrumb,
|
|
722
|
+
ce as Button,
|
|
723
|
+
_e as Card,
|
|
724
|
+
we as CardBody,
|
|
725
|
+
Ne as CardFooter,
|
|
726
|
+
Ce as CardHeader,
|
|
727
|
+
xe as Checkbox,
|
|
728
|
+
je as Col,
|
|
729
|
+
Ge as Content,
|
|
730
|
+
Ie as Dialog,
|
|
731
|
+
Ae as Divider,
|
|
732
|
+
mt as DonutChart,
|
|
733
|
+
Te as Drawer,
|
|
734
|
+
Fe as Dropdown,
|
|
735
|
+
bt as DualAxisChart,
|
|
736
|
+
Z as Empty,
|
|
737
|
+
it as EventCarousel,
|
|
738
|
+
et as FilterTabs,
|
|
739
|
+
Me as Flex,
|
|
740
|
+
Ue as Footer,
|
|
741
|
+
ht as GroupedBarChart,
|
|
742
|
+
He as Header,
|
|
743
|
+
pt as HorizontalBarChart,
|
|
744
|
+
De as Input,
|
|
745
|
+
ze as Layout,
|
|
746
|
+
ct as LineChart,
|
|
747
|
+
rt as Link,
|
|
748
|
+
de as Menu,
|
|
749
|
+
Xe as Pagination,
|
|
750
|
+
Y as Paragraph,
|
|
751
|
+
be as PieChart,
|
|
752
|
+
Ve as Progress,
|
|
753
|
+
Se as RadioGroup,
|
|
754
|
+
qe as Result,
|
|
755
|
+
Re as Row,
|
|
756
|
+
at as SectionHeading,
|
|
757
|
+
Ee as Select,
|
|
758
|
+
We as Sider,
|
|
759
|
+
Ze as Skeleton,
|
|
760
|
+
Ye as Space,
|
|
761
|
+
ue as Spinner,
|
|
762
|
+
ft as StackedBarChart,
|
|
763
|
+
pe as StackedBarLineChart,
|
|
764
|
+
Je as Steps,
|
|
765
|
+
Ke as Switch,
|
|
766
|
+
Oe as Table,
|
|
767
|
+
Qe as Tabs,
|
|
768
|
+
ot as Tag,
|
|
769
|
+
tt as Text,
|
|
770
|
+
Le as Textarea,
|
|
771
|
+
he as Title,
|
|
772
|
+
st as Tooltip,
|
|
773
|
+
ge as UIProvider,
|
|
774
|
+
dt as VerticalBarChart,
|
|
775
|
+
nt as WhatsAppButton,
|
|
776
|
+
lt as WhatsAppIcon,
|
|
777
|
+
k as useUI
|
|
778
|
+
};
|