@dynamic-labs/sdk-react-core 2.0.0-alpha.24 → 2.0.0-alpha.25
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/CHANGELOG.md +7 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +13 -13
- package/src/lib/components/Divider/Divider.cjs +2 -2
- package/src/lib/components/Divider/Divider.d.ts +4 -4
- package/src/lib/components/Divider/Divider.js +2 -2
- package/src/lib/components/EmailForm/EmailForm.cjs +3 -2
- package/src/lib/components/EmailForm/EmailForm.d.ts +5 -4
- package/src/lib/components/EmailForm/EmailForm.js +3 -2
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/views/LoginView/LoginView.cjs +6 -113
- package/src/lib/views/LoginView/LoginView.js +6 -113
- package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.cjs +123 -0
- package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.d.ts +10 -0
- package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.js +119 -0
- package/src/lib/views/LoginView/LoginViewSection/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +2 -2
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.d.ts +5 -4
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.0.0-alpha.25](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.24...v2.0.0-alpha.25) (2024-04-04)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add in-app browser deeplink for metamask ([#5176](https://github.com/dynamic-labs/DynamicAuth/issues/5176)) ([02ce607](https://github.com/dynamic-labs/DynamicAuth/commit/02ce6077ed0deeaefc7a62ee91ff72f5bce2b327)), closes [#5123](https://github.com/dynamic-labs/DynamicAuth/issues/5123)
|
|
8
|
+
|
|
2
9
|
## [2.0.0-alpha.24](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.23...v2.0.0-alpha.24) (2024-04-03)
|
|
3
10
|
|
|
4
11
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.25",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
"react-i18next": "13.5.0",
|
|
18
18
|
"yup": "0.32.11",
|
|
19
19
|
"react-international-phone": "4.2.5",
|
|
20
|
-
"@dynamic-labs/ethereum": "2.0.0-alpha.
|
|
21
|
-
"@dynamic-labs/iconic": "2.0.0-alpha.
|
|
22
|
-
"@dynamic-labs/logger": "2.0.0-alpha.
|
|
23
|
-
"@dynamic-labs/multi-wallet": "2.0.0-alpha.
|
|
24
|
-
"@dynamic-labs/rpc-provider-ethereum": "2.0.0-alpha.
|
|
25
|
-
"@dynamic-labs/rpc-provider-solana": "2.0.0-alpha.
|
|
26
|
-
"@dynamic-labs/rpc-providers": "2.0.0-alpha.
|
|
27
|
-
"@dynamic-labs/types": "2.0.0-alpha.
|
|
28
|
-
"@dynamic-labs/utils": "2.0.0-alpha.
|
|
29
|
-
"@dynamic-labs/viem-utils": "2.0.0-alpha.
|
|
30
|
-
"@dynamic-labs/wallet-book": "2.0.0-alpha.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "2.0.0-alpha.
|
|
20
|
+
"@dynamic-labs/ethereum": "2.0.0-alpha.25",
|
|
21
|
+
"@dynamic-labs/iconic": "2.0.0-alpha.25",
|
|
22
|
+
"@dynamic-labs/logger": "2.0.0-alpha.25",
|
|
23
|
+
"@dynamic-labs/multi-wallet": "2.0.0-alpha.25",
|
|
24
|
+
"@dynamic-labs/rpc-provider-ethereum": "2.0.0-alpha.25",
|
|
25
|
+
"@dynamic-labs/rpc-provider-solana": "2.0.0-alpha.25",
|
|
26
|
+
"@dynamic-labs/rpc-providers": "2.0.0-alpha.25",
|
|
27
|
+
"@dynamic-labs/types": "2.0.0-alpha.25",
|
|
28
|
+
"@dynamic-labs/utils": "2.0.0-alpha.25",
|
|
29
|
+
"@dynamic-labs/viem-utils": "2.0.0-alpha.25",
|
|
30
|
+
"@dynamic-labs/wallet-book": "2.0.0-alpha.25",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "2.0.0-alpha.25",
|
|
32
32
|
"eventemitter3": "5.0.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -74,8 +74,8 @@ require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/Secondar
|
|
|
74
74
|
require('@hcaptcha/react-hcaptcha');
|
|
75
75
|
require('../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs');
|
|
76
76
|
|
|
77
|
-
const Divider = ({ text, className
|
|
77
|
+
const Divider = ({ text, className, style, fullWidth = false, }) => (jsxRuntime.jsxs("div", { className: classNames.classNames('divider', className, {
|
|
78
78
|
'divider__full-width': fullWidth,
|
|
79
|
-
}), children: [jsxRuntime.jsx("div", { className: 'divider__dash' }), Boolean(text) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { className: 'divider__text', variant: 'body_small', color: 'secondary', children: text }), jsxRuntime.jsx("div", { className: 'divider__dash' })] }))] }));
|
|
79
|
+
}), style: style, children: [jsxRuntime.jsx("div", { className: 'divider__dash' }), Boolean(text) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { className: 'divider__text', variant: 'body_small', color: 'secondary', children: text }), jsxRuntime.jsx("div", { className: 'divider__dash' })] }))] }));
|
|
80
80
|
|
|
81
81
|
exports.Divider = Divider;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ClassStyleProps } from '../../utils/types';
|
|
3
|
+
type DividerProps = ClassStyleProps & {
|
|
4
4
|
fullWidth?: boolean;
|
|
5
5
|
text?: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const Divider:
|
|
7
|
+
export declare const Divider: FC<DividerProps>;
|
|
8
8
|
export {};
|
|
@@ -70,8 +70,8 @@ import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/Secondary
|
|
|
70
70
|
import '@hcaptcha/react-hcaptcha';
|
|
71
71
|
import '../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js';
|
|
72
72
|
|
|
73
|
-
const Divider = ({ text, className
|
|
73
|
+
const Divider = ({ text, className, style, fullWidth = false, }) => (jsxs("div", { className: classNames('divider', className, {
|
|
74
74
|
'divider__full-width': fullWidth,
|
|
75
|
-
}), children: [jsx("div", { className: 'divider__dash' }), Boolean(text) && (jsxs(Fragment, { children: [jsx(Typography, { className: 'divider__text', variant: 'body_small', color: 'secondary', children: text }), jsx("div", { className: 'divider__dash' })] }))] }));
|
|
75
|
+
}), style: style, children: [jsx("div", { className: 'divider__dash' }), Boolean(text) && (jsxs(Fragment, { children: [jsx(Typography, { className: 'divider__text', variant: 'body_small', color: 'secondary', children: text }), jsx("div", { className: 'divider__dash' })] }))] }));
|
|
76
76
|
|
|
77
77
|
export { Divider };
|
|
@@ -6,6 +6,7 @@ var _tslib = require('../../../../_virtual/_tslib.cjs');
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
|
+
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
9
10
|
require('../../events/dynamicEvents.cjs');
|
|
10
11
|
require('@dynamic-labs/utils');
|
|
11
12
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
@@ -75,7 +76,7 @@ require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/Secondar
|
|
|
75
76
|
require('@hcaptcha/react-hcaptcha');
|
|
76
77
|
require('../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs');
|
|
77
78
|
|
|
78
|
-
const EmailForm = ({ isLoading, onSubmit, isEmailInvalid = false, currentEmail, emailSubmitButtonInsideInput = false, }) => {
|
|
79
|
+
const EmailForm = ({ isLoading, onSubmit, isEmailInvalid = false, currentEmail, emailSubmitButtonInsideInput = false, className, style, }) => {
|
|
79
80
|
const { t } = reactI18next.useTranslation();
|
|
80
81
|
const [emailInput, setEmailInput] = React.useState(currentEmail !== null && currentEmail !== void 0 ? currentEmail : '');
|
|
81
82
|
const [invalidEmail, setInvalidEmail] = React.useState(isEmailInvalid);
|
|
@@ -94,7 +95,7 @@ const EmailForm = ({ isLoading, onSubmit, isEmailInvalid = false, currentEmail,
|
|
|
94
95
|
}
|
|
95
96
|
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(emailInput);
|
|
96
97
|
});
|
|
97
|
-
return (jsxRuntime.jsxs("form", { className: 'login-with-email-form', "data-testid": 'email-form', onSubmit: (e) => handleSubmit(e), children: [jsxRuntime.jsx(Input.Input, { id: 'email_field', value: emailInput, onChange: handleEmailOnChangeEvent, copykey: 'dyn_login.email_form.email_field.label', label: t('dyn_login.email_form.email_field.label'), error: invalidEmail, message: invalidEmail && t('dyn_login.helper.email_form.invalid_email'), suffix: jsxRuntime.jsx(InlineSubmitButton.InlineSubmitButton, { disabled: isLoading, highlighted: emailInput.length > 0, isFocused: isFocused, isHovered: isHovered, emailSubmitButtonInsideInput: emailSubmitButtonInsideInput }), disabled: isLoading, type: 'email', onPointerEnter: () => setIsHovered(true), onPointerLeave: () => setIsHovered(false), onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false) }), !emailSubmitButtonInsideInput && (jsxRuntime.jsx(Button.Button, { dataTestId: 'submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading || emailInput.length < 3, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: 'dyn_login.email_form.submit_button.label', typographyProps: {
|
|
98
|
+
return (jsxRuntime.jsxs("form", { className: classNames.classNames('login-with-email-form', className), style: style, "data-testid": 'email-form', onSubmit: (e) => handleSubmit(e), children: [jsxRuntime.jsx(Input.Input, { id: 'email_field', value: emailInput, onChange: handleEmailOnChangeEvent, copykey: 'dyn_login.email_form.email_field.label', label: t('dyn_login.email_form.email_field.label'), error: invalidEmail, message: invalidEmail && t('dyn_login.helper.email_form.invalid_email'), suffix: jsxRuntime.jsx(InlineSubmitButton.InlineSubmitButton, { disabled: isLoading, highlighted: emailInput.length > 0, isFocused: isFocused, isHovered: isHovered, emailSubmitButtonInsideInput: emailSubmitButtonInsideInput }), disabled: isLoading, type: 'email', onPointerEnter: () => setIsHovered(true), onPointerLeave: () => setIsHovered(false), onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false) }), !emailSubmitButtonInsideInput && (jsxRuntime.jsx(Button.Button, { dataTestId: 'submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading || emailInput.length < 3, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: 'dyn_login.email_form.submit_button.label', typographyProps: {
|
|
98
99
|
color: 'inherit',
|
|
99
100
|
}, children: t('dyn_login.email_form.submit_button.label') }))] }));
|
|
100
101
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ClassStyleProps } from '../../utils/types';
|
|
3
|
+
type EmailFormProps = ClassStyleProps & {
|
|
3
4
|
onSubmit?: (emailInput: string) => void;
|
|
4
5
|
onSubmitError?: () => void;
|
|
5
6
|
isLoading: boolean;
|
|
6
7
|
currentEmail?: string;
|
|
7
8
|
isEmailInvalid?: boolean;
|
|
8
9
|
emailSubmitButtonInsideInput?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const EmailForm:
|
|
10
|
+
};
|
|
11
|
+
export declare const EmailForm: FC<EmailFormProps>;
|
|
11
12
|
export {};
|
|
@@ -2,6 +2,7 @@ import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
5
6
|
import '../../events/dynamicEvents.js';
|
|
6
7
|
import '@dynamic-labs/utils';
|
|
7
8
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
@@ -71,7 +72,7 @@ import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/Secondary
|
|
|
71
72
|
import '@hcaptcha/react-hcaptcha';
|
|
72
73
|
import '../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js';
|
|
73
74
|
|
|
74
|
-
const EmailForm = ({ isLoading, onSubmit, isEmailInvalid = false, currentEmail, emailSubmitButtonInsideInput = false, }) => {
|
|
75
|
+
const EmailForm = ({ isLoading, onSubmit, isEmailInvalid = false, currentEmail, emailSubmitButtonInsideInput = false, className, style, }) => {
|
|
75
76
|
const { t } = useTranslation();
|
|
76
77
|
const [emailInput, setEmailInput] = useState(currentEmail !== null && currentEmail !== void 0 ? currentEmail : '');
|
|
77
78
|
const [invalidEmail, setInvalidEmail] = useState(isEmailInvalid);
|
|
@@ -90,7 +91,7 @@ const EmailForm = ({ isLoading, onSubmit, isEmailInvalid = false, currentEmail,
|
|
|
90
91
|
}
|
|
91
92
|
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(emailInput);
|
|
92
93
|
});
|
|
93
|
-
return (jsxs("form", { className: 'login-with-email-form', "data-testid": 'email-form', onSubmit: (e) => handleSubmit(e), children: [jsx(Input, { id: 'email_field', value: emailInput, onChange: handleEmailOnChangeEvent, copykey: 'dyn_login.email_form.email_field.label', label: t('dyn_login.email_form.email_field.label'), error: invalidEmail, message: invalidEmail && t('dyn_login.helper.email_form.invalid_email'), suffix: jsx(InlineSubmitButton, { disabled: isLoading, highlighted: emailInput.length > 0, isFocused: isFocused, isHovered: isHovered, emailSubmitButtonInsideInput: emailSubmitButtonInsideInput }), disabled: isLoading, type: 'email', onPointerEnter: () => setIsHovered(true), onPointerLeave: () => setIsHovered(false), onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false) }), !emailSubmitButtonInsideInput && (jsx(Button, { dataTestId: 'submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading || emailInput.length < 3, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: 'dyn_login.email_form.submit_button.label', typographyProps: {
|
|
94
|
+
return (jsxs("form", { className: classNames('login-with-email-form', className), style: style, "data-testid": 'email-form', onSubmit: (e) => handleSubmit(e), children: [jsx(Input, { id: 'email_field', value: emailInput, onChange: handleEmailOnChangeEvent, copykey: 'dyn_login.email_form.email_field.label', label: t('dyn_login.email_form.email_field.label'), error: invalidEmail, message: invalidEmail && t('dyn_login.helper.email_form.invalid_email'), suffix: jsx(InlineSubmitButton, { disabled: isLoading, highlighted: emailInput.length > 0, isFocused: isFocused, isHovered: isHovered, emailSubmitButtonInsideInput: emailSubmitButtonInsideInput }), disabled: isLoading, type: 'email', onPointerEnter: () => setIsHovered(true), onPointerLeave: () => setIsHovered(false), onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false) }), !emailSubmitButtonInsideInput && (jsx(Button, { dataTestId: 'submit_button', buttonClassName: 'login-with-email-form__button', type: 'submit', loading: isLoading, disabled: isLoading || emailInput.length < 3, buttonVariant: 'brand-primary', buttonPadding: 'login-screen-height', expanded: true, copykey: 'dyn_login.email_form.submit_button.label', typographyProps: {
|
|
94
95
|
color: 'inherit',
|
|
95
96
|
}, children: t('dyn_login.email_form.submit_button.label') }))] }));
|
|
96
97
|
};
|