@beaubrain/web-design-system 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,139 +1,140 @@
|
|
|
1
|
-
import { jsx as u, jsxs as
|
|
1
|
+
import { jsx as u, jsxs as _, Fragment as Oe } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import P from "react";
|
|
4
|
+
import { createPortal as qt } from "react-dom";
|
|
5
|
+
function Kt(e) {
|
|
5
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
7
|
}
|
|
7
|
-
var
|
|
8
|
+
var re = { exports: {} };
|
|
8
9
|
/*!
|
|
9
10
|
Copyright (c) 2018 Jed Watson.
|
|
10
11
|
Licensed under the MIT License (MIT), see
|
|
11
12
|
http://jedwatson.github.io/classnames
|
|
12
13
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
var Te;
|
|
15
|
+
function Wt() {
|
|
16
|
+
return Te || (Te = 1, (function(e) {
|
|
16
17
|
(function() {
|
|
17
18
|
var t = {}.hasOwnProperty;
|
|
18
19
|
function o() {
|
|
19
|
-
for (var
|
|
20
|
-
var
|
|
21
|
-
|
|
20
|
+
for (var r = "", a = 0; a < arguments.length; a++) {
|
|
21
|
+
var c = arguments[a];
|
|
22
|
+
c && (r = n(r, s(c)));
|
|
22
23
|
}
|
|
23
|
-
return
|
|
24
|
+
return r;
|
|
24
25
|
}
|
|
25
|
-
function r
|
|
26
|
-
if (typeof
|
|
27
|
-
return
|
|
28
|
-
if (typeof
|
|
26
|
+
function s(r) {
|
|
27
|
+
if (typeof r == "string" || typeof r == "number")
|
|
28
|
+
return r;
|
|
29
|
+
if (typeof r != "object")
|
|
29
30
|
return "";
|
|
30
|
-
if (Array.isArray(
|
|
31
|
-
return o.apply(null,
|
|
32
|
-
if (
|
|
33
|
-
return
|
|
34
|
-
var
|
|
35
|
-
for (var
|
|
36
|
-
t.call(
|
|
37
|
-
return
|
|
31
|
+
if (Array.isArray(r))
|
|
32
|
+
return o.apply(null, r);
|
|
33
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
34
|
+
return r.toString();
|
|
35
|
+
var a = "";
|
|
36
|
+
for (var c in r)
|
|
37
|
+
t.call(r, c) && r[c] && (a = n(a, c));
|
|
38
|
+
return a;
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
40
|
+
function n(r, a) {
|
|
41
|
+
return a ? r ? r + " " + a : r + a : r;
|
|
41
42
|
}
|
|
42
43
|
e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
|
|
43
44
|
})();
|
|
44
|
-
})(
|
|
45
|
+
})(re)), re.exports;
|
|
45
46
|
}
|
|
46
|
-
var
|
|
47
|
-
const x = /* @__PURE__ */
|
|
47
|
+
var Xt = Wt();
|
|
48
|
+
const x = /* @__PURE__ */ Kt(Xt), Yt = (e, t) => {
|
|
48
49
|
const o = { ...t };
|
|
49
|
-
for (const
|
|
50
|
-
const
|
|
51
|
-
/^on[A-Z]/.test(
|
|
52
|
-
const l =
|
|
53
|
-
return
|
|
54
|
-
} :
|
|
50
|
+
for (const s in t) {
|
|
51
|
+
const n = e[s], r = t[s];
|
|
52
|
+
/^on[A-Z]/.test(s) ? n && r ? o[s] = (...c) => {
|
|
53
|
+
const l = r(...c);
|
|
54
|
+
return n(...c), l;
|
|
55
|
+
} : n && (o[s] = n) : s === "style" ? o[s] = { ...n, ...r } : s === "className" && (o[s] = [n, r].filter(Boolean).join(" "));
|
|
55
56
|
}
|
|
56
57
|
return { ...e, ...o };
|
|
57
|
-
},
|
|
58
|
+
}, Ae = (e, t) => {
|
|
58
59
|
if (typeof e == "function")
|
|
59
60
|
return e(t);
|
|
60
61
|
e != null && (e.current = t);
|
|
61
|
-
},
|
|
62
|
+
}, fe = (...e) => (t) => {
|
|
62
63
|
let o = !1;
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
return !o && typeof
|
|
64
|
+
const s = e.map((n) => {
|
|
65
|
+
const r = Ae(n, t);
|
|
66
|
+
return !o && typeof r == "function" && (o = !0), { ref: n, cleanup: r };
|
|
66
67
|
});
|
|
67
68
|
if (o)
|
|
68
69
|
return () => {
|
|
69
|
-
for (const { ref:
|
|
70
|
-
typeof
|
|
70
|
+
for (const { ref: n, cleanup: r } of s)
|
|
71
|
+
typeof r == "function" ? r() : Ae(n, null);
|
|
71
72
|
};
|
|
72
|
-
},
|
|
73
|
+
}, De = (e) => {
|
|
73
74
|
const t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get;
|
|
74
75
|
return t && "isReactWarning" in t && t.isReactWarning ? e.ref : e.props.ref || e.ref;
|
|
75
76
|
};
|
|
76
|
-
function
|
|
77
|
-
return
|
|
77
|
+
function k(...e) {
|
|
78
|
+
return P.useCallback(fe(...e), e);
|
|
78
79
|
}
|
|
79
|
-
const
|
|
80
|
+
const Be = (...e) => {
|
|
80
81
|
let t = {};
|
|
81
82
|
for (const o of e)
|
|
82
83
|
o && (t = { ...t, ...o });
|
|
83
84
|
return Object.keys(t).length ? t : void 0;
|
|
84
|
-
},
|
|
85
|
-
const
|
|
85
|
+
}, Zt = ({ className: e, customProperties: t, ...o }) => {
|
|
86
|
+
const s = Ge({
|
|
86
87
|
allowCustomValues: !0,
|
|
87
88
|
className: e,
|
|
88
89
|
...o
|
|
89
|
-
}),
|
|
90
|
+
}), n = Qt({
|
|
90
91
|
customProperties: t,
|
|
91
92
|
...o
|
|
92
93
|
});
|
|
93
|
-
return [
|
|
94
|
-
},
|
|
95
|
-
const
|
|
96
|
-
return `${
|
|
97
|
-
},
|
|
94
|
+
return [s, n];
|
|
95
|
+
}, Jt = (e, t, o) => {
|
|
96
|
+
const s = e ? "-" : "", n = o(t), r = n?.startsWith("-"), a = r ? "-" : "", c = r ? n?.substring(1) : n;
|
|
97
|
+
return `${a}${e}${s}${c}`;
|
|
98
|
+
}, Ge = ({
|
|
98
99
|
allowCustomValues: e = !1,
|
|
99
100
|
className: t,
|
|
100
101
|
value: o,
|
|
101
|
-
propValues:
|
|
102
|
-
parseValue:
|
|
102
|
+
propValues: s,
|
|
103
|
+
parseValue: n = (r) => r
|
|
103
104
|
}) => {
|
|
104
105
|
if (o) {
|
|
105
|
-
if (typeof o == "string" &&
|
|
106
|
-
return
|
|
106
|
+
if (typeof o == "string" && s.includes(o))
|
|
107
|
+
return Jt(t, o, n);
|
|
107
108
|
if (e)
|
|
108
109
|
return t;
|
|
109
110
|
}
|
|
110
|
-
},
|
|
111
|
+
}, Qt = ({
|
|
111
112
|
customProperties: e,
|
|
112
113
|
value: t,
|
|
113
114
|
propValues: o,
|
|
114
|
-
parseValue:
|
|
115
|
+
parseValue: s = (n) => n
|
|
115
116
|
}) => {
|
|
116
|
-
let
|
|
117
|
+
let n = {};
|
|
117
118
|
if (!(!t || typeof t == "string" && o.includes(t))) {
|
|
118
|
-
typeof t == "string" && (
|
|
119
|
-
for (const
|
|
120
|
-
const
|
|
121
|
-
|
|
119
|
+
typeof t == "string" && (n = Object.fromEntries(e.map((r) => [r, t])));
|
|
120
|
+
for (const r in n) {
|
|
121
|
+
const a = n[r];
|
|
122
|
+
a !== void 0 && (n[r] = s(a));
|
|
122
123
|
}
|
|
123
|
-
return
|
|
124
|
+
return n;
|
|
124
125
|
}
|
|
125
|
-
},
|
|
126
|
-
let o,
|
|
127
|
-
const
|
|
128
|
-
for (const
|
|
129
|
-
let
|
|
130
|
-
const l =
|
|
131
|
-
if (l.default !== void 0 &&
|
|
132
|
-
if (delete
|
|
126
|
+
}, eo = (...e) => Object.assign({}, ...e), I = (e, ...t) => {
|
|
127
|
+
let o, s;
|
|
128
|
+
const n = { ...e }, r = eo(...t);
|
|
129
|
+
for (const a in r) {
|
|
130
|
+
let c = n[a];
|
|
131
|
+
const l = r[a];
|
|
132
|
+
if (l.default !== void 0 && c === void 0 && (c = l.default), l.type === "enum" && ([l.default, ...l.values].includes(c) || (c = l.default)), n[a] = c, "className" in l && l.className) {
|
|
133
|
+
if (delete n[a], !c)
|
|
133
134
|
continue;
|
|
134
135
|
if (l.type === "enum") {
|
|
135
|
-
const d =
|
|
136
|
-
value:
|
|
136
|
+
const d = Ge({
|
|
137
|
+
value: c,
|
|
137
138
|
className: l.className,
|
|
138
139
|
propValues: l.values,
|
|
139
140
|
parseValue: l.parseValue
|
|
@@ -142,166 +143,221 @@ const Pe = (...e) => {
|
|
|
142
143
|
continue;
|
|
143
144
|
}
|
|
144
145
|
if (l.type === "string" || l.type === "enum | string") {
|
|
145
|
-
const d = l.type === "string" ? [] : l.values, [
|
|
146
|
+
const d = l.type === "string" ? [] : l.values, [p, f] = Zt({
|
|
146
147
|
className: l.className,
|
|
147
148
|
customProperties: l.customProperties,
|
|
148
149
|
propValues: d,
|
|
149
|
-
value:
|
|
150
|
+
value: c
|
|
150
151
|
});
|
|
151
|
-
|
|
152
|
+
s = Be(s, f), o = x(o, p);
|
|
152
153
|
continue;
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
156
|
}
|
|
156
|
-
return
|
|
157
|
-
},
|
|
158
|
-
if (!
|
|
157
|
+
return n.className = x(o, e.className), n.style = Be(s, e.style), n;
|
|
158
|
+
}, to = (e) => {
|
|
159
|
+
if (!P.isValidElement(e))
|
|
159
160
|
throw new Error(`Expected a single valid React element, but got: ${e}`);
|
|
160
161
|
return e;
|
|
161
|
-
},
|
|
162
|
+
}, T = (e, t = []) => {
|
|
162
163
|
let o = [];
|
|
163
|
-
function r
|
|
164
|
-
const
|
|
165
|
-
o = [...o,
|
|
166
|
-
const d = (
|
|
167
|
-
const { scope:
|
|
168
|
-
return /* @__PURE__ */ u(
|
|
164
|
+
function s(r, a) {
|
|
165
|
+
const c = i.createContext(a), l = o.length;
|
|
166
|
+
o = [...o, a];
|
|
167
|
+
const d = (f) => {
|
|
168
|
+
const { scope: b, children: m, ...v } = f, g = b?.[e]?.[l] || c, h = i.useMemo(() => v, Object.values(v));
|
|
169
|
+
return /* @__PURE__ */ u(g.Provider, { value: h, children: m });
|
|
169
170
|
};
|
|
170
|
-
d.displayName = `${
|
|
171
|
-
function f
|
|
172
|
-
const m =
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
throw new Error(`\`${
|
|
171
|
+
d.displayName = `${r}Provider`;
|
|
172
|
+
function p(f, b) {
|
|
173
|
+
const m = b?.[e]?.[l] || c, v = i.useContext(m);
|
|
174
|
+
if (v) return v;
|
|
175
|
+
if (a !== void 0) return a;
|
|
176
|
+
throw new Error(`\`${f}\` must be used within \`${r}\``);
|
|
176
177
|
}
|
|
177
|
-
return [d,
|
|
178
|
+
return [d, p];
|
|
178
179
|
}
|
|
179
|
-
const
|
|
180
|
-
const
|
|
181
|
-
return function(
|
|
182
|
-
const l =
|
|
180
|
+
const n = () => {
|
|
181
|
+
const r = o.map((a) => i.createContext(a));
|
|
182
|
+
return function(c) {
|
|
183
|
+
const l = c?.[e] || r;
|
|
183
184
|
return i.useMemo(
|
|
184
|
-
() => ({ [`__scope${e}`]: { ...
|
|
185
|
-
[
|
|
185
|
+
() => ({ [`__scope${e}`]: { ...c, [e]: l } }),
|
|
186
|
+
[c, l]
|
|
186
187
|
);
|
|
187
188
|
};
|
|
188
189
|
};
|
|
189
|
-
return
|
|
190
|
-
},
|
|
190
|
+
return n.scopeName = e, [s, oo(n, ...t)];
|
|
191
|
+
}, oo = (...e) => {
|
|
191
192
|
const t = e[0];
|
|
192
193
|
if (e.length === 1) return t;
|
|
193
194
|
const o = () => {
|
|
194
|
-
const
|
|
195
|
-
useScope:
|
|
196
|
-
scopeName:
|
|
195
|
+
const s = e.map((n) => ({
|
|
196
|
+
useScope: n(),
|
|
197
|
+
scopeName: n.scopeName
|
|
197
198
|
}));
|
|
198
|
-
return function(
|
|
199
|
-
const
|
|
200
|
-
const
|
|
201
|
-
return { ...
|
|
199
|
+
return function(r) {
|
|
200
|
+
const a = s.reduce((c, { useScope: l, scopeName: d }) => {
|
|
201
|
+
const f = l(r)[`__scope${d}`];
|
|
202
|
+
return { ...c, ...f };
|
|
202
203
|
}, {});
|
|
203
|
-
return i.useMemo(() => ({ [`__scope${t.scopeName}`]:
|
|
204
|
+
return i.useMemo(() => ({ [`__scope${t.scopeName}`]: a }), [a]);
|
|
204
205
|
};
|
|
205
206
|
};
|
|
206
207
|
return o.scopeName = t.scopeName, o;
|
|
207
|
-
},
|
|
208
|
-
},
|
|
208
|
+
}, V = globalThis?.document ? i.useLayoutEffect : () => {
|
|
209
|
+
}, no = i[" useId ".trim().toString()] || (() => {
|
|
209
210
|
});
|
|
210
|
-
let
|
|
211
|
-
function
|
|
212
|
-
const [t, o] = i.useState(
|
|
213
|
-
return
|
|
214
|
-
o((
|
|
211
|
+
let so = 0;
|
|
212
|
+
function Me(e) {
|
|
213
|
+
const [t, o] = i.useState(no());
|
|
214
|
+
return V(() => {
|
|
215
|
+
o((s) => s ?? String(so++));
|
|
215
216
|
}, [e]), t ? `bd-${t}` : "";
|
|
216
217
|
}
|
|
217
|
-
function
|
|
218
|
+
function ro(e) {
|
|
218
219
|
const t = i.useRef(e);
|
|
219
220
|
return i.useEffect(() => {
|
|
220
221
|
t.current = e;
|
|
221
222
|
}), i.useMemo(() => ((...o) => t.current?.(...o)), []);
|
|
222
223
|
}
|
|
223
|
-
function
|
|
224
|
+
function A({
|
|
224
225
|
prop: e,
|
|
225
226
|
defaultProp: t,
|
|
226
227
|
onChange: o = () => {
|
|
227
228
|
},
|
|
228
|
-
caller:
|
|
229
|
+
caller: s
|
|
229
230
|
}) {
|
|
230
|
-
const [
|
|
231
|
+
const [n, r, a] = co({
|
|
231
232
|
defaultProp: t,
|
|
232
233
|
onChange: o
|
|
233
|
-
}),
|
|
234
|
+
}), c = e !== void 0, l = c ? e : n;
|
|
234
235
|
if (process.env.NODE_ENV !== "production") {
|
|
235
|
-
const
|
|
236
|
+
const p = i.useRef(e !== void 0);
|
|
236
237
|
i.useEffect(() => {
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
`${
|
|
240
|
-
),
|
|
241
|
-
}, [
|
|
238
|
+
const f = p.current;
|
|
239
|
+
f !== c && console.warn(
|
|
240
|
+
`${s} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
241
|
+
), p.current = c;
|
|
242
|
+
}, [c, s]);
|
|
242
243
|
}
|
|
243
244
|
const d = i.useCallback(
|
|
244
|
-
(
|
|
245
|
-
if (
|
|
246
|
-
const
|
|
247
|
-
|
|
245
|
+
(p) => {
|
|
246
|
+
if (c) {
|
|
247
|
+
const f = ao(p) ? p(e) : p;
|
|
248
|
+
f !== e && a.current?.(f);
|
|
248
249
|
} else
|
|
249
|
-
|
|
250
|
+
r(p);
|
|
250
251
|
},
|
|
251
|
-
[
|
|
252
|
+
[c, e, r, a]
|
|
252
253
|
);
|
|
253
254
|
return [l, d];
|
|
254
255
|
}
|
|
255
|
-
function
|
|
256
|
+
function co({
|
|
256
257
|
defaultProp: e,
|
|
257
258
|
onChange: t
|
|
258
259
|
}) {
|
|
259
|
-
const [o,
|
|
260
|
-
return
|
|
261
|
-
|
|
260
|
+
const [o, s] = i.useState(e), n = i.useRef(o), r = i.useRef(t);
|
|
261
|
+
return V(() => {
|
|
262
|
+
r.current = t;
|
|
262
263
|
}, [t]), i.useEffect(() => {
|
|
263
|
-
|
|
264
|
-
}, [o,
|
|
264
|
+
n.current !== o && (r.current?.(o), n.current = o);
|
|
265
|
+
}, [o, n]), [o, s, r];
|
|
265
266
|
}
|
|
266
|
-
function
|
|
267
|
+
function ao(e) {
|
|
267
268
|
return typeof e == "function";
|
|
268
269
|
}
|
|
269
|
-
function
|
|
270
|
+
function me(e) {
|
|
270
271
|
const t = i.useRef({ value: e, previous: e });
|
|
271
272
|
return i.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
272
273
|
}
|
|
273
|
-
function
|
|
274
|
+
function he(e) {
|
|
274
275
|
const [t, o] = i.useState(void 0);
|
|
275
|
-
return
|
|
276
|
+
return V(() => {
|
|
276
277
|
if (e) {
|
|
277
278
|
o({ width: e.offsetWidth, height: e.offsetHeight });
|
|
278
|
-
const
|
|
279
|
-
if (!Array.isArray(
|
|
279
|
+
const s = new ResizeObserver((n) => {
|
|
280
|
+
if (!Array.isArray(n) || !n.length)
|
|
280
281
|
return;
|
|
281
|
-
const
|
|
282
|
-
let
|
|
283
|
-
if ("borderBoxSize" in
|
|
284
|
-
const l =
|
|
285
|
-
|
|
282
|
+
const r = n[0];
|
|
283
|
+
let a, c;
|
|
284
|
+
if ("borderBoxSize" in r) {
|
|
285
|
+
const l = r.borderBoxSize, d = Array.isArray(l) ? l[0] : l;
|
|
286
|
+
a = d.inlineSize, c = d.blockSize;
|
|
286
287
|
} else
|
|
287
|
-
|
|
288
|
-
o({ width:
|
|
288
|
+
a = e.offsetWidth, c = e.offsetHeight;
|
|
289
|
+
o({ width: a, height: c });
|
|
289
290
|
});
|
|
290
|
-
return
|
|
291
|
+
return s.observe(e, { box: "border-box" }), () => s.unobserve(e);
|
|
291
292
|
} else
|
|
292
293
|
o(void 0);
|
|
293
294
|
}, [e]), t;
|
|
294
295
|
}
|
|
295
|
-
function
|
|
296
|
-
const [o,
|
|
297
|
-
return [o,
|
|
296
|
+
function io(e, t) {
|
|
297
|
+
const [o, s] = i.useReducer((n, r) => t[n][r] ?? n, e);
|
|
298
|
+
return [o, s];
|
|
299
|
+
}
|
|
300
|
+
function lo(e, t, o, s = 0) {
|
|
301
|
+
const [n, r] = P.useState({
|
|
302
|
+
position: "absolute",
|
|
303
|
+
top: 0,
|
|
304
|
+
left: 0,
|
|
305
|
+
opacity: 0,
|
|
306
|
+
pointerEvents: "none"
|
|
307
|
+
}), [a, c] = P.useState(!1);
|
|
308
|
+
return V(() => {
|
|
309
|
+
if (!o) {
|
|
310
|
+
c(!1), r({
|
|
311
|
+
position: "absolute",
|
|
312
|
+
top: 0,
|
|
313
|
+
left: 0,
|
|
314
|
+
opacity: 0,
|
|
315
|
+
pointerEvents: "none"
|
|
316
|
+
});
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
let l;
|
|
320
|
+
const d = () => {
|
|
321
|
+
if (!e.current || !t.current) return;
|
|
322
|
+
const p = e.current.getBoundingClientRect(), f = t.current.getBoundingClientRect();
|
|
323
|
+
if (f.height === 0 || f.width === 0) {
|
|
324
|
+
l = requestAnimationFrame(d);
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
const b = window.innerHeight, m = window.innerWidth;
|
|
328
|
+
let v = window.scrollY + p.bottom + s, g = window.scrollX + p.left;
|
|
329
|
+
p.bottom + f.height + s > b && (v = window.scrollY + p.top - f.height - s), p.left + f.width > m && (g = window.scrollX + m - f.width - 16), r({
|
|
330
|
+
position: "absolute",
|
|
331
|
+
top: `${v}px`,
|
|
332
|
+
left: `${g}px`,
|
|
333
|
+
minWidth: `${p.width}px`,
|
|
334
|
+
zIndex: 1e3,
|
|
335
|
+
opacity: 1,
|
|
336
|
+
pointerEvents: "auto"
|
|
337
|
+
}), c(!0);
|
|
338
|
+
};
|
|
339
|
+
return l = requestAnimationFrame(d), window.addEventListener("scroll", d, { passive: !0 }), window.addEventListener("resize", d), () => {
|
|
340
|
+
cancelAnimationFrame(l), window.removeEventListener("scroll", d), window.removeEventListener("resize", d);
|
|
341
|
+
};
|
|
342
|
+
}, [o, e, t, s]), { styles: n, isPositioned: a };
|
|
343
|
+
}
|
|
344
|
+
function uo(e, t) {
|
|
345
|
+
i.useEffect(() => {
|
|
346
|
+
const o = (s) => {
|
|
347
|
+
const n = e?.current;
|
|
348
|
+
!n || n.contains(s.target) || t(s);
|
|
349
|
+
};
|
|
350
|
+
return document.addEventListener("mousedown", o), document.addEventListener("touchstart", o), () => {
|
|
351
|
+
document.removeEventListener("mousedown", o), document.removeEventListener("touchstart", o);
|
|
352
|
+
};
|
|
353
|
+
}, [e, t]);
|
|
298
354
|
}
|
|
299
|
-
const
|
|
300
|
-
const t =
|
|
301
|
-
const { children:
|
|
302
|
-
if (
|
|
303
|
-
const
|
|
304
|
-
return
|
|
355
|
+
const po = (e) => {
|
|
356
|
+
const t = P.forwardRef((o, s) => {
|
|
357
|
+
const { children: n, ...r } = o;
|
|
358
|
+
if (P.isValidElement(n)) {
|
|
359
|
+
const a = De(n), c = Yt(r, n.props);
|
|
360
|
+
return c.ref = s ? fe(s, a) : a, P.cloneElement(n, c);
|
|
305
361
|
}
|
|
306
362
|
throw new Error(
|
|
307
363
|
`[${e}.OutletClone] Invalid children passed, expected a single valid React element.`
|
|
@@ -309,80 +365,80 @@ const Xt = (e) => {
|
|
|
309
365
|
});
|
|
310
366
|
return t.displayName = `${e}.OutletClone`, t;
|
|
311
367
|
}, X = (e) => {
|
|
312
|
-
const t =
|
|
313
|
-
const { children:
|
|
368
|
+
const t = po(e), o = P.forwardRef((s, n) => {
|
|
369
|
+
const { children: r, ...a } = s, c = P.Children.toArray(r), l = c.find(mo);
|
|
314
370
|
if (l) {
|
|
315
|
-
const d = l.props.children,
|
|
316
|
-
if (
|
|
317
|
-
if (
|
|
371
|
+
const d = l.props.children, p = c.map((f) => {
|
|
372
|
+
if (f === l) {
|
|
373
|
+
if (P.Children.count(d) > 1 || !P.isValidElement(d))
|
|
318
374
|
throw new Error(
|
|
319
375
|
`[${e}.Outlet] Invalid children passed, expected a single valid React element.`
|
|
320
376
|
);
|
|
321
377
|
return d.props.children;
|
|
322
378
|
} else
|
|
323
|
-
return
|
|
379
|
+
return f;
|
|
324
380
|
});
|
|
325
|
-
if (!
|
|
381
|
+
if (!P.isValidElement(d))
|
|
326
382
|
throw new Error(`[${e}.Outlet] Invalid children passed.`);
|
|
327
|
-
return /* @__PURE__ */ u(t, { ...
|
|
383
|
+
return /* @__PURE__ */ u(t, { ...a, ref: n, children: P.cloneElement(d, void 0, p) });
|
|
328
384
|
}
|
|
329
|
-
return /* @__PURE__ */ u(t, { ...
|
|
385
|
+
return /* @__PURE__ */ u(t, { ...a, ref: n, children: r });
|
|
330
386
|
});
|
|
331
387
|
return o.displayName = `${e}.Outlet`, o;
|
|
332
|
-
},
|
|
333
|
-
const o = X(`Base.${t}`),
|
|
334
|
-
const { asChild:
|
|
335
|
-
return /* @__PURE__ */ u(
|
|
388
|
+
}, J = X("Outlet"), fo = Symbol("bds.outlettable"), mo = (e) => P.isValidElement(e) && typeof e.type == "function" && "__bdsId" in e.type && e.type.__bdsId === fo, ho = ["a", "button", "div", "input", "label", "span"], S = ho.reduce((e, t) => {
|
|
389
|
+
const o = X(`Base.${t}`), s = i.forwardRef((n, r) => {
|
|
390
|
+
const { asChild: a, ...c } = n;
|
|
391
|
+
return /* @__PURE__ */ u(a ? o : t, { ...c, ref: r });
|
|
336
392
|
});
|
|
337
|
-
return
|
|
393
|
+
return s.displayName = `Base.${t}`, { ...e, [t]: s };
|
|
338
394
|
}, {});
|
|
339
|
-
function
|
|
340
|
-
const t = `${e}CollectionProvider`, [o,
|
|
395
|
+
function bo(e) {
|
|
396
|
+
const t = `${e}CollectionProvider`, [o, s] = T(t), [n, r] = o(
|
|
341
397
|
t,
|
|
342
398
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
343
|
-
),
|
|
344
|
-
const { scope:
|
|
345
|
-
return /* @__PURE__ */ u(
|
|
399
|
+
), a = (g) => {
|
|
400
|
+
const { scope: h, children: y } = g, C = i.useRef(null), R = i.useRef(/* @__PURE__ */ new Map()).current;
|
|
401
|
+
return /* @__PURE__ */ u(n, { scope: h, itemMap: R, collectionRef: C, children: y });
|
|
346
402
|
};
|
|
347
|
-
|
|
348
|
-
const
|
|
349
|
-
(
|
|
350
|
-
const { scope: y, children:
|
|
351
|
-
return /* @__PURE__ */ u(l, { ref: N, children:
|
|
403
|
+
a.displayName = t;
|
|
404
|
+
const c = `${e}CollectionOutlet`, l = X(c), d = i.forwardRef(
|
|
405
|
+
(g, h) => {
|
|
406
|
+
const { scope: y, children: C } = g, R = r(c, y), N = k(h, R.collectionRef);
|
|
407
|
+
return /* @__PURE__ */ u(l, { ref: N, children: C });
|
|
352
408
|
}
|
|
353
409
|
);
|
|
354
|
-
d.displayName =
|
|
355
|
-
const
|
|
356
|
-
(
|
|
357
|
-
const { scope: y, children:
|
|
358
|
-
return i.useEffect(() => (w.itemMap.set(N, { ref: N, ...
|
|
410
|
+
d.displayName = c;
|
|
411
|
+
const p = `${e}CollectionItemOutlet`, f = "data-bd-collection-item", b = X(p), m = i.forwardRef(
|
|
412
|
+
(g, h) => {
|
|
413
|
+
const { scope: y, children: C, ...R } = g, N = i.useRef(null), B = k(h, N), w = r(p, y);
|
|
414
|
+
return i.useEffect(() => (w.itemMap.set(N, { ref: N, ...R }), () => void w.itemMap.delete(N))), /* @__PURE__ */ u(b, { [f]: "", ref: B, children: C });
|
|
359
415
|
}
|
|
360
416
|
);
|
|
361
|
-
m.displayName =
|
|
362
|
-
function g
|
|
363
|
-
const
|
|
417
|
+
m.displayName = p;
|
|
418
|
+
function v(g) {
|
|
419
|
+
const h = r(`${e}CollectionConsumer`, g);
|
|
364
420
|
return i.useCallback(() => {
|
|
365
|
-
const
|
|
366
|
-
if (!
|
|
367
|
-
const
|
|
368
|
-
return Array.from(
|
|
369
|
-
(w,
|
|
421
|
+
const C = h.collectionRef.current;
|
|
422
|
+
if (!C) return [];
|
|
423
|
+
const R = Array.from(C.querySelectorAll(`[${f}]`));
|
|
424
|
+
return Array.from(h.itemMap.values()).sort(
|
|
425
|
+
(w, z) => R.indexOf(w.ref.current) - R.indexOf(z.ref.current)
|
|
370
426
|
);
|
|
371
|
-
}, [
|
|
427
|
+
}, [h.collectionRef, h.itemMap]);
|
|
372
428
|
}
|
|
373
429
|
return [
|
|
374
|
-
{ Provider:
|
|
375
|
-
|
|
376
|
-
|
|
430
|
+
{ Provider: a, Outlet: d, ItemOutlet: m },
|
|
431
|
+
v,
|
|
432
|
+
s
|
|
377
433
|
];
|
|
378
434
|
}
|
|
379
|
-
function
|
|
380
|
-
const { remain: t, children: o } = e,
|
|
381
|
-
return typeof o == "function" ||
|
|
435
|
+
function Fe(e) {
|
|
436
|
+
const { remain: t, children: o } = e, s = vo(t), n = typeof o == "function" ? o({ remain: s.isRemain }) : i.Children.only(o), r = k(s.ref, De(n));
|
|
437
|
+
return typeof o == "function" || s.isRemain ? i.cloneElement(n, { ref: r }) : null;
|
|
382
438
|
}
|
|
383
|
-
const
|
|
384
|
-
function
|
|
385
|
-
const [t, o] = i.useState(),
|
|
439
|
+
const go = ["mounted", "unmountSuspended"];
|
|
440
|
+
function vo(e) {
|
|
441
|
+
const [t, o] = i.useState(), s = i.useRef(null), n = i.useRef(e), r = i.useRef("none"), a = e ? "mounted" : "unmounted", [c, l] = io(a, {
|
|
386
442
|
mounted: {
|
|
387
443
|
UNMOUNT: "unmounted",
|
|
388
444
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -396,44 +452,44 @@ function to(e) {
|
|
|
396
452
|
}
|
|
397
453
|
});
|
|
398
454
|
return i.useEffect(() => {
|
|
399
|
-
const d =
|
|
400
|
-
|
|
401
|
-
}, [
|
|
402
|
-
const d =
|
|
403
|
-
if (
|
|
404
|
-
const
|
|
405
|
-
e ? l("MOUNT") : m === "none" || d?.display === "none" ? l("UNMOUNT") : l(
|
|
455
|
+
const d = q(s.current);
|
|
456
|
+
r.current = c === "mounted" ? d : "none";
|
|
457
|
+
}, [c]), V(() => {
|
|
458
|
+
const d = s.current, p = n.current;
|
|
459
|
+
if (p !== e) {
|
|
460
|
+
const b = r.current, m = q(d);
|
|
461
|
+
e ? l("MOUNT") : m === "none" || d?.display === "none" ? l("UNMOUNT") : l(p && b !== m ? "ANIMATION_OUT" : "UNMOUNT"), n.current = e;
|
|
406
462
|
}
|
|
407
|
-
}, [e, l]),
|
|
463
|
+
}, [e, l]), V(() => {
|
|
408
464
|
if (t) {
|
|
409
465
|
let d;
|
|
410
|
-
const
|
|
411
|
-
const
|
|
412
|
-
if (m.target === t &&
|
|
413
|
-
const
|
|
414
|
-
t.style.animationFillMode = "forwards", d =
|
|
415
|
-
t.style.animationFillMode === "forwards" && (t.style.animationFillMode =
|
|
466
|
+
const p = t.ownerDocument.defaultView ?? window, f = (m) => {
|
|
467
|
+
const g = q(s.current).includes(CSS.escape(m.animationName));
|
|
468
|
+
if (m.target === t && g && (l("ANIMATION_END"), !n.current)) {
|
|
469
|
+
const h = t.style.animationFillMode;
|
|
470
|
+
t.style.animationFillMode = "forwards", d = p.setTimeout(() => {
|
|
471
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = h);
|
|
416
472
|
});
|
|
417
473
|
}
|
|
418
|
-
},
|
|
419
|
-
m.target === t && (
|
|
474
|
+
}, b = (m) => {
|
|
475
|
+
m.target === t && (r.current = q(s.current));
|
|
420
476
|
};
|
|
421
|
-
return t.addEventListener("animationstart",
|
|
422
|
-
|
|
477
|
+
return t.addEventListener("animationstart", b), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
|
|
478
|
+
p.clearTimeout(d), t.removeEventListener("animationstart", b), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
|
|
423
479
|
};
|
|
424
480
|
} else
|
|
425
481
|
l("ANIMATION_END");
|
|
426
482
|
}, [t, l]), {
|
|
427
|
-
isRemain:
|
|
483
|
+
isRemain: go.includes(c),
|
|
428
484
|
ref: i.useCallback((d) => {
|
|
429
|
-
|
|
485
|
+
s.current = d ? getComputedStyle(d) : null, o(d);
|
|
430
486
|
}, [])
|
|
431
487
|
};
|
|
432
488
|
}
|
|
433
|
-
function
|
|
489
|
+
function q(e) {
|
|
434
490
|
return e?.animationName || "none";
|
|
435
491
|
}
|
|
436
|
-
const
|
|
492
|
+
const yo = Object.freeze({
|
|
437
493
|
position: "absolute",
|
|
438
494
|
border: 0,
|
|
439
495
|
width: 1,
|
|
@@ -444,157 +500,157 @@ const oo = Object.freeze({
|
|
|
444
500
|
clip: "rect(0, 0, 0, 0)",
|
|
445
501
|
whiteSpace: "nowrap",
|
|
446
502
|
wordWrap: "normal"
|
|
447
|
-
}),
|
|
503
|
+
}), $e = i.forwardRef(
|
|
448
504
|
(e, t) => /* @__PURE__ */ u(
|
|
449
|
-
|
|
505
|
+
S.span,
|
|
450
506
|
{
|
|
451
507
|
...e,
|
|
452
508
|
ref: t,
|
|
453
|
-
style: { ...
|
|
509
|
+
style: { ...yo, ...e.style }
|
|
454
510
|
}
|
|
455
511
|
)
|
|
456
512
|
);
|
|
457
|
-
|
|
458
|
-
const
|
|
459
|
-
const { children: o, className:
|
|
460
|
-
return /* @__PURE__ */ u(
|
|
513
|
+
$e.displayName = "VisuallyHidden";
|
|
514
|
+
const Co = i.forwardRef((e, t) => {
|
|
515
|
+
const { children: o, className: s, ...n } = e;
|
|
516
|
+
return /* @__PURE__ */ u(J, { ...n, ref: t, className: x("bd-reset", s), children: to(o) });
|
|
461
517
|
});
|
|
462
|
-
|
|
463
|
-
const
|
|
464
|
-
if (e?.(
|
|
465
|
-
return t?.(
|
|
466
|
-
},
|
|
467
|
-
|
|
468
|
-
[
|
|
469
|
-
), [
|
|
470
|
-
(e, t) => /* @__PURE__ */ u(
|
|
471
|
-
),
|
|
518
|
+
Co.displayName = "Reset";
|
|
519
|
+
const E = (e, t, { checkForDefaultPrevented: o = !0 } = {}) => function(n) {
|
|
520
|
+
if (e?.(n), o === !1 || !n.defaultPrevented)
|
|
521
|
+
return t?.(n);
|
|
522
|
+
}, ce = "rovingFocusGroup.onEntryFocus", Ro = { bubbles: !1, cancelable: !0 }, Q = "RovingFocusGroup", [ue, Ve, No] = bo(Q), [wo, be] = T(
|
|
523
|
+
Q,
|
|
524
|
+
[No]
|
|
525
|
+
), [xo, So] = wo(Q), Le = i.forwardRef(
|
|
526
|
+
(e, t) => /* @__PURE__ */ u(ue.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u(ue.Outlet, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u(Po, { ...e, ref: t }) }) })
|
|
527
|
+
), Po = i.forwardRef((e, t) => {
|
|
472
528
|
const {
|
|
473
529
|
__scopeRovingFocusGroup: o,
|
|
474
|
-
orientation:
|
|
475
|
-
loop:
|
|
476
|
-
currentTabStopId:
|
|
477
|
-
defaultCurrentTabStopId:
|
|
478
|
-
onCurrentTabStopIdChange:
|
|
530
|
+
orientation: s,
|
|
531
|
+
loop: n = !1,
|
|
532
|
+
currentTabStopId: r,
|
|
533
|
+
defaultCurrentTabStopId: a,
|
|
534
|
+
onCurrentTabStopIdChange: c,
|
|
479
535
|
onEntryFocus: l,
|
|
480
536
|
preventScrollOnEntryFocus: d = !1,
|
|
481
|
-
...
|
|
482
|
-
} = e,
|
|
483
|
-
prop:
|
|
484
|
-
defaultProp:
|
|
485
|
-
onChange:
|
|
486
|
-
caller:
|
|
487
|
-
}), [
|
|
537
|
+
...p
|
|
538
|
+
} = e, f = i.useRef(null), b = k(t, f), [m, v] = A({
|
|
539
|
+
prop: r,
|
|
540
|
+
defaultProp: a ?? null,
|
|
541
|
+
onChange: c,
|
|
542
|
+
caller: Q
|
|
543
|
+
}), [g, h] = i.useState(!1), y = ro(l), C = Ve(o), R = i.useRef(!1), [N, B] = i.useState(0);
|
|
488
544
|
return i.useEffect(() => {
|
|
489
|
-
const w =
|
|
545
|
+
const w = f.current;
|
|
490
546
|
if (w)
|
|
491
|
-
return w.addEventListener(
|
|
547
|
+
return w.addEventListener(ce, y), () => w.removeEventListener(ce, y);
|
|
492
548
|
}, [y]), /* @__PURE__ */ u(
|
|
493
|
-
|
|
549
|
+
xo,
|
|
494
550
|
{
|
|
495
551
|
scope: o,
|
|
496
|
-
orientation:
|
|
497
|
-
loop:
|
|
552
|
+
orientation: s,
|
|
553
|
+
loop: n,
|
|
498
554
|
currentTabStopId: m,
|
|
499
555
|
onItemFocus: i.useCallback(
|
|
500
|
-
(w) =>
|
|
501
|
-
[
|
|
556
|
+
(w) => v(w),
|
|
557
|
+
[v]
|
|
502
558
|
),
|
|
503
|
-
onItemShiftTab: i.useCallback(() =>
|
|
559
|
+
onItemShiftTab: i.useCallback(() => h(!0), []),
|
|
504
560
|
onFocusableItemAdd: i.useCallback(
|
|
505
|
-
() =>
|
|
561
|
+
() => B((w) => w + 1),
|
|
506
562
|
[]
|
|
507
563
|
),
|
|
508
564
|
onFocusableItemRemove: i.useCallback(
|
|
509
|
-
() =>
|
|
565
|
+
() => B((w) => w - 1),
|
|
510
566
|
[]
|
|
511
567
|
),
|
|
512
568
|
children: /* @__PURE__ */ u(
|
|
513
|
-
|
|
569
|
+
S.div,
|
|
514
570
|
{
|
|
515
|
-
tabIndex:
|
|
516
|
-
"data-orientation":
|
|
517
|
-
...
|
|
518
|
-
ref:
|
|
571
|
+
tabIndex: g || N === 0 ? -1 : 0,
|
|
572
|
+
"data-orientation": s,
|
|
573
|
+
...p,
|
|
574
|
+
ref: b,
|
|
519
575
|
style: { outline: "none", ...e.style },
|
|
520
|
-
onMouseDown:
|
|
521
|
-
|
|
576
|
+
onMouseDown: E(e.onMouseDown, () => {
|
|
577
|
+
R.current = !0;
|
|
522
578
|
}),
|
|
523
|
-
onFocus:
|
|
524
|
-
const
|
|
525
|
-
if (w.target === w.currentTarget &&
|
|
526
|
-
const
|
|
527
|
-
if (w.currentTarget.dispatchEvent(
|
|
528
|
-
const
|
|
579
|
+
onFocus: E(e.onFocus, (w) => {
|
|
580
|
+
const z = !R.current;
|
|
581
|
+
if (w.target === w.currentTarget && z && !g) {
|
|
582
|
+
const _e = new CustomEvent(ce, Ro);
|
|
583
|
+
if (w.currentTarget.dispatchEvent(_e), !_e.defaultPrevented) {
|
|
584
|
+
const se = C().filter((G) => G.focusable), Ut = se.find((G) => G.active), jt = se.find((G) => G.id === m), Ht = [Ut, jt, ...se].filter(
|
|
529
585
|
Boolean
|
|
530
586
|
).map((G) => G.ref.current);
|
|
531
|
-
|
|
587
|
+
Ue(Ht, d);
|
|
532
588
|
}
|
|
533
589
|
}
|
|
534
|
-
|
|
590
|
+
R.current = !1;
|
|
535
591
|
}),
|
|
536
|
-
onBlur:
|
|
592
|
+
onBlur: E(e.onBlur, () => h(!1))
|
|
537
593
|
}
|
|
538
594
|
)
|
|
539
595
|
}
|
|
540
596
|
);
|
|
541
|
-
}),
|
|
597
|
+
}), ko = "RovingFocusGroupItem", ze = i.forwardRef(
|
|
542
598
|
(e, t) => {
|
|
543
599
|
const {
|
|
544
600
|
__scopeRovingFocusGroup: o,
|
|
545
|
-
focusable:
|
|
546
|
-
active:
|
|
547
|
-
tabStopId:
|
|
548
|
-
children:
|
|
549
|
-
...
|
|
550
|
-
} = e, l =
|
|
601
|
+
focusable: s = !0,
|
|
602
|
+
active: n = !1,
|
|
603
|
+
tabStopId: r,
|
|
604
|
+
children: a,
|
|
605
|
+
...c
|
|
606
|
+
} = e, l = Me(), d = r || l, p = So(ko, o), f = p.currentTabStopId === d, b = Ve(o), { onFocusableItemAdd: m, onFocusableItemRemove: v, currentTabStopId: g } = p;
|
|
551
607
|
return i.useEffect(() => {
|
|
552
|
-
if (
|
|
553
|
-
return m(), () =>
|
|
554
|
-
}, [
|
|
555
|
-
|
|
608
|
+
if (s)
|
|
609
|
+
return m(), () => v();
|
|
610
|
+
}, [s, m, v]), /* @__PURE__ */ u(
|
|
611
|
+
ue.ItemOutlet,
|
|
556
612
|
{
|
|
557
613
|
scope: o,
|
|
558
614
|
id: d,
|
|
559
|
-
focusable:
|
|
560
|
-
active:
|
|
615
|
+
focusable: s,
|
|
616
|
+
active: n,
|
|
561
617
|
children: /* @__PURE__ */ u(
|
|
562
|
-
|
|
618
|
+
S.span,
|
|
563
619
|
{
|
|
564
|
-
tabIndex:
|
|
565
|
-
"data-orientation":
|
|
566
|
-
...
|
|
620
|
+
tabIndex: f ? 0 : -1,
|
|
621
|
+
"data-orientation": p.orientation,
|
|
622
|
+
...c,
|
|
567
623
|
ref: t,
|
|
568
|
-
onMouseDown:
|
|
569
|
-
|
|
624
|
+
onMouseDown: E(e.onMouseDown, (h) => {
|
|
625
|
+
s ? p.onItemFocus(d) : h.preventDefault();
|
|
570
626
|
}),
|
|
571
|
-
onFocus:
|
|
572
|
-
onKeyDown:
|
|
573
|
-
if (
|
|
574
|
-
|
|
627
|
+
onFocus: E(e.onFocus, () => p.onItemFocus(d)),
|
|
628
|
+
onKeyDown: E(e.onKeyDown, (h) => {
|
|
629
|
+
if (h.key === "Tab" && h.shiftKey) {
|
|
630
|
+
p.onItemShiftTab();
|
|
575
631
|
return;
|
|
576
632
|
}
|
|
577
|
-
if (
|
|
578
|
-
const y =
|
|
633
|
+
if (h.target !== h.currentTarget) return;
|
|
634
|
+
const y = Eo(h, p.orientation);
|
|
579
635
|
if (y !== void 0) {
|
|
580
|
-
if (
|
|
581
|
-
|
|
582
|
-
let
|
|
583
|
-
if (y === "last")
|
|
636
|
+
if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
|
|
637
|
+
h.preventDefault();
|
|
638
|
+
let R = b().filter((N) => N.focusable).map((N) => N.ref.current);
|
|
639
|
+
if (y === "last") R.reverse();
|
|
584
640
|
else if (y === "prev" || y === "next") {
|
|
585
|
-
y === "prev" &&
|
|
586
|
-
const N =
|
|
587
|
-
|
|
641
|
+
y === "prev" && R.reverse();
|
|
642
|
+
const N = R.indexOf(h.currentTarget);
|
|
643
|
+
R = p.loop ? _o(R, N + 1) : R.slice(N + 1), setTimeout(() => Ue(R));
|
|
588
644
|
}
|
|
589
645
|
}
|
|
590
646
|
}),
|
|
591
|
-
children: typeof
|
|
647
|
+
children: typeof a == "function" ? a({ hasTabStop: g != null, isCurrentTabStop: f }) : a
|
|
592
648
|
}
|
|
593
649
|
)
|
|
594
650
|
}
|
|
595
651
|
);
|
|
596
652
|
}
|
|
597
|
-
),
|
|
653
|
+
), Io = {
|
|
598
654
|
ArrowLeft: "prev",
|
|
599
655
|
ArrowUp: "prev",
|
|
600
656
|
ArrowRight: "next",
|
|
@@ -604,91 +660,91 @@ const S = (e, t, { checkForDefaultPrevented: o = !0 } = {}) => function(s) {
|
|
|
604
660
|
PageDown: "last",
|
|
605
661
|
End: "last"
|
|
606
662
|
};
|
|
607
|
-
function
|
|
663
|
+
function Eo(e, t) {
|
|
608
664
|
const o = e.key;
|
|
609
665
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
|
|
610
|
-
return
|
|
666
|
+
return Io[o];
|
|
611
667
|
}
|
|
612
|
-
function
|
|
668
|
+
function Ue(e, t = !1) {
|
|
613
669
|
const o = document.activeElement;
|
|
614
|
-
for (const
|
|
615
|
-
if (
|
|
670
|
+
for (const s of e)
|
|
671
|
+
if (s === o || (s.focus({ preventScroll: t }), document.activeElement !== o)) return;
|
|
616
672
|
}
|
|
617
|
-
function
|
|
618
|
-
return e.map((o,
|
|
673
|
+
function _o(e, t) {
|
|
674
|
+
return e.map((o, s) => e[(t + s) % e.length]);
|
|
619
675
|
}
|
|
620
|
-
const
|
|
676
|
+
const L = {
|
|
621
677
|
asChild: {
|
|
622
678
|
type: "boolean"
|
|
623
679
|
}
|
|
624
|
-
},
|
|
680
|
+
}, ee = ["gray50", "gray100", "gray200", "gray300", "gray400", "gray500", "gray600", "gray700", "gray800", "gray900", "gray1000", "gray1100", "gray1200", "gray1300", "gray1400", "gray1500", "blue50", "blue100", "blue200", "blue300", "blue400", "blue500", "blue600", "blue700", "blue800", "blue900", "blue1000", "blue1100", "blue1200", "blue1300", "blue1400", "green50", "green100", "green200", "green300", "green400", "green500", "green600", "green700", "green800", "green900", "green1000", "green1100", "green1200", "red50", "red100", "red200", "red300", "red400", "red500", "red600", "red700", "red800", "red900", "red1000", "red1100"], To = {
|
|
625
681
|
color: {
|
|
626
682
|
type: "enum | string",
|
|
627
|
-
values:
|
|
683
|
+
values: ee,
|
|
628
684
|
className: "bd-color",
|
|
629
685
|
customProperties: ["--color"],
|
|
630
686
|
default: void 0
|
|
631
687
|
}
|
|
632
|
-
},
|
|
688
|
+
}, Ao = {
|
|
633
689
|
borderColor: {
|
|
634
690
|
type: "enum | string",
|
|
635
|
-
values:
|
|
691
|
+
values: ee,
|
|
636
692
|
className: "bd-br-color",
|
|
637
693
|
customProperties: ["--border-color"],
|
|
638
694
|
default: void 0
|
|
639
695
|
}
|
|
640
|
-
},
|
|
696
|
+
}, Bo = {
|
|
641
697
|
accentColor: {
|
|
642
698
|
type: "enum | string",
|
|
643
|
-
values:
|
|
699
|
+
values: ee,
|
|
644
700
|
className: "bd-ac-color",
|
|
645
701
|
customProperties: ["--accent-color"],
|
|
646
702
|
default: void 0
|
|
647
703
|
}
|
|
648
|
-
},
|
|
704
|
+
}, M = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], $ = {
|
|
649
705
|
p: {
|
|
650
706
|
type: "enum | string",
|
|
651
|
-
values:
|
|
707
|
+
values: M,
|
|
652
708
|
className: "bd-p",
|
|
653
709
|
customProperties: ["--p"]
|
|
654
710
|
},
|
|
655
711
|
px: {
|
|
656
712
|
type: "enum | string",
|
|
657
|
-
values:
|
|
713
|
+
values: M,
|
|
658
714
|
className: "bd-px",
|
|
659
715
|
customProperties: ["--px"]
|
|
660
716
|
},
|
|
661
717
|
py: {
|
|
662
718
|
type: "enum | string",
|
|
663
|
-
values:
|
|
719
|
+
values: M,
|
|
664
720
|
className: "bd-py",
|
|
665
721
|
customProperties: ["--py"]
|
|
666
722
|
},
|
|
667
723
|
pt: {
|
|
668
724
|
type: "enum | string",
|
|
669
|
-
values:
|
|
725
|
+
values: M,
|
|
670
726
|
className: "bd-pt",
|
|
671
727
|
customProperties: ["--pt"]
|
|
672
728
|
},
|
|
673
729
|
pr: {
|
|
674
730
|
type: "enum | string",
|
|
675
|
-
values:
|
|
731
|
+
values: M,
|
|
676
732
|
className: "bd-pr",
|
|
677
733
|
customProperties: ["--pr"]
|
|
678
734
|
},
|
|
679
735
|
pb: {
|
|
680
736
|
type: "enum | string",
|
|
681
|
-
values:
|
|
737
|
+
values: M,
|
|
682
738
|
className: "bd-pb",
|
|
683
739
|
customProperties: ["--pb"]
|
|
684
740
|
},
|
|
685
741
|
pl: {
|
|
686
742
|
type: "enum | string",
|
|
687
|
-
values:
|
|
743
|
+
values: M,
|
|
688
744
|
className: "bd-pl",
|
|
689
745
|
customProperties: ["--pl"]
|
|
690
746
|
}
|
|
691
|
-
},
|
|
747
|
+
}, je = {
|
|
692
748
|
width: {
|
|
693
749
|
type: "string",
|
|
694
750
|
className: "bd-w",
|
|
@@ -704,7 +760,7 @@ const $ = {
|
|
|
704
760
|
className: "bd-max-w",
|
|
705
761
|
customProperties: ["--max-width"]
|
|
706
762
|
}
|
|
707
|
-
},
|
|
763
|
+
}, Oo = {
|
|
708
764
|
height: {
|
|
709
765
|
type: "string",
|
|
710
766
|
className: "bd-h",
|
|
@@ -720,59 +776,59 @@ const $ = {
|
|
|
720
776
|
className: "bd-max-h",
|
|
721
777
|
customProperties: ["--max-height"]
|
|
722
778
|
}
|
|
723
|
-
},
|
|
724
|
-
...
|
|
725
|
-
...
|
|
726
|
-
|
|
779
|
+
}, Do = ["static", "relative", "absolute", "fixed", "sticky"], ae = ["visible", "hidden", "clip", "scroll", "auto"], U = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"], Go = ["0", "1"], Mo = ["0", "1"], Fo = ["start", "center", "end", "baseline", "stretch"], $o = ["start", "center", "end", "baseline", "stretch"], Vo = {
|
|
780
|
+
...je,
|
|
781
|
+
...Oo,
|
|
782
|
+
...$,
|
|
727
783
|
position: {
|
|
728
784
|
type: "enum",
|
|
729
785
|
className: "bd-position",
|
|
730
|
-
values:
|
|
786
|
+
values: Do
|
|
731
787
|
},
|
|
732
788
|
inset: {
|
|
733
789
|
type: "enum | string",
|
|
734
790
|
className: "bd-inset",
|
|
735
791
|
customProperties: ["--inset"],
|
|
736
|
-
values:
|
|
792
|
+
values: U
|
|
737
793
|
},
|
|
738
794
|
top: {
|
|
739
795
|
type: "enum | string",
|
|
740
796
|
className: "bd-top",
|
|
741
797
|
customProperties: ["--top"],
|
|
742
|
-
values:
|
|
798
|
+
values: U
|
|
743
799
|
},
|
|
744
800
|
right: {
|
|
745
801
|
type: "enum | string",
|
|
746
802
|
className: "bd-right",
|
|
747
803
|
customProperties: ["--right"],
|
|
748
|
-
values:
|
|
804
|
+
values: U
|
|
749
805
|
},
|
|
750
806
|
bottom: {
|
|
751
807
|
type: "enum | string",
|
|
752
808
|
className: "bd-bottom",
|
|
753
809
|
customProperties: ["--bottom"],
|
|
754
|
-
values:
|
|
810
|
+
values: U
|
|
755
811
|
},
|
|
756
812
|
left: {
|
|
757
813
|
type: "enum | string",
|
|
758
814
|
className: "bd-left",
|
|
759
815
|
customProperties: ["--left"],
|
|
760
|
-
values:
|
|
816
|
+
values: U
|
|
761
817
|
},
|
|
762
818
|
overflow: {
|
|
763
819
|
type: "enum",
|
|
764
820
|
className: "bd-overflow",
|
|
765
|
-
values:
|
|
821
|
+
values: ae
|
|
766
822
|
},
|
|
767
823
|
overflowX: {
|
|
768
824
|
type: "enum",
|
|
769
825
|
className: "bd-ox",
|
|
770
|
-
values:
|
|
826
|
+
values: ae
|
|
771
827
|
},
|
|
772
828
|
overflowY: {
|
|
773
829
|
type: "enum",
|
|
774
830
|
className: "bd-oy",
|
|
775
|
-
values:
|
|
831
|
+
values: ae
|
|
776
832
|
},
|
|
777
833
|
flexBasis: {
|
|
778
834
|
type: "string",
|
|
@@ -783,13 +839,13 @@ const $ = {
|
|
|
783
839
|
type: "enum | string",
|
|
784
840
|
className: "bd-fs",
|
|
785
841
|
customProperties: ["--flex-shrink"],
|
|
786
|
-
values:
|
|
842
|
+
values: Go
|
|
787
843
|
},
|
|
788
844
|
flexGrow: {
|
|
789
845
|
type: "enum | string",
|
|
790
846
|
className: "bd-fg",
|
|
791
847
|
customProperties: ["--flex-grow"],
|
|
792
|
-
values:
|
|
848
|
+
values: Mo
|
|
793
849
|
},
|
|
794
850
|
gridArea: {
|
|
795
851
|
type: "string",
|
|
@@ -829,14 +885,14 @@ const $ = {
|
|
|
829
885
|
alignSelf: {
|
|
830
886
|
type: "enum",
|
|
831
887
|
className: "bd-as",
|
|
832
|
-
values:
|
|
888
|
+
values: Fo
|
|
833
889
|
},
|
|
834
890
|
justifySelf: {
|
|
835
891
|
type: "enum",
|
|
836
892
|
className: "bd-js",
|
|
837
|
-
values:
|
|
893
|
+
values: $o
|
|
838
894
|
}
|
|
839
|
-
}, F = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"],
|
|
895
|
+
}, F = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"], D = {
|
|
840
896
|
m: {
|
|
841
897
|
type: "enum | string",
|
|
842
898
|
values: F,
|
|
@@ -879,155 +935,155 @@ const $ = {
|
|
|
879
935
|
className: "bd-ml",
|
|
880
936
|
customProperties: ["--ml"]
|
|
881
937
|
}
|
|
882
|
-
},
|
|
938
|
+
}, Lo = ["left", "center", "right"], zo = {
|
|
883
939
|
align: {
|
|
884
940
|
type: "enum",
|
|
885
|
-
values:
|
|
941
|
+
values: Lo,
|
|
886
942
|
className: "bd-ta"
|
|
887
943
|
}
|
|
888
|
-
},
|
|
944
|
+
}, Uo = ["wrap", "nowrap", "pretty", "balance"], jo = {
|
|
889
945
|
wrap: {
|
|
890
946
|
type: "enum",
|
|
891
947
|
className: "bd-tw",
|
|
892
|
-
values:
|
|
948
|
+
values: Uo
|
|
893
949
|
}
|
|
894
|
-
},
|
|
950
|
+
}, Ho = ["light", "regular", "medium", "semibold", "bold"], He = {
|
|
895
951
|
weight: {
|
|
896
952
|
type: "enum",
|
|
897
|
-
values:
|
|
953
|
+
values: Ho,
|
|
898
954
|
className: "bd-weight"
|
|
899
955
|
}
|
|
900
|
-
},
|
|
956
|
+
}, qo = {
|
|
901
957
|
truncate: {
|
|
902
958
|
type: "boolean",
|
|
903
959
|
className: "bd-truncate"
|
|
904
960
|
}
|
|
905
|
-
},
|
|
961
|
+
}, Ko = ["normal", "start", "end", "both"], Wo = {
|
|
906
962
|
trim: {
|
|
907
963
|
type: "enum",
|
|
908
964
|
className: "bd-lt",
|
|
909
|
-
values:
|
|
965
|
+
values: Ko,
|
|
910
966
|
default: "normal"
|
|
911
967
|
}
|
|
912
|
-
},
|
|
968
|
+
}, Xo = ["none", "s", "m", "l", "full"], Yo = {
|
|
913
969
|
radius: {
|
|
914
970
|
type: "enum | string",
|
|
915
|
-
values:
|
|
971
|
+
values: Xo,
|
|
916
972
|
default: void 0,
|
|
917
973
|
className: "bd-radius",
|
|
918
974
|
customProperties: ["--radius"]
|
|
919
975
|
}
|
|
920
|
-
},
|
|
976
|
+
}, ie = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], qe = {
|
|
921
977
|
gap: {
|
|
922
978
|
type: "enum | string",
|
|
923
979
|
className: "bd-gap",
|
|
924
980
|
customProperties: ["--gap"],
|
|
925
|
-
values:
|
|
981
|
+
values: ie
|
|
926
982
|
},
|
|
927
983
|
gapX: {
|
|
928
984
|
type: "enum | string",
|
|
929
985
|
className: "bd-cg",
|
|
930
986
|
customProperties: ["--col-gap"],
|
|
931
|
-
values:
|
|
987
|
+
values: ie
|
|
932
988
|
},
|
|
933
989
|
gapY: {
|
|
934
990
|
type: "enum | string",
|
|
935
991
|
className: "bd-rg",
|
|
936
992
|
customProperties: ["--row-gap"],
|
|
937
|
-
values:
|
|
993
|
+
values: ie
|
|
938
994
|
}
|
|
939
|
-
},
|
|
940
|
-
as: { type: "enum", values:
|
|
941
|
-
|
|
995
|
+
}, Zo = ["span", "div", "label", "p"], Jo = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"], Qo = {
|
|
996
|
+
as: { type: "enum", values: Zo, default: "span" },
|
|
997
|
+
...L,
|
|
942
998
|
size: {
|
|
943
999
|
type: "enum | string",
|
|
944
1000
|
className: "bd-size",
|
|
945
|
-
values:
|
|
1001
|
+
values: Jo,
|
|
946
1002
|
customProperties: ["--size"]
|
|
947
1003
|
},
|
|
948
|
-
|
|
949
|
-
...
|
|
950
|
-
...
|
|
951
|
-
...
|
|
952
|
-
...
|
|
953
|
-
...
|
|
954
|
-
...
|
|
955
|
-
...
|
|
956
|
-
},
|
|
1004
|
+
...L,
|
|
1005
|
+
...D,
|
|
1006
|
+
...zo,
|
|
1007
|
+
...jo,
|
|
1008
|
+
...He,
|
|
1009
|
+
...qo,
|
|
1010
|
+
...Wo,
|
|
1011
|
+
...To
|
|
1012
|
+
}, ge = i.forwardRef((e, t) => {
|
|
957
1013
|
const {
|
|
958
1014
|
children: o,
|
|
959
|
-
className:
|
|
960
|
-
asChild:
|
|
961
|
-
as:
|
|
962
|
-
...
|
|
963
|
-
} =
|
|
964
|
-
return /* @__PURE__ */ u(
|
|
1015
|
+
className: s,
|
|
1016
|
+
asChild: n,
|
|
1017
|
+
as: r = "span",
|
|
1018
|
+
...a
|
|
1019
|
+
} = I(e, Qo);
|
|
1020
|
+
return /* @__PURE__ */ u(J, { ...a, ref: t, className: x("bd-Text", s), children: n ? o : /* @__PURE__ */ u(r, { children: o }) });
|
|
965
1021
|
});
|
|
966
|
-
|
|
967
|
-
const
|
|
968
|
-
as: { type: "enum", values:
|
|
969
|
-
|
|
1022
|
+
ge.displayName = "Text";
|
|
1023
|
+
const en = (e) => e === "between" ? "space-between" : e, tn = ["div", "span"], on = ["none", "inline-flex", "flex"], nn = ["row", "column", "row-reverse", "column-reverse"], sn = ["start", "center", "end", "baseline", "stretch"], rn = ["start", "center", "end", "between"], cn = ["nowrap", "wrap", "wrap-reverse"], ve = {
|
|
1024
|
+
as: { type: "enum", values: tn, default: "div" },
|
|
1025
|
+
...L,
|
|
970
1026
|
display: {
|
|
971
1027
|
type: "enum",
|
|
972
1028
|
className: "bd-display",
|
|
973
|
-
values:
|
|
1029
|
+
values: on
|
|
974
1030
|
},
|
|
975
1031
|
direction: {
|
|
976
1032
|
type: "enum",
|
|
977
1033
|
className: "bd-fd",
|
|
978
|
-
values:
|
|
1034
|
+
values: nn
|
|
979
1035
|
},
|
|
980
1036
|
align: {
|
|
981
1037
|
type: "enum",
|
|
982
1038
|
className: "bd-ai",
|
|
983
|
-
values:
|
|
1039
|
+
values: sn
|
|
984
1040
|
},
|
|
985
1041
|
justify: {
|
|
986
1042
|
type: "enum",
|
|
987
1043
|
className: "bd-jc",
|
|
988
|
-
values:
|
|
989
|
-
parseValue:
|
|
1044
|
+
values: rn,
|
|
1045
|
+
parseValue: en
|
|
990
1046
|
},
|
|
991
1047
|
wrap: {
|
|
992
1048
|
type: "enum",
|
|
993
1049
|
className: "bd-fw",
|
|
994
|
-
values:
|
|
1050
|
+
values: cn
|
|
995
1051
|
},
|
|
996
|
-
...
|
|
997
|
-
...
|
|
998
|
-
...
|
|
1052
|
+
...qe,
|
|
1053
|
+
...Vo,
|
|
1054
|
+
...D
|
|
999
1055
|
}, Y = i.forwardRef((e, t) => {
|
|
1000
|
-
const { className: o, asChild:
|
|
1001
|
-
return /* @__PURE__ */ u(
|
|
1056
|
+
const { className: o, asChild: s, as: n = "div", ...r } = I(e, ve);
|
|
1057
|
+
return /* @__PURE__ */ u(s ? J : n, { ...r, ref: t, className: x("bd-Flex", o) });
|
|
1002
1058
|
});
|
|
1003
1059
|
Y.displayName = "Flex";
|
|
1004
|
-
const
|
|
1005
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1060
|
+
const an = ["1", "2", "3"], ln = {
|
|
1061
|
+
size: { type: "enum", className: "bd-size", values: an, default: "2" },
|
|
1006
1062
|
loading: { type: "boolean", default: !0 },
|
|
1007
|
-
color: { type: "enum", className: "bd-color", values:
|
|
1008
|
-
...
|
|
1009
|
-
},
|
|
1010
|
-
const { className: o, children:
|
|
1063
|
+
color: { type: "enum", className: "bd-color", values: ee },
|
|
1064
|
+
...D
|
|
1065
|
+
}, Ke = i.forwardRef((e, t) => {
|
|
1066
|
+
const { className: o, children: s, loading: n, ...r } = I(
|
|
1011
1067
|
e,
|
|
1012
|
-
|
|
1013
|
-
|
|
1068
|
+
ln,
|
|
1069
|
+
Ao
|
|
1014
1070
|
);
|
|
1015
|
-
if (!
|
|
1016
|
-
const
|
|
1017
|
-
return
|
|
1018
|
-
/* @__PURE__ */ u("span", { children: /* @__PURE__ */ u("span", { "aria-hidden": !0, style: { display: "contents", visibility: "hidden" }, inert: void 0, children:
|
|
1019
|
-
/* @__PURE__ */ u(Y, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ u("span", { children:
|
|
1071
|
+
if (!n) return s;
|
|
1072
|
+
const a = /* @__PURE__ */ u("span", { ...r, ref: t, className: x("bd-Spinner", o) });
|
|
1073
|
+
return s === void 0 ? a : /* @__PURE__ */ _(Y, { asChild: !0, position: "relative", align: "center", justify: "center", children: [
|
|
1074
|
+
/* @__PURE__ */ u("span", { children: /* @__PURE__ */ u("span", { "aria-hidden": !0, style: { display: "contents", visibility: "hidden" }, inert: void 0, children: s }) }),
|
|
1075
|
+
/* @__PURE__ */ u(Y, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ u("span", { children: a }) })
|
|
1020
1076
|
] });
|
|
1021
1077
|
});
|
|
1022
|
-
|
|
1023
|
-
const
|
|
1078
|
+
Ke.displayName = "Spinner";
|
|
1079
|
+
const un = ["1", "2", "3", "4", "5"], dn = [
|
|
1024
1080
|
"fill-primary",
|
|
1025
1081
|
"fill-secondary",
|
|
1026
1082
|
"outline-primary",
|
|
1027
1083
|
"outline-secondary",
|
|
1028
1084
|
"ghost"
|
|
1029
|
-
],
|
|
1030
|
-
|
|
1085
|
+
], le = {
|
|
1086
|
+
...L,
|
|
1031
1087
|
/**
|
|
1032
1088
|
* @description 버튼의 높이 기준
|
|
1033
1089
|
*
|
|
@@ -1037,15 +1093,15 @@ const Ko = ["1", "2", "3", "4", "5"], Wo = [
|
|
|
1037
1093
|
* 4="48px"
|
|
1038
1094
|
* 5="56px"
|
|
1039
1095
|
*/
|
|
1040
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1041
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
1042
|
-
...
|
|
1043
|
-
...
|
|
1044
|
-
...
|
|
1045
|
-
...
|
|
1046
|
-
...
|
|
1096
|
+
size: { type: "enum", className: "bd-size", values: un, default: "5" },
|
|
1097
|
+
variant: { type: "enum", className: "bd-variant", values: dn, default: "fill-primary" },
|
|
1098
|
+
...je,
|
|
1099
|
+
...D,
|
|
1100
|
+
...qe,
|
|
1101
|
+
...Yo,
|
|
1102
|
+
...He,
|
|
1047
1103
|
loading: { type: "boolean", className: "bd-loading", default: !1 }
|
|
1048
|
-
},
|
|
1104
|
+
}, pn = (e) => {
|
|
1049
1105
|
switch (e) {
|
|
1050
1106
|
case "1":
|
|
1051
1107
|
return "1";
|
|
@@ -1056,7 +1112,7 @@ const Ko = ["1", "2", "3", "4", "5"], Wo = [
|
|
|
1056
1112
|
case "5":
|
|
1057
1113
|
return "3";
|
|
1058
1114
|
}
|
|
1059
|
-
},
|
|
1115
|
+
}, fn = (e) => {
|
|
1060
1116
|
switch (e) {
|
|
1061
1117
|
case "fill-primary":
|
|
1062
1118
|
return;
|
|
@@ -1068,40 +1124,40 @@ const Ko = ["1", "2", "3", "4", "5"], Wo = [
|
|
|
1068
1124
|
default:
|
|
1069
1125
|
return;
|
|
1070
1126
|
}
|
|
1071
|
-
},
|
|
1072
|
-
const { variant: o =
|
|
1073
|
-
className:
|
|
1074
|
-
children:
|
|
1075
|
-
asChild:
|
|
1076
|
-
disabled:
|
|
1127
|
+
}, mn = i.forwardRef((e, t) => {
|
|
1128
|
+
const { variant: o = le.variant.default, size: s = le.size.default } = e, {
|
|
1129
|
+
className: n,
|
|
1130
|
+
children: r,
|
|
1131
|
+
asChild: a,
|
|
1132
|
+
disabled: c = e.loading,
|
|
1077
1133
|
...l
|
|
1078
|
-
} =
|
|
1134
|
+
} = I(e, le);
|
|
1079
1135
|
return /* @__PURE__ */ u(
|
|
1080
|
-
|
|
1136
|
+
a ? J : "button",
|
|
1081
1137
|
{
|
|
1082
|
-
"data-disabled":
|
|
1138
|
+
"data-disabled": c || void 0,
|
|
1083
1139
|
"data-loading": e.loading || void 0,
|
|
1084
|
-
disabled:
|
|
1140
|
+
disabled: c,
|
|
1085
1141
|
...l,
|
|
1086
1142
|
ref: t,
|
|
1087
|
-
className: x("bd-Button",
|
|
1088
|
-
children: e.loading ? /* @__PURE__ */
|
|
1089
|
-
/* @__PURE__ */ u("span", { style: { display: "contents", visibility: "hidden" }, "aria-hidden": !0, children:
|
|
1090
|
-
/* @__PURE__ */ u(
|
|
1143
|
+
className: x("bd-Button", n),
|
|
1144
|
+
children: e.loading ? /* @__PURE__ */ _(Oe, { children: [
|
|
1145
|
+
/* @__PURE__ */ u("span", { style: { display: "contents", visibility: "hidden" }, "aria-hidden": !0, children: r }),
|
|
1146
|
+
/* @__PURE__ */ u($e, { children: r }),
|
|
1091
1147
|
/* @__PURE__ */ u(Y, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ u("span", { children: /* @__PURE__ */ u(
|
|
1092
|
-
|
|
1148
|
+
Ke,
|
|
1093
1149
|
{
|
|
1094
|
-
size:
|
|
1095
|
-
color:
|
|
1150
|
+
size: pn(s),
|
|
1151
|
+
color: fn(o)
|
|
1096
1152
|
}
|
|
1097
1153
|
) }) })
|
|
1098
|
-
] }) :
|
|
1154
|
+
] }) : r
|
|
1099
1155
|
}
|
|
1100
1156
|
);
|
|
1101
1157
|
});
|
|
1102
|
-
|
|
1103
|
-
const
|
|
1104
|
-
const { color: o = "currentColor", ...
|
|
1158
|
+
mn.displayName = "Button";
|
|
1159
|
+
const We = i.forwardRef((e, t) => {
|
|
1160
|
+
const { color: o = "currentColor", ...s } = e;
|
|
1105
1161
|
return /* @__PURE__ */ u(
|
|
1106
1162
|
"svg",
|
|
1107
1163
|
{
|
|
@@ -1110,7 +1166,7 @@ const Ve = i.forwardRef((e, t) => {
|
|
|
1110
1166
|
height: "7",
|
|
1111
1167
|
viewBox: "0 0 10 7",
|
|
1112
1168
|
fill: "none",
|
|
1113
|
-
...
|
|
1169
|
+
...s,
|
|
1114
1170
|
ref: t,
|
|
1115
1171
|
children: /* @__PURE__ */ u(
|
|
1116
1172
|
"path",
|
|
@@ -1124,8 +1180,8 @@ const Ve = i.forwardRef((e, t) => {
|
|
|
1124
1180
|
)
|
|
1125
1181
|
}
|
|
1126
1182
|
);
|
|
1127
|
-
}),
|
|
1128
|
-
const { color: o = "currentColor", ...
|
|
1183
|
+
}), hn = i.forwardRef((e, t) => {
|
|
1184
|
+
const { color: o = "currentColor", ...s } = e;
|
|
1129
1185
|
return /* @__PURE__ */ u(
|
|
1130
1186
|
"svg",
|
|
1131
1187
|
{
|
|
@@ -1134,7 +1190,7 @@ const Ve = i.forwardRef((e, t) => {
|
|
|
1134
1190
|
height: "9",
|
|
1135
1191
|
viewBox: "0 0 9 9",
|
|
1136
1192
|
fill: o,
|
|
1137
|
-
...
|
|
1193
|
+
...s,
|
|
1138
1194
|
ref: t,
|
|
1139
1195
|
children: /* @__PURE__ */ u(
|
|
1140
1196
|
"path",
|
|
@@ -1146,140 +1202,140 @@ const Ve = i.forwardRef((e, t) => {
|
|
|
1146
1202
|
)
|
|
1147
1203
|
}
|
|
1148
1204
|
);
|
|
1149
|
-
}),
|
|
1150
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1151
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
1152
|
-
},
|
|
1153
|
-
function
|
|
1205
|
+
}), bn = ["1", "2", "3", "4"], gn = ["classic", "circle", "outline"], Xe = {
|
|
1206
|
+
size: { type: "enum", className: "bd-size", values: bn, default: "2" },
|
|
1207
|
+
variant: { type: "enum", className: "bd-variant", values: gn, default: "classic" }
|
|
1208
|
+
}, ye = "Checkbox", [vn, Ye] = T(ye), [yn, Ce] = vn(ye);
|
|
1209
|
+
function Cn(e) {
|
|
1154
1210
|
const {
|
|
1155
1211
|
__scopeCheckbox: t,
|
|
1156
1212
|
checked: o,
|
|
1157
|
-
defaultChecked:
|
|
1158
|
-
required:
|
|
1159
|
-
name:
|
|
1160
|
-
form:
|
|
1161
|
-
disabled:
|
|
1213
|
+
defaultChecked: s,
|
|
1214
|
+
required: n,
|
|
1215
|
+
name: r,
|
|
1216
|
+
form: a,
|
|
1217
|
+
disabled: c,
|
|
1162
1218
|
value: l = "on",
|
|
1163
1219
|
children: d,
|
|
1164
|
-
onCheckedChange:
|
|
1220
|
+
onCheckedChange: p,
|
|
1165
1221
|
// @ts-expect-error - Internal prop for render
|
|
1166
|
-
__internal:
|
|
1167
|
-
} = e, [
|
|
1222
|
+
__internal: f
|
|
1223
|
+
} = e, [b, m] = A({
|
|
1168
1224
|
prop: o,
|
|
1169
|
-
defaultProp:
|
|
1170
|
-
onChange:
|
|
1171
|
-
caller:
|
|
1172
|
-
}), [
|
|
1173
|
-
checked:
|
|
1174
|
-
disabled:
|
|
1225
|
+
defaultProp: s ?? !1,
|
|
1226
|
+
onChange: p,
|
|
1227
|
+
caller: ye
|
|
1228
|
+
}), [v, g] = i.useState(null), [h, y] = i.useState(null), C = i.useRef(!1), R = v ? !!a || !!v.closest("form") : !0, N = {
|
|
1229
|
+
checked: b,
|
|
1230
|
+
disabled: c,
|
|
1175
1231
|
setChecked: m,
|
|
1176
|
-
control:
|
|
1177
|
-
setControl:
|
|
1178
|
-
name:
|
|
1179
|
-
form:
|
|
1232
|
+
control: v,
|
|
1233
|
+
setControl: g,
|
|
1234
|
+
name: r,
|
|
1235
|
+
form: a,
|
|
1180
1236
|
value: l,
|
|
1181
|
-
hasConsumerStoppedPropagationRef:
|
|
1182
|
-
required:
|
|
1183
|
-
defaultChecked: O(
|
|
1184
|
-
isFormControl:
|
|
1185
|
-
bubbleInput:
|
|
1237
|
+
hasConsumerStoppedPropagationRef: C,
|
|
1238
|
+
required: n,
|
|
1239
|
+
defaultChecked: O(s) ? !1 : s,
|
|
1240
|
+
isFormControl: R,
|
|
1241
|
+
bubbleInput: h,
|
|
1186
1242
|
setBubbleInput: y
|
|
1187
1243
|
};
|
|
1188
1244
|
return /* @__PURE__ */ u(
|
|
1189
|
-
|
|
1245
|
+
yn,
|
|
1190
1246
|
{
|
|
1191
1247
|
scope: t,
|
|
1192
1248
|
...N,
|
|
1193
|
-
children:
|
|
1249
|
+
children: Rn(f) ? f(N) : d
|
|
1194
1250
|
}
|
|
1195
1251
|
);
|
|
1196
1252
|
}
|
|
1197
|
-
const
|
|
1253
|
+
const Ze = "CheckboxTrigger", Je = i.forwardRef(
|
|
1198
1254
|
({
|
|
1199
1255
|
__scopeCheckbox: e,
|
|
1200
1256
|
onKeyDown: t,
|
|
1201
1257
|
onClick: o,
|
|
1202
|
-
...
|
|
1203
|
-
},
|
|
1258
|
+
...s
|
|
1259
|
+
}, n) => {
|
|
1204
1260
|
const {
|
|
1205
|
-
control:
|
|
1206
|
-
value:
|
|
1207
|
-
disabled:
|
|
1261
|
+
control: r,
|
|
1262
|
+
value: a,
|
|
1263
|
+
disabled: c,
|
|
1208
1264
|
checked: l,
|
|
1209
1265
|
required: d,
|
|
1210
|
-
setControl:
|
|
1211
|
-
setChecked:
|
|
1212
|
-
hasConsumerStoppedPropagationRef:
|
|
1266
|
+
setControl: p,
|
|
1267
|
+
setChecked: f,
|
|
1268
|
+
hasConsumerStoppedPropagationRef: b,
|
|
1213
1269
|
isFormControl: m,
|
|
1214
|
-
bubbleInput:
|
|
1215
|
-
} =
|
|
1270
|
+
bubbleInput: v
|
|
1271
|
+
} = Ce(Ze, e), g = k(n, p), h = i.useRef(l);
|
|
1216
1272
|
return i.useEffect(() => {
|
|
1217
|
-
const y =
|
|
1273
|
+
const y = r?.form;
|
|
1218
1274
|
if (y) {
|
|
1219
|
-
const
|
|
1220
|
-
return y.addEventListener("reset",
|
|
1275
|
+
const C = () => f(h.current);
|
|
1276
|
+
return y.addEventListener("reset", C), () => y.removeEventListener("reset", C);
|
|
1221
1277
|
}
|
|
1222
|
-
}, [
|
|
1223
|
-
|
|
1278
|
+
}, [r, f]), /* @__PURE__ */ u(
|
|
1279
|
+
S.button,
|
|
1224
1280
|
{
|
|
1225
1281
|
type: "button",
|
|
1226
1282
|
role: "checkbox",
|
|
1227
1283
|
"aria-checked": O(l) ? "mixed" : l,
|
|
1228
1284
|
"aria-required": d,
|
|
1229
|
-
"data-state":
|
|
1230
|
-
"data-disabled":
|
|
1231
|
-
disabled:
|
|
1232
|
-
value:
|
|
1233
|
-
...
|
|
1234
|
-
ref:
|
|
1235
|
-
onKeyDown:
|
|
1285
|
+
"data-state": nt(l),
|
|
1286
|
+
"data-disabled": c ? "" : void 0,
|
|
1287
|
+
disabled: c,
|
|
1288
|
+
value: a,
|
|
1289
|
+
...s,
|
|
1290
|
+
ref: g,
|
|
1291
|
+
onKeyDown: E(t, (y) => {
|
|
1236
1292
|
y.key === "Enter" && y.preventDefault();
|
|
1237
1293
|
}),
|
|
1238
|
-
onClick:
|
|
1239
|
-
|
|
1294
|
+
onClick: E(o, (y) => {
|
|
1295
|
+
f((C) => O(C) ? !0 : !C), v && m && (b.current = y.isPropagationStopped(), b.current || y.stopPropagation());
|
|
1240
1296
|
})
|
|
1241
1297
|
}
|
|
1242
1298
|
);
|
|
1243
1299
|
}
|
|
1244
1300
|
);
|
|
1245
|
-
|
|
1246
|
-
const
|
|
1301
|
+
Je.displayName = Ze;
|
|
1302
|
+
const Qe = i.forwardRef(
|
|
1247
1303
|
(e, t) => {
|
|
1248
1304
|
const {
|
|
1249
1305
|
__scopeCheckbox: o,
|
|
1250
|
-
name:
|
|
1251
|
-
checked:
|
|
1252
|
-
defaultChecked:
|
|
1253
|
-
required:
|
|
1254
|
-
disabled:
|
|
1306
|
+
name: s,
|
|
1307
|
+
checked: n,
|
|
1308
|
+
defaultChecked: r,
|
|
1309
|
+
required: a,
|
|
1310
|
+
disabled: c,
|
|
1255
1311
|
value: l,
|
|
1256
1312
|
onCheckedChange: d,
|
|
1257
|
-
form:
|
|
1258
|
-
...
|
|
1313
|
+
form: p,
|
|
1314
|
+
...f
|
|
1259
1315
|
} = e;
|
|
1260
1316
|
return /* @__PURE__ */ u(
|
|
1261
|
-
|
|
1317
|
+
Cn,
|
|
1262
1318
|
{
|
|
1263
1319
|
__scopeCheckbox: o,
|
|
1264
|
-
checked:
|
|
1265
|
-
defaultChecked:
|
|
1266
|
-
required:
|
|
1267
|
-
name:
|
|
1268
|
-
form:
|
|
1269
|
-
disabled:
|
|
1320
|
+
checked: n,
|
|
1321
|
+
defaultChecked: r,
|
|
1322
|
+
required: a,
|
|
1323
|
+
name: s,
|
|
1324
|
+
form: p,
|
|
1325
|
+
disabled: c,
|
|
1270
1326
|
value: l,
|
|
1271
1327
|
onCheckedChange: d,
|
|
1272
|
-
__internal: ({ isFormControl:
|
|
1328
|
+
__internal: ({ isFormControl: b }) => /* @__PURE__ */ _(Oe, { children: [
|
|
1273
1329
|
/* @__PURE__ */ u(
|
|
1274
|
-
|
|
1330
|
+
Je,
|
|
1275
1331
|
{
|
|
1276
|
-
...
|
|
1332
|
+
...f,
|
|
1277
1333
|
ref: t,
|
|
1278
1334
|
__scopeCheckbox: o
|
|
1279
1335
|
}
|
|
1280
1336
|
),
|
|
1281
|
-
|
|
1282
|
-
|
|
1337
|
+
b && /* @__PURE__ */ u(
|
|
1338
|
+
tt,
|
|
1283
1339
|
{
|
|
1284
1340
|
__scopeCheckbox: o
|
|
1285
1341
|
}
|
|
@@ -1288,51 +1344,51 @@ const He = i.forwardRef(
|
|
|
1288
1344
|
}
|
|
1289
1345
|
);
|
|
1290
1346
|
}
|
|
1291
|
-
),
|
|
1347
|
+
), et = "CheckboxBubbleInput", tt = i.forwardRef(
|
|
1292
1348
|
({ __scopeCheckbox: e, ...t }, o) => {
|
|
1293
1349
|
const {
|
|
1294
|
-
control:
|
|
1295
|
-
checked:
|
|
1296
|
-
defaultChecked:
|
|
1297
|
-
required:
|
|
1298
|
-
disabled:
|
|
1350
|
+
control: s,
|
|
1351
|
+
checked: n,
|
|
1352
|
+
defaultChecked: r,
|
|
1353
|
+
required: a,
|
|
1354
|
+
disabled: c,
|
|
1299
1355
|
name: l,
|
|
1300
1356
|
value: d,
|
|
1301
|
-
form:
|
|
1302
|
-
bubbleInput:
|
|
1303
|
-
setBubbleInput:
|
|
1357
|
+
form: p,
|
|
1358
|
+
bubbleInput: f,
|
|
1359
|
+
setBubbleInput: b,
|
|
1304
1360
|
hasConsumerStoppedPropagationRef: m
|
|
1305
|
-
} =
|
|
1361
|
+
} = Ce(et, e), v = k(o, b), g = me(n), h = he(s);
|
|
1306
1362
|
i.useEffect(() => {
|
|
1307
|
-
const
|
|
1308
|
-
if (!
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1363
|
+
const C = f;
|
|
1364
|
+
if (!C) return;
|
|
1365
|
+
const R = window.HTMLInputElement.prototype, B = Object.getOwnPropertyDescriptor(
|
|
1366
|
+
R,
|
|
1311
1367
|
"checked"
|
|
1312
1368
|
).set, w = !m.current;
|
|
1313
|
-
if (
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1369
|
+
if (g !== n && B) {
|
|
1370
|
+
const z = new Event("click", { bubbles: w });
|
|
1371
|
+
C.indeterminate = O(n), B.call(C, O(n) ? !1 : n), C.dispatchEvent(z);
|
|
1316
1372
|
}
|
|
1317
|
-
}, [
|
|
1318
|
-
const y = i.useRef(O(
|
|
1373
|
+
}, [f, g, n, m]);
|
|
1374
|
+
const y = i.useRef(O(n) ? !1 : n);
|
|
1319
1375
|
return /* @__PURE__ */ u(
|
|
1320
|
-
|
|
1376
|
+
S.input,
|
|
1321
1377
|
{
|
|
1322
1378
|
type: "checkbox",
|
|
1323
1379
|
"aria-hidden": !0,
|
|
1324
|
-
defaultChecked:
|
|
1325
|
-
required:
|
|
1326
|
-
disabled:
|
|
1380
|
+
defaultChecked: r ?? y.current,
|
|
1381
|
+
required: a,
|
|
1382
|
+
disabled: c,
|
|
1327
1383
|
name: l,
|
|
1328
1384
|
value: d,
|
|
1329
|
-
form:
|
|
1385
|
+
form: p,
|
|
1330
1386
|
...t,
|
|
1331
1387
|
tabIndex: -1,
|
|
1332
|
-
ref:
|
|
1388
|
+
ref: v,
|
|
1333
1389
|
style: {
|
|
1334
1390
|
...t.style,
|
|
1335
|
-
...
|
|
1391
|
+
...h,
|
|
1336
1392
|
position: "absolute",
|
|
1337
1393
|
pointerEvents: "none",
|
|
1338
1394
|
opacity: 0,
|
|
@@ -1343,103 +1399,103 @@ const He = i.forwardRef(
|
|
|
1343
1399
|
);
|
|
1344
1400
|
}
|
|
1345
1401
|
);
|
|
1346
|
-
|
|
1347
|
-
const
|
|
1348
|
-
const { __scopeCheckbox: o, forceMount:
|
|
1349
|
-
return /* @__PURE__ */ u(
|
|
1350
|
-
|
|
1402
|
+
tt.displayName = et;
|
|
1403
|
+
const ot = "CheckboxIndicator", Re = i.forwardRef((e, t) => {
|
|
1404
|
+
const { __scopeCheckbox: o, forceMount: s, ...n } = e, r = Ce(ot, o);
|
|
1405
|
+
return /* @__PURE__ */ u(Fe, { remain: s || O(r.checked) || r.checked === !0, children: /* @__PURE__ */ u(
|
|
1406
|
+
S.span,
|
|
1351
1407
|
{
|
|
1352
|
-
"data-state":
|
|
1353
|
-
"data-disabled":
|
|
1354
|
-
...
|
|
1408
|
+
"data-state": nt(r.checked),
|
|
1409
|
+
"data-disabled": r.disabled ? "" : void 0,
|
|
1410
|
+
...n,
|
|
1355
1411
|
ref: t,
|
|
1356
1412
|
style: { pointerEvents: "none", ...e.style }
|
|
1357
1413
|
}
|
|
1358
1414
|
) });
|
|
1359
1415
|
});
|
|
1360
|
-
|
|
1361
|
-
function
|
|
1416
|
+
Re.displayName = ot;
|
|
1417
|
+
function Rn(e) {
|
|
1362
1418
|
return typeof e == "function";
|
|
1363
1419
|
}
|
|
1364
1420
|
function O(e) {
|
|
1365
1421
|
return e === "indeterminate";
|
|
1366
1422
|
}
|
|
1367
|
-
function
|
|
1423
|
+
function nt(e) {
|
|
1368
1424
|
return O(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1369
1425
|
}
|
|
1370
|
-
const
|
|
1426
|
+
const Nn = i.forwardRef((e, t) => {
|
|
1371
1427
|
const {
|
|
1372
1428
|
className: o,
|
|
1373
|
-
checked:
|
|
1374
|
-
defaultChecked:
|
|
1375
|
-
onCheckedChange:
|
|
1376
|
-
...
|
|
1377
|
-
} =
|
|
1378
|
-
prop:
|
|
1379
|
-
defaultProp:
|
|
1380
|
-
onChange:
|
|
1429
|
+
checked: s,
|
|
1430
|
+
defaultChecked: n = !1,
|
|
1431
|
+
onCheckedChange: r,
|
|
1432
|
+
...a
|
|
1433
|
+
} = I(e, Xe), [c, l] = A({
|
|
1434
|
+
prop: s,
|
|
1435
|
+
defaultProp: n,
|
|
1436
|
+
onChange: r
|
|
1381
1437
|
});
|
|
1382
1438
|
return /* @__PURE__ */ u(
|
|
1383
|
-
|
|
1439
|
+
Qe,
|
|
1384
1440
|
{
|
|
1385
|
-
...
|
|
1386
|
-
defaultChecked:
|
|
1387
|
-
checked:
|
|
1441
|
+
...a,
|
|
1442
|
+
defaultChecked: n,
|
|
1443
|
+
checked: c,
|
|
1388
1444
|
onCheckedChange: l,
|
|
1389
1445
|
asChild: !1,
|
|
1390
1446
|
ref: t,
|
|
1391
1447
|
className: x("bd-reset", "bd-CheckboxRoot", o),
|
|
1392
|
-
children: /* @__PURE__ */ u(
|
|
1448
|
+
children: /* @__PURE__ */ u(Re, { asChild: !0, className: "bd-CheckboxIndicator", children: c === "indeterminate" ? /* @__PURE__ */ u(hn, {}) : /* @__PURE__ */ u(We, {}) })
|
|
1393
1449
|
}
|
|
1394
1450
|
);
|
|
1395
1451
|
});
|
|
1396
|
-
|
|
1452
|
+
Nn.displayName = "Checkbox";
|
|
1397
1453
|
const K = {
|
|
1398
|
-
|
|
1399
|
-
...
|
|
1400
|
-
},
|
|
1401
|
-
|
|
1402
|
-
[
|
|
1403
|
-
),
|
|
1454
|
+
...L,
|
|
1455
|
+
...Xe
|
|
1456
|
+
}, Ne = "CheckboxGroup", [wn, st] = T(
|
|
1457
|
+
Ne,
|
|
1458
|
+
[be, Ye]
|
|
1459
|
+
), rt = be(), ct = Ye(), [xn, Sn] = wn(Ne), at = i.forwardRef(
|
|
1404
1460
|
(e, t) => {
|
|
1405
1461
|
const {
|
|
1406
1462
|
__scopeCheckboxGroup: o,
|
|
1407
|
-
name:
|
|
1408
|
-
defaultValue:
|
|
1409
|
-
value:
|
|
1410
|
-
required:
|
|
1411
|
-
disabled:
|
|
1463
|
+
name: s,
|
|
1464
|
+
defaultValue: n,
|
|
1465
|
+
value: r,
|
|
1466
|
+
required: a = !1,
|
|
1467
|
+
disabled: c = !1,
|
|
1412
1468
|
loop: l = !0,
|
|
1413
1469
|
orientation: d,
|
|
1414
|
-
onValueChange:
|
|
1415
|
-
...
|
|
1416
|
-
} = e,
|
|
1417
|
-
prop:
|
|
1418
|
-
defaultProp:
|
|
1419
|
-
onChange:
|
|
1420
|
-
}),
|
|
1421
|
-
(y) =>
|
|
1422
|
-
[
|
|
1423
|
-
),
|
|
1424
|
-
(y) =>
|
|
1425
|
-
[
|
|
1470
|
+
onValueChange: p,
|
|
1471
|
+
...f
|
|
1472
|
+
} = e, b = rt(o), [m = [], v] = A({
|
|
1473
|
+
prop: r,
|
|
1474
|
+
defaultProp: n || [],
|
|
1475
|
+
onChange: p
|
|
1476
|
+
}), g = i.useCallback(
|
|
1477
|
+
(y) => v((C = []) => [...C, y]),
|
|
1478
|
+
[v]
|
|
1479
|
+
), h = i.useCallback(
|
|
1480
|
+
(y) => v((C = []) => C.filter((R) => R !== y)),
|
|
1481
|
+
[v]
|
|
1426
1482
|
);
|
|
1427
1483
|
return /* @__PURE__ */ u(
|
|
1428
|
-
|
|
1484
|
+
xn,
|
|
1429
1485
|
{
|
|
1430
1486
|
scope: o,
|
|
1431
|
-
name:
|
|
1432
|
-
required:
|
|
1433
|
-
disabled:
|
|
1487
|
+
name: s,
|
|
1488
|
+
required: a,
|
|
1489
|
+
disabled: c,
|
|
1434
1490
|
value: m,
|
|
1435
|
-
onItemCheck:
|
|
1436
|
-
onItemUnCheck:
|
|
1437
|
-
children: /* @__PURE__ */ u(
|
|
1438
|
-
|
|
1491
|
+
onItemCheck: g,
|
|
1492
|
+
onItemUnCheck: h,
|
|
1493
|
+
children: /* @__PURE__ */ u(Le, { asChild: !0, ...b, orientation: d, loop: l, children: /* @__PURE__ */ u(
|
|
1494
|
+
S.div,
|
|
1439
1495
|
{
|
|
1440
1496
|
role: "group",
|
|
1441
|
-
"data-disabled":
|
|
1442
|
-
...
|
|
1497
|
+
"data-disabled": c ? "" : void 0,
|
|
1498
|
+
...f,
|
|
1443
1499
|
ref: t
|
|
1444
1500
|
}
|
|
1445
1501
|
) })
|
|
@@ -1447,165 +1503,165 @@ const K = {
|
|
|
1447
1503
|
);
|
|
1448
1504
|
}
|
|
1449
1505
|
);
|
|
1450
|
-
|
|
1451
|
-
const
|
|
1452
|
-
const { __scopeCheckboxGroup: o, disabled:
|
|
1506
|
+
at.displayName = Ne;
|
|
1507
|
+
const it = "CheckboxGroupItem", lt = i.forwardRef((e, t) => {
|
|
1508
|
+
const { __scopeCheckboxGroup: o, disabled: s, ...n } = e, r = Sn(it, o), a = r.disabled || s, c = rt(o), l = ct(o), d = i.useRef(null), p = k(t, d), f = r.value?.includes(n.value);
|
|
1453
1509
|
return /* @__PURE__ */ u(
|
|
1454
|
-
|
|
1510
|
+
ze,
|
|
1455
1511
|
{
|
|
1456
1512
|
asChild: !0,
|
|
1457
|
-
...
|
|
1458
|
-
focusable: !
|
|
1459
|
-
active:
|
|
1513
|
+
...c,
|
|
1514
|
+
focusable: !a,
|
|
1515
|
+
active: f,
|
|
1460
1516
|
children: /* @__PURE__ */ u(
|
|
1461
|
-
|
|
1517
|
+
Qe,
|
|
1462
1518
|
{
|
|
1463
|
-
name:
|
|
1464
|
-
disabled:
|
|
1465
|
-
required:
|
|
1466
|
-
checked:
|
|
1519
|
+
name: r.name,
|
|
1520
|
+
disabled: a,
|
|
1521
|
+
required: r.required,
|
|
1522
|
+
checked: f,
|
|
1467
1523
|
...l,
|
|
1468
|
-
...
|
|
1469
|
-
ref:
|
|
1470
|
-
onCheckedChange: (
|
|
1471
|
-
|
|
1524
|
+
...n,
|
|
1525
|
+
ref: p,
|
|
1526
|
+
onCheckedChange: (b) => {
|
|
1527
|
+
b ? r.onItemCheck(e.value) : r.onItemUnCheck(e.value);
|
|
1472
1528
|
}
|
|
1473
1529
|
}
|
|
1474
1530
|
)
|
|
1475
1531
|
}
|
|
1476
1532
|
);
|
|
1477
1533
|
});
|
|
1478
|
-
|
|
1479
|
-
const
|
|
1480
|
-
const { __scopeCheckboxGroup: o, ...
|
|
1481
|
-
return /* @__PURE__ */ u(
|
|
1534
|
+
lt.displayName = it;
|
|
1535
|
+
const Pn = "CheckboxGroupIndicator", ut = i.forwardRef((e, t) => {
|
|
1536
|
+
const { __scopeCheckboxGroup: o, ...s } = e, n = ct(o);
|
|
1537
|
+
return /* @__PURE__ */ u(Re, { ...n, ...s, ref: t });
|
|
1482
1538
|
});
|
|
1483
|
-
|
|
1484
|
-
const
|
|
1485
|
-
|
|
1486
|
-
]),
|
|
1539
|
+
ut.displayName = Pn;
|
|
1540
|
+
const j = "CheckboxGroup", [kn] = T(j, [
|
|
1541
|
+
st
|
|
1542
|
+
]), dt = st(), [In, pt] = kn(j), ft = i.forwardRef(
|
|
1487
1543
|
(e, t) => {
|
|
1488
1544
|
const {
|
|
1489
1545
|
size: o = K.size.default,
|
|
1490
|
-
variant:
|
|
1491
|
-
...
|
|
1492
|
-
} = e, { __scopeCheckboxGroup:
|
|
1493
|
-
|
|
1546
|
+
variant: s = K.variant.default,
|
|
1547
|
+
...n
|
|
1548
|
+
} = e, { __scopeCheckboxGroup: r, className: a, ...c } = I(
|
|
1549
|
+
n,
|
|
1494
1550
|
K
|
|
1495
|
-
), l =
|
|
1496
|
-
return /* @__PURE__ */ u(
|
|
1497
|
-
|
|
1551
|
+
), l = dt(r);
|
|
1552
|
+
return /* @__PURE__ */ u(In, { scope: r, size: o, variant: s, children: /* @__PURE__ */ u(
|
|
1553
|
+
at,
|
|
1498
1554
|
{
|
|
1499
1555
|
...l,
|
|
1500
|
-
...
|
|
1556
|
+
...c,
|
|
1501
1557
|
ref: t,
|
|
1502
|
-
className: x("bd-CheckboxGroupRoot",
|
|
1558
|
+
className: x("bd-CheckboxGroupRoot", a)
|
|
1503
1559
|
}
|
|
1504
1560
|
) });
|
|
1505
1561
|
}
|
|
1506
1562
|
);
|
|
1507
|
-
|
|
1508
|
-
const
|
|
1563
|
+
ft.displayName = j;
|
|
1564
|
+
const mt = i.forwardRef(
|
|
1509
1565
|
(e, t) => {
|
|
1510
|
-
const { __scopeCheckboxGroup: o, children:
|
|
1511
|
-
return
|
|
1512
|
-
|
|
1566
|
+
const { __scopeCheckboxGroup: o, children: s, className: n, style: r, ...a } = e, { size: c } = pt("CheckboxGroupItem", o);
|
|
1567
|
+
return s ? /* @__PURE__ */ _(
|
|
1568
|
+
ge,
|
|
1513
1569
|
{
|
|
1514
1570
|
as: "label",
|
|
1515
|
-
size:
|
|
1516
|
-
className: x("bd-CheckboxGroupItem",
|
|
1517
|
-
style:
|
|
1571
|
+
size: c,
|
|
1572
|
+
className: x("bd-CheckboxGroupItem", n),
|
|
1573
|
+
style: r,
|
|
1518
1574
|
children: [
|
|
1519
1575
|
/* @__PURE__ */ u(
|
|
1520
|
-
|
|
1576
|
+
de,
|
|
1521
1577
|
{
|
|
1522
1578
|
__scopeCheckboxGroup: o,
|
|
1523
|
-
...
|
|
1579
|
+
...a,
|
|
1524
1580
|
ref: t
|
|
1525
1581
|
}
|
|
1526
1582
|
),
|
|
1527
|
-
|
|
1583
|
+
s && /* @__PURE__ */ u("span", { className: "bd-CheckboxGroupItemInner", children: s })
|
|
1528
1584
|
]
|
|
1529
1585
|
}
|
|
1530
1586
|
) : /* @__PURE__ */ u(
|
|
1531
|
-
|
|
1587
|
+
de,
|
|
1532
1588
|
{
|
|
1533
1589
|
__scopeCheckboxGroup: o,
|
|
1534
|
-
...
|
|
1590
|
+
...a,
|
|
1535
1591
|
ref: t,
|
|
1536
|
-
className:
|
|
1537
|
-
style:
|
|
1592
|
+
className: n,
|
|
1593
|
+
style: r
|
|
1538
1594
|
}
|
|
1539
1595
|
);
|
|
1540
1596
|
}
|
|
1541
1597
|
);
|
|
1542
|
-
|
|
1543
|
-
const
|
|
1544
|
-
const
|
|
1598
|
+
mt.displayName = `${j}.Item`;
|
|
1599
|
+
const de = i.forwardRef(({ __scopeCheckboxGroup: e, ...t }, o) => {
|
|
1600
|
+
const s = pt("CheckboxGroupItemCheckbox", e), n = dt(e), { className: r } = I({ ...t, ...s }, K);
|
|
1545
1601
|
return /* @__PURE__ */ u(
|
|
1546
|
-
|
|
1602
|
+
lt,
|
|
1547
1603
|
{
|
|
1548
|
-
...
|
|
1604
|
+
...n,
|
|
1549
1605
|
...t,
|
|
1550
1606
|
ref: o,
|
|
1551
1607
|
className: x(
|
|
1552
1608
|
"bd-reset",
|
|
1553
1609
|
"bd-CheckboxRoot",
|
|
1554
1610
|
"bd-CheckboxGroupItemCheckbox",
|
|
1555
|
-
|
|
1611
|
+
r
|
|
1556
1612
|
),
|
|
1557
|
-
children: /* @__PURE__ */ u(
|
|
1613
|
+
children: /* @__PURE__ */ u(ut, { ...n, asChild: !0, className: "bd-CheckboxIndicator", children: /* @__PURE__ */ u(We, {}) })
|
|
1558
1614
|
}
|
|
1559
1615
|
);
|
|
1560
1616
|
});
|
|
1561
|
-
|
|
1562
|
-
const
|
|
1563
|
-
Root:
|
|
1564
|
-
Item:
|
|
1565
|
-
},
|
|
1566
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1567
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
1568
|
-
},
|
|
1617
|
+
de.displayName = `${j}.ItemCheckbox`;
|
|
1618
|
+
const Cs = {
|
|
1619
|
+
Root: ft,
|
|
1620
|
+
Item: mt
|
|
1621
|
+
}, En = ["1", "2", "3", "4"], _n = ["classic", "outline"], Tn = {
|
|
1622
|
+
size: { type: "enum", className: "bd-size", values: En, default: "2" },
|
|
1623
|
+
variant: { type: "enum", className: "bd-variant", values: _n, default: "classic" }
|
|
1624
|
+
}, we = "Radio", [An, ht] = T(we), [Bn, On] = An(we), xe = i.forwardRef(
|
|
1569
1625
|
(e, t) => {
|
|
1570
1626
|
const {
|
|
1571
1627
|
__scopeRadio: o,
|
|
1572
|
-
name:
|
|
1573
|
-
checked:
|
|
1574
|
-
required:
|
|
1575
|
-
disabled:
|
|
1576
|
-
value:
|
|
1628
|
+
name: s,
|
|
1629
|
+
checked: n = !1,
|
|
1630
|
+
required: r,
|
|
1631
|
+
disabled: a,
|
|
1632
|
+
value: c = "on",
|
|
1577
1633
|
onCheck: l,
|
|
1578
1634
|
form: d,
|
|
1579
|
-
...
|
|
1580
|
-
} = e, [
|
|
1581
|
-
return /* @__PURE__ */
|
|
1635
|
+
...p
|
|
1636
|
+
} = e, [f, b] = i.useState(null), m = k(t, b), v = i.useRef(!1), g = f ? d || !!f.closest("form") : !0;
|
|
1637
|
+
return /* @__PURE__ */ _(Bn, { scope: o, checked: n, disabled: a, children: [
|
|
1582
1638
|
/* @__PURE__ */ u(
|
|
1583
|
-
|
|
1639
|
+
S.button,
|
|
1584
1640
|
{
|
|
1585
1641
|
type: "button",
|
|
1586
1642
|
role: "radio",
|
|
1587
|
-
"aria-checked":
|
|
1588
|
-
"data-state":
|
|
1589
|
-
"data-disabled":
|
|
1590
|
-
disabled:
|
|
1591
|
-
value:
|
|
1592
|
-
...
|
|
1643
|
+
"aria-checked": n,
|
|
1644
|
+
"data-state": yt(n),
|
|
1645
|
+
"data-disabled": a ? "" : void 0,
|
|
1646
|
+
disabled: a,
|
|
1647
|
+
value: c,
|
|
1648
|
+
...p,
|
|
1593
1649
|
ref: m,
|
|
1594
|
-
onClick:
|
|
1595
|
-
|
|
1650
|
+
onClick: E(e.onClick, (h) => {
|
|
1651
|
+
n || l?.(), g && (v.current = h.isPropagationStopped(), v.current || h.stopPropagation());
|
|
1596
1652
|
})
|
|
1597
1653
|
}
|
|
1598
1654
|
),
|
|
1599
|
-
|
|
1600
|
-
|
|
1655
|
+
g && /* @__PURE__ */ u(
|
|
1656
|
+
vt,
|
|
1601
1657
|
{
|
|
1602
|
-
control:
|
|
1603
|
-
bubbles: !
|
|
1604
|
-
name:
|
|
1605
|
-
value:
|
|
1606
|
-
checked:
|
|
1607
|
-
required:
|
|
1608
|
-
disabled:
|
|
1658
|
+
control: f,
|
|
1659
|
+
bubbles: !v.current,
|
|
1660
|
+
name: s,
|
|
1661
|
+
value: c,
|
|
1662
|
+
checked: n,
|
|
1663
|
+
required: r,
|
|
1664
|
+
disabled: a,
|
|
1609
1665
|
form: d,
|
|
1610
1666
|
style: { transform: "translateX(-100%)" }
|
|
1611
1667
|
}
|
|
@@ -1613,47 +1669,47 @@ const Hs = {
|
|
|
1613
1669
|
] });
|
|
1614
1670
|
}
|
|
1615
1671
|
);
|
|
1616
|
-
|
|
1617
|
-
const
|
|
1672
|
+
xe.displayName = we;
|
|
1673
|
+
const bt = "RadioIndicator", gt = i.forwardRef(
|
|
1618
1674
|
(e, t) => {
|
|
1619
|
-
const { __scopeRadio: o, forceMount:
|
|
1620
|
-
return /* @__PURE__ */ u(
|
|
1621
|
-
|
|
1675
|
+
const { __scopeRadio: o, forceMount: s, ...n } = e, r = On(bt, o);
|
|
1676
|
+
return /* @__PURE__ */ u(Fe, { remain: s || r.checked, children: /* @__PURE__ */ u(
|
|
1677
|
+
S.span,
|
|
1622
1678
|
{
|
|
1623
|
-
"data-state":
|
|
1624
|
-
"data-disabled":
|
|
1625
|
-
...
|
|
1679
|
+
"data-state": yt(r.checked),
|
|
1680
|
+
"data-disabled": r.disabled ? "" : void 0,
|
|
1681
|
+
...n,
|
|
1626
1682
|
ref: t
|
|
1627
1683
|
}
|
|
1628
1684
|
) });
|
|
1629
1685
|
}
|
|
1630
1686
|
);
|
|
1631
|
-
|
|
1632
|
-
const
|
|
1633
|
-
({ control: e, checked: t, bubbles: o = !0, ...
|
|
1634
|
-
const
|
|
1687
|
+
gt.displayName = bt;
|
|
1688
|
+
const Dn = "RadioBubbleInput", vt = i.forwardRef(
|
|
1689
|
+
({ control: e, checked: t, bubbles: o = !0, ...s }, n) => {
|
|
1690
|
+
const r = i.useRef(null), a = k(r, n), c = me(t), l = he(e);
|
|
1635
1691
|
return i.useEffect(() => {
|
|
1636
|
-
const d =
|
|
1692
|
+
const d = r.current;
|
|
1637
1693
|
if (!d) return;
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1694
|
+
const p = window.HTMLInputElement.prototype, b = Object.getOwnPropertyDescriptor(
|
|
1695
|
+
p,
|
|
1640
1696
|
"checked"
|
|
1641
1697
|
).set;
|
|
1642
|
-
if (
|
|
1698
|
+
if (c !== t && b) {
|
|
1643
1699
|
const m = new Event("click", { bubbles: o });
|
|
1644
|
-
|
|
1700
|
+
b.call(d, t), d.dispatchEvent(m);
|
|
1645
1701
|
}
|
|
1646
|
-
}, [
|
|
1647
|
-
|
|
1702
|
+
}, [c, t, o]), /* @__PURE__ */ u(
|
|
1703
|
+
S.input,
|
|
1648
1704
|
{
|
|
1649
1705
|
type: "radio",
|
|
1650
1706
|
"aria-hidden": !0,
|
|
1651
1707
|
defaultChecked: t,
|
|
1652
|
-
...
|
|
1708
|
+
...s,
|
|
1653
1709
|
tabIndex: -1,
|
|
1654
|
-
ref:
|
|
1710
|
+
ref: a,
|
|
1655
1711
|
style: {
|
|
1656
|
-
...
|
|
1712
|
+
...s.style,
|
|
1657
1713
|
...l,
|
|
1658
1714
|
position: "absolute",
|
|
1659
1715
|
pointerEvents: "none",
|
|
@@ -1664,74 +1720,74 @@ const ys = "RadioBubbleInput", ut = i.forwardRef(
|
|
|
1664
1720
|
);
|
|
1665
1721
|
}
|
|
1666
1722
|
);
|
|
1667
|
-
|
|
1668
|
-
function
|
|
1723
|
+
vt.displayName = Dn;
|
|
1724
|
+
function yt(e) {
|
|
1669
1725
|
return e ? "checked" : "unchecked";
|
|
1670
1726
|
}
|
|
1671
|
-
const
|
|
1727
|
+
const Gn = i.forwardRef((e, t) => {
|
|
1672
1728
|
const {
|
|
1673
1729
|
className: o,
|
|
1674
|
-
checked:
|
|
1675
|
-
defaultChecked:
|
|
1676
|
-
onCheck:
|
|
1677
|
-
...
|
|
1678
|
-
} =
|
|
1679
|
-
prop:
|
|
1680
|
-
defaultProp:
|
|
1681
|
-
onChange:
|
|
1730
|
+
checked: s,
|
|
1731
|
+
defaultChecked: n = !1,
|
|
1732
|
+
onCheck: r,
|
|
1733
|
+
...a
|
|
1734
|
+
} = I(e, Tn), [c, l] = A({
|
|
1735
|
+
prop: s,
|
|
1736
|
+
defaultProp: n,
|
|
1737
|
+
onChange: r
|
|
1682
1738
|
});
|
|
1683
1739
|
return /* @__PURE__ */ u(
|
|
1684
|
-
|
|
1740
|
+
xe,
|
|
1685
1741
|
{
|
|
1686
|
-
...
|
|
1687
|
-
defaultChecked:
|
|
1688
|
-
checked:
|
|
1742
|
+
...a,
|
|
1743
|
+
defaultChecked: n,
|
|
1744
|
+
checked: c,
|
|
1689
1745
|
onCheck: () => l((d) => !d),
|
|
1690
1746
|
ref: t,
|
|
1691
1747
|
className: x("bd-reset", "bd-BaseRadioRoot", "bd-RadioRoot", o)
|
|
1692
1748
|
}
|
|
1693
1749
|
);
|
|
1694
1750
|
});
|
|
1695
|
-
|
|
1696
|
-
const
|
|
1697
|
-
|
|
1698
|
-
[
|
|
1699
|
-
),
|
|
1751
|
+
Gn.displayName = "Radio";
|
|
1752
|
+
const Mn = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], te = "RadioGroup", [Fn, Ct] = T(
|
|
1753
|
+
te,
|
|
1754
|
+
[ht]
|
|
1755
|
+
), Rt = be(), Nt = ht(), [$n, Vn] = Fn(te), wt = i.forwardRef(
|
|
1700
1756
|
(e, t) => {
|
|
1701
1757
|
const {
|
|
1702
1758
|
__scopeRadioGroup: o,
|
|
1703
|
-
name:
|
|
1704
|
-
defaultValue:
|
|
1705
|
-
value:
|
|
1706
|
-
required:
|
|
1707
|
-
disabled:
|
|
1759
|
+
name: s,
|
|
1760
|
+
defaultValue: n,
|
|
1761
|
+
value: r,
|
|
1762
|
+
required: a = !1,
|
|
1763
|
+
disabled: c = !1,
|
|
1708
1764
|
orientation: l,
|
|
1709
1765
|
loop: d = !0,
|
|
1710
|
-
onValueChange:
|
|
1711
|
-
...
|
|
1712
|
-
} = e,
|
|
1713
|
-
prop:
|
|
1714
|
-
defaultProp:
|
|
1715
|
-
onChange:
|
|
1716
|
-
caller:
|
|
1766
|
+
onValueChange: p,
|
|
1767
|
+
...f
|
|
1768
|
+
} = e, b = Rt(o), [m, v] = A({
|
|
1769
|
+
prop: r,
|
|
1770
|
+
defaultProp: n ?? null,
|
|
1771
|
+
onChange: p,
|
|
1772
|
+
caller: te
|
|
1717
1773
|
});
|
|
1718
1774
|
return /* @__PURE__ */ u(
|
|
1719
|
-
|
|
1775
|
+
$n,
|
|
1720
1776
|
{
|
|
1721
1777
|
scope: o,
|
|
1722
|
-
name:
|
|
1723
|
-
required:
|
|
1724
|
-
disabled:
|
|
1778
|
+
name: s,
|
|
1779
|
+
required: a,
|
|
1780
|
+
disabled: c,
|
|
1725
1781
|
value: m,
|
|
1726
|
-
onValueChange:
|
|
1727
|
-
children: /* @__PURE__ */ u(
|
|
1728
|
-
|
|
1782
|
+
onValueChange: v,
|
|
1783
|
+
children: /* @__PURE__ */ u(Le, { asChild: !0, ...b, orientation: l, loop: d, children: /* @__PURE__ */ u(
|
|
1784
|
+
S.div,
|
|
1729
1785
|
{
|
|
1730
1786
|
role: "radiogroup",
|
|
1731
|
-
"aria-required":
|
|
1787
|
+
"aria-required": a,
|
|
1732
1788
|
"aria-orientation": l,
|
|
1733
|
-
"data-disabled":
|
|
1734
|
-
...
|
|
1789
|
+
"data-disabled": c ? "" : void 0,
|
|
1790
|
+
...f,
|
|
1735
1791
|
ref: t
|
|
1736
1792
|
}
|
|
1737
1793
|
) })
|
|
@@ -1739,40 +1795,40 @@ const Cs = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], ee = "RadioGroup
|
|
|
1739
1795
|
);
|
|
1740
1796
|
}
|
|
1741
1797
|
);
|
|
1742
|
-
|
|
1743
|
-
const
|
|
1798
|
+
wt.displayName = te;
|
|
1799
|
+
const xt = "RadioGroupItem", St = i.forwardRef(
|
|
1744
1800
|
(e, t) => {
|
|
1745
|
-
const { __scopeRadioGroup: o, disabled:
|
|
1801
|
+
const { __scopeRadioGroup: o, disabled: s, ...n } = e, r = Vn(xt, o), a = r.disabled || s, c = Rt(o), l = Nt(o), d = i.useRef(null), p = k(t, d), f = r.value === n.value, b = i.useRef(!1);
|
|
1746
1802
|
return i.useEffect(() => {
|
|
1747
|
-
const m = (
|
|
1748
|
-
|
|
1749
|
-
},
|
|
1750
|
-
return document.addEventListener("keydown", m), document.addEventListener("keyup",
|
|
1751
|
-
document.removeEventListener("keydown", m), document.removeEventListener("keyup",
|
|
1803
|
+
const m = (g) => {
|
|
1804
|
+
Mn.includes(g.key) && (b.current = !0);
|
|
1805
|
+
}, v = () => b.current = !1;
|
|
1806
|
+
return document.addEventListener("keydown", m), document.addEventListener("keyup", v), () => {
|
|
1807
|
+
document.removeEventListener("keydown", m), document.removeEventListener("keyup", v);
|
|
1752
1808
|
};
|
|
1753
1809
|
}, []), /* @__PURE__ */ u(
|
|
1754
|
-
|
|
1810
|
+
ze,
|
|
1755
1811
|
{
|
|
1756
1812
|
asChild: !0,
|
|
1757
|
-
...
|
|
1758
|
-
focusable: !
|
|
1759
|
-
active:
|
|
1813
|
+
...c,
|
|
1814
|
+
focusable: !a,
|
|
1815
|
+
active: f,
|
|
1760
1816
|
children: /* @__PURE__ */ u(
|
|
1761
|
-
|
|
1817
|
+
xe,
|
|
1762
1818
|
{
|
|
1763
|
-
name:
|
|
1764
|
-
disabled:
|
|
1765
|
-
required:
|
|
1766
|
-
checked:
|
|
1819
|
+
name: r.name,
|
|
1820
|
+
disabled: a,
|
|
1821
|
+
required: r.required,
|
|
1822
|
+
checked: f,
|
|
1767
1823
|
...l,
|
|
1768
|
-
...
|
|
1769
|
-
ref:
|
|
1770
|
-
onCheck: () =>
|
|
1771
|
-
onKeyDown:
|
|
1824
|
+
...n,
|
|
1825
|
+
ref: p,
|
|
1826
|
+
onCheck: () => r.onValueChange(n.value),
|
|
1827
|
+
onKeyDown: E((m) => {
|
|
1772
1828
|
m.key === "Enter" && m.preventDefault();
|
|
1773
1829
|
}),
|
|
1774
|
-
onFocus:
|
|
1775
|
-
|
|
1830
|
+
onFocus: E(n.onFocus, () => {
|
|
1831
|
+
b.current && d.current?.click();
|
|
1776
1832
|
})
|
|
1777
1833
|
}
|
|
1778
1834
|
)
|
|
@@ -1780,187 +1836,445 @@ const ht = "RadioGroupItem", gt = i.forwardRef(
|
|
|
1780
1836
|
);
|
|
1781
1837
|
}
|
|
1782
1838
|
);
|
|
1783
|
-
|
|
1784
|
-
const
|
|
1785
|
-
const { __scopeRadioGroup: o, ...
|
|
1786
|
-
return /* @__PURE__ */ u(
|
|
1839
|
+
St.displayName = xt;
|
|
1840
|
+
const Ln = "RadioGroupBaseIndicator", zn = i.forwardRef((e, t) => {
|
|
1841
|
+
const { __scopeRadioGroup: o, ...s } = e, n = Nt(o);
|
|
1842
|
+
return /* @__PURE__ */ u(gt, { ...n, ...s, ref: t });
|
|
1787
1843
|
});
|
|
1788
|
-
|
|
1789
|
-
const
|
|
1790
|
-
|
|
1791
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1792
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
1793
|
-
...
|
|
1794
|
-
},
|
|
1844
|
+
zn.displayName = Ln;
|
|
1845
|
+
const Un = ["1", "2", "3"], jn = ["classic", "outline"], W = {
|
|
1846
|
+
...L,
|
|
1847
|
+
size: { type: "enum", className: "bd-size", values: Un, default: "2" },
|
|
1848
|
+
variant: { type: "enum", className: "bd-variant", values: jn, default: "classic" },
|
|
1849
|
+
...D
|
|
1850
|
+
}, H = "RadioGroup", [Hn] = T(H, [Ct]), Pt = Ct(), [qn, kt] = Hn(H), It = i.forwardRef(
|
|
1795
1851
|
({
|
|
1796
1852
|
size: e = W.size.default,
|
|
1797
1853
|
variant: t = W.variant.default,
|
|
1798
1854
|
...o
|
|
1799
|
-
},
|
|
1800
|
-
const { __scopeRadioGroup:
|
|
1855
|
+
}, s) => {
|
|
1856
|
+
const { __scopeRadioGroup: n, className: r, ...a } = I(
|
|
1801
1857
|
o,
|
|
1802
1858
|
W
|
|
1803
|
-
),
|
|
1804
|
-
return /* @__PURE__ */ u(
|
|
1805
|
-
|
|
1859
|
+
), c = Pt(n);
|
|
1860
|
+
return /* @__PURE__ */ u(qn, { scope: n, size: e, variant: t, children: /* @__PURE__ */ u(
|
|
1861
|
+
wt,
|
|
1806
1862
|
{
|
|
1807
|
-
...a,
|
|
1808
1863
|
...c,
|
|
1809
|
-
|
|
1810
|
-
|
|
1864
|
+
...a,
|
|
1865
|
+
ref: s,
|
|
1866
|
+
className: x("bd-RadioGroupRoot", r)
|
|
1811
1867
|
}
|
|
1812
1868
|
) });
|
|
1813
1869
|
}
|
|
1814
1870
|
);
|
|
1815
|
-
|
|
1816
|
-
const
|
|
1871
|
+
It.displayName = H;
|
|
1872
|
+
const Et = i.forwardRef(
|
|
1817
1873
|
(e, t) => {
|
|
1818
|
-
const { __scopeRadioGroup: o, children:
|
|
1819
|
-
return
|
|
1820
|
-
|
|
1874
|
+
const { __scopeRadioGroup: o, children: s, className: n, style: r, ...a } = e, { size: c } = kt("RadioGroupItem", o);
|
|
1875
|
+
return s ? /* @__PURE__ */ _(
|
|
1876
|
+
ge,
|
|
1821
1877
|
{
|
|
1822
1878
|
as: "label",
|
|
1823
|
-
size:
|
|
1824
|
-
className: x("bd-RadioGroupItem",
|
|
1825
|
-
style:
|
|
1879
|
+
size: c,
|
|
1880
|
+
className: x("bd-RadioGroupItem", n),
|
|
1881
|
+
style: r,
|
|
1826
1882
|
children: [
|
|
1827
1883
|
/* @__PURE__ */ u(
|
|
1828
|
-
|
|
1884
|
+
pe,
|
|
1829
1885
|
{
|
|
1830
1886
|
__scopeRadioGroup: o,
|
|
1831
|
-
...
|
|
1887
|
+
...a,
|
|
1832
1888
|
ref: t
|
|
1833
1889
|
}
|
|
1834
1890
|
),
|
|
1835
|
-
|
|
1891
|
+
s && /* @__PURE__ */ u("span", { className: "bd-RadioGroupItemInner", children: s })
|
|
1836
1892
|
]
|
|
1837
1893
|
}
|
|
1838
1894
|
) : /* @__PURE__ */ u(
|
|
1839
|
-
|
|
1895
|
+
pe,
|
|
1840
1896
|
{
|
|
1841
1897
|
__scopeRadioGroup: o,
|
|
1842
|
-
...
|
|
1898
|
+
...a,
|
|
1843
1899
|
ref: t,
|
|
1844
|
-
className:
|
|
1845
|
-
style:
|
|
1900
|
+
className: n,
|
|
1901
|
+
style: r
|
|
1846
1902
|
}
|
|
1847
1903
|
);
|
|
1848
1904
|
}
|
|
1849
1905
|
);
|
|
1850
|
-
|
|
1851
|
-
const
|
|
1852
|
-
const
|
|
1906
|
+
Et.displayName = `${H}.Item`;
|
|
1907
|
+
const pe = i.forwardRef(({ __scopeRadioGroup: e, ...t }, o) => {
|
|
1908
|
+
const s = kt("RadioGroupItemRadio", e), n = Pt(e), { className: r } = I({ ...t, ...s }, W);
|
|
1853
1909
|
return /* @__PURE__ */ u(
|
|
1854
|
-
|
|
1910
|
+
St,
|
|
1855
1911
|
{
|
|
1856
|
-
...
|
|
1912
|
+
...n,
|
|
1857
1913
|
...t,
|
|
1858
1914
|
asChild: !1,
|
|
1859
1915
|
ref: o,
|
|
1860
|
-
className: x("bd-reset", "bd-BaseRadioRoot", "bd-RadioRoot",
|
|
1916
|
+
className: x("bd-reset", "bd-BaseRadioRoot", "bd-RadioRoot", r)
|
|
1861
1917
|
}
|
|
1862
1918
|
);
|
|
1863
1919
|
});
|
|
1864
|
-
|
|
1865
|
-
const
|
|
1866
|
-
Root:
|
|
1867
|
-
Item:
|
|
1868
|
-
},
|
|
1920
|
+
pe.displayName = `${H}.ItemRadio`;
|
|
1921
|
+
const Rs = {
|
|
1922
|
+
Root: It,
|
|
1923
|
+
Item: Et
|
|
1924
|
+
}, _t = i.forwardRef(
|
|
1925
|
+
({ children: e, maxHeight: t, className: o, style: s, onScroll: n, onScrollBottom: r, ...a }, c) => /* @__PURE__ */ u(
|
|
1926
|
+
"div",
|
|
1927
|
+
{
|
|
1928
|
+
ref: c,
|
|
1929
|
+
onScroll: (d) => {
|
|
1930
|
+
if (n && n(d), r) {
|
|
1931
|
+
const { scrollTop: p, scrollHeight: f, clientHeight: b } = d.currentTarget;
|
|
1932
|
+
f - p <= b + 10 && r();
|
|
1933
|
+
}
|
|
1934
|
+
},
|
|
1935
|
+
className: `bd-ScrollArea ${o || ""}`,
|
|
1936
|
+
style: { ...s, maxHeight: t },
|
|
1937
|
+
...a,
|
|
1938
|
+
children: e
|
|
1939
|
+
}
|
|
1940
|
+
)
|
|
1941
|
+
);
|
|
1942
|
+
_t.displayName = "ScrollArea";
|
|
1943
|
+
const Kn = ["1", "2", "3", "4", "5"], Wn = ["classic", "underlined", "rounded"], Xn = {
|
|
1944
|
+
size: { type: "enum", className: "bd-size", values: Kn, default: "2" },
|
|
1945
|
+
variant: { type: "enum", className: "bd-variant", values: Wn, default: "classic" },
|
|
1946
|
+
...D
|
|
1947
|
+
}, Yn = {
|
|
1948
|
+
gap: ve.gap,
|
|
1949
|
+
px: $.px,
|
|
1950
|
+
pl: $.pl,
|
|
1951
|
+
pr: $.pr
|
|
1952
|
+
}, Zn = {
|
|
1953
|
+
...Xn,
|
|
1954
|
+
...Yn
|
|
1955
|
+
}, Jn = ({
|
|
1956
|
+
children: e,
|
|
1957
|
+
container: t = globalThis?.document?.body
|
|
1958
|
+
}) => typeof window > "u" || !t ? null : qt(
|
|
1959
|
+
/* @__PURE__ */ u("div", { className: "bd-theme bd-reset", style: { display: "contents" }, children: e }),
|
|
1960
|
+
t
|
|
1961
|
+
), Qn = i.forwardRef((e, t) => {
|
|
1962
|
+
const { color: o = "currentColor", ...s } = e;
|
|
1963
|
+
return /* @__PURE__ */ u(
|
|
1964
|
+
"svg",
|
|
1965
|
+
{
|
|
1966
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1967
|
+
viewBox: "4 2 16 16",
|
|
1968
|
+
fill: "none",
|
|
1969
|
+
...s,
|
|
1970
|
+
ref: t,
|
|
1971
|
+
children: /* @__PURE__ */ u(
|
|
1972
|
+
"path",
|
|
1973
|
+
{
|
|
1974
|
+
d: "M15 8.82962C15.0003 8.93634 14.9768 9.0418 14.931 9.13823C14.8853 9.23466 14.8186 9.31962 14.7357 9.38686L10.4504 12.8375C10.3226 12.9426 10.1623 13 9.99685 13C9.83142 13 9.67112 12.9426 9.54332 12.8375L5.25801 9.26541C5.11216 9.14414 5.02043 8.96989 5.00302 8.78098C4.98561 8.59207 5.04393 8.40398 5.16516 8.25808C5.2864 8.11219 5.4606 8.02044 5.64946 8.00302C5.83832 7.98561 6.02636 8.04395 6.17221 8.16521L10.0004 11.3586L13.8286 8.27237C13.9335 8.18501 14.0611 8.12952 14.1965 8.11246C14.3319 8.0954 14.4693 8.11749 14.5925 8.17611C14.7158 8.23473 14.8196 8.32743 14.8918 8.44325C14.964 8.55906 15.0015 8.69314 15 8.82962Z",
|
|
1975
|
+
fill: o
|
|
1976
|
+
}
|
|
1977
|
+
)
|
|
1978
|
+
}
|
|
1979
|
+
);
|
|
1980
|
+
}), Z = "SelectBox", [es] = T(Z), [ts, oe] = es(Z), Tt = ({
|
|
1981
|
+
__scopeSelect: e,
|
|
1982
|
+
value: t,
|
|
1983
|
+
defaultValue: o,
|
|
1984
|
+
onValueChange: s,
|
|
1985
|
+
open: n,
|
|
1986
|
+
defaultOpen: r,
|
|
1987
|
+
onOpenChange: a,
|
|
1988
|
+
variant: c = "classic",
|
|
1989
|
+
children: l
|
|
1990
|
+
}) => {
|
|
1991
|
+
const [d, p] = A({
|
|
1992
|
+
prop: t,
|
|
1993
|
+
defaultProp: o ?? "",
|
|
1994
|
+
onChange: s,
|
|
1995
|
+
caller: Z
|
|
1996
|
+
}), [f, b] = A({
|
|
1997
|
+
prop: n,
|
|
1998
|
+
defaultProp: r ?? !1,
|
|
1999
|
+
onChange: a,
|
|
2000
|
+
caller: `${Z}.Open`
|
|
2001
|
+
}), m = i.useRef(null), v = Me();
|
|
2002
|
+
return /* @__PURE__ */ u(
|
|
2003
|
+
ts,
|
|
2004
|
+
{
|
|
2005
|
+
scope: e,
|
|
2006
|
+
value: d,
|
|
2007
|
+
onValueChange: p,
|
|
2008
|
+
open: f,
|
|
2009
|
+
onOpenChange: b,
|
|
2010
|
+
triggerRef: m,
|
|
2011
|
+
contentId: v,
|
|
2012
|
+
variant: c,
|
|
2013
|
+
children: l
|
|
2014
|
+
}
|
|
2015
|
+
);
|
|
2016
|
+
}, At = "SelectBoxTrigger", Se = i.forwardRef(
|
|
2017
|
+
(e, t) => {
|
|
2018
|
+
const { __scopeSelect: o, children: s, onClick: n, onKeyDown: r, ...a } = e, c = oe(At, o), l = k(t, c.triggerRef), { className: d, style: p, ...f } = I(a, Zn), b = !c.value || c.value === "";
|
|
2019
|
+
return /* @__PURE__ */ u(
|
|
2020
|
+
S.button,
|
|
2021
|
+
{
|
|
2022
|
+
type: "button",
|
|
2023
|
+
role: "combobox",
|
|
2024
|
+
"aria-expanded": c.open,
|
|
2025
|
+
"data-placeholder": b ? "" : void 0,
|
|
2026
|
+
className: `bd-SelectBoxTrigger ${d || ""}`,
|
|
2027
|
+
style: p,
|
|
2028
|
+
...f,
|
|
2029
|
+
ref: l,
|
|
2030
|
+
onClick: (m) => {
|
|
2031
|
+
c.onOpenChange(!c.open), n?.(m);
|
|
2032
|
+
},
|
|
2033
|
+
onKeyDown: (m) => {
|
|
2034
|
+
!c.open && (m.key === "ArrowDown" || m.key === "Enter" || m.key === " ") && (m.preventDefault(), c.onOpenChange(!0)), r?.(m);
|
|
2035
|
+
},
|
|
2036
|
+
children: s
|
|
2037
|
+
}
|
|
2038
|
+
);
|
|
2039
|
+
}
|
|
2040
|
+
);
|
|
2041
|
+
Se.displayName = At;
|
|
2042
|
+
const Bt = "SelectBoxContent", Pe = i.forwardRef(({ __scopeSelect: e, children: t, className: o, style: s, onKeyDown: n, ...r }, a) => {
|
|
2043
|
+
const c = oe(Bt, e), l = i.useRef(null), d = k(a, l);
|
|
2044
|
+
uo(l, (g) => {
|
|
2045
|
+
c.triggerRef.current?.contains(g.target) || c.open && c.onOpenChange(!1);
|
|
2046
|
+
});
|
|
2047
|
+
const p = c.variant === "rounded" ? 8 : 0, { styles: f, isPositioned: b } = lo(
|
|
2048
|
+
c.triggerRef,
|
|
2049
|
+
l,
|
|
2050
|
+
c.open,
|
|
2051
|
+
p
|
|
2052
|
+
);
|
|
2053
|
+
i.useEffect(() => {
|
|
2054
|
+
c.open && l.current && requestAnimationFrame(() => {
|
|
2055
|
+
if (!l.current) return;
|
|
2056
|
+
const g = Array.from(
|
|
2057
|
+
l.current.querySelectorAll('[role="option"]')
|
|
2058
|
+
), h = g.find((y) => y.getAttribute("aria-selected") === "true");
|
|
2059
|
+
h ? h.focus() : g.length > 0 && g[0].focus();
|
|
2060
|
+
});
|
|
2061
|
+
}, [c.open]);
|
|
2062
|
+
const m = (g) => {
|
|
2063
|
+
const h = Array.from(
|
|
2064
|
+
l.current?.querySelectorAll('[role="option"]') || []
|
|
2065
|
+
), y = h.indexOf(document.activeElement);
|
|
2066
|
+
switch (g.key) {
|
|
2067
|
+
case "ArrowDown": {
|
|
2068
|
+
g.preventDefault();
|
|
2069
|
+
const C = y < h.length - 1 ? y + 1 : 0;
|
|
2070
|
+
h[C]?.focus();
|
|
2071
|
+
break;
|
|
2072
|
+
}
|
|
2073
|
+
case "ArrowUp": {
|
|
2074
|
+
g.preventDefault();
|
|
2075
|
+
const C = y > 0 ? y - 1 : h.length - 1;
|
|
2076
|
+
h[C]?.focus();
|
|
2077
|
+
break;
|
|
2078
|
+
}
|
|
2079
|
+
case "Enter":
|
|
2080
|
+
case " ":
|
|
2081
|
+
g.preventDefault(), document.activeElement?.click();
|
|
2082
|
+
break;
|
|
2083
|
+
case "Escape":
|
|
2084
|
+
g.preventDefault(), c.onOpenChange(!1), c.triggerRef.current?.focus();
|
|
2085
|
+
break;
|
|
2086
|
+
case "Tab":
|
|
2087
|
+
c.onOpenChange(!1);
|
|
2088
|
+
break;
|
|
2089
|
+
}
|
|
2090
|
+
n?.(g);
|
|
2091
|
+
};
|
|
2092
|
+
if (!c.open) return null;
|
|
2093
|
+
const v = /* @__PURE__ */ u(
|
|
2094
|
+
S.div,
|
|
2095
|
+
{
|
|
2096
|
+
id: c.contentId,
|
|
2097
|
+
role: "listbox",
|
|
2098
|
+
tabIndex: -1,
|
|
2099
|
+
onKeyDown: m,
|
|
2100
|
+
className: `bd-SelectBoxContent bd-variant-${c.variant} ${o || ""}`,
|
|
2101
|
+
...r,
|
|
2102
|
+
ref: d,
|
|
2103
|
+
style: {
|
|
2104
|
+
...f,
|
|
2105
|
+
...s,
|
|
2106
|
+
transition: b ? "opacity 0.2s ease, transform 0.2s ease" : "none",
|
|
2107
|
+
overflow: "hidden"
|
|
2108
|
+
},
|
|
2109
|
+
children: t
|
|
2110
|
+
}
|
|
2111
|
+
);
|
|
2112
|
+
return /* @__PURE__ */ u(Jn, { children: v });
|
|
2113
|
+
});
|
|
2114
|
+
Pe.displayName = Bt;
|
|
2115
|
+
const Ot = "SelectBoxItem", ke = i.forwardRef(
|
|
2116
|
+
({ __scopeSelect: e, value: t, onClick: o, className: s, children: n, ...r }, a) => {
|
|
2117
|
+
const c = oe(Ot, e), l = c.value === t;
|
|
2118
|
+
return /* @__PURE__ */ u(
|
|
2119
|
+
S.div,
|
|
2120
|
+
{
|
|
2121
|
+
role: "option",
|
|
2122
|
+
tabIndex: -1,
|
|
2123
|
+
"aria-selected": l,
|
|
2124
|
+
"data-state": l ? "checked" : "unchecked",
|
|
2125
|
+
className: `bd-SelectBoxItem bd-variant-${c.variant} ${s || ""}`,
|
|
2126
|
+
...r,
|
|
2127
|
+
ref: a,
|
|
2128
|
+
onClick: (d) => {
|
|
2129
|
+
const p = typeof n == "string" ? n : t;
|
|
2130
|
+
c.onValueChange(p), c.onOpenChange(!1), c.triggerRef.current?.focus(), o?.(d);
|
|
2131
|
+
},
|
|
2132
|
+
children: n
|
|
2133
|
+
}
|
|
2134
|
+
);
|
|
2135
|
+
}
|
|
2136
|
+
);
|
|
2137
|
+
ke.displayName = Ot;
|
|
2138
|
+
const Dt = "SelectBoxValue", Ie = i.forwardRef(
|
|
2139
|
+
({ __scopeSelect: e, className: t, children: o, placeholder: s, ...n }, r) => {
|
|
2140
|
+
const a = oe(Dt, e), c = a.value ? a.value : o || s;
|
|
2141
|
+
return /* @__PURE__ */ u(S.span, { className: `bd-SelectBoxValue ${t || ""}`, ...n, ref: r, children: c });
|
|
2142
|
+
}
|
|
2143
|
+
);
|
|
2144
|
+
Ie.displayName = Dt;
|
|
2145
|
+
const os = "SelectBoxSlot", Ee = i.forwardRef(
|
|
2146
|
+
({ __scopeSelect: e, className: t, side: o = "right", "data-chevron": s, children: n, ...r }, a) => /* @__PURE__ */ u(
|
|
2147
|
+
S.div,
|
|
2148
|
+
{
|
|
2149
|
+
"aria-hidden": "true",
|
|
2150
|
+
"data-side": o,
|
|
2151
|
+
"data-chevron": s ? "true" : void 0,
|
|
2152
|
+
className: `bd-SelectBoxSlot ${t || ""}`,
|
|
2153
|
+
...r,
|
|
2154
|
+
ref: a,
|
|
2155
|
+
children: n || /* @__PURE__ */ u(Qn, {})
|
|
2156
|
+
}
|
|
2157
|
+
)
|
|
2158
|
+
);
|
|
2159
|
+
Ee.displayName = os;
|
|
2160
|
+
const ns = ({
|
|
2161
|
+
options: e,
|
|
2162
|
+
placeholder: t = "선택하세요",
|
|
2163
|
+
size: o = "2",
|
|
2164
|
+
variant: s = "classic",
|
|
2165
|
+
disabled: n = !1,
|
|
2166
|
+
maxHeight: r,
|
|
2167
|
+
onScrollBottom: a,
|
|
2168
|
+
...c
|
|
2169
|
+
}) => /* @__PURE__ */ _(Tt, { ...c, variant: s, children: [
|
|
2170
|
+
/* @__PURE__ */ _(Se, { size: o, variant: s, disabled: n, children: [
|
|
2171
|
+
/* @__PURE__ */ u(Ie, { placeholder: t }),
|
|
2172
|
+
/* @__PURE__ */ u(Ee, { "data-chevron": !0 })
|
|
2173
|
+
] }),
|
|
2174
|
+
/* @__PURE__ */ u(Pe, { children: /* @__PURE__ */ u(_t, { maxHeight: r, onScrollBottom: a, children: e.map((l) => /* @__PURE__ */ u(ke, { value: l.value, children: l.label }, l.value)) }) })
|
|
2175
|
+
] }), Ns = Object.assign(ns, {
|
|
2176
|
+
Root: Tt,
|
|
2177
|
+
Trigger: Se,
|
|
2178
|
+
Content: Pe,
|
|
2179
|
+
Item: ke,
|
|
2180
|
+
Value: Ie,
|
|
2181
|
+
Slot: Ee
|
|
2182
|
+
}), ne = "Switch", [ss] = T(ne), [rs, cs] = ss(ne), Gt = i.forwardRef(
|
|
1869
2183
|
(e, t) => {
|
|
1870
2184
|
const {
|
|
1871
2185
|
__scopeSwitch: o,
|
|
1872
|
-
name:
|
|
1873
|
-
checked:
|
|
1874
|
-
defaultChecked:
|
|
1875
|
-
required:
|
|
1876
|
-
disabled:
|
|
2186
|
+
name: s,
|
|
2187
|
+
checked: n,
|
|
2188
|
+
defaultChecked: r,
|
|
2189
|
+
required: a,
|
|
2190
|
+
disabled: c,
|
|
1877
2191
|
value: l = "on",
|
|
1878
2192
|
onCheckedChange: d,
|
|
1879
|
-
form:
|
|
1880
|
-
...
|
|
1881
|
-
} = e, [
|
|
1882
|
-
prop:
|
|
1883
|
-
defaultProp:
|
|
2193
|
+
form: p,
|
|
2194
|
+
...f
|
|
2195
|
+
} = e, [b, m] = i.useState(null), v = k(t, (R) => m(R)), g = i.useRef(!1), h = b ? p || !!b.closest("form") : !0, [y, C] = A({
|
|
2196
|
+
prop: n,
|
|
2197
|
+
defaultProp: r ?? !1,
|
|
1884
2198
|
onChange: d,
|
|
1885
|
-
caller:
|
|
2199
|
+
caller: ne
|
|
1886
2200
|
});
|
|
1887
|
-
return /* @__PURE__ */
|
|
2201
|
+
return /* @__PURE__ */ _(rs, { scope: o, checked: y, disabled: c, children: [
|
|
1888
2202
|
/* @__PURE__ */ u(
|
|
1889
|
-
|
|
2203
|
+
S.button,
|
|
1890
2204
|
{
|
|
1891
2205
|
type: "button",
|
|
1892
2206
|
role: "switch",
|
|
1893
2207
|
"aria-checked": y,
|
|
1894
|
-
"aria-required":
|
|
1895
|
-
"data-state":
|
|
1896
|
-
"data-disabled":
|
|
1897
|
-
disabled:
|
|
2208
|
+
"aria-required": a,
|
|
2209
|
+
"data-state": Vt(y),
|
|
2210
|
+
"data-disabled": c ? "" : void 0,
|
|
2211
|
+
disabled: c,
|
|
1898
2212
|
value: l,
|
|
1899
|
-
...
|
|
1900
|
-
ref:
|
|
1901
|
-
onClick:
|
|
1902
|
-
|
|
2213
|
+
...f,
|
|
2214
|
+
ref: v,
|
|
2215
|
+
onClick: E(e.onClick, (R) => {
|
|
2216
|
+
C((N) => !N), h && (g.current = R.isPropagationStopped(), g.current || R.stopPropagation());
|
|
1903
2217
|
})
|
|
1904
2218
|
}
|
|
1905
2219
|
),
|
|
1906
|
-
|
|
1907
|
-
|
|
2220
|
+
h && /* @__PURE__ */ u(
|
|
2221
|
+
$t,
|
|
1908
2222
|
{
|
|
1909
|
-
control:
|
|
1910
|
-
bubbles: !
|
|
1911
|
-
name:
|
|
2223
|
+
control: b,
|
|
2224
|
+
bubbles: !g.current,
|
|
2225
|
+
name: s,
|
|
1912
2226
|
value: l,
|
|
1913
2227
|
checked: y,
|
|
1914
|
-
required:
|
|
1915
|
-
disabled:
|
|
1916
|
-
form:
|
|
2228
|
+
required: a,
|
|
2229
|
+
disabled: c,
|
|
2230
|
+
form: p,
|
|
1917
2231
|
style: { transform: "translateX(-100%)" }
|
|
1918
2232
|
}
|
|
1919
2233
|
)
|
|
1920
2234
|
] });
|
|
1921
2235
|
}
|
|
1922
2236
|
);
|
|
1923
|
-
|
|
1924
|
-
const
|
|
2237
|
+
Gt.displayName = ne;
|
|
2238
|
+
const Mt = "SwitchThumb", Ft = i.forwardRef(
|
|
1925
2239
|
(e, t) => {
|
|
1926
|
-
const { __scopeSwitch: o, ...
|
|
2240
|
+
const { __scopeSwitch: o, ...s } = e, n = cs(Mt, o);
|
|
1927
2241
|
return /* @__PURE__ */ u(
|
|
1928
|
-
|
|
2242
|
+
S.span,
|
|
1929
2243
|
{
|
|
1930
|
-
"data-state":
|
|
1931
|
-
"data-disabled":
|
|
1932
|
-
...
|
|
2244
|
+
"data-state": Vt(n.checked),
|
|
2245
|
+
"data-disabled": n.disabled ? "" : void 0,
|
|
2246
|
+
...s,
|
|
1933
2247
|
ref: t
|
|
1934
2248
|
}
|
|
1935
2249
|
);
|
|
1936
2250
|
}
|
|
1937
2251
|
);
|
|
1938
|
-
|
|
1939
|
-
const
|
|
2252
|
+
Ft.displayName = Mt;
|
|
2253
|
+
const as = "SwitchBubbleInput", $t = i.forwardRef(
|
|
1940
2254
|
(e, t) => {
|
|
1941
|
-
const { checked: o, control:
|
|
2255
|
+
const { checked: o, control: s, bubbles: n = !0, ...r } = e, a = i.useRef(null), c = k(a, t), l = me(o), d = he(s);
|
|
1942
2256
|
return i.useEffect(() => {
|
|
1943
|
-
const
|
|
1944
|
-
if (!
|
|
1945
|
-
const
|
|
1946
|
-
|
|
2257
|
+
const p = a.current;
|
|
2258
|
+
if (!p) return;
|
|
2259
|
+
const f = window.HTMLInputElement.prototype, m = Object.getOwnPropertyDescriptor(
|
|
2260
|
+
f,
|
|
1947
2261
|
"checked"
|
|
1948
2262
|
).set;
|
|
1949
2263
|
if (l !== o && m) {
|
|
1950
|
-
const
|
|
1951
|
-
m.call(
|
|
2264
|
+
const v = new Event("click", { bubbles: n });
|
|
2265
|
+
m.call(p, o), p.dispatchEvent(v);
|
|
1952
2266
|
}
|
|
1953
|
-
}, [l, o,
|
|
2267
|
+
}, [l, o, n]), /* @__PURE__ */ u(
|
|
1954
2268
|
"input",
|
|
1955
2269
|
{
|
|
1956
2270
|
type: "checkbox",
|
|
1957
2271
|
"aria-hidden": !0,
|
|
1958
2272
|
defaultChecked: o,
|
|
1959
|
-
...
|
|
2273
|
+
...r,
|
|
1960
2274
|
tabIndex: -1,
|
|
1961
|
-
ref:
|
|
2275
|
+
ref: c,
|
|
1962
2276
|
style: {
|
|
1963
|
-
...
|
|
2277
|
+
...r.style,
|
|
1964
2278
|
...d,
|
|
1965
2279
|
position: "absolute",
|
|
1966
2280
|
pointerEvents: "none",
|
|
@@ -1971,61 +2285,61 @@ const As = "SwitchBubbleInput", Pt = i.forwardRef(
|
|
|
1971
2285
|
);
|
|
1972
2286
|
}
|
|
1973
2287
|
);
|
|
1974
|
-
|
|
1975
|
-
function
|
|
2288
|
+
$t.displayName = as;
|
|
2289
|
+
function Vt(e) {
|
|
1976
2290
|
return e ? "checked" : "unchecked";
|
|
1977
2291
|
}
|
|
1978
|
-
const
|
|
1979
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1980
|
-
...
|
|
1981
|
-
},
|
|
1982
|
-
const { className: o, ...
|
|
2292
|
+
const is = ["1", "2", "3"], ls = {
|
|
2293
|
+
size: { type: "enum", className: "bd-size", values: is, default: "2" },
|
|
2294
|
+
...D
|
|
2295
|
+
}, us = i.forwardRef((e, t) => {
|
|
2296
|
+
const { className: o, ...s } = I(e, ls);
|
|
1983
2297
|
return /* @__PURE__ */ u(
|
|
1984
|
-
|
|
2298
|
+
Gt,
|
|
1985
2299
|
{
|
|
1986
|
-
...
|
|
2300
|
+
...s,
|
|
1987
2301
|
asChild: !1,
|
|
1988
2302
|
ref: t,
|
|
1989
2303
|
className: x("bd-reset", "bd-SwitchRoot", o),
|
|
1990
|
-
children: /* @__PURE__ */ u(
|
|
2304
|
+
children: /* @__PURE__ */ u(Ft, { className: x("bd-SwitchThumb") })
|
|
1991
2305
|
}
|
|
1992
2306
|
);
|
|
1993
2307
|
});
|
|
1994
|
-
|
|
1995
|
-
const
|
|
1996
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1997
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
1998
|
-
...
|
|
1999
|
-
...
|
|
2000
|
-
},
|
|
2001
|
-
side: { type: "enum", values:
|
|
2002
|
-
gap:
|
|
2003
|
-
px:
|
|
2004
|
-
pl:
|
|
2005
|
-
pr:
|
|
2006
|
-
},
|
|
2308
|
+
us.displayName = "Switch";
|
|
2309
|
+
const ds = ["1", "2", "3", "4", "5"], ps = ["classic", "underlined", "rounded"], fs = {
|
|
2310
|
+
size: { type: "enum", className: "bd-size", values: ds, default: "2" },
|
|
2311
|
+
variant: { type: "enum", className: "bd-variant", values: ps, default: "classic" },
|
|
2312
|
+
...D,
|
|
2313
|
+
...Bo
|
|
2314
|
+
}, ms = ["left", "right"], hs = {
|
|
2315
|
+
side: { type: "enum", values: ms },
|
|
2316
|
+
gap: ve.gap,
|
|
2317
|
+
px: $.px,
|
|
2318
|
+
pl: $.pl,
|
|
2319
|
+
pr: $.pr
|
|
2320
|
+
}, Lt = i.forwardRef(
|
|
2007
2321
|
(e, t) => {
|
|
2008
|
-
const o = i.useRef(null), { children:
|
|
2322
|
+
const o = i.useRef(null), { children: s, className: n, style: r, ...a } = I(
|
|
2009
2323
|
e,
|
|
2010
|
-
|
|
2324
|
+
fs
|
|
2011
2325
|
);
|
|
2012
|
-
return /* @__PURE__ */
|
|
2326
|
+
return /* @__PURE__ */ _(
|
|
2013
2327
|
"div",
|
|
2014
2328
|
{
|
|
2015
|
-
style:
|
|
2016
|
-
className: x("bd-TextFieldRoot",
|
|
2017
|
-
onPointerDown: (
|
|
2018
|
-
const l =
|
|
2329
|
+
style: r,
|
|
2330
|
+
className: x("bd-TextFieldRoot", n),
|
|
2331
|
+
onPointerDown: (c) => {
|
|
2332
|
+
const l = c.target;
|
|
2019
2333
|
if (l.closest("input, button, a")) return;
|
|
2020
2334
|
const d = o.current;
|
|
2021
2335
|
if (!d) return;
|
|
2022
|
-
const
|
|
2336
|
+
const f = l.closest(`
|
|
2023
2337
|
.bd-TextFieldSlot[data-side='right'],
|
|
2024
2338
|
.bd-TextFieldSlot:not([data-side='right']) ~ .bd-TextFieldSlot:not([data-side='left'])
|
|
2025
2339
|
`) ? d.value.length : 0;
|
|
2026
2340
|
requestAnimationFrame(() => {
|
|
2027
2341
|
try {
|
|
2028
|
-
d.setSelectionRange(
|
|
2342
|
+
d.setSelectionRange(f, f);
|
|
2029
2343
|
} catch {
|
|
2030
2344
|
}
|
|
2031
2345
|
d.focus();
|
|
@@ -2036,45 +2350,47 @@ const Ds = ["1", "2", "3", "4", "5"], Ms = ["classic", "underlined", "rounded"],
|
|
|
2036
2350
|
"input",
|
|
2037
2351
|
{
|
|
2038
2352
|
spellCheck: "false",
|
|
2039
|
-
...
|
|
2040
|
-
ref:
|
|
2353
|
+
...a,
|
|
2354
|
+
ref: fe(o, t),
|
|
2041
2355
|
className: "bd-reset bd-TextFieldInput"
|
|
2042
2356
|
}
|
|
2043
2357
|
),
|
|
2044
|
-
|
|
2358
|
+
s
|
|
2045
2359
|
]
|
|
2046
2360
|
}
|
|
2047
2361
|
);
|
|
2048
2362
|
}
|
|
2049
2363
|
);
|
|
2050
|
-
|
|
2051
|
-
const
|
|
2364
|
+
Lt.displayName = "TextFieldRoot";
|
|
2365
|
+
const zt = i.forwardRef(
|
|
2052
2366
|
(e, t) => {
|
|
2053
|
-
const { className: o, side:
|
|
2367
|
+
const { className: o, side: s, ...n } = I(e, hs);
|
|
2054
2368
|
return /* @__PURE__ */ u(
|
|
2055
2369
|
"div",
|
|
2056
2370
|
{
|
|
2057
|
-
"data-side":
|
|
2058
|
-
...
|
|
2371
|
+
"data-side": s,
|
|
2372
|
+
...n,
|
|
2059
2373
|
ref: t,
|
|
2060
2374
|
className: x("bd-TextFieldSlot", o)
|
|
2061
2375
|
}
|
|
2062
2376
|
);
|
|
2063
2377
|
}
|
|
2064
2378
|
);
|
|
2065
|
-
|
|
2066
|
-
const
|
|
2379
|
+
zt.displayName = "TextFieldSlot";
|
|
2380
|
+
const ws = Object.assign(Lt, { Slot: zt });
|
|
2067
2381
|
export {
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2382
|
+
mn as Button,
|
|
2383
|
+
We as CheckLineIcon,
|
|
2384
|
+
Nn as Checkbox,
|
|
2385
|
+
Cs as CheckboxGroup,
|
|
2072
2386
|
Y as Flex,
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2387
|
+
hn as IndeterminateLineIcon,
|
|
2388
|
+
Gn as Radio,
|
|
2389
|
+
Rs as RadioGroup,
|
|
2390
|
+
_t as ScrollArea,
|
|
2391
|
+
Ns as SelectBox,
|
|
2392
|
+
Ke as Spinner,
|
|
2393
|
+
us as Switch,
|
|
2394
|
+
ge as Text,
|
|
2395
|
+
ws as TextField
|
|
2080
2396
|
};
|