spoko-design-system 0.2.43 → 0.2.45
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/index.ts
CHANGED
|
@@ -22,7 +22,7 @@ export { default as CategorySidebarToggler } from './src/components/Category/Cat
|
|
|
22
22
|
export { default as SubCategoryLink } from './src/components/Category/SubCategoryLink.vue';
|
|
23
23
|
|
|
24
24
|
// Astro Components
|
|
25
|
-
export { default as Copyright } from './src/components/Copyright.astro';
|
|
25
|
+
export { default as Copyright } from './src/components/Copyright.astro'; ///src/components/Copyright.astro';
|
|
26
26
|
export { default as HandDrive } from './src/components/HandDrive.astro';
|
|
27
27
|
export { default as Faq } from './src/components/Faq.astro';
|
|
28
28
|
export { default as FaqItem } from './src/components/FaqItem.astro';
|
|
@@ -33,6 +33,8 @@ export { default as ProductImage } from './src/components/Product/ProductImage.a
|
|
|
33
33
|
// export { default as CategoriesSidebar } from './src/components/Category/CategoriesSidebar.astro';
|
|
34
34
|
export { default as CategoryDetails } from './src/components/Category/CategoryDetails.astro';
|
|
35
35
|
export { default as CategorySection } from './src/components/Category/CategorySection.astro';
|
|
36
|
+
export { default as CategoryTile } from './src/components/Category/CategoryTile.astro';
|
|
37
|
+
|
|
36
38
|
|
|
37
39
|
// Utils: Product
|
|
38
40
|
export { default as getPriceFormatted } from './src/utils/product/getPriceFormatted';
|
package/package.json
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { getTranslatedLink } from "@utils/text/getTranslatedLink";
|
|
3
|
+
import { Image } from "astro:assets";
|
|
4
|
+
|
|
5
|
+
interface CategoryObject {
|
|
6
|
+
photo: string;
|
|
7
|
+
desc: string;
|
|
8
|
+
alt: string;
|
|
9
|
+
name: string;
|
|
10
|
+
slug: string;
|
|
11
|
+
height?: number;
|
|
12
|
+
width?: number;
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let inputProps = {};
|
|
17
|
+
const { CategoryObject } = Astro.props as { CategoryObject: CategoryObject };
|
|
18
|
+
CategoryObject.height = CategoryObject.height ?? 70;
|
|
19
|
+
CategoryObject.width = CategoryObject.width ?? 70;
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<a
|
|
23
|
+
href={getTranslatedLink(`/${CategoryObject.slug}/`)}
|
|
24
|
+
class="carousel-item"
|
|
25
|
+
{...inputProps}
|
|
26
|
+
>
|
|
27
|
+
<Image
|
|
28
|
+
src={`${CategoryObject.photo}`}
|
|
29
|
+
alt={CategoryObject.alt}
|
|
30
|
+
height={CategoryObject.height}
|
|
31
|
+
width={CategoryObject.height}
|
|
32
|
+
format="avif"
|
|
33
|
+
loading="eager"
|
|
34
|
+
onerror="this.style.display='none';"
|
|
35
|
+
class="cats-img"
|
|
36
|
+
/>
|
|
37
|
+
<div class="swiper-lazy-preloader"></div>
|
|
38
|
+
|
|
39
|
+
<div class="cat-name" itemprop="name">
|
|
40
|
+
{CategoryObject.name}
|
|
41
|
+
</div>
|
|
42
|
+
</a>
|