@weareconceptstudio/account 0.2.6 → 0.2.8

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 (70) hide show
  1. package/dist/components/AccountButton/style.js +112 -41
  2. package/dist/components/AccountContainer/index.d.ts +9 -2
  3. package/dist/components/AccountContainer/index.js +3 -2
  4. package/dist/components/TotalCheckout/FreeShippingComp/index.d.ts +8 -0
  5. package/dist/components/TotalCheckout/FreeShippingComp/index.js +23 -0
  6. package/dist/components/TotalCheckout/FreeShippingComp/style.d.ts +2 -0
  7. package/dist/components/TotalCheckout/FreeShippingComp/style.js +101 -0
  8. package/dist/components/TotalCheckout/PromoCodeComp/index.d.ts +5 -0
  9. package/dist/components/TotalCheckout/PromoCodeComp/index.js +29 -0
  10. package/dist/components/TotalCheckout/PromoCodeComp/style.d.ts +2 -0
  11. package/dist/components/TotalCheckout/PromoCodeComp/style.js +127 -0
  12. package/dist/components/TotalCheckout/PromoCodeComp/utils.d.ts +10 -0
  13. package/dist/components/TotalCheckout/PromoCodeComp/utils.js +14 -0
  14. package/dist/components/TotalCheckout/index.js +10 -4
  15. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/index.d.ts +12 -0
  16. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/index.js +45 -0
  17. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/style.d.ts +2 -0
  18. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/style.js +54 -0
  19. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/index.d.ts +9 -0
  20. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/index.js +27 -0
  21. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/style.d.ts +2 -0
  22. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/style.js +83 -0
  23. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/index.d.ts +13 -0
  24. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/index.js +35 -0
  25. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/style.d.ts +2 -0
  26. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/style.js +118 -0
  27. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/index.d.ts +8 -0
  28. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/index.js +42 -0
  29. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/style.d.ts +2 -0
  30. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/style.js +144 -0
  31. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/index.d.ts +3 -0
  32. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/index.js +42 -0
  33. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/style.d.ts +2 -0
  34. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/style.js +90 -0
  35. package/dist/modules/account/AccountBalanceTemplate/StatusBalance/ItemStatus/index.d.ts +8 -0
  36. package/dist/modules/account/AccountBalanceTemplate/StatusBalance/ItemStatus/index.js +23 -0
  37. package/dist/modules/account/AccountBalanceTemplate/StatusBalance/index.d.ts +6 -0
  38. package/dist/modules/account/AccountBalanceTemplate/StatusBalance/index.js +77 -0
  39. package/dist/modules/account/AccountBalanceTemplate/StatusBalance/style.d.ts +2 -0
  40. package/dist/modules/account/AccountBalanceTemplate/StatusBalance/style.js +234 -0
  41. package/dist/modules/account/AccountBalanceTemplate/index.d.ts +7 -0
  42. package/dist/modules/account/AccountBalanceTemplate/index.js +31 -0
  43. package/dist/modules/account/AccountBalanceTemplate/style.d.ts +2 -0
  44. package/dist/modules/account/AccountBalanceTemplate/style.js +31 -0
  45. package/dist/modules/account/AccountTemplate/style.js +7 -5
  46. package/dist/modules/account/index.d.ts +1 -0
  47. package/dist/modules/account/index.js +1 -0
  48. package/dist/modules/auth/ForgotPasswordTemplate/index.js +62 -45
  49. package/dist/modules/auth/ForgotPasswordTemplate/style.js +17 -9
  50. package/dist/modules/auth/ResetPasswordTemplate/style.js +5 -3
  51. package/dist/modules/auth/SignInTemplate/style.js +10 -6
  52. package/dist/modules/auth/VerifyEmailAddressTemplate/style.js +5 -3
  53. package/dist/modules/cart/CartTemplate/index.js +2 -2
  54. package/dist/modules/cart/CartTemplate/style.js +7 -5
  55. package/dist/modules/cart/SimpleItems/Item/index.js +1 -1
  56. package/dist/modules/cart/SimpleItems/ItemMobile/index.js +1 -1
  57. package/dist/modules/cart/SimpleItems/style.js +36 -4
  58. package/dist/modules/checkout/CheckoutTemplate/index.js +2 -2
  59. package/dist/modules/order/OrderedItems/style.js +40 -28
  60. package/dist/styles/helperClass.js +8 -0
  61. package/dist/styles/theme.js +4 -0
  62. package/dist/styles/variables.js +5 -0
  63. package/dist/translations/en.d.ts +18 -0
  64. package/dist/translations/en.js +20 -0
  65. package/dist/translations/hy.d.ts +18 -0
  66. package/dist/translations/hy.js +20 -0
  67. package/dist/translations/index.d.ts +54 -0
  68. package/dist/translations/ru.d.ts +18 -0
  69. package/dist/translations/ru.js +20 -0
  70. package/package.json +1 -1
@@ -0,0 +1,31 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { api, useTranslation } from '@weareconceptstudio/core';
3
+ //* Style
4
+ import AccountBalanceTemplateStyle from './style';
5
+ //* Component
6
+ import HeroBalance from './HeroBalance';
7
+ import HistoryBalance from './HistoryBalance';
8
+ import StatusBalance from './StatusBalance';
9
+ const AccountBalanceTemplate = ({ iconValue, dataItem, className }) => {
10
+ const { selectedLang } = useTranslation();
11
+ //! State
12
+ const [dataBalance, setDataBalance] = useState(false);
13
+ useEffect(() => {
14
+ api.get({ url: `balance`, lang: selectedLang }).then((data) => {
15
+ setDataBalance(data);
16
+ });
17
+ }, []);
18
+ return dataBalance ? (React.createElement(AccountBalanceTemplateStyle, { className: className || '' },
19
+ React.createElement(HeroBalance, { cashback: dataBalance.cashback, balance: dataBalance.balance, title: dataBalance.info.status, totalSpent: dataBalance.info.spent.current, nextStatusValue: dataBalance.info.spent.next, progress: dataBalance.info.timeline, nextStatusTitle: 'Resident', iconValue: iconValue, description: (() => {
20
+ if (dataItem) {
21
+ const { description1, description2 } = dataItem.find((item) => item.name?.toLowerCase() === dataBalance.info.status?.toLowerCase()) || {};
22
+ return { description1, description2 };
23
+ }
24
+ else {
25
+ return false;
26
+ }
27
+ })() }),
28
+ React.createElement(StatusBalance, { activeStatus: dataBalance.info.status, allItem: dataItem }),
29
+ React.createElement(HistoryBalance, null))) : null;
30
+ };
31
+ export default AccountBalanceTemplate;
@@ -0,0 +1,2 @@
1
+ export default AccountBalanceTemplateStyle;
2
+ declare const AccountBalanceTemplateStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
@@ -0,0 +1,31 @@
1
+ import styled from 'styled-components';
2
+ const AccountBalanceTemplateStyle = styled.section `
3
+ /* //! 1920 */
4
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
5
+ }
6
+
7
+ /* //! 1510 */
8
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
9
+ }
10
+
11
+ /* //! 1440 */
12
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
13
+ }
14
+
15
+ /* //! 1280 */
16
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
17
+ }
18
+
19
+ /* //! 1024 */
20
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
21
+ }
22
+
23
+ /* //! 768 */
24
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
25
+ }
26
+
27
+ /* //! mobile */
28
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
29
+ }
30
+ `;
31
+ export default AccountBalanceTemplateStyle;
@@ -57,11 +57,13 @@ const AccountStyle = styled.section `
57
57
  transition: color var(--account_trTime) ease-out;
58
58
  }
59
59
 
60
- @media (hover: hover) {
61
- &:hover {
62
- &:not(&.active) {
63
- .sidebar-item {
64
- color: var(--account_primaryColor1);
60
+ @media (pointer: fine) {
61
+ @media (hover: hover) {
62
+ &:hover {
63
+ &:not(&.active) {
64
+ .sidebar-item {
65
+ color: var(--account_primaryColor1);
66
+ }
65
67
  }
66
68
  }
67
69
  }
@@ -1,2 +1,3 @@
1
1
  export { default as AccountTemplate } from './AccountTemplate';
2
2
  export { default as AccountSettingsTemplate } from './AccountSettingsTemplate';
3
+ export { default as AccountBalanceTemplate } from './AccountBalanceTemplate';
@@ -1,2 +1,3 @@
1
1
  export { default as AccountTemplate } from './AccountTemplate';
2
2
  export { default as AccountSettingsTemplate } from './AccountSettingsTemplate';
3
+ export { default as AccountBalanceTemplate } from './AccountBalanceTemplate';
@@ -1,15 +1,16 @@
1
- import React, { useRef, useState } from 'react';
1
+ import React, { useState } from 'react';
2
2
  import { Text, Link, Page } from '@weareconceptstudio/core';
3
3
  import { Form, Input } from '@weareconceptstudio/form';
4
- import { AccountButton, WarningMessage } from '../../../components';
4
+ import { AccountButton } from '../../../components';
5
5
  import ForgotPasswordTemplateStyle from './style';
6
6
  import { useAccountContext } from '../../../AccountProvider';
7
+ import AccountContainer from '../../../components/AccountContainer';
7
8
  const ForgotPasswordTemplate = ({ signInUrl = '/sign-in' }) => {
8
9
  //! Context
9
10
  const { useUser } = useAccountContext();
10
11
  const { forgotPassword } = useUser();
11
12
  //! Ref
12
- const tryAgainTimeout = useRef(null);
13
+ // const tryAgainTimeout = useRef(null);
13
14
  //! State
14
15
  const [forgotState, setForgotState] = useState({
15
16
  isSuccess: false,
@@ -30,58 +31,74 @@ const ForgotPasswordTemplate = ({ signInUrl = '/sign-in' }) => {
30
31
  }));
31
32
  });
32
33
  };
34
+ // const handleTryAgain = () => {
35
+ // setForgotState((prev) => ({
36
+ // ...prev,
37
+ // error: '',
38
+ // isBtnDisabled: true,
39
+ // }));
40
+ // // @ts-ignore
41
+ // tryAgainTimeout.current = setTimeout(() => {
42
+ // setForgotState((prev) => ({
43
+ // ...prev,
44
+ // isSent: false,
45
+ // isBtnDisabled: false,
46
+ // }));
47
+ // }, 60000);
48
+ // return (
49
+ // !forgotState.isBtnDisabled &&
50
+ // onFormSubmit({ email: forgotState.email })
51
+ // .then(() => {
52
+ // setForgotState((prev) => ({
53
+ // ...prev,
54
+ // isSent: true,
55
+ // }));
56
+ // })
57
+ // .catch((err) => {
58
+ // setForgotState((prev) => ({
59
+ // ...prev,
60
+ // isBtnDisabled: true,
61
+ // error: err.data.errors.email[0],
62
+ // }));
63
+ // tryAgainTimeout.current && clearTimeout(tryAgainTimeout.current);
64
+ // })
65
+ // );
66
+ // };
33
67
  const handleTryAgain = () => {
34
68
  setForgotState((prev) => ({
35
69
  ...prev,
36
- error: '',
37
- isBtnDisabled: true,
70
+ isSuccess: !prev.isSuccess,
38
71
  }));
39
- // @ts-ignore
40
- tryAgainTimeout.current = setTimeout(() => {
41
- setForgotState((prev) => ({
42
- ...prev,
43
- isSent: false,
44
- isBtnDisabled: false,
45
- }));
46
- }, 60000);
47
- return (!forgotState.isBtnDisabled &&
48
- onFormSubmit({ email: forgotState.email })
49
- .then(() => {
50
- setForgotState((prev) => ({
51
- ...prev,
52
- isSent: true,
53
- }));
54
- })
55
- .catch((err) => {
56
- setForgotState((prev) => ({
57
- ...prev,
58
- isBtnDisabled: true,
59
- error: err.data.errors.email[0],
60
- }));
61
- tryAgainTimeout.current && clearTimeout(tryAgainTimeout.current);
62
- }));
63
72
  };
64
- return (React.createElement(Page, { className: 'forgot-password use-account' },
65
- React.createElement(ForgotPasswordTemplateStyle, null,
66
- React.createElement("div", { className: `forgot-password-wrapper` }, !forgotState.isSuccess ? (React.createElement(React.Fragment, null,
73
+ return (React.createElement(Page, { className: `forgot-password use-account ${forgotState.isSuccess ? 'success' : ''}` },
74
+ React.createElement(ForgotPasswordTemplateStyle, { className: 'forget-password-style' },
75
+ React.createElement("div", { className: 'forgot-password-wrapper' }, !forgotState.isSuccess ? (React.createElement("div", { className: `forgot-password-wrapper-form` },
67
76
  React.createElement(Text, { tag: 'h1', className: 'account-h2 account-font-bold account-primary-color1 title', text: 'forgotPassword' }),
68
77
  React.createElement(Text, { className: 'account-p account-p2 account-font-regular account-primary-color1 description', text: 'forgotPasswordDescription' }),
69
- React.createElement(Form, { onSubmit: handleFormFinish },
78
+ React.createElement(Form, { onSubmit: handleFormFinish, initialValues: {
79
+ ...(forgotState.email ? { email: forgotState.email } : {}),
80
+ } },
70
81
  React.createElement(Form.Item, { name: 'email', label: 'email', rules: [{ type: 'email' }] },
71
- React.createElement(Input, { placeholder: 'emailPlaceholder' })),
82
+ React.createElement(Input
83
+ // @ts-ignore
84
+ , {
85
+ // @ts-ignore
86
+ placeholder: 'emailPlaceholder' })),
72
87
  React.createElement("div", { className: 'loginExternalBlock' },
73
88
  React.createElement(Link, { href: signInUrl },
74
89
  React.createElement(Text, { tag: 'span', className: 'account-p account-p3 account-font-medium account-primary-color1 underline login-external', text: 'login' }))),
75
- React.createElement(AccountButton, { text: `submit`, type: `submit`, btnType: `full-width` })))) : (React.createElement(React.Fragment, null,
76
- React.createElement(Text, { tag: 'h2', className: 'account-h2 account-font-bold account-primary-color1 title', text: 'thankYou' }),
77
- React.createElement("div", { className: 'recovery-wrap' },
78
- React.createElement(Text, { className: 'account-p account-p2 account-font-medium account-primary-color1 recovery-text', text: 'recoveryText' }),
79
- "\u00A0",
80
- React.createElement(Text, { className: 'account-p account-p2 account-font-bold account-primary-color1 recovery-email', text: forgotState.email })),
81
- React.createElement("div", { className: 'try-again-wrap' },
82
- React.createElement(Text, { className: `account-p account-p2 account-font-medium account-primary-color1 try-text`, text: `tryAgainText` }),
83
- "\u00A0",
84
- React.createElement(Text, { text: `tryAgain`, onClick: handleTryAgain, className: `account-p account-p2 account-font-bold account-primary-color1 underline try-again-text ${forgotState.isBtnDisabled ? 'disabled' : ''}` })),
85
- React.createElement(WarningMessage, { error: forgotState.error, errorSubtitle: 'forgotErrorDescription', isSent: forgotState.isSent, successTitle: 'recoverPassword', successSubtitle: 'recoverPasswordDesc' })))))));
90
+ React.createElement(AccountButton, { text: `submit`, type: `submit`, btnType: `full-width` })))) : (React.createElement(AccountContainer, { className: 'wrapper-container', row: true, full: true },
91
+ React.createElement("div", { className: 'col-3 col-t-1 col-m-0' }),
92
+ React.createElement("div", { className: 'col-6 col-t-10 col-m-12 forget-password-wrapper' },
93
+ React.createElement(Text, { tag: 'h2', className: 'account-h2 account-font-bold account-primary-color1 title', text: 'thankYou' }),
94
+ React.createElement("div", { className: 'recovery-wrap' },
95
+ React.createElement(Text, { className: 'account-p account-p2 account-font-medium account-primary-color1 recovery-text', text: 'recoveryText' }),
96
+ "\u00A0",
97
+ React.createElement(Text, { className: 'account-p account-p2 account-font-bold account-primary-color1 recovery-email',
98
+ // text={forgotState.email}
99
+ text: 'antonyanwm@gmail.com' })),
100
+ React.createElement("div", { className: 'try-again-wrap' },
101
+ React.createElement(Text, { text: `resendNewLink`, onClick: handleTryAgain, className: `account-p account-p3 account-font-bold account-primary-color1 underline try-again-text ${forgotState.isBtnDisabled ? 'disabled' : ''}` }))),
102
+ React.createElement("div", { className: 'col-3 col-t-1 col-m-0' })))))));
86
103
  };
87
104
  export default ForgotPasswordTemplate;
@@ -11,14 +11,18 @@ const ForgotPasswordTemplateStyle = styled.section `
11
11
 
12
12
  --account_loginExternalMTop: var(--sp2x);
13
13
 
14
- display: flex;
15
- justify-content: center;
16
14
  padding-top: var(--account_forgotPasswordPadT);
17
15
  padding-bottom: var(--account_forgotPasswordPadB);
18
16
 
19
17
  .forgot-password-wrapper {
20
- max-width: var(--account_forgotPasswordWrapperMaxWidth);
21
18
  width: 100%;
19
+ display: flex;
20
+ justify-content: center;
21
+
22
+ .forgot-password-wrapper-form {
23
+ max-width: var(--account_forgotPasswordWrapperMaxWidth);
24
+ width: 100%;
25
+ }
22
26
 
23
27
  .title {
24
28
  text-align: center;
@@ -58,9 +62,11 @@ const ForgotPasswordTemplateStyle = styled.section `
58
62
  transition: color var(--account_trTime) ease-out;
59
63
  cursor: pointer;
60
64
 
61
- @media (hover: hover) {
62
- &:hover {
63
- color: var(--account_primaryColor3);
65
+ @media (pointer: fine) {
66
+ @media (hover: hover) {
67
+ &:hover {
68
+ color: var(--account_primaryColor3);
69
+ }
64
70
  }
65
71
  }
66
72
 
@@ -80,9 +86,11 @@ const ForgotPasswordTemplateStyle = styled.section `
80
86
  .login-external {
81
87
  transition: color var(--account_trTime) ease-out;
82
88
 
83
- @media (hover: hover) {
84
- &:hover {
85
- color: var(--account_primaryColor3);
89
+ @media (pointer: fine) {
90
+ @media (hover: hover) {
91
+ &:hover {
92
+ color: var(--account_primaryColor3);
93
+ }
86
94
  }
87
95
  }
88
96
  }
@@ -57,9 +57,11 @@ const ResetPasswordTemplateStyleStyle = styled.section `
57
57
  .forgotLink {
58
58
  transition: color var(--account_trTime) ease-out;
59
59
 
60
- @media (hover: hover) {
61
- &:hover {
62
- color: var(--account_primaryColor3);
60
+ @media (pointer: fine) {
61
+ @media (hover: hover) {
62
+ &:hover {
63
+ color: var(--account_primaryColor3);
64
+ }
63
65
  }
64
66
  }
65
67
  }
@@ -42,9 +42,11 @@ const SignInTemplateStyle = styled.section `
42
42
  .forgotLink {
43
43
  transition: color var(--account_trTime) ease-out;
44
44
 
45
- @media (hover: hover) {
46
- &:hover {
47
- color: var(--account_primaryColor3);
45
+ @media (pointer: fine) {
46
+ @media (hover: hover) {
47
+ &:hover {
48
+ color: var(--account_primaryColor3);
49
+ }
48
50
  }
49
51
  }
50
52
  }
@@ -66,9 +68,11 @@ const SignInTemplateStyle = styled.section `
66
68
  .joinNowLink {
67
69
  transition: color var(--account_trTime) ease-out;
68
70
 
69
- @media (hover: hover) {
70
- &:hover {
71
- color: var(--account_primaryColor3);
71
+ @media (pointer: fine) {
72
+ @media (hover: hover) {
73
+ &:hover {
74
+ color: var(--account_primaryColor3);
75
+ }
72
76
  }
73
77
  }
74
78
  }
@@ -54,9 +54,11 @@ const VerifyEmailAddressTemplateStyle = styled.section `
54
54
  cursor: pointer;
55
55
  transition: color var(--account_trTime) ease;
56
56
 
57
- @media (hover: hover) {
58
- &:hover {
59
- color: var(--account_primaryColor3);
57
+ @media (pointer: fine) {
58
+ @media (hover: hover) {
59
+ &:hover {
60
+ color: var(--account_primaryColor3);
61
+ }
60
62
  }
61
63
  }
62
64
 
@@ -15,11 +15,11 @@ import SkeletonCartTemplate from './Skeleton';
15
15
  const CartTemplate = ({ children, actions, btnDisabled, checkoutUrl = '/checkout/' }) => {
16
16
  const { shopUrl, useCart } = useAccountContext();
17
17
  const { translate } = useTranslation();
18
- const { items, itemsCount, shippingCost, loading, subtotal, total } = useCart();
18
+ const { items, itemsCount, shippingCost, loading, subtotal, total, freeShippingRange } = useCart();
19
19
  return (React.createElement(Page, { className: 'cart use-account' },
20
20
  React.createElement(AccountContainer, { className: `second-version` },
21
21
  React.createElement(CartTemplateStyle, null,
22
- React.createElement(TotalCheckout, { total: total, subtotal: subtotal, itemsCount: itemsCount, shippingCost: shippingCost, loading: loading, buttonProps: {
22
+ React.createElement(TotalCheckout, { total: total, loading: loading, subtotal: subtotal, itemsCount: itemsCount, shippingCost: shippingCost, freeShippingRange: freeShippingRange, buttonProps: {
23
23
  url: checkoutUrl,
24
24
  disabled: btnDisabled,
25
25
  text: 'proceedToCheckout',
@@ -14,11 +14,13 @@ const CartTemplateStyle = styled.section `
14
14
  gap: var(--sp1x);
15
15
  text-decoration: unset !important;
16
16
 
17
- @media (hover: hover) {
18
- &:hover {
19
- svg {
20
- path {
21
- fill: var(--account_secondColor9);
17
+ @media (pointer: fine) {
18
+ @media (hover: hover) {
19
+ &:hover {
20
+ svg {
21
+ path {
22
+ fill: var(--account_secondColor9);
23
+ }
22
24
  }
23
25
  }
24
26
  }
@@ -27,7 +27,7 @@ const Item = memo(({ data, remove, select, isLast, actions, maxQty, currency })
27
27
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1`, text: data.product.short_info_1 })),
28
28
  React.createElement("div", { className: `right-second-item-wrap` },
29
29
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: data.product.short_info_2 })))),
30
- React.createElement("div", { className: `col-item tl-col-2` }, select ? (React.createElement("div", { className: `select-and-out-of-stock-wrap` }, !data.product?.out_of_stock ? (React.createElement(Select, { value: data.qty, allowSearch: false, options: selectionList, onChange: (val) => actions.add({
30
+ React.createElement("div", { className: `col-item tl-col-2` }, select ? (React.createElement("div", { className: `select-and-out-of-stock-wrap` }, !data.product?.out_of_stock ? (React.createElement(Select, { value: data.qty, options: selectionList, onChange: (val) => actions.add({
31
31
  qty: val,
32
32
  productId: data.product.id,
33
33
  }) })) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: data.qty })))) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: data.qty }))),
@@ -26,7 +26,7 @@ const ItemMobile = memo(({ data, remove, select, actions, maxQty, currency }) =>
26
26
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 mobile-short-info1`, text: data.product.short_info_1 })),
27
27
  React.createElement("div", { className: 'mobile-info-item' },
28
28
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 mobile-short-info2`, text: data.product.short_info_2 })),
29
- select ? (React.createElement("div", { className: `select-and-out-of-stock-mobile-wrap` }, !data.product?.out_of_stock ? (React.createElement(Select, { value: data.qty, allowSearch: false, options: selectionList, onChange: (val) => actions.add({
29
+ select ? (React.createElement("div", { className: `select-and-out-of-stock-mobile-wrap` }, !data.product?.out_of_stock ? (React.createElement(Select, { value: data.qty, options: selectionList, onChange: (val) => actions.add({
30
30
  qty: val,
31
31
  productId: data.product.id,
32
32
  }) })) : (React.createElement("div", { className: `mobile-info-item` },
@@ -229,8 +229,16 @@ const CartItemsStyle = styled.section `
229
229
  padding: 0;
230
230
 
231
231
  input {
232
- width: 0;
233
- padding: 0 !important;
232
+ width: unset !important;
233
+ background-color: unset !important;
234
+ color: unset !important;
235
+ font-size: unset !important;
236
+ line-height: unset !important;
237
+ font-family: unset !important;
238
+ font-weight: unset !important;
239
+ border-radius: unset !important;
240
+ border: unset !important;
241
+ padding: unset !important;
234
242
  }
235
243
  }
236
244
 
@@ -245,6 +253,14 @@ const CartItemsStyle = styled.section `
245
253
  .react-select__option {
246
254
  padding: var(--account_qntPadTB) var(--account_qntPadLR);
247
255
  font-weight: 400;
256
+
257
+ @media (pointer: fine) {
258
+ @media (hover: hover) {
259
+ &:hover {
260
+ background-color: var(--mainColor) !important;
261
+ }
262
+ }
263
+ }
248
264
  }
249
265
  }
250
266
  }
@@ -611,8 +627,16 @@ const CartItemsStyle = styled.section `
611
627
  padding: 0;
612
628
 
613
629
  input {
614
- width: 0;
615
- padding: 0 !important;
630
+ width: unset !important;
631
+ background-color: unset !important;
632
+ color: unset !important;
633
+ font-size: unset !important;
634
+ line-height: unset !important;
635
+ font-family: unset !important;
636
+ font-weight: unset !important;
637
+ border-radius: unset !important;
638
+ border: unset !important;
639
+ padding: unset !important;
616
640
  }
617
641
  }
618
642
 
@@ -627,6 +651,14 @@ const CartItemsStyle = styled.section `
627
651
  .react-select__option {
628
652
  padding: var(--account_qntPadTB) var(--account_qntPadLR);
629
653
  font-weight: 400;
654
+
655
+ @media (pointer: fine) {
656
+ @media (hover: hover) {
657
+ &:hover {
658
+ background-color: var(--mainColor) !important;
659
+ }
660
+ }
661
+ }
630
662
  }
631
663
  }
632
664
  }
@@ -15,7 +15,7 @@ import SkeletonAddressSelect from '../../address/SelectAddress/Skeleton';
15
15
  const CheckoutTemplate = () => {
16
16
  const { checkoutAddressId } = useAddressContext();
17
17
  const { useCart } = useAccountContext();
18
- const { items, itemsCount, subtotal, total, shippingCost } = useCart();
18
+ const { items, itemsCount, subtotal, total, shippingCost, freeShippingRange } = useCart();
19
19
  const [checkoutData, setCheckoutData] = useState({
20
20
  note: '',
21
21
  paymentType: 'cash_on_delivery',
@@ -53,7 +53,7 @@ const CheckoutTemplate = () => {
53
53
  return (React.createElement(Page, { className: 'checkout use-account' },
54
54
  React.createElement(AccountContainer, { className: `second-version` },
55
55
  React.createElement(CheckoutTemplateStyle, null,
56
- React.createElement(TotalCheckout, { isCheckout: true, total: total, subtotal: subtotal, itemsCount: itemsCount, shippingCost: shippingCost, isShipping: checkStep.isShipping, checkoutData: checkoutData, fillCheckoutData: fillCheckoutData, loading: addressLoading, buttonProps: {
56
+ React.createElement(TotalCheckout, { isCheckout: true, total: total, subtotal: subtotal, itemsCount: itemsCount, loading: addressLoading, shippingCost: shippingCost, checkoutData: checkoutData, isShipping: checkStep.isShipping, fillCheckoutData: fillCheckoutData, freeShippingRange: freeShippingRange, buttonProps: {
57
57
  url: false,
58
58
  disabled: false,
59
59
  handleClick: handleCheckoutBtn,
@@ -245,11 +245,13 @@ const OrderedItemsStyle = styled.div `
245
245
  }
246
246
  }
247
247
 
248
- @media (hover: hover) {
249
- &:hover {
250
- color: var(--account_primaryColor6);
251
- background-color: var(--account_backgroundColor);
252
- border: 2px solid var(--account_primaryColor6);
248
+ @media (pointer: fine) {
249
+ @media (hover: hover) {
250
+ &:hover {
251
+ color: var(--account_primaryColor6);
252
+ background-color: var(--account_backgroundColor);
253
+ border: 2px solid var(--account_primaryColor6);
254
+ }
253
255
  }
254
256
  }
255
257
  }
@@ -296,10 +298,12 @@ const OrderedItemsStyle = styled.div `
296
298
  color: var(--account_primaryColor1);
297
299
  border: 2px solid var(--account_primaryColor1);
298
300
 
299
- @media (hover: hover) {
300
- &:hover {
301
- background-color: var(--account_primaryColor1);
302
- color: var(--account_backgroundColor);
301
+ @media (pointer: fine) {
302
+ @media (hover: hover) {
303
+ &:hover {
304
+ background-color: var(--account_primaryColor1);
305
+ color: var(--account_backgroundColor);
306
+ }
303
307
  }
304
308
  }
305
309
  }
@@ -313,11 +317,13 @@ const OrderedItemsStyle = styled.div `
313
317
  background-color: var(--account_primaryColor1);
314
318
  border: 2px solid var(--account_primaryColor1);
315
319
 
316
- @media (hover: hover) {
317
- &:hover {
318
- color: var(--account_primaryColor1);
319
- background-color: var(--account_backgroundColor);
320
- border: 2px solid var(--account_primaryColor1);
320
+ @media (pointer: fine) {
321
+ @media (hover: hover) {
322
+ &:hover {
323
+ color: var(--account_primaryColor1);
324
+ background-color: var(--account_backgroundColor);
325
+ border: 2px solid var(--account_primaryColor1);
326
+ }
321
327
  }
322
328
  }
323
329
  }
@@ -723,11 +729,13 @@ const OrderedItemsStyle = styled.div `
723
729
  }
724
730
  }
725
731
 
726
- @media (hover: hover) {
727
- &:hover {
728
- color: var(--account_primaryColor6);
729
- background-color: var(--account_backgroundColor);
730
- border: 2px solid var(--account_primaryColor6);
732
+ @media (pointer: fine) {
733
+ @media (hover: hover) {
734
+ &:hover {
735
+ color: var(--account_primaryColor6);
736
+ background-color: var(--account_backgroundColor);
737
+ border: 2px solid var(--account_primaryColor6);
738
+ }
731
739
  }
732
740
  }
733
741
  }
@@ -760,10 +768,12 @@ const OrderedItemsStyle = styled.div `
760
768
  color: var(--account_primaryColor1);
761
769
  border: 2px solid var(--account_primaryColor1);
762
770
 
763
- @media (hover: hover) {
764
- &:hover {
765
- background-color: var(--account_primaryColor1);
766
- color: var(--account_backgroundColor);
771
+ @media (pointer: fine) {
772
+ @media (hover: hover) {
773
+ &:hover {
774
+ background-color: var(--account_primaryColor1);
775
+ color: var(--account_backgroundColor);
776
+ }
767
777
  }
768
778
  }
769
779
  }
@@ -781,11 +791,13 @@ const OrderedItemsStyle = styled.div `
781
791
  background-color: var(--account_primaryColor1);
782
792
  border: 2px solid var(--account_primaryColor1);
783
793
 
784
- @media (hover: hover) {
785
- &:hover {
786
- color: var(--account_primaryColor1);
787
- background-color: var(--account_backgroundColor);
788
- border: 2px solid var(--account_primaryColor1);
794
+ @media (pointer: fine) {
795
+ @media (hover: hover) {
796
+ &:hover {
797
+ color: var(--account_primaryColor1);
798
+ background-color: var(--account_backgroundColor);
799
+ border: 2px solid var(--account_primaryColor1);
800
+ }
789
801
  }
790
802
  }
791
803
  }
@@ -260,6 +260,14 @@ const AccountHelperClass = createGlobalStyle `${css `
260
260
  }
261
261
  }
262
262
 
263
+ .account-surface-color {
264
+ color: var(--account_surfaceColor);
265
+
266
+ &-bg {
267
+ background-color: var(--account_surfaceColor);
268
+ }
269
+ }
270
+
263
271
  .account-font-regular {
264
272
  font-family: var(--account_Font);
265
273
  font-weight: 400;
@@ -35,6 +35,10 @@ export default (props) => ({
35
35
  account_secondaryColor7: '#FFDAD8',
36
36
  account_secondaryColor8: '#D7DBF5',
37
37
  account_secondaryColor9: '#B067CC',
38
+ account_secondaryColor10: '#E9ECEE',
39
+ account_secondaryColor11: '#F4F5F7',
40
+ account_secondaryColor12: '#0EC600',
41
+ account_surfaceColor: '#F7F7F7',
38
42
  //! Error Color
39
43
  account_errorColor: '#DE554E',
40
44
  account_errorColorBg: 'rgba(222, 85, 78, 0.1)',