@0xsquid/ui 2.2.10 → 2.3.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 +75 -32
- package/dist/cjs/types/components/badges/ImageGroup.d.ts +6 -0
- package/dist/cjs/types/components/badges/index.d.ts +1 -0
- package/dist/cjs/types/components/buttons/AccountsButton.d.ts +6 -0
- package/dist/cjs/types/components/buttons/index.d.ts +2 -1
- package/dist/cjs/types/components/icons/Generic.d.ts +15 -0
- package/dist/cjs/types/components/layout/ImageStack.d.ts +5 -2
- package/dist/cjs/types/components/layout/TokenDetailsView.d.ts +2 -1
- package/dist/cjs/types/components/navigation/Tabs.d.ts +18 -0
- package/dist/cjs/types/components/navigation/index.d.ts +1 -0
- package/dist/cjs/types/services/internal/colorService.d.ts +2 -1
- package/dist/cjs/types/stories/badges/ImageGroup.stories.d.ts +6 -0
- package/dist/cjs/types/stories/buttons/AccountsButton.stories.d.ts +6 -0
- package/dist/cjs/types/stories/layout/ImageStack.stories.d.ts +1 -0
- package/dist/cjs/types/stories/layout/TokenDetailsView.stories.d.ts +1 -0
- package/dist/cjs/types/stories/navigation/Tabs.stories.d.ts +7 -0
- package/dist/esm/index.js +69 -33
- package/dist/esm/types/components/badges/ImageGroup.d.ts +6 -0
- package/dist/esm/types/components/badges/index.d.ts +1 -0
- package/dist/esm/types/components/buttons/AccountsButton.d.ts +6 -0
- package/dist/esm/types/components/buttons/index.d.ts +2 -1
- package/dist/esm/types/components/icons/Generic.d.ts +15 -0
- package/dist/esm/types/components/layout/ImageStack.d.ts +5 -2
- package/dist/esm/types/components/layout/TokenDetailsView.d.ts +2 -1
- package/dist/esm/types/components/navigation/Tabs.d.ts +18 -0
- package/dist/esm/types/components/navigation/index.d.ts +1 -0
- package/dist/esm/types/services/internal/colorService.d.ts +2 -1
- package/dist/esm/types/stories/badges/ImageGroup.stories.d.ts +6 -0
- package/dist/esm/types/stories/buttons/AccountsButton.stories.d.ts +6 -0
- package/dist/esm/types/stories/layout/ImageStack.stories.d.ts +1 -0
- package/dist/esm/types/stories/layout/TokenDetailsView.stories.d.ts +1 -0
- package/dist/esm/types/stories/navigation/Tabs.stories.d.ts +7 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +36 -8
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -3612,6 +3612,14 @@ function IconLabel({ src, children, rounded }) {
|
|
|
3612
3612
|
return (jsxRuntime.jsxs("div", { className: "tw-inline-flex tw-items-center tw-gap-squid-xxs", children: [src && jsxRuntime.jsx(Image$1, { src: src, rounded: rounded, size: "medium" }), typeof children === "string" ? (jsxRuntime.jsx(CaptionText, { children: children })) : (children)] }));
|
|
3613
3613
|
}
|
|
3614
3614
|
|
|
3615
|
+
function ImageGroup({ imageUrls, badgeUrl }) {
|
|
3616
|
+
return (jsxRuntime.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) => (jsxRuntime.jsx(Image$1, { src: url, size: "medium", rounded: "xxs", style: {
|
|
3617
|
+
width: "24px",
|
|
3618
|
+
height: "24px",
|
|
3619
|
+
borderRadius: "7.5px",
|
|
3620
|
+
} }, url))), jsxRuntime.jsx("div", { className: "tw-absolute -tw-bottom-[1px] -tw-right-[1px] tw-bg-highlight-700", children: jsxRuntime.jsx(Image$1, { border: "outline-lg", src: badgeUrl, size: "medium", className: "tw-p-0.5" }) })] }));
|
|
3621
|
+
}
|
|
3622
|
+
|
|
3615
3623
|
function Approve() {
|
|
3616
3624
|
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "31", fill: "none", viewBox: "0 0 30 31", children: [jsxRuntime.jsx("path", { fill: "color(display-p3 0.7208 0.5750 0.9250)", d: "M0 5.5a5 5 0 015-5h20a5 5 0 015 5v20a5 5 0 01-5 5H5a5 5 0 01-5-5v-20z" }), jsxRuntime.jsx("path", { stroke: "color(display-p3 0.9840 0.9861 0.9904)", strokeLinejoin: "round", strokeWidth: "2", d: "M16.454 6.557L16 6.5c-.965 2.309-2.406 4.303-4.107 6.098-.558.589-.893 1.36-.893 2.172v6.455c0 .778.447 1.496 1.178 1.762 2.48.903 5.073 1.097 7.695.87 1.601-.14 2.856-1.376 3.21-2.944l.844-3.755A3 3 0 0021 13.5h-3l.949-3.084a3 3 0 00-2.495-3.86zM6 15.5a2 2 0 012-2 3 3 0 013 3v4a3 3 0 01-3 3 2 2 0 01-2-2v-6z" })] }));
|
|
3617
3625
|
}
|
|
@@ -3941,6 +3949,18 @@ function CodeBracketsIcon({ size = "20", className, }) {
|
|
|
3941
3949
|
function CommandIcon({ size = "22", className, }) {
|
|
3942
3950
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 22 22", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M8 17V17C8 16.0219 8.28951 15.0657 8.83205 14.2519L13.1679 7.74808C13.7105 6.93427 14 5.97808 14 5V5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
3943
3951
|
}
|
|
3952
|
+
function NewsIcon({ className }) {
|
|
3953
|
+
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "34", height: "28", viewBox: "0 0 34 28", fill: "none", className: className, children: [jsxRuntime.jsx("path", { d: "M22.8645 1H11.1245C5.53665 1 1 5.48783 1 11.0155C1 16.5432 5.53665 21.031 11.1245 21.031H11.4786C12.1978 22.5744 14.4882 26.3727 19.9765 26.9966C20.4965 27.0513 20.8285 26.4383 20.4744 26.0552C19.4011 24.895 18.0401 22.9356 18.8589 21.031H22.8755C28.4633 21.031 33 16.5432 33 11.0155C33 5.48783 28.4633 1 22.8755 1H22.8645Z", fill: "currentColor", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("text", { x: "17", y: "12", fontFamily: "Arial", fontSize: "10", fill: "black", textAnchor: "middle", dominantBaseline: "middle", children: "news" })] }));
|
|
3954
|
+
}
|
|
3955
|
+
function CelebrateIcon({ className, size = "27", }) {
|
|
3956
|
+
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 27 27", fill: "none", className: className, children: [jsxRuntime.jsxs("g", { clipPath: "url(#clip0_1739_52134)", children: [jsxRuntime.jsx("path", { d: "M15.2972 19.8873L1.47657 26.8989C0.615947 27.3376 -0.295303 26.4179 0.143447 25.5657L7.15501 11.7451L15.2972 19.8873Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M15.585 19.6563C16.5109 18.7304 15.4264 16.1447 13.1628 13.881C10.8991 11.6173 8.31342 10.5329 7.38752 11.4588C6.46162 12.3847 7.5461 14.9703 9.80978 17.234C12.0735 19.4977 14.6591 20.5822 15.585 19.6563Z", fill: "black" }), jsxRuntime.jsx("path", { d: "M12.7238 17.314C13.1456 16.8077 13.8459 15.9471 14.3606 15.5505C16.1241 14.1752 18.2588 13.2808 20.5284 13.4412C21.9544 13.5424 23.2622 14.3271 24.705 14.2849C25.8778 14.2512 27.1603 13.399 26.9578 12.0912C26.7553 10.7918 25.3125 10.0155 24.0891 9.76241C22.2581 9.38272 20.4356 9.84679 18.7903 10.6905C16.3856 11.9224 14.2256 13.7618 12.3356 15.6771C12.2934 15.7193 11.6944 16.369 11.6606 16.4027C11.6522 16.4027 11.9644 16.8921 12.7238 17.314Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M26.6625 22.3172C26.1478 22.8825 25.1691 22.6884 24.5953 22.1822C23.9878 21.6422 23.6419 20.8997 23.1272 20.2837C22.14 19.1194 21.2288 18.3094 19.9294 17.6091C19.4822 17.3644 17.8031 16.7822 17.9297 16.7906C18.1406 16.8075 18.3516 16.8244 18.5625 16.8497C18.9844 16.8919 19.4063 16.9509 19.8281 17.0184C20.6635 17.1534 21.4988 17.3306 22.3088 17.5753C23.8444 18.0394 25.5066 18.765 26.4516 20.1319C26.8988 20.7731 27.2025 21.7266 26.6625 22.3172Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M14.251 0.0504011C13.635 0.295089 13.4831 1.13884 13.7194 1.75478C13.9641 2.4129 14.4535 2.91915 14.791 3.52665C15.4238 4.68259 15.7866 5.66134 15.9553 6.92696C16.0144 7.36571 15.9806 8.41196 15.9891 8.79165C16.1578 8.2179 16.3181 7.55978 16.3941 7.19696C16.546 6.47978 16.6556 5.76259 16.7147 5.02853C16.8244 3.64478 16.7569 2.09228 15.9469 0.902589C15.5588 0.337276 14.8922 -0.194286 14.251 0.0504011Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M10.4878 15.0863C11.3737 14.6307 12.6647 13.0275 12.6647 13.0275C15.6769 9.38254 13.9134 4.29472 10.6565 1.48504C9.86342 0.801599 8.94374 0.194099 7.90592 0.0337867C6.87655 -0.126526 5.70374 0.261599 5.17217 1.16441C4.56467 2.22754 5.02874 3.6366 5.88936 4.50566C7.39124 6.03285 9.6778 6.37035 11.1628 7.9566C11.7787 8.60629 12.1837 9.45847 12.2428 10.3697C12.3525 12.1585 9.6778 13.7194 9.55967 13.7785C9.98155 14.5463 9.98155 14.5463 10.4878 15.0863Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M2.77594 11.9896C4.27177 11.9896 5.48438 10.777 5.48438 9.28119C5.48438 7.78536 4.27177 6.57275 2.77594 6.57275C1.28011 6.57275 0.0675049 7.78536 0.0675049 9.28119C0.0675049 10.777 1.28011 11.9896 2.77594 11.9896Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M24.0891 5.79674C25.6595 5.79674 26.9325 4.52369 26.9325 2.9533C26.9325 1.38291 25.6595 0.109863 24.0891 0.109863C22.5187 0.109863 21.2456 1.38291 21.2456 2.9533C21.2456 4.52369 22.5187 5.79674 24.0891 5.79674Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M19.6341 9.13762C20.5148 9.13762 21.2287 8.42365 21.2287 7.54293C21.2287 6.66221 20.5148 5.94824 19.6341 5.94824C18.7533 5.94824 18.0394 6.66221 18.0394 7.54293C18.0394 8.42365 18.7533 9.13762 19.6341 9.13762Z", fill: "currentColor" })] }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_1739_52134", children: jsxRuntime.jsx("rect", { width: "27", height: "27", fill: "white" }) }) })] }));
|
|
3957
|
+
}
|
|
3958
|
+
function SmileFilledIcon({ className, size = "27", }) {
|
|
3959
|
+
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 27 27", fill: "none", className: className, children: [jsxRuntime.jsx("path", { d: "M13.3473 25.6812C20.1666 25.6812 25.6947 20.1561 25.6947 13.3406C25.6947 6.52507 20.1666 1 13.3473 1C6.52809 1 1 6.52507 1 13.3406C1 20.1561 6.52809 25.6812 13.3473 25.6812Z", fill: "currentColor", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M12.2618 16.4004C13.5833 18.38 16.1579 19.2247 18.4518 18.292C20.7457 17.3592 21.9008 15.1253 21.5941 12.8652", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M12.2618 16.4004C13.5833 18.38 16.1579 19.2247 18.4518 18.292C20.7457 17.3592 21.9008 15.1253 21.5941 12.8652", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M19.6634 10.5012C19.2946 9.92059 18.557 9.65636 17.8879 9.9108C17.2416 10.1555 16.8695 10.8014 16.9413 11.4571", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M19.6634 10.5012C19.2946 9.92059 18.557 9.65636 17.8879 9.9108C17.2416 10.1555 16.8695 10.8014 16.9413 11.4571", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M15.121 12.0857C14.7522 11.5051 14.0146 11.2408 13.3455 11.4953C12.6992 11.7399 12.3271 12.3858 12.3989 13.0415", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M15.121 12.0857C14.7522 11.5051 14.0146 11.2408 13.3455 11.4953C12.6992 11.7399 12.3271 12.3858 12.3989 13.0415", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M22.3289 12.7085C21.8132 12.8325 21.2714 12.839 20.7525 12.7346L22.3289 12.7085Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M22.3289 12.7085C21.8132 12.8325 21.2714 12.839 20.7525 12.7346", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
3960
|
+
}
|
|
3961
|
+
function StarLinesIcon({ size = "20", className, }) {
|
|
3962
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: jsxRuntime.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" }) }));
|
|
3963
|
+
}
|
|
3944
3964
|
|
|
3945
3965
|
function EmptyHeartIcon({ className }) {
|
|
3946
3966
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", className: className, children: jsxRuntime.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" }) }));
|
|
@@ -4274,6 +4294,28 @@ function WalletLink({ imageURI, address }) {
|
|
|
4274
4294
|
return (jsxRuntime.jsx(IconLabel, { src: imageURI, rounded: "full", children: jsxRuntime.jsx(HashLink, { hash: address, showCopyButton: true, children: jsxRuntime.jsx(BodyText, { size: "small", children: truncateHash(address) }) }) }));
|
|
4275
4295
|
}
|
|
4276
4296
|
|
|
4297
|
+
const extraPaddingMap = {
|
|
4298
|
+
"outline-sm": "1px",
|
|
4299
|
+
"outline-lg": "3px",
|
|
4300
|
+
};
|
|
4301
|
+
function ImageStack(_a) {
|
|
4302
|
+
var { imageUrls, spacing, stackOnTop = true, addExtraPadding, removeDuplicates = false } = _a, imageProps = __rest$1(_a, ["imageUrls", "spacing", "stackOnTop", "addExtraPadding", "removeDuplicates"]);
|
|
4303
|
+
const imagesToRender = removeDuplicates ? [...new Set(imageUrls)] : imageUrls;
|
|
4304
|
+
return (jsxRuntime.jsx("div", { style: {
|
|
4305
|
+
// @ts-expect-error Custom CSS property
|
|
4306
|
+
"--image-stack-spacing": spacing,
|
|
4307
|
+
padding: addExtraPadding && imageProps.border
|
|
4308
|
+
? extraPaddingMap[imageProps.border]
|
|
4309
|
+
: undefined,
|
|
4310
|
+
}, className: "tw-flex tw-items-center tw-space-x-[--image-stack-spacing]", children: imagesToRender.map((url, index, self) => (jsxRuntime.jsx(Image$1, Object.assign({ src: url, containerProps: stackOnTop
|
|
4311
|
+
? {
|
|
4312
|
+
style: {
|
|
4313
|
+
zIndex: self.length - index,
|
|
4314
|
+
},
|
|
4315
|
+
}
|
|
4316
|
+
: undefined }, imageProps), index))) }));
|
|
4317
|
+
}
|
|
4318
|
+
|
|
4277
4319
|
function Chip(_a) {
|
|
4278
4320
|
var { label, icon } = _a, props = __rest$1(_a, ["label", "icon"]);
|
|
4279
4321
|
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-flex tw-h-squid-m tw-items-center tw-justify-center tw-rounded-squid-m tw-bg-grey-500 tw-text-grey-900", icon && "tw-w-squid-m", props.className), children: label ? (jsxRuntime.jsx(CaptionText, { className: "tw-min-w-squid-xl tw-text-nowrap tw-px-squid-xxs tw-text-center", children: label })) : (icon) })));
|
|
@@ -4341,6 +4383,11 @@ const ButtonHoverOverlay = ({ className }) => {
|
|
|
4341
4383
|
return (jsxRuntime.jsx("span", { className: cn("tw-absolute tw-inset-0 tw-z-0 tw-hidden tw-h-full tw-w-full tw-bg-material-light-thin group-hover/base-button:tw-block", className) }));
|
|
4342
4384
|
};
|
|
4343
4385
|
|
|
4386
|
+
function AccountsButton(_a) {
|
|
4387
|
+
var { imageUrls } = _a, props = __rest$1(_a, ["imageUrls"]);
|
|
4388
|
+
return (jsxRuntime.jsx(Button$1, Object.assign({}, props, { size: "md", variant: "tertiary", className: cn("tw-group/accounts-button", props.className), children: jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx(ImageStack, { imageUrls: imageUrls, spacing: "-10px", border: "outline-lg", size: "medium", rounded: "xxs", className: "!tw-outline-button-md-tertiary-bg group-hover/accounts-button:!tw-outline-material-light-blend-grey-800" }), jsxRuntime.jsx(BodyText, { size: "small", children: "Accounts" }), jsxRuntime.jsx(ChevronDownSmallIcon, { size: "16" })] }) })));
|
|
4389
|
+
}
|
|
4390
|
+
|
|
4344
4391
|
function AddressButton(_a) {
|
|
4345
4392
|
var { label, imageUrl, badgeUrl, isLoading } = _a, props = __rest$1(_a, ["label", "imageUrl", "badgeUrl", "isLoading"]);
|
|
4346
4393
|
return (jsxRuntime.jsx(Button$1, Object.assign({ size: "md", variant: "tertiary" }, props, { disabled: isLoading, className: !isLoading && imageUrl ? "tw-pl-1 tw-pr-4" : "!tw-px-4", children: isLoading ? (jsxRuntime.jsx("span", { className: "tw-mx-auto tw-px-4 tw-text-grey-300", children: jsxRuntime.jsx(Loader, {}) })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(BadgeImage, { image: {
|
|
@@ -19202,27 +19249,6 @@ function DropdownMenuTitle({ title }) {
|
|
|
19202
19249
|
return (jsxRuntime.jsx("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-self-stretch tw-p-squid-xs tw-pb-squid-xxs tw-text-material-light-average", children: jsxRuntime.jsx(CaptionText, { children: title }) }));
|
|
19203
19250
|
}
|
|
19204
19251
|
|
|
19205
|
-
const extraPaddingMap = {
|
|
19206
|
-
"outline-sm": "1px",
|
|
19207
|
-
"outline-lg": "3px",
|
|
19208
|
-
};
|
|
19209
|
-
function ImageStack(_a) {
|
|
19210
|
-
var { imageUrls, spacing, stackOnTop = true, addExtraPadding } = _a, imageProps = __rest$1(_a, ["imageUrls", "spacing", "stackOnTop", "addExtraPadding"]);
|
|
19211
|
-
return (jsxRuntime.jsx("div", { style: {
|
|
19212
|
-
// @ts-expect-error Custom CSS property
|
|
19213
|
-
"--image-stack-spacing": spacing,
|
|
19214
|
-
padding: addExtraPadding && imageProps.border
|
|
19215
|
-
? extraPaddingMap[imageProps.border]
|
|
19216
|
-
: undefined,
|
|
19217
|
-
}, className: "tw-flex tw-items-center tw-space-x-[--image-stack-spacing]", children: imageUrls.map((url, index, self) => (jsxRuntime.jsx(Image$1, Object.assign({ src: url, containerProps: stackOnTop
|
|
19218
|
-
? {
|
|
19219
|
-
style: {
|
|
19220
|
-
zIndex: self.length - index,
|
|
19221
|
-
},
|
|
19222
|
-
}
|
|
19223
|
-
: undefined }, imageProps), index))) }));
|
|
19224
|
-
}
|
|
19225
|
-
|
|
19226
19252
|
function useOnClickOutside(callback, externalRef) {
|
|
19227
19253
|
const internalRef = React$1.useRef(null);
|
|
19228
19254
|
const ref = externalRef !== null && externalRef !== void 0 ? externalRef : internalRef;
|
|
@@ -19547,10 +19573,10 @@ function TokenGroup({ isSelected = false, tokenItems, priceChange, balance, bala
|
|
|
19547
19573
|
}
|
|
19548
19574
|
: undefined, className: cn("tw-absolute", isCollapsible
|
|
19549
19575
|
? "-tw-bottom-0 -tw-right-0"
|
|
19550
|
-
: "-tw-bottom-[3px] -tw-right-[3px]"), children: jsxRuntime.jsx(ImageStack, { spacing: "-10px", addExtraPadding: !isCollapsible, size: "medium", rounded: "xxs", border: "outline-lg", imageUrls: isCollapsible
|
|
19576
|
+
: "-tw-bottom-[3px] -tw-right-[3px]"), children: jsxRuntime.jsx(ImageStack, { spacing: "-10px", removeDuplicates: true, addExtraPadding: !isCollapsible, size: "medium", rounded: "xxs", border: "outline-lg", imageUrls: isCollapsible
|
|
19551
19577
|
? tokenItems === null || tokenItems === void 0 ? void 0 : tokenItems.slice(0, MAX_PREVIEW_ITEMS).map((item) => item.chainImageUrl)
|
|
19552
19578
|
: [chainImageUrl] }) }))] }), jsxRuntime.jsxs("div", { className: cn("tw-flex tw-flex-1 tw-flex-col tw-items-start tw-justify-center tw-text-grey-300", isCollapsed &&
|
|
19553
|
-
(isSmallVariant ? "tw-gap-squid-xs" : "tw-gap-squid-xxs"), isSmallVariant && "tw-h-[45px]"), children: [jsxRuntime.jsxs("div", { className: cn("tw-flex tw-gap-squid-xxs tw-self-stretch", isSmallVariant ? "tw-h-[13px] tw-items-end" : "tw-items-center", isLargeVariant && "tw-h-squid-m"), children: [jsxRuntime.jsx(BodyText, { size: "small", className: "tw-h-fit !tw-leading-[13px]", children: name }), (!isCollapsed || isCompactVariant) && (jsxRuntime.jsx(ChevronTopIcon, { className: cn("tw-text-grey-500", isCollapsed ? "tw-rotate-90" : "tw-rotate-180") })), balanceUsd ? (jsxRuntime.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 ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { className: "!tw-leading-[10px] tw-opacity-66", children: "$" }), jsxRuntime.jsx(CaptionText, { className: "!tw-leading-[10px]", children: balanceUsd })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[10px] tw-opacity-66", children: "$" }), jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[10px]", children: balanceUsd })] })) })) : null] }), !isCompactVariant && (jsxRuntime.jsx(Collapse, { collapsed: !isCollapsed, contentsClassName: "tw-flex tw-w-full tw-items-start tw-justify-between", className: "tw-w-full", children: jsxRuntime.jsxs("div", { className: cn("tw-flex tw-w-full tw-items-center tw-justify-between tw-self-stretch", isLargeVariant && "tw-h-squid-m"), children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-1 tw-items-center tw-gap-squid-xxs tw-text-grey-400", children: jsxRuntime.jsxs(CaptionText, { className: "!tw-leading-[10px]", children: [balance, symbol] }) }), priceChange && jsxRuntime.jsx(PriceChange, { value: priceChange })] }) }))] })] }), jsxRuntime.jsx(Collapse, { collapsed: isCollapsed, children: jsxRuntime.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) => (jsxRuntime.jsx(TokenGroup, Object.assign({}, token, { extraSpacing: false, variant: isCompactVariant ? "small" : "large", onClick: () => onChildClick === null || onChildClick === void 0 ? void 0 : onChildClick(token) }), token.chainImageUrl))) }) })] }));
|
|
19579
|
+
(isSmallVariant ? "tw-gap-squid-xs" : "tw-gap-squid-xxs"), isSmallVariant && "tw-h-[45px]"), children: [jsxRuntime.jsxs("div", { className: cn("tw-flex tw-gap-squid-xxs tw-self-stretch", isSmallVariant ? "tw-h-[13px] tw-items-end" : "tw-items-center", isLargeVariant && "tw-h-squid-m"), children: [jsxRuntime.jsx(BodyText, { size: "small", className: "tw-h-fit !tw-leading-[13px]", children: name }), (!isCollapsed || isCompactVariant) && (jsxRuntime.jsx(ChevronTopIcon, { className: cn("tw-text-grey-500", isCollapsed ? "tw-rotate-90" : "tw-rotate-180") })), balanceUsd ? (jsxRuntime.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 ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { className: "!tw-leading-[10px] tw-opacity-66", children: "$" }), jsxRuntime.jsx(CaptionText, { className: "!tw-leading-[10px]", children: balanceUsd })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[10px] tw-opacity-66", children: "$" }), jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[10px]", children: balanceUsd })] })) })) : null] }), !isCompactVariant && (jsxRuntime.jsx(Collapse, { collapsed: !isCollapsed, contentsClassName: "tw-flex tw-w-full tw-items-start tw-justify-between", className: "tw-w-full", children: jsxRuntime.jsxs("div", { className: cn("tw-flex tw-w-full tw-items-center tw-justify-between tw-self-stretch", isLargeVariant && "tw-h-squid-m"), children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-1 tw-items-center tw-gap-squid-xxs tw-text-grey-400", children: jsxRuntime.jsxs(CaptionText, { className: "!tw-leading-[10px]", children: [balance, symbol] }) }), priceChange && jsxRuntime.jsx(PriceChange, { value: priceChange })] }) }))] })] }), jsxRuntime.jsx(Collapse, { collapsed: isCollapsed, children: jsxRuntime.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) => (jsxRuntime.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))) }) })] }));
|
|
19554
19580
|
}
|
|
19555
19581
|
|
|
19556
19582
|
function ActionLayout({ lineCap = jsxRuntime.jsx(Timeline.CapTop, {}), status = "executed", showTimeline = true, showBody = true, nextStatus, statusIcon, description, title, icon, children, }) {
|
|
@@ -19813,7 +19839,7 @@ function Toast({ headerContent, actionsContent, description, chipLabel, title, }
|
|
|
19813
19839
|
|
|
19814
19840
|
const DEFAULT_TIMEFRAME = "1D";
|
|
19815
19841
|
const DefaultChart = ({ timeframe, }) => (jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-w-full tw-items-center tw-justify-center", children: jsxRuntime.jsxs(BodyText, { size: "small", children: ["Chart (", timeframe, ")"] }) }));
|
|
19816
|
-
const TokenModalHeader = ({ token, chain, onLikeToken, onClose, }) => (jsxRuntime.jsxs("div", { className: "tw-flex tw-w-full tw-items-start tw-justify-between", children: [jsxRuntime.jsx("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-pb-squid-xs", children: jsxRuntime.jsx(BadgeImage, { image: {
|
|
19842
|
+
const TokenModalHeader = ({ token, chain, onLikeToken, onClose, isFavorite, }) => (jsxRuntime.jsxs("div", { className: "tw-flex tw-w-full tw-items-start tw-justify-between", children: [jsxRuntime.jsx("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-pb-squid-xs", children: jsxRuntime.jsx(BadgeImage, { image: {
|
|
19817
19843
|
src: token.image,
|
|
19818
19844
|
size: "xxlarge",
|
|
19819
19845
|
rounded: "full",
|
|
@@ -19823,7 +19849,7 @@ const TokenModalHeader = ({ token, chain, onLikeToken, onClose, }) => (jsxRuntim
|
|
|
19823
19849
|
size: "medium",
|
|
19824
19850
|
rounded: "xxs",
|
|
19825
19851
|
border: "outline-lg",
|
|
19826
|
-
} }) }), jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsxRuntime.jsx(IconButton, { className: "tw-text-grey-300", onClick: onLikeToken, icon: jsxRuntime.jsx(EmptyHeartIcon, {}) }), jsxRuntime.jsx(IconButton, { className: "tw-text-grey-300", onClick: onClose, icon: jsxRuntime.jsx(CircleXFilledIcon, {}) })] })] }));
|
|
19852
|
+
} }) }), jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsxRuntime.jsx(IconButton, { className: "tw-group/token-detail-fav-icon tw-text-grey-300", onClick: onLikeToken, icon: isFavorite ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(FilledHeartIcon, { className: "tw-block group-hover/token-detail-fav-icon:tw-hidden" }), jsxRuntime.jsx(BrokenHeartIcon, { className: "tw-hidden group-hover/token-detail-fav-icon:tw-block" })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(EmptyHeartIcon, { className: "tw-block group-hover/token-detail-fav-icon:tw-hidden" }), jsxRuntime.jsx(FilledHeartIcon, { className: "tw-hidden group-hover/token-detail-fav-icon:tw-block" })] })) }), jsxRuntime.jsx(IconButton, { className: "tw-text-grey-300", onClick: onClose, icon: jsxRuntime.jsx(CircleXFilledIcon, {}) })] })] }));
|
|
19827
19853
|
const TokenInfo = ({ token, tokenPrice, priceChange, loading, }) => (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(BodyText, { size: "large", loading: { isLoading: loading, width: "100px" }, children: tokenPrice.toLocaleString() }), jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-row tw-justify-between", children: [jsxRuntime.jsx(BodyText, { size: "small", children: token.name }), jsxRuntime.jsx(PriceChange, { value: priceChange, variant: "large" })] })] }));
|
|
19828
19854
|
const BalanceInfo = ({ balance, balanceUSD, token, loading, }) => (jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col", children: [jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-400", children: "Balance" }), jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-row tw-justify-between", children: [jsxRuntime.jsxs("span", { className: "tw-flex tw-flex-row tw-items-center tw-gap-squid-xxs", children: [jsxRuntime.jsx("img", { src: token.image, alt: token.name, className: "tw-h-squid-m tw-w-squid-m tw-rounded-full" }), jsxRuntime.jsxs(BodyText, { size: "small", loading: { isLoading: loading, width: "80px" }, children: [balance, " ", token.symbol] })] }), jsxRuntime.jsxs(CaptionText, { className: "tw-text-grey-500", loading: { isLoading: loading, width: "60px" }, children: [jsxRuntime.jsx("span", { className: "tw-opacity-66", children: "$" }), balanceUSD] })] })] }));
|
|
19829
19855
|
const MarketDataItem = ({ label, value, showDollar, loading, }) => (jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col", children: [jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: label }), jsxRuntime.jsxs(CaptionText, { loading: { isLoading: loading, width: "60px" }, children: [showDollar && jsxRuntime.jsx("span", { className: "tw-text-grey-500", children: "$" }), value] })] }));
|
|
@@ -19849,13 +19875,13 @@ const ChartTimeframeSelector = ({ selectedTimeframe, onTimeframeChange, }) => {
|
|
|
19849
19875
|
onTimeframeChange(timeframe);
|
|
19850
19876
|
} }, timeframe))) }));
|
|
19851
19877
|
};
|
|
19852
|
-
const TokenDetailsView = ({ isOpen, onClose, token, chain, tokenPrice, priceChange, balance, balanceUSD, volume24h, marketCap, totalSupply, loading, onLikeToken, Chart = DefaultChart, initialTimeframe = DEFAULT_TIMEFRAME, onTimeframeChange = () => { }, onSwapFrom, onSwapTo, }) => {
|
|
19878
|
+
const TokenDetailsView = ({ isOpen, onClose, token, chain, tokenPrice, priceChange, balance, balanceUSD, volume24h, marketCap, totalSupply, loading, onLikeToken, isFavorite, Chart = DefaultChart, initialTimeframe = DEFAULT_TIMEFRAME, onTimeframeChange = () => { }, onSwapFrom, onSwapTo, }) => {
|
|
19853
19879
|
const [selectedTimeframe, setSelectedTimeframe] = React$1.useState(initialTimeframe);
|
|
19854
19880
|
const handleTimeframeChange = (timeframe) => {
|
|
19855
19881
|
setSelectedTimeframe(timeframe);
|
|
19856
19882
|
onTimeframeChange(timeframe);
|
|
19857
19883
|
};
|
|
19858
|
-
return (jsxRuntime.jsx(Modal, { animateOpacity: true, isOpen: isOpen, onBackdropClick: onClose, width: "extra-large", className: "tw-my-auto", children: jsxRuntime.jsxs(ModalContent, { className: "tw-flex tw-min-h-[631px] tw-flex-col !tw-bg-grey-900 tw-pt-squid-m", children: [jsxRuntime.jsxs("div", { className: "tw-px-squid-m", children: [jsxRuntime.jsx(TokenModalHeader, { token: token, chain: chain,
|
|
19884
|
+
return (jsxRuntime.jsx(Modal, { animateOpacity: true, isOpen: isOpen, onBackdropClick: onClose, width: "extra-large", className: "tw-my-auto", children: jsxRuntime.jsxs(ModalContent, { className: "tw-flex tw-min-h-[631px] tw-flex-col !tw-bg-grey-900 tw-pt-squid-m", children: [jsxRuntime.jsxs("div", { className: "tw-px-squid-m", children: [jsxRuntime.jsx(TokenModalHeader, { token: token, chain: chain, onLikeToken: onLikeToken, isFavorite: isFavorite, onClose: onClose }), jsxRuntime.jsx(TokenInfo, { token: token, tokenPrice: tokenPrice, priceChange: priceChange, loading: loading })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-w-full tw-grow tw-flex-col tw-justify-between tw-text-center", children: [jsxRuntime.jsx("span", { className: "tw-flex tw-h-full tw-grow tw-items-center tw-justify-center", children: loading ? jsxRuntime.jsx(Loader, {}) : jsxRuntime.jsx(Chart, { timeframe: selectedTimeframe }) }), jsxRuntime.jsx(ChartTimeframeSelector, { selectedTimeframe: selectedTimeframe, onTimeframeChange: handleTimeframeChange })] }), jsxRuntime.jsx("hr", { className: "tw-my-squid-xs tw-h-px tw-border-0 tw-bg-material-light-thin" }), jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col", children: [jsxRuntime.jsxs("div", { className: "tw-gap-squid-sm tw-flex tw-flex-col tw-px-squid-m", children: [jsxRuntime.jsx(BalanceInfo, { balance: balance, balanceUSD: balanceUSD, token: token, loading: loading }), jsxRuntime.jsx("hr", { className: "tw-my-squid-xs tw-h-px tw-border-0 tw-bg-material-light-thin" }), jsxRuntime.jsx(TokenMarketData, { volume24h: volume24h, marketCap: marketCap, totalSupply: totalSupply, loading: loading })] }), jsxRuntime.jsx("hr", { className: "tw-my-squid-xs tw-h-px tw-border-0 tw-bg-material-light-thin" }), jsxRuntime.jsx(SwapButtons, { token: token, onSwapFrom: onSwapFrom, onSwapTo: onSwapTo })] })] }) }));
|
|
19859
19885
|
};
|
|
19860
19886
|
|
|
19861
19887
|
const WIDTH_SM = "69";
|
|
@@ -27578,16 +27604,16 @@ function FilterButton({ selected, numApplied = 0, onClick, }) {
|
|
|
27578
27604
|
: "!tw-border-transparent !tw-bg-grey-800 !tw-text-grey-500"), onClick: onClick, children: jsxRuntime.jsx(FilterIcon, {}) }), numApplied > 0 && (jsxRuntime.jsx("div", { className: "tw-absolute tw-right-0 tw-top-0 tw-h-squid-m tw-w-squid-xl -tw-translate-y-1/2 tw-translate-x-1/2 tw-rounded-full tw-bg-highlight-700 tw-text-center tw-leading-[1]", children: jsxRuntime.jsx(CaptionText, { children: numApplied }) }))] }));
|
|
27579
27605
|
}
|
|
27580
27606
|
|
|
27581
|
-
function SettingsButton({ label, isSelected = false, onClick, }) {
|
|
27582
|
-
return (jsxRuntime.jsx("button", { onClick: onClick, className: cn("tw-flex tw-h-[30px] tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-border-2 tw-border-transparent tw-p-squid-xs -tw-outline-offset-2 hover:tw-bg-material-light-thin", isSelected && "tw-outline tw-outline-2 tw-outline-royal-500"), children: jsxRuntime.jsx(CaptionText, { className: "!tw-font-medium", children: label }) }));
|
|
27583
|
-
}
|
|
27584
|
-
|
|
27585
27607
|
const IconButton = React$1.forwardRef((_a, ref) => {
|
|
27586
27608
|
var { icon, disabled = false } = _a, props = __rest$1(_a, ["icon", "disabled"]);
|
|
27587
27609
|
return (jsxRuntime.jsx("button", Object.assign({}, props, { ref: ref, disabled: disabled, className: cn("tw-flex tw-h-8 tw-w-8 tw-min-w-8 tw-items-center tw-justify-center tw-rounded-squid-xs hover:tw-bg-material-light-thin", disabled ? "tw-text-grey-600" : "tw-text-grey-300", props.className), children: icon })));
|
|
27588
27610
|
});
|
|
27589
27611
|
IconButton.displayName = "IconButton";
|
|
27590
27612
|
|
|
27613
|
+
function SettingsButton({ label, isSelected = false, onClick, }) {
|
|
27614
|
+
return (jsxRuntime.jsx("button", { onClick: onClick, className: cn("tw-flex tw-h-[30px] tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-border-2 tw-border-transparent tw-p-squid-xs -tw-outline-offset-2 hover:tw-bg-material-light-thin", isSelected && "tw-outline tw-outline-2 tw-outline-royal-500"), children: jsxRuntime.jsx(CaptionText, { className: "!tw-font-medium", children: label }) }));
|
|
27615
|
+
}
|
|
27616
|
+
|
|
27591
27617
|
function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }) {
|
|
27592
27618
|
const matchesMobileLg = useMediaQuery(MEDIA_QUERIES.MOBILE_LG.media);
|
|
27593
27619
|
return (jsxRuntime.jsxs(ProductCard, { children: [jsxRuntime.jsx(NavigationBar, { displayBackButton: true, subtitle: "Select a token to receive" }), jsxRuntime.jsx("div", { className: "tw-max-h-[60px] tw-px-squid-m tw-py-squid-xs", children: jsxRuntime.jsx(Input, {}) }), jsxRuntime.jsx(BorderedContainer, { children: jsxRuntime.jsxs("div", { className: cn("tw-grid", matchesMobileLg
|
|
@@ -69555,7 +69581,17 @@ function rgbToHex(r, g, b) {
|
|
|
69555
69581
|
// let bgColor = '#17191C'
|
|
69556
69582
|
// let resultingColor = blendColors(foregroundColor, bgColor)
|
|
69557
69583
|
// console.log(resultingColor) // Output: ~#2f3033
|
|
69558
|
-
function blendColors(foreground, background
|
|
69584
|
+
function blendColors(foreground, background) {
|
|
69585
|
+
const fg = hexToRgb(foreground);
|
|
69586
|
+
const bg = hexToRgb(background);
|
|
69587
|
+
if (fg == null || bg == null)
|
|
69588
|
+
return null;
|
|
69589
|
+
const r = Math.round(fg.r * fg.a + bg.r * (1 - fg.a));
|
|
69590
|
+
const g = Math.round(fg.g * fg.a + bg.g * (1 - fg.a));
|
|
69591
|
+
const b = Math.round(fg.b * fg.a + bg.b * (1 - fg.a));
|
|
69592
|
+
return rgbToHex(r, g, b);
|
|
69593
|
+
}
|
|
69594
|
+
function adjustColorForContrast(foreground, background, factor = 1) {
|
|
69559
69595
|
const fg = parseColor(foreground);
|
|
69560
69596
|
const bg = parseColor(background);
|
|
69561
69597
|
if (fg == null || bg == null)
|
|
@@ -69614,6 +69650,7 @@ function ThemeProvider(_a) {
|
|
|
69614
69650
|
}
|
|
69615
69651
|
|
|
69616
69652
|
exports.ANIMATION_DURATIONS = ANIMATION_DURATIONS;
|
|
69653
|
+
exports.AccountsButton = AccountsButton;
|
|
69617
69654
|
exports.ActionLayout = ActionLayout;
|
|
69618
69655
|
exports.ActionLineOutRow = ActionLineOutRow;
|
|
69619
69656
|
exports.ActionProperties = ActionProperties;
|
|
@@ -69671,6 +69708,7 @@ exports.CSS_VARS = CSS_VARS;
|
|
|
69671
69708
|
exports.Calendar = Calendar;
|
|
69672
69709
|
exports.CaptionText = CaptionText;
|
|
69673
69710
|
exports.CatSquareIcon = CatSquareIcon;
|
|
69711
|
+
exports.CelebrateIcon = CelebrateIcon;
|
|
69674
69712
|
exports.ChainLink = ChainLink;
|
|
69675
69713
|
exports.Checkmark1Icon = Checkmark1Icon;
|
|
69676
69714
|
exports.Checkmark2Icon = Checkmark2Icon;
|
|
@@ -69754,6 +69792,7 @@ exports.HomeIcon = HomeIcon;
|
|
|
69754
69792
|
exports.IconButton = IconButton;
|
|
69755
69793
|
exports.IconLabel = IconLabel;
|
|
69756
69794
|
exports.Image = Image$1;
|
|
69795
|
+
exports.ImageGroup = ImageGroup;
|
|
69757
69796
|
exports.ImageIcon = ImageIcon;
|
|
69758
69797
|
exports.ImageSparkle = ImageSparkle;
|
|
69759
69798
|
exports.IncompleteAction = IncompleteAction;
|
|
@@ -69788,6 +69827,7 @@ exports.ModalContent = ModalContent;
|
|
|
69788
69827
|
exports.ModalContentDivider = ModalContentDivider;
|
|
69789
69828
|
exports.MoonIcon = MoonIcon;
|
|
69790
69829
|
exports.NavigationBar = NavigationBar;
|
|
69830
|
+
exports.NewsIcon = NewsIcon;
|
|
69791
69831
|
exports.NewspaperIcon = NewspaperIcon;
|
|
69792
69832
|
exports.NotAllowedIcon = NotAllowedIcon;
|
|
69793
69833
|
exports.NumericInput = NumericInput;
|
|
@@ -69826,6 +69866,7 @@ exports.SettingsSlider = SettingsSlider;
|
|
|
69826
69866
|
exports.SettingsSliderIcon = SettingsSliderIcon;
|
|
69827
69867
|
exports.ShoppingBagIcon = ShoppingBagIcon;
|
|
69828
69868
|
exports.SizeTransition = SizeTransition;
|
|
69869
|
+
exports.SmileFilledIcon = SmileFilledIcon;
|
|
69829
69870
|
exports.SmileIcon = SmileIcon;
|
|
69830
69871
|
exports.SnapIcon = SnapIcon;
|
|
69831
69872
|
exports.SortIcon = SortIcon;
|
|
@@ -69837,6 +69878,7 @@ exports.SquareArrowTopRight2Icon = SquareArrowTopRight2Icon;
|
|
|
69837
69878
|
exports.SquidLogo = SquidLogo;
|
|
69838
69879
|
exports.SquidVector = SquidVector;
|
|
69839
69880
|
exports.StakeAction = StakeAction;
|
|
69881
|
+
exports.StarLinesIcon = StarLinesIcon;
|
|
69840
69882
|
exports.StartAction = StartAction;
|
|
69841
69883
|
exports.StocksIcon = StocksIcon;
|
|
69842
69884
|
exports.SuccessAction = SuccessAction;
|
|
@@ -69896,6 +69938,7 @@ exports.WalletLink = WalletLink;
|
|
|
69896
69938
|
exports.WalletsView = WalletsView;
|
|
69897
69939
|
exports.WrapAction = WrapAction;
|
|
69898
69940
|
exports.XSocial = XSocial;
|
|
69941
|
+
exports.adjustColorForContrast = adjustColorForContrast;
|
|
69899
69942
|
exports.baseTailwindConfig = baseTailwindConfig;
|
|
69900
69943
|
exports.blendColors = blendColors;
|
|
69901
69944
|
exports.cn = cn;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface AccountsButtonProps extends React.ComponentProps<"button"> {
|
|
3
|
+
imageUrls: string[];
|
|
4
|
+
}
|
|
5
|
+
export declare function AccountsButton({ imageUrls, ...props }: AccountsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./AccountsButton";
|
|
1
2
|
export * from "./AddressButton";
|
|
2
3
|
export * from "./ArrowButton";
|
|
3
4
|
export * from "./AssetsButton";
|
|
@@ -6,6 +7,6 @@ export * from "./Button";
|
|
|
6
7
|
export * from "./Chip";
|
|
7
8
|
export * from "./FeeButton";
|
|
8
9
|
export * from "./FilterButton";
|
|
9
|
-
export * from "./SettingsButton";
|
|
10
10
|
export * from "./IconButton";
|
|
11
11
|
export * from "./SettingsButton";
|
|
12
|
+
export * from "./SettingsButton";
|
|
@@ -82,3 +82,18 @@ export declare function CommandIcon({ size, className, }: {
|
|
|
82
82
|
size?: string;
|
|
83
83
|
className?: string;
|
|
84
84
|
}): import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
export declare function NewsIcon({ className }: {
|
|
86
|
+
className?: string;
|
|
87
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
88
|
+
export declare function CelebrateIcon({ className, size, }: {
|
|
89
|
+
className?: string;
|
|
90
|
+
size?: string;
|
|
91
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
92
|
+
export declare function SmileFilledIcon({ className, size, }: {
|
|
93
|
+
className?: string;
|
|
94
|
+
size?: string;
|
|
95
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
96
|
+
export declare function StarLinesIcon({ size, className, }: {
|
|
97
|
+
size?: string;
|
|
98
|
+
className?: string;
|
|
99
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ImageProps } from "../badges";
|
|
2
|
-
|
|
2
|
+
interface ImageStackProps extends ImageProps {
|
|
3
3
|
imageUrls: string[];
|
|
4
4
|
spacing: string;
|
|
5
5
|
border?: ImageProps["border"];
|
|
@@ -7,4 +7,7 @@ export declare function ImageStack({ imageUrls, spacing, stackOnTop, addExtraPad
|
|
|
7
7
|
size?: ImageProps["size"];
|
|
8
8
|
stackOnTop?: boolean;
|
|
9
9
|
addExtraPadding?: boolean;
|
|
10
|
-
|
|
10
|
+
removeDuplicates?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function ImageStack({ imageUrls, spacing, stackOnTop, addExtraPadding, removeDuplicates, ...imageProps }: ImageStackProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -27,6 +27,7 @@ interface TokenDetailsViewProps {
|
|
|
27
27
|
totalSupply: string;
|
|
28
28
|
loading: boolean;
|
|
29
29
|
onLikeToken: () => void;
|
|
30
|
+
isFavorite?: boolean;
|
|
30
31
|
Chart?: React.ComponentType<{
|
|
31
32
|
timeframe: Timeframe;
|
|
32
33
|
}>;
|
|
@@ -35,5 +36,5 @@ interface TokenDetailsViewProps {
|
|
|
35
36
|
onSwapFrom: (token: Pick<Token, "address" | "chainId">) => void;
|
|
36
37
|
onSwapTo: (token: Pick<Token, "address" | "chainId">) => void;
|
|
37
38
|
}
|
|
38
|
-
export declare const TokenDetailsView: ({ isOpen, onClose, token, chain, tokenPrice, priceChange, balance, balanceUSD, volume24h, marketCap, totalSupply, loading, onLikeToken, Chart, initialTimeframe, onTimeframeChange, onSwapFrom, onSwapTo, }: TokenDetailsViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const TokenDetailsView: ({ isOpen, onClose, token, chain, tokenPrice, priceChange, balance, balanceUSD, volume24h, marketCap, totalSupply, loading, onLikeToken, isFavorite, Chart, initialTimeframe, onTimeframeChange, onSwapFrom, onSwapTo, }: TokenDetailsViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
40
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type TabSize = "small" | "large";
|
|
3
|
+
interface TabsProps {
|
|
4
|
+
tabs: Array<{
|
|
5
|
+
label: string;
|
|
6
|
+
}>;
|
|
7
|
+
size?: TabSize;
|
|
8
|
+
activeTab?: number;
|
|
9
|
+
onTabChange?: (tabIndex: number) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function Tabs({ tabs, size, onTabChange, activeTab, }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
interface TabProps extends React.ComponentProps<"button"> {
|
|
13
|
+
label: string;
|
|
14
|
+
size: TabSize;
|
|
15
|
+
isActive?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function Tab({ label, isActive, size, ...props }: TabProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Tabs";
|
|
@@ -36,7 +36,8 @@ export declare function hexToRgb(hex: string): {
|
|
|
36
36
|
a: number;
|
|
37
37
|
} | null;
|
|
38
38
|
export declare function rgbToHex(r: number, g: number, b: number): string;
|
|
39
|
-
export declare function blendColors(foreground: string, background: string
|
|
39
|
+
export declare function blendColors(foreground: string, background: string): string | null;
|
|
40
|
+
export declare function adjustColorForContrast(foreground: string, background: string, factor?: number): string | null;
|
|
40
41
|
export declare const isValidHexColor: (hex: string) => boolean;
|
|
41
42
|
export declare function parseColor(color: string): RGB | null;
|
|
42
43
|
export declare const getColorBrightness: (color: string) => number;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from "@storybook/react";
|
|
2
|
+
import { ImageGroup } from "../../components/badges/ImageGroup";
|
|
3
|
+
declare const meta: Meta<typeof ImageGroup>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from "@storybook/react";
|
|
2
|
+
import { AccountsButton } from "../../components/buttons/AccountsButton";
|
|
3
|
+
declare const meta: Meta<typeof AccountsButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -4,5 +4,6 @@ declare const meta: Meta<typeof ImageStack>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
+
export declare const RemoveDuplicates: Story;
|
|
7
8
|
export declare const NegativeSpacing: Story;
|
|
8
9
|
export declare const LargeImages: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from "@storybook/react";
|
|
2
|
+
import { Tabs } from "../../components/navigation/Tabs";
|
|
3
|
+
declare const meta: Meta<typeof Tabs>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Small: Story;
|
|
7
|
+
export declare const Large: Story;
|