@beaubrain/web-design-system 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i, jsxs as P, Fragment as me } from "react/jsx-runtime";
|
|
2
2
|
import * as u from "react";
|
|
3
|
-
import
|
|
4
|
-
import { createPortal as
|
|
5
|
-
function
|
|
3
|
+
import _ from "react";
|
|
4
|
+
import { createPortal as Hn } from "react-dom";
|
|
5
|
+
function qn(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var _e = { 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 ht;
|
|
15
|
+
function Wn() {
|
|
16
|
+
return ht || (ht = 1, (function(e) {
|
|
17
17
|
(function() {
|
|
18
18
|
var n = {}.hasOwnProperty;
|
|
19
19
|
function t() {
|
|
@@ -42,60 +42,60 @@ function Fn() {
|
|
|
42
42
|
}
|
|
43
43
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
44
44
|
})();
|
|
45
|
-
})(
|
|
45
|
+
})(_e)), _e.exports;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
const x = /* @__PURE__ */
|
|
47
|
+
var Yn = Wn();
|
|
48
|
+
const x = /* @__PURE__ */ qn(Yn), Kn = (e, n) => {
|
|
49
49
|
const t = { ...n };
|
|
50
50
|
for (const o in n) {
|
|
51
51
|
const s = e[o], r = n[o];
|
|
52
52
|
/^on[A-Z]/.test(o) ? s && r ? t[o] = (...a) => {
|
|
53
|
-
const
|
|
54
|
-
return s(...a),
|
|
53
|
+
const l = r(...a);
|
|
54
|
+
return s(...a), l;
|
|
55
55
|
} : s && (t[o] = s) : o === "style" ? t[o] = { ...s, ...r } : o === "className" && (t[o] = [s, r].filter(Boolean).join(" "));
|
|
56
56
|
}
|
|
57
57
|
return { ...e, ...t };
|
|
58
|
-
},
|
|
58
|
+
}, bt = (e, n) => {
|
|
59
59
|
if (typeof e == "function")
|
|
60
60
|
return e(n);
|
|
61
61
|
e != null && (e.current = n);
|
|
62
|
-
},
|
|
62
|
+
}, se = (...e) => (n) => {
|
|
63
63
|
let t = !1;
|
|
64
64
|
const o = e.map((s) => {
|
|
65
|
-
const r =
|
|
65
|
+
const r = bt(s, n);
|
|
66
66
|
return !t && typeof r == "function" && (t = !0), { ref: s, cleanup: r };
|
|
67
67
|
});
|
|
68
68
|
if (t)
|
|
69
69
|
return () => {
|
|
70
70
|
for (const { ref: s, cleanup: r } of o)
|
|
71
|
-
typeof r == "function" ? r() :
|
|
71
|
+
typeof r == "function" ? r() : bt(s, null);
|
|
72
72
|
};
|
|
73
|
-
},
|
|
73
|
+
}, $e = (e) => {
|
|
74
74
|
const n = Object.getOwnPropertyDescriptor(e.props, "ref")?.get;
|
|
75
75
|
return n && "isReactWarning" in n && n.isReactWarning ? e.ref : e.props.ref || e.ref;
|
|
76
76
|
};
|
|
77
|
-
function
|
|
78
|
-
return
|
|
77
|
+
function T(...e) {
|
|
78
|
+
return _.useCallback(se(...e), e);
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const Ve = (...e) => {
|
|
81
81
|
let n = {};
|
|
82
82
|
for (const t of e)
|
|
83
83
|
t && (n = { ...n, ...t });
|
|
84
84
|
return Object.keys(n).length ? n : void 0;
|
|
85
|
-
},
|
|
86
|
-
const o =
|
|
85
|
+
}, Xn = ({ className: e, customProperties: n, ...t }) => {
|
|
86
|
+
const o = Rt({
|
|
87
87
|
allowCustomValues: !0,
|
|
88
88
|
className: e,
|
|
89
89
|
...t
|
|
90
|
-
}), s =
|
|
90
|
+
}), s = Jn({
|
|
91
91
|
customProperties: n,
|
|
92
92
|
...t
|
|
93
93
|
});
|
|
94
94
|
return [o, s];
|
|
95
|
-
},
|
|
95
|
+
}, Zn = (e, n, t) => {
|
|
96
96
|
const o = e ? "-" : "", s = t(n), r = s?.startsWith("-"), c = r ? "-" : "", a = r ? s?.substring(1) : s;
|
|
97
97
|
return `${c}${e}${o}${a}`;
|
|
98
|
-
},
|
|
98
|
+
}, Rt = ({
|
|
99
99
|
allowCustomValues: e = !1,
|
|
100
100
|
className: n,
|
|
101
101
|
value: t,
|
|
@@ -104,11 +104,11 @@ const Ae = (...e) => {
|
|
|
104
104
|
}) => {
|
|
105
105
|
if (t) {
|
|
106
106
|
if (typeof t == "string" && o.includes(t))
|
|
107
|
-
return
|
|
107
|
+
return Zn(n, t, s);
|
|
108
108
|
if (e)
|
|
109
109
|
return n;
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, Jn = ({
|
|
112
112
|
customProperties: e,
|
|
113
113
|
value: n,
|
|
114
114
|
propValues: t,
|
|
@@ -123,55 +123,55 @@ const Ae = (...e) => {
|
|
|
123
123
|
}
|
|
124
124
|
return s;
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, Qn = (...e) => Object.assign({}, ...e), I = (e, ...n) => {
|
|
127
127
|
let t, o;
|
|
128
|
-
const s = { ...e }, r =
|
|
128
|
+
const s = { ...e }, r = Qn(...n);
|
|
129
129
|
for (const c in r) {
|
|
130
130
|
let a = s[c];
|
|
131
|
-
const
|
|
132
|
-
if (
|
|
131
|
+
const l = r[c];
|
|
132
|
+
if (l.default !== void 0 && a === void 0 && (a = l.default), l.type === "enum" && ([l.default, ...l.values].includes(a) || (a = l.default)), s[c] = a, "className" in l && l.className) {
|
|
133
133
|
if (delete s[c], !a)
|
|
134
134
|
continue;
|
|
135
|
-
if (
|
|
136
|
-
const d =
|
|
135
|
+
if (l.type === "enum") {
|
|
136
|
+
const d = Rt({
|
|
137
137
|
value: a,
|
|
138
|
-
className:
|
|
139
|
-
propValues:
|
|
140
|
-
parseValue:
|
|
138
|
+
className: l.className,
|
|
139
|
+
propValues: l.values,
|
|
140
|
+
parseValue: l.parseValue
|
|
141
141
|
});
|
|
142
142
|
t = x(t, d);
|
|
143
143
|
continue;
|
|
144
144
|
}
|
|
145
|
-
if (
|
|
146
|
-
const d =
|
|
147
|
-
className:
|
|
148
|
-
customProperties:
|
|
145
|
+
if (l.type === "string" || l.type === "enum | string") {
|
|
146
|
+
const d = l.type === "string" ? [] : l.values, [p, f] = Xn({
|
|
147
|
+
className: l.className,
|
|
148
|
+
customProperties: l.customProperties,
|
|
149
149
|
propValues: d,
|
|
150
150
|
value: a
|
|
151
151
|
});
|
|
152
|
-
o =
|
|
152
|
+
o = Ve(o, f), t = x(t, p);
|
|
153
153
|
continue;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
return s.className = x(t, e.className), s.style =
|
|
158
|
-
},
|
|
159
|
-
if (!
|
|
157
|
+
return s.className = x(t, e.className), s.style = Ve(o, e.style), s;
|
|
158
|
+
}, xt = (e) => {
|
|
159
|
+
if (!_.isValidElement(e))
|
|
160
160
|
throw new Error(`Expected a single valid React element, but got: ${e}`);
|
|
161
161
|
return e;
|
|
162
|
-
},
|
|
162
|
+
}, F = (e, n = []) => {
|
|
163
163
|
let t = [];
|
|
164
164
|
function o(r, c) {
|
|
165
|
-
const a = u.createContext(c),
|
|
165
|
+
const a = u.createContext(c), l = t.length;
|
|
166
166
|
t = [...t, c];
|
|
167
167
|
const d = (f) => {
|
|
168
|
-
const { scope:
|
|
169
|
-
return /* @__PURE__ */
|
|
168
|
+
const { scope: C, children: m, ...y } = f, h = C?.[e]?.[l] || a, g = u.useMemo(() => y, Object.values(y));
|
|
169
|
+
return /* @__PURE__ */ i(h.Provider, { value: g, children: m });
|
|
170
170
|
};
|
|
171
171
|
d.displayName = `${r}Provider`;
|
|
172
|
-
function p(f,
|
|
173
|
-
const m =
|
|
174
|
-
if (
|
|
172
|
+
function p(f, C) {
|
|
173
|
+
const m = C?.[e]?.[l] || a, y = u.useContext(m);
|
|
174
|
+
if (y) return y;
|
|
175
175
|
if (c !== void 0) return c;
|
|
176
176
|
throw new Error(`\`${f}\` must be used within \`${r}\``);
|
|
177
177
|
}
|
|
@@ -180,15 +180,15 @@ const Ae = (...e) => {
|
|
|
180
180
|
const s = () => {
|
|
181
181
|
const r = t.map((c) => u.createContext(c));
|
|
182
182
|
return function(a) {
|
|
183
|
-
const
|
|
183
|
+
const l = a?.[e] || r;
|
|
184
184
|
return u.useMemo(
|
|
185
|
-
() => ({ [`__scope${e}`]: { ...a, [e]:
|
|
186
|
-
[a,
|
|
185
|
+
() => ({ [`__scope${e}`]: { ...a, [e]: l } }),
|
|
186
|
+
[a, l]
|
|
187
187
|
);
|
|
188
188
|
};
|
|
189
189
|
};
|
|
190
|
-
return s.scopeName = e, [o,
|
|
191
|
-
},
|
|
190
|
+
return s.scopeName = e, [o, eo(s, ...n)];
|
|
191
|
+
}, eo = (...e) => {
|
|
192
192
|
const n = e[0];
|
|
193
193
|
if (e.length === 1) return n;
|
|
194
194
|
const t = () => {
|
|
@@ -197,41 +197,41 @@ const Ae = (...e) => {
|
|
|
197
197
|
scopeName: s.scopeName
|
|
198
198
|
}));
|
|
199
199
|
return function(r) {
|
|
200
|
-
const c = o.reduce((a, { useScope:
|
|
201
|
-
const f =
|
|
200
|
+
const c = o.reduce((a, { useScope: l, scopeName: d }) => {
|
|
201
|
+
const f = l(r)[`__scope${d}`];
|
|
202
202
|
return { ...a, ...f };
|
|
203
203
|
}, {});
|
|
204
204
|
return u.useMemo(() => ({ [`__scope${n.scopeName}`]: c }), [c]);
|
|
205
205
|
};
|
|
206
206
|
};
|
|
207
207
|
return t.scopeName = n.scopeName, t;
|
|
208
|
-
},
|
|
209
|
-
},
|
|
208
|
+
}, G = globalThis?.document ? u.useLayoutEffect : () => {
|
|
209
|
+
}, to = u[" useId ".trim().toString()] || (() => {
|
|
210
210
|
});
|
|
211
|
-
let
|
|
212
|
-
function
|
|
213
|
-
const [n, t] = u.useState(
|
|
214
|
-
return
|
|
215
|
-
e || t((o) => o ?? String(
|
|
211
|
+
let no = 0;
|
|
212
|
+
function re(e) {
|
|
213
|
+
const [n, t] = u.useState(to());
|
|
214
|
+
return G(() => {
|
|
215
|
+
e || t((o) => o ?? String(no++));
|
|
216
216
|
}, [e]), e || (n ? `bd-${n}` : "");
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function de(e) {
|
|
219
219
|
const n = u.useRef(e);
|
|
220
|
-
return
|
|
220
|
+
return G(() => {
|
|
221
221
|
n.current = e;
|
|
222
222
|
}), u.useMemo(() => ((...t) => n.current?.(...t)), []);
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function A({
|
|
225
225
|
prop: e,
|
|
226
226
|
defaultProp: n,
|
|
227
227
|
onChange: t = () => {
|
|
228
228
|
},
|
|
229
229
|
caller: o
|
|
230
230
|
}) {
|
|
231
|
-
const [s, r, c] =
|
|
231
|
+
const [s, r, c] = oo({
|
|
232
232
|
defaultProp: n,
|
|
233
233
|
onChange: t
|
|
234
|
-
}), a = e !== void 0,
|
|
234
|
+
}), a = e !== void 0, l = a ? e : s;
|
|
235
235
|
if (process.env.NODE_ENV !== "production") {
|
|
236
236
|
const p = u.useRef(e !== void 0);
|
|
237
237
|
u.useEffect(() => {
|
|
@@ -244,36 +244,36 @@ function _({
|
|
|
244
244
|
const d = u.useCallback(
|
|
245
245
|
(p) => {
|
|
246
246
|
if (a) {
|
|
247
|
-
const f =
|
|
247
|
+
const f = so(p) ? p(e) : p;
|
|
248
248
|
f !== e && c.current?.(f);
|
|
249
249
|
} else
|
|
250
250
|
r(p);
|
|
251
251
|
},
|
|
252
252
|
[a, e, r, c]
|
|
253
253
|
);
|
|
254
|
-
return [
|
|
254
|
+
return [l, d];
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function oo({
|
|
257
257
|
defaultProp: e,
|
|
258
258
|
onChange: n
|
|
259
259
|
}) {
|
|
260
260
|
const [t, o] = u.useState(e), s = u.useRef(t), r = u.useRef(n);
|
|
261
|
-
return
|
|
261
|
+
return G(() => {
|
|
262
262
|
r.current = n;
|
|
263
263
|
}, [n]), u.useEffect(() => {
|
|
264
264
|
s.current !== t && (r.current?.(t), s.current = t);
|
|
265
265
|
}, [t, s]), [t, o, r];
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function so(e) {
|
|
268
268
|
return typeof e == "function";
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Ce(e) {
|
|
271
271
|
const n = u.useRef({ value: e, previous: e });
|
|
272
272
|
return u.useMemo(() => (n.current.value !== e && (n.current.previous = n.current.value, n.current.value = e), n.current.previous), [e]);
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function Ue(e) {
|
|
275
275
|
const [n, t] = u.useState(void 0);
|
|
276
|
-
return
|
|
276
|
+
return G(() => {
|
|
277
277
|
if (e) {
|
|
278
278
|
t({ width: e.offsetWidth, height: e.offsetHeight });
|
|
279
279
|
const o = new ResizeObserver((s) => {
|
|
@@ -282,7 +282,7 @@ function Ge(e) {
|
|
|
282
282
|
const r = s[0];
|
|
283
283
|
let c, a;
|
|
284
284
|
if ("borderBoxSize" in r) {
|
|
285
|
-
const
|
|
285
|
+
const l = r.borderBoxSize, d = Array.isArray(l) ? l[0] : l;
|
|
286
286
|
c = d.inlineSize, a = d.blockSize;
|
|
287
287
|
} else
|
|
288
288
|
c = e.offsetWidth, a = e.offsetHeight;
|
|
@@ -293,19 +293,19 @@ function Ge(e) {
|
|
|
293
293
|
t(void 0);
|
|
294
294
|
}, [e]), n;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function ro(e, n) {
|
|
297
297
|
const [t, o] = u.useReducer((s, r) => n[s][r] ?? s, e);
|
|
298
298
|
return [t, o];
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
const [c, a] =
|
|
300
|
+
function Pt(e, n, t, o = 0, s = "start", r = !0) {
|
|
301
|
+
const [c, a] = _.useState({
|
|
302
302
|
position: "absolute",
|
|
303
303
|
top: 0,
|
|
304
304
|
left: 0,
|
|
305
305
|
opacity: 0,
|
|
306
306
|
pointerEvents: "none"
|
|
307
|
-
}), [
|
|
308
|
-
return
|
|
307
|
+
}), [l, d] = _.useState(!1);
|
|
308
|
+
return G(() => {
|
|
309
309
|
if (!t) {
|
|
310
310
|
d(!1), a({
|
|
311
311
|
position: "absolute",
|
|
@@ -319,30 +319,30 @@ function pt(e, n, t, o = 0, s = "start", r = !0) {
|
|
|
319
319
|
let p;
|
|
320
320
|
const f = () => {
|
|
321
321
|
if (!e.current || !n.current) return;
|
|
322
|
-
const m = (e.current.closest(".bd-TextFieldRoot") || e.current).getBoundingClientRect(),
|
|
323
|
-
if (
|
|
322
|
+
const m = (e.current.closest(".bd-TextFieldRoot") || e.current).getBoundingClientRect(), y = n.current.getBoundingClientRect(), h = r ? m.width : y.width;
|
|
323
|
+
if (y.height === 0 || y.width === 0) {
|
|
324
324
|
p = requestAnimationFrame(f);
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
|
-
const g = window.innerHeight,
|
|
328
|
-
let b = window.scrollY + m.bottom + o,
|
|
329
|
-
s === "center" ?
|
|
330
|
-
const
|
|
327
|
+
const g = window.innerHeight, v = window.innerWidth;
|
|
328
|
+
let b = window.scrollY + m.bottom + o, w = window.scrollX + m.left;
|
|
329
|
+
s === "center" ? w = window.scrollX + m.left + m.width / 2 - h / 2 : s === "end" && (w = window.scrollX + m.right - h), m.bottom + y.height + o > g && (b = window.scrollY + m.top - y.height - o), w + h > window.scrollX + v && (w = window.scrollX + v - h - 16), w < window.scrollX && (w = window.scrollX + 16);
|
|
330
|
+
const N = {
|
|
331
331
|
position: "absolute",
|
|
332
332
|
top: `${b}px`,
|
|
333
|
-
left: `${
|
|
333
|
+
left: `${w}px`,
|
|
334
334
|
zIndex: 1e3,
|
|
335
335
|
opacity: 1,
|
|
336
336
|
pointerEvents: "auto"
|
|
337
337
|
};
|
|
338
|
-
r && (
|
|
338
|
+
r && (N.width = `${m.width}px`), a(N), d(!0);
|
|
339
339
|
};
|
|
340
340
|
return p = requestAnimationFrame(f), window.addEventListener("scroll", f, { passive: !0 }), window.addEventListener("resize", f), () => {
|
|
341
341
|
cancelAnimationFrame(p), window.removeEventListener("scroll", f), window.removeEventListener("resize", f);
|
|
342
342
|
};
|
|
343
|
-
}, [t, e, n, o, s, r]), { styles: c, isPositioned:
|
|
343
|
+
}, [t, e, n, o, s, r]), { styles: c, isPositioned: l };
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function je(e, n) {
|
|
346
346
|
u.useEffect(() => {
|
|
347
347
|
const t = (o) => {
|
|
348
348
|
const s = e?.current;
|
|
@@ -353,31 +353,31 @@ function Ve(e, n) {
|
|
|
353
353
|
};
|
|
354
354
|
}, [e, n]);
|
|
355
355
|
}
|
|
356
|
-
const
|
|
356
|
+
const He = ({
|
|
357
357
|
children: e,
|
|
358
358
|
container: n = globalThis?.document?.body
|
|
359
|
-
}) => typeof window > "u" || !n ? null :
|
|
360
|
-
/* @__PURE__ */
|
|
359
|
+
}) => typeof window > "u" || !n ? null : Hn(
|
|
360
|
+
/* @__PURE__ */ i("div", { className: "bd-theme bd-reset", style: { display: "contents" }, children: e }),
|
|
361
361
|
n
|
|
362
|
-
),
|
|
363
|
-
const n =
|
|
362
|
+
), ao = (e) => {
|
|
363
|
+
const n = _.forwardRef((t, o) => {
|
|
364
364
|
const { children: s, ...r } = t;
|
|
365
|
-
if (
|
|
366
|
-
const c =
|
|
367
|
-
return a.ref = o ?
|
|
365
|
+
if (_.isValidElement(s)) {
|
|
366
|
+
const c = $e(s), a = Kn(r, s.props);
|
|
367
|
+
return a.ref = o ? se(o, c) : c, _.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 n.displayName = `${e}.OutletClone`, n;
|
|
374
|
-
},
|
|
375
|
-
const n =
|
|
376
|
-
const { children: r, ...c } = o, a =
|
|
377
|
-
if (
|
|
378
|
-
const d =
|
|
379
|
-
if (f ===
|
|
380
|
-
if (
|
|
374
|
+
}, he = (e) => {
|
|
375
|
+
const n = ao(e), t = _.forwardRef((o, s) => {
|
|
376
|
+
const { children: r, ...c } = o, a = _.Children.toArray(r), l = a.find(io);
|
|
377
|
+
if (l) {
|
|
378
|
+
const d = l.props.children, p = a.map((f) => {
|
|
379
|
+
if (f === l) {
|
|
380
|
+
if (_.Children.count(d) > 1 || !_.isValidElement(d))
|
|
381
381
|
throw new Error(
|
|
382
382
|
`[${e}.Outlet] Invalid children passed, expected a single valid React element.`
|
|
383
383
|
);
|
|
@@ -385,67 +385,67 @@ const $e = ({
|
|
|
385
385
|
} else
|
|
386
386
|
return f;
|
|
387
387
|
});
|
|
388
|
-
if (!
|
|
388
|
+
if (!_.isValidElement(d))
|
|
389
389
|
throw new Error(`[${e}.Outlet] Invalid children passed.`);
|
|
390
|
-
return /* @__PURE__ */
|
|
390
|
+
return /* @__PURE__ */ i(n, { ...c, ref: s, children: _.cloneElement(d, void 0, p) });
|
|
391
391
|
}
|
|
392
|
-
return /* @__PURE__ */
|
|
392
|
+
return /* @__PURE__ */ i(n, { ...c, ref: s, children: r });
|
|
393
393
|
});
|
|
394
394
|
return t.displayName = `${e}.Outlet`, t;
|
|
395
|
-
},
|
|
396
|
-
const t =
|
|
395
|
+
}, ve = he("Outlet"), co = Symbol("bds.outlettable"), io = (e) => _.isValidElement(e) && typeof e.type == "function" && "__bdsId" in e.type && e.type.__bdsId === co, lo = ["a", "button", "div", "input", "label", "span"], R = lo.reduce((e, n) => {
|
|
396
|
+
const t = he(`Base.${n}`), o = u.forwardRef((s, r) => {
|
|
397
397
|
const { asChild: c, ...a } = s;
|
|
398
|
-
return /* @__PURE__ */
|
|
398
|
+
return /* @__PURE__ */ i(c ? t : n, { ...a, ref: r });
|
|
399
399
|
});
|
|
400
400
|
return o.displayName = `Base.${n}`, { ...e, [n]: o };
|
|
401
401
|
}, {});
|
|
402
|
-
function
|
|
403
|
-
const n = `${e}CollectionProvider`, [t, o] =
|
|
402
|
+
function uo(e) {
|
|
403
|
+
const n = `${e}CollectionProvider`, [t, o] = F(n), [s, r] = t(
|
|
404
404
|
n,
|
|
405
405
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
406
|
-
), c = (
|
|
407
|
-
const { scope: g, children:
|
|
408
|
-
return /* @__PURE__ */
|
|
406
|
+
), c = (h) => {
|
|
407
|
+
const { scope: g, children: v } = h, b = u.useRef(null), w = u.useRef(/* @__PURE__ */ new Map()).current;
|
|
408
|
+
return /* @__PURE__ */ i(s, { scope: g, itemMap: w, collectionRef: b, children: v });
|
|
409
409
|
};
|
|
410
410
|
c.displayName = n;
|
|
411
|
-
const a = `${e}CollectionOutlet`,
|
|
412
|
-
(
|
|
413
|
-
const { scope:
|
|
414
|
-
return /* @__PURE__ */ l
|
|
411
|
+
const a = `${e}CollectionOutlet`, l = he(a), d = u.forwardRef(
|
|
412
|
+
(h, g) => {
|
|
413
|
+
const { scope: v, children: b } = h, w = r(a, v), N = T(g, w.collectionRef);
|
|
414
|
+
return /* @__PURE__ */ i(l, { ref: N, children: b });
|
|
415
415
|
}
|
|
416
416
|
);
|
|
417
417
|
d.displayName = a;
|
|
418
|
-
const p = `${e}CollectionItemOutlet`, f = "data-bd-collection-item",
|
|
419
|
-
(
|
|
420
|
-
const { scope:
|
|
421
|
-
return u.useEffect(() => (
|
|
418
|
+
const p = `${e}CollectionItemOutlet`, f = "data-bd-collection-item", C = he(p), m = u.forwardRef(
|
|
419
|
+
(h, g) => {
|
|
420
|
+
const { scope: v, children: b, ...w } = h, N = u.useRef(null), k = T(g, N), S = r(p, v);
|
|
421
|
+
return u.useEffect(() => (S.itemMap.set(N, { ref: N, ...w }), () => void S.itemMap.delete(N))), /* @__PURE__ */ i(C, { [f]: "", ref: k, children: b });
|
|
422
422
|
}
|
|
423
423
|
);
|
|
424
424
|
m.displayName = p;
|
|
425
|
-
function
|
|
426
|
-
const g = r(`${e}CollectionConsumer`,
|
|
425
|
+
function y(h) {
|
|
426
|
+
const g = r(`${e}CollectionConsumer`, h);
|
|
427
427
|
return u.useCallback(() => {
|
|
428
428
|
const b = g.collectionRef.current;
|
|
429
429
|
if (!b) return [];
|
|
430
|
-
const
|
|
430
|
+
const w = Array.from(b.querySelectorAll(`[${f}]`));
|
|
431
431
|
return Array.from(g.itemMap.values()).sort(
|
|
432
|
-
(
|
|
432
|
+
(S, L) => w.indexOf(S.ref.current) - w.indexOf(L.ref.current)
|
|
433
433
|
);
|
|
434
434
|
}, [g.collectionRef, g.itemMap]);
|
|
435
435
|
}
|
|
436
436
|
return [
|
|
437
437
|
{ Provider: c, Outlet: d, ItemOutlet: m },
|
|
438
|
-
|
|
438
|
+
y,
|
|
439
439
|
o
|
|
440
440
|
];
|
|
441
441
|
}
|
|
442
|
-
function
|
|
443
|
-
const { remain: n, children: t } = e, o =
|
|
442
|
+
function St(e) {
|
|
443
|
+
const { remain: n, children: t } = e, o = fo(n), s = typeof t == "function" ? t({ remain: o.isRemain }) : u.Children.only(t), r = T(o.ref, $e(s));
|
|
444
444
|
return typeof t == "function" || o.isRemain ? u.cloneElement(s, { ref: r }) : null;
|
|
445
445
|
}
|
|
446
|
-
const
|
|
447
|
-
function
|
|
448
|
-
const [n, t] = u.useState(), o = u.useRef(null), s = u.useRef(e), r = u.useRef("none"), c = e ? "mounted" : "unmounted", [a,
|
|
446
|
+
const po = ["mounted", "unmountSuspended"];
|
|
447
|
+
function fo(e) {
|
|
448
|
+
const [n, t] = u.useState(), o = u.useRef(null), s = u.useRef(e), r = u.useRef("none"), c = e ? "mounted" : "unmounted", [a, l] = ro(c, {
|
|
449
449
|
mounted: {
|
|
450
450
|
UNMOUNT: "unmounted",
|
|
451
451
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -459,44 +459,44 @@ function no(e) {
|
|
|
459
459
|
}
|
|
460
460
|
});
|
|
461
461
|
return u.useEffect(() => {
|
|
462
|
-
const d =
|
|
462
|
+
const d = ue(o.current);
|
|
463
463
|
r.current = a === "mounted" ? d : "none";
|
|
464
|
-
}, [a]),
|
|
464
|
+
}, [a]), G(() => {
|
|
465
465
|
const d = o.current, p = s.current;
|
|
466
466
|
if (p !== e) {
|
|
467
|
-
const
|
|
468
|
-
e ?
|
|
467
|
+
const C = r.current, m = ue(d);
|
|
468
|
+
e ? l("MOUNT") : m === "none" || d?.display === "none" ? l("UNMOUNT") : l(p && C !== m ? "ANIMATION_OUT" : "UNMOUNT"), s.current = e;
|
|
469
469
|
}
|
|
470
|
-
}, [e,
|
|
470
|
+
}, [e, l]), G(() => {
|
|
471
471
|
if (n) {
|
|
472
472
|
let d;
|
|
473
473
|
const p = n.ownerDocument.defaultView ?? window, f = (m) => {
|
|
474
|
-
const
|
|
475
|
-
if (m.target === n &&
|
|
474
|
+
const h = ue(o.current).includes(CSS.escape(m.animationName));
|
|
475
|
+
if (m.target === n && h && (l("ANIMATION_END"), !s.current)) {
|
|
476
476
|
const g = n.style.animationFillMode;
|
|
477
477
|
n.style.animationFillMode = "forwards", d = p.setTimeout(() => {
|
|
478
478
|
n.style.animationFillMode === "forwards" && (n.style.animationFillMode = g);
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
|
-
},
|
|
482
|
-
m.target === n && (r.current =
|
|
481
|
+
}, C = (m) => {
|
|
482
|
+
m.target === n && (r.current = ue(o.current));
|
|
483
483
|
};
|
|
484
|
-
return n.addEventListener("animationstart",
|
|
485
|
-
p.clearTimeout(d), n.removeEventListener("animationstart",
|
|
484
|
+
return n.addEventListener("animationstart", C), n.addEventListener("animationcancel", f), n.addEventListener("animationend", f), () => {
|
|
485
|
+
p.clearTimeout(d), n.removeEventListener("animationstart", C), n.removeEventListener("animationcancel", f), n.removeEventListener("animationend", f);
|
|
486
486
|
};
|
|
487
487
|
} else
|
|
488
|
-
|
|
489
|
-
}, [n,
|
|
490
|
-
isRemain:
|
|
488
|
+
l("ANIMATION_END");
|
|
489
|
+
}, [n, l]), {
|
|
490
|
+
isRemain: po.includes(a),
|
|
491
491
|
ref: u.useCallback((d) => {
|
|
492
492
|
o.current = d ? getComputedStyle(d) : null, t(d);
|
|
493
493
|
}, [])
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function ue(e) {
|
|
497
497
|
return e?.animationName || "none";
|
|
498
498
|
}
|
|
499
|
-
const
|
|
499
|
+
const mo = Object.freeze({
|
|
500
500
|
position: "absolute",
|
|
501
501
|
border: 0,
|
|
502
502
|
width: 1,
|
|
@@ -507,31 +507,31 @@ const oo = Object.freeze({
|
|
|
507
507
|
clip: "rect(0, 0, 0, 0)",
|
|
508
508
|
whiteSpace: "nowrap",
|
|
509
509
|
wordWrap: "normal"
|
|
510
|
-
}),
|
|
511
|
-
(e, n) => /* @__PURE__ */
|
|
510
|
+
}), kt = u.forwardRef(
|
|
511
|
+
(e, n) => /* @__PURE__ */ i(
|
|
512
512
|
R.span,
|
|
513
513
|
{
|
|
514
514
|
...e,
|
|
515
515
|
ref: n,
|
|
516
|
-
style: { ...
|
|
516
|
+
style: { ...mo, ...e.style }
|
|
517
517
|
}
|
|
518
518
|
)
|
|
519
519
|
);
|
|
520
|
-
|
|
521
|
-
const
|
|
520
|
+
kt.displayName = "VisuallyHidden";
|
|
521
|
+
const ho = u.forwardRef((e, n) => {
|
|
522
522
|
const { children: t, className: o, ...s } = e;
|
|
523
|
-
return /* @__PURE__ */
|
|
523
|
+
return /* @__PURE__ */ i(ve, { ...s, ref: n, className: x("bd-reset", o), children: xt(t) });
|
|
524
524
|
});
|
|
525
|
-
|
|
526
|
-
const
|
|
525
|
+
ho.displayName = "Reset";
|
|
526
|
+
const O = (e, n, { checkForDefaultPrevented: t = !0 } = {}) => function(s) {
|
|
527
527
|
if (e?.(s), t === !1 || !s.defaultPrevented)
|
|
528
528
|
return n?.(s);
|
|
529
|
-
},
|
|
530
|
-
|
|
531
|
-
[
|
|
532
|
-
), [
|
|
533
|
-
(e, n) => /* @__PURE__ */
|
|
534
|
-
),
|
|
529
|
+
}, Be = "rovingFocusGroup.onEntryFocus", bo = { bubbles: !1, cancelable: !0 }, ye = "RovingFocusGroup", [Ge, Et, go] = uo(ye), [Co, qe] = F(
|
|
530
|
+
ye,
|
|
531
|
+
[go]
|
|
532
|
+
), [vo, yo] = Co(ye), It = u.forwardRef(
|
|
533
|
+
(e, n) => /* @__PURE__ */ i(Ge.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ i(Ge.Outlet, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ i(wo, { ...e, ref: n }) }) })
|
|
534
|
+
), wo = u.forwardRef((e, n) => {
|
|
535
535
|
const {
|
|
536
536
|
__scopeRovingFocusGroup: t,
|
|
537
537
|
orientation: o,
|
|
@@ -539,69 +539,69 @@ const A = (e, n, { checkForDefaultPrevented: t = !0 } = {}) => function(s) {
|
|
|
539
539
|
currentTabStopId: r,
|
|
540
540
|
defaultCurrentTabStopId: c,
|
|
541
541
|
onCurrentTabStopIdChange: a,
|
|
542
|
-
onEntryFocus:
|
|
542
|
+
onEntryFocus: l,
|
|
543
543
|
preventScrollOnEntryFocus: d = !1,
|
|
544
544
|
...p
|
|
545
|
-
} = e, f = u.useRef(null),
|
|
545
|
+
} = e, f = u.useRef(null), C = T(n, f), [m, y] = A({
|
|
546
546
|
prop: r,
|
|
547
547
|
defaultProp: c ?? null,
|
|
548
548
|
onChange: a,
|
|
549
|
-
caller:
|
|
550
|
-
}), [
|
|
549
|
+
caller: ye
|
|
550
|
+
}), [h, g] = u.useState(!1), v = de(l), b = Et(t), w = u.useRef(!1), [N, k] = u.useState(0);
|
|
551
551
|
return u.useEffect(() => {
|
|
552
|
-
const
|
|
553
|
-
if (
|
|
554
|
-
return
|
|
555
|
-
}, [
|
|
556
|
-
|
|
552
|
+
const S = f.current;
|
|
553
|
+
if (S)
|
|
554
|
+
return S.addEventListener(Be, v), () => S.removeEventListener(Be, v);
|
|
555
|
+
}, [v]), /* @__PURE__ */ i(
|
|
556
|
+
vo,
|
|
557
557
|
{
|
|
558
558
|
scope: t,
|
|
559
559
|
orientation: o,
|
|
560
560
|
loop: s,
|
|
561
561
|
currentTabStopId: m,
|
|
562
562
|
onItemFocus: u.useCallback(
|
|
563
|
-
(
|
|
564
|
-
[
|
|
563
|
+
(S) => y(S),
|
|
564
|
+
[y]
|
|
565
565
|
),
|
|
566
566
|
onItemShiftTab: u.useCallback(() => g(!0), []),
|
|
567
567
|
onFocusableItemAdd: u.useCallback(
|
|
568
|
-
() =>
|
|
568
|
+
() => k((S) => S + 1),
|
|
569
569
|
[]
|
|
570
570
|
),
|
|
571
571
|
onFocusableItemRemove: u.useCallback(
|
|
572
|
-
() =>
|
|
572
|
+
() => k((S) => S - 1),
|
|
573
573
|
[]
|
|
574
574
|
),
|
|
575
|
-
children: /* @__PURE__ */
|
|
575
|
+
children: /* @__PURE__ */ i(
|
|
576
576
|
R.div,
|
|
577
577
|
{
|
|
578
|
-
tabIndex:
|
|
578
|
+
tabIndex: h || N === 0 ? -1 : 0,
|
|
579
579
|
"data-orientation": o,
|
|
580
580
|
...p,
|
|
581
|
-
ref:
|
|
581
|
+
ref: C,
|
|
582
582
|
style: { outline: "none", ...e.style },
|
|
583
|
-
onMouseDown:
|
|
584
|
-
|
|
583
|
+
onMouseDown: O(e.onMouseDown, () => {
|
|
584
|
+
w.current = !0;
|
|
585
585
|
}),
|
|
586
|
-
onFocus:
|
|
587
|
-
const
|
|
588
|
-
if (
|
|
589
|
-
const
|
|
590
|
-
if (
|
|
591
|
-
const
|
|
586
|
+
onFocus: O(e.onFocus, (S) => {
|
|
587
|
+
const L = !w.current;
|
|
588
|
+
if (S.target === S.currentTarget && L && !h) {
|
|
589
|
+
const z = new CustomEvent(Be, bo);
|
|
590
|
+
if (S.currentTarget.dispatchEvent(z), !z.defaultPrevented) {
|
|
591
|
+
const $ = b().filter((V) => V.focusable), E = $.find((V) => V.active), D = $.find((V) => V.id === m), Z = [E, D, ...$].filter(
|
|
592
592
|
Boolean
|
|
593
|
-
).map((
|
|
594
|
-
|
|
593
|
+
).map((V) => V.ref.current);
|
|
594
|
+
Tt(Z, d);
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
|
|
597
|
+
w.current = !1;
|
|
598
598
|
}),
|
|
599
|
-
onBlur:
|
|
599
|
+
onBlur: O(e.onBlur, () => g(!1))
|
|
600
600
|
}
|
|
601
601
|
)
|
|
602
602
|
}
|
|
603
603
|
);
|
|
604
|
-
}),
|
|
604
|
+
}), No = "RovingFocusGroupItem", Dt = u.forwardRef(
|
|
605
605
|
(e, n) => {
|
|
606
606
|
const {
|
|
607
607
|
__scopeRovingFocusGroup: t,
|
|
@@ -610,54 +610,54 @@ const A = (e, n, { checkForDefaultPrevented: t = !0 } = {}) => function(s) {
|
|
|
610
610
|
tabStopId: r,
|
|
611
611
|
children: c,
|
|
612
612
|
...a
|
|
613
|
-
} = e,
|
|
613
|
+
} = e, l = re(), d = r || l, p = yo(No, t), f = p.currentTabStopId === d, C = Et(t), { onFocusableItemAdd: m, onFocusableItemRemove: y, currentTabStopId: h } = p;
|
|
614
614
|
return u.useEffect(() => {
|
|
615
615
|
if (o)
|
|
616
|
-
return m(), () =>
|
|
617
|
-
}, [o, m,
|
|
618
|
-
|
|
616
|
+
return m(), () => y();
|
|
617
|
+
}, [o, m, y]), /* @__PURE__ */ i(
|
|
618
|
+
Ge.ItemOutlet,
|
|
619
619
|
{
|
|
620
620
|
scope: t,
|
|
621
621
|
id: d,
|
|
622
622
|
focusable: o,
|
|
623
623
|
active: s,
|
|
624
|
-
children: /* @__PURE__ */
|
|
624
|
+
children: /* @__PURE__ */ i(
|
|
625
625
|
R.span,
|
|
626
626
|
{
|
|
627
627
|
tabIndex: f ? 0 : -1,
|
|
628
628
|
"data-orientation": p.orientation,
|
|
629
629
|
...a,
|
|
630
630
|
ref: n,
|
|
631
|
-
onMouseDown:
|
|
631
|
+
onMouseDown: O(e.onMouseDown, (g) => {
|
|
632
632
|
o ? p.onItemFocus(d) : g.preventDefault();
|
|
633
633
|
}),
|
|
634
|
-
onFocus:
|
|
635
|
-
onKeyDown:
|
|
634
|
+
onFocus: O(e.onFocus, () => p.onItemFocus(d)),
|
|
635
|
+
onKeyDown: O(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
|
|
642
|
-
if (
|
|
641
|
+
const v = xo(g, p.orientation);
|
|
642
|
+
if (v !== void 0) {
|
|
643
643
|
if (g.metaKey || g.ctrlKey || g.altKey || g.shiftKey) return;
|
|
644
644
|
g.preventDefault();
|
|
645
|
-
let
|
|
646
|
-
if (
|
|
647
|
-
else if (
|
|
648
|
-
|
|
649
|
-
const
|
|
650
|
-
|
|
645
|
+
let w = C().filter((N) => N.focusable).map((N) => N.ref.current);
|
|
646
|
+
if (v === "last") w.reverse();
|
|
647
|
+
else if (v === "prev" || v === "next") {
|
|
648
|
+
v === "prev" && w.reverse();
|
|
649
|
+
const N = w.indexOf(g.currentTarget);
|
|
650
|
+
w = p.loop ? Po(w, N + 1) : w.slice(N + 1), setTimeout(() => Tt(w));
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
}),
|
|
654
|
-
children: typeof c == "function" ? c({ hasTabStop:
|
|
654
|
+
children: typeof c == "function" ? c({ hasTabStop: h != null, isCurrentTabStop: f }) : c
|
|
655
655
|
}
|
|
656
656
|
)
|
|
657
657
|
}
|
|
658
658
|
);
|
|
659
659
|
}
|
|
660
|
-
),
|
|
660
|
+
), Ro = {
|
|
661
661
|
ArrowLeft: "prev",
|
|
662
662
|
ArrowUp: "prev",
|
|
663
663
|
ArrowRight: "next",
|
|
@@ -667,91 +667,91 @@ const A = (e, n, { checkForDefaultPrevented: t = !0 } = {}) => function(s) {
|
|
|
667
667
|
PageDown: "last",
|
|
668
668
|
End: "last"
|
|
669
669
|
};
|
|
670
|
-
function
|
|
670
|
+
function xo(e, n) {
|
|
671
671
|
const t = e.key;
|
|
672
672
|
if (!(n === "vertical" && ["ArrowLeft", "ArrowRight"].includes(t)) && !(n === "horizontal" && ["ArrowUp", "ArrowDown"].includes(t)))
|
|
673
|
-
return
|
|
673
|
+
return Ro[t];
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function Tt(e, n = !1) {
|
|
676
676
|
const t = document.activeElement;
|
|
677
677
|
for (const o of e)
|
|
678
678
|
if (o === t || (o.focus({ preventScroll: n }), document.activeElement !== t)) return;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function Po(e, n) {
|
|
681
681
|
return e.map((t, o) => e[(n + o) % e.length]);
|
|
682
682
|
}
|
|
683
|
-
const
|
|
683
|
+
const Q = {
|
|
684
684
|
asChild: {
|
|
685
685
|
type: "boolean"
|
|
686
686
|
}
|
|
687
|
-
},
|
|
687
|
+
}, we = ["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"], So = {
|
|
688
688
|
color: {
|
|
689
689
|
type: "enum | string",
|
|
690
|
-
values:
|
|
690
|
+
values: we,
|
|
691
691
|
className: "bd-color",
|
|
692
692
|
customProperties: ["--color"],
|
|
693
693
|
default: void 0
|
|
694
694
|
}
|
|
695
|
-
},
|
|
695
|
+
}, ko = {
|
|
696
696
|
borderColor: {
|
|
697
697
|
type: "enum | string",
|
|
698
|
-
values:
|
|
698
|
+
values: we,
|
|
699
699
|
className: "bd-br-color",
|
|
700
700
|
customProperties: ["--border-color"],
|
|
701
701
|
default: void 0
|
|
702
702
|
}
|
|
703
|
-
},
|
|
703
|
+
}, Eo = {
|
|
704
704
|
accentColor: {
|
|
705
705
|
type: "enum | string",
|
|
706
|
-
values:
|
|
706
|
+
values: we,
|
|
707
707
|
className: "bd-ac-color",
|
|
708
708
|
customProperties: ["--accent-color"],
|
|
709
709
|
default: void 0
|
|
710
710
|
}
|
|
711
|
-
},
|
|
711
|
+
}, W = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], K = {
|
|
712
712
|
p: {
|
|
713
713
|
type: "enum | string",
|
|
714
|
-
values:
|
|
714
|
+
values: W,
|
|
715
715
|
className: "bd-p",
|
|
716
716
|
customProperties: ["--p"]
|
|
717
717
|
},
|
|
718
718
|
px: {
|
|
719
719
|
type: "enum | string",
|
|
720
|
-
values:
|
|
720
|
+
values: W,
|
|
721
721
|
className: "bd-px",
|
|
722
722
|
customProperties: ["--px"]
|
|
723
723
|
},
|
|
724
724
|
py: {
|
|
725
725
|
type: "enum | string",
|
|
726
|
-
values:
|
|
726
|
+
values: W,
|
|
727
727
|
className: "bd-py",
|
|
728
728
|
customProperties: ["--py"]
|
|
729
729
|
},
|
|
730
730
|
pt: {
|
|
731
731
|
type: "enum | string",
|
|
732
|
-
values:
|
|
732
|
+
values: W,
|
|
733
733
|
className: "bd-pt",
|
|
734
734
|
customProperties: ["--pt"]
|
|
735
735
|
},
|
|
736
736
|
pr: {
|
|
737
737
|
type: "enum | string",
|
|
738
|
-
values:
|
|
738
|
+
values: W,
|
|
739
739
|
className: "bd-pr",
|
|
740
740
|
customProperties: ["--pr"]
|
|
741
741
|
},
|
|
742
742
|
pb: {
|
|
743
743
|
type: "enum | string",
|
|
744
|
-
values:
|
|
744
|
+
values: W,
|
|
745
745
|
className: "bd-pb",
|
|
746
746
|
customProperties: ["--pb"]
|
|
747
747
|
},
|
|
748
748
|
pl: {
|
|
749
749
|
type: "enum | string",
|
|
750
|
-
values:
|
|
750
|
+
values: W,
|
|
751
751
|
className: "bd-pl",
|
|
752
752
|
customProperties: ["--pl"]
|
|
753
753
|
}
|
|
754
|
-
},
|
|
754
|
+
}, _t = {
|
|
755
755
|
width: {
|
|
756
756
|
type: "string",
|
|
757
757
|
className: "bd-w",
|
|
@@ -767,7 +767,7 @@ const K = {
|
|
|
767
767
|
className: "bd-max-w",
|
|
768
768
|
customProperties: ["--max-width"]
|
|
769
769
|
}
|
|
770
|
-
},
|
|
770
|
+
}, Io = {
|
|
771
771
|
height: {
|
|
772
772
|
type: "string",
|
|
773
773
|
className: "bd-h",
|
|
@@ -783,59 +783,59 @@ const K = {
|
|
|
783
783
|
className: "bd-max-h",
|
|
784
784
|
customProperties: ["--max-height"]
|
|
785
785
|
}
|
|
786
|
-
},
|
|
787
|
-
...
|
|
788
|
-
...
|
|
789
|
-
...
|
|
786
|
+
}, Do = ["static", "relative", "absolute", "fixed", "sticky"], Me = ["visible", "hidden", "clip", "scroll", "auto"], te = ["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"], To = ["0", "1"], _o = ["0", "1"], Bo = ["start", "center", "end", "baseline", "stretch"], Mo = ["start", "center", "end", "baseline", "stretch"], Ao = {
|
|
787
|
+
..._t,
|
|
788
|
+
...Io,
|
|
789
|
+
...K,
|
|
790
790
|
position: {
|
|
791
791
|
type: "enum",
|
|
792
792
|
className: "bd-position",
|
|
793
|
-
values:
|
|
793
|
+
values: Do
|
|
794
794
|
},
|
|
795
795
|
inset: {
|
|
796
796
|
type: "enum | string",
|
|
797
797
|
className: "bd-inset",
|
|
798
798
|
customProperties: ["--inset"],
|
|
799
|
-
values:
|
|
799
|
+
values: te
|
|
800
800
|
},
|
|
801
801
|
top: {
|
|
802
802
|
type: "enum | string",
|
|
803
803
|
className: "bd-top",
|
|
804
804
|
customProperties: ["--top"],
|
|
805
|
-
values:
|
|
805
|
+
values: te
|
|
806
806
|
},
|
|
807
807
|
right: {
|
|
808
808
|
type: "enum | string",
|
|
809
809
|
className: "bd-right",
|
|
810
810
|
customProperties: ["--right"],
|
|
811
|
-
values:
|
|
811
|
+
values: te
|
|
812
812
|
},
|
|
813
813
|
bottom: {
|
|
814
814
|
type: "enum | string",
|
|
815
815
|
className: "bd-bottom",
|
|
816
816
|
customProperties: ["--bottom"],
|
|
817
|
-
values:
|
|
817
|
+
values: te
|
|
818
818
|
},
|
|
819
819
|
left: {
|
|
820
820
|
type: "enum | string",
|
|
821
821
|
className: "bd-left",
|
|
822
822
|
customProperties: ["--left"],
|
|
823
|
-
values:
|
|
823
|
+
values: te
|
|
824
824
|
},
|
|
825
825
|
overflow: {
|
|
826
826
|
type: "enum",
|
|
827
827
|
className: "bd-overflow",
|
|
828
|
-
values:
|
|
828
|
+
values: Me
|
|
829
829
|
},
|
|
830
830
|
overflowX: {
|
|
831
831
|
type: "enum",
|
|
832
832
|
className: "bd-ox",
|
|
833
|
-
values:
|
|
833
|
+
values: Me
|
|
834
834
|
},
|
|
835
835
|
overflowY: {
|
|
836
836
|
type: "enum",
|
|
837
837
|
className: "bd-oy",
|
|
838
|
-
values:
|
|
838
|
+
values: Me
|
|
839
839
|
},
|
|
840
840
|
flexBasis: {
|
|
841
841
|
type: "string",
|
|
@@ -846,13 +846,13 @@ const K = {
|
|
|
846
846
|
type: "enum | string",
|
|
847
847
|
className: "bd-fs",
|
|
848
848
|
customProperties: ["--flex-shrink"],
|
|
849
|
-
values:
|
|
849
|
+
values: To
|
|
850
850
|
},
|
|
851
851
|
flexGrow: {
|
|
852
852
|
type: "enum | string",
|
|
853
853
|
className: "bd-fg",
|
|
854
854
|
customProperties: ["--flex-grow"],
|
|
855
|
-
values:
|
|
855
|
+
values: _o
|
|
856
856
|
},
|
|
857
857
|
gridArea: {
|
|
858
858
|
type: "string",
|
|
@@ -892,205 +892,205 @@ const K = {
|
|
|
892
892
|
alignSelf: {
|
|
893
893
|
type: "enum",
|
|
894
894
|
className: "bd-as",
|
|
895
|
-
values:
|
|
895
|
+
values: Bo
|
|
896
896
|
},
|
|
897
897
|
justifySelf: {
|
|
898
898
|
type: "enum",
|
|
899
899
|
className: "bd-js",
|
|
900
|
-
values:
|
|
900
|
+
values: Mo
|
|
901
901
|
}
|
|
902
|
-
},
|
|
902
|
+
}, Y = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"], H = {
|
|
903
903
|
m: {
|
|
904
904
|
type: "enum | string",
|
|
905
|
-
values:
|
|
905
|
+
values: Y,
|
|
906
906
|
className: "bd-m",
|
|
907
907
|
customProperties: ["--m"]
|
|
908
908
|
},
|
|
909
909
|
mx: {
|
|
910
910
|
type: "enum | string",
|
|
911
|
-
values:
|
|
911
|
+
values: Y,
|
|
912
912
|
className: "bd-mx",
|
|
913
913
|
customProperties: ["--ml", "--mr"]
|
|
914
914
|
},
|
|
915
915
|
my: {
|
|
916
916
|
type: "enum | string",
|
|
917
|
-
values:
|
|
917
|
+
values: Y,
|
|
918
918
|
className: "bd-my",
|
|
919
919
|
customProperties: ["--mt", "--mb"]
|
|
920
920
|
},
|
|
921
921
|
mt: {
|
|
922
922
|
type: "enum | string",
|
|
923
|
-
values:
|
|
923
|
+
values: Y,
|
|
924
924
|
className: "bd-mt",
|
|
925
925
|
customProperties: ["--mt"]
|
|
926
926
|
},
|
|
927
927
|
mr: {
|
|
928
928
|
type: "enum | string",
|
|
929
|
-
values:
|
|
929
|
+
values: Y,
|
|
930
930
|
className: "bd-mr",
|
|
931
931
|
customProperties: ["--mr"]
|
|
932
932
|
},
|
|
933
933
|
mb: {
|
|
934
934
|
type: "enum | string",
|
|
935
|
-
values:
|
|
935
|
+
values: Y,
|
|
936
936
|
className: "bd-mb",
|
|
937
937
|
customProperties: ["--mb"]
|
|
938
938
|
},
|
|
939
939
|
ml: {
|
|
940
940
|
type: "enum | string",
|
|
941
|
-
values:
|
|
941
|
+
values: Y,
|
|
942
942
|
className: "bd-ml",
|
|
943
943
|
customProperties: ["--ml"]
|
|
944
944
|
}
|
|
945
|
-
},
|
|
945
|
+
}, Oo = ["left", "center", "right"], Fo = {
|
|
946
946
|
align: {
|
|
947
947
|
type: "enum",
|
|
948
|
-
values:
|
|
948
|
+
values: Oo,
|
|
949
949
|
className: "bd-ta"
|
|
950
950
|
}
|
|
951
|
-
},
|
|
951
|
+
}, Vo = ["wrap", "nowrap", "pretty", "balance"], Go = {
|
|
952
952
|
wrap: {
|
|
953
953
|
type: "enum",
|
|
954
954
|
className: "bd-tw",
|
|
955
|
-
values:
|
|
955
|
+
values: Vo
|
|
956
956
|
}
|
|
957
|
-
},
|
|
957
|
+
}, Lo = ["light", "regular", "medium", "semibold", "bold"], We = {
|
|
958
958
|
weight: {
|
|
959
959
|
type: "enum",
|
|
960
|
-
values:
|
|
960
|
+
values: Lo,
|
|
961
961
|
className: "bd-weight"
|
|
962
962
|
}
|
|
963
|
-
},
|
|
963
|
+
}, zo = {
|
|
964
964
|
truncate: {
|
|
965
965
|
type: "boolean",
|
|
966
966
|
className: "bd-truncate"
|
|
967
967
|
}
|
|
968
|
-
},
|
|
968
|
+
}, $o = ["normal", "start", "end", "both"], Uo = {
|
|
969
969
|
trim: {
|
|
970
970
|
type: "enum",
|
|
971
971
|
className: "bd-lt",
|
|
972
|
-
values:
|
|
972
|
+
values: $o,
|
|
973
973
|
default: "normal"
|
|
974
974
|
}
|
|
975
|
-
},
|
|
975
|
+
}, jo = ["none", "s", "m", "l", "full"], Ho = {
|
|
976
976
|
radius: {
|
|
977
977
|
type: "enum | string",
|
|
978
|
-
values:
|
|
978
|
+
values: jo,
|
|
979
979
|
default: void 0,
|
|
980
980
|
className: "bd-radius",
|
|
981
981
|
customProperties: ["--radius"]
|
|
982
982
|
}
|
|
983
|
-
},
|
|
983
|
+
}, Ae = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], Bt = {
|
|
984
984
|
gap: {
|
|
985
985
|
type: "enum | string",
|
|
986
986
|
className: "bd-gap",
|
|
987
987
|
customProperties: ["--gap"],
|
|
988
|
-
values:
|
|
988
|
+
values: Ae
|
|
989
989
|
},
|
|
990
990
|
gapX: {
|
|
991
991
|
type: "enum | string",
|
|
992
992
|
className: "bd-cg",
|
|
993
993
|
customProperties: ["--col-gap"],
|
|
994
|
-
values:
|
|
994
|
+
values: Ae
|
|
995
995
|
},
|
|
996
996
|
gapY: {
|
|
997
997
|
type: "enum | string",
|
|
998
998
|
className: "bd-rg",
|
|
999
999
|
customProperties: ["--row-gap"],
|
|
1000
|
-
values:
|
|
1000
|
+
values: Ae
|
|
1001
1001
|
}
|
|
1002
|
-
},
|
|
1003
|
-
as: { type: "enum", values:
|
|
1004
|
-
...
|
|
1002
|
+
}, qo = ["span", "div", "label", "p"], Wo = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"], Yo = {
|
|
1003
|
+
as: { type: "enum", values: qo, default: "span" },
|
|
1004
|
+
...Q,
|
|
1005
1005
|
size: {
|
|
1006
1006
|
type: "enum | string",
|
|
1007
1007
|
className: "bd-size",
|
|
1008
|
-
values:
|
|
1008
|
+
values: Wo,
|
|
1009
1009
|
customProperties: ["--size"]
|
|
1010
1010
|
},
|
|
1011
|
-
...
|
|
1012
|
-
|
|
1013
|
-
...
|
|
1014
|
-
...
|
|
1015
|
-
...
|
|
1016
|
-
...
|
|
1017
|
-
...
|
|
1018
|
-
...
|
|
1019
|
-
},
|
|
1011
|
+
...Q,
|
|
1012
|
+
...H,
|
|
1013
|
+
...Fo,
|
|
1014
|
+
...Go,
|
|
1015
|
+
...We,
|
|
1016
|
+
...zo,
|
|
1017
|
+
...Uo,
|
|
1018
|
+
...So
|
|
1019
|
+
}, ae = u.forwardRef((e, n) => {
|
|
1020
1020
|
const {
|
|
1021
1021
|
children: t,
|
|
1022
1022
|
className: o,
|
|
1023
1023
|
asChild: s,
|
|
1024
1024
|
as: r = "span",
|
|
1025
1025
|
...c
|
|
1026
|
-
} =
|
|
1027
|
-
return /* @__PURE__ */
|
|
1026
|
+
} = I(e, Yo);
|
|
1027
|
+
return /* @__PURE__ */ i(ve, { ...c, ref: n, className: x("bd-Text", o), children: s ? t : /* @__PURE__ */ i(r, { children: t }) });
|
|
1028
1028
|
});
|
|
1029
|
-
|
|
1030
|
-
const
|
|
1031
|
-
as: { type: "enum", values:
|
|
1032
|
-
...
|
|
1029
|
+
ae.displayName = "Text";
|
|
1030
|
+
const Ko = (e) => e === "between" ? "space-between" : e, Xo = ["div", "span"], Zo = ["none", "inline-flex", "flex"], Jo = ["row", "column", "row-reverse", "column-reverse"], Qo = ["start", "center", "end", "baseline", "stretch"], es = ["start", "center", "end", "between"], ts = ["nowrap", "wrap", "wrap-reverse"], Ye = {
|
|
1031
|
+
as: { type: "enum", values: Xo, default: "div" },
|
|
1032
|
+
...Q,
|
|
1033
1033
|
display: {
|
|
1034
1034
|
type: "enum",
|
|
1035
1035
|
className: "bd-display",
|
|
1036
|
-
values:
|
|
1036
|
+
values: Zo
|
|
1037
1037
|
},
|
|
1038
1038
|
direction: {
|
|
1039
1039
|
type: "enum",
|
|
1040
1040
|
className: "bd-fd",
|
|
1041
|
-
values:
|
|
1041
|
+
values: Jo
|
|
1042
1042
|
},
|
|
1043
1043
|
align: {
|
|
1044
1044
|
type: "enum",
|
|
1045
1045
|
className: "bd-ai",
|
|
1046
|
-
values:
|
|
1046
|
+
values: Qo
|
|
1047
1047
|
},
|
|
1048
1048
|
justify: {
|
|
1049
1049
|
type: "enum",
|
|
1050
1050
|
className: "bd-jc",
|
|
1051
|
-
values:
|
|
1052
|
-
parseValue:
|
|
1051
|
+
values: es,
|
|
1052
|
+
parseValue: Ko
|
|
1053
1053
|
},
|
|
1054
1054
|
wrap: {
|
|
1055
1055
|
type: "enum",
|
|
1056
1056
|
className: "bd-fw",
|
|
1057
|
-
values:
|
|
1057
|
+
values: ts
|
|
1058
1058
|
},
|
|
1059
|
-
...
|
|
1060
|
-
...
|
|
1061
|
-
|
|
1062
|
-
},
|
|
1063
|
-
const { className: t, asChild: o, as: s = "div", ...r } =
|
|
1064
|
-
return /* @__PURE__ */
|
|
1059
|
+
...Bt,
|
|
1060
|
+
...Ao,
|
|
1061
|
+
...H
|
|
1062
|
+
}, B = u.forwardRef((e, n) => {
|
|
1063
|
+
const { className: t, asChild: o, as: s = "div", ...r } = I(e, Ye);
|
|
1064
|
+
return /* @__PURE__ */ i(o ? ve : s, { ...r, ref: n, className: x("bd-Flex", t) });
|
|
1065
1065
|
});
|
|
1066
|
-
|
|
1067
|
-
const
|
|
1068
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1066
|
+
B.displayName = "Flex";
|
|
1067
|
+
const ns = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], os = {
|
|
1068
|
+
size: { type: "enum", className: "bd-size", values: ns, default: "2" },
|
|
1069
1069
|
loading: { type: "boolean", default: !0 },
|
|
1070
|
-
color: { type: "enum", className: "bd-color", values:
|
|
1071
|
-
|
|
1072
|
-
},
|
|
1073
|
-
const { className: t, children: o, loading: s, ...r } =
|
|
1070
|
+
color: { type: "enum", className: "bd-color", values: we },
|
|
1071
|
+
...H
|
|
1072
|
+
}, Mt = u.forwardRef((e, n) => {
|
|
1073
|
+
const { className: t, children: o, loading: s, ...r } = I(
|
|
1074
1074
|
e,
|
|
1075
|
-
|
|
1076
|
-
|
|
1075
|
+
os,
|
|
1076
|
+
ko
|
|
1077
1077
|
);
|
|
1078
1078
|
if (!s) return o;
|
|
1079
|
-
const c = /* @__PURE__ */
|
|
1080
|
-
return o === void 0 ? c : /* @__PURE__ */ P(
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
/* @__PURE__ */
|
|
1079
|
+
const c = /* @__PURE__ */ i("span", { ...r, ref: n, className: x("bd-Spinner", t) });
|
|
1080
|
+
return o === void 0 ? c : /* @__PURE__ */ P(B, { 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(B, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ i("span", { children: c }) })
|
|
1083
1083
|
] });
|
|
1084
1084
|
});
|
|
1085
|
-
|
|
1086
|
-
const
|
|
1085
|
+
Mt.displayName = "Spinner";
|
|
1086
|
+
const ss = ["1", "2", "3", "4", "5"], rs = [
|
|
1087
1087
|
"fill-primary",
|
|
1088
1088
|
"fill-secondary",
|
|
1089
1089
|
"outline-primary",
|
|
1090
1090
|
"outline-secondary",
|
|
1091
1091
|
"ghost"
|
|
1092
|
-
],
|
|
1093
|
-
...
|
|
1092
|
+
], Oe = {
|
|
1093
|
+
...Q,
|
|
1094
1094
|
/**
|
|
1095
1095
|
* @description 버튼의 높이 기준
|
|
1096
1096
|
*
|
|
@@ -1100,15 +1100,15 @@ const Ko = ["1", "2", "3", "4", "5"], Wo = [
|
|
|
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: ss, default: "5" },
|
|
1104
|
+
variant: { type: "enum", className: "bd-variant", values: rs, default: "fill-primary" },
|
|
1105
|
+
..._t,
|
|
1106
|
+
...H,
|
|
1107
|
+
...Bt,
|
|
1108
|
+
...Ho,
|
|
1109
|
+
...We,
|
|
1110
1110
|
loading: { type: "boolean", className: "bd-loading", default: !1 }
|
|
1111
|
-
},
|
|
1111
|
+
}, as = (e) => {
|
|
1112
1112
|
switch (e) {
|
|
1113
1113
|
case "1":
|
|
1114
1114
|
return "1";
|
|
@@ -1119,7 +1119,7 @@ const Ko = ["1", "2", "3", "4", "5"], Wo = [
|
|
|
1119
1119
|
case "5":
|
|
1120
1120
|
return "3";
|
|
1121
1121
|
}
|
|
1122
|
-
},
|
|
1122
|
+
}, cs = (e) => {
|
|
1123
1123
|
switch (e) {
|
|
1124
1124
|
case "fill-primary":
|
|
1125
1125
|
return;
|
|
@@ -1131,41 +1131,41 @@ const Ko = ["1", "2", "3", "4", "5"], Wo = [
|
|
|
1131
1131
|
default:
|
|
1132
1132
|
return;
|
|
1133
1133
|
}
|
|
1134
|
-
},
|
|
1135
|
-
const { variant: t =
|
|
1134
|
+
}, oe = u.forwardRef((e, n) => {
|
|
1135
|
+
const { variant: t = Oe.variant.default, size: o = Oe.size.default } = e, {
|
|
1136
1136
|
className: s,
|
|
1137
1137
|
children: r,
|
|
1138
1138
|
asChild: c,
|
|
1139
1139
|
disabled: a = e.loading,
|
|
1140
|
-
...
|
|
1141
|
-
} =
|
|
1142
|
-
return /* @__PURE__ */
|
|
1143
|
-
c ?
|
|
1140
|
+
...l
|
|
1141
|
+
} = I(e, Oe);
|
|
1142
|
+
return /* @__PURE__ */ i(
|
|
1143
|
+
c ? ve : "button",
|
|
1144
1144
|
{
|
|
1145
1145
|
"data-disabled": a || void 0,
|
|
1146
1146
|
"data-loading": e.loading || void 0,
|
|
1147
1147
|
disabled: a,
|
|
1148
|
-
...
|
|
1148
|
+
...l,
|
|
1149
1149
|
ref: n,
|
|
1150
1150
|
className: x("bd-Button", s),
|
|
1151
|
-
children: e.loading ? /* @__PURE__ */ P(
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
-
/* @__PURE__ */
|
|
1155
|
-
|
|
1151
|
+
children: e.loading ? /* @__PURE__ */ P(me, { children: [
|
|
1152
|
+
/* @__PURE__ */ i("span", { style: { display: "contents", visibility: "hidden" }, "aria-hidden": !0, children: r }),
|
|
1153
|
+
/* @__PURE__ */ i(kt, { children: r }),
|
|
1154
|
+
/* @__PURE__ */ i(B, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
1155
|
+
Mt,
|
|
1156
1156
|
{
|
|
1157
|
-
size:
|
|
1158
|
-
color:
|
|
1157
|
+
size: as(o),
|
|
1158
|
+
color: cs(t)
|
|
1159
1159
|
}
|
|
1160
1160
|
) }) })
|
|
1161
1161
|
] }) : r
|
|
1162
1162
|
}
|
|
1163
1163
|
);
|
|
1164
1164
|
});
|
|
1165
|
-
|
|
1166
|
-
const
|
|
1165
|
+
oe.displayName = "Button";
|
|
1166
|
+
const Ne = u.forwardRef((e, n) => {
|
|
1167
1167
|
const { color: t = "currentColor", ...o } = e;
|
|
1168
|
-
return /* @__PURE__ */
|
|
1168
|
+
return /* @__PURE__ */ i(
|
|
1169
1169
|
"svg",
|
|
1170
1170
|
{
|
|
1171
1171
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1175,7 +1175,7 @@ const be = u.forwardRef((e, n) => {
|
|
|
1175
1175
|
fill: "none",
|
|
1176
1176
|
...o,
|
|
1177
1177
|
ref: n,
|
|
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 be = u.forwardRef((e, n) => {
|
|
|
1187
1187
|
)
|
|
1188
1188
|
}
|
|
1189
1189
|
);
|
|
1190
|
-
}),
|
|
1190
|
+
}), is = u.forwardRef((e, n) => {
|
|
1191
1191
|
const { color: t = "currentColor", ...o } = e;
|
|
1192
|
-
return /* @__PURE__ */
|
|
1192
|
+
return /* @__PURE__ */ i(
|
|
1193
1193
|
"svg",
|
|
1194
1194
|
{
|
|
1195
1195
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1199,7 +1199,7 @@ const be = u.forwardRef((e, n) => {
|
|
|
1199
1199
|
fill: t,
|
|
1200
1200
|
...o,
|
|
1201
1201
|
ref: n,
|
|
1202
|
-
children: /* @__PURE__ */
|
|
1202
|
+
children: /* @__PURE__ */ i(
|
|
1203
1203
|
"path",
|
|
1204
1204
|
{
|
|
1205
1205
|
fillRule: "evenodd",
|
|
@@ -1209,9 +1209,9 @@ const be = u.forwardRef((e, n) => {
|
|
|
1209
1209
|
)
|
|
1210
1210
|
}
|
|
1211
1211
|
);
|
|
1212
|
-
}),
|
|
1212
|
+
}), ls = u.forwardRef((e, n) => {
|
|
1213
1213
|
const { color: t = "currentColor", width: o = 20, height: s = 20, ...r } = e;
|
|
1214
|
-
return /* @__PURE__ */
|
|
1214
|
+
return /* @__PURE__ */ i(
|
|
1215
1215
|
"svg",
|
|
1216
1216
|
{
|
|
1217
1217
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1221,7 +1221,7 @@ const be = u.forwardRef((e, n) => {
|
|
|
1221
1221
|
fill: "none",
|
|
1222
1222
|
...r,
|
|
1223
1223
|
ref: n,
|
|
1224
|
-
children: /* @__PURE__ */
|
|
1224
|
+
children: /* @__PURE__ */ i(
|
|
1225
1225
|
"path",
|
|
1226
1226
|
{
|
|
1227
1227
|
d: "M12.3385 16.9999C12.1891 17.0004 12.0415 16.9675 11.9065 16.9034C11.7715 16.8394 11.6525 16.746 11.5584 16.63L6.72753 10.6305C6.58042 10.4516 6.5 10.2272 6.5 9.99559C6.5 9.76399 6.58042 9.53957 6.72753 9.36065L11.7284 3.36122C11.8982 3.15702 12.1422 3.02861 12.4066 3.00423C12.6711 2.97985 12.9344 3.06151 13.1387 3.23123C13.3429 3.40095 13.4714 3.64484 13.4958 3.90924C13.5202 4.17364 13.4385 4.4369 13.2687 4.6411L8.7979 10.0006L13.1187 15.3601C13.241 15.5069 13.3187 15.6856 13.3426 15.8751C13.3664 16.0646 13.3355 16.257 13.2534 16.4296C13.1714 16.6021 13.0416 16.7475 12.8795 16.8486C12.7173 16.9496 12.5296 17.0022 12.3385 16.9999Z",
|
|
@@ -1230,9 +1230,9 @@ const be = u.forwardRef((e, n) => {
|
|
|
1230
1230
|
)
|
|
1231
1231
|
}
|
|
1232
1232
|
);
|
|
1233
|
-
}),
|
|
1233
|
+
}), us = u.forwardRef((e, n) => {
|
|
1234
1234
|
const { color: t = "currentColor", width: o = 20, height: s = 20, ...r } = e;
|
|
1235
|
-
return /* @__PURE__ */
|
|
1235
|
+
return /* @__PURE__ */ i(
|
|
1236
1236
|
"svg",
|
|
1237
1237
|
{
|
|
1238
1238
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1242,7 +1242,7 @@ const be = u.forwardRef((e, n) => {
|
|
|
1242
1242
|
fill: "none",
|
|
1243
1243
|
...r,
|
|
1244
1244
|
ref: n,
|
|
1245
|
-
children: /* @__PURE__ */
|
|
1245
|
+
children: /* @__PURE__ */ i(
|
|
1246
1246
|
"path",
|
|
1247
1247
|
{
|
|
1248
1248
|
d: "M7.66146 3.00007C7.81088 2.99956 7.95852 3.03253 8.09352 3.09655C8.22853 3.16057 8.34747 3.25403 8.4416 3.37003L13.2725 9.36947C13.4196 9.54838 13.5 9.77281 13.5 10.0044C13.5 10.236 13.4196 10.4604 13.2725 10.6393L8.27157 16.6388C8.1018 16.843 7.85785 16.9714 7.59337 16.9958C7.3289 17.0201 7.06557 16.9385 6.86132 16.7688C6.65706 16.599 6.52862 16.3552 6.50423 16.0908C6.47985 15.8264 6.56152 15.5631 6.73129 15.3589L11.2021 9.99941L6.88132 4.63991C6.75902 4.49314 6.68133 4.31442 6.65744 4.12489C6.63356 3.93536 6.66448 3.74295 6.74655 3.57044C6.82862 3.39793 6.95841 3.25253 7.12054 3.15145C7.28268 3.05037 7.47039 2.99784 7.66146 3.00007Z",
|
|
@@ -1251,9 +1251,9 @@ const be = u.forwardRef((e, n) => {
|
|
|
1251
1251
|
)
|
|
1252
1252
|
}
|
|
1253
1253
|
);
|
|
1254
|
-
}),
|
|
1254
|
+
}), ds = u.forwardRef((e, n) => {
|
|
1255
1255
|
const { color: t = "currentColor", width: o = 20, height: s = 20, ...r } = e;
|
|
1256
|
-
return /* @__PURE__ */
|
|
1256
|
+
return /* @__PURE__ */ i(
|
|
1257
1257
|
"svg",
|
|
1258
1258
|
{
|
|
1259
1259
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1263,7 +1263,7 @@ const be = u.forwardRef((e, n) => {
|
|
|
1263
1263
|
fill: "none",
|
|
1264
1264
|
...r,
|
|
1265
1265
|
ref: n,
|
|
1266
|
-
children: /* @__PURE__ */
|
|
1266
|
+
children: /* @__PURE__ */ i(
|
|
1267
1267
|
"path",
|
|
1268
1268
|
{
|
|
1269
1269
|
d: "M15 8.82962C15.0003 8.93634 14.9768 9.0418 14.931 9.13823C14.8853 9.23466 14.8186 9.31962 14.7357 9.38686L10.4504 12.8375C10.3226 12.9426 10.1623 13 9.99685 13C9.83142 13 9.67112 12.9426 9.54332 12.8375L5.25801 9.26541C5.11216 9.14414 5.02043 8.96989 5.00302 8.78098C4.98561 8.59207 5.04393 8.40398 5.16516 8.25808C5.2864 8.11219 5.4606 8.02044 5.64946 8.00302C5.83832 7.98561 6.02636 8.04395 6.17221 8.16521L10.0004 11.3586L13.8286 8.27237C13.9335 8.18501 14.0611 8.12952 14.1965 8.11246C14.3319 8.0954 14.4693 8.11749 14.5925 8.17611C14.7158 8.23473 14.8196 8.32743 14.8918 8.44325C14.964 8.55906 15.0015 8.69314 15 8.82962Z",
|
|
@@ -1272,11 +1272,11 @@ const be = u.forwardRef((e, n) => {
|
|
|
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
|
+
}), ps = ["1", "2", "3", "4"], fs = ["classic", "circle", "outline"], X = {
|
|
1276
|
+
size: { type: "enum", className: "bd-size", values: ps, default: "2" },
|
|
1277
|
+
variant: { type: "enum", className: "bd-variant", values: fs, default: "classic" }
|
|
1278
|
+
}, Ke = "Checkbox", [ms, At] = F(Ke), [hs, Xe] = ms(Ke);
|
|
1279
|
+
function Ot(e) {
|
|
1280
1280
|
const {
|
|
1281
1281
|
__scopeCheckbox: n,
|
|
1282
1282
|
checked: t,
|
|
@@ -1285,42 +1285,42 @@ function Rt(e) {
|
|
|
1285
1285
|
name: r,
|
|
1286
1286
|
form: c,
|
|
1287
1287
|
disabled: a,
|
|
1288
|
-
value:
|
|
1288
|
+
value: l = "on",
|
|
1289
1289
|
children: d,
|
|
1290
1290
|
onCheckedChange: p,
|
|
1291
1291
|
// @ts-expect-error - Internal prop for render
|
|
1292
1292
|
__internal: f
|
|
1293
|
-
} = e, [
|
|
1293
|
+
} = e, [C, m] = A({
|
|
1294
1294
|
prop: t,
|
|
1295
1295
|
defaultProp: o ?? !1,
|
|
1296
1296
|
onChange: p,
|
|
1297
|
-
caller:
|
|
1298
|
-
}), [
|
|
1299
|
-
checked:
|
|
1297
|
+
caller: Ke
|
|
1298
|
+
}), [y, h] = u.useState(null), [g, v] = u.useState(null), b = u.useRef(!1), w = y ? !!c || !!y.closest("form") : !0, N = {
|
|
1299
|
+
checked: C,
|
|
1300
1300
|
disabled: a,
|
|
1301
1301
|
setChecked: m,
|
|
1302
|
-
control:
|
|
1303
|
-
setControl:
|
|
1302
|
+
control: y,
|
|
1303
|
+
setControl: h,
|
|
1304
1304
|
name: r,
|
|
1305
1305
|
form: c,
|
|
1306
|
-
value:
|
|
1306
|
+
value: l,
|
|
1307
1307
|
hasConsumerStoppedPropagationRef: b,
|
|
1308
1308
|
required: s,
|
|
1309
|
-
defaultChecked:
|
|
1310
|
-
isFormControl:
|
|
1309
|
+
defaultChecked: j(o) ? !1 : o,
|
|
1310
|
+
isFormControl: w,
|
|
1311
1311
|
bubbleInput: g,
|
|
1312
|
-
setBubbleInput:
|
|
1312
|
+
setBubbleInput: v
|
|
1313
1313
|
};
|
|
1314
|
-
return /* @__PURE__ */
|
|
1315
|
-
|
|
1314
|
+
return /* @__PURE__ */ i(
|
|
1315
|
+
hs,
|
|
1316
1316
|
{
|
|
1317
1317
|
scope: n,
|
|
1318
|
-
...
|
|
1319
|
-
children:
|
|
1318
|
+
...N,
|
|
1319
|
+
children: bs(f) ? f(N) : d
|
|
1320
1320
|
}
|
|
1321
1321
|
);
|
|
1322
1322
|
}
|
|
1323
|
-
const
|
|
1323
|
+
const Ft = "CheckboxTrigger", Vt = u.forwardRef(
|
|
1324
1324
|
({
|
|
1325
1325
|
__scopeCheckbox: e,
|
|
1326
1326
|
onKeyDown: n,
|
|
@@ -1331,45 +1331,45 @@ const xt = "CheckboxTrigger", Pt = u.forwardRef(
|
|
|
1331
1331
|
control: r,
|
|
1332
1332
|
value: c,
|
|
1333
1333
|
disabled: a,
|
|
1334
|
-
checked:
|
|
1334
|
+
checked: l,
|
|
1335
1335
|
required: d,
|
|
1336
1336
|
setControl: p,
|
|
1337
1337
|
setChecked: f,
|
|
1338
|
-
hasConsumerStoppedPropagationRef:
|
|
1338
|
+
hasConsumerStoppedPropagationRef: C,
|
|
1339
1339
|
isFormControl: m,
|
|
1340
|
-
bubbleInput:
|
|
1341
|
-
} =
|
|
1340
|
+
bubbleInput: y
|
|
1341
|
+
} = Xe(Ft, e), h = T(s, p), g = u.useRef(l);
|
|
1342
1342
|
return u.useEffect(() => {
|
|
1343
|
-
const
|
|
1344
|
-
if (
|
|
1343
|
+
const v = r?.form;
|
|
1344
|
+
if (v) {
|
|
1345
1345
|
const b = () => f(g.current);
|
|
1346
|
-
return
|
|
1346
|
+
return v.addEventListener("reset", b), () => v.removeEventListener("reset", b);
|
|
1347
1347
|
}
|
|
1348
|
-
}, [r, f]), /* @__PURE__ */
|
|
1348
|
+
}, [r, f]), /* @__PURE__ */ i(
|
|
1349
1349
|
R.button,
|
|
1350
1350
|
{
|
|
1351
1351
|
type: "button",
|
|
1352
1352
|
role: "checkbox",
|
|
1353
|
-
"aria-checked":
|
|
1353
|
+
"aria-checked": j(l) ? "mixed" : l,
|
|
1354
1354
|
"aria-required": d,
|
|
1355
|
-
"data-state":
|
|
1355
|
+
"data-state": Ut(l),
|
|
1356
1356
|
"data-disabled": a ? "" : void 0,
|
|
1357
1357
|
disabled: a,
|
|
1358
1358
|
value: c,
|
|
1359
1359
|
...o,
|
|
1360
|
-
ref:
|
|
1361
|
-
onKeyDown:
|
|
1362
|
-
|
|
1360
|
+
ref: h,
|
|
1361
|
+
onKeyDown: O(n, (v) => {
|
|
1362
|
+
v.key === "Enter" && v.preventDefault();
|
|
1363
1363
|
}),
|
|
1364
|
-
onClick:
|
|
1365
|
-
f((b) =>
|
|
1364
|
+
onClick: O(t, (v) => {
|
|
1365
|
+
f((b) => j(b) ? !0 : !b), y && m && (C.current = v.isPropagationStopped(), C.current || v.stopPropagation());
|
|
1366
1366
|
})
|
|
1367
1367
|
}
|
|
1368
1368
|
);
|
|
1369
1369
|
}
|
|
1370
1370
|
);
|
|
1371
|
-
|
|
1372
|
-
const
|
|
1371
|
+
Vt.displayName = Ft;
|
|
1372
|
+
const Gt = u.forwardRef(
|
|
1373
1373
|
(e, n) => {
|
|
1374
1374
|
const {
|
|
1375
1375
|
__scopeCheckbox: t,
|
|
@@ -1378,13 +1378,13 @@ const St = u.forwardRef(
|
|
|
1378
1378
|
defaultChecked: r,
|
|
1379
1379
|
required: c,
|
|
1380
1380
|
disabled: a,
|
|
1381
|
-
value:
|
|
1381
|
+
value: l,
|
|
1382
1382
|
onCheckedChange: d,
|
|
1383
1383
|
form: p,
|
|
1384
1384
|
...f
|
|
1385
1385
|
} = e;
|
|
1386
|
-
return /* @__PURE__ */
|
|
1387
|
-
|
|
1386
|
+
return /* @__PURE__ */ i(
|
|
1387
|
+
Ot,
|
|
1388
1388
|
{
|
|
1389
1389
|
__scopeCheckbox: t,
|
|
1390
1390
|
checked: s,
|
|
@@ -1393,19 +1393,19 @@ const St = u.forwardRef(
|
|
|
1393
1393
|
name: o,
|
|
1394
1394
|
form: p,
|
|
1395
1395
|
disabled: a,
|
|
1396
|
-
value:
|
|
1396
|
+
value: l,
|
|
1397
1397
|
onCheckedChange: d,
|
|
1398
|
-
__internal: ({ isFormControl:
|
|
1399
|
-
/* @__PURE__ */
|
|
1400
|
-
|
|
1398
|
+
__internal: ({ isFormControl: C }) => /* @__PURE__ */ P(me, { children: [
|
|
1399
|
+
/* @__PURE__ */ i(
|
|
1400
|
+
Vt,
|
|
1401
1401
|
{
|
|
1402
1402
|
...f,
|
|
1403
1403
|
ref: n,
|
|
1404
1404
|
__scopeCheckbox: t
|
|
1405
1405
|
}
|
|
1406
1406
|
),
|
|
1407
|
-
|
|
1408
|
-
|
|
1407
|
+
C && /* @__PURE__ */ i(
|
|
1408
|
+
zt,
|
|
1409
1409
|
{
|
|
1410
1410
|
__scopeCheckbox: t
|
|
1411
1411
|
}
|
|
@@ -1414,7 +1414,7 @@ const St = u.forwardRef(
|
|
|
1414
1414
|
}
|
|
1415
1415
|
);
|
|
1416
1416
|
}
|
|
1417
|
-
),
|
|
1417
|
+
), Lt = "CheckboxBubbleInput", zt = u.forwardRef(
|
|
1418
1418
|
({ __scopeCheckbox: e, ...n }, t) => {
|
|
1419
1419
|
const {
|
|
1420
1420
|
control: o,
|
|
@@ -1422,40 +1422,40 @@ const St = u.forwardRef(
|
|
|
1422
1422
|
defaultChecked: r,
|
|
1423
1423
|
required: c,
|
|
1424
1424
|
disabled: a,
|
|
1425
|
-
name:
|
|
1425
|
+
name: l,
|
|
1426
1426
|
value: d,
|
|
1427
1427
|
form: p,
|
|
1428
1428
|
bubbleInput: f,
|
|
1429
|
-
setBubbleInput:
|
|
1429
|
+
setBubbleInput: C,
|
|
1430
1430
|
hasConsumerStoppedPropagationRef: m
|
|
1431
|
-
} =
|
|
1431
|
+
} = Xe(Lt, e), y = T(t, C), h = Ce(s), g = Ue(o);
|
|
1432
1432
|
u.useEffect(() => {
|
|
1433
1433
|
const b = f;
|
|
1434
1434
|
if (!b) return;
|
|
1435
|
-
const
|
|
1436
|
-
|
|
1435
|
+
const w = window.HTMLInputElement.prototype, k = Object.getOwnPropertyDescriptor(
|
|
1436
|
+
w,
|
|
1437
1437
|
"checked"
|
|
1438
|
-
).set,
|
|
1439
|
-
if (
|
|
1440
|
-
const
|
|
1441
|
-
b.indeterminate =
|
|
1438
|
+
).set, S = !m.current;
|
|
1439
|
+
if (h !== s && k) {
|
|
1440
|
+
const L = new Event("click", { bubbles: S });
|
|
1441
|
+
b.indeterminate = j(s), k.call(b, j(s) ? !1 : s), b.dispatchEvent(L);
|
|
1442
1442
|
}
|
|
1443
|
-
}, [f,
|
|
1444
|
-
const
|
|
1445
|
-
return /* @__PURE__ */
|
|
1443
|
+
}, [f, h, s, m]);
|
|
1444
|
+
const v = u.useRef(j(s) ? !1 : s);
|
|
1445
|
+
return /* @__PURE__ */ i(
|
|
1446
1446
|
R.input,
|
|
1447
1447
|
{
|
|
1448
1448
|
type: "checkbox",
|
|
1449
1449
|
"aria-hidden": !0,
|
|
1450
|
-
defaultChecked: r ??
|
|
1450
|
+
defaultChecked: r ?? v.current,
|
|
1451
1451
|
required: c,
|
|
1452
1452
|
disabled: a,
|
|
1453
|
-
name:
|
|
1453
|
+
name: l,
|
|
1454
1454
|
value: d,
|
|
1455
1455
|
form: p,
|
|
1456
1456
|
...n,
|
|
1457
1457
|
tabIndex: -1,
|
|
1458
|
-
ref:
|
|
1458
|
+
ref: y,
|
|
1459
1459
|
style: {
|
|
1460
1460
|
...n.style,
|
|
1461
1461
|
...g,
|
|
@@ -1469,13 +1469,13 @@ const St = u.forwardRef(
|
|
|
1469
1469
|
);
|
|
1470
1470
|
}
|
|
1471
1471
|
);
|
|
1472
|
-
|
|
1473
|
-
const
|
|
1474
|
-
const { __scopeCheckbox: t, forceMount: o, ...s } = e, r =
|
|
1475
|
-
return /* @__PURE__ */
|
|
1472
|
+
zt.displayName = Lt;
|
|
1473
|
+
const $t = "CheckboxIndicator", Re = u.forwardRef((e, n) => {
|
|
1474
|
+
const { __scopeCheckbox: t, forceMount: o, ...s } = e, r = Xe($t, t);
|
|
1475
|
+
return /* @__PURE__ */ i(St, { remain: o || j(r.checked) || r.checked === !0, children: /* @__PURE__ */ i(
|
|
1476
1476
|
R.span,
|
|
1477
1477
|
{
|
|
1478
|
-
"data-state":
|
|
1478
|
+
"data-state": Ut(r.checked),
|
|
1479
1479
|
"data-disabled": r.disabled ? "" : void 0,
|
|
1480
1480
|
...s,
|
|
1481
1481
|
ref: n,
|
|
@@ -1483,53 +1483,53 @@ const It = "CheckboxIndicator", Ce = u.forwardRef((e, n) => {
|
|
|
1483
1483
|
}
|
|
1484
1484
|
) });
|
|
1485
1485
|
});
|
|
1486
|
-
|
|
1487
|
-
function
|
|
1486
|
+
Re.displayName = $t;
|
|
1487
|
+
function bs(e) {
|
|
1488
1488
|
return typeof e == "function";
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1490
|
+
function j(e) {
|
|
1491
1491
|
return e === "indeterminate";
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1494
|
-
return
|
|
1493
|
+
function Ut(e) {
|
|
1494
|
+
return j(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1495
1495
|
}
|
|
1496
|
-
const
|
|
1496
|
+
const gs = u.forwardRef((e, n) => {
|
|
1497
1497
|
const {
|
|
1498
1498
|
className: t,
|
|
1499
1499
|
checked: o,
|
|
1500
1500
|
defaultChecked: s = !1,
|
|
1501
1501
|
onCheckedChange: r,
|
|
1502
1502
|
...c
|
|
1503
|
-
} =
|
|
1503
|
+
} = I(e, X), [a, l] = A({
|
|
1504
1504
|
prop: o,
|
|
1505
1505
|
defaultProp: s,
|
|
1506
1506
|
onChange: r
|
|
1507
1507
|
});
|
|
1508
|
-
return /* @__PURE__ */
|
|
1509
|
-
|
|
1508
|
+
return /* @__PURE__ */ i(
|
|
1509
|
+
Gt,
|
|
1510
1510
|
{
|
|
1511
1511
|
...c,
|
|
1512
1512
|
defaultChecked: s,
|
|
1513
1513
|
checked: a,
|
|
1514
|
-
onCheckedChange:
|
|
1514
|
+
onCheckedChange: l,
|
|
1515
1515
|
asChild: !1,
|
|
1516
1516
|
ref: n,
|
|
1517
1517
|
className: x("bd-reset", "bd-CheckboxRoot", t),
|
|
1518
|
-
children: /* @__PURE__ */
|
|
1518
|
+
children: /* @__PURE__ */ i(Re, { asChild: !0, className: "bd-CheckboxIndicator", children: a === "indeterminate" ? /* @__PURE__ */ i(is, {}) : /* @__PURE__ */ i(Ne, {}) })
|
|
1519
1519
|
}
|
|
1520
1520
|
);
|
|
1521
1521
|
});
|
|
1522
|
-
|
|
1523
|
-
const
|
|
1524
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1525
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
1526
|
-
},
|
|
1527
|
-
layout: { type: "enum", className: "bd-layout", values:
|
|
1528
|
-
},
|
|
1529
|
-
function
|
|
1530
|
-
e[
|
|
1522
|
+
gs.displayName = "Checkbox";
|
|
1523
|
+
const Cs = ["1", "2"], vs = ["basic", "notice", "status"], ys = ["right", "fill", "left"], gt = {
|
|
1524
|
+
size: { type: "enum", className: "bd-size", values: Cs, default: "2" },
|
|
1525
|
+
variant: { type: "enum", className: "bd-variant", values: vs, default: "basic" }
|
|
1526
|
+
}, ws = {
|
|
1527
|
+
layout: { type: "enum", className: "bd-layout", values: ys, default: "left" }
|
|
1528
|
+
}, jt = "__popupPart";
|
|
1529
|
+
function ce(e, n) {
|
|
1530
|
+
e[jt] = n;
|
|
1531
1531
|
}
|
|
1532
|
-
function
|
|
1532
|
+
function Ns(e) {
|
|
1533
1533
|
if (e === void 0)
|
|
1534
1534
|
return;
|
|
1535
1535
|
if (typeof e == "number")
|
|
@@ -1540,18 +1540,18 @@ function ps(e) {
|
|
|
1540
1540
|
const t = n.match(/^\{?\s*(\d+(?:\.\d+)?)\s*\}?$/);
|
|
1541
1541
|
return t ? `${t[1]}px` : n;
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1543
|
+
function Rs(e, n) {
|
|
1544
1544
|
if (e === "basic")
|
|
1545
1545
|
return n;
|
|
1546
|
-
const t =
|
|
1546
|
+
const t = xs(n);
|
|
1547
1547
|
if (e === "notice") {
|
|
1548
1548
|
const s = t.icons.length > 0 || t.messages.length > 0, r = t.bodies.length > 0 || t.rest.length > 0, c = s || r;
|
|
1549
|
-
return /* @__PURE__ */ P(
|
|
1549
|
+
return /* @__PURE__ */ P(me, { children: [
|
|
1550
1550
|
t.headers,
|
|
1551
1551
|
c ? /* @__PURE__ */ P(R.div, { className: "bd-PopupNoticeBody", children: [
|
|
1552
1552
|
s ? /* @__PURE__ */ P(R.div, { className: "bd-PopupNoticeLead", children: [
|
|
1553
|
-
t.icons.length > 0 ? /* @__PURE__ */
|
|
1554
|
-
t.messages.length > 0 ? /* @__PURE__ */
|
|
1553
|
+
t.icons.length > 0 ? /* @__PURE__ */ i(R.div, { className: "bd-PopupNoticeIcon", children: t.icons }) : null,
|
|
1554
|
+
t.messages.length > 0 ? /* @__PURE__ */ i(R.div, { className: "bd-PopupNoticeMessage", children: t.messages }) : null
|
|
1555
1555
|
] }) : null,
|
|
1556
1556
|
r ? /* @__PURE__ */ P(R.div, { className: "bd-PopupNoticeContent", children: [
|
|
1557
1557
|
t.bodies,
|
|
@@ -1567,12 +1567,12 @@ function fs(e, n) {
|
|
|
1567
1567
|
...t.bodies,
|
|
1568
1568
|
...t.rest
|
|
1569
1569
|
];
|
|
1570
|
-
return /* @__PURE__ */ P(
|
|
1571
|
-
o.length > 0 ? /* @__PURE__ */
|
|
1570
|
+
return /* @__PURE__ */ P(me, { children: [
|
|
1571
|
+
o.length > 0 ? /* @__PURE__ */ i(R.div, { className: "bd-PopupStatusMain", children: o }) : null,
|
|
1572
1572
|
t.footers
|
|
1573
1573
|
] });
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function xs(e) {
|
|
1576
1576
|
const n = {
|
|
1577
1577
|
headers: [],
|
|
1578
1578
|
icons: [],
|
|
@@ -1581,8 +1581,8 @@ function ms(e) {
|
|
|
1581
1581
|
footers: [],
|
|
1582
1582
|
rest: []
|
|
1583
1583
|
};
|
|
1584
|
-
for (const t of
|
|
1585
|
-
switch (
|
|
1584
|
+
for (const t of Ht(e))
|
|
1585
|
+
switch (Ps(t)) {
|
|
1586
1586
|
case "header":
|
|
1587
1587
|
n.headers.push(t);
|
|
1588
1588
|
break;
|
|
@@ -1603,21 +1603,21 @@ function ms(e) {
|
|
|
1603
1603
|
}
|
|
1604
1604
|
return n;
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function Ht(e) {
|
|
1607
1607
|
const n = [];
|
|
1608
1608
|
return u.Children.forEach(e, (t) => {
|
|
1609
1609
|
if (u.isValidElement(t) && t.type === u.Fragment) {
|
|
1610
1610
|
const o = t;
|
|
1611
|
-
n.push(...
|
|
1611
|
+
n.push(...Ht(o.props.children));
|
|
1612
1612
|
return;
|
|
1613
1613
|
}
|
|
1614
1614
|
n.push(t);
|
|
1615
1615
|
}), n;
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1618
|
-
return u.isValidElement(e) ? e.type[
|
|
1617
|
+
function Ps(e) {
|
|
1618
|
+
return u.isValidElement(e) ? e.type[jt] ?? null : null;
|
|
1619
1619
|
}
|
|
1620
|
-
function
|
|
1620
|
+
function qt(e) {
|
|
1621
1621
|
return Array.from(
|
|
1622
1622
|
e.querySelectorAll(
|
|
1623
1623
|
[
|
|
@@ -1634,15 +1634,15 @@ function At(e) {
|
|
|
1634
1634
|
return (n.offsetWidth > 0 || n.offsetHeight > 0 || n.getClientRects().length > 0) && t.display !== "none" && t.visibility !== "hidden" && !n.hasAttribute("disabled") && n.getAttribute("aria-hidden") !== "true";
|
|
1635
1635
|
});
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1637
|
+
function Ss(e) {
|
|
1638
1638
|
return Object.fromEntries(
|
|
1639
1639
|
Object.entries(e).filter(([n]) => n !== "__scopePopup")
|
|
1640
1640
|
);
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1642
|
+
function ks(e, n) {
|
|
1643
1643
|
if (!n)
|
|
1644
1644
|
return;
|
|
1645
|
-
const t =
|
|
1645
|
+
const t = qt(n);
|
|
1646
1646
|
if (t.length === 0) {
|
|
1647
1647
|
e.preventDefault(), n.focus();
|
|
1648
1648
|
return;
|
|
@@ -1654,7 +1654,7 @@ function bs(e, n) {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
!e.shiftKey && r === s && (e.preventDefault(), o.focus());
|
|
1656
1656
|
}
|
|
1657
|
-
const
|
|
1657
|
+
const Wt = "Popup", [Es] = F(Wt), [Is, ee] = Es(Wt), Ct = ({
|
|
1658
1658
|
__scopePopup: e,
|
|
1659
1659
|
children: n,
|
|
1660
1660
|
open: t,
|
|
@@ -1663,43 +1663,43 @@ const Mt = "Popup", [Cs] = M(Mt), [vs, W] = Cs(Mt), ct = ({
|
|
|
1663
1663
|
closeOnOverlayClick: r = !0,
|
|
1664
1664
|
lockScroll: c = !0
|
|
1665
1665
|
}) => {
|
|
1666
|
-
const a =
|
|
1666
|
+
const a = de((b) => {
|
|
1667
1667
|
o(b);
|
|
1668
|
-
}),
|
|
1669
|
-
|
|
1670
|
-
})), g =
|
|
1671
|
-
|
|
1668
|
+
}), l = Ce(t), d = u.useRef(null), p = u.useRef(null), [f, C] = u.useState([]), [m, y] = u.useState([]), h = de((b) => (C((w) => w.includes(b) ? w : [...w, b]), () => {
|
|
1669
|
+
C((w) => w.filter((N) => N !== b));
|
|
1670
|
+
})), g = de((b) => (y((w) => w.includes(b) ? w : [...w, b]), () => {
|
|
1671
|
+
y((w) => w.filter((N) => N !== b));
|
|
1672
1672
|
}));
|
|
1673
|
-
|
|
1673
|
+
je(d, () => {
|
|
1674
1674
|
!t || !r || a(!1);
|
|
1675
1675
|
}), u.useEffect(() => {
|
|
1676
|
-
if (!t ||
|
|
1676
|
+
if (!t || l === t)
|
|
1677
1677
|
return;
|
|
1678
1678
|
const b = document.activeElement;
|
|
1679
1679
|
p.current = b instanceof HTMLElement ? b : null;
|
|
1680
|
-
}, [t,
|
|
1681
|
-
if (t ||
|
|
1680
|
+
}, [t, l]), u.useEffect(() => {
|
|
1681
|
+
if (t || l === t)
|
|
1682
1682
|
return;
|
|
1683
1683
|
const b = p.current;
|
|
1684
1684
|
b && document.contains(b) && b.focus();
|
|
1685
|
-
}, [t,
|
|
1685
|
+
}, [t, l]), u.useEffect(() => {
|
|
1686
1686
|
if (!t || !s)
|
|
1687
1687
|
return;
|
|
1688
|
-
const b = (
|
|
1689
|
-
|
|
1688
|
+
const b = (w) => {
|
|
1689
|
+
w.key === "Escape" && (w.preventDefault(), a(!1));
|
|
1690
1690
|
};
|
|
1691
1691
|
return document.addEventListener("keydown", b), () => {
|
|
1692
1692
|
document.removeEventListener("keydown", b);
|
|
1693
1693
|
};
|
|
1694
|
-
}, [t, s, a]),
|
|
1694
|
+
}, [t, s, a]), G(() => {
|
|
1695
1695
|
if (!t || !c)
|
|
1696
1696
|
return;
|
|
1697
|
-
const { body: b, documentElement:
|
|
1698
|
-
return b.style.overflow = "hidden",
|
|
1699
|
-
b.style.overflow =
|
|
1697
|
+
const { body: b, documentElement: w } = document, N = b.style.overflow, k = b.style.paddingRight, S = window.innerWidth - w.clientWidth;
|
|
1698
|
+
return b.style.overflow = "hidden", S > 0 && (b.style.paddingRight = `${S}px`), () => {
|
|
1699
|
+
b.style.overflow = N, b.style.paddingRight = k;
|
|
1700
1700
|
};
|
|
1701
1701
|
}, [t, c]);
|
|
1702
|
-
const
|
|
1702
|
+
const v = u.useMemo(
|
|
1703
1703
|
() => ({
|
|
1704
1704
|
open: t,
|
|
1705
1705
|
onOpenChange: a,
|
|
@@ -1707,7 +1707,7 @@ const Mt = "Popup", [Cs] = M(Mt), [vs, W] = Cs(Mt), ct = ({
|
|
|
1707
1707
|
contentRef: d,
|
|
1708
1708
|
titleIds: f,
|
|
1709
1709
|
descriptionIds: m,
|
|
1710
|
-
registerTitleId:
|
|
1710
|
+
registerTitleId: h,
|
|
1711
1711
|
registerDescriptionId: g
|
|
1712
1712
|
}),
|
|
1713
1713
|
[
|
|
@@ -1716,23 +1716,23 @@ const Mt = "Popup", [Cs] = M(Mt), [vs, W] = Cs(Mt), ct = ({
|
|
|
1716
1716
|
r,
|
|
1717
1717
|
f,
|
|
1718
1718
|
m,
|
|
1719
|
-
|
|
1719
|
+
h,
|
|
1720
1720
|
g
|
|
1721
1721
|
]
|
|
1722
1722
|
);
|
|
1723
|
-
return /* @__PURE__ */
|
|
1724
|
-
},
|
|
1723
|
+
return /* @__PURE__ */ i(Is, { scope: e, ...v, children: n });
|
|
1724
|
+
}, Ds = "PopupPortal", Ts = ({
|
|
1725
1725
|
__scopePopup: e,
|
|
1726
1726
|
children: n,
|
|
1727
1727
|
container: t,
|
|
1728
1728
|
forceMount: o
|
|
1729
1729
|
}) => {
|
|
1730
|
-
const s =
|
|
1731
|
-
return !o && !s.open ? null : /* @__PURE__ */
|
|
1732
|
-
},
|
|
1730
|
+
const s = ee(Ds, e);
|
|
1731
|
+
return !o && !s.open ? null : /* @__PURE__ */ i(He, { container: t, children: n });
|
|
1732
|
+
}, Yt = "PopupOverlay", Kt = u.forwardRef(
|
|
1733
1733
|
(e, n) => {
|
|
1734
|
-
const { __scopePopup: t, className: o, ...s } = e, r =
|
|
1735
|
-
return /* @__PURE__ */
|
|
1734
|
+
const { __scopePopup: t, className: o, ...s } = e, r = ee(Yt, t);
|
|
1735
|
+
return /* @__PURE__ */ i(
|
|
1736
1736
|
R.div,
|
|
1737
1737
|
{
|
|
1738
1738
|
"data-state": r.open ? "open" : "closed",
|
|
@@ -1743,105 +1743,105 @@ const Mt = "Popup", [Cs] = M(Mt), [vs, W] = Cs(Mt), ct = ({
|
|
|
1743
1743
|
);
|
|
1744
1744
|
}
|
|
1745
1745
|
);
|
|
1746
|
-
|
|
1747
|
-
const
|
|
1746
|
+
Kt.displayName = Yt;
|
|
1747
|
+
const Xt = "PopupContent", Zt = u.forwardRef(
|
|
1748
1748
|
(e, n) => {
|
|
1749
|
-
const t = e.variant ??
|
|
1749
|
+
const t = e.variant ?? gt.variant.default, { __scopePopup: o, onKeyDown: s, children: r, contentWidth: c, ...a } = I(
|
|
1750
1750
|
{ ...e, variant: t },
|
|
1751
|
-
|
|
1752
|
-
),
|
|
1751
|
+
gt
|
|
1752
|
+
), l = ee(Xt, o), d = T(n, l.contentRef), p = Ns(c), f = p === void 0 ? void 0 : { width: `min(calc(100vw - var(--space-8)), ${p})` };
|
|
1753
1753
|
return u.useEffect(() => {
|
|
1754
|
-
if (!
|
|
1754
|
+
if (!l.open)
|
|
1755
1755
|
return;
|
|
1756
|
-
const
|
|
1757
|
-
if (!
|
|
1756
|
+
const C = l.contentRef.current;
|
|
1757
|
+
if (!C)
|
|
1758
1758
|
return;
|
|
1759
1759
|
const m = window.requestAnimationFrame(() => {
|
|
1760
|
-
(
|
|
1760
|
+
(qt(C)[0] ?? C).focus();
|
|
1761
1761
|
});
|
|
1762
1762
|
return () => {
|
|
1763
1763
|
window.cancelAnimationFrame(m);
|
|
1764
1764
|
};
|
|
1765
|
-
}, [
|
|
1765
|
+
}, [l.open, l.contentRef]), /* @__PURE__ */ i(
|
|
1766
1766
|
R.div,
|
|
1767
1767
|
{
|
|
1768
1768
|
role: "dialog",
|
|
1769
1769
|
"aria-modal": "true",
|
|
1770
1770
|
tabIndex: -1,
|
|
1771
|
-
"data-state":
|
|
1772
|
-
"aria-labelledby":
|
|
1773
|
-
"aria-describedby":
|
|
1771
|
+
"data-state": l.open ? "open" : "closed",
|
|
1772
|
+
"aria-labelledby": l.titleIds[0],
|
|
1773
|
+
"aria-describedby": l.descriptionIds.join(" ") || void 0,
|
|
1774
1774
|
...a,
|
|
1775
1775
|
ref: d,
|
|
1776
|
-
style:
|
|
1776
|
+
style: Ve(f, a.style),
|
|
1777
1777
|
className: x("bd-PopupContent", a.className),
|
|
1778
|
-
onKeyDown:
|
|
1779
|
-
|
|
1778
|
+
onKeyDown: O(s, (C) => {
|
|
1779
|
+
C.key === "Tab" && ks(C, l.contentRef.current);
|
|
1780
1780
|
}),
|
|
1781
|
-
children:
|
|
1781
|
+
children: Rs(t, r)
|
|
1782
1782
|
}
|
|
1783
1783
|
);
|
|
1784
1784
|
}
|
|
1785
1785
|
);
|
|
1786
|
-
|
|
1787
|
-
const
|
|
1788
|
-
({ className: e, ...n }, t) => /* @__PURE__ */
|
|
1786
|
+
Zt.displayName = Xt;
|
|
1787
|
+
const _s = "PopupHeader", Ze = u.forwardRef(
|
|
1788
|
+
({ className: e, ...n }, t) => /* @__PURE__ */ i(R.div, { ...n, ref: t, className: x("bd-PopupHeader", e) })
|
|
1789
1789
|
);
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
const
|
|
1790
|
+
Ze.displayName = _s;
|
|
1791
|
+
ce(Ze, "header");
|
|
1792
|
+
const Jt = "PopupTitle", Qt = u.forwardRef(
|
|
1793
1793
|
(e, n) => {
|
|
1794
|
-
const { __scopePopup: t, id: o, className: s, ...r } = e, c =
|
|
1795
|
-
return
|
|
1794
|
+
const { __scopePopup: t, id: o, className: s, ...r } = e, c = ee(Jt, t), a = re(o), { registerTitleId: l } = c;
|
|
1795
|
+
return G(() => {
|
|
1796
1796
|
if (a)
|
|
1797
|
-
return
|
|
1798
|
-
}, [
|
|
1799
|
-
|
|
1797
|
+
return l(a);
|
|
1798
|
+
}, [l, a]), /* @__PURE__ */ i(
|
|
1799
|
+
ae,
|
|
1800
1800
|
{
|
|
1801
1801
|
asChild: !0,
|
|
1802
1802
|
size: "7",
|
|
1803
1803
|
weight: "bold",
|
|
1804
1804
|
color: "gray1500",
|
|
1805
1805
|
className: x("bd-PopupTitle", s),
|
|
1806
|
-
children: /* @__PURE__ */
|
|
1806
|
+
children: /* @__PURE__ */ i(R.div, { id: a, ...r, ref: n })
|
|
1807
1807
|
}
|
|
1808
1808
|
);
|
|
1809
1809
|
}
|
|
1810
1810
|
);
|
|
1811
|
-
|
|
1812
|
-
const
|
|
1813
|
-
({ className: e, ...n }, t) => /* @__PURE__ */
|
|
1811
|
+
Qt.displayName = Jt;
|
|
1812
|
+
const Bs = "PopupIcon", Je = u.forwardRef(
|
|
1813
|
+
({ className: e, ...n }, t) => /* @__PURE__ */ i(R.div, { ...n, ref: t, className: x("bd-PopupIcon", e) })
|
|
1814
1814
|
);
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
const
|
|
1815
|
+
Je.displayName = Bs;
|
|
1816
|
+
ce(Je, "icon");
|
|
1817
|
+
const en = "PopupMessage", Qe = u.forwardRef(
|
|
1818
1818
|
(e, n) => {
|
|
1819
|
-
const { __scopePopup: t, id: o, className: s, ...r } = e, c =
|
|
1820
|
-
return
|
|
1819
|
+
const { __scopePopup: t, id: o, className: s, ...r } = e, c = ee(en, t), a = re(o), { registerDescriptionId: l } = c;
|
|
1820
|
+
return G(() => {
|
|
1821
1821
|
if (a)
|
|
1822
|
-
return
|
|
1823
|
-
}, [
|
|
1824
|
-
|
|
1822
|
+
return l(a);
|
|
1823
|
+
}, [l, a]), /* @__PURE__ */ i(
|
|
1824
|
+
ae,
|
|
1825
1825
|
{
|
|
1826
1826
|
asChild: !0,
|
|
1827
1827
|
size: "5",
|
|
1828
1828
|
weight: "regular",
|
|
1829
1829
|
color: "gray1500",
|
|
1830
1830
|
className: x("bd-PopupMessage", s),
|
|
1831
|
-
children: /* @__PURE__ */
|
|
1831
|
+
children: /* @__PURE__ */ i(R.div, { id: a, ...r, ref: n })
|
|
1832
1832
|
}
|
|
1833
1833
|
);
|
|
1834
1834
|
}
|
|
1835
1835
|
);
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
const
|
|
1836
|
+
Qe.displayName = en;
|
|
1837
|
+
ce(Qe, "message");
|
|
1838
|
+
const tn = "PopupBody", et = u.forwardRef(
|
|
1839
1839
|
(e, n) => {
|
|
1840
|
-
const { __scopePopup: t, id: o, className: s, ...r } = e, c =
|
|
1841
|
-
return
|
|
1840
|
+
const { __scopePopup: t, id: o, className: s, ...r } = e, c = ee(tn, t), a = re(o), { registerDescriptionId: l } = c;
|
|
1841
|
+
return G(() => {
|
|
1842
1842
|
if (a)
|
|
1843
|
-
return
|
|
1844
|
-
}, [
|
|
1843
|
+
return l(a);
|
|
1844
|
+
}, [l, a]), /* @__PURE__ */ i(
|
|
1845
1845
|
R.div,
|
|
1846
1846
|
{
|
|
1847
1847
|
id: a,
|
|
@@ -1852,14 +1852,14 @@ const Lt = "PopupBody", We = u.forwardRef(
|
|
|
1852
1852
|
);
|
|
1853
1853
|
}
|
|
1854
1854
|
);
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
const
|
|
1855
|
+
et.displayName = tn;
|
|
1856
|
+
ce(et, "body");
|
|
1857
|
+
const Ms = "PopupFooter", tt = u.forwardRef(
|
|
1858
1858
|
(e, n) => {
|
|
1859
|
-
const t =
|
|
1860
|
-
|
|
1859
|
+
const t = Ss(
|
|
1860
|
+
I(e, ws)
|
|
1861
1861
|
);
|
|
1862
|
-
return /* @__PURE__ */
|
|
1862
|
+
return /* @__PURE__ */ i(
|
|
1863
1863
|
R.div,
|
|
1864
1864
|
{
|
|
1865
1865
|
...t,
|
|
@@ -1869,20 +1869,20 @@ const xs = "PopupFooter", Xe = u.forwardRef(
|
|
|
1869
1869
|
);
|
|
1870
1870
|
}
|
|
1871
1871
|
);
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
const
|
|
1875
|
-
Root:
|
|
1876
|
-
Portal:
|
|
1877
|
-
Overlay:
|
|
1878
|
-
Content:
|
|
1879
|
-
Header:
|
|
1880
|
-
Title:
|
|
1881
|
-
Icon:
|
|
1882
|
-
Message:
|
|
1883
|
-
Body:
|
|
1884
|
-
Footer:
|
|
1885
|
-
}),
|
|
1872
|
+
tt.displayName = Ms;
|
|
1873
|
+
ce(tt, "footer");
|
|
1874
|
+
const U = Object.assign(Ct, {
|
|
1875
|
+
Root: Ct,
|
|
1876
|
+
Portal: Ts,
|
|
1877
|
+
Overlay: Kt,
|
|
1878
|
+
Content: Zt,
|
|
1879
|
+
Header: Ze,
|
|
1880
|
+
Title: Qt,
|
|
1881
|
+
Icon: Je,
|
|
1882
|
+
Message: Qe,
|
|
1883
|
+
Body: et,
|
|
1884
|
+
Footer: tt
|
|
1885
|
+
}), As = u.forwardRef(
|
|
1886
1886
|
(e, n) => {
|
|
1887
1887
|
const {
|
|
1888
1888
|
open: t,
|
|
@@ -1891,62 +1891,62 @@ const G = Object.assign(ct, {
|
|
|
1891
1891
|
closeOnOverlayClick: r,
|
|
1892
1892
|
lockScroll: c,
|
|
1893
1893
|
title: a,
|
|
1894
|
-
content:
|
|
1894
|
+
content: l,
|
|
1895
1895
|
onConfirm: d,
|
|
1896
1896
|
onCancel: p,
|
|
1897
1897
|
confirmText: f = "확인",
|
|
1898
|
-
confirmDisabled:
|
|
1898
|
+
confirmDisabled: C = !1,
|
|
1899
1899
|
cancelText: m = "취소",
|
|
1900
|
-
closeOnConfirm:
|
|
1901
|
-
closeOnCancel:
|
|
1900
|
+
closeOnConfirm: y = !0,
|
|
1901
|
+
closeOnCancel: h = !0,
|
|
1902
1902
|
size: g = 2,
|
|
1903
|
-
contentWidth:
|
|
1903
|
+
contentWidth: v,
|
|
1904
1904
|
buttonSize: b = "2",
|
|
1905
|
-
buttonRadius:
|
|
1906
|
-
} = e,
|
|
1907
|
-
await p?.(),
|
|
1908
|
-
}, [
|
|
1909
|
-
await d(),
|
|
1910
|
-
}, [
|
|
1911
|
-
return /* @__PURE__ */
|
|
1912
|
-
|
|
1905
|
+
buttonRadius: w = "s"
|
|
1906
|
+
} = e, N = u.useCallback(async () => {
|
|
1907
|
+
await p?.(), h && o(!1);
|
|
1908
|
+
}, [h, p, o]), k = u.useCallback(async () => {
|
|
1909
|
+
await d(), y && o(!1);
|
|
1910
|
+
}, [y, d, o]);
|
|
1911
|
+
return /* @__PURE__ */ i(
|
|
1912
|
+
U.Root,
|
|
1913
1913
|
{
|
|
1914
1914
|
open: t,
|
|
1915
1915
|
onOpenChange: o,
|
|
1916
1916
|
closeOnEscape: s,
|
|
1917
1917
|
closeOnOverlayClick: r,
|
|
1918
1918
|
lockScroll: c,
|
|
1919
|
-
children: /* @__PURE__ */ P(
|
|
1920
|
-
/* @__PURE__ */
|
|
1919
|
+
children: /* @__PURE__ */ P(U.Portal, { children: [
|
|
1920
|
+
/* @__PURE__ */ i(U.Overlay, {}),
|
|
1921
1921
|
/* @__PURE__ */ P(
|
|
1922
|
-
|
|
1922
|
+
U.Content,
|
|
1923
1923
|
{
|
|
1924
1924
|
ref: n,
|
|
1925
1925
|
size: String(g),
|
|
1926
1926
|
variant: "basic",
|
|
1927
|
-
contentWidth:
|
|
1927
|
+
contentWidth: v,
|
|
1928
1928
|
children: [
|
|
1929
|
-
/* @__PURE__ */
|
|
1930
|
-
/* @__PURE__ */
|
|
1931
|
-
/* @__PURE__ */ P(
|
|
1932
|
-
/* @__PURE__ */
|
|
1933
|
-
|
|
1929
|
+
/* @__PURE__ */ i(U.Header, { children: /* @__PURE__ */ i(U.Title, { children: a }) }),
|
|
1930
|
+
/* @__PURE__ */ i(U.Body, { children: l }),
|
|
1931
|
+
/* @__PURE__ */ P(U.Footer, { layout: "right", children: [
|
|
1932
|
+
/* @__PURE__ */ i(
|
|
1933
|
+
oe,
|
|
1934
1934
|
{
|
|
1935
1935
|
size: b,
|
|
1936
|
-
radius:
|
|
1936
|
+
radius: w,
|
|
1937
1937
|
variant: "outline-secondary",
|
|
1938
|
-
onClick:
|
|
1938
|
+
onClick: N,
|
|
1939
1939
|
children: m
|
|
1940
1940
|
}
|
|
1941
1941
|
),
|
|
1942
|
-
/* @__PURE__ */
|
|
1943
|
-
|
|
1942
|
+
/* @__PURE__ */ i(
|
|
1943
|
+
oe,
|
|
1944
1944
|
{
|
|
1945
1945
|
size: b,
|
|
1946
|
-
radius:
|
|
1946
|
+
radius: w,
|
|
1947
1947
|
variant: "fill-primary",
|
|
1948
|
-
disabled:
|
|
1949
|
-
onClick:
|
|
1948
|
+
disabled: C,
|
|
1949
|
+
onClick: k,
|
|
1950
1950
|
children: f
|
|
1951
1951
|
}
|
|
1952
1952
|
)
|
|
@@ -1959,16 +1959,16 @@ const G = Object.assign(ct, {
|
|
|
1959
1959
|
);
|
|
1960
1960
|
}
|
|
1961
1961
|
);
|
|
1962
|
-
|
|
1963
|
-
const
|
|
1964
|
-
({ children: e, maxHeight: n, className: t, style: o, onScroll: s, onScrollBottom: r, ...c }, a) => /* @__PURE__ */
|
|
1962
|
+
As.displayName = "ConfirmDialog";
|
|
1963
|
+
const nt = u.forwardRef(
|
|
1964
|
+
({ children: e, maxHeight: n, className: t, style: o, onScroll: s, onScrollBottom: r, ...c }, a) => /* @__PURE__ */ i(
|
|
1965
1965
|
"div",
|
|
1966
1966
|
{
|
|
1967
1967
|
ref: a,
|
|
1968
1968
|
onScroll: (d) => {
|
|
1969
1969
|
if (s && s(d), r) {
|
|
1970
|
-
const { scrollTop: p, scrollHeight: f, clientHeight:
|
|
1971
|
-
f - p <=
|
|
1970
|
+
const { scrollTop: p, scrollHeight: f, clientHeight: C } = d.currentTarget;
|
|
1971
|
+
f - p <= C + 10 && r();
|
|
1972
1972
|
}
|
|
1973
1973
|
},
|
|
1974
1974
|
className: `bd-ScrollArea ${t || ""}`,
|
|
@@ -1978,21 +1978,21 @@ const Ze = u.forwardRef(
|
|
|
1978
1978
|
}
|
|
1979
1979
|
)
|
|
1980
1980
|
);
|
|
1981
|
-
|
|
1982
|
-
const
|
|
1983
|
-
size: { type: "enum", className: "bd-size", values:
|
|
1984
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
1985
|
-
...
|
|
1986
|
-
|
|
1987
|
-
},
|
|
1988
|
-
gap:
|
|
1989
|
-
px:
|
|
1990
|
-
pl:
|
|
1991
|
-
pr:
|
|
1992
|
-
},
|
|
1993
|
-
...
|
|
1994
|
-
...
|
|
1995
|
-
},
|
|
1981
|
+
nt.displayName = "ScrollArea";
|
|
1982
|
+
const Os = ["1", "2", "3", "4", "5"], Fs = ["classic", "underlined", "rounded"], J = {
|
|
1983
|
+
size: { type: "enum", className: "bd-size", values: Os, default: "4" },
|
|
1984
|
+
variant: { type: "enum", className: "bd-variant", values: Fs, default: "classic" },
|
|
1985
|
+
...We,
|
|
1986
|
+
...H
|
|
1987
|
+
}, Vs = {
|
|
1988
|
+
gap: Ye.gap,
|
|
1989
|
+
px: K.px,
|
|
1990
|
+
pl: K.pl,
|
|
1991
|
+
pr: K.pr
|
|
1992
|
+
}, ot = {
|
|
1993
|
+
...J,
|
|
1994
|
+
...Vs
|
|
1995
|
+
}, be = "SelectBox", [Gs] = F(be), [Ls, xe] = Gs(be), st = ({
|
|
1996
1996
|
__scopeSelect: e,
|
|
1997
1997
|
value: n,
|
|
1998
1998
|
defaultValue: t,
|
|
@@ -2001,53 +2001,53 @@ const Ss = ["1", "2", "3", "4", "5"], ks = ["classic", "underlined", "rounded"],
|
|
|
2001
2001
|
open: r,
|
|
2002
2002
|
defaultOpen: c,
|
|
2003
2003
|
onOpenChange: a,
|
|
2004
|
-
variant:
|
|
2005
|
-
size: d =
|
|
2004
|
+
variant: l = "classic",
|
|
2005
|
+
size: d = J.size.default,
|
|
2006
2006
|
weight: p = "regular",
|
|
2007
2007
|
children: f
|
|
2008
2008
|
}) => {
|
|
2009
|
-
const [
|
|
2009
|
+
const [C, m] = A({
|
|
2010
2010
|
prop: n,
|
|
2011
2011
|
defaultProp: t ?? "",
|
|
2012
2012
|
onChange: o,
|
|
2013
|
-
caller:
|
|
2014
|
-
}), [
|
|
2013
|
+
caller: be
|
|
2014
|
+
}), [y, h] = A({
|
|
2015
2015
|
prop: r,
|
|
2016
2016
|
defaultProp: c ?? !1,
|
|
2017
2017
|
onChange: a,
|
|
2018
|
-
caller: `${
|
|
2019
|
-
}), g = u.useRef(null),
|
|
2020
|
-
return /* @__PURE__ */
|
|
2021
|
-
|
|
2018
|
+
caller: `${be}.Open`
|
|
2019
|
+
}), g = u.useRef(null), v = re();
|
|
2020
|
+
return /* @__PURE__ */ i(
|
|
2021
|
+
Ls,
|
|
2022
2022
|
{
|
|
2023
2023
|
scope: e,
|
|
2024
|
-
value:
|
|
2024
|
+
value: C,
|
|
2025
2025
|
onValueChange: m,
|
|
2026
2026
|
valueLabelMap: s,
|
|
2027
|
-
open:
|
|
2028
|
-
onOpenChange:
|
|
2027
|
+
open: y,
|
|
2028
|
+
onOpenChange: h,
|
|
2029
2029
|
triggerRef: g,
|
|
2030
|
-
contentId:
|
|
2031
|
-
variant:
|
|
2030
|
+
contentId: v,
|
|
2031
|
+
variant: l,
|
|
2032
2032
|
size: d,
|
|
2033
2033
|
weight: p,
|
|
2034
2034
|
children: f
|
|
2035
2035
|
}
|
|
2036
2036
|
);
|
|
2037
|
-
},
|
|
2037
|
+
}, nn = "SelectBoxTrigger", Pe = u.forwardRef(
|
|
2038
2038
|
(e, n) => {
|
|
2039
|
-
const { __scopeSelect: t, children: o, onClick: s, onKeyDown: r, ...c } = e, a =
|
|
2040
|
-
return /* @__PURE__ */
|
|
2039
|
+
const { __scopeSelect: t, children: o, onClick: s, onKeyDown: r, ...c } = e, a = xe(nn, t), l = T(n, a.triggerRef), { className: d, style: p, ...f } = I(c, ot), C = !a.value || a.value === "";
|
|
2040
|
+
return /* @__PURE__ */ i(
|
|
2041
2041
|
R.button,
|
|
2042
2042
|
{
|
|
2043
2043
|
type: "button",
|
|
2044
2044
|
role: "combobox",
|
|
2045
2045
|
"aria-expanded": a.open,
|
|
2046
|
-
"data-placeholder":
|
|
2046
|
+
"data-placeholder": C ? "" : void 0,
|
|
2047
2047
|
className: `bd-SelectBoxTrigger ${d || ""}`,
|
|
2048
2048
|
style: p,
|
|
2049
2049
|
...f,
|
|
2050
|
-
ref:
|
|
2050
|
+
ref: l,
|
|
2051
2051
|
onClick: (m) => {
|
|
2052
2052
|
a.onOpenChange(!a.open), s?.(m);
|
|
2053
2053
|
},
|
|
@@ -2059,59 +2059,90 @@ const Ss = ["1", "2", "3", "4", "5"], ks = ["classic", "underlined", "rounded"],
|
|
|
2059
2059
|
);
|
|
2060
2060
|
}
|
|
2061
2061
|
);
|
|
2062
|
-
|
|
2063
|
-
const
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2062
|
+
Pe.displayName = nn;
|
|
2063
|
+
const on = "SelectBoxContent", vt = [
|
|
2064
|
+
"input",
|
|
2065
|
+
"textarea",
|
|
2066
|
+
"select",
|
|
2067
|
+
"button",
|
|
2068
|
+
"a[href]",
|
|
2069
|
+
'[contenteditable="true"]',
|
|
2070
|
+
'[contenteditable=""]',
|
|
2071
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
2072
|
+
"[data-selectbox-interactive]",
|
|
2073
|
+
"[data-checkable-selectbox-interactive]"
|
|
2074
|
+
].join(", "), zs = (e, n) => {
|
|
2075
|
+
if (!(e instanceof Element)) return !1;
|
|
2076
|
+
let t = e;
|
|
2077
|
+
for (; t && t !== n; ) {
|
|
2078
|
+
if (t.matches(vt) || t.querySelector(vt)) return !0;
|
|
2079
|
+
t = t.parentElement;
|
|
2080
|
+
}
|
|
2081
|
+
return !1;
|
|
2082
|
+
}, Se = u.forwardRef(({ __scopeSelect: e, children: n, className: t, style: o, onKeyDown: s, ...r }, c) => {
|
|
2083
|
+
const a = xe(on, e), l = u.useRef(null), d = T(c, l);
|
|
2084
|
+
je(l, (h) => {
|
|
2085
|
+
a.triggerRef.current?.contains(h.target) || a.open && a.onOpenChange(!1);
|
|
2067
2086
|
});
|
|
2068
|
-
const p = a.variant === "rounded" ? 8 : 0, { styles: f, isPositioned:
|
|
2087
|
+
const p = a.variant === "rounded" ? 8 : 0, { styles: f, isPositioned: C } = Pt(
|
|
2069
2088
|
a.triggerRef,
|
|
2070
|
-
|
|
2089
|
+
l,
|
|
2071
2090
|
a.open,
|
|
2072
2091
|
p
|
|
2073
2092
|
);
|
|
2074
2093
|
u.useEffect(() => {
|
|
2075
|
-
a.open &&
|
|
2076
|
-
if (!
|
|
2077
|
-
const
|
|
2078
|
-
|
|
2079
|
-
), g =
|
|
2080
|
-
g ? g.focus() :
|
|
2094
|
+
a.open && l.current && requestAnimationFrame(() => {
|
|
2095
|
+
if (!l.current) return;
|
|
2096
|
+
const h = Array.from(
|
|
2097
|
+
l.current.querySelectorAll('[role="option"]')
|
|
2098
|
+
), g = h.find((v) => v.getAttribute("aria-selected") === "true");
|
|
2099
|
+
g ? g.focus() : h.length > 0 && h[0].focus();
|
|
2081
2100
|
});
|
|
2082
2101
|
}, [a.open]);
|
|
2083
|
-
const m = (
|
|
2102
|
+
const m = (h) => {
|
|
2103
|
+
if (zs(h.target, h.currentTarget)) {
|
|
2104
|
+
switch (h.key) {
|
|
2105
|
+
case "Escape":
|
|
2106
|
+
h.preventDefault(), a.onOpenChange(!1), a.triggerRef.current?.focus();
|
|
2107
|
+
break;
|
|
2108
|
+
case "Tab":
|
|
2109
|
+
a.onOpenChange(!1);
|
|
2110
|
+
break;
|
|
2111
|
+
}
|
|
2112
|
+
s?.(h);
|
|
2113
|
+
return;
|
|
2114
|
+
}
|
|
2084
2115
|
const g = Array.from(
|
|
2085
|
-
|
|
2086
|
-
),
|
|
2087
|
-
switch (
|
|
2116
|
+
l.current?.querySelectorAll('[role="option"]') || []
|
|
2117
|
+
), v = g.indexOf(document.activeElement);
|
|
2118
|
+
switch (h.key) {
|
|
2088
2119
|
case "ArrowDown": {
|
|
2089
|
-
|
|
2090
|
-
const b =
|
|
2120
|
+
h.preventDefault();
|
|
2121
|
+
const b = v < g.length - 1 ? v + 1 : 0;
|
|
2091
2122
|
g[b]?.focus();
|
|
2092
2123
|
break;
|
|
2093
2124
|
}
|
|
2094
2125
|
case "ArrowUp": {
|
|
2095
|
-
|
|
2096
|
-
const b =
|
|
2126
|
+
h.preventDefault();
|
|
2127
|
+
const b = v > 0 ? v - 1 : g.length - 1;
|
|
2097
2128
|
g[b]?.focus();
|
|
2098
2129
|
break;
|
|
2099
2130
|
}
|
|
2100
2131
|
case "Enter":
|
|
2101
2132
|
case " ":
|
|
2102
|
-
|
|
2133
|
+
h.preventDefault(), document.activeElement?.click();
|
|
2103
2134
|
break;
|
|
2104
2135
|
case "Escape":
|
|
2105
|
-
|
|
2136
|
+
h.preventDefault(), a.onOpenChange(!1), a.triggerRef.current?.focus();
|
|
2106
2137
|
break;
|
|
2107
2138
|
case "Tab":
|
|
2108
2139
|
a.onOpenChange(!1);
|
|
2109
2140
|
break;
|
|
2110
2141
|
}
|
|
2111
|
-
s?.(
|
|
2142
|
+
s?.(h);
|
|
2112
2143
|
};
|
|
2113
2144
|
if (!a.open) return null;
|
|
2114
|
-
const
|
|
2145
|
+
const y = /* @__PURE__ */ i(
|
|
2115
2146
|
R.div,
|
|
2116
2147
|
{
|
|
2117
2148
|
id: a.contentId,
|
|
@@ -2124,28 +2155,28 @@ const Ht = "SelectBoxContent", Ne = u.forwardRef(({ __scopeSelect: e, children:
|
|
|
2124
2155
|
style: {
|
|
2125
2156
|
...f,
|
|
2126
2157
|
...o,
|
|
2127
|
-
transition:
|
|
2158
|
+
transition: C ? "opacity 0.2s ease, transform 0.2s ease" : "none",
|
|
2128
2159
|
overflow: "hidden"
|
|
2129
2160
|
},
|
|
2130
2161
|
children: n
|
|
2131
2162
|
}
|
|
2132
2163
|
);
|
|
2133
|
-
return /* @__PURE__ */
|
|
2164
|
+
return /* @__PURE__ */ i(He, { children: y });
|
|
2134
2165
|
});
|
|
2135
|
-
|
|
2136
|
-
const
|
|
2166
|
+
Se.displayName = on;
|
|
2167
|
+
const sn = "SelectBoxItem", rt = u.forwardRef(
|
|
2137
2168
|
({ __scopeSelect: e, value: n, onClick: t, className: o, children: s, ...r }, c) => {
|
|
2138
|
-
const a =
|
|
2169
|
+
const a = xe(sn, e), l = a.value === n, { className: d, style: p } = I(
|
|
2139
2170
|
{ size: a.size, weight: a.weight },
|
|
2140
|
-
|
|
2171
|
+
ot
|
|
2141
2172
|
);
|
|
2142
|
-
return /* @__PURE__ */
|
|
2173
|
+
return /* @__PURE__ */ i(
|
|
2143
2174
|
R.div,
|
|
2144
2175
|
{
|
|
2145
2176
|
role: "option",
|
|
2146
2177
|
tabIndex: -1,
|
|
2147
|
-
"aria-selected":
|
|
2148
|
-
"data-state":
|
|
2178
|
+
"aria-selected": l,
|
|
2179
|
+
"data-state": l ? "checked" : "unchecked",
|
|
2149
2180
|
className: `bd-SelectBoxItem bd-variant-${a.variant} ${d || ""} ${o || ""}`,
|
|
2150
2181
|
style: p,
|
|
2151
2182
|
...r,
|
|
@@ -2153,22 +2184,22 @@ const jt = "SelectBoxItem", et = u.forwardRef(
|
|
|
2153
2184
|
onClick: (f) => {
|
|
2154
2185
|
a.onValueChange(n), a.onOpenChange(!1), a.triggerRef.current?.focus(), t?.(f);
|
|
2155
2186
|
},
|
|
2156
|
-
children: /* @__PURE__ */
|
|
2187
|
+
children: /* @__PURE__ */ i(R.span, { className: "bd-SelectBoxItemText", children: s })
|
|
2157
2188
|
}
|
|
2158
2189
|
);
|
|
2159
2190
|
}
|
|
2160
2191
|
);
|
|
2161
|
-
|
|
2162
|
-
const
|
|
2192
|
+
rt.displayName = sn;
|
|
2193
|
+
const rn = "SelectBoxValue", ke = u.forwardRef(
|
|
2163
2194
|
({ __scopeSelect: e, className: n, children: t, placeholder: o, ...s }, r) => {
|
|
2164
|
-
const c =
|
|
2195
|
+
const c = xe(rn, e), a = c.value ? c.valueLabelMap?.get(c.value) ?? c.value : t || o, { className: l, style: d } = I(
|
|
2165
2196
|
{ weight: c.weight },
|
|
2166
|
-
|
|
2197
|
+
ot
|
|
2167
2198
|
);
|
|
2168
|
-
return /* @__PURE__ */
|
|
2199
|
+
return /* @__PURE__ */ i(
|
|
2169
2200
|
R.span,
|
|
2170
2201
|
{
|
|
2171
|
-
className: `bd-SelectBoxValue ${
|
|
2202
|
+
className: `bd-SelectBoxValue ${l || ""} ${n || ""}`,
|
|
2172
2203
|
style: d,
|
|
2173
2204
|
...s,
|
|
2174
2205
|
ref: r,
|
|
@@ -2176,8 +2207,8 @@ const qt = "SelectBoxValue", we = u.forwardRef(
|
|
|
2176
2207
|
}
|
|
2177
2208
|
);
|
|
2178
2209
|
}
|
|
2179
|
-
),
|
|
2180
|
-
({ __scopeSelect: e, className: n, side: t = "right", "data-chevron": o, children: s, ...r }, c) => /* @__PURE__ */
|
|
2210
|
+
), $s = "SelectBoxSlot", Ee = u.forwardRef(
|
|
2211
|
+
({ __scopeSelect: e, className: n, side: t = "right", "data-chevron": o, children: s, ...r }, c) => /* @__PURE__ */ i(
|
|
2181
2212
|
R.div,
|
|
2182
2213
|
{
|
|
2183
2214
|
"aria-hidden": "true",
|
|
@@ -2186,129 +2217,277 @@ const qt = "SelectBoxValue", we = u.forwardRef(
|
|
|
2186
2217
|
className: `bd-SelectBoxSlot ${n || ""}`,
|
|
2187
2218
|
...r,
|
|
2188
2219
|
ref: c,
|
|
2189
|
-
children: s || /* @__PURE__ */
|
|
2220
|
+
children: s || /* @__PURE__ */ i(ds, {})
|
|
2190
2221
|
}
|
|
2191
2222
|
)
|
|
2192
2223
|
);
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
const
|
|
2224
|
+
ke.displayName = rn;
|
|
2225
|
+
Ee.displayName = $s;
|
|
2226
|
+
const Us = ({
|
|
2196
2227
|
options: e,
|
|
2197
2228
|
placeholder: n = "선택하세요",
|
|
2198
|
-
size: t =
|
|
2229
|
+
size: t = J.size.default,
|
|
2199
2230
|
weight: o = "regular",
|
|
2200
2231
|
variant: s = "classic",
|
|
2201
2232
|
disabled: r = !1,
|
|
2202
2233
|
maxHeight: c,
|
|
2203
2234
|
onScrollBottom: a,
|
|
2204
|
-
...
|
|
2235
|
+
...l
|
|
2205
2236
|
}) => {
|
|
2206
2237
|
const d = new Map(e.map((p) => [p.value, p.label]));
|
|
2207
2238
|
return /* @__PURE__ */ P(
|
|
2208
|
-
|
|
2239
|
+
st,
|
|
2209
2240
|
{
|
|
2210
|
-
...
|
|
2241
|
+
...l,
|
|
2211
2242
|
valueLabelMap: d,
|
|
2212
2243
|
variant: s,
|
|
2213
2244
|
size: t,
|
|
2214
2245
|
weight: o,
|
|
2215
2246
|
children: [
|
|
2216
|
-
/* @__PURE__ */ P(
|
|
2217
|
-
/* @__PURE__ */
|
|
2218
|
-
/* @__PURE__ */
|
|
2247
|
+
/* @__PURE__ */ P(Pe, { size: t, variant: s, disabled: r, children: [
|
|
2248
|
+
/* @__PURE__ */ i(ke, { placeholder: n }),
|
|
2249
|
+
/* @__PURE__ */ i(Ee, { "data-chevron": !0 })
|
|
2219
2250
|
] }),
|
|
2220
|
-
/* @__PURE__ */
|
|
2251
|
+
/* @__PURE__ */ i(Se, { children: /* @__PURE__ */ i(nt, { maxHeight: c, onScrollBottom: a, children: e.map((p) => /* @__PURE__ */ i(rt, { value: p.value, children: p.label }, p.value)) }) })
|
|
2221
2252
|
]
|
|
2222
2253
|
}
|
|
2223
2254
|
);
|
|
2224
|
-
},
|
|
2225
|
-
Root:
|
|
2226
|
-
Trigger:
|
|
2227
|
-
Content:
|
|
2228
|
-
Item:
|
|
2229
|
-
Value:
|
|
2230
|
-
Slot:
|
|
2231
|
-
}),
|
|
2232
|
-
size:
|
|
2233
|
-
variant:
|
|
2234
|
-
weight:
|
|
2255
|
+
}, ta = Object.assign(Us, {
|
|
2256
|
+
Root: st,
|
|
2257
|
+
Trigger: Pe,
|
|
2258
|
+
Content: Se,
|
|
2259
|
+
Item: rt,
|
|
2260
|
+
Value: ke,
|
|
2261
|
+
Slot: Ee
|
|
2262
|
+
}), ge = {
|
|
2263
|
+
size: J.size,
|
|
2264
|
+
variant: J.variant,
|
|
2265
|
+
weight: J.weight
|
|
2235
2266
|
};
|
|
2236
2267
|
({
|
|
2237
|
-
...
|
|
2238
|
-
checkboxSize:
|
|
2239
|
-
checkboxVariant:
|
|
2268
|
+
...ge,
|
|
2269
|
+
checkboxSize: X.size,
|
|
2270
|
+
checkboxVariant: X.variant
|
|
2240
2271
|
});
|
|
2241
|
-
const
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
const { className: v, style: C } = E(
|
|
2258
|
-
{ size: s, weight: r },
|
|
2259
|
-
Y
|
|
2260
|
-
);
|
|
2261
|
-
return /* @__PURE__ */ P(
|
|
2262
|
-
R.div,
|
|
2263
|
-
{
|
|
2264
|
-
...h,
|
|
2265
|
-
ref: m,
|
|
2266
|
-
role: "option",
|
|
2267
|
-
tabIndex: -1,
|
|
2268
|
-
"aria-selected": t,
|
|
2269
|
-
"aria-disabled": o,
|
|
2270
|
-
"data-disabled": o ? "" : void 0,
|
|
2271
|
-
"data-state": t ? "checked" : "unchecked",
|
|
2272
|
-
className: x(
|
|
2273
|
-
"bd-SelectBoxItem",
|
|
2274
|
-
`bd-variant-${c}`,
|
|
2275
|
-
"bd-CheckableSelectBoxItem",
|
|
2276
|
-
v,
|
|
2277
|
-
d
|
|
2278
|
-
),
|
|
2279
|
-
style: C,
|
|
2280
|
-
onClick: (g) => {
|
|
2281
|
-
if (o) {
|
|
2282
|
-
g.preventDefault();
|
|
2283
|
-
return;
|
|
2284
|
-
}
|
|
2285
|
-
p(e), f?.(g);
|
|
2286
|
-
},
|
|
2287
|
-
children: [
|
|
2288
|
-
/* @__PURE__ */ l(
|
|
2289
|
-
As,
|
|
2290
|
-
{
|
|
2291
|
-
checked: t,
|
|
2292
|
-
disabled: o,
|
|
2293
|
-
size: a,
|
|
2294
|
-
variant: i
|
|
2295
|
-
}
|
|
2296
|
-
),
|
|
2297
|
-
/* @__PURE__ */ l("span", { className: "bd-CheckableSelectBoxItemText", children: n })
|
|
2298
|
-
]
|
|
2299
|
-
}
|
|
2300
|
-
);
|
|
2272
|
+
const Ie = "CheckableSelectBox", an = "regular", js = ", ", yt = [
|
|
2273
|
+
"input",
|
|
2274
|
+
"textarea",
|
|
2275
|
+
"select",
|
|
2276
|
+
"button",
|
|
2277
|
+
"a[href]",
|
|
2278
|
+
'[contenteditable="true"]',
|
|
2279
|
+
'[contenteditable=""]',
|
|
2280
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
2281
|
+
"[data-checkable-selectbox-interactive]"
|
|
2282
|
+
].join(", "), [Hs] = F(Ie), [qs, cn] = Hs(Ie), Ws = (e) => e ? e instanceof Map ? new Map(e) : new Map(Object.entries(e)) : /* @__PURE__ */ new Map(), Ys = (e, n) => {
|
|
2283
|
+
if (!(e instanceof Element)) return !1;
|
|
2284
|
+
let t = e;
|
|
2285
|
+
for (; t && t !== n; ) {
|
|
2286
|
+
if (t.matches(yt) || t.querySelector(yt)) return !0;
|
|
2287
|
+
t = t.parentElement;
|
|
2301
2288
|
}
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2289
|
+
return !1;
|
|
2290
|
+
}, Ks = ({
|
|
2291
|
+
children: e,
|
|
2292
|
+
label: n,
|
|
2293
|
+
value: t
|
|
2294
|
+
}) => n || (typeof e == "string" || typeof e == "number" ? String(e) : t), at = (e) => {
|
|
2295
|
+
const {
|
|
2296
|
+
__scopeCheckableSelectBox: n,
|
|
2297
|
+
value: t,
|
|
2298
|
+
defaultValue: o,
|
|
2299
|
+
onValueChange: s,
|
|
2300
|
+
valueLabelMap: r,
|
|
2301
|
+
open: c,
|
|
2302
|
+
defaultOpen: a,
|
|
2303
|
+
onOpenChange: l,
|
|
2304
|
+
size: d = ge.size.default,
|
|
2305
|
+
weight: p = an,
|
|
2306
|
+
variant: f = ge.variant.default,
|
|
2307
|
+
checkboxSize: C = X.size.default,
|
|
2308
|
+
checkboxVariant: m = X.variant.default,
|
|
2309
|
+
disabled: y = !1,
|
|
2310
|
+
displayValueSeparator: h = js,
|
|
2311
|
+
children: g
|
|
2312
|
+
} = e, [v = [], b] = A({
|
|
2313
|
+
prop: t,
|
|
2314
|
+
defaultProp: o ?? [],
|
|
2315
|
+
onChange: s,
|
|
2316
|
+
caller: Ie
|
|
2317
|
+
}), [w, N] = u.useState(
|
|
2318
|
+
() => /* @__PURE__ */ new Map()
|
|
2319
|
+
), k = u.useCallback(
|
|
2320
|
+
(E) => {
|
|
2321
|
+
b(
|
|
2322
|
+
(D = []) => D.includes(E) ? D.filter((M) => M !== E) : [...D, E]
|
|
2323
|
+
);
|
|
2324
|
+
},
|
|
2325
|
+
[b]
|
|
2326
|
+
), S = u.useCallback((E, D) => {
|
|
2327
|
+
N((M) => {
|
|
2328
|
+
if (M.get(E) === D) return M;
|
|
2329
|
+
const Z = new Map(M);
|
|
2330
|
+
return Z.set(E, D), Z;
|
|
2331
|
+
});
|
|
2332
|
+
}, []), L = u.useCallback((E) => {
|
|
2333
|
+
N((D) => {
|
|
2334
|
+
if (!D.has(E)) return D;
|
|
2335
|
+
const M = new Map(D);
|
|
2336
|
+
return M.delete(E), M;
|
|
2337
|
+
});
|
|
2338
|
+
}, []), z = u.useMemo(() => {
|
|
2339
|
+
const E = Ws(r);
|
|
2340
|
+
return w.forEach((D, M) => {
|
|
2341
|
+
E.set(M, D);
|
|
2342
|
+
}), E;
|
|
2343
|
+
}, [w, r]), $ = u.useMemo(
|
|
2344
|
+
() => v.map((E) => z.get(E) ?? E).join(h),
|
|
2345
|
+
[h, z, v]
|
|
2346
|
+
);
|
|
2347
|
+
return /* @__PURE__ */ i(
|
|
2348
|
+
qs,
|
|
2349
|
+
{
|
|
2350
|
+
scope: n,
|
|
2351
|
+
values: v,
|
|
2352
|
+
toggleValue: k,
|
|
2353
|
+
registerValueLabel: S,
|
|
2354
|
+
unregisterValueLabel: L,
|
|
2355
|
+
valueLabelMap: z,
|
|
2356
|
+
size: d,
|
|
2357
|
+
weight: p,
|
|
2358
|
+
variant: f,
|
|
2359
|
+
checkboxSize: C,
|
|
2360
|
+
checkboxVariant: m,
|
|
2361
|
+
disabled: y,
|
|
2362
|
+
children: /* @__PURE__ */ i(
|
|
2363
|
+
st,
|
|
2364
|
+
{
|
|
2365
|
+
value: $,
|
|
2366
|
+
open: c,
|
|
2367
|
+
defaultOpen: a,
|
|
2368
|
+
onOpenChange: l,
|
|
2369
|
+
variant: f,
|
|
2370
|
+
size: d,
|
|
2371
|
+
weight: p,
|
|
2372
|
+
children: g
|
|
2373
|
+
}
|
|
2374
|
+
)
|
|
2375
|
+
}
|
|
2376
|
+
);
|
|
2377
|
+
};
|
|
2378
|
+
at.displayName = Ie;
|
|
2379
|
+
const ct = u.forwardRef((e, n) => {
|
|
2380
|
+
const { __scopeCheckableSelectBox: t, size: o, variant: s, disabled: r, ...c } = e, a = cn(
|
|
2381
|
+
"CheckableSelectBoxTrigger",
|
|
2382
|
+
t
|
|
2383
|
+
);
|
|
2384
|
+
return /* @__PURE__ */ i(
|
|
2385
|
+
Pe,
|
|
2386
|
+
{
|
|
2387
|
+
...c,
|
|
2388
|
+
ref: n,
|
|
2389
|
+
size: o ?? a.size,
|
|
2390
|
+
variant: s ?? a.variant,
|
|
2391
|
+
disabled: r ?? a.disabled
|
|
2392
|
+
}
|
|
2393
|
+
);
|
|
2394
|
+
});
|
|
2395
|
+
ct.displayName = "CheckableSelectBoxTrigger";
|
|
2396
|
+
const it = u.forwardRef((e, n) => {
|
|
2397
|
+
const { __scopeCheckableSelectBox: t, ...o } = e;
|
|
2398
|
+
return /* @__PURE__ */ i(
|
|
2399
|
+
Se,
|
|
2400
|
+
{
|
|
2401
|
+
...o,
|
|
2402
|
+
ref: n,
|
|
2403
|
+
"aria-multiselectable": o["aria-multiselectable"] ?? "true"
|
|
2404
|
+
}
|
|
2405
|
+
);
|
|
2406
|
+
});
|
|
2407
|
+
it.displayName = "CheckableSelectBoxContent";
|
|
2408
|
+
const lt = u.forwardRef((e, n) => {
|
|
2409
|
+
const {
|
|
2410
|
+
__scopeCheckableSelectBox: t,
|
|
2411
|
+
value: o,
|
|
2412
|
+
label: s,
|
|
2413
|
+
disabled: r,
|
|
2414
|
+
size: c,
|
|
2415
|
+
weight: a,
|
|
2416
|
+
variant: l,
|
|
2417
|
+
checkboxSize: d,
|
|
2418
|
+
checkboxVariant: p,
|
|
2419
|
+
className: f,
|
|
2420
|
+
onClick: C,
|
|
2421
|
+
children: m,
|
|
2422
|
+
...y
|
|
2423
|
+
} = e, h = cn("CheckableSelectBoxItem", t), g = h.values.includes(o), v = h.disabled || !!r, b = c ?? h.size, w = a ?? h.weight, N = l ?? h.variant, k = d ?? h.checkboxSize, S = p ?? h.checkboxVariant, L = Ks({ children: m, label: s, value: o }), { registerValueLabel: z, unregisterValueLabel: $ } = h;
|
|
2424
|
+
G(() => (z(o, L), () => {
|
|
2425
|
+
$(o);
|
|
2426
|
+
}), [L, z, $, o]);
|
|
2427
|
+
const E = typeof m == "function" ? m({ selected: g, disabled: v }) : m, D = E === void 0 ? s : E, { className: M, style: Z } = I(
|
|
2428
|
+
{ size: b, weight: w },
|
|
2429
|
+
ge
|
|
2430
|
+
);
|
|
2431
|
+
return /* @__PURE__ */ P(
|
|
2432
|
+
R.div,
|
|
2433
|
+
{
|
|
2434
|
+
...y,
|
|
2435
|
+
ref: n,
|
|
2436
|
+
role: "option",
|
|
2437
|
+
tabIndex: -1,
|
|
2438
|
+
"aria-selected": g,
|
|
2439
|
+
"aria-disabled": v,
|
|
2440
|
+
"data-disabled": v ? "" : void 0,
|
|
2441
|
+
"data-state": g ? "checked" : "unchecked",
|
|
2442
|
+
className: x(
|
|
2443
|
+
"bd-SelectBoxItem",
|
|
2444
|
+
`bd-variant-${N}`,
|
|
2445
|
+
"bd-CheckableSelectBoxItem",
|
|
2446
|
+
M,
|
|
2447
|
+
f
|
|
2448
|
+
),
|
|
2449
|
+
style: Z,
|
|
2450
|
+
onClick: (V) => {
|
|
2451
|
+
if (v) {
|
|
2452
|
+
V.preventDefault();
|
|
2453
|
+
return;
|
|
2454
|
+
}
|
|
2455
|
+
Ys(V.target, V.currentTarget) || h.toggleValue(o), C?.(V);
|
|
2456
|
+
},
|
|
2457
|
+
children: [
|
|
2458
|
+
/* @__PURE__ */ i(
|
|
2459
|
+
Xs,
|
|
2460
|
+
{
|
|
2461
|
+
checked: g,
|
|
2462
|
+
disabled: v,
|
|
2463
|
+
size: k,
|
|
2464
|
+
variant: S
|
|
2465
|
+
}
|
|
2466
|
+
),
|
|
2467
|
+
typeof D == "string" || typeof D == "number" ? /* @__PURE__ */ i("span", { className: "bd-CheckableSelectBoxItemText", children: D }) : D
|
|
2468
|
+
]
|
|
2469
|
+
}
|
|
2470
|
+
);
|
|
2471
|
+
});
|
|
2472
|
+
lt.displayName = "CheckableSelectBoxItem";
|
|
2473
|
+
const ut = u.forwardRef((e, n) => {
|
|
2474
|
+
const { __scopeCheckableSelectBox: t, ...o } = e;
|
|
2475
|
+
return /* @__PURE__ */ i(ke, { ...o, ref: n });
|
|
2476
|
+
});
|
|
2477
|
+
ut.displayName = "CheckableSelectBoxValue";
|
|
2478
|
+
const dt = u.forwardRef((e, n) => {
|
|
2479
|
+
const { __scopeCheckableSelectBox: t, ...o } = e;
|
|
2480
|
+
return /* @__PURE__ */ i(Ee, { ...o, ref: n });
|
|
2481
|
+
});
|
|
2482
|
+
dt.displayName = "CheckableSelectBoxSlot";
|
|
2483
|
+
const Xs = ({
|
|
2305
2484
|
checked: e,
|
|
2306
2485
|
disabled: n,
|
|
2307
2486
|
size: t,
|
|
2308
2487
|
variant: o
|
|
2309
2488
|
}) => {
|
|
2310
|
-
const { className: s, style: r } =
|
|
2311
|
-
return /* @__PURE__ */
|
|
2489
|
+
const { className: s, style: r } = I({ size: t, variant: o }, X);
|
|
2490
|
+
return /* @__PURE__ */ i(Ot, { checked: e, disabled: n, children: /* @__PURE__ */ i(
|
|
2312
2491
|
R.span,
|
|
2313
2492
|
{
|
|
2314
2493
|
"aria-hidden": "true",
|
|
@@ -2316,10 +2495,10 @@ const As = ({
|
|
|
2316
2495
|
"data-disabled": n ? "" : void 0,
|
|
2317
2496
|
className: x("bd-reset", "bd-CheckboxRoot", s),
|
|
2318
2497
|
style: r,
|
|
2319
|
-
children: /* @__PURE__ */
|
|
2498
|
+
children: /* @__PURE__ */ i(Re, { asChild: !0, className: "bd-CheckboxIndicator", children: /* @__PURE__ */ i(Ne, {}) })
|
|
2320
2499
|
}
|
|
2321
2500
|
) });
|
|
2322
|
-
},
|
|
2501
|
+
}, Zs = ({
|
|
2323
2502
|
items: e,
|
|
2324
2503
|
value: n,
|
|
2325
2504
|
defaultValue: t,
|
|
@@ -2328,71 +2507,67 @@ const As = ({
|
|
|
2328
2507
|
defaultOpen: r,
|
|
2329
2508
|
onOpenChange: c,
|
|
2330
2509
|
placeholder: a = "선택하세요",
|
|
2331
|
-
size:
|
|
2332
|
-
weight: d =
|
|
2333
|
-
variant: p
|
|
2334
|
-
checkboxSize: f
|
|
2335
|
-
checkboxVariant:
|
|
2510
|
+
size: l,
|
|
2511
|
+
weight: d = an,
|
|
2512
|
+
variant: p,
|
|
2513
|
+
checkboxSize: f,
|
|
2514
|
+
checkboxVariant: C,
|
|
2336
2515
|
disabled: m = !1,
|
|
2337
|
-
className:
|
|
2338
|
-
maxHeight:
|
|
2516
|
+
className: y,
|
|
2517
|
+
maxHeight: h,
|
|
2339
2518
|
onScrollBottom: g
|
|
2340
2519
|
}) => {
|
|
2341
|
-
const
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
caller: "CheckableSelectBox"
|
|
2346
|
-
}), y = /* @__PURE__ */ new Map();
|
|
2347
|
-
e.forEach((S) => {
|
|
2348
|
-
y.set(S.value, S.label);
|
|
2349
|
-
});
|
|
2350
|
-
const w = N.map((S) => y.get(S) ?? S).join(", ");
|
|
2520
|
+
const v = u.useMemo(
|
|
2521
|
+
() => new Map(e.map((b) => [b.value, b.label])),
|
|
2522
|
+
[e]
|
|
2523
|
+
);
|
|
2351
2524
|
return /* @__PURE__ */ P(
|
|
2352
|
-
|
|
2525
|
+
at,
|
|
2353
2526
|
{
|
|
2354
|
-
value:
|
|
2527
|
+
value: n,
|
|
2528
|
+
defaultValue: t,
|
|
2529
|
+
onValueChange: o,
|
|
2530
|
+
valueLabelMap: v,
|
|
2355
2531
|
open: s,
|
|
2356
2532
|
defaultOpen: r,
|
|
2357
2533
|
onOpenChange: c,
|
|
2358
|
-
|
|
2359
|
-
size: i,
|
|
2534
|
+
size: l,
|
|
2360
2535
|
weight: d,
|
|
2536
|
+
variant: p,
|
|
2537
|
+
checkboxSize: f,
|
|
2538
|
+
checkboxVariant: C,
|
|
2539
|
+
disabled: m,
|
|
2361
2540
|
children: [
|
|
2362
|
-
/* @__PURE__ */ P(
|
|
2363
|
-
/* @__PURE__ */
|
|
2364
|
-
/* @__PURE__ */
|
|
2541
|
+
/* @__PURE__ */ P(ct, { className: y, children: [
|
|
2542
|
+
/* @__PURE__ */ i(ut, { placeholder: a }),
|
|
2543
|
+
/* @__PURE__ */ i(dt, { "data-chevron": !0 })
|
|
2365
2544
|
] }),
|
|
2366
|
-
/* @__PURE__ */
|
|
2367
|
-
|
|
2545
|
+
/* @__PURE__ */ i(it, { children: /* @__PURE__ */ i(nt, { maxHeight: h, onScrollBottom: g, children: e.map((b) => /* @__PURE__ */ i(
|
|
2546
|
+
lt,
|
|
2368
2547
|
{
|
|
2369
|
-
value:
|
|
2370
|
-
label:
|
|
2371
|
-
|
|
2372
|
-
disabled: m || S.disabled,
|
|
2373
|
-
size: i,
|
|
2374
|
-
weight: d,
|
|
2375
|
-
variant: p,
|
|
2376
|
-
checkboxSize: f,
|
|
2377
|
-
checkboxVariant: h,
|
|
2378
|
-
onItemSelect: (k) => {
|
|
2379
|
-
b(
|
|
2380
|
-
(O = []) => O.includes(k) ? O.filter((re) => re !== k) : [...O, k]
|
|
2381
|
-
);
|
|
2382
|
-
}
|
|
2548
|
+
value: b.value,
|
|
2549
|
+
label: b.label,
|
|
2550
|
+
disabled: b.disabled
|
|
2383
2551
|
},
|
|
2384
|
-
|
|
2552
|
+
b.value
|
|
2385
2553
|
)) }) })
|
|
2386
2554
|
]
|
|
2387
2555
|
}
|
|
2388
2556
|
);
|
|
2389
|
-
},
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2557
|
+
}, na = Object.assign(Zs, {
|
|
2558
|
+
Root: at,
|
|
2559
|
+
Trigger: ct,
|
|
2560
|
+
Content: it,
|
|
2561
|
+
Item: lt,
|
|
2562
|
+
Value: ut,
|
|
2563
|
+
Slot: dt
|
|
2564
|
+
}), pe = {
|
|
2565
|
+
...Q,
|
|
2566
|
+
...X
|
|
2567
|
+
}, pt = "CheckboxGroup", [Js, ln] = F(
|
|
2568
|
+
pt,
|
|
2569
|
+
[qe, At]
|
|
2570
|
+
), un = qe(), dn = At(), [Qs, er] = Js(pt), pn = u.forwardRef(
|
|
2396
2571
|
(e, n) => {
|
|
2397
2572
|
const {
|
|
2398
2573
|
__scopeCheckboxGroup: t,
|
|
@@ -2401,32 +2576,32 @@ const As = ({
|
|
|
2401
2576
|
value: r,
|
|
2402
2577
|
required: c = !1,
|
|
2403
2578
|
disabled: a = !1,
|
|
2404
|
-
loop:
|
|
2579
|
+
loop: l = !0,
|
|
2405
2580
|
orientation: d,
|
|
2406
2581
|
onValueChange: p,
|
|
2407
2582
|
...f
|
|
2408
|
-
} = e,
|
|
2583
|
+
} = e, C = un(t), [m = [], y] = A({
|
|
2409
2584
|
prop: r,
|
|
2410
2585
|
defaultProp: s || [],
|
|
2411
2586
|
onChange: p
|
|
2412
|
-
}),
|
|
2413
|
-
(
|
|
2414
|
-
[
|
|
2587
|
+
}), h = u.useCallback(
|
|
2588
|
+
(v) => y((b = []) => [...b, v]),
|
|
2589
|
+
[y]
|
|
2415
2590
|
), g = u.useCallback(
|
|
2416
|
-
(
|
|
2417
|
-
[
|
|
2591
|
+
(v) => y((b = []) => b.filter((w) => w !== v)),
|
|
2592
|
+
[y]
|
|
2418
2593
|
);
|
|
2419
|
-
return /* @__PURE__ */
|
|
2420
|
-
|
|
2594
|
+
return /* @__PURE__ */ i(
|
|
2595
|
+
Qs,
|
|
2421
2596
|
{
|
|
2422
2597
|
scope: t,
|
|
2423
2598
|
name: o,
|
|
2424
2599
|
required: c,
|
|
2425
2600
|
disabled: a,
|
|
2426
2601
|
value: m,
|
|
2427
|
-
onItemCheck:
|
|
2602
|
+
onItemCheck: h,
|
|
2428
2603
|
onItemUnCheck: g,
|
|
2429
|
-
children: /* @__PURE__ */
|
|
2604
|
+
children: /* @__PURE__ */ i(It, { asChild: !0, ...C, orientation: d, loop: l, children: /* @__PURE__ */ i(
|
|
2430
2605
|
R.div,
|
|
2431
2606
|
{
|
|
2432
2607
|
role: "group",
|
|
@@ -2439,56 +2614,56 @@ const As = ({
|
|
|
2439
2614
|
);
|
|
2440
2615
|
}
|
|
2441
2616
|
);
|
|
2442
|
-
|
|
2443
|
-
const
|
|
2444
|
-
const { __scopeCheckboxGroup: t, disabled: o, ...s } = e, r =
|
|
2445
|
-
return /* @__PURE__ */
|
|
2446
|
-
|
|
2617
|
+
pn.displayName = pt;
|
|
2618
|
+
const fn = "CheckboxGroupItem", mn = u.forwardRef((e, n) => {
|
|
2619
|
+
const { __scopeCheckboxGroup: t, disabled: o, ...s } = e, r = er(fn, t), c = r.disabled || o, a = un(t), l = dn(t), d = u.useRef(null), p = T(n, d), f = r.value?.includes(s.value);
|
|
2620
|
+
return /* @__PURE__ */ i(
|
|
2621
|
+
Dt,
|
|
2447
2622
|
{
|
|
2448
2623
|
asChild: !0,
|
|
2449
2624
|
...a,
|
|
2450
2625
|
focusable: !c,
|
|
2451
2626
|
active: f,
|
|
2452
|
-
children: /* @__PURE__ */
|
|
2453
|
-
|
|
2627
|
+
children: /* @__PURE__ */ i(
|
|
2628
|
+
Gt,
|
|
2454
2629
|
{
|
|
2455
2630
|
name: r.name,
|
|
2456
2631
|
disabled: c,
|
|
2457
2632
|
required: r.required,
|
|
2458
2633
|
checked: f,
|
|
2459
|
-
...
|
|
2634
|
+
...l,
|
|
2460
2635
|
...s,
|
|
2461
2636
|
ref: p,
|
|
2462
|
-
onCheckedChange: (
|
|
2463
|
-
|
|
2637
|
+
onCheckedChange: (C) => {
|
|
2638
|
+
C ? r.onItemCheck(e.value) : r.onItemUnCheck(e.value);
|
|
2464
2639
|
}
|
|
2465
2640
|
}
|
|
2466
2641
|
)
|
|
2467
2642
|
}
|
|
2468
2643
|
);
|
|
2469
2644
|
});
|
|
2470
|
-
|
|
2471
|
-
const
|
|
2472
|
-
const { __scopeCheckboxGroup: t, ...o } = e, s =
|
|
2473
|
-
return /* @__PURE__ */
|
|
2645
|
+
mn.displayName = fn;
|
|
2646
|
+
const tr = "CheckboxGroupIndicator", hn = u.forwardRef((e, n) => {
|
|
2647
|
+
const { __scopeCheckboxGroup: t, ...o } = e, s = dn(t);
|
|
2648
|
+
return /* @__PURE__ */ i(Re, { ...s, ...o, ref: n });
|
|
2474
2649
|
});
|
|
2475
|
-
|
|
2476
|
-
const
|
|
2477
|
-
|
|
2478
|
-
]),
|
|
2650
|
+
hn.displayName = tr;
|
|
2651
|
+
const ie = "CheckboxGroup", [nr] = F(ie, [
|
|
2652
|
+
ln
|
|
2653
|
+
]), bn = ln(), [or, gn] = nr(ie), Cn = u.forwardRef(
|
|
2479
2654
|
(e, n) => {
|
|
2480
2655
|
const {
|
|
2481
|
-
size: t =
|
|
2482
|
-
variant: o =
|
|
2656
|
+
size: t = pe.size.default,
|
|
2657
|
+
variant: o = pe.variant.default,
|
|
2483
2658
|
...s
|
|
2484
|
-
} = e, { __scopeCheckboxGroup: r, className: c, ...a } =
|
|
2659
|
+
} = e, { __scopeCheckboxGroup: r, className: c, ...a } = I(
|
|
2485
2660
|
s,
|
|
2486
|
-
|
|
2487
|
-
),
|
|
2488
|
-
return /* @__PURE__ */
|
|
2489
|
-
|
|
2661
|
+
pe
|
|
2662
|
+
), l = bn(r);
|
|
2663
|
+
return /* @__PURE__ */ i(or, { scope: r, size: t, variant: o, children: /* @__PURE__ */ i(
|
|
2664
|
+
pn,
|
|
2490
2665
|
{
|
|
2491
|
-
...
|
|
2666
|
+
...l,
|
|
2492
2667
|
...a,
|
|
2493
2668
|
ref: n,
|
|
2494
2669
|
className: x("bd-CheckboxGroupRoot", c)
|
|
@@ -2496,31 +2671,31 @@ const oe = "CheckboxGroup", [Gs] = M(oe, [
|
|
|
2496
2671
|
) });
|
|
2497
2672
|
}
|
|
2498
2673
|
);
|
|
2499
|
-
|
|
2500
|
-
const
|
|
2674
|
+
Cn.displayName = ie;
|
|
2675
|
+
const vn = u.forwardRef(
|
|
2501
2676
|
(e, n) => {
|
|
2502
|
-
const { __scopeCheckboxGroup: t, children: o, className: s, style: r, ...c } = e, { size: a } =
|
|
2677
|
+
const { __scopeCheckboxGroup: t, children: o, className: s, style: r, ...c } = e, { size: a } = gn("CheckboxGroupItem", t);
|
|
2503
2678
|
return o ? /* @__PURE__ */ P(
|
|
2504
|
-
|
|
2679
|
+
ae,
|
|
2505
2680
|
{
|
|
2506
2681
|
as: "label",
|
|
2507
2682
|
size: a,
|
|
2508
2683
|
className: x("bd-CheckboxGroupItem", s),
|
|
2509
2684
|
style: r,
|
|
2510
2685
|
children: [
|
|
2511
|
-
/* @__PURE__ */
|
|
2512
|
-
|
|
2686
|
+
/* @__PURE__ */ i(
|
|
2687
|
+
Le,
|
|
2513
2688
|
{
|
|
2514
2689
|
__scopeCheckboxGroup: t,
|
|
2515
2690
|
...c,
|
|
2516
2691
|
ref: n
|
|
2517
2692
|
}
|
|
2518
2693
|
),
|
|
2519
|
-
o && /* @__PURE__ */
|
|
2694
|
+
o && /* @__PURE__ */ i("span", { className: "bd-CheckboxGroupItemInner", children: o })
|
|
2520
2695
|
]
|
|
2521
2696
|
}
|
|
2522
|
-
) : /* @__PURE__ */
|
|
2523
|
-
|
|
2697
|
+
) : /* @__PURE__ */ i(
|
|
2698
|
+
Le,
|
|
2524
2699
|
{
|
|
2525
2700
|
__scopeCheckboxGroup: t,
|
|
2526
2701
|
...c,
|
|
@@ -2531,11 +2706,11 @@ const rn = u.forwardRef(
|
|
|
2531
2706
|
);
|
|
2532
2707
|
}
|
|
2533
2708
|
);
|
|
2534
|
-
|
|
2535
|
-
const
|
|
2536
|
-
const o =
|
|
2537
|
-
return /* @__PURE__ */
|
|
2538
|
-
|
|
2709
|
+
vn.displayName = `${ie}.Item`;
|
|
2710
|
+
const Le = u.forwardRef(({ __scopeCheckboxGroup: e, ...n }, t) => {
|
|
2711
|
+
const o = gn("CheckboxGroupItemCheckbox", e), s = bn(e), { className: r } = I({ ...n, ...o }, pe);
|
|
2712
|
+
return /* @__PURE__ */ i(
|
|
2713
|
+
mn,
|
|
2539
2714
|
{
|
|
2540
2715
|
...s,
|
|
2541
2716
|
...n,
|
|
@@ -2546,18 +2721,18 @@ const Be = u.forwardRef(({ __scopeCheckboxGroup: e, ...n }, t) => {
|
|
|
2546
2721
|
"bd-CheckboxGroupItemCheckbox",
|
|
2547
2722
|
r
|
|
2548
2723
|
),
|
|
2549
|
-
children: /* @__PURE__ */
|
|
2724
|
+
children: /* @__PURE__ */ i(hn, { ...s, asChild: !0, className: "bd-CheckboxIndicator", children: /* @__PURE__ */ i(Ne, {}) })
|
|
2550
2725
|
}
|
|
2551
2726
|
);
|
|
2552
2727
|
});
|
|
2553
|
-
|
|
2554
|
-
const
|
|
2555
|
-
Root:
|
|
2556
|
-
Item:
|
|
2557
|
-
},
|
|
2558
|
-
size: { type: "enum", className: "bd-size", values:
|
|
2559
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
2560
|
-
},
|
|
2728
|
+
Le.displayName = `${ie}.ItemCheckbox`;
|
|
2729
|
+
const oa = {
|
|
2730
|
+
Root: Cn,
|
|
2731
|
+
Item: vn
|
|
2732
|
+
}, sr = ["1", "2", "3", "4"], rr = ["classic", "outline"], ar = {
|
|
2733
|
+
size: { type: "enum", className: "bd-size", values: sr, default: "2" },
|
|
2734
|
+
variant: { type: "enum", className: "bd-variant", values: rr, default: "classic" }
|
|
2735
|
+
}, ft = "Radio", [cr, yn] = F(ft), [ir, lr] = cr(ft), mt = u.forwardRef(
|
|
2561
2736
|
(e, n) => {
|
|
2562
2737
|
const {
|
|
2563
2738
|
__scopeRadio: t,
|
|
@@ -2566,33 +2741,33 @@ const $r = {
|
|
|
2566
2741
|
required: r,
|
|
2567
2742
|
disabled: c,
|
|
2568
2743
|
value: a = "on",
|
|
2569
|
-
onCheck:
|
|
2744
|
+
onCheck: l,
|
|
2570
2745
|
form: d,
|
|
2571
2746
|
...p
|
|
2572
|
-
} = e, [f,
|
|
2573
|
-
return /* @__PURE__ */ P(
|
|
2574
|
-
/* @__PURE__ */
|
|
2747
|
+
} = e, [f, C] = u.useState(null), m = T(n, C), y = u.useRef(!1), h = f ? d || !!f.closest("form") : !0;
|
|
2748
|
+
return /* @__PURE__ */ P(ir, { scope: t, checked: s, disabled: c, children: [
|
|
2749
|
+
/* @__PURE__ */ i(
|
|
2575
2750
|
R.button,
|
|
2576
2751
|
{
|
|
2577
2752
|
type: "button",
|
|
2578
2753
|
role: "radio",
|
|
2579
2754
|
"aria-checked": s,
|
|
2580
|
-
"data-state":
|
|
2755
|
+
"data-state": xn(s),
|
|
2581
2756
|
"data-disabled": c ? "" : void 0,
|
|
2582
2757
|
disabled: c,
|
|
2583
2758
|
value: a,
|
|
2584
2759
|
...p,
|
|
2585
2760
|
ref: m,
|
|
2586
|
-
onClick:
|
|
2587
|
-
s ||
|
|
2761
|
+
onClick: O(e.onClick, (g) => {
|
|
2762
|
+
s || l?.(), h && (y.current = g.isPropagationStopped(), y.current || g.stopPropagation());
|
|
2588
2763
|
})
|
|
2589
2764
|
}
|
|
2590
2765
|
),
|
|
2591
|
-
|
|
2592
|
-
|
|
2766
|
+
h && /* @__PURE__ */ i(
|
|
2767
|
+
Rn,
|
|
2593
2768
|
{
|
|
2594
2769
|
control: f,
|
|
2595
|
-
bubbles: !
|
|
2770
|
+
bubbles: !y.current,
|
|
2596
2771
|
name: o,
|
|
2597
2772
|
value: a,
|
|
2598
2773
|
checked: s,
|
|
@@ -2605,14 +2780,14 @@ const $r = {
|
|
|
2605
2780
|
] });
|
|
2606
2781
|
}
|
|
2607
2782
|
);
|
|
2608
|
-
|
|
2609
|
-
const
|
|
2783
|
+
mt.displayName = ft;
|
|
2784
|
+
const wn = "RadioIndicator", Nn = u.forwardRef(
|
|
2610
2785
|
(e, n) => {
|
|
2611
|
-
const { __scopeRadio: t, forceMount: o, ...s } = e, r =
|
|
2612
|
-
return /* @__PURE__ */
|
|
2786
|
+
const { __scopeRadio: t, forceMount: o, ...s } = e, r = lr(wn, t);
|
|
2787
|
+
return /* @__PURE__ */ i(St, { remain: o || r.checked, children: /* @__PURE__ */ i(
|
|
2613
2788
|
R.span,
|
|
2614
2789
|
{
|
|
2615
|
-
"data-state":
|
|
2790
|
+
"data-state": xn(r.checked),
|
|
2616
2791
|
"data-disabled": r.disabled ? "" : void 0,
|
|
2617
2792
|
...s,
|
|
2618
2793
|
ref: n
|
|
@@ -2620,22 +2795,22 @@ const cn = "RadioIndicator", ln = u.forwardRef(
|
|
|
2620
2795
|
) });
|
|
2621
2796
|
}
|
|
2622
2797
|
);
|
|
2623
|
-
|
|
2624
|
-
const
|
|
2798
|
+
Nn.displayName = wn;
|
|
2799
|
+
const ur = "RadioBubbleInput", Rn = u.forwardRef(
|
|
2625
2800
|
({ control: e, checked: n, bubbles: t = !0, ...o }, s) => {
|
|
2626
|
-
const r = u.useRef(null), c =
|
|
2801
|
+
const r = u.useRef(null), c = T(r, s), a = Ce(n), l = Ue(e);
|
|
2627
2802
|
return u.useEffect(() => {
|
|
2628
2803
|
const d = r.current;
|
|
2629
2804
|
if (!d) return;
|
|
2630
|
-
const p = window.HTMLInputElement.prototype,
|
|
2805
|
+
const p = window.HTMLInputElement.prototype, C = Object.getOwnPropertyDescriptor(
|
|
2631
2806
|
p,
|
|
2632
2807
|
"checked"
|
|
2633
2808
|
).set;
|
|
2634
|
-
if (a !== n &&
|
|
2809
|
+
if (a !== n && C) {
|
|
2635
2810
|
const m = new Event("click", { bubbles: t });
|
|
2636
|
-
|
|
2811
|
+
C.call(d, n), d.dispatchEvent(m);
|
|
2637
2812
|
}
|
|
2638
|
-
}, [a, n, t]), /* @__PURE__ */
|
|
2813
|
+
}, [a, n, t]), /* @__PURE__ */ i(
|
|
2639
2814
|
R.input,
|
|
2640
2815
|
{
|
|
2641
2816
|
type: "radio",
|
|
@@ -2646,7 +2821,7 @@ const qs = "RadioBubbleInput", un = u.forwardRef(
|
|
|
2646
2821
|
ref: c,
|
|
2647
2822
|
style: {
|
|
2648
2823
|
...o.style,
|
|
2649
|
-
...
|
|
2824
|
+
...l,
|
|
2650
2825
|
position: "absolute",
|
|
2651
2826
|
pointerEvents: "none",
|
|
2652
2827
|
opacity: 0,
|
|
@@ -2656,39 +2831,39 @@ const qs = "RadioBubbleInput", un = u.forwardRef(
|
|
|
2656
2831
|
);
|
|
2657
2832
|
}
|
|
2658
2833
|
);
|
|
2659
|
-
|
|
2660
|
-
function
|
|
2834
|
+
Rn.displayName = ur;
|
|
2835
|
+
function xn(e) {
|
|
2661
2836
|
return e ? "checked" : "unchecked";
|
|
2662
2837
|
}
|
|
2663
|
-
const
|
|
2838
|
+
const dr = u.forwardRef((e, n) => {
|
|
2664
2839
|
const {
|
|
2665
2840
|
className: t,
|
|
2666
2841
|
checked: o,
|
|
2667
2842
|
defaultChecked: s = !1,
|
|
2668
2843
|
onCheck: r,
|
|
2669
2844
|
...c
|
|
2670
|
-
} =
|
|
2845
|
+
} = I(e, ar), [a, l] = A({
|
|
2671
2846
|
prop: o,
|
|
2672
2847
|
defaultProp: s,
|
|
2673
2848
|
onChange: r
|
|
2674
2849
|
});
|
|
2675
|
-
return /* @__PURE__ */
|
|
2676
|
-
|
|
2850
|
+
return /* @__PURE__ */ i(
|
|
2851
|
+
mt,
|
|
2677
2852
|
{
|
|
2678
2853
|
...c,
|
|
2679
2854
|
defaultChecked: s,
|
|
2680
2855
|
checked: a,
|
|
2681
|
-
onCheck: () =>
|
|
2856
|
+
onCheck: () => l((d) => !d),
|
|
2682
2857
|
ref: n,
|
|
2683
2858
|
className: x("bd-reset", "bd-BaseRadioRoot", "bd-RadioRoot", t)
|
|
2684
2859
|
}
|
|
2685
2860
|
);
|
|
2686
2861
|
});
|
|
2687
|
-
|
|
2688
|
-
const
|
|
2689
|
-
|
|
2690
|
-
[
|
|
2691
|
-
),
|
|
2862
|
+
dr.displayName = "Radio";
|
|
2863
|
+
const pr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], De = "RadioGroup", [fr, Pn] = F(
|
|
2864
|
+
De,
|
|
2865
|
+
[yn]
|
|
2866
|
+
), Sn = qe(), kn = yn(), [mr, hr] = fr(De), En = u.forwardRef(
|
|
2692
2867
|
(e, n) => {
|
|
2693
2868
|
const {
|
|
2694
2869
|
__scopeRadioGroup: t,
|
|
@@ -2697,31 +2872,31 @@ const Ks = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], xe = "RadioGroup
|
|
|
2697
2872
|
value: r,
|
|
2698
2873
|
required: c = !1,
|
|
2699
2874
|
disabled: a = !1,
|
|
2700
|
-
orientation:
|
|
2875
|
+
orientation: l,
|
|
2701
2876
|
loop: d = !0,
|
|
2702
2877
|
onValueChange: p,
|
|
2703
2878
|
...f
|
|
2704
|
-
} = e,
|
|
2879
|
+
} = e, C = Sn(t), [m, y] = A({
|
|
2705
2880
|
prop: r,
|
|
2706
2881
|
defaultProp: s ?? null,
|
|
2707
2882
|
onChange: p,
|
|
2708
|
-
caller:
|
|
2883
|
+
caller: De
|
|
2709
2884
|
});
|
|
2710
|
-
return /* @__PURE__ */
|
|
2711
|
-
|
|
2885
|
+
return /* @__PURE__ */ i(
|
|
2886
|
+
mr,
|
|
2712
2887
|
{
|
|
2713
2888
|
scope: t,
|
|
2714
2889
|
name: o,
|
|
2715
2890
|
required: c,
|
|
2716
2891
|
disabled: a,
|
|
2717
2892
|
value: m,
|
|
2718
|
-
onValueChange:
|
|
2719
|
-
children: /* @__PURE__ */
|
|
2893
|
+
onValueChange: y,
|
|
2894
|
+
children: /* @__PURE__ */ i(It, { asChild: !0, ...C, orientation: l, loop: d, children: /* @__PURE__ */ i(
|
|
2720
2895
|
R.div,
|
|
2721
2896
|
{
|
|
2722
2897
|
role: "radiogroup",
|
|
2723
2898
|
"aria-required": c,
|
|
2724
|
-
"aria-orientation":
|
|
2899
|
+
"aria-orientation": l,
|
|
2725
2900
|
"data-disabled": a ? "" : void 0,
|
|
2726
2901
|
...f,
|
|
2727
2902
|
ref: n
|
|
@@ -2731,40 +2906,40 @@ const Ks = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], xe = "RadioGroup
|
|
|
2731
2906
|
);
|
|
2732
2907
|
}
|
|
2733
2908
|
);
|
|
2734
|
-
|
|
2735
|
-
const
|
|
2909
|
+
En.displayName = De;
|
|
2910
|
+
const In = "RadioGroupItem", Dn = u.forwardRef(
|
|
2736
2911
|
(e, n) => {
|
|
2737
|
-
const { __scopeRadioGroup: t, disabled: o, ...s } = e, r =
|
|
2912
|
+
const { __scopeRadioGroup: t, disabled: o, ...s } = e, r = hr(In, t), c = r.disabled || o, a = Sn(t), l = kn(t), d = u.useRef(null), p = T(n, d), f = r.value === s.value, C = u.useRef(!1);
|
|
2738
2913
|
return u.useEffect(() => {
|
|
2739
|
-
const m = (
|
|
2740
|
-
|
|
2741
|
-
},
|
|
2742
|
-
return document.addEventListener("keydown", m), document.addEventListener("keyup",
|
|
2743
|
-
document.removeEventListener("keydown", m), document.removeEventListener("keyup",
|
|
2914
|
+
const m = (h) => {
|
|
2915
|
+
pr.includes(h.key) && (C.current = !0);
|
|
2916
|
+
}, y = () => C.current = !1;
|
|
2917
|
+
return document.addEventListener("keydown", m), document.addEventListener("keyup", y), () => {
|
|
2918
|
+
document.removeEventListener("keydown", m), document.removeEventListener("keyup", y);
|
|
2744
2919
|
};
|
|
2745
|
-
}, []), /* @__PURE__ */
|
|
2746
|
-
|
|
2920
|
+
}, []), /* @__PURE__ */ i(
|
|
2921
|
+
Dt,
|
|
2747
2922
|
{
|
|
2748
2923
|
asChild: !0,
|
|
2749
2924
|
...a,
|
|
2750
2925
|
focusable: !c,
|
|
2751
2926
|
active: f,
|
|
2752
|
-
children: /* @__PURE__ */
|
|
2753
|
-
|
|
2927
|
+
children: /* @__PURE__ */ i(
|
|
2928
|
+
mt,
|
|
2754
2929
|
{
|
|
2755
2930
|
name: r.name,
|
|
2756
2931
|
disabled: c,
|
|
2757
2932
|
required: r.required,
|
|
2758
2933
|
checked: f,
|
|
2759
|
-
...
|
|
2934
|
+
...l,
|
|
2760
2935
|
...s,
|
|
2761
2936
|
ref: p,
|
|
2762
2937
|
onCheck: () => r.onValueChange(s.value),
|
|
2763
|
-
onKeyDown:
|
|
2938
|
+
onKeyDown: O((m) => {
|
|
2764
2939
|
m.key === "Enter" && m.preventDefault();
|
|
2765
2940
|
}),
|
|
2766
|
-
onFocus:
|
|
2767
|
-
|
|
2941
|
+
onFocus: O(s.onFocus, () => {
|
|
2942
|
+
C.current && d.current?.click();
|
|
2768
2943
|
})
|
|
2769
2944
|
}
|
|
2770
2945
|
)
|
|
@@ -2772,29 +2947,29 @@ const gn = "RadioGroupItem", bn = u.forwardRef(
|
|
|
2772
2947
|
);
|
|
2773
2948
|
}
|
|
2774
2949
|
);
|
|
2775
|
-
|
|
2776
|
-
const
|
|
2777
|
-
const { __scopeRadioGroup: t, ...o } = e, s =
|
|
2778
|
-
return /* @__PURE__ */
|
|
2950
|
+
Dn.displayName = In;
|
|
2951
|
+
const br = "RadioGroupBaseIndicator", gr = u.forwardRef((e, n) => {
|
|
2952
|
+
const { __scopeRadioGroup: t, ...o } = e, s = kn(t);
|
|
2953
|
+
return /* @__PURE__ */ i(Nn, { ...s, ...o, ref: n });
|
|
2779
2954
|
});
|
|
2780
|
-
|
|
2781
|
-
const
|
|
2782
|
-
...
|
|
2783
|
-
size: { type: "enum", className: "bd-size", values:
|
|
2784
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
2785
|
-
|
|
2786
|
-
},
|
|
2955
|
+
gr.displayName = br;
|
|
2956
|
+
const Cr = ["1", "2", "3"], vr = ["classic", "outline"], fe = {
|
|
2957
|
+
...Q,
|
|
2958
|
+
size: { type: "enum", className: "bd-size", values: Cr, default: "2" },
|
|
2959
|
+
variant: { type: "enum", className: "bd-variant", values: vr, default: "classic" },
|
|
2960
|
+
...H
|
|
2961
|
+
}, le = "RadioGroup", [yr] = F(le, [Pn]), Tn = Pn(), [wr, _n] = yr(le), Bn = u.forwardRef(
|
|
2787
2962
|
({
|
|
2788
|
-
size: e =
|
|
2789
|
-
variant: n =
|
|
2963
|
+
size: e = fe.size.default,
|
|
2964
|
+
variant: n = fe.variant.default,
|
|
2790
2965
|
...t
|
|
2791
2966
|
}, o) => {
|
|
2792
|
-
const { __scopeRadioGroup: s, className: r, ...c } =
|
|
2967
|
+
const { __scopeRadioGroup: s, className: r, ...c } = I(
|
|
2793
2968
|
t,
|
|
2794
|
-
|
|
2795
|
-
), a =
|
|
2796
|
-
return /* @__PURE__ */
|
|
2797
|
-
|
|
2969
|
+
fe
|
|
2970
|
+
), a = Tn(s);
|
|
2971
|
+
return /* @__PURE__ */ i(wr, { scope: s, size: e, variant: n, children: /* @__PURE__ */ i(
|
|
2972
|
+
En,
|
|
2798
2973
|
{
|
|
2799
2974
|
...a,
|
|
2800
2975
|
...c,
|
|
@@ -2804,31 +2979,31 @@ const er = ["1", "2", "3"], tr = ["classic", "outline"], le = {
|
|
|
2804
2979
|
) });
|
|
2805
2980
|
}
|
|
2806
2981
|
);
|
|
2807
|
-
|
|
2808
|
-
const
|
|
2982
|
+
Bn.displayName = le;
|
|
2983
|
+
const Mn = u.forwardRef(
|
|
2809
2984
|
(e, n) => {
|
|
2810
|
-
const { __scopeRadioGroup: t, children: o, className: s, style: r, ...c } = e, { size: a } =
|
|
2985
|
+
const { __scopeRadioGroup: t, children: o, className: s, style: r, ...c } = e, { size: a } = _n("RadioGroupItem", t);
|
|
2811
2986
|
return o ? /* @__PURE__ */ P(
|
|
2812
|
-
|
|
2987
|
+
ae,
|
|
2813
2988
|
{
|
|
2814
2989
|
as: "label",
|
|
2815
2990
|
size: a,
|
|
2816
2991
|
className: x("bd-RadioGroupItem", s),
|
|
2817
2992
|
style: r,
|
|
2818
2993
|
children: [
|
|
2819
|
-
/* @__PURE__ */
|
|
2820
|
-
|
|
2994
|
+
/* @__PURE__ */ i(
|
|
2995
|
+
ze,
|
|
2821
2996
|
{
|
|
2822
2997
|
__scopeRadioGroup: t,
|
|
2823
2998
|
...c,
|
|
2824
2999
|
ref: n
|
|
2825
3000
|
}
|
|
2826
3001
|
),
|
|
2827
|
-
o && /* @__PURE__ */
|
|
3002
|
+
o && /* @__PURE__ */ i("span", { className: "bd-RadioGroupItemInner", children: o })
|
|
2828
3003
|
]
|
|
2829
3004
|
}
|
|
2830
|
-
) : /* @__PURE__ */
|
|
2831
|
-
|
|
3005
|
+
) : /* @__PURE__ */ i(
|
|
3006
|
+
ze,
|
|
2832
3007
|
{
|
|
2833
3008
|
__scopeRadioGroup: t,
|
|
2834
3009
|
...c,
|
|
@@ -2839,11 +3014,11 @@ const Nn = u.forwardRef(
|
|
|
2839
3014
|
);
|
|
2840
3015
|
}
|
|
2841
3016
|
);
|
|
2842
|
-
|
|
2843
|
-
const
|
|
2844
|
-
const o =
|
|
2845
|
-
return /* @__PURE__ */
|
|
2846
|
-
|
|
3017
|
+
Mn.displayName = `${le}.Item`;
|
|
3018
|
+
const ze = u.forwardRef(({ __scopeRadioGroup: e, ...n }, t) => {
|
|
3019
|
+
const o = _n("RadioGroupItemRadio", e), s = Tn(e), { className: r } = I({ ...n, ...o }, fe);
|
|
3020
|
+
return /* @__PURE__ */ i(
|
|
3021
|
+
Dn,
|
|
2847
3022
|
{
|
|
2848
3023
|
...s,
|
|
2849
3024
|
...n,
|
|
@@ -2853,11 +3028,11 @@ const Oe = u.forwardRef(({ __scopeRadioGroup: e, ...n }, t) => {
|
|
|
2853
3028
|
}
|
|
2854
3029
|
);
|
|
2855
3030
|
});
|
|
2856
|
-
|
|
2857
|
-
const
|
|
2858
|
-
Root:
|
|
2859
|
-
Item:
|
|
2860
|
-
},
|
|
3031
|
+
ze.displayName = `${le}.ItemRadio`;
|
|
3032
|
+
const sa = {
|
|
3033
|
+
Root: Bn,
|
|
3034
|
+
Item: Mn
|
|
3035
|
+
}, Te = "Switch", [Nr] = F(Te), [Rr, xr] = Nr(Te), An = u.forwardRef(
|
|
2861
3036
|
(e, n) => {
|
|
2862
3037
|
const {
|
|
2863
3038
|
__scopeSwitch: t,
|
|
@@ -2866,43 +3041,43 @@ const zr = {
|
|
|
2866
3041
|
defaultChecked: r,
|
|
2867
3042
|
required: c,
|
|
2868
3043
|
disabled: a,
|
|
2869
|
-
value:
|
|
3044
|
+
value: l = "on",
|
|
2870
3045
|
onCheckedChange: d,
|
|
2871
3046
|
form: p,
|
|
2872
3047
|
...f
|
|
2873
|
-
} = e, [
|
|
3048
|
+
} = e, [C, m] = u.useState(null), y = T(n, (w) => m(w)), h = u.useRef(!1), g = C ? p || !!C.closest("form") : !0, [v, b] = A({
|
|
2874
3049
|
prop: s,
|
|
2875
3050
|
defaultProp: r ?? !1,
|
|
2876
3051
|
onChange: d,
|
|
2877
|
-
caller:
|
|
3052
|
+
caller: Te
|
|
2878
3053
|
});
|
|
2879
|
-
return /* @__PURE__ */ P(
|
|
2880
|
-
/* @__PURE__ */
|
|
3054
|
+
return /* @__PURE__ */ P(Rr, { scope: t, checked: v, disabled: a, children: [
|
|
3055
|
+
/* @__PURE__ */ i(
|
|
2881
3056
|
R.button,
|
|
2882
3057
|
{
|
|
2883
3058
|
type: "button",
|
|
2884
3059
|
role: "switch",
|
|
2885
|
-
"aria-checked":
|
|
3060
|
+
"aria-checked": v,
|
|
2886
3061
|
"aria-required": c,
|
|
2887
|
-
"data-state":
|
|
3062
|
+
"data-state": Gn(v),
|
|
2888
3063
|
"data-disabled": a ? "" : void 0,
|
|
2889
3064
|
disabled: a,
|
|
2890
|
-
value:
|
|
3065
|
+
value: l,
|
|
2891
3066
|
...f,
|
|
2892
|
-
ref:
|
|
2893
|
-
onClick:
|
|
2894
|
-
b((
|
|
3067
|
+
ref: y,
|
|
3068
|
+
onClick: O(e.onClick, (w) => {
|
|
3069
|
+
b((N) => !N), g && (h.current = w.isPropagationStopped(), h.current || w.stopPropagation());
|
|
2895
3070
|
})
|
|
2896
3071
|
}
|
|
2897
3072
|
),
|
|
2898
|
-
g && /* @__PURE__ */
|
|
2899
|
-
|
|
3073
|
+
g && /* @__PURE__ */ i(
|
|
3074
|
+
Vn,
|
|
2900
3075
|
{
|
|
2901
|
-
control:
|
|
2902
|
-
bubbles: !
|
|
3076
|
+
control: C,
|
|
3077
|
+
bubbles: !h.current,
|
|
2903
3078
|
name: o,
|
|
2904
|
-
value:
|
|
2905
|
-
checked:
|
|
3079
|
+
value: l,
|
|
3080
|
+
checked: v,
|
|
2906
3081
|
required: c,
|
|
2907
3082
|
disabled: a,
|
|
2908
3083
|
form: p,
|
|
@@ -2912,14 +3087,14 @@ const zr = {
|
|
|
2912
3087
|
] });
|
|
2913
3088
|
}
|
|
2914
3089
|
);
|
|
2915
|
-
|
|
2916
|
-
const
|
|
3090
|
+
An.displayName = Te;
|
|
3091
|
+
const On = "SwitchThumb", Fn = u.forwardRef(
|
|
2917
3092
|
(e, n) => {
|
|
2918
|
-
const { __scopeSwitch: t, ...o } = e, s =
|
|
2919
|
-
return /* @__PURE__ */
|
|
3093
|
+
const { __scopeSwitch: t, ...o } = e, s = xr(On, t);
|
|
3094
|
+
return /* @__PURE__ */ i(
|
|
2920
3095
|
R.span,
|
|
2921
3096
|
{
|
|
2922
|
-
"data-state":
|
|
3097
|
+
"data-state": Gn(s.checked),
|
|
2923
3098
|
"data-disabled": s.disabled ? "" : void 0,
|
|
2924
3099
|
...o,
|
|
2925
3100
|
ref: n
|
|
@@ -2927,10 +3102,10 @@ const Rn = "SwitchThumb", xn = u.forwardRef(
|
|
|
2927
3102
|
);
|
|
2928
3103
|
}
|
|
2929
3104
|
);
|
|
2930
|
-
|
|
2931
|
-
const
|
|
3105
|
+
Fn.displayName = On;
|
|
3106
|
+
const Pr = "SwitchBubbleInput", Vn = u.forwardRef(
|
|
2932
3107
|
(e, n) => {
|
|
2933
|
-
const { checked: t, control: o, bubbles: s = !0, ...r } = e, c = u.useRef(null), a =
|
|
3108
|
+
const { checked: t, control: o, bubbles: s = !0, ...r } = e, c = u.useRef(null), a = T(c, n), l = Ce(t), d = Ue(o);
|
|
2934
3109
|
return u.useEffect(() => {
|
|
2935
3110
|
const p = c.current;
|
|
2936
3111
|
if (!p) return;
|
|
@@ -2938,11 +3113,11 @@ const cr = "SwitchBubbleInput", Pn = u.forwardRef(
|
|
|
2938
3113
|
f,
|
|
2939
3114
|
"checked"
|
|
2940
3115
|
).set;
|
|
2941
|
-
if (
|
|
2942
|
-
const
|
|
2943
|
-
m.call(p, t), p.dispatchEvent(
|
|
3116
|
+
if (l !== t && m) {
|
|
3117
|
+
const y = new Event("click", { bubbles: s });
|
|
3118
|
+
m.call(p, t), p.dispatchEvent(y);
|
|
2944
3119
|
}
|
|
2945
|
-
}, [
|
|
3120
|
+
}, [l, t, s]), /* @__PURE__ */ i(
|
|
2946
3121
|
"input",
|
|
2947
3122
|
{
|
|
2948
3123
|
type: "checkbox",
|
|
@@ -2963,43 +3138,43 @@ const cr = "SwitchBubbleInput", Pn = u.forwardRef(
|
|
|
2963
3138
|
);
|
|
2964
3139
|
}
|
|
2965
3140
|
);
|
|
2966
|
-
|
|
2967
|
-
function
|
|
3141
|
+
Vn.displayName = Pr;
|
|
3142
|
+
function Gn(e) {
|
|
2968
3143
|
return e ? "checked" : "unchecked";
|
|
2969
3144
|
}
|
|
2970
|
-
const
|
|
2971
|
-
size: { type: "enum", className: "bd-size", values:
|
|
2972
|
-
|
|
2973
|
-
},
|
|
2974
|
-
const { className: t, ...o } =
|
|
2975
|
-
return /* @__PURE__ */
|
|
2976
|
-
|
|
3145
|
+
const Sr = ["1", "2", "3"], kr = {
|
|
3146
|
+
size: { type: "enum", className: "bd-size", values: Sr, default: "2" },
|
|
3147
|
+
...H
|
|
3148
|
+
}, Er = u.forwardRef((e, n) => {
|
|
3149
|
+
const { className: t, ...o } = I(e, kr);
|
|
3150
|
+
return /* @__PURE__ */ i(
|
|
3151
|
+
An,
|
|
2977
3152
|
{
|
|
2978
3153
|
...o,
|
|
2979
3154
|
asChild: !1,
|
|
2980
3155
|
ref: n,
|
|
2981
3156
|
className: x("bd-reset", "bd-SwitchRoot", t),
|
|
2982
|
-
children: /* @__PURE__ */
|
|
3157
|
+
children: /* @__PURE__ */ i(Fn, { className: x("bd-SwitchThumb") })
|
|
2983
3158
|
}
|
|
2984
3159
|
);
|
|
2985
3160
|
});
|
|
2986
|
-
|
|
2987
|
-
const
|
|
2988
|
-
size: { type: "enum", className: "bd-size", values:
|
|
2989
|
-
variant: { type: "enum", className: "bd-variant", values:
|
|
2990
|
-
|
|
2991
|
-
...
|
|
2992
|
-
},
|
|
2993
|
-
side: { type: "enum", values:
|
|
2994
|
-
gap:
|
|
2995
|
-
px:
|
|
2996
|
-
pl:
|
|
2997
|
-
pr:
|
|
2998
|
-
},
|
|
3161
|
+
Er.displayName = "Switch";
|
|
3162
|
+
const Ir = ["1", "2", "3", "4", "5"], Dr = ["classic", "underlined", "rounded"], Tr = {
|
|
3163
|
+
size: { type: "enum", className: "bd-size", values: Ir, default: "2" },
|
|
3164
|
+
variant: { type: "enum", className: "bd-variant", values: Dr, default: "classic" },
|
|
3165
|
+
...H,
|
|
3166
|
+
...Eo
|
|
3167
|
+
}, _r = ["left", "right"], Br = {
|
|
3168
|
+
side: { type: "enum", values: _r },
|
|
3169
|
+
gap: Ye.gap,
|
|
3170
|
+
px: K.px,
|
|
3171
|
+
pl: K.pl,
|
|
3172
|
+
pr: K.pr
|
|
3173
|
+
}, Ln = u.forwardRef(
|
|
2999
3174
|
(e, n) => {
|
|
3000
|
-
const t = u.useRef(null), { children: o, className: s, style: r, ...c } =
|
|
3175
|
+
const t = u.useRef(null), { children: o, className: s, style: r, ...c } = I(
|
|
3001
3176
|
e,
|
|
3002
|
-
|
|
3177
|
+
Tr
|
|
3003
3178
|
);
|
|
3004
3179
|
return /* @__PURE__ */ P(
|
|
3005
3180
|
"div",
|
|
@@ -3007,11 +3182,11 @@ const dr = ["1", "2", "3", "4", "5"], pr = ["classic", "underlined", "rounded"],
|
|
|
3007
3182
|
style: r,
|
|
3008
3183
|
className: x("bd-TextFieldRoot", s),
|
|
3009
3184
|
onPointerDown: (a) => {
|
|
3010
|
-
const
|
|
3011
|
-
if (
|
|
3185
|
+
const l = a.target;
|
|
3186
|
+
if (l.closest("input, button, a")) return;
|
|
3012
3187
|
const d = t.current;
|
|
3013
3188
|
if (!d) return;
|
|
3014
|
-
const f =
|
|
3189
|
+
const f = l.closest(`
|
|
3015
3190
|
.bd-TextFieldSlot[data-side='right'],
|
|
3016
3191
|
.bd-TextFieldSlot:not([data-side='right']) ~ .bd-TextFieldSlot:not([data-side='left'])
|
|
3017
3192
|
`) ? d.value.length : 0;
|
|
@@ -3024,12 +3199,12 @@ const dr = ["1", "2", "3", "4", "5"], pr = ["classic", "underlined", "rounded"],
|
|
|
3024
3199
|
});
|
|
3025
3200
|
},
|
|
3026
3201
|
children: [
|
|
3027
|
-
/* @__PURE__ */
|
|
3202
|
+
/* @__PURE__ */ i(
|
|
3028
3203
|
"input",
|
|
3029
3204
|
{
|
|
3030
3205
|
spellCheck: "false",
|
|
3031
3206
|
...c,
|
|
3032
|
-
ref:
|
|
3207
|
+
ref: se(t, n),
|
|
3033
3208
|
className: "bd-reset bd-TextFieldInput"
|
|
3034
3209
|
}
|
|
3035
3210
|
),
|
|
@@ -3039,11 +3214,11 @@ const dr = ["1", "2", "3", "4", "5"], pr = ["classic", "underlined", "rounded"],
|
|
|
3039
3214
|
);
|
|
3040
3215
|
}
|
|
3041
3216
|
);
|
|
3042
|
-
|
|
3043
|
-
const
|
|
3217
|
+
Ln.displayName = "TextFieldRoot";
|
|
3218
|
+
const zn = u.forwardRef(
|
|
3044
3219
|
(e, n) => {
|
|
3045
|
-
const { className: t, side: o, ...s } =
|
|
3046
|
-
return /* @__PURE__ */
|
|
3220
|
+
const { className: t, side: o, ...s } = I(e, Br);
|
|
3221
|
+
return /* @__PURE__ */ i(
|
|
3047
3222
|
"div",
|
|
3048
3223
|
{
|
|
3049
3224
|
"data-side": o,
|
|
@@ -3054,133 +3229,133 @@ const En = u.forwardRef(
|
|
|
3054
3229
|
);
|
|
3055
3230
|
}
|
|
3056
3231
|
);
|
|
3057
|
-
|
|
3058
|
-
const
|
|
3059
|
-
function
|
|
3232
|
+
zn.displayName = "TextFieldSlot";
|
|
3233
|
+
const ra = Object.assign(Ln, { Slot: zn });
|
|
3234
|
+
function Mr(e, n) {
|
|
3060
3235
|
return new Date(e, n + 1, 0).getDate();
|
|
3061
3236
|
}
|
|
3062
|
-
function
|
|
3237
|
+
function Ar(e, n) {
|
|
3063
3238
|
return new Date(e, n, 1).getDay();
|
|
3064
3239
|
}
|
|
3065
|
-
function
|
|
3240
|
+
function ne() {
|
|
3066
3241
|
const e = /* @__PURE__ */ new Date();
|
|
3067
3242
|
return e.setHours(0, 0, 0, 0), e;
|
|
3068
3243
|
}
|
|
3069
|
-
function
|
|
3244
|
+
function wt(e) {
|
|
3070
3245
|
return !!e && !Number.isNaN(e.getTime());
|
|
3071
3246
|
}
|
|
3072
|
-
function
|
|
3073
|
-
return e || n ||
|
|
3247
|
+
function Or(e, n) {
|
|
3248
|
+
return e || n || ne();
|
|
3074
3249
|
}
|
|
3075
|
-
function
|
|
3250
|
+
function Fr(e) {
|
|
3076
3251
|
return e ? `${e.getFullYear()}.${String(e.getMonth() + 1).padStart(2, "0")}.${String(e.getDate()).padStart(2, "0")}` : null;
|
|
3077
3252
|
}
|
|
3078
|
-
function
|
|
3253
|
+
function Vr(e, n) {
|
|
3079
3254
|
return n === "date" ? `${e.getFullYear()}년 ${e.getMonth() + 1}월` : `${e.getFullYear()}년`;
|
|
3080
3255
|
}
|
|
3081
|
-
function
|
|
3256
|
+
function Nt(e, n, t) {
|
|
3082
3257
|
const o = new Date(e), s = t === "next" ? 1 : -1;
|
|
3083
3258
|
return n === "date" ? (o.setMonth(o.getMonth() + s), o) : n === "year" ? (o.setFullYear(o.getFullYear() + s * 28), o) : (o.setFullYear(o.getFullYear() + s), o);
|
|
3084
3259
|
}
|
|
3085
|
-
function
|
|
3086
|
-
const n = e.getFullYear(), t = e.getMonth(), o =
|
|
3087
|
-
for (let
|
|
3260
|
+
function Gr(e) {
|
|
3261
|
+
const n = e.getFullYear(), t = e.getMonth(), o = Mr(n, t), s = Ar(n, t), r = new Date(n, t, 0).getDate(), c = [];
|
|
3262
|
+
for (let l = s - 1; l >= 0; l -= 1)
|
|
3088
3263
|
c.push({
|
|
3089
|
-
date: new Date(n, t - 1, r -
|
|
3264
|
+
date: new Date(n, t - 1, r - l),
|
|
3090
3265
|
isCurrentMonth: !1
|
|
3091
3266
|
});
|
|
3092
|
-
for (let
|
|
3267
|
+
for (let l = 1; l <= o; l += 1)
|
|
3093
3268
|
c.push({
|
|
3094
|
-
date: new Date(n, t,
|
|
3269
|
+
date: new Date(n, t, l),
|
|
3095
3270
|
isCurrentMonth: !0
|
|
3096
3271
|
});
|
|
3097
3272
|
const a = c.length % 7 === 0 ? 0 : 7 - c.length % 7;
|
|
3098
|
-
for (let
|
|
3273
|
+
for (let l = 1; l <= a; l += 1)
|
|
3099
3274
|
c.push({
|
|
3100
|
-
date: new Date(n, t + 1,
|
|
3275
|
+
date: new Date(n, t + 1, l),
|
|
3101
3276
|
isCurrentMonth: !1
|
|
3102
3277
|
});
|
|
3103
3278
|
return c;
|
|
3104
3279
|
}
|
|
3105
|
-
function
|
|
3280
|
+
function Lr(e, n, t) {
|
|
3106
3281
|
return !e || n ? { start: t, end: null } : t < e ? { start: t, end: null } : { start: e, end: t };
|
|
3107
3282
|
}
|
|
3108
|
-
function
|
|
3283
|
+
function Fe(e, n, t, o, s) {
|
|
3109
3284
|
const r = e.getTime();
|
|
3110
3285
|
return n === "single" ? t?.getTime() === r : o?.getTime() === r || s?.getTime() === r;
|
|
3111
3286
|
}
|
|
3112
|
-
function
|
|
3287
|
+
function zr(e, n, t) {
|
|
3113
3288
|
if (!n || !t)
|
|
3114
3289
|
return !1;
|
|
3115
3290
|
const o = e.getTime();
|
|
3116
3291
|
return o > n.getTime() && o < t.getTime();
|
|
3117
3292
|
}
|
|
3118
|
-
function
|
|
3293
|
+
function $r(e) {
|
|
3119
3294
|
return Math.floor(e.getFullYear() / 10) * 10 - 4;
|
|
3120
3295
|
}
|
|
3121
|
-
const
|
|
3122
|
-
const { variant: n = "single", size: t = "2", children: o } = e, s = u.useRef(null), [r, c] =
|
|
3296
|
+
const $n = "Calendar", [Ur] = F($n), [jr, q] = Ur($n), Hr = (e) => {
|
|
3297
|
+
const { variant: n = "single", size: t = "2", children: o } = e, s = u.useRef(null), [r, c] = A({
|
|
3123
3298
|
prop: e.open,
|
|
3124
3299
|
defaultProp: e.defaultOpen || !1,
|
|
3125
3300
|
onChange: e.onOpenChange,
|
|
3126
3301
|
caller: "CalendarRoot"
|
|
3127
|
-
}), [a,
|
|
3302
|
+
}), [a, l] = A({
|
|
3128
3303
|
prop: e.value,
|
|
3129
3304
|
defaultProp: e.defaultValue ?? null,
|
|
3130
3305
|
onChange: e.onValueChange,
|
|
3131
3306
|
caller: "CalendarRoot (single)"
|
|
3132
|
-
}), [d, p] =
|
|
3307
|
+
}), [d, p] = A({
|
|
3133
3308
|
prop: e.rangeValue,
|
|
3134
3309
|
defaultProp: e.defaultRangeValue ?? { start: null, end: null },
|
|
3135
3310
|
onChange: e.onRangeValueChange,
|
|
3136
3311
|
caller: "CalendarRoot (range)"
|
|
3137
|
-
}), [f,
|
|
3138
|
-
|
|
3312
|
+
}), [f, C] = u.useState("date"), [m, y] = u.useState(
|
|
3313
|
+
Or(a, d.start)
|
|
3139
3314
|
);
|
|
3140
3315
|
u.useEffect(() => {
|
|
3141
|
-
n === "single" &&
|
|
3316
|
+
n === "single" && wt(a) ? y(a) : n === "range" && wt(d.start) && y(d.start);
|
|
3142
3317
|
}, [d.start, a, n]);
|
|
3143
|
-
const
|
|
3318
|
+
const h = u.useRef(a), g = u.useRef(d);
|
|
3144
3319
|
u.useEffect(() => {
|
|
3145
|
-
r && (
|
|
3320
|
+
r && (h.current = a, g.current = d);
|
|
3146
3321
|
}, [r, a, d]);
|
|
3147
|
-
const
|
|
3148
|
-
n === "single" && !a ?
|
|
3149
|
-
}, [n, a, d.start,
|
|
3150
|
-
n === "single" ?
|
|
3151
|
-
}, [n,
|
|
3152
|
-
return /* @__PURE__ */
|
|
3153
|
-
|
|
3322
|
+
const v = u.useCallback(() => {
|
|
3323
|
+
n === "single" && !a ? l(ne()) : n === "range" && !d.start && p((N) => ({ ...N, start: ne() })), c(!1);
|
|
3324
|
+
}, [n, a, d.start, l, p, c]), b = u.useCallback(() => {
|
|
3325
|
+
n === "single" ? l(h.current) : p(g.current), c(!1);
|
|
3326
|
+
}, [n, l, p, c]);
|
|
3327
|
+
return /* @__PURE__ */ i(
|
|
3328
|
+
jr,
|
|
3154
3329
|
{
|
|
3155
3330
|
scope: void 0,
|
|
3156
3331
|
open: r,
|
|
3157
|
-
setOpen: (
|
|
3158
|
-
c(
|
|
3332
|
+
setOpen: (N) => {
|
|
3333
|
+
c(N), N || C("date");
|
|
3159
3334
|
},
|
|
3160
3335
|
triggerRef: s,
|
|
3161
3336
|
variant: n,
|
|
3162
3337
|
size: t,
|
|
3163
3338
|
viewMode: f,
|
|
3164
|
-
setViewMode:
|
|
3339
|
+
setViewMode: C,
|
|
3165
3340
|
viewingDate: m,
|
|
3166
|
-
setViewingDate:
|
|
3167
|
-
singleDate: a ||
|
|
3168
|
-
setSingleDate:
|
|
3169
|
-
startDate: d.start ||
|
|
3170
|
-
setStartDate: (
|
|
3341
|
+
setViewingDate: y,
|
|
3342
|
+
singleDate: a || ne(),
|
|
3343
|
+
setSingleDate: l,
|
|
3344
|
+
startDate: d.start || ne(),
|
|
3345
|
+
setStartDate: (N) => p((k) => ({ ...k, start: N })),
|
|
3171
3346
|
endDate: d.end,
|
|
3172
|
-
setEndDate: (
|
|
3347
|
+
setEndDate: (N) => p((k) => ({ ...k, end: N })),
|
|
3173
3348
|
resetRange: () => p({ start: null, end: null }),
|
|
3174
|
-
onConfirm:
|
|
3349
|
+
onConfirm: v,
|
|
3175
3350
|
onCancel: b,
|
|
3176
3351
|
children: o
|
|
3177
3352
|
}
|
|
3178
3353
|
);
|
|
3179
|
-
},
|
|
3354
|
+
}, Un = u.forwardRef(
|
|
3180
3355
|
({ children: e }, n) => {
|
|
3181
|
-
const t =
|
|
3356
|
+
const t = q("CalendarTrigger", void 0), o = xt(e), s = $e(o);
|
|
3182
3357
|
return u.cloneElement(o, {
|
|
3183
|
-
ref:
|
|
3358
|
+
ref: se(n, t.triggerRef, s),
|
|
3184
3359
|
onFocus: (r) => {
|
|
3185
3360
|
t.setOpen(!0), o.props.onFocus?.(r);
|
|
3186
3361
|
},
|
|
@@ -3190,10 +3365,10 @@ const In = "Calendar", [Pr] = M(In), [Sr, z] = Pr(In), kr = (e) => {
|
|
|
3190
3365
|
});
|
|
3191
3366
|
}
|
|
3192
3367
|
);
|
|
3193
|
-
|
|
3194
|
-
const
|
|
3368
|
+
Un.displayName = "CalendarTrigger";
|
|
3369
|
+
const jn = u.forwardRef(
|
|
3195
3370
|
(e, n) => {
|
|
3196
|
-
const { className: t, style: o, ...s } = e, r =
|
|
3371
|
+
const { className: t, style: o, ...s } = e, r = q("CalendarContent", void 0), c = u.useRef(null), { styles: a, isPositioned: l } = Pt(
|
|
3197
3372
|
r.triggerRef,
|
|
3198
3373
|
c,
|
|
3199
3374
|
r.open,
|
|
@@ -3201,7 +3376,7 @@ const Tn = u.forwardRef(
|
|
|
3201
3376
|
"start",
|
|
3202
3377
|
!1
|
|
3203
3378
|
);
|
|
3204
|
-
if (
|
|
3379
|
+
if (je(c, (f) => {
|
|
3205
3380
|
r.triggerRef.current?.contains(f.target) || r.setOpen(!1);
|
|
3206
3381
|
}), !r.open) return null;
|
|
3207
3382
|
const d = () => {
|
|
@@ -3209,30 +3384,30 @@ const Tn = u.forwardRef(
|
|
|
3209
3384
|
}, p = () => {
|
|
3210
3385
|
r.onCancel();
|
|
3211
3386
|
};
|
|
3212
|
-
return /* @__PURE__ */
|
|
3213
|
-
|
|
3387
|
+
return /* @__PURE__ */ i(He, { children: /* @__PURE__ */ P(
|
|
3388
|
+
B,
|
|
3214
3389
|
{
|
|
3215
3390
|
direction: "column",
|
|
3216
3391
|
gap: "4",
|
|
3217
3392
|
...s,
|
|
3218
|
-
ref:
|
|
3393
|
+
ref: se(c, n),
|
|
3219
3394
|
className: x(
|
|
3220
3395
|
"bd-CalendarContent",
|
|
3221
3396
|
`bd-size-${r.size}`,
|
|
3222
3397
|
`bd-variant-${r.variant}`,
|
|
3223
3398
|
t
|
|
3224
3399
|
),
|
|
3225
|
-
style: { ...o, ...a, visibility:
|
|
3400
|
+
style: { ...o, ...a, visibility: l ? "visible" : "hidden" },
|
|
3226
3401
|
onPointerDown: (f) => {
|
|
3227
3402
|
f.preventDefault();
|
|
3228
3403
|
},
|
|
3229
3404
|
children: [
|
|
3230
|
-
r.variant === "range" && /* @__PURE__ */
|
|
3231
|
-
/* @__PURE__ */
|
|
3232
|
-
/* @__PURE__ */
|
|
3233
|
-
/* @__PURE__ */ P(
|
|
3234
|
-
/* @__PURE__ */
|
|
3235
|
-
|
|
3405
|
+
r.variant === "range" && /* @__PURE__ */ i(qr, {}),
|
|
3406
|
+
/* @__PURE__ */ i(Wr, {}),
|
|
3407
|
+
/* @__PURE__ */ i(Yr, {}),
|
|
3408
|
+
/* @__PURE__ */ P(B, { justify: "center", gap: "2", children: [
|
|
3409
|
+
/* @__PURE__ */ i(
|
|
3410
|
+
oe,
|
|
3236
3411
|
{
|
|
3237
3412
|
size: "3",
|
|
3238
3413
|
variant: "outline-primary",
|
|
@@ -3242,26 +3417,26 @@ const Tn = u.forwardRef(
|
|
|
3242
3417
|
children: "취소"
|
|
3243
3418
|
}
|
|
3244
3419
|
),
|
|
3245
|
-
/* @__PURE__ */
|
|
3420
|
+
/* @__PURE__ */ i(oe, { size: "3", radius: "s", onClick: d, style: { width: "50%" }, children: "확인" })
|
|
3246
3421
|
] })
|
|
3247
3422
|
]
|
|
3248
3423
|
}
|
|
3249
3424
|
) });
|
|
3250
3425
|
}
|
|
3251
3426
|
);
|
|
3252
|
-
|
|
3253
|
-
const
|
|
3254
|
-
const e =
|
|
3255
|
-
const o =
|
|
3256
|
-
return o || /* @__PURE__ */ P(
|
|
3257
|
-
/* @__PURE__ */
|
|
3427
|
+
jn.displayName = "CalendarContent";
|
|
3428
|
+
const qr = () => {
|
|
3429
|
+
const e = q("CalendarRangeHeader", void 0), n = (t) => {
|
|
3430
|
+
const o = Fr(t);
|
|
3431
|
+
return o || /* @__PURE__ */ P(B, { align: "center", gap: "1", children: [
|
|
3432
|
+
/* @__PURE__ */ i(Ne, { width: 12, height: 12 }),
|
|
3258
3433
|
"범위 추가"
|
|
3259
3434
|
] });
|
|
3260
3435
|
};
|
|
3261
|
-
return /* @__PURE__ */ P(
|
|
3262
|
-
/* @__PURE__ */ P(
|
|
3263
|
-
/* @__PURE__ */
|
|
3264
|
-
|
|
3436
|
+
return /* @__PURE__ */ P(B, { direction: "column", className: "bd-CalendarRangeHeader", children: [
|
|
3437
|
+
/* @__PURE__ */ P(B, { gap: "2", children: [
|
|
3438
|
+
/* @__PURE__ */ i(
|
|
3439
|
+
B,
|
|
3265
3440
|
{
|
|
3266
3441
|
align: "center",
|
|
3267
3442
|
justify: "between",
|
|
@@ -3269,8 +3444,8 @@ const Er = () => {
|
|
|
3269
3444
|
children: n(e.startDate)
|
|
3270
3445
|
}
|
|
3271
3446
|
),
|
|
3272
|
-
/* @__PURE__ */
|
|
3273
|
-
|
|
3447
|
+
/* @__PURE__ */ i(
|
|
3448
|
+
B,
|
|
3274
3449
|
{
|
|
3275
3450
|
align: "center",
|
|
3276
3451
|
justify: "between",
|
|
@@ -3282,71 +3457,71 @@ const Er = () => {
|
|
|
3282
3457
|
}
|
|
3283
3458
|
)
|
|
3284
3459
|
] }),
|
|
3285
|
-
/* @__PURE__ */
|
|
3286
|
-
|
|
3460
|
+
/* @__PURE__ */ i(
|
|
3461
|
+
B,
|
|
3287
3462
|
{
|
|
3288
3463
|
justify: "end",
|
|
3289
3464
|
onClick: () => {
|
|
3290
3465
|
e.resetRange();
|
|
3291
3466
|
},
|
|
3292
|
-
children: /* @__PURE__ */
|
|
3467
|
+
children: /* @__PURE__ */ i("button", { className: "reset-btn", children: "초기화" })
|
|
3293
3468
|
}
|
|
3294
3469
|
)
|
|
3295
3470
|
] });
|
|
3296
|
-
},
|
|
3297
|
-
const e =
|
|
3298
|
-
t(
|
|
3471
|
+
}, Wr = () => {
|
|
3472
|
+
const e = q("CalendarNavigation", void 0), { viewingDate: n, setViewingDate: t, viewMode: o, setViewMode: s } = e, r = () => {
|
|
3473
|
+
t(Nt(n, o, "prev"));
|
|
3299
3474
|
}, c = () => {
|
|
3300
|
-
t(
|
|
3475
|
+
t(Nt(n, o, "next"));
|
|
3301
3476
|
};
|
|
3302
|
-
return /* @__PURE__ */ P(
|
|
3303
|
-
/* @__PURE__ */
|
|
3477
|
+
return /* @__PURE__ */ P(B, { justify: "between", align: "center", children: [
|
|
3478
|
+
/* @__PURE__ */ i(
|
|
3304
3479
|
"div",
|
|
3305
3480
|
{
|
|
3306
3481
|
className: "bd-CalendarNavTitle bd-weight-medium",
|
|
3307
3482
|
onClick: () => s(o === "date" ? "month" : o === "month" ? "year" : "date"),
|
|
3308
|
-
children:
|
|
3483
|
+
children: Vr(n, o)
|
|
3309
3484
|
}
|
|
3310
3485
|
),
|
|
3311
|
-
/* @__PURE__ */ P(
|
|
3312
|
-
/* @__PURE__ */
|
|
3313
|
-
/* @__PURE__ */
|
|
3486
|
+
/* @__PURE__ */ P(B, { gap: "2", children: [
|
|
3487
|
+
/* @__PURE__ */ i("button", { onClick: r, className: "bd-CalendarNavBtn", children: /* @__PURE__ */ i(ls, { width: 16 }) }),
|
|
3488
|
+
/* @__PURE__ */ i("button", { onClick: c, className: "bd-CalendarNavBtn", children: /* @__PURE__ */ i(us, { width: 16 }) })
|
|
3314
3489
|
] })
|
|
3315
3490
|
] });
|
|
3316
|
-
},
|
|
3317
|
-
const e =
|
|
3318
|
-
return e.viewMode === "year" ? /* @__PURE__ */
|
|
3319
|
-
},
|
|
3320
|
-
const e =
|
|
3491
|
+
}, Yr = () => {
|
|
3492
|
+
const e = q("CalendarBody", void 0);
|
|
3493
|
+
return e.viewMode === "year" ? /* @__PURE__ */ i(Zr, {}) : e.viewMode === "month" ? /* @__PURE__ */ i(Xr, {}) : /* @__PURE__ */ i(Kr, {});
|
|
3494
|
+
}, Kr = () => {
|
|
3495
|
+
const e = q("DateGrid", void 0), { viewingDate: n, singleDate: t, startDate: o, endDate: s } = e, r = n.getMonth(), c = Gr(n), a = ["일", "월", "화", "수", "목", "금", "토"], l = (d) => {
|
|
3321
3496
|
if (d.getMonth() !== r && e.setViewingDate(d), e.variant === "single")
|
|
3322
3497
|
e.setSingleDate(d);
|
|
3323
3498
|
else {
|
|
3324
|
-
const p =
|
|
3499
|
+
const p = Lr(o, s, d);
|
|
3325
3500
|
e.setStartDate(p.start), e.setEndDate(p.end);
|
|
3326
3501
|
}
|
|
3327
3502
|
};
|
|
3328
3503
|
return /* @__PURE__ */ P("div", { className: "bd-CalendarGrid bd-DateGrid", children: [
|
|
3329
|
-
a.map((d) => /* @__PURE__ */
|
|
3330
|
-
c.map((d, p) => /* @__PURE__ */
|
|
3504
|
+
a.map((d) => /* @__PURE__ */ i("div", { className: "bd-CalendarWeek", children: d }, d)),
|
|
3505
|
+
c.map((d, p) => /* @__PURE__ */ i(
|
|
3331
3506
|
"div",
|
|
3332
3507
|
{
|
|
3333
3508
|
className: x("bd-CalendarCell", {
|
|
3334
|
-
selected:
|
|
3335
|
-
inRange: e.variant === "range" &&
|
|
3509
|
+
selected: Fe(d.date, e.variant, t, o, s),
|
|
3510
|
+
inRange: e.variant === "range" && zr(d.date, o, s)
|
|
3336
3511
|
}),
|
|
3337
3512
|
style: {
|
|
3338
|
-
color: !d.isCurrentMonth && !
|
|
3339
|
-
opacity: !d.isCurrentMonth && !
|
|
3513
|
+
color: !d.isCurrentMonth && !Fe(d.date, e.variant, t, o, s) ? "var(--color-gray-900, #999)" : void 0,
|
|
3514
|
+
opacity: !d.isCurrentMonth && !Fe(d.date, e.variant, t, o, s) ? 0.4 : 1
|
|
3340
3515
|
},
|
|
3341
|
-
onClick: () =>
|
|
3516
|
+
onClick: () => l(d.date),
|
|
3342
3517
|
children: d.date.getDate()
|
|
3343
3518
|
},
|
|
3344
3519
|
p
|
|
3345
3520
|
))
|
|
3346
3521
|
] });
|
|
3347
|
-
},
|
|
3348
|
-
const e =
|
|
3349
|
-
return /* @__PURE__ */
|
|
3522
|
+
}, Xr = () => {
|
|
3523
|
+
const e = q("MonthGrid", void 0), n = Array.from({ length: 12 }, (t, o) => o + 1);
|
|
3524
|
+
return /* @__PURE__ */ i("div", { className: "bd-CalendarGrid bd-MonthGrid", children: n.map((t) => /* @__PURE__ */ P(
|
|
3350
3525
|
"div",
|
|
3351
3526
|
{
|
|
3352
3527
|
className: "bd-CalendarCell",
|
|
@@ -3361,9 +3536,9 @@ const Er = () => {
|
|
|
3361
3536
|
},
|
|
3362
3537
|
t
|
|
3363
3538
|
)) });
|
|
3364
|
-
},
|
|
3365
|
-
const e =
|
|
3366
|
-
return /* @__PURE__ */
|
|
3539
|
+
}, Zr = () => {
|
|
3540
|
+
const e = q("YearGrid", void 0), n = $r(e.viewingDate), t = Array.from({ length: 28 }, (o, s) => n + s);
|
|
3541
|
+
return /* @__PURE__ */ i("div", { className: "bd-CalendarGrid bd-YearGrid", children: t.map((o) => /* @__PURE__ */ i(
|
|
3367
3542
|
"div",
|
|
3368
3543
|
{
|
|
3369
3544
|
className: x("bd-CalendarCell", {
|
|
@@ -3377,30 +3552,30 @@ const Er = () => {
|
|
|
3377
3552
|
},
|
|
3378
3553
|
o
|
|
3379
3554
|
)) });
|
|
3380
|
-
},
|
|
3381
|
-
Trigger:
|
|
3382
|
-
Content:
|
|
3555
|
+
}, aa = Object.assign(Hr, {
|
|
3556
|
+
Trigger: Un,
|
|
3557
|
+
Content: jn
|
|
3383
3558
|
});
|
|
3384
3559
|
export {
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3560
|
+
ds as BraketDownIcon,
|
|
3561
|
+
ls as BraketLeftIcon,
|
|
3562
|
+
us as BraketRightIcon,
|
|
3563
|
+
oe as Button,
|
|
3564
|
+
aa as Calendar,
|
|
3565
|
+
Ne as CheckLineIcon,
|
|
3566
|
+
na as CheckableSelectBox,
|
|
3567
|
+
gs as Checkbox,
|
|
3568
|
+
oa as CheckboxGroup,
|
|
3569
|
+
As as ConfirmDialog,
|
|
3570
|
+
B as Flex,
|
|
3571
|
+
is as IndeterminateLineIcon,
|
|
3572
|
+
U as Popup,
|
|
3573
|
+
dr as Radio,
|
|
3574
|
+
sa as RadioGroup,
|
|
3575
|
+
nt as ScrollArea,
|
|
3576
|
+
ta as SelectBox,
|
|
3577
|
+
Mt as Spinner,
|
|
3578
|
+
Er as Switch,
|
|
3579
|
+
ae as Text,
|
|
3580
|
+
ra as TextField
|
|
3406
3581
|
};
|