@beaubrain/web-design-system 0.1.12 → 0.1.14
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/assets/web-design-system.css +1 -1
- package/dist/components/CheckableSelectBox/checkableSelectBox.base.d.ts +24 -0
- package/dist/components/CheckableSelectBox/checkableSelectBox.defs.d.ts +51 -0
- package/dist/components/CheckableSelectBox/index.d.ts +25 -0
- package/dist/components/SelectBox/index.d.ts +2 -1
- package/dist/components/SelectBox/selectBox.base.d.ts +3 -0
- package/dist/components/SelectBox/selectBox.defs.d.ts +12 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +1274 -1080
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { createPortal as
|
|
5
|
-
function
|
|
1
|
+
import { jsx as i, jsxs as k, Fragment as Ye } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import E from "react";
|
|
4
|
+
import { createPortal as ln } from "react-dom";
|
|
5
|
+
function un(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var Ce = { exports: {} };
|
|
9
9
|
/*!
|
|
10
10
|
Copyright (c) 2018 Jed Watson.
|
|
11
11
|
Licensed under the MIT License (MIT), see
|
|
12
12
|
http://jedwatson.github.io/classnames
|
|
13
13
|
*/
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
return
|
|
14
|
+
var Ue;
|
|
15
|
+
function dn() {
|
|
16
|
+
return Ue || (Ue = 1, (function(e) {
|
|
17
17
|
(function() {
|
|
18
18
|
var t = {}.hasOwnProperty;
|
|
19
19
|
function n() {
|
|
@@ -42,10 +42,10 @@ function sn() {
|
|
|
42
42
|
}
|
|
43
43
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
44
44
|
})();
|
|
45
|
-
})(
|
|
45
|
+
})(Ce)), Ce.exports;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
const
|
|
47
|
+
var pn = dn();
|
|
48
|
+
const R = /* @__PURE__ */ un(pn), fn = (e, t) => {
|
|
49
49
|
const n = { ...t };
|
|
50
50
|
for (const o in t) {
|
|
51
51
|
const s = e[o], r = t[o];
|
|
@@ -55,47 +55,47 @@ const N = /* @__PURE__ */ on(rn), an = (e, t) => {
|
|
|
55
55
|
} : s && (n[o] = s) : o === "style" ? n[o] = { ...s, ...r } : o === "className" && (n[o] = [s, r].filter(Boolean).join(" "));
|
|
56
56
|
}
|
|
57
57
|
return { ...e, ...n };
|
|
58
|
-
},
|
|
58
|
+
}, He = (e, t) => {
|
|
59
59
|
if (typeof e == "function")
|
|
60
60
|
return e(t);
|
|
61
61
|
e != null && (e.current = t);
|
|
62
|
-
},
|
|
62
|
+
}, X = (...e) => (t) => {
|
|
63
63
|
let n = !1;
|
|
64
64
|
const o = e.map((s) => {
|
|
65
|
-
const r =
|
|
65
|
+
const r = He(s, t);
|
|
66
66
|
return !n && typeof r == "function" && (n = !0), { ref: s, cleanup: r };
|
|
67
67
|
});
|
|
68
68
|
if (n)
|
|
69
69
|
return () => {
|
|
70
70
|
for (const { ref: s, cleanup: r } of o)
|
|
71
|
-
typeof r == "function" ? r() :
|
|
71
|
+
typeof r == "function" ? r() : He(s, null);
|
|
72
72
|
};
|
|
73
|
-
},
|
|
73
|
+
}, Pe = (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 T(...e) {
|
|
78
|
+
return E.useCallback(X(...e), e);
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const je = (...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
|
-
},
|
|
86
|
-
const o =
|
|
85
|
+
}, mn = ({ className: e, customProperties: t, ...n }) => {
|
|
86
|
+
const o = qe({
|
|
87
87
|
allowCustomValues: !0,
|
|
88
88
|
className: e,
|
|
89
89
|
...n
|
|
90
|
-
}), s =
|
|
90
|
+
}), s = gn({
|
|
91
91
|
customProperties: t,
|
|
92
92
|
...n
|
|
93
93
|
});
|
|
94
94
|
return [o, s];
|
|
95
|
-
},
|
|
95
|
+
}, hn = (e, t, n) => {
|
|
96
96
|
const o = e ? "-" : "", s = n(t), r = s?.startsWith("-"), c = r ? "-" : "", a = r ? s?.substring(1) : s;
|
|
97
97
|
return `${c}${e}${o}${a}`;
|
|
98
|
-
},
|
|
98
|
+
}, qe = ({
|
|
99
99
|
allowCustomValues: e = !1,
|
|
100
100
|
className: t,
|
|
101
101
|
value: n,
|
|
@@ -104,11 +104,11 @@ const Ge = (...e) => {
|
|
|
104
104
|
}) => {
|
|
105
105
|
if (n) {
|
|
106
106
|
if (typeof n == "string" && o.includes(n))
|
|
107
|
-
return
|
|
107
|
+
return hn(t, n, s);
|
|
108
108
|
if (e)
|
|
109
109
|
return t;
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, gn = ({
|
|
112
112
|
customProperties: e,
|
|
113
113
|
value: t,
|
|
114
114
|
propValues: n,
|
|
@@ -123,9 +123,9 @@ const Ge = (...e) => {
|
|
|
123
123
|
}
|
|
124
124
|
return s;
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, bn = (...e) => Object.assign({}, ...e), I = (e, ...t) => {
|
|
127
127
|
let n, o;
|
|
128
|
-
const s = { ...e }, r =
|
|
128
|
+
const s = { ...e }, r = bn(...t);
|
|
129
129
|
for (const c in r) {
|
|
130
130
|
let a = s[c];
|
|
131
131
|
const u = r[c];
|
|
@@ -133,62 +133,62 @@ const Ge = (...e) => {
|
|
|
133
133
|
if (delete s[c], !a)
|
|
134
134
|
continue;
|
|
135
135
|
if (u.type === "enum") {
|
|
136
|
-
const d =
|
|
136
|
+
const d = qe({
|
|
137
137
|
value: a,
|
|
138
138
|
className: u.className,
|
|
139
139
|
propValues: u.values,
|
|
140
140
|
parseValue: u.parseValue
|
|
141
141
|
});
|
|
142
|
-
n =
|
|
142
|
+
n = R(n, d);
|
|
143
143
|
continue;
|
|
144
144
|
}
|
|
145
145
|
if (u.type === "string" || u.type === "enum | string") {
|
|
146
|
-
const d = u.type === "string" ? [] : u.values, [
|
|
146
|
+
const d = u.type === "string" ? [] : u.values, [p, f] = mn({
|
|
147
147
|
className: u.className,
|
|
148
148
|
customProperties: u.customProperties,
|
|
149
149
|
propValues: d,
|
|
150
150
|
value: a
|
|
151
151
|
});
|
|
152
|
-
o =
|
|
152
|
+
o = je(o, f), n = R(n, p);
|
|
153
153
|
continue;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
return s.className =
|
|
158
|
-
},
|
|
159
|
-
if (!
|
|
157
|
+
return s.className = R(n, e.className), s.style = je(o, e.style), s;
|
|
158
|
+
}, Ke = (e) => {
|
|
159
|
+
if (!E.isValidElement(e))
|
|
160
160
|
throw new Error(`Expected a single valid React element, but got: ${e}`);
|
|
161
161
|
return e;
|
|
162
|
-
},
|
|
162
|
+
}, _ = (e, t = []) => {
|
|
163
163
|
let n = [];
|
|
164
164
|
function o(r, c) {
|
|
165
|
-
const a =
|
|
165
|
+
const a = l.createContext(c), u = n.length;
|
|
166
166
|
n = [...n, c];
|
|
167
|
-
const d = (
|
|
168
|
-
const { scope: C, children: h, ...
|
|
169
|
-
return /* @__PURE__ */
|
|
167
|
+
const d = (f) => {
|
|
168
|
+
const { scope: C, children: h, ...v } = f, b = C?.[e]?.[u] || a, g = l.useMemo(() => v, Object.values(v));
|
|
169
|
+
return /* @__PURE__ */ i(b.Provider, { value: g, children: h });
|
|
170
170
|
};
|
|
171
171
|
d.displayName = `${r}Provider`;
|
|
172
|
-
function f
|
|
173
|
-
const h = C?.[e]?.[u] || a,
|
|
174
|
-
if (
|
|
172
|
+
function p(f, C) {
|
|
173
|
+
const h = C?.[e]?.[u] || a, v = l.useContext(h);
|
|
174
|
+
if (v) return v;
|
|
175
175
|
if (c !== void 0) return c;
|
|
176
|
-
throw new Error(`\`${
|
|
176
|
+
throw new Error(`\`${f}\` must be used within \`${r}\``);
|
|
177
177
|
}
|
|
178
|
-
return [d,
|
|
178
|
+
return [d, p];
|
|
179
179
|
}
|
|
180
180
|
const s = () => {
|
|
181
|
-
const r = n.map((c) =>
|
|
181
|
+
const r = n.map((c) => l.createContext(c));
|
|
182
182
|
return function(a) {
|
|
183
183
|
const u = a?.[e] || r;
|
|
184
|
-
return
|
|
184
|
+
return l.useMemo(
|
|
185
185
|
() => ({ [`__scope${e}`]: { ...a, [e]: u } }),
|
|
186
186
|
[a, u]
|
|
187
187
|
);
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
|
-
return s.scopeName = e, [o,
|
|
191
|
-
},
|
|
190
|
+
return s.scopeName = e, [o, Cn(s, ...t)];
|
|
191
|
+
}, Cn = (...e) => {
|
|
192
192
|
const t = e[0];
|
|
193
193
|
if (e.length === 1) return t;
|
|
194
194
|
const n = () => {
|
|
@@ -198,82 +198,82 @@ const Ge = (...e) => {
|
|
|
198
198
|
}));
|
|
199
199
|
return function(r) {
|
|
200
200
|
const c = o.reduce((a, { useScope: u, scopeName: d }) => {
|
|
201
|
-
const
|
|
202
|
-
return { ...a, ...
|
|
201
|
+
const f = u(r)[`__scope${d}`];
|
|
202
|
+
return { ...a, ...f };
|
|
203
203
|
}, {});
|
|
204
|
-
return
|
|
204
|
+
return l.useMemo(() => ({ [`__scope${t.scopeName}`]: c }), [c]);
|
|
205
205
|
};
|
|
206
206
|
};
|
|
207
207
|
return n.scopeName = t.scopeName, n;
|
|
208
|
-
},
|
|
209
|
-
},
|
|
208
|
+
}, Y = globalThis?.document ? l.useLayoutEffect : () => {
|
|
209
|
+
}, vn = l[" useId ".trim().toString()] || (() => {
|
|
210
210
|
});
|
|
211
|
-
let
|
|
212
|
-
function
|
|
213
|
-
const [t, n] =
|
|
214
|
-
return
|
|
215
|
-
n((o) => o ?? String(
|
|
211
|
+
let yn = 0;
|
|
212
|
+
function We(e) {
|
|
213
|
+
const [t, n] = l.useState(vn());
|
|
214
|
+
return Y(() => {
|
|
215
|
+
n((o) => o ?? String(yn++));
|
|
216
216
|
}, [e]), t ? `bd-${t}` : "";
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
const t =
|
|
220
|
-
return
|
|
218
|
+
function wn(e) {
|
|
219
|
+
const t = l.useRef(e);
|
|
220
|
+
return l.useEffect(() => {
|
|
221
221
|
t.current = e;
|
|
222
|
-
}),
|
|
222
|
+
}), l.useMemo(() => ((...n) => t.current?.(...n)), []);
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function B({
|
|
225
225
|
prop: e,
|
|
226
226
|
defaultProp: t,
|
|
227
227
|
onChange: n = () => {
|
|
228
228
|
},
|
|
229
229
|
caller: o
|
|
230
230
|
}) {
|
|
231
|
-
const [s, r, c] =
|
|
231
|
+
const [s, r, c] = Nn({
|
|
232
232
|
defaultProp: t,
|
|
233
233
|
onChange: n
|
|
234
234
|
}), a = e !== void 0, u = a ? e : s;
|
|
235
235
|
if (process.env.NODE_ENV !== "production") {
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
`${o} is changing from ${
|
|
241
|
-
),
|
|
236
|
+
const p = l.useRef(e !== void 0);
|
|
237
|
+
l.useEffect(() => {
|
|
238
|
+
const f = p.current;
|
|
239
|
+
f !== a && console.warn(
|
|
240
|
+
`${o} is changing from ${f ? "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
|
+
), p.current = a;
|
|
242
242
|
}, [a, o]);
|
|
243
243
|
}
|
|
244
|
-
const d =
|
|
245
|
-
(
|
|
244
|
+
const d = l.useCallback(
|
|
245
|
+
(p) => {
|
|
246
246
|
if (a) {
|
|
247
|
-
const
|
|
248
|
-
|
|
247
|
+
const f = Rn(p) ? p(e) : p;
|
|
248
|
+
f !== e && c.current?.(f);
|
|
249
249
|
} else
|
|
250
|
-
r(
|
|
250
|
+
r(p);
|
|
251
251
|
},
|
|
252
252
|
[a, e, r, c]
|
|
253
253
|
);
|
|
254
254
|
return [u, d];
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function Nn({
|
|
257
257
|
defaultProp: e,
|
|
258
258
|
onChange: t
|
|
259
259
|
}) {
|
|
260
|
-
const [n, o] =
|
|
261
|
-
return
|
|
260
|
+
const [n, o] = l.useState(e), s = l.useRef(n), r = l.useRef(t);
|
|
261
|
+
return Y(() => {
|
|
262
262
|
r.current = t;
|
|
263
|
-
}, [t]),
|
|
263
|
+
}, [t]), l.useEffect(() => {
|
|
264
264
|
s.current !== n && (r.current?.(n), s.current = n);
|
|
265
265
|
}, [n, s]), [n, o, r];
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function Rn(e) {
|
|
268
268
|
return typeof e == "function";
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
const t =
|
|
272
|
-
return
|
|
270
|
+
function Ie(e) {
|
|
271
|
+
const t = l.useRef({ value: e, previous: e });
|
|
272
|
+
return l.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
const [t, n] =
|
|
276
|
-
return
|
|
274
|
+
function Ee(e) {
|
|
275
|
+
const [t, n] = l.useState(void 0);
|
|
276
|
+
return Y(() => {
|
|
277
277
|
if (e) {
|
|
278
278
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
279
279
|
const o = new ResizeObserver((s) => {
|
|
@@ -293,19 +293,19 @@ function ve(e) {
|
|
|
293
293
|
n(void 0);
|
|
294
294
|
}, [e]), t;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
const [n, o] =
|
|
296
|
+
function xn(e, t) {
|
|
297
|
+
const [n, o] = l.useReducer((s, r) => t[s][r] ?? s, e);
|
|
298
298
|
return [n, o];
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
const [c, a] =
|
|
300
|
+
function Xe(e, t, n, o = 0, s = "start", r = !0) {
|
|
301
|
+
const [c, a] = E.useState({
|
|
302
302
|
position: "absolute",
|
|
303
303
|
top: 0,
|
|
304
304
|
left: 0,
|
|
305
305
|
opacity: 0,
|
|
306
306
|
pointerEvents: "none"
|
|
307
|
-
}), [u, d] =
|
|
308
|
-
return
|
|
307
|
+
}), [u, d] = E.useState(!1);
|
|
308
|
+
return Y(() => {
|
|
309
309
|
if (!n) {
|
|
310
310
|
d(!1), a({
|
|
311
311
|
position: "absolute",
|
|
@@ -316,34 +316,34 @@ function Ue(e, t, n, o = 0, s = "start", r = !0) {
|
|
|
316
316
|
});
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
|
-
let
|
|
320
|
-
const
|
|
319
|
+
let p;
|
|
320
|
+
const f = () => {
|
|
321
321
|
if (!e.current || !t.current) return;
|
|
322
|
-
const h = (e.current.closest(".bd-TextFieldRoot") || e.current).getBoundingClientRect(),
|
|
323
|
-
if (
|
|
324
|
-
|
|
322
|
+
const h = (e.current.closest(".bd-TextFieldRoot") || e.current).getBoundingClientRect(), v = t.current.getBoundingClientRect(), b = r ? h.width : v.width;
|
|
323
|
+
if (v.height === 0 || v.width === 0) {
|
|
324
|
+
p = requestAnimationFrame(f);
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
|
-
const
|
|
328
|
-
let
|
|
329
|
-
s === "center" ?
|
|
330
|
-
const
|
|
327
|
+
const g = window.innerHeight, m = window.innerWidth;
|
|
328
|
+
let y = window.scrollY + h.bottom + o, w = window.scrollX + h.left;
|
|
329
|
+
s === "center" ? w = window.scrollX + h.left + h.width / 2 - b / 2 : s === "end" && (w = window.scrollX + h.right - b), h.bottom + v.height + o > g && (y = window.scrollY + h.top - v.height - o), w + b > window.scrollX + m && (w = window.scrollX + m - b - 16), w < window.scrollX && (w = window.scrollX + 16);
|
|
330
|
+
const N = {
|
|
331
331
|
position: "absolute",
|
|
332
|
-
top: `${
|
|
333
|
-
left: `${
|
|
332
|
+
top: `${y}px`,
|
|
333
|
+
left: `${w}px`,
|
|
334
334
|
zIndex: 1e3,
|
|
335
335
|
opacity: 1,
|
|
336
336
|
pointerEvents: "auto"
|
|
337
337
|
};
|
|
338
|
-
r && (
|
|
338
|
+
r && (N.width = `${h.width}px`), a(N), d(!0);
|
|
339
339
|
};
|
|
340
|
-
return
|
|
341
|
-
cancelAnimationFrame(
|
|
340
|
+
return p = requestAnimationFrame(f), window.addEventListener("scroll", f, { passive: !0 }), window.addEventListener("resize", f), () => {
|
|
341
|
+
cancelAnimationFrame(p), window.removeEventListener("scroll", f), window.removeEventListener("resize", f);
|
|
342
342
|
};
|
|
343
343
|
}, [n, e, t, o, s, r]), { styles: c, isPositioned: u };
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
|
|
345
|
+
function Ze(e, t) {
|
|
346
|
+
l.useEffect(() => {
|
|
347
347
|
const n = (o) => {
|
|
348
348
|
const s = e?.current;
|
|
349
349
|
!s || s.contains(o.target) || t(o);
|
|
@@ -353,99 +353,99 @@ function He(e, t) {
|
|
|
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
|
-
}) => typeof window > "u" || !t ? null :
|
|
360
|
-
/* @__PURE__ */
|
|
359
|
+
}) => typeof window > "u" || !t ? null : ln(
|
|
360
|
+
/* @__PURE__ */ i("div", { className: "bd-theme bd-reset", style: { display: "contents" }, children: e }),
|
|
361
361
|
t
|
|
362
|
-
),
|
|
363
|
-
const t =
|
|
362
|
+
), Sn = (e) => {
|
|
363
|
+
const t = E.forwardRef((n, o) => {
|
|
364
364
|
const { children: s, ...r } = n;
|
|
365
|
-
if (
|
|
366
|
-
const c =
|
|
367
|
-
return a.ref = o ?
|
|
365
|
+
if (E.isValidElement(s)) {
|
|
366
|
+
const c = Pe(s), a = fn(r, s.props);
|
|
367
|
+
return a.ref = o ? X(o, c) : c, E.cloneElement(s, a);
|
|
368
368
|
}
|
|
369
369
|
throw new Error(
|
|
370
370
|
`[${e}.OutletClone] Invalid children passed, expected a single valid React element.`
|
|
371
371
|
);
|
|
372
372
|
});
|
|
373
373
|
return t.displayName = `${e}.OutletClone`, t;
|
|
374
|
-
},
|
|
375
|
-
const t =
|
|
376
|
-
const { children: r, ...c } = o, a =
|
|
374
|
+
}, oe = (e) => {
|
|
375
|
+
const t = Sn(e), n = E.forwardRef((o, s) => {
|
|
376
|
+
const { children: r, ...c } = o, a = E.Children.toArray(r), u = a.find(Pn);
|
|
377
377
|
if (u) {
|
|
378
|
-
const d = u.props.children,
|
|
379
|
-
if (
|
|
380
|
-
if (
|
|
378
|
+
const d = u.props.children, p = a.map((f) => {
|
|
379
|
+
if (f === u) {
|
|
380
|
+
if (E.Children.count(d) > 1 || !E.isValidElement(d))
|
|
381
381
|
throw new Error(
|
|
382
382
|
`[${e}.Outlet] Invalid children passed, expected a single valid React element.`
|
|
383
383
|
);
|
|
384
384
|
return d.props.children;
|
|
385
385
|
} else
|
|
386
|
-
return
|
|
386
|
+
return f;
|
|
387
387
|
});
|
|
388
|
-
if (!
|
|
388
|
+
if (!E.isValidElement(d))
|
|
389
389
|
throw new Error(`[${e}.Outlet] Invalid children passed.`);
|
|
390
|
-
return /* @__PURE__ */
|
|
390
|
+
return /* @__PURE__ */ i(t, { ...c, ref: s, children: E.cloneElement(d, void 0, p) });
|
|
391
391
|
}
|
|
392
|
-
return /* @__PURE__ */
|
|
392
|
+
return /* @__PURE__ */ i(t, { ...c, ref: s, children: r });
|
|
393
393
|
});
|
|
394
394
|
return n.displayName = `${e}.Outlet`, n;
|
|
395
|
-
},
|
|
396
|
-
const n =
|
|
395
|
+
}, re = oe("Outlet"), kn = Symbol("bds.outlettable"), Pn = (e) => E.isValidElement(e) && typeof e.type == "function" && "__bdsId" in e.type && e.type.__bdsId === kn, In = ["a", "button", "div", "input", "label", "span"], P = In.reduce((e, t) => {
|
|
396
|
+
const n = oe(`Base.${t}`), o = l.forwardRef((s, r) => {
|
|
397
397
|
const { asChild: c, ...a } = s;
|
|
398
|
-
return /* @__PURE__ */
|
|
398
|
+
return /* @__PURE__ */ i(c ? n : t, { ...a, ref: r });
|
|
399
399
|
});
|
|
400
400
|
return o.displayName = `Base.${t}`, { ...e, [t]: o };
|
|
401
401
|
}, {});
|
|
402
|
-
function
|
|
403
|
-
const t = `${e}CollectionProvider`, [n, o] =
|
|
402
|
+
function En(e) {
|
|
403
|
+
const t = `${e}CollectionProvider`, [n, o] = _(t), [s, r] = n(
|
|
404
404
|
t,
|
|
405
405
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
406
|
-
), c = (
|
|
407
|
-
const { scope: g, children: m } =
|
|
408
|
-
return /* @__PURE__ */
|
|
406
|
+
), c = (b) => {
|
|
407
|
+
const { scope: g, children: m } = b, y = l.useRef(null), w = l.useRef(/* @__PURE__ */ new Map()).current;
|
|
408
|
+
return /* @__PURE__ */ i(s, { scope: g, itemMap: w, collectionRef: y, children: m });
|
|
409
409
|
};
|
|
410
410
|
c.displayName = t;
|
|
411
|
-
const a = `${e}CollectionOutlet`, u =
|
|
412
|
-
(
|
|
413
|
-
const { scope: m, children: y } =
|
|
414
|
-
return /* @__PURE__ */
|
|
411
|
+
const a = `${e}CollectionOutlet`, u = oe(a), d = l.forwardRef(
|
|
412
|
+
(b, g) => {
|
|
413
|
+
const { scope: m, children: y } = b, w = r(a, m), N = T(g, w.collectionRef);
|
|
414
|
+
return /* @__PURE__ */ i(u, { ref: N, children: y });
|
|
415
415
|
}
|
|
416
416
|
);
|
|
417
417
|
d.displayName = a;
|
|
418
|
-
const
|
|
419
|
-
(
|
|
420
|
-
const { scope: m, children: y, ...w } =
|
|
421
|
-
return
|
|
418
|
+
const p = `${e}CollectionItemOutlet`, f = "data-bd-collection-item", C = oe(p), h = l.forwardRef(
|
|
419
|
+
(b, g) => {
|
|
420
|
+
const { scope: m, children: y, ...w } = b, N = l.useRef(null), x = T(g, N), S = r(p, m);
|
|
421
|
+
return l.useEffect(() => (S.itemMap.set(N, { ref: N, ...w }), () => void S.itemMap.delete(N))), /* @__PURE__ */ i(C, { [f]: "", ref: x, children: y });
|
|
422
422
|
}
|
|
423
423
|
);
|
|
424
|
-
h.displayName =
|
|
425
|
-
function b
|
|
426
|
-
const g = r(`${e}CollectionConsumer`,
|
|
427
|
-
return
|
|
424
|
+
h.displayName = p;
|
|
425
|
+
function v(b) {
|
|
426
|
+
const g = r(`${e}CollectionConsumer`, b);
|
|
427
|
+
return l.useCallback(() => {
|
|
428
428
|
const y = g.collectionRef.current;
|
|
429
429
|
if (!y) return [];
|
|
430
|
-
const w = Array.from(y.querySelectorAll(`[${
|
|
430
|
+
const w = Array.from(y.querySelectorAll(`[${f}]`));
|
|
431
431
|
return Array.from(g.itemMap.values()).sort(
|
|
432
|
-
(
|
|
432
|
+
(S, A) => w.indexOf(S.ref.current) - w.indexOf(A.ref.current)
|
|
433
433
|
);
|
|
434
434
|
}, [g.collectionRef, g.itemMap]);
|
|
435
435
|
}
|
|
436
436
|
return [
|
|
437
437
|
{ Provider: c, Outlet: d, ItemOutlet: h },
|
|
438
|
-
|
|
438
|
+
v,
|
|
439
439
|
o
|
|
440
440
|
];
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
const { remain: t, children: n } = e, o =
|
|
444
|
-
return typeof n == "function" || o.isRemain ?
|
|
442
|
+
function Qe(e) {
|
|
443
|
+
const { remain: t, children: n } = e, o = Tn(t), s = typeof n == "function" ? n({ remain: o.isRemain }) : l.Children.only(n), r = T(o.ref, Pe(s));
|
|
444
|
+
return typeof n == "function" || o.isRemain ? l.cloneElement(s, { ref: r }) : null;
|
|
445
445
|
}
|
|
446
|
-
const
|
|
447
|
-
function
|
|
448
|
-
const [t, n] =
|
|
446
|
+
const Dn = ["mounted", "unmountSuspended"];
|
|
447
|
+
function Tn(e) {
|
|
448
|
+
const [t, n] = l.useState(), o = l.useRef(null), s = l.useRef(e), r = l.useRef("none"), c = e ? "mounted" : "unmounted", [a, u] = xn(c, {
|
|
449
449
|
mounted: {
|
|
450
450
|
UNMOUNT: "unmounted",
|
|
451
451
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -458,45 +458,45 @@ function Sn(e) {
|
|
|
458
458
|
MOUNT: "mounted"
|
|
459
459
|
}
|
|
460
460
|
});
|
|
461
|
-
return
|
|
462
|
-
const d =
|
|
461
|
+
return l.useEffect(() => {
|
|
462
|
+
const d = ee(o.current);
|
|
463
463
|
r.current = a === "mounted" ? d : "none";
|
|
464
|
-
}, [a]),
|
|
465
|
-
const d = o.current,
|
|
466
|
-
if (
|
|
467
|
-
const C = r.current, h =
|
|
468
|
-
e ? u("MOUNT") : h === "none" || d?.display === "none" ? u("UNMOUNT") : u(
|
|
464
|
+
}, [a]), Y(() => {
|
|
465
|
+
const d = o.current, p = s.current;
|
|
466
|
+
if (p !== e) {
|
|
467
|
+
const C = r.current, h = ee(d);
|
|
468
|
+
e ? u("MOUNT") : h === "none" || d?.display === "none" ? u("UNMOUNT") : u(p && C !== h ? "ANIMATION_OUT" : "UNMOUNT"), s.current = e;
|
|
469
469
|
}
|
|
470
|
-
}, [e, u]),
|
|
470
|
+
}, [e, u]), Y(() => {
|
|
471
471
|
if (t) {
|
|
472
472
|
let d;
|
|
473
|
-
const
|
|
474
|
-
const
|
|
475
|
-
if (h.target === t &&
|
|
473
|
+
const p = t.ownerDocument.defaultView ?? window, f = (h) => {
|
|
474
|
+
const b = ee(o.current).includes(CSS.escape(h.animationName));
|
|
475
|
+
if (h.target === t && b && (u("ANIMATION_END"), !s.current)) {
|
|
476
476
|
const g = t.style.animationFillMode;
|
|
477
|
-
t.style.animationFillMode = "forwards", d =
|
|
477
|
+
t.style.animationFillMode = "forwards", d = p.setTimeout(() => {
|
|
478
478
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = g);
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
481
|
}, C = (h) => {
|
|
482
|
-
h.target === t && (r.current =
|
|
482
|
+
h.target === t && (r.current = ee(o.current));
|
|
483
483
|
};
|
|
484
|
-
return t.addEventListener("animationstart", C), t.addEventListener("animationcancel",
|
|
485
|
-
|
|
484
|
+
return t.addEventListener("animationstart", C), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
|
|
485
|
+
p.clearTimeout(d), t.removeEventListener("animationstart", C), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
|
|
486
486
|
};
|
|
487
487
|
} else
|
|
488
488
|
u("ANIMATION_END");
|
|
489
489
|
}, [t, u]), {
|
|
490
|
-
isRemain:
|
|
491
|
-
ref:
|
|
490
|
+
isRemain: Dn.includes(a),
|
|
491
|
+
ref: l.useCallback((d) => {
|
|
492
492
|
o.current = d ? getComputedStyle(d) : null, n(d);
|
|
493
493
|
}, [])
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function ee(e) {
|
|
497
497
|
return e?.animationName || "none";
|
|
498
498
|
}
|
|
499
|
-
const
|
|
499
|
+
const Bn = Object.freeze({
|
|
500
500
|
position: "absolute",
|
|
501
501
|
border: 0,
|
|
502
502
|
width: 1,
|
|
@@ -507,31 +507,31 @@ const kn = Object.freeze({
|
|
|
507
507
|
clip: "rect(0, 0, 0, 0)",
|
|
508
508
|
whiteSpace: "nowrap",
|
|
509
509
|
wordWrap: "normal"
|
|
510
|
-
}),
|
|
511
|
-
(e, t) => /* @__PURE__ */
|
|
512
|
-
|
|
510
|
+
}), et = l.forwardRef(
|
|
511
|
+
(e, t) => /* @__PURE__ */ i(
|
|
512
|
+
P.span,
|
|
513
513
|
{
|
|
514
514
|
...e,
|
|
515
515
|
ref: t,
|
|
516
|
-
style: { ...
|
|
516
|
+
style: { ...Bn, ...e.style }
|
|
517
517
|
}
|
|
518
518
|
)
|
|
519
519
|
);
|
|
520
|
-
|
|
521
|
-
const
|
|
520
|
+
et.displayName = "VisuallyHidden";
|
|
521
|
+
const Mn = l.forwardRef((e, t) => {
|
|
522
522
|
const { children: n, className: o, ...s } = e;
|
|
523
|
-
return /* @__PURE__ */
|
|
523
|
+
return /* @__PURE__ */ i(re, { ...s, ref: t, className: R("bd-reset", o), children: Ke(n) });
|
|
524
524
|
});
|
|
525
|
-
|
|
526
|
-
const
|
|
525
|
+
Mn.displayName = "Reset";
|
|
526
|
+
const M = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(s) {
|
|
527
527
|
if (e?.(s), n === !1 || !s.defaultPrevented)
|
|
528
528
|
return t?.(s);
|
|
529
|
-
},
|
|
530
|
-
|
|
531
|
-
[
|
|
532
|
-
), [
|
|
533
|
-
(e, t) => /* @__PURE__ */
|
|
534
|
-
),
|
|
529
|
+
}, ve = "rovingFocusGroup.onEntryFocus", _n = { bubbles: !1, cancelable: !0 }, ae = "RovingFocusGroup", [Re, tt, An] = En(ae), [On, De] = _(
|
|
530
|
+
ae,
|
|
531
|
+
[An]
|
|
532
|
+
), [Fn, Gn] = On(ae), nt = l.forwardRef(
|
|
533
|
+
(e, t) => /* @__PURE__ */ i(Re.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ i(Re.Outlet, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ i($n, { ...e, ref: t }) }) })
|
|
534
|
+
), $n = l.forwardRef((e, t) => {
|
|
535
535
|
const {
|
|
536
536
|
__scopeRovingFocusGroup: n,
|
|
537
537
|
orientation: o,
|
|
@@ -541,67 +541,67 @@ const B = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(s) {
|
|
|
541
541
|
onCurrentTabStopIdChange: a,
|
|
542
542
|
onEntryFocus: u,
|
|
543
543
|
preventScrollOnEntryFocus: d = !1,
|
|
544
|
-
...
|
|
545
|
-
} = e,
|
|
544
|
+
...p
|
|
545
|
+
} = e, f = l.useRef(null), C = T(t, f), [h, v] = B({
|
|
546
546
|
prop: r,
|
|
547
547
|
defaultProp: c ?? null,
|
|
548
548
|
onChange: a,
|
|
549
|
-
caller:
|
|
550
|
-
}), [
|
|
551
|
-
return
|
|
552
|
-
const
|
|
553
|
-
if (
|
|
554
|
-
return
|
|
555
|
-
}, [m]), /* @__PURE__ */
|
|
556
|
-
|
|
549
|
+
caller: ae
|
|
550
|
+
}), [b, g] = l.useState(!1), m = wn(u), y = tt(n), w = l.useRef(!1), [N, x] = l.useState(0);
|
|
551
|
+
return l.useEffect(() => {
|
|
552
|
+
const S = f.current;
|
|
553
|
+
if (S)
|
|
554
|
+
return S.addEventListener(ve, m), () => S.removeEventListener(ve, m);
|
|
555
|
+
}, [m]), /* @__PURE__ */ i(
|
|
556
|
+
Fn,
|
|
557
557
|
{
|
|
558
558
|
scope: n,
|
|
559
559
|
orientation: o,
|
|
560
560
|
loop: s,
|
|
561
561
|
currentTabStopId: h,
|
|
562
|
-
onItemFocus:
|
|
563
|
-
(
|
|
564
|
-
[
|
|
562
|
+
onItemFocus: l.useCallback(
|
|
563
|
+
(S) => v(S),
|
|
564
|
+
[v]
|
|
565
565
|
),
|
|
566
|
-
onItemShiftTab:
|
|
567
|
-
onFocusableItemAdd:
|
|
568
|
-
() =>
|
|
566
|
+
onItemShiftTab: l.useCallback(() => g(!0), []),
|
|
567
|
+
onFocusableItemAdd: l.useCallback(
|
|
568
|
+
() => x((S) => S + 1),
|
|
569
569
|
[]
|
|
570
570
|
),
|
|
571
|
-
onFocusableItemRemove:
|
|
572
|
-
() =>
|
|
571
|
+
onFocusableItemRemove: l.useCallback(
|
|
572
|
+
() => x((S) => S - 1),
|
|
573
573
|
[]
|
|
574
574
|
),
|
|
575
|
-
children: /* @__PURE__ */
|
|
576
|
-
|
|
575
|
+
children: /* @__PURE__ */ i(
|
|
576
|
+
P.div,
|
|
577
577
|
{
|
|
578
|
-
tabIndex:
|
|
578
|
+
tabIndex: b || N === 0 ? -1 : 0,
|
|
579
579
|
"data-orientation": o,
|
|
580
|
-
...
|
|
580
|
+
...p,
|
|
581
581
|
ref: C,
|
|
582
582
|
style: { outline: "none", ...e.style },
|
|
583
|
-
onMouseDown:
|
|
583
|
+
onMouseDown: M(e.onMouseDown, () => {
|
|
584
584
|
w.current = !0;
|
|
585
585
|
}),
|
|
586
|
-
onFocus:
|
|
587
|
-
const
|
|
588
|
-
if (
|
|
589
|
-
const
|
|
590
|
-
if (
|
|
591
|
-
const
|
|
586
|
+
onFocus: M(e.onFocus, (S) => {
|
|
587
|
+
const A = !w.current;
|
|
588
|
+
if (S.target === S.currentTarget && A && !b) {
|
|
589
|
+
const Q = new CustomEvent(ve, _n);
|
|
590
|
+
if (S.currentTarget.dispatchEvent(Q), !Q.defaultPrevented) {
|
|
591
|
+
const be = y().filter((V) => V.focusable), rn = be.find((V) => V.active), an = be.find((V) => V.id === h), cn = [rn, an, ...be].filter(
|
|
592
592
|
Boolean
|
|
593
|
-
).map((
|
|
594
|
-
|
|
593
|
+
).map((V) => V.ref.current);
|
|
594
|
+
st(cn, d);
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
597
|
w.current = !1;
|
|
598
598
|
}),
|
|
599
|
-
onBlur:
|
|
599
|
+
onBlur: M(e.onBlur, () => g(!1))
|
|
600
600
|
}
|
|
601
601
|
)
|
|
602
602
|
}
|
|
603
603
|
);
|
|
604
|
-
}),
|
|
604
|
+
}), Vn = "RovingFocusGroupItem", ot = l.forwardRef(
|
|
605
605
|
(e, t) => {
|
|
606
606
|
const {
|
|
607
607
|
__scopeRovingFocusGroup: n,
|
|
@@ -610,54 +610,54 @@ const B = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(s) {
|
|
|
610
610
|
tabStopId: r,
|
|
611
611
|
children: c,
|
|
612
612
|
...a
|
|
613
|
-
} = e, u =
|
|
614
|
-
return
|
|
613
|
+
} = e, u = We(), d = r || u, p = Gn(Vn, n), f = p.currentTabStopId === d, C = tt(n), { onFocusableItemAdd: h, onFocusableItemRemove: v, currentTabStopId: b } = p;
|
|
614
|
+
return l.useEffect(() => {
|
|
615
615
|
if (o)
|
|
616
|
-
return h(), () =>
|
|
617
|
-
}, [o, h,
|
|
618
|
-
|
|
616
|
+
return h(), () => v();
|
|
617
|
+
}, [o, h, v]), /* @__PURE__ */ i(
|
|
618
|
+
Re.ItemOutlet,
|
|
619
619
|
{
|
|
620
620
|
scope: n,
|
|
621
621
|
id: d,
|
|
622
622
|
focusable: o,
|
|
623
623
|
active: s,
|
|
624
|
-
children: /* @__PURE__ */
|
|
625
|
-
|
|
624
|
+
children: /* @__PURE__ */ i(
|
|
625
|
+
P.span,
|
|
626
626
|
{
|
|
627
|
-
tabIndex:
|
|
628
|
-
"data-orientation":
|
|
627
|
+
tabIndex: f ? 0 : -1,
|
|
628
|
+
"data-orientation": p.orientation,
|
|
629
629
|
...a,
|
|
630
630
|
ref: t,
|
|
631
|
-
onMouseDown:
|
|
632
|
-
o ?
|
|
631
|
+
onMouseDown: M(e.onMouseDown, (g) => {
|
|
632
|
+
o ? p.onItemFocus(d) : g.preventDefault();
|
|
633
633
|
}),
|
|
634
|
-
onFocus:
|
|
635
|
-
onKeyDown:
|
|
634
|
+
onFocus: M(e.onFocus, () => p.onItemFocus(d)),
|
|
635
|
+
onKeyDown: M(e.onKeyDown, (g) => {
|
|
636
636
|
if (g.key === "Tab" && g.shiftKey) {
|
|
637
|
-
|
|
637
|
+
p.onItemShiftTab();
|
|
638
638
|
return;
|
|
639
639
|
}
|
|
640
640
|
if (g.target !== g.currentTarget) return;
|
|
641
|
-
const m =
|
|
641
|
+
const m = zn(g, p.orientation);
|
|
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 = C().filter((
|
|
645
|
+
let w = C().filter((N) => N.focusable).map((N) => N.ref.current);
|
|
646
646
|
if (m === "last") w.reverse();
|
|
647
647
|
else if (m === "prev" || m === "next") {
|
|
648
648
|
m === "prev" && w.reverse();
|
|
649
|
-
const
|
|
650
|
-
w =
|
|
649
|
+
const N = w.indexOf(g.currentTarget);
|
|
650
|
+
w = p.loop ? Un(w, N + 1) : w.slice(N + 1), setTimeout(() => st(w));
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
}),
|
|
654
|
-
children: typeof c == "function" ? c({ hasTabStop:
|
|
654
|
+
children: typeof c == "function" ? c({ hasTabStop: b != null, isCurrentTabStop: f }) : c
|
|
655
655
|
}
|
|
656
656
|
)
|
|
657
657
|
}
|
|
658
658
|
);
|
|
659
659
|
}
|
|
660
|
-
),
|
|
660
|
+
), Ln = {
|
|
661
661
|
ArrowLeft: "prev",
|
|
662
662
|
ArrowUp: "prev",
|
|
663
663
|
ArrowRight: "next",
|
|
@@ -667,91 +667,91 @@ const B = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(s) {
|
|
|
667
667
|
PageDown: "last",
|
|
668
668
|
End: "last"
|
|
669
669
|
};
|
|
670
|
-
function
|
|
670
|
+
function zn(e, t) {
|
|
671
671
|
const n = e.key;
|
|
672
672
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(n)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(n)))
|
|
673
|
-
return
|
|
673
|
+
return Ln[n];
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function st(e, t = !1) {
|
|
676
676
|
const n = document.activeElement;
|
|
677
677
|
for (const o of e)
|
|
678
678
|
if (o === n || (o.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function Un(e, t) {
|
|
681
681
|
return e.map((n, o) => e[(t + o) % e.length]);
|
|
682
682
|
}
|
|
683
|
-
const
|
|
683
|
+
const q = {
|
|
684
684
|
asChild: {
|
|
685
685
|
type: "boolean"
|
|
686
686
|
}
|
|
687
|
-
},
|
|
687
|
+
}, ce = ["white", "gray50", "gray100", "gray200", "gray300", "gray400", "gray500", "gray600", "gray700", "gray800", "gray900", "gray1000", "gray1100", "gray1200", "gray1300", "gray1400", "gray1500", "blue50", "blue100", "blue200", "blue300", "blue400", "blue500", "blue600", "blue700", "blue800", "blue900", "blue1000", "blue1100", "blue1200", "blue1300", "blue1400", "green50", "green100", "green200", "green300", "green400", "green500", "green600", "green700", "green800", "green900", "green1000", "green1100", "green1200", "red50", "red100", "red200", "red300", "red400", "red500", "red600", "red700", "red800", "red900", "red1000", "red1100"], Hn = {
|
|
688
688
|
color: {
|
|
689
689
|
type: "enum | string",
|
|
690
|
-
values:
|
|
690
|
+
values: ce,
|
|
691
691
|
className: "bd-color",
|
|
692
692
|
customProperties: ["--color"],
|
|
693
693
|
default: void 0
|
|
694
694
|
}
|
|
695
|
-
},
|
|
695
|
+
}, jn = {
|
|
696
696
|
borderColor: {
|
|
697
697
|
type: "enum | string",
|
|
698
|
-
values:
|
|
698
|
+
values: ce,
|
|
699
699
|
className: "bd-br-color",
|
|
700
700
|
customProperties: ["--border-color"],
|
|
701
701
|
default: void 0
|
|
702
702
|
}
|
|
703
|
-
},
|
|
703
|
+
}, Yn = {
|
|
704
704
|
accentColor: {
|
|
705
705
|
type: "enum | string",
|
|
706
|
-
values:
|
|
706
|
+
values: ce,
|
|
707
707
|
className: "bd-ac-color",
|
|
708
708
|
customProperties: ["--accent-color"],
|
|
709
709
|
default: void 0
|
|
710
710
|
}
|
|
711
|
-
},
|
|
711
|
+
}, L = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], U = {
|
|
712
712
|
p: {
|
|
713
713
|
type: "enum | string",
|
|
714
|
-
values:
|
|
714
|
+
values: L,
|
|
715
715
|
className: "bd-p",
|
|
716
716
|
customProperties: ["--p"]
|
|
717
717
|
},
|
|
718
718
|
px: {
|
|
719
719
|
type: "enum | string",
|
|
720
|
-
values:
|
|
720
|
+
values: L,
|
|
721
721
|
className: "bd-px",
|
|
722
722
|
customProperties: ["--px"]
|
|
723
723
|
},
|
|
724
724
|
py: {
|
|
725
725
|
type: "enum | string",
|
|
726
|
-
values:
|
|
726
|
+
values: L,
|
|
727
727
|
className: "bd-py",
|
|
728
728
|
customProperties: ["--py"]
|
|
729
729
|
},
|
|
730
730
|
pt: {
|
|
731
731
|
type: "enum | string",
|
|
732
|
-
values:
|
|
732
|
+
values: L,
|
|
733
733
|
className: "bd-pt",
|
|
734
734
|
customProperties: ["--pt"]
|
|
735
735
|
},
|
|
736
736
|
pr: {
|
|
737
737
|
type: "enum | string",
|
|
738
|
-
values:
|
|
738
|
+
values: L,
|
|
739
739
|
className: "bd-pr",
|
|
740
740
|
customProperties: ["--pr"]
|
|
741
741
|
},
|
|
742
742
|
pb: {
|
|
743
743
|
type: "enum | string",
|
|
744
|
-
values:
|
|
744
|
+
values: L,
|
|
745
745
|
className: "bd-pb",
|
|
746
746
|
customProperties: ["--pb"]
|
|
747
747
|
},
|
|
748
748
|
pl: {
|
|
749
749
|
type: "enum | string",
|
|
750
|
-
values:
|
|
750
|
+
values: L,
|
|
751
751
|
className: "bd-pl",
|
|
752
752
|
customProperties: ["--pl"]
|
|
753
753
|
}
|
|
754
|
-
},
|
|
754
|
+
}, rt = {
|
|
755
755
|
width: {
|
|
756
756
|
type: "string",
|
|
757
757
|
className: "bd-w",
|
|
@@ -767,7 +767,7 @@ const U = {
|
|
|
767
767
|
className: "bd-max-w",
|
|
768
768
|
customProperties: ["--max-width"]
|
|
769
769
|
}
|
|
770
|
-
},
|
|
770
|
+
}, qn = {
|
|
771
771
|
height: {
|
|
772
772
|
type: "string",
|
|
773
773
|
className: "bd-h",
|
|
@@ -783,59 +783,59 @@ const U = {
|
|
|
783
783
|
className: "bd-max-h",
|
|
784
784
|
customProperties: ["--max-height"]
|
|
785
785
|
}
|
|
786
|
-
},
|
|
787
|
-
...
|
|
788
|
-
...
|
|
789
|
-
...
|
|
786
|
+
}, Kn = ["static", "relative", "absolute", "fixed", "sticky"], ye = ["visible", "hidden", "clip", "scroll", "auto"], K = ["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"], Wn = ["0", "1"], Xn = ["0", "1"], Zn = ["start", "center", "end", "baseline", "stretch"], Jn = ["start", "center", "end", "baseline", "stretch"], Qn = {
|
|
787
|
+
...rt,
|
|
788
|
+
...qn,
|
|
789
|
+
...U,
|
|
790
790
|
position: {
|
|
791
791
|
type: "enum",
|
|
792
792
|
className: "bd-position",
|
|
793
|
-
values:
|
|
793
|
+
values: Kn
|
|
794
794
|
},
|
|
795
795
|
inset: {
|
|
796
796
|
type: "enum | string",
|
|
797
797
|
className: "bd-inset",
|
|
798
798
|
customProperties: ["--inset"],
|
|
799
|
-
values:
|
|
799
|
+
values: K
|
|
800
800
|
},
|
|
801
801
|
top: {
|
|
802
802
|
type: "enum | string",
|
|
803
803
|
className: "bd-top",
|
|
804
804
|
customProperties: ["--top"],
|
|
805
|
-
values:
|
|
805
|
+
values: K
|
|
806
806
|
},
|
|
807
807
|
right: {
|
|
808
808
|
type: "enum | string",
|
|
809
809
|
className: "bd-right",
|
|
810
810
|
customProperties: ["--right"],
|
|
811
|
-
values:
|
|
811
|
+
values: K
|
|
812
812
|
},
|
|
813
813
|
bottom: {
|
|
814
814
|
type: "enum | string",
|
|
815
815
|
className: "bd-bottom",
|
|
816
816
|
customProperties: ["--bottom"],
|
|
817
|
-
values:
|
|
817
|
+
values: K
|
|
818
818
|
},
|
|
819
819
|
left: {
|
|
820
820
|
type: "enum | string",
|
|
821
821
|
className: "bd-left",
|
|
822
822
|
customProperties: ["--left"],
|
|
823
|
-
values:
|
|
823
|
+
values: K
|
|
824
824
|
},
|
|
825
825
|
overflow: {
|
|
826
826
|
type: "enum",
|
|
827
827
|
className: "bd-overflow",
|
|
828
|
-
values:
|
|
828
|
+
values: ye
|
|
829
829
|
},
|
|
830
830
|
overflowX: {
|
|
831
831
|
type: "enum",
|
|
832
832
|
className: "bd-ox",
|
|
833
|
-
values:
|
|
833
|
+
values: ye
|
|
834
834
|
},
|
|
835
835
|
overflowY: {
|
|
836
836
|
type: "enum",
|
|
837
837
|
className: "bd-oy",
|
|
838
|
-
values:
|
|
838
|
+
values: ye
|
|
839
839
|
},
|
|
840
840
|
flexBasis: {
|
|
841
841
|
type: "string",
|
|
@@ -846,13 +846,13 @@ const U = {
|
|
|
846
846
|
type: "enum | string",
|
|
847
847
|
className: "bd-fs",
|
|
848
848
|
customProperties: ["--flex-shrink"],
|
|
849
|
-
values:
|
|
849
|
+
values: Wn
|
|
850
850
|
},
|
|
851
851
|
flexGrow: {
|
|
852
852
|
type: "enum | string",
|
|
853
853
|
className: "bd-fg",
|
|
854
854
|
customProperties: ["--flex-grow"],
|
|
855
|
-
values:
|
|
855
|
+
values: Xn
|
|
856
856
|
},
|
|
857
857
|
gridArea: {
|
|
858
858
|
type: "string",
|
|
@@ -892,205 +892,205 @@ const U = {
|
|
|
892
892
|
alignSelf: {
|
|
893
893
|
type: "enum",
|
|
894
894
|
className: "bd-as",
|
|
895
|
-
values:
|
|
895
|
+
values: Zn
|
|
896
896
|
},
|
|
897
897
|
justifySelf: {
|
|
898
898
|
type: "enum",
|
|
899
899
|
className: "bd-js",
|
|
900
|
-
values:
|
|
900
|
+
values: Jn
|
|
901
901
|
}
|
|
902
|
-
},
|
|
902
|
+
}, z = ["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"], G = {
|
|
903
903
|
m: {
|
|
904
904
|
type: "enum | string",
|
|
905
|
-
values:
|
|
905
|
+
values: z,
|
|
906
906
|
className: "bd-m",
|
|
907
907
|
customProperties: ["--m"]
|
|
908
908
|
},
|
|
909
909
|
mx: {
|
|
910
910
|
type: "enum | string",
|
|
911
|
-
values:
|
|
911
|
+
values: z,
|
|
912
912
|
className: "bd-mx",
|
|
913
913
|
customProperties: ["--ml", "--mr"]
|
|
914
914
|
},
|
|
915
915
|
my: {
|
|
916
916
|
type: "enum | string",
|
|
917
|
-
values:
|
|
917
|
+
values: z,
|
|
918
918
|
className: "bd-my",
|
|
919
919
|
customProperties: ["--mt", "--mb"]
|
|
920
920
|
},
|
|
921
921
|
mt: {
|
|
922
922
|
type: "enum | string",
|
|
923
|
-
values:
|
|
923
|
+
values: z,
|
|
924
924
|
className: "bd-mt",
|
|
925
925
|
customProperties: ["--mt"]
|
|
926
926
|
},
|
|
927
927
|
mr: {
|
|
928
928
|
type: "enum | string",
|
|
929
|
-
values:
|
|
929
|
+
values: z,
|
|
930
930
|
className: "bd-mr",
|
|
931
931
|
customProperties: ["--mr"]
|
|
932
932
|
},
|
|
933
933
|
mb: {
|
|
934
934
|
type: "enum | string",
|
|
935
|
-
values:
|
|
935
|
+
values: z,
|
|
936
936
|
className: "bd-mb",
|
|
937
937
|
customProperties: ["--mb"]
|
|
938
938
|
},
|
|
939
939
|
ml: {
|
|
940
940
|
type: "enum | string",
|
|
941
|
-
values:
|
|
941
|
+
values: z,
|
|
942
942
|
className: "bd-ml",
|
|
943
943
|
customProperties: ["--ml"]
|
|
944
944
|
}
|
|
945
|
-
},
|
|
945
|
+
}, eo = ["left", "center", "right"], to = {
|
|
946
946
|
align: {
|
|
947
947
|
type: "enum",
|
|
948
|
-
values:
|
|
948
|
+
values: eo,
|
|
949
949
|
className: "bd-ta"
|
|
950
950
|
}
|
|
951
|
-
},
|
|
951
|
+
}, no = ["wrap", "nowrap", "pretty", "balance"], oo = {
|
|
952
952
|
wrap: {
|
|
953
953
|
type: "enum",
|
|
954
954
|
className: "bd-tw",
|
|
955
|
-
values:
|
|
955
|
+
values: no
|
|
956
956
|
}
|
|
957
|
-
},
|
|
957
|
+
}, so = ["light", "regular", "medium", "semibold", "bold"], Te = {
|
|
958
958
|
weight: {
|
|
959
959
|
type: "enum",
|
|
960
|
-
values:
|
|
960
|
+
values: so,
|
|
961
961
|
className: "bd-weight"
|
|
962
962
|
}
|
|
963
|
-
},
|
|
963
|
+
}, ro = {
|
|
964
964
|
truncate: {
|
|
965
965
|
type: "boolean",
|
|
966
966
|
className: "bd-truncate"
|
|
967
967
|
}
|
|
968
|
-
},
|
|
968
|
+
}, ao = ["normal", "start", "end", "both"], co = {
|
|
969
969
|
trim: {
|
|
970
970
|
type: "enum",
|
|
971
971
|
className: "bd-lt",
|
|
972
|
-
values:
|
|
972
|
+
values: ao,
|
|
973
973
|
default: "normal"
|
|
974
974
|
}
|
|
975
|
-
},
|
|
975
|
+
}, io = ["none", "s", "m", "l", "full"], lo = {
|
|
976
976
|
radius: {
|
|
977
977
|
type: "enum | string",
|
|
978
|
-
values:
|
|
978
|
+
values: io,
|
|
979
979
|
default: void 0,
|
|
980
980
|
className: "bd-radius",
|
|
981
981
|
customProperties: ["--radius"]
|
|
982
982
|
}
|
|
983
|
-
},
|
|
983
|
+
}, we = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], at = {
|
|
984
984
|
gap: {
|
|
985
985
|
type: "enum | string",
|
|
986
986
|
className: "bd-gap",
|
|
987
987
|
customProperties: ["--gap"],
|
|
988
|
-
values:
|
|
988
|
+
values: we
|
|
989
989
|
},
|
|
990
990
|
gapX: {
|
|
991
991
|
type: "enum | string",
|
|
992
992
|
className: "bd-cg",
|
|
993
993
|
customProperties: ["--col-gap"],
|
|
994
|
-
values:
|
|
994
|
+
values: we
|
|
995
995
|
},
|
|
996
996
|
gapY: {
|
|
997
997
|
type: "enum | string",
|
|
998
998
|
className: "bd-rg",
|
|
999
999
|
customProperties: ["--row-gap"],
|
|
1000
|
-
values:
|
|
1000
|
+
values: we
|
|
1001
1001
|
}
|
|
1002
|
-
},
|
|
1003
|
-
as: { type: "enum", values:
|
|
1004
|
-
...
|
|
1002
|
+
}, uo = ["span", "div", "label", "p"], po = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"], fo = {
|
|
1003
|
+
as: { type: "enum", values: uo, default: "span" },
|
|
1004
|
+
...q,
|
|
1005
1005
|
size: {
|
|
1006
1006
|
type: "enum | string",
|
|
1007
1007
|
className: "bd-size",
|
|
1008
|
-
values:
|
|
1008
|
+
values: po,
|
|
1009
1009
|
customProperties: ["--size"]
|
|
1010
1010
|
},
|
|
1011
|
-
...
|
|
1012
|
-
...
|
|
1013
|
-
...Wn,
|
|
1014
|
-
...Zn,
|
|
1015
|
-
...Qe,
|
|
1016
|
-
...Qn,
|
|
1011
|
+
...q,
|
|
1012
|
+
...G,
|
|
1017
1013
|
...to,
|
|
1018
|
-
...
|
|
1019
|
-
|
|
1014
|
+
...oo,
|
|
1015
|
+
...Te,
|
|
1016
|
+
...ro,
|
|
1017
|
+
...co,
|
|
1018
|
+
...Hn
|
|
1019
|
+
}, Be = l.forwardRef((e, t) => {
|
|
1020
1020
|
const {
|
|
1021
1021
|
children: n,
|
|
1022
1022
|
className: o,
|
|
1023
1023
|
asChild: s,
|
|
1024
1024
|
as: r = "span",
|
|
1025
1025
|
...c
|
|
1026
|
-
} =
|
|
1027
|
-
return /* @__PURE__ */
|
|
1026
|
+
} = I(e, fo);
|
|
1027
|
+
return /* @__PURE__ */ i(re, { ...c, ref: t, className: R("bd-Text", o), children: s ? n : /* @__PURE__ */ i(r, { children: n }) });
|
|
1028
1028
|
});
|
|
1029
|
-
|
|
1030
|
-
const
|
|
1031
|
-
as: { type: "enum", values:
|
|
1032
|
-
...
|
|
1029
|
+
Be.displayName = "Text";
|
|
1030
|
+
const mo = (e) => e === "between" ? "space-between" : e, ho = ["div", "span"], go = ["none", "inline-flex", "flex"], bo = ["row", "column", "row-reverse", "column-reverse"], Co = ["start", "center", "end", "baseline", "stretch"], vo = ["start", "center", "end", "between"], yo = ["nowrap", "wrap", "wrap-reverse"], Me = {
|
|
1031
|
+
as: { type: "enum", values: ho, default: "div" },
|
|
1032
|
+
...q,
|
|
1033
1033
|
display: {
|
|
1034
1034
|
type: "enum",
|
|
1035
1035
|
className: "bd-display",
|
|
1036
|
-
values:
|
|
1036
|
+
values: go
|
|
1037
1037
|
},
|
|
1038
1038
|
direction: {
|
|
1039
1039
|
type: "enum",
|
|
1040
1040
|
className: "bd-fd",
|
|
1041
|
-
values:
|
|
1041
|
+
values: bo
|
|
1042
1042
|
},
|
|
1043
1043
|
align: {
|
|
1044
1044
|
type: "enum",
|
|
1045
1045
|
className: "bd-ai",
|
|
1046
|
-
values:
|
|
1046
|
+
values: Co
|
|
1047
1047
|
},
|
|
1048
1048
|
justify: {
|
|
1049
1049
|
type: "enum",
|
|
1050
1050
|
className: "bd-jc",
|
|
1051
|
-
values:
|
|
1052
|
-
parseValue:
|
|
1051
|
+
values: vo,
|
|
1052
|
+
parseValue: mo
|
|
1053
1053
|
},
|
|
1054
1054
|
wrap: {
|
|
1055
1055
|
type: "enum",
|
|
1056
1056
|
className: "bd-fw",
|
|
1057
|
-
values:
|
|
1057
|
+
values: yo
|
|
1058
1058
|
},
|
|
1059
|
-
...
|
|
1060
|
-
...
|
|
1061
|
-
...
|
|
1062
|
-
},
|
|
1063
|
-
const { className: n, asChild: o, as: s = "div", ...r } =
|
|
1064
|
-
return /* @__PURE__ */
|
|
1059
|
+
...at,
|
|
1060
|
+
...Qn,
|
|
1061
|
+
...G
|
|
1062
|
+
}, D = l.forwardRef((e, t) => {
|
|
1063
|
+
const { className: n, asChild: o, as: s = "div", ...r } = I(e, Me);
|
|
1064
|
+
return /* @__PURE__ */ i(o ? re : s, { ...r, ref: t, className: R("bd-Flex", n) });
|
|
1065
1065
|
});
|
|
1066
|
-
|
|
1067
|
-
const
|
|
1068
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1066
|
+
D.displayName = "Flex";
|
|
1067
|
+
const wo = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], No = {
|
|
1068
|
+
size: { type: "enum", className: "bd-size", values: wo, default: "2" },
|
|
1069
1069
|
loading: { type: "boolean", default: !0 },
|
|
1070
|
-
color: { type: "enum", className: "bd-color", values:
|
|
1071
|
-
...
|
|
1072
|
-
},
|
|
1073
|
-
const { className: n, children: o, loading: s, ...r } =
|
|
1070
|
+
color: { type: "enum", className: "bd-color", values: ce },
|
|
1071
|
+
...G
|
|
1072
|
+
}, ct = l.forwardRef((e, t) => {
|
|
1073
|
+
const { className: n, children: o, loading: s, ...r } = I(
|
|
1074
1074
|
e,
|
|
1075
|
-
|
|
1076
|
-
|
|
1075
|
+
No,
|
|
1076
|
+
jn
|
|
1077
1077
|
);
|
|
1078
1078
|
if (!s) return o;
|
|
1079
|
-
const c = /* @__PURE__ */
|
|
1080
|
-
return o === void 0 ? c : /* @__PURE__ */
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
/* @__PURE__ */
|
|
1079
|
+
const c = /* @__PURE__ */ i("span", { ...r, ref: t, className: R("bd-Spinner", n) });
|
|
1080
|
+
return o === void 0 ? c : /* @__PURE__ */ k(D, { asChild: !0, position: "relative", align: "center", justify: "center", children: [
|
|
1081
|
+
/* @__PURE__ */ i("span", { children: /* @__PURE__ */ i("span", { "aria-hidden": !0, style: { display: "contents", visibility: "hidden" }, inert: void 0, children: o }) }),
|
|
1082
|
+
/* @__PURE__ */ i(D, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ i("span", { children: c }) })
|
|
1083
1083
|
] });
|
|
1084
1084
|
});
|
|
1085
|
-
|
|
1086
|
-
const
|
|
1085
|
+
ct.displayName = "Spinner";
|
|
1086
|
+
const Ro = ["1", "2", "3", "4", "5"], xo = [
|
|
1087
1087
|
"fill-primary",
|
|
1088
1088
|
"fill-secondary",
|
|
1089
1089
|
"outline-primary",
|
|
1090
1090
|
"outline-secondary",
|
|
1091
1091
|
"ghost"
|
|
1092
|
-
],
|
|
1093
|
-
...
|
|
1092
|
+
], Ne = {
|
|
1093
|
+
...q,
|
|
1094
1094
|
/**
|
|
1095
1095
|
* @description 버튼의 높이 기준
|
|
1096
1096
|
*
|
|
@@ -1100,15 +1100,15 @@ const bo = ["1", "2", "3", "4", "5"], Co = [
|
|
|
1100
1100
|
* 4="48px"
|
|
1101
1101
|
* 5="56px"
|
|
1102
1102
|
*/
|
|
1103
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1104
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
1105
|
-
...
|
|
1106
|
-
...
|
|
1107
|
-
...
|
|
1108
|
-
...
|
|
1109
|
-
...
|
|
1103
|
+
size: { type: "enum", className: "bd-size", values: Ro, default: "5" },
|
|
1104
|
+
variant: { type: "enum", className: "bd-variant", values: xo, default: "fill-primary" },
|
|
1105
|
+
...rt,
|
|
1106
|
+
...G,
|
|
1107
|
+
...at,
|
|
1108
|
+
...lo,
|
|
1109
|
+
...Te,
|
|
1110
1110
|
loading: { type: "boolean", className: "bd-loading", default: !1 }
|
|
1111
|
-
},
|
|
1111
|
+
}, So = (e) => {
|
|
1112
1112
|
switch (e) {
|
|
1113
1113
|
case "1":
|
|
1114
1114
|
return "1";
|
|
@@ -1119,7 +1119,7 @@ const bo = ["1", "2", "3", "4", "5"], Co = [
|
|
|
1119
1119
|
case "5":
|
|
1120
1120
|
return "3";
|
|
1121
1121
|
}
|
|
1122
|
-
},
|
|
1122
|
+
}, ko = (e) => {
|
|
1123
1123
|
switch (e) {
|
|
1124
1124
|
case "fill-primary":
|
|
1125
1125
|
return;
|
|
@@ -1131,41 +1131,41 @@ const bo = ["1", "2", "3", "4", "5"], Co = [
|
|
|
1131
1131
|
default:
|
|
1132
1132
|
return;
|
|
1133
1133
|
}
|
|
1134
|
-
},
|
|
1135
|
-
const { variant: n =
|
|
1134
|
+
}, xe = l.forwardRef((e, t) => {
|
|
1135
|
+
const { variant: n = Ne.variant.default, size: o = Ne.size.default } = e, {
|
|
1136
1136
|
className: s,
|
|
1137
1137
|
children: r,
|
|
1138
1138
|
asChild: c,
|
|
1139
1139
|
disabled: a = e.loading,
|
|
1140
1140
|
...u
|
|
1141
|
-
} =
|
|
1142
|
-
return /* @__PURE__ */
|
|
1143
|
-
c ?
|
|
1141
|
+
} = I(e, Ne);
|
|
1142
|
+
return /* @__PURE__ */ i(
|
|
1143
|
+
c ? re : "button",
|
|
1144
1144
|
{
|
|
1145
1145
|
"data-disabled": a || void 0,
|
|
1146
1146
|
"data-loading": e.loading || void 0,
|
|
1147
1147
|
disabled: a,
|
|
1148
1148
|
...u,
|
|
1149
1149
|
ref: t,
|
|
1150
|
-
className:
|
|
1151
|
-
children: e.loading ? /* @__PURE__ */
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
-
/* @__PURE__ */
|
|
1155
|
-
|
|
1150
|
+
className: R("bd-Button", s),
|
|
1151
|
+
children: e.loading ? /* @__PURE__ */ k(Ye, { children: [
|
|
1152
|
+
/* @__PURE__ */ i("span", { style: { display: "contents", visibility: "hidden" }, "aria-hidden": !0, children: r }),
|
|
1153
|
+
/* @__PURE__ */ i(et, { children: r }),
|
|
1154
|
+
/* @__PURE__ */ i(D, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
1155
|
+
ct,
|
|
1156
1156
|
{
|
|
1157
|
-
size:
|
|
1158
|
-
color:
|
|
1157
|
+
size: So(o),
|
|
1158
|
+
color: ko(n)
|
|
1159
1159
|
}
|
|
1160
1160
|
) }) })
|
|
1161
1161
|
] }) : r
|
|
1162
1162
|
}
|
|
1163
1163
|
);
|
|
1164
1164
|
});
|
|
1165
|
-
|
|
1166
|
-
const
|
|
1165
|
+
xe.displayName = "Button";
|
|
1166
|
+
const ie = l.forwardRef((e, t) => {
|
|
1167
1167
|
const { color: n = "currentColor", ...o } = e;
|
|
1168
|
-
return /* @__PURE__ */
|
|
1168
|
+
return /* @__PURE__ */ i(
|
|
1169
1169
|
"svg",
|
|
1170
1170
|
{
|
|
1171
1171
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1175,7 +1175,7 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1175
1175
|
fill: "none",
|
|
1176
1176
|
...o,
|
|
1177
1177
|
ref: t,
|
|
1178
|
-
children: /* @__PURE__ */
|
|
1178
|
+
children: /* @__PURE__ */ i(
|
|
1179
1179
|
"path",
|
|
1180
1180
|
{
|
|
1181
1181
|
d: "M0.800781 3.32636L3.76374 6.13338L8.80078 0.800049",
|
|
@@ -1187,9 +1187,9 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1187
1187
|
)
|
|
1188
1188
|
}
|
|
1189
1189
|
);
|
|
1190
|
-
}),
|
|
1190
|
+
}), Po = l.forwardRef((e, t) => {
|
|
1191
1191
|
const { color: n = "currentColor", ...o } = e;
|
|
1192
|
-
return /* @__PURE__ */
|
|
1192
|
+
return /* @__PURE__ */ i(
|
|
1193
1193
|
"svg",
|
|
1194
1194
|
{
|
|
1195
1195
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1199,7 +1199,7 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1199
1199
|
fill: n,
|
|
1200
1200
|
...o,
|
|
1201
1201
|
ref: t,
|
|
1202
|
-
children: /* @__PURE__ */
|
|
1202
|
+
children: /* @__PURE__ */ i(
|
|
1203
1203
|
"path",
|
|
1204
1204
|
{
|
|
1205
1205
|
fillRule: "evenodd",
|
|
@@ -1209,9 +1209,9 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1209
1209
|
)
|
|
1210
1210
|
}
|
|
1211
1211
|
);
|
|
1212
|
-
}),
|
|
1212
|
+
}), Io = l.forwardRef((e, t) => {
|
|
1213
1213
|
const { color: n = "currentColor", width: o = 20, height: s = 20, ...r } = e;
|
|
1214
|
-
return /* @__PURE__ */
|
|
1214
|
+
return /* @__PURE__ */ i(
|
|
1215
1215
|
"svg",
|
|
1216
1216
|
{
|
|
1217
1217
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1221,7 +1221,7 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1221
1221
|
fill: "none",
|
|
1222
1222
|
...r,
|
|
1223
1223
|
ref: t,
|
|
1224
|
-
children: /* @__PURE__ */
|
|
1224
|
+
children: /* @__PURE__ */ i(
|
|
1225
1225
|
"path",
|
|
1226
1226
|
{
|
|
1227
1227
|
d: "M12.3385 16.9999C12.1891 17.0004 12.0415 16.9675 11.9065 16.9034C11.7715 16.8394 11.6525 16.746 11.5584 16.63L6.72753 10.6305C6.58042 10.4516 6.5 10.2272 6.5 9.99559C6.5 9.76399 6.58042 9.53957 6.72753 9.36065L11.7284 3.36122C11.8982 3.15702 12.1422 3.02861 12.4066 3.00423C12.6711 2.97985 12.9344 3.06151 13.1387 3.23123C13.3429 3.40095 13.4714 3.64484 13.4958 3.90924C13.5202 4.17364 13.4385 4.4369 13.2687 4.6411L8.7979 10.0006L13.1187 15.3601C13.241 15.5069 13.3187 15.6856 13.3426 15.8751C13.3664 16.0646 13.3355 16.257 13.2534 16.4296C13.1714 16.6021 13.0416 16.7475 12.8795 16.8486C12.7173 16.9496 12.5296 17.0022 12.3385 16.9999Z",
|
|
@@ -1230,9 +1230,9 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1230
1230
|
)
|
|
1231
1231
|
}
|
|
1232
1232
|
);
|
|
1233
|
-
}),
|
|
1233
|
+
}), Eo = l.forwardRef((e, t) => {
|
|
1234
1234
|
const { color: n = "currentColor", width: o = 20, height: s = 20, ...r } = e;
|
|
1235
|
-
return /* @__PURE__ */
|
|
1235
|
+
return /* @__PURE__ */ i(
|
|
1236
1236
|
"svg",
|
|
1237
1237
|
{
|
|
1238
1238
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1242,7 +1242,7 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1242
1242
|
fill: "none",
|
|
1243
1243
|
...r,
|
|
1244
1244
|
ref: t,
|
|
1245
|
-
children: /* @__PURE__ */
|
|
1245
|
+
children: /* @__PURE__ */ i(
|
|
1246
1246
|
"path",
|
|
1247
1247
|
{
|
|
1248
1248
|
d: "M7.66146 3.00007C7.81088 2.99956 7.95852 3.03253 8.09352 3.09655C8.22853 3.16057 8.34747 3.25403 8.4416 3.37003L13.2725 9.36947C13.4196 9.54838 13.5 9.77281 13.5 10.0044C13.5 10.236 13.4196 10.4604 13.2725 10.6393L8.27157 16.6388C8.1018 16.843 7.85785 16.9714 7.59337 16.9958C7.3289 17.0201 7.06557 16.9385 6.86132 16.7688C6.65706 16.599 6.52862 16.3552 6.50423 16.0908C6.47985 15.8264 6.56152 15.5631 6.73129 15.3589L11.2021 9.99941L6.88132 4.63991C6.75902 4.49314 6.68133 4.31442 6.65744 4.12489C6.63356 3.93536 6.66448 3.74295 6.74655 3.57044C6.82862 3.39793 6.95841 3.25253 7.12054 3.15145C7.28268 3.05037 7.47039 2.99784 7.66146 3.00007Z",
|
|
@@ -1251,9 +1251,9 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1251
1251
|
)
|
|
1252
1252
|
}
|
|
1253
1253
|
);
|
|
1254
|
-
}),
|
|
1254
|
+
}), Do = l.forwardRef((e, t) => {
|
|
1255
1255
|
const { color: n = "currentColor", width: o = 20, height: s = 20, ...r } = e;
|
|
1256
|
-
return /* @__PURE__ */
|
|
1256
|
+
return /* @__PURE__ */ i(
|
|
1257
1257
|
"svg",
|
|
1258
1258
|
{
|
|
1259
1259
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1263,7 +1263,7 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1263
1263
|
fill: "none",
|
|
1264
1264
|
...r,
|
|
1265
1265
|
ref: t,
|
|
1266
|
-
children: /* @__PURE__ */
|
|
1266
|
+
children: /* @__PURE__ */ i(
|
|
1267
1267
|
"path",
|
|
1268
1268
|
{
|
|
1269
1269
|
d: "M15 8.82962C15.0003 8.93634 14.9768 9.0418 14.931 9.13823C14.8853 9.23466 14.8186 9.31962 14.7357 9.38686L10.4504 12.8375C10.3226 12.9426 10.1623 13 9.99685 13C9.83142 13 9.67112 12.9426 9.54332 12.8375L5.25801 9.26541C5.11216 9.14414 5.02043 8.96989 5.00302 8.78098C4.98561 8.59207 5.04393 8.40398 5.16516 8.25808C5.2864 8.11219 5.4606 8.02044 5.64946 8.00302C5.83832 7.98561 6.02636 8.04395 6.17221 8.16521L10.0004 11.3586L13.8286 8.27237C13.9335 8.18501 14.0611 8.12952 14.1965 8.11246C14.3319 8.0954 14.4693 8.11749 14.5925 8.17611C14.7158 8.23473 14.8196 8.32743 14.8918 8.44325C14.964 8.55906 15.0015 8.69314 15 8.82962Z",
|
|
@@ -1272,11 +1272,11 @@ const Ne = i.forwardRef((e, t) => {
|
|
|
1272
1272
|
)
|
|
1273
1273
|
}
|
|
1274
1274
|
);
|
|
1275
|
-
}),
|
|
1276
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1277
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
1278
|
-
},
|
|
1279
|
-
function
|
|
1275
|
+
}), To = ["1", "2", "3", "4"], Bo = ["classic", "circle", "outline"], O = {
|
|
1276
|
+
size: { type: "enum", className: "bd-size", values: To, default: "2" },
|
|
1277
|
+
variant: { type: "enum", className: "bd-variant", values: Bo, default: "classic" }
|
|
1278
|
+
}, _e = "Checkbox", [Mo, it] = _(_e), [_o, Ae] = Mo(_e);
|
|
1279
|
+
function lt(e) {
|
|
1280
1280
|
const {
|
|
1281
1281
|
__scopeCheckbox: t,
|
|
1282
1282
|
checked: n,
|
|
@@ -1287,40 +1287,40 @@ function Eo(e) {
|
|
|
1287
1287
|
disabled: a,
|
|
1288
1288
|
value: u = "on",
|
|
1289
1289
|
children: d,
|
|
1290
|
-
onCheckedChange:
|
|
1290
|
+
onCheckedChange: p,
|
|
1291
1291
|
// @ts-expect-error - Internal prop for render
|
|
1292
|
-
__internal:
|
|
1293
|
-
} = e, [C, h] =
|
|
1292
|
+
__internal: f
|
|
1293
|
+
} = e, [C, h] = B({
|
|
1294
1294
|
prop: n,
|
|
1295
1295
|
defaultProp: o ?? !1,
|
|
1296
|
-
onChange:
|
|
1297
|
-
caller:
|
|
1298
|
-
}), [
|
|
1296
|
+
onChange: p,
|
|
1297
|
+
caller: _e
|
|
1298
|
+
}), [v, b] = l.useState(null), [g, m] = l.useState(null), y = l.useRef(!1), w = v ? !!c || !!v.closest("form") : !0, N = {
|
|
1299
1299
|
checked: C,
|
|
1300
1300
|
disabled: a,
|
|
1301
1301
|
setChecked: h,
|
|
1302
|
-
control:
|
|
1303
|
-
setControl:
|
|
1302
|
+
control: v,
|
|
1303
|
+
setControl: b,
|
|
1304
1304
|
name: r,
|
|
1305
1305
|
form: c,
|
|
1306
1306
|
value: u,
|
|
1307
1307
|
hasConsumerStoppedPropagationRef: y,
|
|
1308
1308
|
required: s,
|
|
1309
|
-
defaultChecked:
|
|
1309
|
+
defaultChecked: F(o) ? !1 : o,
|
|
1310
1310
|
isFormControl: w,
|
|
1311
1311
|
bubbleInput: g,
|
|
1312
1312
|
setBubbleInput: m
|
|
1313
1313
|
};
|
|
1314
|
-
return /* @__PURE__ */
|
|
1315
|
-
|
|
1314
|
+
return /* @__PURE__ */ i(
|
|
1315
|
+
_o,
|
|
1316
1316
|
{
|
|
1317
1317
|
scope: t,
|
|
1318
|
-
...
|
|
1319
|
-
children:
|
|
1318
|
+
...N,
|
|
1319
|
+
children: Ao(f) ? f(N) : d
|
|
1320
1320
|
}
|
|
1321
1321
|
);
|
|
1322
1322
|
}
|
|
1323
|
-
const
|
|
1323
|
+
const ut = "CheckboxTrigger", dt = l.forwardRef(
|
|
1324
1324
|
({
|
|
1325
1325
|
__scopeCheckbox: e,
|
|
1326
1326
|
onKeyDown: t,
|
|
@@ -1333,43 +1333,43 @@ const st = "CheckboxTrigger", rt = i.forwardRef(
|
|
|
1333
1333
|
disabled: a,
|
|
1334
1334
|
checked: u,
|
|
1335
1335
|
required: d,
|
|
1336
|
-
setControl:
|
|
1337
|
-
setChecked:
|
|
1336
|
+
setControl: p,
|
|
1337
|
+
setChecked: f,
|
|
1338
1338
|
hasConsumerStoppedPropagationRef: C,
|
|
1339
1339
|
isFormControl: h,
|
|
1340
|
-
bubbleInput:
|
|
1341
|
-
} =
|
|
1342
|
-
return
|
|
1340
|
+
bubbleInput: v
|
|
1341
|
+
} = Ae(ut, e), b = T(s, p), g = l.useRef(u);
|
|
1342
|
+
return l.useEffect(() => {
|
|
1343
1343
|
const m = r?.form;
|
|
1344
1344
|
if (m) {
|
|
1345
|
-
const y = () =>
|
|
1345
|
+
const y = () => f(g.current);
|
|
1346
1346
|
return m.addEventListener("reset", y), () => m.removeEventListener("reset", y);
|
|
1347
1347
|
}
|
|
1348
|
-
}, [r,
|
|
1349
|
-
|
|
1348
|
+
}, [r, f]), /* @__PURE__ */ i(
|
|
1349
|
+
P.button,
|
|
1350
1350
|
{
|
|
1351
1351
|
type: "button",
|
|
1352
1352
|
role: "checkbox",
|
|
1353
|
-
"aria-checked":
|
|
1353
|
+
"aria-checked": F(u) ? "mixed" : u,
|
|
1354
1354
|
"aria-required": d,
|
|
1355
|
-
"data-state":
|
|
1355
|
+
"data-state": gt(u),
|
|
1356
1356
|
"data-disabled": a ? "" : void 0,
|
|
1357
1357
|
disabled: a,
|
|
1358
1358
|
value: c,
|
|
1359
1359
|
...o,
|
|
1360
|
-
ref:
|
|
1361
|
-
onKeyDown:
|
|
1360
|
+
ref: b,
|
|
1361
|
+
onKeyDown: M(t, (m) => {
|
|
1362
1362
|
m.key === "Enter" && m.preventDefault();
|
|
1363
1363
|
}),
|
|
1364
|
-
onClick:
|
|
1365
|
-
|
|
1364
|
+
onClick: M(n, (m) => {
|
|
1365
|
+
f((y) => F(y) ? !0 : !y), v && h && (C.current = m.isPropagationStopped(), C.current || m.stopPropagation());
|
|
1366
1366
|
})
|
|
1367
1367
|
}
|
|
1368
1368
|
);
|
|
1369
1369
|
}
|
|
1370
1370
|
);
|
|
1371
|
-
|
|
1372
|
-
const
|
|
1371
|
+
dt.displayName = ut;
|
|
1372
|
+
const pt = l.forwardRef(
|
|
1373
1373
|
(e, t) => {
|
|
1374
1374
|
const {
|
|
1375
1375
|
__scopeCheckbox: n,
|
|
@@ -1380,32 +1380,32 @@ const at = i.forwardRef(
|
|
|
1380
1380
|
disabled: a,
|
|
1381
1381
|
value: u,
|
|
1382
1382
|
onCheckedChange: d,
|
|
1383
|
-
form:
|
|
1384
|
-
...
|
|
1383
|
+
form: p,
|
|
1384
|
+
...f
|
|
1385
1385
|
} = e;
|
|
1386
|
-
return /* @__PURE__ */
|
|
1387
|
-
|
|
1386
|
+
return /* @__PURE__ */ i(
|
|
1387
|
+
lt,
|
|
1388
1388
|
{
|
|
1389
1389
|
__scopeCheckbox: n,
|
|
1390
1390
|
checked: s,
|
|
1391
1391
|
defaultChecked: r,
|
|
1392
1392
|
required: c,
|
|
1393
1393
|
name: o,
|
|
1394
|
-
form:
|
|
1394
|
+
form: p,
|
|
1395
1395
|
disabled: a,
|
|
1396
1396
|
value: u,
|
|
1397
1397
|
onCheckedChange: d,
|
|
1398
|
-
__internal: ({ isFormControl: C }) => /* @__PURE__ */
|
|
1399
|
-
/* @__PURE__ */
|
|
1400
|
-
|
|
1398
|
+
__internal: ({ isFormControl: C }) => /* @__PURE__ */ k(Ye, { children: [
|
|
1399
|
+
/* @__PURE__ */ i(
|
|
1400
|
+
dt,
|
|
1401
1401
|
{
|
|
1402
|
-
...
|
|
1402
|
+
...f,
|
|
1403
1403
|
ref: t,
|
|
1404
1404
|
__scopeCheckbox: n
|
|
1405
1405
|
}
|
|
1406
1406
|
),
|
|
1407
|
-
C && /* @__PURE__ */
|
|
1408
|
-
|
|
1407
|
+
C && /* @__PURE__ */ i(
|
|
1408
|
+
mt,
|
|
1409
1409
|
{
|
|
1410
1410
|
__scopeCheckbox: n
|
|
1411
1411
|
}
|
|
@@ -1414,7 +1414,7 @@ const at = i.forwardRef(
|
|
|
1414
1414
|
}
|
|
1415
1415
|
);
|
|
1416
1416
|
}
|
|
1417
|
-
),
|
|
1417
|
+
), ft = "CheckboxBubbleInput", mt = l.forwardRef(
|
|
1418
1418
|
({ __scopeCheckbox: e, ...t }, n) => {
|
|
1419
1419
|
const {
|
|
1420
1420
|
control: o,
|
|
@@ -1424,26 +1424,26 @@ const at = i.forwardRef(
|
|
|
1424
1424
|
disabled: a,
|
|
1425
1425
|
name: u,
|
|
1426
1426
|
value: d,
|
|
1427
|
-
form:
|
|
1428
|
-
bubbleInput:
|
|
1427
|
+
form: p,
|
|
1428
|
+
bubbleInput: f,
|
|
1429
1429
|
setBubbleInput: C,
|
|
1430
1430
|
hasConsumerStoppedPropagationRef: h
|
|
1431
|
-
} =
|
|
1432
|
-
|
|
1433
|
-
const y =
|
|
1431
|
+
} = Ae(ft, e), v = T(n, C), b = Ie(s), g = Ee(o);
|
|
1432
|
+
l.useEffect(() => {
|
|
1433
|
+
const y = f;
|
|
1434
1434
|
if (!y) return;
|
|
1435
|
-
const w = window.HTMLInputElement.prototype,
|
|
1435
|
+
const w = window.HTMLInputElement.prototype, x = Object.getOwnPropertyDescriptor(
|
|
1436
1436
|
w,
|
|
1437
1437
|
"checked"
|
|
1438
|
-
).set,
|
|
1439
|
-
if (
|
|
1440
|
-
const
|
|
1441
|
-
y.indeterminate =
|
|
1438
|
+
).set, S = !h.current;
|
|
1439
|
+
if (b !== s && x) {
|
|
1440
|
+
const A = new Event("click", { bubbles: S });
|
|
1441
|
+
y.indeterminate = F(s), x.call(y, F(s) ? !1 : s), y.dispatchEvent(A);
|
|
1442
1442
|
}
|
|
1443
|
-
}, [
|
|
1444
|
-
const m =
|
|
1445
|
-
return /* @__PURE__ */
|
|
1446
|
-
|
|
1443
|
+
}, [f, b, s, h]);
|
|
1444
|
+
const m = l.useRef(F(s) ? !1 : s);
|
|
1445
|
+
return /* @__PURE__ */ i(
|
|
1446
|
+
P.input,
|
|
1447
1447
|
{
|
|
1448
1448
|
type: "checkbox",
|
|
1449
1449
|
"aria-hidden": !0,
|
|
@@ -1452,10 +1452,10 @@ const at = i.forwardRef(
|
|
|
1452
1452
|
disabled: a,
|
|
1453
1453
|
name: u,
|
|
1454
1454
|
value: d,
|
|
1455
|
-
form:
|
|
1455
|
+
form: p,
|
|
1456
1456
|
...t,
|
|
1457
1457
|
tabIndex: -1,
|
|
1458
|
-
ref:
|
|
1458
|
+
ref: v,
|
|
1459
1459
|
style: {
|
|
1460
1460
|
...t.style,
|
|
1461
1461
|
...g,
|
|
@@ -1469,13 +1469,13 @@ const at = i.forwardRef(
|
|
|
1469
1469
|
);
|
|
1470
1470
|
}
|
|
1471
1471
|
);
|
|
1472
|
-
|
|
1473
|
-
const
|
|
1474
|
-
const { __scopeCheckbox: n, forceMount: o, ...s } = e, r =
|
|
1475
|
-
return /* @__PURE__ */
|
|
1476
|
-
|
|
1472
|
+
mt.displayName = ft;
|
|
1473
|
+
const ht = "CheckboxIndicator", le = l.forwardRef((e, t) => {
|
|
1474
|
+
const { __scopeCheckbox: n, forceMount: o, ...s } = e, r = Ae(ht, n);
|
|
1475
|
+
return /* @__PURE__ */ i(Qe, { remain: o || F(r.checked) || r.checked === !0, children: /* @__PURE__ */ i(
|
|
1476
|
+
P.span,
|
|
1477
1477
|
{
|
|
1478
|
-
"data-state":
|
|
1478
|
+
"data-state": gt(r.checked),
|
|
1479
1479
|
"data-disabled": r.disabled ? "" : void 0,
|
|
1480
1480
|
...s,
|
|
1481
1481
|
ref: t,
|
|
@@ -1483,30 +1483,30 @@ const lt = "CheckboxIndicator", ke = i.forwardRef((e, t) => {
|
|
|
1483
1483
|
}
|
|
1484
1484
|
) });
|
|
1485
1485
|
});
|
|
1486
|
-
|
|
1487
|
-
function
|
|
1486
|
+
le.displayName = ht;
|
|
1487
|
+
function Ao(e) {
|
|
1488
1488
|
return typeof e == "function";
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1490
|
+
function F(e) {
|
|
1491
1491
|
return e === "indeterminate";
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1494
|
-
return
|
|
1493
|
+
function gt(e) {
|
|
1494
|
+
return F(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1495
1495
|
}
|
|
1496
|
-
const
|
|
1496
|
+
const Oo = l.forwardRef((e, t) => {
|
|
1497
1497
|
const {
|
|
1498
1498
|
className: n,
|
|
1499
1499
|
checked: o,
|
|
1500
1500
|
defaultChecked: s = !1,
|
|
1501
1501
|
onCheckedChange: r,
|
|
1502
1502
|
...c
|
|
1503
|
-
} =
|
|
1503
|
+
} = I(e, O), [a, u] = B({
|
|
1504
1504
|
prop: o,
|
|
1505
1505
|
defaultProp: s,
|
|
1506
1506
|
onChange: r
|
|
1507
1507
|
});
|
|
1508
|
-
return /* @__PURE__ */
|
|
1509
|
-
|
|
1508
|
+
return /* @__PURE__ */ i(
|
|
1509
|
+
pt,
|
|
1510
1510
|
{
|
|
1511
1511
|
...c,
|
|
1512
1512
|
defaultChecked: s,
|
|
@@ -1514,19 +1514,445 @@ const To = i.forwardRef((e, t) => {
|
|
|
1514
1514
|
onCheckedChange: u,
|
|
1515
1515
|
asChild: !1,
|
|
1516
1516
|
ref: t,
|
|
1517
|
-
className:
|
|
1518
|
-
children: /* @__PURE__ */
|
|
1517
|
+
className: R("bd-reset", "bd-CheckboxRoot", n),
|
|
1518
|
+
children: /* @__PURE__ */ i(le, { asChild: !0, className: "bd-CheckboxIndicator", children: a === "indeterminate" ? /* @__PURE__ */ i(Po, {}) : /* @__PURE__ */ i(ie, {}) })
|
|
1519
1519
|
}
|
|
1520
1520
|
);
|
|
1521
1521
|
});
|
|
1522
|
-
|
|
1523
|
-
const
|
|
1524
|
-
...
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1522
|
+
Oo.displayName = "Checkbox";
|
|
1523
|
+
const Oe = l.forwardRef(
|
|
1524
|
+
({ children: e, maxHeight: t, className: n, style: o, onScroll: s, onScrollBottom: r, ...c }, a) => /* @__PURE__ */ i(
|
|
1525
|
+
"div",
|
|
1526
|
+
{
|
|
1527
|
+
ref: a,
|
|
1528
|
+
onScroll: (d) => {
|
|
1529
|
+
if (s && s(d), r) {
|
|
1530
|
+
const { scrollTop: p, scrollHeight: f, clientHeight: C } = d.currentTarget;
|
|
1531
|
+
f - p <= C + 10 && r();
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1534
|
+
className: `bd-ScrollArea ${n || ""}`,
|
|
1535
|
+
style: { ...o, maxHeight: t },
|
|
1536
|
+
...c,
|
|
1537
|
+
children: e
|
|
1538
|
+
}
|
|
1539
|
+
)
|
|
1540
|
+
);
|
|
1541
|
+
Oe.displayName = "ScrollArea";
|
|
1542
|
+
const Fo = ["1", "2", "3", "4", "5"], Go = ["classic", "underlined", "rounded"], H = {
|
|
1543
|
+
size: { type: "enum", className: "bd-size", values: Fo, default: "4" },
|
|
1544
|
+
variant: { type: "enum", className: "bd-variant", values: Go, default: "classic" },
|
|
1545
|
+
...Te,
|
|
1546
|
+
...G
|
|
1547
|
+
}, $o = {
|
|
1548
|
+
gap: Me.gap,
|
|
1549
|
+
px: U.px,
|
|
1550
|
+
pl: U.pl,
|
|
1551
|
+
pr: U.pr
|
|
1552
|
+
}, Fe = {
|
|
1553
|
+
...H,
|
|
1554
|
+
...$o
|
|
1555
|
+
}, se = "SelectBox", [Vo] = _(se), [Lo, ue] = Vo(se), Ge = ({
|
|
1556
|
+
__scopeSelect: e,
|
|
1557
|
+
value: t,
|
|
1558
|
+
defaultValue: n,
|
|
1559
|
+
onValueChange: o,
|
|
1560
|
+
valueLabelMap: s,
|
|
1561
|
+
open: r,
|
|
1562
|
+
defaultOpen: c,
|
|
1563
|
+
onOpenChange: a,
|
|
1564
|
+
variant: u = "classic",
|
|
1565
|
+
size: d = H.size.default,
|
|
1566
|
+
weight: p = "regular",
|
|
1567
|
+
children: f
|
|
1568
|
+
}) => {
|
|
1569
|
+
const [C, h] = B({
|
|
1570
|
+
prop: t,
|
|
1571
|
+
defaultProp: n ?? "",
|
|
1572
|
+
onChange: o,
|
|
1573
|
+
caller: se
|
|
1574
|
+
}), [v, b] = B({
|
|
1575
|
+
prop: r,
|
|
1576
|
+
defaultProp: c ?? !1,
|
|
1577
|
+
onChange: a,
|
|
1578
|
+
caller: `${se}.Open`
|
|
1579
|
+
}), g = l.useRef(null), m = We();
|
|
1580
|
+
return /* @__PURE__ */ i(
|
|
1581
|
+
Lo,
|
|
1582
|
+
{
|
|
1583
|
+
scope: e,
|
|
1584
|
+
value: C,
|
|
1585
|
+
onValueChange: h,
|
|
1586
|
+
valueLabelMap: s,
|
|
1587
|
+
open: v,
|
|
1588
|
+
onOpenChange: b,
|
|
1589
|
+
triggerRef: g,
|
|
1590
|
+
contentId: m,
|
|
1591
|
+
variant: u,
|
|
1592
|
+
size: d,
|
|
1593
|
+
weight: p,
|
|
1594
|
+
children: f
|
|
1595
|
+
}
|
|
1596
|
+
);
|
|
1597
|
+
}, bt = "SelectBoxTrigger", de = l.forwardRef(
|
|
1598
|
+
(e, t) => {
|
|
1599
|
+
const { __scopeSelect: n, children: o, onClick: s, onKeyDown: r, ...c } = e, a = ue(bt, n), u = T(t, a.triggerRef), { className: d, style: p, ...f } = I(c, Fe), C = !a.value || a.value === "";
|
|
1600
|
+
return /* @__PURE__ */ i(
|
|
1601
|
+
P.button,
|
|
1602
|
+
{
|
|
1603
|
+
type: "button",
|
|
1604
|
+
role: "combobox",
|
|
1605
|
+
"aria-expanded": a.open,
|
|
1606
|
+
"data-placeholder": C ? "" : void 0,
|
|
1607
|
+
className: `bd-SelectBoxTrigger ${d || ""}`,
|
|
1608
|
+
style: p,
|
|
1609
|
+
...f,
|
|
1610
|
+
ref: u,
|
|
1611
|
+
onClick: (h) => {
|
|
1612
|
+
a.onOpenChange(!a.open), s?.(h);
|
|
1613
|
+
},
|
|
1614
|
+
onKeyDown: (h) => {
|
|
1615
|
+
!a.open && (h.key === "ArrowDown" || h.key === "Enter" || h.key === " ") && (h.preventDefault(), a.onOpenChange(!0)), r?.(h);
|
|
1616
|
+
},
|
|
1617
|
+
children: o
|
|
1618
|
+
}
|
|
1619
|
+
);
|
|
1620
|
+
}
|
|
1621
|
+
);
|
|
1622
|
+
de.displayName = bt;
|
|
1623
|
+
const Ct = "SelectBoxContent", pe = l.forwardRef(({ __scopeSelect: e, children: t, className: n, style: o, onKeyDown: s, ...r }, c) => {
|
|
1624
|
+
const a = ue(Ct, e), u = l.useRef(null), d = T(c, u);
|
|
1625
|
+
Ze(u, (b) => {
|
|
1626
|
+
a.triggerRef.current?.contains(b.target) || a.open && a.onOpenChange(!1);
|
|
1627
|
+
});
|
|
1628
|
+
const p = a.variant === "rounded" ? 8 : 0, { styles: f, isPositioned: C } = Xe(
|
|
1629
|
+
a.triggerRef,
|
|
1630
|
+
u,
|
|
1631
|
+
a.open,
|
|
1632
|
+
p
|
|
1633
|
+
);
|
|
1634
|
+
l.useEffect(() => {
|
|
1635
|
+
a.open && u.current && requestAnimationFrame(() => {
|
|
1636
|
+
if (!u.current) return;
|
|
1637
|
+
const b = Array.from(
|
|
1638
|
+
u.current.querySelectorAll('[role="option"]')
|
|
1639
|
+
), g = b.find((m) => m.getAttribute("aria-selected") === "true");
|
|
1640
|
+
g ? g.focus() : b.length > 0 && b[0].focus();
|
|
1641
|
+
});
|
|
1642
|
+
}, [a.open]);
|
|
1643
|
+
const h = (b) => {
|
|
1644
|
+
const g = Array.from(
|
|
1645
|
+
u.current?.querySelectorAll('[role="option"]') || []
|
|
1646
|
+
), m = g.indexOf(document.activeElement);
|
|
1647
|
+
switch (b.key) {
|
|
1648
|
+
case "ArrowDown": {
|
|
1649
|
+
b.preventDefault();
|
|
1650
|
+
const y = m < g.length - 1 ? m + 1 : 0;
|
|
1651
|
+
g[y]?.focus();
|
|
1652
|
+
break;
|
|
1653
|
+
}
|
|
1654
|
+
case "ArrowUp": {
|
|
1655
|
+
b.preventDefault();
|
|
1656
|
+
const y = m > 0 ? m - 1 : g.length - 1;
|
|
1657
|
+
g[y]?.focus();
|
|
1658
|
+
break;
|
|
1659
|
+
}
|
|
1660
|
+
case "Enter":
|
|
1661
|
+
case " ":
|
|
1662
|
+
b.preventDefault(), document.activeElement?.click();
|
|
1663
|
+
break;
|
|
1664
|
+
case "Escape":
|
|
1665
|
+
b.preventDefault(), a.onOpenChange(!1), a.triggerRef.current?.focus();
|
|
1666
|
+
break;
|
|
1667
|
+
case "Tab":
|
|
1668
|
+
a.onOpenChange(!1);
|
|
1669
|
+
break;
|
|
1670
|
+
}
|
|
1671
|
+
s?.(b);
|
|
1672
|
+
};
|
|
1673
|
+
if (!a.open) return null;
|
|
1674
|
+
const v = /* @__PURE__ */ i(
|
|
1675
|
+
P.div,
|
|
1676
|
+
{
|
|
1677
|
+
id: a.contentId,
|
|
1678
|
+
role: "listbox",
|
|
1679
|
+
tabIndex: -1,
|
|
1680
|
+
onKeyDown: h,
|
|
1681
|
+
className: `bd-SelectBoxContent bd-variant-${a.variant} ${n || ""}`,
|
|
1682
|
+
...r,
|
|
1683
|
+
ref: d,
|
|
1684
|
+
style: {
|
|
1685
|
+
...f,
|
|
1686
|
+
...o,
|
|
1687
|
+
transition: C ? "opacity 0.2s ease, transform 0.2s ease" : "none",
|
|
1688
|
+
overflow: "hidden"
|
|
1689
|
+
},
|
|
1690
|
+
children: t
|
|
1691
|
+
}
|
|
1692
|
+
);
|
|
1693
|
+
return /* @__PURE__ */ i(Je, { children: v });
|
|
1694
|
+
});
|
|
1695
|
+
pe.displayName = Ct;
|
|
1696
|
+
const vt = "SelectBoxItem", $e = l.forwardRef(
|
|
1697
|
+
({ __scopeSelect: e, value: t, onClick: n, className: o, children: s, ...r }, c) => {
|
|
1698
|
+
const a = ue(vt, e), u = a.value === t, { className: d, style: p } = I(
|
|
1699
|
+
{ size: a.size, weight: a.weight },
|
|
1700
|
+
Fe
|
|
1701
|
+
);
|
|
1702
|
+
return /* @__PURE__ */ i(
|
|
1703
|
+
P.div,
|
|
1704
|
+
{
|
|
1705
|
+
role: "option",
|
|
1706
|
+
tabIndex: -1,
|
|
1707
|
+
"aria-selected": u,
|
|
1708
|
+
"data-state": u ? "checked" : "unchecked",
|
|
1709
|
+
className: `bd-SelectBoxItem bd-variant-${a.variant} ${d || ""} ${o || ""}`,
|
|
1710
|
+
style: p,
|
|
1711
|
+
...r,
|
|
1712
|
+
ref: c,
|
|
1713
|
+
onClick: (f) => {
|
|
1714
|
+
a.onValueChange(t), a.onOpenChange(!1), a.triggerRef.current?.focus(), n?.(f);
|
|
1715
|
+
},
|
|
1716
|
+
children: /* @__PURE__ */ i(P.span, { className: "bd-SelectBoxItemText", children: s })
|
|
1717
|
+
}
|
|
1718
|
+
);
|
|
1719
|
+
}
|
|
1720
|
+
);
|
|
1721
|
+
$e.displayName = vt;
|
|
1722
|
+
const yt = "SelectBoxValue", fe = l.forwardRef(
|
|
1723
|
+
({ __scopeSelect: e, className: t, children: n, placeholder: o, ...s }, r) => {
|
|
1724
|
+
const c = ue(yt, e), a = c.value ? c.valueLabelMap?.get(c.value) ?? c.value : n || o, { className: u, style: d } = I(
|
|
1725
|
+
{ weight: c.weight },
|
|
1726
|
+
Fe
|
|
1727
|
+
);
|
|
1728
|
+
return /* @__PURE__ */ i(
|
|
1729
|
+
P.span,
|
|
1730
|
+
{
|
|
1731
|
+
className: `bd-SelectBoxValue ${u || ""} ${t || ""}`,
|
|
1732
|
+
style: d,
|
|
1733
|
+
...s,
|
|
1734
|
+
ref: r,
|
|
1735
|
+
children: a
|
|
1736
|
+
}
|
|
1737
|
+
);
|
|
1738
|
+
}
|
|
1739
|
+
), zo = "SelectBoxSlot", me = l.forwardRef(
|
|
1740
|
+
({ __scopeSelect: e, className: t, side: n = "right", "data-chevron": o, children: s, ...r }, c) => /* @__PURE__ */ i(
|
|
1741
|
+
P.div,
|
|
1742
|
+
{
|
|
1743
|
+
"aria-hidden": "true",
|
|
1744
|
+
"data-side": n,
|
|
1745
|
+
"data-chevron": o ? "true" : void 0,
|
|
1746
|
+
className: `bd-SelectBoxSlot ${t || ""}`,
|
|
1747
|
+
...r,
|
|
1748
|
+
ref: c,
|
|
1749
|
+
children: s || /* @__PURE__ */ i(Do, {})
|
|
1750
|
+
}
|
|
1751
|
+
)
|
|
1752
|
+
);
|
|
1753
|
+
fe.displayName = yt;
|
|
1754
|
+
me.displayName = zo;
|
|
1755
|
+
const Uo = ({
|
|
1756
|
+
options: e,
|
|
1757
|
+
placeholder: t = "선택하세요",
|
|
1758
|
+
size: n = H.size.default,
|
|
1759
|
+
weight: o = "regular",
|
|
1760
|
+
variant: s = "classic",
|
|
1761
|
+
disabled: r = !1,
|
|
1762
|
+
maxHeight: c,
|
|
1763
|
+
onScrollBottom: a,
|
|
1764
|
+
...u
|
|
1765
|
+
}) => {
|
|
1766
|
+
const d = new Map(e.map((p) => [p.value, p.label]));
|
|
1767
|
+
return /* @__PURE__ */ k(
|
|
1768
|
+
Ge,
|
|
1769
|
+
{
|
|
1770
|
+
...u,
|
|
1771
|
+
valueLabelMap: d,
|
|
1772
|
+
variant: s,
|
|
1773
|
+
size: n,
|
|
1774
|
+
weight: o,
|
|
1775
|
+
children: [
|
|
1776
|
+
/* @__PURE__ */ k(de, { size: n, variant: s, disabled: r, children: [
|
|
1777
|
+
/* @__PURE__ */ i(fe, { placeholder: t }),
|
|
1778
|
+
/* @__PURE__ */ i(me, { "data-chevron": !0 })
|
|
1779
|
+
] }),
|
|
1780
|
+
/* @__PURE__ */ i(pe, { children: /* @__PURE__ */ i(Oe, { maxHeight: c, onScrollBottom: a, children: e.map((p) => /* @__PURE__ */ i($e, { value: p.value, children: p.label }, p.value)) }) })
|
|
1781
|
+
]
|
|
1782
|
+
}
|
|
1783
|
+
);
|
|
1784
|
+
}, zs = Object.assign(Uo, {
|
|
1785
|
+
Root: Ge,
|
|
1786
|
+
Trigger: de,
|
|
1787
|
+
Content: pe,
|
|
1788
|
+
Item: $e,
|
|
1789
|
+
Value: fe,
|
|
1790
|
+
Slot: me
|
|
1791
|
+
}), j = {
|
|
1792
|
+
size: H.size,
|
|
1793
|
+
variant: H.variant,
|
|
1794
|
+
weight: H.weight
|
|
1795
|
+
};
|
|
1796
|
+
({
|
|
1797
|
+
...j,
|
|
1798
|
+
checkboxSize: O.size,
|
|
1799
|
+
checkboxVariant: O.variant
|
|
1800
|
+
});
|
|
1801
|
+
const wt = "regular", Nt = l.forwardRef(
|
|
1802
|
+
({
|
|
1803
|
+
value: e,
|
|
1804
|
+
label: t,
|
|
1805
|
+
selected: n,
|
|
1806
|
+
disabled: o = !1,
|
|
1807
|
+
size: s = j.size.default,
|
|
1808
|
+
weight: r = wt,
|
|
1809
|
+
variant: c = j.variant.default,
|
|
1810
|
+
checkboxSize: a = O.size.default,
|
|
1811
|
+
checkboxVariant: u = O.variant.default,
|
|
1812
|
+
className: d,
|
|
1813
|
+
onItemSelect: p,
|
|
1814
|
+
onClick: f,
|
|
1815
|
+
...C
|
|
1816
|
+
}, h) => {
|
|
1817
|
+
const { className: v, style: b } = I(
|
|
1818
|
+
{ size: s, weight: r },
|
|
1819
|
+
j
|
|
1820
|
+
);
|
|
1821
|
+
return /* @__PURE__ */ k(
|
|
1822
|
+
P.div,
|
|
1823
|
+
{
|
|
1824
|
+
...C,
|
|
1825
|
+
ref: h,
|
|
1826
|
+
role: "option",
|
|
1827
|
+
tabIndex: -1,
|
|
1828
|
+
"aria-selected": n,
|
|
1829
|
+
"aria-disabled": o,
|
|
1830
|
+
"data-disabled": o ? "" : void 0,
|
|
1831
|
+
"data-state": n ? "checked" : "unchecked",
|
|
1832
|
+
className: R(
|
|
1833
|
+
"bd-SelectBoxItem",
|
|
1834
|
+
`bd-variant-${c}`,
|
|
1835
|
+
"bd-CheckableSelectBoxItem",
|
|
1836
|
+
v,
|
|
1837
|
+
d
|
|
1838
|
+
),
|
|
1839
|
+
style: b,
|
|
1840
|
+
onClick: (g) => {
|
|
1841
|
+
if (o) {
|
|
1842
|
+
g.preventDefault();
|
|
1843
|
+
return;
|
|
1844
|
+
}
|
|
1845
|
+
p(e), f?.(g);
|
|
1846
|
+
},
|
|
1847
|
+
children: [
|
|
1848
|
+
/* @__PURE__ */ i(
|
|
1849
|
+
Ho,
|
|
1850
|
+
{
|
|
1851
|
+
checked: n,
|
|
1852
|
+
disabled: o,
|
|
1853
|
+
size: a,
|
|
1854
|
+
variant: u
|
|
1855
|
+
}
|
|
1856
|
+
),
|
|
1857
|
+
/* @__PURE__ */ i("span", { className: "bd-CheckableSelectBoxItemText", children: t })
|
|
1858
|
+
]
|
|
1859
|
+
}
|
|
1860
|
+
);
|
|
1861
|
+
}
|
|
1862
|
+
);
|
|
1863
|
+
Nt.displayName = "CheckableSelectBoxItem";
|
|
1864
|
+
const Ho = ({
|
|
1865
|
+
checked: e,
|
|
1866
|
+
disabled: t,
|
|
1867
|
+
size: n,
|
|
1868
|
+
variant: o
|
|
1869
|
+
}) => {
|
|
1870
|
+
const { className: s, style: r } = I({ size: n, variant: o }, O);
|
|
1871
|
+
return /* @__PURE__ */ i(lt, { checked: e, disabled: t, children: /* @__PURE__ */ i(
|
|
1872
|
+
P.span,
|
|
1873
|
+
{
|
|
1874
|
+
"aria-hidden": "true",
|
|
1875
|
+
"data-state": e ? "checked" : "unchecked",
|
|
1876
|
+
"data-disabled": t ? "" : void 0,
|
|
1877
|
+
className: R("bd-reset", "bd-CheckboxRoot", s),
|
|
1878
|
+
style: r,
|
|
1879
|
+
children: /* @__PURE__ */ i(le, { asChild: !0, className: "bd-CheckboxIndicator", children: /* @__PURE__ */ i(ie, {}) })
|
|
1880
|
+
}
|
|
1881
|
+
) });
|
|
1882
|
+
}, Us = ({
|
|
1883
|
+
items: e,
|
|
1884
|
+
value: t,
|
|
1885
|
+
defaultValue: n,
|
|
1886
|
+
onValueChange: o,
|
|
1887
|
+
open: s,
|
|
1888
|
+
defaultOpen: r,
|
|
1889
|
+
onOpenChange: c,
|
|
1890
|
+
placeholder: a = "선택하세요",
|
|
1891
|
+
size: u = j.size.default,
|
|
1892
|
+
weight: d = wt,
|
|
1893
|
+
variant: p = j.variant.default,
|
|
1894
|
+
checkboxSize: f = O.size.default,
|
|
1895
|
+
checkboxVariant: C = O.variant.default,
|
|
1896
|
+
disabled: h = !1,
|
|
1897
|
+
className: v,
|
|
1898
|
+
maxHeight: b,
|
|
1899
|
+
onScrollBottom: g
|
|
1900
|
+
}) => {
|
|
1901
|
+
const [m = [], y] = B({
|
|
1902
|
+
prop: t,
|
|
1903
|
+
defaultProp: n ?? [],
|
|
1904
|
+
onChange: o,
|
|
1905
|
+
caller: "CheckableSelectBox"
|
|
1906
|
+
}), w = /* @__PURE__ */ new Map();
|
|
1907
|
+
e.forEach((x) => {
|
|
1908
|
+
w.set(x.value, x.label);
|
|
1909
|
+
});
|
|
1910
|
+
const N = m.map((x) => w.get(x) ?? x).join(", ");
|
|
1911
|
+
return /* @__PURE__ */ k(
|
|
1912
|
+
Ge,
|
|
1913
|
+
{
|
|
1914
|
+
value: N,
|
|
1915
|
+
open: s,
|
|
1916
|
+
defaultOpen: r,
|
|
1917
|
+
onOpenChange: c,
|
|
1918
|
+
variant: p,
|
|
1919
|
+
size: u,
|
|
1920
|
+
weight: d,
|
|
1921
|
+
children: [
|
|
1922
|
+
/* @__PURE__ */ k(de, { size: u, variant: p, disabled: h, className: v, children: [
|
|
1923
|
+
/* @__PURE__ */ i(fe, { placeholder: a }),
|
|
1924
|
+
/* @__PURE__ */ i(me, { "data-chevron": !0 })
|
|
1925
|
+
] }),
|
|
1926
|
+
/* @__PURE__ */ i(pe, { "aria-multiselectable": "true", children: /* @__PURE__ */ i(Oe, { maxHeight: b, onScrollBottom: g, children: e.map((x) => /* @__PURE__ */ i(
|
|
1927
|
+
Nt,
|
|
1928
|
+
{
|
|
1929
|
+
value: x.value,
|
|
1930
|
+
label: x.label,
|
|
1931
|
+
selected: m.includes(x.value),
|
|
1932
|
+
disabled: h || x.disabled,
|
|
1933
|
+
size: u,
|
|
1934
|
+
weight: d,
|
|
1935
|
+
variant: p,
|
|
1936
|
+
checkboxSize: f,
|
|
1937
|
+
checkboxVariant: C,
|
|
1938
|
+
onItemSelect: (S) => {
|
|
1939
|
+
y(
|
|
1940
|
+
(A = []) => A.includes(S) ? A.filter((Q) => Q !== S) : [...A, S]
|
|
1941
|
+
);
|
|
1942
|
+
}
|
|
1943
|
+
},
|
|
1944
|
+
x.value
|
|
1945
|
+
)) }) })
|
|
1946
|
+
]
|
|
1947
|
+
}
|
|
1948
|
+
);
|
|
1949
|
+
}, te = {
|
|
1950
|
+
...q,
|
|
1951
|
+
...O
|
|
1952
|
+
}, Ve = "CheckboxGroup", [jo, Rt] = _(
|
|
1953
|
+
Ve,
|
|
1954
|
+
[De, it]
|
|
1955
|
+
), xt = De(), St = it(), [Yo, qo] = jo(Ve), kt = l.forwardRef(
|
|
1530
1956
|
(e, t) => {
|
|
1531
1957
|
const {
|
|
1532
1958
|
__scopeCheckboxGroup: n,
|
|
@@ -1537,35 +1963,35 @@ const Z = {
|
|
|
1537
1963
|
disabled: a = !1,
|
|
1538
1964
|
loop: u = !0,
|
|
1539
1965
|
orientation: d,
|
|
1540
|
-
onValueChange:
|
|
1541
|
-
...
|
|
1542
|
-
} = e, C =
|
|
1966
|
+
onValueChange: p,
|
|
1967
|
+
...f
|
|
1968
|
+
} = e, C = xt(n), [h = [], v] = B({
|
|
1543
1969
|
prop: r,
|
|
1544
1970
|
defaultProp: s || [],
|
|
1545
|
-
onChange:
|
|
1546
|
-
}),
|
|
1547
|
-
(m) =>
|
|
1548
|
-
[
|
|
1549
|
-
), g =
|
|
1550
|
-
(m) =>
|
|
1551
|
-
[
|
|
1971
|
+
onChange: p
|
|
1972
|
+
}), b = l.useCallback(
|
|
1973
|
+
(m) => v((y = []) => [...y, m]),
|
|
1974
|
+
[v]
|
|
1975
|
+
), g = l.useCallback(
|
|
1976
|
+
(m) => v((y = []) => y.filter((w) => w !== m)),
|
|
1977
|
+
[v]
|
|
1552
1978
|
);
|
|
1553
|
-
return /* @__PURE__ */
|
|
1554
|
-
|
|
1979
|
+
return /* @__PURE__ */ i(
|
|
1980
|
+
Yo,
|
|
1555
1981
|
{
|
|
1556
1982
|
scope: n,
|
|
1557
1983
|
name: o,
|
|
1558
1984
|
required: c,
|
|
1559
1985
|
disabled: a,
|
|
1560
1986
|
value: h,
|
|
1561
|
-
onItemCheck:
|
|
1987
|
+
onItemCheck: b,
|
|
1562
1988
|
onItemUnCheck: g,
|
|
1563
|
-
children: /* @__PURE__ */
|
|
1564
|
-
|
|
1989
|
+
children: /* @__PURE__ */ i(nt, { asChild: !0, ...C, orientation: d, loop: u, children: /* @__PURE__ */ i(
|
|
1990
|
+
P.div,
|
|
1565
1991
|
{
|
|
1566
1992
|
role: "group",
|
|
1567
1993
|
"data-disabled": a ? "" : void 0,
|
|
1568
|
-
...
|
|
1994
|
+
...f,
|
|
1569
1995
|
ref: t
|
|
1570
1996
|
}
|
|
1571
1997
|
) })
|
|
@@ -1573,26 +1999,26 @@ const Z = {
|
|
|
1573
1999
|
);
|
|
1574
2000
|
}
|
|
1575
2001
|
);
|
|
1576
|
-
|
|
1577
|
-
const
|
|
1578
|
-
const { __scopeCheckboxGroup: n, disabled: o, ...s } = e, r =
|
|
1579
|
-
return /* @__PURE__ */
|
|
1580
|
-
|
|
2002
|
+
kt.displayName = Ve;
|
|
2003
|
+
const Pt = "CheckboxGroupItem", It = l.forwardRef((e, t) => {
|
|
2004
|
+
const { __scopeCheckboxGroup: n, disabled: o, ...s } = e, r = qo(Pt, n), c = r.disabled || o, a = xt(n), u = St(n), d = l.useRef(null), p = T(t, d), f = r.value?.includes(s.value);
|
|
2005
|
+
return /* @__PURE__ */ i(
|
|
2006
|
+
ot,
|
|
1581
2007
|
{
|
|
1582
2008
|
asChild: !0,
|
|
1583
2009
|
...a,
|
|
1584
2010
|
focusable: !c,
|
|
1585
|
-
active:
|
|
1586
|
-
children: /* @__PURE__ */
|
|
1587
|
-
|
|
2011
|
+
active: f,
|
|
2012
|
+
children: /* @__PURE__ */ i(
|
|
2013
|
+
pt,
|
|
1588
2014
|
{
|
|
1589
2015
|
name: r.name,
|
|
1590
2016
|
disabled: c,
|
|
1591
2017
|
required: r.required,
|
|
1592
|
-
checked:
|
|
2018
|
+
checked: f,
|
|
1593
2019
|
...u,
|
|
1594
2020
|
...s,
|
|
1595
|
-
ref:
|
|
2021
|
+
ref: p,
|
|
1596
2022
|
onCheckedChange: (C) => {
|
|
1597
2023
|
C ? r.onItemCheck(e.value) : r.onItemUnCheck(e.value);
|
|
1598
2024
|
}
|
|
@@ -1601,60 +2027,60 @@ const ht = "CheckboxGroupItem", gt = i.forwardRef((e, t) => {
|
|
|
1601
2027
|
}
|
|
1602
2028
|
);
|
|
1603
2029
|
});
|
|
1604
|
-
|
|
1605
|
-
const
|
|
1606
|
-
const { __scopeCheckboxGroup: n, ...o } = e, s =
|
|
1607
|
-
return /* @__PURE__ */
|
|
2030
|
+
It.displayName = Pt;
|
|
2031
|
+
const Ko = "CheckboxGroupIndicator", Et = l.forwardRef((e, t) => {
|
|
2032
|
+
const { __scopeCheckboxGroup: n, ...o } = e, s = St(n);
|
|
2033
|
+
return /* @__PURE__ */ i(le, { ...s, ...o, ref: t });
|
|
1608
2034
|
});
|
|
1609
|
-
|
|
1610
|
-
const
|
|
1611
|
-
|
|
1612
|
-
]),
|
|
2035
|
+
Et.displayName = Ko;
|
|
2036
|
+
const Z = "CheckboxGroup", [Wo] = _(Z, [
|
|
2037
|
+
Rt
|
|
2038
|
+
]), Dt = Rt(), [Xo, Tt] = Wo(Z), Bt = l.forwardRef(
|
|
1613
2039
|
(e, t) => {
|
|
1614
2040
|
const {
|
|
1615
|
-
size: n =
|
|
1616
|
-
variant: o =
|
|
2041
|
+
size: n = te.size.default,
|
|
2042
|
+
variant: o = te.variant.default,
|
|
1617
2043
|
...s
|
|
1618
|
-
} = e, { __scopeCheckboxGroup: r, className: c, ...a } =
|
|
2044
|
+
} = e, { __scopeCheckboxGroup: r, className: c, ...a } = I(
|
|
1619
2045
|
s,
|
|
1620
|
-
|
|
1621
|
-
), u =
|
|
1622
|
-
return /* @__PURE__ */
|
|
1623
|
-
|
|
2046
|
+
te
|
|
2047
|
+
), u = Dt(r);
|
|
2048
|
+
return /* @__PURE__ */ i(Xo, { scope: r, size: n, variant: o, children: /* @__PURE__ */ i(
|
|
2049
|
+
kt,
|
|
1624
2050
|
{
|
|
1625
2051
|
...u,
|
|
1626
2052
|
...a,
|
|
1627
2053
|
ref: t,
|
|
1628
|
-
className:
|
|
2054
|
+
className: R("bd-CheckboxGroupRoot", c)
|
|
1629
2055
|
}
|
|
1630
2056
|
) });
|
|
1631
2057
|
}
|
|
1632
2058
|
);
|
|
1633
|
-
|
|
1634
|
-
const
|
|
2059
|
+
Bt.displayName = Z;
|
|
2060
|
+
const Mt = l.forwardRef(
|
|
1635
2061
|
(e, t) => {
|
|
1636
|
-
const { __scopeCheckboxGroup: n, children: o, className: s, style: r, ...c } = e, { size: a } =
|
|
1637
|
-
return o ? /* @__PURE__ */
|
|
1638
|
-
|
|
2062
|
+
const { __scopeCheckboxGroup: n, children: o, className: s, style: r, ...c } = e, { size: a } = Tt("CheckboxGroupItem", n);
|
|
2063
|
+
return o ? /* @__PURE__ */ k(
|
|
2064
|
+
Be,
|
|
1639
2065
|
{
|
|
1640
2066
|
as: "label",
|
|
1641
2067
|
size: a,
|
|
1642
|
-
className:
|
|
2068
|
+
className: R("bd-CheckboxGroupItem", s),
|
|
1643
2069
|
style: r,
|
|
1644
2070
|
children: [
|
|
1645
|
-
/* @__PURE__ */
|
|
1646
|
-
|
|
2071
|
+
/* @__PURE__ */ i(
|
|
2072
|
+
Se,
|
|
1647
2073
|
{
|
|
1648
2074
|
__scopeCheckboxGroup: n,
|
|
1649
2075
|
...c,
|
|
1650
2076
|
ref: t
|
|
1651
2077
|
}
|
|
1652
2078
|
),
|
|
1653
|
-
o && /* @__PURE__ */
|
|
2079
|
+
o && /* @__PURE__ */ i("span", { className: "bd-CheckboxGroupItemInner", children: o })
|
|
1654
2080
|
]
|
|
1655
2081
|
}
|
|
1656
|
-
) : /* @__PURE__ */
|
|
1657
|
-
|
|
2082
|
+
) : /* @__PURE__ */ i(
|
|
2083
|
+
Se,
|
|
1658
2084
|
{
|
|
1659
2085
|
__scopeCheckboxGroup: n,
|
|
1660
2086
|
...c,
|
|
@@ -1665,33 +2091,33 @@ const wt = i.forwardRef(
|
|
|
1665
2091
|
);
|
|
1666
2092
|
}
|
|
1667
2093
|
);
|
|
1668
|
-
|
|
1669
|
-
const
|
|
1670
|
-
const o =
|
|
1671
|
-
return /* @__PURE__ */
|
|
1672
|
-
|
|
2094
|
+
Mt.displayName = `${Z}.Item`;
|
|
2095
|
+
const Se = l.forwardRef(({ __scopeCheckboxGroup: e, ...t }, n) => {
|
|
2096
|
+
const o = Tt("CheckboxGroupItemCheckbox", e), s = Dt(e), { className: r } = I({ ...t, ...o }, te);
|
|
2097
|
+
return /* @__PURE__ */ i(
|
|
2098
|
+
It,
|
|
1673
2099
|
{
|
|
1674
2100
|
...s,
|
|
1675
2101
|
...t,
|
|
1676
2102
|
ref: n,
|
|
1677
|
-
className:
|
|
2103
|
+
className: R(
|
|
1678
2104
|
"bd-reset",
|
|
1679
2105
|
"bd-CheckboxRoot",
|
|
1680
2106
|
"bd-CheckboxGroupItemCheckbox",
|
|
1681
2107
|
r
|
|
1682
2108
|
),
|
|
1683
|
-
children: /* @__PURE__ */
|
|
2109
|
+
children: /* @__PURE__ */ i(Et, { ...s, asChild: !0, className: "bd-CheckboxIndicator", children: /* @__PURE__ */ i(ie, {}) })
|
|
1684
2110
|
}
|
|
1685
2111
|
);
|
|
1686
2112
|
});
|
|
1687
|
-
|
|
1688
|
-
const
|
|
1689
|
-
Root:
|
|
1690
|
-
Item:
|
|
1691
|
-
},
|
|
1692
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1693
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
1694
|
-
},
|
|
2113
|
+
Se.displayName = `${Z}.ItemCheckbox`;
|
|
2114
|
+
const Hs = {
|
|
2115
|
+
Root: Bt,
|
|
2116
|
+
Item: Mt
|
|
2117
|
+
}, Zo = ["1", "2", "3", "4"], Jo = ["classic", "outline"], Qo = {
|
|
2118
|
+
size: { type: "enum", className: "bd-size", values: Zo, default: "2" },
|
|
2119
|
+
variant: { type: "enum", className: "bd-variant", values: Jo, default: "classic" }
|
|
2120
|
+
}, Le = "Radio", [es, _t] = _(Le), [ts, ns] = es(Le), ze = l.forwardRef(
|
|
1695
2121
|
(e, t) => {
|
|
1696
2122
|
const {
|
|
1697
2123
|
__scopeRadio: n,
|
|
@@ -1702,31 +2128,31 @@ const Gs = {
|
|
|
1702
2128
|
value: a = "on",
|
|
1703
2129
|
onCheck: u,
|
|
1704
2130
|
form: d,
|
|
1705
|
-
...
|
|
1706
|
-
} = e, [
|
|
1707
|
-
return /* @__PURE__ */
|
|
1708
|
-
/* @__PURE__ */
|
|
1709
|
-
|
|
2131
|
+
...p
|
|
2132
|
+
} = e, [f, C] = l.useState(null), h = T(t, C), v = l.useRef(!1), b = f ? d || !!f.closest("form") : !0;
|
|
2133
|
+
return /* @__PURE__ */ k(ts, { scope: n, checked: s, disabled: c, children: [
|
|
2134
|
+
/* @__PURE__ */ i(
|
|
2135
|
+
P.button,
|
|
1710
2136
|
{
|
|
1711
2137
|
type: "button",
|
|
1712
2138
|
role: "radio",
|
|
1713
2139
|
"aria-checked": s,
|
|
1714
|
-
"data-state":
|
|
2140
|
+
"data-state": Gt(s),
|
|
1715
2141
|
"data-disabled": c ? "" : void 0,
|
|
1716
2142
|
disabled: c,
|
|
1717
2143
|
value: a,
|
|
1718
|
-
...
|
|
2144
|
+
...p,
|
|
1719
2145
|
ref: h,
|
|
1720
|
-
onClick:
|
|
1721
|
-
s || u?.(),
|
|
2146
|
+
onClick: M(e.onClick, (g) => {
|
|
2147
|
+
s || u?.(), b && (v.current = g.isPropagationStopped(), v.current || g.stopPropagation());
|
|
1722
2148
|
})
|
|
1723
2149
|
}
|
|
1724
2150
|
),
|
|
1725
|
-
|
|
1726
|
-
|
|
2151
|
+
b && /* @__PURE__ */ i(
|
|
2152
|
+
Ft,
|
|
1727
2153
|
{
|
|
1728
|
-
control:
|
|
1729
|
-
bubbles: !
|
|
2154
|
+
control: f,
|
|
2155
|
+
bubbles: !v.current,
|
|
1730
2156
|
name: o,
|
|
1731
2157
|
value: a,
|
|
1732
2158
|
checked: s,
|
|
@@ -1739,14 +2165,14 @@ const Gs = {
|
|
|
1739
2165
|
] });
|
|
1740
2166
|
}
|
|
1741
2167
|
);
|
|
1742
|
-
|
|
1743
|
-
const
|
|
2168
|
+
ze.displayName = Le;
|
|
2169
|
+
const At = "RadioIndicator", Ot = l.forwardRef(
|
|
1744
2170
|
(e, t) => {
|
|
1745
|
-
const { __scopeRadio: n, forceMount: o, ...s } = e, r =
|
|
1746
|
-
return /* @__PURE__ */
|
|
1747
|
-
|
|
2171
|
+
const { __scopeRadio: n, forceMount: o, ...s } = e, r = ns(At, n);
|
|
2172
|
+
return /* @__PURE__ */ i(Qe, { remain: o || r.checked, children: /* @__PURE__ */ i(
|
|
2173
|
+
P.span,
|
|
1748
2174
|
{
|
|
1749
|
-
"data-state":
|
|
2175
|
+
"data-state": Gt(r.checked),
|
|
1750
2176
|
"data-disabled": r.disabled ? "" : void 0,
|
|
1751
2177
|
...s,
|
|
1752
2178
|
ref: t
|
|
@@ -1754,23 +2180,23 @@ const Nt = "RadioIndicator", xt = i.forwardRef(
|
|
|
1754
2180
|
) });
|
|
1755
2181
|
}
|
|
1756
2182
|
);
|
|
1757
|
-
|
|
1758
|
-
const
|
|
2183
|
+
Ot.displayName = At;
|
|
2184
|
+
const os = "RadioBubbleInput", Ft = l.forwardRef(
|
|
1759
2185
|
({ control: e, checked: t, bubbles: n = !0, ...o }, s) => {
|
|
1760
|
-
const r =
|
|
1761
|
-
return
|
|
2186
|
+
const r = l.useRef(null), c = T(r, s), a = Ie(t), u = Ee(e);
|
|
2187
|
+
return l.useEffect(() => {
|
|
1762
2188
|
const d = r.current;
|
|
1763
2189
|
if (!d) return;
|
|
1764
|
-
const
|
|
1765
|
-
|
|
2190
|
+
const p = window.HTMLInputElement.prototype, C = Object.getOwnPropertyDescriptor(
|
|
2191
|
+
p,
|
|
1766
2192
|
"checked"
|
|
1767
2193
|
).set;
|
|
1768
2194
|
if (a !== t && C) {
|
|
1769
2195
|
const h = new Event("click", { bubbles: n });
|
|
1770
2196
|
C.call(d, t), d.dispatchEvent(h);
|
|
1771
2197
|
}
|
|
1772
|
-
}, [a, t, n]), /* @__PURE__ */
|
|
1773
|
-
|
|
2198
|
+
}, [a, t, n]), /* @__PURE__ */ i(
|
|
2199
|
+
P.input,
|
|
1774
2200
|
{
|
|
1775
2201
|
type: "radio",
|
|
1776
2202
|
"aria-hidden": !0,
|
|
@@ -1790,39 +2216,39 @@ const Ho = "RadioBubbleInput", St = i.forwardRef(
|
|
|
1790
2216
|
);
|
|
1791
2217
|
}
|
|
1792
2218
|
);
|
|
1793
|
-
|
|
1794
|
-
function
|
|
2219
|
+
Ft.displayName = os;
|
|
2220
|
+
function Gt(e) {
|
|
1795
2221
|
return e ? "checked" : "unchecked";
|
|
1796
2222
|
}
|
|
1797
|
-
const
|
|
2223
|
+
const ss = l.forwardRef((e, t) => {
|
|
1798
2224
|
const {
|
|
1799
2225
|
className: n,
|
|
1800
2226
|
checked: o,
|
|
1801
2227
|
defaultChecked: s = !1,
|
|
1802
2228
|
onCheck: r,
|
|
1803
2229
|
...c
|
|
1804
|
-
} =
|
|
2230
|
+
} = I(e, Qo), [a, u] = B({
|
|
1805
2231
|
prop: o,
|
|
1806
2232
|
defaultProp: s,
|
|
1807
2233
|
onChange: r
|
|
1808
2234
|
});
|
|
1809
|
-
return /* @__PURE__ */
|
|
1810
|
-
|
|
2235
|
+
return /* @__PURE__ */ i(
|
|
2236
|
+
ze,
|
|
1811
2237
|
{
|
|
1812
2238
|
...c,
|
|
1813
2239
|
defaultChecked: s,
|
|
1814
2240
|
checked: a,
|
|
1815
2241
|
onCheck: () => u((d) => !d),
|
|
1816
2242
|
ref: t,
|
|
1817
|
-
className:
|
|
2243
|
+
className: R("bd-reset", "bd-BaseRadioRoot", "bd-RadioRoot", n)
|
|
1818
2244
|
}
|
|
1819
2245
|
);
|
|
1820
2246
|
});
|
|
1821
|
-
|
|
1822
|
-
const
|
|
1823
|
-
|
|
1824
|
-
[
|
|
1825
|
-
),
|
|
2247
|
+
ss.displayName = "Radio";
|
|
2248
|
+
const rs = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], he = "RadioGroup", [as, $t] = _(
|
|
2249
|
+
he,
|
|
2250
|
+
[_t]
|
|
2251
|
+
), Vt = De(), Lt = _t(), [cs, is] = as(he), zt = l.forwardRef(
|
|
1826
2252
|
(e, t) => {
|
|
1827
2253
|
const {
|
|
1828
2254
|
__scopeRadioGroup: n,
|
|
@@ -1833,31 +2259,31 @@ const jo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], se = "RadioGroup
|
|
|
1833
2259
|
disabled: a = !1,
|
|
1834
2260
|
orientation: u,
|
|
1835
2261
|
loop: d = !0,
|
|
1836
|
-
onValueChange:
|
|
1837
|
-
...
|
|
1838
|
-
} = e, C =
|
|
2262
|
+
onValueChange: p,
|
|
2263
|
+
...f
|
|
2264
|
+
} = e, C = Vt(n), [h, v] = B({
|
|
1839
2265
|
prop: r,
|
|
1840
2266
|
defaultProp: s ?? null,
|
|
1841
|
-
onChange:
|
|
1842
|
-
caller:
|
|
2267
|
+
onChange: p,
|
|
2268
|
+
caller: he
|
|
1843
2269
|
});
|
|
1844
|
-
return /* @__PURE__ */
|
|
1845
|
-
|
|
2270
|
+
return /* @__PURE__ */ i(
|
|
2271
|
+
cs,
|
|
1846
2272
|
{
|
|
1847
2273
|
scope: n,
|
|
1848
2274
|
name: o,
|
|
1849
2275
|
required: c,
|
|
1850
2276
|
disabled: a,
|
|
1851
2277
|
value: h,
|
|
1852
|
-
onValueChange:
|
|
1853
|
-
children: /* @__PURE__ */
|
|
1854
|
-
|
|
2278
|
+
onValueChange: v,
|
|
2279
|
+
children: /* @__PURE__ */ i(nt, { asChild: !0, ...C, orientation: u, loop: d, children: /* @__PURE__ */ i(
|
|
2280
|
+
P.div,
|
|
1855
2281
|
{
|
|
1856
2282
|
role: "radiogroup",
|
|
1857
2283
|
"aria-required": c,
|
|
1858
2284
|
"aria-orientation": u,
|
|
1859
2285
|
"data-disabled": a ? "" : void 0,
|
|
1860
|
-
...
|
|
2286
|
+
...f,
|
|
1861
2287
|
ref: t
|
|
1862
2288
|
}
|
|
1863
2289
|
) })
|
|
@@ -1865,39 +2291,39 @@ const jo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], se = "RadioGroup
|
|
|
1865
2291
|
);
|
|
1866
2292
|
}
|
|
1867
2293
|
);
|
|
1868
|
-
|
|
1869
|
-
const
|
|
2294
|
+
zt.displayName = he;
|
|
2295
|
+
const Ut = "RadioGroupItem", Ht = l.forwardRef(
|
|
1870
2296
|
(e, t) => {
|
|
1871
|
-
const { __scopeRadioGroup: n, disabled: o, ...s } = e, r =
|
|
1872
|
-
return
|
|
1873
|
-
const h = (
|
|
1874
|
-
|
|
1875
|
-
},
|
|
1876
|
-
return document.addEventListener("keydown", h), document.addEventListener("keyup",
|
|
1877
|
-
document.removeEventListener("keydown", h), document.removeEventListener("keyup",
|
|
2297
|
+
const { __scopeRadioGroup: n, disabled: o, ...s } = e, r = is(Ut, n), c = r.disabled || o, a = Vt(n), u = Lt(n), d = l.useRef(null), p = T(t, d), f = r.value === s.value, C = l.useRef(!1);
|
|
2298
|
+
return l.useEffect(() => {
|
|
2299
|
+
const h = (b) => {
|
|
2300
|
+
rs.includes(b.key) && (C.current = !0);
|
|
2301
|
+
}, v = () => C.current = !1;
|
|
2302
|
+
return document.addEventListener("keydown", h), document.addEventListener("keyup", v), () => {
|
|
2303
|
+
document.removeEventListener("keydown", h), document.removeEventListener("keyup", v);
|
|
1878
2304
|
};
|
|
1879
|
-
}, []), /* @__PURE__ */
|
|
1880
|
-
|
|
2305
|
+
}, []), /* @__PURE__ */ i(
|
|
2306
|
+
ot,
|
|
1881
2307
|
{
|
|
1882
2308
|
asChild: !0,
|
|
1883
2309
|
...a,
|
|
1884
2310
|
focusable: !c,
|
|
1885
|
-
active:
|
|
1886
|
-
children: /* @__PURE__ */
|
|
1887
|
-
|
|
2311
|
+
active: f,
|
|
2312
|
+
children: /* @__PURE__ */ i(
|
|
2313
|
+
ze,
|
|
1888
2314
|
{
|
|
1889
2315
|
name: r.name,
|
|
1890
2316
|
disabled: c,
|
|
1891
2317
|
required: r.required,
|
|
1892
|
-
checked:
|
|
2318
|
+
checked: f,
|
|
1893
2319
|
...u,
|
|
1894
2320
|
...s,
|
|
1895
|
-
ref:
|
|
2321
|
+
ref: p,
|
|
1896
2322
|
onCheck: () => r.onValueChange(s.value),
|
|
1897
|
-
onKeyDown:
|
|
2323
|
+
onKeyDown: M((h) => {
|
|
1898
2324
|
h.key === "Enter" && h.preventDefault();
|
|
1899
2325
|
}),
|
|
1900
|
-
onFocus:
|
|
2326
|
+
onFocus: M(s.onFocus, () => {
|
|
1901
2327
|
C.current && d.current?.click();
|
|
1902
2328
|
})
|
|
1903
2329
|
}
|
|
@@ -1906,63 +2332,63 @@ const Tt = "RadioGroupItem", _t = i.forwardRef(
|
|
|
1906
2332
|
);
|
|
1907
2333
|
}
|
|
1908
2334
|
);
|
|
1909
|
-
|
|
1910
|
-
const
|
|
1911
|
-
const { __scopeRadioGroup: n, ...o } = e, s =
|
|
1912
|
-
return /* @__PURE__ */
|
|
2335
|
+
Ht.displayName = Ut;
|
|
2336
|
+
const ls = "RadioGroupBaseIndicator", us = l.forwardRef((e, t) => {
|
|
2337
|
+
const { __scopeRadioGroup: n, ...o } = e, s = Lt(n);
|
|
2338
|
+
return /* @__PURE__ */ i(Ot, { ...s, ...o, ref: t });
|
|
1913
2339
|
});
|
|
1914
|
-
|
|
1915
|
-
const
|
|
1916
|
-
...
|
|
1917
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1918
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
1919
|
-
...
|
|
1920
|
-
},
|
|
2340
|
+
us.displayName = ls;
|
|
2341
|
+
const ds = ["1", "2", "3"], ps = ["classic", "outline"], ne = {
|
|
2342
|
+
...q,
|
|
2343
|
+
size: { type: "enum", className: "bd-size", values: ds, default: "2" },
|
|
2344
|
+
variant: { type: "enum", className: "bd-variant", values: ps, default: "classic" },
|
|
2345
|
+
...G
|
|
2346
|
+
}, J = "RadioGroup", [fs] = _(J, [$t]), jt = $t(), [ms, Yt] = fs(J), qt = l.forwardRef(
|
|
1921
2347
|
({
|
|
1922
|
-
size: e =
|
|
1923
|
-
variant: t =
|
|
2348
|
+
size: e = ne.size.default,
|
|
2349
|
+
variant: t = ne.variant.default,
|
|
1924
2350
|
...n
|
|
1925
2351
|
}, o) => {
|
|
1926
|
-
const { __scopeRadioGroup: s, className: r, ...c } =
|
|
2352
|
+
const { __scopeRadioGroup: s, className: r, ...c } = I(
|
|
1927
2353
|
n,
|
|
1928
|
-
|
|
1929
|
-
), a =
|
|
1930
|
-
return /* @__PURE__ */
|
|
1931
|
-
|
|
2354
|
+
ne
|
|
2355
|
+
), a = jt(s);
|
|
2356
|
+
return /* @__PURE__ */ i(ms, { scope: s, size: e, variant: t, children: /* @__PURE__ */ i(
|
|
2357
|
+
zt,
|
|
1932
2358
|
{
|
|
1933
2359
|
...a,
|
|
1934
2360
|
...c,
|
|
1935
2361
|
ref: o,
|
|
1936
|
-
className:
|
|
2362
|
+
className: R("bd-RadioGroupRoot", r)
|
|
1937
2363
|
}
|
|
1938
2364
|
) });
|
|
1939
2365
|
}
|
|
1940
2366
|
);
|
|
1941
|
-
|
|
1942
|
-
const
|
|
2367
|
+
qt.displayName = J;
|
|
2368
|
+
const Kt = l.forwardRef(
|
|
1943
2369
|
(e, t) => {
|
|
1944
|
-
const { __scopeRadioGroup: n, children: o, className: s, style: r, ...c } = e, { size: a } =
|
|
1945
|
-
return o ? /* @__PURE__ */
|
|
1946
|
-
|
|
2370
|
+
const { __scopeRadioGroup: n, children: o, className: s, style: r, ...c } = e, { size: a } = Yt("RadioGroupItem", n);
|
|
2371
|
+
return o ? /* @__PURE__ */ k(
|
|
2372
|
+
Be,
|
|
1947
2373
|
{
|
|
1948
2374
|
as: "label",
|
|
1949
2375
|
size: a,
|
|
1950
|
-
className:
|
|
2376
|
+
className: R("bd-RadioGroupItem", s),
|
|
1951
2377
|
style: r,
|
|
1952
2378
|
children: [
|
|
1953
|
-
/* @__PURE__ */
|
|
1954
|
-
|
|
2379
|
+
/* @__PURE__ */ i(
|
|
2380
|
+
ke,
|
|
1955
2381
|
{
|
|
1956
2382
|
__scopeRadioGroup: n,
|
|
1957
2383
|
...c,
|
|
1958
2384
|
ref: t
|
|
1959
2385
|
}
|
|
1960
2386
|
),
|
|
1961
|
-
o && /* @__PURE__ */
|
|
2387
|
+
o && /* @__PURE__ */ i("span", { className: "bd-RadioGroupItemInner", children: o })
|
|
1962
2388
|
]
|
|
1963
2389
|
}
|
|
1964
|
-
) : /* @__PURE__ */
|
|
1965
|
-
|
|
2390
|
+
) : /* @__PURE__ */ i(
|
|
2391
|
+
ke,
|
|
1966
2392
|
{
|
|
1967
2393
|
__scopeRadioGroup: n,
|
|
1968
2394
|
...c,
|
|
@@ -1973,258 +2399,25 @@ const Ot = i.forwardRef(
|
|
|
1973
2399
|
);
|
|
1974
2400
|
}
|
|
1975
2401
|
);
|
|
1976
|
-
|
|
1977
|
-
const
|
|
1978
|
-
const o =
|
|
1979
|
-
return /* @__PURE__ */
|
|
1980
|
-
|
|
2402
|
+
Kt.displayName = `${J}.Item`;
|
|
2403
|
+
const ke = l.forwardRef(({ __scopeRadioGroup: e, ...t }, n) => {
|
|
2404
|
+
const o = Yt("RadioGroupItemRadio", e), s = jt(e), { className: r } = I({ ...t, ...o }, ne);
|
|
2405
|
+
return /* @__PURE__ */ i(
|
|
2406
|
+
Ht,
|
|
1981
2407
|
{
|
|
1982
2408
|
...s,
|
|
1983
2409
|
...t,
|
|
1984
2410
|
asChild: !1,
|
|
1985
2411
|
ref: n,
|
|
1986
|
-
className:
|
|
1987
|
-
}
|
|
1988
|
-
);
|
|
1989
|
-
});
|
|
1990
|
-
ge.displayName = `${W}.ItemRadio`;
|
|
1991
|
-
const Vs = {
|
|
1992
|
-
Root: Mt,
|
|
1993
|
-
Item: Ot
|
|
1994
|
-
}, Ft = i.forwardRef(
|
|
1995
|
-
({ children: e, maxHeight: t, className: n, style: o, onScroll: s, onScrollBottom: r, ...c }, a) => /* @__PURE__ */ l(
|
|
1996
|
-
"div",
|
|
1997
|
-
{
|
|
1998
|
-
ref: a,
|
|
1999
|
-
onScroll: (d) => {
|
|
2000
|
-
if (s && s(d), r) {
|
|
2001
|
-
const { scrollTop: f, scrollHeight: p, clientHeight: C } = d.currentTarget;
|
|
2002
|
-
p - f <= C + 10 && r();
|
|
2003
|
-
}
|
|
2004
|
-
},
|
|
2005
|
-
className: `bd-ScrollArea ${n || ""}`,
|
|
2006
|
-
style: { ...o, maxHeight: t },
|
|
2007
|
-
...c,
|
|
2008
|
-
children: e
|
|
2009
|
-
}
|
|
2010
|
-
)
|
|
2011
|
-
);
|
|
2012
|
-
Ft.displayName = "ScrollArea";
|
|
2013
|
-
const ns = ["1", "2", "3", "4", "5"], os = ["classic", "underlined", "rounded"], ss = {
|
|
2014
|
-
size: { type: "enum", className: "bd-size", values: ns, default: "2" },
|
|
2015
|
-
variant: { type: "enum", className: "bd-variant", values: os, default: "classic" },
|
|
2016
|
-
...O
|
|
2017
|
-
}, rs = {
|
|
2018
|
-
gap: Re.gap,
|
|
2019
|
-
px: L.px,
|
|
2020
|
-
pl: L.pl,
|
|
2021
|
-
pr: L.pr
|
|
2022
|
-
}, as = {
|
|
2023
|
-
...ss,
|
|
2024
|
-
...rs
|
|
2025
|
-
}, ee = "SelectBox", [cs] = A(ee), [is, re] = cs(ee), Gt = ({
|
|
2026
|
-
__scopeSelect: e,
|
|
2027
|
-
value: t,
|
|
2028
|
-
defaultValue: n,
|
|
2029
|
-
onValueChange: o,
|
|
2030
|
-
open: s,
|
|
2031
|
-
defaultOpen: r,
|
|
2032
|
-
onOpenChange: c,
|
|
2033
|
-
variant: a = "classic",
|
|
2034
|
-
children: u
|
|
2035
|
-
}) => {
|
|
2036
|
-
const [d, f] = _({
|
|
2037
|
-
prop: t,
|
|
2038
|
-
defaultProp: n ?? "",
|
|
2039
|
-
onChange: o,
|
|
2040
|
-
caller: ee
|
|
2041
|
-
}), [p, C] = _({
|
|
2042
|
-
prop: s,
|
|
2043
|
-
defaultProp: r ?? !1,
|
|
2044
|
-
onChange: c,
|
|
2045
|
-
caller: `${ee}.Open`
|
|
2046
|
-
}), h = i.useRef(null), b = ze();
|
|
2047
|
-
return /* @__PURE__ */ l(
|
|
2048
|
-
is,
|
|
2049
|
-
{
|
|
2050
|
-
scope: e,
|
|
2051
|
-
value: d,
|
|
2052
|
-
onValueChange: f,
|
|
2053
|
-
open: p,
|
|
2054
|
-
onOpenChange: C,
|
|
2055
|
-
triggerRef: h,
|
|
2056
|
-
contentId: b,
|
|
2057
|
-
variant: a,
|
|
2058
|
-
children: u
|
|
2059
|
-
}
|
|
2060
|
-
);
|
|
2061
|
-
}, Vt = "SelectBoxTrigger", De = i.forwardRef(
|
|
2062
|
-
(e, t) => {
|
|
2063
|
-
const { __scopeSelect: n, children: o, onClick: s, onKeyDown: r, ...c } = e, a = re(Vt, n), u = E(t, a.triggerRef), { className: d, style: f, ...p } = D(c, as), C = !a.value || a.value === "";
|
|
2064
|
-
return /* @__PURE__ */ l(
|
|
2065
|
-
k.button,
|
|
2066
|
-
{
|
|
2067
|
-
type: "button",
|
|
2068
|
-
role: "combobox",
|
|
2069
|
-
"aria-expanded": a.open,
|
|
2070
|
-
"data-placeholder": C ? "" : void 0,
|
|
2071
|
-
className: `bd-SelectBoxTrigger ${d || ""}`,
|
|
2072
|
-
style: f,
|
|
2073
|
-
...p,
|
|
2074
|
-
ref: u,
|
|
2075
|
-
onClick: (h) => {
|
|
2076
|
-
a.onOpenChange(!a.open), s?.(h);
|
|
2077
|
-
},
|
|
2078
|
-
onKeyDown: (h) => {
|
|
2079
|
-
!a.open && (h.key === "ArrowDown" || h.key === "Enter" || h.key === " ") && (h.preventDefault(), a.onOpenChange(!0)), r?.(h);
|
|
2080
|
-
},
|
|
2081
|
-
children: o
|
|
2082
|
-
}
|
|
2083
|
-
);
|
|
2084
|
-
}
|
|
2085
|
-
);
|
|
2086
|
-
De.displayName = Vt;
|
|
2087
|
-
const $t = "SelectBoxContent", Te = i.forwardRef(({ __scopeSelect: e, children: t, className: n, style: o, onKeyDown: s, ...r }, c) => {
|
|
2088
|
-
const a = re($t, e), u = i.useRef(null), d = E(c, u);
|
|
2089
|
-
He(u, (v) => {
|
|
2090
|
-
a.triggerRef.current?.contains(v.target) || a.open && a.onOpenChange(!1);
|
|
2091
|
-
});
|
|
2092
|
-
const f = a.variant === "rounded" ? 8 : 0, { styles: p, isPositioned: C } = Ue(
|
|
2093
|
-
a.triggerRef,
|
|
2094
|
-
u,
|
|
2095
|
-
a.open,
|
|
2096
|
-
f
|
|
2097
|
-
);
|
|
2098
|
-
i.useEffect(() => {
|
|
2099
|
-
a.open && u.current && requestAnimationFrame(() => {
|
|
2100
|
-
if (!u.current) return;
|
|
2101
|
-
const v = Array.from(
|
|
2102
|
-
u.current.querySelectorAll('[role="option"]')
|
|
2103
|
-
), g = v.find((m) => m.getAttribute("aria-selected") === "true");
|
|
2104
|
-
g ? g.focus() : v.length > 0 && v[0].focus();
|
|
2105
|
-
});
|
|
2106
|
-
}, [a.open]);
|
|
2107
|
-
const h = (v) => {
|
|
2108
|
-
const g = Array.from(
|
|
2109
|
-
u.current?.querySelectorAll('[role="option"]') || []
|
|
2110
|
-
), m = g.indexOf(document.activeElement);
|
|
2111
|
-
switch (v.key) {
|
|
2112
|
-
case "ArrowDown": {
|
|
2113
|
-
v.preventDefault();
|
|
2114
|
-
const y = m < g.length - 1 ? m + 1 : 0;
|
|
2115
|
-
g[y]?.focus();
|
|
2116
|
-
break;
|
|
2117
|
-
}
|
|
2118
|
-
case "ArrowUp": {
|
|
2119
|
-
v.preventDefault();
|
|
2120
|
-
const y = m > 0 ? m - 1 : g.length - 1;
|
|
2121
|
-
g[y]?.focus();
|
|
2122
|
-
break;
|
|
2123
|
-
}
|
|
2124
|
-
case "Enter":
|
|
2125
|
-
case " ":
|
|
2126
|
-
v.preventDefault(), document.activeElement?.click();
|
|
2127
|
-
break;
|
|
2128
|
-
case "Escape":
|
|
2129
|
-
v.preventDefault(), a.onOpenChange(!1), a.triggerRef.current?.focus();
|
|
2130
|
-
break;
|
|
2131
|
-
case "Tab":
|
|
2132
|
-
a.onOpenChange(!1);
|
|
2133
|
-
break;
|
|
2134
|
-
}
|
|
2135
|
-
s?.(v);
|
|
2136
|
-
};
|
|
2137
|
-
if (!a.open) return null;
|
|
2138
|
-
const b = /* @__PURE__ */ l(
|
|
2139
|
-
k.div,
|
|
2140
|
-
{
|
|
2141
|
-
id: a.contentId,
|
|
2142
|
-
role: "listbox",
|
|
2143
|
-
tabIndex: -1,
|
|
2144
|
-
onKeyDown: h,
|
|
2145
|
-
className: `bd-SelectBoxContent bd-variant-${a.variant} ${n || ""}`,
|
|
2146
|
-
...r,
|
|
2147
|
-
ref: d,
|
|
2148
|
-
style: {
|
|
2149
|
-
...p,
|
|
2150
|
-
...o,
|
|
2151
|
-
transition: C ? "opacity 0.2s ease, transform 0.2s ease" : "none",
|
|
2152
|
-
overflow: "hidden"
|
|
2153
|
-
},
|
|
2154
|
-
children: t
|
|
2412
|
+
className: R("bd-reset", "bd-BaseRadioRoot", "bd-RadioRoot", r)
|
|
2155
2413
|
}
|
|
2156
2414
|
);
|
|
2157
|
-
return /* @__PURE__ */ l(Ye, { children: b });
|
|
2158
2415
|
});
|
|
2159
|
-
|
|
2160
|
-
const
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
k.div,
|
|
2165
|
-
{
|
|
2166
|
-
role: "option",
|
|
2167
|
-
tabIndex: -1,
|
|
2168
|
-
"aria-selected": u,
|
|
2169
|
-
"data-state": u ? "checked" : "unchecked",
|
|
2170
|
-
className: `bd-SelectBoxItem bd-variant-${a.variant} ${o || ""}`,
|
|
2171
|
-
...r,
|
|
2172
|
-
ref: c,
|
|
2173
|
-
onClick: (d) => {
|
|
2174
|
-
const f = typeof s == "string" ? s : t;
|
|
2175
|
-
a.onValueChange(f), a.onOpenChange(!1), a.triggerRef.current?.focus(), n?.(d);
|
|
2176
|
-
},
|
|
2177
|
-
children: s
|
|
2178
|
-
}
|
|
2179
|
-
);
|
|
2180
|
-
}
|
|
2181
|
-
);
|
|
2182
|
-
_e.displayName = Lt;
|
|
2183
|
-
const zt = "SelectBoxValue", Be = i.forwardRef(
|
|
2184
|
-
({ __scopeSelect: e, className: t, children: n, placeholder: o, ...s }, r) => {
|
|
2185
|
-
const c = re(zt, e), a = c.value ? c.value : n || o;
|
|
2186
|
-
return /* @__PURE__ */ l(k.span, { className: `bd-SelectBoxValue ${t || ""}`, ...s, ref: r, children: a });
|
|
2187
|
-
}
|
|
2188
|
-
);
|
|
2189
|
-
Be.displayName = zt;
|
|
2190
|
-
const ls = "SelectBoxSlot", Ae = i.forwardRef(
|
|
2191
|
-
({ __scopeSelect: e, className: t, side: n = "right", "data-chevron": o, children: s, ...r }, c) => /* @__PURE__ */ l(
|
|
2192
|
-
k.div,
|
|
2193
|
-
{
|
|
2194
|
-
"aria-hidden": "true",
|
|
2195
|
-
"data-side": n,
|
|
2196
|
-
"data-chevron": o ? "true" : void 0,
|
|
2197
|
-
className: `bd-SelectBoxSlot ${t || ""}`,
|
|
2198
|
-
...r,
|
|
2199
|
-
ref: c,
|
|
2200
|
-
children: s || /* @__PURE__ */ l(xo, {})
|
|
2201
|
-
}
|
|
2202
|
-
)
|
|
2203
|
-
);
|
|
2204
|
-
Ae.displayName = ls;
|
|
2205
|
-
const us = ({
|
|
2206
|
-
options: e,
|
|
2207
|
-
placeholder: t = "선택하세요",
|
|
2208
|
-
size: n = "2",
|
|
2209
|
-
variant: o = "classic",
|
|
2210
|
-
disabled: s = !1,
|
|
2211
|
-
maxHeight: r,
|
|
2212
|
-
onScrollBottom: c,
|
|
2213
|
-
...a
|
|
2214
|
-
}) => /* @__PURE__ */ S(Gt, { ...a, variant: o, children: [
|
|
2215
|
-
/* @__PURE__ */ S(De, { size: n, variant: o, disabled: s, children: [
|
|
2216
|
-
/* @__PURE__ */ l(Be, { placeholder: t }),
|
|
2217
|
-
/* @__PURE__ */ l(Ae, { "data-chevron": !0 })
|
|
2218
|
-
] }),
|
|
2219
|
-
/* @__PURE__ */ l(Te, { children: /* @__PURE__ */ l(Ft, { maxHeight: r, onScrollBottom: c, children: e.map((u) => /* @__PURE__ */ l(_e, { value: u.value, children: u.label }, u.value)) }) })
|
|
2220
|
-
] }), $s = Object.assign(us, {
|
|
2221
|
-
Root: Gt,
|
|
2222
|
-
Trigger: De,
|
|
2223
|
-
Content: Te,
|
|
2224
|
-
Item: _e,
|
|
2225
|
-
Value: Be,
|
|
2226
|
-
Slot: Ae
|
|
2227
|
-
}), ae = "Switch", [ds] = A(ae), [ps, fs] = ds(ae), Ut = i.forwardRef(
|
|
2416
|
+
ke.displayName = `${J}.ItemRadio`;
|
|
2417
|
+
const js = {
|
|
2418
|
+
Root: qt,
|
|
2419
|
+
Item: Kt
|
|
2420
|
+
}, ge = "Switch", [hs] = _(ge), [gs, bs] = hs(ge), Wt = l.forwardRef(
|
|
2228
2421
|
(e, t) => {
|
|
2229
2422
|
const {
|
|
2230
2423
|
__scopeSwitch: n,
|
|
@@ -2235,58 +2428,58 @@ const us = ({
|
|
|
2235
2428
|
disabled: a,
|
|
2236
2429
|
value: u = "on",
|
|
2237
2430
|
onCheckedChange: d,
|
|
2238
|
-
form:
|
|
2239
|
-
...
|
|
2240
|
-
} = e, [C, h] =
|
|
2431
|
+
form: p,
|
|
2432
|
+
...f
|
|
2433
|
+
} = e, [C, h] = l.useState(null), v = T(t, (w) => h(w)), b = l.useRef(!1), g = C ? p || !!C.closest("form") : !0, [m, y] = B({
|
|
2241
2434
|
prop: s,
|
|
2242
2435
|
defaultProp: r ?? !1,
|
|
2243
2436
|
onChange: d,
|
|
2244
|
-
caller:
|
|
2437
|
+
caller: ge
|
|
2245
2438
|
});
|
|
2246
|
-
return /* @__PURE__ */
|
|
2247
|
-
/* @__PURE__ */
|
|
2248
|
-
|
|
2439
|
+
return /* @__PURE__ */ k(gs, { scope: n, checked: m, disabled: a, children: [
|
|
2440
|
+
/* @__PURE__ */ i(
|
|
2441
|
+
P.button,
|
|
2249
2442
|
{
|
|
2250
2443
|
type: "button",
|
|
2251
2444
|
role: "switch",
|
|
2252
2445
|
"aria-checked": m,
|
|
2253
2446
|
"aria-required": c,
|
|
2254
|
-
"data-state":
|
|
2447
|
+
"data-state": Qt(m),
|
|
2255
2448
|
"data-disabled": a ? "" : void 0,
|
|
2256
2449
|
disabled: a,
|
|
2257
2450
|
value: u,
|
|
2258
|
-
...
|
|
2259
|
-
ref:
|
|
2260
|
-
onClick:
|
|
2261
|
-
y((
|
|
2451
|
+
...f,
|
|
2452
|
+
ref: v,
|
|
2453
|
+
onClick: M(e.onClick, (w) => {
|
|
2454
|
+
y((N) => !N), g && (b.current = w.isPropagationStopped(), b.current || w.stopPropagation());
|
|
2262
2455
|
})
|
|
2263
2456
|
}
|
|
2264
2457
|
),
|
|
2265
|
-
g && /* @__PURE__ */
|
|
2266
|
-
|
|
2458
|
+
g && /* @__PURE__ */ i(
|
|
2459
|
+
Jt,
|
|
2267
2460
|
{
|
|
2268
2461
|
control: C,
|
|
2269
|
-
bubbles: !
|
|
2462
|
+
bubbles: !b.current,
|
|
2270
2463
|
name: o,
|
|
2271
2464
|
value: u,
|
|
2272
2465
|
checked: m,
|
|
2273
2466
|
required: c,
|
|
2274
2467
|
disabled: a,
|
|
2275
|
-
form:
|
|
2468
|
+
form: p,
|
|
2276
2469
|
style: { transform: "translateX(-100%)" }
|
|
2277
2470
|
}
|
|
2278
2471
|
)
|
|
2279
2472
|
] });
|
|
2280
2473
|
}
|
|
2281
2474
|
);
|
|
2282
|
-
|
|
2283
|
-
const
|
|
2475
|
+
Wt.displayName = ge;
|
|
2476
|
+
const Xt = "SwitchThumb", Zt = l.forwardRef(
|
|
2284
2477
|
(e, t) => {
|
|
2285
|
-
const { __scopeSwitch: n, ...o } = e, s =
|
|
2286
|
-
return /* @__PURE__ */
|
|
2287
|
-
|
|
2478
|
+
const { __scopeSwitch: n, ...o } = e, s = bs(Xt, n);
|
|
2479
|
+
return /* @__PURE__ */ i(
|
|
2480
|
+
P.span,
|
|
2288
2481
|
{
|
|
2289
|
-
"data-state":
|
|
2482
|
+
"data-state": Qt(s.checked),
|
|
2290
2483
|
"data-disabled": s.disabled ? "" : void 0,
|
|
2291
2484
|
...o,
|
|
2292
2485
|
ref: t
|
|
@@ -2294,22 +2487,22 @@ const Ht = "SwitchThumb", Yt = i.forwardRef(
|
|
|
2294
2487
|
);
|
|
2295
2488
|
}
|
|
2296
2489
|
);
|
|
2297
|
-
|
|
2298
|
-
const
|
|
2490
|
+
Zt.displayName = Xt;
|
|
2491
|
+
const Cs = "SwitchBubbleInput", Jt = l.forwardRef(
|
|
2299
2492
|
(e, t) => {
|
|
2300
|
-
const { checked: n, control: o, bubbles: s = !0, ...r } = e, c =
|
|
2301
|
-
return
|
|
2302
|
-
const
|
|
2303
|
-
if (!
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2493
|
+
const { checked: n, control: o, bubbles: s = !0, ...r } = e, c = l.useRef(null), a = T(c, t), u = Ie(n), d = Ee(o);
|
|
2494
|
+
return l.useEffect(() => {
|
|
2495
|
+
const p = c.current;
|
|
2496
|
+
if (!p) return;
|
|
2497
|
+
const f = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(
|
|
2498
|
+
f,
|
|
2306
2499
|
"checked"
|
|
2307
2500
|
).set;
|
|
2308
2501
|
if (u !== n && h) {
|
|
2309
|
-
const
|
|
2310
|
-
h.call(
|
|
2502
|
+
const v = new Event("click", { bubbles: s });
|
|
2503
|
+
h.call(p, n), p.dispatchEvent(v);
|
|
2311
2504
|
}
|
|
2312
|
-
}, [u, n, s]), /* @__PURE__ */
|
|
2505
|
+
}, [u, n, s]), /* @__PURE__ */ i(
|
|
2313
2506
|
"input",
|
|
2314
2507
|
{
|
|
2315
2508
|
type: "checkbox",
|
|
@@ -2330,73 +2523,73 @@ const ms = "SwitchBubbleInput", jt = i.forwardRef(
|
|
|
2330
2523
|
);
|
|
2331
2524
|
}
|
|
2332
2525
|
);
|
|
2333
|
-
|
|
2334
|
-
function
|
|
2526
|
+
Jt.displayName = Cs;
|
|
2527
|
+
function Qt(e) {
|
|
2335
2528
|
return e ? "checked" : "unchecked";
|
|
2336
2529
|
}
|
|
2337
|
-
const
|
|
2338
|
-
size: { type: "enum", className: "bd-size", values:
|
|
2339
|
-
...
|
|
2340
|
-
},
|
|
2341
|
-
const { className: n, ...o } =
|
|
2342
|
-
return /* @__PURE__ */
|
|
2343
|
-
|
|
2530
|
+
const vs = ["1", "2", "3"], ys = {
|
|
2531
|
+
size: { type: "enum", className: "bd-size", values: vs, default: "2" },
|
|
2532
|
+
...G
|
|
2533
|
+
}, ws = l.forwardRef((e, t) => {
|
|
2534
|
+
const { className: n, ...o } = I(e, ys);
|
|
2535
|
+
return /* @__PURE__ */ i(
|
|
2536
|
+
Wt,
|
|
2344
2537
|
{
|
|
2345
2538
|
...o,
|
|
2346
2539
|
asChild: !1,
|
|
2347
2540
|
ref: t,
|
|
2348
|
-
className:
|
|
2349
|
-
children: /* @__PURE__ */
|
|
2541
|
+
className: R("bd-reset", "bd-SwitchRoot", n),
|
|
2542
|
+
children: /* @__PURE__ */ i(Zt, { className: R("bd-SwitchThumb") })
|
|
2350
2543
|
}
|
|
2351
2544
|
);
|
|
2352
2545
|
});
|
|
2353
|
-
|
|
2354
|
-
const
|
|
2355
|
-
size: { type: "enum", className: "bd-size", values:
|
|
2356
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
2357
|
-
...
|
|
2358
|
-
|
|
2359
|
-
},
|
|
2360
|
-
side: { type: "enum", values:
|
|
2361
|
-
gap:
|
|
2362
|
-
px:
|
|
2363
|
-
pl:
|
|
2364
|
-
pr:
|
|
2365
|
-
},
|
|
2546
|
+
ws.displayName = "Switch";
|
|
2547
|
+
const Ns = ["1", "2", "3", "4", "5"], Rs = ["classic", "underlined", "rounded"], xs = {
|
|
2548
|
+
size: { type: "enum", className: "bd-size", values: Ns, default: "2" },
|
|
2549
|
+
variant: { type: "enum", className: "bd-variant", values: Rs, default: "classic" },
|
|
2550
|
+
...G,
|
|
2551
|
+
...Yn
|
|
2552
|
+
}, Ss = ["left", "right"], ks = {
|
|
2553
|
+
side: { type: "enum", values: Ss },
|
|
2554
|
+
gap: Me.gap,
|
|
2555
|
+
px: U.px,
|
|
2556
|
+
pl: U.pl,
|
|
2557
|
+
pr: U.pr
|
|
2558
|
+
}, en = l.forwardRef(
|
|
2366
2559
|
(e, t) => {
|
|
2367
|
-
const n =
|
|
2560
|
+
const n = l.useRef(null), { children: o, className: s, style: r, ...c } = I(
|
|
2368
2561
|
e,
|
|
2369
|
-
|
|
2562
|
+
xs
|
|
2370
2563
|
);
|
|
2371
|
-
return /* @__PURE__ */
|
|
2564
|
+
return /* @__PURE__ */ k(
|
|
2372
2565
|
"div",
|
|
2373
2566
|
{
|
|
2374
2567
|
style: r,
|
|
2375
|
-
className:
|
|
2568
|
+
className: R("bd-TextFieldRoot", s),
|
|
2376
2569
|
onPointerDown: (a) => {
|
|
2377
2570
|
const u = a.target;
|
|
2378
2571
|
if (u.closest("input, button, a")) return;
|
|
2379
2572
|
const d = n.current;
|
|
2380
2573
|
if (!d) return;
|
|
2381
|
-
const
|
|
2574
|
+
const f = u.closest(`
|
|
2382
2575
|
.bd-TextFieldSlot[data-side='right'],
|
|
2383
2576
|
.bd-TextFieldSlot:not([data-side='right']) ~ .bd-TextFieldSlot:not([data-side='left'])
|
|
2384
2577
|
`) ? d.value.length : 0;
|
|
2385
2578
|
requestAnimationFrame(() => {
|
|
2386
2579
|
try {
|
|
2387
|
-
d.setSelectionRange(
|
|
2580
|
+
d.setSelectionRange(f, f);
|
|
2388
2581
|
} catch {
|
|
2389
2582
|
}
|
|
2390
2583
|
d.focus();
|
|
2391
2584
|
});
|
|
2392
2585
|
},
|
|
2393
2586
|
children: [
|
|
2394
|
-
/* @__PURE__ */
|
|
2587
|
+
/* @__PURE__ */ i(
|
|
2395
2588
|
"input",
|
|
2396
2589
|
{
|
|
2397
2590
|
spellCheck: "false",
|
|
2398
2591
|
...c,
|
|
2399
|
-
ref:
|
|
2592
|
+
ref: X(n, t),
|
|
2400
2593
|
className: "bd-reset bd-TextFieldInput"
|
|
2401
2594
|
}
|
|
2402
2595
|
),
|
|
@@ -2406,88 +2599,88 @@ const Cs = ["1", "2", "3", "4", "5"], vs = ["classic", "underlined", "rounded"],
|
|
|
2406
2599
|
);
|
|
2407
2600
|
}
|
|
2408
2601
|
);
|
|
2409
|
-
|
|
2410
|
-
const
|
|
2602
|
+
en.displayName = "TextFieldRoot";
|
|
2603
|
+
const tn = l.forwardRef(
|
|
2411
2604
|
(e, t) => {
|
|
2412
|
-
const { className: n, side: o, ...s } =
|
|
2413
|
-
return /* @__PURE__ */
|
|
2605
|
+
const { className: n, side: o, ...s } = I(e, ks);
|
|
2606
|
+
return /* @__PURE__ */ i(
|
|
2414
2607
|
"div",
|
|
2415
2608
|
{
|
|
2416
2609
|
"data-side": o,
|
|
2417
2610
|
...s,
|
|
2418
2611
|
ref: t,
|
|
2419
|
-
className:
|
|
2612
|
+
className: R("bd-TextFieldSlot", n)
|
|
2420
2613
|
}
|
|
2421
2614
|
);
|
|
2422
2615
|
}
|
|
2423
2616
|
);
|
|
2424
|
-
|
|
2425
|
-
const
|
|
2617
|
+
tn.displayName = "TextFieldSlot";
|
|
2618
|
+
const Ys = Object.assign(en, { Slot: tn }), Ps = (e, t) => new Date(e, t + 1, 0).getDate(), Is = (e, t) => new Date(e, t, 1).getDay(), W = () => {
|
|
2426
2619
|
const e = /* @__PURE__ */ new Date();
|
|
2427
2620
|
return e.setHours(0, 0, 0, 0), e;
|
|
2428
|
-
},
|
|
2429
|
-
const { variant: t = "single", size: n = "2", children: o } = e, s =
|
|
2621
|
+
}, nn = "Calendar", [Es] = _(nn), [Ds, $] = Es(nn), Ts = (e) => {
|
|
2622
|
+
const { variant: t = "single", size: n = "2", children: o } = e, s = l.useRef(null), [r, c] = B({
|
|
2430
2623
|
prop: e.open,
|
|
2431
2624
|
defaultProp: e.defaultOpen || !1,
|
|
2432
2625
|
onChange: e.onOpenChange,
|
|
2433
2626
|
caller: "CalendarRoot"
|
|
2434
|
-
}), [a, u] =
|
|
2627
|
+
}), [a, u] = B({
|
|
2435
2628
|
prop: e.value,
|
|
2436
2629
|
defaultProp: e.defaultValue ?? null,
|
|
2437
2630
|
onChange: e.onValueChange,
|
|
2438
2631
|
caller: "CalendarRoot (single)"
|
|
2439
|
-
}), [d,
|
|
2632
|
+
}), [d, p] = B({
|
|
2440
2633
|
prop: e.rangeValue,
|
|
2441
2634
|
defaultProp: e.defaultRangeValue ?? { start: null, end: null },
|
|
2442
2635
|
onChange: e.onRangeValueChange,
|
|
2443
2636
|
caller: "CalendarRoot (range)"
|
|
2444
|
-
}), [
|
|
2445
|
-
a || d.start ||
|
|
2637
|
+
}), [f, C] = l.useState("date"), [h, v] = l.useState(
|
|
2638
|
+
a || d.start || W()
|
|
2446
2639
|
);
|
|
2447
|
-
|
|
2448
|
-
t === "single" && a && !isNaN(a.getTime()) ?
|
|
2640
|
+
l.useEffect(() => {
|
|
2641
|
+
t === "single" && a && !isNaN(a.getTime()) ? v(a) : t === "range" && d.start && !isNaN(d.start.getTime()) && v(d.start);
|
|
2449
2642
|
}, [d.start, a, t]);
|
|
2450
|
-
const
|
|
2451
|
-
|
|
2452
|
-
r && (
|
|
2643
|
+
const b = l.useRef(a), g = l.useRef(d);
|
|
2644
|
+
l.useEffect(() => {
|
|
2645
|
+
r && (b.current = a, g.current = d);
|
|
2453
2646
|
}, [r, a, d]);
|
|
2454
|
-
const m =
|
|
2455
|
-
t === "single" && !a ? u(
|
|
2456
|
-
}, [t, a, d.start, u,
|
|
2457
|
-
t === "single" ? u(
|
|
2458
|
-
}, [t, u,
|
|
2459
|
-
return /* @__PURE__ */
|
|
2460
|
-
|
|
2647
|
+
const m = l.useCallback(() => {
|
|
2648
|
+
t === "single" && !a ? u(W()) : t === "range" && !d.start && p((N) => ({ ...N, start: W() })), c(!1);
|
|
2649
|
+
}, [t, a, d.start, u, p, c]), y = l.useCallback(() => {
|
|
2650
|
+
t === "single" ? u(b.current) : p(g.current), c(!1);
|
|
2651
|
+
}, [t, u, p, c]);
|
|
2652
|
+
return /* @__PURE__ */ i(
|
|
2653
|
+
Ds,
|
|
2461
2654
|
{
|
|
2462
2655
|
scope: void 0,
|
|
2463
2656
|
open: r,
|
|
2464
|
-
setOpen: (
|
|
2465
|
-
c(
|
|
2657
|
+
setOpen: (N) => {
|
|
2658
|
+
c(N), N || C("date");
|
|
2466
2659
|
},
|
|
2467
2660
|
triggerRef: s,
|
|
2468
2661
|
variant: t,
|
|
2469
2662
|
size: n,
|
|
2470
|
-
viewMode:
|
|
2663
|
+
viewMode: f,
|
|
2471
2664
|
setViewMode: C,
|
|
2472
2665
|
viewingDate: h,
|
|
2473
|
-
setViewingDate:
|
|
2474
|
-
singleDate: a ||
|
|
2666
|
+
setViewingDate: v,
|
|
2667
|
+
singleDate: a || W(),
|
|
2475
2668
|
setSingleDate: u,
|
|
2476
|
-
startDate: d.start ||
|
|
2477
|
-
setStartDate: (
|
|
2669
|
+
startDate: d.start || W(),
|
|
2670
|
+
setStartDate: (N) => p((x) => ({ ...x, start: N })),
|
|
2478
2671
|
endDate: d.end,
|
|
2479
|
-
setEndDate: (
|
|
2480
|
-
resetRange: () =>
|
|
2672
|
+
setEndDate: (N) => p((x) => ({ ...x, end: N })),
|
|
2673
|
+
resetRange: () => p({ start: null, end: null }),
|
|
2481
2674
|
onConfirm: m,
|
|
2482
2675
|
onCancel: y,
|
|
2483
2676
|
children: o
|
|
2484
2677
|
}
|
|
2485
2678
|
);
|
|
2486
|
-
},
|
|
2679
|
+
}, on = l.forwardRef(
|
|
2487
2680
|
({ children: e }, t) => {
|
|
2488
|
-
const n =
|
|
2489
|
-
return
|
|
2490
|
-
ref:
|
|
2681
|
+
const n = $("CalendarTrigger", void 0), o = Ke(e), s = Pe(o);
|
|
2682
|
+
return l.cloneElement(o, {
|
|
2683
|
+
ref: X(t, n.triggerRef, s),
|
|
2491
2684
|
onFocus: (r) => {
|
|
2492
2685
|
n.setOpen(!0), o.props.onFocus?.(r);
|
|
2493
2686
|
},
|
|
@@ -2497,10 +2690,10 @@ const Ls = Object.assign(Kt, { Slot: Wt }), Ns = (e, t) => new Date(e, t + 1, 0)
|
|
|
2497
2690
|
});
|
|
2498
2691
|
}
|
|
2499
2692
|
);
|
|
2500
|
-
|
|
2501
|
-
const
|
|
2693
|
+
on.displayName = "CalendarTrigger";
|
|
2694
|
+
const sn = l.forwardRef(
|
|
2502
2695
|
(e, t) => {
|
|
2503
|
-
const { className: n, style: o, ...s } = e, r =
|
|
2696
|
+
const { className: n, style: o, ...s } = e, r = $("CalendarContent", void 0), c = l.useRef(null), { styles: a, isPositioned: u } = Xe(
|
|
2504
2697
|
r.triggerRef,
|
|
2505
2698
|
c,
|
|
2506
2699
|
r.open,
|
|
@@ -2508,77 +2701,77 @@ const Jt = i.forwardRef(
|
|
|
2508
2701
|
"start",
|
|
2509
2702
|
!1
|
|
2510
2703
|
);
|
|
2511
|
-
if (
|
|
2512
|
-
r.triggerRef.current?.contains(
|
|
2704
|
+
if (Ze(c, (f) => {
|
|
2705
|
+
r.triggerRef.current?.contains(f.target) || r.setOpen(!1);
|
|
2513
2706
|
}), !r.open) return null;
|
|
2514
2707
|
const d = () => {
|
|
2515
2708
|
r.onConfirm();
|
|
2516
|
-
},
|
|
2709
|
+
}, p = () => {
|
|
2517
2710
|
r.onCancel();
|
|
2518
2711
|
};
|
|
2519
|
-
return /* @__PURE__ */
|
|
2520
|
-
|
|
2712
|
+
return /* @__PURE__ */ i(Je, { children: /* @__PURE__ */ k(
|
|
2713
|
+
D,
|
|
2521
2714
|
{
|
|
2522
2715
|
direction: "column",
|
|
2523
2716
|
gap: "4",
|
|
2524
2717
|
...s,
|
|
2525
|
-
ref:
|
|
2526
|
-
className:
|
|
2718
|
+
ref: X(c, t),
|
|
2719
|
+
className: R(
|
|
2527
2720
|
"bd-CalendarContent",
|
|
2528
2721
|
`bd-size-${r.size}`,
|
|
2529
2722
|
`bd-variant-${r.variant}`,
|
|
2530
2723
|
n
|
|
2531
2724
|
),
|
|
2532
2725
|
style: { ...o, ...a, visibility: u ? "visible" : "hidden" },
|
|
2533
|
-
onPointerDown: (
|
|
2534
|
-
|
|
2726
|
+
onPointerDown: (f) => {
|
|
2727
|
+
f.preventDefault();
|
|
2535
2728
|
},
|
|
2536
2729
|
children: [
|
|
2537
|
-
r.variant === "range" && /* @__PURE__ */
|
|
2538
|
-
/* @__PURE__ */
|
|
2539
|
-
/* @__PURE__ */
|
|
2540
|
-
/* @__PURE__ */
|
|
2541
|
-
/* @__PURE__ */
|
|
2542
|
-
|
|
2730
|
+
r.variant === "range" && /* @__PURE__ */ i(Bs, {}),
|
|
2731
|
+
/* @__PURE__ */ i(Ms, {}),
|
|
2732
|
+
/* @__PURE__ */ i(_s, {}),
|
|
2733
|
+
/* @__PURE__ */ k(D, { justify: "center", gap: "2", children: [
|
|
2734
|
+
/* @__PURE__ */ i(
|
|
2735
|
+
xe,
|
|
2543
2736
|
{
|
|
2544
2737
|
size: "3",
|
|
2545
2738
|
variant: "outline-primary",
|
|
2546
2739
|
radius: "s",
|
|
2547
|
-
onClick:
|
|
2740
|
+
onClick: p,
|
|
2548
2741
|
style: { width: "50%" },
|
|
2549
2742
|
children: "취소"
|
|
2550
2743
|
}
|
|
2551
2744
|
),
|
|
2552
|
-
/* @__PURE__ */
|
|
2745
|
+
/* @__PURE__ */ i(xe, { size: "3", radius: "s", onClick: d, style: { width: "50%" }, children: "확인" })
|
|
2553
2746
|
] })
|
|
2554
2747
|
]
|
|
2555
2748
|
}
|
|
2556
2749
|
) });
|
|
2557
2750
|
}
|
|
2558
2751
|
);
|
|
2559
|
-
|
|
2560
|
-
const
|
|
2561
|
-
const e =
|
|
2562
|
-
/* @__PURE__ */
|
|
2752
|
+
sn.displayName = "CalendarContent";
|
|
2753
|
+
const Bs = () => {
|
|
2754
|
+
const e = $("CalendarRangeHeader", void 0), t = (n) => n ? `${n.getFullYear()}.${String(n.getMonth() + 1).padStart(2, "0")}.${String(n.getDate()).padStart(2, "0")}` : /* @__PURE__ */ k(D, { align: "center", gap: "1", children: [
|
|
2755
|
+
/* @__PURE__ */ i(ie, { width: 12, height: 12 }),
|
|
2563
2756
|
"범위 추가"
|
|
2564
2757
|
] });
|
|
2565
|
-
return /* @__PURE__ */
|
|
2566
|
-
/* @__PURE__ */
|
|
2567
|
-
/* @__PURE__ */
|
|
2568
|
-
|
|
2758
|
+
return /* @__PURE__ */ k(D, { direction: "column", className: "bd-CalendarRangeHeader", children: [
|
|
2759
|
+
/* @__PURE__ */ k(D, { gap: "2", children: [
|
|
2760
|
+
/* @__PURE__ */ i(
|
|
2761
|
+
D,
|
|
2569
2762
|
{
|
|
2570
2763
|
align: "center",
|
|
2571
2764
|
justify: "between",
|
|
2572
|
-
className:
|
|
2765
|
+
className: R("bd-RangeBox", { active: !e.startDate }),
|
|
2573
2766
|
children: t(e.startDate)
|
|
2574
2767
|
}
|
|
2575
2768
|
),
|
|
2576
|
-
/* @__PURE__ */
|
|
2577
|
-
|
|
2769
|
+
/* @__PURE__ */ i(
|
|
2770
|
+
D,
|
|
2578
2771
|
{
|
|
2579
2772
|
align: "center",
|
|
2580
2773
|
justify: "between",
|
|
2581
|
-
className:
|
|
2774
|
+
className: R("bd-RangeBox", {
|
|
2582
2775
|
active: e.startDate && !e.endDate,
|
|
2583
2776
|
empty: !e.endDate
|
|
2584
2777
|
}),
|
|
@@ -2586,27 +2779,27 @@ const Is = () => {
|
|
|
2586
2779
|
}
|
|
2587
2780
|
)
|
|
2588
2781
|
] }),
|
|
2589
|
-
/* @__PURE__ */
|
|
2590
|
-
|
|
2782
|
+
/* @__PURE__ */ i(
|
|
2783
|
+
D,
|
|
2591
2784
|
{
|
|
2592
2785
|
justify: "end",
|
|
2593
2786
|
onClick: () => {
|
|
2594
2787
|
e.resetRange();
|
|
2595
2788
|
},
|
|
2596
|
-
children: /* @__PURE__ */
|
|
2789
|
+
children: /* @__PURE__ */ i("button", { className: "reset-btn", children: "초기화" })
|
|
2597
2790
|
}
|
|
2598
2791
|
)
|
|
2599
2792
|
] });
|
|
2600
|
-
},
|
|
2601
|
-
const e =
|
|
2793
|
+
}, Ms = () => {
|
|
2794
|
+
const e = $("CalendarNavigation", void 0), { viewingDate: t, setViewingDate: n, viewMode: o, setViewMode: s } = e, r = () => {
|
|
2602
2795
|
const a = new Date(t);
|
|
2603
2796
|
o === "date" ? a.setMonth(a.getMonth() - 1) : o === "year" ? a.setFullYear(a.getFullYear() - 28) : a.setFullYear(a.getFullYear() - 1), n(a);
|
|
2604
2797
|
}, c = () => {
|
|
2605
2798
|
const a = new Date(t);
|
|
2606
2799
|
o === "date" ? a.setMonth(a.getMonth() + 1) : o === "year" ? a.setFullYear(a.getFullYear() + 28) : a.setFullYear(a.getFullYear() + 1), n(a);
|
|
2607
2800
|
};
|
|
2608
|
-
return /* @__PURE__ */
|
|
2609
|
-
/* @__PURE__ */
|
|
2801
|
+
return /* @__PURE__ */ k(D, { justify: "between", align: "center", children: [
|
|
2802
|
+
/* @__PURE__ */ k(
|
|
2610
2803
|
"div",
|
|
2611
2804
|
{
|
|
2612
2805
|
className: "bd-CalendarNavTitle bd-weight-medium",
|
|
@@ -2618,35 +2811,35 @@ const Is = () => {
|
|
|
2618
2811
|
]
|
|
2619
2812
|
}
|
|
2620
2813
|
),
|
|
2621
|
-
/* @__PURE__ */
|
|
2622
|
-
/* @__PURE__ */
|
|
2623
|
-
/* @__PURE__ */
|
|
2814
|
+
/* @__PURE__ */ k(D, { gap: "2", children: [
|
|
2815
|
+
/* @__PURE__ */ i("button", { onClick: r, className: "bd-CalendarNavBtn", children: /* @__PURE__ */ i(Io, { width: 16 }) }),
|
|
2816
|
+
/* @__PURE__ */ i("button", { onClick: c, className: "bd-CalendarNavBtn", children: /* @__PURE__ */ i(Eo, { width: 16 }) })
|
|
2624
2817
|
] })
|
|
2625
2818
|
] });
|
|
2626
|
-
},
|
|
2627
|
-
const e =
|
|
2628
|
-
return e.viewMode === "year" ? /* @__PURE__ */
|
|
2629
|
-
},
|
|
2630
|
-
const e =
|
|
2819
|
+
}, _s = () => {
|
|
2820
|
+
const e = $("CalendarBody", void 0);
|
|
2821
|
+
return e.viewMode === "year" ? /* @__PURE__ */ i(Fs, {}) : e.viewMode === "month" ? /* @__PURE__ */ i(Os, {}) : /* @__PURE__ */ i(As, {});
|
|
2822
|
+
}, As = () => {
|
|
2823
|
+
const e = $("DateGrid", void 0), { viewingDate: t, singleDate: n, startDate: o, endDate: s } = e, r = t.getFullYear(), c = t.getMonth(), a = Ps(r, c), u = Is(r, c), d = new Date(r, c, 0).getDate(), p = ["일", "월", "화", "수", "목", "금", "토"], f = [];
|
|
2631
2824
|
for (let m = u - 1; m >= 0; m--)
|
|
2632
|
-
|
|
2825
|
+
f.push({
|
|
2633
2826
|
date: new Date(r, c - 1, d - m),
|
|
2634
2827
|
isCurrentMonth: !1
|
|
2635
2828
|
});
|
|
2636
2829
|
for (let m = 1; m <= a; m++)
|
|
2637
|
-
|
|
2830
|
+
f.push({
|
|
2638
2831
|
date: new Date(r, c, m),
|
|
2639
2832
|
isCurrentMonth: !0
|
|
2640
2833
|
});
|
|
2641
|
-
const C =
|
|
2834
|
+
const C = f.length, h = C % 7 === 0 ? 0 : 7 - C % 7;
|
|
2642
2835
|
for (let m = 1; m <= h; m++)
|
|
2643
|
-
|
|
2836
|
+
f.push({
|
|
2644
2837
|
date: new Date(r, c + 1, m),
|
|
2645
2838
|
isCurrentMonth: !1
|
|
2646
2839
|
});
|
|
2647
|
-
const
|
|
2840
|
+
const v = (m) => {
|
|
2648
2841
|
m.getMonth() !== c && e.setViewingDate(m), e.variant === "single" ? e.setSingleDate(m) : !o || o && s ? (e.setStartDate(m), e.setEndDate(null)) : m < o ? e.setStartDate(m) : e.setEndDate(m);
|
|
2649
|
-
},
|
|
2842
|
+
}, b = (m) => {
|
|
2650
2843
|
const y = m.getTime();
|
|
2651
2844
|
return e.variant === "single" ? n?.getTime() === y : o?.getTime() === y || s?.getTime() === y;
|
|
2652
2845
|
}, g = (m) => {
|
|
@@ -2654,28 +2847,28 @@ const Is = () => {
|
|
|
2654
2847
|
const y = m.getTime();
|
|
2655
2848
|
return y > o.getTime() && y < s.getTime();
|
|
2656
2849
|
};
|
|
2657
|
-
return /* @__PURE__ */
|
|
2658
|
-
|
|
2659
|
-
|
|
2850
|
+
return /* @__PURE__ */ k("div", { className: "bd-CalendarGrid bd-DateGrid", children: [
|
|
2851
|
+
p.map((m) => /* @__PURE__ */ i("div", { className: "bd-CalendarWeek", children: m }, m)),
|
|
2852
|
+
f.map((m, y) => /* @__PURE__ */ i(
|
|
2660
2853
|
"div",
|
|
2661
2854
|
{
|
|
2662
|
-
className:
|
|
2663
|
-
selected:
|
|
2855
|
+
className: R("bd-CalendarCell", {
|
|
2856
|
+
selected: b(m.date),
|
|
2664
2857
|
inRange: g(m.date)
|
|
2665
2858
|
}),
|
|
2666
2859
|
style: {
|
|
2667
|
-
color: !m.isCurrentMonth && !
|
|
2668
|
-
opacity: !m.isCurrentMonth && !
|
|
2860
|
+
color: !m.isCurrentMonth && !b(m.date) ? "var(--color-gray-900, #999)" : void 0,
|
|
2861
|
+
opacity: !m.isCurrentMonth && !b(m.date) ? 0.4 : 1
|
|
2669
2862
|
},
|
|
2670
|
-
onClick: () =>
|
|
2863
|
+
onClick: () => v(m.date),
|
|
2671
2864
|
children: m.date.getDate()
|
|
2672
2865
|
},
|
|
2673
2866
|
y
|
|
2674
2867
|
))
|
|
2675
2868
|
] });
|
|
2676
|
-
},
|
|
2677
|
-
const e =
|
|
2678
|
-
return /* @__PURE__ */
|
|
2869
|
+
}, Os = () => {
|
|
2870
|
+
const e = $("MonthGrid", void 0), t = Array.from({ length: 12 }, (n, o) => o + 1);
|
|
2871
|
+
return /* @__PURE__ */ i("div", { className: "bd-CalendarGrid bd-MonthGrid", children: t.map((n) => /* @__PURE__ */ k(
|
|
2679
2872
|
"div",
|
|
2680
2873
|
{
|
|
2681
2874
|
className: "bd-CalendarCell",
|
|
@@ -2690,12 +2883,12 @@ const Is = () => {
|
|
|
2690
2883
|
},
|
|
2691
2884
|
n
|
|
2692
2885
|
)) });
|
|
2693
|
-
},
|
|
2694
|
-
const e =
|
|
2695
|
-
return /* @__PURE__ */
|
|
2886
|
+
}, Fs = () => {
|
|
2887
|
+
const e = $("YearGrid", void 0), t = Math.floor(e.viewingDate.getFullYear() / 10) * 10 - 4, n = Array.from({ length: 28 }, (o, s) => t + s);
|
|
2888
|
+
return /* @__PURE__ */ i("div", { className: "bd-CalendarGrid bd-YearGrid", children: n.map((o) => /* @__PURE__ */ i(
|
|
2696
2889
|
"div",
|
|
2697
2890
|
{
|
|
2698
|
-
className:
|
|
2891
|
+
className: R("bd-CalendarCell", {
|
|
2699
2892
|
selected: o === e.viewingDate.getFullYear()
|
|
2700
2893
|
}),
|
|
2701
2894
|
onClick: () => {
|
|
@@ -2706,27 +2899,28 @@ const Is = () => {
|
|
|
2706
2899
|
},
|
|
2707
2900
|
o
|
|
2708
2901
|
)) });
|
|
2709
|
-
},
|
|
2710
|
-
Trigger:
|
|
2711
|
-
Content:
|
|
2902
|
+
}, qs = Object.assign(Ts, {
|
|
2903
|
+
Trigger: on,
|
|
2904
|
+
Content: sn
|
|
2712
2905
|
});
|
|
2713
2906
|
export {
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2907
|
+
Do as BraketDownIcon,
|
|
2908
|
+
Io as BraketLeftIcon,
|
|
2909
|
+
Eo as BraketRightIcon,
|
|
2910
|
+
xe as Button,
|
|
2911
|
+
qs as Calendar,
|
|
2912
|
+
ie as CheckLineIcon,
|
|
2913
|
+
Us as CheckableSelectBox,
|
|
2914
|
+
Oo as Checkbox,
|
|
2915
|
+
Hs as CheckboxGroup,
|
|
2916
|
+
D as Flex,
|
|
2917
|
+
Po as IndeterminateLineIcon,
|
|
2918
|
+
ss as Radio,
|
|
2919
|
+
js as RadioGroup,
|
|
2920
|
+
Oe as ScrollArea,
|
|
2921
|
+
zs as SelectBox,
|
|
2922
|
+
ct as Spinner,
|
|
2923
|
+
ws as Switch,
|
|
2924
|
+
Be as Text,
|
|
2925
|
+
Ys as TextField
|
|
2732
2926
|
};
|