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