spoko-design-system 0.2.69 → 0.2.70

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
@@ -25,8 +25,8 @@ export { default as ProductModels } from './src/components/Product/ProductModels
25
25
  export { default as ProductName } from './src/components/Product/ProductName.vue';
26
26
  export { default as ProductPositions } from './src/components/Product/ProductPositions.vue';
27
27
  export { default as ProductNumber } from './src/components/Product/ProductNumber.astro';
28
- export { default as ProductLink } from './src/components/Product/ProductLink.astro';
29
- export { default as ProductCarousel } from './src/components/Product/ProductCarousel.astro';
28
+ export { default as ProductLink } from './src/components/Product/ProductLink.vue';
29
+ // export { default as ProductCarousel } from './src/components/Product/ProductCarousel.astro';
30
30
 
31
31
 
32
32
  export { default as CategoryLink } from './src/components/Category/CategoryLink.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spoko-design-system",
3
- "version": "0.2.69",
3
+ "version": "0.2.70",
4
4
  "private": false,
5
5
  "main": "./index.ts",
6
6
  "module": "./index.ts",
@@ -22,6 +22,7 @@ CategoryObject.width = CategoryObject.width ?? 70;
22
22
  <a
23
23
  href={getTranslatedLink(`/${CategoryObject.slug}/`)}
24
24
  class="carousel-item"
25
+ data-astro-prefetch
25
26
  {...inputProps}
26
27
  >
27
28
  <Image
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <div class="product-link" itemscope itemtype="https://schema.org/Product">
3
+ <div :class="[
4
+ bigTile ? 'product-link--big-tile' : 'product-thumb--plp product-thumb--carousel'
5
+ ]">
6
+ <!-- Slot na ProductImage z Astro -->
7
+ <slot name="image">
8
+ <img src="/1x1.png" class="bg-gray-100/70" :alt="productName" />
9
+ </slot>
10
+ </div>
11
+
12
+ <div :class="[bigTile ? '' : 'sm:pl-4']">
13
+ <p v-if="price" class="block mb-2 font-600 font-headbold text-5">
14
+ {{ price }}
15
+ </p>
16
+
17
+ <a
18
+ class="product-link--url"
19
+ :href="url"
20
+ itemprop="url"
21
+ :title="productNumber"
22
+ v-html="nameFormatted"
23
+ />
24
+
25
+ <ProductNumber
26
+ :productNumber="productNumber"
27
+ :copyDisabled="true"
28
+ />
29
+
30
+ <template v-if="index !== null">
31
+ <meta itemprop="position" :content="index.toString()" />
32
+ <meta itemprop="name" :content="nameFormatted" />
33
+ </template>
34
+ </div>
35
+ </div>
36
+ </template>
37
+
38
+ <script setup lang="ts">
39
+ import { computed } from 'vue'
40
+ import { ProductNumber } from 'spoko-design-system'
41
+ import { removeSemicolon } from 'spoko-design-system'
42
+
43
+ interface Props {
44
+ productName: string
45
+ productNumber: string
46
+ url: string
47
+ price?: string
48
+ bigTile?: boolean
49
+ index?: number
50
+ }
51
+
52
+ const props = withDefaults(defineProps<Props>(), {
53
+ bigTile: false,
54
+ index: null,
55
+ })
56
+
57
+ const nameFormatted = computed(() => {
58
+ return removeSemicolon(props.productName.toString())
59
+ })
60
+ </script>