@stokr/components-library 3.0.76 → 3.1.0-alpha.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.
Files changed (123) hide show
  1. package/README.md +177 -177
  2. package/dist/components/Input/InputPassword.js +3 -5
  3. package/dist/components/Input/OtpInput.js +1 -3
  4. package/dist/components/MenuNav/MenuNav.styles.js +1 -2
  5. package/dist/components/Modal/Modal.js +6 -3
  6. package/dist/components/Modal/Modal.styles.js +2 -3
  7. package/dist/components/Modal/SuccessModal/SuccessModal.js +6 -3
  8. package/dist/components/Newsletter/Newsletter.js +1 -3
  9. package/dist/components/NotificationCounter/NotificationCounter.styles.js +1 -2
  10. package/dist/components/SmartLink/SmartLink.js +0 -2
  11. package/dist/components/StepController/StepController.js +3 -5
  12. package/dist/components/StepController/StepController.styles.js +102 -1
  13. package/dist/components/StepController/StepControllerProgress.js +1 -1
  14. package/dist/components/Switch/Switch.js +1 -3
  15. package/dist/components/ToDoList/ToDoListTask.js +15 -3
  16. package/dist/components/taxId/register-taxid.js +7 -5
  17. package/dist/index.js +67 -141
  18. package/dist/manifest.json +25 -25
  19. package/dist/robots.txt +3 -3
  20. package/dist/runtime-config.js +5 -71
  21. package/dist/static/fonts/icomoon/icomoon.eot +0 -0
  22. package/dist/static/fonts/icomoon/icomoon.svg +52 -52
  23. package/dist/static/fonts/icomoon/icomoon.ttf +0 -0
  24. package/dist/static/fonts/icomoon/icomoon.woff +0 -0
  25. package/dist/static/fonts/icomoon/selection.json +0 -0
  26. package/dist/static/fonts/icomoon/style.css +0 -0
  27. package/dist/static/images/Glassess.svg +5 -5
  28. package/dist/static/images/add-folder-icon.svg +4 -4
  29. package/dist/static/images/arrow-down-black.svg +21 -21
  30. package/dist/static/images/check-icon.svg +3 -3
  31. package/dist/static/images/checkmark-circle-icon.svg +3 -3
  32. package/dist/static/images/close-circle-icon.svg +2 -2
  33. package/dist/static/images/copy_icon.svg +4 -4
  34. package/dist/static/images/cross-icon.svg +3 -3
  35. package/dist/static/images/currency/eth.svg +10 -10
  36. package/dist/static/images/currency/eth_logo.svg +8 -8
  37. package/dist/static/images/currency/eur.svg +4 -4
  38. package/dist/static/images/currency/eur.svg.js +1 -1
  39. package/dist/static/images/currency/usd.svg +4 -4
  40. package/dist/static/images/currency/usd.svg.js +1 -1
  41. package/dist/static/images/currency/usdc-logo.svg +5 -5
  42. package/dist/static/images/doc-icon.svg +3 -3
  43. package/dist/static/images/download_icon.svg +3 -3
  44. package/dist/static/images/external-link-icon.svg +3 -3
  45. package/dist/static/images/filter-icon.svg +6 -6
  46. package/dist/static/images/globe.svg +15 -15
  47. package/dist/static/images/mangopay.svg +20 -20
  48. package/dist/static/images/numbers/number_eight.svg +3 -3
  49. package/dist/static/images/numbers/number_five.svg +4 -4
  50. package/dist/static/images/numbers/number_four.svg +3 -3
  51. package/dist/static/images/numbers/number_nine.svg +4 -4
  52. package/dist/static/images/numbers/number_one.svg +4 -4
  53. package/dist/static/images/numbers/number_seven.svg +4 -4
  54. package/dist/static/images/numbers/number_six.svg +4 -4
  55. package/dist/static/images/numbers/number_three.svg +3 -3
  56. package/dist/static/images/numbers/number_two.svg +4 -4
  57. package/dist/static/images/numbers/number_zero.svg +3 -3
  58. package/dist/static/images/plus-icon.svg +4 -4
  59. package/dist/static/images/prof-inv.svg +3 -3
  60. package/dist/static/images/search-icon.svg +3 -3
  61. package/dist/static/images/transfer-icon.svg +10 -10
  62. package/dist/static/images/trash.svg +16 -16
  63. package/dist/static/images/upload.svg +5 -5
  64. package/dist/static/images/warning-filled.svg +3 -3
  65. package/dist/styles/global.js +1 -2
  66. package/dist/utils/check-todo-status.js +1 -2
  67. package/package.json +137 -143
  68. package/dist/api/authenticationApi.js +0 -13
  69. package/dist/auth/index.js +0 -34
  70. package/dist/components/2FA/Connect2FA.js +0 -58
  71. package/dist/components/2FA/EnterCode.js +0 -74
  72. package/dist/components/2FA/InstallAuthApp.js +0 -68
  73. package/dist/components/2FA/ResetCode.js +0 -34
  74. package/dist/components/2FA/Sucess2FA.js +0 -63
  75. package/dist/components/2FA/disable-2fa-flow.js +0 -104
  76. package/dist/components/2FA/enable-2fa-flow.js +0 -167
  77. package/dist/components/2FA/login-with-otp-flow.js +0 -262
  78. package/dist/components/2FA/main-flow.js +0 -273
  79. package/dist/components/Footer/Footer.js +0 -69
  80. package/dist/components/Footer/Footer.styles.js +0 -277
  81. package/dist/components/Footer/FooterLayout.js +0 -150
  82. package/dist/components/Footer/FooterMenu.js +0 -107
  83. package/dist/components/Footer/FooterMenu.styles.js +0 -334
  84. package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +0 -121
  85. package/dist/components/Header/Header.js +0 -441
  86. package/dist/components/Header/Header.styles.js +0 -568
  87. package/dist/components/Layout/Layout.js +0 -76
  88. package/dist/components/LoginModal/LoginModal.js +0 -165
  89. package/dist/components/MainMenu/DynamicMainMenu.js +0 -38
  90. package/dist/components/MainMenu/MainMenu.js +0 -220
  91. package/dist/components/MainMenu/MainMenu.styles.js +0 -362
  92. package/dist/components/Modal/NewVentureModal/NewVentureModal.js +0 -273
  93. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +0 -74
  94. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +0 -20
  95. package/dist/components/RegisterModal/RegisterModal.js +0 -278
  96. package/dist/components/ResetConfirmModal/ResetConfirmModal.js +0 -40
  97. package/dist/components/ResetConfirmModal/ResetConfirmModal.styles.js +0 -41
  98. package/dist/components/ResetPasswordModal/ResetPasswordModal.js +0 -145
  99. package/dist/components/StepsProgress/StepIndicator.js +0 -40
  100. package/dist/components/StepsProgress/StepIndicator.styles.js +0 -69
  101. package/dist/components/StepsProgress/StepsProgress.js +0 -67
  102. package/dist/components/StepsProgress/StepsProgress.styles.js +0 -105
  103. package/dist/components/TermsModal/TermsModal.js +0 -145
  104. package/dist/components/TermsModal/_styles.js +0 -313
  105. package/dist/components/VerifyEmailModal/VerifyEmailModal.js +0 -122
  106. package/dist/components/headerHo/HeaderHo.js +0 -707
  107. package/dist/config.js +0 -33
  108. package/dist/context/Auth.js +0 -423
  109. package/dist/context/AuthContext.js +0 -1016
  110. package/dist/firebase-config.js +0 -56
  111. package/dist/hooks/useNewVentureForm.js +0 -235
  112. package/dist/static/images/background3.png.js +0 -4
  113. package/dist/static/images/google_auth.png.js +0 -4
  114. package/dist/static/images/iso27001-black.svg.js +0 -4
  115. package/dist/static/images/mangopay.svg.js +0 -4
  116. package/dist/static/images/social/Facebook_Logo.png.js +0 -4
  117. package/dist/static/images/social/LI-In-Bug.png.js +0 -4
  118. package/dist/static/images/social/Telegram-Logo.png.js +0 -4
  119. package/dist/static/images/social/X-logo-black.png.js +0 -4
  120. package/dist/static/images/social/youtube_social_circle_red.png.js +0 -4
  121. package/dist/utils/show-account-locked-modal.js +0 -23
  122. package/dist/utils/user-identity.js +0 -10
  123. package/dist/utils/withRouter.js +0 -26
@@ -1,273 +0,0 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import React__default, { useContext, useState, useRef, useEffect } from "react";
3
- import PropTypes from "prop-types";
4
- import { AuthContext } from "../../context/AuthContext.js";
5
- import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
6
- import stdin_default$1 from "../Switch/Switch.js";
7
- import { Text } from "../Text/Text.styles.js";
8
- import stdin_default$5 from "./login-with-otp-flow.js";
9
- import stdin_default$2 from "./enable-2fa-flow.js";
10
- import stdin_default$3 from "./disable-2fa-flow.js";
11
- import { colors } from "../../styles/colors.js";
12
- import { InfoIcon } from "../InfoIcon/InfoIcon.js";
13
- import { Modal } from "../Modal/Modal.js";
14
- import stdin_default$4 from "./Sucess2FA.js";
15
- import { ModalInner } from "../Modal/Modal.styles.js";
16
- import { showProgress } from "../Modal/SuccessModal/SuccessModal.js";
17
- const SUPPORT_URL = "https://support.stokr.io/";
18
- const Main2FAFlow = ({
19
- onRequiresRecentLoginError,
20
- open2faflow,
21
- onLoginAgainClick,
22
- openDisable2faflow,
23
- allowDisable2FA = false,
24
- title = "SET UP YOUR LOG IN TWO FACTOR AUTHENTICATION",
25
- subtitle = "Protect your account with an additional layer of security to log in",
26
- showSwitch = true,
27
- customComponent,
28
- onFlowClose,
29
- recentLoginTitle = "LOG IN AGAIN",
30
- recentLoginSubtitle = "To continue please log in again and set up your two factor authentication",
31
- recentLoginCTA = "Log in again",
32
- showInlineLoginOnLogout = true
33
- }) => {
34
- const { user, checkMfaEnrollment, userMfaEnrollment, generateTotpSecret, logoutUser } = useContext(AuthContext);
35
- const [isFlowopen, setIsFlowOpen] = useState({
36
- enable2fa: open2faflow || false,
37
- disable2fa: allowDisable2FA && (openDisable2faflow || false),
38
- requiresRecentLogin: false
39
- });
40
- const [is2FAEnabled, setis2FAEnabled] = useState(false);
41
- const [successMessage, setsuccessMessage] = useState();
42
- const [isLoginRequired, setisLoginRequired] = useState(false);
43
- const [totpData, settotpData] = useState();
44
- const [awaitingReauthFor2fa, setAwaitingReauthFor2fa] = useState(false);
45
- const enable2faCompletedRef = useRef(false);
46
- const disable2faCompletedRef = useRef(false);
47
- const onRequiresRecentLoginErrorHandler = () => {
48
- setIsFlowOpen({
49
- requiresRecentLogin: true,
50
- enable2fa: false,
51
- disable2fa: false
52
- });
53
- onRequiresRecentLoginError?.();
54
- };
55
- const generateTotp = async () => {
56
- try {
57
- const response = await generateTotpSecret();
58
- settotpData(response);
59
- } catch (error) {
60
- if (error.code === "auth/requires-recent-login" || error.code === "auth/unsupported-first-factor") {
61
- setisLoginRequired(true);
62
- if (isFlowopen.enable2fa && !isFlowopen.requiresRecentLogin) {
63
- onRequiresRecentLoginErrorHandler();
64
- }
65
- }
66
- }
67
- };
68
- useEffect(() => {
69
- if (userMfaEnrollment?.length > 0) {
70
- setis2FAEnabled(true);
71
- } else if (user && !awaitingReauthFor2fa) {
72
- checkMfaEnrollment();
73
- generateTotp();
74
- }
75
- }, [user, userMfaEnrollment, awaitingReauthFor2fa]);
76
- useEffect(() => {
77
- if (!user || !awaitingReauthFor2fa) return;
78
- setAwaitingReauthFor2fa(false);
79
- setisLoginRequired(false);
80
- setIsFlowOpen((prev) => ({
81
- ...prev,
82
- requiresRecentLogin: false,
83
- enable2fa: true
84
- }));
85
- checkMfaEnrollment();
86
- generateTotp();
87
- }, [user, awaitingReauthFor2fa]);
88
- useEffect(() => {
89
- let timeoutId;
90
- if (successMessage) {
91
- timeoutId = setTimeout(setsuccessMessage, 400);
92
- }
93
- return () => {
94
- if (timeoutId != null) clearTimeout(timeoutId);
95
- };
96
- }, [successMessage]);
97
- const switchOpenFlow = (prevFlowId, nextFlowId) => {
98
- setIsFlowOpen((prev) => ({
99
- ...prev,
100
- [prevFlowId]: false,
101
- [nextFlowId]: true
102
- }));
103
- };
104
- const showDisable2faBlockedModal = () => showProgress({
105
- title: "TWO-FACTOR AUTHENTICATION REQUIRED",
106
- subtitle: /* @__PURE__ */ jsxs(Fragment, { children: [
107
- "Under our security policy, two-factor authentication is required on all accounts and cannot be turned off. To reset your method, contact our",
108
- " ",
109
- /* @__PURE__ */ jsx("a", { href: SUPPORT_URL, target: "_blank", rel: "noreferrer", style: { textDecoration: "underline" }, children: /* @__PURE__ */ jsx("u", { children: "support team" }) }),
110
- "."
111
- ] }),
112
- maxWidth: "820px"
113
- });
114
- const handleFlowClose = (flowId, completed = false) => {
115
- setIsFlowOpen((prev) => ({ ...prev, [flowId]: false }));
116
- if (onFlowClose) onFlowClose({ flow: flowId, completed });
117
- };
118
- const onEnable2FASuccess = async () => {
119
- enable2faCompletedRef.current = true;
120
- setis2FAEnabled(true);
121
- checkMfaEnrollment();
122
- setsuccessMessage("Your log in 2FA authentication is now set");
123
- };
124
- const onDisable2FASuccess = async () => {
125
- disable2faCompletedRef.current = true;
126
- setis2FAEnabled(false);
127
- checkMfaEnrollment();
128
- setsuccessMessage("Your log in 2FA authentication is removed");
129
- };
130
- const handleLoginAgain = async () => {
131
- setIsFlowOpen((prev) => ({
132
- ...prev,
133
- requiresRecentLogin: false,
134
- enable2fa: false,
135
- disable2fa: false
136
- }));
137
- await logoutUser();
138
- setAwaitingReauthFor2fa(true);
139
- onLoginAgainClick?.();
140
- };
141
- const flowActions = {
142
- openEnable2FA: () => switchOpenFlow("disable2fa", "enable2fa"),
143
- openDisable2FA: () => {
144
- if (!is2FAEnabled) return;
145
- if (!allowDisable2FA) {
146
- void showDisable2faBlockedModal();
147
- return;
148
- }
149
- switchOpenFlow("enable2fa", "disable2fa");
150
- },
151
- closeFlows: () => {
152
- const wasOpen = Object.keys(isFlowopen).find((key) => isFlowopen[key]);
153
- setIsFlowOpen({
154
- enable2fa: false,
155
- disable2fa: false,
156
- requiresRecentLogin: false
157
- });
158
- if (wasOpen) {
159
- onFlowClose?.(wasOpen);
160
- }
161
- },
162
- is2FAEnabled,
163
- isFlowOpen: isFlowopen
164
- };
165
- return /* @__PURE__ */ jsxs(Fragment, { children: [
166
- /* @__PURE__ */ jsx(ComponentWrapper, { alignVertically: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("h5", { children: title }) }) }),
167
- /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("p", { children: subtitle }) }),
168
- showSwitch && /* @__PURE__ */ jsxs(ComponentWrapper, { noPaddingHorizontal: true, children: [
169
- /* @__PURE__ */ jsx(
170
- InfoIcon,
171
- {
172
- position: "top",
173
- html: is2FAEnabled ? "Enabled" : "Disabled",
174
- noIcon: true,
175
- noMarginLeft: true,
176
- disabled: isFlowopen.enable2fa || isFlowopen.disable2fa,
177
- children: /* @__PURE__ */ jsx(
178
- stdin_default$1,
179
- {
180
- dataCy: "2fa-settings-toggle",
181
- value1: "disabled",
182
- value2: "enabled",
183
- value1Color: colors.orangishRed,
184
- value2Color: colors.freshGreen,
185
- value: is2FAEnabled ? "enabled" : "disabled",
186
- revertToPrevious: true,
187
- hideValues: true,
188
- indicatorStyle: { margin: 0 },
189
- handleChange: (value) => {
190
- if (isLoginRequired && value === "enabled") {
191
- setIsFlowOpen({
192
- requiresRecentLogin: true,
193
- enable2fa: false,
194
- disable2fa: false
195
- });
196
- } else if (value === "enabled") {
197
- switchOpenFlow("disable2fa", "enable2fa");
198
- } else if (value === "disabled") {
199
- if (!allowDisable2FA) {
200
- void showDisable2faBlockedModal();
201
- return;
202
- }
203
- switchOpenFlow("enable2fa", "disable2fa");
204
- }
205
- }
206
- }
207
- )
208
- }
209
- ),
210
- successMessage && /* @__PURE__ */ jsx(Text, { small: true, success: true, style: { position: "absolute", bottom: 0, left: 0 }, children: /* @__PURE__ */ jsx("p", { children: successMessage }) })
211
- ] }),
212
- customComponent && (typeof customComponent === "function" ? customComponent(flowActions) : React__default.isValidElement(customComponent) ? React__default.createElement(customComponent.type, {
213
- ...customComponent.props,
214
- flowActions
215
- }) : customComponent),
216
- isFlowopen.enable2fa && /* @__PURE__ */ jsx(
217
- stdin_default$2,
218
- {
219
- showFlow: isFlowopen.enable2fa,
220
- setShowFlow: (value) => {
221
- if (!value) {
222
- handleFlowClose("enable2fa", enable2faCompletedRef.current);
223
- } else {
224
- setIsFlowOpen({ ...isFlowopen, enable2fa: value });
225
- }
226
- },
227
- totpData,
228
- onRequiresRecentLoginError: onRequiresRecentLoginErrorHandler,
229
- onSuccess: onEnable2FASuccess
230
- }
231
- ),
232
- allowDisable2FA && isFlowopen.disable2fa && /* @__PURE__ */ jsx(
233
- stdin_default$3,
234
- {
235
- showFlow: isFlowopen.disable2fa,
236
- setShowFlow: (value) => {
237
- if (!value) {
238
- handleFlowClose("disable2fa", disable2faCompletedRef.current);
239
- } else {
240
- setIsFlowOpen({ ...isFlowopen, disable2fa: value });
241
- }
242
- },
243
- onRequiresRecentLoginError: onRequiresRecentLoginErrorHandler,
244
- onSuccess: onDisable2FASuccess
245
- }
246
- ),
247
- isFlowopen.requiresRecentLogin && /* @__PURE__ */ jsx(Modal, { isOpen: isFlowopen.requiresRecentLogin, onClose: () => handleFlowClose("requiresRecentLogin"), children: /* @__PURE__ */ jsx(ModalInner, { noPadding: true, children: /* @__PURE__ */ jsx(
248
- stdin_default$4,
249
- {
250
- continueButtonId: "2fa-requires-recent-login-btn",
251
- continueButtonDataCy: "2fa-requires-recent-login-submit",
252
- onClick: () => {
253
- void handleLoginAgain();
254
- },
255
- titleText: recentLoginTitle,
256
- subTitleLeft: recentLoginSubtitle,
257
- buttonText: recentLoginCTA
258
- }
259
- ) }) }),
260
- !showInlineLoginOnLogout ? null : !user && /* @__PURE__ */ jsx(stdin_default$5, {})
261
- ] });
262
- };
263
- Main2FAFlow.propTypes = {
264
- onRequiresRecentLoginError: PropTypes.func,
265
- allowDisable2FA: PropTypes.bool,
266
- /** Called when any flow/modal is closed. Receives the flowId: 'enable2fa' | 'disable2fa' | 'requiresRecentLogin' */
267
- onFlowClose: PropTypes.func
268
- };
269
- var stdin_default = Main2FAFlow;
270
- export {
271
- Main2FAFlow,
272
- stdin_default as default
273
- };
@@ -1,69 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import PropTypes from "prop-types";
3
- import "react";
4
- import { Wrapper } from "../Grid/Grid.styles.js";
5
- import { StyledFooter, FooterInner, PartnerWrap, Partner, PartnerLine, PartnerLineBreak, LogoWrap, PoweredWrap, Copyright } from "./Footer.styles.js";
6
- import MangoPayLogo from "../../static/images/mangopay.svg.js";
7
- const Footer = ({ color = "primary", hasSidebar = false, isSidebarExpanded }) => /* @__PURE__ */ jsx(StyledFooter, { color, isSidebarExpanded, hasSidebar, children: /* @__PURE__ */ jsx(Wrapper, { children: /* @__PURE__ */ jsxs(FooterInner, { hasSidebar, children: [
8
- /* @__PURE__ */ jsx(PartnerWrap, { children: /* @__PURE__ */ jsxs(Partner, { children: [
9
- /* @__PURE__ */ jsxs(PartnerLine, { children: [
10
- "STOKR is a crypto asset service provider (",
11
- /* @__PURE__ */ jsx(
12
- "a",
13
- {
14
- href: "https://edesk.apps.cssf.lu/search-entities/entite/details/7079114?lng=en&q=&st=advanced&entType=CASP&entDate=2020-08-01",
15
- title: "CASP",
16
- target: "_blank",
17
- rel: "noopener noreferrer",
18
- style: { textDecoration: "underline", color: "white" },
19
- children: "CASP"
20
- }
21
- ),
22
- ") ",
23
- /* @__PURE__ */ jsx(PartnerLineBreak, {}),
24
- "and payment institution (",
25
- /* @__PURE__ */ jsx(
26
- "a",
27
- {
28
- href: "https://edesk.apps.cssf.lu/search-entities/entite/details/7079119?lng=en&q=&st=advanced&entType=PI&entDate=2020-08-01",
29
- title: "PI",
30
- target: "_blank",
31
- rel: "noopener noreferrer",
32
- style: { textDecoration: "underline", color: "white" },
33
- children: "PI"
34
- }
35
- ),
36
- "),"
37
- ] }),
38
- /* @__PURE__ */ jsx(PartnerLine, { children: "registered with the Luxembourg regulator CSSF." })
39
- ] }) }),
40
- /* @__PURE__ */ jsx(LogoWrap, { children: /* @__PURE__ */ jsx(
41
- "img",
42
- {
43
- style: {
44
- verticalAlign: "middle",
45
- minWidth: 44,
46
- maxWidth: 120
47
- },
48
- loading: "lazy",
49
- src: MangoPayLogo,
50
- alt: "Mangopay logo"
51
- }
52
- ) }),
53
- /* @__PURE__ */ jsx(PoweredWrap, { children: /* @__PURE__ */ jsxs(Copyright, { children: [
54
- "Copyright ",
55
- (/* @__PURE__ */ new Date()).getFullYear(),
56
- " STOKR. All rights reserved."
57
- ] }) })
58
- ] }) }) });
59
- Footer.propTypes = {
60
- color: PropTypes.oneOf(["primary", "red"]),
61
- lemonwayLogo: PropTypes.string,
62
- hasSidebar: PropTypes.bool,
63
- isSidebarExpanded: PropTypes.bool
64
- };
65
- var stdin_default = Footer;
66
- export {
67
- Footer,
68
- stdin_default as default
69
- };
@@ -1,277 +0,0 @@
1
- import rwd from "../../styles/rwd.js";
2
- import grid from "../../styles/grid.js";
3
- import { colors } from "../../styles/colors.js";
4
- import spacing from "../../styles/spacing.js";
5
- import styled, { css } from "styled-components";
6
- const StyledFooter = styled.footer.withConfig({
7
- shouldForwardProp: (props) => !["color", "hasSidebar", "isSidebarExpanded"].includes(props)
8
- })`
9
- z-index: 15;
10
- position: relative;
11
-
12
- ${(props) => props.color === "primary" && css`
13
- color: ${colors.white};
14
- background-color: ${colors.blue};
15
-
16
- ${rwd.Medium`
17
- box-shadow: inset 0 1px 0 0 ${colors.blueDark};
18
- `}
19
- `}
20
-
21
- ${(props) => props.color === "red" && css`
22
- color: ${colors.white};
23
- background-color: ${colors.rustyRed};
24
- padding: 0 25px;
25
-
26
- ${rwd.Medium`
27
- box-shadow: inset 0 1px 0 0 ${colors.rustyRed};
28
- `}
29
-
30
- ${rwd.XLarge`
31
- padding: 0 50px;
32
- `}
33
- `}
34
-
35
- ${rwd.Medium`
36
- width: 100%;
37
- min-height: ${spacing.footerHeight}px;
38
- `}
39
-
40
- @media screen and (max-width: 991px) {
41
- height: auto;
42
- }
43
-
44
- ${(props) => props.hasSidebar && `
45
- padding: 0px !important;
46
- transition: 0.3s padding;
47
- `}
48
-
49
- ${(props) => props.isSidebarExpanded && `
50
- padding-left:200px !important;
51
- `}
52
- `;
53
- const FooterInner = styled.div.withConfig({
54
- shouldForwardProp: (props) => !["hasSidebar"].includes(props)
55
- })`
56
- padding: 24px 0;
57
- justify-content: space-between;
58
-
59
- ${(props) => props.hasSidebar && `
60
- padding: 24px ${grid(1)};
61
- `}
62
-
63
- ${rwd.Medium`
64
- padding: 14px 0;
65
- display: flex;
66
- align-items: center;
67
- min-height: ${spacing.footerHeight}px;
68
-
69
- ${(props) => props.hasSidebar && `
70
- padding: 20px ${grid(1)};
71
- `}
72
- `}
73
-
74
- @media screen and (max-width: 991px) {
75
- flex-direction: column;
76
- padding: 56px 32px;
77
- }
78
- `;
79
- const LogoWrap = styled.div`
80
- margin-bottom: 25px;
81
- text-align: center;
82
-
83
- ${rwd.MLarge`
84
- margin-bottom:0px;
85
- `}
86
- `;
87
- styled.div`
88
- text-align: center;
89
-
90
- ${rwd.Medium`
91
- flex: 2;
92
- `}
93
- `;
94
- const PartnerWrap = styled.div`
95
- text-align: center;
96
-
97
- ${rwd.MLarge`
98
- text-align: left;
99
- `}
100
-
101
- @media screen and (max-width: 991px) {
102
- text-align: center;
103
- margin-bottom: 25px;
104
- }
105
- `;
106
- const PoweredWrap = styled.div`
107
- text-align: center;
108
-
109
- text-transform: uppercase;
110
- letter-spacing: 2.1px;
111
- line-height: 1.8;
112
- font-weight: 400;
113
- font-size: 10px;
114
-
115
- ${rwd.Medium`
116
- text-align: left;
117
- //margin-top: 10px;
118
- `}
119
-
120
- @media screen and (max-width: 991px) {
121
- text-align: center;
122
-
123
- div {
124
- margin-top: 10px;
125
- }
126
- }
127
- `;
128
- styled.nav`
129
- display: block;
130
- font-size: 0;
131
- padding-top: 6px;
132
- padding-bottom: 30px;
133
-
134
- ${rwd.Medium`
135
- padding-top: 0;
136
- padding-bottom: 0;
137
- `}
138
-
139
- ul {
140
- display: block;
141
- margin: 0;
142
- padding: 0;
143
- margin-left: -32px;
144
- }
145
-
146
- li {
147
- display: inline-block;
148
- vertical-align: middle;
149
- margin-left: 32px;
150
- }
151
-
152
- a {
153
- position: relative;
154
- display: block;
155
- font-size: 12px;
156
- line-height: 16px;
157
- letter-spacing: 2px;
158
- text-transform: uppercase;
159
- padding: 2px 0;
160
-
161
- &:before {
162
- content: '';
163
- display: block;
164
- height: 2px;
165
- width: 100%;
166
- position: absolute;
167
- top: 100%;
168
- left: 0;
169
- background-color: ${colors.white};
170
- opacity: 0;
171
- transform: translateY(8px);
172
- transition:
173
- opacity 0.2s,
174
- transform 0.2s;
175
- }
176
-
177
- &:hover {
178
- &:before {
179
- opacity: 1;
180
- transform: translateY(0);
181
- }
182
- }
183
-
184
- ${rwd.Medium`
185
- font-size: 9px;
186
- line-height: 16px;
187
- `}
188
- }
189
- `;
190
- const Partner = styled.span`
191
- display: block;
192
- text-transform: uppercase;
193
-
194
- font-size: 10px;
195
- font-weight: 400;
196
- line-height: 1.8;
197
- letter-spacing: 1.8px;
198
-
199
- img {
200
- margin-bottom: 4px;
201
- }
202
-
203
- @media screen and (max-width: 560px) {
204
- line-height: 16px;
205
- }
206
- `;
207
- const PartnerLine = styled.span`
208
- display: block;
209
-
210
- ${rwd.MLarge`
211
- white-space: nowrap;
212
- `}
213
- `;
214
- const PartnerLineBreak = styled.span`
215
- display: block;
216
-
217
- ${rwd.XLarge`
218
- display: none;
219
- `}
220
- `;
221
- const Copyright = styled.span`
222
- img {
223
- margin-bottom: 4px;
224
- }
225
- `;
226
- styled.div`
227
- display: flex;
228
- flex-direction: column;
229
- align-items: self-start;
230
-
231
- span {
232
- vertical-align: middle;
233
- text-transform: uppercase;
234
- -webkit-letter-spacing: 2.1px;
235
- -moz-letter-spacing: 2.1px;
236
- -ms-letter-spacing: 2.1px;
237
- letter-spacing: 2.1px;
238
- line-height: 10x;
239
- white-space: nowrap;
240
- color: inherit;
241
- }
242
-
243
- a {
244
- display: inline-block;
245
- vertical-align: middle;
246
- margin-left: 4px;
247
- transition: opacity 0.2s;
248
-
249
- &:hover {
250
- opacity: 0.5;
251
- }
252
- }
253
-
254
- img {
255
- /* display: block;
256
- max-height: 12px;
257
- width: auto; */
258
- /* margin-left: 6px; */
259
- position: relative;
260
- //width: 42px;
261
- }
262
-
263
- @media screen and (max-width: 991px) {
264
- align-items: center;
265
- }
266
- `;
267
- export {
268
- Copyright,
269
- FooterInner,
270
- LogoWrap,
271
- Partner,
272
- PartnerLine,
273
- PartnerLineBreak,
274
- PartnerWrap,
275
- PoweredWrap,
276
- StyledFooter
277
- };