visits-style 2.0.6 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +34 -30
- package/dist/index.es.js +553 -626
- 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
|
-
|
|
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
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]), T =
|
|
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,108 +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
|
-
}))
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
560
|
+
})), R(() => {
|
|
561
|
+
u && p(!1);
|
|
562
|
+
}, [u]);
|
|
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()
|
|
547
568
|
}),
|
|
548
|
-
/* @__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 }) }) })
|
|
549
570
|
] });
|
|
550
|
-
})
|
|
571
|
+
});
|
|
572
|
+
Oe.displayName = "Tooltip";
|
|
573
|
+
const ue = S(({
|
|
551
574
|
className: e,
|
|
552
575
|
custom: t,
|
|
553
576
|
...r
|
|
554
|
-
},
|
|
555
|
-
const
|
|
577
|
+
}, n) => {
|
|
578
|
+
const s = c(() => m(
|
|
556
579
|
"relative w-auto h-auto outline-none transition-transform ease-in-out whitespace-pre",
|
|
557
580
|
t ? null : "border border-accent rounded shadow-md px-3 py-1 bg-background",
|
|
558
581
|
e
|
|
559
582
|
), [e, t]);
|
|
560
|
-
return /* @__PURE__ */
|
|
583
|
+
return /* @__PURE__ */ i("div", { ref: n, className: s, ...r });
|
|
561
584
|
});
|
|
562
|
-
|
|
563
|
-
|
|
585
|
+
ue.displayName = "TooltipContent";
|
|
586
|
+
function je({ variant: e, size: t }) {
|
|
587
|
+
return m(
|
|
564
588
|
"inline-flex items-center justify-center whitespace-nowrap transition-colors rounded-md cursor-pointer",
|
|
565
589
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
566
590
|
"disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-auto",
|
|
@@ -579,184 +603,182 @@ function Be({ variant: e, size: t }) {
|
|
|
579
603
|
}
|
|
580
604
|
);
|
|
581
605
|
}
|
|
582
|
-
function
|
|
583
|
-
const
|
|
584
|
-
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 });
|
|
585
609
|
}
|
|
586
|
-
function
|
|
610
|
+
function ot({
|
|
587
611
|
open: e,
|
|
588
612
|
children: t,
|
|
589
613
|
timeout: r = 150,
|
|
590
|
-
padding:
|
|
591
|
-
verticalAlign:
|
|
592
|
-
closeOnOverlay:
|
|
593
|
-
closeOnEsc:
|
|
614
|
+
padding: n = "0.85rem",
|
|
615
|
+
verticalAlign: s = "center",
|
|
616
|
+
closeOnOverlay: o,
|
|
617
|
+
closeOnEsc: l,
|
|
594
618
|
onExited: u,
|
|
595
|
-
className:
|
|
596
|
-
onOpenChange:
|
|
619
|
+
className: f,
|
|
620
|
+
onOpenChange: d,
|
|
597
621
|
size: p,
|
|
598
|
-
...
|
|
622
|
+
...g
|
|
599
623
|
}) {
|
|
600
|
-
const
|
|
601
|
-
|
|
602
|
-
enabled:
|
|
603
|
-
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,
|
|
604
628
|
outsidePress: !1
|
|
605
629
|
})
|
|
606
|
-
]), { isMounted:
|
|
630
|
+
]), { isMounted: x, styles: w } = L(N, {
|
|
607
631
|
duration: r,
|
|
608
632
|
initial: { opacity: 0, transform: "scale(0.8)" }
|
|
609
633
|
});
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
}, [
|
|
613
|
-
const
|
|
614
|
-
|
|
615
|
-
}, [
|
|
616
|
-
|
|
617
|
-
const
|
|
618
|
-
"place-items-start items-start":
|
|
619
|
-
"place-items-end":
|
|
620
|
-
"place-items-center":
|
|
621
|
-
}), [
|
|
622
|
-
return /* @__PURE__ */
|
|
623
|
-
|
|
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,
|
|
624
648
|
{
|
|
625
|
-
className:
|
|
649
|
+
className: D,
|
|
626
650
|
"data-testid": "vs-dialog-overlay",
|
|
627
|
-
onClick:
|
|
628
|
-
style: { padding:
|
|
651
|
+
onClick: _,
|
|
652
|
+
style: { padding: n, opacity: w.opacity },
|
|
629
653
|
lockScroll: !0,
|
|
630
|
-
children: /* @__PURE__ */
|
|
631
|
-
|
|
654
|
+
children: /* @__PURE__ */ i(
|
|
655
|
+
de,
|
|
632
656
|
{
|
|
633
|
-
ref:
|
|
634
|
-
className:
|
|
657
|
+
ref: a.setFloating,
|
|
658
|
+
className: j,
|
|
635
659
|
role: "dialog",
|
|
636
660
|
size: p,
|
|
637
|
-
|
|
661
|
+
style: w,
|
|
662
|
+
onClick: q,
|
|
663
|
+
...v({ ...g }),
|
|
638
664
|
children: t
|
|
639
665
|
}
|
|
640
666
|
)
|
|
641
667
|
}
|
|
642
668
|
) });
|
|
643
669
|
}
|
|
644
|
-
const
|
|
670
|
+
const de = S(({
|
|
645
671
|
size: e,
|
|
646
672
|
className: t,
|
|
647
673
|
...r
|
|
648
|
-
},
|
|
649
|
-
const
|
|
674
|
+
}, n) => {
|
|
675
|
+
const s = c(() => m(
|
|
650
676
|
e ? "flex flex-col bg-background shadow-lg p-5 rounded" : null,
|
|
651
677
|
{
|
|
652
|
-
"w-full max-w-sm": e === "small",
|
|
653
|
-
"w-full max-w-
|
|
654
|
-
"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"
|
|
655
681
|
},
|
|
656
682
|
t
|
|
657
683
|
), [e, t]);
|
|
658
|
-
return /* @__PURE__ */
|
|
684
|
+
return /* @__PURE__ */ i("div", { ref: n, className: s, ...r });
|
|
659
685
|
});
|
|
660
|
-
|
|
661
|
-
const
|
|
662
|
-
function
|
|
663
|
-
|
|
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, {
|
|
664
698
|
duration: t,
|
|
665
699
|
initial() {
|
|
666
|
-
let
|
|
667
|
-
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 };
|
|
668
702
|
}
|
|
669
|
-
})
|
|
703
|
+
});
|
|
704
|
+
R(() => {
|
|
705
|
+
f.current !== h && (f.current = h, !h && d.current?.());
|
|
706
|
+
}, [h]);
|
|
707
|
+
const y = c(() => m(
|
|
670
708
|
"fixed transition-transform z-30",
|
|
671
709
|
{
|
|
672
|
-
"top-0 right-0 h-full max-h-screen":
|
|
673
|
-
"top-0 left-0 h-full max-h-screen":
|
|
674
|
-
"top-0 left-0 right-0 w-full max-w-screen":
|
|
675
|
-
"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"
|
|
676
714
|
}
|
|
677
|
-
), [
|
|
678
|
-
return /* @__PURE__ */
|
|
679
|
-
|
|
680
|
-
|
|
715
|
+
), [n]);
|
|
716
|
+
return d.current = o, /* @__PURE__ */ k(W, { disabled: !h, children: [
|
|
717
|
+
s ? /* @__PURE__ */ i(
|
|
718
|
+
J,
|
|
681
719
|
{
|
|
682
720
|
className: "bg-backdrop",
|
|
683
|
-
style: { opacity:
|
|
721
|
+
style: { opacity: C.opacity },
|
|
684
722
|
onClick: () => r?.(!1)
|
|
685
723
|
}
|
|
686
724
|
) : null,
|
|
687
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ i(
|
|
688
726
|
"div",
|
|
689
727
|
{
|
|
690
|
-
ref:
|
|
691
|
-
className:
|
|
728
|
+
ref: p.setFloating,
|
|
729
|
+
className: y,
|
|
692
730
|
role: "dialog",
|
|
693
|
-
style:
|
|
694
|
-
children: /* @__PURE__ */
|
|
731
|
+
style: C,
|
|
732
|
+
children: /* @__PURE__ */ i(Be, { ...l })
|
|
695
733
|
}
|
|
696
734
|
)
|
|
697
735
|
] });
|
|
698
736
|
}
|
|
699
|
-
function
|
|
700
|
-
const
|
|
737
|
+
function Be({ className: e, unstyled: t, ...r }) {
|
|
738
|
+
const n = c(() => t ? e : F(m(
|
|
701
739
|
"relative bg-background min-w-full min-h-full border border-input shadow-lg"
|
|
702
740
|
), e), [t, e]);
|
|
703
|
-
return /* @__PURE__ */
|
|
741
|
+
return /* @__PURE__ */ i("div", { className: n, ...r });
|
|
704
742
|
}
|
|
705
|
-
function
|
|
706
|
-
return /* @__PURE__ */
|
|
707
|
-
/* @__PURE__ */
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
] });
|
|
711
|
-
}
|
|
712
|
-
function G(e) {
|
|
713
|
-
return /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 32 32", ...e, children: [
|
|
714
|
-
/* @__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" }),
|
|
715
|
-
/* @__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" }),
|
|
716
|
-
/* @__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" })
|
|
717
|
-
] });
|
|
718
|
-
}
|
|
719
|
-
function Le(e) {
|
|
720
|
-
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" }) });
|
|
721
|
-
}
|
|
722
|
-
function Ee({ size: e = 20, label: t = "Loading...", ...r }) {
|
|
723
|
-
return /* @__PURE__ */ g("div", { role: "status", ...r, children: [
|
|
724
|
-
/* @__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: [
|
|
725
|
-
/* @__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" }),
|
|
726
|
-
/* @__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" })
|
|
727
748
|
] }),
|
|
728
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ i("span", { className: "sr-only", children: t })
|
|
729
750
|
] });
|
|
730
751
|
}
|
|
731
|
-
function
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
e === "
|
|
736
|
-
e === "
|
|
737
|
-
e === "
|
|
738
|
-
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
|
|
739
761
|
] }) : null,
|
|
740
|
-
/* @__PURE__ */
|
|
741
|
-
/* @__PURE__ */
|
|
742
|
-
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
|
|
743
765
|
] })
|
|
744
766
|
] });
|
|
745
767
|
}
|
|
746
|
-
function
|
|
768
|
+
function ee() {
|
|
747
769
|
}
|
|
748
|
-
class
|
|
770
|
+
class Le {
|
|
749
771
|
/** システムで1つしか存在しない前提とする */
|
|
750
|
-
notify =
|
|
772
|
+
notify = ee;
|
|
751
773
|
lastId = 0;
|
|
752
774
|
/** internal use only */
|
|
753
775
|
subscribe = (t) => (this.notify = t, () => {
|
|
754
|
-
this.notify =
|
|
776
|
+
this.notify = ee;
|
|
755
777
|
});
|
|
756
778
|
add = (t, r = {}) => {
|
|
757
779
|
this.lastId += 1;
|
|
758
|
-
const
|
|
759
|
-
return this.notify({ id:
|
|
780
|
+
const n = `${this.lastId}`;
|
|
781
|
+
return this.notify({ id: n, type: "add", config: { id: n, label: t, ...r } }), n;
|
|
760
782
|
};
|
|
761
783
|
/** 表示中のtoastを修正します。promiseのロード状態を表示することなどに使います */
|
|
762
784
|
update = (t, r) => {
|
|
@@ -769,260 +791,165 @@ class De {
|
|
|
769
791
|
this.lastId = 0;
|
|
770
792
|
};
|
|
771
793
|
}
|
|
772
|
-
const
|
|
773
|
-
function
|
|
794
|
+
const fe = new Le();
|
|
795
|
+
function We({
|
|
774
796
|
id: e,
|
|
775
797
|
type: t,
|
|
776
798
|
index: r,
|
|
777
|
-
duration:
|
|
778
|
-
className:
|
|
779
|
-
children:
|
|
780
|
-
inverted:
|
|
799
|
+
duration: n,
|
|
800
|
+
className: s,
|
|
801
|
+
children: o,
|
|
802
|
+
inverted: l,
|
|
781
803
|
timeout: u = 250,
|
|
782
|
-
max:
|
|
804
|
+
max: f = 3
|
|
783
805
|
}) {
|
|
784
|
-
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, {
|
|
785
807
|
duration: u,
|
|
786
|
-
initial: { opacity: 0, transform: `translateY(${
|
|
808
|
+
initial: { opacity: 0, transform: `translateY(${l ? "" : "-"}50%)` }
|
|
787
809
|
});
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
}, [r,
|
|
791
|
-
|
|
792
|
-
}, [
|
|
793
|
-
if (!
|
|
794
|
-
const
|
|
795
|
-
return () => window.clearTimeout(
|
|
796
|
-
}, [
|
|
797
|
-
const
|
|
798
|
-
t !== "loading" &&
|
|
799
|
-
}, [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(
|
|
800
822
|
"relative flex w-fit transition-transform ease-in-out cursor-pointer",
|
|
801
|
-
|
|
802
|
-
), [
|
|
803
|
-
return
|
|
823
|
+
s
|
|
824
|
+
), [s]);
|
|
825
|
+
return y ? /* @__PURE__ */ i(
|
|
804
826
|
"li",
|
|
805
827
|
{
|
|
806
828
|
role: "log",
|
|
807
829
|
tabIndex: -1,
|
|
808
|
-
ref:
|
|
809
|
-
className:
|
|
810
|
-
style:
|
|
811
|
-
onClick:
|
|
812
|
-
children:
|
|
830
|
+
ref: C.setFloating,
|
|
831
|
+
className: v,
|
|
832
|
+
style: a,
|
|
833
|
+
onClick: N,
|
|
834
|
+
children: o
|
|
813
835
|
}
|
|
814
836
|
) : null;
|
|
815
837
|
}
|
|
816
|
-
|
|
838
|
+
const pe = xe({});
|
|
839
|
+
function Ye() {
|
|
840
|
+
return ve(pe);
|
|
841
|
+
}
|
|
842
|
+
function st({
|
|
817
843
|
className: e,
|
|
818
844
|
margin: t = 16,
|
|
819
845
|
position: r = "top-left",
|
|
820
|
-
max:
|
|
821
|
-
ListItem:
|
|
846
|
+
max: n,
|
|
847
|
+
ListItem: s = He,
|
|
848
|
+
icons: o
|
|
822
849
|
}) {
|
|
823
|
-
const
|
|
850
|
+
const l = c(() => {
|
|
824
851
|
const a = { position: "fixed" };
|
|
825
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;
|
|
826
|
-
}, [t, r]),
|
|
853
|
+
}, [t, r]), u = c(() => m(
|
|
827
854
|
"flex flex-col z-40 overflow-hidden",
|
|
828
855
|
e
|
|
829
|
-
), [e]),
|
|
830
|
-
|
|
831
|
-
|
|
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(() => {
|
|
832
859
|
if (a.type === "add")
|
|
833
|
-
|
|
860
|
+
d.current.set(a.id, a.config), g((N) => [...N, a.id]);
|
|
834
861
|
else if (a.type === "remove") {
|
|
835
|
-
if (!
|
|
836
|
-
|
|
837
|
-
const
|
|
838
|
-
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;
|
|
839
866
|
});
|
|
840
867
|
} else if (a.type === "update") {
|
|
841
|
-
const
|
|
842
|
-
if (!
|
|
843
|
-
|
|
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);
|
|
844
871
|
}
|
|
845
872
|
});
|
|
846
873
|
}), []);
|
|
847
|
-
const
|
|
848
|
-
return /* @__PURE__ */
|
|
849
|
-
const v =
|
|
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);
|
|
850
877
|
if (!v) return null;
|
|
851
|
-
const { className:
|
|
852
|
-
return /* @__PURE__ */
|
|
853
|
-
|
|
878
|
+
const { className: x, duration: w, ..._ } = v;
|
|
879
|
+
return /* @__PURE__ */ i(
|
|
880
|
+
We,
|
|
854
881
|
{
|
|
855
882
|
id: a,
|
|
856
|
-
index:
|
|
857
|
-
className:
|
|
858
|
-
duration:
|
|
859
|
-
inverted:
|
|
860
|
-
max:
|
|
861
|
-
children:
|
|
883
|
+
index: y - N,
|
|
884
|
+
className: x,
|
|
885
|
+
duration: w,
|
|
886
|
+
inverted: f,
|
|
887
|
+
max: n,
|
|
888
|
+
children: we(s, _)
|
|
862
889
|
},
|
|
863
890
|
a
|
|
864
891
|
);
|
|
865
|
-
}) }) });
|
|
892
|
+
}) }) }) });
|
|
866
893
|
}
|
|
867
|
-
function
|
|
868
|
-
const r =
|
|
894
|
+
function lt({ className: e, ...t }) {
|
|
895
|
+
const r = c(() => F(
|
|
869
896
|
"inline-block animate-pulse rounded-md bg-accent",
|
|
870
897
|
e
|
|
871
898
|
), [e]);
|
|
872
|
-
return /* @__PURE__ */
|
|
899
|
+
return /* @__PURE__ */ i("span", { className: r, ...t });
|
|
873
900
|
}
|
|
874
|
-
function
|
|
875
|
-
const r =
|
|
901
|
+
function at({ className: e, ...t }) {
|
|
902
|
+
const r = c(() => m(
|
|
876
903
|
"flex items-center justify-center",
|
|
877
904
|
"[&_button]:rounded-none [&_:first-child]:rounded-bl [&_:first-child]:rounded-tl [&_:last-child]:rounded-br [&_:last-child]:rounded-tr",
|
|
878
905
|
"[&_:first-child]:border-r-0 [&_:last-child]:border-l-0",
|
|
879
906
|
e
|
|
880
907
|
), [e]);
|
|
881
|
-
return /* @__PURE__ */
|
|
908
|
+
return /* @__PURE__ */ i("div", { role: "group", className: r, ...t });
|
|
882
909
|
}
|
|
883
|
-
function
|
|
884
|
-
const
|
|
885
|
-
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(
|
|
886
913
|
"div",
|
|
887
914
|
{
|
|
888
915
|
className: "h-full w-full flex-1 bg-input transition-all origin-right",
|
|
889
|
-
style: { transform: `translateX(${
|
|
916
|
+
style: { transform: `translateX(${s > 100 ? 100 : s}%)` }
|
|
890
917
|
}
|
|
891
918
|
) });
|
|
892
919
|
}
|
|
893
|
-
function
|
|
894
|
-
const
|
|
920
|
+
function ut({ className: e, orientation: t = "horizontal", ...r }) {
|
|
921
|
+
const n = c(() => F(m(
|
|
895
922
|
"border-0 p-0 shrink-0 bg-input",
|
|
896
923
|
t === "horizontal" ? "h-[1px] w-full" : "w-[1px] h-full"
|
|
897
924
|
), e), [e, t]);
|
|
898
|
-
return /* @__PURE__ */
|
|
899
|
-
}
|
|
900
|
-
function st(e) {
|
|
901
|
-
return /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...e, children: [
|
|
902
|
-
/* @__PURE__ */ g("g", { fill: "none", children: [
|
|
903
|
-
/* @__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" }),
|
|
904
|
-
/* @__PURE__ */ n(
|
|
905
|
-
"path",
|
|
906
|
-
{
|
|
907
|
-
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",
|
|
908
|
-
fill: "currentColor"
|
|
909
|
-
}
|
|
910
|
-
)
|
|
911
|
-
] }),
|
|
912
|
-
/* @__PURE__ */ n(
|
|
913
|
-
"path",
|
|
914
|
-
{
|
|
915
|
-
d: "M18.066 8.5l-7.567 6.731 7.567 6.2",
|
|
916
|
-
fill: "none",
|
|
917
|
-
stroke: "currentColor",
|
|
918
|
-
strokeWidth: "2"
|
|
919
|
-
}
|
|
920
|
-
)
|
|
921
|
-
] });
|
|
922
|
-
}
|
|
923
|
-
function at(e) {
|
|
924
|
-
return /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...e, children: [
|
|
925
|
-
/* @__PURE__ */ g("g", { fill: "none", children: [
|
|
926
|
-
/* @__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" }),
|
|
927
|
-
/* @__PURE__ */ n(
|
|
928
|
-
"path",
|
|
929
|
-
{
|
|
930
|
-
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",
|
|
931
|
-
fill: "currentColor"
|
|
932
|
-
}
|
|
933
|
-
)
|
|
934
|
-
] }),
|
|
935
|
-
/* @__PURE__ */ g("g", { transform: "translate(9 7)", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
936
|
-
/* @__PURE__ */ n("rect", { width: "12", height: "16", rx: "1", stroke: "none" }),
|
|
937
|
-
/* @__PURE__ */ n("path", { d: "M1 1h10v14H1z" })
|
|
938
|
-
] }),
|
|
939
|
-
/* @__PURE__ */ n(
|
|
940
|
-
"path",
|
|
941
|
-
{
|
|
942
|
-
fill: "currentColor",
|
|
943
|
-
d: "M13 11h4v1.3h-4zM13 14h4v1.3h-4zM13 17h4v1.3h-4z"
|
|
944
|
-
}
|
|
945
|
-
)
|
|
946
|
-
] });
|
|
947
|
-
}
|
|
948
|
-
function ct(e) {
|
|
949
|
-
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(
|
|
950
|
-
"path",
|
|
951
|
-
{
|
|
952
|
-
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",
|
|
953
|
-
fill: "none",
|
|
954
|
-
stroke: "currentColor"
|
|
955
|
-
}
|
|
956
|
-
) });
|
|
957
|
-
}
|
|
958
|
-
function dt(e) {
|
|
959
|
-
return /* @__PURE__ */ g("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...e, children: [
|
|
960
|
-
/* @__PURE__ */ g("g", { fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
961
|
-
/* @__PURE__ */ n("circle", { cx: "15", cy: "15", r: "15", stroke: "none" }),
|
|
962
|
-
/* @__PURE__ */ n("circle", { cx: "15", cy: "15", r: "14" })
|
|
963
|
-
] }),
|
|
964
|
-
/* @__PURE__ */ n(
|
|
965
|
-
"path",
|
|
966
|
-
{
|
|
967
|
-
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",
|
|
968
|
-
fill: "currentColor"
|
|
969
|
-
}
|
|
970
|
-
)
|
|
971
|
-
] });
|
|
972
|
-
}
|
|
973
|
-
function ut(e) {
|
|
974
|
-
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", ...e, children: /* @__PURE__ */ n(
|
|
975
|
-
"path",
|
|
976
|
-
{
|
|
977
|
-
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",
|
|
978
|
-
fill: "currentColor"
|
|
979
|
-
}
|
|
980
|
-
) });
|
|
981
|
-
}
|
|
982
|
-
function ft(e) {
|
|
983
|
-
return /* @__PURE__ */ g("svg", { width: "30", height: "30", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: [
|
|
984
|
-
/* @__PURE__ */ n("rect", { x: "16.5", y: "9", width: "14", height: "1", rx: ".5", transform: "rotate(90 16.5 9)", fill: "currentColor" }),
|
|
985
|
-
/* @__PURE__ */ n("rect", { x: "9", y: "15.5", width: "14", height: "1", rx: ".5", fill: "currentColor" })
|
|
986
|
-
] });
|
|
925
|
+
return /* @__PURE__ */ i("hr", { className: n, role: "none", ...r });
|
|
987
926
|
}
|
|
988
927
|
export {
|
|
989
|
-
|
|
990
|
-
|
|
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
|
-
Ve as Select,
|
|
1017
|
-
tt as Sheet,
|
|
1018
|
-
Ee as Spinner,
|
|
1019
|
-
Fe as Switch,
|
|
1020
|
-
Ce as Textarea,
|
|
1021
|
-
nt as Toast,
|
|
1022
|
-
_e as ToastItem,
|
|
1023
|
-
Je as Tooltip,
|
|
1024
|
-
gt as clsx,
|
|
1025
|
-
N as merge,
|
|
1026
|
-
de as toast,
|
|
1027
|
-
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
|
|
1028
955
|
};
|