@0xsquid/ui 2.0.5 → 2.0.7
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/dist/cjs/index.js +2 -2
- package/dist/cjs/types/components/controls/NumericInput.d.ts +1 -0
- package/dist/cjs/types/components/layout/SwapConfiguration.d.ts +1 -0
- package/dist/cjs/types/stories/layout/SwapConfiguration.stories.d.ts +2 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/components/controls/NumericInput.d.ts +1 -0
- package/dist/esm/types/components/layout/SwapConfiguration.d.ts +1 -0
- package/dist/esm/types/stories/layout/SwapConfiguration.stories.d.ts +2 -1
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -2875,7 +2875,7 @@ function Checkmark1Icon({ className, size = "16", }) {
|
|
|
2875
2875
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", className: className, children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.8809 2.82977C13.3432 3.13201 13.4729 3.75174 13.1706 4.21399L7.50398 12.8807C7.3318 13.144 7.04572 13.3109 6.73174 13.3313C6.41777 13.3517 6.11252 13.2231 5.90775 12.9842L2.90775 9.4842C2.54833 9.06487 2.59689 8.43357 3.01622 8.07415C3.43554 7.71473 4.06684 7.76329 4.42627 8.18262L6.55918 10.671L11.4967 3.11949C11.7989 2.65725 12.4187 2.52753 12.8809 2.82977Z", fill: "currentColor" }) }));
|
|
2876
2876
|
}
|
|
2877
2877
|
function Checkmark2Icon({ className, size = "16", style, }) {
|
|
2878
|
-
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM15.774 10.1333C16.1237 9.70582 16.0607 9.0758 15.6332 8.72607C15.2058 8.37635 14.5758 8.43935 14.226 8.86679L10.4258 13.5116L9.20711 12.2929C8.81658 11.9024 8.18342 11.9024 7.79289 12.2929C7.40237 12.6834 7.40237 13.3166 7.79289 13.7071L9.79289 15.7071C9.99267 15.9069 10.2676 16.0129 10.5498 15.9988C10.832 15.9847 11.095 15.8519 11.274 15.6333L15.774 10.1333Z", fill: "
|
|
2878
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM15.774 10.1333C16.1237 9.70582 16.0607 9.0758 15.6332 8.72607C15.2058 8.37635 14.5758 8.43935 14.226 8.86679L10.4258 13.5116L9.20711 12.2929C8.81658 11.9024 8.18342 11.9024 7.79289 12.2929C7.40237 12.6834 7.40237 13.3166 7.79289 13.7071L9.79289 15.7071C9.99267 15.9069 10.2676 16.0129 10.5498 15.9988C10.832 15.9847 11.095 15.8519 11.274 15.6333L15.774 10.1333Z", fill: "currentColor", className: className, style: style }) }));
|
|
2879
2879
|
}
|
|
2880
2880
|
|
|
2881
2881
|
function DotGrid1x3HorizontalIcon({ className, size = "16", }) {
|
|
@@ -26881,7 +26881,7 @@ function NumericInput(_a) {
|
|
|
26881
26881
|
? "tw-opacity-0"
|
|
26882
26882
|
: "" }), jsxRuntime.jsx(CaptionText, { bold: true, children: priceImpactPercentage.toString().concat("%") })] })) : null] }) }))), jsxRuntime.jsx(Tooltip, Object.assign({}, (isLoading ? undefined : balanceButton === null || balanceButton === void 0 ? void 0 : balanceButton.tooltip), { tooltipWidth: "max", childrenClassName: "tw-rounded-squid-s", containerClassName: "tw-rounded-squid-s", children: jsxRuntime.jsxs(BalanceChipTag, { onClick: onBalanceButtonClick, className: cn(buttonClassName, balanceChipClickable
|
|
26883
26883
|
? interactiveChipClassName
|
|
26884
|
-
: notInteractiveChipClassName), children: [jsxRuntime.jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsxRuntime.jsx(CaptionText, { children: balanceFormatted }), jsxRuntime.jsx(Chip, { label: "Max" })] }) }))] }))] }));
|
|
26884
|
+
: notInteractiveChipClassName), children: [jsxRuntime.jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsxRuntime.jsx(CaptionText, { children: balanceFormatted }), !(balanceButton === null || balanceButton === void 0 ? void 0 : balanceButton.hideMaxChip) && jsxRuntime.jsx(Chip, { label: "Max" })] }) }))] }))] }));
|
|
26885
26885
|
}
|
|
26886
26886
|
|
|
26887
26887
|
function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSelected = false, }) {
|
|
@@ -32,6 +32,7 @@ interface NumericInputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
32
32
|
isInteractive?: boolean;
|
|
33
33
|
balanceButton?: {
|
|
34
34
|
tooltip?: Omit<TooltipProps, "children">;
|
|
35
|
+
hideMaxChip?: boolean;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
export declare function NumericInput({ priceImpactPercentage, balance, error, criticalPriceImpactPercentage, token, onAmountChange, forcedAmount, maxUsdDecimals, formatIfVerySmall, showDetails, isLoading, direction, inputModeButton, isInteractive, balanceButton, ...props }: NumericInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
1
|
+
import { type Meta, type StoryObj } from "@storybook/react";
|
|
2
2
|
import { SwapConfiguration } from "../../components/layout/SwapConfiguration";
|
|
3
3
|
declare const meta: Meta<typeof SwapConfiguration>;
|
|
4
4
|
export default meta;
|
|
@@ -25,6 +25,7 @@ export declare const FromAddressEmpty: Story;
|
|
|
25
25
|
export declare const ToAddressEmpty: Story;
|
|
26
26
|
export declare const Error: Story;
|
|
27
27
|
export declare const WithTooltips: Story;
|
|
28
|
+
export declare const HideMaxChip: Story;
|
|
28
29
|
export declare const WithoutSourceConnectLabels: Story;
|
|
29
30
|
export declare const WithoutDestConnectLabels: Story;
|
|
30
31
|
export declare const AddressOnly: Story;
|
package/dist/esm/index.js
CHANGED
|
@@ -2855,7 +2855,7 @@ function Checkmark1Icon({ className, size = "16", }) {
|
|
|
2855
2855
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", className: className, children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.8809 2.82977C13.3432 3.13201 13.4729 3.75174 13.1706 4.21399L7.50398 12.8807C7.3318 13.144 7.04572 13.3109 6.73174 13.3313C6.41777 13.3517 6.11252 13.2231 5.90775 12.9842L2.90775 9.4842C2.54833 9.06487 2.59689 8.43357 3.01622 8.07415C3.43554 7.71473 4.06684 7.76329 4.42627 8.18262L6.55918 10.671L11.4967 3.11949C11.7989 2.65725 12.4187 2.52753 12.8809 2.82977Z", fill: "currentColor" }) }));
|
|
2856
2856
|
}
|
|
2857
2857
|
function Checkmark2Icon({ className, size = "16", style, }) {
|
|
2858
|
-
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM15.774 10.1333C16.1237 9.70582 16.0607 9.0758 15.6332 8.72607C15.2058 8.37635 14.5758 8.43935 14.226 8.86679L10.4258 13.5116L9.20711 12.2929C8.81658 11.9024 8.18342 11.9024 7.79289 12.2929C7.40237 12.6834 7.40237 13.3166 7.79289 13.7071L9.79289 15.7071C9.99267 15.9069 10.2676 16.0129 10.5498 15.9988C10.832 15.9847 11.095 15.8519 11.274 15.6333L15.774 10.1333Z", fill: "
|
|
2858
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM15.774 10.1333C16.1237 9.70582 16.0607 9.0758 15.6332 8.72607C15.2058 8.37635 14.5758 8.43935 14.226 8.86679L10.4258 13.5116L9.20711 12.2929C8.81658 11.9024 8.18342 11.9024 7.79289 12.2929C7.40237 12.6834 7.40237 13.3166 7.79289 13.7071L9.79289 15.7071C9.99267 15.9069 10.2676 16.0129 10.5498 15.9988C10.832 15.9847 11.095 15.8519 11.274 15.6333L15.774 10.1333Z", fill: "currentColor", className: className, style: style }) }));
|
|
2859
2859
|
}
|
|
2860
2860
|
|
|
2861
2861
|
function DotGrid1x3HorizontalIcon({ className, size = "16", }) {
|
|
@@ -26861,7 +26861,7 @@ function NumericInput(_a) {
|
|
|
26861
26861
|
? "tw-opacity-0"
|
|
26862
26862
|
: "" }), jsx(CaptionText, { bold: true, children: priceImpactPercentage.toString().concat("%") })] })) : null] }) }))), jsx(Tooltip, Object.assign({}, (isLoading ? undefined : balanceButton === null || balanceButton === void 0 ? void 0 : balanceButton.tooltip), { tooltipWidth: "max", childrenClassName: "tw-rounded-squid-s", containerClassName: "tw-rounded-squid-s", children: jsxs(BalanceChipTag, { onClick: onBalanceButtonClick, className: cn(buttonClassName, balanceChipClickable
|
|
26863
26863
|
? interactiveChipClassName
|
|
26864
|
-
: notInteractiveChipClassName), children: [jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsx(CaptionText, { children: balanceFormatted }), jsx(Chip, { label: "Max" })] }) }))] }))] }));
|
|
26864
|
+
: notInteractiveChipClassName), children: [jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsx(CaptionText, { children: balanceFormatted }), !(balanceButton === null || balanceButton === void 0 ? void 0 : balanceButton.hideMaxChip) && jsx(Chip, { label: "Max" })] }) }))] }))] }));
|
|
26865
26865
|
}
|
|
26866
26866
|
|
|
26867
26867
|
function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSelected = false, }) {
|
|
@@ -32,6 +32,7 @@ interface NumericInputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
32
32
|
isInteractive?: boolean;
|
|
33
33
|
balanceButton?: {
|
|
34
34
|
tooltip?: Omit<TooltipProps, "children">;
|
|
35
|
+
hideMaxChip?: boolean;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
export declare function NumericInput({ priceImpactPercentage, balance, error, criticalPriceImpactPercentage, token, onAmountChange, forcedAmount, maxUsdDecimals, formatIfVerySmall, showDetails, isLoading, direction, inputModeButton, isInteractive, balanceButton, ...props }: NumericInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
1
|
+
import { type Meta, type StoryObj } from "@storybook/react";
|
|
2
2
|
import { SwapConfiguration } from "../../components/layout/SwapConfiguration";
|
|
3
3
|
declare const meta: Meta<typeof SwapConfiguration>;
|
|
4
4
|
export default meta;
|
|
@@ -25,6 +25,7 @@ export declare const FromAddressEmpty: Story;
|
|
|
25
25
|
export declare const ToAddressEmpty: Story;
|
|
26
26
|
export declare const Error: Story;
|
|
27
27
|
export declare const WithTooltips: Story;
|
|
28
|
+
export declare const HideMaxChip: Story;
|
|
28
29
|
export declare const WithoutSourceConnectLabels: Story;
|
|
29
30
|
export declare const WithoutDestConnectLabels: Story;
|
|
30
31
|
export declare const AddressOnly: Story;
|
package/dist/index.d.ts
CHANGED
|
@@ -197,6 +197,7 @@ interface NumericInputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
197
197
|
isInteractive?: boolean;
|
|
198
198
|
balanceButton?: {
|
|
199
199
|
tooltip?: Omit<TooltipProps, "children">;
|
|
200
|
+
hideMaxChip?: boolean;
|
|
200
201
|
};
|
|
201
202
|
}
|
|
202
203
|
declare function NumericInput({ priceImpactPercentage, balance, error, criticalPriceImpactPercentage, token, onAmountChange, forcedAmount, maxUsdDecimals, formatIfVerySmall, showDetails, isLoading, direction, inputModeButton, isInteractive, balanceButton, ...props }: NumericInputProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1574,6 +1575,7 @@ interface SwapConfigurationProps {
|
|
|
1574
1575
|
};
|
|
1575
1576
|
balanceButton?: {
|
|
1576
1577
|
tooltip?: Omit<TooltipProps, "children">;
|
|
1578
|
+
hideMaxChip?: boolean;
|
|
1577
1579
|
};
|
|
1578
1580
|
assetsButton?: {
|
|
1579
1581
|
tooltip?: Omit<TooltipProps, "children">;
|