@stokr/components-library 3.0.75 → 3.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -58,7 +58,6 @@ export default function App() {
|
|
|
58
58
|
baseUrlPublic: import.meta.env.VITE_BASE_URL_PUBLIC,
|
|
59
59
|
cookieDomain: import.meta.env.VITE_COOKIE_DOMAIN,
|
|
60
60
|
websiteDomain: import.meta.env.VITE_WEBSITE_DOMAIN,
|
|
61
|
-
photoApiUrl: import.meta.env.VITE_PHOTO_API_URL,
|
|
62
61
|
onboardingUrl: import.meta.env.VITE_ONBOARDING_URL,
|
|
63
62
|
dashboardUrl: import.meta.env.VITE_DASHBOARD_URL,
|
|
64
63
|
adminUrl: import.meta.env.VITE_ADMIN_URL,
|
|
@@ -105,7 +104,6 @@ VITE_REGISTER_URL=https://example.com/signup
|
|
|
105
104
|
| `baseUrlPublic` | `VITE_BASE_URL_PUBLIC` | Public API base |
|
|
106
105
|
| `cookieDomain` | `VITE_COOKIE_DOMAIN` | Auth cookie `domain` attribute |
|
|
107
106
|
| `websiteDomain` | `VITE_WEBSITE_DOMAIN` | Bare host → links / `getPlatformURL()` |
|
|
108
|
-
| `photoApiUrl` | `VITE_PHOTO_API_URL` | Avatars / media |
|
|
109
107
|
| `onboardingUrl` | `VITE_ONBOARDING_URL` | Full signup/sign-in app URL |
|
|
110
108
|
| `dashboardUrl` | `VITE_DASHBOARD_URL` | Investor dashboard URL |
|
|
111
109
|
| `adminUrl` | `VITE_ADMIN_URL` | Venture / admin dashboard URL |
|
|
@@ -28,7 +28,8 @@ const Main2FAFlow = ({
|
|
|
28
28
|
onFlowClose,
|
|
29
29
|
recentLoginTitle = "LOG IN AGAIN",
|
|
30
30
|
recentLoginSubtitle = "To continue please log in again and set up your two factor authentication",
|
|
31
|
-
recentLoginCTA = "Log in again"
|
|
31
|
+
recentLoginCTA = "Log in again",
|
|
32
|
+
showInlineLoginOnLogout = true
|
|
32
33
|
}) => {
|
|
33
34
|
const { user, checkMfaEnrollment, userMfaEnrollment, generateTotpSecret, logoutUser } = useContext(AuthContext);
|
|
34
35
|
const [isFlowopen, setIsFlowOpen] = useState({
|
|
@@ -256,7 +257,7 @@ const Main2FAFlow = ({
|
|
|
256
257
|
buttonText: recentLoginCTA
|
|
257
258
|
}
|
|
258
259
|
) }) }),
|
|
259
|
-
!user && /* @__PURE__ */ jsx(stdin_default$5, {})
|
|
260
|
+
!showInlineLoginOnLogout ? null : !user && /* @__PURE__ */ jsx(stdin_default$5, {})
|
|
260
261
|
] });
|
|
261
262
|
};
|
|
262
263
|
Main2FAFlow.propTypes = {
|
|
@@ -18,7 +18,8 @@ const Modal = ({
|
|
|
18
18
|
background,
|
|
19
19
|
maxHeight,
|
|
20
20
|
boxStyles,
|
|
21
|
-
maxWidth
|
|
21
|
+
maxWidth,
|
|
22
|
+
hideCloseButton = false
|
|
22
23
|
}) => {
|
|
23
24
|
const [isVisible, setIsVisible] = useState(false);
|
|
24
25
|
const [shouldRender, setShouldRender] = useState(false);
|
|
@@ -80,7 +81,7 @@ const Modal = ({
|
|
|
80
81
|
maxHeight,
|
|
81
82
|
maxWidth,
|
|
82
83
|
children: [
|
|
83
|
-
/* @__PURE__ */ jsx(ModalClose, { onClick: onClose }),
|
|
84
|
+
!hideCloseButton && /* @__PURE__ */ jsx(ModalClose, { onClick: onClose }),
|
|
84
85
|
children
|
|
85
86
|
]
|
|
86
87
|
}
|
|
@@ -101,7 +102,9 @@ Modal.propTypes = {
|
|
|
101
102
|
boxStyle: PropTypes.object,
|
|
102
103
|
maxHeight: PropTypes.string,
|
|
103
104
|
/** Max width limit in pixels (e.g., '1200px'). Uses min(percentage, maxWidth) */
|
|
104
|
-
maxWidth: PropTypes.string
|
|
105
|
+
maxWidth: PropTypes.string,
|
|
106
|
+
/** Hides the (X) close button — for flows where the modal is dismissed only via its own actions. */
|
|
107
|
+
hideCloseButton: PropTypes.bool
|
|
105
108
|
};
|
|
106
109
|
export {
|
|
107
110
|
Modal,
|
|
@@ -18,7 +18,8 @@ const SuccessModalComponent = ({
|
|
|
18
18
|
segment,
|
|
19
19
|
speed = 1,
|
|
20
20
|
modalProps = {},
|
|
21
|
-
maxWidth = "800px"
|
|
21
|
+
maxWidth = "800px",
|
|
22
|
+
hideAnimation = false
|
|
22
23
|
}) => {
|
|
23
24
|
useEffect(() => {
|
|
24
25
|
if (!isOpen) return;
|
|
@@ -40,7 +41,7 @@ const SuccessModalComponent = ({
|
|
|
40
41
|
maxWidth,
|
|
41
42
|
...modalProps,
|
|
42
43
|
children: /* @__PURE__ */ jsxs(SuccessModalContent, { children: [
|
|
43
|
-
/* @__PURE__ */ jsx(AnimationContainer, { children: /* @__PURE__ */ jsx(
|
|
44
|
+
!hideAnimation && /* @__PURE__ */ jsx(AnimationContainer, { children: /* @__PURE__ */ jsx(
|
|
44
45
|
LottieAnimation,
|
|
45
46
|
{
|
|
46
47
|
variant,
|
|
@@ -72,7 +73,9 @@ SuccessModalComponent.propTypes = {
|
|
|
72
73
|
segment: PropTypes.arrayOf(PropTypes.number),
|
|
73
74
|
speed: PropTypes.number,
|
|
74
75
|
modalProps: PropTypes.object,
|
|
75
|
-
maxWidth: PropTypes.string
|
|
76
|
+
maxWidth: PropTypes.string,
|
|
77
|
+
/** Skips the animation container entirely (e.g. a plain form step with no success/progress state). */
|
|
78
|
+
hideAnimation: PropTypes.bool
|
|
76
79
|
};
|
|
77
80
|
let successContainer = null;
|
|
78
81
|
let successRoot = null;
|
|
@@ -962,7 +962,6 @@ AuthProviderClass.propTypes = {
|
|
|
962
962
|
baseUrlPublic: PropTypes.string,
|
|
963
963
|
cookieDomain: PropTypes.string,
|
|
964
964
|
websiteDomain: PropTypes.string,
|
|
965
|
-
photoApiUrl: PropTypes.string,
|
|
966
965
|
/** Full base URL for the onboarding / sign-up app (e.g. `'https://signup.stokr.io'` or `'https://stokr.io/signin'`). */
|
|
967
966
|
onboardingUrl: PropTypes.string,
|
|
968
967
|
/** Full base URL for the investor dashboard (e.g. `'https://dashboard.stokr.io'`). */
|
package/dist/runtime-config.js
CHANGED
|
@@ -5,7 +5,6 @@ const ENV_KEY_BY_CONFIG = {
|
|
|
5
5
|
baseUrlPublic: "VITE_BASE_URL_PUBLIC",
|
|
6
6
|
cookieDomain: "VITE_COOKIE_DOMAIN",
|
|
7
7
|
websiteDomain: "VITE_WEBSITE_DOMAIN",
|
|
8
|
-
photoApiUrl: "VITE_PHOTO_API_URL",
|
|
9
8
|
onboardingUrl: "VITE_ONBOARDING_URL",
|
|
10
9
|
dashboardUrl: "VITE_DASHBOARD_URL",
|
|
11
10
|
adminUrl: "VITE_ADMIN_URL",
|