@aciole/acyon 0.0.2 → 0.0.3
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/acyon.cjs.js +2 -2
- package/dist/acyon.cjs.js.map +1 -1
- package/dist/acyon.css +1 -1
- package/dist/acyon.es.js +978 -826
- package/dist/acyon.es.js.map +1 -1
- package/dist/components/Alert/Alert.d.ts +4 -0
- package/dist/components/Alert/types.d.ts +8 -0
- package/dist/components/Avatar/types.d.ts +1 -1
- package/dist/components/Badge/types.d.ts +1 -1
- package/dist/components/Button/types.d.ts +2 -2
- package/dist/components/Container/types.d.ts +1 -1
- package/dist/components/Drawer/types.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +7 -0
- package/dist/components/Dropdown/types.d.ts +22 -0
- package/dist/components/IconButton/types.d.ts +1 -1
- package/dist/components/Image/types.d.ts +2 -2
- package/dist/components/Input/types.d.ts +2 -2
- package/dist/components/Loader/types.d.ts +1 -1
- package/dist/components/Modal/types.d.ts +1 -1
- package/dist/components/Progress/types.d.ts +1 -1
- package/dist/components/Select/types.d.ts +1 -1
- package/dist/components/Skeleton/types.d.ts +2 -4
- package/dist/components/Switch/types.d.ts +1 -1
- package/dist/components/Tabs/types.d.ts +1 -1
- package/dist/components/Tag/types.d.ts +1 -1
- package/dist/components/TextArea/types.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/utils/styleTokens.d.ts +3 -3
- package/package.json +1 -1
package/dist/acyon.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as m, jsx as n, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { createPortal as
|
|
1
|
+
import { jsxs as m, jsx as n, Fragment as X } from "react/jsx-runtime";
|
|
2
|
+
import _, { useId as oe, useRef as R, useState as z, useEffect as E, useMemo as G, useCallback as H, useContext as Z, createContext as Q } from "react";
|
|
3
|
+
import { createPortal as J } from "react-dom";
|
|
4
4
|
function p(...e) {
|
|
5
5
|
const t = [];
|
|
6
6
|
for (const o of e)
|
|
@@ -16,71 +16,69 @@ function p(...e) {
|
|
|
16
16
|
}
|
|
17
17
|
return t.join(" ");
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Tn(e) {
|
|
20
20
|
return function(o = {}) {
|
|
21
21
|
const r = o.variant ?? e.defaultVariants?.variant, a = o.size ?? e.defaultVariants?.size, i = [];
|
|
22
22
|
if (e.base && i.push(e.base), r && e.variants?.[r] && i.push(e.variants[r]), a && e.sizes?.[a] && i.push(e.sizes[a]), e.compound)
|
|
23
23
|
for (const c of e.compound) {
|
|
24
|
-
const s = c.variant === void 0 || c.variant === r,
|
|
25
|
-
s &&
|
|
24
|
+
const s = c.variant === void 0 || c.variant === r, u = c.size === void 0 || c.size === a;
|
|
25
|
+
s && u && i.push(c.className);
|
|
26
26
|
}
|
|
27
27
|
return o.className && i.push(o.className), i.filter(Boolean).join(" ");
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
const
|
|
31
|
-
function
|
|
32
|
-
return e ?
|
|
30
|
+
const je = ["primary", "neutral", "success", "warning", "error"];
|
|
31
|
+
function ee(e) {
|
|
32
|
+
return e ? je.includes(e) : !1;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function We(e) {
|
|
35
35
|
if (e)
|
|
36
|
-
return
|
|
36
|
+
return ee(e) ? e : void 0;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function F(e) {
|
|
39
39
|
if (e)
|
|
40
|
-
return
|
|
40
|
+
return ee(e) ? e === "neutral" ? "var(--border-main)" : e === "error" ? "var(--color-danger)" : `var(--color-${e})` : e;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function ze(e) {
|
|
43
43
|
if (!e || e === "default") return "var(--text-main)";
|
|
44
44
|
if (e === "disabled") return "var(--text-muted)";
|
|
45
|
-
if (e === "subtle") return "var(--text-subtle)";
|
|
46
|
-
if (e === "muted") return "var(--text-muted)";
|
|
47
45
|
if (e === "inverse") return "var(--text-inverse)";
|
|
48
|
-
const t =
|
|
49
|
-
return t ? `var(--color-${t})` : e;
|
|
46
|
+
const t = We(e);
|
|
47
|
+
return t ? t === "neutral" ? "var(--text-muted)" : t === "error" ? "var(--color-danger)" : `var(--color-${t})` : e;
|
|
50
48
|
}
|
|
51
|
-
function ae({ size: e = "
|
|
52
|
-
const a = t ? { "--loader-color":
|
|
49
|
+
function ae({ size: e = "medium", color: t, className: o, label: r = "Loading..." }) {
|
|
50
|
+
const a = t ? { "--loader-color": F(t) } : {};
|
|
53
51
|
return /* @__PURE__ */ m("span", { role: "status", "aria-label": r, className: p("loader", `loader--${e}`, o), style: a, children: [
|
|
54
52
|
/* @__PURE__ */ n("span", { className: "loader__ring" }),
|
|
55
53
|
/* @__PURE__ */ n("span", { className: "sr-only", children: r })
|
|
56
54
|
] });
|
|
57
55
|
}
|
|
58
|
-
const
|
|
56
|
+
const ne = _.forwardRef(
|
|
59
57
|
({
|
|
60
58
|
variant: e = "solid",
|
|
61
|
-
size: t = "
|
|
59
|
+
size: t = "medium",
|
|
62
60
|
loading: o = !1,
|
|
63
61
|
disabled: r,
|
|
64
62
|
icon: a,
|
|
65
63
|
iconRight: i = !1,
|
|
66
64
|
full: c = !1,
|
|
67
65
|
color: s = "primary",
|
|
68
|
-
children:
|
|
66
|
+
children: u,
|
|
69
67
|
className: d,
|
|
70
|
-
style:
|
|
71
|
-
...
|
|
68
|
+
style: h,
|
|
69
|
+
...k
|
|
72
70
|
}, v) => {
|
|
73
|
-
const
|
|
74
|
-
...
|
|
75
|
-
"--btn-base":
|
|
76
|
-
"--btn-bg":
|
|
71
|
+
const b = r || o, g = ee(s) ? s : void 0, f = !s || g ? void 0 : F(s), x = f ? {
|
|
72
|
+
...h,
|
|
73
|
+
"--btn-base": f,
|
|
74
|
+
"--btn-bg": f,
|
|
77
75
|
"--btn-text": "var(--text-inverse)"
|
|
78
|
-
} :
|
|
76
|
+
} : h;
|
|
79
77
|
return /* @__PURE__ */ m(
|
|
80
78
|
"button",
|
|
81
79
|
{
|
|
82
80
|
ref: v,
|
|
83
|
-
disabled:
|
|
81
|
+
disabled: b,
|
|
84
82
|
"aria-busy": o,
|
|
85
83
|
className: p(
|
|
86
84
|
"btn",
|
|
@@ -92,27 +90,27 @@ const X = L.forwardRef(
|
|
|
92
90
|
d
|
|
93
91
|
),
|
|
94
92
|
style: x,
|
|
95
|
-
...
|
|
93
|
+
...k,
|
|
96
94
|
children: [
|
|
97
95
|
o && /* @__PURE__ */ n(
|
|
98
96
|
ae,
|
|
99
97
|
{
|
|
100
|
-
size: t === "
|
|
98
|
+
size: t === "extraSmall" || t === "small" ? "extraSmall" : t === "medium" ? "small" : "medium",
|
|
101
99
|
className: "btn__spinner"
|
|
102
100
|
}
|
|
103
101
|
),
|
|
104
102
|
!o && a && !i && /* @__PURE__ */ n("span", { className: "btn__icon btn__icon--left", children: a }),
|
|
105
|
-
|
|
103
|
+
u && /* @__PURE__ */ n("span", { className: "btn__label", children: u }),
|
|
106
104
|
!o && a && i && /* @__PURE__ */ n("span", { className: "btn__icon btn__icon--right", children: a })
|
|
107
105
|
]
|
|
108
106
|
}
|
|
109
107
|
);
|
|
110
108
|
}
|
|
111
109
|
);
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
({ icon: e, variant: t = "solid", size: o = "
|
|
115
|
-
|
|
110
|
+
ne.displayName = "Button";
|
|
111
|
+
const Y = _.forwardRef(
|
|
112
|
+
({ icon: e, variant: t = "solid", size: o = "medium", loading: r = !1, disabled: a, className: i, style: c, label: s, ...u }, d) => /* @__PURE__ */ n(
|
|
113
|
+
ne,
|
|
116
114
|
{
|
|
117
115
|
ref: d,
|
|
118
116
|
className: p("icon-btn", `icon-btn--size-${o}`, i),
|
|
@@ -122,17 +120,17 @@ const F = L.forwardRef(
|
|
|
122
120
|
size: o,
|
|
123
121
|
disabled: a || r,
|
|
124
122
|
style: c,
|
|
125
|
-
...
|
|
123
|
+
...u,
|
|
126
124
|
children: r ? /* @__PURE__ */ n(ae, {}) : /* @__PURE__ */ n("span", { className: "icon-btn__content", children: e })
|
|
127
125
|
}
|
|
128
126
|
)
|
|
129
127
|
);
|
|
130
|
-
|
|
131
|
-
function
|
|
128
|
+
Y.displayName = "IconButton";
|
|
129
|
+
function re(e) {
|
|
132
130
|
return e ? e.toLowerCase().replace(new RegExp("^\\p{L}", "u"), (t) => t.toUpperCase()) : "";
|
|
133
131
|
}
|
|
134
|
-
const
|
|
135
|
-
size: e = "
|
|
132
|
+
const T = ({
|
|
133
|
+
size: e = "medium",
|
|
136
134
|
color: t = "default",
|
|
137
135
|
weight: o = "normal",
|
|
138
136
|
as: r,
|
|
@@ -141,9 +139,9 @@ const $ = ({
|
|
|
141
139
|
style: c,
|
|
142
140
|
...s
|
|
143
141
|
}) => {
|
|
144
|
-
const
|
|
142
|
+
const u = r || "p", d = ee(t) || ["default", "inverse"].includes(t) ? `text--color-${t}` : void 0;
|
|
145
143
|
return /* @__PURE__ */ n(
|
|
146
|
-
|
|
144
|
+
u,
|
|
147
145
|
{
|
|
148
146
|
className: p(
|
|
149
147
|
"text",
|
|
@@ -152,12 +150,12 @@ const $ = ({
|
|
|
152
150
|
`text--weight-${o}`,
|
|
153
151
|
a
|
|
154
152
|
),
|
|
155
|
-
style: d ? c : { ...c, color:
|
|
153
|
+
style: d ? c : { ...c, color: ze(t) },
|
|
156
154
|
...s,
|
|
157
155
|
children: i
|
|
158
156
|
}
|
|
159
157
|
);
|
|
160
|
-
},
|
|
158
|
+
}, q = ({
|
|
161
159
|
children: e,
|
|
162
160
|
direction: t = "row",
|
|
163
161
|
align: o = "stretch",
|
|
@@ -166,10 +164,10 @@ const $ = ({
|
|
|
166
164
|
gap: i = "0",
|
|
167
165
|
className: c,
|
|
168
166
|
style: s,
|
|
169
|
-
as:
|
|
167
|
+
as: u,
|
|
170
168
|
...d
|
|
171
169
|
}) => /* @__PURE__ */ n(
|
|
172
|
-
|
|
170
|
+
u || "div",
|
|
173
171
|
{
|
|
174
172
|
className: p(
|
|
175
173
|
"flex",
|
|
@@ -184,7 +182,7 @@ const $ = ({
|
|
|
184
182
|
...d,
|
|
185
183
|
children: e
|
|
186
184
|
}
|
|
187
|
-
),
|
|
185
|
+
), O = ({
|
|
188
186
|
label: e,
|
|
189
187
|
error: t,
|
|
190
188
|
hint: o,
|
|
@@ -192,13 +190,13 @@ const $ = ({
|
|
|
192
190
|
full: a = !1,
|
|
193
191
|
className: i,
|
|
194
192
|
htmlFor: c
|
|
195
|
-
}) => /* @__PURE__ */ m(
|
|
196
|
-
e && /* @__PURE__ */ n(
|
|
193
|
+
}) => /* @__PURE__ */ m(q, { direction: "column", gap: "1", className: p("form-field-root", a && "form-field--full", i), children: [
|
|
194
|
+
e && /* @__PURE__ */ n(T, { size: "small", weight: "medium", as: "label", htmlFor: c, className: "form-field-label", children: re(e) }),
|
|
197
195
|
r,
|
|
198
|
-
t && /* @__PURE__ */ n(
|
|
199
|
-
!t && o && /* @__PURE__ */ n(
|
|
196
|
+
t && /* @__PURE__ */ n(T, { as: "span", color: "error", size: "small", className: "form-field-message", role: "alert", children: t }),
|
|
197
|
+
!t && o && /* @__PURE__ */ n(T, { as: "span", color: "neutral", size: "small", className: "form-field-message", children: o })
|
|
200
198
|
] });
|
|
201
|
-
function
|
|
199
|
+
function Se({
|
|
202
200
|
size: e = 20,
|
|
203
201
|
width: t,
|
|
204
202
|
height: o,
|
|
@@ -207,9 +205,9 @@ function We({
|
|
|
207
205
|
stroke: i = "currentColor",
|
|
208
206
|
strokeWidth: c = 2,
|
|
209
207
|
strokeLinecap: s = "round",
|
|
210
|
-
strokeLinejoin:
|
|
208
|
+
strokeLinejoin: u = "round",
|
|
211
209
|
children: d,
|
|
212
|
-
...
|
|
210
|
+
...h
|
|
213
211
|
}) {
|
|
214
212
|
return /* @__PURE__ */ n(
|
|
215
213
|
"svg",
|
|
@@ -221,14 +219,14 @@ function We({
|
|
|
221
219
|
stroke: i,
|
|
222
220
|
strokeWidth: c,
|
|
223
221
|
strokeLinecap: s,
|
|
224
|
-
strokeLinejoin:
|
|
222
|
+
strokeLinejoin: u,
|
|
225
223
|
"aria-hidden": "true",
|
|
226
|
-
...
|
|
224
|
+
...h,
|
|
227
225
|
children: d
|
|
228
226
|
}
|
|
229
227
|
);
|
|
230
228
|
}
|
|
231
|
-
const
|
|
229
|
+
const $e = {
|
|
232
230
|
activity: {
|
|
233
231
|
viewBox: "0 0 24 24",
|
|
234
232
|
fill: "none",
|
|
@@ -1570,10 +1568,10 @@ const ze = {
|
|
|
1570
1568
|
body: '<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />'
|
|
1571
1569
|
}
|
|
1572
1570
|
};
|
|
1573
|
-
function
|
|
1574
|
-
const o =
|
|
1571
|
+
function M({ name: e, ...t }) {
|
|
1572
|
+
const o = $e[e];
|
|
1575
1573
|
return /* @__PURE__ */ n(
|
|
1576
|
-
|
|
1574
|
+
Se,
|
|
1577
1575
|
{
|
|
1578
1576
|
viewBox: o.viewBox,
|
|
1579
1577
|
fill: o.fill,
|
|
@@ -1588,42 +1586,42 @@ function _({ name: e, ...t }) {
|
|
|
1588
1586
|
}
|
|
1589
1587
|
function l(e) {
|
|
1590
1588
|
return function(o) {
|
|
1591
|
-
return /* @__PURE__ */ n(
|
|
1589
|
+
return /* @__PURE__ */ n(M, { name: e, ...o });
|
|
1592
1590
|
};
|
|
1593
1591
|
}
|
|
1594
|
-
const
|
|
1595
|
-
({ label: e, error: t,
|
|
1596
|
-
const v = d ?? (e ? `input-${
|
|
1597
|
-
if (
|
|
1598
|
-
|
|
1592
|
+
const Dn = l("activity"), An = l("alert-circle"), En = l("alert-triangle"), Hn = l("align-horizontal"), Vn = l("align-justify"), Rn = l("app-window"), Fn = l("arrow-down"), On = l("arrow-left"), Pn = l("arrow-right"), Yn = l("arrow-up"), Un = l("badge"), qn = l("battery"), Gn = l("bell"), Kn = l("bluetooth"), Xn = l("book"), Zn = l("box"), Qn = l("calendar"), Jn = l("camera"), et = l("check-square"), nt = l("check"), tt = l("chevron-down"), ot = l("chevron-left"), rt = l("chevron-right"), it = l("chevron-up"), at = l("chevron"), st = l("circle-dot"), lt = l("clock"), ct = l("close"), dt = l("cloud"), ut = l("code"), ht = l("component"), pt = l("copy"), mt = l("credit-card"), kt = l("database"), ft = l("download"), vt = l("edit"), yt = l("external-link"), bt = l("eye-off"), gt = l("eye"), xt = l("file-text"), wt = l("file"), _t = l("filter"), Lt = l("folder"), Nt = l("form-input"), Ct = l("ghost"), Mt = l("gift"), It = l("git-commit"), Bt = l("github"), jt = l("grid"), Wt = l("grip"), zt = l("heading1"), St = l("heart"), $t = l("help-circle"), Tt = l("history"), Dt = l("home"), At = l("image"), Et = l("info"), Ht = l("lab"), Vt = l("laptop"), Rt = l("layout-template"), Ft = l("layout"), Ot = l("link"), Pt = l("linkedin"), Yt = l("list-checks"), Ut = l("list-collapse"), qt = l("list-filter"), Gt = l("list"), Kt = l("loader2"), Xt = l("lock"), Zt = l("log-in"), Qt = l("log-out"), Jt = l("mail"), eo = l("map-pin"), no = l("menu"), to = l("message-circle"), oo = l("message-square"), ro = l("mic"), io = l("milestone"), ao = l("minus"), so = l("monitor"), lo = l("moon"), co = l("more-horizontal"), uo = l("mouse-pointer"), ho = l("music"), po = l("panel-left"), mo = l("panel-top"), ko = l("panel"), fo = l("phone"), vo = l("plus"), yo = l("rectangle-horizontal"), bo = l("refresh"), go = l("rocket"), xo = l("ruler"), wo = l("search"), _o = l("server"), Lo = l("settings"), No = l("share"), Co = l("shield"), Mo = l("shopping-cart"), Io = l("sliders-horizontal"), Bo = l("smartphone"), jo = l("spark"), Wo = l("sparkles"), zo = l("spinner"), So = l("square"), $o = l("star"), To = l("sun"), Do = l("table"), Ao = l("tablet"), Eo = l("tag"), Ho = l("text-cursor"), Vo = l("theme-dark"), Ro = l("theme-light"), Fo = l("toggle-right"), Oo = l("trash"), Po = l("type"), Yo = l("unlock"), Uo = l("upload-cloud"), qo = l("upload"), Go = l("user-circle"), Ko = l("user"), Xo = l("video"), Zo = l("warning"), Qo = l("wifi"), Jo = l("x"), er = l("zap"), se = _.forwardRef(
|
|
1593
|
+
({ label: e, error: t, hint: o, prefix: r, suffix: a, clearable: i = !1, size: c = "medium", full: s = !1, className: u, id: d, ...h }, k) => {
|
|
1594
|
+
const v = d ?? (e ? `input-${re(e)}` : void 0), b = _.useRef(null), [, g] = _.useState(0), f = h.value !== void 0, x = String(f ? h.value ?? "" : h.defaultValue ?? b.current?.value ?? "").length > 0, y = (N) => {
|
|
1595
|
+
if (b.current = N, typeof k == "function") {
|
|
1596
|
+
k(N);
|
|
1599
1597
|
return;
|
|
1600
1598
|
}
|
|
1601
|
-
|
|
1602
|
-
},
|
|
1603
|
-
const N =
|
|
1604
|
-
if (!N ||
|
|
1599
|
+
k && (k.current = N);
|
|
1600
|
+
}, I = () => {
|
|
1601
|
+
const N = b.current;
|
|
1602
|
+
if (!N || h.disabled || h.readOnly)
|
|
1605
1603
|
return;
|
|
1606
1604
|
Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set?.call(N, ""), N.dispatchEvent(new Event("input", { bubbles: !0 })), N.dispatchEvent(new Event("change", { bubbles: !0 })), g((w) => w + 1), N.focus();
|
|
1607
|
-
},
|
|
1608
|
-
|
|
1605
|
+
}, L = (N) => {
|
|
1606
|
+
h.onInput?.(N), f || g(($) => $ + 1);
|
|
1609
1607
|
}, j = i && x ? /* @__PURE__ */ n(
|
|
1610
|
-
|
|
1608
|
+
Y,
|
|
1611
1609
|
{
|
|
1612
|
-
icon: /* @__PURE__ */ n(
|
|
1610
|
+
icon: /* @__PURE__ */ n(M, { name: "close", size: 12 }),
|
|
1613
1611
|
"aria-label": "Limpar campo",
|
|
1614
1612
|
variant: "ghost",
|
|
1615
|
-
size: "
|
|
1616
|
-
onClick:
|
|
1613
|
+
size: "small",
|
|
1614
|
+
onClick: I,
|
|
1617
1615
|
tabIndex: -1,
|
|
1618
1616
|
className: "input-field__clear"
|
|
1619
1617
|
}
|
|
1620
1618
|
) : a;
|
|
1621
|
-
return /* @__PURE__ */ n(
|
|
1619
|
+
return /* @__PURE__ */ n(O, { label: e, error: t, hint: o, full: s, htmlFor: v, className: u, children: /* @__PURE__ */ m("div", { className: p("input-field", `input-field--${c}`, t && "input-field--error", h.disabled && "input-field--disabled"), children: [
|
|
1622
1620
|
r && /* @__PURE__ */ n("span", { className: "input-field__adornment input-field__adornment--prefix", children: r }),
|
|
1623
1621
|
/* @__PURE__ */ n(
|
|
1624
1622
|
"input",
|
|
1625
1623
|
{
|
|
1626
|
-
ref:
|
|
1624
|
+
ref: y,
|
|
1627
1625
|
id: v,
|
|
1628
1626
|
className: p(
|
|
1629
1627
|
"input-field__input",
|
|
@@ -1631,9 +1629,9 @@ const jn = l("activity"), Wn = l("alert-circle"), zn = l("alert-triangle"), $n =
|
|
|
1631
1629
|
!!j && "input-field__input--with-suffix"
|
|
1632
1630
|
),
|
|
1633
1631
|
"aria-invalid": !!t,
|
|
1634
|
-
"aria-describedby": t ? `${v}-error` : o ? `${v}-
|
|
1635
|
-
...
|
|
1636
|
-
onInput:
|
|
1632
|
+
"aria-describedby": t ? `${v}-error` : o ? `${v}-hint` : void 0,
|
|
1633
|
+
...h,
|
|
1634
|
+
onInput: L
|
|
1637
1635
|
}
|
|
1638
1636
|
),
|
|
1639
1637
|
j && /* @__PURE__ */ n("span", { className: "input-field__adornment input-field__adornment--suffix", children: j })
|
|
@@ -1641,36 +1639,36 @@ const jn = l("activity"), Wn = l("alert-circle"), zn = l("alert-triangle"), $n =
|
|
|
1641
1639
|
}
|
|
1642
1640
|
);
|
|
1643
1641
|
se.displayName = "Input";
|
|
1644
|
-
const
|
|
1645
|
-
({ label: e, error: t,
|
|
1646
|
-
const
|
|
1647
|
-
return /* @__PURE__ */ n(
|
|
1642
|
+
const Te = _.forwardRef(
|
|
1643
|
+
({ label: e, error: t, hint: o, full: r = !1, resize: a = "vertical", className: i, id: c, rows: s = 4, style: u, ...d }, h) => {
|
|
1644
|
+
const k = c ?? (e ? `textarea-${re(e)}` : void 0);
|
|
1645
|
+
return /* @__PURE__ */ n(O, { label: e, error: t, hint: o, full: r, htmlFor: k, className: i, children: /* @__PURE__ */ n(
|
|
1648
1646
|
"textarea",
|
|
1649
1647
|
{
|
|
1650
|
-
ref:
|
|
1651
|
-
id:
|
|
1648
|
+
ref: h,
|
|
1649
|
+
id: k,
|
|
1652
1650
|
rows: s,
|
|
1653
1651
|
className: p(
|
|
1654
1652
|
"textarea",
|
|
1655
1653
|
t && "textarea--error"
|
|
1656
1654
|
),
|
|
1657
1655
|
"aria-invalid": !!t,
|
|
1658
|
-
"aria-describedby": t ? `${
|
|
1659
|
-
style: { resize: a, ...
|
|
1656
|
+
"aria-describedby": t ? `${k}-error` : o ? `${k}-hint` : void 0,
|
|
1657
|
+
style: { resize: a, ...u ?? {} },
|
|
1660
1658
|
...d
|
|
1661
1659
|
}
|
|
1662
1660
|
) });
|
|
1663
1661
|
}
|
|
1664
1662
|
);
|
|
1665
|
-
|
|
1666
|
-
const
|
|
1663
|
+
Te.displayName = "TextArea";
|
|
1664
|
+
const De = _.forwardRef(
|
|
1667
1665
|
({ onSearch: e, loading: t = !1, onChange: o, ...r }, a) => /* @__PURE__ */ n(
|
|
1668
1666
|
se,
|
|
1669
1667
|
{
|
|
1670
1668
|
ref: a,
|
|
1671
1669
|
type: "search",
|
|
1672
1670
|
clearable: !0,
|
|
1673
|
-
prefix: t ? /* @__PURE__ */ n(ae, { size: "
|
|
1671
|
+
prefix: t ? /* @__PURE__ */ n(ae, { size: "extraSmall" }) : /* @__PURE__ */ n(M, { name: "search", size: 16 }),
|
|
1674
1672
|
onChange: (c) => {
|
|
1675
1673
|
o?.(c), e?.(c.target.value);
|
|
1676
1674
|
},
|
|
@@ -1678,73 +1676,73 @@ const Se = L.forwardRef(
|
|
|
1678
1676
|
}
|
|
1679
1677
|
)
|
|
1680
1678
|
);
|
|
1681
|
-
|
|
1682
|
-
const
|
|
1683
|
-
function
|
|
1679
|
+
De.displayName = "Search";
|
|
1680
|
+
const Ae = ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"];
|
|
1681
|
+
function ie(e) {
|
|
1684
1682
|
if (!e) return null;
|
|
1685
1683
|
const [t, o, r] = e.split("-").map(Number);
|
|
1686
1684
|
return !t || !o || !r ? null : new Date(t, o - 1, r);
|
|
1687
1685
|
}
|
|
1688
|
-
function
|
|
1686
|
+
function Ee(e) {
|
|
1689
1687
|
if (!e) return "";
|
|
1690
1688
|
const t = String(e.getDate()).padStart(2, "0"), o = String(e.getMonth() + 1).padStart(2, "0"), r = e.getFullYear();
|
|
1691
1689
|
return `${t}/${o}/${r}`;
|
|
1692
1690
|
}
|
|
1693
|
-
function
|
|
1691
|
+
function ue(e) {
|
|
1694
1692
|
if (!e) return "";
|
|
1695
1693
|
const t = String(e.getDate()).padStart(2, "0"), o = String(e.getMonth() + 1).padStart(2, "0");
|
|
1696
1694
|
return `${e.getFullYear()}-${o}-${t}`;
|
|
1697
1695
|
}
|
|
1698
|
-
function
|
|
1696
|
+
function He(e, t) {
|
|
1699
1697
|
return !e || !t ? !1 : e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
1700
1698
|
}
|
|
1701
|
-
function
|
|
1699
|
+
function Ve(e) {
|
|
1702
1700
|
const t = new Date(e.getFullYear(), e.getMonth(), 1), o = new Date(e.getFullYear(), e.getMonth() + 1, 0), r = t.getDay(), a = o.getDate(), i = [];
|
|
1703
1701
|
for (let s = r - 1; s >= 0; s -= 1) {
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1702
|
+
const u = new Date(t);
|
|
1703
|
+
u.setDate(t.getDate() - (s + 1)), i.push({ date: u, outside: !0 });
|
|
1706
1704
|
}
|
|
1707
1705
|
for (let s = 1; s <= a; s += 1)
|
|
1708
1706
|
i.push({ date: new Date(e.getFullYear(), e.getMonth(), s), outside: !1 });
|
|
1709
1707
|
const c = i.length <= 35 ? 35 : 42;
|
|
1710
1708
|
for (; i.length < c; ) {
|
|
1711
|
-
const s = i[i.length - 1]?.date ?? o,
|
|
1712
|
-
|
|
1709
|
+
const s = i[i.length - 1]?.date ?? o, u = new Date(s);
|
|
1710
|
+
u.setDate(s.getDate() + 1), i.push({ date: u, outside: !0 });
|
|
1713
1711
|
}
|
|
1714
1712
|
return i;
|
|
1715
1713
|
}
|
|
1716
|
-
const
|
|
1717
|
-
({ label: e, error: t,
|
|
1718
|
-
const
|
|
1719
|
-
|
|
1720
|
-
const
|
|
1721
|
-
|
|
1722
|
-
}, [N, c]),
|
|
1714
|
+
const Re = _.forwardRef(
|
|
1715
|
+
({ label: e, error: t, hint: o, full: r = !1, className: a, id: i, value: c, defaultValue: s, onChange: u, placeholder: d = "dd/mm/aaaa", disabled: h, size: k, prefix: v, suffix: b, clearable: g, ...f }, x) => {
|
|
1716
|
+
const y = i ?? (e ? `datepicker-${re(e)}` : void 0), I = _.useRef(null), L = _.useMemo(() => ue(/* @__PURE__ */ new Date()), []), j = _.useMemo(() => ie(c ?? s ?? L), [s, L, c]), [N, $] = _.useState(s ?? L), [w, S] = _.useState(!1), C = ie(c ?? N), [V, A] = _.useState(j ?? /* @__PURE__ */ new Date()), U = c !== void 0;
|
|
1717
|
+
_.useEffect(() => {
|
|
1718
|
+
const W = ie(c ?? N);
|
|
1719
|
+
W && A(W);
|
|
1720
|
+
}, [N, c]), _.useEffect(() => {
|
|
1723
1721
|
if (!w) return;
|
|
1724
|
-
const
|
|
1725
|
-
|
|
1722
|
+
const W = (P) => {
|
|
1723
|
+
I.current && !I.current.contains(P.target) && S(!1);
|
|
1726
1724
|
};
|
|
1727
|
-
return document.addEventListener("mousedown",
|
|
1725
|
+
return document.addEventListener("mousedown", W), () => document.removeEventListener("mousedown", W);
|
|
1728
1726
|
}, [w]);
|
|
1729
|
-
const
|
|
1730
|
-
|
|
1731
|
-
const
|
|
1732
|
-
target: { value:
|
|
1733
|
-
currentTarget: { value:
|
|
1727
|
+
const B = (W) => {
|
|
1728
|
+
U || $(W);
|
|
1729
|
+
const P = {
|
|
1730
|
+
target: { value: W, id: y, name: f.name },
|
|
1731
|
+
currentTarget: { value: W, id: y, name: f.name }
|
|
1734
1732
|
};
|
|
1735
|
-
|
|
1736
|
-
},
|
|
1737
|
-
const
|
|
1738
|
-
|
|
1739
|
-
},
|
|
1740
|
-
|
|
1741
|
-
},
|
|
1742
|
-
|
|
1743
|
-
},
|
|
1733
|
+
u?.(P);
|
|
1734
|
+
}, D = (W) => {
|
|
1735
|
+
const P = ue(W);
|
|
1736
|
+
B(P), A(W);
|
|
1737
|
+
}, Ne = () => {
|
|
1738
|
+
B("");
|
|
1739
|
+
}, Ce = () => {
|
|
1740
|
+
S(!1);
|
|
1741
|
+
}, Me = V.toLocaleDateString("pt-BR", {
|
|
1744
1742
|
month: "long",
|
|
1745
1743
|
year: "numeric"
|
|
1746
|
-
}),
|
|
1747
|
-
return /* @__PURE__ */ n(
|
|
1744
|
+
}), Ie = Ve(V);
|
|
1745
|
+
return /* @__PURE__ */ n(O, { label: e, error: t, hint: o, full: r, htmlFor: y, className: a, children: /* @__PURE__ */ m("div", { ref: I, className: "date-picker", children: [
|
|
1748
1746
|
/* @__PURE__ */ m(
|
|
1749
1747
|
"div",
|
|
1750
1748
|
{
|
|
@@ -1752,22 +1750,22 @@ const Ve = L.forwardRef(
|
|
|
1752
1750
|
"date-picker__field",
|
|
1753
1751
|
w && "date-picker__field--open",
|
|
1754
1752
|
t && "date-picker__field--error",
|
|
1755
|
-
|
|
1753
|
+
h && "date-picker__field--disabled"
|
|
1756
1754
|
),
|
|
1757
1755
|
children: [
|
|
1758
1756
|
/* @__PURE__ */ n(
|
|
1759
1757
|
"input",
|
|
1760
1758
|
{
|
|
1761
|
-
...
|
|
1759
|
+
...f,
|
|
1762
1760
|
ref: x,
|
|
1763
|
-
id:
|
|
1761
|
+
id: y,
|
|
1764
1762
|
type: "text",
|
|
1765
|
-
value:
|
|
1763
|
+
value: Ee(C),
|
|
1766
1764
|
placeholder: d,
|
|
1767
1765
|
readOnly: !0,
|
|
1768
|
-
disabled:
|
|
1766
|
+
disabled: h,
|
|
1769
1767
|
className: "date-picker__input",
|
|
1770
|
-
onClick: () => !
|
|
1768
|
+
onClick: () => !h && S(!0)
|
|
1771
1769
|
}
|
|
1772
1770
|
),
|
|
1773
1771
|
/* @__PURE__ */ n(
|
|
@@ -1775,10 +1773,10 @@ const Ve = L.forwardRef(
|
|
|
1775
1773
|
{
|
|
1776
1774
|
type: "button",
|
|
1777
1775
|
className: "date-picker__toggle",
|
|
1778
|
-
onClick: () => !
|
|
1776
|
+
onClick: () => !h && S((W) => !W),
|
|
1779
1777
|
"aria-label": "Abrir calendario",
|
|
1780
|
-
disabled:
|
|
1781
|
-
children: /* @__PURE__ */ n(
|
|
1778
|
+
disabled: h,
|
|
1779
|
+
children: /* @__PURE__ */ n(M, { name: "calendar", size: 18 })
|
|
1782
1780
|
}
|
|
1783
1781
|
)
|
|
1784
1782
|
]
|
|
@@ -1791,51 +1789,51 @@ const Ve = L.forwardRef(
|
|
|
1791
1789
|
{
|
|
1792
1790
|
type: "button",
|
|
1793
1791
|
className: "date-picker__nav",
|
|
1794
|
-
onClick: () =>
|
|
1792
|
+
onClick: () => A((W) => new Date(W.getFullYear(), W.getMonth() - 1, 1)),
|
|
1795
1793
|
"aria-label": "Mes anterior",
|
|
1796
|
-
children: /* @__PURE__ */ n(
|
|
1794
|
+
children: /* @__PURE__ */ n(M, { name: "chevron-left", size: 16 })
|
|
1797
1795
|
}
|
|
1798
1796
|
),
|
|
1799
|
-
/* @__PURE__ */ n("span", { className: "date-picker__month", children:
|
|
1797
|
+
/* @__PURE__ */ n("span", { className: "date-picker__month", children: Me }),
|
|
1800
1798
|
/* @__PURE__ */ n(
|
|
1801
1799
|
"button",
|
|
1802
1800
|
{
|
|
1803
1801
|
type: "button",
|
|
1804
1802
|
className: "date-picker__nav",
|
|
1805
|
-
onClick: () =>
|
|
1803
|
+
onClick: () => A((W) => new Date(W.getFullYear(), W.getMonth() + 1, 1)),
|
|
1806
1804
|
"aria-label": "Proximo mes",
|
|
1807
|
-
children: /* @__PURE__ */ n(
|
|
1805
|
+
children: /* @__PURE__ */ n(M, { name: "chevron-right", size: 16 })
|
|
1808
1806
|
}
|
|
1809
1807
|
)
|
|
1810
1808
|
] }),
|
|
1811
|
-
/* @__PURE__ */ n("div", { className: "date-picker__weekdays", children:
|
|
1812
|
-
/* @__PURE__ */ n("div", { className: "date-picker__grid", children:
|
|
1813
|
-
const
|
|
1809
|
+
/* @__PURE__ */ n("div", { className: "date-picker__weekdays", children: Ae.map((W) => /* @__PURE__ */ n("span", { className: "date-picker__weekday", children: W }, W)) }),
|
|
1810
|
+
/* @__PURE__ */ n("div", { className: "date-picker__grid", children: Ie.map(({ date: W, outside: P }) => {
|
|
1811
|
+
const Be = He(W, C);
|
|
1814
1812
|
return /* @__PURE__ */ n(
|
|
1815
1813
|
"button",
|
|
1816
1814
|
{
|
|
1817
1815
|
type: "button",
|
|
1818
1816
|
className: p(
|
|
1819
1817
|
"date-picker__day",
|
|
1820
|
-
|
|
1821
|
-
|
|
1818
|
+
P && "date-picker__day--outside",
|
|
1819
|
+
Be && "date-picker__day--selected"
|
|
1822
1820
|
),
|
|
1823
|
-
onClick: () =>
|
|
1824
|
-
children:
|
|
1821
|
+
onClick: () => D(W),
|
|
1822
|
+
children: W.getDate()
|
|
1825
1823
|
},
|
|
1826
|
-
|
|
1824
|
+
W.toISOString()
|
|
1827
1825
|
);
|
|
1828
1826
|
}) }),
|
|
1829
1827
|
/* @__PURE__ */ m("div", { className: "date-picker__footer", children: [
|
|
1830
|
-
/* @__PURE__ */ n(
|
|
1831
|
-
/* @__PURE__ */ n(
|
|
1828
|
+
/* @__PURE__ */ n(ne, { variant: "ghost", onClick: Ne, children: "Limpar" }),
|
|
1829
|
+
/* @__PURE__ */ n(ne, { onClick: Ce, children: "Concluido" })
|
|
1832
1830
|
] })
|
|
1833
1831
|
] }) : null
|
|
1834
1832
|
] }) });
|
|
1835
1833
|
}
|
|
1836
1834
|
);
|
|
1837
|
-
|
|
1838
|
-
const
|
|
1835
|
+
Re.displayName = "DatePicker";
|
|
1836
|
+
const Fe = _.forwardRef(
|
|
1839
1837
|
({
|
|
1840
1838
|
options: e,
|
|
1841
1839
|
value: t,
|
|
@@ -1844,101 +1842,101 @@ const Ee = L.forwardRef(
|
|
|
1844
1842
|
label: a,
|
|
1845
1843
|
error: i,
|
|
1846
1844
|
supportText: c,
|
|
1847
|
-
size: s = "
|
|
1848
|
-
placeholder:
|
|
1845
|
+
size: s = "medium",
|
|
1846
|
+
placeholder: u = "Select...",
|
|
1849
1847
|
full: d = !1,
|
|
1850
|
-
disabled:
|
|
1851
|
-
searchable:
|
|
1848
|
+
disabled: h = !1,
|
|
1849
|
+
searchable: k = !1,
|
|
1852
1850
|
searchPlaceholder: v = "Search...",
|
|
1853
|
-
className:
|
|
1851
|
+
className: b,
|
|
1854
1852
|
...g
|
|
1855
|
-
},
|
|
1856
|
-
const x =
|
|
1857
|
-
|
|
1858
|
-
if (!
|
|
1859
|
-
|
|
1853
|
+
}, f) => {
|
|
1854
|
+
const x = oe(), y = R(null), I = R(null), [L, j] = z(!1), [N, $] = z(""), [w, S] = z(o ?? ""), C = t ?? w;
|
|
1855
|
+
E(() => {
|
|
1856
|
+
if (!L) {
|
|
1857
|
+
$("");
|
|
1860
1858
|
return;
|
|
1861
1859
|
}
|
|
1862
|
-
|
|
1863
|
-
}, [
|
|
1864
|
-
const
|
|
1865
|
-
|
|
1860
|
+
k && I.current?.focus();
|
|
1861
|
+
}, [L, k]), E(() => {
|
|
1862
|
+
const B = (D) => {
|
|
1863
|
+
y.current && !y.current.contains(D.target) && j(!1);
|
|
1866
1864
|
};
|
|
1867
|
-
return document.addEventListener("mousedown",
|
|
1865
|
+
return document.addEventListener("mousedown", B), () => document.removeEventListener("mousedown", B);
|
|
1868
1866
|
}, []);
|
|
1869
|
-
const
|
|
1870
|
-
|
|
1867
|
+
const V = e.find((B) => B.value === C), A = G(() => !k || !N ? e : e.filter((B) => (B.searchValue ?? (typeof B.label == "string" ? B.label : B.value)).toLowerCase().includes(N.toLowerCase())), [e, k, N]), U = (B, D) => {
|
|
1868
|
+
D || (t === void 0 && S(B), r?.(B), j(!1));
|
|
1871
1869
|
};
|
|
1872
|
-
return /* @__PURE__ */ n(
|
|
1870
|
+
return /* @__PURE__ */ n(O, { label: a, error: i, hint: c, full: d, className: b, htmlFor: x, children: /* @__PURE__ */ m("div", { ref: y, className: p("select", d && "select--full"), children: [
|
|
1873
1871
|
/* @__PURE__ */ m(
|
|
1874
1872
|
"div",
|
|
1875
1873
|
{
|
|
1876
|
-
ref:
|
|
1874
|
+
ref: f,
|
|
1877
1875
|
id: x,
|
|
1878
1876
|
role: "combobox",
|
|
1879
|
-
"aria-expanded":
|
|
1877
|
+
"aria-expanded": L,
|
|
1880
1878
|
"aria-controls": `${x}-listbox`,
|
|
1881
1879
|
"aria-haspopup": "listbox",
|
|
1882
|
-
tabIndex:
|
|
1880
|
+
tabIndex: h ? -1 : 0,
|
|
1883
1881
|
className: p(
|
|
1884
1882
|
"select__trigger",
|
|
1885
1883
|
`select__trigger--${s}`,
|
|
1886
|
-
|
|
1884
|
+
L && "select__trigger--open",
|
|
1887
1885
|
i && "select__trigger--error",
|
|
1888
|
-
|
|
1886
|
+
h && "select__trigger--disabled"
|
|
1889
1887
|
),
|
|
1890
|
-
onClick: () => !
|
|
1891
|
-
onKeyDown: (
|
|
1892
|
-
|
|
1888
|
+
onClick: () => !h && j((B) => !B),
|
|
1889
|
+
onKeyDown: (B) => {
|
|
1890
|
+
h || ((B.key === "Enter" || B.key === " ") && (B.preventDefault(), j((D) => !D)), B.key === "Escape" && j(!1));
|
|
1893
1891
|
},
|
|
1894
1892
|
...g,
|
|
1895
1893
|
children: [
|
|
1896
|
-
/* @__PURE__ */ n("span", { className: p("select__value", !
|
|
1897
|
-
/* @__PURE__ */ n("span", { className: "select__icon", children: /* @__PURE__ */ n(
|
|
1894
|
+
/* @__PURE__ */ n("span", { className: p("select__value", !V && "select__value--placeholder"), children: V?.label ?? u }),
|
|
1895
|
+
/* @__PURE__ */ n("span", { className: "select__icon", children: /* @__PURE__ */ n(M, { name: "chevron-down", size: 16 }) })
|
|
1898
1896
|
]
|
|
1899
1897
|
}
|
|
1900
1898
|
),
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
/* @__PURE__ */ n("span", { className: "select__search-icon", children: /* @__PURE__ */ n(
|
|
1899
|
+
L && /* @__PURE__ */ m("div", { className: "select__menu", children: [
|
|
1900
|
+
k && /* @__PURE__ */ m("div", { className: "select__search", children: [
|
|
1901
|
+
/* @__PURE__ */ n("span", { className: "select__search-icon", children: /* @__PURE__ */ n(M, { name: "search", size: 14 }) }),
|
|
1904
1902
|
/* @__PURE__ */ n(
|
|
1905
1903
|
"input",
|
|
1906
1904
|
{
|
|
1907
|
-
ref:
|
|
1905
|
+
ref: I,
|
|
1908
1906
|
className: "select__search-input",
|
|
1909
1907
|
value: N,
|
|
1910
1908
|
placeholder: v,
|
|
1911
|
-
onChange: (
|
|
1909
|
+
onChange: (B) => $(B.target.value)
|
|
1912
1910
|
}
|
|
1913
1911
|
)
|
|
1914
1912
|
] }),
|
|
1915
|
-
/* @__PURE__ */ n("ul", { id: `${x}-listbox`, className: "select__list", role: "listbox", children:
|
|
1916
|
-
const
|
|
1913
|
+
/* @__PURE__ */ n("ul", { id: `${x}-listbox`, className: "select__list", role: "listbox", children: A.length > 0 ? A.map((B) => {
|
|
1914
|
+
const D = B.value === C;
|
|
1917
1915
|
return /* @__PURE__ */ m(
|
|
1918
1916
|
"li",
|
|
1919
1917
|
{
|
|
1920
1918
|
role: "option",
|
|
1921
|
-
"aria-selected":
|
|
1919
|
+
"aria-selected": D,
|
|
1922
1920
|
className: p(
|
|
1923
1921
|
"select__option",
|
|
1924
|
-
|
|
1925
|
-
|
|
1922
|
+
D && "select__option--selected",
|
|
1923
|
+
B.disabled && "select__option--disabled"
|
|
1926
1924
|
),
|
|
1927
|
-
onClick: () =>
|
|
1925
|
+
onClick: () => U(B.value, B.disabled),
|
|
1928
1926
|
children: [
|
|
1929
|
-
/* @__PURE__ */ n("span", { children:
|
|
1930
|
-
|
|
1927
|
+
/* @__PURE__ */ n("span", { children: B.label }),
|
|
1928
|
+
D && /* @__PURE__ */ n("span", { className: "select__option-check", children: /* @__PURE__ */ n(M, { name: "check", size: 14 }) })
|
|
1931
1929
|
]
|
|
1932
1930
|
},
|
|
1933
|
-
|
|
1931
|
+
B.value
|
|
1934
1932
|
);
|
|
1935
1933
|
}) : /* @__PURE__ */ n("li", { className: "select__empty", children: "No results found" }) })
|
|
1936
1934
|
] })
|
|
1937
1935
|
] }) });
|
|
1938
1936
|
}
|
|
1939
1937
|
);
|
|
1940
|
-
|
|
1941
|
-
const
|
|
1938
|
+
Fe.displayName = "Select";
|
|
1939
|
+
const Oe = _.forwardRef(
|
|
1942
1940
|
({
|
|
1943
1941
|
options: e,
|
|
1944
1942
|
value: t,
|
|
@@ -1948,54 +1946,54 @@ const Re = L.forwardRef(
|
|
|
1948
1946
|
error: i,
|
|
1949
1947
|
supportText: c,
|
|
1950
1948
|
placeholder: s = "Select options...",
|
|
1951
|
-
full:
|
|
1949
|
+
full: u = !1,
|
|
1952
1950
|
disabled: d = !1,
|
|
1953
|
-
className:
|
|
1954
|
-
...
|
|
1951
|
+
className: h,
|
|
1952
|
+
...k
|
|
1955
1953
|
}, v) => {
|
|
1956
|
-
const
|
|
1957
|
-
|
|
1958
|
-
const w = (
|
|
1959
|
-
g.current && !g.current.contains(
|
|
1954
|
+
const b = oe(), g = R(null), [f, x] = z(!1), [y, I] = z(o), L = t ?? y;
|
|
1955
|
+
E(() => {
|
|
1956
|
+
const w = (S) => {
|
|
1957
|
+
g.current && !g.current.contains(S.target) && x(!1);
|
|
1960
1958
|
};
|
|
1961
1959
|
return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
|
|
1962
1960
|
}, []);
|
|
1963
1961
|
const j = G(
|
|
1964
|
-
() => e.filter((w) =>
|
|
1965
|
-
[e,
|
|
1962
|
+
() => e.filter((w) => L.includes(w.value)),
|
|
1963
|
+
[e, L]
|
|
1966
1964
|
), N = (w) => {
|
|
1967
|
-
t === void 0 &&
|
|
1968
|
-
},
|
|
1969
|
-
if (!
|
|
1970
|
-
if (
|
|
1971
|
-
N(
|
|
1965
|
+
t === void 0 && I(w), r?.(w);
|
|
1966
|
+
}, $ = (w, S) => {
|
|
1967
|
+
if (!S) {
|
|
1968
|
+
if (L.includes(w)) {
|
|
1969
|
+
N(L.filter((C) => C !== w));
|
|
1972
1970
|
return;
|
|
1973
1971
|
}
|
|
1974
|
-
N([...
|
|
1972
|
+
N([...L, w]);
|
|
1975
1973
|
}
|
|
1976
1974
|
};
|
|
1977
|
-
return /* @__PURE__ */ n(
|
|
1975
|
+
return /* @__PURE__ */ n(O, { label: a, error: i, hint: c, full: u, className: h, htmlFor: b, children: /* @__PURE__ */ m("div", { ref: g, className: p("multiselect", u && "multiselect--full"), children: [
|
|
1978
1976
|
/* @__PURE__ */ m(
|
|
1979
1977
|
"div",
|
|
1980
1978
|
{
|
|
1981
1979
|
ref: v,
|
|
1982
|
-
id:
|
|
1980
|
+
id: b,
|
|
1983
1981
|
role: "combobox",
|
|
1984
|
-
"aria-expanded":
|
|
1985
|
-
"aria-controls": `${
|
|
1982
|
+
"aria-expanded": f,
|
|
1983
|
+
"aria-controls": `${b}-listbox`,
|
|
1986
1984
|
"aria-haspopup": "listbox",
|
|
1987
1985
|
tabIndex: d ? -1 : 0,
|
|
1988
1986
|
className: p(
|
|
1989
1987
|
"multiselect__trigger",
|
|
1990
|
-
|
|
1988
|
+
f && "multiselect__trigger--open",
|
|
1991
1989
|
i && "multiselect__trigger--error",
|
|
1992
1990
|
d && "multiselect__trigger--disabled"
|
|
1993
1991
|
),
|
|
1994
1992
|
onClick: () => !d && x((w) => !w),
|
|
1995
1993
|
onKeyDown: (w) => {
|
|
1996
|
-
d || ((w.key === "Enter" || w.key === " ") && (w.preventDefault(), x((
|
|
1994
|
+
d || ((w.key === "Enter" || w.key === " ") && (w.preventDefault(), x((S) => !S)), w.key === "Escape" && x(!1));
|
|
1997
1995
|
},
|
|
1998
|
-
...
|
|
1996
|
+
...k,
|
|
1999
1997
|
children: [
|
|
2000
1998
|
/* @__PURE__ */ n("div", { className: "multiselect__values", children: j.length > 0 ? j.map((w) => /* @__PURE__ */ m("span", { className: "multiselect__tag", children: [
|
|
2001
1999
|
/* @__PURE__ */ n("span", { className: "multiselect__tag-label", children: w.label }),
|
|
@@ -2004,33 +2002,33 @@ const Re = L.forwardRef(
|
|
|
2004
2002
|
{
|
|
2005
2003
|
type: "button",
|
|
2006
2004
|
className: "multiselect__tag-remove",
|
|
2007
|
-
onClick: (
|
|
2008
|
-
|
|
2005
|
+
onClick: (S) => {
|
|
2006
|
+
S.stopPropagation(), $(w.value);
|
|
2009
2007
|
},
|
|
2010
2008
|
"aria-label": `Remove ${w.label}`,
|
|
2011
|
-
children: /* @__PURE__ */ n(
|
|
2009
|
+
children: /* @__PURE__ */ n(M, { name: "close", size: 12 })
|
|
2012
2010
|
}
|
|
2013
2011
|
)
|
|
2014
2012
|
] }, w.value)) : /* @__PURE__ */ n("span", { className: "multiselect__placeholder", children: s }) }),
|
|
2015
|
-
/* @__PURE__ */ n("span", { className: "multiselect__icon", children: /* @__PURE__ */ n(
|
|
2013
|
+
/* @__PURE__ */ n("span", { className: "multiselect__icon", children: /* @__PURE__ */ n(M, { name: "chevron-down", size: 16 }) })
|
|
2016
2014
|
]
|
|
2017
2015
|
}
|
|
2018
2016
|
),
|
|
2019
|
-
|
|
2020
|
-
const
|
|
2017
|
+
f && /* @__PURE__ */ n("ul", { id: `${b}-listbox`, className: "multiselect__menu", role: "listbox", "aria-multiselectable": "true", children: e.length > 0 ? e.map((w) => {
|
|
2018
|
+
const S = L.includes(w.value);
|
|
2021
2019
|
return /* @__PURE__ */ m(
|
|
2022
2020
|
"li",
|
|
2023
2021
|
{
|
|
2024
2022
|
role: "option",
|
|
2025
|
-
"aria-selected":
|
|
2023
|
+
"aria-selected": S,
|
|
2026
2024
|
className: p(
|
|
2027
2025
|
"multiselect__option",
|
|
2028
|
-
|
|
2026
|
+
S && "multiselect__option--selected",
|
|
2029
2027
|
w.disabled && "multiselect__option--disabled"
|
|
2030
2028
|
),
|
|
2031
|
-
onClick: () =>
|
|
2029
|
+
onClick: () => $(w.value, w.disabled),
|
|
2032
2030
|
children: [
|
|
2033
|
-
/* @__PURE__ */ n("span", { className: "multiselect__checkbox", children:
|
|
2031
|
+
/* @__PURE__ */ n("span", { className: "multiselect__checkbox", children: S ? /* @__PURE__ */ n(M, { name: "check", size: 12 }) : null }),
|
|
2034
2032
|
/* @__PURE__ */ n("span", { children: w.label })
|
|
2035
2033
|
]
|
|
2036
2034
|
},
|
|
@@ -2040,41 +2038,183 @@ const Re = L.forwardRef(
|
|
|
2040
2038
|
] }) });
|
|
2041
2039
|
}
|
|
2042
2040
|
);
|
|
2043
|
-
|
|
2044
|
-
|
|
2041
|
+
Oe.displayName = "MultiSelect";
|
|
2042
|
+
const pe = Q(null);
|
|
2043
|
+
function Pe(e, t) {
|
|
2044
|
+
if (e) {
|
|
2045
|
+
if (typeof e == "function") {
|
|
2046
|
+
e(t);
|
|
2047
|
+
return;
|
|
2048
|
+
}
|
|
2049
|
+
e.current = t;
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
function Ye(e, t, o, r) {
|
|
2053
|
+
const a = t.startsWith("bottom") ? e.bottom + o : e.top - o, i = t.endsWith("end") ? e.right : e.left;
|
|
2054
|
+
return {
|
|
2055
|
+
top: a,
|
|
2056
|
+
left: i,
|
|
2057
|
+
minWidth: r ? e.width : void 0,
|
|
2058
|
+
transform: t === "bottom-end" ? "translateX(-100%)" : t === "top-start" ? "translateY(-100%)" : t === "top-end" ? "translate(-100%, -100%)" : void 0
|
|
2059
|
+
};
|
|
2060
|
+
}
|
|
2061
|
+
function Ue({
|
|
2062
|
+
children: e,
|
|
2063
|
+
content: t,
|
|
2064
|
+
open: o,
|
|
2065
|
+
defaultOpen: r = !1,
|
|
2066
|
+
onOpenChange: a,
|
|
2067
|
+
placement: i = "bottom-start",
|
|
2068
|
+
offset: c = 8,
|
|
2069
|
+
disabled: s = !1,
|
|
2070
|
+
matchTriggerWidth: u = !1,
|
|
2071
|
+
closeOnClickOutside: d = !0,
|
|
2072
|
+
className: h,
|
|
2073
|
+
...k
|
|
2074
|
+
}) {
|
|
2075
|
+
const v = oe(), b = R(null), g = R(null), [f, x] = z(r), [y, I] = z({
|
|
2076
|
+
top: 0,
|
|
2077
|
+
left: 0
|
|
2078
|
+
}), L = o ?? f, j = H((C) => {
|
|
2079
|
+
o === void 0 && x(C), a?.(C);
|
|
2080
|
+
}, [a, o]), N = H(() => j(!1), [j]), $ = H(() => {
|
|
2081
|
+
if (!b.current) return;
|
|
2082
|
+
const C = b.current.getBoundingClientRect();
|
|
2083
|
+
I(Ye(C, i, c, u));
|
|
2084
|
+
}, [u, c, i]);
|
|
2085
|
+
E(() => {
|
|
2086
|
+
if (!L) return;
|
|
2087
|
+
$();
|
|
2088
|
+
const C = () => $();
|
|
2089
|
+
return window.addEventListener("resize", C), window.addEventListener("scroll", C, !0), () => {
|
|
2090
|
+
window.removeEventListener("resize", C), window.removeEventListener("scroll", C, !0);
|
|
2091
|
+
};
|
|
2092
|
+
}, [L, $]), E(() => {
|
|
2093
|
+
if (!L) return;
|
|
2094
|
+
const C = (A) => {
|
|
2095
|
+
const U = A.target;
|
|
2096
|
+
b.current?.contains(U) || g.current?.contains(U) || d && N();
|
|
2097
|
+
}, V = (A) => {
|
|
2098
|
+
A.key === "Escape" && (N(), b.current?.focus());
|
|
2099
|
+
};
|
|
2100
|
+
return document.addEventListener("mousedown", C), document.addEventListener("keydown", V), () => {
|
|
2101
|
+
document.removeEventListener("mousedown", C), document.removeEventListener("keydown", V);
|
|
2102
|
+
};
|
|
2103
|
+
}, [N, d, L]);
|
|
2104
|
+
const w = G(() => ({ close: N }), [N]), S = _.cloneElement(e, {
|
|
2105
|
+
ref: (C) => {
|
|
2106
|
+
b.current = C, Pe(e.ref, C);
|
|
2107
|
+
},
|
|
2108
|
+
"aria-expanded": L,
|
|
2109
|
+
"aria-haspopup": "menu",
|
|
2110
|
+
"aria-controls": L ? v : void 0,
|
|
2111
|
+
onClick: (C) => {
|
|
2112
|
+
e.props.onClick?.(C), !C.defaultPrevented && !s && j(!L);
|
|
2113
|
+
},
|
|
2114
|
+
onKeyDown: (C) => {
|
|
2115
|
+
e.props.onKeyDown?.(C), !(s || C.defaultPrevented) && ((C.key === "Enter" || C.key === " ") && (C.preventDefault(), j(!L)), C.key === "ArrowDown" && (C.preventDefault(), j(!0)));
|
|
2116
|
+
}
|
|
2117
|
+
});
|
|
2118
|
+
return /* @__PURE__ */ m(X, { children: [
|
|
2119
|
+
S,
|
|
2120
|
+
L && J(
|
|
2121
|
+
/* @__PURE__ */ n(pe.Provider, { value: w, children: /* @__PURE__ */ n(
|
|
2122
|
+
"div",
|
|
2123
|
+
{
|
|
2124
|
+
id: v,
|
|
2125
|
+
ref: g,
|
|
2126
|
+
className: p("dropdown__menu", h),
|
|
2127
|
+
style: {
|
|
2128
|
+
top: y.top,
|
|
2129
|
+
left: y.left,
|
|
2130
|
+
minWidth: y.minWidth,
|
|
2131
|
+
transform: y.transform
|
|
2132
|
+
},
|
|
2133
|
+
role: "menu",
|
|
2134
|
+
...k,
|
|
2135
|
+
children: /* @__PURE__ */ n("div", { className: "dropdown__content", children: t })
|
|
2136
|
+
}
|
|
2137
|
+
) }),
|
|
2138
|
+
document.body
|
|
2139
|
+
)
|
|
2140
|
+
] });
|
|
2141
|
+
}
|
|
2142
|
+
function qe({
|
|
2143
|
+
children: e,
|
|
2144
|
+
className: t,
|
|
2145
|
+
inset: o = !1,
|
|
2146
|
+
destructive: r = !1,
|
|
2147
|
+
keepOpen: a = !1,
|
|
2148
|
+
leftContent: i,
|
|
2149
|
+
rightContent: c,
|
|
2150
|
+
onClick: s,
|
|
2151
|
+
onSelect: u,
|
|
2152
|
+
...d
|
|
2153
|
+
}) {
|
|
2154
|
+
const h = Z(pe);
|
|
2155
|
+
return /* @__PURE__ */ m(
|
|
2156
|
+
"button",
|
|
2157
|
+
{
|
|
2158
|
+
type: "button",
|
|
2159
|
+
className: p(
|
|
2160
|
+
"dropdown__item",
|
|
2161
|
+
o && "dropdown__item--inset",
|
|
2162
|
+
r && "dropdown__item--destructive",
|
|
2163
|
+
t
|
|
2164
|
+
),
|
|
2165
|
+
role: "menuitem",
|
|
2166
|
+
onClick: (k) => {
|
|
2167
|
+
s?.(k), !k.defaultPrevented && (u?.(), a || h?.close());
|
|
2168
|
+
},
|
|
2169
|
+
...d,
|
|
2170
|
+
children: [
|
|
2171
|
+
/* @__PURE__ */ m("span", { className: "dropdown__item-label", children: [
|
|
2172
|
+
i && /* @__PURE__ */ n("span", { className: "dropdown__item-left", children: i }),
|
|
2173
|
+
/* @__PURE__ */ n("span", { children: e })
|
|
2174
|
+
] }),
|
|
2175
|
+
c && /* @__PURE__ */ n("span", { className: "dropdown__item-right", children: c })
|
|
2176
|
+
]
|
|
2177
|
+
}
|
|
2178
|
+
);
|
|
2179
|
+
}
|
|
2180
|
+
const Ge = Object.assign(Ue, {
|
|
2181
|
+
Item: qe
|
|
2182
|
+
});
|
|
2183
|
+
Ge.displayName = "Dropdown";
|
|
2184
|
+
function Ke(e, t) {
|
|
2045
2185
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
2046
2186
|
}
|
|
2047
|
-
const
|
|
2048
|
-
({ label: e, indeterminate: t = !1, supportText: o, className: r, id: a, disabled: i, color: c = "primary", style: s, ...
|
|
2049
|
-
const
|
|
2050
|
-
|
|
2187
|
+
const Xe = _.forwardRef(
|
|
2188
|
+
({ label: e, indeterminate: t = !1, supportText: o, className: r, id: a, disabled: i, color: c = "primary", style: s, ...u }, d) => {
|
|
2189
|
+
const h = _.useId(), k = a ?? `checkbox-${h}`, v = _.useRef(null);
|
|
2190
|
+
_.useEffect(() => {
|
|
2051
2191
|
v.current && (v.current.indeterminate = t);
|
|
2052
2192
|
}, [t]);
|
|
2053
|
-
const
|
|
2054
|
-
v.current = g,
|
|
2193
|
+
const b = (g) => {
|
|
2194
|
+
v.current = g, Ke(d, g);
|
|
2055
2195
|
};
|
|
2056
|
-
return /* @__PURE__ */ n(
|
|
2196
|
+
return /* @__PURE__ */ n(O, { hint: o, full: !0, className: r, htmlFor: k, children: /* @__PURE__ */ m("label", { className: p("checkbox", i && "checkbox--disabled"), style: { "--checkbox-color": F(c), ...s ?? {} }, children: [
|
|
2057
2197
|
/* @__PURE__ */ m("span", { className: "checkbox__control", children: [
|
|
2058
2198
|
/* @__PURE__ */ n(
|
|
2059
2199
|
"input",
|
|
2060
2200
|
{
|
|
2061
|
-
ref:
|
|
2062
|
-
id:
|
|
2201
|
+
ref: b,
|
|
2202
|
+
id: k,
|
|
2063
2203
|
type: "checkbox",
|
|
2064
2204
|
className: "checkbox__input",
|
|
2065
2205
|
disabled: i,
|
|
2066
2206
|
"aria-checked": t ? "mixed" : void 0,
|
|
2067
|
-
...
|
|
2207
|
+
...u
|
|
2068
2208
|
}
|
|
2069
2209
|
),
|
|
2070
|
-
/* @__PURE__ */ n("span", { className: "checkbox__box", "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: "checkbox__icon", children: t ? /* @__PURE__ */ n(
|
|
2210
|
+
/* @__PURE__ */ n("span", { className: "checkbox__box", "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: "checkbox__icon", children: t ? /* @__PURE__ */ n(M, { name: "minus" }) : /* @__PURE__ */ n(M, { name: "check" }) }) })
|
|
2071
2211
|
] }),
|
|
2072
2212
|
e && /* @__PURE__ */ n("span", { className: "checkbox__label", children: e })
|
|
2073
2213
|
] }) });
|
|
2074
2214
|
}
|
|
2075
2215
|
);
|
|
2076
|
-
|
|
2077
|
-
const
|
|
2216
|
+
Xe.displayName = "Checkbox";
|
|
2217
|
+
const Ze = _.forwardRef(({
|
|
2078
2218
|
label: e,
|
|
2079
2219
|
description: t,
|
|
2080
2220
|
className: o,
|
|
@@ -2083,12 +2223,12 @@ const Pe = L.forwardRef(({
|
|
|
2083
2223
|
style: i,
|
|
2084
2224
|
color: c = "primary",
|
|
2085
2225
|
id: s,
|
|
2086
|
-
...
|
|
2226
|
+
...u
|
|
2087
2227
|
}, d) => {
|
|
2088
|
-
const
|
|
2089
|
-
return /* @__PURE__ */ n(
|
|
2228
|
+
const h = _.useId(), k = s ?? `radio-${h}`;
|
|
2229
|
+
return /* @__PURE__ */ n(O, { full: !0, className: o, htmlFor: k, children: /* @__PURE__ */ m("label", { className: p("radio", r && "radio--disabled", a && "radio--error"), style: { "--radio-color": F(c), ...i ?? {} }, children: [
|
|
2090
2230
|
/* @__PURE__ */ m("span", { className: "radio__input-container", children: [
|
|
2091
|
-
/* @__PURE__ */ n("input", { ref: d, id:
|
|
2231
|
+
/* @__PURE__ */ n("input", { ref: d, id: k, type: "radio", className: "radio__input", disabled: r, ...u }),
|
|
2092
2232
|
/* @__PURE__ */ n("span", { className: "radio__control", children: /* @__PURE__ */ n("span", { className: "radio__dot" }) })
|
|
2093
2233
|
] }),
|
|
2094
2234
|
(e || t) && /* @__PURE__ */ m("span", { className: "radio__content", children: [
|
|
@@ -2097,8 +2237,8 @@ const Pe = L.forwardRef(({
|
|
|
2097
2237
|
] })
|
|
2098
2238
|
] }) });
|
|
2099
2239
|
});
|
|
2100
|
-
|
|
2101
|
-
const
|
|
2240
|
+
Ze.displayName = "Radio";
|
|
2241
|
+
const nr = ({
|
|
2102
2242
|
value: e,
|
|
2103
2243
|
defaultValue: t,
|
|
2104
2244
|
onChange: o,
|
|
@@ -2107,23 +2247,23 @@ const Zo = ({
|
|
|
2107
2247
|
label: i,
|
|
2108
2248
|
supportText: c,
|
|
2109
2249
|
className: s,
|
|
2110
|
-
id:
|
|
2250
|
+
id: u,
|
|
2111
2251
|
...d
|
|
2112
2252
|
}) => {
|
|
2113
|
-
const
|
|
2114
|
-
return /* @__PURE__ */ n(
|
|
2115
|
-
/* @__PURE__ */ n("div", { className: "slider__track", children: /* @__PURE__ */ n("div", { className: "slider__fill", style: { width: `${
|
|
2253
|
+
const h = _.useId(), k = u ?? `slider-${h}`, [v, b] = z(Number(e ?? t ?? 0)), g = e !== void 0 ? Number(e) : v, f = (g - Number(r)) / (Number(a) - Number(r)) * 100;
|
|
2254
|
+
return /* @__PURE__ */ n(O, { label: i, hint: c, full: !0, className: s, htmlFor: k, children: /* @__PURE__ */ m("div", { className: "slider", children: [
|
|
2255
|
+
/* @__PURE__ */ n("div", { className: "slider__track", children: /* @__PURE__ */ n("div", { className: "slider__fill", style: { width: `${f}%` } }) }),
|
|
2116
2256
|
/* @__PURE__ */ n(
|
|
2117
2257
|
"input",
|
|
2118
2258
|
{
|
|
2119
|
-
id:
|
|
2259
|
+
id: k,
|
|
2120
2260
|
type: "range",
|
|
2121
2261
|
min: r,
|
|
2122
2262
|
max: a,
|
|
2123
2263
|
value: g,
|
|
2124
2264
|
onChange: (x) => {
|
|
2125
|
-
const
|
|
2126
|
-
e === void 0 && y
|
|
2265
|
+
const y = Number(x.target.value);
|
|
2266
|
+
e === void 0 && b(y), o?.(x);
|
|
2127
2267
|
},
|
|
2128
2268
|
className: "slider__input",
|
|
2129
2269
|
...d
|
|
@@ -2131,7 +2271,7 @@ const Zo = ({
|
|
|
2131
2271
|
),
|
|
2132
2272
|
/* @__PURE__ */ n("div", { className: "slider__value", children: g })
|
|
2133
2273
|
] }) });
|
|
2134
|
-
},
|
|
2274
|
+
}, tr = ({
|
|
2135
2275
|
onFileSelect: e,
|
|
2136
2276
|
accept: t,
|
|
2137
2277
|
multiple: o = !1,
|
|
@@ -2140,36 +2280,36 @@ const Zo = ({
|
|
|
2140
2280
|
title: i = "Drag and drop a file or click to upload",
|
|
2141
2281
|
description: c = "Supported files depend on the accept property.",
|
|
2142
2282
|
className: s,
|
|
2143
|
-
...
|
|
2283
|
+
...u
|
|
2144
2284
|
}) => {
|
|
2145
|
-
const d =
|
|
2146
|
-
|
|
2147
|
-
let
|
|
2148
|
-
a &&
|
|
2149
|
-
const
|
|
2150
|
-
|
|
2285
|
+
const d = R(null), [h, k] = z(!1), [v, b] = z([]), [g, f] = z(null), x = (y) => {
|
|
2286
|
+
f(null);
|
|
2287
|
+
let I = y;
|
|
2288
|
+
a && y.filter((N) => N.size > a).length > 0 && (f(`Some files exceed ${Math.round(a / 1024 / 1024)}MB.`), I = y.filter((N) => N.size <= a)), !o && I.length > 1 && (I = [I[0]]);
|
|
2289
|
+
const L = o ? [...v, ...I] : I;
|
|
2290
|
+
b(L), e?.(L);
|
|
2151
2291
|
};
|
|
2152
|
-
return /* @__PURE__ */ m("div", { className: p("file-upload", s), ...
|
|
2292
|
+
return /* @__PURE__ */ m("div", { className: p("file-upload", s), ...u, children: [
|
|
2153
2293
|
/* @__PURE__ */ m(
|
|
2154
2294
|
"div",
|
|
2155
2295
|
{
|
|
2156
2296
|
className: p(
|
|
2157
2297
|
"file-upload__dropzone",
|
|
2158
|
-
|
|
2298
|
+
h && "file-upload__dropzone--dragging",
|
|
2159
2299
|
r && "file-upload__dropzone--disabled",
|
|
2160
2300
|
g && "file-upload__dropzone--error"
|
|
2161
2301
|
),
|
|
2162
|
-
onDragEnter: (
|
|
2163
|
-
|
|
2302
|
+
onDragEnter: (y) => {
|
|
2303
|
+
y.preventDefault(), r || k(!0);
|
|
2164
2304
|
},
|
|
2165
|
-
onDragOver: (
|
|
2166
|
-
|
|
2305
|
+
onDragOver: (y) => {
|
|
2306
|
+
y.preventDefault(), r || k(!0);
|
|
2167
2307
|
},
|
|
2168
|
-
onDragLeave: (
|
|
2169
|
-
|
|
2308
|
+
onDragLeave: (y) => {
|
|
2309
|
+
y.preventDefault(), k(!1);
|
|
2170
2310
|
},
|
|
2171
|
-
onDrop: (
|
|
2172
|
-
|
|
2311
|
+
onDrop: (y) => {
|
|
2312
|
+
y.preventDefault(), k(!1), r || x(Array.from(y.dataTransfer.files));
|
|
2173
2313
|
},
|
|
2174
2314
|
onClick: () => !r && d.current?.click(),
|
|
2175
2315
|
children: [
|
|
@@ -2179,41 +2319,41 @@ const Zo = ({
|
|
|
2179
2319
|
ref: d,
|
|
2180
2320
|
type: "file",
|
|
2181
2321
|
className: "file-upload__input",
|
|
2182
|
-
onChange: (
|
|
2322
|
+
onChange: (y) => y.target.files && x(Array.from(y.target.files)),
|
|
2183
2323
|
accept: t,
|
|
2184
2324
|
multiple: o,
|
|
2185
2325
|
disabled: r
|
|
2186
2326
|
}
|
|
2187
2327
|
),
|
|
2188
2328
|
/* @__PURE__ */ m("div", { className: "file-upload__content", children: [
|
|
2189
|
-
/* @__PURE__ */ n("div", { className: "file-upload__icon", children: /* @__PURE__ */ n(
|
|
2190
|
-
/* @__PURE__ */ n(
|
|
2191
|
-
/* @__PURE__ */ n(
|
|
2329
|
+
/* @__PURE__ */ n("div", { className: "file-upload__icon", children: /* @__PURE__ */ n(M, { name: "upload", size: 20 }) }),
|
|
2330
|
+
/* @__PURE__ */ n(T, { weight: "medium", children: i }),
|
|
2331
|
+
/* @__PURE__ */ n(T, { size: "small", color: "neutral", children: c })
|
|
2192
2332
|
] })
|
|
2193
2333
|
]
|
|
2194
2334
|
}
|
|
2195
2335
|
),
|
|
2196
|
-
g && /* @__PURE__ */ n(
|
|
2197
|
-
v.length > 0 && /* @__PURE__ */ n("ul", { className: "file-upload__list", children: v.map((
|
|
2198
|
-
/* @__PURE__ */ n("span", { className: "file-upload__file-name", children:
|
|
2336
|
+
g && /* @__PURE__ */ n(T, { size: "small", color: "error", children: g }),
|
|
2337
|
+
v.length > 0 && /* @__PURE__ */ n("ul", { className: "file-upload__list", children: v.map((y, I) => /* @__PURE__ */ m("li", { className: "file-upload__item", children: [
|
|
2338
|
+
/* @__PURE__ */ n("span", { className: "file-upload__file-name", children: y.name }),
|
|
2199
2339
|
/* @__PURE__ */ n(
|
|
2200
2340
|
"button",
|
|
2201
2341
|
{
|
|
2202
2342
|
type: "button",
|
|
2203
2343
|
className: "file-upload__remove",
|
|
2204
2344
|
onClick: () => {
|
|
2205
|
-
const
|
|
2206
|
-
|
|
2345
|
+
const L = v.filter((j, N) => N !== I);
|
|
2346
|
+
b(L), e?.(L);
|
|
2207
2347
|
},
|
|
2208
|
-
children: /* @__PURE__ */ n(
|
|
2348
|
+
children: /* @__PURE__ */ n(M, { name: "close", size: 14 })
|
|
2209
2349
|
}
|
|
2210
2350
|
)
|
|
2211
|
-
] }, `${
|
|
2351
|
+
] }, `${y.name}-${I}`)) })
|
|
2212
2352
|
] });
|
|
2213
2353
|
};
|
|
2214
|
-
function
|
|
2215
|
-
const o =
|
|
2216
|
-
({ weight: r = "bold", className: a, children: i, ...c }, s) =>
|
|
2354
|
+
function K(e, t) {
|
|
2355
|
+
const o = _.forwardRef(
|
|
2356
|
+
({ weight: r = "bold", className: a, children: i, ...c }, s) => _.createElement(
|
|
2217
2357
|
e,
|
|
2218
2358
|
{
|
|
2219
2359
|
ref: s,
|
|
@@ -2230,8 +2370,8 @@ function U(e, t) {
|
|
|
2230
2370
|
);
|
|
2231
2371
|
return o.displayName = e.charAt(0).toUpperCase() + e.slice(1), o;
|
|
2232
2372
|
}
|
|
2233
|
-
const
|
|
2234
|
-
function
|
|
2373
|
+
const Qe = K("h1", "heading--h1"), me = K("h2", "heading--h2"), or = K("h3", "heading--h3"), Je = K("h4", "heading--h4"), ke = K("h5", "heading--h5"), rr = K("h6", "heading--h6");
|
|
2374
|
+
function ir({ padding: e = "md", variant: t = "default", as: o, children: r, className: a, ...i }) {
|
|
2235
2375
|
return /* @__PURE__ */ n(
|
|
2236
2376
|
o || "div",
|
|
2237
2377
|
{
|
|
@@ -2241,26 +2381,26 @@ function Jo({ padding: e = "md", variant: t = "default", as: o, children: r, cla
|
|
|
2241
2381
|
}
|
|
2242
2382
|
);
|
|
2243
2383
|
}
|
|
2244
|
-
function
|
|
2384
|
+
function ar({ title: e, description: t, icon: o, action: r, children: a, className: i, ...c }) {
|
|
2245
2385
|
return /* @__PURE__ */ m("div", { className: p("card-header", i), ...c, children: [
|
|
2246
2386
|
/* @__PURE__ */ m("div", { className: "card-header__content", children: [
|
|
2247
2387
|
(e || o) && /* @__PURE__ */ m("div", { className: "card-header__title-wrapper", children: [
|
|
2248
2388
|
o && /* @__PURE__ */ n("span", { className: "card-header__icon", children: o }),
|
|
2249
|
-
e && /* @__PURE__ */ n(
|
|
2389
|
+
e && /* @__PURE__ */ n(ke, { weight: "semibold", children: e })
|
|
2250
2390
|
] }),
|
|
2251
|
-
t && /* @__PURE__ */ n(
|
|
2391
|
+
t && /* @__PURE__ */ n(T, { size: "small", color: "neutral", children: t }),
|
|
2252
2392
|
a
|
|
2253
2393
|
] }),
|
|
2254
2394
|
r && /* @__PURE__ */ n("div", { className: "card-header__action", children: r })
|
|
2255
2395
|
] });
|
|
2256
2396
|
}
|
|
2257
|
-
function
|
|
2397
|
+
function sr({ children: e, className: t, ...o }) {
|
|
2258
2398
|
return /* @__PURE__ */ n("div", { className: p("card-body", t), ...o, children: e });
|
|
2259
2399
|
}
|
|
2260
|
-
function
|
|
2400
|
+
function lr({ children: e, className: t, ...o }) {
|
|
2261
2401
|
return /* @__PURE__ */ n("div", { className: p("card-footer", t), ...o, children: e });
|
|
2262
2402
|
}
|
|
2263
|
-
const
|
|
2403
|
+
const cr = _.forwardRef(function({
|
|
2264
2404
|
as: t,
|
|
2265
2405
|
padding: o = "0",
|
|
2266
2406
|
rounded: r = "none",
|
|
@@ -2268,13 +2408,13 @@ const or = L.forwardRef(function({
|
|
|
2268
2408
|
surface: i = "default",
|
|
2269
2409
|
border: c = !1,
|
|
2270
2410
|
className: s,
|
|
2271
|
-
children:
|
|
2411
|
+
children: u,
|
|
2272
2412
|
...d
|
|
2273
|
-
},
|
|
2413
|
+
}, h) {
|
|
2274
2414
|
return /* @__PURE__ */ n(
|
|
2275
2415
|
t || "div",
|
|
2276
2416
|
{
|
|
2277
|
-
ref:
|
|
2417
|
+
ref: h,
|
|
2278
2418
|
className: p(
|
|
2279
2419
|
"box",
|
|
2280
2420
|
`box-padding--${o}`,
|
|
@@ -2285,10 +2425,10 @@ const or = L.forwardRef(function({
|
|
|
2285
2425
|
s
|
|
2286
2426
|
),
|
|
2287
2427
|
...d,
|
|
2288
|
-
children:
|
|
2428
|
+
children: u
|
|
2289
2429
|
}
|
|
2290
2430
|
);
|
|
2291
|
-
}),
|
|
2431
|
+
}), dr = ({
|
|
2292
2432
|
children: e,
|
|
2293
2433
|
columns: t = 1,
|
|
2294
2434
|
gap: o = "4",
|
|
@@ -2309,9 +2449,9 @@ const or = L.forwardRef(function({
|
|
|
2309
2449
|
...c,
|
|
2310
2450
|
children: e
|
|
2311
2451
|
}
|
|
2312
|
-
),
|
|
2452
|
+
), ur = ({
|
|
2313
2453
|
children: e,
|
|
2314
|
-
size: t = "
|
|
2454
|
+
size: t = "large",
|
|
2315
2455
|
className: o,
|
|
2316
2456
|
style: r
|
|
2317
2457
|
}) => /* @__PURE__ */ n(
|
|
@@ -2321,11 +2461,11 @@ const or = L.forwardRef(function({
|
|
|
2321
2461
|
style: r,
|
|
2322
2462
|
children: e
|
|
2323
2463
|
}
|
|
2324
|
-
),
|
|
2464
|
+
), hr = ({ size: e = "1rem", axis: t = "vertical", style: o }) => {
|
|
2325
2465
|
const r = t === "horizontal" ? e : 1, a = t === "vertical" ? e : 1;
|
|
2326
2466
|
return /* @__PURE__ */ n("span", { style: { display: "block", width: r, minWidth: r, height: a, minHeight: a, ...o }, "aria-hidden": "true" });
|
|
2327
2467
|
};
|
|
2328
|
-
function
|
|
2468
|
+
function pr({ orientation: e = "horizontal", label: t, className: o, ...r }) {
|
|
2329
2469
|
return /* @__PURE__ */ n(
|
|
2330
2470
|
"div",
|
|
2331
2471
|
{
|
|
@@ -2337,11 +2477,11 @@ function sr({ orientation: e = "horizontal", label: t, className: o, ...r }) {
|
|
|
2337
2477
|
}
|
|
2338
2478
|
);
|
|
2339
2479
|
}
|
|
2340
|
-
const
|
|
2341
|
-
function
|
|
2342
|
-
return /* @__PURE__ */ n(
|
|
2480
|
+
const fe = Q({ variant: "default" });
|
|
2481
|
+
function en({ children: e, variant: t = "default", className: o, ...r }) {
|
|
2482
|
+
return /* @__PURE__ */ n(fe.Provider, { value: { variant: t }, children: /* @__PURE__ */ n("div", { className: p("list", `list--${t}`, o), role: "list", ...r, children: e }) });
|
|
2343
2483
|
}
|
|
2344
|
-
function
|
|
2484
|
+
function nn({
|
|
2345
2485
|
children: e,
|
|
2346
2486
|
description: t,
|
|
2347
2487
|
startContent: o,
|
|
@@ -2350,9 +2490,9 @@ function Ze({
|
|
|
2350
2490
|
disabled: i = !1,
|
|
2351
2491
|
className: c,
|
|
2352
2492
|
onClick: s,
|
|
2353
|
-
...
|
|
2493
|
+
...u
|
|
2354
2494
|
}) {
|
|
2355
|
-
const { variant: d } =
|
|
2495
|
+
const { variant: d } = Z(fe), h = d === "checklist" && !o ? /* @__PURE__ */ n(M, { name: "check", size: 16 }) : o;
|
|
2356
2496
|
return /* @__PURE__ */ m(
|
|
2357
2497
|
"div",
|
|
2358
2498
|
{
|
|
@@ -2366,32 +2506,32 @@ function Ze({
|
|
|
2366
2506
|
role: "listitem",
|
|
2367
2507
|
tabIndex: i ? -1 : s ? 0 : void 0,
|
|
2368
2508
|
onClick: i ? void 0 : s,
|
|
2369
|
-
...
|
|
2509
|
+
...u,
|
|
2370
2510
|
children: [
|
|
2371
|
-
|
|
2511
|
+
h && /* @__PURE__ */ n("div", { className: "list-item__start", children: h }),
|
|
2372
2512
|
/* @__PURE__ */ m("div", { className: "list-item__content", children: [
|
|
2373
|
-
/* @__PURE__ */ n(
|
|
2374
|
-
t && /* @__PURE__ */ n(
|
|
2513
|
+
/* @__PURE__ */ n(T, { as: "span", weight: "medium", className: "list-item__title", children: e }),
|
|
2514
|
+
t && /* @__PURE__ */ n(T, { as: "span", size: "small", color: "neutral", className: "list-item__description", children: t })
|
|
2375
2515
|
] }),
|
|
2376
2516
|
r && /* @__PURE__ */ n("div", { className: "list-item__end", children: r })
|
|
2377
2517
|
]
|
|
2378
2518
|
}
|
|
2379
2519
|
);
|
|
2380
2520
|
}
|
|
2381
|
-
const
|
|
2382
|
-
Item:
|
|
2521
|
+
const tn = Object.assign(en, {
|
|
2522
|
+
Item: nn
|
|
2383
2523
|
});
|
|
2384
|
-
|
|
2385
|
-
function
|
|
2386
|
-
const o = Array.isArray(t) ? t : t ? [t] : [], [r, a] =
|
|
2524
|
+
tn.displayName = "List";
|
|
2525
|
+
function on(e, t) {
|
|
2526
|
+
const o = Array.isArray(t) ? t : t ? [t] : [], [r, a] = z(o);
|
|
2387
2527
|
return { openItems: r, toggle: (c) => {
|
|
2388
2528
|
a((s) => {
|
|
2389
|
-
const
|
|
2390
|
-
return e === "single" ?
|
|
2529
|
+
const u = s.includes(c);
|
|
2530
|
+
return e === "single" ? u ? [] : [c] : u ? s.filter((d) => d !== c) : [...s, c];
|
|
2391
2531
|
});
|
|
2392
2532
|
} };
|
|
2393
2533
|
}
|
|
2394
|
-
const
|
|
2534
|
+
const rn = ({
|
|
2395
2535
|
title: e,
|
|
2396
2536
|
children: t,
|
|
2397
2537
|
isOpen: o = !1,
|
|
@@ -2411,7 +2551,7 @@ const Qe = ({
|
|
|
2411
2551
|
type: "button",
|
|
2412
2552
|
children: [
|
|
2413
2553
|
/* @__PURE__ */ n("span", { className: "accordion-item__title", children: e }),
|
|
2414
|
-
/* @__PURE__ */ n("span", { className: "accordion-item__icon", children: /* @__PURE__ */ n(
|
|
2554
|
+
/* @__PURE__ */ n("span", { className: "accordion-item__icon", children: /* @__PURE__ */ n(M, { name: "chevron-down", size: 16 }) })
|
|
2415
2555
|
]
|
|
2416
2556
|
}
|
|
2417
2557
|
),
|
|
@@ -2426,27 +2566,27 @@ const Qe = ({
|
|
|
2426
2566
|
children: /* @__PURE__ */ n("div", { className: "accordion-item__content-inner", children: t })
|
|
2427
2567
|
}
|
|
2428
2568
|
)
|
|
2429
|
-
] }),
|
|
2569
|
+
] }), an = ({
|
|
2430
2570
|
children: e,
|
|
2431
2571
|
type: t = "single",
|
|
2432
2572
|
defaultValue: o,
|
|
2433
2573
|
className: r,
|
|
2434
2574
|
...a
|
|
2435
2575
|
}) => {
|
|
2436
|
-
const { openItems: i, toggle: c } =
|
|
2437
|
-
return /* @__PURE__ */ n("div", { className: p("accordion", r), ...a, children:
|
|
2438
|
-
if (!
|
|
2439
|
-
const d = s.props.id ?? `accordion-item-${
|
|
2440
|
-
return
|
|
2576
|
+
const { openItems: i, toggle: c } = on(t, o);
|
|
2577
|
+
return /* @__PURE__ */ n("div", { className: p("accordion", r), ...a, children: _.Children.map(e, (s, u) => {
|
|
2578
|
+
if (!_.isValidElement(s)) return s;
|
|
2579
|
+
const d = s.props.id ?? `accordion-item-${u}`;
|
|
2580
|
+
return _.cloneElement(s, {
|
|
2441
2581
|
id: d,
|
|
2442
2582
|
isOpen: i.includes(d),
|
|
2443
2583
|
onToggle: () => c(d)
|
|
2444
2584
|
});
|
|
2445
2585
|
}) });
|
|
2446
2586
|
};
|
|
2447
|
-
|
|
2448
|
-
const
|
|
2449
|
-
size: e = "
|
|
2587
|
+
an.Item = rn;
|
|
2588
|
+
const sn = ({
|
|
2589
|
+
size: e = "small",
|
|
2450
2590
|
weight: t = "medium",
|
|
2451
2591
|
block: o = !1,
|
|
2452
2592
|
children: r,
|
|
@@ -2466,7 +2606,7 @@ const en = ({
|
|
|
2466
2606
|
children: r
|
|
2467
2607
|
}
|
|
2468
2608
|
);
|
|
2469
|
-
|
|
2609
|
+
sn.displayName = "Code";
|
|
2470
2610
|
const le = ({
|
|
2471
2611
|
color: e = "primary",
|
|
2472
2612
|
underline: t = !1,
|
|
@@ -2476,90 +2616,106 @@ const le = ({
|
|
|
2476
2616
|
children: i,
|
|
2477
2617
|
href: c,
|
|
2478
2618
|
to: s,
|
|
2479
|
-
style:
|
|
2619
|
+
style: u,
|
|
2480
2620
|
...d
|
|
2481
2621
|
}) => {
|
|
2482
|
-
const
|
|
2483
|
-
const
|
|
2484
|
-
return
|
|
2485
|
-
}, g =
|
|
2622
|
+
const h = typeof window < "u" ? window.location.pathname : "", k = s ?? c, v = r || "a", b = (x) => {
|
|
2623
|
+
const y = x.split("?")[0].split("#")[0];
|
|
2624
|
+
return y.endsWith("/") && y !== "/" ? y.slice(0, -1) : y;
|
|
2625
|
+
}, g = k && h ? b(h) === b(k) : !1, f = o ?? g;
|
|
2486
2626
|
return /* @__PURE__ */ n(
|
|
2487
2627
|
v,
|
|
2488
2628
|
{
|
|
2489
|
-
className: p("link", t && "link--underline",
|
|
2629
|
+
className: p("link", t && "link--underline", f && "link--active", a),
|
|
2490
2630
|
style: {
|
|
2491
|
-
"--link-color":
|
|
2492
|
-
...
|
|
2631
|
+
"--link-color": F(e),
|
|
2632
|
+
...u ?? {}
|
|
2493
2633
|
},
|
|
2494
|
-
href:
|
|
2495
|
-
"aria-current":
|
|
2634
|
+
href: k,
|
|
2635
|
+
"aria-current": f ? "page" : void 0,
|
|
2496
2636
|
...d,
|
|
2497
2637
|
children: i
|
|
2498
2638
|
}
|
|
2499
2639
|
);
|
|
2500
2640
|
};
|
|
2501
2641
|
le.displayName = "Link";
|
|
2502
|
-
const
|
|
2642
|
+
const ln = _.forwardRef(({
|
|
2503
2643
|
children: e,
|
|
2504
2644
|
variant: t = "soft",
|
|
2505
2645
|
color: o = "primary",
|
|
2506
|
-
size: r = "
|
|
2646
|
+
size: r = "medium",
|
|
2507
2647
|
className: a,
|
|
2508
2648
|
...i
|
|
2509
2649
|
}, c) => {
|
|
2510
|
-
const s =
|
|
2650
|
+
const s = ee(o) ? o : void 0;
|
|
2511
2651
|
return /* @__PURE__ */ n(
|
|
2512
2652
|
"span",
|
|
2513
2653
|
{
|
|
2514
2654
|
ref: c,
|
|
2515
2655
|
className: p("badge", `badge--${t}`, s && `badge--${s}`, `badge--${r}`, a),
|
|
2516
|
-
style: s ? void 0 : { "--badge-color":
|
|
2656
|
+
style: s ? void 0 : { "--badge-color": F(o) },
|
|
2517
2657
|
...i,
|
|
2518
2658
|
children: e
|
|
2519
2659
|
}
|
|
2520
2660
|
);
|
|
2521
2661
|
});
|
|
2522
|
-
|
|
2523
|
-
|
|
2662
|
+
ln.displayName = "Badge";
|
|
2663
|
+
const mr = ({
|
|
2664
|
+
variant: e = "primary",
|
|
2665
|
+
title: t,
|
|
2666
|
+
icon: o,
|
|
2667
|
+
action: r,
|
|
2668
|
+
children: a,
|
|
2669
|
+
className: i,
|
|
2670
|
+
...c
|
|
2671
|
+
}) => /* @__PURE__ */ m("div", { className: p("alert", `alert--${e}`, i), role: "alert", ...c, children: [
|
|
2672
|
+
o && /* @__PURE__ */ n("div", { className: "alert__icon", children: o }),
|
|
2673
|
+
/* @__PURE__ */ m("div", { className: "alert__content", children: [
|
|
2674
|
+
t && /* @__PURE__ */ n(ke, { className: "alert__title", children: t }),
|
|
2675
|
+
a && /* @__PURE__ */ n(T, { size: "small", className: "alert__description", children: a })
|
|
2676
|
+
] }),
|
|
2677
|
+
r && /* @__PURE__ */ n("div", { className: "alert__action", children: r })
|
|
2678
|
+
] });
|
|
2679
|
+
function kr({
|
|
2524
2680
|
children: e,
|
|
2525
2681
|
variant: t = "soft",
|
|
2526
|
-
size: o = "
|
|
2682
|
+
size: o = "medium",
|
|
2527
2683
|
color: r = "primary",
|
|
2528
2684
|
leftIcon: a,
|
|
2529
2685
|
rightIcon: i,
|
|
2530
2686
|
closable: c,
|
|
2531
2687
|
onRemove: s,
|
|
2532
|
-
className:
|
|
2688
|
+
className: u,
|
|
2533
2689
|
style: d,
|
|
2534
|
-
...
|
|
2690
|
+
...h
|
|
2535
2691
|
}) {
|
|
2536
|
-
const
|
|
2692
|
+
const k = c || !!s;
|
|
2537
2693
|
return /* @__PURE__ */ m(
|
|
2538
2694
|
"span",
|
|
2539
2695
|
{
|
|
2540
|
-
className: p("tag", `tag--variant-${t}`, `tag--size-${o}`,
|
|
2541
|
-
style: { "--tag-color":
|
|
2542
|
-
...
|
|
2696
|
+
className: p("tag", `tag--variant-${t}`, `tag--size-${o}`, u),
|
|
2697
|
+
style: { "--tag-color": F(r), ...d ?? {} },
|
|
2698
|
+
...h,
|
|
2543
2699
|
children: [
|
|
2544
2700
|
a && /* @__PURE__ */ n("span", { className: "tag__icon", children: a }),
|
|
2545
2701
|
/* @__PURE__ */ n("span", { className: "tag__label", children: e }),
|
|
2546
2702
|
i && /* @__PURE__ */ n("span", { className: "tag__icon", children: i }),
|
|
2547
|
-
|
|
2703
|
+
k && /* @__PURE__ */ n("button", { type: "button", className: "tag__remove", onClick: s, "aria-label": "Remove tag", children: "x" })
|
|
2548
2704
|
]
|
|
2549
2705
|
}
|
|
2550
2706
|
);
|
|
2551
2707
|
}
|
|
2552
|
-
const
|
|
2708
|
+
const ve = _.forwardRef(({
|
|
2553
2709
|
src: e,
|
|
2554
2710
|
name: t,
|
|
2555
|
-
size: o = "
|
|
2711
|
+
size: o = "medium",
|
|
2556
2712
|
status: r,
|
|
2557
2713
|
className: a,
|
|
2558
2714
|
...i
|
|
2559
2715
|
}, c) => {
|
|
2560
|
-
const s = (
|
|
2561
|
-
if (!
|
|
2562
|
-
const d =
|
|
2716
|
+
const s = (u) => {
|
|
2717
|
+
if (!u) return "";
|
|
2718
|
+
const d = u.split(" ");
|
|
2563
2719
|
return d.length === 1 ? d[0].substring(0, 2) : (d[0][0] + d[d.length - 1][0]).toUpperCase();
|
|
2564
2720
|
};
|
|
2565
2721
|
return /* @__PURE__ */ m("div", { ref: c, className: p("avatar", `avatar--${o}`, a), ...i, children: [
|
|
@@ -2567,65 +2723,58 @@ const ke = L.forwardRef(({
|
|
|
2567
2723
|
r && /* @__PURE__ */ n("span", { className: p("avatar-status", `avatar-status--${r}`) })
|
|
2568
2724
|
] });
|
|
2569
2725
|
});
|
|
2570
|
-
|
|
2571
|
-
const
|
|
2726
|
+
ve.displayName = "Avatar";
|
|
2727
|
+
const ye = ({
|
|
2572
2728
|
width: e,
|
|
2573
2729
|
height: t,
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
animated: a = !0,
|
|
2577
|
-
className: i,
|
|
2578
|
-
style: c,
|
|
2579
|
-
...s
|
|
2730
|
+
animated: o = !0,
|
|
2731
|
+
rounded: r = !1
|
|
2580
2732
|
}) => {
|
|
2581
|
-
const
|
|
2733
|
+
const a = {
|
|
2582
2734
|
width: typeof e == "number" ? `${e}px` : e,
|
|
2583
2735
|
height: typeof t == "number" ? `${t}px` : t,
|
|
2584
|
-
borderRadius:
|
|
2585
|
-
...c
|
|
2736
|
+
borderRadius: r ? "9999px" : "var(--radius-md)"
|
|
2586
2737
|
};
|
|
2587
2738
|
return /* @__PURE__ */ n(
|
|
2588
2739
|
"div",
|
|
2589
2740
|
{
|
|
2590
2741
|
className: p(
|
|
2591
2742
|
"skeleton",
|
|
2592
|
-
o && "skeleton--
|
|
2593
|
-
|
|
2594
|
-
i
|
|
2743
|
+
o && "skeleton--animated",
|
|
2744
|
+
r && "skeleton--rounded"
|
|
2595
2745
|
),
|
|
2596
|
-
style:
|
|
2597
|
-
...s
|
|
2746
|
+
style: a
|
|
2598
2747
|
}
|
|
2599
2748
|
);
|
|
2600
2749
|
};
|
|
2601
|
-
|
|
2602
|
-
const
|
|
2750
|
+
ye.displayName = "Skeleton";
|
|
2751
|
+
const fr = ({
|
|
2603
2752
|
src: e,
|
|
2604
2753
|
alt: t,
|
|
2605
2754
|
objectFit: o = "cover",
|
|
2606
|
-
radius: r = "
|
|
2755
|
+
radius: r = "medium",
|
|
2607
2756
|
className: a,
|
|
2608
2757
|
style: i,
|
|
2609
2758
|
fallback: c,
|
|
2610
2759
|
...s
|
|
2611
2760
|
}) => {
|
|
2612
|
-
const [
|
|
2613
|
-
return
|
|
2614
|
-
!
|
|
2761
|
+
const [u, d] = z(!1), [h, k] = z(!1);
|
|
2762
|
+
return h && c ? /* @__PURE__ */ n(X, { children: c }) : /* @__PURE__ */ m("div", { className: p("image-wrapper", a), style: i, children: [
|
|
2763
|
+
!u && !h && /* @__PURE__ */ n("div", { className: p("image-skeleton", `image-radius--${r}`), children: /* @__PURE__ */ n(ye, { width: "100%", height: "100%" }) }),
|
|
2615
2764
|
/* @__PURE__ */ n(
|
|
2616
2765
|
"img",
|
|
2617
2766
|
{
|
|
2618
2767
|
src: e,
|
|
2619
2768
|
alt: t,
|
|
2620
|
-
className: p("image", `image-fit--${o}`, `image-radius--${r}`,
|
|
2769
|
+
className: p("image", `image-fit--${o}`, `image-radius--${r}`, u && "image--loaded"),
|
|
2621
2770
|
onLoad: () => d(!0),
|
|
2622
|
-
onError: () =>
|
|
2771
|
+
onError: () => k(!0),
|
|
2623
2772
|
...s
|
|
2624
2773
|
}
|
|
2625
2774
|
)
|
|
2626
2775
|
] });
|
|
2627
|
-
},
|
|
2628
|
-
({ label: e, size: t = "
|
|
2776
|
+
}, cn = _.forwardRef(
|
|
2777
|
+
({ label: e, size: t = "medium", className: o, disabled: r, ...a }, i) => /* @__PURE__ */ m("label", { className: p(
|
|
2629
2778
|
"switch-wrapper",
|
|
2630
2779
|
`switch--${t}`,
|
|
2631
2780
|
r && "switch-wrapper--disabled",
|
|
@@ -2645,8 +2794,8 @@ const cr = ({
|
|
|
2645
2794
|
e && /* @__PURE__ */ n("span", { className: "switch-label", children: e })
|
|
2646
2795
|
] })
|
|
2647
2796
|
);
|
|
2648
|
-
|
|
2649
|
-
const
|
|
2797
|
+
cn.displayName = "Switch";
|
|
2798
|
+
const dn = ({
|
|
2650
2799
|
currentPage: e,
|
|
2651
2800
|
totalPages: t,
|
|
2652
2801
|
onPageChange: o,
|
|
@@ -2655,10 +2804,10 @@ const on = ({
|
|
|
2655
2804
|
...i
|
|
2656
2805
|
}) => {
|
|
2657
2806
|
const c = G(() => {
|
|
2658
|
-
const s = [],
|
|
2659
|
-
|
|
2660
|
-
for (let
|
|
2661
|
-
s.push(
|
|
2807
|
+
const s = [], u = Math.max(1, e - 1), d = Math.min(t, e + 1);
|
|
2808
|
+
u > 1 && (s.push(1), u > 2 && s.push("dots-start"));
|
|
2809
|
+
for (let h = u; h <= d; h += 1)
|
|
2810
|
+
s.push(h);
|
|
2662
2811
|
return d < t && (d < t - 1 && s.push("dots-end"), s.push(t)), s;
|
|
2663
2812
|
}, [e, t]);
|
|
2664
2813
|
return /* @__PURE__ */ m("nav", { className: p("pagination", a), "aria-label": "Pagination", ...i, children: [
|
|
@@ -2670,12 +2819,12 @@ const on = ({
|
|
|
2670
2819
|
onClick: () => o(e - 1),
|
|
2671
2820
|
disabled: e === 1,
|
|
2672
2821
|
"aria-label": "Previous page",
|
|
2673
|
-
children: /* @__PURE__ */ n(
|
|
2822
|
+
children: /* @__PURE__ */ n(M, { name: "chevron-left", size: 16 })
|
|
2674
2823
|
}
|
|
2675
2824
|
),
|
|
2676
|
-
c.map((s,
|
|
2825
|
+
c.map((s, u) => {
|
|
2677
2826
|
if (typeof s == "string")
|
|
2678
|
-
return /* @__PURE__ */ n("span", { className: "pagination__dots", children: "..." }, `${s}-${
|
|
2827
|
+
return /* @__PURE__ */ n("span", { className: "pagination__dots", children: "..." }, `${s}-${u}`);
|
|
2679
2828
|
const d = s === e;
|
|
2680
2829
|
return /* @__PURE__ */ n(
|
|
2681
2830
|
"button",
|
|
@@ -2697,13 +2846,13 @@ const on = ({
|
|
|
2697
2846
|
onClick: () => o(e + 1),
|
|
2698
2847
|
disabled: e === t,
|
|
2699
2848
|
"aria-label": "Next page",
|
|
2700
|
-
children: /* @__PURE__ */ n(
|
|
2849
|
+
children: /* @__PURE__ */ n(M, { name: "chevron-right", size: 16 })
|
|
2701
2850
|
}
|
|
2702
2851
|
)
|
|
2703
2852
|
] });
|
|
2704
2853
|
};
|
|
2705
|
-
|
|
2706
|
-
const
|
|
2854
|
+
dn.displayName = "Pagination";
|
|
2855
|
+
const vr = ({
|
|
2707
2856
|
icon: e,
|
|
2708
2857
|
title: t,
|
|
2709
2858
|
description: o,
|
|
@@ -2712,30 +2861,30 @@ const dr = ({
|
|
|
2712
2861
|
...i
|
|
2713
2862
|
}) => /* @__PURE__ */ m("div", { className: p("empty-state", a), ...i, children: [
|
|
2714
2863
|
e && /* @__PURE__ */ n("div", { className: "empty-state__icon", children: e }),
|
|
2715
|
-
/* @__PURE__ */ n(
|
|
2716
|
-
o && /* @__PURE__ */ n(
|
|
2864
|
+
/* @__PURE__ */ n(Je, { children: t }),
|
|
2865
|
+
o && /* @__PURE__ */ n(T, { color: "neutral", children: o }),
|
|
2717
2866
|
r && /* @__PURE__ */ n("div", { className: "empty-state__action", children: r })
|
|
2718
|
-
] }),
|
|
2867
|
+
] }), un = ({
|
|
2719
2868
|
open: e,
|
|
2720
2869
|
onClose: t,
|
|
2721
2870
|
title: o,
|
|
2722
2871
|
description: r,
|
|
2723
2872
|
children: a,
|
|
2724
2873
|
footer: i,
|
|
2725
|
-
size: c = "
|
|
2874
|
+
size: c = "medium",
|
|
2726
2875
|
closeOnOverlayClick: s = !0,
|
|
2727
|
-
className:
|
|
2876
|
+
className: u
|
|
2728
2877
|
}) => {
|
|
2729
|
-
const [d,
|
|
2730
|
-
return
|
|
2878
|
+
const [d, h] = z(!1);
|
|
2879
|
+
return E(() => {
|
|
2731
2880
|
if (!e) return;
|
|
2732
|
-
const
|
|
2881
|
+
const k = (v) => {
|
|
2733
2882
|
v.key === "Escape" && t();
|
|
2734
2883
|
};
|
|
2735
|
-
return document.addEventListener("keydown",
|
|
2736
|
-
document.removeEventListener("keydown",
|
|
2884
|
+
return document.addEventListener("keydown", k), document.body.style.overflow = "hidden", h(!0), () => {
|
|
2885
|
+
document.removeEventListener("keydown", k), document.body.style.overflow = "";
|
|
2737
2886
|
};
|
|
2738
|
-
}, [e, t]), !e || !d ? null :
|
|
2887
|
+
}, [e, t]), !e || !d ? null : J(
|
|
2739
2888
|
/* @__PURE__ */ n(
|
|
2740
2889
|
"div",
|
|
2741
2890
|
{
|
|
@@ -2749,22 +2898,22 @@ const dr = ({
|
|
|
2749
2898
|
"aria-labelledby": o ? "modal-title" : void 0,
|
|
2750
2899
|
"aria-describedby": r ? "modal-description" : void 0,
|
|
2751
2900
|
tabIndex: -1,
|
|
2752
|
-
className: p("modal", `modal--${c}`,
|
|
2753
|
-
onClick: (
|
|
2901
|
+
className: p("modal", `modal--${c}`, u),
|
|
2902
|
+
onClick: (k) => k.stopPropagation(),
|
|
2754
2903
|
children: [
|
|
2755
2904
|
(o || r) && /* @__PURE__ */ m("div", { className: "modal-header", children: [
|
|
2756
2905
|
/* @__PURE__ */ m("div", { children: [
|
|
2757
|
-
o && /* @__PURE__ */ n(
|
|
2906
|
+
o && /* @__PURE__ */ n(me, { id: "modal-title", className: "modal-title", children: o }),
|
|
2758
2907
|
r && /* @__PURE__ */ n("p", { id: "modal-description", className: "modal-description", children: r })
|
|
2759
2908
|
] }),
|
|
2760
2909
|
/* @__PURE__ */ n(
|
|
2761
|
-
|
|
2910
|
+
Y,
|
|
2762
2911
|
{
|
|
2763
|
-
icon: /* @__PURE__ */ n(
|
|
2912
|
+
icon: /* @__PURE__ */ n(M, { name: "close", size: 16 }),
|
|
2764
2913
|
"aria-label": "Close modal",
|
|
2765
2914
|
variant: "ghost",
|
|
2766
|
-
color: "
|
|
2767
|
-
size: "
|
|
2915
|
+
color: "neutral",
|
|
2916
|
+
size: "small",
|
|
2768
2917
|
onClick: t
|
|
2769
2918
|
}
|
|
2770
2919
|
)
|
|
@@ -2779,24 +2928,24 @@ const dr = ({
|
|
|
2779
2928
|
document.body
|
|
2780
2929
|
);
|
|
2781
2930
|
};
|
|
2782
|
-
|
|
2783
|
-
const
|
|
2931
|
+
un.displayName = "Modal";
|
|
2932
|
+
const hn = ({
|
|
2784
2933
|
isOpen: e,
|
|
2785
2934
|
onClose: t,
|
|
2786
2935
|
title: o,
|
|
2787
2936
|
placement: r = "right",
|
|
2788
2937
|
children: a,
|
|
2789
2938
|
footer: i,
|
|
2790
|
-
size: c = "
|
|
2939
|
+
size: c = "medium",
|
|
2791
2940
|
className: s,
|
|
2792
|
-
closeOnOverlayClick:
|
|
2941
|
+
closeOnOverlayClick: u = !0
|
|
2793
2942
|
}) => {
|
|
2794
|
-
const [d,
|
|
2795
|
-
return
|
|
2943
|
+
const [d, h] = z(!1);
|
|
2944
|
+
return E(() => (h(!0), e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
|
|
2796
2945
|
document.body.style.overflow = "unset";
|
|
2797
|
-
}), [e]), d ?
|
|
2798
|
-
/* @__PURE__ */ m(
|
|
2799
|
-
e && /* @__PURE__ */ n("div", { className: "drawer-overlay", onClick:
|
|
2946
|
+
}), [e]), d ? J(
|
|
2947
|
+
/* @__PURE__ */ m(X, { children: [
|
|
2948
|
+
e && /* @__PURE__ */ n("div", { className: "drawer-overlay", onClick: u ? t : void 0 }),
|
|
2800
2949
|
/* @__PURE__ */ m(
|
|
2801
2950
|
"div",
|
|
2802
2951
|
{
|
|
@@ -2812,13 +2961,13 @@ const an = ({
|
|
|
2812
2961
|
"aria-hidden": !e,
|
|
2813
2962
|
children: [
|
|
2814
2963
|
/* @__PURE__ */ m("div", { className: "drawer-header", children: [
|
|
2815
|
-
o ? /* @__PURE__ */ n(
|
|
2964
|
+
o ? /* @__PURE__ */ n(me, { className: "drawer-title", children: o }) : /* @__PURE__ */ n("span", {}),
|
|
2816
2965
|
/* @__PURE__ */ n(
|
|
2817
|
-
|
|
2966
|
+
Y,
|
|
2818
2967
|
{
|
|
2819
|
-
icon: /* @__PURE__ */ n(
|
|
2968
|
+
icon: /* @__PURE__ */ n(M, { name: "close", size: 16 }),
|
|
2820
2969
|
variant: "ghost",
|
|
2821
|
-
size: "
|
|
2970
|
+
size: "small",
|
|
2822
2971
|
onClick: t,
|
|
2823
2972
|
"aria-label": "Fechar painel"
|
|
2824
2973
|
}
|
|
@@ -2833,57 +2982,57 @@ const an = ({
|
|
|
2833
2982
|
document.body
|
|
2834
2983
|
) : null;
|
|
2835
2984
|
};
|
|
2836
|
-
|
|
2837
|
-
function
|
|
2838
|
-
const a =
|
|
2985
|
+
hn.displayName = "Drawer";
|
|
2986
|
+
function yr({ content: e, placement: t = "top", children: o, delay: r = 300 }) {
|
|
2987
|
+
const a = oe(), i = R(null), c = R(), [s, u] = z(!1), [d, h] = z({ top: 0, left: 0 }), k = H(() => {
|
|
2839
2988
|
if (!i.current) return;
|
|
2840
|
-
const
|
|
2989
|
+
const f = i.current.getBoundingClientRect(), x = 10;
|
|
2841
2990
|
if (t === "top") {
|
|
2842
|
-
|
|
2991
|
+
h({ top: f.top + window.scrollY - x, left: f.left + f.width / 2 + window.scrollX });
|
|
2843
2992
|
return;
|
|
2844
2993
|
}
|
|
2845
2994
|
if (t === "bottom") {
|
|
2846
|
-
|
|
2995
|
+
h({ top: f.bottom + window.scrollY + x, left: f.left + f.width / 2 + window.scrollX });
|
|
2847
2996
|
return;
|
|
2848
2997
|
}
|
|
2849
2998
|
if (t === "left") {
|
|
2850
|
-
|
|
2999
|
+
h({ top: f.top + f.height / 2 + window.scrollY, left: f.left + window.scrollX - x });
|
|
2851
3000
|
return;
|
|
2852
3001
|
}
|
|
2853
|
-
|
|
2854
|
-
}, [t]), v =
|
|
3002
|
+
h({ top: f.top + f.height / 2 + window.scrollY, left: f.right + window.scrollX + x });
|
|
3003
|
+
}, [t]), v = H(() => {
|
|
2855
3004
|
c.current = window.setTimeout(() => {
|
|
2856
|
-
|
|
3005
|
+
k(), u(!0);
|
|
2857
3006
|
}, r);
|
|
2858
|
-
}, [r,
|
|
2859
|
-
window.clearTimeout(c.current),
|
|
3007
|
+
}, [r, k]), b = H(() => {
|
|
3008
|
+
window.clearTimeout(c.current), u(!1);
|
|
2860
3009
|
}, []);
|
|
2861
|
-
|
|
3010
|
+
E(() => {
|
|
2862
3011
|
if (!s) return;
|
|
2863
|
-
const
|
|
2864
|
-
return window.addEventListener("scroll",
|
|
2865
|
-
window.removeEventListener("scroll",
|
|
3012
|
+
const f = () => k();
|
|
3013
|
+
return window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
3014
|
+
window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
2866
3015
|
};
|
|
2867
|
-
}, [s,
|
|
2868
|
-
const g =
|
|
3016
|
+
}, [s, k]);
|
|
3017
|
+
const g = _.cloneElement(o, {
|
|
2869
3018
|
ref: i,
|
|
2870
|
-
onMouseEnter: (
|
|
2871
|
-
o.props.onMouseEnter?.(
|
|
3019
|
+
onMouseEnter: (f) => {
|
|
3020
|
+
o.props.onMouseEnter?.(f), v();
|
|
2872
3021
|
},
|
|
2873
|
-
onMouseLeave: (
|
|
2874
|
-
o.props.onMouseLeave?.(
|
|
3022
|
+
onMouseLeave: (f) => {
|
|
3023
|
+
o.props.onMouseLeave?.(f), b();
|
|
2875
3024
|
},
|
|
2876
|
-
onFocus: (
|
|
2877
|
-
o.props.onFocus?.(
|
|
3025
|
+
onFocus: (f) => {
|
|
3026
|
+
o.props.onFocus?.(f), v();
|
|
2878
3027
|
},
|
|
2879
|
-
onBlur: (
|
|
2880
|
-
o.props.onBlur?.(
|
|
3028
|
+
onBlur: (f) => {
|
|
3029
|
+
o.props.onBlur?.(f), b();
|
|
2881
3030
|
},
|
|
2882
3031
|
"aria-describedby": s ? a : o.props["aria-describedby"]
|
|
2883
3032
|
});
|
|
2884
|
-
return /* @__PURE__ */ m(
|
|
3033
|
+
return /* @__PURE__ */ m(X, { children: [
|
|
2885
3034
|
g,
|
|
2886
|
-
s &&
|
|
3035
|
+
s && J(
|
|
2887
3036
|
/* @__PURE__ */ n(
|
|
2888
3037
|
"div",
|
|
2889
3038
|
{
|
|
@@ -2898,21 +3047,22 @@ function hr({ content: e, placement: t = "top", children: o, delay: r = 300 }) {
|
|
|
2898
3047
|
)
|
|
2899
3048
|
] });
|
|
2900
3049
|
}
|
|
2901
|
-
const
|
|
2902
|
-
success: /* @__PURE__ */ n(
|
|
2903
|
-
warning: /* @__PURE__ */ n(
|
|
2904
|
-
|
|
2905
|
-
|
|
3050
|
+
const be = Q(null), he = {
|
|
3051
|
+
success: /* @__PURE__ */ n(M, { name: "check", size: 16 }),
|
|
3052
|
+
warning: /* @__PURE__ */ n(M, { name: "warning", size: 16 }),
|
|
3053
|
+
error: /* @__PURE__ */ n(M, { name: "close", size: 16 }),
|
|
3054
|
+
neutral: /* @__PURE__ */ n(M, { name: "info", size: 16 }),
|
|
3055
|
+
primary: /* @__PURE__ */ n(M, { name: "info", size: 16 })
|
|
2906
3056
|
};
|
|
2907
|
-
function
|
|
2908
|
-
const [o, r] =
|
|
3057
|
+
function pn({ toast: e, onDismiss: t }) {
|
|
3058
|
+
const [o, r] = z(!1), a = H(() => {
|
|
2909
3059
|
r(!0), setTimeout(() => t(e.id), 250);
|
|
2910
3060
|
}, [e.id, t]);
|
|
2911
|
-
|
|
3061
|
+
E(() => {
|
|
2912
3062
|
const s = setTimeout(a, e.duration ?? 4e3);
|
|
2913
3063
|
return () => clearTimeout(s);
|
|
2914
3064
|
}, [a, e.duration]);
|
|
2915
|
-
const i = e.color ?? "primary", c =
|
|
3065
|
+
const i = e.color ?? "primary", c = he[i] || he.primary;
|
|
2916
3066
|
return /* @__PURE__ */ m("div", { className: p("toast", `toast--${i}`, o && "toast--exiting"), children: [
|
|
2917
3067
|
/* @__PURE__ */ n("span", { className: "toast-icon", children: c }),
|
|
2918
3068
|
/* @__PURE__ */ m("div", { className: "toast-content", children: [
|
|
@@ -2920,47 +3070,47 @@ function sn({ toast: e, onDismiss: t }) {
|
|
|
2920
3070
|
e.description && /* @__PURE__ */ n("p", { className: "toast-description", children: e.description })
|
|
2921
3071
|
] }),
|
|
2922
3072
|
/* @__PURE__ */ n(
|
|
2923
|
-
|
|
3073
|
+
Y,
|
|
2924
3074
|
{
|
|
2925
|
-
icon: /* @__PURE__ */ n(
|
|
3075
|
+
icon: /* @__PURE__ */ n(M, { name: "close", size: 14 }),
|
|
2926
3076
|
"aria-label": "Dismiss notification",
|
|
2927
3077
|
variant: "ghost",
|
|
2928
|
-
size: "
|
|
3078
|
+
size: "small",
|
|
2929
3079
|
onClick: a,
|
|
2930
3080
|
className: "toast-close"
|
|
2931
3081
|
}
|
|
2932
3082
|
)
|
|
2933
3083
|
] });
|
|
2934
3084
|
}
|
|
2935
|
-
const
|
|
3085
|
+
const mn = ({
|
|
2936
3086
|
children: e,
|
|
2937
3087
|
position: t = "top-right",
|
|
2938
3088
|
maxToasts: o = 5
|
|
2939
3089
|
}) => {
|
|
2940
|
-
const [r, a] =
|
|
2941
|
-
|
|
3090
|
+
const [r, a] = z(!1), [i, c] = z([]);
|
|
3091
|
+
E(() => {
|
|
2942
3092
|
a(!0);
|
|
2943
3093
|
}, []);
|
|
2944
|
-
const s =
|
|
2945
|
-
const
|
|
2946
|
-
c((
|
|
2947
|
-
}, [o]),
|
|
2948
|
-
c((
|
|
3094
|
+
const s = H((d) => {
|
|
3095
|
+
const h = `toast-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
3096
|
+
c((k) => [...k.slice(-(o - 1)), { ...d, id: h }]);
|
|
3097
|
+
}, [o]), u = H((d) => {
|
|
3098
|
+
c((h) => h.filter((k) => k.id !== d));
|
|
2949
3099
|
}, []);
|
|
2950
|
-
return /* @__PURE__ */ m(
|
|
3100
|
+
return /* @__PURE__ */ m(be.Provider, { value: { toast: s, dismiss: u }, children: [
|
|
2951
3101
|
e,
|
|
2952
|
-
r &&
|
|
2953
|
-
/* @__PURE__ */ n("div", { className: p("toast-container", `toast-container--${t}`), children: i.map((d) => /* @__PURE__ */ n(
|
|
3102
|
+
r && J(
|
|
3103
|
+
/* @__PURE__ */ n("div", { className: p("toast-container", `toast-container--${t}`), children: i.map((d) => /* @__PURE__ */ n(pn, { toast: d, onDismiss: u }, d.id)) }),
|
|
2954
3104
|
document.body
|
|
2955
3105
|
)
|
|
2956
3106
|
] });
|
|
2957
3107
|
};
|
|
2958
|
-
function
|
|
2959
|
-
const e =
|
|
3108
|
+
function br() {
|
|
3109
|
+
const e = Z(be);
|
|
2960
3110
|
if (!e) throw new Error("useToast must be used inside <ToastProvider>");
|
|
2961
3111
|
return e;
|
|
2962
3112
|
}
|
|
2963
|
-
const
|
|
3113
|
+
const kn = ({
|
|
2964
3114
|
striped: e = !1,
|
|
2965
3115
|
hover: t = !0,
|
|
2966
3116
|
compact: o = !1,
|
|
@@ -2986,14 +3136,14 @@ const cn = ({
|
|
|
2986
3136
|
...s,
|
|
2987
3137
|
children: c
|
|
2988
3138
|
}
|
|
2989
|
-
) }),
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
const
|
|
3139
|
+
) }), fn = (e) => /* @__PURE__ */ n("thead", { ...e }), vn = (e) => /* @__PURE__ */ n("tbody", { ...e }), yn = (e) => /* @__PURE__ */ n("tr", { ...e }), bn = (e) => /* @__PURE__ */ n("th", { ...e }), gn = (e) => /* @__PURE__ */ n("td", { ...e });
|
|
3140
|
+
kn.displayName = "Table";
|
|
3141
|
+
fn.displayName = "Thead";
|
|
3142
|
+
vn.displayName = "Tbody";
|
|
3143
|
+
yn.displayName = "Tr";
|
|
3144
|
+
bn.displayName = "Th";
|
|
3145
|
+
gn.displayName = "Td";
|
|
3146
|
+
const ge = Q({
|
|
2997
3147
|
collapsed: !1,
|
|
2998
3148
|
toggleCollapsed: () => {
|
|
2999
3149
|
},
|
|
@@ -3004,36 +3154,36 @@ const be = ee({
|
|
|
3004
3154
|
searchPlaceholder: "Buscar item"
|
|
3005
3155
|
});
|
|
3006
3156
|
function ce() {
|
|
3007
|
-
return
|
|
3157
|
+
return Z(ge);
|
|
3008
3158
|
}
|
|
3009
|
-
function
|
|
3010
|
-
return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(
|
|
3159
|
+
function te(e) {
|
|
3160
|
+
return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(te).join(" ") : _.isValidElement(e) ? te(e.props.children) : "";
|
|
3011
3161
|
}
|
|
3012
|
-
function
|
|
3162
|
+
function xe(e) {
|
|
3013
3163
|
let t = 0;
|
|
3014
|
-
return
|
|
3015
|
-
if (
|
|
3164
|
+
return _.Children.forEach(e, (o) => {
|
|
3165
|
+
if (_.isValidElement(o)) {
|
|
3016
3166
|
if (o.type === de) {
|
|
3017
3167
|
t += 1;
|
|
3018
3168
|
return;
|
|
3019
3169
|
}
|
|
3020
|
-
t +=
|
|
3170
|
+
t += xe(o.props.children);
|
|
3021
3171
|
}
|
|
3022
3172
|
}), t;
|
|
3023
3173
|
}
|
|
3024
|
-
function
|
|
3025
|
-
for (const t of
|
|
3026
|
-
if (!
|
|
3174
|
+
function we(e) {
|
|
3175
|
+
for (const t of _.Children.toArray(e)) {
|
|
3176
|
+
if (!_.isValidElement(t))
|
|
3027
3177
|
continue;
|
|
3028
3178
|
if (t.type === de)
|
|
3029
3179
|
return t;
|
|
3030
|
-
const o =
|
|
3180
|
+
const o = we(t.props.children);
|
|
3031
3181
|
if (o)
|
|
3032
3182
|
return o;
|
|
3033
3183
|
}
|
|
3034
3184
|
return null;
|
|
3035
3185
|
}
|
|
3036
|
-
function
|
|
3186
|
+
function xn({
|
|
3037
3187
|
collapsed: e,
|
|
3038
3188
|
defaultCollapsed: t = !1,
|
|
3039
3189
|
onToggle: o,
|
|
@@ -3043,35 +3193,35 @@ function kn({
|
|
|
3043
3193
|
searchPlaceholder: c = "Buscar item",
|
|
3044
3194
|
...s
|
|
3045
3195
|
}) {
|
|
3046
|
-
const [
|
|
3047
|
-
(j) =>
|
|
3048
|
-
),
|
|
3049
|
-
const j = !
|
|
3196
|
+
const [u, d] = z(t), [h, k] = z(""), v = e !== void 0, b = v ? e : u, f = G(() => xe(a), [a]) > i && !b, x = _.Children.toArray(a), y = x.findIndex(
|
|
3197
|
+
(j) => _.isValidElement(j) && j.type === _e
|
|
3198
|
+
), I = () => {
|
|
3199
|
+
const j = !b;
|
|
3050
3200
|
v || d(j), o?.(j);
|
|
3051
|
-
},
|
|
3201
|
+
}, L = G(
|
|
3052
3202
|
() => ({
|
|
3053
|
-
collapsed:
|
|
3054
|
-
toggleCollapsed:
|
|
3055
|
-
searchTerm:
|
|
3056
|
-
setSearchTerm:
|
|
3057
|
-
enableSearch:
|
|
3203
|
+
collapsed: b,
|
|
3204
|
+
toggleCollapsed: I,
|
|
3205
|
+
searchTerm: h,
|
|
3206
|
+
setSearchTerm: k,
|
|
3207
|
+
enableSearch: f,
|
|
3058
3208
|
searchPlaceholder: c
|
|
3059
3209
|
}),
|
|
3060
|
-
[
|
|
3210
|
+
[b, h, f, c]
|
|
3061
3211
|
);
|
|
3062
|
-
return /* @__PURE__ */ n(
|
|
3212
|
+
return /* @__PURE__ */ n(ge.Provider, { value: L, children: /* @__PURE__ */ m(
|
|
3063
3213
|
"aside",
|
|
3064
3214
|
{
|
|
3065
|
-
className: p("sidebar",
|
|
3215
|
+
className: p("sidebar", b && "sidebar--collapsed", r),
|
|
3066
3216
|
...s,
|
|
3067
3217
|
children: [
|
|
3068
|
-
|
|
3069
|
-
|
|
3218
|
+
y === -1 ? a : x.slice(0, y),
|
|
3219
|
+
y === -1 ? null : x.slice(y)
|
|
3070
3220
|
]
|
|
3071
3221
|
}
|
|
3072
3222
|
) });
|
|
3073
3223
|
}
|
|
3074
|
-
function
|
|
3224
|
+
function wn({
|
|
3075
3225
|
icon: e,
|
|
3076
3226
|
logo: t,
|
|
3077
3227
|
collapsible: o = !0,
|
|
@@ -3080,18 +3230,18 @@ function fn({
|
|
|
3080
3230
|
onClick: i,
|
|
3081
3231
|
...c
|
|
3082
3232
|
}) {
|
|
3083
|
-
const { collapsed: s, toggleCollapsed:
|
|
3084
|
-
o &&
|
|
3233
|
+
const { collapsed: s, toggleCollapsed: u, enableSearch: d, searchTerm: h, setSearchTerm: k, searchPlaceholder: v } = ce(), b = (g) => {
|
|
3234
|
+
o && u(), i?.(g);
|
|
3085
3235
|
};
|
|
3086
|
-
return /* @__PURE__ */ m(
|
|
3236
|
+
return /* @__PURE__ */ m(X, { children: [
|
|
3087
3237
|
/* @__PURE__ */ m(
|
|
3088
3238
|
"div",
|
|
3089
3239
|
{
|
|
3090
3240
|
className: p("sidebar__header", r),
|
|
3091
|
-
onClick:
|
|
3241
|
+
onClick: b,
|
|
3092
3242
|
...c,
|
|
3093
3243
|
children: [
|
|
3094
|
-
/* @__PURE__ */ n("div", { className: "sidebar__header-icon", children: e ?? /* @__PURE__ */ n(
|
|
3244
|
+
/* @__PURE__ */ n("div", { className: "sidebar__header-icon", children: e ?? /* @__PURE__ */ n(M, { name: "menu" }) }),
|
|
3095
3245
|
!s && /* @__PURE__ */ n("div", { className: "sidebar__header-content", children: t ?? a })
|
|
3096
3246
|
]
|
|
3097
3247
|
}
|
|
@@ -3099,11 +3249,11 @@ function fn({
|
|
|
3099
3249
|
d ? /* @__PURE__ */ n("div", { className: "sidebar__search sidebar__search--header", children: /* @__PURE__ */ n(
|
|
3100
3250
|
se,
|
|
3101
3251
|
{
|
|
3102
|
-
value:
|
|
3103
|
-
onChange: (g) =>
|
|
3252
|
+
value: h,
|
|
3253
|
+
onChange: (g) => k(g.target.value),
|
|
3104
3254
|
placeholder: v,
|
|
3105
|
-
prefix: /* @__PURE__ */ n(
|
|
3106
|
-
size: "
|
|
3255
|
+
prefix: /* @__PURE__ */ n(M, { name: "search", size: 16 }),
|
|
3256
|
+
size: "small",
|
|
3107
3257
|
full: !0
|
|
3108
3258
|
}
|
|
3109
3259
|
) }) : null
|
|
@@ -3118,8 +3268,8 @@ function de({
|
|
|
3118
3268
|
searchText: i,
|
|
3119
3269
|
...c
|
|
3120
3270
|
}) {
|
|
3121
|
-
const { collapsed: s, searchTerm:
|
|
3122
|
-
return !
|
|
3271
|
+
const { collapsed: s, searchTerm: u } = ce(), d = o || "button", h = (i ?? te(a)).trim().toLocaleLowerCase(), k = u.trim().toLocaleLowerCase();
|
|
3272
|
+
return !k || h.includes(k) ? /* @__PURE__ */ m(
|
|
3123
3273
|
d,
|
|
3124
3274
|
{
|
|
3125
3275
|
className: p(
|
|
@@ -3135,7 +3285,7 @@ function de({
|
|
|
3135
3285
|
}
|
|
3136
3286
|
) : null;
|
|
3137
3287
|
}
|
|
3138
|
-
function
|
|
3288
|
+
function _n({
|
|
3139
3289
|
title: e,
|
|
3140
3290
|
leftIcon: t,
|
|
3141
3291
|
defaultOpen: o = !0,
|
|
@@ -3144,27 +3294,27 @@ function vn({
|
|
|
3144
3294
|
collapsible: i = !0,
|
|
3145
3295
|
className: c,
|
|
3146
3296
|
children: s,
|
|
3147
|
-
...
|
|
3297
|
+
...u
|
|
3148
3298
|
}) {
|
|
3149
|
-
const { collapsed: d, searchTerm:
|
|
3150
|
-
if (!
|
|
3299
|
+
const { collapsed: d, searchTerm: h } = ce(), [k, v] = z(o), b = r !== void 0, g = b ? r : k, f = h.trim().toLocaleLowerCase(), x = te(s).toLocaleLowerCase(), y = !f || x.includes(f), I = !!(f && y), L = d ? !1 : I || g, j = we(s);
|
|
3300
|
+
if (!y)
|
|
3151
3301
|
return null;
|
|
3152
|
-
const N = (
|
|
3302
|
+
const N = ($) => {
|
|
3153
3303
|
if (d) {
|
|
3154
|
-
const
|
|
3155
|
-
typeof
|
|
3304
|
+
const S = j?.props?.onClick;
|
|
3305
|
+
typeof S == "function" && S($);
|
|
3156
3306
|
return;
|
|
3157
3307
|
}
|
|
3158
|
-
if (!i ||
|
|
3308
|
+
if (!i || I)
|
|
3159
3309
|
return;
|
|
3160
3310
|
const w = !g;
|
|
3161
|
-
|
|
3311
|
+
b || v(w), a?.(w);
|
|
3162
3312
|
};
|
|
3163
3313
|
return /* @__PURE__ */ m(
|
|
3164
3314
|
"div",
|
|
3165
3315
|
{
|
|
3166
|
-
className: p("sidebar__group",
|
|
3167
|
-
...
|
|
3316
|
+
className: p("sidebar__group", L && "sidebar__group--open", c),
|
|
3317
|
+
...u,
|
|
3168
3318
|
children: [
|
|
3169
3319
|
/* @__PURE__ */ m(
|
|
3170
3320
|
"button",
|
|
@@ -3172,58 +3322,58 @@ function vn({
|
|
|
3172
3322
|
type: "button",
|
|
3173
3323
|
className: "sidebar__group-trigger",
|
|
3174
3324
|
onClick: N,
|
|
3175
|
-
"aria-expanded":
|
|
3176
|
-
disabled: !i ||
|
|
3325
|
+
"aria-expanded": L,
|
|
3326
|
+
disabled: !i || I,
|
|
3177
3327
|
children: [
|
|
3178
3328
|
t ? /* @__PURE__ */ n("span", { className: "sidebar__group-left-icon", children: t }) : null,
|
|
3179
3329
|
d ? null : /* @__PURE__ */ n("span", { className: "sidebar__group-title", children: e }),
|
|
3180
|
-
/* @__PURE__ */ n("span", { className: "sidebar__group-icon", children: /* @__PURE__ */ n(
|
|
3330
|
+
/* @__PURE__ */ n("span", { className: "sidebar__group-icon", children: /* @__PURE__ */ n(M, { name: "chevron-down", size: 16 }) })
|
|
3181
3331
|
]
|
|
3182
3332
|
}
|
|
3183
3333
|
),
|
|
3184
|
-
|
|
3334
|
+
L ? /* @__PURE__ */ n("div", { className: "sidebar__group-content", children: s }) : null
|
|
3185
3335
|
]
|
|
3186
3336
|
}
|
|
3187
3337
|
);
|
|
3188
3338
|
}
|
|
3189
|
-
function
|
|
3339
|
+
function _e({
|
|
3190
3340
|
className: e,
|
|
3191
3341
|
children: t,
|
|
3192
3342
|
...o
|
|
3193
3343
|
}) {
|
|
3194
3344
|
return /* @__PURE__ */ n("div", { className: p("sidebar__footer", e), ...o, children: t });
|
|
3195
3345
|
}
|
|
3196
|
-
const
|
|
3197
|
-
Header:
|
|
3346
|
+
const Ln = Object.assign(xn, {
|
|
3347
|
+
Header: wn,
|
|
3198
3348
|
Item: de,
|
|
3199
|
-
Group:
|
|
3200
|
-
Footer:
|
|
3349
|
+
Group: _n,
|
|
3350
|
+
Footer: _e
|
|
3201
3351
|
});
|
|
3202
|
-
|
|
3203
|
-
const
|
|
3204
|
-
const e =
|
|
3352
|
+
Ln.displayName = "Sidebar";
|
|
3353
|
+
const Le = Q(void 0), Nn = () => {
|
|
3354
|
+
const e = Z(Le);
|
|
3205
3355
|
if (!e)
|
|
3206
3356
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
3207
3357
|
return e;
|
|
3208
|
-
},
|
|
3358
|
+
}, gr = ({
|
|
3209
3359
|
children: e,
|
|
3210
3360
|
defaultTheme: t = "dark",
|
|
3211
3361
|
storageKey: o = "theme",
|
|
3212
3362
|
toastPosition: r,
|
|
3213
3363
|
toastMaxToasts: a
|
|
3214
3364
|
}) => {
|
|
3215
|
-
const [i, c] =
|
|
3216
|
-
|
|
3365
|
+
const [i, c] = z(() => localStorage.getItem(o) || t);
|
|
3366
|
+
E(() => {
|
|
3217
3367
|
const d = window.document.documentElement;
|
|
3218
3368
|
d.classList.remove("theme-light", "theme-dark"), d.classList.add(`theme-${i}`), d.setAttribute("data-theme", i), localStorage.setItem(o, i);
|
|
3219
3369
|
}, [i, o]);
|
|
3220
3370
|
const s = () => {
|
|
3221
3371
|
c((d) => d === "light" ? "dark" : "light");
|
|
3222
|
-
},
|
|
3372
|
+
}, u = (d) => {
|
|
3223
3373
|
c(d);
|
|
3224
3374
|
};
|
|
3225
|
-
return /* @__PURE__ */ n(
|
|
3226
|
-
},
|
|
3375
|
+
return /* @__PURE__ */ n(Le.Provider, { value: { theme: i, toggleTheme: s, setTheme: u }, children: /* @__PURE__ */ n(mn, { position: r, maxToasts: a, children: e }) });
|
|
3376
|
+
}, Cn = ({
|
|
3227
3377
|
logo: e,
|
|
3228
3378
|
navItems: t = [],
|
|
3229
3379
|
navPosition: o = "center",
|
|
@@ -3232,37 +3382,37 @@ const we = ee(void 0), yn = () => {
|
|
|
3232
3382
|
sticky: i = !1,
|
|
3233
3383
|
className: c,
|
|
3234
3384
|
children: s,
|
|
3235
|
-
contentInside:
|
|
3385
|
+
contentInside: u = !1,
|
|
3236
3386
|
...d
|
|
3237
3387
|
}) => {
|
|
3238
|
-
const { theme:
|
|
3239
|
-
const x =
|
|
3388
|
+
const { theme: h, toggleTheme: k } = Nn(), v = typeof window < "u" ? window.location.pathname : "", b = (f) => {
|
|
3389
|
+
const x = f.split("?")[0].split("#")[0];
|
|
3240
3390
|
return x.endsWith("/") && x !== "/" ? x.slice(0, -1) : x;
|
|
3241
|
-
}, g = () => /* @__PURE__ */ n(
|
|
3242
|
-
const
|
|
3243
|
-
return
|
|
3391
|
+
}, g = () => /* @__PURE__ */ n(q, { as: "nav", align: "center", gap: "5", className: "topbar__nav", children: t.map((f, x) => {
|
|
3392
|
+
const y = f.to ?? f.href, I = f.active ?? (y ? b(y) === b(v) : !1);
|
|
3393
|
+
return y ? /* @__PURE__ */ n(
|
|
3244
3394
|
le,
|
|
3245
3395
|
{
|
|
3246
|
-
href:
|
|
3247
|
-
className: p("topbar__nav-item",
|
|
3248
|
-
active:
|
|
3249
|
-
onClick:
|
|
3250
|
-
children:
|
|
3396
|
+
href: y,
|
|
3397
|
+
className: p("topbar__nav-item", I && "topbar__nav-item--active"),
|
|
3398
|
+
active: I,
|
|
3399
|
+
onClick: f.onClick,
|
|
3400
|
+
children: f.label
|
|
3251
3401
|
},
|
|
3252
|
-
`${
|
|
3402
|
+
`${f.label ?? "link"}-${x}`
|
|
3253
3403
|
) : /* @__PURE__ */ n(
|
|
3254
3404
|
"button",
|
|
3255
3405
|
{
|
|
3256
3406
|
type: "button",
|
|
3257
|
-
className: p("topbar__nav-item",
|
|
3258
|
-
onClick:
|
|
3259
|
-
children:
|
|
3407
|
+
className: p("topbar__nav-item", I && "topbar__nav-item--active"),
|
|
3408
|
+
onClick: f.onClick,
|
|
3409
|
+
children: f.label
|
|
3260
3410
|
},
|
|
3261
|
-
`${
|
|
3411
|
+
`${f.label ?? "button"}-${x}`
|
|
3262
3412
|
);
|
|
3263
3413
|
}) });
|
|
3264
3414
|
return /* @__PURE__ */ m(
|
|
3265
|
-
|
|
3415
|
+
q,
|
|
3266
3416
|
{
|
|
3267
3417
|
as: "header",
|
|
3268
3418
|
align: "center",
|
|
@@ -3271,35 +3421,35 @@ const we = ee(void 0), yn = () => {
|
|
|
3271
3421
|
"topbar",
|
|
3272
3422
|
i && "topbar--sticky",
|
|
3273
3423
|
o === "right" && "topbar--nav-right",
|
|
3274
|
-
|
|
3424
|
+
u && "topbar--with-children",
|
|
3275
3425
|
c
|
|
3276
3426
|
),
|
|
3277
3427
|
...d,
|
|
3278
3428
|
children: [
|
|
3279
|
-
/* @__PURE__ */ n(
|
|
3280
|
-
o === "center" && t.length > 0 && /* @__PURE__ */ n(
|
|
3281
|
-
|
|
3282
|
-
/* @__PURE__ */ m(
|
|
3429
|
+
/* @__PURE__ */ n(q, { align: "center", gap: "4", className: "topbar__left", children: e && /* @__PURE__ */ n("div", { className: "topbar__logo", children: e }) }),
|
|
3430
|
+
o === "center" && t.length > 0 && /* @__PURE__ */ n(q, { align: "center", justify: "center", className: "topbar__center", children: g() }),
|
|
3431
|
+
u && s && /* @__PURE__ */ n("div", { className: "topbar__content", children: s }),
|
|
3432
|
+
/* @__PURE__ */ m(q, { align: "center", gap: "4", className: "topbar__right", children: [
|
|
3283
3433
|
o === "right" && t.length > 0 && g(),
|
|
3284
3434
|
r,
|
|
3285
3435
|
a && /* @__PURE__ */ n(
|
|
3286
|
-
|
|
3436
|
+
Y,
|
|
3287
3437
|
{
|
|
3288
|
-
icon:
|
|
3438
|
+
icon: h === "dark" ? /* @__PURE__ */ n(M, { name: "sun", size: 16 }) : /* @__PURE__ */ n(M, { name: "moon", size: 16 }),
|
|
3289
3439
|
variant: "ghost",
|
|
3290
|
-
size: "
|
|
3440
|
+
size: "small",
|
|
3291
3441
|
label: "Toggle theme",
|
|
3292
|
-
onClick:
|
|
3442
|
+
onClick: k
|
|
3293
3443
|
}
|
|
3294
3444
|
)
|
|
3295
3445
|
] }),
|
|
3296
|
-
!
|
|
3446
|
+
!u && s && /* @__PURE__ */ n("div", { className: "topbar__children", children: s })
|
|
3297
3447
|
]
|
|
3298
3448
|
}
|
|
3299
3449
|
);
|
|
3300
3450
|
};
|
|
3301
|
-
|
|
3302
|
-
const
|
|
3451
|
+
Cn.displayName = "TopBar";
|
|
3452
|
+
const xr = ({
|
|
3303
3453
|
title: e,
|
|
3304
3454
|
description: t,
|
|
3305
3455
|
showBack: o = !1,
|
|
@@ -3311,22 +3461,22 @@ const mr = ({
|
|
|
3311
3461
|
}) => /* @__PURE__ */ m("div", { className: p("page-header", c), ...s, children: [
|
|
3312
3462
|
/* @__PURE__ */ m("div", { className: "page-header__left", children: [
|
|
3313
3463
|
o && /* @__PURE__ */ n(
|
|
3314
|
-
|
|
3464
|
+
Y,
|
|
3315
3465
|
{
|
|
3316
3466
|
variant: "ghost",
|
|
3317
|
-
size: "
|
|
3318
|
-
icon: /* @__PURE__ */ n(
|
|
3467
|
+
size: "small",
|
|
3468
|
+
icon: /* @__PURE__ */ n(M, { name: "chevron-left", size: 16 }),
|
|
3319
3469
|
onClick: r,
|
|
3320
3470
|
label: "Back"
|
|
3321
3471
|
}
|
|
3322
3472
|
),
|
|
3323
3473
|
/* @__PURE__ */ m("div", { className: "page-header__content", children: [
|
|
3324
|
-
/* @__PURE__ */ n(
|
|
3325
|
-
t && /* @__PURE__ */ n(
|
|
3474
|
+
/* @__PURE__ */ n(Qe, { weight: "bold", children: e }),
|
|
3475
|
+
t && /* @__PURE__ */ n(T, { color: "neutral", style: { width: `${a || "100%"}` }, children: t })
|
|
3326
3476
|
] })
|
|
3327
3477
|
] }),
|
|
3328
3478
|
i && /* @__PURE__ */ n("div", { className: "page-header__right", children: i })
|
|
3329
|
-
] }),
|
|
3479
|
+
] }), Mn = ({
|
|
3330
3480
|
items: e,
|
|
3331
3481
|
separator: t = "/",
|
|
3332
3482
|
className: o
|
|
@@ -3350,31 +3500,31 @@ const mr = ({
|
|
|
3350
3500
|
!i && /* @__PURE__ */ n("span", { className: "breadcrumb-separator", children: t })
|
|
3351
3501
|
] }, a);
|
|
3352
3502
|
}) }) });
|
|
3353
|
-
|
|
3354
|
-
const
|
|
3503
|
+
Mn.displayName = "Breadcrumb";
|
|
3504
|
+
const In = ({
|
|
3355
3505
|
value: e,
|
|
3356
3506
|
max: t = 100,
|
|
3357
|
-
size: o = "
|
|
3507
|
+
size: o = "medium",
|
|
3358
3508
|
color: r,
|
|
3359
3509
|
animated: a = !1,
|
|
3360
3510
|
showValue: i = !1,
|
|
3361
3511
|
label: c,
|
|
3362
3512
|
className: s,
|
|
3363
|
-
style:
|
|
3513
|
+
style: u,
|
|
3364
3514
|
...d
|
|
3365
3515
|
}) => {
|
|
3366
|
-
const
|
|
3516
|
+
const h = Math.min(100, Math.max(0, e / t * 100));
|
|
3367
3517
|
return /* @__PURE__ */ m(
|
|
3368
3518
|
"div",
|
|
3369
3519
|
{
|
|
3370
3520
|
className: p("progress-wrapper", s),
|
|
3371
|
-
style: { "--progress-color":
|
|
3521
|
+
style: { "--progress-color": F(r), ...u ?? {} },
|
|
3372
3522
|
...d,
|
|
3373
3523
|
children: [
|
|
3374
3524
|
(c || i) && /* @__PURE__ */ m("div", { className: "progress-label", children: [
|
|
3375
3525
|
c && /* @__PURE__ */ n("span", { children: c }),
|
|
3376
3526
|
i && /* @__PURE__ */ m("span", { className: "progress-value", children: [
|
|
3377
|
-
Math.round(
|
|
3527
|
+
Math.round(h),
|
|
3378
3528
|
"%"
|
|
3379
3529
|
] })
|
|
3380
3530
|
] }),
|
|
@@ -3386,41 +3536,41 @@ const wn = ({
|
|
|
3386
3536
|
"aria-valuenow": e,
|
|
3387
3537
|
"aria-valuemin": 0,
|
|
3388
3538
|
"aria-valuemax": t,
|
|
3389
|
-
children: /* @__PURE__ */ n("div", { className: "progress-bar", style: { width: `${
|
|
3539
|
+
children: /* @__PURE__ */ n("div", { className: "progress-bar", style: { width: `${h}%` } })
|
|
3390
3540
|
}
|
|
3391
3541
|
)
|
|
3392
3542
|
]
|
|
3393
3543
|
}
|
|
3394
3544
|
);
|
|
3395
3545
|
};
|
|
3396
|
-
|
|
3397
|
-
const
|
|
3546
|
+
In.displayName = "Progress";
|
|
3547
|
+
const Bn = ({
|
|
3398
3548
|
tabs: e,
|
|
3399
3549
|
defaultValue: t,
|
|
3400
3550
|
value: o,
|
|
3401
3551
|
onChange: r,
|
|
3402
3552
|
className: a,
|
|
3403
3553
|
variant: i = "default",
|
|
3404
|
-
size: c = "
|
|
3554
|
+
size: c = "medium"
|
|
3405
3555
|
}) => {
|
|
3406
|
-
const [s,
|
|
3407
|
-
o === void 0 &&
|
|
3408
|
-
},
|
|
3556
|
+
const [s, u] = z(t ?? e[0]?.value ?? ""), d = o ?? s, h = (v) => {
|
|
3557
|
+
o === void 0 && u(v), r?.(v);
|
|
3558
|
+
}, k = e.find((v) => v.value === d);
|
|
3409
3559
|
return /* @__PURE__ */ m("div", { className: p("tabs", `tabs--${i}`, `tabs--${c}`, a), children: [
|
|
3410
3560
|
/* @__PURE__ */ n("div", { className: "tabs-list", role: "tablist", children: e.map((v) => {
|
|
3411
|
-
const
|
|
3561
|
+
const b = d === v.value, g = p(
|
|
3412
3562
|
"tabs-trigger",
|
|
3413
|
-
|
|
3563
|
+
b && "tabs-trigger--active"
|
|
3414
3564
|
);
|
|
3415
3565
|
return v.href ? /* @__PURE__ */ n(
|
|
3416
3566
|
"a",
|
|
3417
3567
|
{
|
|
3418
3568
|
role: "tab",
|
|
3419
3569
|
href: v.href,
|
|
3420
|
-
"aria-selected":
|
|
3570
|
+
"aria-selected": b,
|
|
3421
3571
|
className: g,
|
|
3422
|
-
onClick: (
|
|
3423
|
-
v.disabled ?
|
|
3572
|
+
onClick: (f) => {
|
|
3573
|
+
v.disabled ? f.preventDefault() : h(v.value);
|
|
3424
3574
|
},
|
|
3425
3575
|
children: v.label
|
|
3426
3576
|
},
|
|
@@ -3431,9 +3581,9 @@ const Ln = ({
|
|
|
3431
3581
|
role: "tab",
|
|
3432
3582
|
type: "button",
|
|
3433
3583
|
disabled: v.disabled,
|
|
3434
|
-
"aria-selected":
|
|
3584
|
+
"aria-selected": b,
|
|
3435
3585
|
className: g,
|
|
3436
|
-
onClick: () =>
|
|
3586
|
+
onClick: () => h(v.value),
|
|
3437
3587
|
children: v.label
|
|
3438
3588
|
},
|
|
3439
3589
|
v.value
|
|
@@ -3445,223 +3595,225 @@ const Ln = ({
|
|
|
3445
3595
|
role: "tabpanel",
|
|
3446
3596
|
className: "tabs-panel",
|
|
3447
3597
|
tabIndex: 0,
|
|
3448
|
-
children:
|
|
3598
|
+
children: k?.content
|
|
3449
3599
|
}
|
|
3450
3600
|
)
|
|
3451
3601
|
] });
|
|
3452
3602
|
};
|
|
3453
|
-
|
|
3454
|
-
const
|
|
3603
|
+
Bn.displayName = "Tabs";
|
|
3604
|
+
const jn = ({ title: e, description: t, date: o, icon: r, src: a, name: i }) => /* @__PURE__ */ m("div", { className: p("timeline-item", !r && !a && !i && "timeline-item--dot"), children: [
|
|
3455
3605
|
/* @__PURE__ */ m("div", { className: "timeline-item__aside", children: [
|
|
3456
|
-
/* @__PURE__ */ n("div", { className: "timeline-item__marker", children: a || i ? /* @__PURE__ */ n(
|
|
3606
|
+
/* @__PURE__ */ n("div", { className: "timeline-item__marker", children: a || i ? /* @__PURE__ */ n(ve, { src: a, name: i, size: "small" }) : r ? /* @__PURE__ */ n("div", { className: "timeline-item__icon", children: r }) : /* @__PURE__ */ n("div", { className: "timeline-item__dot" }) }),
|
|
3457
3607
|
/* @__PURE__ */ n("div", { className: "timeline-item__line" })
|
|
3458
3608
|
] }),
|
|
3459
3609
|
/* @__PURE__ */ m("div", { className: "timeline-item__content", children: [
|
|
3460
3610
|
/* @__PURE__ */ m("div", { className: "timeline-item__header", children: [
|
|
3461
|
-
/* @__PURE__ */ n(
|
|
3462
|
-
o && /* @__PURE__ */ n(
|
|
3611
|
+
/* @__PURE__ */ n(T, { weight: "medium", children: e }),
|
|
3612
|
+
o && /* @__PURE__ */ n(T, { size: "small", color: "neutral", children: o })
|
|
3463
3613
|
] }),
|
|
3464
|
-
t && /* @__PURE__ */ n("div", { className: "timeline-item__description", children: /* @__PURE__ */ n(
|
|
3614
|
+
t && /* @__PURE__ */ n("div", { className: "timeline-item__description", children: /* @__PURE__ */ n(T, { color: "neutral", children: t }) })
|
|
3465
3615
|
] })
|
|
3466
|
-
] }),
|
|
3467
|
-
|
|
3468
|
-
|
|
3616
|
+
] }), Wn = ({ children: e, className: t, ...o }) => /* @__PURE__ */ n("div", { className: p("timeline", t), ...o, children: e });
|
|
3617
|
+
Wn.displayName = "Timeline";
|
|
3618
|
+
jn.displayName = "TimelineItem";
|
|
3469
3619
|
export {
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3620
|
+
an as Accordion,
|
|
3621
|
+
rn as AccordionItem,
|
|
3622
|
+
Dn as ActivityIcon,
|
|
3623
|
+
mr as Alert,
|
|
3624
|
+
An as AlertCircleIcon,
|
|
3625
|
+
En as AlertTriangleIcon,
|
|
3626
|
+
Hn as AlignHorizontalIcon,
|
|
3627
|
+
Vn as AlignJustifyIcon,
|
|
3628
|
+
Rn as AppWindowIcon,
|
|
3629
|
+
Fn as ArrowDownIcon,
|
|
3630
|
+
On as ArrowLeftIcon,
|
|
3631
|
+
Pn as ArrowRightIcon,
|
|
3632
|
+
Yn as ArrowUpIcon,
|
|
3633
|
+
ve as Avatar,
|
|
3634
|
+
ln as Badge,
|
|
3635
|
+
Un as BadgeIcon,
|
|
3636
|
+
qn as BatteryIcon,
|
|
3637
|
+
Gn as BellIcon,
|
|
3638
|
+
Kn as BluetoothIcon,
|
|
3639
|
+
Xn as BookIcon,
|
|
3640
|
+
cr as Box,
|
|
3641
|
+
Zn as BoxIcon,
|
|
3642
|
+
Mn as Breadcrumb,
|
|
3643
|
+
ne as Button,
|
|
3644
|
+
Qn as CalendarIcon,
|
|
3645
|
+
Jn as CameraIcon,
|
|
3646
|
+
ir as Card,
|
|
3647
|
+
sr as CardBody,
|
|
3648
|
+
lr as CardFooter,
|
|
3649
|
+
ar as CardHeader,
|
|
3650
|
+
nt as CheckIcon,
|
|
3651
|
+
et as CheckSquareIcon,
|
|
3652
|
+
Xe as Checkbox,
|
|
3653
|
+
tt as ChevronDownIcon,
|
|
3654
|
+
at as ChevronIcon,
|
|
3655
|
+
ot as ChevronLeftIcon,
|
|
3656
|
+
rt as ChevronRightIcon,
|
|
3657
|
+
it as ChevronUpIcon,
|
|
3658
|
+
st as CircleDotIcon,
|
|
3659
|
+
lt as ClockIcon,
|
|
3660
|
+
ct as CloseIcon,
|
|
3661
|
+
dt as CloudIcon,
|
|
3662
|
+
sn as Code,
|
|
3663
|
+
ut as CodeIcon,
|
|
3664
|
+
ht as ComponentIcon,
|
|
3665
|
+
ur as Container,
|
|
3666
|
+
pt as CopyIcon,
|
|
3667
|
+
mt as CreditCardIcon,
|
|
3668
|
+
kt as DatabaseIcon,
|
|
3669
|
+
Re as DatePicker,
|
|
3670
|
+
pr as Divider,
|
|
3671
|
+
ft as DownloadIcon,
|
|
3672
|
+
hn as Drawer,
|
|
3673
|
+
Ge as Dropdown,
|
|
3674
|
+
vt as EditIcon,
|
|
3675
|
+
vr as EmptyState,
|
|
3676
|
+
yt as ExternalLinkIcon,
|
|
3677
|
+
gt as EyeIcon,
|
|
3678
|
+
bt as EyeOffIcon,
|
|
3679
|
+
wt as FileIcon,
|
|
3680
|
+
xt as FileTextIcon,
|
|
3681
|
+
tr as FileUpload,
|
|
3682
|
+
_t as FilterIcon,
|
|
3683
|
+
q as Flex,
|
|
3684
|
+
Lt as FolderIcon,
|
|
3685
|
+
O as FormField,
|
|
3686
|
+
Nt as FormInputIcon,
|
|
3687
|
+
Ct as GhostIcon,
|
|
3688
|
+
Mt as GiftIcon,
|
|
3689
|
+
It as GitCommitIcon,
|
|
3690
|
+
Bt as GithubIcon,
|
|
3691
|
+
dr as Grid,
|
|
3692
|
+
jt as GridIcon,
|
|
3693
|
+
Wt as GripIcon,
|
|
3694
|
+
Qe as Heading,
|
|
3695
|
+
zt as Heading1Icon,
|
|
3696
|
+
me as Heading2,
|
|
3697
|
+
or as Heading3,
|
|
3698
|
+
Je as Heading4,
|
|
3699
|
+
ke as Heading5,
|
|
3700
|
+
rr as Heading6,
|
|
3701
|
+
St as HeartIcon,
|
|
3702
|
+
$t as HelpCircleIcon,
|
|
3703
|
+
Tt as HistoryIcon,
|
|
3704
|
+
Dt as HomeIcon,
|
|
3705
|
+
M as Icon,
|
|
3706
|
+
Se as IconBase,
|
|
3707
|
+
Y as IconButton,
|
|
3708
|
+
fr as Image,
|
|
3709
|
+
At as ImageIcon,
|
|
3710
|
+
Et as InfoIcon,
|
|
3559
3711
|
se as Input,
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3712
|
+
Ht as LabIcon,
|
|
3713
|
+
Vt as LaptopIcon,
|
|
3714
|
+
Ft as LayoutIcon,
|
|
3715
|
+
Rt as LayoutTemplateIcon,
|
|
3564
3716
|
le as Link,
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3717
|
+
Ot as LinkIcon,
|
|
3718
|
+
Pt as LinkedinIcon,
|
|
3719
|
+
tn as List,
|
|
3720
|
+
Yt as ListChecksIcon,
|
|
3721
|
+
Ut as ListCollapseIcon,
|
|
3722
|
+
qt as ListFilterIcon,
|
|
3723
|
+
Gt as ListIcon,
|
|
3572
3724
|
ae as Loader,
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3725
|
+
Kt as Loader2Icon,
|
|
3726
|
+
Xt as LockIcon,
|
|
3727
|
+
Zt as LogInIcon,
|
|
3728
|
+
Qt as LogOutIcon,
|
|
3729
|
+
Jt as MailIcon,
|
|
3730
|
+
eo as MapPinIcon,
|
|
3731
|
+
no as MenuIcon,
|
|
3732
|
+
to as MessageCircleIcon,
|
|
3733
|
+
oo as MessageSquareIcon,
|
|
3734
|
+
ro as MicIcon,
|
|
3735
|
+
io as MilestoneIcon,
|
|
3736
|
+
ao as MinusIcon,
|
|
3737
|
+
un as Modal,
|
|
3738
|
+
so as MonitorIcon,
|
|
3739
|
+
lo as MoonIcon,
|
|
3740
|
+
co as MoreHorizontalIcon,
|
|
3741
|
+
uo as MousePointerIcon,
|
|
3742
|
+
Oe as MultiSelect,
|
|
3743
|
+
ho as MusicIcon,
|
|
3744
|
+
xr as PageHeader,
|
|
3745
|
+
dn as Pagination,
|
|
3746
|
+
ko as PanelIcon,
|
|
3747
|
+
po as PanelLeftIcon,
|
|
3748
|
+
mo as PanelTopIcon,
|
|
3749
|
+
fo as PhoneIcon,
|
|
3750
|
+
vo as PlusIcon,
|
|
3751
|
+
In as Progress,
|
|
3752
|
+
Ze as Radio,
|
|
3753
|
+
yo as RectangleHorizontalIcon,
|
|
3754
|
+
bo as RefreshIcon,
|
|
3755
|
+
go as RocketIcon,
|
|
3756
|
+
xo as RulerIcon,
|
|
3757
|
+
De as Search,
|
|
3758
|
+
wo as SearchIcon,
|
|
3759
|
+
Fe as Select,
|
|
3760
|
+
_o as ServerIcon,
|
|
3761
|
+
Lo as SettingsIcon,
|
|
3762
|
+
No as ShareIcon,
|
|
3763
|
+
Co as ShieldIcon,
|
|
3764
|
+
Mo as ShoppingCartIcon,
|
|
3765
|
+
Ln as Sidebar,
|
|
3766
|
+
ye as Skeleton,
|
|
3767
|
+
nr as Slider,
|
|
3768
|
+
Io as SlidersHorizontalIcon,
|
|
3769
|
+
Bo as SmartphoneIcon,
|
|
3770
|
+
hr as Spacer,
|
|
3771
|
+
jo as SparkIcon,
|
|
3772
|
+
Wo as SparklesIcon,
|
|
3773
|
+
zo as SpinnerIcon,
|
|
3774
|
+
So as SquareIcon,
|
|
3775
|
+
$o as StarIcon,
|
|
3776
|
+
To as SunIcon,
|
|
3777
|
+
cn as Switch,
|
|
3778
|
+
kn as Table,
|
|
3779
|
+
Do as TableIcon,
|
|
3780
|
+
Ao as TabletIcon,
|
|
3781
|
+
Bn as Tabs,
|
|
3782
|
+
kr as Tag,
|
|
3783
|
+
Eo as TagIcon,
|
|
3784
|
+
vn as Tbody,
|
|
3785
|
+
gn as Td,
|
|
3786
|
+
T as Text,
|
|
3787
|
+
Te as TextArea,
|
|
3788
|
+
Ho as TextCursorIcon,
|
|
3789
|
+
bn as Th,
|
|
3790
|
+
fn as Thead,
|
|
3791
|
+
Vo as ThemeDarkIcon,
|
|
3792
|
+
Ro as ThemeLightIcon,
|
|
3793
|
+
gr as ThemeProvider,
|
|
3794
|
+
Wn as Timeline,
|
|
3795
|
+
jn as TimelineItem,
|
|
3796
|
+
mn as ToastProvider,
|
|
3797
|
+
Fo as ToggleRightIcon,
|
|
3798
|
+
yr as Tooltip,
|
|
3799
|
+
Cn as TopBar,
|
|
3800
|
+
yn as Tr,
|
|
3801
|
+
Oo as TrashIcon,
|
|
3802
|
+
Po as TypeIcon,
|
|
3803
|
+
Yo as UnlockIcon,
|
|
3804
|
+
Uo as UploadCloudIcon,
|
|
3805
|
+
qo as UploadIcon,
|
|
3806
|
+
Go as UserCircleIcon,
|
|
3807
|
+
Ko as UserIcon,
|
|
3808
|
+
Xo as VideoIcon,
|
|
3809
|
+
Zo as WarningIcon,
|
|
3810
|
+
Qo as WifiIcon,
|
|
3811
|
+
Jo as XIcon,
|
|
3812
|
+
er as ZapIcon,
|
|
3661
3813
|
p as classNames,
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3814
|
+
Tn as createVariants,
|
|
3815
|
+
$e as iconRegistry,
|
|
3816
|
+
Nn as useTheme,
|
|
3817
|
+
br as useToast
|
|
3666
3818
|
};
|
|
3667
3819
|
//# sourceMappingURL=acyon.es.js.map
|