spoko-design-system 1.1.3 → 1.1.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [1.1.4](https://github.com/polo-blue/sds/compare/v1.1.3...v1.1.4) (2025-09-23)
2
+
3
+ ### Bug Fixes
4
+
5
+ * remove unused variables and improve TypeScript types ([db637f6](https://github.com/polo-blue/sds/commit/db637f6829bb2a23342a35d8041e803d4c9ad9c4))
6
+
1
7
  ## [1.1.3](https://github.com/polo-blue/sds/compare/v1.1.2...v1.1.3) (2025-09-23)
2
8
 
3
9
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spoko-design-system",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "private": false,
5
5
  "main": "./index.ts",
6
6
  "module": "./index.ts",
@@ -1,5 +1,5 @@
1
1
  ---
2
- const { class: className, imgSrc, imgAlt, href } = Astro.props;
2
+ const { imgSrc, imgAlt, href } = Astro.props;
3
3
 
4
4
  import Image from '../components/Image.astro';
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- const { activeCategorySlug, locale, class: className } = Astro.props;
2
+ const { activeCategorySlug } = Astro.props;
3
3
 
4
4
  import { getTranslatedLink } from '@utils/text/getTranslatedLink';
5
5
  import { getMainCategoryList } from '@utils/category/getMainCategoryList';
@@ -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
- category,
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', event => {
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, class: className, products, isShopProduct = false, ...rest } = Astro.props;
5
+ const { locale, products, isShopProduct = false } = Astro.props;
6
6
  ---
7
7
 
8
8
  {
@@ -4,7 +4,6 @@ import useFormatProductNumber from '../../utils/product/useFormatProductNumber';
4
4
 
5
5
  const {
6
6
  productNumber,
7
- copyDisabled = false,
8
7
  isPdp = false,
9
8
  small = false,
10
9
  big = false,
@@ -1,5 +1,5 @@
1
1
  ---
2
- const { productObject, locale, index } = Astro.props;
2
+ const { productObject, index } = Astro.props;
3
3
  import Image from './Image.astro';
4
4
  import ProductNumber from './Product/ProductNumber.astro';
5
5
  ---
@@ -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, img }) => (
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]) => ({
@@ -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 (locale: string = 'en'): Promise<CatObject[]> => {
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
- export const getPriceFormatted = (product: any) => {
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(