@primeicons/react 8.0.0-alpha.2 → 8.0.0-alpha.3
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/cjs/core/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var classnames=require('@primeuix/utils/classnames'),c=require('react');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var c__namespace=/*#__PURE__*/_interopNamespace(c);var
|
|
2
|
-
exports.createIcon=
|
|
1
|
+
'use strict';var classnames=require('@primeuix/utils/classnames'),c=require('react');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var c__namespace=/*#__PURE__*/_interopNamespace(c);var I=([o,t])=>{let{key:e,...r}=t;return c__namespace.createElement(o,{key:e,...r})},l=o=>{let t=({size:e=14,color:r,style:n,className:s,...p})=>{let a={...r&&{color:r},...typeof n=="object"?n:{}},m=classnames.cn("p-icon",`p-icon-${o.name}`,s);return c__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",...p,style:a,className:m},o.nodes.map(I))};return t.displayName=o.name.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(""),t};
|
|
2
|
+
exports.createIcon=l;//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/index.ts"],"names":["renderNode","type","attrs","key","restAttrs","c","createIcon","iconData","Icon","size","color","style","className","props","computedStyle","computedClassName","cn","s"],"mappings":"2bAMA,IAAMA,CAAAA,CAAa,CAAC,CAACC,CAAAA,CAAMC,CAAK,
|
|
1
|
+
{"version":3,"sources":["../../../src/core/index.ts"],"names":["renderNode","type","attrs","key","restAttrs","c","createIcon","iconData","Icon","size","color","style","className","props","computedStyle","computedClassName","cn","s"],"mappings":"2bAMA,IAAMA,CAAAA,CAAa,CAAC,CAACC,CAAAA,CAAMC,CAAK,IAAoC,CAChE,GAAM,CAAE,GAAA,CAAAC,CAAAA,CAAK,GAAGC,CAAU,CAAA,CAAIF,CAAAA,CAE9B,OAAaG,YAAA,CAAA,aAAA,CAAcJ,CAAAA,CAAM,CAAE,GAAA,CAAAE,CAAAA,CAAK,GAAGC,CAAU,CAAC,CAC1D,CAAA,CAEaE,CAAAA,CAAcC,CAAAA,EAA4C,CACnE,IAAMC,CAAAA,CAA4B,CAAC,CAAE,IAAA,CAAAC,CAAAA,CAAO,EAAA,CAAI,KAAA,CAAAC,CAAAA,CAAO,KAAA,CAAAC,EAAO,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,GAAM,CACpF,IAAMC,CAAAA,CAAqC,CACvC,GAAIJ,CAAAA,EAAS,CAAE,KAAA,CAAAA,CAAM,CAAA,CACrB,GAAI,OAAOC,CAAAA,EAAU,QAAA,CAAWA,CAAAA,CAAQ,EAC5C,CAAA,CAEMI,CAAAA,CAAoBC,aAAAA,CAAG,QAAA,CAAU,CAAA,OAAA,EAAUT,CAAAA,CAAS,IAAI,CAAA,CAAA,CAAIK,CAAS,CAAA,CAE3E,OAAaP,2BACT,KAAA,CACA,CACI,KAAA,CAAO,4BAAA,CACP,KAAA,CAAOI,CAAAA,CACP,MAAA,CAAQA,CAAAA,CACR,OAAA,CAAS,WAAA,CACT,IAAA,CAAM,MAAA,CACN,aAAA,CAAe,MAAA,CACf,GAAGI,CAAAA,CACH,MAAOC,CAAAA,CACP,SAAA,CAAWC,CACf,CAAA,CACAR,CAAAA,CAAS,KAAA,CAAM,GAAA,CAAIP,CAAU,CACjC,CACJ,CAAA,CAEA,OAAAQ,CAAAA,CAAK,WAAA,CAAcD,CAAAA,CAAS,IAAA,CACvB,MAAM,GAAG,CAAA,CACT,GAAA,CAAKU,CAAAA,EAAMA,CAAAA,CAAE,MAAA,CAAO,CAAC,CAAA,CAAE,aAAY,CAAIA,CAAAA,CAAE,KAAA,CAAM,CAAC,CAAC,CAAA,CACjD,IAAA,CAAK,EAAE,EAELT,CACX","file":"index.js","sourcesContent":["import type { IconProps as CoreIconProps, IconData, IconNode } from '@primeicons/core/types';\nimport { cn } from '@primeuix/utils/classnames';\nimport * as React from 'react';\n\nexport interface IconProps extends CoreIconProps, Omit<React.SVGProps<SVGSVGElement>, keyof CoreIconProps> {}\n\nconst renderNode = ([type, attrs]: IconNode): React.ReactElement => {\n const { key, ...restAttrs } = attrs;\n\n return React.createElement(type, { key, ...restAttrs });\n};\n\nexport const createIcon = (iconData: IconData): React.FC<IconProps> => {\n const Icon: React.FC<IconProps> = ({ size = 14, color, style, className, ...props }) => {\n const computedStyle: React.CSSProperties = {\n ...(color && { color }),\n ...(typeof style === 'object' ? style : {})\n };\n\n const computedClassName = cn('p-icon', `p-icon-${iconData.name}`, className);\n\n return React.createElement(\n 'svg',\n {\n xmlns: 'http://www.w3.org/2000/svg',\n width: size,\n height: size,\n viewBox: '0 0 14 14',\n fill: 'none',\n 'aria-hidden': 'true',\n ...props,\n style: computedStyle,\n className: computedClassName\n },\n iconData.nodes.map(renderNode)\n );\n };\n\n Icon.displayName = iconData.name\n .split('-')\n .map((s) => s.charAt(0).toUpperCase() + s.slice(1))\n .join('');\n\n return Icon;\n};\n\nexport type { CoreIconProps, IconData };\n"]}
|
package/dist/esm/core/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {cn}from'@primeuix/utils/classnames';import*as c from'react';var
|
|
2
|
-
export{
|
|
1
|
+
import {cn}from'@primeuix/utils/classnames';import*as c from'react';var I=([o,t])=>{let{key:e,...r}=t;return c.createElement(o,{key:e,...r})},l=o=>{let t=({size:e=14,color:r,style:n,className:s,...p})=>{let a={...r&&{color:r},...typeof n=="object"?n:{}},m=cn("p-icon",`p-icon-${o.name}`,s);return c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",...p,style:a,className:m},o.nodes.map(I))};return t.displayName=o.name.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(""),t};
|
|
2
|
+
export{l as createIcon};//# sourceMappingURL=index.mjs.map
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/index.ts"],"names":["renderNode","type","attrs","key","restAttrs","createIcon","iconData","Icon","size","color","style","className","props","computedStyle","computedClassName","cn","s"],"mappings":"oEAMA,IAAMA,CAAAA,CAAa,CAAC,CAACC,CAAAA,CAAMC,CAAK,
|
|
1
|
+
{"version":3,"sources":["../../../src/core/index.ts"],"names":["renderNode","type","attrs","key","restAttrs","createIcon","iconData","Icon","size","color","style","className","props","computedStyle","computedClassName","cn","s"],"mappings":"oEAMA,IAAMA,CAAAA,CAAa,CAAC,CAACC,CAAAA,CAAMC,CAAK,IAAoC,CAChE,GAAM,CAAE,GAAA,CAAAC,CAAAA,CAAK,GAAGC,CAAU,CAAA,CAAIF,CAAAA,CAE9B,OAAa,CAAA,CAAA,aAAA,CAAcD,CAAAA,CAAM,CAAE,GAAA,CAAAE,CAAAA,CAAK,GAAGC,CAAU,CAAC,CAC1D,CAAA,CAEaC,CAAAA,CAAcC,CAAAA,EAA4C,CACnE,IAAMC,CAAAA,CAA4B,CAAC,CAAE,IAAA,CAAAC,CAAAA,CAAO,EAAA,CAAI,KAAA,CAAAC,CAAAA,CAAO,KAAA,CAAAC,EAAO,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,GAAM,CACpF,IAAMC,CAAAA,CAAqC,CACvC,GAAIJ,CAAAA,EAAS,CAAE,KAAA,CAAAA,CAAM,CAAA,CACrB,GAAI,OAAOC,CAAAA,EAAU,QAAA,CAAWA,CAAAA,CAAQ,EAC5C,CAAA,CAEMI,CAAAA,CAAoBC,EAAAA,CAAG,QAAA,CAAU,CAAA,OAAA,EAAUT,CAAAA,CAAS,IAAI,CAAA,CAAA,CAAIK,CAAS,CAAA,CAE3E,OAAa,gBACT,KAAA,CACA,CACI,KAAA,CAAO,4BAAA,CACP,KAAA,CAAOH,CAAAA,CACP,MAAA,CAAQA,CAAAA,CACR,OAAA,CAAS,WAAA,CACT,IAAA,CAAM,MAAA,CACN,aAAA,CAAe,MAAA,CACf,GAAGI,CAAAA,CACH,MAAOC,CAAAA,CACP,SAAA,CAAWC,CACf,CAAA,CACAR,CAAAA,CAAS,KAAA,CAAM,GAAA,CAAIN,CAAU,CACjC,CACJ,CAAA,CAEA,OAAAO,CAAAA,CAAK,WAAA,CAAcD,CAAAA,CAAS,IAAA,CACvB,MAAM,GAAG,CAAA,CACT,GAAA,CAAKU,CAAAA,EAAMA,CAAAA,CAAE,MAAA,CAAO,CAAC,CAAA,CAAE,aAAY,CAAIA,CAAAA,CAAE,KAAA,CAAM,CAAC,CAAC,CAAA,CACjD,IAAA,CAAK,EAAE,EAELT,CACX","file":"index.mjs","sourcesContent":["import type { IconProps as CoreIconProps, IconData, IconNode } from '@primeicons/core/types';\nimport { cn } from '@primeuix/utils/classnames';\nimport * as React from 'react';\n\nexport interface IconProps extends CoreIconProps, Omit<React.SVGProps<SVGSVGElement>, keyof CoreIconProps> {}\n\nconst renderNode = ([type, attrs]: IconNode): React.ReactElement => {\n const { key, ...restAttrs } = attrs;\n\n return React.createElement(type, { key, ...restAttrs });\n};\n\nexport const createIcon = (iconData: IconData): React.FC<IconProps> => {\n const Icon: React.FC<IconProps> = ({ size = 14, color, style, className, ...props }) => {\n const computedStyle: React.CSSProperties = {\n ...(color && { color }),\n ...(typeof style === 'object' ? style : {})\n };\n\n const computedClassName = cn('p-icon', `p-icon-${iconData.name}`, className);\n\n return React.createElement(\n 'svg',\n {\n xmlns: 'http://www.w3.org/2000/svg',\n width: size,\n height: size,\n viewBox: '0 0 14 14',\n fill: 'none',\n 'aria-hidden': 'true',\n ...props,\n style: computedStyle,\n className: computedClassName\n },\n iconData.nodes.map(renderNode)\n );\n };\n\n Icon.displayName = iconData.name\n .split('-')\n .map((s) => s.charAt(0).toUpperCase() + s.slice(1))\n .join('');\n\n return Icon;\n};\n\nexport type { CoreIconProps, IconData };\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primeicons/react",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.3",
|
|
4
4
|
"author": "PrimeTek Informatics",
|
|
5
5
|
"homepage": "https://primeicons.org/",
|
|
6
6
|
"description": "PrimeIcons for React - 300+ customizable SVG icons as React components",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
],
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@primeuix/utils": "^0.6.4",
|
|
59
|
-
"@primeicons/core": "8.0.0-alpha.
|
|
59
|
+
"@primeicons/core": "8.0.0-alpha.3"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"react": ">=17"
|