spoko-design-system 0.1.4 → 0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spoko-design-system",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "astro dev",
@@ -34,7 +34,7 @@
34
34
  "@astrojs/vue": "^4.0.8",
35
35
  "@docsearch/css": "^3.5.2",
36
36
  "@docsearch/react": "^3.5.2",
37
- "@iconify-json/ant-design": "^1.1.14",
37
+ "@iconify-json/ant-design": "^1.1.15",
38
38
  "@iconify-json/bi": "^1.1.23",
39
39
  "@iconify-json/bx": "^1.1.10",
40
40
  "@iconify-json/carbon": "^1.1.28",
@@ -49,13 +49,13 @@
49
49
  "@iconify-json/mdi": "^1.1.64",
50
50
  "@iconify-json/noto-v1": "^1.1.11",
51
51
  "@iconify-json/octicon": "^1.1.52",
52
- "@iconify-json/ph": "^1.1.10",
52
+ "@iconify-json/ph": "^1.1.11",
53
53
  "@iconify-json/simple-icons": "^1.1.90",
54
54
  "@iconify-json/uil": "^1.1.8",
55
- "@iconify/json": "^2.2.177",
55
+ "@iconify/json": "^2.2.178",
56
56
  "@iconify/vue": "^4.1.1",
57
- "@types/node": "^20.11.14",
58
- "@types/react": "^18.2.48",
57
+ "@types/node": "^20.11.16",
58
+ "@types/react": "^18.2.51",
59
59
  "@unocss/astro": "^0.58.4",
60
60
  "@unocss/preset-attributify": "^0.58.4",
61
61
  "@unocss/preset-typography": "^0.58.4",
@@ -64,9 +64,9 @@
64
64
  "@unocss/preset-wind": "^0.58.4",
65
65
  "@unocss/reset": "^0.58.4",
66
66
  "@vueuse/core": "^10.7.2",
67
- "astro-compress": "^2.2.8",
67
+ "astro-compress": "^2.2.9",
68
68
  "astro-i18next": "1.0.0-beta.21",
69
- "astro-icon": "^1.0.4",
69
+ "astro-icon": "^1.1.0",
70
70
  "astro-navbar": "^2.3.0",
71
71
  "astro-pagefind": "^1.4.0",
72
72
  "i18next": "^23.8.2",
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "devDependencies": {
84
84
  "@unocss/transformer-variant-group": "^0.58.4",
85
- "astro": "^4.2.8",
85
+ "astro": "^4.3.2",
86
86
  "unocss": "^0.58.3"
87
87
  },
88
88
  "pnpm": {
@@ -0,0 +1,41 @@
1
+
2
+ <script lang="ts" setup>
3
+ import { PropType } from 'vue';
4
+
5
+ const props = defineProps({
6
+ items: {
7
+ type: Object as PropType<String[] | null>,
8
+ default: null,
9
+ required: true,
10
+ },
11
+ caption: {
12
+ type: Object as PropType<String | null>,
13
+ default: null,
14
+ required: false,
15
+ }
16
+ })
17
+ </script>
18
+
19
+ <template>
20
+ <h2 class="font-headregular mb-2 font-medium text-lg colon-after" v-if="props.caption">{{ props.caption }}</h2>
21
+ <ul class="">
22
+ <li v-for="item in props.items" class="leading-5">
23
+ {{ item }}
24
+ </li>
25
+ </ul>
26
+ </template>
27
+
28
+
29
+ <style lang="scss" scoped>
30
+ ul {
31
+ @apply list-square pl-5;
32
+
33
+ li {
34
+ @apply relative mb-2;
35
+
36
+ &::marker {
37
+ @apply text-blue-400;
38
+ }
39
+ }
40
+ }
41
+ </style>
@@ -0,0 +1,28 @@
1
+ <script lang="ts" setup>
2
+ import { PropType } from 'vue';
3
+
4
+ const props = defineProps({
5
+ as: {
6
+ type: String as PropType<'div' | 'td' | 'span' | 'h1' | 'h2' | 'h3'>,
7
+ default: 'div',
8
+ required: true,
9
+ },
10
+ number: {
11
+ type: String,
12
+ default: '',
13
+ required: true,
14
+ },
15
+ class: {
16
+ type: String,
17
+ default: '',
18
+ required: false,
19
+ },
20
+ })
21
+
22
+ </script>
23
+
24
+ <template>
25
+ <component :is="props.as" :class="props.class">
26
+ {{ props.number }}
27
+ </component>
28
+ </template>
@@ -7,7 +7,7 @@ import type { PropType } from 'vue'
7
7
 
8
8
  const props = defineProps({
9
9
  prcode: {
10
- type: Object as PropType<string[] | null>,
10
+ type: String,
11
11
  default: null,
12
12
  required: true,
13
13
  },
@@ -0,0 +1,39 @@
1
+ <script lang="ts" setup>
2
+ import type { PropType } from 'vue'
3
+ import PrCode from './PrCode.vue';
4
+
5
+ const props = defineProps({
6
+ prcodes: {
7
+ type: Object as PropType<string[] | null>,
8
+ default: null,
9
+ required: true,
10
+ },
11
+ isPdp: {
12
+ type: Boolean,
13
+ default: false,
14
+ required: false,
15
+ },
16
+ })
17
+
18
+ const codes = props.prcodes || []
19
+ const decodedCodes = codes ? codes.sort() : []
20
+
21
+ const settings = {
22
+ prcodes: decodedCodes,
23
+ }
24
+ </script>
25
+
26
+ <template>
27
+
28
+ <span
29
+ v-for="(prcode, index) in settings.prcodes"
30
+ :key="index"
31
+ class="not-last:mr-1"
32
+ >
33
+ <PrCode :prcode="prcode" v-if="!String(prcode).includes('+')" />
34
+ <span v-else >
35
+ <PrCode v-for="(splittedCode, index2) in String(prcode).split('+')" :key="index2" :prcode="splittedCode" />
36
+ </span>
37
+ </span>
38
+ </template>
39
+
@@ -1,17 +1,39 @@
1
1
  <script setup lang="ts">
2
+ import { PropType } from "vue";
2
3
  import ProductDetailName from "./ProductDetailName.vue";
3
- const props = defineProps<{
4
- value: {name: string, value: string}[];
5
- }>();
4
+
5
+ interface TableItem {
6
+ slug: string,
7
+ name: string
8
+ value: unknown
9
+ }
10
+
11
+ const props = defineProps({
12
+ items: {type: Array as PropType<TableItem[]>, default: () => []},
13
+ caption: { type: String, default: null }
14
+ })
6
15
 
7
16
  </script>
8
17
 
9
18
  <template>
10
19
  <table class="details table-auto text-left bg-white">
20
+ <caption v-if="!!$slots.caption || caption">
21
+ <slot name="caption">{{ caption }}</slot>
22
+ </caption>
23
+ <colgroup>
24
+ <col>
25
+ <col>
26
+ </colgroup>
11
27
  <tbody>
12
- <tr class="border" v-for="row, index in props.value" :key="index">
28
+ <tr class="border" v-for="row, index in props.items" :key="index">
13
29
  <ProductDetailName as="th" :text="row.name" />
14
- <td>{{ row.value }}</td>
30
+ <td>
31
+ <slot
32
+ :name="row.slug"
33
+ >
34
+ {{ row.value }}
35
+ </slot>
36
+ </td>
15
37
  </tr>
16
38
  </tbody>
17
39
  </table>
@@ -32,5 +54,9 @@ const props = defineProps<{
32
54
  th {
33
55
  @apply pr-0
34
56
  }
57
+
58
+ td {
59
+ @apply relative;
60
+ }
35
61
  }
36
62
  </style>
@@ -0,0 +1,116 @@
1
+ ---
2
+ import { t } from "i18next";
3
+ import ButtonCopy from "./ButtonCopy.vue";
4
+
5
+ const {
6
+ copyDisabled,
7
+ productNumber,
8
+ isPdp,
9
+ small,
10
+ big,
11
+ class: className,
12
+ } = Astro.props;
13
+
14
+ const butonTexts = {
15
+ copy: t("copy"),
16
+ copied: t("copied"),
17
+ };
18
+
19
+ const isLetter = (string: string) => {
20
+ return string.toLowerCase() !== string.toUpperCase();
21
+ };
22
+
23
+ const niceName = (string: string, separator = "\u00A0") => {
24
+ let word = string; //e.g. to 6Q0947106EY20 .split('+')
25
+
26
+ if (
27
+ isLetter(string[0]) === true &&
28
+ isLetter(string[1]) === false &&
29
+ string.length === 9
30
+ ) {
31
+ // mainly liquids
32
+ word = string
33
+ .replace(
34
+ /^(\w{1})(\w{3})(\w{3})(.*)$/,
35
+ `$1${separator}$2${separator}$3${separator}$4`,
36
+ )
37
+ .replace(/(^\s+|\s+$)/, "");
38
+ }
39
+
40
+ // wheels / emblems e.g. 6R0601025AK8Z8 --> 6R0 601 025 AB 8Z8 || 6C0601025DFZZ --> 6C0 601 025 D FZZ || 6R0853433ADA1 -> 6R0 853 433 A DA1
41
+ else if (string.length >= 13) {
42
+ // console.log('part number: wheels / emblems', word)
43
+ word = string
44
+ .replace(
45
+ /^(\w{3})(\w{3})(\w{3})(.*)(\w{3})$/,
46
+ `$1${separator}$2${separator}$3${separator}$4${separator}$5`,
47
+ )
48
+ .replace(/(^\s+|\s+$)/, "");
49
+ } else if (string.length > 12) {
50
+ // accessories / mats
51
+ word = string
52
+ .replace(
53
+ /^(\w{3})(\w{3})(\w{3})(\w{1})(.*)$/,
54
+ `$1${separator}$2${separator}$3${separator}$4${separator}$5`,
55
+ )
56
+ .replace(/(^\s+|\s+$)/, "");
57
+ } else {
58
+ // other parts
59
+ word = string
60
+ .replace(/(\w{3})/g, `$1${separator}`)
61
+ .replace(/(^\s+|\s+$)/, "");
62
+ }
63
+
64
+ return word.replace(" ", separator);
65
+ };
66
+ ---
67
+
68
+ {
69
+ productNumber !== null && (
70
+ <div
71
+ class={`product-number ${
72
+ big ? "text-lg" : `text-sm ${className ? className : "mt-2 sm:mt-0"}`
73
+ }`}
74
+ >
75
+ <div
76
+ class={`inline-flex leading-none relative ${small ? "w-full" : ""}`}
77
+ itemprop="identifier"
78
+ >
79
+ {isPdp ? (
80
+ <h2 id={productNumber} class="product-code">
81
+ {productNumber}
82
+ </h2>
83
+ ) : (
84
+ <div id={productNumber} class="product-code">
85
+ {productNumber}
86
+ </div>
87
+ )}
88
+
89
+ {copyDisabled && (
90
+ <ButtonCopy
91
+ productNumber={String(productNumber)}
92
+ texts={butonTexts}
93
+ tooltipClasses=""
94
+ client:only
95
+ />
96
+ )}
97
+ </div>
98
+
99
+ <div
100
+ class={`code-formatted ${small ? "tracking-wide" : "tracking-tight"}`}
101
+ >
102
+ <div class="relative inset-0" data-pagefind-ignore>
103
+ {niceName(productNumber, ".")}
104
+ </div>
105
+ <div class="absolute inset-0" data-pagefind-ignore>
106
+ {niceName(productNumber, "-")}
107
+ </div>
108
+ {isPdp ? (
109
+ <h3 class="number-secondary">{niceName(productNumber)}</h3>
110
+ ) : (
111
+ <div class="number-secondary">{niceName(productNumber)}</div>
112
+ )}
113
+ </div>
114
+ </div>
115
+ )
116
+ }
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  import { t } from "i18next";
3
3
  import ButtonCopy from "./ButtonCopy.vue";
4
+ import PartNumber from "./PartNumber.vue";
4
5
 
5
6
  const {
6
7
  copyDisabled,
7
8
  productNumber,
9
+ as,
8
10
  isPdp,
9
11
  small,
10
12
  big,
@@ -63,38 +65,20 @@ const niceName = (string: string, separator = "\u00A0") => {
63
65
 
64
66
  return word.replace(" ", separator);
65
67
  };
68
+
69
+
70
+ const classes = `product-number ${big ? "text-lg" : `text-sm ${className ? className : "mt-2 sm:mt-0"}` }`
71
+
66
72
  ---
67
73
 
74
+ <!-- <PartNumber number={productNumber} as="div"></PartNumber> -->
75
+
76
+
68
77
  {
69
78
  productNumber !== null && (
70
- <div
71
- class={`product-number ${
72
- big ? "text-lg" : `text-sm ${className ? className : "mt-2 sm:mt-0"}`
73
- }`}
74
- >
75
- <div
76
- class={`inline-flex leading-none relative ${small ? "w-full" : ""}`}
77
- itemprop="identifier"
78
- >
79
- {isPdp ? (
80
- <h2 id={productNumber} class="product-code">
81
- {productNumber}
82
- </h2>
83
- ) : (
84
- <div id={productNumber} class="product-code">
85
- {productNumber}
86
- </div>
87
- )}
88
-
89
- {copyDisabled && (
90
- <ButtonCopy
91
- productNumber={String(productNumber)}
92
- texts={butonTexts}
93
- tooltipClasses=""
94
- client:only
95
- />
96
- )}
97
- </div>
79
+
80
+
81
+ <PartNumber class={`product-code ${classes}`} number={productNumber} as={isPdp ? 'h2' : 'div'} />
98
82
 
99
83
  <div
100
84
  class={`code-formatted ${small ? "tracking-wide" : "tracking-tight"}`}
@@ -105,12 +89,19 @@ const niceName = (string: string, separator = "\u00A0") => {
105
89
  <div class="absolute inset-0" data-pagefind-ignore>
106
90
  {niceName(productNumber, "-")}
107
91
  </div>
108
- {isPdp ? (
109
- <h3 class="number-secondary">{niceName(productNumber)}</h3>
110
- ) : (
111
- <div class="number-secondary">{niceName(productNumber)}</div>
112
- )}
92
+ <PartNumber class="number-secondary" number={niceName(productNumber)} as={isPdp ? 'h3' : 'div'} />
113
93
  </div>
114
- </div>
94
+
115
95
  )
116
96
  }
97
+
98
+
99
+ <!-- {!copyDisabled && ( -->
100
+ <ButtonCopy
101
+ class="top-3.5 right-0"
102
+ productNumber={String(productNumber)}
103
+ texts={butonTexts}
104
+ tooltipClasses=""
105
+ client:only
106
+ />
107
+ <!-- )} -->
@@ -36,7 +36,7 @@ import ProductNumber from "./ProductNumber.astro"
36
36
  { productObject.name }
37
37
  </a>
38
38
 
39
- <ProductNumber productNumber={productObject.number} copyDisabled={true} />
39
+ <ProductNumber productNumber={productObject.number} copyDisabled={false} />
40
40
 
41
41
  { index !== null &&
42
42
  ( <meta itemprop="position" content={String(index)} />
package/src/config.ts CHANGED
@@ -30,6 +30,7 @@ export const SIDEBAR = [
30
30
  { text: "Carousel", link: "/components/carousel/" },
31
31
  { text: "Copyright", link: "/components/copyright/" },
32
32
  { text: "Details List", link: "/components/details-list/" },
33
+ { text: "Features List", link: "/components/features-list/"},
33
34
  { text: "HandDrive", link: "/components/hand-drive/" },
34
35
  { text: "Headline", link: "/components/headline/" },
35
36
  { text: "Icons", link: "/components/icons/" },
@@ -172,7 +172,7 @@ Rounded edges
172
172
  <Button tertiary small rounded>Tertiary</Button>
173
173
 
174
174
  <Button text medium small rounded>Text</Button>
175
- <Button tag small small rounded>Tag Name</Button>
175
+ <Button tag small rounded>Tag Name</Button>
176
176
  </div>
177
177
  </div>
178
178
 
@@ -193,7 +193,7 @@ Rounded edges
193
193
  <Button secondary small rounded>Secondary</Button>
194
194
  <Button tertiary small rounded>Tertiary</Button>
195
195
  <Button text medium small rounded>Text</Button>
196
- <Button tag small small rounded>Tag Name</Button>
196
+ <Button tag small rounded>Tag Name</Button>
197
197
  ```
198
198
 
199
199
  ## Outline button
@@ -4,27 +4,41 @@ layout: "../../layouts/MainLayout.astro"
4
4
  ---
5
5
 
6
6
  import ProductDetailsList from '../../components/ProductDetailsList.vue'
7
+ import ProductNumber from "../../components/ProductNumber.astro"
8
+ import ProductCodes from '../../components/ProductCodes.vue'
7
9
 
8
- export const tablevalue = [
10
+ export const prcodesArray = ["PJ4", "CA2", "C4E", "2JZ"]
11
+
12
+ export const tableItems = [
13
+ {
14
+ slug: "number",
15
+ name: "Part number",
16
+ value: "6R0071609GRU",
17
+ },
9
18
  {
10
- name: "Product ID",
11
- value: "9452694356",
19
+ slug: "prcodes",
20
+ name: "PR-Codes",
21
+ value: ["PJ4", "CA2", "C4E", "2JZ"],
12
22
  },
13
23
  {
24
+ slug: "color",
14
25
  name: "Color",
15
26
  value: "Black",
16
27
  },
17
28
  {
29
+ slug: "position",
18
30
  name: "Fitting position",
19
31
  value: "Front axle",
20
32
  },
21
33
  {
34
+ slug: "brake-disck-thicnkess",
22
35
  name: "Brake disc thicknes",
23
36
  value: "22 mm",
24
37
  },
25
38
  {
26
- name: "Weight",
27
- value: "5.185 kg"
39
+ slug: "weight",
40
+ name: "Weight",
41
+ value: "5.185 kg"
28
42
  }
29
43
  ];
30
44
 
@@ -32,35 +46,63 @@ export const tablevalue = [
32
46
 
33
47
  <div class="component-preview flex-wrap">
34
48
  <div class="bg-white rounded-lg p-8">
35
- <ProductDetailsList value={tablevalue}></ProductDetailsList>
49
+ <ProductDetailsList items={tableItems}>
50
+ <ProductNumber slot="number" class="py-0" big isPdp productNumber="6R0071609GRU" copyDisabled={false} />
51
+ <ProductCodes slot="prcodes" prcodes={prcodesArray} />
52
+ </ProductDetailsList>
36
53
  </div>
37
54
  </div>
38
55
 
39
56
  ```ts
40
- const tablevalue = [
57
+ const tableItems = [
58
+ {
59
+ slug: "number",
60
+ name: "Part number",
61
+ value: "6R0071609GRU",
62
+ },
41
63
  {
42
- name: "Product ID",
43
- value: "9452694356",
64
+ slug: "prcodes",
65
+ name: "PR-Codes",
66
+ value: ["PJ4", "CA2", "C4E"]
44
67
  },
45
68
  {
69
+ slug: "color",
46
70
  name: "Color",
47
71
  value: "Black",
48
72
  },
49
73
  {
74
+ slug: "position",
50
75
  name: "Fitting position",
51
76
  value: "Front axle",
52
77
  },
53
78
  {
79
+ slug: "brake-disck-thicnkess",
54
80
  name: "Brake disc thicknes",
55
81
  value: "22 mm",
56
82
  },
57
83
  {
84
+ slug: "weight",
58
85
  name: "Weight",
59
86
  value: "5.185 kg"
60
87
  }
61
88
  ];
62
89
 
63
90
  ```
64
- ```html
65
- <ProductDetailsList value={tablevalue}></ProductDetailsList>
91
+ ### Astro:
92
+ ```js
93
+ <ProductDetailsList items={tableItems}>
94
+ <ProductNumber slot="number" class="py-0" big isPdp productNumber="6R0071609GRU" copyDisabled={false} />
95
+ <ProductCodes slot="prcodes" prcodes={prcodesArray} />
96
+ </ProductDetailsList>
97
+ ```
98
+ ### Vue:
99
+ ```js
100
+ <ProductDetailsList items={tableItems}>
101
+ <template #number >
102
+ <ProductNumber class="py-0" big isPdp productNumber="6R0071609GRU" copyDisabled={false} />
103
+ </template>
104
+ <template #prcodes >
105
+ <ProductCodes prcodes={prcodesArray} />
106
+ </template>
107
+ </ProductDetailsList>
66
108
  ```
@@ -0,0 +1,38 @@
1
+ ---
2
+ title: "DetailsList"
3
+ layout: "../../layouts/MainLayout.astro"
4
+ ---
5
+
6
+ import FeaturesList from '../../components/FeaturesList.vue'
7
+
8
+ export const items = [
9
+ "do ad dolor exercitation dolor eu eiusmod commodo dolor aliqua deserunt aliquip reprehenderit minim. Lorem fugiat deserunt reprehenderit non velit dolore voluptate nostrud aliquip consectetur minim. Labore dolore anim excepteur sit nostrud deserunt eu occaecat.",
10
+ "cillum dolore cupidatat ad mollit excepteur quis. Non nisi consequat deserunt dolore laboris est culpa. Elit eu aute magna sunt cupidatat officia do adipisicing quis velit. Consectetur deserunt et pariatur ea laborum occaecat veniam proident elit anim dolor eu nostrud voluptate. Do laboris nisi pariatur ipsum est ad anim ex quis officia est ut.",
11
+ "dolore cupidatat ad mollit excepteur quis"
12
+ ];
13
+
14
+ # Product Details Table
15
+
16
+ <div class="component-preview flex-wrap">
17
+ <div class="bg-white rounded-lg p-8">
18
+ <p class="mb-4">Dolor amet excepteur id quis ut. Nisi incididunt occaecat est officia ea do voluptate deserunt aliqua cillum duis eiusmod. Officia veniam nisi mollit exercitation consequat ex fugiat ea veniam in culpa aliquip deserunt ea. Magna elit aliqua reprehenderit anim. Ullamco do nostrud nulla consectetur dolor fugiat adipisicing adipisicing. Reprehenderit est do culpa eu non quis. Veniam anim amet excepteur in sit et eiusmod. Id amet adipisicing amet ut eiusmod et. Tempor Lorem amet aute anim magna. Do ea aute consectetur fugiat nulla laboris pariatur ad enim anim. Dolor culpa veniam aliquip amet aute sunt excepteur consectetur sit excepteur excepteur Lorem. Ipsum esse ad aute nulla eu do incididunt eiusmod nulla sunt labore id cupidatat incididunt.</p>
19
+ <FeaturesList items={items} caption="Main features"/>
20
+ </div>
21
+ </div>
22
+
23
+ ```ts
24
+ const items = [
25
+ "do ad dolor exercitation dolor eu eiusmod commodo dolor aliqua deserunt aliquip reprehenderit minim. Lorem fugiat deserunt reprehenderit non velit dolore voluptate nostrud aliquip consectetur minim. Labore dolore anim excepteur sit nostrud deserunt eu occaecat.",
26
+ "cillum dolore cupidatat ad mollit excepteur quis. Non nisi consequat deserunt dolore laboris est culpa. Elit eu aute magna sunt cupidatat officia do adipisicing quis velit. Consectetur deserunt et pariatur ea laborum occaecat veniam proident elit anim dolor eu nostrud voluptate. Do laboris nisi pariatur ipsum est ad anim ex quis officia est ut.",
27
+ "dolore cupidatat ad mollit excepteur quis"
28
+ ];
29
+
30
+ ```
31
+ ### Astro:
32
+ ```html
33
+ <FeaturesList items={items} caption="Main features" />
34
+ ```
35
+ ### Vue:
36
+ ```html
37
+ <FeaturesList :items="items" caption="Main features" />
38
+ ```
@@ -3,7 +3,7 @@ title: "PrCode"
3
3
  layout: "../../layouts/MainLayout.astro"
4
4
  ---
5
5
  import PrCode from '../../components/PrCode.vue'
6
-
6
+ import ProductCodes from '../../components/ProductCodes.vue'
7
7
 
8
8
  # PR-Code
9
9
 
@@ -17,6 +17,15 @@ They are important when purchasing spare parts as they provide information about
17
17
 
18
18
 
19
19
  ## PR-Code
20
+ Single PR-Code.
21
+
22
+ ### import:
23
+
24
+ ```js
25
+ import PrCode from 'spoko-design-system/src/components/PrCode.vue'
26
+ ```
27
+
28
+ #
20
29
 
21
30
  <div class="component-preview">
22
31
  <div class="bg-white p-6 w-full">
@@ -30,8 +39,27 @@ They are important when purchasing spare parts as they provide information about
30
39
  <PrCode prcode="1ZJ" />
31
40
  ```
32
41
 
42
+
43
+
44
+
45
+ ## PR-Codes List
46
+ Component to display list of pr codes from array.
47
+
33
48
  ### import:
34
49
 
35
50
  ```js
36
- import PrCode from 'spoko-design-system/src/components/PrCode.vue'
51
+ import ProductCodes from 'spoko-design-system/src/components/ProductCodes.vue'
37
52
  ```
53
+
54
+ #
55
+
56
+ <div class="component-preview">
57
+ <div class="bg-white p-6 w-full">
58
+ <ProductCodes prcodes={["2JP", "1ZJ"]} />
59
+ </div>
60
+ </div>
61
+
62
+ ```js
63
+ <ProductCodes prcodes={["2JP", "1ZJ"]} />
64
+ ```
65
+
@@ -20,7 +20,7 @@ Common patterns for building interfaces.
20
20
 
21
21
  ### Code
22
22
 
23
- ```ts
23
+ ```html
24
24
  <Container class="bg-white">content</Container>
25
25
  ```
26
26
 
@@ -33,7 +33,7 @@ Common patterns for building interfaces.
33
33
 
34
34
  ### Code
35
35
 
36
- ```ts
36
+ ```html
37
37
  <Container class="bg-white" isFullWidth>content</Container>
38
38
  ```
39
39
 
@@ -50,7 +50,7 @@ Common patterns for building interfaces.
50
50
 
51
51
  ### Code
52
52
 
53
- ```ts
53
+ ```html
54
54
  <Header>
55
55
  <div slot="logo" class="flex-shrink-0 flex items-center h-8">
56
56
  <div class="bg-gray">LOGO</div>
@@ -23,7 +23,7 @@
23
23
  font-size: 13pt;
24
24
  }
25
25
 
26
- ul {
26
+ &>ul {
27
27
  @apply list-disc pl-5
28
28
  }
29
29
  }
package/uno.config.ts CHANGED
@@ -53,7 +53,7 @@ export default defineConfig({
53
53
  ['btn-normal', 'md:px-10 md:py-2 md:text-lg px-8 py-3 whitespace-nowrap'],
54
54
  ['btn-sm', 'px-6 py-2 text-sm whitespace-nowrap '],
55
55
  ['btn-xs', 'px-4 py-1 text-sm whitespace-nowrap '],
56
- ['product-number','font-mono content-center flex flex-wrap flex-col content-start pr-5 bg-white'],
56
+ ['product-number','font-novamono leading-none content-center flex flex-wrap flex-col content-start pr-5 bg-white'],
57
57
  ['main','text-gray-700 dark:text-gray-200 dark:bg-blue-700 pt-24 sm:pt-14 relative'],
58
58
  ['nav','bg-white dark:bg-black absolute sm:fixed w-full top-0 z-40 sm:z-30 max-w-screen'],
59
59
  ['cat-menu','fixed bottom-[-4px] w-full z-10 border-t-1 border-gray-300 bg-white dark:bg-blue-900 text-center sm:(static z-auto border-t-none) sm:min-h-32'],
@@ -91,8 +91,8 @@ export default defineConfig({
91
91
  ['cat-link','whitespace-nowrap cursor-pointer text-blue-901 dark:text-white hover:text-lightBlue-400 font-light uppercase py-2 md:py-0'],
92
92
  ['plp-name','flex items-center leading-none font-headregular cursor-pointer sm:pr-6 md:pr-12'],
93
93
  ['plp-replacements','col-span-3 md:col-span-1 md:col-start-2 text-xs mt-3 md:mt-4'],
94
- ['product-code','text-blue-500 dark:text-lightBlue-500 mr-1 leading-none tracking-wide select-all'],
95
- ['code-formatted','leading-none mt-0 relative text-xs'],
94
+ ['product-code','text-blue-500 dark:text-lightBlue-500 mr-1 leading-none tracking-wide select-all '],
95
+ ['code-formatted','font-novamono leading-none mt-0 relative text-xs'],
96
96
  ['btn-copy', 'leading-none opacity-10 hover:opacity-80 ml-auto w-6 h-6 -right-7 sm:(h-4 w-4 -right-5) absolute'],
97
97
  ['btn-copy-text','shadow-sm py-0.5 px-1 bg-gray-100 -ml-1 -mt-4 text-xxs whitespace-nowrap'],
98
98
  ['plp-icons','absolute top-0 -right-2 md:(top-0.5 right-0) w-12 bottom-auto flex justify-end text-sm'],