@beaubrain/web-design-system 0.1.7 → 0.1.9

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