@primeicons/vue 8.0.0-beta.1 → 8.0.0-rc.1
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/LICENSE.md +45 -0
- package/README.md +39 -2
- package/dist/esm/core/index.mjs +20 -16
- package/dist/esm/core/index.mjs.map +1 -1
- package/dist/lib/core/index.d.ts +13 -0
- package/package.json +6 -11
- package/LICENSE +0 -21
package/LICENSE.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# PrimeUI License
|
|
2
|
+
|
|
3
|
+
This package is part of **PrimeUI**, a family of commercial UI libraries by PrimeTek Informatics.
|
|
4
|
+
|
|
5
|
+
## How PrimeUI May Be Used
|
|
6
|
+
|
|
7
|
+
PrimeUI may be used under one of two licenses. You choose the one that applies to you based on eligibility.
|
|
8
|
+
|
|
9
|
+
### Community License (Free)
|
|
10
|
+
|
|
11
|
+
Free for organizations that meet all of the following criteria:
|
|
12
|
+
|
|
13
|
+
- Less than $1,000,000 USD in annual gross revenue
|
|
14
|
+
- Fewer than 5 developers
|
|
15
|
+
- Fewer than 10 employees
|
|
16
|
+
- Less than $3,000,000 USD in venture capital or outside funding
|
|
17
|
+
|
|
18
|
+
Individuals, students, non-profits, and non-commercial open source projects also qualify.
|
|
19
|
+
|
|
20
|
+
The Community License provides full access to the core libraries and supports up to 4 developers. It requires annual renewal by confirming continued eligibility.
|
|
21
|
+
|
|
22
|
+
### Commercial License (Paid)
|
|
23
|
+
|
|
24
|
+
For organizations that do not qualify for the Community License.
|
|
25
|
+
|
|
26
|
+
Licensed per developer, perpetual, with one year of updates included. Renewal is optional and extends access to new versions. The Commercial Suite also includes PrimeBlocks, Theme Designer, all PrimeUI Pro components, and Premium Support.
|
|
27
|
+
|
|
28
|
+
## License Key
|
|
29
|
+
|
|
30
|
+
A valid license key is required to use this software. License verification is performed offline, with no telemetry and no remote connection. A missing, invalid, or expired key may cause the software to display a license notice.
|
|
31
|
+
|
|
32
|
+
## Full Terms
|
|
33
|
+
|
|
34
|
+
The complete license terms, eligibility details, and renewal information are available at:
|
|
35
|
+
|
|
36
|
+
- Community License: <https://primeui.dev/licenses/community>
|
|
37
|
+
- Commercial License: <https://primeui.dev/licenses/commercial>
|
|
38
|
+
|
|
39
|
+
## Restrictions
|
|
40
|
+
|
|
41
|
+
This software is distributed as a compiled package. You may not reverse-engineer, decompile, or extract its source code, redistribute it as a component library or development tool, or remove its license mechanisms. Redistributing the software so that third parties can develop with it requires a separate OEM License. See the full terms for details.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
© 2026 PrimeTek Informatics. All rights reserved.
|
package/README.md
CHANGED
|
@@ -53,6 +53,7 @@ All icon components accept the following props:
|
|
|
53
53
|
| `color` | `string` | `currentColor` | Icon color |
|
|
54
54
|
| `class` | `string` | `''` | Additional CSS class |
|
|
55
55
|
| `style` | `string \| object` | `{}` | Inline styles |
|
|
56
|
+
| `spin` | `boolean` | `false` | Applies a rotation animation |
|
|
56
57
|
|
|
57
58
|
## Examples
|
|
58
59
|
|
|
@@ -153,6 +154,42 @@ const iconProps: IconProps = {
|
|
|
153
154
|
</template>
|
|
154
155
|
```
|
|
155
156
|
|
|
157
|
+
## Spin
|
|
158
|
+
|
|
159
|
+
Setting `spin` to `true` adds `p-icon-spin` to the SVG element's class list. The `p-icon-spin` class comes from PrimeUI's stylesheet.
|
|
160
|
+
|
|
161
|
+
```vue
|
|
162
|
+
<script setup>
|
|
163
|
+
import { Spinner, Refresh, Cog } from '@primeicons/vue';
|
|
164
|
+
import { ref } from 'vue';
|
|
165
|
+
|
|
166
|
+
const isLoading = ref(true);
|
|
167
|
+
</script>
|
|
168
|
+
|
|
169
|
+
<template>
|
|
170
|
+
<Spinner :spin="true" />
|
|
171
|
+
<Refresh :spin="true" :size="24" />
|
|
172
|
+
<Cog :spin="isLoading" color="gray" />
|
|
173
|
+
</template>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The animation can be overridden via CSS:
|
|
177
|
+
|
|
178
|
+
```css
|
|
179
|
+
.p-icon-spin {
|
|
180
|
+
animation: p-icon-spin 1s linear infinite;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@keyframes p-icon-spin {
|
|
184
|
+
from {
|
|
185
|
+
transform: rotate(0deg);
|
|
186
|
+
}
|
|
187
|
+
to {
|
|
188
|
+
transform: rotate(360deg);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
156
193
|
## CSS Classes
|
|
157
194
|
|
|
158
195
|
Each icon automatically includes these CSS classes:
|
|
@@ -234,8 +271,8 @@ The library includes 300+ icons including:
|
|
|
234
271
|
- Social: `Facebook`, `Twitter`, `Github`, `Linkedin`
|
|
235
272
|
- And many more...
|
|
236
273
|
|
|
237
|
-
View the complete list at [primeicons.
|
|
274
|
+
View the complete list at [primeicons.dev](https://primeicons.dev).
|
|
238
275
|
|
|
239
276
|
## License
|
|
240
277
|
|
|
241
|
-
|
|
278
|
+
Licensed under the [PrimeUI License](https://primeui.dev/licenses) - Copyright (c) [PrimeTek Informatics](https://www.primetek.com.tr)
|
package/dist/esm/core/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { toKebabCase as u } from "@primeuix/utils/object";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
const
|
|
2
|
+
import { defineComponent as p, computed as c, h as l } from "vue";
|
|
3
|
+
const d = ([t, o]) => {
|
|
4
4
|
const { key: i, ...e } = o, n = {};
|
|
5
|
-
for (const [
|
|
6
|
-
n[u(
|
|
7
|
-
return
|
|
8
|
-
},
|
|
5
|
+
for (const [s, r] of Object.entries(e))
|
|
6
|
+
n[u(s)] = r;
|
|
7
|
+
return l(t, { key: i, ...n });
|
|
8
|
+
}, v = (t) => {
|
|
9
9
|
const o = {
|
|
10
10
|
size: {
|
|
11
11
|
type: [Number, String],
|
|
@@ -14,33 +14,37 @@ const m = ([t, o]) => {
|
|
|
14
14
|
color: {
|
|
15
15
|
type: String,
|
|
16
16
|
default: void 0
|
|
17
|
+
},
|
|
18
|
+
spin: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
17
21
|
}
|
|
18
22
|
};
|
|
19
|
-
return { Icon:
|
|
23
|
+
return { Icon: p({
|
|
20
24
|
name: t.name.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(""),
|
|
21
25
|
props: o,
|
|
22
26
|
setup(e, { attrs: n }) {
|
|
23
|
-
const
|
|
27
|
+
const s = c(() => e.size ?? 20), r = c(() => ({
|
|
24
28
|
...e.size && { "--px-icon-size": `${e.size}px` },
|
|
25
29
|
...e.color && { color: e.color }
|
|
26
|
-
})),
|
|
27
|
-
return () =>
|
|
30
|
+
})), a = c(() => ["p-icon", `p-icon-${t.name}`, e.spin && "p-icon-spin"].filter(Boolean));
|
|
31
|
+
return () => l(
|
|
28
32
|
"svg",
|
|
29
33
|
{
|
|
30
34
|
...t.svg,
|
|
31
|
-
width:
|
|
32
|
-
height:
|
|
35
|
+
width: s.value,
|
|
36
|
+
height: s.value,
|
|
33
37
|
"aria-hidden": "true",
|
|
34
38
|
...n,
|
|
35
|
-
style:
|
|
36
|
-
class:
|
|
39
|
+
style: r.value,
|
|
40
|
+
class: a.value
|
|
37
41
|
},
|
|
38
|
-
t.nodes.map(
|
|
42
|
+
t.nodes.map(d)
|
|
39
43
|
);
|
|
40
44
|
}
|
|
41
45
|
}), props: o };
|
|
42
46
|
};
|
|
43
47
|
export {
|
|
44
|
-
|
|
48
|
+
v as createIcon
|
|
45
49
|
};
|
|
46
50
|
//# 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 { toKebabCase } from '@primeuix/utils/object';\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 const kebabAttrs: Record<string, string> = {};\n\n for (const [attr, value] of Object.entries(restAttrs)) {\n kebabAttrs[toKebabCase(attr)] = value;\n }\n\n return h(type, { key, ...kebabAttrs });\n};\n\nexport const createIcon = (iconData: IconData) => {\n const props = {\n size: {\n type: [Number, String] as PropType<number | string>,\n default: undefined\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 ?? 20);\n\n const computedStyle = computed(() => ({\n ...(props.size && { '--px-icon-size': `${props.size}px` }),\n ...(props.color && { color: props.color })\n }));\n\n const computedClass = computed(() => ['p-icon', `p-icon-${iconData.name}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../src/core/index.ts"],"sourcesContent":["import type { IconProps as CoreIconProps, IconData, IconNode } from '@primeicons/core/types';\nimport { toKebabCase } from '@primeuix/utils/object';\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 const kebabAttrs: Record<string, string> = {};\n\n for (const [attr, value] of Object.entries(restAttrs)) {\n kebabAttrs[toKebabCase(attr)] = value;\n }\n\n return h(type, { key, ...kebabAttrs });\n};\n\nexport const createIcon = (iconData: IconData) => {\n const props = {\n size: {\n type: [Number, String] as PropType<number | string>,\n default: undefined\n },\n color: {\n type: String as PropType<string>,\n default: undefined\n },\n spin: {\n type: Boolean as PropType<boolean>,\n default: false\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 ?? 20);\n\n const computedStyle = computed(() => ({\n ...(props.size && { '--px-icon-size': `${props.size}px` }),\n ...(props.color && { color: props.color })\n }));\n\n const computedClass = computed(() => ['p-icon', `p-icon-${iconData.name}`, props.spin && 'p-icon-spin'].filter(Boolean));\n\n return () =>\n h(\n 'svg',\n {\n ...iconData.svg,\n width: computedSize.value,\n height: computedSize.value,\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","kebabAttrs","attr","value","toKebabCase","h","createIcon","iconData","props","defineComponent","s","computedSize","computed","computedStyle","computedClass"],"mappings":";;AAMA,MAAMA,IAAa,CAAC,CAACC,GAAMC,CAAK,MAAgB;AAC5C,QAAM,EAAE,KAAAC,GAAK,GAAGC,EAAA,IAAcF,GACxBG,IAAqC,CAAA;AAE3C,aAAW,CAACC,GAAMC,CAAK,KAAK,OAAO,QAAQH,CAAS;AAChD,IAAAC,EAAWG,EAAYF,CAAI,CAAC,IAAIC;AAGpC,SAAOE,EAAER,GAAM,EAAE,KAAAE,GAAK,GAAGE,GAAY;AACzC,GAEaK,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,IAEb,MAAM;AAAA,MACF,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,EACb;AAoCJ,SAAO,EAAE,MAjCIC,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,OAAAV,KAAS;AACpB,YAAMa,IAAeC,EAAS,MAAMJ,EAAM,QAAQ,EAAE,GAE9CK,IAAgBD,EAAS,OAAO;AAAA,QAClC,GAAIJ,EAAM,QAAQ,EAAE,kBAAkB,GAAGA,EAAM,IAAI,KAAA;AAAA,QACnD,GAAIA,EAAM,SAAS,EAAE,OAAOA,EAAM,MAAA;AAAA,MAAM,EAC1C,GAEIM,IAAgBF,EAAS,MAAM,CAAC,UAAU,UAAUL,EAAS,IAAI,IAAIC,EAAM,QAAQ,aAAa,EAAE,OAAO,OAAO,CAAC;AAEvH,aAAO,MACHH;AAAA,QACI;AAAA,QACA;AAAA,UACI,GAAGE,EAAS;AAAA,UACZ,OAAOI,EAAa;AAAA,UACpB,QAAQA,EAAa;AAAA,UACrB,eAAe;AAAA,UACf,GAAGb;AAAA,UACH,OAAOe,EAAc;AAAA,UACrB,OAAOC,EAAc;AAAA,QAAA;AAAA,QAEzBP,EAAS,MAAM,IAAIX,CAAU;AAAA,MAAA;AAAA,IAEzC;AAAA,EAAA,CACH,GAEc,OAAAY,EAAA;AACnB;"}
|
package/dist/lib/core/index.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ export declare const createIcon: (iconData: IconData) => {
|
|
|
12
12
|
type: PropType<string>;
|
|
13
13
|
default: undefined;
|
|
14
14
|
};
|
|
15
|
+
spin: {
|
|
16
|
+
type: PropType<boolean>;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
15
19
|
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
16
20
|
[key: string]: any;
|
|
17
21
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -23,9 +27,14 @@ export declare const createIcon: (iconData: IconData) => {
|
|
|
23
27
|
type: PropType<string>;
|
|
24
28
|
default: undefined;
|
|
25
29
|
};
|
|
30
|
+
spin: {
|
|
31
|
+
type: PropType<boolean>;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
26
34
|
}>> & Readonly<{}>, {
|
|
27
35
|
size: string | number;
|
|
28
36
|
color: string;
|
|
37
|
+
spin: boolean;
|
|
29
38
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
30
39
|
props: {
|
|
31
40
|
size: {
|
|
@@ -36,6 +45,10 @@ export declare const createIcon: (iconData: IconData) => {
|
|
|
36
45
|
type: PropType<string>;
|
|
37
46
|
default: undefined;
|
|
38
47
|
};
|
|
48
|
+
spin: {
|
|
49
|
+
type: PropType<boolean>;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
39
52
|
};
|
|
40
53
|
};
|
|
41
54
|
export type { CoreIconProps, IconData };
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primeicons/vue",
|
|
3
|
-
"version": "8.0.0-
|
|
3
|
+
"version": "8.0.0-rc.1",
|
|
4
4
|
"author": "PrimeTek Informatics",
|
|
5
|
-
"homepage": "https://primeicons.
|
|
5
|
+
"homepage": "https://primeicons.dev/",
|
|
6
6
|
"description": "PrimeIcons for Vue 3 - 300+ customizable SVG icons as Vue components",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"primeicons",
|
|
@@ -13,14 +13,9 @@
|
|
|
13
13
|
"vue-icons",
|
|
14
14
|
"icon-components"
|
|
15
15
|
],
|
|
16
|
-
"license": "
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/primefaces/primeicons.git",
|
|
20
|
-
"directory": "packages/@primeicons/vue"
|
|
21
|
-
},
|
|
16
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
22
17
|
"bugs": {
|
|
23
|
-
"url": "https://
|
|
18
|
+
"url": "https://support.primeui.dev"
|
|
24
19
|
},
|
|
25
20
|
"main": "./dist/esm/index.mjs",
|
|
26
21
|
"module": "./dist/esm/index.mjs",
|
|
@@ -50,11 +45,11 @@
|
|
|
50
45
|
"files": [
|
|
51
46
|
"dist",
|
|
52
47
|
"README.md",
|
|
53
|
-
"LICENSE"
|
|
48
|
+
"LICENSE.md"
|
|
54
49
|
],
|
|
55
50
|
"dependencies": {
|
|
56
51
|
"@primeuix/utils": "^0.6.4",
|
|
57
|
-
"@primeicons/core": "8.0.0-
|
|
52
|
+
"@primeicons/core": "8.0.0-rc.1"
|
|
58
53
|
},
|
|
59
54
|
"peerDependencies": {
|
|
60
55
|
"vue": "^3"
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 PrimeTek Informatics
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|