wickes-css2 2.94.0-develop.13 → 2.94.0-develop.15

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 (75) hide show
  1. package/Readme.md +2 -2
  2. package/build/css/main.css +1 -1
  3. package/build/css/pages/checkout-new.css +1 -1
  4. package/build/css/pages/checkout.css +1 -1
  5. package/build/css/pages/page_checkout_delivery-new.css +1 -1
  6. package/build/css/pages/page_shopping-cart-v2.css +1 -1
  7. package/build/css/pages/tradePro-signup.css +1 -1
  8. package/build/css/pdp-main-non-critical.css +1 -1
  9. package/build/js/basket.min.js +2 -2
  10. package/build/js/bundle.min.js +1 -1
  11. package/build/js/checkout.min.js +2 -2
  12. package/build/js/emulation.min.js +2 -2
  13. package/build/js/general.bundle.min.js +1 -1
  14. package/build/js/merged-checkout.min.js +2 -2
  15. package/build/js/page/basket/summary-mobile.js +22 -0
  16. package/build/js/page/basket-v2.js +13 -0
  17. package/build/js/page/components/order-summary.js +8 -1
  18. package/build/js/page/components/sticky-order-observer.js +49 -0
  19. package/build/js/page/components/voucher.js +1 -1
  20. package/build/js/pdp.bundle.min.js +1 -1
  21. package/build/js/plp.bundle.min.js +1 -1
  22. package/build/js/project-list.min.js +1 -1
  23. package/package.json +1 -1
  24. package/src/components/checkout-action.hbs +14 -11
  25. package/src/components/checkout-voucher-accordion.hbs +15 -0
  26. package/src/components/checkout_order-summary-new.hbs +5 -3
  27. package/src/components/checkout_voucher_large.hbs +20 -16
  28. package/src/components/date-selection.hbs +1 -1
  29. package/src/components/order-item.hbs +3 -3
  30. package/src/components/order-summary.hbs +91 -56
  31. package/src/components/partner-signup-form.hbs +4 -0
  32. package/src/components/summary-mobile-bar.hbs +17 -0
  33. package/src/data/data_delivery-address-v2.json +1 -1
  34. package/src/data/data_shopping-cart-v2.json +24 -0
  35. package/src/js/components/general/is-trade-pro.js +15 -1
  36. package/src/js/emulation/basket-data.js +2 -2
  37. package/src/js/page/basket/summary-mobile.js +22 -0
  38. package/src/js/page/basket-v2.js +13 -0
  39. package/src/js/page/components/order-summary.js +8 -1
  40. package/src/js/page/components/sticky-order-observer.js +49 -0
  41. package/src/js/page/components/voucher.js +1 -1
  42. package/src/layouts/basket-new.hbs +1 -1
  43. package/src/layouts/checkout-new.hbs +1 -0
  44. package/src/page_checkout_confirmation-new-marketing-consent-error.html +0 -2
  45. package/src/page_checkout_delivery-address-customer-journey.html +0 -5
  46. package/src/page_checkout_delivery-address-v2.html +0 -4
  47. package/src/page_checkout_delivery-details-v2-asm.html +1 -5
  48. package/src/page_checkout_delivery-details-v2-calendar-message.html +0 -3
  49. package/src/page_checkout_delivery-details-v2-oos.html +0 -3
  50. package/src/page_checkout_delivery-details-v2-wisdom-not-available.html +0 -5
  51. package/src/page_checkout_delivery-details-v2-wisdom.html +0 -5
  52. package/src/page_checkout_delivery-details-with-loader-v2.html +0 -3
  53. package/src/page_checkout_delivery-details_guest-new.html +0 -5
  54. package/src/page_checkout_delivery_address-asm-new.html +0 -4
  55. package/src/page_checkout_next-day-delivery-details.html +0 -6
  56. package/src/page_checkout_payment-details-v2.html +1 -1
  57. package/src/page_checkout_payment-details_guest-with-checkout-journey.html +0 -2
  58. package/src/page_checkout_payment-details_login-with-checkout-journey.html +0 -2
  59. package/src/page_checkout_rapid-delivery-details.html +0 -6
  60. package/src/page_klarna_payment-details_with-klarna.html +3 -6
  61. package/src/page_payment-details-with-clearpay.html +1 -1
  62. package/src/page_payment-details_with_apple-pay.html +1 -1
  63. package/src/page_payment-details_with_google-pay.html +1 -1
  64. package/src/page_shopping-cart-v2.html +6 -16
  65. package/src/page_tradePro-signup.html +1 -1
  66. package/src/scss/components/_checkout-action.scss +132 -6
  67. package/src/scss/components/_marketing-preferences.scss +1 -1
  68. package/src/scss/components/_order-summary.scss +329 -178
  69. package/src/scss/components/_sticky-element-appearance.scss +25 -0
  70. package/src/scss/helpers/_variables.scss +2 -0
  71. package/src/scss/main.scss +1 -0
  72. package/src/scss/pages/_checkout-widget.scss +137 -28
  73. package/src/scss/pages/page_checkout_delivery-new.scss +119 -10
  74. package/src/scss/pages/page_shopping-cart-v2.scss +137 -34
  75. package/src/scss/pages/tradePro-signup.scss +27 -0
@@ -1,13 +1,20 @@
1
1
  @import '../helpers/helpers';
2
2
 
3
+ $android-offset: 60px !default;
4
+ $ios-notch-offset: 80px !default;
5
+
6
+ body.summary-hidden .back-to-top {
7
+ bottom: 20px !important;
8
+ right: 16px !important;
9
+ }
10
+
3
11
  .summary {
4
12
  &__aside {
5
- padding: 20px 20px 0;
13
+ padding: 15px;
6
14
  background: $gray-bg;
7
-
8
- & .btn-checkout {
9
- margin-bottom: 10px;
10
- }
15
+ margin: 0 auto;
16
+ z-index: $summary-aside;
17
+ box-shadow: 4px 4px 16px rgba(0, 0, 0, .25);
11
18
 
12
19
  & .form-row__col-btn {
13
20
  padding-right: 0;
@@ -65,240 +72,285 @@
65
72
  }
66
73
  }
67
74
 
68
- &-large {
69
- order: -1;
70
-
71
- .summary__aside {
72
- //border: 1px solid $border-grey;
73
-
74
- .checkout-widget_order-summary.checkout-widget-large {
75
- display: block;
76
- padding-top: 0;
77
- margin-bottom: 0;
78
- }
79
- }
75
+ &__mobile-container {
76
+ display: flex;
77
+ justify-content: space-between;
78
+ align-items: center;
80
79
  }
81
80
 
82
- &__basked-id {
83
- margin-top: 13px;
84
- padding: 26px 0;
85
- background: $gray-bg;
86
- text-align: center;
87
- font-size: 1rem;
81
+ &__icon-container {
82
+ display: flex;
83
+ justify-content: center;
84
+ align-items: center;
85
+ gap: 10px;
86
+ }
88
87
 
89
- .id-number {
90
- font-weight: bold;
91
- }
88
+ &__mobile-bar-total,
89
+ &__mobile-bar-label {
90
+ font-weight: 400;
91
+ font-size: 1.125rem;
92
+ line-height: 1.25rem;
92
93
  }
93
94
 
94
- &__email {
95
- &-info {
96
- padding: 26px 30px;
97
- background: $gray-bg;
95
+ &__icon {
96
+ display: inline-flex;
97
+ justify-content: center;
98
+ align-items: center;
99
+ width: 24px;
100
+ height: 24px;
101
+ transition: transform .3s ease;
102
+ transform: rotate(180deg);
103
+
104
+ &-up,
105
+ &-down {
106
+ display: flex;
107
+ justify-content: center;
108
+ align-items: center;
109
+ width: 16px;
110
+ height: 16px;
111
+
112
+ i {
113
+ font-size: 16px;
114
+ line-height: 16px;
115
+ display: inline-block;
116
+ margin: auto;
117
+ }
98
118
  }
99
119
  }
100
120
 
101
- &__accordion {
102
- display: inline-block;
103
- //padding-bottom: 0;
104
- font-weight: 500;
105
- color: $blue;
106
- padding-bottom: 15px;
107
-
108
- &.collapsed .icon {
109
- transform: rotate(180deg);
121
+ .checkout-widget {
122
+ &__voucher-accordion {
123
+ margin-top: 10px;
110
124
  }
111
125
 
112
- //&:not(.collapsed) {
113
- // padding-bottom: 15px;
114
- //}
126
+ &__voucher-toggle {
127
+ margin-bottom: 8px;
128
+ cursor: pointer;
129
+ display: flex;
130
+ justify-content: space-between;
131
+ color: $blue;
132
+ font-size: .875rem;
115
133
 
116
- & + .summary {
117
- &__aside {
118
- padding-top: 20px;
119
- }
120
- }
121
-
122
- &.collapsed + .summary {
123
- &__aside {
124
- padding-top: 0;
134
+ &.collapsed {
135
+ margin-bottom: 0;
125
136
 
126
- .checkout-widget__details {
127
- opacity: 0;
137
+ .checkout-widget__icon {
138
+ transform: rotate(180deg);
128
139
  }
129
140
  }
130
141
  }
131
- }
132
142
 
133
- .checkout-widget {
143
+ &__icon {
144
+ width: 16px;
145
+ height: 16px;
146
+ display: flex;
147
+ justify-content: center;
148
+ align-items: center;
149
+ }
134
150
 
135
- &__total {
136
- margin-top: 0;
151
+ &__voucher-section {
152
+ margin-top: 1rem;
137
153
  }
138
154
 
139
- &__accordion-wrap {
140
- margin-bottom: 20px;
155
+ &__voucher-list {
156
+ list-style: none;
157
+ padding: 0;
141
158
  }
142
159
 
143
- &.checkout-widget_order-summary {
144
- padding: 20px 20px 0;
160
+ &__voucher-value {
161
+ font-weight: bold;
162
+ }
163
+ }
145
164
 
146
- .checkout-widget {
147
- &__details {
148
- padding-top: 20px;
149
- font-size: 1rem;
165
+ .summary__mobile-order.collapsed .summary__icon {
166
+ transform: rotate(0deg);
167
+ }
150
168
 
151
- .checkout-widget__accordion-wrap {
152
- .accordion__header-icon-small {
153
- left: 85px;
154
- }
155
- }
156
- }
169
+ .checkout-widget__item {
170
+ display: flex;
171
+ justify-content: space-between;
172
+ align-items: center;
173
+ font-size: 1rem;
174
+ line-height: 1.25rem;
175
+ margin: 10px 0;
176
+ padding: 5px 0;
177
+ }
157
178
 
158
- &__item {
159
- display: flex;
160
- justify-content: space-between;
161
- font-size: 1rem;
162
- line-height: 1.125rem;
163
- font-weight: 400;
164
- margin-bottom: 20px;
165
-
166
- &-value {
167
- text-align: right;
168
- }
179
+ .checkout-widget__item:nth-child(3) {
180
+ padding-top: 10px;
181
+ }
169
182
 
170
- &-bold {
171
- font-weight: 500;
172
- }
183
+ .checkout-widget__item-free {
184
+ .icon {
185
+ margin-left: 5px;
186
+ margin-bottom: -2px;
187
+ vertical-align: bottom;
188
+ color: #67a589;
189
+ }
190
+ }
173
191
 
174
- &-vat {
175
- font-size: .75rem;
176
- margin-top: -15px;
177
- }
192
+ .checkout-widget__item-bold {
193
+ font-weight: 500;
194
+ margin: 0;
195
+ }
178
196
 
179
- &-hide {
180
- display: none;
181
- }
197
+ .checkout-widget__item-vat {
198
+ font-size: .875rem;
199
+ margin: 0;
200
+ padding: 0;
201
+ }
182
202
 
183
- &-free {
184
- color: $blue;
203
+ .checkout-widget__item-value {
204
+ text-align: right;
205
+ }
185
206
 
186
- & .icon {
187
- margin-left: 5px;
188
- margin-bottom: -2px;
189
- vertical-align: bottom;
190
- color: $green;
191
- }
192
- }
207
+ .checkout-widget__item-cc, .checkout-widget__item-delivery {
208
+ font-size: 1rem;
209
+ margin-top: 5px;
210
+ }
193
211
 
194
- &-deficit {
195
- display: block;
196
- text-align: center;
197
- color: #0277bd;
212
+ .checkout-widget__total {
213
+ display: flex;
214
+ justify-content: space-between;
215
+ align-items: center;
216
+ padding: 15px 0;
217
+ margin-bottom: 20px;
218
+ font-weight: 500;
219
+ font-size: 1.25rem;
220
+ color: $white;
221
+ background-color: $blue-dark;
222
+ }
198
223
 
199
- .bold {
200
- font-weight: 500;
201
- }
202
- }
203
- }
224
+ &__aside.collapse,
225
+ &__aside.collapsing {
226
+ position: fixed !important;
227
+ bottom: 0;
228
+ left: 0;
229
+ right: 0;
230
+ overflow: hidden;
231
+ display: block !important;
232
+ transition: height .3s ease-in-out;
233
+ max-height: calc(100vh - 177px);
234
+ overflow-y: auto;
235
+ -webkit-overflow-scrolling: touch;
236
+ }
204
237
 
205
- &-deficit {
206
- display: block;
207
- text-align: center;
208
- color: #0277bd;
238
+ &__aside.collapse {
239
+ height: 0;
240
+ }
209
241
 
210
- .bold {
211
- font-weight: 500;
212
- }
213
- }
242
+ &__aside.collapse.show {
243
+ bottom: 177px;
244
+ height: auto;
214
245
 
215
- &__total {
216
- border: 0;
217
- display: flex;
218
- justify-content: space-between;
219
- margin-left: -25px;
220
- margin-right: -25px;
221
- margin-bottom: 0;
222
- padding: 20px 25px;
223
- color: #fff;
224
- background-color: $blue-dark;
225
- font-size: 1.375rem;
226
- line-height: 1.5rem;
227
- }
228
- }
246
+ &.single-button {
247
+ bottom: 125px;
229
248
  }
249
+ }
230
250
 
231
- &.checkout-widget-large {
232
- .checkout-info-wrap {
233
- padding-top: 0;
234
- }
251
+ &__aside.collapsing {
252
+ bottom: 177px;
253
+ height: auto;
254
+
255
+ &.single-button {
256
+ bottom: 125px;
235
257
  }
236
258
  }
237
259
 
238
- &--payways {
239
- .checkout-widget {
240
- margin-bottom: 16px;
241
- }
260
+ &__aside.collapsing.show {
261
+ height: 0;
262
+ }
263
+
264
+ .collapsing {
265
+ height: 0;
266
+ overflow: hidden;
267
+ transition: height .3s ease-in-out;
268
+ }
269
+
270
+ .collapse.show {
271
+ height: auto;
272
+ transition: height .3s ease-in-out;
273
+ }
274
+ }
275
+
276
+ .summary__mobile-bar {
277
+ position: fixed;
278
+ bottom: 0;
279
+ left: 0;
280
+ right: 0;
281
+ z-index: $summary-mobile-bar;
282
+ transition: transform .3s ease;
283
+ }
284
+
285
+ .summary__mobile-order {
286
+ display: flex;
287
+ justify-content: space-between;
288
+ align-items: center;
289
+ background-color: $blue-dark;
290
+ padding: 20px 0;
291
+ height: 44px;
292
+ cursor: pointer;
293
+ color: $white;
294
+ transition: transform .3s ease;
295
+ }
296
+
297
+ .back-to-top {
298
+ bottom: 193px !important;
299
+ }
300
+
301
+ .back-to-top.single-button {
302
+ bottom: 141px !important;
303
+ }
304
+
305
+ .summary:not(.summary--mobile) {
306
+ .summary__aside {
307
+ padding: 20px 20px 0;
308
+ background: $gray-bg;
309
+ max-width: none;
310
+ box-shadow: none;
242
311
  }
243
312
  }
244
313
 
245
314
  @include media-breakpoint-up(sm) {
246
315
  .summary {
247
- &-large {
248
- .footer-checkout-holder {
249
- justify-content: center;
316
+ &__aside.collapse.show {
317
+ bottom: 182px;
318
+ height: auto;
319
+
320
+ &.single-button {
321
+ bottom: 130px;
250
322
  }
251
323
  }
252
324
 
253
- .checkout-widget {
254
- &.checkout-widget_order-summary {
255
- padding: 20px 0 0;
325
+ &__aside.collapsing {
326
+ bottom: 182px;
256
327
 
257
- .checkout-widget {
258
- &__total {
259
- margin-left: -20px;
260
- margin-right: -20px;
261
- }
262
- }
328
+ &.single-button {
329
+ bottom: 130px;
263
330
  }
264
331
  }
265
332
  }
266
- }
267
333
 
268
- @include media-breakpoint-up(md) {
269
- .summary__klarna {
270
- margin: 0 -20px;
334
+ .back-to-top {
335
+ bottom: 198px !important;
271
336
  }
272
- }
273
337
 
274
- @include media-breakpoint-only(md) {
275
- .summary {
276
- .checkout-widget {
277
- &.checkout-widget_order-summary {
278
- .checkout-widget {
279
- &__item {
280
- &-deficit {
281
- text-align: left;
282
- }
283
- }
338
+ .back-to-top.single-button {
339
+ bottom: 146px !important;
340
+ }
341
+ }
284
342
 
285
- &__accordion-wrap {
286
- .checkout-widget__detail-value {
287
- left: auto;
288
- right: 0;
289
- top: 0;
290
- }
291
- }
292
- }
293
- }
294
- }
343
+ @include media-breakpoint-up(md) {
344
+ body:has(.summary__aside.collapse.show) .back-to-top {
345
+ display: none !important;
295
346
  }
296
347
  }
297
348
 
298
349
  @include media-breakpoint-up(lg) {
299
350
  .summary {
300
351
  &__aside {
301
- padding: 40px 30px 0;
352
+ padding: 20px 20px 0;
353
+ box-shadow: none;
302
354
  }
303
355
 
304
356
  & &__payment {
@@ -364,6 +416,21 @@
364
416
  }
365
417
  }
366
418
 
419
+ .checkout-action__wrapper {
420
+ position: static;
421
+ box-shadow: none;
422
+ }
423
+
424
+ .back-to-top {
425
+ right: 48px !important;
426
+ bottom: 24px !important;
427
+ }
428
+
429
+ .back-to-top.single-button {
430
+ right: 48px !important;
431
+ bottom: 24px !important;
432
+ }
433
+
367
434
  .basket {
368
435
  .summary {
369
436
  & .summary__payment {
@@ -378,3 +445,87 @@
378
445
  }
379
446
  }
380
447
  }
448
+
449
+ @include media-breakpoint-down(md) {
450
+ .tp-app {
451
+ &.tp-android,
452
+ &.tp-ios:not(.tp-ios-notch) {
453
+ .summary--mobile {
454
+ .summary__mobile-bar,
455
+ .summary__aside {
456
+ bottom: $android-offset !important;
457
+ }
458
+ }
459
+
460
+ .summary__aside.collapse.show {
461
+ bottom: 177px + $android-offset !important;
462
+ }
463
+
464
+ .summary__aside.collapsing {
465
+ bottom: 177px + $android-offset !important;
466
+ }
467
+
468
+ .summary__aside.collapse.show.single-button,
469
+ .summary__aside.collapsing.single-button {
470
+ bottom: 125px + $android-offset !important;
471
+ }
472
+ }
473
+
474
+ &.tp-ios-notch {
475
+ .summary--mobile {
476
+ .summary__mobile-bar,
477
+ .summary__aside {
478
+ bottom: $ios-notch-offset !important;
479
+ }
480
+ }
481
+
482
+ .summary__aside.collapse.show {
483
+ bottom: 177px + $ios-notch-offset !important;
484
+ }
485
+
486
+ .summary__aside.collapsing {
487
+ bottom: 177px + $ios-notch-offset !important;
488
+ }
489
+
490
+ .summary__aside.collapse.show.single-button,
491
+ .summary__aside.collapsing.single-button {
492
+ bottom: 125px + $ios-notch-offset !important;
493
+ }
494
+ }
495
+ }
496
+ }
497
+
498
+ @include media-breakpoint-up(sm) {
499
+ .tp-app {
500
+ &.tp-android,
501
+ &.tp-ios:not(.tp-ios-notch) {
502
+ .summary__aside.collapse.show {
503
+ bottom: 182px + $android-offset !important;
504
+ }
505
+
506
+ .summary__aside.collapsing {
507
+ bottom: 182px + $android-offset !important;
508
+ }
509
+
510
+ .summary__aside.collapse.show.single-button,
511
+ .summary__aside.collapsing.single-button {
512
+ bottom: 130px + $android-offset !important;
513
+ }
514
+ }
515
+
516
+ &.tp-ios-notch {
517
+ .summary__aside.collapse.show {
518
+ bottom: 182px + $ios-notch-offset !important;
519
+ }
520
+
521
+ .summary__aside.collapsing {
522
+ bottom: 182px + $ios-notch-offset !important;
523
+ }
524
+
525
+ .summary__aside.collapse.show.single-button,
526
+ .summary__aside.collapsing.single-button {
527
+ bottom: 130px + $ios-notch-offset !important;
528
+ }
529
+ }
530
+ }
531
+ }
@@ -0,0 +1,25 @@
1
+ [data-sticky-element] {
2
+ position: fixed;
3
+ bottom: 0;
4
+ left: 0;
5
+ right: 0;
6
+ transform: translateY(100%);
7
+ opacity: 0;
8
+ pointer-events: none;
9
+ will-change: transform, opacity;
10
+ transition: transform 0.5s ease, opacity 0.5s ease;
11
+
12
+ &:not(.is-hidden) {
13
+ transform: translateY(0);
14
+ opacity: 1;
15
+ pointer-events: auto;
16
+ }
17
+
18
+ &.is-hidden {
19
+ transform: translateY(100%);
20
+ opacity: 0;
21
+ transition: transform 0.5s ease 0s,
22
+ opacity 0.5s ease 5s;
23
+ pointer-events: none;
24
+ }
25
+ }
@@ -173,6 +173,8 @@ $nav: 100;
173
173
  $nav-mobile: 101;
174
174
  $back-to-top: 1000;
175
175
  $cookies-policy: 1001;
176
+ $summary-aside: 1001;
177
+ $summary-mobile-bar: 1002;
176
178
  $offer-banner-stuck: 1030;
177
179
 
178
180
  $deep-red: #8a424f;
@@ -86,6 +86,7 @@
86
86
  @import 'components/clearpay';
87
87
  @import 'components/clamp-content';
88
88
  @import 'components/error-frame';
89
+ @import 'components/sticky-element-appearance';
89
90
 
90
91
  // Pages
91
92
  @import 'pages/contact-us';