spoko-design-system 0.2.98 → 0.2.99
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/icon-collections.ts +28 -0
- package/icon.config.ts +139 -226
- package/package.json +2 -1
|
@@ -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,143 @@
|
|
|
1
|
+
// icon.config.ts
|
|
2
|
+
import type { IconCollectionJSON } from '@iconify/types'
|
|
3
|
+
|
|
4
|
+
// Import specific icon collections
|
|
5
|
+
import antDesignIcons from '@iconify-json/ant-design/icons.json'
|
|
6
|
+
import biIcons from '@iconify-json/bi/icons.json'
|
|
7
|
+
import bxIcons from '@iconify-json/bx/icons.json'
|
|
8
|
+
import carbonIcons from '@iconify-json/carbon/icons.json'
|
|
9
|
+
import elIcons from '@iconify-json/el/icons.json'
|
|
10
|
+
import eosIcons from '@iconify-json/eos-icons/icons.json'
|
|
11
|
+
import fluentIcons from '@iconify-json/fluent/icons.json'
|
|
12
|
+
import fluentEmojiIcons from '@iconify-json/fluent-emoji/icons.json'
|
|
13
|
+
import laIcons from '@iconify-json/la/icons.json'
|
|
14
|
+
import octiconIcons from '@iconify-json/octicon/icons.json'
|
|
15
|
+
import uilIcons from '@iconify-json/uil/icons.json'
|
|
16
|
+
import simpleIcons from '@iconify-json/simple-icons/icons.json'
|
|
17
|
+
import iconParkOutlineIcons from '@iconify-json/icon-park-outline/icons.json'
|
|
18
|
+
import flowbiteIcons from '@iconify-json/flowbite/icons.json'
|
|
19
|
+
import phIcons from '@iconify-json/ph/icons.json'
|
|
20
|
+
import icIcons from '@iconify-json/ic/icons.json'
|
|
21
|
+
import materialSymbolsLightIcons from '@iconify-json/material-symbols-light/icons.json'
|
|
22
|
+
import etIcons from '@iconify-json/et/icons.json'
|
|
23
|
+
import systemUiconsIcons from '@iconify-json/system-uicons/icons.json'
|
|
24
|
+
|
|
1
25
|
interface IconConfig {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
26
|
+
include: {
|
|
27
|
+
[key: string]: string[];
|
|
5
28
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
],
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Mapping of collection names to their full icon sets
|
|
32
|
+
const iconCollections: { [key: string]: IconCollectionJSON } = {
|
|
33
|
+
'ant-design': antDesignIcons,
|
|
34
|
+
'bi': biIcons,
|
|
35
|
+
'bx': bxIcons,
|
|
36
|
+
'carbon': carbonIcons,
|
|
37
|
+
'el': elIcons,
|
|
38
|
+
'eos-icons': eosIcons,
|
|
39
|
+
'fluent': fluentIcons,
|
|
40
|
+
'fluent-emoji': fluentEmojiIcons,
|
|
41
|
+
'la': laIcons,
|
|
42
|
+
'octicon': octiconIcons,
|
|
43
|
+
'uil': uilIcons,
|
|
44
|
+
'simple-icons': simpleIcons,
|
|
45
|
+
'icon-park-outline': iconParkOutlineIcons,
|
|
46
|
+
'flowbite': flowbiteIcons,
|
|
47
|
+
'ph': phIcons,
|
|
48
|
+
'ic': icIcons,
|
|
49
|
+
'material-symbols-light': materialSymbolsLightIcons,
|
|
50
|
+
'et': etIcons,
|
|
51
|
+
'system-uicons': systemUiconsIcons
|
|
52
|
+
}
|
|
224
53
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
54
|
+
export const iconConfig: IconConfig = {
|
|
55
|
+
include: {
|
|
56
|
+
mdi: [
|
|
57
|
+
// Social
|
|
58
|
+
"npm",
|
|
59
|
+
"github",
|
|
60
|
+
"facebook",
|
|
61
|
+
"instagram",
|
|
62
|
+
|
|
63
|
+
// Notes & Content
|
|
64
|
+
"post-it-note-edit-outline",
|
|
65
|
+
|
|
66
|
+
// Car related
|
|
67
|
+
"car-hatchback",
|
|
68
|
+
"car-door",
|
|
69
|
+
"car-side",
|
|
70
|
+
"car-windshield-outline",
|
|
71
|
+
"car-light-alert",
|
|
72
|
+
"car-tire-alert",
|
|
73
|
+
"car-light-dimmed",
|
|
74
|
+
"car-light-fog",
|
|
75
|
+
"car-light-high",
|
|
76
|
+
"car-parking-lights",
|
|
77
|
+
"car-esp",
|
|
78
|
+
"car-brake-abs",
|
|
79
|
+
"car-horn",
|
|
80
|
+
"engine-outline",
|
|
81
|
+
|
|
82
|
+
// Climate & Temperature
|
|
83
|
+
"fan",
|
|
84
|
+
"fan-off",
|
|
85
|
+
"air-conditioner",
|
|
86
|
+
"coolant-temperature",
|
|
87
|
+
|
|
88
|
+
// Alerts & Warnings
|
|
89
|
+
"car-brake-alert",
|
|
90
|
+
"car-traction-control",
|
|
91
|
+
|
|
92
|
+
// Other
|
|
93
|
+
"card-text-outline",
|
|
94
|
+
"fuel",
|
|
95
|
+
"oil",
|
|
96
|
+
"hazard-lights",
|
|
97
|
+
"credit-card-outline"
|
|
98
|
+
],
|
|
99
|
+
"ant-design": [
|
|
100
|
+
"menu-fold-outlined",
|
|
101
|
+
"menu-unfold-outlined",
|
|
102
|
+
"menu-outlined",
|
|
103
|
+
"bars-outlined",
|
|
104
|
+
"appstore-outlined",
|
|
105
|
+
"cluster-outlined",
|
|
106
|
+
"audit-outlined",
|
|
107
|
+
"build-twotone",
|
|
108
|
+
"home-outlined",
|
|
109
|
+
"close-outlined"
|
|
110
|
+
],
|
|
111
|
+
// ... reszta konfiguracji ikon tak jak w oryginalnym pliku
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Helper functions
|
|
116
|
+
export function getIconCollection(name: keyof typeof iconCollections) {
|
|
117
|
+
return iconCollections[name]
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function hasIcon(collectionName: keyof typeof iconCollections, iconName: string): boolean {
|
|
121
|
+
const collection = iconCollections[collectionName]
|
|
122
|
+
if (!collection) return false
|
|
123
|
+
|
|
124
|
+
// Check if the icon is in the include list
|
|
125
|
+
const includeList = iconConfig.include[collectionName]
|
|
126
|
+
if (includeList && !includeList.includes(iconName)) {
|
|
127
|
+
return false
|
|
128
|
+
}
|
|
228
129
|
|
|
229
|
-
|
|
230
|
-
|
|
130
|
+
return collection.icons?.[iconName] !== undefined
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function getIncludedIcons(collectionName: keyof typeof iconCollections) {
|
|
134
|
+
return iconConfig.include[collectionName] || []
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Export everything
|
|
138
|
+
export {
|
|
139
|
+
iconCollections,
|
|
140
|
+
IconConfig
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export default iconConfig
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spoko-design-system",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.99",
|
|
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": {
|