@dynamic-labs/sdk-react-core 4.6.2 → 4.6.3
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 +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/lib/components/BaseButton/BaseButton.cjs +20 -0
- package/src/lib/components/BaseButton/BaseButton.d.ts +21 -0
- package/src/lib/components/BaseButton/BaseButton.js +16 -0
- package/src/lib/components/BaseButton/index.d.ts +1 -0
- package/src/lib/components/Button/Button.cjs +5 -1
- package/src/lib/components/Button/Button.d.ts +6 -7
- package/src/lib/components/Button/Button.js +5 -1
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/types/ButtonAriaProps.d.ts +5 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.cjs +20 -8
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.js +21 -9
- package/src/lib/shared/assets/gear.cjs +0 -54
- package/src/lib/shared/assets/gear.js +0 -30
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.6.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.6.2...v4.6.3) (2025-02-14)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* optimize zerodev connector initialization ([dff1b4d](https://github.com/dynamic-labs/dynamic-auth/commit/dff1b4d410ab06c45635e0114823cbba4b8c1905))
|
|
8
|
+
|
|
2
9
|
### [4.6.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.6.1...v4.6.2) (2025-02-14)
|
|
3
10
|
|
|
4
11
|
|
package/package.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "4.6.
|
|
6
|
+
var version = "4.6.3";
|
|
7
7
|
var dependencies = {
|
|
8
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
8
|
+
"@dynamic-labs/sdk-api-core": "0.0.628",
|
|
9
9
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
10
10
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
11
11
|
"country-list": "2.3.0",
|
package/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "4.6.
|
|
2
|
+
var version = "4.6.3";
|
|
3
3
|
var dependencies = {
|
|
4
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
4
|
+
"@dynamic-labs/sdk-api-core": "0.0.628",
|
|
5
5
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
6
6
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
7
7
|
"country-list": "2.3.0",
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.3",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
5
|
+
"@dynamic-labs/sdk-api-core": "0.0.628",
|
|
6
6
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
7
7
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
8
8
|
"country-list": "2.3.0",
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"yup": "0.32.11",
|
|
15
15
|
"react-international-phone": "4.2.5",
|
|
16
16
|
"bs58": "5.0.0",
|
|
17
|
-
"@dynamic-labs/assert-package-version": "4.6.
|
|
18
|
-
"@dynamic-labs/iconic": "4.6.
|
|
19
|
-
"@dynamic-labs/logger": "4.6.
|
|
20
|
-
"@dynamic-labs/multi-wallet": "4.6.
|
|
21
|
-
"@dynamic-labs/rpc-providers": "4.6.
|
|
22
|
-
"@dynamic-labs/store": "4.6.
|
|
23
|
-
"@dynamic-labs/types": "4.6.
|
|
24
|
-
"@dynamic-labs/utils": "4.6.
|
|
25
|
-
"@dynamic-labs/wallet-book": "4.6.
|
|
26
|
-
"@dynamic-labs/wallet-connector-core": "4.6.
|
|
17
|
+
"@dynamic-labs/assert-package-version": "4.6.3",
|
|
18
|
+
"@dynamic-labs/iconic": "4.6.3",
|
|
19
|
+
"@dynamic-labs/logger": "4.6.3",
|
|
20
|
+
"@dynamic-labs/multi-wallet": "4.6.3",
|
|
21
|
+
"@dynamic-labs/rpc-providers": "4.6.3",
|
|
22
|
+
"@dynamic-labs/store": "4.6.3",
|
|
23
|
+
"@dynamic-labs/types": "4.6.3",
|
|
24
|
+
"@dynamic-labs/utils": "4.6.3",
|
|
25
|
+
"@dynamic-labs/wallet-book": "4.6.3",
|
|
26
|
+
"@dynamic-labs/wallet-connector-core": "4.6.3",
|
|
27
27
|
"eventemitter3": "5.0.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Headless Button component for other buttons to extend.
|
|
10
|
+
*
|
|
11
|
+
* This component handles button basics such as:
|
|
12
|
+
* - Accessibility props
|
|
13
|
+
* - Refs
|
|
14
|
+
* - Test IDs
|
|
15
|
+
* - Click events
|
|
16
|
+
* - Disabled state
|
|
17
|
+
*/
|
|
18
|
+
const BaseButton = ({ children, className, dataTestId, disabled, onClick, type, style, ariaLabel, ariaExpanded, ariaControls, buttonRef, }) => (jsxRuntime.jsx("button", { type: type, className: className, ref: buttonRef, onClick: onClick, disabled: disabled, "data-testid": dataTestId, style: style, "aria-label": ariaLabel, "aria-expanded": ariaExpanded, "aria-controls": ariaControls, children: children }));
|
|
19
|
+
|
|
20
|
+
exports.BaseButton = BaseButton;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, FC, MouseEventHandler, PropsWithChildren, Ref } from 'react';
|
|
2
|
+
import { ButtonAriaProps } from '../../utils/types/ButtonAriaProps';
|
|
3
|
+
import { ClassStyleProps } from '../../utils/types/ClassStyleProps';
|
|
4
|
+
export type BaseButtonProps = ClassStyleProps & ButtonAriaProps & PropsWithChildren & {
|
|
5
|
+
dataTestId?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onClick?: MouseEventHandler<HTMLButtonElement> | (() => Promise<void>);
|
|
8
|
+
buttonRef?: Ref<HTMLButtonElement>;
|
|
9
|
+
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Headless Button component for other buttons to extend.
|
|
13
|
+
*
|
|
14
|
+
* This component handles button basics such as:
|
|
15
|
+
* - Accessibility props
|
|
16
|
+
* - Refs
|
|
17
|
+
* - Test IDs
|
|
18
|
+
* - Click events
|
|
19
|
+
* - Disabled state
|
|
20
|
+
*/
|
|
21
|
+
export declare const BaseButton: FC<BaseButtonProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Headless Button component for other buttons to extend.
|
|
6
|
+
*
|
|
7
|
+
* This component handles button basics such as:
|
|
8
|
+
* - Accessibility props
|
|
9
|
+
* - Refs
|
|
10
|
+
* - Test IDs
|
|
11
|
+
* - Click events
|
|
12
|
+
* - Disabled state
|
|
13
|
+
*/
|
|
14
|
+
const BaseButton = ({ children, className, dataTestId, disabled, onClick, type, style, ariaLabel, ariaExpanded, ariaControls, buttonRef, }) => (jsx("button", { type: type, className: className, ref: buttonRef, onClick: onClick, disabled: disabled, "data-testid": dataTestId, style: style, "aria-label": ariaLabel, "aria-expanded": ariaExpanded, "aria-controls": ariaControls, children: children }));
|
|
15
|
+
|
|
16
|
+
export { BaseButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BaseButton';
|
|
@@ -8,8 +8,12 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
10
10
|
var spinner = require('../Spinner/spinner.cjs');
|
|
11
|
+
var BaseButton = require('../BaseButton/BaseButton.cjs');
|
|
11
12
|
|
|
12
13
|
const defaultButtonVariant = 'primary';
|
|
14
|
+
/**
|
|
15
|
+
* A Button component with options for different variants, padding, and more.
|
|
16
|
+
*/
|
|
13
17
|
const Button = ({ buttonClassName = '', className, style, buttonPadding = 'medium', buttonVariant = defaultButtonVariant, buttonRef, children, feedback, expanded, dataTestId, disabled = false, showInternalLoading = true, loading = false, onClick, type, startSlot, endSlot, }) => {
|
|
14
18
|
const [internalButtonLoading, setInternalButtonLoading] = React.useState(false);
|
|
15
19
|
const [isFeedbackVisible, setIsFeedbackVisible] = React.useState(false);
|
|
@@ -41,7 +45,7 @@ const Button = ({ buttonClassName = '', className, style, buttonPadding = 'mediu
|
|
|
41
45
|
});
|
|
42
46
|
const buttonContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [startSlot && jsxRuntime.jsx("div", { className: 'button__start-slot', children: startSlot }), (feedback || children) &&
|
|
43
47
|
(isFeedbackVisible && feedback ? feedback : children), endSlot && jsxRuntime.jsx("div", { className: 'button__end-slot', children: endSlot })] }));
|
|
44
|
-
return (jsxRuntime.jsxs(
|
|
48
|
+
return (jsxRuntime.jsxs(BaseButton.BaseButton, { type: type, buttonRef: buttonRef, onClick: handleClick, className: buttonEffectiveClassName, disabled: disabled || internalButtonLoading || loading, dataTestId: dataTestId, style: style, ariaExpanded: expanded, children: [(internalButtonLoading || loading) && (jsxRuntime.jsx("div", { className: 'button__spinner-container', "data-testid": 'button__spinner', children: jsxRuntime.jsx(spinner.Spinner, { className: 'button__spinner' }) })), buttonContent] }));
|
|
45
49
|
};
|
|
46
50
|
|
|
47
51
|
exports.Button = Button;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { FC, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
import { BaseButtonProps } from '../BaseButton';
|
|
3
3
|
type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'brand-primary' | 'card';
|
|
4
4
|
type ButtonPadding = 'small' | 'medium' | 'large' | 'none' | 'default' | 'login-screen-height';
|
|
5
5
|
export declare const defaultButtonVariant: ButtonVariant;
|
|
6
|
-
export type ButtonProps =
|
|
6
|
+
export type ButtonProps = BaseButtonProps & {
|
|
7
7
|
buttonClassName?: string;
|
|
8
8
|
buttonPadding?: ButtonPadding;
|
|
9
9
|
buttonVariant?: ButtonVariant;
|
|
10
|
-
buttonRef?: LegacyRef<HTMLButtonElement>;
|
|
11
|
-
dataTestId?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
10
|
endSlot?: JSX.Element;
|
|
14
11
|
expanded?: boolean;
|
|
15
12
|
feedback?: ReactNode;
|
|
@@ -17,7 +14,9 @@ export type ButtonProps = ClassStyleProps & PropsWithChildren & {
|
|
|
17
14
|
loading?: boolean;
|
|
18
15
|
startSlot?: JSX.Element;
|
|
19
16
|
onClick?: MouseEventHandler<HTMLButtonElement> | (() => Promise<void>);
|
|
20
|
-
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
21
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* A Button component with options for different variants, padding, and more.
|
|
20
|
+
*/
|
|
22
21
|
export declare const Button: FC<ButtonProps>;
|
|
23
22
|
export {};
|
|
@@ -4,8 +4,12 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
6
6
|
import { Spinner } from '../Spinner/spinner.js';
|
|
7
|
+
import { BaseButton } from '../BaseButton/BaseButton.js';
|
|
7
8
|
|
|
8
9
|
const defaultButtonVariant = 'primary';
|
|
10
|
+
/**
|
|
11
|
+
* A Button component with options for different variants, padding, and more.
|
|
12
|
+
*/
|
|
9
13
|
const Button = ({ buttonClassName = '', className, style, buttonPadding = 'medium', buttonVariant = defaultButtonVariant, buttonRef, children, feedback, expanded, dataTestId, disabled = false, showInternalLoading = true, loading = false, onClick, type, startSlot, endSlot, }) => {
|
|
10
14
|
const [internalButtonLoading, setInternalButtonLoading] = useState(false);
|
|
11
15
|
const [isFeedbackVisible, setIsFeedbackVisible] = useState(false);
|
|
@@ -37,7 +41,7 @@ const Button = ({ buttonClassName = '', className, style, buttonPadding = 'mediu
|
|
|
37
41
|
});
|
|
38
42
|
const buttonContent = (jsxs(Fragment, { children: [startSlot && jsx("div", { className: 'button__start-slot', children: startSlot }), (feedback || children) &&
|
|
39
43
|
(isFeedbackVisible && feedback ? feedback : children), endSlot && jsx("div", { className: 'button__end-slot', children: endSlot })] }));
|
|
40
|
-
return (jsxs(
|
|
44
|
+
return (jsxs(BaseButton, { type: type, buttonRef: buttonRef, onClick: handleClick, className: buttonEffectiveClassName, disabled: disabled || internalButtonLoading || loading, dataTestId: dataTestId, style: style, ariaExpanded: expanded, children: [(internalButtonLoading || loading) && (jsx("div", { className: 'button__spinner-container', "data-testid": 'button__spinner', children: jsx(Spinner, { className: 'button__spinner' }) })), buttonContent] }));
|
|
41
45
|
};
|
|
42
46
|
|
|
43
47
|
export { Button, defaultButtonVariant };
|