@beaubrain/web-design-system 0.1.13 → 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/selectBox.base.d.ts +1 -0
- package/dist/components/SelectBox/selectBox.defs.d.ts +2 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +1458 -1284
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
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() {
|
|
20
20
|
for (var r = "", c = 0; c < arguments.length; c++) {
|
|
21
21
|
var a = arguments[c];
|
|
22
|
-
a && (r =
|
|
22
|
+
a && (r = s(r, o(a)));
|
|
23
23
|
}
|
|
24
24
|
return r;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function o(r) {
|
|
27
27
|
if (typeof r == "string" || typeof r == "number")
|
|
28
28
|
return r;
|
|
29
29
|
if (typeof r != "object")
|
|
@@ -34,252 +34,252 @@ function sn() {
|
|
|
34
34
|
return r.toString();
|
|
35
35
|
var c = "";
|
|
36
36
|
for (var a in r)
|
|
37
|
-
t.call(r, a) && r[a] && (c =
|
|
37
|
+
t.call(r, a) && r[a] && (c = s(c, a));
|
|
38
38
|
return c;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function s(r, c) {
|
|
41
41
|
return c ? r ? r + " " + c : r + c : r;
|
|
42
42
|
}
|
|
43
43
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
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
|
-
for (const
|
|
51
|
-
const
|
|
52
|
-
/^on[A-Z]/.test(
|
|
50
|
+
for (const o in t) {
|
|
51
|
+
const s = e[o], r = t[o];
|
|
52
|
+
/^on[A-Z]/.test(o) ? s && r ? n[o] = (...a) => {
|
|
53
53
|
const u = r(...a);
|
|
54
|
-
return
|
|
55
|
-
} :
|
|
54
|
+
return s(...a), u;
|
|
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
|
-
const
|
|
65
|
-
const r =
|
|
66
|
-
return !n && typeof r == "function" && (n = !0), { ref:
|
|
64
|
+
const o = e.map((s) => {
|
|
65
|
+
const r = He(s, t);
|
|
66
|
+
return !n && typeof r == "function" && (n = !0), { ref: s, cleanup: r };
|
|
67
67
|
});
|
|
68
68
|
if (n)
|
|
69
69
|
return () => {
|
|
70
|
-
for (const { ref:
|
|
71
|
-
typeof r == "function" ? r() :
|
|
70
|
+
for (const { ref: s, cleanup: r } of o)
|
|
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
|
|
85
|
+
}, mn = ({ className: e, customProperties: t, ...n }) => {
|
|
86
|
+
const o = qe({
|
|
87
87
|
allowCustomValues: !0,
|
|
88
88
|
className: e,
|
|
89
89
|
...n
|
|
90
|
-
}),
|
|
90
|
+
}), s = gn({
|
|
91
91
|
customProperties: t,
|
|
92
92
|
...n
|
|
93
93
|
});
|
|
94
|
-
return [
|
|
95
|
-
},
|
|
96
|
-
const
|
|
97
|
-
return `${c}${e}${
|
|
98
|
-
},
|
|
94
|
+
return [o, s];
|
|
95
|
+
}, hn = (e, t, n) => {
|
|
96
|
+
const o = e ? "-" : "", s = n(t), r = s?.startsWith("-"), c = r ? "-" : "", a = r ? s?.substring(1) : s;
|
|
97
|
+
return `${c}${e}${o}${a}`;
|
|
98
|
+
}, qe = ({
|
|
99
99
|
allowCustomValues: e = !1,
|
|
100
100
|
className: t,
|
|
101
101
|
value: n,
|
|
102
|
-
propValues:
|
|
103
|
-
parseValue:
|
|
102
|
+
propValues: o,
|
|
103
|
+
parseValue: s = (r) => r
|
|
104
104
|
}) => {
|
|
105
105
|
if (n) {
|
|
106
|
-
if (typeof n == "string" &&
|
|
107
|
-
return
|
|
106
|
+
if (typeof n == "string" && o.includes(n))
|
|
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,
|
|
115
|
-
parseValue:
|
|
115
|
+
parseValue: o = (s) => s
|
|
116
116
|
}) => {
|
|
117
|
-
let
|
|
117
|
+
let s = {};
|
|
118
118
|
if (!(!t || typeof t == "string" && n.includes(t))) {
|
|
119
|
-
typeof t == "string" && (
|
|
120
|
-
for (const r in
|
|
121
|
-
const c =
|
|
122
|
-
c !== void 0 && (
|
|
119
|
+
typeof t == "string" && (s = Object.fromEntries(e.map((r) => [r, t])));
|
|
120
|
+
for (const r in s) {
|
|
121
|
+
const c = s[r];
|
|
122
|
+
c !== void 0 && (s[r] = o(c));
|
|
123
123
|
}
|
|
124
|
-
return
|
|
124
|
+
return s;
|
|
125
125
|
}
|
|
126
|
-
},
|
|
127
|
-
let n,
|
|
128
|
-
const
|
|
126
|
+
}, bn = (...e) => Object.assign({}, ...e), I = (e, ...t) => {
|
|
127
|
+
let n, o;
|
|
128
|
+
const s = { ...e }, r = bn(...t);
|
|
129
129
|
for (const c in r) {
|
|
130
|
-
let a =
|
|
130
|
+
let a = s[c];
|
|
131
131
|
const u = r[c];
|
|
132
|
-
if (u.default !== void 0 && a === void 0 && (a = u.default), u.type === "enum" && ([u.default, ...u.values].includes(a) || (a = u.default)),
|
|
133
|
-
if (delete
|
|
132
|
+
if (u.default !== void 0 && a === void 0 && (a = u.default), u.type === "enum" && ([u.default, ...u.values].includes(a) || (a = u.default)), s[c] = a, "className" in u && u.className) {
|
|
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
|
-
|
|
152
|
+
o = je(o, f), n = R(n, p);
|
|
153
153
|
continue;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
return
|
|
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
|
-
function
|
|
165
|
-
const a =
|
|
164
|
+
function o(r, c) {
|
|
165
|
+
const a = l.createContext(c), u = n.length;
|
|
166
166
|
n = [...n, c];
|
|
167
|
-
const d = (
|
|
168
|
-
const { scope:
|
|
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 =
|
|
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
|
-
const
|
|
181
|
-
const r = n.map((c) =>
|
|
180
|
+
const s = () => {
|
|
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
|
|
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 = () => {
|
|
195
|
-
const
|
|
196
|
-
useScope:
|
|
197
|
-
scopeName:
|
|
195
|
+
const o = e.map((s) => ({
|
|
196
|
+
useScope: s(),
|
|
197
|
+
scopeName: s.scopeName
|
|
198
198
|
}));
|
|
199
199
|
return function(r) {
|
|
200
|
-
const c =
|
|
201
|
-
const
|
|
202
|
-
return { ...a, ...
|
|
200
|
+
const c = o.reduce((a, { useScope: u, scopeName: d }) => {
|
|
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((
|
|
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
|
-
caller:
|
|
229
|
+
caller: o
|
|
230
230
|
}) {
|
|
231
|
-
const [
|
|
231
|
+
const [s, r, c] = Nn({
|
|
232
232
|
defaultProp: t,
|
|
233
233
|
onChange: n
|
|
234
|
-
}), a = e !== void 0, u = a ? e :
|
|
234
|
+
}), a = e !== void 0, u = a ? e : s;
|
|
235
235
|
if (process.env.NODE_ENV !== "production") {
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
`${
|
|
241
|
-
),
|
|
242
|
-
}, [a,
|
|
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
|
+
}, [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,
|
|
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]),
|
|
264
|
-
|
|
265
|
-
}, [n,
|
|
263
|
+
}, [t]), l.useEffect(() => {
|
|
264
|
+
s.current !== n && (r.current?.(n), s.current = n);
|
|
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
|
-
const
|
|
280
|
-
if (!Array.isArray(
|
|
279
|
+
const o = new ResizeObserver((s) => {
|
|
280
|
+
if (!Array.isArray(s) || !s.length)
|
|
281
281
|
return;
|
|
282
|
-
const r =
|
|
282
|
+
const r = s[0];
|
|
283
283
|
let c, a;
|
|
284
284
|
if ("borderBoxSize" in r) {
|
|
285
285
|
const u = r.borderBoxSize, d = Array.isArray(u) ? u[0] : u;
|
|
@@ -288,24 +288,24 @@ function ve(e) {
|
|
|
288
288
|
c = e.offsetWidth, a = e.offsetHeight;
|
|
289
289
|
n({ width: c, height: a });
|
|
290
290
|
});
|
|
291
|
-
return
|
|
291
|
+
return o.observe(e, { box: "border-box" }), () => o.unobserve(e);
|
|
292
292
|
} else
|
|
293
293
|
n(void 0);
|
|
294
294
|
}, [e]), t;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
const [n,
|
|
298
|
-
return [n,
|
|
296
|
+
function xn(e, t) {
|
|
297
|
+
const [n, o] = l.useReducer((s, r) => t[s][r] ?? s, e);
|
|
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,136 +316,136 @@ function He(e, t, n, s = 0, o = "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
|
-
|
|
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
|
-
}, [n, e, t,
|
|
343
|
+
}, [n, e, t, o, s, r]), { styles: c, isPositioned: u };
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
|
|
347
|
-
const n = (
|
|
348
|
-
const
|
|
349
|
-
!
|
|
345
|
+
function Ze(e, t) {
|
|
346
|
+
l.useEffect(() => {
|
|
347
|
+
const n = (o) => {
|
|
348
|
+
const s = e?.current;
|
|
349
|
+
!s || s.contains(o.target) || t(o);
|
|
350
350
|
};
|
|
351
351
|
return document.addEventListener("mousedown", n), document.addEventListener("touchstart", n), () => {
|
|
352
352
|
document.removeEventListener("mousedown", n), document.removeEventListener("touchstart", n);
|
|
353
353
|
};
|
|
354
354
|
}, [e, t]);
|
|
355
355
|
}
|
|
356
|
-
const
|
|
356
|
+
const Je = ({
|
|
357
357
|
children: e,
|
|
358
358
|
container: t = globalThis?.document?.body
|
|
359
|
-
}) => 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 =
|
|
364
|
-
const { children:
|
|
365
|
-
if (
|
|
366
|
-
const c =
|
|
367
|
-
return a.ref =
|
|
362
|
+
), Sn = (e) => {
|
|
363
|
+
const t = E.forwardRef((n, o) => {
|
|
364
|
+
const { children: s, ...r } = n;
|
|
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 } =
|
|
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 =
|
|
397
|
-
const { asChild: c, ...a } =
|
|
398
|
-
return /* @__PURE__ */
|
|
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
|
+
const { asChild: c, ...a } = s;
|
|
398
|
+
return /* @__PURE__ */ i(c ? n : t, { ...a, ref: r });
|
|
399
399
|
});
|
|
400
|
-
return
|
|
400
|
+
return o.displayName = `Base.${t}`, { ...e, [t]: o };
|
|
401
401
|
}, {});
|
|
402
|
-
function
|
|
403
|
-
const t = `${e}CollectionProvider`, [n,
|
|
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
|
|
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
|
-
|
|
439
|
-
|
|
438
|
+
v,
|
|
439
|
+
o
|
|
440
440
|
];
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
const { remain: t, children: n } = e,
|
|
444
|
-
return typeof n == "function" ||
|
|
442
|
+
function Qe(e) {
|
|
443
|
+
const { remain: t, children: n } = e, 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 =
|
|
466
|
-
if (
|
|
467
|
-
const
|
|
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
|
-
},
|
|
482
|
-
h.target === t && (r.current =
|
|
481
|
+
}, C = (h) => {
|
|
482
|
+
h.target === t && (r.current = ee(o.current));
|
|
483
483
|
};
|
|
484
|
-
return t.addEventListener("animationstart",
|
|
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:
|
|
492
|
-
|
|
490
|
+
isRemain: Dn.includes(a),
|
|
491
|
+
ref: l.useCallback((d) => {
|
|
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,157 +507,157 @@ 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
|
|
522
|
-
const { children: n, className:
|
|
523
|
-
return /* @__PURE__ */
|
|
520
|
+
et.displayName = "VisuallyHidden";
|
|
521
|
+
const Mn = l.forwardRef((e, t) => {
|
|
522
|
+
const { children: n, className: o, ...s } = e;
|
|
523
|
+
return /* @__PURE__ */ i(re, { ...s, ref: t, className: R("bd-reset", o), children: Ke(n) });
|
|
524
524
|
});
|
|
525
|
-
|
|
526
|
-
const
|
|
527
|
-
if (e?.(
|
|
528
|
-
return t?.(
|
|
529
|
-
},
|
|
530
|
-
|
|
531
|
-
[
|
|
532
|
-
), [
|
|
533
|
-
(e, t) => /* @__PURE__ */
|
|
534
|
-
),
|
|
525
|
+
Mn.displayName = "Reset";
|
|
526
|
+
const M = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => function(s) {
|
|
527
|
+
if (e?.(s), n === !1 || !s.defaultPrevented)
|
|
528
|
+
return t?.(s);
|
|
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
|
-
orientation:
|
|
538
|
-
loop:
|
|
537
|
+
orientation: o,
|
|
538
|
+
loop: s = !1,
|
|
539
539
|
currentTabStopId: r,
|
|
540
540
|
defaultCurrentTabStopId: c,
|
|
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
|
-
orientation:
|
|
560
|
-
loop:
|
|
559
|
+
orientation: o,
|
|
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:
|
|
579
|
-
"data-orientation":
|
|
580
|
-
...
|
|
581
|
-
ref:
|
|
578
|
+
tabIndex: b || N === 0 ? -1 : 0,
|
|
579
|
+
"data-orientation": o,
|
|
580
|
+
...p,
|
|
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,
|
|
608
|
-
focusable:
|
|
609
|
-
active:
|
|
608
|
+
focusable: o = !0,
|
|
609
|
+
active: s = !1,
|
|
610
610
|
tabStopId: r,
|
|
611
611
|
children: c,
|
|
612
612
|
...a
|
|
613
|
-
} = e, u =
|
|
614
|
-
return
|
|
615
|
-
if (
|
|
616
|
-
return h(), () =>
|
|
617
|
-
}, [
|
|
618
|
-
|
|
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
|
+
if (o)
|
|
616
|
+
return h(), () => v();
|
|
617
|
+
}, [o, h, v]), /* @__PURE__ */ i(
|
|
618
|
+
Re.ItemOutlet,
|
|
619
619
|
{
|
|
620
620
|
scope: n,
|
|
621
621
|
id: d,
|
|
622
|
-
focusable:
|
|
623
|
-
active:
|
|
624
|
-
children: /* @__PURE__ */
|
|
625
|
-
|
|
622
|
+
focusable: o,
|
|
623
|
+
active: s,
|
|
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
|
-
|
|
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 =
|
|
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(o) {
|
|
|
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
|
-
for (const
|
|
678
|
-
if (
|
|
677
|
+
for (const o of e)
|
|
678
|
+
if (o === n || (o.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
681
|
-
return e.map((n,
|
|
680
|
+
function Un(e, t) {
|
|
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
|
-
...we,
|
|
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
|
-
className:
|
|
1023
|
-
asChild:
|
|
1022
|
+
className: o,
|
|
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:
|
|
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:
|
|
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
|
-
if (!
|
|
1079
|
-
const c = /* @__PURE__ */
|
|
1080
|
-
return
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
/* @__PURE__ */
|
|
1078
|
+
if (!s) return o;
|
|
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 =
|
|
1136
|
-
className:
|
|
1134
|
+
}, xe = l.forwardRef((e, t) => {
|
|
1135
|
+
const { variant: n = Ne.variant.default, size: o = Ne.size.default } = e, {
|
|
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
|
|
1167
|
-
const { color: n = "currentColor", ...
|
|
1168
|
-
return /* @__PURE__ */
|
|
1165
|
+
xe.displayName = "Button";
|
|
1166
|
+
const ie = l.forwardRef((e, t) => {
|
|
1167
|
+
const { color: n = "currentColor", ...o } = e;
|
|
1168
|
+
return /* @__PURE__ */ i(
|
|
1169
1169
|
"svg",
|
|
1170
1170
|
{
|
|
1171
1171
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1173,9 +1173,9 @@ const xe = i.forwardRef((e, t) => {
|
|
|
1173
1173
|
height: "7",
|
|
1174
1174
|
viewBox: "0 0 10 7",
|
|
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 xe = i.forwardRef((e, t) => {
|
|
|
1187
1187
|
)
|
|
1188
1188
|
}
|
|
1189
1189
|
);
|
|
1190
|
-
}),
|
|
1191
|
-
const { color: n = "currentColor", ...
|
|
1192
|
-
return /* @__PURE__ */
|
|
1190
|
+
}), Po = l.forwardRef((e, t) => {
|
|
1191
|
+
const { color: n = "currentColor", ...o } = e;
|
|
1192
|
+
return /* @__PURE__ */ i(
|
|
1193
1193
|
"svg",
|
|
1194
1194
|
{
|
|
1195
1195
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1197,9 +1197,9 @@ const xe = i.forwardRef((e, t) => {
|
|
|
1197
1197
|
height: "9",
|
|
1198
1198
|
viewBox: "0 0 9 9",
|
|
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,19 +1209,19 @@ const xe = i.forwardRef((e, t) => {
|
|
|
1209
1209
|
)
|
|
1210
1210
|
}
|
|
1211
1211
|
);
|
|
1212
|
-
}),
|
|
1213
|
-
const { color: n = "currentColor", width:
|
|
1214
|
-
return /* @__PURE__ */
|
|
1212
|
+
}), Io = l.forwardRef((e, t) => {
|
|
1213
|
+
const { color: n = "currentColor", width: o = 20, height: s = 20, ...r } = e;
|
|
1214
|
+
return /* @__PURE__ */ i(
|
|
1215
1215
|
"svg",
|
|
1216
1216
|
{
|
|
1217
1217
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1218
|
-
width:
|
|
1219
|
-
height:
|
|
1218
|
+
width: o,
|
|
1219
|
+
height: s,
|
|
1220
1220
|
viewBox: "4 2 16 16",
|
|
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,19 +1230,19 @@ const xe = i.forwardRef((e, t) => {
|
|
|
1230
1230
|
)
|
|
1231
1231
|
}
|
|
1232
1232
|
);
|
|
1233
|
-
}),
|
|
1234
|
-
const { color: n = "currentColor", width:
|
|
1235
|
-
return /* @__PURE__ */
|
|
1233
|
+
}), Eo = l.forwardRef((e, t) => {
|
|
1234
|
+
const { color: n = "currentColor", width: o = 20, height: s = 20, ...r } = e;
|
|
1235
|
+
return /* @__PURE__ */ i(
|
|
1236
1236
|
"svg",
|
|
1237
1237
|
{
|
|
1238
1238
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1239
|
-
width:
|
|
1240
|
-
height:
|
|
1239
|
+
width: o,
|
|
1240
|
+
height: s,
|
|
1241
1241
|
viewBox: "4 2 16 16",
|
|
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,19 +1251,19 @@ const xe = i.forwardRef((e, t) => {
|
|
|
1251
1251
|
)
|
|
1252
1252
|
}
|
|
1253
1253
|
);
|
|
1254
|
-
}),
|
|
1255
|
-
const { color: n = "currentColor", width:
|
|
1256
|
-
return /* @__PURE__ */
|
|
1254
|
+
}), Do = l.forwardRef((e, t) => {
|
|
1255
|
+
const { color: n = "currentColor", width: o = 20, height: s = 20, ...r } = e;
|
|
1256
|
+
return /* @__PURE__ */ i(
|
|
1257
1257
|
"svg",
|
|
1258
1258
|
{
|
|
1259
1259
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1260
|
-
width:
|
|
1261
|
-
height:
|
|
1260
|
+
width: o,
|
|
1261
|
+
height: s,
|
|
1262
1262
|
viewBox: "4 2 16 16",
|
|
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,140 +1272,140 @@ const xe = 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,
|
|
1283
|
-
defaultChecked:
|
|
1284
|
-
required:
|
|
1283
|
+
defaultChecked: o,
|
|
1284
|
+
required: s,
|
|
1285
1285
|
name: r,
|
|
1286
1286
|
form: c,
|
|
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, [
|
|
1292
|
+
__internal: f
|
|
1293
|
+
} = e, [C, h] = B({
|
|
1294
1294
|
prop: n,
|
|
1295
|
-
defaultProp:
|
|
1296
|
-
onChange:
|
|
1297
|
-
caller:
|
|
1298
|
-
}), [
|
|
1299
|
-
checked:
|
|
1295
|
+
defaultProp: o ?? !1,
|
|
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
|
+
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
|
-
required:
|
|
1309
|
-
defaultChecked:
|
|
1308
|
+
required: s,
|
|
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,
|
|
1327
1327
|
onClick: n,
|
|
1328
|
-
...
|
|
1329
|
-
},
|
|
1328
|
+
...o
|
|
1329
|
+
}, s) => {
|
|
1330
1330
|
const {
|
|
1331
1331
|
control: r,
|
|
1332
1332
|
value: c,
|
|
1333
1333
|
disabled: a,
|
|
1334
1334
|
checked: u,
|
|
1335
1335
|
required: d,
|
|
1336
|
-
setControl:
|
|
1337
|
-
setChecked:
|
|
1338
|
-
hasConsumerStoppedPropagationRef:
|
|
1336
|
+
setControl: p,
|
|
1337
|
+
setChecked: f,
|
|
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
|
-
...
|
|
1360
|
-
ref:
|
|
1361
|
-
onKeyDown:
|
|
1359
|
+
...o,
|
|
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,
|
|
1376
|
-
name:
|
|
1377
|
-
checked:
|
|
1376
|
+
name: o,
|
|
1377
|
+
checked: s,
|
|
1378
1378
|
defaultChecked: r,
|
|
1379
1379
|
required: c,
|
|
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
|
-
checked:
|
|
1390
|
+
checked: s,
|
|
1391
1391
|
defaultChecked: r,
|
|
1392
1392
|
required: c,
|
|
1393
|
-
name:
|
|
1394
|
-
form:
|
|
1393
|
+
name: o,
|
|
1394
|
+
form: p,
|
|
1395
1395
|
disabled: a,
|
|
1396
1396
|
value: u,
|
|
1397
1397
|
onCheckedChange: d,
|
|
1398
|
-
__internal: ({ isFormControl:
|
|
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
|
-
|
|
1408
|
-
|
|
1407
|
+
C && /* @__PURE__ */ i(
|
|
1408
|
+
mt,
|
|
1409
1409
|
{
|
|
1410
1410
|
__scopeCheckbox: n
|
|
1411
1411
|
}
|
|
@@ -1414,36 +1414,36 @@ 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
|
-
control:
|
|
1421
|
-
checked:
|
|
1420
|
+
control: o,
|
|
1421
|
+
checked: s,
|
|
1422
1422
|
defaultChecked: r,
|
|
1423
1423
|
required: c,
|
|
1424
1424
|
disabled: a,
|
|
1425
1425
|
name: u,
|
|
1426
1426
|
value: d,
|
|
1427
|
-
form:
|
|
1428
|
-
bubbleInput:
|
|
1429
|
-
setBubbleInput:
|
|
1427
|
+
form: p,
|
|
1428
|
+
bubbleInput: f,
|
|
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,103 +1469,529 @@ const at = i.forwardRef(
|
|
|
1469
1469
|
);
|
|
1470
1470
|
}
|
|
1471
1471
|
);
|
|
1472
|
-
|
|
1473
|
-
const
|
|
1474
|
-
const { __scopeCheckbox: n, forceMount:
|
|
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,
|
|
1482
1482
|
style: { pointerEvents: "none", ...e.style }
|
|
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
|
-
checked:
|
|
1500
|
-
defaultChecked:
|
|
1499
|
+
checked: o,
|
|
1500
|
+
defaultChecked: s = !1,
|
|
1501
1501
|
onCheckedChange: r,
|
|
1502
1502
|
...c
|
|
1503
|
-
} =
|
|
1504
|
-
prop:
|
|
1505
|
-
defaultProp:
|
|
1503
|
+
} = I(e, O), [a, u] = B({
|
|
1504
|
+
prop: o,
|
|
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
|
-
defaultChecked:
|
|
1512
|
+
defaultChecked: s,
|
|
1513
1513
|
checked: a,
|
|
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,
|
|
1533
|
-
name:
|
|
1534
|
-
defaultValue:
|
|
1959
|
+
name: o,
|
|
1960
|
+
defaultValue: s,
|
|
1535
1961
|
value: r,
|
|
1536
1962
|
required: c = !1,
|
|
1537
1963
|
disabled: a = !1,
|
|
1538
1964
|
loop: u = !0,
|
|
1539
1965
|
orientation: d,
|
|
1540
|
-
onValueChange:
|
|
1541
|
-
...
|
|
1542
|
-
} = e,
|
|
1966
|
+
onValueChange: p,
|
|
1967
|
+
...f
|
|
1968
|
+
} = e, C = xt(n), [h = [], v] = B({
|
|
1543
1969
|
prop: r,
|
|
1544
|
-
defaultProp:
|
|
1545
|
-
onChange:
|
|
1546
|
-
}),
|
|
1547
|
-
(m) =>
|
|
1548
|
-
[
|
|
1549
|
-
), g =
|
|
1550
|
-
(m) =>
|
|
1551
|
-
[
|
|
1970
|
+
defaultProp: s || [],
|
|
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
|
-
name:
|
|
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,163 +1999,163 @@ const Z = {
|
|
|
1573
1999
|
);
|
|
1574
2000
|
}
|
|
1575
2001
|
);
|
|
1576
|
-
|
|
1577
|
-
const
|
|
1578
|
-
const { __scopeCheckboxGroup: n, disabled:
|
|
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
|
-
...
|
|
1595
|
-
ref:
|
|
1596
|
-
onCheckedChange: (
|
|
1597
|
-
|
|
2020
|
+
...s,
|
|
2021
|
+
ref: p,
|
|
2022
|
+
onCheckedChange: (C) => {
|
|
2023
|
+
C ? r.onItemCheck(e.value) : r.onItemUnCheck(e.value);
|
|
1598
2024
|
}
|
|
1599
2025
|
}
|
|
1600
2026
|
)
|
|
1601
2027
|
}
|
|
1602
2028
|
);
|
|
1603
2029
|
});
|
|
1604
|
-
|
|
1605
|
-
const
|
|
1606
|
-
const { __scopeCheckboxGroup: n, ...
|
|
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:
|
|
1617
|
-
...
|
|
1618
|
-
} = e, { __scopeCheckboxGroup: r, className: c, ...a } =
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
), u =
|
|
1622
|
-
return /* @__PURE__ */
|
|
1623
|
-
|
|
2041
|
+
size: n = te.size.default,
|
|
2042
|
+
variant: o = te.variant.default,
|
|
2043
|
+
...s
|
|
2044
|
+
} = e, { __scopeCheckboxGroup: r, className: c, ...a } = I(
|
|
2045
|
+
s,
|
|
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:
|
|
1637
|
-
return
|
|
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
|
-
|
|
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,
|
|
1661
2087
|
ref: t,
|
|
1662
|
-
className:
|
|
2088
|
+
className: s,
|
|
1663
2089
|
style: r
|
|
1664
2090
|
}
|
|
1665
2091
|
);
|
|
1666
2092
|
}
|
|
1667
2093
|
);
|
|
1668
|
-
|
|
1669
|
-
const
|
|
1670
|
-
const
|
|
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,
|
|
1698
|
-
name:
|
|
1699
|
-
checked:
|
|
2124
|
+
name: o,
|
|
2125
|
+
checked: s = !1,
|
|
1700
2126
|
required: r,
|
|
1701
2127
|
disabled: c,
|
|
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
|
-
"aria-checked":
|
|
1714
|
-
"data-state":
|
|
2139
|
+
"aria-checked": s,
|
|
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
|
-
|
|
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: !
|
|
1730
|
-
name:
|
|
2154
|
+
control: f,
|
|
2155
|
+
bubbles: !v.current,
|
|
2156
|
+
name: o,
|
|
1731
2157
|
value: a,
|
|
1732
|
-
checked:
|
|
2158
|
+
checked: s,
|
|
1733
2159
|
required: r,
|
|
1734
2160
|
disabled: c,
|
|
1735
2161
|
form: d,
|
|
@@ -1739,47 +2165,47 @@ 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:
|
|
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
|
|
1753
2179
|
}
|
|
1754
2180
|
) });
|
|
1755
2181
|
}
|
|
1756
2182
|
);
|
|
1757
|
-
|
|
1758
|
-
const
|
|
1759
|
-
({ control: e, checked: t, bubbles: n = !0, ...
|
|
1760
|
-
const r =
|
|
1761
|
-
return
|
|
2183
|
+
Ot.displayName = At;
|
|
2184
|
+
const os = "RadioBubbleInput", Ft = l.forwardRef(
|
|
2185
|
+
({ control: e, checked: t, bubbles: n = !0, ...o }, s) => {
|
|
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
|
-
if (a !== t &&
|
|
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,
|
|
1777
2203
|
defaultChecked: t,
|
|
1778
|
-
...
|
|
2204
|
+
...o,
|
|
1779
2205
|
tabIndex: -1,
|
|
1780
2206
|
ref: c,
|
|
1781
2207
|
style: {
|
|
1782
|
-
...
|
|
2208
|
+
...o.style,
|
|
1783
2209
|
...u,
|
|
1784
2210
|
position: "absolute",
|
|
1785
2211
|
pointerEvents: "none",
|
|
@@ -1790,74 +2216,74 @@ 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
|
-
checked:
|
|
1801
|
-
defaultChecked:
|
|
2226
|
+
checked: o,
|
|
2227
|
+
defaultChecked: s = !1,
|
|
1802
2228
|
onCheck: r,
|
|
1803
2229
|
...c
|
|
1804
|
-
} =
|
|
1805
|
-
prop:
|
|
1806
|
-
defaultProp:
|
|
2230
|
+
} = I(e, Qo), [a, u] = B({
|
|
2231
|
+
prop: o,
|
|
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
|
-
defaultChecked:
|
|
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,
|
|
1829
|
-
name:
|
|
1830
|
-
defaultValue:
|
|
2255
|
+
name: o,
|
|
2256
|
+
defaultValue: s,
|
|
1831
2257
|
value: r,
|
|
1832
2258
|
required: c = !1,
|
|
1833
2259
|
disabled: a = !1,
|
|
1834
2260
|
orientation: u,
|
|
1835
2261
|
loop: d = !0,
|
|
1836
|
-
onValueChange:
|
|
1837
|
-
...
|
|
1838
|
-
} = e,
|
|
2262
|
+
onValueChange: p,
|
|
2263
|
+
...f
|
|
2264
|
+
} = e, C = Vt(n), [h, v] = B({
|
|
1839
2265
|
prop: r,
|
|
1840
|
-
defaultProp:
|
|
1841
|
-
onChange:
|
|
1842
|
-
caller:
|
|
2266
|
+
defaultProp: s ?? null,
|
|
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
|
-
name:
|
|
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,40 +2291,40 @@ 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:
|
|
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
|
-
...
|
|
1895
|
-
ref:
|
|
1896
|
-
onCheck: () => r.onValueChange(
|
|
1897
|
-
onKeyDown:
|
|
2320
|
+
...s,
|
|
2321
|
+
ref: p,
|
|
2322
|
+
onCheck: () => r.onValueChange(s.value),
|
|
2323
|
+
onKeyDown: M((h) => {
|
|
1898
2324
|
h.key === "Enter" && h.preventDefault();
|
|
1899
2325
|
}),
|
|
1900
|
-
onFocus:
|
|
1901
|
-
|
|
2326
|
+
onFocus: M(s.onFocus, () => {
|
|
2327
|
+
C.current && d.current?.click();
|
|
1902
2328
|
})
|
|
1903
2329
|
}
|
|
1904
2330
|
)
|
|
@@ -1906,430 +2332,177 @@ const Tt = "RadioGroupItem", _t = i.forwardRef(
|
|
|
1906
2332
|
);
|
|
1907
2333
|
}
|
|
1908
2334
|
);
|
|
1909
|
-
|
|
1910
|
-
const
|
|
1911
|
-
const { __scopeRadioGroup: n, ...
|
|
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
|
-
},
|
|
1926
|
-
const { __scopeRadioGroup:
|
|
2351
|
+
}, o) => {
|
|
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
|
-
ref:
|
|
1936
|
-
className:
|
|
2361
|
+
ref: o,
|
|
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:
|
|
1945
|
-
return
|
|
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
|
-
|
|
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,
|
|
1969
2395
|
ref: t,
|
|
1970
|
-
className:
|
|
2396
|
+
className: s,
|
|
1971
2397
|
style: r
|
|
1972
2398
|
}
|
|
1973
2399
|
);
|
|
1974
2400
|
}
|
|
1975
2401
|
);
|
|
1976
|
-
|
|
1977
|
-
const
|
|
1978
|
-
const
|
|
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:
|
|
2412
|
+
className: R("bd-reset", "bd-BaseRadioRoot", "bd-RadioRoot", r)
|
|
1987
2413
|
}
|
|
1988
2414
|
);
|
|
1989
2415
|
});
|
|
1990
|
-
|
|
1991
|
-
const
|
|
1992
|
-
Root:
|
|
1993
|
-
Item:
|
|
1994
|
-
},
|
|
1995
|
-
({ children: e, maxHeight: t, className: n, style: s, onScroll: o, onScrollBottom: r, ...c }, a) => /* @__PURE__ */ l(
|
|
1996
|
-
"div",
|
|
1997
|
-
{
|
|
1998
|
-
ref: a,
|
|
1999
|
-
onScroll: (d) => {
|
|
2000
|
-
if (o && o(d), r) {
|
|
2001
|
-
const { scrollTop: f, scrollHeight: p, clientHeight: b } = d.currentTarget;
|
|
2002
|
-
p - f <= b + 10 && r();
|
|
2003
|
-
}
|
|
2004
|
-
},
|
|
2005
|
-
className: `bd-ScrollArea ${n || ""}`,
|
|
2006
|
-
style: { ...s, 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
|
-
...we,
|
|
2017
|
-
...O
|
|
2018
|
-
}, rs = {
|
|
2019
|
-
gap: Ne.gap,
|
|
2020
|
-
px: L.px,
|
|
2021
|
-
pl: L.pl,
|
|
2022
|
-
pr: L.pr
|
|
2023
|
-
}, Te = {
|
|
2024
|
-
...ss,
|
|
2025
|
-
...rs
|
|
2026
|
-
}, ee = "SelectBox", [as] = A(ee), [cs, re] = as(ee), Gt = ({
|
|
2027
|
-
__scopeSelect: e,
|
|
2028
|
-
value: t,
|
|
2029
|
-
defaultValue: n,
|
|
2030
|
-
onValueChange: s,
|
|
2031
|
-
open: o,
|
|
2032
|
-
defaultOpen: r,
|
|
2033
|
-
onOpenChange: c,
|
|
2034
|
-
variant: a = "classic",
|
|
2035
|
-
size: u = "2",
|
|
2036
|
-
weight: d = "regular",
|
|
2037
|
-
children: f
|
|
2038
|
-
}) => {
|
|
2039
|
-
const [p, b] = _({
|
|
2040
|
-
prop: t,
|
|
2041
|
-
defaultProp: n ?? "",
|
|
2042
|
-
onChange: s,
|
|
2043
|
-
caller: ee
|
|
2044
|
-
}), [h, C] = _({
|
|
2045
|
-
prop: o,
|
|
2046
|
-
defaultProp: r ?? !1,
|
|
2047
|
-
onChange: c,
|
|
2048
|
-
caller: `${ee}.Open`
|
|
2049
|
-
}), v = i.useRef(null), g = Ue();
|
|
2050
|
-
return /* @__PURE__ */ l(
|
|
2051
|
-
cs,
|
|
2052
|
-
{
|
|
2053
|
-
scope: e,
|
|
2054
|
-
value: p,
|
|
2055
|
-
onValueChange: b,
|
|
2056
|
-
open: h,
|
|
2057
|
-
onOpenChange: C,
|
|
2058
|
-
triggerRef: v,
|
|
2059
|
-
contentId: g,
|
|
2060
|
-
variant: a,
|
|
2061
|
-
size: u,
|
|
2062
|
-
weight: d,
|
|
2063
|
-
children: f
|
|
2064
|
-
}
|
|
2065
|
-
);
|
|
2066
|
-
}, Vt = "SelectBoxTrigger", _e = i.forwardRef(
|
|
2067
|
-
(e, t) => {
|
|
2068
|
-
const { __scopeSelect: n, children: s, onClick: o, onKeyDown: r, ...c } = e, a = re(Vt, n), u = D(t, a.triggerRef), { className: d, style: f, ...p } = P(c, Te), b = !a.value || a.value === "";
|
|
2069
|
-
return /* @__PURE__ */ l(
|
|
2070
|
-
k.button,
|
|
2071
|
-
{
|
|
2072
|
-
type: "button",
|
|
2073
|
-
role: "combobox",
|
|
2074
|
-
"aria-expanded": a.open,
|
|
2075
|
-
"data-placeholder": b ? "" : void 0,
|
|
2076
|
-
className: `bd-SelectBoxTrigger ${d || ""}`,
|
|
2077
|
-
style: f,
|
|
2078
|
-
...p,
|
|
2079
|
-
ref: u,
|
|
2080
|
-
onClick: (h) => {
|
|
2081
|
-
a.onOpenChange(!a.open), o?.(h);
|
|
2082
|
-
},
|
|
2083
|
-
onKeyDown: (h) => {
|
|
2084
|
-
!a.open && (h.key === "ArrowDown" || h.key === "Enter" || h.key === " ") && (h.preventDefault(), a.onOpenChange(!0)), r?.(h);
|
|
2085
|
-
},
|
|
2086
|
-
children: s
|
|
2087
|
-
}
|
|
2088
|
-
);
|
|
2089
|
-
}
|
|
2090
|
-
);
|
|
2091
|
-
_e.displayName = Vt;
|
|
2092
|
-
const $t = "SelectBoxContent", Be = i.forwardRef(({ __scopeSelect: e, children: t, className: n, style: s, onKeyDown: o, ...r }, c) => {
|
|
2093
|
-
const a = re($t, e), u = i.useRef(null), d = D(c, u);
|
|
2094
|
-
Ye(u, (v) => {
|
|
2095
|
-
a.triggerRef.current?.contains(v.target) || a.open && a.onOpenChange(!1);
|
|
2096
|
-
});
|
|
2097
|
-
const f = a.variant === "rounded" ? 8 : 0, { styles: p, isPositioned: b } = He(
|
|
2098
|
-
a.triggerRef,
|
|
2099
|
-
u,
|
|
2100
|
-
a.open,
|
|
2101
|
-
f
|
|
2102
|
-
);
|
|
2103
|
-
i.useEffect(() => {
|
|
2104
|
-
a.open && u.current && requestAnimationFrame(() => {
|
|
2105
|
-
if (!u.current) return;
|
|
2106
|
-
const v = Array.from(
|
|
2107
|
-
u.current.querySelectorAll('[role="option"]')
|
|
2108
|
-
), g = v.find((m) => m.getAttribute("aria-selected") === "true");
|
|
2109
|
-
g ? g.focus() : v.length > 0 && v[0].focus();
|
|
2110
|
-
});
|
|
2111
|
-
}, [a.open]);
|
|
2112
|
-
const h = (v) => {
|
|
2113
|
-
const g = Array.from(
|
|
2114
|
-
u.current?.querySelectorAll('[role="option"]') || []
|
|
2115
|
-
), m = g.indexOf(document.activeElement);
|
|
2116
|
-
switch (v.key) {
|
|
2117
|
-
case "ArrowDown": {
|
|
2118
|
-
v.preventDefault();
|
|
2119
|
-
const y = m < g.length - 1 ? m + 1 : 0;
|
|
2120
|
-
g[y]?.focus();
|
|
2121
|
-
break;
|
|
2122
|
-
}
|
|
2123
|
-
case "ArrowUp": {
|
|
2124
|
-
v.preventDefault();
|
|
2125
|
-
const y = m > 0 ? m - 1 : g.length - 1;
|
|
2126
|
-
g[y]?.focus();
|
|
2127
|
-
break;
|
|
2128
|
-
}
|
|
2129
|
-
case "Enter":
|
|
2130
|
-
case " ":
|
|
2131
|
-
v.preventDefault(), document.activeElement?.click();
|
|
2132
|
-
break;
|
|
2133
|
-
case "Escape":
|
|
2134
|
-
v.preventDefault(), a.onOpenChange(!1), a.triggerRef.current?.focus();
|
|
2135
|
-
break;
|
|
2136
|
-
case "Tab":
|
|
2137
|
-
a.onOpenChange(!1);
|
|
2138
|
-
break;
|
|
2139
|
-
}
|
|
2140
|
-
o?.(v);
|
|
2141
|
-
};
|
|
2142
|
-
if (!a.open) return null;
|
|
2143
|
-
const C = /* @__PURE__ */ l(
|
|
2144
|
-
k.div,
|
|
2145
|
-
{
|
|
2146
|
-
id: a.contentId,
|
|
2147
|
-
role: "listbox",
|
|
2148
|
-
tabIndex: -1,
|
|
2149
|
-
onKeyDown: h,
|
|
2150
|
-
className: `bd-SelectBoxContent bd-variant-${a.variant} ${n || ""}`,
|
|
2151
|
-
...r,
|
|
2152
|
-
ref: d,
|
|
2153
|
-
style: {
|
|
2154
|
-
...p,
|
|
2155
|
-
...s,
|
|
2156
|
-
transition: b ? "opacity 0.2s ease, transform 0.2s ease" : "none",
|
|
2157
|
-
overflow: "hidden"
|
|
2158
|
-
},
|
|
2159
|
-
children: t
|
|
2160
|
-
}
|
|
2161
|
-
);
|
|
2162
|
-
return /* @__PURE__ */ l(je, { children: C });
|
|
2163
|
-
});
|
|
2164
|
-
Be.displayName = $t;
|
|
2165
|
-
const Lt = "SelectBoxItem", Ae = i.forwardRef(
|
|
2166
|
-
({ __scopeSelect: e, value: t, onClick: n, className: s, children: o, ...r }, c) => {
|
|
2167
|
-
const a = re(Lt, e), u = a.value === t, { className: d, style: f } = P(
|
|
2168
|
-
{ size: a.size, weight: a.weight },
|
|
2169
|
-
Te
|
|
2170
|
-
);
|
|
2171
|
-
return /* @__PURE__ */ l(
|
|
2172
|
-
k.div,
|
|
2173
|
-
{
|
|
2174
|
-
role: "option",
|
|
2175
|
-
tabIndex: -1,
|
|
2176
|
-
"aria-selected": u,
|
|
2177
|
-
"data-state": u ? "checked" : "unchecked",
|
|
2178
|
-
className: `bd-SelectBoxItem bd-variant-${a.variant} ${d || ""} ${s || ""}`,
|
|
2179
|
-
style: f,
|
|
2180
|
-
...r,
|
|
2181
|
-
ref: c,
|
|
2182
|
-
onClick: (p) => {
|
|
2183
|
-
const b = typeof o == "string" ? o : t;
|
|
2184
|
-
a.onValueChange(b), a.onOpenChange(!1), a.triggerRef.current?.focus(), n?.(p);
|
|
2185
|
-
},
|
|
2186
|
-
children: o
|
|
2187
|
-
}
|
|
2188
|
-
);
|
|
2189
|
-
}
|
|
2190
|
-
);
|
|
2191
|
-
Ae.displayName = Lt;
|
|
2192
|
-
const is = "SelectBoxValue", zt = i.forwardRef(
|
|
2193
|
-
({ __scopeSelect: e, className: t, children: n, placeholder: s, ...o }, r) => {
|
|
2194
|
-
const c = re(is, e), a = c.value ? c.value : n || s, { className: u, style: d } = P(
|
|
2195
|
-
{ weight: c.weight },
|
|
2196
|
-
Te
|
|
2197
|
-
);
|
|
2198
|
-
return /* @__PURE__ */ l(
|
|
2199
|
-
k.span,
|
|
2200
|
-
{
|
|
2201
|
-
className: `bd-SelectBoxValue ${u || ""} ${t || ""}`,
|
|
2202
|
-
style: d,
|
|
2203
|
-
...o,
|
|
2204
|
-
ref: r,
|
|
2205
|
-
children: a
|
|
2206
|
-
}
|
|
2207
|
-
);
|
|
2208
|
-
}
|
|
2209
|
-
), ls = "SelectBoxSlot", Me = i.forwardRef(
|
|
2210
|
-
({ __scopeSelect: e, className: t, side: n = "right", "data-chevron": s, children: o, ...r }, c) => /* @__PURE__ */ l(
|
|
2211
|
-
k.div,
|
|
2212
|
-
{
|
|
2213
|
-
"aria-hidden": "true",
|
|
2214
|
-
"data-side": n,
|
|
2215
|
-
"data-chevron": s ? "true" : void 0,
|
|
2216
|
-
className: `bd-SelectBoxSlot ${t || ""}`,
|
|
2217
|
-
...r,
|
|
2218
|
-
ref: c,
|
|
2219
|
-
children: o || /* @__PURE__ */ l(xo, {})
|
|
2220
|
-
}
|
|
2221
|
-
)
|
|
2222
|
-
);
|
|
2223
|
-
Me.displayName = ls;
|
|
2224
|
-
const us = ({
|
|
2225
|
-
options: e,
|
|
2226
|
-
placeholder: t = "선택하세요",
|
|
2227
|
-
size: n = "2",
|
|
2228
|
-
weight: s = "regular",
|
|
2229
|
-
variant: o = "classic",
|
|
2230
|
-
disabled: r = !1,
|
|
2231
|
-
maxHeight: c,
|
|
2232
|
-
onScrollBottom: a,
|
|
2233
|
-
...u
|
|
2234
|
-
}) => /* @__PURE__ */ S(Gt, { ...u, variant: o, size: n, weight: s, children: [
|
|
2235
|
-
/* @__PURE__ */ S(_e, { size: n, variant: o, disabled: r, children: [
|
|
2236
|
-
/* @__PURE__ */ l(zt, { placeholder: t }),
|
|
2237
|
-
/* @__PURE__ */ l(Me, { "data-chevron": !0 })
|
|
2238
|
-
] }),
|
|
2239
|
-
/* @__PURE__ */ l(Be, { children: /* @__PURE__ */ l(Ft, { maxHeight: c, onScrollBottom: a, children: e.map((d) => /* @__PURE__ */ l(Ae, { value: d.value, children: d.label }, d.value)) }) })
|
|
2240
|
-
] }), $s = Object.assign(us, {
|
|
2241
|
-
Root: Gt,
|
|
2242
|
-
Trigger: _e,
|
|
2243
|
-
Content: Be,
|
|
2244
|
-
Item: Ae,
|
|
2245
|
-
Value: zt,
|
|
2246
|
-
Slot: Me
|
|
2247
|
-
}), 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(
|
|
2248
2421
|
(e, t) => {
|
|
2249
2422
|
const {
|
|
2250
2423
|
__scopeSwitch: n,
|
|
2251
|
-
name:
|
|
2252
|
-
checked:
|
|
2424
|
+
name: o,
|
|
2425
|
+
checked: s,
|
|
2253
2426
|
defaultChecked: r,
|
|
2254
2427
|
required: c,
|
|
2255
2428
|
disabled: a,
|
|
2256
2429
|
value: u = "on",
|
|
2257
2430
|
onCheckedChange: d,
|
|
2258
|
-
form:
|
|
2259
|
-
...
|
|
2260
|
-
} = e, [
|
|
2261
|
-
prop:
|
|
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({
|
|
2434
|
+
prop: s,
|
|
2262
2435
|
defaultProp: r ?? !1,
|
|
2263
2436
|
onChange: d,
|
|
2264
|
-
caller:
|
|
2437
|
+
caller: ge
|
|
2265
2438
|
});
|
|
2266
|
-
return /* @__PURE__ */
|
|
2267
|
-
/* @__PURE__ */
|
|
2268
|
-
|
|
2439
|
+
return /* @__PURE__ */ k(gs, { scope: n, checked: m, disabled: a, children: [
|
|
2440
|
+
/* @__PURE__ */ i(
|
|
2441
|
+
P.button,
|
|
2269
2442
|
{
|
|
2270
2443
|
type: "button",
|
|
2271
2444
|
role: "switch",
|
|
2272
2445
|
"aria-checked": m,
|
|
2273
2446
|
"aria-required": c,
|
|
2274
|
-
"data-state":
|
|
2447
|
+
"data-state": Qt(m),
|
|
2275
2448
|
"data-disabled": a ? "" : void 0,
|
|
2276
2449
|
disabled: a,
|
|
2277
2450
|
value: u,
|
|
2278
|
-
...
|
|
2279
|
-
ref:
|
|
2280
|
-
onClick:
|
|
2281
|
-
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());
|
|
2282
2455
|
})
|
|
2283
2456
|
}
|
|
2284
2457
|
),
|
|
2285
|
-
g && /* @__PURE__ */
|
|
2286
|
-
|
|
2458
|
+
g && /* @__PURE__ */ i(
|
|
2459
|
+
Jt,
|
|
2287
2460
|
{
|
|
2288
|
-
control:
|
|
2289
|
-
bubbles: !
|
|
2290
|
-
name:
|
|
2461
|
+
control: C,
|
|
2462
|
+
bubbles: !b.current,
|
|
2463
|
+
name: o,
|
|
2291
2464
|
value: u,
|
|
2292
2465
|
checked: m,
|
|
2293
2466
|
required: c,
|
|
2294
2467
|
disabled: a,
|
|
2295
|
-
form:
|
|
2468
|
+
form: p,
|
|
2296
2469
|
style: { transform: "translateX(-100%)" }
|
|
2297
2470
|
}
|
|
2298
2471
|
)
|
|
2299
2472
|
] });
|
|
2300
2473
|
}
|
|
2301
2474
|
);
|
|
2302
|
-
|
|
2303
|
-
const
|
|
2475
|
+
Wt.displayName = ge;
|
|
2476
|
+
const Xt = "SwitchThumb", Zt = l.forwardRef(
|
|
2304
2477
|
(e, t) => {
|
|
2305
|
-
const { __scopeSwitch: n, ...
|
|
2306
|
-
return /* @__PURE__ */
|
|
2307
|
-
|
|
2478
|
+
const { __scopeSwitch: n, ...o } = e, s = bs(Xt, n);
|
|
2479
|
+
return /* @__PURE__ */ i(
|
|
2480
|
+
P.span,
|
|
2308
2481
|
{
|
|
2309
|
-
"data-state":
|
|
2310
|
-
"data-disabled":
|
|
2311
|
-
...
|
|
2482
|
+
"data-state": Qt(s.checked),
|
|
2483
|
+
"data-disabled": s.disabled ? "" : void 0,
|
|
2484
|
+
...o,
|
|
2312
2485
|
ref: t
|
|
2313
2486
|
}
|
|
2314
2487
|
);
|
|
2315
2488
|
}
|
|
2316
2489
|
);
|
|
2317
|
-
|
|
2318
|
-
const
|
|
2490
|
+
Zt.displayName = Xt;
|
|
2491
|
+
const Cs = "SwitchBubbleInput", Jt = l.forwardRef(
|
|
2319
2492
|
(e, t) => {
|
|
2320
|
-
const { checked: n, control:
|
|
2321
|
-
return
|
|
2322
|
-
const
|
|
2323
|
-
if (!
|
|
2324
|
-
const
|
|
2325
|
-
|
|
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,
|
|
2326
2499
|
"checked"
|
|
2327
2500
|
).set;
|
|
2328
2501
|
if (u !== n && h) {
|
|
2329
|
-
const
|
|
2330
|
-
h.call(
|
|
2502
|
+
const v = new Event("click", { bubbles: s });
|
|
2503
|
+
h.call(p, n), p.dispatchEvent(v);
|
|
2331
2504
|
}
|
|
2332
|
-
}, [u, n,
|
|
2505
|
+
}, [u, n, s]), /* @__PURE__ */ i(
|
|
2333
2506
|
"input",
|
|
2334
2507
|
{
|
|
2335
2508
|
type: "checkbox",
|
|
@@ -2350,177 +2523,177 @@ const ms = "SwitchBubbleInput", jt = i.forwardRef(
|
|
|
2350
2523
|
);
|
|
2351
2524
|
}
|
|
2352
2525
|
);
|
|
2353
|
-
|
|
2354
|
-
function
|
|
2526
|
+
Jt.displayName = Cs;
|
|
2527
|
+
function Qt(e) {
|
|
2355
2528
|
return e ? "checked" : "unchecked";
|
|
2356
2529
|
}
|
|
2357
|
-
const
|
|
2358
|
-
size: { type: "enum", className: "bd-size", values:
|
|
2359
|
-
...
|
|
2360
|
-
},
|
|
2361
|
-
const { className: n, ...
|
|
2362
|
-
return /* @__PURE__ */
|
|
2363
|
-
|
|
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,
|
|
2364
2537
|
{
|
|
2365
|
-
...
|
|
2538
|
+
...o,
|
|
2366
2539
|
asChild: !1,
|
|
2367
2540
|
ref: t,
|
|
2368
|
-
className:
|
|
2369
|
-
children: /* @__PURE__ */
|
|
2541
|
+
className: R("bd-reset", "bd-SwitchRoot", n),
|
|
2542
|
+
children: /* @__PURE__ */ i(Zt, { className: R("bd-SwitchThumb") })
|
|
2370
2543
|
}
|
|
2371
2544
|
);
|
|
2372
2545
|
});
|
|
2373
|
-
|
|
2374
|
-
const
|
|
2375
|
-
size: { type: "enum", className: "bd-size", values:
|
|
2376
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
2377
|
-
...
|
|
2378
|
-
|
|
2379
|
-
},
|
|
2380
|
-
side: { type: "enum", values:
|
|
2381
|
-
gap:
|
|
2382
|
-
px:
|
|
2383
|
-
pl:
|
|
2384
|
-
pr:
|
|
2385
|
-
},
|
|
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(
|
|
2386
2559
|
(e, t) => {
|
|
2387
|
-
const n =
|
|
2560
|
+
const n = l.useRef(null), { children: o, className: s, style: r, ...c } = I(
|
|
2388
2561
|
e,
|
|
2389
|
-
|
|
2562
|
+
xs
|
|
2390
2563
|
);
|
|
2391
|
-
return /* @__PURE__ */
|
|
2564
|
+
return /* @__PURE__ */ k(
|
|
2392
2565
|
"div",
|
|
2393
2566
|
{
|
|
2394
2567
|
style: r,
|
|
2395
|
-
className:
|
|
2568
|
+
className: R("bd-TextFieldRoot", s),
|
|
2396
2569
|
onPointerDown: (a) => {
|
|
2397
2570
|
const u = a.target;
|
|
2398
2571
|
if (u.closest("input, button, a")) return;
|
|
2399
2572
|
const d = n.current;
|
|
2400
2573
|
if (!d) return;
|
|
2401
|
-
const
|
|
2574
|
+
const f = u.closest(`
|
|
2402
2575
|
.bd-TextFieldSlot[data-side='right'],
|
|
2403
2576
|
.bd-TextFieldSlot:not([data-side='right']) ~ .bd-TextFieldSlot:not([data-side='left'])
|
|
2404
2577
|
`) ? d.value.length : 0;
|
|
2405
2578
|
requestAnimationFrame(() => {
|
|
2406
2579
|
try {
|
|
2407
|
-
d.setSelectionRange(
|
|
2580
|
+
d.setSelectionRange(f, f);
|
|
2408
2581
|
} catch {
|
|
2409
2582
|
}
|
|
2410
2583
|
d.focus();
|
|
2411
2584
|
});
|
|
2412
2585
|
},
|
|
2413
2586
|
children: [
|
|
2414
|
-
/* @__PURE__ */
|
|
2587
|
+
/* @__PURE__ */ i(
|
|
2415
2588
|
"input",
|
|
2416
2589
|
{
|
|
2417
2590
|
spellCheck: "false",
|
|
2418
2591
|
...c,
|
|
2419
|
-
ref:
|
|
2592
|
+
ref: X(n, t),
|
|
2420
2593
|
className: "bd-reset bd-TextFieldInput"
|
|
2421
2594
|
}
|
|
2422
2595
|
),
|
|
2423
|
-
|
|
2596
|
+
o
|
|
2424
2597
|
]
|
|
2425
2598
|
}
|
|
2426
2599
|
);
|
|
2427
2600
|
}
|
|
2428
2601
|
);
|
|
2429
|
-
|
|
2430
|
-
const
|
|
2602
|
+
en.displayName = "TextFieldRoot";
|
|
2603
|
+
const tn = l.forwardRef(
|
|
2431
2604
|
(e, t) => {
|
|
2432
|
-
const { className: n, side:
|
|
2433
|
-
return /* @__PURE__ */
|
|
2605
|
+
const { className: n, side: o, ...s } = I(e, ks);
|
|
2606
|
+
return /* @__PURE__ */ i(
|
|
2434
2607
|
"div",
|
|
2435
2608
|
{
|
|
2436
|
-
"data-side":
|
|
2437
|
-
...
|
|
2609
|
+
"data-side": o,
|
|
2610
|
+
...s,
|
|
2438
2611
|
ref: t,
|
|
2439
|
-
className:
|
|
2612
|
+
className: R("bd-TextFieldSlot", n)
|
|
2440
2613
|
}
|
|
2441
2614
|
);
|
|
2442
2615
|
}
|
|
2443
2616
|
);
|
|
2444
|
-
|
|
2445
|
-
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 = () => {
|
|
2446
2619
|
const e = /* @__PURE__ */ new Date();
|
|
2447
2620
|
return e.setHours(0, 0, 0, 0), e;
|
|
2448
|
-
},
|
|
2449
|
-
const { variant: t = "single", size: n = "2", children:
|
|
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({
|
|
2450
2623
|
prop: e.open,
|
|
2451
2624
|
defaultProp: e.defaultOpen || !1,
|
|
2452
2625
|
onChange: e.onOpenChange,
|
|
2453
2626
|
caller: "CalendarRoot"
|
|
2454
|
-
}), [a, u] =
|
|
2627
|
+
}), [a, u] = B({
|
|
2455
2628
|
prop: e.value,
|
|
2456
2629
|
defaultProp: e.defaultValue ?? null,
|
|
2457
2630
|
onChange: e.onValueChange,
|
|
2458
2631
|
caller: "CalendarRoot (single)"
|
|
2459
|
-
}), [d,
|
|
2632
|
+
}), [d, p] = B({
|
|
2460
2633
|
prop: e.rangeValue,
|
|
2461
2634
|
defaultProp: e.defaultRangeValue ?? { start: null, end: null },
|
|
2462
2635
|
onChange: e.onRangeValueChange,
|
|
2463
2636
|
caller: "CalendarRoot (range)"
|
|
2464
|
-
}), [
|
|
2465
|
-
a || d.start ||
|
|
2637
|
+
}), [f, C] = l.useState("date"), [h, v] = l.useState(
|
|
2638
|
+
a || d.start || W()
|
|
2466
2639
|
);
|
|
2467
|
-
|
|
2468
|
-
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);
|
|
2469
2642
|
}, [d.start, a, t]);
|
|
2470
|
-
const
|
|
2471
|
-
|
|
2472
|
-
r && (
|
|
2643
|
+
const b = l.useRef(a), g = l.useRef(d);
|
|
2644
|
+
l.useEffect(() => {
|
|
2645
|
+
r && (b.current = a, g.current = d);
|
|
2473
2646
|
}, [r, a, d]);
|
|
2474
|
-
const m =
|
|
2475
|
-
t === "single" && !a ? u(
|
|
2476
|
-
}, [t, a, d.start, u,
|
|
2477
|
-
t === "single" ? u(
|
|
2478
|
-
}, [t, u,
|
|
2479
|
-
return /* @__PURE__ */
|
|
2480
|
-
|
|
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,
|
|
2481
2654
|
{
|
|
2482
2655
|
scope: void 0,
|
|
2483
2656
|
open: r,
|
|
2484
|
-
setOpen: (
|
|
2485
|
-
c(
|
|
2657
|
+
setOpen: (N) => {
|
|
2658
|
+
c(N), N || C("date");
|
|
2486
2659
|
},
|
|
2487
|
-
triggerRef:
|
|
2660
|
+
triggerRef: s,
|
|
2488
2661
|
variant: t,
|
|
2489
2662
|
size: n,
|
|
2490
|
-
viewMode:
|
|
2491
|
-
setViewMode:
|
|
2663
|
+
viewMode: f,
|
|
2664
|
+
setViewMode: C,
|
|
2492
2665
|
viewingDate: h,
|
|
2493
|
-
setViewingDate:
|
|
2494
|
-
singleDate: a ||
|
|
2666
|
+
setViewingDate: v,
|
|
2667
|
+
singleDate: a || W(),
|
|
2495
2668
|
setSingleDate: u,
|
|
2496
|
-
startDate: d.start ||
|
|
2497
|
-
setStartDate: (
|
|
2669
|
+
startDate: d.start || W(),
|
|
2670
|
+
setStartDate: (N) => p((x) => ({ ...x, start: N })),
|
|
2498
2671
|
endDate: d.end,
|
|
2499
|
-
setEndDate: (
|
|
2500
|
-
resetRange: () =>
|
|
2672
|
+
setEndDate: (N) => p((x) => ({ ...x, end: N })),
|
|
2673
|
+
resetRange: () => p({ start: null, end: null }),
|
|
2501
2674
|
onConfirm: m,
|
|
2502
2675
|
onCancel: y,
|
|
2503
|
-
children:
|
|
2676
|
+
children: o
|
|
2504
2677
|
}
|
|
2505
2678
|
);
|
|
2506
|
-
},
|
|
2679
|
+
}, on = l.forwardRef(
|
|
2507
2680
|
({ children: e }, t) => {
|
|
2508
|
-
const n =
|
|
2509
|
-
return
|
|
2510
|
-
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),
|
|
2511
2684
|
onFocus: (r) => {
|
|
2512
|
-
n.setOpen(!0),
|
|
2685
|
+
n.setOpen(!0), o.props.onFocus?.(r);
|
|
2513
2686
|
},
|
|
2514
2687
|
onClick: (r) => {
|
|
2515
|
-
n.setOpen(!0),
|
|
2688
|
+
n.setOpen(!0), o.props.onClick?.(r);
|
|
2516
2689
|
}
|
|
2517
2690
|
});
|
|
2518
2691
|
}
|
|
2519
2692
|
);
|
|
2520
|
-
|
|
2521
|
-
const
|
|
2693
|
+
on.displayName = "CalendarTrigger";
|
|
2694
|
+
const sn = l.forwardRef(
|
|
2522
2695
|
(e, t) => {
|
|
2523
|
-
const { className: n, style:
|
|
2696
|
+
const { className: n, style: o, ...s } = e, r = $("CalendarContent", void 0), c = l.useRef(null), { styles: a, isPositioned: u } = Xe(
|
|
2524
2697
|
r.triggerRef,
|
|
2525
2698
|
c,
|
|
2526
2699
|
r.open,
|
|
@@ -2528,77 +2701,77 @@ const Jt = i.forwardRef(
|
|
|
2528
2701
|
"start",
|
|
2529
2702
|
!1
|
|
2530
2703
|
);
|
|
2531
|
-
if (
|
|
2532
|
-
r.triggerRef.current?.contains(
|
|
2704
|
+
if (Ze(c, (f) => {
|
|
2705
|
+
r.triggerRef.current?.contains(f.target) || r.setOpen(!1);
|
|
2533
2706
|
}), !r.open) return null;
|
|
2534
2707
|
const d = () => {
|
|
2535
2708
|
r.onConfirm();
|
|
2536
|
-
},
|
|
2709
|
+
}, p = () => {
|
|
2537
2710
|
r.onCancel();
|
|
2538
2711
|
};
|
|
2539
|
-
return /* @__PURE__ */
|
|
2540
|
-
|
|
2712
|
+
return /* @__PURE__ */ i(Je, { children: /* @__PURE__ */ k(
|
|
2713
|
+
D,
|
|
2541
2714
|
{
|
|
2542
2715
|
direction: "column",
|
|
2543
2716
|
gap: "4",
|
|
2544
|
-
...
|
|
2545
|
-
ref:
|
|
2546
|
-
className:
|
|
2717
|
+
...s,
|
|
2718
|
+
ref: X(c, t),
|
|
2719
|
+
className: R(
|
|
2547
2720
|
"bd-CalendarContent",
|
|
2548
2721
|
`bd-size-${r.size}`,
|
|
2549
2722
|
`bd-variant-${r.variant}`,
|
|
2550
2723
|
n
|
|
2551
2724
|
),
|
|
2552
|
-
style: { ...
|
|
2553
|
-
onPointerDown: (
|
|
2554
|
-
|
|
2725
|
+
style: { ...o, ...a, visibility: u ? "visible" : "hidden" },
|
|
2726
|
+
onPointerDown: (f) => {
|
|
2727
|
+
f.preventDefault();
|
|
2555
2728
|
},
|
|
2556
2729
|
children: [
|
|
2557
|
-
r.variant === "range" && /* @__PURE__ */
|
|
2558
|
-
/* @__PURE__ */
|
|
2559
|
-
/* @__PURE__ */
|
|
2560
|
-
/* @__PURE__ */
|
|
2561
|
-
/* @__PURE__ */
|
|
2562
|
-
|
|
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,
|
|
2563
2736
|
{
|
|
2564
2737
|
size: "3",
|
|
2565
2738
|
variant: "outline-primary",
|
|
2566
2739
|
radius: "s",
|
|
2567
|
-
onClick:
|
|
2740
|
+
onClick: p,
|
|
2568
2741
|
style: { width: "50%" },
|
|
2569
2742
|
children: "취소"
|
|
2570
2743
|
}
|
|
2571
2744
|
),
|
|
2572
|
-
/* @__PURE__ */
|
|
2745
|
+
/* @__PURE__ */ i(xe, { size: "3", radius: "s", onClick: d, style: { width: "50%" }, children: "확인" })
|
|
2573
2746
|
] })
|
|
2574
2747
|
]
|
|
2575
2748
|
}
|
|
2576
2749
|
) });
|
|
2577
2750
|
}
|
|
2578
2751
|
);
|
|
2579
|
-
|
|
2580
|
-
const
|
|
2581
|
-
const e =
|
|
2582
|
-
/* @__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 }),
|
|
2583
2756
|
"범위 추가"
|
|
2584
2757
|
] });
|
|
2585
|
-
return /* @__PURE__ */
|
|
2586
|
-
/* @__PURE__ */
|
|
2587
|
-
/* @__PURE__ */
|
|
2588
|
-
|
|
2758
|
+
return /* @__PURE__ */ k(D, { direction: "column", className: "bd-CalendarRangeHeader", children: [
|
|
2759
|
+
/* @__PURE__ */ k(D, { gap: "2", children: [
|
|
2760
|
+
/* @__PURE__ */ i(
|
|
2761
|
+
D,
|
|
2589
2762
|
{
|
|
2590
2763
|
align: "center",
|
|
2591
2764
|
justify: "between",
|
|
2592
|
-
className:
|
|
2765
|
+
className: R("bd-RangeBox", { active: !e.startDate }),
|
|
2593
2766
|
children: t(e.startDate)
|
|
2594
2767
|
}
|
|
2595
2768
|
),
|
|
2596
|
-
/* @__PURE__ */
|
|
2597
|
-
|
|
2769
|
+
/* @__PURE__ */ i(
|
|
2770
|
+
D,
|
|
2598
2771
|
{
|
|
2599
2772
|
align: "center",
|
|
2600
2773
|
justify: "between",
|
|
2601
|
-
className:
|
|
2774
|
+
className: R("bd-RangeBox", {
|
|
2602
2775
|
active: e.startDate && !e.endDate,
|
|
2603
2776
|
empty: !e.endDate
|
|
2604
2777
|
}),
|
|
@@ -2606,102 +2779,102 @@ const Is = () => {
|
|
|
2606
2779
|
}
|
|
2607
2780
|
)
|
|
2608
2781
|
] }),
|
|
2609
|
-
/* @__PURE__ */
|
|
2610
|
-
|
|
2782
|
+
/* @__PURE__ */ i(
|
|
2783
|
+
D,
|
|
2611
2784
|
{
|
|
2612
2785
|
justify: "end",
|
|
2613
2786
|
onClick: () => {
|
|
2614
2787
|
e.resetRange();
|
|
2615
2788
|
},
|
|
2616
|
-
children: /* @__PURE__ */
|
|
2789
|
+
children: /* @__PURE__ */ i("button", { className: "reset-btn", children: "초기화" })
|
|
2617
2790
|
}
|
|
2618
2791
|
)
|
|
2619
2792
|
] });
|
|
2620
|
-
},
|
|
2621
|
-
const e =
|
|
2793
|
+
}, Ms = () => {
|
|
2794
|
+
const e = $("CalendarNavigation", void 0), { viewingDate: t, setViewingDate: n, viewMode: o, setViewMode: s } = e, r = () => {
|
|
2622
2795
|
const a = new Date(t);
|
|
2623
|
-
|
|
2796
|
+
o === "date" ? a.setMonth(a.getMonth() - 1) : o === "year" ? a.setFullYear(a.getFullYear() - 28) : a.setFullYear(a.getFullYear() - 1), n(a);
|
|
2624
2797
|
}, c = () => {
|
|
2625
2798
|
const a = new Date(t);
|
|
2626
|
-
|
|
2799
|
+
o === "date" ? a.setMonth(a.getMonth() + 1) : o === "year" ? a.setFullYear(a.getFullYear() + 28) : a.setFullYear(a.getFullYear() + 1), n(a);
|
|
2627
2800
|
};
|
|
2628
|
-
return /* @__PURE__ */
|
|
2629
|
-
/* @__PURE__ */
|
|
2801
|
+
return /* @__PURE__ */ k(D, { justify: "between", align: "center", children: [
|
|
2802
|
+
/* @__PURE__ */ k(
|
|
2630
2803
|
"div",
|
|
2631
2804
|
{
|
|
2632
2805
|
className: "bd-CalendarNavTitle bd-weight-medium",
|
|
2633
|
-
onClick: () => o
|
|
2806
|
+
onClick: () => s(o === "date" ? "month" : o === "month" ? "year" : "date"),
|
|
2634
2807
|
children: [
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2808
|
+
o === "date" && `${t.getFullYear()}년 ${t.getMonth() + 1}월`,
|
|
2809
|
+
o === "month" && `${t.getFullYear()}년`,
|
|
2810
|
+
o === "year" && `${t.getFullYear()}년`
|
|
2638
2811
|
]
|
|
2639
2812
|
}
|
|
2640
2813
|
),
|
|
2641
|
-
/* @__PURE__ */
|
|
2642
|
-
/* @__PURE__ */
|
|
2643
|
-
/* @__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 }) })
|
|
2644
2817
|
] })
|
|
2645
2818
|
] });
|
|
2646
|
-
},
|
|
2647
|
-
const e =
|
|
2648
|
-
return e.viewMode === "year" ? /* @__PURE__ */
|
|
2649
|
-
},
|
|
2650
|
-
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 = [];
|
|
2651
2824
|
for (let m = u - 1; m >= 0; m--)
|
|
2652
|
-
|
|
2825
|
+
f.push({
|
|
2653
2826
|
date: new Date(r, c - 1, d - m),
|
|
2654
2827
|
isCurrentMonth: !1
|
|
2655
2828
|
});
|
|
2656
2829
|
for (let m = 1; m <= a; m++)
|
|
2657
|
-
|
|
2830
|
+
f.push({
|
|
2658
2831
|
date: new Date(r, c, m),
|
|
2659
2832
|
isCurrentMonth: !0
|
|
2660
2833
|
});
|
|
2661
|
-
const
|
|
2834
|
+
const C = f.length, h = C % 7 === 0 ? 0 : 7 - C % 7;
|
|
2662
2835
|
for (let m = 1; m <= h; m++)
|
|
2663
|
-
|
|
2836
|
+
f.push({
|
|
2664
2837
|
date: new Date(r, c + 1, m),
|
|
2665
2838
|
isCurrentMonth: !1
|
|
2666
2839
|
});
|
|
2667
|
-
const
|
|
2668
|
-
m.getMonth() !== c && e.setViewingDate(m), e.variant === "single" ? e.setSingleDate(m) : !
|
|
2669
|
-
},
|
|
2840
|
+
const v = (m) => {
|
|
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);
|
|
2842
|
+
}, b = (m) => {
|
|
2670
2843
|
const y = m.getTime();
|
|
2671
|
-
return e.variant === "single" ? n?.getTime() === y :
|
|
2844
|
+
return e.variant === "single" ? n?.getTime() === y : o?.getTime() === y || s?.getTime() === y;
|
|
2672
2845
|
}, g = (m) => {
|
|
2673
|
-
if (e.variant !== "range" || !
|
|
2846
|
+
if (e.variant !== "range" || !o || !s) return !1;
|
|
2674
2847
|
const y = m.getTime();
|
|
2675
|
-
return y >
|
|
2848
|
+
return y > o.getTime() && y < s.getTime();
|
|
2676
2849
|
};
|
|
2677
|
-
return /* @__PURE__ */
|
|
2678
|
-
|
|
2679
|
-
|
|
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(
|
|
2680
2853
|
"div",
|
|
2681
2854
|
{
|
|
2682
|
-
className:
|
|
2683
|
-
selected:
|
|
2855
|
+
className: R("bd-CalendarCell", {
|
|
2856
|
+
selected: b(m.date),
|
|
2684
2857
|
inRange: g(m.date)
|
|
2685
2858
|
}),
|
|
2686
2859
|
style: {
|
|
2687
|
-
color: !m.isCurrentMonth && !
|
|
2688
|
-
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
|
|
2689
2862
|
},
|
|
2690
|
-
onClick: () =>
|
|
2863
|
+
onClick: () => v(m.date),
|
|
2691
2864
|
children: m.date.getDate()
|
|
2692
2865
|
},
|
|
2693
2866
|
y
|
|
2694
2867
|
))
|
|
2695
2868
|
] });
|
|
2696
|
-
},
|
|
2697
|
-
const e =
|
|
2698
|
-
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(
|
|
2699
2872
|
"div",
|
|
2700
2873
|
{
|
|
2701
2874
|
className: "bd-CalendarCell",
|
|
2702
2875
|
onClick: () => {
|
|
2703
|
-
const
|
|
2704
|
-
|
|
2876
|
+
const o = new Date(e.viewingDate);
|
|
2877
|
+
o.setMonth(n - 1), e.setViewingDate(o), e.setViewMode("date");
|
|
2705
2878
|
},
|
|
2706
2879
|
children: [
|
|
2707
2880
|
n,
|
|
@@ -2710,43 +2883,44 @@ const Is = () => {
|
|
|
2710
2883
|
},
|
|
2711
2884
|
n
|
|
2712
2885
|
)) });
|
|
2713
|
-
},
|
|
2714
|
-
const e =
|
|
2715
|
-
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(
|
|
2716
2889
|
"div",
|
|
2717
2890
|
{
|
|
2718
|
-
className:
|
|
2719
|
-
selected:
|
|
2891
|
+
className: R("bd-CalendarCell", {
|
|
2892
|
+
selected: o === e.viewingDate.getFullYear()
|
|
2720
2893
|
}),
|
|
2721
2894
|
onClick: () => {
|
|
2722
|
-
const
|
|
2723
|
-
|
|
2895
|
+
const s = new Date(e.viewingDate);
|
|
2896
|
+
s.setFullYear(o), e.setViewingDate(s), e.setViewMode("month");
|
|
2724
2897
|
},
|
|
2725
|
-
children:
|
|
2898
|
+
children: o
|
|
2726
2899
|
},
|
|
2727
|
-
|
|
2900
|
+
o
|
|
2728
2901
|
)) });
|
|
2729
|
-
},
|
|
2730
|
-
Trigger:
|
|
2731
|
-
Content:
|
|
2902
|
+
}, qs = Object.assign(Ts, {
|
|
2903
|
+
Trigger: on,
|
|
2904
|
+
Content: sn
|
|
2732
2905
|
});
|
|
2733
2906
|
export {
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
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
|
|
2752
2926
|
};
|