@dafaz-ui/react 3.0.4 → 4.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +227 -5
- package/dist/index.d.ts +227 -5
- package/dist/index.js +153 -27
- package/dist/index.mjs +152 -27
- package/package.json +1 -1
- package/src/components/CheckBox/index.tsx +3 -2
- package/src/components/CheckBox/styles.ts +16 -3
- package/src/components/Radio/RadioItem/index.tsx +3 -2
- package/src/components/Radio/RadioItem/styles.ts +14 -3
- package/src/components/Radio/index.tsx +9 -2
- package/src/components/Radio/styles.ts +6 -1
- package/src/components/Select/index.tsx +36 -0
- package/src/components/Select/styles.ts +83 -0
- package/src/components/TextArea/styles.ts +1 -1
- package/src/index.tsx +1 -0
package/dist/index.js
CHANGED
@@ -64,6 +64,7 @@ __export(src_exports, {
|
|
64
64
|
CheckBox: () => CheckBox,
|
65
65
|
Heading: () => Heading,
|
66
66
|
Radio: () => Radio,
|
67
|
+
Select: () => Select,
|
67
68
|
Text: () => Text,
|
68
69
|
TextArea: () => TextArea,
|
69
70
|
TextInput: () => TextInput,
|
@@ -342,6 +343,10 @@ var CheckBoxUI = styled(Checkbox.Root, {
|
|
342
343
|
"&:hover": {
|
343
344
|
borderColor: "$dafaz600"
|
344
345
|
},
|
346
|
+
"&:disabled": {
|
347
|
+
opacity: 0.5,
|
348
|
+
cursor: "not-allowed"
|
349
|
+
},
|
345
350
|
variants: {
|
346
351
|
size: {
|
347
352
|
lg: {
|
@@ -362,7 +367,7 @@ var CheckBoxUI = styled(Checkbox.Root, {
|
|
362
367
|
}
|
363
368
|
},
|
364
369
|
defaultVariants: {
|
365
|
-
size: "
|
370
|
+
size: "md"
|
366
371
|
}
|
367
372
|
});
|
368
373
|
var slideIn = keyframes({
|
@@ -398,7 +403,7 @@ var CheckBoxIndicator = styled(Checkbox.Indicator, {
|
|
398
403
|
}
|
399
404
|
},
|
400
405
|
defaultVariants: {
|
401
|
-
size: "
|
406
|
+
size: "md"
|
402
407
|
}
|
403
408
|
});
|
404
409
|
var Label = styled("label", {
|
@@ -411,6 +416,12 @@ var Label = styled("label", {
|
|
411
416
|
gap: "$2",
|
412
417
|
alignItems: "center",
|
413
418
|
variants: {
|
419
|
+
disabled: {
|
420
|
+
true: {
|
421
|
+
opacity: 0.5,
|
422
|
+
cursor: "not-allowed"
|
423
|
+
}
|
424
|
+
},
|
414
425
|
size: {
|
415
426
|
lg: {
|
416
427
|
fontSize: "$xl"
|
@@ -424,7 +435,8 @@ var Label = styled("label", {
|
|
424
435
|
}
|
425
436
|
},
|
426
437
|
defaultVariants: {
|
427
|
-
|
438
|
+
disabled: false,
|
439
|
+
size: "md"
|
428
440
|
}
|
429
441
|
});
|
430
442
|
|
@@ -435,14 +447,16 @@ function CheckBox(_a) {
|
|
435
447
|
var _b = _a, {
|
436
448
|
id,
|
437
449
|
label,
|
438
|
-
size
|
450
|
+
size,
|
451
|
+
disabled = false
|
439
452
|
} = _b, props = __objRest(_b, [
|
440
453
|
"id",
|
441
454
|
"label",
|
442
|
-
"size"
|
455
|
+
"size",
|
456
|
+
"disabled"
|
443
457
|
]);
|
444
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Label, { htmlFor: id, size, children: [
|
445
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckBoxUI, __spreadProps(__spreadValues({ id }, props), { size, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckBoxIndicator, { asChild: true, size, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react2.Check, { weight: "bold" }) }) })),
|
458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Label, { disabled, htmlFor: id, size, children: [
|
459
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckBoxUI, __spreadProps(__spreadValues({ disabled, id }, props), { size, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckBoxIndicator, { asChild: true, size, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react2.Check, { weight: "bold" }) }) })),
|
446
460
|
label
|
447
461
|
] });
|
448
462
|
}
|
@@ -491,6 +505,10 @@ var RadioUI = styled(RadioGroup.Root, {
|
|
491
505
|
display: "flex",
|
492
506
|
flexDirection: "column",
|
493
507
|
gap: "$4",
|
508
|
+
"&:disabled": {
|
509
|
+
opacity: 0.5,
|
510
|
+
cursor: "not-allowed"
|
511
|
+
},
|
494
512
|
variants: {
|
495
513
|
size: {
|
496
514
|
lg: {},
|
@@ -499,7 +517,7 @@ var RadioUI = styled(RadioGroup.Root, {
|
|
499
517
|
}
|
500
518
|
},
|
501
519
|
defaultVariants: {
|
502
|
-
size: "
|
520
|
+
size: "md"
|
503
521
|
}
|
504
522
|
});
|
505
523
|
|
@@ -525,6 +543,9 @@ var RadioItemUI = styled(RadioGroup2.Item, {
|
|
525
543
|
alignItems: "center",
|
526
544
|
borderBottom: "2px solid $dafaz600",
|
527
545
|
transition: "border 0.1s linear",
|
546
|
+
"&:disabled": {
|
547
|
+
cursor: "not-allowed"
|
548
|
+
},
|
528
549
|
'&:focus,&[data-state="checked"]': {
|
529
550
|
backgroundColor: "$dafaz600",
|
530
551
|
borderColor: "$dafaz600"
|
@@ -555,7 +576,7 @@ var RadioItemUI = styled(RadioGroup2.Item, {
|
|
555
576
|
}
|
556
577
|
},
|
557
578
|
defaultVariants: {
|
558
|
-
size: "
|
579
|
+
size: "md"
|
559
580
|
}
|
560
581
|
});
|
561
582
|
var slideIn2 = keyframes({
|
@@ -591,7 +612,7 @@ var RadioIndicator = styled(RadioGroup2.Indicator, {
|
|
591
612
|
}
|
592
613
|
},
|
593
614
|
defaultVariants: {
|
594
|
-
size: "
|
615
|
+
size: "md"
|
595
616
|
}
|
596
617
|
});
|
597
618
|
var Label2 = styled("label", {
|
@@ -601,6 +622,12 @@ var Label2 = styled("label", {
|
|
601
622
|
fontWeight: "$regular",
|
602
623
|
cursor: "pointer",
|
603
624
|
variants: {
|
625
|
+
disabled: {
|
626
|
+
true: {
|
627
|
+
opacity: 0.5,
|
628
|
+
cursor: "not-allowed"
|
629
|
+
}
|
630
|
+
},
|
604
631
|
size: {
|
605
632
|
lg: {
|
606
633
|
fontSize: "$xl"
|
@@ -614,7 +641,8 @@ var Label2 = styled("label", {
|
|
614
641
|
}
|
615
642
|
},
|
616
643
|
defaultVariants: {
|
617
|
-
|
644
|
+
disabled: false,
|
645
|
+
size: "md"
|
618
646
|
}
|
619
647
|
});
|
620
648
|
|
@@ -624,15 +652,17 @@ function RadioItem(_a) {
|
|
624
652
|
var _b = _a, {
|
625
653
|
label,
|
626
654
|
id,
|
627
|
-
size
|
655
|
+
size,
|
656
|
+
disabled = false
|
628
657
|
} = _b, props = __objRest(_b, [
|
629
658
|
"label",
|
630
659
|
"id",
|
631
|
-
"size"
|
660
|
+
"size",
|
661
|
+
"disabled"
|
632
662
|
]);
|
633
663
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(RadioItemContainer, { children: [
|
634
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RadioItemUI, __spreadProps(__spreadValues({ id }, props), { size, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RadioIndicator, { asChild: true, size, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react3.Check, { weight: "bold" }) }) })),
|
635
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Label2, { htmlFor: id, size, children: label })
|
664
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RadioItemUI, __spreadProps(__spreadValues({ disabled, id }, props), { size, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RadioIndicator, { asChild: true, size, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react3.Check, { weight: "bold" }) }) })),
|
665
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Label2, { disabled, htmlFor: id, size, children: label })
|
636
666
|
] }, id);
|
637
667
|
}
|
638
668
|
RadioItem.displayName = "RadioItem";
|
@@ -640,21 +670,116 @@ RadioItem.displayName = "RadioItem";
|
|
640
670
|
// src/components/Radio/index.tsx
|
641
671
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
642
672
|
function Radio(_a) {
|
643
|
-
var _b = _a, {
|
644
|
-
|
673
|
+
var _b = _a, {
|
674
|
+
items,
|
675
|
+
size,
|
676
|
+
disabled = false
|
677
|
+
} = _b, props = __objRest(_b, [
|
678
|
+
"items",
|
679
|
+
"size",
|
680
|
+
"disabled"
|
681
|
+
]);
|
682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RadioUI, __spreadProps(__spreadValues({ disabled }, props), { children: items.map((item) => {
|
645
683
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
646
684
|
RadioItem,
|
647
685
|
{
|
648
686
|
id: item.id,
|
649
687
|
label: item.label,
|
650
688
|
value: item.value,
|
651
|
-
size
|
689
|
+
size,
|
690
|
+
disabled
|
652
691
|
}
|
653
692
|
);
|
654
693
|
}) }));
|
655
694
|
}
|
656
695
|
Radio.displayName = "Radio";
|
657
696
|
|
697
|
+
// src/components/Select/styles.ts
|
698
|
+
var SelectUI = styled("select", {
|
699
|
+
gap: "$2",
|
700
|
+
overflow: "hidden",
|
701
|
+
background: "transparent",
|
702
|
+
border: "none",
|
703
|
+
fontFamily: "$app",
|
704
|
+
color: "$white",
|
705
|
+
fontWeight: "$regular",
|
706
|
+
cursor: "pointer",
|
707
|
+
boxSizing: "border-box",
|
708
|
+
borderRadius: "$md",
|
709
|
+
borderBottom: "2px solid $dafaz600",
|
710
|
+
transition: "border 0.2s linear",
|
711
|
+
width: "100%",
|
712
|
+
margin: 0,
|
713
|
+
padding: "$1 $2",
|
714
|
+
"&:focus": {
|
715
|
+
outline: 0,
|
716
|
+
borderBottom: "2px solid $dafaz400"
|
717
|
+
},
|
718
|
+
"&:disabled": {
|
719
|
+
opacity: 0.5,
|
720
|
+
cursor: "not-allowed"
|
721
|
+
},
|
722
|
+
variants: {
|
723
|
+
size: {
|
724
|
+
lg: {
|
725
|
+
fontSize: "$xl"
|
726
|
+
},
|
727
|
+
md: {
|
728
|
+
fontSize: "$lg"
|
729
|
+
},
|
730
|
+
sm: {
|
731
|
+
fontSize: "$md"
|
732
|
+
}
|
733
|
+
}
|
734
|
+
},
|
735
|
+
defaultVariants: {
|
736
|
+
size: "md"
|
737
|
+
}
|
738
|
+
});
|
739
|
+
var OptionUI = styled("option", {
|
740
|
+
backgroundColor: "$gray800",
|
741
|
+
"&.placeholder": {
|
742
|
+
backgroundColor: "$gray400"
|
743
|
+
},
|
744
|
+
variants: {
|
745
|
+
size: {
|
746
|
+
lg: {
|
747
|
+
fontSize: "$xl"
|
748
|
+
},
|
749
|
+
md: {
|
750
|
+
fontSize: "$lg"
|
751
|
+
},
|
752
|
+
sm: {
|
753
|
+
fontSize: "$md"
|
754
|
+
}
|
755
|
+
}
|
756
|
+
},
|
757
|
+
defaultVariants: {
|
758
|
+
size: "md"
|
759
|
+
}
|
760
|
+
});
|
761
|
+
|
762
|
+
// src/components/Select/index.tsx
|
763
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
764
|
+
function Select(_a) {
|
765
|
+
var _b = _a, {
|
766
|
+
size,
|
767
|
+
placeholder,
|
768
|
+
items
|
769
|
+
} = _b, props = __objRest(_b, [
|
770
|
+
"size",
|
771
|
+
"placeholder",
|
772
|
+
"items"
|
773
|
+
]);
|
774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(SelectUI, __spreadProps(__spreadValues({ size }, props), { defaultValue: "", children: [
|
775
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(OptionUI, { className: "placeholder", value: "", children: placeholder }),
|
776
|
+
items.map((item) => {
|
777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(OptionUI, { value: item.value, children: item.label }, item.id);
|
778
|
+
})
|
779
|
+
] }));
|
780
|
+
}
|
781
|
+
Select.displayName = "Select";
|
782
|
+
|
658
783
|
// src/components/Text/styles.ts
|
659
784
|
var TextUI = styled("p", {
|
660
785
|
fontFamily: "$web",
|
@@ -678,7 +803,7 @@ var TextUI = styled("p", {
|
|
678
803
|
});
|
679
804
|
|
680
805
|
// src/components/Text/index.tsx
|
681
|
-
var
|
806
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
682
807
|
function Text(_a) {
|
683
808
|
var _b = _a, {
|
684
809
|
children,
|
@@ -687,7 +812,7 @@ function Text(_a) {
|
|
687
812
|
"children",
|
688
813
|
"size"
|
689
814
|
]);
|
690
|
-
return /* @__PURE__ */ (0,
|
815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TextUI, __spreadProps(__spreadValues({ size }, props), { children }));
|
691
816
|
}
|
692
817
|
Text.displayName = "Text";
|
693
818
|
|
@@ -716,7 +841,7 @@ var TextAreaUI = styled("textarea", {
|
|
716
841
|
cursor: "not-allowed"
|
717
842
|
},
|
718
843
|
"&::placeholder": {
|
719
|
-
fontSize: "$
|
844
|
+
fontSize: "$lg",
|
720
845
|
fontWeight: "$regular",
|
721
846
|
color: "$white",
|
722
847
|
opacity: 0.75
|
@@ -724,14 +849,14 @@ var TextAreaUI = styled("textarea", {
|
|
724
849
|
});
|
725
850
|
|
726
851
|
// src/components/TextArea/index.tsx
|
727
|
-
var
|
852
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
728
853
|
function TextArea(_a) {
|
729
854
|
var _b = _a, {
|
730
855
|
children
|
731
856
|
} = _b, props = __objRest(_b, [
|
732
857
|
"children"
|
733
858
|
]);
|
734
|
-
return /* @__PURE__ */ (0,
|
859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TextAreaUI, __spreadProps(__spreadValues({ rows: 3 }, props), { children }));
|
735
860
|
}
|
736
861
|
TextArea.displayName = "TextArea";
|
737
862
|
|
@@ -800,7 +925,7 @@ var Sufix = styled("span", {
|
|
800
925
|
});
|
801
926
|
|
802
927
|
// src/components/TextInput/index.tsx
|
803
|
-
var
|
928
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
804
929
|
var TextInput = (0, import_react4.forwardRef)(
|
805
930
|
(_a, ref) => {
|
806
931
|
var _b = _a, {
|
@@ -822,9 +947,9 @@ var TextInput = (0, import_react4.forwardRef)(
|
|
822
947
|
}
|
823
948
|
}
|
824
949
|
}
|
825
|
-
return /* @__PURE__ */ (0,
|
826
|
-
/* @__PURE__ */ (0,
|
827
|
-
!hiddenOptional && /* @__PURE__ */ (0,
|
950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(InputContainer, { withShadow, children: [
|
951
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(InputUI, __spreadValues({ ref, onChange: handleOnChange }, props)),
|
952
|
+
!hiddenOptional && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Sufix, { style: { marginLeft: `-${requiredText.length / 2}rem` }, children: requiredText })
|
828
953
|
] });
|
829
954
|
}
|
830
955
|
);
|
@@ -836,6 +961,7 @@ TextInput.displayName = "TextInput";
|
|
836
961
|
CheckBox,
|
837
962
|
Heading,
|
838
963
|
Radio,
|
964
|
+
Select,
|
839
965
|
Text,
|
840
966
|
TextArea,
|
841
967
|
TextInput,
|
package/dist/index.mjs
CHANGED
@@ -294,6 +294,10 @@ var CheckBoxUI = styled(Checkbox.Root, {
|
|
294
294
|
"&:hover": {
|
295
295
|
borderColor: "$dafaz600"
|
296
296
|
},
|
297
|
+
"&:disabled": {
|
298
|
+
opacity: 0.5,
|
299
|
+
cursor: "not-allowed"
|
300
|
+
},
|
297
301
|
variants: {
|
298
302
|
size: {
|
299
303
|
lg: {
|
@@ -314,7 +318,7 @@ var CheckBoxUI = styled(Checkbox.Root, {
|
|
314
318
|
}
|
315
319
|
},
|
316
320
|
defaultVariants: {
|
317
|
-
size: "
|
321
|
+
size: "md"
|
318
322
|
}
|
319
323
|
});
|
320
324
|
var slideIn = keyframes({
|
@@ -350,7 +354,7 @@ var CheckBoxIndicator = styled(Checkbox.Indicator, {
|
|
350
354
|
}
|
351
355
|
},
|
352
356
|
defaultVariants: {
|
353
|
-
size: "
|
357
|
+
size: "md"
|
354
358
|
}
|
355
359
|
});
|
356
360
|
var Label = styled("label", {
|
@@ -363,6 +367,12 @@ var Label = styled("label", {
|
|
363
367
|
gap: "$2",
|
364
368
|
alignItems: "center",
|
365
369
|
variants: {
|
370
|
+
disabled: {
|
371
|
+
true: {
|
372
|
+
opacity: 0.5,
|
373
|
+
cursor: "not-allowed"
|
374
|
+
}
|
375
|
+
},
|
366
376
|
size: {
|
367
377
|
lg: {
|
368
378
|
fontSize: "$xl"
|
@@ -376,7 +386,8 @@ var Label = styled("label", {
|
|
376
386
|
}
|
377
387
|
},
|
378
388
|
defaultVariants: {
|
379
|
-
|
389
|
+
disabled: false,
|
390
|
+
size: "md"
|
380
391
|
}
|
381
392
|
});
|
382
393
|
|
@@ -387,14 +398,16 @@ function CheckBox(_a) {
|
|
387
398
|
var _b = _a, {
|
388
399
|
id,
|
389
400
|
label,
|
390
|
-
size
|
401
|
+
size,
|
402
|
+
disabled = false
|
391
403
|
} = _b, props = __objRest(_b, [
|
392
404
|
"id",
|
393
405
|
"label",
|
394
|
-
"size"
|
406
|
+
"size",
|
407
|
+
"disabled"
|
395
408
|
]);
|
396
|
-
return /* @__PURE__ */ jsxs(Label, { htmlFor: id, size, children: [
|
397
|
-
/* @__PURE__ */ jsx3(CheckBoxUI, __spreadProps(__spreadValues({ id }, props), { size, children: /* @__PURE__ */ jsx3(CheckBoxIndicator, { asChild: true, size, children: /* @__PURE__ */ jsx3(Check, { weight: "bold" }) }) })),
|
409
|
+
return /* @__PURE__ */ jsxs(Label, { disabled, htmlFor: id, size, children: [
|
410
|
+
/* @__PURE__ */ jsx3(CheckBoxUI, __spreadProps(__spreadValues({ disabled, id }, props), { size, children: /* @__PURE__ */ jsx3(CheckBoxIndicator, { asChild: true, size, children: /* @__PURE__ */ jsx3(Check, { weight: "bold" }) }) })),
|
398
411
|
label
|
399
412
|
] });
|
400
413
|
}
|
@@ -443,6 +456,10 @@ var RadioUI = styled(RadioGroup.Root, {
|
|
443
456
|
display: "flex",
|
444
457
|
flexDirection: "column",
|
445
458
|
gap: "$4",
|
459
|
+
"&:disabled": {
|
460
|
+
opacity: 0.5,
|
461
|
+
cursor: "not-allowed"
|
462
|
+
},
|
446
463
|
variants: {
|
447
464
|
size: {
|
448
465
|
lg: {},
|
@@ -451,7 +468,7 @@ var RadioUI = styled(RadioGroup.Root, {
|
|
451
468
|
}
|
452
469
|
},
|
453
470
|
defaultVariants: {
|
454
|
-
size: "
|
471
|
+
size: "md"
|
455
472
|
}
|
456
473
|
});
|
457
474
|
|
@@ -477,6 +494,9 @@ var RadioItemUI = styled(RadioGroup2.Item, {
|
|
477
494
|
alignItems: "center",
|
478
495
|
borderBottom: "2px solid $dafaz600",
|
479
496
|
transition: "border 0.1s linear",
|
497
|
+
"&:disabled": {
|
498
|
+
cursor: "not-allowed"
|
499
|
+
},
|
480
500
|
'&:focus,&[data-state="checked"]': {
|
481
501
|
backgroundColor: "$dafaz600",
|
482
502
|
borderColor: "$dafaz600"
|
@@ -507,7 +527,7 @@ var RadioItemUI = styled(RadioGroup2.Item, {
|
|
507
527
|
}
|
508
528
|
},
|
509
529
|
defaultVariants: {
|
510
|
-
size: "
|
530
|
+
size: "md"
|
511
531
|
}
|
512
532
|
});
|
513
533
|
var slideIn2 = keyframes({
|
@@ -543,7 +563,7 @@ var RadioIndicator = styled(RadioGroup2.Indicator, {
|
|
543
563
|
}
|
544
564
|
},
|
545
565
|
defaultVariants: {
|
546
|
-
size: "
|
566
|
+
size: "md"
|
547
567
|
}
|
548
568
|
});
|
549
569
|
var Label2 = styled("label", {
|
@@ -553,6 +573,12 @@ var Label2 = styled("label", {
|
|
553
573
|
fontWeight: "$regular",
|
554
574
|
cursor: "pointer",
|
555
575
|
variants: {
|
576
|
+
disabled: {
|
577
|
+
true: {
|
578
|
+
opacity: 0.5,
|
579
|
+
cursor: "not-allowed"
|
580
|
+
}
|
581
|
+
},
|
556
582
|
size: {
|
557
583
|
lg: {
|
558
584
|
fontSize: "$xl"
|
@@ -566,7 +592,8 @@ var Label2 = styled("label", {
|
|
566
592
|
}
|
567
593
|
},
|
568
594
|
defaultVariants: {
|
569
|
-
|
595
|
+
disabled: false,
|
596
|
+
size: "md"
|
570
597
|
}
|
571
598
|
});
|
572
599
|
|
@@ -576,15 +603,17 @@ function RadioItem(_a) {
|
|
576
603
|
var _b = _a, {
|
577
604
|
label,
|
578
605
|
id,
|
579
|
-
size
|
606
|
+
size,
|
607
|
+
disabled = false
|
580
608
|
} = _b, props = __objRest(_b, [
|
581
609
|
"label",
|
582
610
|
"id",
|
583
|
-
"size"
|
611
|
+
"size",
|
612
|
+
"disabled"
|
584
613
|
]);
|
585
614
|
return /* @__PURE__ */ jsxs2(RadioItemContainer, { children: [
|
586
|
-
/* @__PURE__ */ jsx5(RadioItemUI, __spreadProps(__spreadValues({ id }, props), { size, children: /* @__PURE__ */ jsx5(RadioIndicator, { asChild: true, size, children: /* @__PURE__ */ jsx5(Check2, { weight: "bold" }) }) })),
|
587
|
-
/* @__PURE__ */ jsx5(Label2, { htmlFor: id, size, children: label })
|
615
|
+
/* @__PURE__ */ jsx5(RadioItemUI, __spreadProps(__spreadValues({ disabled, id }, props), { size, children: /* @__PURE__ */ jsx5(RadioIndicator, { asChild: true, size, children: /* @__PURE__ */ jsx5(Check2, { weight: "bold" }) }) })),
|
616
|
+
/* @__PURE__ */ jsx5(Label2, { disabled, htmlFor: id, size, children: label })
|
588
617
|
] }, id);
|
589
618
|
}
|
590
619
|
RadioItem.displayName = "RadioItem";
|
@@ -592,21 +621,116 @@ RadioItem.displayName = "RadioItem";
|
|
592
621
|
// src/components/Radio/index.tsx
|
593
622
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
594
623
|
function Radio(_a) {
|
595
|
-
var _b = _a, {
|
596
|
-
|
624
|
+
var _b = _a, {
|
625
|
+
items,
|
626
|
+
size,
|
627
|
+
disabled = false
|
628
|
+
} = _b, props = __objRest(_b, [
|
629
|
+
"items",
|
630
|
+
"size",
|
631
|
+
"disabled"
|
632
|
+
]);
|
633
|
+
return /* @__PURE__ */ jsx6(RadioUI, __spreadProps(__spreadValues({ disabled }, props), { children: items.map((item) => {
|
597
634
|
return /* @__PURE__ */ jsx6(
|
598
635
|
RadioItem,
|
599
636
|
{
|
600
637
|
id: item.id,
|
601
638
|
label: item.label,
|
602
639
|
value: item.value,
|
603
|
-
size
|
640
|
+
size,
|
641
|
+
disabled
|
604
642
|
}
|
605
643
|
);
|
606
644
|
}) }));
|
607
645
|
}
|
608
646
|
Radio.displayName = "Radio";
|
609
647
|
|
648
|
+
// src/components/Select/styles.ts
|
649
|
+
var SelectUI = styled("select", {
|
650
|
+
gap: "$2",
|
651
|
+
overflow: "hidden",
|
652
|
+
background: "transparent",
|
653
|
+
border: "none",
|
654
|
+
fontFamily: "$app",
|
655
|
+
color: "$white",
|
656
|
+
fontWeight: "$regular",
|
657
|
+
cursor: "pointer",
|
658
|
+
boxSizing: "border-box",
|
659
|
+
borderRadius: "$md",
|
660
|
+
borderBottom: "2px solid $dafaz600",
|
661
|
+
transition: "border 0.2s linear",
|
662
|
+
width: "100%",
|
663
|
+
margin: 0,
|
664
|
+
padding: "$1 $2",
|
665
|
+
"&:focus": {
|
666
|
+
outline: 0,
|
667
|
+
borderBottom: "2px solid $dafaz400"
|
668
|
+
},
|
669
|
+
"&:disabled": {
|
670
|
+
opacity: 0.5,
|
671
|
+
cursor: "not-allowed"
|
672
|
+
},
|
673
|
+
variants: {
|
674
|
+
size: {
|
675
|
+
lg: {
|
676
|
+
fontSize: "$xl"
|
677
|
+
},
|
678
|
+
md: {
|
679
|
+
fontSize: "$lg"
|
680
|
+
},
|
681
|
+
sm: {
|
682
|
+
fontSize: "$md"
|
683
|
+
}
|
684
|
+
}
|
685
|
+
},
|
686
|
+
defaultVariants: {
|
687
|
+
size: "md"
|
688
|
+
}
|
689
|
+
});
|
690
|
+
var OptionUI = styled("option", {
|
691
|
+
backgroundColor: "$gray800",
|
692
|
+
"&.placeholder": {
|
693
|
+
backgroundColor: "$gray400"
|
694
|
+
},
|
695
|
+
variants: {
|
696
|
+
size: {
|
697
|
+
lg: {
|
698
|
+
fontSize: "$xl"
|
699
|
+
},
|
700
|
+
md: {
|
701
|
+
fontSize: "$lg"
|
702
|
+
},
|
703
|
+
sm: {
|
704
|
+
fontSize: "$md"
|
705
|
+
}
|
706
|
+
}
|
707
|
+
},
|
708
|
+
defaultVariants: {
|
709
|
+
size: "md"
|
710
|
+
}
|
711
|
+
});
|
712
|
+
|
713
|
+
// src/components/Select/index.tsx
|
714
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
715
|
+
function Select(_a) {
|
716
|
+
var _b = _a, {
|
717
|
+
size,
|
718
|
+
placeholder,
|
719
|
+
items
|
720
|
+
} = _b, props = __objRest(_b, [
|
721
|
+
"size",
|
722
|
+
"placeholder",
|
723
|
+
"items"
|
724
|
+
]);
|
725
|
+
return /* @__PURE__ */ jsxs3(SelectUI, __spreadProps(__spreadValues({ size }, props), { defaultValue: "", children: [
|
726
|
+
/* @__PURE__ */ jsx7(OptionUI, { className: "placeholder", value: "", children: placeholder }),
|
727
|
+
items.map((item) => {
|
728
|
+
return /* @__PURE__ */ jsx7(OptionUI, { value: item.value, children: item.label }, item.id);
|
729
|
+
})
|
730
|
+
] }));
|
731
|
+
}
|
732
|
+
Select.displayName = "Select";
|
733
|
+
|
610
734
|
// src/components/Text/styles.ts
|
611
735
|
var TextUI = styled("p", {
|
612
736
|
fontFamily: "$web",
|
@@ -630,7 +754,7 @@ var TextUI = styled("p", {
|
|
630
754
|
});
|
631
755
|
|
632
756
|
// src/components/Text/index.tsx
|
633
|
-
import { jsx as
|
757
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
634
758
|
function Text(_a) {
|
635
759
|
var _b = _a, {
|
636
760
|
children,
|
@@ -639,7 +763,7 @@ function Text(_a) {
|
|
639
763
|
"children",
|
640
764
|
"size"
|
641
765
|
]);
|
642
|
-
return /* @__PURE__ */
|
766
|
+
return /* @__PURE__ */ jsx8(TextUI, __spreadProps(__spreadValues({ size }, props), { children }));
|
643
767
|
}
|
644
768
|
Text.displayName = "Text";
|
645
769
|
|
@@ -668,7 +792,7 @@ var TextAreaUI = styled("textarea", {
|
|
668
792
|
cursor: "not-allowed"
|
669
793
|
},
|
670
794
|
"&::placeholder": {
|
671
|
-
fontSize: "$
|
795
|
+
fontSize: "$lg",
|
672
796
|
fontWeight: "$regular",
|
673
797
|
color: "$white",
|
674
798
|
opacity: 0.75
|
@@ -676,14 +800,14 @@ var TextAreaUI = styled("textarea", {
|
|
676
800
|
});
|
677
801
|
|
678
802
|
// src/components/TextArea/index.tsx
|
679
|
-
import { jsx as
|
803
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
680
804
|
function TextArea(_a) {
|
681
805
|
var _b = _a, {
|
682
806
|
children
|
683
807
|
} = _b, props = __objRest(_b, [
|
684
808
|
"children"
|
685
809
|
]);
|
686
|
-
return /* @__PURE__ */
|
810
|
+
return /* @__PURE__ */ jsx9(TextAreaUI, __spreadProps(__spreadValues({ rows: 3 }, props), { children }));
|
687
811
|
}
|
688
812
|
TextArea.displayName = "TextArea";
|
689
813
|
|
@@ -755,7 +879,7 @@ var Sufix = styled("span", {
|
|
755
879
|
});
|
756
880
|
|
757
881
|
// src/components/TextInput/index.tsx
|
758
|
-
import { jsx as
|
882
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
759
883
|
var TextInput = forwardRef(
|
760
884
|
(_a, ref) => {
|
761
885
|
var _b = _a, {
|
@@ -777,9 +901,9 @@ var TextInput = forwardRef(
|
|
777
901
|
}
|
778
902
|
}
|
779
903
|
}
|
780
|
-
return /* @__PURE__ */
|
781
|
-
/* @__PURE__ */
|
782
|
-
!hiddenOptional && /* @__PURE__ */
|
904
|
+
return /* @__PURE__ */ jsxs4(InputContainer, { withShadow, children: [
|
905
|
+
/* @__PURE__ */ jsx10(InputUI, __spreadValues({ ref, onChange: handleOnChange }, props)),
|
906
|
+
!hiddenOptional && /* @__PURE__ */ jsx10(Sufix, { style: { marginLeft: `-${requiredText.length / 2}rem` }, children: requiredText })
|
783
907
|
] });
|
784
908
|
}
|
785
909
|
);
|
@@ -790,6 +914,7 @@ export {
|
|
790
914
|
CheckBox,
|
791
915
|
Heading,
|
792
916
|
Radio,
|
917
|
+
Select,
|
793
918
|
Text,
|
794
919
|
TextArea,
|
795
920
|
TextInput,
|