spoko-design-system 0.2.99 → 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.
package/icon.config.ts CHANGED
@@ -1,26 +1,4 @@
1
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
2
 
25
3
  interface IconConfig {
26
4
  include: {
@@ -28,28 +6,34 @@ interface IconConfig {
28
6
  }
29
7
  }
30
8
 
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
- }
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];
53
37
 
54
38
  export const iconConfig: IconConfig = {
55
39
  include: {
@@ -96,6 +80,7 @@ export const iconConfig: IconConfig = {
96
80
  "hazard-lights",
97
81
  "credit-card-outline"
98
82
  ],
83
+
99
84
  "ant-design": [
100
85
  "menu-fold-outlined",
101
86
  "menu-unfold-outlined",
@@ -108,36 +93,182 @@ export const iconConfig: IconConfig = {
108
93
  "home-outlined",
109
94
  "close-outlined"
110
95
  ],
111
- // ... reszta konfiguracji ikon tak jak w oryginalnym pliku
112
- }
113
- }
114
96
 
115
- // Helper functions
116
- export function getIconCollection(name: keyof typeof iconCollections) {
117
- return iconCollections[name]
118
- }
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
+ ],
119
171
 
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
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
+ ]
128
258
  }
129
-
130
- return collection.icons?.[iconName] !== undefined
259
+ };
260
+
261
+ // Pomocnicze funkcje
262
+ export function isIconIncluded(collection: IconCollectionName, iconName: string): boolean {
263
+ return iconConfig.include[collection]?.includes(iconName) ?? false;
131
264
  }
132
265
 
133
- export function getIncludedIcons(collectionName: keyof typeof iconCollections) {
134
- return iconConfig.include[collectionName] || []
266
+ export function getIncludedIcons(collection: IconCollectionName): string[] {
267
+ return iconConfig.include[collection] || [];
135
268
  }
136
269
 
137
- // Export everything
138
- export {
139
- iconCollections,
140
- IconConfig
270
+ export function getAllIncludedIcons(): { [key in IconCollectionName]?: string[] } {
271
+ return iconConfig.include;
141
272
  }
142
273
 
143
- export default iconConfig
274
+ export default iconConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spoko-design-system",
3
- "version": "0.2.99",
3
+ "version": "0.3.00",
4
4
  "private": false,
5
5
  "main": "./index.ts",
6
6
  "module": "./index.ts",
@@ -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