spoko-design-system 1.9.1 → 1.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/.husky/pre-commit +17 -1
- package/.prettierrc +8 -4
- package/CHANGELOG.md +12 -0
- package/eslint.config.js +1 -0
- package/package.json +2 -1
- package/src/components/Badge.vue +1 -4
- package/src/components/Badges.vue +1 -4
- package/src/components/Breadcrumbs.vue +10 -44
- package/src/components/Button.vue +1 -5
- package/src/components/ButtonCopy.astro +2 -7
- package/src/components/ButtonCopy.vue +2 -9
- package/src/components/Card.astro +1 -4
- package/src/components/Category/CategoriesCarousel.astro +3 -11
- package/src/components/Category/CategoryDetails.astro +7 -32
- package/src/components/Category/CategoryLink.vue +1 -5
- package/src/components/Category/CategorySidebarToggler.vue +1 -5
- package/src/components/Category/CategoryTile.astro +2 -9
- package/src/components/Category/CategoryViewToggler.astro +3 -16
- package/src/components/Copyright.astro +1 -4
- package/src/components/Date.astro +1 -4
- package/src/components/Faq.astro +1 -5
- package/src/components/FaqItem.astro +3 -14
- package/src/components/FeaturesList.vue +2 -9
- package/src/components/FuckRussia.vue +9 -36
- package/src/components/HandDrive.astro +2 -12
- package/src/components/Header/Header.astro +3 -14
- package/src/components/Header/SkipToContent.astro +1 -5
- package/src/components/Input.vue +19 -31
- package/src/components/Jumbotron/index.astro +7 -41
- package/src/components/Jumbotron/variants/Default.astro +2 -17
- package/src/components/Jumbotron/variants/Hero.astro +3 -17
- package/src/components/Jumbotron/variants/Post.astro +3 -13
- package/src/components/Jumbotron/variants/PostSplit.astro +3 -13
- package/src/components/Jumbotron.astro +3 -12
- package/src/components/LanguageSuggestion.astro +3 -14
- package/src/components/MainColors.vue +7 -25
- package/src/components/MainInput.vue +2 -1
- package/src/components/Modal.astro +43 -41
- package/src/components/PageContent.astro +1 -4
- package/src/components/PartNumber.vue +1 -4
- package/src/components/PostHeader.astro +3 -13
- package/src/components/PrCode.vue +2 -2
- package/src/components/Product/ProductButton.vue +1 -4
- package/src/components/Product/ProductDetailName.vue +1 -4
- package/src/components/Product/ProductDetails.vue +19 -65
- package/src/components/Product/ProductDoc.vue +1 -4
- package/src/components/Product/ProductEngine.astro +27 -27
- package/src/components/Product/ProductEngineType.vue +1 -4
- package/src/components/Product/ProductEngines.astro +4 -4
- package/src/components/Product/ProductLink.astro +8 -32
- package/src/components/Product/ProductLink.vue +8 -36
- package/src/components/Product/ProductLinkInfo.astro +4 -19
- package/src/components/Product/ProductModel.vue +3 -5
- package/src/components/Product/ProductModels.vue +2 -10
- package/src/components/Product/ProductNumber.astro +6 -26
- package/src/components/Product/ProductPositions.vue +1 -5
- package/src/components/ProductCodes.vue +7 -15
- package/src/components/ProductDetailName.vue +2 -7
- package/src/components/ProductDetailsList.vue +7 -33
- package/src/components/ProductTile.astro +3 -13
- package/src/components/ReloadPrompt.astro +1 -5
- package/src/components/SlimBanner.vue +13 -18
- package/src/components/Table.vue +3 -15
- package/src/components/Translations.vue +1 -4
- package/src/components/layout/CallToAction.astro +2 -7
- package/src/components/layout/Container.astro +1 -3
- package/src/components/layout/Header.astro +2 -12
- package/src/layouts/Layout.astro +2 -9
- package/src/layouts/MainLayout.astro +4 -17
- package/src/layouts/partials/HeadCommon.astro +7 -24
- package/src/layouts/partials/HeadSEO.astro +12 -48
- package/src/pages/components/icons.astro +1 -4
- package/src/pages/core/typography.astro +2 -6
- package/src/pages/index.astro +16 -63
- package/src/styles/tippy-theme.css +4 -2
- package/src/utils/product/getEngineTooltipContent.ts +2 -7
- package/src/utils/product/getPriceFormatted.ts +2 -6
- package/src/utils/product/useFormatProductNumber.ts +1 -4
- package/src/utils/seo/getShorterDescription.ts +1 -4
package/src/pages/index.astro
CHANGED
|
@@ -56,8 +56,7 @@ const features = [
|
|
|
56
56
|
{
|
|
57
57
|
title: 'Design Patterns',
|
|
58
58
|
icon: 'streamline-freehand-color:design-process-drawing-board',
|
|
59
|
-
description:
|
|
60
|
-
'Proven patterns and layouts for common use cases, from landing pages to product catalogs.',
|
|
59
|
+
description: 'Proven patterns and layouts for common use cases, from landing pages to product catalogs.',
|
|
61
60
|
},
|
|
62
61
|
{
|
|
63
62
|
title: 'Developer Ready',
|
|
@@ -100,13 +99,7 @@ const exampleSites = [
|
|
|
100
99
|
set:html={SITE.description}
|
|
101
100
|
/>
|
|
102
101
|
|
|
103
|
-
<Button
|
|
104
|
-
slot="cta-content"
|
|
105
|
-
href="/core/introduction/"
|
|
106
|
-
title="Spoko Design System"
|
|
107
|
-
primary
|
|
108
|
-
rounded
|
|
109
|
-
>
|
|
102
|
+
<Button slot="cta-content" href="/core/introduction/" title="Spoko Design System" primary rounded>
|
|
110
103
|
Read More
|
|
111
104
|
</Button>
|
|
112
105
|
</Jumbotron>
|
|
@@ -121,16 +114,8 @@ const exampleSites = [
|
|
|
121
114
|
title={description}
|
|
122
115
|
class="flex w-full flex-wrap bg-white rounded-md hover:-translate-y-1 hover:shadow-lg transition-all flex-1 items-center py-10 px-4 md:(flex-col w-auto flex-nowrap text-center py-16)"
|
|
123
116
|
>
|
|
124
|
-
<Headline
|
|
125
|
-
|
|
126
|
-
class="text-3xl"
|
|
127
|
-
underline={false}
|
|
128
|
-
>
|
|
129
|
-
<Icon
|
|
130
|
-
name={icon}
|
|
131
|
-
aria-hidden="true"
|
|
132
|
-
class="text-blue-400 mr-3 text-4xl"
|
|
133
|
-
/>
|
|
117
|
+
<Headline as="h2" class="text-3xl" underline={false}>
|
|
118
|
+
<Icon name={icon} aria-hidden="true" class="text-blue-400 mr-3 text-4xl" />
|
|
134
119
|
{title}
|
|
135
120
|
</Headline>
|
|
136
121
|
<p class="text-slate-500 w-full">{description}</p>
|
|
@@ -143,16 +128,12 @@ const exampleSites = [
|
|
|
143
128
|
<!-- Features Section -->
|
|
144
129
|
<section class="py-16 px-4 max-w-5xl mx-auto">
|
|
145
130
|
<div class="text-center mb-12">
|
|
146
|
-
<Headline
|
|
147
|
-
as="h2"
|
|
148
|
-
class="text-3xl md:text-4xl text-gray-900 mb-6"
|
|
149
|
-
underline="center"
|
|
150
|
-
>
|
|
131
|
+
<Headline as="h2" class="text-3xl md:text-4xl text-gray-900 mb-6" underline="center">
|
|
151
132
|
Why Spoko Design System?
|
|
152
133
|
</Headline>
|
|
153
134
|
<p class="text-lg text-gray-600 max-w-2xl mx-auto">
|
|
154
|
-
A modern, comprehensive design system built with Astro and Vue, featuring consistent
|
|
155
|
-
|
|
135
|
+
A modern, comprehensive design system built with Astro and Vue, featuring consistent components and
|
|
136
|
+
patterns for rapid development.
|
|
156
137
|
</p>
|
|
157
138
|
</div>
|
|
158
139
|
|
|
@@ -165,26 +146,17 @@ const exampleSites = [
|
|
|
165
146
|
class="text-2xl mb-3 text-gray-900 flex items-center justify-center"
|
|
166
147
|
underline={false}
|
|
167
148
|
>
|
|
168
|
-
<Icon
|
|
169
|
-
name={icon}
|
|
170
|
-
aria-hidden="true"
|
|
171
|
-
class="text-4xl text-blue-400 mr-3"
|
|
172
|
-
/>
|
|
149
|
+
<Icon name={icon} aria-hidden="true" class="text-4xl text-blue-400 mr-3" />
|
|
173
150
|
{title}
|
|
174
151
|
</Headline>
|
|
175
|
-
<p
|
|
176
|
-
class="text-gray-600"
|
|
177
|
-
set:html={description}
|
|
178
|
-
/>
|
|
152
|
+
<p class="text-gray-600" set:html={description} />
|
|
179
153
|
</div>
|
|
180
154
|
))
|
|
181
155
|
}
|
|
182
156
|
</div>
|
|
183
157
|
</section>
|
|
184
158
|
|
|
185
|
-
<div
|
|
186
|
-
class="mt-12 py-20 bg-blue-darker bg-vw text-white flex items-center justify-center relative"
|
|
187
|
-
>
|
|
159
|
+
<div class="mt-12 py-20 bg-blue-darker bg-vw text-white flex items-center justify-center relative">
|
|
188
160
|
<Quote>
|
|
189
161
|
<blockquote>
|
|
190
162
|
Well done is better than well said.
|
|
@@ -198,11 +170,7 @@ const exampleSites = [
|
|
|
198
170
|
<div class="grid lg:grid-cols-2 gap-8 md:gap-12">
|
|
199
171
|
<!-- Download Section -->
|
|
200
172
|
<div class="text-center">
|
|
201
|
-
<Headline
|
|
202
|
-
underline
|
|
203
|
-
as="h2"
|
|
204
|
-
class="text-3xl text-gray-900 mb-8"
|
|
205
|
-
>
|
|
173
|
+
<Headline underline as="h2" class="text-3xl text-gray-900 mb-8">
|
|
206
174
|
<Icon
|
|
207
175
|
name="streamline-freehand-color:archive-box"
|
|
208
176
|
aria-hidden="true"
|
|
@@ -231,10 +199,7 @@ const exampleSites = [
|
|
|
231
199
|
rel="noopener noreferrer"
|
|
232
200
|
class="flex items-center gap-3 bg-red-600 hover:bg-red-700 text-white px-6 py-3 rounded-lg transition-colors"
|
|
233
201
|
>
|
|
234
|
-
<Icon
|
|
235
|
-
name="vscode-icons:file-type-npm"
|
|
236
|
-
class="text-3xl"
|
|
237
|
-
/>
|
|
202
|
+
<Icon name="vscode-icons:file-type-npm" class="text-3xl" />
|
|
238
203
|
<span class="font-semibold">npm Package</span>
|
|
239
204
|
</a>
|
|
240
205
|
<a
|
|
@@ -243,10 +208,7 @@ const exampleSites = [
|
|
|
243
208
|
rel="noopener noreferrer"
|
|
244
209
|
class="flex items-center gap-3 bg-gray-800 hover:bg-gray-900 text-white px-6 py-3 rounded-lg transition-colors"
|
|
245
210
|
>
|
|
246
|
-
<Icon
|
|
247
|
-
name="mdi:github"
|
|
248
|
-
class="text-2xl"
|
|
249
|
-
/>
|
|
211
|
+
<Icon name="mdi:github" class="text-2xl" />
|
|
250
212
|
<span class="font-semibold">Source Code</span>
|
|
251
213
|
</a>
|
|
252
214
|
</div>
|
|
@@ -258,11 +220,7 @@ const exampleSites = [
|
|
|
258
220
|
|
|
259
221
|
<!-- Examples Section -->
|
|
260
222
|
<div class="text-center">
|
|
261
|
-
<Headline
|
|
262
|
-
underline
|
|
263
|
-
as="h2"
|
|
264
|
-
class="text-3xl text-gray-900 mb-8"
|
|
265
|
-
>
|
|
223
|
+
<Headline underline as="h2" class="text-3xl text-gray-900 mb-8">
|
|
266
224
|
<Icon
|
|
267
225
|
name="streamline-freehand-color:coding-files-network-folder"
|
|
268
226
|
aria-hidden="true"
|
|
@@ -285,18 +243,13 @@ const exampleSites = [
|
|
|
285
243
|
<h4 class="font-semibold text-gray-900 group-hover:text-blue-600">{title}</h4>
|
|
286
244
|
<p class="text-sm text-gray-600">{description}</p>
|
|
287
245
|
</div>
|
|
288
|
-
<Icon
|
|
289
|
-
name="lucide:link"
|
|
290
|
-
class="text-gray-400 group-hover:text-blue-400"
|
|
291
|
-
/>
|
|
246
|
+
<Icon name="lucide:link" class="text-gray-400 group-hover:text-blue-400" />
|
|
292
247
|
</a>
|
|
293
248
|
))
|
|
294
249
|
}
|
|
295
250
|
</div>
|
|
296
251
|
|
|
297
|
-
<p class="text-gray-600 text-sm">
|
|
298
|
-
See the design system in action across different project types
|
|
299
|
-
</p>
|
|
252
|
+
<p class="text-gray-600 text-sm">See the design system in action across different project types</p>
|
|
300
253
|
</div>
|
|
301
254
|
</div>
|
|
302
255
|
</section>
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
font-size: 0.75rem;
|
|
11
11
|
line-height: 1.5;
|
|
12
12
|
border-radius: 0.5rem;
|
|
13
|
-
box-shadow:
|
|
13
|
+
box-shadow:
|
|
14
|
+
0 10px 15px -3px rgb(0 0 0 / 0.1),
|
|
15
|
+
0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
14
16
|
max-width: 280px;
|
|
15
17
|
border: 1px solid #e5e7eb; /* neutral-lighter */
|
|
16
18
|
}
|
|
@@ -92,7 +94,7 @@
|
|
|
92
94
|
|
|
93
95
|
.tippy-box[data-theme~='sds'] .tooltip-label {
|
|
94
96
|
font-size: 0.7rem;
|
|
95
|
-
color: #
|
|
97
|
+
color: #64748b;
|
|
96
98
|
font-weight: 400;
|
|
97
99
|
}
|
|
98
100
|
|
|
@@ -81,10 +81,7 @@ function getSerieValue(engine: Engine): string {
|
|
|
81
81
|
return serie === 3 ? 'EA288' : serie === 2 ? 'EA189' : `Serie ${serie}`;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
export function getEngineTooltipContent(
|
|
85
|
-
engine: Engine,
|
|
86
|
-
translations: EngineTranslations = {}
|
|
87
|
-
): string {
|
|
84
|
+
export function getEngineTooltipContent(engine: Engine, translations: EngineTranslations = {}): string {
|
|
88
85
|
const t = { ...defaultTranslations, ...translations };
|
|
89
86
|
|
|
90
87
|
// Header section
|
|
@@ -155,9 +152,7 @@ export function getEngineTooltipContent(
|
|
|
155
152
|
);
|
|
156
153
|
}
|
|
157
154
|
|
|
158
|
-
const specsContent = rows.length
|
|
159
|
-
? `<div class="tooltip-specs">${rows.join('')}</div>`
|
|
160
|
-
: '';
|
|
155
|
+
const specsContent = rows.length ? `<div class="tooltip-specs">${rows.join('')}</div>` : '';
|
|
161
156
|
|
|
162
157
|
return header + specsContent;
|
|
163
158
|
}
|
|
@@ -6,14 +6,10 @@ interface Product {
|
|
|
6
6
|
export const getPriceFormatted = (product: Product) => {
|
|
7
7
|
// Default to EUR formatting for English-only design system
|
|
8
8
|
if (product.price_eur) {
|
|
9
|
-
return new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(
|
|
10
|
-
product.price_eur
|
|
11
|
-
);
|
|
9
|
+
return new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(product.price_eur);
|
|
12
10
|
}
|
|
13
11
|
if (product.price_pln) {
|
|
14
|
-
return new Intl.NumberFormat('pl-PL', { style: 'currency', currency: 'PLN' }).format(
|
|
15
|
-
product.price_pln
|
|
16
|
-
);
|
|
12
|
+
return new Intl.NumberFormat('pl-PL', { style: 'currency', currency: 'PLN' }).format(product.price_pln);
|
|
17
13
|
}
|
|
18
14
|
return 'no price';
|
|
19
15
|
};
|
|
@@ -20,10 +20,7 @@ export default function useFormatProductNumber(productNumber: string | null): {
|
|
|
20
20
|
let formatted = number;
|
|
21
21
|
|
|
22
22
|
if (isLetter(number[0]) && !isLetter(number[1]) && number.length === 9) {
|
|
23
|
-
formatted = formatted.replace(
|
|
24
|
-
LIQUIDS_PATTERN,
|
|
25
|
-
`$1${separator}$2${separator}$3${separator}$4`
|
|
26
|
-
);
|
|
23
|
+
formatted = formatted.replace(LIQUIDS_PATTERN, `$1${separator}$2${separator}$3${separator}$4`);
|
|
27
24
|
} else if (number.length >= 13) {
|
|
28
25
|
formatted = formatted.replace(
|
|
29
26
|
WHEELS_EMBLEMS_PATTERN,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
const MAX_DESCRIPTION_LENGTH = 150;
|
|
2
2
|
|
|
3
|
-
export const getShorterDescription = (
|
|
4
|
-
description: string | null,
|
|
5
|
-
limit = MAX_DESCRIPTION_LENGTH
|
|
6
|
-
) => {
|
|
3
|
+
export const getShorterDescription = (description: string | null, limit = MAX_DESCRIPTION_LENGTH) => {
|
|
7
4
|
function cutString(s: string, n: number) {
|
|
8
5
|
const text = s.replaceAll('\n', ' ');
|
|
9
6
|
const cut = text.indexOf('. ', n);
|