@iconify-icon/react 1.0.0-beta.1 → 1.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/iconify.js +21 -16
- package/dist/iconify.mjs +17 -17
- package/package.json +8 -8
package/dist/iconify.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
|
|
23
26
|
// src/iconify.ts
|
|
@@ -41,22 +44,24 @@ __export(iconify_exports, {
|
|
|
41
44
|
module.exports = __toCommonJS(iconify_exports);
|
|
42
45
|
var import_react = __toESM(require("react"));
|
|
43
46
|
var import_iconify_icon = require("iconify-icon");
|
|
44
|
-
var Icon = import_react.default.forwardRef(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
var Icon = import_react.default.forwardRef(
|
|
48
|
+
(props, ref) => {
|
|
49
|
+
const newProps = {
|
|
50
|
+
...props,
|
|
51
|
+
ref
|
|
52
|
+
};
|
|
53
|
+
if (typeof props.icon === "object") {
|
|
54
|
+
newProps.icon = JSON.stringify(props.icon);
|
|
55
|
+
}
|
|
56
|
+
if (!props.inline) {
|
|
57
|
+
delete newProps.inline;
|
|
58
|
+
}
|
|
59
|
+
if (props.className) {
|
|
60
|
+
newProps["class"] = props.className;
|
|
61
|
+
}
|
|
62
|
+
return import_react.default.createElement("iconify-icon", newProps);
|
|
51
63
|
}
|
|
52
|
-
|
|
53
|
-
delete newProps.inline;
|
|
54
|
-
}
|
|
55
|
-
if (props.className) {
|
|
56
|
-
newProps["class"] = props.className;
|
|
57
|
-
}
|
|
58
|
-
return import_react.default.createElement("iconify-icon", newProps);
|
|
59
|
-
});
|
|
64
|
+
);
|
|
60
65
|
// Annotate the CommonJS export names for ESM import in node:
|
|
61
66
|
0 && (module.exports = {
|
|
62
67
|
Icon,
|
package/dist/iconify.mjs
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
1
|
// src/iconify.ts
|
|
4
2
|
import React from "react";
|
|
5
3
|
import {
|
|
@@ -17,22 +15,24 @@ import {
|
|
|
17
15
|
addAPIProvider,
|
|
18
16
|
_api
|
|
19
17
|
} from "iconify-icon";
|
|
20
|
-
var Icon = React.forwardRef(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
var Icon = React.forwardRef(
|
|
19
|
+
(props, ref) => {
|
|
20
|
+
const newProps = {
|
|
21
|
+
...props,
|
|
22
|
+
ref
|
|
23
|
+
};
|
|
24
|
+
if (typeof props.icon === "object") {
|
|
25
|
+
newProps.icon = JSON.stringify(props.icon);
|
|
26
|
+
}
|
|
27
|
+
if (!props.inline) {
|
|
28
|
+
delete newProps.inline;
|
|
29
|
+
}
|
|
30
|
+
if (props.className) {
|
|
31
|
+
newProps["class"] = props.className;
|
|
32
|
+
}
|
|
33
|
+
return React.createElement("iconify-icon", newProps);
|
|
27
34
|
}
|
|
28
|
-
|
|
29
|
-
delete newProps.inline;
|
|
30
|
-
}
|
|
31
|
-
if (props.className) {
|
|
32
|
-
newProps["class"] = props.className;
|
|
33
|
-
}
|
|
34
|
-
return React.createElement("iconify-icon", newProps);
|
|
35
|
-
});
|
|
35
|
+
);
|
|
36
36
|
export {
|
|
37
37
|
Icon,
|
|
38
38
|
_api,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@iconify-icon/react",
|
|
3
3
|
"description": "React wrapper for Iconify Icon web component",
|
|
4
4
|
"author": "Vjacheslav Trushkin",
|
|
5
|
-
"version": "1.0.0
|
|
5
|
+
"version": "1.0.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bugs": "https://github.com/iconify/iconify/issues",
|
|
8
8
|
"homepage": "https://iconify.design/",
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"iconify-icon": "^1.0.0
|
|
32
|
+
"iconify-icon": "^1.0.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@types/react": "^17.0.
|
|
35
|
+
"@types/react": "^17.0.49",
|
|
36
36
|
"@types/react-test-renderer": "^18.0.0",
|
|
37
|
-
"@vitejs/plugin-react": "^1.
|
|
38
|
-
"jest": "^
|
|
37
|
+
"@vitejs/plugin-react": "^2.1.0",
|
|
38
|
+
"jest": "^29.0.2",
|
|
39
39
|
"react": "^18.2.0",
|
|
40
40
|
"react-test-renderer": "^18.2.0",
|
|
41
41
|
"rimraf": "^3.0.2",
|
|
42
|
-
"tsup": "^
|
|
43
|
-
"typescript": "^4.
|
|
44
|
-
"vitest": "^0.
|
|
42
|
+
"tsup": "^6.2.3",
|
|
43
|
+
"typescript": "^4.8.2",
|
|
44
|
+
"vitest": "^0.23.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"react": ">=16"
|