@kivid/native-components 1.0.0-alpha.16 → 1.0.0-alpha.18
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/commonjs/components/Button/assets/class-variants.js +1 -1
- package/dist/commonjs/components/InformationStatus/components/GradientAdd/index.js +115 -60
- package/dist/commonjs/components/InformationStatus/components/GradientAdd/index.js.map +1 -1
- package/dist/commonjs/components/InformationStatus/components/GradientAlert/index.js +117 -60
- package/dist/commonjs/components/InformationStatus/components/GradientAlert/index.js.map +1 -1
- package/dist/commonjs/components/InformationStatus/components/GradientCheck/index.js +113 -58
- package/dist/commonjs/components/InformationStatus/components/GradientCheck/index.js.map +1 -1
- package/dist/commonjs/components/InformationStatus/components/GradientClose/index.js +112 -55
- package/dist/commonjs/components/InformationStatus/components/GradientClose/index.js.map +1 -1
- package/dist/commonjs/components/InformationStatus/index.js +4 -9
- package/dist/commonjs/components/InformationStatus/index.js.map +1 -1
- package/dist/commonjs/components/SelectButton/index.js +2 -1
- package/dist/commonjs/components/SelectButton/index.js.map +1 -1
- package/dist/commonjs/components/TextInput/assets/class-variants.js +2 -2
- package/dist/commonjs/components/TextInput/assets/class-variants.js.map +1 -1
- package/dist/commonjs/components/TextInput/index.js +1 -1
- package/dist/commonjs/components/TextInput/index.js.map +1 -1
- package/dist/commonjs/components/Typography/assets/class-variants.js +15 -15
- package/dist/commonjs/components/Typography/assets/class-variants.js.map +1 -1
- package/dist/module/components/Button/assets/class-variants.js +1 -1
- package/dist/module/components/InformationStatus/components/GradientAdd/index.js +113 -59
- package/dist/module/components/InformationStatus/components/GradientAdd/index.js.map +1 -1
- package/dist/module/components/InformationStatus/components/GradientAlert/index.js +116 -60
- package/dist/module/components/InformationStatus/components/GradientAlert/index.js.map +1 -1
- package/dist/module/components/InformationStatus/components/GradientCheck/index.js +113 -59
- package/dist/module/components/InformationStatus/components/GradientCheck/index.js.map +1 -1
- package/dist/module/components/InformationStatus/components/GradientClose/index.js +111 -55
- package/dist/module/components/InformationStatus/components/GradientClose/index.js.map +1 -1
- package/dist/module/components/InformationStatus/index.js +4 -9
- package/dist/module/components/InformationStatus/index.js.map +1 -1
- package/dist/module/components/SelectButton/index.js +2 -1
- package/dist/module/components/SelectButton/index.js.map +1 -1
- package/dist/module/components/TextInput/assets/class-variants.js +2 -2
- package/dist/module/components/TextInput/assets/class-variants.js.map +1 -1
- package/dist/module/components/TextInput/index.js +1 -1
- package/dist/module/components/TextInput/index.js.map +1 -1
- package/dist/module/components/Typography/assets/class-variants.js +15 -15
- package/dist/module/components/Typography/assets/class-variants.js.map +1 -1
- package/dist/typescript/components/InformationStatus/components/GradientAdd/index.d.ts +2 -1
- package/dist/typescript/components/InformationStatus/components/GradientAdd/types.d.ts +3 -2
- package/dist/typescript/components/InformationStatus/components/GradientAlert/index.d.ts +2 -1
- package/dist/typescript/components/InformationStatus/components/GradientAlert/types.d.ts +3 -2
- package/dist/typescript/components/InformationStatus/components/GradientCheck/index.d.ts +4 -3
- package/dist/typescript/components/InformationStatus/components/GradientCheck/types.d.ts +3 -2
- package/dist/typescript/components/InformationStatus/components/GradientClose/index.d.ts +2 -1
- package/dist/typescript/components/InformationStatus/components/GradientClose/types.d.ts +3 -2
- package/package.json +5 -5
- package/src/components/Button/assets/class-variants.ts +1 -1
- package/src/components/InformationStatus/components/GradientAdd/index.tsx +107 -56
- package/src/components/InformationStatus/components/GradientAdd/types.ts +3 -2
- package/src/components/InformationStatus/components/GradientAlert/index.tsx +116 -62
- package/src/components/InformationStatus/components/GradientAlert/types.ts +3 -2
- package/src/components/InformationStatus/components/GradientCheck/index.tsx +111 -59
- package/src/components/InformationStatus/components/GradientCheck/types.ts +3 -3
- package/src/components/InformationStatus/components/GradientClose/index.tsx +106 -53
- package/src/components/InformationStatus/components/GradientClose/types.ts +3 -2
- package/src/components/InformationStatus/index.tsx +4 -10
- package/src/components/SelectButton/index.tsx +1 -0
- package/src/components/TextInput/assets/class-variants.ts +2 -2
- package/src/components/TextInput/index.tsx +1 -1
- package/src/components/Typography/assets/class-variants.ts +15 -15
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SvgProps } from "react-native-svg";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { SizeEnum } from "../../../../enums";
|
|
3
|
+
export interface GradientAddProps extends Omit<SvgProps, "width" | "height"> {
|
|
4
|
+
size?: SizeEnum.SMALL | SizeEnum.MEDIUM | SizeEnum.LARGE;
|
|
4
5
|
color?: string;
|
|
5
6
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import Svg from "react-native-svg";
|
|
2
3
|
import { GradientAlertProps } from "./types";
|
|
3
|
-
export declare function GradientAlert(props: GradientAlertProps, ref?: React.Ref<Svg>):
|
|
4
|
+
export declare function GradientAlert(props: GradientAlertProps, ref?: React.Ref<Svg>): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SvgProps } from "react-native-svg";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { SizeEnum } from "../../../../enums";
|
|
3
|
+
export interface GradientAlertProps extends Omit<SvgProps, "width" | "height"> {
|
|
4
|
+
size?: SizeEnum.SMALL | SizeEnum.MEDIUM | SizeEnum.LARGE;
|
|
4
5
|
color?: string;
|
|
5
6
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Svg from 'react-native-svg';
|
|
3
|
+
import { GradientCheckProps } from './types';
|
|
4
|
+
export declare function GradientCheck(props: GradientCheckProps, ref?: React.Ref<Svg>): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SvgProps } from "react-native-svg";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { SizeEnum } from "../../../../enums";
|
|
3
|
+
export interface GradientCheckProps extends Omit<SvgProps, "width" | "height"> {
|
|
4
|
+
size?: SizeEnum.SMALL | SizeEnum.MEDIUM | SizeEnum.LARGE;
|
|
4
5
|
color?: string;
|
|
5
6
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import Svg from "react-native-svg";
|
|
2
3
|
import { GradientCloseProps } from "./types";
|
|
3
|
-
export declare function GradientClose(props: GradientCloseProps, ref?: React.Ref<Svg>):
|
|
4
|
+
export declare function GradientClose(props: GradientCloseProps, ref?: React.Ref<Svg>): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SvgProps } from "react-native-svg";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { SizeEnum } from "../../../../enums";
|
|
3
|
+
export interface GradientCloseProps extends Omit<SvgProps, "width" | "height"> {
|
|
4
|
+
size?: SizeEnum.SMALL | SizeEnum.MEDIUM | SizeEnum.LARGE;
|
|
4
5
|
color?: string;
|
|
5
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kivid/native-components",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.18",
|
|
4
4
|
"description": "A React Native component library for the Butterfly Design System.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"react": "19.0.0",
|
|
80
80
|
"ts-jest": "^29.2.5",
|
|
81
81
|
"typescript": "~5.8.3",
|
|
82
|
-
"@kivid/
|
|
83
|
-
"@kivid/
|
|
82
|
+
"@kivid/icons": "1.0.0-alpha.18",
|
|
83
|
+
"@kivid/tailwind-preset": "1.0.0-alpha.18"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"@lottiefiles/dotlottie-react": "^0.15.1",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"react-native-svg": "^15.12.0",
|
|
91
91
|
"react-native": "0.79.5",
|
|
92
92
|
"react": "19.0.0",
|
|
93
|
-
"@kivid/
|
|
94
|
-
"@kivid/
|
|
93
|
+
"@kivid/icons": "1.0.0-alpha.18",
|
|
94
|
+
"@kivid/tailwind-preset": "1.0.0-alpha.18"
|
|
95
95
|
},
|
|
96
96
|
"eslintIgnore": [
|
|
97
97
|
"node_modules/",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import Svg, {
|
|
2
3
|
Path,
|
|
3
4
|
Defs,
|
|
@@ -11,64 +12,114 @@ import Svg, {
|
|
|
11
12
|
G,
|
|
12
13
|
} from "react-native-svg";
|
|
13
14
|
import { GradientAddProps } from "./types";
|
|
15
|
+
import { SizeEnum } from "../../../../enums";
|
|
16
|
+
import { View } from "react-native";
|
|
14
17
|
|
|
15
|
-
export
|
|
16
|
-
const { size =
|
|
18
|
+
export const GradientAdd = React.forwardRef((props: GradientAddProps, ref?: React.Ref<Svg>) => {
|
|
19
|
+
const { size = SizeEnum.MEDIUM, color = "currentColor", style, ...rest } = props;
|
|
20
|
+
|
|
21
|
+
const ICON_CONFIG = {
|
|
22
|
+
[SizeEnum.SMALL]: {
|
|
23
|
+
path: "M7.99999 2.66663C8.72036 2.66663 9.30434 3.26358 9.30434 3.99996V6.66663H12.029C12.7493 6.66663 13.3333 7.26358 13.3333 7.99996C13.3333 8.73634 12.7493 9.33329 12.029 9.33329H9.30434V12C9.30434 12.7363 8.72036 13.3333 7.99999 13.3333C7.27962 13.3333 6.69564 12.7363 6.69564 12V9.33329H3.971C3.25063 9.33329 2.66666 8.73634 2.66666 7.99996C2.66666 7.26358 3.25063 6.66663 3.971 6.66663H6.69564V3.99996C6.69564 3.26358 7.27962 2.66663 7.99999 2.66663Z",
|
|
24
|
+
viewBox: "0 0 16 16",
|
|
25
|
+
filter: {
|
|
26
|
+
id: "filter0_i_8151_1877",
|
|
27
|
+
x: "2.66666",
|
|
28
|
+
y: "2.66663",
|
|
29
|
+
width: "11.6667",
|
|
30
|
+
height: "11.6666",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
[SizeEnum.MEDIUM]: {
|
|
34
|
+
path: "M12 4C13.0806 4 13.9565 4.89543 13.9565 6V10H18.0435C19.124 10 20 10.8954 20 12C20 13.1046 19.124 14 18.0435 14H13.9565V18C13.9565 19.1046 13.0806 20 12 20C10.9194 20 10.0435 19.1046 10.0435 18V14H5.95652C4.87596 14 4 13.1046 4 12C4 10.8954 4.87596 10 5.95652 10H10.0435V6C10.0435 4.89543 10.9194 4 12 4Z",
|
|
35
|
+
viewBox: "0 0 24 24",
|
|
36
|
+
filter: {
|
|
37
|
+
id: "filter0_i_8151_1873",
|
|
38
|
+
x: "4",
|
|
39
|
+
y: "4",
|
|
40
|
+
width: "17",
|
|
41
|
+
height: "17",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
[SizeEnum.LARGE]: {
|
|
45
|
+
path: "M16 5.33337C17.4408 5.33337 18.6087 6.52728 18.6087 8.00004V13.3334H24.058C25.4987 13.3334 26.6667 14.5273 26.6667 16C26.6667 17.4728 25.4987 18.6667 24.058 18.6667H18.6087V24C18.6087 25.4728 17.4408 26.6667 16 26.6667C14.5593 26.6667 13.3913 25.4728 13.3913 24V18.6667H7.94204C6.5013 18.6667 5.33334 17.4728 5.33334 16C5.33334 14.5273 6.5013 13.3334 7.94204 13.3334H13.3913V8.00004C13.3913 6.52728 14.5593 5.33337 16 5.33337Z",
|
|
46
|
+
viewBox: "0 0 32 32",
|
|
47
|
+
filter: {
|
|
48
|
+
id: "filter0_i_8151_1881",
|
|
49
|
+
x: "5.33334",
|
|
50
|
+
y: "5.33337",
|
|
51
|
+
width: "22.3333",
|
|
52
|
+
height: "22.3334",
|
|
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;
|
|
17
66
|
|
|
18
67
|
return (
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</G>
|
|
36
|
-
<Defs>
|
|
37
|
-
<Filter
|
|
38
|
-
id="filter0_i_3359_12285"
|
|
39
|
-
x="2.66666"
|
|
40
|
-
y="2.6665"
|
|
41
|
-
width="11.6667"
|
|
42
|
-
height="11.6665"
|
|
43
|
-
filterUnits="userSpaceOnUse"
|
|
44
|
-
>
|
|
45
|
-
<FeFlood floodOpacity="0" result="BackgroundImageFix" />
|
|
46
|
-
<FeBlend
|
|
47
|
-
mode="normal"
|
|
48
|
-
in="SourceGraphic"
|
|
49
|
-
in2="BackgroundImageFix"
|
|
50
|
-
result="shape"
|
|
51
|
-
/>
|
|
52
|
-
<FeColorMatrix
|
|
53
|
-
in="SourceAlpha"
|
|
54
|
-
type="matrix"
|
|
55
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
|
|
56
|
-
result="hardAlpha"
|
|
57
|
-
/>
|
|
58
|
-
<FeOffset dx="1" dy="1" />
|
|
59
|
-
<FeGaussianBlur stdDeviation="1" />
|
|
60
|
-
<FeComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1" />
|
|
61
|
-
<FeColorMatrix
|
|
62
|
-
type="matrix"
|
|
63
|
-
values="0 0 0 0 0.447059 0 0 0 0 0.403922 0 0 0 0 0.894118 0 0 0 0.4 0"
|
|
64
|
-
/>
|
|
65
|
-
<FeBlend
|
|
66
|
-
mode="normal"
|
|
67
|
-
in2="shape"
|
|
68
|
-
result="effect1_innerShadow_3359_12285"
|
|
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"
|
|
69
84
|
/>
|
|
70
|
-
</
|
|
71
|
-
|
|
72
|
-
|
|
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.447059 0 0 0 0 0.403922 0 0 0 0 0.894118 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>
|
|
73
124
|
);
|
|
74
|
-
}
|
|
125
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SvgProps } from "react-native-svg";
|
|
2
|
+
import { SizeEnum } from "../../../../enums";
|
|
2
3
|
|
|
3
|
-
export interface GradientAddProps extends SvgProps {
|
|
4
|
-
size?:
|
|
4
|
+
export interface GradientAddProps 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,
|
|
@@ -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 =
|
|
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
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
result="
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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?:
|
|
4
|
+
export interface GradientAlertProps extends Omit<SvgProps, "width" | "height"> {
|
|
5
|
+
size?: SizeEnum.SMALL | SizeEnum.MEDIUM | SizeEnum.LARGE;
|
|
5
6
|
color?: string;
|
|
6
7
|
}
|