@iconmu/svelte 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 +67 -0
- package/dist/components/Iconmu.svelte +21 -0
- package/dist/components/Iconmu.svelte.d.ts +25 -0
- package/dist/components/Iconmu.svelte.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/package.json +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# @iconmu/svelte
|
|
2
|
+
|
|
3
|
+
Svelte component for Iconmu icon library.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add @iconmu/svelte
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Basic Example
|
|
14
|
+
|
|
15
|
+
```svelte
|
|
16
|
+
<script>
|
|
17
|
+
import { Iconmu } from "@iconmu/svelte";
|
|
18
|
+
import { Home } from "@iconmu/base-line";
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<Iconmu icon={Home} size={24} />
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### With All Icon Styles
|
|
25
|
+
|
|
26
|
+
```svelte
|
|
27
|
+
<script>
|
|
28
|
+
import { Iconmu } from "@iconmu/svelte";
|
|
29
|
+
import { Home as HomeBaseLine } from "@iconmu/base-line";
|
|
30
|
+
import { Home as HomeBaseSolid } from "@iconmu/base-solid";
|
|
31
|
+
import { Home as HomeSharpLine } from "@iconmu/sharp-line";
|
|
32
|
+
import { Home as HomeSharpSolid } from "@iconmu/sharp-solid";
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<Iconmu icon={HomeBaseLine} size={32} class="fill-neutral-950" />
|
|
36
|
+
<Iconmu icon={HomeBaseSolid} size={32} class="fill-neutral-950" />
|
|
37
|
+
<Iconmu icon={HomeSharpLine} size={32} class="fill-neutral-950" />
|
|
38
|
+
<Iconmu icon={HomeSharpSolid} size={32} class="fill-neutral-950" />
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### With Custom Color
|
|
42
|
+
|
|
43
|
+
```svelte
|
|
44
|
+
<script>
|
|
45
|
+
import { Iconmu } from "@iconmu/svelte";
|
|
46
|
+
import { Home } from "@iconmu/base-line";
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<Iconmu icon={Home} size={48} color="#3B82F6" />
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Props
|
|
53
|
+
|
|
54
|
+
| Prop | Type | Default | Description |
|
|
55
|
+
| ------- | -------------------------------------- | ---------------- | ------------------------------ |
|
|
56
|
+
| `icon` | `{ content: string, viewBox?: string }` | required | Icon object from icon packages |
|
|
57
|
+
| `size` | `number` | `24` | Icon size in pixels |
|
|
58
|
+
| `color` | `string` | `"currentColor"` | Icon color (CSS color value) |
|
|
59
|
+
| `className` | `string` | `""` | Additional CSS classes |
|
|
60
|
+
|
|
61
|
+
## Peer Dependencies
|
|
62
|
+
|
|
63
|
+
- `svelte` ^4.0.0
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
MIT
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script>export let icon;
|
|
2
|
+
export let size = 24;
|
|
3
|
+
export let color = "currentColor";
|
|
4
|
+
export let className = "";
|
|
5
|
+
if (!icon?.content) {
|
|
6
|
+
console.warn("Icon component requires an icon object with content");
|
|
7
|
+
}
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<svg
|
|
11
|
+
width={size}
|
|
12
|
+
height={size}
|
|
13
|
+
viewBox='0 0 40 40'
|
|
14
|
+
fill="currentColor"
|
|
15
|
+
color={color}
|
|
16
|
+
class={className}
|
|
17
|
+
style="color: {color}"
|
|
18
|
+
{...$$restProps}
|
|
19
|
+
>
|
|
20
|
+
{@html icon.content}
|
|
21
|
+
</svg>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
icon: {
|
|
6
|
+
content: string;
|
|
7
|
+
};
|
|
8
|
+
size?: number | undefined;
|
|
9
|
+
color?: string | undefined;
|
|
10
|
+
className?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
events: {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
};
|
|
15
|
+
slots: {};
|
|
16
|
+
exports?: undefined;
|
|
17
|
+
bindings?: undefined;
|
|
18
|
+
};
|
|
19
|
+
export type IconmuProps = typeof __propDef.props;
|
|
20
|
+
export type IconmuEvents = typeof __propDef.events;
|
|
21
|
+
export type IconmuSlots = typeof __propDef.slots;
|
|
22
|
+
export default class Iconmu extends SvelteComponent<IconmuProps, IconmuEvents, IconmuSlots> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=Iconmu.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Iconmu.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/Iconmu.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAEvC;AAsBD,QAAA,MAAM,SAAS;;;;qBAnBJ,MAAM;;eAkB0F,MAAM;gBAAU,MAAM;oBAAc,MAAM;;;;;;;;CACrE,CAAC;AACjF,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACjD,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,eAAe,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,CAAC;CAC1F"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@iconmu/svelte",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Svelte component for Iconmu icon library",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"svelte": "./dist/components/Iconmu.svelte",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"svelte": "./dist/components/Iconmu.svelte",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/**/*"
|
|
16
|
+
],
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "svelte-package",
|
|
20
|
+
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
21
|
+
"clean": "rm -rf dist"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"icons",
|
|
25
|
+
"svelte",
|
|
26
|
+
"svelte-components",
|
|
27
|
+
"icon-library",
|
|
28
|
+
"svg",
|
|
29
|
+
"iconmu"
|
|
30
|
+
],
|
|
31
|
+
"author": "afrianska",
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"svelte": "^4.0.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@sveltejs/package": "^2.3.0",
|
|
38
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
39
|
+
"svelte": "^4.2.0",
|
|
40
|
+
"svelte-check": "^3.6.0",
|
|
41
|
+
"svelte-preprocess": "^6.0.3",
|
|
42
|
+
"tslib": "^2.6.0",
|
|
43
|
+
"typescript": "^5.9.2"
|
|
44
|
+
}
|
|
45
|
+
}
|