@beaubrain/web-design-system 0.1.11 → 0.1.12

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 Ve } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
3
  import P from "react";
4
- import { createPortal as qt } from "react-dom";
5
- function Kt(e) {
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 Oe;
15
+ function sn() {
16
+ return Oe || (Oe = 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 = s(r, o(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 o(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 = s(c, a));
38
+ return c;
39
39
  }
40
- function n(s, a) {
41
- return a ? s ? s + " " + a : s + a : s;
40
+ function s(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 o in t) {
51
+ const s = e[o], r = t[o];
52
+ /^on[A-Z]/.test(o) ? s && r ? n[o] = (...a) => {
53
+ const u = r(...a);
54
+ return s(...a), u;
55
+ } : s && (n[o] = s) : o === "style" ? n[o] = { ...s, ...r } : o === "className" && (n[o] = [s, r].filter(Boolean).join(" "));
56
56
  }
57
- return { ...e, ...o };
58
- }, Ae = (e, t) => {
57
+ return { ...e, ...n };
58
+ }, Fe = (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 o = e.map((s) => {
65
+ const r = Fe(s, t);
66
+ return !n && typeof r == "function" && (n = !0), { ref: s, 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: s, cleanup: r } of o)
71
+ typeof r == "function" ? r() : Fe(s, 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 E(...e) {
78
+ return P.useCallback(q(...e), e);
79
79
  }
80
- const Be = (...e) => {
80
+ const Ge = (...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 o = $e({
87
87
  allowCustomValues: !0,
88
88
  className: e,
89
- ...o
90
- }), n = Qt({
89
+ ...n
90
+ }), s = 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 [o, s];
95
+ }, ln = (e, t, n) => {
96
+ const o = e ? "-" : "", s = n(t), r = s?.startsWith("-"), c = r ? "-" : "", a = r ? s?.substring(1) : s;
97
+ return `${c}${e}${o}${a}`;
98
+ }, $e = ({
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: o,
103
+ parseValue: s = (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" && o.includes(n))
107
+ return ln(t, n, s);
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: o = (s) => s
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 s = {};
118
+ if (!(!t || typeof t == "string" && n.includes(t))) {
119
+ typeof t == "string" && (s = Object.fromEntries(e.map((r) => [r, t])));
120
+ for (const r in s) {
121
+ const c = s[r];
122
+ c !== void 0 && (s[r] = o(c));
123
123
  }
124
- return n;
124
+ return s;
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), D = (e, ...t) => {
127
+ let n, o;
128
+ const s = { ...e }, r = dn(...t);
129
+ for (const c in r) {
130
+ let a = s[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)), s[c] = a, "className" in u && u.className) {
133
+ if (delete s[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 = $e({
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
+ o = Ge(o, 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) => {
157
+ return s.className = N(n, e.className), s.style = Ge(o, e.style), s;
158
+ }, Le = (e) => {
159
159
  if (!P.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 o(r, c) {
165
+ const a = i.createContext(c), u = n.length;
166
+ n = [...n, c];
167
+ const d = (p) => {
168
+ const { scope: C, children: h, ...b } = p, v = C?.[e]?.[u] || a, g = i.useMemo(() => b, Object.values(b));
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, C) {
173
+ const h = C?.[e]?.[u] || a, b = i.useContext(h);
174
+ if (b) return b;
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 s = () => {
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 s.scopeName = e, [o, pn(s, ...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 o = e.map((s) => ({
196
+ useScope: s(),
197
+ scopeName: s.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 = o.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 ze(e) {
213
+ const [t, n] = i.useState(fn());
214
+ return z(() => {
215
+ n((o) => o ?? 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: o
230
230
  }) {
231
- const [n, s, a] = co({
231
+ const [s, 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 : s;
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
+ `${o} 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, o]);
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, o] = i.useState(e), s = 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
+ s.current !== n && (r.current?.(n), s.current = n);
265
+ }, [n, s]), [n, o, 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 o = new ResizeObserver((s) => {
280
+ if (!Array.isArray(s) || !s.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 = s[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 o.observe(e, { box: "border-box" }), () => o.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, o] = i.useReducer((s, r) => t[s][r] ?? s, e);
298
+ return [n, o];
299
299
  }
300
- function lo(e, t, o, r = 0) {
301
- const [n, s] = P.useState({
300
+ function Ue(e, t, n, o = 0, s = "start", r = !0) {
301
+ const [c, a] = P.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] = P.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(), b = t.current.getBoundingClientRect();
323
+ if (b.height === 0 || b.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 + o, y = window.scrollX + h.left;
329
+ s === "center" ? y = window.scrollX + h.left + h.width / 2 - b.width / 2 : s === "end" && (y = window.scrollX + h.right - b.width), h.bottom + b.height + o > v && (m = window.scrollY + h.top - b.height - o), y + b.width > window.scrollX + g && (y = window.scrollX + g - b.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, o, s, r]), { styles: c, isPositioned: u };
343
344
  }
344
- function uo(e, t) {
345
+ function He(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 = (o) => {
348
+ const s = e?.current;
349
+ !s || s.contains(o.target) || t(o);
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 Ye = ({
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 = P.forwardRef((n, o) => {
364
+ const { children: s, ...r } = n;
365
+ if (P.isValidElement(s)) {
366
+ const c = be(s), a = an(r, s.props);
367
+ return a.ref = o ? q(o, c) : c, P.cloneElement(s, 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) {
374
+ }, Q = (e) => {
375
+ const t = vn(e), n = P.forwardRef((o, s) => {
376
+ const { children: r, ...c } = o, a = P.Children.toArray(r), u = a.find(wn);
377
+ if (u) {
378
+ const d = u.props.children, f = a.map((p) => {
379
+ if (p === u) {
373
380
  if (P.Children.count(d) > 1 || !P.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
388
  if (!P.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: s, children: P.cloneElement(d, void 0, f) });
384
391
  }
385
- return /* @__PURE__ */ u(t, { ...a, ref: n, children: s });
392
+ return /* @__PURE__ */ l(t, { ...c, ref: s, 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) => P.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}`), o = i.forwardRef((s, r) => {
397
+ const { asChild: c, ...a } = s;
398
+ return /* @__PURE__ */ l(c ? n : t, { ...a, ref: r });
392
399
  });
393
- return r.displayName = `Base.${t}`, { ...e, [t]: r };
400
+ return o.displayName = `Base.${t}`, { ...e, [t]: o };
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, o] = A(t), [s, 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(s, { 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 = E(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", C = Q(f), h = i.forwardRef(
419
+ (v, g) => {
420
+ const { scope: m, children: y, ...w } = v, R = i.useRef(null), T = E(g, R), x = r(f, m);
421
+ return i.useEffect(() => (x.itemMap.set(R, { ref: R, ...w }), () => void x.itemMap.delete(R))), /* @__PURE__ */ l(C, { [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 b(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
+ b,
439
+ o
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 je(e) {
443
+ const { remain: t, children: n } = e, o = Sn(t), s = typeof n == "function" ? n({ remain: o.isRemain }) : i.Children.only(n), r = E(o.ref, be(s));
444
+ return typeof n == "function" || o.isRemain ? i.cloneElement(s, { 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(), o = i.useRef(null), s = 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(o.current);
463
+ r.current = a === "mounted" ? d : "none";
464
+ }, [a]), z(() => {
465
+ const d = o.current, f = s.current;
466
+ if (f !== e) {
467
+ const C = r.current, h = X(d);
468
+ e ? u("MOUNT") : h === "none" || d?.display === "none" ? u("UNMOUNT") : u(f && C !== h ? "ANIMATION_OUT" : "UNMOUNT"), s.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(o.current).includes(CSS.escape(h.animationName));
475
+ if (h.target === t && v && (u("ANIMATION_END"), !s.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
+ }, C = (h) => {
482
+ h.target === t && (r.current = X(o.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", C), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
485
+ f.clearTimeout(d), t.removeEventListener("animationstart", C), 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
+ o.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
+ }), qe = 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
+ qe.displayName = "VisuallyHidden";
521
+ const Pn = i.forwardRef((e, t) => {
522
+ const { children: n, className: o, ...s } = e;
523
+ return /* @__PURE__ */ l(te, { ...s, ref: t, className: N("bd-reset", o), children: Le(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(s) {
527
+ if (e?.(s), n === !1 || !s.defaultPrevented)
528
+ return t?.(s);
529
+ }, le = "rovingFocusGroup.onEntryFocus", In = { bubbles: !1, cancelable: !0 }, ne = "RovingFocusGroup", [fe, Ke, En] = Nn(ne), [Dn, ye] = A(
530
+ ne,
531
+ [En]
532
+ ), [Tn, _n] = Dn(ne), We = 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: o,
538
+ loop: s = !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), C = E(t, p), [h, b] = _({
546
+ prop: r,
547
+ defaultProp: c ?? null,
548
+ onChange: a,
549
+ caller: ne
550
+ }), [v, g] = i.useState(!1), m = hn(u), y = Ke(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: o,
560
+ loop: s,
561
+ currentTabStopId: h,
555
562
  onItemFocus: i.useCallback(
556
- (w) => v(w),
557
- [v]
563
+ (x) => b(x),
564
+ [b]
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,
574
- ref: b,
578
+ tabIndex: v || R === 0 ? -1 : 0,
579
+ "data-orientation": o,
580
+ ...f,
581
+ ref: C,
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 Me = new CustomEvent(le, In);
590
+ if (x.currentTarget.dispatchEvent(Me), !Me.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
+ Ze(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", Xe = 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: o = !0,
609
+ active: s = !1,
610
+ tabStopId: r,
611
+ children: c,
612
+ ...a
613
+ } = e, u = ze(), d = r || u, f = _n(An, n), p = f.currentTabStopId === d, C = Ke(n), { onFocusableItemAdd: h, onFocusableItemRemove: b, 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 (o)
616
+ return h(), () => b();
617
+ }, [o, h, b]), /* @__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: o,
623
+ active: s,
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
+ o ? 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 = C().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(() => Ze(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 Ze(e, t = !1) {
676
+ const n = document.activeElement;
677
+ for (const o of e)
678
+ if (o === n || (o.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, o) => e[(t + o) % 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
+ }, Je = {
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
+ ...Je,
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"], Qe = {
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
+ ...Qe,
1016
+ ...Qn,
1017
+ ...to,
1018
+ ...Gn
1019
+ }, we = 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: o,
1023
+ asChild: s,
1024
+ as: r = "span",
1025
+ ...c
1026
+ } = D(e, ao);
1027
+ return /* @__PURE__ */ l(te, { ...c, ref: t, className: N("bd-Text", o), children: s ? 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
+ we.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"], Re = {
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
+ }, I = i.forwardRef((e, t) => {
1063
+ const { className: n, asChild: o, as: s = "div", ...r } = D(e, Re);
1064
+ return /* @__PURE__ */ l(o ? te : s, { ...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
+ I.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: o, loading: s, ...r } = D(
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 (!s) return o;
1079
+ const c = /* @__PURE__ */ l("span", { ...r, ref: t, className: N("bd-Spinner", n) });
1080
+ return o === void 0 ? c : /* @__PURE__ */ S(I, { 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: o }) }),
1082
+ /* @__PURE__ */ l(I, { 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
+ ...Je,
1106
+ ...O,
1107
+ ...et,
1108
+ ...oo,
1109
+ ...Qe,
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: o = pe.size.default } = e, {
1136
+ className: s,
1137
+ children: r,
1138
+ asChild: c,
1139
+ disabled: a = e.loading,
1140
+ ...u
1141
+ } = D(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", s),
1151
+ children: e.loading ? /* @__PURE__ */ S(Ve, { children: [
1152
+ /* @__PURE__ */ l("span", { style: { display: "contents", visibility: "hidden" }, "aria-hidden": !0, children: r }),
1153
+ /* @__PURE__ */ l(qe, { children: r }),
1154
+ /* @__PURE__ */ l(I, { 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(o),
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 Ne = i.forwardRef((e, t) => {
1167
+ const { color: n = "currentColor", ...o } = 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
+ ...o,
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", ...o } = 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
+ ...o,
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: o = 20, height: s = 20, ...r } = e;
1214
+ return /* @__PURE__ */ l(
1215
+ "svg",
1216
+ {
1217
+ xmlns: "http://www.w3.org/2000/svg",
1218
+ width: o,
1219
+ height: s,
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: o = 20, height: s = 20, ...r } = e;
1235
+ return /* @__PURE__ */ l(
1236
+ "svg",
1237
+ {
1238
+ xmlns: "http://www.w3.org/2000/svg",
1239
+ width: o,
1240
+ height: s,
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: o = 20, height: s = 20, ...r } = e;
1256
+ return /* @__PURE__ */ l(
1257
+ "svg",
1258
+ {
1259
+ xmlns: "http://www.w3.org/2000/svg",
1260
+ width: o,
1261
+ height: s,
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
+ }, xe = "Checkbox", [Po, ot] = A(xe), [Io, Se] = Po(xe);
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: o,
1284
+ required: s,
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 = {
1229
- 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
1292
+ __internal: p
1293
+ } = e, [C, h] = _({
1294
+ prop: n,
1295
+ defaultProp: o ?? !1,
1296
+ onChange: f,
1297
+ caller: xe
1298
+ }), [b, v] = i.useState(null), [g, m] = i.useState(null), y = i.useRef(!1), w = b ? !!c || !!b.closest("form") : !0, R = {
1299
+ checked: C,
1300
+ disabled: a,
1301
+ setChecked: h,
1302
+ control: b,
1303
+ setControl: v,
1304
+ name: r,
1305
+ form: c,
1306
+ value: u,
1307
+ hasConsumerStoppedPropagationRef: y,
1308
+ required: s,
1309
+ defaultChecked: M(o) ? !1 : o,
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
+ ...o
1329
+ }, s) => {
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,
1268
- hasConsumerStoppedPropagationRef: b,
1269
- isFormControl: m,
1270
- bubbleInput: v
1271
- } = Ce(Ze, e), g = k(n, p), h = i.useRef(l);
1336
+ setControl: f,
1337
+ setChecked: p,
1338
+ hasConsumerStoppedPropagationRef: C,
1339
+ isFormControl: h,
1340
+ bubbleInput: b
1341
+ } = Se(st, e), v = E(s, 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
+ ...o,
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), b && h && (C.current = m.isPropagationStopped(), C.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: o,
1377
+ checked: s,
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: s,
1391
+ defaultChecked: r,
1392
+ required: c,
1393
+ name: o,
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: C }) => /* @__PURE__ */ S(Ve, { 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
+ C && /* @__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: o,
1421
+ checked: s,
1422
+ defaultChecked: r,
1423
+ required: c,
1424
+ disabled: a,
1425
+ name: u,
1356
1426
  value: d,
1357
- form: p,
1358
- bubbleInput: f,
1359
- setBubbleInput: b,
1360
- hasConsumerStoppedPropagationRef: m
1361
- } = Ce(et, e), v = k(o, b), g = me(n), h = he(r);
1427
+ form: f,
1428
+ bubbleInput: p,
1429
+ setBubbleInput: C,
1430
+ hasConsumerStoppedPropagationRef: h
1431
+ } = Se(ct, e), b = E(n, C), v = Ce(s), g = ve(o);
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 !== s && T) {
1440
+ const H = new Event("click", { bubbles: x });
1441
+ y.indeterminate = M(s), T.call(y, M(s) ? !1 : s), 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, s, h]);
1444
+ const m = i.useRef(M(s) ? !1 : s);
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: b,
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", ke = i.forwardRef((e, t) => {
1474
+ const { __scopeCheckbox: n, forceMount: o, ...s } = e, r = Se(lt, n);
1475
+ return /* @__PURE__ */ l(je, { remain: o || 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
+ ...s,
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
+ ke.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: o,
1500
+ defaultChecked: s = !1,
1501
+ onCheckedChange: r,
1502
+ ...c
1503
+ } = D(e, nt), [a, u] = _({
1504
+ prop: o,
1505
+ defaultProp: s,
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: s,
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(ke, { asChild: !0, className: "bd-CheckboxIndicator", children: a === "indeterminate" ? /* @__PURE__ */ l(wo, {}) : /* @__PURE__ */ l(Ne, {}) })
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
+ }, Pe = "CheckboxGroup", [_o, dt] = A(
1527
+ Pe,
1528
+ [ye, ot]
1529
+ ), pt = ye(), ft = ot(), [Bo, Ao] = _o(Pe), 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: o,
1534
+ defaultValue: s,
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, C = pt(n), [h = [], b] = _({
1543
+ prop: r,
1544
+ defaultProp: s || [],
1545
+ onChange: f
1546
+ }), v = i.useCallback(
1547
+ (m) => b((y = []) => [...y, m]),
1548
+ [b]
1549
+ ), g = i.useCallback(
1550
+ (m) => b((y = []) => y.filter((w) => w !== m)),
1551
+ [b]
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: o,
1558
+ required: c,
1559
+ disabled: a,
1560
+ value: h,
1561
+ onItemCheck: v,
1562
+ onItemUnCheck: g,
1563
+ children: /* @__PURE__ */ l(We, { asChild: !0, ...C, 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 = Pe;
1577
+ const ht = "CheckboxGroupItem", gt = i.forwardRef((e, t) => {
1578
+ const { __scopeCheckboxGroup: n, disabled: o, ...s } = e, r = Ao(ht, n), c = r.disabled || o, a = pt(n), u = ft(n), d = i.useRef(null), f = E(t, d), p = r.value?.includes(s.value);
1579
+ return /* @__PURE__ */ l(
1580
+ Xe,
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,
1526
- onCheckedChange: (b) => {
1527
- b ? s.onItemCheck(e.value) : s.onItemUnCheck(e.value);
1589
+ name: r.name,
1590
+ disabled: c,
1591
+ required: r.required,
1592
+ checked: p,
1593
+ ...u,
1594
+ ...s,
1595
+ ref: f,
1596
+ onCheckedChange: (C) => {
1597
+ C ? 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, ...o } = e, s = ft(n);
1607
+ return /* @__PURE__ */ l(ke, { ...s, ...o, 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: o = Z.variant.default,
1617
+ ...s
1618
+ } = e, { __scopeCheckboxGroup: r, className: c, ...a } = D(
1619
+ s,
1620
+ Z
1621
+ ), u = Ct(r);
1622
+ return /* @__PURE__ */ l(Fo, { scope: r, size: n, variant: o, 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: o, className: s, style: r, ...c } = e, { size: a } = vt("CheckboxGroupItem", n);
1637
+ return o ? /* @__PURE__ */ S(
1638
+ we,
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", s),
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
+ o && /* @__PURE__ */ l("span", { className: "bd-CheckboxGroupItemInner", children: o })
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: s,
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 o = vt("CheckboxGroupItemCheckbox", e), s = Ct(e), { className: r } = D({ ...t, ...o }, Z);
1671
+ return /* @__PURE__ */ l(
1672
+ gt,
1603
1673
  {
1604
- ...n,
1674
+ ...s,
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, { ...s, asChild: !0, className: "bd-CheckboxIndicator", children: /* @__PURE__ */ l(Ne, {}) })
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
+ }, Ie = "Radio", [Lo, Rt] = A(Ie), [zo, Uo] = Lo(Ie), Ee = 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: o,
1699
+ checked: s = !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, C] = i.useState(null), h = E(t, C), b = i.useRef(!1), v = p ? d || !!p.closest("form") : !0;
1707
+ return /* @__PURE__ */ S(zo, { scope: n, checked: s, 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": s,
1714
+ "data-state": kt(s),
1715
+ "data-disabled": c ? "" : void 0,
1716
+ disabled: c,
1717
+ value: a,
1718
+ ...f,
1719
+ ref: h,
1720
+ onClick: B(e.onClick, (g) => {
1721
+ s || u?.(), v && (b.current = g.isPropagationStopped(), b.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: !b.current,
1730
+ name: o,
1731
+ value: a,
1732
+ checked: s,
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
+ Ee.displayName = Ie;
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: o, ...s } = e, r = Uo(Nt, n);
1746
+ return /* @__PURE__ */ l(je, { remain: o || 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
+ ...s,
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, ...o }, s) => {
1760
+ const r = i.useRef(null), c = E(r, s), 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, C = 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 && C) {
1769
+ const h = new Event("click", { bubbles: n });
1770
+ C.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
+ ...o,
1709
1779
  tabIndex: -1,
1710
- ref: a,
1780
+ ref: c,
1711
1781
  style: {
1712
- ...r.style,
1713
- ...l,
1782
+ ...o.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: o,
1801
+ defaultChecked: s = !1,
1802
+ onCheck: r,
1803
+ ...c
1804
+ } = D(e, $o), [a, u] = _({
1805
+ prop: o,
1806
+ defaultProp: s,
1807
+ onChange: r
1738
1808
  });
1739
- return /* @__PURE__ */ u(
1740
- xe,
1809
+ return /* @__PURE__ */ l(
1810
+ Ee,
1741
1811
  {
1742
- ...a,
1743
- defaultChecked: n,
1744
- checked: c,
1745
- onCheck: () => l((d) => !d),
1812
+ ...c,
1813
+ defaultChecked: s,
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: o,
1830
+ defaultValue: s,
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, C = It(n), [h, b] = _({
1839
+ prop: r,
1840
+ defaultProp: s ?? 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: o,
1849
+ required: c,
1850
+ disabled: a,
1851
+ value: h,
1852
+ onValueChange: b,
1853
+ children: /* @__PURE__ */ l(We, { asChild: !0, ...C, 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,40 +1865,40 @@ 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: o, ...s } = e, r = Wo(Tt, n), c = r.disabled || o, a = It(n), u = Et(n), d = i.useRef(null), f = E(t, d), p = r.value === s.value, C = 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) && (C.current = !0);
1875
+ }, b = () => C.current = !1;
1876
+ return document.addEventListener("keydown", h), document.addEventListener("keyup", b), () => {
1877
+ document.removeEventListener("keydown", h), document.removeEventListener("keyup", b);
1808
1878
  };
1809
- }, []), /* @__PURE__ */ u(
1810
- ze,
1879
+ }, []), /* @__PURE__ */ l(
1880
+ Xe,
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
+ Ee,
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
+ ...s,
1895
+ ref: f,
1896
+ onCheck: () => r.onValueChange(s.value),
1897
+ onKeyDown: B((h) => {
1898
+ h.key === "Enter" && h.preventDefault();
1829
1899
  }),
1830
- onFocus: E(n.onFocus, () => {
1831
- b.current && d.current?.click();
1900
+ onFocus: B(s.onFocus, () => {
1901
+ C.current && d.current?.click();
1832
1902
  })
1833
1903
  }
1834
1904
  )
@@ -1836,447 +1906,420 @@ 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, ...o } = e, s = Et(n);
1912
+ return /* @__PURE__ */ l(xt, { ...s, ...o, 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
+ }, o) => {
1926
+ const { __scopeRadioGroup: s, className: r, ...c } = D(
1927
+ n,
1928
+ J
1929
+ ), a = Bt(s);
1930
+ return /* @__PURE__ */ l(ts, { scope: s, 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: o,
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: o, className: s, style: r, ...c } = e, { size: a } = At("RadioGroupItem", n);
1945
+ return o ? /* @__PURE__ */ S(
1946
+ we,
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", s),
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
+ o && /* @__PURE__ */ l("span", { className: "bd-RadioGroupItemInner", children: o })
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: s,
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 o = At("RadioGroupItemRadio", e), s = Bt(e), { className: r } = D({ ...t, ...o }, J);
1979
+ return /* @__PURE__ */ l(
1980
+ _t,
1911
1981
  {
1912
- ...n,
1982
+ ...s,
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: o, onScroll: s, 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 (s && s(d), r) {
2001
+ const { scrollTop: f, scrollHeight: p, clientHeight: C } = d.currentTarget;
2002
+ p - f <= C + 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: { ...o, 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
+ ...O
2017
+ }, rs = {
2018
+ gap: Re.gap,
2019
+ px: L.px,
2020
+ pl: L.pl,
2021
+ pr: L.pr
2022
+ }, as = {
2023
+ ...ss,
2024
+ ...rs
2025
+ }, ee = "SelectBox", [cs] = A(ee), [is, re] = cs(ee), Gt = ({
1983
2026
  __scopeSelect: e,
1984
2027
  value: t,
1985
- defaultValue: o,
1986
- onValueChange: r,
1987
- open: n,
1988
- defaultOpen: s,
1989
- onOpenChange: a,
1990
- variant: c = "classic",
1991
- children: l
2028
+ defaultValue: n,
2029
+ onValueChange: o,
2030
+ open: s,
2031
+ defaultOpen: r,
2032
+ onOpenChange: c,
2033
+ variant: a = "classic",
2034
+ children: u
1992
2035
  }) => {
1993
- const [d, p] = A({
2036
+ const [d, f] = _({
1994
2037
  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,
2038
+ defaultProp: n ?? "",
2039
+ onChange: o,
2040
+ caller: ee
2041
+ }), [p, C] = _({
2042
+ prop: s,
2043
+ defaultProp: r ?? !1,
2044
+ onChange: c,
2045
+ caller: `${ee}.Open`
2046
+ }), h = i.useRef(null), b = ze();
2047
+ return /* @__PURE__ */ l(
2048
+ is,
2006
2049
  {
2007
2050
  scope: e,
2008
2051
  value: d,
2009
- onValueChange: p,
2010
- open: f,
2011
- onOpenChange: b,
2012
- triggerRef: m,
2013
- contentId: v,
2014
- variant: c,
2015
- children: l
2052
+ onValueChange: f,
2053
+ open: p,
2054
+ onOpenChange: C,
2055
+ triggerRef: h,
2056
+ contentId: b,
2057
+ variant: a,
2058
+ children: u
2016
2059
  }
2017
2060
  );
2018
- }, At = "SelectBoxTrigger", Se = i.forwardRef(
2061
+ }, Vt = "SelectBoxTrigger", De = i.forwardRef(
2019
2062
  (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,
2063
+ const { __scopeSelect: n, children: o, onClick: s, onKeyDown: r, ...c } = e, a = re(Vt, n), u = E(t, a.triggerRef), { className: d, style: f, ...p } = D(c, as), C = !a.value || a.value === "";
2064
+ return /* @__PURE__ */ l(
2065
+ k.button,
2023
2066
  {
2024
2067
  type: "button",
2025
2068
  role: "combobox",
2026
- "aria-expanded": c.open,
2027
- "data-placeholder": b ? "" : void 0,
2069
+ "aria-expanded": a.open,
2070
+ "data-placeholder": C ? "" : void 0,
2028
2071
  className: `bd-SelectBoxTrigger ${d || ""}`,
2029
- style: p,
2030
- ...f,
2031
- ref: l,
2032
- onClick: (m) => {
2033
- c.onOpenChange(!c.open), n?.(m);
2072
+ style: f,
2073
+ ...p,
2074
+ ref: u,
2075
+ onClick: (h) => {
2076
+ a.onOpenChange(!a.open), s?.(h);
2034
2077
  },
2035
- onKeyDown: (m) => {
2036
- !c.open && (m.key === "ArrowDown" || m.key === "Enter" || m.key === " ") && (m.preventDefault(), c.onOpenChange(!0)), s?.(m);
2078
+ onKeyDown: (h) => {
2079
+ !a.open && (h.key === "ArrowDown" || h.key === "Enter" || h.key === " ") && (h.preventDefault(), a.onOpenChange(!0)), r?.(h);
2037
2080
  },
2038
- children: r
2081
+ children: o
2039
2082
  }
2040
2083
  );
2041
2084
  }
2042
2085
  );
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);
2086
+ De.displayName = Vt;
2087
+ const $t = "SelectBoxContent", Te = i.forwardRef(({ __scopeSelect: e, children: t, className: n, style: o, onKeyDown: s, ...r }, c) => {
2088
+ const a = re($t, e), u = i.useRef(null), d = E(c, u);
2089
+ He(u, (v) => {
2090
+ a.triggerRef.current?.contains(v.target) || a.open && a.onOpenChange(!1);
2048
2091
  });
2049
- const p = c.variant === "rounded" ? 8 : 0, { styles: f, isPositioned: b } = lo(
2050
- c.triggerRef,
2051
- l,
2052
- c.open,
2053
- p
2092
+ const f = a.variant === "rounded" ? 8 : 0, { styles: p, isPositioned: C } = Ue(
2093
+ a.triggerRef,
2094
+ u,
2095
+ a.open,
2096
+ f
2054
2097
  );
2055
2098
  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();
2099
+ a.open && u.current && requestAnimationFrame(() => {
2100
+ if (!u.current) return;
2101
+ const v = Array.from(
2102
+ u.current.querySelectorAll('[role="option"]')
2103
+ ), g = v.find((m) => m.getAttribute("aria-selected") === "true");
2104
+ g ? g.focus() : v.length > 0 && v[0].focus();
2062
2105
  });
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) {
2106
+ }, [a.open]);
2107
+ const h = (v) => {
2108
+ const g = Array.from(
2109
+ u.current?.querySelectorAll('[role="option"]') || []
2110
+ ), m = g.indexOf(document.activeElement);
2111
+ switch (v.key) {
2069
2112
  case "ArrowDown": {
2070
- g.preventDefault();
2071
- const C = y < h.length - 1 ? y + 1 : 0;
2072
- h[C]?.focus();
2113
+ v.preventDefault();
2114
+ const y = m < g.length - 1 ? m + 1 : 0;
2115
+ g[y]?.focus();
2073
2116
  break;
2074
2117
  }
2075
2118
  case "ArrowUp": {
2076
- g.preventDefault();
2077
- const C = y > 0 ? y - 1 : h.length - 1;
2078
- h[C]?.focus();
2119
+ v.preventDefault();
2120
+ const y = m > 0 ? m - 1 : g.length - 1;
2121
+ g[y]?.focus();
2079
2122
  break;
2080
2123
  }
2081
2124
  case "Enter":
2082
2125
  case " ":
2083
- g.preventDefault(), document.activeElement?.click();
2126
+ v.preventDefault(), document.activeElement?.click();
2084
2127
  break;
2085
2128
  case "Escape":
2086
- g.preventDefault(), c.onOpenChange(!1), c.triggerRef.current?.focus();
2129
+ v.preventDefault(), a.onOpenChange(!1), a.triggerRef.current?.focus();
2087
2130
  break;
2088
2131
  case "Tab":
2089
- c.onOpenChange(!1);
2132
+ a.onOpenChange(!1);
2090
2133
  break;
2091
2134
  }
2092
- n?.(g);
2135
+ s?.(v);
2093
2136
  };
2094
- if (!c.open) return null;
2095
- const v = /* @__PURE__ */ u(
2096
- S.div,
2137
+ if (!a.open) return null;
2138
+ const b = /* @__PURE__ */ l(
2139
+ k.div,
2097
2140
  {
2098
- id: c.contentId,
2141
+ id: a.contentId,
2099
2142
  role: "listbox",
2100
2143
  tabIndex: -1,
2101
- onKeyDown: m,
2102
- className: `bd-SelectBoxContent bd-variant-${c.variant} ${o || ""}`,
2103
- ...s,
2144
+ onKeyDown: h,
2145
+ className: `bd-SelectBoxContent bd-variant-${a.variant} ${n || ""}`,
2146
+ ...r,
2104
2147
  ref: d,
2105
2148
  style: {
2106
- ...f,
2107
- ...r,
2108
- transition: b ? "opacity 0.2s ease, transform 0.2s ease" : "none",
2149
+ ...p,
2150
+ ...o,
2151
+ transition: C ? "opacity 0.2s ease, transform 0.2s ease" : "none",
2109
2152
  overflow: "hidden"
2110
2153
  },
2111
2154
  children: t
2112
2155
  }
2113
2156
  );
2114
- return /* @__PURE__ */ u(Jn, { children: v });
2157
+ return /* @__PURE__ */ l(Ye, { children: b });
2115
2158
  });
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,
2159
+ Te.displayName = $t;
2160
+ const Lt = "SelectBoxItem", _e = i.forwardRef(
2161
+ ({ __scopeSelect: e, value: t, onClick: n, className: o, children: s, ...r }, c) => {
2162
+ const a = re(Lt, e), u = a.value === t;
2163
+ return /* @__PURE__ */ l(
2164
+ k.div,
2122
2165
  {
2123
2166
  role: "option",
2124
2167
  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,
2168
+ "aria-selected": u,
2169
+ "data-state": u ? "checked" : "unchecked",
2170
+ className: `bd-SelectBoxItem bd-variant-${a.variant} ${o || ""}`,
2171
+ ...r,
2172
+ ref: c,
2130
2173
  onClick: (d) => {
2131
- const p = typeof n == "string" ? n : t;
2132
- c.onValueChange(p), c.onOpenChange(!1), c.triggerRef.current?.focus(), o?.(d);
2174
+ const f = typeof s == "string" ? s : t;
2175
+ a.onValueChange(f), a.onOpenChange(!1), a.triggerRef.current?.focus(), n?.(d);
2133
2176
  },
2134
- children: n
2177
+ children: s
2135
2178
  }
2136
2179
  );
2137
2180
  }
2138
2181
  );
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 });
2182
+ _e.displayName = Lt;
2183
+ const zt = "SelectBoxValue", Be = i.forwardRef(
2184
+ ({ __scopeSelect: e, className: t, children: n, placeholder: o, ...s }, r) => {
2185
+ const c = re(zt, e), a = c.value ? c.value : n || o;
2186
+ return /* @__PURE__ */ l(k.span, { className: `bd-SelectBoxValue ${t || ""}`, ...s, ref: r, children: a });
2144
2187
  }
2145
2188
  );
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,
2189
+ Be.displayName = zt;
2190
+ const ls = "SelectBoxSlot", Ae = i.forwardRef(
2191
+ ({ __scopeSelect: e, className: t, side: n = "right", "data-chevron": o, children: s, ...r }, c) => /* @__PURE__ */ l(
2192
+ k.div,
2150
2193
  {
2151
2194
  "aria-hidden": "true",
2152
- "data-side": o,
2153
- "data-chevron": r ? "true" : void 0,
2195
+ "data-side": n,
2196
+ "data-chevron": o ? "true" : void 0,
2154
2197
  className: `bd-SelectBoxSlot ${t || ""}`,
2155
- ...s,
2156
- ref: a,
2157
- children: n || /* @__PURE__ */ u(Qn, {})
2198
+ ...r,
2199
+ ref: c,
2200
+ children: s || /* @__PURE__ */ l(xo, {})
2158
2201
  }
2159
2202
  )
2160
2203
  );
2161
- Ee.displayName = os;
2162
- const ns = ({
2204
+ Ae.displayName = ls;
2205
+ const us = ({
2163
2206
  options: e,
2164
2207
  placeholder: t = "선택하세요",
2165
- size: o = "2",
2166
- variant: r = "classic",
2167
- disabled: n = !1,
2168
- maxHeight: s,
2169
- 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 })
2208
+ size: n = "2",
2209
+ variant: o = "classic",
2210
+ disabled: s = !1,
2211
+ maxHeight: r,
2212
+ onScrollBottom: c,
2213
+ ...a
2214
+ }) => /* @__PURE__ */ S(Gt, { ...a, variant: o, children: [
2215
+ /* @__PURE__ */ S(De, { size: n, variant: o, disabled: s, children: [
2216
+ /* @__PURE__ */ l(Be, { placeholder: t }),
2217
+ /* @__PURE__ */ l(Ae, { "data-chevron": !0 })
2175
2218
  ] }),
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(
2219
+ /* @__PURE__ */ l(Te, { children: /* @__PURE__ */ l(Ft, { maxHeight: r, onScrollBottom: c, children: e.map((u) => /* @__PURE__ */ l(_e, { value: u.value, children: u.label }, u.value)) }) })
2220
+ ] }), $s = Object.assign(us, {
2221
+ Root: Gt,
2222
+ Trigger: De,
2223
+ Content: Te,
2224
+ Item: _e,
2225
+ Value: Be,
2226
+ Slot: Ae
2227
+ }), ae = "Switch", [ds] = A(ae), [ps, fs] = ds(ae), Ut = i.forwardRef(
2185
2228
  (e, t) => {
2186
2229
  const {
2187
- __scopeSwitch: o,
2188
- name: r,
2189
- checked: n,
2190
- defaultChecked: s,
2191
- required: a,
2192
- disabled: c,
2193
- value: l = "on",
2230
+ __scopeSwitch: n,
2231
+ name: o,
2232
+ checked: s,
2233
+ defaultChecked: r,
2234
+ required: c,
2235
+ disabled: a,
2236
+ value: u = "on",
2194
2237
  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,
2238
+ form: f,
2239
+ ...p
2240
+ } = e, [C, h] = i.useState(null), b = E(t, (w) => h(w)), v = i.useRef(!1), g = C ? f || !!C.closest("form") : !0, [m, y] = _({
2241
+ prop: s,
2242
+ defaultProp: r ?? !1,
2200
2243
  onChange: d,
2201
- caller: ne
2244
+ caller: ae
2202
2245
  });
2203
- return /* @__PURE__ */ _(rs, { scope: o, checked: y, disabled: c, children: [
2204
- /* @__PURE__ */ u(
2205
- S.button,
2246
+ return /* @__PURE__ */ S(ps, { scope: n, checked: m, disabled: a, children: [
2247
+ /* @__PURE__ */ l(
2248
+ k.button,
2206
2249
  {
2207
2250
  type: "button",
2208
2251
  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());
2252
+ "aria-checked": m,
2253
+ "aria-required": c,
2254
+ "data-state": qt(m),
2255
+ "data-disabled": a ? "" : void 0,
2256
+ disabled: a,
2257
+ value: u,
2258
+ ...p,
2259
+ ref: b,
2260
+ onClick: B(e.onClick, (w) => {
2261
+ y((R) => !R), g && (v.current = w.isPropagationStopped(), v.current || w.stopPropagation());
2219
2262
  })
2220
2263
  }
2221
2264
  ),
2222
- h && /* @__PURE__ */ u(
2223
- $t,
2265
+ g && /* @__PURE__ */ l(
2266
+ jt,
2224
2267
  {
2225
- control: b,
2226
- bubbles: !g.current,
2227
- name: r,
2228
- value: l,
2229
- checked: y,
2230
- required: a,
2231
- disabled: c,
2232
- form: p,
2268
+ control: C,
2269
+ bubbles: !v.current,
2270
+ name: o,
2271
+ value: u,
2272
+ checked: m,
2273
+ required: c,
2274
+ disabled: a,
2275
+ form: f,
2233
2276
  style: { transform: "translateX(-100%)" }
2234
2277
  }
2235
2278
  )
2236
2279
  ] });
2237
2280
  }
2238
2281
  );
2239
- Gt.displayName = ne;
2240
- const Mt = "SwitchThumb", Ft = i.forwardRef(
2282
+ Ut.displayName = ae;
2283
+ const Ht = "SwitchThumb", Yt = i.forwardRef(
2241
2284
  (e, t) => {
2242
- const { __scopeSwitch: o, ...r } = e, n = cs(Mt, o);
2243
- return /* @__PURE__ */ u(
2244
- S.span,
2285
+ const { __scopeSwitch: n, ...o } = e, s = fs(Ht, n);
2286
+ return /* @__PURE__ */ l(
2287
+ k.span,
2245
2288
  {
2246
- "data-state": Vt(n.checked),
2247
- "data-disabled": n.disabled ? "" : void 0,
2248
- ...r,
2289
+ "data-state": qt(s.checked),
2290
+ "data-disabled": s.disabled ? "" : void 0,
2291
+ ...o,
2249
2292
  ref: t
2250
2293
  }
2251
2294
  );
2252
2295
  }
2253
2296
  );
2254
- Ft.displayName = Mt;
2255
- const as = "SwitchBubbleInput", $t = i.forwardRef(
2297
+ Yt.displayName = Ht;
2298
+ const ms = "SwitchBubbleInput", jt = i.forwardRef(
2256
2299
  (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);
2300
+ const { checked: n, control: o, bubbles: s = !0, ...r } = e, c = i.useRef(null), a = E(c, t), u = Ce(n), d = ve(o);
2258
2301
  return i.useEffect(() => {
2259
- const p = a.current;
2260
- if (!p) return;
2261
- const f = window.HTMLInputElement.prototype, m = Object.getOwnPropertyDescriptor(
2262
- f,
2302
+ const f = c.current;
2303
+ if (!f) return;
2304
+ const p = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(
2305
+ p,
2263
2306
  "checked"
2264
2307
  ).set;
2265
- if (l !== o && m) {
2266
- const v = new Event("click", { bubbles: n });
2267
- m.call(p, o), p.dispatchEvent(v);
2308
+ if (u !== n && h) {
2309
+ const b = new Event("click", { bubbles: s });
2310
+ h.call(f, n), f.dispatchEvent(b);
2268
2311
  }
2269
- }, [l, o, n]), /* @__PURE__ */ u(
2312
+ }, [u, n, s]), /* @__PURE__ */ l(
2270
2313
  "input",
2271
2314
  {
2272
2315
  type: "checkbox",
2273
2316
  "aria-hidden": !0,
2274
- defaultChecked: o,
2275
- ...s,
2317
+ defaultChecked: n,
2318
+ ...r,
2276
2319
  tabIndex: -1,
2277
- ref: c,
2320
+ ref: a,
2278
2321
  style: {
2279
- ...s.style,
2322
+ ...r.style,
2280
2323
  ...d,
2281
2324
  position: "absolute",
2282
2325
  pointerEvents: "none",
@@ -2287,112 +2330,403 @@ const as = "SwitchBubbleInput", $t = i.forwardRef(
2287
2330
  );
2288
2331
  }
2289
2332
  );
2290
- $t.displayName = as;
2291
- function Vt(e) {
2333
+ jt.displayName = ms;
2334
+ function qt(e) {
2292
2335
  return e ? "checked" : "unchecked";
2293
2336
  }
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,
2337
+ const hs = ["1", "2", "3"], gs = {
2338
+ size: { type: "enum", className: "bd-size", values: hs, default: "2" },
2339
+ ...O
2340
+ }, bs = i.forwardRef((e, t) => {
2341
+ const { className: n, ...o } = D(e, gs);
2342
+ return /* @__PURE__ */ l(
2343
+ Ut,
2301
2344
  {
2302
- ...r,
2345
+ ...o,
2303
2346
  asChild: !1,
2304
2347
  ref: t,
2305
- className: x("bd-reset", "bd-SwitchRoot", o),
2306
- children: /* @__PURE__ */ u(Ft, { className: x("bd-SwitchThumb") })
2348
+ className: N("bd-reset", "bd-SwitchRoot", n),
2349
+ children: /* @__PURE__ */ l(Yt, { className: N("bd-SwitchThumb") })
2307
2350
  }
2308
2351
  );
2309
2352
  });
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(
2353
+ bs.displayName = "Switch";
2354
+ const Cs = ["1", "2", "3", "4", "5"], vs = ["classic", "underlined", "rounded"], ys = {
2355
+ size: { type: "enum", className: "bd-size", values: Cs, default: "2" },
2356
+ variant: { type: "enum", className: "bd-variant", values: vs, default: "classic" },
2357
+ ...O,
2358
+ ...$n
2359
+ }, ws = ["left", "right"], Rs = {
2360
+ side: { type: "enum", values: ws },
2361
+ gap: Re.gap,
2362
+ px: L.px,
2363
+ pl: L.pl,
2364
+ pr: L.pr
2365
+ }, Kt = i.forwardRef(
2323
2366
  (e, t) => {
2324
- const o = i.useRef(null), { children: r, className: n, style: s, ...a } = I(
2367
+ const n = i.useRef(null), { children: o, className: s, style: r, ...c } = D(
2325
2368
  e,
2326
- fs
2369
+ ys
2327
2370
  );
2328
- return /* @__PURE__ */ _(
2371
+ return /* @__PURE__ */ S(
2329
2372
  "div",
2330
2373
  {
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;
2374
+ style: r,
2375
+ className: N("bd-TextFieldRoot", s),
2376
+ onPointerDown: (a) => {
2377
+ const u = a.target;
2378
+ if (u.closest("input, button, a")) return;
2379
+ const d = n.current;
2337
2380
  if (!d) return;
2338
- const f = l.closest(`
2381
+ const p = u.closest(`
2339
2382
  .bd-TextFieldSlot[data-side='right'],
2340
2383
  .bd-TextFieldSlot:not([data-side='right']) ~ .bd-TextFieldSlot:not([data-side='left'])
2341
2384
  `) ? d.value.length : 0;
2342
2385
  requestAnimationFrame(() => {
2343
2386
  try {
2344
- d.setSelectionRange(f, f);
2387
+ d.setSelectionRange(p, p);
2345
2388
  } catch {
2346
2389
  }
2347
2390
  d.focus();
2348
2391
  });
2349
2392
  },
2350
2393
  children: [
2351
- /* @__PURE__ */ u(
2394
+ /* @__PURE__ */ l(
2352
2395
  "input",
2353
2396
  {
2354
2397
  spellCheck: "false",
2355
- ...a,
2356
- ref: fe(o, t),
2398
+ ...c,
2399
+ ref: q(n, t),
2357
2400
  className: "bd-reset bd-TextFieldInput"
2358
2401
  }
2359
2402
  ),
2360
- r
2403
+ o
2361
2404
  ]
2362
2405
  }
2363
2406
  );
2364
2407
  }
2365
2408
  );
2366
- Lt.displayName = "TextFieldRoot";
2367
- const zt = i.forwardRef(
2409
+ Kt.displayName = "TextFieldRoot";
2410
+ const Wt = i.forwardRef(
2368
2411
  (e, t) => {
2369
- const { className: o, side: r, ...n } = I(e, hs);
2370
- return /* @__PURE__ */ u(
2412
+ const { className: n, side: o, ...s } = D(e, Rs);
2413
+ return /* @__PURE__ */ l(
2371
2414
  "div",
2372
2415
  {
2373
- "data-side": r,
2374
- ...n,
2416
+ "data-side": o,
2417
+ ...s,
2375
2418
  ref: t,
2376
- className: x("bd-TextFieldSlot", o)
2419
+ className: N("bd-TextFieldSlot", n)
2420
+ }
2421
+ );
2422
+ }
2423
+ );
2424
+ Wt.displayName = "TextFieldSlot";
2425
+ 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 = () => {
2426
+ const e = /* @__PURE__ */ new Date();
2427
+ return e.setHours(0, 0, 0, 0), e;
2428
+ }, Xt = "Calendar", [Ss] = A(Xt), [ks, F] = Ss(Xt), Ps = (e) => {
2429
+ const { variant: t = "single", size: n = "2", children: o } = e, s = i.useRef(null), [r, c] = _({
2430
+ prop: e.open,
2431
+ defaultProp: e.defaultOpen || !1,
2432
+ onChange: e.onOpenChange,
2433
+ caller: "CalendarRoot"
2434
+ }), [a, u] = _({
2435
+ prop: e.value,
2436
+ defaultProp: e.defaultValue ?? null,
2437
+ onChange: e.onValueChange,
2438
+ caller: "CalendarRoot (single)"
2439
+ }), [d, f] = _({
2440
+ prop: e.rangeValue,
2441
+ defaultProp: e.defaultRangeValue ?? { start: null, end: null },
2442
+ onChange: e.onRangeValueChange,
2443
+ caller: "CalendarRoot (range)"
2444
+ }), [p, C] = i.useState("date"), [h, b] = i.useState(
2445
+ a || d.start || j()
2446
+ );
2447
+ i.useEffect(() => {
2448
+ t === "single" && a && !isNaN(a.getTime()) ? b(a) : t === "range" && d.start && !isNaN(d.start.getTime()) && b(d.start);
2449
+ }, [d.start, a, t]);
2450
+ const v = i.useRef(a), g = i.useRef(d);
2451
+ i.useEffect(() => {
2452
+ r && (v.current = a, g.current = d);
2453
+ }, [r, a, d]);
2454
+ const m = i.useCallback(() => {
2455
+ t === "single" && !a ? u(j()) : t === "range" && !d.start && f((R) => ({ ...R, start: j() })), c(!1);
2456
+ }, [t, a, d.start, u, f, c]), y = i.useCallback(() => {
2457
+ t === "single" ? u(v.current) : f(g.current), c(!1);
2458
+ }, [t, u, f, c]);
2459
+ return /* @__PURE__ */ l(
2460
+ ks,
2461
+ {
2462
+ scope: void 0,
2463
+ open: r,
2464
+ setOpen: (R) => {
2465
+ c(R), R || C("date");
2466
+ },
2467
+ triggerRef: s,
2468
+ variant: t,
2469
+ size: n,
2470
+ viewMode: p,
2471
+ setViewMode: C,
2472
+ viewingDate: h,
2473
+ setViewingDate: b,
2474
+ singleDate: a || j(),
2475
+ setSingleDate: u,
2476
+ startDate: d.start || j(),
2477
+ setStartDate: (R) => f((T) => ({ ...T, start: R })),
2478
+ endDate: d.end,
2479
+ setEndDate: (R) => f((T) => ({ ...T, end: R })),
2480
+ resetRange: () => f({ start: null, end: null }),
2481
+ onConfirm: m,
2482
+ onCancel: y,
2483
+ children: o
2484
+ }
2485
+ );
2486
+ }, Zt = i.forwardRef(
2487
+ ({ children: e }, t) => {
2488
+ const n = F("CalendarTrigger", void 0), o = Le(e), s = be(o);
2489
+ return i.cloneElement(o, {
2490
+ ref: q(t, n.triggerRef, s),
2491
+ onFocus: (r) => {
2492
+ n.setOpen(!0), o.props.onFocus?.(r);
2493
+ },
2494
+ onClick: (r) => {
2495
+ n.setOpen(!0), o.props.onClick?.(r);
2377
2496
  }
2497
+ });
2498
+ }
2499
+ );
2500
+ Zt.displayName = "CalendarTrigger";
2501
+ const Jt = i.forwardRef(
2502
+ (e, t) => {
2503
+ const { className: n, style: o, ...s } = e, r = F("CalendarContent", void 0), c = i.useRef(null), { styles: a, isPositioned: u } = Ue(
2504
+ r.triggerRef,
2505
+ c,
2506
+ r.open,
2507
+ 8,
2508
+ "start",
2509
+ !1
2378
2510
  );
2511
+ if (He(c, (p) => {
2512
+ r.triggerRef.current?.contains(p.target) || r.setOpen(!1);
2513
+ }), !r.open) return null;
2514
+ const d = () => {
2515
+ r.onConfirm();
2516
+ }, f = () => {
2517
+ r.onCancel();
2518
+ };
2519
+ return /* @__PURE__ */ l(Ye, { children: /* @__PURE__ */ S(
2520
+ I,
2521
+ {
2522
+ direction: "column",
2523
+ gap: "4",
2524
+ ...s,
2525
+ ref: q(c, t),
2526
+ className: N(
2527
+ "bd-CalendarContent",
2528
+ `bd-size-${r.size}`,
2529
+ `bd-variant-${r.variant}`,
2530
+ n
2531
+ ),
2532
+ style: { ...o, ...a, visibility: u ? "visible" : "hidden" },
2533
+ onPointerDown: (p) => {
2534
+ p.preventDefault();
2535
+ },
2536
+ children: [
2537
+ r.variant === "range" && /* @__PURE__ */ l(Is, {}),
2538
+ /* @__PURE__ */ l(Es, {}),
2539
+ /* @__PURE__ */ l(Ds, {}),
2540
+ /* @__PURE__ */ S(I, { justify: "center", gap: "2", children: [
2541
+ /* @__PURE__ */ l(
2542
+ me,
2543
+ {
2544
+ size: "3",
2545
+ variant: "outline-primary",
2546
+ radius: "s",
2547
+ onClick: f,
2548
+ style: { width: "50%" },
2549
+ children: "취소"
2550
+ }
2551
+ ),
2552
+ /* @__PURE__ */ l(me, { size: "3", radius: "s", onClick: d, style: { width: "50%" }, children: "확인" })
2553
+ ] })
2554
+ ]
2555
+ }
2556
+ ) });
2379
2557
  }
2380
2558
  );
2381
- zt.displayName = "TextFieldSlot";
2382
- const ws = Object.assign(Lt, { Slot: zt });
2559
+ Jt.displayName = "CalendarContent";
2560
+ const Is = () => {
2561
+ 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(I, { align: "center", gap: "1", children: [
2562
+ /* @__PURE__ */ l(Ne, { width: 12, height: 12 }),
2563
+ "범위 추가"
2564
+ ] });
2565
+ return /* @__PURE__ */ S(I, { direction: "column", className: "bd-CalendarRangeHeader", children: [
2566
+ /* @__PURE__ */ S(I, { gap: "2", children: [
2567
+ /* @__PURE__ */ l(
2568
+ I,
2569
+ {
2570
+ align: "center",
2571
+ justify: "between",
2572
+ className: N("bd-RangeBox", { active: !e.startDate }),
2573
+ children: t(e.startDate)
2574
+ }
2575
+ ),
2576
+ /* @__PURE__ */ l(
2577
+ I,
2578
+ {
2579
+ align: "center",
2580
+ justify: "between",
2581
+ className: N("bd-RangeBox", {
2582
+ active: e.startDate && !e.endDate,
2583
+ empty: !e.endDate
2584
+ }),
2585
+ children: t(e.endDate)
2586
+ }
2587
+ )
2588
+ ] }),
2589
+ /* @__PURE__ */ l(
2590
+ I,
2591
+ {
2592
+ justify: "end",
2593
+ onClick: () => {
2594
+ e.resetRange();
2595
+ },
2596
+ children: /* @__PURE__ */ l("button", { className: "reset-btn", children: "초기화" })
2597
+ }
2598
+ )
2599
+ ] });
2600
+ }, Es = () => {
2601
+ const e = F("CalendarNavigation", void 0), { viewingDate: t, setViewingDate: n, viewMode: o, setViewMode: s } = e, r = () => {
2602
+ const a = new Date(t);
2603
+ o === "date" ? a.setMonth(a.getMonth() - 1) : o === "year" ? a.setFullYear(a.getFullYear() - 28) : a.setFullYear(a.getFullYear() - 1), n(a);
2604
+ }, c = () => {
2605
+ const a = new Date(t);
2606
+ o === "date" ? a.setMonth(a.getMonth() + 1) : o === "year" ? a.setFullYear(a.getFullYear() + 28) : a.setFullYear(a.getFullYear() + 1), n(a);
2607
+ };
2608
+ return /* @__PURE__ */ S(I, { justify: "between", align: "center", children: [
2609
+ /* @__PURE__ */ S(
2610
+ "div",
2611
+ {
2612
+ className: "bd-CalendarNavTitle bd-weight-medium",
2613
+ onClick: () => s(o === "date" ? "month" : o === "month" ? "year" : "date"),
2614
+ children: [
2615
+ o === "date" && `${t.getFullYear()}년 ${t.getMonth() + 1}월`,
2616
+ o === "month" && `${t.getFullYear()}년`,
2617
+ o === "year" && `${t.getFullYear()}년`
2618
+ ]
2619
+ }
2620
+ ),
2621
+ /* @__PURE__ */ S(I, { gap: "2", children: [
2622
+ /* @__PURE__ */ l("button", { onClick: r, className: "bd-CalendarNavBtn", children: /* @__PURE__ */ l(Ro, { width: 16 }) }),
2623
+ /* @__PURE__ */ l("button", { onClick: c, className: "bd-CalendarNavBtn", children: /* @__PURE__ */ l(No, { width: 16 }) })
2624
+ ] })
2625
+ ] });
2626
+ }, Ds = () => {
2627
+ const e = F("CalendarBody", void 0);
2628
+ return e.viewMode === "year" ? /* @__PURE__ */ l(Bs, {}) : e.viewMode === "month" ? /* @__PURE__ */ l(_s, {}) : /* @__PURE__ */ l(Ts, {});
2629
+ }, Ts = () => {
2630
+ const e = F("DateGrid", void 0), { viewingDate: t, singleDate: n, startDate: o, endDate: s } = e, r = t.getFullYear(), c = t.getMonth(), a = Ns(r, c), u = xs(r, c), d = new Date(r, c, 0).getDate(), f = ["일", "월", "화", "수", "목", "금", "토"], p = [];
2631
+ for (let m = u - 1; m >= 0; m--)
2632
+ p.push({
2633
+ date: new Date(r, c - 1, d - m),
2634
+ isCurrentMonth: !1
2635
+ });
2636
+ for (let m = 1; m <= a; m++)
2637
+ p.push({
2638
+ date: new Date(r, c, m),
2639
+ isCurrentMonth: !0
2640
+ });
2641
+ const C = p.length, h = C % 7 === 0 ? 0 : 7 - C % 7;
2642
+ for (let m = 1; m <= h; m++)
2643
+ p.push({
2644
+ date: new Date(r, c + 1, m),
2645
+ isCurrentMonth: !1
2646
+ });
2647
+ const b = (m) => {
2648
+ m.getMonth() !== c && e.setViewingDate(m), e.variant === "single" ? e.setSingleDate(m) : !o || o && s ? (e.setStartDate(m), e.setEndDate(null)) : m < o ? e.setStartDate(m) : e.setEndDate(m);
2649
+ }, v = (m) => {
2650
+ const y = m.getTime();
2651
+ return e.variant === "single" ? n?.getTime() === y : o?.getTime() === y || s?.getTime() === y;
2652
+ }, g = (m) => {
2653
+ if (e.variant !== "range" || !o || !s) return !1;
2654
+ const y = m.getTime();
2655
+ return y > o.getTime() && y < s.getTime();
2656
+ };
2657
+ return /* @__PURE__ */ S("div", { className: "bd-CalendarGrid bd-DateGrid", children: [
2658
+ f.map((m) => /* @__PURE__ */ l("div", { className: "bd-CalendarWeek", children: m }, m)),
2659
+ p.map((m, y) => /* @__PURE__ */ l(
2660
+ "div",
2661
+ {
2662
+ className: N("bd-CalendarCell", {
2663
+ selected: v(m.date),
2664
+ inRange: g(m.date)
2665
+ }),
2666
+ style: {
2667
+ color: !m.isCurrentMonth && !v(m.date) ? "var(--color-gray-900, #999)" : void 0,
2668
+ opacity: !m.isCurrentMonth && !v(m.date) ? 0.4 : 1
2669
+ },
2670
+ onClick: () => b(m.date),
2671
+ children: m.date.getDate()
2672
+ },
2673
+ y
2674
+ ))
2675
+ ] });
2676
+ }, _s = () => {
2677
+ const e = F("MonthGrid", void 0), t = Array.from({ length: 12 }, (n, o) => o + 1);
2678
+ return /* @__PURE__ */ l("div", { className: "bd-CalendarGrid bd-MonthGrid", children: t.map((n) => /* @__PURE__ */ S(
2679
+ "div",
2680
+ {
2681
+ className: "bd-CalendarCell",
2682
+ onClick: () => {
2683
+ const o = new Date(e.viewingDate);
2684
+ o.setMonth(n - 1), e.setViewingDate(o), e.setViewMode("date");
2685
+ },
2686
+ children: [
2687
+ n,
2688
+ "월"
2689
+ ]
2690
+ },
2691
+ n
2692
+ )) });
2693
+ }, Bs = () => {
2694
+ const e = F("YearGrid", void 0), t = Math.floor(e.viewingDate.getFullYear() / 10) * 10 - 4, n = Array.from({ length: 28 }, (o, s) => t + s);
2695
+ return /* @__PURE__ */ l("div", { className: "bd-CalendarGrid bd-YearGrid", children: n.map((o) => /* @__PURE__ */ l(
2696
+ "div",
2697
+ {
2698
+ className: N("bd-CalendarCell", {
2699
+ selected: o === e.viewingDate.getFullYear()
2700
+ }),
2701
+ onClick: () => {
2702
+ const s = new Date(e.viewingDate);
2703
+ s.setFullYear(o), e.setViewingDate(s), e.setViewMode("month");
2704
+ },
2705
+ children: o
2706
+ },
2707
+ o
2708
+ )) });
2709
+ }, zs = Object.assign(Ps, {
2710
+ Trigger: Zt,
2711
+ Content: Jt
2712
+ });
2383
2713
  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
2714
+ xo as BraketDownIcon,
2715
+ Ro as BraketLeftIcon,
2716
+ No as BraketRightIcon,
2717
+ me as Button,
2718
+ zs as Calendar,
2719
+ Ne as CheckLineIcon,
2720
+ To as Checkbox,
2721
+ Gs as CheckboxGroup,
2722
+ I as Flex,
2723
+ wo as IndeterminateLineIcon,
2724
+ Yo as Radio,
2725
+ Vs as RadioGroup,
2726
+ Ft as ScrollArea,
2727
+ $s as SelectBox,
2728
+ tt as Spinner,
2729
+ bs as Switch,
2730
+ we as Text,
2731
+ Ls as TextField
2398
2732
  };