base-themes 0.1.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.
Files changed (54) hide show
  1. package/README.md +174 -0
  2. package/dist/base-themes.css +2 -0
  3. package/dist/base-themes.js +918 -0
  4. package/dist/types/components/ui/Accordion.d.ts +15 -0
  5. package/dist/types/components/ui/AlertDialog.d.ts +16 -0
  6. package/dist/types/components/ui/Autocomplete.d.ts +20 -0
  7. package/dist/types/components/ui/Avatar.d.ts +16 -0
  8. package/dist/types/components/ui/Button.d.ts +9 -0
  9. package/dist/types/components/ui/Checkbox.d.ts +9 -0
  10. package/dist/types/components/ui/CheckboxGroup.d.ts +11 -0
  11. package/dist/types/components/ui/Collapsible.d.ts +12 -0
  12. package/dist/types/components/ui/Combobox.d.ts +13 -0
  13. package/dist/types/components/ui/ContextMenu.d.ts +17 -0
  14. package/dist/types/components/ui/CspProvider.d.ts +5 -0
  15. package/dist/types/components/ui/Dialog.d.ts +13 -0
  16. package/dist/types/components/ui/DirectionProvider.d.ts +6 -0
  17. package/dist/types/components/ui/Drawer.d.ts +14 -0
  18. package/dist/types/components/ui/Field.d.ts +11 -0
  19. package/dist/types/components/ui/Fieldset.d.ts +8 -0
  20. package/dist/types/components/ui/Form.d.ts +7 -0
  21. package/dist/types/components/ui/Input.d.ts +13 -0
  22. package/dist/types/components/ui/Menu.d.ts +17 -0
  23. package/dist/types/components/ui/Menubar.d.ts +18 -0
  24. package/dist/types/components/ui/Meter.d.ts +9 -0
  25. package/dist/types/components/ui/NavigationMenu.d.ts +16 -0
  26. package/dist/types/components/ui/NumberField.d.ts +8 -0
  27. package/dist/types/components/ui/OtpField.d.ts +9 -0
  28. package/dist/types/components/ui/Popover.d.ts +13 -0
  29. package/dist/types/components/ui/PreviewCard.d.ts +14 -0
  30. package/dist/types/components/ui/Progress.d.ts +9 -0
  31. package/dist/types/components/ui/Radio.d.ts +8 -0
  32. package/dist/types/components/ui/RadioGroup.d.ts +13 -0
  33. package/dist/types/components/ui/ScrollArea.d.ts +5 -0
  34. package/dist/types/components/ui/Select.d.ts +9 -0
  35. package/dist/types/components/ui/Separator.d.ts +5 -0
  36. package/dist/types/components/ui/Slider.d.ts +7 -0
  37. package/dist/types/components/ui/Switch.d.ts +9 -0
  38. package/dist/types/components/ui/Tabs.d.ts +16 -0
  39. package/dist/types/components/ui/Toast.d.ts +7 -0
  40. package/dist/types/components/ui/Toggle.d.ts +5 -0
  41. package/dist/types/components/ui/ToggleGroup.d.ts +13 -0
  42. package/dist/types/components/ui/Toolbar.d.ts +8 -0
  43. package/dist/types/components/ui/Tooltip.d.ts +14 -0
  44. package/dist/types/components/ui/index.d.ts +82 -0
  45. package/dist/types/components/ui/useDirection.d.ts +1 -0
  46. package/dist/types/components/ui/useToastManager.d.ts +4 -0
  47. package/dist/types/hooks/useTheme.d.ts +10 -0
  48. package/dist/types/lib.d.ts +3 -0
  49. package/package.json +68 -0
  50. package/public/previews/base-themes-bento.png +0 -0
  51. package/public/previews/base-themes-neo-brutalism.png +0 -0
  52. package/public/previews/base-themes-shadcn.png +0 -0
  53. package/registry/registry.json +64 -0
  54. package/skills/base-themes/SKILL.md +107 -0
@@ -0,0 +1,918 @@
1
+ import { Accordion as e } from "@base-ui/react/accordion";
2
+ import { forwardRef as t, useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
3
+ import o from "clsx";
4
+ import { Bold as s, Check as c, ChevronDown as l, Italic as ee, Link as te, Minus as ne, Plus as re, Search as ie, X as u } from "lucide-react";
5
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
6
+ import { AlertDialog as p } from "@base-ui/react/alert-dialog";
7
+ import { Autocomplete as m } from "@base-ui/react/autocomplete";
8
+ import { Avatar as h } from "@base-ui/react/avatar";
9
+ import { Button as ae } from "@base-ui/react/button";
10
+ import { Checkbox as g } from "@base-ui/react/checkbox";
11
+ import { CheckboxGroup as oe } from "@base-ui/react/checkbox-group";
12
+ import { Collapsible as _ } from "@base-ui/react/collapsible";
13
+ import { Combobox as v } from "@base-ui/react/combobox";
14
+ import { ContextMenu as y } from "@base-ui/react/context-menu";
15
+ import { CSPProvider as se } from "@base-ui/react/csp-provider";
16
+ import { Dialog as b } from "@base-ui/react/dialog";
17
+ import { DirectionProvider as ce, useDirection as le } from "@base-ui/react/direction-provider";
18
+ import { Drawer as x } from "@base-ui/react/drawer";
19
+ import { Field as S } from "@base-ui/react/field";
20
+ import { Fieldset as C } from "@base-ui/react/fieldset";
21
+ import { Form as ue } from "@base-ui/react/form";
22
+ import { Input as de } from "@base-ui/react/input";
23
+ import { Menu as w, Menu as T } from "@base-ui/react/menu";
24
+ import { Menubar as fe } from "@base-ui/react/menubar";
25
+ import { Meter as E } from "@base-ui/react/meter";
26
+ import { NavigationMenu as D } from "@base-ui/react/navigation-menu";
27
+ import { NumberField as O } from "@base-ui/react/number-field";
28
+ import { OTPFieldPreview as k } from "@base-ui/react/otp-field";
29
+ import { Popover as A } from "@base-ui/react/popover";
30
+ import { PreviewCard as j } from "@base-ui/react/preview-card";
31
+ import { Progress as M } from "@base-ui/react/progress";
32
+ import { Radio as N, Radio as P } from "@base-ui/react/radio";
33
+ import { RadioGroup as pe } from "@base-ui/react/radio-group";
34
+ import { ScrollArea as F } from "@base-ui/react/scroll-area";
35
+ import { Select as I } from "@base-ui/react/select";
36
+ import { Separator as me } from "@base-ui/react/separator";
37
+ import { Slider as L } from "@base-ui/react/slider";
38
+ import { Switch as he } from "@base-ui/react/switch";
39
+ import { Tabs as R } from "@base-ui/react/tabs";
40
+ import { Toggle as z } from "@base-ui/react/toggle";
41
+ import { Toast as B } from "@base-ui/react/toast";
42
+ import { ToggleGroup as ge } from "@base-ui/react/toggle-group";
43
+ import { Toolbar as V } from "@base-ui/react/toolbar";
44
+ import { Tooltip as H } from "@base-ui/react/tooltip";
45
+ //#region src/components/ui/Accordion.tsx
46
+ function _e({ items: t, defaultValue: n, className: r, ...i }) {
47
+ return /* @__PURE__ */ d(e.Root, {
48
+ defaultValue: n ?? t.slice(0, 1).map((e) => e.value),
49
+ className: o("bento-accordion", r),
50
+ ...i,
51
+ children: t.map((t) => /* @__PURE__ */ f(e.Item, {
52
+ className: "bento-accordion-item",
53
+ value: t.value,
54
+ children: [/* @__PURE__ */ d(e.Header, {
55
+ className: "bento-accordion-header",
56
+ children: /* @__PURE__ */ f(e.Trigger, {
57
+ className: "bento-accordion-trigger",
58
+ children: [t.label, /* @__PURE__ */ d(l, { size: 15 })]
59
+ })
60
+ }), /* @__PURE__ */ d(e.Panel, {
61
+ className: "bento-accordion-panel",
62
+ children: t.content
63
+ })]
64
+ }, t.value))
65
+ });
66
+ }
67
+ //#endregion
68
+ //#region src/components/ui/AlertDialog.tsx
69
+ function ve({ trigger: e, title: t, description: n, confirmLabel: r = "Confirm", cancelLabel: i = "Cancel", onConfirm: a, className: s }) {
70
+ return /* @__PURE__ */ f(p.Root, { children: [/* @__PURE__ */ d(p.Trigger, { render: e }), /* @__PURE__ */ f(p.Portal, { children: [/* @__PURE__ */ d(p.Backdrop, { className: "bento-alert-backdrop" }), /* @__PURE__ */ f(p.Popup, {
71
+ className: o("bento-alert-popup", s),
72
+ children: [
73
+ /* @__PURE__ */ d(p.Title, {
74
+ className: "bento-alert-title",
75
+ children: t
76
+ }),
77
+ /* @__PURE__ */ d(p.Description, {
78
+ className: "bento-alert-description",
79
+ children: n
80
+ }),
81
+ /* @__PURE__ */ f("div", {
82
+ className: "bento-alert-actions",
83
+ children: [/* @__PURE__ */ f(p.Close, {
84
+ className: "bento-button outline",
85
+ children: [" ", i]
86
+ }), /* @__PURE__ */ d(p.Close, {
87
+ className: "bento-button accent",
88
+ onClick: a,
89
+ children: r
90
+ })]
91
+ })
92
+ ]
93
+ })] })] });
94
+ }
95
+ //#endregion
96
+ //#region src/components/ui/Autocomplete.tsx
97
+ function ye({ options: e, label: t, placeholder: n = "Search...", className: r, ...i }) {
98
+ return /* @__PURE__ */ d("div", {
99
+ className: o("bento-combobox bento-autocomplete", r),
100
+ children: /* @__PURE__ */ f(m.Root, {
101
+ items: e,
102
+ ...i,
103
+ children: [
104
+ t && /* @__PURE__ */ d("label", {
105
+ className: "field-label",
106
+ children: t
107
+ }),
108
+ /* @__PURE__ */ f(m.InputGroup, {
109
+ className: "bento-combobox-input-wrap",
110
+ children: [/* @__PURE__ */ d(ie, { size: 15 }), /* @__PURE__ */ d(m.Input, {
111
+ className: "bento-combobox-input",
112
+ placeholder: n
113
+ })]
114
+ }),
115
+ /* @__PURE__ */ d(m.Portal, { children: /* @__PURE__ */ d(m.Positioner, {
116
+ className: "bento-combobox-positioner",
117
+ sideOffset: 8,
118
+ children: /* @__PURE__ */ f(m.Popup, {
119
+ className: "bento-combobox-popup",
120
+ children: [/* @__PURE__ */ d(m.Empty, {
121
+ className: "bento-combobox-empty",
122
+ children: "No results"
123
+ }), /* @__PURE__ */ d(m.List, { children: (e) => /* @__PURE__ */ f(m.Item, {
124
+ className: "bento-combobox-item",
125
+ value: e.value,
126
+ children: [/* @__PURE__ */ d(m.Value, { children: e.label }), /* @__PURE__ */ d(c, { size: 14 })]
127
+ }, e.value) })]
128
+ })
129
+ }) })
130
+ ]
131
+ })
132
+ });
133
+ }
134
+ //#endregion
135
+ //#region src/components/ui/Avatar.tsx
136
+ var U = t(({ src: e, alt: t, fallback: n, size: r, className: i, ...a }, s) => /* @__PURE__ */ f(h.Root, {
137
+ ref: s,
138
+ className: o("bento-avatar", r && r !== "md" && r, i),
139
+ ...a,
140
+ children: [e && /* @__PURE__ */ d(h.Image, {
141
+ src: e,
142
+ alt: t
143
+ }), /* @__PURE__ */ d(h.Fallback, { children: n })]
144
+ }));
145
+ U.displayName = "Avatar";
146
+ var W = t(({ className: e, ...t }, n) => /* @__PURE__ */ d("div", {
147
+ ref: n,
148
+ className: o("bento-avatar-group", e),
149
+ ...t
150
+ }));
151
+ W.displayName = "AvatarGroup";
152
+ //#endregion
153
+ //#region src/components/ui/Button.tsx
154
+ var G = t(({ variant: e = "primary", className: t, ...n }, r) => /* @__PURE__ */ d(ae, {
155
+ ref: r,
156
+ className: o("bento-button", e !== "primary" && e, t),
157
+ ...n
158
+ }));
159
+ G.displayName = "Button";
160
+ //#endregion
161
+ //#region src/components/ui/Checkbox.tsx
162
+ var K = t(({ label: e, className: t, id: n, ...r }, i) => {
163
+ let a = /* @__PURE__ */ d(g.Root, {
164
+ ref: i,
165
+ id: n,
166
+ className: o("bento-checkbox", t),
167
+ ...r,
168
+ children: /* @__PURE__ */ d(g.Indicator, { children: /* @__PURE__ */ d(c, { size: 14 }) })
169
+ });
170
+ return e ? /* @__PURE__ */ f("label", {
171
+ className: "bento-checkbox-label",
172
+ htmlFor: n,
173
+ children: [a, e]
174
+ }) : a;
175
+ });
176
+ K.displayName = "Checkbox";
177
+ //#endregion
178
+ //#region src/components/ui/CheckboxGroup.tsx
179
+ function be({ options: e, className: t, defaultValue: n, ...r }) {
180
+ return /* @__PURE__ */ d(oe, {
181
+ className: o("bento-checkbox-group", t),
182
+ defaultValue: n,
183
+ ...r,
184
+ children: e.map((e) => /* @__PURE__ */ d(K, {
185
+ name: e.value,
186
+ value: e.value,
187
+ label: e.label
188
+ }, e.value))
189
+ });
190
+ }
191
+ //#endregion
192
+ //#region src/components/ui/Collapsible.tsx
193
+ function xe({ label: e, children: t, defaultOpen: n, className: r }) {
194
+ return /* @__PURE__ */ f(_.Root, {
195
+ defaultOpen: n,
196
+ className: o("bento-collapsible", r),
197
+ children: [/* @__PURE__ */ f(_.Trigger, {
198
+ className: "bento-collapsible-trigger",
199
+ children: [e, /* @__PURE__ */ d(l, { size: 15 })]
200
+ }), /* @__PURE__ */ d(_.Panel, {
201
+ className: "bento-collapsible-panel",
202
+ children: t
203
+ })]
204
+ });
205
+ }
206
+ //#endregion
207
+ //#region src/components/ui/Combobox.tsx
208
+ function Se({ options: e, placeholder: t = "Search...", label: n, className: r }) {
209
+ let [i, s] = a(""), c = e.filter((e) => e.label.toLowerCase().includes(i.toLowerCase()));
210
+ return /* @__PURE__ */ f("div", {
211
+ className: o("bento-combobox", r),
212
+ children: [n && /* @__PURE__ */ d("label", {
213
+ className: "field-label",
214
+ children: n
215
+ }), /* @__PURE__ */ f(v.Root, {
216
+ inputValue: i,
217
+ onInputValueChange: s,
218
+ children: [/* @__PURE__ */ d(v.Input, {
219
+ className: "bento-combobox-input",
220
+ placeholder: t
221
+ }), /* @__PURE__ */ d(v.Portal, { children: /* @__PURE__ */ d(v.Positioner, {
222
+ sideOffset: 8,
223
+ children: /* @__PURE__ */ d(v.Popup, {
224
+ className: "bento-combobox-popup",
225
+ children: c.length === 0 ? /* @__PURE__ */ d("div", {
226
+ className: "bento-combobox-no-results",
227
+ children: "No results"
228
+ }) : c.map((e) => /* @__PURE__ */ d(v.Item, {
229
+ className: "bento-combobox-item",
230
+ value: e.value,
231
+ children: e.label
232
+ }, e.value))
233
+ })
234
+ }) })]
235
+ })]
236
+ });
237
+ }
238
+ //#endregion
239
+ //#region src/components/ui/ContextMenu.tsx
240
+ function Ce({ children: e, items: t, className: n }) {
241
+ return /* @__PURE__ */ f(y.Root, { children: [/* @__PURE__ */ d(y.Trigger, {
242
+ className: "bento-context-menu-trigger",
243
+ children: e
244
+ }), /* @__PURE__ */ d(y.Portal, { children: /* @__PURE__ */ d(y.Positioner, {
245
+ className: "bento-menu-positioner",
246
+ sideOffset: 8,
247
+ children: /* @__PURE__ */ d(y.Popup, {
248
+ className: o("bento-menu-popup", n),
249
+ children: t.map((e, t) => e === "separator" ? /* @__PURE__ */ d(y.Separator, { className: "bento-menu-separator" }, t) : /* @__PURE__ */ f(y.Item, {
250
+ className: "bento-menu-item",
251
+ disabled: e.disabled,
252
+ onClick: e.onClick,
253
+ children: [e.icon, e.label]
254
+ }, t))
255
+ })
256
+ }) })] });
257
+ }
258
+ //#endregion
259
+ //#region src/components/ui/CspProvider.tsx
260
+ function we(e) {
261
+ return /* @__PURE__ */ d(se, { ...e });
262
+ }
263
+ //#endregion
264
+ //#region src/components/ui/Dialog.tsx
265
+ function Te({ trigger: e, title: t, description: n, children: r, className: i }) {
266
+ return /* @__PURE__ */ f(b.Root, { children: [/* @__PURE__ */ d(b.Trigger, { render: e }), /* @__PURE__ */ f(b.Portal, { children: [/* @__PURE__ */ d(b.Backdrop, { className: "bento-dialog-backdrop" }), /* @__PURE__ */ f(b.Popup, {
267
+ className: o("bento-dialog-popup", i),
268
+ children: [
269
+ /* @__PURE__ */ f("div", {
270
+ className: "bento-dialog-topline",
271
+ children: [/* @__PURE__ */ d(b.Title, {
272
+ className: "bento-dialog-title",
273
+ children: t
274
+ }), /* @__PURE__ */ d(b.Close, {
275
+ className: "bento-button icon",
276
+ "aria-label": "Close dialog",
277
+ render: /* @__PURE__ */ d("button", { type: "button" }),
278
+ children: /* @__PURE__ */ d(u, { size: 18 })
279
+ })]
280
+ }),
281
+ n && /* @__PURE__ */ d(b.Description, {
282
+ className: "bento-dialog-description",
283
+ children: n
284
+ }),
285
+ r
286
+ ]
287
+ })] })] });
288
+ }
289
+ //#endregion
290
+ //#region src/components/ui/DirectionProvider.tsx
291
+ function Ee({ children: e, direction: t = "ltr" }) {
292
+ return /* @__PURE__ */ d(ce, {
293
+ direction: t,
294
+ children: /* @__PURE__ */ d("span", {
295
+ dir: t,
296
+ style: { display: "contents" },
297
+ children: e
298
+ })
299
+ });
300
+ }
301
+ //#endregion
302
+ //#region src/components/ui/Drawer.tsx
303
+ function De({ trigger: e, title: t, description: n, children: r, side: i = "right", className: a }) {
304
+ return /* @__PURE__ */ f(x.Root, { children: [/* @__PURE__ */ d(x.Trigger, { render: e }), /* @__PURE__ */ f(x.Portal, { children: [/* @__PURE__ */ d(x.Backdrop, { className: "bento-drawer-backdrop" }), /* @__PURE__ */ f(x.Popup, {
305
+ className: o("bento-drawer-popup", a),
306
+ "data-side": i,
307
+ children: [
308
+ /* @__PURE__ */ f("div", {
309
+ className: "bento-drawer-header",
310
+ children: [/* @__PURE__ */ d(x.Title, {
311
+ className: "bento-drawer-title",
312
+ children: t
313
+ }), /* @__PURE__ */ d(x.Close, {
314
+ className: "bento-button icon",
315
+ "aria-label": "Close drawer",
316
+ render: /* @__PURE__ */ d("button", { type: "button" }),
317
+ children: /* @__PURE__ */ d(u, { size: 18 })
318
+ })]
319
+ }),
320
+ n && /* @__PURE__ */ d(x.Description, {
321
+ className: "bento-drawer-description",
322
+ children: n
323
+ }),
324
+ /* @__PURE__ */ d("div", {
325
+ className: "bento-drawer-body",
326
+ children: r
327
+ })
328
+ ]
329
+ })] })] });
330
+ }
331
+ //#endregion
332
+ //#region src/components/ui/Field.tsx
333
+ function Oe({ label: e, description: t, error: n, children: r, className: i, ...a }) {
334
+ return /* @__PURE__ */ f(S.Root, {
335
+ className: o("bento-field", i),
336
+ invalid: !!n,
337
+ ...a,
338
+ children: [
339
+ /* @__PURE__ */ d(S.Label, {
340
+ className: "field-label",
341
+ children: e
342
+ }),
343
+ /* @__PURE__ */ d(S.Control, { render: r }),
344
+ t && /* @__PURE__ */ d(S.Description, {
345
+ className: "bento-field-description",
346
+ children: t
347
+ }),
348
+ n && /* @__PURE__ */ d(S.Error, {
349
+ className: "bento-field-error",
350
+ children: n
351
+ })
352
+ ]
353
+ });
354
+ }
355
+ //#endregion
356
+ //#region src/components/ui/Fieldset.tsx
357
+ function ke({ legend: e, children: t, className: n, ...r }) {
358
+ return /* @__PURE__ */ f(C.Root, {
359
+ className: o("bento-fieldset", n),
360
+ ...r,
361
+ children: [/* @__PURE__ */ d(C.Legend, {
362
+ className: "bento-fieldset-legend",
363
+ children: e
364
+ }), t]
365
+ });
366
+ }
367
+ //#endregion
368
+ //#region src/components/ui/Form.tsx
369
+ var q = t(({ className: e, ...t }, n) => /* @__PURE__ */ d(ue, {
370
+ ref: n,
371
+ className: o("bento-form", e),
372
+ ...t
373
+ }));
374
+ q.displayName = "Form";
375
+ //#endregion
376
+ //#region src/components/ui/Input.tsx
377
+ var J = t(({ label: e, className: t, id: n, ...r }, i) => {
378
+ let a = /* @__PURE__ */ d(de, {
379
+ ref: i,
380
+ id: n,
381
+ className: o("bento-input", t),
382
+ ...r
383
+ });
384
+ return e ? /* @__PURE__ */ f("div", {
385
+ className: "bento-field",
386
+ children: [/* @__PURE__ */ d("label", {
387
+ className: "bento-field-label",
388
+ htmlFor: n,
389
+ children: e
390
+ }), a]
391
+ }) : a;
392
+ });
393
+ J.displayName = "Input";
394
+ var Y = t(({ label: e, className: t, id: n, ...r }, i) => {
395
+ let a = /* @__PURE__ */ d("textarea", {
396
+ ref: i,
397
+ id: n,
398
+ className: o("bento-textarea", t),
399
+ ...r
400
+ });
401
+ return e ? /* @__PURE__ */ f("div", {
402
+ className: "bento-field",
403
+ children: [/* @__PURE__ */ d("label", {
404
+ className: "bento-field-label",
405
+ htmlFor: n,
406
+ children: e
407
+ }), a]
408
+ }) : a;
409
+ });
410
+ Y.displayName = "Textarea";
411
+ //#endregion
412
+ //#region src/components/ui/Menu.tsx
413
+ function Ae({ trigger: e, items: t, className: n }) {
414
+ return /* @__PURE__ */ f(w.Root, { children: [/* @__PURE__ */ d(w.Trigger, { render: e }), /* @__PURE__ */ d(w.Portal, { children: /* @__PURE__ */ d(w.Positioner, {
415
+ className: "bento-menu-positioner",
416
+ sideOffset: 8,
417
+ children: /* @__PURE__ */ d(w.Popup, {
418
+ className: o("bento-menu-popup", n),
419
+ children: t.map((e, t) => e === "separator" ? /* @__PURE__ */ d(w.Separator, { className: "bento-menu-separator" }, t) : /* @__PURE__ */ f(w.Item, {
420
+ className: "bento-menu-item",
421
+ disabled: e.disabled,
422
+ onClick: e.onClick,
423
+ children: [e.icon, e.label]
424
+ }, t))
425
+ })
426
+ }) })] });
427
+ }
428
+ //#endregion
429
+ //#region src/components/ui/Menubar.tsx
430
+ function je({ menus: e, className: t }) {
431
+ return /* @__PURE__ */ d(fe, {
432
+ className: o("bento-menubar", t),
433
+ children: e.map((e) => /* @__PURE__ */ f(T.Root, { children: [/* @__PURE__ */ d(T.Trigger, {
434
+ className: "bento-menubar-trigger",
435
+ children: e.label
436
+ }), /* @__PURE__ */ d(T.Portal, { children: /* @__PURE__ */ d(T.Positioner, {
437
+ className: "bento-menu-positioner",
438
+ sideOffset: 8,
439
+ children: /* @__PURE__ */ d(T.Popup, {
440
+ className: "bento-menu-popup",
441
+ children: e.items.map((e) => /* @__PURE__ */ f(T.Item, {
442
+ className: "bento-menu-item",
443
+ disabled: e.disabled,
444
+ children: [e.icon, e.label]
445
+ }, e.label))
446
+ })
447
+ }) })] }, e.label))
448
+ });
449
+ }
450
+ //#endregion
451
+ //#region src/components/ui/Meter.tsx
452
+ var X = t(({ value: e = 0, min: t = 0, max: n = 100, showValue: r, className: a, ...s }, c) => {
453
+ let l = (e - t) / (n - t) * 100, ee = i(() => l >= 80 ? "bento-meter-high" : l < 30 ? "bento-meter-low" : "bento-meter-mid", [l]);
454
+ return /* @__PURE__ */ f("div", {
455
+ className: o("bento-meter", a),
456
+ children: [r && /* @__PURE__ */ f("div", {
457
+ className: "bento-meter-label",
458
+ children: [/* @__PURE__ */ d("span", { children: s["aria-label"] ?? "Meter" }), /* @__PURE__ */ f("span", {
459
+ className: "bento-meter-value",
460
+ children: [Math.round(l), "%"]
461
+ })]
462
+ }), /* @__PURE__ */ d(E.Root, {
463
+ ref: c,
464
+ value: e,
465
+ min: t,
466
+ max: n,
467
+ ...s,
468
+ children: /* @__PURE__ */ d(E.Track, {
469
+ className: "bento-meter-track",
470
+ children: /* @__PURE__ */ d(E.Indicator, { className: o("bento-meter-indicator", ee) })
471
+ })
472
+ })]
473
+ });
474
+ });
475
+ X.displayName = "Meter";
476
+ //#endregion
477
+ //#region src/components/ui/NavigationMenu.tsx
478
+ function Me({ items: e, className: t }) {
479
+ return /* @__PURE__ */ d(D.Root, {
480
+ className: o("bento-nav-menu", t),
481
+ children: /* @__PURE__ */ d(D.List, {
482
+ className: "bento-nav-menu-list",
483
+ children: e.map((e, t) => e.children ? /* @__PURE__ */ f(D.Item, { children: [/* @__PURE__ */ f(D.Trigger, {
484
+ className: "bento-nav-menu-trigger",
485
+ children: [e.label, /* @__PURE__ */ d(l, { size: 14 })]
486
+ }), /* @__PURE__ */ d(D.Portal, { children: /* @__PURE__ */ d(D.Positioner, {
487
+ sideOffset: 8,
488
+ children: /* @__PURE__ */ d(D.Popup, {
489
+ className: "bento-nav-menu-popup",
490
+ children: e.children.map((e, t) => /* @__PURE__ */ d(D.Item, {
491
+ className: "bento-nav-menu-item",
492
+ render: /* @__PURE__ */ d("a", { href: e.href }),
493
+ children: e.label
494
+ }, t))
495
+ })
496
+ }) })] }, t) : /* @__PURE__ */ d(D.Item, { children: /* @__PURE__ */ d(D.Link, {
497
+ className: "bento-nav-menu-trigger",
498
+ href: e.href,
499
+ render: /* @__PURE__ */ d("a", { href: e.href }),
500
+ children: e.label
501
+ }) }, t))
502
+ })
503
+ });
504
+ }
505
+ //#endregion
506
+ //#region src/components/ui/NumberField.tsx
507
+ function Ne({ label: e, className: t, ...n }) {
508
+ return /* @__PURE__ */ f(O.Root, {
509
+ className: o("bento-number-field", t),
510
+ ...n,
511
+ children: [e && /* @__PURE__ */ d("label", {
512
+ className: "field-label",
513
+ children: e
514
+ }), /* @__PURE__ */ f(O.Group, {
515
+ className: "bento-number-field-group",
516
+ children: [
517
+ /* @__PURE__ */ d(O.Decrement, {
518
+ className: "bento-number-field-button",
519
+ "aria-label": "Decrease",
520
+ children: /* @__PURE__ */ d(ne, { size: 14 })
521
+ }),
522
+ /* @__PURE__ */ d(O.Input, { className: "bento-number-field-input" }),
523
+ /* @__PURE__ */ d(O.Increment, {
524
+ className: "bento-number-field-button",
525
+ "aria-label": "Increase",
526
+ children: /* @__PURE__ */ d(re, { size: 14 })
527
+ })
528
+ ]
529
+ })]
530
+ });
531
+ }
532
+ //#endregion
533
+ //#region src/components/ui/OtpField.tsx
534
+ function Pe({ length: e = 6, label: t, className: n, ...r }) {
535
+ return /* @__PURE__ */ f(k.Root, {
536
+ className: o("bento-otp-field", n),
537
+ length: e,
538
+ ...r,
539
+ children: [t && /* @__PURE__ */ d("label", {
540
+ className: "field-label",
541
+ children: t
542
+ }), /* @__PURE__ */ d("div", {
543
+ className: "bento-otp-inputs",
544
+ children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ d(k.Input, { className: "bento-otp-input" }, t))
545
+ })]
546
+ });
547
+ }
548
+ //#endregion
549
+ //#region src/components/ui/Popover.tsx
550
+ function Fe({ trigger: e, title: t, description: n, children: r, className: i }) {
551
+ return /* @__PURE__ */ f(A.Root, { children: [/* @__PURE__ */ d(A.Trigger, { render: e }), /* @__PURE__ */ d(A.Portal, { children: /* @__PURE__ */ d(A.Positioner, {
552
+ sideOffset: 10,
553
+ children: /* @__PURE__ */ f(A.Popup, {
554
+ className: o("bento-popover-popup", i),
555
+ children: [
556
+ /* @__PURE__ */ d(A.Arrow, { className: "bento-popover-arrow" }),
557
+ t && /* @__PURE__ */ d(A.Title, {
558
+ className: "bento-popover-title",
559
+ children: t
560
+ }),
561
+ n && /* @__PURE__ */ d(A.Description, {
562
+ className: "bento-popover-description",
563
+ children: n
564
+ }),
565
+ r
566
+ ]
567
+ })
568
+ }) })] });
569
+ }
570
+ //#endregion
571
+ //#region src/components/ui/PreviewCard.tsx
572
+ function Ie({ trigger: e, title: t, description: n, imageUrl: r, imageAlt: i, className: a }) {
573
+ return /* @__PURE__ */ f(j.Root, { children: [/* @__PURE__ */ d(j.Trigger, { render: e }), /* @__PURE__ */ d(j.Portal, { children: /* @__PURE__ */ d(j.Positioner, {
574
+ sideOffset: 10,
575
+ children: /* @__PURE__ */ f(j.Popup, {
576
+ className: o("bento-preview-card", a),
577
+ children: [
578
+ /* @__PURE__ */ d(j.Arrow, { className: "bento-preview-card-arrow" }),
579
+ r && /* @__PURE__ */ d("img", {
580
+ src: r,
581
+ alt: i ?? ""
582
+ }),
583
+ /* @__PURE__ */ d("h3", {
584
+ className: "bento-preview-card-title",
585
+ children: t
586
+ }),
587
+ n && /* @__PURE__ */ d("p", {
588
+ className: "bento-preview-card-description",
589
+ children: n
590
+ })
591
+ ]
592
+ })
593
+ }) })] });
594
+ }
595
+ //#endregion
596
+ //#region src/components/ui/Progress.tsx
597
+ var Le = t(({ value: e, showValue: t, className: n, ...r }, i) => /* @__PURE__ */ f("div", {
598
+ className: o("bento-progress", n),
599
+ children: [t && /* @__PURE__ */ f("div", {
600
+ className: "bento-progress-label",
601
+ children: [/* @__PURE__ */ d("span", { children: r["aria-label"] ?? "Progress" }), /* @__PURE__ */ f("span", {
602
+ className: "bento-progress-value",
603
+ children: [e ?? 0, "%"]
604
+ })]
605
+ }), /* @__PURE__ */ d(M.Root, {
606
+ ref: i,
607
+ value: e,
608
+ ...r,
609
+ children: /* @__PURE__ */ d(M.Track, {
610
+ className: "bento-progress-track",
611
+ children: /* @__PURE__ */ d(M.Indicator, { className: "bento-progress-indicator" })
612
+ })
613
+ })]
614
+ }));
615
+ Le.displayName = "Progress";
616
+ //#endregion
617
+ //#region src/components/ui/Radio.tsx
618
+ function Re({ label: e, className: t, ...n }) {
619
+ let r = /* @__PURE__ */ d(N.Root, {
620
+ className: o("bento-radio", t),
621
+ ...n,
622
+ children: /* @__PURE__ */ d(N.Indicator, { className: "bento-radio-indicator" })
623
+ });
624
+ return e ? /* @__PURE__ */ f("label", {
625
+ className: "bento-radio-label",
626
+ children: [r, e]
627
+ }) : r;
628
+ }
629
+ //#endregion
630
+ //#region src/components/ui/RadioGroup.tsx
631
+ function ze({ options: e, defaultValue: t, className: n, ...r }) {
632
+ return /* @__PURE__ */ d(pe, {
633
+ defaultValue: t,
634
+ className: o("bento-radio-group", n),
635
+ ...r,
636
+ children: e.map((e) => /* @__PURE__ */ f("label", {
637
+ className: "bento-radio-label",
638
+ children: [/* @__PURE__ */ d(P.Root, {
639
+ className: "bento-radio",
640
+ value: e.value,
641
+ children: /* @__PURE__ */ d(P.Indicator, { className: "bento-radio-indicator" })
642
+ }), e.label]
643
+ }, e.value))
644
+ });
645
+ }
646
+ //#endregion
647
+ //#region src/components/ui/ScrollArea.tsx
648
+ var Be = t(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ f(F.Root, {
649
+ ref: r,
650
+ className: o("bento-scroll-area", e),
651
+ ...n,
652
+ children: [
653
+ /* @__PURE__ */ d(F.Viewport, {
654
+ className: "bento-scroll-area-viewport",
655
+ children: t
656
+ }),
657
+ /* @__PURE__ */ d(F.Scrollbar, {
658
+ className: "bento-scroll-area-scrollbar",
659
+ children: /* @__PURE__ */ d(F.Thumb, { className: "bento-scroll-area-thumb" })
660
+ }),
661
+ /* @__PURE__ */ d(F.Corner, { className: "bento-scroll-area-corner" })
662
+ ]
663
+ }));
664
+ Be.displayName = "ScrollArea";
665
+ //#endregion
666
+ //#region src/components/ui/Select.tsx
667
+ function Ve({ items: e, label: t, placeholder: n, defaultValue: r, ...i }) {
668
+ return /* @__PURE__ */ f(I.Root, {
669
+ defaultValue: r,
670
+ items: e,
671
+ ...i,
672
+ children: [
673
+ t && /* @__PURE__ */ d("label", {
674
+ className: "field-label",
675
+ htmlFor: i.id,
676
+ children: t
677
+ }),
678
+ /* @__PURE__ */ f(I.Trigger, {
679
+ id: i.id,
680
+ className: "bento-select-trigger",
681
+ children: [/* @__PURE__ */ d(I.Value, { placeholder: n }), /* @__PURE__ */ d(I.Icon, { children: /* @__PURE__ */ d(l, { size: 16 }) })]
682
+ }),
683
+ /* @__PURE__ */ d(I.Portal, { children: /* @__PURE__ */ d(I.Positioner, {
684
+ className: "bento-select-positioner",
685
+ sideOffset: 8,
686
+ children: /* @__PURE__ */ d(I.Popup, {
687
+ className: o("bento-select-popup"),
688
+ children: Object.entries(e).map(([e, t]) => /* @__PURE__ */ f(I.Item, {
689
+ className: "bento-select-item",
690
+ value: e,
691
+ children: [/* @__PURE__ */ d(I.ItemIndicator, { children: /* @__PURE__ */ d(c, { size: 15 }) }), /* @__PURE__ */ d(I.ItemText, { children: t })]
692
+ }, e))
693
+ })
694
+ }) })
695
+ ]
696
+ });
697
+ }
698
+ //#endregion
699
+ //#region src/components/ui/Separator.tsx
700
+ var He = t(({ className: e, ...t }, n) => /* @__PURE__ */ d(me, {
701
+ ref: n,
702
+ className: o("bento-separator", e),
703
+ ...t
704
+ }));
705
+ He.displayName = "Separator";
706
+ //#endregion
707
+ //#region src/components/ui/Slider.tsx
708
+ var Ue = t(({ className: e, ...t }, n) => /* @__PURE__ */ d(L.Root, {
709
+ ref: n,
710
+ className: o("bento-slider", e),
711
+ ...t,
712
+ children: /* @__PURE__ */ d(L.Control, {
713
+ className: "bento-slider-control",
714
+ children: /* @__PURE__ */ f(L.Track, {
715
+ className: "bento-slider-track",
716
+ children: [/* @__PURE__ */ d(L.Indicator, { className: "bento-slider-indicator" }), /* @__PURE__ */ d(L.Thumb, { className: "bento-slider-thumb" })]
717
+ })
718
+ })
719
+ }));
720
+ Ue.displayName = "Slider";
721
+ //#endregion
722
+ //#region src/components/ui/Switch.tsx
723
+ var We = t(({ label: e, className: t, id: n, ...r }, i) => {
724
+ let a = /* @__PURE__ */ d(he.Root, {
725
+ ref: i,
726
+ id: n,
727
+ className: o("bento-switch", t),
728
+ ...r,
729
+ children: /* @__PURE__ */ d(he.Thumb, { className: "bento-switch-thumb" })
730
+ });
731
+ return e ? /* @__PURE__ */ f("label", {
732
+ className: "bento-switch-label",
733
+ htmlFor: n,
734
+ children: [a, e]
735
+ }) : a;
736
+ });
737
+ We.displayName = "Switch";
738
+ //#endregion
739
+ //#region src/components/ui/Tabs.tsx
740
+ function Ge({ panels: e, defaultValue: t, className: n, ...r }) {
741
+ return /* @__PURE__ */ f(R.Root, {
742
+ defaultValue: t ?? e[0]?.value,
743
+ className: o("bento-tabs", n),
744
+ ...r,
745
+ children: [/* @__PURE__ */ f(R.List, {
746
+ className: o("bento-tabs-list", `cols-${e.length}`),
747
+ children: [e.map((e) => /* @__PURE__ */ d(R.Tab, {
748
+ className: "bento-tabs-tab",
749
+ value: e.value,
750
+ children: e.label
751
+ }, e.value)), /* @__PURE__ */ d(R.Indicator, { className: "bento-tabs-indicator" })]
752
+ }), e.map((e) => /* @__PURE__ */ f(R.Panel, {
753
+ className: "bento-tabs-panel",
754
+ value: e.value,
755
+ children: [e.title && /* @__PURE__ */ d("strong", {
756
+ className: "bento-tabs-panel-title",
757
+ children: e.title
758
+ }), /* @__PURE__ */ d("p", { children: e.content })]
759
+ }, e.value))]
760
+ });
761
+ }
762
+ //#endregion
763
+ //#region src/components/ui/Toggle.tsx
764
+ var Ke = t(({ className: e, ...t }, n) => /* @__PURE__ */ d(z, {
765
+ ref: n,
766
+ className: o("bento-toggle", e),
767
+ ...t
768
+ }));
769
+ Ke.displayName = "Toggle";
770
+ //#endregion
771
+ //#region src/components/ui/Toast.tsx
772
+ function qe() {
773
+ let { toasts: e } = B.useToastManager();
774
+ return e.length === 0 ? null : /* @__PURE__ */ d("div", {
775
+ className: "bento-toast-provider",
776
+ children: e.map((e) => /* @__PURE__ */ f(B.Root, {
777
+ className: "bento-toast",
778
+ toast: e,
779
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d(B.Title, {
780
+ className: "bento-toast-title",
781
+ children: e.title
782
+ }), e.description && /* @__PURE__ */ d(B.Description, {
783
+ className: "bento-toast-description",
784
+ children: e.description
785
+ })] }), /* @__PURE__ */ d(B.Close, {
786
+ className: "bento-toast-close",
787
+ "aria-label": "Dismiss",
788
+ render: /* @__PURE__ */ d("button", { type: "button" }),
789
+ children: /* @__PURE__ */ d(u, { size: 15 })
790
+ })]
791
+ }, e.id))
792
+ });
793
+ }
794
+ function Je({ children: e }) {
795
+ return /* @__PURE__ */ f(B.Provider, { children: [e, /* @__PURE__ */ d(qe, {})] });
796
+ }
797
+ //#endregion
798
+ //#region src/components/ui/useToastManager.ts
799
+ function Ye() {
800
+ let e = B.useToastManager();
801
+ return {
802
+ add: (t, n) => e.add({
803
+ title: t,
804
+ description: n
805
+ }),
806
+ close: (t) => e.close(t)
807
+ };
808
+ }
809
+ //#endregion
810
+ //#region src/components/ui/ToggleGroup.tsx
811
+ function Xe({ options: e, defaultValue: t, className: n, ...r }) {
812
+ return /* @__PURE__ */ d(ge, {
813
+ defaultValue: t,
814
+ className: o("bento-toggle-group", n),
815
+ ...r,
816
+ children: e.map((e) => /* @__PURE__ */ d(z, {
817
+ className: "bento-toggle",
818
+ value: e.value,
819
+ children: e.label
820
+ }, e.value))
821
+ });
822
+ }
823
+ //#endregion
824
+ //#region src/components/ui/Toolbar.tsx
825
+ function Ze({ className: e, showSearch: t = !0, ...n }) {
826
+ return /* @__PURE__ */ f(V.Root, {
827
+ className: o("bento-toolbar", e),
828
+ ...n,
829
+ children: [/* @__PURE__ */ f(V.Group, {
830
+ className: "bento-toolbar-group",
831
+ children: [
832
+ /* @__PURE__ */ d(Qe, {
833
+ "aria-label": "Bold",
834
+ children: /* @__PURE__ */ d(s, { size: 15 })
835
+ }),
836
+ /* @__PURE__ */ d(Qe, {
837
+ "aria-label": "Italic",
838
+ children: /* @__PURE__ */ d(ee, { size: 15 })
839
+ }),
840
+ /* @__PURE__ */ d(V.Separator, { className: "bento-toolbar-separator" }),
841
+ /* @__PURE__ */ d(V.Link, {
842
+ className: "bento-toolbar-button",
843
+ href: "https://base-ui.com",
844
+ target: "_blank",
845
+ rel: "noreferrer",
846
+ "aria-label": "Base UI docs",
847
+ children: /* @__PURE__ */ d(te, { size: 15 })
848
+ })
849
+ ]
850
+ }), t && /* @__PURE__ */ f("div", {
851
+ className: "bento-toolbar-search",
852
+ children: [/* @__PURE__ */ d(ie, { size: 14 }), /* @__PURE__ */ d(V.Input, {
853
+ className: "bento-toolbar-input",
854
+ placeholder: "Search docs"
855
+ })]
856
+ })]
857
+ });
858
+ }
859
+ function Qe({ children: e, ...t }) {
860
+ return /* @__PURE__ */ d(V.Button, {
861
+ className: "bento-toolbar-button",
862
+ ...t,
863
+ children: e
864
+ });
865
+ }
866
+ //#endregion
867
+ //#region src/components/ui/Tooltip.tsx
868
+ function $e({ content: e, children: t, className: n }) {
869
+ return /* @__PURE__ */ f(H.Root, { children: [/* @__PURE__ */ d(H.Trigger, { render: t }), /* @__PURE__ */ d(H.Portal, { children: /* @__PURE__ */ d(H.Positioner, {
870
+ sideOffset: 8,
871
+ children: /* @__PURE__ */ f(H.Popup, {
872
+ className: o("bento-tooltip-popup", n),
873
+ children: [e, /* @__PURE__ */ d(H.Arrow, { className: "bento-tooltip-arrow" })]
874
+ })
875
+ }) })] });
876
+ }
877
+ $e.Provider = H.Provider;
878
+ //#endregion
879
+ //#region src/hooks/useTheme.ts
880
+ function et() {
881
+ if (typeof window > "u") return "system";
882
+ let e = localStorage.getItem("bento-theme");
883
+ return e === "light" || e === "dark" || e === "system" ? e : "system";
884
+ }
885
+ function tt() {
886
+ if (typeof window > "u") return "bento";
887
+ let e = localStorage.getItem("bento-style");
888
+ return e === "bento" || e === "shadcn" || e === "neo-brutalism" ? e : "bento";
889
+ }
890
+ function Z(e) {
891
+ return e === "system" ? typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : e;
892
+ }
893
+ function Q(e) {
894
+ document.documentElement.setAttribute("data-theme", e);
895
+ }
896
+ function $(e) {
897
+ document.documentElement.setAttribute("data-style", e);
898
+ }
899
+ function nt() {
900
+ let [e, t] = a(et), [i, o] = a(tt), s = n((e) => {
901
+ t(e), localStorage.setItem("bento-theme", e), Q(Z(e));
902
+ }, []), c = n((e) => {
903
+ o(e), localStorage.setItem("bento-style", e), $(e);
904
+ }, []);
905
+ return r(() => {
906
+ if (Q(Z(e)), $(i), e !== "system") return;
907
+ let t = window.matchMedia("(prefers-color-scheme: dark)"), n = () => Q(t.matches ? "dark" : "light");
908
+ return t.addEventListener("change", n), () => t.removeEventListener("change", n);
909
+ }, [e, i]), {
910
+ theme: e,
911
+ setTheme: s,
912
+ resolved: Z(e),
913
+ style: i,
914
+ setStyle: c
915
+ };
916
+ }
917
+ //#endregion
918
+ export { _e as Accordion, ve as AlertDialog, ye as Autocomplete, U as Avatar, W as AvatarGroup, G as Button, K as Checkbox, be as CheckboxGroup, xe as Collapsible, Se as Combobox, Ce as ContextMenu, we as CspProvider, Te as Dialog, Ee as DirectionProvider, De as Drawer, Oe as Field, ke as Fieldset, q as Form, J as Input, Ae as Menu, je as Menubar, X as Meter, Me as NavigationMenu, Ne as NumberField, Pe as OtpField, Fe as Popover, Ie as PreviewCard, Le as Progress, Re as Radio, ze as RadioGroup, Be as ScrollArea, Ve as Select, He as Separator, Ue as Slider, We as Switch, Ge as Tabs, Y as Textarea, Je as ToastProvider, Ke as Toggle, Xe as ToggleGroup, Ze as Toolbar, $e as Tooltip, le as useDirection, nt as useTheme, Ye as useToastManager };