spoko-design-system 1.1.3 → 1.1.5
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/.claude/settings.local.json +2 -1
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/components/Card.astro +1 -1
- package/src/components/Category/CategoriesCarousel.astro +2 -2
- package/src/components/Category/CategoryDetails.astro +2 -10
- package/src/components/LeftSidebar.astro +1 -1
- package/src/components/Product/ProductCarousel.astro +1 -1
- package/src/components/Product/ProductNumber.astro +0 -1
- package/src/components/ProductTile.astro +1 -1
- package/src/components/layout/Header.astro +1 -1
- package/src/pages/components/icons.astro +0 -6
- package/src/pages/index.astro +0 -1
- package/src/pwa.ts +2 -2
- package/src/types/index.ts +16 -16
- package/src/utils/category/getMainCategoryList.ts +1 -1
- package/src/utils/product/getPriceFormatted.ts +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [1.1.5](https://github.com/polo-blue/sds/compare/v1.1.4...v1.1.5) (2025-09-23)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* resolve additional ESLint warnings and improve type safety ([87ab770](https://github.com/polo-blue/sds/commit/87ab770b0c2e6c33a5936ec693b59e859481857e))
|
|
6
|
+
|
|
7
|
+
## [1.1.4](https://github.com/polo-blue/sds/compare/v1.1.3...v1.1.4) (2025-09-23)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* remove unused variables and improve TypeScript types ([db637f6](https://github.com/polo-blue/sds/commit/db637f6829bb2a23342a35d8041e803d4c9ad9c4))
|
|
12
|
+
|
|
1
13
|
## [1.1.3](https://github.com/polo-blue/sds/compare/v1.1.2...v1.1.3) (2025-09-23)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
const { activeCategorySlug,
|
|
2
|
+
const { activeCategorySlug, class: className } = Astro.props;
|
|
3
3
|
|
|
4
4
|
import { getTranslatedLink } from '@utils/text/getTranslatedLink';
|
|
5
5
|
import { getMainCategoryList } from '@utils/category/getMainCategoryList';
|
|
@@ -39,7 +39,7 @@ const activeIndex =
|
|
|
39
39
|
run-callbacks-on-init="false"
|
|
40
40
|
>
|
|
41
41
|
{
|
|
42
|
-
categories.map((category
|
|
42
|
+
categories.map((category) => (
|
|
43
43
|
<swiper-slide
|
|
44
44
|
itemprop="hasPart"
|
|
45
45
|
role="presentation"
|
|
@@ -3,16 +3,8 @@ import CategorySidebarToggler from './CategorySidebarToggler.vue';
|
|
|
3
3
|
import CategoryViewToggler from './CategoryViewToggler.astro';
|
|
4
4
|
import { Icon } from 'astro-icon/components';
|
|
5
5
|
|
|
6
|
-
const {
|
|
7
|
-
|
|
8
|
-
subcategory,
|
|
9
|
-
subtitle,
|
|
10
|
-
subsubtitle,
|
|
11
|
-
titleSmall,
|
|
12
|
-
locale,
|
|
13
|
-
showViewToggler,
|
|
14
|
-
viewerLabels,
|
|
15
|
-
} = Astro.props;
|
|
6
|
+
const { category, subcategory, subtitle, subsubtitle, titleSmall, showViewToggler, viewerLabels } =
|
|
7
|
+
Astro.props;
|
|
16
8
|
|
|
17
9
|
const baseURL = '';
|
|
18
10
|
---
|
|
@@ -44,7 +44,7 @@ const getLinkClasses = link => {
|
|
|
44
44
|
</Astronav>
|
|
45
45
|
|
|
46
46
|
<script is:inline>
|
|
47
|
-
window.addEventListener('DOMContentLoaded',
|
|
47
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
48
48
|
var target = document.querySelector('[aria-current="page"]');
|
|
49
49
|
if (target && target.offsetTop > window.innerHeight - 100) {
|
|
50
50
|
document.querySelector('.nav-groups').scrollTop = target.offsetTop;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import ProductLink from './ProductLink.astro';
|
|
3
3
|
|
|
4
4
|
// Get the product directly from the prop on render
|
|
5
|
-
const { locale,
|
|
5
|
+
const { locale, products, isShopProduct = false } = Astro.props;
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
{
|
|
@@ -32,7 +32,7 @@ const navItemsLeft = [
|
|
|
32
32
|
<div class="hidden sm:block sm:ml-6">
|
|
33
33
|
<div class="flex space-x-4" itemprop="hasPart">
|
|
34
34
|
{
|
|
35
|
-
navItemsLeft.map(({ title, description, url
|
|
35
|
+
navItemsLeft.map(({ title, description, url }) => (
|
|
36
36
|
<a
|
|
37
37
|
href={url}
|
|
38
38
|
class="text-gray-400 hover:bg-blue-darker hover:text-white px-3 py-1 rounded-full text-sm font-medium"
|
|
@@ -6,12 +6,6 @@ import { iconConfig } from '../../../icon.config';
|
|
|
6
6
|
const iconifyUrl = 'https://icon-sets.iconify.design/';
|
|
7
7
|
const ICONS = iconConfig.include;
|
|
8
8
|
|
|
9
|
-
type IconGroup = {
|
|
10
|
-
name: string;
|
|
11
|
-
icons: string[];
|
|
12
|
-
url: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
9
|
const sortedIconCollections = Object.entries(ICONS)
|
|
16
10
|
.sort(([a], [b]) => a.localeCompare(b))
|
|
17
11
|
.map(([name, icons]) => ({
|
package/src/pages/index.astro
CHANGED
|
@@ -6,7 +6,6 @@ import Layout from '../layouts/Layout.astro';
|
|
|
6
6
|
import Headline from '../components/Headline.vue';
|
|
7
7
|
import Button from '../components/Button.vue';
|
|
8
8
|
import Quote from '../components/Quote.vue';
|
|
9
|
-
import FeaturesList from '../components/FeaturesList.vue';
|
|
10
9
|
|
|
11
10
|
const navItems = [
|
|
12
11
|
{
|
package/src/pwa.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { registerSW } from 'virtual:pwa-register';
|
|
|
3
3
|
registerSW({
|
|
4
4
|
immediate: true,
|
|
5
5
|
onRegisteredSW(swScriptUrl) {
|
|
6
|
-
// eslint-disable-next-line no-
|
|
6
|
+
// eslint-disable-next-line no-undef
|
|
7
7
|
console.log('SW registered: ', swScriptUrl);
|
|
8
8
|
},
|
|
9
9
|
onOfflineReady() {
|
|
10
|
-
// eslint-disable-next-line no-
|
|
10
|
+
// eslint-disable-next-line no-undef
|
|
11
11
|
console.log('PWA application ready to work offline');
|
|
12
12
|
},
|
|
13
13
|
});
|
package/src/types/index.ts
CHANGED
|
@@ -79,9 +79,9 @@ export interface Replacement {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
export interface Color {
|
|
82
|
-
id:
|
|
83
|
-
slug:
|
|
84
|
-
name?:
|
|
82
|
+
id: number;
|
|
83
|
+
slug: string;
|
|
84
|
+
name?: string;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
export interface DetailList {
|
|
@@ -189,27 +189,27 @@ export interface Product2FullSearch {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
export interface Link {
|
|
192
|
-
path:
|
|
193
|
-
name:
|
|
192
|
+
path: string;
|
|
193
|
+
name: string;
|
|
194
194
|
}
|
|
195
195
|
export interface EngineType {
|
|
196
|
-
id:
|
|
197
|
-
type:
|
|
196
|
+
id: number;
|
|
197
|
+
type: string;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
export interface Model {
|
|
201
|
-
id:
|
|
202
|
-
slug:
|
|
203
|
-
sort:
|
|
204
|
-
name:
|
|
201
|
+
id: number;
|
|
202
|
+
slug: string;
|
|
203
|
+
sort: number;
|
|
204
|
+
name: string;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
export interface Material {
|
|
208
|
-
id:
|
|
209
|
-
name:
|
|
210
|
-
slug:
|
|
211
|
-
sort:
|
|
212
|
-
value?:
|
|
208
|
+
id: number;
|
|
209
|
+
name: string;
|
|
210
|
+
slug: string;
|
|
211
|
+
sort: number | null;
|
|
212
|
+
value?: string | null;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
export interface ProductImage {
|
|
@@ -4,7 +4,7 @@ import { getApiCategories } from '@utils/api/getCategories';
|
|
|
4
4
|
import { getSortedCategories } from '@utils/category/getSortedCategories';
|
|
5
5
|
|
|
6
6
|
// Retrieve main categories:
|
|
7
|
-
export const getMainCategoryList = async (
|
|
7
|
+
export const getMainCategoryList = async (): Promise<CatObject[]> => {
|
|
8
8
|
// Fetch categories from API
|
|
9
9
|
const categories = await getApiCategories();
|
|
10
10
|
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
interface Product {
|
|
2
|
+
price_eur?: number;
|
|
3
|
+
price_pln?: number;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const getPriceFormatted = (product: Product) => {
|
|
2
7
|
// Default to EUR formatting for English-only design system
|
|
3
8
|
if (product.price_eur) {
|
|
4
9
|
return new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(
|