visits-style 2.0.7 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +34 -30
- package/dist/index.es.js +553 -628
- package/dist/lib.css +4 -0
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -1,133 +1,131 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { default as
|
|
3
|
-
import { twMerge as
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { useMemo as
|
|
6
|
-
import { useId as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
function
|
|
9
|
-
return t ?
|
|
10
|
-
}
|
|
11
|
-
function
|
|
12
|
-
const r =
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
}
|
|
15
|
-
function
|
|
1
|
+
import m from "clsx";
|
|
2
|
+
import { default as pt } from "clsx";
|
|
3
|
+
import { twMerge as he } from "tailwind-merge";
|
|
4
|
+
import { jsx as i, jsxs as k, Fragment as te } from "react/jsx-runtime";
|
|
5
|
+
import { useMemo as c, Children as z, cloneElement as Z, forwardRef as S, useLayoutEffect as ne, useEffect as R, useState as E, useRef as I, useCallback as O, useImperativeHandle as re, startTransition as ye, createContext as xe, createElement as we, useContext as ve } from "react";
|
|
6
|
+
import { useId as K, useFloating as H, autoUpdate as oe, shift as ie, flip as se, offset as le, useTransitionStyles as L, useInteractions as U, useClick as Ce, FloatingOverlay as J, useHover as Ne, useClientPoint as ke, useDismiss as Ie } from "@floating-ui/react";
|
|
7
|
+
import { createPortal as Fe } from "react-dom";
|
|
8
|
+
function F(e, t) {
|
|
9
|
+
return t ? he(e, t) : e;
|
|
10
|
+
}
|
|
11
|
+
function Te({ className: e, ...t }) {
|
|
12
|
+
const r = c(() => m("leading-none peer-disabled:opacity-70", e), [e]);
|
|
13
|
+
return /* @__PURE__ */ i("label", { className: r, ...t });
|
|
14
|
+
}
|
|
15
|
+
function Je({
|
|
16
16
|
label: e,
|
|
17
17
|
children: t,
|
|
18
18
|
required: r,
|
|
19
|
-
htmlFor:
|
|
20
|
-
error:
|
|
21
|
-
help:
|
|
22
|
-
helpBefore:
|
|
19
|
+
htmlFor: n,
|
|
20
|
+
error: s,
|
|
21
|
+
help: o,
|
|
22
|
+
helpBefore: l,
|
|
23
23
|
className: u,
|
|
24
|
-
innerClass:
|
|
25
|
-
...
|
|
24
|
+
innerClass: f,
|
|
25
|
+
...d
|
|
26
26
|
}) {
|
|
27
|
-
const p =
|
|
27
|
+
const p = c(() => m(
|
|
28
28
|
"font-medium",
|
|
29
29
|
r ? 'after:content-["*"] after:text-danger after:text-sm after:pl-0.5' : ""
|
|
30
|
-
), [r]),
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
e ? /* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
), [r]), g = c(() => F("flex flex-col space-y-2", u), [u]);
|
|
31
|
+
return /* @__PURE__ */ k("div", { className: g, ...d, children: [
|
|
32
|
+
e ? /* @__PURE__ */ i(Te, { className: p, htmlFor: n, children: e }) : null,
|
|
33
|
+
o && l ? /* @__PURE__ */ i("p", { className: "text-xs text-muted pb-2", children: o }) : null,
|
|
34
|
+
/* @__PURE__ */ i("div", { className: f, children: Pe(t, !!s) }),
|
|
35
|
+
o && !l && !s ? /* @__PURE__ */ i("p", { className: "text-xs text-muted", children: o }) : null,
|
|
36
|
+
s ? /* @__PURE__ */ i("p", { className: "text-xs text-danger", children: s }) : null
|
|
37
37
|
] });
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
const r =
|
|
39
|
+
function Pe(e, t) {
|
|
40
|
+
const r = z.count(e);
|
|
41
41
|
if (!r) return null;
|
|
42
42
|
if (r === 1)
|
|
43
|
-
return
|
|
44
|
-
const
|
|
45
|
-
return
|
|
43
|
+
return Z(e, { error: t });
|
|
44
|
+
const n = z.toArray(e);
|
|
45
|
+
return n[0] = Z(n[0], { error: t }), n;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
const
|
|
47
|
+
function Qe({ error: e, unstyled: t, className: r, ...n }) {
|
|
48
|
+
const s = c(() => t ? r : F(m(
|
|
49
49
|
"flex rounded-md border bg-background px-3 py-2 w-full [&_input]:placeholder:text-muted",
|
|
50
50
|
"[&_input]:disabled:opacity-50 [&_input]:focus-visible:outline-none",
|
|
51
51
|
e ? "border-danger hover:border-danger-fore" : "border-input"
|
|
52
52
|
), r), [r, e, t]);
|
|
53
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ i("div", { className: s, ...n });
|
|
54
54
|
}
|
|
55
|
-
const
|
|
55
|
+
const Ae = S(({
|
|
56
56
|
className: e,
|
|
57
57
|
type: t,
|
|
58
58
|
error: r,
|
|
59
|
-
unstyled:
|
|
60
|
-
...
|
|
61
|
-
},
|
|
62
|
-
const
|
|
59
|
+
unstyled: n,
|
|
60
|
+
...s
|
|
61
|
+
}, o) => {
|
|
62
|
+
const l = c(() => n ? e : F(m(
|
|
63
63
|
"flex rounded-md border bg-background px-3 py-2 w-full placeholder:text-muted",
|
|
64
64
|
"disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",
|
|
65
65
|
r ? "border-danger hover:border-danger-fore" : "border-input not-disabled:hover:border-input-fore",
|
|
66
66
|
t === "file" ? "file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground" : null
|
|
67
|
-
), e), [e, t, r,
|
|
68
|
-
return /* @__PURE__ */
|
|
67
|
+
), e), [e, t, r, n]);
|
|
68
|
+
return /* @__PURE__ */ i("input", { ref: o, type: t, className: l, ...s });
|
|
69
69
|
});
|
|
70
|
-
|
|
71
|
-
const
|
|
70
|
+
Ae.displayName = "Input";
|
|
71
|
+
const Me = S(({
|
|
72
72
|
className: e,
|
|
73
73
|
error: t,
|
|
74
74
|
unstyled: r,
|
|
75
|
-
...
|
|
76
|
-
},
|
|
77
|
-
const
|
|
75
|
+
...n
|
|
76
|
+
}, s) => {
|
|
77
|
+
const o = c(() => r ? e : F(m(
|
|
78
78
|
"flex rounded-md border bg-background px-3 py-2 w-full",
|
|
79
79
|
"disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",
|
|
80
80
|
t ? "border-danger hover:border-danger-fore" : "border-input not-disabled:hover:border-input-fore"
|
|
81
81
|
), e), [e, t, r]);
|
|
82
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ i("textarea", { ref: s, className: o, ...n });
|
|
83
83
|
});
|
|
84
|
-
|
|
85
|
-
function
|
|
86
|
-
return /* @__PURE__ */
|
|
84
|
+
Me.displayName = "Textarea";
|
|
85
|
+
function Re() {
|
|
86
|
+
return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", children: /* @__PURE__ */ i("rect", { width: "20", height: "3", y: "13.5", x: "4.5", fill: "currentColor", stroke: "none", rx: "2" }) });
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", children: /* @__PURE__ */ n("rect", { width: "20", height: "3", y: "13.5", x: "4.5", fill: "currentColor", stroke: "none", rx: "2" }) });
|
|
90
|
-
}
|
|
91
|
-
function Ue({
|
|
88
|
+
function Ve({
|
|
92
89
|
checked: e,
|
|
93
90
|
indeterminate: t,
|
|
94
91
|
className: r,
|
|
95
|
-
id:
|
|
96
|
-
name:
|
|
97
|
-
onChange:
|
|
98
|
-
value:
|
|
99
|
-
|
|
92
|
+
id: n,
|
|
93
|
+
name: s,
|
|
94
|
+
onChange: o,
|
|
95
|
+
value: l,
|
|
96
|
+
checkIcon: u,
|
|
97
|
+
...f
|
|
100
98
|
}) {
|
|
101
|
-
const
|
|
99
|
+
const d = c(() => F(m(
|
|
102
100
|
"inline-flex justify-center items-center border w-4.5 h-4.5 rounded",
|
|
103
101
|
"cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",
|
|
104
102
|
e || t ? "bg-primary text-inverted disabled:text-text disabled:bg-input disabled:border-input" : "border-input not-disabled:hover:border-input-fore"
|
|
105
|
-
), r), [e, t, r]),
|
|
106
|
-
|
|
103
|
+
), r), [e, t, r]), p = () => {
|
|
104
|
+
f.disabled || o?.(!e);
|
|
107
105
|
};
|
|
108
|
-
return /* @__PURE__ */
|
|
106
|
+
return /* @__PURE__ */ k(
|
|
109
107
|
"button",
|
|
110
108
|
{
|
|
111
109
|
type: "button",
|
|
112
110
|
role: "checkbox",
|
|
113
|
-
id:
|
|
114
|
-
className:
|
|
115
|
-
onClick:
|
|
111
|
+
id: n || s,
|
|
112
|
+
className: d,
|
|
113
|
+
onClick: p,
|
|
116
114
|
"aria-checked": e,
|
|
117
|
-
...
|
|
115
|
+
...f,
|
|
118
116
|
children: [
|
|
119
|
-
e ?
|
|
120
|
-
t && !e ? /* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
117
|
+
e ? u : null,
|
|
118
|
+
t && !e ? /* @__PURE__ */ i(Re, {}) : null,
|
|
119
|
+
/* @__PURE__ */ i(
|
|
122
120
|
"input",
|
|
123
121
|
{
|
|
124
122
|
type: "checkbox",
|
|
125
123
|
"aria-hidden": "true",
|
|
126
|
-
name:
|
|
124
|
+
name: s,
|
|
127
125
|
checked: e,
|
|
128
|
-
value:
|
|
129
|
-
onChange:
|
|
130
|
-
disabled:
|
|
126
|
+
value: l,
|
|
127
|
+
onChange: p,
|
|
128
|
+
disabled: f.disabled,
|
|
131
129
|
style: { position: "absolute", pointerEvents: "none", top: 0, left: 0, width: 1, height: 1, opacity: 0 }
|
|
132
130
|
}
|
|
133
131
|
)
|
|
@@ -135,273 +133,294 @@ function Ue({
|
|
|
135
133
|
}
|
|
136
134
|
);
|
|
137
135
|
}
|
|
138
|
-
const
|
|
139
|
-
function
|
|
140
|
-
const [
|
|
141
|
-
return
|
|
136
|
+
const Se = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Q = Se ? ne : R;
|
|
137
|
+
function W({ children: e, container: t, disabled: r }) {
|
|
138
|
+
const [n, s] = E(null);
|
|
139
|
+
return Q(() => {
|
|
142
140
|
if (!t) {
|
|
143
|
-
let
|
|
144
|
-
return
|
|
141
|
+
let o = document.getElementById("visits-style-portals");
|
|
142
|
+
return o || (o = document.createElement("div"), o.id = "visits-style-portals", document.body.appendChild(o)), s(o);
|
|
145
143
|
}
|
|
146
|
-
|
|
147
|
-
}, [t]), r || !
|
|
144
|
+
s(t);
|
|
145
|
+
}, [t]), r || !n ? null : Fe(e, n);
|
|
148
146
|
}
|
|
149
|
-
function
|
|
147
|
+
function q(e) {
|
|
150
148
|
e && (e.stopPropagation(), e.preventDefault());
|
|
151
149
|
}
|
|
152
|
-
const
|
|
150
|
+
const _e = { open: 150, close: 75 }, ae = S(({
|
|
153
151
|
position: e,
|
|
154
152
|
label: t,
|
|
155
153
|
children: r,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
nodeId: I,
|
|
154
|
+
disabled: n,
|
|
155
|
+
offset: s = { x: 0, y: 6 },
|
|
156
|
+
onOpen: o,
|
|
157
|
+
onClose: l,
|
|
158
|
+
onManualClose: u,
|
|
159
|
+
timeout: f = _e,
|
|
160
|
+
unstyled: d,
|
|
161
|
+
zIndex: p = 9996,
|
|
162
|
+
role: g,
|
|
163
|
+
...h
|
|
164
|
+
}, C) => {
|
|
165
|
+
const [y, a] = E(!1), N = K(), v = I(o), x = I(l), { refs: w, floatingStyles: _, context: D } = H({
|
|
166
|
+
nodeId: N,
|
|
170
167
|
placement: e,
|
|
171
168
|
middleware: [
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
169
|
+
ie(),
|
|
170
|
+
se({ fallbackAxisSideDirection: "end" }),
|
|
171
|
+
le({ mainAxis: s.y, crossAxis: s.x })
|
|
175
172
|
],
|
|
176
|
-
open:
|
|
177
|
-
onOpenChange: (
|
|
178
|
-
|
|
173
|
+
open: y,
|
|
174
|
+
onOpenChange: (T) => {
|
|
175
|
+
T ? v.current?.(w.reference.current, w.floating.current) : x.current?.(w.reference.current, w.floating.current), a(T);
|
|
179
176
|
},
|
|
180
|
-
whileElementsMounted:
|
|
181
|
-
}), { isMounted:
|
|
182
|
-
duration:
|
|
183
|
-
initial({ side:
|
|
184
|
-
let
|
|
185
|
-
return
|
|
177
|
+
whileElementsMounted: oe
|
|
178
|
+
}), { isMounted: j, styles: Y } = L(D, {
|
|
179
|
+
duration: f,
|
|
180
|
+
initial({ side: T }) {
|
|
181
|
+
let A = "";
|
|
182
|
+
return T === "top" ? A = "translateY(5%) scale(0.95)" : T === "bottom" ? A = "translateY(-5%) scale(0.95)" : T === "left" ? A = "translateX(5%) scale(0.95)" : A = "translateX(-5%) scale(0.95)", { opacity: 0, transform: A };
|
|
186
183
|
}
|
|
187
|
-
}),
|
|
188
|
-
if (
|
|
189
|
-
|
|
190
|
-
}, [
|
|
191
|
-
|
|
192
|
-
if (
|
|
193
|
-
}, [
|
|
184
|
+
}), $ = O((T) => {
|
|
185
|
+
if (q(T), u) return u();
|
|
186
|
+
a(!1), x.current?.(w.reference.current, w.floating.current);
|
|
187
|
+
}, [u]);
|
|
188
|
+
R(() => {
|
|
189
|
+
if (n && y) return a(!1);
|
|
190
|
+
}, [n, y]), re(C, () => ({
|
|
194
191
|
open: () => {
|
|
195
|
-
|
|
192
|
+
a(!0), v.current?.(w.reference.current, w.floating.current);
|
|
196
193
|
},
|
|
197
194
|
close: () => {
|
|
198
|
-
|
|
195
|
+
a(!1), x.current?.(w.reference.current, w.floating.current);
|
|
199
196
|
}
|
|
200
197
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
201
198
|
}), []);
|
|
202
|
-
const { getFloatingProps:
|
|
203
|
-
|
|
199
|
+
const { getFloatingProps: B, getReferenceProps: X } = U([
|
|
200
|
+
Ce(D, { enabled: !n })
|
|
204
201
|
]);
|
|
205
|
-
return
|
|
206
|
-
|
|
207
|
-
ref:
|
|
202
|
+
return v.current = o, x.current = l, /* @__PURE__ */ k(te, { children: [
|
|
203
|
+
Z(z.only(t), X({
|
|
204
|
+
ref: w.setReference,
|
|
208
205
|
tabIndex: 0,
|
|
209
206
|
role: "button",
|
|
210
|
-
"aria-expanded":
|
|
211
|
-
disabled:
|
|
212
|
-
onClick:
|
|
207
|
+
"aria-expanded": y,
|
|
208
|
+
disabled: n,
|
|
209
|
+
onClick: q
|
|
213
210
|
})),
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
|
|
211
|
+
/* @__PURE__ */ i(W, { disabled: n || !j, children: /* @__PURE__ */ i(
|
|
212
|
+
J,
|
|
216
213
|
{
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
214
|
+
"data-testid": "vs-popover-shadow",
|
|
215
|
+
onClick: $,
|
|
216
|
+
style: { zIndex: p },
|
|
217
|
+
autoFocus: !0,
|
|
218
|
+
children: /* @__PURE__ */ i("div", { role: g || "region", ref: w.setFloating, style: _, children: /* @__PURE__ */ i(
|
|
219
|
+
ce,
|
|
220
|
+
{
|
|
221
|
+
unstyled: d,
|
|
222
|
+
styles: Y,
|
|
223
|
+
...B({ ...h, onClick: q }),
|
|
224
|
+
children: r
|
|
225
|
+
}
|
|
226
|
+
) })
|
|
221
227
|
}
|
|
222
|
-
) })
|
|
228
|
+
) })
|
|
223
229
|
] });
|
|
224
230
|
});
|
|
225
|
-
|
|
226
|
-
const
|
|
231
|
+
ae.displayName = "Popover";
|
|
232
|
+
const ce = S(({
|
|
227
233
|
className: e,
|
|
228
234
|
unstyled: t,
|
|
229
235
|
styles: r,
|
|
230
|
-
style:
|
|
231
|
-
...
|
|
232
|
-
},
|
|
233
|
-
const
|
|
236
|
+
style: n = {},
|
|
237
|
+
...s
|
|
238
|
+
}, o) => {
|
|
239
|
+
const l = c(() => m(
|
|
234
240
|
"z-20 w-auto h-auto outline-none transition-transform ease-in-out",
|
|
235
241
|
t ? null : "border border-accent rounded-md shadow-lg p-1 bg-background",
|
|
236
242
|
e
|
|
237
243
|
), [e, t]);
|
|
238
|
-
return /* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ i("div", { ref: o, className: l, style: { ...r, ...n }, ...s });
|
|
239
245
|
});
|
|
240
|
-
|
|
241
|
-
function
|
|
242
|
-
return /* @__PURE__ */ g("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: [
|
|
243
|
-
/* @__PURE__ */ n("path", { d: "M11.7 14.8 7 9.8a.5.5 0 0 1 0-.7c.2-.2.5-.2.7 0l4.5 5c.2.2.2.6 0 .8-.1.2-.4.2-.6 0Z", fill: "currentColor" }),
|
|
244
|
-
/* @__PURE__ */ n("path", { d: "m16.9 9.9-4.6 5c-.2.2-.4.2-.6 0a.5.5 0 0 1 0-.8l4.5-5c.2-.2.5-.2.7 0 .1.2.1.6 0 .8Z", fill: "currentColor" })
|
|
245
|
-
] });
|
|
246
|
-
}
|
|
247
|
-
function Ie(e) {
|
|
248
|
-
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 30 30", ...e, children: /* @__PURE__ */ g("g", { fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: [
|
|
249
|
-
/* @__PURE__ */ n("path", { d: "M26 26l-12.5-12.5L26 1" }),
|
|
250
|
-
/* @__PURE__ */ n("path", { d: "M1 26l12.5-12.5L1 1" })
|
|
251
|
-
] }) });
|
|
252
|
-
}
|
|
253
|
-
function Ve({
|
|
246
|
+
ce.displayName = "PopoverContent";
|
|
247
|
+
function et({
|
|
254
248
|
className: e,
|
|
255
249
|
placeholder: t = "",
|
|
256
250
|
options: r = [],
|
|
257
|
-
error:
|
|
258
|
-
unstyled:
|
|
259
|
-
disabled:
|
|
260
|
-
value:
|
|
251
|
+
error: n,
|
|
252
|
+
unstyled: s,
|
|
253
|
+
disabled: o,
|
|
254
|
+
value: l,
|
|
261
255
|
maxHeight: u = 408,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
256
|
+
arrowIcon: f,
|
|
257
|
+
closeIcon: d,
|
|
258
|
+
checkIcon: p,
|
|
259
|
+
onChange: g,
|
|
260
|
+
onClear: h,
|
|
261
|
+
renderItem: C,
|
|
262
|
+
sectionLabelStyle: y,
|
|
263
|
+
buttonAreaStyle: a,
|
|
264
|
+
clearLabelText: N,
|
|
265
|
+
optionStyle: v,
|
|
266
|
+
...x
|
|
267
267
|
}) {
|
|
268
|
-
const
|
|
268
|
+
const w = I(null), [_, D] = E(0), j = c(() => s ? e : F(m(
|
|
269
269
|
"flex items-center justify-between rounded-md border bg-background px-3 py-2 w-full overflow-hidden cursor-pointer",
|
|
270
270
|
"disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-ring",
|
|
271
|
-
|
|
272
|
-
), e), [e,
|
|
273
|
-
|
|
274
|
-
}, [
|
|
275
|
-
const
|
|
276
|
-
for (let
|
|
277
|
-
const
|
|
278
|
-
|
|
271
|
+
n ? "border-danger hover:border-danger-fore" : "border-input not-disabled:hover:border-input-fore"
|
|
272
|
+
), e), [e, n, s]), Y = c(() => Array.isArray(l), []), $ = O((b) => {
|
|
273
|
+
g?.(b), Y || w.current?.close();
|
|
274
|
+
}, [g, Y]), B = O((b) => Array.isArray(l) ? l.indexOf(b) > -1 : l === b, [l]), X = c(() => {
|
|
275
|
+
const b = {}, M = r.filter((P) => typeof P != "string");
|
|
276
|
+
for (let P = 0, G = M.length; P < G; P += 1) {
|
|
277
|
+
const V = M[P];
|
|
278
|
+
b[`${V.value}`] = V.label;
|
|
279
279
|
}
|
|
280
|
-
return
|
|
281
|
-
}, [r]),
|
|
282
|
-
if (!
|
|
283
|
-
if (Array.isArray(
|
|
284
|
-
if (!
|
|
285
|
-
const
|
|
286
|
-
for (let
|
|
287
|
-
|
|
288
|
-
return
|
|
280
|
+
return b;
|
|
281
|
+
}, [r]), T = c(() => {
|
|
282
|
+
if (!l) return t;
|
|
283
|
+
if (Array.isArray(l)) {
|
|
284
|
+
if (!l.length) return t;
|
|
285
|
+
const b = [...l].sort(), M = [];
|
|
286
|
+
for (let P = 0, G = b.length; P < G; P += 1)
|
|
287
|
+
M[P] = X[`${b[P]}`] || "";
|
|
288
|
+
return M.filter(Boolean).join(",") || t;
|
|
289
289
|
}
|
|
290
|
-
return
|
|
291
|
-
}, [t,
|
|
290
|
+
return X[`${l}`] || t;
|
|
291
|
+
}, [t, l, X]), A = T === t, be = c(() => m(
|
|
292
292
|
"overflow-hidden overflow-ellipsis whitespace-nowrap",
|
|
293
|
-
|
|
294
|
-
), [
|
|
295
|
-
} }) :
|
|
296
|
-
index:
|
|
297
|
-
selected:
|
|
298
|
-
onChange: () =>
|
|
299
|
-
}) : typeof
|
|
300
|
-
|
|
293
|
+
A ? "text-muted" : "text-text"
|
|
294
|
+
), [A]), me = O((b, M) => C ? typeof b == "string" ? C(b, { index: M, selected: !1, onChange: () => {
|
|
295
|
+
} }) : C(b, {
|
|
296
|
+
index: M,
|
|
297
|
+
selected: B(b.value),
|
|
298
|
+
onChange: () => $(b.value)
|
|
299
|
+
}) : typeof b == "string" ? /* @__PURE__ */ i(
|
|
300
|
+
"h5",
|
|
301
|
+
{
|
|
302
|
+
className: m("font-normal py-1 px-2 text-muted", y),
|
|
303
|
+
children: b
|
|
304
|
+
},
|
|
305
|
+
`optionheader-${M}`
|
|
306
|
+
) : /* @__PURE__ */ i(
|
|
307
|
+
Ee,
|
|
301
308
|
{
|
|
302
|
-
selected:
|
|
303
|
-
onChange:
|
|
304
|
-
|
|
309
|
+
selected: B(b.value),
|
|
310
|
+
onChange: $,
|
|
311
|
+
checkIcon: p,
|
|
312
|
+
className: v,
|
|
313
|
+
...b
|
|
305
314
|
},
|
|
306
|
-
|
|
307
|
-
), [
|
|
308
|
-
|
|
309
|
-
|
|
315
|
+
b.label
|
|
316
|
+
), [C, $, B, y, v, p]), ge = c(() => m(
|
|
317
|
+
"relative flex items-center pr-4 space-x-2",
|
|
318
|
+
a
|
|
319
|
+
), [a]);
|
|
320
|
+
return /* @__PURE__ */ i(
|
|
321
|
+
ae,
|
|
310
322
|
{
|
|
311
|
-
label: /* @__PURE__ */
|
|
312
|
-
/* @__PURE__ */
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
|
|
323
|
+
label: /* @__PURE__ */ k("button", { type: "button", className: j, disabled: o, ...x, children: [
|
|
324
|
+
/* @__PURE__ */ i("span", { className: be, children: T }),
|
|
325
|
+
/* @__PURE__ */ k("div", { className: ge, children: [
|
|
326
|
+
h && !A ? /* @__PURE__ */ i(
|
|
315
327
|
"div",
|
|
316
328
|
{
|
|
317
329
|
tabIndex: -1,
|
|
318
330
|
role: "button",
|
|
319
|
-
className: "size-6 p-1.5 rounded hover:bg-accent",
|
|
320
|
-
"aria-label":
|
|
321
|
-
onKeyDown: (
|
|
322
|
-
|
|
331
|
+
className: "size-6 p-1.5 rounded hover:bg-accent cursor-pointer",
|
|
332
|
+
"aria-label": N,
|
|
333
|
+
onKeyDown: (b) => {
|
|
334
|
+
b.key !== "Enter" && b.key !== "Space" || h();
|
|
323
335
|
},
|
|
324
|
-
onClick: (
|
|
325
|
-
|
|
336
|
+
onClick: (b) => {
|
|
337
|
+
b.stopPropagation(), h();
|
|
326
338
|
},
|
|
327
|
-
children:
|
|
339
|
+
children: d
|
|
328
340
|
}
|
|
329
341
|
) : null,
|
|
330
|
-
|
|
342
|
+
f
|
|
331
343
|
] })
|
|
332
344
|
] }),
|
|
333
|
-
ref:
|
|
334
|
-
onOpen: (
|
|
335
|
-
disabled:
|
|
336
|
-
children: /* @__PURE__ */
|
|
345
|
+
ref: w,
|
|
346
|
+
onOpen: (b) => D(b?.getBoundingClientRect().width || 0),
|
|
347
|
+
disabled: o,
|
|
348
|
+
children: /* @__PURE__ */ i(
|
|
337
349
|
"ul",
|
|
338
350
|
{
|
|
339
351
|
className: "overflow-y-auto flex flex-col",
|
|
340
352
|
role: "listbox",
|
|
341
|
-
style: { minWidth:
|
|
342
|
-
children: r.map(
|
|
353
|
+
style: { minWidth: _, maxWidth: "calc(100vw - 3rem)", maxHeight: u },
|
|
354
|
+
children: r.map(me)
|
|
343
355
|
}
|
|
344
356
|
)
|
|
345
357
|
}
|
|
346
358
|
);
|
|
347
359
|
}
|
|
348
|
-
function
|
|
349
|
-
|
|
350
|
-
|
|
360
|
+
function Ee({
|
|
361
|
+
className: e,
|
|
362
|
+
value: t,
|
|
363
|
+
label: r,
|
|
364
|
+
selected: n,
|
|
365
|
+
checkIcon: s,
|
|
366
|
+
onChange: o
|
|
367
|
+
}) {
|
|
368
|
+
const l = c(() => m(
|
|
369
|
+
"flex items-center w-full hover:bg-accent rounded p-1 cursor-pointer",
|
|
351
370
|
e
|
|
352
371
|
), [e]);
|
|
353
|
-
return /* @__PURE__ */
|
|
372
|
+
return /* @__PURE__ */ k(
|
|
354
373
|
"button",
|
|
355
374
|
{
|
|
356
375
|
type: "button",
|
|
357
376
|
role: "option",
|
|
358
|
-
className:
|
|
359
|
-
"aria-selected":
|
|
360
|
-
onClick: () =>
|
|
377
|
+
className: l,
|
|
378
|
+
"aria-selected": n,
|
|
379
|
+
onClick: () => o?.(t),
|
|
361
380
|
children: [
|
|
362
|
-
|
|
381
|
+
n && s ? s : /* @__PURE__ */ i("div", { className: "w-5 h-1 mr-1" }),
|
|
363
382
|
r
|
|
364
383
|
]
|
|
365
384
|
}
|
|
366
385
|
);
|
|
367
386
|
}
|
|
368
|
-
function
|
|
369
|
-
const u =
|
|
387
|
+
function tt({ checked: e, className: t, id: r, name: n, onChange: s, value: o, ...l }) {
|
|
388
|
+
const u = c(() => m(
|
|
370
389
|
"relative inline-flex justify-center items-center border border-input w-4.5 h-4.5 rounded-full",
|
|
371
390
|
"cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed not-disabled:hover:border-input-fore",
|
|
372
391
|
e ? "[&_i]:bg-primary disabled:[&_i]:bg-text disabled:border-input" : "",
|
|
373
392
|
t
|
|
374
|
-
), [t, e]),
|
|
375
|
-
|
|
393
|
+
), [t, e]), f = () => {
|
|
394
|
+
l.disabled || s?.(!e);
|
|
376
395
|
};
|
|
377
|
-
return /* @__PURE__ */
|
|
396
|
+
return /* @__PURE__ */ k(
|
|
378
397
|
"button",
|
|
379
398
|
{
|
|
380
399
|
type: "button",
|
|
381
400
|
role: "radio",
|
|
382
|
-
id: r ||
|
|
401
|
+
id: r || n,
|
|
383
402
|
className: u,
|
|
384
|
-
onClick:
|
|
403
|
+
onClick: f,
|
|
385
404
|
"aria-checked": e,
|
|
386
|
-
...
|
|
405
|
+
...l,
|
|
387
406
|
children: [
|
|
388
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ i(
|
|
389
408
|
"i",
|
|
390
409
|
{
|
|
391
410
|
className: "block w-2.5 h-2.5 rounded-full transition-transform",
|
|
392
411
|
style: { transform: e ? "" : "scale(0.8)", opacity: e ? 1 : 0 }
|
|
393
412
|
}
|
|
394
413
|
),
|
|
395
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ i(
|
|
396
415
|
"input",
|
|
397
416
|
{
|
|
398
417
|
type: "radio",
|
|
399
418
|
"aria-hidden": "true",
|
|
400
|
-
name:
|
|
419
|
+
name: n,
|
|
401
420
|
checked: e,
|
|
402
|
-
value:
|
|
403
|
-
onChange:
|
|
404
|
-
disabled:
|
|
421
|
+
value: o,
|
|
422
|
+
onChange: f,
|
|
423
|
+
disabled: l.disabled,
|
|
405
424
|
style: { position: "absolute", pointerEvents: "none", top: 0, left: 0, width: 1, height: 1, opacity: 0 }
|
|
406
425
|
}
|
|
407
426
|
)
|
|
@@ -409,49 +428,49 @@ function Ke({ checked: e, className: t, id: r, name: o, onChange: l, value: i, .
|
|
|
409
428
|
}
|
|
410
429
|
);
|
|
411
430
|
}
|
|
412
|
-
const
|
|
431
|
+
const De = S(({
|
|
413
432
|
className: e,
|
|
414
433
|
checked: t,
|
|
415
434
|
onChange: r,
|
|
416
|
-
value:
|
|
417
|
-
id:
|
|
418
|
-
name:
|
|
419
|
-
...
|
|
435
|
+
value: n,
|
|
436
|
+
id: s,
|
|
437
|
+
name: o,
|
|
438
|
+
...l
|
|
420
439
|
}, u) => {
|
|
421
|
-
const
|
|
440
|
+
const f = c(() => F(m(
|
|
422
441
|
"inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
|
|
423
442
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
|
|
424
443
|
"w-11",
|
|
425
444
|
t ? "bg-primary" : "bg-input"
|
|
426
|
-
), e), [e, t]),
|
|
445
|
+
), e), [e, t]), d = c(() => F(
|
|
427
446
|
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
428
447
|
e
|
|
429
448
|
), [e]), p = () => {
|
|
430
|
-
|
|
449
|
+
l.disabled || r?.(!t);
|
|
431
450
|
};
|
|
432
|
-
return /* @__PURE__ */
|
|
451
|
+
return /* @__PURE__ */ k(
|
|
433
452
|
"button",
|
|
434
453
|
{
|
|
435
454
|
type: "button",
|
|
436
455
|
role: "switch",
|
|
437
|
-
id:
|
|
438
|
-
className:
|
|
456
|
+
id: s || o,
|
|
457
|
+
className: f,
|
|
439
458
|
onClick: p,
|
|
440
459
|
"aria-checked": t,
|
|
441
|
-
...
|
|
460
|
+
...l,
|
|
442
461
|
children: [
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ i("span", { className: d, style: { transform: t ? "translateX(100%)" : "" } }),
|
|
463
|
+
/* @__PURE__ */ i(
|
|
445
464
|
"input",
|
|
446
465
|
{
|
|
447
466
|
ref: u,
|
|
448
467
|
type: "checkbox",
|
|
449
468
|
"aria-hidden": "true",
|
|
450
|
-
name:
|
|
469
|
+
name: o,
|
|
451
470
|
checked: t,
|
|
452
|
-
value:
|
|
471
|
+
value: n,
|
|
453
472
|
onChange: p,
|
|
454
|
-
disabled:
|
|
473
|
+
disabled: l.disabled,
|
|
455
474
|
style: { position: "absolute", pointerEvents: "none", top: 0, left: 0, width: 1, height: 1, opacity: 0 }
|
|
456
475
|
}
|
|
457
476
|
)
|
|
@@ -459,110 +478,113 @@ const Fe = R(({
|
|
|
459
478
|
}
|
|
460
479
|
);
|
|
461
480
|
});
|
|
462
|
-
|
|
463
|
-
function
|
|
464
|
-
const
|
|
465
|
-
return
|
|
466
|
-
u.current =
|
|
467
|
-
}, [
|
|
468
|
-
if (!
|
|
469
|
-
if (
|
|
470
|
-
|
|
471
|
-
|
|
481
|
+
De.displayName = "Switch";
|
|
482
|
+
function nt({ header: e, show: t, children: r, timeout: n = 300, ...s }) {
|
|
483
|
+
const o = I(null), l = I(0), u = I(0), f = I(!0);
|
|
484
|
+
return R(() => {
|
|
485
|
+
u.current = n;
|
|
486
|
+
}, [n]), Q(() => {
|
|
487
|
+
if (!o.current) return;
|
|
488
|
+
if (o.current.style.overflow = "hidden", o.current.style.opacity = "1", f.current) {
|
|
489
|
+
f.current = !1, o.current.style.height = t ? "auto" : "0px", t ? window.requestAnimationFrame(() => {
|
|
490
|
+
o.current && (l.current = o.current.offsetHeight);
|
|
472
491
|
}) : (window.requestAnimationFrame(() => {
|
|
473
|
-
|
|
474
|
-
}),
|
|
492
|
+
o.current && (o.current.style.height = "auto", l.current = o.current.offsetHeight, o.current.style.height = "0px");
|
|
493
|
+
}), o.current.style.opacity = "0");
|
|
475
494
|
return;
|
|
476
495
|
}
|
|
477
|
-
t || (
|
|
478
|
-
const
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
496
|
+
t || (o.current.style.height = `${l.current}px`);
|
|
497
|
+
const d = [];
|
|
498
|
+
d[0] = window.requestAnimationFrame(() => {
|
|
499
|
+
d[1] = window.requestAnimationFrame(() => {
|
|
500
|
+
o.current && (o.current.style.height = `${t ? l.current : 0}px`, o.current.style.opacity = t ? "1" : "0");
|
|
482
501
|
});
|
|
483
502
|
});
|
|
484
503
|
let p;
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
})) :
|
|
504
|
+
const g = () => {
|
|
505
|
+
o.current && (t ? (o.current.style.height = "auto", o.current.style.overflow = "", o.current.style.opacity = "", window.requestAnimationFrame(() => {
|
|
506
|
+
o.current && (l.current = o.current.offsetHeight);
|
|
507
|
+
})) : o.current.style.height = "0px");
|
|
489
508
|
};
|
|
490
|
-
return u.current === 0 ?
|
|
491
|
-
|
|
509
|
+
return u.current === 0 ? g() : p = window.setTimeout(g, u.current), () => {
|
|
510
|
+
d.forEach(window.cancelAnimationFrame), p && window.clearTimeout(p);
|
|
492
511
|
};
|
|
493
|
-
}, [t]), /* @__PURE__ */
|
|
512
|
+
}, [t]), /* @__PURE__ */ k("div", { ...s, children: [
|
|
494
513
|
e,
|
|
495
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ i(
|
|
496
515
|
"div",
|
|
497
516
|
{
|
|
498
517
|
className: "transition-all ease-in-out overflow-hidden",
|
|
499
518
|
role: "region",
|
|
500
519
|
"aria-hidden": !t,
|
|
501
|
-
ref:
|
|
502
|
-
style: { transitionDuration: `${
|
|
520
|
+
ref: o,
|
|
521
|
+
style: { transitionDuration: `${n}ms` },
|
|
503
522
|
children: r
|
|
504
523
|
}
|
|
505
524
|
)
|
|
506
525
|
] });
|
|
507
526
|
}
|
|
508
|
-
const
|
|
527
|
+
const Oe = S(({
|
|
509
528
|
children: e,
|
|
510
529
|
position: t = "bottom",
|
|
511
530
|
label: r,
|
|
512
|
-
className:
|
|
513
|
-
timeout:
|
|
514
|
-
offset:
|
|
515
|
-
clientPoint:
|
|
531
|
+
className: n,
|
|
532
|
+
timeout: s = 150,
|
|
533
|
+
offset: o = { x: 0, y: 6 },
|
|
534
|
+
clientPoint: l = !1,
|
|
516
535
|
disabled: u
|
|
517
|
-
},
|
|
518
|
-
const [
|
|
519
|
-
nodeId:
|
|
520
|
-
open:
|
|
536
|
+
}, f) => {
|
|
537
|
+
const [d, p] = E(!1), g = K(), { refs: h, floatingStyles: C, context: y } = H({
|
|
538
|
+
nodeId: g,
|
|
539
|
+
open: d,
|
|
521
540
|
placement: t,
|
|
522
541
|
middleware: [
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
542
|
+
ie(),
|
|
543
|
+
se(),
|
|
544
|
+
le({ mainAxis: o.y, crossAxis: o.x })
|
|
526
545
|
],
|
|
527
|
-
whileElementsMounted: u ? void 0 :
|
|
546
|
+
whileElementsMounted: u ? void 0 : oe,
|
|
528
547
|
onOpenChange: p
|
|
529
|
-
}), { getReferenceProps:
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
]), { isMounted:
|
|
533
|
-
duration:
|
|
548
|
+
}), { getReferenceProps: a, getFloatingProps: N } = U([
|
|
549
|
+
Ne(y, { enabled: !u }),
|
|
550
|
+
ke(y, { enabled: l })
|
|
551
|
+
]), { isMounted: v, styles: x } = L(y, {
|
|
552
|
+
duration: s,
|
|
534
553
|
initial: { opacity: 0, transform: "scale(0.8)" }
|
|
535
554
|
});
|
|
536
|
-
|
|
537
|
-
floating:
|
|
538
|
-
reference:
|
|
555
|
+
re(f, () => ({
|
|
556
|
+
floating: h.floating,
|
|
557
|
+
reference: h.reference,
|
|
539
558
|
open: () => p(!0),
|
|
540
559
|
close: () => p(!1)
|
|
541
|
-
})),
|
|
560
|
+
})), R(() => {
|
|
542
561
|
u && p(!1);
|
|
543
562
|
}, [u]);
|
|
544
|
-
const
|
|
545
|
-
return /* @__PURE__ */
|
|
546
|
-
|
|
547
|
-
ref:
|
|
548
|
-
...
|
|
563
|
+
const w = typeof e == "string" ? /* @__PURE__ */ i("span", { children: e }) : e;
|
|
564
|
+
return /* @__PURE__ */ k(te, { children: [
|
|
565
|
+
Z(z.only(w), {
|
|
566
|
+
ref: h.setReference,
|
|
567
|
+
...a()
|
|
549
568
|
}),
|
|
550
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ i(W, { disabled: u || !v, children: /* @__PURE__ */ i("div", { role: "tooltip", className: "z-[9999]", ref: h.setFloating, ...N({ style: C }), children: /* @__PURE__ */ i(ue, { className: n, style: x, children: r }) }) })
|
|
551
570
|
] });
|
|
552
|
-
})
|
|
571
|
+
});
|
|
572
|
+
Oe.displayName = "Tooltip";
|
|
573
|
+
const ue = S(({
|
|
553
574
|
className: e,
|
|
554
575
|
custom: t,
|
|
555
576
|
...r
|
|
556
|
-
},
|
|
557
|
-
const
|
|
577
|
+
}, n) => {
|
|
578
|
+
const s = c(() => m(
|
|
558
579
|
"relative w-auto h-auto outline-none transition-transform ease-in-out whitespace-pre",
|
|
559
580
|
t ? null : "border border-accent rounded shadow-md px-3 py-1 bg-background",
|
|
560
581
|
e
|
|
561
582
|
), [e, t]);
|
|
562
|
-
return /* @__PURE__ */
|
|
583
|
+
return /* @__PURE__ */ i("div", { ref: n, className: s, ...r });
|
|
563
584
|
});
|
|
564
|
-
|
|
565
|
-
|
|
585
|
+
ue.displayName = "TooltipContent";
|
|
586
|
+
function je({ variant: e, size: t }) {
|
|
587
|
+
return m(
|
|
566
588
|
"inline-flex items-center justify-center whitespace-nowrap transition-colors rounded-md cursor-pointer",
|
|
567
589
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
568
590
|
"disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-auto",
|
|
@@ -581,184 +603,182 @@ function Be({ variant: e, size: t }) {
|
|
|
581
603
|
}
|
|
582
604
|
);
|
|
583
605
|
}
|
|
584
|
-
function
|
|
585
|
-
const
|
|
586
|
-
return /* @__PURE__ */
|
|
606
|
+
function rt({ size: e, variant: t, className: r, ...n }) {
|
|
607
|
+
const s = c(() => m(je({ size: e, variant: t }), r), [e, t, r]);
|
|
608
|
+
return /* @__PURE__ */ i("button", { className: s, type: "button", ...n });
|
|
587
609
|
}
|
|
588
|
-
function
|
|
610
|
+
function ot({
|
|
589
611
|
open: e,
|
|
590
612
|
children: t,
|
|
591
613
|
timeout: r = 150,
|
|
592
|
-
padding:
|
|
593
|
-
verticalAlign:
|
|
594
|
-
closeOnOverlay:
|
|
595
|
-
closeOnEsc:
|
|
614
|
+
padding: n = "0.85rem",
|
|
615
|
+
verticalAlign: s = "center",
|
|
616
|
+
closeOnOverlay: o,
|
|
617
|
+
closeOnEsc: l,
|
|
596
618
|
onExited: u,
|
|
597
|
-
className:
|
|
598
|
-
onOpenChange:
|
|
619
|
+
className: f,
|
|
620
|
+
onOpenChange: d,
|
|
599
621
|
size: p,
|
|
600
|
-
...
|
|
622
|
+
...g
|
|
601
623
|
}) {
|
|
602
|
-
const
|
|
603
|
-
|
|
604
|
-
enabled:
|
|
605
|
-
escapeKey:
|
|
624
|
+
const h = I(u), C = I(!1), y = K(), { refs: a, context: N } = H({ open: e, onOpenChange: d, nodeId: y }), { getFloatingProps: v } = U([
|
|
625
|
+
Ie(N, {
|
|
626
|
+
enabled: l,
|
|
627
|
+
escapeKey: l,
|
|
606
628
|
outsidePress: !1
|
|
607
629
|
})
|
|
608
|
-
]), { isMounted:
|
|
630
|
+
]), { isMounted: x, styles: w } = L(N, {
|
|
609
631
|
duration: r,
|
|
610
632
|
initial: { opacity: 0, transform: "scale(0.8)" }
|
|
611
633
|
});
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
}, [
|
|
615
|
-
const
|
|
616
|
-
|
|
617
|
-
}, [
|
|
618
|
-
|
|
619
|
-
const
|
|
620
|
-
"place-items-start items-start":
|
|
621
|
-
"place-items-end":
|
|
622
|
-
"place-items-center":
|
|
623
|
-
}), [
|
|
624
|
-
return /* @__PURE__ */
|
|
625
|
-
|
|
634
|
+
R(() => {
|
|
635
|
+
C.current !== x && (C.current = x, !x && h.current?.());
|
|
636
|
+
}, [x]);
|
|
637
|
+
const _ = O(() => {
|
|
638
|
+
o && d?.(!1);
|
|
639
|
+
}, [d, o]);
|
|
640
|
+
h.current = u;
|
|
641
|
+
const D = c(() => m("grid bg-backdrop z-40 justify-items-center", {
|
|
642
|
+
"place-items-start items-start": s === "start",
|
|
643
|
+
"place-items-end": s === "end",
|
|
644
|
+
"place-items-center": s === "center" || !s
|
|
645
|
+
}), [s]), j = c(() => F("transition ease-in-out", f), [f]);
|
|
646
|
+
return /* @__PURE__ */ i(W, { disabled: !x, children: /* @__PURE__ */ i(
|
|
647
|
+
J,
|
|
626
648
|
{
|
|
627
|
-
className:
|
|
649
|
+
className: D,
|
|
628
650
|
"data-testid": "vs-dialog-overlay",
|
|
629
|
-
onClick:
|
|
630
|
-
style: { padding:
|
|
651
|
+
onClick: _,
|
|
652
|
+
style: { padding: n, opacity: w.opacity },
|
|
631
653
|
lockScroll: !0,
|
|
632
|
-
children: /* @__PURE__ */
|
|
633
|
-
|
|
654
|
+
children: /* @__PURE__ */ i(
|
|
655
|
+
de,
|
|
634
656
|
{
|
|
635
|
-
ref:
|
|
636
|
-
className:
|
|
657
|
+
ref: a.setFloating,
|
|
658
|
+
className: j,
|
|
637
659
|
role: "dialog",
|
|
638
660
|
size: p,
|
|
639
|
-
|
|
661
|
+
style: w,
|
|
662
|
+
onClick: q,
|
|
663
|
+
...v({ ...g }),
|
|
640
664
|
children: t
|
|
641
665
|
}
|
|
642
666
|
)
|
|
643
667
|
}
|
|
644
668
|
) });
|
|
645
669
|
}
|
|
646
|
-
const
|
|
670
|
+
const de = S(({
|
|
647
671
|
size: e,
|
|
648
672
|
className: t,
|
|
649
673
|
...r
|
|
650
|
-
},
|
|
651
|
-
const
|
|
674
|
+
}, n) => {
|
|
675
|
+
const s = c(() => m(
|
|
652
676
|
e ? "flex flex-col bg-background shadow-lg p-5 rounded" : null,
|
|
653
677
|
{
|
|
654
|
-
"w-full max-w-sm": e === "small",
|
|
655
|
-
"w-full max-w-
|
|
656
|
-
"w-full max-w-
|
|
678
|
+
"w-full max-w-dialog-sm": e === "small",
|
|
679
|
+
"w-full max-w-dialog-md": e === "medium",
|
|
680
|
+
"w-full max-w-dialog-lg": e === "large"
|
|
657
681
|
},
|
|
658
682
|
t
|
|
659
683
|
), [e, t]);
|
|
660
|
-
return /* @__PURE__ */
|
|
684
|
+
return /* @__PURE__ */ i("div", { ref: n, className: s, ...r });
|
|
661
685
|
});
|
|
662
|
-
|
|
663
|
-
const
|
|
664
|
-
function
|
|
665
|
-
|
|
686
|
+
de.displayName = "DialogContent";
|
|
687
|
+
const $e = { open: 250, close: 150 };
|
|
688
|
+
function it({
|
|
689
|
+
open: e,
|
|
690
|
+
timeout: t = $e,
|
|
691
|
+
onOpenChange: r,
|
|
692
|
+
position: n = "right",
|
|
693
|
+
overlay: s,
|
|
694
|
+
onExited: o,
|
|
695
|
+
...l
|
|
696
|
+
}) {
|
|
697
|
+
const u = K(), f = I(!1), d = I(o), { refs: p, context: g } = H({ open: e, onOpenChange: r, nodeId: u }), { isMounted: h, styles: C } = L(g, {
|
|
666
698
|
duration: t,
|
|
667
699
|
initial() {
|
|
668
|
-
let
|
|
669
|
-
return
|
|
700
|
+
let a = "translateX(75%)";
|
|
701
|
+
return n === "left" ? a = "translateX(-75%)" : n === "top" ? a = "translateY(-75%)" : n === "bottom" && (a = "translateY(75%)"), { opacity: 0, transform: a };
|
|
670
702
|
}
|
|
671
|
-
})
|
|
703
|
+
});
|
|
704
|
+
R(() => {
|
|
705
|
+
f.current !== h && (f.current = h, !h && d.current?.());
|
|
706
|
+
}, [h]);
|
|
707
|
+
const y = c(() => m(
|
|
672
708
|
"fixed transition-transform z-30",
|
|
673
709
|
{
|
|
674
|
-
"top-0 right-0 h-full max-h-screen":
|
|
675
|
-
"top-0 left-0 h-full max-h-screen":
|
|
676
|
-
"top-0 left-0 right-0 w-full max-w-screen":
|
|
677
|
-
"bottom-0 left-0 right-0 w-full max-w-screen":
|
|
710
|
+
"top-0 right-0 h-full max-h-screen": n === "right",
|
|
711
|
+
"top-0 left-0 h-full max-h-screen": n === "left",
|
|
712
|
+
"top-0 left-0 right-0 w-full max-w-screen": n === "top",
|
|
713
|
+
"bottom-0 left-0 right-0 w-full max-w-screen": n === "bottom"
|
|
678
714
|
}
|
|
679
|
-
), [
|
|
680
|
-
return /* @__PURE__ */
|
|
681
|
-
|
|
682
|
-
|
|
715
|
+
), [n]);
|
|
716
|
+
return d.current = o, /* @__PURE__ */ k(W, { disabled: !h, children: [
|
|
717
|
+
s ? /* @__PURE__ */ i(
|
|
718
|
+
J,
|
|
683
719
|
{
|
|
684
720
|
className: "bg-backdrop",
|
|
685
|
-
style: { opacity:
|
|
721
|
+
style: { opacity: C.opacity },
|
|
686
722
|
onClick: () => r?.(!1)
|
|
687
723
|
}
|
|
688
724
|
) : null,
|
|
689
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ i(
|
|
690
726
|
"div",
|
|
691
727
|
{
|
|
692
|
-
ref:
|
|
693
|
-
className:
|
|
728
|
+
ref: p.setFloating,
|
|
729
|
+
className: y,
|
|
694
730
|
role: "dialog",
|
|
695
|
-
style:
|
|
696
|
-
children: /* @__PURE__ */
|
|
731
|
+
style: C,
|
|
732
|
+
children: /* @__PURE__ */ i(Be, { ...l })
|
|
697
733
|
}
|
|
698
734
|
)
|
|
699
735
|
] });
|
|
700
736
|
}
|
|
701
|
-
function
|
|
702
|
-
const
|
|
737
|
+
function Be({ className: e, unstyled: t, ...r }) {
|
|
738
|
+
const n = c(() => t ? e : F(m(
|
|
703
739
|
"relative bg-background min-w-full min-h-full border border-input shadow-lg"
|
|
704
740
|
), e), [t, e]);
|
|
705
|
-
return /* @__PURE__ */
|
|
741
|
+
return /* @__PURE__ */ i("div", { className: n, ...r });
|
|
706
742
|
}
|
|
707
|
-
function
|
|
708
|
-
return /* @__PURE__ */
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
] });
|
|
713
|
-
}
|
|
714
|
-
function G(e) {
|
|
715
|
-
return /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 32 32", ...e, children: [
|
|
716
|
-
/* @__PURE__ */ n("path", { d: "M16 0C7.16 0 0 7.16 0 16C0 24.84 7.16 32 16 32C24.84 32 32 24.84 32 16C32 7.16 24.84 0 16 0ZM16 31C7.73 31 1 24.27 1 16C1 7.73 7.73 1 16 1C24.27 1 31 7.73 31 16C31 24.27 24.27 31 16 31Z", fill: "currentColor" }),
|
|
717
|
-
/* @__PURE__ */ n("path", { d: "M15.5 19.55V8.54999C15.5 8.26999 15.72 8.04999 16 8.04999C16.28 8.04999 16.5 8.26999 16.5 8.54999V19.55C16.5 19.83 16.28 20.05 16 20.05C15.72 20.05 15.5 19.83 15.5 19.55Z", fill: "currentColor" }),
|
|
718
|
-
/* @__PURE__ */ n("path", { d: "M16 23.95C16.5523 23.95 17 23.5023 17 22.95C17 22.3977 16.5523 21.95 16 21.95C15.4477 21.95 15 22.3977 15 22.95C15 23.5023 15.4477 23.95 16 23.95Z", fill: "currentColor" })
|
|
719
|
-
] });
|
|
720
|
-
}
|
|
721
|
-
function Le(e) {
|
|
722
|
-
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 52 45", ...e, children: /* @__PURE__ */ n("path", { d: "M50.6 37.8 29.3 2c-1.5-2.6-5.1-2.8-6.7-.3l-21.2 36c-1.7 2.6.2 6.6 3.4 6.6h42.4c3.1 0 5-4 3.4-6.6Zm-24.7.6a2.7 2.7 0 1 1 0-5.5 2.7 2.7 0 0 1 0 5.5Zm2.9-10.1c0 1.5-1.3 2.7-2.8 2.7a2.8 2.8 0 0 1-2.8-2.7V13.9c0-1.5 1.3-2.7 2.8-2.7 1.5 0 2.8 1.2 2.8 2.7v14.4Z", fill: "currentColor" }) });
|
|
723
|
-
}
|
|
724
|
-
function Ee({ size: e = 20, label: t = "Loading...", ...r }) {
|
|
725
|
-
return /* @__PURE__ */ g("div", { role: "status", ...r, children: [
|
|
726
|
-
/* @__PURE__ */ g("svg", { "aria-hidden": "true", className: "text-accent animate-spin fill-primary", width: e, height: e, viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
727
|
-
/* @__PURE__ */ n("path", { d: "M100 50.6a50 50 0 1 1-100 0 50 50 0 0 1 100 0Zm-91 0a41 41 0 1 0 82 0 41 41 0 0 0-82 0Z", fill: "currentColor" }),
|
|
728
|
-
/* @__PURE__ */ n("path", { d: "M94 39a4.2 4.2 0 0 0 3-5.4A50 50 0 0 0 41.7 1.3c-2.4.4-3.9 2.9-3.2 5.3a5 5 0 0 0 5.6 3.5A41 41 0 0 1 88 36 5 5 0 0 0 94 39Z", fill: "currentFill" })
|
|
743
|
+
function Xe({ size: e = 20, label: t = "Loading...", ...r }) {
|
|
744
|
+
return /* @__PURE__ */ k("div", { role: "status", ...r, children: [
|
|
745
|
+
/* @__PURE__ */ k("svg", { "aria-hidden": "true", className: "text-accent animate-spin fill-primary", width: e, height: e, viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
746
|
+
/* @__PURE__ */ i("path", { d: "M100 50.6a50 50 0 1 1-100 0 50 50 0 0 1 100 0Zm-91 0a41 41 0 1 0 82 0 41 41 0 0 0-82 0Z", fill: "currentColor" }),
|
|
747
|
+
/* @__PURE__ */ i("path", { d: "M94 39a4.2 4.2 0 0 0 3-5.4A50 50 0 0 0 41.7 1.3c-2.4.4-3.9 2.9-3.2 5.3a5 5 0 0 0 5.6 3.5A41 41 0 0 1 88 36 5 5 0 0 0 94 39Z", fill: "currentFill" })
|
|
729
748
|
] }),
|
|
730
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ i("span", { className: "sr-only", children: t })
|
|
731
750
|
] });
|
|
732
751
|
}
|
|
733
|
-
function
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
e === "
|
|
738
|
-
e === "
|
|
739
|
-
e === "
|
|
740
|
-
e === "
|
|
752
|
+
function He({ type: e, label: t, message: r }) {
|
|
753
|
+
const { icons: n } = Ye();
|
|
754
|
+
return /* @__PURE__ */ k("div", { className: "flex items-center px-4 py-3 w-80 text-sm bg-background border border-input rounded-lg shadow-md m-2", children: [
|
|
755
|
+
e ? /* @__PURE__ */ k("figure", { className: "mr-2", children: [
|
|
756
|
+
e === "success" && n?.success ? n.success : null,
|
|
757
|
+
e === "info" && n?.info ? n.info : null,
|
|
758
|
+
e === "error" && n?.error ? n.error : null,
|
|
759
|
+
e === "warn" && n?.warn ? n.warn : null,
|
|
760
|
+
e === "loading" ? /* @__PURE__ */ i(Xe, { size: 20 }) : null
|
|
741
761
|
] }) : null,
|
|
742
|
-
/* @__PURE__ */
|
|
743
|
-
/* @__PURE__ */
|
|
744
|
-
r ? /* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ k("div", { className: "space-y-2", children: [
|
|
763
|
+
/* @__PURE__ */ i("p", { className: "font-medium leading-none", children: t }),
|
|
764
|
+
r ? /* @__PURE__ */ i("p", { children: r }) : null
|
|
745
765
|
] })
|
|
746
766
|
] });
|
|
747
767
|
}
|
|
748
|
-
function
|
|
768
|
+
function ee() {
|
|
749
769
|
}
|
|
750
|
-
class
|
|
770
|
+
class Le {
|
|
751
771
|
/** システムで1つしか存在しない前提とする */
|
|
752
|
-
notify =
|
|
772
|
+
notify = ee;
|
|
753
773
|
lastId = 0;
|
|
754
774
|
/** internal use only */
|
|
755
775
|
subscribe = (t) => (this.notify = t, () => {
|
|
756
|
-
this.notify =
|
|
776
|
+
this.notify = ee;
|
|
757
777
|
});
|
|
758
778
|
add = (t, r = {}) => {
|
|
759
779
|
this.lastId += 1;
|
|
760
|
-
const
|
|
761
|
-
return this.notify({ id:
|
|
780
|
+
const n = `${this.lastId}`;
|
|
781
|
+
return this.notify({ id: n, type: "add", config: { id: n, label: t, ...r } }), n;
|
|
762
782
|
};
|
|
763
783
|
/** 表示中のtoastを修正します。promiseのロード状態を表示することなどに使います */
|
|
764
784
|
update = (t, r) => {
|
|
@@ -771,260 +791,165 @@ class De {
|
|
|
771
791
|
this.lastId = 0;
|
|
772
792
|
};
|
|
773
793
|
}
|
|
774
|
-
const
|
|
775
|
-
function
|
|
794
|
+
const fe = new Le();
|
|
795
|
+
function We({
|
|
776
796
|
id: e,
|
|
777
797
|
type: t,
|
|
778
798
|
index: r,
|
|
779
|
-
duration:
|
|
780
|
-
className:
|
|
781
|
-
children:
|
|
782
|
-
inverted:
|
|
799
|
+
duration: n = 5e3,
|
|
800
|
+
className: s,
|
|
801
|
+
children: o,
|
|
802
|
+
inverted: l,
|
|
783
803
|
timeout: u = 250,
|
|
784
|
-
max:
|
|
804
|
+
max: f = 3
|
|
785
805
|
}) {
|
|
786
|
-
const
|
|
806
|
+
const d = I(!1), [p, g] = E(!1), { context: h, refs: C } = H({ open: p, onOpenChange: g, nodeId: e }), { isMounted: y, styles: a } = L(h, {
|
|
787
807
|
duration: u,
|
|
788
|
-
initial: { opacity: 0, transform: `translateY(${
|
|
808
|
+
initial: { opacity: 0, transform: `translateY(${l ? "" : "-"}50%)` }
|
|
789
809
|
});
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
}, [r,
|
|
793
|
-
|
|
794
|
-
}, [
|
|
795
|
-
if (!
|
|
796
|
-
const
|
|
797
|
-
return () => window.clearTimeout(
|
|
798
|
-
}, [
|
|
799
|
-
const
|
|
800
|
-
t !== "loading" &&
|
|
801
|
-
}, [t]),
|
|
810
|
+
ne(() => {
|
|
811
|
+
g(r <= f);
|
|
812
|
+
}, [r, f]), R(() => {
|
|
813
|
+
d.current !== y && (y || fe.remove(e), d.current = y);
|
|
814
|
+
}, [y, e]), R(() => {
|
|
815
|
+
if (!n) return;
|
|
816
|
+
const x = window.setTimeout(() => g(!1), n);
|
|
817
|
+
return () => window.clearTimeout(x);
|
|
818
|
+
}, [n, e]);
|
|
819
|
+
const N = O(() => {
|
|
820
|
+
t !== "loading" && g(!1);
|
|
821
|
+
}, [t]), v = c(() => m(
|
|
802
822
|
"relative flex w-fit transition-transform ease-in-out cursor-pointer",
|
|
803
|
-
|
|
804
|
-
), [
|
|
805
|
-
return
|
|
823
|
+
s
|
|
824
|
+
), [s]);
|
|
825
|
+
return y ? /* @__PURE__ */ i(
|
|
806
826
|
"li",
|
|
807
827
|
{
|
|
808
828
|
role: "log",
|
|
809
829
|
tabIndex: -1,
|
|
810
|
-
ref:
|
|
811
|
-
className:
|
|
812
|
-
style:
|
|
813
|
-
onClick:
|
|
814
|
-
children:
|
|
830
|
+
ref: C.setFloating,
|
|
831
|
+
className: v,
|
|
832
|
+
style: a,
|
|
833
|
+
onClick: N,
|
|
834
|
+
children: o
|
|
815
835
|
}
|
|
816
836
|
) : null;
|
|
817
837
|
}
|
|
818
|
-
|
|
838
|
+
const pe = xe({});
|
|
839
|
+
function Ye() {
|
|
840
|
+
return ve(pe);
|
|
841
|
+
}
|
|
842
|
+
function st({
|
|
819
843
|
className: e,
|
|
820
844
|
margin: t = 16,
|
|
821
845
|
position: r = "top-left",
|
|
822
|
-
max:
|
|
823
|
-
ListItem:
|
|
846
|
+
max: n,
|
|
847
|
+
ListItem: s = He,
|
|
848
|
+
icons: o
|
|
824
849
|
}) {
|
|
825
|
-
const
|
|
850
|
+
const l = c(() => {
|
|
826
851
|
const a = { position: "fixed" };
|
|
827
852
|
return r.indexOf("top") > -1 ? a.top = t : r.indexOf("bottom") > -1 && (a.bottom = t), r.indexOf("left") > -1 ? (a.left = t, a.alignItems = "flex-start") : r.indexOf("right") > -1 ? (a.right = t, a.alignItems = "flex-end") : (a.left = "50%", a.alignItems = "center", a.transform = "translateX(-50%)"), a;
|
|
828
|
-
}, [t, r]),
|
|
853
|
+
}, [t, r]), u = c(() => m(
|
|
829
854
|
"flex flex-col z-40 overflow-hidden",
|
|
830
855
|
e
|
|
831
|
-
), [e]),
|
|
832
|
-
|
|
833
|
-
|
|
856
|
+
), [e]), f = c(() => r?.startsWith("bottom") || !1, [r]), d = I(/* @__PURE__ */ new Map()), [p, g] = E([]), h = E(0)[1];
|
|
857
|
+
Q(() => fe.subscribe((a) => {
|
|
858
|
+
ye(() => {
|
|
834
859
|
if (a.type === "add")
|
|
835
|
-
|
|
860
|
+
d.current.set(a.id, a.config), g((N) => [...N, a.id]);
|
|
836
861
|
else if (a.type === "remove") {
|
|
837
|
-
if (!
|
|
838
|
-
|
|
839
|
-
const
|
|
840
|
-
return
|
|
862
|
+
if (!d.current.delete(a.id)) return;
|
|
863
|
+
g((v) => {
|
|
864
|
+
const x = new Set(v);
|
|
865
|
+
return x.has(a.id) ? (x.delete(a.id), Array.from(x)) : v;
|
|
841
866
|
});
|
|
842
867
|
} else if (a.type === "update") {
|
|
843
|
-
const
|
|
844
|
-
if (!
|
|
845
|
-
|
|
868
|
+
const N = d.current.get(a.id);
|
|
869
|
+
if (!N) return;
|
|
870
|
+
d.current.set(a.id, { ...N, ...a.config }), h((v) => v + 1);
|
|
846
871
|
}
|
|
847
872
|
});
|
|
848
873
|
}), []);
|
|
849
|
-
const
|
|
850
|
-
return /* @__PURE__ */
|
|
851
|
-
const
|
|
852
|
-
if (!
|
|
853
|
-
const { className:
|
|
854
|
-
return /* @__PURE__ */
|
|
855
|
-
|
|
874
|
+
const C = c(() => ({ icons: o }), [o]), y = p.length;
|
|
875
|
+
return /* @__PURE__ */ i(W, { children: /* @__PURE__ */ i("ol", { className: u, style: l, "aria-live": "polite", children: /* @__PURE__ */ i(pe.Provider, { value: C, children: p.map((a, N) => {
|
|
876
|
+
const v = d.current.get(a);
|
|
877
|
+
if (!v) return null;
|
|
878
|
+
const { className: x, duration: w, ..._ } = v;
|
|
879
|
+
return /* @__PURE__ */ i(
|
|
880
|
+
We,
|
|
856
881
|
{
|
|
857
882
|
id: a,
|
|
858
|
-
index:
|
|
859
|
-
className:
|
|
860
|
-
duration:
|
|
861
|
-
inverted:
|
|
862
|
-
max:
|
|
863
|
-
children:
|
|
883
|
+
index: y - N,
|
|
884
|
+
className: x,
|
|
885
|
+
duration: w,
|
|
886
|
+
inverted: f,
|
|
887
|
+
max: n,
|
|
888
|
+
children: we(s, _)
|
|
864
889
|
},
|
|
865
890
|
a
|
|
866
891
|
);
|
|
867
|
-
}) }) });
|
|
892
|
+
}) }) }) });
|
|
868
893
|
}
|
|
869
|
-
function
|
|
870
|
-
const r =
|
|
894
|
+
function lt({ className: e, ...t }) {
|
|
895
|
+
const r = c(() => F(
|
|
871
896
|
"inline-block animate-pulse rounded-md bg-accent",
|
|
872
897
|
e
|
|
873
898
|
), [e]);
|
|
874
|
-
return /* @__PURE__ */
|
|
899
|
+
return /* @__PURE__ */ i("span", { className: r, ...t });
|
|
875
900
|
}
|
|
876
|
-
function
|
|
877
|
-
const r =
|
|
901
|
+
function at({ className: e, ...t }) {
|
|
902
|
+
const r = c(() => m(
|
|
878
903
|
"flex items-center justify-center",
|
|
879
904
|
"[&_button]:rounded-none [&_:first-child]:rounded-bl [&_:first-child]:rounded-tl [&_:last-child]:rounded-br [&_:last-child]:rounded-tr",
|
|
880
905
|
"[&_:first-child]:border-r-0 [&_:last-child]:border-l-0",
|
|
881
906
|
e
|
|
882
907
|
), [e]);
|
|
883
|
-
return /* @__PURE__ */
|
|
908
|
+
return /* @__PURE__ */ i("div", { role: "group", className: r, ...t });
|
|
884
909
|
}
|
|
885
|
-
function
|
|
886
|
-
const
|
|
887
|
-
return /* @__PURE__ */
|
|
910
|
+
function ct({ value: e, max: t, className: r, ...n }) {
|
|
911
|
+
const s = c(() => e ? Math.round(e / t * 100) : 0, [e, t]), o = c(() => F("relative overflow-hidden rounded-full bg-primary", r), [r]);
|
|
912
|
+
return /* @__PURE__ */ i("div", { role: "progressbar", className: o, "aria-valuemax": t, "aria-valuemin": 0, ...n, children: /* @__PURE__ */ i(
|
|
888
913
|
"div",
|
|
889
914
|
{
|
|
890
915
|
className: "h-full w-full flex-1 bg-input transition-all origin-right",
|
|
891
|
-
style: { transform: `translateX(${
|
|
916
|
+
style: { transform: `translateX(${s > 100 ? 100 : s}%)` }
|
|
892
917
|
}
|
|
893
918
|
) });
|
|
894
919
|
}
|
|
895
|
-
function
|
|
896
|
-
const
|
|
920
|
+
function ut({ className: e, orientation: t = "horizontal", ...r }) {
|
|
921
|
+
const n = c(() => F(m(
|
|
897
922
|
"border-0 p-0 shrink-0 bg-input",
|
|
898
923
|
t === "horizontal" ? "h-[1px] w-full" : "w-[1px] h-full"
|
|
899
924
|
), e), [e, t]);
|
|
900
|
-
return /* @__PURE__ */
|
|
901
|
-
}
|
|
902
|
-
function st(e) {
|
|
903
|
-
return /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...e, children: [
|
|
904
|
-
/* @__PURE__ */ g("g", { fill: "none", children: [
|
|
905
|
-
/* @__PURE__ */ n("path", { d: "M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z" }),
|
|
906
|
-
/* @__PURE__ */ n(
|
|
907
|
-
"path",
|
|
908
|
-
{
|
|
909
|
-
d: "M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z",
|
|
910
|
-
fill: "currentColor"
|
|
911
|
-
}
|
|
912
|
-
)
|
|
913
|
-
] }),
|
|
914
|
-
/* @__PURE__ */ n(
|
|
915
|
-
"path",
|
|
916
|
-
{
|
|
917
|
-
d: "M18.066 8.5l-7.567 6.731 7.567 6.2",
|
|
918
|
-
fill: "none",
|
|
919
|
-
stroke: "currentColor",
|
|
920
|
-
strokeWidth: "2"
|
|
921
|
-
}
|
|
922
|
-
)
|
|
923
|
-
] });
|
|
924
|
-
}
|
|
925
|
-
function at(e) {
|
|
926
|
-
return /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...e, children: [
|
|
927
|
-
/* @__PURE__ */ g("g", { fill: "none", children: [
|
|
928
|
-
/* @__PURE__ */ n("path", { d: "M15 29c-3.74 0-7.255-1.456-9.9-4.1A13.908 13.908 0 011 15c0-3.74 1.456-7.255 4.1-9.9A13.908 13.908 0 0115 1c3.74 0 7.255 1.456 9.9 4.1A13.908 13.908 0 0129 15c0 3.74-1.456 7.255-4.1 9.9A13.908 13.908 0 0115 29z" }),
|
|
929
|
-
/* @__PURE__ */ n(
|
|
930
|
-
"path",
|
|
931
|
-
{
|
|
932
|
-
d: "M15 2a12.915 12.915 0 00-9.192 3.808A12.915 12.915 0 002 15c0 3.472 1.352 6.737 3.808 9.192A12.915 12.915 0 0015 28c3.472 0 6.737-1.352 9.192-3.808A12.915 12.915 0 0028 15c0-3.472-1.352-6.737-3.808-9.192A12.915 12.915 0 0015 2m0-2c8.284 0 15 6.716 15 15 0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0z",
|
|
933
|
-
fill: "currentColor"
|
|
934
|
-
}
|
|
935
|
-
)
|
|
936
|
-
] }),
|
|
937
|
-
/* @__PURE__ */ g("g", { transform: "translate(9 7)", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
938
|
-
/* @__PURE__ */ n("rect", { width: "12", height: "16", rx: "1", stroke: "none" }),
|
|
939
|
-
/* @__PURE__ */ n("path", { d: "M1 1h10v14H1z" })
|
|
940
|
-
] }),
|
|
941
|
-
/* @__PURE__ */ n(
|
|
942
|
-
"path",
|
|
943
|
-
{
|
|
944
|
-
fill: "currentColor",
|
|
945
|
-
d: "M13 11h4v1.3h-4zM13 14h4v1.3h-4zM13 17h4v1.3h-4z"
|
|
946
|
-
}
|
|
947
|
-
)
|
|
948
|
-
] });
|
|
949
|
-
}
|
|
950
|
-
function ct(e) {
|
|
951
|
-
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17.796", height: "17.908", viewBox: "0 0 17.796 17.908", ...e, children: /* @__PURE__ */ n(
|
|
952
|
-
"path",
|
|
953
|
-
{
|
|
954
|
-
d: "M1.254 12.674L.5 17.408l4.726-.8L17.3 4.472 13.281.5zM1.375 12.766l3.851 3.838M10.949 2.959l3.836 3.801",
|
|
955
|
-
fill: "none",
|
|
956
|
-
stroke: "currentColor"
|
|
957
|
-
}
|
|
958
|
-
) });
|
|
959
|
-
}
|
|
960
|
-
function ut(e) {
|
|
961
|
-
return /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...e, children: [
|
|
962
|
-
/* @__PURE__ */ g("g", { fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
963
|
-
/* @__PURE__ */ n("circle", { cx: "15", cy: "15", r: "15", stroke: "none" }),
|
|
964
|
-
/* @__PURE__ */ n("circle", { cx: "15", cy: "15", r: "14" })
|
|
965
|
-
] }),
|
|
966
|
-
/* @__PURE__ */ n(
|
|
967
|
-
"path",
|
|
968
|
-
{
|
|
969
|
-
d: "M8 23a6.018 6.018 0 016-6h2a6.018 6.018 0 016 6zm2.6-2h8.9a4.033 4.033 0 00-3.5-2h-1.9a4.035 4.035 0 00-3.5 2zm.4-9v-1a4.012 4.012 0 014-4 4.012 4.012 0 014 4v1a4.012 4.012 0 01-4 4 4.012 4.012 0 01-4-4zm2-1v1a2.006 2.006 0 002 2 2.006 2.006 0 002-2v-1a2.006 2.006 0 00-2-2 2.006 2.006 0 00-2 2z",
|
|
970
|
-
fill: "currentColor"
|
|
971
|
-
}
|
|
972
|
-
)
|
|
973
|
-
] });
|
|
974
|
-
}
|
|
975
|
-
function dt(e) {
|
|
976
|
-
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...e, children: /* @__PURE__ */ n(
|
|
977
|
-
"path",
|
|
978
|
-
{
|
|
979
|
-
d: "M15.065 0A15.069 15.069 0 00.142 13.105a1.256 1.256 0 102.478.406c0-.027.008-.055.01-.082a12.52 12.52 0 0121.3-7.226l-2.584 2.584 7.532 1.255-1.255-7.532-1.92 1.92A15 15 0 0015.065 0zm13.7 15.589A1.255 1.255 0 0027.5 16.7a12.512 12.512 0 01-21.893 6.569l1.927-1.927L0 20.086l1.255 7.532 2.572-2.572a15.02 15.02 0 0026.16-8.023 1.256 1.256 0 00-1.064-1.423 1.273 1.273 0 00-.16-.011z",
|
|
980
|
-
fill: "currentColor"
|
|
981
|
-
}
|
|
982
|
-
) });
|
|
983
|
-
}
|
|
984
|
-
function ft(e) {
|
|
985
|
-
return /* @__PURE__ */ g("svg", { width: "30", height: "30", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: [
|
|
986
|
-
/* @__PURE__ */ n("rect", { x: "16.5", y: "9", width: "14", height: "1", rx: ".5", transform: "rotate(90 16.5 9)", fill: "currentColor" }),
|
|
987
|
-
/* @__PURE__ */ n("rect", { x: "9", y: "15.5", width: "14", height: "1", rx: ".5", fill: "currentColor" })
|
|
988
|
-
] });
|
|
925
|
+
return /* @__PURE__ */ i("hr", { className: n, role: "none", ...r });
|
|
989
926
|
}
|
|
990
927
|
export {
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
Ve as Select,
|
|
1019
|
-
tt as Sheet,
|
|
1020
|
-
Ee as Spinner,
|
|
1021
|
-
Fe as Switch,
|
|
1022
|
-
Ce as Textarea,
|
|
1023
|
-
nt as Toast,
|
|
1024
|
-
_e as ToastItem,
|
|
1025
|
-
Je as Tooltip,
|
|
1026
|
-
gt as clsx,
|
|
1027
|
-
N as merge,
|
|
1028
|
-
ue as toast,
|
|
1029
|
-
Be as varientButton
|
|
928
|
+
nt as Accordion,
|
|
929
|
+
rt as Button,
|
|
930
|
+
at as ButtonGroup,
|
|
931
|
+
Ve as Checkbox,
|
|
932
|
+
ot as Dialog,
|
|
933
|
+
ut as Divider,
|
|
934
|
+
Je as FormField,
|
|
935
|
+
Te as FormLabel,
|
|
936
|
+
Ae as Input,
|
|
937
|
+
Qe as InputField,
|
|
938
|
+
lt as Placeholder,
|
|
939
|
+
ae as Popover,
|
|
940
|
+
W as Portal,
|
|
941
|
+
ct as Progress,
|
|
942
|
+
tt as Radio,
|
|
943
|
+
et as Select,
|
|
944
|
+
it as Sheet,
|
|
945
|
+
Xe as Spinner,
|
|
946
|
+
De as Switch,
|
|
947
|
+
Me as Textarea,
|
|
948
|
+
st as Toast,
|
|
949
|
+
He as ToastItem,
|
|
950
|
+
Oe as Tooltip,
|
|
951
|
+
pt as clsx,
|
|
952
|
+
F as merge,
|
|
953
|
+
fe as toast,
|
|
954
|
+
je as varientButton
|
|
1030
955
|
};
|