@stokr/components-library 3.0.74 → 3.0.76

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 (59) hide show
  1. package/README.md +177 -179
  2. package/dist/components/2FA/main-flow.js +3 -2
  3. package/dist/components/Checklist/ChecklistCard.styles.js +1 -1
  4. package/dist/components/Modal/Modal.styles.js +1 -1
  5. package/dist/components/Payment/PaymentDetailsCard.js +2 -2
  6. package/dist/components/Payment/PaymentSuccessCard.js +1 -1
  7. package/dist/components/Snackbar/Snackbar.styles.js +2 -2
  8. package/dist/components/StatusDot/StatusDot.styles.js +8 -1
  9. package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +1 -1
  10. package/dist/context/AuthContext.js +0 -1
  11. package/dist/index.js +2 -2
  12. package/dist/manifest.json +25 -25
  13. package/dist/robots.txt +3 -3
  14. package/dist/runtime-config.js +1 -2
  15. package/dist/static/fonts/icomoon/icomoon.eot +0 -0
  16. package/dist/static/fonts/icomoon/icomoon.svg +52 -52
  17. package/dist/static/fonts/icomoon/icomoon.ttf +0 -0
  18. package/dist/static/fonts/icomoon/icomoon.woff +0 -0
  19. package/dist/static/fonts/icomoon/selection.json +0 -0
  20. package/dist/static/fonts/icomoon/style.css +0 -0
  21. package/dist/static/images/Glassess.svg +5 -5
  22. package/dist/static/images/add-folder-icon.svg +4 -4
  23. package/dist/static/images/arrow-down-black.svg +21 -21
  24. package/dist/static/images/check-icon.svg +3 -3
  25. package/dist/static/images/checkmark-circle-icon.svg +3 -3
  26. package/dist/static/images/close-circle-icon.svg +2 -2
  27. package/dist/static/images/copy_icon.svg +4 -4
  28. package/dist/static/images/cross-icon.svg +3 -3
  29. package/dist/static/images/currency/eth.svg +10 -10
  30. package/dist/static/images/currency/eth_logo.svg +8 -8
  31. package/dist/static/images/currency/eur.svg +4 -4
  32. package/dist/static/images/currency/eur.svg.js +1 -1
  33. package/dist/static/images/currency/usd.svg +4 -4
  34. package/dist/static/images/currency/usd.svg.js +1 -1
  35. package/dist/static/images/currency/usdc-logo.svg +5 -5
  36. package/dist/static/images/doc-icon.svg +3 -3
  37. package/dist/static/images/download_icon.svg +3 -3
  38. package/dist/static/images/external-link-icon.svg +3 -3
  39. package/dist/static/images/filter-icon.svg +6 -6
  40. package/dist/static/images/globe.svg +15 -15
  41. package/dist/static/images/mangopay.svg +20 -20
  42. package/dist/static/images/numbers/number_eight.svg +3 -3
  43. package/dist/static/images/numbers/number_five.svg +4 -4
  44. package/dist/static/images/numbers/number_four.svg +3 -3
  45. package/dist/static/images/numbers/number_nine.svg +4 -4
  46. package/dist/static/images/numbers/number_one.svg +4 -4
  47. package/dist/static/images/numbers/number_seven.svg +4 -4
  48. package/dist/static/images/numbers/number_six.svg +4 -4
  49. package/dist/static/images/numbers/number_three.svg +3 -3
  50. package/dist/static/images/numbers/number_two.svg +4 -4
  51. package/dist/static/images/numbers/number_zero.svg +3 -3
  52. package/dist/static/images/plus-icon.svg +4 -4
  53. package/dist/static/images/prof-inv.svg +3 -3
  54. package/dist/static/images/search-icon.svg +3 -3
  55. package/dist/static/images/transfer-icon.svg +10 -10
  56. package/dist/static/images/trash.svg +16 -16
  57. package/dist/static/images/upload.svg +5 -5
  58. package/dist/static/images/warning-filled.svg +3 -3
  59. package/package.json +143 -143
package/README.md CHANGED
@@ -1,179 +1,177 @@
1
- # @stokr/components-library
2
-
3
- React UI library for STOKR apps: modals, forms, navigation, tables, auth context, styles.
4
-
5
- ## Contents
6
-
7
- - [Quick start](#quick-start) — install, router, `AuthProvider`, styles
8
- - [Configuration reference](#runtime-config) — `config` keys & helpers
9
- - [AuthProvider & AuthContext](#authprovider-optional-props)
10
- - [Troubleshooting](#troubleshooting)
11
- - [Development](#development--publishing)
12
-
13
- ---
14
-
15
- ## Quick start
16
-
17
- **Install**
18
-
19
- ```bash
20
- npm install @stokr/components-library
21
- npm install react react-dom styled-components react-router-dom
22
- ```
23
-
24
- Peers: React 18+/19+, styled-components 6.x, react-router-dom 6.x when you use routing-driven components (`HeaderHo`, `MainMenu`, …).
25
-
26
- **1. Router** — Navigation helpers need a React Router:
27
-
28
- ```jsx
29
- import { BrowserRouter } from 'react-router-dom'
30
- import { RouterWrapper } from '@stokr/components-library'
31
-
32
- // Normal app
33
- root.render(
34
- <BrowserRouter>
35
- <App />
36
- </BrowserRouter>,
37
- )
38
-
39
- // Outside a Router: RouterWrapper wraps children in BrowserRouter once.
40
- // Inside an existing Router: it renders children only (no nested BrowserRouter).
41
- root.render(
42
- <RouterWrapper>
43
- <App />
44
- </RouterWrapper>,
45
- )
46
- ```
47
-
48
- **2. Auth & runtime config (required when consuming via npm)** — Vite freezes `import.meta.env` inside pre-built deps, so push your `.env` at runtime via `config`:
49
-
50
- ```jsx
51
- import { AuthProvider } from '@stokr/components-library'
52
-
53
- export default function App() {
54
- return (
55
- <AuthProvider
56
- config={{
57
- apiUrl: import.meta.env.VITE_API_URL,
58
- baseUrlPublic: import.meta.env.VITE_BASE_URL_PUBLIC,
59
- cookieDomain: import.meta.env.VITE_COOKIE_DOMAIN,
60
- websiteDomain: import.meta.env.VITE_WEBSITE_DOMAIN,
61
- photoApiUrl: import.meta.env.VITE_PHOTO_API_URL,
62
- onboardingUrl: import.meta.env.VITE_ONBOARDING_URL,
63
- dashboardUrl: import.meta.env.VITE_DASHBOARD_URL,
64
- adminUrl: import.meta.env.VITE_ADMIN_URL,
65
- registerUrl: import.meta.env.VITE_REGISTER_URL,
66
- firebase: {
67
- apiKey: import.meta.env.VITE_FIREBASE_API_KEY,
68
- authDomain: import.meta.env.VITE_FIREBASE_AUTH_DOMAIN,
69
- projectId: import.meta.env.VITE_FIREBASE_PROJECT_ID,
70
- storageBucket: import.meta.env.VITE_FIREBASE_STORAGE_BUCKET,
71
- messagingSenderId: import.meta.env.VITE_FIREBASE_MESSAGING_SENDER_ID,
72
- appId: import.meta.env.VITE_FIREBASE_APP_ID,
73
- measurementId: import.meta.env.VITE_FIREBASE_MEASUREMENT_ID,
74
- },
75
- }}>
76
- {/* app */}
77
- </AuthProvider>
78
- )
79
- }
80
- ```
81
-
82
- **3. Earlier config** (e.g. analytics before mount): `import { configure } from '@stokr/components-library'` with the same shape as `config`.
83
-
84
- **4. Icons / fonts** — Optional: `<IoniconsStyles />` at root, or rely on lazy injection when a component uses icons; for Layout / Open Sans: `import '@stokr/components-library/styles.css'`.
85
-
86
- **5. Imports** — `import { ConfirmModal, Button, … } from '@stokr/components-library'`.
87
-
88
- Full URL env example:
89
-
90
- ```bash
91
- VITE_WEBSITE_DOMAIN=example.com
92
- VITE_ONBOARDING_URL=https://signup.example.com
93
- VITE_DASHBOARD_URL=https://dashboard.example.com
94
- VITE_ADMIN_URL=https://admin.example.com
95
- VITE_REGISTER_URL=https://example.com/signup
96
- ```
97
-
98
- ---
99
-
100
- ## Configuration reference {#runtime-config}
101
-
102
- | `config` key | Typical `VITE_*` | Role |
103
- | ----------------- | -------------------------- | ----------------------------------------- |
104
- | `apiUrl` | `VITE_API_URL` | Authenticated REST base |
105
- | `baseUrlPublic` | `VITE_BASE_URL_PUBLIC` | Public API base |
106
- | `cookieDomain` | `VITE_COOKIE_DOMAIN` | Auth cookie `domain` attribute |
107
- | `websiteDomain` | `VITE_WEBSITE_DOMAIN` | Bare host links / `getPlatformURL()` |
108
- | `photoApiUrl` | `VITE_PHOTO_API_URL` | Avatars / media |
109
- | `onboardingUrl` | `VITE_ONBOARDING_URL` | Full signup/sign-in app URL |
110
- | `dashboardUrl` | `VITE_DASHBOARD_URL` | Investor dashboard URL |
111
- | `adminUrl` | `VITE_ADMIN_URL` | Venture / admin dashboard URL |
112
- | `registerUrl` | `VITE_REGISTER_URL` | Public registration entry |
113
- | `firebase` | `VITE_FIREBASE_*` | Firebase client config |
114
-
115
- **Helpers:** `getConfig('…')` for any key above; `getPlatformURL()` `https://{websiteDomain}`; `getAnalyticsIngestUrl()`, `getBackofficeAppUrl(path)`; **`getFooterGroups()`** replaces static footer URL lists.
116
-
117
- **Auth-only HTTP:** `authenticationApi.post(segment, body)` for `auth/*`; default axios stays the main API client after login.
118
-
119
- Missing overrides may trigger a **one-time** warning listing unresolved `VITE_*` expectations.
120
-
121
- ---
122
-
123
- ## AuthProvider & AuthContext {#authprovider-optional-props}
124
-
125
- `AuthProvider` is wrapped with **`withRouter`** — mount it inside a **`Router`** so redirects work.
126
-
127
- ### Optional provider props
128
-
129
- - **`inactivityTimeMs`** — Idle timeout before auto-logout + session modal (default 5min).
130
- - **`inactivityWarningBeforeMs`** — How long before that timeout to show the **“session about to expire”** warning modal (default 30 s). See [Inactivity auto-logout](#inactivity-auto-logout).
131
- - **`accessTokenExpiryMs`** — Cookie TTL when **`Auth.setAccessToken`** runs (default **`DEFAULT_TOKEN_EXPIRY_MS`** = 1 h); not extended by **`getUser`** alone.
132
- - **`hideInactivityModal`** — Suppress both built-in inactivity modals (warning + session expired).
133
- - **`onSessionExpiredLoginClick`** — Called when the user clicks **Log in** on the session-expired modal.
134
- - **`customValidateGetUser(user)`** Hook after **`user/get`** succeeds (see `src/context/AuthContext.js`).
135
-
136
- ### Inactivity auto-logout {#inactivity-auto-logout}
137
-
138
- When a user is logged in, `AuthProvider` resets an idle timer on mouse, keyboard, click, scroll, and touch events.
139
-
140
- 1. **Warning modal** — Shown **`inactivityWarningBeforeMs`** before the idle deadline (default: 30 s before the 5 min timeout). The user can click **To continue, press here** to reset the idle timer, or close the modal (logout still happens at the deadline). Any activity also resets the timer and closes the warning.
141
- 2. **Session expired modal** Shown when the idle deadline is reached (existing behaviour). The warning modal closes automatically at the same moment.
142
-
143
- Neither modal is shown when the user is not logged in. Both are skipped when **`hideInactivityModal`** is set.
144
-
145
- **Storybook:** `Authentication / Auto-logout (inactivity)` → **With warning modal** (20 s idle, warning at 10 s).
146
-
147
- ### AuthContext consumer {#authcontext-usecontext}
148
-
149
- `import { AuthContext } from '…'` then `useContext(AuthContext)`.
150
-
151
- - **Invalid Firebase guard:** value is **`{ user: null, isFetchingUser: false }`** only (no methods).
152
- - **State (grouped):** `user` / `firebaseUser`, `isFetchingUser`, `avatar`; MFA (`waitingFor2fa`, `userMfaEnrollment`, `firebaseError`); verify-email (`verifyEmailError`, `isVerifyingEmail`); session UX (`loggedOutDueToInactivity`, `loggedOutDueToCookieExpiry`, `sessionExpiryPendingReason`, `showInactivityWarningModal`).
153
- - **Actions (grouped):** `userRef`, `loginUser`, `logoutUser`, `getUser`, `setUser`, `updateUser`, `refreshIdToken`; `checkUserIsValid`, `checkTokenIsValid`; `uploadPhoto`, `deletePhoto`, `checkUserPhoto`; MFA enroll / verify / unenroll + `reset2faFlow`; subscription/onboarding helpers; password & email (`handleResetPassword`, `handleVerifyEmail`, `requestUpdateEmail`, …); wallets / PoA (`uploaProofOfAddress` keeps the source spelling); **`dismissSessionExpiryModal`**, **`extendSessionFromInactivityWarning`**, **`dismissInactivityWarningModal`**.
154
-
155
- Use **`AuthConsumer`** for the render-prop pattern.
156
-
157
- ---
158
-
159
- ## Troubleshooting {#troubleshooting}
160
-
161
- **`useNavigate` / Router**
162
-
163
- Add `BrowserRouter` (or **`RouterWrapper`** from this package where the shell has no router). Install `react-router-dom`.
164
-
165
- **Invalid hook call / duplicated React**
166
-
167
- Dedupe peers in Vite: `resolve: { dedupe: ['react', 'react-dom', 'styled-components'] }`.
168
-
169
- ---
170
-
171
- ## Development {#development--publishing}
172
-
173
- | Command | Meaning |
174
- | -------------------- | -------------------------------- |
175
- | `npm run storybook` | Local docs / stories |
176
- | `npm run build:dist` | Library build + static copy |
177
- | `npm run pub` | Build then publish (`npm login`) |
178
-
179
- Release: changelog entry → `npm version` → `npm run pub`. Details: [CHANGELOG.md](CHANGELOG.md).
1
+ # @stokr/components-library
2
+
3
+ React UI library for STOKR apps: modals, forms, navigation, tables, auth context, styles.
4
+
5
+ ## Contents
6
+
7
+ - [Quick start](#quick-start) — install, router, `AuthProvider`, styles
8
+ - [Configuration reference](#runtime-config) — `config` keys & helpers
9
+ - [AuthProvider & AuthContext](#authprovider-optional-props)
10
+ - [Troubleshooting](#troubleshooting)
11
+ - [Development](#development--publishing)
12
+
13
+ ---
14
+
15
+ ## Quick start
16
+
17
+ **Install**
18
+
19
+ ```bash
20
+ npm install @stokr/components-library
21
+ npm install react react-dom styled-components react-router-dom
22
+ ```
23
+
24
+ Peers: React 18+/19+, styled-components 6.x, react-router-dom 6.x when you use routing-driven components (`HeaderHo`, `MainMenu`, …).
25
+
26
+ **1. Router** — Navigation helpers need a React Router:
27
+
28
+ ```jsx
29
+ import { BrowserRouter } from 'react-router-dom'
30
+ import { RouterWrapper } from '@stokr/components-library'
31
+
32
+ // Normal app
33
+ root.render(
34
+ <BrowserRouter>
35
+ <App />
36
+ </BrowserRouter>,
37
+ )
38
+
39
+ // Outside a Router: RouterWrapper wraps children in BrowserRouter once.
40
+ // Inside an existing Router: it renders children only (no nested BrowserRouter).
41
+ root.render(
42
+ <RouterWrapper>
43
+ <App />
44
+ </RouterWrapper>,
45
+ )
46
+ ```
47
+
48
+ **2. Auth & runtime config (required when consuming via npm)** — Vite freezes `import.meta.env` inside pre-built deps, so push your `.env` at runtime via `config`:
49
+
50
+ ```jsx
51
+ import { AuthProvider } from '@stokr/components-library'
52
+
53
+ export default function App() {
54
+ return (
55
+ <AuthProvider
56
+ config={{
57
+ apiUrl: import.meta.env.VITE_API_URL,
58
+ baseUrlPublic: import.meta.env.VITE_BASE_URL_PUBLIC,
59
+ cookieDomain: import.meta.env.VITE_COOKIE_DOMAIN,
60
+ websiteDomain: import.meta.env.VITE_WEBSITE_DOMAIN,
61
+ onboardingUrl: import.meta.env.VITE_ONBOARDING_URL,
62
+ dashboardUrl: import.meta.env.VITE_DASHBOARD_URL,
63
+ adminUrl: import.meta.env.VITE_ADMIN_URL,
64
+ registerUrl: import.meta.env.VITE_REGISTER_URL,
65
+ firebase: {
66
+ apiKey: import.meta.env.VITE_FIREBASE_API_KEY,
67
+ authDomain: import.meta.env.VITE_FIREBASE_AUTH_DOMAIN,
68
+ projectId: import.meta.env.VITE_FIREBASE_PROJECT_ID,
69
+ storageBucket: import.meta.env.VITE_FIREBASE_STORAGE_BUCKET,
70
+ messagingSenderId: import.meta.env.VITE_FIREBASE_MESSAGING_SENDER_ID,
71
+ appId: import.meta.env.VITE_FIREBASE_APP_ID,
72
+ measurementId: import.meta.env.VITE_FIREBASE_MEASUREMENT_ID,
73
+ },
74
+ }}>
75
+ {/* app */}
76
+ </AuthProvider>
77
+ )
78
+ }
79
+ ```
80
+
81
+ **3. Earlier config** (e.g. analytics before mount): `import { configure } from '@stokr/components-library'` with the same shape as `config`.
82
+
83
+ **4. Icons / fonts** — Optional: `<IoniconsStyles />` at root, or rely on lazy injection when a component uses icons; for Layout / Open Sans: `import '@stokr/components-library/styles.css'`.
84
+
85
+ **5. Imports** — `import { ConfirmModal, Button, … } from '@stokr/components-library'`.
86
+
87
+ Full URL env example:
88
+
89
+ ```bash
90
+ VITE_WEBSITE_DOMAIN=example.com
91
+ VITE_ONBOARDING_URL=https://signup.example.com
92
+ VITE_DASHBOARD_URL=https://dashboard.example.com
93
+ VITE_ADMIN_URL=https://admin.example.com
94
+ VITE_REGISTER_URL=https://example.com/signup
95
+ ```
96
+
97
+ ---
98
+
99
+ ## Configuration reference {#runtime-config}
100
+
101
+ | `config` key | Typical `VITE_*` | Role |
102
+ | ----------------- | -------------------------- | ----------------------------------------- |
103
+ | `apiUrl` | `VITE_API_URL` | Authenticated REST base |
104
+ | `baseUrlPublic` | `VITE_BASE_URL_PUBLIC` | Public API base |
105
+ | `cookieDomain` | `VITE_COOKIE_DOMAIN` | Auth cookie `domain` attribute |
106
+ | `websiteDomain` | `VITE_WEBSITE_DOMAIN` | Bare host → links / `getPlatformURL()` |
107
+ | `onboardingUrl` | `VITE_ONBOARDING_URL` | Full signup/sign-in app URL |
108
+ | `dashboardUrl` | `VITE_DASHBOARD_URL` | Investor dashboard URL |
109
+ | `adminUrl` | `VITE_ADMIN_URL` | Venture / admin dashboard URL |
110
+ | `registerUrl` | `VITE_REGISTER_URL` | Public registration entry |
111
+ | `firebase` | `VITE_FIREBASE_*` | Firebase client config |
112
+
113
+ **Helpers:** `getConfig('…')` for any key above; `getPlatformURL()` `https://{websiteDomain}`; `getAnalyticsIngestUrl()`, `getBackofficeAppUrl(path)`; **`getFooterGroups()`** replaces static footer URL lists.
114
+
115
+ **Auth-only HTTP:** `authenticationApi.post(segment, body)` for `auth/*`; default axios stays the main API client after login.
116
+
117
+ Missing overrides may trigger a **one-time** warning listing unresolved `VITE_*` expectations.
118
+
119
+ ---
120
+
121
+ ## AuthProvider & AuthContext {#authprovider-optional-props}
122
+
123
+ `AuthProvider` is wrapped with **`withRouter`** — mount it inside a **`Router`** so redirects work.
124
+
125
+ ### Optional provider props
126
+
127
+ - **`inactivityTimeMs`** Idle timeout before auto-logout + session modal (default 5 min).
128
+ - **`inactivityWarningBeforeMs`** — How long before that timeout to show the **“session about to expire”** warning modal (default 30 s). See [Inactivity auto-logout](#inactivity-auto-logout).
129
+ - **`accessTokenExpiryMs`** — Cookie TTL when **`Auth.setAccessToken`** runs (default **`DEFAULT_TOKEN_EXPIRY_MS`** = 1h); not extended by **`getUser`** alone.
130
+ - **`hideInactivityModal`** — Suppress both built-in inactivity modals (warning + session expired).
131
+ - **`onSessionExpiredLoginClick`** — Called when the user clicks **Log in** on the session-expired modal.
132
+ - **`customValidateGetUser(user)`** — Hook after **`user/get`** succeeds (see `src/context/AuthContext.js`).
133
+
134
+ ### Inactivity auto-logout {#inactivity-auto-logout}
135
+
136
+ When a user is logged in, `AuthProvider` resets an idle timer on mouse, keyboard, click, scroll, and touch events.
137
+
138
+ 1. **Warning modal** — Shown **`inactivityWarningBeforeMs`** before the idle deadline (default: 30 s before the 5 min timeout). The user can click **To continue, press here** to reset the idle timer, or close the modal (logout still happens at the deadline). Any activity also resets the timer and closes the warning.
139
+ 2. **Session expired modal** — Shown when the idle deadline is reached (existing behaviour). The warning modal closes automatically at the same moment.
140
+
141
+ Neither modal is shown when the user is not logged in. Both are skipped when **`hideInactivityModal`** is set.
142
+
143
+ **Storybook:** `Authentication / Auto-logout (inactivity)` **With warning modal** (20 s idle, warning at 10 s).
144
+
145
+ ### AuthContext consumer {#authcontext-usecontext}
146
+
147
+ `import { AuthContext } from '…'` then `useContext(AuthContext)`.
148
+
149
+ - **Invalid Firebase guard:** value is **`{ user: null, isFetchingUser: false }`** only (no methods).
150
+ - **State (grouped):** `user` / `firebaseUser`, `isFetchingUser`, `avatar`; MFA (`waitingFor2fa`, `userMfaEnrollment`, `firebaseError`); verify-email (`verifyEmailError`, `isVerifyingEmail`); session UX (`loggedOutDueToInactivity`, `loggedOutDueToCookieExpiry`, `sessionExpiryPendingReason`, `showInactivityWarningModal`).
151
+ - **Actions (grouped):** `userRef`, `loginUser`, `logoutUser`, `getUser`, `setUser`, `updateUser`, `refreshIdToken`; `checkUserIsValid`, `checkTokenIsValid`; `uploadPhoto`, `deletePhoto`, `checkUserPhoto`; MFA enroll / verify / unenroll + `reset2faFlow`; subscription/onboarding helpers; password & email (`handleResetPassword`, `handleVerifyEmail`, `requestUpdateEmail`, …); wallets / PoA (`uploaProofOfAddress` keeps the source spelling); **`dismissSessionExpiryModal`**, **`extendSessionFromInactivityWarning`**, **`dismissInactivityWarningModal`**.
152
+
153
+ Use **`AuthConsumer`** for the render-prop pattern.
154
+
155
+ ---
156
+
157
+ ## Troubleshooting {#troubleshooting}
158
+
159
+ **`useNavigate` / Router**
160
+
161
+ Add `BrowserRouter` (or **`RouterWrapper`** from this package where the shell has no router). Install `react-router-dom`.
162
+
163
+ **Invalid hook call / duplicated React**
164
+
165
+ Dedupe peers in Vite: `resolve: { dedupe: ['react', 'react-dom', 'styled-components'] }`.
166
+
167
+ ---
168
+
169
+ ## Development {#development--publishing}
170
+
171
+ | Command | Meaning |
172
+ | -------------------- | -------------------------------- |
173
+ | `npm run storybook` | Local docs / stories |
174
+ | `npm run build:dist` | Library build + static copy |
175
+ | `npm run pub` | Build then publish (`npm login`) |
176
+
177
+ Release: changelog entry → `npm version` `npm run pub`. Details: [CHANGELOG.md](CHANGELOG.md).
@@ -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 = {
@@ -7,7 +7,7 @@ const CardContainer = styled.div.withConfig({
7
7
  flex-direction: column;
8
8
  align-items: flex-start;
9
9
  border: 1px solid #eaeaea;
10
- border-radius: 1px;
10
+ border-radius: 8px;
11
11
  background: #fff;
12
12
  padding: 32px 32px 32px 32px;
13
13
  min-width: 320px;
@@ -107,7 +107,7 @@ const ModalInnerSmartContractAddress = styled.input`
107
107
  const ModalInnerWithBorder = styled.div.withConfig({
108
108
  shouldForwardProp: (props) => !["bottomRadius0", "topRadius0", "marginTop0", "borderTopNone", "textAlignRight", "paddingSmall"].includes(props)
109
109
  })`
110
- border-radius: 10px;
110
+ border-radius: 8px;
111
111
  border: 1px solid ${colors.lightGrey};
112
112
  padding: 25px 35px;
113
113
  margin-top: 39px;
@@ -8,7 +8,7 @@ import { getCurrencyConfig, getCurrencyIcon, formatAmountForDisplay } from "../.
8
8
  import externalLinkIcon from "../../static/images/external-link-icon.svg.js";
9
9
  const CardContainer = styled.div`
10
10
  background: ${colors.white};
11
- border-radius: 10px;
11
+ border-radius: 8px;
12
12
  border: 1px solid ${colors.lightGrey};
13
13
  padding: 20px 32px;
14
14
  `;
@@ -20,7 +20,7 @@ const CardTitle = styled.div`
20
20
  background: ${colors.futureBlack};
21
21
  padding: 12px 24px;
22
22
  margin: -20px -32px 20px -32px;
23
- border-radius: 9px 9px 0 0;
23
+ border-radius: 8px 8px 0 0;
24
24
  // border-bottom: 1px solid ${colors.lightGrey};
25
25
  text-align: start;
26
26
  text-transform: uppercase;
@@ -119,7 +119,7 @@ const PaymentSuccessCard = ({
119
119
  target: secondaryActionHref ? "_blank" : void 0,
120
120
  rel: secondaryActionHref ? "noopener noreferrer" : void 0,
121
121
  onClick: onSecondaryActionClick,
122
- outlineBlack: true,
122
+ black: true,
123
123
  children: [
124
124
  secondaryActionLabel,
125
125
  secondaryActionHref && /* @__PURE__ */ jsx(ButtonIcon, { src: externalLinkIcon, alt: "" })
@@ -134,7 +134,7 @@ const SnackbarWrapper = styled.div.withConfig({
134
134
  padding: 12px 16px;
135
135
  background-color: ${colors.white};
136
136
  box-shadow: 0 1px 2px -1px rgba(0, 0, 0, 0.12);
137
- border-radius: 6px;
137
+ border-radius: 8px;
138
138
  border: 1px solid ${colors.grey};
139
139
  //border-bottom: 3px solid ${colors.grey};
140
140
  pointer-events: auto;
@@ -149,7 +149,7 @@ const SnackbarWrapper = styled.div.withConfig({
149
149
  left: 0;
150
150
  height: 3px;
151
151
  background-color: ${({ $variant }) => variantStyles[$variant]?.borderColor || colors.blue};
152
- border-radius: 0 0 0 6px;
152
+ border-radius: 0 0 0 8px;
153
153
  ${({ $duration, $isPermanent }) => $isPermanent ? css`
154
154
  width: 100%;
155
155
  ` : css`
@@ -7,7 +7,11 @@ const Root = styled.div.withConfig({
7
7
  shouldForwardProp: (prop) => !["$subtle", "$backgroundColor", "$hasClick"].includes(prop)
8
8
  })`
9
9
  display: inline-flex;
10
- align-items: center;
10
+ /* flex-start, not center: a label long enough to wrap (e.g. PaymentDisplay's
11
+ statusMessage) must keep the dot level with its FIRST line, not drift to the
12
+ middle of the whole wrapped block. Dot below compensates so a single-line
13
+ label still looks identical to the old centered version. */
14
+ align-items: flex-start;
11
15
  gap: 8px;
12
16
  box-sizing: border-box;
13
17
  padding: ${(p) => p.$subtle ? "2px 8px" : "0"};
@@ -32,6 +36,9 @@ const Dot = styled.span.withConfig({
32
36
  background-color: ${(p) => p.$color};
33
37
  flex-shrink: 0;
34
38
  animation: ${(p) => p.$pulse ? pulse : "none"} 1.6s ease-in-out infinite;
39
+ /* Centers the dot within the Label's first line (20px line-height) now that
40
+ Root no longer centers it across the whole (possibly wrapped) block. */
41
+ margin-top: ${(p) => Math.max(0, (20 - p.$size) / 2)}px;
35
42
  `;
36
43
  const Label = styled.span.withConfig({
37
44
  shouldForwardProp: (prop) => !["$color", "$uppercase"].includes(prop)
@@ -6,7 +6,7 @@ const CardWrapper = styled.div.withConfig({
6
6
  })`
7
7
  background: ${theme.cWhite};
8
8
  border: 1px solid ${theme.cLightGrey};
9
- border-radius: 6px;
9
+ border-radius: 8px;
10
10
  overflow: hidden;
11
11
  transition:
12
12
  border-color 0.2s,
@@ -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/index.js CHANGED
@@ -149,8 +149,6 @@ import { navigateToHref, pathnameIfSameOrigin } from "./routing/navigate-app.js"
149
149
  import { RouterWrapper } from "./routing/RouterWrapper.js";
150
150
  import { isAlreadyOnOnboardingFlow } from "./utils/app-urls.js";
151
151
  import { authenticationApi } from "./api/authenticationApi.js";
152
- import { Auth, DEFAULT_TOKEN_EXPIRY_MS } from "./context/Auth.js";
153
- import { AuthConsumer, AuthContext, AuthProvider } from "./context/AuthContext.js";
154
152
  import { colors } from "./styles/colors.js";
155
153
  import { default as default2 } from "./styles/fonts.js";
156
154
  import { GlobalStyle } from "./styles/global.js";
@@ -166,6 +164,8 @@ import { LoanActivityTypes, ProfessionalInvestorStatuses, ProjectStates, Project
166
164
  import { default as default8 } from "./components/SvgIcons/AdminBadgeSvg.js";
167
165
  import { Arrow } from "./components/icons/Arrow.js";
168
166
  import { ArrowSimple } from "./components/icons/ArrowSimple.js";
167
+ import { Auth, DEFAULT_TOKEN_EXPIRY_MS } from "./context/Auth.js";
168
+ import { AuthConsumer, AuthContext, AuthProvider } from "./context/AuthContext.js";
169
169
  import { BackButtonIcon, StyledBackButton, StyledBackButtonExternal, StyledWindowBackButton } from "./components/BackButton/BackButton.styles.js";
170
170
  import { Breakdown } from "./components/breakdown/Breakdown.js";
171
171
  import { default as default9 } from "./components/SvgIcons/CameraSvg.js";
@@ -1,25 +1,25 @@
1
- {
2
- "short_name": "Vite React App",
3
- "name": "Vite React App",
4
- "icons": [
5
- {
6
- "src": "favicon.ico",
7
- "sizes": "64x64 32x32 24x24 16x16",
8
- "type": "image/x-icon"
9
- },
10
- {
11
- "src": "logo192.png",
12
- "type": "image/png",
13
- "sizes": "192x192"
14
- },
15
- {
16
- "src": "logo512.png",
17
- "type": "image/png",
18
- "sizes": "512x512"
19
- }
20
- ],
21
- "start_url": ".",
22
- "display": "standalone",
23
- "theme_color": "#000000",
24
- "background_color": "#ffffff"
25
- }
1
+ {
2
+ "short_name": "Vite React App",
3
+ "name": "Vite React App",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
package/dist/robots.txt CHANGED
@@ -1,3 +1,3 @@
1
- # https://www.robotstxt.org/robotstxt.html
2
- User-agent: *
3
- Disallow:
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
@@ -1,11 +1,10 @@
1
- const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
1
+ const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_ADMIN_URL": "https://admin.stokr.info", "VITE_API_URL": "https://platform-api.stokr.info/api/v1", "VITE_BASE_URL_PUBLIC": "https://platform-api-no-auth.stokr.info/api/v1", "VITE_COOKIE_DOMAIN": "localhost", "VITE_DASHBOARD_URL": "https://dashboard.stokr.info", "VITE_FIREBASE_API_KEY": "AIzaSyBBp_3Romnfv--YpUuV0mJgDymvSp3oq0c", "VITE_FIREBASE_APP_ID": "1:568229412804:web:2391857e3e2a0b02346e91", "VITE_FIREBASE_AUTH_DOMAIN": "stokr-development-env.firebaseapp.com", "VITE_FIREBASE_MEASUREMENT_ID": "G-CP53SZVSMN", "VITE_FIREBASE_MESSAGING_SENDER_ID": "568229412804", "VITE_FIREBASE_PROJECT_ID": "stokr-development-env", "VITE_FIREBASE_STORAGE_BUCKET": "stokr-development-env.appspot.com", "VITE_MIXPANEL_TOKEN": "a7bb1e881f9b2600762fded84d8ce0ea", "VITE_ONBOARDING_URL": "https://signup.stokr.info", "VITE_PHOTO_API_URL": "https://platform-api.stokr.info/api/v1", "VITE_REGISTER_URL": "https://stokr.info/signup", "VITE_WEBSITE_DOMAIN": "stokr.info" };
2
2
  const _overrides = {};
3
3
  const ENV_KEY_BY_CONFIG = {
4
4
  apiUrl: "VITE_API_URL",
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",
File without changes