@beaubrain/web-design-system 0.1.2 → 0.1.4

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