@dafaz-ui/react 4.0.2 → 4.0.4

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @dafaz-ui/react@4.0.2 build
2
+ > @dafaz-ui/react@4.0.4 build
3
3
  > tsup src/index.tsx --format esm,cjs --dts --external react
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -8,11 +8,11 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.mjs 19.39 KB
12
- ESM ⚡️ Build success in 38ms
13
- CJS dist/index.js 21.90 KB
14
- CJS ⚡️ Build success in 38ms
11
+ ESM dist/index.mjs 19.57 KB
12
+ ESM ⚡️ Build success in 41ms
13
+ CJS dist/index.js 22.09 KB
14
+ CJS ⚡️ Build success in 41ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 4507ms
17
- DTS dist/index.d.mts 103.71 KB
18
- DTS dist/index.d.ts 103.71 KB
16
+ DTS ⚡️ Build success in 4529ms
17
+ DTS dist/index.d.mts 103.69 KB
18
+ DTS dist/index.d.ts 103.69 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @dafaz-ui/react
2
2
 
3
+ ## 4.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Change feat radio and select field
8
+
9
+ ## 4.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - add feat to select input component
14
+
3
15
  ## 4.0.2
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1097,7 +1097,6 @@ interface Item$1 {
1097
1097
  id: string;
1098
1098
  label: string;
1099
1099
  value: string;
1100
- disabled: boolean;
1101
1100
  }
1102
1101
  interface RadioGroupProps extends RadioUIProps {
1103
1102
  items: Item$1[];
package/dist/index.d.ts CHANGED
@@ -1097,7 +1097,6 @@ interface Item$1 {
1097
1097
  id: string;
1098
1098
  label: string;
1099
1099
  value: string;
1100
- disabled: boolean;
1101
1100
  }
1102
1101
  interface RadioGroupProps extends RadioUIProps {
1103
1102
  items: Item$1[];
package/dist/index.js CHANGED
@@ -331,17 +331,18 @@ var CheckBoxUI = styled(Checkbox.Root, {
331
331
  display: "flex",
332
332
  justifyContent: "center",
333
333
  alignItems: "center",
334
- borderBottom: "2px solid $dafaz600",
335
- transition: "border 0.1s linear",
334
+ transition: "border 0.2s linear",
335
+ border: "2px solid $gray400",
336
336
  '&:focus,&[data-state="checked"]': {
337
337
  backgroundColor: "$dafaz600",
338
338
  borderColor: "$dafaz600"
339
339
  },
340
340
  '&[data-state="unchecked"]': {
341
- backgroundColor: "$gray800"
341
+ backgroundColor: "$gray400",
342
+ opacity: 0.9
342
343
  },
343
344
  "&:hover": {
344
- borderColor: "$dafaz600"
345
+ border: "2px solid $dafaz600"
345
346
  },
346
347
  "&:disabled": {
347
348
  opacity: 0.5,
@@ -350,24 +351,21 @@ var CheckBoxUI = styled(Checkbox.Root, {
350
351
  variants: {
351
352
  size: {
352
353
  lg: {
353
- width: "$7",
354
- height: "$7",
355
- borderBottom: "2px solid $dafaz600"
354
+ width: "$6",
355
+ height: "$6"
356
356
  },
357
357
  md: {
358
358
  width: "$5",
359
- height: "$5",
360
- borderBottom: "1px solid $dafaz600"
359
+ height: "$5"
361
360
  },
362
361
  sm: {
363
362
  width: "$5",
364
- height: "$5",
365
- borderBottom: "0.5px solid $dafaz600"
363
+ height: "$5"
366
364
  }
367
365
  }
368
366
  },
369
367
  defaultVariants: {
370
- size: "md"
368
+ size: "lg"
371
369
  }
372
370
  });
373
371
  var slideIn = keyframes({
@@ -403,7 +401,7 @@ var CheckBoxIndicator = styled(Checkbox.Indicator, {
403
401
  }
404
402
  },
405
403
  defaultVariants: {
406
- size: "md"
404
+ size: "lg"
407
405
  }
408
406
  });
409
407
  var Label = styled("label", {
@@ -413,7 +411,7 @@ var Label = styled("label", {
413
411
  fontWeight: "$regular",
414
412
  cursor: "pointer",
415
413
  display: "flex",
416
- gap: "$2",
414
+ gap: "$3",
417
415
  alignItems: "center",
418
416
  variants: {
419
417
  disabled: {
@@ -436,7 +434,7 @@ var Label = styled("label", {
436
434
  },
437
435
  defaultVariants: {
438
436
  disabled: false,
439
- size: "md"
437
+ size: "lg"
440
438
  }
441
439
  });
442
440
 
@@ -517,7 +515,7 @@ var RadioUI = styled(RadioGroup.Root, {
517
515
  }
518
516
  },
519
517
  defaultVariants: {
520
- size: "md"
518
+ size: "lg"
521
519
  }
522
520
  });
523
521
 
@@ -529,7 +527,7 @@ var RadioGroup2 = __toESM(require("@radix-ui/react-radio-group"));
529
527
  var RadioItemContainer = styled("div", {
530
528
  display: "flex",
531
529
  alignItems: "center",
532
- gap: "$2"
530
+ gap: "$3"
533
531
  });
534
532
  var RadioItemUI = styled(RadioGroup2.Item, {
535
533
  all: "unset",
@@ -541,8 +539,7 @@ var RadioItemUI = styled(RadioGroup2.Item, {
541
539
  display: "flex",
542
540
  justifyContent: "center",
543
541
  alignItems: "center",
544
- borderBottom: "2px solid $dafaz600",
545
- transition: "border 0.1s linear",
542
+ transition: "border 0.2s linear",
546
543
  "&:disabled": {
547
544
  cursor: "not-allowed"
548
545
  },
@@ -551,7 +548,8 @@ var RadioItemUI = styled(RadioGroup2.Item, {
551
548
  borderColor: "$dafaz600"
552
549
  },
553
550
  '&[data-state="unchecked"]': {
554
- backgroundColor: "$gray800"
551
+ backgroundColor: "$gray400",
552
+ border: "2px solid $gray400"
555
553
  },
556
554
  "&:hover": {
557
555
  borderColor: "$dafaz600"
@@ -559,8 +557,8 @@ var RadioItemUI = styled(RadioGroup2.Item, {
559
557
  variants: {
560
558
  size: {
561
559
  lg: {
562
- width: "$7",
563
- height: "$7",
560
+ width: "$6",
561
+ height: "$6",
564
562
  borderBottom: "2px solid $dafaz600"
565
563
  },
566
564
  md: {
@@ -576,7 +574,7 @@ var RadioItemUI = styled(RadioGroup2.Item, {
576
574
  }
577
575
  },
578
576
  defaultVariants: {
579
- size: "md"
577
+ size: "lg"
580
578
  }
581
579
  });
582
580
  var slideIn2 = keyframes({
@@ -612,7 +610,7 @@ var RadioIndicator = styled(RadioGroup2.Indicator, {
612
610
  }
613
611
  },
614
612
  defaultVariants: {
615
- size: "md"
613
+ size: "lg"
616
614
  }
617
615
  });
618
616
  var Label2 = styled("label", {
@@ -642,7 +640,7 @@ var Label2 = styled("label", {
642
640
  },
643
641
  defaultVariants: {
644
642
  disabled: false,
645
- size: "md"
643
+ size: "lg"
646
644
  }
647
645
  });
648
646
 
@@ -710,7 +708,7 @@ var SelectUI = styled("select", {
710
708
  transition: "border 0.2s linear",
711
709
  width: "100%",
712
710
  margin: 0,
713
- padding: "$1 $2",
711
+ padding: "$1 $1",
714
712
  "&:focus": {
715
713
  outline: 0,
716
714
  borderBottom: "2px solid $dafaz400"
@@ -760,6 +758,7 @@ var OptionUI = styled("option", {
760
758
  });
761
759
 
762
760
  // src/components/Select/index.tsx
761
+ var import_react4 = require("react");
763
762
  var import_jsx_runtime7 = require("react/jsx-runtime");
764
763
  function Select(_a) {
765
764
  var _b = _a, {
@@ -771,12 +770,28 @@ function Select(_a) {
771
770
  "placeholder",
772
771
  "items"
773
772
  ]);
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);
773
+ const [value, setValue] = (0, import_react4.useState)("");
774
+ function handleSelect(event) {
775
+ setValue(() => {
776
+ return event.target.value;
777
+ });
778
+ }
779
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
780
+ SelectUI,
781
+ __spreadProps(__spreadValues({
782
+ size
783
+ }, props), {
784
+ value,
785
+ onChange: handleSelect,
786
+ style: { opacity: value != "" ? 1 : 0.75 },
787
+ children: [
788
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(OptionUI, { className: "placeholder", value: "", children: placeholder }),
789
+ items.map((item) => {
790
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(OptionUI, { value: item.value, children: item.label }, item.id);
791
+ })
792
+ ]
778
793
  })
779
- ] }));
794
+ );
780
795
  }
781
796
  Select.displayName = "Select";
782
797
 
@@ -861,7 +876,7 @@ function TextArea(_a) {
861
876
  TextArea.displayName = "TextArea";
862
877
 
863
878
  // src/components/TextInput/index.tsx
864
- var import_react4 = require("react");
879
+ var import_react5 = require("react");
865
880
 
866
881
  // src/components/TextInput/styles.ts
867
882
  var InputContainer = styled("div", {
@@ -926,7 +941,7 @@ var Sufix = styled("span", {
926
941
 
927
942
  // src/components/TextInput/index.tsx
928
943
  var import_jsx_runtime10 = require("react/jsx-runtime");
929
- var TextInput = (0, import_react4.forwardRef)(
944
+ var TextInput = (0, import_react5.forwardRef)(
930
945
  (_a, ref) => {
931
946
  var _b = _a, {
932
947
  withShadow = false,
@@ -939,7 +954,7 @@ var TextInput = (0, import_react4.forwardRef)(
939
954
  "requiredText",
940
955
  "id"
941
956
  ]);
942
- const [hiddenOptional, setHiddenOptional] = (0, import_react4.useState)(required);
957
+ const [hiddenOptional, setHiddenOptional] = (0, import_react5.useState)(required);
943
958
  function handleOnChange(event) {
944
959
  if (!required) {
945
960
  if (event.target.value === "") {
package/dist/index.mjs CHANGED
@@ -282,17 +282,18 @@ var CheckBoxUI = styled(Checkbox.Root, {
282
282
  display: "flex",
283
283
  justifyContent: "center",
284
284
  alignItems: "center",
285
- borderBottom: "2px solid $dafaz600",
286
- transition: "border 0.1s linear",
285
+ transition: "border 0.2s linear",
286
+ border: "2px solid $gray400",
287
287
  '&:focus,&[data-state="checked"]': {
288
288
  backgroundColor: "$dafaz600",
289
289
  borderColor: "$dafaz600"
290
290
  },
291
291
  '&[data-state="unchecked"]': {
292
- backgroundColor: "$gray800"
292
+ backgroundColor: "$gray400",
293
+ opacity: 0.9
293
294
  },
294
295
  "&:hover": {
295
- borderColor: "$dafaz600"
296
+ border: "2px solid $dafaz600"
296
297
  },
297
298
  "&:disabled": {
298
299
  opacity: 0.5,
@@ -301,24 +302,21 @@ var CheckBoxUI = styled(Checkbox.Root, {
301
302
  variants: {
302
303
  size: {
303
304
  lg: {
304
- width: "$7",
305
- height: "$7",
306
- borderBottom: "2px solid $dafaz600"
305
+ width: "$6",
306
+ height: "$6"
307
307
  },
308
308
  md: {
309
309
  width: "$5",
310
- height: "$5",
311
- borderBottom: "1px solid $dafaz600"
310
+ height: "$5"
312
311
  },
313
312
  sm: {
314
313
  width: "$5",
315
- height: "$5",
316
- borderBottom: "0.5px solid $dafaz600"
314
+ height: "$5"
317
315
  }
318
316
  }
319
317
  },
320
318
  defaultVariants: {
321
- size: "md"
319
+ size: "lg"
322
320
  }
323
321
  });
324
322
  var slideIn = keyframes({
@@ -354,7 +352,7 @@ var CheckBoxIndicator = styled(Checkbox.Indicator, {
354
352
  }
355
353
  },
356
354
  defaultVariants: {
357
- size: "md"
355
+ size: "lg"
358
356
  }
359
357
  });
360
358
  var Label = styled("label", {
@@ -364,7 +362,7 @@ var Label = styled("label", {
364
362
  fontWeight: "$regular",
365
363
  cursor: "pointer",
366
364
  display: "flex",
367
- gap: "$2",
365
+ gap: "$3",
368
366
  alignItems: "center",
369
367
  variants: {
370
368
  disabled: {
@@ -387,7 +385,7 @@ var Label = styled("label", {
387
385
  },
388
386
  defaultVariants: {
389
387
  disabled: false,
390
- size: "md"
388
+ size: "lg"
391
389
  }
392
390
  });
393
391
 
@@ -468,7 +466,7 @@ var RadioUI = styled(RadioGroup.Root, {
468
466
  }
469
467
  },
470
468
  defaultVariants: {
471
- size: "md"
469
+ size: "lg"
472
470
  }
473
471
  });
474
472
 
@@ -480,7 +478,7 @@ import * as RadioGroup2 from "@radix-ui/react-radio-group";
480
478
  var RadioItemContainer = styled("div", {
481
479
  display: "flex",
482
480
  alignItems: "center",
483
- gap: "$2"
481
+ gap: "$3"
484
482
  });
485
483
  var RadioItemUI = styled(RadioGroup2.Item, {
486
484
  all: "unset",
@@ -492,8 +490,7 @@ var RadioItemUI = styled(RadioGroup2.Item, {
492
490
  display: "flex",
493
491
  justifyContent: "center",
494
492
  alignItems: "center",
495
- borderBottom: "2px solid $dafaz600",
496
- transition: "border 0.1s linear",
493
+ transition: "border 0.2s linear",
497
494
  "&:disabled": {
498
495
  cursor: "not-allowed"
499
496
  },
@@ -502,7 +499,8 @@ var RadioItemUI = styled(RadioGroup2.Item, {
502
499
  borderColor: "$dafaz600"
503
500
  },
504
501
  '&[data-state="unchecked"]': {
505
- backgroundColor: "$gray800"
502
+ backgroundColor: "$gray400",
503
+ border: "2px solid $gray400"
506
504
  },
507
505
  "&:hover": {
508
506
  borderColor: "$dafaz600"
@@ -510,8 +508,8 @@ var RadioItemUI = styled(RadioGroup2.Item, {
510
508
  variants: {
511
509
  size: {
512
510
  lg: {
513
- width: "$7",
514
- height: "$7",
511
+ width: "$6",
512
+ height: "$6",
515
513
  borderBottom: "2px solid $dafaz600"
516
514
  },
517
515
  md: {
@@ -527,7 +525,7 @@ var RadioItemUI = styled(RadioGroup2.Item, {
527
525
  }
528
526
  },
529
527
  defaultVariants: {
530
- size: "md"
528
+ size: "lg"
531
529
  }
532
530
  });
533
531
  var slideIn2 = keyframes({
@@ -563,7 +561,7 @@ var RadioIndicator = styled(RadioGroup2.Indicator, {
563
561
  }
564
562
  },
565
563
  defaultVariants: {
566
- size: "md"
564
+ size: "lg"
567
565
  }
568
566
  });
569
567
  var Label2 = styled("label", {
@@ -593,7 +591,7 @@ var Label2 = styled("label", {
593
591
  },
594
592
  defaultVariants: {
595
593
  disabled: false,
596
- size: "md"
594
+ size: "lg"
597
595
  }
598
596
  });
599
597
 
@@ -661,7 +659,7 @@ var SelectUI = styled("select", {
661
659
  transition: "border 0.2s linear",
662
660
  width: "100%",
663
661
  margin: 0,
664
- padding: "$1 $2",
662
+ padding: "$1 $1",
665
663
  "&:focus": {
666
664
  outline: 0,
667
665
  borderBottom: "2px solid $dafaz400"
@@ -711,6 +709,7 @@ var OptionUI = styled("option", {
711
709
  });
712
710
 
713
711
  // src/components/Select/index.tsx
712
+ import { useState } from "react";
714
713
  import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
715
714
  function Select(_a) {
716
715
  var _b = _a, {
@@ -722,12 +721,28 @@ function Select(_a) {
722
721
  "placeholder",
723
722
  "items"
724
723
  ]);
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);
724
+ const [value, setValue] = useState("");
725
+ function handleSelect(event) {
726
+ setValue(() => {
727
+ return event.target.value;
728
+ });
729
+ }
730
+ return /* @__PURE__ */ jsxs3(
731
+ SelectUI,
732
+ __spreadProps(__spreadValues({
733
+ size
734
+ }, props), {
735
+ value,
736
+ onChange: handleSelect,
737
+ style: { opacity: value != "" ? 1 : 0.75 },
738
+ children: [
739
+ /* @__PURE__ */ jsx7(OptionUI, { className: "placeholder", value: "", children: placeholder }),
740
+ items.map((item) => {
741
+ return /* @__PURE__ */ jsx7(OptionUI, { value: item.value, children: item.label }, item.id);
742
+ })
743
+ ]
729
744
  })
730
- ] }));
745
+ );
731
746
  }
732
747
  Select.displayName = "Select";
733
748
 
@@ -814,7 +829,7 @@ TextArea.displayName = "TextArea";
814
829
  // src/components/TextInput/index.tsx
815
830
  import {
816
831
  forwardRef,
817
- useState
832
+ useState as useState2
818
833
  } from "react";
819
834
 
820
835
  // src/components/TextInput/styles.ts
@@ -893,7 +908,7 @@ var TextInput = forwardRef(
893
908
  "requiredText",
894
909
  "id"
895
910
  ]);
896
- const [hiddenOptional, setHiddenOptional] = useState(required);
911
+ const [hiddenOptional, setHiddenOptional] = useState2(required);
897
912
  function handleOnChange(event) {
898
913
  if (!required) {
899
914
  if (event.target.value === "") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dafaz-ui/react",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -21,7 +21,6 @@
21
21
  "@types/react-dom": "^18.3.1",
22
22
  "eslint-config-prettier": "^9.1.0",
23
23
  "prettier": "^3.3.3",
24
- "react": "^18.3.1",
25
24
  "tsup": "^8.3.5",
26
25
  "typescript": "^5.6.3"
27
26
  },
@@ -29,6 +28,7 @@
29
28
  "@phosphor-icons/react": "^2.1.7",
30
29
  "@radix-ui/react-checkbox": "^1.1.2",
31
30
  "@radix-ui/react-radio-group": "^1.2.1",
32
- "@stitches/react": "^1.2.8"
31
+ "@stitches/react": "^1.2.8",
32
+ "react": "^18.3.1"
33
33
  }
34
34
  }
@@ -12,8 +12,8 @@ export const CheckBoxUI = styled(Checkbox.Root, {
12
12
  display: 'flex',
13
13
  justifyContent: 'center',
14
14
  alignItems: 'center',
15
- borderBottom: '2px solid $dafaz600',
16
- transition: 'border 0.1s linear',
15
+ transition: 'border 0.2s linear',
16
+ border: '2px solid $gray400',
17
17
 
18
18
  '&:focus,&[data-state="checked"]': {
19
19
  backgroundColor: '$dafaz600',
@@ -21,11 +21,12 @@ export const CheckBoxUI = styled(Checkbox.Root, {
21
21
  },
22
22
 
23
23
  '&[data-state="unchecked"]': {
24
- backgroundColor: '$gray800',
24
+ backgroundColor: '$gray400',
25
+ opacity: 0.9,
25
26
  },
26
27
 
27
28
  '&:hover': {
28
- borderColor: '$dafaz600',
29
+ border: '2px solid $dafaz600',
29
30
  },
30
31
 
31
32
  '&:disabled': {
@@ -36,24 +37,21 @@ export const CheckBoxUI = styled(Checkbox.Root, {
36
37
  variants: {
37
38
  size: {
38
39
  lg: {
39
- width: '$7',
40
- height: '$7',
41
- borderBottom: '2px solid $dafaz600',
40
+ width: '$6',
41
+ height: '$6',
42
42
  },
43
43
  md: {
44
44
  width: '$5',
45
45
  height: '$5',
46
- borderBottom: '1px solid $dafaz600',
47
46
  },
48
47
  sm: {
49
48
  width: '$5',
50
49
  height: '$5',
51
- borderBottom: '0.5px solid $dafaz600',
52
50
  },
53
51
  },
54
52
  },
55
53
  defaultVariants: {
56
- size: 'md',
54
+ size: 'lg',
57
55
  },
58
56
  })
59
57
 
@@ -95,7 +93,7 @@ export const CheckBoxIndicator = styled(Checkbox.Indicator, {
95
93
  },
96
94
  },
97
95
  defaultVariants: {
98
- size: 'md',
96
+ size: 'lg',
99
97
  },
100
98
  })
101
99
 
@@ -107,7 +105,7 @@ export const Label = styled('label', {
107
105
  cursor: 'pointer',
108
106
 
109
107
  display: 'flex',
110
- gap: '$2',
108
+ gap: '$3',
111
109
  alignItems: 'center',
112
110
 
113
111
  variants: {
@@ -131,7 +129,7 @@ export const Label = styled('label', {
131
129
  },
132
130
  defaultVariants: {
133
131
  disabled: false,
134
- size: 'md',
132
+ size: 'lg',
135
133
  },
136
134
  })
137
135
 
@@ -5,7 +5,7 @@ import * as RadioGroup from '@radix-ui/react-radio-group'
5
5
  export const RadioItemContainer = styled('div', {
6
6
  display: 'flex',
7
7
  alignItems: 'center',
8
- gap: '$2',
8
+ gap: '$3',
9
9
  })
10
10
 
11
11
  export const RadioItemUI = styled(RadioGroup.Item, {
@@ -18,8 +18,7 @@ export const RadioItemUI = styled(RadioGroup.Item, {
18
18
  display: 'flex',
19
19
  justifyContent: 'center',
20
20
  alignItems: 'center',
21
- borderBottom: '2px solid $dafaz600',
22
- transition: 'border 0.1s linear',
21
+ transition: 'border 0.2s linear',
23
22
 
24
23
  '&:disabled': {
25
24
  cursor: 'not-allowed',
@@ -31,7 +30,8 @@ export const RadioItemUI = styled(RadioGroup.Item, {
31
30
  },
32
31
 
33
32
  '&[data-state="unchecked"]': {
34
- backgroundColor: '$gray800',
33
+ backgroundColor: '$gray400',
34
+ border: '2px solid $gray400',
35
35
  },
36
36
 
37
37
  '&:hover': {
@@ -41,8 +41,8 @@ export const RadioItemUI = styled(RadioGroup.Item, {
41
41
  variants: {
42
42
  size: {
43
43
  lg: {
44
- width: '$7',
45
- height: '$7',
44
+ width: '$6',
45
+ height: '$6',
46
46
  borderBottom: '2px solid $dafaz600',
47
47
  },
48
48
  md: {
@@ -58,7 +58,7 @@ export const RadioItemUI = styled(RadioGroup.Item, {
58
58
  },
59
59
  },
60
60
  defaultVariants: {
61
- size: 'md',
61
+ size: 'lg',
62
62
  },
63
63
  })
64
64
 
@@ -100,7 +100,7 @@ export const RadioIndicator = styled(RadioGroup.Indicator, {
100
100
  },
101
101
  },
102
102
  defaultVariants: {
103
- size: 'md',
103
+ size: 'lg',
104
104
  },
105
105
  })
106
106
 
@@ -132,7 +132,7 @@ export const Label = styled('label', {
132
132
  },
133
133
  defaultVariants: {
134
134
  disabled: false,
135
- size: 'md',
135
+ size: 'lg',
136
136
  },
137
137
  })
138
138
 
@@ -5,7 +5,6 @@ interface Item {
5
5
  id: string
6
6
  label: string
7
7
  value: string
8
- disabled: boolean
9
8
  }
10
9
 
11
10
  interface RadioGroupProps extends RadioUIProps {
@@ -21,7 +21,7 @@ export const RadioUI = styled(RadioGroup.Root, {
21
21
  },
22
22
  },
23
23
  defaultVariants: {
24
- size: 'md',
24
+ size: 'lg',
25
25
  },
26
26
  })
27
27
 
@@ -1,5 +1,7 @@
1
1
  import { SelectUI, SelectUIProps, OptionUI } from './styles'
2
2
 
3
+ import { ChangeEvent, useState } from 'react'
4
+
3
5
  interface Item {
4
6
  id: string
5
7
  label: string
@@ -17,8 +19,22 @@ export function Select({
17
19
  items,
18
20
  ...props
19
21
  }: SelectUIProps & SelectProps) {
22
+ const [value, setValue] = useState('')
23
+
24
+ function handleSelect(event: ChangeEvent<HTMLSelectElement>) {
25
+ setValue(() => {
26
+ return event.target.value
27
+ })
28
+ }
29
+
20
30
  return (
21
- <SelectUI size={size} {...props} defaultValue="">
31
+ <SelectUI
32
+ size={size}
33
+ {...props}
34
+ value={value}
35
+ onChange={handleSelect}
36
+ style={{ opacity: value != '' ? 1 : 0.75 }}
37
+ >
22
38
  <OptionUI className="placeholder" value="">
23
39
  {placeholder}
24
40
  </OptionUI>
@@ -20,7 +20,7 @@ export const SelectUI = styled('select', {
20
20
 
21
21
  width: '100%',
22
22
  margin: 0,
23
- padding: '$1 $2',
23
+ padding: '$1 $1',
24
24
 
25
25
  '&:focus': {
26
26
  outline: 0,