@rokkit/icons 1.0.0-next.132 → 1.0.0-next.134

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jerry Thomas
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.
package/README.md CHANGED
@@ -1 +1,104 @@
1
- # Icons
1
+ # @rokkit/icons
2
+
3
+ Minimal icon set for Rokkit applications, bundled as Iconify JSON.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ bun add @rokkit/icons
9
+ # or
10
+ npm install @rokkit/icons
11
+ ```
12
+
13
+ No runtime dependencies.
14
+
15
+ ## Overview
16
+
17
+ `@rokkit/icons` ships a curated set of SVG icons as Iconify-compatible JSON bundles. Each bundle is available as a named subpath export.
18
+
19
+ | Subpath | Collection | Description |
20
+ | ------------------------------- | ------------------- | ------------------------------------------- |
21
+ | `@rokkit/icons` (default) | `rokkit-ui` | Base UI icons — navigation, actions, states |
22
+ | `@rokkit/icons/ui.json` | `rokkit-ui` | Same as default |
23
+ | `@rokkit/icons/light.json` | `rokkit-light` | Outlined lightweight icons |
24
+ | `@rokkit/icons/solid.json` | `rokkit-solid` | Solid filled icons |
25
+ | `@rokkit/icons/twotone.json` | `rokkit-twotone` | Two-tone icons |
26
+ | `@rokkit/icons/components.json` | `rokkit-components` | Component-specific icons |
27
+ | `@rokkit/icons/auth.json` | `rokkit-auth` | Authentication icons (login, logout, user) |
28
+ | `@rokkit/icons/app.json` | `rokkit-app` | Application icons |
29
+
30
+ ## Usage
31
+
32
+ ### With `@rokkit/unocss` (recommended)
33
+
34
+ Icons are available automatically when using `presetRokkit()`. Reference them as UnoCSS utility classes:
35
+
36
+ ```html
37
+ <span class="i-rokkit-ui:menu"></span>
38
+ <span class="i-rokkit-solid:check"></span>
39
+ <span class="i-rokkit-light:close"></span>
40
+ <span class="i-rokkit-auth:login"></span>
41
+ ```
42
+
43
+ ### With UnoCSS directly
44
+
45
+ ```ts
46
+ // uno.config.ts
47
+ import { defineConfig, presetIcons } from 'unocss'
48
+ import uiIcons from '@rokkit/icons/ui.json'
49
+ import solidIcons from '@rokkit/icons/solid.json'
50
+
51
+ export default defineConfig({
52
+ presets: [
53
+ presetIcons({
54
+ collections: {
55
+ 'rokkit-ui': () => uiIcons,
56
+ 'rokkit-solid': () => solidIcons
57
+ }
58
+ })
59
+ ]
60
+ })
61
+ ```
62
+
63
+ ### With Iconify runtime
64
+
65
+ ```js
66
+ import { addCollection } from '@iconify/svelte'
67
+ import uiIcons from '@rokkit/icons/ui.json'
68
+ import authIcons from '@rokkit/icons/auth.json'
69
+
70
+ addCollection(uiIcons)
71
+ addCollection(authIcons)
72
+ ```
73
+
74
+ ```svelte
75
+ <script>
76
+ import { Icon } from '@iconify/svelte'
77
+ </script>
78
+
79
+ <Icon icon="rokkit-ui:menu" />
80
+ <Icon icon="rokkit-auth:login" />
81
+ ```
82
+
83
+ ### Direct import (framework-agnostic)
84
+
85
+ Each bundle is a standard Iconify JSON file. Import and use it with any Iconify-compatible tooling:
86
+
87
+ ```js
88
+ import icons from '@rokkit/icons/solid.json'
89
+
90
+ // icons.prefix → "rokkit-solid"
91
+ // icons.icons → { "check": { body: "..." }, ... }
92
+ ```
93
+
94
+ ## Building Custom Icon Sets
95
+
96
+ Use `@rokkit/cli` to bundle your own SVG folders into Iconify JSON in the same format:
97
+
98
+ ```bash
99
+ bunx @rokkit/cli bundle -i ./my-icons -o ./lib
100
+ ```
101
+
102
+ ---
103
+
104
+ Part of [Rokkit](https://github.com/jerrythomas/rokkit) — a Svelte 5 component library and design system.
@@ -110,7 +110,7 @@
110
110
  "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M3 15c0 2.828 0 4.243.879 5.121C4.757 21 6.172 21 9 21h6c2.828 0 4.243 0 5.121-.879C21 19.243 21 17.828 21 15\" opacity=\".5\"/><path d=\"M12 16V3m0 0 4 4.375M12 3 8 7.375\"/></g>"
111
111
  }
112
112
  },
113
- "lastModified": 1772509584,
113
+ "lastModified": 1773334675,
114
114
  "width": 24,
115
115
  "height": 24
116
116
  }
package/lib/app.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "prefix": "app",
3
- "lastModified": 1772509584,
3
+ "lastModified": 1773334675,
4
4
  "icons": {
5
5
  "alert-bell": {
6
6
  "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"><path d=\"M18.75 9.71v-.705C18.75 5.136 15.726 2 12 2S5.25 5.136 5.25 9.005v.705a4.4 4.4 0 01-.692 2.375L3.45 13.81c-1.011 1.575-.239 3.716 1.52 4.214a25.8 25.8 0 0014.06 0c1.759-.498 2.531-2.639 1.52-4.213l-1.108-1.725a4.4 4.4 0 01-.693-2.375Z\"/><path stroke-linecap=\"round\" d=\"M7.5 19c.655 1.748 2.422 3 4.5 3s3.845-1.252 4.5-3\" opacity=\".5\"/></g>"