@solar-icons/svelte 1.0.0
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 +11 -0
- package/LICENSE-THIRD-PARTY +14 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/lib/IconBase.svelte +44 -0
- package/dist/lib/IconBase.svelte.d.ts +14 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/types.d.ts +11 -0
- package/dist/lib/types.js +1 -0
- package/package.json +114 -0
- package/src/index.ts +3 -0
- package/src/lib/IconBase.svelte +44 -0
- package/src/lib/index.ts +2 -0
- package/src/lib/types.ts +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Hakim Saoudi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
The Software may include icons that are licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0). Commercial use is allowed, but attribution is required for the use of these icons. See LICENSE-THIRD-PARTY for more details.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
THIRD-PARTY LICENSES
|
|
2
|
+
|
|
3
|
+
This project includes icons that are licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
|
|
4
|
+
|
|
5
|
+
Attribution Requirement:
|
|
6
|
+
You are allowed to use these icons for commercial and non-commercial purposes, but you must give appropriate credit as required by the CC BY 4.0 license.
|
|
7
|
+
|
|
8
|
+
For more details, please visit: https://creativecommons.org/licenses/by/4.0/
|
|
9
|
+
|
|
10
|
+
List of Third-Party Elements:
|
|
11
|
+
- **Solar Icons Set** By [480 Design](https://www.figma.com/community/file/1166831539721848736)
|
|
12
|
+
|
|
13
|
+
Attribution Instructions:
|
|
14
|
+
When using the icons, please attribute the original authors in a visible way according to the terms of the CC BY 4.0 license.
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
alt?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string | number;
|
|
8
|
+
mirrored?: boolean;
|
|
9
|
+
children?: Snippet;
|
|
10
|
+
class?: string;
|
|
11
|
+
style?: string;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
alt,
|
|
17
|
+
color = 'currentColor',
|
|
18
|
+
size = '1em',
|
|
19
|
+
mirrored = false,
|
|
20
|
+
children,
|
|
21
|
+
class: className,
|
|
22
|
+
style,
|
|
23
|
+
...restProps
|
|
24
|
+
}: Props = $props();
|
|
25
|
+
|
|
26
|
+
const width = $derived(typeof size === 'number' ? `${size}px` : size);
|
|
27
|
+
const height = $derived(typeof size === 'number' ? `${size}px` : size);
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<svg
|
|
31
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
32
|
+
{width}
|
|
33
|
+
{height}
|
|
34
|
+
{color}
|
|
35
|
+
fill="none"
|
|
36
|
+
viewBox="0 0 24 24"
|
|
37
|
+
transform={mirrored ? 'scale(-1, 1)' : undefined}
|
|
38
|
+
class={className}
|
|
39
|
+
{style}
|
|
40
|
+
{...restProps}
|
|
41
|
+
>
|
|
42
|
+
{#if alt}<title>{alt}</title>{/if}
|
|
43
|
+
{@render children?.()}
|
|
44
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
alt?: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
size?: string | number;
|
|
6
|
+
mirrored?: boolean;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
class?: string;
|
|
9
|
+
style?: string;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
declare const IconBase: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type IconBase = ReturnType<typeof IconBase>;
|
|
14
|
+
export default IconBase;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IconBase } from './IconBase.svelte';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SVGAttributes } from 'svelte/elements';
|
|
2
|
+
export type IconStyle = 'Bold' | 'BoldDuotone' | 'Broken' | 'LineDuotone' | 'Linear' | 'Outline';
|
|
3
|
+
export interface IconBaseProps {
|
|
4
|
+
alt?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
size?: string | number;
|
|
7
|
+
mirrored?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type SvgAttributes = SVGAttributes<SVGSVGElement>;
|
|
10
|
+
export interface IconProps extends IconBaseProps, Omit<SvgAttributes, 'color'> {
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@solar-icons/svelte",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"description": "Solar Icons for Svelte",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/saoudi-h/solar-icons.git",
|
|
12
|
+
"directory": "packages/svelte"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"src",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE",
|
|
21
|
+
"LICENSE-THIRD-PARTY"
|
|
22
|
+
],
|
|
23
|
+
"module": "./dist/index.js",
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
"./package.json": "./package.json",
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"svelte": "./dist/index.js",
|
|
31
|
+
"default": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./lib/*": {
|
|
34
|
+
"types": "./dist/lib/*.d.ts",
|
|
35
|
+
"svelte": "./dist/lib/*",
|
|
36
|
+
"default": "./dist/lib/*.js"
|
|
37
|
+
},
|
|
38
|
+
"./category": {
|
|
39
|
+
"types": "./dist/icons/index.d.ts",
|
|
40
|
+
"svelte": "./dist/icons/index.js",
|
|
41
|
+
"default": "./dist/icons/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./category/*": {
|
|
44
|
+
"types": "./dist/icons/*.d.ts",
|
|
45
|
+
"svelte": "./dist/icons/*",
|
|
46
|
+
"default": "./dist/icons/*.js"
|
|
47
|
+
},
|
|
48
|
+
"./*": {
|
|
49
|
+
"types": "./dist/icons/style/*.d.ts",
|
|
50
|
+
"svelte": "./dist/icons/style/*.js",
|
|
51
|
+
"default": "./dist/icons/style/*.js"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@sveltejs/package": "^2.3.10",
|
|
56
|
+
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
57
|
+
"@types/node": "^25.0.3",
|
|
58
|
+
"picocolors": "^1.1.1",
|
|
59
|
+
"prettier": "^3.7.4",
|
|
60
|
+
"prettier-plugin-svelte": "^3.4.1",
|
|
61
|
+
"rimraf": "^6.1.2",
|
|
62
|
+
"rollup-plugin-svelte": "^7.2.3",
|
|
63
|
+
"svelte-check": "^4.1.4",
|
|
64
|
+
"svelte-preprocess": "^6.0.3",
|
|
65
|
+
"svelte2tsx": "^0.7.45",
|
|
66
|
+
"tsdown": "^0.18.4",
|
|
67
|
+
"tsx": "^4.21.0",
|
|
68
|
+
"typescript": "^5.9.3",
|
|
69
|
+
"vitest": "^4.0.16",
|
|
70
|
+
"@solar-icons/core": "1.0.1",
|
|
71
|
+
"@solar-icons/tsconfig": "1.0.0",
|
|
72
|
+
"@solar-icons/prettier": "1.0.0",
|
|
73
|
+
"@solar-icons/eslint": "1.0.0"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"svelte": ">= 4.0.0"
|
|
77
|
+
},
|
|
78
|
+
"engines": {
|
|
79
|
+
"node": ">=16"
|
|
80
|
+
},
|
|
81
|
+
"keywords": [
|
|
82
|
+
"svelte",
|
|
83
|
+
"icons",
|
|
84
|
+
"svg",
|
|
85
|
+
"solar",
|
|
86
|
+
"design",
|
|
87
|
+
"interface",
|
|
88
|
+
"phosphor",
|
|
89
|
+
"UI",
|
|
90
|
+
"UX"
|
|
91
|
+
],
|
|
92
|
+
"author": {
|
|
93
|
+
"name": "Saoudi Hakim",
|
|
94
|
+
"url": "https://hakimsaoudi.dev",
|
|
95
|
+
"email": "saoudihakim@gmail.com"
|
|
96
|
+
},
|
|
97
|
+
"license": "MIT",
|
|
98
|
+
"bugs": {
|
|
99
|
+
"url": "https://github.com/saoudi-h/solar-icons/issues"
|
|
100
|
+
},
|
|
101
|
+
"scripts": {
|
|
102
|
+
"build": "pnpm copy:licenses && pnpm build:package",
|
|
103
|
+
"build:package": "svelte-package --input ./src",
|
|
104
|
+
"copy:licenses": "cp ../../LICENSE ./LICENSE && cp ../../LICENSE-THIRD-PARTY ./LICENSE-THIRD-PARTY",
|
|
105
|
+
"generate:assets": "tsx scripts/generate-assets.ts",
|
|
106
|
+
"lint": "eslint . --max-warnings 0",
|
|
107
|
+
"lint:fix": "eslint . --fix",
|
|
108
|
+
"format:check": "prettier \"**/*\" --ignore-unknown --list-different",
|
|
109
|
+
"format:fix": "prettier \"**/*\" --ignore-unknown --write",
|
|
110
|
+
"clean": "rimraf *.tsbuildinfo node_modules build dist",
|
|
111
|
+
"typecheck": "tsc --noEmit",
|
|
112
|
+
"pre-commit": "lint-staged"
|
|
113
|
+
}
|
|
114
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
alt?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: string | number;
|
|
8
|
+
mirrored?: boolean;
|
|
9
|
+
children?: Snippet;
|
|
10
|
+
class?: string;
|
|
11
|
+
style?: string;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
alt,
|
|
17
|
+
color = 'currentColor',
|
|
18
|
+
size = '1em',
|
|
19
|
+
mirrored = false,
|
|
20
|
+
children,
|
|
21
|
+
class: className,
|
|
22
|
+
style,
|
|
23
|
+
...restProps
|
|
24
|
+
}: Props = $props();
|
|
25
|
+
|
|
26
|
+
const width = $derived(typeof size === 'number' ? `${size}px` : size);
|
|
27
|
+
const height = $derived(typeof size === 'number' ? `${size}px` : size);
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<svg
|
|
31
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
32
|
+
{width}
|
|
33
|
+
{height}
|
|
34
|
+
{color}
|
|
35
|
+
fill="none"
|
|
36
|
+
viewBox="0 0 24 24"
|
|
37
|
+
transform={mirrored ? 'scale(-1, 1)' : undefined}
|
|
38
|
+
class={className}
|
|
39
|
+
{style}
|
|
40
|
+
{...restProps}
|
|
41
|
+
>
|
|
42
|
+
{#if alt}<title>{alt}</title>{/if}
|
|
43
|
+
{@render children?.()}
|
|
44
|
+
</svg>
|
package/src/lib/index.ts
ADDED
package/src/lib/types.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SVGAttributes } from 'svelte/elements';
|
|
2
|
+
|
|
3
|
+
export type IconStyle = 'Bold' | 'BoldDuotone' | 'Broken' | 'LineDuotone' | 'Linear' | 'Outline';
|
|
4
|
+
|
|
5
|
+
export interface IconBaseProps {
|
|
6
|
+
alt?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
size?: string | number;
|
|
9
|
+
mirrored?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type SvgAttributes = SVGAttributes<SVGSVGElement>;
|
|
13
|
+
|
|
14
|
+
export interface IconProps extends IconBaseProps, Omit<SvgAttributes, 'color'> {}
|