@fea-ui/react 0.1.0-alpha.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.cjs ADDED
@@ -0,0 +1,1330 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+ let tailwind_variants = require("tailwind-variants");
29
+ let _base_ui_react = require("@base-ui/react");
30
+ let lucide_react = require("lucide-react");
31
+ let react = require("react");
32
+ react = __toESM(react);
33
+ let react_jsx_runtime = require("react/jsx-runtime");
34
+
35
+ //#region src/components/accordion/accordion.context.ts
36
+ const AccordionContext = (0, react.createContext)(null);
37
+
38
+ //#endregion
39
+ //#region src/components/accordion/accordion.variants.ts
40
+ const accordionVariants = (0, tailwind_variants.tv)({ slots: {
41
+ content: "accordion__content",
42
+ header: "accordion__header",
43
+ item: "accordion__item",
44
+ panel: "accordion__panel",
45
+ root: "accordion",
46
+ trigger: "accordion__trigger",
47
+ triggerIcon: "accordion__trigger-icon"
48
+ } });
49
+
50
+ //#endregion
51
+ //#region src/components/accordion/use-accordion.ts
52
+ const useAccordion = () => {
53
+ const context = (0, react.useContext)(AccordionContext);
54
+ if (!context) throw new Error("useAccordion must be used within a AccordionProvider");
55
+ return context;
56
+ };
57
+
58
+ //#endregion
59
+ //#region src/components/accordion/accordion.tsx
60
+ const Accordion = ({ className, ...props }) => {
61
+ const slots = (0, react.useMemo)(() => accordionVariants({}), []);
62
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AccordionContext.Provider, {
63
+ value: { slots },
64
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Accordion.Root, {
65
+ className: (0, tailwind_variants.cn)(className, slots.root()),
66
+ ...props
67
+ })
68
+ });
69
+ };
70
+ const AccordionItem = ({ className, ...props }) => {
71
+ const { slots } = useAccordion();
72
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Accordion.Item, {
73
+ className: (0, tailwind_variants.cn)(className, slots.item()),
74
+ ...props
75
+ });
76
+ };
77
+ const AccordionHeader = ({ className, ...props }) => {
78
+ const { slots } = useAccordion();
79
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Accordion.Header, {
80
+ className: (0, tailwind_variants.cn)(className, slots.header()),
81
+ ...props
82
+ });
83
+ };
84
+ const AccordionTrigger = ({ className, ...props }) => {
85
+ const { slots } = useAccordion();
86
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Accordion.Trigger, {
87
+ className: (0, tailwind_variants.cn)(className, slots.trigger()),
88
+ ...props
89
+ });
90
+ };
91
+ const AccordionTriggerIcon = ({ className, ...props }) => {
92
+ const { slots } = useAccordion();
93
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucidePlus, {
94
+ className: (0, tailwind_variants.cn)(className, slots.triggerIcon()),
95
+ ...props
96
+ });
97
+ };
98
+ const AccordionPanel = ({ className, ...props }) => {
99
+ const { slots } = useAccordion();
100
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Accordion.Panel, {
101
+ className: (0, tailwind_variants.cn)(className, slots.panel()),
102
+ ...props
103
+ });
104
+ };
105
+ const AccordionContent = ({ className, ...props }) => {
106
+ const { slots } = useAccordion();
107
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
108
+ className: (0, tailwind_variants.cn)(className, slots.content()),
109
+ ...props
110
+ });
111
+ };
112
+ Accordion.Content = AccordionContent;
113
+ Accordion.Header = AccordionHeader;
114
+ Accordion.Item = AccordionItem;
115
+ Accordion.Panel = AccordionPanel;
116
+ Accordion.Root = Accordion;
117
+ Accordion.Trigger = AccordionTrigger;
118
+ Accordion.TriggerIcon = AccordionTriggerIcon;
119
+ var accordion_default = Accordion;
120
+
121
+ //#endregion
122
+ //#region src/components/avatar/avatar.context.ts
123
+ const AvatarContext = (0, react.createContext)(null);
124
+
125
+ //#endregion
126
+ //#region src/components/avatar/avatar.variants.ts
127
+ const avatarVariants = (0, tailwind_variants.tv)({
128
+ defaultVariants: { size: "md" },
129
+ slots: {
130
+ fallback: "avatar__fallback",
131
+ image: "avatar__image",
132
+ root: "avatar"
133
+ },
134
+ variants: { size: {
135
+ lg: { root: "avatar--lg" },
136
+ md: { root: "avatar--md" },
137
+ sm: { root: "avatar--sm" }
138
+ } }
139
+ });
140
+
141
+ //#endregion
142
+ //#region src/components/avatar/use-avatar.ts
143
+ const useAvatar = () => {
144
+ const ctx = (0, react.useContext)(AvatarContext);
145
+ if (!ctx) throw new Error("useAvatar must be used within the Avatar component.");
146
+ return ctx;
147
+ };
148
+
149
+ //#endregion
150
+ //#region src/components/avatar/avatar.tsx
151
+ const Avatar = ({ className, size, ...props }) => {
152
+ const slots = (0, react.useMemo)(() => avatarVariants({ size }), [size]);
153
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarContext.Provider, {
154
+ value: { slots },
155
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Avatar.Root, {
156
+ className: (0, tailwind_variants.cn)(className, slots.root()),
157
+ ...props
158
+ })
159
+ });
160
+ };
161
+ const AvatarImage = ({ className, ...props }) => {
162
+ const { slots } = useAvatar();
163
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Avatar.Image, {
164
+ className: (0, tailwind_variants.cn)(className, slots.image()),
165
+ ...props
166
+ });
167
+ };
168
+ const AvatarFallback = ({ className, ...props }) => {
169
+ const { slots } = useAvatar();
170
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Avatar.Fallback, {
171
+ className: (0, tailwind_variants.cn)(className, slots.fallback()),
172
+ ...props
173
+ });
174
+ };
175
+ Avatar.Fallback = AvatarFallback;
176
+ Avatar.Image = AvatarImage;
177
+ Avatar.Root = Avatar;
178
+ var avatar_default = Avatar;
179
+
180
+ //#endregion
181
+ //#region src/components/button/button.variants.ts
182
+ const buttonVariants = (0, tailwind_variants.tv)({
183
+ base: "button",
184
+ defaultVariants: {
185
+ isIconOnly: false,
186
+ size: "md",
187
+ variant: "primary"
188
+ },
189
+ variants: {
190
+ isIconOnly: { true: "button--icon-only" },
191
+ size: {
192
+ lg: "button--lg",
193
+ md: "button--md",
194
+ sm: "button--sm"
195
+ },
196
+ variant: {
197
+ danger: "button--danger",
198
+ ghost: "button--ghost",
199
+ outline: "button--outline",
200
+ primary: "button--primary",
201
+ secondary: "button--secondary"
202
+ }
203
+ }
204
+ });
205
+
206
+ //#endregion
207
+ //#region src/components/button/button.tsx
208
+ const Button = ({ className, variant, size, isIconOnly, ...props }) => {
209
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Button, {
210
+ className: (0, tailwind_variants.cn)(buttonVariants({
211
+ isIconOnly,
212
+ size,
213
+ variant
214
+ }), className),
215
+ ...props
216
+ });
217
+ };
218
+ var button_default = Button;
219
+
220
+ //#endregion
221
+ //#region src/components/button-group/button-group.variants.ts
222
+ const buttonGroupVariants = (0, tailwind_variants.tv)({ base: "button-group" });
223
+
224
+ //#endregion
225
+ //#region src/components/button-group/button-group.tsx
226
+ const ButtonGroup = ({ className, ...props }) => {
227
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
228
+ className: (0, tailwind_variants.cn)(className, buttonGroupVariants()),
229
+ ...props
230
+ });
231
+ };
232
+ var button_group_default = ButtonGroup;
233
+
234
+ //#endregion
235
+ //#region src/components/card/card.context.ts
236
+ const CardContext = (0, react.createContext)(null);
237
+
238
+ //#endregion
239
+ //#region src/components/card/card.variants.ts
240
+ const cardVariants = (0, tailwind_variants.tv)({
241
+ defaultVariants: { variant: "default" },
242
+ slots: {
243
+ body: "card__body",
244
+ description: "card__description",
245
+ footer: "card__footer",
246
+ header: "card__header",
247
+ root: "card",
248
+ title: "card__title"
249
+ },
250
+ variants: { variant: {
251
+ default: { root: "card--default" },
252
+ transparent: { root: "card--transparent" }
253
+ } }
254
+ });
255
+
256
+ //#endregion
257
+ //#region src/components/card/use-card.ts
258
+ const useCard = () => {
259
+ const ctx = (0, react.useContext)(CardContext);
260
+ if (!ctx) throw new Error("CardContext must be used with in the Card component.");
261
+ return ctx;
262
+ };
263
+
264
+ //#endregion
265
+ //#region src/components/card/card.tsx
266
+ const Card = ({ className, variant, ...props }) => {
267
+ const slots = (0, react.useMemo)(() => cardVariants({ variant }), [variant]);
268
+ console.log(slots);
269
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardContext.Provider, {
270
+ value: { slots },
271
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
272
+ className: (0, tailwind_variants.cn)(className, slots.root()),
273
+ ...props
274
+ })
275
+ });
276
+ };
277
+ const CardHeader = ({ className, ...props }) => {
278
+ const { slots } = useCard();
279
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
280
+ className: (0, tailwind_variants.cn)(className, slots.header()),
281
+ ...props
282
+ });
283
+ };
284
+ const CardBody = ({ className, ...props }) => {
285
+ const { slots } = useCard();
286
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
287
+ className: (0, tailwind_variants.cn)(className, slots.body()),
288
+ ...props
289
+ });
290
+ };
291
+ const CardFooter = ({ className, ...props }) => {
292
+ const { slots } = useCard();
293
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
294
+ className: (0, tailwind_variants.cn)(className, slots.footer()),
295
+ ...props
296
+ });
297
+ };
298
+ const CardTitle = ({ className, ...props }) => {
299
+ const { slots } = useCard();
300
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
301
+ className: (0, tailwind_variants.cn)(className, slots.title()),
302
+ ...props
303
+ });
304
+ };
305
+ const CardDescription = ({ className, ...props }) => {
306
+ const { slots } = useCard();
307
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
308
+ className: (0, tailwind_variants.cn)(className, slots.description()),
309
+ ...props
310
+ });
311
+ };
312
+ /** Exports */
313
+ Card.Body = CardBody;
314
+ Card.Description = CardDescription;
315
+ Card.Footer = CardFooter;
316
+ Card.Header = CardHeader;
317
+ Card.Root = Card;
318
+ Card.Title = CardTitle;
319
+ var card_default = Card;
320
+
321
+ //#endregion
322
+ //#region src/components/checkbox/checkbox.context.ts
323
+ const CheckboxContext = (0, react.createContext)(null);
324
+
325
+ //#endregion
326
+ //#region src/components/checkbox/checkbox.variants.ts
327
+ const checkboxVariants = (0, tailwind_variants.tv)({ slots: {
328
+ checkboxIcon: "checkbox__icon",
329
+ indicator: "checkbox__indicator",
330
+ label: "checkbox__label",
331
+ root: "checkbox"
332
+ } });
333
+
334
+ //#endregion
335
+ //#region src/components/checkbox/use-checkbox.ts
336
+ const useCheckbox = () => {
337
+ const ctx = (0, react.useContext)(CheckboxContext);
338
+ if (!ctx) throw new Error("CheckboxContext must be used with in the Checkbox component.");
339
+ return ctx;
340
+ };
341
+
342
+ //#endregion
343
+ //#region src/components/checkbox/checkbox.tsx
344
+ const Checkbox = ({ className, ...props }) => {
345
+ const slots = (0, react.useMemo)(() => checkboxVariants(), []);
346
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckboxContext.Provider, {
347
+ value: { slots },
348
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Checkbox.Root, {
349
+ className: (0, tailwind_variants.cn)(className, slots.root()),
350
+ ...props
351
+ })
352
+ });
353
+ };
354
+ const CheckboxIndicator = ({ className, ...props }) => {
355
+ const { slots } = useCheckbox();
356
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Checkbox.Indicator, {
357
+ className: (0, tailwind_variants.cn)(className, slots.indicator()),
358
+ ...props,
359
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideCheck, { className: slots.checkboxIcon() })
360
+ });
361
+ };
362
+ Checkbox.Indicator = CheckboxIndicator;
363
+ Checkbox.Root = Checkbox;
364
+ var checkbox_default = Checkbox;
365
+
366
+ //#endregion
367
+ //#region src/components/checkbox-group/checkbox-group.variants.ts
368
+ const checkboxGroupVariants = (0, tailwind_variants.tv)({ base: "checkbox-group" });
369
+
370
+ //#endregion
371
+ //#region src/components/checkbox-group/checkbox-group.tsx
372
+ const CheckboxGroup = ({ className, ...props }) => {
373
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.CheckboxGroup, {
374
+ className: (0, tailwind_variants.cn)(className, checkboxGroupVariants()),
375
+ ...props
376
+ });
377
+ };
378
+ var checkbox_group_default = CheckboxGroup;
379
+
380
+ //#endregion
381
+ //#region src/components/chip/chip.variants.ts
382
+ const chipVariants = (0, tailwind_variants.tv)({
383
+ base: "chip",
384
+ defaultVariants: {
385
+ size: "md",
386
+ variant: "primary"
387
+ },
388
+ variants: {
389
+ size: {
390
+ lg: "chip--lg",
391
+ md: "chip--md",
392
+ sm: "chip--sm"
393
+ },
394
+ variant: {
395
+ danger: "chip--danger",
396
+ outline: "chip--outline",
397
+ primary: "chip--primary",
398
+ secondary: "chip--secondary",
399
+ success: "chip--success"
400
+ }
401
+ }
402
+ });
403
+
404
+ //#endregion
405
+ //#region src/components/chip/chip.tsx
406
+ const Chip = ({ className, variant, size, ...props }) => {
407
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
408
+ className: (0, tailwind_variants.cn)(className, chipVariants({
409
+ size,
410
+ variant
411
+ })),
412
+ ...props
413
+ });
414
+ };
415
+ var chip_default = Chip;
416
+
417
+ //#endregion
418
+ //#region src/components/container/container.variants.ts
419
+ const containerVariants = (0, tailwind_variants.tv)({ base: "container" });
420
+
421
+ //#endregion
422
+ //#region src/components/container/container.tsx
423
+ const Container = ({ className, ...props }) => {
424
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
425
+ className: (0, tailwind_variants.cn)(className, containerVariants()),
426
+ ...props
427
+ });
428
+ };
429
+ var container_default = Container;
430
+
431
+ //#endregion
432
+ //#region src/components/dialog/dialog.context.ts
433
+ const DialogContext = (0, react.createContext)(null);
434
+
435
+ //#endregion
436
+ //#region src/components/dialog/dialog.variants.ts
437
+ const dialogVariants = (0, tailwind_variants.tv)({ slots: {
438
+ backdrop: "dialog__backdrop",
439
+ close: "dialog__close",
440
+ description: "dialog__description",
441
+ popup: "dialog__popup",
442
+ portal: "dialog__portal",
443
+ root: "dialog",
444
+ title: "dialog__title",
445
+ trigger: "dialog__trigger",
446
+ viewport: "dialog__viewport"
447
+ } });
448
+
449
+ //#endregion
450
+ //#region src/components/dialog/use-dialog.ts
451
+ const useDialog = () => {
452
+ const context = (0, react.useContext)(DialogContext);
453
+ if (!context) throw new Error("useDialog must be used within a DialogProvider");
454
+ return context;
455
+ };
456
+
457
+ //#endregion
458
+ //#region src/components/dialog/dialog.tsx
459
+ const Dialog = ({ ...props }) => {
460
+ const slots = (0, react.useMemo)(() => dialogVariants(), []);
461
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogContext.Provider, {
462
+ value: { slots },
463
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Root, { ...props })
464
+ });
465
+ };
466
+ const DialogTrigger = ({ className, ...props }) => {
467
+ const { slots } = useDialog();
468
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Trigger, {
469
+ className: (0, tailwind_variants.cn)(slots.trigger(), className),
470
+ ...props
471
+ });
472
+ };
473
+ const DialogPortal = ({ className, ...props }) => {
474
+ const { slots } = useDialog();
475
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Portal, {
476
+ className: (0, tailwind_variants.cn)(slots.portal(), className),
477
+ ...props
478
+ });
479
+ };
480
+ const DialogBackdrop = ({ className, ...props }) => {
481
+ const { slots } = useDialog();
482
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Backdrop, {
483
+ className: (0, tailwind_variants.cn)(slots.backdrop(), className),
484
+ ...props
485
+ });
486
+ };
487
+ const DialogViewport = ({ className, ...props }) => {
488
+ const { slots } = useDialog();
489
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Viewport, {
490
+ className: (0, tailwind_variants.cn)(slots.viewport(), className),
491
+ ...props
492
+ });
493
+ };
494
+ const DialogPopup = ({ className, ...props }) => {
495
+ const { slots } = useDialog();
496
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Popup, {
497
+ className: (0, tailwind_variants.cn)(slots.popup(), className),
498
+ ...props
499
+ });
500
+ };
501
+ const DialogTitle = ({ className, ...props }) => {
502
+ const { slots } = useDialog();
503
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Title, {
504
+ className: (0, tailwind_variants.cn)(slots.title(), className),
505
+ ...props
506
+ });
507
+ };
508
+ const DialogDescription = ({ className, ...props }) => {
509
+ const { slots } = useDialog();
510
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Description, {
511
+ className: (0, tailwind_variants.cn)(slots.description(), className),
512
+ ...props
513
+ });
514
+ };
515
+ const DialogClose = ({ className, ...props }) => {
516
+ const { slots } = useDialog();
517
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Close, {
518
+ className: (0, tailwind_variants.cn)(slots.close(), className),
519
+ ...props,
520
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideX, {})
521
+ });
522
+ };
523
+ Dialog.Backdrop = DialogBackdrop;
524
+ Dialog.Close = DialogClose;
525
+ Dialog.Description = DialogDescription;
526
+ Dialog.Popup = DialogPopup;
527
+ Dialog.Portal = DialogPortal;
528
+ Dialog.Root = Dialog;
529
+ Dialog.Title = DialogTitle;
530
+ Dialog.Trigger = DialogTrigger;
531
+ Dialog.Viewport = DialogViewport;
532
+ var dialog_default = Dialog;
533
+
534
+ //#endregion
535
+ //#region src/components/field/field.context.ts
536
+ const FieldContext = (0, react.createContext)(null);
537
+
538
+ //#endregion
539
+ //#region src/components/field/field.variants.ts
540
+ const fieldVariants = (0, tailwind_variants.tv)({
541
+ slots: {
542
+ control: "input",
543
+ description: "field__description",
544
+ error: "field__error",
545
+ label: "label",
546
+ root: "field"
547
+ },
548
+ variants: { size: {
549
+ lg: { control: "input--lg" },
550
+ md: { control: "input--md" },
551
+ sm: { control: "input--sm" }
552
+ } }
553
+ });
554
+
555
+ //#endregion
556
+ //#region src/components/field/use-field.ts
557
+ const useField = () => {
558
+ const ctx = (0, react.useContext)(FieldContext);
559
+ if (!ctx) throw new Error("FieldContext must be used with in the Field component.");
560
+ return ctx;
561
+ };
562
+
563
+ //#endregion
564
+ //#region src/components/field/field.tsx
565
+ const Field = ({ className, size, ...props }) => {
566
+ const slots = (0, react.useMemo)(() => fieldVariants({ size }), [size]);
567
+ console.log(slots.root());
568
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FieldContext, {
569
+ value: { slots },
570
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Field.Root, {
571
+ className: (0, tailwind_variants.cn)(className, slots.root()),
572
+ ...props
573
+ })
574
+ });
575
+ };
576
+ const FieldLabel = ({ className, ...props }) => {
577
+ const { slots } = useField();
578
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Field.Label, {
579
+ className: (0, tailwind_variants.cn)(className, slots.label()),
580
+ ...props
581
+ });
582
+ };
583
+ const FieldDescription = ({ className, ...props }) => {
584
+ const { slots } = useField();
585
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Field.Description, {
586
+ className: (0, tailwind_variants.cn)(className, slots.description()),
587
+ ...props
588
+ });
589
+ };
590
+ const FieldControl = ({ className, ...props }) => {
591
+ const { slots } = useField();
592
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Field.Control, {
593
+ className: (0, tailwind_variants.cn)(className, slots.control()),
594
+ ...props
595
+ });
596
+ };
597
+ const FieldError = ({ className, ...props }) => {
598
+ const { slots } = useField();
599
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Field.Error, {
600
+ className: (0, tailwind_variants.cn)(slots.error(), className),
601
+ ...props
602
+ });
603
+ };
604
+ Field.Control = FieldControl;
605
+ Field.Description = FieldDescription;
606
+ Field.Error = FieldError;
607
+ Field.Label = FieldLabel;
608
+ Field.Root = Field;
609
+ var field_default = Field;
610
+
611
+ //#endregion
612
+ //#region src/components/form/form.variants.ts
613
+ const formVariants = (0, tailwind_variants.tv)({ base: "form" });
614
+
615
+ //#endregion
616
+ //#region src/components/form/form.tsx
617
+ const Form = ({ className, ...props }) => {
618
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("form", {
619
+ className: (0, tailwind_variants.cn)(className, formVariants()),
620
+ ...props
621
+ });
622
+ };
623
+ var form_default = Form;
624
+
625
+ //#endregion
626
+ //#region src/components/input/input.variants.ts
627
+ const inputVariants = (0, tailwind_variants.tv)({
628
+ base: "input",
629
+ variants: { inputSize: {
630
+ lg: "input--lg",
631
+ md: "input--md",
632
+ sm: "input--sm"
633
+ } }
634
+ });
635
+
636
+ //#endregion
637
+ //#region src/components/input/input.tsx
638
+ const Input = ({ className, inputSize, ...props }) => {
639
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Input, {
640
+ className: (0, tailwind_variants.cn)(className, inputVariants({ inputSize })),
641
+ ...props
642
+ });
643
+ };
644
+ var input_default = Input;
645
+
646
+ //#endregion
647
+ //#region src/components/label/label.variants.ts
648
+ const labelVariants = (0, tailwind_variants.tv)({ base: "label" });
649
+
650
+ //#endregion
651
+ //#region src/components/label/label.tsx
652
+ const Label = ({ className, ...props }) => {
653
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
654
+ className: (0, tailwind_variants.cn)(className, labelVariants()),
655
+ ...props
656
+ });
657
+ };
658
+ var label_default = Label;
659
+
660
+ //#endregion
661
+ //#region src/components/link/link.variants.ts
662
+ const linkVariants = (0, tailwind_variants.tv)({
663
+ base: "link",
664
+ defaultVariants: { variant: "no-underline" },
665
+ variants: { variant: {
666
+ "no-underline": "link--no-underline",
667
+ underline: "link--underline"
668
+ } }
669
+ });
670
+
671
+ //#endregion
672
+ //#region src/components/link/link.tsx
673
+ const Link = ({ className, variant, ...props }) => {
674
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
675
+ className: (0, tailwind_variants.cn)(className, linkVariants({ variant })),
676
+ ...props
677
+ });
678
+ };
679
+ var link_default = Link;
680
+
681
+ //#endregion
682
+ //#region src/components/list/list.context.ts
683
+ const ListContext = (0, react.createContext)(null);
684
+
685
+ //#endregion
686
+ //#region src/components/list/list.variants.ts
687
+ const listVariants = (0, tailwind_variants.tv)({ slots: {
688
+ item: "list__item",
689
+ root: "list"
690
+ } });
691
+
692
+ //#endregion
693
+ //#region src/components/list/use-list.ts
694
+ const useList = () => {
695
+ const context = (0, react.useContext)(ListContext);
696
+ if (!context) throw new Error("useList must be used within a ListProvider");
697
+ return context;
698
+ };
699
+
700
+ //#endregion
701
+ //#region src/components/list/list.tsx
702
+ const List = ({ className, ...props }) => {
703
+ const slots = (0, react.useMemo)(() => listVariants(), []);
704
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ListContext.Provider, {
705
+ value: { slots },
706
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
707
+ className: (0, tailwind_variants.cn)(className, slots.root()),
708
+ ...props
709
+ })
710
+ });
711
+ };
712
+ const ListItem = ({ className, ...props }) => {
713
+ const { slots } = useList();
714
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
715
+ className: (0, tailwind_variants.cn)(className, slots.item()),
716
+ ...props
717
+ });
718
+ };
719
+ List.Root = List;
720
+ List.Item = ListItem;
721
+ var list_default = List;
722
+
723
+ //#endregion
724
+ //#region src/components/menu/menu.context.ts
725
+ const MenuContext = (0, react.createContext)(null);
726
+
727
+ //#endregion
728
+ //#region src/components/menu/menu.variants.ts
729
+ const menuVariants = (0, tailwind_variants.tv)({ slots: {
730
+ arrow: "menu__arrow",
731
+ backdrop: "menu__backdrop",
732
+ checkboxItem: "menu__checkbox-item",
733
+ group: "menu__group",
734
+ groupLabel: "menu__group-label",
735
+ item: "menu__item",
736
+ popup: "menu__popup",
737
+ portal: "menu__portal",
738
+ positioner: "menu__positioner",
739
+ radioGroup: "menu__radio-group",
740
+ radioItem: "menu__radio-item",
741
+ root: "menu",
742
+ separator: "menu__separator",
743
+ submenu: "menu__submenu",
744
+ submenuTrigger: "menu__submenu__trigger",
745
+ trigger: "menu__trigger"
746
+ } });
747
+
748
+ //#endregion
749
+ //#region src/components/menu/use-menu.ts
750
+ const useMenu = () => {
751
+ const context = (0, react.useContext)(MenuContext);
752
+ if (!context) throw new Error("useMenu must be used within a MenuProvider");
753
+ return context;
754
+ };
755
+
756
+ //#endregion
757
+ //#region src/components/menu/menu.tsx
758
+ const Menu = ({ ...props }) => {
759
+ const slots = (0, react.useMemo)(() => menuVariants(), []);
760
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuContext.Provider, {
761
+ value: { slots },
762
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Root, { ...props })
763
+ });
764
+ };
765
+ const MenuTrigger = ({ className, ...props }) => {
766
+ const { slots } = useMenu();
767
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Trigger, {
768
+ className: (0, tailwind_variants.cn)(slots.trigger(), className),
769
+ ...props
770
+ });
771
+ };
772
+ const MenuPortal = ({ className, ...props }) => {
773
+ const { slots } = useMenu();
774
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Portal, {
775
+ className: (0, tailwind_variants.cn)(slots.portal(), className),
776
+ ...props
777
+ });
778
+ };
779
+ const MenuBackdrop = ({ className, ...props }) => {
780
+ const { slots } = useMenu();
781
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Backdrop, {
782
+ className: (0, tailwind_variants.cn)(slots.backdrop(), className),
783
+ ...props
784
+ });
785
+ };
786
+ const MenuPositioner = ({ className, ...props }) => {
787
+ const { slots } = useMenu();
788
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Positioner, {
789
+ className: (0, tailwind_variants.cn)(slots.positioner(), className),
790
+ ...props
791
+ });
792
+ };
793
+ const MenuPopup = ({ className, ...props }) => {
794
+ const { slots } = useMenu();
795
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Popup, {
796
+ className: (0, tailwind_variants.cn)(slots.popup(), className),
797
+ ...props
798
+ });
799
+ };
800
+ const MenuArrow = ({ className, ...props }) => {
801
+ const { slots } = useMenu();
802
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Arrow, {
803
+ className: (0, tailwind_variants.cn)(slots.arrow(), className),
804
+ ...props
805
+ });
806
+ };
807
+ const MenuItem = ({ className, ...props }) => {
808
+ const { slots } = useMenu();
809
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Item, {
810
+ className: (0, tailwind_variants.cn)(slots.item(), className),
811
+ ...props
812
+ });
813
+ };
814
+ const MenuSeparator = ({ className, ...props }) => {
815
+ const { slots } = useMenu();
816
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Separator, {
817
+ className: (0, tailwind_variants.cn)(slots.separator(), className),
818
+ ...props
819
+ });
820
+ };
821
+ const MenuGroup = ({ className, ...props }) => {
822
+ const { slots } = useMenu();
823
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Group, {
824
+ className: (0, tailwind_variants.cn)(slots.group(), className),
825
+ ...props
826
+ });
827
+ };
828
+ const MenuGroupLabel = ({ className, ...props }) => {
829
+ const { slots } = useMenu();
830
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.GroupLabel, {
831
+ className: (0, tailwind_variants.cn)(slots.groupLabel(), className),
832
+ ...props
833
+ });
834
+ };
835
+ const MenuRadioGroup = ({ className, ...props }) => {
836
+ const { slots } = useMenu();
837
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.RadioGroup, {
838
+ className: (0, tailwind_variants.cn)(slots.radioGroup(), className),
839
+ ...props
840
+ });
841
+ };
842
+ const MenuRadioItem = ({ className, ...props }) => {
843
+ const { slots } = useMenu();
844
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.RadioItem, {
845
+ className: (0, tailwind_variants.cn)(slots.radioItem(), className),
846
+ ...props
847
+ });
848
+ };
849
+ const MenuCheckboxItem = ({ className, ...props }) => {
850
+ const { slots } = useMenu();
851
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.CheckboxItem, {
852
+ className: (0, tailwind_variants.cn)(slots.checkboxItem(), className),
853
+ ...props
854
+ });
855
+ };
856
+ const MenuSubmenu = ({ ...props }) => {
857
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.SubmenuRoot, { ...props });
858
+ };
859
+ const MenuSubmenuTrigger = ({ className, ...props }) => {
860
+ const { slots } = useMenu();
861
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.SubmenuTrigger, {
862
+ className: (0, tailwind_variants.cn)(slots.submenuTrigger(), className),
863
+ ...props
864
+ });
865
+ };
866
+ Menu.Arrow = MenuArrow;
867
+ Menu.Backdrop = MenuBackdrop;
868
+ Menu.CheckboxItem = MenuCheckboxItem;
869
+ Menu.Group = MenuGroup;
870
+ Menu.GroupLabel = MenuGroupLabel;
871
+ Menu.Item = MenuItem;
872
+ Menu.Popup = MenuPopup;
873
+ Menu.Portal = MenuPortal;
874
+ Menu.Positioner = MenuPositioner;
875
+ Menu.RadioGroup = MenuRadioGroup;
876
+ Menu.RadioItem = MenuRadioItem;
877
+ Menu.Root = Menu;
878
+ Menu.Separator = MenuSeparator;
879
+ Menu.Submenu = MenuSubmenu;
880
+ Menu.SubmenuTrigger = MenuSubmenuTrigger;
881
+ Menu.Trigger = MenuTrigger;
882
+ var menu_default = Menu;
883
+
884
+ //#endregion
885
+ //#region src/components/meter/meter.context.ts
886
+ const MeterContext = (0, react.createContext)(void 0);
887
+
888
+ //#endregion
889
+ //#region src/components/meter/meter.variants.ts
890
+ const meterVariants = (0, tailwind_variants.tv)({
891
+ slots: {
892
+ indicator: "meter__indicator",
893
+ label: "meter__label",
894
+ root: "meter",
895
+ track: "meter__track",
896
+ value: "meter__value"
897
+ },
898
+ variants: {
899
+ size: {
900
+ lg: { root: "meter--lg" },
901
+ md: { root: "meter--md" },
902
+ sm: { root: "meter--sm" }
903
+ },
904
+ variant: {
905
+ danger: { root: "meter--danger" },
906
+ primary: { root: "meter--primary" },
907
+ secondary: { root: "meter--secondary" },
908
+ success: { root: "meter--success" }
909
+ }
910
+ }
911
+ });
912
+
913
+ //#endregion
914
+ //#region src/components/meter/use-meter.ts
915
+ const useMeter = () => {
916
+ const context = (0, react.useContext)(MeterContext);
917
+ if (!context) throw new Error("useMeter must be used within a MeterProvider");
918
+ return context;
919
+ };
920
+
921
+ //#endregion
922
+ //#region src/components/meter/meter.tsx
923
+ const Meter = ({ className, size, variant, ...props }) => {
924
+ const slots = (0, react.useMemo)(() => meterVariants({
925
+ size,
926
+ variant
927
+ }), [size, variant]);
928
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MeterContext, {
929
+ value: { slots },
930
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Meter.Root, {
931
+ className: (0, tailwind_variants.cn)(className, slots.root()),
932
+ ...props
933
+ })
934
+ });
935
+ };
936
+ const MeterLabel = ({ className, ...props }) => {
937
+ const { slots } = useMeter();
938
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Meter.Label, {
939
+ className: (0, tailwind_variants.cn)(className, slots.label()),
940
+ ...props
941
+ });
942
+ };
943
+ const MeterValue = ({ className, ...props }) => {
944
+ const { slots } = useMeter();
945
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Meter.Value, {
946
+ className: (0, tailwind_variants.cn)(className, slots.value()),
947
+ ...props
948
+ });
949
+ };
950
+ const MeterTrack = ({ className, ...props }) => {
951
+ const { slots } = useMeter();
952
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Meter.Track, {
953
+ className: (0, tailwind_variants.cn)(className, slots.track()),
954
+ ...props
955
+ });
956
+ };
957
+ const MeterIndicator = ({ className, ...props }) => {
958
+ const { slots } = useMeter();
959
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Meter.Indicator, {
960
+ className: (0, tailwind_variants.cn)(className, slots.indicator()),
961
+ ...props
962
+ });
963
+ };
964
+ Meter.Indicator = MeterIndicator;
965
+ Meter.Label = MeterLabel;
966
+ Meter.Root = Meter;
967
+ Meter.Track = MeterTrack;
968
+ Meter.Value = MeterValue;
969
+ var meter_default = Meter;
970
+
971
+ //#endregion
972
+ //#region src/components/navbar/navbar.context.ts
973
+ const NavbarContext = (0, react.createContext)(null);
974
+
975
+ //#endregion
976
+ //#region src/components/navbar/navbar.variants.ts
977
+ const navbarVariants = (0, tailwind_variants.tv)({ slots: {
978
+ container: "navbar__container",
979
+ content: "navbar__content",
980
+ list: "navbar__list",
981
+ listItem: "navbar__list-item",
982
+ menu: "navbar__menu",
983
+ menuItem: "navbar__menu-item",
984
+ root: "navbar",
985
+ toggle: "navbar__toggle"
986
+ } });
987
+
988
+ //#endregion
989
+ //#region src/components/navbar/use-navbar.ts
990
+ const useNavbar = () => {
991
+ const context = react.default.useContext(NavbarContext);
992
+ if (!context) throw new Error("useNavbar must be used within a NavbarProvider");
993
+ return context;
994
+ };
995
+
996
+ //#endregion
997
+ //#region src/components/navbar/navbar.tsx
998
+ const Navbar = ({ className, isOpen, onOpenChange, ...props }) => {
999
+ const slots = (0, react.useMemo)(() => navbarVariants(), []);
1000
+ const [internalOpen, setInternalOpen] = (0, react.useState)(false);
1001
+ const open = isOpen ?? internalOpen;
1002
+ const handleOpenChange = (0, react.useCallback)((next) => {
1003
+ if (isOpen === void 0) setInternalOpen(next);
1004
+ onOpenChange?.(next);
1005
+ }, [isOpen, onOpenChange]);
1006
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NavbarContext.Provider, {
1007
+ value: {
1008
+ isOpen: open,
1009
+ onOpenChange: handleOpenChange,
1010
+ slots
1011
+ },
1012
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
1013
+ className: (0, tailwind_variants.cn)(slots.root(), className),
1014
+ ...props
1015
+ })
1016
+ });
1017
+ };
1018
+ const NavbarContainer = ({ className, ...props }) => {
1019
+ const { slots } = useNavbar();
1020
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
1021
+ className: (0, tailwind_variants.cn)(slots.container(), className),
1022
+ ...props
1023
+ });
1024
+ };
1025
+ const NavbarContent = ({ className, ...props }) => {
1026
+ const { slots } = useNavbar();
1027
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1028
+ className: (0, tailwind_variants.cn)(slots.content(), className),
1029
+ ...props
1030
+ });
1031
+ };
1032
+ const NavbarList = ({ className, ...props }) => {
1033
+ const { slots } = useNavbar();
1034
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
1035
+ className: (0, tailwind_variants.cn)(slots.list(), className),
1036
+ ...props
1037
+ });
1038
+ };
1039
+ const NavbarListItem = ({ className, ...props }) => {
1040
+ const { slots } = useNavbar();
1041
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
1042
+ className: (0, tailwind_variants.cn)(slots.listItem(), className),
1043
+ ...props
1044
+ });
1045
+ };
1046
+ const NavbarToggle = ({ className, ...props }) => {
1047
+ const { slots, isOpen, onOpenChange } = useNavbar();
1048
+ const Icon = isOpen ? lucide_react.LucideX : lucide_react.LucideMenu;
1049
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1050
+ className: (0, tailwind_variants.cn)(className, slots.toggle()),
1051
+ onClick: () => onOpenChange(!isOpen),
1052
+ ...props,
1053
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { className: "size-5" })
1054
+ });
1055
+ };
1056
+ const NavbarMenu = ({ className, ...props }) => {
1057
+ const { slots, isOpen } = useNavbar();
1058
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
1059
+ className: (0, tailwind_variants.cn)(slots.menu(), className),
1060
+ "data-expanded": isOpen ? "true" : "false",
1061
+ ...props
1062
+ });
1063
+ };
1064
+ const NavbarMenuItem = ({ className, ...props }) => {
1065
+ const { slots } = useNavbar();
1066
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
1067
+ className: (0, tailwind_variants.cn)(slots.menuItem(), className),
1068
+ ...props
1069
+ });
1070
+ };
1071
+ Navbar.Root = Navbar;
1072
+ Navbar.Container = NavbarContainer;
1073
+ Navbar.Content = NavbarContent;
1074
+ Navbar.List = NavbarList;
1075
+ Navbar.ListItem = NavbarListItem;
1076
+ Navbar.Toggle = NavbarToggle;
1077
+ Navbar.Menu = NavbarMenu;
1078
+ Navbar.MenuItem = NavbarMenuItem;
1079
+ var navbar_default = Navbar;
1080
+
1081
+ //#endregion
1082
+ //#region src/components/separator/separator.variants.ts
1083
+ const separatorVariants = (0, tailwind_variants.tv)({
1084
+ base: "separator",
1085
+ defaultVariants: { orientation: "horizontal" },
1086
+ variants: { orientation: {
1087
+ horizontal: "separator--horizontal",
1088
+ vertical: "separator--vertical"
1089
+ } }
1090
+ });
1091
+
1092
+ //#endregion
1093
+ //#region src/components/separator/separator.tsx
1094
+ const Separator = ({ className, orientation, ...props }) => {
1095
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Separator, {
1096
+ className: (0, tailwind_variants.cn)(className, separatorVariants({ orientation })),
1097
+ ...props
1098
+ });
1099
+ };
1100
+ var separator_default = Separator;
1101
+
1102
+ //#endregion
1103
+ //#region src/components/switch/switch.context.ts
1104
+ const SwitchContext = (0, react.createContext)(null);
1105
+
1106
+ //#endregion
1107
+ //#region src/components/switch/switch.variants.ts
1108
+ const switchVariants = (0, tailwind_variants.tv)({
1109
+ defaultVariants: { size: "md" },
1110
+ slots: {
1111
+ root: "switch",
1112
+ thumb: "switch__thumb"
1113
+ },
1114
+ variants: { size: {
1115
+ lg: { root: "switch--lg" },
1116
+ md: { root: "switch--md" },
1117
+ sm: { root: "switch--sm" }
1118
+ } }
1119
+ });
1120
+
1121
+ //#endregion
1122
+ //#region src/components/switch/use-switch.ts
1123
+ const useSwitch = () => {
1124
+ const context = (0, react.useContext)(SwitchContext);
1125
+ if (!context) throw new Error("useSwitch must be used within a SwitchProvider");
1126
+ return context;
1127
+ };
1128
+
1129
+ //#endregion
1130
+ //#region src/components/switch/switch.tsx
1131
+ const Switch = ({ className, size, ...props }) => {
1132
+ const slots = (0, react.useMemo)(() => switchVariants({ size }), [size]);
1133
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SwitchContext.Provider, {
1134
+ value: { slots },
1135
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Switch.Root, {
1136
+ className: (0, tailwind_variants.cn)(className, slots.root()),
1137
+ ...props
1138
+ })
1139
+ });
1140
+ };
1141
+ const SwitchThumb = ({ className, ...props }) => {
1142
+ const { slots } = useSwitch();
1143
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Switch.Thumb, {
1144
+ className: (0, tailwind_variants.cn)(className, slots.thumb()),
1145
+ ...props
1146
+ });
1147
+ };
1148
+ Switch.Thumb = SwitchThumb;
1149
+ Switch.Root = Switch;
1150
+ var switch_default = Switch;
1151
+
1152
+ //#endregion
1153
+ //#region src/components/tabs/tabs.context.ts
1154
+ const TabsContext = (0, react.createContext)(null);
1155
+
1156
+ //#endregion
1157
+ //#region src/components/tabs/tabs.variants.ts
1158
+ const tabsVariants = (0, tailwind_variants.tv)({ slots: {
1159
+ indicator: "tabs__indicator",
1160
+ list: "tabs__list",
1161
+ panel: "tabs__panel",
1162
+ root: "tabs",
1163
+ tab: "tabs__tab"
1164
+ } });
1165
+
1166
+ //#endregion
1167
+ //#region src/components/tabs/use-tabs.ts
1168
+ const useTabs = () => {
1169
+ const context = (0, react.useContext)(TabsContext);
1170
+ if (!context) throw new Error("useTabs must be used within a TabsProvider");
1171
+ return context;
1172
+ };
1173
+
1174
+ //#endregion
1175
+ //#region src/components/tabs/tabs.tsx
1176
+ const Tabs = ({ className, ...props }) => {
1177
+ const slots = (0, react.useMemo)(() => tabsVariants(), []);
1178
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TabsContext.Provider, {
1179
+ value: { slots },
1180
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Tabs.Root, {
1181
+ className: (0, tailwind_variants.cn)(className, slots.root()),
1182
+ ...props
1183
+ })
1184
+ });
1185
+ };
1186
+ const TabsList = ({ className, ...props }) => {
1187
+ const { slots } = useTabs();
1188
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Tabs.List, {
1189
+ className: (0, tailwind_variants.cn)(slots.list(), className),
1190
+ ...props
1191
+ });
1192
+ };
1193
+ const TabsTab = ({ className, ...props }) => {
1194
+ const { slots } = useTabs();
1195
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Tabs.Tab, {
1196
+ className: (0, tailwind_variants.cn)(slots.tab(), className),
1197
+ ...props
1198
+ });
1199
+ };
1200
+ const TabsIndicator = ({ className, ...props }) => {
1201
+ const { slots } = useTabs();
1202
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Tabs.Indicator, {
1203
+ className: (0, tailwind_variants.cn)(slots.indicator(), className),
1204
+ ...props
1205
+ });
1206
+ };
1207
+ const TabsPanel = ({ className, ...props }) => {
1208
+ const { slots } = useTabs();
1209
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Tabs.Panel, {
1210
+ className: (0, tailwind_variants.cn)(slots.panel(), className),
1211
+ ...props
1212
+ });
1213
+ };
1214
+ Tabs.List = TabsList;
1215
+ Tabs.Tab = TabsTab;
1216
+ Tabs.Indicator = TabsIndicator;
1217
+ Tabs.Panel = TabsPanel;
1218
+ Tabs.Root = Tabs;
1219
+ var tabs_default = Tabs;
1220
+
1221
+ //#endregion
1222
+ //#region src/components/text/text.variants.ts
1223
+ const textVariants = (0, tailwind_variants.tv)({ base: "text" });
1224
+
1225
+ //#endregion
1226
+ //#region src/components/text/text.tsx
1227
+ const Text = ({ className, ...props }) => {
1228
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1229
+ className: (0, tailwind_variants.cn)(textVariants(), className),
1230
+ "data-slot": "text",
1231
+ ...props
1232
+ });
1233
+ };
1234
+ var text_default = Text;
1235
+
1236
+ //#endregion
1237
+ //#region src/components/textarea/textarea.variants.ts
1238
+ const textareaVariants = (0, tailwind_variants.tv)({
1239
+ base: "textarea",
1240
+ extend: inputVariants
1241
+ });
1242
+
1243
+ //#endregion
1244
+ //#region src/components/textarea/textarea.tsx
1245
+ const Textarea = ({ className, ...props }) => {
1246
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
1247
+ className: (0, tailwind_variants.cn)(className, textareaVariants()),
1248
+ ...props
1249
+ });
1250
+ };
1251
+ var textarea_default = Textarea;
1252
+
1253
+ //#endregion
1254
+ //#region src/components/toggle-button/toggle-button.variants.ts
1255
+ const toggleButtonVariants = (0, tailwind_variants.tv)({
1256
+ base: "toggle-button",
1257
+ extend: buttonVariants
1258
+ });
1259
+
1260
+ //#endregion
1261
+ //#region src/components/toggle-button/toggle-button.tsx
1262
+ const ToggleButton = ({ className, variant, size, ...props }) => {
1263
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Toggle, {
1264
+ className: (0, tailwind_variants.cn)(className, toggleButtonVariants({
1265
+ size,
1266
+ variant
1267
+ })),
1268
+ ...props
1269
+ });
1270
+ };
1271
+ var toggle_button_default = ToggleButton;
1272
+
1273
+ //#endregion
1274
+ exports.Accordion = accordion_default;
1275
+ exports.Avatar = avatar_default;
1276
+ exports.Button = button_default;
1277
+ exports.ButtonGroup = button_group_default;
1278
+ exports.Card = card_default;
1279
+ exports.Checkbox = checkbox_default;
1280
+ exports.CheckboxGroup = checkbox_group_default;
1281
+ exports.Chip = chip_default;
1282
+ exports.Container = container_default;
1283
+ exports.Dialog = dialog_default;
1284
+ exports.Field = field_default;
1285
+ exports.Form = form_default;
1286
+ exports.Input = input_default;
1287
+ exports.Label = label_default;
1288
+ exports.Link = link_default;
1289
+ exports.List = list_default;
1290
+ exports.Menu = menu_default;
1291
+ exports.Meter = meter_default;
1292
+ exports.Navbar = navbar_default;
1293
+ exports.Separator = separator_default;
1294
+ exports.Switch = switch_default;
1295
+ exports.Tabs = tabs_default;
1296
+ exports.Text = text_default;
1297
+ exports.Textarea = textarea_default;
1298
+ exports.ToggleButton = toggle_button_default;
1299
+ exports.accordionVariants = accordionVariants;
1300
+ exports.avatarVariants = avatarVariants;
1301
+ exports.buttonGroupVariants = buttonGroupVariants;
1302
+ exports.buttonVariants = buttonVariants;
1303
+ exports.cardVariants = cardVariants;
1304
+ exports.checkboxGroupVariants = checkboxGroupVariants;
1305
+ exports.checkboxVariants = checkboxVariants;
1306
+ exports.chipVariants = chipVariants;
1307
+ Object.defineProperty(exports, 'cn', {
1308
+ enumerable: true,
1309
+ get: function () {
1310
+ return tailwind_variants.cn;
1311
+ }
1312
+ });
1313
+ exports.containerVariants = containerVariants;
1314
+ exports.dialogVariants = dialogVariants;
1315
+ exports.fieldVariants = fieldVariants;
1316
+ exports.formVariants = formVariants;
1317
+ exports.inputVariants = inputVariants;
1318
+ exports.labelVariants = labelVariants;
1319
+ exports.linkVariants = linkVariants;
1320
+ exports.listVariants = listVariants;
1321
+ exports.menuVariants = menuVariants;
1322
+ exports.meterVariants = meterVariants;
1323
+ exports.navbarVariants = navbarVariants;
1324
+ exports.separatorVariants = separatorVariants;
1325
+ exports.switchVariants = switchVariants;
1326
+ exports.tabsVariants = tabsVariants;
1327
+ exports.textVariants = textVariants;
1328
+ exports.textareaVariants = textareaVariants;
1329
+ exports.toggleButtonVariants = toggleButtonVariants;
1330
+ //# sourceMappingURL=index.cjs.map