spoko-design-system 0.2.98 → 0.3.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.
@@ -0,0 +1,28 @@
1
+ export const iconCollections = [
2
+ 'ant-design',
3
+ 'bi',
4
+ 'bx',
5
+ 'carbon',
6
+ 'circle-flags',
7
+ 'ei',
8
+ 'el',
9
+ 'eos-icons',
10
+ 'et',
11
+ 'flowbite',
12
+ 'fluent',
13
+ 'fluent-emoji',
14
+ 'ic',
15
+ 'icon-park-outline',
16
+ 'la',
17
+ 'material-symbols-light',
18
+ 'mdi',
19
+ 'noto-v1',
20
+ 'octicon',
21
+ 'ph',
22
+ 'simple-icons',
23
+ 'system-uicons',
24
+ 'uil'
25
+ ];
26
+
27
+ export const getIconifyPackages = () =>
28
+ iconCollections.map(name => `@iconify-json/${name}`);
package/icon.config.ts CHANGED
@@ -1,230 +1,274 @@
1
+ // icon.config.ts
2
+
1
3
  interface IconConfig {
2
- include: {
3
- [key: string]: string[];
4
- }
4
+ include: {
5
+ [key: string]: string[];
6
+ }
7
+ }
8
+
9
+ // Lista wszystkich wspieranych kolekcji
10
+ export const iconCollections = [
11
+ 'ant-design',
12
+ 'bi',
13
+ 'bx',
14
+ 'carbon',
15
+ 'circle-flags',
16
+ 'ei',
17
+ 'el',
18
+ 'eos-icons',
19
+ 'et',
20
+ 'flowbite',
21
+ 'fluent',
22
+ 'fluent-emoji',
23
+ 'ic',
24
+ 'icon-park-outline',
25
+ 'la',
26
+ 'material-symbols-light',
27
+ 'mdi',
28
+ 'noto-v1',
29
+ 'octicon',
30
+ 'ph',
31
+ 'simple-icons',
32
+ 'system-uicons',
33
+ 'uil'
34
+ ] as const;
35
+
36
+ export type IconCollectionName = typeof iconCollections[number];
37
+
38
+ export const iconConfig: IconConfig = {
39
+ include: {
40
+ mdi: [
41
+ // Social
42
+ "npm",
43
+ "github",
44
+ "facebook",
45
+ "instagram",
46
+
47
+ // Notes & Content
48
+ "post-it-note-edit-outline",
49
+
50
+ // Car related
51
+ "car-hatchback",
52
+ "car-door",
53
+ "car-side",
54
+ "car-windshield-outline",
55
+ "car-light-alert",
56
+ "car-tire-alert",
57
+ "car-light-dimmed",
58
+ "car-light-fog",
59
+ "car-light-high",
60
+ "car-parking-lights",
61
+ "car-esp",
62
+ "car-brake-abs",
63
+ "car-horn",
64
+ "engine-outline",
65
+
66
+ // Climate & Temperature
67
+ "fan",
68
+ "fan-off",
69
+ "air-conditioner",
70
+ "coolant-temperature",
71
+
72
+ // Alerts & Warnings
73
+ "car-brake-alert",
74
+ "car-traction-control",
75
+
76
+ // Other
77
+ "card-text-outline",
78
+ "fuel",
79
+ "oil",
80
+ "hazard-lights",
81
+ "credit-card-outline"
82
+ ],
83
+
84
+ "ant-design": [
85
+ "menu-fold-outlined",
86
+ "menu-unfold-outlined",
87
+ "menu-outlined",
88
+ "bars-outlined",
89
+ "appstore-outlined",
90
+ "cluster-outlined",
91
+ "audit-outlined",
92
+ "build-twotone",
93
+ "home-outlined",
94
+ "close-outlined"
95
+ ],
96
+
97
+ bi: [
98
+ "envelope-open",
99
+ "credit-card",
100
+ "qr-code",
101
+ "list-check",
102
+ "list-task",
103
+ "text-indent-left",
104
+ "text-indent-right",
105
+ "tag",
106
+ "tags",
107
+ "x",
108
+ "graph-up"
109
+ ],
110
+
111
+ bx: [
112
+ "arrow-back",
113
+ "check",
114
+ "detail",
115
+ "file",
116
+ "car",
117
+ "credit-card",
118
+ "barcode",
119
+ "qr"
120
+ ],
121
+
122
+ carbon: [
123
+ "language",
124
+ "checkmark",
125
+ "home",
126
+ "dicom-overlay"
127
+ ],
128
+
129
+ el: [
130
+ "star-empty",
131
+ "star",
132
+ "heart-empty",
133
+ "heart",
134
+ "map-marker",
135
+ "fire",
136
+ "quote-right",
137
+ "qrcode",
138
+ "car",
139
+ "indent-left",
140
+ "indent-right",
141
+ "ok"
142
+ ],
143
+
144
+ 'eos-icons': [
145
+ "three-dots-loading",
146
+ "bubble-loading",
147
+ "loading",
148
+ "installing"
149
+ ],
150
+
151
+ fluent: [
152
+ "share-android-24-regular",
153
+ "checkmark-24-filled",
154
+ "tag-24-regular",
155
+ "tag-multiple-24-regular"
156
+ ],
157
+
158
+ "fluent-emoji": [
159
+ "cookie",
160
+ "construction",
161
+ "warning",
162
+ "wrench"
163
+ ],
164
+
165
+ la: [
166
+ "arrow-right",
167
+ "arrow-left",
168
+ "car",
169
+ "car-side"
170
+ ],
171
+
172
+ octicon: [
173
+ "chevron-left-24",
174
+ "x-24",
175
+ "alert-24",
176
+ "graph-24",
177
+ "comment-24",
178
+ "comment-discussion-24",
179
+ "clock-24",
180
+ "star-24",
181
+ "star-fill-24",
182
+ "file-media-24",
183
+ "heart-24",
184
+ "heart-fill-24",
185
+ "project-roadmap-24",
186
+ "location-24",
187
+ "info-24",
188
+ "mark-github-16"
189
+ ],
190
+
191
+ uil: [
192
+ "map-marker",
193
+ "envelope",
194
+ "phone",
195
+ "tag-alt"
196
+ ],
197
+
198
+ "simple-icons": [
199
+ "ebay",
200
+ "allegro",
201
+ "volkswagen",
202
+ "audi",
203
+ "skoda",
204
+ "seat",
205
+ "whatsapp",
206
+ "x",
207
+ "facebook",
208
+ "messenger",
209
+ "instagram",
210
+ "telegram",
211
+ "carrd"
212
+ ],
213
+
214
+ "icon-park-outline": [
215
+ "shopping-bag",
216
+ "comment",
217
+ "comments",
218
+ "tag-one"
219
+ ],
220
+
221
+ flowbite: [
222
+ "arrow-left-outline",
223
+ "arrow-right-outline",
224
+ "angle-left-outline",
225
+ "angle-right-outline",
226
+ "chevron-left-outline",
227
+ "chevron-right-outline",
228
+ "map-location-outline",
229
+ "map-pin-alt-solid",
230
+ "x-outline",
231
+ "messages-outline",
232
+ "arrow-down-to-bracket-outline",
233
+ "check-outline"
234
+ ],
235
+
236
+ ph: [
237
+ 'images-light',
238
+ 'image-square-thin',
239
+ 'cat-thin',
240
+ 'copy-simple-light'
241
+ ],
242
+
243
+ ic: [
244
+ 'sharp-photo-library'
245
+ ],
246
+
247
+ 'material-symbols-light': [
248
+ 'broken-image-outline'
249
+ ],
250
+
251
+ et: [
252
+ 'documents'
253
+ ],
254
+
255
+ 'system-uicons': [
256
+ 'document-justified'
257
+ ]
5
258
  }
6
-
7
- export const iconConfig: IconConfig = {
8
- include: {
9
- mdi: [
10
- // Social
11
- "npm",
12
- "github",
13
- "facebook",
14
- "instagram",
15
-
16
- // Notes & Content
17
- "post-it-note-edit-outline",
18
-
19
- // Car related
20
- "car-hatchback",
21
- "car-door",
22
- "car-side",
23
- "car-windshield-outline",
24
- "car-light-alert",
25
- "car-tire-alert",
26
- "car-light-dimmed",
27
- "car-light-fog",
28
- "car-light-high",
29
- "car-parking-lights",
30
- "car-esp",
31
- "car-brake-abs",
32
- "car-horn",
33
- "engine-outline",
34
-
35
- // Climate & Temperature
36
- "fan",
37
- "fan-off",
38
- "air-conditioner",
39
- "coolant-temperature",
40
-
41
- // Alerts & Warnings
42
- "car-brake-alert",
43
- "car-traction-control",
44
-
45
- // Other
46
- "card-text-outline",
47
- "fuel",
48
- "oil",
49
- "hazard-lights",
50
- "credit-card-outline"
51
- ],
52
-
53
- "ant-design": [
54
- "menu-fold-outlined",
55
- "menu-unfold-outlined",
56
- "menu-outlined",
57
- "bars-outlined",
58
- "appstore-outlined",
59
- "cluster-outlined",
60
- "audit-outlined",
61
- "build-twotone",
62
- "home-outlined",
63
- "close-outlined"
64
- ],
65
-
66
- bi: [
67
- "envelope-open",
68
- "credit-card",
69
- "qr-code",
70
- "list-check",
71
- "list-task",
72
- "text-indent-left",
73
- "text-indent-right",
74
- "tag",
75
- "tags",
76
- "x",
77
- "graph-up"
78
- ],
79
-
80
- bx: [
81
- "arrow-back",
82
- "check",
83
- "detail",
84
- "file",
85
- "car",
86
- "credit-card",
87
- "barcode",
88
- "qr"
89
- ],
90
-
91
- carbon: [
92
- "language",
93
- "checkmark",
94
- "home",
95
- "dicom-overlay"
96
- ],
97
-
98
- el: [
99
- "star-empty",
100
- "star",
101
- "heart-empty",
102
- "heart",
103
- "map-marker",
104
- "fire",
105
- "quote-right",
106
- "qrcode",
107
- "car",
108
- "indent-left",
109
- "indent-right",
110
- "ok"
111
- ],
112
-
113
- 'eos-icons': [
114
- "three-dots-loading",
115
- "bubble-loading",
116
- "loading",
117
- "installing"
118
- ],
119
-
120
- fluent: [
121
- "share-android-24-regular",
122
- "checkmark-24-filled",
123
- "tag-24-regular",
124
- "tag-multiple-24-regular"
125
- ],
126
-
127
- "fluent-emoji": [
128
- "cookie",
129
- "construction",
130
- "warning",
131
- "wrench"
132
- ],
133
-
134
- la: [
135
- "arrow-right",
136
- "arrow-left",
137
- "car",
138
- "car-side"
139
- ],
140
-
141
- octicon: [
142
- "chevron-left-24",
143
- "x-24",
144
- "alert-24",
145
- "graph-24",
146
- "comment-24",
147
- "comment-discussion-24",
148
- "clock-24",
149
- "star-24",
150
- "star-fill-24",
151
- "file-media-24",
152
- "heart-24",
153
- "heart-fill-24",
154
- "project-roadmap-24",
155
- "location-24",
156
- "info-24",
157
- "mark-github-16"
158
- ],
159
-
160
- uil: [
161
- "map-marker",
162
- "envelope",
163
- "phone",
164
- "tag-alt"
165
- ],
166
-
167
- "simple-icons": [
168
- "ebay",
169
- "allegro",
170
- "volkswagen",
171
- "audi",
172
- "skoda",
173
- "seat",
174
- "whatsapp",
175
- "x",
176
- "facebook",
177
- "messenger",
178
- "instagram",
179
- "telegram",
180
- "carrd"
181
- ],
182
-
183
- "icon-park-outline": [
184
- "shopping-bag",
185
- "comment",
186
- "comments",
187
- "tag-one"
188
- ],
189
-
190
- flowbite: [
191
- "arrow-left-outline",
192
- "arrow-right-outline",
193
- "angle-left-outline",
194
- "angle-right-outline",
195
- "chevron-left-outline",
196
- "chevron-right-outline",
197
- "map-location-outline",
198
- "map-pin-alt-solid",
199
- "x-outline",
200
- "messages-outline",
201
- "arrow-down-to-bracket-outline",
202
- "check-outline"
203
- ],
204
-
205
- // Nowe kolekcje
206
- ph: [
207
- 'images-light',
208
- 'image-square-thin',
209
- 'cat-thin',
210
- 'copy-simple-light'
211
- ],
212
-
213
- ic: [
214
- 'sharp-photo-library'
215
- ],
216
-
217
- 'material-symbols-light': [
218
- 'broken-image-outline'
219
- ],
220
-
221
- et: [
222
- 'documents'
223
- ],
224
-
225
- 'system-uicon': [
226
- 'document-justified'
227
- ]
228
-
229
- }
230
- };
259
+ };
260
+
261
+ // Pomocnicze funkcje
262
+ export function isIconIncluded(collection: IconCollectionName, iconName: string): boolean {
263
+ return iconConfig.include[collection]?.includes(iconName) ?? false;
264
+ }
265
+
266
+ export function getIncludedIcons(collection: IconCollectionName): string[] {
267
+ return iconConfig.include[collection] || [];
268
+ }
269
+
270
+ export function getAllIncludedIcons(): { [key in IconCollectionName]?: string[] } {
271
+ return iconConfig.include;
272
+ }
273
+
274
+ export default iconConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spoko-design-system",
3
- "version": "0.2.98",
3
+ "version": "0.3.00",
4
4
  "private": false,
5
5
  "main": "./index.ts",
6
6
  "module": "./index.ts",
@@ -12,6 +12,7 @@
12
12
  },
13
13
  "./styles/*": "./src/styles/*",
14
14
  "./icons": "./icon.config.ts",
15
+ "./icon-collections": "./icon.collections.ts",
15
16
  "./uno-config": "./uno-config/index.ts"
16
17
  },
17
18
  "scripts": {
@@ -41,7 +41,7 @@ export const layoutShortcuts = [
41
41
 
42
42
  // Sidebars and Navigation
43
43
  ['sidebar-title', 'font-headregular text-light-blue-500 text-xl md:(text-2xl px-4) mb-2 px-14 sm:px-3 flex items-center justify-center sm:justify-start py-3'],
44
- ['subcat', 'text-3.75 block cursor-pointer text-light-blue-darker hover:(text-accent-default underline) md:mb-1 py-2 md:py-0'],
44
+ ['subcat', 'text-3.75 block cursor-pointer text-blue-darker hover:(text-accent-default underline) md:mb-1 py-2 md:py-0'],
45
45
  ['subsubcat', 'pl-2'],
46
46
 
47
47
  // Headers and Banners