@0xsquid/ui 0.10.2 → 0.11.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 +85 -40
- package/dist/cjs/types/components/buttons/SettingsButton.d.ts +2 -1
- package/dist/cjs/types/components/controls/SettingsSlider.d.ts +5 -2
- package/dist/cjs/types/components/icons/EmojiSad.d.ts +3 -1
- package/dist/cjs/types/components/icons/Loader.d.ts +2 -1
- package/dist/cjs/types/components/layout/ProductCard.d.ts +4 -0
- package/dist/cjs/types/components/lists/HistoryItem.d.ts +3 -3
- package/dist/cjs/types/components/lists/SettingsItem.d.ts +9 -7
- package/dist/cjs/types/components/views/MainView.d.ts +0 -4
- package/dist/cjs/types/stories/badges/BadgeImage.stories.d.ts +11 -0
- package/dist/cjs/types/stories/badges/LoadingSkeleton.stories.d.ts +6 -0
- package/dist/cjs/types/stories/layout/SwapConfiguration.stories.d.ts +2 -2
- package/dist/cjs/types/stories/lists/HistoryItem.stories.d.ts +2 -1
- package/dist/esm/index.js +85 -41
- package/dist/esm/types/components/buttons/SettingsButton.d.ts +2 -1
- package/dist/esm/types/components/controls/SettingsSlider.d.ts +5 -2
- package/dist/esm/types/components/icons/EmojiSad.d.ts +3 -1
- package/dist/esm/types/components/icons/Loader.d.ts +2 -1
- package/dist/esm/types/components/layout/ProductCard.d.ts +4 -0
- package/dist/esm/types/components/lists/HistoryItem.d.ts +3 -3
- package/dist/esm/types/components/lists/SettingsItem.d.ts +9 -7
- package/dist/esm/types/components/views/MainView.d.ts +0 -4
- package/dist/esm/types/stories/badges/BadgeImage.stories.d.ts +11 -0
- package/dist/esm/types/stories/badges/LoadingSkeleton.stories.d.ts +6 -0
- package/dist/esm/types/stories/layout/SwapConfiguration.stories.d.ts +2 -2
- package/dist/esm/types/stories/lists/HistoryItem.stories.d.ts +2 -1
- package/dist/index.css +86 -13
- package/dist/index.d.ts +24 -14
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -2564,7 +2564,7 @@ function BadgeImage({ imageUrl, badgeUrl, size = 'sm', extraMarginForBadge, roun
|
|
|
2564
2564
|
}
|
|
2565
2565
|
|
|
2566
2566
|
function LoadingSkeleton({ className, height = '20', }) {
|
|
2567
|
-
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "100", height: height, viewBox: "0 0 100 20", fill: "none", className: className, children: [jsxRuntime.
|
|
2567
|
+
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "100", height: height, viewBox: "0 0 100 20", fill: "none", className: className, children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_1246_29063)", children: jsxRuntime.jsx("rect", { width: "100", height: "20", fill: "url(#paint0_linear_1246_29063)" }) }), jsxRuntime.jsxs("defs", { children: [jsxRuntime.jsxs("linearGradient", { id: "paint0_linear_1246_29063", x1: "0", y1: "10", x2: "100", y2: "10", gradientUnits: "userSpaceOnUse", className: "tw-animate-loading-gradient tw-text-material-light-thin", children: [jsxRuntime.jsx("stop", { "stop-color": "currentColor" }), jsxRuntime.jsx("stop", { offset: "0.395881", "stop-color": "currentColor" }), jsxRuntime.jsx("stop", { offset: "0.597867", "stop-color": "currentColor", className: "group-data-[squid-theme-type=dark]:tw-text-material-light-average group-data-[squid-theme-type=light]:tw-text-transparent" }), jsxRuntime.jsx("stop", { offset: "0.697004", "stop-color": "currentColor" })] }), jsxRuntime.jsx("clipPath", { id: "clip0_1246_29063", children: jsxRuntime.jsx("path", { d: "M0 10C0 4.47715 4.47715 0 10 0H90C95.5228 0 100 4.47715 100 10C100 15.5228 95.5229 20 90 20H10C4.47716 20 0 15.5228 0 10Z", fill: "white" }) })] }), ' '] }));
|
|
2568
2568
|
}
|
|
2569
2569
|
|
|
2570
2570
|
/******************************************************************************
|
|
@@ -2627,10 +2627,31 @@ function BodyText(_a) {
|
|
|
2627
2627
|
return (jsxRuntime.jsx("span", Object.assign({}, props, { className: cn(textClassMap$1[size], fontWeightClass, props.className), children: children })));
|
|
2628
2628
|
}
|
|
2629
2629
|
|
|
2630
|
-
function Loader({ size = '24' }) {
|
|
2631
|
-
return (
|
|
2632
|
-
|
|
2633
|
-
|
|
2630
|
+
function Loader({ size = '24', strokeWidth = '1' }) {
|
|
2631
|
+
return (jsxRuntime.jsxs("svg", { className: "squid-animated-loader", xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: [jsxRuntime.jsx("style", { children: `
|
|
2632
|
+
.squid-animated-loader-dash {
|
|
2633
|
+
animation: squid-animated-loader-dash-grow 0.5s infinite alternate;
|
|
2634
|
+
}
|
|
2635
|
+
@keyframes squid-animated-loader-dash-grow {
|
|
2636
|
+
0% {
|
|
2637
|
+
stroke-dasharray: 10, 5;
|
|
2638
|
+
}
|
|
2639
|
+
100% {
|
|
2640
|
+
stroke-dasharray: 5, 20;
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
@keyframes squid-animated-loader-rotate {
|
|
2644
|
+
from {
|
|
2645
|
+
transform: rotate(0deg);
|
|
2646
|
+
}
|
|
2647
|
+
to {
|
|
2648
|
+
transform: rotate(-360deg);
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
.squid-animated-loader {
|
|
2652
|
+
animation: squid-animated-loader-rotate 1s linear infinite;
|
|
2653
|
+
transform-origin: center;
|
|
2654
|
+
}` }), jsxRuntime.jsxs("g", { "clip-path": "url(#clip0_1387_2296)", children: [jsxRuntime.jsx("circle", { cx: "7.99967", cy: "8.00004", r: "6.66667", stroke: "currentColor", className: "group-data-[squid-theme-type=dark]:tw-text-material-light-thin group-data-[squid-theme-type=light]:tw-text-material-dark-thin", "stroke-width": strokeWidth }), jsxRuntime.jsx("path", { className: "squid-animated-loader-dash group-data-[squid-theme-type=dark]:tw-text-material-light-thick group-data-[squid-theme-type=light]:tw-text-material-dark-thick", d: "M14.6663 8.00004C14.6663 7.12456 14.4939 6.25766 14.1589 5.44882C13.8238 4.63998 13.3328 3.90505 12.7137 3.286C12.0947 2.66694 11.3597 2.17588 10.5509 1.84084C9.74206 1.50581 8.87515 1.33337 7.99967 1.33337", stroke: "currentColor", "stroke-width": strokeWidth, "stroke-linecap": "round" })] }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_1387_2296", children: jsxRuntime.jsx("rect", { width: "16", height: "16", fill: "white" }) }) })] }));
|
|
2634
2655
|
}
|
|
2635
2656
|
|
|
2636
2657
|
function AddressButton(_a) {
|
|
@@ -2924,12 +2945,12 @@ function HeadingText({ children, bold, size }) {
|
|
|
2924
2945
|
return (jsxRuntime.jsx("h6", { className: clsx(textClassMap[size], fontWeightClass), children: children }));
|
|
2925
2946
|
}
|
|
2926
2947
|
|
|
2927
|
-
function SettingsSlider({ value, type, onChange }) {
|
|
2928
|
-
return (jsxRuntime.jsxs("div", { className: "tw-relative tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs", children: [jsxRuntime.jsx("input", { min: 0, max: 99, placeholder: "0", type: "number", onChange: (e) => {
|
|
2929
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
|
|
2948
|
+
function SettingsSlider({ value, type, onChange, hasDecimals, max, min, }) {
|
|
2949
|
+
return (jsxRuntime.jsxs("div", { className: "tw-relative tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs", children: [jsxRuntime.jsx("input", { min: min !== null && min !== void 0 ? min : 0, max: max !== null && max !== void 0 ? max : 99, step: hasDecimals ? 0.1 : 1, placeholder: "0", type: "number", onChange: (e) => {
|
|
2950
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(Number(e.target.value));
|
|
2930
2951
|
}, className: cn('tw-relative tw-flex tw-h-full tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-bg-transparent tw-p-squid-xs tw-text-caption !tw-font-medium tw-leading-[10px] tw-text-grey-300 placeholder-shown:tw-text-grey-600 hover:tw-bg-material-light-thin focus:tw-bg-material-light-thin', type === 'percentage'
|
|
2931
|
-
? 'tw-w-[
|
|
2932
|
-
: 'tw-w-[
|
|
2952
|
+
? 'tw-w-[84px] tw-pr-[52px] tw-text-right'
|
|
2953
|
+
: 'tw-w-[80px] tw-pl-[20px] tw-pr-[32px] tw-text-left'), value: value }), type === 'percentage' && jsxRuntime.jsx(PercentageDecorator, {}), type === 'amount' && jsxRuntime.jsx(AmountDecorator, {})] }));
|
|
2933
2954
|
}
|
|
2934
2955
|
function PercentageDecorator() {
|
|
2935
2956
|
return (jsxRuntime.jsxs("div", { className: "tw-absolute tw-right-squid-xs tw-flex tw-items-center tw-justify-center tw-gap-squid-xs !tw-font-medium tw-leading-[10px]", children: [jsxRuntime.jsx(CaptionText, { className: "tw-translate-y-[0.5px] !tw-font-medium !tw-leading-[10px] tw-text-grey-300", children: "%" }), jsxRuntime.jsx(Chip, { icon: jsxRuntime.jsx(ChevronGrabberVerticalIcon, { className: "tw-text-grey-900" }) })] }));
|
|
@@ -2962,7 +2983,7 @@ function Switch({ checked = false, onChange, size, disabled = false, }) {
|
|
|
2962
2983
|
switchCircleSizeClassMap[size],
|
|
2963
2984
|
// disabled and checked styles
|
|
2964
2985
|
checked
|
|
2965
|
-
? 'tw-translate-x-0 tw-bg-[
|
|
2986
|
+
? 'tw-translate-x-0 group-data-[squid-theme-type=dark]:tw-bg-grey-100 group-data-[squid-theme-type=light]:tw-bg-grey-900'
|
|
2966
2987
|
: '-tw-translate-x-full tw-bg-grey-500') })] }));
|
|
2967
2988
|
}
|
|
2968
2989
|
|
|
@@ -3081,8 +3102,8 @@ function FeeButton(_a) {
|
|
|
3081
3102
|
return (jsxRuntime.jsxs("button", Object.assign({}, props, { className: cn('tw-flex tw-h-squid-xl tw-w-full tw-items-center tw-gap-x-squid-xs tw-rounded-squid-m tw-px-squid-xs hover:tw-bg-material-light-thin', className), children: [jsxRuntime.jsx(Chip, { label: chipLabel }), jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsxRuntime.jsx(Chip, { icon: jsxRuntime.jsx(EthereumIcon, {}) }), jsxRuntime.jsx(UsdAmount, { usdAmount: feeInUsd })] })] })));
|
|
3082
3103
|
}
|
|
3083
3104
|
|
|
3084
|
-
function SettingsButton({ label, isSelected = false, }) {
|
|
3085
|
-
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 }) }));
|
|
3105
|
+
function SettingsButton({ label, isSelected = false, onClick, }) {
|
|
3106
|
+
return (jsxRuntime.jsx("button", { onClick: onClick, 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 }) }));
|
|
3086
3107
|
}
|
|
3087
3108
|
|
|
3088
3109
|
function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode = true, boostTooltipDisplayDelayMs = 0, }) {
|
|
@@ -3091,8 +3112,8 @@ function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessa
|
|
|
3091
3112
|
: 'tw-bg-status-positive') })] }));
|
|
3092
3113
|
}
|
|
3093
3114
|
|
|
3094
|
-
function EmojiSadIcon() {
|
|
3095
|
-
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20ZM13.5341 12.4645C11.5815 10.5118 8.41568 10.5118 6.46306 12.4645C6.07254 12.855 6.07254 13.4882 6.46306 13.8787C6.85358 14.2692 7.48675 14.2692 7.87727 13.8787C9.04885 12.7071 10.9483 12.7071 12.1199 13.8787C12.5104 14.2692 13.1436 14.2692 13.5341 13.8787C13.9247 13.4882 13.9247 12.855 13.5341 12.4645ZM8.5 7.5C8.5 8.32843 7.94036 9 7.25 9C6.55964 9 6 8.32843 6 7.5C6 6.67157 6.55964 6 7.25 6C7.94036 6 8.5 6.67157 8.5 7.5ZM12.75 9C13.4404 9 14 8.32843 14 7.5C14 6.67157 13.4404 6 12.75 6C12.0596 6 11.5 6.67157 11.5 7.5C11.5 8.32843 12.0596 9 12.75 9Z", fill: "currentColor" }) }));
|
|
3115
|
+
function EmojiSadIcon({ className }) {
|
|
3116
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", className: className, children: jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20ZM13.5341 12.4645C11.5815 10.5118 8.41568 10.5118 6.46306 12.4645C6.07254 12.855 6.07254 13.4882 6.46306 13.8787C6.85358 14.2692 7.48675 14.2692 7.87727 13.8787C9.04885 12.7071 10.9483 12.7071 12.1199 13.8787C12.5104 14.2692 13.1436 14.2692 13.5341 13.8787C13.9247 13.4882 13.9247 12.855 13.5341 12.4645ZM8.5 7.5C8.5 8.32843 7.94036 9 7.25 9C6.55964 9 6 8.32843 6 7.5C6 6.67157 6.55964 6 7.25 6C7.94036 6 8.5 6.67157 8.5 7.5ZM12.75 9C13.4404 9 14 8.32843 14 7.5C14 6.67157 13.4404 6 12.75 6C12.0596 6 11.5 6.67157 11.5 7.5C11.5 8.32843 12.0596 9 12.75 9Z", fill: "currentColor" }) }));
|
|
3096
3117
|
}
|
|
3097
3118
|
|
|
3098
3119
|
function ErrorMessage({ message, showIcon = true }) {
|
|
@@ -3116,7 +3137,7 @@ function DetailsToolbar({ errorMessage, boostMode = 'normal', onToggleBoostMode,
|
|
|
3116
3137
|
return 'full';
|
|
3117
3138
|
}, [errorMessage, isLoading, isEmpty]);
|
|
3118
3139
|
const detailClassName = cn('tw-w-[190px]', detailStateClassMap[state]);
|
|
3119
|
-
return (jsxRuntime.jsx("aside", { className: cn('tw-h-
|
|
3140
|
+
return (jsxRuntime.jsx("aside", { className: cn('tw-flex tw-h-[50px] tw-w-[480px] tw-items-center tw-justify-around tw-border-t tw-border-t-material-light-thin 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 }) })] })) }));
|
|
3120
3141
|
}
|
|
3121
3142
|
|
|
3122
3143
|
function DropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, }) {
|
|
@@ -3166,11 +3187,46 @@ const dropdownPositionClassMap = {
|
|
|
3166
3187
|
bottom: 'tw-right-[calc(100%-10px)] tw-top-7',
|
|
3167
3188
|
center: 'tw-right-[40px] -tw-top-[55px]',
|
|
3168
3189
|
};
|
|
3169
|
-
|
|
3190
|
+
const statusBadge = {
|
|
3191
|
+
completed: {},
|
|
3192
|
+
pending: {
|
|
3193
|
+
badge: jsxRuntime.jsx(Loader, { size: "16", strokeWidth: "2" }),
|
|
3194
|
+
containerClassName: 'tw-bg-royal-400',
|
|
3195
|
+
},
|
|
3196
|
+
failed: {
|
|
3197
|
+
badge: (jsxRuntime.jsx("span", { className: "group-data-[squid-theme-type=dark]:tw-bg-grey-100 group-data-[squid-theme-type=light]:tw-bg-grey-900", children: jsxRuntime.jsx(EmojiSadIcon, { className: "tw-text-status-negative" }) })),
|
|
3198
|
+
containerClassName: 'tw-bg-status-negative',
|
|
3199
|
+
},
|
|
3200
|
+
};
|
|
3201
|
+
function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuItems, itemsContainerRef, status, }) {
|
|
3170
3202
|
const { isDropdownOpen, dropdownRef, openDropdownButtonRef, openDropdown } = useDropdownMenu();
|
|
3171
3203
|
const [dropdownPosition, setDropdownPosition] = react.useState(null);
|
|
3172
3204
|
const itemRef = react.useRef(null);
|
|
3173
3205
|
const menuRef = react.useRef(null);
|
|
3206
|
+
const statusInfo = react.useMemo(() => {
|
|
3207
|
+
switch (status) {
|
|
3208
|
+
case 'completed':
|
|
3209
|
+
return {
|
|
3210
|
+
label: dateCompleted,
|
|
3211
|
+
className: '',
|
|
3212
|
+
};
|
|
3213
|
+
case 'pending':
|
|
3214
|
+
return {
|
|
3215
|
+
label: 'Pending',
|
|
3216
|
+
className: 'tw-text-royal-400',
|
|
3217
|
+
};
|
|
3218
|
+
case 'failed':
|
|
3219
|
+
return {
|
|
3220
|
+
label: 'Failed',
|
|
3221
|
+
className: 'tw-text-status-negative',
|
|
3222
|
+
};
|
|
3223
|
+
default:
|
|
3224
|
+
return {
|
|
3225
|
+
label: '',
|
|
3226
|
+
className: '',
|
|
3227
|
+
};
|
|
3228
|
+
}
|
|
3229
|
+
}, [status, dateCompleted]);
|
|
3174
3230
|
// Effect to find the best position for the dropdown menu, so it's always visible for the user
|
|
3175
3231
|
react.useEffect(() => {
|
|
3176
3232
|
var _a;
|
|
@@ -3215,8 +3271,8 @@ function HistoryItem({ firstImageUrl, secondImageUrl, isPending, dateCompleted,
|
|
|
3215
3271
|
setDropdownPosition('top');
|
|
3216
3272
|
}
|
|
3217
3273
|
}, [isDropdownOpen, menuRef, dropdownPosition, itemRef]);
|
|
3218
|
-
return (jsxRuntime.jsx("li", { ref: itemRef, className: "tw-h-list-item-large tw-min-w-list-item-small tw-self-stretch tw-bg-grey-900 tw-px-squid-xs tw-text-grey-300", children: jsxRuntime.jsxs("div", { className: "tw-group/history-item tw-relative tw-flex tw-flex-shrink-0 tw-cursor-pointer tw-items-center tw-gap-squid-xs tw-self-stretch tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs hover:tw-bg-material-light-thin", children: [jsxRuntime.jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [
|
|
3219
|
-
'tw-transition-opacity group-hover/history-item:tw-hidden group-hover/history-item:tw-opacity-0 peer-focus:tw-hidden peer-focus:tw-opacity-0'), children:
|
|
3274
|
+
return (jsxRuntime.jsx("li", { ref: itemRef, className: "tw-h-list-item-large tw-min-w-list-item-small tw-self-stretch tw-bg-grey-900 tw-px-squid-xs tw-text-grey-300", children: jsxRuntime.jsxs("div", { className: "tw-group/history-item tw-relative tw-flex tw-flex-shrink-0 tw-cursor-pointer tw-items-center tw-gap-squid-xs tw-self-stretch tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs hover:tw-bg-material-light-thin", children: [jsxRuntime.jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [!!statusBadge[status].badge && (jsxRuntime.jsx("span", { className: cn('tw-absolute -tw-left-[5px] tw-bottom-0 tw-z-30 tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-center tw-overflow-hidden tw-rounded-full tw-border tw-border-grey-900 tw-p-0.5', statusBadge[status].containerClassName), children: statusBadge[status].badge })), jsxRuntime.jsx("img", { src: firstImageUrl, className: "tw-absolute tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" }), jsxRuntime.jsx("img", { src: secondImageUrl, className: "tw-absolute tw-left-5 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-10 tw-flex-1 tw-flex-col tw-self-stretch", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-justify-between tw-text-grey-500", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center", children: [jsxRuntime.jsx(CaptionText, { children: fromLabel }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronRightSmallIcon, {}) }), jsxRuntime.jsx(CaptionText, { children: toLabel })] }), !!dropdownMenuItems && (jsxRuntime.jsx("button", { className: "tw-peer tw-absolute tw-right-squid-xxs tw-top-squid-xxs tw-flex tw-h-squid-xl tw-w-squid-xl tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-material-light-thin tw-p-2 tw-text-grey-300 tw-opacity-0 tw-transition-opacity focus:tw-opacity-100 group-hover/history-item:tw-opacity-100", onClick: openDropdown, ref: openDropdownButtonRef, children: jsxRuntime.jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })), jsxRuntime.jsx("div", { className: cn(!!dropdownMenuItems &&
|
|
3275
|
+
'tw-transition-opacity group-hover/history-item:tw-hidden group-hover/history-item:tw-opacity-0 peer-focus:tw-hidden peer-focus:tw-opacity-0'), children: statusInfo.label && (jsxRuntime.jsx(CaptionText, { className: statusInfo.className, children: statusInfo.label })) })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx(BodyText, { size: "small", children: fromAmount }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), jsxRuntime.jsx(BodyText, { size: "small", children: toAmount })] })] }), isDropdownOpen && !!dropdownMenuItems ? (jsxRuntime.jsx(DropdownMenu, { menuRef: menuRef,
|
|
3220
3276
|
// only show dropdown menu if there is a position defined for it
|
|
3221
3277
|
isHidden: !dropdownPosition, className: cn(!!dropdownPosition && dropdownPositionClassMap[dropdownPosition]), dropdownRef: dropdownRef, items: dropdownMenuItems })) : null] }) }));
|
|
3222
3278
|
}
|
|
@@ -3253,7 +3309,7 @@ function HelpIcon({ size = '20', className, }) {
|
|
|
3253
3309
|
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_457_36778)", children: jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10ZM6 7C6 4.46214 8.03736 3 10 3C12.1193 3 14 4.66531 14 7C14 7.93746 13.7596 8.6603 13.368 9.2586C13.0353 9.76679 12.6034 10.1601 12.2697 10.4639L12.1757 10.5497C11.8041 10.8904 11.534 11.1593 11.337 11.504C11.1513 11.8288 11 12.2794 11 13C11 13.5523 10.5523 14 10 14C9.44772 14 9 13.5523 9 13C9 11.9706 9.22366 11.1712 9.60051 10.5117C9.96604 9.87199 10.4459 9.42214 10.8243 9.07535L10.8834 9.02116L10.8834 9.02116L10.8834 9.02115C11.2572 8.67885 11.5066 8.45039 11.6945 8.16328C11.8654 7.9022 12 7.56254 12 7C12 5.83469 11.0807 5 10 5C8.96264 5 8 5.73786 8 7C8 7.55228 7.55228 8 7 8C6.44772 8 6 7.55228 6 7ZM10 15C9.44771 15 9 15.4477 9 16C9 16.5523 9.44771 17 10 17C10.5523 17 11 16.5523 11 16C11 15.4477 10.5523 15 10 15Z", fill: "currentColor" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_457_36778", children: jsxRuntime.jsx("rect", { width: "20", height: "20", fill: "white" }) }) })] }));
|
|
3254
3310
|
}
|
|
3255
3311
|
|
|
3256
|
-
function SettingsItem({ icon, label,
|
|
3312
|
+
function SettingsItem({ icon, label, control, link, transparent = false, helpTooltip, }) {
|
|
3257
3313
|
const ContentTag = link ? 'a' : 'div';
|
|
3258
3314
|
const contentTagProps = link
|
|
3259
3315
|
? {
|
|
@@ -3262,25 +3318,10 @@ function SettingsItem({ icon, label, controls = [], link, transparent = false, h
|
|
|
3262
3318
|
}
|
|
3263
3319
|
: {};
|
|
3264
3320
|
const helpIcon = !!helpTooltip && (jsxRuntime.jsx(HelpIcon, { className: cn('tw-text-grey-600', 'tw-cursor-help tw-transition-colors tw-duration-200 hover:tw-text-grey-400') }));
|
|
3265
|
-
const showDetailsBorder =
|
|
3266
|
-
!link &&
|
|
3267
|
-
!controls.some((control) => control.type === 'switch');
|
|
3321
|
+
const showDetailsBorder = !!control && !link && !(control.type === 'switch');
|
|
3268
3322
|
return (jsxRuntime.jsx("li", { className: cn('tw-h-[50px] tw-self-stretch tw-px-squid-xs', transparent ? 'tw-bg-transparent' : 'tw-bg-grey-800'), children: jsxRuntime.jsxs(ContentTag, Object.assign({ className: cn('tw-flex tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xs tw-text-grey-300', link && 'hover:tw-bg-material-light-thin') }, contentTagProps, { children: [icon, jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-1 tw-items-center tw-gap-squid-xxs tw-self-stretch", children: [jsxRuntime.jsx(BodyText, { size: "small", children: label }), helpTooltip ? (jsxRuntime.jsx(Tooltip, Object.assign({}, helpTooltip, { children: helpIcon }))) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: helpIcon }))] }), jsxRuntime.jsx("div", { className: cn('tw-flex tw-h-squid-l tw-items-center tw-justify-center tw-rounded-squid-xs', showDetailsBorder &&
|
|
3269
|
-
'tw-rounded-squid-xs tw-border tw-border-solid tw-border-material-light-thin tw-bg-material-dark-thin'), children: !!link ? (jsxRuntime.jsx(SquareArrowTopRight2Icon, { className: "tw-text-material-light-average" })) : (
|
|
3270
|
-
|
|
3271
|
-
const switchControl = (jsxRuntime.jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }, index));
|
|
3272
|
-
if (control.tooltip) {
|
|
3273
|
-
return jsxRuntime.jsx(Tooltip, Object.assign({}, control.tooltip, { children: switchControl }));
|
|
3274
|
-
}
|
|
3275
|
-
return switchControl;
|
|
3276
|
-
}
|
|
3277
|
-
if (control.type === 'percentage') {
|
|
3278
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SettingsButton, { label: control.resetValueControl.label, isSelected: control.resetValueControl.isSelected }), jsxRuntime.jsx(SettingsSlider, { value: control.value, type: "percentage" })] }));
|
|
3279
|
-
}
|
|
3280
|
-
if (control.type === 'amount') {
|
|
3281
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SettingsButton, { label: control.resetValueControl.label, isSelected: control.resetValueControl.isSelected }), control.options.map(({ value, isSelected }, index, _controls) => (jsxRuntime.jsx(SettingsButton, { label: '$' + value, isSelected: isSelected }, index))), jsxRuntime.jsx(SettingsSlider, { type: control.type, value: 0 })] }));
|
|
3282
|
-
}
|
|
3283
|
-
})) })] })) }));
|
|
3323
|
+
'tw-rounded-squid-xs tw-border tw-border-solid tw-border-material-light-thin tw-bg-material-dark-thin'), children: !!link ? (jsxRuntime.jsx(SquareArrowTopRight2Icon, { className: "tw-text-material-light-average" })) : (!!control && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [control.type === 'amount' && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SettingsButton, { onClick: () => control.onChange(control.resetValueControl.value), label: control.resetValueControl.label, isSelected: control.resetValueControl.value === control.value }), control.options.map(({ value }, index, _controls) => (jsxRuntime.jsx(SettingsButton, { label: '$' + value, isSelected: control.value === value, onClick: () => control.onChange(value) }, index))), jsxRuntime.jsx(SettingsSlider, { type: control.type, value: control.value, onChange: control.onChange, hasDecimals: false, max: 999 })] })), control.type === 'switch' &&
|
|
3324
|
+
(control.tooltip ? (jsxRuntime.jsx(Tooltip, Object.assign({}, control.tooltip, { children: jsxRuntime.jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }) }))) : (jsxRuntime.jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }))), control.type === 'percentage' && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SettingsButton, { label: control.resetValueControl.label, isSelected: control.resetValueControl.value === control.value, onClick: control.resetValueControl.onSelect }), jsxRuntime.jsx(SettingsSlider, { onChange: control.onChange, value: control.value, type: "percentage", hasDecimals: control.hasDecimals, max: control.max, min: control.min })] }))] }))) })] })) }));
|
|
3284
3325
|
}
|
|
3285
3326
|
|
|
3286
3327
|
function SwapDetailListItem({ label, detail, icon, isLoading = false, }) {
|
|
@@ -3379,7 +3420,10 @@ function NavigationBar({ title, displayBackButton = false, logoUrl, transparent
|
|
|
3379
3420
|
}
|
|
3380
3421
|
|
|
3381
3422
|
function ProductCard({ children }) {
|
|
3382
|
-
return (jsxRuntime.jsx("div", { className: "tw-h-card tw-min-h-card tw-w-card tw-rounded-squid-xl tw-border-[1px] tw-border-solid tw-border-material-light-thick tw-bg-material-light-thick tw-p-squid-xs tw-backdrop-blur/10 tw-backdrop-saturate-150", children: jsxRuntime.jsx("div", { className: "tw-relative tw-flex tw-h-
|
|
3423
|
+
return (jsxRuntime.jsx("div", { className: "tw-h-card tw-min-h-card tw-w-card tw-rounded-squid-xl tw-border-[1px] tw-border-solid tw-border-material-light-thick tw-bg-material-light-thick tw-p-squid-xs tw-backdrop-blur/10 tw-backdrop-saturate-150", children: jsxRuntime.jsx("div", { className: "tw-relative tw-flex tw-h-[660px] tw-w-full tw-flex-col tw-overflow-hidden tw-rounded-squid-l tw-bg-grey-900 tw-text-grey-300", children: children }) }));
|
|
3424
|
+
}
|
|
3425
|
+
function BorderedContainer({ children, className, }) {
|
|
3426
|
+
return (jsxRuntime.jsx("section", { className: cn('tw-border-t tw-border-t-material-light-thin', className), children: children }));
|
|
3383
3427
|
}
|
|
3384
3428
|
|
|
3385
3429
|
function SquidLogo() {
|
|
@@ -3416,7 +3460,7 @@ function SwapConfiguration({ priceImpactPercentage, amount, forcedAmount, swapAm
|
|
|
3416
3460
|
const BalanceChipTag = isBalanceChipInteractive ? 'button' : 'div';
|
|
3417
3461
|
const isSwapAmountChipInteractive = !!onSwapAmountButtonClick;
|
|
3418
3462
|
const SwapAmountChipTag = isSwapAmountChipInteractive ? 'button' : 'div';
|
|
3419
|
-
return (jsxRuntime.jsxs("section", { className: "tw-h-[205px] tw-max-h-[205px] tw-bg-grey-900 tw-pb-squid-m", children: [jsxRuntime.jsx("header", { className: "tw-flex tw-items-center tw-gap-1 tw-px-squid-l tw-py-squid-xs tw-leading-5 tw-text-grey-300", children: jsxRuntime.jsxs("button", { onClick: onWalletButtonClick, className: "-tw-ml-squid-xs tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-s tw-px-squid-xs tw-text-grey-600 hover:tw-bg-material-light-thin", children: [jsxRuntime.jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === 'from' ? 'Pay' : 'Receive' }), jsxRuntime.jsx(BodyText, { size: "small", children: ":" }), jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsxRuntime.jsx(BodyText, { size: "small", className: address ? 'tw-text-grey-300' : 'tw-text-royal-400', children: address ? address : emptyAddressLabel }), jsxRuntime.jsx(ChevronArrowIcon, { className: address ? 'tw-text-grey-600' : 'tw-text-royal-400' })] })] }) }), jsxRuntime.jsx("div", { className: "tw-px-squid-l", children: jsxRuntime.jsx(AssetsButton, { onClick: onAssetsButtonClick, chainImageUrl: chain === null || chain === void 0 ? void 0 : chain.iconUrl, tokenImageUrl: token === null || token === void 0 ? void 0 : token.iconUrl, tokenSymbol: token === null || token === void 0 ? void 0 : token.symbol, chainBgColor: chain === null || chain === void 0 ? void 0 : chain.bgColor, tokenBgColor: token === null || token === void 0 ? void 0 : token.bgColor, tokenTextColor: token === null || token === void 0 ? void 0 : token.textColor }) }), direction === 'from' ? (jsxRuntime.jsx(NumericInput, { forcedUpdateValue: forcedAmount, initialValue: amount, onParsedValueChanged: (value) => onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(value) })) : (jsxRuntime.jsx("div", { className:
|
|
3463
|
+
return (jsxRuntime.jsxs("section", { className: "tw-relative tw-h-[205px] tw-max-h-[205px] tw-w-[480px] tw-overflow-hidden tw-border-t tw-border-t-material-light-thin tw-bg-grey-900 tw-pb-squid-m", children: [jsxRuntime.jsx("header", { className: "tw-flex tw-items-center tw-gap-1 tw-px-squid-l tw-py-squid-xs tw-leading-5 tw-text-grey-300", children: jsxRuntime.jsxs("button", { onClick: onWalletButtonClick, className: "-tw-ml-squid-xs tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-s tw-px-squid-xs tw-text-grey-600 hover:tw-bg-material-light-thin", children: [jsxRuntime.jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === 'from' ? 'Pay' : 'Receive' }), jsxRuntime.jsx(BodyText, { size: "small", children: ":" }), jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsxRuntime.jsx(BodyText, { size: "small", className: address ? 'tw-text-grey-300' : 'tw-text-royal-400', children: address ? address : emptyAddressLabel }), jsxRuntime.jsx(ChevronArrowIcon, { className: address ? 'tw-text-grey-600' : 'tw-text-royal-400' })] })] }) }), jsxRuntime.jsx("div", { className: "tw-px-squid-l", children: jsxRuntime.jsx(AssetsButton, { onClick: onAssetsButtonClick, chainImageUrl: chain === null || chain === void 0 ? void 0 : chain.iconUrl, tokenImageUrl: token === null || token === void 0 ? void 0 : token.iconUrl, tokenSymbol: token === null || token === void 0 ? void 0 : token.symbol, chainBgColor: chain === null || chain === void 0 ? void 0 : chain.bgColor, tokenBgColor: token === null || token === void 0 ? void 0 : token.bgColor, tokenTextColor: token === null || token === void 0 ? void 0 : token.textColor }) }), isFetching && (jsxRuntime.jsx("div", { className: "tw-absolute tw-bottom-4 tw-left-squid-l tw-z-10 tw-overflow-hidden", children: jsxRuntime.jsx("div", { className: "tw-animate-move-loading-cover-to-right tw-bg-dark-cover tw-h-[94px] tw-w-[1260px]" }) })), direction === 'from' ? (jsxRuntime.jsx(NumericInput, { forcedUpdateValue: forcedAmount, initialValue: amount, onParsedValueChanged: (value) => onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(value) })) : (jsxRuntime.jsx("div", { className: cn('tw-w-full tw-px-squid-m tw-pb-[15px] tw-pt-[5px]', isFetching && 'tw-opacity-50'), children: jsxRuntime.jsx("div", { className: "tw-flex tw-h-[55px] tw-w-full tw-items-center tw-rounded-squid-s tw-bg-transparent tw-px-squid-xs tw-py-squid-s tw-text-heading-small tw-font-heading-regular tw-text-grey-300", children: jsxRuntime.jsx("span", { children: amount }) }) })), !(token === null || token === void 0 ? void 0 : token.iconUrl) ? null : (jsxRuntime.jsxs("footer", { className: cn('tw-flex tw-h-squid-m tw-max-h-squid-m tw-items-center tw-justify-between tw-gap-2 tw-px-squid-m tw-text-grey-500', isFetching && 'tw-opacity-50'), children: [error ? (jsxRuntime.jsx("div", { className: "tw-px-squid-xs", children: jsxRuntime.jsx(ErrorMessage, { message: error.message }) })) : (jsxRuntime.jsxs(SwapAmountChipTag, { onClick: onSwapAmountButtonClick, className: cn('tw-flex tw-h-squid-l tw-items-center tw-gap-1.5 tw-rounded-squid-s tw-px-squid-xs', isSwapAmountChipInteractive && interactiveChipClassName), children: [jsxRuntime.jsx(SwapInputsIcon, {}), jsxRuntime.jsx(UsdAmount, { usdAmount: swapAmountUsd }), priceImpactPercentage && direction === 'to' ? (jsxRuntime.jsxs("span", { className: clsx('tw-flex tw-items-center', priceImpactClass), children: [jsxRuntime.jsx(ArrowTriangle, {}), jsxRuntime.jsx(CaptionText, { bold: true, children: priceImpactPercentage.toString().concat('%') })] })) : null] })), jsxRuntime.jsxs(BalanceChipTag, { onClick: onBalanceButtonClick, className: cn('tw-flex tw-h-squid-l tw-items-center tw-gap-1.5 tw-rounded-squid-s tw-px-squid-xs', isBalanceChipInteractive && interactiveChipClassName), children: [jsxRuntime.jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsxRuntime.jsx(CaptionText, { children: balance }), jsxRuntime.jsx(MaxIcon, {})] })] }))] }));
|
|
3420
3464
|
}
|
|
3421
3465
|
|
|
3422
3466
|
function SwapProgressViewHeader({ title, description, }) {
|
|
@@ -3612,6 +3656,7 @@ exports.BadgeImage = BadgeImage;
|
|
|
3612
3656
|
exports.BodyText = BodyText;
|
|
3613
3657
|
exports.Boost = Boost;
|
|
3614
3658
|
exports.BoostButton = BoostButton;
|
|
3659
|
+
exports.BorderedContainer = BorderedContainer;
|
|
3615
3660
|
exports.Button = Button;
|
|
3616
3661
|
exports.CaptionText = CaptionText;
|
|
3617
3662
|
exports.Chip = Chip;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface SettingsButtonProps {
|
|
2
2
|
label: string;
|
|
3
3
|
isSelected?: boolean;
|
|
4
|
+
onClick?: () => void;
|
|
4
5
|
}
|
|
5
|
-
export declare function SettingsButton({ label, isSelected, }: SettingsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function SettingsButton({ label, isSelected, onClick, }: SettingsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export interface SettingsSliderProps {
|
|
2
2
|
value: number;
|
|
3
3
|
type: 'percentage' | 'amount';
|
|
4
|
-
onChange?: (value:
|
|
4
|
+
onChange?: (value: number) => void;
|
|
5
|
+
hasDecimals?: boolean;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
5
8
|
}
|
|
6
|
-
export declare function SettingsSlider({ value, type, onChange }: SettingsSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function SettingsSlider({ value, type, onChange, hasDecimals, max, min, }: SettingsSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
interface LoaderProps {
|
|
2
2
|
size?: string;
|
|
3
|
+
strokeWidth?: string;
|
|
3
4
|
}
|
|
4
|
-
export declare function Loader({ size }: LoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function Loader({ size, strokeWidth }: LoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare function ProductCard({ children }: React.PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function BorderedContainer({ children, className, }: {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DropdownMenuItemProps } from './DropdownMenuItem';
|
|
3
|
+
type HistoryItemStatus = 'completed' | 'pending' | 'failed';
|
|
3
4
|
interface HistoryItemProps {
|
|
4
5
|
firstImageUrl: string;
|
|
5
6
|
secondImageUrl: string;
|
|
6
|
-
|
|
7
|
+
status: HistoryItemStatus;
|
|
7
8
|
fromLabel: string;
|
|
8
9
|
toLabel: string;
|
|
9
|
-
pendingLabel?: string;
|
|
10
10
|
dateCompleted: string;
|
|
11
11
|
fromAmount: string;
|
|
12
12
|
toAmount: string;
|
|
13
13
|
dropdownMenuItems?: DropdownMenuItemProps[];
|
|
14
14
|
itemsContainerRef?: React.RefObject<HTMLElement>;
|
|
15
15
|
}
|
|
16
|
-
export declare function HistoryItem({ firstImageUrl, secondImageUrl,
|
|
16
|
+
export declare function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuItems, itemsContainerRef, status, }: HistoryItemProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -4,22 +4,24 @@ export type SettingsControl = {
|
|
|
4
4
|
type: 'percentage';
|
|
5
5
|
value: number;
|
|
6
6
|
onChange: (value: number) => void;
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
hasDecimals?: boolean;
|
|
7
10
|
resetValueControl: {
|
|
8
11
|
label: string;
|
|
9
12
|
onSelect: () => void;
|
|
10
|
-
|
|
13
|
+
value: number;
|
|
11
14
|
};
|
|
12
15
|
} | {
|
|
13
16
|
type: 'amount';
|
|
17
|
+
value: number;
|
|
18
|
+
onChange: (value: number) => void;
|
|
14
19
|
options: {
|
|
15
20
|
value: number;
|
|
16
|
-
isSelected?: boolean;
|
|
17
|
-
onSelect?: () => void;
|
|
18
21
|
}[];
|
|
19
22
|
resetValueControl: {
|
|
20
23
|
label: string;
|
|
21
|
-
|
|
22
|
-
isSelected?: boolean;
|
|
24
|
+
value: number;
|
|
23
25
|
};
|
|
24
26
|
} | {
|
|
25
27
|
type: 'switch';
|
|
@@ -31,9 +33,9 @@ export type SettingsControl = {
|
|
|
31
33
|
export interface SettingsItemProps {
|
|
32
34
|
icon: React.ReactNode;
|
|
33
35
|
label: string;
|
|
34
|
-
|
|
36
|
+
control?: SettingsControl;
|
|
35
37
|
link?: string;
|
|
36
38
|
transparent?: boolean;
|
|
37
39
|
helpTooltip?: Omit<TooltipProps, 'children'>;
|
|
38
40
|
}
|
|
39
|
-
export declare function SettingsItem({ icon, label,
|
|
41
|
+
export declare function SettingsItem({ icon, label, control, link, transparent, helpTooltip, }: SettingsItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { BadgeImage } from '../../components/badges/BadgeImage';
|
|
3
|
+
declare const meta: Meta<typeof BadgeImage>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const ImageOnly: Story;
|
|
7
|
+
export declare const BadgeAndImage: Story;
|
|
8
|
+
export declare const ExtraMarginForBadge: Story;
|
|
9
|
+
export declare const Rounded: Story;
|
|
10
|
+
export declare const SizeMedium: Story;
|
|
11
|
+
export declare const SizeSmall: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { LoadingSkeleton } from '../../components/badges/LoadingSkeleton';
|
|
3
|
+
declare const meta: Meta<typeof LoadingSkeleton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -3,11 +3,11 @@ import { SwapConfiguration } from '../../components/layout/SwapConfiguration';
|
|
|
3
3
|
declare const meta: Meta<typeof SwapConfiguration>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const Empty: Story;
|
|
7
7
|
export declare const ChainOnly: Story;
|
|
8
8
|
export declare const ChainAndToken: Story;
|
|
9
|
-
export declare const WithAmount: Story;
|
|
10
9
|
export declare const WithSwapAmountUsd: Story;
|
|
10
|
+
export declare const Address: Story;
|
|
11
11
|
export declare const WithBalance: Story;
|
|
12
12
|
export declare const LowPriceImpact: Story;
|
|
13
13
|
export declare const HighPriceImpact: Story;
|
|
@@ -3,6 +3,7 @@ import { HistoryItem } from '../../components/lists/HistoryItem';
|
|
|
3
3
|
declare const meta: Meta<typeof HistoryItem>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const Completed: Story;
|
|
7
7
|
export declare const Pending: Story;
|
|
8
|
+
export declare const Failed: Story;
|
|
8
9
|
export declare const WithActions: Story;
|
package/dist/esm/index.js
CHANGED
|
@@ -2562,7 +2562,7 @@ function BadgeImage({ imageUrl, badgeUrl, size = 'sm', extraMarginForBadge, roun
|
|
|
2562
2562
|
}
|
|
2563
2563
|
|
|
2564
2564
|
function LoadingSkeleton({ className, height = '20', }) {
|
|
2565
|
-
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "100", height: height, viewBox: "0 0 100 20", fill: "none", className: className, children: [
|
|
2565
|
+
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "100", height: height, viewBox: "0 0 100 20", fill: "none", className: className, children: [jsx("g", { "clip-path": "url(#clip0_1246_29063)", children: jsx("rect", { width: "100", height: "20", fill: "url(#paint0_linear_1246_29063)" }) }), jsxs("defs", { children: [jsxs("linearGradient", { id: "paint0_linear_1246_29063", x1: "0", y1: "10", x2: "100", y2: "10", gradientUnits: "userSpaceOnUse", className: "tw-animate-loading-gradient tw-text-material-light-thin", children: [jsx("stop", { "stop-color": "currentColor" }), jsx("stop", { offset: "0.395881", "stop-color": "currentColor" }), jsx("stop", { offset: "0.597867", "stop-color": "currentColor", className: "group-data-[squid-theme-type=dark]:tw-text-material-light-average group-data-[squid-theme-type=light]:tw-text-transparent" }), jsx("stop", { offset: "0.697004", "stop-color": "currentColor" })] }), jsx("clipPath", { id: "clip0_1246_29063", children: jsx("path", { d: "M0 10C0 4.47715 4.47715 0 10 0H90C95.5228 0 100 4.47715 100 10C100 15.5228 95.5229 20 90 20H10C4.47716 20 0 15.5228 0 10Z", fill: "white" }) })] }), ' '] }));
|
|
2566
2566
|
}
|
|
2567
2567
|
|
|
2568
2568
|
/******************************************************************************
|
|
@@ -2625,10 +2625,31 @@ function BodyText(_a) {
|
|
|
2625
2625
|
return (jsx("span", Object.assign({}, props, { className: cn(textClassMap$1[size], fontWeightClass, props.className), children: children })));
|
|
2626
2626
|
}
|
|
2627
2627
|
|
|
2628
|
-
function Loader({ size = '24' }) {
|
|
2629
|
-
return (
|
|
2630
|
-
|
|
2631
|
-
|
|
2628
|
+
function Loader({ size = '24', strokeWidth = '1' }) {
|
|
2629
|
+
return (jsxs("svg", { className: "squid-animated-loader", xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: [jsx("style", { children: `
|
|
2630
|
+
.squid-animated-loader-dash {
|
|
2631
|
+
animation: squid-animated-loader-dash-grow 0.5s infinite alternate;
|
|
2632
|
+
}
|
|
2633
|
+
@keyframes squid-animated-loader-dash-grow {
|
|
2634
|
+
0% {
|
|
2635
|
+
stroke-dasharray: 10, 5;
|
|
2636
|
+
}
|
|
2637
|
+
100% {
|
|
2638
|
+
stroke-dasharray: 5, 20;
|
|
2639
|
+
}
|
|
2640
|
+
}
|
|
2641
|
+
@keyframes squid-animated-loader-rotate {
|
|
2642
|
+
from {
|
|
2643
|
+
transform: rotate(0deg);
|
|
2644
|
+
}
|
|
2645
|
+
to {
|
|
2646
|
+
transform: rotate(-360deg);
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
.squid-animated-loader {
|
|
2650
|
+
animation: squid-animated-loader-rotate 1s linear infinite;
|
|
2651
|
+
transform-origin: center;
|
|
2652
|
+
}` }), jsxs("g", { "clip-path": "url(#clip0_1387_2296)", children: [jsx("circle", { cx: "7.99967", cy: "8.00004", r: "6.66667", stroke: "currentColor", className: "group-data-[squid-theme-type=dark]:tw-text-material-light-thin group-data-[squid-theme-type=light]:tw-text-material-dark-thin", "stroke-width": strokeWidth }), jsx("path", { className: "squid-animated-loader-dash group-data-[squid-theme-type=dark]:tw-text-material-light-thick group-data-[squid-theme-type=light]:tw-text-material-dark-thick", d: "M14.6663 8.00004C14.6663 7.12456 14.4939 6.25766 14.1589 5.44882C13.8238 4.63998 13.3328 3.90505 12.7137 3.286C12.0947 2.66694 11.3597 2.17588 10.5509 1.84084C9.74206 1.50581 8.87515 1.33337 7.99967 1.33337", stroke: "currentColor", "stroke-width": strokeWidth, "stroke-linecap": "round" })] }), jsx("defs", { children: jsx("clipPath", { id: "clip0_1387_2296", children: jsx("rect", { width: "16", height: "16", fill: "white" }) }) })] }));
|
|
2632
2653
|
}
|
|
2633
2654
|
|
|
2634
2655
|
function AddressButton(_a) {
|
|
@@ -2922,12 +2943,12 @@ function HeadingText({ children, bold, size }) {
|
|
|
2922
2943
|
return (jsx("h6", { className: clsx(textClassMap[size], fontWeightClass), children: children }));
|
|
2923
2944
|
}
|
|
2924
2945
|
|
|
2925
|
-
function SettingsSlider({ value, type, onChange }) {
|
|
2926
|
-
return (jsxs("div", { className: "tw-relative tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs", children: [jsx("input", { min: 0, max: 99, placeholder: "0", type: "number", onChange: (e) => {
|
|
2927
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
|
|
2946
|
+
function SettingsSlider({ value, type, onChange, hasDecimals, max, min, }) {
|
|
2947
|
+
return (jsxs("div", { className: "tw-relative tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs", children: [jsx("input", { min: min !== null && min !== void 0 ? min : 0, max: max !== null && max !== void 0 ? max : 99, step: hasDecimals ? 0.1 : 1, placeholder: "0", type: "number", onChange: (e) => {
|
|
2948
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(Number(e.target.value));
|
|
2928
2949
|
}, className: cn('tw-relative tw-flex tw-h-full tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-bg-transparent tw-p-squid-xs tw-text-caption !tw-font-medium tw-leading-[10px] tw-text-grey-300 placeholder-shown:tw-text-grey-600 hover:tw-bg-material-light-thin focus:tw-bg-material-light-thin', type === 'percentage'
|
|
2929
|
-
? 'tw-w-[
|
|
2930
|
-
: 'tw-w-[
|
|
2950
|
+
? 'tw-w-[84px] tw-pr-[52px] tw-text-right'
|
|
2951
|
+
: 'tw-w-[80px] tw-pl-[20px] tw-pr-[32px] tw-text-left'), value: value }), type === 'percentage' && jsx(PercentageDecorator, {}), type === 'amount' && jsx(AmountDecorator, {})] }));
|
|
2931
2952
|
}
|
|
2932
2953
|
function PercentageDecorator() {
|
|
2933
2954
|
return (jsxs("div", { className: "tw-absolute tw-right-squid-xs tw-flex tw-items-center tw-justify-center tw-gap-squid-xs !tw-font-medium tw-leading-[10px]", children: [jsx(CaptionText, { className: "tw-translate-y-[0.5px] !tw-font-medium !tw-leading-[10px] tw-text-grey-300", children: "%" }), jsx(Chip, { icon: jsx(ChevronGrabberVerticalIcon, { className: "tw-text-grey-900" }) })] }));
|
|
@@ -2960,7 +2981,7 @@ function Switch({ checked = false, onChange, size, disabled = false, }) {
|
|
|
2960
2981
|
switchCircleSizeClassMap[size],
|
|
2961
2982
|
// disabled and checked styles
|
|
2962
2983
|
checked
|
|
2963
|
-
? 'tw-translate-x-0 tw-bg-[
|
|
2984
|
+
? 'tw-translate-x-0 group-data-[squid-theme-type=dark]:tw-bg-grey-100 group-data-[squid-theme-type=light]:tw-bg-grey-900'
|
|
2964
2985
|
: '-tw-translate-x-full tw-bg-grey-500') })] }));
|
|
2965
2986
|
}
|
|
2966
2987
|
|
|
@@ -3079,8 +3100,8 @@ function FeeButton(_a) {
|
|
|
3079
3100
|
return (jsxs("button", Object.assign({}, props, { className: cn('tw-flex tw-h-squid-xl tw-w-full tw-items-center tw-gap-x-squid-xs tw-rounded-squid-m tw-px-squid-xs hover:tw-bg-material-light-thin', className), children: [jsx(Chip, { label: chipLabel }), jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsx(Chip, { icon: jsx(EthereumIcon, {}) }), jsx(UsdAmount, { usdAmount: feeInUsd })] })] })));
|
|
3080
3101
|
}
|
|
3081
3102
|
|
|
3082
|
-
function SettingsButton({ label, isSelected = false, }) {
|
|
3083
|
-
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 }) }));
|
|
3103
|
+
function SettingsButton({ label, isSelected = false, onClick, }) {
|
|
3104
|
+
return (jsx("button", { onClick: onClick, 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 }) }));
|
|
3084
3105
|
}
|
|
3085
3106
|
|
|
3086
3107
|
function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode = true, boostTooltipDisplayDelayMs = 0, }) {
|
|
@@ -3089,8 +3110,8 @@ function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessa
|
|
|
3089
3110
|
: 'tw-bg-status-positive') })] }));
|
|
3090
3111
|
}
|
|
3091
3112
|
|
|
3092
|
-
function EmojiSadIcon() {
|
|
3093
|
-
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20ZM13.5341 12.4645C11.5815 10.5118 8.41568 10.5118 6.46306 12.4645C6.07254 12.855 6.07254 13.4882 6.46306 13.8787C6.85358 14.2692 7.48675 14.2692 7.87727 13.8787C9.04885 12.7071 10.9483 12.7071 12.1199 13.8787C12.5104 14.2692 13.1436 14.2692 13.5341 13.8787C13.9247 13.4882 13.9247 12.855 13.5341 12.4645ZM8.5 7.5C8.5 8.32843 7.94036 9 7.25 9C6.55964 9 6 8.32843 6 7.5C6 6.67157 6.55964 6 7.25 6C7.94036 6 8.5 6.67157 8.5 7.5ZM12.75 9C13.4404 9 14 8.32843 14 7.5C14 6.67157 13.4404 6 12.75 6C12.0596 6 11.5 6.67157 11.5 7.5C11.5 8.32843 12.0596 9 12.75 9Z", fill: "currentColor" }) }));
|
|
3113
|
+
function EmojiSadIcon({ className }) {
|
|
3114
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", className: className, children: jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20ZM13.5341 12.4645C11.5815 10.5118 8.41568 10.5118 6.46306 12.4645C6.07254 12.855 6.07254 13.4882 6.46306 13.8787C6.85358 14.2692 7.48675 14.2692 7.87727 13.8787C9.04885 12.7071 10.9483 12.7071 12.1199 13.8787C12.5104 14.2692 13.1436 14.2692 13.5341 13.8787C13.9247 13.4882 13.9247 12.855 13.5341 12.4645ZM8.5 7.5C8.5 8.32843 7.94036 9 7.25 9C6.55964 9 6 8.32843 6 7.5C6 6.67157 6.55964 6 7.25 6C7.94036 6 8.5 6.67157 8.5 7.5ZM12.75 9C13.4404 9 14 8.32843 14 7.5C14 6.67157 13.4404 6 12.75 6C12.0596 6 11.5 6.67157 11.5 7.5C11.5 8.32843 12.0596 9 12.75 9Z", fill: "currentColor" }) }));
|
|
3094
3115
|
}
|
|
3095
3116
|
|
|
3096
3117
|
function ErrorMessage({ message, showIcon = true }) {
|
|
@@ -3114,7 +3135,7 @@ function DetailsToolbar({ errorMessage, boostMode = 'normal', onToggleBoostMode,
|
|
|
3114
3135
|
return 'full';
|
|
3115
3136
|
}, [errorMessage, isLoading, isEmpty]);
|
|
3116
3137
|
const detailClassName = cn('tw-w-[190px]', detailStateClassMap[state]);
|
|
3117
|
-
return (jsx("aside", { className: cn('tw-h-
|
|
3138
|
+
return (jsx("aside", { className: cn('tw-flex tw-h-[50px] tw-w-[480px] tw-items-center tw-justify-around tw-border-t tw-border-t-material-light-thin 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 }) })] })) }));
|
|
3118
3139
|
}
|
|
3119
3140
|
|
|
3120
3141
|
function DropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, }) {
|
|
@@ -3164,11 +3185,46 @@ const dropdownPositionClassMap = {
|
|
|
3164
3185
|
bottom: 'tw-right-[calc(100%-10px)] tw-top-7',
|
|
3165
3186
|
center: 'tw-right-[40px] -tw-top-[55px]',
|
|
3166
3187
|
};
|
|
3167
|
-
|
|
3188
|
+
const statusBadge = {
|
|
3189
|
+
completed: {},
|
|
3190
|
+
pending: {
|
|
3191
|
+
badge: jsx(Loader, { size: "16", strokeWidth: "2" }),
|
|
3192
|
+
containerClassName: 'tw-bg-royal-400',
|
|
3193
|
+
},
|
|
3194
|
+
failed: {
|
|
3195
|
+
badge: (jsx("span", { className: "group-data-[squid-theme-type=dark]:tw-bg-grey-100 group-data-[squid-theme-type=light]:tw-bg-grey-900", children: jsx(EmojiSadIcon, { className: "tw-text-status-negative" }) })),
|
|
3196
|
+
containerClassName: 'tw-bg-status-negative',
|
|
3197
|
+
},
|
|
3198
|
+
};
|
|
3199
|
+
function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuItems, itemsContainerRef, status, }) {
|
|
3168
3200
|
const { isDropdownOpen, dropdownRef, openDropdownButtonRef, openDropdown } = useDropdownMenu();
|
|
3169
3201
|
const [dropdownPosition, setDropdownPosition] = useState(null);
|
|
3170
3202
|
const itemRef = useRef(null);
|
|
3171
3203
|
const menuRef = useRef(null);
|
|
3204
|
+
const statusInfo = useMemo(() => {
|
|
3205
|
+
switch (status) {
|
|
3206
|
+
case 'completed':
|
|
3207
|
+
return {
|
|
3208
|
+
label: dateCompleted,
|
|
3209
|
+
className: '',
|
|
3210
|
+
};
|
|
3211
|
+
case 'pending':
|
|
3212
|
+
return {
|
|
3213
|
+
label: 'Pending',
|
|
3214
|
+
className: 'tw-text-royal-400',
|
|
3215
|
+
};
|
|
3216
|
+
case 'failed':
|
|
3217
|
+
return {
|
|
3218
|
+
label: 'Failed',
|
|
3219
|
+
className: 'tw-text-status-negative',
|
|
3220
|
+
};
|
|
3221
|
+
default:
|
|
3222
|
+
return {
|
|
3223
|
+
label: '',
|
|
3224
|
+
className: '',
|
|
3225
|
+
};
|
|
3226
|
+
}
|
|
3227
|
+
}, [status, dateCompleted]);
|
|
3172
3228
|
// Effect to find the best position for the dropdown menu, so it's always visible for the user
|
|
3173
3229
|
useEffect(() => {
|
|
3174
3230
|
var _a;
|
|
@@ -3213,8 +3269,8 @@ function HistoryItem({ firstImageUrl, secondImageUrl, isPending, dateCompleted,
|
|
|
3213
3269
|
setDropdownPosition('top');
|
|
3214
3270
|
}
|
|
3215
3271
|
}, [isDropdownOpen, menuRef, dropdownPosition, itemRef]);
|
|
3216
|
-
return (jsx("li", { ref: itemRef, className: "tw-h-list-item-large tw-min-w-list-item-small tw-self-stretch tw-bg-grey-900 tw-px-squid-xs tw-text-grey-300", children: jsxs("div", { className: "tw-group/history-item tw-relative tw-flex tw-flex-shrink-0 tw-cursor-pointer tw-items-center tw-gap-squid-xs tw-self-stretch tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs hover:tw-bg-material-light-thin", children: [jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [
|
|
3217
|
-
'tw-transition-opacity group-hover/history-item:tw-hidden group-hover/history-item:tw-opacity-0 peer-focus:tw-hidden peer-focus:tw-opacity-0'), children:
|
|
3272
|
+
return (jsx("li", { ref: itemRef, className: "tw-h-list-item-large tw-min-w-list-item-small tw-self-stretch tw-bg-grey-900 tw-px-squid-xs tw-text-grey-300", children: jsxs("div", { className: "tw-group/history-item tw-relative tw-flex tw-flex-shrink-0 tw-cursor-pointer tw-items-center tw-gap-squid-xs tw-self-stretch tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs hover:tw-bg-material-light-thin", children: [jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [!!statusBadge[status].badge && (jsx("span", { className: cn('tw-absolute -tw-left-[5px] tw-bottom-0 tw-z-30 tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-center tw-overflow-hidden tw-rounded-full tw-border tw-border-grey-900 tw-p-0.5', statusBadge[status].containerClassName), children: statusBadge[status].badge })), jsx("img", { src: firstImageUrl, className: "tw-absolute tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" }), jsx("img", { src: secondImageUrl, className: "tw-absolute tw-left-5 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" })] }), jsxs("div", { className: "tw-flex tw-h-10 tw-flex-1 tw-flex-col tw-self-stretch", children: [jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-justify-between tw-text-grey-500", children: [jsxs("div", { className: "tw-flex tw-items-center", children: [jsx(CaptionText, { children: fromLabel }), jsx("span", { className: "tw-text-grey-600", children: jsx(ChevronRightSmallIcon, {}) }), jsx(CaptionText, { children: toLabel })] }), !!dropdownMenuItems && (jsx("button", { className: "tw-peer tw-absolute tw-right-squid-xxs tw-top-squid-xxs tw-flex tw-h-squid-xl tw-w-squid-xl tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-material-light-thin tw-p-2 tw-text-grey-300 tw-opacity-0 tw-transition-opacity focus:tw-opacity-100 group-hover/history-item:tw-opacity-100", onClick: openDropdown, ref: openDropdownButtonRef, children: jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })), jsx("div", { className: cn(!!dropdownMenuItems &&
|
|
3273
|
+
'tw-transition-opacity group-hover/history-item:tw-hidden group-hover/history-item:tw-opacity-0 peer-focus:tw-hidden peer-focus:tw-opacity-0'), children: statusInfo.label && (jsx(CaptionText, { className: statusInfo.className, children: statusInfo.label })) })] }), jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: [jsx(BodyText, { size: "small", children: fromAmount }), jsx("span", { className: "tw-text-grey-600", children: jsx(ChevronLargeRightIcon, {}) }), jsx(BodyText, { size: "small", children: toAmount })] })] }), isDropdownOpen && !!dropdownMenuItems ? (jsx(DropdownMenu, { menuRef: menuRef,
|
|
3218
3274
|
// only show dropdown menu if there is a position defined for it
|
|
3219
3275
|
isHidden: !dropdownPosition, className: cn(!!dropdownPosition && dropdownPositionClassMap[dropdownPosition]), dropdownRef: dropdownRef, items: dropdownMenuItems })) : null] }) }));
|
|
3220
3276
|
}
|
|
@@ -3251,7 +3307,7 @@ function HelpIcon({ size = '20', className, }) {
|
|
|
3251
3307
|
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsx("g", { "clip-path": "url(#clip0_457_36778)", children: jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10ZM6 7C6 4.46214 8.03736 3 10 3C12.1193 3 14 4.66531 14 7C14 7.93746 13.7596 8.6603 13.368 9.2586C13.0353 9.76679 12.6034 10.1601 12.2697 10.4639L12.1757 10.5497C11.8041 10.8904 11.534 11.1593 11.337 11.504C11.1513 11.8288 11 12.2794 11 13C11 13.5523 10.5523 14 10 14C9.44772 14 9 13.5523 9 13C9 11.9706 9.22366 11.1712 9.60051 10.5117C9.96604 9.87199 10.4459 9.42214 10.8243 9.07535L10.8834 9.02116L10.8834 9.02116L10.8834 9.02115C11.2572 8.67885 11.5066 8.45039 11.6945 8.16328C11.8654 7.9022 12 7.56254 12 7C12 5.83469 11.0807 5 10 5C8.96264 5 8 5.73786 8 7C8 7.55228 7.55228 8 7 8C6.44772 8 6 7.55228 6 7ZM10 15C9.44771 15 9 15.4477 9 16C9 16.5523 9.44771 17 10 17C10.5523 17 11 16.5523 11 16C11 15.4477 10.5523 15 10 15Z", fill: "currentColor" }) }), jsx("defs", { children: jsx("clipPath", { id: "clip0_457_36778", children: jsx("rect", { width: "20", height: "20", fill: "white" }) }) })] }));
|
|
3252
3308
|
}
|
|
3253
3309
|
|
|
3254
|
-
function SettingsItem({ icon, label,
|
|
3310
|
+
function SettingsItem({ icon, label, control, link, transparent = false, helpTooltip, }) {
|
|
3255
3311
|
const ContentTag = link ? 'a' : 'div';
|
|
3256
3312
|
const contentTagProps = link
|
|
3257
3313
|
? {
|
|
@@ -3260,25 +3316,10 @@ function SettingsItem({ icon, label, controls = [], link, transparent = false, h
|
|
|
3260
3316
|
}
|
|
3261
3317
|
: {};
|
|
3262
3318
|
const helpIcon = !!helpTooltip && (jsx(HelpIcon, { className: cn('tw-text-grey-600', 'tw-cursor-help tw-transition-colors tw-duration-200 hover:tw-text-grey-400') }));
|
|
3263
|
-
const showDetailsBorder =
|
|
3264
|
-
!link &&
|
|
3265
|
-
!controls.some((control) => control.type === 'switch');
|
|
3319
|
+
const showDetailsBorder = !!control && !link && !(control.type === 'switch');
|
|
3266
3320
|
return (jsx("li", { className: cn('tw-h-[50px] tw-self-stretch tw-px-squid-xs', transparent ? 'tw-bg-transparent' : 'tw-bg-grey-800'), children: jsxs(ContentTag, Object.assign({ className: cn('tw-flex tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xs tw-text-grey-300', link && 'hover:tw-bg-material-light-thin') }, contentTagProps, { children: [icon, jsxs("div", { className: "tw-flex tw-flex-1 tw-items-center tw-gap-squid-xxs tw-self-stretch", children: [jsx(BodyText, { size: "small", children: label }), helpTooltip ? (jsx(Tooltip, Object.assign({}, helpTooltip, { children: helpIcon }))) : (jsx(Fragment, { children: helpIcon }))] }), jsx("div", { className: cn('tw-flex tw-h-squid-l tw-items-center tw-justify-center tw-rounded-squid-xs', showDetailsBorder &&
|
|
3267
|
-
'tw-rounded-squid-xs tw-border tw-border-solid tw-border-material-light-thin tw-bg-material-dark-thin'), children: !!link ? (jsx(SquareArrowTopRight2Icon, { className: "tw-text-material-light-average" })) : (
|
|
3268
|
-
|
|
3269
|
-
const switchControl = (jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }, index));
|
|
3270
|
-
if (control.tooltip) {
|
|
3271
|
-
return jsx(Tooltip, Object.assign({}, control.tooltip, { children: switchControl }));
|
|
3272
|
-
}
|
|
3273
|
-
return switchControl;
|
|
3274
|
-
}
|
|
3275
|
-
if (control.type === 'percentage') {
|
|
3276
|
-
return (jsxs(Fragment, { children: [jsx(SettingsButton, { label: control.resetValueControl.label, isSelected: control.resetValueControl.isSelected }), jsx(SettingsSlider, { value: control.value, type: "percentage" })] }));
|
|
3277
|
-
}
|
|
3278
|
-
if (control.type === 'amount') {
|
|
3279
|
-
return (jsxs(Fragment, { children: [jsx(SettingsButton, { label: control.resetValueControl.label, isSelected: control.resetValueControl.isSelected }), control.options.map(({ value, isSelected }, index, _controls) => (jsx(SettingsButton, { label: '$' + value, isSelected: isSelected }, index))), jsx(SettingsSlider, { type: control.type, value: 0 })] }));
|
|
3280
|
-
}
|
|
3281
|
-
})) })] })) }));
|
|
3321
|
+
'tw-rounded-squid-xs tw-border tw-border-solid tw-border-material-light-thin tw-bg-material-dark-thin'), children: !!link ? (jsx(SquareArrowTopRight2Icon, { className: "tw-text-material-light-average" })) : (!!control && (jsxs(Fragment, { children: [control.type === 'amount' && (jsxs(Fragment, { children: [jsx(SettingsButton, { onClick: () => control.onChange(control.resetValueControl.value), label: control.resetValueControl.label, isSelected: control.resetValueControl.value === control.value }), control.options.map(({ value }, index, _controls) => (jsx(SettingsButton, { label: '$' + value, isSelected: control.value === value, onClick: () => control.onChange(value) }, index))), jsx(SettingsSlider, { type: control.type, value: control.value, onChange: control.onChange, hasDecimals: false, max: 999 })] })), control.type === 'switch' &&
|
|
3322
|
+
(control.tooltip ? (jsx(Tooltip, Object.assign({}, control.tooltip, { children: jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }) }))) : (jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }))), control.type === 'percentage' && (jsxs(Fragment, { children: [jsx(SettingsButton, { label: control.resetValueControl.label, isSelected: control.resetValueControl.value === control.value, onClick: control.resetValueControl.onSelect }), jsx(SettingsSlider, { onChange: control.onChange, value: control.value, type: "percentage", hasDecimals: control.hasDecimals, max: control.max, min: control.min })] }))] }))) })] })) }));
|
|
3282
3323
|
}
|
|
3283
3324
|
|
|
3284
3325
|
function SwapDetailListItem({ label, detail, icon, isLoading = false, }) {
|
|
@@ -3377,7 +3418,10 @@ function NavigationBar({ title, displayBackButton = false, logoUrl, transparent
|
|
|
3377
3418
|
}
|
|
3378
3419
|
|
|
3379
3420
|
function ProductCard({ children }) {
|
|
3380
|
-
return (jsx("div", { className: "tw-h-card tw-min-h-card tw-w-card tw-rounded-squid-xl tw-border-[1px] tw-border-solid tw-border-material-light-thick tw-bg-material-light-thick tw-p-squid-xs tw-backdrop-blur/10 tw-backdrop-saturate-150", children: jsx("div", { className: "tw-relative tw-flex tw-h-
|
|
3421
|
+
return (jsx("div", { className: "tw-h-card tw-min-h-card tw-w-card tw-rounded-squid-xl tw-border-[1px] tw-border-solid tw-border-material-light-thick tw-bg-material-light-thick tw-p-squid-xs tw-backdrop-blur/10 tw-backdrop-saturate-150", children: jsx("div", { className: "tw-relative tw-flex tw-h-[660px] tw-w-full tw-flex-col tw-overflow-hidden tw-rounded-squid-l tw-bg-grey-900 tw-text-grey-300", children: children }) }));
|
|
3422
|
+
}
|
|
3423
|
+
function BorderedContainer({ children, className, }) {
|
|
3424
|
+
return (jsx("section", { className: cn('tw-border-t tw-border-t-material-light-thin', className), children: children }));
|
|
3381
3425
|
}
|
|
3382
3426
|
|
|
3383
3427
|
function SquidLogo() {
|
|
@@ -3414,7 +3458,7 @@ function SwapConfiguration({ priceImpactPercentage, amount, forcedAmount, swapAm
|
|
|
3414
3458
|
const BalanceChipTag = isBalanceChipInteractive ? 'button' : 'div';
|
|
3415
3459
|
const isSwapAmountChipInteractive = !!onSwapAmountButtonClick;
|
|
3416
3460
|
const SwapAmountChipTag = isSwapAmountChipInteractive ? 'button' : 'div';
|
|
3417
|
-
return (jsxs("section", { className: "tw-h-[205px] tw-max-h-[205px] tw-bg-grey-900 tw-pb-squid-m", children: [jsx("header", { className: "tw-flex tw-items-center tw-gap-1 tw-px-squid-l tw-py-squid-xs tw-leading-5 tw-text-grey-300", children: jsxs("button", { onClick: onWalletButtonClick, className: "-tw-ml-squid-xs tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-s tw-px-squid-xs tw-text-grey-600 hover:tw-bg-material-light-thin", children: [jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === 'from' ? 'Pay' : 'Receive' }), jsx(BodyText, { size: "small", children: ":" }), jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsx(BodyText, { size: "small", className: address ? 'tw-text-grey-300' : 'tw-text-royal-400', children: address ? address : emptyAddressLabel }), jsx(ChevronArrowIcon, { className: address ? 'tw-text-grey-600' : 'tw-text-royal-400' })] })] }) }), jsx("div", { className: "tw-px-squid-l", children: jsx(AssetsButton, { onClick: onAssetsButtonClick, chainImageUrl: chain === null || chain === void 0 ? void 0 : chain.iconUrl, tokenImageUrl: token === null || token === void 0 ? void 0 : token.iconUrl, tokenSymbol: token === null || token === void 0 ? void 0 : token.symbol, chainBgColor: chain === null || chain === void 0 ? void 0 : chain.bgColor, tokenBgColor: token === null || token === void 0 ? void 0 : token.bgColor, tokenTextColor: token === null || token === void 0 ? void 0 : token.textColor }) }), direction === 'from' ? (jsx(NumericInput, { forcedUpdateValue: forcedAmount, initialValue: amount, onParsedValueChanged: (value) => onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(value) })) : (jsx("div", { className:
|
|
3461
|
+
return (jsxs("section", { className: "tw-relative tw-h-[205px] tw-max-h-[205px] tw-w-[480px] tw-overflow-hidden tw-border-t tw-border-t-material-light-thin tw-bg-grey-900 tw-pb-squid-m", children: [jsx("header", { className: "tw-flex tw-items-center tw-gap-1 tw-px-squid-l tw-py-squid-xs tw-leading-5 tw-text-grey-300", children: jsxs("button", { onClick: onWalletButtonClick, className: "-tw-ml-squid-xs tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-s tw-px-squid-xs tw-text-grey-600 hover:tw-bg-material-light-thin", children: [jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === 'from' ? 'Pay' : 'Receive' }), jsx(BodyText, { size: "small", children: ":" }), jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsx(BodyText, { size: "small", className: address ? 'tw-text-grey-300' : 'tw-text-royal-400', children: address ? address : emptyAddressLabel }), jsx(ChevronArrowIcon, { className: address ? 'tw-text-grey-600' : 'tw-text-royal-400' })] })] }) }), jsx("div", { className: "tw-px-squid-l", children: jsx(AssetsButton, { onClick: onAssetsButtonClick, chainImageUrl: chain === null || chain === void 0 ? void 0 : chain.iconUrl, tokenImageUrl: token === null || token === void 0 ? void 0 : token.iconUrl, tokenSymbol: token === null || token === void 0 ? void 0 : token.symbol, chainBgColor: chain === null || chain === void 0 ? void 0 : chain.bgColor, tokenBgColor: token === null || token === void 0 ? void 0 : token.bgColor, tokenTextColor: token === null || token === void 0 ? void 0 : token.textColor }) }), isFetching && (jsx("div", { className: "tw-absolute tw-bottom-4 tw-left-squid-l tw-z-10 tw-overflow-hidden", children: jsx("div", { className: "tw-animate-move-loading-cover-to-right tw-bg-dark-cover tw-h-[94px] tw-w-[1260px]" }) })), direction === 'from' ? (jsx(NumericInput, { forcedUpdateValue: forcedAmount, initialValue: amount, onParsedValueChanged: (value) => onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(value) })) : (jsx("div", { className: cn('tw-w-full tw-px-squid-m tw-pb-[15px] tw-pt-[5px]', isFetching && 'tw-opacity-50'), children: jsx("div", { className: "tw-flex tw-h-[55px] tw-w-full tw-items-center tw-rounded-squid-s tw-bg-transparent tw-px-squid-xs tw-py-squid-s tw-text-heading-small tw-font-heading-regular tw-text-grey-300", children: jsx("span", { children: amount }) }) })), !(token === null || token === void 0 ? void 0 : token.iconUrl) ? null : (jsxs("footer", { className: cn('tw-flex tw-h-squid-m tw-max-h-squid-m tw-items-center tw-justify-between tw-gap-2 tw-px-squid-m tw-text-grey-500', isFetching && 'tw-opacity-50'), children: [error ? (jsx("div", { className: "tw-px-squid-xs", children: jsx(ErrorMessage, { message: error.message }) })) : (jsxs(SwapAmountChipTag, { onClick: onSwapAmountButtonClick, className: cn('tw-flex tw-h-squid-l tw-items-center tw-gap-1.5 tw-rounded-squid-s tw-px-squid-xs', isSwapAmountChipInteractive && interactiveChipClassName), children: [jsx(SwapInputsIcon, {}), jsx(UsdAmount, { usdAmount: swapAmountUsd }), priceImpactPercentage && direction === 'to' ? (jsxs("span", { className: clsx('tw-flex tw-items-center', priceImpactClass), children: [jsx(ArrowTriangle, {}), jsx(CaptionText, { bold: true, children: priceImpactPercentage.toString().concat('%') })] })) : null] })), jsxs(BalanceChipTag, { onClick: onBalanceButtonClick, className: cn('tw-flex tw-h-squid-l tw-items-center tw-gap-1.5 tw-rounded-squid-s tw-px-squid-xs', isBalanceChipInteractive && interactiveChipClassName), children: [jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsx(CaptionText, { children: balance }), jsx(MaxIcon, {})] })] }))] }));
|
|
3418
3462
|
}
|
|
3419
3463
|
|
|
3420
3464
|
function SwapProgressViewHeader({ title, description, }) {
|
|
@@ -3603,4 +3647,4 @@ function SquidConfigProvider({ theme = lightTheme, children, themeType = 'light'
|
|
|
3603
3647
|
return (jsx("div", { style: parsedStyle, "data-squid-theme-type": themeType, className: "tw-group tw-relative tw-font-geist", children: children }));
|
|
3604
3648
|
}
|
|
3605
3649
|
|
|
3606
|
-
export { AddressButton, ArrowButton, AssetsButton, BadgeImage, BodyText, Boost, BoostButton, Button, CaptionText, Chip, DetailsToolbar, DropdownMenu, DropdownMenuItem, ErrorMessage, FeeButton, HeadingText, HistoryItem, InfoBox, Input, ListItem, LoadingSkeleton, Menu, MenuItem, Modal, ModalContent, ModalContentDivider, NavigationBar, NumericInput, ProductCard, ProfileHeaderBackground, SectionTitle, SettingsButton, SettingsItem, SettingsSlider, SquidConfigProvider, SwapConfiguration, SwapDetailListItem, SwapProgressViewHeader, SwapStepItem, SwapStepsCollapsed, Switch, TokenPair, Tooltip, UsdAmount, useDropdownMenu };
|
|
3650
|
+
export { AddressButton, ArrowButton, AssetsButton, BadgeImage, BodyText, Boost, BoostButton, BorderedContainer, Button, CaptionText, Chip, DetailsToolbar, DropdownMenu, DropdownMenuItem, ErrorMessage, FeeButton, HeadingText, HistoryItem, InfoBox, Input, ListItem, LoadingSkeleton, Menu, MenuItem, Modal, ModalContent, ModalContentDivider, NavigationBar, NumericInput, ProductCard, ProfileHeaderBackground, SectionTitle, SettingsButton, SettingsItem, SettingsSlider, SquidConfigProvider, SwapConfiguration, SwapDetailListItem, SwapProgressViewHeader, SwapStepItem, SwapStepsCollapsed, Switch, TokenPair, Tooltip, UsdAmount, useDropdownMenu };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface SettingsButtonProps {
|
|
2
2
|
label: string;
|
|
3
3
|
isSelected?: boolean;
|
|
4
|
+
onClick?: () => void;
|
|
4
5
|
}
|
|
5
|
-
export declare function SettingsButton({ label, isSelected, }: SettingsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function SettingsButton({ label, isSelected, onClick, }: SettingsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export interface SettingsSliderProps {
|
|
2
2
|
value: number;
|
|
3
3
|
type: 'percentage' | 'amount';
|
|
4
|
-
onChange?: (value:
|
|
4
|
+
onChange?: (value: number) => void;
|
|
5
|
+
hasDecimals?: boolean;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
5
8
|
}
|
|
6
|
-
export declare function SettingsSlider({ value, type, onChange }: SettingsSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function SettingsSlider({ value, type, onChange, hasDecimals, max, min, }: SettingsSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
interface LoaderProps {
|
|
2
2
|
size?: string;
|
|
3
|
+
strokeWidth?: string;
|
|
3
4
|
}
|
|
4
|
-
export declare function Loader({ size }: LoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function Loader({ size, strokeWidth }: LoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare function ProductCard({ children }: React.PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function BorderedContainer({ children, className, }: {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DropdownMenuItemProps } from './DropdownMenuItem';
|
|
3
|
+
type HistoryItemStatus = 'completed' | 'pending' | 'failed';
|
|
3
4
|
interface HistoryItemProps {
|
|
4
5
|
firstImageUrl: string;
|
|
5
6
|
secondImageUrl: string;
|
|
6
|
-
|
|
7
|
+
status: HistoryItemStatus;
|
|
7
8
|
fromLabel: string;
|
|
8
9
|
toLabel: string;
|
|
9
|
-
pendingLabel?: string;
|
|
10
10
|
dateCompleted: string;
|
|
11
11
|
fromAmount: string;
|
|
12
12
|
toAmount: string;
|
|
13
13
|
dropdownMenuItems?: DropdownMenuItemProps[];
|
|
14
14
|
itemsContainerRef?: React.RefObject<HTMLElement>;
|
|
15
15
|
}
|
|
16
|
-
export declare function HistoryItem({ firstImageUrl, secondImageUrl,
|
|
16
|
+
export declare function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuItems, itemsContainerRef, status, }: HistoryItemProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -4,22 +4,24 @@ export type SettingsControl = {
|
|
|
4
4
|
type: 'percentage';
|
|
5
5
|
value: number;
|
|
6
6
|
onChange: (value: number) => void;
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
hasDecimals?: boolean;
|
|
7
10
|
resetValueControl: {
|
|
8
11
|
label: string;
|
|
9
12
|
onSelect: () => void;
|
|
10
|
-
|
|
13
|
+
value: number;
|
|
11
14
|
};
|
|
12
15
|
} | {
|
|
13
16
|
type: 'amount';
|
|
17
|
+
value: number;
|
|
18
|
+
onChange: (value: number) => void;
|
|
14
19
|
options: {
|
|
15
20
|
value: number;
|
|
16
|
-
isSelected?: boolean;
|
|
17
|
-
onSelect?: () => void;
|
|
18
21
|
}[];
|
|
19
22
|
resetValueControl: {
|
|
20
23
|
label: string;
|
|
21
|
-
|
|
22
|
-
isSelected?: boolean;
|
|
24
|
+
value: number;
|
|
23
25
|
};
|
|
24
26
|
} | {
|
|
25
27
|
type: 'switch';
|
|
@@ -31,9 +33,9 @@ export type SettingsControl = {
|
|
|
31
33
|
export interface SettingsItemProps {
|
|
32
34
|
icon: React.ReactNode;
|
|
33
35
|
label: string;
|
|
34
|
-
|
|
36
|
+
control?: SettingsControl;
|
|
35
37
|
link?: string;
|
|
36
38
|
transparent?: boolean;
|
|
37
39
|
helpTooltip?: Omit<TooltipProps, 'children'>;
|
|
38
40
|
}
|
|
39
|
-
export declare function SettingsItem({ icon, label,
|
|
41
|
+
export declare function SettingsItem({ icon, label, control, link, transparent, helpTooltip, }: SettingsItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { BadgeImage } from '../../components/badges/BadgeImage';
|
|
3
|
+
declare const meta: Meta<typeof BadgeImage>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const ImageOnly: Story;
|
|
7
|
+
export declare const BadgeAndImage: Story;
|
|
8
|
+
export declare const ExtraMarginForBadge: Story;
|
|
9
|
+
export declare const Rounded: Story;
|
|
10
|
+
export declare const SizeMedium: Story;
|
|
11
|
+
export declare const SizeSmall: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { LoadingSkeleton } from '../../components/badges/LoadingSkeleton';
|
|
3
|
+
declare const meta: Meta<typeof LoadingSkeleton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -3,11 +3,11 @@ import { SwapConfiguration } from '../../components/layout/SwapConfiguration';
|
|
|
3
3
|
declare const meta: Meta<typeof SwapConfiguration>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const Empty: Story;
|
|
7
7
|
export declare const ChainOnly: Story;
|
|
8
8
|
export declare const ChainAndToken: Story;
|
|
9
|
-
export declare const WithAmount: Story;
|
|
10
9
|
export declare const WithSwapAmountUsd: Story;
|
|
10
|
+
export declare const Address: Story;
|
|
11
11
|
export declare const WithBalance: Story;
|
|
12
12
|
export declare const LowPriceImpact: Story;
|
|
13
13
|
export declare const HighPriceImpact: Story;
|
|
@@ -3,6 +3,7 @@ import { HistoryItem } from '../../components/lists/HistoryItem';
|
|
|
3
3
|
declare const meta: Meta<typeof HistoryItem>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const Completed: Story;
|
|
7
7
|
export declare const Pending: Story;
|
|
8
|
+
export declare const Failed: Story;
|
|
8
9
|
export declare const WithActions: Story;
|
package/dist/index.css
CHANGED
|
@@ -649,6 +649,10 @@ video {
|
|
|
649
649
|
bottom: 0.5rem;
|
|
650
650
|
}
|
|
651
651
|
|
|
652
|
+
.tw-bottom-4 {
|
|
653
|
+
bottom: 1rem;
|
|
654
|
+
}
|
|
655
|
+
|
|
652
656
|
.tw-bottom-7 {
|
|
653
657
|
bottom: 1.75rem;
|
|
654
658
|
}
|
|
@@ -685,6 +689,10 @@ video {
|
|
|
685
689
|
left: calc(50% - 1.5px);
|
|
686
690
|
}
|
|
687
691
|
|
|
692
|
+
.tw-left-squid-l {
|
|
693
|
+
left: 1.875rem;
|
|
694
|
+
}
|
|
695
|
+
|
|
688
696
|
.tw-left-squid-xs {
|
|
689
697
|
left: 0.625rem;
|
|
690
698
|
}
|
|
@@ -936,6 +944,14 @@ video {
|
|
|
936
944
|
height: 60px;
|
|
937
945
|
}
|
|
938
946
|
|
|
947
|
+
.tw-h-\[660px\] {
|
|
948
|
+
height: 660px;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
.tw-h-\[94px\] {
|
|
952
|
+
height: 94px;
|
|
953
|
+
}
|
|
954
|
+
|
|
939
955
|
.tw-h-\[95px\] {
|
|
940
956
|
height: 95px;
|
|
941
957
|
}
|
|
@@ -1008,10 +1024,6 @@ video {
|
|
|
1008
1024
|
max-height: 60px;
|
|
1009
1025
|
}
|
|
1010
1026
|
|
|
1011
|
-
.tw-max-h-\[660px\] {
|
|
1012
|
-
max-height: 660px;
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
1027
|
.tw-max-h-\[80px\] {
|
|
1016
1028
|
max-height: 80px;
|
|
1017
1029
|
}
|
|
@@ -1096,6 +1108,10 @@ video {
|
|
|
1096
1108
|
width: 1.5px;
|
|
1097
1109
|
}
|
|
1098
1110
|
|
|
1111
|
+
.tw-w-\[1260px\] {
|
|
1112
|
+
width: 1260px;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1099
1115
|
.tw-w-\[135px\] {
|
|
1100
1116
|
width: 135px;
|
|
1101
1117
|
}
|
|
@@ -1184,14 +1200,14 @@ video {
|
|
|
1184
1200
|
width: 72px;
|
|
1185
1201
|
}
|
|
1186
1202
|
|
|
1187
|
-
.tw-w-\[76px\] {
|
|
1188
|
-
width: 76px;
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
1203
|
.tw-w-\[80px\] {
|
|
1192
1204
|
width: 80px;
|
|
1193
1205
|
}
|
|
1194
1206
|
|
|
1207
|
+
.tw-w-\[84px\] {
|
|
1208
|
+
width: 84px;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1195
1211
|
.tw-w-\[90px\] {
|
|
1196
1212
|
width: 90px;
|
|
1197
1213
|
}
|
|
@@ -1461,6 +1477,20 @@ video {
|
|
|
1461
1477
|
animation: tw-loading-gradient 1s ease-in-out both infinite;
|
|
1462
1478
|
}
|
|
1463
1479
|
|
|
1480
|
+
@keyframes tw-move-loading-cover-to-right {
|
|
1481
|
+
0% {
|
|
1482
|
+
transform: translateX(-64%);
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
100% {
|
|
1486
|
+
transform: translateX(0%);
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
.tw-animate-move-loading-cover-to-right {
|
|
1491
|
+
animation: tw-move-loading-cover-to-right 1.4s linear infinite;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1464
1494
|
@keyframes tw-slide-to-bottom {
|
|
1465
1495
|
0% {
|
|
1466
1496
|
transform: translateY(0);
|
|
@@ -1818,11 +1848,6 @@ video {
|
|
|
1818
1848
|
background-color: var(--squid-theme-royal-400) !important;
|
|
1819
1849
|
}
|
|
1820
1850
|
|
|
1821
|
-
.tw-bg-\[\#FBFBFD\] {
|
|
1822
|
-
--tw-bg-opacity: 1;
|
|
1823
|
-
background-color: rgb(251 251 253 / var(--tw-bg-opacity));
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
1851
|
.tw-bg-blue-950 {
|
|
1827
1852
|
--tw-bg-opacity: 1;
|
|
1828
1853
|
background-color: rgb(23 37 84 / var(--tw-bg-opacity));
|
|
@@ -1890,6 +1915,10 @@ video {
|
|
|
1890
1915
|
background-color: rgb(2 6 23 / var(--tw-bg-opacity));
|
|
1891
1916
|
}
|
|
1892
1917
|
|
|
1918
|
+
.tw-bg-status-negative {
|
|
1919
|
+
background-color: var(--squid-theme-status-negative);
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1893
1922
|
.tw-bg-status-positive {
|
|
1894
1923
|
background-color: var(--squid-theme-status-positive);
|
|
1895
1924
|
}
|
|
@@ -1898,6 +1927,10 @@ video {
|
|
|
1898
1927
|
background-color: transparent;
|
|
1899
1928
|
}
|
|
1900
1929
|
|
|
1930
|
+
.tw-bg-dark-cover {
|
|
1931
|
+
background-image: linear-gradient(90deg, var(--squid-theme-material-dark-thick) 45.4%, transparent 50.85%, var(--squid-theme-material-dark-thick) 55.61%);
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1901
1934
|
.tw-bg-gradient-to-b {
|
|
1902
1935
|
background-image: linear-gradient(to bottom, var(--tw-gradient-stops));
|
|
1903
1936
|
}
|
|
@@ -2447,6 +2480,10 @@ video {
|
|
|
2447
2480
|
opacity: 0.33;
|
|
2448
2481
|
}
|
|
2449
2482
|
|
|
2483
|
+
.tw-opacity-50 {
|
|
2484
|
+
opacity: 0.5;
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2450
2487
|
.tw-opacity-66 {
|
|
2451
2488
|
opacity: 0.66;
|
|
2452
2489
|
}
|
|
@@ -2635,6 +2672,10 @@ input[type='number'] {
|
|
|
2635
2672
|
-moz-appearance: textfield;
|
|
2636
2673
|
}
|
|
2637
2674
|
|
|
2675
|
+
:invalid {
|
|
2676
|
+
outline-color: var(--squid-theme-status-negative);
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2638
2679
|
.placeholder\:tw-text-grey-600::-moz-placeholder {
|
|
2639
2680
|
color: var(--squid-theme-grey-600);
|
|
2640
2681
|
}
|
|
@@ -2831,6 +2872,14 @@ input[type='number'] {
|
|
|
2831
2872
|
left: calc(50% - 6px);
|
|
2832
2873
|
}
|
|
2833
2874
|
|
|
2875
|
+
.tw-group[data-squid-theme-type=dark] .group-data-\[squid-theme-type\=dark\]\:tw-bg-grey-100 {
|
|
2876
|
+
background-color: var(--squid-theme-grey-100);
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
.tw-group[data-squid-theme-type=light] .group-data-\[squid-theme-type\=light\]\:tw-bg-grey-900 {
|
|
2880
|
+
background-color: var(--squid-theme-grey-900);
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2834
2883
|
.tw-group[data-squid-theme-type='dark'] .group-data-\[squid-theme-type\=\'dark\'\]\:tw-bg-royal-dark {
|
|
2835
2884
|
background-image: linear-gradient(180deg, #BF91F2 0%, #A577D8 100%);
|
|
2836
2885
|
}
|
|
@@ -2843,10 +2892,34 @@ input[type='number'] {
|
|
|
2843
2892
|
color: var(--squid-theme-grey-100);
|
|
2844
2893
|
}
|
|
2845
2894
|
|
|
2895
|
+
.tw-group[data-squid-theme-type=dark] .group-data-\[squid-theme-type\=dark\]\:tw-text-material-light-average {
|
|
2896
|
+
color: var(--squid-theme-material-light-average);
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2899
|
+
.tw-group[data-squid-theme-type=dark] .group-data-\[squid-theme-type\=dark\]\:tw-text-material-light-thick {
|
|
2900
|
+
color: var(--squid-theme-material-light-thick);
|
|
2901
|
+
}
|
|
2902
|
+
|
|
2903
|
+
.tw-group[data-squid-theme-type=dark] .group-data-\[squid-theme-type\=dark\]\:tw-text-material-light-thin {
|
|
2904
|
+
color: var(--squid-theme-material-light-thin);
|
|
2905
|
+
}
|
|
2906
|
+
|
|
2846
2907
|
.tw-group[data-squid-theme-type=light] .group-data-\[squid-theme-type\=light\]\:tw-text-grey-900 {
|
|
2847
2908
|
color: var(--squid-theme-grey-900);
|
|
2848
2909
|
}
|
|
2849
2910
|
|
|
2911
|
+
.tw-group[data-squid-theme-type=light] .group-data-\[squid-theme-type\=light\]\:tw-text-material-dark-thick {
|
|
2912
|
+
color: var(--squid-theme-material-dark-thick);
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
.tw-group[data-squid-theme-type=light] .group-data-\[squid-theme-type\=light\]\:tw-text-material-dark-thin {
|
|
2916
|
+
color: var(--squid-theme-material-dark-thin);
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2919
|
+
.tw-group[data-squid-theme-type=light] .group-data-\[squid-theme-type\=light\]\:tw-text-transparent {
|
|
2920
|
+
color: transparent;
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2850
2923
|
.tw-group[data-squid-theme-type=dark] .group-data-\[squid-theme-type\=dark\]\:tw-shadow-elevation-dark-2 {
|
|
2851
2924
|
--tw-shadow: 0px 2px 5px 1px rgba(0, 0, 0, 0.20), 0px 5px 20px -1px rgba(0, 0, 0, 0.33);
|
|
2852
2925
|
--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
|
@@ -101,8 +101,9 @@ declare function FeeButton({ feeInUsd, chipLabel, className, ...props }: FeeButt
|
|
|
101
101
|
interface SettingsButtonProps {
|
|
102
102
|
label: string;
|
|
103
103
|
isSelected?: boolean;
|
|
104
|
+
onClick?: () => void;
|
|
104
105
|
}
|
|
105
|
-
declare function SettingsButton({ label, isSelected, }: SettingsButtonProps): react_jsx_runtime.JSX.Element;
|
|
106
|
+
declare function SettingsButton({ label, isSelected, onClick, }: SettingsButtonProps): react_jsx_runtime.JSX.Element;
|
|
106
107
|
|
|
107
108
|
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
108
109
|
placeholder?: string;
|
|
@@ -127,9 +128,12 @@ declare const NumericInput: ({ onParsedValueChanged, initialValue, forcedUpdateV
|
|
|
127
128
|
interface SettingsSliderProps {
|
|
128
129
|
value: number;
|
|
129
130
|
type: 'percentage' | 'amount';
|
|
130
|
-
onChange?: (value:
|
|
131
|
+
onChange?: (value: number) => void;
|
|
132
|
+
hasDecimals?: boolean;
|
|
133
|
+
min?: number;
|
|
134
|
+
max?: number;
|
|
131
135
|
}
|
|
132
|
-
declare function SettingsSlider({ value, type, onChange }: SettingsSliderProps): react_jsx_runtime.JSX.Element;
|
|
136
|
+
declare function SettingsSlider({ value, type, onChange, hasDecimals, max, min, }: SettingsSliderProps): react_jsx_runtime.JSX.Element;
|
|
133
137
|
|
|
134
138
|
interface SwitchProps {
|
|
135
139
|
checked?: boolean;
|
|
@@ -196,20 +200,20 @@ interface DropdownMenuItemProps {
|
|
|
196
200
|
}
|
|
197
201
|
declare function DropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, }: DropdownMenuItemProps): react_jsx_runtime.JSX.Element;
|
|
198
202
|
|
|
203
|
+
type HistoryItemStatus = 'completed' | 'pending' | 'failed';
|
|
199
204
|
interface HistoryItemProps {
|
|
200
205
|
firstImageUrl: string;
|
|
201
206
|
secondImageUrl: string;
|
|
202
|
-
|
|
207
|
+
status: HistoryItemStatus;
|
|
203
208
|
fromLabel: string;
|
|
204
209
|
toLabel: string;
|
|
205
|
-
pendingLabel?: string;
|
|
206
210
|
dateCompleted: string;
|
|
207
211
|
fromAmount: string;
|
|
208
212
|
toAmount: string;
|
|
209
213
|
dropdownMenuItems?: DropdownMenuItemProps[];
|
|
210
214
|
itemsContainerRef?: React.RefObject<HTMLElement>;
|
|
211
215
|
}
|
|
212
|
-
declare function HistoryItem({ firstImageUrl, secondImageUrl,
|
|
216
|
+
declare function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuItems, itemsContainerRef, status, }: HistoryItemProps): react_jsx_runtime.JSX.Element;
|
|
213
217
|
|
|
214
218
|
interface ListItemProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
215
219
|
itemTitle: string | React.ReactNode;
|
|
@@ -253,22 +257,24 @@ type SettingsControl = {
|
|
|
253
257
|
type: 'percentage';
|
|
254
258
|
value: number;
|
|
255
259
|
onChange: (value: number) => void;
|
|
260
|
+
min?: number;
|
|
261
|
+
max?: number;
|
|
262
|
+
hasDecimals?: boolean;
|
|
256
263
|
resetValueControl: {
|
|
257
264
|
label: string;
|
|
258
265
|
onSelect: () => void;
|
|
259
|
-
|
|
266
|
+
value: number;
|
|
260
267
|
};
|
|
261
268
|
} | {
|
|
262
269
|
type: 'amount';
|
|
270
|
+
value: number;
|
|
271
|
+
onChange: (value: number) => void;
|
|
263
272
|
options: {
|
|
264
273
|
value: number;
|
|
265
|
-
isSelected?: boolean;
|
|
266
|
-
onSelect?: () => void;
|
|
267
274
|
}[];
|
|
268
275
|
resetValueControl: {
|
|
269
276
|
label: string;
|
|
270
|
-
|
|
271
|
-
isSelected?: boolean;
|
|
277
|
+
value: number;
|
|
272
278
|
};
|
|
273
279
|
} | {
|
|
274
280
|
type: 'switch';
|
|
@@ -280,12 +286,12 @@ type SettingsControl = {
|
|
|
280
286
|
interface SettingsItemProps {
|
|
281
287
|
icon: React.ReactNode;
|
|
282
288
|
label: string;
|
|
283
|
-
|
|
289
|
+
control?: SettingsControl;
|
|
284
290
|
link?: string;
|
|
285
291
|
transparent?: boolean;
|
|
286
292
|
helpTooltip?: Omit<TooltipProps, 'children'>;
|
|
287
293
|
}
|
|
288
|
-
declare function SettingsItem({ icon, label,
|
|
294
|
+
declare function SettingsItem({ icon, label, control, link, transparent, helpTooltip, }: SettingsItemProps): react_jsx_runtime.JSX.Element;
|
|
289
295
|
|
|
290
296
|
interface SwapDetailListItemProps {
|
|
291
297
|
label: string;
|
|
@@ -372,6 +378,10 @@ interface NavigationBarProps {
|
|
|
372
378
|
declare function NavigationBar({ title, displayBackButton, logoUrl, transparent, displayButtonShadows, onBackButtonClick, actions, }: NavigationBarProps): react_jsx_runtime.JSX.Element;
|
|
373
379
|
|
|
374
380
|
declare function ProductCard({ children }: React.PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
381
|
+
declare function BorderedContainer({ children, className, }: {
|
|
382
|
+
children: React.ReactNode;
|
|
383
|
+
className?: string;
|
|
384
|
+
}): react_jsx_runtime.JSX.Element;
|
|
375
385
|
|
|
376
386
|
declare function ProfileHeaderBackground(): react_jsx_runtime.JSX.Element;
|
|
377
387
|
|
|
@@ -487,4 +497,4 @@ declare function useDropdownMenu(props?: {
|
|
|
487
497
|
openDropdownButtonRef: React.RefObject<HTMLButtonElement>;
|
|
488
498
|
};
|
|
489
499
|
|
|
490
|
-
export { AddressButton, ArrowButton, AssetsButton, BadgeImage, BodyText, Boost, BoostButton, Button, CaptionText, Chip, DetailsToolbar, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, ErrorMessage, FeeButton, HeadingText, HistoryItem, InfoBox, Input, ListItem, LoadingSkeleton, Menu, MenuItem, Modal, ModalContent, ModalContentDivider, NavigationBar, NumericInput, ProductCard, ProfileHeaderBackground, SectionTitle, SettingsButton, type SettingsButtonProps, type SettingsControl, SettingsItem, type SettingsItemProps, SettingsSlider, type SettingsSliderProps, SquidConfigProvider, type SquidTheme, SwapConfiguration, SwapDetailListItem, SwapProgressViewHeader, SwapStepItem, SwapStepsCollapsed, Switch, TokenPair, Tooltip, type TooltipProps, type TooltipThreshold, type TooltipWidth, UsdAmount, useDropdownMenu };
|
|
500
|
+
export { AddressButton, ArrowButton, AssetsButton, BadgeImage, BodyText, Boost, BoostButton, BorderedContainer, Button, CaptionText, Chip, DetailsToolbar, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, ErrorMessage, FeeButton, HeadingText, HistoryItem, InfoBox, Input, ListItem, LoadingSkeleton, Menu, MenuItem, Modal, ModalContent, ModalContentDivider, NavigationBar, NumericInput, ProductCard, ProfileHeaderBackground, SectionTitle, SettingsButton, type SettingsButtonProps, type SettingsControl, SettingsItem, type SettingsItemProps, SettingsSlider, type SettingsSliderProps, SquidConfigProvider, type SquidTheme, SwapConfiguration, SwapDetailListItem, SwapProgressViewHeader, SwapStepItem, SwapStepsCollapsed, Switch, TokenPair, Tooltip, type TooltipProps, type TooltipThreshold, type TooltipWidth, UsdAmount, useDropdownMenu };
|