@wordpress/icons 13.0.1-next.v.202605131032.0 → 13.2.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/CHANGELOG.md
CHANGED
package/build/icon/index.cjs
CHANGED
|
@@ -26,12 +26,15 @@ module.exports = __toCommonJS(icon_exports);
|
|
|
26
26
|
var import_element = require("@wordpress/element");
|
|
27
27
|
var icon_default = (0, import_element.forwardRef)(
|
|
28
28
|
({ icon, size = 24, ...props }, ref) => {
|
|
29
|
-
return (0, import_element.cloneElement)(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
return (0, import_element.cloneElement)(
|
|
30
|
+
icon,
|
|
31
|
+
{
|
|
32
|
+
width: size,
|
|
33
|
+
height: size,
|
|
34
|
+
...props,
|
|
35
|
+
ref
|
|
36
|
+
}
|
|
37
|
+
);
|
|
35
38
|
}
|
|
36
39
|
);
|
|
37
40
|
//# sourceMappingURL=index.cjs.map
|
package/build/icon/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/icon/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\nimport type { SVGProps } from '@wordpress/primitives';\n\nexport interface IconProps extends SVGProps {\n\t/**\n\t * The SVG component to render\n\t */\n\ticon: ReactElement;\n\t/**\n\t * The size of the icon in pixels\n\t *\n\t * @default 24\n\t */\n\tsize?: number;\n}\n\n/**\n * Return an SVG icon.\n *\n * @param props The component props.\n *\n * @return Icon component\n */\nexport default forwardRef< HTMLElement, IconProps >(\n\t( { icon, size = 24, ...props }
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAyC;AA4BzC,IAAO,mBAAQ;AAAA,EACd,CAAE,EAAE,MAAM,OAAO,IAAI,GAAG,MAAM,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\nimport type { SVGProps } from '@wordpress/primitives';\n\nexport interface IconProps extends SVGProps {\n\t/**\n\t * The SVG component to render\n\t */\n\ticon: ReactElement;\n\t/**\n\t * The size of the icon in pixels\n\t *\n\t * @default 24\n\t */\n\tsize?: number;\n}\n\n/**\n * Return an SVG icon.\n *\n * @param props The component props.\n *\n * @return Icon component\n */\nexport default forwardRef< HTMLElement, IconProps >(\n\t( { icon, size = 24, ...props }, ref ) => {\n\t\treturn cloneElement(\n\t\t\ticon as ReactElement< React.RefAttributes< Element > >,\n\t\t\t{\n\t\t\t\twidth: size,\n\t\t\t\theight: size,\n\t\t\t\t...props,\n\t\t\t\tref,\n\t\t\t}\n\t\t);\n\t}\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAyC;AA4BzC,IAAO,mBAAQ;AAAA,EACd,CAAE,EAAE,MAAM,OAAO,IAAI,GAAG,MAAM,GAAG,QAAS;AACzC,eAAO;AAAA,MACN;AAAA,MACA;AAAA,QACC,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,GAAG;AAAA,QACH;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
import { cloneElement, forwardRef } from "@wordpress/element";
|
|
3
3
|
var icon_default = forwardRef(
|
|
4
4
|
({ icon, size = 24, ...props }, ref) => {
|
|
5
|
-
return cloneElement(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
return cloneElement(
|
|
6
|
+
icon,
|
|
7
|
+
{
|
|
8
|
+
width: size,
|
|
9
|
+
height: size,
|
|
10
|
+
...props,
|
|
11
|
+
ref
|
|
12
|
+
}
|
|
13
|
+
);
|
|
11
14
|
}
|
|
12
15
|
);
|
|
13
16
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/icon/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\nimport type { SVGProps } from '@wordpress/primitives';\n\nexport interface IconProps extends SVGProps {\n\t/**\n\t * The SVG component to render\n\t */\n\ticon: ReactElement;\n\t/**\n\t * The size of the icon in pixels\n\t *\n\t * @default 24\n\t */\n\tsize?: number;\n}\n\n/**\n * Return an SVG icon.\n *\n * @param props The component props.\n *\n * @return Icon component\n */\nexport default forwardRef< HTMLElement, IconProps >(\n\t( { icon, size = 24, ...props }
|
|
5
|
-
"mappings": ";AAGA,SAAS,cAAc,kBAAkB;AA4BzC,IAAO,eAAQ;AAAA,EACd,CAAE,EAAE,MAAM,OAAO,IAAI,GAAG,MAAM,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\nimport type { SVGProps } from '@wordpress/primitives';\n\nexport interface IconProps extends SVGProps {\n\t/**\n\t * The SVG component to render\n\t */\n\ticon: ReactElement;\n\t/**\n\t * The size of the icon in pixels\n\t *\n\t * @default 24\n\t */\n\tsize?: number;\n}\n\n/**\n * Return an SVG icon.\n *\n * @param props The component props.\n *\n * @return Icon component\n */\nexport default forwardRef< HTMLElement, IconProps >(\n\t( { icon, size = 24, ...props }, ref ) => {\n\t\treturn cloneElement(\n\t\t\ticon as ReactElement< React.RefAttributes< Element > >,\n\t\t\t{\n\t\t\t\twidth: size,\n\t\t\t\theight: size,\n\t\t\t\t...props,\n\t\t\t\tref,\n\t\t\t}\n\t\t);\n\t}\n);\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,cAAc,kBAAkB;AA4BzC,IAAO,eAAQ;AAAA,EACd,CAAE,EAAE,MAAM,OAAO,IAAI,GAAG,MAAM,GAAG,QAAS;AACzC,WAAO;AAAA,MACN;AAAA,MACA;AAAA,QACC,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,GAAG;AAAA,QACH;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/icons",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.2.0",
|
|
4
4
|
"description": "WordPress Icons package, based on dashicon.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"types": "build-types",
|
|
45
45
|
"sideEffects": false,
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@wordpress/element": "^
|
|
48
|
-
"@wordpress/primitives": "^4.
|
|
47
|
+
"@wordpress/element": "^7.0.0",
|
|
48
|
+
"@wordpress/primitives": "^4.47.0",
|
|
49
49
|
"change-case": "4.1.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"react": "^
|
|
52
|
+
"react": "^19.2.4"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"prepare": "npm run build",
|
|
60
60
|
"build": "node lib/generate-library.cjs && node lib/generate-manifest-php.cjs"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "d653c5fd6161571a0c2ebde28553d6e25624eacc"
|
|
63
63
|
}
|
package/src/icon/index.ts
CHANGED
|
@@ -30,12 +30,15 @@ export interface IconProps extends SVGProps {
|
|
|
30
30
|
* @return Icon component
|
|
31
31
|
*/
|
|
32
32
|
export default forwardRef< HTMLElement, IconProps >(
|
|
33
|
-
( { icon, size = 24, ...props }
|
|
34
|
-
return cloneElement(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
( { icon, size = 24, ...props }, ref ) => {
|
|
34
|
+
return cloneElement(
|
|
35
|
+
icon as ReactElement< React.RefAttributes< Element > >,
|
|
36
|
+
{
|
|
37
|
+
width: size,
|
|
38
|
+
height: size,
|
|
39
|
+
...props,
|
|
40
|
+
ref,
|
|
41
|
+
}
|
|
42
|
+
);
|
|
40
43
|
}
|
|
41
44
|
);
|