@stokr/components-library 3.0.36 → 3.0.38
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/auth/index.js +9 -9
- package/dist/components/2FA/login-with-otp-flow.js +1 -1
- package/dist/components/BlogPost/BlogPost.js +1 -1
- package/dist/components/BlogPost/BlogPost.styles.js +1 -1
- package/dist/components/Button/GlareButton.js +1 -1
- package/dist/components/ConfirmModal/ConfirmModal.js +4 -4
- package/dist/components/Country/CountrySelect.js +117 -0
- package/dist/components/Header/Header.js +2 -3
- package/dist/components/InfoBox/InfoBox.js +22 -18
- package/dist/components/InfoIcon/InfoIcon.js +38 -18
- package/dist/components/InfoIcon/InfoIcon.styles.js +16 -1
- package/dist/components/Input/InputPassword.js +0 -1
- package/dist/components/Input/Select.js +183 -81
- package/dist/components/Input/Select.styles.js +111 -1
- package/dist/components/LearnMoreSection/LearnMore.js +1 -1
- package/dist/components/MainMenu/MainMenu.js +1 -1
- package/dist/components/Modal/NewVentureModal/NewVentureModal.js +1 -1
- package/dist/components/Modal/PaymentModal.js +1 -2
- package/dist/components/Newsletter/Newsletter.styles.js +1 -1
- package/dist/components/RefreshButton/RefreshButton.js +0 -1
- package/dist/components/Snackbar/Snackbar.styles.js +1 -1
- package/dist/components/TabsNav/TabsNav.js +0 -2
- package/dist/components/TaxResidenceCard/TaxResidenceCard.js +209 -0
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +169 -0
- package/dist/components/TeamOverview/TeamOverview.js +0 -1
- package/dist/components/ToDoList/ToDoListTask.js +0 -20
- package/dist/components/VerifyEmailModal/VerifyEmailModal.js +1 -15
- package/dist/components/headerHo/HeaderHo.js +5 -22
- package/dist/context/AuthContext.js +7 -7
- package/dist/index.js +137 -130
- package/dist/static/images/face-scan-icon.svg +7 -0
- package/dist/static/images/globe.svg +16 -0
- package/dist/static/images/globe.svg.js +5 -0
- package/dist/static/images/trash.svg +17 -0
- package/dist/static/images/trash.svg.js +5 -0
- package/dist/utils/customHooks.js +1 -1
- package/dist/utils/get-cookie-domain.js +0 -4
- package/dist/utils/set-redirect-cookie.js +0 -4
- package/package.json +153 -145
package/dist/auth/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { configure } from "../config.js";
|
|
2
|
+
import { Auth, DEFAULT_TOKEN_EXPIRY_MS } from "../context/Auth.js";
|
|
3
|
+
import { AuthConsumer, AuthContext, AuthProvider } from "../context/AuthContext.js";
|
|
4
|
+
import { LoadingDots, StokrLoader, StokrLoaderBox } from "../components/StokrLoader/StokrLoader.js";
|
|
2
5
|
import { default as default2 } from "../components/2FA/Connect2FA.js";
|
|
3
6
|
import { default as default3 } from "../components/2FA/enable-2fa-flow.js";
|
|
4
7
|
import { default as default4 } from "../components/2FA/EnterCode.js";
|
|
5
8
|
import { default as default5 } from "../components/2FA/InstallAuthApp.js";
|
|
6
9
|
import { default as default6 } from "../components/2FA/login-with-otp-flow.js";
|
|
7
|
-
import { default as default7 } from "../components/2FA/
|
|
8
|
-
import { default as default8 } from "../components/2FA/
|
|
9
|
-
import { default as default9 } from "../components/2FA/
|
|
10
|
-
import { Auth, DEFAULT_TOKEN_EXPIRY_MS } from "../context/Auth.js";
|
|
11
|
-
import { AuthConsumer, AuthContext, AuthProvider } from "../context/AuthContext.js";
|
|
12
|
-
import { LoadingDots, StokrLoader, StokrLoaderBox } from "../components/StokrLoader/StokrLoader.js";
|
|
10
|
+
import { default as default7 } from "../components/2FA/main-flow.js";
|
|
11
|
+
import { default as default8 } from "../components/2FA/ResetCode.js";
|
|
12
|
+
import { default as default9 } from "../components/2FA/Sucess2FA.js";
|
|
13
13
|
import { getConfig, resetRuntimeConfig } from "../runtime-config.js";
|
|
14
14
|
export {
|
|
15
15
|
Auth,
|
|
@@ -23,11 +23,11 @@ export {
|
|
|
23
23
|
default5 as InstallAuthApp,
|
|
24
24
|
LoadingDots,
|
|
25
25
|
default6 as LoginWithOTPFlow,
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
default7 as Main2FAFlow,
|
|
27
|
+
default8 as ResetCode,
|
|
28
28
|
StokrLoader,
|
|
29
29
|
StokrLoaderBox,
|
|
30
|
-
|
|
30
|
+
default9 as Sucess2FA,
|
|
31
31
|
configure,
|
|
32
32
|
getConfig,
|
|
33
33
|
resetRuntimeConfig
|
|
@@ -8,9 +8,9 @@ import stdin_default$2 from "./EnterCode.js";
|
|
|
8
8
|
import background from "../../static/images/background3.png.js";
|
|
9
9
|
import stdin_default$3 from "./ResetCode.js";
|
|
10
10
|
import { authenticationApi } from "../../api/authenticationApi.js";
|
|
11
|
+
import { useNavigate } from "react-router-dom";
|
|
11
12
|
import { getConfig, getPlatformURL } from "../../runtime-config.js";
|
|
12
13
|
import { navigateToHref } from "../../routing/navigate-app.js";
|
|
13
|
-
import { useNavigate } from "react-router-dom";
|
|
14
14
|
const LoginWithOTP = ({ withBackground, useRelativePathForMenu = false }) => {
|
|
15
15
|
const navigate = useNavigate();
|
|
16
16
|
const { loginUser, waitingFor2fa, firebaseError, loginUserWithTotp, reset2faFlow } = useContext(AuthContext);
|
|
@@ -2,8 +2,8 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useRef, useEffect } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { Container, ImageWrapper, LoaderWrapper, LoaderImage, Image, Content, Category, TextWrapper, BottomRow, StyledButton } from "./BlogPost.styles.js";
|
|
5
|
-
import { Breakdown } from "../breakdown/Breakdown.js";
|
|
6
5
|
import { loaderGif } from "../StokrLoader/StokrLoader.js";
|
|
6
|
+
import { Breakdown } from "../breakdown/Breakdown.js";
|
|
7
7
|
const BlogPost = ({
|
|
8
8
|
layout = "image-left",
|
|
9
9
|
category,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import rwd from "../../styles/rwd.js";
|
|
2
|
-
import { Breakdown } from "../breakdown/Breakdown.js";
|
|
3
2
|
import theme from "../../styles/theme.js";
|
|
4
3
|
import { Button } from "../Button/Button.styles.js";
|
|
5
4
|
import styled, { css } from "styled-components";
|
|
5
|
+
import { Breakdown } from "../breakdown/Breakdown.js";
|
|
6
6
|
const Content = styled.div.withConfig({
|
|
7
7
|
shouldForwardProp: (props) => props !== "layout"
|
|
8
8
|
})`
|
|
@@ -4,7 +4,7 @@ import { Button } from "./Button.styles.js";
|
|
|
4
4
|
import { colors } from "../../styles/colors.js";
|
|
5
5
|
import { useInView } from "react-intersection-observer";
|
|
6
6
|
import { useState, useRef, useId, useEffect } from "react";
|
|
7
|
-
import styled, {
|
|
7
|
+
import styled, { css, keyframes } from "styled-components";
|
|
8
8
|
const config = {
|
|
9
9
|
colorDark: "rgb(41, 112, 225)",
|
|
10
10
|
colorLight: "#9bfcfd",
|
|
@@ -25,8 +25,8 @@ const ConfirmModalComponent = ({
|
|
|
25
25
|
barColor,
|
|
26
26
|
renderFooter,
|
|
27
27
|
modalProps,
|
|
28
|
-
buttonProps,
|
|
29
|
-
cancelButtonProps,
|
|
28
|
+
buttonProps = {},
|
|
29
|
+
cancelButtonProps = {},
|
|
30
30
|
barStyle,
|
|
31
31
|
maxWidth,
|
|
32
32
|
modalStyles,
|
|
@@ -96,7 +96,7 @@ const ConfirmModalComponent = ({
|
|
|
96
96
|
minWidth: "120px",
|
|
97
97
|
onClick: handleCancel,
|
|
98
98
|
...cancelButtonProps,
|
|
99
|
-
"data-cy": cancelButtonProps["data-cy"] ?? "confirm-modal-cancel",
|
|
99
|
+
"data-cy": cancelButtonProps?.["data-cy"] ?? "confirm-modal-cancel",
|
|
100
100
|
children: cancelText
|
|
101
101
|
}
|
|
102
102
|
),
|
|
@@ -106,7 +106,7 @@ const ConfirmModalComponent = ({
|
|
|
106
106
|
minWidth: "120px",
|
|
107
107
|
onClick: () => handleConfirm(true),
|
|
108
108
|
...buttonProps,
|
|
109
|
-
"data-cy": buttonProps["data-cy"] ?? "confirm-modal-confirm",
|
|
109
|
+
"data-cy": buttonProps?.["data-cy"] ?? "confirm-modal-confirm",
|
|
110
110
|
children: confirmText
|
|
111
111
|
}
|
|
112
112
|
)
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { Select } from "../Input/Select.js";
|
|
6
|
+
import * as Flags from "country-flag-icons/react/3x2";
|
|
7
|
+
import { SelectedChipsTitle, SelectedChipsList, SelectedChip, SelectedChipRemove } from "../Input/Select.styles.js";
|
|
8
|
+
const PillChipsWrapper = styled.div`
|
|
9
|
+
${SelectedChipsTitle} {
|
|
10
|
+
color: #9b9b9b;
|
|
11
|
+
margin-bottom: 10px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
${SelectedChipsList} {
|
|
15
|
+
gap: 10px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
${SelectedChip} {
|
|
19
|
+
padding: 6px 12px 6px 10px;
|
|
20
|
+
border-color: #d8d8d8;
|
|
21
|
+
border-radius: 999px;
|
|
22
|
+
font-size: 13px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
${SelectedChipRemove} {
|
|
26
|
+
color: #9b9b9b;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
transition:
|
|
30
|
+
color 0.15s,
|
|
31
|
+
background-color 0.15s;
|
|
32
|
+
|
|
33
|
+
&:hover {
|
|
34
|
+
color: #202020;
|
|
35
|
+
background-color: #f0f0f0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:disabled {
|
|
39
|
+
cursor: not-allowed;
|
|
40
|
+
opacity: 0.5;
|
|
41
|
+
|
|
42
|
+
&:hover {
|
|
43
|
+
color: #9b9b9b;
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
const FlagFor = ({ code }) => {
|
|
50
|
+
if (!code) return null;
|
|
51
|
+
const Cmp = Flags[code.toUpperCase()];
|
|
52
|
+
if (!Cmp) return null;
|
|
53
|
+
return /* @__PURE__ */ jsx(Cmp, { "aria-hidden": "true", focusable: "false" });
|
|
54
|
+
};
|
|
55
|
+
FlagFor.propTypes = {
|
|
56
|
+
code: PropTypes.string
|
|
57
|
+
};
|
|
58
|
+
const CountrySelect = (props) => {
|
|
59
|
+
const {
|
|
60
|
+
countries,
|
|
61
|
+
multiple = false,
|
|
62
|
+
placeholder = multiple ? "Search and select countries" : "Search countries",
|
|
63
|
+
selectedLabel = "Selected",
|
|
64
|
+
...rest
|
|
65
|
+
} = props;
|
|
66
|
+
const options = useMemo(
|
|
67
|
+
() => (countries ?? []).map((c) => ({
|
|
68
|
+
key: c?.key || c.value?.toString(),
|
|
69
|
+
...c,
|
|
70
|
+
icon: c.icon ? c.icon : /* @__PURE__ */ jsx(FlagFor, { code: c.value })
|
|
71
|
+
})),
|
|
72
|
+
[countries]
|
|
73
|
+
);
|
|
74
|
+
return /* @__PURE__ */ jsx(PillChipsWrapper, { children: /* @__PURE__ */ jsx(
|
|
75
|
+
Select,
|
|
76
|
+
{
|
|
77
|
+
...rest,
|
|
78
|
+
options,
|
|
79
|
+
multiple,
|
|
80
|
+
search: true,
|
|
81
|
+
placeholder,
|
|
82
|
+
selectedLabel
|
|
83
|
+
}
|
|
84
|
+
) });
|
|
85
|
+
};
|
|
86
|
+
CountrySelect.propTypes = {
|
|
87
|
+
id: PropTypes.string.isRequired,
|
|
88
|
+
name: PropTypes.string.isRequired,
|
|
89
|
+
label: PropTypes.string,
|
|
90
|
+
/** Dynamic list returned by your API. `code` must be ISO 3166-1 alpha-2 (e.g. 'be', 'us'). */
|
|
91
|
+
countries: PropTypes.arrayOf(
|
|
92
|
+
PropTypes.shape({
|
|
93
|
+
key: PropTypes.string,
|
|
94
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
95
|
+
label: PropTypes.string.isRequired,
|
|
96
|
+
icon: PropTypes.node
|
|
97
|
+
})
|
|
98
|
+
).isRequired,
|
|
99
|
+
/** string for single mode, string[] for multi mode */
|
|
100
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
101
|
+
multiple: PropTypes.bool,
|
|
102
|
+
placeholder: PropTypes.string,
|
|
103
|
+
selectedLabel: PropTypes.string,
|
|
104
|
+
error: PropTypes.bool,
|
|
105
|
+
touched: PropTypes.bool,
|
|
106
|
+
disabled: PropTypes.bool,
|
|
107
|
+
onChange: PropTypes.func,
|
|
108
|
+
onBlur: PropTypes.func,
|
|
109
|
+
onFocus: PropTypes.func,
|
|
110
|
+
/** Playwright / autocapture: selector on the underlying react-select control */
|
|
111
|
+
dataCy: PropTypes.string
|
|
112
|
+
};
|
|
113
|
+
export {
|
|
114
|
+
CountrySelect,
|
|
115
|
+
FlagFor,
|
|
116
|
+
Flags
|
|
117
|
+
};
|
|
@@ -4,7 +4,6 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import stdin_default$1 from "../SmartLink/SmartLink.js";
|
|
5
5
|
import { Button } from "../Button/Button.styles.js";
|
|
6
6
|
import stdin_default$2 from "../SvgIcons/LogoSvg.js";
|
|
7
|
-
import "../SvgIcons/SocialInstagram.js";
|
|
8
7
|
import { MenuNav } from "../MenuNav/MenuNav.styles.js";
|
|
9
8
|
import stdin_default$4 from "../MainMenu/MainMenu.js";
|
|
10
9
|
import { StepsProgressSignup, StepsProgressHeader } from "../StepsProgress/StepsProgress.js";
|
|
@@ -17,15 +16,15 @@ import { Collapse } from "react-collapse";
|
|
|
17
16
|
import { usePrevious, useMobileView } from "../../utils/customHooks.js";
|
|
18
17
|
import { checkTodoStatus } from "../../utils/check-todo-status.js";
|
|
19
18
|
import { hasLoggedInSession } from "../../utils/user-identity.js";
|
|
20
|
-
import { Breakdown } from "../breakdown/Breakdown.js";
|
|
21
19
|
import { socialSvg } from "../Footer/FooterMenu.js";
|
|
22
20
|
import { Wrapper, FlexContainer } from "../Grid/Grid.styles.js";
|
|
23
21
|
import { getFooterGroups } from "../Footer/FooterLayout.js";
|
|
24
22
|
import { getPlatformURL, getConfig } from "../../runtime-config.js";
|
|
25
|
-
import { navigateToHref } from "../../routing/navigate-app.js";
|
|
26
23
|
import { withRouter } from "../../utils/withRouter.js";
|
|
27
24
|
import { sizes } from "../../styles/rwd.js";
|
|
28
25
|
import { track } from "../../analytics/index.js";
|
|
26
|
+
import { navigateToHref } from "../../routing/navigate-app.js";
|
|
27
|
+
import { Breakdown } from "../breakdown/Breakdown.js";
|
|
29
28
|
const UserAvatarComponent = ({ avatar }) => {
|
|
30
29
|
const [photo, setphoto] = useState(avatarPlaceholder);
|
|
31
30
|
const prevAvatar = usePrevious(avatar);
|
|
@@ -5,22 +5,23 @@ import { colors } from "../../styles/colors.js";
|
|
|
5
5
|
const VARIANTS = {
|
|
6
6
|
warning: {
|
|
7
7
|
background: "#FFFBEB",
|
|
8
|
-
border: colors.
|
|
9
|
-
iconColor:
|
|
8
|
+
border: colors.warningYellow,
|
|
9
|
+
iconColor: colors.warningYellow
|
|
10
10
|
},
|
|
11
11
|
info: {
|
|
12
12
|
background: "#F8FAFC",
|
|
13
13
|
border: colors.blueDark,
|
|
14
|
-
|
|
14
|
+
// border: `${colors.blueDark}80`, // 128 (100% opacity in hex): 50% opacity
|
|
15
|
+
iconColor: colors.blueDark
|
|
15
16
|
},
|
|
16
17
|
error: {
|
|
17
18
|
background: "#FDEDEC",
|
|
18
19
|
border: colors.darkRed,
|
|
19
|
-
iconColor:
|
|
20
|
+
iconColor: colors.darkRed
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
23
|
const Container = styled.div`
|
|
23
|
-
position: relative;
|
|
24
|
+
position: relative;
|
|
24
25
|
display: flex;
|
|
25
26
|
overflow: hidden;
|
|
26
27
|
align-items: flex-start;
|
|
@@ -28,7 +29,7 @@ position: relative;
|
|
|
28
29
|
gap: 12px;
|
|
29
30
|
padding: 12px 20px 12px 16px;
|
|
30
31
|
background: ${(props) => props.$bg};
|
|
31
|
-
border: 1px solid ${(props) => props.$border};
|
|
32
|
+
// border: 1px solid ${(props) => props.$border};
|
|
32
33
|
border-radius: 8px;
|
|
33
34
|
font-size: 12px;
|
|
34
35
|
line-height: 18px;
|
|
@@ -68,14 +69,7 @@ const Content = styled.div`
|
|
|
68
69
|
flex: 1;
|
|
69
70
|
min-width: 0;
|
|
70
71
|
`;
|
|
71
|
-
const InfoBox = ({
|
|
72
|
-
variant = "warning",
|
|
73
|
-
children,
|
|
74
|
-
icon,
|
|
75
|
-
style,
|
|
76
|
-
className,
|
|
77
|
-
noLeftBorder
|
|
78
|
-
}) => {
|
|
72
|
+
const InfoBox = ({ variant = "warning", children, icon, style, className, noLeftBorder }) => {
|
|
79
73
|
const theme = VARIANTS[variant] || VARIANTS.warning;
|
|
80
74
|
const renderIcon = () => {
|
|
81
75
|
if (icon) {
|
|
@@ -83,10 +77,20 @@ const InfoBox = ({
|
|
|
83
77
|
}
|
|
84
78
|
return /* @__PURE__ */ jsx(DefaultIcon, { $color: theme.iconColor });
|
|
85
79
|
};
|
|
86
|
-
return /* @__PURE__ */ jsxs(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
80
|
+
return /* @__PURE__ */ jsxs(
|
|
81
|
+
Container,
|
|
82
|
+
{
|
|
83
|
+
$bg: theme.background,
|
|
84
|
+
$noLeftBorder: noLeftBorder,
|
|
85
|
+
$border: theme.border,
|
|
86
|
+
style,
|
|
87
|
+
className,
|
|
88
|
+
children: [
|
|
89
|
+
renderIcon(),
|
|
90
|
+
/* @__PURE__ */ jsx(Content, { children })
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
90
94
|
};
|
|
91
95
|
export {
|
|
92
96
|
InfoBox
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import "
|
|
2
|
+
import DOMPurify from "dompurify";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
+
import { useId } from "react";
|
|
5
|
+
import parse from "html-react-parser";
|
|
4
6
|
import { Tooltip } from "react-tippy";
|
|
5
|
-
import {
|
|
7
|
+
import { colors } from "../../styles/colors.js";
|
|
6
8
|
import { IoniconsStyles } from "../../styles/ioniconsStyles.js";
|
|
9
|
+
import { Container, ArrowColorGlobalStyle, Icon } from "./InfoIcon.styles.js";
|
|
7
10
|
const InfoIcon = ({
|
|
8
11
|
title = null,
|
|
9
12
|
html = null,
|
|
@@ -14,13 +17,20 @@ const InfoIcon = ({
|
|
|
14
17
|
noIcon,
|
|
15
18
|
disabled,
|
|
16
19
|
fullWidth,
|
|
20
|
+
arrow = true,
|
|
21
|
+
arrowColor = colors.blue,
|
|
22
|
+
theme = "light",
|
|
23
|
+
trigger,
|
|
17
24
|
outline = false,
|
|
18
25
|
containerStyle,
|
|
19
26
|
...props
|
|
20
27
|
}) => {
|
|
28
|
+
const htmlContent = typeof html === "string" ? parse(DOMPurify.sanitize(html)) : html;
|
|
29
|
+
const instanceToken = `info-${useId().replace(/[^a-zA-Z0-9]/g, "")}`;
|
|
30
|
+
const tippyTheme = arrowColor ? `${theme} ${instanceToken}` : theme;
|
|
21
31
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
32
|
/* @__PURE__ */ jsx(IoniconsStyles, {}),
|
|
23
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ jsxs(
|
|
24
34
|
Container,
|
|
25
35
|
{
|
|
26
36
|
noMargin,
|
|
@@ -28,20 +38,25 @@ const InfoIcon = ({
|
|
|
28
38
|
noMarginRight,
|
|
29
39
|
fullWidth,
|
|
30
40
|
style: containerStyle,
|
|
31
|
-
children:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
children: [
|
|
42
|
+
arrowColor && /* @__PURE__ */ jsx(ArrowColorGlobalStyle, { themeName: instanceToken, color: arrowColor }),
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
Tooltip,
|
|
45
|
+
{
|
|
46
|
+
...props,
|
|
47
|
+
position,
|
|
48
|
+
title,
|
|
49
|
+
trigger,
|
|
50
|
+
html: htmlContent,
|
|
51
|
+
useContext: htmlContent != null,
|
|
52
|
+
theme: tippyTheme,
|
|
53
|
+
arrow: arrowColor ? true : arrow,
|
|
54
|
+
duration: 200,
|
|
55
|
+
disabled,
|
|
56
|
+
children: noIcon ? props.children : /* @__PURE__ */ jsx(Icon, { outline })
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
]
|
|
45
60
|
}
|
|
46
61
|
)
|
|
47
62
|
] });
|
|
@@ -53,7 +68,12 @@ InfoIcon.propTypes = {
|
|
|
53
68
|
noMargin: PropTypes.bool,
|
|
54
69
|
noMarginLeft: PropTypes.bool,
|
|
55
70
|
noMarginRight: PropTypes.bool,
|
|
56
|
-
outline: PropTypes.bool
|
|
71
|
+
outline: PropTypes.bool,
|
|
72
|
+
children: PropTypes.node,
|
|
73
|
+
theme: PropTypes.string,
|
|
74
|
+
trigger: PropTypes.oneOf(["click", "focus"]),
|
|
75
|
+
arrow: PropTypes.bool,
|
|
76
|
+
arrowColor: PropTypes.string
|
|
57
77
|
};
|
|
58
78
|
export {
|
|
59
79
|
InfoIcon,
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
1
|
+
import styled, { createGlobalStyle } from "styled-components";
|
|
2
2
|
import theme from "../../styles/theme.js";
|
|
3
|
+
const ArrowColorGlobalStyle = createGlobalStyle`
|
|
4
|
+
.tippy-popper[x-placement^='top'] .tippy-tooltip.${(props) => props.themeName}-theme [x-arrow] {
|
|
5
|
+
border-top-color: ${(props) => props.color} !important;
|
|
6
|
+
}
|
|
7
|
+
.tippy-popper[x-placement^='bottom'] .tippy-tooltip.${(props) => props.themeName}-theme [x-arrow] {
|
|
8
|
+
border-bottom-color: ${(props) => props.color} !important;
|
|
9
|
+
}
|
|
10
|
+
.tippy-popper[x-placement^='left'] .tippy-tooltip.${(props) => props.themeName}-theme [x-arrow] {
|
|
11
|
+
border-left-color: ${(props) => props.color} !important;
|
|
12
|
+
}
|
|
13
|
+
.tippy-popper[x-placement^='right'] .tippy-tooltip.${(props) => props.themeName}-theme [x-arrow] {
|
|
14
|
+
border-right-color: ${(props) => props.color} !important;
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
3
17
|
const Container = styled.div.withConfig({
|
|
4
18
|
shouldForwardProp: (props) => !["noMargin", "noMarginLeft", "noMarginRight", "fullWidth"].includes(props)
|
|
5
19
|
})`
|
|
@@ -59,6 +73,7 @@ const Icon = styled.i.withConfig({
|
|
|
59
73
|
}
|
|
60
74
|
`;
|
|
61
75
|
export {
|
|
76
|
+
ArrowColorGlobalStyle,
|
|
62
77
|
Container,
|
|
63
78
|
Icon
|
|
64
79
|
};
|
|
@@ -2,7 +2,6 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import stdin_default$1 from "../SvgIcons/CapsLockSvg.js";
|
|
5
|
-
import "../SvgIcons/SocialInstagram.js";
|
|
6
5
|
import { InfoIcon } from "../InfoIcon/InfoIcon.js";
|
|
7
6
|
import { Wrapper, Label, InputWrap } from "./Input.styles.js";
|
|
8
7
|
import { InfoIconWrapper, ShowPassword, BottomWrap, PasswordStrengthWrap, PasswordStrengthIndicators, PasswordStrengthIndicator, PasswordStrengthText, CapslockIndicator } from "./InputPassword.styles.js";
|