spoko-design-system 0.9.1 → 0.9.3
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/.astro/data-store.json +1 -1
- package/.astro/settings.json +1 -1
- package/.astro/types.d.ts +0 -1
- package/.claude/settings.local.json +12 -0
- package/README.md +2 -0
- package/package.json +2 -2
- package/public/locales/en/translation.json +5 -1
- package/public/locales/pl/translation.json +6 -2
- package/src/pages/index.astro +11 -11
- package/uno-config/index.ts +113 -104
package/.astro/data-store.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.
|
|
1
|
+
[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.13.2","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"site\":\"https://sds.spoko.space/\",\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":1234,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[\"placehold.co\",\"api.polo.blue\",\"polo.blue\",\"media.istockphoto.com\",\"freepik.com\",\"img.freepik.com\",\"polo6r.pl\"],\"remotePatterns\":[],\"responsiveStyles\":false},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false,\"liveContentCollections\":false,\"csp\":false,\"staticImportMetaEnv\":false,\"chromeDevtoolsWorkspace\":false},\"legacy\":{\"collections\":false}}"]
|
package/.astro/settings.json
CHANGED
package/.astro/types.d.ts
CHANGED
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Spoko Design System
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+
|
|
3
5
|
SDS is the easiest way to start websites with simple design system. Since Astro is compatible with many frameworks, you can import your components and document them right in the markdown files.
|
|
4
6
|
The project is still in the development phase, use at your own risk ;-)
|
|
5
7
|
#
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spoko-design-system",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "./index.ts",
|
|
6
6
|
"module": "./index.ts",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"unocss": "^0.65.0",
|
|
111
111
|
"vite": "^7.1.3"
|
|
112
112
|
},
|
|
113
|
-
"packageManager": "pnpm@
|
|
113
|
+
"packageManager": "pnpm@10.16.1",
|
|
114
114
|
"pnpm": {
|
|
115
115
|
"default": "9.15.3",
|
|
116
116
|
"overrides": {
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
"part": {
|
|
3
3
|
"for-lhd": "Do pojazdów LHD (z kierownicą z lewej strony)",
|
|
4
4
|
"for-rhd": "Do pojazdów RHD (z kierownicą z prawej strony)",
|
|
5
|
-
"sw-position":"Pozycja kierownicy"
|
|
5
|
+
"sw-position":"Pozycja kierownicy"
|
|
6
6
|
},
|
|
7
7
|
"copied": "Skopiowano",
|
|
8
|
-
"copy": "Skopiuj numer produktu"
|
|
8
|
+
"copy": "Skopiuj numer produktu",
|
|
9
|
+
"date": {
|
|
10
|
+
"published": "Opublikowano",
|
|
11
|
+
"updated": "Zaktualizowano"
|
|
12
|
+
}
|
|
9
13
|
}
|
package/src/pages/index.astro
CHANGED
|
@@ -103,21 +103,21 @@ const navItems = [
|
|
|
103
103
|
|
|
104
104
|
<div>
|
|
105
105
|
<Headline underline as="div" class="mx-auto text-gray-900" textSize="3xl">Examples:</Headline>
|
|
106
|
-
<ul class="
|
|
107
|
-
<li class="leading-5 me-6 mb-4 lg:mb-0">
|
|
108
|
-
<a href="https://catalog.polo.blue" class="example-link" target="_blank"> catalog.polo.blue</a>
|
|
106
|
+
<ul class="flex flex-wrap text-2xl pt-6 lg:(py-4 gap-4) text-left justify-center lg:justify-start w-full">
|
|
107
|
+
<li class="leading-5 me-6 mb-4 lg:mb-0 flex-shrink-0">
|
|
108
|
+
<a href="https://catalog.polo.blue" class="example-link whitespace-nowrap" target="_blank"> catalog.polo.blue</a>
|
|
109
109
|
</li>
|
|
110
|
-
<li class="leading-5 me-6 mb-4 lg:mb-0">
|
|
111
|
-
<a href="https://polo.blue" class="example-link" target="_blank"> polo.blue</a>
|
|
110
|
+
<li class="leading-5 me-6 mb-4 lg:mb-0 flex-shrink-0">
|
|
111
|
+
<a href="https://polo.blue" class="example-link whitespace-nowrap" target="_blank"> polo.blue</a>
|
|
112
112
|
</li>
|
|
113
|
-
<li class="leading-5 me-6 mb-4 lg:mb-0">
|
|
114
|
-
<a href="https://spoko.space" class="example-link" target="_blank"> spoko.space</a>
|
|
113
|
+
<li class="leading-5 me-6 mb-4 lg:mb-0 flex-shrink-0">
|
|
114
|
+
<a href="https://spoko.space" class="example-link whitespace-nowrap" target="_blank"> spoko.space</a>
|
|
115
115
|
</li>
|
|
116
|
-
<li class="leading-5 me-6 mb-4 lg:mb-0">
|
|
117
|
-
<a href="https://sale.polo.blue/" class="example-link" target="_blank">sale.polo.blue</a>
|
|
116
|
+
<li class="leading-5 me-6 mb-4 lg:mb-0 flex-shrink-0">
|
|
117
|
+
<a href="https://sale.polo.blue/" class="example-link whitespace-nowrap" target="_blank">sale.polo.blue</a>
|
|
118
118
|
</li>
|
|
119
|
-
<li class="leading-5 me-6 mb-4 lg:mb-0">
|
|
120
|
-
<a href="https://polo6r.pl" class="example-link" target="_blank">polo6r.pl</a>
|
|
119
|
+
<li class="leading-5 me-6 mb-4 lg:mb-0 flex-shrink-0">
|
|
120
|
+
<a href="https://polo6r.pl" class="example-link whitespace-nowrap" target="_blank">polo6r.pl</a>
|
|
121
121
|
</li>
|
|
122
122
|
</ul>
|
|
123
123
|
</div>
|
package/uno-config/index.ts
CHANGED
|
@@ -19,6 +19,32 @@ import presetWebFonts from '@unocss/preset-web-fonts'; // Web fonts preset
|
|
|
19
19
|
import { shortcuts } from './theme/shortcuts';
|
|
20
20
|
import { theme } from './theme';
|
|
21
21
|
|
|
22
|
+
// Static imports for all icon collections (prevents Vite module runner issues)
|
|
23
|
+
import antDesignIcons from '@iconify-json/ant-design/icons.json';
|
|
24
|
+
import biIcons from '@iconify-json/bi/icons.json';
|
|
25
|
+
import bxIcons from '@iconify-json/bx/icons.json';
|
|
26
|
+
import carbonIcons from '@iconify-json/carbon/icons.json';
|
|
27
|
+
import circleFlagsIcons from '@iconify-json/circle-flags/icons.json';
|
|
28
|
+
import eiIcons from '@iconify-json/ei/icons.json';
|
|
29
|
+
import elIcons from '@iconify-json/el/icons.json';
|
|
30
|
+
import eosIcons from '@iconify-json/eos-icons/icons.json';
|
|
31
|
+
import etIcons from '@iconify-json/et/icons.json';
|
|
32
|
+
import flowbiteIcons from '@iconify-json/flowbite/icons.json';
|
|
33
|
+
import fluentIcons from '@iconify-json/fluent/icons.json';
|
|
34
|
+
import fluentEmojiIcons from '@iconify-json/fluent-emoji/icons.json';
|
|
35
|
+
import icIcons from '@iconify-json/ic/icons.json';
|
|
36
|
+
import iconParkOutlineIcons from '@iconify-json/icon-park-outline/icons.json';
|
|
37
|
+
import laIcons from '@iconify-json/la/icons.json';
|
|
38
|
+
import lucideIcons from '@iconify-json/lucide/icons.json';
|
|
39
|
+
import materialSymbolsLightIcons from '@iconify-json/material-symbols-light/icons.json';
|
|
40
|
+
import mdiIcons from '@iconify-json/mdi/icons.json';
|
|
41
|
+
import notoV1Icons from '@iconify-json/noto-v1/icons.json';
|
|
42
|
+
import octiconIcons from '@iconify-json/octicon/icons.json';
|
|
43
|
+
import phIcons from '@iconify-json/ph/icons.json';
|
|
44
|
+
import simpleIcons from '@iconify-json/simple-icons/icons.json';
|
|
45
|
+
import systemUiconsIcons from '@iconify-json/system-uicons/icons.json';
|
|
46
|
+
import uilIcons from '@iconify-json/uil/icons.json';
|
|
47
|
+
|
|
22
48
|
// List of peer selectors we want to preserve during build
|
|
23
49
|
const peerSelectorClasses = [
|
|
24
50
|
// Focus state classes
|
|
@@ -56,6 +82,12 @@ interface CustomConfig extends Partial<UserConfig> {
|
|
|
56
82
|
*/
|
|
57
83
|
export function createSdsConfig(customConfig: CustomConfig = {}) {
|
|
58
84
|
return defineConfig({
|
|
85
|
+
// Optimizations for static builds
|
|
86
|
+
...(process.env.NODE_ENV === 'production' && {
|
|
87
|
+
inspector: false,
|
|
88
|
+
hmr: false,
|
|
89
|
+
}),
|
|
90
|
+
|
|
59
91
|
// Transform directives and variant groups
|
|
60
92
|
transformers: [
|
|
61
93
|
transformerDirectives(),
|
|
@@ -101,134 +133,71 @@ export function createSdsConfig(customConfig: CustomConfig = {}) {
|
|
|
101
133
|
};
|
|
102
134
|
},
|
|
103
135
|
],
|
|
104
|
-
//
|
|
136
|
+
// Optimized safelist for static Astro builds
|
|
105
137
|
safelist: [
|
|
106
|
-
//
|
|
138
|
+
// Layout and grid classes that might be used dynamically
|
|
107
139
|
'md:grid-cols-product',
|
|
108
140
|
|
|
141
|
+
// Component-specific classes for static generation
|
|
109
142
|
'breadcrumb-link-disabled',
|
|
110
143
|
'breadcrumb-link',
|
|
111
144
|
'breadcrumb-item',
|
|
112
145
|
'features-list-caption',
|
|
113
146
|
'features-list-ul',
|
|
114
147
|
'features-list-item',
|
|
115
|
-
|
|
116
148
|
'category-link-base',
|
|
117
149
|
'category-link-active',
|
|
118
|
-
|
|
119
|
-
//
|
|
150
|
+
|
|
151
|
+
// Essential peer and input classes
|
|
120
152
|
'peer',
|
|
121
|
-
|
|
122
|
-
// All input component classes from shortcuts
|
|
123
|
-
'input-base',
|
|
124
|
-
'input-label-base',
|
|
125
|
-
'input-placeholder',
|
|
126
|
-
'input-standard',
|
|
127
|
-
'input-filled',
|
|
128
|
-
'input-wrapper-standard',
|
|
129
|
-
'input-wrapper-filled',
|
|
130
|
-
'input-label-standard',
|
|
131
|
-
'input-label-filled',
|
|
132
|
-
|
|
133
|
-
// Label state shortcuts
|
|
134
|
-
'input-label-focus-color',
|
|
135
|
-
'input-label-focus-scale',
|
|
136
|
-
'input-label-focus-translate-standard',
|
|
137
|
-
'input-label-focus-translate-filled',
|
|
138
|
-
'input-label-placeholder',
|
|
139
|
-
'input-label-filled-standard',
|
|
140
|
-
'input-label-filled-filled',
|
|
141
|
-
'input-label-standard-state',
|
|
142
|
-
'input-label-filled-state',
|
|
143
|
-
|
|
144
|
-
// Input types
|
|
145
|
-
'input-textarea',
|
|
146
153
|
'resize-none',
|
|
147
|
-
|
|
148
|
-
// Size variants
|
|
149
|
-
'input-sm',
|
|
150
|
-
'input-md',
|
|
151
|
-
'input-lg',
|
|
152
|
-
'input-label-sm',
|
|
153
|
-
'input-label-md',
|
|
154
|
-
'input-label-lg',
|
|
155
|
-
|
|
156
|
-
// Status classes
|
|
157
|
-
'input-error',
|
|
158
|
-
'input-label-error',
|
|
159
|
-
'input-error-message',
|
|
160
|
-
'input-success',
|
|
161
|
-
'input-label-success',
|
|
162
|
-
'input-success-message',
|
|
163
|
-
|
|
164
|
-
// Transform related classes
|
|
165
154
|
'origin-top-left',
|
|
166
155
|
'transform-gpu',
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
'-translate-y-6',
|
|
170
|
-
'scale-75',
|
|
171
|
-
'scale-100',
|
|
172
|
-
|
|
173
|
-
// Every possible arbitrary selector used
|
|
174
|
-
'[&:focus~label]:scale-75',
|
|
175
|
-
'[&:focus~label]:-translate-y-4',
|
|
176
|
-
'[&:focus~label]:-translate-y-6',
|
|
177
|
-
'[&:focus~label]:text-blue-light',
|
|
178
|
-
'[&:focus~label]:dark:text-blue-lightest',
|
|
179
|
-
'[&:focus~label]:start-0',
|
|
180
|
-
'[&:placeholder-shown~label]:scale-100',
|
|
181
|
-
'[&:placeholder-shown~label]:translate-y-0',
|
|
182
|
-
'[&:not(:placeholder-shown)~label]:scale-75',
|
|
183
|
-
'[&:not(:placeholder-shown)~label]:-translate-y-4',
|
|
184
|
-
'[&:not(:placeholder-shown)~label]:-translate-y-6',
|
|
185
|
-
|
|
186
|
-
// Combinations of selectors
|
|
187
|
-
'peer:focus:text-blue-light',
|
|
188
|
-
'peer:focus:dark:text-blue-lightest',
|
|
189
|
-
'peer:focus:scale-75',
|
|
190
|
-
'peer:focus:-translate-y-4',
|
|
191
|
-
'peer:focus:-translate-y-6',
|
|
192
|
-
'peer:focus:start-0',
|
|
193
|
-
'peer-placeholder-shown:scale-100',
|
|
194
|
-
'peer-placeholder-shown:translate-y-0',
|
|
195
|
-
'peer-not-placeholder-shown:scale-75',
|
|
196
|
-
'peer-not-placeholder-shown:-translate-y-4',
|
|
197
|
-
'peer-not-placeholder-shown:-translate-y-6',
|
|
198
|
-
|
|
199
|
-
// With !important for good measure
|
|
200
|
-
'[&:focus~label]:!scale-75',
|
|
201
|
-
'[&:focus~label]:!-translate-y-4',
|
|
202
|
-
'[&:focus~label]:!-translate-y-6',
|
|
203
|
-
'[&:not(:placeholder-shown)~label]:!scale-75',
|
|
204
|
-
'[&:not(:placeholder-shown)~label]:!-translate-y-4',
|
|
205
|
-
'[&:not(:placeholder-shown)~label]:!-translate-y-6',
|
|
206
|
-
|
|
207
|
-
// Direct css vars that might be used
|
|
208
|
-
'--un-scale-x',
|
|
209
|
-
'--un-scale-y',
|
|
210
|
-
'--un-translate-y',
|
|
211
|
-
|
|
212
|
-
// All peer selectors from the list
|
|
156
|
+
|
|
157
|
+
// All peer selectors from the list (needed for floating labels)
|
|
213
158
|
...peerSelectorClasses,
|
|
214
159
|
],
|
|
215
|
-
//
|
|
160
|
+
// Optimized extractors for static Astro builds
|
|
216
161
|
extractors: [
|
|
217
162
|
{
|
|
218
|
-
name: '
|
|
219
|
-
extract({ code }) {
|
|
163
|
+
name: 'astro-static',
|
|
164
|
+
extract({ code, id }) {
|
|
220
165
|
const result = new Set();
|
|
221
|
-
|
|
222
|
-
//
|
|
223
|
-
const
|
|
166
|
+
|
|
167
|
+
// Enhanced class extraction for Astro components
|
|
168
|
+
const classRegex = /class(?:Name)?=["'`]([^"'`]+)["'`]/g;
|
|
169
|
+
let match;
|
|
170
|
+
while ((match = classRegex.exec(code)) !== null) {
|
|
171
|
+
match[1].split(/\s+/).forEach(cls => {
|
|
172
|
+
if (cls) result.add(cls);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Extract peer selectors
|
|
177
|
+
const peerRegex = /peer-[a-zA-Z0-9-]+(?::[a-zA-Z0-9-]+)*/g;
|
|
224
178
|
const peerMatches = code.match(peerRegex);
|
|
225
179
|
if (peerMatches) {
|
|
226
180
|
peerMatches.forEach(match => result.add(match));
|
|
227
181
|
}
|
|
228
|
-
|
|
229
|
-
//
|
|
230
|
-
|
|
231
|
-
|
|
182
|
+
|
|
183
|
+
// Extract shortcut references
|
|
184
|
+
const shortcutRegex = /\b(?:input|button|layout|component|product|jumbotron)-[a-zA-Z0-9-]+/g;
|
|
185
|
+
const shortcutMatches = code.match(shortcutRegex);
|
|
186
|
+
if (shortcutMatches) {
|
|
187
|
+
shortcutMatches.forEach(match => result.add(match));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// For .astro files, extract from both template and script sections
|
|
191
|
+
if (id && id.endsWith('.astro')) {
|
|
192
|
+
// Extract from dynamic class bindings
|
|
193
|
+
const dynamicClassRegex = /class:\w+\s*=\s*["'`]([^"'`]+)["'`]/g;
|
|
194
|
+
while ((match = dynamicClassRegex.exec(code)) !== null) {
|
|
195
|
+
match[1].split(/\s+/).forEach(cls => {
|
|
196
|
+
if (cls) result.add(cls);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
232
201
|
return result;
|
|
233
202
|
},
|
|
234
203
|
},
|
|
@@ -245,6 +214,33 @@ export function createSdsConfig(customConfig: CustomConfig = {}) {
|
|
|
245
214
|
'display': 'inline-block',
|
|
246
215
|
'vertical-align': 'middle',
|
|
247
216
|
},
|
|
217
|
+
collections: {
|
|
218
|
+
// All icon collections with static imports to prevent Vite module runner issues
|
|
219
|
+
'ant-design': antDesignIcons,
|
|
220
|
+
'bi': biIcons,
|
|
221
|
+
'bx': bxIcons,
|
|
222
|
+
'carbon': carbonIcons,
|
|
223
|
+
'circle-flags': circleFlagsIcons,
|
|
224
|
+
'ei': eiIcons,
|
|
225
|
+
'el': elIcons,
|
|
226
|
+
'eos-icons': eosIcons,
|
|
227
|
+
'et': etIcons,
|
|
228
|
+
'flowbite': flowbiteIcons,
|
|
229
|
+
'fluent': fluentIcons,
|
|
230
|
+
'fluent-emoji': fluentEmojiIcons,
|
|
231
|
+
'ic': icIcons,
|
|
232
|
+
'icon-park-outline': iconParkOutlineIcons,
|
|
233
|
+
'la': laIcons,
|
|
234
|
+
'lucide': lucideIcons,
|
|
235
|
+
'material-symbols-light': materialSymbolsLightIcons,
|
|
236
|
+
'mdi': mdiIcons,
|
|
237
|
+
'noto-v1': notoV1Icons,
|
|
238
|
+
'octicon': octiconIcons,
|
|
239
|
+
'ph': phIcons,
|
|
240
|
+
'simple-icons': simpleIcons,
|
|
241
|
+
'system-uicons': systemUiconsIcons,
|
|
242
|
+
'uil': uilIcons,
|
|
243
|
+
}
|
|
248
244
|
}),
|
|
249
245
|
presetTypography(),
|
|
250
246
|
presetWebFonts({
|
|
@@ -252,6 +248,19 @@ export function createSdsConfig(customConfig: CustomConfig = {}) {
|
|
|
252
248
|
fonts: theme.fontFamily
|
|
253
249
|
})
|
|
254
250
|
],
|
|
251
|
+
|
|
252
|
+
// Additional optimizations for static Astro builds
|
|
253
|
+
preflights: [
|
|
254
|
+
{
|
|
255
|
+
getCSS: () => `
|
|
256
|
+
/* Optimized base styles for static builds */
|
|
257
|
+
*,*::before,*::after{box-sizing:border-box}
|
|
258
|
+
html{line-height:1.15;-webkit-text-size-adjust:100%}
|
|
259
|
+
body{margin:0;font-family:system-ui,sans-serif}
|
|
260
|
+
`
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
|
|
255
264
|
...customConfig
|
|
256
265
|
});
|
|
257
266
|
}
|