@kivid/native-components 1.0.0-alpha.15 → 1.0.0-alpha.17

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.
Files changed (67) hide show
  1. package/dist/commonjs/components/ActionButton/assets/class-variants.js.map +1 -1
  2. package/dist/commonjs/components/ActionButton/index.js +35 -48
  3. package/dist/commonjs/components/ActionButton/index.js.map +1 -1
  4. package/dist/commonjs/components/Button/assets/class-variants.js +1 -1
  5. package/dist/commonjs/components/InformationStatus/components/GradientAdd/index.js +115 -60
  6. package/dist/commonjs/components/InformationStatus/components/GradientAdd/index.js.map +1 -1
  7. package/dist/commonjs/components/InformationStatus/components/GradientAlert/index.js +117 -60
  8. package/dist/commonjs/components/InformationStatus/components/GradientAlert/index.js.map +1 -1
  9. package/dist/commonjs/components/InformationStatus/components/GradientCheck/index.js +113 -58
  10. package/dist/commonjs/components/InformationStatus/components/GradientCheck/index.js.map +1 -1
  11. package/dist/commonjs/components/InformationStatus/components/GradientClose/index.js +112 -55
  12. package/dist/commonjs/components/InformationStatus/components/GradientClose/index.js.map +1 -1
  13. package/dist/commonjs/components/InformationStatus/index.js +4 -9
  14. package/dist/commonjs/components/InformationStatus/index.js.map +1 -1
  15. package/dist/commonjs/components/SelectButton/index.js +2 -1
  16. package/dist/commonjs/components/SelectButton/index.js.map +1 -1
  17. package/dist/commonjs/components/TextInput/assets/class-variants.js +2 -2
  18. package/dist/commonjs/components/TextInput/assets/class-variants.js.map +1 -1
  19. package/dist/commonjs/components/TextInput/index.js +1 -1
  20. package/dist/commonjs/components/TextInput/index.js.map +1 -1
  21. package/dist/module/components/ActionButton/assets/class-variants.js.map +1 -1
  22. package/dist/module/components/ActionButton/index.js +35 -30
  23. package/dist/module/components/ActionButton/index.js.map +1 -1
  24. package/dist/module/components/Button/assets/class-variants.js +1 -1
  25. package/dist/module/components/InformationStatus/components/GradientAdd/index.js +113 -59
  26. package/dist/module/components/InformationStatus/components/GradientAdd/index.js.map +1 -1
  27. package/dist/module/components/InformationStatus/components/GradientAlert/index.js +116 -60
  28. package/dist/module/components/InformationStatus/components/GradientAlert/index.js.map +1 -1
  29. package/dist/module/components/InformationStatus/components/GradientCheck/index.js +113 -59
  30. package/dist/module/components/InformationStatus/components/GradientCheck/index.js.map +1 -1
  31. package/dist/module/components/InformationStatus/components/GradientClose/index.js +111 -55
  32. package/dist/module/components/InformationStatus/components/GradientClose/index.js.map +1 -1
  33. package/dist/module/components/InformationStatus/index.js +4 -9
  34. package/dist/module/components/InformationStatus/index.js.map +1 -1
  35. package/dist/module/components/SelectButton/index.js +2 -1
  36. package/dist/module/components/SelectButton/index.js.map +1 -1
  37. package/dist/module/components/TextInput/assets/class-variants.js +2 -2
  38. package/dist/module/components/TextInput/assets/class-variants.js.map +1 -1
  39. package/dist/module/components/TextInput/index.js +1 -1
  40. package/dist/module/components/TextInput/index.js.map +1 -1
  41. package/dist/typescript/components/ActionButton/index.d.ts +0 -1
  42. package/dist/typescript/components/ActionButton/types.d.ts +15 -24
  43. package/dist/typescript/components/InformationStatus/components/GradientAdd/index.d.ts +2 -1
  44. package/dist/typescript/components/InformationStatus/components/GradientAdd/types.d.ts +3 -2
  45. package/dist/typescript/components/InformationStatus/components/GradientAlert/index.d.ts +2 -1
  46. package/dist/typescript/components/InformationStatus/components/GradientAlert/types.d.ts +3 -2
  47. package/dist/typescript/components/InformationStatus/components/GradientCheck/index.d.ts +4 -3
  48. package/dist/typescript/components/InformationStatus/components/GradientCheck/types.d.ts +3 -2
  49. package/dist/typescript/components/InformationStatus/components/GradientClose/index.d.ts +2 -1
  50. package/dist/typescript/components/InformationStatus/components/GradientClose/types.d.ts +3 -2
  51. package/package.json +5 -5
  52. package/src/components/ActionButton/assets/class-variants.ts +3 -12
  53. package/src/components/ActionButton/index.tsx +55 -41
  54. package/src/components/ActionButton/types.ts +15 -24
  55. package/src/components/Button/assets/class-variants.ts +1 -1
  56. package/src/components/InformationStatus/components/GradientAdd/index.tsx +107 -56
  57. package/src/components/InformationStatus/components/GradientAdd/types.ts +3 -2
  58. package/src/components/InformationStatus/components/GradientAlert/index.tsx +116 -62
  59. package/src/components/InformationStatus/components/GradientAlert/types.ts +3 -2
  60. package/src/components/InformationStatus/components/GradientCheck/index.tsx +111 -59
  61. package/src/components/InformationStatus/components/GradientCheck/types.ts +3 -3
  62. package/src/components/InformationStatus/components/GradientClose/index.tsx +106 -53
  63. package/src/components/InformationStatus/components/GradientClose/types.ts +3 -2
  64. package/src/components/InformationStatus/index.tsx +4 -10
  65. package/src/components/SelectButton/index.tsx +1 -0
  66. package/src/components/TextInput/assets/class-variants.ts +2 -2
  67. package/src/components/TextInput/index.tsx +1 -1
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import Svg, {
2
3
  Path,
3
4
  Defs,
@@ -9,73 +10,126 @@ import Svg, {
9
10
  FeGaussianBlur,
10
11
  FeComposite,
11
12
  G,
12
- SvgProps,
13
13
  } from "react-native-svg";
14
14
  import { GradientAlertProps } from "./types";
15
+ import { SizeEnum } from "../../../../enums";
16
+ import { View } from "react-native";
15
17
 
16
18
  export function GradientAlert(props: GradientAlertProps, ref?: React.Ref<Svg>) {
17
- const { size = 24, color = "currentColor" } = props;
19
+ const { size = SizeEnum.MEDIUM, color = "currentColor", style, ...rest } = props;
20
+
21
+ const ICON_CONFIG = {
22
+ [SizeEnum.SMALL]: {
23
+ paths: [
24
+ "M8.00001 2C8.73638 2 9.33334 2.58216 9.33334 3.30028V9.36639C9.33334 10.0845 8.73638 10.6667 8.00001 10.6667C7.26363 10.6667 6.66667 10.0845 6.66667 9.36639V3.30028C6.66667 2.58216 7.26363 2 8.00001 2Z",
25
+ "M8.00001 11.3333C8.73638 11.3333 9.33334 11.9154 9.33334 12.6336V12.6997C9.33334 13.4178 8.73638 14 8.00001 14C7.26363 14 6.66667 13.4178 6.66667 12.6997V12.6336C6.66667 11.9154 7.26363 11.3333 8.00001 11.3333Z",
26
+ ],
27
+ viewBox: "0 0 16 16",
28
+ filter: {
29
+ id: "filter0_i_8151_1867",
30
+ x: "6.66667",
31
+ y: "2",
32
+ width: "3.66667",
33
+ height: "13",
34
+ colorMatrix:
35
+ "0 0 0 0 0.960784 0 0 0 0 0.541176 0 0 0 0 0.239216 0 0 0 0.4 0",
36
+ },
37
+ },
38
+
39
+ [SizeEnum.MEDIUM]: {
40
+ paths: [
41
+ "M12 3C13.1046 3 14 3.87323 14 4.95042V14.0496C14 15.1268 13.1046 16 12 16C10.8954 16 10 15.1268 10 14.0496V4.95042C10 3.87323 10.8954 3 12 3Z",
42
+ "M12 16.9999C13.1046 16.9999 14 17.8732 14 18.9503V19.0495C14 20.1267 13.1046 20.9999 12 20.9999C10.8954 20.9999 10 20.1267 10 19.0495V18.9503C10 17.8732 10.8954 16.9999 12 16.9999Z",
43
+ ],
44
+ viewBox: "0 0 24 24",
45
+ filter: {
46
+ id: "filter0_i_8151_1859",
47
+ x: "10",
48
+ y: "3",
49
+ width: "5",
50
+ height: "18.9999",
51
+ colorMatrix:
52
+ "0 0 0 0 0.960784 0 0 0 0 0.541176 0 0 0 0 0.239216 0 0 0 0.4 0",
53
+ },
54
+ },
55
+
56
+ [SizeEnum.LARGE]: {
57
+ paths: [
58
+ "M16 4C17.4728 4 18.6667 5.16431 18.6667 6.60056V18.7328C18.6667 20.169 17.4728 21.3333 16 21.3333C14.5272 21.3333 13.3333 20.169 13.3333 18.7328V6.60056C13.3333 5.16431 14.5272 4 16 4Z",
59
+ "M16 22.6666C17.4728 22.6666 18.6667 23.8309 18.6667 25.2671V25.3993C18.6667 26.8356 17.4728 27.9999 16 27.9999C14.5272 27.9999 13.3333 26.8356 13.3333 25.3993V25.2671C13.3333 23.8309 14.5272 22.6666 16 22.6666Z",
60
+ ],
61
+ viewBox: "0 0 32 32",
62
+ filter: {
63
+ id: "filter0_i_8151_1869",
64
+ x: "13.3333",
65
+ y: "4",
66
+ width: "6.33333",
67
+ height: "24.9999",
68
+ colorMatrix:
69
+ "0 0 0 0 0.960784 0 0 0 0 0.541176 0 0 0 0 0.239216 0 0 0 0.4 0",
70
+ },
71
+ },
72
+ };
73
+
74
+ const SIZE_MAP = {
75
+ [SizeEnum.SMALL]: 16,
76
+ [SizeEnum.MEDIUM]: 24,
77
+ [SizeEnum.LARGE]: 32,
78
+ };
79
+
80
+ const config = ICON_CONFIG[size] || ICON_CONFIG[SizeEnum.MEDIUM];
81
+ const { paths, viewBox, filter } = config;
82
+ const iconSize = SIZE_MAP[size] || 24;
83
+ const filterId = filter.id;
18
84
 
19
85
  return (
20
- <Svg
21
- viewBox="0 0 16 16"
22
- fill="none"
23
- width={size}
24
- height={size}
25
- color={color}
26
- ref={ref}
27
- {...props}
28
- >
29
- <G filter="url(#filter0_i_3359_12282)">
30
- <Path
31
- fillRule="evenodd"
32
- clipRule="evenodd"
33
- d="M8.00001 2C8.73638 2 9.33334 2.58216 9.33334 3.30028V9.36639C9.33334 10.0845 8.73638 10.6667 8.00001 10.6667C7.26363 10.6667 6.66667 10.0845 6.66667 9.36639V3.30028C6.66667 2.58216 7.26363 2 8.00001 2Z"
34
- fill="currentColor"
35
- />
36
- <Path
37
- fillRule="evenodd"
38
- clipRule="evenodd"
39
- d="M8.00001 11.3333C8.73638 11.3333 9.33334 11.9154 9.33334 12.6336V12.6997C9.33334 13.4178 8.73638 14 8.00001 14C7.26363 14 6.66667 13.4178 6.66667 12.6997V12.6336C6.66667 11.9154 7.26363 11.3333 8.00001 11.3333Z"
40
- fill="currentColor"
41
- />
42
- </G>
43
- <Defs>
44
- <Filter
45
- id="filter0_i_3359_12282"
46
- x="6.66667"
47
- y="2"
48
- width="3.66667"
49
- height="13"
50
- filterUnits="userSpaceOnUse"
51
- >
52
- <FeFlood floodOpacity="0" result="BackgroundImageFix" />
53
- <FeBlend
54
- mode="normal"
55
- in="SourceGraphic"
56
- in2="BackgroundImageFix"
57
- result="shape"
58
- />
59
- <FeColorMatrix
60
- in="SourceAlpha"
61
- type="matrix"
62
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
63
- result="hardAlpha"
64
- />
65
- <FeOffset dx="1" dy="1" />
66
- <FeGaussianBlur stdDeviation="1" />
67
- <FeComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1" />
68
- <FeColorMatrix
69
- type="matrix"
70
- values="0 0 0 0 0.960784 0 0 0 0 0.541176 0 0 0 0 0.239216 0 0 0 0.4 0"
71
- />
72
- <FeBlend
73
- mode="normal"
74
- in2="shape"
75
- result="effect1_innerShadow_3359_12282"
76
- />
77
- </Filter>
78
- </Defs>
79
- </Svg>
86
+ <View style={[{ width: iconSize, height: iconSize }, style]}>
87
+ <Svg
88
+ width="100%"
89
+ height="100%"
90
+ viewBox={viewBox}
91
+ fill="none"
92
+ color={color}
93
+ ref={ref}
94
+ {...rest}
95
+ >
96
+ <G filter={`url(#${filterId})`}>
97
+ {paths.map((d, i) => (
98
+ <Path
99
+ key={i}
100
+ fillRule="evenodd"
101
+ clipRule="evenodd"
102
+ d={d}
103
+ fill="currentColor"
104
+ />
105
+ ))}
106
+ </G>
107
+
108
+ <Defs>
109
+ <Filter
110
+ id={filter.id}
111
+ x={filter.x}
112
+ y={filter.y}
113
+ width={filter.width}
114
+ height={filter.height}
115
+ filterUnits="userSpaceOnUse"
116
+ >
117
+ <FeFlood floodOpacity="0" result="BackgroundImageFix" />
118
+ <FeBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
119
+ <FeColorMatrix
120
+ in="SourceAlpha"
121
+ type="matrix"
122
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
123
+ result="hardAlpha"
124
+ />
125
+ <FeOffset dx="1" dy="1" />
126
+ <FeGaussianBlur stdDeviation="1" />
127
+ <FeComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1" />
128
+ <FeColorMatrix type="matrix" values={filter.colorMatrix} />
129
+ <FeBlend mode="normal" in2="shape" result="effect1_innerShadow" />
130
+ </Filter>
131
+ </Defs>
132
+ </Svg>
133
+ </View>
80
134
  );
81
135
  }
@@ -1,6 +1,7 @@
1
1
  import { SvgProps } from "react-native-svg";
2
+ import { SizeEnum } from "../../../../enums";
2
3
 
3
- export interface GradientAlertProps extends SvgProps {
4
- size?: number;
4
+ export interface GradientAlertProps extends Omit<SvgProps, "width" | "height"> {
5
+ size?: SizeEnum.SMALL | SizeEnum.MEDIUM | SizeEnum.LARGE;
5
6
  color?: string;
6
7
  }
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import Svg, {
2
3
  Path,
3
4
  Defs,
@@ -8,68 +9,119 @@ import Svg, {
8
9
  FeOffset,
9
10
  FeGaussianBlur,
10
11
  FeComposite,
11
- G,
12
- SvgProps,
13
- } from "react-native-svg";
14
- import { GradientCheckProps } from "./types";
12
+ G
13
+ } from 'react-native-svg';
14
+ import { GradientCheckProps } from './types';
15
+ import { SizeEnum } from '../../../../enums';
16
+ import { View } from 'react-native';
15
17
 
16
18
  export function GradientCheck(props: GradientCheckProps, ref?: React.Ref<Svg>) {
17
- const { size = 24, color = "currentColor" } = props;
19
+ const { size = SizeEnum.MEDIUM, color = 'currentColor', style, ...rest } = props;
20
+
21
+ const ICON_CONFIG = {
22
+ [SizeEnum.SMALL]: {
23
+ path: "M12.8985 4.39037C13.4574 4.93089 13.4806 5.83095 12.9504 6.40072L7.97736 11.5567C7.71389 11.8398 7.34787 12.0001 6.96506 12C6.58225 11.9999 6.2163 11.8394 5.95297 11.5562L3.04912 8.40463C2.51919 7.8346 2.54288 6.93454 3.10203 6.3943C3.66118 5.85406 4.54404 5.87821 5.07397 6.44825L6.96589 8.51126L10.9265 4.44334C11.4567 3.87357 12.3396 3.84985 12.8985 4.39037Z",
24
+ viewBox: "0 0 16 16",
25
+ filter: {
26
+ id: "filter0_i_3359_12276",
27
+ x: "0",
28
+ y: "0",
29
+ width: "16",
30
+ height: "16"
31
+ }
32
+ },
33
+ [SizeEnum.MEDIUM]: {
34
+
35
+ path: "M19.3477 6.58556C20.186 7.39633 20.2209 8.74643 19.4256 9.60108L11.966 17.335C11.5708 17.7597 11.0218 18.0001 10.4476 18C9.87337 17.9999 9.32445 17.7591 8.92946 17.3342L4.57368 12.6069C3.77879 11.7519 3.81432 10.4018 4.65304 9.59146C5.49176 8.7811 6.81606 8.81732 7.61095 9.67237L10.4488 12.7669L16.3897 6.66501C17.185 5.81035 18.5094 5.77478 19.3477 6.58556Z",
36
+ viewBox: "0 0 24 24",
37
+ filter: {
38
+ id: "filter0_i_8151_259",
39
+ x: "4",
40
+ y: "6",
41
+ width: "17",
42
+ height: "13",
43
+ },
44
+ },
45
+
46
+ [SizeEnum.LARGE]: {
47
+ path: "M25.7969 8.78074C26.9147 9.86178 26.9612 11.6619 25.9008 12.8014L15.9547 23.1133C15.4278 23.6796 14.6957 24.0002 13.9301 24C13.1645 23.9998 12.4326 23.6789 11.9059 23.1123L6.09823 16.8093C5.03838 15.6692 5.08576 13.8691 6.20406 12.7886C7.32235 11.7081 9.08808 11.7564 10.1479 12.8965L13.9318 17.0225L21.853 8.88667C22.9134 7.74713 24.6791 7.69971 25.7969 8.78074Z",
48
+ viewBox: "0 0 32 32",
49
+ filter: {
50
+ id: "filter0_i_8151_249",
51
+ x: "5.33333",
52
+ y: "8",
53
+ width: "22.3333",
54
+ height: "17",
55
+ },
56
+ },
57
+ };
58
+
59
+ const SIZE_MAP = {
60
+ [SizeEnum.SMALL]: 16,
61
+ [SizeEnum.MEDIUM]: 24,
62
+ [SizeEnum.LARGE]: 32,
63
+ };
64
+
65
+ const config = ICON_CONFIG[size];
66
+ const filterId = config.filter.id;
67
+ const sizeMapped = SIZE_MAP[size];
18
68
 
19
69
  return (
20
- <Svg
21
- viewBox="0 0 16 16"
22
- fill="none"
23
- width={size}
24
- height={size}
25
- color={color}
26
- ref={ref}
27
- {...props}
28
- >
29
- <G filter="url(#filter0_i_3359_12276)">
30
- <Path
31
- fillRule="evenodd"
32
- clipRule="evenodd"
33
- d="M12.8985 4.39037C13.4574 4.93089 13.4806 5.83095 12.9504 6.40072L7.97736 11.5567C7.71389 11.8398 7.34787 12.0001 6.96506 12C6.58225 11.9999 6.2163 11.8394 5.95297 11.5562L3.04912 8.40463C2.51919 7.8346 2.54288 6.93454 3.10203 6.3943C3.66118 5.85406 4.54404 5.87821 5.07397 6.44825L6.96589 8.51126L10.9265 4.44334C11.4567 3.87357 12.3396 3.84985 12.8985 4.39037Z"
34
- fill="currentColor"
35
- />
36
- </G>
37
- <Defs>
38
- <Filter
39
- id="filter0_i_3359_12276"
40
- x="2.66667"
41
- y="4"
42
- width="11.6667"
43
- height="9"
44
- filterUnits="userSpaceOnUse"
45
- >
46
- <FeFlood floodOpacity="0" result="BackgroundImageFix" />
47
- <FeBlend
48
- mode="normal"
49
- in="SourceGraphic"
50
- in2="BackgroundImageFix"
51
- result="shape"
52
- />
53
- <FeColorMatrix
54
- in="SourceAlpha"
55
- type="matrix"
56
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
57
- result="hardAlpha"
58
- />
59
- <FeOffset dx="1" dy="1" />
60
- <FeGaussianBlur stdDeviation="1" />
61
- <FeComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1" />
62
- <FeColorMatrix
63
- type="matrix"
64
- values="0 0 0 0 0.215686 0 0 0 0 0.886275 0 0 0 0 0.439216 0 0 0 0.4 0"
65
- />
66
- <FeBlend
67
- mode="normal"
68
- in2="shape"
69
- result="effect1_innerShadow_3359_12276"
70
+ <View style={[{ width: sizeMapped, height: sizeMapped }, style]}>
71
+ <Svg
72
+ width="100%"
73
+ height="100%"
74
+ viewBox={config.viewBox}
75
+ fill="none"
76
+ color={color}
77
+ ref={ref}
78
+ {...rest}
79
+ >
80
+ <G filter={`url(#${filterId})`}>
81
+ <Path
82
+ fillRule="evenodd"
83
+ clipRule="evenodd"
84
+ d={config.path}
85
+ fill="currentColor"
70
86
  />
71
- </Filter>
72
- </Defs>
73
- </Svg>
87
+ </G>
88
+ <Defs>
89
+ <Filter
90
+ id={filterId}
91
+ x={config.filter.x}
92
+ y={config.filter.y}
93
+ width={config.filter.width}
94
+ height={config.filter.height}
95
+ filterUnits="userSpaceOnUse"
96
+ >
97
+ <FeFlood floodOpacity="0" result="BackgroundImageFix" />
98
+ <FeBlend
99
+ mode="normal"
100
+ in="SourceGraphic"
101
+ in2="BackgroundImageFix"
102
+ result="shape"
103
+ />
104
+ <FeColorMatrix
105
+ in="SourceAlpha"
106
+ type="matrix"
107
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
108
+ result="hardAlpha"
109
+ />
110
+ <FeOffset dx="1" dy="1" />
111
+ <FeGaussianBlur stdDeviation="1" />
112
+ <FeComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1" />
113
+ <FeColorMatrix
114
+ type="matrix"
115
+ values="0 0 0 0 0.215686 0 0 0 0 0.886275 0 0 0 0 0.439216 0 0 0 0.4 0"
116
+ />
117
+ <FeBlend
118
+ mode="normal"
119
+ in2="shape"
120
+ result={`effect1_innerShadow_${filterId}`}
121
+ />
122
+ </Filter>
123
+ </Defs>
124
+ </Svg>
125
+ </View>
74
126
  );
75
- }
127
+ }
@@ -1,6 +1,6 @@
1
1
  import { SvgProps } from "react-native-svg";
2
-
3
- export interface GradientCheckProps extends SvgProps {
4
- size?: number;
2
+ import { SizeEnum } from "../../../../enums";
3
+ export interface GradientCheckProps extends Omit<SvgProps, "width" | "height"> {
4
+ size?: SizeEnum.SMALL | SizeEnum.MEDIUM | SizeEnum.LARGE;
5
5
  color?: string;
6
6
  }
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import Svg, {
2
3
  Path,
3
4
  Defs,
@@ -9,65 +10,117 @@ import Svg, {
9
10
  FeGaussianBlur,
10
11
  FeComposite,
11
12
  G,
12
- SvgProps,
13
13
  } from "react-native-svg";
14
14
  import { GradientCloseProps } from "./types";
15
+ import { SizeEnum } from "../../../../enums";
16
+ import { View } from "react-native";
15
17
 
16
18
  export function GradientClose(props: GradientCloseProps, ref?: React.Ref<Svg>) {
17
- const { size = 24, color = "currentColor" } = props;
19
+ const { size = SizeEnum.MEDIUM, color = "currentColor", style, ...rest } = props;
20
+
21
+ const ICON_CONFIG = {
22
+ [SizeEnum.SMALL]: {
23
+ path: "M12.1996 5.86579C12.7827 5.28276 12.7929 4.34777 12.2226 3.77745C11.6523 3.20709 10.7173 3.21738 10.1342 3.80041L8.02294 5.91172L5.86576 3.75449C5.29541 3.18417 4.36043 3.19442 3.7774 3.77745C3.19439 4.36048 3.18411 5.29547 3.75446 5.86579L5.91166 8.02297L3.80036 10.1343C3.21733 10.7173 3.20705 11.6523 3.7774 12.2227C4.34774 12.793 5.28272 12.7827 5.86576 12.1997L7.97706 10.0884L10.1342 12.2456C10.7046 12.8159 11.6396 12.8056 12.2226 12.2227C12.8056 11.6396 12.8159 10.7046 12.2455 10.1343L10.0883 7.97709L12.1996 5.86579Z",
24
+ viewBox: "0 0 16 16",
25
+ filter: {
26
+ id: "filter0_i_8151_1841",
27
+ x: "3.33333",
28
+ y: "3.33337",
29
+ width: "10.3333",
30
+ height: "10.3334",
31
+ },
32
+ },
33
+ [SizeEnum.MEDIUM]: {
34
+ path: "M18.2995 8.79862C19.174 7.92408 19.1894 6.5216 18.3339 5.66612C17.4784 4.81057 16.0759 4.82601 15.2014 5.70056L12.0344 8.86751L8.79864 5.63167C7.94313 4.77619 6.54065 4.79157 5.6661 5.66612C4.79159 6.54067 4.77618 7.94314 5.63169 8.79862L8.86749 12.0344L5.70054 15.2013C4.826 16.0759 4.81058 17.4784 5.6661 18.3339C6.52162 19.1894 7.92409 19.174 8.79864 18.2995L11.9656 15.1325L15.2014 18.3683C16.0569 19.2238 17.4594 19.2084 18.3339 18.3339C19.2084 17.4594 19.2238 16.0569 18.3683 15.2013L15.1325 11.9656L18.2995 8.79862Z",
35
+ viewBox: "0 0 24 24",
36
+ filter: {
37
+ id: "filter0_i_8151_1845",
38
+ x: "5",
39
+ y: "5",
40
+ width: "15",
41
+ height: "15",
42
+ },
43
+ },
44
+ [SizeEnum.LARGE]: {
45
+ path: "M24.3993 11.7315C25.5653 10.5654 25.5859 8.69543 24.4452 7.55478C23.3045 6.41405 21.4346 6.43464 20.2685 7.60071L16.0459 11.8233L11.7315 7.50886C10.5908 6.36822 8.72087 6.38872 7.55481 7.55478C6.38879 8.72085 6.36824 10.5908 7.50893 11.7315L11.8233 16.0458L7.60073 20.2684C6.43467 21.4345 6.41412 23.3044 7.55481 24.4452C8.69549 25.5858 10.5655 25.5653 11.7315 24.3993L15.9541 20.1767L20.2685 24.491C21.4092 25.6318 23.2791 25.6112 24.4452 24.4452C25.6112 23.2791 25.6318 21.4092 24.4911 20.2684L20.1767 15.9541L24.3993 11.7315Z",
46
+ viewBox: "0 0 32 32",
47
+ filter: {
48
+ id: "filter0_i_8151_1851",
49
+ x: "6.66667",
50
+ y: "6.66663",
51
+ width: "19.6667",
52
+ height: "19.6666",
53
+ },
54
+ },
55
+ };
56
+
57
+ const SIZE_MAP = {
58
+ [SizeEnum.SMALL]: 16,
59
+ [SizeEnum.MEDIUM]: 24,
60
+ [SizeEnum.LARGE]: 32,
61
+ };
62
+
63
+ const config = ICON_CONFIG[size] || ICON_CONFIG[SizeEnum.MEDIUM];
64
+ const filterId = config.filter.id;
65
+ const iconSize = SIZE_MAP[size] || 24;
18
66
 
19
67
  return (
20
- <Svg
21
- viewBox="0 0 16 16"
22
- fill="none"
23
- width={size}
24
- height={size}
25
- color={color}
26
- ref={ref}
27
- {...props}
28
- >
29
- <G filter="url(#filter0_i_3359_12279)">
30
- <Path
31
- d="M12.1996 5.86591C12.7827 5.28288 12.7929 4.3479 12.2226 3.77757C11.6523 3.20721 10.7173 3.2175 10.1342 3.80054L8.02294 5.91184L5.86576 3.75461C5.29541 3.18429 4.36043 3.19454 3.7774 3.77757C3.19439 4.36061 3.18411 5.29559 3.75446 5.86591L5.91166 8.02309L3.80036 10.1344C3.21733 10.7174 3.20705 11.6524 3.7774 12.2228C4.34774 12.7931 5.28272 12.7828 5.86576 12.1998L7.97706 10.0885L10.1342 12.2457C10.7046 12.8161 11.6396 12.8058 12.2226 12.2228C12.8056 11.6397 12.8159 10.7048 12.2455 10.1344L10.0883 7.97721L12.1996 5.86591Z"
32
- fill="currentColor"
33
- />
34
- </G>
35
- <Defs>
36
- <Filter
37
- id="filter0_i_3359_12279"
38
- x="3.33333"
39
- y="3.3335"
40
- width="10.3333"
41
- height="10.3335"
42
- filterUnits="userSpaceOnUse"
43
- >
44
- <FeFlood floodOpacity="0" result="BackgroundImageFix" />
45
- <FeBlend
46
- mode="normal"
47
- in="SourceGraphic"
48
- in2="BackgroundImageFix"
49
- result="shape"
50
- />
51
- <FeColorMatrix
52
- in="SourceAlpha"
53
- type="matrix"
54
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
55
- result="hardAlpha"
68
+ <View style={[{ width: iconSize, height: iconSize }, style]}>
69
+ <Svg
70
+ width="100%"
71
+ height="100%"
72
+ viewBox={config.viewBox}
73
+ fill="none"
74
+ color={color}
75
+ ref={ref}
76
+ {...rest}
77
+ >
78
+ <G filter={`url(#${filterId})`}>
79
+ <Path
80
+ fillRule="evenodd"
81
+ clipRule="evenodd"
82
+ d={config.path}
83
+ fill="currentColor"
56
84
  />
57
- <FeOffset dx="1" dy="1" />
58
- <FeGaussianBlur stdDeviation="1" />
59
- <FeComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1" />
60
- <FeColorMatrix
61
- type="matrix"
62
- values="0 0 0 0 0.898039 0 0 0 0 0.270588 0 0 0 0 0.270588 0 0 0 0.4 0"
63
- />
64
- <FeBlend
65
- mode="normal"
66
- in2="shape"
67
- result="effect1_innerShadow_3359_12279"
68
- />
69
- </Filter>
70
- </Defs>
71
- </Svg>
85
+ </G>
86
+ <Defs>
87
+ <Filter
88
+ id={filterId}
89
+ x={config.filter.x}
90
+ y={config.filter.y}
91
+ width={config.filter.width}
92
+ height={config.filter.height}
93
+ filterUnits="userSpaceOnUse"
94
+ >
95
+ <FeFlood floodOpacity="0" result="BackgroundImageFix" />
96
+ <FeBlend
97
+ mode="normal"
98
+ in="SourceGraphic"
99
+ in2="BackgroundImageFix"
100
+ result="shape"
101
+ />
102
+ <FeColorMatrix
103
+ in="SourceAlpha"
104
+ type="matrix"
105
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
106
+ result="hardAlpha"
107
+ />
108
+ <FeOffset dx="1" dy="1" />
109
+ <FeGaussianBlur stdDeviation="1" />
110
+ <FeComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1" />
111
+ <FeColorMatrix
112
+ type="matrix"
113
+ values="0 0 0 0 0.898039 0 0 0 0 0.270588 0 0 0 0 0.270588 0 0 0 0.4 0"
114
+ />
115
+ <FeBlend
116
+ mode="normal"
117
+ in2="shape"
118
+ result={`effect1_innerShadow_${filterId}`}
119
+ />
120
+ </Filter>
121
+ </Defs>
122
+ </Svg>
123
+ </View>
72
124
  );
73
125
  }
126
+
@@ -1,6 +1,7 @@
1
1
  import { SvgProps } from "react-native-svg";
2
+ import { SizeEnum } from "../../../../enums";
2
3
 
3
- export interface GradientCloseProps extends SvgProps {
4
- size?: number;
4
+ export interface GradientCloseProps extends Omit<SvgProps, "width" | "height"> {
5
+ size?: SizeEnum.SMALL | SizeEnum.MEDIUM | SizeEnum.LARGE;
5
6
  color?: string;
6
7
  }
@@ -20,24 +20,18 @@ export function InformationStatus(props: InformationStatusProps) {
20
20
  style,
21
21
  } = props;
22
22
 
23
- const mappedIconSize = {
24
- [SizeEnum.SMALL]: 16,
25
- [SizeEnum.MEDIUM]: 24,
26
- [SizeEnum.LARGE]: 32,
27
- }[size];
28
-
29
23
  const iconMap = {
30
24
  [InformationStatusOptionsEnum.SUCCESS]: () => (
31
- <GradientCheck size={mappedIconSize} color="#F2F7F7" />
25
+ <GradientCheck size={size} color="#F2F7F7" />
32
26
  ),
33
27
  [InformationStatusOptionsEnum.ERROR]: () => (
34
- <GradientClose size={mappedIconSize} color="#F2F7F7" />
28
+ <GradientClose size={size} color="#F2F7F7" />
35
29
  ),
36
30
  [InformationStatusOptionsEnum.WARNING]: () => (
37
- <GradientAlert size={mappedIconSize} color="#F2F7F7" />
31
+ <GradientAlert size={size} color="#F2F7F7" />
38
32
  ),
39
33
  [InformationStatusOptionsEnum.ADD]: () => (
40
- <GradientAdd size={mappedIconSize} color="#F2F7F7" />
34
+ <GradientAdd size={size} color="#F2F7F7" />
41
35
  ),
42
36
  };
43
37
 
@@ -53,6 +53,7 @@ export function SelectButton(props: SelectButtonProps) {
53
53
  variant={RadioInputVariantEnum.GRAPE}
54
54
  isSelected={isSelected}
55
55
  disabled={disabled}
56
+ className="pointer-events-none"
56
57
  />
57
58
  );
58
59
  }
@@ -44,11 +44,11 @@ export const textInputContentVariants = cva("flex-1 flex-col text-chia-900", {
44
44
  });
45
45
 
46
46
  export const textInputFieldVariants = cva(
47
- "font-nunito-bold text-[16px] leading-[18px] placeholder:text-chia-600 pt-[3px] android:pb-0 android:pl-0",
47
+ "font-nunito-bold text-[16px] leading-[18px] text-chia-900 placeholder:text-chia-600 ios:pt-[3px] android:p-0",
48
48
  {
49
49
  variants: {
50
50
  disabled: {
51
- true: "text-chia-900",
51
+ true: "",
52
52
  false: "",
53
53
  },
54
54
  isValid: {
@@ -113,7 +113,7 @@ export function TextInput({
113
113
  <Typography
114
114
  variant="label_small"
115
115
  weight="600"
116
- className={labelClassName}
116
+ className={merge("text-chia-900", labelClassName)}
117
117
  >
118
118
  {label}:
119
119
  </Typography>