@0xsquid/ui 0.9.5 → 0.10.0
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 +83 -36
- package/dist/cjs/types/components/buttons/BoostButton.d.ts +2 -1
- package/dist/cjs/types/components/buttons/Button.d.ts +2 -1
- package/dist/cjs/types/components/controls/Tooltip.d.ts +2 -1
- package/dist/cjs/types/components/icons/Social.d.ts +4 -0
- package/dist/cjs/types/components/layout/Boost.d.ts +2 -1
- package/dist/cjs/types/components/layout/DetailsToolbar.d.ts +2 -1
- package/dist/cjs/types/components/lists/ListItem.d.ts +1 -1
- package/dist/cjs/types/core/constants.d.ts +4 -0
- package/dist/cjs/types/core/themes.d.ts +1 -0
- package/dist/cjs/types/providers/SquidConfigProvider.d.ts +1 -1
- package/dist/cjs/types/stories/buttons/BoostButton.stories.d.ts +1 -0
- package/dist/cjs/types/stories/buttons/Button.stories.d.ts +2 -0
- package/dist/cjs/types/stories/layout/Boost.stories.d.ts +1 -0
- package/dist/cjs/types/stories/layout/DetailsToolbar.stories.d.ts +1 -0
- package/dist/cjs/types/stories/lists/ListItem.stories.d.ts +1 -0
- package/dist/esm/index.js +83 -36
- package/dist/esm/types/components/buttons/BoostButton.d.ts +2 -1
- package/dist/esm/types/components/buttons/Button.d.ts +2 -1
- package/dist/esm/types/components/controls/Tooltip.d.ts +2 -1
- package/dist/esm/types/components/icons/Social.d.ts +4 -0
- package/dist/esm/types/components/layout/Boost.d.ts +2 -1
- package/dist/esm/types/components/layout/DetailsToolbar.d.ts +2 -1
- package/dist/esm/types/components/lists/ListItem.d.ts +1 -1
- package/dist/esm/types/core/constants.d.ts +4 -0
- package/dist/esm/types/core/themes.d.ts +1 -0
- package/dist/esm/types/providers/SquidConfigProvider.d.ts +1 -1
- package/dist/esm/types/stories/buttons/BoostButton.stories.d.ts +1 -0
- package/dist/esm/types/stories/buttons/Button.stories.d.ts +2 -0
- package/dist/esm/types/stories/layout/Boost.stories.d.ts +1 -0
- package/dist/esm/types/stories/layout/DetailsToolbar.stories.d.ts +1 -0
- package/dist/esm/types/stories/lists/ListItem.stories.d.ts +1 -0
- package/dist/index.css +84 -40
- package/dist/index.d.ts +12 -7
- package/package.json +1 -1
- package/dist/cjs/types/components/views/ProfileView.d.ts +0 -1
- package/dist/cjs/types/stories/views/ProfileView.stories.d.ts +0 -6
- package/dist/esm/types/components/views/ProfileView.d.ts +0 -1
- package/dist/esm/types/stories/views/ProfileView.stories.d.ts +0 -6
package/dist/cjs/index.js
CHANGED
|
@@ -2765,6 +2765,11 @@ function AssetsButton({ chainImageUrl, tokenImageUrl, tokenSymbol, chainBgColor
|
|
|
2765
2765
|
}, children: [jsxRuntime.jsx(BodyText, { size: "small", className: "tw-leading-[13px]", children: tokenImageUrl ? tokenSymbol : 'Select token' }), jsxRuntime.jsx(ChevronLargeRightIcon, { className: "tw-opacity-66" })] })] }));
|
|
2766
2766
|
}
|
|
2767
2767
|
|
|
2768
|
+
const CSS_VARS = {
|
|
2769
|
+
MOVE_WITH_SPRING_BOUNCE_DURATION: '--squid-animation-move-with-spring-bounce-duration',
|
|
2770
|
+
DISPLAY_DELAYED_DURATION: '--squid-animation-display-delayed-duration',
|
|
2771
|
+
};
|
|
2772
|
+
|
|
2768
2773
|
function SearchIcon() {
|
|
2769
2774
|
return (jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M20 20L16.05 16.05M18 11C18 14.866 14.866 18 11 18C7.13401 18 4 14.866 4 11C4 7.13401 7.13401 4 11 4C14.866 4 18 7.13401 18 11Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
|
|
2770
2775
|
}
|
|
@@ -2967,7 +2972,7 @@ const borderRadiusClassMap = {
|
|
|
2967
2972
|
};
|
|
2968
2973
|
function Menu(_a) {
|
|
2969
2974
|
var { children, containerClassName, contentClassName, title, displayControls, rounded = 'lg', menuRef } = _a, props = __rest(_a, ["children", "containerClassName", "contentClassName", "title", "displayControls", "rounded", "menuRef"]);
|
|
2970
|
-
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn('tw-max-w-[320px]', containerClassName), ref: menuRef, children: jsxRuntime.jsxs("div", { className: cn('tw-relative tw-inline-flex tw-max-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-m tw-bg-material-dark-thick tw-p-squid-s tw-text-center tw-text-material-light-thick tw-backdrop-blur/20 tw-backdrop-saturate-150 group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2', borderRadiusClassMap[rounded], contentClassName), children: [title ? (jsxRuntime.jsx("div", { className: "tw-z-20 tw-flex tw-flex-col tw-items-center tw-justify-center tw-self-stretch tw-py-squid-xxs tw-text-grey-100", children: jsxRuntime.jsx(BodyText, { size: "small", className: "tw-self-stretch !tw-leading-[10px]", children: title }) })) : null, typeof children === 'string' ? (jsxRuntime.jsx(CaptionText, { className: "tw-z-20 tw-self-stretch", children: children })) : (jsxRuntime.jsx("div", { className: "tw-z-20 tw-max-w-full", children: children })), displayControls ? (jsxRuntime.jsx("div", { className: "tw-z-20 tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xs", children: jsxRuntime.jsx(Button, { size: "md", variant: "tertiary", label: "Learn more", className: "tw-self-stretch" }) })) : null, jsxRuntime.jsx("div", { className: cn('tw-absolute tw-z-10 tw-h-full tw-w-full tw-border tw-border-material-light-thin tw-bg-material-light-thin', borderRadiusClassMap[rounded]) })] }) })));
|
|
2975
|
+
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn('tw-max-w-[320px]', containerClassName), ref: menuRef, children: jsxRuntime.jsxs("div", { className: cn('tw-relative tw-inline-flex tw-max-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-m tw-bg-material-dark-thick tw-p-squid-s tw-text-center tw-text-material-light-thick tw-backdrop-blur/20 tw-backdrop-saturate-150 group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2', borderRadiusClassMap[rounded], contentClassName), children: [title ? (jsxRuntime.jsx("div", { className: "tw-z-20 tw-flex tw-flex-col tw-items-center tw-justify-center tw-self-stretch tw-py-squid-xxs tw-text-grey-100", children: jsxRuntime.jsx(BodyText, { size: "small", className: "tw-self-stretch !tw-leading-[10px]", children: title }) })) : null, typeof children === 'string' ? (jsxRuntime.jsx(CaptionText, { className: "tw-z-20 tw-self-stretch", children: children })) : (jsxRuntime.jsx("div", { className: "tw-z-20 tw-max-w-full tw-text-caption", children: children })), displayControls ? (jsxRuntime.jsx("div", { className: "tw-z-20 tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xs", children: jsxRuntime.jsx(Button, { size: "md", variant: "tertiary", label: "Learn more", className: "tw-self-stretch" }) })) : null, jsxRuntime.jsx("div", { className: cn('tw-absolute tw-z-10 tw-h-full tw-w-full tw-border tw-border-material-light-thin tw-bg-material-light-thin', borderRadiusClassMap[rounded]) })] }) })));
|
|
2971
2976
|
}
|
|
2972
2977
|
|
|
2973
2978
|
const tooltipWidthClassMap = {
|
|
@@ -2983,19 +2988,25 @@ const tooltipThresholdClassMap = {
|
|
|
2983
2988
|
xl: 'tw-pb-squid-xl',
|
|
2984
2989
|
xxl: 'tw-pb-squid-xxl',
|
|
2985
2990
|
};
|
|
2986
|
-
function Tooltip({ children, tooltipContent, tooltipWidth = 'container', threshold = 'xxs', containerClassName, childrenClassName, tooltipClassName, }) {
|
|
2987
|
-
return (jsxRuntime.jsxs("div", { className: cn('tw-relative', containerClassName), children: [jsxRuntime.jsx("div", { className: cn('tw-peer', childrenClassName), children: children }), tooltipContent ? (jsxRuntime.jsx(Menu, {
|
|
2991
|
+
function Tooltip({ children, tooltipContent, tooltipWidth = 'container', threshold = 'xxs', containerClassName, childrenClassName, tooltipClassName, displayDelayMs = 0, }) {
|
|
2992
|
+
return (jsxRuntime.jsxs("div", { className: cn('tw-relative', containerClassName), children: [jsxRuntime.jsx("div", { className: cn('tw-peer', childrenClassName), children: children }), tooltipContent ? (jsxRuntime.jsx(Menu, { style: {
|
|
2993
|
+
[CSS_VARS.DISPLAY_DELAYED_DURATION]: `${displayDelayMs}ms`,
|
|
2994
|
+
}, containerClassName: cn(
|
|
2995
|
+
// general styles
|
|
2996
|
+
'tw-absolute tw-z-40 tw-bottom-full tw-left-1/2 -tw-translate-x-1/2',
|
|
2997
|
+
// visibility styles. Display only on hover
|
|
2998
|
+
'tw-opacity-0 hover:tw-animate-display-delayed peer-hover:tw-animate-display-delayed', tooltipWidthClassMap[tooltipWidth], tooltipThresholdClassMap[threshold], tooltipClassName), children: tooltipContent })) : null] }));
|
|
2988
2999
|
}
|
|
2989
3000
|
|
|
2990
3001
|
const animationDuration = '500ms';
|
|
2991
|
-
function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode = true, boostDisabledMessage = 'Boost disabled', }) {
|
|
3002
|
+
function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode = true, boostDisabledMessage = 'Boost disabled', tooltipDisplayDelayMs = 0, }) {
|
|
2992
3003
|
const boostIndicatorRef = react.useRef(null);
|
|
2993
3004
|
function handleToggleBoostMode() {
|
|
2994
3005
|
if (!boostIndicatorRef.current || !canToggleBoostMode)
|
|
2995
3006
|
return;
|
|
2996
3007
|
// we don't want to trigger the animation when the component is mounted
|
|
2997
3008
|
// so we set the animation duration only when user clicks the button
|
|
2998
|
-
boostIndicatorRef.current.style.setProperty(
|
|
3009
|
+
boostIndicatorRef.current.style.setProperty(CSS_VARS.MOVE_WITH_SPRING_BOUNCE_DURATION, animationDuration);
|
|
2999
3010
|
if (boostIndicatorRef.current.dataset.boostMode === 'normal') {
|
|
3000
3011
|
boostIndicatorRef.current.dataset.boostMode = 'boost';
|
|
3001
3012
|
onToggleBoostMode === null || onToggleBoostMode === void 0 ? void 0 : onToggleBoostMode({ boostMode: 'boost' });
|
|
@@ -3005,7 +3016,7 @@ function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode = true,
|
|
|
3005
3016
|
onToggleBoostMode === null || onToggleBoostMode === void 0 ? void 0 : onToggleBoostMode({ boostMode: 'normal' });
|
|
3006
3017
|
}
|
|
3007
3018
|
}
|
|
3008
|
-
return (jsxRuntime.jsx(Tooltip, { tooltipWidth: "max", tooltipContent: canToggleBoostMode ? null : boostDisabledMessage, children: jsxRuntime.jsxs("button", { onClick: handleToggleBoostMode, disabled: !canToggleBoostMode, className: "tw-group tw-relative tw-flex tw-h-squid-xl tw-w-[140px] tw-flex-col tw-justify-between tw-overflow-hidden tw-bg-grey-900 tw-pb-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-left-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-r tw-from-grey-900 tw-to-transparent" }), jsxRuntime.jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-right-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-l tw-from-grey-900 tw-to-transparent" }), jsxRuntime.jsxs("div", { ref: boostIndicatorRef, "data-boost-mode": boostMode, className: "tw-group tw-peer tw-flex tw-h-full tw-w-full tw-items-center tw-justify-between tw-transition-transform group-disabled:tw-grayscale data-[boost-mode=boost]:tw-animate-move-to-left-with-spring-bounce data-[boost-mode=normal]:tw-animate-move-to-right-with-spring-bounce", children: [jsxRuntime.jsx("div", { className: "tw-w-1/2 tw-text-center group-disabled:tw-grayscale", children: jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-grey-300", children: "Normal" }) }), jsxRuntime.jsxs("div", { className: "tw-w-1/2 tw-text-center group-disabled:tw-grayscale", children: [jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-status-positive", children: "Boost" }), ' '] }), jsxRuntime.jsx("div", { className: "tw-absolute tw-bottom-0 tw-h-1.5 tw-w-[1.5px] tw-rounded-sm tw-bg-grey-500 tw-text-grey-500 group-data-[boost-mode=boost]:tw-left-[calc(50%-2px)] group-data-[boost-mode=normal]:tw-left-[calc(50%-6px)]", style: {
|
|
3019
|
+
return (jsxRuntime.jsx(Tooltip, { tooltipWidth: "max", displayDelayMs: tooltipDisplayDelayMs, tooltipContent: canToggleBoostMode ? null : boostDisabledMessage, children: jsxRuntime.jsxs("button", { onClick: handleToggleBoostMode, disabled: !canToggleBoostMode, className: "tw-group tw-relative tw-flex tw-h-squid-xl tw-w-[140px] tw-flex-col tw-justify-between tw-overflow-hidden tw-bg-grey-900 tw-pb-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-left-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-r tw-from-grey-900 tw-to-transparent" }), jsxRuntime.jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-right-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-l tw-from-grey-900 tw-to-transparent" }), jsxRuntime.jsxs("div", { ref: boostIndicatorRef, "data-boost-mode": boostMode, className: "tw-group tw-peer tw-flex tw-h-full tw-w-full tw-items-center tw-justify-between tw-transition-transform group-disabled:tw-grayscale data-[boost-mode=boost]:tw-animate-move-to-left-with-spring-bounce data-[boost-mode=normal]:tw-animate-move-to-right-with-spring-bounce", children: [jsxRuntime.jsx("div", { className: "tw-w-1/2 tw-text-center group-disabled:tw-grayscale", children: jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-grey-300", children: "Normal" }) }), jsxRuntime.jsxs("div", { className: "tw-w-1/2 tw-text-center group-disabled:tw-grayscale", children: [jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-status-positive", children: "Boost" }), ' '] }), jsxRuntime.jsx("div", { className: "tw-absolute tw-bottom-0 tw-h-1.5 tw-w-[1.5px] tw-rounded-sm tw-bg-grey-500 tw-text-grey-500 group-data-[boost-mode=boost]:tw-left-[calc(50%-2px)] group-data-[boost-mode=normal]:tw-left-[calc(50%-6px)]", style: {
|
|
3009
3020
|
boxShadow: generateMarkerLines(40),
|
|
3010
3021
|
} })] }), jsxRuntime.jsx("div", { className: cn('tw-absolute tw-bottom-0.5 tw-left-[calc(50%-1.5px)] tw-z-20 tw-h-[10px] tw-w-[3px] tw-rounded-sm tw-transition-colors group-disabled:tw-grayscale peer-data-[boost-mode=boost]:tw-bg-status-positive peer-data-[boost-mode=normal]:tw-bg-current'), style: {
|
|
3011
3022
|
transitionDuration: animationDuration,
|
|
@@ -3024,30 +3035,35 @@ function generateMarkerLines(count) {
|
|
|
3024
3035
|
}
|
|
3025
3036
|
|
|
3026
3037
|
const buttonSizeClassMap = {
|
|
3027
|
-
md: 'tw-px-squid-xs tw-py-squid-xxs tw-rounded-squid-m tw-border tw-flex tw-items-center tw-gap-squid-xxs tw-min-w-[60px] tw-h-squid-xl tw-justify-center',
|
|
3028
|
-
lg: 'tw-border tw-rounded-squid-xxl tw-p-1 tw-h-button tw-w-full',
|
|
3038
|
+
md: 'tw-flex tw-px-squid-xs tw-py-squid-xxs tw-rounded-squid-m tw-border tw-flex tw-items-center tw-gap-squid-xxs tw-min-w-[60px] tw-h-squid-xl tw-justify-center',
|
|
3039
|
+
lg: 'tw-flex tw-border tw-rounded-squid-xxl tw-p-1 tw-h-button tw-w-full tw-flex tw-items-center',
|
|
3029
3040
|
};
|
|
3030
3041
|
const buttonVariantClassMap = {
|
|
3031
|
-
primary: 'tw-bg-royal-500 tw-text-grey-100 tw-border-material-light-thin',
|
|
3042
|
+
primary: 'tw-bg-royal-500 group-data-[squid-theme-type=light]:tw-text-grey-900 group-data-[squid-theme-type=dark]:tw-text-grey-100 tw-border-material-light-thin',
|
|
3032
3043
|
secondary: 'tw-bg-grey-100 tw-text-grey-800 tw-border-material-light-thin',
|
|
3033
3044
|
tertiary: 'tw-bg-grey-800 tw-text-grey-300 tw-border-material-light-thin',
|
|
3034
3045
|
};
|
|
3035
3046
|
// right now all variants have the same disabled styles
|
|
3036
3047
|
// in the future, we can add more disabled styles for different variants
|
|
3037
|
-
const buttonDisabledClass = '
|
|
3048
|
+
const buttonDisabledClass = 'tw-bg-grey-800 tw-text-grey-600 tw-cursor-not-allowed';
|
|
3038
3049
|
function Button(_a) {
|
|
3039
|
-
var { label, disabled, size, variant, icon } = _a, props = __rest(_a, ["label", "disabled", "size", "variant", "icon"]);
|
|
3040
|
-
|
|
3041
|
-
// disabled styles
|
|
3042
|
-
buttonDisabledClass,
|
|
3043
|
-
// custom classes from props
|
|
3044
|
-
props.className), children: size === 'lg' ? (jsxRuntime.jsx("span", { className: "tw-px-squid-m", children: jsxRuntime.jsx(BodyText, { size: "medium", children: label }) })) : size === 'md' ? (label && !icon ? (
|
|
3050
|
+
var { label, disabled, size, variant, icon, link } = _a, props = __rest(_a, ["label", "disabled", "size", "variant", "icon", "link"]);
|
|
3051
|
+
const children = (jsxRuntime.jsx(jsxRuntime.Fragment, { children: size === 'lg' ? (jsxRuntime.jsx("span", { className: "tw-px-squid-m", children: jsxRuntime.jsx(BodyText, { size: "medium", children: label }) })) : size === 'md' ? (label && !icon ? (
|
|
3045
3052
|
// label only
|
|
3046
3053
|
jsxRuntime.jsx(BodyText, { size: "small", children: label })) : !label && icon ? (
|
|
3047
3054
|
// icon only
|
|
3048
3055
|
icon) : (
|
|
3049
3056
|
// icon and label
|
|
3050
|
-
jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon, jsxRuntime.jsx(BodyText, { className: "tw-pr-1", size: "small", children: label })] }))) : null }))
|
|
3057
|
+
jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon, jsxRuntime.jsx(BodyText, { className: "tw-pr-1", size: "small", children: label })] }))) : null }));
|
|
3058
|
+
const className = cn(buttonSizeClassMap[size], buttonVariantClassMap[variant],
|
|
3059
|
+
// disabled styles
|
|
3060
|
+
disabled && buttonDisabledClass,
|
|
3061
|
+
// custom classes from props
|
|
3062
|
+
props.className);
|
|
3063
|
+
if (link) {
|
|
3064
|
+
return (jsxRuntime.jsx("a", { "aria-disabled": disabled, href: disabled ? undefined : link, target: "_blank", className: className, children: children }));
|
|
3065
|
+
}
|
|
3066
|
+
return (jsxRuntime.jsx("button", Object.assign({}, props, { "aria-disabled": disabled, className: className, disabled: disabled, children: children })));
|
|
3051
3067
|
}
|
|
3052
3068
|
|
|
3053
3069
|
function Chip(_a) {
|
|
@@ -3068,8 +3084,8 @@ function SettingsButton({ label, isSelected = false, }) {
|
|
|
3068
3084
|
return (jsxRuntime.jsx("button", { className: cn('tw-flex tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-border-2 tw-border-transparent tw-p-squid-xs hover:tw-bg-material-light-thin focus:tw-bg-material-light-thin', isSelected && 'tw-outline-royal-500'), children: jsxRuntime.jsx(CaptionText, { className: "!tw-font-medium", children: label }) }));
|
|
3069
3085
|
}
|
|
3070
3086
|
|
|
3071
|
-
function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode = true, }) {
|
|
3072
|
-
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-xl tw-items-center tw-gap-x-squid-xxs tw-bg-grey-900 tw-pr-squid-xxs", children: [jsxRuntime.jsx(BoostButton, { boostMode: boostMode, boostDisabledMessage: boostDisabledMessage, canToggleBoostMode: canToggleBoostMode, onToggleBoostMode: onToggleBoostMode }), jsxRuntime.jsx(Chip, { label: estimatedTime, className: cn('tw-text-grey-900 tw-transition-colors', boostMode === 'normal' || !canToggleBoostMode
|
|
3087
|
+
function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode = true, boostTooltipDisplayDelayMs = 0, }) {
|
|
3088
|
+
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-xl tw-items-center tw-gap-x-squid-xxs tw-bg-grey-900 tw-pr-squid-xxs", children: [jsxRuntime.jsx(BoostButton, { boostMode: boostMode, boostDisabledMessage: boostDisabledMessage, canToggleBoostMode: canToggleBoostMode, onToggleBoostMode: onToggleBoostMode, tooltipDisplayDelayMs: boostTooltipDisplayDelayMs }), jsxRuntime.jsx(Chip, { label: estimatedTime, className: cn('tw-text-grey-900 tw-transition-colors', boostMode === 'normal' || !canToggleBoostMode
|
|
3073
3089
|
? 'tw-bg-grey-300'
|
|
3074
3090
|
: 'tw-bg-status-positive') })] }));
|
|
3075
3091
|
}
|
|
@@ -3088,7 +3104,7 @@ const detailStateClassMap = {
|
|
|
3088
3104
|
error: 'tw-opacity-33 tw-pointer-events-none',
|
|
3089
3105
|
full: '',
|
|
3090
3106
|
};
|
|
3091
|
-
function DetailsToolbar({ errorMessage, boostMode = 'normal', onToggleBoostMode, onInvertSwapButtonClick, onFeeButtonClick, feeInUsd, estimatedTime, canToggleBoostMode, boostDisabledMessage, helpButton, isLoading, isEmpty, }) {
|
|
3107
|
+
function DetailsToolbar({ errorMessage, boostMode = 'normal', onToggleBoostMode, onInvertSwapButtonClick, onFeeButtonClick, feeInUsd, estimatedTime, canToggleBoostMode, boostDisabledMessage, helpButton, isLoading, isEmpty, boostTooltipDisplayDelayMs = 0, }) {
|
|
3092
3108
|
const state = react.useMemo(() => {
|
|
3093
3109
|
if (errorMessage)
|
|
3094
3110
|
return 'error';
|
|
@@ -3099,11 +3115,11 @@ function DetailsToolbar({ errorMessage, boostMode = 'normal', onToggleBoostMode,
|
|
|
3099
3115
|
return 'full';
|
|
3100
3116
|
}, [errorMessage, isLoading, isEmpty]);
|
|
3101
3117
|
const detailClassName = cn('tw-w-[190px]', detailStateClassMap[state]);
|
|
3102
|
-
return (jsxRuntime.jsx("aside", { className: cn('tw-h-squid-[50px] tw-flex tw-w-[480px] tw-items-center tw-justify-around tw-bg-grey-900 tw-py-squid-xxs tw-text-grey-500', state === 'error' ? 'tw-px-squid-l' : 'tw-px-squid-m'), children: state === 'error' && errorMessage ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ErrorMessage, { message: errorMessage }), helpButton ? (jsxRuntime.jsx(Button, { onClick: helpButton.onClick, size: "md", variant: "tertiary", label: helpButton.label })) : null] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: detailClassName, children: jsxRuntime.jsx(FeeButton, { feeInUsd: feeInUsd, onClick: onFeeButtonClick }) }), jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-xl tw-w-squid-xxl tw-items-center tw-justify-center", children: state === 'loading' ? (jsxRuntime.jsx(Loader, { size: "32" })) : (jsxRuntime.jsx(Button, { variant: "tertiary", size: "md", onClick: onInvertSwapButtonClick, className: "tw-border-transparent tw-bg-transparent hover:tw-bg-material-light-thin", icon: jsxRuntime.jsx(ChevronLargeDownIcon, {}) })) }), jsxRuntime.jsx("div", { className: detailClassName, children: jsxRuntime.jsx(Boost, { estimatedTime: estimatedTime !== null && estimatedTime !== void 0 ? estimatedTime : '0s', boostMode: boostMode, onToggleBoostMode: onToggleBoostMode, canToggleBoostMode: state === 'loading' ? false : canToggleBoostMode, boostDisabledMessage: boostDisabledMessage }) })] })) }));
|
|
3118
|
+
return (jsxRuntime.jsx("aside", { className: cn('tw-h-squid-[50px] tw-flex tw-w-[480px] tw-items-center tw-justify-around tw-bg-grey-900 tw-py-squid-xxs tw-text-grey-500', state === 'error' ? 'tw-px-squid-l' : 'tw-px-squid-m'), children: state === 'error' && errorMessage ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ErrorMessage, { message: errorMessage }), helpButton ? (jsxRuntime.jsx(Button, { onClick: helpButton.onClick, size: "md", variant: "tertiary", label: helpButton.label })) : null] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: detailClassName, children: jsxRuntime.jsx(FeeButton, { feeInUsd: feeInUsd, onClick: onFeeButtonClick }) }), jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-xl tw-w-squid-xxl tw-items-center tw-justify-center", children: state === 'loading' ? (jsxRuntime.jsx(Loader, { size: "32" })) : (jsxRuntime.jsx(Button, { variant: "tertiary", size: "md", onClick: onInvertSwapButtonClick, className: "tw-border-transparent tw-bg-transparent hover:tw-bg-material-light-thin", icon: jsxRuntime.jsx(ChevronLargeDownIcon, {}) })) }), jsxRuntime.jsx("div", { className: detailClassName, children: jsxRuntime.jsx(Boost, { estimatedTime: estimatedTime !== null && estimatedTime !== void 0 ? estimatedTime : '0s', boostMode: boostMode, onToggleBoostMode: onToggleBoostMode, canToggleBoostMode: state === 'loading' ? false : canToggleBoostMode, boostDisabledMessage: boostDisabledMessage, boostTooltipDisplayDelayMs: boostTooltipDisplayDelayMs }) })] })) }));
|
|
3103
3119
|
}
|
|
3104
3120
|
|
|
3105
3121
|
function DropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, }) {
|
|
3106
|
-
return (jsxRuntime.jsx("li", { className: "tw-max-h-squid-xl tw-w-full tw-px-squid-xxs",
|
|
3122
|
+
return (jsxRuntime.jsx("li", { className: "tw-max-h-squid-xl tw-w-full tw-px-squid-xxs", children: jsxRuntime.jsxs("button", { onClick: onClick, className: "tw-flex tw-h-squid-l tw-w-full tw-cursor-pointer tw-items-center tw-gap-squid-xxs tw-rounded-squid-xs tw-px-squid-xxs hover:tw-bg-material-light-thin", children: [jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-between tw-rounded-squid-xs", children: imageUrl ? (jsxRuntime.jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), jsxRuntime.jsx(CaptionText, { className: cn(labelClassName, 'tw-max-w-full tw-truncate !tw-leading-[18px]'), children: label })] }) }));
|
|
3107
3123
|
}
|
|
3108
3124
|
|
|
3109
3125
|
function useDropdownMenu(props) {
|
|
@@ -3210,16 +3226,18 @@ const listItemSizeMap = {
|
|
|
3210
3226
|
};
|
|
3211
3227
|
function ListItem(_a) {
|
|
3212
3228
|
var { itemTitle, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size = 'large', mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded = false, detailButtonClassName, loading } = _a, props = __rest(_a, ["itemTitle", "mainImageUrl", "subtitle", "detail", "icon", "secondaryImageUrl", "size", "mainIcon", "className", "isSelected", "onDetailClick", "showDetailOnHoverOnly", "rounded", "detailButtonClassName", "loading"]);
|
|
3213
|
-
|
|
3229
|
+
// 'small' variant does not have detail
|
|
3230
|
+
const showDetail = size === 'large' && (!!detail || !!icon || showDetailOnHoverOnly);
|
|
3231
|
+
return (jsxRuntime.jsx("li", { className: cn('tw-flex tw-max-w-full tw-bg-grey-900 tw-text-grey-300', listItemSizeMap[size], className), children: jsxRuntime.jsxs("button", Object.assign({}, props, { className: cn('tw-group/list-item tw-flex tw-w-full tw-max-w-full tw-cursor-pointer tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs hover:tw-bg-material-light-thin', isSelected && 'tw-bg-material-light-thin'), children: [size === 'large' ? (jsxRuntime.jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon ? (mainIcon) : (jsxRuntime.jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, size: "md", rounded: rounded })) })) : (jsxRuntime.jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon ? (mainIcon) : (jsxRuntime.jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), jsxRuntime.jsxs("div", { className: cn('tw-flex tw-h-[40px] tw-flex-1 tw-flex-col tw-items-start tw-justify-center tw-gap-squid-xs',
|
|
3214
3232
|
// 'large' variant has extra padding
|
|
3215
|
-
size === 'large' ? 'tw-w-[56%] tw-pl-squid-xxs' : 'tw-w-[67%]'), children: [typeof itemTitle === 'string' ? (jsxRuntime.jsx(BodyText, { size: "small", className: "tw-max-w-full tw-truncate !tw-leading-[
|
|
3216
|
-
((loading === null || loading === void 0 ? void 0 : loading.subtitle) ? (jsxRuntime.jsx(LoadingSkeleton, { className: "-tw-translate-x-6 tw-text-grey-500", height: "10" })) : subtitle ? (jsxRuntime.jsx(CaptionText, { className: "tw-h-squid-xs !tw-leading-[
|
|
3233
|
+
size === 'large' ? 'tw-w-[56%] tw-pl-squid-xxs' : 'tw-w-[67%]'), children: [typeof itemTitle === 'string' ? (jsxRuntime.jsx(BodyText, { size: "small", className: "tw-max-w-full tw-truncate !tw-leading-[14px]", children: itemTitle })) : (itemTitle), size === 'large' &&
|
|
3234
|
+
((loading === null || loading === void 0 ? void 0 : loading.subtitle) ? (jsxRuntime.jsx(LoadingSkeleton, { className: "-tw-translate-x-6 tw-text-grey-500", height: "10" })) : subtitle ? (jsxRuntime.jsx(CaptionText, { className: "tw-h-squid-xs tw-max-w-full tw-truncate !tw-leading-[11px] tw-text-grey-500", children: subtitle })) : null)] }), showDetail && (jsxRuntime.jsxs("button", { onClick: (event) => {
|
|
3217
3235
|
// prevent click event from bubbling up to parent
|
|
3218
3236
|
event.stopPropagation();
|
|
3219
3237
|
onDetailClick === null || onDetailClick === void 0 ? void 0 : onDetailClick();
|
|
3220
|
-
}, className: cn('tw-cursor-pointer tw-items-center tw-justify-center tw-rounded-squid-xs hover:tw-bg-material-light-thin', size === 'large' ? 'tw-h-squid-xl' : 'tw-h-squid-l', showDetailOnHoverOnly
|
|
3221
|
-
? 'tw-
|
|
3222
|
-
: 'tw-flex', detailButtonClassName), children: [
|
|
3238
|
+
}, className: cn('tw-flex tw-w-fit tw-cursor-pointer tw-items-center tw-justify-center tw-rounded-squid-xs hover:tw-bg-material-light-thin', size === 'large' ? 'tw-h-squid-xl' : 'tw-h-squid-l', showDetailOnHoverOnly
|
|
3239
|
+
? 'tw-opacity-0 hover:tw-opacity-100 focus:tw-opacity-100 group-hover/list-item:tw-opacity-100 group-focus/list-item:tw-opacity-100'
|
|
3240
|
+
: 'tw-flex', detailButtonClassName), children: [!!detail && (jsxRuntime.jsx(CaptionText, { className: "min-tw-w-4 min-tw-h-4 tw-px-squid-xxs tw-leading-[10px]", children: detail })), icon ? (jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-justify-center tw-px-[3px] tw-py-2", children: icon })) : null] }))] })) }));
|
|
3223
3241
|
}
|
|
3224
3242
|
|
|
3225
3243
|
function MenuItem({ label, imageUrl, icon }) {
|
|
@@ -3287,8 +3305,9 @@ const separatorClassMap = {
|
|
|
3287
3305
|
progress: 'tw-text-grey-600',
|
|
3288
3306
|
pending: 'tw-text-grey-600',
|
|
3289
3307
|
};
|
|
3308
|
+
const colorsTransitionClass = 'tw-transition-colors tw-duration-300';
|
|
3290
3309
|
function SwapStepItem({ descriptionBlocks, chipContent, showStepSeparator = false, link, status = 'pending', }) {
|
|
3291
|
-
return (jsxRuntime.jsxs("li", { className: "tw-flex tw-w-list-item-large tw-flex-col tw-items-start tw-
|
|
3310
|
+
return (jsxRuntime.jsxs("li", { className: "tw-flex tw-w-list-item-large tw-flex-col tw-items-start tw-text-grey-300", children: [showStepSeparator && (jsxRuntime.jsx("span", { className: cn(separatorClassMap[status], colorsTransitionClass, 'tw-duration-100'), children: jsxRuntime.jsx(SwapStepSeparator, {}) })), jsxRuntime.jsxs("a", { href: link, target: "_blank", className: cn('tw-group/swap-step-item tw-flex tw-w-full tw-items-center tw-rounded-squid-xs', !!link && 'hover:tw-bg-material-light-thin', statusTextClassMap[status], colorsTransitionClass), children: [jsxRuntime.jsx("span", { className: "tw-relative tw-flex tw-min-h-squid-l tw-items-center tw-justify-center tw-gap-squid-xxs tw-px-squid-xs", children: jsxRuntime.jsx(Chip, { className: cn('tw-w-squid-xl', statusBgClassMap[status], colorsTransitionClass), icon: typeof chipContent === 'string' ? (jsxRuntime.jsx(CaptionText, { children: chipContent })) : (chipContent) }) }), jsxRuntime.jsx("div", { className: "tw-flex tw-min-h-squid-l tw-flex-1 tw-flex-wrap tw-items-center tw-justify-start tw-gap-squid-xxs tw-py-squid-xxs", children: descriptionBlocks.map(({ type, value }, index) => {
|
|
3292
3311
|
if (type === 'string') {
|
|
3293
3312
|
return (
|
|
3294
3313
|
// Instead of displaying the string into a single <BodyText />
|
|
@@ -3434,12 +3453,11 @@ function SwapStepsCollapsed({ steps, currentStepIndex: _newStepIndex, }) {
|
|
|
3434
3453
|
};
|
|
3435
3454
|
}, [isShowRouteAnimationRunning]);
|
|
3436
3455
|
const collapseRouteSteps = () => setIsShowRouteAnimationRunning(false);
|
|
3437
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
'tw-animate-translate-to-bottom', newStepIndex < currentStepIndex && 'tw-animate-translate-to-top'), currentStep: currentStep, isFirstStep: isFirstStep, isLastStep: isLastStep }), newStepIndex < currentStepIndex && (jsxRuntime.jsx("div", { className: "tw-absolute tw-left-0 tw-top-full tw-w-full tw-animate-translate-to-top", children: jsxRuntime.jsx(CurrentStep, { currentStep: steps[newStepIndex], isFirstStep: newStepIndex === 0, isLastStep: newStepIndex === steps.length - 1 }) })), jsxRuntime.jsx("span", { className: "tw-absolute tw-left-0 tw-top-0 tw-z-20 tw-h-[21px] tw-w-full tw-bg-gradient-to-b tw-from-grey-800" }), jsxRuntime.jsx("span", { className: "tw-absolute tw-bottom-0 tw-left-0 tw-z-20 tw-h-[21px] tw-w-full tw-bg-gradient-to-t tw-from-grey-800" })] }) }), isRouteVisible && (jsxRuntime.jsxs("div", { className: "tw-absolute tw-top-0 tw-z-20 tw-flex tw-h-[536px] tw-w-full tw-flex-col tw-justify-end tw-gap-squid-xxs", children: [jsxRuntime.jsx("div", { className: cn('tw-absolute tw-top-0 tw-h-[536px] tw-w-full tw-rounded-squid-l tw-bg-material-dark-thick tw-opacity-0 tw-backdrop-blur/10', isShowRouteAnimationRunning
|
|
3456
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("button", { className: "tw-group/swap-step-item-button tw-relative tw-max-h-button tw-max-w-[400px] tw-overflow-hidden tw-rounded-full tw-border tw-border-material-light-thin tw-bg-grey-800 tw-transition-colors tw-duration-[50ms] hover:tw-bg-grey-700", onClick: () => {
|
|
3457
|
+
// mount route component and start animation
|
|
3458
|
+
setIsRouteVisible(true);
|
|
3459
|
+
setIsShowRouteAnimationRunning(true);
|
|
3460
|
+
}, children: [newStepIndex > currentStepIndex && (jsxRuntime.jsx("div", { className: "tw-absolute -tw-top-full tw-left-0 tw-w-full tw-animate-translate-to-bottom", children: jsxRuntime.jsx(CurrentStep, { currentStep: steps[newStepIndex], isFirstStep: newStepIndex === 0, isLastStep: newStepIndex === steps.length - 1 }) })), jsxRuntime.jsx(CurrentStep, { className: cn(newStepIndex > currentStepIndex && 'tw-animate-translate-to-bottom', newStepIndex < currentStepIndex && 'tw-animate-translate-to-top'), currentStep: currentStep, isFirstStep: isFirstStep, isLastStep: isLastStep }), newStepIndex < currentStepIndex && (jsxRuntime.jsx("div", { className: "tw-absolute tw-left-0 tw-top-full tw-w-full tw-animate-translate-to-top", children: jsxRuntime.jsx(CurrentStep, { currentStep: steps[newStepIndex], isFirstStep: newStepIndex === 0, isLastStep: newStepIndex === steps.length - 1 }) })), jsxRuntime.jsx("span", { className: "tw-absolute tw-left-0 tw-top-0 tw-z-20 tw-h-[21px] tw-w-full tw-bg-gradient-to-b tw-from-grey-800 tw-transition-colors group-hover/swap-step-item-button:tw-from-grey-700" }), jsxRuntime.jsx("span", { className: "tw-absolute tw-bottom-0 tw-left-0 tw-z-20 tw-h-[21px] tw-w-full tw-bg-gradient-to-t tw-from-grey-800 tw-transition-colors group-hover/swap-step-item-button:tw-from-grey-700" })] }), isRouteVisible && (jsxRuntime.jsxs("div", { className: "tw-absolute tw-top-0 tw-z-20 tw-flex tw-h-[536px] tw-w-full tw-flex-col tw-justify-end tw-gap-squid-xxs", children: [jsxRuntime.jsx("div", { className: cn('tw-absolute tw-top-0 tw-h-[536px] tw-w-full tw-rounded-squid-l tw-bg-material-dark-thick tw-opacity-0 tw-backdrop-blur/10', isShowRouteAnimationRunning
|
|
3443
3461
|
? 'tw-animate-fade-in'
|
|
3444
3462
|
: 'tw-animate-fade-out'), onClick: collapseRouteSteps }), jsxRuntime.jsxs("div", { className: cn('tw-flex tw-max-h-[536px] tw-w-full tw-flex-col tw-gap-squid-xxs tw-overflow-hidden tw-rounded-squid-l tw-border tw-border-material-light-thin tw-bg-grey-800 tw-backdrop-blur-2xl', isShowRouteAnimationRunning
|
|
3445
3463
|
? 'tw-animate-slide-to-top'
|
|
@@ -3459,6 +3477,32 @@ function TokenPair({ firstToken, secondToken }) {
|
|
|
3459
3477
|
}, children: [jsxRuntime.jsx("img", { className: "tw-ml-[1px] tw-aspect-square tw-w-10", src: firstToken.imageUrl }), jsxRuntime.jsx("img", { className: "tw-mr-[1px] tw-aspect-square tw-w-10", src: secondToken.imageUrl })] })] }));
|
|
3460
3478
|
}
|
|
3461
3479
|
|
|
3480
|
+
const lightTheme = {
|
|
3481
|
+
// content
|
|
3482
|
+
'content-100': '#17191C',
|
|
3483
|
+
'content-200': '#292C32',
|
|
3484
|
+
'content-300': '#4C515D',
|
|
3485
|
+
'content-400': '#626784',
|
|
3486
|
+
'content-500': '#8A8FA8',
|
|
3487
|
+
'content-600': '#A7ABBE',
|
|
3488
|
+
'content-700': '#D1D6E0',
|
|
3489
|
+
'content-800': '#EDEEF3',
|
|
3490
|
+
'content-900': '#FBFBFD',
|
|
3491
|
+
// accent
|
|
3492
|
+
'accent-400': '#9E79D2',
|
|
3493
|
+
'accent-500': '#B893EC',
|
|
3494
|
+
// status
|
|
3495
|
+
'status-positive': '#11D421',
|
|
3496
|
+
'status-negative': '#FF5B4D',
|
|
3497
|
+
// transparent
|
|
3498
|
+
'transparent-light-thin': '#17191C1A', // 10% opacity
|
|
3499
|
+
'transparent-light-average': '#17191C54', // 33% opacity
|
|
3500
|
+
'transparent-light-thick': '#17191CA8', // 66% opacity
|
|
3501
|
+
'transparent-dark-thin': '#FBFBFD1A', // 10% opacity
|
|
3502
|
+
'transparent-dark-average': '#FBFCFD54', // 33% opacity
|
|
3503
|
+
'transparent-dark-thick': '#FBFCFDA8', // 66% opacity
|
|
3504
|
+
};
|
|
3505
|
+
|
|
3462
3506
|
const themeKeysToReplace = [
|
|
3463
3507
|
{
|
|
3464
3508
|
userKey: 'content',
|
|
@@ -3504,6 +3548,9 @@ const parseSquidTheme = (userTheme) => {
|
|
|
3504
3548
|
const newKey = userKey.replace(keyToReplace.userKey, keyToReplace.internalKey);
|
|
3505
3549
|
internalKeys[newKey] = userValue;
|
|
3506
3550
|
}
|
|
3551
|
+
else {
|
|
3552
|
+
internalKeys[userKey] = userValue;
|
|
3553
|
+
}
|
|
3507
3554
|
return internalKeys;
|
|
3508
3555
|
}, {});
|
|
3509
3556
|
const styleKeys = Object.keys(themeTypesKeys);
|
|
@@ -3552,7 +3599,7 @@ function getHexColorFromOpacityPercentage(color, opacity) {
|
|
|
3552
3599
|
.padStart(2, '0')).toUpperCase();
|
|
3553
3600
|
}
|
|
3554
3601
|
|
|
3555
|
-
function SquidConfigProvider({ theme, children, themeType = 'light', }) {
|
|
3602
|
+
function SquidConfigProvider({ theme = lightTheme, children, themeType = 'light', }) {
|
|
3556
3603
|
const parsedStyle = parseSquidTheme(theme);
|
|
3557
3604
|
return (jsxRuntime.jsx("div", { style: parsedStyle, "data-squid-theme-type": themeType, className: "tw-group tw-relative tw-font-geist", children: children }));
|
|
3558
3605
|
}
|
|
@@ -6,6 +6,7 @@ interface BoostButtonProps {
|
|
|
6
6
|
boostMode: BoostMode;
|
|
7
7
|
}) => void;
|
|
8
8
|
boostDisabledMessage?: string;
|
|
9
|
+
tooltipDisplayDelayMs?: number;
|
|
9
10
|
}
|
|
10
|
-
export declare function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode, boostDisabledMessage, }: BoostButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode, boostDisabledMessage, tooltipDisplayDelayMs, }: BoostButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -6,6 +6,7 @@ interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
|
6
6
|
variant: ButtonVariant;
|
|
7
7
|
size: ButtonSize;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
+
link?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare function Button({ label, disabled, size, variant, icon, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function Button({ label, disabled, size, variant, icon, link, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -9,5 +9,6 @@ export interface TooltipProps {
|
|
|
9
9
|
containerClassName?: string;
|
|
10
10
|
childrenClassName?: string;
|
|
11
11
|
tooltipClassName?: string;
|
|
12
|
+
displayDelayMs?: number;
|
|
12
13
|
}
|
|
13
|
-
export declare function Tooltip({ children, tooltipContent, tooltipWidth, threshold, containerClassName, childrenClassName, tooltipClassName, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function Tooltip({ children, tooltipContent, tooltipWidth, threshold, containerClassName, childrenClassName, tooltipClassName, displayDelayMs, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,6 +7,7 @@ interface BoostProps {
|
|
|
7
7
|
estimatedTime: string;
|
|
8
8
|
boostDisabledMessage?: string;
|
|
9
9
|
canToggleBoostMode?: boolean;
|
|
10
|
+
boostTooltipDisplayDelayMs?: number;
|
|
10
11
|
}
|
|
11
|
-
export declare function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode, }: BoostProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode, boostTooltipDisplayDelayMs, }: BoostProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -17,6 +17,7 @@ interface DetailsToolbarProps {
|
|
|
17
17
|
label: string;
|
|
18
18
|
onClick: () => void;
|
|
19
19
|
};
|
|
20
|
+
boostTooltipDisplayDelayMs?: number;
|
|
20
21
|
}
|
|
21
|
-
export declare function DetailsToolbar({ errorMessage, boostMode, onToggleBoostMode, onInvertSwapButtonClick, onFeeButtonClick, feeInUsd, estimatedTime, canToggleBoostMode, boostDisabledMessage, helpButton, isLoading, isEmpty, }: DetailsToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function DetailsToolbar({ errorMessage, boostMode, onToggleBoostMode, onInvertSwapButtonClick, onFeeButtonClick, feeInUsd, estimatedTime, canToggleBoostMode, boostDisabledMessage, helpButton, isLoading, isEmpty, boostTooltipDisplayDelayMs, }: DetailsToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
22
23
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface ListItemProps extends React.HTMLAttributes<
|
|
2
|
+
interface ListItemProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
3
3
|
itemTitle: string | React.ReactNode;
|
|
4
4
|
mainImageUrl?: string;
|
|
5
5
|
secondaryImageUrl?: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ThemeType } from '../types/components';
|
|
3
3
|
import { SquidTheme } from '../types/config';
|
|
4
4
|
export declare function SquidConfigProvider({ theme, children, themeType, }: {
|
|
5
|
-
theme
|
|
5
|
+
theme?: SquidTheme;
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
themeType?: ThemeType;
|
|
8
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,3 +19,5 @@ export declare const LargePrimary: Story;
|
|
|
19
19
|
export declare const LargeSecondary: Story;
|
|
20
20
|
export declare const LargeTertiary: Story;
|
|
21
21
|
export declare const LargeDisabled: Story;
|
|
22
|
+
export declare const LargeAndLink: Story;
|
|
23
|
+
export declare const LargeAndLinkDisabled: Story;
|
|
@@ -5,6 +5,7 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Large: Story;
|
|
7
7
|
export declare const LargeWithLongTitle: Story;
|
|
8
|
+
export declare const LargeWithLongTitleAndSubtitle: Story;
|
|
8
9
|
export declare const LargeRoundedFull: Story;
|
|
9
10
|
export declare const LargeWithSubtitle: Story;
|
|
10
11
|
export declare const LargeWithDetail: Story;
|
package/dist/esm/index.js
CHANGED
|
@@ -2763,6 +2763,11 @@ function AssetsButton({ chainImageUrl, tokenImageUrl, tokenSymbol, chainBgColor
|
|
|
2763
2763
|
}, children: [jsx(BodyText, { size: "small", className: "tw-leading-[13px]", children: tokenImageUrl ? tokenSymbol : 'Select token' }), jsx(ChevronLargeRightIcon, { className: "tw-opacity-66" })] })] }));
|
|
2764
2764
|
}
|
|
2765
2765
|
|
|
2766
|
+
const CSS_VARS = {
|
|
2767
|
+
MOVE_WITH_SPRING_BOUNCE_DURATION: '--squid-animation-move-with-spring-bounce-duration',
|
|
2768
|
+
DISPLAY_DELAYED_DURATION: '--squid-animation-display-delayed-duration',
|
|
2769
|
+
};
|
|
2770
|
+
|
|
2766
2771
|
function SearchIcon() {
|
|
2767
2772
|
return (jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M20 20L16.05 16.05M18 11C18 14.866 14.866 18 11 18C7.13401 18 4 14.866 4 11C4 7.13401 7.13401 4 11 4C14.866 4 18 7.13401 18 11Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
|
|
2768
2773
|
}
|
|
@@ -2965,7 +2970,7 @@ const borderRadiusClassMap = {
|
|
|
2965
2970
|
};
|
|
2966
2971
|
function Menu(_a) {
|
|
2967
2972
|
var { children, containerClassName, contentClassName, title, displayControls, rounded = 'lg', menuRef } = _a, props = __rest(_a, ["children", "containerClassName", "contentClassName", "title", "displayControls", "rounded", "menuRef"]);
|
|
2968
|
-
return (jsx("div", Object.assign({}, props, { className: cn('tw-max-w-[320px]', containerClassName), ref: menuRef, children: jsxs("div", { className: cn('tw-relative tw-inline-flex tw-max-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-m tw-bg-material-dark-thick tw-p-squid-s tw-text-center tw-text-material-light-thick tw-backdrop-blur/20 tw-backdrop-saturate-150 group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2', borderRadiusClassMap[rounded], contentClassName), children: [title ? (jsx("div", { className: "tw-z-20 tw-flex tw-flex-col tw-items-center tw-justify-center tw-self-stretch tw-py-squid-xxs tw-text-grey-100", children: jsx(BodyText, { size: "small", className: "tw-self-stretch !tw-leading-[10px]", children: title }) })) : null, typeof children === 'string' ? (jsx(CaptionText, { className: "tw-z-20 tw-self-stretch", children: children })) : (jsx("div", { className: "tw-z-20 tw-max-w-full", children: children })), displayControls ? (jsx("div", { className: "tw-z-20 tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xs", children: jsx(Button, { size: "md", variant: "tertiary", label: "Learn more", className: "tw-self-stretch" }) })) : null, jsx("div", { className: cn('tw-absolute tw-z-10 tw-h-full tw-w-full tw-border tw-border-material-light-thin tw-bg-material-light-thin', borderRadiusClassMap[rounded]) })] }) })));
|
|
2973
|
+
return (jsx("div", Object.assign({}, props, { className: cn('tw-max-w-[320px]', containerClassName), ref: menuRef, children: jsxs("div", { className: cn('tw-relative tw-inline-flex tw-max-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-m tw-bg-material-dark-thick tw-p-squid-s tw-text-center tw-text-material-light-thick tw-backdrop-blur/20 tw-backdrop-saturate-150 group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2', borderRadiusClassMap[rounded], contentClassName), children: [title ? (jsx("div", { className: "tw-z-20 tw-flex tw-flex-col tw-items-center tw-justify-center tw-self-stretch tw-py-squid-xxs tw-text-grey-100", children: jsx(BodyText, { size: "small", className: "tw-self-stretch !tw-leading-[10px]", children: title }) })) : null, typeof children === 'string' ? (jsx(CaptionText, { className: "tw-z-20 tw-self-stretch", children: children })) : (jsx("div", { className: "tw-z-20 tw-max-w-full tw-text-caption", children: children })), displayControls ? (jsx("div", { className: "tw-z-20 tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xs", children: jsx(Button, { size: "md", variant: "tertiary", label: "Learn more", className: "tw-self-stretch" }) })) : null, jsx("div", { className: cn('tw-absolute tw-z-10 tw-h-full tw-w-full tw-border tw-border-material-light-thin tw-bg-material-light-thin', borderRadiusClassMap[rounded]) })] }) })));
|
|
2969
2974
|
}
|
|
2970
2975
|
|
|
2971
2976
|
const tooltipWidthClassMap = {
|
|
@@ -2981,19 +2986,25 @@ const tooltipThresholdClassMap = {
|
|
|
2981
2986
|
xl: 'tw-pb-squid-xl',
|
|
2982
2987
|
xxl: 'tw-pb-squid-xxl',
|
|
2983
2988
|
};
|
|
2984
|
-
function Tooltip({ children, tooltipContent, tooltipWidth = 'container', threshold = 'xxs', containerClassName, childrenClassName, tooltipClassName, }) {
|
|
2985
|
-
return (jsxs("div", { className: cn('tw-relative', containerClassName), children: [jsx("div", { className: cn('tw-peer', childrenClassName), children: children }), tooltipContent ? (jsx(Menu, {
|
|
2989
|
+
function Tooltip({ children, tooltipContent, tooltipWidth = 'container', threshold = 'xxs', containerClassName, childrenClassName, tooltipClassName, displayDelayMs = 0, }) {
|
|
2990
|
+
return (jsxs("div", { className: cn('tw-relative', containerClassName), children: [jsx("div", { className: cn('tw-peer', childrenClassName), children: children }), tooltipContent ? (jsx(Menu, { style: {
|
|
2991
|
+
[CSS_VARS.DISPLAY_DELAYED_DURATION]: `${displayDelayMs}ms`,
|
|
2992
|
+
}, containerClassName: cn(
|
|
2993
|
+
// general styles
|
|
2994
|
+
'tw-absolute tw-z-40 tw-bottom-full tw-left-1/2 -tw-translate-x-1/2',
|
|
2995
|
+
// visibility styles. Display only on hover
|
|
2996
|
+
'tw-opacity-0 hover:tw-animate-display-delayed peer-hover:tw-animate-display-delayed', tooltipWidthClassMap[tooltipWidth], tooltipThresholdClassMap[threshold], tooltipClassName), children: tooltipContent })) : null] }));
|
|
2986
2997
|
}
|
|
2987
2998
|
|
|
2988
2999
|
const animationDuration = '500ms';
|
|
2989
|
-
function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode = true, boostDisabledMessage = 'Boost disabled', }) {
|
|
3000
|
+
function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode = true, boostDisabledMessage = 'Boost disabled', tooltipDisplayDelayMs = 0, }) {
|
|
2990
3001
|
const boostIndicatorRef = useRef(null);
|
|
2991
3002
|
function handleToggleBoostMode() {
|
|
2992
3003
|
if (!boostIndicatorRef.current || !canToggleBoostMode)
|
|
2993
3004
|
return;
|
|
2994
3005
|
// we don't want to trigger the animation when the component is mounted
|
|
2995
3006
|
// so we set the animation duration only when user clicks the button
|
|
2996
|
-
boostIndicatorRef.current.style.setProperty(
|
|
3007
|
+
boostIndicatorRef.current.style.setProperty(CSS_VARS.MOVE_WITH_SPRING_BOUNCE_DURATION, animationDuration);
|
|
2997
3008
|
if (boostIndicatorRef.current.dataset.boostMode === 'normal') {
|
|
2998
3009
|
boostIndicatorRef.current.dataset.boostMode = 'boost';
|
|
2999
3010
|
onToggleBoostMode === null || onToggleBoostMode === void 0 ? void 0 : onToggleBoostMode({ boostMode: 'boost' });
|
|
@@ -3003,7 +3014,7 @@ function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode = true,
|
|
|
3003
3014
|
onToggleBoostMode === null || onToggleBoostMode === void 0 ? void 0 : onToggleBoostMode({ boostMode: 'normal' });
|
|
3004
3015
|
}
|
|
3005
3016
|
}
|
|
3006
|
-
return (jsx(Tooltip, { tooltipWidth: "max", tooltipContent: canToggleBoostMode ? null : boostDisabledMessage, children: jsxs("button", { onClick: handleToggleBoostMode, disabled: !canToggleBoostMode, className: "tw-group tw-relative tw-flex tw-h-squid-xl tw-w-[140px] tw-flex-col tw-justify-between tw-overflow-hidden tw-bg-grey-900 tw-pb-squid-xxs tw-text-grey-300", children: [jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-left-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-r tw-from-grey-900 tw-to-transparent" }), jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-right-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-l tw-from-grey-900 tw-to-transparent" }), jsxs("div", { ref: boostIndicatorRef, "data-boost-mode": boostMode, className: "tw-group tw-peer tw-flex tw-h-full tw-w-full tw-items-center tw-justify-between tw-transition-transform group-disabled:tw-grayscale data-[boost-mode=boost]:tw-animate-move-to-left-with-spring-bounce data-[boost-mode=normal]:tw-animate-move-to-right-with-spring-bounce", children: [jsx("div", { className: "tw-w-1/2 tw-text-center group-disabled:tw-grayscale", children: jsx(BodyText, { size: "small", className: "tw-text-grey-300", children: "Normal" }) }), jsxs("div", { className: "tw-w-1/2 tw-text-center group-disabled:tw-grayscale", children: [jsx(BodyText, { size: "small", className: "tw-text-status-positive", children: "Boost" }), ' '] }), jsx("div", { className: "tw-absolute tw-bottom-0 tw-h-1.5 tw-w-[1.5px] tw-rounded-sm tw-bg-grey-500 tw-text-grey-500 group-data-[boost-mode=boost]:tw-left-[calc(50%-2px)] group-data-[boost-mode=normal]:tw-left-[calc(50%-6px)]", style: {
|
|
3017
|
+
return (jsx(Tooltip, { tooltipWidth: "max", displayDelayMs: tooltipDisplayDelayMs, tooltipContent: canToggleBoostMode ? null : boostDisabledMessage, children: jsxs("button", { onClick: handleToggleBoostMode, disabled: !canToggleBoostMode, className: "tw-group tw-relative tw-flex tw-h-squid-xl tw-w-[140px] tw-flex-col tw-justify-between tw-overflow-hidden tw-bg-grey-900 tw-pb-squid-xxs tw-text-grey-300", children: [jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-left-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-r tw-from-grey-900 tw-to-transparent" }), jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-right-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-l tw-from-grey-900 tw-to-transparent" }), jsxs("div", { ref: boostIndicatorRef, "data-boost-mode": boostMode, className: "tw-group tw-peer tw-flex tw-h-full tw-w-full tw-items-center tw-justify-between tw-transition-transform group-disabled:tw-grayscale data-[boost-mode=boost]:tw-animate-move-to-left-with-spring-bounce data-[boost-mode=normal]:tw-animate-move-to-right-with-spring-bounce", children: [jsx("div", { className: "tw-w-1/2 tw-text-center group-disabled:tw-grayscale", children: jsx(BodyText, { size: "small", className: "tw-text-grey-300", children: "Normal" }) }), jsxs("div", { className: "tw-w-1/2 tw-text-center group-disabled:tw-grayscale", children: [jsx(BodyText, { size: "small", className: "tw-text-status-positive", children: "Boost" }), ' '] }), jsx("div", { className: "tw-absolute tw-bottom-0 tw-h-1.5 tw-w-[1.5px] tw-rounded-sm tw-bg-grey-500 tw-text-grey-500 group-data-[boost-mode=boost]:tw-left-[calc(50%-2px)] group-data-[boost-mode=normal]:tw-left-[calc(50%-6px)]", style: {
|
|
3007
3018
|
boxShadow: generateMarkerLines(40),
|
|
3008
3019
|
} })] }), jsx("div", { className: cn('tw-absolute tw-bottom-0.5 tw-left-[calc(50%-1.5px)] tw-z-20 tw-h-[10px] tw-w-[3px] tw-rounded-sm tw-transition-colors group-disabled:tw-grayscale peer-data-[boost-mode=boost]:tw-bg-status-positive peer-data-[boost-mode=normal]:tw-bg-current'), style: {
|
|
3009
3020
|
transitionDuration: animationDuration,
|
|
@@ -3022,30 +3033,35 @@ function generateMarkerLines(count) {
|
|
|
3022
3033
|
}
|
|
3023
3034
|
|
|
3024
3035
|
const buttonSizeClassMap = {
|
|
3025
|
-
md: 'tw-px-squid-xs tw-py-squid-xxs tw-rounded-squid-m tw-border tw-flex tw-items-center tw-gap-squid-xxs tw-min-w-[60px] tw-h-squid-xl tw-justify-center',
|
|
3026
|
-
lg: 'tw-border tw-rounded-squid-xxl tw-p-1 tw-h-button tw-w-full',
|
|
3036
|
+
md: 'tw-flex tw-px-squid-xs tw-py-squid-xxs tw-rounded-squid-m tw-border tw-flex tw-items-center tw-gap-squid-xxs tw-min-w-[60px] tw-h-squid-xl tw-justify-center',
|
|
3037
|
+
lg: 'tw-flex tw-border tw-rounded-squid-xxl tw-p-1 tw-h-button tw-w-full tw-flex tw-items-center',
|
|
3027
3038
|
};
|
|
3028
3039
|
const buttonVariantClassMap = {
|
|
3029
|
-
primary: 'tw-bg-royal-500 tw-text-grey-100 tw-border-material-light-thin',
|
|
3040
|
+
primary: 'tw-bg-royal-500 group-data-[squid-theme-type=light]:tw-text-grey-900 group-data-[squid-theme-type=dark]:tw-text-grey-100 tw-border-material-light-thin',
|
|
3030
3041
|
secondary: 'tw-bg-grey-100 tw-text-grey-800 tw-border-material-light-thin',
|
|
3031
3042
|
tertiary: 'tw-bg-grey-800 tw-text-grey-300 tw-border-material-light-thin',
|
|
3032
3043
|
};
|
|
3033
3044
|
// right now all variants have the same disabled styles
|
|
3034
3045
|
// in the future, we can add more disabled styles for different variants
|
|
3035
|
-
const buttonDisabledClass = '
|
|
3046
|
+
const buttonDisabledClass = 'tw-bg-grey-800 tw-text-grey-600 tw-cursor-not-allowed';
|
|
3036
3047
|
function Button(_a) {
|
|
3037
|
-
var { label, disabled, size, variant, icon } = _a, props = __rest(_a, ["label", "disabled", "size", "variant", "icon"]);
|
|
3038
|
-
|
|
3039
|
-
// disabled styles
|
|
3040
|
-
buttonDisabledClass,
|
|
3041
|
-
// custom classes from props
|
|
3042
|
-
props.className), children: size === 'lg' ? (jsx("span", { className: "tw-px-squid-m", children: jsx(BodyText, { size: "medium", children: label }) })) : size === 'md' ? (label && !icon ? (
|
|
3048
|
+
var { label, disabled, size, variant, icon, link } = _a, props = __rest(_a, ["label", "disabled", "size", "variant", "icon", "link"]);
|
|
3049
|
+
const children = (jsx(Fragment, { children: size === 'lg' ? (jsx("span", { className: "tw-px-squid-m", children: jsx(BodyText, { size: "medium", children: label }) })) : size === 'md' ? (label && !icon ? (
|
|
3043
3050
|
// label only
|
|
3044
3051
|
jsx(BodyText, { size: "small", children: label })) : !label && icon ? (
|
|
3045
3052
|
// icon only
|
|
3046
3053
|
icon) : (
|
|
3047
3054
|
// icon and label
|
|
3048
|
-
jsxs(Fragment, { children: [icon, jsx(BodyText, { className: "tw-pr-1", size: "small", children: label })] }))) : null }))
|
|
3055
|
+
jsxs(Fragment, { children: [icon, jsx(BodyText, { className: "tw-pr-1", size: "small", children: label })] }))) : null }));
|
|
3056
|
+
const className = cn(buttonSizeClassMap[size], buttonVariantClassMap[variant],
|
|
3057
|
+
// disabled styles
|
|
3058
|
+
disabled && buttonDisabledClass,
|
|
3059
|
+
// custom classes from props
|
|
3060
|
+
props.className);
|
|
3061
|
+
if (link) {
|
|
3062
|
+
return (jsx("a", { "aria-disabled": disabled, href: disabled ? undefined : link, target: "_blank", className: className, children: children }));
|
|
3063
|
+
}
|
|
3064
|
+
return (jsx("button", Object.assign({}, props, { "aria-disabled": disabled, className: className, disabled: disabled, children: children })));
|
|
3049
3065
|
}
|
|
3050
3066
|
|
|
3051
3067
|
function Chip(_a) {
|
|
@@ -3066,8 +3082,8 @@ function SettingsButton({ label, isSelected = false, }) {
|
|
|
3066
3082
|
return (jsx("button", { className: cn('tw-flex tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-border-2 tw-border-transparent tw-p-squid-xs hover:tw-bg-material-light-thin focus:tw-bg-material-light-thin', isSelected && 'tw-outline-royal-500'), children: jsx(CaptionText, { className: "!tw-font-medium", children: label }) }));
|
|
3067
3083
|
}
|
|
3068
3084
|
|
|
3069
|
-
function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode = true, }) {
|
|
3070
|
-
return (jsxs("div", { className: "tw-flex tw-h-squid-xl tw-items-center tw-gap-x-squid-xxs tw-bg-grey-900 tw-pr-squid-xxs", children: [jsx(BoostButton, { boostMode: boostMode, boostDisabledMessage: boostDisabledMessage, canToggleBoostMode: canToggleBoostMode, onToggleBoostMode: onToggleBoostMode }), jsx(Chip, { label: estimatedTime, className: cn('tw-text-grey-900 tw-transition-colors', boostMode === 'normal' || !canToggleBoostMode
|
|
3085
|
+
function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode = true, boostTooltipDisplayDelayMs = 0, }) {
|
|
3086
|
+
return (jsxs("div", { className: "tw-flex tw-h-squid-xl tw-items-center tw-gap-x-squid-xxs tw-bg-grey-900 tw-pr-squid-xxs", children: [jsx(BoostButton, { boostMode: boostMode, boostDisabledMessage: boostDisabledMessage, canToggleBoostMode: canToggleBoostMode, onToggleBoostMode: onToggleBoostMode, tooltipDisplayDelayMs: boostTooltipDisplayDelayMs }), jsx(Chip, { label: estimatedTime, className: cn('tw-text-grey-900 tw-transition-colors', boostMode === 'normal' || !canToggleBoostMode
|
|
3071
3087
|
? 'tw-bg-grey-300'
|
|
3072
3088
|
: 'tw-bg-status-positive') })] }));
|
|
3073
3089
|
}
|
|
@@ -3086,7 +3102,7 @@ const detailStateClassMap = {
|
|
|
3086
3102
|
error: 'tw-opacity-33 tw-pointer-events-none',
|
|
3087
3103
|
full: '',
|
|
3088
3104
|
};
|
|
3089
|
-
function DetailsToolbar({ errorMessage, boostMode = 'normal', onToggleBoostMode, onInvertSwapButtonClick, onFeeButtonClick, feeInUsd, estimatedTime, canToggleBoostMode, boostDisabledMessage, helpButton, isLoading, isEmpty, }) {
|
|
3105
|
+
function DetailsToolbar({ errorMessage, boostMode = 'normal', onToggleBoostMode, onInvertSwapButtonClick, onFeeButtonClick, feeInUsd, estimatedTime, canToggleBoostMode, boostDisabledMessage, helpButton, isLoading, isEmpty, boostTooltipDisplayDelayMs = 0, }) {
|
|
3090
3106
|
const state = useMemo(() => {
|
|
3091
3107
|
if (errorMessage)
|
|
3092
3108
|
return 'error';
|
|
@@ -3097,11 +3113,11 @@ function DetailsToolbar({ errorMessage, boostMode = 'normal', onToggleBoostMode,
|
|
|
3097
3113
|
return 'full';
|
|
3098
3114
|
}, [errorMessage, isLoading, isEmpty]);
|
|
3099
3115
|
const detailClassName = cn('tw-w-[190px]', detailStateClassMap[state]);
|
|
3100
|
-
return (jsx("aside", { className: cn('tw-h-squid-[50px] tw-flex tw-w-[480px] tw-items-center tw-justify-around tw-bg-grey-900 tw-py-squid-xxs tw-text-grey-500', state === 'error' ? 'tw-px-squid-l' : 'tw-px-squid-m'), children: state === 'error' && errorMessage ? (jsxs(Fragment, { children: [jsx(ErrorMessage, { message: errorMessage }), helpButton ? (jsx(Button, { onClick: helpButton.onClick, size: "md", variant: "tertiary", label: helpButton.label })) : null] })) : (jsxs(Fragment, { children: [jsx("div", { className: detailClassName, children: jsx(FeeButton, { feeInUsd: feeInUsd, onClick: onFeeButtonClick }) }), jsx("div", { className: "tw-flex tw-h-squid-xl tw-w-squid-xxl tw-items-center tw-justify-center", children: state === 'loading' ? (jsx(Loader, { size: "32" })) : (jsx(Button, { variant: "tertiary", size: "md", onClick: onInvertSwapButtonClick, className: "tw-border-transparent tw-bg-transparent hover:tw-bg-material-light-thin", icon: jsx(ChevronLargeDownIcon, {}) })) }), jsx("div", { className: detailClassName, children: jsx(Boost, { estimatedTime: estimatedTime !== null && estimatedTime !== void 0 ? estimatedTime : '0s', boostMode: boostMode, onToggleBoostMode: onToggleBoostMode, canToggleBoostMode: state === 'loading' ? false : canToggleBoostMode, boostDisabledMessage: boostDisabledMessage }) })] })) }));
|
|
3116
|
+
return (jsx("aside", { className: cn('tw-h-squid-[50px] tw-flex tw-w-[480px] tw-items-center tw-justify-around tw-bg-grey-900 tw-py-squid-xxs tw-text-grey-500', state === 'error' ? 'tw-px-squid-l' : 'tw-px-squid-m'), children: state === 'error' && errorMessage ? (jsxs(Fragment, { children: [jsx(ErrorMessage, { message: errorMessage }), helpButton ? (jsx(Button, { onClick: helpButton.onClick, size: "md", variant: "tertiary", label: helpButton.label })) : null] })) : (jsxs(Fragment, { children: [jsx("div", { className: detailClassName, children: jsx(FeeButton, { feeInUsd: feeInUsd, onClick: onFeeButtonClick }) }), jsx("div", { className: "tw-flex tw-h-squid-xl tw-w-squid-xxl tw-items-center tw-justify-center", children: state === 'loading' ? (jsx(Loader, { size: "32" })) : (jsx(Button, { variant: "tertiary", size: "md", onClick: onInvertSwapButtonClick, className: "tw-border-transparent tw-bg-transparent hover:tw-bg-material-light-thin", icon: jsx(ChevronLargeDownIcon, {}) })) }), jsx("div", { className: detailClassName, children: jsx(Boost, { estimatedTime: estimatedTime !== null && estimatedTime !== void 0 ? estimatedTime : '0s', boostMode: boostMode, onToggleBoostMode: onToggleBoostMode, canToggleBoostMode: state === 'loading' ? false : canToggleBoostMode, boostDisabledMessage: boostDisabledMessage, boostTooltipDisplayDelayMs: boostTooltipDisplayDelayMs }) })] })) }));
|
|
3101
3117
|
}
|
|
3102
3118
|
|
|
3103
3119
|
function DropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, }) {
|
|
3104
|
-
return (jsx("li", { className: "tw-max-h-squid-xl tw-w-full tw-px-squid-xxs",
|
|
3120
|
+
return (jsx("li", { className: "tw-max-h-squid-xl tw-w-full tw-px-squid-xxs", children: jsxs("button", { onClick: onClick, className: "tw-flex tw-h-squid-l tw-w-full tw-cursor-pointer tw-items-center tw-gap-squid-xxs tw-rounded-squid-xs tw-px-squid-xxs hover:tw-bg-material-light-thin", children: [jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-between tw-rounded-squid-xs", children: imageUrl ? (jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), jsx(CaptionText, { className: cn(labelClassName, 'tw-max-w-full tw-truncate !tw-leading-[18px]'), children: label })] }) }));
|
|
3105
3121
|
}
|
|
3106
3122
|
|
|
3107
3123
|
function useDropdownMenu(props) {
|
|
@@ -3208,16 +3224,18 @@ const listItemSizeMap = {
|
|
|
3208
3224
|
};
|
|
3209
3225
|
function ListItem(_a) {
|
|
3210
3226
|
var { itemTitle, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size = 'large', mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded = false, detailButtonClassName, loading } = _a, props = __rest(_a, ["itemTitle", "mainImageUrl", "subtitle", "detail", "icon", "secondaryImageUrl", "size", "mainIcon", "className", "isSelected", "onDetailClick", "showDetailOnHoverOnly", "rounded", "detailButtonClassName", "loading"]);
|
|
3211
|
-
|
|
3227
|
+
// 'small' variant does not have detail
|
|
3228
|
+
const showDetail = size === 'large' && (!!detail || !!icon || showDetailOnHoverOnly);
|
|
3229
|
+
return (jsx("li", { className: cn('tw-flex tw-max-w-full tw-bg-grey-900 tw-text-grey-300', listItemSizeMap[size], className), children: jsxs("button", Object.assign({}, props, { className: cn('tw-group/list-item tw-flex tw-w-full tw-max-w-full tw-cursor-pointer tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs hover:tw-bg-material-light-thin', isSelected && 'tw-bg-material-light-thin'), children: [size === 'large' ? (jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon ? (mainIcon) : (jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, size: "md", rounded: rounded })) })) : (jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon ? (mainIcon) : (jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), jsxs("div", { className: cn('tw-flex tw-h-[40px] tw-flex-1 tw-flex-col tw-items-start tw-justify-center tw-gap-squid-xs',
|
|
3212
3230
|
// 'large' variant has extra padding
|
|
3213
|
-
size === 'large' ? 'tw-w-[56%] tw-pl-squid-xxs' : 'tw-w-[67%]'), children: [typeof itemTitle === 'string' ? (jsx(BodyText, { size: "small", className: "tw-max-w-full tw-truncate !tw-leading-[
|
|
3214
|
-
((loading === null || loading === void 0 ? void 0 : loading.subtitle) ? (jsx(LoadingSkeleton, { className: "-tw-translate-x-6 tw-text-grey-500", height: "10" })) : subtitle ? (jsx(CaptionText, { className: "tw-h-squid-xs !tw-leading-[
|
|
3231
|
+
size === 'large' ? 'tw-w-[56%] tw-pl-squid-xxs' : 'tw-w-[67%]'), children: [typeof itemTitle === 'string' ? (jsx(BodyText, { size: "small", className: "tw-max-w-full tw-truncate !tw-leading-[14px]", children: itemTitle })) : (itemTitle), size === 'large' &&
|
|
3232
|
+
((loading === null || loading === void 0 ? void 0 : loading.subtitle) ? (jsx(LoadingSkeleton, { className: "-tw-translate-x-6 tw-text-grey-500", height: "10" })) : subtitle ? (jsx(CaptionText, { className: "tw-h-squid-xs tw-max-w-full tw-truncate !tw-leading-[11px] tw-text-grey-500", children: subtitle })) : null)] }), showDetail && (jsxs("button", { onClick: (event) => {
|
|
3215
3233
|
// prevent click event from bubbling up to parent
|
|
3216
3234
|
event.stopPropagation();
|
|
3217
3235
|
onDetailClick === null || onDetailClick === void 0 ? void 0 : onDetailClick();
|
|
3218
|
-
}, className: cn('tw-cursor-pointer tw-items-center tw-justify-center tw-rounded-squid-xs hover:tw-bg-material-light-thin', size === 'large' ? 'tw-h-squid-xl' : 'tw-h-squid-l', showDetailOnHoverOnly
|
|
3219
|
-
? 'tw-
|
|
3220
|
-
: 'tw-flex', detailButtonClassName), children: [
|
|
3236
|
+
}, className: cn('tw-flex tw-w-fit tw-cursor-pointer tw-items-center tw-justify-center tw-rounded-squid-xs hover:tw-bg-material-light-thin', size === 'large' ? 'tw-h-squid-xl' : 'tw-h-squid-l', showDetailOnHoverOnly
|
|
3237
|
+
? 'tw-opacity-0 hover:tw-opacity-100 focus:tw-opacity-100 group-hover/list-item:tw-opacity-100 group-focus/list-item:tw-opacity-100'
|
|
3238
|
+
: 'tw-flex', detailButtonClassName), children: [!!detail && (jsx(CaptionText, { className: "min-tw-w-4 min-tw-h-4 tw-px-squid-xxs tw-leading-[10px]", children: detail })), icon ? (jsx("span", { className: "tw-flex tw-items-center tw-justify-center tw-px-[3px] tw-py-2", children: icon })) : null] }))] })) }));
|
|
3221
3239
|
}
|
|
3222
3240
|
|
|
3223
3241
|
function MenuItem({ label, imageUrl, icon }) {
|
|
@@ -3285,8 +3303,9 @@ const separatorClassMap = {
|
|
|
3285
3303
|
progress: 'tw-text-grey-600',
|
|
3286
3304
|
pending: 'tw-text-grey-600',
|
|
3287
3305
|
};
|
|
3306
|
+
const colorsTransitionClass = 'tw-transition-colors tw-duration-300';
|
|
3288
3307
|
function SwapStepItem({ descriptionBlocks, chipContent, showStepSeparator = false, link, status = 'pending', }) {
|
|
3289
|
-
return (jsxs("li", { className: "tw-flex tw-w-list-item-large tw-flex-col tw-items-start tw-
|
|
3308
|
+
return (jsxs("li", { className: "tw-flex tw-w-list-item-large tw-flex-col tw-items-start tw-text-grey-300", children: [showStepSeparator && (jsx("span", { className: cn(separatorClassMap[status], colorsTransitionClass, 'tw-duration-100'), children: jsx(SwapStepSeparator, {}) })), jsxs("a", { href: link, target: "_blank", className: cn('tw-group/swap-step-item tw-flex tw-w-full tw-items-center tw-rounded-squid-xs', !!link && 'hover:tw-bg-material-light-thin', statusTextClassMap[status], colorsTransitionClass), children: [jsx("span", { className: "tw-relative tw-flex tw-min-h-squid-l tw-items-center tw-justify-center tw-gap-squid-xxs tw-px-squid-xs", children: jsx(Chip, { className: cn('tw-w-squid-xl', statusBgClassMap[status], colorsTransitionClass), icon: typeof chipContent === 'string' ? (jsx(CaptionText, { children: chipContent })) : (chipContent) }) }), jsx("div", { className: "tw-flex tw-min-h-squid-l tw-flex-1 tw-flex-wrap tw-items-center tw-justify-start tw-gap-squid-xxs tw-py-squid-xxs", children: descriptionBlocks.map(({ type, value }, index) => {
|
|
3290
3309
|
if (type === 'string') {
|
|
3291
3310
|
return (
|
|
3292
3311
|
// Instead of displaying the string into a single <BodyText />
|
|
@@ -3432,12 +3451,11 @@ function SwapStepsCollapsed({ steps, currentStepIndex: _newStepIndex, }) {
|
|
|
3432
3451
|
};
|
|
3433
3452
|
}, [isShowRouteAnimationRunning]);
|
|
3434
3453
|
const collapseRouteSteps = () => setIsShowRouteAnimationRunning(false);
|
|
3435
|
-
return (jsxs(Fragment, { children: [
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
'tw-animate-translate-to-bottom', newStepIndex < currentStepIndex && 'tw-animate-translate-to-top'), currentStep: currentStep, isFirstStep: isFirstStep, isLastStep: isLastStep }), newStepIndex < currentStepIndex && (jsx("div", { className: "tw-absolute tw-left-0 tw-top-full tw-w-full tw-animate-translate-to-top", children: jsx(CurrentStep, { currentStep: steps[newStepIndex], isFirstStep: newStepIndex === 0, isLastStep: newStepIndex === steps.length - 1 }) })), jsx("span", { className: "tw-absolute tw-left-0 tw-top-0 tw-z-20 tw-h-[21px] tw-w-full tw-bg-gradient-to-b tw-from-grey-800" }), jsx("span", { className: "tw-absolute tw-bottom-0 tw-left-0 tw-z-20 tw-h-[21px] tw-w-full tw-bg-gradient-to-t tw-from-grey-800" })] }) }), isRouteVisible && (jsxs("div", { className: "tw-absolute tw-top-0 tw-z-20 tw-flex tw-h-[536px] tw-w-full tw-flex-col tw-justify-end tw-gap-squid-xxs", children: [jsx("div", { className: cn('tw-absolute tw-top-0 tw-h-[536px] tw-w-full tw-rounded-squid-l tw-bg-material-dark-thick tw-opacity-0 tw-backdrop-blur/10', isShowRouteAnimationRunning
|
|
3454
|
+
return (jsxs(Fragment, { children: [jsxs("button", { className: "tw-group/swap-step-item-button tw-relative tw-max-h-button tw-max-w-[400px] tw-overflow-hidden tw-rounded-full tw-border tw-border-material-light-thin tw-bg-grey-800 tw-transition-colors tw-duration-[50ms] hover:tw-bg-grey-700", onClick: () => {
|
|
3455
|
+
// mount route component and start animation
|
|
3456
|
+
setIsRouteVisible(true);
|
|
3457
|
+
setIsShowRouteAnimationRunning(true);
|
|
3458
|
+
}, children: [newStepIndex > currentStepIndex && (jsx("div", { className: "tw-absolute -tw-top-full tw-left-0 tw-w-full tw-animate-translate-to-bottom", children: jsx(CurrentStep, { currentStep: steps[newStepIndex], isFirstStep: newStepIndex === 0, isLastStep: newStepIndex === steps.length - 1 }) })), jsx(CurrentStep, { className: cn(newStepIndex > currentStepIndex && 'tw-animate-translate-to-bottom', newStepIndex < currentStepIndex && 'tw-animate-translate-to-top'), currentStep: currentStep, isFirstStep: isFirstStep, isLastStep: isLastStep }), newStepIndex < currentStepIndex && (jsx("div", { className: "tw-absolute tw-left-0 tw-top-full tw-w-full tw-animate-translate-to-top", children: jsx(CurrentStep, { currentStep: steps[newStepIndex], isFirstStep: newStepIndex === 0, isLastStep: newStepIndex === steps.length - 1 }) })), jsx("span", { className: "tw-absolute tw-left-0 tw-top-0 tw-z-20 tw-h-[21px] tw-w-full tw-bg-gradient-to-b tw-from-grey-800 tw-transition-colors group-hover/swap-step-item-button:tw-from-grey-700" }), jsx("span", { className: "tw-absolute tw-bottom-0 tw-left-0 tw-z-20 tw-h-[21px] tw-w-full tw-bg-gradient-to-t tw-from-grey-800 tw-transition-colors group-hover/swap-step-item-button:tw-from-grey-700" })] }), isRouteVisible && (jsxs("div", { className: "tw-absolute tw-top-0 tw-z-20 tw-flex tw-h-[536px] tw-w-full tw-flex-col tw-justify-end tw-gap-squid-xxs", children: [jsx("div", { className: cn('tw-absolute tw-top-0 tw-h-[536px] tw-w-full tw-rounded-squid-l tw-bg-material-dark-thick tw-opacity-0 tw-backdrop-blur/10', isShowRouteAnimationRunning
|
|
3441
3459
|
? 'tw-animate-fade-in'
|
|
3442
3460
|
: 'tw-animate-fade-out'), onClick: collapseRouteSteps }), jsxs("div", { className: cn('tw-flex tw-max-h-[536px] tw-w-full tw-flex-col tw-gap-squid-xxs tw-overflow-hidden tw-rounded-squid-l tw-border tw-border-material-light-thin tw-bg-grey-800 tw-backdrop-blur-2xl', isShowRouteAnimationRunning
|
|
3443
3461
|
? 'tw-animate-slide-to-top'
|
|
@@ -3457,6 +3475,32 @@ function TokenPair({ firstToken, secondToken }) {
|
|
|
3457
3475
|
}, children: [jsx("img", { className: "tw-ml-[1px] tw-aspect-square tw-w-10", src: firstToken.imageUrl }), jsx("img", { className: "tw-mr-[1px] tw-aspect-square tw-w-10", src: secondToken.imageUrl })] })] }));
|
|
3458
3476
|
}
|
|
3459
3477
|
|
|
3478
|
+
const lightTheme = {
|
|
3479
|
+
// content
|
|
3480
|
+
'content-100': '#17191C',
|
|
3481
|
+
'content-200': '#292C32',
|
|
3482
|
+
'content-300': '#4C515D',
|
|
3483
|
+
'content-400': '#626784',
|
|
3484
|
+
'content-500': '#8A8FA8',
|
|
3485
|
+
'content-600': '#A7ABBE',
|
|
3486
|
+
'content-700': '#D1D6E0',
|
|
3487
|
+
'content-800': '#EDEEF3',
|
|
3488
|
+
'content-900': '#FBFBFD',
|
|
3489
|
+
// accent
|
|
3490
|
+
'accent-400': '#9E79D2',
|
|
3491
|
+
'accent-500': '#B893EC',
|
|
3492
|
+
// status
|
|
3493
|
+
'status-positive': '#11D421',
|
|
3494
|
+
'status-negative': '#FF5B4D',
|
|
3495
|
+
// transparent
|
|
3496
|
+
'transparent-light-thin': '#17191C1A', // 10% opacity
|
|
3497
|
+
'transparent-light-average': '#17191C54', // 33% opacity
|
|
3498
|
+
'transparent-light-thick': '#17191CA8', // 66% opacity
|
|
3499
|
+
'transparent-dark-thin': '#FBFBFD1A', // 10% opacity
|
|
3500
|
+
'transparent-dark-average': '#FBFCFD54', // 33% opacity
|
|
3501
|
+
'transparent-dark-thick': '#FBFCFDA8', // 66% opacity
|
|
3502
|
+
};
|
|
3503
|
+
|
|
3460
3504
|
const themeKeysToReplace = [
|
|
3461
3505
|
{
|
|
3462
3506
|
userKey: 'content',
|
|
@@ -3502,6 +3546,9 @@ const parseSquidTheme = (userTheme) => {
|
|
|
3502
3546
|
const newKey = userKey.replace(keyToReplace.userKey, keyToReplace.internalKey);
|
|
3503
3547
|
internalKeys[newKey] = userValue;
|
|
3504
3548
|
}
|
|
3549
|
+
else {
|
|
3550
|
+
internalKeys[userKey] = userValue;
|
|
3551
|
+
}
|
|
3505
3552
|
return internalKeys;
|
|
3506
3553
|
}, {});
|
|
3507
3554
|
const styleKeys = Object.keys(themeTypesKeys);
|
|
@@ -3550,7 +3597,7 @@ function getHexColorFromOpacityPercentage(color, opacity) {
|
|
|
3550
3597
|
.padStart(2, '0')).toUpperCase();
|
|
3551
3598
|
}
|
|
3552
3599
|
|
|
3553
|
-
function SquidConfigProvider({ theme, children, themeType = 'light', }) {
|
|
3600
|
+
function SquidConfigProvider({ theme = lightTheme, children, themeType = 'light', }) {
|
|
3554
3601
|
const parsedStyle = parseSquidTheme(theme);
|
|
3555
3602
|
return (jsx("div", { style: parsedStyle, "data-squid-theme-type": themeType, className: "tw-group tw-relative tw-font-geist", children: children }));
|
|
3556
3603
|
}
|
|
@@ -6,6 +6,7 @@ interface BoostButtonProps {
|
|
|
6
6
|
boostMode: BoostMode;
|
|
7
7
|
}) => void;
|
|
8
8
|
boostDisabledMessage?: string;
|
|
9
|
+
tooltipDisplayDelayMs?: number;
|
|
9
10
|
}
|
|
10
|
-
export declare function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode, boostDisabledMessage, }: BoostButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode, boostDisabledMessage, tooltipDisplayDelayMs, }: BoostButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -6,6 +6,7 @@ interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
|
6
6
|
variant: ButtonVariant;
|
|
7
7
|
size: ButtonSize;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
+
link?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare function Button({ label, disabled, size, variant, icon, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function Button({ label, disabled, size, variant, icon, link, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -9,5 +9,6 @@ export interface TooltipProps {
|
|
|
9
9
|
containerClassName?: string;
|
|
10
10
|
childrenClassName?: string;
|
|
11
11
|
tooltipClassName?: string;
|
|
12
|
+
displayDelayMs?: number;
|
|
12
13
|
}
|
|
13
|
-
export declare function Tooltip({ children, tooltipContent, tooltipWidth, threshold, containerClassName, childrenClassName, tooltipClassName, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function Tooltip({ children, tooltipContent, tooltipWidth, threshold, containerClassName, childrenClassName, tooltipClassName, displayDelayMs, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,6 +7,7 @@ interface BoostProps {
|
|
|
7
7
|
estimatedTime: string;
|
|
8
8
|
boostDisabledMessage?: string;
|
|
9
9
|
canToggleBoostMode?: boolean;
|
|
10
|
+
boostTooltipDisplayDelayMs?: number;
|
|
10
11
|
}
|
|
11
|
-
export declare function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode, }: BoostProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode, boostTooltipDisplayDelayMs, }: BoostProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -17,6 +17,7 @@ interface DetailsToolbarProps {
|
|
|
17
17
|
label: string;
|
|
18
18
|
onClick: () => void;
|
|
19
19
|
};
|
|
20
|
+
boostTooltipDisplayDelayMs?: number;
|
|
20
21
|
}
|
|
21
|
-
export declare function DetailsToolbar({ errorMessage, boostMode, onToggleBoostMode, onInvertSwapButtonClick, onFeeButtonClick, feeInUsd, estimatedTime, canToggleBoostMode, boostDisabledMessage, helpButton, isLoading, isEmpty, }: DetailsToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function DetailsToolbar({ errorMessage, boostMode, onToggleBoostMode, onInvertSwapButtonClick, onFeeButtonClick, feeInUsd, estimatedTime, canToggleBoostMode, boostDisabledMessage, helpButton, isLoading, isEmpty, boostTooltipDisplayDelayMs, }: DetailsToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
22
23
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface ListItemProps extends React.HTMLAttributes<
|
|
2
|
+
interface ListItemProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
3
3
|
itemTitle: string | React.ReactNode;
|
|
4
4
|
mainImageUrl?: string;
|
|
5
5
|
secondaryImageUrl?: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ThemeType } from '../types/components';
|
|
3
3
|
import { SquidTheme } from '../types/config';
|
|
4
4
|
export declare function SquidConfigProvider({ theme, children, themeType, }: {
|
|
5
|
-
theme
|
|
5
|
+
theme?: SquidTheme;
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
themeType?: ThemeType;
|
|
8
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,3 +19,5 @@ export declare const LargePrimary: Story;
|
|
|
19
19
|
export declare const LargeSecondary: Story;
|
|
20
20
|
export declare const LargeTertiary: Story;
|
|
21
21
|
export declare const LargeDisabled: Story;
|
|
22
|
+
export declare const LargeAndLink: Story;
|
|
23
|
+
export declare const LargeAndLinkDisabled: Story;
|
|
@@ -5,6 +5,7 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Large: Story;
|
|
7
7
|
export declare const LargeWithLongTitle: Story;
|
|
8
|
+
export declare const LargeWithLongTitleAndSubtitle: Story;
|
|
8
9
|
export declare const LargeRoundedFull: Story;
|
|
9
10
|
export declare const LargeWithSubtitle: Story;
|
|
10
11
|
export declare const LargeWithDetail: Story;
|
package/dist/index.css
CHANGED
|
@@ -788,10 +788,6 @@ video {
|
|
|
788
788
|
margin-left: -0.25rem;
|
|
789
789
|
}
|
|
790
790
|
|
|
791
|
-
.-tw-ml-\[5px\] {
|
|
792
|
-
margin-left: -5px;
|
|
793
|
-
}
|
|
794
|
-
|
|
795
791
|
.-tw-ml-squid-xs {
|
|
796
792
|
margin-left: -0.625rem;
|
|
797
793
|
}
|
|
@@ -888,10 +884,6 @@ video {
|
|
|
888
884
|
height: 195px;
|
|
889
885
|
}
|
|
890
886
|
|
|
891
|
-
.tw-h-\[200px\] {
|
|
892
|
-
height: 200px;
|
|
893
|
-
}
|
|
894
|
-
|
|
895
887
|
.tw-h-\[205px\] {
|
|
896
888
|
height: 205px;
|
|
897
889
|
}
|
|
@@ -900,10 +892,6 @@ video {
|
|
|
900
892
|
height: 21px;
|
|
901
893
|
}
|
|
902
894
|
|
|
903
|
-
.tw-h-\[22px\] {
|
|
904
|
-
height: 22px;
|
|
905
|
-
}
|
|
906
|
-
|
|
907
895
|
.tw-h-\[240px\] {
|
|
908
896
|
height: 240px;
|
|
909
897
|
}
|
|
@@ -948,10 +936,6 @@ video {
|
|
|
948
936
|
height: 60px;
|
|
949
937
|
}
|
|
950
938
|
|
|
951
|
-
.tw-h-\[90px\] {
|
|
952
|
-
height: 90px;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
939
|
.tw-h-\[95px\] {
|
|
956
940
|
height: 95px;
|
|
957
941
|
}
|
|
@@ -1760,10 +1744,6 @@ video {
|
|
|
1760
1744
|
border-width: 1px;
|
|
1761
1745
|
}
|
|
1762
1746
|
|
|
1763
|
-
.tw-border-\[5px\] {
|
|
1764
|
-
border-width: 5px;
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
1747
|
.tw-border-b {
|
|
1768
1748
|
border-bottom-width: 1px;
|
|
1769
1749
|
}
|
|
@@ -1792,10 +1772,6 @@ video {
|
|
|
1792
1772
|
border-color: var(--squid-theme-grey-900);
|
|
1793
1773
|
}
|
|
1794
1774
|
|
|
1795
|
-
.tw-border-material-dark-average {
|
|
1796
|
-
border-color: var(--squid-theme-material-dark-average);
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
1775
|
.tw-border-material-light-thick {
|
|
1800
1776
|
border-color: var(--squid-theme-material-light-thick);
|
|
1801
1777
|
}
|
|
@@ -1989,10 +1965,6 @@ video {
|
|
|
1989
1965
|
padding: 0.625rem;
|
|
1990
1966
|
}
|
|
1991
1967
|
|
|
1992
|
-
.tw-p-squid-xxs {
|
|
1993
|
-
padding: 0.3125rem;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
1968
|
.\!tw-px-squid-m {
|
|
1997
1969
|
padding-left: 1.25rem !important;
|
|
1998
1970
|
padding-right: 1.25rem !important;
|
|
@@ -2296,10 +2268,18 @@ video {
|
|
|
2296
2268
|
line-height: 10px !important;
|
|
2297
2269
|
}
|
|
2298
2270
|
|
|
2271
|
+
.\!tw-leading-\[11px\] {
|
|
2272
|
+
line-height: 11px !important;
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2299
2275
|
.\!tw-leading-\[13px\] {
|
|
2300
2276
|
line-height: 13px !important;
|
|
2301
2277
|
}
|
|
2302
2278
|
|
|
2279
|
+
.\!tw-leading-\[14px\] {
|
|
2280
|
+
line-height: 14px !important;
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2303
2283
|
.\!tw-leading-\[18px\] {
|
|
2304
2284
|
line-height: 18px !important;
|
|
2305
2285
|
}
|
|
@@ -2542,6 +2522,10 @@ video {
|
|
|
2542
2522
|
transition-duration: 150ms;
|
|
2543
2523
|
}
|
|
2544
2524
|
|
|
2525
|
+
.tw-duration-100 {
|
|
2526
|
+
transition-duration: 100ms;
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2545
2529
|
.tw-duration-200 {
|
|
2546
2530
|
transition-duration: 200ms;
|
|
2547
2531
|
}
|
|
@@ -2550,6 +2534,10 @@ video {
|
|
|
2550
2534
|
transition-duration: 300ms;
|
|
2551
2535
|
}
|
|
2552
2536
|
|
|
2537
|
+
.tw-duration-\[50ms\] {
|
|
2538
|
+
transition-duration: 50ms;
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2553
2541
|
.tw-ease-in-out {
|
|
2554
2542
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
2555
2543
|
}
|
|
@@ -2603,13 +2591,15 @@ li {
|
|
|
2603
2591
|
}
|
|
2604
2592
|
|
|
2605
2593
|
button,
|
|
2606
|
-
input
|
|
2594
|
+
input,
|
|
2595
|
+
a {
|
|
2607
2596
|
outline: 2px solid transparent;
|
|
2608
2597
|
outline-offset: -1px;
|
|
2609
2598
|
}
|
|
2610
2599
|
|
|
2611
2600
|
button:focus,
|
|
2612
|
-
input:focus
|
|
2601
|
+
input:focus,
|
|
2602
|
+
a:focus {
|
|
2613
2603
|
outline-width: 2px;
|
|
2614
2604
|
outline-color: var(--squid-theme-royal-500);
|
|
2615
2605
|
}
|
|
@@ -2648,8 +2638,26 @@ input[type='number'] {
|
|
|
2648
2638
|
outline-color: var(--squid-theme-status-negative);
|
|
2649
2639
|
}
|
|
2650
2640
|
|
|
2651
|
-
|
|
2652
|
-
|
|
2641
|
+
@keyframes tw-display-delayed {
|
|
2642
|
+
0%, 90% {
|
|
2643
|
+
display: none;
|
|
2644
|
+
visibility: hidden;
|
|
2645
|
+
opacity: 0;
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
100% {
|
|
2649
|
+
display: block;
|
|
2650
|
+
visibility: visible;
|
|
2651
|
+
opacity: 1;
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
|
|
2655
|
+
.hover\:tw-animate-display-delayed:hover {
|
|
2656
|
+
animation: tw-display-delayed var(--squid-animation-display-delayed-duration) ease-out forwards;
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
.hover\:tw-bg-grey-700:hover {
|
|
2660
|
+
background-color: var(--squid-theme-grey-700);
|
|
2653
2661
|
}
|
|
2654
2662
|
|
|
2655
2663
|
.hover\:tw-bg-material-light-thin:hover {
|
|
@@ -2660,6 +2668,10 @@ input[type='number'] {
|
|
|
2660
2668
|
color: var(--squid-theme-grey-400);
|
|
2661
2669
|
}
|
|
2662
2670
|
|
|
2671
|
+
.hover\:tw-opacity-100:hover {
|
|
2672
|
+
opacity: 1;
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2663
2675
|
.focus\:tw-bg-material-light-thin:focus {
|
|
2664
2676
|
background-color: var(--squid-theme-material-light-thin);
|
|
2665
2677
|
}
|
|
@@ -2693,14 +2705,16 @@ input[type='number'] {
|
|
|
2693
2705
|
display: block;
|
|
2694
2706
|
}
|
|
2695
2707
|
|
|
2696
|
-
.tw-group\/list-item:hover .group-hover\/list-item\:tw-flex {
|
|
2697
|
-
display: flex;
|
|
2698
|
-
}
|
|
2699
|
-
|
|
2700
2708
|
.tw-group\/history-item:hover .group-hover\/history-item\:tw-hidden {
|
|
2701
2709
|
display: none;
|
|
2702
2710
|
}
|
|
2703
2711
|
|
|
2712
|
+
.tw-group\/swap-step-item-button:hover .group-hover\/swap-step-item-button\:tw-from-grey-700 {
|
|
2713
|
+
--tw-gradient-from: var(--squid-theme-grey-700) var(--tw-gradient-from-position);
|
|
2714
|
+
--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);
|
|
2715
|
+
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
2716
|
+
}
|
|
2717
|
+
|
|
2704
2718
|
.tw-group\/history-item:hover .group-hover\/history-item\:tw-opacity-0 {
|
|
2705
2719
|
opacity: 0;
|
|
2706
2720
|
}
|
|
@@ -2709,13 +2723,35 @@ input[type='number'] {
|
|
|
2709
2723
|
opacity: 1;
|
|
2710
2724
|
}
|
|
2711
2725
|
|
|
2726
|
+
.tw-group\/list-item:hover .group-hover\/list-item\:tw-opacity-100 {
|
|
2727
|
+
opacity: 1;
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
.tw-group\/list-item:focus .group-focus\/list-item\:tw-opacity-100 {
|
|
2731
|
+
opacity: 1;
|
|
2732
|
+
}
|
|
2733
|
+
|
|
2712
2734
|
.tw-group:disabled .group-disabled\:tw-grayscale {
|
|
2713
2735
|
--tw-grayscale: grayscale(100%);
|
|
2714
2736
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
2715
2737
|
}
|
|
2716
2738
|
|
|
2717
|
-
|
|
2718
|
-
|
|
2739
|
+
@keyframes tw-display-delayed {
|
|
2740
|
+
0%, 90% {
|
|
2741
|
+
display: none;
|
|
2742
|
+
visibility: hidden;
|
|
2743
|
+
opacity: 0;
|
|
2744
|
+
}
|
|
2745
|
+
|
|
2746
|
+
100% {
|
|
2747
|
+
display: block;
|
|
2748
|
+
visibility: visible;
|
|
2749
|
+
opacity: 1;
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
.tw-peer:hover ~ .peer-hover\:tw-animate-display-delayed {
|
|
2754
|
+
animation: tw-display-delayed var(--squid-animation-display-delayed-duration) ease-out forwards;
|
|
2719
2755
|
}
|
|
2720
2756
|
|
|
2721
2757
|
.tw-peer:focus ~ .peer-focus\:tw-hidden {
|
|
@@ -2753,7 +2789,7 @@ input[type='number'] {
|
|
|
2753
2789
|
}
|
|
2754
2790
|
|
|
2755
2791
|
.data-\[boost-mode\=boost\]\:tw-animate-move-to-left-with-spring-bounce[data-boost-mode=boost] {
|
|
2756
|
-
animation: tw-move-to-left-with-spring-bounce var(--
|
|
2792
|
+
animation: tw-move-to-left-with-spring-bounce var(--squid-animation-move-with-spring-bounce-duration, 0s) ease-out both;
|
|
2757
2793
|
}
|
|
2758
2794
|
|
|
2759
2795
|
@keyframes tw-move-to-right-with-spring-bounce {
|
|
@@ -2775,7 +2811,7 @@ input[type='number'] {
|
|
|
2775
2811
|
}
|
|
2776
2812
|
|
|
2777
2813
|
.data-\[boost-mode\=normal\]\:tw-animate-move-to-right-with-spring-bounce[data-boost-mode=normal] {
|
|
2778
|
-
animation: tw-move-to-right-with-spring-bounce var(--
|
|
2814
|
+
animation: tw-move-to-right-with-spring-bounce var(--squid-animation-move-with-spring-bounce-duration, 0s) ease-out both;
|
|
2779
2815
|
}
|
|
2780
2816
|
|
|
2781
2817
|
.tw-group[data-boost-mode=boost] .group-data-\[boost-mode\=boost\]\:tw-left-\[calc\(50\%-2px\)\] {
|
|
@@ -2794,6 +2830,14 @@ input[type='number'] {
|
|
|
2794
2830
|
background-image: linear-gradient(180deg, #A577D8 0%, #BF91F2 100%);
|
|
2795
2831
|
}
|
|
2796
2832
|
|
|
2833
|
+
.tw-group[data-squid-theme-type=dark] .group-data-\[squid-theme-type\=dark\]\:tw-text-grey-100 {
|
|
2834
|
+
color: var(--squid-theme-grey-100);
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
.tw-group[data-squid-theme-type=light] .group-data-\[squid-theme-type\=light\]\:tw-text-grey-900 {
|
|
2838
|
+
color: var(--squid-theme-grey-900);
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2797
2841
|
.tw-group[data-squid-theme-type=dark] .group-data-\[squid-theme-type\=dark\]\:tw-shadow-elevation-dark-2 {
|
|
2798
2842
|
--tw-shadow: 0px 2px 5px 1px rgba(0, 0, 0, 0.20), 0px 5px 20px -1px rgba(0, 0, 0, 0.33);
|
|
2799
2843
|
--tw-shadow-colored: 0px 2px 5px 1px var(--tw-shadow-color), 0px 5px 20px -1px var(--tw-shadow-color);
|
package/dist/index.d.ts
CHANGED
|
@@ -72,8 +72,9 @@ interface BoostButtonProps {
|
|
|
72
72
|
boostMode: BoostMode;
|
|
73
73
|
}) => void;
|
|
74
74
|
boostDisabledMessage?: string;
|
|
75
|
+
tooltipDisplayDelayMs?: number;
|
|
75
76
|
}
|
|
76
|
-
declare function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode, boostDisabledMessage, }: BoostButtonProps): react_jsx_runtime.JSX.Element;
|
|
77
|
+
declare function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode, boostDisabledMessage, tooltipDisplayDelayMs, }: BoostButtonProps): react_jsx_runtime.JSX.Element;
|
|
77
78
|
|
|
78
79
|
interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
79
80
|
label?: string;
|
|
@@ -81,8 +82,9 @@ interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
|
81
82
|
variant: ButtonVariant;
|
|
82
83
|
size: ButtonSize;
|
|
83
84
|
disabled?: boolean;
|
|
85
|
+
link?: string;
|
|
84
86
|
}
|
|
85
|
-
declare function Button({ label, disabled, size, variant, icon, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
87
|
+
declare function Button({ label, disabled, size, variant, icon, link, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
86
88
|
|
|
87
89
|
interface ChipProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
88
90
|
label?: string;
|
|
@@ -147,8 +149,9 @@ interface TooltipProps {
|
|
|
147
149
|
containerClassName?: string;
|
|
148
150
|
childrenClassName?: string;
|
|
149
151
|
tooltipClassName?: string;
|
|
152
|
+
displayDelayMs?: number;
|
|
150
153
|
}
|
|
151
|
-
declare function Tooltip({ children, tooltipContent, tooltipWidth, threshold, containerClassName, childrenClassName, tooltipClassName, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
154
|
+
declare function Tooltip({ children, tooltipContent, tooltipWidth, threshold, containerClassName, childrenClassName, tooltipClassName, displayDelayMs, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
152
155
|
|
|
153
156
|
interface BoostProps {
|
|
154
157
|
boostMode: BoostMode;
|
|
@@ -158,8 +161,9 @@ interface BoostProps {
|
|
|
158
161
|
estimatedTime: string;
|
|
159
162
|
boostDisabledMessage?: string;
|
|
160
163
|
canToggleBoostMode?: boolean;
|
|
164
|
+
boostTooltipDisplayDelayMs?: number;
|
|
161
165
|
}
|
|
162
|
-
declare function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode, }: BoostProps): react_jsx_runtime.JSX.Element;
|
|
166
|
+
declare function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode, boostTooltipDisplayDelayMs, }: BoostProps): react_jsx_runtime.JSX.Element;
|
|
163
167
|
|
|
164
168
|
interface DetailsToolbarProps {
|
|
165
169
|
errorMessage?: string;
|
|
@@ -179,8 +183,9 @@ interface DetailsToolbarProps {
|
|
|
179
183
|
label: string;
|
|
180
184
|
onClick: () => void;
|
|
181
185
|
};
|
|
186
|
+
boostTooltipDisplayDelayMs?: number;
|
|
182
187
|
}
|
|
183
|
-
declare function DetailsToolbar({ errorMessage, boostMode, onToggleBoostMode, onInvertSwapButtonClick, onFeeButtonClick, feeInUsd, estimatedTime, canToggleBoostMode, boostDisabledMessage, helpButton, isLoading, isEmpty, }: DetailsToolbarProps): react_jsx_runtime.JSX.Element;
|
|
188
|
+
declare function DetailsToolbar({ errorMessage, boostMode, onToggleBoostMode, onInvertSwapButtonClick, onFeeButtonClick, feeInUsd, estimatedTime, canToggleBoostMode, boostDisabledMessage, helpButton, isLoading, isEmpty, boostTooltipDisplayDelayMs, }: DetailsToolbarProps): react_jsx_runtime.JSX.Element;
|
|
184
189
|
|
|
185
190
|
interface DropdownMenuItemProps {
|
|
186
191
|
label: string;
|
|
@@ -206,7 +211,7 @@ interface HistoryItemProps {
|
|
|
206
211
|
}
|
|
207
212
|
declare function HistoryItem({ firstImageUrl, secondImageUrl, isPending, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, pendingLabel, dropdownMenuItems, itemsContainerRef, }: HistoryItemProps): react_jsx_runtime.JSX.Element;
|
|
208
213
|
|
|
209
|
-
interface ListItemProps extends React.HTMLAttributes<
|
|
214
|
+
interface ListItemProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
210
215
|
itemTitle: string | React.ReactNode;
|
|
211
216
|
mainImageUrl?: string;
|
|
212
217
|
secondaryImageUrl?: string;
|
|
@@ -466,7 +471,7 @@ type SquidTheme = {
|
|
|
466
471
|
};
|
|
467
472
|
|
|
468
473
|
declare function SquidConfigProvider({ theme, children, themeType, }: {
|
|
469
|
-
theme
|
|
474
|
+
theme?: SquidTheme;
|
|
470
475
|
children?: React.ReactNode;
|
|
471
476
|
themeType?: ThemeType;
|
|
472
477
|
}): react_jsx_runtime.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function ProfileView(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function ProfileView(): import("react/jsx-runtime").JSX.Element;
|