barua-ui 0.2.0

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 ADDED
@@ -0,0 +1,2462 @@
1
+ "use client";
2
+
3
+ // src/provider.tsx
4
+ import { createContext as createContext2, useContext as useContext2, useEffect as useEffect2 } from "react";
5
+
6
+ // src/toast.tsx
7
+ import {
8
+ createContext,
9
+ useCallback,
10
+ useContext,
11
+ useEffect,
12
+ useMemo,
13
+ useRef,
14
+ useState
15
+ } from "react";
16
+ import { createPortal } from "react-dom";
17
+
18
+ // src/cn.ts
19
+ function cn(...parts) {
20
+ return parts.filter(Boolean).join(" ");
21
+ }
22
+
23
+ // src/toast.tsx
24
+ import { jsx, jsxs } from "react/jsx-runtime";
25
+ var ToastContext = createContext(null);
26
+ var ICONS = {
27
+ success: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 20 20", fill: "none", children: [
28
+ /* @__PURE__ */ jsx("circle", { cx: "10", cy: "10", r: "8.25", stroke: "currentColor", strokeWidth: "1.5" }),
29
+ /* @__PURE__ */ jsx("path", { d: "m6.5 10.3 2.3 2.3 4.7-5.2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
30
+ ] }),
31
+ danger: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 20 20", fill: "none", children: [
32
+ /* @__PURE__ */ jsx("circle", { cx: "10", cy: "10", r: "8.25", stroke: "currentColor", strokeWidth: "1.5" }),
33
+ /* @__PURE__ */ jsx("path", { d: "M10 6v5m0 3v.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
34
+ ] }),
35
+ warning: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 20 20", fill: "none", children: [
36
+ /* @__PURE__ */ jsx("path", { d: "M10 3.5 18 17H2L10 3.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
37
+ /* @__PURE__ */ jsx("path", { d: "M10 8.5v3.5m0 2.2v.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
38
+ ] }),
39
+ info: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 20 20", fill: "none", children: [
40
+ /* @__PURE__ */ jsx("circle", { cx: "10", cy: "10", r: "8.25", stroke: "currentColor", strokeWidth: "1.5" }),
41
+ /* @__PURE__ */ jsx("path", { d: "M10 9v5m0-8v.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
42
+ ] })
43
+ };
44
+ function useToast() {
45
+ const push = useContext(ToastContext);
46
+ if (!push) throw new Error("useToast must be used within <BaruaProvider>");
47
+ return push;
48
+ }
49
+ function ToastProvider({ children }) {
50
+ const [items, setItems] = useState([]);
51
+ const nextId = useRef(1);
52
+ const dismiss = useCallback((id) => {
53
+ setItems((list) => list.map((t) => t.id === id ? { ...t, leaving: true } : t));
54
+ setTimeout(() => setItems((list) => list.filter((t) => t.id !== id)), 260);
55
+ }, []);
56
+ const push = useCallback(
57
+ (opts) => {
58
+ const id = nextId.current++;
59
+ setItems((list) => [...list, { id, variant: "info", duration: 4e3, ...opts }]);
60
+ const duration = opts.duration ?? 4e3;
61
+ if (duration > 0) setTimeout(() => dismiss(id), duration);
62
+ },
63
+ [dismiss]
64
+ );
65
+ const [container, setContainer] = useState(null);
66
+ useEffect(() => setContainer(document.body), []);
67
+ const region = useMemo(
68
+ () => container === null ? null : createPortal(
69
+ /* @__PURE__ */ jsx("div", { className: "b-toast-region", "aria-live": "polite", children: items.map((t) => /* @__PURE__ */ jsxs(
70
+ "div",
71
+ {
72
+ role: "status",
73
+ className: cn("b-toast", `b-toast--${t.variant}`, t.leaving && "is-leaving"),
74
+ children: [
75
+ /* @__PURE__ */ jsx("span", { className: "b-toast__icon", children: ICONS[t.variant ?? "info"] }),
76
+ /* @__PURE__ */ jsxs("div", { className: "b-toast__content", children: [
77
+ t.title && /* @__PURE__ */ jsx("div", { className: "b-toast__title", children: t.title }),
78
+ t.description && /* @__PURE__ */ jsx("div", { className: "b-toast__desc", children: t.description })
79
+ ] }),
80
+ t.action && /* @__PURE__ */ jsx(
81
+ "button",
82
+ {
83
+ className: "b-toast__action",
84
+ onClick: () => {
85
+ t.action?.onClick();
86
+ dismiss(t.id);
87
+ },
88
+ children: t.action.label
89
+ }
90
+ )
91
+ ]
92
+ },
93
+ t.id
94
+ )) }),
95
+ container
96
+ ),
97
+ [items, dismiss, container]
98
+ );
99
+ return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: push, children: [
100
+ children,
101
+ region
102
+ ] });
103
+ }
104
+
105
+ // src/provider.tsx
106
+ import { jsx as jsx2 } from "react/jsx-runtime";
107
+ var ThemeContext = createContext2(null);
108
+ var MAP_URI = "data:image/svg+xml," + encodeURIComponent(
109
+ '<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256"><defs><linearGradient id="x" x1="0" x2="1" y1="0" y2="0"><stop offset="0" stop-color="#ff0000" stop-opacity="0"/><stop offset="1" stop-color="#ff0000"/></linearGradient><linearGradient id="y" x1="0" x2="0" y1="0" y2="1"><stop offset="0" stop-color="#00ff00" stop-opacity="0"/><stop offset="1" stop-color="#00ff00"/></linearGradient><radialGradient id="c"><stop offset="0" stop-color="#808000"/><stop offset="0.68" stop-color="#808000"/><stop offset="1" stop-color="#808000" stop-opacity="0"/></radialGradient></defs><rect width="256" height="256" fill="#000"/><rect width="256" height="256" fill="url(#x)" style="mix-blend-mode:screen"/><rect width="256" height="256" fill="url(#y)" style="mix-blend-mode:screen"/><rect width="256" height="256" fill="url(#c)"/></svg>'
110
+ );
111
+ function enableRefraction() {
112
+ if (typeof document === "undefined") return;
113
+ if (document.getElementById("b-refract")) {
114
+ document.documentElement.classList.add("b-refract");
115
+ return;
116
+ }
117
+ if (!("chrome" in window) || !CSS.supports("backdrop-filter", "url(#x)")) return;
118
+ const host = document.createElementNS("http://www.w3.org/2000/svg", "svg");
119
+ host.setAttribute("width", "0");
120
+ host.setAttribute("height", "0");
121
+ host.setAttribute("aria-hidden", "true");
122
+ host.style.position = "absolute";
123
+ host.innerHTML = `<filter id="b-refract" x="0" y="0" width="100%" height="100%" color-interpolation-filters="sRGB"><feImage href="${MAP_URI}" preserveAspectRatio="none" result="m"/><feDisplacementMap in="SourceGraphic" in2="m" scale="-32" xChannelSelector="R" yChannelSelector="G"/></filter>`;
124
+ document.body.appendChild(host);
125
+ document.documentElement.classList.add("b-refract");
126
+ }
127
+ function BaruaProvider({
128
+ children,
129
+ theme = "auto",
130
+ accent,
131
+ glass = false,
132
+ refraction = true
133
+ }) {
134
+ useEffect2(() => {
135
+ const root = document.documentElement;
136
+ if (theme === "auto") delete root.dataset.theme;
137
+ else root.dataset.theme = theme;
138
+ if (accent && accent !== "blue") root.dataset.accent = accent;
139
+ else delete root.dataset.accent;
140
+ if (glass) root.dataset.glass = "liquid";
141
+ else delete root.dataset.glass;
142
+ }, [theme, accent, glass]);
143
+ useEffect2(() => {
144
+ if (refraction) enableRefraction();
145
+ else document.documentElement.classList.remove("b-refract");
146
+ }, [refraction]);
147
+ return /* @__PURE__ */ jsx2(ThemeContext.Provider, { value: { theme }, children: /* @__PURE__ */ jsx2(ToastProvider, { children }) });
148
+ }
149
+ function useBaruaTheme() {
150
+ const ctx = useContext2(ThemeContext);
151
+ if (!ctx) throw new Error("useBaruaTheme must be used within <BaruaProvider>");
152
+ return ctx;
153
+ }
154
+ function ThemeScript() {
155
+ const js = 'try{const t=localStorage.getItem("barua-theme");if(t)document.documentElement.dataset.theme=t;if(localStorage.getItem("barua-glass"))document.documentElement.dataset.glass="liquid"}catch(e){}';
156
+ return /* @__PURE__ */ jsx2("script", { dangerouslySetInnerHTML: { __html: js } });
157
+ }
158
+
159
+ // src/actions.tsx
160
+ import { forwardRef } from "react";
161
+ import { jsx as jsx3 } from "react/jsx-runtime";
162
+ function buttonClasses(p, extra) {
163
+ return cn(
164
+ "b-btn",
165
+ p.variant === "liquid" ? "b-btn--primary b-btn--liquid" : p.variant && p.variant !== "default" && `b-btn--${p.variant}`,
166
+ p.size && p.size !== "md" && `b-btn--${p.size}`,
167
+ p.pill && "b-btn--pill",
168
+ p.block && "b-btn--block",
169
+ p.loading && "is-loading",
170
+ p.active && "is-active",
171
+ p.icon && "b-icon-btn",
172
+ extra
173
+ );
174
+ }
175
+ var Button = forwardRef(function Button2({ variant, size, pill, block: block2, loading, icon, active, className, children, ...rest }, ref) {
176
+ return /* @__PURE__ */ jsx3(
177
+ "button",
178
+ {
179
+ ref,
180
+ className: buttonClasses({ variant, size, pill, block: block2, loading, icon, active }, className),
181
+ "aria-busy": loading || void 0,
182
+ ...rest,
183
+ children
184
+ }
185
+ );
186
+ });
187
+ var ButtonLink = forwardRef(function ButtonLink2({ variant, size, pill, block: block2, loading, icon, active, className, children, ...rest }, ref) {
188
+ return /* @__PURE__ */ jsx3(
189
+ "a",
190
+ {
191
+ ref,
192
+ className: buttonClasses({ variant, size, pill, block: block2, loading, icon, active }, className),
193
+ ...rest,
194
+ children
195
+ }
196
+ );
197
+ });
198
+ var Fab = forwardRef(function Fab2({ extended, inline, className, style, children, ...rest }, ref) {
199
+ return /* @__PURE__ */ jsx3(
200
+ "button",
201
+ {
202
+ ref,
203
+ className: cn("b-btn", !extended && "b-icon-btn", "b-fab", extended && "b-fab--extended", className),
204
+ style: inline ? { position: "static", ...style } : style,
205
+ ...rest,
206
+ children
207
+ }
208
+ );
209
+ });
210
+ function Toolbar({
211
+ glass,
212
+ className,
213
+ children,
214
+ ...rest
215
+ }) {
216
+ return /* @__PURE__ */ jsx3("div", { role: "toolbar", className: cn("b-toolbar", glass && "b-toolbar--glass", className), ...rest, children });
217
+ }
218
+
219
+ // src/forms.tsx
220
+ import {
221
+ forwardRef as forwardRef2,
222
+ useId,
223
+ useRef as useRef2
224
+ } from "react";
225
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
226
+ function Field({ label, help, error, required, htmlFor, className, children }) {
227
+ return /* @__PURE__ */ jsxs2("div", { className: cn("b-field", error ? "is-invalid" : void 0, className), children: [
228
+ label && /* @__PURE__ */ jsx4("label", { className: cn("b-label", required && "b-label--required"), htmlFor, children: label }),
229
+ children,
230
+ help && !error && /* @__PURE__ */ jsx4("p", { className: "b-help", children: help }),
231
+ error && /* @__PURE__ */ jsx4("p", { className: "b-error", role: "alert", children: error })
232
+ ] });
233
+ }
234
+ var Input = forwardRef2(function Input2({ filled, density, className, ...rest }, ref) {
235
+ return /* @__PURE__ */ jsx4(
236
+ "input",
237
+ {
238
+ ref,
239
+ className: cn(
240
+ "b-input",
241
+ filled && "b-input--filled",
242
+ density && density !== "md" && `b-input--${density}`,
243
+ className
244
+ ),
245
+ ...rest
246
+ }
247
+ );
248
+ });
249
+ var Textarea = forwardRef2(
250
+ function Textarea2({ className, ...rest }, ref) {
251
+ return /* @__PURE__ */ jsx4("textarea", { ref, className: cn("b-textarea", className), ...rest });
252
+ }
253
+ );
254
+ var Select = forwardRef2(
255
+ function Select2({ className, ...rest }, ref) {
256
+ return /* @__PURE__ */ jsx4("select", { ref, className: cn("b-select", className), ...rest });
257
+ }
258
+ );
259
+ var Checkbox = forwardRef2(function Checkbox2({ label, className, ...rest }, ref) {
260
+ return /* @__PURE__ */ jsxs2("label", { className: cn("b-checkbox", className), children: [
261
+ /* @__PURE__ */ jsx4("input", { ref, type: "checkbox", ...rest }),
262
+ label && /* @__PURE__ */ jsx4("span", { children: label })
263
+ ] });
264
+ });
265
+ var Radio = forwardRef2(function Radio2({ label, className, ...rest }, ref) {
266
+ return /* @__PURE__ */ jsxs2("label", { className: cn("b-radio", className), children: [
267
+ /* @__PURE__ */ jsx4("input", { ref, type: "radio", ...rest }),
268
+ label && /* @__PURE__ */ jsx4("span", { children: label })
269
+ ] });
270
+ });
271
+ var Switch = forwardRef2(function Switch2({ label, small, className, ...rest }, ref) {
272
+ return /* @__PURE__ */ jsxs2("label", { className: cn("b-switch", small && "b-switch--sm", className), children: [
273
+ /* @__PURE__ */ jsx4("input", { ref, type: "checkbox", role: "switch", ...rest }),
274
+ label && /* @__PURE__ */ jsx4("span", { children: label })
275
+ ] });
276
+ });
277
+ var Slider = forwardRef2(
278
+ function Slider2({ className, onInput, ...rest }, ref) {
279
+ return /* @__PURE__ */ jsx4(
280
+ "input",
281
+ {
282
+ ref,
283
+ type: "range",
284
+ className: cn("b-slider", className),
285
+ onInput: (e) => {
286
+ const el = e.currentTarget;
287
+ const min = Number(el.min) || 0;
288
+ const max = Number(el.max) || 100;
289
+ el.style.setProperty("--b-slider-fill", `${(Number(el.value) - min) / (max - min) * 100}%`);
290
+ onInput?.(e);
291
+ },
292
+ ...rest
293
+ }
294
+ );
295
+ }
296
+ );
297
+ function OtpInput({
298
+ length = 6,
299
+ value = "",
300
+ onChange,
301
+ invalid,
302
+ className,
303
+ "aria-label": ariaLabel = "One-time code"
304
+ }) {
305
+ const refs = useRef2([]);
306
+ const id = useId();
307
+ const emit = (chars) => onChange?.(chars.join(""));
308
+ const setChar = (i, ch) => {
309
+ const chars = Array.from({ length }, (_, j) => value[j] ?? "");
310
+ chars[i] = ch;
311
+ emit(chars);
312
+ };
313
+ return /* @__PURE__ */ jsx4("div", { className: cn("b-otp", invalid && "is-invalid", className), role: "group", "aria-label": ariaLabel, children: Array.from({ length }, (_, i) => /* @__PURE__ */ jsx4(
314
+ "input",
315
+ {
316
+ id: `${id}-${i}`,
317
+ ref: (el) => {
318
+ refs.current[i] = el;
319
+ },
320
+ inputMode: "numeric",
321
+ autoComplete: i === 0 ? "one-time-code" : "off",
322
+ maxLength: 1,
323
+ "aria-label": `Digit ${i + 1}`,
324
+ className: value[i] ? "is-filled" : void 0,
325
+ value: value[i] ?? "",
326
+ onChange: (e) => {
327
+ const ch = e.target.value.replace(/\D/g, "").slice(-1);
328
+ setChar(i, ch);
329
+ if (ch) refs.current[i + 1]?.focus();
330
+ },
331
+ onKeyDown: (e) => {
332
+ if (e.key === "Backspace" && !value[i]) refs.current[i - 1]?.focus();
333
+ },
334
+ onPaste: (e) => {
335
+ const digits = e.clipboardData.getData("text").replace(/\D/g, "");
336
+ if (!digits) return;
337
+ e.preventDefault();
338
+ emit(Array.from({ length }, (_2, j) => digits[j] ?? ""));
339
+ refs.current[Math.min(digits.length, length - 1)]?.focus();
340
+ }
341
+ },
342
+ i
343
+ )) });
344
+ }
345
+
346
+ // src/content.tsx
347
+ import { forwardRef as forwardRef3 } from "react";
348
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
349
+ var Card = forwardRef3(function Card2({ variant = "default", interactive, flush, className, ...rest }, ref) {
350
+ return /* @__PURE__ */ jsx5(
351
+ "div",
352
+ {
353
+ ref,
354
+ className: cn(
355
+ "b-card",
356
+ variant !== "default" && `b-card--${variant}`,
357
+ interactive && "b-card--interactive",
358
+ flush && "b-card--flush",
359
+ className
360
+ ),
361
+ ...rest
362
+ }
363
+ );
364
+ });
365
+ var CardHeader = (p) => /* @__PURE__ */ jsx5("div", { ...p, className: cn("b-card__header", p.className) });
366
+ var CardBody = (p) => /* @__PURE__ */ jsx5("div", { ...p, className: cn("b-card__body", p.className) });
367
+ var CardFooter = (p) => /* @__PURE__ */ jsx5("div", { ...p, className: cn("b-card__footer", p.className) });
368
+ var CardTitle = (p) => /* @__PURE__ */ jsx5("div", { ...p, className: cn("b-card__title", p.className) });
369
+ var CardSubtitle = (p) => /* @__PURE__ */ jsx5("div", { ...p, className: cn("b-card__subtitle", p.className) });
370
+ var CardEyebrow = (p) => /* @__PURE__ */ jsx5("div", { ...p, className: cn("b-card__eyebrow", p.className) });
371
+ function StoryCard({
372
+ media,
373
+ eyebrow,
374
+ title,
375
+ subtitle,
376
+ className,
377
+ ...rest
378
+ }) {
379
+ return /* @__PURE__ */ jsxs3("div", { className: cn("b-card b-card--media-overlay", className), ...rest, children: [
380
+ /* @__PURE__ */ jsx5("div", { className: "b-card__media", children: media }),
381
+ /* @__PURE__ */ jsxs3("div", { className: "b-card__overlay", children: [
382
+ eyebrow && /* @__PURE__ */ jsx5("div", { className: "b-card__eyebrow", children: eyebrow }),
383
+ /* @__PURE__ */ jsx5("div", { className: "b-card__title", children: title }),
384
+ subtitle && /* @__PURE__ */ jsx5("div", { className: "b-card__subtitle", children: subtitle })
385
+ ] })
386
+ ] });
387
+ }
388
+ function Badge({ variant = "default", dot, className, ...rest }) {
389
+ return /* @__PURE__ */ jsx5(
390
+ "span",
391
+ {
392
+ className: cn("b-badge", variant !== "default" && `b-badge--${variant}`, dot && "b-badge--dot", className),
393
+ ...rest
394
+ }
395
+ );
396
+ }
397
+ function Tag(p) {
398
+ return /* @__PURE__ */ jsx5("span", { ...p, className: cn("b-tag", p.className) });
399
+ }
400
+ function Chip({ selected, onRemove, className, children, ...rest }) {
401
+ return /* @__PURE__ */ jsxs3("button", { type: "button", className: cn("b-chip", selected && "is-selected", className), "aria-pressed": selected, ...rest, children: [
402
+ children,
403
+ onRemove && /* @__PURE__ */ jsx5(
404
+ "span",
405
+ {
406
+ role: "button",
407
+ "aria-label": "Remove",
408
+ className: "b-chip__remove",
409
+ onClick: (e) => {
410
+ e.stopPropagation();
411
+ onRemove();
412
+ },
413
+ children: "\u2715"
414
+ }
415
+ )
416
+ ] });
417
+ }
418
+ function Avatar({ size = "md", src, alt, online, square, className, children, ...rest }) {
419
+ return /* @__PURE__ */ jsx5(
420
+ "span",
421
+ {
422
+ className: cn(
423
+ "b-avatar",
424
+ size !== "md" && `b-avatar--${size}`,
425
+ online && "b-avatar--online",
426
+ square && "b-avatar--square",
427
+ className
428
+ ),
429
+ ...rest,
430
+ children: src ? /* @__PURE__ */ jsx5("img", { src, alt: alt ?? "" }) : children
431
+ }
432
+ );
433
+ }
434
+ function AvatarGroup(p) {
435
+ return /* @__PURE__ */ jsx5("span", { ...p, className: cn("b-avatar-group", p.className) });
436
+ }
437
+ function IconTile({ color = "accent", small, className, ...rest }) {
438
+ return /* @__PURE__ */ jsx5(
439
+ "span",
440
+ {
441
+ className: cn(
442
+ "b-icon-tile",
443
+ small && "b-icon-tile--sm",
444
+ color !== "accent" && `b-icon-tile--${color}`,
445
+ className
446
+ ),
447
+ ...rest
448
+ }
449
+ );
450
+ }
451
+ function List({ plain, insetDividers, className, ...rest }) {
452
+ return /* @__PURE__ */ jsx5(
453
+ "ul",
454
+ {
455
+ className: cn("b-list", plain && "b-list--plain", insetDividers && "b-list--inset-divider", className),
456
+ ...rest
457
+ }
458
+ );
459
+ }
460
+ function ListItem({
461
+ leading,
462
+ title,
463
+ subtitle,
464
+ trailing,
465
+ chevron,
466
+ interactive,
467
+ selected,
468
+ className,
469
+ children,
470
+ ...rest
471
+ }) {
472
+ return /* @__PURE__ */ jsxs3(
473
+ "li",
474
+ {
475
+ className: cn("b-list-item", interactive && "b-list-item--interactive", selected && "is-selected", className),
476
+ ...rest,
477
+ children: [
478
+ leading && /* @__PURE__ */ jsx5("span", { className: "b-list-item__leading", children: leading }),
479
+ /* @__PURE__ */ jsxs3("span", { className: "b-list-item__content", children: [
480
+ title && /* @__PURE__ */ jsx5("span", { className: "b-list-item__title", children: title }),
481
+ subtitle && /* @__PURE__ */ jsx5("span", { className: "b-list-item__subtitle", children: subtitle }),
482
+ children
483
+ ] }),
484
+ (trailing || chevron) && /* @__PURE__ */ jsxs3("span", { className: "b-list-item__trailing", children: [
485
+ trailing,
486
+ chevron && /* @__PURE__ */ jsx5("span", { className: "b-list-item__chevron", children: "\u203A" })
487
+ ] })
488
+ ]
489
+ }
490
+ );
491
+ }
492
+ function Stat({
493
+ label,
494
+ value,
495
+ delta,
496
+ direction,
497
+ className,
498
+ ...rest
499
+ }) {
500
+ return /* @__PURE__ */ jsxs3("div", { className: cn("b-stat", className), ...rest, children: [
501
+ /* @__PURE__ */ jsx5("span", { className: "b-stat__label", children: label }),
502
+ /* @__PURE__ */ jsx5("span", { className: "b-stat__value", children: value }),
503
+ delta && /* @__PURE__ */ jsx5("span", { className: cn("b-stat__delta", direction === "up" && "is-up", direction === "down" && "is-down"), children: delta })
504
+ ] });
505
+ }
506
+ function EmptyState({
507
+ icon,
508
+ title,
509
+ description,
510
+ action,
511
+ className,
512
+ ...rest
513
+ }) {
514
+ return /* @__PURE__ */ jsxs3("div", { className: cn("b-empty", className), ...rest, children: [
515
+ icon && /* @__PURE__ */ jsx5("span", { className: "b-empty__icon", children: icon }),
516
+ /* @__PURE__ */ jsx5("div", { className: "b-empty__title", children: title }),
517
+ description && /* @__PURE__ */ jsx5("p", { className: "b-empty__desc", children: description }),
518
+ action
519
+ ] });
520
+ }
521
+ function GroupBox({
522
+ label,
523
+ icon,
524
+ className,
525
+ children,
526
+ ...rest
527
+ }) {
528
+ return /* @__PURE__ */ jsxs3("div", { className: cn("b-groupbox", className), ...rest, children: [
529
+ label && /* @__PURE__ */ jsxs3("div", { className: "b-groupbox__label", children: [
530
+ icon,
531
+ label
532
+ ] }),
533
+ children
534
+ ] });
535
+ }
536
+ function Labeled({
537
+ label,
538
+ sublabel,
539
+ className,
540
+ children,
541
+ ...rest
542
+ }) {
543
+ return /* @__PURE__ */ jsxs3("div", { className: cn("b-labeled", className), ...rest, children: [
544
+ /* @__PURE__ */ jsxs3("span", { className: "b-labeled__label", children: [
545
+ label,
546
+ sublabel && /* @__PURE__ */ jsx5("small", { children: sublabel })
547
+ ] }),
548
+ /* @__PURE__ */ jsx5("span", { className: "b-labeled__value", children })
549
+ ] });
550
+ }
551
+ var ListHeader = (p) => /* @__PURE__ */ jsx5("div", { ...p, className: cn("b-list__header", p.className) });
552
+ var ListFooter = (p) => /* @__PURE__ */ jsx5("div", { ...p, className: cn("b-list__footer", p.className) });
553
+
554
+ // src/feedback.tsx
555
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
556
+ function Alert({ variant = "info", title, icon, onClose, className, children, ...rest }) {
557
+ return /* @__PURE__ */ jsxs4(
558
+ "div",
559
+ {
560
+ role: variant === "danger" ? "alert" : "status",
561
+ className: cn("b-alert", variant !== "info" && `b-alert--${variant}`, className),
562
+ ...rest,
563
+ children: [
564
+ icon && /* @__PURE__ */ jsx6("span", { className: "b-alert__icon", children: icon }),
565
+ /* @__PURE__ */ jsxs4("div", { className: "b-alert__content", children: [
566
+ title && /* @__PURE__ */ jsx6("div", { className: "b-alert__title", children: title }),
567
+ children && /* @__PURE__ */ jsx6("div", { className: "b-alert__desc", children })
568
+ ] }),
569
+ onClose && /* @__PURE__ */ jsx6("button", { className: "b-alert__close", "aria-label": "Dismiss", onClick: onClose, children: "\u2715" })
570
+ ]
571
+ }
572
+ );
573
+ }
574
+ function Progress({ value, size = "md", variant = "accent", label, className, ...rest }) {
575
+ const indeterminate = value == null;
576
+ return /* @__PURE__ */ jsx6(
577
+ "div",
578
+ {
579
+ role: "progressbar",
580
+ "aria-label": label,
581
+ "aria-valuenow": indeterminate ? void 0 : Math.round(value),
582
+ "aria-valuemin": 0,
583
+ "aria-valuemax": 100,
584
+ className: cn(
585
+ "b-progress",
586
+ size !== "md" && `b-progress--${size}`,
587
+ variant !== "accent" && `b-progress--${variant}`,
588
+ indeterminate && "b-progress--indeterminate",
589
+ className
590
+ ),
591
+ ...rest,
592
+ children: /* @__PURE__ */ jsx6("div", { className: "b-progress__fill", style: indeterminate ? void 0 : { width: `${value}%` } })
593
+ }
594
+ );
595
+ }
596
+ function Spinner({ size = "md", className, ...rest }) {
597
+ return /* @__PURE__ */ jsx6(
598
+ "span",
599
+ {
600
+ role: "status",
601
+ "aria-label": "Loading",
602
+ className: cn("b-spinner", size !== "md" && `b-spinner--${size}`, className),
603
+ ...rest
604
+ }
605
+ );
606
+ }
607
+ function Skeleton({
608
+ kind = "text",
609
+ className,
610
+ ...rest
611
+ }) {
612
+ return /* @__PURE__ */ jsx6("div", { "aria-hidden": "true", className: cn("b-skeleton", `b-skeleton--${kind}`, className), ...rest });
613
+ }
614
+ function StatusDot({
615
+ state = "neutral",
616
+ pulse,
617
+ className,
618
+ children,
619
+ ...rest
620
+ }) {
621
+ return /* @__PURE__ */ jsx6(
622
+ "span",
623
+ {
624
+ className: cn("b-status", state !== "neutral" && `b-status--${state}`, pulse && "b-status--pulse", className),
625
+ ...rest,
626
+ children
627
+ }
628
+ );
629
+ }
630
+ function Tip({
631
+ icon,
632
+ title,
633
+ description,
634
+ actions,
635
+ onClose,
636
+ className,
637
+ ...rest
638
+ }) {
639
+ return /* @__PURE__ */ jsxs4("div", { className: cn("b-tip", className), ...rest, children: [
640
+ icon && /* @__PURE__ */ jsx6("span", { className: "b-tip__icon", children: icon }),
641
+ /* @__PURE__ */ jsxs4("span", { className: "b-tip__content", children: [
642
+ /* @__PURE__ */ jsx6("span", { className: "b-tip__title", children: title }),
643
+ description && /* @__PURE__ */ jsx6("span", { className: "b-tip__desc", children: description }),
644
+ actions && /* @__PURE__ */ jsx6("span", { className: "b-tip__actions", children: actions })
645
+ ] }),
646
+ onClose && /* @__PURE__ */ jsx6("button", { className: "b-tip__close", "aria-label": "Dismiss tip", onClick: onClose, children: "\u2715" })
647
+ ] });
648
+ }
649
+ function LinearGauge({
650
+ value,
651
+ minLabel,
652
+ maxLabel,
653
+ plain,
654
+ label,
655
+ className,
656
+ ...rest
657
+ }) {
658
+ return /* @__PURE__ */ jsxs4(
659
+ "div",
660
+ {
661
+ role: "meter",
662
+ "aria-label": label,
663
+ "aria-valuenow": Math.round(value),
664
+ "aria-valuemin": 0,
665
+ "aria-valuemax": 100,
666
+ className: cn("b-gauge-linear", className),
667
+ ...rest,
668
+ children: [
669
+ /* @__PURE__ */ jsx6("div", { className: cn("b-gauge-linear__track", plain && "b-gauge-linear__track--plain"), children: /* @__PURE__ */ jsx6("span", { className: "b-gauge-linear__marker", style: { "--v": `${value}%` } }) }),
670
+ (minLabel != null || maxLabel != null) && /* @__PURE__ */ jsxs4("div", { className: "b-gauge-linear__labels", children: [
671
+ /* @__PURE__ */ jsx6("span", { children: minLabel }),
672
+ /* @__PURE__ */ jsx6("span", { children: maxLabel })
673
+ ] })
674
+ ]
675
+ }
676
+ );
677
+ }
678
+
679
+ // src/overlays.tsx
680
+ import { useEffect as useEffect3, useRef as useRef3 } from "react";
681
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
682
+ function useDialog(open) {
683
+ const ref = useRef3(null);
684
+ useEffect3(() => {
685
+ const d = ref.current;
686
+ if (!d) return;
687
+ if (open && !d.open) d.showModal();
688
+ else if (!open && d.open) d.close();
689
+ }, [open]);
690
+ return ref;
691
+ }
692
+ function backdropClose(onClose, dismissable = true) {
693
+ return (e) => {
694
+ if (!dismissable || !onClose) return;
695
+ if (e.target === e.currentTarget) onClose();
696
+ };
697
+ }
698
+ function Modal({
699
+ open,
700
+ onClose,
701
+ dismissable = true,
702
+ title,
703
+ footer,
704
+ size = "md",
705
+ glass,
706
+ className,
707
+ children,
708
+ ...rest
709
+ }) {
710
+ const ref = useDialog(open);
711
+ return /* @__PURE__ */ jsxs5(
712
+ "dialog",
713
+ {
714
+ ref,
715
+ onClose: () => onClose?.(),
716
+ onClick: backdropClose(onClose, dismissable),
717
+ className: cn("b-modal", size !== "md" && `b-modal--${size}`, glass && "b-modal--glass", className),
718
+ ...rest,
719
+ children: [
720
+ title != null && /* @__PURE__ */ jsxs5("header", { className: "b-modal__header", children: [
721
+ /* @__PURE__ */ jsx7("h2", { className: "b-modal__title", children: title }),
722
+ /* @__PURE__ */ jsx7("button", { className: "b-modal__close", "aria-label": "Close", onClick: () => onClose?.(), children: "\u2715" })
723
+ ] }),
724
+ /* @__PURE__ */ jsx7("div", { className: "b-modal__body", children }),
725
+ footer && /* @__PURE__ */ jsx7("footer", { className: "b-modal__footer", children: footer })
726
+ ]
727
+ }
728
+ );
729
+ }
730
+ function AlertDialog({
731
+ open,
732
+ onClose,
733
+ title,
734
+ description,
735
+ actions,
736
+ row,
737
+ className,
738
+ ...rest
739
+ }) {
740
+ const ref = useDialog(open);
741
+ return /* @__PURE__ */ jsxs5(
742
+ "dialog",
743
+ {
744
+ ref,
745
+ onClose: () => onClose?.(),
746
+ className: cn("b-modal b-alert-dialog", className),
747
+ ...rest,
748
+ children: [
749
+ /* @__PURE__ */ jsxs5("div", { className: "b-modal__body", children: [
750
+ /* @__PURE__ */ jsx7("div", { className: "b-alert-dialog__title", children: title }),
751
+ description && /* @__PURE__ */ jsx7("p", { className: "b-alert-dialog__desc", children: description })
752
+ ] }),
753
+ /* @__PURE__ */ jsx7("div", { className: cn("b-alert-dialog__actions", row && "b-alert-dialog__actions--row"), children: actions.map((a, i) => /* @__PURE__ */ jsx7(
754
+ "button",
755
+ {
756
+ className: cn(a.destructive && "is-destructive", a.primary && "is-primary"),
757
+ onClick: a.onClick,
758
+ children: a.label
759
+ },
760
+ i
761
+ )) })
762
+ ]
763
+ }
764
+ );
765
+ }
766
+ function Sheet({
767
+ open,
768
+ onClose,
769
+ dismissable = true,
770
+ title,
771
+ className,
772
+ children,
773
+ ...rest
774
+ }) {
775
+ const ref = useDialog(open);
776
+ return /* @__PURE__ */ jsxs5(
777
+ "dialog",
778
+ {
779
+ ref,
780
+ onClose: () => onClose?.(),
781
+ onClick: backdropClose(onClose, dismissable),
782
+ className: cn("b-sheet", className),
783
+ ...rest,
784
+ children: [
785
+ title != null && /* @__PURE__ */ jsxs5("header", { className: "b-sheet__header", children: [
786
+ /* @__PURE__ */ jsx7("h2", { className: "b-modal__title", children: title }),
787
+ /* @__PURE__ */ jsx7("button", { className: "b-modal__close", "aria-label": "Close", onClick: () => onClose?.(), children: "\u2715" })
788
+ ] }),
789
+ /* @__PURE__ */ jsx7("div", { className: "b-sheet__body", children })
790
+ ]
791
+ }
792
+ );
793
+ }
794
+ function BottomSheet({
795
+ open,
796
+ onClose,
797
+ dismissable = true,
798
+ detent,
799
+ className,
800
+ children,
801
+ ...rest
802
+ }) {
803
+ const ref = useDialog(open);
804
+ return /* @__PURE__ */ jsxs5(
805
+ "dialog",
806
+ {
807
+ ref,
808
+ onClose: () => onClose?.(),
809
+ onClick: backdropClose(onClose, dismissable),
810
+ className: cn("b-bottom-sheet", detent && `b-bottom-sheet--${detent}`, className),
811
+ ...rest,
812
+ children: [
813
+ /* @__PURE__ */ jsx7("div", { className: "b-bottom-sheet__grabber", "aria-hidden": "true" }),
814
+ /* @__PURE__ */ jsx7("div", { className: "b-bottom-sheet__body", children })
815
+ ]
816
+ }
817
+ );
818
+ }
819
+ function Popover({ title, arrow, card, anchored, className, children, ...rest }) {
820
+ return /* @__PURE__ */ jsxs5(
821
+ "div",
822
+ {
823
+ className: cn(
824
+ "b-popover",
825
+ arrow && `b-popover--arrow-${arrow}`,
826
+ card && "b-popover--card",
827
+ anchored && "b-popover--anchored",
828
+ className
829
+ ),
830
+ ...rest,
831
+ children: [
832
+ title && !card && /* @__PURE__ */ jsx7("div", { className: "b-popover__title", children: title }),
833
+ children
834
+ ]
835
+ }
836
+ );
837
+ }
838
+ function Tooltip({
839
+ label,
840
+ below,
841
+ className,
842
+ children,
843
+ ...rest
844
+ }) {
845
+ return /* @__PURE__ */ jsx7(
846
+ "span",
847
+ {
848
+ "data-tooltip": label,
849
+ className: cn("b-tooltip-host", below && "b-tooltip-host--bottom", className),
850
+ ...rest,
851
+ children
852
+ }
853
+ );
854
+ }
855
+ function ActionSheet({
856
+ open,
857
+ onClose,
858
+ title,
859
+ actions,
860
+ cancelLabel = "Cancel",
861
+ className,
862
+ ...rest
863
+ }) {
864
+ const ref = useDialog(open);
865
+ return /* @__PURE__ */ jsxs5("dialog", { ref, onClose: () => onClose?.(), className: cn("b-action-sheet", className), ...rest, children: [
866
+ /* @__PURE__ */ jsxs5("div", { className: "b-action-sheet__group", children: [
867
+ title && /* @__PURE__ */ jsx7("p", { className: "b-action-sheet__title", children: title }),
868
+ actions.map((a, i) => /* @__PURE__ */ jsx7("button", { className: cn(a.destructive && "is-destructive"), onClick: a.onClick, children: a.label }, i))
869
+ ] }),
870
+ /* @__PURE__ */ jsx7("div", { className: "b-action-sheet__group b-action-sheet__cancel", children: /* @__PURE__ */ jsx7("button", { onClick: () => onClose?.(), children: cancelLabel }) })
871
+ ] });
872
+ }
873
+
874
+ // src/nav.tsx
875
+ import { useId as useId2 } from "react";
876
+ import { jsx as jsx8 } from "react/jsx-runtime";
877
+ function Segmented({
878
+ options,
879
+ value,
880
+ onChange,
881
+ block: block2,
882
+ label,
883
+ className,
884
+ ...rest
885
+ }) {
886
+ return /* @__PURE__ */ jsx8(
887
+ "div",
888
+ {
889
+ role: "group",
890
+ "aria-label": label,
891
+ className: cn("b-segmented", block2 && "b-segmented--block", className),
892
+ ...rest,
893
+ children: options.map((o) => /* @__PURE__ */ jsx8(
894
+ "button",
895
+ {
896
+ type: "button",
897
+ className: cn("b-segmented__item", o.value === value && "is-active"),
898
+ "aria-pressed": o.value === value,
899
+ onClick: () => onChange(o.value),
900
+ children: o.label
901
+ },
902
+ o.value
903
+ ))
904
+ }
905
+ );
906
+ }
907
+ function Tabs({
908
+ items,
909
+ value,
910
+ onChange,
911
+ className,
912
+ ...rest
913
+ }) {
914
+ const id = useId2();
915
+ return /* @__PURE__ */ jsx8("div", { role: "tablist", className: cn("b-tabs", className), ...rest, children: items.map((t, i) => /* @__PURE__ */ jsx8(
916
+ "button",
917
+ {
918
+ role: "tab",
919
+ id: `${id}-tab-${t.id}`,
920
+ "aria-selected": t.id === value,
921
+ "aria-controls": `${id}-panel-${t.id}`,
922
+ tabIndex: t.id === value ? 0 : -1,
923
+ className: "b-tab",
924
+ onClick: () => onChange(t.id),
925
+ onKeyDown: (e) => {
926
+ const dir = e.key === "ArrowRight" ? 1 : e.key === "ArrowLeft" ? -1 : 0;
927
+ if (!dir) return;
928
+ e.preventDefault();
929
+ const next = items[(i + dir + items.length) % items.length];
930
+ onChange(next.id);
931
+ },
932
+ children: t.label
933
+ },
934
+ t.id
935
+ )) });
936
+ }
937
+ function TabPanel({
938
+ active,
939
+ className,
940
+ ...rest
941
+ }) {
942
+ return /* @__PURE__ */ jsx8("div", { role: "tabpanel", hidden: !active, className: cn("b-tabpanel", className), ...rest });
943
+ }
944
+ function Breadcrumbs({
945
+ items,
946
+ className,
947
+ ...rest
948
+ }) {
949
+ return /* @__PURE__ */ jsx8("nav", { "aria-label": "Breadcrumb", ...rest, children: /* @__PURE__ */ jsx8("ol", { className: cn("b-breadcrumbs", className), children: items.map((c, i) => {
950
+ const last = i === items.length - 1;
951
+ return /* @__PURE__ */ jsx8("li", { children: c.href && !last ? /* @__PURE__ */ jsx8("a", { href: c.href, children: c.label }) : /* @__PURE__ */ jsx8("span", { "aria-current": last ? "page" : void 0, children: c.label }) }, i);
952
+ }) }) });
953
+ }
954
+
955
+ // src/icon.tsx
956
+ import { forwardRef as forwardRef4 } from "react";
957
+ import { Fragment, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
958
+ var iconNames = [
959
+ "arrow-up-right",
960
+ "backward",
961
+ "bell",
962
+ "bolt",
963
+ "bookmark",
964
+ "calendar",
965
+ "camera",
966
+ "check",
967
+ "chevron-down",
968
+ "chevron-left",
969
+ "chevron-right",
970
+ "chevron-up",
971
+ "clock",
972
+ "close",
973
+ "doc",
974
+ "download",
975
+ "drop",
976
+ "filter",
977
+ "flame",
978
+ "folder",
979
+ "forward",
980
+ "garage",
981
+ "gear",
982
+ "grid",
983
+ "heart",
984
+ "house",
985
+ "info",
986
+ "lightbulb",
987
+ "link",
988
+ "lock",
989
+ "mail",
990
+ "message",
991
+ "mic",
992
+ "moon-stars",
993
+ "music-note",
994
+ "newspaper",
995
+ "pause",
996
+ "pencil",
997
+ "people",
998
+ "person",
999
+ "photo",
1000
+ "pin",
1001
+ "play",
1002
+ "plus",
1003
+ "refresh",
1004
+ "repeat",
1005
+ "search",
1006
+ "send",
1007
+ "share",
1008
+ "shield",
1009
+ "sliders",
1010
+ "sparkles",
1011
+ "speaker",
1012
+ "star",
1013
+ "sun",
1014
+ "trash",
1015
+ "warning",
1016
+ "waveform",
1017
+ "wifi"
1018
+ ];
1019
+ var GLYPHS = {
1020
+ "arrow-up-right": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M6 14 14 6M7.5 6H14v6.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1021
+ "backward": /* @__PURE__ */ jsxs6(Fragment, { children: [
1022
+ /* @__PURE__ */ jsx9("path", { d: "M5.5 4.5v11", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
1023
+ /* @__PURE__ */ jsx9("path", { d: "M15 5.6v8.8a.6.6 0 0 1-.93.5L7.6 10.5a.6.6 0 0 1 0-1l6.47-4.4a.6.6 0 0 1 .93.5Z", fill: "currentColor" })
1024
+ ] }),
1025
+ "bell": /* @__PURE__ */ jsxs6(Fragment, { children: [
1026
+ /* @__PURE__ */ jsx9("path", { d: "M10 3.5A4.5 4.5 0 0 1 14.5 8c0 3 1 4 1.5 4.5H4c.5-.5 1.5-1.5 1.5-4.5A4.5 4.5 0 0 1 10 3.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1027
+ /* @__PURE__ */ jsx9("path", { d: "M8.5 15.5a1.6 1.6 0 0 0 3 0", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1028
+ ] }),
1029
+ "bolt": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M11 3 5 11h4l-1 6 6-8h-4l1-6Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1030
+ "bookmark": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M5.5 5A1.5 1.5 0 0 1 7 3.5h6A1.5 1.5 0 0 1 14.5 5v11.5L10 13l-4.5 3.5V5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1031
+ "calendar": /* @__PURE__ */ jsxs6(Fragment, { children: [
1032
+ /* @__PURE__ */ jsx9("rect", { x: "3.5", y: "4.5", width: "13", height: "12", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
1033
+ /* @__PURE__ */ jsx9("path", { d: "M7 3v3M13 3v3M3.5 8.5h13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1034
+ ] }),
1035
+ "camera": /* @__PURE__ */ jsxs6(Fragment, { children: [
1036
+ /* @__PURE__ */ jsx9("path", { d: "M3.5 7A1.5 1.5 0 0 1 5 5.5h1.5L8 3.5h4l1.5 2H15A1.5 1.5 0 0 1 16.5 7v7a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 14V7Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1037
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "10.5", r: "2.8", stroke: "currentColor", strokeWidth: "1.5" })
1038
+ ] }),
1039
+ "check": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M4 10.5 8.5 15 16 5.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1040
+ "chevron-down": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "m5 8 5 5 5-5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1041
+ "chevron-left": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M12 5l-5 5 5 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1042
+ "chevron-right": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "m8 5 5 5-5 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1043
+ "chevron-up": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "m5 12 5-5 5 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1044
+ "clock": /* @__PURE__ */ jsxs6(Fragment, { children: [
1045
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "10", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
1046
+ /* @__PURE__ */ jsx9("path", { d: "M10 6.5V10l2.5 2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1047
+ ] }),
1048
+ "close": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "m5 5 10 10M15 5 5 15", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
1049
+ "doc": /* @__PURE__ */ jsxs6(Fragment, { children: [
1050
+ /* @__PURE__ */ jsx9("path", { d: "M5.5 3.5h6L15 7v9.5H5.5V3.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1051
+ /* @__PURE__ */ jsx9("path", { d: "M11.5 3.5V7H15M8 10.5h4M8 13h4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1052
+ ] }),
1053
+ "download": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 3.5v9M6.5 9.5l3.5 3 3.5-3M4 16.5h12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1054
+ "drop": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 2.8C7.7 6 5.5 8.6 5.5 11.4a4.5 4.5 0 0 0 9 0c0-2.8-2.2-5.4-4.5-8.6Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1055
+ "filter": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M3.5 5.5h13M6 10h8M8.5 14.5h3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
1056
+ "flame": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 3c-2.5 3-4.5 5.2-4.5 7.4a4.5 4.5 0 0 0 9 0C14.5 8.2 12.5 6 10 3Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1057
+ "folder": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M3.5 5.5A1.5 1.5 0 0 1 5 4h3l1.5 2H15a1.5 1.5 0 0 1 1.5 1.5V14a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 14V5.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1058
+ "forward": /* @__PURE__ */ jsxs6(Fragment, { children: [
1059
+ /* @__PURE__ */ jsx9("path", { d: "M14.5 4.5v11", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
1060
+ /* @__PURE__ */ jsx9("path", { d: "M5 5.6v8.8a.6.6 0 0 0 .93.5l6.47-4.4a.6.6 0 0 0 0-1L5.93 5.1a.6.6 0 0 0-.93.5Z", fill: "currentColor" })
1061
+ ] }),
1062
+ "garage": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M3 9.5 10 4l7 5.5M5 8.5V16h10V8.5M7 11h6M7 13.5h6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1063
+ "gear": /* @__PURE__ */ jsxs6(Fragment, { children: [
1064
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "10", r: "2.5", stroke: "currentColor", strokeWidth: "1.5" }),
1065
+ /* @__PURE__ */ jsx9("path", { d: "M10 2.5v3M10 14.5v3M2.5 10h3M14.5 10h3M4.7 4.7l2.1 2.1M13.2 13.2l2.1 2.1M15.3 4.7l-2.1 2.1M6.8 13.2l-2.1 2.1", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round" })
1066
+ ] }),
1067
+ "grid": /* @__PURE__ */ jsxs6(Fragment, { children: [
1068
+ /* @__PURE__ */ jsx9("rect", { x: "3.5", y: "3.5", width: "5.5", height: "5.5", rx: "1.5", stroke: "currentColor", strokeWidth: "1.5" }),
1069
+ /* @__PURE__ */ jsx9("rect", { x: "11", y: "3.5", width: "5.5", height: "5.5", rx: "1.5", stroke: "currentColor", strokeWidth: "1.5" }),
1070
+ /* @__PURE__ */ jsx9("rect", { x: "3.5", y: "11", width: "5.5", height: "5.5", rx: "1.5", stroke: "currentColor", strokeWidth: "1.5" }),
1071
+ /* @__PURE__ */ jsx9("rect", { x: "11", y: "11", width: "5.5", height: "5.5", rx: "1.5", stroke: "currentColor", strokeWidth: "1.5" })
1072
+ ] }),
1073
+ "heart": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 16.5S3.5 12.5 3.5 8.2A3.6 3.6 0 0 1 10 6a3.6 3.6 0 0 1 6.5 2.2c0 4.3-6.5 8.3-6.5 8.3Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1074
+ "house": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M3 9.5 10 4l7 5.5M5 8.5V16h10V8.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1075
+ "info": /* @__PURE__ */ jsxs6(Fragment, { children: [
1076
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "10", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
1077
+ /* @__PURE__ */ jsx9("path", { d: "M10 9v4M10 6.4h.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1078
+ ] }),
1079
+ "lightbulb": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 3a5 5 0 0 0-2.5 9.3V14a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1.7A5 5 0 0 0 10 3ZM8.5 17h3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1080
+ "link": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M8.5 11.5a3 3 0 0 0 4.2 0l2.5-2.5a3 3 0 1 0-4.2-4.2l-1 1M11.5 8.5a3 3 0 0 0-4.2 0L4.8 11a3 3 0 1 0 4.2 4.2l1-1", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
1081
+ "lock": /* @__PURE__ */ jsxs6(Fragment, { children: [
1082
+ /* @__PURE__ */ jsx9("rect", { x: "5", y: "9", width: "10", height: "7", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
1083
+ /* @__PURE__ */ jsx9("path", { d: "M7 9V6.5a3 3 0 0 1 6 0V9", stroke: "currentColor", strokeWidth: "1.5" })
1084
+ ] }),
1085
+ "mail": /* @__PURE__ */ jsxs6(Fragment, { children: [
1086
+ /* @__PURE__ */ jsx9("rect", { x: "3", y: "4.5", width: "14", height: "11", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
1087
+ /* @__PURE__ */ jsx9("path", { d: "m4.5 7 5.5 4 5.5-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1088
+ ] }),
1089
+ "message": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M5.5 4h9a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H8.5l-3 3v-3a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1090
+ "mic": /* @__PURE__ */ jsxs6(Fragment, { children: [
1091
+ /* @__PURE__ */ jsx9("rect", { x: "7.5", y: "3.5", width: "5", height: "9", rx: "2.5", stroke: "currentColor", strokeWidth: "1.5" }),
1092
+ /* @__PURE__ */ jsx9("path", { d: "M5.5 10a4.5 4.5 0 0 0 9 0M10 14.5v2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1093
+ ] }),
1094
+ "moon-stars": /* @__PURE__ */ jsxs6(Fragment, { children: [
1095
+ /* @__PURE__ */ jsx9("path", { d: "M14.5 12.5A6 6 0 0 1 7.5 5.5 6 6 0 1 0 14.5 12.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1096
+ /* @__PURE__ */ jsx9("path", { d: "m14 3.5.6 1.4 1.4.6-1.4.6-.6 1.4-.6-1.4-1.4-.6 1.4-.6.6-1.4Z", fill: "currentColor" })
1097
+ ] }),
1098
+ "music-note": /* @__PURE__ */ jsxs6(Fragment, { children: [
1099
+ /* @__PURE__ */ jsx9("path", { d: "M8 15.5V5l7-1.5V13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1100
+ /* @__PURE__ */ jsx9("circle", { cx: "6", cy: "15.5", r: "2", stroke: "currentColor", strokeWidth: "1.5" }),
1101
+ /* @__PURE__ */ jsx9("circle", { cx: "13", cy: "13", r: "2", stroke: "currentColor", strokeWidth: "1.5" })
1102
+ ] }),
1103
+ "newspaper": /* @__PURE__ */ jsxs6(Fragment, { children: [
1104
+ /* @__PURE__ */ jsx9("rect", { x: "3", y: "4", width: "14", height: "12", rx: "1.8", stroke: "currentColor", strokeWidth: "1.5" }),
1105
+ /* @__PURE__ */ jsx9("path", { d: "M6 7.5h4.5v3.5H6zM13 7.5h1M13 11h1M6 13.5h8", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" })
1106
+ ] }),
1107
+ "pause": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M6 4.5h2.5v11H6zM11.5 4.5H14v11h-2.5z" }) }),
1108
+ "pencil": /* @__PURE__ */ jsxs6(Fragment, { children: [
1109
+ /* @__PURE__ */ jsx9("path", { d: "m4 16 .8-3.2 8.8-8.8a1.4 1.4 0 0 1 2 0l.4.4a1.4 1.4 0 0 1 0 2l-8.8 8.8L4 16Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1110
+ /* @__PURE__ */ jsx9("path", { d: "m12.5 5.5 2 2", stroke: "currentColor", strokeWidth: "1.5" })
1111
+ ] }),
1112
+ "people": /* @__PURE__ */ jsxs6(Fragment, { children: [
1113
+ /* @__PURE__ */ jsx9("circle", { cx: "7.5", cy: "7", r: "2.6", stroke: "currentColor", strokeWidth: "1.5" }),
1114
+ /* @__PURE__ */ jsx9("path", { d: "M2.5 16a5 5 0 0 1 10 0", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
1115
+ /* @__PURE__ */ jsx9("path", { d: "M13 4.6a2.6 2.6 0 0 1 0 4.9M14.5 11.6a5 5 0 0 1 3 4.4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1116
+ ] }),
1117
+ "person": /* @__PURE__ */ jsxs6(Fragment, { children: [
1118
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "6.5", r: "3", stroke: "currentColor", strokeWidth: "1.5" }),
1119
+ /* @__PURE__ */ jsx9("path", { d: "M4 16.5a6 6 0 0 1 12 0", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1120
+ ] }),
1121
+ "photo": /* @__PURE__ */ jsxs6(Fragment, { children: [
1122
+ /* @__PURE__ */ jsx9("rect", { x: "3.5", y: "4.5", width: "13", height: "11", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
1123
+ /* @__PURE__ */ jsx9("circle", { cx: "7.5", cy: "8", r: "1.2", fill: "currentColor" }),
1124
+ /* @__PURE__ */ jsx9("path", { d: "m5 14 3.5-3.5 2 2L14 9l2.5 3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1125
+ ] }),
1126
+ "pin": /* @__PURE__ */ jsxs6(Fragment, { children: [
1127
+ /* @__PURE__ */ jsx9("path", { d: "M10 17s-5-4.3-5-8a5 5 0 0 1 10 0c0 3.7-5 8-5 8Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1128
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "9", r: "1.8", stroke: "currentColor", strokeWidth: "1.5" })
1129
+ ] }),
1130
+ "play": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M7 4.9v10.2a.6.6 0 0 0 .92.5l8-5.1a.6.6 0 0 0 0-1l-8-5.1a.6.6 0 0 0-.92.5Z" }) }),
1131
+ "plus": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M10 4v12M4 10h12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
1132
+ "refresh": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M15.8 10A5.8 5.8 0 1 1 13 5.1M15.8 3.5v3.2h-3.2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1133
+ "repeat": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M5.5 8V7A2.5 2.5 0 0 1 8 4.5h6.5M12.5 2.5l2 2-2 2M14.5 12v1a2.5 2.5 0 0 1-2.5 2.5H5.5M7.5 17.5l-2-2 2-2", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1134
+ "search": /* @__PURE__ */ jsxs6(Fragment, { children: [
1135
+ /* @__PURE__ */ jsx9("circle", { cx: "9", cy: "9", r: "5.5", stroke: "currentColor", strokeWidth: "1.5" }),
1136
+ /* @__PURE__ */ jsx9("path", { d: "m13.5 13.5 3 3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1137
+ ] }),
1138
+ "send": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "m3.5 10 13-6-3.5 13-3.5-4.5L3.5 10Zm6 2.5L13 7", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1139
+ "share": /* @__PURE__ */ jsxs6(Fragment, { children: [
1140
+ /* @__PURE__ */ jsx9("path", { d: "M10 12.5v-9M7 6l3-2.8L13 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
1141
+ /* @__PURE__ */ jsx9("path", { d: "M5.5 9.5H5A1.5 1.5 0 0 0 3.5 11v4A1.5 1.5 0 0 0 5 16.5h10a1.5 1.5 0 0 0 1.5-1.5v-4A1.5 1.5 0 0 0 15 9.5h-.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1142
+ ] }),
1143
+ "shield": /* @__PURE__ */ jsxs6(Fragment, { children: [
1144
+ /* @__PURE__ */ jsx9("path", { d: "M10 3l6 2v5c0 3.5-2.5 5.8-6 7-3.5-1.2-6-3.5-6-7V5l6-2Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1145
+ /* @__PURE__ */ jsx9("path", { d: "m7.5 10 1.8 1.8L13 8.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1146
+ ] }),
1147
+ "sliders": /* @__PURE__ */ jsxs6(Fragment, { children: [
1148
+ /* @__PURE__ */ jsx9("path", { d: "M3.5 6.5h5M12 6.5h4.5M3.5 13.5h3M10 13.5h6.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
1149
+ /* @__PURE__ */ jsx9("circle", { cx: "10.2", cy: "6.5", r: "1.8", stroke: "currentColor", strokeWidth: "1.5" }),
1150
+ /* @__PURE__ */ jsx9("circle", { cx: "8.2", cy: "13.5", r: "1.8", stroke: "currentColor", strokeWidth: "1.5" })
1151
+ ] }),
1152
+ "sparkles": /* @__PURE__ */ jsxs6(Fragment, { children: [
1153
+ /* @__PURE__ */ jsx9("path", { d: "M10 3l1.2 3.3 3.3 1.2-3.3 1.2L10 12 8.8 8.7 5.5 7.5l3.3-1.2L10 3Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1154
+ /* @__PURE__ */ jsx9("path", { d: "m14.8 11.5.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7.7-1.8Z", stroke: "currentColor", strokeWidth: "1.3", strokeLinejoin: "round" })
1155
+ ] }),
1156
+ "speaker": /* @__PURE__ */ jsxs6(Fragment, { children: [
1157
+ /* @__PURE__ */ jsx9("path", { d: "M4 8v4h2.5L10 15V5L6.5 8H4Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1158
+ /* @__PURE__ */ jsx9("path", { d: "M12.5 7.5a3.5 3.5 0 0 1 0 5M14.5 5.5a6 6 0 0 1 0 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1159
+ ] }),
1160
+ "star": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "m10 3 2 4.4 4.8.5-3.6 3.2 1 4.7L10 13.4l-4.2 2.4 1-4.7L3.2 7.9 8 7.4 10 3Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }) }),
1161
+ "sun": /* @__PURE__ */ jsxs6(Fragment, { children: [
1162
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "10", r: "4", stroke: "currentColor", strokeWidth: "1.5" }),
1163
+ /* @__PURE__ */ jsx9("path", { d: "M10 1.5v2m0 13v2M18.5 10h-2m-13 0h-2m14.5-6-1.4 1.4M4.9 15.1 3.5 16.5m0-13 1.4 1.4m10.2 10.2 1.4 1.4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1164
+ ] }),
1165
+ "trash": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M4 6h12M8 6V4.5h4V6M6.5 6l.5 10h6l.5-10M8.5 9v4M11.5 9v4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
1166
+ "warning": /* @__PURE__ */ jsxs6(Fragment, { children: [
1167
+ /* @__PURE__ */ jsx9("path", { d: "M10 3.5 18 17H2L10 3.5Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
1168
+ /* @__PURE__ */ jsx9("path", { d: "M10 8.5V12M10 14.5h.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
1169
+ ] }),
1170
+ "waveform": /* @__PURE__ */ jsx9(Fragment, { children: /* @__PURE__ */ jsx9("path", { d: "M4 8.5v3M7 6v8M10 4v12M13 6.5v7M16 8.5v3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }),
1171
+ "wifi": /* @__PURE__ */ jsxs6(Fragment, { children: [
1172
+ /* @__PURE__ */ jsx9("path", { d: "M2.5 8a11 11 0 0 1 15 0M5 11a7.3 7.3 0 0 1 10 0M7.6 13.8a3.6 3.6 0 0 1 4.8 0", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
1173
+ /* @__PURE__ */ jsx9("circle", { cx: "10", cy: "16.2", r: "1.1", fill: "currentColor" })
1174
+ ] })
1175
+ };
1176
+ var Icon = forwardRef4(function Icon2({ name, size, title, className, ...rest }, ref) {
1177
+ const glyph = GLYPHS[name];
1178
+ if (!glyph) return null;
1179
+ return /* @__PURE__ */ jsxs6(
1180
+ "svg",
1181
+ {
1182
+ ref,
1183
+ className: cn("b-icon", size && size !== "md" && `b-icon--${size}`, className),
1184
+ viewBox: "0 0 20 20",
1185
+ fill: "none",
1186
+ role: title ? "img" : void 0,
1187
+ "aria-hidden": title ? void 0 : true,
1188
+ ...rest,
1189
+ children: [
1190
+ title ? /* @__PURE__ */ jsx9("title", { children: title }) : null,
1191
+ glyph
1192
+ ]
1193
+ }
1194
+ );
1195
+ });
1196
+
1197
+ // src/primitive.tsx
1198
+ import { createElement, forwardRef as forwardRef5 } from "react";
1199
+ function block(defaultTag, base, displayName) {
1200
+ const Component = forwardRef5(function Block({ as, className, ...rest }, ref) {
1201
+ return createElement(as ?? defaultTag, { ref, className: cn(base, className), ...rest });
1202
+ });
1203
+ Component.displayName = displayName;
1204
+ return Component;
1205
+ }
1206
+
1207
+ // src/layout.tsx
1208
+ import { forwardRef as forwardRef6 } from "react";
1209
+ import { jsx as jsx10 } from "react/jsx-runtime";
1210
+ function stackClasses(base, p, className) {
1211
+ return cn(
1212
+ base,
1213
+ p.gap !== void 0 && `b-gap-${p.gap}`,
1214
+ p.align && `b-stack--${p.align}`,
1215
+ p.wrap && "b-stack--wrap",
1216
+ className
1217
+ );
1218
+ }
1219
+ var Stack = forwardRef6(function Stack2({ as: Tag2 = "div", gap, align, wrap, className, children, ...rest }, ref) {
1220
+ const Component = Tag2;
1221
+ return /* @__PURE__ */ jsx10(Component, { ref, className: stackClasses("b-stack", { gap, align, wrap }, className), ...rest, children });
1222
+ });
1223
+ var VStack = Stack;
1224
+ var HStack = forwardRef6(function HStack2({ as: Tag2 = "div", gap, align, wrap, className, children, ...rest }, ref) {
1225
+ const Component = Tag2;
1226
+ return /* @__PURE__ */ jsx10(Component, { ref, className: stackClasses("b-hstack", { gap, align, wrap }, className), ...rest, children });
1227
+ });
1228
+ var Grid = forwardRef6(function Grid2({ as: Tag2 = "div", cols, gap, className, children, ...rest }, ref) {
1229
+ const Component = Tag2;
1230
+ return /* @__PURE__ */ jsx10(
1231
+ Component,
1232
+ {
1233
+ ref,
1234
+ className: cn("b-grid", cols && `b-grid--${cols}`, gap !== void 0 && `b-gap-${gap}`, className),
1235
+ ...rest,
1236
+ children
1237
+ }
1238
+ );
1239
+ });
1240
+ var Container = forwardRef6(function Container2({ as: Tag2 = "div", size, className, children, ...rest }, ref) {
1241
+ const Component = Tag2;
1242
+ return /* @__PURE__ */ jsx10(Component, { ref, className: cn("b-container", size && `b-container--${size}`, className), ...rest, children });
1243
+ });
1244
+ var ScrollArea = forwardRef6(function ScrollArea2({ as: Tag2 = "div", axis, fade, className, children, ...rest }, ref) {
1245
+ const Component = Tag2;
1246
+ return /* @__PURE__ */ jsx10(
1247
+ Component,
1248
+ {
1249
+ ref,
1250
+ className: cn("b-scroll-area", axis && `b-scroll-area--${axis}`, fade && "b-scroll-area--fade", className),
1251
+ ...rest,
1252
+ children
1253
+ }
1254
+ );
1255
+ });
1256
+ var Divider = forwardRef6(function Divider2({ as: Tag2 = "div", vertical, inset, label, className, children, ...rest }, ref) {
1257
+ const Component = Tag2;
1258
+ return /* @__PURE__ */ jsx10(
1259
+ Component,
1260
+ {
1261
+ ref,
1262
+ role: children ? void 0 : "separator",
1263
+ className: cn(
1264
+ "b-divider",
1265
+ vertical && "b-divider--vertical",
1266
+ inset && "b-divider--inset",
1267
+ label && "b-divider--label",
1268
+ className
1269
+ ),
1270
+ ...rest,
1271
+ children
1272
+ }
1273
+ );
1274
+ });
1275
+ var Stage = block("div", "b-stage", "Stage");
1276
+ var Spacer = block("span", "b-spacer", "Spacer");
1277
+ var Grow = block("div", "b-grow", "Grow");
1278
+ var Split = block("div", "b-split", "Split");
1279
+ var Section = block("section", "b-section", "Section");
1280
+ var SafeArea = block("div", "b-safe-area", "SafeArea");
1281
+ var CardGrid = block("div", "b-card-grid", "CardGrid");
1282
+ var Bento = block("div", "b-bento", "Bento");
1283
+ var Dashboard = block("div", "b-dashboard", "Dashboard");
1284
+ var Workspace = block("div", "b-workspace", "Workspace");
1285
+ var WorkspaceMain = block("main", "b-workspace__main", "WorkspaceMain");
1286
+ var Inspector = block("aside", "b-inspector", "Inspector");
1287
+ var SkipLink = block("a", "b-skip-link", "SkipLink");
1288
+ var Span = forwardRef6(function Span2({ as: Tag2 = "div", span, className, children, ...rest }, ref) {
1289
+ const Component = Tag2;
1290
+ return /* @__PURE__ */ jsx10(Component, { ref, className: cn(`b-span-${span}`, className), ...rest, children });
1291
+ });
1292
+ var Sidebar = forwardRef6(function Sidebar2({ as: Tag2 = "nav", material, className, children, ...rest }, ref) {
1293
+ const Component = Tag2;
1294
+ return /* @__PURE__ */ jsx10(Component, { ref, className: cn("b-sidebar", material && `b-sidebar--${material}`, className), ...rest, children });
1295
+ });
1296
+ var SidebarHeading = block("div", "b-sidebar__heading", "SidebarHeading");
1297
+ var SidebarGroup = block("div", "b-sidebar__group", "SidebarGroup");
1298
+ var SidebarItem = forwardRef6(function SidebarItem2({ as: Tag2 = "a", active, className, children, ...rest }, ref) {
1299
+ const Component = Tag2;
1300
+ return /* @__PURE__ */ jsx10(
1301
+ Component,
1302
+ {
1303
+ ref,
1304
+ className: cn("b-sidebar__item", active && "is-active", className),
1305
+ "aria-current": active ? "page" : void 0,
1306
+ ...rest,
1307
+ children
1308
+ }
1309
+ );
1310
+ });
1311
+
1312
+ // src/typography.tsx
1313
+ import { Fragment as Fragment2, forwardRef as forwardRef7 } from "react";
1314
+ import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
1315
+ var ROLE_TAG = {
1316
+ "large-title": "h1",
1317
+ title1: "h1",
1318
+ title2: "h2",
1319
+ title3: "h3",
1320
+ headline: "h4",
1321
+ subheadline: "p",
1322
+ body: "p",
1323
+ callout: "p",
1324
+ caption: "span",
1325
+ caption2: "span",
1326
+ overline: "span"
1327
+ };
1328
+ var Text = forwardRef7(function Text2({ role = "body", as, tone, align, truncate, clamp, tabularNums, className, children, ...rest }, ref) {
1329
+ const Component = as ?? ROLE_TAG[role];
1330
+ return /* @__PURE__ */ jsx11(
1331
+ Component,
1332
+ {
1333
+ ref,
1334
+ className: cn(
1335
+ `b-${role}`,
1336
+ tone && `b-text-${tone}`,
1337
+ align && `b-text-${align}`,
1338
+ truncate && "b-truncate",
1339
+ clamp && `b-line-clamp-${clamp}`,
1340
+ tabularNums && "b-tabular-nums",
1341
+ className
1342
+ ),
1343
+ ...rest,
1344
+ children
1345
+ }
1346
+ );
1347
+ });
1348
+ var Link = block("a", "b-link", "Link");
1349
+ var LinkGroup = block("div", "b-link-group", "LinkGroup");
1350
+ var Kbd = block("span", "b-kbd", "Kbd");
1351
+ var Overline = block("span", "b-overline", "Overline");
1352
+ var Footnote = block("p", "b-footnote", "Footnote");
1353
+ var Footnotes = block("div", "b-footnotes", "Footnotes");
1354
+ var Quote = forwardRef7(function Quote2({ cite, className, children, ...rest }, ref) {
1355
+ return /* @__PURE__ */ jsxs7("blockquote", { ref, className: cn("b-quote", className), ...rest, children: [
1356
+ /* @__PURE__ */ jsx11("p", { children }),
1357
+ cite ? /* @__PURE__ */ jsx11("cite", { children: cite }) : null
1358
+ ] });
1359
+ });
1360
+ var CodeBlock = forwardRef7(function CodeBlock2({ title, copy, copyLabel = "Copy", className, children, ...rest }, ref) {
1361
+ return /* @__PURE__ */ jsxs7("div", { ref, className: cn("b-code", className), ...rest, children: [
1362
+ title || copy ? /* @__PURE__ */ jsxs7("div", { className: "b-code__header", children: [
1363
+ /* @__PURE__ */ jsx11("span", { children: title }),
1364
+ copy ? /* @__PURE__ */ jsx11(
1365
+ "button",
1366
+ {
1367
+ type: "button",
1368
+ className: "b-code__copy",
1369
+ onClick: (event) => {
1370
+ const pre = event.currentTarget.closest(".b-code")?.querySelector("code");
1371
+ if (pre?.textContent) void navigator.clipboard.writeText(pre.textContent);
1372
+ },
1373
+ children: copyLabel
1374
+ }
1375
+ ) : null
1376
+ ] }) : null,
1377
+ /* @__PURE__ */ jsx11("pre", { children: /* @__PURE__ */ jsx11("code", { children }) })
1378
+ ] });
1379
+ });
1380
+ var DescriptionList = forwardRef7(
1381
+ function DescriptionList2({ stacked, items, className, children, ...rest }, ref) {
1382
+ return /* @__PURE__ */ jsx11("dl", { ref, className: cn("b-dl", stacked && "b-dl--stacked", className), ...rest, children: items ? items.map((item, i) => /* @__PURE__ */ jsxs7(Fragment2, { children: [
1383
+ /* @__PURE__ */ jsx11("dt", { children: item.term }),
1384
+ /* @__PURE__ */ jsx11("dd", { children: item.description })
1385
+ ] }, i)) : children });
1386
+ }
1387
+ );
1388
+
1389
+ // src/data.tsx
1390
+ import { forwardRef as forwardRef8 } from "react";
1391
+ import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
1392
+ var Table = forwardRef8(function Table2({ striped, hover, compact, wrap = true, className, children, ...rest }, ref) {
1393
+ const table = /* @__PURE__ */ jsx12(
1394
+ "table",
1395
+ {
1396
+ ref,
1397
+ className: cn(
1398
+ "b-table",
1399
+ striped && "b-table--striped",
1400
+ hover && "b-table--hover",
1401
+ compact && "b-table--compact",
1402
+ className
1403
+ ),
1404
+ ...rest,
1405
+ children
1406
+ }
1407
+ );
1408
+ return wrap ? /* @__PURE__ */ jsx12("div", { className: "b-table-wrap", children: table }) : table;
1409
+ });
1410
+ var TableWrap = block("div", "b-table-wrap", "TableWrap");
1411
+ var TableNum = block("td", "b-table__num", "TableNum");
1412
+ var TableSortHeader = forwardRef8(
1413
+ function TableSortHeader2({ direction = null, className, children, ...rest }, ref) {
1414
+ return /* @__PURE__ */ jsx12(
1415
+ "th",
1416
+ {
1417
+ ref,
1418
+ className: cn("b-table__sort", direction && `is-${direction}`, className),
1419
+ "aria-sort": direction === "asc" ? "ascending" : direction === "desc" ? "descending" : "none",
1420
+ ...rest,
1421
+ children
1422
+ }
1423
+ );
1424
+ }
1425
+ );
1426
+ var Gauge = forwardRef8(function Gauge2({ value, label, display, className, style, ...rest }, ref) {
1427
+ return /* @__PURE__ */ jsxs8(
1428
+ "div",
1429
+ {
1430
+ ref,
1431
+ className: cn("b-gauge", className),
1432
+ style: { ["--b-progress"]: value, ...style },
1433
+ role: "img",
1434
+ "aria-label": typeof label === "string" ? `${label}: ${value}%` : `${value}%`,
1435
+ ...rest,
1436
+ children: [
1437
+ /* @__PURE__ */ jsx12("div", { className: "b-gauge__value", children: display ?? `${value}%` }),
1438
+ label ? /* @__PURE__ */ jsx12("div", { className: "b-gauge__label", children: label }) : null
1439
+ ]
1440
+ }
1441
+ );
1442
+ });
1443
+ var Donut = forwardRef8(function Donut2({ slices, value, label, description, className, ...rest }, ref) {
1444
+ let at = 0;
1445
+ const stops = slices.map((s) => {
1446
+ const from = at;
1447
+ at += s.value;
1448
+ const color = /^\d$/.test(s.color) ? `var(--b-chart-${s.color})` : s.color;
1449
+ return `${color} ${from}% ${at}%`;
1450
+ }).join(", ");
1451
+ return /* @__PURE__ */ jsxs8("div", { ref, className: cn("b-donut", className), ...rest, children: [
1452
+ /* @__PURE__ */ jsx12(
1453
+ "div",
1454
+ {
1455
+ className: "b-pie",
1456
+ style: { ["--b-pie"]: stops },
1457
+ role: "img",
1458
+ "aria-label": description ?? slices.map((s) => `${s.label}: ${s.value}%`).join(", ")
1459
+ }
1460
+ ),
1461
+ /* @__PURE__ */ jsxs8("div", { className: "b-donut__center", children: [
1462
+ value ? /* @__PURE__ */ jsx12("div", { className: "b-stat__value", children: value }) : null,
1463
+ label ? /* @__PURE__ */ jsx12("div", { className: "b-stat__label", children: label }) : null
1464
+ ] })
1465
+ ] });
1466
+ });
1467
+ var Sparkline = forwardRef8(function Sparkline2({ points, className, ...rest }, ref) {
1468
+ const max = Math.max(...points, 1);
1469
+ const min = Math.min(...points, 0);
1470
+ const span = max - min || 1;
1471
+ const d = points.map((p, i) => {
1472
+ const x = i / Math.max(points.length - 1, 1) * 100;
1473
+ const y = 22 - (p - min) / span * 20;
1474
+ return `${i === 0 ? "M" : "L"}${x.toFixed(1)} ${y.toFixed(1)}`;
1475
+ }).join(" ");
1476
+ return /* @__PURE__ */ jsx12(
1477
+ "svg",
1478
+ {
1479
+ ref,
1480
+ className: cn("b-sparkline", className),
1481
+ viewBox: "0 0 100 24",
1482
+ preserveAspectRatio: "none",
1483
+ "aria-hidden": "true",
1484
+ ...rest,
1485
+ children: /* @__PURE__ */ jsx12("path", { d })
1486
+ }
1487
+ );
1488
+ });
1489
+ var Legend = forwardRef8(function Legend2({ items, className, ...rest }, ref) {
1490
+ return /* @__PURE__ */ jsx12("ul", { ref, className: cn("b-legend", className), ...rest, children: items.map((item, i) => /* @__PURE__ */ jsxs8("li", { children: [
1491
+ /* @__PURE__ */ jsx12(
1492
+ "span",
1493
+ {
1494
+ className: "b-legend__swatch",
1495
+ style: item.color ? { background: /^\d$/.test(item.color) ? `var(--b-chart-${item.color})` : item.color } : void 0
1496
+ }
1497
+ ),
1498
+ item.label
1499
+ ] }, i)) });
1500
+ });
1501
+ var Columns = forwardRef8(function Columns2({ data, max, rounded, height, className, style, description, ...rest }, ref) {
1502
+ const top = max ?? Math.max(...data.map((d) => d.value), 1);
1503
+ return /* @__PURE__ */ jsx12(
1504
+ "div",
1505
+ {
1506
+ ref,
1507
+ className: cn("b-columns", rounded && "b-columns--rounded", className),
1508
+ style: { ...height ? { ["--b-chart-h"]: height } : null, ...style },
1509
+ role: "img",
1510
+ "aria-label": description ?? data.map((d) => `${d.label}: ${d.value}`).join(", "),
1511
+ ...rest,
1512
+ children: data.map((d, i) => /* @__PURE__ */ jsx12(
1513
+ "div",
1514
+ {
1515
+ className: "b-columns__bar",
1516
+ "data-label": d.label,
1517
+ style: { ["--v"]: `${Math.round(d.value / top * 100)}%` }
1518
+ },
1519
+ i
1520
+ ))
1521
+ }
1522
+ );
1523
+ });
1524
+ var Bars = forwardRef8(function Bars2({ data, max, description, className, ...rest }, ref) {
1525
+ const top = max ?? Math.max(...data.map((d) => d.value), 1);
1526
+ return /* @__PURE__ */ jsx12(
1527
+ "div",
1528
+ {
1529
+ ref,
1530
+ className: cn("b-bars", className),
1531
+ role: "img",
1532
+ "aria-label": description ?? data.map((d) => `${d.label}: ${d.value}`).join(", "),
1533
+ ...rest,
1534
+ children: data.map((d, i) => /* @__PURE__ */ jsxs8("div", { className: "b-bars__row", children: [
1535
+ /* @__PURE__ */ jsx12("span", { className: "b-bars__label", children: d.label }),
1536
+ /* @__PURE__ */ jsx12("div", { className: "b-bars__track", children: /* @__PURE__ */ jsx12("i", { style: { ["--v"]: `${Math.round(d.value / top * 100)}%` } }) }),
1537
+ /* @__PURE__ */ jsx12("span", { className: "b-bars__value", children: d.display ?? d.value })
1538
+ ] }, i))
1539
+ }
1540
+ );
1541
+ });
1542
+ var Chart = block("figure", "b-chart", "Chart");
1543
+ var ChartTip = block("div", "b-chart-tip", "ChartTip");
1544
+ var Heatmap = block("div", "b-heatmap", "Heatmap");
1545
+
1546
+ // src/navigation.tsx
1547
+ import { forwardRef as forwardRef9 } from "react";
1548
+ import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
1549
+ var TopNav = block("header", "b-topnav", "TopNav");
1550
+ var TopNavBrand = block("a", "b-topnav__brand", "TopNavBrand");
1551
+ var TopNavLinks = block("nav", "b-topnav__links", "TopNavLinks");
1552
+ function navLink(base, displayName) {
1553
+ const Component = forwardRef9(function NavLink({ as: Tag2 = "a", active, className, children, ...rest }, ref) {
1554
+ const El = Tag2;
1555
+ return /* @__PURE__ */ jsx13(
1556
+ El,
1557
+ {
1558
+ ref,
1559
+ className: cn(base, active && "is-active"),
1560
+ "aria-current": active ? "page" : void 0,
1561
+ ...rest,
1562
+ children
1563
+ }
1564
+ );
1565
+ });
1566
+ Component.displayName = displayName;
1567
+ return Component;
1568
+ }
1569
+ var TopNavLink = navLink("b-topnav__link", "TopNavLink");
1570
+ var BottomNavItem = navLink("b-bottomnav__item", "BottomNavItem");
1571
+ var DockItem = navLink("b-dock__item", "DockItem");
1572
+ var BottomNav = block("nav", "b-bottomnav", "BottomNav");
1573
+ var Dock = block("div", "b-dock", "Dock");
1574
+ var DockTray = block("div", "b-dock__tray", "DockTray");
1575
+ var PillNav = block("nav", "b-pill-nav", "PillNav");
1576
+ var BackButton = block("button", "b-back-btn", "BackButton");
1577
+ var MarketingNav = block("header", "b-marketing-nav", "MarketingNav");
1578
+ var MarketingNavBrand = block("a", "b-marketing-nav__brand", "MarketingNavBrand");
1579
+ var MarketingNavLinks = block("nav", "b-marketing-nav__links", "MarketingNavLinks");
1580
+ var Steps = forwardRef9(function Steps2({ steps, current, className, ...rest }, ref) {
1581
+ return /* @__PURE__ */ jsx13("ol", { ref, className: cn("b-steps", className), ...rest, children: steps.map((step, i) => {
1582
+ const state = step.state ?? (current === void 0 ? void 0 : i < current ? "complete" : i === current ? "active" : void 0);
1583
+ return /* @__PURE__ */ jsx13(
1584
+ "li",
1585
+ {
1586
+ className: state ? `is-${state}` : void 0,
1587
+ "data-step": i + 1,
1588
+ "aria-current": state === "active" ? "step" : void 0,
1589
+ children: step.label
1590
+ },
1591
+ i
1592
+ );
1593
+ }) });
1594
+ });
1595
+ var Drawer = forwardRef9(function Drawer2({ end, className, children, ...rest }, ref) {
1596
+ return /* @__PURE__ */ jsx13("nav", { ref, className: cn("b-drawer", end && "b-drawer--end", className), ...rest, children });
1597
+ });
1598
+ var DrawerHeader = block("div", "b-drawer__header", "DrawerHeader");
1599
+ var DrawerBody = block("div", "b-drawer__body", "DrawerBody");
1600
+ var StatusBar = block("div", "b-statusbar", "StatusBar");
1601
+ var StatusBarItem = block("span", "b-statusbar__item", "StatusBarItem");
1602
+ var Menu = forwardRef9(function Menu2({ className, children, ...rest }, ref) {
1603
+ return /* @__PURE__ */ jsx13("ul", { ref, className: cn("b-menu", className), role: "menu", ...rest, children });
1604
+ });
1605
+ var MenuItem = forwardRef9(function MenuItem2({ shortcut, danger, icon, className, children, ...rest }, ref) {
1606
+ return /* @__PURE__ */ jsx13("li", { role: "none", children: /* @__PURE__ */ jsxs9(
1607
+ "button",
1608
+ {
1609
+ ref,
1610
+ type: "button",
1611
+ role: "menuitem",
1612
+ className: cn("b-menu__item", danger && "b-menu__item--danger", className),
1613
+ ...rest,
1614
+ children: [
1615
+ icon,
1616
+ children,
1617
+ shortcut ? /* @__PURE__ */ jsx13("span", { className: "b-menu__shortcut", children: shortcut }) : null
1618
+ ]
1619
+ }
1620
+ ) });
1621
+ });
1622
+ var MenuLabel = block("li", "b-menu__label", "MenuLabel");
1623
+ var MenuSeparator = block("li", "b-menu__separator", "MenuSeparator");
1624
+ var Dropdown = forwardRef9(function Dropdown2({ label, variant = "button", end, triggerProps, className, children, ...rest }, ref) {
1625
+ const { className: triggerClass, ...triggerRest } = triggerProps ?? {};
1626
+ return /* @__PURE__ */ jsxs9("details", { ref, className: cn("b-dropdown", end && "b-dropdown--end", className), ...rest, children: [
1627
+ /* @__PURE__ */ jsx13(
1628
+ "summary",
1629
+ {
1630
+ className: cn(variant === "select" ? "b-select" : "b-btn", triggerClass),
1631
+ "aria-haspopup": variant === "select" ? "listbox" : "menu",
1632
+ ...triggerRest,
1633
+ children: label
1634
+ }
1635
+ ),
1636
+ children
1637
+ ] });
1638
+ });
1639
+
1640
+ // src/forms-extra.tsx
1641
+ import {
1642
+ forwardRef as forwardRef10,
1643
+ useId as useId3
1644
+ } from "react";
1645
+ import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
1646
+ var Form = block("form", "b-form", "Form");
1647
+ var FormRow = block("div", "b-form-row", "FormRow");
1648
+ var FormActions = block("div", "b-form-actions", "FormActions");
1649
+ var Fieldset = block("fieldset", "b-fieldset", "Fieldset");
1650
+ var Help = block("p", "b-help", "Help");
1651
+ var ErrorText = block("p", "b-error", "ErrorText");
1652
+ var Optional = block("span", "b-optional", "Optional");
1653
+ var FormSection = forwardRef10(function FormSection2({ title, description, className, children, ...rest }, ref) {
1654
+ return /* @__PURE__ */ jsxs10("div", { ref, className: cn("b-form-section", className), ...rest, children: [
1655
+ title || description ? /* @__PURE__ */ jsxs10("div", { className: "b-form-section__header", children: [
1656
+ title ? /* @__PURE__ */ jsx14("div", { className: "b-form-section__title", children: title }) : null,
1657
+ description ? /* @__PURE__ */ jsx14("p", { className: "b-form-section__desc", children: description }) : null
1658
+ ] }) : null,
1659
+ children
1660
+ ] });
1661
+ });
1662
+ var Label = forwardRef10(function Label2({ required, className, children, ...rest }, ref) {
1663
+ return /* @__PURE__ */ jsx14("label", { ref, className: cn("b-label", required && "b-label--required", className), ...rest, children });
1664
+ });
1665
+ var InputGroup = forwardRef10(function InputGroup2({ prefix, suffix, className, children, ...rest }, ref) {
1666
+ return /* @__PURE__ */ jsxs10("div", { ref, className: cn("b-input-group", className), ...rest, children: [
1667
+ prefix ? /* @__PURE__ */ jsx14("span", { className: "b-input-affix b-input-affix--start", children: prefix }) : null,
1668
+ children,
1669
+ suffix ? /* @__PURE__ */ jsx14("span", { className: "b-input-affix b-input-affix--end", children: suffix }) : null
1670
+ ] });
1671
+ });
1672
+ var StepperInput = forwardRef10(function StepperInput2({ decrementLabel = "Decrease", incrementLabel = "Increase", onStep, className, ...rest }, ref) {
1673
+ return /* @__PURE__ */ jsxs10("div", { className: cn("b-stepper-input", className), children: [
1674
+ /* @__PURE__ */ jsx14("button", { type: "button", "aria-label": decrementLabel, onClick: () => onStep?.(-1), children: "\u2212" }),
1675
+ /* @__PURE__ */ jsx14("input", { ref, type: "number", ...rest }),
1676
+ /* @__PURE__ */ jsx14("button", { type: "button", "aria-label": incrementLabel, onClick: () => onStep?.(1), children: "+" })
1677
+ ] });
1678
+ });
1679
+ var Range = forwardRef10(function Range2({ min = 0, max = 100, step = 1, value, onRangeChange, label, className, ...rest }, ref) {
1680
+ const id = useId3();
1681
+ const span = max - min || 1;
1682
+ const start = (Math.min(...value) - min) / span * 100;
1683
+ const width = (Math.max(...value) - Math.min(...value)) / span * 100;
1684
+ return /* @__PURE__ */ jsxs10("div", { ref, className: cn("b-range", className), role: "group", "aria-label": label, ...rest, children: [
1685
+ /* @__PURE__ */ jsx14("div", { className: "b-range__fill", style: { insetInlineStart: `${start}%`, width: `${width}%` } }),
1686
+ /* @__PURE__ */ jsx14(
1687
+ "input",
1688
+ {
1689
+ type: "range",
1690
+ min,
1691
+ max,
1692
+ step,
1693
+ value: value[0],
1694
+ "aria-label": label ? `${label}, minimum` : "Minimum",
1695
+ id: `${id}-min`,
1696
+ onChange: (e) => onRangeChange?.([Number(e.target.value), value[1]])
1697
+ }
1698
+ ),
1699
+ /* @__PURE__ */ jsx14(
1700
+ "input",
1701
+ {
1702
+ type: "range",
1703
+ min,
1704
+ max,
1705
+ step,
1706
+ value: value[1],
1707
+ "aria-label": label ? `${label}, maximum` : "Maximum",
1708
+ id: `${id}-max`,
1709
+ onChange: (e) => onRangeChange?.([value[0], Number(e.target.value)])
1710
+ }
1711
+ )
1712
+ ] });
1713
+ });
1714
+ var Dropzone = forwardRef10(function Dropzone2({ active, className, children, ...rest }, ref) {
1715
+ return /* @__PURE__ */ jsx14("div", { ref, className: cn("b-dropzone", active && "is-active", className), ...rest, children });
1716
+ });
1717
+ var UploadItem = forwardRef10(function UploadItem2({ name, size, thumb, className, children, ...rest }, ref) {
1718
+ return /* @__PURE__ */ jsxs10("li", { ref, className: cn("b-upload-item", className), ...rest, children: [
1719
+ thumb ? /* @__PURE__ */ jsx14("span", { className: "b-upload-item__thumb", children: thumb }) : null,
1720
+ /* @__PURE__ */ jsxs10("span", { className: "b-upload-item__meta", children: [
1721
+ /* @__PURE__ */ jsx14("span", { className: "b-upload-item__name", children: name }),
1722
+ size ? /* @__PURE__ */ jsx14("span", { className: "b-upload-item__size", children: size }) : null
1723
+ ] }),
1724
+ children
1725
+ ] });
1726
+ });
1727
+ var Upload = block("div", "b-upload", "Upload");
1728
+ var FilterBar = block("div", "b-filter-bar", "FilterBar");
1729
+ var Swatches = block("div", "b-swatches", "Swatches");
1730
+ var Swatch = block("button", "b-swatch", "Swatch");
1731
+ var SearchField = block("div", "b-search", "SearchField");
1732
+ var FilterChip = forwardRef10(function FilterChip2({ value, className, children, ...rest }, ref) {
1733
+ return /* @__PURE__ */ jsxs10("button", { ref, type: "button", className: cn("b-filter-chip", className), ...rest, children: [
1734
+ children,
1735
+ value ? /* @__PURE__ */ jsx14("span", { className: "b-filter-chip__value", children: value }) : null
1736
+ ] });
1737
+ });
1738
+
1739
+ // src/productivity.tsx
1740
+ import { forwardRef as forwardRef11 } from "react";
1741
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
1742
+ var Kanban = block("div", "b-kanban", "Kanban");
1743
+ var KanbanList = block("ul", "b-kanban-col__list", "KanbanList");
1744
+ var TaskList = block("ul", "b-task-list", "TaskList");
1745
+ var TaskRow = block("div", "b-task-row", "TaskRow");
1746
+ var DataGrid = block("div", "b-datagrid", "DataGrid");
1747
+ var Tree = block("ul", "b-tree", "Tree");
1748
+ var Feed = block("ul", "b-feed", "Feed");
1749
+ var Log = block("div", "b-log", "Log");
1750
+ var BulkActions = block("div", "b-bulk-actions", "BulkActions");
1751
+ var SelectionCount = block("span", "b-selection-count", "SelectionCount");
1752
+ var Resizable = block("div", "b-resizable", "Resizable");
1753
+ var ResizeHandle = block("div", "b-resize-handle", "ResizeHandle");
1754
+ var DragHandle = block("span", "b-drag-handle", "DragHandle");
1755
+ var KanbanColumn = forwardRef11(function KanbanColumn2({ title, count, className, children, ...rest }, ref) {
1756
+ return /* @__PURE__ */ jsxs11("section", { ref, className: cn("b-kanban-col", className), ...rest, children: [
1757
+ /* @__PURE__ */ jsxs11("header", { className: "b-kanban-col__header", children: [
1758
+ title,
1759
+ count !== void 0 ? /* @__PURE__ */ jsx15("span", { className: "b-kanban-col__count", children: count }) : null
1760
+ ] }),
1761
+ children
1762
+ ] });
1763
+ });
1764
+ var Task = forwardRef11(function Task2({ title, meta, className, children, ...rest }, ref) {
1765
+ return /* @__PURE__ */ jsxs11("li", { ref, className: cn("b-task", className), ...rest, children: [
1766
+ /* @__PURE__ */ jsx15("div", { className: "b-task__title", children: title }),
1767
+ meta ? /* @__PURE__ */ jsx15("div", { className: "b-task__meta", children: meta }) : null,
1768
+ children
1769
+ ] });
1770
+ });
1771
+ var TreeItem = forwardRef11(function TreeItem2({ label, icon, defaultOpen, className, children, ...rest }, ref) {
1772
+ return /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsxs11("details", { ref, className: cn("b-tree-item", className), open: defaultOpen, ...rest, children: [
1773
+ /* @__PURE__ */ jsxs11("summary", { children: [
1774
+ icon,
1775
+ label
1776
+ ] }),
1777
+ children
1778
+ ] }) });
1779
+ });
1780
+ var Timeline = forwardRef11(function Timeline2({ entries, className, ...rest }, ref) {
1781
+ return /* @__PURE__ */ jsx15("ol", { ref, className: cn("b-timeline", className), ...rest, children: entries.map((entry, i) => /* @__PURE__ */ jsxs11("li", { className: entry.state ? `is-${entry.state}` : void 0, children: [
1782
+ entry.time ? /* @__PURE__ */ jsx15("div", { className: "b-timeline__time", children: entry.time }) : null,
1783
+ /* @__PURE__ */ jsx15("div", { className: "b-timeline__title", children: entry.title }),
1784
+ entry.body ? /* @__PURE__ */ jsx15("div", { className: "b-timeline__body", children: entry.body }) : null
1785
+ ] }, i)) });
1786
+ });
1787
+ var FileTile = forwardRef11(function FileTile2({ name, icon, selected, className, ...rest }, ref) {
1788
+ return /* @__PURE__ */ jsxs11(
1789
+ "button",
1790
+ {
1791
+ ref,
1792
+ type: "button",
1793
+ className: cn("b-file-tile", selected && "is-selected", className),
1794
+ "aria-pressed": selected,
1795
+ ...rest,
1796
+ children: [
1797
+ icon ? /* @__PURE__ */ jsx15("span", { className: "b-file-tile__icon", children: icon }) : null,
1798
+ /* @__PURE__ */ jsx15("span", { className: "b-file-tile__name", children: name })
1799
+ ]
1800
+ }
1801
+ );
1802
+ });
1803
+ var FileGrid = block("div", "b-file-grid", "FileGrid");
1804
+ var FileBrowser = block("div", "b-file-browser", "FileBrowser");
1805
+
1806
+ // src/marketing.tsx
1807
+ import { forwardRef as forwardRef12 } from "react";
1808
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
1809
+ var Landing = block("div", "b-landing", "Landing");
1810
+ var SpecStrip = block("div", "b-spec-strip", "SpecStrip");
1811
+ var CardRail = block("div", "b-card-rail", "CardRail");
1812
+ var SiteFooter = block("footer", "b-site-footer", "SiteFooter");
1813
+ var SiteFooterGroups = block("div", "b-site-footer__groups", "SiteFooterGroups");
1814
+ var SiteFooterGroup = block("div", "b-site-footer__group", "SiteFooterGroup");
1815
+ var SiteFooterHeading = block("div", "b-site-footer__heading", "SiteFooterHeading");
1816
+ var SiteFooterLegal = block("div", "b-site-footer__legal", "SiteFooterLegal");
1817
+ var Chapter = forwardRef12(function Chapter2({ eyebrow, title, lede, actions, tight, start, dark, className, children, ...rest }, ref) {
1818
+ return /* @__PURE__ */ jsxs12(
1819
+ "section",
1820
+ {
1821
+ ref,
1822
+ className: cn(
1823
+ "b-chapter",
1824
+ tight && "b-chapter--tight",
1825
+ start && "b-chapter--start",
1826
+ dark && "b-chapter--dark",
1827
+ className
1828
+ ),
1829
+ ...rest,
1830
+ children: [
1831
+ eyebrow ? /* @__PURE__ */ jsx16("p", { className: "b-chapter__eyebrow", children: eyebrow }) : null,
1832
+ title ? /* @__PURE__ */ jsx16("h2", { className: "b-chapter__title", children: title }) : null,
1833
+ lede ? /* @__PURE__ */ jsx16("p", { className: "b-chapter__lede", children: lede }) : null,
1834
+ actions ? /* @__PURE__ */ jsx16("div", { className: "b-chapter__actions", children: actions }) : null,
1835
+ children
1836
+ ]
1837
+ }
1838
+ );
1839
+ });
1840
+ var Hero = forwardRef12(function Hero2({ title, media, className, children, ...rest }, ref) {
1841
+ return /* @__PURE__ */ jsxs12("section", { ref, className: cn("b-hero", className), ...rest, children: [
1842
+ title ? /* @__PURE__ */ jsx16("h1", { className: "b-hero__title", children: title }) : null,
1843
+ children,
1844
+ media ? /* @__PURE__ */ jsx16("div", { className: "b-hero__media", children: media }) : null
1845
+ ] });
1846
+ });
1847
+ var Figure = forwardRef12(function Figure2({ caption, bleed, className, children, ...rest }, ref) {
1848
+ return /* @__PURE__ */ jsxs12("figure", { ref, className: cn("b-figure", bleed && "b-figure--bleed", className), ...rest, children: [
1849
+ /* @__PURE__ */ jsx16("div", { className: "b-figure__frame", children }),
1850
+ caption ? /* @__PURE__ */ jsx16("figcaption", { className: "b-figure__caption", children: caption }) : null
1851
+ ] });
1852
+ });
1853
+ var FeatureRow = forwardRef12(function FeatureRow2({ title, body, media, flip, className, children, ...rest }, ref) {
1854
+ return /* @__PURE__ */ jsxs12("section", { ref, className: cn("b-feature-row", flip && "b-feature-row--flip", className), ...rest, children: [
1855
+ /* @__PURE__ */ jsxs12("div", { children: [
1856
+ title ? /* @__PURE__ */ jsx16("h3", { className: "b-feature-row__title", children: title }) : null,
1857
+ body ? /* @__PURE__ */ jsx16("div", { className: "b-feature-row__body", children: body }) : null,
1858
+ children
1859
+ ] }),
1860
+ media
1861
+ ] });
1862
+ });
1863
+ var PromoBand = forwardRef12(function PromoBand2({ title, body, className, children, ...rest }, ref) {
1864
+ return /* @__PURE__ */ jsxs12("section", { ref, className: cn("b-promo-band", className), ...rest, children: [
1865
+ title ? /* @__PURE__ */ jsx16("div", { className: "b-promo-band__title", children: title }) : null,
1866
+ body ? /* @__PURE__ */ jsx16("div", { className: "b-promo-band__body", children: body }) : null,
1867
+ children
1868
+ ] });
1869
+ });
1870
+
1871
+ // src/system.tsx
1872
+ import { forwardRef as forwardRef13 } from "react";
1873
+ import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
1874
+ var Auth = block("div", "b-auth", "Auth");
1875
+ var Onboarding = block("div", "b-onboarding", "Onboarding");
1876
+ var OnboardingHero = block("div", "b-onboarding__hero", "OnboardingHero");
1877
+ var AppGrid = block("div", "b-app-grid", "AppGrid");
1878
+ var AppTile = block("a", "b-app-tile", "AppTile");
1879
+ var Callout = block("p", "b-callout", "Callout");
1880
+ var Notification = block("div", "b-notification", "Notification");
1881
+ var Wall = block("div", "b-wall", "Wall");
1882
+ var GlassContainer = block("div", "b-glass-container", "GlassContainer");
1883
+ var AuthCard = forwardRef13(function AuthCard2({ logo, title, subtitle, footer, className, children, ...rest }, ref) {
1884
+ return /* @__PURE__ */ jsxs13("div", { ref, className: cn("b-auth-card", className), ...rest, children: [
1885
+ logo ? /* @__PURE__ */ jsx17("div", { className: "b-auth-card__logo", "aria-hidden": "true", children: logo }) : null,
1886
+ title ? /* @__PURE__ */ jsx17("div", { className: "b-auth-card__title", children: title }) : null,
1887
+ subtitle ? /* @__PURE__ */ jsx17("div", { className: "b-auth-card__subtitle", children: subtitle }) : null,
1888
+ children,
1889
+ footer ? /* @__PURE__ */ jsx17("div", { className: "b-auth-card__footer", children: footer }) : null
1890
+ ] });
1891
+ });
1892
+ var Result = forwardRef13(function Result2({ tone, icon, title, description, actions, className, children, ...rest }, ref) {
1893
+ return /* @__PURE__ */ jsxs13("div", { ref, className: cn("b-result", tone && `b-result--${tone}`, className), ...rest, children: [
1894
+ icon ? /* @__PURE__ */ jsx17("div", { className: "b-result__icon", "aria-hidden": "true", children: icon }) : null,
1895
+ title ? /* @__PURE__ */ jsx17("div", { className: "b-result__title", children: title }) : null,
1896
+ description ? /* @__PURE__ */ jsx17("p", { className: "b-result__desc", children: description }) : null,
1897
+ children,
1898
+ actions ? /* @__PURE__ */ jsx17("div", { className: "b-result__actions", children: actions }) : null
1899
+ ] });
1900
+ });
1901
+ var SysPage = forwardRef13(function SysPage2({ code, title, description, actions, className, children, ...rest }, ref) {
1902
+ return /* @__PURE__ */ jsxs13("div", { ref, className: cn("b-syspage", className), ...rest, children: [
1903
+ code ? /* @__PURE__ */ jsx17("div", { className: "b-syspage__code", children: code }) : null,
1904
+ title ? /* @__PURE__ */ jsx17("div", { className: "b-syspage__title", children: title }) : null,
1905
+ description ? /* @__PURE__ */ jsx17("p", { className: "b-syspage__desc", children: description }) : null,
1906
+ children,
1907
+ actions ? /* @__PURE__ */ jsx17("div", { className: "b-syspage__actions", children: actions }) : null
1908
+ ] });
1909
+ });
1910
+ var Banner = forwardRef13(function Banner2({ neutral, onDismiss, dismissLabel = "Dismiss", className, children, ...rest }, ref) {
1911
+ return /* @__PURE__ */ jsxs13("div", { ref, className: cn("b-banner", neutral && "b-banner--neutral", className), role: "status", ...rest, children: [
1912
+ /* @__PURE__ */ jsx17("span", { children }),
1913
+ onDismiss ? /* @__PURE__ */ jsx17("button", { type: "button", className: "b-banner__close", onClick: onDismiss, "aria-label": dismissLabel, children: /* @__PURE__ */ jsx17("svg", { viewBox: "0 0 20 20", fill: "none", width: "14", height: "14", "aria-hidden": "true", children: /* @__PURE__ */ jsx17("path", { d: "m5.5 5.5 9 9m0-9-9 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }) }) : null
1914
+ ] });
1915
+ });
1916
+
1917
+ // src/command.tsx
1918
+ import { forwardRef as forwardRef14 } from "react";
1919
+ import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
1920
+ var CommandList = block("ul", "b-cmdk__list", "CommandList");
1921
+ var CommandGroupLabel = block("li", "b-cmdk__group-label", "CommandGroupLabel");
1922
+ var CommandFooter = block("footer", "b-cmdk__footer", "CommandFooter");
1923
+ var HoverCard = block("div", "b-hover-card", "HoverCard");
1924
+ var CommandPalette = forwardRef14(
1925
+ function CommandPalette2({ className, children, ...rest }, ref) {
1926
+ return /* @__PURE__ */ jsx18("dialog", { ref, className: cn("b-modal b-cmdk", className), ...rest, children });
1927
+ }
1928
+ );
1929
+ var CommandInput = forwardRef14(
1930
+ function CommandInput2({ className, ...rest }, ref) {
1931
+ return /* @__PURE__ */ jsx18("input", { ref, type: "search", className: cn("b-cmdk__input", className), ...rest });
1932
+ }
1933
+ );
1934
+ var CommandItem = forwardRef14(function CommandItem2({ active, icon, className, children, ...rest }, ref) {
1935
+ return /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs14(
1936
+ "button",
1937
+ {
1938
+ ref,
1939
+ type: "button",
1940
+ className: cn("b-cmdk__item", active && "is-active", className),
1941
+ "aria-selected": active,
1942
+ ...rest,
1943
+ children: [
1944
+ icon,
1945
+ children
1946
+ ]
1947
+ }
1948
+ ) });
1949
+ });
1950
+
1951
+ // src/extras.tsx
1952
+ import { forwardRef as forwardRef15 } from "react";
1953
+ import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
1954
+ var ButtonGroup = forwardRef15(function ButtonGroup2({ attached, className, children, ...rest }, ref) {
1955
+ return /* @__PURE__ */ jsx19(
1956
+ "div",
1957
+ {
1958
+ ref,
1959
+ className: cn("b-btn-group", attached && "b-btn-group--attached", className),
1960
+ role: "group",
1961
+ ...rest,
1962
+ children
1963
+ }
1964
+ );
1965
+ });
1966
+ var SplitButton = forwardRef15(function SplitButton2({ children, menu, menuLabel = "More options", className, ...rest }, ref) {
1967
+ return /* @__PURE__ */ jsxs15("span", { ref, className: cn("b-split-btn", className), ...rest, children: [
1968
+ children,
1969
+ /* @__PURE__ */ jsx19("button", { type: "button", className: "b-btn b-btn--primary", "aria-label": menuLabel, "aria-haspopup": "menu", children: /* @__PURE__ */ jsx19("svg", { viewBox: "0 0 20 20", fill: "none", width: "14", height: "14", "aria-hidden": "true", children: /* @__PURE__ */ jsx19("path", { d: "m5 8 5 5 5-5", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
1970
+ menu
1971
+ ] });
1972
+ });
1973
+ var ToggleButton = forwardRef15(function ToggleButton2({ pressed, className, children, ...rest }, ref) {
1974
+ return /* @__PURE__ */ jsx19(
1975
+ "button",
1976
+ {
1977
+ ref,
1978
+ type: "button",
1979
+ className: cn("b-toggle-btn", pressed && "is-active", className),
1980
+ "aria-pressed": pressed,
1981
+ ...rest,
1982
+ children
1983
+ }
1984
+ );
1985
+ });
1986
+ var SortControl = block("div", "b-sort-control", "SortControl");
1987
+ var Share = block("div", "b-share", "Share");
1988
+ var Accordion = block("div", "b-accordion", "Accordion");
1989
+ var Disclosure = forwardRef15(function Disclosure2({ title, plain, defaultOpen, className, children, ...rest }, ref) {
1990
+ return /* @__PURE__ */ jsxs15(
1991
+ "details",
1992
+ {
1993
+ ref,
1994
+ className: cn("b-disclosure", plain && "b-disclosure--plain", className),
1995
+ open: defaultOpen,
1996
+ ...rest,
1997
+ children: [
1998
+ /* @__PURE__ */ jsx19("summary", { children: title }),
1999
+ /* @__PURE__ */ jsx19("div", { className: "b-disclosure__body", children })
2000
+ ]
2001
+ }
2002
+ );
2003
+ });
2004
+ var Calendar = block("div", "b-calendar", "Calendar");
2005
+ var CalendarGrid = block("div", "b-calendar__grid", "CalendarGrid");
2006
+ var CalendarMonth = block("span", "b-calendar__month", "CalendarMonth");
2007
+ var CalendarWeekday = block("span", "b-calendar__weekday", "CalendarWeekday");
2008
+ var CalendarHeader = block("div", "b-calendar__header", "CalendarHeader");
2009
+ var DatePicker = block("details", "b-datepicker", "DatePicker");
2010
+ var CalendarView = block("div", "b-calview", "CalendarView");
2011
+ var CalendarViewHead = block("div", "b-calview__head", "CalendarViewHead");
2012
+ var CalendarViewCell = block("div", "b-calview__cell", "CalendarViewCell");
2013
+ var CalendarDay = forwardRef15(function CalendarDay2({ muted, today, selected, className, children, ...rest }, ref) {
2014
+ return /* @__PURE__ */ jsx19(
2015
+ "button",
2016
+ {
2017
+ ref,
2018
+ type: "button",
2019
+ className: cn("b-calendar__day", muted && "is-muted", today && "is-today", selected && "is-selected", className),
2020
+ "aria-current": today ? "date" : void 0,
2021
+ "aria-pressed": selected || void 0,
2022
+ ...rest,
2023
+ children
2024
+ }
2025
+ );
2026
+ });
2027
+ var Event = forwardRef15(function Event2({ tone, className, children, ...rest }, ref) {
2028
+ return /* @__PURE__ */ jsx19("div", { ref, className: cn("b-event", tone && `b-event--${tone}`, className), ...rest, children });
2029
+ });
2030
+ var Combobox = block("div", "b-combobox", "Combobox");
2031
+ var ComboboxList = block("ul", "b-combobox__list", "ComboboxList");
2032
+ var ComboboxEmpty = block("li", "b-combobox__empty", "ComboboxEmpty");
2033
+ var SearchResults = block("div", "b-search-results", "SearchResults");
2034
+ var ComboboxOption = forwardRef15(function ComboboxOption2({ selected, className, children, ...rest }, ref) {
2035
+ return /* @__PURE__ */ jsx19(
2036
+ "li",
2037
+ {
2038
+ ref,
2039
+ role: "option",
2040
+ "aria-selected": selected,
2041
+ className: cn("b-combobox__option", selected && "is-active", className),
2042
+ ...rest,
2043
+ children
2044
+ }
2045
+ );
2046
+ });
2047
+ var SearchResult = forwardRef15(function SearchResult2({ title, snippet, path, className, ...rest }, ref) {
2048
+ return /* @__PURE__ */ jsxs15("a", { ref, className: cn("b-search-result", className), ...rest, children: [
2049
+ /* @__PURE__ */ jsx19("span", { className: "b-search-result__title", children: title }),
2050
+ snippet ? /* @__PURE__ */ jsx19("span", { className: "b-search-result__snippet", children: snippet }) : null,
2051
+ path ? /* @__PURE__ */ jsx19("span", { className: "b-search-result__path", children: path }) : null
2052
+ ] });
2053
+ });
2054
+ var Carousel = block("div", "b-carousel", "Carousel");
2055
+ var CarouselTrack = block("div", "b-carousel__track", "CarouselTrack");
2056
+ var CarouselSlide = block("div", "b-carousel__slide", "CarouselSlide");
2057
+ var CarouselDots = block("div", "b-carousel__dots", "CarouselDots");
2058
+ var Gallery = block("div", "b-gallery", "Gallery");
2059
+ var ImageViewer = block("div", "b-image-viewer", "ImageViewer");
2060
+ var ImageViewerBar = block("div", "b-image-viewer__bar", "ImageViewerBar");
2061
+ var UploadPreviews = block("div", "b-upload-previews", "UploadPreviews");
2062
+ var UploadPreview = block("div", "b-upload-preview", "UploadPreview");
2063
+ var Lightbox = forwardRef15(function Lightbox2({ caption, actions, className, children, ...rest }, ref) {
2064
+ return /* @__PURE__ */ jsxs15("dialog", { ref, className: cn("b-lightbox", className), ...rest, children: [
2065
+ /* @__PURE__ */ jsx19("div", { className: "b-lightbox__frame", children }),
2066
+ caption ? /* @__PURE__ */ jsx19("div", { className: "b-lightbox__caption", children: caption }) : null,
2067
+ actions ? /* @__PURE__ */ jsx19("div", { className: "b-lightbox__actions", children: actions }) : null
2068
+ ] });
2069
+ });
2070
+ var AccountSwitcher = block("div", "b-account-switcher", "AccountSwitcher");
2071
+ var CommandCenter = block("div", "b-command-center", "CommandCenter");
2072
+ var Gantt = block("div", "b-gantt", "Gantt");
2073
+ var GanttRow = block("div", "b-gantt__row", "GanttRow");
2074
+ var GanttBar = block("div", "b-gantt__bar", "GanttBar");
2075
+ var HoverCardHost = block("span", "b-hover-card-host", "HoverCardHost");
2076
+ var GlassInteractive = block("div", "b-glass-interactive", "GlassInteractive");
2077
+ var Rail = forwardRef15(function Rail2({ material, className, children, ...rest }, ref) {
2078
+ return /* @__PURE__ */ jsx19("nav", { ref, className: cn("b-rail", material && `b-rail--${material}`, className), ...rest, children });
2079
+ });
2080
+ var RailItem = block("a", "b-rail__item", "RailItem");
2081
+ var Account = forwardRef15(function Account2({ name, email, current, className, children, ...rest }, ref) {
2082
+ return /* @__PURE__ */ jsxs15("div", { ref, className: cn("b-account", className), ...rest, children: [
2083
+ children,
2084
+ /* @__PURE__ */ jsxs15("span", { className: "b-account__meta", children: [
2085
+ /* @__PURE__ */ jsx19("span", { className: "b-account__name", children: name }),
2086
+ email ? /* @__PURE__ */ jsx19("span", { className: "b-account__email", children: email }) : null
2087
+ ] }),
2088
+ current ? /* @__PURE__ */ jsx19("span", { className: "b-account__check", "aria-label": "Current account", children: /* @__PURE__ */ jsx19("svg", { viewBox: "0 0 20 20", fill: "none", width: "16", height: "16", "aria-hidden": "true", children: /* @__PURE__ */ jsx19("path", { d: "M4 10.5 8.5 15 16 5.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }) : null
2089
+ ] });
2090
+ });
2091
+ var OnboardingFeature = forwardRef15(
2092
+ function OnboardingFeature2({ title, description, icon, className, ...rest }, ref) {
2093
+ return /* @__PURE__ */ jsxs15("div", { ref, className: cn("b-onboarding-feature", className), ...rest, children: [
2094
+ icon,
2095
+ /* @__PURE__ */ jsxs15("div", { children: [
2096
+ /* @__PURE__ */ jsx19("div", { className: "b-onboarding-feature__title", children: title }),
2097
+ description ? /* @__PURE__ */ jsx19("p", { className: "b-onboarding-feature__desc", children: description }) : null
2098
+ ] })
2099
+ ] });
2100
+ }
2101
+ );
2102
+
2103
+ // src/media.tsx
2104
+ import { forwardRef as forwardRef16 } from "react";
2105
+ import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
2106
+ var MediaPlaceholder = block("div", "b-media-placeholder", "MediaPlaceholder");
2107
+ var AsyncImage = block("span", "b-async-img", "AsyncImage");
2108
+ var Web = block("div", "b-web", "Web");
2109
+ var Video = block("video", "b-video", "Video");
2110
+ var Audio = block("div", "b-audio", "Audio");
2111
+ var Waveform = block("div", "b-waveform", "Waveform");
2112
+ var Thumb = forwardRef16(function Thumb2({ duration, className, children, ...rest }, ref) {
2113
+ return /* @__PURE__ */ jsxs16("div", { ref, className: cn("b-thumb", duration !== void 0 && "b-thumb--video", className), ...rest, children: [
2114
+ children,
2115
+ duration ? /* @__PURE__ */ jsx20("span", { className: "b-thumb__duration", children: duration }) : null
2116
+ ] });
2117
+ });
2118
+ var CircularProgress = forwardRef16(
2119
+ function CircularProgress2({ value, label, description, className, style, ...rest }, ref) {
2120
+ return /* @__PURE__ */ jsx20("div", { className: "b-circular-wrap", children: /* @__PURE__ */ jsx20(
2121
+ "div",
2122
+ {
2123
+ ref,
2124
+ className: cn("b-circular", className),
2125
+ style: { ...value === void 0 ? null : { ["--b-progress"]: value }, ...style },
2126
+ role: "progressbar",
2127
+ "aria-valuenow": value,
2128
+ "aria-valuemin": value === void 0 ? void 0 : 0,
2129
+ "aria-valuemax": value === void 0 ? void 0 : 100,
2130
+ "aria-label": description,
2131
+ ...rest,
2132
+ children: label ? /* @__PURE__ */ jsx20("div", { className: "b-circular__label", children: label }) : null
2133
+ }
2134
+ ) });
2135
+ }
2136
+ );
2137
+ var Axis = forwardRef16(function Axis2({ y, ticks, className, children, ...rest }, ref) {
2138
+ return /* @__PURE__ */ jsx20("div", { ref, className: cn("b-axis", y && "b-axis--y", className), "aria-hidden": "true", ...rest, children: ticks ? ticks.map((tick, i) => /* @__PURE__ */ jsx20("span", { children: tick }, i)) : children });
2139
+ });
2140
+ var RadarChart = block("svg", "b-radar-svg", "RadarChart");
2141
+ var LineChart = block("svg", "b-line-svg", "LineChart");
2142
+ var AreaChart = block("svg", "b-area-svg", "AreaChart");
2143
+ var ScatterChart = block("svg", "b-scatter-svg", "ScatterChart");
2144
+ var GridLines = block("div", "b-gridlines", "GridLines");
2145
+ var MenuBar = block("div", "b-menubar", "MenuBar");
2146
+ var MenuBarItem = block("button", "b-menubar__item", "MenuBarItem");
2147
+ var PaginationEllipsis = block("span", "b-pagination__ellipsis", "PaginationEllipsis");
2148
+ var Pagination = forwardRef16(function Pagination2({ label = "Pagination", className, children, ...rest }, ref) {
2149
+ return /* @__PURE__ */ jsx20("nav", { ref, "aria-label": label, ...rest, children: /* @__PURE__ */ jsx20("ul", { className: cn("b-pagination", className), children }) });
2150
+ });
2151
+ var PaginationItem = forwardRef16(
2152
+ function PaginationItem2({ current, className, children, ...rest }, ref) {
2153
+ return /* @__PURE__ */ jsx20("li", { children: /* @__PURE__ */ jsx20(
2154
+ "a",
2155
+ {
2156
+ ref,
2157
+ className: cn("b-pagination__item", current && "is-active", className),
2158
+ "aria-current": current ? "page" : void 0,
2159
+ ...rest,
2160
+ children
2161
+ }
2162
+ ) });
2163
+ }
2164
+ );
2165
+ var LiquidToggle = forwardRef16(function LiquidToggle2({ pressed, className, children, ...rest }, ref) {
2166
+ return /* @__PURE__ */ jsx20(
2167
+ "button",
2168
+ {
2169
+ ref,
2170
+ type: "button",
2171
+ className: cn("b-liquid-toggle", className),
2172
+ "aria-pressed": pressed,
2173
+ ...rest,
2174
+ children
2175
+ }
2176
+ );
2177
+ });
2178
+ var CommandCenterTile = block("div", "b-cc__tile", "CommandCenterTile");
2179
+ var CommandCenterLabel = block("div", "b-cc__label", "CommandCenterLabel");
2180
+ var CommandCenterStatus = block("div", "b-cc__status", "CommandCenterStatus");
2181
+ var ImageLens = block("div", "b-lens", "ImageLens");
2182
+ export {
2183
+ Accordion,
2184
+ Account,
2185
+ AccountSwitcher,
2186
+ ActionSheet,
2187
+ Alert,
2188
+ AlertDialog,
2189
+ AppGrid,
2190
+ AppTile,
2191
+ AreaChart,
2192
+ AsyncImage,
2193
+ Audio,
2194
+ Auth,
2195
+ AuthCard,
2196
+ Avatar,
2197
+ AvatarGroup,
2198
+ Axis,
2199
+ BackButton,
2200
+ Badge,
2201
+ Banner,
2202
+ Bars,
2203
+ BaruaProvider,
2204
+ Bento,
2205
+ BottomNav,
2206
+ BottomNavItem,
2207
+ BottomSheet,
2208
+ Breadcrumbs,
2209
+ BulkActions,
2210
+ Button,
2211
+ ButtonGroup,
2212
+ ButtonLink,
2213
+ Calendar,
2214
+ CalendarDay,
2215
+ CalendarGrid,
2216
+ CalendarHeader,
2217
+ CalendarMonth,
2218
+ CalendarView,
2219
+ CalendarViewCell,
2220
+ CalendarViewHead,
2221
+ CalendarWeekday,
2222
+ Callout,
2223
+ Card,
2224
+ CardBody,
2225
+ CardEyebrow,
2226
+ CardFooter,
2227
+ CardGrid,
2228
+ CardHeader,
2229
+ CardRail,
2230
+ CardSubtitle,
2231
+ CardTitle,
2232
+ Carousel,
2233
+ CarouselDots,
2234
+ CarouselSlide,
2235
+ CarouselTrack,
2236
+ Chapter,
2237
+ Chart,
2238
+ ChartTip,
2239
+ Checkbox,
2240
+ Chip,
2241
+ CircularProgress,
2242
+ CodeBlock,
2243
+ Columns,
2244
+ Combobox,
2245
+ ComboboxEmpty,
2246
+ ComboboxList,
2247
+ ComboboxOption,
2248
+ CommandCenter,
2249
+ CommandCenterLabel,
2250
+ CommandCenterStatus,
2251
+ CommandCenterTile,
2252
+ CommandFooter,
2253
+ CommandGroupLabel,
2254
+ CommandInput,
2255
+ CommandItem,
2256
+ CommandList,
2257
+ CommandPalette,
2258
+ Container,
2259
+ Dashboard,
2260
+ DataGrid,
2261
+ DatePicker,
2262
+ DescriptionList,
2263
+ Disclosure,
2264
+ Divider,
2265
+ Dock,
2266
+ DockItem,
2267
+ DockTray,
2268
+ Donut,
2269
+ DragHandle,
2270
+ Drawer,
2271
+ DrawerBody,
2272
+ DrawerHeader,
2273
+ Dropdown,
2274
+ Dropzone,
2275
+ EmptyState,
2276
+ ErrorText,
2277
+ Event,
2278
+ Fab,
2279
+ FeatureRow,
2280
+ Feed,
2281
+ Field,
2282
+ Fieldset,
2283
+ Figure,
2284
+ FileBrowser,
2285
+ FileGrid,
2286
+ FileTile,
2287
+ FilterBar,
2288
+ FilterChip,
2289
+ Footnote,
2290
+ Footnotes,
2291
+ Form,
2292
+ FormActions,
2293
+ FormRow,
2294
+ FormSection,
2295
+ Gallery,
2296
+ Gantt,
2297
+ GanttBar,
2298
+ GanttRow,
2299
+ Gauge,
2300
+ GlassContainer,
2301
+ GlassInteractive,
2302
+ Grid,
2303
+ GridLines,
2304
+ GroupBox,
2305
+ Grow,
2306
+ HStack,
2307
+ Heatmap,
2308
+ Help,
2309
+ Hero,
2310
+ HoverCard,
2311
+ HoverCardHost,
2312
+ Icon,
2313
+ IconTile,
2314
+ ImageLens,
2315
+ ImageViewer,
2316
+ ImageViewerBar,
2317
+ Input,
2318
+ InputGroup,
2319
+ Inspector,
2320
+ Kanban,
2321
+ KanbanColumn,
2322
+ KanbanList,
2323
+ Kbd,
2324
+ Label,
2325
+ Labeled,
2326
+ Landing,
2327
+ Legend,
2328
+ Lightbox,
2329
+ LineChart,
2330
+ LinearGauge,
2331
+ Link,
2332
+ LinkGroup,
2333
+ LiquidToggle,
2334
+ List,
2335
+ ListFooter,
2336
+ ListHeader,
2337
+ ListItem,
2338
+ Log,
2339
+ MarketingNav,
2340
+ MarketingNavBrand,
2341
+ MarketingNavLinks,
2342
+ MediaPlaceholder,
2343
+ Menu,
2344
+ MenuBar,
2345
+ MenuBarItem,
2346
+ MenuItem,
2347
+ MenuLabel,
2348
+ MenuSeparator,
2349
+ Modal,
2350
+ Notification,
2351
+ Onboarding,
2352
+ OnboardingFeature,
2353
+ OnboardingHero,
2354
+ Optional,
2355
+ OtpInput,
2356
+ Overline,
2357
+ Pagination,
2358
+ PaginationEllipsis,
2359
+ PaginationItem,
2360
+ PillNav,
2361
+ Popover,
2362
+ Progress,
2363
+ PromoBand,
2364
+ Quote,
2365
+ RadarChart,
2366
+ Radio,
2367
+ Rail,
2368
+ RailItem,
2369
+ Range,
2370
+ Resizable,
2371
+ ResizeHandle,
2372
+ Result,
2373
+ SafeArea,
2374
+ ScatterChart,
2375
+ ScrollArea,
2376
+ SearchField,
2377
+ SearchResult,
2378
+ SearchResults,
2379
+ Section,
2380
+ Segmented,
2381
+ Select,
2382
+ SelectionCount,
2383
+ Share,
2384
+ Sheet,
2385
+ Sidebar,
2386
+ SidebarGroup,
2387
+ SidebarHeading,
2388
+ SidebarItem,
2389
+ SiteFooter,
2390
+ SiteFooterGroup,
2391
+ SiteFooterGroups,
2392
+ SiteFooterHeading,
2393
+ SiteFooterLegal,
2394
+ Skeleton,
2395
+ SkipLink,
2396
+ Slider,
2397
+ SortControl,
2398
+ Spacer,
2399
+ Span,
2400
+ Sparkline,
2401
+ SpecStrip,
2402
+ Spinner,
2403
+ Split,
2404
+ SplitButton,
2405
+ Stack,
2406
+ Stage,
2407
+ Stat,
2408
+ StatusBar,
2409
+ StatusBarItem,
2410
+ StatusDot,
2411
+ StepperInput,
2412
+ Steps,
2413
+ StoryCard,
2414
+ Swatch,
2415
+ Swatches,
2416
+ Switch,
2417
+ SysPage,
2418
+ TabPanel,
2419
+ Table,
2420
+ TableNum,
2421
+ TableSortHeader,
2422
+ TableWrap,
2423
+ Tabs,
2424
+ Tag,
2425
+ Task,
2426
+ TaskList,
2427
+ TaskRow,
2428
+ Text,
2429
+ Textarea,
2430
+ ThemeScript,
2431
+ Thumb,
2432
+ Timeline,
2433
+ Tip,
2434
+ ToastProvider,
2435
+ ToggleButton,
2436
+ Toolbar,
2437
+ Tooltip,
2438
+ TopNav,
2439
+ TopNavBrand,
2440
+ TopNavLink,
2441
+ TopNavLinks,
2442
+ Tree,
2443
+ TreeItem,
2444
+ Upload,
2445
+ UploadItem,
2446
+ UploadPreview,
2447
+ UploadPreviews,
2448
+ VStack,
2449
+ Video,
2450
+ Wall,
2451
+ Waveform,
2452
+ Web,
2453
+ Workspace,
2454
+ WorkspaceMain,
2455
+ block,
2456
+ buttonClasses,
2457
+ cn,
2458
+ iconNames,
2459
+ useBaruaTheme,
2460
+ useToast
2461
+ };
2462
+ //# sourceMappingURL=index.js.map