wickes-css2 2.103.0-RG-1658-apply-dynamic-logic-gift-card.1 → 2.103.0-develop.1
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/Readme.md +3 -1
- package/build/css/components/card-product-banner.css +1 -1
- package/build/css/components/checkout-payment-details-v2.css +1 -1
- package/build/css/main.css +1 -1
- package/build/css/pages/page_checkout_delivery-new.css +1 -1
- package/build/css/pages/page_products-list-combined.css +1 -1
- package/build/css/pages/page_products-list.css +1 -1
- package/build/css/plp-main.css +1 -1
- package/build/js/account-members.min.js +1 -1
- package/build/js/add-project-list-id.min.js +1 -1
- package/build/js/address-book.min.js +1 -1
- package/build/js/basket.min.js +2 -2
- package/build/js/bundle.min.js +1 -1
- package/build/js/change-password.min.js +1 -1
- package/build/js/checkout.min.js +2 -2
- package/build/js/emulation.min.js +70 -268
- package/build/js/general.bundle.min.js +1 -1
- package/build/js/merged-checkout.min.js +2 -2
- package/build/js/page/components/order-summary.js +25 -42
- package/build/js/page/plp-cards-v2.js +15 -6
- package/build/js/page/plp-load-more.js +1 -1
- package/build/js/page/utils/validation.js +1 -46
- package/build/js/pdp.bundle.min.js +1 -1
- package/build/js/personal-details.min.js +1 -1
- package/build/js/plp.bundle.min.js +1 -1
- package/build/js/project-list.min.js +1 -44
- package/build/js/quiz.min.js +1 -1
- package/build/js/track-my-order.min.js +1 -1
- package/package.json +2 -2
- package/src/components/card_product_v2.hbs +10 -5
- package/src/components/card_sponsor_banner.hbs +8 -0
- package/src/components/card_sponsor_product.hbs +6 -0
- package/src/components/checkout-payment-details-v2.hbs +2 -3
- package/src/components/injected-content.hbs +1 -1
- package/src/data/data_search-results_v2.json +56 -141
- package/src/elements/form-row.hbs +1 -1
- package/src/elements/input.hbs +2 -31
- package/src/js/components/banner-placement-manager.js +258 -0
- package/src/js/components/general/notification.js +1 -2
- package/src/js/components/toggle-password-visibility.js +58 -0
- package/src/js/emulation/banner-placement-manager.js +53 -0
- package/src/js/emulation/checkout-payment-details.js +14 -23
- package/src/js/emulation/forms.js +2 -7
- package/src/js/page/components/order-summary.js +25 -42
- package/src/js/page/plp-cards-v2.js +15 -6
- package/src/js/page/plp-load-more.js +1 -1
- package/src/js/page/utils/validation.js +1 -46
- package/src/layouts/checkout.hbs +5 -1
- package/src/page_my-account_change-password.html +0 -1
- package/src/page_payment-details-with-gift-card.html +4 -7
- package/src/page_plp_v2.html +16 -6
- package/src/page_search-results.html +12 -2
- package/src/scss/components/card-product-banner.scss +91 -3
- package/src/scss/components/checkout-payment-details-v2.scss +0 -2
- package/src/scss/pages/page_checkout_delivery-new.scss +0 -26
- package/src/scss/pages/page_products-list-combined.scss +11 -0
- package/src/scss/pages/page_products-list.scss +8 -0
- package/build/img/giftcard.svg +0 -28
- package/build/js/gift-cards.min.js +0 -1
- package/build/js/page/components/gift-cards.js +0 -877
- package/build/js/page/components/toggle-password-visibility.js +0 -22
- package/build/js/page/utils/gift-cards-utils.js +0 -144
- package/build/js/page/utils/input-handling.js +0 -92
- package/build/js/page/utils/show-hide-input.js +0 -28
- package/build/js/toggle-password-visibility.min.js +0 -1
- package/src/components/gift-cards-hint.hbs +0 -9
- package/src/components/gift-cards.hbs +0 -90
- package/src/components/giftcard-chip.hbs +0 -23
- package/src/components/giftcard-summary.hbs +0 -6
- package/src/img/giftcard.svg +0 -28
- package/src/js/components/product-banner.js +0 -148
- package/src/js/emulation/checkout-data.js +0 -35
- package/src/js/emulation/gift-cards.js +0 -201
- package/src/js/page/components/gift-cards.js +0 -877
- package/src/js/page/components/toggle-password-visibility.js +0 -22
- package/src/js/page/utils/gift-cards-utils.js +0 -144
- package/src/js/page/utils/input-handling.js +0 -92
- package/src/js/page/utils/show-hide-input.js +0 -28
- package/src/scss/components/_gift-cards.scss +0 -361
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { initializeInputToggle } from "../utils/show-hide-input";
|
|
2
|
-
|
|
3
|
-
var Wick = window.Wick || {};
|
|
4
|
-
|
|
5
|
-
Wick.TogglePasswordVisibility = {
|
|
6
|
-
el: {
|
|
7
|
-
$containers: $('.form-row[data-show-content] .input-wrap'),
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
init() {
|
|
11
|
-
if (!this.el.$containers.length) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
this.el.$containers.each(function () {
|
|
15
|
-
initializeInputToggle($(this));
|
|
16
|
-
});
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
$(document).ready(function () {
|
|
21
|
-
Wick.TogglePasswordVisibility.init();
|
|
22
|
-
});
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { showLoader, hideLoader } from "./loader";
|
|
2
|
-
|
|
3
|
-
const SUMMARY_SELECTORS = {
|
|
4
|
-
subTotal: { item: '.checkout-widget__item-bold', value: '.checkout-widget__item-value', title: 'Items subtotal:' },
|
|
5
|
-
vat: { item: '.checkout-widget__item-vat', value: '.checkout-widget__item-value', title: 'VAT:' },
|
|
6
|
-
clickAndCollectCost: { item: '.checkout-widget__item-cc', value: '.checkout-widget__item-value', title: 'Click & Collect:' },
|
|
7
|
-
deliveryCost: { item: '.checkout-widget__item-delivery', value: '.checkout-widget__item-value', title: 'Delivery:' },
|
|
8
|
-
charityPrice: { item: '.checkout-widget__item-charity', value: '.checkout-widget__item-value', title: 'Charity donation:' },
|
|
9
|
-
discountTotal: { item: '.checkout-widget__details-discount', value: '.checkout-widget__detail-value' },
|
|
10
|
-
giftCardApplied: { item: '.checkout-widget__gift-card', value: '.checkout-widget__item-value', title: 'Gift Card:' },
|
|
11
|
-
total: { item: '.checkout-widget__total', value: '.checkout-widget__total-value' },
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const CURRENCY_KEYS = new Set([
|
|
15
|
-
'subTotal','vat','clickAndCollectCost','deliveryCost',
|
|
16
|
-
'charityPrice','discountTotal','total','giftCardApplied'
|
|
17
|
-
]);
|
|
18
|
-
|
|
19
|
-
export const OK_CODE = 0;
|
|
20
|
-
|
|
21
|
-
export const ZERO_BALANCE_MESSAGE =
|
|
22
|
-
'Insufficient funds available, please try another Gift Card or alternate payment method.';
|
|
23
|
-
|
|
24
|
-
export const MESSAGE_BY_CODE = {
|
|
25
|
-
10: 'Gift Card number and / or PIN not recognised. A Gift Card will be locked following three unsuccessful PIN attempts.',
|
|
26
|
-
16: 'Card locked due to three unsuccessful PIN entries. For support click here.',
|
|
27
|
-
20: 'Unable to use Gift Card at this time, please try later or click here for support.',
|
|
28
|
-
40: 'Unable to use Gift Card at this time, please try later or click here for support.',
|
|
29
|
-
60: 'The entered Gift Card has expired. For support click here.',
|
|
30
|
-
89: 'Gift Card already added, please use a different card.',
|
|
31
|
-
99: 'The entered Gift Card is invalid. For support click here.',
|
|
32
|
-
[-1]: 'Gift Card is unavailable at this time, please try later. For support click here.',
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const PAY_MESSAGE_BY_CODE = {
|
|
36
|
-
101: 'Unable to use Gift Cards at this time, please try later or click here for support.',
|
|
37
|
-
102: 'Unfortunately there was a problem with requesting your card details from the payment provider. Available funds on your Gift Card are unchanged.',
|
|
38
|
-
103: 'Unfortunately there was a problem placing your order with Gift Card(s). Please click here for support.',
|
|
39
|
-
104: 'Unfortunately there was a problem placing your order with Gift Card(s). Please click here for support.',
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const ADD_GIFT_CARD = 'addGiftCard';
|
|
43
|
-
export const REMOVE_GIFT_CARD = 'removeGiftCard';
|
|
44
|
-
export const PAY_WITH_GIFT_CARD = 'payWithGiftCard';
|
|
45
|
-
|
|
46
|
-
export const FAQ_URL = 'https://www.wickes.co.uk/gifts';
|
|
47
|
-
|
|
48
|
-
export const escapeHtml = (s) => $('<div>').text(String(s || '')).html();
|
|
49
|
-
|
|
50
|
-
export const linkifyClickHere = (msg) =>
|
|
51
|
-
escapeHtml(msg).replace(
|
|
52
|
-
/\bclick here\b/gi,
|
|
53
|
-
`<a href="${FAQ_URL}" target="_blank" rel="noopener" class="notification_link">click here</a>`
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
export function formatGc16(raw) {
|
|
57
|
-
const digits = String(raw || '').replace(/\D/g, '').slice(0, 16);
|
|
58
|
-
return digits.replace(/(\d{4})(?=\d)/g, '$1-');
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function formatGBP(value) {
|
|
62
|
-
if (value === null || typeof value === 'undefined' || String(value).trim() === '') {
|
|
63
|
-
return value;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const cleanedValue = String(value).replace(/[^\d.-]/g, '');
|
|
67
|
-
const numberValue = Number(cleanedValue);
|
|
68
|
-
|
|
69
|
-
if (Number.isFinite(numberValue)) {
|
|
70
|
-
return `£${numberValue.toFixed(2)}`;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return value;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export function buildHintContext(count, limit) {
|
|
77
|
-
const max = count >= limit;
|
|
78
|
-
|
|
79
|
-
return {
|
|
80
|
-
canAdd: !max,
|
|
81
|
-
max,
|
|
82
|
-
hintClass: `giftcard-summary__hint${max ? ' giftcard-summary__hint--max' : ''}`,
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export function buildSummaryEqualMap(data) {
|
|
87
|
-
return Object.entries(SUMMARY_SELECTORS).map(([key, d]) => {
|
|
88
|
-
let dataValue = data[key];
|
|
89
|
-
|
|
90
|
-
if (CURRENCY_KEYS.has(key)) {
|
|
91
|
-
dataValue = formatGBP(dataValue);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return {
|
|
95
|
-
item: d.item,
|
|
96
|
-
itemValue: d.value,
|
|
97
|
-
dataValue: dataValue,
|
|
98
|
-
...(d.title ? { title: d.title } : {}),
|
|
99
|
-
};
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export function isZeroAmount(val) {
|
|
104
|
-
const cleaned = String(val ?? '').replace(/[^\d.]/g, '');
|
|
105
|
-
if (!cleaned) {
|
|
106
|
-
return false;
|
|
107
|
-
}
|
|
108
|
-
const num = Number(cleaned);
|
|
109
|
-
return Number.isFinite(num) && num === 0;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// --- API/Event-Dispatching Functions ---
|
|
113
|
-
|
|
114
|
-
export function verifyGiftCard($loader, giftCardNumber, pin) {
|
|
115
|
-
showLoader($loader);
|
|
116
|
-
return new Promise((resolve, reject) => {
|
|
117
|
-
const payload = { giftCardNumber, pin };
|
|
118
|
-
const detail = { resolve, reject, payload };
|
|
119
|
-
const evt = createEvent(ADD_GIFT_CARD, payload, detail);
|
|
120
|
-
window.dispatchEvent(evt);
|
|
121
|
-
}).finally(() => {
|
|
122
|
-
hideLoader($loader);
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export function removeGiftCard($loader, index) {
|
|
127
|
-
showLoader($loader);
|
|
128
|
-
return new Promise((resolve, reject) => {
|
|
129
|
-
const payload = { index };
|
|
130
|
-
const detail = { resolve, reject, payload };
|
|
131
|
-
const evt = createEvent(REMOVE_GIFT_CARD, payload, detail);
|
|
132
|
-
window.dispatchEvent(evt);
|
|
133
|
-
}).finally(() => {
|
|
134
|
-
hideLoader($loader);
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export function payWithGiftCard() {
|
|
139
|
-
return new Promise((resolve, reject) => {
|
|
140
|
-
const detail = { resolve, reject };
|
|
141
|
-
const evt = createEvent(PAY_WITH_GIFT_CARD, undefined, detail);
|
|
142
|
-
window.dispatchEvent(evt);
|
|
143
|
-
});
|
|
144
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import {formatGc16} from './gift-cards-utils';
|
|
2
|
-
import {clearErrorText, showErrorText} from './validation';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export function createGcNumberInputHandler({
|
|
6
|
-
fieldSelector,
|
|
7
|
-
fieldErrorClass,
|
|
8
|
-
errorTextSelector,
|
|
9
|
-
ariaInvalidAttr
|
|
10
|
-
}) {
|
|
11
|
-
return function handleGcNumberInput(e) {
|
|
12
|
-
const input = e.currentTarget;
|
|
13
|
-
const $input = $(input);
|
|
14
|
-
|
|
15
|
-
const canTrack = typeof input.selectionStart === 'number';
|
|
16
|
-
const atEnd = canTrack && input.selectionStart === input.value.length;
|
|
17
|
-
|
|
18
|
-
const hadErr = $input.closest(fieldSelector).hasClass(fieldErrorClass);
|
|
19
|
-
|
|
20
|
-
input.value = formatGc16(input.value);
|
|
21
|
-
|
|
22
|
-
if (hadErr) {
|
|
23
|
-
clearErrorText($input, fieldSelector, errorTextSelector, fieldErrorClass, ariaInvalidAttr);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (atEnd && typeof input.setSelectionRange === 'function') {
|
|
27
|
-
input.setSelectionRange(input.value.length, input.value.length);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function digitsOnlyKeypress(e) {
|
|
33
|
-
if (!/\d/.test(String.fromCharCode(e.which || e.keyCode))) {
|
|
34
|
-
e.preventDefault();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function handleGcNumberBlur(e, {
|
|
39
|
-
fieldSelector,
|
|
40
|
-
errorTextSelector,
|
|
41
|
-
errorClass,
|
|
42
|
-
ariaInvalidAttr,
|
|
43
|
-
numberMessage,
|
|
44
|
-
}) {
|
|
45
|
-
const $input = $(e.currentTarget);
|
|
46
|
-
const len = String($input.val() || '').replace(/\D/g, '').length;
|
|
47
|
-
|
|
48
|
-
clearErrorText($input, fieldSelector, errorTextSelector, errorClass, ariaInvalidAttr);
|
|
49
|
-
|
|
50
|
-
if (len < 16) {
|
|
51
|
-
showErrorText($input, numberMessage, fieldSelector, errorTextSelector, errorClass, ariaInvalidAttr);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function handleGcPinInput(e, {
|
|
56
|
-
fieldSelector,
|
|
57
|
-
errorTextSelector,
|
|
58
|
-
errorClass,
|
|
59
|
-
ariaInvalidAttr,
|
|
60
|
-
}) {
|
|
61
|
-
const input = e.currentTarget;
|
|
62
|
-
const $input = $(input);
|
|
63
|
-
|
|
64
|
-
const hadErr = $input.closest(fieldSelector).hasClass(errorClass);
|
|
65
|
-
input.value = String(input.value || '').replace(/\D/g, '').slice(0, 8);
|
|
66
|
-
|
|
67
|
-
if (hadErr) {
|
|
68
|
-
clearErrorText($input, fieldSelector, errorTextSelector, errorClass, ariaInvalidAttr);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
export function handleGcPinKeypress(e) {
|
|
74
|
-
if (!/\d/.test(String.fromCharCode(e.which || e.keyCode))) e.preventDefault();
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function handleGcPinBlur(e, {
|
|
78
|
-
fieldSelector,
|
|
79
|
-
errorTextSelector,
|
|
80
|
-
errorClass,
|
|
81
|
-
ariaInvalidAttr,
|
|
82
|
-
pinMessage,
|
|
83
|
-
}) {
|
|
84
|
-
const $input = $(e.currentTarget);
|
|
85
|
-
const length = String($input.val() || '').replace(/\D/g, '').length;
|
|
86
|
-
|
|
87
|
-
clearErrorText($input, fieldSelector, errorTextSelector, errorClass, ariaInvalidAttr);
|
|
88
|
-
|
|
89
|
-
if (length < 8) {
|
|
90
|
-
showErrorText($input, pinMessage, fieldSelector, errorTextSelector, errorClass, ariaInvalidAttr);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export function initializeInputToggle($container) {
|
|
2
|
-
const $input = $container.find('input');
|
|
3
|
-
const $toggle = $container.find('.toggle-show');
|
|
4
|
-
|
|
5
|
-
if (!$input.length || !$toggle.length) return;
|
|
6
|
-
|
|
7
|
-
const handleToggleClick = (e) => {
|
|
8
|
-
e.preventDefault();
|
|
9
|
-
|
|
10
|
-
const isPassword = String($input.attr('type')) === 'password';
|
|
11
|
-
$input.attr('type', isPassword ? 'text' : 'password');
|
|
12
|
-
const $icon = $toggle.find('svg, i').first();
|
|
13
|
-
|
|
14
|
-
if ($icon.length) {
|
|
15
|
-
$icon.removeClass('fa-eye fa-eye-slash').addClass(isPassword ? 'fa-eye' : 'fa-eye-slash');
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const updateToggleVisibility = () => {
|
|
20
|
-
$toggle.toggle(($input.val() || '').length > 0);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
$toggle.off('click.passwordToggle mousedown.passwordToggle')
|
|
24
|
-
.on('mousedown.passwordToggle', handleToggleClick);
|
|
25
|
-
|
|
26
|
-
$input.off('input.passwordToggle').on('input.passwordToggle', updateToggleVisibility);
|
|
27
|
-
updateToggleVisibility();
|
|
28
|
-
}
|
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
.giftcard-row {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
gap: 16px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.giftcard {
|
|
8
|
-
border: 1px solid $gray;
|
|
9
|
-
border-radius: 4px;
|
|
10
|
-
background: $white;
|
|
11
|
-
padding: 12px 16px;
|
|
12
|
-
width: 100%;
|
|
13
|
-
order: 3;
|
|
14
|
-
position: relative;
|
|
15
|
-
|
|
16
|
-
.giftcard__field {
|
|
17
|
-
.form-row {
|
|
18
|
-
margin-bottom: 0;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.giftcard-add {
|
|
24
|
-
display: inline-flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
gap: 8px;
|
|
27
|
-
color: $blue;
|
|
28
|
-
text-decoration: none;
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
|
|
31
|
-
&__icon {
|
|
32
|
-
width: 16px;
|
|
33
|
-
height: 16px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&__text {
|
|
37
|
-
font-size: .875rem;
|
|
38
|
-
line-height: 1.375rem;
|
|
39
|
-
font-weight: 500;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.giftcard-hint {
|
|
44
|
-
display: block;
|
|
45
|
-
color: $squant;
|
|
46
|
-
font-size: .875rem;
|
|
47
|
-
line-height: 1.375rem;
|
|
48
|
-
font-weight: 400;
|
|
49
|
-
margin-left: 32px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.giftcard-inline {
|
|
53
|
-
padding: 12px 8px;
|
|
54
|
-
|
|
55
|
-
&__header {
|
|
56
|
-
display: flex;
|
|
57
|
-
justify-content: space-between;
|
|
58
|
-
margin-bottom: 16px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&__title {
|
|
62
|
-
font-weight: 500;
|
|
63
|
-
font-size: 1.125rem;
|
|
64
|
-
line-height: 1.5rem;
|
|
65
|
-
white-space: nowrap;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&__balance {
|
|
69
|
-
color: $blue;
|
|
70
|
-
font-weight: 400;
|
|
71
|
-
font-size: .875rem;
|
|
72
|
-
line-height: 1.375rem;
|
|
73
|
-
text-decoration: underline;
|
|
74
|
-
white-space: nowrap;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&__close {
|
|
78
|
-
position: absolute;
|
|
79
|
-
width: 24px;
|
|
80
|
-
height: 24px;
|
|
81
|
-
top: 8px;
|
|
82
|
-
right: 8px;
|
|
83
|
-
cursor: pointer;
|
|
84
|
-
display: flex;
|
|
85
|
-
justify-content: center;
|
|
86
|
-
align-items: center;
|
|
87
|
-
color: $warm-grey;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
&__fields {
|
|
91
|
-
display: flex;
|
|
92
|
-
flex-direction: column;
|
|
93
|
-
gap: 24px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.notification {
|
|
97
|
-
margin-bottom: 16px;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.form-row__label {
|
|
102
|
-
margin-bottom: 8px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.giftcard__btn {
|
|
106
|
-
width: 100%;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.giftcard__field {
|
|
110
|
-
position: relative;
|
|
111
|
-
display: flex;
|
|
112
|
-
flex-direction: column;
|
|
113
|
-
padding-bottom: 18px;
|
|
114
|
-
min-width: 0;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.giftcard-inline .giftcard-inline__fields > .form-row.giftcard__field {
|
|
118
|
-
margin-bottom: 0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.giftcard-field--error .giftcard__input {
|
|
122
|
-
border-color: $red;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.giftcard__error-text {
|
|
126
|
-
font-weight: 400;
|
|
127
|
-
font-size: .75rem;
|
|
128
|
-
line-height: 1rem;
|
|
129
|
-
color: $red;
|
|
130
|
-
margin-top: 8px;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.giftcard .toggle-show svg {
|
|
134
|
-
pointer-events: none;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.form-row .toggle-show {
|
|
138
|
-
font-size: 1rem;
|
|
139
|
-
cursor: pointer;
|
|
140
|
-
position: absolute;
|
|
141
|
-
right: 8px;
|
|
142
|
-
top: 0;
|
|
143
|
-
height: 100%;
|
|
144
|
-
display: inline-flex;
|
|
145
|
-
align-items: center;
|
|
146
|
-
justify-content: center;
|
|
147
|
-
width: 24px;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.giftcard-applied {
|
|
151
|
-
width: 100%;
|
|
152
|
-
border: 1px solid $gray-light;
|
|
153
|
-
border-radius: 4px;
|
|
154
|
-
background: $white;
|
|
155
|
-
padding: 15px 16px;
|
|
156
|
-
order: 2;
|
|
157
|
-
|
|
158
|
-
&__inner {
|
|
159
|
-
display: flex;
|
|
160
|
-
align-items: center;
|
|
161
|
-
justify-content: center;
|
|
162
|
-
gap: 12px;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
&__icon {
|
|
166
|
-
display: inline-flex;
|
|
167
|
-
align-items: center;
|
|
168
|
-
justify-content: center;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.fa-check-circle {
|
|
172
|
-
text-align: center;
|
|
173
|
-
width: 100%;
|
|
174
|
-
color: $green;
|
|
175
|
-
font-size: 1rem;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
&__text {
|
|
179
|
-
margin: 0;
|
|
180
|
-
font-size: .875rem;
|
|
181
|
-
line-height: 1.5rem;
|
|
182
|
-
font-weight: 500;
|
|
183
|
-
word-break: break-word;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.giftcard-summary {
|
|
188
|
-
position: relative;
|
|
189
|
-
width: 100%;
|
|
190
|
-
|
|
191
|
-
&__hint {
|
|
192
|
-
margin-top: 16px;
|
|
193
|
-
margin-bottom: 0;
|
|
194
|
-
font-size: .875rem;
|
|
195
|
-
font-weight: 400;
|
|
196
|
-
line-height: 1.375rem;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
&__add {
|
|
200
|
-
text-decoration: underline;
|
|
201
|
-
cursor: pointer;
|
|
202
|
-
color: $blue;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.giftcard-chip-list {
|
|
207
|
-
display: flex;
|
|
208
|
-
flex-direction: column;
|
|
209
|
-
gap: 16px;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.giftcard-chip {
|
|
213
|
-
display: flex;
|
|
214
|
-
align-items: center;
|
|
215
|
-
width: 100%;
|
|
216
|
-
gap: 12px;
|
|
217
|
-
padding: 12px 16px;
|
|
218
|
-
border: 1px solid $gray;
|
|
219
|
-
border-radius: 4px;
|
|
220
|
-
background: $white;
|
|
221
|
-
min-height: 44px;
|
|
222
|
-
position: relative;
|
|
223
|
-
|
|
224
|
-
&__close {
|
|
225
|
-
position: absolute;
|
|
226
|
-
width: 24px;
|
|
227
|
-
height: 24px;
|
|
228
|
-
top: 8px;
|
|
229
|
-
right: 8px;
|
|
230
|
-
cursor: pointer;
|
|
231
|
-
display: flex;
|
|
232
|
-
justify-content: center;
|
|
233
|
-
align-items: center;
|
|
234
|
-
color: $warm-grey;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.giftcard-chip__icon {
|
|
239
|
-
width: 48px;
|
|
240
|
-
height: 30px;
|
|
241
|
-
display: inline-flex;
|
|
242
|
-
align-items: center;
|
|
243
|
-
justify-content: center;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.giftcard-chip__content {
|
|
247
|
-
flex: 1 1 auto;
|
|
248
|
-
min-width: 0;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.giftcard-chip__line {
|
|
252
|
-
display: block;
|
|
253
|
-
line-height: 1.25rem;
|
|
254
|
-
|
|
255
|
-
.giftcard-chip__applied {
|
|
256
|
-
font-size: .875rem;
|
|
257
|
-
font-weight: 400;
|
|
258
|
-
line-height: 1.5rem;
|
|
259
|
-
color: $gray-dark;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.giftcard-chip__number {
|
|
264
|
-
font-weight: 500;
|
|
265
|
-
line-height: 1.5rem;
|
|
266
|
-
font-size: 1rem;
|
|
267
|
-
color: $gray-dark;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.giftcard-chip__applied {
|
|
271
|
-
white-space: nowrap;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
@include media-breakpoint-up(sm) {
|
|
275
|
-
.giftcard-inline__fields {
|
|
276
|
-
display: flex;
|
|
277
|
-
flex-direction: row;
|
|
278
|
-
justify-content: space-between;
|
|
279
|
-
gap: 16px;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.giftcard-inline__fields > .form-row.giftcard__field--pin.giftcard__field--pin {
|
|
283
|
-
width: 116px;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.giftcard-inline__fields > .form-row.giftcard__field--number.giftcard__field--number {
|
|
287
|
-
width: 224px;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.giftcard__actions {
|
|
291
|
-
display: flex;
|
|
292
|
-
align-items: flex-end;
|
|
293
|
-
height: 72px;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.giftcard-summary {
|
|
297
|
-
&__hint {
|
|
298
|
-
width: 354px;
|
|
299
|
-
|
|
300
|
-
&--max {
|
|
301
|
-
width: 100%;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
@include media-breakpoint-up(md) {
|
|
308
|
-
.giftcard-inline__fields > .form-row.giftcard__field--pin.giftcard__field--pin {
|
|
309
|
-
width: 214px;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
.giftcard-inline__fields > .form-row.giftcard__field--number.giftcard__field--number {
|
|
313
|
-
width: 240px;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
.giftcard-inline__title {
|
|
318
|
-
font-weight: 700;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.giftcard-summary {
|
|
322
|
-
&__hint {
|
|
323
|
-
width: 100%;
|
|
324
|
-
|
|
325
|
-
&--max {
|
|
326
|
-
width: 460px;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
@include media-breakpoint-up(lg) {
|
|
333
|
-
.giftcard-inline__fields {
|
|
334
|
-
max-width: 470px;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.giftcard-summary {
|
|
338
|
-
&__hint {
|
|
339
|
-
width: 100%;
|
|
340
|
-
|
|
341
|
-
&--max {
|
|
342
|
-
width: 100%;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
@include media-breakpoint-up(xl) {
|
|
349
|
-
.giftcard-inline__fields {
|
|
350
|
-
max-width: 100%;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.giftcard__btn {
|
|
354
|
-
width: 140px;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.giftcard__field--number,
|
|
358
|
-
.giftcard__field--pin {
|
|
359
|
-
width: 100%;
|
|
360
|
-
}
|
|
361
|
-
}
|