@viur/shop-components 0.0.1-dev.6 → 0.0.1-dev.61

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.
Files changed (131) hide show
  1. package/.editorconfig +16 -0
  2. package/.github/workflows/npm-publish.yml +42 -0
  3. package/.gitmodules +3 -0
  4. package/LICENSE +21 -0
  5. package/README.md +13 -2
  6. package/old/client/HttpClient.js +111 -0
  7. package/old/client/ViURShopClient.js +472 -0
  8. package/old/client/index.js +23 -0
  9. package/old/client/types.js +10 -0
  10. package/old/components/ExampleUsage.vue +95 -0
  11. package/old/components/ShopCart.vue +91 -0
  12. package/old/components/ShopOrderComplete.vue +73 -0
  13. package/old/components/ShopOrderConfirm.vue +311 -0
  14. package/old/components/ShopOrderStepper.vue +352 -0
  15. package/old/components/ShopPaymentProvider.vue +113 -0
  16. package/old/components/ShopShippingMethod.vue +52 -0
  17. package/old/components/ShopSummary.vue +138 -0
  18. package/old/components/ShopUserData.vue +218 -0
  19. package/old/components/cart/CartLeaf.vue +277 -0
  20. package/old/components/cart/CartLeafModel.vue +312 -0
  21. package/old/components/cart/CartNode.vue +26 -0
  22. package/old/components/cart/CartTree.vue +67 -0
  23. package/old/components/cart/CartTreeWrapper.vue +73 -0
  24. package/old/components/cart/CartView.vue +82 -0
  25. package/old/components/cart/Discount.vue +91 -0
  26. package/old/components/generic/loadinghandler.vue +76 -0
  27. package/old/components/paymentProvider/paypalplus.vue +0 -0
  28. package/old/components/paymentProvider/prepayment.vue +0 -0
  29. package/old/components/paymentProvider/unzerPayment.vue +140 -0
  30. package/old/components/simple/ShopUserData.vue +161 -0
  31. package/old/components/simple/SimpleDefaultLayout.vue +116 -0
  32. package/old/components/ui/generic/CardSelector.vue +52 -0
  33. package/old/components/ui/generic/CartList.vue +69 -0
  34. package/old/components/ui/generic/ShippingInfo.vue +56 -0
  35. package/old/components/ui/generic/ShopPriceFormatter.vue +41 -0
  36. package/old/components/ui/generic/alerts/ShopAlert.vue +30 -0
  37. package/old/components/ui/payment/PaymentOption.vue +79 -0
  38. package/old/components/ui/payment/PaymentSelector.vue +158 -0
  39. package/old/components/ui/stepper/StepperItem.vue +90 -0
  40. package/old/components/ui/stepper/StepperTab.vue +161 -0
  41. package/old/components/ui/stepper/StepperTrigger.vue +69 -0
  42. package/old/components/ui/userdata/AddForm.vue +160 -0
  43. package/old/components/ui/userdata/AddressBox.vue +137 -0
  44. package/old/components/ui/userdata/BaseLayout.vue +77 -0
  45. package/old/components/ui/userdata/CustomBooleanBone.vue +58 -0
  46. package/old/components/ui/userdata/CustomSelectBone.vue +91 -0
  47. package/old/components/ui/userdata/CustomStringBone.vue +71 -0
  48. package/old/components/ui/userdata/DefaultLayout.vue +126 -0
  49. package/old/components/ui/userdata/SelectAddress.vue +21 -0
  50. package/old/components/ui/userdata/multi/ActionBar.vue +38 -0
  51. package/old/components/ui/userdata/multi/CartSelection.vue +42 -0
  52. package/old/ignite/.editorconfig +20 -0
  53. package/old/ignite/.github/workflows/ignite.yml +64 -0
  54. package/old/ignite/.github/workflows/node.yml +30 -0
  55. package/old/ignite/.postcssrc.cjs +25 -0
  56. package/old/ignite/CHANGELOG.md +244 -0
  57. package/old/ignite/LICENSE +21 -0
  58. package/old/ignite/README.md +92 -0
  59. package/old/ignite/dist/ignite.css +2019 -0
  60. package/old/ignite/dist/ignite.min.css +4 -0
  61. package/old/ignite/foundation/basic.css +371 -0
  62. package/old/ignite/foundation/color.css +323 -0
  63. package/old/ignite/foundation/config.css +188 -0
  64. package/old/ignite/foundation/grid.css +78 -0
  65. package/old/ignite/foundation/mediaqueries.css +71 -0
  66. package/old/ignite/foundation/reset.css +261 -0
  67. package/old/ignite/ignite.css +29 -0
  68. package/old/ignite/ignite.css.map +1 -0
  69. package/old/ignite/package-lock.json +5530 -0
  70. package/old/ignite/package.json +58 -0
  71. package/old/ignite/shoelace.css +19 -0
  72. package/old/ignite/themes/dark.css +12 -0
  73. package/old/ignite/themes/light.css +11 -0
  74. package/old/ignite/utilities/shoelace.css +537 -0
  75. package/old/ignite/utilities/utilities.css +24 -0
  76. package/old/stores/address.js +122 -0
  77. package/old/stores/cart.js +266 -0
  78. package/old/stores/message.js +21 -0
  79. package/old/stores/order.js +202 -0
  80. package/old/stores/payment.js +79 -0
  81. package/old/stores/shipping.js +78 -0
  82. package/package.json +23 -23
  83. package/src/Shop.vue +212 -0
  84. package/src/ShopOrderStepper.vue +89 -0
  85. package/src/ShopSummary.vue +170 -0
  86. package/src/Steps/ShopCart.vue +60 -0
  87. package/src/Steps/ShopOrderComplete.vue +24 -0
  88. package/src/Steps/ShopOrderConfirm.vue +295 -0
  89. package/src/Steps/ShopPaymentProvider.vue +53 -0
  90. package/src/Steps/ShopShippingMethod.vue +53 -0
  91. package/src/Steps/ShopUserDataGuest.vue +78 -0
  92. package/src/Steps/index.js +15 -0
  93. package/src/components/AddressForm.vue +84 -0
  94. package/src/components/AddressFormLayout.vue +107 -0
  95. package/src/components/CardSelector.vue +68 -0
  96. package/src/components/CartItem.vue +325 -0
  97. package/src/components/CartItemSmall.vue +257 -0
  98. package/src/components/LoadingHandler.vue +76 -0
  99. package/src/components/PaymentOption.vue +78 -0
  100. package/src/components/PaymentProviderUnzer.vue +201 -0
  101. package/src/components/PaymentSelector.vue +55 -0
  102. package/src/components/ShopAlert.vue +30 -0
  103. package/src/components/StepperTab.vue +132 -0
  104. package/src/components/dialogButton.vue +49 -0
  105. package/src/composables/address.js +95 -0
  106. package/src/composables/cart.js +132 -0
  107. package/src/composables/order.js +80 -0
  108. package/src/composables/payment.js +75 -0
  109. package/src/composables/shipping.js +32 -0
  110. package/src/main.js +44 -0
  111. package/src/shop.js +251 -0
  112. package/src/translations/de.js +15 -0
  113. package/src/translations/en.js +5 -0
  114. package/src/utils.js +49 -0
  115. package/vite.config.js +51 -0
  116. package/src/components/cart/CartView.vue +0 -692
  117. package/src/components/cart/ConfirmView.vue +0 -314
  118. package/src/components/order/category/CategoryList.vue +0 -83
  119. package/src/components/order/category/CategoryView.vue +0 -143
  120. package/src/components/order/information/UserInfoMulti.vue +0 -427
  121. package/src/components/order/information/UserInformation.vue +0 -332
  122. package/src/components/order/information/adress/ShippingAdress.vue +0 -143
  123. package/src/components/order/item/ItemCard.vue +0 -168
  124. package/src/components/order/item/ItemView.vue +0 -233
  125. package/src/components/order/process/ExampleUsage.vue +0 -100
  126. package/src/components/order/process/OrderComplete.vue +0 -41
  127. package/src/components/order/process/OrderTabHeader.vue +0 -7
  128. package/src/components/order/process/OrderView.vue +0 -210
  129. package/src/router/index.js +0 -103
  130. package/src/stores/cart.js +0 -111
  131. package/src/views/ViewMissing.vue +0 -20
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <sl-radio-group :value="state.currentSelection">
3
+ <template v-for="(option,i) in options">
4
+ <sl-card selectable @sl-change="changeSelection(i)" :selected="i===state.currentSelection" horizontal>
5
+ <slot :option="option" :index="i">
6
+ {{i}}: {{ option }}
7
+ </slot>
8
+ <sl-radio :value="i"></sl-radio>
9
+ </sl-card>
10
+ </template>
11
+ </sl-radio-group>
12
+ </template>
13
+
14
+ <script setup>
15
+ import {onMounted, reactive, watch} from 'vue'
16
+
17
+ const selection = defineModel("selection")
18
+
19
+ const emits = defineEmits(['change'])
20
+
21
+ const props = defineProps({
22
+ options:{
23
+ type: Array,
24
+ default:[]
25
+ },
26
+ })
27
+
28
+ const state = reactive({
29
+ currentSelection:null
30
+ })
31
+
32
+ function changeSelection(i){
33
+ if (state.currentSelection === i){
34
+ state.currentSelection = null
35
+ selection.value = null
36
+ }else{
37
+ state.currentSelection = i
38
+ selection.value = props.options[i]
39
+ }
40
+ emits("change", selection.value)
41
+ }
42
+
43
+ onMounted(()=>{
44
+ if (selection){
45
+ state.currentSelection = props.options.findIndex((option)=>option['dest']['key']===selection.value?.['dest']?.['key'])
46
+ }
47
+
48
+ })
49
+
50
+ </script>
51
+
52
+ <style scoped>
53
+ sl-card{
54
+ width: 100%;
55
+ &[selected]::part(base){
56
+ border:1px solid var(--sl-color-primary-500);
57
+ box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color);
58
+ }
59
+
60
+ &::part(body){
61
+ display:flex;
62
+ flex-direction: row;
63
+ justify-content: space-between;
64
+ align-items: center;
65
+ }
66
+ }
67
+
68
+ </style>
@@ -0,0 +1,325 @@
1
+ <template>
2
+ <div class="item-wrapper">
3
+ <sl-card horizontal class="viur-shop-cart-leaf">
4
+ <img
5
+ class="viur-shop-cart-leaf-image"
6
+ slot="image"
7
+ :src="
8
+ getImage(
9
+ item?.shop_image
10
+ ? item.shop_image
11
+ : undefined,
12
+ )
13
+ "
14
+ />
15
+ <h4
16
+ class="viur-shop-cart-leaf-headline headline"
17
+ v-html="getValue(item.shop_name)"
18
+ ></h4>
19
+ <h5 class="viur-shop-cart-leaf-artno">
20
+ {{ getValue(item.shop_art_no_or_gtin) }}
21
+ </h5>
22
+ <div
23
+ class="viur-shop-cart-leaf-description"
24
+ v-html="getValue(item.shop_description)"
25
+ ></div>
26
+ <sl-input
27
+ :disabled="!edit"
28
+ class="viur-shop-cart-leaf-value viur-shop-cart-leaf-value--quantity"
29
+ type="number"
30
+ placeholder="Number"
31
+ min="0"
32
+ noSpinButtons
33
+ :value="item.quantity"
34
+ @sl-change="changeAmount($event.target.value)"
35
+ >
36
+ <dialog-Button slot="prefix" class="decent" v-if="item.quantity===1" variant="danger" outline>
37
+ <sl-icon name="trash"></sl-icon>
38
+ <template #dialog="{close}">
39
+ Wollen sie den Artikel wirklich entfernen?
40
+ <sl-bar>
41
+ <sl-button slot="left" @click="close">Abbrechen</sl-button>
42
+ <sl-button slot="right" variant="danger" @click="removeArticle(); close()">Löschen</sl-button>
43
+ </sl-bar>
44
+ </template>
45
+ </dialog-Button>
46
+ <sl-button slot="prefix" v-else @click="changeAmount(item.quantity-=1)">
47
+ <sl-icon name="dash-lg"></sl-icon>
48
+ </sl-button>
49
+ <sl-button slot="suffix" @click="changeAmount(item.quantity+=1)">
50
+ <sl-icon name="plus-lg"></sl-icon>
51
+ </sl-button>
52
+ </sl-input>
53
+
54
+ <div class="viur-shop-cart-leaf-unitprice">
55
+ <div class="viur-shop-cart-leaf-label">Stückpreis</div>
56
+ <sl-format-number
57
+ class="viur-shop-cart-leaf-value viur-shop-cart-leaf-value--unitprice"
58
+ lang="de"
59
+ type="currency"
60
+ currency="EUR"
61
+ :value="item.shop_price_retail"
62
+ >
63
+ </sl-format-number>
64
+ </div>
65
+
66
+ <!--<div class="viur-shop-cart-leaf-actions">
67
+ <dialogButton
68
+ v-if="edit"
69
+ size="small"
70
+ outline
71
+ class="viur-shop-cart-leaf-delete-btn"
72
+ variant="danger"
73
+ title="Remove from cart"
74
+ >
75
+ <sl-icon name="trash" slot="prefix"></sl-icon>
76
+ <template #dialog="{close}">
77
+ Wollen sie den Artikel wirklich entfernen?
78
+ <sl-bar>
79
+ <sl-button slot="left" @click="close">Abbrechen</sl-button>
80
+ <sl-button slot="right" variant="danger" @click="removeArticle(); close()">Löschen</sl-button>
81
+ </sl-bar>
82
+ </template>
83
+ </dialogButton>
84
+ </div>-->
85
+
86
+ <div class="viur-shop-cart-leaf-price">
87
+ <div class="viur-shop-cart-leaf-label">Gesamtpreis</div>
88
+ <sl-format-number
89
+ class="viur-shop-cart-leaf-value viur-shop-cart-leaf-value--price"
90
+ lang="de"
91
+ type="currency"
92
+ currency="EUR"
93
+ :value="item.shop_price_retail * item.quantity"
94
+ >
95
+ </sl-format-number>
96
+ </div>
97
+
98
+
99
+ </sl-card>
100
+ <div class="loading" v-if="cartState.isUpdating">
101
+ <sl-spinner></sl-spinner>
102
+ </div>
103
+ </div>
104
+ </template>
105
+ <script setup>
106
+ import { useDebounceFn } from '@vueuse/core'
107
+ import { getImage } from '../utils';
108
+ import { useCart } from '../composables/cart';
109
+ import dialogButton from './dialogButton.vue';
110
+
111
+ const {addItem, removeItem, state:cartState, getValue} = useCart()
112
+
113
+ const changeAmount = useDebounceFn((amount) => {
114
+ props.item.quantity = amount
115
+ addItem(props.item['article']['dest']['key'],amount)
116
+ }, 1000)
117
+
118
+
119
+
120
+
121
+
122
+ const props = defineProps({
123
+ item:{
124
+ required:true
125
+ },
126
+ edit:{
127
+ type:Boolean,
128
+ default:false //true
129
+ }
130
+ })
131
+
132
+ function removeArticle(){
133
+ removeItem(props.item['article']['dest']['key'])
134
+ }
135
+
136
+ </script>
137
+ <style scoped>
138
+ @layer foundation.shop {
139
+ .viur-shop-cart-leaf {
140
+ --shop-leaf-label-color: var(--ignt-color-primary);
141
+ --shop-leaf-label-font-weight: 600;
142
+ --shop-leaf-label-font-size: 1em;
143
+ --shop-leaf-price-font-size: 1em;
144
+ --shop-leaf-headline-font-size: 1.3em;
145
+
146
+ &::part(base) {
147
+ display: flex;
148
+ position: relative;
149
+ }
150
+
151
+ &::part(header) {
152
+ border-bottom: none;
153
+ padding-top: 0;
154
+ padding-right: 0;
155
+ }
156
+
157
+ &::part(image) {
158
+ aspect-ratio: 1;
159
+ }
160
+
161
+ &::part(body) {
162
+ display: grid;
163
+ grid-template-columns: repeat(5, minmax(0, 1fr));
164
+ gap: var(--sl-spacing-medium);
165
+ padding: var(--sl-spacing-large);
166
+ height: 100%;
167
+ }
168
+
169
+ &::part(group) {
170
+ padding: 0;
171
+ }
172
+
173
+ @media (max-width: 600px) {
174
+ &::part(body) {
175
+ grid-template-columns: repeat(2, minmax(0, 1fr));
176
+ gap: var(--sl-spacing-medium);
177
+ padding: var(--sl-spacing-large);
178
+ height: 100%;
179
+ }
180
+
181
+ &::part(image) {
182
+ border-radius: var(--border-radius);
183
+ align-self: baseline;
184
+ }
185
+ }
186
+ }
187
+
188
+ .viur-shop-cart-leaf-image {
189
+ aspect-ratio: 1;
190
+ }
191
+
192
+ .viur-shop-cart-leaf-headline {
193
+ grid-column: 1 / span 4;
194
+ order: -2;
195
+ margin: 0;
196
+ font-size: var(--shop-leaf-headline-font-size);
197
+
198
+ @media (max-width: 600px) {
199
+ grid-column: 1 / span 2;
200
+ }
201
+ }
202
+
203
+ .viur-shop-cart-leaf-artno {
204
+ grid-column: 1 / span 5;
205
+ margin: 0;
206
+
207
+ @media (max-width: 600px) {
208
+ grid-column: 1 / span 2;
209
+ }
210
+ }
211
+
212
+ .viur-shop-cart-leaf-actions {
213
+ display: flex;
214
+ justify-content: start;
215
+ gap: var(--sl-spacing-x-small);
216
+
217
+ @media (min-width: 600px) {
218
+ grid-column: 5 / span 1;
219
+ order: -1;
220
+ justify-content: end;
221
+ align-items: end;
222
+ }
223
+ }
224
+
225
+ .viur-shop-cart-leaf-description {
226
+ grid-column: 1 / span 5;
227
+ margin-bottom: var(--ignt-spacing-small);
228
+ display: -webkit-box;
229
+ -webkit-line-clamp: 3;
230
+ -webkit-box-orient: vertical;
231
+ height: fit-content;
232
+ overflow: hidden;
233
+
234
+ &:deep(*) {
235
+ margin: 0;
236
+ }
237
+
238
+ @media (max-width: 600px) {
239
+ grid-column: span 2;
240
+ }
241
+
242
+ @media (max-width: 500px) {
243
+ display: none;
244
+ }
245
+ }
246
+
247
+ .viur-shop-cart-leaf-price {
248
+ grid-column: 5 / span 1;
249
+ align-self: center;
250
+ text-align: right;
251
+ font-size: var(--shop-leaf-price-font-size);
252
+ }
253
+
254
+ .viur-shop-cart-leaf-quantity {
255
+ align-self: center;
256
+ }
257
+
258
+ .viur-shop-cart-leaf-unitprice {
259
+ align-self: center;
260
+
261
+ @media (max-width: 600px) {
262
+ text-align: right;
263
+ }
264
+ }
265
+
266
+ .viur-shop-cart-leaf-label,
267
+ .viur-shop-cart-leaf-value--quantity::part(form-control-label) {
268
+ color: var(--shop-leaf-label-color);
269
+ font-weight: var(--shop-leaf-label-font-weight);
270
+ font-size: calc(var(--shop-leaf-label-font-size) * .75);
271
+ margin-bottom: var(--ignt-spacing-2x-small);
272
+ }
273
+
274
+ .loading{
275
+ position: absolute;
276
+ top: 0;
277
+ background: #ffffffcc;
278
+ width: 100%;
279
+ height: 100%;
280
+ display: flex;
281
+ flex-direction: row;
282
+ flex-wrap: nowrap;
283
+ justify-content: center;
284
+ align-items: center;
285
+
286
+
287
+ & sl-spinner{
288
+ font-size:3rem;
289
+ }
290
+ }
291
+
292
+ .item-wrapper{
293
+ position: relative;
294
+ }
295
+
296
+
297
+ .viur-shop-cart-leaf-value--quantity{
298
+ align-self: center;
299
+ grid-column: span 1;
300
+
301
+ &::part(input){
302
+ text-align: center;
303
+ padding: 0;
304
+ }
305
+
306
+ sl-button{
307
+ margin: 0;
308
+ transition: all ease .3s;
309
+
310
+ &::part(base){
311
+ background-color: transparent;
312
+ border: none;
313
+ }
314
+
315
+ &::part(label){
316
+ padding: 0;
317
+ height: var(--sl-input-height-medium);
318
+ width: calc(var(--sl-input-height-medium) / 5 * 4);
319
+ }
320
+ }
321
+
322
+ }
323
+
324
+ }
325
+ </style>
@@ -0,0 +1,257 @@
1
+ <template>
2
+ <div class="item-wrapper">
3
+ <sl-card horizontal class="viur-shop-cart-leaf-small">
4
+ <img
5
+ class="viur-shop-cart-leaf-image"
6
+ slot="image"
7
+ :src="
8
+ getImage(
9
+ item?.shop_image
10
+ ? item.shop_image
11
+ : undefined,
12
+ )
13
+ "
14
+ />
15
+ <h4
16
+ class="viur-shop-cart-leaf-headline headline"
17
+ v-html="getValue(item.shop_name)"
18
+ ></h4>
19
+
20
+ <sl-input
21
+ :disabled="!edit"
22
+ class="viur-shop-cart-leaf-value viur-shop-cart-leaf-value--quantity"
23
+ type="number"
24
+ placeholder="Number"
25
+ min="0"
26
+ noSpinButtons
27
+ :value="item.quantity"
28
+ @sl-change="changeAmount($event.target.value)"
29
+ >
30
+ <dialog-Button slot="prefix" class="decent" v-if="item.quantity===1" variant="danger" outline>
31
+ <sl-icon name="trash"></sl-icon>
32
+ <template #dialog="{close}">
33
+ Wollen sie den Artikel wirklich entfernen?
34
+ <sl-bar>
35
+ <sl-button slot="left" @click="close">Abbrechen</sl-button>
36
+ <sl-button slot="right" variant="danger" @click="removeArticle(); close()">Löschen</sl-button>
37
+ </sl-bar>
38
+ </template>
39
+ </dialog-Button>
40
+ <sl-button slot="prefix" v-else @click="changeAmount(item.quantity-=1)">
41
+ <sl-icon name="dash-lg"></sl-icon>
42
+ </sl-button>
43
+ <sl-button slot="suffix" @click="changeAmount(item.quantity+=1)">
44
+ <sl-icon name="plus-lg"></sl-icon>
45
+ </sl-button>
46
+ </sl-input>
47
+
48
+ <div class="viur-shop-cart-leaf-article-number">
49
+ <div class="viur-shop-cart-leaf-label">Artikelnummer</div>
50
+ {{ getValue(item.shop_art_no_or_gtin) }}
51
+ </div>
52
+
53
+ <div class="viur-shop-cart-leaf-unitprice">
54
+ <div class="viur-shop-cart-leaf-label">Stückpreis</div>
55
+ <sl-format-number
56
+ class="viur-shop-cart-leaf-value viur-shop-cart-leaf-value--unitprice"
57
+ lang="de"
58
+ type="currency"
59
+ currency="EUR"
60
+ :value="item.shop_price_retail"
61
+ >
62
+ </sl-format-number>
63
+ </div>
64
+
65
+
66
+ <div class="viur-shop-cart-leaf-price">
67
+ <div class="viur-shop-cart-leaf-label">Gesamtpreis</div>
68
+ <sl-format-number
69
+ class="viur-shop-cart-leaf-value viur-shop-cart-leaf-value--price"
70
+ lang="de"
71
+ type="currency"
72
+ currency="EUR"
73
+ :value="item.shop_price_retail * item.quantity"
74
+ >
75
+ </sl-format-number>
76
+ </div>
77
+ </sl-card>
78
+ <div class="loading" v-if="cartState.isUpdating">
79
+ <sl-spinner></sl-spinner>
80
+ </div>
81
+ </div>
82
+ </template>
83
+ <script setup>
84
+ import { useDebounceFn } from '@vueuse/core'
85
+ import { getImage } from '../utils';
86
+ import { useCart } from '../composables/cart';
87
+ import dialogButton from './dialogButton.vue';
88
+
89
+ const {addItem, removeItem, state:cartState, getValue} = useCart()
90
+
91
+ const changeAmount = useDebounceFn((amount) => {
92
+ props.item.quantity = amount
93
+ addItem(props.item['article']['dest']['key'],amount)
94
+ }, 1000)
95
+
96
+ const props = defineProps({
97
+ item:{
98
+ required:true
99
+ },
100
+ edit:{
101
+ type:Boolean,
102
+ default:false //true
103
+ }
104
+ })
105
+
106
+ function removeArticle(){
107
+ removeItem(props.item['article']['dest']['key'])
108
+ }
109
+
110
+ </script>
111
+ <style scoped>
112
+ @layer foundation.shop {
113
+ .viur-shop-cart-leaf-small {
114
+ --shop-leaf-label-color: var(--ignt-color-primary);
115
+ --shop-leaf-label-font-weight: 600;
116
+ --shop-leaf-label-font-size: 1em;
117
+ --shop-leaf-price-font-size: 1em;
118
+ --shop-leaf-headline-font-size: 1.3em;
119
+
120
+ &::part(base) {
121
+ display: flex;
122
+ position: relative;
123
+ }
124
+
125
+ &::part(header) {
126
+ border-bottom: none;
127
+ padding-top: 0;
128
+ padding-right: 0;
129
+ }
130
+
131
+ &::part(image) {
132
+ aspect-ratio: 1;
133
+ flex-basis: 120px;
134
+ }
135
+
136
+ &::part(body) {
137
+ display: grid;
138
+ grid-template-columns: repeat(5, minmax(0, 1fr));
139
+ gap: var(--sl-spacing-medium);
140
+ padding: var(--sl-spacing-large);
141
+ height: 100%;
142
+ }
143
+
144
+ &::part(group) {
145
+ padding: 0;
146
+ }
147
+
148
+ @media (max-width: 600px) {
149
+ &::part(body) {
150
+ grid-template-columns: repeat(2, minmax(0, 1fr));
151
+ gap: var(--sl-spacing-medium);
152
+ padding: var(--sl-spacing-large);
153
+ height: 100%;
154
+ }
155
+
156
+ &::part(image) {
157
+ border-radius: var(--border-radius);
158
+ align-self: baseline;
159
+ }
160
+ }
161
+ }
162
+
163
+ .viur-shop-cart-leaf-image {
164
+ aspect-ratio: 1;
165
+ }
166
+
167
+ .viur-shop-cart-leaf-headline {
168
+ grid-column: 1 / span 4;
169
+ order: -2;
170
+ margin: 0;
171
+ font-size: var(--shop-leaf-headline-font-size);
172
+
173
+ @media (max-width: 600px) {
174
+ grid-column: 1 / span 2;
175
+ }
176
+ }
177
+
178
+ .viur-shop-cart-leaf-price {
179
+ grid-column: 5 / span 1;
180
+ align-self: flex-end;
181
+ text-align: right;
182
+ font-size: var(--shop-leaf-price-font-size);
183
+ }
184
+
185
+ .viur-shop-cart-leaf-article-number {
186
+ align-self: center;
187
+ grid-column: span 2;
188
+ }
189
+
190
+ .viur-shop-cart-leaf-quantity {
191
+ align-self: center;
192
+ }
193
+
194
+ .viur-shop-cart-leaf-unitprice {
195
+ align-self: center;
196
+ grid-column: 4 / span 1;
197
+ }
198
+
199
+ .viur-shop-cart-leaf-label,
200
+ .viur-shop-cart-leaf-value--quantity::part(form-control-label) {
201
+ color: var(--shop-leaf-label-color);
202
+ font-weight: var(--shop-leaf-label-font-weight);
203
+ font-size: calc(var(--shop-leaf-label-font-size) *.75);
204
+ margin-bottom: var(--ignt-spacing-2x-small);
205
+ }
206
+
207
+ .loading{
208
+ position: absolute;
209
+ top: 0;
210
+ background: #ffffffcc;
211
+ width: 100%;
212
+ height: 100%;
213
+ display: flex;
214
+ flex-direction: row;
215
+ flex-wrap: nowrap;
216
+ justify-content: center;
217
+ align-items: center;
218
+
219
+
220
+ & sl-spinner{
221
+ font-size:3rem;
222
+ }
223
+ }
224
+
225
+ .item-wrapper{
226
+ position: relative;
227
+ }
228
+
229
+ .viur-shop-cart-leaf-value--quantity{
230
+ align-self: center;
231
+ grid-column: span 1;
232
+
233
+ &::part(input){
234
+ text-align: center;
235
+ padding: 0;
236
+ }
237
+
238
+ sl-button{
239
+ margin: 0;
240
+ transition: all ease .3s;
241
+
242
+ &::part(base){
243
+ background-color: transparent;
244
+ border: none;
245
+ }
246
+
247
+ &::part(label){
248
+ padding: 0;
249
+ height: var(--sl-input-height-medium);
250
+ width: calc(var(--sl-input-height-medium) / 5 * 4);
251
+ }
252
+ }
253
+
254
+ }
255
+
256
+ }
257
+ </style>