@iconmu/vue 0.0.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/README.md +73 -0
- package/dist/components/Iconmu.vue.d.ts +41 -0
- package/dist/components/Iconmu.vue.d.ts.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/package.json +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# @iconmu/vue
|
|
2
|
+
|
|
3
|
+
Vue 3 component for Iconmu icon library.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add @iconmu/vue
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Basic Example
|
|
14
|
+
|
|
15
|
+
```vue
|
|
16
|
+
<script setup>
|
|
17
|
+
import { Iconmu } from "@iconmu/vue";
|
|
18
|
+
import { Home } from "@iconmu/base-line";
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<Iconmu :icon="Home" :size="24" />
|
|
23
|
+
</template>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### With All Icon Styles
|
|
27
|
+
|
|
28
|
+
```vue
|
|
29
|
+
<script setup>
|
|
30
|
+
import { Iconmu } from "@iconmu/vue";
|
|
31
|
+
import { Home as HomeBaseLine } from "@iconmu/base-line";
|
|
32
|
+
import { Home as HomeBaseSolid } from "@iconmu/base-solid";
|
|
33
|
+
import { Home as HomeSharpLine } from "@iconmu/sharp-line";
|
|
34
|
+
import { Home as HomeSharpSolid } from "@iconmu/sharp-solid";
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<Iconmu :icon="HomeBaseLine" :size="32" class="fill-neutral-950" />
|
|
39
|
+
<Iconmu :icon="HomeBaseSolid" :size="32" class="fill-neutral-950" />
|
|
40
|
+
<Iconmu :icon="HomeSharpLine" :size="32" class="fill-neutral-950" />
|
|
41
|
+
<Iconmu :icon="HomeSharpSolid" :size="32" class="fill-neutral-950" />
|
|
42
|
+
</template>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### With Custom Color
|
|
46
|
+
|
|
47
|
+
```vue
|
|
48
|
+
<script setup>
|
|
49
|
+
import { Iconmu } from "@iconmu/vue";
|
|
50
|
+
import { Home } from "@iconmu/base-line";
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<Iconmu :icon="Home" :size="48" color="#3B82F6" />
|
|
55
|
+
</template>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Props
|
|
59
|
+
|
|
60
|
+
| Prop | Type | Default | Description |
|
|
61
|
+
| ------- | -------------------------------------- | ---------------- | ------------------------------ |
|
|
62
|
+
| `icon` | `{ content: string, viewBox?: string }` | required | Icon object from icon packages |
|
|
63
|
+
| `size` | `number` | `24` | Icon size in pixels |
|
|
64
|
+
| `color` | `string` | `"currentColor"` | Icon color (CSS color value) |
|
|
65
|
+
| `className` | `string` | `""` | Additional CSS classes |
|
|
66
|
+
|
|
67
|
+
## Peer Dependencies
|
|
68
|
+
|
|
69
|
+
- `vue` ^3.0.0
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
MIT
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
interface IconType {
|
|
2
|
+
content: string;
|
|
3
|
+
}
|
|
4
|
+
interface Props {
|
|
5
|
+
icon: IconType;
|
|
6
|
+
size?: number;
|
|
7
|
+
color?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
11
|
+
size: number;
|
|
12
|
+
color: string;
|
|
13
|
+
className: string;
|
|
14
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
15
|
+
size: number;
|
|
16
|
+
color: string;
|
|
17
|
+
className: string;
|
|
18
|
+
}>>> & Readonly<{}>, {
|
|
19
|
+
size: number;
|
|
20
|
+
color: string;
|
|
21
|
+
className: string;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
25
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
26
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
28
|
+
} : {
|
|
29
|
+
type: import('vue').PropType<T[K]>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
type __VLS_WithDefaults<P, D> = {
|
|
34
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
35
|
+
default: D[K];
|
|
36
|
+
}> : P[K];
|
|
37
|
+
};
|
|
38
|
+
type __VLS_Prettify<T> = {
|
|
39
|
+
[K in keyof T]: T[K];
|
|
40
|
+
} & {};
|
|
41
|
+
//# sourceMappingURL=Iconmu.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Iconmu.vue.d.ts","sourceRoot":"","sources":["../../src/components/Iconmu.vue"],"names":[],"mappings":"AAYA;AAIA,UAAU,QAAQ;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,KAAK;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;;;;;;;;;;UAHQ,MAAM;WACL,MAAM;eACF,MAAM;;AA8DpB,wBAMG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),c=["width","height","color","innerHTML"],t=o.defineComponent({__name:"Iconmu",props:{icon:{},size:{default:24},color:{default:"currentColor"},className:{default:""}},setup(e){var n;return(n=e.icon)!=null&&n.content||console.warn('Iconmu: Icon object requires "content" property'),(r,i)=>(o.openBlock(),o.createElementBlock("svg",{width:e.size,height:e.size,viewBox:"0 0 40 40",fill:"currentColor",color:e.color,class:o.normalizeClass(e.className),style:o.normalizeStyle({color:e.color}),innerHTML:e.icon.content},null,14,c))}});exports.Iconmu=t;exports.default=t;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent as n, openBlock as c, createElementBlock as t, normalizeStyle as l, normalizeClass as r } from "vue";
|
|
2
|
+
const i = ["width", "height", "color", "innerHTML"], f = /* @__PURE__ */ n({
|
|
3
|
+
__name: "Iconmu",
|
|
4
|
+
props: {
|
|
5
|
+
icon: {},
|
|
6
|
+
size: { default: 24 },
|
|
7
|
+
color: { default: "currentColor" },
|
|
8
|
+
className: { default: "" }
|
|
9
|
+
},
|
|
10
|
+
setup(e) {
|
|
11
|
+
var o;
|
|
12
|
+
return (o = e.icon) != null && o.content || console.warn('Iconmu: Icon object requires "content" property'), (a, u) => (c(), t("svg", {
|
|
13
|
+
width: e.size,
|
|
14
|
+
height: e.size,
|
|
15
|
+
viewBox: "0 0 40 40",
|
|
16
|
+
fill: "currentColor",
|
|
17
|
+
color: e.color,
|
|
18
|
+
class: r(e.className),
|
|
19
|
+
style: l({ color: e.color }),
|
|
20
|
+
innerHTML: e.icon.content
|
|
21
|
+
}, null, 14, i));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
f as Iconmu,
|
|
26
|
+
f as default
|
|
27
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@iconmu/vue",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Vue 3 component for Iconmu icon library",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./dist/index.js",
|
|
9
|
+
"require": "./dist/index.cjs",
|
|
10
|
+
"types": "./dist/index.d.ts"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist/**/*"
|
|
15
|
+
],
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "vite build",
|
|
19
|
+
"clean": "rm -rf dist"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"icons",
|
|
23
|
+
"vue",
|
|
24
|
+
"vue3",
|
|
25
|
+
"vue-components",
|
|
26
|
+
"icon-library",
|
|
27
|
+
"svg",
|
|
28
|
+
"iconmu"
|
|
29
|
+
],
|
|
30
|
+
"author": "afrianska",
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"vue": "^3.0.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
37
|
+
"typescript": "^5.9.2",
|
|
38
|
+
"vite": "^5.0.0",
|
|
39
|
+
"vite-plugin-dts": "^3.0.0",
|
|
40
|
+
"vue": "^3.4.0"
|
|
41
|
+
}
|
|
42
|
+
}
|