@central-icons-react/round-filled-radius-3-stroke-1 0.0.14 → 0.0.15
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/index.js +1 -15
- package/index.js.map +1 -1
- package/index.mjs +2 -0
- package/index.mjs.map +1 -0
- package/package.json +4 -2
package/index.js
CHANGED
@@ -1,16 +1,2 @@
|
|
1
|
-
|
2
|
-
import React, { lazy, Suspense } from "react";
|
3
|
-
const LazyCentralIcon = ({ importString }) => {
|
4
|
-
const Icon = lazy(() => import(/* webpackIgnore: true */ importString));
|
5
|
-
return React.createElement(Icon, null);
|
6
|
-
};
|
7
|
-
const CentralIconPlaceholder = (props) => {
|
8
|
-
return React.createElement(CentralIconBase, { ...props });
|
9
|
-
};
|
10
|
-
export const CentralIcon = ({ name, ...props }) => {
|
11
|
-
const importString = `@central-icons-react/round-filled-radius-3-stroke-1/${name}`;
|
12
|
-
return (React.createElement(Suspense, { fallback: React.createElement(CentralIconPlaceholder, { ...props }) },
|
13
|
-
React.createElement(LazyCentralIcon, { importString: importString, ...props })));
|
14
|
-
};
|
15
|
-
export default CentralIcon;
|
1
|
+
"use strict";var y=Object.create;var s=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var P=(t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})},l=(t,e,r,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of I(e))!u.call(t,n)&&n!==r&&s(t,n,{get:()=>e[n],enumerable:!(p=f(e,n))||p.enumerable});return t};var c=(t,e,r)=>(r=t!=null?y(g(t)):{},l(e||!t||!t.__esModule?s(r,"default",{value:t,enumerable:!0}):r,t)),x=t=>l(s({},"__esModule",{value:!0}),t);var S={};P(S,{CentralIcon:()=>m,default:()=>B});module.exports=x(S);var a=c(require("react")),i=({children:t,size:e=24,ariaLabel:r,color:p,ariaHidden:n=!0,...C})=>a.default.createElement("svg",{...C,"aria-hidden":n,role:n?void 0:"img",width:typeof e=="number"?`${e}px`:e,height:typeof e=="number"?`${e}px`:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{color:p}},r&&!n&&a.default.createElement("title",null,r),t);var o=c(require("react"));var d=({importString:t})=>{let e=(0,o.lazy)(()=>import(/* webpackIgnore: true */t));return o.default.createElement(e,null)},h=t=>o.default.createElement(i,{...t}),m=({name:t,...e})=>{let r=`@central-icons-react/round-filled-radius-3-stroke-1/${t}`;return o.default.createElement(o.Suspense,{fallback:o.default.createElement(h,{...e})},o.default.createElement(d,{importString:r,...e}))},B=m;0&&(module.exports={CentralIcon});
|
16
2
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["src/index.tsx","src/CentralIconBase/index.tsx"],"sourcesContent":["import { CentralIconBase, type CentralIconBaseProps } from \"./CentralIconBase\";\nimport { type icons } from \"./icons\";\nimport React, { type FC, lazy, type PropsWithChildren, Suspense } from \"react\";\n\nexport { type CentralIconBaseProps };\n\nexport type CentralIconName = keyof typeof icons;\nexport type CentralIconCategory = (typeof icons)[CentralIconName][\"category\"];\nexport type CentralIconProps = PropsWithChildren<CentralIconBaseProps> & {\n name: keyof typeof icons;\n};\n\nconst LazyCentralIcon = ({ importString }: { importString: string }) => {\n const Icon = lazy(() => import(/* webpackIgnore: true */ importString));\n return <Icon />;\n};\n\nconst CentralIconPlaceholder: FC<CentralIconBaseProps> = (props) => {\n return <CentralIconBase {...props} />;\n};\n\nexport const CentralIcon: React.FC<CentralIconProps> = ({ name, ...props }) => {\n const importString = `@central-icons-react/round-filled-radius-3-stroke-1/${name}`;\n return (\n <Suspense fallback={<CentralIconPlaceholder {...props} />}>\n <LazyCentralIcon importString={importString} {...props} />\n </Suspense>\n );\n};\n\nexport default CentralIcon;\n","import React from \"react\";\nimport type { SVGProps } from \"react\";\n\nexport type CentralIconBaseProps = {\n size?: string | number;\n ariaHidden?: boolean;\n} & SVGProps<SVGSVGElement>;\n\nexport const CentralIconBase: React.FC<\n CentralIconBaseProps & { ariaLabel?: string }\n> = ({\n children,\n size = 24,\n ariaLabel,\n color,\n ariaHidden = true,\n ...props\n}) => {\n return (\n <svg\n {...props}\n aria-hidden={ariaHidden}\n role={ariaHidden ? undefined : \"img\"}\n width={typeof size === \"number\" ? `${size}px` : size}\n height={typeof size === \"number\" ? `${size}px` : size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ color }}\n >\n {ariaLabel && !ariaHidden && <title>{ariaLabel}</title>}\n {children}\n </svg>\n );\n};\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GCAA,IAAAK,EAAkB,oBAQLC,EAET,CAAC,CACH,SAAAC,EACA,KAAAC,EAAO,GACP,UAAAC,EACA,MAAAC,EACA,WAAAC,EAAa,GACb,GAAGC,CACL,IAEI,EAAAC,QAAA,cAAC,OACE,GAAGD,EACJ,cAAaD,EACb,KAAMA,EAAa,OAAY,MAC/B,MAAO,OAAOH,GAAS,SAAW,GAAGA,CAAI,KAAOA,EAChD,OAAQ,OAAOA,GAAS,SAAW,GAAGA,CAAI,KAAOA,EACjD,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAO,CAAE,MAAAE,CAAM,GAEdD,GAAa,CAACE,GAAc,EAAAE,QAAA,cAAC,aAAOJ,CAAU,EAC9CF,CACH,ED9BJ,IAAAO,EAAuE,oBAUvE,IAAMC,EAAkB,CAAC,CAAE,aAAAC,CAAa,IAAgC,CACtE,IAAMC,KAAO,QAAK,IAAM,OAAiCD,EAAa,EACtE,OAAO,EAAAE,QAAA,cAACD,EAAA,IAAK,CACf,EAEME,EAAoDC,GACjD,EAAAF,QAAA,cAACG,EAAA,CAAiB,GAAGD,EAAO,EAGxBE,EAA0C,CAAC,CAAE,KAAAC,EAAM,GAAGH,CAAM,IAAM,CAC7E,IAAMJ,EAAe,uDAAuDO,CAAI,GAChF,OACE,EAAAL,QAAA,cAAC,YAAS,SAAU,EAAAA,QAAA,cAACC,EAAA,CAAwB,GAAGC,EAAO,GACrD,EAAAF,QAAA,cAACH,EAAA,CAAgB,aAAcC,EAAe,GAAGI,EAAO,CAC1D,CAEJ,EAEOI,EAAQF","names":["index_exports","__export","CentralIcon","index_default","__toCommonJS","import_react","CentralIconBase","children","size","ariaLabel","color","ariaHidden","props","React","import_react","LazyCentralIcon","importString","Icon","React","CentralIconPlaceholder","props","CentralIconBase","CentralIcon","name","index_default"]}
|
package/index.mjs
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
import p from"react";var s=({children:t,size:e=24,ariaLabel:o,color:a,ariaHidden:n=!0,...l})=>p.createElement("svg",{...l,"aria-hidden":n,role:n?void 0:"img",width:typeof e=="number"?`${e}px`:e,height:typeof e=="number"?`${e}px`:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{color:a}},o&&!n&&p.createElement("title",null,o),t);import r,{lazy as c,Suspense as i}from"react";var m=({importString:t})=>{let e=c(()=>import(/* webpackIgnore: true */t));return r.createElement(e,null)},C=t=>r.createElement(s,{...t}),y=({name:t,...e})=>{let o=`@central-icons-react/round-filled-radius-3-stroke-1/${t}`;return r.createElement(i,{fallback:r.createElement(C,{...e})},r.createElement(m,{importString:o,...e}))},P=y;export{y as CentralIcon,P as default};
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
package/index.mjs.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["src/CentralIconBase/index.tsx","src/index.tsx"],"sourcesContent":["import React from \"react\";\nimport type { SVGProps } from \"react\";\n\nexport type CentralIconBaseProps = {\n size?: string | number;\n ariaHidden?: boolean;\n} & SVGProps<SVGSVGElement>;\n\nexport const CentralIconBase: React.FC<\n CentralIconBaseProps & { ariaLabel?: string }\n> = ({\n children,\n size = 24,\n ariaLabel,\n color,\n ariaHidden = true,\n ...props\n}) => {\n return (\n <svg\n {...props}\n aria-hidden={ariaHidden}\n role={ariaHidden ? undefined : \"img\"}\n width={typeof size === \"number\" ? `${size}px` : size}\n height={typeof size === \"number\" ? `${size}px` : size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ color }}\n >\n {ariaLabel && !ariaHidden && <title>{ariaLabel}</title>}\n {children}\n </svg>\n );\n};\n","import { CentralIconBase, type CentralIconBaseProps } from \"./CentralIconBase\";\nimport { type icons } from \"./icons\";\nimport React, { type FC, lazy, type PropsWithChildren, Suspense } from \"react\";\n\nexport { type CentralIconBaseProps };\n\nexport type CentralIconName = keyof typeof icons;\nexport type CentralIconCategory = (typeof icons)[CentralIconName][\"category\"];\nexport type CentralIconProps = PropsWithChildren<CentralIconBaseProps> & {\n name: keyof typeof icons;\n};\n\nconst LazyCentralIcon = ({ importString }: { importString: string }) => {\n const Icon = lazy(() => import(/* webpackIgnore: true */ importString));\n return <Icon />;\n};\n\nconst CentralIconPlaceholder: FC<CentralIconBaseProps> = (props) => {\n return <CentralIconBase {...props} />;\n};\n\nexport const CentralIcon: React.FC<CentralIconProps> = ({ name, ...props }) => {\n const importString = `@central-icons-react/round-filled-radius-3-stroke-1/${name}`;\n return (\n <Suspense fallback={<CentralIconPlaceholder {...props} />}>\n <LazyCentralIcon importString={importString} {...props} />\n </Suspense>\n );\n};\n\nexport default CentralIcon;\n"],"mappings":"AAAA,OAAOA,MAAW,QAQX,IAAMC,EAET,CAAC,CACH,SAAAC,EACA,KAAAC,EAAO,GACP,UAAAC,EACA,MAAAC,EACA,WAAAC,EAAa,GACb,GAAGC,CACL,IAEIP,EAAA,cAAC,OACE,GAAGO,EACJ,cAAaD,EACb,KAAMA,EAAa,OAAY,MAC/B,MAAO,OAAOH,GAAS,SAAW,GAAGA,CAAI,KAAOA,EAChD,OAAQ,OAAOA,GAAS,SAAW,GAAGA,CAAI,KAAOA,EACjD,QAAQ,YACR,KAAK,OACL,MAAM,6BACN,MAAO,CAAE,MAAAE,CAAM,GAEdD,GAAa,CAACE,GAAcN,EAAA,cAAC,aAAOI,CAAU,EAC9CF,CACH,EC9BJ,OAAOM,GAAkB,QAAAC,EAA8B,YAAAC,MAAgB,QAUvE,IAAMC,EAAkB,CAAC,CAAE,aAAAC,CAAa,IAAgC,CACtE,IAAMC,EAAOC,EAAK,IAAM,OAAiCF,EAAa,EACtE,OAAOG,EAAA,cAACF,EAAA,IAAK,CACf,EAEMG,EAAoDC,GACjDF,EAAA,cAACG,EAAA,CAAiB,GAAGD,EAAO,EAGxBE,EAA0C,CAAC,CAAE,KAAAC,EAAM,GAAGH,CAAM,IAAM,CAC7E,IAAML,EAAe,uDAAuDQ,CAAI,GAChF,OACEL,EAAA,cAACM,EAAA,CAAS,SAAUN,EAAA,cAACC,EAAA,CAAwB,GAAGC,EAAO,GACrDF,EAAA,cAACJ,EAAA,CAAgB,aAAcC,EAAe,GAAGK,EAAO,CAC1D,CAEJ,EAEOK,EAAQH","names":["React","CentralIconBase","children","size","ariaLabel","color","ariaHidden","props","React","lazy","Suspense","LazyCentralIcon","importString","Icon","lazy","React","CentralIconPlaceholder","props","CentralIconBase","CentralIcon","name","Suspense","index_default"]}
|
package/package.json
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
{
|
2
2
|
"name": "@central-icons-react/round-filled-radius-3-stroke-1",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.15",
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
5
5
|
"homepage": "https://iconists.co/central",
|
6
6
|
"sideEffects": false,
|
7
7
|
"main": "./index.js",
|
8
|
+
"module": "./index.mjs",
|
8
9
|
"types": "./index.d.ts",
|
9
10
|
"exports": {
|
10
11
|
".": {
|
11
12
|
"types": "./index.d.ts",
|
13
|
+
"import": "./index.mjs",
|
12
14
|
"require": "./index.js"
|
13
15
|
},
|
14
16
|
"./*": {
|
@@ -28,8 +30,8 @@
|
|
28
30
|
"preinstall": "node ./license-check.js",
|
29
31
|
"prebuild": "tsc",
|
30
32
|
"build": "tsup",
|
33
|
+
"postbuild": "prettier --write **/*.d.ts *.d.ts && sed -i '' 's/import(/import(\\/* webpackIgnore: true *\\//g' index.js index.mjs",
|
31
34
|
"prepublishOnly": "npm run build",
|
32
|
-
"postbuild": "prettier --write **/*.d.ts *.d.ts",
|
33
35
|
"dev": "tsup --watch",
|
34
36
|
"lint": "prettier --write ."
|
35
37
|
},
|