@viur/shop-components 0.5.0 → 0.6.0

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": "@viur/shop-components",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Frontend Vue components for the shop module of ViUR",
5
5
  "repository": {
6
6
  "type": "git",
@@ -6,16 +6,16 @@
6
6
  type="currency"
7
7
  currency="EUR"
8
8
  :value="item.price.current * amount"
9
- :class="{pricetag_current:!retail}"
9
+ :class="{'viur-shop-cart-leaf-value--current':!retail}"
10
10
  >
11
11
  </sl-format-number>
12
- <div style="position: relative;" v-if="retail">
12
+ <div style="position: relative;" v-if="retail && (item.price.recommended > item.price.current)">
13
13
  <sl-format-number
14
- class="viur-shop-cart-leaf-value viur-shop-cart-leaf-value--unitprice pricetag_old"
14
+ class="viur-shop-cart-leaf-value viur-shop-cart-leaf-value--unitprice viur-shop-cart-leaf-value--recommended"
15
15
  lang="de"
16
16
  type="currency"
17
17
  currency="EUR"
18
- :value="item.price.retail * amount"
18
+ :value="item.price.recommended * amount"
19
19
  >
20
20
  </sl-format-number>
21
21
  </div>
@@ -42,24 +42,20 @@ const props = defineProps({
42
42
  </script>
43
43
 
44
44
  <style scoped>
45
- :is(.pricetag_old):before {
46
- content: " ";
47
- border-bottom: 2px solid var(--sl-color-primary-500);
48
- width: 100%;
49
- display: block;
50
- position: absolute;
51
- top:calc(0.7rem);
52
- }
53
45
 
54
- .pricetag_old{
46
+ .viur-shop-cart-leaf-value--recommended {
55
47
  font-size: 0.8rem;
56
-
48
+ &:before {
49
+ content: " ";
50
+ border-bottom: 2px solid var(--sl-color-primary-500);
51
+ width: 100%;
52
+ display: block;
53
+ position: absolute;
54
+ top:calc(0.7rem);
55
+ }
57
56
  }
58
- .pricetag_current{
57
+
58
+ .viur-shop-cart-leaf-value--current {
59
59
  margin-left:auto;
60
60
  }
61
-
62
-
63
61
  </style>
64
- <script setup lang="ts">
65
- </script>