@beaubrain/web-design-system 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as l, jsxs as S, Fragment as
|
|
1
|
+
import { jsx as l, jsxs as S, Fragment as $e } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import
|
|
3
|
+
import I from "react";
|
|
4
4
|
import { createPortal as nn } from "react-dom";
|
|
5
5
|
function on(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -11,19 +11,19 @@ var ie = { exports: {} };
|
|
|
11
11
|
Licensed under the MIT License (MIT), see
|
|
12
12
|
http://jedwatson.github.io/classnames
|
|
13
13
|
*/
|
|
14
|
-
var
|
|
14
|
+
var Fe;
|
|
15
15
|
function sn() {
|
|
16
|
-
return
|
|
16
|
+
return Fe || (Fe = 1, (function(e) {
|
|
17
17
|
(function() {
|
|
18
18
|
var t = {}.hasOwnProperty;
|
|
19
19
|
function n() {
|
|
20
20
|
for (var r = "", c = 0; c < arguments.length; c++) {
|
|
21
21
|
var a = arguments[c];
|
|
22
|
-
a && (r =
|
|
22
|
+
a && (r = o(r, s(a)));
|
|
23
23
|
}
|
|
24
24
|
return r;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function s(r) {
|
|
27
27
|
if (typeof r == "string" || typeof r == "number")
|
|
28
28
|
return r;
|
|
29
29
|
if (typeof r != "object")
|
|
@@ -34,10 +34,10 @@ function sn() {
|
|
|
34
34
|
return r.toString();
|
|
35
35
|
var c = "";
|
|
36
36
|
for (var a in r)
|
|
37
|
-
t.call(r, a) && r[a] && (c =
|
|
37
|
+
t.call(r, a) && r[a] && (c = o(c, a));
|
|
38
38
|
return c;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function o(r, c) {
|
|
41
41
|
return c ? r ? r + " " + c : r + c : r;
|
|
42
42
|
}
|
|
43
43
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
@@ -47,64 +47,64 @@ function sn() {
|
|
|
47
47
|
var rn = sn();
|
|
48
48
|
const N = /* @__PURE__ */ on(rn), an = (e, t) => {
|
|
49
49
|
const n = { ...t };
|
|
50
|
-
for (const
|
|
51
|
-
const
|
|
52
|
-
/^on[A-Z]/.test(
|
|
50
|
+
for (const s in t) {
|
|
51
|
+
const o = e[s], r = t[s];
|
|
52
|
+
/^on[A-Z]/.test(s) ? o && r ? n[s] = (...a) => {
|
|
53
53
|
const u = r(...a);
|
|
54
|
-
return
|
|
55
|
-
} :
|
|
54
|
+
return o(...a), u;
|
|
55
|
+
} : o && (n[s] = o) : s === "style" ? n[s] = { ...o, ...r } : s === "className" && (n[s] = [o, r].filter(Boolean).join(" "));
|
|
56
56
|
}
|
|
57
57
|
return { ...e, ...n };
|
|
58
|
-
},
|
|
58
|
+
}, Ge = (e, t) => {
|
|
59
59
|
if (typeof e == "function")
|
|
60
60
|
return e(t);
|
|
61
61
|
e != null && (e.current = t);
|
|
62
62
|
}, q = (...e) => (t) => {
|
|
63
63
|
let n = !1;
|
|
64
|
-
const
|
|
65
|
-
const r =
|
|
66
|
-
return !n && typeof r == "function" && (n = !0), { ref:
|
|
64
|
+
const s = e.map((o) => {
|
|
65
|
+
const r = Ge(o, t);
|
|
66
|
+
return !n && typeof r == "function" && (n = !0), { ref: o, cleanup: r };
|
|
67
67
|
});
|
|
68
68
|
if (n)
|
|
69
69
|
return () => {
|
|
70
|
-
for (const { ref:
|
|
71
|
-
typeof r == "function" ? r() :
|
|
70
|
+
for (const { ref: o, cleanup: r } of s)
|
|
71
|
+
typeof r == "function" ? r() : Ge(o, null);
|
|
72
72
|
};
|
|
73
73
|
}, be = (e) => {
|
|
74
74
|
const t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get;
|
|
75
75
|
return t && "isReactWarning" in t && t.isReactWarning ? e.ref : e.props.ref || e.ref;
|
|
76
76
|
};
|
|
77
|
-
function
|
|
78
|
-
return
|
|
77
|
+
function D(...e) {
|
|
78
|
+
return I.useCallback(q(...e), e);
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const Ve = (...e) => {
|
|
81
81
|
let t = {};
|
|
82
82
|
for (const n of e)
|
|
83
83
|
n && (t = { ...t, ...n });
|
|
84
84
|
return Object.keys(t).length ? t : void 0;
|
|
85
85
|
}, cn = ({ className: e, customProperties: t, ...n }) => {
|
|
86
|
-
const
|
|
86
|
+
const s = Le({
|
|
87
87
|
allowCustomValues: !0,
|
|
88
88
|
className: e,
|
|
89
89
|
...n
|
|
90
|
-
}),
|
|
90
|
+
}), o = un({
|
|
91
91
|
customProperties: t,
|
|
92
92
|
...n
|
|
93
93
|
});
|
|
94
|
-
return [
|
|
94
|
+
return [s, o];
|
|
95
95
|
}, ln = (e, t, n) => {
|
|
96
|
-
const
|
|
97
|
-
return `${c}${e}${
|
|
98
|
-
},
|
|
96
|
+
const s = e ? "-" : "", o = n(t), r = o?.startsWith("-"), c = r ? "-" : "", a = r ? o?.substring(1) : o;
|
|
97
|
+
return `${c}${e}${s}${a}`;
|
|
98
|
+
}, Le = ({
|
|
99
99
|
allowCustomValues: e = !1,
|
|
100
100
|
className: t,
|
|
101
101
|
value: n,
|
|
102
|
-
propValues:
|
|
103
|
-
parseValue:
|
|
102
|
+
propValues: s,
|
|
103
|
+
parseValue: o = (r) => r
|
|
104
104
|
}) => {
|
|
105
105
|
if (n) {
|
|
106
|
-
if (typeof n == "string" &&
|
|
107
|
-
return ln(t, n,
|
|
106
|
+
if (typeof n == "string" && s.includes(n))
|
|
107
|
+
return ln(t, n, o);
|
|
108
108
|
if (e)
|
|
109
109
|
return t;
|
|
110
110
|
}
|
|
@@ -112,28 +112,28 @@ const Ge = (...e) => {
|
|
|
112
112
|
customProperties: e,
|
|
113
113
|
value: t,
|
|
114
114
|
propValues: n,
|
|
115
|
-
parseValue:
|
|
115
|
+
parseValue: s = (o) => o
|
|
116
116
|
}) => {
|
|
117
|
-
let
|
|
117
|
+
let o = {};
|
|
118
118
|
if (!(!t || typeof t == "string" && n.includes(t))) {
|
|
119
|
-
typeof t == "string" && (
|
|
120
|
-
for (const r in
|
|
121
|
-
const c =
|
|
122
|
-
c !== void 0 && (
|
|
119
|
+
typeof t == "string" && (o = Object.fromEntries(e.map((r) => [r, t])));
|
|
120
|
+
for (const r in o) {
|
|
121
|
+
const c = o[r];
|
|
122
|
+
c !== void 0 && (o[r] = s(c));
|
|
123
123
|
}
|
|
124
|
-
return
|
|
124
|
+
return o;
|
|
125
125
|
}
|
|
126
|
-
}, dn = (...e) => Object.assign({}, ...e),
|
|
127
|
-
let n,
|
|
128
|
-
const
|
|
126
|
+
}, dn = (...e) => Object.assign({}, ...e), P = (e, ...t) => {
|
|
127
|
+
let n, s;
|
|
128
|
+
const o = { ...e }, r = dn(...t);
|
|
129
129
|
for (const c in r) {
|
|
130
|
-
let a =
|
|
130
|
+
let a = o[c];
|
|
131
131
|
const u = r[c];
|
|
132
|
-
if (u.default !== void 0 && a === void 0 && (a = u.default), u.type === "enum" && ([u.default, ...u.values].includes(a) || (a = u.default)),
|
|
133
|
-
if (delete
|
|
132
|
+
if (u.default !== void 0 && a === void 0 && (a = u.default), u.type === "enum" && ([u.default, ...u.values].includes(a) || (a = u.default)), o[c] = a, "className" in u && u.className) {
|
|
133
|
+
if (delete o[c], !a)
|
|
134
134
|
continue;
|
|
135
135
|
if (u.type === "enum") {
|
|
136
|
-
const d =
|
|
136
|
+
const d = Le({
|
|
137
137
|
value: a,
|
|
138
138
|
className: u.className,
|
|
139
139
|
propValues: u.values,
|
|
@@ -149,35 +149,35 @@ const Ge = (...e) => {
|
|
|
149
149
|
propValues: d,
|
|
150
150
|
value: a
|
|
151
151
|
});
|
|
152
|
-
|
|
152
|
+
s = Ve(s, p), n = N(n, f);
|
|
153
153
|
continue;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
return
|
|
158
|
-
},
|
|
159
|
-
if (!
|
|
157
|
+
return o.className = N(n, e.className), o.style = Ve(s, e.style), o;
|
|
158
|
+
}, ze = (e) => {
|
|
159
|
+
if (!I.isValidElement(e))
|
|
160
160
|
throw new Error(`Expected a single valid React element, but got: ${e}`);
|
|
161
161
|
return e;
|
|
162
162
|
}, A = (e, t = []) => {
|
|
163
163
|
let n = [];
|
|
164
|
-
function
|
|
164
|
+
function s(r, c) {
|
|
165
165
|
const a = i.createContext(c), u = n.length;
|
|
166
166
|
n = [...n, c];
|
|
167
167
|
const d = (p) => {
|
|
168
|
-
const { scope:
|
|
168
|
+
const { scope: b, children: h, ...C } = p, v = b?.[e]?.[u] || a, g = i.useMemo(() => C, Object.values(C));
|
|
169
169
|
return /* @__PURE__ */ l(v.Provider, { value: g, children: h });
|
|
170
170
|
};
|
|
171
171
|
d.displayName = `${r}Provider`;
|
|
172
|
-
function f(p,
|
|
173
|
-
const h =
|
|
174
|
-
if (
|
|
172
|
+
function f(p, b) {
|
|
173
|
+
const h = b?.[e]?.[u] || a, C = i.useContext(h);
|
|
174
|
+
if (C) return C;
|
|
175
175
|
if (c !== void 0) return c;
|
|
176
176
|
throw new Error(`\`${p}\` must be used within \`${r}\``);
|
|
177
177
|
}
|
|
178
178
|
return [d, f];
|
|
179
179
|
}
|
|
180
|
-
const
|
|
180
|
+
const o = () => {
|
|
181
181
|
const r = n.map((c) => i.createContext(c));
|
|
182
182
|
return function(a) {
|
|
183
183
|
const u = a?.[e] || r;
|
|
@@ -187,17 +187,17 @@ const Ge = (...e) => {
|
|
|
187
187
|
);
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
|
-
return
|
|
190
|
+
return o.scopeName = e, [s, pn(o, ...t)];
|
|
191
191
|
}, pn = (...e) => {
|
|
192
192
|
const t = e[0];
|
|
193
193
|
if (e.length === 1) return t;
|
|
194
194
|
const n = () => {
|
|
195
|
-
const
|
|
196
|
-
useScope:
|
|
197
|
-
scopeName:
|
|
195
|
+
const s = e.map((o) => ({
|
|
196
|
+
useScope: o(),
|
|
197
|
+
scopeName: o.scopeName
|
|
198
198
|
}));
|
|
199
199
|
return function(r) {
|
|
200
|
-
const c =
|
|
200
|
+
const c = s.reduce((a, { useScope: u, scopeName: d }) => {
|
|
201
201
|
const p = u(r)[`__scope${d}`];
|
|
202
202
|
return { ...a, ...p };
|
|
203
203
|
}, {});
|
|
@@ -209,10 +209,10 @@ const Ge = (...e) => {
|
|
|
209
209
|
}, fn = i[" useId ".trim().toString()] || (() => {
|
|
210
210
|
});
|
|
211
211
|
let mn = 0;
|
|
212
|
-
function
|
|
212
|
+
function Ue(e) {
|
|
213
213
|
const [t, n] = i.useState(fn());
|
|
214
214
|
return z(() => {
|
|
215
|
-
n((
|
|
215
|
+
n((s) => s ?? String(mn++));
|
|
216
216
|
}, [e]), t ? `bd-${t}` : "";
|
|
217
217
|
}
|
|
218
218
|
function hn(e) {
|
|
@@ -226,20 +226,20 @@ function _({
|
|
|
226
226
|
defaultProp: t,
|
|
227
227
|
onChange: n = () => {
|
|
228
228
|
},
|
|
229
|
-
caller:
|
|
229
|
+
caller: s
|
|
230
230
|
}) {
|
|
231
|
-
const [
|
|
231
|
+
const [o, r, c] = gn({
|
|
232
232
|
defaultProp: t,
|
|
233
233
|
onChange: n
|
|
234
|
-
}), a = e !== void 0, u = a ? e :
|
|
234
|
+
}), a = e !== void 0, u = a ? e : o;
|
|
235
235
|
if (process.env.NODE_ENV !== "production") {
|
|
236
236
|
const f = i.useRef(e !== void 0);
|
|
237
237
|
i.useEffect(() => {
|
|
238
238
|
const p = f.current;
|
|
239
239
|
p !== a && console.warn(
|
|
240
|
-
`${
|
|
240
|
+
`${s} is changing from ${p ? "controlled" : "uncontrolled"} to ${a ? "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
241
|
), f.current = a;
|
|
242
|
-
}, [a,
|
|
242
|
+
}, [a, s]);
|
|
243
243
|
}
|
|
244
244
|
const d = i.useCallback(
|
|
245
245
|
(f) => {
|
|
@@ -257,12 +257,12 @@ function gn({
|
|
|
257
257
|
defaultProp: e,
|
|
258
258
|
onChange: t
|
|
259
259
|
}) {
|
|
260
|
-
const [n,
|
|
260
|
+
const [n, s] = i.useState(e), o = i.useRef(n), r = i.useRef(t);
|
|
261
261
|
return z(() => {
|
|
262
262
|
r.current = t;
|
|
263
263
|
}, [t]), i.useEffect(() => {
|
|
264
|
-
|
|
265
|
-
}, [n,
|
|
264
|
+
o.current !== n && (r.current?.(n), o.current = n);
|
|
265
|
+
}, [n, o]), [n, s, r];
|
|
266
266
|
}
|
|
267
267
|
function bn(e) {
|
|
268
268
|
return typeof e == "function";
|
|
@@ -276,10 +276,10 @@ function ve(e) {
|
|
|
276
276
|
return z(() => {
|
|
277
277
|
if (e) {
|
|
278
278
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
279
|
-
const
|
|
280
|
-
if (!Array.isArray(
|
|
279
|
+
const s = new ResizeObserver((o) => {
|
|
280
|
+
if (!Array.isArray(o) || !o.length)
|
|
281
281
|
return;
|
|
282
|
-
const r =
|
|
282
|
+
const r = o[0];
|
|
283
283
|
let c, a;
|
|
284
284
|
if ("borderBoxSize" in r) {
|
|
285
285
|
const u = r.borderBoxSize, d = Array.isArray(u) ? u[0] : u;
|
|
@@ -288,23 +288,23 @@ function ve(e) {
|
|
|
288
288
|
c = e.offsetWidth, a = e.offsetHeight;
|
|
289
289
|
n({ width: c, height: a });
|
|
290
290
|
});
|
|
291
|
-
return
|
|
291
|
+
return s.observe(e, { box: "border-box" }), () => s.unobserve(e);
|
|
292
292
|
} else
|
|
293
293
|
n(void 0);
|
|
294
294
|
}, [e]), t;
|
|
295
295
|
}
|
|
296
296
|
function Cn(e, t) {
|
|
297
|
-
const [n,
|
|
298
|
-
return [n,
|
|
297
|
+
const [n, s] = i.useReducer((o, r) => t[o][r] ?? o, e);
|
|
298
|
+
return [n, s];
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
const [c, a] =
|
|
300
|
+
function He(e, t, n, s = 0, o = "start", r = !0) {
|
|
301
|
+
const [c, a] = I.useState({
|
|
302
302
|
position: "absolute",
|
|
303
303
|
top: 0,
|
|
304
304
|
left: 0,
|
|
305
305
|
opacity: 0,
|
|
306
306
|
pointerEvents: "none"
|
|
307
|
-
}), [u, d] =
|
|
307
|
+
}), [u, d] = I.useState(!1);
|
|
308
308
|
return z(() => {
|
|
309
309
|
if (!n) {
|
|
310
310
|
d(!1), a({
|
|
@@ -319,14 +319,14 @@ function Ue(e, t, n, o = 0, s = "start", r = !0) {
|
|
|
319
319
|
let f;
|
|
320
320
|
const p = () => {
|
|
321
321
|
if (!e.current || !t.current) return;
|
|
322
|
-
const h = (e.current.closest(".bd-TextFieldRoot") || e.current).getBoundingClientRect(),
|
|
323
|
-
if (
|
|
322
|
+
const h = (e.current.closest(".bd-TextFieldRoot") || e.current).getBoundingClientRect(), C = t.current.getBoundingClientRect();
|
|
323
|
+
if (C.height === 0 || C.width === 0) {
|
|
324
324
|
f = requestAnimationFrame(p);
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
327
|
const v = window.innerHeight, g = window.innerWidth;
|
|
328
|
-
let m = window.scrollY + h.bottom +
|
|
329
|
-
|
|
328
|
+
let m = window.scrollY + h.bottom + s, y = window.scrollX + h.left;
|
|
329
|
+
o === "center" ? y = window.scrollX + h.left + h.width / 2 - C.width / 2 : o === "end" && (y = window.scrollX + h.right - C.width), h.bottom + C.height + s > v && (m = window.scrollY + h.top - C.height - s), y + C.width > window.scrollX + g && (y = window.scrollX + g - C.width - 16), y < window.scrollX && (y = window.scrollX + 16);
|
|
330
330
|
const w = {
|
|
331
331
|
position: "absolute",
|
|
332
332
|
top: `${m}px`,
|
|
@@ -340,31 +340,31 @@ function Ue(e, t, n, o = 0, s = "start", r = !0) {
|
|
|
340
340
|
return f = requestAnimationFrame(p), window.addEventListener("scroll", p, { passive: !0 }), window.addEventListener("resize", p), () => {
|
|
341
341
|
cancelAnimationFrame(f), window.removeEventListener("scroll", p), window.removeEventListener("resize", p);
|
|
342
342
|
};
|
|
343
|
-
}, [n, e, t,
|
|
343
|
+
}, [n, e, t, s, o, r]), { styles: c, isPositioned: u };
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function Ye(e, t) {
|
|
346
346
|
i.useEffect(() => {
|
|
347
|
-
const n = (
|
|
348
|
-
const
|
|
349
|
-
!
|
|
347
|
+
const n = (s) => {
|
|
348
|
+
const o = e?.current;
|
|
349
|
+
!o || o.contains(s.target) || t(s);
|
|
350
350
|
};
|
|
351
351
|
return document.addEventListener("mousedown", n), document.addEventListener("touchstart", n), () => {
|
|
352
352
|
document.removeEventListener("mousedown", n), document.removeEventListener("touchstart", n);
|
|
353
353
|
};
|
|
354
354
|
}, [e, t]);
|
|
355
355
|
}
|
|
356
|
-
const
|
|
356
|
+
const je = ({
|
|
357
357
|
children: e,
|
|
358
358
|
container: t = globalThis?.document?.body
|
|
359
359
|
}) => typeof window > "u" || !t ? null : nn(
|
|
360
360
|
/* @__PURE__ */ l("div", { className: "bd-theme bd-reset", style: { display: "contents" }, children: e }),
|
|
361
361
|
t
|
|
362
362
|
), vn = (e) => {
|
|
363
|
-
const t =
|
|
364
|
-
const { children:
|
|
365
|
-
if (
|
|
366
|
-
const c = be(
|
|
367
|
-
return a.ref =
|
|
363
|
+
const t = I.forwardRef((n, s) => {
|
|
364
|
+
const { children: o, ...r } = n;
|
|
365
|
+
if (I.isValidElement(o)) {
|
|
366
|
+
const c = be(o), a = an(r, o.props);
|
|
367
|
+
return a.ref = s ? q(s, c) : c, I.cloneElement(o, a);
|
|
368
368
|
}
|
|
369
369
|
throw new Error(
|
|
370
370
|
`[${e}.OutletClone] Invalid children passed, expected a single valid React element.`
|
|
@@ -372,12 +372,12 @@ const Ye = ({
|
|
|
372
372
|
});
|
|
373
373
|
return t.displayName = `${e}.OutletClone`, t;
|
|
374
374
|
}, Q = (e) => {
|
|
375
|
-
const t = vn(e), n =
|
|
376
|
-
const { children: r, ...c } =
|
|
375
|
+
const t = vn(e), n = I.forwardRef((s, o) => {
|
|
376
|
+
const { children: r, ...c } = s, a = I.Children.toArray(r), u = a.find(wn);
|
|
377
377
|
if (u) {
|
|
378
378
|
const d = u.props.children, f = a.map((p) => {
|
|
379
379
|
if (p === u) {
|
|
380
|
-
if (
|
|
380
|
+
if (I.Children.count(d) > 1 || !I.isValidElement(d))
|
|
381
381
|
throw new Error(
|
|
382
382
|
`[${e}.Outlet] Invalid children passed, expected a single valid React element.`
|
|
383
383
|
);
|
|
@@ -385,44 +385,44 @@ const Ye = ({
|
|
|
385
385
|
} else
|
|
386
386
|
return p;
|
|
387
387
|
});
|
|
388
|
-
if (!
|
|
388
|
+
if (!I.isValidElement(d))
|
|
389
389
|
throw new Error(`[${e}.Outlet] Invalid children passed.`);
|
|
390
|
-
return /* @__PURE__ */ l(t, { ...c, ref:
|
|
390
|
+
return /* @__PURE__ */ l(t, { ...c, ref: o, children: I.cloneElement(d, void 0, f) });
|
|
391
391
|
}
|
|
392
|
-
return /* @__PURE__ */ l(t, { ...c, ref:
|
|
392
|
+
return /* @__PURE__ */ l(t, { ...c, ref: o, children: r });
|
|
393
393
|
});
|
|
394
394
|
return n.displayName = `${e}.Outlet`, n;
|
|
395
|
-
}, te = Q("Outlet"), yn = Symbol("bds.outlettable"), wn = (e) =>
|
|
396
|
-
const n = Q(`Base.${t}`),
|
|
397
|
-
const { asChild: c, ...a } =
|
|
395
|
+
}, te = Q("Outlet"), yn = Symbol("bds.outlettable"), wn = (e) => I.isValidElement(e) && typeof e.type == "function" && "__bdsId" in e.type && e.type.__bdsId === yn, Rn = ["a", "button", "div", "input", "label", "span"], k = Rn.reduce((e, t) => {
|
|
396
|
+
const n = Q(`Base.${t}`), s = i.forwardRef((o, r) => {
|
|
397
|
+
const { asChild: c, ...a } = o;
|
|
398
398
|
return /* @__PURE__ */ l(c ? n : t, { ...a, ref: r });
|
|
399
399
|
});
|
|
400
|
-
return
|
|
400
|
+
return s.displayName = `Base.${t}`, { ...e, [t]: s };
|
|
401
401
|
}, {});
|
|
402
402
|
function Nn(e) {
|
|
403
|
-
const t = `${e}CollectionProvider`, [n,
|
|
403
|
+
const t = `${e}CollectionProvider`, [n, s] = A(t), [o, r] = n(
|
|
404
404
|
t,
|
|
405
405
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
406
406
|
), c = (v) => {
|
|
407
407
|
const { scope: g, children: m } = v, y = i.useRef(null), w = i.useRef(/* @__PURE__ */ new Map()).current;
|
|
408
|
-
return /* @__PURE__ */ l(
|
|
408
|
+
return /* @__PURE__ */ l(o, { scope: g, itemMap: w, collectionRef: y, children: m });
|
|
409
409
|
};
|
|
410
410
|
c.displayName = t;
|
|
411
411
|
const a = `${e}CollectionOutlet`, u = Q(a), d = i.forwardRef(
|
|
412
412
|
(v, g) => {
|
|
413
|
-
const { scope: m, children: y } = v, w = r(a, m), R =
|
|
413
|
+
const { scope: m, children: y } = v, w = r(a, m), R = D(g, w.collectionRef);
|
|
414
414
|
return /* @__PURE__ */ l(u, { ref: R, children: y });
|
|
415
415
|
}
|
|
416
416
|
);
|
|
417
417
|
d.displayName = a;
|
|
418
|
-
const f = `${e}CollectionItemOutlet`, p = "data-bd-collection-item",
|
|
418
|
+
const f = `${e}CollectionItemOutlet`, p = "data-bd-collection-item", b = Q(f), h = i.forwardRef(
|
|
419
419
|
(v, g) => {
|
|
420
|
-
const { scope: m, children: y, ...w } = v, R = i.useRef(null), T =
|
|
421
|
-
return i.useEffect(() => (x.itemMap.set(R, { ref: R, ...w }), () => void x.itemMap.delete(R))), /* @__PURE__ */ l(
|
|
420
|
+
const { scope: m, children: y, ...w } = v, R = i.useRef(null), T = D(g, R), x = r(f, m);
|
|
421
|
+
return i.useEffect(() => (x.itemMap.set(R, { ref: R, ...w }), () => void x.itemMap.delete(R))), /* @__PURE__ */ l(b, { [p]: "", ref: T, children: y });
|
|
422
422
|
}
|
|
423
423
|
);
|
|
424
424
|
h.displayName = f;
|
|
425
|
-
function
|
|
425
|
+
function C(v) {
|
|
426
426
|
const g = r(`${e}CollectionConsumer`, v);
|
|
427
427
|
return i.useCallback(() => {
|
|
428
428
|
const y = g.collectionRef.current;
|
|
@@ -435,17 +435,17 @@ function Nn(e) {
|
|
|
435
435
|
}
|
|
436
436
|
return [
|
|
437
437
|
{ Provider: c, Outlet: d, ItemOutlet: h },
|
|
438
|
-
|
|
439
|
-
|
|
438
|
+
C,
|
|
439
|
+
s
|
|
440
440
|
];
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
const { remain: t, children: n } = e,
|
|
444
|
-
return typeof n == "function" ||
|
|
442
|
+
function qe(e) {
|
|
443
|
+
const { remain: t, children: n } = e, s = Sn(t), o = typeof n == "function" ? n({ remain: s.isRemain }) : i.Children.only(n), r = D(s.ref, be(o));
|
|
444
|
+
return typeof n == "function" || s.isRemain ? i.cloneElement(o, { ref: r }) : null;
|
|
445
445
|
}
|
|
446
446
|
const xn = ["mounted", "unmountSuspended"];
|
|
447
447
|
function Sn(e) {
|
|
448
|
-
const [t, n] = i.useState(),
|
|
448
|
+
const [t, n] = i.useState(), s = i.useRef(null), o = i.useRef(e), r = i.useRef("none"), c = e ? "mounted" : "unmounted", [a, u] = Cn(c, {
|
|
449
449
|
mounted: {
|
|
450
450
|
UNMOUNT: "unmounted",
|
|
451
451
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -459,37 +459,37 @@ function Sn(e) {
|
|
|
459
459
|
}
|
|
460
460
|
});
|
|
461
461
|
return i.useEffect(() => {
|
|
462
|
-
const d = X(
|
|
462
|
+
const d = X(s.current);
|
|
463
463
|
r.current = a === "mounted" ? d : "none";
|
|
464
464
|
}, [a]), z(() => {
|
|
465
|
-
const d =
|
|
465
|
+
const d = s.current, f = o.current;
|
|
466
466
|
if (f !== e) {
|
|
467
|
-
const
|
|
468
|
-
e ? u("MOUNT") : h === "none" || d?.display === "none" ? u("UNMOUNT") : u(f &&
|
|
467
|
+
const b = r.current, h = X(d);
|
|
468
|
+
e ? u("MOUNT") : h === "none" || d?.display === "none" ? u("UNMOUNT") : u(f && b !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
469
469
|
}
|
|
470
470
|
}, [e, u]), z(() => {
|
|
471
471
|
if (t) {
|
|
472
472
|
let d;
|
|
473
473
|
const f = t.ownerDocument.defaultView ?? window, p = (h) => {
|
|
474
|
-
const v = X(
|
|
475
|
-
if (h.target === t && v && (u("ANIMATION_END"), !
|
|
474
|
+
const v = X(s.current).includes(CSS.escape(h.animationName));
|
|
475
|
+
if (h.target === t && v && (u("ANIMATION_END"), !o.current)) {
|
|
476
476
|
const g = t.style.animationFillMode;
|
|
477
477
|
t.style.animationFillMode = "forwards", d = f.setTimeout(() => {
|
|
478
478
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = g);
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
|
-
},
|
|
482
|
-
h.target === t && (r.current = X(
|
|
481
|
+
}, b = (h) => {
|
|
482
|
+
h.target === t && (r.current = X(s.current));
|
|
483
483
|
};
|
|
484
|
-
return t.addEventListener("animationstart",
|
|
485
|
-
f.clearTimeout(d), t.removeEventListener("animationstart",
|
|
484
|
+
return t.addEventListener("animationstart", b), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
|
|
485
|
+
f.clearTimeout(d), t.removeEventListener("animationstart", b), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
|
|
486
486
|
};
|
|
487
487
|
} else
|
|
488
488
|
u("ANIMATION_END");
|
|
489
489
|
}, [t, u]), {
|
|
490
490
|
isRemain: xn.includes(a),
|
|
491
491
|
ref: i.useCallback((d) => {
|
|
492
|
-
|
|
492
|
+
s.current = d ? getComputedStyle(d) : null, n(d);
|
|
493
493
|
}, [])
|
|
494
494
|
};
|
|
495
495
|
}
|
|
@@ -507,7 +507,7 @@ const kn = Object.freeze({
|
|
|
507
507
|
clip: "rect(0, 0, 0, 0)",
|
|
508
508
|
whiteSpace: "nowrap",
|
|
509
509
|
wordWrap: "normal"
|
|
510
|
-
}),
|
|
510
|
+
}), Ke = i.forwardRef(
|
|
511
511
|
(e, t) => /* @__PURE__ */ l(
|
|
512
512
|
k.span,
|
|
513
513
|
{
|
|
@@ -517,37 +517,37 @@ const kn = Object.freeze({
|
|
|
517
517
|
}
|
|
518
518
|
)
|
|
519
519
|
);
|
|
520
|
-
|
|
520
|
+
Ke.displayName = "VisuallyHidden";
|
|
521
521
|
const Pn = i.forwardRef((e, t) => {
|
|
522
|
-
const { children: n, className:
|
|
523
|
-
return /* @__PURE__ */ l(te, { ...
|
|
522
|
+
const { children: n, className: s, ...o } = e;
|
|
523
|
+
return /* @__PURE__ */ l(te, { ...o, ref: t, className: N("bd-reset", s), children: ze(n) });
|
|
524
524
|
});
|
|
525
525
|
Pn.displayName = "Reset";
|
|
526
|
-
const B = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(
|
|
527
|
-
if (e?.(
|
|
528
|
-
return t?.(
|
|
529
|
-
}, le = "rovingFocusGroup.onEntryFocus", In = { bubbles: !1, cancelable: !0 }, ne = "RovingFocusGroup", [fe,
|
|
526
|
+
const B = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(o) {
|
|
527
|
+
if (e?.(o), n === !1 || !o.defaultPrevented)
|
|
528
|
+
return t?.(o);
|
|
529
|
+
}, le = "rovingFocusGroup.onEntryFocus", In = { bubbles: !1, cancelable: !0 }, ne = "RovingFocusGroup", [fe, We, En] = Nn(ne), [Dn, ye] = A(
|
|
530
530
|
ne,
|
|
531
531
|
[En]
|
|
532
|
-
), [Tn, _n] = Dn(ne),
|
|
532
|
+
), [Tn, _n] = Dn(ne), Xe = i.forwardRef(
|
|
533
533
|
(e, t) => /* @__PURE__ */ l(fe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(fe.Outlet, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(Bn, { ...e, ref: t }) }) })
|
|
534
534
|
), Bn = i.forwardRef((e, t) => {
|
|
535
535
|
const {
|
|
536
536
|
__scopeRovingFocusGroup: n,
|
|
537
|
-
orientation:
|
|
538
|
-
loop:
|
|
537
|
+
orientation: s,
|
|
538
|
+
loop: o = !1,
|
|
539
539
|
currentTabStopId: r,
|
|
540
540
|
defaultCurrentTabStopId: c,
|
|
541
541
|
onCurrentTabStopIdChange: a,
|
|
542
542
|
onEntryFocus: u,
|
|
543
543
|
preventScrollOnEntryFocus: d = !1,
|
|
544
544
|
...f
|
|
545
|
-
} = e, p = i.useRef(null),
|
|
545
|
+
} = e, p = i.useRef(null), b = D(t, p), [h, C] = _({
|
|
546
546
|
prop: r,
|
|
547
547
|
defaultProp: c ?? null,
|
|
548
548
|
onChange: a,
|
|
549
549
|
caller: ne
|
|
550
|
-
}), [v, g] = i.useState(!1), m = hn(u), y =
|
|
550
|
+
}), [v, g] = i.useState(!1), m = hn(u), y = We(n), w = i.useRef(!1), [R, T] = i.useState(0);
|
|
551
551
|
return i.useEffect(() => {
|
|
552
552
|
const x = p.current;
|
|
553
553
|
if (x)
|
|
@@ -556,12 +556,12 @@ const B = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(s) {
|
|
|
556
556
|
Tn,
|
|
557
557
|
{
|
|
558
558
|
scope: n,
|
|
559
|
-
orientation:
|
|
560
|
-
loop:
|
|
559
|
+
orientation: s,
|
|
560
|
+
loop: o,
|
|
561
561
|
currentTabStopId: h,
|
|
562
562
|
onItemFocus: i.useCallback(
|
|
563
|
-
(x) =>
|
|
564
|
-
[
|
|
563
|
+
(x) => C(x),
|
|
564
|
+
[C]
|
|
565
565
|
),
|
|
566
566
|
onItemShiftTab: i.useCallback(() => g(!0), []),
|
|
567
567
|
onFocusableItemAdd: i.useCallback(
|
|
@@ -576,9 +576,9 @@ const B = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(s) {
|
|
|
576
576
|
k.div,
|
|
577
577
|
{
|
|
578
578
|
tabIndex: v || R === 0 ? -1 : 0,
|
|
579
|
-
"data-orientation":
|
|
579
|
+
"data-orientation": s,
|
|
580
580
|
...f,
|
|
581
|
-
ref:
|
|
581
|
+
ref: b,
|
|
582
582
|
style: { outline: "none", ...e.style },
|
|
583
583
|
onMouseDown: B(e.onMouseDown, () => {
|
|
584
584
|
w.current = !0;
|
|
@@ -586,12 +586,12 @@ const B = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(s) {
|
|
|
586
586
|
onFocus: B(e.onFocus, (x) => {
|
|
587
587
|
const H = !w.current;
|
|
588
588
|
if (x.target === x.currentTarget && H && !v) {
|
|
589
|
-
const
|
|
590
|
-
if (x.currentTarget.dispatchEvent(
|
|
589
|
+
const Oe = new CustomEvent(le, In);
|
|
590
|
+
if (x.currentTarget.dispatchEvent(Oe), !Oe.defaultPrevented) {
|
|
591
591
|
const ce = y().filter((G) => G.focusable), Qt = ce.find((G) => G.active), en = ce.find((G) => G.id === h), tn = [Qt, en, ...ce].filter(
|
|
592
592
|
Boolean
|
|
593
593
|
).map((G) => G.ref.current);
|
|
594
|
-
|
|
594
|
+
Je(tn, d);
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
597
|
w.current = !1;
|
|
@@ -601,26 +601,26 @@ const B = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(s) {
|
|
|
601
601
|
)
|
|
602
602
|
}
|
|
603
603
|
);
|
|
604
|
-
}), An = "RovingFocusGroupItem",
|
|
604
|
+
}), An = "RovingFocusGroupItem", Ze = i.forwardRef(
|
|
605
605
|
(e, t) => {
|
|
606
606
|
const {
|
|
607
607
|
__scopeRovingFocusGroup: n,
|
|
608
|
-
focusable:
|
|
609
|
-
active:
|
|
608
|
+
focusable: s = !0,
|
|
609
|
+
active: o = !1,
|
|
610
610
|
tabStopId: r,
|
|
611
611
|
children: c,
|
|
612
612
|
...a
|
|
613
|
-
} = e, u =
|
|
613
|
+
} = e, u = Ue(), d = r || u, f = _n(An, n), p = f.currentTabStopId === d, b = We(n), { onFocusableItemAdd: h, onFocusableItemRemove: C, currentTabStopId: v } = f;
|
|
614
614
|
return i.useEffect(() => {
|
|
615
|
-
if (
|
|
616
|
-
return h(), () =>
|
|
617
|
-
}, [
|
|
615
|
+
if (s)
|
|
616
|
+
return h(), () => C();
|
|
617
|
+
}, [s, h, C]), /* @__PURE__ */ l(
|
|
618
618
|
fe.ItemOutlet,
|
|
619
619
|
{
|
|
620
620
|
scope: n,
|
|
621
621
|
id: d,
|
|
622
|
-
focusable:
|
|
623
|
-
active:
|
|
622
|
+
focusable: s,
|
|
623
|
+
active: o,
|
|
624
624
|
children: /* @__PURE__ */ l(
|
|
625
625
|
k.span,
|
|
626
626
|
{
|
|
@@ -629,7 +629,7 @@ const B = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(s) {
|
|
|
629
629
|
...a,
|
|
630
630
|
ref: t,
|
|
631
631
|
onMouseDown: B(e.onMouseDown, (g) => {
|
|
632
|
-
|
|
632
|
+
s ? f.onItemFocus(d) : g.preventDefault();
|
|
633
633
|
}),
|
|
634
634
|
onFocus: B(e.onFocus, () => f.onItemFocus(d)),
|
|
635
635
|
onKeyDown: B(e.onKeyDown, (g) => {
|
|
@@ -642,12 +642,12 @@ const B = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(s) {
|
|
|
642
642
|
if (m !== void 0) {
|
|
643
643
|
if (g.metaKey || g.ctrlKey || g.altKey || g.shiftKey) return;
|
|
644
644
|
g.preventDefault();
|
|
645
|
-
let w =
|
|
645
|
+
let w = b().filter((R) => R.focusable).map((R) => R.ref.current);
|
|
646
646
|
if (m === "last") w.reverse();
|
|
647
647
|
else if (m === "prev" || m === "next") {
|
|
648
648
|
m === "prev" && w.reverse();
|
|
649
649
|
const R = w.indexOf(g.currentTarget);
|
|
650
|
-
w = f.loop ? Fn(w, R + 1) : w.slice(R + 1), setTimeout(() =>
|
|
650
|
+
w = f.loop ? Fn(w, R + 1) : w.slice(R + 1), setTimeout(() => Je(w));
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
}),
|
|
@@ -672,13 +672,13 @@ function On(e, t) {
|
|
|
672
672
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(n)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(n)))
|
|
673
673
|
return Mn[n];
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function Je(e, t = !1) {
|
|
676
676
|
const n = document.activeElement;
|
|
677
|
-
for (const
|
|
678
|
-
if (
|
|
677
|
+
for (const s of e)
|
|
678
|
+
if (s === n || (s.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
679
679
|
}
|
|
680
680
|
function Fn(e, t) {
|
|
681
|
-
return e.map((n,
|
|
681
|
+
return e.map((n, s) => e[(t + s) % e.length]);
|
|
682
682
|
}
|
|
683
683
|
const U = {
|
|
684
684
|
asChild: {
|
|
@@ -751,7 +751,7 @@ const U = {
|
|
|
751
751
|
className: "bd-pl",
|
|
752
752
|
customProperties: ["--pl"]
|
|
753
753
|
}
|
|
754
|
-
},
|
|
754
|
+
}, Qe = {
|
|
755
755
|
width: {
|
|
756
756
|
type: "string",
|
|
757
757
|
className: "bd-w",
|
|
@@ -784,7 +784,7 @@ const U = {
|
|
|
784
784
|
customProperties: ["--max-height"]
|
|
785
785
|
}
|
|
786
786
|
}, zn = ["static", "relative", "absolute", "fixed", "sticky"], ue = ["visible", "hidden", "clip", "scroll", "auto"], Y = ["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"], Un = ["0", "1"], Hn = ["0", "1"], Yn = ["start", "center", "end", "baseline", "stretch"], jn = ["start", "center", "end", "baseline", "stretch"], qn = {
|
|
787
|
-
...
|
|
787
|
+
...Qe,
|
|
788
788
|
...Ln,
|
|
789
789
|
...L,
|
|
790
790
|
position: {
|
|
@@ -954,7 +954,7 @@ const U = {
|
|
|
954
954
|
className: "bd-tw",
|
|
955
955
|
values: Xn
|
|
956
956
|
}
|
|
957
|
-
}, Jn = ["light", "regular", "medium", "semibold", "bold"],
|
|
957
|
+
}, Jn = ["light", "regular", "medium", "semibold", "bold"], we = {
|
|
958
958
|
weight: {
|
|
959
959
|
type: "enum",
|
|
960
960
|
values: Jn,
|
|
@@ -1012,22 +1012,22 @@ const U = {
|
|
|
1012
1012
|
...O,
|
|
1013
1013
|
...Wn,
|
|
1014
1014
|
...Zn,
|
|
1015
|
-
...
|
|
1015
|
+
...we,
|
|
1016
1016
|
...Qn,
|
|
1017
1017
|
...to,
|
|
1018
1018
|
...Gn
|
|
1019
|
-
},
|
|
1019
|
+
}, Re = i.forwardRef((e, t) => {
|
|
1020
1020
|
const {
|
|
1021
1021
|
children: n,
|
|
1022
|
-
className:
|
|
1023
|
-
asChild:
|
|
1022
|
+
className: s,
|
|
1023
|
+
asChild: o,
|
|
1024
1024
|
as: r = "span",
|
|
1025
1025
|
...c
|
|
1026
|
-
} =
|
|
1027
|
-
return /* @__PURE__ */ l(te, { ...c, ref: t, className: N("bd-Text",
|
|
1026
|
+
} = P(e, ao);
|
|
1027
|
+
return /* @__PURE__ */ l(te, { ...c, ref: t, className: N("bd-Text", s), children: o ? n : /* @__PURE__ */ l(r, { children: n }) });
|
|
1028
1028
|
});
|
|
1029
|
-
|
|
1030
|
-
const co = (e) => e === "between" ? "space-between" : e, io = ["div", "span"], lo = ["none", "inline-flex", "flex"], uo = ["row", "column", "row-reverse", "column-reverse"], po = ["start", "center", "end", "baseline", "stretch"], fo = ["start", "center", "end", "between"], mo = ["nowrap", "wrap", "wrap-reverse"],
|
|
1029
|
+
Re.displayName = "Text";
|
|
1030
|
+
const co = (e) => e === "between" ? "space-between" : e, io = ["div", "span"], lo = ["none", "inline-flex", "flex"], uo = ["row", "column", "row-reverse", "column-reverse"], po = ["start", "center", "end", "baseline", "stretch"], fo = ["start", "center", "end", "between"], mo = ["nowrap", "wrap", "wrap-reverse"], Ne = {
|
|
1031
1031
|
as: { type: "enum", values: io, default: "div" },
|
|
1032
1032
|
...U,
|
|
1033
1033
|
display: {
|
|
@@ -1059,27 +1059,27 @@ const co = (e) => e === "between" ? "space-between" : e, io = ["div", "span"], l
|
|
|
1059
1059
|
...et,
|
|
1060
1060
|
...qn,
|
|
1061
1061
|
...O
|
|
1062
|
-
},
|
|
1063
|
-
const { className: n, asChild:
|
|
1064
|
-
return /* @__PURE__ */ l(
|
|
1062
|
+
}, E = i.forwardRef((e, t) => {
|
|
1063
|
+
const { className: n, asChild: s, as: o = "div", ...r } = P(e, Ne);
|
|
1064
|
+
return /* @__PURE__ */ l(s ? te : o, { ...r, ref: t, className: N("bd-Flex", n) });
|
|
1065
1065
|
});
|
|
1066
|
-
|
|
1066
|
+
E.displayName = "Flex";
|
|
1067
1067
|
const ho = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], go = {
|
|
1068
1068
|
size: { type: "enum", className: "bd-size", values: ho, default: "2" },
|
|
1069
1069
|
loading: { type: "boolean", default: !0 },
|
|
1070
1070
|
color: { type: "enum", className: "bd-color", values: oe },
|
|
1071
1071
|
...O
|
|
1072
1072
|
}, tt = i.forwardRef((e, t) => {
|
|
1073
|
-
const { className: n, children:
|
|
1073
|
+
const { className: n, children: s, loading: o, ...r } = P(
|
|
1074
1074
|
e,
|
|
1075
1075
|
go,
|
|
1076
1076
|
Vn
|
|
1077
1077
|
);
|
|
1078
|
-
if (!
|
|
1078
|
+
if (!o) return s;
|
|
1079
1079
|
const c = /* @__PURE__ */ l("span", { ...r, ref: t, className: N("bd-Spinner", n) });
|
|
1080
|
-
return
|
|
1081
|
-
/* @__PURE__ */ l("span", { children: /* @__PURE__ */ l("span", { "aria-hidden": !0, style: { display: "contents", visibility: "hidden" }, inert: void 0, children:
|
|
1082
|
-
/* @__PURE__ */ l(
|
|
1080
|
+
return s === void 0 ? c : /* @__PURE__ */ S(E, { asChild: !0, position: "relative", align: "center", justify: "center", children: [
|
|
1081
|
+
/* @__PURE__ */ l("span", { children: /* @__PURE__ */ l("span", { "aria-hidden": !0, style: { display: "contents", visibility: "hidden" }, inert: void 0, children: s }) }),
|
|
1082
|
+
/* @__PURE__ */ l(E, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ l("span", { children: c }) })
|
|
1083
1083
|
] });
|
|
1084
1084
|
});
|
|
1085
1085
|
tt.displayName = "Spinner";
|
|
@@ -1102,11 +1102,11 @@ const bo = ["1", "2", "3", "4", "5"], Co = [
|
|
|
1102
1102
|
*/
|
|
1103
1103
|
size: { type: "enum", className: "bd-size", values: bo, default: "5" },
|
|
1104
1104
|
variant: { type: "enum", className: "bd-variant", values: Co, default: "fill-primary" },
|
|
1105
|
-
...
|
|
1105
|
+
...Qe,
|
|
1106
1106
|
...O,
|
|
1107
1107
|
...et,
|
|
1108
1108
|
...oo,
|
|
1109
|
-
...
|
|
1109
|
+
...we,
|
|
1110
1110
|
loading: { type: "boolean", className: "bd-loading", default: !1 }
|
|
1111
1111
|
}, vo = (e) => {
|
|
1112
1112
|
switch (e) {
|
|
@@ -1132,13 +1132,13 @@ const bo = ["1", "2", "3", "4", "5"], Co = [
|
|
|
1132
1132
|
return;
|
|
1133
1133
|
}
|
|
1134
1134
|
}, me = i.forwardRef((e, t) => {
|
|
1135
|
-
const { variant: n = pe.variant.default, size:
|
|
1136
|
-
className:
|
|
1135
|
+
const { variant: n = pe.variant.default, size: s = pe.size.default } = e, {
|
|
1136
|
+
className: o,
|
|
1137
1137
|
children: r,
|
|
1138
1138
|
asChild: c,
|
|
1139
1139
|
disabled: a = e.loading,
|
|
1140
1140
|
...u
|
|
1141
|
-
} =
|
|
1141
|
+
} = P(e, pe);
|
|
1142
1142
|
return /* @__PURE__ */ l(
|
|
1143
1143
|
c ? te : "button",
|
|
1144
1144
|
{
|
|
@@ -1147,14 +1147,14 @@ const bo = ["1", "2", "3", "4", "5"], Co = [
|
|
|
1147
1147
|
disabled: a,
|
|
1148
1148
|
...u,
|
|
1149
1149
|
ref: t,
|
|
1150
|
-
className: N("bd-Button",
|
|
1151
|
-
children: e.loading ? /* @__PURE__ */ S(
|
|
1150
|
+
className: N("bd-Button", o),
|
|
1151
|
+
children: e.loading ? /* @__PURE__ */ S($e, { children: [
|
|
1152
1152
|
/* @__PURE__ */ l("span", { style: { display: "contents", visibility: "hidden" }, "aria-hidden": !0, children: r }),
|
|
1153
|
-
/* @__PURE__ */ l(
|
|
1154
|
-
/* @__PURE__ */ l(
|
|
1153
|
+
/* @__PURE__ */ l(Ke, { children: r }),
|
|
1154
|
+
/* @__PURE__ */ l(E, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ l("span", { children: /* @__PURE__ */ l(
|
|
1155
1155
|
tt,
|
|
1156
1156
|
{
|
|
1157
|
-
size: vo(
|
|
1157
|
+
size: vo(s),
|
|
1158
1158
|
color: yo(n)
|
|
1159
1159
|
}
|
|
1160
1160
|
) }) })
|
|
@@ -1163,8 +1163,8 @@ const bo = ["1", "2", "3", "4", "5"], Co = [
|
|
|
1163
1163
|
);
|
|
1164
1164
|
});
|
|
1165
1165
|
me.displayName = "Button";
|
|
1166
|
-
const
|
|
1167
|
-
const { color: n = "currentColor", ...
|
|
1166
|
+
const xe = i.forwardRef((e, t) => {
|
|
1167
|
+
const { color: n = "currentColor", ...s } = e;
|
|
1168
1168
|
return /* @__PURE__ */ l(
|
|
1169
1169
|
"svg",
|
|
1170
1170
|
{
|
|
@@ -1173,7 +1173,7 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1173
1173
|
height: "7",
|
|
1174
1174
|
viewBox: "0 0 10 7",
|
|
1175
1175
|
fill: "none",
|
|
1176
|
-
...
|
|
1176
|
+
...s,
|
|
1177
1177
|
ref: t,
|
|
1178
1178
|
children: /* @__PURE__ */ l(
|
|
1179
1179
|
"path",
|
|
@@ -1188,7 +1188,7 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
);
|
|
1190
1190
|
}), wo = i.forwardRef((e, t) => {
|
|
1191
|
-
const { color: n = "currentColor", ...
|
|
1191
|
+
const { color: n = "currentColor", ...s } = e;
|
|
1192
1192
|
return /* @__PURE__ */ l(
|
|
1193
1193
|
"svg",
|
|
1194
1194
|
{
|
|
@@ -1197,7 +1197,7 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1197
1197
|
height: "9",
|
|
1198
1198
|
viewBox: "0 0 9 9",
|
|
1199
1199
|
fill: n,
|
|
1200
|
-
...
|
|
1200
|
+
...s,
|
|
1201
1201
|
ref: t,
|
|
1202
1202
|
children: /* @__PURE__ */ l(
|
|
1203
1203
|
"path",
|
|
@@ -1210,13 +1210,13 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1210
1210
|
}
|
|
1211
1211
|
);
|
|
1212
1212
|
}), Ro = i.forwardRef((e, t) => {
|
|
1213
|
-
const { color: n = "currentColor", width:
|
|
1213
|
+
const { color: n = "currentColor", width: s = 20, height: o = 20, ...r } = e;
|
|
1214
1214
|
return /* @__PURE__ */ l(
|
|
1215
1215
|
"svg",
|
|
1216
1216
|
{
|
|
1217
1217
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1218
|
-
width:
|
|
1219
|
-
height:
|
|
1218
|
+
width: s,
|
|
1219
|
+
height: o,
|
|
1220
1220
|
viewBox: "4 2 16 16",
|
|
1221
1221
|
fill: "none",
|
|
1222
1222
|
...r,
|
|
@@ -1231,13 +1231,13 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
);
|
|
1233
1233
|
}), No = i.forwardRef((e, t) => {
|
|
1234
|
-
const { color: n = "currentColor", width:
|
|
1234
|
+
const { color: n = "currentColor", width: s = 20, height: o = 20, ...r } = e;
|
|
1235
1235
|
return /* @__PURE__ */ l(
|
|
1236
1236
|
"svg",
|
|
1237
1237
|
{
|
|
1238
1238
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1239
|
-
width:
|
|
1240
|
-
height:
|
|
1239
|
+
width: s,
|
|
1240
|
+
height: o,
|
|
1241
1241
|
viewBox: "4 2 16 16",
|
|
1242
1242
|
fill: "none",
|
|
1243
1243
|
...r,
|
|
@@ -1252,13 +1252,13 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
);
|
|
1254
1254
|
}), xo = i.forwardRef((e, t) => {
|
|
1255
|
-
const { color: n = "currentColor", width:
|
|
1255
|
+
const { color: n = "currentColor", width: s = 20, height: o = 20, ...r } = e;
|
|
1256
1256
|
return /* @__PURE__ */ l(
|
|
1257
1257
|
"svg",
|
|
1258
1258
|
{
|
|
1259
1259
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1260
|
-
width:
|
|
1261
|
-
height:
|
|
1260
|
+
width: s,
|
|
1261
|
+
height: o,
|
|
1262
1262
|
viewBox: "4 2 16 16",
|
|
1263
1263
|
fill: "none",
|
|
1264
1264
|
...r,
|
|
@@ -1275,13 +1275,13 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1275
1275
|
}), So = ["1", "2", "3", "4"], ko = ["classic", "circle", "outline"], nt = {
|
|
1276
1276
|
size: { type: "enum", className: "bd-size", values: So, default: "2" },
|
|
1277
1277
|
variant: { type: "enum", className: "bd-variant", values: ko, default: "classic" }
|
|
1278
|
-
},
|
|
1278
|
+
}, Se = "Checkbox", [Po, ot] = A(Se), [Io, ke] = Po(Se);
|
|
1279
1279
|
function Eo(e) {
|
|
1280
1280
|
const {
|
|
1281
1281
|
__scopeCheckbox: t,
|
|
1282
1282
|
checked: n,
|
|
1283
|
-
defaultChecked:
|
|
1284
|
-
required:
|
|
1283
|
+
defaultChecked: s,
|
|
1284
|
+
required: o,
|
|
1285
1285
|
name: r,
|
|
1286
1286
|
form: c,
|
|
1287
1287
|
disabled: a,
|
|
@@ -1290,23 +1290,23 @@ function Eo(e) {
|
|
|
1290
1290
|
onCheckedChange: f,
|
|
1291
1291
|
// @ts-expect-error - Internal prop for render
|
|
1292
1292
|
__internal: p
|
|
1293
|
-
} = e, [
|
|
1293
|
+
} = e, [b, h] = _({
|
|
1294
1294
|
prop: n,
|
|
1295
|
-
defaultProp:
|
|
1295
|
+
defaultProp: s ?? !1,
|
|
1296
1296
|
onChange: f,
|
|
1297
|
-
caller:
|
|
1298
|
-
}), [
|
|
1299
|
-
checked:
|
|
1297
|
+
caller: Se
|
|
1298
|
+
}), [C, v] = i.useState(null), [g, m] = i.useState(null), y = i.useRef(!1), w = C ? !!c || !!C.closest("form") : !0, R = {
|
|
1299
|
+
checked: b,
|
|
1300
1300
|
disabled: a,
|
|
1301
1301
|
setChecked: h,
|
|
1302
|
-
control:
|
|
1302
|
+
control: C,
|
|
1303
1303
|
setControl: v,
|
|
1304
1304
|
name: r,
|
|
1305
1305
|
form: c,
|
|
1306
1306
|
value: u,
|
|
1307
1307
|
hasConsumerStoppedPropagationRef: y,
|
|
1308
|
-
required:
|
|
1309
|
-
defaultChecked: M(
|
|
1308
|
+
required: o,
|
|
1309
|
+
defaultChecked: M(s) ? !1 : s,
|
|
1310
1310
|
isFormControl: w,
|
|
1311
1311
|
bubbleInput: g,
|
|
1312
1312
|
setBubbleInput: m
|
|
@@ -1325,8 +1325,8 @@ const st = "CheckboxTrigger", rt = i.forwardRef(
|
|
|
1325
1325
|
__scopeCheckbox: e,
|
|
1326
1326
|
onKeyDown: t,
|
|
1327
1327
|
onClick: n,
|
|
1328
|
-
...
|
|
1329
|
-
},
|
|
1328
|
+
...s
|
|
1329
|
+
}, o) => {
|
|
1330
1330
|
const {
|
|
1331
1331
|
control: r,
|
|
1332
1332
|
value: c,
|
|
@@ -1335,10 +1335,10 @@ const st = "CheckboxTrigger", rt = i.forwardRef(
|
|
|
1335
1335
|
required: d,
|
|
1336
1336
|
setControl: f,
|
|
1337
1337
|
setChecked: p,
|
|
1338
|
-
hasConsumerStoppedPropagationRef:
|
|
1338
|
+
hasConsumerStoppedPropagationRef: b,
|
|
1339
1339
|
isFormControl: h,
|
|
1340
|
-
bubbleInput:
|
|
1341
|
-
} =
|
|
1340
|
+
bubbleInput: C
|
|
1341
|
+
} = ke(st, e), v = D(o, f), g = i.useRef(u);
|
|
1342
1342
|
return i.useEffect(() => {
|
|
1343
1343
|
const m = r?.form;
|
|
1344
1344
|
if (m) {
|
|
@@ -1356,13 +1356,13 @@ const st = "CheckboxTrigger", rt = i.forwardRef(
|
|
|
1356
1356
|
"data-disabled": a ? "" : void 0,
|
|
1357
1357
|
disabled: a,
|
|
1358
1358
|
value: c,
|
|
1359
|
-
...
|
|
1359
|
+
...s,
|
|
1360
1360
|
ref: v,
|
|
1361
1361
|
onKeyDown: B(t, (m) => {
|
|
1362
1362
|
m.key === "Enter" && m.preventDefault();
|
|
1363
1363
|
}),
|
|
1364
1364
|
onClick: B(n, (m) => {
|
|
1365
|
-
p((y) => M(y) ? !0 : !y),
|
|
1365
|
+
p((y) => M(y) ? !0 : !y), C && h && (b.current = m.isPropagationStopped(), b.current || m.stopPropagation());
|
|
1366
1366
|
})
|
|
1367
1367
|
}
|
|
1368
1368
|
);
|
|
@@ -1373,8 +1373,8 @@ const at = i.forwardRef(
|
|
|
1373
1373
|
(e, t) => {
|
|
1374
1374
|
const {
|
|
1375
1375
|
__scopeCheckbox: n,
|
|
1376
|
-
name:
|
|
1377
|
-
checked:
|
|
1376
|
+
name: s,
|
|
1377
|
+
checked: o,
|
|
1378
1378
|
defaultChecked: r,
|
|
1379
1379
|
required: c,
|
|
1380
1380
|
disabled: a,
|
|
@@ -1387,15 +1387,15 @@ const at = i.forwardRef(
|
|
|
1387
1387
|
Eo,
|
|
1388
1388
|
{
|
|
1389
1389
|
__scopeCheckbox: n,
|
|
1390
|
-
checked:
|
|
1390
|
+
checked: o,
|
|
1391
1391
|
defaultChecked: r,
|
|
1392
1392
|
required: c,
|
|
1393
|
-
name:
|
|
1393
|
+
name: s,
|
|
1394
1394
|
form: f,
|
|
1395
1395
|
disabled: a,
|
|
1396
1396
|
value: u,
|
|
1397
1397
|
onCheckedChange: d,
|
|
1398
|
-
__internal: ({ isFormControl:
|
|
1398
|
+
__internal: ({ isFormControl: b }) => /* @__PURE__ */ S($e, { children: [
|
|
1399
1399
|
/* @__PURE__ */ l(
|
|
1400
1400
|
rt,
|
|
1401
1401
|
{
|
|
@@ -1404,7 +1404,7 @@ const at = i.forwardRef(
|
|
|
1404
1404
|
__scopeCheckbox: n
|
|
1405
1405
|
}
|
|
1406
1406
|
),
|
|
1407
|
-
|
|
1407
|
+
b && /* @__PURE__ */ l(
|
|
1408
1408
|
it,
|
|
1409
1409
|
{
|
|
1410
1410
|
__scopeCheckbox: n
|
|
@@ -1417,8 +1417,8 @@ const at = i.forwardRef(
|
|
|
1417
1417
|
), ct = "CheckboxBubbleInput", it = i.forwardRef(
|
|
1418
1418
|
({ __scopeCheckbox: e, ...t }, n) => {
|
|
1419
1419
|
const {
|
|
1420
|
-
control:
|
|
1421
|
-
checked:
|
|
1420
|
+
control: s,
|
|
1421
|
+
checked: o,
|
|
1422
1422
|
defaultChecked: r,
|
|
1423
1423
|
required: c,
|
|
1424
1424
|
disabled: a,
|
|
@@ -1426,9 +1426,9 @@ const at = i.forwardRef(
|
|
|
1426
1426
|
value: d,
|
|
1427
1427
|
form: f,
|
|
1428
1428
|
bubbleInput: p,
|
|
1429
|
-
setBubbleInput:
|
|
1429
|
+
setBubbleInput: b,
|
|
1430
1430
|
hasConsumerStoppedPropagationRef: h
|
|
1431
|
-
} =
|
|
1431
|
+
} = ke(ct, e), C = D(n, b), v = Ce(o), g = ve(s);
|
|
1432
1432
|
i.useEffect(() => {
|
|
1433
1433
|
const y = p;
|
|
1434
1434
|
if (!y) return;
|
|
@@ -1436,12 +1436,12 @@ const at = i.forwardRef(
|
|
|
1436
1436
|
w,
|
|
1437
1437
|
"checked"
|
|
1438
1438
|
).set, x = !h.current;
|
|
1439
|
-
if (v !==
|
|
1439
|
+
if (v !== o && T) {
|
|
1440
1440
|
const H = new Event("click", { bubbles: x });
|
|
1441
|
-
y.indeterminate = M(
|
|
1441
|
+
y.indeterminate = M(o), T.call(y, M(o) ? !1 : o), y.dispatchEvent(H);
|
|
1442
1442
|
}
|
|
1443
|
-
}, [p, v,
|
|
1444
|
-
const m = i.useRef(M(
|
|
1443
|
+
}, [p, v, o, h]);
|
|
1444
|
+
const m = i.useRef(M(o) ? !1 : o);
|
|
1445
1445
|
return /* @__PURE__ */ l(
|
|
1446
1446
|
k.input,
|
|
1447
1447
|
{
|
|
@@ -1455,7 +1455,7 @@ const at = i.forwardRef(
|
|
|
1455
1455
|
form: f,
|
|
1456
1456
|
...t,
|
|
1457
1457
|
tabIndex: -1,
|
|
1458
|
-
ref:
|
|
1458
|
+
ref: C,
|
|
1459
1459
|
style: {
|
|
1460
1460
|
...t.style,
|
|
1461
1461
|
...g,
|
|
@@ -1470,20 +1470,20 @@ const at = i.forwardRef(
|
|
|
1470
1470
|
}
|
|
1471
1471
|
);
|
|
1472
1472
|
it.displayName = ct;
|
|
1473
|
-
const lt = "CheckboxIndicator",
|
|
1474
|
-
const { __scopeCheckbox: n, forceMount:
|
|
1475
|
-
return /* @__PURE__ */ l(
|
|
1473
|
+
const lt = "CheckboxIndicator", Pe = i.forwardRef((e, t) => {
|
|
1474
|
+
const { __scopeCheckbox: n, forceMount: s, ...o } = e, r = ke(lt, n);
|
|
1475
|
+
return /* @__PURE__ */ l(qe, { remain: s || M(r.checked) || r.checked === !0, children: /* @__PURE__ */ l(
|
|
1476
1476
|
k.span,
|
|
1477
1477
|
{
|
|
1478
1478
|
"data-state": ut(r.checked),
|
|
1479
1479
|
"data-disabled": r.disabled ? "" : void 0,
|
|
1480
|
-
...
|
|
1480
|
+
...o,
|
|
1481
1481
|
ref: t,
|
|
1482
1482
|
style: { pointerEvents: "none", ...e.style }
|
|
1483
1483
|
}
|
|
1484
1484
|
) });
|
|
1485
1485
|
});
|
|
1486
|
-
|
|
1486
|
+
Pe.displayName = lt;
|
|
1487
1487
|
function Do(e) {
|
|
1488
1488
|
return typeof e == "function";
|
|
1489
1489
|
}
|
|
@@ -1496,26 +1496,26 @@ function ut(e) {
|
|
|
1496
1496
|
const To = i.forwardRef((e, t) => {
|
|
1497
1497
|
const {
|
|
1498
1498
|
className: n,
|
|
1499
|
-
checked:
|
|
1500
|
-
defaultChecked:
|
|
1499
|
+
checked: s,
|
|
1500
|
+
defaultChecked: o = !1,
|
|
1501
1501
|
onCheckedChange: r,
|
|
1502
1502
|
...c
|
|
1503
|
-
} =
|
|
1504
|
-
prop:
|
|
1505
|
-
defaultProp:
|
|
1503
|
+
} = P(e, nt), [a, u] = _({
|
|
1504
|
+
prop: s,
|
|
1505
|
+
defaultProp: o,
|
|
1506
1506
|
onChange: r
|
|
1507
1507
|
});
|
|
1508
1508
|
return /* @__PURE__ */ l(
|
|
1509
1509
|
at,
|
|
1510
1510
|
{
|
|
1511
1511
|
...c,
|
|
1512
|
-
defaultChecked:
|
|
1512
|
+
defaultChecked: o,
|
|
1513
1513
|
checked: a,
|
|
1514
1514
|
onCheckedChange: u,
|
|
1515
1515
|
asChild: !1,
|
|
1516
1516
|
ref: t,
|
|
1517
1517
|
className: N("bd-reset", "bd-CheckboxRoot", n),
|
|
1518
|
-
children: /* @__PURE__ */ l(
|
|
1518
|
+
children: /* @__PURE__ */ l(Pe, { asChild: !0, className: "bd-CheckboxIndicator", children: a === "indeterminate" ? /* @__PURE__ */ l(wo, {}) : /* @__PURE__ */ l(xe, {}) })
|
|
1519
1519
|
}
|
|
1520
1520
|
);
|
|
1521
1521
|
});
|
|
@@ -1523,15 +1523,15 @@ To.displayName = "Checkbox";
|
|
|
1523
1523
|
const Z = {
|
|
1524
1524
|
...U,
|
|
1525
1525
|
...nt
|
|
1526
|
-
},
|
|
1527
|
-
|
|
1526
|
+
}, Ie = "CheckboxGroup", [_o, dt] = A(
|
|
1527
|
+
Ie,
|
|
1528
1528
|
[ye, ot]
|
|
1529
|
-
), pt = ye(), ft = ot(), [Bo, Ao] = _o(
|
|
1529
|
+
), pt = ye(), ft = ot(), [Bo, Ao] = _o(Ie), mt = i.forwardRef(
|
|
1530
1530
|
(e, t) => {
|
|
1531
1531
|
const {
|
|
1532
1532
|
__scopeCheckboxGroup: n,
|
|
1533
|
-
name:
|
|
1534
|
-
defaultValue:
|
|
1533
|
+
name: s,
|
|
1534
|
+
defaultValue: o,
|
|
1535
1535
|
value: r,
|
|
1536
1536
|
required: c = !1,
|
|
1537
1537
|
disabled: a = !1,
|
|
@@ -1539,28 +1539,28 @@ const Z = {
|
|
|
1539
1539
|
orientation: d,
|
|
1540
1540
|
onValueChange: f,
|
|
1541
1541
|
...p
|
|
1542
|
-
} = e,
|
|
1542
|
+
} = e, b = pt(n), [h = [], C] = _({
|
|
1543
1543
|
prop: r,
|
|
1544
|
-
defaultProp:
|
|
1544
|
+
defaultProp: o || [],
|
|
1545
1545
|
onChange: f
|
|
1546
1546
|
}), v = i.useCallback(
|
|
1547
|
-
(m) =>
|
|
1548
|
-
[
|
|
1547
|
+
(m) => C((y = []) => [...y, m]),
|
|
1548
|
+
[C]
|
|
1549
1549
|
), g = i.useCallback(
|
|
1550
|
-
(m) =>
|
|
1551
|
-
[
|
|
1550
|
+
(m) => C((y = []) => y.filter((w) => w !== m)),
|
|
1551
|
+
[C]
|
|
1552
1552
|
);
|
|
1553
1553
|
return /* @__PURE__ */ l(
|
|
1554
1554
|
Bo,
|
|
1555
1555
|
{
|
|
1556
1556
|
scope: n,
|
|
1557
|
-
name:
|
|
1557
|
+
name: s,
|
|
1558
1558
|
required: c,
|
|
1559
1559
|
disabled: a,
|
|
1560
1560
|
value: h,
|
|
1561
1561
|
onItemCheck: v,
|
|
1562
1562
|
onItemUnCheck: g,
|
|
1563
|
-
children: /* @__PURE__ */ l(
|
|
1563
|
+
children: /* @__PURE__ */ l(Xe, { asChild: !0, ...b, orientation: d, loop: u, children: /* @__PURE__ */ l(
|
|
1564
1564
|
k.div,
|
|
1565
1565
|
{
|
|
1566
1566
|
role: "group",
|
|
@@ -1573,11 +1573,11 @@ const Z = {
|
|
|
1573
1573
|
);
|
|
1574
1574
|
}
|
|
1575
1575
|
);
|
|
1576
|
-
mt.displayName =
|
|
1576
|
+
mt.displayName = Ie;
|
|
1577
1577
|
const ht = "CheckboxGroupItem", gt = i.forwardRef((e, t) => {
|
|
1578
|
-
const { __scopeCheckboxGroup: n, disabled:
|
|
1578
|
+
const { __scopeCheckboxGroup: n, disabled: s, ...o } = e, r = Ao(ht, n), c = r.disabled || s, a = pt(n), u = ft(n), d = i.useRef(null), f = D(t, d), p = r.value?.includes(o.value);
|
|
1579
1579
|
return /* @__PURE__ */ l(
|
|
1580
|
-
|
|
1580
|
+
Ze,
|
|
1581
1581
|
{
|
|
1582
1582
|
asChild: !0,
|
|
1583
1583
|
...a,
|
|
@@ -1591,10 +1591,10 @@ const ht = "CheckboxGroupItem", gt = i.forwardRef((e, t) => {
|
|
|
1591
1591
|
required: r.required,
|
|
1592
1592
|
checked: p,
|
|
1593
1593
|
...u,
|
|
1594
|
-
...
|
|
1594
|
+
...o,
|
|
1595
1595
|
ref: f,
|
|
1596
|
-
onCheckedChange: (
|
|
1597
|
-
|
|
1596
|
+
onCheckedChange: (b) => {
|
|
1597
|
+
b ? r.onItemCheck(e.value) : r.onItemUnCheck(e.value);
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
1600
|
)
|
|
@@ -1603,8 +1603,8 @@ const ht = "CheckboxGroupItem", gt = i.forwardRef((e, t) => {
|
|
|
1603
1603
|
});
|
|
1604
1604
|
gt.displayName = ht;
|
|
1605
1605
|
const Mo = "CheckboxGroupIndicator", bt = i.forwardRef((e, t) => {
|
|
1606
|
-
const { __scopeCheckboxGroup: n, ...
|
|
1607
|
-
return /* @__PURE__ */ l(
|
|
1606
|
+
const { __scopeCheckboxGroup: n, ...s } = e, o = ft(n);
|
|
1607
|
+
return /* @__PURE__ */ l(Pe, { ...o, ...s, ref: t });
|
|
1608
1608
|
});
|
|
1609
1609
|
bt.displayName = Mo;
|
|
1610
1610
|
const K = "CheckboxGroup", [Oo] = A(K, [
|
|
@@ -1613,13 +1613,13 @@ const K = "CheckboxGroup", [Oo] = A(K, [
|
|
|
1613
1613
|
(e, t) => {
|
|
1614
1614
|
const {
|
|
1615
1615
|
size: n = Z.size.default,
|
|
1616
|
-
variant:
|
|
1617
|
-
...
|
|
1618
|
-
} = e, { __scopeCheckboxGroup: r, className: c, ...a } =
|
|
1619
|
-
|
|
1616
|
+
variant: s = Z.variant.default,
|
|
1617
|
+
...o
|
|
1618
|
+
} = e, { __scopeCheckboxGroup: r, className: c, ...a } = P(
|
|
1619
|
+
o,
|
|
1620
1620
|
Z
|
|
1621
1621
|
), u = Ct(r);
|
|
1622
|
-
return /* @__PURE__ */ l(Fo, { scope: r, size: n, variant:
|
|
1622
|
+
return /* @__PURE__ */ l(Fo, { scope: r, size: n, variant: s, children: /* @__PURE__ */ l(
|
|
1623
1623
|
mt,
|
|
1624
1624
|
{
|
|
1625
1625
|
...u,
|
|
@@ -1633,13 +1633,13 @@ const K = "CheckboxGroup", [Oo] = A(K, [
|
|
|
1633
1633
|
yt.displayName = K;
|
|
1634
1634
|
const wt = i.forwardRef(
|
|
1635
1635
|
(e, t) => {
|
|
1636
|
-
const { __scopeCheckboxGroup: n, children:
|
|
1637
|
-
return
|
|
1638
|
-
|
|
1636
|
+
const { __scopeCheckboxGroup: n, children: s, className: o, style: r, ...c } = e, { size: a } = vt("CheckboxGroupItem", n);
|
|
1637
|
+
return s ? /* @__PURE__ */ S(
|
|
1638
|
+
Re,
|
|
1639
1639
|
{
|
|
1640
1640
|
as: "label",
|
|
1641
1641
|
size: a,
|
|
1642
|
-
className: N("bd-CheckboxGroupItem",
|
|
1642
|
+
className: N("bd-CheckboxGroupItem", o),
|
|
1643
1643
|
style: r,
|
|
1644
1644
|
children: [
|
|
1645
1645
|
/* @__PURE__ */ l(
|
|
@@ -1650,7 +1650,7 @@ const wt = i.forwardRef(
|
|
|
1650
1650
|
ref: t
|
|
1651
1651
|
}
|
|
1652
1652
|
),
|
|
1653
|
-
|
|
1653
|
+
s && /* @__PURE__ */ l("span", { className: "bd-CheckboxGroupItemInner", children: s })
|
|
1654
1654
|
]
|
|
1655
1655
|
}
|
|
1656
1656
|
) : /* @__PURE__ */ l(
|
|
@@ -1659,7 +1659,7 @@ const wt = i.forwardRef(
|
|
|
1659
1659
|
__scopeCheckboxGroup: n,
|
|
1660
1660
|
...c,
|
|
1661
1661
|
ref: t,
|
|
1662
|
-
className:
|
|
1662
|
+
className: o,
|
|
1663
1663
|
style: r
|
|
1664
1664
|
}
|
|
1665
1665
|
);
|
|
@@ -1667,11 +1667,11 @@ const wt = i.forwardRef(
|
|
|
1667
1667
|
);
|
|
1668
1668
|
wt.displayName = `${K}.Item`;
|
|
1669
1669
|
const he = i.forwardRef(({ __scopeCheckboxGroup: e, ...t }, n) => {
|
|
1670
|
-
const
|
|
1670
|
+
const s = vt("CheckboxGroupItemCheckbox", e), o = Ct(e), { className: r } = P({ ...t, ...s }, Z);
|
|
1671
1671
|
return /* @__PURE__ */ l(
|
|
1672
1672
|
gt,
|
|
1673
1673
|
{
|
|
1674
|
-
...
|
|
1674
|
+
...o,
|
|
1675
1675
|
...t,
|
|
1676
1676
|
ref: n,
|
|
1677
1677
|
className: N(
|
|
@@ -1680,7 +1680,7 @@ const he = i.forwardRef(({ __scopeCheckboxGroup: e, ...t }, n) => {
|
|
|
1680
1680
|
"bd-CheckboxGroupItemCheckbox",
|
|
1681
1681
|
r
|
|
1682
1682
|
),
|
|
1683
|
-
children: /* @__PURE__ */ l(bt, { ...
|
|
1683
|
+
children: /* @__PURE__ */ l(bt, { ...o, asChild: !0, className: "bd-CheckboxIndicator", children: /* @__PURE__ */ l(xe, {}) })
|
|
1684
1684
|
}
|
|
1685
1685
|
);
|
|
1686
1686
|
});
|
|
@@ -1691,34 +1691,34 @@ const Gs = {
|
|
|
1691
1691
|
}, Go = ["1", "2", "3", "4"], Vo = ["classic", "outline"], $o = {
|
|
1692
1692
|
size: { type: "enum", className: "bd-size", values: Go, default: "2" },
|
|
1693
1693
|
variant: { type: "enum", className: "bd-variant", values: Vo, default: "classic" }
|
|
1694
|
-
},
|
|
1694
|
+
}, Ee = "Radio", [Lo, Rt] = A(Ee), [zo, Uo] = Lo(Ee), De = i.forwardRef(
|
|
1695
1695
|
(e, t) => {
|
|
1696
1696
|
const {
|
|
1697
1697
|
__scopeRadio: n,
|
|
1698
|
-
name:
|
|
1699
|
-
checked:
|
|
1698
|
+
name: s,
|
|
1699
|
+
checked: o = !1,
|
|
1700
1700
|
required: r,
|
|
1701
1701
|
disabled: c,
|
|
1702
1702
|
value: a = "on",
|
|
1703
1703
|
onCheck: u,
|
|
1704
1704
|
form: d,
|
|
1705
1705
|
...f
|
|
1706
|
-
} = e, [p,
|
|
1707
|
-
return /* @__PURE__ */ S(zo, { scope: n, checked:
|
|
1706
|
+
} = e, [p, b] = i.useState(null), h = D(t, b), C = i.useRef(!1), v = p ? d || !!p.closest("form") : !0;
|
|
1707
|
+
return /* @__PURE__ */ S(zo, { scope: n, checked: o, disabled: c, children: [
|
|
1708
1708
|
/* @__PURE__ */ l(
|
|
1709
1709
|
k.button,
|
|
1710
1710
|
{
|
|
1711
1711
|
type: "button",
|
|
1712
1712
|
role: "radio",
|
|
1713
|
-
"aria-checked":
|
|
1714
|
-
"data-state": kt(
|
|
1713
|
+
"aria-checked": o,
|
|
1714
|
+
"data-state": kt(o),
|
|
1715
1715
|
"data-disabled": c ? "" : void 0,
|
|
1716
1716
|
disabled: c,
|
|
1717
1717
|
value: a,
|
|
1718
1718
|
...f,
|
|
1719
1719
|
ref: h,
|
|
1720
1720
|
onClick: B(e.onClick, (g) => {
|
|
1721
|
-
|
|
1721
|
+
o || u?.(), v && (C.current = g.isPropagationStopped(), C.current || g.stopPropagation());
|
|
1722
1722
|
})
|
|
1723
1723
|
}
|
|
1724
1724
|
),
|
|
@@ -1726,10 +1726,10 @@ const Gs = {
|
|
|
1726
1726
|
St,
|
|
1727
1727
|
{
|
|
1728
1728
|
control: p,
|
|
1729
|
-
bubbles: !
|
|
1730
|
-
name:
|
|
1729
|
+
bubbles: !C.current,
|
|
1730
|
+
name: s,
|
|
1731
1731
|
value: a,
|
|
1732
|
-
checked:
|
|
1732
|
+
checked: o,
|
|
1733
1733
|
required: r,
|
|
1734
1734
|
disabled: c,
|
|
1735
1735
|
form: d,
|
|
@@ -1739,16 +1739,16 @@ const Gs = {
|
|
|
1739
1739
|
] });
|
|
1740
1740
|
}
|
|
1741
1741
|
);
|
|
1742
|
-
|
|
1742
|
+
De.displayName = Ee;
|
|
1743
1743
|
const Nt = "RadioIndicator", xt = i.forwardRef(
|
|
1744
1744
|
(e, t) => {
|
|
1745
|
-
const { __scopeRadio: n, forceMount:
|
|
1746
|
-
return /* @__PURE__ */ l(
|
|
1745
|
+
const { __scopeRadio: n, forceMount: s, ...o } = e, r = Uo(Nt, n);
|
|
1746
|
+
return /* @__PURE__ */ l(qe, { remain: s || r.checked, children: /* @__PURE__ */ l(
|
|
1747
1747
|
k.span,
|
|
1748
1748
|
{
|
|
1749
1749
|
"data-state": kt(r.checked),
|
|
1750
1750
|
"data-disabled": r.disabled ? "" : void 0,
|
|
1751
|
-
...
|
|
1751
|
+
...o,
|
|
1752
1752
|
ref: t
|
|
1753
1753
|
}
|
|
1754
1754
|
) });
|
|
@@ -1756,18 +1756,18 @@ const Nt = "RadioIndicator", xt = i.forwardRef(
|
|
|
1756
1756
|
);
|
|
1757
1757
|
xt.displayName = Nt;
|
|
1758
1758
|
const Ho = "RadioBubbleInput", St = i.forwardRef(
|
|
1759
|
-
({ control: e, checked: t, bubbles: n = !0, ...
|
|
1760
|
-
const r = i.useRef(null), c =
|
|
1759
|
+
({ control: e, checked: t, bubbles: n = !0, ...s }, o) => {
|
|
1760
|
+
const r = i.useRef(null), c = D(r, o), a = Ce(t), u = ve(e);
|
|
1761
1761
|
return i.useEffect(() => {
|
|
1762
1762
|
const d = r.current;
|
|
1763
1763
|
if (!d) return;
|
|
1764
|
-
const f = window.HTMLInputElement.prototype,
|
|
1764
|
+
const f = window.HTMLInputElement.prototype, b = Object.getOwnPropertyDescriptor(
|
|
1765
1765
|
f,
|
|
1766
1766
|
"checked"
|
|
1767
1767
|
).set;
|
|
1768
|
-
if (a !== t &&
|
|
1768
|
+
if (a !== t && b) {
|
|
1769
1769
|
const h = new Event("click", { bubbles: n });
|
|
1770
|
-
|
|
1770
|
+
b.call(d, t), d.dispatchEvent(h);
|
|
1771
1771
|
}
|
|
1772
1772
|
}, [a, t, n]), /* @__PURE__ */ l(
|
|
1773
1773
|
k.input,
|
|
@@ -1775,11 +1775,11 @@ const Ho = "RadioBubbleInput", St = i.forwardRef(
|
|
|
1775
1775
|
type: "radio",
|
|
1776
1776
|
"aria-hidden": !0,
|
|
1777
1777
|
defaultChecked: t,
|
|
1778
|
-
...
|
|
1778
|
+
...s,
|
|
1779
1779
|
tabIndex: -1,
|
|
1780
1780
|
ref: c,
|
|
1781
1781
|
style: {
|
|
1782
|
-
...
|
|
1782
|
+
...s.style,
|
|
1783
1783
|
...u,
|
|
1784
1784
|
position: "absolute",
|
|
1785
1785
|
pointerEvents: "none",
|
|
@@ -1797,20 +1797,20 @@ function kt(e) {
|
|
|
1797
1797
|
const Yo = i.forwardRef((e, t) => {
|
|
1798
1798
|
const {
|
|
1799
1799
|
className: n,
|
|
1800
|
-
checked:
|
|
1801
|
-
defaultChecked:
|
|
1800
|
+
checked: s,
|
|
1801
|
+
defaultChecked: o = !1,
|
|
1802
1802
|
onCheck: r,
|
|
1803
1803
|
...c
|
|
1804
|
-
} =
|
|
1805
|
-
prop:
|
|
1806
|
-
defaultProp:
|
|
1804
|
+
} = P(e, $o), [a, u] = _({
|
|
1805
|
+
prop: s,
|
|
1806
|
+
defaultProp: o,
|
|
1807
1807
|
onChange: r
|
|
1808
1808
|
});
|
|
1809
1809
|
return /* @__PURE__ */ l(
|
|
1810
|
-
|
|
1810
|
+
De,
|
|
1811
1811
|
{
|
|
1812
1812
|
...c,
|
|
1813
|
-
defaultChecked:
|
|
1813
|
+
defaultChecked: o,
|
|
1814
1814
|
checked: a,
|
|
1815
1815
|
onCheck: () => u((d) => !d),
|
|
1816
1816
|
ref: t,
|
|
@@ -1826,8 +1826,8 @@ const jo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], se = "RadioGroup
|
|
|
1826
1826
|
(e, t) => {
|
|
1827
1827
|
const {
|
|
1828
1828
|
__scopeRadioGroup: n,
|
|
1829
|
-
name:
|
|
1830
|
-
defaultValue:
|
|
1829
|
+
name: s,
|
|
1830
|
+
defaultValue: o,
|
|
1831
1831
|
value: r,
|
|
1832
1832
|
required: c = !1,
|
|
1833
1833
|
disabled: a = !1,
|
|
@@ -1835,9 +1835,9 @@ const jo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], se = "RadioGroup
|
|
|
1835
1835
|
loop: d = !0,
|
|
1836
1836
|
onValueChange: f,
|
|
1837
1837
|
...p
|
|
1838
|
-
} = e,
|
|
1838
|
+
} = e, b = It(n), [h, C] = _({
|
|
1839
1839
|
prop: r,
|
|
1840
|
-
defaultProp:
|
|
1840
|
+
defaultProp: o ?? null,
|
|
1841
1841
|
onChange: f,
|
|
1842
1842
|
caller: se
|
|
1843
1843
|
});
|
|
@@ -1845,12 +1845,12 @@ const jo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], se = "RadioGroup
|
|
|
1845
1845
|
Ko,
|
|
1846
1846
|
{
|
|
1847
1847
|
scope: n,
|
|
1848
|
-
name:
|
|
1848
|
+
name: s,
|
|
1849
1849
|
required: c,
|
|
1850
1850
|
disabled: a,
|
|
1851
1851
|
value: h,
|
|
1852
|
-
onValueChange:
|
|
1853
|
-
children: /* @__PURE__ */ l(
|
|
1852
|
+
onValueChange: C,
|
|
1853
|
+
children: /* @__PURE__ */ l(Xe, { asChild: !0, ...b, orientation: u, loop: d, children: /* @__PURE__ */ l(
|
|
1854
1854
|
k.div,
|
|
1855
1855
|
{
|
|
1856
1856
|
role: "radiogroup",
|
|
@@ -1868,37 +1868,37 @@ const jo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], se = "RadioGroup
|
|
|
1868
1868
|
Dt.displayName = se;
|
|
1869
1869
|
const Tt = "RadioGroupItem", _t = i.forwardRef(
|
|
1870
1870
|
(e, t) => {
|
|
1871
|
-
const { __scopeRadioGroup: n, disabled:
|
|
1871
|
+
const { __scopeRadioGroup: n, disabled: s, ...o } = e, r = Wo(Tt, n), c = r.disabled || s, a = It(n), u = Et(n), d = i.useRef(null), f = D(t, d), p = r.value === o.value, b = i.useRef(!1);
|
|
1872
1872
|
return i.useEffect(() => {
|
|
1873
1873
|
const h = (v) => {
|
|
1874
|
-
jo.includes(v.key) && (
|
|
1875
|
-
},
|
|
1876
|
-
return document.addEventListener("keydown", h), document.addEventListener("keyup",
|
|
1877
|
-
document.removeEventListener("keydown", h), document.removeEventListener("keyup",
|
|
1874
|
+
jo.includes(v.key) && (b.current = !0);
|
|
1875
|
+
}, C = () => b.current = !1;
|
|
1876
|
+
return document.addEventListener("keydown", h), document.addEventListener("keyup", C), () => {
|
|
1877
|
+
document.removeEventListener("keydown", h), document.removeEventListener("keyup", C);
|
|
1878
1878
|
};
|
|
1879
1879
|
}, []), /* @__PURE__ */ l(
|
|
1880
|
-
|
|
1880
|
+
Ze,
|
|
1881
1881
|
{
|
|
1882
1882
|
asChild: !0,
|
|
1883
1883
|
...a,
|
|
1884
1884
|
focusable: !c,
|
|
1885
1885
|
active: p,
|
|
1886
1886
|
children: /* @__PURE__ */ l(
|
|
1887
|
-
|
|
1887
|
+
De,
|
|
1888
1888
|
{
|
|
1889
1889
|
name: r.name,
|
|
1890
1890
|
disabled: c,
|
|
1891
1891
|
required: r.required,
|
|
1892
1892
|
checked: p,
|
|
1893
1893
|
...u,
|
|
1894
|
-
...
|
|
1894
|
+
...o,
|
|
1895
1895
|
ref: f,
|
|
1896
|
-
onCheck: () => r.onValueChange(
|
|
1896
|
+
onCheck: () => r.onValueChange(o.value),
|
|
1897
1897
|
onKeyDown: B((h) => {
|
|
1898
1898
|
h.key === "Enter" && h.preventDefault();
|
|
1899
1899
|
}),
|
|
1900
|
-
onFocus: B(
|
|
1901
|
-
|
|
1900
|
+
onFocus: B(o.onFocus, () => {
|
|
1901
|
+
b.current && d.current?.click();
|
|
1902
1902
|
})
|
|
1903
1903
|
}
|
|
1904
1904
|
)
|
|
@@ -1908,8 +1908,8 @@ const Tt = "RadioGroupItem", _t = i.forwardRef(
|
|
|
1908
1908
|
);
|
|
1909
1909
|
_t.displayName = Tt;
|
|
1910
1910
|
const Xo = "RadioGroupBaseIndicator", Zo = i.forwardRef((e, t) => {
|
|
1911
|
-
const { __scopeRadioGroup: n, ...
|
|
1912
|
-
return /* @__PURE__ */ l(xt, { ...
|
|
1911
|
+
const { __scopeRadioGroup: n, ...s } = e, o = Et(n);
|
|
1912
|
+
return /* @__PURE__ */ l(xt, { ...o, ...s, ref: t });
|
|
1913
1913
|
});
|
|
1914
1914
|
Zo.displayName = Xo;
|
|
1915
1915
|
const Jo = ["1", "2", "3"], Qo = ["classic", "outline"], J = {
|
|
@@ -1922,17 +1922,17 @@ const Jo = ["1", "2", "3"], Qo = ["classic", "outline"], J = {
|
|
|
1922
1922
|
size: e = J.size.default,
|
|
1923
1923
|
variant: t = J.variant.default,
|
|
1924
1924
|
...n
|
|
1925
|
-
},
|
|
1926
|
-
const { __scopeRadioGroup:
|
|
1925
|
+
}, s) => {
|
|
1926
|
+
const { __scopeRadioGroup: o, className: r, ...c } = P(
|
|
1927
1927
|
n,
|
|
1928
1928
|
J
|
|
1929
|
-
), a = Bt(
|
|
1930
|
-
return /* @__PURE__ */ l(ts, { scope:
|
|
1929
|
+
), a = Bt(o);
|
|
1930
|
+
return /* @__PURE__ */ l(ts, { scope: o, size: e, variant: t, children: /* @__PURE__ */ l(
|
|
1931
1931
|
Dt,
|
|
1932
1932
|
{
|
|
1933
1933
|
...a,
|
|
1934
1934
|
...c,
|
|
1935
|
-
ref:
|
|
1935
|
+
ref: s,
|
|
1936
1936
|
className: N("bd-RadioGroupRoot", r)
|
|
1937
1937
|
}
|
|
1938
1938
|
) });
|
|
@@ -1941,13 +1941,13 @@ const Jo = ["1", "2", "3"], Qo = ["classic", "outline"], J = {
|
|
|
1941
1941
|
Mt.displayName = W;
|
|
1942
1942
|
const Ot = i.forwardRef(
|
|
1943
1943
|
(e, t) => {
|
|
1944
|
-
const { __scopeRadioGroup: n, children:
|
|
1945
|
-
return
|
|
1946
|
-
|
|
1944
|
+
const { __scopeRadioGroup: n, children: s, className: o, style: r, ...c } = e, { size: a } = At("RadioGroupItem", n);
|
|
1945
|
+
return s ? /* @__PURE__ */ S(
|
|
1946
|
+
Re,
|
|
1947
1947
|
{
|
|
1948
1948
|
as: "label",
|
|
1949
1949
|
size: a,
|
|
1950
|
-
className: N("bd-RadioGroupItem",
|
|
1950
|
+
className: N("bd-RadioGroupItem", o),
|
|
1951
1951
|
style: r,
|
|
1952
1952
|
children: [
|
|
1953
1953
|
/* @__PURE__ */ l(
|
|
@@ -1958,7 +1958,7 @@ const Ot = i.forwardRef(
|
|
|
1958
1958
|
ref: t
|
|
1959
1959
|
}
|
|
1960
1960
|
),
|
|
1961
|
-
|
|
1961
|
+
s && /* @__PURE__ */ l("span", { className: "bd-RadioGroupItemInner", children: s })
|
|
1962
1962
|
]
|
|
1963
1963
|
}
|
|
1964
1964
|
) : /* @__PURE__ */ l(
|
|
@@ -1967,7 +1967,7 @@ const Ot = i.forwardRef(
|
|
|
1967
1967
|
__scopeRadioGroup: n,
|
|
1968
1968
|
...c,
|
|
1969
1969
|
ref: t,
|
|
1970
|
-
className:
|
|
1970
|
+
className: o,
|
|
1971
1971
|
style: r
|
|
1972
1972
|
}
|
|
1973
1973
|
);
|
|
@@ -1975,11 +1975,11 @@ const Ot = i.forwardRef(
|
|
|
1975
1975
|
);
|
|
1976
1976
|
Ot.displayName = `${W}.Item`;
|
|
1977
1977
|
const ge = i.forwardRef(({ __scopeRadioGroup: e, ...t }, n) => {
|
|
1978
|
-
const
|
|
1978
|
+
const s = At("RadioGroupItemRadio", e), o = Bt(e), { className: r } = P({ ...t, ...s }, J);
|
|
1979
1979
|
return /* @__PURE__ */ l(
|
|
1980
1980
|
_t,
|
|
1981
1981
|
{
|
|
1982
|
-
...
|
|
1982
|
+
...o,
|
|
1983
1983
|
...t,
|
|
1984
1984
|
asChild: !1,
|
|
1985
1985
|
ref: n,
|
|
@@ -1992,18 +1992,18 @@ const Vs = {
|
|
|
1992
1992
|
Root: Mt,
|
|
1993
1993
|
Item: Ot
|
|
1994
1994
|
}, Ft = i.forwardRef(
|
|
1995
|
-
({ children: e, maxHeight: t, className: n, style:
|
|
1995
|
+
({ children: e, maxHeight: t, className: n, style: s, onScroll: o, onScrollBottom: r, ...c }, a) => /* @__PURE__ */ l(
|
|
1996
1996
|
"div",
|
|
1997
1997
|
{
|
|
1998
1998
|
ref: a,
|
|
1999
1999
|
onScroll: (d) => {
|
|
2000
|
-
if (
|
|
2001
|
-
const { scrollTop: f, scrollHeight: p, clientHeight:
|
|
2002
|
-
p - f <=
|
|
2000
|
+
if (o && o(d), r) {
|
|
2001
|
+
const { scrollTop: f, scrollHeight: p, clientHeight: b } = d.currentTarget;
|
|
2002
|
+
p - f <= b + 10 && r();
|
|
2003
2003
|
}
|
|
2004
2004
|
},
|
|
2005
2005
|
className: `bd-ScrollArea ${n || ""}`,
|
|
2006
|
-
style: { ...
|
|
2006
|
+
style: { ...s, maxHeight: t },
|
|
2007
2007
|
...c,
|
|
2008
2008
|
children: e
|
|
2009
2009
|
}
|
|
@@ -2013,83 +2013,88 @@ Ft.displayName = "ScrollArea";
|
|
|
2013
2013
|
const ns = ["1", "2", "3", "4", "5"], os = ["classic", "underlined", "rounded"], ss = {
|
|
2014
2014
|
size: { type: "enum", className: "bd-size", values: ns, default: "2" },
|
|
2015
2015
|
variant: { type: "enum", className: "bd-variant", values: os, default: "classic" },
|
|
2016
|
+
...we,
|
|
2016
2017
|
...O
|
|
2017
2018
|
}, rs = {
|
|
2018
|
-
gap:
|
|
2019
|
+
gap: Ne.gap,
|
|
2019
2020
|
px: L.px,
|
|
2020
2021
|
pl: L.pl,
|
|
2021
2022
|
pr: L.pr
|
|
2022
|
-
},
|
|
2023
|
+
}, Te = {
|
|
2023
2024
|
...ss,
|
|
2024
2025
|
...rs
|
|
2025
|
-
}, ee = "SelectBox", [
|
|
2026
|
+
}, ee = "SelectBox", [as] = A(ee), [cs, re] = as(ee), Gt = ({
|
|
2026
2027
|
__scopeSelect: e,
|
|
2027
2028
|
value: t,
|
|
2028
2029
|
defaultValue: n,
|
|
2029
|
-
onValueChange:
|
|
2030
|
-
open:
|
|
2030
|
+
onValueChange: s,
|
|
2031
|
+
open: o,
|
|
2031
2032
|
defaultOpen: r,
|
|
2032
2033
|
onOpenChange: c,
|
|
2033
2034
|
variant: a = "classic",
|
|
2034
|
-
|
|
2035
|
+
size: u = "2",
|
|
2036
|
+
weight: d = "regular",
|
|
2037
|
+
children: f
|
|
2035
2038
|
}) => {
|
|
2036
|
-
const [
|
|
2039
|
+
const [p, b] = _({
|
|
2037
2040
|
prop: t,
|
|
2038
2041
|
defaultProp: n ?? "",
|
|
2039
|
-
onChange:
|
|
2042
|
+
onChange: s,
|
|
2040
2043
|
caller: ee
|
|
2041
|
-
}), [
|
|
2042
|
-
prop:
|
|
2044
|
+
}), [h, C] = _({
|
|
2045
|
+
prop: o,
|
|
2043
2046
|
defaultProp: r ?? !1,
|
|
2044
2047
|
onChange: c,
|
|
2045
2048
|
caller: `${ee}.Open`
|
|
2046
|
-
}),
|
|
2049
|
+
}), v = i.useRef(null), g = Ue();
|
|
2047
2050
|
return /* @__PURE__ */ l(
|
|
2048
|
-
|
|
2051
|
+
cs,
|
|
2049
2052
|
{
|
|
2050
2053
|
scope: e,
|
|
2051
|
-
value:
|
|
2052
|
-
onValueChange:
|
|
2053
|
-
open:
|
|
2054
|
+
value: p,
|
|
2055
|
+
onValueChange: b,
|
|
2056
|
+
open: h,
|
|
2054
2057
|
onOpenChange: C,
|
|
2055
|
-
triggerRef:
|
|
2056
|
-
contentId:
|
|
2058
|
+
triggerRef: v,
|
|
2059
|
+
contentId: g,
|
|
2057
2060
|
variant: a,
|
|
2058
|
-
|
|
2061
|
+
size: u,
|
|
2062
|
+
weight: d,
|
|
2063
|
+
children: f
|
|
2059
2064
|
}
|
|
2060
2065
|
);
|
|
2061
|
-
}, Vt = "SelectBoxTrigger",
|
|
2066
|
+
}, Vt = "SelectBoxTrigger", _e = i.forwardRef(
|
|
2062
2067
|
(e, t) => {
|
|
2063
|
-
const { __scopeSelect: n, children:
|
|
2068
|
+
const { __scopeSelect: n, children: s, onClick: o, onKeyDown: r, ...c } = e, a = re(Vt, n), u = D(t, a.triggerRef), { className: d, style: f, ...p } = P(c, Te), b = !a.value || a.value === "";
|
|
2064
2069
|
return /* @__PURE__ */ l(
|
|
2065
2070
|
k.button,
|
|
2066
2071
|
{
|
|
2067
2072
|
type: "button",
|
|
2068
2073
|
role: "combobox",
|
|
2069
2074
|
"aria-expanded": a.open,
|
|
2070
|
-
"data-placeholder":
|
|
2075
|
+
"data-placeholder": b ? "" : void 0,
|
|
2071
2076
|
className: `bd-SelectBoxTrigger ${d || ""}`,
|
|
2072
2077
|
style: f,
|
|
2073
2078
|
...p,
|
|
2074
2079
|
ref: u,
|
|
2075
2080
|
onClick: (h) => {
|
|
2076
|
-
a.onOpenChange(!a.open),
|
|
2081
|
+
a.onOpenChange(!a.open), o?.(h);
|
|
2077
2082
|
},
|
|
2078
2083
|
onKeyDown: (h) => {
|
|
2079
2084
|
!a.open && (h.key === "ArrowDown" || h.key === "Enter" || h.key === " ") && (h.preventDefault(), a.onOpenChange(!0)), r?.(h);
|
|
2080
2085
|
},
|
|
2081
|
-
children:
|
|
2086
|
+
children: s
|
|
2082
2087
|
}
|
|
2083
2088
|
);
|
|
2084
2089
|
}
|
|
2085
2090
|
);
|
|
2086
|
-
|
|
2087
|
-
const $t = "SelectBoxContent",
|
|
2088
|
-
const a = re($t, e), u = i.useRef(null), d =
|
|
2089
|
-
|
|
2091
|
+
_e.displayName = Vt;
|
|
2092
|
+
const $t = "SelectBoxContent", Be = i.forwardRef(({ __scopeSelect: e, children: t, className: n, style: s, onKeyDown: o, ...r }, c) => {
|
|
2093
|
+
const a = re($t, e), u = i.useRef(null), d = D(c, u);
|
|
2094
|
+
Ye(u, (v) => {
|
|
2090
2095
|
a.triggerRef.current?.contains(v.target) || a.open && a.onOpenChange(!1);
|
|
2091
2096
|
});
|
|
2092
|
-
const f = a.variant === "rounded" ? 8 : 0, { styles: p, isPositioned:
|
|
2097
|
+
const f = a.variant === "rounded" ? 8 : 0, { styles: p, isPositioned: b } = He(
|
|
2093
2098
|
a.triggerRef,
|
|
2094
2099
|
u,
|
|
2095
2100
|
a.open,
|
|
@@ -2132,10 +2137,10 @@ const $t = "SelectBoxContent", Te = i.forwardRef(({ __scopeSelect: e, children:
|
|
|
2132
2137
|
a.onOpenChange(!1);
|
|
2133
2138
|
break;
|
|
2134
2139
|
}
|
|
2135
|
-
|
|
2140
|
+
o?.(v);
|
|
2136
2141
|
};
|
|
2137
2142
|
if (!a.open) return null;
|
|
2138
|
-
const
|
|
2143
|
+
const C = /* @__PURE__ */ l(
|
|
2139
2144
|
k.div,
|
|
2140
2145
|
{
|
|
2141
2146
|
id: a.contentId,
|
|
@@ -2147,19 +2152,22 @@ const $t = "SelectBoxContent", Te = i.forwardRef(({ __scopeSelect: e, children:
|
|
|
2147
2152
|
ref: d,
|
|
2148
2153
|
style: {
|
|
2149
2154
|
...p,
|
|
2150
|
-
...
|
|
2151
|
-
transition:
|
|
2155
|
+
...s,
|
|
2156
|
+
transition: b ? "opacity 0.2s ease, transform 0.2s ease" : "none",
|
|
2152
2157
|
overflow: "hidden"
|
|
2153
2158
|
},
|
|
2154
2159
|
children: t
|
|
2155
2160
|
}
|
|
2156
2161
|
);
|
|
2157
|
-
return /* @__PURE__ */ l(
|
|
2162
|
+
return /* @__PURE__ */ l(je, { children: C });
|
|
2158
2163
|
});
|
|
2159
|
-
|
|
2160
|
-
const Lt = "SelectBoxItem",
|
|
2161
|
-
({ __scopeSelect: e, value: t, onClick: n, className:
|
|
2162
|
-
const a = re(Lt, e), u = a.value === t
|
|
2164
|
+
Be.displayName = $t;
|
|
2165
|
+
const Lt = "SelectBoxItem", Ae = i.forwardRef(
|
|
2166
|
+
({ __scopeSelect: e, value: t, onClick: n, className: s, children: o, ...r }, c) => {
|
|
2167
|
+
const a = re(Lt, e), u = a.value === t, { className: d, style: f } = P(
|
|
2168
|
+
{ size: a.size, weight: a.weight },
|
|
2169
|
+
Te
|
|
2170
|
+
);
|
|
2163
2171
|
return /* @__PURE__ */ l(
|
|
2164
2172
|
k.div,
|
|
2165
2173
|
{
|
|
@@ -2167,69 +2175,81 @@ const Lt = "SelectBoxItem", _e = i.forwardRef(
|
|
|
2167
2175
|
tabIndex: -1,
|
|
2168
2176
|
"aria-selected": u,
|
|
2169
2177
|
"data-state": u ? "checked" : "unchecked",
|
|
2170
|
-
className: `bd-SelectBoxItem bd-variant-${a.variant} ${
|
|
2178
|
+
className: `bd-SelectBoxItem bd-variant-${a.variant} ${d || ""} ${s || ""}`,
|
|
2179
|
+
style: f,
|
|
2171
2180
|
...r,
|
|
2172
2181
|
ref: c,
|
|
2173
|
-
onClick: (
|
|
2174
|
-
const
|
|
2175
|
-
a.onValueChange(
|
|
2182
|
+
onClick: (p) => {
|
|
2183
|
+
const b = typeof o == "string" ? o : t;
|
|
2184
|
+
a.onValueChange(b), a.onOpenChange(!1), a.triggerRef.current?.focus(), n?.(p);
|
|
2176
2185
|
},
|
|
2177
|
-
children:
|
|
2186
|
+
children: o
|
|
2178
2187
|
}
|
|
2179
2188
|
);
|
|
2180
2189
|
}
|
|
2181
2190
|
);
|
|
2182
|
-
|
|
2183
|
-
const
|
|
2184
|
-
({ __scopeSelect: e, className: t, children: n, placeholder:
|
|
2185
|
-
const c = re(
|
|
2186
|
-
|
|
2191
|
+
Ae.displayName = Lt;
|
|
2192
|
+
const is = "SelectBoxValue", zt = i.forwardRef(
|
|
2193
|
+
({ __scopeSelect: e, className: t, children: n, placeholder: s, ...o }, r) => {
|
|
2194
|
+
const c = re(is, e), a = c.value ? c.value : n || s, { className: u, style: d } = P(
|
|
2195
|
+
{ weight: c.weight },
|
|
2196
|
+
Te
|
|
2197
|
+
);
|
|
2198
|
+
return /* @__PURE__ */ l(
|
|
2199
|
+
k.span,
|
|
2200
|
+
{
|
|
2201
|
+
className: `bd-SelectBoxValue ${u || ""} ${t || ""}`,
|
|
2202
|
+
style: d,
|
|
2203
|
+
...o,
|
|
2204
|
+
ref: r,
|
|
2205
|
+
children: a
|
|
2206
|
+
}
|
|
2207
|
+
);
|
|
2187
2208
|
}
|
|
2188
|
-
)
|
|
2189
|
-
|
|
2190
|
-
const ls = "SelectBoxSlot", Ae = i.forwardRef(
|
|
2191
|
-
({ __scopeSelect: e, className: t, side: n = "right", "data-chevron": o, children: s, ...r }, c) => /* @__PURE__ */ l(
|
|
2209
|
+
), ls = "SelectBoxSlot", Me = i.forwardRef(
|
|
2210
|
+
({ __scopeSelect: e, className: t, side: n = "right", "data-chevron": s, children: o, ...r }, c) => /* @__PURE__ */ l(
|
|
2192
2211
|
k.div,
|
|
2193
2212
|
{
|
|
2194
2213
|
"aria-hidden": "true",
|
|
2195
2214
|
"data-side": n,
|
|
2196
|
-
"data-chevron":
|
|
2215
|
+
"data-chevron": s ? "true" : void 0,
|
|
2197
2216
|
className: `bd-SelectBoxSlot ${t || ""}`,
|
|
2198
2217
|
...r,
|
|
2199
2218
|
ref: c,
|
|
2200
|
-
children:
|
|
2219
|
+
children: o || /* @__PURE__ */ l(xo, {})
|
|
2201
2220
|
}
|
|
2202
2221
|
)
|
|
2203
2222
|
);
|
|
2204
|
-
|
|
2223
|
+
Me.displayName = ls;
|
|
2205
2224
|
const us = ({
|
|
2206
2225
|
options: e,
|
|
2207
2226
|
placeholder: t = "선택하세요",
|
|
2208
2227
|
size: n = "2",
|
|
2228
|
+
weight: s = "regular",
|
|
2209
2229
|
variant: o = "classic",
|
|
2210
|
-
disabled:
|
|
2211
|
-
maxHeight:
|
|
2212
|
-
onScrollBottom:
|
|
2213
|
-
...
|
|
2214
|
-
}) => /* @__PURE__ */ S(Gt, { ...
|
|
2215
|
-
/* @__PURE__ */ S(
|
|
2216
|
-
/* @__PURE__ */ l(
|
|
2217
|
-
/* @__PURE__ */ l(
|
|
2230
|
+
disabled: r = !1,
|
|
2231
|
+
maxHeight: c,
|
|
2232
|
+
onScrollBottom: a,
|
|
2233
|
+
...u
|
|
2234
|
+
}) => /* @__PURE__ */ S(Gt, { ...u, variant: o, size: n, weight: s, children: [
|
|
2235
|
+
/* @__PURE__ */ S(_e, { size: n, variant: o, disabled: r, children: [
|
|
2236
|
+
/* @__PURE__ */ l(zt, { placeholder: t }),
|
|
2237
|
+
/* @__PURE__ */ l(Me, { "data-chevron": !0 })
|
|
2218
2238
|
] }),
|
|
2219
|
-
/* @__PURE__ */ l(
|
|
2239
|
+
/* @__PURE__ */ l(Be, { children: /* @__PURE__ */ l(Ft, { maxHeight: c, onScrollBottom: a, children: e.map((d) => /* @__PURE__ */ l(Ae, { value: d.value, children: d.label }, d.value)) }) })
|
|
2220
2240
|
] }), $s = Object.assign(us, {
|
|
2221
2241
|
Root: Gt,
|
|
2222
|
-
Trigger:
|
|
2223
|
-
Content:
|
|
2224
|
-
Item:
|
|
2225
|
-
Value:
|
|
2226
|
-
Slot:
|
|
2242
|
+
Trigger: _e,
|
|
2243
|
+
Content: Be,
|
|
2244
|
+
Item: Ae,
|
|
2245
|
+
Value: zt,
|
|
2246
|
+
Slot: Me
|
|
2227
2247
|
}), ae = "Switch", [ds] = A(ae), [ps, fs] = ds(ae), Ut = i.forwardRef(
|
|
2228
2248
|
(e, t) => {
|
|
2229
2249
|
const {
|
|
2230
2250
|
__scopeSwitch: n,
|
|
2231
|
-
name:
|
|
2232
|
-
checked:
|
|
2251
|
+
name: s,
|
|
2252
|
+
checked: o,
|
|
2233
2253
|
defaultChecked: r,
|
|
2234
2254
|
required: c,
|
|
2235
2255
|
disabled: a,
|
|
@@ -2237,8 +2257,8 @@ const us = ({
|
|
|
2237
2257
|
onCheckedChange: d,
|
|
2238
2258
|
form: f,
|
|
2239
2259
|
...p
|
|
2240
|
-
} = e, [
|
|
2241
|
-
prop:
|
|
2260
|
+
} = e, [b, h] = i.useState(null), C = D(t, (w) => h(w)), v = i.useRef(!1), g = b ? f || !!b.closest("form") : !0, [m, y] = _({
|
|
2261
|
+
prop: o,
|
|
2242
2262
|
defaultProp: r ?? !1,
|
|
2243
2263
|
onChange: d,
|
|
2244
2264
|
caller: ae
|
|
@@ -2256,7 +2276,7 @@ const us = ({
|
|
|
2256
2276
|
disabled: a,
|
|
2257
2277
|
value: u,
|
|
2258
2278
|
...p,
|
|
2259
|
-
ref:
|
|
2279
|
+
ref: C,
|
|
2260
2280
|
onClick: B(e.onClick, (w) => {
|
|
2261
2281
|
y((R) => !R), g && (v.current = w.isPropagationStopped(), v.current || w.stopPropagation());
|
|
2262
2282
|
})
|
|
@@ -2265,9 +2285,9 @@ const us = ({
|
|
|
2265
2285
|
g && /* @__PURE__ */ l(
|
|
2266
2286
|
jt,
|
|
2267
2287
|
{
|
|
2268
|
-
control:
|
|
2288
|
+
control: b,
|
|
2269
2289
|
bubbles: !v.current,
|
|
2270
|
-
name:
|
|
2290
|
+
name: s,
|
|
2271
2291
|
value: u,
|
|
2272
2292
|
checked: m,
|
|
2273
2293
|
required: c,
|
|
@@ -2282,13 +2302,13 @@ const us = ({
|
|
|
2282
2302
|
Ut.displayName = ae;
|
|
2283
2303
|
const Ht = "SwitchThumb", Yt = i.forwardRef(
|
|
2284
2304
|
(e, t) => {
|
|
2285
|
-
const { __scopeSwitch: n, ...
|
|
2305
|
+
const { __scopeSwitch: n, ...s } = e, o = fs(Ht, n);
|
|
2286
2306
|
return /* @__PURE__ */ l(
|
|
2287
2307
|
k.span,
|
|
2288
2308
|
{
|
|
2289
|
-
"data-state": qt(
|
|
2290
|
-
"data-disabled":
|
|
2291
|
-
...
|
|
2309
|
+
"data-state": qt(o.checked),
|
|
2310
|
+
"data-disabled": o.disabled ? "" : void 0,
|
|
2311
|
+
...s,
|
|
2292
2312
|
ref: t
|
|
2293
2313
|
}
|
|
2294
2314
|
);
|
|
@@ -2297,7 +2317,7 @@ const Ht = "SwitchThumb", Yt = i.forwardRef(
|
|
|
2297
2317
|
Yt.displayName = Ht;
|
|
2298
2318
|
const ms = "SwitchBubbleInput", jt = i.forwardRef(
|
|
2299
2319
|
(e, t) => {
|
|
2300
|
-
const { checked: n, control:
|
|
2320
|
+
const { checked: n, control: s, bubbles: o = !0, ...r } = e, c = i.useRef(null), a = D(c, t), u = Ce(n), d = ve(s);
|
|
2301
2321
|
return i.useEffect(() => {
|
|
2302
2322
|
const f = c.current;
|
|
2303
2323
|
if (!f) return;
|
|
@@ -2306,10 +2326,10 @@ const ms = "SwitchBubbleInput", jt = i.forwardRef(
|
|
|
2306
2326
|
"checked"
|
|
2307
2327
|
).set;
|
|
2308
2328
|
if (u !== n && h) {
|
|
2309
|
-
const
|
|
2310
|
-
h.call(f, n), f.dispatchEvent(
|
|
2329
|
+
const C = new Event("click", { bubbles: o });
|
|
2330
|
+
h.call(f, n), f.dispatchEvent(C);
|
|
2311
2331
|
}
|
|
2312
|
-
}, [u, n,
|
|
2332
|
+
}, [u, n, o]), /* @__PURE__ */ l(
|
|
2313
2333
|
"input",
|
|
2314
2334
|
{
|
|
2315
2335
|
type: "checkbox",
|
|
@@ -2338,11 +2358,11 @@ const hs = ["1", "2", "3"], gs = {
|
|
|
2338
2358
|
size: { type: "enum", className: "bd-size", values: hs, default: "2" },
|
|
2339
2359
|
...O
|
|
2340
2360
|
}, bs = i.forwardRef((e, t) => {
|
|
2341
|
-
const { className: n, ...
|
|
2361
|
+
const { className: n, ...s } = P(e, gs);
|
|
2342
2362
|
return /* @__PURE__ */ l(
|
|
2343
2363
|
Ut,
|
|
2344
2364
|
{
|
|
2345
|
-
...
|
|
2365
|
+
...s,
|
|
2346
2366
|
asChild: !1,
|
|
2347
2367
|
ref: t,
|
|
2348
2368
|
className: N("bd-reset", "bd-SwitchRoot", n),
|
|
@@ -2358,13 +2378,13 @@ const Cs = ["1", "2", "3", "4", "5"], vs = ["classic", "underlined", "rounded"],
|
|
|
2358
2378
|
...$n
|
|
2359
2379
|
}, ws = ["left", "right"], Rs = {
|
|
2360
2380
|
side: { type: "enum", values: ws },
|
|
2361
|
-
gap:
|
|
2381
|
+
gap: Ne.gap,
|
|
2362
2382
|
px: L.px,
|
|
2363
2383
|
pl: L.pl,
|
|
2364
2384
|
pr: L.pr
|
|
2365
2385
|
}, Kt = i.forwardRef(
|
|
2366
2386
|
(e, t) => {
|
|
2367
|
-
const n = i.useRef(null), { children:
|
|
2387
|
+
const n = i.useRef(null), { children: s, className: o, style: r, ...c } = P(
|
|
2368
2388
|
e,
|
|
2369
2389
|
ys
|
|
2370
2390
|
);
|
|
@@ -2372,7 +2392,7 @@ const Cs = ["1", "2", "3", "4", "5"], vs = ["classic", "underlined", "rounded"],
|
|
|
2372
2392
|
"div",
|
|
2373
2393
|
{
|
|
2374
2394
|
style: r,
|
|
2375
|
-
className: N("bd-TextFieldRoot",
|
|
2395
|
+
className: N("bd-TextFieldRoot", o),
|
|
2376
2396
|
onPointerDown: (a) => {
|
|
2377
2397
|
const u = a.target;
|
|
2378
2398
|
if (u.closest("input, button, a")) return;
|
|
@@ -2400,7 +2420,7 @@ const Cs = ["1", "2", "3", "4", "5"], vs = ["classic", "underlined", "rounded"],
|
|
|
2400
2420
|
className: "bd-reset bd-TextFieldInput"
|
|
2401
2421
|
}
|
|
2402
2422
|
),
|
|
2403
|
-
|
|
2423
|
+
s
|
|
2404
2424
|
]
|
|
2405
2425
|
}
|
|
2406
2426
|
);
|
|
@@ -2409,12 +2429,12 @@ const Cs = ["1", "2", "3", "4", "5"], vs = ["classic", "underlined", "rounded"],
|
|
|
2409
2429
|
Kt.displayName = "TextFieldRoot";
|
|
2410
2430
|
const Wt = i.forwardRef(
|
|
2411
2431
|
(e, t) => {
|
|
2412
|
-
const { className: n, side:
|
|
2432
|
+
const { className: n, side: s, ...o } = P(e, Rs);
|
|
2413
2433
|
return /* @__PURE__ */ l(
|
|
2414
2434
|
"div",
|
|
2415
2435
|
{
|
|
2416
|
-
"data-side":
|
|
2417
|
-
...
|
|
2436
|
+
"data-side": s,
|
|
2437
|
+
...o,
|
|
2418
2438
|
ref: t,
|
|
2419
2439
|
className: N("bd-TextFieldSlot", n)
|
|
2420
2440
|
}
|
|
@@ -2426,7 +2446,7 @@ const Ls = Object.assign(Kt, { Slot: Wt }), Ns = (e, t) => new Date(e, t + 1, 0)
|
|
|
2426
2446
|
const e = /* @__PURE__ */ new Date();
|
|
2427
2447
|
return e.setHours(0, 0, 0, 0), e;
|
|
2428
2448
|
}, Xt = "Calendar", [Ss] = A(Xt), [ks, F] = Ss(Xt), Ps = (e) => {
|
|
2429
|
-
const { variant: t = "single", size: n = "2", children:
|
|
2449
|
+
const { variant: t = "single", size: n = "2", children: s } = e, o = i.useRef(null), [r, c] = _({
|
|
2430
2450
|
prop: e.open,
|
|
2431
2451
|
defaultProp: e.defaultOpen || !1,
|
|
2432
2452
|
onChange: e.onOpenChange,
|
|
@@ -2441,11 +2461,11 @@ const Ls = Object.assign(Kt, { Slot: Wt }), Ns = (e, t) => new Date(e, t + 1, 0)
|
|
|
2441
2461
|
defaultProp: e.defaultRangeValue ?? { start: null, end: null },
|
|
2442
2462
|
onChange: e.onRangeValueChange,
|
|
2443
2463
|
caller: "CalendarRoot (range)"
|
|
2444
|
-
}), [p,
|
|
2464
|
+
}), [p, b] = i.useState("date"), [h, C] = i.useState(
|
|
2445
2465
|
a || d.start || j()
|
|
2446
2466
|
);
|
|
2447
2467
|
i.useEffect(() => {
|
|
2448
|
-
t === "single" && a && !isNaN(a.getTime()) ?
|
|
2468
|
+
t === "single" && a && !isNaN(a.getTime()) ? C(a) : t === "range" && d.start && !isNaN(d.start.getTime()) && C(d.start);
|
|
2449
2469
|
}, [d.start, a, t]);
|
|
2450
2470
|
const v = i.useRef(a), g = i.useRef(d);
|
|
2451
2471
|
i.useEffect(() => {
|
|
@@ -2462,15 +2482,15 @@ const Ls = Object.assign(Kt, { Slot: Wt }), Ns = (e, t) => new Date(e, t + 1, 0)
|
|
|
2462
2482
|
scope: void 0,
|
|
2463
2483
|
open: r,
|
|
2464
2484
|
setOpen: (R) => {
|
|
2465
|
-
c(R), R ||
|
|
2485
|
+
c(R), R || b("date");
|
|
2466
2486
|
},
|
|
2467
|
-
triggerRef:
|
|
2487
|
+
triggerRef: o,
|
|
2468
2488
|
variant: t,
|
|
2469
2489
|
size: n,
|
|
2470
2490
|
viewMode: p,
|
|
2471
|
-
setViewMode:
|
|
2491
|
+
setViewMode: b,
|
|
2472
2492
|
viewingDate: h,
|
|
2473
|
-
setViewingDate:
|
|
2493
|
+
setViewingDate: C,
|
|
2474
2494
|
singleDate: a || j(),
|
|
2475
2495
|
setSingleDate: u,
|
|
2476
2496
|
startDate: d.start || j(),
|
|
@@ -2480,19 +2500,19 @@ const Ls = Object.assign(Kt, { Slot: Wt }), Ns = (e, t) => new Date(e, t + 1, 0)
|
|
|
2480
2500
|
resetRange: () => f({ start: null, end: null }),
|
|
2481
2501
|
onConfirm: m,
|
|
2482
2502
|
onCancel: y,
|
|
2483
|
-
children:
|
|
2503
|
+
children: s
|
|
2484
2504
|
}
|
|
2485
2505
|
);
|
|
2486
2506
|
}, Zt = i.forwardRef(
|
|
2487
2507
|
({ children: e }, t) => {
|
|
2488
|
-
const n = F("CalendarTrigger", void 0),
|
|
2489
|
-
return i.cloneElement(
|
|
2490
|
-
ref: q(t, n.triggerRef,
|
|
2508
|
+
const n = F("CalendarTrigger", void 0), s = ze(e), o = be(s);
|
|
2509
|
+
return i.cloneElement(s, {
|
|
2510
|
+
ref: q(t, n.triggerRef, o),
|
|
2491
2511
|
onFocus: (r) => {
|
|
2492
|
-
n.setOpen(!0),
|
|
2512
|
+
n.setOpen(!0), s.props.onFocus?.(r);
|
|
2493
2513
|
},
|
|
2494
2514
|
onClick: (r) => {
|
|
2495
|
-
n.setOpen(!0),
|
|
2515
|
+
n.setOpen(!0), s.props.onClick?.(r);
|
|
2496
2516
|
}
|
|
2497
2517
|
});
|
|
2498
2518
|
}
|
|
@@ -2500,7 +2520,7 @@ const Ls = Object.assign(Kt, { Slot: Wt }), Ns = (e, t) => new Date(e, t + 1, 0)
|
|
|
2500
2520
|
Zt.displayName = "CalendarTrigger";
|
|
2501
2521
|
const Jt = i.forwardRef(
|
|
2502
2522
|
(e, t) => {
|
|
2503
|
-
const { className: n, style:
|
|
2523
|
+
const { className: n, style: s, ...o } = e, r = F("CalendarContent", void 0), c = i.useRef(null), { styles: a, isPositioned: u } = He(
|
|
2504
2524
|
r.triggerRef,
|
|
2505
2525
|
c,
|
|
2506
2526
|
r.open,
|
|
@@ -2508,7 +2528,7 @@ const Jt = i.forwardRef(
|
|
|
2508
2528
|
"start",
|
|
2509
2529
|
!1
|
|
2510
2530
|
);
|
|
2511
|
-
if (
|
|
2531
|
+
if (Ye(c, (p) => {
|
|
2512
2532
|
r.triggerRef.current?.contains(p.target) || r.setOpen(!1);
|
|
2513
2533
|
}), !r.open) return null;
|
|
2514
2534
|
const d = () => {
|
|
@@ -2516,12 +2536,12 @@ const Jt = i.forwardRef(
|
|
|
2516
2536
|
}, f = () => {
|
|
2517
2537
|
r.onCancel();
|
|
2518
2538
|
};
|
|
2519
|
-
return /* @__PURE__ */ l(
|
|
2520
|
-
|
|
2539
|
+
return /* @__PURE__ */ l(je, { children: /* @__PURE__ */ S(
|
|
2540
|
+
E,
|
|
2521
2541
|
{
|
|
2522
2542
|
direction: "column",
|
|
2523
2543
|
gap: "4",
|
|
2524
|
-
...
|
|
2544
|
+
...o,
|
|
2525
2545
|
ref: q(c, t),
|
|
2526
2546
|
className: N(
|
|
2527
2547
|
"bd-CalendarContent",
|
|
@@ -2529,7 +2549,7 @@ const Jt = i.forwardRef(
|
|
|
2529
2549
|
`bd-variant-${r.variant}`,
|
|
2530
2550
|
n
|
|
2531
2551
|
),
|
|
2532
|
-
style: { ...
|
|
2552
|
+
style: { ...s, ...a, visibility: u ? "visible" : "hidden" },
|
|
2533
2553
|
onPointerDown: (p) => {
|
|
2534
2554
|
p.preventDefault();
|
|
2535
2555
|
},
|
|
@@ -2537,7 +2557,7 @@ const Jt = i.forwardRef(
|
|
|
2537
2557
|
r.variant === "range" && /* @__PURE__ */ l(Is, {}),
|
|
2538
2558
|
/* @__PURE__ */ l(Es, {}),
|
|
2539
2559
|
/* @__PURE__ */ l(Ds, {}),
|
|
2540
|
-
/* @__PURE__ */ S(
|
|
2560
|
+
/* @__PURE__ */ S(E, { justify: "center", gap: "2", children: [
|
|
2541
2561
|
/* @__PURE__ */ l(
|
|
2542
2562
|
me,
|
|
2543
2563
|
{
|
|
@@ -2558,14 +2578,14 @@ const Jt = i.forwardRef(
|
|
|
2558
2578
|
);
|
|
2559
2579
|
Jt.displayName = "CalendarContent";
|
|
2560
2580
|
const Is = () => {
|
|
2561
|
-
const e = F("CalendarRangeHeader", void 0), t = (n) => n ? `${n.getFullYear()}.${String(n.getMonth() + 1).padStart(2, "0")}.${String(n.getDate()).padStart(2, "0")}` : /* @__PURE__ */ S(
|
|
2562
|
-
/* @__PURE__ */ l(
|
|
2581
|
+
const e = F("CalendarRangeHeader", void 0), t = (n) => n ? `${n.getFullYear()}.${String(n.getMonth() + 1).padStart(2, "0")}.${String(n.getDate()).padStart(2, "0")}` : /* @__PURE__ */ S(E, { align: "center", gap: "1", children: [
|
|
2582
|
+
/* @__PURE__ */ l(xe, { width: 12, height: 12 }),
|
|
2563
2583
|
"범위 추가"
|
|
2564
2584
|
] });
|
|
2565
|
-
return /* @__PURE__ */ S(
|
|
2566
|
-
/* @__PURE__ */ S(
|
|
2585
|
+
return /* @__PURE__ */ S(E, { direction: "column", className: "bd-CalendarRangeHeader", children: [
|
|
2586
|
+
/* @__PURE__ */ S(E, { gap: "2", children: [
|
|
2567
2587
|
/* @__PURE__ */ l(
|
|
2568
|
-
|
|
2588
|
+
E,
|
|
2569
2589
|
{
|
|
2570
2590
|
align: "center",
|
|
2571
2591
|
justify: "between",
|
|
@@ -2574,7 +2594,7 @@ const Is = () => {
|
|
|
2574
2594
|
}
|
|
2575
2595
|
),
|
|
2576
2596
|
/* @__PURE__ */ l(
|
|
2577
|
-
|
|
2597
|
+
E,
|
|
2578
2598
|
{
|
|
2579
2599
|
align: "center",
|
|
2580
2600
|
justify: "between",
|
|
@@ -2587,7 +2607,7 @@ const Is = () => {
|
|
|
2587
2607
|
)
|
|
2588
2608
|
] }),
|
|
2589
2609
|
/* @__PURE__ */ l(
|
|
2590
|
-
|
|
2610
|
+
E,
|
|
2591
2611
|
{
|
|
2592
2612
|
justify: "end",
|
|
2593
2613
|
onClick: () => {
|
|
@@ -2598,27 +2618,27 @@ const Is = () => {
|
|
|
2598
2618
|
)
|
|
2599
2619
|
] });
|
|
2600
2620
|
}, Es = () => {
|
|
2601
|
-
const e = F("CalendarNavigation", void 0), { viewingDate: t, setViewingDate: n, viewMode:
|
|
2621
|
+
const e = F("CalendarNavigation", void 0), { viewingDate: t, setViewingDate: n, viewMode: s, setViewMode: o } = e, r = () => {
|
|
2602
2622
|
const a = new Date(t);
|
|
2603
|
-
|
|
2623
|
+
s === "date" ? a.setMonth(a.getMonth() - 1) : s === "year" ? a.setFullYear(a.getFullYear() - 28) : a.setFullYear(a.getFullYear() - 1), n(a);
|
|
2604
2624
|
}, c = () => {
|
|
2605
2625
|
const a = new Date(t);
|
|
2606
|
-
|
|
2626
|
+
s === "date" ? a.setMonth(a.getMonth() + 1) : s === "year" ? a.setFullYear(a.getFullYear() + 28) : a.setFullYear(a.getFullYear() + 1), n(a);
|
|
2607
2627
|
};
|
|
2608
|
-
return /* @__PURE__ */ S(
|
|
2628
|
+
return /* @__PURE__ */ S(E, { justify: "between", align: "center", children: [
|
|
2609
2629
|
/* @__PURE__ */ S(
|
|
2610
2630
|
"div",
|
|
2611
2631
|
{
|
|
2612
2632
|
className: "bd-CalendarNavTitle bd-weight-medium",
|
|
2613
|
-
onClick: () => s
|
|
2633
|
+
onClick: () => o(s === "date" ? "month" : s === "month" ? "year" : "date"),
|
|
2614
2634
|
children: [
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2635
|
+
s === "date" && `${t.getFullYear()}년 ${t.getMonth() + 1}월`,
|
|
2636
|
+
s === "month" && `${t.getFullYear()}년`,
|
|
2637
|
+
s === "year" && `${t.getFullYear()}년`
|
|
2618
2638
|
]
|
|
2619
2639
|
}
|
|
2620
2640
|
),
|
|
2621
|
-
/* @__PURE__ */ S(
|
|
2641
|
+
/* @__PURE__ */ S(E, { gap: "2", children: [
|
|
2622
2642
|
/* @__PURE__ */ l("button", { onClick: r, className: "bd-CalendarNavBtn", children: /* @__PURE__ */ l(Ro, { width: 16 }) }),
|
|
2623
2643
|
/* @__PURE__ */ l("button", { onClick: c, className: "bd-CalendarNavBtn", children: /* @__PURE__ */ l(No, { width: 16 }) })
|
|
2624
2644
|
] })
|
|
@@ -2627,7 +2647,7 @@ const Is = () => {
|
|
|
2627
2647
|
const e = F("CalendarBody", void 0);
|
|
2628
2648
|
return e.viewMode === "year" ? /* @__PURE__ */ l(Bs, {}) : e.viewMode === "month" ? /* @__PURE__ */ l(_s, {}) : /* @__PURE__ */ l(Ts, {});
|
|
2629
2649
|
}, Ts = () => {
|
|
2630
|
-
const e = F("DateGrid", void 0), { viewingDate: t, singleDate: n, startDate:
|
|
2650
|
+
const e = F("DateGrid", void 0), { viewingDate: t, singleDate: n, startDate: s, endDate: o } = e, r = t.getFullYear(), c = t.getMonth(), a = Ns(r, c), u = xs(r, c), d = new Date(r, c, 0).getDate(), f = ["일", "월", "화", "수", "목", "금", "토"], p = [];
|
|
2631
2651
|
for (let m = u - 1; m >= 0; m--)
|
|
2632
2652
|
p.push({
|
|
2633
2653
|
date: new Date(r, c - 1, d - m),
|
|
@@ -2638,21 +2658,21 @@ const Is = () => {
|
|
|
2638
2658
|
date: new Date(r, c, m),
|
|
2639
2659
|
isCurrentMonth: !0
|
|
2640
2660
|
});
|
|
2641
|
-
const
|
|
2661
|
+
const b = p.length, h = b % 7 === 0 ? 0 : 7 - b % 7;
|
|
2642
2662
|
for (let m = 1; m <= h; m++)
|
|
2643
2663
|
p.push({
|
|
2644
2664
|
date: new Date(r, c + 1, m),
|
|
2645
2665
|
isCurrentMonth: !1
|
|
2646
2666
|
});
|
|
2647
|
-
const
|
|
2648
|
-
m.getMonth() !== c && e.setViewingDate(m), e.variant === "single" ? e.setSingleDate(m) : !
|
|
2667
|
+
const C = (m) => {
|
|
2668
|
+
m.getMonth() !== c && e.setViewingDate(m), e.variant === "single" ? e.setSingleDate(m) : !s || s && o ? (e.setStartDate(m), e.setEndDate(null)) : m < s ? e.setStartDate(m) : e.setEndDate(m);
|
|
2649
2669
|
}, v = (m) => {
|
|
2650
2670
|
const y = m.getTime();
|
|
2651
|
-
return e.variant === "single" ? n?.getTime() === y :
|
|
2671
|
+
return e.variant === "single" ? n?.getTime() === y : s?.getTime() === y || o?.getTime() === y;
|
|
2652
2672
|
}, g = (m) => {
|
|
2653
|
-
if (e.variant !== "range" || !
|
|
2673
|
+
if (e.variant !== "range" || !s || !o) return !1;
|
|
2654
2674
|
const y = m.getTime();
|
|
2655
|
-
return y >
|
|
2675
|
+
return y > s.getTime() && y < o.getTime();
|
|
2656
2676
|
};
|
|
2657
2677
|
return /* @__PURE__ */ S("div", { className: "bd-CalendarGrid bd-DateGrid", children: [
|
|
2658
2678
|
f.map((m) => /* @__PURE__ */ l("div", { className: "bd-CalendarWeek", children: m }, m)),
|
|
@@ -2667,21 +2687,21 @@ const Is = () => {
|
|
|
2667
2687
|
color: !m.isCurrentMonth && !v(m.date) ? "var(--color-gray-900, #999)" : void 0,
|
|
2668
2688
|
opacity: !m.isCurrentMonth && !v(m.date) ? 0.4 : 1
|
|
2669
2689
|
},
|
|
2670
|
-
onClick: () =>
|
|
2690
|
+
onClick: () => C(m.date),
|
|
2671
2691
|
children: m.date.getDate()
|
|
2672
2692
|
},
|
|
2673
2693
|
y
|
|
2674
2694
|
))
|
|
2675
2695
|
] });
|
|
2676
2696
|
}, _s = () => {
|
|
2677
|
-
const e = F("MonthGrid", void 0), t = Array.from({ length: 12 }, (n,
|
|
2697
|
+
const e = F("MonthGrid", void 0), t = Array.from({ length: 12 }, (n, s) => s + 1);
|
|
2678
2698
|
return /* @__PURE__ */ l("div", { className: "bd-CalendarGrid bd-MonthGrid", children: t.map((n) => /* @__PURE__ */ S(
|
|
2679
2699
|
"div",
|
|
2680
2700
|
{
|
|
2681
2701
|
className: "bd-CalendarCell",
|
|
2682
2702
|
onClick: () => {
|
|
2683
|
-
const
|
|
2684
|
-
|
|
2703
|
+
const s = new Date(e.viewingDate);
|
|
2704
|
+
s.setMonth(n - 1), e.setViewingDate(s), e.setViewMode("date");
|
|
2685
2705
|
},
|
|
2686
2706
|
children: [
|
|
2687
2707
|
n,
|
|
@@ -2691,20 +2711,20 @@ const Is = () => {
|
|
|
2691
2711
|
n
|
|
2692
2712
|
)) });
|
|
2693
2713
|
}, Bs = () => {
|
|
2694
|
-
const e = F("YearGrid", void 0), t = Math.floor(e.viewingDate.getFullYear() / 10) * 10 - 4, n = Array.from({ length: 28 }, (
|
|
2695
|
-
return /* @__PURE__ */ l("div", { className: "bd-CalendarGrid bd-YearGrid", children: n.map((
|
|
2714
|
+
const e = F("YearGrid", void 0), t = Math.floor(e.viewingDate.getFullYear() / 10) * 10 - 4, n = Array.from({ length: 28 }, (s, o) => t + o);
|
|
2715
|
+
return /* @__PURE__ */ l("div", { className: "bd-CalendarGrid bd-YearGrid", children: n.map((s) => /* @__PURE__ */ l(
|
|
2696
2716
|
"div",
|
|
2697
2717
|
{
|
|
2698
2718
|
className: N("bd-CalendarCell", {
|
|
2699
|
-
selected:
|
|
2719
|
+
selected: s === e.viewingDate.getFullYear()
|
|
2700
2720
|
}),
|
|
2701
2721
|
onClick: () => {
|
|
2702
|
-
const
|
|
2703
|
-
|
|
2722
|
+
const o = new Date(e.viewingDate);
|
|
2723
|
+
o.setFullYear(s), e.setViewingDate(o), e.setViewMode("month");
|
|
2704
2724
|
},
|
|
2705
|
-
children:
|
|
2725
|
+
children: s
|
|
2706
2726
|
},
|
|
2707
|
-
|
|
2727
|
+
s
|
|
2708
2728
|
)) });
|
|
2709
2729
|
}, zs = Object.assign(Ps, {
|
|
2710
2730
|
Trigger: Zt,
|
|
@@ -2716,10 +2736,10 @@ export {
|
|
|
2716
2736
|
No as BraketRightIcon,
|
|
2717
2737
|
me as Button,
|
|
2718
2738
|
zs as Calendar,
|
|
2719
|
-
|
|
2739
|
+
xe as CheckLineIcon,
|
|
2720
2740
|
To as Checkbox,
|
|
2721
2741
|
Gs as CheckboxGroup,
|
|
2722
|
-
|
|
2742
|
+
E as Flex,
|
|
2723
2743
|
wo as IndeterminateLineIcon,
|
|
2724
2744
|
Yo as Radio,
|
|
2725
2745
|
Vs as RadioGroup,
|
|
@@ -2727,6 +2747,6 @@ export {
|
|
|
2727
2747
|
$s as SelectBox,
|
|
2728
2748
|
tt as Spinner,
|
|
2729
2749
|
bs as Switch,
|
|
2730
|
-
|
|
2750
|
+
Re as Text,
|
|
2731
2751
|
Ls as TextField
|
|
2732
2752
|
};
|