@bykhd/lab-ds 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1041 @@
1
+ "use client";
2
+
3
+ // src/components/Alert/Alert.tsx
4
+ import { cn } from "cn";
5
+
6
+ // src/components/Alert/Alert.module.css
7
+ var Alert_default = {
8
+ root: "Alert_root",
9
+ default: "Alert_default",
10
+ destructive: "Alert_destructive",
11
+ title: "Alert_title",
12
+ description: "Alert_description",
13
+ action: "Alert_action"
14
+ };
15
+
16
+ // src/components/Alert/Alert.tsx
17
+ import { jsx } from "react/jsx-runtime";
18
+ function Alert({
19
+ className,
20
+ variant = "default",
21
+ ...props
22
+ }) {
23
+ return /* @__PURE__ */ jsx(
24
+ "div",
25
+ {
26
+ "data-slot": "alert",
27
+ "data-variant": variant,
28
+ role: "alert",
29
+ className: cn(Alert_default.root, Alert_default[variant], className),
30
+ ...props
31
+ }
32
+ );
33
+ }
34
+ function AlertTitle({ className, ...props }) {
35
+ return /* @__PURE__ */ jsx(
36
+ "div",
37
+ {
38
+ "data-slot": "alert-title",
39
+ className: cn(Alert_default.title, className),
40
+ ...props
41
+ }
42
+ );
43
+ }
44
+ function AlertDescription({
45
+ className,
46
+ ...props
47
+ }) {
48
+ return /* @__PURE__ */ jsx(
49
+ "div",
50
+ {
51
+ "data-slot": "alert-description",
52
+ className: cn(Alert_default.description, className),
53
+ ...props
54
+ }
55
+ );
56
+ }
57
+ function AlertAction({ className, ...props }) {
58
+ return /* @__PURE__ */ jsx(
59
+ "div",
60
+ {
61
+ "data-slot": "alert-action",
62
+ className: cn(Alert_default.action, className),
63
+ ...props
64
+ }
65
+ );
66
+ }
67
+
68
+ // src/components/Badge/Badge.tsx
69
+ import { mergeProps } from "@base-ui/react/merge-props";
70
+ import { useRender } from "@base-ui/react/use-render";
71
+ import { cn as cn2 } from "cn";
72
+
73
+ // src/components/Badge/Badge.module.css
74
+ var Badge_default = {
75
+ root: "Badge_root",
76
+ default: "Badge_default",
77
+ secondary: "Badge_secondary",
78
+ destructive: "Badge_destructive",
79
+ outline: "Badge_outline",
80
+ ghost: "Badge_ghost",
81
+ link: "Badge_link"
82
+ };
83
+
84
+ // src/components/Badge/Badge.tsx
85
+ function badgeVariants({ variant = "default" } = {}) {
86
+ return cn2(Badge_default.root, Badge_default[variant]);
87
+ }
88
+ function Badge({
89
+ className,
90
+ variant = "default",
91
+ render,
92
+ ...props
93
+ }) {
94
+ return useRender({
95
+ defaultTagName: "span",
96
+ props: mergeProps(
97
+ {
98
+ className: cn2(badgeVariants({ variant }), className)
99
+ },
100
+ props
101
+ ),
102
+ render,
103
+ state: {
104
+ slot: "badge",
105
+ variant
106
+ }
107
+ });
108
+ }
109
+
110
+ // src/components/Button/Button.tsx
111
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
112
+ import { cn as cn3 } from "cn";
113
+
114
+ // src/components/Button/Button.module.css
115
+ var Button_default = {
116
+ root: "Button_root",
117
+ default: "Button_default",
118
+ danger: "Button_danger",
119
+ outline: "Button_outline",
120
+ secondary: "Button_secondary",
121
+ ghost: "Button_ghost",
122
+ destructive: "Button_destructive",
123
+ link: "Button_link",
124
+ "size-default": "Button_size-default",
125
+ "size-xs": "Button_size-xs",
126
+ "size-sm": "Button_size-sm",
127
+ "size-lg": "Button_size-lg",
128
+ "size-icon": "Button_size-icon",
129
+ "size-icon-xs": "Button_size-icon-xs",
130
+ "size-icon-sm": "Button_size-icon-sm",
131
+ "size-icon-lg": "Button_size-icon-lg"
132
+ };
133
+
134
+ // src/components/Button/Button.tsx
135
+ import { jsx as jsx2 } from "react/jsx-runtime";
136
+ function buttonVariants({
137
+ variant = "default",
138
+ size = "default",
139
+ danger = false
140
+ } = {}) {
141
+ return cn3(
142
+ Button_default.root,
143
+ Button_default[variant],
144
+ Button_default[`size-${size}`],
145
+ danger && Button_default.danger
146
+ );
147
+ }
148
+ function Button({
149
+ className,
150
+ variant = "default",
151
+ size = "default",
152
+ danger = false,
153
+ ...props
154
+ }) {
155
+ return /* @__PURE__ */ jsx2(
156
+ ButtonPrimitive,
157
+ {
158
+ "data-slot": "button",
159
+ "data-variant": variant,
160
+ "data-size": size,
161
+ "data-danger": danger || void 0,
162
+ className: cn3(buttonVariants({ variant, size, danger }), className),
163
+ ...props
164
+ }
165
+ );
166
+ }
167
+
168
+ // src/components/Card/Card.tsx
169
+ import { cn as cn4 } from "cn";
170
+
171
+ // src/components/Card/Card.module.css
172
+ var Card_default = {
173
+ root: "Card_root",
174
+ header: "Card_header",
175
+ "border-b": "Card_border-b",
176
+ title: "Card_title",
177
+ description: "Card_description",
178
+ action: "Card_action",
179
+ content: "Card_content",
180
+ footer: "Card_footer"
181
+ };
182
+
183
+ // src/components/Card/Card.tsx
184
+ import { jsx as jsx3 } from "react/jsx-runtime";
185
+ function Card({
186
+ className,
187
+ size = "default",
188
+ ...props
189
+ }) {
190
+ return /* @__PURE__ */ jsx3(
191
+ "div",
192
+ {
193
+ "data-slot": "card",
194
+ "data-size": size,
195
+ className: cn4(Card_default.root, className),
196
+ ...props
197
+ }
198
+ );
199
+ }
200
+ function CardHeader({ className, ...props }) {
201
+ return /* @__PURE__ */ jsx3(
202
+ "div",
203
+ {
204
+ "data-slot": "card-header",
205
+ className: cn4(Card_default.header, className),
206
+ ...props
207
+ }
208
+ );
209
+ }
210
+ function CardTitle({ className, ...props }) {
211
+ return /* @__PURE__ */ jsx3(
212
+ "div",
213
+ {
214
+ "data-slot": "card-title",
215
+ className: cn4(Card_default.title, className),
216
+ ...props
217
+ }
218
+ );
219
+ }
220
+ function CardDescription({ className, ...props }) {
221
+ return /* @__PURE__ */ jsx3(
222
+ "div",
223
+ {
224
+ "data-slot": "card-description",
225
+ className: cn4(Card_default.description, className),
226
+ ...props
227
+ }
228
+ );
229
+ }
230
+ function CardAction({ className, ...props }) {
231
+ return /* @__PURE__ */ jsx3(
232
+ "div",
233
+ {
234
+ "data-slot": "card-action",
235
+ className: cn4(Card_default.action, className),
236
+ ...props
237
+ }
238
+ );
239
+ }
240
+ function CardContent({ className, ...props }) {
241
+ return /* @__PURE__ */ jsx3(
242
+ "div",
243
+ {
244
+ "data-slot": "card-content",
245
+ className: cn4(Card_default.content, className),
246
+ ...props
247
+ }
248
+ );
249
+ }
250
+ function CardFooter({ className, ...props }) {
251
+ return /* @__PURE__ */ jsx3(
252
+ "div",
253
+ {
254
+ "data-slot": "card-footer",
255
+ className: cn4(Card_default.footer, className),
256
+ ...props
257
+ }
258
+ );
259
+ }
260
+
261
+ // src/components/Checkbox/Checkbox.tsx
262
+ import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
263
+ import { IconCheck } from "@tabler/icons-react";
264
+ import { cn as cn5 } from "cn";
265
+
266
+ // src/components/Checkbox/Checkbox.module.css
267
+ var Checkbox_default = {
268
+ root: "Checkbox_root",
269
+ indicator: "Checkbox_indicator"
270
+ };
271
+
272
+ // src/components/Checkbox/Checkbox.tsx
273
+ import { jsx as jsx4 } from "react/jsx-runtime";
274
+ function Checkbox({ className, ...props }) {
275
+ return /* @__PURE__ */ jsx4(
276
+ CheckboxPrimitive.Root,
277
+ {
278
+ "data-slot": "checkbox",
279
+ className: cn5(Checkbox_default.root, className),
280
+ ...props,
281
+ children: /* @__PURE__ */ jsx4(
282
+ CheckboxPrimitive.Indicator,
283
+ {
284
+ "data-slot": "checkbox-indicator",
285
+ className: Checkbox_default.indicator,
286
+ children: /* @__PURE__ */ jsx4(IconCheck, {})
287
+ }
288
+ )
289
+ }
290
+ );
291
+ }
292
+
293
+ // src/components/Dialog/Dialog.tsx
294
+ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
295
+ import { IconX } from "@tabler/icons-react";
296
+ import { cn as cn6 } from "cn";
297
+
298
+ // src/components/Dialog/Dialog.module.css
299
+ var Dialog_default = {
300
+ overlay: "Dialog_overlay",
301
+ enter: "Dialog_enter",
302
+ exit: "Dialog_exit",
303
+ content: "Dialog_content",
304
+ close: "Dialog_close",
305
+ header: "Dialog_header",
306
+ footer: "Dialog_footer",
307
+ title: "Dialog_title",
308
+ description: "Dialog_description"
309
+ };
310
+
311
+ // src/components/Dialog/Dialog.tsx
312
+ import { jsx as jsx5, jsxs } from "react/jsx-runtime";
313
+ function Dialog({ ...props }) {
314
+ return /* @__PURE__ */ jsx5(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
315
+ }
316
+ function DialogTrigger({ ...props }) {
317
+ return /* @__PURE__ */ jsx5(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
318
+ }
319
+ function DialogPortal({ ...props }) {
320
+ return /* @__PURE__ */ jsx5(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
321
+ }
322
+ function DialogClose({ ...props }) {
323
+ return /* @__PURE__ */ jsx5(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
324
+ }
325
+ function DialogOverlay({
326
+ className,
327
+ ...props
328
+ }) {
329
+ return /* @__PURE__ */ jsx5(
330
+ DialogPrimitive.Backdrop,
331
+ {
332
+ "data-slot": "dialog-overlay",
333
+ className: cn6(Dialog_default.overlay, className),
334
+ ...props
335
+ }
336
+ );
337
+ }
338
+ function DialogContent({
339
+ className,
340
+ children,
341
+ showCloseButton = true,
342
+ ...props
343
+ }) {
344
+ return /* @__PURE__ */ jsxs(DialogPortal, { children: [
345
+ /* @__PURE__ */ jsx5(DialogOverlay, {}),
346
+ /* @__PURE__ */ jsxs(
347
+ DialogPrimitive.Popup,
348
+ {
349
+ "data-slot": "dialog-content",
350
+ className: cn6(Dialog_default.content, className),
351
+ ...props,
352
+ children: [
353
+ children,
354
+ showCloseButton && /* @__PURE__ */ jsx5(
355
+ DialogPrimitive.Close,
356
+ {
357
+ "data-slot": "dialog-close",
358
+ "aria-label": "Close",
359
+ render: /* @__PURE__ */ jsx5(Button, { variant: "ghost", size: "icon-sm", className: Dialog_default.close }),
360
+ children: /* @__PURE__ */ jsx5(IconX, {})
361
+ }
362
+ )
363
+ ]
364
+ }
365
+ )
366
+ ] });
367
+ }
368
+ function DialogHeader({ className, ...props }) {
369
+ return /* @__PURE__ */ jsx5(
370
+ "div",
371
+ {
372
+ "data-slot": "dialog-header",
373
+ className: cn6(Dialog_default.header, className),
374
+ ...props
375
+ }
376
+ );
377
+ }
378
+ function DialogFooter({
379
+ className,
380
+ showCloseButton = false,
381
+ children,
382
+ ...props
383
+ }) {
384
+ return /* @__PURE__ */ jsxs(
385
+ "div",
386
+ {
387
+ "data-slot": "dialog-footer",
388
+ className: cn6(Dialog_default.footer, className),
389
+ ...props,
390
+ children: [
391
+ children,
392
+ showCloseButton && /* @__PURE__ */ jsx5(DialogPrimitive.Close, { render: /* @__PURE__ */ jsx5(Button, { variant: "outline" }), children: "Close" })
393
+ ]
394
+ }
395
+ );
396
+ }
397
+ function DialogTitle({ className, ...props }) {
398
+ return /* @__PURE__ */ jsx5(
399
+ DialogPrimitive.Title,
400
+ {
401
+ "data-slot": "dialog-title",
402
+ className: cn6(Dialog_default.title, className),
403
+ ...props
404
+ }
405
+ );
406
+ }
407
+ function DialogDescription({
408
+ className,
409
+ ...props
410
+ }) {
411
+ return /* @__PURE__ */ jsx5(
412
+ DialogPrimitive.Description,
413
+ {
414
+ "data-slot": "dialog-description",
415
+ className: cn6(Dialog_default.description, className),
416
+ ...props
417
+ }
418
+ );
419
+ }
420
+
421
+ // src/components/Field/Field.tsx
422
+ import { useMemo } from "react";
423
+ import { cn as cn9 } from "cn";
424
+
425
+ // src/components/Label/Label.tsx
426
+ import { cn as cn7 } from "cn";
427
+
428
+ // src/components/Label/Label.module.css
429
+ var Label_default = {
430
+ root: "Label_root"
431
+ };
432
+
433
+ // src/components/Label/Label.tsx
434
+ import { jsx as jsx6 } from "react/jsx-runtime";
435
+ function Label({ className, ...props }) {
436
+ return /* @__PURE__ */ jsx6(
437
+ "label",
438
+ {
439
+ "data-slot": "label",
440
+ className: cn7(Label_default.root, className),
441
+ ...props
442
+ }
443
+ );
444
+ }
445
+
446
+ // src/components/Separator/Separator.tsx
447
+ import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
448
+ import { cn as cn8 } from "cn";
449
+
450
+ // src/components/Separator/Separator.module.css
451
+ var Separator_default = {
452
+ root: "Separator_root"
453
+ };
454
+
455
+ // src/components/Separator/Separator.tsx
456
+ import { jsx as jsx7 } from "react/jsx-runtime";
457
+ function Separator({
458
+ className,
459
+ orientation = "horizontal",
460
+ ...props
461
+ }) {
462
+ return /* @__PURE__ */ jsx7(
463
+ SeparatorPrimitive,
464
+ {
465
+ "data-slot": "separator",
466
+ orientation,
467
+ className: cn8(Separator_default.root, className),
468
+ ...props
469
+ }
470
+ );
471
+ }
472
+
473
+ // src/components/Field/Field.module.css
474
+ var Field_default = {
475
+ set: "Field_set",
476
+ legend: "Field_legend",
477
+ group: "Field_group",
478
+ "field-group": "Field_field-group",
479
+ field: "Field_field",
480
+ vertical: "Field_vertical",
481
+ "sr-only": "Field_sr-only",
482
+ horizontal: "Field_horizontal",
483
+ responsive: "Field_responsive",
484
+ content: "Field_content",
485
+ label: "Field_label",
486
+ title: "Field_title",
487
+ description: "Field_description",
488
+ separator: "Field_separator",
489
+ separatorContent: "Field_separatorContent",
490
+ error: "Field_error"
491
+ };
492
+
493
+ // src/components/Field/Field.tsx
494
+ import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
495
+ function FieldSet({ className, ...props }) {
496
+ return /* @__PURE__ */ jsx8(
497
+ "fieldset",
498
+ {
499
+ "data-slot": "field-set",
500
+ className: cn9(Field_default.set, className),
501
+ ...props
502
+ }
503
+ );
504
+ }
505
+ function FieldLegend({
506
+ className,
507
+ variant = "legend",
508
+ ...props
509
+ }) {
510
+ return /* @__PURE__ */ jsx8(
511
+ "legend",
512
+ {
513
+ "data-slot": "field-legend",
514
+ "data-variant": variant,
515
+ className: cn9(Field_default.legend, className),
516
+ ...props
517
+ }
518
+ );
519
+ }
520
+ function FieldGroup({ className, ...props }) {
521
+ return /* @__PURE__ */ jsx8(
522
+ "div",
523
+ {
524
+ "data-slot": "field-group",
525
+ className: cn9(Field_default.group, className),
526
+ ...props
527
+ }
528
+ );
529
+ }
530
+ function Field({
531
+ className,
532
+ orientation = "vertical",
533
+ ...props
534
+ }) {
535
+ return /* @__PURE__ */ jsx8(
536
+ "div",
537
+ {
538
+ role: "group",
539
+ "data-slot": "field",
540
+ "data-orientation": orientation,
541
+ className: cn9(Field_default.field, Field_default[orientation], className),
542
+ ...props
543
+ }
544
+ );
545
+ }
546
+ function FieldContent({ className, ...props }) {
547
+ return /* @__PURE__ */ jsx8(
548
+ "div",
549
+ {
550
+ "data-slot": "field-content",
551
+ className: cn9(Field_default.content, className),
552
+ ...props
553
+ }
554
+ );
555
+ }
556
+ function FieldLabel({
557
+ className,
558
+ ...props
559
+ }) {
560
+ return /* @__PURE__ */ jsx8(
561
+ Label,
562
+ {
563
+ "data-slot": "field-label",
564
+ className: cn9(Field_default.label, className),
565
+ ...props
566
+ }
567
+ );
568
+ }
569
+ function FieldTitle({ className, ...props }) {
570
+ return /* @__PURE__ */ jsx8(
571
+ "div",
572
+ {
573
+ "data-slot": "field-label",
574
+ className: cn9(Field_default.title, className),
575
+ ...props
576
+ }
577
+ );
578
+ }
579
+ function FieldDescription({ className, ...props }) {
580
+ return /* @__PURE__ */ jsx8(
581
+ "p",
582
+ {
583
+ "data-slot": "field-description",
584
+ className: cn9(Field_default.description, className),
585
+ ...props
586
+ }
587
+ );
588
+ }
589
+ function FieldSeparator({
590
+ children,
591
+ className,
592
+ ...props
593
+ }) {
594
+ return /* @__PURE__ */ jsxs2(
595
+ "div",
596
+ {
597
+ "data-slot": "field-separator",
598
+ "data-content": !!children,
599
+ className: cn9(Field_default.separator, className),
600
+ ...props,
601
+ children: [
602
+ /* @__PURE__ */ jsx8(Separator, { className: "absolute inset-0 top-1/2" }),
603
+ children && /* @__PURE__ */ jsx8(
604
+ "span",
605
+ {
606
+ className: Field_default.separatorContent,
607
+ "data-slot": "field-separator-content",
608
+ children
609
+ }
610
+ )
611
+ ]
612
+ }
613
+ );
614
+ }
615
+ function FieldError({
616
+ className,
617
+ children,
618
+ errors,
619
+ ...props
620
+ }) {
621
+ const content = useMemo(() => {
622
+ if (children) {
623
+ return children;
624
+ }
625
+ if (!errors?.length) {
626
+ return null;
627
+ }
628
+ const uniqueErrors = [
629
+ ...new Map(errors.map((error) => [error?.message, error])).values()
630
+ ];
631
+ if (uniqueErrors?.length == 1) {
632
+ return uniqueErrors[0]?.message;
633
+ }
634
+ return /* @__PURE__ */ jsx8("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
635
+ (error, index) => error?.message && /* @__PURE__ */ jsx8("li", { children: error.message }, index)
636
+ ) });
637
+ }, [children, errors]);
638
+ if (!content) {
639
+ return null;
640
+ }
641
+ return /* @__PURE__ */ jsx8(
642
+ "div",
643
+ {
644
+ role: "alert",
645
+ "data-slot": "field-error",
646
+ className: cn9(Field_default.error, className),
647
+ ...props,
648
+ children: content
649
+ }
650
+ );
651
+ }
652
+
653
+ // src/components/Input/Input.tsx
654
+ import { Input as InputPrimitive } from "@base-ui/react/input";
655
+ import { cn as cn10 } from "cn";
656
+
657
+ // src/components/Input/Input.module.css
658
+ var Input_default = {
659
+ root: "Input_root"
660
+ };
661
+
662
+ // src/components/Input/Input.tsx
663
+ import { jsx as jsx9 } from "react/jsx-runtime";
664
+ function Input({ className, type, ...props }) {
665
+ return /* @__PURE__ */ jsx9(
666
+ InputPrimitive,
667
+ {
668
+ type,
669
+ "data-slot": "input",
670
+ className: cn10(Input_default.root, className),
671
+ ...props
672
+ }
673
+ );
674
+ }
675
+
676
+ // src/components/InputGroup/InputGroup.tsx
677
+ import { cn as cn12 } from "cn";
678
+
679
+ // src/components/Textarea/Textarea.tsx
680
+ import { cn as cn11 } from "cn";
681
+
682
+ // src/components/Textarea/Textarea.module.css
683
+ var Textarea_default = {
684
+ root: "Textarea_root"
685
+ };
686
+
687
+ // src/components/Textarea/Textarea.tsx
688
+ import { jsx as jsx10 } from "react/jsx-runtime";
689
+ function Textarea({ className, ...props }) {
690
+ return /* @__PURE__ */ jsx10(
691
+ "textarea",
692
+ {
693
+ "data-slot": "textarea",
694
+ className: cn11(Textarea_default.root, className),
695
+ ...props
696
+ }
697
+ );
698
+ }
699
+
700
+ // src/components/InputGroup/InputGroup.module.css
701
+ var InputGroup_default = {
702
+ root: "InputGroup_root",
703
+ addon: "InputGroup_addon",
704
+ "inline-start": "InputGroup_inline-start",
705
+ "inline-end": "InputGroup_inline-end",
706
+ "block-start": "InputGroup_block-start",
707
+ "border-b": "InputGroup_border-b",
708
+ "block-end": "InputGroup_block-end",
709
+ "border-t": "InputGroup_border-t",
710
+ button: "InputGroup_button",
711
+ "button-xs": "InputGroup_button-xs",
712
+ "button-icon-xs": "InputGroup_button-icon-xs",
713
+ "button-icon-sm": "InputGroup_button-icon-sm",
714
+ text: "InputGroup_text",
715
+ control: "InputGroup_control",
716
+ textarea: "InputGroup_textarea"
717
+ };
718
+
719
+ // src/components/InputGroup/InputGroup.tsx
720
+ import { jsx as jsx11 } from "react/jsx-runtime";
721
+ function InputGroup({ className, ...props }) {
722
+ return /* @__PURE__ */ jsx11(
723
+ "div",
724
+ {
725
+ "data-slot": "input-group",
726
+ role: "group",
727
+ className: cn12(InputGroup_default.root, className),
728
+ ...props
729
+ }
730
+ );
731
+ }
732
+ function InputGroupAddon({
733
+ className,
734
+ align = "inline-start",
735
+ ...props
736
+ }) {
737
+ return /* @__PURE__ */ jsx11(
738
+ "div",
739
+ {
740
+ role: "group",
741
+ "data-slot": "input-group-addon",
742
+ "data-align": align,
743
+ className: cn12(InputGroup_default.addon, InputGroup_default[align], className),
744
+ onClick: (e) => {
745
+ if (e.target.closest("button")) {
746
+ return;
747
+ }
748
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
749
+ },
750
+ ...props
751
+ }
752
+ );
753
+ }
754
+ function InputGroupButton({
755
+ className,
756
+ type = "button",
757
+ variant = "ghost",
758
+ size = "xs",
759
+ ...props
760
+ }) {
761
+ return /* @__PURE__ */ jsx11(
762
+ Button,
763
+ {
764
+ type,
765
+ "data-size": size,
766
+ variant,
767
+ className: cn12(InputGroup_default.button, InputGroup_default[`button-${size}`], className),
768
+ ...props
769
+ }
770
+ );
771
+ }
772
+ function InputGroupText({ className, ...props }) {
773
+ return /* @__PURE__ */ jsx11("span", { className: cn12(InputGroup_default.text, className), ...props });
774
+ }
775
+ function InputGroupInput({
776
+ className,
777
+ ...props
778
+ }) {
779
+ return /* @__PURE__ */ jsx11(
780
+ Input,
781
+ {
782
+ "data-slot": "input-group-control",
783
+ className: cn12(InputGroup_default.control, className),
784
+ ...props
785
+ }
786
+ );
787
+ }
788
+ function InputGroupTextarea({
789
+ className,
790
+ ...props
791
+ }) {
792
+ return /* @__PURE__ */ jsx11(
793
+ Textarea,
794
+ {
795
+ "data-slot": "input-group-control",
796
+ className: cn12(InputGroup_default.control, InputGroup_default.textarea, className),
797
+ ...props
798
+ }
799
+ );
800
+ }
801
+
802
+ // src/components/InputOTP/InputOTP.tsx
803
+ import * as React from "react";
804
+ import { IconMinus } from "@tabler/icons-react";
805
+ import { cn as cn13 } from "cn";
806
+ import { OTPInput, OTPInputContext } from "input-otp";
807
+
808
+ // src/components/InputOTP/InputOTP.module.css
809
+ var InputOTP_default = {
810
+ container: "InputOTP_container",
811
+ input: "InputOTP_input",
812
+ group: "InputOTP_group",
813
+ slot: "InputOTP_slot",
814
+ caret: "InputOTP_caret",
815
+ "caret-line": "InputOTP_caret-line",
816
+ "caret-blink": "InputOTP_caret-blink",
817
+ separator: "InputOTP_separator"
818
+ };
819
+
820
+ // src/components/InputOTP/InputOTP.tsx
821
+ import { jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
822
+ function InputOTP({
823
+ className,
824
+ containerClassName,
825
+ ...props
826
+ }) {
827
+ return /* @__PURE__ */ jsx12(
828
+ OTPInput,
829
+ {
830
+ "data-slot": "input-otp",
831
+ containerClassName: cn13(InputOTP_default.container, containerClassName),
832
+ spellCheck: false,
833
+ className: cn13(InputOTP_default.input, className),
834
+ ...props
835
+ }
836
+ );
837
+ }
838
+ function InputOTPGroup({ className, ...props }) {
839
+ return /* @__PURE__ */ jsx12(
840
+ "div",
841
+ {
842
+ "data-slot": "input-otp-group",
843
+ className: cn13(InputOTP_default.group, className),
844
+ ...props
845
+ }
846
+ );
847
+ }
848
+ function InputOTPSlot({
849
+ index,
850
+ className,
851
+ ...props
852
+ }) {
853
+ const inputOTPContext = React.useContext(OTPInputContext);
854
+ const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
855
+ return /* @__PURE__ */ jsxs3(
856
+ "div",
857
+ {
858
+ "data-slot": "input-otp-slot",
859
+ "data-active": isActive,
860
+ className: cn13(InputOTP_default.slot, className),
861
+ ...props,
862
+ children: [
863
+ char,
864
+ hasFakeCaret && /* @__PURE__ */ jsx12("div", { className: InputOTP_default.caret, children: /* @__PURE__ */ jsx12("div", { className: InputOTP_default["caret-line"] }) })
865
+ ]
866
+ }
867
+ );
868
+ }
869
+ function InputOTPSeparator({
870
+ className,
871
+ ...props
872
+ }) {
873
+ return /* @__PURE__ */ jsx12(
874
+ "div",
875
+ {
876
+ "data-slot": "input-otp-separator",
877
+ role: "separator",
878
+ className: cn13(InputOTP_default.separator, className),
879
+ ...props,
880
+ children: /* @__PURE__ */ jsx12(IconMinus, {})
881
+ }
882
+ );
883
+ }
884
+
885
+ // src/components/ProductCard/ProductCard.module.css
886
+ var ProductCard_default = {
887
+ image: "ProductCard_image",
888
+ brand: "ProductCard_brand",
889
+ name: "ProductCard_name",
890
+ price: "ProductCard_price"
891
+ };
892
+
893
+ // src/components/ProductCard/ProductCard.tsx
894
+ import { jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
895
+ var priceFormat = new Intl.NumberFormat("th-TH", {
896
+ style: "currency",
897
+ currency: "THB"
898
+ });
899
+ function ProductCard({
900
+ image,
901
+ imageAlt,
902
+ productName,
903
+ brandName,
904
+ price,
905
+ className,
906
+ ...props
907
+ }) {
908
+ return /* @__PURE__ */ jsxs4(Card, { "data-slot": "product-card", className, ...props, children: [
909
+ /* @__PURE__ */ jsx13("img", { src: image, alt: imageAlt ?? productName, className: ProductCard_default.image }),
910
+ /* @__PURE__ */ jsxs4(CardHeader, { children: [
911
+ /* @__PURE__ */ jsx13("span", { className: ProductCard_default.brand, children: brandName }),
912
+ /* @__PURE__ */ jsx13(CardTitle, { className: ProductCard_default.name, children: productName })
913
+ ] }),
914
+ /* @__PURE__ */ jsx13(CardContent, { className: ProductCard_default.price, children: priceFormat.format(price) })
915
+ ] });
916
+ }
917
+
918
+ // src/components/Tabs/Tabs.tsx
919
+ import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
920
+ import { cn as cn14 } from "cn";
921
+
922
+ // src/components/Tabs/Tabs.module.css
923
+ var Tabs_default = {
924
+ root: "Tabs_root",
925
+ list: "Tabs_list",
926
+ default: "Tabs_default",
927
+ line: "Tabs_line",
928
+ trigger: "Tabs_trigger",
929
+ content: "Tabs_content"
930
+ };
931
+
932
+ // src/components/Tabs/Tabs.tsx
933
+ import { jsx as jsx14 } from "react/jsx-runtime";
934
+ function Tabs({
935
+ className,
936
+ orientation = "horizontal",
937
+ ...props
938
+ }) {
939
+ return /* @__PURE__ */ jsx14(
940
+ TabsPrimitive.Root,
941
+ {
942
+ "data-slot": "tabs",
943
+ "data-orientation": orientation,
944
+ orientation,
945
+ className: cn14(Tabs_default.root, className),
946
+ ...props
947
+ }
948
+ );
949
+ }
950
+ function TabsList({
951
+ className,
952
+ variant = "default",
953
+ ...props
954
+ }) {
955
+ return /* @__PURE__ */ jsx14(
956
+ TabsPrimitive.List,
957
+ {
958
+ "data-slot": "tabs-list",
959
+ "data-variant": variant,
960
+ className: cn14(Tabs_default.list, Tabs_default[variant], className),
961
+ ...props
962
+ }
963
+ );
964
+ }
965
+ function TabsTrigger({ className, ...props }) {
966
+ return /* @__PURE__ */ jsx14(
967
+ TabsPrimitive.Tab,
968
+ {
969
+ "data-slot": "tabs-trigger",
970
+ className: cn14(Tabs_default.trigger, className),
971
+ ...props
972
+ }
973
+ );
974
+ }
975
+ function TabsContent({ className, ...props }) {
976
+ return /* @__PURE__ */ jsx14(
977
+ TabsPrimitive.Panel,
978
+ {
979
+ "data-slot": "tabs-content",
980
+ className: cn14(Tabs_default.content, className),
981
+ ...props
982
+ }
983
+ );
984
+ }
985
+ export {
986
+ Alert,
987
+ AlertAction,
988
+ AlertDescription,
989
+ AlertTitle,
990
+ Badge,
991
+ Button,
992
+ Card,
993
+ CardAction,
994
+ CardContent,
995
+ CardDescription,
996
+ CardFooter,
997
+ CardHeader,
998
+ CardTitle,
999
+ Checkbox,
1000
+ Dialog,
1001
+ DialogClose,
1002
+ DialogContent,
1003
+ DialogDescription,
1004
+ DialogFooter,
1005
+ DialogHeader,
1006
+ DialogOverlay,
1007
+ DialogPortal,
1008
+ DialogTitle,
1009
+ DialogTrigger,
1010
+ Field,
1011
+ FieldContent,
1012
+ FieldDescription,
1013
+ FieldError,
1014
+ FieldGroup,
1015
+ FieldLabel,
1016
+ FieldLegend,
1017
+ FieldSeparator,
1018
+ FieldSet,
1019
+ FieldTitle,
1020
+ Input,
1021
+ InputGroup,
1022
+ InputGroupAddon,
1023
+ InputGroupButton,
1024
+ InputGroupInput,
1025
+ InputGroupText,
1026
+ InputGroupTextarea,
1027
+ InputOTP,
1028
+ InputOTPGroup,
1029
+ InputOTPSeparator,
1030
+ InputOTPSlot,
1031
+ Label,
1032
+ ProductCard,
1033
+ Separator,
1034
+ Tabs,
1035
+ TabsContent,
1036
+ TabsList,
1037
+ TabsTrigger,
1038
+ Textarea,
1039
+ badgeVariants,
1040
+ buttonVariants
1041
+ };