@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.
- package/README.md +177 -177
- package/dist/components/Input/InputPassword.js +3 -5
- package/dist/components/Input/OtpInput.js +1 -3
- package/dist/components/MenuNav/MenuNav.styles.js +1 -2
- package/dist/components/Modal/Modal.js +6 -3
- package/dist/components/Modal/Modal.styles.js +2 -3
- package/dist/components/Modal/SuccessModal/SuccessModal.js +6 -3
- package/dist/components/Newsletter/Newsletter.js +1 -3
- package/dist/components/NotificationCounter/NotificationCounter.styles.js +1 -2
- package/dist/components/SmartLink/SmartLink.js +0 -2
- package/dist/components/StepController/StepController.js +3 -5
- package/dist/components/StepController/StepController.styles.js +102 -1
- package/dist/components/StepController/StepControllerProgress.js +1 -1
- package/dist/components/Switch/Switch.js +1 -3
- package/dist/components/ToDoList/ToDoListTask.js +15 -3
- package/dist/components/taxId/register-taxid.js +7 -5
- package/dist/index.js +67 -141
- package/dist/manifest.json +25 -25
- package/dist/robots.txt +3 -3
- package/dist/runtime-config.js +5 -71
- package/dist/static/fonts/icomoon/icomoon.eot +0 -0
- package/dist/static/fonts/icomoon/icomoon.svg +52 -52
- package/dist/static/fonts/icomoon/icomoon.ttf +0 -0
- package/dist/static/fonts/icomoon/icomoon.woff +0 -0
- package/dist/static/fonts/icomoon/selection.json +0 -0
- package/dist/static/fonts/icomoon/style.css +0 -0
- package/dist/static/images/Glassess.svg +5 -5
- package/dist/static/images/add-folder-icon.svg +4 -4
- package/dist/static/images/arrow-down-black.svg +21 -21
- package/dist/static/images/check-icon.svg +3 -3
- package/dist/static/images/checkmark-circle-icon.svg +3 -3
- package/dist/static/images/close-circle-icon.svg +2 -2
- package/dist/static/images/copy_icon.svg +4 -4
- package/dist/static/images/cross-icon.svg +3 -3
- package/dist/static/images/currency/eth.svg +10 -10
- package/dist/static/images/currency/eth_logo.svg +8 -8
- package/dist/static/images/currency/eur.svg +4 -4
- package/dist/static/images/currency/eur.svg.js +1 -1
- package/dist/static/images/currency/usd.svg +4 -4
- package/dist/static/images/currency/usd.svg.js +1 -1
- package/dist/static/images/currency/usdc-logo.svg +5 -5
- package/dist/static/images/doc-icon.svg +3 -3
- package/dist/static/images/download_icon.svg +3 -3
- package/dist/static/images/external-link-icon.svg +3 -3
- package/dist/static/images/filter-icon.svg +6 -6
- package/dist/static/images/globe.svg +15 -15
- package/dist/static/images/mangopay.svg +20 -20
- package/dist/static/images/numbers/number_eight.svg +3 -3
- package/dist/static/images/numbers/number_five.svg +4 -4
- package/dist/static/images/numbers/number_four.svg +3 -3
- package/dist/static/images/numbers/number_nine.svg +4 -4
- package/dist/static/images/numbers/number_one.svg +4 -4
- package/dist/static/images/numbers/number_seven.svg +4 -4
- package/dist/static/images/numbers/number_six.svg +4 -4
- package/dist/static/images/numbers/number_three.svg +3 -3
- package/dist/static/images/numbers/number_two.svg +4 -4
- package/dist/static/images/numbers/number_zero.svg +3 -3
- package/dist/static/images/plus-icon.svg +4 -4
- package/dist/static/images/prof-inv.svg +3 -3
- package/dist/static/images/search-icon.svg +3 -3
- package/dist/static/images/transfer-icon.svg +10 -10
- package/dist/static/images/trash.svg +16 -16
- package/dist/static/images/upload.svg +5 -5
- package/dist/static/images/warning-filled.svg +3 -3
- package/dist/styles/global.js +1 -2
- package/dist/utils/check-todo-status.js +1 -2
- package/package.json +137 -143
- package/dist/api/authenticationApi.js +0 -13
- package/dist/auth/index.js +0 -34
- package/dist/components/2FA/Connect2FA.js +0 -58
- package/dist/components/2FA/EnterCode.js +0 -74
- package/dist/components/2FA/InstallAuthApp.js +0 -68
- package/dist/components/2FA/ResetCode.js +0 -34
- package/dist/components/2FA/Sucess2FA.js +0 -63
- package/dist/components/2FA/disable-2fa-flow.js +0 -104
- package/dist/components/2FA/enable-2fa-flow.js +0 -167
- package/dist/components/2FA/login-with-otp-flow.js +0 -262
- package/dist/components/2FA/main-flow.js +0 -273
- package/dist/components/Footer/Footer.js +0 -69
- package/dist/components/Footer/Footer.styles.js +0 -277
- package/dist/components/Footer/FooterLayout.js +0 -150
- package/dist/components/Footer/FooterMenu.js +0 -107
- package/dist/components/Footer/FooterMenu.styles.js +0 -334
- package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +0 -121
- package/dist/components/Header/Header.js +0 -441
- package/dist/components/Header/Header.styles.js +0 -568
- package/dist/components/Layout/Layout.js +0 -76
- package/dist/components/LoginModal/LoginModal.js +0 -165
- package/dist/components/MainMenu/DynamicMainMenu.js +0 -38
- package/dist/components/MainMenu/MainMenu.js +0 -220
- package/dist/components/MainMenu/MainMenu.styles.js +0 -362
- package/dist/components/Modal/NewVentureModal/NewVentureModal.js +0 -273
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +0 -74
- package/dist/components/RegisterConfirmModal/RegisterConfirmModal.styles.js +0 -20
- package/dist/components/RegisterModal/RegisterModal.js +0 -278
- package/dist/components/ResetConfirmModal/ResetConfirmModal.js +0 -40
- package/dist/components/ResetConfirmModal/ResetConfirmModal.styles.js +0 -41
- package/dist/components/ResetPasswordModal/ResetPasswordModal.js +0 -145
- package/dist/components/StepsProgress/StepIndicator.js +0 -40
- package/dist/components/StepsProgress/StepIndicator.styles.js +0 -69
- package/dist/components/StepsProgress/StepsProgress.js +0 -67
- package/dist/components/StepsProgress/StepsProgress.styles.js +0 -105
- package/dist/components/TermsModal/TermsModal.js +0 -145
- package/dist/components/TermsModal/_styles.js +0 -313
- package/dist/components/VerifyEmailModal/VerifyEmailModal.js +0 -122
- package/dist/components/headerHo/HeaderHo.js +0 -707
- package/dist/config.js +0 -33
- package/dist/context/Auth.js +0 -423
- package/dist/context/AuthContext.js +0 -1016
- package/dist/firebase-config.js +0 -56
- package/dist/hooks/useNewVentureForm.js +0 -235
- package/dist/static/images/background3.png.js +0 -4
- package/dist/static/images/google_auth.png.js +0 -4
- package/dist/static/images/iso27001-black.svg.js +0 -4
- package/dist/static/images/mangopay.svg.js +0 -4
- package/dist/static/images/social/Facebook_Logo.png.js +0 -4
- package/dist/static/images/social/LI-In-Bug.png.js +0 -4
- package/dist/static/images/social/Telegram-Logo.png.js +0 -4
- package/dist/static/images/social/X-logo-black.png.js +0 -4
- package/dist/static/images/social/youtube_social_circle_red.png.js +0 -4
- package/dist/utils/show-account-locked-modal.js +0 -23
- package/dist/utils/user-identity.js +0 -10
- package/dist/utils/withRouter.js +0 -26
package/package.json
CHANGED
|
@@ -1,143 +1,137 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@stokr/components-library",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": "STOKR - Components Library",
|
|
5
|
-
"author": "Bilal Hodzic <bilal@stokr.io>",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "./dist/index.js",
|
|
9
|
-
"module": "./dist/index.js",
|
|
10
|
-
"files": [
|
|
11
|
-
"dist",
|
|
12
|
-
"README.md"
|
|
13
|
-
],
|
|
14
|
-
"exports": {
|
|
15
|
-
".": {
|
|
16
|
-
"import": "./dist/index.js",
|
|
17
|
-
"default": "./dist/index.js"
|
|
18
|
-
},
|
|
19
|
-
"./
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"./
|
|
25
|
-
"./dist
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"react-
|
|
74
|
-
"react-
|
|
75
|
-
"react-
|
|
76
|
-
"react-
|
|
77
|
-
"react-
|
|
78
|
-
"react-
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"react
|
|
84
|
-
"react-
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
},
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"react-
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"@
|
|
96
|
-
"@
|
|
97
|
-
"@
|
|
98
|
-
"@
|
|
99
|
-
"@
|
|
100
|
-
"@
|
|
101
|
-
"@
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"eslint": "
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
},
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
"
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
"keywords": [
|
|
139
|
-
"stokr",
|
|
140
|
-
"components-library",
|
|
141
|
-
"story-book"
|
|
142
|
-
]
|
|
143
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@stokr/components-library",
|
|
3
|
+
"version": "3.1.0-alpha.1",
|
|
4
|
+
"description": "STOKR - Components Library",
|
|
5
|
+
"author": "Bilal Hodzic <bilal@stokr.io>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./ionicons.css": "./dist/static/fonts/Ionicons/ionicons.min.css",
|
|
20
|
+
"./dist/*": "./dist/static/*"
|
|
21
|
+
},
|
|
22
|
+
"sideEffects": [
|
|
23
|
+
"**/*.css",
|
|
24
|
+
"./dist/styles/global.js",
|
|
25
|
+
"./dist/styles/ioniconsStyles.js",
|
|
26
|
+
"./dist/components/Slider/Slider.js",
|
|
27
|
+
"./dist/components/LearnMoreCarousel/LearnMoreCarousel.js"
|
|
28
|
+
],
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "http://46.101.229.186:3000/stokr/components-library"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "vite build",
|
|
35
|
+
"build-storybook": "storybook build",
|
|
36
|
+
"build-storybook-docs": "storybook build -s public --docs",
|
|
37
|
+
"copy:static": "node -e \"require('fs').cpSync('src/static', 'dist/static', {recursive: true})\"",
|
|
38
|
+
"build:dist": "vite build && npm run copy:static",
|
|
39
|
+
"prepare": "npm run build:dist",
|
|
40
|
+
"storybook": "storybook dev -p 6006",
|
|
41
|
+
"start": "npm run storybook",
|
|
42
|
+
"format": "prettier --write ./src",
|
|
43
|
+
"lint": "eslint src",
|
|
44
|
+
"chromatic": "CHROMATIC_APP_CODE=7kzdke5umep chromatic",
|
|
45
|
+
"release": "auto shipit",
|
|
46
|
+
"pub": "npm run publish:build && npm publish --access public",
|
|
47
|
+
"publish:build": "npm run build:dist",
|
|
48
|
+
"dev": "vite dev",
|
|
49
|
+
"serve": "npx http-server ./storybook-static -p 9009"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@floating-ui/react": "^0.27.20",
|
|
53
|
+
"@lottiefiles/dotlottie-react": "^0.19.4",
|
|
54
|
+
"axios": "^1.13.5",
|
|
55
|
+
"country-flag-icons": "^1.6.17",
|
|
56
|
+
"date-fns": "^4.1.0",
|
|
57
|
+
"date-fns-tz": "^3.2.0",
|
|
58
|
+
"dompurify": "^3.2.4",
|
|
59
|
+
"formik": "^2.2.9",
|
|
60
|
+
"html-react-parser": "^5.0.6",
|
|
61
|
+
"js-cookie": "^3.0.5",
|
|
62
|
+
"mixpanel-browser": "^2.74.0",
|
|
63
|
+
"moment": "^2.30.1",
|
|
64
|
+
"moment-timezone": "^0.6.0",
|
|
65
|
+
"prop-types": "^15.8.1",
|
|
66
|
+
"qrcode.react": "^4.2.0",
|
|
67
|
+
"react-collapse": "^5.1.1",
|
|
68
|
+
"react-copy-to-clipboard": "^5.1.0",
|
|
69
|
+
"react-custom-scrollbars-4": "^4.5.1",
|
|
70
|
+
"react-day-picker": "^9.11.1",
|
|
71
|
+
"react-helmet": "^6.1.0",
|
|
72
|
+
"react-intersection-observer": "^10.0.2",
|
|
73
|
+
"react-otp-input": "^3.1.0",
|
|
74
|
+
"react-portal": "^4.2.2",
|
|
75
|
+
"react-range": "^1.8.14",
|
|
76
|
+
"react-select": "^5.7.0",
|
|
77
|
+
"react-slick": "^0.31.0",
|
|
78
|
+
"react-table": "^7.8.0",
|
|
79
|
+
"slick-carousel": "^1.8.1",
|
|
80
|
+
"yup": "^1.0.0"
|
|
81
|
+
},
|
|
82
|
+
"peerDependencies": {
|
|
83
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
84
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
85
|
+
"react-router-dom": "^6.0.0 || ^7.0.0",
|
|
86
|
+
"styled-components": "^6.0.0"
|
|
87
|
+
},
|
|
88
|
+
"devDependencies": {
|
|
89
|
+
"@chromatic-com/storybook": "^5.3.1",
|
|
90
|
+
"@eslint-react/eslint-plugin": "^1.53.1",
|
|
91
|
+
"@eslint/js": "^9.39.2",
|
|
92
|
+
"@storybook/addon-docs": "^10.6.0",
|
|
93
|
+
"@storybook/addon-links": "^10.6.0",
|
|
94
|
+
"@storybook/builder-vite": "^10.6.0",
|
|
95
|
+
"@storybook/react-vite": "^10.6.0",
|
|
96
|
+
"@types/node": "^25.0.10",
|
|
97
|
+
"@types/react": "^19.2.9",
|
|
98
|
+
"@types/react-dom": "^19.2.3",
|
|
99
|
+
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
|
100
|
+
"@typescript-eslint/parser": "^8.53.1",
|
|
101
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
102
|
+
"cross-env": "^10.1.0",
|
|
103
|
+
"depcheck": "^1.4.7",
|
|
104
|
+
"eslint": "^9.39.2",
|
|
105
|
+
"eslint-config-prettier": "^10.1.8",
|
|
106
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
107
|
+
"eslint-plugin-react": "^7.37.2",
|
|
108
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
109
|
+
"eslint-plugin-react-refresh": "^0.4.26",
|
|
110
|
+
"eslint-plugin-storybook": "10.6.0",
|
|
111
|
+
"http-server": "^14.1.1",
|
|
112
|
+
"prettier": "^3.8.1",
|
|
113
|
+
"react": "^19.2.3",
|
|
114
|
+
"react-dom": "^19.2.3",
|
|
115
|
+
"react-router-dom": "^6.30.3",
|
|
116
|
+
"storybook": "^10.6.0",
|
|
117
|
+
"styled-components": "^6.0.7",
|
|
118
|
+
"typescript": "^5.9.3",
|
|
119
|
+
"typescript-eslint": "^8.54.0",
|
|
120
|
+
"vite": "^7.3.1",
|
|
121
|
+
"vite-plugin-dts": "^4.5.4",
|
|
122
|
+
"vite-plugin-lottie": "^1.0.1",
|
|
123
|
+
"vite-plugin-svgr": "4.5.0"
|
|
124
|
+
},
|
|
125
|
+
"overrides": {
|
|
126
|
+
"minimatch": "^10.2.1"
|
|
127
|
+
},
|
|
128
|
+
"bugs": {
|
|
129
|
+
"url": "https://github.com/stokr-io/components-library/issues"
|
|
130
|
+
},
|
|
131
|
+
"homepage": "https://github.com/stokr-io/components-library#readme",
|
|
132
|
+
"keywords": [
|
|
133
|
+
"stokr",
|
|
134
|
+
"components-library",
|
|
135
|
+
"story-book"
|
|
136
|
+
]
|
|
137
|
+
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import axiosInstance from "../model/axios.js";
|
|
2
|
-
const authenticationApi = {
|
|
3
|
-
/**
|
|
4
|
-
* @param {string} pathSegment — appended to `auth/` (e.g. `forgotPass` → `POST auth/forgotPass`)
|
|
5
|
-
* @param {Record<string, unknown>} body
|
|
6
|
-
*/
|
|
7
|
-
post(pathSegment, body) {
|
|
8
|
-
return axiosInstance.post(`auth/${pathSegment}`, body);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
authenticationApi
|
|
13
|
-
};
|
package/dist/auth/index.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
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";
|
|
5
|
-
import { default as default2 } from "../components/2FA/Connect2FA.js";
|
|
6
|
-
import { default as default3 } from "../components/2FA/enable-2fa-flow.js";
|
|
7
|
-
import { default as default4 } from "../components/2FA/EnterCode.js";
|
|
8
|
-
import { default as default5 } from "../components/2FA/InstallAuthApp.js";
|
|
9
|
-
import { default as default6 } from "../components/2FA/login-with-otp-flow.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
|
-
import { getConfig, resetRuntimeConfig } from "../runtime-config.js";
|
|
14
|
-
export {
|
|
15
|
-
Auth,
|
|
16
|
-
AuthConsumer,
|
|
17
|
-
AuthContext,
|
|
18
|
-
AuthProvider,
|
|
19
|
-
default2 as Connect2FA,
|
|
20
|
-
DEFAULT_TOKEN_EXPIRY_MS,
|
|
21
|
-
default3 as Enable2FAFlow,
|
|
22
|
-
default4 as EnterCode,
|
|
23
|
-
default5 as InstallAuthApp,
|
|
24
|
-
LoadingDots,
|
|
25
|
-
default6 as LoginWithOTPFlow,
|
|
26
|
-
default7 as Main2FAFlow,
|
|
27
|
-
default8 as ResetCode,
|
|
28
|
-
StokrLoader,
|
|
29
|
-
StokrLoaderBox,
|
|
30
|
-
default9 as Sucess2FA,
|
|
31
|
-
configure,
|
|
32
|
-
getConfig,
|
|
33
|
-
resetRuntimeConfig
|
|
34
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import { sizes } from "../../styles/rwd.js";
|
|
4
|
-
import { Text } from "../Text/Text.styles.js";
|
|
5
|
-
import stdin_default$2 from "../Button/Button.styles.js";
|
|
6
|
-
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
7
|
-
import { ModalWrapper, ModalInner } from "../Modal/Modal.styles.js";
|
|
8
|
-
import { QRCodeSVG } from "qrcode.react";
|
|
9
|
-
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
10
|
-
import stdin_default$1 from "../CryptoAddress/CryptoAddress.js";
|
|
11
|
-
import { useMobileView } from "../../utils/customHooks.js";
|
|
12
|
-
const Connect2FA = (props) => {
|
|
13
|
-
const { changeStep, totpData } = props;
|
|
14
|
-
const isMobile = useMobileView(sizes.Mobile);
|
|
15
|
-
return /* @__PURE__ */ jsx(ModalWrapper, { children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
16
|
-
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
17
|
-
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
18
|
-
/* @__PURE__ */ jsx("h3", { children: "Activate log in 2FA" }),
|
|
19
|
-
/* @__PURE__ */ jsx("p", { children: "1. Open your authenticator app" }),
|
|
20
|
-
/* @__PURE__ */ jsx("p", { children: isMobile ? "2. Copy the set up key" : "2. Scan the QR code or copy the set up key" })
|
|
21
|
-
] }) }),
|
|
22
|
-
/* @__PURE__ */ jsx(ModalInner, { modalBot: true })
|
|
23
|
-
] }),
|
|
24
|
-
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
|
|
25
|
-
totpData && /* @__PURE__ */ jsxs(ComponentWrapper, { center: true, noPaddingHorizontal: true, children: [
|
|
26
|
-
!isMobile && /* @__PURE__ */ jsx(QRCodeSVG, { size: 180, value: totpData?.totpUri }),
|
|
27
|
-
/* @__PURE__ */ jsx(
|
|
28
|
-
stdin_default$1,
|
|
29
|
-
{
|
|
30
|
-
data: {
|
|
31
|
-
value: totpData.totpSecret?.secretKey,
|
|
32
|
-
tooltip: true
|
|
33
|
-
},
|
|
34
|
-
fontSize: 11,
|
|
35
|
-
wrapperStyle: { paddingRight: 0 },
|
|
36
|
-
dataBoxStyle: { width: "100%", whiteSpace: "nowrap" }
|
|
37
|
-
}
|
|
38
|
-
)
|
|
39
|
-
] }),
|
|
40
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, noPaddingBottom: true, center: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
41
|
-
stdin_default$2,
|
|
42
|
-
{
|
|
43
|
-
minWidth: "150px",
|
|
44
|
-
id: "enable-2fa-connect-continue-btn",
|
|
45
|
-
"data-cy": "enable-2fa-connect-continue",
|
|
46
|
-
onClick: changeStep,
|
|
47
|
-
fluid: true,
|
|
48
|
-
children: "Continue"
|
|
49
|
-
}
|
|
50
|
-
) })
|
|
51
|
-
] }) })
|
|
52
|
-
] }) });
|
|
53
|
-
};
|
|
54
|
-
var stdin_default = Connect2FA;
|
|
55
|
-
export {
|
|
56
|
-
Connect2FA,
|
|
57
|
-
stdin_default as default
|
|
58
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import { Formik } from "formik";
|
|
4
|
-
import { Modal } from "../Modal/Modal.js";
|
|
5
|
-
import stdin_default$1 from "../Form/Form.js";
|
|
6
|
-
import { Text } from "../Text/Text.styles.js";
|
|
7
|
-
import stdin_default$3 from "../Button/Button.styles.js";
|
|
8
|
-
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
9
|
-
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
10
|
-
import stdin_default$2 from "../Input/OtpInput.js";
|
|
11
|
-
import { ModalInner, ModalLinkWrap, ModalLink } from "../Modal/Modal.styles.js";
|
|
12
|
-
import { FormField, FormError } from "../Form/Form.styles.js";
|
|
13
|
-
const Wrapper = ({ isModal, children, isModalOpen, onModalClose, background }) => isModal ? /* @__PURE__ */ jsx(Modal, { isOpen: isModalOpen, onClose: onModalClose, background, children }) : /* @__PURE__ */ jsx(Fragment, { children });
|
|
14
|
-
const EnterCode = (props) => {
|
|
15
|
-
const { popupError = {}, onFormSend, onModalSwitch, isModal, isActionLoading } = props;
|
|
16
|
-
return /* @__PURE__ */ jsx(Wrapper, { isModal, ...props, children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
17
|
-
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
18
|
-
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
19
|
-
/* @__PURE__ */ jsx("h3", { children: "TWO-FACTOR AUTHENTICATION" }),
|
|
20
|
-
/* @__PURE__ */ jsx("p", { children: "Enter the verification code from your authenticator application." })
|
|
21
|
-
] }) }),
|
|
22
|
-
/* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: onModalSwitch && /* @__PURE__ */ jsx(ModalLinkWrap, { children: /* @__PURE__ */ jsx(ModalLink, { type: "button", as: "button", "data-cy": "2fa-enter-code-lost-device", onClick: onModalSwitch, children: "Lost access to your device?" }) }) })
|
|
23
|
-
] }),
|
|
24
|
-
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsx(
|
|
25
|
-
Formik,
|
|
26
|
-
{
|
|
27
|
-
initialValues: { otpInput: "" },
|
|
28
|
-
onSubmit: (values) => {
|
|
29
|
-
onFormSend(values);
|
|
30
|
-
},
|
|
31
|
-
children: ({ values, errors, touched, setFieldValue, setFieldTouched }) => {
|
|
32
|
-
const submitDisabled = !touched.otpInput || !values.otpInput || isActionLoading === "enter2fa";
|
|
33
|
-
return /* @__PURE__ */ jsxs(stdin_default$1, { children: [
|
|
34
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPadding: true, children: /* @__PURE__ */ jsxs(FormField, { children: [
|
|
35
|
-
/* @__PURE__ */ jsx(
|
|
36
|
-
stdin_default$2,
|
|
37
|
-
{
|
|
38
|
-
id: "otp-input",
|
|
39
|
-
name: "otpInput",
|
|
40
|
-
numInputs: 6,
|
|
41
|
-
dataCyPrefix: "2fa-enter-code-otp",
|
|
42
|
-
value: values.otpInput,
|
|
43
|
-
onChange: (e) => {
|
|
44
|
-
setFieldValue("otpInput", e);
|
|
45
|
-
setFieldTouched("otpInput");
|
|
46
|
-
},
|
|
47
|
-
label: "2FA code"
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
/* @__PURE__ */ jsx(FormError, { show: errors.otpInput && touched.otpInput, children: errors.otpInput })
|
|
51
|
-
] }) }),
|
|
52
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingBottom: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
53
|
-
stdin_default$3,
|
|
54
|
-
{
|
|
55
|
-
type: "submit",
|
|
56
|
-
id: "2fa-enter-code-btn",
|
|
57
|
-
"data-cy": "2fa-enter-code-submit",
|
|
58
|
-
fluid: true,
|
|
59
|
-
disabled: submitDisabled,
|
|
60
|
-
children: "Continue"
|
|
61
|
-
}
|
|
62
|
-
) }),
|
|
63
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { paddingVeticalHalf: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(FormError, { show: popupError?.popup === "enter2fa", children: popupError.message }) })
|
|
64
|
-
] });
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
) }) })
|
|
68
|
-
] }) });
|
|
69
|
-
};
|
|
70
|
-
var stdin_default = EnterCode;
|
|
71
|
-
export {
|
|
72
|
-
EnterCode,
|
|
73
|
-
stdin_default as default
|
|
74
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import { Text } from "../Text/Text.styles.js";
|
|
4
|
-
import stdin_default$1 from "../Button/Button.styles.js";
|
|
5
|
-
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
6
|
-
import { ModalWrapper, ModalInner } from "../Modal/Modal.styles.js";
|
|
7
|
-
import GoogleAuthLogo from "../../static/images/google_auth.png.js";
|
|
8
|
-
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
9
|
-
const InstallAuthApp = (props) => {
|
|
10
|
-
const { changeStep } = props;
|
|
11
|
-
return /* @__PURE__ */ jsx(ModalWrapper, { children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
12
|
-
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
13
|
-
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
14
|
-
/* @__PURE__ */ jsx("h3", { children: "Install 2FA APP" }),
|
|
15
|
-
/* @__PURE__ */ jsx("p", { children: "Download and install a 2FA app on your device. We recommend using Google Authenticator" })
|
|
16
|
-
] }) }),
|
|
17
|
-
/* @__PURE__ */ jsx(ModalInner, { modalBot: true })
|
|
18
|
-
] }),
|
|
19
|
-
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
|
|
20
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingTop: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Text, { small: true, children: /* @__PURE__ */ jsx("p", { children: "Click 'Continue' if you already have an app installed." }) }) }),
|
|
21
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, center: true, children: /* @__PURE__ */ jsxs(
|
|
22
|
-
stdin_default$1,
|
|
23
|
-
{
|
|
24
|
-
minWidth: "150px",
|
|
25
|
-
id: "enable-2fa-download-app-btn",
|
|
26
|
-
"data-cy": "enable-2fa-download-auth-app",
|
|
27
|
-
fluid: true,
|
|
28
|
-
onClick: () => {
|
|
29
|
-
window.open("https://onelink.to/ev63j9", "_blank");
|
|
30
|
-
},
|
|
31
|
-
secondary: true,
|
|
32
|
-
children: [
|
|
33
|
-
"DOWNLOAD THE APP",
|
|
34
|
-
" ",
|
|
35
|
-
/* @__PURE__ */ jsx(
|
|
36
|
-
"img",
|
|
37
|
-
{
|
|
38
|
-
src: GoogleAuthLogo,
|
|
39
|
-
width: 20,
|
|
40
|
-
style: {
|
|
41
|
-
verticalAlign: "middle",
|
|
42
|
-
marginLeft: "6px",
|
|
43
|
-
marginTop: "-3px"
|
|
44
|
-
},
|
|
45
|
-
alt: "google auth logo"
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
) }),
|
|
51
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, noPaddingTop: true, center: true, children: /* @__PURE__ */ jsx(
|
|
52
|
-
stdin_default$1,
|
|
53
|
-
{
|
|
54
|
-
minWidth: "150px",
|
|
55
|
-
id: "enable-2fa-install-app-continue-btn",
|
|
56
|
-
"data-cy": "enable-2fa-install-app-continue",
|
|
57
|
-
onClick: changeStep,
|
|
58
|
-
fluid: true,
|
|
59
|
-
children: "Continue"
|
|
60
|
-
}
|
|
61
|
-
) })
|
|
62
|
-
] }) })
|
|
63
|
-
] }) });
|
|
64
|
-
};
|
|
65
|
-
var stdin_default = InstallAuthApp;
|
|
66
|
-
export {
|
|
67
|
-
stdin_default as default
|
|
68
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import { Text } from "../Text/Text.styles.js";
|
|
4
|
-
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
5
|
-
import { Modal } from "../Modal/Modal.js";
|
|
6
|
-
import { ModalInner, ModalLinkWrap, ModalLink } from "../Modal/Modal.styles.js";
|
|
7
|
-
const ResetCode = (props) => {
|
|
8
|
-
const { onModalSwitch, onModalClose, background, isModalOpen } = props;
|
|
9
|
-
return /* @__PURE__ */ jsx(Modal, { isOpen: isModalOpen, onClose: onModalClose, background, children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
10
|
-
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
11
|
-
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
12
|
-
/* @__PURE__ */ jsx("h3", { children: "AUTHENTICATION DEVICE UNAVAILABLE" }),
|
|
13
|
-
/* @__PURE__ */ jsx("p", { children: "Please contact our support team to reset your two-factor authentication." })
|
|
14
|
-
] }) }),
|
|
15
|
-
/* @__PURE__ */ jsx(ModalInner, { modalBot: true, children: /* @__PURE__ */ jsx(ModalLinkWrap, { children: /* @__PURE__ */ jsx(ModalLink, { type: "button", as: "button", "data-cy": "2fa-reset-code-back-to-enter-code", onClick: onModalSwitch, children: "Return to log in" }) }) })
|
|
16
|
-
] }),
|
|
17
|
-
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsx(ModalInner, { children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(
|
|
18
|
-
"a",
|
|
19
|
-
{
|
|
20
|
-
href: "https://stokr.zendesk.com/hc/en-us/requests/new",
|
|
21
|
-
target: "_blank",
|
|
22
|
-
rel: "noreferrer",
|
|
23
|
-
"data-cy": "2fa-reset-code-contact-support",
|
|
24
|
-
style: { textDecoration: "underline" },
|
|
25
|
-
children: "Contact us to reset your two-factor authentication."
|
|
26
|
-
}
|
|
27
|
-
) }) }) }) })
|
|
28
|
-
] }) });
|
|
29
|
-
};
|
|
30
|
-
var stdin_default = ResetCode;
|
|
31
|
-
export {
|
|
32
|
-
ResetCode,
|
|
33
|
-
stdin_default as default
|
|
34
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { Text } from "../Text/Text.styles.js";
|
|
5
|
-
import stdin_default$1 from "../Button/Button.styles.js";
|
|
6
|
-
import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
|
|
7
|
-
import { Row, Column } from "../Grid/Grid.styles.js";
|
|
8
|
-
import { ModalWrapper, ModalInner } from "../Modal/Modal.styles.js";
|
|
9
|
-
const Sucess2FA = ({
|
|
10
|
-
onClick = () => {
|
|
11
|
-
},
|
|
12
|
-
titleText = "Success!",
|
|
13
|
-
subTitleLeft = "",
|
|
14
|
-
textRight = "",
|
|
15
|
-
buttonText = "Continue",
|
|
16
|
-
/** DOM id for the primary action button — override per screen (verify email, enable/disable 2FA, etc.) */
|
|
17
|
-
continueButtonId = "success-flow-continue-btn",
|
|
18
|
-
/** Playwright / analytics-friendly selector for the primary button */
|
|
19
|
-
continueButtonDataCy = "success-flow-continue"
|
|
20
|
-
}) => {
|
|
21
|
-
return /* @__PURE__ */ jsx(ModalWrapper, { children: /* @__PURE__ */ jsxs(Row, { children: [
|
|
22
|
-
/* @__PURE__ */ jsxs(Column, { part: 8, children: [
|
|
23
|
-
/* @__PURE__ */ jsx(ModalInner, { modalTop: true, children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
24
|
-
/* @__PURE__ */ jsxs("h3", { children: [
|
|
25
|
-
titleText,
|
|
26
|
-
" "
|
|
27
|
-
] }),
|
|
28
|
-
/* @__PURE__ */ jsx("p", { children: subTitleLeft })
|
|
29
|
-
] }) }),
|
|
30
|
-
/* @__PURE__ */ jsx(ModalInner, { modalBot: true })
|
|
31
|
-
] }),
|
|
32
|
-
/* @__PURE__ */ jsx(Column, { part: 8, children: /* @__PURE__ */ jsxs(ModalInner, { children: [
|
|
33
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingVertical: true, noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("p", { children: textRight }) }) }),
|
|
34
|
-
/* @__PURE__ */ jsx(ComponentWrapper, { noPaddingHorizontal: true, children: /* @__PURE__ */ jsx(
|
|
35
|
-
stdin_default$1,
|
|
36
|
-
{
|
|
37
|
-
id: continueButtonId,
|
|
38
|
-
minWidth: "240px",
|
|
39
|
-
"data-cy": continueButtonDataCy,
|
|
40
|
-
onClick: () => {
|
|
41
|
-
onClick();
|
|
42
|
-
},
|
|
43
|
-
fluid: true,
|
|
44
|
-
children: buttonText
|
|
45
|
-
}
|
|
46
|
-
) })
|
|
47
|
-
] }) })
|
|
48
|
-
] }) });
|
|
49
|
-
};
|
|
50
|
-
Sucess2FA.propTypes = {
|
|
51
|
-
onClick: PropTypes.func.isRequired,
|
|
52
|
-
titleText: PropTypes.string,
|
|
53
|
-
subTitleLeft: PropTypes.string,
|
|
54
|
-
textRight: PropTypes.string,
|
|
55
|
-
buttonText: PropTypes.string,
|
|
56
|
-
continueButtonId: PropTypes.string,
|
|
57
|
-
continueButtonDataCy: PropTypes.string
|
|
58
|
-
};
|
|
59
|
-
var stdin_default = Sucess2FA;
|
|
60
|
-
export {
|
|
61
|
-
Sucess2FA,
|
|
62
|
-
stdin_default as default
|
|
63
|
-
};
|