sander-ui 0.1.12 → 0.1.13
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/index.css +1 -1
- package/dist/index.js +67 -61
- package/dist/index10.js +2 -2
- package/dist/index11.js +1 -1
- package/dist/index12.js +21 -77
- package/dist/index13.js +72 -162
- package/dist/index14.js +167 -42
- package/dist/index15.js +36 -23
- package/dist/index16.js +40 -17
- package/dist/index17.js +20 -73
- package/dist/index18.js +20 -62
- package/dist/index19.js +73 -38
- package/dist/index20.js +61 -31
- package/dist/index21.js +35 -254
- package/dist/index22.js +31 -18
- package/dist/index23.js +260 -40
- package/dist/index24.js +19 -47
- package/dist/index25.js +37 -129
- package/dist/index26.js +47 -18
- package/dist/index27.js +130 -21
- package/dist/index28.js +18 -55
- package/dist/index29.js +25 -16
- package/dist/index3.js +2 -2
- package/dist/index30.js +23 -46
- package/dist/index31.js +55 -5
- package/dist/index32.js +19 -17
- package/dist/index33.js +45 -16
- package/dist/index34.js +5 -17
- package/dist/index35.js +17 -8
- package/dist/index36.js +23 -4
- package/dist/index37.js +8 -26
- package/dist/index38.js +14 -7
- package/dist/index39.js +8 -27
- package/dist/index4.js +7 -7
- package/dist/index40.js +7 -11
- package/dist/index41.js +7 -40
- package/dist/index42.js +16 -20
- package/dist/index43.js +8 -23
- package/dist/index44.js +4 -15
- package/dist/index45.js +27 -42
- package/dist/index46.js +26 -4
- package/dist/index47.js +27 -8
- package/dist/index48.js +21 -14
- package/dist/index49.js +21 -8
- package/dist/index5.js +3 -3
- package/dist/index50.js +11 -7
- package/dist/index51.js +40 -27
- package/dist/index52.js +16 -25
- package/dist/index53.js +42 -22
- package/dist/index54.js +4 -26
- package/dist/index55.js +4 -13
- package/dist/index56.js +26 -10
- package/dist/index57.js +12 -22
- package/dist/index58.js +25 -14
- package/dist/index59.js +14 -30
- package/dist/index6.js +3 -3
- package/dist/index60.js +4 -17
- package/dist/index61.js +30 -14
- package/dist/index62.js +17 -4
- package/dist/index63.js +37 -20
- package/dist/index64.js +25 -12
- package/dist/index65.js +22 -16
- package/dist/index66.js +21 -11
- package/dist/index67.js +12 -42
- package/dist/index68.js +11 -4
- package/dist/index69.js +15 -4
- package/dist/index7.js +4 -4
- package/dist/index70.js +9 -35
- package/dist/index71.js +17 -2
- package/dist/index72.js +13 -4
- package/dist/index73.js +14 -20
- package/dist/index74.js +42 -2
- package/dist/index75.js +4 -2
- package/dist/index76.js +35 -6
- package/dist/index77.js +2 -34
- package/dist/index78.js +4 -12
- package/dist/index79.js +20 -6
- package/dist/index8.js +3 -3
- package/dist/index80.js +2 -5
- package/dist/index81.js +4 -0
- package/dist/index82.js +8 -0
- package/dist/index83.js +36 -0
- package/dist/index84.js +14 -0
- package/dist/index85.js +9 -0
- package/dist/index86.js +7 -0
- package/dist/index9.js +2 -2
- package/package.json +1 -1
package/dist/index14.js
CHANGED
|
@@ -1,45 +1,170 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import g from "./index34.js";
|
|
3
|
+
import { useState as x, useRef as v, useId as E, useEffect as k, cloneElement as I, createContext as R, useContext as y } from "react";
|
|
4
|
+
import D from "./index69.js";
|
|
5
|
+
const C = R(null);
|
|
6
|
+
function b() {
|
|
7
|
+
const t = y(C);
|
|
8
|
+
if (!t)
|
|
9
|
+
throw new Error("Dropdown components must be used within <Dropdown>");
|
|
10
|
+
return t;
|
|
11
|
+
}
|
|
12
|
+
const P = ({ children: t }) => {
|
|
13
|
+
const [o, e] = x(!1), [l, a] = x(!1), c = v(null), f = v(null), n = v([]), w = v(0), r = v(null), u = E(), i = (s) => {
|
|
14
|
+
r.current = s, e(!0), a(!1);
|
|
15
|
+
}, d = (s = !0) => {
|
|
16
|
+
a(!0), s && c.current?.focus();
|
|
17
|
+
}, m = v(d);
|
|
18
|
+
return m.current = d, k(() => {
|
|
19
|
+
if (!o || l) return;
|
|
20
|
+
function s(h) {
|
|
21
|
+
f.current && !f.current.contains(h.target) && m.current(!1);
|
|
22
|
+
}
|
|
23
|
+
return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
|
|
24
|
+
}, [o, l]), /* @__PURE__ */ p(
|
|
25
|
+
C.Provider,
|
|
26
|
+
{
|
|
27
|
+
value: {
|
|
28
|
+
visible: o,
|
|
29
|
+
closing: l,
|
|
30
|
+
menuId: u,
|
|
31
|
+
triggerRef: c,
|
|
32
|
+
openMenu: i,
|
|
33
|
+
closeMenu: d,
|
|
34
|
+
setVisible: e,
|
|
35
|
+
setClosing: a,
|
|
36
|
+
itemRefs: n,
|
|
37
|
+
itemCount: w,
|
|
38
|
+
pendingFocusIndex: r
|
|
39
|
+
},
|
|
40
|
+
children: /* @__PURE__ */ p("div", { ref: f, className: D.wrapper, children: t })
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}, B = ({
|
|
44
|
+
asChild: t,
|
|
45
|
+
children: o
|
|
46
|
+
}) => {
|
|
47
|
+
const { visible: e, menuId: l, triggerRef: a, openMenu: c, closeMenu: f } = b(), r = {
|
|
48
|
+
ref: (u) => {
|
|
49
|
+
a.current = u;
|
|
50
|
+
},
|
|
51
|
+
"aria-haspopup": "menu",
|
|
52
|
+
"aria-expanded": e,
|
|
53
|
+
"aria-controls": e ? l : void 0,
|
|
54
|
+
onClick: () => e ? f() : c(0),
|
|
55
|
+
onKeyDown: (u) => {
|
|
56
|
+
switch (u.key) {
|
|
57
|
+
case "ArrowDown":
|
|
58
|
+
case "Enter":
|
|
59
|
+
case " ":
|
|
60
|
+
u.preventDefault(), c(0);
|
|
61
|
+
break;
|
|
62
|
+
case "ArrowUp":
|
|
63
|
+
u.preventDefault(), c(-1);
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
return t ? I(o, r) : /* @__PURE__ */ p("button", { ...r, className: D.trigger, children: o });
|
|
69
|
+
}, F = ({
|
|
70
|
+
children: t
|
|
71
|
+
}) => {
|
|
72
|
+
const {
|
|
73
|
+
visible: o,
|
|
74
|
+
closing: e,
|
|
75
|
+
menuId: l,
|
|
76
|
+
closeMenu: a,
|
|
77
|
+
setVisible: c,
|
|
78
|
+
setClosing: f,
|
|
79
|
+
itemRefs: n,
|
|
80
|
+
itemCount: w,
|
|
81
|
+
pendingFocusIndex: r
|
|
82
|
+
} = b();
|
|
83
|
+
w.current = 0, n.current = [], k(() => {
|
|
84
|
+
if (!o || e || r.current === null) return;
|
|
85
|
+
const i = r.current;
|
|
86
|
+
r.current = null;
|
|
87
|
+
const d = n.current.filter(Boolean), m = i < 0 ? d.length + i : i;
|
|
88
|
+
d[m]?.focus();
|
|
89
|
+
}, [o, e, n, r]);
|
|
90
|
+
const u = (i) => {
|
|
91
|
+
const d = n.current.findIndex(
|
|
92
|
+
(s) => s === document.activeElement
|
|
93
|
+
), m = n.current.filter(Boolean).length;
|
|
94
|
+
switch (i.key) {
|
|
95
|
+
case "ArrowDown": {
|
|
96
|
+
i.preventDefault();
|
|
97
|
+
const s = (d + 1) % m;
|
|
98
|
+
n.current[s]?.focus();
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
case "ArrowUp": {
|
|
102
|
+
i.preventDefault();
|
|
103
|
+
const s = (d - 1 + m) % m;
|
|
104
|
+
n.current[s]?.focus();
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
case "Home":
|
|
108
|
+
i.preventDefault(), n.current[0]?.focus();
|
|
109
|
+
break;
|
|
110
|
+
case "End":
|
|
111
|
+
i.preventDefault(), n.current[m - 1]?.focus();
|
|
112
|
+
break;
|
|
113
|
+
case "Escape":
|
|
114
|
+
case "Tab":
|
|
115
|
+
a();
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
return o ? /* @__PURE__ */ p(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
id: l,
|
|
123
|
+
role: "menu",
|
|
124
|
+
onKeyDown: u,
|
|
125
|
+
onAnimationEnd: () => {
|
|
126
|
+
e && (c(!1), f(!1));
|
|
127
|
+
},
|
|
128
|
+
className: g(
|
|
129
|
+
D.menu,
|
|
130
|
+
e && D.closing
|
|
131
|
+
),
|
|
132
|
+
children: t
|
|
133
|
+
}
|
|
134
|
+
) : null;
|
|
135
|
+
}, L = ({
|
|
136
|
+
children: t,
|
|
137
|
+
onClick: o,
|
|
138
|
+
href: e,
|
|
139
|
+
className: l,
|
|
14
140
|
...a
|
|
15
|
-
}) =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
)
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
);
|
|
141
|
+
}) => {
|
|
142
|
+
const { closeMenu: c, itemRefs: f, itemCount: n } = b(), w = n.current++, r = {
|
|
143
|
+
ref: (u) => {
|
|
144
|
+
f.current[w] = u;
|
|
145
|
+
},
|
|
146
|
+
role: "menuitem",
|
|
147
|
+
tabIndex: -1,
|
|
148
|
+
className: g(D.item, l)
|
|
149
|
+
};
|
|
150
|
+
return e ? /* @__PURE__ */ p("a", { ...r, ...a, href: e, onClick: () => c(!1), children: t }) : /* @__PURE__ */ p(
|
|
151
|
+
"button",
|
|
152
|
+
{
|
|
153
|
+
...r,
|
|
154
|
+
...a,
|
|
155
|
+
onClick: () => {
|
|
156
|
+
c(!1), o?.();
|
|
157
|
+
},
|
|
158
|
+
children: t
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}, S = ({
|
|
162
|
+
className: t
|
|
163
|
+
}) => /* @__PURE__ */ p("div", { role: "separator", className: g(D.divider, t) });
|
|
43
164
|
export {
|
|
44
|
-
|
|
165
|
+
P as Dropdown,
|
|
166
|
+
F as DropdownContent,
|
|
167
|
+
L as DropdownItem,
|
|
168
|
+
S as DropdownSeparator,
|
|
169
|
+
B as DropdownTrigger
|
|
45
170
|
};
|
package/dist/index15.js
CHANGED
|
@@ -1,25 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import x from "./index34.js";
|
|
3
|
+
import e from "./index56.js";
|
|
4
|
+
const a = {
|
|
5
|
+
h1: "5xl",
|
|
6
|
+
h2: "4xl",
|
|
7
|
+
h3: "2xl",
|
|
8
|
+
h4: "xl",
|
|
9
|
+
h5: "lg",
|
|
10
|
+
h6: "base"
|
|
11
|
+
}, p = ({
|
|
12
|
+
children: t,
|
|
13
|
+
as: o = "h2",
|
|
14
|
+
size: l,
|
|
15
|
+
weight: h = "bold",
|
|
16
|
+
align: s,
|
|
17
|
+
className: i,
|
|
18
|
+
...m
|
|
19
|
+
}) => {
|
|
20
|
+
const r = l ?? a[o];
|
|
21
|
+
return /* @__PURE__ */ n(
|
|
22
|
+
o,
|
|
23
|
+
{
|
|
24
|
+
className: x(
|
|
25
|
+
e.heading,
|
|
26
|
+
r && e[`size-${r}`],
|
|
27
|
+
e[h],
|
|
28
|
+
s && e[s],
|
|
29
|
+
i
|
|
30
|
+
),
|
|
31
|
+
...m,
|
|
32
|
+
children: t
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
};
|
|
23
36
|
export {
|
|
24
|
-
|
|
37
|
+
p as Heading
|
|
25
38
|
};
|
package/dist/index16.js
CHANGED
|
@@ -1,22 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import t from "./
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import r from "./index34.js";
|
|
3
|
+
import t from "./index47.js";
|
|
4
|
+
import s from "./index68.js";
|
|
5
|
+
import { Spinner as b } from "./index25.js";
|
|
6
|
+
const N = ({
|
|
7
|
+
icon: e,
|
|
8
|
+
variant: m = "ghost",
|
|
9
|
+
size: i = "md",
|
|
10
|
+
type: c = "button",
|
|
11
|
+
loading: o,
|
|
12
|
+
disabled: p,
|
|
13
|
+
className: u,
|
|
14
|
+
...a
|
|
15
|
+
}) => /* @__PURE__ */ l(
|
|
16
|
+
"button",
|
|
13
17
|
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
type: c,
|
|
19
|
+
disabled: o || p,
|
|
20
|
+
"aria-busy": o || void 0,
|
|
21
|
+
className: r(
|
|
22
|
+
t.button,
|
|
23
|
+
t[m],
|
|
24
|
+
s.iconButton,
|
|
25
|
+
s[i],
|
|
26
|
+
u
|
|
27
|
+
),
|
|
28
|
+
...a,
|
|
29
|
+
children: [
|
|
30
|
+
o ? /* @__PURE__ */ n(b, { className: t.spinner }) : null,
|
|
31
|
+
/* @__PURE__ */ n(
|
|
32
|
+
"span",
|
|
33
|
+
{
|
|
34
|
+
className: r(t.content, {
|
|
35
|
+
[t.hidden]: o
|
|
36
|
+
}),
|
|
37
|
+
children: e
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
]
|
|
18
41
|
}
|
|
19
42
|
);
|
|
20
43
|
export {
|
|
21
|
-
|
|
44
|
+
N as IconButton
|
|
22
45
|
};
|
package/dist/index17.js
CHANGED
|
@@ -1,78 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
onClose: o,
|
|
11
|
-
children: r,
|
|
12
|
-
size: f = "sm",
|
|
13
|
-
className: g,
|
|
14
|
-
...N
|
|
15
|
-
}) => {
|
|
16
|
-
const i = h(null), [n, m] = u(!1), [a, d] = u(!1);
|
|
17
|
-
return M(n && !a), p(() => {
|
|
18
|
-
s ? (m(!0), d(!1)) : m((e) => (e && d(!0), e));
|
|
19
|
-
}, [s]), p(() => {
|
|
20
|
-
const e = i.current;
|
|
21
|
-
n && !a && e && !e.open && (e.showModal(), e.focus());
|
|
22
|
-
}, [n, a]), n ? v(
|
|
23
|
-
/* @__PURE__ */ l(
|
|
24
|
-
"dialog",
|
|
1
|
+
import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import p from "./index34.js";
|
|
3
|
+
import { forwardRef as n } from "react";
|
|
4
|
+
import a from "./index57.js";
|
|
5
|
+
const c = n(
|
|
6
|
+
({ label: s, error: r, id: e, className: t, ...l }, o) => /* @__PURE__ */ m("div", { className: a.wrapper, children: [
|
|
7
|
+
s && /* @__PURE__ */ i("label", { htmlFor: e, className: a.label, children: s }),
|
|
8
|
+
/* @__PURE__ */ i(
|
|
9
|
+
"input",
|
|
25
10
|
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
),
|
|
33
|
-
onAnimationEnd: () => {
|
|
34
|
-
a && (i.current?.close(), m(!1), d(!1));
|
|
35
|
-
},
|
|
36
|
-
onCancel: (e) => {
|
|
37
|
-
e.preventDefault(), o();
|
|
38
|
-
},
|
|
39
|
-
onClick: (e) => {
|
|
40
|
-
e.target === i.current && o();
|
|
41
|
-
},
|
|
42
|
-
...N,
|
|
43
|
-
children: /* @__PURE__ */ l("div", { className: t.content, children: r })
|
|
11
|
+
id: e,
|
|
12
|
+
ref: o,
|
|
13
|
+
"aria-invalid": r ? !0 : void 0,
|
|
14
|
+
"aria-describedby": r ? `${e}-error` : void 0,
|
|
15
|
+
className: p(a.input, r && a.inputError, t),
|
|
16
|
+
...l
|
|
44
17
|
}
|
|
45
18
|
),
|
|
46
|
-
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
onClose: o,
|
|
51
|
-
className: r,
|
|
52
|
-
...f
|
|
53
|
-
}) => /* @__PURE__ */ b("div", { className: c(t.header, r), ...f, children: [
|
|
54
|
-
/* @__PURE__ */ l("h2", { className: t.title, children: s }),
|
|
55
|
-
o && /* @__PURE__ */ l(
|
|
56
|
-
"button",
|
|
57
|
-
{
|
|
58
|
-
onClick: o,
|
|
59
|
-
"aria-label": "Close",
|
|
60
|
-
className: t.closeButton,
|
|
61
|
-
children: /* @__PURE__ */ l(y, { size: 20 })
|
|
62
|
-
}
|
|
63
|
-
)
|
|
64
|
-
] }), w = ({
|
|
65
|
-
children: s,
|
|
66
|
-
className: o,
|
|
67
|
-
...r
|
|
68
|
-
}) => /* @__PURE__ */ l("div", { className: c(t.body, o), ...r, children: s }), A = ({
|
|
69
|
-
children: s,
|
|
70
|
-
className: o,
|
|
71
|
-
...r
|
|
72
|
-
}) => /* @__PURE__ */ l("div", { className: c(t.footer, o), ...r, children: s });
|
|
19
|
+
r && /* @__PURE__ */ i("p", { id: `${e}-error`, role: "alert", className: a.error, children: r })
|
|
20
|
+
] })
|
|
21
|
+
);
|
|
22
|
+
c.displayName = "Input";
|
|
73
23
|
export {
|
|
74
|
-
|
|
75
|
-
w as ModalBody,
|
|
76
|
-
A as ModalFooter,
|
|
77
|
-
S as ModalHeader
|
|
24
|
+
c as Input
|
|
78
25
|
};
|
package/dist/index18.js
CHANGED
|
@@ -1,64 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}) => {
|
|
21
|
-
if (r <= 1) return null;
|
|
22
|
-
const o = b(i, r, s);
|
|
23
|
-
return /* @__PURE__ */ f("nav", { "aria-label": "Pagination", className: u(n.pagination, c), ...t, children: [
|
|
24
|
-
/* @__PURE__ */ e(
|
|
25
|
-
"button",
|
|
26
|
-
{
|
|
27
|
-
"aria-label": "Previous page",
|
|
28
|
-
disabled: i <= 1,
|
|
29
|
-
onClick: () => a(i - 1),
|
|
30
|
-
className: n.arrow,
|
|
31
|
-
children: /* @__PURE__ */ e(h, { className: n.icon })
|
|
32
|
-
}
|
|
33
|
-
),
|
|
34
|
-
o.map((l, m) => {
|
|
35
|
-
if (l === "ellipsis")
|
|
36
|
-
return /* @__PURE__ */ e("span", { className: n.ellipsis, children: "..." }, `ellipsis-${m}`);
|
|
37
|
-
const p = l === i;
|
|
38
|
-
return /* @__PURE__ */ e(
|
|
39
|
-
"button",
|
|
40
|
-
{
|
|
41
|
-
"aria-label": `Page ${l}`,
|
|
42
|
-
"aria-current": p ? "page" : void 0,
|
|
43
|
-
onClick: () => a(l),
|
|
44
|
-
className: u(n.page, p && n.active),
|
|
45
|
-
children: l
|
|
46
|
-
},
|
|
47
|
-
l
|
|
48
|
-
);
|
|
49
|
-
}),
|
|
50
|
-
/* @__PURE__ */ e(
|
|
51
|
-
"button",
|
|
52
|
-
{
|
|
53
|
-
"aria-label": "Next page",
|
|
54
|
-
disabled: i >= r,
|
|
55
|
-
onClick: () => a(i + 1),
|
|
56
|
-
className: n.arrow,
|
|
57
|
-
children: /* @__PURE__ */ e(d, { className: n.icon })
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
] });
|
|
61
|
-
};
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import a from "./index34.js";
|
|
3
|
+
import t from "./index47.js";
|
|
4
|
+
const f = ({
|
|
5
|
+
variant: o = "primary",
|
|
6
|
+
size: r = "md",
|
|
7
|
+
children: m,
|
|
8
|
+
className: n,
|
|
9
|
+
href: i,
|
|
10
|
+
...p
|
|
11
|
+
}) => /* @__PURE__ */ s(
|
|
12
|
+
"a",
|
|
13
|
+
{
|
|
14
|
+
href: i,
|
|
15
|
+
className: a(t.button, t[o], t[r], n),
|
|
16
|
+
...p,
|
|
17
|
+
children: m
|
|
18
|
+
}
|
|
19
|
+
);
|
|
62
20
|
export {
|
|
63
|
-
|
|
21
|
+
f as LinkButton
|
|
64
22
|
};
|
package/dist/index19.js
CHANGED
|
@@ -1,43 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as l, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import c from "./index34.js";
|
|
3
|
+
import { useRef as h, useState as u, useEffect as p } from "react";
|
|
4
|
+
import { createPortal as v } from "react-dom";
|
|
5
|
+
import { useScrollLock as M } from "./index50.js";
|
|
6
|
+
import t from "./index58.js";
|
|
7
|
+
import y from "./index41.js";
|
|
8
|
+
const R = ({
|
|
9
|
+
open: s,
|
|
10
|
+
onClose: o,
|
|
11
|
+
children: r,
|
|
12
|
+
size: f = "sm",
|
|
13
|
+
className: g,
|
|
14
|
+
...N
|
|
11
15
|
}) => {
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
s
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/* @__PURE__ */ n(
|
|
22
|
-
"div",
|
|
16
|
+
const i = h(null), [n, m] = u(!1), [a, d] = u(!1);
|
|
17
|
+
return M(n && !a), p(() => {
|
|
18
|
+
s ? (m(!0), d(!1)) : m((e) => (e && d(!0), e));
|
|
19
|
+
}, [s]), p(() => {
|
|
20
|
+
const e = i.current;
|
|
21
|
+
n && !a && e && !e.open && (e.showModal(), e.focus());
|
|
22
|
+
}, [n, a]), n ? v(
|
|
23
|
+
/* @__PURE__ */ l(
|
|
24
|
+
"dialog",
|
|
23
25
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
ref: i,
|
|
27
|
+
className: c(
|
|
28
|
+
t.dialog,
|
|
29
|
+
t[`size-${f}`],
|
|
30
|
+
a && t.closing,
|
|
31
|
+
g
|
|
32
|
+
),
|
|
33
|
+
onAnimationEnd: () => {
|
|
34
|
+
a && (i.current?.close(), m(!1), d(!1));
|
|
35
|
+
},
|
|
36
|
+
onCancel: (e) => {
|
|
37
|
+
e.preventDefault(), o();
|
|
38
|
+
},
|
|
39
|
+
onClick: (e) => {
|
|
40
|
+
e.target === i.current && o();
|
|
41
|
+
},
|
|
42
|
+
...N,
|
|
43
|
+
children: /* @__PURE__ */ l("div", { className: t.content, children: r })
|
|
37
44
|
}
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
),
|
|
46
|
+
document.body
|
|
47
|
+
) : null;
|
|
48
|
+
}, S = ({
|
|
49
|
+
children: s,
|
|
50
|
+
onClose: o,
|
|
51
|
+
className: r,
|
|
52
|
+
...f
|
|
53
|
+
}) => /* @__PURE__ */ b("div", { className: c(t.header, r), ...f, children: [
|
|
54
|
+
/* @__PURE__ */ l("h2", { className: t.title, children: s }),
|
|
55
|
+
o && /* @__PURE__ */ l(
|
|
56
|
+
"button",
|
|
57
|
+
{
|
|
58
|
+
onClick: o,
|
|
59
|
+
"aria-label": "Close",
|
|
60
|
+
className: t.closeButton,
|
|
61
|
+
children: /* @__PURE__ */ l(y, { size: 20 })
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
] }), w = ({
|
|
65
|
+
children: s,
|
|
66
|
+
className: o,
|
|
67
|
+
...r
|
|
68
|
+
}) => /* @__PURE__ */ l("div", { className: c(t.body, o), ...r, children: s }), A = ({
|
|
69
|
+
children: s,
|
|
70
|
+
className: o,
|
|
71
|
+
...r
|
|
72
|
+
}) => /* @__PURE__ */ l("div", { className: c(t.footer, o), ...r, children: s });
|
|
41
73
|
export {
|
|
42
|
-
|
|
74
|
+
R as Modal,
|
|
75
|
+
w as ModalBody,
|
|
76
|
+
A as ModalFooter,
|
|
77
|
+
S as ModalHeader
|
|
43
78
|
};
|