@vuonweb/react-native 0.1.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/LICENSE +21 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +88 -0
- package/dist/index.js.map +1 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 icon-builder contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as react_native_svg from 'react-native-svg';
|
|
3
|
+
import react_native_svg__default, { SvgProps } from 'react-native-svg';
|
|
4
|
+
|
|
5
|
+
type IconProps = SvgProps & {
|
|
6
|
+
size?: number;
|
|
7
|
+
color?: string;
|
|
8
|
+
strokeWidth?: number;
|
|
9
|
+
};
|
|
10
|
+
type IconRef = React.ElementRef<typeof react_native_svg__default>;
|
|
11
|
+
/** Cùng thiết kế với BaseIcon web: `color` set cả fill lẫn stroke, icon
|
|
12
|
+
* component tự vô hiệu 1 trong 2 qua static prop truyền trước {...props}. */
|
|
13
|
+
declare const BaseIcon: React.ForwardRefExoticComponent<SvgProps & {
|
|
14
|
+
size?: number;
|
|
15
|
+
color?: string;
|
|
16
|
+
strokeWidth?: number;
|
|
17
|
+
} & React.RefAttributes<react_native_svg__default>>;
|
|
18
|
+
|
|
19
|
+
declare const Home: React.ForwardRefExoticComponent<react_native_svg.SvgProps & {
|
|
20
|
+
size?: number;
|
|
21
|
+
color?: string;
|
|
22
|
+
strokeWidth?: number;
|
|
23
|
+
} & React.RefAttributes<react_native_svg.default>>;
|
|
24
|
+
|
|
25
|
+
declare const Search: React.ForwardRefExoticComponent<react_native_svg.SvgProps & {
|
|
26
|
+
size?: number;
|
|
27
|
+
color?: string;
|
|
28
|
+
strokeWidth?: number;
|
|
29
|
+
} & React.RefAttributes<react_native_svg.default>>;
|
|
30
|
+
|
|
31
|
+
declare const Trashed: React.ForwardRefExoticComponent<react_native_svg.SvgProps & {
|
|
32
|
+
size?: number;
|
|
33
|
+
color?: string;
|
|
34
|
+
strokeWidth?: number;
|
|
35
|
+
} & React.RefAttributes<react_native_svg.default>>;
|
|
36
|
+
|
|
37
|
+
declare const User: React.ForwardRefExoticComponent<react_native_svg.SvgProps & {
|
|
38
|
+
size?: number;
|
|
39
|
+
color?: string;
|
|
40
|
+
strokeWidth?: number;
|
|
41
|
+
} & React.RefAttributes<react_native_svg.default>>;
|
|
42
|
+
|
|
43
|
+
declare const HomeSolid: React.ForwardRefExoticComponent<react_native_svg.SvgProps & {
|
|
44
|
+
size?: number;
|
|
45
|
+
color?: string;
|
|
46
|
+
strokeWidth?: number;
|
|
47
|
+
} & React.RefAttributes<react_native_svg.default>>;
|
|
48
|
+
|
|
49
|
+
export { BaseIcon, Home, HomeSolid, type IconProps, type IconRef, Search, Trashed, User };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// src/Icon.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import Svg from "react-native-svg";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
var BaseIcon = React.forwardRef(
|
|
6
|
+
({ size = 24, color = "currentColor", strokeWidth = 2, children, ...rest }, ref) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
Svg,
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
width: size,
|
|
12
|
+
height: size,
|
|
13
|
+
fill: color,
|
|
14
|
+
stroke: color,
|
|
15
|
+
strokeWidth,
|
|
16
|
+
strokeLinecap: "round",
|
|
17
|
+
strokeLinejoin: "round",
|
|
18
|
+
...rest,
|
|
19
|
+
children
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
BaseIcon.displayName = "BaseIcon";
|
|
25
|
+
|
|
26
|
+
// src/Home.tsx
|
|
27
|
+
import * as React2 from "react";
|
|
28
|
+
import { Path } from "react-native-svg";
|
|
29
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
30
|
+
var Home = React2.forwardRef((props, ref) => {
|
|
31
|
+
return /* @__PURE__ */ jsxs(BaseIcon, { ref, viewBox: "0 0 24 24", fill: "none", ...props, children: [
|
|
32
|
+
/* @__PURE__ */ jsx2(Path, { d: "M3 10.5 12 3l9 7.5" }),
|
|
33
|
+
/* @__PURE__ */ jsx2(Path, { d: "M5 9.5V21h14V9.5" }),
|
|
34
|
+
/* @__PURE__ */ jsx2(Path, { d: "M9 21v-6h6v6" })
|
|
35
|
+
] });
|
|
36
|
+
});
|
|
37
|
+
Home.displayName = "Home";
|
|
38
|
+
|
|
39
|
+
// src/Search.tsx
|
|
40
|
+
import * as React3 from "react";
|
|
41
|
+
import { Circle, Path as Path2 } from "react-native-svg";
|
|
42
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
43
|
+
var Search = React3.forwardRef((props, ref) => {
|
|
44
|
+
return /* @__PURE__ */ jsxs2(BaseIcon, { ref, viewBox: "0 0 24 24", fill: "none", ...props, children: [
|
|
45
|
+
/* @__PURE__ */ jsx3(Circle, { cx: "11", cy: "11", r: "7" }),
|
|
46
|
+
/* @__PURE__ */ jsx3(Path2, { d: "m21 21-4.35-4.35" })
|
|
47
|
+
] });
|
|
48
|
+
});
|
|
49
|
+
Search.displayName = "Search";
|
|
50
|
+
|
|
51
|
+
// src/Trashed.tsx
|
|
52
|
+
import * as React4 from "react";
|
|
53
|
+
import { Path as Path3 } from "react-native-svg";
|
|
54
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
55
|
+
var Trashed = React4.forwardRef((props, ref) => {
|
|
56
|
+
return /* @__PURE__ */ jsx4(BaseIcon, { ref, viewBox: "0 0 24 24", fill: "none", ...props, children: /* @__PURE__ */ jsx4(Path3, { d: "M21 5.98c-3.33-.33-6.68-.5-10.02-.5q-2.97 0-5.94.3L3 5.98m5.5-1.01.22-1.31C8.88 2.71 9 2 10.69 2h2.62c1.69 0 1.82.75 1.97 1.67l.22 1.3m3.35 4.17-.65 10.07C18.09 20.78 18 22 15.21 22H8.79C6 22 5.91 20.78 5.8 19.21L5.15 9.14m5.18 7.36h3.33m-4.16-4h5" }) });
|
|
57
|
+
});
|
|
58
|
+
Trashed.displayName = "Trashed";
|
|
59
|
+
|
|
60
|
+
// src/User.tsx
|
|
61
|
+
import * as React5 from "react";
|
|
62
|
+
import { Circle as Circle2, Path as Path4 } from "react-native-svg";
|
|
63
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
64
|
+
var User = React5.forwardRef((props, ref) => {
|
|
65
|
+
return /* @__PURE__ */ jsxs3(BaseIcon, { ref, viewBox: "0 0 24 24", fill: "none", ...props, children: [
|
|
66
|
+
/* @__PURE__ */ jsx5(Circle2, { cx: "12", cy: "8", r: "4" }),
|
|
67
|
+
/* @__PURE__ */ jsx5(Path4, { d: "M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8" })
|
|
68
|
+
] });
|
|
69
|
+
});
|
|
70
|
+
User.displayName = "User";
|
|
71
|
+
|
|
72
|
+
// src/HomeSolid.tsx
|
|
73
|
+
import * as React6 from "react";
|
|
74
|
+
import { Path as Path5 } from "react-native-svg";
|
|
75
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
76
|
+
var HomeSolid = React6.forwardRef((props, ref) => {
|
|
77
|
+
return /* @__PURE__ */ jsx6(BaseIcon, { ref, viewBox: "0 0 24 24", stroke: "none", ...props, children: /* @__PURE__ */ jsx6(Path5, { d: "m12 3-9 7.5V21h6v-6h6v6h6V10.5z" }) });
|
|
78
|
+
});
|
|
79
|
+
HomeSolid.displayName = "HomeSolid";
|
|
80
|
+
export {
|
|
81
|
+
BaseIcon,
|
|
82
|
+
Home,
|
|
83
|
+
HomeSolid,
|
|
84
|
+
Search,
|
|
85
|
+
Trashed,
|
|
86
|
+
User
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Icon.tsx","../src/Home.tsx","../src/Search.tsx","../src/Trashed.tsx","../src/User.tsx","../src/HomeSolid.tsx"],"sourcesContent":["import * as React from \"react\";\nimport Svg, { type SvgProps } from \"react-native-svg\";\n\nexport type IconProps = SvgProps & {\n size?: number;\n color?: string;\n strokeWidth?: number;\n};\n\nexport type IconRef = React.ElementRef<typeof Svg>;\n\n/** Cùng thiết kế với BaseIcon web: `color` set cả fill lẫn stroke, icon\n * component tự vô hiệu 1 trong 2 qua static prop truyền trước {...props}. */\nexport const BaseIcon = React.forwardRef<IconRef, IconProps>(\n ({ size = 24, color = \"currentColor\", strokeWidth = 2, children, ...rest }, ref) => {\n return (\n <Svg\n ref={ref}\n width={size}\n height={size}\n fill={color}\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n {...rest}\n >\n {children}\n </Svg>\n );\n },\n);\n\nBaseIcon.displayName = \"BaseIcon\";\n","/**\n * File này được sinh tự động bởi icon-builder. Không sửa tay.\n * @generated\n */\n\nimport * as React from \"react\";\nimport { Path } from \"react-native-svg\";\nimport { BaseIcon, type IconProps, type IconRef } from \"./Icon.js\";\n\nexport const Home = React.forwardRef<IconRef, IconProps>((props, ref) => {\n return (\n <BaseIcon ref={ref} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <Path d=\"M3 10.5 12 3l9 7.5\" />\n <Path d=\"M5 9.5V21h14V9.5\" />\n <Path d=\"M9 21v-6h6v6\" />\n </BaseIcon>\n );\n});\n\nHome.displayName = \"Home\";\n","/**\n * File này được sinh tự động bởi icon-builder. Không sửa tay.\n * @generated\n */\n\nimport * as React from \"react\";\nimport { Circle, Path } from \"react-native-svg\";\nimport { BaseIcon, type IconProps, type IconRef } from \"./Icon.js\";\n\nexport const Search = React.forwardRef<IconRef, IconProps>((props, ref) => {\n return (\n <BaseIcon ref={ref} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <Circle cx=\"11\" cy=\"11\" r=\"7\" />\n <Path d=\"m21 21-4.35-4.35\" />\n </BaseIcon>\n );\n});\n\nSearch.displayName = \"Search\";\n","/**\n * File này được sinh tự động bởi icon-builder. Không sửa tay.\n * @generated\n */\n\nimport * as React from \"react\";\nimport { Path } from \"react-native-svg\";\nimport { BaseIcon, type IconProps, type IconRef } from \"./Icon.js\";\n\nexport const Trashed = React.forwardRef<IconRef, IconProps>((props, ref) => {\n return (\n <BaseIcon ref={ref} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <Path d=\"M21 5.98c-3.33-.33-6.68-.5-10.02-.5q-2.97 0-5.94.3L3 5.98m5.5-1.01.22-1.31C8.88 2.71 9 2 10.69 2h2.62c1.69 0 1.82.75 1.97 1.67l.22 1.3m3.35 4.17-.65 10.07C18.09 20.78 18 22 15.21 22H8.79C6 22 5.91 20.78 5.8 19.21L5.15 9.14m5.18 7.36h3.33m-4.16-4h5\" />\n </BaseIcon>\n );\n});\n\nTrashed.displayName = \"Trashed\";\n","/**\n * File này được sinh tự động bởi icon-builder. Không sửa tay.\n * @generated\n */\n\nimport * as React from \"react\";\nimport { Circle, Path } from \"react-native-svg\";\nimport { BaseIcon, type IconProps, type IconRef } from \"./Icon.js\";\n\nexport const User = React.forwardRef<IconRef, IconProps>((props, ref) => {\n return (\n <BaseIcon ref={ref} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <Circle cx=\"12\" cy=\"8\" r=\"4\" />\n <Path d=\"M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8\" />\n </BaseIcon>\n );\n});\n\nUser.displayName = \"User\";\n","/**\n * File này được sinh tự động bởi icon-builder. Không sửa tay.\n * @generated\n */\n\nimport * as React from \"react\";\nimport { Path } from \"react-native-svg\";\nimport { BaseIcon, type IconProps, type IconRef } from \"./Icon.js\";\n\nexport const HomeSolid = React.forwardRef<IconRef, IconProps>((props, ref) => {\n return (\n <BaseIcon ref={ref} viewBox=\"0 0 24 24\" stroke=\"none\" {...props}>\n <Path d=\"m12 3-9 7.5V21h6v-6h6v6h6V10.5z\" />\n </BaseIcon>\n );\n});\n\nHomeSolid.displayName = \"HomeSolid\";\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,OAAO,SAA4B;AAe7B;AAHC,IAAM,WAAiB;AAAA,EAC5B,CAAC,EAAE,OAAO,IAAI,QAAQ,gBAAgB,cAAc,GAAG,UAAU,GAAG,KAAK,GAAG,QAAQ;AAClF,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAO;AAAA,QACP,QAAQ;AAAA,Q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E,OAAAC,MADF,QAAAC,aAAA;AAFG,IAAM,OAAa,kBAA+B,CAAC,OAAO,QAAQ;AACvE,SACE,gBAAAA,MAAC,YAAS,KAAU,SAAQ,aAAY,MAAK,QAAQ,GAAG,OACtD;AAAA,oBAAAD,KAACE,SAAA,EAAO,IAAG,MAAK,IAAG,KAAI,GAAE,KAAI;AAAA,IAC7B,gBAAAF,KAACG,OAAA,EAAK,GAAE,mCAAkC;AAAA,KAC5C;AAEJ,CAAC;AAED,KAAK,cAAc;;;ACbnB,YAAYC,YAAW;AACvB,SAAS,QAAAC,aAAY;AAMf,gBAAAC,YAAA;AAHC,IAAM,YAAkB,kBAA+B,CAAC,OAAO,QAAQ;AAC5E,SACE,gBAAAA,KAAC,YAAS,KAAU,SAAQ,aAAY,QAAO,QAAQ,GAAG,OACxD,0BAAAA,KAACC,OAAA,EAAK,GAAE,mCAAkC,GAC5C;AAEJ,CAAC;AAED,UAAU,cAAc;","names":["React","jsx","React","Path","jsx","jsxs","Path","React","Path","jsx","Path","React","Circle","Path","jsx","jsxs","Circle","Path","React","Path","jsx","Path"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vuonweb/react-native",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Icon components sinh tự động từ icons/ cho React Native (react-native-svg).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"private": false,
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"react": ">=18",
|
|
25
|
+
"react-native-svg": ">=13"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/react": "^18.3.5",
|
|
29
|
+
"react": "^18.3.1",
|
|
30
|
+
"react-native-svg": "^15.6.0",
|
|
31
|
+
"tsup": "^8.3.0",
|
|
32
|
+
"typescript": "^5.6.2"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsup",
|
|
36
|
+
"dev": "tsup --watch",
|
|
37
|
+
"typecheck": "tsc --noEmit"
|
|
38
|
+
}
|
|
39
|
+
}
|