@fea-ui/react 0.0.0-canary.2

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,2356 @@
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
+ let _radix_ui_react_slot = require("@radix-ui/react-slot");
35
+
36
+ //#region src/components/accordion/accordion.context.ts
37
+ const AccordionContext = (0, react.createContext)(null);
38
+
39
+ //#endregion
40
+ //#region src/components/accordion/accordion.variants.ts
41
+ const accordionVariants = (0, tailwind_variants.tv)({ slots: {
42
+ content: "accordion__content",
43
+ header: "accordion__header",
44
+ item: "accordion__item",
45
+ panel: "accordion__panel",
46
+ root: "accordion",
47
+ trigger: "accordion__trigger",
48
+ triggerIcon: "accordion__trigger-icon"
49
+ } });
50
+
51
+ //#endregion
52
+ //#region src/components/accordion/use-accordion.ts
53
+ const useAccordion = () => {
54
+ const context = (0, react.useContext)(AccordionContext);
55
+ if (!context) throw new Error("useAccordion must be used within a AccordionProvider");
56
+ return context;
57
+ };
58
+
59
+ //#endregion
60
+ //#region src/components/accordion/accordion.tsx
61
+ const Accordion = ({ className, ...props }) => {
62
+ const slots = (0, react.useMemo)(() => accordionVariants({}), []);
63
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AccordionContext.Provider, {
64
+ value: { slots },
65
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Accordion.Root, {
66
+ className: (0, tailwind_variants.cn)(className, slots.root()),
67
+ ...props
68
+ })
69
+ });
70
+ };
71
+ const AccordionItem = ({ className, ...props }) => {
72
+ const { slots } = useAccordion();
73
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Accordion.Item, {
74
+ className: (0, tailwind_variants.cn)(className, slots.item()),
75
+ ...props
76
+ });
77
+ };
78
+ const AccordionHeader = ({ className, ...props }) => {
79
+ const { slots } = useAccordion();
80
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Accordion.Header, {
81
+ className: (0, tailwind_variants.cn)(className, slots.header()),
82
+ ...props
83
+ });
84
+ };
85
+ const AccordionTrigger = ({ className, ...props }) => {
86
+ const { slots } = useAccordion();
87
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Accordion.Trigger, {
88
+ className: (0, tailwind_variants.cn)(className, slots.trigger()),
89
+ ...props
90
+ });
91
+ };
92
+ const AccordionTriggerIcon = ({ className, ...props }) => {
93
+ const { slots } = useAccordion();
94
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideChevronDown, {
95
+ className: (0, tailwind_variants.cn)(className, slots.triggerIcon()),
96
+ ...props
97
+ });
98
+ };
99
+ const AccordionPanel = ({ className, ...props }) => {
100
+ const { slots } = useAccordion();
101
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Accordion.Panel, {
102
+ className: (0, tailwind_variants.cn)(className, slots.panel()),
103
+ ...props
104
+ });
105
+ };
106
+ const AccordionContent = ({ className, ...props }) => {
107
+ const { slots } = useAccordion();
108
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
109
+ className: (0, tailwind_variants.cn)(className, slots.content()),
110
+ ...props
111
+ });
112
+ };
113
+ var accordion_default = Object.assign(Accordion, {
114
+ Content: AccordionContent,
115
+ Header: AccordionHeader,
116
+ Item: AccordionItem,
117
+ Panel: AccordionPanel,
118
+ Root: Accordion,
119
+ Trigger: AccordionTrigger,
120
+ TriggerIcon: AccordionTriggerIcon
121
+ });
122
+
123
+ //#endregion
124
+ //#region src/components/alert/alert.context.ts
125
+ const AlertContext = (0, react.createContext)(null);
126
+
127
+ //#endregion
128
+ //#region src/components/alert/alert.variants.ts
129
+ const alertVariants = (0, tailwind_variants.tv)({
130
+ defaultVariants: { variant: "info" },
131
+ slots: {
132
+ content: "alert__content",
133
+ description: "alert__description",
134
+ indicator: "alert__indicator",
135
+ root: "alert",
136
+ title: "alert__title"
137
+ },
138
+ variants: { variant: {
139
+ danger: { root: "alert--danger" },
140
+ info: { root: "alert--info" },
141
+ primary: { root: "alert--primary" },
142
+ success: { root: "alert--success" },
143
+ warning: { root: "alert--warning" }
144
+ } }
145
+ });
146
+
147
+ //#endregion
148
+ //#region src/components/alert/use-alert.ts
149
+ const useAlert = () => {
150
+ const context = (0, react.useContext)(AlertContext);
151
+ if (!context) throw new Error("useAlert must be used within a AlertProvider");
152
+ return context;
153
+ };
154
+
155
+ //#endregion
156
+ //#region src/components/alert/alert.tsx
157
+ const Alert = ({ className, variant, ...props }) => {
158
+ const slots = (0, react.useMemo)(() => alertVariants({
159
+ className,
160
+ variant
161
+ }), [className, variant]);
162
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertContext, {
163
+ value: {
164
+ slots,
165
+ variant
166
+ },
167
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
168
+ className: (0, tailwind_variants.cn)(className, slots.root()),
169
+ ...props
170
+ })
171
+ });
172
+ };
173
+ const AlertIndicator = ({ className, children, ...props }) => {
174
+ const { slots, variant } = useAlert();
175
+ const IndicatorIcon = ({ children: children$1 }) => {
176
+ if (children$1) return children$1;
177
+ switch (variant) {
178
+ case "danger": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideXCircle, {});
179
+ case "success": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideCheckCircle, {});
180
+ case "warning": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideAlertTriangle, {});
181
+ default: return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideInfo, {});
182
+ }
183
+ };
184
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
185
+ className: (0, tailwind_variants.cn)(className, slots.indicator()),
186
+ ...props,
187
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IndicatorIcon, { children })
188
+ });
189
+ };
190
+ const AlertContent = ({ className, ...props }) => {
191
+ const { slots } = useAlert();
192
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
193
+ className: (0, tailwind_variants.cn)(className, slots.content()),
194
+ ...props
195
+ });
196
+ };
197
+ const AlertTitle = ({ className, ...props }) => {
198
+ const { slots } = useAlert();
199
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
200
+ className: (0, tailwind_variants.cn)(className, slots.title()),
201
+ ...props
202
+ });
203
+ };
204
+ const AlertDescription = ({ className, ...props }) => {
205
+ const { slots } = useAlert();
206
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
207
+ className: (0, tailwind_variants.cn)(className, slots.description()),
208
+ ...props
209
+ });
210
+ };
211
+ var alert_default = Object.assign(Alert, {
212
+ Content: AlertContent,
213
+ Description: AlertDescription,
214
+ Indicator: AlertIndicator,
215
+ Root: Alert,
216
+ Title: AlertTitle
217
+ });
218
+
219
+ //#endregion
220
+ //#region src/components/alert-dialog/alert-dialog.context.ts
221
+ const AlertDialogContext = (0, react.createContext)(null);
222
+
223
+ //#endregion
224
+ //#region src/components/alert-dialog/alert-dialog.variants.ts
225
+ const alertDialogVariants = (0, tailwind_variants.tv)({ slots: {
226
+ backdrop: "alert-dialog__backdrop",
227
+ close: "alert-dialog__close",
228
+ description: "alert-dialog__description",
229
+ popup: "alert-dialog__popup",
230
+ portal: "alert-dialog__portal",
231
+ root: "alert-dialog",
232
+ title: "alert-dialog__title",
233
+ trigger: "alert-dialog__trigger",
234
+ viewport: "alert-dialog__viewport"
235
+ } });
236
+
237
+ //#endregion
238
+ //#region src/components/alert-dialog/use-alert-dialog.ts
239
+ const useAlertDialog = () => {
240
+ const context = (0, react.useContext)(AlertDialogContext);
241
+ if (!context) throw new Error("useAlertDialog must be used within a AlertDialogProvider");
242
+ return context;
243
+ };
244
+
245
+ //#endregion
246
+ //#region src/components/alert-dialog/alert-dialog.tsx
247
+ const AlertDialog = ({ ...props }) => {
248
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertDialogContext, {
249
+ value: { slots: (0, react.useMemo)(() => alertDialogVariants(), []) },
250
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Root, { ...props })
251
+ });
252
+ };
253
+ const AlertDialogTrigger = ({ className, ...props }) => {
254
+ const { slots } = useAlertDialog();
255
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Trigger, {
256
+ className: (0, tailwind_variants.cn)(slots.trigger(), className),
257
+ ...props
258
+ });
259
+ };
260
+ const AlertDialogPortal = ({ className, ...props }) => {
261
+ const { slots } = useAlertDialog();
262
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Portal, {
263
+ className: (0, tailwind_variants.cn)(slots.portal(), className),
264
+ ...props
265
+ });
266
+ };
267
+ const AlertDialogBackdrop = ({ className, ...props }) => {
268
+ const { slots } = useAlertDialog();
269
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Backdrop, {
270
+ className: (0, tailwind_variants.cn)(slots.backdrop(), className),
271
+ ...props
272
+ });
273
+ };
274
+ const AlertDialogViewport = ({ className, ...props }) => {
275
+ const { slots } = useAlertDialog();
276
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Viewport, {
277
+ className: (0, tailwind_variants.cn)(slots.viewport(), className),
278
+ ...props
279
+ });
280
+ };
281
+ const AlertDialogPopup = ({ className, ...props }) => {
282
+ const { slots } = useAlertDialog();
283
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Popup, {
284
+ className: (0, tailwind_variants.cn)(slots.popup(), className),
285
+ ...props
286
+ });
287
+ };
288
+ const AlertDialogTitle = ({ className, ...props }) => {
289
+ const { slots } = useAlertDialog();
290
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Title, {
291
+ className: (0, tailwind_variants.cn)(slots.title(), className),
292
+ ...props
293
+ });
294
+ };
295
+ const AlertDialogDescription = ({ className, ...props }) => {
296
+ const { slots } = useAlertDialog();
297
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Description, {
298
+ className: (0, tailwind_variants.cn)(slots.description(), className),
299
+ ...props
300
+ });
301
+ };
302
+ const AlertDialogClose = ({ className, children, ...props }) => {
303
+ const { slots } = useAlertDialog();
304
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Close, {
305
+ className: (0, tailwind_variants.cn)(slots.close(), className),
306
+ ...props,
307
+ children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideX, {})
308
+ });
309
+ };
310
+ var alert_dialog_default = Object.assign(AlertDialog, {
311
+ Backdrop: AlertDialogBackdrop,
312
+ Close: AlertDialogClose,
313
+ Description: AlertDialogDescription,
314
+ Popup: AlertDialogPopup,
315
+ Portal: AlertDialogPortal,
316
+ Root: AlertDialog,
317
+ Title: AlertDialogTitle,
318
+ Trigger: AlertDialogTrigger,
319
+ Viewport: AlertDialogViewport
320
+ });
321
+
322
+ //#endregion
323
+ //#region src/components/avatar/avatar.context.ts
324
+ const AvatarContext = (0, react.createContext)(null);
325
+
326
+ //#endregion
327
+ //#region src/components/avatar/avatar.variants.ts
328
+ const avatarVariants = (0, tailwind_variants.tv)({
329
+ defaultVariants: { size: "md" },
330
+ slots: {
331
+ fallback: "avatar__fallback",
332
+ image: "avatar__image",
333
+ root: "avatar"
334
+ },
335
+ variants: { size: {
336
+ lg: { root: "avatar--lg" },
337
+ md: { root: "avatar--md" },
338
+ sm: { root: "avatar--sm" }
339
+ } }
340
+ });
341
+
342
+ //#endregion
343
+ //#region src/components/avatar/use-avatar.ts
344
+ const useAvatar = () => {
345
+ const ctx = (0, react.useContext)(AvatarContext);
346
+ if (!ctx) throw new Error("useAvatar must be used within the Avatar component.");
347
+ return ctx;
348
+ };
349
+
350
+ //#endregion
351
+ //#region src/components/avatar/avatar.tsx
352
+ const Avatar = ({ className, size, ...props }) => {
353
+ const slots = (0, react.useMemo)(() => avatarVariants({ size }), [size]);
354
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AvatarContext.Provider, {
355
+ value: { slots },
356
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Avatar.Root, {
357
+ className: (0, tailwind_variants.cn)(className, slots.root()),
358
+ ...props
359
+ })
360
+ });
361
+ };
362
+ const AvatarImage = ({ className, ...props }) => {
363
+ const { slots } = useAvatar();
364
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Avatar.Image, {
365
+ className: (0, tailwind_variants.cn)(className, slots.image()),
366
+ ...props
367
+ });
368
+ };
369
+ const AvatarFallback = ({ className, ...props }) => {
370
+ const { slots } = useAvatar();
371
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Avatar.Fallback, {
372
+ className: (0, tailwind_variants.cn)(className, slots.fallback()),
373
+ ...props
374
+ });
375
+ };
376
+ var avatar_default = Object.assign(Avatar, {
377
+ Fallback: AvatarFallback,
378
+ Image: AvatarImage,
379
+ Root: Avatar
380
+ });
381
+
382
+ //#endregion
383
+ //#region src/components/button/button.variants.ts
384
+ const buttonVariants = (0, tailwind_variants.tv)({
385
+ base: "button",
386
+ defaultVariants: {
387
+ isIconOnly: false,
388
+ size: "md",
389
+ variant: "primary"
390
+ },
391
+ variants: {
392
+ isIconOnly: { true: "button--icon-only" },
393
+ size: {
394
+ lg: "button--lg",
395
+ md: "button--md",
396
+ sm: "button--sm"
397
+ },
398
+ variant: {
399
+ danger: "button--danger",
400
+ ghost: "button--ghost",
401
+ outline: "button--outline",
402
+ primary: "button--primary",
403
+ secondary: "button--secondary"
404
+ }
405
+ }
406
+ });
407
+
408
+ //#endregion
409
+ //#region src/components/button/button.tsx
410
+ const Button = ({ className, variant, size, isIconOnly, ...props }) => {
411
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Button, {
412
+ className: (0, tailwind_variants.cn)(buttonVariants({
413
+ isIconOnly,
414
+ size,
415
+ variant
416
+ }), className),
417
+ ...props
418
+ });
419
+ };
420
+ var button_default = Button;
421
+
422
+ //#endregion
423
+ //#region src/components/button-group/button-group.variants.ts
424
+ const buttonGroupVariants = (0, tailwind_variants.tv)({ base: "button-group" });
425
+
426
+ //#endregion
427
+ //#region src/components/button-group/button-group.tsx
428
+ const ButtonGroup = ({ className, ...props }) => {
429
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
430
+ className: (0, tailwind_variants.cn)(className, buttonGroupVariants()),
431
+ ...props
432
+ });
433
+ };
434
+ var button_group_default = ButtonGroup;
435
+
436
+ //#endregion
437
+ //#region src/components/card/card.context.ts
438
+ const CardContext = (0, react.createContext)(null);
439
+
440
+ //#endregion
441
+ //#region src/components/card/card.variants.ts
442
+ const cardVariants = (0, tailwind_variants.tv)({
443
+ defaultVariants: { variant: "default" },
444
+ slots: {
445
+ body: "card__body",
446
+ description: "card__description",
447
+ footer: "card__footer",
448
+ header: "card__header",
449
+ root: "card",
450
+ title: "card__title"
451
+ },
452
+ variants: { variant: {
453
+ default: { root: "card--default" },
454
+ transparent: { root: "card--transparent" }
455
+ } }
456
+ });
457
+
458
+ //#endregion
459
+ //#region src/components/card/use-card.ts
460
+ const useCard = () => {
461
+ const ctx = (0, react.useContext)(CardContext);
462
+ if (!ctx) throw new Error("CardContext must be used with in the Card component.");
463
+ return ctx;
464
+ };
465
+
466
+ //#endregion
467
+ //#region src/components/card/card.tsx
468
+ const Card = ({ className, variant, ...props }) => {
469
+ const slots = (0, react.useMemo)(() => cardVariants({ variant }), [variant]);
470
+ console.log(slots);
471
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardContext.Provider, {
472
+ value: { slots },
473
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
474
+ className: (0, tailwind_variants.cn)(className, slots.root()),
475
+ ...props
476
+ })
477
+ });
478
+ };
479
+ const CardHeader = ({ className, ...props }) => {
480
+ const { slots } = useCard();
481
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
482
+ className: (0, tailwind_variants.cn)(className, slots.header()),
483
+ ...props
484
+ });
485
+ };
486
+ const CardBody = ({ className, ...props }) => {
487
+ const { slots } = useCard();
488
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
489
+ className: (0, tailwind_variants.cn)(className, slots.body()),
490
+ ...props
491
+ });
492
+ };
493
+ const CardFooter = ({ className, ...props }) => {
494
+ const { slots } = useCard();
495
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
496
+ className: (0, tailwind_variants.cn)(className, slots.footer()),
497
+ ...props
498
+ });
499
+ };
500
+ const CardTitle = ({ className, ...props }) => {
501
+ const { slots } = useCard();
502
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
503
+ className: (0, tailwind_variants.cn)(className, slots.title()),
504
+ ...props
505
+ });
506
+ };
507
+ const CardDescription = ({ className, ...props }) => {
508
+ const { slots } = useCard();
509
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
510
+ className: (0, tailwind_variants.cn)(className, slots.description()),
511
+ ...props
512
+ });
513
+ };
514
+ /** Exports */
515
+ var card_default = Object.assign(Card, {
516
+ Body: CardBody,
517
+ Description: CardDescription,
518
+ Footer: CardFooter,
519
+ Header: CardHeader,
520
+ Root: Card,
521
+ Title: CardTitle
522
+ });
523
+
524
+ //#endregion
525
+ //#region src/components/checkbox/checkbox.context.ts
526
+ const CheckboxContext = (0, react.createContext)(null);
527
+
528
+ //#endregion
529
+ //#region src/components/checkbox/checkbox.variants.ts
530
+ const checkboxVariants = (0, tailwind_variants.tv)({ slots: {
531
+ indicator: "checkbox__indicator",
532
+ root: "checkbox"
533
+ } });
534
+
535
+ //#endregion
536
+ //#region src/components/checkbox/use-checkbox.ts
537
+ const useCheckbox = () => {
538
+ const context = (0, react.useContext)(CheckboxContext);
539
+ if (!context) throw new Error("useCheckbox must be used within a CheckboxProvider");
540
+ return context;
541
+ };
542
+
543
+ //#endregion
544
+ //#region src/components/checkbox/checkbox.tsx
545
+ const Checkbox = ({ className, ...props }) => {
546
+ const slots = (0, react.useMemo)(() => checkboxVariants({}), []);
547
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckboxContext, {
548
+ value: { slots },
549
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Checkbox.Root, {
550
+ className: (0, tailwind_variants.cn)(className, slots.root()),
551
+ ...props
552
+ })
553
+ });
554
+ };
555
+ const CheckboxIndicator = ({ className, children, ...props }) => {
556
+ const { slots } = useCheckbox();
557
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Checkbox.Indicator, {
558
+ className: (0, tailwind_variants.cn)(className, slots.indicator()),
559
+ ...props,
560
+ children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideCheck, {})
561
+ });
562
+ };
563
+ var checkbox_default = Object.assign(Checkbox, {
564
+ Indicator: CheckboxIndicator,
565
+ Root: Checkbox
566
+ });
567
+
568
+ //#endregion
569
+ //#region src/components/checkbox-group/checkbox-group.variants.ts
570
+ const checkboxGroupVariants = (0, tailwind_variants.tv)({ base: "checkbox-group" });
571
+
572
+ //#endregion
573
+ //#region src/components/checkbox-group/checkbox-group.tsx
574
+ const CheckboxGroup = ({ className, ...props }) => {
575
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.CheckboxGroup, {
576
+ className: (0, tailwind_variants.cn)(className, checkboxGroupVariants()),
577
+ ...props
578
+ });
579
+ };
580
+ var checkbox_group_default = CheckboxGroup;
581
+
582
+ //#endregion
583
+ //#region src/components/chip/chip.variants.ts
584
+ const chipVariants = (0, tailwind_variants.tv)({
585
+ base: "chip",
586
+ defaultVariants: {
587
+ size: "md",
588
+ variant: "primary"
589
+ },
590
+ variants: {
591
+ size: {
592
+ lg: "chip--lg",
593
+ md: "chip--md",
594
+ sm: "chip--sm"
595
+ },
596
+ variant: {
597
+ danger: "chip--danger",
598
+ outline: "chip--outline",
599
+ primary: "chip--primary",
600
+ secondary: "chip--secondary",
601
+ success: "chip--success"
602
+ }
603
+ }
604
+ });
605
+
606
+ //#endregion
607
+ //#region src/components/chip/chip.tsx
608
+ const Chip = ({ className, variant, size, ...props }) => {
609
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
610
+ className: (0, tailwind_variants.cn)(className, chipVariants({
611
+ size,
612
+ variant
613
+ })),
614
+ ...props
615
+ });
616
+ };
617
+ var chip_default = Chip;
618
+
619
+ //#endregion
620
+ //#region src/components/container/container.variants.ts
621
+ const containerVariants = (0, tailwind_variants.tv)({ base: "container" });
622
+
623
+ //#endregion
624
+ //#region src/components/container/container.tsx
625
+ const Container = ({ className, ...props }) => {
626
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
627
+ className: (0, tailwind_variants.cn)(className, containerVariants()),
628
+ ...props
629
+ });
630
+ };
631
+ var container_default = Container;
632
+
633
+ //#endregion
634
+ //#region src/components/dialog/dialog.context.ts
635
+ const DialogContext = (0, react.createContext)(null);
636
+
637
+ //#endregion
638
+ //#region src/components/dialog/dialog.variants.ts
639
+ const dialogVariants = (0, tailwind_variants.tv)({ slots: {
640
+ backdrop: "dialog__backdrop",
641
+ close: "dialog__close",
642
+ description: "dialog__description",
643
+ popup: "dialog__popup",
644
+ portal: "dialog__portal",
645
+ root: "dialog",
646
+ title: "dialog__title",
647
+ trigger: "dialog__trigger",
648
+ viewport: "dialog__viewport"
649
+ } });
650
+
651
+ //#endregion
652
+ //#region src/components/dialog/use-dialog.ts
653
+ const useDialog = () => {
654
+ const context = (0, react.useContext)(DialogContext);
655
+ if (!context) throw new Error("useDialog must be used within a DialogProvider");
656
+ return context;
657
+ };
658
+
659
+ //#endregion
660
+ //#region src/components/dialog/dialog.tsx
661
+ const Dialog = ({ ...props }) => {
662
+ const slots = (0, react.useMemo)(() => dialogVariants(), []);
663
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogContext.Provider, {
664
+ value: { slots },
665
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Root, { ...props })
666
+ });
667
+ };
668
+ const DialogTrigger = ({ className, ...props }) => {
669
+ const { slots } = useDialog();
670
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Trigger, {
671
+ className: (0, tailwind_variants.cn)(slots.trigger(), className),
672
+ ...props
673
+ });
674
+ };
675
+ const DialogPortal = ({ className, ...props }) => {
676
+ const { slots } = useDialog();
677
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Portal, {
678
+ className: (0, tailwind_variants.cn)(slots.portal(), className),
679
+ ...props
680
+ });
681
+ };
682
+ const DialogBackdrop = ({ className, ...props }) => {
683
+ const { slots } = useDialog();
684
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Backdrop, {
685
+ className: (0, tailwind_variants.cn)(slots.backdrop(), className),
686
+ ...props
687
+ });
688
+ };
689
+ const DialogViewport = ({ className, ...props }) => {
690
+ const { slots } = useDialog();
691
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Viewport, {
692
+ className: (0, tailwind_variants.cn)(slots.viewport(), className),
693
+ ...props
694
+ });
695
+ };
696
+ const DialogPopup = ({ className, ...props }) => {
697
+ const { slots } = useDialog();
698
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Popup, {
699
+ className: (0, tailwind_variants.cn)(slots.popup(), className),
700
+ ...props
701
+ });
702
+ };
703
+ const DialogTitle = ({ className, ...props }) => {
704
+ const { slots } = useDialog();
705
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Title, {
706
+ className: (0, tailwind_variants.cn)(slots.title(), className),
707
+ ...props
708
+ });
709
+ };
710
+ const DialogDescription = ({ className, ...props }) => {
711
+ const { slots } = useDialog();
712
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Description, {
713
+ className: (0, tailwind_variants.cn)(slots.description(), className),
714
+ ...props
715
+ });
716
+ };
717
+ const DialogClose = ({ className, ...props }) => {
718
+ const { slots } = useDialog();
719
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Close, {
720
+ className: (0, tailwind_variants.cn)(slots.close(), className),
721
+ ...props,
722
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideX, {})
723
+ });
724
+ };
725
+ var dialog_default = Object.assign(Dialog, {
726
+ Backdrop: DialogBackdrop,
727
+ Close: DialogClose,
728
+ Description: DialogDescription,
729
+ Popup: DialogPopup,
730
+ Portal: DialogPortal,
731
+ Root: Dialog,
732
+ Title: DialogTitle,
733
+ Trigger: DialogTrigger,
734
+ Viewport: DialogViewport
735
+ });
736
+
737
+ //#endregion
738
+ //#region src/components/drawer/drawer.context.ts
739
+ const DrawerContext = (0, react.createContext)(null);
740
+
741
+ //#endregion
742
+ //#region src/components/drawer/drawer.variants.ts
743
+ const drawerVariants = (0, tailwind_variants.tv)({
744
+ defaultVariants: { position: "left" },
745
+ slots: {
746
+ backdrop: "drawer__backdrop",
747
+ close: "drawer__close",
748
+ description: "drawer__description",
749
+ popup: "drawer__popup",
750
+ portal: "drawer__portal",
751
+ root: "drawer",
752
+ title: "drawer__title",
753
+ trigger: "drawer__trigger",
754
+ viewport: "drawer__viewport"
755
+ },
756
+ variants: { position: {
757
+ bottom: { popup: "drawer--bottom" },
758
+ left: { popup: "drawer--left" },
759
+ right: { popup: "drawer--right" },
760
+ top: { popup: "drawer--top" }
761
+ } }
762
+ });
763
+
764
+ //#endregion
765
+ //#region src/components/drawer/use-drawer.ts
766
+ const useDrawer = () => {
767
+ const context = (0, react.useContext)(DrawerContext);
768
+ if (!context) throw new Error("useDrawer must be used within a DrawerProvider");
769
+ return context;
770
+ };
771
+
772
+ //#endregion
773
+ //#region src/components/drawer/drawer.tsx
774
+ const Drawer = ({ position, ...props }) => {
775
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DrawerContext, {
776
+ value: { slots: (0, react.useMemo)(() => drawerVariants({ position }), [position]) },
777
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Root, { ...props })
778
+ });
779
+ };
780
+ const DrawerTrigger = ({ className, ...props }) => {
781
+ const { slots } = useDrawer();
782
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Trigger, {
783
+ className: (0, tailwind_variants.cn)(slots.trigger(), className),
784
+ ...props
785
+ });
786
+ };
787
+ const DrawerPortal = ({ className, ...props }) => {
788
+ const { slots } = useDrawer();
789
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Portal, {
790
+ className: (0, tailwind_variants.cn)(slots.portal(), className),
791
+ ...props
792
+ });
793
+ };
794
+ const DrawerBackdrop = ({ className, ...props }) => {
795
+ const { slots } = useDrawer();
796
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Backdrop, {
797
+ className: (0, tailwind_variants.cn)(slots.backdrop(), className),
798
+ ...props
799
+ });
800
+ };
801
+ const DrawerViewport = ({ className, ...props }) => {
802
+ const { slots } = useDrawer();
803
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Viewport, {
804
+ className: (0, tailwind_variants.cn)(slots.viewport(), className),
805
+ ...props
806
+ });
807
+ };
808
+ const DrawerPopup = ({ className, ...props }) => {
809
+ const { slots } = useDrawer();
810
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Popup, {
811
+ className: (0, tailwind_variants.cn)(slots.popup(), className),
812
+ ...props
813
+ });
814
+ };
815
+ const DrawerTitle = ({ className, ...props }) => {
816
+ const { slots } = useDrawer();
817
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Title, {
818
+ className: (0, tailwind_variants.cn)(slots.title(), className),
819
+ ...props
820
+ });
821
+ };
822
+ const DrawerDescription = ({ className, ...props }) => {
823
+ const { slots } = useDrawer();
824
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Description, {
825
+ className: (0, tailwind_variants.cn)(slots.description(), className),
826
+ ...props
827
+ });
828
+ };
829
+ const DrawerClose = ({ className, children, ...props }) => {
830
+ const { slots } = useDrawer();
831
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Close, {
832
+ className: (0, tailwind_variants.cn)(slots.close(), className),
833
+ ...props,
834
+ children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideX, {})
835
+ });
836
+ };
837
+ var drawer_default = Object.assign(Drawer, {
838
+ Backdrop: DrawerBackdrop,
839
+ Close: DrawerClose,
840
+ Description: DrawerDescription,
841
+ Popup: DrawerPopup,
842
+ Portal: DrawerPortal,
843
+ Root: Drawer,
844
+ Title: DrawerTitle,
845
+ Trigger: DrawerTrigger,
846
+ Viewport: DrawerViewport
847
+ });
848
+
849
+ //#endregion
850
+ //#region src/components/field/field.context.ts
851
+ const FieldContext = (0, react.createContext)(null);
852
+
853
+ //#endregion
854
+ //#region src/components/field/field.variants.ts
855
+ const fieldVariants = (0, tailwind_variants.tv)({ slots: {
856
+ control: "input field__control",
857
+ description: "field__description",
858
+ error: "field__error",
859
+ label: "label field__label",
860
+ root: "field"
861
+ } });
862
+
863
+ //#endregion
864
+ //#region src/components/field/use-field.ts
865
+ const useField = () => {
866
+ const context = (0, react.useContext)(FieldContext);
867
+ if (!context) throw new Error("useField must be used within a FieldProvider");
868
+ return context;
869
+ };
870
+
871
+ //#endregion
872
+ //#region src/components/field/field.tsx
873
+ const FieldRoot = ({ className, required, ...props }) => {
874
+ const slots = (0, react.useMemo)(() => fieldVariants({}), []);
875
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FieldContext, {
876
+ value: {
877
+ required,
878
+ slots
879
+ },
880
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Field.Root, {
881
+ className: (0, tailwind_variants.cn)(className, slots.root()),
882
+ "data-required": required,
883
+ ...props
884
+ })
885
+ });
886
+ };
887
+ const FieldLabel = ({ className, ...props }) => {
888
+ const { slots } = useField();
889
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Field.Label, {
890
+ className: (0, tailwind_variants.cn)(className, slots.label()),
891
+ ...props
892
+ });
893
+ };
894
+ const FieldControl = ({ className, ...props }) => {
895
+ const { slots, required } = useField();
896
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Field.Control, {
897
+ className: (0, tailwind_variants.cn)(className, slots.control()),
898
+ required,
899
+ ...props
900
+ });
901
+ };
902
+ const FieldDescription = ({ className, ...props }) => {
903
+ const { slots } = useField();
904
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Field.Description, {
905
+ className: (0, tailwind_variants.cn)(className, slots.description()),
906
+ ...props
907
+ });
908
+ };
909
+ const FieldError = ({ className, ...props }) => {
910
+ const { slots } = useField();
911
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Field.Error, {
912
+ className: (0, tailwind_variants.cn)(className, slots.error()),
913
+ ...props
914
+ });
915
+ };
916
+ var field_default = Object.assign(FieldRoot, {
917
+ Control: FieldControl,
918
+ Description: FieldDescription,
919
+ Error: FieldError,
920
+ Label: FieldLabel,
921
+ Root: FieldRoot
922
+ });
923
+
924
+ //#endregion
925
+ //#region src/components/fieldset/fieldset.context.ts
926
+ const FieldsetContext = (0, react.createContext)(null);
927
+
928
+ //#endregion
929
+ //#region src/components/fieldset/fieldset.variants.ts
930
+ const fieldsetVariants = (0, tailwind_variants.tv)({ slots: {
931
+ legend: "fieldset__legend",
932
+ root: "fieldset"
933
+ } });
934
+
935
+ //#endregion
936
+ //#region src/components/fieldset/use-fieldset.ts
937
+ const useFieldset = () => {
938
+ const context = (0, react.useContext)(FieldsetContext);
939
+ if (!context) throw new Error("useFieldset must be used within a FieldsetProvider");
940
+ return context;
941
+ };
942
+
943
+ //#endregion
944
+ //#region src/components/fieldset/fieldset.tsx
945
+ const Fieldset = ({ className, ...props }) => {
946
+ const slots = (0, react.useMemo)(() => fieldsetVariants(), []);
947
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FieldsetContext, {
948
+ value: { slots },
949
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Fieldset.Root, {
950
+ className: (0, tailwind_variants.cn)(className, slots.root()),
951
+ ...props
952
+ })
953
+ });
954
+ };
955
+ const FieldsetLegend = ({ className, ...props }) => {
956
+ const { slots } = useFieldset();
957
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Fieldset.Legend, {
958
+ className: (0, tailwind_variants.cn)(slots.legend(), className),
959
+ ...props
960
+ });
961
+ };
962
+ var fieldset_default = Object.assign(Fieldset, {
963
+ Legend: FieldsetLegend,
964
+ Root: Fieldset
965
+ });
966
+
967
+ //#endregion
968
+ //#region src/components/form/form.variants.ts
969
+ const formVariants = (0, tailwind_variants.tv)({ base: "form" });
970
+
971
+ //#endregion
972
+ //#region src/components/form/form.tsx
973
+ const Form = ({ className, ...props }) => {
974
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Form, {
975
+ className: (0, tailwind_variants.cn)(className, formVariants()),
976
+ ...props
977
+ });
978
+ };
979
+ var form_default = Form;
980
+
981
+ //#endregion
982
+ //#region src/components/icon-button/icon-button.variants.ts
983
+ const iconButtonVariants = (0, tailwind_variants.tv)({
984
+ base: "icon-button",
985
+ defaultVariants: { isIconOnly: true },
986
+ extend: buttonVariants
987
+ });
988
+
989
+ //#endregion
990
+ //#region src/components/icon-button/icon-button.tsx
991
+ const IconButton = ({ className, variant, size, isIconOnly, ...props }) => {
992
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(button_default, {
993
+ className: (0, tailwind_variants.cn)(className, iconButtonVariants({
994
+ isIconOnly,
995
+ size,
996
+ variant
997
+ })),
998
+ ...props
999
+ });
1000
+ };
1001
+ var icon_button_default = IconButton;
1002
+
1003
+ //#endregion
1004
+ //#region src/components/input/input.variants.ts
1005
+ const inputVariants = (0, tailwind_variants.tv)({ base: "input" });
1006
+
1007
+ //#endregion
1008
+ //#region src/components/input/input.tsx
1009
+ const Input = ({ className, ...props }) => {
1010
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Input, {
1011
+ className: (0, tailwind_variants.cn)(className, inputVariants()),
1012
+ ...props
1013
+ });
1014
+ };
1015
+ var input_default = Input;
1016
+
1017
+ //#endregion
1018
+ //#region src/components/label/label.variants.ts
1019
+ const labelVariants = (0, tailwind_variants.tv)({ base: "label" });
1020
+
1021
+ //#endregion
1022
+ //#region src/components/label/label.tsx
1023
+ const Label = ({ className, ...props }) => {
1024
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
1025
+ className: (0, tailwind_variants.cn)(className, labelVariants()),
1026
+ ...props
1027
+ });
1028
+ };
1029
+ var label_default = Label;
1030
+
1031
+ //#endregion
1032
+ //#region src/components/link/link.variants.ts
1033
+ const linkVariants = (0, tailwind_variants.tv)({
1034
+ base: "link",
1035
+ defaultVariants: { variant: "no-underline" },
1036
+ variants: { variant: {
1037
+ "no-underline": "link--no-underline",
1038
+ underline: "link--underline"
1039
+ } }
1040
+ });
1041
+
1042
+ //#endregion
1043
+ //#region src/components/link/link.tsx
1044
+ const Link = ({ className, variant, ...props }) => {
1045
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
1046
+ className: (0, tailwind_variants.cn)(className, linkVariants({ variant })),
1047
+ ...props
1048
+ });
1049
+ };
1050
+ var link_default = Link;
1051
+
1052
+ //#endregion
1053
+ //#region src/components/list/list.context.ts
1054
+ const ListContext = (0, react.createContext)(null);
1055
+
1056
+ //#endregion
1057
+ //#region src/components/list/list.variants.ts
1058
+ const listVariants = (0, tailwind_variants.tv)({ slots: {
1059
+ item: "list__item",
1060
+ root: "list"
1061
+ } });
1062
+
1063
+ //#endregion
1064
+ //#region src/components/list/use-list.ts
1065
+ const useList = () => {
1066
+ const context = (0, react.useContext)(ListContext);
1067
+ if (!context) throw new Error("useList must be used within a ListProvider");
1068
+ return context;
1069
+ };
1070
+
1071
+ //#endregion
1072
+ //#region src/components/list/list.tsx
1073
+ const List = ({ className, ...props }) => {
1074
+ const slots = (0, react.useMemo)(() => listVariants(), []);
1075
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ListContext.Provider, {
1076
+ value: { slots },
1077
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
1078
+ className: (0, tailwind_variants.cn)(className, slots.root()),
1079
+ ...props
1080
+ })
1081
+ });
1082
+ };
1083
+ const ListItem = ({ className, ...props }) => {
1084
+ const { slots } = useList();
1085
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
1086
+ className: (0, tailwind_variants.cn)(className, slots.item()),
1087
+ ...props
1088
+ });
1089
+ };
1090
+ var list_default = Object.assign(List, {
1091
+ Item: ListItem,
1092
+ Root: List
1093
+ });
1094
+
1095
+ //#endregion
1096
+ //#region src/components/menu/menu.context.ts
1097
+ const MenuContext = (0, react.createContext)(null);
1098
+
1099
+ //#endregion
1100
+ //#region src/components/menu/menu.variants.ts
1101
+ const menuVariants = (0, tailwind_variants.tv)({ slots: {
1102
+ arrow: "menu__arrow",
1103
+ backdrop: "menu__backdrop",
1104
+ checkboxItem: "menu__checkbox-item",
1105
+ group: "menu__group",
1106
+ groupLabel: "menu__group-label",
1107
+ item: "menu__item",
1108
+ popup: "menu__popup",
1109
+ portal: "menu__portal",
1110
+ positioner: "menu__positioner",
1111
+ radioGroup: "menu__radio-group",
1112
+ radioItem: "menu__radio-item",
1113
+ root: "menu",
1114
+ separator: "menu__separator",
1115
+ submenu: "menu__submenu",
1116
+ submenuTrigger: "menu__submenu__trigger",
1117
+ trigger: "menu__trigger"
1118
+ } });
1119
+
1120
+ //#endregion
1121
+ //#region src/components/menu/use-menu.ts
1122
+ const useMenu = () => {
1123
+ const context = (0, react.useContext)(MenuContext);
1124
+ if (!context) throw new Error("useMenu must be used within a MenuProvider");
1125
+ return context;
1126
+ };
1127
+
1128
+ //#endregion
1129
+ //#region src/components/menu/menu.tsx
1130
+ const Menu = ({ ...props }) => {
1131
+ const slots = (0, react.useMemo)(() => menuVariants(), []);
1132
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuContext.Provider, {
1133
+ value: { slots },
1134
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Root, { ...props })
1135
+ });
1136
+ };
1137
+ const MenuTrigger = ({ className, ...props }) => {
1138
+ const { slots } = useMenu();
1139
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Trigger, {
1140
+ className: (0, tailwind_variants.cn)(slots.trigger(), className),
1141
+ ...props
1142
+ });
1143
+ };
1144
+ const MenuPortal = ({ className, ...props }) => {
1145
+ const { slots } = useMenu();
1146
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Portal, {
1147
+ className: (0, tailwind_variants.cn)(slots.portal(), className),
1148
+ ...props
1149
+ });
1150
+ };
1151
+ const MenuBackdrop = ({ className, ...props }) => {
1152
+ const { slots } = useMenu();
1153
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Backdrop, {
1154
+ className: (0, tailwind_variants.cn)(slots.backdrop(), className),
1155
+ ...props
1156
+ });
1157
+ };
1158
+ const MenuPositioner = ({ className, ...props }) => {
1159
+ const { slots } = useMenu();
1160
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Positioner, {
1161
+ className: (0, tailwind_variants.cn)(slots.positioner(), className),
1162
+ ...props
1163
+ });
1164
+ };
1165
+ const MenuPopup = ({ className, ...props }) => {
1166
+ const { slots } = useMenu();
1167
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Popup, {
1168
+ className: (0, tailwind_variants.cn)(slots.popup(), className),
1169
+ ...props
1170
+ });
1171
+ };
1172
+ const MenuArrow = ({ className, children, ...props }) => {
1173
+ const { slots } = useMenu();
1174
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Arrow, {
1175
+ className: (0, tailwind_variants.cn)(slots.arrow(), className),
1176
+ ...props,
1177
+ children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideChevronUp, {})
1178
+ });
1179
+ };
1180
+ const MenuItem = ({ className, ...props }) => {
1181
+ const { slots } = useMenu();
1182
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Item, {
1183
+ className: (0, tailwind_variants.cn)(slots.item(), className),
1184
+ ...props
1185
+ });
1186
+ };
1187
+ const MenuSeparator = ({ className, ...props }) => {
1188
+ const { slots } = useMenu();
1189
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Separator, {
1190
+ className: (0, tailwind_variants.cn)(slots.separator(), className),
1191
+ ...props
1192
+ });
1193
+ };
1194
+ const MenuGroup = ({ className, ...props }) => {
1195
+ const { slots } = useMenu();
1196
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Group, {
1197
+ className: (0, tailwind_variants.cn)(slots.group(), className),
1198
+ ...props
1199
+ });
1200
+ };
1201
+ const MenuGroupLabel = ({ className, ...props }) => {
1202
+ const { slots } = useMenu();
1203
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.GroupLabel, {
1204
+ className: (0, tailwind_variants.cn)(slots.groupLabel(), className),
1205
+ ...props
1206
+ });
1207
+ };
1208
+ const MenuRadioGroup = ({ className, ...props }) => {
1209
+ const { slots } = useMenu();
1210
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.RadioGroup, {
1211
+ className: (0, tailwind_variants.cn)(slots.radioGroup(), className),
1212
+ ...props
1213
+ });
1214
+ };
1215
+ const MenuRadioItem = ({ className, ...props }) => {
1216
+ const { slots } = useMenu();
1217
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.RadioItem, {
1218
+ className: (0, tailwind_variants.cn)(slots.radioItem(), className),
1219
+ ...props
1220
+ });
1221
+ };
1222
+ const MenuCheckboxItem = ({ className, ...props }) => {
1223
+ const { slots } = useMenu();
1224
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.CheckboxItem, {
1225
+ className: (0, tailwind_variants.cn)(slots.checkboxItem(), className),
1226
+ ...props
1227
+ });
1228
+ };
1229
+ const MenuSubmenu = ({ ...props }) => {
1230
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.SubmenuRoot, { ...props });
1231
+ };
1232
+ const MenuSubmenuTrigger = ({ className, ...props }) => {
1233
+ const { slots } = useMenu();
1234
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.SubmenuTrigger, {
1235
+ className: (0, tailwind_variants.cn)(slots.submenuTrigger(), className),
1236
+ ...props
1237
+ });
1238
+ };
1239
+ var menu_default = Object.assign(Menu, {
1240
+ Arrow: MenuArrow,
1241
+ Backdrop: MenuBackdrop,
1242
+ CheckboxItem: MenuCheckboxItem,
1243
+ Group: MenuGroup,
1244
+ GroupLabel: MenuGroupLabel,
1245
+ Item: MenuItem,
1246
+ Popup: MenuPopup,
1247
+ Portal: MenuPortal,
1248
+ Positioner: MenuPositioner,
1249
+ RadioGroup: MenuRadioGroup,
1250
+ RadioItem: MenuRadioItem,
1251
+ Root: Menu,
1252
+ Separator: MenuSeparator,
1253
+ Submenu: MenuSubmenu,
1254
+ SubmenuTrigger: MenuSubmenuTrigger,
1255
+ Trigger: MenuTrigger
1256
+ });
1257
+
1258
+ //#endregion
1259
+ //#region src/components/meter/meter.context.ts
1260
+ const MeterContext = (0, react.createContext)(void 0);
1261
+
1262
+ //#endregion
1263
+ //#region src/components/meter/meter.variants.ts
1264
+ const meterVariants = (0, tailwind_variants.tv)({
1265
+ slots: {
1266
+ indicator: "meter__indicator",
1267
+ label: "meter__label",
1268
+ root: "meter",
1269
+ track: "meter__track",
1270
+ value: "meter__value"
1271
+ },
1272
+ variants: {
1273
+ size: {
1274
+ lg: { root: "meter--lg" },
1275
+ md: { root: "meter--md" },
1276
+ sm: { root: "meter--sm" }
1277
+ },
1278
+ variant: {
1279
+ danger: { root: "meter--danger" },
1280
+ primary: { root: "meter--primary" },
1281
+ secondary: { root: "meter--secondary" },
1282
+ success: { root: "meter--success" }
1283
+ }
1284
+ }
1285
+ });
1286
+
1287
+ //#endregion
1288
+ //#region src/components/meter/use-meter.ts
1289
+ const useMeter = () => {
1290
+ const context = (0, react.useContext)(MeterContext);
1291
+ if (!context) throw new Error("useMeter must be used within a MeterProvider");
1292
+ return context;
1293
+ };
1294
+
1295
+ //#endregion
1296
+ //#region src/components/meter/meter.tsx
1297
+ const Meter = ({ className, size, variant, ...props }) => {
1298
+ const slots = (0, react.useMemo)(() => meterVariants({
1299
+ size,
1300
+ variant
1301
+ }), [size, variant]);
1302
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MeterContext, {
1303
+ value: { slots },
1304
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Meter.Root, {
1305
+ className: (0, tailwind_variants.cn)(className, slots.root()),
1306
+ ...props
1307
+ })
1308
+ });
1309
+ };
1310
+ const MeterLabel = ({ className, ...props }) => {
1311
+ const { slots } = useMeter();
1312
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Meter.Label, {
1313
+ className: (0, tailwind_variants.cn)(className, slots.label()),
1314
+ ...props
1315
+ });
1316
+ };
1317
+ const MeterValue = ({ className, ...props }) => {
1318
+ const { slots } = useMeter();
1319
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Meter.Value, {
1320
+ className: (0, tailwind_variants.cn)(className, slots.value()),
1321
+ ...props
1322
+ });
1323
+ };
1324
+ const MeterTrack = ({ className, ...props }) => {
1325
+ const { slots } = useMeter();
1326
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Meter.Track, {
1327
+ className: (0, tailwind_variants.cn)(className, slots.track()),
1328
+ ...props
1329
+ });
1330
+ };
1331
+ const MeterIndicator = ({ className, ...props }) => {
1332
+ const { slots } = useMeter();
1333
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Meter.Indicator, {
1334
+ className: (0, tailwind_variants.cn)(className, slots.indicator()),
1335
+ ...props
1336
+ });
1337
+ };
1338
+ var meter_default = Object.assign(Meter, {
1339
+ Indicator: MeterIndicator,
1340
+ Label: MeterLabel,
1341
+ Root: Meter,
1342
+ Track: MeterTrack,
1343
+ Value: MeterValue
1344
+ });
1345
+
1346
+ //#endregion
1347
+ //#region src/components/separator/separator.variants.ts
1348
+ const separatorVariants = (0, tailwind_variants.tv)({
1349
+ base: "separator",
1350
+ defaultVariants: { orientation: "horizontal" },
1351
+ variants: { orientation: {
1352
+ horizontal: "separator--horizontal",
1353
+ vertical: "separator--vertical"
1354
+ } }
1355
+ });
1356
+
1357
+ //#endregion
1358
+ //#region src/components/separator/separator.tsx
1359
+ const Separator = ({ className, orientation, ...props }) => {
1360
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Separator, {
1361
+ className: (0, tailwind_variants.cn)(className, separatorVariants({ orientation })),
1362
+ ...props
1363
+ });
1364
+ };
1365
+ var separator_default = Separator;
1366
+
1367
+ //#endregion
1368
+ //#region src/components/navbar/navbar.context.ts
1369
+ const NavbarContext = (0, react.createContext)(null);
1370
+
1371
+ //#endregion
1372
+ //#region src/components/navbar/navbar.variants.ts
1373
+ const navbarVariants = (0, tailwind_variants.tv)({ slots: {
1374
+ container: "navbar__container",
1375
+ content: "navbar__content",
1376
+ list: "navbar__list",
1377
+ listItem: "navbar__list-item",
1378
+ menu: "navbar__menu",
1379
+ menuItem: "navbar__menu-item",
1380
+ root: "navbar",
1381
+ toggle: "navbar__toggle"
1382
+ } });
1383
+
1384
+ //#endregion
1385
+ //#region src/components/navbar/use-navbar.ts
1386
+ const useNavbar = () => {
1387
+ const context = react.default.useContext(NavbarContext);
1388
+ if (!context) throw new Error("useNavbar must be used within a NavbarProvider");
1389
+ return context;
1390
+ };
1391
+
1392
+ //#endregion
1393
+ //#region src/components/navbar/navbar.tsx
1394
+ const Navbar = ({ className, isOpen, onOpenChange, ...props }) => {
1395
+ const slots = (0, react.useMemo)(() => navbarVariants(), []);
1396
+ const [internalOpen, setInternalOpen] = (0, react.useState)(false);
1397
+ const open = isOpen ?? internalOpen;
1398
+ const handleOpenChange = (0, react.useCallback)((next) => {
1399
+ if (isOpen === void 0) setInternalOpen(next);
1400
+ onOpenChange?.(next);
1401
+ }, [isOpen, onOpenChange]);
1402
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NavbarContext.Provider, {
1403
+ value: {
1404
+ isOpen: open,
1405
+ onOpenChange: handleOpenChange,
1406
+ slots
1407
+ },
1408
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
1409
+ className: (0, tailwind_variants.cn)(slots.root(), className),
1410
+ ...props
1411
+ })
1412
+ });
1413
+ };
1414
+ const NavbarContainer = ({ className, ...props }) => {
1415
+ const { slots } = useNavbar();
1416
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
1417
+ className: (0, tailwind_variants.cn)(slots.container(), className),
1418
+ ...props
1419
+ });
1420
+ };
1421
+ const NavbarContent = ({ className, ...props }) => {
1422
+ const { slots } = useNavbar();
1423
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1424
+ className: (0, tailwind_variants.cn)(slots.content(), className),
1425
+ ...props
1426
+ });
1427
+ };
1428
+ const NavbarList = ({ className, ...props }) => {
1429
+ const { slots } = useNavbar();
1430
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
1431
+ className: (0, tailwind_variants.cn)(slots.list(), className),
1432
+ ...props
1433
+ });
1434
+ };
1435
+ const NavbarListItem = ({ className, ...props }) => {
1436
+ const { slots } = useNavbar();
1437
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_slot.Slot, {
1438
+ className: (0, tailwind_variants.cn)(slots.listItem(), className),
1439
+ ...props
1440
+ });
1441
+ };
1442
+ const NavbarToggle = ({ className, ...props }) => {
1443
+ const { slots, isOpen, onOpenChange } = useNavbar();
1444
+ const Icon = isOpen ? lucide_react.LucideX : lucide_react.LucideMenu;
1445
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1446
+ className: (0, tailwind_variants.cn)(className, slots.toggle()),
1447
+ onClick: () => onOpenChange(!isOpen),
1448
+ ...props,
1449
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { className: "size-5" })
1450
+ });
1451
+ };
1452
+ const NavbarMenu = ({ className, header, ...props }) => {
1453
+ const { slots, isOpen, onOpenChange } = useNavbar();
1454
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(drawer_default, {
1455
+ onOpenChange,
1456
+ open: isOpen,
1457
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(drawer_default.Portal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(drawer_default.Backdrop, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(drawer_default.Viewport, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(drawer_default.Popup, { children: [
1458
+ header,
1459
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(drawer_default.Close, {}),
1460
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(separator_default, {}),
1461
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
1462
+ className: (0, tailwind_variants.cn)(slots.menu(), className),
1463
+ ...props
1464
+ })
1465
+ ] }) })] })
1466
+ });
1467
+ };
1468
+ const NavbarMenuItem = ({ className, ...props }) => {
1469
+ const { slots } = useNavbar();
1470
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_slot.Slot, {
1471
+ className: (0, tailwind_variants.cn)(slots.menuItem(), className),
1472
+ ...props
1473
+ });
1474
+ };
1475
+ var navbar_default = Object.assign(Navbar, {
1476
+ Container: NavbarContainer,
1477
+ Content: NavbarContent,
1478
+ List: NavbarList,
1479
+ ListItem: NavbarListItem,
1480
+ Menu: NavbarMenu,
1481
+ MenuItem: NavbarMenuItem,
1482
+ Root: Navbar,
1483
+ Toggle: NavbarToggle
1484
+ });
1485
+
1486
+ //#endregion
1487
+ //#region src/components/popover/popover.context.ts
1488
+ const PopoverContext = (0, react.createContext)(null);
1489
+
1490
+ //#endregion
1491
+ //#region src/components/popover/popover.variants.ts
1492
+ const popoverVariants = (0, tailwind_variants.tv)({ slots: {
1493
+ arrow: "popover__arrow",
1494
+ backdrop: "popover__backdrop",
1495
+ close: "popover__close",
1496
+ content: "popover__content",
1497
+ description: "popover__description",
1498
+ popup: "popover__popup",
1499
+ portal: "popover__portal",
1500
+ positioner: "popover__positioner",
1501
+ root: "popover",
1502
+ title: "popover__title",
1503
+ trigger: "popover__trigger",
1504
+ viewport: "popover__viewport"
1505
+ } });
1506
+
1507
+ //#endregion
1508
+ //#region src/components/popover/use-popover.ts
1509
+ const usePopover = () => {
1510
+ const context = (0, react.useContext)(PopoverContext);
1511
+ if (!context) throw new Error("usePopover must be used within a PopoverProvider");
1512
+ return context;
1513
+ };
1514
+
1515
+ //#endregion
1516
+ //#region src/components/popover/popover.tsx
1517
+ const Popover = ({ ...props }) => {
1518
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverContext, {
1519
+ value: { slots: (0, react.useMemo)(() => popoverVariants({}), []) },
1520
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Root, { ...props })
1521
+ });
1522
+ };
1523
+ const PopoverTrigger = ({ className, ...props }) => {
1524
+ const { slots } = usePopover();
1525
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Trigger, {
1526
+ className: (0, tailwind_variants.cn)(className, slots.trigger()),
1527
+ ...props
1528
+ });
1529
+ };
1530
+ const PopoverPortal = ({ className, ...props }) => {
1531
+ const { slots } = usePopover();
1532
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Portal, {
1533
+ className: (0, tailwind_variants.cn)(className, slots.portal()),
1534
+ ...props
1535
+ });
1536
+ };
1537
+ const PopoverBackdrop = ({ className, ...props }) => {
1538
+ const { slots } = usePopover();
1539
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Backdrop, {
1540
+ className: (0, tailwind_variants.cn)(className, slots.backdrop()),
1541
+ ...props
1542
+ });
1543
+ };
1544
+ const PopoverPositioner = ({ className, ...props }) => {
1545
+ const { slots } = usePopover();
1546
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Positioner, {
1547
+ className: (0, tailwind_variants.cn)(className, slots.positioner()),
1548
+ ...props
1549
+ });
1550
+ };
1551
+ const PopoverPopup = ({ className, ...props }) => {
1552
+ const { slots } = usePopover();
1553
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Popup, {
1554
+ className: (0, tailwind_variants.cn)(className, slots.popup()),
1555
+ ...props
1556
+ });
1557
+ };
1558
+ const PopoverArrow = ({ className, ...props }) => {
1559
+ const { slots } = usePopover();
1560
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Arrow, {
1561
+ className: (0, tailwind_variants.cn)(className, slots.arrow()),
1562
+ ...props
1563
+ });
1564
+ };
1565
+ const PopoverViewport = ({ className, ...props }) => {
1566
+ const { slots } = usePopover();
1567
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Viewport, {
1568
+ className: (0, tailwind_variants.cn)(className, slots.viewport()),
1569
+ ...props
1570
+ });
1571
+ };
1572
+ const PopoverTitle = ({ className, ...props }) => {
1573
+ const { slots } = usePopover();
1574
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Title, {
1575
+ className: (0, tailwind_variants.cn)(className, slots.title()),
1576
+ ...props
1577
+ });
1578
+ };
1579
+ const PopoverDescription = ({ className, ...props }) => {
1580
+ const { slots } = usePopover();
1581
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Description, {
1582
+ className: (0, tailwind_variants.cn)(className, slots.description()),
1583
+ ...props
1584
+ });
1585
+ };
1586
+ const PopoverClose = ({ className, children, ...props }) => {
1587
+ const { slots } = usePopover();
1588
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Popover.Close, {
1589
+ className: (0, tailwind_variants.cn)(className, slots.close()),
1590
+ ...props,
1591
+ children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideX, {})
1592
+ });
1593
+ };
1594
+ var popover_default = Object.assign(Popover, {
1595
+ Arrow: PopoverArrow,
1596
+ Backdrop: PopoverBackdrop,
1597
+ Close: PopoverClose,
1598
+ Description: PopoverDescription,
1599
+ Popup: PopoverPopup,
1600
+ Portal: PopoverPortal,
1601
+ Positioner: PopoverPositioner,
1602
+ Root: Popover,
1603
+ Title: PopoverTitle,
1604
+ Trigger: PopoverTrigger,
1605
+ Viewport: PopoverViewport
1606
+ });
1607
+
1608
+ //#endregion
1609
+ //#region src/components/progress/progress.context.ts
1610
+ const ProgressContext = (0, react.createContext)(null);
1611
+
1612
+ //#endregion
1613
+ //#region src/components/progress/progress.variants.ts
1614
+ const progressVariants = (0, tailwind_variants.tv)({
1615
+ defaultVariants: {
1616
+ size: "md",
1617
+ variant: "primary"
1618
+ },
1619
+ slots: {
1620
+ indicator: "progress__indicator",
1621
+ label: "progress__label",
1622
+ root: "progress",
1623
+ track: "progress__track",
1624
+ value: "progress__value"
1625
+ },
1626
+ variants: {
1627
+ size: {
1628
+ lg: { root: "progress--lg" },
1629
+ md: { root: "progress--md" },
1630
+ sm: { root: "progress--sm" }
1631
+ },
1632
+ variant: {
1633
+ danger: { root: "progress--danger" },
1634
+ primary: { root: "progress--primary" },
1635
+ secondary: { root: "progress--secondary" },
1636
+ success: { root: "progress--success" }
1637
+ }
1638
+ }
1639
+ });
1640
+
1641
+ //#endregion
1642
+ //#region src/components/progress/use-progress.ts
1643
+ const useProgress = () => {
1644
+ const context = (0, react.useContext)(ProgressContext);
1645
+ if (!context) throw new Error("useProgress must be used within a ProgressProvider");
1646
+ return context;
1647
+ };
1648
+
1649
+ //#endregion
1650
+ //#region src/components/progress/progress.tsx
1651
+ const Progress = ({ className, variant, size, ...props }) => {
1652
+ const slots = (0, react.useMemo)(() => progressVariants({
1653
+ size,
1654
+ variant
1655
+ }), [variant, size]);
1656
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressContext, {
1657
+ value: { slots },
1658
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Progress.Root, {
1659
+ className: (0, tailwind_variants.cn)(className, slots.root()),
1660
+ ...props
1661
+ })
1662
+ });
1663
+ };
1664
+ const ProgressLabel = ({ className, ...props }) => {
1665
+ const { slots } = useProgress();
1666
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Progress.Label, {
1667
+ className: (0, tailwind_variants.cn)(className, slots.label()),
1668
+ ...props
1669
+ });
1670
+ };
1671
+ const ProgressValue = ({ className, ...props }) => {
1672
+ const { slots } = useProgress();
1673
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Progress.Value, {
1674
+ className: (0, tailwind_variants.cn)(className, slots.value()),
1675
+ ...props
1676
+ });
1677
+ };
1678
+ const ProgressTrack = ({ className, ...props }) => {
1679
+ const { slots } = useProgress();
1680
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Progress.Track, {
1681
+ className: (0, tailwind_variants.cn)(className, slots.track()),
1682
+ ...props
1683
+ });
1684
+ };
1685
+ const ProgressIndicator = ({ className, ...props }) => {
1686
+ const { slots } = useProgress();
1687
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Progress.Indicator, {
1688
+ className: (0, tailwind_variants.cn)(className, slots.indicator()),
1689
+ ...props
1690
+ });
1691
+ };
1692
+ var progress_default = Object.assign(Progress, {
1693
+ Indicator: ProgressIndicator,
1694
+ Label: ProgressLabel,
1695
+ Root: Progress,
1696
+ Track: ProgressTrack,
1697
+ Value: ProgressValue
1698
+ });
1699
+
1700
+ //#endregion
1701
+ //#region src/components/radio/radio.context.ts
1702
+ const RadioContext = (0, react.createContext)(null);
1703
+
1704
+ //#endregion
1705
+ //#region src/components/radio/radio.variants.ts
1706
+ const radioVariants = (0, tailwind_variants.tv)({ slots: {
1707
+ indicator: "radio__indicator",
1708
+ root: "radio"
1709
+ } });
1710
+
1711
+ //#endregion
1712
+ //#region src/components/radio/use-radio.ts
1713
+ const useRadio = () => {
1714
+ const context = (0, react.useContext)(RadioContext);
1715
+ if (!context) throw new Error("useRadio must be used within a RadioProvider");
1716
+ return context;
1717
+ };
1718
+
1719
+ //#endregion
1720
+ //#region src/components/radio/radio.tsx
1721
+ const Radio = ({ className, ...props }) => {
1722
+ const slots = (0, react.useMemo)(() => radioVariants({}), []);
1723
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RadioContext, {
1724
+ value: { slots },
1725
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Radio.Root, {
1726
+ className: (0, tailwind_variants.cn)(slots.root(), className),
1727
+ ...props
1728
+ })
1729
+ });
1730
+ };
1731
+ const RadioIndicator = ({ className, ...props }) => {
1732
+ const { slots } = useRadio();
1733
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Radio.Indicator, {
1734
+ className: (0, tailwind_variants.cn)(slots.indicator(), className),
1735
+ ...props
1736
+ });
1737
+ };
1738
+ var radio_default = Object.assign(Radio, {
1739
+ Indicator: RadioIndicator,
1740
+ Root: Radio
1741
+ });
1742
+
1743
+ //#endregion
1744
+ //#region src/components/radio-group/radio-group.variants.ts
1745
+ const radioGroupVariants = (0, tailwind_variants.tv)({ base: "radio-group" });
1746
+
1747
+ //#endregion
1748
+ //#region src/components/radio-group/radio-group.tsx
1749
+ const RadioGroup = ({ className, ...props }) => {
1750
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.RadioGroup, {
1751
+ className: (0, tailwind_variants.cn)(className, (0, react.useMemo)(() => radioGroupVariants(), [])),
1752
+ ...props
1753
+ });
1754
+ };
1755
+ var radio_group_default = RadioGroup;
1756
+
1757
+ //#endregion
1758
+ //#region src/components/select/select.context.ts
1759
+ const SelectContext = (0, react.createContext)(null);
1760
+
1761
+ //#endregion
1762
+ //#region src/components/select/select.variants.ts
1763
+ const selectVariants = (0, tailwind_variants.tv)({ slots: {
1764
+ control: "select__control",
1765
+ description: "select__description",
1766
+ error: "select__error",
1767
+ label: "select__label",
1768
+ option: "select__option",
1769
+ root: "select"
1770
+ } });
1771
+
1772
+ //#endregion
1773
+ //#region src/components/select/use-select.ts
1774
+ const useSelect = () => {
1775
+ const context = (0, react.useContext)(SelectContext);
1776
+ if (!context) throw new Error("useSelect must be used within a SelectProvider");
1777
+ return context;
1778
+ };
1779
+
1780
+ //#endregion
1781
+ //#region src/components/select/select.tsx
1782
+ const Select = ({ className, ...props }) => {
1783
+ const slots = (0, react.useMemo)(() => selectVariants(), []);
1784
+ const generatedId = (0, react.useId)();
1785
+ const inputId = props.id || generatedId;
1786
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectContext.Provider, {
1787
+ value: {
1788
+ id: inputId,
1789
+ slots
1790
+ },
1791
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1792
+ className: (0, tailwind_variants.cn)(className, slots.root()),
1793
+ ...props
1794
+ })
1795
+ });
1796
+ };
1797
+ const SelectLabel = ({ className, ...props }) => {
1798
+ const { slots, id } = useSelect();
1799
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
1800
+ className: (0, tailwind_variants.cn)(className, slots.label()),
1801
+ htmlFor: id,
1802
+ ...props
1803
+ });
1804
+ };
1805
+ const SelectControl = ({ className, ...props }) => {
1806
+ const { slots, id } = useSelect();
1807
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
1808
+ className: (0, tailwind_variants.cn)(className, slots.control()),
1809
+ id,
1810
+ ...props
1811
+ });
1812
+ };
1813
+ const SelectOption = ({ className, ...props }) => {
1814
+ const { slots } = useSelect();
1815
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
1816
+ className: (0, tailwind_variants.cn)(className, slots.option()),
1817
+ ...props
1818
+ });
1819
+ };
1820
+ const SelectDescription = ({ className, ...props }) => {
1821
+ const { slots } = useSelect();
1822
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1823
+ className: (0, tailwind_variants.cn)(className, slots.description()),
1824
+ ...props
1825
+ });
1826
+ };
1827
+ const SelectError = ({ className, ...props }) => {
1828
+ const { slots } = useSelect();
1829
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1830
+ className: (0, tailwind_variants.cn)(className, slots.error()),
1831
+ ...props
1832
+ });
1833
+ };
1834
+ var select_default = Object.assign(Select, {
1835
+ Control: SelectControl,
1836
+ Description: SelectDescription,
1837
+ Error: SelectError,
1838
+ Label: SelectLabel,
1839
+ Option: SelectOption,
1840
+ Root: Select
1841
+ });
1842
+
1843
+ //#endregion
1844
+ //#region src/components/sidebar/sidebar.context.ts
1845
+ const SidebarContext = (0, react.createContext)(null);
1846
+
1847
+ //#endregion
1848
+ //#region src/components/sidebar/sidebar.variants.ts
1849
+ const sidebarVariants = (0, tailwind_variants.tv)({ slots: {
1850
+ content: "sidebar__content",
1851
+ footer: "sidebar__footer",
1852
+ header: "sidebar__header",
1853
+ menu: "sidebar__menu",
1854
+ menuItem: "sidebar__menu-item",
1855
+ menuLabel: "sidebar__menu-label",
1856
+ outlet: "sidebar__outlet",
1857
+ panel: "sidebar__panel",
1858
+ root: "sidebar",
1859
+ trigger: "sidebar__trigger"
1860
+ } });
1861
+
1862
+ //#endregion
1863
+ //#region src/components/sidebar/use-sidebar.ts
1864
+ const useSidebar = () => {
1865
+ const context = (0, react.useContext)(SidebarContext);
1866
+ if (!context) throw new Error("useSidebar must be used within a SidebarProvider");
1867
+ return context;
1868
+ };
1869
+
1870
+ //#endregion
1871
+ //#region src/components/sidebar/sidebar.tsx
1872
+ const Sidebar = ({ className, isOpen, onOpenChange, ...props }) => {
1873
+ const [internalIsOpen, setInternalIsOpen] = react.default.useState(false);
1874
+ const isOpenState = isOpen !== void 0 ? isOpen : internalIsOpen;
1875
+ const handleOpenChange = onOpenChange || setInternalIsOpen;
1876
+ const slots = (0, react.useMemo)(() => sidebarVariants({ className }), [className]);
1877
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarContext, {
1878
+ value: {
1879
+ isOpen: isOpenState,
1880
+ onOpenChange: handleOpenChange,
1881
+ slots
1882
+ },
1883
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1884
+ className: slots.root(),
1885
+ "data-open": isOpenState,
1886
+ ...props
1887
+ })
1888
+ });
1889
+ };
1890
+ const SidebarPanel = ({ className, ...props }) => {
1891
+ const { slots } = useSidebar();
1892
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("aside", {
1893
+ className: (0, tailwind_variants.cn)(slots.panel(), className),
1894
+ ...props
1895
+ });
1896
+ };
1897
+ const SidebarHeader = ({ className, ...props }) => {
1898
+ const { slots } = useSidebar();
1899
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
1900
+ className: (0, tailwind_variants.cn)(slots.header(), className),
1901
+ ...props
1902
+ });
1903
+ };
1904
+ const SidebarContent = ({ className, ...props }) => {
1905
+ const { slots } = useSidebar();
1906
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1907
+ className: (0, tailwind_variants.cn)(slots.content(), className),
1908
+ ...props
1909
+ });
1910
+ };
1911
+ const SidebarFooter = ({ className, ...props }) => {
1912
+ const { slots } = useSidebar();
1913
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("footer", {
1914
+ className: (0, tailwind_variants.cn)(slots.footer(), className),
1915
+ ...props
1916
+ });
1917
+ };
1918
+ const SidebarTrigger = ({ className, children, ...props }) => {
1919
+ const { slots, isOpen, onOpenChange } = useSidebar();
1920
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1921
+ "aria-expanded": isOpen,
1922
+ className: (0, tailwind_variants.cn)(slots.trigger(), className),
1923
+ onClick: () => onOpenChange(!isOpen),
1924
+ ...props,
1925
+ children: children ?? (isOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucidePanelLeftClose, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucidePanelLeftOpen, {}))
1926
+ });
1927
+ };
1928
+ const SidebarOutlet = ({ className, ...props }) => {
1929
+ const { slots } = useSidebar();
1930
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1931
+ className: (0, tailwind_variants.cn)(slots.outlet(), className),
1932
+ ...props
1933
+ });
1934
+ };
1935
+ const SidebarMenu = ({ className, ...props }) => {
1936
+ const { slots } = useSidebar();
1937
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
1938
+ className: (0, tailwind_variants.cn)(slots.menu(), className),
1939
+ ...props
1940
+ });
1941
+ };
1942
+ const SidebarMenuItem = ({ className, ...props }) => {
1943
+ const { slots } = useSidebar();
1944
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_slot.Slot, {
1945
+ className: (0, tailwind_variants.cn)(slots.menuItem(), className),
1946
+ ...props
1947
+ });
1948
+ };
1949
+ const SidebarMenuLabel = ({ className, ...props }) => {
1950
+ const { slots } = useSidebar();
1951
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1952
+ className: (0, tailwind_variants.cn)(slots.menuLabel(), className),
1953
+ ...props
1954
+ });
1955
+ };
1956
+ var sidebar_default = Object.assign(Sidebar, {
1957
+ Content: SidebarContent,
1958
+ Footer: SidebarFooter,
1959
+ Header: SidebarHeader,
1960
+ Menu: SidebarMenu,
1961
+ MenuItem: SidebarMenuItem,
1962
+ MenuLabel: SidebarMenuLabel,
1963
+ Outlet: SidebarOutlet,
1964
+ Panel: SidebarPanel,
1965
+ Root: Sidebar,
1966
+ Trigger: SidebarTrigger
1967
+ });
1968
+
1969
+ //#endregion
1970
+ //#region src/components/slider/slider.context.ts
1971
+ const SliderContext = (0, react.createContext)(null);
1972
+
1973
+ //#endregion
1974
+ //#region src/components/slider/slider.variants.ts
1975
+ const sliderVariants = (0, tailwind_variants.tv)({ slots: {
1976
+ control: "slider__control",
1977
+ indicator: "slider__indicator",
1978
+ root: "slider",
1979
+ thumb: "slider__thumb",
1980
+ track: "slider__track",
1981
+ value: "slider__value"
1982
+ } });
1983
+
1984
+ //#endregion
1985
+ //#region src/components/slider/use-slider.tsx
1986
+ const useSlider = () => {
1987
+ const context = (0, react.useContext)(SliderContext);
1988
+ if (!context) throw new Error("useSlider must be used within a SliderProvider");
1989
+ return context;
1990
+ };
1991
+
1992
+ //#endregion
1993
+ //#region src/components/slider/slider.tsx
1994
+ const Slider = ({ className, ...props }) => {
1995
+ const slots = (0, react.useMemo)(() => sliderVariants(), []);
1996
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SliderContext, {
1997
+ value: { slots },
1998
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Slider.Root, {
1999
+ className: (0, tailwind_variants.cn)(className, slots.root()),
2000
+ ...props
2001
+ })
2002
+ });
2003
+ };
2004
+ const SliderValue = ({ className, ...props }) => {
2005
+ const { slots } = useSlider();
2006
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Slider.Value, {
2007
+ className: (0, tailwind_variants.cn)(className, slots.value()),
2008
+ ...props
2009
+ });
2010
+ };
2011
+ const SliderControl = ({ className, ...props }) => {
2012
+ const { slots } = useSlider();
2013
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Slider.Control, {
2014
+ className: (0, tailwind_variants.cn)(className, slots.control()),
2015
+ ...props
2016
+ });
2017
+ };
2018
+ const SliderTrack = ({ className, ...props }) => {
2019
+ const { slots } = useSlider();
2020
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Slider.Track, {
2021
+ className: (0, tailwind_variants.cn)(className, slots.track()),
2022
+ ...props
2023
+ });
2024
+ };
2025
+ const SliderIndicator = ({ className, ...props }) => {
2026
+ const { slots } = useSlider();
2027
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Slider.Indicator, {
2028
+ className: (0, tailwind_variants.cn)(className, slots.indicator()),
2029
+ ...props
2030
+ });
2031
+ };
2032
+ const SliderThumb = ({ className, ...props }) => {
2033
+ const { slots } = useSlider();
2034
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Slider.Thumb, {
2035
+ className: (0, tailwind_variants.cn)(className, slots.thumb()),
2036
+ ...props
2037
+ });
2038
+ };
2039
+ var slider_default = Object.assign(Slider, {
2040
+ Control: SliderControl,
2041
+ Indicator: SliderIndicator,
2042
+ Root: Slider,
2043
+ Thumb: SliderThumb,
2044
+ Track: SliderTrack,
2045
+ Value: SliderValue
2046
+ });
2047
+
2048
+ //#endregion
2049
+ //#region src/components/switch/switch.context.ts
2050
+ const SwitchContext = (0, react.createContext)(null);
2051
+
2052
+ //#endregion
2053
+ //#region src/components/switch/switch.variants.ts
2054
+ const switchVariants = (0, tailwind_variants.tv)({
2055
+ defaultVariants: { size: "md" },
2056
+ slots: {
2057
+ root: "switch",
2058
+ thumb: "switch__thumb"
2059
+ },
2060
+ variants: { size: {
2061
+ lg: { root: "switch--lg" },
2062
+ md: { root: "switch--md" },
2063
+ sm: { root: "switch--sm" }
2064
+ } }
2065
+ });
2066
+
2067
+ //#endregion
2068
+ //#region src/components/switch/use-switch.ts
2069
+ const useSwitch = () => {
2070
+ const context = (0, react.useContext)(SwitchContext);
2071
+ if (!context) throw new Error("useSwitch must be used within a SwitchProvider");
2072
+ return context;
2073
+ };
2074
+
2075
+ //#endregion
2076
+ //#region src/components/switch/switch.tsx
2077
+ const Switch = ({ className, size, ...props }) => {
2078
+ const slots = (0, react.useMemo)(() => switchVariants({ size }), [size]);
2079
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SwitchContext.Provider, {
2080
+ value: { slots },
2081
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Switch.Root, {
2082
+ className: (0, tailwind_variants.cn)(className, slots.root()),
2083
+ ...props
2084
+ })
2085
+ });
2086
+ };
2087
+ const SwitchThumb = ({ className, ...props }) => {
2088
+ const { slots } = useSwitch();
2089
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Switch.Thumb, {
2090
+ className: (0, tailwind_variants.cn)(className, slots.thumb()),
2091
+ ...props
2092
+ });
2093
+ };
2094
+ var switch_default = Object.assign(Switch, {
2095
+ Root: Switch,
2096
+ Thumb: SwitchThumb
2097
+ });
2098
+
2099
+ //#endregion
2100
+ //#region src/components/table/table.context.ts
2101
+ const TableContext = (0, react.createContext)(null);
2102
+
2103
+ //#endregion
2104
+ //#region src/components/table/table.variants.ts
2105
+ const tableVariants = (0, tailwind_variants.tv)({ slots: {
2106
+ root: "table",
2107
+ tbody: "table__tbody",
2108
+ td: "table__td",
2109
+ tfoot: "table__tfoot",
2110
+ th: "table__th",
2111
+ thead: "table__thead",
2112
+ tr: "table__tr"
2113
+ } });
2114
+
2115
+ //#endregion
2116
+ //#region src/components/table/use-table.ts
2117
+ const useTable = () => {
2118
+ const context = (0, react.useContext)(TableContext);
2119
+ if (!context) throw new Error("useTable must be used within a TableProvider");
2120
+ return context;
2121
+ };
2122
+
2123
+ //#endregion
2124
+ //#region src/components/table/table.tsx
2125
+ const Table = ({ className, ...props }) => {
2126
+ const slots = (0, react.useMemo)(() => tableVariants(), []);
2127
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableContext, {
2128
+ value: { slots },
2129
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", {
2130
+ className: (0, tailwind_variants.cn)(className, slots.root()),
2131
+ ...props
2132
+ })
2133
+ });
2134
+ };
2135
+ const TableHead = ({ className, ...props }) => {
2136
+ const { slots } = useTable();
2137
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", {
2138
+ className: (0, tailwind_variants.cn)(className, slots.thead()),
2139
+ ...props
2140
+ });
2141
+ };
2142
+ const TableRow = ({ className, ...props }) => {
2143
+ const { slots } = useTable();
2144
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
2145
+ className: (0, tailwind_variants.cn)(className, slots.tr()),
2146
+ ...props
2147
+ });
2148
+ };
2149
+ const TableHeaderCell = ({ className, ...props }) => {
2150
+ const { slots } = useTable();
2151
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
2152
+ className: (0, tailwind_variants.cn)(className, slots.th()),
2153
+ ...props
2154
+ });
2155
+ };
2156
+ const TableBody = ({ className, ...props }) => {
2157
+ const { slots } = useTable();
2158
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", {
2159
+ className: (0, tailwind_variants.cn)(className, slots.tbody()),
2160
+ ...props
2161
+ });
2162
+ };
2163
+ const TableDataCell = ({ className, ...props }) => {
2164
+ const { slots } = useTable();
2165
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
2166
+ className: (0, tailwind_variants.cn)(className, slots.td()),
2167
+ ...props
2168
+ });
2169
+ };
2170
+ const TableFooter = ({ className, ...props }) => {
2171
+ const { slots } = useTable();
2172
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tfoot", {
2173
+ className: (0, tailwind_variants.cn)(className, slots.tfoot()),
2174
+ ...props
2175
+ });
2176
+ };
2177
+ var table_default = Object.assign(Table, {
2178
+ Body: TableBody,
2179
+ DataCell: TableDataCell,
2180
+ Footer: TableFooter,
2181
+ Head: TableHead,
2182
+ HeaderCell: TableHeaderCell,
2183
+ Root: Table,
2184
+ Row: TableRow
2185
+ });
2186
+
2187
+ //#endregion
2188
+ //#region src/components/tabs/tabs.context.ts
2189
+ const TabsContext = (0, react.createContext)(null);
2190
+
2191
+ //#endregion
2192
+ //#region src/components/tabs/tabs.variants.ts
2193
+ const tabsVariants = (0, tailwind_variants.tv)({ slots: {
2194
+ indicator: "tabs__indicator",
2195
+ list: "tabs__list",
2196
+ panel: "tabs__panel",
2197
+ root: "tabs",
2198
+ tab: "tabs__tab"
2199
+ } });
2200
+
2201
+ //#endregion
2202
+ //#region src/components/tabs/use-tabs.ts
2203
+ const useTabs = () => {
2204
+ const context = (0, react.useContext)(TabsContext);
2205
+ if (!context) throw new Error("useTabs must be used within a TabsProvider");
2206
+ return context;
2207
+ };
2208
+
2209
+ //#endregion
2210
+ //#region src/components/tabs/tabs.tsx
2211
+ const Tabs = ({ className, ...props }) => {
2212
+ const slots = (0, react.useMemo)(() => tabsVariants(), []);
2213
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TabsContext.Provider, {
2214
+ value: { slots },
2215
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Tabs.Root, {
2216
+ className: (0, tailwind_variants.cn)(className, slots.root()),
2217
+ ...props
2218
+ })
2219
+ });
2220
+ };
2221
+ const TabsList = ({ className, ...props }) => {
2222
+ const { slots } = useTabs();
2223
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Tabs.List, {
2224
+ className: (0, tailwind_variants.cn)(slots.list(), className),
2225
+ ...props
2226
+ });
2227
+ };
2228
+ const TabsTab = ({ className, ...props }) => {
2229
+ const { slots } = useTabs();
2230
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Tabs.Tab, {
2231
+ className: (0, tailwind_variants.cn)(slots.tab(), className),
2232
+ ...props
2233
+ });
2234
+ };
2235
+ const TabsIndicator = ({ className, ...props }) => {
2236
+ const { slots } = useTabs();
2237
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Tabs.Indicator, {
2238
+ className: (0, tailwind_variants.cn)(slots.indicator(), className),
2239
+ ...props
2240
+ });
2241
+ };
2242
+ const TabsPanel = ({ className, ...props }) => {
2243
+ const { slots } = useTabs();
2244
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Tabs.Panel, {
2245
+ className: (0, tailwind_variants.cn)(slots.panel(), className),
2246
+ ...props
2247
+ });
2248
+ };
2249
+ var tabs_default = Object.assign(Tabs, {
2250
+ Indicator: TabsIndicator,
2251
+ List: TabsList,
2252
+ Panel: TabsPanel,
2253
+ Root: Tabs,
2254
+ Tab: TabsTab
2255
+ });
2256
+
2257
+ //#endregion
2258
+ //#region src/components/toggle-button/toggle-button.variants.ts
2259
+ const toggleButtonVariants = (0, tailwind_variants.tv)({
2260
+ base: "toggle-button",
2261
+ extend: buttonVariants
2262
+ });
2263
+
2264
+ //#endregion
2265
+ //#region src/components/toggle-button/toggle-button.tsx
2266
+ const ToggleButton = ({ className, variant, size, ...props }) => {
2267
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Toggle, {
2268
+ className: (0, tailwind_variants.cn)(className, toggleButtonVariants({
2269
+ size,
2270
+ variant
2271
+ })),
2272
+ ...props
2273
+ });
2274
+ };
2275
+ var toggle_button_default = ToggleButton;
2276
+
2277
+ //#endregion
2278
+ exports.Accordion = accordion_default;
2279
+ exports.Alert = alert_default;
2280
+ exports.AlertDialog = alert_dialog_default;
2281
+ exports.Avatar = avatar_default;
2282
+ exports.Button = button_default;
2283
+ exports.ButtonGroup = button_group_default;
2284
+ exports.Card = card_default;
2285
+ exports.Checkbox = checkbox_default;
2286
+ exports.CheckboxGroup = checkbox_group_default;
2287
+ exports.Chip = chip_default;
2288
+ exports.Container = container_default;
2289
+ exports.Dialog = dialog_default;
2290
+ exports.Drawer = drawer_default;
2291
+ exports.Field = field_default;
2292
+ exports.Fieldset = fieldset_default;
2293
+ exports.Form = form_default;
2294
+ exports.IconButton = icon_button_default;
2295
+ exports.Input = input_default;
2296
+ exports.Label = label_default;
2297
+ exports.Link = link_default;
2298
+ exports.List = list_default;
2299
+ exports.Menu = menu_default;
2300
+ exports.Meter = meter_default;
2301
+ exports.Navbar = navbar_default;
2302
+ exports.Popover = popover_default;
2303
+ exports.Progress = progress_default;
2304
+ exports.Radio = radio_default;
2305
+ exports.RadioGroup = radio_group_default;
2306
+ exports.Select = select_default;
2307
+ exports.Separator = separator_default;
2308
+ exports.Sidebar = sidebar_default;
2309
+ exports.Slider = slider_default;
2310
+ exports.Switch = switch_default;
2311
+ exports.Table = table_default;
2312
+ exports.Tabs = tabs_default;
2313
+ exports.ToggleButton = toggle_button_default;
2314
+ exports.accordionVariants = accordionVariants;
2315
+ exports.alertDialogVariants = alertDialogVariants;
2316
+ exports.alertVariants = alertVariants;
2317
+ exports.avatarVariants = avatarVariants;
2318
+ exports.buttonGroupVariants = buttonGroupVariants;
2319
+ exports.buttonVariants = buttonVariants;
2320
+ exports.cardVariants = cardVariants;
2321
+ exports.checkboxGroupVariants = checkboxGroupVariants;
2322
+ exports.checkboxVariants = checkboxVariants;
2323
+ exports.chipVariants = chipVariants;
2324
+ Object.defineProperty(exports, 'cn', {
2325
+ enumerable: true,
2326
+ get: function () {
2327
+ return tailwind_variants.cn;
2328
+ }
2329
+ });
2330
+ exports.containerVariants = containerVariants;
2331
+ exports.dialogVariants = dialogVariants;
2332
+ exports.drawerVariants = drawerVariants;
2333
+ exports.fieldVariants = fieldVariants;
2334
+ exports.fieldsetVariants = fieldsetVariants;
2335
+ exports.formVariants = formVariants;
2336
+ exports.iconButtonVariants = iconButtonVariants;
2337
+ exports.inputVariants = inputVariants;
2338
+ exports.labelVariants = labelVariants;
2339
+ exports.linkVariants = linkVariants;
2340
+ exports.listVariants = listVariants;
2341
+ exports.menuVariants = menuVariants;
2342
+ exports.meterVariants = meterVariants;
2343
+ exports.navbarVariants = navbarVariants;
2344
+ exports.popoverVariants = popoverVariants;
2345
+ exports.progressVariants = progressVariants;
2346
+ exports.radioGroupVariants = radioGroupVariants;
2347
+ exports.radioVariants = radioVariants;
2348
+ exports.selectVariants = selectVariants;
2349
+ exports.separatorVariants = separatorVariants;
2350
+ exports.sidebarVariants = sidebarVariants;
2351
+ exports.sliderVariants = sliderVariants;
2352
+ exports.switchVariants = switchVariants;
2353
+ exports.tableVariants = tableVariants;
2354
+ exports.tabsVariants = tabsVariants;
2355
+ exports.toggleButtonVariants = toggleButtonVariants;
2356
+ //# sourceMappingURL=index.cjs.map