spoko-design-system 1.1.0 → 1.1.2
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/.github/workflows/code-quality.yml +3 -3
- package/.github/workflows/sonarcloud.yml +1 -1
- package/.prettierrc +1 -0
- package/CHANGELOG.md +12 -0
- package/package.json +8 -2
- package/src/MyComponent.astro +1 -1
- package/src/components/Badge.vue +2 -2
- package/src/components/Badges.vue +17 -7
- package/src/components/Breadcrumbs.vue +47 -39
- package/src/components/Button.vue +31 -30
- package/src/components/ButtonCopy.astro +12 -17
- package/src/components/ButtonCopy.vue +26 -25
- package/src/components/Card.astro +4 -6
- package/src/components/Carousel.astro +4 -4
- package/src/components/Category/CategoriesCarousel.astro +75 -75
- package/src/components/Category/CategoryDetails.astro +75 -79
- package/src/components/Category/CategoryLink.vue +8 -12
- package/src/components/Category/CategorySidebarToggler.vue +2 -7
- package/src/components/Category/CategoryTile.astro +3 -3
- package/src/components/Category/CategoryViewToggler.astro +18 -18
- package/src/components/Category/SubCategoryLink.vue +13 -13
- package/src/components/Faq.astro +16 -17
- package/src/components/FaqItem.astro +27 -27
- package/src/components/FeaturesList.vue +19 -29
- package/src/components/FuckRussia.vue +40 -27
- package/src/components/HandDrive.astro +11 -15
- package/src/components/Header/Header.astro +165 -166
- package/src/components/Header/SkipToContent.astro +1 -1
- package/src/components/Headline.vue +44 -27
- package/src/components/Image.astro +5 -7
- package/src/components/Input.vue +143 -153
- package/src/components/Jumbotron/index.astro +143 -156
- package/src/components/Jumbotron/types.ts +28 -29
- package/src/components/Jumbotron/variants/Default.astro +44 -40
- package/src/components/Jumbotron/variants/Hero.astro +45 -53
- package/src/components/Jumbotron/variants/Post.astro +68 -64
- package/src/components/Jumbotron/variants/PostSplit.astro +89 -81
- package/src/components/Jumbotron.astro +12 -12
- package/src/components/LanguageSuggestion.astro +66 -69
- package/src/components/LeftSidebar.astro +10 -10
- package/src/components/MainColors.vue +2 -2
- package/src/components/MainInput.vue +6 -3
- package/src/components/Modal.astro +2 -2
- package/src/components/PartNumber.vue +2 -3
- package/src/components/Post/PostCategories.astro +2 -4
- package/src/components/Post/PostCategories.vue +2 -2
- package/src/components/PostHeader.astro +4 -6
- package/src/components/PrCode.vue +20 -19
- package/src/components/Product/ProductButton.vue +2 -5
- package/src/components/Product/ProductCarousel.astro +38 -27
- package/src/components/Product/ProductColors.vue +46 -42
- package/src/components/Product/ProductDetailName.vue +22 -22
- package/src/components/Product/ProductDetails.vue +115 -99
- package/src/components/Product/ProductDoc.vue +27 -25
- package/src/components/Product/ProductEngineType.vue +13 -10
- package/src/components/Product/ProductImage.astro +18 -19
- package/src/components/Product/ProductLink.vue +55 -58
- package/src/components/Product/ProductLinkInfo.astro +15 -18
- package/src/components/Product/ProductModel.vue +25 -24
- package/src/components/Product/ProductModels.vue +29 -33
- package/src/components/Product/ProductName.vue +15 -15
- package/src/components/Product/ProductNumber.astro +23 -31
- package/src/components/Product/ProductPositions.vue +32 -34
- package/src/components/ProductCarousel.astro +5 -5
- package/src/components/ProductCodes.vue +12 -14
- package/src/components/ProductDetailName.vue +18 -20
- package/src/components/ProductDetailsList.vue +48 -27
- package/src/components/Quote.vue +8 -6
- package/src/components/ReloadPrompt.astro +39 -47
- package/src/components/SlimBanner.vue +44 -19
- package/src/components/Table.vue +4 -6
- package/src/components/Translations.vue +17 -8
- package/src/components/flags/FlagPL.vue +4 -3
- package/src/components/flags/FlagUA.vue +2 -2
- package/src/components/layout/CallToAction.astro +17 -12
- package/src/components/layout/Container.astro +3 -1
- package/src/components/layout/Header.astro +12 -21
- package/src/config.ts +43 -43
- package/src/design.config.ts +63 -63
- package/src/env.d.ts +4 -4
- package/src/layouts/Layout.astro +10 -19
- package/src/layouts/MainLayout.astro +13 -19
- package/src/layouts/partials/FooterCommon.astro +2 -2
- package/src/layouts/partials/HeadCommon.astro +9 -9
- package/src/layouts/partials/HeadSEO.astro +12 -5
- package/src/pages/components/icons.astro +130 -121
- package/src/pages/core/shadows.astro +18 -11
- package/src/pages/index.astro +178 -75
- package/src/pwa.ts +4 -4
- package/src/styles/base/base.css +14 -19
- package/src/styles/base/grid.css +54 -58
- package/src/styles/base/typography.css +40 -40
- package/src/styles/content.css +25 -23
- package/src/styles/main.css +5 -6
- package/src/types/Product.ts +31 -31
- package/src/types/astro.d.ts +1 -1
- package/src/types/index.ts +234 -237
- package/src/utils/api/getCategories.ts +9 -9
- package/src/utils/category/getMainCategoryList.ts +22 -22
- package/src/utils/category/getSortedCategories.ts +7 -11
- package/src/utils/product/getPriceFormatted.ts +14 -11
- package/src/utils/product/getProductChecklist.ts +10 -11
- package/src/utils/product/useFormatProductNumber.ts +18 -9
- package/src/utils/seo/getShorterDescription.ts +6 -4
- package/src/utils/text/formatDate.ts +2 -3
- package/src/utils/text/formatLocaleNumber.ts +2 -2
- package/src/utils/text/formatPad.ts +2 -2
- package/src/utils/text/getNumberFormatted.ts +10 -10
- package/src/utils/text/getTranslatedLink.ts +3 -3
- package/src/utils/text.ts +11 -8
|
@@ -1,60 +1,57 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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>
|
|
2
|
+
<div class="product-link" itemscope itemtype="https://schema.org/Product">
|
|
3
|
+
<div
|
|
4
|
+
:class="[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-neutral-lightest/70" :alt="productName" />
|
|
9
|
+
</slot>
|
|
35
10
|
</div>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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 :productNumber="productNumber" :copyDisabled="true" />
|
|
26
|
+
|
|
27
|
+
<template v-if="index !== null">
|
|
28
|
+
<meta itemprop="position" :content="index.toString()" />
|
|
29
|
+
<meta itemprop="name" :content="nameFormatted" />
|
|
30
|
+
</template>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script setup lang="ts">
|
|
36
|
+
import { computed } from 'vue';
|
|
37
|
+
import { ProductNumber } from 'spoko-design-system';
|
|
38
|
+
import { removeSemicolon } from 'spoko-design-system';
|
|
39
|
+
|
|
40
|
+
interface Props {
|
|
41
|
+
productName: string;
|
|
42
|
+
productNumber: string;
|
|
43
|
+
url: string;
|
|
44
|
+
price?: string;
|
|
45
|
+
bigTile?: boolean;
|
|
46
|
+
index?: number;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
50
|
+
bigTile: false,
|
|
51
|
+
index: null,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const nameFormatted = computed(() => {
|
|
55
|
+
return removeSemicolon(props.productName.toString());
|
|
56
|
+
});
|
|
57
|
+
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { Product } from '../../types/Product';
|
|
3
|
-
import ProductNumber from
|
|
3
|
+
import ProductNumber from './ProductNumber.astro';
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
6
6
|
product: Product;
|
|
@@ -12,27 +12,24 @@ interface Props {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const { product, nameFormatted, price, url, index, bigTile } = Astro.props;
|
|
15
|
-
|
|
16
15
|
---
|
|
17
16
|
|
|
18
17
|
<div class={`flex flex-col ${bigTile ? '' : 'sm:pl-4'}`}>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/>
|
|
31
|
-
<ProductNumber productNumber={product.number} copyDisabled={true} />
|
|
32
|
-
{index !== null && (
|
|
18
|
+
{price && <p class="block mb-2 font-600 font-headbold text-5">{price}</p>}
|
|
19
|
+
<a
|
|
20
|
+
class="product-link--url"
|
|
21
|
+
href={url}
|
|
22
|
+
itemprop="url"
|
|
23
|
+
title={product.number}
|
|
24
|
+
set:html={nameFormatted}
|
|
25
|
+
/>
|
|
26
|
+
<ProductNumber productNumber={product.number} copyDisabled={true} />
|
|
27
|
+
{
|
|
28
|
+
index !== null && (
|
|
33
29
|
<>
|
|
34
30
|
<meta itemprop="position" content={index} />
|
|
35
31
|
<meta itemprop="name" content={nameFormatted} />
|
|
36
32
|
</>
|
|
37
|
-
)
|
|
38
|
-
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
</div>
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import type { Model } from 'types/index';
|
|
3
|
-
import type { PropType } from 'vue';
|
|
4
|
-
|
|
5
|
-
const props = defineProps({
|
|
6
|
-
carModel: {
|
|
7
|
-
type: Object as PropType<Model>,
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
</
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { Model } from 'types/index';
|
|
3
|
+
import type { PropType } from 'vue';
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
carModel: {
|
|
7
|
+
type: Object as PropType<Model>,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
</script>
|
|
12
|
+
<template>
|
|
13
|
+
<strong class="product-model" :data-pagefind-filter="`model:${props.carModel.name}`">{{
|
|
14
|
+
props.carModel.name
|
|
15
|
+
}}</strong>
|
|
16
|
+
</template>
|
|
17
|
+
<style>
|
|
18
|
+
.product-model:not(:last-child) {
|
|
19
|
+
@apply mr-1;
|
|
20
|
+
|
|
21
|
+
&:after {
|
|
22
|
+
content: ',';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import type { PropType } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
modelIds: {
|
|
6
|
-
type: Array as PropType<(string | number)[]>,
|
|
7
|
-
default: () => [],
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
content: ','
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
</style>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
modelIds: {
|
|
6
|
+
type: Array as PropType<(string | number)[]>,
|
|
7
|
+
default: () => [],
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div inline-flex flex-wrap max-w-max>
|
|
15
|
+
<span v-for="(modelId, index) in modelIds" :key="index" class="product-model block">
|
|
16
|
+
<ProductModel :id="modelId" />
|
|
17
|
+
</span>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<style>
|
|
22
|
+
.product-model:not(:last-child) {
|
|
23
|
+
@apply mr-1;
|
|
24
|
+
|
|
25
|
+
&:after {
|
|
26
|
+
content: ',';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
const props = defineProps({
|
|
3
|
-
name: {
|
|
4
|
-
type: String,
|
|
5
|
-
default: '',
|
|
6
|
-
required: true,
|
|
7
|
-
},
|
|
8
|
-
})
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<h1 class="pdp-headline select-all">
|
|
13
|
-
{{ props.name }}
|
|
14
|
-
</h1>
|
|
15
|
-
</template>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
name: {
|
|
4
|
+
type: String,
|
|
5
|
+
default: '',
|
|
6
|
+
required: true,
|
|
7
|
+
},
|
|
8
|
+
});
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<h1 class="pdp-headline select-all">
|
|
13
|
+
{{ props.name }}
|
|
14
|
+
</h1>
|
|
15
|
+
</template>
|
|
@@ -9,18 +9,16 @@ const {
|
|
|
9
9
|
small = false,
|
|
10
10
|
big = false,
|
|
11
11
|
class: customClass = '',
|
|
12
|
-
buttonTexts = { copy:
|
|
12
|
+
buttonTexts = { copy: 'Copy', copied: 'Copied' },
|
|
13
13
|
} = Astro.props;
|
|
14
14
|
|
|
15
15
|
// Use formatted product number using a helper function
|
|
16
16
|
const { formattedNumbers: formatted } = useFormatProductNumber(productNumber);
|
|
17
17
|
|
|
18
18
|
// Define classes dynamically
|
|
19
|
-
const classNames = [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
customClass,
|
|
23
|
-
].filter(Boolean).join(' ');
|
|
19
|
+
const classNames = ['product-number', big ? 'text-4.5' : 'number-big', customClass]
|
|
20
|
+
.filter(Boolean)
|
|
21
|
+
.join(' ');
|
|
24
22
|
|
|
25
23
|
const trackingClass = small ? 'tracking-wide' : 'tracking-tight';
|
|
26
24
|
|
|
@@ -29,32 +27,26 @@ const ProductWrapper = isPdp ? 'h2' : 'div';
|
|
|
29
27
|
const FormattedWrapper = isPdp ? 'h3' : 'div';
|
|
30
28
|
---
|
|
31
29
|
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
<div class={
|
|
35
|
-
<
|
|
36
|
-
{productNumber}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
{big && (
|
|
40
|
-
<ButtonCopy
|
|
41
|
-
productNumber={productNumber}
|
|
42
|
-
texts={buttonTexts}
|
|
43
|
-
tooltipClasses=""
|
|
44
|
-
/>
|
|
45
|
-
)}
|
|
46
|
-
</div>
|
|
30
|
+
{
|
|
31
|
+
productNumber && formatted && (
|
|
32
|
+
<div class={classNames}>
|
|
33
|
+
<div class={['p-number', small ? 'w-full' : ''].join(' ')} itemprop="identifier">
|
|
34
|
+
<ProductWrapper id={productNumber} class="product-code">
|
|
35
|
+
{productNumber}
|
|
36
|
+
</ProductWrapper>
|
|
47
37
|
|
|
48
|
-
|
|
49
|
-
<div class="relative inset-0" data-pagefind-ignore>
|
|
50
|
-
{formatted.dot}
|
|
38
|
+
{big && <ButtonCopy productNumber={productNumber} texts={buttonTexts} tooltipClasses="" />}
|
|
51
39
|
</div>
|
|
52
|
-
|
|
53
|
-
|
|
40
|
+
|
|
41
|
+
<div class={['code-formatted', trackingClass].join(' ')}>
|
|
42
|
+
<div class="relative inset-0" data-pagefind-ignore>
|
|
43
|
+
{formatted.dot}
|
|
44
|
+
</div>
|
|
45
|
+
<div class="absolute inset-0" data-pagefind-ignore>
|
|
46
|
+
{formatted.dash}
|
|
47
|
+
</div>
|
|
48
|
+
<FormattedWrapper class="number-secondary">{formatted.standard}</FormattedWrapper>
|
|
54
49
|
</div>
|
|
55
|
-
<FormattedWrapper class="number-secondary">
|
|
56
|
-
{formatted.standard}
|
|
57
|
-
</FormattedWrapper>
|
|
58
50
|
</div>
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
)
|
|
52
|
+
}
|
|
@@ -1,34 +1,32 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
</style>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { Position } from 'types/index';
|
|
3
|
+
import type { PropType } from 'vue';
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
positions: {
|
|
6
|
+
type: Array as PropType<Position[]>,
|
|
7
|
+
default: null,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
locale: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: null,
|
|
13
|
+
required: false,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<span v-for="position in positions" :key="position.sort" class="product-position">
|
|
20
|
+
{{ position.name }}
|
|
21
|
+
</span>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<style>
|
|
25
|
+
.product-position:not(:last-child) {
|
|
26
|
+
margin-right: 0.25rem;
|
|
27
|
+
|
|
28
|
+
&:after {
|
|
29
|
+
content: ',';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
import ProductTile from
|
|
2
|
+
import ProductTile from '../components/ProductTile.astro';
|
|
3
3
|
export const productObject = {
|
|
4
|
-
name:
|
|
5
|
-
url:
|
|
6
|
-
number:
|
|
4
|
+
name: 'Combi-instrument MFA+',
|
|
5
|
+
url: 'https://google.com',
|
|
6
|
+
number: '6R0920870F',
|
|
7
7
|
photo:
|
|
8
|
-
|
|
8
|
+
'https://img.freepik.com/darmowe-wektory/tlo-retro-modeli-geometrycznych_52683-17902.jpg?w=1380&t=st=1706311337',
|
|
9
9
|
};
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import type { PropType } from 'vue'
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
3
|
import PrCode from './PrCode.vue';
|
|
4
4
|
|
|
5
5
|
const props = defineProps({
|
|
@@ -13,27 +13,25 @@ const props = defineProps({
|
|
|
13
13
|
default: false,
|
|
14
14
|
required: false,
|
|
15
15
|
},
|
|
16
|
-
})
|
|
16
|
+
});
|
|
17
17
|
|
|
18
|
-
const codes = props.prcodes || []
|
|
19
|
-
const decodedCodes = codes ? codes.sort() : []
|
|
18
|
+
const codes = props.prcodes || [];
|
|
19
|
+
const decodedCodes = codes ? codes.sort() : [];
|
|
20
20
|
|
|
21
21
|
const settings = {
|
|
22
22
|
prcodes: decodedCodes,
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<template>
|
|
27
|
-
|
|
28
|
-
<span
|
|
29
|
-
v-for="(prcode, index) in settings.prcodes"
|
|
30
|
-
:key="index"
|
|
31
|
-
class="not-last:mr-1"
|
|
32
|
-
>
|
|
27
|
+
<span v-for="(prcode, index) in settings.prcodes" :key="index" class="not-last:mr-1">
|
|
33
28
|
<PrCode :prcode="prcode" v-if="!String(prcode).includes('+')" />
|
|
34
|
-
<span v-else
|
|
35
|
-
<PrCode
|
|
29
|
+
<span v-else>
|
|
30
|
+
<PrCode
|
|
31
|
+
v-for="(splittedCode, index2) in String(prcode).split('+')"
|
|
32
|
+
:key="index2"
|
|
33
|
+
:prcode="splittedCode"
|
|
34
|
+
/>
|
|
36
35
|
</span>
|
|
37
36
|
</span>
|
|
38
37
|
</template>
|
|
39
|
-
|
|
@@ -3,7 +3,9 @@ import { PropType } from 'vue';
|
|
|
3
3
|
|
|
4
4
|
const props = defineProps({
|
|
5
5
|
as: {
|
|
6
|
-
type: String as PropType<
|
|
6
|
+
type: String as PropType<
|
|
7
|
+
'th' | 'td' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span'
|
|
8
|
+
>,
|
|
7
9
|
default: 'div',
|
|
8
10
|
required: true,
|
|
9
11
|
},
|
|
@@ -16,8 +18,8 @@ const props = defineProps({
|
|
|
16
18
|
type: String,
|
|
17
19
|
default: '',
|
|
18
20
|
required: false,
|
|
19
|
-
}
|
|
20
|
-
})
|
|
21
|
+
},
|
|
22
|
+
});
|
|
21
23
|
</script>
|
|
22
24
|
|
|
23
25
|
<template>
|
|
@@ -28,26 +30,22 @@ const props = defineProps({
|
|
|
28
30
|
</component>
|
|
29
31
|
</template>
|
|
30
32
|
|
|
31
|
-
|
|
32
33
|
<style>
|
|
33
34
|
.detail-name {
|
|
34
35
|
@apply overflow-hidden relative;
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
37
|
+
span {
|
|
38
|
+
@apply block bg-white relative z-10 pr-1.5 w-full;
|
|
39
|
+
|
|
40
|
+
&:before {
|
|
41
|
+
/* // order: 2; */
|
|
42
|
+
@apply text-gray-300 absolute select-none border-b border-gray-200 w-full -z-1 absolute content-empty left-0;
|
|
43
|
+
height: 1em;
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
font-weight: 100;
|
|
46
|
+
bottom: 2px;
|
|
47
|
+
flex: 1;
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
}
|
|
51
50
|
}
|
|
52
|
-
|
|
53
|
-
</style>
|
|
51
|
+
</style>
|