@swoozh/icons-svelte 0.0.0-stage → 0.1.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 +57 -0
- package/README.md +11 -2
- package/dist/Icon.svelte +11 -0
- package/dist/StrokeIcon.svelte +11 -0
- package/dist/icons.d.ts +1776 -0
- package/dist/icons.js +1778 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/stroke-icons.d.ts +1776 -0
- package/dist/stroke-icons.js +1779 -0
- package/dist/stroke.d.ts +4 -0
- package/dist/stroke.js +2 -0
- package/package.json +46 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
Swoozh Icons License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Richard Walander. All rights reserved.
|
|
4
|
+
|
|
5
|
+
The Swoozh Icons (the "Icons"), including the SVG files, icon font, framework
|
|
6
|
+
components and metadata in this repository and its packages, are licensed, not
|
|
7
|
+
sold, under the terms below.
|
|
8
|
+
|
|
9
|
+
1. Permission
|
|
10
|
+
|
|
11
|
+
You may use the Icons, free of charge, in your own projects, including
|
|
12
|
+
commercial ones (websites, apps, online stores, print, presentations and
|
|
13
|
+
client work), provided you follow the conditions in this license.
|
|
14
|
+
|
|
15
|
+
You may adjust the Icons for your own use (colour, size, stroke width,
|
|
16
|
+
embedding in your own components or build).
|
|
17
|
+
|
|
18
|
+
2. Attribution
|
|
19
|
+
|
|
20
|
+
You must credit "Icons by Swoozh" with a link to the Swoozh Icons website
|
|
21
|
+
in a reasonable, visible place in or alongside your project, for example a
|
|
22
|
+
credits page, an about page or the footer. You do not need to credit
|
|
23
|
+
individual icons.
|
|
24
|
+
|
|
25
|
+
3. Restrictions
|
|
26
|
+
|
|
27
|
+
You may not:
|
|
28
|
+
a) sell, sublicense, rent or lease the Icons, alone or as part of a
|
|
29
|
+
collection;
|
|
30
|
+
b) redistribute the Icons, in original or modified form, as a standalone
|
|
31
|
+
resource, icon set, library, font, package, template or similar
|
|
32
|
+
collection, whether free or paid;
|
|
33
|
+
c) publish the Icon files in a public repository or on a download or
|
|
34
|
+
marketplace site, other than as an unavoidable part of your own
|
|
35
|
+
project's delivered output;
|
|
36
|
+
d) claim the Icons as your own work, or imply that Swoozh or its author
|
|
37
|
+
endorses your project.
|
|
38
|
+
|
|
39
|
+
Icons that are part of your delivered product (for example inlined in
|
|
40
|
+
a website or bundled in an app) are not considered redistribution, as long
|
|
41
|
+
as they cannot be extracted as a standalone icon set.
|
|
42
|
+
|
|
43
|
+
4. Ownership
|
|
44
|
+
|
|
45
|
+
The author retains all rights, title and interest in the Icons. Rights not
|
|
46
|
+
expressly granted are reserved.
|
|
47
|
+
|
|
48
|
+
5. No warranty
|
|
49
|
+
|
|
50
|
+
THE ICONS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
51
|
+
IMPLIED. THE AUTHOR IS NOT LIABLE FOR ANY CLAIM OR DAMAGES ARISING FROM
|
|
52
|
+
THE USE OF THE ICONS.
|
|
53
|
+
|
|
54
|
+
6. Termination
|
|
55
|
+
|
|
56
|
+
This license terminates automatically if you breach it. On termination you
|
|
57
|
+
must stop using the Icons.
|
package/README.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @swoozh/icons-svelte
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Swoozh Icons for Svelte 4 and 5.
|
|
4
|
+
|
|
5
|
+
```svelte
|
|
6
|
+
<script>
|
|
7
|
+
import { Icon, ShoppingBag } from '@swoozh/icons-svelte';
|
|
8
|
+
</script>
|
|
9
|
+
<Icon icon={ShoppingBag} variant="filled" size={20} />
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Full docs: `site/docs.html`.
|
package/dist/Icon.svelte
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
/** @type {{outline: string, filled: string}} */
|
|
3
|
+
export let icon;
|
|
4
|
+
/** @type {'outline' | 'filled'} */
|
|
5
|
+
export let variant = 'outline';
|
|
6
|
+
export let size = 24;
|
|
7
|
+
export let color = 'currentColor';
|
|
8
|
+
export let title = undefined;
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width={size} height={size} fill={color} aria-hidden={title ? undefined : 'true'} role={title ? 'img' : undefined} {...$$restProps}>{#if title}<title>{title}</title>{/if}<path d={variant === 'filled' ? icon.filled : icon.outline} /></svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
/** @type {{stroke: string}} */
|
|
3
|
+
export let icon;
|
|
4
|
+
export let strokeWidth = 1.5;
|
|
5
|
+
export let size = 24;
|
|
6
|
+
export let color = 'currentColor';
|
|
7
|
+
export let title = undefined;
|
|
8
|
+
$: markup = (title ? '<title>' + title.replace(/[<&]/g, c => c === '<' ? '<' : '&') + '</title>' : '') + icon.stroke.replace(/stroke-width="([\d.]+)"/g, (_, x) => 'stroke-width="' + +(x * strokeWidth / 1.5).toFixed(3) + '"');
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width={size} height={size} fill="none" stroke={color} stroke-width={strokeWidth} stroke-miterlimit="10" aria-hidden={title ? undefined : 'true'} role={title ? 'img' : undefined} {...$$restProps}>{@html markup}</svg>
|