@impulse-ui-native/icon 1.0.9 → 2.0.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/dist/chunk-2BUPSB7O.js +0 -0
- package/dist/chunk-2LYPKVWR.js +37831 -0
- package/dist/chunk-4N6ARYHU.js +13728 -0
- package/dist/chunk-76BZFF6O.js +13728 -0
- package/dist/chunk-CA2FKFQ7.js +0 -0
- package/dist/chunk-EGAY4TWI.js +13786 -0
- package/dist/chunk-QS76ROZM.js +24746 -0
- package/dist/chunk-SDG7GNFG.js +13754 -0
- package/dist/chunk-VOUZ5APA.js +0 -0
- package/dist/{index.esm.js → chunk-XSHADX6Q.js} +7 -6
- package/dist/chunk-ZNOFCSYJ.js +14012 -0
- package/dist/components/index.d.mts +8 -0
- package/dist/components/index.js +6 -0
- package/dist/icons/bold/index.d.mts +3028 -0
- package/dist/icons/bold/index.js +3028 -0
- package/dist/icons/duotone/index.d.mts +3028 -0
- package/dist/icons/duotone/index.js +3028 -0
- package/dist/icons/fill/index.d.mts +3028 -0
- package/dist/icons/fill/index.js +3028 -0
- package/dist/icons/index.d.mts +11 -0
- package/dist/icons/index.js +21185 -0
- package/dist/icons/light/index.d.mts +3028 -0
- package/dist/icons/light/index.js +3028 -0
- package/dist/icons/regular/index.d.mts +3028 -0
- package/dist/icons/regular/index.js +3028 -0
- package/dist/icons/thin/index.d.mts +3028 -0
- package/dist/icons/thin/index.js +3028 -0
- package/dist/icons/wrappers/index.d.mts +3030 -0
- package/dist/icons/wrappers/index.js +3034 -0
- package/dist/index.d.mts +12 -16
- package/dist/index.js +21191 -0
- package/dist/{index.d.ts → types/icon.types.d.mts} +8 -6
- package/dist/types/icon.types.js +1 -0
- package/dist/types/index.d.mts +4 -0
- package/dist/types/index.js +2 -0
- package/package.json +26 -21
- package/dist/index.cjs.js +0 -49
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.esm.js.map +0 -1
- package/src/components/icon.tsx +0 -25
- package/src/components/index.ts +0 -1
- package/src/index.ts +0 -2
- package/src/types/icon.types.ts +0 -12
- package/src/types/index.ts +0 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
1
|
import { ComponentType } from 'react';
|
|
3
|
-
import { ComponentSize } from '@impulse-ui-native/theme';
|
|
4
2
|
import { SvgProps } from 'react-native-svg';
|
|
3
|
+
import { ComponentSize } from '@impulse-ui-native/theme';
|
|
5
4
|
|
|
6
5
|
type IconStyle = SvgProps["style"];
|
|
7
|
-
|
|
6
|
+
type IconVariant = "bold" | "duotone" | "fill" | "light" | "regular" | "thin";
|
|
7
|
+
interface IconProps extends SvgProps {
|
|
8
8
|
size?: ComponentSize | number;
|
|
9
9
|
color?: string;
|
|
10
|
+
variant?: IconVariant;
|
|
10
11
|
icon: ComponentType<SvgProps>;
|
|
11
12
|
style?: IconStyle;
|
|
12
13
|
}
|
|
14
|
+
interface IconWrapperProps extends SvgProps {
|
|
15
|
+
variant?: IconVariant;
|
|
16
|
+
}
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export { Icon, type IconProps, type IconStyle };
|
|
18
|
+
export type { IconProps, IconStyle, IconVariant, IconWrapperProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../chunk-VOUZ5APA.js";
|
package/package.json
CHANGED
|
@@ -1,45 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@impulse-ui-native/icon",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"react-native": "src/index.ts",
|
|
5
|
+
"module": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.mts",
|
|
7
|
+
"react-native": "dist/index.js",
|
|
9
8
|
"exports": {
|
|
10
9
|
".": {
|
|
11
|
-
"types": "./dist/index.d.
|
|
12
|
-
"react-native": "./
|
|
13
|
-
"import": "./dist/index.
|
|
14
|
-
"require": "./dist/index.cjs.js"
|
|
10
|
+
"types": "./dist/index.d.mts",
|
|
11
|
+
"react-native": "./dist/index.js",
|
|
12
|
+
"import": "./dist/index.js"
|
|
15
13
|
}
|
|
16
14
|
},
|
|
17
15
|
"files": [
|
|
18
16
|
"dist",
|
|
19
|
-
"src",
|
|
20
17
|
"README.md",
|
|
21
18
|
"LICENSE"
|
|
22
19
|
],
|
|
23
20
|
"dependencies": {
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
"@impulse-ui-native/theme": "2.0.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/react": "~19.2.14",
|
|
25
|
+
"eslint": "^9.38.0",
|
|
26
|
+
"prettier": "^3.6.2",
|
|
27
|
+
"react": "19.2.0",
|
|
28
|
+
"react-native": "0.83.6",
|
|
29
|
+
"react-native-svg": "15.15.3",
|
|
30
|
+
"typescript": "~5.9.2",
|
|
31
|
+
"@impulse-ui-native/eslint-config": "1.0.0",
|
|
32
|
+
"@impulse-ui-native/prettier-config": "1.0.0",
|
|
33
|
+
"@impulse-ui-native/tsconfig": "1.0.0"
|
|
27
34
|
},
|
|
28
35
|
"peerDependencies": {
|
|
29
|
-
"expo": ">=51 || >=52",
|
|
30
|
-
"expo-modules-core": ">=1.0.0",
|
|
31
36
|
"react": ">=18",
|
|
32
|
-
"react-native": ">=0.
|
|
33
|
-
"react-native-
|
|
34
|
-
"react-native-reanimated": ">=3",
|
|
35
|
-
"react-native-safe-area-context": "5.6.1",
|
|
36
|
-
"react-native-worklets": ">=0.5.1"
|
|
37
|
+
"react-native": ">=0.73",
|
|
38
|
+
"react-native-svg": ">=13.9.0"
|
|
37
39
|
},
|
|
38
40
|
"publishConfig": {
|
|
39
41
|
"access": "public"
|
|
40
42
|
},
|
|
43
|
+
"prettier": "@impulse-ui-native/prettier-config",
|
|
41
44
|
"scripts": {
|
|
42
45
|
"build": "tsup --config tsup.config.ts",
|
|
43
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
46
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
47
|
+
"lint": "pnpm exec eslint . --fix",
|
|
48
|
+
"format": "prettier --write \"./**/*.{ts,tsx,js,jsx,json,md}\" --ignore-path ../../.prettierignore"
|
|
44
49
|
}
|
|
45
50
|
}
|
package/dist/index.cjs.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/index.ts
|
|
21
|
-
var index_exports = {};
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
Icon: () => Icon
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(index_exports);
|
|
26
|
-
|
|
27
|
-
// src/components/icon.tsx
|
|
28
|
-
var import_react = require("react");
|
|
29
|
-
var Icon = (0, import_react.memo)(function Icon2({
|
|
30
|
-
size = "medium",
|
|
31
|
-
icon,
|
|
32
|
-
...props
|
|
33
|
-
}) {
|
|
34
|
-
const Icon3 = icon;
|
|
35
|
-
const iconSize = (0, import_react.useMemo)(
|
|
36
|
-
() => ({
|
|
37
|
-
small: 14,
|
|
38
|
-
medium: 16,
|
|
39
|
-
large: 16
|
|
40
|
-
})[size],
|
|
41
|
-
[size]
|
|
42
|
-
) ?? 16;
|
|
43
|
-
return /* @__PURE__ */ React.createElement(Icon3, { ...props, width: iconSize, height: iconSize, fill: props.color });
|
|
44
|
-
});
|
|
45
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
-
0 && (module.exports = {
|
|
47
|
-
Icon
|
|
48
|
-
});
|
|
49
|
-
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/components/icon.tsx"],"sourcesContent":["export * from \"./components\";\r\nexport * from \"./types\";\r\n","import { memo, useMemo } from \"react\";\r\nimport { IconProps } from \"../types\";\r\n\r\nexport const Icon = memo(function Icon({\r\n size = \"medium\",\r\n icon,\r\n ...props\r\n}: IconProps) {\r\n const Icon = icon;\r\n\r\n const iconSize =\r\n useMemo(\r\n () =>\r\n ({\r\n small: 14,\r\n medium: 16,\r\n large: 16,\r\n }[size]),\r\n [size]\r\n ) ?? 16;\r\n\r\n return (\r\n <Icon {...props} width={iconSize} height={iconSize} fill={props.color} />\r\n );\r\n});\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA8B;AAGvB,IAAM,WAAO,mBAAK,SAASA,MAAK;AAAA,EACrC,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,GAAc;AACZ,QAAMA,QAAO;AAEb,QAAM,eACJ;AAAA,IACE,OACG;AAAA,MACC,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,IACT,GAAE,IAAI;AAAA,IACR,CAAC,IAAI;AAAA,EACP,KAAK;AAEP,SACE,oCAACA,OAAA,EAAM,GAAG,OAAO,OAAO,UAAU,QAAQ,UAAU,MAAM,MAAM,OAAO;AAE3E,CAAC;","names":["Icon"]}
|
package/dist/index.esm.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/icon.tsx"],"sourcesContent":["import { memo, useMemo } from \"react\";\r\nimport { IconProps } from \"../types\";\r\n\r\nexport const Icon = memo(function Icon({\r\n size = \"medium\",\r\n icon,\r\n ...props\r\n}: IconProps) {\r\n const Icon = icon;\r\n\r\n const iconSize =\r\n useMemo(\r\n () =>\r\n ({\r\n small: 14,\r\n medium: 16,\r\n large: 16,\r\n }[size]),\r\n [size]\r\n ) ?? 16;\r\n\r\n return (\r\n <Icon {...props} width={iconSize} height={iconSize} fill={props.color} />\r\n );\r\n});\r\n"],"mappings":";AAAA,SAAS,MAAM,eAAe;AAGvB,IAAM,OAAO,KAAK,SAASA,MAAK;AAAA,EACrC,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,GAAc;AACZ,QAAMA,QAAO;AAEb,QAAM,WACJ;AAAA,IACE,OACG;AAAA,MACC,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,IACT,GAAE,IAAI;AAAA,IACR,CAAC,IAAI;AAAA,EACP,KAAK;AAEP,SACE,oCAACA,OAAA,EAAM,GAAG,OAAO,OAAO,UAAU,QAAQ,UAAU,MAAM,MAAM,OAAO;AAE3E,CAAC;","names":["Icon"]}
|
package/src/components/icon.tsx
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { memo, useMemo } from "react";
|
|
2
|
-
import { IconProps } from "../types";
|
|
3
|
-
|
|
4
|
-
export const Icon = memo(function Icon({
|
|
5
|
-
size = "medium",
|
|
6
|
-
icon,
|
|
7
|
-
...props
|
|
8
|
-
}: IconProps) {
|
|
9
|
-
const Icon = icon;
|
|
10
|
-
|
|
11
|
-
const iconSize =
|
|
12
|
-
useMemo(
|
|
13
|
-
() =>
|
|
14
|
-
({
|
|
15
|
-
small: 14,
|
|
16
|
-
medium: 16,
|
|
17
|
-
large: 16,
|
|
18
|
-
}[size]),
|
|
19
|
-
[size]
|
|
20
|
-
) ?? 16;
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<Icon {...props} width={iconSize} height={iconSize} fill={props.color} />
|
|
24
|
-
);
|
|
25
|
-
});
|
package/src/components/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Icon } from "./icon";
|
package/src/index.ts
DELETED
package/src/types/icon.types.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ComponentSize } from "@impulse-ui-native/theme";
|
|
2
|
-
import { ComponentType } from "react";
|
|
3
|
-
import { SvgProps } from "react-native-svg";
|
|
4
|
-
|
|
5
|
-
export type IconStyle = SvgProps["style"];
|
|
6
|
-
|
|
7
|
-
export interface IconProps {
|
|
8
|
-
size?: ComponentSize | number;
|
|
9
|
-
color?: string;
|
|
10
|
-
icon: ComponentType<SvgProps>;
|
|
11
|
-
style?: IconStyle;
|
|
12
|
-
}
|
package/src/types/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./icon.types";
|