@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/index.js CHANGED
@@ -1,313 +1,313 @@
1
- import { jsx as u, jsxs as _, Fragment as Oe } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as S, Fragment as $e } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import P from "react";
4
- import { createPortal as qt } from "react-dom";
5
- function Kt(e) {
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 re = { exports: {} };
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 Te;
15
- function Wt() {
16
- return Te || (Te = 1, (function(e) {
14
+ var Fe;
15
+ function sn() {
16
+ return Fe || (Fe = 1, (function(e) {
17
17
  (function() {
18
18
  var t = {}.hasOwnProperty;
19
- function o() {
20
- for (var s = "", a = 0; a < arguments.length; a++) {
21
- var c = arguments[a];
22
- c && (s = n(s, r(c)));
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 s;
24
+ return r;
25
25
  }
26
- function r(s) {
27
- if (typeof s == "string" || typeof s == "number")
28
- return s;
29
- if (typeof s != "object")
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(s))
32
- return o.apply(null, s);
33
- if (s.toString !== Object.prototype.toString && !s.toString.toString().includes("[native code]"))
34
- return s.toString();
35
- var a = "";
36
- for (var c in s)
37
- t.call(s, c) && s[c] && (a = n(a, c));
38
- return a;
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 n(s, a) {
41
- return a ? s ? s + " " + a : s + a : s;
40
+ function o(r, c) {
41
+ return c ? r ? r + " " + c : r + c : r;
42
42
  }
43
- e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
43
+ e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
44
44
  })();
45
- })(re)), re.exports;
45
+ })(ie)), ie.exports;
46
46
  }
47
- var Xt = Wt();
48
- const x = /* @__PURE__ */ Kt(Xt), Yt = (e, t) => {
49
- const o = { ...t };
50
- for (const r in t) {
51
- const n = e[r], s = t[r];
52
- /^on[A-Z]/.test(r) ? n && s ? o[r] = (...c) => {
53
- const l = s(...c);
54
- return n(...c), l;
55
- } : n && (o[r] = n) : r === "style" ? o[r] = { ...n, ...s } : r === "className" && (o[r] = [n, s].filter(Boolean).join(" "));
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, ...o };
58
- }, Ae = (e, t) => {
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
- }, fe = (...e) => (t) => {
63
- let o = !1;
64
- const r = e.map((n) => {
65
- const s = Ae(n, t);
66
- return !o && typeof s == "function" && (o = !0), { ref: n, cleanup: s };
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 (o)
68
+ if (n)
69
69
  return () => {
70
- for (const { ref: n, cleanup: s } of r)
71
- typeof s == "function" ? s() : Ae(n, null);
70
+ for (const { ref: o, cleanup: r } of s)
71
+ typeof r == "function" ? r() : Ge(o, null);
72
72
  };
73
- }, De = (e) => {
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 k(...e) {
78
- return P.useCallback(fe(...e), e);
77
+ function D(...e) {
78
+ return I.useCallback(q(...e), e);
79
79
  }
80
- const Be = (...e) => {
80
+ const Ve = (...e) => {
81
81
  let t = {};
82
- for (const o of e)
83
- o && (t = { ...t, ...o });
82
+ for (const n of e)
83
+ n && (t = { ...t, ...n });
84
84
  return Object.keys(t).length ? t : void 0;
85
- }, Zt = ({ className: e, customProperties: t, ...o }) => {
86
- const r = Ge({
85
+ }, cn = ({ className: e, customProperties: t, ...n }) => {
86
+ const s = Le({
87
87
  allowCustomValues: !0,
88
88
  className: e,
89
- ...o
90
- }), n = Qt({
89
+ ...n
90
+ }), o = un({
91
91
  customProperties: t,
92
- ...o
92
+ ...n
93
93
  });
94
- return [r, n];
95
- }, Jt = (e, t, o) => {
96
- const r = e ? "-" : "", n = o(t), s = n?.startsWith("-"), a = s ? "-" : "", c = s ? n?.substring(1) : n;
97
- return `${a}${e}${r}${c}`;
98
- }, Ge = ({
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: o,
102
- propValues: r,
103
- parseValue: n = (s) => s
101
+ value: n,
102
+ propValues: s,
103
+ parseValue: o = (r) => r
104
104
  }) => {
105
- if (o) {
106
- if (typeof o == "string" && r.includes(o))
107
- return Jt(t, o, n);
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
- }, Qt = ({
111
+ }, un = ({
112
112
  customProperties: e,
113
113
  value: t,
114
- propValues: o,
115
- parseValue: r = (n) => n
114
+ propValues: n,
115
+ parseValue: s = (o) => o
116
116
  }) => {
117
- let n = {};
118
- if (!(!t || typeof t == "string" && o.includes(t))) {
119
- typeof t == "string" && (n = Object.fromEntries(e.map((s) => [s, t])));
120
- for (const s in n) {
121
- const a = n[s];
122
- a !== void 0 && (n[s] = r(a));
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 n;
124
+ return o;
125
125
  }
126
- }, eo = (...e) => Object.assign({}, ...e), I = (e, ...t) => {
127
- let o, r;
128
- const n = { ...e }, s = eo(...t);
129
- for (const a in s) {
130
- let c = n[a];
131
- const l = s[a];
132
- if (l.default !== void 0 && c === void 0 && (c = l.default), l.type === "enum" && ([l.default, ...l.values].includes(c) || (c = l.default)), n[a] = c, "className" in l && l.className) {
133
- if (delete n[a], !c)
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 (l.type === "enum") {
136
- const d = Ge({
137
- value: c,
138
- className: l.className,
139
- propValues: l.values,
140
- parseValue: l.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
- o = x(o, d);
142
+ n = N(n, d);
143
143
  continue;
144
144
  }
145
- if (l.type === "string" || l.type === "enum | string") {
146
- const d = l.type === "string" ? [] : l.values, [p, f] = Zt({
147
- className: l.className,
148
- customProperties: l.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: c
150
+ value: a
151
151
  });
152
- r = Be(r, f), o = x(o, p);
152
+ s = Ve(s, p), n = N(n, f);
153
153
  continue;
154
154
  }
155
155
  }
156
156
  }
157
- return n.className = x(o, e.className), n.style = Be(r, e.style), n;
158
- }, to = (e) => {
159
- if (!P.isValidElement(e))
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
- }, T = (e, t = []) => {
163
- let o = [];
164
- function r(s, a) {
165
- const c = i.createContext(a), l = o.length;
166
- o = [...o, a];
167
- const d = (f) => {
168
- const { scope: b, children: m, ...v } = f, g = b?.[e]?.[l] || c, h = i.useMemo(() => v, Object.values(v));
169
- return /* @__PURE__ */ u(g.Provider, { value: h, children: m });
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 = `${s}Provider`;
172
- function p(f, b) {
173
- const m = b?.[e]?.[l] || c, v = i.useContext(m);
174
- if (v) return v;
175
- if (a !== void 0) return a;
176
- throw new Error(`\`${f}\` must be used within \`${s}\``);
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, p];
178
+ return [d, f];
179
179
  }
180
- const n = () => {
181
- const s = o.map((a) => i.createContext(a));
182
- return function(c) {
183
- const l = c?.[e] || s;
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}`]: { ...c, [e]: l } }),
186
- [c, l]
185
+ () => ({ [`__scope${e}`]: { ...a, [e]: u } }),
186
+ [a, u]
187
187
  );
188
188
  };
189
189
  };
190
- return n.scopeName = e, [r, oo(n, ...t)];
191
- }, oo = (...e) => {
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 o = () => {
195
- const r = e.map((n) => ({
196
- useScope: n(),
197
- scopeName: n.scopeName
194
+ const n = () => {
195
+ const s = e.map((o) => ({
196
+ useScope: o(),
197
+ scopeName: o.scopeName
198
198
  }));
199
- return function(s) {
200
- const a = r.reduce((c, { useScope: l, scopeName: d }) => {
201
- const f = l(s)[`__scope${d}`];
202
- return { ...c, ...f };
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}`]: a }), [a]);
204
+ return i.useMemo(() => ({ [`__scope${t.scopeName}`]: c }), [c]);
205
205
  };
206
206
  };
207
- return o.scopeName = t.scopeName, o;
208
- }, V = globalThis?.document ? i.useLayoutEffect : () => {
209
- }, no = i[" useId ".trim().toString()] || (() => {
207
+ return n.scopeName = t.scopeName, n;
208
+ }, z = globalThis?.document ? i.useLayoutEffect : () => {
209
+ }, fn = i[" useId ".trim().toString()] || (() => {
210
210
  });
211
- let so = 0;
212
- function Me(e) {
213
- const [t, o] = i.useState(no());
214
- return V(() => {
215
- o((r) => r ?? String(so++));
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 ro(e) {
218
+ function hn(e) {
219
219
  const t = i.useRef(e);
220
220
  return i.useEffect(() => {
221
221
  t.current = e;
222
- }), i.useMemo(() => ((...o) => t.current?.(...o)), []);
222
+ }), i.useMemo(() => ((...n) => t.current?.(...n)), []);
223
223
  }
224
- function A({
224
+ function _({
225
225
  prop: e,
226
226
  defaultProp: t,
227
- onChange: o = () => {
227
+ onChange: n = () => {
228
228
  },
229
- caller: r
229
+ caller: s
230
230
  }) {
231
- const [n, s, a] = co({
231
+ const [o, r, c] = gn({
232
232
  defaultProp: t,
233
- onChange: o
234
- }), c = e !== void 0, l = c ? e : n;
233
+ onChange: n
234
+ }), a = e !== void 0, u = a ? e : o;
235
235
  if (process.env.NODE_ENV !== "production") {
236
- const p = i.useRef(e !== void 0);
236
+ const f = i.useRef(e !== void 0);
237
237
  i.useEffect(() => {
238
- const f = p.current;
239
- f !== c && console.warn(
240
- `${r} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
241
- ), p.current = c;
242
- }, [c, r]);
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
- (p) => {
246
- if (c) {
247
- const f = ao(p) ? p(e) : p;
248
- f !== e && a.current?.(f);
245
+ (f) => {
246
+ if (a) {
247
+ const p = bn(f) ? f(e) : f;
248
+ p !== e && c.current?.(p);
249
249
  } else
250
- s(p);
250
+ r(f);
251
251
  },
252
- [c, e, s, a]
252
+ [a, e, r, c]
253
253
  );
254
- return [l, d];
254
+ return [u, d];
255
255
  }
256
- function co({
256
+ function gn({
257
257
  defaultProp: e,
258
258
  onChange: t
259
259
  }) {
260
- const [o, r] = i.useState(e), n = i.useRef(o), s = i.useRef(t);
261
- return V(() => {
262
- s.current = t;
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
- n.current !== o && (s.current?.(o), n.current = o);
265
- }, [o, n]), [o, r, s];
264
+ o.current !== n && (r.current?.(n), o.current = n);
265
+ }, [n, o]), [n, s, r];
266
266
  }
267
- function ao(e) {
267
+ function bn(e) {
268
268
  return typeof e == "function";
269
269
  }
270
- function me(e) {
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 he(e) {
275
- const [t, o] = i.useState(void 0);
276
- return V(() => {
274
+ function ve(e) {
275
+ const [t, n] = i.useState(void 0);
276
+ return z(() => {
277
277
  if (e) {
278
- o({ width: e.offsetWidth, height: e.offsetHeight });
279
- const r = new ResizeObserver((n) => {
280
- if (!Array.isArray(n) || !n.length)
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 s = n[0];
283
- let a, c;
284
- if ("borderBoxSize" in s) {
285
- const l = s.borderBoxSize, d = Array.isArray(l) ? l[0] : l;
286
- a = d.inlineSize, c = d.blockSize;
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
- a = e.offsetWidth, c = e.offsetHeight;
289
- o({ width: a, height: c });
288
+ c = e.offsetWidth, a = e.offsetHeight;
289
+ n({ width: c, height: a });
290
290
  });
291
- return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
291
+ return s.observe(e, { box: "border-box" }), () => s.unobserve(e);
292
292
  } else
293
- o(void 0);
293
+ n(void 0);
294
294
  }, [e]), t;
295
295
  }
296
- function io(e, t) {
297
- const [o, r] = i.useReducer((n, s) => t[n][s] ?? n, e);
298
- return [o, r];
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 lo(e, t, o, r = 0) {
301
- const [n, s] = P.useState({
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
- }), [a, c] = P.useState(!1);
308
- return V(() => {
309
- if (!o) {
310
- c(!1), s({
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 l;
320
- const d = () => {
319
+ let f;
320
+ const p = () => {
321
321
  if (!e.current || !t.current) return;
322
- const p = e.current.getBoundingClientRect(), f = t.current.getBoundingClientRect();
323
- if (f.height === 0 || f.width === 0) {
324
- l = requestAnimationFrame(d);
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 b = window.innerHeight, m = window.innerWidth;
328
- let v = window.scrollY + p.bottom + r, g = window.scrollX + p.left;
329
- p.bottom + f.height + r > b && (v = window.scrollY + p.top - f.height - r), p.left + f.width > m && (g = window.scrollX + m - f.width - 16), s({
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: `${v}px`,
332
- left: `${g}px`,
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
- }), c(!0);
337
+ };
338
+ r && (w.minWidth = `${h.width}px`), a(w), d(!0);
338
339
  };
339
- return l = requestAnimationFrame(d), window.addEventListener("scroll", d, { passive: !0 }), window.addEventListener("resize", d), () => {
340
- cancelAnimationFrame(l), window.removeEventListener("scroll", d), window.removeEventListener("resize", d);
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
- }, [o, e, t, r]), { styles: n, isPositioned: a };
343
+ }, [n, e, t, s, o, r]), { styles: c, isPositioned: u };
343
344
  }
344
- function uo(e, t) {
345
+ function Ye(e, t) {
345
346
  i.useEffect(() => {
346
- const o = (r) => {
347
- const n = e?.current;
348
- !n || n.contains(r.target) || t(r);
347
+ const n = (s) => {
348
+ const o = e?.current;
349
+ !o || o.contains(s.target) || t(s);
349
350
  };
350
- return document.addEventListener("mousedown", o), document.addEventListener("touchstart", o), () => {
351
- document.removeEventListener("mousedown", o), document.removeEventListener("touchstart", o);
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 po = (e) => {
356
- const t = P.forwardRef((o, r) => {
357
- const { children: n, ...s } = o;
358
- if (P.isValidElement(n)) {
359
- const a = De(n), c = Yt(s, n.props);
360
- return c.ref = r ? fe(r, a) : a, P.cloneElement(n, c);
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
- }, X = (e) => {
368
- const t = po(e), o = P.forwardRef((r, n) => {
369
- const { children: s, ...a } = r, c = P.Children.toArray(s), l = c.find(mo);
370
- if (l) {
371
- const d = l.props.children, p = c.map((f) => {
372
- if (f === l) {
373
- if (P.Children.count(d) > 1 || !P.isValidElement(d))
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 f;
386
+ return p;
380
387
  });
381
- if (!P.isValidElement(d))
388
+ if (!I.isValidElement(d))
382
389
  throw new Error(`[${e}.Outlet] Invalid children passed.`);
383
- return /* @__PURE__ */ u(t, { ...a, ref: n, children: P.cloneElement(d, void 0, p) });
390
+ return /* @__PURE__ */ l(t, { ...c, ref: o, children: I.cloneElement(d, void 0, f) });
384
391
  }
385
- return /* @__PURE__ */ u(t, { ...a, ref: n, children: s });
392
+ return /* @__PURE__ */ l(t, { ...c, ref: o, children: r });
386
393
  });
387
- return o.displayName = `${e}.Outlet`, o;
388
- }, J = X("Outlet"), fo = Symbol("bds.outlettable"), mo = (e) => P.isValidElement(e) && typeof e.type == "function" && "__bdsId" in e.type && e.type.__bdsId === fo, ho = ["a", "button", "div", "input", "label", "span"], S = ho.reduce((e, t) => {
389
- const o = X(`Base.${t}`), r = i.forwardRef((n, s) => {
390
- const { asChild: a, ...c } = n;
391
- return /* @__PURE__ */ u(a ? o : t, { ...c, ref: s });
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 r.displayName = `Base.${t}`, { ...e, [t]: r };
400
+ return s.displayName = `Base.${t}`, { ...e, [t]: s };
394
401
  }, {});
395
- function bo(e) {
396
- const t = `${e}CollectionProvider`, [o, r] = T(t), [n, s] = o(
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
- ), a = (g) => {
400
- const { scope: h, children: y } = g, C = i.useRef(null), R = i.useRef(/* @__PURE__ */ new Map()).current;
401
- return /* @__PURE__ */ u(n, { scope: h, itemMap: R, collectionRef: C, children: y });
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
- a.displayName = t;
404
- const c = `${e}CollectionOutlet`, l = X(c), d = i.forwardRef(
405
- (g, h) => {
406
- const { scope: y, children: C } = g, R = s(c, y), N = k(h, R.collectionRef);
407
- return /* @__PURE__ */ u(l, { ref: N, children: C });
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 = c;
411
- const p = `${e}CollectionItemOutlet`, f = "data-bd-collection-item", b = X(p), m = i.forwardRef(
412
- (g, h) => {
413
- const { scope: y, children: C, ...R } = g, N = i.useRef(null), B = k(h, N), w = s(p, y);
414
- return i.useEffect(() => (w.itemMap.set(N, { ref: N, ...R }), () => void w.itemMap.delete(N))), /* @__PURE__ */ u(b, { [f]: "", ref: B, children: C });
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
- m.displayName = p;
418
- function v(g) {
419
- const h = s(`${e}CollectionConsumer`, g);
424
+ h.displayName = f;
425
+ function C(v) {
426
+ const g = r(`${e}CollectionConsumer`, v);
420
427
  return i.useCallback(() => {
421
- const C = h.collectionRef.current;
422
- if (!C) return [];
423
- const R = Array.from(C.querySelectorAll(`[${f}]`));
424
- return Array.from(h.itemMap.values()).sort(
425
- (w, z) => R.indexOf(w.ref.current) - R.indexOf(z.ref.current)
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
- }, [h.collectionRef, h.itemMap]);
434
+ }, [g.collectionRef, g.itemMap]);
428
435
  }
429
436
  return [
430
- { Provider: a, Outlet: d, ItemOutlet: m },
431
- v,
432
- r
437
+ { Provider: c, Outlet: d, ItemOutlet: h },
438
+ C,
439
+ s
433
440
  ];
434
441
  }
435
- function Fe(e) {
436
- const { remain: t, children: o } = e, r = vo(t), n = typeof o == "function" ? o({ remain: r.isRemain }) : i.Children.only(o), s = k(r.ref, De(n));
437
- return typeof o == "function" || r.isRemain ? i.cloneElement(n, { ref: s }) : null;
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 go = ["mounted", "unmountSuspended"];
440
- function vo(e) {
441
- const [t, o] = i.useState(), r = i.useRef(null), n = i.useRef(e), s = i.useRef("none"), a = e ? "mounted" : "unmounted", [c, l] = io(a, {
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 = q(r.current);
456
- s.current = c === "mounted" ? d : "none";
457
- }, [c]), V(() => {
458
- const d = r.current, p = n.current;
459
- if (p !== e) {
460
- const b = s.current, m = q(d);
461
- e ? l("MOUNT") : m === "none" || d?.display === "none" ? l("UNMOUNT") : l(p && b !== m ? "ANIMATION_OUT" : "UNMOUNT"), n.current = 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, l]), V(() => {
470
+ }, [e, u]), z(() => {
464
471
  if (t) {
465
472
  let d;
466
- const p = t.ownerDocument.defaultView ?? window, f = (m) => {
467
- const g = q(r.current).includes(CSS.escape(m.animationName));
468
- if (m.target === t && g && (l("ANIMATION_END"), !n.current)) {
469
- const h = t.style.animationFillMode;
470
- t.style.animationFillMode = "forwards", d = p.setTimeout(() => {
471
- t.style.animationFillMode === "forwards" && (t.style.animationFillMode = h);
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 = (m) => {
475
- m.target === t && (s.current = q(r.current));
481
+ }, b = (h) => {
482
+ h.target === t && (r.current = X(s.current));
476
483
  };
477
- return t.addEventListener("animationstart", b), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
478
- p.clearTimeout(d), t.removeEventListener("animationstart", b), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
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
- l("ANIMATION_END");
482
- }, [t, l]), {
483
- isRemain: go.includes(c),
488
+ u("ANIMATION_END");
489
+ }, [t, u]), {
490
+ isRemain: xn.includes(a),
484
491
  ref: i.useCallback((d) => {
485
- r.current = d ? getComputedStyle(d) : null, o(d);
492
+ s.current = d ? getComputedStyle(d) : null, n(d);
486
493
  }, [])
487
494
  };
488
495
  }
489
- function q(e) {
496
+ function X(e) {
490
497
  return e?.animationName || "none";
491
498
  }
492
- const yo = Object.freeze({
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
- }), $e = i.forwardRef(
504
- (e, t) => /* @__PURE__ */ u(
505
- S.span,
510
+ }), Ke = i.forwardRef(
511
+ (e, t) => /* @__PURE__ */ l(
512
+ k.span,
506
513
  {
507
514
  ...e,
508
515
  ref: t,
509
- style: { ...yo, ...e.style }
516
+ style: { ...kn, ...e.style }
510
517
  }
511
518
  )
512
519
  );
513
- $e.displayName = "VisuallyHidden";
514
- const Co = i.forwardRef((e, t) => {
515
- const { children: o, className: r, ...n } = e;
516
- return /* @__PURE__ */ u(J, { ...n, ref: t, className: x("bd-reset", r), children: to(o) });
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
- Co.displayName = "Reset";
519
- const E = (e, t, { checkForDefaultPrevented: o = !0 } = {}) => function(n) {
520
- if (e?.(n), o === !1 || !n.defaultPrevented)
521
- return t?.(n);
522
- }, ce = "rovingFocusGroup.onEntryFocus", Ro = { bubbles: !1, cancelable: !0 }, Q = "RovingFocusGroup", [ue, Ve, No] = bo(Q), [wo, be] = T(
523
- Q,
524
- [No]
525
- ), [xo, So] = wo(Q), Le = i.forwardRef(
526
- (e, t) => /* @__PURE__ */ u(ue.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u(ue.Outlet, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u(Po, { ...e, ref: t }) }) })
527
- ), Po = i.forwardRef((e, t) => {
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: o,
530
- orientation: r,
531
- loop: n = !1,
532
- currentTabStopId: s,
533
- defaultCurrentTabStopId: a,
534
- onCurrentTabStopIdChange: c,
535
- onEntryFocus: l,
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
- ...p
538
- } = e, f = i.useRef(null), b = k(t, f), [m, v] = A({
539
- prop: s,
540
- defaultProp: a ?? null,
541
- onChange: c,
542
- caller: Q
543
- }), [g, h] = i.useState(!1), y = ro(l), C = Ve(o), R = i.useRef(!1), [N, B] = i.useState(0);
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 w = f.current;
546
- if (w)
547
- return w.addEventListener(ce, y), () => w.removeEventListener(ce, y);
548
- }, [y]), /* @__PURE__ */ u(
549
- xo,
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: o,
552
- orientation: r,
553
- loop: n,
554
- currentTabStopId: m,
558
+ scope: n,
559
+ orientation: s,
560
+ loop: o,
561
+ currentTabStopId: h,
555
562
  onItemFocus: i.useCallback(
556
- (w) => v(w),
557
- [v]
563
+ (x) => C(x),
564
+ [C]
558
565
  ),
559
- onItemShiftTab: i.useCallback(() => h(!0), []),
566
+ onItemShiftTab: i.useCallback(() => g(!0), []),
560
567
  onFocusableItemAdd: i.useCallback(
561
- () => B((w) => w + 1),
568
+ () => T((x) => x + 1),
562
569
  []
563
570
  ),
564
571
  onFocusableItemRemove: i.useCallback(
565
- () => B((w) => w - 1),
572
+ () => T((x) => x - 1),
566
573
  []
567
574
  ),
568
- children: /* @__PURE__ */ u(
569
- S.div,
575
+ children: /* @__PURE__ */ l(
576
+ k.div,
570
577
  {
571
- tabIndex: g || N === 0 ? -1 : 0,
572
- "data-orientation": r,
573
- ...p,
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: E(e.onMouseDown, () => {
577
- R.current = !0;
583
+ onMouseDown: B(e.onMouseDown, () => {
584
+ w.current = !0;
578
585
  }),
579
- onFocus: E(e.onFocus, (w) => {
580
- const z = !R.current;
581
- if (w.target === w.currentTarget && z && !g) {
582
- const _e = new CustomEvent(ce, Ro);
583
- if (w.currentTarget.dispatchEvent(_e), !_e.defaultPrevented) {
584
- const se = C().filter((G) => G.focusable), Ut = se.find((G) => G.active), jt = se.find((G) => G.id === m), Ht = [Ut, jt, ...se].filter(
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
- Ue(Ht, d);
594
+ Je(tn, d);
588
595
  }
589
596
  }
590
- R.current = !1;
597
+ w.current = !1;
591
598
  }),
592
- onBlur: E(e.onBlur, () => h(!1))
599
+ onBlur: B(e.onBlur, () => g(!1))
593
600
  }
594
601
  )
595
602
  }
596
603
  );
597
- }), ko = "RovingFocusGroupItem", ze = i.forwardRef(
604
+ }), An = "RovingFocusGroupItem", Ze = i.forwardRef(
598
605
  (e, t) => {
599
606
  const {
600
- __scopeRovingFocusGroup: o,
601
- focusable: r = !0,
602
- active: n = !1,
603
- tabStopId: s,
604
- children: a,
605
- ...c
606
- } = e, l = Me(), d = s || l, p = So(ko, o), f = p.currentTabStopId === d, b = Ve(o), { onFocusableItemAdd: m, onFocusableItemRemove: v, currentTabStopId: g } = p;
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 (r)
609
- return m(), () => v();
610
- }, [r, m, v]), /* @__PURE__ */ u(
611
- ue.ItemOutlet,
615
+ if (s)
616
+ return h(), () => C();
617
+ }, [s, h, C]), /* @__PURE__ */ l(
618
+ fe.ItemOutlet,
612
619
  {
613
- scope: o,
620
+ scope: n,
614
621
  id: d,
615
- focusable: r,
616
- active: n,
617
- children: /* @__PURE__ */ u(
618
- S.span,
622
+ focusable: s,
623
+ active: o,
624
+ children: /* @__PURE__ */ l(
625
+ k.span,
619
626
  {
620
- tabIndex: f ? 0 : -1,
621
- "data-orientation": p.orientation,
622
- ...c,
627
+ tabIndex: p ? 0 : -1,
628
+ "data-orientation": f.orientation,
629
+ ...a,
623
630
  ref: t,
624
- onMouseDown: E(e.onMouseDown, (h) => {
625
- r ? p.onItemFocus(d) : h.preventDefault();
631
+ onMouseDown: B(e.onMouseDown, (g) => {
632
+ s ? f.onItemFocus(d) : g.preventDefault();
626
633
  }),
627
- onFocus: E(e.onFocus, () => p.onItemFocus(d)),
628
- onKeyDown: E(e.onKeyDown, (h) => {
629
- if (h.key === "Tab" && h.shiftKey) {
630
- p.onItemShiftTab();
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 (h.target !== h.currentTarget) return;
634
- const y = Eo(h, p.orientation);
635
- if (y !== void 0) {
636
- if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
637
- h.preventDefault();
638
- let R = b().filter((N) => N.focusable).map((N) => N.ref.current);
639
- if (y === "last") R.reverse();
640
- else if (y === "prev" || y === "next") {
641
- y === "prev" && R.reverse();
642
- const N = R.indexOf(h.currentTarget);
643
- R = p.loop ? _o(R, N + 1) : R.slice(N + 1), setTimeout(() => Ue(R));
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 a == "function" ? a({ hasTabStop: g != null, isCurrentTabStop: f }) : a
654
+ children: typeof c == "function" ? c({ hasTabStop: v != null, isCurrentTabStop: p }) : c
648
655
  }
649
656
  )
650
657
  }
651
658
  );
652
659
  }
653
- ), Io = {
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 Eo(e, t) {
664
- const o = e.key;
665
- if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
666
- return Io[o];
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 Ue(e, t = !1) {
669
- const o = document.activeElement;
670
- for (const r of e)
671
- if (r === o || (r.focus({ preventScroll: t }), document.activeElement !== o)) return;
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 _o(e, t) {
674
- return e.map((o, r) => e[(t + r) % e.length]);
680
+ function Fn(e, t) {
681
+ return e.map((n, s) => e[(t + s) % e.length]);
675
682
  }
676
- const L = {
683
+ const U = {
677
684
  asChild: {
678
685
  type: "boolean"
679
686
  }
680
- }, ee = ["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"], To = {
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: ee,
690
+ values: oe,
684
691
  className: "bd-color",
685
692
  customProperties: ["--color"],
686
693
  default: void 0
687
694
  }
688
- }, Ao = {
695
+ }, Vn = {
689
696
  borderColor: {
690
697
  type: "enum | string",
691
- values: ee,
698
+ values: oe,
692
699
  className: "bd-br-color",
693
700
  customProperties: ["--border-color"],
694
701
  default: void 0
695
702
  }
696
- }, Bo = {
703
+ }, $n = {
697
704
  accentColor: {
698
705
  type: "enum | string",
699
- values: ee,
706
+ values: oe,
700
707
  className: "bd-ac-color",
701
708
  customProperties: ["--accent-color"],
702
709
  default: void 0
703
710
  }
704
- }, M = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], $ = {
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: M,
714
+ values: V,
708
715
  className: "bd-p",
709
716
  customProperties: ["--p"]
710
717
  },
711
718
  px: {
712
719
  type: "enum | string",
713
- values: M,
720
+ values: V,
714
721
  className: "bd-px",
715
722
  customProperties: ["--px"]
716
723
  },
717
724
  py: {
718
725
  type: "enum | string",
719
- values: M,
726
+ values: V,
720
727
  className: "bd-py",
721
728
  customProperties: ["--py"]
722
729
  },
723
730
  pt: {
724
731
  type: "enum | string",
725
- values: M,
732
+ values: V,
726
733
  className: "bd-pt",
727
734
  customProperties: ["--pt"]
728
735
  },
729
736
  pr: {
730
737
  type: "enum | string",
731
- values: M,
738
+ values: V,
732
739
  className: "bd-pr",
733
740
  customProperties: ["--pr"]
734
741
  },
735
742
  pb: {
736
743
  type: "enum | string",
737
- values: M,
744
+ values: V,
738
745
  className: "bd-pb",
739
746
  customProperties: ["--pb"]
740
747
  },
741
748
  pl: {
742
749
  type: "enum | string",
743
- values: M,
750
+ values: V,
744
751
  className: "bd-pl",
745
752
  customProperties: ["--pl"]
746
753
  }
747
- }, je = {
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
- }, Oo = {
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
- }, Do = ["static", "relative", "absolute", "fixed", "sticky"], ae = ["visible", "hidden", "clip", "scroll", "auto"], U = ["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"], Go = ["0", "1"], Mo = ["0", "1"], Fo = ["start", "center", "end", "baseline", "stretch"], $o = ["start", "center", "end", "baseline", "stretch"], Vo = {
780
- ...je,
781
- ...Oo,
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: Do
793
+ values: zn
787
794
  },
788
795
  inset: {
789
796
  type: "enum | string",
790
797
  className: "bd-inset",
791
798
  customProperties: ["--inset"],
792
- values: U
799
+ values: Y
793
800
  },
794
801
  top: {
795
802
  type: "enum | string",
796
803
  className: "bd-top",
797
804
  customProperties: ["--top"],
798
- values: U
805
+ values: Y
799
806
  },
800
807
  right: {
801
808
  type: "enum | string",
802
809
  className: "bd-right",
803
810
  customProperties: ["--right"],
804
- values: U
811
+ values: Y
805
812
  },
806
813
  bottom: {
807
814
  type: "enum | string",
808
815
  className: "bd-bottom",
809
816
  customProperties: ["--bottom"],
810
- values: U
817
+ values: Y
811
818
  },
812
819
  left: {
813
820
  type: "enum | string",
814
821
  className: "bd-left",
815
822
  customProperties: ["--left"],
816
- values: U
823
+ values: Y
817
824
  },
818
825
  overflow: {
819
826
  type: "enum",
820
827
  className: "bd-overflow",
821
- values: ae
828
+ values: ue
822
829
  },
823
830
  overflowX: {
824
831
  type: "enum",
825
832
  className: "bd-ox",
826
- values: ae
833
+ values: ue
827
834
  },
828
835
  overflowY: {
829
836
  type: "enum",
830
837
  className: "bd-oy",
831
- values: ae
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: Go
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: Mo
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: Fo
895
+ values: Yn
889
896
  },
890
897
  justifySelf: {
891
898
  type: "enum",
892
899
  className: "bd-js",
893
- values: $o
900
+ values: jn
894
901
  }
895
- }, F = ["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"], D = {
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: F,
905
+ values: $,
899
906
  className: "bd-m",
900
907
  customProperties: ["--m"]
901
908
  },
902
909
  mx: {
903
910
  type: "enum | string",
904
- values: F,
911
+ values: $,
905
912
  className: "bd-mx",
906
913
  customProperties: ["--ml", "--mr"]
907
914
  },
908
915
  my: {
909
916
  type: "enum | string",
910
- values: F,
917
+ values: $,
911
918
  className: "bd-my",
912
919
  customProperties: ["--mt", "--mb"]
913
920
  },
914
921
  mt: {
915
922
  type: "enum | string",
916
- values: F,
923
+ values: $,
917
924
  className: "bd-mt",
918
925
  customProperties: ["--mt"]
919
926
  },
920
927
  mr: {
921
928
  type: "enum | string",
922
- values: F,
929
+ values: $,
923
930
  className: "bd-mr",
924
931
  customProperties: ["--mr"]
925
932
  },
926
933
  mb: {
927
934
  type: "enum | string",
928
- values: F,
935
+ values: $,
929
936
  className: "bd-mb",
930
937
  customProperties: ["--mb"]
931
938
  },
932
939
  ml: {
933
940
  type: "enum | string",
934
- values: F,
941
+ values: $,
935
942
  className: "bd-ml",
936
943
  customProperties: ["--ml"]
937
944
  }
938
- }, Lo = ["left", "center", "right"], zo = {
945
+ }, Kn = ["left", "center", "right"], Wn = {
939
946
  align: {
940
947
  type: "enum",
941
- values: Lo,
948
+ values: Kn,
942
949
  className: "bd-ta"
943
950
  }
944
- }, Uo = ["wrap", "nowrap", "pretty", "balance"], jo = {
951
+ }, Xn = ["wrap", "nowrap", "pretty", "balance"], Zn = {
945
952
  wrap: {
946
953
  type: "enum",
947
954
  className: "bd-tw",
948
- values: Uo
955
+ values: Xn
949
956
  }
950
- }, Ho = ["light", "regular", "medium", "semibold", "bold"], He = {
957
+ }, Jn = ["light", "regular", "medium", "semibold", "bold"], we = {
951
958
  weight: {
952
959
  type: "enum",
953
- values: Ho,
960
+ values: Jn,
954
961
  className: "bd-weight"
955
962
  }
956
- }, qo = {
963
+ }, Qn = {
957
964
  truncate: {
958
965
  type: "boolean",
959
966
  className: "bd-truncate"
960
967
  }
961
- }, Ko = ["normal", "start", "end", "both"], Wo = {
968
+ }, eo = ["normal", "start", "end", "both"], to = {
962
969
  trim: {
963
970
  type: "enum",
964
971
  className: "bd-lt",
965
- values: Ko,
972
+ values: eo,
966
973
  default: "normal"
967
974
  }
968
- }, Xo = ["none", "s", "m", "l", "full"], Yo = {
975
+ }, no = ["none", "s", "m", "l", "full"], oo = {
969
976
  radius: {
970
977
  type: "enum | string",
971
- values: Xo,
978
+ values: no,
972
979
  default: void 0,
973
980
  className: "bd-radius",
974
981
  customProperties: ["--radius"]
975
982
  }
976
- }, ie = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], qe = {
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: ie
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: ie
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: ie
1000
+ values: de
994
1001
  }
995
- }, Zo = ["span", "div", "label", "p"], Jo = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"], Qo = {
996
- as: { type: "enum", values: Zo, default: "span" },
997
- ...L,
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: Jo,
1008
+ values: ro,
1002
1009
  customProperties: ["--size"]
1003
1010
  },
1004
- ...L,
1005
- ...D,
1006
- ...zo,
1007
- ...jo,
1008
- ...He,
1009
- ...qo,
1010
- ...Wo,
1011
- ...To
1012
- }, ge = i.forwardRef((e, t) => {
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: o,
1015
- className: r,
1016
- asChild: n,
1017
- as: s = "span",
1018
- ...a
1019
- } = I(e, Qo);
1020
- return /* @__PURE__ */ u(J, { ...a, ref: t, className: x("bd-Text", r), children: n ? o : /* @__PURE__ */ u(s, { children: o }) });
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
- ge.displayName = "Text";
1023
- const en = (e) => e === "between" ? "space-between" : e, tn = ["div", "span"], on = ["none", "inline-flex", "flex"], nn = ["row", "column", "row-reverse", "column-reverse"], sn = ["start", "center", "end", "baseline", "stretch"], rn = ["start", "center", "end", "between"], cn = ["nowrap", "wrap", "wrap-reverse"], ve = {
1024
- as: { type: "enum", values: tn, default: "div" },
1025
- ...L,
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: on
1036
+ values: lo
1030
1037
  },
1031
1038
  direction: {
1032
1039
  type: "enum",
1033
1040
  className: "bd-fd",
1034
- values: nn
1041
+ values: uo
1035
1042
  },
1036
1043
  align: {
1037
1044
  type: "enum",
1038
1045
  className: "bd-ai",
1039
- values: sn
1046
+ values: po
1040
1047
  },
1041
1048
  justify: {
1042
1049
  type: "enum",
1043
1050
  className: "bd-jc",
1044
- values: rn,
1045
- parseValue: en
1051
+ values: fo,
1052
+ parseValue: co
1046
1053
  },
1047
1054
  wrap: {
1048
1055
  type: "enum",
1049
1056
  className: "bd-fw",
1050
- values: cn
1057
+ values: mo
1051
1058
  },
1052
- ...qe,
1053
- ...Vo,
1054
- ...D
1055
- }, Y = i.forwardRef((e, t) => {
1056
- const { className: o, asChild: r, as: n = "div", ...s } = I(e, ve);
1057
- return /* @__PURE__ */ u(r ? J : n, { ...s, ref: t, className: x("bd-Flex", o) });
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
- Y.displayName = "Flex";
1060
- const an = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], ln = {
1061
- size: { type: "enum", className: "bd-size", values: an, default: "2" },
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: ee },
1064
- ...D
1065
- }, Ke = i.forwardRef((e, t) => {
1066
- const { className: o, children: r, loading: n, ...s } = I(
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
- ln,
1069
- Ao
1075
+ go,
1076
+ Vn
1070
1077
  );
1071
- if (!n) return r;
1072
- const a = /* @__PURE__ */ u("span", { ...s, ref: t, className: x("bd-Spinner", o) });
1073
- return r === void 0 ? a : /* @__PURE__ */ _(Y, { asChild: !0, position: "relative", align: "center", justify: "center", children: [
1074
- /* @__PURE__ */ u("span", { children: /* @__PURE__ */ u("span", { "aria-hidden": !0, style: { display: "contents", visibility: "hidden" }, inert: void 0, children: r }) }),
1075
- /* @__PURE__ */ u(Y, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ u("span", { children: a }) })
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
- Ke.displayName = "Spinner";
1079
- const un = ["1", "2", "3", "4", "5"], dn = [
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
- ], le = {
1086
- ...L,
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: un, default: "5" },
1097
- variant: { type: "enum", className: "bd-variant", values: dn, default: "fill-primary" },
1098
- ...je,
1099
- ...D,
1100
- ...qe,
1101
- ...Yo,
1102
- ...He,
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
- }, pn = (e) => {
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
- }, fn = (e) => {
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
- }, mn = i.forwardRef((e, t) => {
1128
- const { variant: o = le.variant.default, size: r = le.size.default } = e, {
1129
- className: n,
1130
- children: s,
1131
- asChild: a,
1132
- disabled: c = e.loading,
1133
- ...l
1134
- } = I(e, le);
1135
- return /* @__PURE__ */ u(
1136
- a ? J : "button",
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": c || void 0,
1145
+ "data-disabled": a || void 0,
1139
1146
  "data-loading": e.loading || void 0,
1140
- disabled: c,
1141
- ...l,
1147
+ disabled: a,
1148
+ ...u,
1142
1149
  ref: t,
1143
- className: x("bd-Button", n),
1144
- children: e.loading ? /* @__PURE__ */ _(Oe, { children: [
1145
- /* @__PURE__ */ u("span", { style: { display: "contents", visibility: "hidden" }, "aria-hidden": !0, children: s }),
1146
- /* @__PURE__ */ u($e, { children: s }),
1147
- /* @__PURE__ */ u(Y, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ u("span", { children: /* @__PURE__ */ u(
1148
- Ke,
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: pn(r),
1151
- color: fn(o)
1157
+ size: vo(s),
1158
+ color: yo(n)
1152
1159
  }
1153
1160
  ) }) })
1154
- ] }) : s
1161
+ ] }) : r
1155
1162
  }
1156
1163
  );
1157
1164
  });
1158
- mn.displayName = "Button";
1159
- const We = i.forwardRef((e, t) => {
1160
- const { color: o = "currentColor", ...r } = e;
1161
- return /* @__PURE__ */ u(
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
- ...r,
1176
+ ...s,
1170
1177
  ref: t,
1171
- children: /* @__PURE__ */ u(
1178
+ children: /* @__PURE__ */ l(
1172
1179
  "path",
1173
1180
  {
1174
1181
  d: "M0.800781 3.32636L3.76374 6.13338L8.80078 0.800049",
1175
- stroke: o,
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
- }), hn = i.forwardRef((e, t) => {
1184
- const { color: o = "currentColor", ...r } = e;
1185
- return /* @__PURE__ */ u(
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: o,
1193
- ...r,
1199
+ fill: n,
1200
+ ...s,
1194
1201
  ref: t,
1195
- children: /* @__PURE__ */ u(
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
- }), bn = ["1", "2", "3", "4"], gn = ["classic", "circle", "outline"], Xe = {
1206
- size: { type: "enum", className: "bd-size", values: bn, default: "2" },
1207
- variant: { type: "enum", className: "bd-variant", values: gn, default: "classic" }
1208
- }, ye = "Checkbox", [vn, Ye] = T(ye), [yn, Ce] = vn(ye);
1209
- function Cn(e) {
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: o,
1213
- defaultChecked: r,
1214
- required: n,
1215
- name: s,
1216
- form: a,
1217
- disabled: c,
1218
- value: l = "on",
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: p,
1290
+ onCheckedChange: f,
1221
1291
  // @ts-expect-error - Internal prop for render
1222
- __internal: f
1223
- } = e, [b, m] = A({
1224
- prop: o,
1225
- defaultProp: r ?? !1,
1226
- onChange: p,
1227
- caller: ye
1228
- }), [v, g] = i.useState(null), [h, y] = i.useState(null), C = i.useRef(!1), R = v ? !!a || !!v.closest("form") : !0, N = {
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: c,
1231
- setChecked: m,
1232
- control: v,
1233
- setControl: g,
1234
- name: s,
1235
- form: a,
1236
- value: l,
1237
- hasConsumerStoppedPropagationRef: C,
1238
- required: n,
1239
- defaultChecked: O(r) ? !1 : r,
1240
- isFormControl: R,
1241
- bubbleInput: h,
1242
- setBubbleInput: y
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__ */ u(
1245
- yn,
1314
+ return /* @__PURE__ */ l(
1315
+ Io,
1246
1316
  {
1247
1317
  scope: t,
1248
- ...N,
1249
- children: Rn(f) ? f(N) : d
1318
+ ...R,
1319
+ children: Do(p) ? p(R) : d
1250
1320
  }
1251
1321
  );
1252
1322
  }
1253
- const Ze = "CheckboxTrigger", Je = i.forwardRef(
1323
+ const st = "CheckboxTrigger", rt = i.forwardRef(
1254
1324
  ({
1255
1325
  __scopeCheckbox: e,
1256
1326
  onKeyDown: t,
1257
- onClick: o,
1258
- ...r
1259
- }, n) => {
1327
+ onClick: n,
1328
+ ...s
1329
+ }, o) => {
1260
1330
  const {
1261
- control: s,
1262
- value: a,
1263
- disabled: c,
1264
- checked: l,
1331
+ control: r,
1332
+ value: c,
1333
+ disabled: a,
1334
+ checked: u,
1265
1335
  required: d,
1266
- setControl: p,
1267
- setChecked: f,
1336
+ setControl: f,
1337
+ setChecked: p,
1268
1338
  hasConsumerStoppedPropagationRef: b,
1269
- isFormControl: m,
1270
- bubbleInput: v
1271
- } = Ce(Ze, e), g = k(n, p), h = i.useRef(l);
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 y = s?.form;
1274
- if (y) {
1275
- const C = () => f(h.current);
1276
- return y.addEventListener("reset", C), () => y.removeEventListener("reset", C);
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
- }, [s, f]), /* @__PURE__ */ u(
1279
- S.button,
1348
+ }, [r, p]), /* @__PURE__ */ l(
1349
+ k.button,
1280
1350
  {
1281
1351
  type: "button",
1282
1352
  role: "checkbox",
1283
- "aria-checked": O(l) ? "mixed" : l,
1353
+ "aria-checked": M(u) ? "mixed" : u,
1284
1354
  "aria-required": d,
1285
- "data-state": nt(l),
1286
- "data-disabled": c ? "" : void 0,
1287
- disabled: c,
1288
- value: a,
1289
- ...r,
1290
- ref: g,
1291
- onKeyDown: E(t, (y) => {
1292
- y.key === "Enter" && y.preventDefault();
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: E(o, (y) => {
1295
- f((C) => O(C) ? !0 : !C), v && m && (b.current = y.isPropagationStopped(), b.current || y.stopPropagation());
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
- Je.displayName = Ze;
1302
- const Qe = i.forwardRef(
1371
+ rt.displayName = st;
1372
+ const at = i.forwardRef(
1303
1373
  (e, t) => {
1304
1374
  const {
1305
- __scopeCheckbox: o,
1306
- name: r,
1307
- checked: n,
1308
- defaultChecked: s,
1309
- required: a,
1310
- disabled: c,
1311
- value: l,
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: p,
1314
- ...f
1383
+ form: f,
1384
+ ...p
1315
1385
  } = e;
1316
- return /* @__PURE__ */ u(
1317
- Cn,
1386
+ return /* @__PURE__ */ l(
1387
+ Eo,
1318
1388
  {
1319
- __scopeCheckbox: o,
1320
- checked: n,
1321
- defaultChecked: s,
1322
- required: a,
1323
- name: r,
1324
- form: p,
1325
- disabled: c,
1326
- value: l,
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__ */ _(Oe, { children: [
1329
- /* @__PURE__ */ u(
1330
- Je,
1398
+ __internal: ({ isFormControl: b }) => /* @__PURE__ */ S($e, { children: [
1399
+ /* @__PURE__ */ l(
1400
+ rt,
1331
1401
  {
1332
- ...f,
1402
+ ...p,
1333
1403
  ref: t,
1334
- __scopeCheckbox: o
1404
+ __scopeCheckbox: n
1335
1405
  }
1336
1406
  ),
1337
- b && /* @__PURE__ */ u(
1338
- tt,
1407
+ b && /* @__PURE__ */ l(
1408
+ it,
1339
1409
  {
1340
- __scopeCheckbox: o
1410
+ __scopeCheckbox: n
1341
1411
  }
1342
1412
  )
1343
1413
  ] })
1344
1414
  }
1345
1415
  );
1346
1416
  }
1347
- ), et = "CheckboxBubbleInput", tt = i.forwardRef(
1348
- ({ __scopeCheckbox: e, ...t }, o) => {
1417
+ ), ct = "CheckboxBubbleInput", it = i.forwardRef(
1418
+ ({ __scopeCheckbox: e, ...t }, n) => {
1349
1419
  const {
1350
- control: r,
1351
- checked: n,
1352
- defaultChecked: s,
1353
- required: a,
1354
- disabled: c,
1355
- name: l,
1420
+ control: s,
1421
+ checked: o,
1422
+ defaultChecked: r,
1423
+ required: c,
1424
+ disabled: a,
1425
+ name: u,
1356
1426
  value: d,
1357
- form: p,
1358
- bubbleInput: f,
1427
+ form: f,
1428
+ bubbleInput: p,
1359
1429
  setBubbleInput: b,
1360
- hasConsumerStoppedPropagationRef: m
1361
- } = Ce(et, e), v = k(o, b), g = me(n), h = he(r);
1430
+ hasConsumerStoppedPropagationRef: h
1431
+ } = ke(ct, e), C = D(n, b), v = Ce(o), g = ve(s);
1362
1432
  i.useEffect(() => {
1363
- const C = f;
1364
- if (!C) return;
1365
- const R = window.HTMLInputElement.prototype, B = Object.getOwnPropertyDescriptor(
1366
- R,
1433
+ const y = p;
1434
+ if (!y) return;
1435
+ const w = window.HTMLInputElement.prototype, T = Object.getOwnPropertyDescriptor(
1436
+ w,
1367
1437
  "checked"
1368
- ).set, w = !m.current;
1369
- if (g !== n && B) {
1370
- const z = new Event("click", { bubbles: w });
1371
- C.indeterminate = O(n), B.call(C, O(n) ? !1 : n), C.dispatchEvent(z);
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
- }, [f, g, n, m]);
1374
- const y = i.useRef(O(n) ? !1 : n);
1375
- return /* @__PURE__ */ u(
1376
- S.input,
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: s ?? y.current,
1381
- required: a,
1382
- disabled: c,
1383
- name: l,
1450
+ defaultChecked: r ?? m.current,
1451
+ required: c,
1452
+ disabled: a,
1453
+ name: u,
1384
1454
  value: d,
1385
- form: p,
1455
+ form: f,
1386
1456
  ...t,
1387
1457
  tabIndex: -1,
1388
- ref: v,
1458
+ ref: C,
1389
1459
  style: {
1390
1460
  ...t.style,
1391
- ...h,
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
- tt.displayName = et;
1403
- const ot = "CheckboxIndicator", Re = i.forwardRef((e, t) => {
1404
- const { __scopeCheckbox: o, forceMount: r, ...n } = e, s = Ce(ot, o);
1405
- return /* @__PURE__ */ u(Fe, { remain: r || O(s.checked) || s.checked === !0, children: /* @__PURE__ */ u(
1406
- S.span,
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": nt(s.checked),
1409
- "data-disabled": s.disabled ? "" : void 0,
1410
- ...n,
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
- Re.displayName = ot;
1417
- function Rn(e) {
1486
+ Pe.displayName = lt;
1487
+ function Do(e) {
1418
1488
  return typeof e == "function";
1419
1489
  }
1420
- function O(e) {
1490
+ function M(e) {
1421
1491
  return e === "indeterminate";
1422
1492
  }
1423
- function nt(e) {
1424
- return O(e) ? "indeterminate" : e ? "checked" : "unchecked";
1493
+ function ut(e) {
1494
+ return M(e) ? "indeterminate" : e ? "checked" : "unchecked";
1425
1495
  }
1426
- const Nn = i.forwardRef((e, t) => {
1496
+ const To = i.forwardRef((e, t) => {
1427
1497
  const {
1428
- className: o,
1429
- checked: r,
1430
- defaultChecked: n = !1,
1431
- onCheckedChange: s,
1432
- ...a
1433
- } = I(e, Xe), [c, l] = A({
1434
- prop: r,
1435
- defaultProp: n,
1436
- onChange: s
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__ */ u(
1439
- Qe,
1508
+ return /* @__PURE__ */ l(
1509
+ at,
1440
1510
  {
1441
- ...a,
1442
- defaultChecked: n,
1443
- checked: c,
1444
- onCheckedChange: l,
1511
+ ...c,
1512
+ defaultChecked: o,
1513
+ checked: a,
1514
+ onCheckedChange: u,
1445
1515
  asChild: !1,
1446
1516
  ref: t,
1447
- className: x("bd-reset", "bd-CheckboxRoot", o),
1448
- children: /* @__PURE__ */ u(Re, { asChild: !0, className: "bd-CheckboxIndicator", children: c === "indeterminate" ? /* @__PURE__ */ u(hn, {}) : /* @__PURE__ */ u(We, {}) })
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
- Nn.displayName = "Checkbox";
1453
- const K = {
1454
- ...L,
1455
- ...Xe
1456
- }, Ne = "CheckboxGroup", [wn, st] = T(
1457
- Ne,
1458
- [be, Ye]
1459
- ), rt = be(), ct = Ye(), [xn, Sn] = wn(Ne), at = i.forwardRef(
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: o,
1463
- name: r,
1464
- defaultValue: n,
1465
- value: s,
1466
- required: a = !1,
1467
- disabled: c = !1,
1468
- loop: l = !0,
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: p,
1471
- ...f
1472
- } = e, b = rt(o), [m = [], v] = A({
1473
- prop: s,
1474
- defaultProp: n || [],
1475
- onChange: p
1476
- }), g = i.useCallback(
1477
- (y) => v((C = []) => [...C, y]),
1478
- [v]
1479
- ), h = i.useCallback(
1480
- (y) => v((C = []) => C.filter((R) => R !== y)),
1481
- [v]
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__ */ u(
1484
- xn,
1553
+ return /* @__PURE__ */ l(
1554
+ Bo,
1485
1555
  {
1486
- scope: o,
1487
- name: r,
1488
- required: a,
1489
- disabled: c,
1490
- value: m,
1491
- onItemCheck: g,
1492
- onItemUnCheck: h,
1493
- children: /* @__PURE__ */ u(Le, { asChild: !0, ...b, orientation: d, loop: l, children: /* @__PURE__ */ u(
1494
- S.div,
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": c ? "" : void 0,
1498
- ...f,
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
- at.displayName = Ne;
1507
- const it = "CheckboxGroupItem", lt = i.forwardRef((e, t) => {
1508
- const { __scopeCheckboxGroup: o, disabled: r, ...n } = e, s = Sn(it, o), a = s.disabled || r, c = rt(o), l = ct(o), d = i.useRef(null), p = k(t, d), f = s.value?.includes(n.value);
1509
- return /* @__PURE__ */ u(
1510
- ze,
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
- ...c,
1514
- focusable: !a,
1515
- active: f,
1516
- children: /* @__PURE__ */ u(
1517
- Qe,
1583
+ ...a,
1584
+ focusable: !c,
1585
+ active: p,
1586
+ children: /* @__PURE__ */ l(
1587
+ at,
1518
1588
  {
1519
- name: s.name,
1520
- disabled: a,
1521
- required: s.required,
1522
- checked: f,
1523
- ...l,
1524
- ...n,
1525
- ref: p,
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 ? s.onItemCheck(e.value) : s.onItemUnCheck(e.value);
1597
+ b ? r.onItemCheck(e.value) : r.onItemUnCheck(e.value);
1528
1598
  }
1529
1599
  }
1530
1600
  )
1531
1601
  }
1532
1602
  );
1533
1603
  });
1534
- lt.displayName = it;
1535
- const Pn = "CheckboxGroupIndicator", ut = i.forwardRef((e, t) => {
1536
- const { __scopeCheckboxGroup: o, ...r } = e, n = ct(o);
1537
- return /* @__PURE__ */ u(Re, { ...n, ...r, ref: t });
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
- ut.displayName = Pn;
1540
- const j = "CheckboxGroup", [kn] = T(j, [
1541
- st
1542
- ]), dt = st(), [In, pt] = kn(j), ft = i.forwardRef(
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: o = K.size.default,
1546
- variant: r = K.variant.default,
1547
- ...n
1548
- } = e, { __scopeCheckboxGroup: s, className: a, ...c } = I(
1549
- n,
1550
- K
1551
- ), l = dt(s);
1552
- return /* @__PURE__ */ u(In, { scope: s, size: o, variant: r, children: /* @__PURE__ */ u(
1553
- at,
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
- ...l,
1556
- ...c,
1625
+ ...u,
1626
+ ...a,
1557
1627
  ref: t,
1558
- className: x("bd-CheckboxGroupRoot", a)
1628
+ className: N("bd-CheckboxGroupRoot", c)
1559
1629
  }
1560
1630
  ) });
1561
1631
  }
1562
1632
  );
1563
- ft.displayName = j;
1564
- const mt = i.forwardRef(
1633
+ yt.displayName = K;
1634
+ const wt = i.forwardRef(
1565
1635
  (e, t) => {
1566
- const { __scopeCheckboxGroup: o, children: r, className: n, style: s, ...a } = e, { size: c } = pt("CheckboxGroupItem", o);
1567
- return r ? /* @__PURE__ */ _(
1568
- ge,
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: c,
1572
- className: x("bd-CheckboxGroupItem", n),
1573
- style: s,
1641
+ size: a,
1642
+ className: N("bd-CheckboxGroupItem", o),
1643
+ style: r,
1574
1644
  children: [
1575
- /* @__PURE__ */ u(
1576
- de,
1645
+ /* @__PURE__ */ l(
1646
+ he,
1577
1647
  {
1578
- __scopeCheckboxGroup: o,
1579
- ...a,
1648
+ __scopeCheckboxGroup: n,
1649
+ ...c,
1580
1650
  ref: t
1581
1651
  }
1582
1652
  ),
1583
- r && /* @__PURE__ */ u("span", { className: "bd-CheckboxGroupItemInner", children: r })
1653
+ s && /* @__PURE__ */ l("span", { className: "bd-CheckboxGroupItemInner", children: s })
1584
1654
  ]
1585
1655
  }
1586
- ) : /* @__PURE__ */ u(
1587
- de,
1656
+ ) : /* @__PURE__ */ l(
1657
+ he,
1588
1658
  {
1589
- __scopeCheckboxGroup: o,
1590
- ...a,
1659
+ __scopeCheckboxGroup: n,
1660
+ ...c,
1591
1661
  ref: t,
1592
- className: n,
1593
- style: s
1662
+ className: o,
1663
+ style: r
1594
1664
  }
1595
1665
  );
1596
1666
  }
1597
1667
  );
1598
- mt.displayName = `${j}.Item`;
1599
- const de = i.forwardRef(({ __scopeCheckboxGroup: e, ...t }, o) => {
1600
- const r = pt("CheckboxGroupItemCheckbox", e), n = dt(e), { className: s } = I({ ...t, ...r }, K);
1601
- return /* @__PURE__ */ u(
1602
- lt,
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
- ...n,
1674
+ ...o,
1605
1675
  ...t,
1606
- ref: o,
1607
- className: x(
1676
+ ref: n,
1677
+ className: N(
1608
1678
  "bd-reset",
1609
1679
  "bd-CheckboxRoot",
1610
1680
  "bd-CheckboxGroupItemCheckbox",
1611
- s
1681
+ r
1612
1682
  ),
1613
- children: /* @__PURE__ */ u(ut, { ...n, asChild: !0, className: "bd-CheckboxIndicator", children: /* @__PURE__ */ u(We, {}) })
1683
+ children: /* @__PURE__ */ l(bt, { ...o, asChild: !0, className: "bd-CheckboxIndicator", children: /* @__PURE__ */ l(xe, {}) })
1614
1684
  }
1615
1685
  );
1616
1686
  });
1617
- de.displayName = `${j}.ItemCheckbox`;
1618
- const Cs = {
1619
- Root: ft,
1620
- Item: mt
1621
- }, En = ["1", "2", "3", "4"], _n = ["classic", "outline"], Tn = {
1622
- size: { type: "enum", className: "bd-size", values: En, default: "2" },
1623
- variant: { type: "enum", className: "bd-variant", values: _n, default: "classic" }
1624
- }, we = "Radio", [An, ht] = T(we), [Bn, On] = An(we), xe = i.forwardRef(
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: o,
1628
- name: r,
1629
- checked: n = !1,
1630
- required: s,
1631
- disabled: a,
1632
- value: c = "on",
1633
- onCheck: l,
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
- ...p
1636
- } = e, [f, b] = i.useState(null), m = k(t, b), v = i.useRef(!1), g = f ? d || !!f.closest("form") : !0;
1637
- return /* @__PURE__ */ _(Bn, { scope: o, checked: n, disabled: a, children: [
1638
- /* @__PURE__ */ u(
1639
- S.button,
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": n,
1644
- "data-state": yt(n),
1645
- "data-disabled": a ? "" : void 0,
1646
- disabled: a,
1647
- value: c,
1648
- ...p,
1649
- ref: m,
1650
- onClick: E(e.onClick, (h) => {
1651
- n || l?.(), g && (v.current = h.isPropagationStopped(), v.current || h.stopPropagation());
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
- g && /* @__PURE__ */ u(
1656
- vt,
1725
+ v && /* @__PURE__ */ l(
1726
+ St,
1657
1727
  {
1658
- control: f,
1659
- bubbles: !v.current,
1660
- name: r,
1661
- value: c,
1662
- checked: n,
1663
- required: s,
1664
- disabled: a,
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
- xe.displayName = we;
1673
- const bt = "RadioIndicator", gt = i.forwardRef(
1742
+ De.displayName = Ee;
1743
+ const Nt = "RadioIndicator", xt = i.forwardRef(
1674
1744
  (e, t) => {
1675
- const { __scopeRadio: o, forceMount: r, ...n } = e, s = On(bt, o);
1676
- return /* @__PURE__ */ u(Fe, { remain: r || s.checked, children: /* @__PURE__ */ u(
1677
- S.span,
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": yt(s.checked),
1680
- "data-disabled": s.disabled ? "" : void 0,
1681
- ...n,
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
- gt.displayName = bt;
1688
- const Dn = "RadioBubbleInput", vt = i.forwardRef(
1689
- ({ control: e, checked: t, bubbles: o = !0, ...r }, n) => {
1690
- const s = i.useRef(null), a = k(s, n), c = me(t), l = he(e);
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 = s.current;
1762
+ const d = r.current;
1693
1763
  if (!d) return;
1694
- const p = window.HTMLInputElement.prototype, b = Object.getOwnPropertyDescriptor(
1695
- p,
1764
+ const f = window.HTMLInputElement.prototype, b = Object.getOwnPropertyDescriptor(
1765
+ f,
1696
1766
  "checked"
1697
1767
  ).set;
1698
- if (c !== t && b) {
1699
- const m = new Event("click", { bubbles: o });
1700
- b.call(d, t), d.dispatchEvent(m);
1768
+ if (a !== t && b) {
1769
+ const h = new Event("click", { bubbles: n });
1770
+ b.call(d, t), d.dispatchEvent(h);
1701
1771
  }
1702
- }, [c, t, o]), /* @__PURE__ */ u(
1703
- S.input,
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
- ...r,
1778
+ ...s,
1709
1779
  tabIndex: -1,
1710
- ref: a,
1780
+ ref: c,
1711
1781
  style: {
1712
- ...r.style,
1713
- ...l,
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
- vt.displayName = Dn;
1724
- function yt(e) {
1793
+ St.displayName = Ho;
1794
+ function kt(e) {
1725
1795
  return e ? "checked" : "unchecked";
1726
1796
  }
1727
- const Gn = i.forwardRef((e, t) => {
1797
+ const Yo = i.forwardRef((e, t) => {
1728
1798
  const {
1729
- className: o,
1730
- checked: r,
1731
- defaultChecked: n = !1,
1732
- onCheck: s,
1733
- ...a
1734
- } = I(e, Tn), [c, l] = A({
1735
- prop: r,
1736
- defaultProp: n,
1737
- onChange: s
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__ */ u(
1740
- xe,
1809
+ return /* @__PURE__ */ l(
1810
+ De,
1741
1811
  {
1742
- ...a,
1743
- defaultChecked: n,
1744
- checked: c,
1745
- onCheck: () => l((d) => !d),
1812
+ ...c,
1813
+ defaultChecked: o,
1814
+ checked: a,
1815
+ onCheck: () => u((d) => !d),
1746
1816
  ref: t,
1747
- className: x("bd-reset", "bd-BaseRadioRoot", "bd-RadioRoot", o)
1817
+ className: N("bd-reset", "bd-BaseRadioRoot", "bd-RadioRoot", n)
1748
1818
  }
1749
1819
  );
1750
1820
  });
1751
- Gn.displayName = "Radio";
1752
- const Mn = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], te = "RadioGroup", [Fn, Ct] = T(
1753
- te,
1754
- [ht]
1755
- ), Rt = be(), Nt = ht(), [$n, Vn] = Fn(te), wt = i.forwardRef(
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: o,
1759
- name: r,
1760
- defaultValue: n,
1761
- value: s,
1762
- required: a = !1,
1763
- disabled: c = !1,
1764
- orientation: l,
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: p,
1767
- ...f
1768
- } = e, b = Rt(o), [m, v] = A({
1769
- prop: s,
1770
- defaultProp: n ?? null,
1771
- onChange: p,
1772
- caller: te
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__ */ u(
1775
- $n,
1844
+ return /* @__PURE__ */ l(
1845
+ Ko,
1776
1846
  {
1777
- scope: o,
1778
- name: r,
1779
- required: a,
1780
- disabled: c,
1781
- value: m,
1782
- onValueChange: v,
1783
- children: /* @__PURE__ */ u(Le, { asChild: !0, ...b, orientation: l, loop: d, children: /* @__PURE__ */ u(
1784
- S.div,
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": a,
1788
- "aria-orientation": l,
1789
- "data-disabled": c ? "" : void 0,
1790
- ...f,
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
- wt.displayName = te;
1799
- const xt = "RadioGroupItem", St = i.forwardRef(
1868
+ Dt.displayName = se;
1869
+ const Tt = "RadioGroupItem", _t = i.forwardRef(
1800
1870
  (e, t) => {
1801
- const { __scopeRadioGroup: o, disabled: r, ...n } = e, s = Vn(xt, o), a = s.disabled || r, c = Rt(o), l = Nt(o), d = i.useRef(null), p = k(t, d), f = s.value === n.value, b = i.useRef(!1);
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 m = (g) => {
1804
- Mn.includes(g.key) && (b.current = !0);
1805
- }, v = () => b.current = !1;
1806
- return document.addEventListener("keydown", m), document.addEventListener("keyup", v), () => {
1807
- document.removeEventListener("keydown", m), document.removeEventListener("keyup", v);
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__ */ u(
1810
- ze,
1879
+ }, []), /* @__PURE__ */ l(
1880
+ Ze,
1811
1881
  {
1812
1882
  asChild: !0,
1813
- ...c,
1814
- focusable: !a,
1815
- active: f,
1816
- children: /* @__PURE__ */ u(
1817
- xe,
1883
+ ...a,
1884
+ focusable: !c,
1885
+ active: p,
1886
+ children: /* @__PURE__ */ l(
1887
+ De,
1818
1888
  {
1819
- name: s.name,
1820
- disabled: a,
1821
- required: s.required,
1822
- checked: f,
1823
- ...l,
1824
- ...n,
1825
- ref: p,
1826
- onCheck: () => s.onValueChange(n.value),
1827
- onKeyDown: E((m) => {
1828
- m.key === "Enter" && m.preventDefault();
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: E(n.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
- St.displayName = xt;
1840
- const Ln = "RadioGroupBaseIndicator", zn = i.forwardRef((e, t) => {
1841
- const { __scopeRadioGroup: o, ...r } = e, n = Nt(o);
1842
- return /* @__PURE__ */ u(gt, { ...n, ...r, ref: t });
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
- zn.displayName = Ln;
1845
- const Un = ["1", "2", "3"], jn = ["classic", "outline"], W = {
1846
- ...L,
1847
- size: { type: "enum", className: "bd-size", values: Un, default: "2" },
1848
- variant: { type: "enum", className: "bd-variant", values: jn, default: "classic" },
1849
- ...D
1850
- }, H = "RadioGroup", [Hn] = T(H, [Ct]), Pt = Ct(), [qn, kt] = Hn(H), It = i.forwardRef(
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 = W.size.default,
1853
- variant: t = W.variant.default,
1854
- ...o
1855
- }, r) => {
1856
- const { __scopeRadioGroup: n, className: s, ...a } = I(
1857
- o,
1858
- W
1859
- ), c = Pt(n);
1860
- return /* @__PURE__ */ u(qn, { scope: n, size: e, variant: t, children: /* @__PURE__ */ u(
1861
- wt,
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
- ref: r,
1866
- className: x("bd-RadioGroupRoot", s)
1934
+ ...c,
1935
+ ref: s,
1936
+ className: N("bd-RadioGroupRoot", r)
1867
1937
  }
1868
1938
  ) });
1869
1939
  }
1870
1940
  );
1871
- It.displayName = H;
1872
- const Et = i.forwardRef(
1941
+ Mt.displayName = W;
1942
+ const Ot = i.forwardRef(
1873
1943
  (e, t) => {
1874
- const { __scopeRadioGroup: o, children: r, className: n, style: s, ...a } = e, { size: c } = kt("RadioGroupItem", o);
1875
- return r ? /* @__PURE__ */ _(
1876
- ge,
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: c,
1880
- className: x("bd-RadioGroupItem", n),
1881
- style: s,
1949
+ size: a,
1950
+ className: N("bd-RadioGroupItem", o),
1951
+ style: r,
1882
1952
  children: [
1883
- /* @__PURE__ */ u(
1884
- pe,
1953
+ /* @__PURE__ */ l(
1954
+ ge,
1885
1955
  {
1886
- __scopeRadioGroup: o,
1887
- ...a,
1956
+ __scopeRadioGroup: n,
1957
+ ...c,
1888
1958
  ref: t
1889
1959
  }
1890
1960
  ),
1891
- r && /* @__PURE__ */ u("span", { className: "bd-RadioGroupItemInner", children: r })
1961
+ s && /* @__PURE__ */ l("span", { className: "bd-RadioGroupItemInner", children: s })
1892
1962
  ]
1893
1963
  }
1894
- ) : /* @__PURE__ */ u(
1895
- pe,
1964
+ ) : /* @__PURE__ */ l(
1965
+ ge,
1896
1966
  {
1897
- __scopeRadioGroup: o,
1898
- ...a,
1967
+ __scopeRadioGroup: n,
1968
+ ...c,
1899
1969
  ref: t,
1900
- className: n,
1901
- style: s
1970
+ className: o,
1971
+ style: r
1902
1972
  }
1903
1973
  );
1904
1974
  }
1905
1975
  );
1906
- Et.displayName = `${H}.Item`;
1907
- const pe = i.forwardRef(({ __scopeRadioGroup: e, ...t }, o) => {
1908
- const r = kt("RadioGroupItemRadio", e), n = Pt(e), { className: s } = I({ ...t, ...r }, W);
1909
- return /* @__PURE__ */ u(
1910
- St,
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
- ...n,
1982
+ ...o,
1913
1983
  ...t,
1914
1984
  asChild: !1,
1915
- ref: o,
1916
- className: x("bd-reset", "bd-BaseRadioRoot", "bd-RadioRoot", s)
1985
+ ref: n,
1986
+ className: N("bd-reset", "bd-BaseRadioRoot", "bd-RadioRoot", r)
1917
1987
  }
1918
1988
  );
1919
1989
  });
1920
- pe.displayName = `${H}.ItemRadio`;
1921
- const Rs = {
1922
- Root: It,
1923
- Item: Et
1924
- }, _t = i.forwardRef(
1925
- ({ children: e, maxHeight: t, className: o, style: r, onScroll: n, onScrollBottom: s, ...a }, c) => /* @__PURE__ */ u(
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: c,
1998
+ ref: a,
1929
1999
  onScroll: (d) => {
1930
- if (n && n(d), s) {
1931
- const { scrollTop: p, scrollHeight: f, clientHeight: b } = d.currentTarget;
1932
- f - p <= b + 10 && s();
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 ${o || ""}`,
1936
- style: { ...r, maxHeight: t },
1937
- ...a,
2005
+ className: `bd-ScrollArea ${n || ""}`,
2006
+ style: { ...s, maxHeight: t },
2007
+ ...c,
1938
2008
  children: e
1939
2009
  }
1940
2010
  )
1941
2011
  );
1942
- _t.displayName = "ScrollArea";
1943
- const Kn = ["1", "2", "3", "4", "5"], Wn = ["classic", "underlined", "rounded"], Xn = {
1944
- size: { type: "enum", className: "bd-size", values: Kn, default: "2" },
1945
- variant: { type: "enum", className: "bd-variant", values: Wn, default: "classic" },
1946
- ...D
1947
- }, Yn = {
1948
- gap: ve.gap,
1949
- px: $.px,
1950
- pl: $.pl,
1951
- pr: $.pr
1952
- }, Zn = {
1953
- ...Xn,
1954
- ...Yn
1955
- }, Jn = ({
1956
- children: e,
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: o,
1986
- onValueChange: r,
1987
- open: n,
1988
- defaultOpen: s,
1989
- onOpenChange: a,
1990
- variant: c = "classic",
1991
- children: l
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 [d, p] = A({
2039
+ const [p, b] = _({
1994
2040
  prop: t,
1995
- defaultProp: o ?? "",
1996
- onChange: r,
1997
- caller: Z
1998
- }), [f, b] = A({
1999
- prop: n,
2000
- defaultProp: s ?? !1,
2001
- onChange: a,
2002
- caller: `${Z}.Open`
2003
- }), m = i.useRef(null), v = Me();
2004
- return /* @__PURE__ */ u(
2005
- ts,
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: d,
2009
- onValueChange: p,
2010
- open: f,
2011
- onOpenChange: b,
2012
- triggerRef: m,
2013
- contentId: v,
2014
- variant: c,
2015
- children: l
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
- }, At = "SelectBoxTrigger", Se = i.forwardRef(
2066
+ }, Vt = "SelectBoxTrigger", _e = i.forwardRef(
2019
2067
  (e, t) => {
2020
- const { __scopeSelect: o, children: r, onClick: n, onKeyDown: s, ...a } = e, c = oe(At, o), l = k(t, c.triggerRef), { className: d, style: p, ...f } = I(a, Zn), b = !c.value || c.value === "";
2021
- return /* @__PURE__ */ u(
2022
- S.button,
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": c.open,
2074
+ "aria-expanded": a.open,
2027
2075
  "data-placeholder": b ? "" : void 0,
2028
2076
  className: `bd-SelectBoxTrigger ${d || ""}`,
2029
- style: p,
2030
- ...f,
2031
- ref: l,
2032
- onClick: (m) => {
2033
- c.onOpenChange(!c.open), n?.(m);
2077
+ style: f,
2078
+ ...p,
2079
+ ref: u,
2080
+ onClick: (h) => {
2081
+ a.onOpenChange(!a.open), o?.(h);
2034
2082
  },
2035
- onKeyDown: (m) => {
2036
- !c.open && (m.key === "ArrowDown" || m.key === "Enter" || m.key === " ") && (m.preventDefault(), c.onOpenChange(!0)), s?.(m);
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: r
2086
+ children: s
2039
2087
  }
2040
2088
  );
2041
2089
  }
2042
2090
  );
2043
- Se.displayName = At;
2044
- const Bt = "SelectBoxContent", Pe = i.forwardRef(({ __scopeSelect: e, children: t, className: o, style: r, onKeyDown: n, ...s }, a) => {
2045
- const c = oe(Bt, e), l = i.useRef(null), d = k(a, l);
2046
- uo(l, (g) => {
2047
- c.triggerRef.current?.contains(g.target) || c.open && c.onOpenChange(!1);
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 p = c.variant === "rounded" ? 8 : 0, { styles: f, isPositioned: b } = lo(
2050
- c.triggerRef,
2051
- l,
2052
- c.open,
2053
- p
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
- c.open && l.current && requestAnimationFrame(() => {
2057
- if (!l.current) return;
2058
- const g = Array.from(
2059
- l.current.querySelectorAll('[role="option"]')
2060
- ), h = g.find((y) => y.getAttribute("aria-selected") === "true");
2061
- h ? h.focus() : g.length > 0 && g[0].focus();
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
- }, [c.open]);
2064
- const m = (g) => {
2065
- const h = Array.from(
2066
- l.current?.querySelectorAll('[role="option"]') || []
2067
- ), y = h.indexOf(document.activeElement);
2068
- switch (g.key) {
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
- g.preventDefault();
2071
- const C = y < h.length - 1 ? y + 1 : 0;
2072
- h[C]?.focus();
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
- g.preventDefault();
2077
- const C = y > 0 ? y - 1 : h.length - 1;
2078
- h[C]?.focus();
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
- g.preventDefault(), document.activeElement?.click();
2131
+ v.preventDefault(), document.activeElement?.click();
2084
2132
  break;
2085
2133
  case "Escape":
2086
- g.preventDefault(), c.onOpenChange(!1), c.triggerRef.current?.focus();
2134
+ v.preventDefault(), a.onOpenChange(!1), a.triggerRef.current?.focus();
2087
2135
  break;
2088
2136
  case "Tab":
2089
- c.onOpenChange(!1);
2137
+ a.onOpenChange(!1);
2090
2138
  break;
2091
2139
  }
2092
- n?.(g);
2140
+ o?.(v);
2093
2141
  };
2094
- if (!c.open) return null;
2095
- const v = /* @__PURE__ */ u(
2096
- S.div,
2142
+ if (!a.open) return null;
2143
+ const C = /* @__PURE__ */ l(
2144
+ k.div,
2097
2145
  {
2098
- id: c.contentId,
2146
+ id: a.contentId,
2099
2147
  role: "listbox",
2100
2148
  tabIndex: -1,
2101
- onKeyDown: m,
2102
- className: `bd-SelectBoxContent bd-variant-${c.variant} ${o || ""}`,
2103
- ...s,
2149
+ onKeyDown: h,
2150
+ className: `bd-SelectBoxContent bd-variant-${a.variant} ${n || ""}`,
2151
+ ...r,
2104
2152
  ref: d,
2105
2153
  style: {
2106
- ...f,
2107
- ...r,
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__ */ u(Jn, { children: v });
2162
+ return /* @__PURE__ */ l(je, { children: C });
2115
2163
  });
2116
- Pe.displayName = Bt;
2117
- const Ot = "SelectBoxItem", ke = i.forwardRef(
2118
- ({ __scopeSelect: e, value: t, onClick: o, className: r, children: n, ...s }, a) => {
2119
- const c = oe(Ot, e), l = c.value === t;
2120
- return /* @__PURE__ */ u(
2121
- S.div,
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": l,
2126
- "data-state": l ? "checked" : "unchecked",
2127
- className: `bd-SelectBoxItem bd-variant-${c.variant} ${r || ""}`,
2128
- ...s,
2129
- ref: a,
2130
- onClick: (d) => {
2131
- const p = typeof n == "string" ? n : t;
2132
- c.onValueChange(p), c.onOpenChange(!1), c.triggerRef.current?.focus(), o?.(d);
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: n
2186
+ children: o
2135
2187
  }
2136
2188
  );
2137
2189
  }
2138
2190
  );
2139
- ke.displayName = Ot;
2140
- const Dt = "SelectBoxValue", Ie = i.forwardRef(
2141
- ({ __scopeSelect: e, className: t, children: o, placeholder: r, ...n }, s) => {
2142
- const a = oe(Dt, e), c = a.value ? a.value : o || r;
2143
- return /* @__PURE__ */ u(S.span, { className: `bd-SelectBoxValue ${t || ""}`, ...n, ref: s, children: c });
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
- Ie.displayName = Dt;
2147
- const os = "SelectBoxSlot", Ee = i.forwardRef(
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": o,
2153
- "data-chevron": r ? "true" : void 0,
2214
+ "data-side": n,
2215
+ "data-chevron": s ? "true" : void 0,
2154
2216
  className: `bd-SelectBoxSlot ${t || ""}`,
2155
- ...s,
2156
- ref: a,
2157
- children: n || /* @__PURE__ */ u(Qn, {})
2217
+ ...r,
2218
+ ref: c,
2219
+ children: o || /* @__PURE__ */ l(xo, {})
2158
2220
  }
2159
2221
  )
2160
2222
  );
2161
- Ee.displayName = os;
2162
- const ns = ({
2223
+ Me.displayName = ls;
2224
+ const us = ({
2163
2225
  options: e,
2164
2226
  placeholder: t = "선택하세요",
2165
- size: o = "2",
2166
- variant: r = "classic",
2167
- disabled: n = !1,
2168
- maxHeight: s,
2227
+ size: n = "2",
2228
+ weight: s = "regular",
2229
+ variant: o = "classic",
2230
+ disabled: r = !1,
2231
+ maxHeight: c,
2169
2232
  onScrollBottom: a,
2170
- ...c
2171
- }) => /* @__PURE__ */ _(Tt, { ...c, variant: r, children: [
2172
- /* @__PURE__ */ _(Se, { size: o, variant: r, disabled: n, children: [
2173
- /* @__PURE__ */ u(Ie, { placeholder: t }),
2174
- /* @__PURE__ */ u(Ee, { "data-chevron": !0 })
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__ */ u(Pe, { children: /* @__PURE__ */ u(_t, { maxHeight: s, onScrollBottom: a, children: e.map((l) => /* @__PURE__ */ u(ke, { value: l.value, children: l.label }, l.value)) }) })
2177
- ] }), Ns = Object.assign(ns, {
2178
- Root: Tt,
2179
- Trigger: Se,
2180
- Content: Pe,
2181
- Item: ke,
2182
- Value: Ie,
2183
- Slot: Ee
2184
- }), ne = "Switch", [ss] = T(ne), [rs, cs] = ss(ne), Gt = i.forwardRef(
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: o,
2188
- name: r,
2189
- checked: n,
2190
- defaultChecked: s,
2191
- required: a,
2192
- disabled: c,
2193
- value: l = "on",
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: p,
2196
- ...f
2197
- } = e, [b, m] = i.useState(null), v = k(t, (R) => m(R)), g = i.useRef(!1), h = b ? p || !!b.closest("form") : !0, [y, C] = A({
2198
- prop: n,
2199
- defaultProp: s ?? !1,
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: ne
2264
+ caller: ae
2202
2265
  });
2203
- return /* @__PURE__ */ _(rs, { scope: o, checked: y, disabled: c, children: [
2204
- /* @__PURE__ */ u(
2205
- S.button,
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": y,
2210
- "aria-required": a,
2211
- "data-state": Vt(y),
2212
- "data-disabled": c ? "" : void 0,
2213
- disabled: c,
2214
- value: l,
2215
- ...f,
2216
- ref: v,
2217
- onClick: E(e.onClick, (R) => {
2218
- C((N) => !N), h && (g.current = R.isPropagationStopped(), g.current || R.stopPropagation());
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
- h && /* @__PURE__ */ u(
2223
- $t,
2285
+ g && /* @__PURE__ */ l(
2286
+ jt,
2224
2287
  {
2225
2288
  control: b,
2226
- bubbles: !g.current,
2227
- name: r,
2228
- value: l,
2229
- checked: y,
2230
- required: a,
2231
- disabled: c,
2232
- form: p,
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
- Gt.displayName = ne;
2240
- const Mt = "SwitchThumb", Ft = i.forwardRef(
2302
+ Ut.displayName = ae;
2303
+ const Ht = "SwitchThumb", Yt = i.forwardRef(
2241
2304
  (e, t) => {
2242
- const { __scopeSwitch: o, ...r } = e, n = cs(Mt, o);
2243
- return /* @__PURE__ */ u(
2244
- S.span,
2305
+ const { __scopeSwitch: n, ...s } = e, o = fs(Ht, n);
2306
+ return /* @__PURE__ */ l(
2307
+ k.span,
2245
2308
  {
2246
- "data-state": Vt(n.checked),
2247
- "data-disabled": n.disabled ? "" : void 0,
2248
- ...r,
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
- Ft.displayName = Mt;
2255
- const as = "SwitchBubbleInput", $t = i.forwardRef(
2317
+ Yt.displayName = Ht;
2318
+ const ms = "SwitchBubbleInput", jt = i.forwardRef(
2256
2319
  (e, t) => {
2257
- const { checked: o, control: r, bubbles: n = !0, ...s } = e, a = i.useRef(null), c = k(a, t), l = me(o), d = he(r);
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 p = a.current;
2260
- if (!p) return;
2261
- const f = window.HTMLInputElement.prototype, m = Object.getOwnPropertyDescriptor(
2262
- f,
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 (l !== o && m) {
2266
- const v = new Event("click", { bubbles: n });
2267
- m.call(p, o), p.dispatchEvent(v);
2328
+ if (u !== n && h) {
2329
+ const C = new Event("click", { bubbles: o });
2330
+ h.call(f, n), f.dispatchEvent(C);
2268
2331
  }
2269
- }, [l, o, n]), /* @__PURE__ */ u(
2332
+ }, [u, n, o]), /* @__PURE__ */ l(
2270
2333
  "input",
2271
2334
  {
2272
2335
  type: "checkbox",
2273
2336
  "aria-hidden": !0,
2274
- defaultChecked: o,
2275
- ...s,
2337
+ defaultChecked: n,
2338
+ ...r,
2276
2339
  tabIndex: -1,
2277
- ref: c,
2340
+ ref: a,
2278
2341
  style: {
2279
- ...s.style,
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
- $t.displayName = as;
2291
- function Vt(e) {
2353
+ jt.displayName = ms;
2354
+ function qt(e) {
2292
2355
  return e ? "checked" : "unchecked";
2293
2356
  }
2294
- const is = ["1", "2", "3"], ls = {
2295
- size: { type: "enum", className: "bd-size", values: is, default: "2" },
2296
- ...D
2297
- }, us = i.forwardRef((e, t) => {
2298
- const { className: o, ...r } = I(e, ls);
2299
- return /* @__PURE__ */ u(
2300
- Gt,
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
- ...r,
2365
+ ...s,
2303
2366
  asChild: !1,
2304
2367
  ref: t,
2305
- className: x("bd-reset", "bd-SwitchRoot", o),
2306
- children: /* @__PURE__ */ u(Ft, { className: x("bd-SwitchThumb") })
2368
+ className: N("bd-reset", "bd-SwitchRoot", n),
2369
+ children: /* @__PURE__ */ l(Yt, { className: N("bd-SwitchThumb") })
2307
2370
  }
2308
2371
  );
2309
2372
  });
2310
- us.displayName = "Switch";
2311
- const ds = ["1", "2", "3", "4", "5"], ps = ["classic", "underlined", "rounded"], fs = {
2312
- size: { type: "enum", className: "bd-size", values: ds, default: "2" },
2313
- variant: { type: "enum", className: "bd-variant", values: ps, default: "classic" },
2314
- ...D,
2315
- ...Bo
2316
- }, ms = ["left", "right"], hs = {
2317
- side: { type: "enum", values: ms },
2318
- gap: ve.gap,
2319
- px: $.px,
2320
- pl: $.pl,
2321
- pr: $.pr
2322
- }, Lt = i.forwardRef(
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 o = i.useRef(null), { children: r, className: n, style: s, ...a } = I(
2387
+ const n = i.useRef(null), { children: s, className: o, style: r, ...c } = P(
2325
2388
  e,
2326
- fs
2389
+ ys
2327
2390
  );
2328
- return /* @__PURE__ */ _(
2391
+ return /* @__PURE__ */ S(
2329
2392
  "div",
2330
2393
  {
2331
- style: s,
2332
- className: x("bd-TextFieldRoot", n),
2333
- onPointerDown: (c) => {
2334
- const l = c.target;
2335
- if (l.closest("input, button, a")) return;
2336
- const d = o.current;
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 f = l.closest(`
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(f, f);
2407
+ d.setSelectionRange(p, p);
2345
2408
  } catch {
2346
2409
  }
2347
2410
  d.focus();
2348
2411
  });
2349
2412
  },
2350
2413
  children: [
2351
- /* @__PURE__ */ u(
2414
+ /* @__PURE__ */ l(
2352
2415
  "input",
2353
2416
  {
2354
2417
  spellCheck: "false",
2355
- ...a,
2356
- ref: fe(o, t),
2418
+ ...c,
2419
+ ref: q(n, t),
2357
2420
  className: "bd-reset bd-TextFieldInput"
2358
2421
  }
2359
2422
  ),
2360
- r
2423
+ s
2361
2424
  ]
2362
2425
  }
2363
2426
  );
2364
2427
  }
2365
2428
  );
2366
- Lt.displayName = "TextFieldRoot";
2367
- const zt = i.forwardRef(
2429
+ Kt.displayName = "TextFieldRoot";
2430
+ const Wt = i.forwardRef(
2368
2431
  (e, t) => {
2369
- const { className: o, side: r, ...n } = I(e, hs);
2370
- return /* @__PURE__ */ u(
2432
+ const { className: n, side: s, ...o } = P(e, Rs);
2433
+ return /* @__PURE__ */ l(
2371
2434
  "div",
2372
2435
  {
2373
- "data-side": r,
2374
- ...n,
2436
+ "data-side": s,
2437
+ ...o,
2375
2438
  ref: t,
2376
- className: x("bd-TextFieldSlot", o)
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
- zt.displayName = "TextFieldSlot";
2382
- const ws = Object.assign(Lt, { Slot: zt });
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
- mn as Button,
2385
- We as CheckLineIcon,
2386
- Nn as Checkbox,
2387
- Cs as CheckboxGroup,
2388
- Y as Flex,
2389
- hn as IndeterminateLineIcon,
2390
- Gn as Radio,
2391
- Rs as RadioGroup,
2392
- _t as ScrollArea,
2393
- Ns as SelectBox,
2394
- Ke as Spinner,
2395
- us as Switch,
2396
- ge as Text,
2397
- ws as TextField
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
  };