@insforge/react 0.6.8 → 0.6.10
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 +2 -0
- package/dist/atoms.cjs +754 -106
- package/dist/atoms.cjs.map +1 -1
- package/dist/atoms.js +728 -84
- package/dist/atoms.js.map +1 -1
- package/dist/components.cjs +1029 -266
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +2 -0
- package/dist/components.d.ts +2 -0
- package/dist/components.js +1023 -264
- package/dist/components.js.map +1 -1
- package/dist/forms.cjs +922 -264
- package/dist/forms.cjs.map +1 -1
- package/dist/forms.js +896 -242
- package/dist/forms.js.map +1 -1
- package/dist/hooks.cjs +2 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.js +2 -0
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +1068 -271
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +113 -1
- package/dist/index.d.ts +113 -1
- package/dist/index.js +1059 -269
- package/dist/index.js.map +1 -1
- package/dist/navigation.cjs.map +1 -1
- package/dist/navigation.js.map +1 -1
- package/package.json +4 -1
package/dist/components.cjs
CHANGED
|
@@ -3,10 +3,17 @@
|
|
|
3
3
|
var react = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
require('@insforge/sdk');
|
|
6
|
-
var react$
|
|
6
|
+
var react$2 = require('@insforge/shared/react');
|
|
7
|
+
require('@emotion/cache');
|
|
8
|
+
var react$1 = require('@emotion/react');
|
|
9
|
+
var styled = require('@emotion/styled');
|
|
7
10
|
var lucideReact = require('lucide-react');
|
|
8
11
|
var zod = require('zod');
|
|
9
12
|
|
|
13
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
|
|
15
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
16
|
+
|
|
10
17
|
// src/components/SignIn.tsx
|
|
11
18
|
var NavigationContext = react.createContext(null);
|
|
12
19
|
function useNavigationAdapter() {
|
|
@@ -26,7 +33,7 @@ function useSearchParams() {
|
|
|
26
33
|
return adapter.useSearchParams();
|
|
27
34
|
}
|
|
28
35
|
function useInsforge() {
|
|
29
|
-
const context = react.useContext(react$
|
|
36
|
+
const context = react.useContext(react$2.InsforgeContext);
|
|
30
37
|
if (!context) {
|
|
31
38
|
return {
|
|
32
39
|
user: void 0,
|
|
@@ -72,9 +79,523 @@ function usePublicAuthConfig() {
|
|
|
72
79
|
}, [getPublicAuthConfig]);
|
|
73
80
|
return { authConfig, isLoaded };
|
|
74
81
|
}
|
|
82
|
+
|
|
83
|
+
// src/styles/theme.ts
|
|
84
|
+
var theme = {
|
|
85
|
+
colors: {
|
|
86
|
+
primary: "#000000",
|
|
87
|
+
primaryHover: "#1f1f1f",
|
|
88
|
+
text: "#000000",
|
|
89
|
+
textSecondary: "#828282",
|
|
90
|
+
textMuted: "#a3a3a3",
|
|
91
|
+
textGray: "#525252",
|
|
92
|
+
border: "#d4d4d4",
|
|
93
|
+
borderGray: "#e4e4e7",
|
|
94
|
+
borderHover: "#9ca3af",
|
|
95
|
+
borderFocus: "#000000",
|
|
96
|
+
bgWhite: "#ffffff",
|
|
97
|
+
bgLight: "#fafafa",
|
|
98
|
+
bgGray: "#f5f5f5",
|
|
99
|
+
bgHover: "#f9fafb",
|
|
100
|
+
error: "#dc2626",
|
|
101
|
+
errorBg: "#fee2e2",
|
|
102
|
+
successBg: "#d1fae5",
|
|
103
|
+
successDark: "#059669",
|
|
104
|
+
black: "#000000",
|
|
105
|
+
zinc900: "#09090b"
|
|
106
|
+
},
|
|
107
|
+
spacing: {
|
|
108
|
+
1: "0.25rem",
|
|
109
|
+
// 4px
|
|
110
|
+
2: "0.5rem",
|
|
111
|
+
// 8px
|
|
112
|
+
3: "0.75rem",
|
|
113
|
+
// 12px
|
|
114
|
+
4: "1rem",
|
|
115
|
+
// 16px
|
|
116
|
+
6: "1.5rem",
|
|
117
|
+
// 32px
|
|
118
|
+
10: "2.5rem"
|
|
119
|
+
// 40px
|
|
120
|
+
},
|
|
121
|
+
radius: {
|
|
122
|
+
// 2px
|
|
123
|
+
sm: "0.25rem",
|
|
124
|
+
// 4px
|
|
125
|
+
md: "0.375rem",
|
|
126
|
+
// 6px
|
|
127
|
+
lg: "0.5rem",
|
|
128
|
+
// 8px
|
|
129
|
+
xl: "0.75rem",
|
|
130
|
+
// 12px
|
|
131
|
+
full: "9999px"
|
|
132
|
+
},
|
|
133
|
+
fontSize: {
|
|
134
|
+
xs: "0.75rem",
|
|
135
|
+
// 12px
|
|
136
|
+
sm: "0.875rem",
|
|
137
|
+
// 14px
|
|
138
|
+
base: "1rem",
|
|
139
|
+
// 20px
|
|
140
|
+
"2xl": "1.5rem"
|
|
141
|
+
// 24px
|
|
142
|
+
},
|
|
143
|
+
lineHeight: {
|
|
144
|
+
// 16px
|
|
145
|
+
normal: "1.25rem",
|
|
146
|
+
// 20px
|
|
147
|
+
relaxed: "1.5rem",
|
|
148
|
+
// 24px
|
|
149
|
+
loose: "2rem"
|
|
150
|
+
// 32px
|
|
151
|
+
},
|
|
152
|
+
fontFamily: {
|
|
153
|
+
base: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif",
|
|
154
|
+
manrope: "'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif"
|
|
155
|
+
},
|
|
156
|
+
fontWeight: {
|
|
157
|
+
normal: 400,
|
|
158
|
+
medium: 500,
|
|
159
|
+
semibold: 600
|
|
160
|
+
},
|
|
161
|
+
shadow: {
|
|
162
|
+
md: "0 1px 2px 0 rgba(0, 0, 0, 0.1)",
|
|
163
|
+
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
|
|
164
|
+
},
|
|
165
|
+
transition: {
|
|
166
|
+
fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
167
|
+
base: "200ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
168
|
+
},
|
|
169
|
+
sizes: {
|
|
170
|
+
button: {
|
|
171
|
+
height: "2.5rem",
|
|
172
|
+
// 40px for submit
|
|
173
|
+
heightOAuth: "2.25rem"
|
|
174
|
+
// 36px for OAuth
|
|
175
|
+
},
|
|
176
|
+
// 32px
|
|
177
|
+
icon: "1.25rem",
|
|
178
|
+
// 20px
|
|
179
|
+
iconSm: "1.125rem",
|
|
180
|
+
// 18px
|
|
181
|
+
iconLg: "1.5rem",
|
|
182
|
+
// 24px
|
|
183
|
+
verifyCode: "3rem",
|
|
184
|
+
// 48px
|
|
185
|
+
verifyIcon: "4rem",
|
|
186
|
+
// 64px
|
|
187
|
+
verifyIconInner: "2rem"
|
|
188
|
+
// 32px
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
var keyframes = {
|
|
192
|
+
spin: `
|
|
193
|
+
from {
|
|
194
|
+
transform: rotate(0deg);
|
|
195
|
+
}
|
|
196
|
+
to {
|
|
197
|
+
transform: rotate(360deg);
|
|
198
|
+
}
|
|
199
|
+
`
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
// src/components/atoms/styled.ts
|
|
203
|
+
var spinAnimation = react$1.keyframes`${keyframes.spin}`;
|
|
204
|
+
var AuthContainerWrapper = styled__default.default.div`
|
|
205
|
+
width: 100%;
|
|
206
|
+
max-width: 400px;
|
|
207
|
+
border-radius: ${theme.radius.xl};
|
|
208
|
+
overflow: hidden;
|
|
209
|
+
box-shadow: ${theme.shadow.lg};
|
|
210
|
+
`;
|
|
211
|
+
var AuthCard = styled__default.default.div`
|
|
212
|
+
background-color: ${theme.colors.bgWhite};
|
|
213
|
+
padding: ${theme.spacing[6]};
|
|
214
|
+
display: flex;
|
|
215
|
+
flex-direction: column;
|
|
216
|
+
justify-content: center;
|
|
217
|
+
align-items: stretch;
|
|
218
|
+
gap: ${theme.spacing[6]};
|
|
219
|
+
`;
|
|
220
|
+
var AuthHeaderWrapper = styled__default.default.div`
|
|
221
|
+
display: flex;
|
|
222
|
+
flex-direction: column;
|
|
223
|
+
justify-content: flex-start;
|
|
224
|
+
align-items: flex-start;
|
|
225
|
+
gap: ${theme.spacing[2]};
|
|
226
|
+
`;
|
|
227
|
+
var AuthHeaderTitle = styled__default.default.h1`
|
|
228
|
+
font-size: ${theme.fontSize["2xl"]};
|
|
229
|
+
font-weight: ${theme.fontWeight.semibold};
|
|
230
|
+
color: ${theme.colors.text};
|
|
231
|
+
line-height: ${theme.lineHeight.loose};
|
|
232
|
+
margin: 0;
|
|
233
|
+
font-family: ${theme.fontFamily.base};
|
|
234
|
+
`;
|
|
235
|
+
var AuthHeaderSubtitle = styled__default.default.p`
|
|
236
|
+
font-size: ${theme.fontSize.sm};
|
|
237
|
+
font-weight: ${theme.fontWeight.normal};
|
|
238
|
+
color: ${theme.colors.textSecondary};
|
|
239
|
+
line-height: ${theme.lineHeight.relaxed};
|
|
240
|
+
margin: 0;
|
|
241
|
+
font-family: ${theme.fontFamily.base};
|
|
242
|
+
`;
|
|
243
|
+
var FormFieldWrapper = styled__default.default.div`
|
|
244
|
+
display: flex;
|
|
245
|
+
flex-direction: column;
|
|
246
|
+
justify-content: center;
|
|
247
|
+
align-items: stretch;
|
|
248
|
+
gap: ${theme.spacing[1]};
|
|
249
|
+
`;
|
|
250
|
+
var FormFieldLabel = styled__default.default.label`
|
|
251
|
+
font-size: ${theme.fontSize.sm};
|
|
252
|
+
font-weight: ${theme.fontWeight.normal};
|
|
253
|
+
color: ${theme.colors.text};
|
|
254
|
+
line-height: ${theme.lineHeight.relaxed};
|
|
255
|
+
font-family: ${theme.fontFamily.base};
|
|
256
|
+
`;
|
|
257
|
+
var FormFieldInput = styled__default.default.input`
|
|
258
|
+
width: 100%;
|
|
259
|
+
display: flex;
|
|
260
|
+
align-items: center;
|
|
261
|
+
gap: ${theme.spacing[2]};
|
|
262
|
+
align-self: stretch;
|
|
263
|
+
padding: ${theme.spacing[2]} ${theme.spacing[3]};
|
|
264
|
+
border-radius: ${theme.radius.sm};
|
|
265
|
+
border: 1px solid ${theme.colors.border};
|
|
266
|
+
background-color: ${theme.colors.bgWhite};
|
|
267
|
+
font-size: ${theme.fontSize.sm};
|
|
268
|
+
font-weight: ${theme.fontWeight.normal};
|
|
269
|
+
line-height: ${theme.lineHeight.normal};
|
|
270
|
+
color: ${theme.colors.text};
|
|
271
|
+
font-family: ${theme.fontFamily.base};
|
|
272
|
+
transition: border-color ${theme.transition.base};
|
|
273
|
+
|
|
274
|
+
&::placeholder {
|
|
275
|
+
color: ${theme.colors.textMuted};
|
|
276
|
+
font-size: ${theme.fontSize.sm};
|
|
277
|
+
font-weight: ${theme.fontWeight.normal};
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
&:focus {
|
|
281
|
+
outline: none;
|
|
282
|
+
border-color: ${theme.colors.borderFocus};
|
|
283
|
+
}
|
|
284
|
+
`;
|
|
285
|
+
var PasswordFieldWrapper = styled__default.default.div`
|
|
286
|
+
display: flex;
|
|
287
|
+
flex-direction: column;
|
|
288
|
+
justify-content: center;
|
|
289
|
+
align-items: stretch;
|
|
290
|
+
gap: ${theme.spacing[1]};
|
|
291
|
+
`;
|
|
292
|
+
var PasswordFieldLabelRow = styled__default.default.div`
|
|
293
|
+
display: flex;
|
|
294
|
+
justify-content: space-between;
|
|
295
|
+
align-items: center;
|
|
296
|
+
`;
|
|
297
|
+
var PasswordFieldLabel = styled__default.default.label`
|
|
298
|
+
font-size: ${theme.fontSize.sm};
|
|
299
|
+
font-weight: ${theme.fontWeight.normal};
|
|
300
|
+
color: ${theme.colors.text};
|
|
301
|
+
line-height: ${theme.lineHeight.relaxed};
|
|
302
|
+
font-family: ${theme.fontFamily.base};
|
|
303
|
+
`;
|
|
304
|
+
var PasswordFieldForgotLink = styled__default.default.a`
|
|
305
|
+
font-size: ${theme.fontSize.sm};
|
|
306
|
+
font-weight: ${theme.fontWeight.normal};
|
|
307
|
+
color: ${theme.colors.textSecondary};
|
|
308
|
+
text-decoration: none;
|
|
309
|
+
transition: color ${theme.transition.fast};
|
|
310
|
+
font-family: ${theme.fontFamily.base};
|
|
311
|
+
cursor: pointer;
|
|
312
|
+
`;
|
|
313
|
+
var PasswordFieldInputWrapper = styled__default.default.div`
|
|
314
|
+
position: relative;
|
|
315
|
+
width: 100%;
|
|
316
|
+
`;
|
|
317
|
+
var PasswordFieldInput = styled__default.default.input`
|
|
318
|
+
width: 100%;
|
|
319
|
+
display: flex;
|
|
320
|
+
align-items: center;
|
|
321
|
+
align-self: stretch;
|
|
322
|
+
padding: ${theme.spacing[2]} ${theme.spacing[3]};
|
|
323
|
+
padding-right: 2.5rem;
|
|
324
|
+
border-radius: ${theme.radius.sm};
|
|
325
|
+
border: 1px solid ${theme.colors.border};
|
|
326
|
+
background-color: ${theme.colors.bgWhite};
|
|
327
|
+
font-size: ${theme.fontSize.sm};
|
|
328
|
+
font-weight: ${theme.fontWeight.normal};
|
|
329
|
+
line-height: ${theme.lineHeight.normal};
|
|
330
|
+
color: ${theme.colors.text};
|
|
331
|
+
font-family: ${theme.fontFamily.base};
|
|
332
|
+
transition: border-color ${theme.transition.base};
|
|
333
|
+
|
|
334
|
+
&::placeholder {
|
|
335
|
+
color: ${theme.colors.textMuted};
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
&:focus {
|
|
339
|
+
outline: none;
|
|
340
|
+
border-color: ${theme.colors.borderFocus};
|
|
341
|
+
}
|
|
342
|
+
`;
|
|
343
|
+
var PasswordFieldToggleButton = styled__default.default.button`
|
|
344
|
+
position: absolute;
|
|
345
|
+
right: ${theme.spacing[1]};
|
|
346
|
+
top: 50%;
|
|
347
|
+
transform: translateY(-50%);
|
|
348
|
+
background: none;
|
|
349
|
+
border: none;
|
|
350
|
+
cursor: pointer;
|
|
351
|
+
padding: ${theme.spacing[1]};
|
|
352
|
+
display: flex;
|
|
353
|
+
align-items: center;
|
|
354
|
+
justify-content: center;
|
|
355
|
+
color: ${theme.colors.textSecondary};
|
|
356
|
+
transition: color ${theme.transition.fast};
|
|
357
|
+
`;
|
|
358
|
+
var SubmitButton = styled__default.default.button`
|
|
359
|
+
border-radius: ${theme.radius.sm};
|
|
360
|
+
background-color: ${theme.colors.primary};
|
|
361
|
+
height: ${theme.sizes.button.height};
|
|
362
|
+
width: 100%;
|
|
363
|
+
display: flex;
|
|
364
|
+
margin-top: ${theme.spacing[4]};
|
|
365
|
+
padding: ${theme.spacing[2]} ${theme.spacing[4]};
|
|
366
|
+
justify-content: center;
|
|
367
|
+
align-items: center;
|
|
368
|
+
gap: 0.625rem;
|
|
369
|
+
align-self: stretch;
|
|
370
|
+
color: ${theme.colors.bgWhite};
|
|
371
|
+
font-weight: ${theme.fontWeight.semibold};
|
|
372
|
+
font-family: ${theme.fontFamily.manrope};
|
|
373
|
+
font-size: ${theme.fontSize.base};
|
|
374
|
+
line-height: normal;
|
|
375
|
+
border: none;
|
|
376
|
+
cursor: pointer;
|
|
377
|
+
transition: background-color ${theme.transition.base};
|
|
378
|
+
|
|
379
|
+
&:hover:not(:disabled) {
|
|
380
|
+
background-color: ${theme.colors.primaryHover};
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
&:disabled {
|
|
384
|
+
opacity: 0.5;
|
|
385
|
+
cursor: not-allowed;
|
|
386
|
+
}
|
|
387
|
+
`;
|
|
388
|
+
var SubmitButtonIcon = styled__default.default.div`
|
|
389
|
+
width: ${theme.sizes.icon};
|
|
390
|
+
height: ${theme.sizes.icon};
|
|
391
|
+
display: flex;
|
|
392
|
+
align-items: center;
|
|
393
|
+
justify-content: center;
|
|
394
|
+
|
|
395
|
+
svg {
|
|
396
|
+
width: 100%;
|
|
397
|
+
height: 100%;
|
|
398
|
+
}
|
|
399
|
+
`;
|
|
400
|
+
var SubmitButtonSpinner = styled__default.default.div`
|
|
401
|
+
width: ${theme.sizes.icon};
|
|
402
|
+
height: ${theme.sizes.icon};
|
|
403
|
+
display: flex;
|
|
404
|
+
align-items: center;
|
|
405
|
+
justify-content: center;
|
|
406
|
+
animation: ${spinAnimation} 1s linear infinite;
|
|
407
|
+
|
|
408
|
+
svg {
|
|
409
|
+
width: 100%;
|
|
410
|
+
height: 100%;
|
|
411
|
+
}
|
|
412
|
+
`;
|
|
413
|
+
var OAuthButton = styled__default.default.button`
|
|
414
|
+
display: flex;
|
|
415
|
+
width: 100%;
|
|
416
|
+
height: ${theme.sizes.button.heightOAuth};
|
|
417
|
+
padding: ${(props) => props.$variant === "short" || props.$variant === "iconOnly" ? theme.spacing[2] : `${theme.spacing[2]} ${theme.spacing[3]}`};
|
|
418
|
+
flex-direction: row;
|
|
419
|
+
justify-content: center;
|
|
420
|
+
align-items: center;
|
|
421
|
+
gap: ${(props) => props.$variant === "iconOnly" ? "0" : props.$variant === "short" ? theme.spacing[2] : theme.spacing[3]};
|
|
422
|
+
border-radius: ${theme.radius.md};
|
|
423
|
+
border: 1px solid ${theme.colors.borderGray};
|
|
424
|
+
background-color: ${theme.colors.bgWhite};
|
|
425
|
+
box-shadow: ${theme.shadow.md};
|
|
426
|
+
color: ${theme.colors.zinc900};
|
|
427
|
+
text-align: center;
|
|
428
|
+
font-size: ${theme.fontSize.sm};
|
|
429
|
+
font-weight: ${theme.fontWeight.medium};
|
|
430
|
+
line-height: ${theme.lineHeight.normal};
|
|
431
|
+
cursor: pointer;
|
|
432
|
+
transition: all ${theme.transition.base};
|
|
433
|
+
font-family: ${theme.fontFamily.base};
|
|
434
|
+
|
|
435
|
+
&:hover:not(:disabled) {
|
|
436
|
+
background-color: ${theme.colors.bgHover};
|
|
437
|
+
border-color: ${theme.colors.borderHover};
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
&:disabled {
|
|
441
|
+
opacity: 0.6;
|
|
442
|
+
cursor: not-allowed;
|
|
443
|
+
}
|
|
444
|
+
`;
|
|
445
|
+
var OAuthButtonIcon = styled__default.default.div`
|
|
446
|
+
display: flex;
|
|
447
|
+
align-items: center;
|
|
448
|
+
justify-content: center;
|
|
449
|
+
flex-shrink: 0;
|
|
450
|
+
width: ${theme.sizes.iconSm};
|
|
451
|
+
height: ${theme.sizes.iconSm};
|
|
452
|
+
|
|
453
|
+
svg {
|
|
454
|
+
width: 100%;
|
|
455
|
+
height: 100%;
|
|
456
|
+
}
|
|
457
|
+
`;
|
|
458
|
+
var OAuthProvidersContainer = styled__default.default.div`
|
|
459
|
+
display: flex;
|
|
460
|
+
flex-direction: column;
|
|
461
|
+
gap: ${theme.spacing[3]};
|
|
462
|
+
width: 100%;
|
|
463
|
+
`;
|
|
464
|
+
var AuthLinkWrapper = styled__default.default.div`
|
|
465
|
+
display: flex;
|
|
466
|
+
justify-content: center;
|
|
467
|
+
align-items: center;
|
|
468
|
+
gap: ${theme.spacing[1]};
|
|
469
|
+
font-size: ${theme.fontSize.sm};
|
|
470
|
+
color: ${theme.colors.textSecondary};
|
|
471
|
+
font-family: ${theme.fontFamily.base};
|
|
472
|
+
`;
|
|
473
|
+
var AuthLinkText = styled__default.default.span`
|
|
474
|
+
font-weight: ${theme.fontWeight.normal};
|
|
475
|
+
`;
|
|
476
|
+
var AuthLinkLink = styled__default.default.a`
|
|
477
|
+
font-weight: ${theme.fontWeight.semibold};
|
|
478
|
+
color: ${theme.colors.text};
|
|
479
|
+
text-decoration: none;
|
|
480
|
+
transition: opacity ${theme.transition.fast};
|
|
481
|
+
cursor: pointer;
|
|
482
|
+
`;
|
|
483
|
+
var AuthDividerWrapper = styled__default.default.div`
|
|
484
|
+
display: flex;
|
|
485
|
+
align-items: center;
|
|
486
|
+
text-align: center;
|
|
487
|
+
width: 100%;
|
|
488
|
+
gap: ${theme.spacing[3]};
|
|
489
|
+
`;
|
|
490
|
+
var AuthDividerLine = styled__default.default.div`
|
|
491
|
+
flex: 1;
|
|
492
|
+
border-top: 1px solid ${theme.colors.border};
|
|
493
|
+
`;
|
|
494
|
+
var AuthDividerText = styled__default.default.span`
|
|
495
|
+
font-size: ${theme.fontSize.sm};
|
|
496
|
+
color: ${theme.colors.textSecondary};
|
|
497
|
+
font-weight: ${theme.fontWeight.normal};
|
|
498
|
+
font-family: ${theme.fontFamily.manrope};
|
|
499
|
+
`;
|
|
500
|
+
var ErrorBannerWrapper = styled__default.default.div`
|
|
501
|
+
padding: ${theme.spacing[3]};
|
|
502
|
+
background-color: ${theme.colors.errorBg};
|
|
503
|
+
border-radius: ${theme.radius.md};
|
|
504
|
+
border: 1px solid ${theme.colors.error};
|
|
505
|
+
`;
|
|
506
|
+
var ErrorBannerContent = styled__default.default.div`
|
|
507
|
+
display: flex;
|
|
508
|
+
align-items: center;
|
|
509
|
+
gap: ${theme.spacing[2]};
|
|
510
|
+
`;
|
|
511
|
+
var ErrorBannerIcon = styled__default.default.div`
|
|
512
|
+
width: ${theme.sizes.iconLg};
|
|
513
|
+
height: ${theme.sizes.iconLg};
|
|
514
|
+
flex-shrink: 0;
|
|
515
|
+
color: ${theme.colors.error};
|
|
516
|
+
display: flex;
|
|
517
|
+
align-items: center;
|
|
518
|
+
justify-content: center;
|
|
519
|
+
|
|
520
|
+
svg {
|
|
521
|
+
width: 100%;
|
|
522
|
+
height: 100%;
|
|
523
|
+
}
|
|
524
|
+
`;
|
|
525
|
+
var ErrorBannerText = styled__default.default.p`
|
|
526
|
+
font-size: ${theme.fontSize.sm};
|
|
527
|
+
color: ${theme.colors.error};
|
|
528
|
+
font-weight: ${theme.fontWeight.normal};
|
|
529
|
+
font-family: ${theme.fontFamily.base};
|
|
530
|
+
margin: 0;
|
|
531
|
+
`;
|
|
532
|
+
var AuthBrandingWrapper = styled__default.default.div`
|
|
533
|
+
background-color: ${theme.colors.bgLight};
|
|
534
|
+
padding: ${theme.spacing[4]} ${theme.spacing[2]};
|
|
535
|
+
display: flex;
|
|
536
|
+
flex-direction: row;
|
|
537
|
+
justify-content: center;
|
|
538
|
+
align-items: center;
|
|
539
|
+
gap: ${theme.spacing[1]};
|
|
540
|
+
`;
|
|
541
|
+
var AuthBrandingText = styled__default.default.p`
|
|
542
|
+
font-size: ${theme.fontSize.xs};
|
|
543
|
+
font-weight: ${theme.fontWeight.medium};
|
|
544
|
+
color: ${theme.colors.text};
|
|
545
|
+
font-family: ${theme.fontFamily.manrope};
|
|
546
|
+
margin: 0;
|
|
547
|
+
`;
|
|
548
|
+
var VerificationCodeInputContainer = styled__default.default.div`
|
|
549
|
+
display: flex;
|
|
550
|
+
gap: ${theme.spacing[3]};
|
|
551
|
+
justify-content: center;
|
|
552
|
+
`;
|
|
553
|
+
var VerificationCodeInput = styled__default.default.input`
|
|
554
|
+
width: ${theme.sizes.verifyCode};
|
|
555
|
+
height: ${theme.sizes.verifyCode};
|
|
556
|
+
text-align: center;
|
|
557
|
+
font-size: ${theme.fontSize.base};
|
|
558
|
+
font-weight: ${theme.fontWeight.semibold};
|
|
559
|
+
border: 1px solid ${theme.colors.border};
|
|
560
|
+
border-radius: ${theme.radius.sm};
|
|
561
|
+
transition: border-color ${theme.transition.base};
|
|
562
|
+
font-family: ${theme.fontFamily.manrope};
|
|
563
|
+
|
|
564
|
+
&:focus {
|
|
565
|
+
outline: none;
|
|
566
|
+
border-color: ${theme.colors.borderFocus};
|
|
567
|
+
}
|
|
568
|
+
`;
|
|
569
|
+
var PasswordStrengthWrapper = styled__default.default.div`
|
|
570
|
+
margin-top: ${theme.spacing[2]};
|
|
571
|
+
`;
|
|
572
|
+
styled__default.default.div`
|
|
573
|
+
height: 100%;
|
|
574
|
+
transition:
|
|
575
|
+
width ${theme.transition.base},
|
|
576
|
+
background-color ${theme.transition.base};
|
|
577
|
+
`;
|
|
578
|
+
styled__default.default.span`
|
|
579
|
+
font-size: ${theme.fontSize.xs};
|
|
580
|
+
color: ${theme.colors.textSecondary};
|
|
581
|
+
font-family: ${theme.fontFamily.base};
|
|
582
|
+
`;
|
|
583
|
+
var PasswordStrengthRequirements = styled__default.default.div`
|
|
584
|
+
display: flex;
|
|
585
|
+
flex-direction: column;
|
|
586
|
+
gap: ${theme.spacing[2]};
|
|
587
|
+
font-size: ${theme.fontSize.sm};
|
|
588
|
+
color: ${theme.colors.textGray};
|
|
589
|
+
font-family: ${theme.fontFamily.base};
|
|
590
|
+
`;
|
|
591
|
+
var PasswordStrengthRequirement = styled__default.default.div`
|
|
592
|
+
display: flex;
|
|
593
|
+
align-items: center;
|
|
594
|
+
gap: ${theme.spacing[2]};
|
|
595
|
+
`;
|
|
75
596
|
function AuthBranding() {
|
|
76
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
77
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
597
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(AuthBrandingWrapper, { children: [
|
|
598
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthBrandingText, { children: "Secured by" }),
|
|
78
599
|
/* @__PURE__ */ jsxRuntime.jsx("a", { href: "https://insforge.dev", target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
79
600
|
"svg",
|
|
80
601
|
{
|
|
@@ -143,30 +664,30 @@ function AuthBranding() {
|
|
|
143
664
|
] });
|
|
144
665
|
}
|
|
145
666
|
function AuthContainer({ children }) {
|
|
146
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
147
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
667
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(AuthContainerWrapper, { children: [
|
|
668
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthCard, { children }),
|
|
148
669
|
/* @__PURE__ */ jsxRuntime.jsx(AuthBranding, {})
|
|
149
670
|
] });
|
|
150
671
|
}
|
|
151
672
|
function AuthHeader({ title, subtitle }) {
|
|
152
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
153
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
154
|
-
subtitle && /* @__PURE__ */ jsxRuntime.jsx(
|
|
673
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(AuthHeaderWrapper, { children: [
|
|
674
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthHeaderTitle, { children: title }),
|
|
675
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx(AuthHeaderSubtitle, { children: subtitle })
|
|
155
676
|
] });
|
|
156
677
|
}
|
|
157
678
|
function AuthErrorBanner({ error }) {
|
|
158
679
|
if (!error) {
|
|
159
680
|
return null;
|
|
160
681
|
}
|
|
161
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
162
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
163
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
682
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ErrorBannerWrapper, { children: /* @__PURE__ */ jsxRuntime.jsxs(ErrorBannerContent, { children: [
|
|
683
|
+
/* @__PURE__ */ jsxRuntime.jsx(ErrorBannerIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, {}) }),
|
|
684
|
+
/* @__PURE__ */ jsxRuntime.jsx(ErrorBannerText, { children: error })
|
|
164
685
|
] }) });
|
|
165
686
|
}
|
|
166
687
|
function AuthFormField({ label, id, ...props }) {
|
|
167
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
168
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
169
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
688
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(FormFieldWrapper, { children: [
|
|
689
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormFieldLabel, { htmlFor: id, children: label }),
|
|
690
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormFieldInput, { id, ...props })
|
|
170
691
|
] });
|
|
171
692
|
}
|
|
172
693
|
function AuthPasswordStrengthIndicator({
|
|
@@ -174,7 +695,7 @@ function AuthPasswordStrengthIndicator({
|
|
|
174
695
|
config
|
|
175
696
|
}) {
|
|
176
697
|
const requirements = createRequirements(config);
|
|
177
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
698
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PasswordStrengthWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(PasswordStrengthRequirements, { children: requirements.map((req) => /* @__PURE__ */ jsxRuntime.jsxs(PasswordStrengthRequirement, { children: [
|
|
178
699
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
179
700
|
"div",
|
|
180
701
|
{
|
|
@@ -276,29 +797,27 @@ function AuthPasswordField({
|
|
|
276
797
|
}
|
|
277
798
|
onFocus?.(e);
|
|
278
799
|
};
|
|
279
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
280
|
-
(label || forgotPasswordLink) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
281
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
282
|
-
forgotPasswordLink && resolvedForgotPasswordHref && /* @__PURE__ */ jsxRuntime.jsx(Link, { href: resolvedForgotPasswordHref, className: "
|
|
800
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(PasswordFieldWrapper, { children: [
|
|
801
|
+
(label || forgotPasswordLink) && /* @__PURE__ */ jsxRuntime.jsxs(PasswordFieldLabelRow, { children: [
|
|
802
|
+
/* @__PURE__ */ jsxRuntime.jsx(PasswordFieldLabel, { htmlFor: id, children: label }),
|
|
803
|
+
forgotPasswordLink && resolvedForgotPasswordHref && /* @__PURE__ */ jsxRuntime.jsx(Link, { href: resolvedForgotPasswordHref, className: "", children: /* @__PURE__ */ jsxRuntime.jsx(PasswordFieldForgotLink, { as: "span", children: forgotPasswordLink.text || "Forget Password?" }) })
|
|
283
804
|
] }),
|
|
284
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
805
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PasswordFieldInputWrapper, { children: [
|
|
285
806
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
286
|
-
|
|
807
|
+
PasswordFieldInput,
|
|
287
808
|
{
|
|
288
809
|
id,
|
|
289
810
|
type: showPassword ? "text" : "password",
|
|
290
|
-
className: "if-passwordField-input",
|
|
291
811
|
value,
|
|
292
812
|
onFocus: handleFocus,
|
|
293
813
|
...props
|
|
294
814
|
}
|
|
295
815
|
),
|
|
296
816
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
297
|
-
|
|
817
|
+
PasswordFieldToggleButton,
|
|
298
818
|
{
|
|
299
819
|
type: "button",
|
|
300
820
|
onClick: () => setShowPassword(!showPassword),
|
|
301
|
-
className: "if-passwordField-toggleButton",
|
|
302
821
|
"aria-label": showPassword ? "Hide password" : "Show password",
|
|
303
822
|
children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, { size: 20 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { size: 20 })
|
|
304
823
|
}
|
|
@@ -315,36 +834,27 @@ function AuthSubmitButton({
|
|
|
315
834
|
type = "submit",
|
|
316
835
|
onClick
|
|
317
836
|
}) {
|
|
318
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
319
|
-
|
|
320
|
-
{
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
disabled: disabled || isLoading || confirmed,
|
|
324
|
-
onClick,
|
|
325
|
-
children: [
|
|
326
|
-
isLoading && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "if-submitButton-icon if-submitButton-spinner", size: 20 }),
|
|
327
|
-
confirmed && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheck, { className: "if-submitButton-icon", size: 20 }),
|
|
328
|
-
children
|
|
329
|
-
]
|
|
330
|
-
}
|
|
331
|
-
);
|
|
837
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(SubmitButton, { type, disabled: disabled || isLoading || confirmed, onClick, children: [
|
|
838
|
+
isLoading && /* @__PURE__ */ jsxRuntime.jsx(SubmitButtonSpinner, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { size: 20 }) }),
|
|
839
|
+
confirmed && /* @__PURE__ */ jsxRuntime.jsx(SubmitButtonIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheck, { size: 20 }) }),
|
|
840
|
+
children
|
|
841
|
+
] });
|
|
332
842
|
}
|
|
333
843
|
function AuthLink({ text, linkText, href }) {
|
|
334
844
|
const searchParams = useSearchParams();
|
|
335
845
|
const { Link } = useNavigationAdapter();
|
|
336
846
|
const finalHref = resolveAuthUrl(href, searchParams);
|
|
337
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
338
|
-
text && /* @__PURE__ */ jsxRuntime.jsx(
|
|
847
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(AuthLinkWrapper, { children: [
|
|
848
|
+
text && /* @__PURE__ */ jsxRuntime.jsx(AuthLinkText, { children: text }),
|
|
339
849
|
text && " ",
|
|
340
|
-
/* @__PURE__ */ jsxRuntime.jsx(Link, { href: finalHref, className: "
|
|
850
|
+
/* @__PURE__ */ jsxRuntime.jsx(Link, { href: finalHref, className: "", children: /* @__PURE__ */ jsxRuntime.jsx(AuthLinkLink, { as: "span", children: linkText }) })
|
|
341
851
|
] });
|
|
342
852
|
}
|
|
343
853
|
function AuthDivider({ text = "or" }) {
|
|
344
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
345
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
346
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
347
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
854
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(AuthDividerWrapper, { children: [
|
|
855
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthDividerLine, {}),
|
|
856
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthDividerText, { children: text }),
|
|
857
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthDividerLine, {})
|
|
348
858
|
] });
|
|
349
859
|
}
|
|
350
860
|
var OAUTH_PROVIDER_CONFIG = {
|
|
@@ -505,23 +1015,17 @@ function AuthOAuthButton({
|
|
|
505
1015
|
}
|
|
506
1016
|
return "";
|
|
507
1017
|
};
|
|
508
|
-
const
|
|
509
|
-
"if-oauthButton",
|
|
510
|
-
"if-internal-o4k7w2",
|
|
511
|
-
displayMode === "full" && "if-oauthButton-full",
|
|
512
|
-
displayMode === "short" && "if-oauthButton-short",
|
|
513
|
-
displayMode === "icon" && "if-oauthButton-icon-only"
|
|
514
|
-
].filter(Boolean).join(" ");
|
|
1018
|
+
const variant = displayMode === "icon" ? "iconOnly" : displayMode;
|
|
515
1019
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
516
|
-
|
|
1020
|
+
OAuthButton,
|
|
517
1021
|
{
|
|
518
1022
|
type: "button",
|
|
519
1023
|
onClick: () => onClick(provider),
|
|
520
|
-
|
|
1024
|
+
$variant: variant,
|
|
521
1025
|
disabled: disabled || loading,
|
|
522
1026
|
style,
|
|
523
1027
|
children: [
|
|
524
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1028
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(SubmitButtonSpinner, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { size: 18 }) }) : /* @__PURE__ */ jsxRuntime.jsx(OAuthButtonIcon, { children: config.svg }),
|
|
525
1029
|
!loading && getButtonText() && /* @__PURE__ */ jsxRuntime.jsx("span", { children: getButtonText() })
|
|
526
1030
|
]
|
|
527
1031
|
}
|
|
@@ -580,14 +1084,12 @@ function AuthOAuthProviders({
|
|
|
580
1084
|
}
|
|
581
1085
|
};
|
|
582
1086
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
583
|
-
|
|
1087
|
+
OAuthProvidersContainer,
|
|
584
1088
|
{
|
|
585
|
-
className: "if-oauthProviders if-internal-op3m8k",
|
|
586
1089
|
style: {
|
|
587
1090
|
display: "grid",
|
|
588
1091
|
gridTemplateColumns: "repeat(6, 1fr)",
|
|
589
|
-
gap: "0.75rem"
|
|
590
|
-
width: "100%"
|
|
1092
|
+
gap: "0.75rem"
|
|
591
1093
|
},
|
|
592
1094
|
children: providers.map((provider, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
593
1095
|
AuthOAuthButton,
|
|
@@ -654,8 +1156,8 @@ function AuthVerificationCodeInput({
|
|
|
654
1156
|
}
|
|
655
1157
|
}
|
|
656
1158
|
};
|
|
657
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
658
|
-
|
|
1159
|
+
return /* @__PURE__ */ jsxRuntime.jsx(VerificationCodeInputContainer, { children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1160
|
+
VerificationCodeInput,
|
|
659
1161
|
{
|
|
660
1162
|
ref: (el) => {
|
|
661
1163
|
inputRefs.current[index] = el;
|
|
@@ -668,12 +1170,160 @@ function AuthVerificationCodeInput({
|
|
|
668
1170
|
onKeyDown: (e) => handleKeyDown(index, e),
|
|
669
1171
|
onPaste: handlePaste,
|
|
670
1172
|
disabled,
|
|
671
|
-
className: "if-verificationCode-input",
|
|
672
1173
|
autoComplete: "one-time-code"
|
|
673
1174
|
},
|
|
674
1175
|
index
|
|
675
1176
|
)) });
|
|
676
1177
|
}
|
|
1178
|
+
styled__default.default.form`
|
|
1179
|
+
display: flex;
|
|
1180
|
+
flex-direction: column;
|
|
1181
|
+
align-items: stretch;
|
|
1182
|
+
justify-content: center;
|
|
1183
|
+
gap: ${theme.spacing[6]};
|
|
1184
|
+
`;
|
|
1185
|
+
var VerificationStepWrapper = styled__default.default.div`
|
|
1186
|
+
display: flex;
|
|
1187
|
+
flex-direction: column;
|
|
1188
|
+
gap: ${theme.spacing[6]};
|
|
1189
|
+
align-items: stretch;
|
|
1190
|
+
`;
|
|
1191
|
+
var VerificationStepDescriptionContainer = styled__default.default.div`
|
|
1192
|
+
width: 100%;
|
|
1193
|
+
background-color: ${theme.colors.bgGray};
|
|
1194
|
+
border-radius: ${theme.radius.lg};
|
|
1195
|
+
padding: ${theme.spacing[3]} ${theme.spacing[3]} ${theme.spacing[6]} ${theme.spacing[3]};
|
|
1196
|
+
display: flex;
|
|
1197
|
+
flex-direction: column;
|
|
1198
|
+
gap: ${theme.spacing[3]};
|
|
1199
|
+
`;
|
|
1200
|
+
var VerificationStepDescriptionTitle = styled__default.default.h3`
|
|
1201
|
+
color: ${theme.colors.black};
|
|
1202
|
+
font-family: ${theme.fontFamily.base};
|
|
1203
|
+
font-size: ${theme.fontSize.base};
|
|
1204
|
+
font-style: normal;
|
|
1205
|
+
font-weight: ${theme.fontWeight.semibold};
|
|
1206
|
+
line-height: 24px;
|
|
1207
|
+
margin: 0;
|
|
1208
|
+
`;
|
|
1209
|
+
var VerificationStepDescription = styled__default.default.p`
|
|
1210
|
+
font-size: ${theme.fontSize.sm};
|
|
1211
|
+
color: ${theme.colors.textGray};
|
|
1212
|
+
text-align: left;
|
|
1213
|
+
font-family: ${theme.fontFamily.base};
|
|
1214
|
+
margin: 0;
|
|
1215
|
+
`;
|
|
1216
|
+
var VerificationEmail = styled__default.default.span`
|
|
1217
|
+
font-weight: ${theme.fontWeight.medium};
|
|
1218
|
+
color: ${theme.colors.text};
|
|
1219
|
+
`;
|
|
1220
|
+
var VerificationStepCodeContainer = styled__default.default.div`
|
|
1221
|
+
width: 100%;
|
|
1222
|
+
display: flex;
|
|
1223
|
+
flex-direction: column;
|
|
1224
|
+
gap: ${theme.spacing[10]};
|
|
1225
|
+
`;
|
|
1226
|
+
var VerificationStepCodeInputWrapper = styled__default.default.div`
|
|
1227
|
+
display: flex;
|
|
1228
|
+
flex-direction: column;
|
|
1229
|
+
gap: ${theme.spacing[6]};
|
|
1230
|
+
`;
|
|
1231
|
+
styled__default.default.p`
|
|
1232
|
+
font-size: ${theme.fontSize.sm};
|
|
1233
|
+
color: ${theme.colors.textSecondary};
|
|
1234
|
+
text-align: center;
|
|
1235
|
+
font-family: ${theme.fontFamily.base};
|
|
1236
|
+
margin: 0;
|
|
1237
|
+
`;
|
|
1238
|
+
var VerificationStepResendContainer = styled__default.default.div`
|
|
1239
|
+
width: 100%;
|
|
1240
|
+
font-size: ${theme.fontSize.sm};
|
|
1241
|
+
text-align: center;
|
|
1242
|
+
color: ${theme.colors.textSecondary};
|
|
1243
|
+
font-family: ${theme.fontFamily.base};
|
|
1244
|
+
`;
|
|
1245
|
+
var VerificationStepResendButton = styled__default.default.button`
|
|
1246
|
+
color: ${theme.colors.text};
|
|
1247
|
+
font-weight: ${theme.fontWeight.medium};
|
|
1248
|
+
transition: all ${theme.transition.base};
|
|
1249
|
+
background: none;
|
|
1250
|
+
border: none;
|
|
1251
|
+
padding: 0;
|
|
1252
|
+
font-family: ${theme.fontFamily.base};
|
|
1253
|
+
font-size: ${theme.fontSize.sm};
|
|
1254
|
+
|
|
1255
|
+
&:not(:disabled) {
|
|
1256
|
+
cursor: pointer;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
&:disabled {
|
|
1260
|
+
cursor: not-allowed;
|
|
1261
|
+
opacity: 0.5;
|
|
1262
|
+
}
|
|
1263
|
+
`;
|
|
1264
|
+
var VerifyStatusContainer = styled__default.default.div`
|
|
1265
|
+
width: 100%;
|
|
1266
|
+
display: flex;
|
|
1267
|
+
flex-direction: column;
|
|
1268
|
+
align-items: ${(props) => props.$stretch ? "stretch" : "center"};
|
|
1269
|
+
justify-content: center;
|
|
1270
|
+
gap: ${theme.spacing[6]};
|
|
1271
|
+
`;
|
|
1272
|
+
var VerifyStatusSpinner = styled__default.default.div`
|
|
1273
|
+
border-radius: ${theme.radius.full};
|
|
1274
|
+
height: ${theme.sizes.verifyCode};
|
|
1275
|
+
width: ${theme.sizes.verifyCode};
|
|
1276
|
+
border-bottom: 2px solid ${theme.colors.primary};
|
|
1277
|
+
`;
|
|
1278
|
+
var VerifyStatusSuccessContent = styled__default.default.div`
|
|
1279
|
+
display: flex;
|
|
1280
|
+
flex-direction: column;
|
|
1281
|
+
align-items: center;
|
|
1282
|
+
gap: ${theme.spacing[4]};
|
|
1283
|
+
`;
|
|
1284
|
+
var VerifyStatusSuccessIcon = styled__default.default.div`
|
|
1285
|
+
width: ${theme.sizes.verifyIcon};
|
|
1286
|
+
height: ${theme.sizes.verifyIcon};
|
|
1287
|
+
border-radius: ${theme.radius.full};
|
|
1288
|
+
background-color: ${theme.colors.successBg};
|
|
1289
|
+
display: flex;
|
|
1290
|
+
align-items: center;
|
|
1291
|
+
justify-content: center;
|
|
1292
|
+
`;
|
|
1293
|
+
var VerifyStatusSuccessIconSvg = styled__default.default.div`
|
|
1294
|
+
width: ${theme.sizes.verifyIconInner};
|
|
1295
|
+
height: ${theme.sizes.verifyIconInner};
|
|
1296
|
+
color: ${theme.colors.successDark};
|
|
1297
|
+
display: flex;
|
|
1298
|
+
align-items: center;
|
|
1299
|
+
justify-content: center;
|
|
1300
|
+
|
|
1301
|
+
svg {
|
|
1302
|
+
width: 100%;
|
|
1303
|
+
height: 100%;
|
|
1304
|
+
}
|
|
1305
|
+
`;
|
|
1306
|
+
var VerifyStatusTextCenter = styled__default.default.p`
|
|
1307
|
+
text-align: center;
|
|
1308
|
+
font-family: ${theme.fontFamily.base};
|
|
1309
|
+
font-size: ${theme.fontSize.sm};
|
|
1310
|
+
color: ${theme.colors.text};
|
|
1311
|
+
margin: 0;
|
|
1312
|
+
`;
|
|
1313
|
+
styled__default.default.div`
|
|
1314
|
+
display: none;
|
|
1315
|
+
`;
|
|
1316
|
+
styled__default.default.span`
|
|
1317
|
+
position: absolute;
|
|
1318
|
+
width: 1px;
|
|
1319
|
+
height: 1px;
|
|
1320
|
+
padding: 0;
|
|
1321
|
+
margin: -1px;
|
|
1322
|
+
overflow: hidden;
|
|
1323
|
+
clip: rect(0, 0, 0, 0);
|
|
1324
|
+
white-space: nowrap;
|
|
1325
|
+
border-width: 0;
|
|
1326
|
+
`;
|
|
677
1327
|
function AuthEmailVerificationStep({
|
|
678
1328
|
email,
|
|
679
1329
|
method,
|
|
@@ -727,19 +1377,19 @@ function AuthEmailVerificationStep({
|
|
|
727
1377
|
setVerificationCode("");
|
|
728
1378
|
}
|
|
729
1379
|
};
|
|
730
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
731
|
-
isLinkMethod && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
732
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
733
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1380
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(VerificationStepWrapper, { children: [
|
|
1381
|
+
isLinkMethod && /* @__PURE__ */ jsxRuntime.jsxs(VerificationStepDescriptionContainer, { children: [
|
|
1382
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerificationStepDescriptionTitle, { children: "Verify Your Email" }),
|
|
1383
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerificationStepDescription, { children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
734
1384
|
part,
|
|
735
|
-
index < array.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1385
|
+
index < array.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(VerificationEmail, { children: email })
|
|
736
1386
|
] }, index)) })
|
|
737
1387
|
] }),
|
|
738
|
-
!isLinkMethod && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
739
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
740
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1388
|
+
!isLinkMethod && /* @__PURE__ */ jsxRuntime.jsxs(VerificationStepCodeContainer, { children: [
|
|
1389
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VerificationStepCodeInputWrapper, { children: [
|
|
1390
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerificationStepDescription, { children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
741
1391
|
part,
|
|
742
|
-
index < array.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1392
|
+
index < array.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(VerificationEmail, { children: email })
|
|
743
1393
|
] }, index)) }),
|
|
744
1394
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
745
1395
|
AuthVerificationCodeInput,
|
|
@@ -763,17 +1413,16 @@ function AuthEmailVerificationStep({
|
|
|
763
1413
|
}
|
|
764
1414
|
)
|
|
765
1415
|
] }),
|
|
766
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1416
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VerificationStepResendContainer, { children: [
|
|
767
1417
|
"Didn't receive the email?",
|
|
768
1418
|
" ",
|
|
769
1419
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
770
|
-
|
|
1420
|
+
VerificationStepResendButton,
|
|
771
1421
|
{
|
|
772
1422
|
onClick: () => {
|
|
773
1423
|
void handleResend();
|
|
774
1424
|
},
|
|
775
1425
|
disabled: resendDisabled || isSending,
|
|
776
|
-
className: "if-verificationStep-resendButton",
|
|
777
1426
|
children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
|
|
778
1427
|
}
|
|
779
1428
|
)
|
|
@@ -832,16 +1481,16 @@ function AuthResetPasswordVerificationStep({
|
|
|
832
1481
|
setVerificationCode("");
|
|
833
1482
|
}
|
|
834
1483
|
};
|
|
835
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
836
|
-
isLinkMethod && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
837
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
838
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1484
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(VerificationStepWrapper, { children: [
|
|
1485
|
+
isLinkMethod && /* @__PURE__ */ jsxRuntime.jsxs(VerificationStepDescriptionContainer, { children: [
|
|
1486
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerificationStepDescriptionTitle, { children: "Check Your Email" }),
|
|
1487
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerificationStepDescription, { children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
839
1488
|
part,
|
|
840
|
-
index < array.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1489
|
+
index < array.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(VerificationEmail, { children: email })
|
|
841
1490
|
] }, index)) })
|
|
842
1491
|
] }),
|
|
843
|
-
!isLinkMethod && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
844
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1492
|
+
!isLinkMethod && /* @__PURE__ */ jsxRuntime.jsxs(VerificationStepCodeContainer, { children: [
|
|
1493
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerificationStepCodeInputWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
845
1494
|
AuthVerificationCodeInput,
|
|
846
1495
|
{
|
|
847
1496
|
value: verificationCode,
|
|
@@ -862,17 +1511,16 @@ function AuthResetPasswordVerificationStep({
|
|
|
862
1511
|
}
|
|
863
1512
|
)
|
|
864
1513
|
] }),
|
|
865
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1514
|
+
/* @__PURE__ */ jsxRuntime.jsxs(VerificationStepResendContainer, { children: [
|
|
866
1515
|
"Didn't receive the email?",
|
|
867
1516
|
" ",
|
|
868
1517
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
869
|
-
|
|
1518
|
+
VerificationStepResendButton,
|
|
870
1519
|
{
|
|
871
1520
|
onClick: () => {
|
|
872
1521
|
void handleResend();
|
|
873
1522
|
},
|
|
874
1523
|
disabled: resendDisabled || isSending,
|
|
875
|
-
className: "if-verificationStep-resendButton",
|
|
876
1524
|
children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
|
|
877
1525
|
}
|
|
878
1526
|
)
|
|
@@ -918,39 +1566,47 @@ function SignInForm({
|
|
|
918
1566
|
onVerifyCode,
|
|
919
1567
|
emailSent: false
|
|
920
1568
|
}
|
|
921
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
1569
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1570
|
+
"form",
|
|
1571
|
+
{
|
|
1572
|
+
onSubmit,
|
|
1573
|
+
noValidate: true,
|
|
1574
|
+
style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
|
|
1575
|
+
children: [
|
|
1576
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1577
|
+
AuthFormField,
|
|
1578
|
+
{
|
|
1579
|
+
id: "email",
|
|
1580
|
+
type: "email",
|
|
1581
|
+
label: emailLabel,
|
|
1582
|
+
placeholder: emailPlaceholder,
|
|
1583
|
+
value: email,
|
|
1584
|
+
onChange: (e) => onEmailChange(e.target.value),
|
|
1585
|
+
required: true,
|
|
1586
|
+
autoComplete: "email"
|
|
1587
|
+
}
|
|
1588
|
+
),
|
|
1589
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1590
|
+
AuthPasswordField,
|
|
1591
|
+
{
|
|
1592
|
+
id: "password",
|
|
1593
|
+
label: passwordLabel,
|
|
1594
|
+
placeholder: passwordPlaceholder,
|
|
1595
|
+
value: password,
|
|
1596
|
+
onChange: (e) => onPasswordChange(e.target.value),
|
|
1597
|
+
required: true,
|
|
1598
|
+
autoComplete: "current-password",
|
|
1599
|
+
authConfig,
|
|
1600
|
+
forgotPasswordLink: forgotPasswordUrl ? {
|
|
1601
|
+
href: forgotPasswordUrl,
|
|
1602
|
+
text: forgotPasswordText
|
|
1603
|
+
} : void 0
|
|
1604
|
+
}
|
|
1605
|
+
),
|
|
1606
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
|
|
1607
|
+
]
|
|
1608
|
+
}
|
|
1609
|
+
),
|
|
954
1610
|
!showVerificationStep && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
955
1611
|
/* @__PURE__ */ jsxRuntime.jsx(AuthLink, { text: signUpText, linkText: signUpLinkText, href: signUpUrl }),
|
|
956
1612
|
authConfig.oAuthProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1102,36 +1758,44 @@ function SignUpForm({
|
|
|
1102
1758
|
onVerifyCode,
|
|
1103
1759
|
emailSent: true
|
|
1104
1760
|
}
|
|
1105
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1761
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1762
|
+
"form",
|
|
1763
|
+
{
|
|
1764
|
+
onSubmit,
|
|
1765
|
+
noValidate: true,
|
|
1766
|
+
style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
|
|
1767
|
+
children: [
|
|
1768
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1769
|
+
AuthFormField,
|
|
1770
|
+
{
|
|
1771
|
+
id: "email",
|
|
1772
|
+
type: "email",
|
|
1773
|
+
label: emailLabel,
|
|
1774
|
+
placeholder: emailPlaceholder,
|
|
1775
|
+
value: email,
|
|
1776
|
+
onChange: (e) => onEmailChange(e.target.value),
|
|
1777
|
+
required: true,
|
|
1778
|
+
autoComplete: "email"
|
|
1779
|
+
}
|
|
1780
|
+
),
|
|
1781
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1782
|
+
AuthPasswordField,
|
|
1783
|
+
{
|
|
1784
|
+
id: "password",
|
|
1785
|
+
label: passwordLabel,
|
|
1786
|
+
placeholder: passwordPlaceholder,
|
|
1787
|
+
value: password,
|
|
1788
|
+
onChange: (e) => onPasswordChange(e.target.value),
|
|
1789
|
+
required: true,
|
|
1790
|
+
autoComplete: "new-password",
|
|
1791
|
+
showStrengthIndicator: true,
|
|
1792
|
+
authConfig
|
|
1793
|
+
}
|
|
1794
|
+
),
|
|
1795
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
|
|
1796
|
+
]
|
|
1797
|
+
}
|
|
1798
|
+
),
|
|
1135
1799
|
!showVerificationStep && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1136
1800
|
/* @__PURE__ */ jsxRuntime.jsx(AuthLink, { text: signInText, linkText: signInLinkText, href: signInUrl }),
|
|
1137
1801
|
authConfig.oAuthProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1331,22 +1995,30 @@ function ForgotPasswordForm({
|
|
|
1331
1995
|
onResendEmail: onResendEmail || (async () => {
|
|
1332
1996
|
})
|
|
1333
1997
|
}
|
|
1334
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1998
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1999
|
+
"form",
|
|
2000
|
+
{
|
|
2001
|
+
onSubmit,
|
|
2002
|
+
noValidate: true,
|
|
2003
|
+
style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
|
|
2004
|
+
children: [
|
|
2005
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2006
|
+
AuthFormField,
|
|
2007
|
+
{
|
|
2008
|
+
id: "email",
|
|
2009
|
+
type: "email",
|
|
2010
|
+
label: emailLabel,
|
|
2011
|
+
placeholder: emailPlaceholder,
|
|
2012
|
+
value: email,
|
|
2013
|
+
onChange: (e) => onEmailChange(e.target.value),
|
|
2014
|
+
required: true,
|
|
2015
|
+
autoComplete: "email"
|
|
2016
|
+
}
|
|
2017
|
+
),
|
|
2018
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
|
|
2019
|
+
]
|
|
2020
|
+
}
|
|
2021
|
+
),
|
|
1350
2022
|
!showVerificationStep && /* @__PURE__ */ jsxRuntime.jsx(AuthLink, { text: backToSignInText, linkText: "Back to Sign In", href: backToSignInUrl })
|
|
1351
2023
|
] });
|
|
1352
2024
|
}
|
|
@@ -1375,77 +2047,64 @@ function ResetPasswordForm({
|
|
|
1375
2047
|
successMessage = "Your password has been successfully reset. You can wait for redirect to sign in with your new password.";
|
|
1376
2048
|
}
|
|
1377
2049
|
if (success) {
|
|
1378
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AuthContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1379
|
-
|
|
2050
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AuthContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(VerifyStatusContainer, { $stretch: true, children: /* @__PURE__ */ jsxRuntime.jsxs(VerifyStatusSuccessContent, { children: [
|
|
2051
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerifyStatusSuccessIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(VerifyStatusSuccessIconSvg, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2052
|
+
"svg",
|
|
2053
|
+
{
|
|
2054
|
+
fill: "none",
|
|
2055
|
+
strokeLinecap: "round",
|
|
2056
|
+
strokeLinejoin: "round",
|
|
2057
|
+
strokeWidth: "2",
|
|
2058
|
+
viewBox: "0 0 24 24",
|
|
2059
|
+
stroke: "currentColor",
|
|
2060
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 13l4 4L19 7" })
|
|
2061
|
+
}
|
|
2062
|
+
) }) }),
|
|
2063
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerifyStatusTextCenter, { style: { fontSize: "1.5rem", fontWeight: 600 }, children: successTitle }),
|
|
2064
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerifyStatusTextCenter, { style: { color: theme.colors.textSecondary }, children: successMessage })
|
|
2065
|
+
] }) }) });
|
|
2066
|
+
}
|
|
2067
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(AuthContainer, { children: [
|
|
2068
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthHeader, { title, subtitle }),
|
|
2069
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthErrorBanner, { error: error || "" }),
|
|
2070
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2071
|
+
"form",
|
|
1380
2072
|
{
|
|
1381
|
-
|
|
2073
|
+
onSubmit,
|
|
2074
|
+
noValidate: true,
|
|
2075
|
+
style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
|
|
1382
2076
|
children: [
|
|
1383
2077
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1384
|
-
|
|
2078
|
+
AuthPasswordField,
|
|
1385
2079
|
{
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1396
|
-
"svg",
|
|
1397
|
-
{
|
|
1398
|
-
style: { width: "2rem", height: "2rem", color: "#059669" },
|
|
1399
|
-
fill: "none",
|
|
1400
|
-
strokeLinecap: "round",
|
|
1401
|
-
strokeLinejoin: "round",
|
|
1402
|
-
strokeWidth: "2",
|
|
1403
|
-
viewBox: "0 0 24 24",
|
|
1404
|
-
stroke: "currentColor",
|
|
1405
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 13l4 4L19 7" })
|
|
1406
|
-
}
|
|
1407
|
-
)
|
|
2080
|
+
id: "newPassword",
|
|
2081
|
+
label: newPasswordLabel,
|
|
2082
|
+
placeholder: newPasswordPlaceholder,
|
|
2083
|
+
value: newPassword,
|
|
2084
|
+
onChange: (e) => onNewPasswordChange(e.target.value),
|
|
2085
|
+
required: true,
|
|
2086
|
+
autoComplete: "new-password",
|
|
2087
|
+
showStrengthIndicator: true,
|
|
2088
|
+
authConfig
|
|
1408
2089
|
}
|
|
1409
2090
|
),
|
|
1410
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1411
|
-
|
|
2091
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2092
|
+
AuthPasswordField,
|
|
2093
|
+
{
|
|
2094
|
+
id: "confirmPassword",
|
|
2095
|
+
label: confirmPasswordLabel,
|
|
2096
|
+
placeholder: confirmPasswordPlaceholder,
|
|
2097
|
+
value: confirmPassword,
|
|
2098
|
+
onChange: (e) => onConfirmPasswordChange(e.target.value),
|
|
2099
|
+
required: true,
|
|
2100
|
+
autoComplete: "new-password",
|
|
2101
|
+
authConfig
|
|
2102
|
+
}
|
|
2103
|
+
),
|
|
2104
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
|
|
1412
2105
|
]
|
|
1413
2106
|
}
|
|
1414
|
-
)
|
|
1415
|
-
}
|
|
1416
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(AuthContainer, { children: [
|
|
1417
|
-
/* @__PURE__ */ jsxRuntime.jsx(AuthHeader, { title, subtitle }),
|
|
1418
|
-
/* @__PURE__ */ jsxRuntime.jsx(AuthErrorBanner, { error: error || "" }),
|
|
1419
|
-
/* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
|
|
1420
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1421
|
-
AuthPasswordField,
|
|
1422
|
-
{
|
|
1423
|
-
id: "newPassword",
|
|
1424
|
-
label: newPasswordLabel,
|
|
1425
|
-
placeholder: newPasswordPlaceholder,
|
|
1426
|
-
value: newPassword,
|
|
1427
|
-
onChange: (e) => onNewPasswordChange(e.target.value),
|
|
1428
|
-
required: true,
|
|
1429
|
-
autoComplete: "new-password",
|
|
1430
|
-
showStrengthIndicator: true,
|
|
1431
|
-
authConfig
|
|
1432
|
-
}
|
|
1433
|
-
),
|
|
1434
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1435
|
-
AuthPasswordField,
|
|
1436
|
-
{
|
|
1437
|
-
id: "confirmPassword",
|
|
1438
|
-
label: confirmPasswordLabel,
|
|
1439
|
-
placeholder: confirmPasswordPlaceholder,
|
|
1440
|
-
value: confirmPassword,
|
|
1441
|
-
onChange: (e) => onConfirmPasswordChange(e.target.value),
|
|
1442
|
-
required: true,
|
|
1443
|
-
autoComplete: "new-password",
|
|
1444
|
-
authConfig
|
|
1445
|
-
}
|
|
1446
|
-
),
|
|
1447
|
-
/* @__PURE__ */ jsxRuntime.jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
|
|
1448
|
-
] })
|
|
2107
|
+
)
|
|
1449
2108
|
] });
|
|
1450
2109
|
}
|
|
1451
2110
|
function ForgotPassword({ onError, ...uiProps }) {
|
|
@@ -1790,25 +2449,24 @@ function VerifyEmailStatus({
|
|
|
1790
2449
|
errorTitle = "Verification Failed"
|
|
1791
2450
|
}) {
|
|
1792
2451
|
if (status === "verifying") {
|
|
1793
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AuthContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1794
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1795
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2452
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AuthContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs(VerifyStatusContainer, { children: [
|
|
2453
|
+
/* @__PURE__ */ jsxRuntime.jsx(AuthHeader, { title: verifyingTitle }),
|
|
2454
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerifyStatusSpinner, {})
|
|
1796
2455
|
] }) });
|
|
1797
2456
|
}
|
|
1798
2457
|
if (status === "error") {
|
|
1799
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AuthContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
" Please try again or contact support if the problem persists. You can close this page and return to your app
|
|
1804
|
-
|
|
1805
|
-
|
|
2458
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AuthContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(VerifyStatusContainer, { $stretch: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2459
|
+
AuthHeader,
|
|
2460
|
+
{
|
|
2461
|
+
title: errorTitle,
|
|
2462
|
+
subtitle: `${error || "The verification link is invalid or has expired."} Please try again or contact support if the problem persists. You can close this page and return to your app.`
|
|
2463
|
+
}
|
|
2464
|
+
) }) });
|
|
1806
2465
|
}
|
|
1807
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AuthContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1808
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2466
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AuthContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(VerifyStatusContainer, { $stretch: true, children: /* @__PURE__ */ jsxRuntime.jsxs(VerifyStatusSuccessContent, { children: [
|
|
2467
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerifyStatusSuccessIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(VerifyStatusSuccessIconSvg, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1809
2468
|
"svg",
|
|
1810
2469
|
{
|
|
1811
|
-
className: "if-verifyStatus-successIconSvg",
|
|
1812
2470
|
fill: "none",
|
|
1813
2471
|
strokeLinecap: "round",
|
|
1814
2472
|
strokeLinejoin: "round",
|
|
@@ -1817,9 +2475,9 @@ function VerifyEmailStatus({
|
|
|
1817
2475
|
stroke: "currentColor",
|
|
1818
2476
|
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 13l4 4L19 7" })
|
|
1819
2477
|
}
|
|
1820
|
-
) }),
|
|
1821
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1822
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2478
|
+
) }) }),
|
|
2479
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerifyStatusTextCenter, { style: { fontSize: "1.5rem", fontWeight: 600 }, children: successTitle }),
|
|
2480
|
+
/* @__PURE__ */ jsxRuntime.jsx(VerifyStatusTextCenter, { style: { color: theme.colors.textSecondary }, children: successMessage })
|
|
1823
2481
|
] }) }) });
|
|
1824
2482
|
}
|
|
1825
2483
|
function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
|
|
@@ -1869,6 +2527,120 @@ function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
|
|
|
1869
2527
|
}, [token, verifyEmail, onSuccess, onError]);
|
|
1870
2528
|
return /* @__PURE__ */ jsxRuntime.jsx(VerifyEmailStatus, { status, error, ...uiProps });
|
|
1871
2529
|
}
|
|
2530
|
+
var UserButtonContainer = styled__default.default.div`
|
|
2531
|
+
position: relative;
|
|
2532
|
+
display: inline-block;
|
|
2533
|
+
`;
|
|
2534
|
+
var UserButtonButton = styled__default.default.button`
|
|
2535
|
+
display: flex;
|
|
2536
|
+
align-items: center;
|
|
2537
|
+
justify-content: center;
|
|
2538
|
+
gap: ${theme.spacing[2]};
|
|
2539
|
+
padding: ${theme.spacing[2]};
|
|
2540
|
+
border-radius: ${(props) => props.$detailed ? theme.radius.sm : theme.radius.full};
|
|
2541
|
+
background-color: ${(props) => props.$detailed ? theme.colors.bgWhite : "transparent"};
|
|
2542
|
+
border: ${(props) => props.$detailed ? `1px solid ${theme.colors.border}` : "none"};
|
|
2543
|
+
cursor: pointer;
|
|
2544
|
+
transition: all ${theme.transition.base};
|
|
2545
|
+
|
|
2546
|
+
&:hover {
|
|
2547
|
+
${(props) => props.$detailed ? `
|
|
2548
|
+
background-color: ${theme.colors.bgLight};
|
|
2549
|
+
opacity: 1;
|
|
2550
|
+
` : `
|
|
2551
|
+
opacity: 0.8;
|
|
2552
|
+
`}
|
|
2553
|
+
}
|
|
2554
|
+
`;
|
|
2555
|
+
var UserButtonAvatar = styled__default.default.div`
|
|
2556
|
+
width: 2rem;
|
|
2557
|
+
height: 2rem;
|
|
2558
|
+
border-radius: ${theme.radius.full};
|
|
2559
|
+
background-color: ${theme.colors.primary};
|
|
2560
|
+
color: ${theme.colors.bgWhite};
|
|
2561
|
+
display: flex;
|
|
2562
|
+
align-items: center;
|
|
2563
|
+
justify-content: center;
|
|
2564
|
+
font-weight: 600;
|
|
2565
|
+
font-size: ${theme.fontSize.sm};
|
|
2566
|
+
font-family: ${theme.fontFamily.base};
|
|
2567
|
+
overflow: hidden;
|
|
2568
|
+
`;
|
|
2569
|
+
var UserButtonAvatarImage = styled__default.default.img`
|
|
2570
|
+
border-radius: ${theme.radius.full};
|
|
2571
|
+
object-fit: cover;
|
|
2572
|
+
width: 100%;
|
|
2573
|
+
height: 100%;
|
|
2574
|
+
`;
|
|
2575
|
+
var UserButtonAvatarInitials = styled__default.default.span`
|
|
2576
|
+
color: ${theme.colors.bgWhite};
|
|
2577
|
+
font-weight: 600;
|
|
2578
|
+
font-size: ${theme.fontSize.sm};
|
|
2579
|
+
`;
|
|
2580
|
+
var UserButtonInfo = styled__default.default.div`
|
|
2581
|
+
display: flex;
|
|
2582
|
+
flex-direction: column;
|
|
2583
|
+
align-items: flex-start;
|
|
2584
|
+
gap: 0.125rem;
|
|
2585
|
+
`;
|
|
2586
|
+
var UserButtonName = styled__default.default.div`
|
|
2587
|
+
font-size: ${theme.fontSize.sm};
|
|
2588
|
+
font-weight: 600;
|
|
2589
|
+
color: ${theme.colors.text};
|
|
2590
|
+
line-height: 1.25rem;
|
|
2591
|
+
text-align: left;
|
|
2592
|
+
font-family: ${theme.fontFamily.base};
|
|
2593
|
+
`;
|
|
2594
|
+
var UserButtonEmail = styled__default.default.div`
|
|
2595
|
+
font-size: ${theme.fontSize.xs};
|
|
2596
|
+
color: ${theme.colors.textSecondary};
|
|
2597
|
+
line-height: 1rem;
|
|
2598
|
+
text-align: left;
|
|
2599
|
+
font-family: ${theme.fontFamily.base};
|
|
2600
|
+
`;
|
|
2601
|
+
var UserButtonMenu = styled__default.default.div`
|
|
2602
|
+
position: absolute;
|
|
2603
|
+
margin-top: ${theme.spacing[2]};
|
|
2604
|
+
background-color: ${theme.colors.bgWhite};
|
|
2605
|
+
border: 1px solid ${theme.colors.border};
|
|
2606
|
+
border-radius: ${theme.radius.md};
|
|
2607
|
+
box-shadow: ${theme.shadow.lg};
|
|
2608
|
+
padding: ${theme.spacing[2]};
|
|
2609
|
+
min-width: 200px;
|
|
2610
|
+
z-index: 50;
|
|
2611
|
+
`;
|
|
2612
|
+
var UserButtonMenuItem = styled__default.default.button`
|
|
2613
|
+
display: flex;
|
|
2614
|
+
align-items: center;
|
|
2615
|
+
gap: ${theme.spacing[2]};
|
|
2616
|
+
padding: ${theme.spacing[2]};
|
|
2617
|
+
border-radius: ${theme.radius.sm};
|
|
2618
|
+
cursor: pointer;
|
|
2619
|
+
transition: background-color ${theme.transition.fast};
|
|
2620
|
+
font-size: ${theme.fontSize.sm};
|
|
2621
|
+
color: ${(props) => props.$signout ? theme.colors.error : theme.colors.text};
|
|
2622
|
+
font-family: ${theme.fontFamily.base};
|
|
2623
|
+
background: none;
|
|
2624
|
+
border: none;
|
|
2625
|
+
width: 100%;
|
|
2626
|
+
text-align: left;
|
|
2627
|
+
|
|
2628
|
+
&:hover {
|
|
2629
|
+
background-color: ${theme.colors.bgLight};
|
|
2630
|
+
}
|
|
2631
|
+
`;
|
|
2632
|
+
var UserButtonMenuItemIcon = styled__default.default.div`
|
|
2633
|
+
width: 1.25rem;
|
|
2634
|
+
height: 1.25rem;
|
|
2635
|
+
display: flex;
|
|
2636
|
+
align-items: center;
|
|
2637
|
+
justify-content: center;
|
|
2638
|
+
|
|
2639
|
+
svg {
|
|
2640
|
+
width: 100%;
|
|
2641
|
+
height: 100%;
|
|
2642
|
+
}
|
|
2643
|
+
`;
|
|
1872
2644
|
function UserButton({ afterSignOutUrl = "/", mode = "detailed" }) {
|
|
1873
2645
|
const { user, signOut } = useInsforge();
|
|
1874
2646
|
const [isOpen, setIsOpen] = react.useState(false);
|
|
@@ -1920,43 +2692,34 @@ function UserButton({ afterSignOutUrl = "/", mode = "detailed" }) {
|
|
|
1920
2692
|
return null;
|
|
1921
2693
|
}
|
|
1922
2694
|
const initials = user.name ? user.name.charAt(0).toUpperCase() : user.email.split("@")[0].slice(0, 2).toUpperCase();
|
|
1923
|
-
|
|
1924
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-userButton-container if-internal-ub3k8p", ref: dropdownRef, children: [
|
|
2695
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(UserButtonContainer, { ref: dropdownRef, children: [
|
|
1925
2696
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1926
|
-
|
|
2697
|
+
UserButtonButton,
|
|
1927
2698
|
{
|
|
1928
|
-
|
|
2699
|
+
$detailed: mode === "detailed",
|
|
1929
2700
|
onClick: () => setIsOpen(!isOpen),
|
|
1930
2701
|
"aria-expanded": isOpen,
|
|
1931
2702
|
"aria-haspopup": "true",
|
|
1932
2703
|
children: [
|
|
1933
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1934
|
-
|
|
2704
|
+
/* @__PURE__ */ jsxRuntime.jsx(UserButtonAvatar, { children: user.avatarUrl && !imageError ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2705
|
+
UserButtonAvatarImage,
|
|
1935
2706
|
{
|
|
1936
2707
|
src: user.avatarUrl,
|
|
1937
2708
|
alt: user.email,
|
|
1938
|
-
onError: () => setImageError(true)
|
|
1939
|
-
className: "if-userButton-avatarImage"
|
|
2709
|
+
onError: () => setImageError(true)
|
|
1940
2710
|
}
|
|
1941
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1942
|
-
mode === "detailed" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1943
|
-
user.name && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1944
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2711
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(UserButtonAvatarInitials, { children: initials }) }),
|
|
2712
|
+
mode === "detailed" && /* @__PURE__ */ jsxRuntime.jsxs(UserButtonInfo, { children: [
|
|
2713
|
+
user.name && /* @__PURE__ */ jsxRuntime.jsx(UserButtonName, { children: user.name }),
|
|
2714
|
+
/* @__PURE__ */ jsxRuntime.jsx(UserButtonEmail, { children: user.email })
|
|
1945
2715
|
] })
|
|
1946
2716
|
]
|
|
1947
2717
|
}
|
|
1948
2718
|
),
|
|
1949
|
-
isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
className: "if-userButton-menuItem if-userButton-menuItem-signout",
|
|
1954
|
-
children: [
|
|
1955
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { className: "if-userButton-menuItem-icon" }),
|
|
1956
|
-
"Sign out"
|
|
1957
|
-
]
|
|
1958
|
-
}
|
|
1959
|
-
) })
|
|
2719
|
+
isOpen && /* @__PURE__ */ jsxRuntime.jsx(UserButtonMenu, { children: /* @__PURE__ */ jsxRuntime.jsxs(UserButtonMenuItem, { $signout: true, onClick: () => void handleSignOut(), children: [
|
|
2720
|
+
/* @__PURE__ */ jsxRuntime.jsx(UserButtonMenuItemIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, {}) }),
|
|
2721
|
+
"Sign out"
|
|
2722
|
+
] }) })
|
|
1960
2723
|
] });
|
|
1961
2724
|
}
|
|
1962
2725
|
function Protect({
|