@kivid/native-components 1.0.0-alpha.16 → 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 (56) hide show
  1. package/dist/commonjs/components/Button/assets/class-variants.js +1 -1
  2. package/dist/commonjs/components/InformationStatus/components/GradientAdd/index.js +115 -60
  3. package/dist/commonjs/components/InformationStatus/components/GradientAdd/index.js.map +1 -1
  4. package/dist/commonjs/components/InformationStatus/components/GradientAlert/index.js +117 -60
  5. package/dist/commonjs/components/InformationStatus/components/GradientAlert/index.js.map +1 -1
  6. package/dist/commonjs/components/InformationStatus/components/GradientCheck/index.js +113 -58
  7. package/dist/commonjs/components/InformationStatus/components/GradientCheck/index.js.map +1 -1
  8. package/dist/commonjs/components/InformationStatus/components/GradientClose/index.js +112 -55
  9. package/dist/commonjs/components/InformationStatus/components/GradientClose/index.js.map +1 -1
  10. package/dist/commonjs/components/InformationStatus/index.js +4 -9
  11. package/dist/commonjs/components/InformationStatus/index.js.map +1 -1
  12. package/dist/commonjs/components/SelectButton/index.js +2 -1
  13. package/dist/commonjs/components/SelectButton/index.js.map +1 -1
  14. package/dist/commonjs/components/TextInput/assets/class-variants.js +2 -2
  15. package/dist/commonjs/components/TextInput/assets/class-variants.js.map +1 -1
  16. package/dist/commonjs/components/TextInput/index.js +1 -1
  17. package/dist/commonjs/components/TextInput/index.js.map +1 -1
  18. package/dist/module/components/Button/assets/class-variants.js +1 -1
  19. package/dist/module/components/InformationStatus/components/GradientAdd/index.js +113 -59
  20. package/dist/module/components/InformationStatus/components/GradientAdd/index.js.map +1 -1
  21. package/dist/module/components/InformationStatus/components/GradientAlert/index.js +116 -60
  22. package/dist/module/components/InformationStatus/components/GradientAlert/index.js.map +1 -1
  23. package/dist/module/components/InformationStatus/components/GradientCheck/index.js +113 -59
  24. package/dist/module/components/InformationStatus/components/GradientCheck/index.js.map +1 -1
  25. package/dist/module/components/InformationStatus/components/GradientClose/index.js +111 -55
  26. package/dist/module/components/InformationStatus/components/GradientClose/index.js.map +1 -1
  27. package/dist/module/components/InformationStatus/index.js +4 -9
  28. package/dist/module/components/InformationStatus/index.js.map +1 -1
  29. package/dist/module/components/SelectButton/index.js +2 -1
  30. package/dist/module/components/SelectButton/index.js.map +1 -1
  31. package/dist/module/components/TextInput/assets/class-variants.js +2 -2
  32. package/dist/module/components/TextInput/assets/class-variants.js.map +1 -1
  33. package/dist/module/components/TextInput/index.js +1 -1
  34. package/dist/module/components/TextInput/index.js.map +1 -1
  35. package/dist/typescript/components/InformationStatus/components/GradientAdd/index.d.ts +2 -1
  36. package/dist/typescript/components/InformationStatus/components/GradientAdd/types.d.ts +3 -2
  37. package/dist/typescript/components/InformationStatus/components/GradientAlert/index.d.ts +2 -1
  38. package/dist/typescript/components/InformationStatus/components/GradientAlert/types.d.ts +3 -2
  39. package/dist/typescript/components/InformationStatus/components/GradientCheck/index.d.ts +4 -3
  40. package/dist/typescript/components/InformationStatus/components/GradientCheck/types.d.ts +3 -2
  41. package/dist/typescript/components/InformationStatus/components/GradientClose/index.d.ts +2 -1
  42. package/dist/typescript/components/InformationStatus/components/GradientClose/types.d.ts +3 -2
  43. package/package.json +5 -5
  44. package/src/components/Button/assets/class-variants.ts +1 -1
  45. package/src/components/InformationStatus/components/GradientAdd/index.tsx +107 -56
  46. package/src/components/InformationStatus/components/GradientAdd/types.ts +3 -2
  47. package/src/components/InformationStatus/components/GradientAlert/index.tsx +116 -62
  48. package/src/components/InformationStatus/components/GradientAlert/types.ts +3 -2
  49. package/src/components/InformationStatus/components/GradientCheck/index.tsx +111 -59
  50. package/src/components/InformationStatus/components/GradientCheck/types.ts +3 -3
  51. package/src/components/InformationStatus/components/GradientClose/index.tsx +106 -53
  52. package/src/components/InformationStatus/components/GradientClose/types.ts +3 -2
  53. package/src/components/InformationStatus/index.tsx +4 -10
  54. package/src/components/SelectButton/index.tsx +1 -0
  55. package/src/components/TextInput/assets/class-variants.ts +2 -2
  56. 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,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>