@0xsquid/ui 2.3.0 → 2.3.2-beta.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 +111 -43
- package/dist/cjs/types/components/badges/ImageGroup.d.ts +3 -2
- package/dist/cjs/types/components/buttons/IconButton.d.ts +1 -2
- package/dist/cjs/types/components/icons/Arrow.d.ts +2 -3
- package/dist/cjs/types/components/icons/Generic.d.ts +8 -0
- package/dist/cjs/types/components/icons/Plus.d.ts +2 -1
- package/dist/cjs/types/components/layout/Modal.d.ts +2 -1
- package/dist/cjs/types/components/layout/TokenDetailsView.d.ts +11 -5
- package/dist/cjs/types/components/layout/Transfer.d.ts +1 -1
- package/dist/cjs/types/components/lists/AccountListItem.d.ts +19 -0
- package/dist/cjs/types/components/lists/index.d.ts +1 -0
- package/dist/cjs/types/components/typography/CaptionText.d.ts +2 -1
- package/dist/cjs/types/stories/badges/ImageGroup.stories.d.ts +2 -0
- package/dist/cjs/types/stories/lists/AccountListItem.stories.d.ts +8 -0
- package/dist/cjs/types/stories/lists/TokenGroup.stories.d.ts +2 -0
- package/dist/cjs/types/stories/views/SwapProgressView.stories.d.ts +1 -1
- package/dist/esm/index.js +109 -44
- package/dist/esm/types/components/badges/ImageGroup.d.ts +3 -2
- package/dist/esm/types/components/buttons/IconButton.d.ts +1 -2
- package/dist/esm/types/components/icons/Arrow.d.ts +2 -3
- package/dist/esm/types/components/icons/Generic.d.ts +8 -0
- package/dist/esm/types/components/icons/Plus.d.ts +2 -1
- package/dist/esm/types/components/layout/Modal.d.ts +2 -1
- package/dist/esm/types/components/layout/TokenDetailsView.d.ts +11 -5
- package/dist/esm/types/components/layout/Transfer.d.ts +1 -1
- package/dist/esm/types/components/lists/AccountListItem.d.ts +19 -0
- package/dist/esm/types/components/lists/index.d.ts +1 -0
- package/dist/esm/types/components/typography/CaptionText.d.ts +2 -1
- package/dist/esm/types/stories/badges/ImageGroup.stories.d.ts +2 -0
- package/dist/esm/types/stories/lists/AccountListItem.stories.d.ts +8 -0
- package/dist/esm/types/stories/lists/TokenGroup.stories.d.ts +2 -0
- package/dist/esm/types/stories/views/SwapProgressView.stories.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +48 -16
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -3041,6 +3041,26 @@ const baseTailwindConfig = {
|
|
|
3041
3041
|
transform: "translate3d(0, 650px, 0)",
|
|
3042
3042
|
},
|
|
3043
3043
|
},
|
|
3044
|
+
"slide-to-top-and-fade-in": {
|
|
3045
|
+
"0%": {
|
|
3046
|
+
transform: "translate3d(0, 650px, 0)",
|
|
3047
|
+
opacity: "0",
|
|
3048
|
+
},
|
|
3049
|
+
"100%": {
|
|
3050
|
+
transform: "translate3d(0, 0, 0)",
|
|
3051
|
+
opacity: "1",
|
|
3052
|
+
},
|
|
3053
|
+
},
|
|
3054
|
+
"slide-to-bottom-and-fade-out": {
|
|
3055
|
+
"0%": {
|
|
3056
|
+
transform: "translate3d(0, 0, 0)",
|
|
3057
|
+
opacity: "1",
|
|
3058
|
+
},
|
|
3059
|
+
"100%": {
|
|
3060
|
+
transform: "translate3d(0, 650px, 0)",
|
|
3061
|
+
opacity: "0",
|
|
3062
|
+
},
|
|
3063
|
+
},
|
|
3044
3064
|
"expand-route": {
|
|
3045
3065
|
"0%": {
|
|
3046
3066
|
height: "60px",
|
|
@@ -3170,6 +3190,8 @@ const baseTailwindConfig = {
|
|
|
3170
3190
|
"move-to-left-with-spring-bounce": `move-to-left-with-spring-bounce var(${CSS_VARS.MOVE_WITH_SPRING_BOUNCE_DURATION}, 0s) ease-out both`,
|
|
3171
3191
|
"slide-to-top": `slide-to-top var(${CSS_VARS.SLIDE_TO_TOP_DURATION}, 0s) ${ANIMATION_TIMINGS.SHOW_ROUTE} both`,
|
|
3172
3192
|
"slide-to-bottom": `slide-to-bottom var(${CSS_VARS.SLIDE_TO_BOTTOM_DURATION}, 0s) ${ANIMATION_TIMINGS.HIDE_ROUTE} both`,
|
|
3193
|
+
"slide-to-top-and-fade-in": `slide-to-top-and-fade-in var(${CSS_VARS.SLIDE_TO_TOP_DURATION}, 0s) ${ANIMATION_TIMINGS.SHOW_ROUTE} both`,
|
|
3194
|
+
"slide-to-bottom-and-fade-out": `slide-to-bottom-and-fade-out var(${CSS_VARS.SLIDE_TO_BOTTOM_DURATION}, 0s) ${ANIMATION_TIMINGS.HIDE_ROUTE} both`,
|
|
3173
3195
|
"expand-route": `expand-route var(${CSS_VARS.EXPAND_ROUTE_DURATION}, 0s) ${ANIMATION_TIMINGS.EXPAND_ROUTE} both`,
|
|
3174
3196
|
"collapse-route": `collapse-route var(${CSS_VARS.COLLAPSE_ROUTE_DURATION}, 0s) ${ANIMATION_TIMINGS.COLLAPSE_ROUTE} both`,
|
|
3175
3197
|
"fade-in": `fade-in var(${CSS_VARS.FADE_IN_DURATION}, 0s) ease-out both`,
|
|
@@ -3506,7 +3528,7 @@ function Image$1(_a) {
|
|
|
3506
3528
|
const [imageState, setImageState] = useState(ImageState.LOADING);
|
|
3507
3529
|
return (jsxs("div", Object.assign({}, containerProps, { className: cn("tw-relative", containerProps === null || containerProps === void 0 ? void 0 : containerProps.className), children: [border === "gradient" && (jsx("span", { style: {
|
|
3508
3530
|
borderRadius: gradientRoundedClassMap[rounded],
|
|
3509
|
-
}, className: cn(className, "!tw-absolute -tw-left-[2px] -tw-top-[2px] !tw-h-[calc(100%+4px)] !tw-w-[calc(100%+4px)] tw-bg-conic-gradient tw-bg-center") })), children != null ? (jsx("div", Object.assign({ className: cn(className, "tw-bg-grey-500") }, props, { children: children }))) : (imageState !== ImageState.LOADED &&
|
|
3531
|
+
}, className: cn(className, "!tw-absolute -tw-left-[2px] -tw-top-[2px] !tw-h-[calc(100%+4px)] !tw-w-[calc(100%+4px)] tw-bg-conic-gradient tw-bg-center") })), children != null ? (jsx("div", Object.assign({ className: cn(className, "tw-flex tw-items-center tw-justify-center tw-bg-grey-500") }, props, { children: children }))) : (imageState !== ImageState.LOADED &&
|
|
3510
3532
|
(placeholderImageUrl ? (jsx("img", Object.assign({ src: placeholderImageUrl, className: className }, props))) : (jsx("div", Object.assign({ className: cn(className, "tw-bg-grey-500") }, props))))), children == null && src && (jsx("img", Object.assign({}, props, { src: src, onError: () => {
|
|
3511
3533
|
setImageState(ImageState.ERROR);
|
|
3512
3534
|
}, onLoad: () => {
|
|
@@ -3568,13 +3590,14 @@ function BodyText(_a) {
|
|
|
3568
3590
|
|
|
3569
3591
|
function CaptionText(_a) {
|
|
3570
3592
|
var _b, _c;
|
|
3571
|
-
var { children, bold = false, loading, tight = false } = _a, props = __rest$1(_a, ["children", "bold", "loading", "tight"]);
|
|
3593
|
+
var { children, bold = false, loading, tight = false, truncate = false } = _a, props = __rest$1(_a, ["children", "bold", "loading", "tight", "truncate"]);
|
|
3572
3594
|
const boldClass = bold ? "!tw-font-bold" : "";
|
|
3573
3595
|
const className = cn("tw-text-caption tw-font-caption tw-leading-caption", boldClass, tight && "!tw-leading-[1]", props.className);
|
|
3574
3596
|
if ((_b = loading === null || loading === void 0 ? void 0 : loading.isLoading) !== null && _b !== void 0 ? _b : false) {
|
|
3575
3597
|
return (jsx(TextSkeleton, { className: className, width: (_c = loading === null || loading === void 0 ? void 0 : loading.width) !== null && _c !== void 0 ? _c : "100%", isLoading: true }));
|
|
3576
3598
|
}
|
|
3577
|
-
return (jsx("span", Object.assign({}, props, { className: className,
|
|
3599
|
+
return (jsx("span", Object.assign({}, props, { className: className, style: truncate
|
|
3600
|
+
? Object.assign(Object.assign({}, props.style), { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }) : props.style, children: children })));
|
|
3578
3601
|
}
|
|
3579
3602
|
|
|
3580
3603
|
// font size, line height, and letter spacing classes
|
|
@@ -3592,12 +3615,12 @@ function IconLabel({ src, children, rounded }) {
|
|
|
3592
3615
|
return (jsxs("div", { className: "tw-inline-flex tw-items-center tw-gap-squid-xxs", children: [src && jsx(Image$1, { src: src, rounded: rounded, size: "medium" }), typeof children === "string" ? (jsx(CaptionText, { children: children })) : (children)] }));
|
|
3593
3616
|
}
|
|
3594
3617
|
|
|
3595
|
-
function ImageGroup({ imageUrls,
|
|
3618
|
+
function ImageGroup({ imageUrls, badge }) {
|
|
3596
3619
|
return (jsxs("div", { className: "tw-relative tw-flex tw-h-squid-xxl tw-w-squid-xxl tw-flex-shrink-0 tw-flex-wrap tw-content-center tw-items-center tw-justify-center tw-gap-0.5 tw-rounded-squid-s tw-border tw-border-solid tw-border-material-light-thin tw-bg-grey-700", children: [imageUrls.map((url) => (jsx(Image$1, { src: url, size: "medium", rounded: "xxs", style: {
|
|
3597
3620
|
width: "24px",
|
|
3598
3621
|
height: "24px",
|
|
3599
3622
|
borderRadius: "7.5px",
|
|
3600
|
-
} }, url))), jsx("div", { className: "tw-absolute -tw-bottom-[1px] -tw-right-[1px]
|
|
3623
|
+
} }, url))), badge != null && (jsx("div", { className: "tw-absolute -tw-bottom-[1px] -tw-right-[1px]", children: jsx(Image$1, Object.assign({}, badge, { border: "outline-lg", size: "medium" })) }))] }));
|
|
3601
3624
|
}
|
|
3602
3625
|
|
|
3603
3626
|
function Approve() {
|
|
@@ -3628,8 +3651,8 @@ function ChevronTopSmallIcon() {
|
|
|
3628
3651
|
function ChevronLargeDownIcon({ size = "24", className, }) {
|
|
3629
3652
|
return (jsx("svg", { width: size, height: size, viewBox: "0 0 24 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M3 10.5L11.0287 14.9604C11.6328 15.296 12.3672 15.296 12.9713 14.9604L21 10.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
3630
3653
|
}
|
|
3631
|
-
function ChevronTopIcon(
|
|
3632
|
-
return (jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg",
|
|
3654
|
+
function ChevronTopIcon(props) {
|
|
3655
|
+
return (jsx("svg", Object.assign({}, props, { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.47139 6.08088C8.21104 5.82053 7.78893 5.82053 7.52858 6.08088L3.13807 10.4714C2.87772 10.7318 2.45561 10.7318 2.19526 10.4714C1.93491 10.2111 1.93491 9.78895 2.19526 9.5286L6.58577 5.13807C7.36682 4.35702 8.63315 4.35702 9.4142 5.13807L13.8047 9.52859C14.0651 9.78894 14.0651 10.2111 13.8047 10.4714C13.5444 10.7318 13.1223 10.7318 12.8619 10.4714L8.47139 6.08088Z", fill: "currentColor" }) })));
|
|
3633
3656
|
}
|
|
3634
3657
|
function ChevronLargeRightIcon({ size = "16", className, }) {
|
|
3635
3658
|
return (jsx("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M6.66675 14L9.64035 8.64754C9.86407 8.24484 9.86407 7.75519 9.64035 7.35249L6.66675 2", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
@@ -3914,11 +3937,14 @@ function PhoneIcon({ size = "24", className, }) {
|
|
|
3914
3937
|
function LaptopIcon({ size = "24", className, }) {
|
|
3915
3938
|
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 25 24", fill: "none", className: className, children: [jsx("path", { d: "M4.5 6C4.5 4.89543 5.39543 4 6.5 4H18.5C19.6046 4 20.5 4.89543 20.5 6V15C20.5 15.5523 20.0523 16 19.5 16H5.5C4.94772 16 4.5 15.5523 4.5 15V6Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square", strokeLinejoin: "round" }), jsx("path", { d: "M2.5 16H22.5V18C22.5 19.1046 21.6046 20 20.5 20H4.5C3.39543 20 2.5 19.1046 2.5 18V16Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square", strokeLinejoin: "round" })] }));
|
|
3916
3939
|
}
|
|
3940
|
+
function CopyOutlinedIcon({ size = "24", className, }) {
|
|
3941
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: jsx("path", { d: "M9 9V5.25C9 4.00736 10.0074 3 11.25 3H18.75C19.9926 3 21 4.00736 21 5.25V12.75C21 13.9926 19.9926 15 18.75 15H15M12.75 9H5.25C4.00736 9 3 10.0074 3 11.25V18.75C3 19.9926 4.00736 21 5.25 21H12.75C13.9926 21 15 19.9926 15 18.75V11.25C15 10.0074 13.9926 9 12.75 9Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
3942
|
+
}
|
|
3917
3943
|
function CopyIcon({ size = "20", className, }) {
|
|
3918
3944
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 21 20", fill: "none", className: className, children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.16663 6.66666V3.54166C7.16663 2.50612 8.00609 1.66666 9.04163 1.66666H16.9583C17.9938 1.66666 18.8333 2.50612 18.8333 3.54166V11.4583C18.8333 12.4939 17.9938 13.3333 16.9583 13.3333H13.8333V16.4583C13.8333 17.4939 12.9938 18.3333 11.9583 18.3333H4.04163C3.00609 18.3333 2.16663 17.4939 2.16663 16.4583V8.54166C2.16663 7.50612 3.00609 6.66666 4.04163 6.66666H7.16663ZM9.04163 13.3333C8.00609 13.3333 7.16663 12.4939 7.16663 11.4583V8.33332H4.04163C3.92657 8.33332 3.83329 8.4266 3.83329 8.54166V16.4583C3.83329 16.5734 3.92657 16.6667 4.04163 16.6667H11.9583C12.0734 16.6667 12.1666 16.5734 12.1666 16.4583V13.3333H9.04163Z", fill: "currentColor" }) }));
|
|
3919
3945
|
}
|
|
3920
3946
|
function FileDownloadIcon({ size = "20", className, }) {
|
|
3921
|
-
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 21 20", fill: "none", children: [jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.33337 1.66666H10.5V5.83332C10.5 7.21404 11.6193 8.33332 13 8.33332H17.1667V15.8333C17.1667 17.214 16.0474 18.3333 14.6667 18.3333H6.33337C4.95266 18.3333 3.83337 17.214 3.83337 15.8333V4.16666C3.83337 2.78594 4.95266 1.66666 6.33337 1.66666ZM13.1726 14.3392L11.0893 16.4226C10.7639 16.748 10.2362 16.748 9.91079 16.4226L7.82745 14.3392C7.50201 14.0138 7.50201 13.4862 7.82745 13.1607C8.15289 12.8353 8.68053 12.8353 9.00596 13.1607L9.66671 13.8215V10.8333C9.66671 10.3731 10.0398 9.99999 10.5 9.99999C10.9603 9.99999 11.3334 10.3731 11.3334 10.8333V13.8215L11.9941 13.1607C12.3196 12.8353 12.8472 12.8353 13.1726 13.1607C13.4981 13.4862 13.4981 14.0138 13.1726 14.3392Z", fill: "currentColor" }), jsx("path", { d: "M12.1667 2.15481L16.6786 6.66666H13C12.5398 6.66666 12.1667 6.29356 12.1667 5.83332V2.15481Z", fill: "currentColor" })] }));
|
|
3947
|
+
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 21 20", fill: "none", className: className, children: [jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.33337 1.66666H10.5V5.83332C10.5 7.21404 11.6193 8.33332 13 8.33332H17.1667V15.8333C17.1667 17.214 16.0474 18.3333 14.6667 18.3333H6.33337C4.95266 18.3333 3.83337 17.214 3.83337 15.8333V4.16666C3.83337 2.78594 4.95266 1.66666 6.33337 1.66666ZM13.1726 14.3392L11.0893 16.4226C10.7639 16.748 10.2362 16.748 9.91079 16.4226L7.82745 14.3392C7.50201 14.0138 7.50201 13.4862 7.82745 13.1607C8.15289 12.8353 8.68053 12.8353 9.00596 13.1607L9.66671 13.8215V10.8333C9.66671 10.3731 10.0398 9.99999 10.5 9.99999C10.9603 9.99999 11.3334 10.3731 11.3334 10.8333V13.8215L11.9941 13.1607C12.3196 12.8353 12.8472 12.8353 13.1726 13.1607C13.4981 13.4862 13.4981 14.0138 13.1726 14.3392Z", fill: "currentColor" }), jsx("path", { d: "M12.1667 2.15481L16.6786 6.66666H13C12.5398 6.66666 12.1667 6.29356 12.1667 5.83332V2.15481Z", fill: "currentColor" })] }));
|
|
3922
3948
|
}
|
|
3923
3949
|
function CodeSolidSquareIcon({ size = "24", className, }) {
|
|
3924
3950
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 25 24", fill: "none", className: className, children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.5 6C3.5 4.34315 4.84315 3 6.5 3H18.5C20.1569 3 21.5 4.34315 21.5 6V18C21.5 19.6569 20.1569 21 18.5 21H6.5C4.84315 21 3.5 19.6569 3.5 18V6ZM11.2071 8.79289C11.5976 9.18342 11.5976 9.81658 11.2071 10.2071L9.41421 12L11.2071 13.7929C11.5976 14.1834 11.5976 14.8166 11.2071 15.2071C10.8166 15.5976 10.1834 15.5976 9.79289 15.2071L8 13.4142C7.21895 12.6332 7.21895 11.3668 8 10.5858L9.79289 8.79289C10.1834 8.40237 10.8166 8.40237 11.2071 8.79289ZM15.2071 8.79289C14.8166 8.40237 14.1834 8.40237 13.7929 8.79289C13.4024 9.18342 13.4024 9.81658 13.7929 10.2071L15.5858 12L13.7929 13.7929C13.4024 14.1834 13.4024 14.8166 13.7929 15.2071C14.1834 15.5976 14.8166 15.5976 15.2071 15.2071L17 13.4142C17.781 12.6332 17.781 11.3668 17 10.5858L15.2071 8.79289Z", fill: "currentColor" }) }));
|
|
@@ -3941,6 +3967,9 @@ function SmileFilledIcon({ className, size = "27", }) {
|
|
|
3941
3967
|
function StarLinesIcon({ size = "20", className, }) {
|
|
3942
3968
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.8455 1.41356C12.3313 0.606286 13.5017 0.606288 13.9875 1.41356L15.2314 3.4805L17.5816 4.0248C18.4995 4.23739 18.8611 5.35048 18.2435 6.06199L16.6621 7.88373L16.8707 10.2871C16.9522 11.2257 16.0053 11.9137 15.1378 11.5461L12.9165 10.6051L10.6952 11.5461C9.8277 11.9137 8.88085 11.2257 8.96232 10.2871L9.1709 7.88373L7.58951 6.06199C6.97187 5.35048 7.33354 4.23739 8.25143 4.0248L10.6016 3.4805L11.8455 1.41356ZM6.42243 8.57745C6.74786 8.90289 6.74786 9.43053 6.42243 9.75596L3.08909 13.0893C2.76366 13.4147 2.23602 13.4147 1.91058 13.0893C1.58514 12.7639 1.58514 12.2362 1.91058 11.9108L5.24392 8.57745C5.56935 8.25202 6.09699 8.25202 6.42243 8.57745ZM8.08909 12.7441C8.41453 13.0696 8.41453 13.5972 8.08909 13.9226L4.75576 17.256C4.43032 17.5814 3.90269 17.5814 3.57725 17.256C3.25181 16.9305 3.25181 16.4029 3.57725 16.0775L6.91058 12.7441C7.23602 12.4187 7.76366 12.4187 8.08909 12.7441ZM13.9224 12.7441C14.2479 13.0696 14.2479 13.5972 13.9224 13.9226L10.5891 17.256C10.2637 17.5814 9.73602 17.5814 9.41058 17.256C9.08515 16.9305 9.08515 16.4029 9.41058 16.0775L12.7439 12.7441C13.0694 12.4187 13.597 12.4187 13.9224 12.7441Z", fill: "currentColor" }) }));
|
|
3943
3969
|
}
|
|
3970
|
+
function QrCodeIcon({ size = "24", className, }) {
|
|
3971
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: jsx("path", { d: "M14 14V16H16M18 14H20M20 18H18V20M14 19.99V20M16 10H18C19.1046 10 20 9.10457 20 8V6C20 4.89543 19.1046 4 18 4H16C14.8954 4 14 4.89543 14 6V8C14 9.10457 14.8954 10 16 10ZM6 20H8C9.10457 20 10 19.1046 10 18V16C10 14.8954 9.10457 14 8 14H6C4.89543 14 4 14.8954 4 16V18C4 19.1046 4.89543 20 6 20ZM6 10H8C9.10457 10 10 9.10457 10 8V6C10 4.89543 9.10457 4 8 4H6C4.89543 4 4 4.89543 4 6V8C4 9.10457 4.89543 10 6 10Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
3972
|
+
}
|
|
3944
3973
|
|
|
3945
3974
|
function EmptyHeartIcon({ className }) {
|
|
3946
3975
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", className: className, children: jsx("path", { d: "M21 10C21 15.75 12.75 20 12 20C11.25 20 3 15.75 3 10C3 6 5.5 4 8 4C10.5 4 12 5.5 12 5.5C12 5.5 13.5 4 16 4C18.5 4 21 6 21 10Z", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" }) }));
|
|
@@ -4034,8 +4063,8 @@ function PieChartIcon() {
|
|
|
4034
4063
|
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", fill: "none", viewBox: "0 0 14 14", children: [jsx("path", { fill: "currentColor", d: "M13.478 8.582A6.667 6.667 0 007.667.366V6.53l5.81 2.053z" }), jsx("path", { fill: "currentColor", d: "M13.034 9.84L6.778 7.629A.667.667 0 016.334 7V.366a6.667 6.667 0 106.7 9.474z" })] }));
|
|
4035
4064
|
}
|
|
4036
4065
|
|
|
4037
|
-
function PlusIcon({ className, size = "24", }) {
|
|
4038
|
-
return (jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M12 17V12M12 12V7M12 12H17M12 12H7", stroke: "currentColor", strokeWidth:
|
|
4066
|
+
function PlusIcon({ className, size = "24", strokeWidth = "2", }) {
|
|
4067
|
+
return (jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M12 17V12M12 12V7M12 12H17M12 12H7", stroke: "currentColor", strokeWidth: strokeWidth, strokeLinecap: "round" }) }));
|
|
4039
4068
|
}
|
|
4040
4069
|
|
|
4041
4070
|
function RefreshIcon() {
|
|
@@ -4198,7 +4227,7 @@ const priceChangeSignToIconMap = {
|
|
|
4198
4227
|
[PriceChangeSign.NEGATIVE]: (jsx(ArrowTriangle, { className: "tw-text-status-negative" })),
|
|
4199
4228
|
[PriceChangeSign.NEUTRAL]: jsx(PauseIcon, {}),
|
|
4200
4229
|
};
|
|
4201
|
-
function PriceChange({ value: rawValue, variant = "small", }) {
|
|
4230
|
+
function PriceChange({ value: rawValue = 0, variant = "small", }) {
|
|
4202
4231
|
const valueFormatted = Math.abs(Number(rawValue)).toFixed(2);
|
|
4203
4232
|
const sign = Number(rawValue) > 0
|
|
4204
4233
|
? PriceChangeSign.POSITIVE
|
|
@@ -18785,7 +18814,7 @@ const modalWidthClassMap = {
|
|
|
18785
18814
|
large: "mobile-lg:tw-w-modal-large",
|
|
18786
18815
|
"extra-large": "mobile-lg:tw-w-modal-extra-large",
|
|
18787
18816
|
};
|
|
18788
|
-
function Modal({ children, className, onBackdropClick, isOpen: _isOpen = true, maxHeight = false, width = "large", animateOpacity = false, }) {
|
|
18817
|
+
function Modal({ children, className, onBackdropClick, isOpen: _isOpen = true, maxHeight = false, width = "large", animateOpacity = false, backdropStyle, }) {
|
|
18789
18818
|
const [isOpen, setIsOpen] = useState(_isOpen);
|
|
18790
18819
|
useEffect(() => {
|
|
18791
18820
|
if (_isOpen) {
|
|
@@ -18807,16 +18836,18 @@ function Modal({ children, className, onBackdropClick, isOpen: _isOpen = true, m
|
|
|
18807
18836
|
onBackdropClick();
|
|
18808
18837
|
}
|
|
18809
18838
|
}
|
|
18810
|
-
: undefined, style: {
|
|
18811
|
-
[CSS_VARS.BLUR_IN_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
|
|
18812
|
-
[CSS_VARS.BLUR_OUT_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
|
|
18813
|
-
}, className: cn("tw-absolute tw-inset-0 tw-z-40 tw-flex tw-items-start tw-justify-center tw-px-squid-xs tw-py-squid-xl tw-pb-squid-m", _isOpen ? "tw-animate-blur-in" : "tw-animate-blur-out"), children: jsx("div", { style: {
|
|
18839
|
+
: undefined, style: Object.assign({ [CSS_VARS.BLUR_IN_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`, [CSS_VARS.BLUR_OUT_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms` }, backdropStyle), className: cn("tw-absolute tw-inset-0 tw-z-40 tw-flex tw-items-start tw-justify-center tw-px-squid-xs tw-py-squid-xl tw-pb-squid-m", _isOpen ? "tw-animate-blur-in" : "tw-animate-blur-out"), children: jsx("div", { style: {
|
|
18814
18840
|
[CSS_VARS.SLIDE_TO_TOP_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
|
|
18815
18841
|
[CSS_VARS.SLIDE_TO_BOTTOM_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
|
|
18816
18842
|
[CSS_VARS.FADE_IN_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
|
|
18817
18843
|
[CSS_VARS.FADE_OUT_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
|
|
18818
|
-
}, className: cn("tw-relative tw-flex tw-max-h-modal-compact tw-max-w-full tw-flex-col tw-items-start tw-justify-end tw-gap-squid-xxs tw-self-end mobile-xs:tw-w-modal-compact mobile-lg:tw-max-h-modal-large", className,
|
|
18819
|
-
|
|
18844
|
+
}, className: cn("tw-relative tw-flex tw-max-h-modal-compact tw-max-w-full tw-flex-col tw-items-start tw-justify-end tw-gap-squid-xxs tw-self-end mobile-xs:tw-w-modal-compact mobile-lg:tw-max-h-modal-large", className, animateOpacity
|
|
18845
|
+
? _isOpen
|
|
18846
|
+
? "tw-animate-slide-to-top-and-fade-in"
|
|
18847
|
+
: "tw-animate-slide-to-bottom-and-fade-out"
|
|
18848
|
+
: _isOpen
|
|
18849
|
+
? "tw-animate-slide-to-top"
|
|
18850
|
+
: "tw-animate-slide-to-bottom", maxHeight && "tw-h-full", modalWidthClassMap[width]), children: children }) })));
|
|
18820
18851
|
}
|
|
18821
18852
|
|
|
18822
18853
|
const borderTypeClassMap = {
|
|
@@ -18912,7 +18943,25 @@ function SwapConfiguration({ amount, tokenPrice = 0, isFetching: isFetchingProp
|
|
|
18912
18943
|
}
|
|
18913
18944
|
|
|
18914
18945
|
function SwapProgressViewHeader({ title, description, }) {
|
|
18915
|
-
return (jsxs("header", { className: "tw-flex tw-h-[95px] tw-w-full tw-flex-col tw-gap-squid-s tw-bg-grey-800 tw-px-squid-m tw-py-squid-s", children: [jsx(BodyText, { size: "large", className: "tw-h-squid-m !tw-leading-[
|
|
18946
|
+
return (jsxs("header", { className: "tw-flex tw-min-h-[95px] tw-w-full tw-flex-col tw-gap-squid-s tw-bg-grey-800 tw-px-squid-m tw-py-squid-s", children: [jsx(BodyText, { size: "large", className: "tw-min-h-squid-m !tw-leading-[25px] tw-text-grey-300", children: title }), jsx(CaptionText, { className: "tw-h-squid-l tw-text-grey-500", children: description })] }));
|
|
18947
|
+
}
|
|
18948
|
+
|
|
18949
|
+
function AccountListItem({ isConnected, imageUrls = [], imageUrl, badgeUrl, actions = [], subtitle, title, mainButton, }) {
|
|
18950
|
+
const badge = {
|
|
18951
|
+
src: isConnected ? badgeUrl : undefined,
|
|
18952
|
+
children: isConnected ? undefined : (jsx(PlusIcon, { className: "tw-text-grey-900 group-data-[squid-theme-type=dark]:tw-text-grey-100", size: "15", strokeWidth: "3" })),
|
|
18953
|
+
className: isConnected ? undefined : "tw-bg-royal-500",
|
|
18954
|
+
border: "outline-lg",
|
|
18955
|
+
size: "medium",
|
|
18956
|
+
};
|
|
18957
|
+
return (jsxs("li", { className: "tw-flex tw-h-[80px] tw-w-full tw-items-center tw-gap-squid-s tw-px-squid-m tw-py-squid-xs tw-text-grey-300", children: [imageUrl != null ? (jsx(BadgeImage, { className: "tw-min-w-fit", image: {
|
|
18958
|
+
src: imageUrl,
|
|
18959
|
+
size: "xxlarge",
|
|
18960
|
+
rounded: "s",
|
|
18961
|
+
border: "outline-sm",
|
|
18962
|
+
}, badge: badge })) : (jsx(ImageGroup, { imageUrls: imageUrls, badge: badge })), jsxs("div", { className: "tw-flex tw-flex-1 tw-flex-col tw-items-start tw-gap-squid-xs", children: [jsx(BodyText, { size: "small", className: "tw-h-[13px] !tw-leading-[13px]", children: title }), jsx(BodyText, { size: "small", className: "tw-h-[13px] !tw-leading-[13px] tw-text-grey-500", children: subtitle })] }), jsx("menu", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: isConnected
|
|
18963
|
+
? actions.map((action) => createElement(IconButton, Object.assign({}, action, { key: action.key })))
|
|
18964
|
+
: mainButton != null && (jsx(Button$1, Object.assign({ size: "md", variant: "primary" }, mainButton))) })] }));
|
|
18916
18965
|
}
|
|
18917
18966
|
|
|
18918
18967
|
const SPACING = 10;
|
|
@@ -19412,7 +19461,7 @@ function SmallBodyText(props) {
|
|
|
19412
19461
|
function PropertyListItem(_a) {
|
|
19413
19462
|
var { isLoading = false, label, detail, icon, className, variant = "small", showGradientBg = true, labelClassName, iconClassName, detailClassName } = _a, props = __rest$1(_a, ["isLoading", "label", "detail", "icon", "className", "variant", "showGradientBg", "labelClassName", "iconClassName", "detailClassName"]);
|
|
19414
19463
|
const Text = variant === "small" ? CaptionText : SmallBodyText;
|
|
19415
|
-
return (jsx("li", Object.assign({}, props, { className: cn("tw-flex tw-w-full tw-gap-squid-xs tw-rounded-squid-xs tw-text-grey-300", showGradientBg && "squid-property-row-bg", containerVariantClassNameMap[variant], className), children: jsxs("div", { className: cn("tw-flex tw-h-squid-l tw-w-full tw-items-center tw-justify-between tw-gap-squid-xs tw-rounded-squid-xs", childrenVariantClassNameMap[variant]), children: [jsx("div", { className: cn("tw-w-6 tw-text-grey-500", iconClassName), children: icon }), jsx(Text, { className: cn("tw-flex-1 tw-text-grey-500", labelClassName), children: jsx(TextSkeleton, { isLoading: isLoading, children: label }) }), jsx(Text, { className: cn("tw-flex tw-text-grey-300", detailClassName), children: jsx(TextSkeleton, { isLoading: isLoading, children: detail }) })] }) })));
|
|
19464
|
+
return (jsx("li", Object.assign({}, props, { className: cn("tw-flex tw-w-full tw-gap-squid-xs tw-rounded-squid-xs tw-text-grey-300", showGradientBg && "squid-property-row-bg", containerVariantClassNameMap[variant], className), children: jsxs("div", { className: cn("tw-flex tw-h-squid-l tw-w-full tw-items-center tw-justify-between tw-gap-squid-xs tw-rounded-squid-xs", childrenVariantClassNameMap[variant]), children: [jsx("div", { className: cn("tw-w-6 tw-text-grey-500", iconClassName), children: icon }), jsx(Text, { className: cn("tw-min-w-fit tw-flex-1 tw-text-grey-500", labelClassName), children: jsx(TextSkeleton, { isLoading: isLoading, children: label }) }), jsx(Text, { truncate: variant === "small" || undefined, className: cn("tw-flex tw-text-grey-300", detailClassName), children: jsx(TextSkeleton, { isLoading: isLoading, children: detail }) })] }) })));
|
|
19416
19465
|
}
|
|
19417
19466
|
|
|
19418
19467
|
function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator = false, }) {
|
|
@@ -19521,7 +19570,9 @@ function TokenGroup({ isSelected = false, tokenItems, priceChange, balance, bala
|
|
|
19521
19570
|
const handleToggleCollapsed = useCallback(() => {
|
|
19522
19571
|
setIsCollapsed((prev) => !prev);
|
|
19523
19572
|
}, []);
|
|
19524
|
-
return (jsxs("li", {
|
|
19573
|
+
return (jsxs("li", { style: {
|
|
19574
|
+
transition: `padding ${ANIMATION_DURATIONS.GENERIC}ms ${ANIMATION_TIMINGS.GENERIC}`,
|
|
19575
|
+
}, className: cn("tw-w-full tw-self-stretch", extraSpacing && "tw-px-squid-xs tw-pt-squid-xs", !isCollapsed &&
|
|
19525
19576
|
"tw-border-y tw-border-solid tw-border-y-material-light-thin tw-py-squid-xs", className), children: [jsxs(ContentTag, { onClick: (event) => {
|
|
19526
19577
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
19527
19578
|
if (isCollapsible)
|
|
@@ -19529,7 +19580,7 @@ function TokenGroup({ isSelected = false, tokenItems, priceChange, balance, bala
|
|
|
19529
19580
|
}, style: isCollapsible
|
|
19530
19581
|
? {
|
|
19531
19582
|
transition: `${ANIMATION_DURATIONS.GENERIC}ms ${ANIMATION_TIMINGS.GENERIC}`,
|
|
19532
|
-
transitionProperty: "height",
|
|
19583
|
+
transitionProperty: "height, gap",
|
|
19533
19584
|
}
|
|
19534
19585
|
: undefined, className: cn("tw-flex tw-w-full tw-items-center tw-rounded-squid-s tw-px-squid-xs", isSelected && "tw-bg-material-light-thin", isInteractive && "hover:tw-bg-material-light-thin", isLargeVariant
|
|
19535
19586
|
? isCollapsed
|
|
@@ -19537,7 +19588,7 @@ function TokenGroup({ isSelected = false, tokenItems, priceChange, balance, bala
|
|
|
19537
19588
|
: "tw-h-squid-xl tw-gap-squid-xxs"
|
|
19538
19589
|
: isSmallVariant
|
|
19539
19590
|
? "tw-h-[50px] tw-gap-squid-s tw-py-squid-xxs"
|
|
19540
|
-
: "tw-h-squid-xl tw-gap-squid-xxs"), children: [jsxs("div", { className: "tw-relative", children: [jsx(Image$1, { src: imageUrl, size: isLargeVariant && !isCollapsed
|
|
19591
|
+
: "tw-h-squid-xl tw-gap-squid-xxs"), children: [jsxs("div", { className: "tw-relative tw-min-w-fit", children: [jsx(Image$1, { src: imageUrl, size: isLargeVariant && !isCollapsed
|
|
19541
19592
|
? "medium"
|
|
19542
19593
|
: (_a = mainImageSizeMap[variant]) !== null && _a !== void 0 ? _a : "medium", rounded: isCompactVariant ? "xxs" : "full", style: {
|
|
19543
19594
|
transition: `${ANIMATION_DURATIONS.GENERIC}ms ${ANIMATION_TIMINGS.GENERIC}`,
|
|
@@ -19555,8 +19606,19 @@ function TokenGroup({ isSelected = false, tokenItems, priceChange, balance, bala
|
|
|
19555
19606
|
? "-tw-bottom-0 -tw-right-0"
|
|
19556
19607
|
: "-tw-bottom-[3px] -tw-right-[3px]"), children: jsx(ImageStack, { spacing: "-10px", removeDuplicates: true, addExtraPadding: !isCollapsible, size: "medium", rounded: "xxs", border: "outline-lg", imageUrls: isCollapsible
|
|
19557
19608
|
? tokenItems === null || tokenItems === void 0 ? void 0 : tokenItems.slice(0, MAX_PREVIEW_ITEMS).map((item) => item.chainImageUrl)
|
|
19558
|
-
: [chainImageUrl] }) }))] }), jsxs("div", {
|
|
19559
|
-
|
|
19609
|
+
: [chainImageUrl] }) }))] }), jsxs("div", { style: {
|
|
19610
|
+
transition: `max-width ${ANIMATION_DURATIONS.GENERIC}ms ${ANIMATION_TIMINGS.GENERIC}`,
|
|
19611
|
+
}, className: cn("tw-flex tw-flex-1 tw-flex-col tw-text-grey-300", isCollapsed && "tw-gap-squid-xxs", !isSmallVariant && "tw-justify-center", isCompactVariant && "tw-max-w-[calc(100%-30px)]", isSmallVariant &&
|
|
19612
|
+
"tw-h-[45px] tw-max-w-[calc(100%-60px)] tw-justify-end", isLargeVariant &&
|
|
19613
|
+
(isCollapsed
|
|
19614
|
+
? "tw-max-w-[calc(100%-80px)]"
|
|
19615
|
+
: "tw-max-w-[calc(100%-30px)]")), children: [jsxs("div", { className: cn("tw-flex tw-w-full tw-items-center tw-gap-squid-xxs tw-self-stretch", isSmallVariant ? "tw-h-[13px] tw-items-end" : "tw-items-center", isLargeVariant && "tw-h-squid-m"), children: [jsx(BodyText, { size: "small", className: "tw-h-fit tw-max-w-fit tw-flex-grow tw-truncate", style: {
|
|
19616
|
+
whiteSpace: "nowrap",
|
|
19617
|
+
overflow: "hidden",
|
|
19618
|
+
textOverflow: "ellipsis",
|
|
19619
|
+
}, children: name }), isCollapsible && (jsx(ChevronTopIcon, { style: {
|
|
19620
|
+
transition: `transform ${ANIMATION_DURATIONS.GENERIC}ms ${ANIMATION_TIMINGS.GENERIC}`,
|
|
19621
|
+
}, className: cn("tw-min-w-fit tw-text-grey-500", isCollapsed ? "tw-rotate-90" : "tw-rotate-180") })), balanceUsd ? (jsx("span", { className: cn("tw-flex tw-flex-1 tw-items-center tw-justify-end", isCollapsed ? "tw-text-grey-300" : "tw-text-grey-500"), children: isSmallVariant ? (jsxs(Fragment, { children: [jsx(CaptionText, { className: "tw-opacity-66", children: "$" }), jsx(CaptionText, { children: balanceUsd })] })) : (jsxs(Fragment, { children: [jsx(BodyText, { size: "small", className: "tw-opacity-66", children: "$" }), jsx(BodyText, { size: "small", children: balanceUsd })] })) })) : null] }), !isCompactVariant && (jsx(Collapse, { collapsed: !isCollapsed, contentsClassName: "tw-flex tw-w-full tw-items-start tw-justify-between", className: "tw-w-full", children: jsxs("div", { className: cn("tw-flex tw-w-full tw-items-center tw-justify-between tw-self-stretch", isLargeVariant && "tw-h-squid-m"), children: [jsx("div", { className: "tw-flex tw-flex-1 tw-items-center tw-gap-squid-xxs tw-text-grey-400", children: jsxs(CaptionText, { children: [balance, " ", symbol] }) }), priceChange && jsx(PriceChange, { value: priceChange })] }) }))] })] }), jsx(Collapse, { collapsed: isCollapsed, children: jsx("ul", { className: cn("tw-flex tw-flex-col tw-items-start tw-justify-end tw-self-stretch", isCompactVariant && "tw-gap-squid-xs tw-pt-squid-xs"), children: tokenItems === null || tokenItems === void 0 ? void 0 : tokenItems.map((token) => (jsx(TokenGroup, Object.assign({}, token, { extraSpacing: false, variant: isCompactVariant ? "small" : "large", onClick: () => onChildClick === null || onChildClick === void 0 ? void 0 : onChildClick(token) }), token.chainImageUrl + token.symbol))) }) })] }));
|
|
19560
19622
|
}
|
|
19561
19623
|
|
|
19562
19624
|
function ActionLayout({ lineCap = jsx(Timeline.CapTop, {}), status = "executed", showTimeline = true, showBody = true, nextStatus, statusIcon, description, title, icon, children, }) {
|
|
@@ -19697,7 +19759,7 @@ function TransactionAction({ type, props }) {
|
|
|
19697
19759
|
}
|
|
19698
19760
|
|
|
19699
19761
|
function Transfer({ isLoading, from, to, className }) {
|
|
19700
|
-
return (jsx("div", { className: cn("tw-flex tw-items-center tw-gap-squid-xxs", className), children: jsxs(Join, { glue: () => jsx(ChevronLargeRightIcon, { className: "tw-text-grey-500" }), children: [isLoading ? jsx(TextSkeleton, {}) : from, isLoading ? jsx(TextSkeleton, {}) : to] }) }));
|
|
19762
|
+
return (jsx("div", { className: cn("tw-flex tw-max-w-full tw-items-center tw-gap-squid-xxs", className), children: jsxs(Join, { glue: () => jsx(ChevronLargeRightIcon, { className: "tw-text-grey-500" }), children: [isLoading ? (jsx(TextSkeleton, {})) : typeof from === "string" ? (jsx(CaptionText, { truncate: true, children: from })) : (from), isLoading ? (jsx(TextSkeleton, {})) : typeof to === "string" ? (jsx(CaptionText, { truncate: true, children: to })) : (to)] }) }));
|
|
19701
19763
|
}
|
|
19702
19764
|
|
|
19703
19765
|
function TransactionItem({ className, isLoading = false, status, image, type, hash, fromChain, toChain, fromAmount, toAmount, timestamp, variant = "full", }) {
|
|
@@ -19817,6 +19879,8 @@ function Toast({ headerContent, actionsContent, description, chipLabel, title, }
|
|
|
19817
19879
|
}, rounded: "sm", children: [headerContent, jsx("header", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-self-stretch tw-px-0 tw-py-squid-xxs", children: jsx(BodyText, { size: "small", className: "tw-text-grey-100", children: title }) }), jsx(CaptionText, { className: "tw-text-center tw-text-material-light-thick", children: description }), jsx("menu", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xs", children: actionsContent }), chipLabel && (jsx(Chip, { label: chipLabel, className: "tw-absolute tw-right-squid-xs tw-top-squid-xs" }))] }));
|
|
19818
19880
|
}
|
|
19819
19881
|
|
|
19882
|
+
const BACKGROUND_COLOR_CSS_VARIABLE = "--token-details-view-bg-color";
|
|
19883
|
+
const TEXT_COLOR_CSS_VARIABLE = "--token-details-view-text-color";
|
|
19820
19884
|
const DEFAULT_TIMEFRAME = "1D";
|
|
19821
19885
|
const DefaultChart = ({ timeframe, }) => (jsx("div", { className: "tw-flex tw-h-full tw-w-full tw-items-center tw-justify-center", children: jsxs(BodyText, { size: "small", children: ["Chart (", timeframe, ")"] }) }));
|
|
19822
19886
|
const TokenModalHeader = ({ token, chain, onLikeToken, onClose, isFavorite, }) => (jsxs("div", { className: "tw-flex tw-w-full tw-items-start tw-justify-between", children: [jsx("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-pb-squid-xs", children: jsx(BadgeImage, { image: {
|
|
@@ -19834,34 +19898,35 @@ const TokenInfo = ({ token, tokenPrice, priceChange, loading, }) => (jsxs("div",
|
|
|
19834
19898
|
const BalanceInfo = ({ balance, balanceUSD, token, loading, }) => (jsxs("div", { className: "tw-flex tw-flex-col", children: [jsx(CaptionText, { className: "tw-text-grey-400", children: "Balance" }), jsxs("div", { className: "tw-flex tw-flex-row tw-justify-between", children: [jsxs("span", { className: "tw-flex tw-flex-row tw-items-center tw-gap-squid-xxs", children: [jsx("img", { src: token.image, alt: token.name, className: "tw-h-squid-m tw-w-squid-m tw-rounded-full" }), jsxs(BodyText, { size: "small", loading: { isLoading: loading, width: "80px" }, children: [balance, " ", token.symbol] })] }), jsxs(CaptionText, { className: "tw-text-grey-500", loading: { isLoading: loading, width: "60px" }, children: [jsx("span", { className: "tw-opacity-66", children: "$" }), balanceUSD] })] })] }));
|
|
19835
19899
|
const MarketDataItem = ({ label, value, showDollar, loading, }) => (jsxs("div", { className: "tw-flex tw-flex-col", children: [jsx(CaptionText, { className: "tw-text-grey-500", children: label }), jsxs(CaptionText, { loading: { isLoading: loading, width: "60px" }, children: [showDollar && jsx("span", { className: "tw-text-grey-500", children: "$" }), value] })] }));
|
|
19836
19900
|
const TokenMarketData = ({ volume24h, marketCap, totalSupply, loading, }) => (jsxs("div", { className: "tw-flex tw-h-full tw-w-full tw-flex-row tw-items-center tw-justify-between", children: [jsx(MarketDataItem, { label: "24h volume", value: volume24h, showDollar: true, loading: loading }), jsx(MarketDataItem, { label: "Market cap", value: marketCap, showDollar: true, loading: loading }), jsx(MarketDataItem, { label: "Total supply", value: totalSupply, loading: loading })] }));
|
|
19837
|
-
const
|
|
19838
|
-
|
|
19839
|
-
|
|
19840
|
-
|
|
19841
|
-
|
|
19842
|
-
|
|
19843
|
-
|
|
19844
|
-
|
|
19845
|
-
|
|
19846
|
-
|
|
19847
|
-
|
|
19848
|
-
|
|
19849
|
-
|
|
19850
|
-
? "!tw-bg-grey-300 !tw-text-grey-900"
|
|
19851
|
-
: "tw-bg-transparent !tw-text-grey-600"), label: label, onClick: onClick }));
|
|
19901
|
+
const FooterButton = (_a) => {
|
|
19902
|
+
var { icon, label } = _a, props = __rest$1(_a, ["icon", "label"]);
|
|
19903
|
+
return (jsxs("div", { className: "tw-flex tw-flex-1 tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs", children: [jsx("button", Object.assign({}, props, { className: "tw-flex tw-h-squid-xl tw-w-squid-xl tw-items-center tw-justify-center tw-rounded-full tw-border tw-border-material-light-thin tw-text-grey-900 tw-shadow-elevation-light-1 disabled:tw-bg-grey-700", style: props.disabled
|
|
19904
|
+
? undefined
|
|
19905
|
+
: {
|
|
19906
|
+
backgroundColor: `var(${BACKGROUND_COLOR_CSS_VARIABLE})`,
|
|
19907
|
+
color: `var(${TEXT_COLOR_CSS_VARIABLE})`,
|
|
19908
|
+
}, children: icon })), jsx(CaptionText, { className: props.disabled ? "tw-text-grey-700" : "tw-text-grey-400", children: label })] }));
|
|
19909
|
+
};
|
|
19910
|
+
const FooterButtons = ({ buttons }) => (jsx("div", { className: "tw-flex tw-justify-between tw-py-5", children: buttons.map((button) => (jsx(FooterButton, Object.assign({}, button), button.label))) }));
|
|
19911
|
+
const TimeframeChip = ({ label, isSelected, onClick, }) => (jsx("button", { onClick: onClick, className: "tw-rounded-squid-m", children: jsx(Chip, { className: cn("tw-w-squid-xl tw-cursor-pointer hover:tw-bg-material-light-thin", isSelected
|
|
19912
|
+
? "!tw-bg-grey-300 !tw-text-grey-900"
|
|
19913
|
+
: "tw-bg-transparent !tw-text-grey-600"), label: label }) }));
|
|
19852
19914
|
const ChartTimeframeSelector = ({ selectedTimeframe, onTimeframeChange, }) => {
|
|
19853
19915
|
const timeframes = ["1H", "1D", "1W", "1Y"];
|
|
19854
19916
|
return (jsx("div", { className: "tw-mt-squid-s tw-flex tw-justify-center tw-gap-squid-xs", children: timeframes.map((timeframe) => (jsx(TimeframeChip, { label: timeframe, isSelected: selectedTimeframe === timeframe, onClick: () => {
|
|
19855
19917
|
onTimeframeChange(timeframe);
|
|
19856
19918
|
} }, timeframe))) }));
|
|
19857
19919
|
};
|
|
19858
|
-
const TokenDetailsView = ({ isOpen, onClose, token, chain, tokenPrice, priceChange, balance, balanceUSD, volume24h, marketCap, totalSupply, loading, onLikeToken, isFavorite, Chart = DefaultChart, initialTimeframe = DEFAULT_TIMEFRAME, onTimeframeChange = () => { },
|
|
19920
|
+
const TokenDetailsView = ({ isOpen, onClose, token, chain, tokenPrice, priceChange, balance, balanceUSD, volume24h, marketCap, totalSupply, loading, onLikeToken, isFavorite, Chart = DefaultChart, initialTimeframe = DEFAULT_TIMEFRAME, onTimeframeChange = () => { }, footerButtons, backdropStyle, colors, }) => {
|
|
19859
19921
|
const [selectedTimeframe, setSelectedTimeframe] = useState(initialTimeframe);
|
|
19860
19922
|
const handleTimeframeChange = (timeframe) => {
|
|
19861
19923
|
setSelectedTimeframe(timeframe);
|
|
19862
19924
|
onTimeframeChange(timeframe);
|
|
19863
19925
|
};
|
|
19864
|
-
return (jsx(Modal, { animateOpacity: true, isOpen: isOpen, onBackdropClick: onClose, width: "extra-large", className: "tw-my-auto",
|
|
19926
|
+
return (jsx(Modal, { animateOpacity: true, isOpen: isOpen, onBackdropClick: onClose, width: "extra-large", className: "tw-my-auto", backdropStyle: backdropStyle, children: jsxs(ModalContent, { style: {
|
|
19927
|
+
[BACKGROUND_COLOR_CSS_VARIABLE]: colors === null || colors === void 0 ? void 0 : colors.backgroundColor,
|
|
19928
|
+
[TEXT_COLOR_CSS_VARIABLE]: colors === null || colors === void 0 ? void 0 : colors.textColor,
|
|
19929
|
+
}, className: "tw-flex tw-min-h-[631px] tw-flex-col !tw-bg-grey-900 tw-pt-squid-m", children: [jsxs("div", { className: "tw-px-squid-m", children: [jsx(TokenModalHeader, { token: token, chain: chain, onLikeToken: onLikeToken, isFavorite: isFavorite, onClose: onClose }), jsx(TokenInfo, { token: token, tokenPrice: tokenPrice, priceChange: priceChange, loading: loading })] }), jsxs("div", { className: "tw-flex tw-w-full tw-grow tw-flex-col tw-justify-between tw-text-center", children: [jsx("span", { className: "tw-flex tw-h-full tw-grow tw-items-center tw-justify-center", children: loading ? jsx(Loader, {}) : jsx(Chart, { timeframe: selectedTimeframe }) }), jsx(ChartTimeframeSelector, { selectedTimeframe: selectedTimeframe, onTimeframeChange: handleTimeframeChange })] }), jsx("hr", { className: "tw-my-squid-xs tw-h-px tw-border-0 tw-bg-material-light-thin" }), jsxs("div", { className: "tw-flex tw-flex-col", children: [jsxs("div", { className: "tw-gap-squid-sm tw-flex tw-flex-col tw-px-squid-m", children: [jsx(BalanceInfo, { balance: balance, balanceUSD: balanceUSD, token: token, loading: loading }), jsx("hr", { className: "tw-my-squid-xs tw-h-px tw-border-0 tw-bg-material-light-thin" }), jsx(TokenMarketData, { volume24h: volume24h, marketCap: marketCap, totalSupply: totalSupply, loading: loading })] }), jsx("hr", { className: "tw-my-squid-xs tw-h-px tw-border-0 tw-bg-material-light-thin" }), jsx(FooterButtons, { buttons: footerButtons })] })] }) }));
|
|
19865
19930
|
};
|
|
19866
19931
|
|
|
19867
19932
|
const WIDTH_SM = "69";
|
|
@@ -69629,4 +69694,4 @@ function ThemeProvider(_a) {
|
|
|
69629
69694
|
return (jsx("div", Object.assign({}, props, { style: Object.assign(Object.assign({}, props.style), parsedStyle), "data-squid-theme-type": themeType, className: cn("tw-group tw-relative tw-flex tw-font-squid-main tw-h-d-screen mobile-lg:tw-h-auto", props.className), children: children })));
|
|
69630
69695
|
}
|
|
69631
69696
|
|
|
69632
|
-
export { ANIMATION_DURATIONS, AccountsButton, ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, Announcement, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, AssetsView, AtomIcon, BackpackIcon, BadgeImage, BankIcon, BellAlarmIcon, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, BrokenHeartIcon, BubblesIcon, Button$1 as Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, CatSquareIcon, CelebrateIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CodeBracketsIcon, CodeSolidSquareIcon, CoinsAddIcon, CoinsIcon, CoinsOutlinedIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CommandIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy, CopyIcon, CrossAnimatedIcon, CrossedOutSunSolidIcon, DashboardFast, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, DropdownMenuTitle, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FavouriteFilterIcon, FeeButton, FeesAction, FeesLines, FeesTotal, FileDownloadIcon, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HighestPriceRangeIcon, HistoryItem, HomeIcon, IconButton, IconLabel, Image$1 as Image, ImageGroup, ImageIcon, ImageSparkle, ImageState, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LaptopIcon, LightningIcon, LimitIcon, LinkIcon, List, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MainView, MarketCapIcon, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, MoonIcon, NavigationBar, NewsIcon, NewspaperIcon, NotAllowedIcon, NumericInput, PathSquareIcon, PauseIcon, PercentIcon, PhoneIcon, PieChartIcon, PipeSeparator, PlusIcon, PoopIcon, PowerIcon, PriceChange, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, PunkIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RecipientView, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, SettingsGearIcon, SettingsItem, SettingsSlider, SettingsSliderIcon, ShoppingBagIcon, SizeTransition, SmileFilledIcon, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidLogo, SquidVector, StakeAction, StarLinesIcon, StartAction, StocksIcon, SuccessAction, SunIcon, SunOutlinedIcon, SunriseIcon, SunriseSmallIcon, SwapAction, SwapConfiguration, SwapDetailsView, SwapErrorIcon, SwapHeader, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProgressViewHeader, SwapProperties, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, TagIcon, TagIconFilled, TextSkeleton, ThemePreference, ThemeProvider, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenDetailsView, TokenGroup, TokenPair, Tooltip, TradingViewStepsIcon, TransactionAction, TransactionFilters, TransactionHeader, TransactionHeaderLayout, TransactionItem, TransactionProperties, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, TranslateIcon, TriangleExclamation, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WalletsView, WrapAction, XSocial, adjustColorForContrast, baseTailwindConfig, blendColors, cn, darkTheme, getColorBrightness, getContrastColor, getHexColorFromOpacityPercentage, getWalletCardBackground, hexToRgb, isValidHexColor, lightTheme, linkActionTimelineProps, parseColor, parseSquidTheme, pxToRem, remToPx, rgbToHex, spacing$1 as spacing, statusTextClassMap, transactionErrorPauseAnimation, transactionFailureAnimation, transactionHalfSuccessAnimation, transactionPendingAnimation, transactionProcessingAnimation, transactionRejectedAnimation, transactionSuccessAnimation, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useUserTheme, useVersion };
|
|
69697
|
+
export { ANIMATION_DURATIONS, AccountListItem, AccountsButton, ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, Announcement, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, AssetsView, AtomIcon, BackpackIcon, BadgeImage, BankIcon, BellAlarmIcon, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, BrokenHeartIcon, BubblesIcon, Button$1 as Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, CatSquareIcon, CelebrateIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CodeBracketsIcon, CodeSolidSquareIcon, CoinsAddIcon, CoinsIcon, CoinsOutlinedIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CommandIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy, CopyIcon, CopyOutlinedIcon, CrossAnimatedIcon, CrossedOutSunSolidIcon, DashboardFast, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, DropdownMenuTitle, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FavouriteFilterIcon, FeeButton, FeesAction, FeesLines, FeesTotal, FileDownloadIcon, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HighestPriceRangeIcon, HistoryItem, HomeIcon, IconButton, IconLabel, Image$1 as Image, ImageGroup, ImageIcon, ImageSparkle, ImageState, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LaptopIcon, LightningIcon, LimitIcon, LinkIcon, List, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MainView, MarketCapIcon, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, MoonIcon, NavigationBar, NewsIcon, NewspaperIcon, NotAllowedIcon, NumericInput, PathSquareIcon, PauseIcon, PercentIcon, PhoneIcon, PieChartIcon, PipeSeparator, PlusIcon, PoopIcon, PowerIcon, PriceChange, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, PunkIcon, QrCodeIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RecipientView, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, SettingsGearIcon, SettingsItem, SettingsSlider, SettingsSliderIcon, ShoppingBagIcon, SizeTransition, SmileFilledIcon, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidLogo, SquidVector, StakeAction, StarLinesIcon, StartAction, StocksIcon, SuccessAction, SunIcon, SunOutlinedIcon, SunriseIcon, SunriseSmallIcon, SwapAction, SwapConfiguration, SwapDetailsView, SwapErrorIcon, SwapHeader, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProgressViewHeader, SwapProperties, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, TagIcon, TagIconFilled, TextSkeleton, ThemePreference, ThemeProvider, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenDetailsView, TokenGroup, TokenPair, Tooltip, TradingViewStepsIcon, TransactionAction, TransactionFilters, TransactionHeader, TransactionHeaderLayout, TransactionItem, TransactionProperties, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, TranslateIcon, TriangleExclamation, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WalletsView, WrapAction, XSocial, adjustColorForContrast, baseTailwindConfig, blendColors, cn, darkTheme, getColorBrightness, getContrastColor, getHexColorFromOpacityPercentage, getWalletCardBackground, hexToRgb, isValidHexColor, lightTheme, linkActionTimelineProps, parseColor, parseSquidTheme, pxToRem, remToPx, rgbToHex, spacing$1 as spacing, statusTextClassMap, transactionErrorPauseAnimation, transactionFailureAnimation, transactionHalfSuccessAnimation, transactionPendingAnimation, transactionProcessingAnimation, transactionRejectedAnimation, transactionSuccessAnimation, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useUserTheme, useVersion };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type ImageProps } from "./Image";
|
|
1
2
|
interface ImageGroupProps {
|
|
2
3
|
imageUrls: string[];
|
|
3
|
-
|
|
4
|
+
badge?: Omit<ImageProps, "border" | "size">;
|
|
4
5
|
}
|
|
5
|
-
export declare function ImageGroup({ imageUrls,
|
|
6
|
+
export declare function ImageGroup({ imageUrls, badge }: ImageGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface IconButtonProps extends React.ComponentProps<"button"> {
|
|
2
|
+
export interface IconButtonProps extends React.ComponentProps<"button"> {
|
|
3
3
|
icon: React.ReactNode;
|
|
4
4
|
}
|
|
5
5
|
export declare const IconButton: import("react").ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
1
2
|
export declare function ArrowRightIcon(): import("react/jsx-runtime").JSX.Element;
|
|
2
3
|
export declare function ArrowRightDownIcon(): import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export declare function ArrowRightUpIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,9 +18,7 @@ export declare function ChevronLargeDownIcon({ size, className, }: {
|
|
|
17
18
|
size?: string;
|
|
18
19
|
className?: string;
|
|
19
20
|
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export declare function ChevronTopIcon(
|
|
21
|
-
className?: string;
|
|
22
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function ChevronTopIcon(props: ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
23
22
|
export declare function ChevronLargeRightIcon({ size, className, }: {
|
|
24
23
|
size?: string;
|
|
25
24
|
className?: string;
|
|
@@ -62,6 +62,10 @@ export declare function LaptopIcon({ size, className, }: {
|
|
|
62
62
|
size?: string;
|
|
63
63
|
className?: string;
|
|
64
64
|
}): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export declare function CopyOutlinedIcon({ size, className, }: {
|
|
66
|
+
size?: string;
|
|
67
|
+
className?: string;
|
|
68
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
65
69
|
export declare function CopyIcon({ size, className, }: {
|
|
66
70
|
size?: string;
|
|
67
71
|
className?: string;
|
|
@@ -97,3 +101,7 @@ export declare function StarLinesIcon({ size, className, }: {
|
|
|
97
101
|
size?: string;
|
|
98
102
|
className?: string;
|
|
99
103
|
}): import("react/jsx-runtime").JSX.Element;
|
|
104
|
+
export declare function QrCodeIcon({ size, className, }: {
|
|
105
|
+
size?: string;
|
|
106
|
+
className?: string;
|
|
107
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,6 +8,7 @@ interface ModalProps {
|
|
|
8
8
|
maxHeight?: boolean;
|
|
9
9
|
width?: ModalWidth;
|
|
10
10
|
animateOpacity?: boolean;
|
|
11
|
+
backdropStyle?: React.CSSProperties;
|
|
11
12
|
}
|
|
12
|
-
export declare function Modal({ children, className, onBackdropClick, isOpen: _isOpen, maxHeight, width, animateOpacity, }: ModalProps): false | import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function Modal({ children, className, onBackdropClick, isOpen: _isOpen, maxHeight, width, animateOpacity, backdropStyle, }: ModalProps): false | import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -4,8 +4,6 @@ interface Token {
|
|
|
4
4
|
name: string;
|
|
5
5
|
symbol: string;
|
|
6
6
|
image: string;
|
|
7
|
-
color: string;
|
|
8
|
-
textColor: string;
|
|
9
7
|
chainId: string;
|
|
10
8
|
}
|
|
11
9
|
interface Chain {
|
|
@@ -33,8 +31,16 @@ interface TokenDetailsViewProps {
|
|
|
33
31
|
}>;
|
|
34
32
|
initialTimeframe?: Timeframe;
|
|
35
33
|
onTimeframeChange?: (timeframe: Timeframe) => void;
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
footerButtons: FooterButtonProps[];
|
|
35
|
+
backdropStyle?: React.CSSProperties;
|
|
36
|
+
colors?: {
|
|
37
|
+
backgroundColor: string;
|
|
38
|
+
textColor: string;
|
|
39
|
+
};
|
|
38
40
|
}
|
|
39
|
-
|
|
41
|
+
interface FooterButtonProps extends React.ComponentProps<"button"> {
|
|
42
|
+
label: string;
|
|
43
|
+
icon: React.ReactNode;
|
|
44
|
+
}
|
|
45
|
+
export declare const TokenDetailsView: ({ isOpen, onClose, token, chain, tokenPrice, priceChange, balance, balanceUSD, volume24h, marketCap, totalSupply, loading, onLikeToken, isFavorite, Chart, initialTimeframe, onTimeframeChange, footerButtons, backdropStyle, colors, }: TokenDetailsViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
46
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type IconButtonProps } from "../buttons";
|
|
3
|
+
interface ActionButton extends IconButtonProps {
|
|
4
|
+
key: NonNullable<React.Key>;
|
|
5
|
+
}
|
|
6
|
+
interface AccountListItemProps {
|
|
7
|
+
isConnected?: boolean;
|
|
8
|
+
imageUrls?: string[];
|
|
9
|
+
imageUrl?: string;
|
|
10
|
+
badgeUrl?: string;
|
|
11
|
+
actions?: ActionButton[];
|
|
12
|
+
title?: string;
|
|
13
|
+
subtitle?: string;
|
|
14
|
+
mainButton?: {
|
|
15
|
+
label: string;
|
|
16
|
+
} & React.ComponentProps<"button">;
|
|
17
|
+
}
|
|
18
|
+
export declare function AccountListItem({ isConnected, imageUrls, imageUrl, badgeUrl, actions, subtitle, title, mainButton, }: AccountListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -7,6 +7,7 @@ interface CaptionProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
7
7
|
isLoading?: boolean;
|
|
8
8
|
width?: string;
|
|
9
9
|
};
|
|
10
|
+
truncate?: boolean;
|
|
10
11
|
}
|
|
11
|
-
export declare function CaptionText({ children, bold, loading, tight, ...props }: CaptionProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function CaptionText({ children, bold, loading, tight, truncate, ...props }: CaptionProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from "@storybook/react";
|
|
2
|
+
import { AccountListItem } from "../../components/lists/AccountListItem";
|
|
3
|
+
declare const meta: Meta<typeof AccountListItem>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Disconnected: Story;
|
|
7
|
+
export declare const Connected: Story;
|
|
8
|
+
export declare const Actions: Story;
|
|
@@ -12,4 +12,6 @@ export declare const LargeVariant: Story;
|
|
|
12
12
|
export declare const SmallVariant: Story;
|
|
13
13
|
export declare const CompactVariant: Story;
|
|
14
14
|
export declare const LargeVariantWithItems: Story;
|
|
15
|
+
export declare const LargeVariantLongTokenName: Story;
|
|
15
16
|
export declare const CompactVariantWithItems: Story;
|
|
17
|
+
export declare const CompactVariantLongTokenName: Story;
|