@weareconceptstudio/account 0.2.5 → 0.2.7
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/dist/components/AccountButton/style.js +112 -41
- package/dist/components/AccountContainer/index.d.ts +9 -2
- package/dist/components/AccountContainer/index.js +3 -2
- package/dist/components/TotalCheckout/FreeShippingComp/index.d.ts +8 -0
- package/dist/components/TotalCheckout/FreeShippingComp/index.js +22 -0
- package/dist/components/TotalCheckout/FreeShippingComp/style.d.ts +2 -0
- package/dist/components/TotalCheckout/FreeShippingComp/style.js +101 -0
- package/dist/components/TotalCheckout/PromoCodeComp/index.d.ts +5 -0
- package/dist/components/TotalCheckout/PromoCodeComp/index.js +29 -0
- package/dist/components/TotalCheckout/PromoCodeComp/style.d.ts +2 -0
- package/dist/components/TotalCheckout/PromoCodeComp/style.js +127 -0
- package/dist/components/TotalCheckout/PromoCodeComp/utils.d.ts +10 -0
- package/dist/components/TotalCheckout/PromoCodeComp/utils.js +14 -0
- package/dist/components/TotalCheckout/index.js +10 -4
- package/dist/modules/account/AccountTemplate/style.js +8 -6
- package/dist/modules/auth/ForgotPasswordTemplate/index.js +62 -45
- package/dist/modules/auth/ForgotPasswordTemplate/style.js +17 -9
- package/dist/modules/auth/ResetPasswordTemplate/style.js +5 -3
- package/dist/modules/auth/SignInTemplate/style.js +10 -6
- package/dist/modules/auth/VerifyEmailAddressTemplate/style.js +5 -3
- package/dist/modules/cart/CartTemplate/index.js +2 -2
- package/dist/modules/cart/CartTemplate/style.js +7 -5
- package/dist/modules/cart/SimpleItems/Item/index.js +1 -1
- package/dist/modules/cart/SimpleItems/ItemMobile/index.js +1 -1
- package/dist/modules/cart/SimpleItems/style.js +43 -4
- package/dist/modules/checkout/CheckoutTemplate/index.js +2 -2
- package/dist/modules/order/OrderIndividualTemplate/index.js +2 -10
- package/dist/modules/order/OrderedItems/index.d.ts +2 -1
- package/dist/modules/order/OrderedItems/index.js +11 -5
- package/dist/modules/order/OrderedItems/style.js +55 -28
- package/dist/styles/helperClass.js +8 -0
- package/dist/styles/theme.js +1 -0
- package/dist/styles/variables.js +2 -0
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.js +3 -0
- package/dist/translations/hy.d.ts +3 -0
- package/dist/translations/hy.js +3 -0
- package/dist/translations/index.d.ts +9 -0
- package/dist/translations/ru.d.ts +3 -0
- package/dist/translations/ru.js +3 -0
- package/package.json +1 -1
|
@@ -4,12 +4,16 @@ const AccountButtonStyle = styled.div `
|
|
|
4
4
|
--account_btnPadLR: var(--sp8x);
|
|
5
5
|
--account_btnBorderRad: var(--sp1x);
|
|
6
6
|
|
|
7
|
-
//! Small icons wrap sizes
|
|
7
|
+
/* //! Small icons wrap sizes */
|
|
8
8
|
--account_wrapSize: var(--sp7x);
|
|
9
9
|
|
|
10
|
-
//! Small icons size
|
|
10
|
+
/* //! Small icons size */
|
|
11
11
|
--account_smallIconsSize: var(--sp2-5x);
|
|
12
12
|
|
|
13
|
+
/* //! Promo Code Version */
|
|
14
|
+
--account_promoCodeVersionPadTB: var(--sp2x);
|
|
15
|
+
--account_promoCodeVersionPadLR: var(--sp7x);
|
|
16
|
+
|
|
13
17
|
display: inline-flex;
|
|
14
18
|
|
|
15
19
|
button,
|
|
@@ -27,7 +31,8 @@ const AccountButtonStyle = styled.div `
|
|
|
27
31
|
border-radius: var(--account_btnBorderRad);
|
|
28
32
|
transition:
|
|
29
33
|
background-color var(--account_trTime) ease-out,
|
|
30
|
-
border var(--account_trTime) ease-out
|
|
34
|
+
border var(--account_trTime) ease-out,
|
|
35
|
+
color var(--account_trTime) ease-out;
|
|
31
36
|
display: inline-flex;
|
|
32
37
|
justify-content: center;
|
|
33
38
|
align-items: center;
|
|
@@ -35,10 +40,13 @@ const AccountButtonStyle = styled.div `
|
|
|
35
40
|
isolation: isolate;
|
|
36
41
|
-webkit-appearance: none;
|
|
37
42
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
/* //! Mouse Detect */
|
|
44
|
+
@media (pointer: fine) {
|
|
45
|
+
@media (hover: hover) {
|
|
46
|
+
&:hover {
|
|
47
|
+
background-color: var(--account_secondaryColor9);
|
|
48
|
+
border: 2px solid var(--account_secondaryColor9);
|
|
49
|
+
}
|
|
42
50
|
}
|
|
43
51
|
}
|
|
44
52
|
}
|
|
@@ -57,10 +65,12 @@ const AccountButtonStyle = styled.div `
|
|
|
57
65
|
border: 2px solid var(--account_primaryColor14);
|
|
58
66
|
color: var(--account_primaryColor14);
|
|
59
67
|
|
|
60
|
-
@media (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
68
|
+
@media (pointer: fine) {
|
|
69
|
+
@media (hover: hover) {
|
|
70
|
+
&:hover {
|
|
71
|
+
border: 2px solid var(--account_secondaryColor9);
|
|
72
|
+
color: var(--account_secondaryColor9);
|
|
73
|
+
}
|
|
64
74
|
}
|
|
65
75
|
}
|
|
66
76
|
}
|
|
@@ -79,9 +89,11 @@ const AccountButtonStyle = styled.div `
|
|
|
79
89
|
text-decoration: underline;
|
|
80
90
|
transition: color var(--account_trTime);
|
|
81
91
|
|
|
82
|
-
@media (
|
|
83
|
-
|
|
84
|
-
|
|
92
|
+
@media (pointer: fine) {
|
|
93
|
+
@media (hover: hover) {
|
|
94
|
+
&:hover {
|
|
95
|
+
color: var(--account_secondaryColor9);
|
|
96
|
+
}
|
|
85
97
|
}
|
|
86
98
|
}
|
|
87
99
|
}
|
|
@@ -101,9 +113,11 @@ const AccountButtonStyle = styled.div `
|
|
|
101
113
|
text-decoration: underline;
|
|
102
114
|
transition: color var(--account_trTime);
|
|
103
115
|
|
|
104
|
-
@media (
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
@media (pointer: fine) {
|
|
117
|
+
@media (hover: hover) {
|
|
118
|
+
&:hover {
|
|
119
|
+
color: var(--account_primaryColor1);
|
|
120
|
+
}
|
|
107
121
|
}
|
|
108
122
|
}
|
|
109
123
|
}
|
|
@@ -122,9 +136,11 @@ const AccountButtonStyle = styled.div `
|
|
|
122
136
|
text-decoration: underline;
|
|
123
137
|
transition: color var(--account_trTime);
|
|
124
138
|
|
|
125
|
-
@media (
|
|
126
|
-
|
|
127
|
-
|
|
139
|
+
@media (pointer: fine) {
|
|
140
|
+
@media (hover: hover) {
|
|
141
|
+
&:hover {
|
|
142
|
+
color: var(--account_primaryColor3);
|
|
143
|
+
}
|
|
128
144
|
}
|
|
129
145
|
}
|
|
130
146
|
}
|
|
@@ -149,14 +165,41 @@ const AccountButtonStyle = styled.div `
|
|
|
149
165
|
fill: var(--account_primaryColor1);
|
|
150
166
|
}
|
|
151
167
|
|
|
152
|
-
@media (
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
168
|
+
@media (pointer: fine) {
|
|
169
|
+
@media (hover: hover) {
|
|
170
|
+
&:hover {
|
|
171
|
+
color: unset;
|
|
172
|
+
background-color: var(--account_primaryColor1);
|
|
173
|
+
border: 2px solid var(--account_primaryColor1);
|
|
174
|
+
|
|
175
|
+
svg {
|
|
176
|
+
fill: var(--account_backgroundColor);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&.promo-code-version {
|
|
185
|
+
width: fit-content;
|
|
157
186
|
|
|
158
|
-
|
|
159
|
-
|
|
187
|
+
a,
|
|
188
|
+
button {
|
|
189
|
+
padding: var(--account_promoCodeVersionPadTB) var(--account_promoCodeVersionPadLR);
|
|
190
|
+
font-size: var(--account_p4);
|
|
191
|
+
font-weight: 500;
|
|
192
|
+
background-color: var(--account_backgroundColor);
|
|
193
|
+
border: 2px solid var(--account_primaryColor2);
|
|
194
|
+
color: var(--account_primaryColor2);
|
|
195
|
+
|
|
196
|
+
/* //! Mouse Detect */
|
|
197
|
+
@media (pointer: fine) {
|
|
198
|
+
@media (hover: hover) {
|
|
199
|
+
&:hover {
|
|
200
|
+
background-color: var(--account_primaryColor1);
|
|
201
|
+
border: 2px solid var(--account_primaryColor1);
|
|
202
|
+
color: var(--account_backgroundColor);
|
|
160
203
|
}
|
|
161
204
|
}
|
|
162
205
|
}
|
|
@@ -177,77 +220,105 @@ const AccountButtonStyle = styled.div `
|
|
|
177
220
|
--account_btnPadTB: var(--sp2x);
|
|
178
221
|
--account_btnPadLR: var(--sp7x);
|
|
179
222
|
|
|
180
|
-
//! Small icons wrap sizes
|
|
223
|
+
/* //! Small icons wrap sizes */
|
|
181
224
|
--account_wrapSize: var(--sp6x);
|
|
182
225
|
|
|
183
|
-
//! Small icons size
|
|
226
|
+
/* //! Small icons size */
|
|
184
227
|
--account_smallIconsSize: var(--sp2x);
|
|
228
|
+
|
|
229
|
+
/* //! Promo Code Version */
|
|
230
|
+
--account_promoCodeVersionPadTB: var(--sp2x);
|
|
231
|
+
--account_promoCodeVersionPadLR: var(--sp7x);
|
|
185
232
|
}
|
|
186
233
|
|
|
187
234
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
|
|
188
235
|
--account_btnPadTB: var(--sp1-5x);
|
|
189
236
|
--account_btnPadLR: var(--sp6x);
|
|
190
237
|
|
|
191
|
-
//! Small icons wrap sizes
|
|
238
|
+
/* //! Small icons wrap sizes */
|
|
192
239
|
--account_wrapSize: var(--sp5x);
|
|
193
240
|
|
|
194
|
-
//! Small icons size
|
|
241
|
+
/* //! Small icons size */
|
|
195
242
|
--account_smallIconsSize: var(--sp1-5x);
|
|
243
|
+
|
|
244
|
+
/* //! Promo Code Version */
|
|
245
|
+
--account_promoCodeVersionPadTB: var(--sp2x);
|
|
246
|
+
--account_promoCodeVersionPadLR: var(--sp4x);
|
|
196
247
|
}
|
|
197
248
|
|
|
198
249
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
|
|
199
250
|
--account_btnPadTB: var(--sp1-5x);
|
|
200
251
|
--account_btnPadLR: var(--sp6x);
|
|
201
252
|
|
|
202
|
-
//! Small icons wrap sizes
|
|
253
|
+
/* //! Small icons wrap sizes */
|
|
203
254
|
--account_wrapSize: var(--sp5x);
|
|
204
255
|
|
|
205
|
-
//! Small icons size
|
|
256
|
+
/* //! Small icons size */
|
|
206
257
|
--account_smallIconsSize: var(--sp1-5x);
|
|
258
|
+
|
|
259
|
+
/* //! Promo Code Version */
|
|
260
|
+
--account_promoCodeVersionPadTB: var(--sp2x);
|
|
261
|
+
--account_promoCodeVersionPadLR: var(--sp4x);
|
|
207
262
|
}
|
|
208
263
|
|
|
209
264
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
|
|
210
265
|
--account_btnPadTB: var(--sp1-5x);
|
|
211
266
|
--account_btnPadLR: var(--sp6x);
|
|
212
267
|
|
|
213
|
-
//! Small icons wrap sizes
|
|
268
|
+
/* //! Small icons wrap sizes */
|
|
214
269
|
--account_wrapSize: var(--sp5x);
|
|
215
270
|
|
|
216
|
-
//! Small icons size
|
|
271
|
+
/* //! Small icons size */
|
|
217
272
|
--account_smallIconsSize: var(--sp1-5x);
|
|
273
|
+
|
|
274
|
+
/* //! Promo Code Version */
|
|
275
|
+
--account_promoCodeVersionPadTB: var(--sp2x);
|
|
276
|
+
--account_promoCodeVersionPadLR: var(--sp4x);
|
|
218
277
|
}
|
|
219
278
|
|
|
220
279
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
|
|
221
280
|
--account_btnPadTB: var(--sp1x);
|
|
222
281
|
--account_btnPadLR: var(--sp5x);
|
|
223
282
|
|
|
224
|
-
//! Small icons wrap sizes
|
|
283
|
+
/* //! Small icons wrap sizes */
|
|
225
284
|
--account_wrapSize: var(--sp5x);
|
|
226
285
|
|
|
227
|
-
//! Small icons size
|
|
286
|
+
/* //! Small icons size */
|
|
228
287
|
--account_smallIconsSize: var(--sp1-5x);
|
|
288
|
+
|
|
289
|
+
/* //! Promo Code Version */
|
|
290
|
+
--account_promoCodeVersionPadTB: var(--sp2x);
|
|
291
|
+
--account_promoCodeVersionPadLR: var(--sp4x);
|
|
229
292
|
}
|
|
230
293
|
|
|
231
294
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
|
|
232
295
|
--account_btnPadTB: var(--sp1-5x);
|
|
233
296
|
--account_btnPadLR: var(--sp5x);
|
|
234
297
|
|
|
235
|
-
//! Small icons wrap sizes
|
|
298
|
+
/* //! Small icons wrap sizes */
|
|
236
299
|
--account_wrapSize: var(--sp5x);
|
|
237
300
|
|
|
238
|
-
//! Small icons size
|
|
301
|
+
/* //! Small icons size */
|
|
239
302
|
--account_smallIconsSize: var(--sp1-5x);
|
|
303
|
+
|
|
304
|
+
/* //! Promo Code Version */
|
|
305
|
+
--account_promoCodeVersionPadTB: var(--sp2x);
|
|
306
|
+
--account_promoCodeVersionPadLR: var(--sp4x);
|
|
240
307
|
}
|
|
241
308
|
|
|
242
309
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
243
310
|
--account_btnPadTB: var(--sp1-5x);
|
|
244
311
|
--account_btnPadLR: var(--sp3x);
|
|
245
312
|
|
|
246
|
-
//! Small icons wrap sizes
|
|
313
|
+
/* //! Small icons wrap sizes */
|
|
247
314
|
--account_wrapSize: var(--sp4x);
|
|
248
315
|
|
|
249
|
-
//! Small icons size
|
|
316
|
+
/* //! Small icons size */
|
|
250
317
|
--account_smallIconsSize: var(--sp1-5x);
|
|
318
|
+
|
|
319
|
+
/* //! Promo Code Version */
|
|
320
|
+
--account_promoCodeVersionPadTB: var(--sp2x);
|
|
321
|
+
--account_promoCodeVersionPadLR: var(--sp4x);
|
|
251
322
|
}
|
|
252
323
|
`;
|
|
253
324
|
export default AccountButtonStyle;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
export default AccountContainer;
|
|
2
|
-
declare const AccountContainer: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
3
1
|
import React from 'react';
|
|
2
|
+
type AccountContainerProps = {
|
|
3
|
+
row?: boolean;
|
|
4
|
+
isSection?: boolean;
|
|
5
|
+
full?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
declare const AccountContainer: React.ForwardRefExoticComponent<AccountContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default AccountContainer;
|
|
@@ -3,14 +3,15 @@ import React, { useRef, useImperativeHandle, forwardRef } from 'react';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
//* Style
|
|
5
5
|
import AccountContainerStyle from './style';
|
|
6
|
-
const AccountContainer = forwardRef((
|
|
6
|
+
const AccountContainer = forwardRef((props, ref) => {
|
|
7
|
+
const { row, isSection, full, className, children } = props;
|
|
7
8
|
//! Ref
|
|
8
9
|
const contRef = useRef(null);
|
|
9
10
|
//! Imperative Handle
|
|
10
11
|
useImperativeHandle(ref, () => contRef.current, []);
|
|
11
12
|
//! ClassName
|
|
12
13
|
const classString = classNames('container', {
|
|
13
|
-
[className]: className,
|
|
14
|
+
[className || '']: !!className,
|
|
14
15
|
['section']: isSection,
|
|
15
16
|
['full']: full,
|
|
16
17
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default FreeShippingComp;
|
|
2
|
+
declare function FreeShippingComp({ fakeShippingCost, freeShippingRange, shippingCost, currency }: {
|
|
3
|
+
fakeShippingCost: any;
|
|
4
|
+
freeShippingRange: any;
|
|
5
|
+
shippingCost: any;
|
|
6
|
+
currency?: string;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
import React from 'react';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTranslation } from '@weareconceptstudio/core';
|
|
3
|
+
import { handlePriceCheckFunc } from '../../../utils/_functions';
|
|
4
|
+
//* Style
|
|
5
|
+
import FreeShippingCompStyle from './style';
|
|
6
|
+
const FreeShippingComp = ({ fakeShippingCost, freeShippingRange, shippingCost, currency = 'AMD' }) => {
|
|
7
|
+
const { translate } = useTranslation();
|
|
8
|
+
return freeShippingRange ? (React.createElement(FreeShippingCompStyle, null,
|
|
9
|
+
React.createElement("svg", { fill: 'none', viewBox: '0 0 24 24', xmlns: 'http://www.w3.org/2000/svg', className: 'free-shipping-comp-icon' },
|
|
10
|
+
React.createElement("path", { d: 'M21.675 14.475V9.9L17.925 6.15H15.375V4.125H2.85C2.325 4.725 2.025 5.025 1.5 5.55V16.65H3.3C3.3 18.375 4.725 19.8 6.45 19.8C8.175 19.8 9.6 18.375 9.6 16.65H13.35C13.35 18.375 14.775 19.8 16.5 19.8C18.225 19.8 19.65 18.375 19.65 16.65H22.35V14.475H21.675ZM6.45 18.6C5.475 18.6 4.65 17.775 4.65 16.8C4.65 15.825 5.475 15 6.45 15C7.425 15 8.25 15.825 8.25 16.8C8.25 17.775 7.5 18.6 6.45 18.6ZM16.575 18.6C15.6 18.6 14.775 17.775 14.775 16.8C14.775 15.825 15.6 15 16.575 15C17.55 15 18.375 15.825 18.375 16.8C18.375 17.775 17.625 18.6 16.575 18.6ZM19.575 11.1H15.375V7.95H17.025L19.575 10.5V11.1Z' })),
|
|
11
|
+
React.createElement("span", { className: 'free-shipping-comp-attr' },
|
|
12
|
+
React.createElement("span", null, translate('freeShippingText1')),
|
|
13
|
+
React.createElement("span", { className: 'range-value' }, handlePriceCheckFunc(freeShippingRange, currency)),
|
|
14
|
+
React.createElement("span", null, translate('freeShippingText2'))))) : typeof shippingCost != 'number' ? (React.createElement(FreeShippingCompStyle, null,
|
|
15
|
+
React.createElement("svg", { fill: 'none', viewBox: '0 0 16 16', xmlns: 'http://www.w3.org/2000/svg', className: 'free-shipping-comp-icon' },
|
|
16
|
+
React.createElement("path", { d: 'M13.901 5.06321C13.835 5.1324 13.754 5.167 13.658 5.167C13.562 5.167 13.481 5.1324 13.415 5.06321L13.388 5.03491C13.2081 4.84621 12.9981 4.74871 12.7611 4.74242C12.5241 4.73613 12.3111 4.83363 12.1191 5.03491L8.90036 8.40947C8.83437 8.47866 8.75337 8.51326 8.65738 8.51326C8.56139 8.51326 8.48039 8.47866 8.4144 8.40947C8.3484 8.34028 8.3154 8.25537 8.3154 8.15473C8.3154 8.05409 8.3484 7.96917 8.4144 7.89998L11.5912 4.56945C11.8941 4.25181 12.2811 4.08827 12.7461 4.08512C13.2111 4.07883 13.595 4.23608 13.901 4.55687C13.967 4.62606 14 4.71097 14 4.81161C14 4.91225 13.967 4.99717 13.901 5.06636V5.06321ZM6.17655 3.19509C6.24255 3.1259 6.32354 3.09131 6.41954 3.09131C6.51553 3.09131 6.59652 3.1259 6.66252 3.19509L6.79151 3.33033C7.12449 3.67942 7.28648 4.11343 7.28348 4.63864C7.27748 5.16071 7.10949 5.59786 6.77651 5.94695L6.63552 6.09477C6.56953 6.16396 6.48853 6.19855 6.39254 6.19855C6.29655 6.19855 6.21555 6.16396 6.14956 6.09477C6.08356 6.02558 6.05056 5.94066 6.05056 5.84002C6.05056 5.73938 6.08356 5.65447 6.14956 5.58528L6.33554 5.39029C6.55453 5.16071 6.65652 4.89967 6.64152 4.60719C6.62652 4.31471 6.52453 4.06625 6.33554 3.86812L6.17955 3.70458C6.11356 3.63539 6.08056 3.55048 6.08056 3.44984C6.08056 3.3492 6.11356 3.26428 6.17955 3.19509H6.17655ZM8.58538 2.10378C8.65138 2.03459 8.73237 2 8.82837 2C8.92436 2 9.00535 2.03459 9.07135 2.10378L9.7253 2.78939C10.0193 3.10703 10.1723 3.50959 10.1813 3.99077C10.1903 4.4751 10.0433 4.87451 9.7403 5.19216L7.78744 7.23954C7.72145 7.30873 7.64045 7.34332 7.54446 7.34332C7.44846 7.34332 7.36747 7.30873 7.30147 7.23954C7.23548 7.17035 7.20248 7.08543 7.20248 6.9848C7.20248 6.88416 7.23548 6.79924 7.30147 6.73005L9.22434 4.71412C9.40433 4.52542 9.49132 4.28326 9.48832 3.99077C9.48232 3.69829 9.39233 3.45613 9.20934 3.26743L8.58238 2.61013C8.51639 2.54094 8.48339 2.45602 8.48339 2.35538C8.48339 2.25474 8.51639 2.16983 8.58238 2.10064L8.58538 2.10378ZM12.8601 9.64859C12.7941 9.71778 12.7131 9.75238 12.6171 9.75238C12.5211 9.75238 12.4401 9.71778 12.3741 9.64859L11.8761 9.12653C11.6572 8.89694 11.4292 8.78372 11.1922 8.78372C10.9552 8.78372 10.7272 8.89694 10.5082 9.12653L10.0373 9.62029C9.97129 9.68948 9.89029 9.72407 9.7943 9.72407C9.6983 9.72407 9.61731 9.68948 9.55131 9.62029C9.48532 9.5511 9.45232 9.46619 9.45232 9.36555C9.45232 9.26491 9.48532 9.17999 9.55131 9.1108L9.97728 8.66422C10.3103 8.31512 10.7092 8.13586 11.1742 8.12642C11.6392 8.11699 12.0381 8.28682 12.3711 8.63277L12.8541 9.13911C12.9201 9.2083 12.9531 9.29321 12.9531 9.39385C12.9531 9.49449 12.9201 9.5794 12.8541 9.64859H12.8601ZM2.36082 13.9855L9.01435 11.501C9.20034 11.4318 9.25434 11.1802 9.11335 11.0355L4.81765 6.6074C4.67666 6.46273 4.44268 6.51934 4.37668 6.71433L2.01585 13.6239C1.94085 13.8471 2.14484 14.0641 2.35783 13.9824L2.36082 13.9855Z' })),
|
|
17
|
+
React.createElement("span", { className: 'free-shipping-comp-attr' },
|
|
18
|
+
React.createElement("span", null, translate('youHaveReachedFreeShipping1')),
|
|
19
|
+
React.createElement("span", { className: 'range-value' }, handlePriceCheckFunc(fakeShippingCost, currency)),
|
|
20
|
+
React.createElement("span", null, translate('youHaveReachedFreeShipping2'))))) : null;
|
|
21
|
+
};
|
|
22
|
+
export default FreeShippingComp;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export default FreeShippingCompStyle;
|
|
2
|
+
declare const FreeShippingCompStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
const FreeShippingCompStyle = styled.div `
|
|
3
|
+
--account_freeShippingBlockDistance: var(--sp5x);
|
|
4
|
+
--account_freeShippingBlockPadTB: var(--sp2-5x);
|
|
5
|
+
--account_freeShippingBlockPadLR: var(--sp2-5x);
|
|
6
|
+
--account_freeShippingIconSize: var(--sp3x);
|
|
7
|
+
--account_freeShippingAttrGap: var(--sp1-5x);
|
|
8
|
+
|
|
9
|
+
display: flex;
|
|
10
|
+
gap: var(--account_freeShippingAttrGap);
|
|
11
|
+
|
|
12
|
+
margin: var(--account_freeShippingBlockDistance) 0;
|
|
13
|
+
margin-bottom: calc(var(--account_freeShippingBlockDistance) - var(--sp2x));
|
|
14
|
+
background-color: var(--account_surfaceColor);
|
|
15
|
+
padding: var(--account_freeShippingBlockPadTB) var(--account_freeShippingBlockPadLR);
|
|
16
|
+
border-radius: var(--sp1x);
|
|
17
|
+
|
|
18
|
+
.free-shipping-comp-icon {
|
|
19
|
+
max-width: var(--account_freeShippingIconSize);
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: var(--account_freeShippingIconSize);
|
|
22
|
+
fill: var(--account_primaryColor3);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.free-shipping-comp-attr {
|
|
26
|
+
color: var(--account_primaryColor2);
|
|
27
|
+
font-family: var(--account_Font);
|
|
28
|
+
font-size: var(--account_p4);
|
|
29
|
+
line-height: var(--account_lineHeight);
|
|
30
|
+
font-weight: 400;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.range-value {
|
|
34
|
+
font-weight: 700;
|
|
35
|
+
margin: 0 var(--sp0-5x);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* //! 1920 */
|
|
39
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
|
|
40
|
+
--account_freeShippingBlockDistance: var(--sp3-5x);
|
|
41
|
+
--account_freeShippingBlockPadTB: var(--sp2x);
|
|
42
|
+
--account_freeShippingBlockPadLR: var(--sp2x);
|
|
43
|
+
--account_freeShippingIconSize: var(--sp3x);
|
|
44
|
+
--account_freeShippingAttrGap: var(--sp1x);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* //! 1510 */
|
|
48
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
|
|
49
|
+
--account_freeShippingBlockDistance: var(--sp4x);
|
|
50
|
+
--account_freeShippingBlockPadTB: var(--sp2x);
|
|
51
|
+
--account_freeShippingBlockPadLR: var(--sp2x);
|
|
52
|
+
--account_freeShippingIconSize: var(--sp2-5x);
|
|
53
|
+
--account_freeShippingAttrGap: var(--sp1x);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* //! 1440 */
|
|
57
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
|
|
58
|
+
--account_freeShippingBlockDistance: var(--sp3x);
|
|
59
|
+
--account_freeShippingBlockPadTB: var(--sp2x);
|
|
60
|
+
--account_freeShippingBlockPadLR: var(--sp2x);
|
|
61
|
+
--account_freeShippingIconSize: var(--sp2-5x);
|
|
62
|
+
--account_freeShippingAttrGap: var(--sp1x);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* //! 1280 */
|
|
66
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
|
|
67
|
+
--account_freeShippingBlockDistance: var(--sp3x);
|
|
68
|
+
--account_freeShippingBlockPadTB: var(--sp2x);
|
|
69
|
+
--account_freeShippingBlockPadLR: var(--sp2x);
|
|
70
|
+
--account_freeShippingIconSize: var(--sp2-5x);
|
|
71
|
+
--account_freeShippingAttrGap: var(--sp1x);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* //! 1024 */
|
|
75
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
|
|
76
|
+
--account_freeShippingBlockDistance: var(--sp3x);
|
|
77
|
+
--account_freeShippingBlockPadTB: var(--sp2x);
|
|
78
|
+
--account_freeShippingBlockPadLR: var(--sp2x);
|
|
79
|
+
--account_freeShippingIconSize: var(--sp2-5x);
|
|
80
|
+
--account_freeShippingAttrGap: var(--sp1x);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* //! 768 */
|
|
84
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
|
|
85
|
+
--account_freeShippingBlockDistance: var(--sp3x);
|
|
86
|
+
--account_freeShippingBlockPadTB: var(--sp2x);
|
|
87
|
+
--account_freeShippingBlockPadLR: var(--sp2x);
|
|
88
|
+
--account_freeShippingIconSize: var(--sp2-5x);
|
|
89
|
+
--account_freeShippingAttrGap: var(--sp1x);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* //! Mobile */
|
|
93
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
94
|
+
--account_freeShippingBlockDistance: var(--sp3x);
|
|
95
|
+
--account_freeShippingBlockPadTB: var(--sp2x);
|
|
96
|
+
--account_freeShippingBlockPadLR: var(--sp2x);
|
|
97
|
+
--account_freeShippingIconSize: var(--sp2-5x);
|
|
98
|
+
--account_freeShippingAttrGap: var(--sp1x);
|
|
99
|
+
}
|
|
100
|
+
`;
|
|
101
|
+
export default FreeShippingCompStyle;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Text } from '@weareconceptstudio/core';
|
|
3
|
+
import { FormBuilder } from '@weareconceptstudio/form';
|
|
4
|
+
import AccountButton from '../../AccountButton';
|
|
5
|
+
import { promoCodeFields } from './utils';
|
|
6
|
+
//* Style
|
|
7
|
+
import PromoCodeCompStyle from './style';
|
|
8
|
+
// TODO: Fake Promo Text
|
|
9
|
+
const fakePromoText = '10% of first order';
|
|
10
|
+
const PromoCodeComp = ({ isPromoCode = true }) => {
|
|
11
|
+
//! States
|
|
12
|
+
const [show, setShow] = useState(true);
|
|
13
|
+
const [couponCode, setCouponCode] = useState(false);
|
|
14
|
+
//! On Finish
|
|
15
|
+
const onFinish = () => {
|
|
16
|
+
setCouponCode(true);
|
|
17
|
+
};
|
|
18
|
+
return isPromoCode ? (React.createElement(PromoCodeCompStyle, null, show ? (React.createElement(Text, { className: 'account-p account-p4 account-primary-color1 account-font-medium promo-code-text', text: 'gotPromotionCode', onClick: () => {
|
|
19
|
+
setShow(false);
|
|
20
|
+
} })) : couponCode ? (React.createElement("div", { className: `promo-code-success-block` },
|
|
21
|
+
React.createElement(Text, { className: 'account-p account-p4 account-primary-color2 account-font-medium promo-code-success-text' }, fakePromoText),
|
|
22
|
+
React.createElement(Text, { text: 'remove', className: 'account-p account-p4 account-primary-color2 account-font-medium promo-code-remove-text', onClick: () => {
|
|
23
|
+
setCouponCode(false);
|
|
24
|
+
} }))) : (React.createElement(FormBuilder, { onSubmit: onFinish, fields: promoCodeFields, className: `promo-code-block`, formOptions: {
|
|
25
|
+
className: 'promo-code-container',
|
|
26
|
+
} },
|
|
27
|
+
React.createElement(AccountButton, { text: `add`, type: 'submit', btnType: `promo-code-version` }))))) : null;
|
|
28
|
+
};
|
|
29
|
+
export default PromoCodeComp;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export default PromoCodeCompStyle;
|
|
2
|
+
declare const PromoCodeCompStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
const PromoCodeCompStyle = styled.div `
|
|
3
|
+
--account_promoCodeCompDistance: var(--sp5x);
|
|
4
|
+
|
|
5
|
+
--account_promoCodeInputPadTB: var(--sp2x);
|
|
6
|
+
--account_promoCodeInputPadLR: var(--sp2x);
|
|
7
|
+
--account_promoCodeContainerGap: var(--sp2x);
|
|
8
|
+
|
|
9
|
+
margin-top: var(--account_promoCodeCompDistance);
|
|
10
|
+
margin-bottom: calc(var(--account_promoCodeCompDistance) - var(--sp2x));
|
|
11
|
+
|
|
12
|
+
.promo-code-container {
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
gap: var(--account_promoCodeContainerGap);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.promo-code-version {
|
|
19
|
+
width: fit-content !important;
|
|
20
|
+
height: fit-content !important;
|
|
21
|
+
margin-top: unset !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.promo-code-block {
|
|
25
|
+
flex: 1;
|
|
26
|
+
|
|
27
|
+
.base-input {
|
|
28
|
+
padding: var(--account_promoCodeInputPadTB) var(--account_promoCodeInputPadLR) !important;
|
|
29
|
+
border: 2px solid var(--account_primaryColor2) !important;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.promo-code-text {
|
|
34
|
+
width: fit-content;
|
|
35
|
+
transition: color var(--account_trTime) ease-out;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
|
|
38
|
+
/* //! Mouse Detect */
|
|
39
|
+
@media (pointer: fine) {
|
|
40
|
+
@media (hover: hover) {
|
|
41
|
+
&:hover {
|
|
42
|
+
color: var(--account_primaryColor3);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.promo-code-success-block {
|
|
49
|
+
display: flex;
|
|
50
|
+
gap: var(--account_promoCodeContainerGap);
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
padding: var(--account_promoCodeInputPadTB) var(--account_promoCodeInputPadLR);
|
|
53
|
+
border-radius: var(--sp1x);
|
|
54
|
+
border: 2px solid var(--account_surfaceColor);
|
|
55
|
+
background-color: var(--account_surfaceColor);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.promo-code-remove-text {
|
|
59
|
+
text-decoration-line: underline;
|
|
60
|
+
text-decoration-style: solid;
|
|
61
|
+
text-decoration-skip-ink: none;
|
|
62
|
+
text-decoration-thickness: auto;
|
|
63
|
+
text-underline-offset: auto;
|
|
64
|
+
text-underline-position: from-font;
|
|
65
|
+
transition: color var(--account_trTime) ease-out;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
|
|
68
|
+
/* //! Mouse Detect */
|
|
69
|
+
@media (pointer: fine) {
|
|
70
|
+
@media (hover: hover) {
|
|
71
|
+
&:hover {
|
|
72
|
+
color: var(--account_primaryColor3);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* //! 1920 */
|
|
79
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
|
|
80
|
+
--account_promoCodeCompDistance: var(--sp3-5x);
|
|
81
|
+
|
|
82
|
+
--account_promoCodeContainerGap: var(--sp2x);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* //! 1510 */
|
|
86
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
|
|
87
|
+
--account_promoCodeCompDistance: var(--sp4x);
|
|
88
|
+
|
|
89
|
+
--account_promoCodeContainerGap: var(--sp2x);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* //! 1440 */
|
|
93
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
|
|
94
|
+
--account_promoCodeCompDistance: var(--sp3x);
|
|
95
|
+
|
|
96
|
+
--account_promoCodeContainerGap: var(--sp2x);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* //! 1280 */
|
|
100
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
|
|
101
|
+
--account_promoCodeCompDistance: var(--sp3x);
|
|
102
|
+
|
|
103
|
+
--account_promoCodeContainerGap: var(--sp1x);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* //! 1024 */
|
|
107
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
|
|
108
|
+
--account_promoCodeCompDistance: var(--sp3x);
|
|
109
|
+
|
|
110
|
+
--account_promoCodeContainerGap: var(--sp1x);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* //! 768 */
|
|
114
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
|
|
115
|
+
--account_promoCodeCompDistance: var(--sp3x);
|
|
116
|
+
|
|
117
|
+
--account_promoCodeContainerGap: var(--sp1x);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* //! Mobile */
|
|
121
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
122
|
+
--account_promoCodeCompDistance: var(--sp3x);
|
|
123
|
+
|
|
124
|
+
--account_promoCodeContainerGap: var(--sp1x);
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
127
|
+
export default PromoCodeCompStyle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const promoCodeFields = [
|
|
2
|
+
{
|
|
3
|
+
fieldType: 'input',
|
|
4
|
+
labelProps: {
|
|
5
|
+
// label: 'promoCodeLabel',
|
|
6
|
+
name: 'promo_code',
|
|
7
|
+
// required: false,
|
|
8
|
+
errorKey: 'promoCode',
|
|
9
|
+
},
|
|
10
|
+
fieldProps: {
|
|
11
|
+
placeholder: 'promoCodePlaceholder',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
];
|