@primeicons/vue 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 +22 -21
- package/dist/esm/core/index.mjs.map +1 -1
- package/package.json +6 -9
package/dist/esm/core/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
3
|
-
const { key:
|
|
4
|
-
return
|
|
5
|
-
},
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as u, computed as n, h as s } from "vue";
|
|
2
|
+
const a = ([t, o]) => {
|
|
3
|
+
const { key: r, ...e } = o;
|
|
4
|
+
return s(t, { key: r, ...e });
|
|
5
|
+
}, m = (t) => {
|
|
6
|
+
const o = {
|
|
7
7
|
size: {
|
|
8
8
|
type: [Number, String],
|
|
9
9
|
default: 14
|
|
@@ -13,31 +13,32 @@ const m = ([o, n]) => {
|
|
|
13
13
|
default: void 0
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
return { Icon:
|
|
17
|
-
name:
|
|
18
|
-
props:
|
|
19
|
-
setup(e, { attrs:
|
|
20
|
-
const
|
|
21
|
-
width: typeof t.value == "number" ? `${t.value}px` : t.value,
|
|
22
|
-
height: typeof t.value == "number" ? `${t.value}px` : t.value,
|
|
16
|
+
return { Icon: u({
|
|
17
|
+
name: t.name.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(""),
|
|
18
|
+
props: o,
|
|
19
|
+
setup(e, { attrs: l }) {
|
|
20
|
+
const c = n(() => e.size ?? 14), i = n(() => ({
|
|
23
21
|
...e.color && { color: e.color }
|
|
24
|
-
})), p =
|
|
25
|
-
return () =>
|
|
22
|
+
})), p = n(() => ["p-icon", `p-icon-${t.name}`]);
|
|
23
|
+
return () => s(
|
|
26
24
|
"svg",
|
|
27
25
|
{
|
|
28
26
|
xmlns: "http://www.w3.org/2000/svg",
|
|
27
|
+
width: c.value,
|
|
28
|
+
height: c.value,
|
|
29
29
|
viewBox: "0 0 14 14",
|
|
30
|
-
fill: "
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
fill: "none",
|
|
31
|
+
"aria-hidden": "true",
|
|
32
|
+
...l,
|
|
33
|
+
style: i.value,
|
|
33
34
|
class: p.value
|
|
34
35
|
},
|
|
35
|
-
|
|
36
|
+
t.nodes.map(a)
|
|
36
37
|
);
|
|
37
38
|
}
|
|
38
|
-
}), props:
|
|
39
|
+
}), props: o };
|
|
39
40
|
};
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
m as createIcon
|
|
42
43
|
};
|
|
43
44
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../src/core/index.ts"],"sourcesContent":["import type { IconProps as CoreIconProps, IconData, IconNode } from '@primeicons/core/types';\nimport { computed, defineComponent, h, type PropType } from 'vue';\n\nexport interface IconProps extends CoreIconProps {}\n\nconst renderNode = ([type, attrs]: IconNode) => {\n const { key, ...restAttrs } = attrs;\n\n return h(type, { key, ...restAttrs });\n};\n\nexport const createIcon = (iconData: IconData) => {\n const props = {\n size: {\n type: [Number, String] as PropType<number | string>,\n default: 14\n },\n color: {\n type: String as PropType<string>,\n default: undefined\n }\n };\n\n const Icon = defineComponent({\n name: iconData.name\n .split('-')\n .map((s) => s.charAt(0).toUpperCase() + s.slice(1))\n .join(''),\n props,\n setup(props, { attrs }) {\n const computedSize = computed(() => props.size ?? 14);\n\n const computedStyle = computed(() => ({\n
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/core/index.ts"],"sourcesContent":["import type { IconProps as CoreIconProps, IconData, IconNode } from '@primeicons/core/types';\nimport { computed, defineComponent, h, type PropType } from 'vue';\n\nexport interface IconProps extends CoreIconProps {}\n\nconst renderNode = ([type, attrs]: IconNode) => {\n const { key, ...restAttrs } = attrs;\n\n return h(type, { key, ...restAttrs });\n};\n\nexport const createIcon = (iconData: IconData) => {\n const props = {\n size: {\n type: [Number, String] as PropType<number | string>,\n default: 14\n },\n color: {\n type: String as PropType<string>,\n default: undefined\n }\n };\n\n const Icon = defineComponent({\n name: iconData.name\n .split('-')\n .map((s) => s.charAt(0).toUpperCase() + s.slice(1))\n .join(''),\n props,\n setup(props, { attrs }) {\n const computedSize = computed(() => props.size ?? 14);\n\n const computedStyle = computed(() => ({\n ...(props.color && { color: props.color })\n }));\n\n const computedClass = computed(() => ['p-icon', `p-icon-${iconData.name}`]);\n\n return () =>\n h(\n 'svg',\n {\n xmlns: 'http://www.w3.org/2000/svg',\n width: computedSize.value,\n height: computedSize.value,\n viewBox: '0 0 14 14',\n fill: 'none',\n 'aria-hidden': 'true',\n ...attrs,\n style: computedStyle.value,\n class: computedClass.value\n },\n iconData.nodes.map(renderNode)\n );\n }\n });\n\n return { Icon, props };\n};\n\nexport type { CoreIconProps, IconData };\n"],"names":["renderNode","type","attrs","key","restAttrs","h","createIcon","iconData","props","defineComponent","s","computedSize","computed","computedStyle","computedClass"],"mappings":";AAKA,MAAMA,IAAa,CAAC,CAACC,GAAMC,CAAK,MAAgB;AAC5C,QAAM,EAAE,KAAAC,GAAK,GAAGC,EAAA,IAAcF;AAE9B,SAAOG,EAAEJ,GAAM,EAAE,KAAAE,GAAK,GAAGC,GAAW;AACxC,GAEaE,IAAa,CAACC,MAAuB;AAC9C,QAAMC,IAAQ;AAAA,IACV,MAAM;AAAA,MACF,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IAAA;AAAA,IAEb,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,EACb;AAqCJ,SAAO,EAAE,MAlCIC,EAAgB;AAAA,IACzB,MAAMF,EAAS,KACV,MAAM,GAAG,EACT,IAAI,CAACG,MAAMA,EAAE,OAAO,CAAC,EAAE,gBAAgBA,EAAE,MAAM,CAAC,CAAC,EACjD,KAAK,EAAE;AAAA,IACZ,OAAAF;AAAA,IACA,MAAMA,GAAO,EAAE,OAAAN,KAAS;AACpB,YAAMS,IAAeC,EAAS,MAAMJ,EAAM,QAAQ,EAAE,GAE9CK,IAAgBD,EAAS,OAAO;AAAA,QAClC,GAAIJ,EAAM,SAAS,EAAE,OAAOA,EAAM,MAAA;AAAA,MAAM,EAC1C,GAEIM,IAAgBF,EAAS,MAAM,CAAC,UAAU,UAAUL,EAAS,IAAI,EAAE,CAAC;AAE1E,aAAO,MACHF;AAAA,QACI;AAAA,QACA;AAAA,UACI,OAAO;AAAA,UACP,OAAOM,EAAa;AAAA,UACpB,QAAQA,EAAa;AAAA,UACrB,SAAS;AAAA,UACT,MAAM;AAAA,UACN,eAAe;AAAA,UACf,GAAGT;AAAA,UACH,OAAOW,EAAc;AAAA,UACrB,OAAOC,EAAc;AAAA,QAAA;AAAA,QAEzBP,EAAS,MAAM,IAAIP,CAAU;AAAA,MAAA;AAAA,IAEzC;AAAA,EAAA,CACH,GAEc,OAAAQ,EAAA;AACnB;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primeicons/vue",
|
|
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 Vue 3 - 300+ customizable SVG icons as Vue 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
|
"vue": "^3"
|