spoko-design-system 1.1.14 → 1.1.16

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,15 @@
1
+ ## [1.1.16](https://github.com/polo-blue/sds/compare/v1.1.15...v1.1.16) (2025-09-23)
2
+
3
+ ### Bug Fixes
4
+
5
+ * apply prettier formatting to resolve CI formatting issues ([a95d274](https://github.com/polo-blue/sds/commit/a95d2740358fa6941055f8957a40936a3175fa3e))
6
+
7
+ ## [1.1.15](https://github.com/polo-blue/sds/compare/v1.1.14...v1.1.15) (2025-09-23)
8
+
9
+ ### Bug Fixes
10
+
11
+ * resolve majority of ESLint warnings ([54c4b7f](https://github.com/polo-blue/sds/commit/54c4b7f611301523ef61359cd62e818026033549))
12
+
1
13
  ## [1.1.14](https://github.com/polo-blue/sds/compare/v1.1.13...v1.1.14) (2025-09-23)
2
14
 
3
15
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spoko-design-system",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "private": false,
5
5
  "main": "./index.ts",
6
6
  "module": "./index.ts",
@@ -57,8 +57,7 @@ const isLast = (index: number) => {
57
57
  :title="props.textBack"
58
58
  itemprop="item"
59
59
  i-carbon-home
60
- >
61
- </a>
60
+ />
62
61
  <meta itemprop="position" content="1" />
63
62
  </li>
64
63
  <li
@@ -88,7 +87,7 @@ const isLast = (index: number) => {
88
87
  itemprop="item"
89
88
  >
90
89
  <span class="font-normal" itemprop="name">
91
- <span v-html="crumb.name"></span>
90
+ <span v-html="crumb.name" />
92
91
  <b v-if="productNumber" class="hidden sm:inline font-normal ml-1"
93
92
  >&nbsp;{{ productNumber }}</b
94
93
  >
@@ -66,7 +66,7 @@ const attrs = useAttrs();
66
66
  :href="props.href"
67
67
  :title="props.title ? props.title : null"
68
68
  >
69
- <slot></slot>
69
+ <slot />
70
70
  </component>
71
71
  </template>
72
72
 
@@ -16,11 +16,11 @@ const props = defineProps({
16
16
  </script>
17
17
 
18
18
  <template>
19
- <h2 class="features-list-caption" v-if="props.caption">
19
+ <h2 v-if="props.caption" class="features-list-caption">
20
20
  {{ props.caption }}
21
21
  </h2>
22
22
  <ul class="features-list-ul">
23
- <li v-for="item in props.items" class="features-list-item" :key="item">
23
+ <li v-for="item in props.items" :key="item" class="features-list-item">
24
24
  {{ item }}
25
25
  </li>
26
26
  </ul>
@@ -106,25 +106,25 @@ const handleBlur = (event: globalThis.FocusEvent) => emit('blur', event);
106
106
  :class="inputClass + ' peer'"
107
107
  :placeholder="placeholder"
108
108
  :value="modelValue"
109
+ v-bind="attrs"
109
110
  @input="handleInput"
110
111
  @focus="handleFocus"
111
112
  @blur="handleBlur"
112
- v-bind="attrs"
113
- ></textarea>
113
+ />
114
114
 
115
115
  <input
116
116
  v-else
117
- :type="type"
118
117
  :id="id"
118
+ :type="type"
119
119
  :name="name || id"
120
120
  :required="required"
121
121
  :class="inputClass + ' peer'"
122
122
  :placeholder="placeholder"
123
123
  :value="modelValue"
124
+ v-bind="attrs"
124
125
  @input="handleInput"
125
126
  @focus="handleFocus"
126
127
  @blur="handleBlur"
127
- v-bind="attrs"
128
128
  />
129
129
 
130
130
  <label :for="id" :class="labelClass" style="transform-origin: top left">
@@ -8,10 +8,12 @@ const colorCategories = Object.entries(colors);
8
8
  <template>
9
9
  <div class="flex flex-col space-y-12">
10
10
  <div v-for="[category, shades] in colorCategories" :key="category">
11
- <h3 class="capitalize">{{ category }}</h3>
11
+ <h3 class="capitalize">
12
+ {{ category }}
13
+ </h3>
12
14
  <div class="grid grid-cols-3 md:grid-cols-9">
13
15
  <div v-for="(value, name) in shades" :key="name" class="mb-6">
14
- <div class="h-12 transition-all" :style="`background: ${value}`"></div>
16
+ <div class="h-12 transition-all" :style="`background: ${value}`" />
15
17
  <div class="text-sm flex flex-col text-center font-mono text-slate-500">
16
18
  <span>{{ name }}</span>
17
19
  <span class="uppercase text-xs">{{ value }}</span>
@@ -49,7 +49,7 @@ const props = defineProps({
49
49
  v-else-if="detail.value !== undefined && detail.id === 'color' && detail.isArrayValue"
50
50
  class="items--2 inline-block"
51
51
  >
52
- <span class="comma" v-for="(color, indexColor) in detail.value" :key="indexColor">
52
+ <span v-for="(color, indexColor) in detail.value" :key="indexColor" class="comma">
53
53
  {{ color['name'] }}
54
54
  </span>
55
55
  </div>
@@ -100,8 +100,8 @@ const props = defineProps({
100
100
 
101
101
  <span v-else-if="detail.id && detail.id === 'paint-marks'" class="items">
102
102
  <span
103
- v-for="(mark, index) in JSON.parse(String(detail.value))"
104
- :key="index"
103
+ v-for="(mark, markIndex) in JSON.parse(String(detail.value))"
104
+ :key="markIndex"
105
105
  class="item"
106
106
  >
107
107
  {{ mark[0] }} x <span>{{ getTranslation(`color.${mark[1]}`) }}</span>
@@ -22,7 +22,7 @@
22
22
  v-html="nameFormatted"
23
23
  />
24
24
 
25
- <ProductNumber :productNumber="productNumber" :copyDisabled="true" />
25
+ <ProductNumber :product-number="productNumber" :copy-disabled="true" />
26
26
 
27
27
  <template v-if="index !== null">
28
28
  <meta itemprop="position" :content="index.toString()" />
@@ -47,6 +47,7 @@ interface Props {
47
47
  }
48
48
 
49
49
  const props = withDefaults(defineProps<Props>(), {
50
+ price: undefined,
50
51
  bigTile: false,
51
52
  index: null,
52
53
  });
@@ -25,7 +25,7 @@ const settings = {
25
25
 
26
26
  <template>
27
27
  <span v-for="(prcode, index) in settings.prcodes" :key="index" class="not-last:mr-1">
28
- <PrCode :prcode="prcode" v-if="!String(prcode).includes('+')" />
28
+ <PrCode v-if="!String(prcode).includes('+')" :prcode="prcode" />
29
29
  <span v-else>
30
30
  <PrCode
31
31
  v-for="(splittedCode, index2) in String(prcode).split('+')"
@@ -139,7 +139,9 @@ const groupedItems = computed(() => {
139
139
  <template>
140
140
  <table class="details-table">
141
141
  <caption v-if="!!$slots.caption || caption">
142
- <slot name="caption">{{ caption }}</slot>
142
+ <slot name="caption">
143
+ {{ caption }}
144
+ </slot>
143
145
  </caption>
144
146
  <colgroup>
145
147
  <col class="details-table-col" />
@@ -226,10 +228,12 @@ const groupedItems = computed(() => {
226
228
  v-else-if="'id' in row && isHtmlValue(row.value)"
227
229
  class="details-table-cell"
228
230
  v-html="row.value"
229
- ></td>
231
+ />
230
232
 
231
233
  <slot v-else-if="'id' in row" :name="row.id">
232
- <td class="details-table-cell">{{ row.value }}</td>
234
+ <td class="details-table-cell">
235
+ {{ row.value }}
236
+ </td>
233
237
  </slot>
234
238
  </tr>
235
239
  </tbody>
@@ -34,12 +34,12 @@ const toggleVisibility = () => {
34
34
  </span>
35
35
 
36
36
  <button
37
- class="btn-close text-white"
38
37
  v-if="props.showCloseButton"
39
- @click="toggleVisibility()"
38
+ class="btn-close text-white"
40
39
  aria-label="Toggle"
40
+ @click="toggleVisibility()"
41
41
  >
42
- <span class="close close-dark"></span>
42
+ <span class="close close-dark" />
43
43
  </button>
44
44
  </div>
45
45
  <div
@@ -56,12 +56,12 @@ const toggleVisibility = () => {
56
56
  <span data-text="STATE" />
57
57
  </div>
58
58
  <button
59
- class="btn-close"
60
59
  v-if="props.showCloseButton"
61
- @click="toggleVisibility()"
60
+ class="btn-close"
62
61
  aria-label="Toggle"
62
+ @click="toggleVisibility()"
63
63
  >
64
- <span class="close close-light"></span>
64
+ <span class="close close-light" />
65
65
  </button>
66
66
  </div>
67
67
  </template>
@@ -14,14 +14,14 @@ const capitalizeFirstLetter = (text: String) => {
14
14
  <table class="table-auto text-left border bg-white shadow-md">
15
15
  <thead class="bg-gray-500 text-white">
16
16
  <tr class="border">
17
- <th class="px-4 py-2 font-semibold" v-for="(thead, index) in theads" :key="index">
17
+ <th v-for="(thead, index) in theads" :key="index" class="px-4 py-2 font-semibold">
18
18
  {{ capitalizeFirstLetter(thead) }}
19
19
  </th>
20
20
  </tr>
21
21
  </thead>
22
22
  <tbody>
23
- <tr class="border" v-for="row in props.data" :key="row">
24
- <td class="px-4 py-2" v-for="key in Object.keys(row)" :key="key">
23
+ <tr v-for="row in props.data" :key="row" class="border">
24
+ <td v-for="key in Object.keys(row)" :key="key" class="px-4 py-2">
25
25
  {{ row[key] }}
26
26
  </td>
27
27
  </tr>
@@ -4,6 +4,7 @@ import { PropType } from 'vue';
4
4
  const props = defineProps({
5
5
  lang: {
6
6
  type: String,
7
+ default: 'en',
7
8
  },
8
9
  translations: {
9
10
  type: Object as PropType<{
@@ -11,12 +12,13 @@ const props = defineProps({
11
12
  title: string | null;
12
13
  name: string | null;
13
14
  } | null>,
15
+ default: null,
14
16
  },
15
17
  });
16
18
  </script>
17
19
 
18
20
  <template>
19
- <div data-pagefind-ignore v-if="props.translations !== null && props.translations.uri">
21
+ <div v-if="props.translations !== null && props.translations.uri" data-pagefind-ignore>
20
22
  <a
21
23
  aria-label="Change language"
22
24
  type="button"
package/src/pwa.ts CHANGED
@@ -3,11 +3,9 @@ import { registerSW } from 'virtual:pwa-register';
3
3
  registerSW({
4
4
  immediate: true,
5
5
  onRegisteredSW(swScriptUrl) {
6
- // eslint-disable-next-line no-undef
7
6
  console.log('SW registered: ', swScriptUrl);
8
7
  },
9
8
  onOfflineReady() {
10
- // eslint-disable-next-line no-undef
11
9
  console.log('PWA application ready to work offline');
12
10
  },
13
11
  });