@revenexx/cover 0.2.30 → 0.2.31

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.
@@ -16,7 +16,6 @@ const { to } = useAppUrl();
16
16
  const toast = useToast();
17
17
  const cart = useCartStore();
18
18
  const { role, costCenterById } = useB2BContext();
19
- const { getImage } = useProductImage();
20
19
  const { formatCurrency } = useCartSummaryFormatting();
21
20
 
22
21
  const { data: requisition, status, error } = useFetch<Requisition>(
@@ -184,12 +183,10 @@ async function loadIntoCart(): Promise<void> {
184
183
  class="w-14 h-14 shrink-0 flex items-center justify-center rounded-lg
185
184
  bg-elevated/60 ring-1 ring-(--ui-border) p-1.5"
186
185
  >
187
- <img
188
- v-if="item.image"
189
- :src="getImage(item.image)"
186
+ <ProductMediaImage
187
+ :src="item.image ?? ''"
190
188
  :alt="item.name"
191
- class="max-h-full max-w-full object-contain"
192
- >
189
+ />
193
190
  </span>
194
191
  <div class="min-w-0 flex-1">
195
192
  <p class="text-sm font-medium text-highlighted truncate">
@@ -16,7 +16,6 @@ const toast = useToast();
16
16
  const cart = useCartStore();
17
17
  const authStore = useAuthStore();
18
18
  const localePath = useLocalePath();
19
- const { getImage } = useProductImage();
20
19
  const { formatCurrency } = useCartSummaryFormatting();
21
20
 
22
21
  const { data: list, status, error, refresh } = useFetch<OrderList>(
@@ -233,12 +232,10 @@ async function addToCart(): Promise<void> {
233
232
  class="w-14 h-14 shrink-0 flex items-center justify-center rounded-lg
234
233
  bg-elevated/60 ring-1 ring-(--ui-border) p-1.5"
235
234
  >
236
- <img
237
- v-if="position.image"
238
- :src="getImage(position.image)"
235
+ <ProductMediaImage
236
+ :src="position.image ?? ''"
239
237
  :alt="position.name"
240
- class="max-h-full max-w-full object-contain"
241
- >
238
+ />
242
239
  </span>
243
240
  <div class="min-w-0 flex-1">
244
241
  <p class="text-sm font-medium text-highlighted truncate">
@@ -17,7 +17,6 @@ const { t, d } = useI18n();
17
17
  const { to } = useAppUrl();
18
18
  const toast = useToast();
19
19
  const cart = useCartStore();
20
- const { getImage } = useProductImage();
21
20
  const { formatCurrency } = useCartSummaryFormatting();
22
21
 
23
22
  const { data: order, status, error, refresh } = useFetch<AccountOrder>(
@@ -353,12 +352,10 @@ async function submitReturn(): Promise<void> {
353
352
  class="w-14 h-14 shrink-0 flex items-center justify-center rounded-lg
354
353
  bg-elevated/60 ring-1 ring-(--ui-border) p-1.5"
355
354
  >
356
- <img
357
- v-if="position.image"
358
- :src="getImage(position.image)"
355
+ <ProductMediaImage
356
+ :src="position.image ?? ''"
359
357
  :alt="position.name"
360
- class="max-h-full max-w-full object-contain"
361
- >
358
+ />
362
359
  </span>
363
360
  <div class="min-w-0 flex-1">
364
361
  <p class="text-sm font-medium text-highlighted truncate">
@@ -10,7 +10,7 @@ const { public: { taxIncludedPrices } } = useRuntimeConfig();
10
10
  <template>
11
11
  <USlideover
12
12
  v-model:open="isOpen"
13
- title="Cart"
13
+ :title="t('cart.page.title')"
14
14
  side="right"
15
15
  >
16
16
  <template #body>
@@ -12,7 +12,6 @@ const props = defineProps<{
12
12
  showTaxIncludedPrice?: boolean;
13
13
  }>();
14
14
 
15
- const { getImage } = useProductImage();
16
15
  const cart = useCartStore();
17
16
  const { t } = useI18n();
18
17
  const { public: { locale } } = useRuntimeConfig();
@@ -186,21 +185,19 @@ onMounted(() => {
186
185
  class="contents"
187
186
  :aria-label="item.name"
188
187
  >
189
- <img
190
- :src="getImage(item.image)"
188
+ <ProductMediaImage
189
+ :src="item.image"
191
190
  :alt="item.name"
192
- class="max-h-full max-w-full object-contain"
193
- >
191
+ />
194
192
  </NuxtLink>
195
193
  <div
196
194
  v-else
197
195
  class="contents"
198
196
  >
199
- <img
200
- :src="getImage(item.image)"
197
+ <ProductMediaImage
198
+ :src="item.image"
201
199
  :alt="item.name"
202
- class="max-h-full max-w-full object-contain"
203
- >
200
+ />
204
201
  </div>
205
202
  </div>
206
203
  <div class="flex flex-col gap-0.5 flex-1">
@@ -24,7 +24,6 @@ const props = defineProps<{
24
24
 
25
25
  const { icon } = useIcons();
26
26
  const { t } = useI18n();
27
- const { getImage } = useProductImage();
28
27
  const localePath = useLocalePath();
29
28
  const cart = useCartStore();
30
29
  const selection = useCartSelection();
@@ -146,11 +145,10 @@ const hintColor = (type: string) =>
146
145
  :aria-label="item.name"
147
146
  :tabindex="detailUrl ? 0 : -1"
148
147
  >
149
- <img
150
- :src="getImage(item.image)"
148
+ <ProductMediaImage
149
+ :src="item.image"
151
150
  :alt="item.name"
152
- class="max-h-full max-w-full object-contain"
153
- >
151
+ />
154
152
  </NuxtLink>
155
153
 
156
154
  <!-- Identity -->
@@ -13,7 +13,6 @@ const emit = defineEmits<{
13
13
 
14
14
  const { icon } = useIcons();
15
15
  const { t } = useI18n();
16
- const { getImage } = useProductImage();
17
16
  const { formatCurrency } = useCartSummaryFormatting();
18
17
  </script>
19
18
 
@@ -25,13 +24,10 @@ const { formatCurrency } = useCartSummaryFormatting();
25
24
  <span
26
25
  class="h-24 flex items-center justify-center rounded-lg bg-elevated/60 p-2 mb-2"
27
26
  >
28
- <img
29
- v-if="image"
30
- :src="getImage(image)"
27
+ <ProductMediaImage
28
+ :src="image ?? ''"
31
29
  :alt="name"
32
- class="max-h-full max-w-full object-contain"
33
- loading="lazy"
34
- >
30
+ />
35
31
  </span>
36
32
  <p class="text-xs font-medium text-highlighted line-clamp-2 min-h-8">
37
33
  {{ name }}
@@ -10,7 +10,6 @@ defineProps<{
10
10
  }>();
11
11
 
12
12
  const { t } = useI18n();
13
- const { getImage } = useProductImage();
14
13
  const { formatCurrency } = useCartSummaryFormatting();
15
14
  </script>
16
15
 
@@ -30,12 +29,10 @@ const { formatCurrency } = useCartSummaryFormatting();
30
29
  class="size-16 shrink-0 flex items-center justify-center rounded-lg
31
30
  bg-elevated/60 ring-1 ring-(--ui-border) p-1.5"
32
31
  >
33
- <img
34
- v-if="line.image"
35
- :src="getImage(line.image)"
32
+ <ProductMediaImage
33
+ :src="line.image ?? ''"
36
34
  :alt="line.name"
37
- class="max-h-full max-w-full object-contain"
38
- >
35
+ />
39
36
  </span>
40
37
  <div class="min-w-0 flex-1">
41
38
  <p class="text-sm font-medium text-highlighted truncate">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revenexx/cover",
3
- "version": "0.2.30",
3
+ "version": "0.2.31",
4
4
  "description": "Cover \u2014 revenexx design system for Nuxt. Distributed as a Nuxt layer: generic UI components, theming tokens and stores shared by the demo shop, custom storefronts and the Blokkli theme.",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",