@primeicons/solid 8.0.0-alpha.1 → 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/esm/core/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {template,spread,mergeProps,insert,createComponent}from'solid-js/web';import {cn}from'@primeuix/utils/classnames';import {splitProps,For,Switch,Match}from'solid-js';var h=template("<svg><path></svg>",false,true,false),v=template("<svg><circle></svg>",false,true,false),$=template("<svg><rect></svg>",false,true,false),_=template("<svg><line></svg>",false,true,false),d=template("<svg><ellipse></svg>",false,true,false),w=template("<svg><polygon></svg>",false,true,false),y=template("<svg><polyline></svg>",false,true,false),
|
|
1
|
+
import {template,spread,mergeProps,insert,createComponent}from'solid-js/web';import {cn}from'@primeuix/utils/classnames';import {splitProps,For,Switch,Match}from'solid-js';var h=template("<svg><path></svg>",false,true,false),v=template("<svg><circle></svg>",false,true,false),$=template("<svg><rect></svg>",false,true,false),_=template("<svg><line></svg>",false,true,false),d=template("<svg><ellipse></svg>",false,true,false),w=template("<svg><polygon></svg>",false,true,false),y=template("<svg><polyline></svg>",false,true,false),x=template('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 14 14"fill=none aria-hidden=true>'),b=c=>{let[t,s]=c,{key:u,...r}=s;return createComponent(Switch,{get children(){return [createComponent(Match,{when:t==="path",get children(){var e=h();return spread(e,r,true,false),e}}),createComponent(Match,{when:t==="circle",get children(){var e=v();return spread(e,r,true,false),e}}),createComponent(Match,{when:t==="rect",get children(){var e=$();return spread(e,r,true,false),e}}),createComponent(Match,{when:t==="line",get children(){var e=_();return spread(e,r,true,false),e}}),createComponent(Match,{when:t==="ellipse",get children(){var e=d();return spread(e,r,true,false),e}}),createComponent(Match,{when:t==="polygon",get children(){var e=w();return spread(e,r,true,false),e}}),createComponent(Match,{when:t==="polyline",get children(){var e=y();return spread(e,r,true,false),e}})]}})},N=c=>t=>{let[s,u]=splitProps(t,["size","color","style","class"]),r=()=>s.size??14,e=()=>({...s.color&&{color:s.color},...typeof s.style=="object"?s.style:{}}),i=()=>cn("p-icon",`p-icon-${c.name}`,s.class);return (()=>{var p=x();return spread(p,mergeProps({get width(){return r()},get height(){return r()}},u,{get style(){return e()},get class(){return i()}}),true,true),insert(p,createComponent(For,{get each(){return c.nodes},children:g=>b(g)})),p})()};
|
|
2
2
|
export{N as createIcon};//# sourceMappingURL=index.mjs.map
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/index.tsx"],"names":["o","renderNode","node","type","attrs","key","restAttrs","_$createComponent","Switch","children","Match","when","_el$","_tmpl$","_$spread","_el$2","_tmpl$2","_el$3","_tmpl$3","_el$4","_tmpl$4","_el$5","_tmpl$5","_el$6","_tmpl$6","_el$7","_tmpl$7","createIcon","iconData","props","local","others","splitProps","computedSize","size","computedStyle","
|
|
1
|
+
{"version":3,"sources":["../../../src/core/index.tsx"],"names":["o","renderNode","node","type","attrs","key","restAttrs","_$createComponent","Switch","children","Match","when","_el$","_tmpl$","_$spread","_el$2","_tmpl$2","_el$3","_tmpl$3","_el$4","_tmpl$4","_el$5","_tmpl$5","_el$6","_tmpl$6","_el$7","_tmpl$7","createIcon","iconData","props","local","others","splitProps","computedSize","size","computedStyle","color","style","computedClass","cn","name","class","_el$8","_tmpl$8","_$mergeProps","width","height","_$insert","For","each","nodes"],"mappings":"4KAEyD,IAAA,CAAA,CAAAA,QAAA,CAAA,mBAAA,CAAA,KAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAAA,QAAA,CAAA,qBAAA,CAAA,KAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAAA,QAAA,CAAA,mBAAA,CAAA,KAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAAA,QAAA,CAAA,mBAAA,CAAA,KAAA,CAAA,IAAA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ON,CAAAA,CAAMM,KAAM,EACxC,GAAI,OAAON,EAAMO,KAAAA,EAAU,QAAA,CAAWP,EAAMO,KAAAA,CAAQ,EACxD,CAAA,CAAA,CAGEC,EAAgBA,IAAMC,EAAAA,CAAG,QAAA,CAAU,CAAA,OAAA,EAAUX,EAASY,IAAI,CAAA,CAAA,CAAIV,CAAAA,CAAMW,KAAK,EAE/E,OAAA,CAAA,IAAA,CAAA,IAAAC,CAAAA,CAAAC,GAAA,CAAA7B,OAAAA,MAAAA,CAAA4B,CAAAA,CAAAE,WAAA,CAAA,IAC4CC,KAAAA,EAAK,CAAA,OAAEZ,CAAAA,EAAc,CAAA,CAAA,IAAEa,QAAM,CAAA,OAAEb,GAAc,CAAA,EAAyDF,CAAAA,CAAM,CAAA,IAAEM,KAAAA,EAAK,CAAA,OAAEF,CAAAA,EAAe,CAAA,CAAA,IAAA,KAAA,EAAA,CAAA,OAASG,CAAAA,EAAe,CAAA,CAAA,EAAA,IAAA,CAAA,IAAA,EAAAS,MAAAA,CAAAL,CAAAA,CAAAnC,eAAAA,CAC/LyC,GAAAA,CAAG,CAAA,IAACC,IAAAA,EAAI,CAAA,OAAErB,CAAAA,CAASsB,KAAK,CAAA,CAAAzC,QAAAA,CAAIP,CAAAA,EAASD,CAAAA,CAAWC,CAAI,CAAC,CAAA,CAAA,CAAA,CAAAwC,CAAA,IAGlE","file":"index.mjs","sourcesContent":["import type { IconProps as CoreIconProps, IconData, IconNode } from '@primeicons/core/types';\nimport { cn } from '@primeuix/utils/classnames';\nimport { For, type JSX, Match, splitProps, Switch } from 'solid-js';\n\nexport interface IconProps extends CoreIconProps, Omit<JSX.SvgSVGAttributes<SVGSVGElement>, keyof CoreIconProps> {}\n\nconst renderNode = (node: IconNode) => {\n const [type, attrs] = node;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { key, ...restAttrs } = attrs;\n\n return (\n <Switch>\n <Match when={type === 'path'}>\n <path {...(restAttrs as JSX.PathSVGAttributes<SVGPathElement>)} />\n </Match>\n <Match when={type === 'circle'}>\n <circle {...(restAttrs as JSX.CircleSVGAttributes<SVGCircleElement>)} />\n </Match>\n <Match when={type === 'rect'}>\n <rect {...(restAttrs as JSX.RectSVGAttributes<SVGRectElement>)} />\n </Match>\n <Match when={type === 'line'}>\n <line {...(restAttrs as JSX.LineSVGAttributes<SVGLineElement>)} />\n </Match>\n <Match when={type === 'ellipse'}>\n <ellipse {...(restAttrs as JSX.EllipseSVGAttributes<SVGEllipseElement>)} />\n </Match>\n <Match when={type === 'polygon'}>\n <polygon {...(restAttrs as JSX.PolygonSVGAttributes<SVGPolygonElement>)} />\n </Match>\n <Match when={type === 'polyline'}>\n <polyline {...(restAttrs as JSX.PolylineSVGAttributes<SVGPolylineElement>)} />\n </Match>\n </Switch>\n );\n};\n\nexport const createIcon = (iconData: IconData) => {\n return (props: IconProps) => {\n const [local, others] = splitProps(props, ['size', 'color', 'style', 'class']);\n\n const computedSize = () => {\n return local.size ?? 14;\n };\n\n const computedStyle = (): JSX.CSSProperties => {\n return {\n ...(local.color && { color: local.color }),\n ...(typeof local.style === 'object' ? local.style : {})\n };\n };\n\n const computedClass = () => cn('p-icon', `p-icon-${iconData.name}`, local.class);\n\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width={computedSize()} height={computedSize()} viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden=\"true\" {...others} style={computedStyle()} class={computedClass()}>\n <For each={iconData.nodes}>{(node) => renderNode(node)}</For>\n </svg>\n );\n };\n};\n\nexport type { CoreIconProps, IconData };\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primeicons/solid",
|
|
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 Solid.js - 300+ customizable SVG icons as Solid components",
|
|
@@ -22,27 +22,24 @@
|
|
|
22
22
|
"bugs": {
|
|
23
23
|
"url": "https://github.com/primefaces/primeicons/issues"
|
|
24
24
|
},
|
|
25
|
-
"main": "./dist/
|
|
25
|
+
"main": "./dist/esm/index.mjs",
|
|
26
26
|
"module": "./dist/esm/index.mjs",
|
|
27
27
|
"types": "./dist/lib/index.d.ts",
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
30
|
"types": "./dist/lib/index.d.ts",
|
|
31
31
|
"import": "./dist/esm/index.mjs",
|
|
32
|
-
"require": "./dist/cjs/index.js",
|
|
33
32
|
"default": "./dist/esm/index.mjs"
|
|
34
33
|
},
|
|
35
34
|
"./package.json": "./package.json",
|
|
36
35
|
"./core": {
|
|
37
|
-
"types": "./dist/lib/core.d.ts",
|
|
38
|
-
"import": "./dist/esm/core.mjs",
|
|
39
|
-
"
|
|
40
|
-
"default": "./dist/esm/core.mjs"
|
|
36
|
+
"types": "./dist/lib/core/index.d.ts",
|
|
37
|
+
"import": "./dist/esm/core/index.mjs",
|
|
38
|
+
"default": "./dist/esm/core/index.mjs"
|
|
41
39
|
},
|
|
42
40
|
"./*": {
|
|
43
41
|
"types": "./dist/lib/icons/*.d.ts",
|
|
44
42
|
"import": "./dist/esm/icons/*.mjs",
|
|
45
|
-
"require": "./dist/cjs/icons/*.js",
|
|
46
43
|
"default": "./dist/esm/icons/*.mjs"
|
|
47
44
|
}
|
|
48
45
|
},
|
|
@@ -57,7 +54,7 @@
|
|
|
57
54
|
],
|
|
58
55
|
"dependencies": {
|
|
59
56
|
"@primeuix/utils": "^0.6.4",
|
|
60
|
-
"@primeicons/core": "8.0.0-alpha.
|
|
57
|
+
"@primeicons/core": "8.0.0-alpha.3"
|
|
61
58
|
},
|
|
62
59
|
"peerDependencies": {
|
|
63
60
|
"solid-js": "^1"
|