@0xsquid/ui 0.27.0 → 0.27.1
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 +962 -792
- package/dist/cjs/types/components/badges/IconLabel.d.ts +2 -2
- package/dist/cjs/types/components/badges/Image.d.ts +9 -0
- package/dist/cjs/types/components/badges/index.d.ts +1 -1
- package/dist/cjs/types/components/buttons/IconButton.d.ts +1 -1
- package/dist/cjs/types/components/controls/Switch.d.ts +4 -3
- package/dist/cjs/types/components/icons/Arrow.d.ts +4 -1
- package/dist/cjs/types/components/icons/Clock.d.ts +1 -1
- package/dist/cjs/types/components/icons/Coins.d.ts +5 -1
- package/dist/cjs/types/components/icons/Generic.d.ts +40 -0
- package/dist/cjs/types/components/icons/Search.d.ts +4 -1
- package/dist/cjs/types/components/icons/index.d.ts +1 -0
- package/dist/cjs/types/components/layout/DropdownMenu.d.ts +6 -3
- package/dist/cjs/types/components/layout/Menu.d.ts +2 -2
- package/dist/cjs/types/components/lists/DropdownMenuItem.d.ts +17 -2
- package/dist/cjs/types/components/lists/DropdownMenuTitle.d.ts +3 -0
- package/dist/cjs/types/components/lists/HistoryItem.d.ts +2 -3
- package/dist/cjs/types/components/lists/ListItem.d.ts +5 -4
- package/dist/cjs/types/components/lists/index.d.ts +1 -0
- package/dist/cjs/types/hooks/useDropdownMenu.d.ts +7 -3
- package/dist/cjs/types/stories/badges/ImageIcon.stories.d.ts +2 -2
- package/dist/cjs/types/stories/layout/DropdownMenu.stories.d.ts +4 -1
- package/dist/cjs/types/stories/lists/DropdownMenuItem.stories.d.ts +7 -2
- package/dist/cjs/types/stories/lists/DropdownMenuTitle.stories.d.ts +6 -0
- package/dist/cjs/types/stories/lists/HistoryItem.stories.d.ts +1 -0
- package/dist/cjs/types/types/components.d.ts +2 -2
- package/dist/cjs/types/types/index.d.ts +1 -0
- package/dist/cjs/types/types/utils.d.ts +11 -0
- package/dist/esm/index.js +949 -791
- package/dist/esm/types/components/badges/IconLabel.d.ts +2 -2
- package/dist/esm/types/components/badges/Image.d.ts +9 -0
- package/dist/esm/types/components/badges/index.d.ts +1 -1
- package/dist/esm/types/components/buttons/IconButton.d.ts +1 -1
- package/dist/esm/types/components/controls/Switch.d.ts +4 -3
- package/dist/esm/types/components/icons/Arrow.d.ts +4 -1
- package/dist/esm/types/components/icons/Clock.d.ts +1 -1
- package/dist/esm/types/components/icons/Coins.d.ts +5 -1
- package/dist/esm/types/components/icons/Generic.d.ts +40 -0
- package/dist/esm/types/components/icons/Search.d.ts +4 -1
- package/dist/esm/types/components/icons/index.d.ts +1 -0
- package/dist/esm/types/components/layout/DropdownMenu.d.ts +6 -3
- package/dist/esm/types/components/layout/Menu.d.ts +2 -2
- package/dist/esm/types/components/lists/DropdownMenuItem.d.ts +17 -2
- package/dist/esm/types/components/lists/DropdownMenuTitle.d.ts +3 -0
- package/dist/esm/types/components/lists/HistoryItem.d.ts +2 -3
- package/dist/esm/types/components/lists/ListItem.d.ts +5 -4
- package/dist/esm/types/components/lists/index.d.ts +1 -0
- package/dist/esm/types/hooks/useDropdownMenu.d.ts +7 -3
- package/dist/esm/types/stories/badges/ImageIcon.stories.d.ts +2 -2
- package/dist/esm/types/stories/layout/DropdownMenu.stories.d.ts +4 -1
- package/dist/esm/types/stories/lists/DropdownMenuItem.stories.d.ts +7 -2
- package/dist/esm/types/stories/lists/DropdownMenuTitle.stories.d.ts +6 -0
- package/dist/esm/types/stories/lists/HistoryItem.stories.d.ts +1 -0
- package/dist/esm/types/types/components.d.ts +2 -2
- package/dist/esm/types/types/index.d.ts +1 -0
- package/dist/esm/types/types/utils.d.ts +11 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +818 -728
- package/package.json +1 -1
- package/dist/cjs/types/components/badges/ImageIcon.d.ts +0 -9
- package/dist/esm/types/components/badges/ImageIcon.d.ts +0 -9
package/dist/cjs/index.js
CHANGED
|
@@ -2790,7 +2790,7 @@ const sizeClassMap = {
|
|
|
2790
2790
|
large: "tw-w-squid-l tw-shadow-elevation-light-2",
|
|
2791
2791
|
xlarge: "tw-w-squid-xl tw-shadow-elevation-light-2",
|
|
2792
2792
|
};
|
|
2793
|
-
function
|
|
2793
|
+
function Image$1({ src, variant = "proportional", size = "medium", className: propsClassName, }) {
|
|
2794
2794
|
const className = cn("tw-bg-grey-300 tw-object-cover", variantClassMap$1[variant], sizeClassMap[size], propsClassName);
|
|
2795
2795
|
if (src) {
|
|
2796
2796
|
return jsxRuntime.jsx("img", { className: className, src: src });
|
|
@@ -2801,7 +2801,7 @@ function ImageIcon({ src, variant = "proportional", size = "medium", className:
|
|
|
2801
2801
|
}
|
|
2802
2802
|
|
|
2803
2803
|
function IconLabel({ src, children, variant }) {
|
|
2804
|
-
return (jsxRuntime.jsxs("div", { className: "tw-inline-flex tw-items-center tw-gap-squid-xxs", children: [src && jsxRuntime.jsx(
|
|
2804
|
+
return (jsxRuntime.jsxs("div", { className: "tw-inline-flex tw-items-center tw-gap-squid-xxs", children: [src && jsxRuntime.jsx(Image$1, { src: src, variant: variant }), typeof children === "string" ? (jsxRuntime.jsx(CaptionText, { children: children })) : (children)] }));
|
|
2805
2805
|
}
|
|
2806
2806
|
|
|
2807
2807
|
const LoadingContext = React$1.createContext(false);
|
|
@@ -2947,8 +2947,8 @@ function ChevronTopIcon({ className }) {
|
|
|
2947
2947
|
function ChevronLargeRightIcon({ size = "16", className, }) {
|
|
2948
2948
|
return (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsxRuntime.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" }) }));
|
|
2949
2949
|
}
|
|
2950
|
-
function ChevronRightSmallIcon() {
|
|
2951
|
-
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width:
|
|
2950
|
+
function ChevronRightSmallIcon({ className, size = "16", }) {
|
|
2951
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M6.66675 10.6667L8.86201 8.47141C9.12236 8.21106 9.12236 7.78896 8.86201 7.52861L6.66675 5.33334", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
2952
2952
|
}
|
|
2953
2953
|
function ArrowLeftIcon({ className, size = "24", }) {
|
|
2954
2954
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M10 6L4 12L10 18M5 12H20", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
@@ -3118,8 +3118,8 @@ const themeTypesKeys = Object.fromEntries(INTERNAL_SQUID_THEME_KEYS.map((key) =>
|
|
|
3118
3118
|
},
|
|
3119
3119
|
]));
|
|
3120
3120
|
|
|
3121
|
-
function SearchIcon() {
|
|
3122
|
-
return (jsxRuntime.jsx("svg", { width:
|
|
3121
|
+
function SearchIcon({ className, size = "24", }) {
|
|
3122
|
+
return (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsxRuntime.jsx("path", { d: "M20 20L16.05 16.05M18 11C18 14.866 14.866 18 11 18C7.13401 18 4 14.866 4 11C4 7.13401 7.13401 4 11 4C14.866 4 18 7.13401 18 11Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
|
|
3123
3123
|
}
|
|
3124
3124
|
|
|
3125
3125
|
function Input(_a) {
|
|
@@ -16861,7 +16861,7 @@ function DescriptionBlocks(_a) {
|
|
|
16861
16861
|
.split(" ")
|
|
16862
16862
|
.map((word, i) => (jsxRuntime.jsx(BodyText, { size: "small", tight: true, children: word }, i))));
|
|
16863
16863
|
case "image":
|
|
16864
|
-
return (jsxRuntime.jsx(
|
|
16864
|
+
return (jsxRuntime.jsx(Image$1, { src: block.value, variant: block.rounded ? "round" : "square" }, index));
|
|
16865
16865
|
}
|
|
16866
16866
|
}) })));
|
|
16867
16867
|
}
|
|
@@ -16922,7 +16922,7 @@ function ChainLink({ size = "16", strokeWidth = "2", }) {
|
|
|
16922
16922
|
return (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M6.66667 3.66667L7.16763 3.17225C8.73063 1.60925 11.2648 1.60925 12.8278 3.17225C14.3907 4.73525 14.3907 7.26937 12.8278 8.83237L12.3333 9.33333M3.66667 6.66667L3.17225 7.16763C1.60925 8.73063 1.60925 11.2648 3.17225 12.8278C4.73525 14.3907 7.26937 14.3907 8.83237 12.8278L9.33333 12.3333M6.66667 9.33333L9.33333 6.66667", stroke: "currentColor", strokeWidth: strokeWidth, vectorEffect: "non-scaling-stroke", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
16923
16923
|
}
|
|
16924
16924
|
|
|
16925
|
-
function
|
|
16925
|
+
function ClockSolidIcon({ className, size = "16", }) {
|
|
16926
16926
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", className: className, children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.99967 14.6667C11.6816 14.6667 14.6663 11.6819 14.6663 8.00004C14.6663 4.31814 11.6816 1.33337 7.99967 1.33337C4.31778 1.33337 1.33301 4.31814 1.33301 8.00004C1.33301 11.6819 4.31778 14.6667 7.99967 14.6667ZM8.66634 5.33337C8.66634 4.96518 8.36786 4.66671 7.99967 4.66671C7.63148 4.66671 7.33301 4.96518 7.33301 5.33337V8.00004C7.33301 8.17685 7.40325 8.34642 7.52827 8.47145L9.19494 10.1381C9.45529 10.3985 9.8774 10.3985 10.1377 10.1381C10.3981 9.87776 10.3981 9.45565 10.1377 9.1953L8.66634 7.7239V5.33337Z", fill: "currentColor" }) }));
|
|
16927
16927
|
}
|
|
16928
16928
|
function ClockOutlineIcon({ className, size = "24", }) {
|
|
@@ -16944,12 +16944,15 @@ function CoinsIcon() {
|
|
|
16944
16944
|
function CoinsAddIcon() {
|
|
16945
16945
|
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", fill: "none", children: [jsxRuntime.jsx("path", { d: "M7.5 17.5C7.5 11.7269 11.8485 6.96944 17.4488 6.32444C15.8644 4.73417 13.6722 3.75 11.25 3.75C6.41751 3.75 2.5 7.66751 2.5 12.5C2.5 16.1582 4.74492 19.2921 7.93227 20.5991C7.65076 19.6146 7.5 18.5749 7.5 17.5Z", fill: "currentColor" }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.75 26.25C23.5825 26.25 27.5 22.3325 27.5 17.5C27.5 12.6675 23.5825 8.75 18.75 8.75C13.9175 8.75 10 12.6675 10 17.5C10 22.3325 13.9175 26.25 18.75 26.25ZM20 13.75H17.5V16.25H15V18.75H17.5V21.25H20V18.75H22.5L22.5 16.25H20V13.75Z", fill: "currentColor" })] }));
|
|
16946
16946
|
}
|
|
16947
|
-
function
|
|
16947
|
+
function DollarOutlinedIcon({ className, size = "24", }) {
|
|
16948
16948
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M12 7.5V6.5M12 16.5V17.5M14.1655 9C13.7333 8.4022 12.9254 8 12 8H11.7222C10.4949 8 9.5 8.79594 9.5 9.77778V9.8541C9.5 10.5564 9.99598 11.1984 10.7812 11.5125L13.2188 12.4875C14.004 12.8016 14.5 13.4436 14.5 14.1459C14.5 15.1699 13.4624 16 12.1824 16H12C11.0746 16 10.2667 15.5978 9.83446 15M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
16949
16949
|
}
|
|
16950
16950
|
function StocksIcon({ size = "24", className, }) {
|
|
16951
16951
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 25 24", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M14.75 12C15.8546 12 16.75 11.1046 16.75 10C16.75 8.89543 15.8546 8 14.75 8M14.75 12C14.1977 12 13.6977 11.7761 13.3358 11.4142M14.75 12V20M14.75 8C13.6454 8 12.75 8.89543 12.75 10C12.75 10.5523 12.9739 11.0523 13.3358 11.4142M14.75 8V4M14.75 4H7.75C6.09315 4 4.75 5.34315 4.75 7V17C4.75 18.6569 6.09315 20 7.75 20H14.75M14.75 4H17.75C19.4069 4 20.75 5.34315 20.75 7V17C20.75 18.6569 19.4069 20 17.75 20H14.75M13.3358 11.4142L9.75 15L7.75 13L5.25 15.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
16952
16952
|
}
|
|
16953
|
+
function DollarSolidIcon({ size = "20", className, }) {
|
|
16954
|
+
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: "M1.6665 10.0001C1.6665 5.39771 5.39746 1.66675 9.99984 1.66675C14.6022 1.66675 18.3332 5.39771 18.3332 10.0001C18.3332 14.6025 14.6022 18.3334 9.99984 18.3334C5.39746 18.3334 1.6665 14.6025 1.6665 10.0001ZM9.99984 4.58341C10.4601 4.58341 10.8332 4.95651 10.8332 5.41675V5.93647C11.5032 6.106 12.0944 6.47889 12.4797 7.01179C12.7494 7.38474 12.6657 7.90569 12.2928 8.17537C11.9198 8.44505 11.3988 8.36133 11.1292 7.98837C10.9481 7.73799 10.5444 7.50008 9.99984 7.50008H9.76836C9.02271 7.50008 8.74984 7.95418 8.74984 8.14823V8.21183C8.74984 8.37622 8.87411 8.65226 9.29362 8.82007L11.325 9.63263C12.2141 9.98828 12.9165 10.7822 12.9165 11.7883C12.9165 13.0159 11.9357 13.8454 10.8332 14.091V14.5834C10.8332 15.0437 10.4601 15.4167 9.99984 15.4167C9.5396 15.4167 9.1665 15.0437 9.1665 14.5834V14.0637C8.49646 13.8942 7.90526 13.5213 7.51993 12.9884C7.25025 12.6154 7.33397 12.0945 7.70693 11.8248C8.07988 11.5551 8.60083 11.6388 8.87051 12.0118C9.05156 12.2622 9.45532 12.5001 9.99984 12.5001H10.1518C10.9414 12.5001 11.2498 12.0175 11.2498 11.7883C11.2498 11.6239 11.1256 11.3479 10.7061 11.1801L8.67464 10.3675C7.78553 10.0119 7.08317 9.21792 7.08317 8.21183V8.14823C7.08317 6.92823 8.07431 6.11595 9.1665 5.89451V5.41675C9.1665 4.95651 9.5396 4.58341 9.99984 4.58341Z", fill: "currentColor" }) }));
|
|
16955
|
+
}
|
|
16953
16956
|
|
|
16954
16957
|
function CollectionIcon() {
|
|
16955
16958
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: jsxRuntime.jsx("path", { stroke: "currentColor", strokeLinecap: "square", strokeLinejoin: "round", strokeWidth: "2", d: "M7.9 12l-4.307 2.101a1 1 0 000 1.798l7.969 3.887a1 1 0 00.877 0l7.969-3.887a1 1 0 000-1.798L16.1 12m-8.2 0L3.593 9.899a1 1 0 010-1.798l7.969-3.887a1 1 0 01.877 0L20.408 8.1a1 1 0 010 1.798L16.1 12m-8.2 0l3.662 1.786a1 1 0 00.877 0L16.1 12" }) }));
|
|
@@ -17249,6 +17252,37 @@ function DockIconHelp({ isSelected = false }) {
|
|
|
17249
17252
|
return (jsxRuntime.jsxs("svg", { className: getDockIconClassname({ isSelected }), xmlns: "http://www.w3.org/2000/svg", width: "80", height: "80", viewBox: "0 0 100 100", fill: "none", children: [jsxRuntime.jsxs("g", { filter: "url(#filter0_dd_1744_41485)", children: [jsxRuntime.jsx("path", { d: "M50 17C34.5359 17 22 29.5359 22 45C22 60.4641 34.5359 73 50 73C65.4641 73 78 60.4641 78 45C78 29.5359 65.4698 17 50 17ZM50 55.7516C44.0637 55.7516 39.2484 50.9363 39.2484 45C39.2484 39.0637 44.0637 34.2484 50 34.2484C55.9363 34.2484 60.7516 39.0637 60.7516 45C60.7516 50.9363 55.9363 55.7516 50 55.7516Z", className: "tw-fill-current" }), jsxRuntime.jsx("path", { d: "M50 15.5C33.7075 15.5 20.5 28.7075 20.5 45C20.5 61.2925 33.7075 74.5 50 74.5C66.2925 74.5 79.5 61.2925 79.5 45C79.5 28.7077 66.2984 15.5 50 15.5ZM50 54.2516C44.8922 54.2516 40.7484 50.1078 40.7484 45C40.7484 39.8922 44.8922 35.7484 50 35.7484C55.1078 35.7484 59.2516 39.8922 59.2516 45C59.2516 50.1078 55.1078 54.2516 50 54.2516Z", className: "tw-stroke-grey-900", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" })] }), jsxRuntime.jsxs("mask", { id: "path-3-outside-1_1744_41485", maskUnits: "userSpaceOnUse", x: "67.4766", y: "19.3555", width: "9", height: "9", fill: "black", children: [jsxRuntime.jsx("rect", { fill: "white", x: "67.4766", y: "19.3555", width: "9", height: "9" }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M71.0508 21.5019C70.8556 21.3067 70.539 21.3067 70.3437 21.5019C70.1485 21.6972 70.1485 22.0138 70.3437 22.209L71.2167 23.082L69.623 24.6757C69.4277 24.8709 69.4277 25.1875 69.623 25.3828C69.8183 25.578 70.1349 25.578 70.3301 25.3828L71.9238 23.7891L72.7971 24.6625C72.9924 24.8577 73.309 24.8577 73.5043 24.6625C73.6995 24.4672 73.6995 24.1506 73.5043 23.9553L71.0508 21.5019Z" })] }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M71.0508 21.5019C70.8556 21.3067 70.539 21.3067 70.3437 21.5019C70.1485 21.6972 70.1485 22.0138 70.3437 22.209L71.2167 23.082L69.623 24.6757C69.4277 24.8709 69.4277 25.1875 69.623 25.3828C69.8183 25.578 70.1349 25.578 70.3301 25.3828L71.9238 23.7891L72.7971 24.6625C72.9924 24.8577 73.309 24.8577 73.5043 24.6625C73.6995 24.4672 73.6995 24.1506 73.5043 23.9553L71.0508 21.5019Z", className: "tw-fill-grey-300" }), jsxRuntime.jsx("path", { d: "M70.3437 21.5019L71.7579 22.9161L71.7579 22.9161L70.3437 21.5019ZM71.0508 21.5019L69.6366 22.9161L69.6366 22.9161L71.0508 21.5019ZM70.3437 22.209L71.7579 20.7948L71.7579 20.7948L70.3437 22.209ZM71.2167 23.082L72.6309 24.4962C73.4119 23.7151 73.4119 22.4488 72.6309 21.6678L71.2167 23.082ZM69.623 24.6757L68.2088 23.2614L68.2088 23.2614L69.623 24.6757ZM69.623 25.3828L68.2088 26.797L68.2088 26.797L69.623 25.3828ZM70.3301 25.3828L71.7443 26.797L71.7443 26.797L70.3301 25.3828ZM71.9238 23.7891L73.338 22.3749C72.9629 21.9998 72.4542 21.7891 71.9238 21.7891C71.3933 21.7891 70.8846 21.9998 70.5096 22.3749L71.9238 23.7891ZM72.7971 24.6625L71.3829 26.0767L71.3829 26.0767L72.7971 24.6625ZM73.5043 24.6625L74.9185 26.0767L74.9185 26.0767L73.5043 24.6625ZM73.5043 23.9553L74.9185 22.5411V22.5411L73.5043 23.9553ZM71.7579 22.9161C71.1721 23.5019 70.2224 23.5019 69.6366 22.9161L72.465 20.0877C71.4887 19.1114 69.9058 19.1114 68.9295 20.0877L71.7579 22.9161ZM71.7579 20.7948C72.3437 21.3806 72.3437 22.3303 71.7579 22.9161L68.9295 20.0877C67.9532 21.064 67.9532 22.6469 68.9295 23.6232L71.7579 20.7948ZM72.6309 21.6678L71.7579 20.7948L68.9295 23.6232L69.8025 24.4962L72.6309 21.6678ZM71.0372 26.0899L72.6309 24.4962L69.8025 21.6678L68.2088 23.2614L71.0372 26.0899ZM71.0372 23.9685C71.623 24.5543 71.623 25.5041 71.0372 26.0899L68.2088 23.2614C67.2325 24.2377 67.2325 25.8207 68.2088 26.797L71.0372 23.9685ZM68.9159 23.9685C69.5017 23.3828 70.4514 23.3828 71.0372 23.9685L68.2088 26.797C69.1851 27.7733 70.768 27.7733 71.7443 26.797L68.9159 23.9685ZM70.5096 22.3749L68.9159 23.9685L71.7443 26.797L73.338 25.2033L70.5096 22.3749ZM74.2114 23.2482L73.338 22.3749L70.5096 25.2033L71.3829 26.0767L74.2114 23.2482ZM72.09 23.2482C72.6758 22.6625 73.6256 22.6625 74.2114 23.2482L71.3829 26.0767C72.3592 27.053 73.9422 27.053 74.9185 26.0767L72.09 23.2482ZM72.09 25.3696C71.5043 24.7838 71.5043 23.834 72.09 23.2482L74.9185 26.0767C75.8948 25.1004 75.8948 23.5174 74.9185 22.5411L72.09 25.3696ZM69.6366 22.9161L72.09 25.3696L74.9185 22.5411L72.465 20.0877L69.6366 22.9161Z", className: "tw-fill-current", mask: "url(#path-3-outside-1_1744_41485)" }), jsxRuntime.jsx("path", { d: "M50 17C34.5359 17 22 29.5359 22 45C22 60.4641 34.5359 73 50 73C65.4641 73 78 60.4641 78 45C78 29.5359 65.4698 17 50 17ZM50 55.7516C44.0637 55.7516 39.2484 50.9363 39.2484 45C39.2484 39.0637 44.0637 34.2484 50 34.2484C55.9363 34.2484 60.7516 39.0637 60.7516 45C60.7516 50.9363 55.9363 55.7516 50 55.7516Z", className: "tw-fill-current tw-stroke-grey-300", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M42.5276 26.845L42.5242 26.8404C41.9548 26.087 40.8824 25.9378 40.129 26.5072L34.9231 30.4415C34.1697 31.0109 34.0205 32.0833 34.5899 32.8367L34.5933 32.8413C35.1627 33.5947 36.2351 33.7439 36.9885 33.1745L42.1944 29.2402C42.9478 28.6708 43.097 27.5984 42.5276 26.845Z", className: "tw-fill-current tw-stroke-grey-300", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M65.4441 57.1753L65.4407 57.1707C64.8713 56.4173 63.7989 56.2681 63.0455 56.8375L57.8396 60.7718C57.0862 61.3412 56.937 62.4136 57.5064 63.167L57.5098 63.1716C58.0792 63.925 59.1516 64.0742 59.905 63.5048L65.1109 59.5705C65.8643 59.0011 66.0135 57.9287 65.4441 57.1753Z", className: "tw-fill-current tw-stroke-grey-300", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M71.8123 23.1934L69.9766 25.0292", className: "tw-stroke-grey-300", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M73.1507 24.3089L70.6973 21.8555", className: "tw-stroke-grey-300", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M66.1677 36.1298C64.0574 37.3709 61.2894 37.0048 59.5852 35.1119C57.9438 33.2875 57.8066 30.6339 59.1048 28.678", className: "tw-fill-current" }), jsxRuntime.jsx("path", { d: "M66.1677 36.1298C64.0574 37.3709 61.2894 37.0048 59.5852 35.1119C57.9438 33.2875 57.8066 30.6339 59.1048 28.678", className: "tw-stroke-grey-300", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M69.6218 31.4405C69.0213 31.8122 68.2206 31.7264 67.7117 31.1889C67.2027 30.6513 67.1684 29.9078 67.5287 29.3302", className: "tw-fill-current" }), jsxRuntime.jsx("path", { d: "M69.6218 31.4405C69.0213 31.8122 68.2206 31.7264 67.7117 31.1889C67.2027 30.6513 67.1684 29.9078 67.5287 29.3302", className: "tw-stroke-grey-300", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M66.1047 27.7116C65.5042 28.0833 64.7036 27.9976 64.1946 27.46C63.6856 26.9224 63.6513 26.1789 64.0116 25.6013", className: "tw-fill-current" }), jsxRuntime.jsx("path", { d: "M66.1047 27.7116C65.5042 28.0833 64.7036 27.9976 64.1946 27.46C63.6856 26.9224 63.6513 26.1789 64.0116 25.6013", className: "tw-stroke-grey-300", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M58.4985 28.2037C58.9217 28.5468 59.4193 28.7984 59.9454 28.9357L58.4985 28.2037Z", className: "tw-fill-current" }), jsxRuntime.jsx("path", { d: "M58.4985 28.2037C58.9217 28.5468 59.4193 28.7984 59.9454 28.9357", className: "tw-stroke-grey-300", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsxs("filter", { id: "filter0_dd_1744_41485", x: "0", y: "0", width: "100", height: "100", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [jsxRuntime.jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), jsxRuntime.jsx("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), jsxRuntime.jsx("feMorphology", { radius: "1", operator: "erode", in: "SourceAlpha", result: "effect1_dropShadow_1744_41485" }), jsxRuntime.jsx("feOffset", { dy: "5" }), jsxRuntime.jsx("feGaussianBlur", { stdDeviation: "10" }), jsxRuntime.jsx("feComposite", { in2: "hardAlpha", operator: "out" }), jsxRuntime.jsx("feColorMatrix", { type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" }), jsxRuntime.jsx("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_1744_41485" }), jsxRuntime.jsx("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), jsxRuntime.jsx("feOffset", { dy: "1" }), jsxRuntime.jsx("feGaussianBlur", { stdDeviation: "2.5" }), jsxRuntime.jsx("feComposite", { in2: "hardAlpha", operator: "out" }), jsxRuntime.jsx("feColorMatrix", { type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" }), jsxRuntime.jsx("feBlend", { mode: "normal", in2: "effect1_dropShadow_1744_41485", result: "effect2_dropShadow_1744_41485" }), jsxRuntime.jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect2_dropShadow_1744_41485", result: "shape" })] }) })] }));
|
|
17250
17253
|
}
|
|
17251
17254
|
|
|
17255
|
+
function GhostIcon({ size = "20", className, }) {
|
|
17256
|
+
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: "M10.0002 1.66675C6.31826 1.66675 3.3335 4.64254 3.3335 8.31336V16.6688C3.3335 18.0204 4.86578 18.8065 5.96889 18.021L6.80466 17.4258C7.04159 17.2571 7.34967 17.2239 7.61729 17.3382L9.34363 18.0758C9.76288 18.255 10.2374 18.255 10.6567 18.0758L12.383 17.3382C12.6507 17.2239 12.9587 17.2571 13.1957 17.4258L14.0314 18.021C15.1345 18.8065 16.6668 18.0204 16.6668 16.6688V8.31336C16.6668 4.64254 13.6821 1.66675 10.0002 1.66675ZM9.16683 8.75008C9.16683 9.44044 8.60719 10.0001 7.91683 10.0001C7.22647 10.0001 6.66683 9.44044 6.66683 8.75008C6.66683 8.05973 7.22647 7.50008 7.91683 7.50008C8.60719 7.50008 9.16683 8.05973 9.16683 8.75008ZM12.0835 10.0001C12.7739 10.0001 13.3335 9.44044 13.3335 8.75008C13.3335 8.05973 12.7739 7.50008 12.0835 7.50008C11.3931 7.50008 10.8335 8.05973 10.8335 8.75008C10.8335 9.44044 11.3931 10.0001 12.0835 10.0001Z", fill: "currentColor" }) }));
|
|
17257
|
+
}
|
|
17258
|
+
function SettingsSliderIcon({ size = "20", className, }) {
|
|
17259
|
+
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsxRuntime.jsx("path", { d: "M14.1667 2.5C12.6129 2.5 11.3081 3.56202 10.9383 5H3.33333C2.8731 5 2.5 5.3731 2.5 5.83333C2.5 6.29357 2.8731 6.66667 3.33333 6.66667H10.9383C11.3081 8.10465 12.6129 9.16667 14.1667 9.16667C16.0082 9.16667 17.5 7.67482 17.5 5.83333C17.5 3.99185 16.0082 2.5 14.1667 2.5Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M7.5 10.8333C5.94628 10.8333 4.64147 11.8953 4.2716 13.3333H3.33333C2.8731 13.3333 2.5 13.7064 2.5 14.1667C2.5 14.6269 2.8731 15 3.33333 15H4.2716C4.64147 16.438 5.94628 17.5 7.5 17.5C9.05372 17.5 10.3585 16.438 10.7284 15H16.6667C17.1269 15 17.5 14.6269 17.5 14.1667C17.5 13.7064 17.1269 13.3333 16.6667 13.3333H10.7284C10.3585 11.8953 9.05372 10.8333 7.5 10.8333Z", fill: "currentColor" })] }));
|
|
17260
|
+
}
|
|
17261
|
+
function EyeOpenIcon({ size = "20", className, }) {
|
|
17262
|
+
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: "M10.0002 3.33325C13.2933 3.33323 16.4923 5.22686 18.6308 8.81919C19.0637 9.54645 19.0637 10.4533 18.6308 11.1806C16.4923 14.7729 13.2933 16.6666 10.0002 16.6666C6.70711 16.6666 3.50807 14.773 1.36961 11.1806C0.936691 10.4534 0.936692 9.54654 1.36961 8.81928C3.50806 5.22694 6.70711 3.33328 10.0002 3.33325ZM7.08354 9.99992C7.08354 8.38909 8.38937 7.08325 10.0002 7.08325C11.611 7.08325 12.9169 8.38909 12.9169 9.99992C12.9169 11.6107 11.611 12.9166 10.0002 12.9166C8.38937 12.9166 7.08354 11.6107 7.08354 9.99992Z", fill: "currentColor" }) }));
|
|
17263
|
+
}
|
|
17264
|
+
function BellAlarmIcon({ size = "20", className, }) {
|
|
17265
|
+
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.99988 1.66678C6.71988 1.66678 3.94653 4.09489 3.51303 7.34611L2.75878 13.003C2.55895 14.5017 3.72487 15.8334 5.23685 15.8334H6.1279C6.88136 17.29 8.30102 18.3334 9.99987 18.3334C11.6987 18.3334 13.1184 17.29 13.8718 15.8334H14.7629C16.2749 15.8334 17.4408 14.5017 17.241 13.003L16.4867 7.34612C16.0532 4.09489 13.2799 1.66678 9.99988 1.66678ZM11.8513 15.8334H8.1484C8.65585 16.3645 9.31385 16.6668 9.99987 16.6668C10.6859 16.6668 11.3439 16.3645 11.8513 15.8334Z", fill: "currentColor" }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.83481 1.65221C4.18713 1.94834 4.23268 2.47401 3.93655 2.82633C3.12664 3.78991 2.54294 4.94811 2.26535 6.2198C2.16719 6.66945 1.72311 6.95439 1.27346 6.85624C0.823814 6.75809 0.53887 6.31401 0.637023 5.86436C0.973718 4.32192 1.68141 2.91906 2.6607 1.75395C2.95683 1.40164 3.48249 1.35609 3.83481 1.65221ZM16.165 1.65221C16.5173 1.35609 17.043 1.40164 17.3391 1.75395C18.3184 2.91906 19.0261 4.32192 19.3628 5.86436C19.4609 6.31401 19.176 6.75809 18.7263 6.85624C18.2767 6.95439 17.8326 6.66945 17.7344 6.2198C17.4568 4.94811 16.8731 3.78991 16.0632 2.82633C15.7671 2.47401 15.8127 1.94834 16.165 1.65221Z", fill: "currentColor" })] }));
|
|
17266
|
+
}
|
|
17267
|
+
function LimitIcon({ size = "20", className, }) {
|
|
17268
|
+
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: "M14.7139 6.11929C12.1104 3.51579 7.88928 3.51579 5.28578 6.11929C2.77054 8.63453 2.68525 12.6602 5.03004 15.2772C5.33716 15.62 5.30825 16.1469 4.96547 16.454C4.62269 16.7611 4.09585 16.7322 3.78873 16.3894C0.856646 13.1169 0.962783 8.08527 4.10727 4.94078C7.36164 1.68641 12.638 1.68641 15.8924 4.94078C19.0369 8.08527 19.143 13.1169 16.2109 16.3894C15.9038 16.7322 15.377 16.7611 15.0342 16.454C14.6914 16.1469 14.6625 15.62 14.9696 15.2772C17.3144 12.6602 17.2291 8.63453 14.7139 6.11929ZM6.90944 7.74408C7.23488 7.41864 7.76251 7.41864 8.08795 7.74408L10.588 10.2441C10.9134 10.5695 10.9134 11.0972 10.588 11.4226C10.2625 11.748 9.73488 11.748 9.40944 11.4226L6.90944 8.92259C6.584 8.59715 6.584 8.06952 6.90944 7.74408Z", fill: "currentColor" }) }));
|
|
17269
|
+
}
|
|
17270
|
+
function PoopIcon({ size = "20", className, }) {
|
|
17271
|
+
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: "M9.99984 3.33348C9.99984 2.4904 10.7451 1.51067 11.8637 1.79543C13.666 2.25426 14.9998 3.88705 14.9998 5.83348C14.9998 6.51535 14.8357 7.15921 14.5453 7.72739C15.7869 8.21228 16.6665 9.42016 16.6665 10.8335C16.6665 11.1983 16.6077 11.5479 16.4996 11.8745C17.5741 12.3045 18.3332 13.3554 18.3332 14.5835C18.3332 16.1943 17.0273 17.5001 15.4165 17.5001H4.58317C2.97234 17.5001 1.6665 16.1943 1.6665 14.5835C1.6665 13.3554 2.42554 12.3045 3.50009 11.8745C3.39194 11.5479 3.33317 11.1983 3.33317 10.8335C3.33317 9.51455 4.09888 8.37491 5.21027 7.83436C5.07429 7.47085 4.99984 7.0773 4.99984 6.66681C4.99984 4.82586 6.49222 3.33348 8.33317 3.33348H9.99984ZM9.1665 7.50012C8.70627 7.50012 8.33317 7.87322 8.33317 8.33345C8.33317 8.79369 8.70627 9.16679 9.1665 9.16679H9.99984C10.4601 9.16679 10.8332 8.79369 10.8332 8.33345C10.8332 7.87322 10.4601 7.50012 9.99984 7.50012H9.1665ZM11.6665 11.6668C11.2063 11.6668 10.8332 12.0399 10.8332 12.5001C10.8332 12.9604 11.2063 13.3335 11.6665 13.3335H12.4998C12.9601 13.3335 13.3332 12.9604 13.3332 12.5001C13.3332 12.0399 12.9601 11.6668 12.4998 11.6668H11.6665Z", fill: "currentColor" }) }));
|
|
17272
|
+
}
|
|
17273
|
+
function CatSquareIcon({ size = "20", className, }) {
|
|
17274
|
+
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsxRuntime.jsx("path", { d: "M11.0744 13.3379C11.5495 13.2106 11.8109 12.6451 11.6581 12.0749C11.5053 11.5047 10.9962 11.1457 10.5211 11.273C10.0459 11.4003 9.78453 11.9658 9.93732 12.536C10.0901 13.1062 10.5992 13.4653 11.0744 13.3379Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M15.057 13.7462C15.1589 14.1264 14.7792 14.5584 14.209 14.7112C13.6388 14.864 13.0939 14.6796 12.9921 14.2995C12.8902 13.9194 13.2699 13.4873 13.8401 13.3345C14.4103 13.1818 14.9552 13.3661 15.057 13.7462Z", fill: "currentColor" }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.16667 2.5C3.24619 2.5 2.5 3.24619 2.5 4.16667V15.8333C2.5 16.7538 3.24619 17.5 4.16667 17.5H15.8333C16.7538 17.5 17.5 16.7538 17.5 15.8333V4.16667C17.5 3.24619 16.7538 2.5 15.8333 2.5H4.16667ZM12.3973 7.76567C11.6727 7.95982 11.0031 8.24294 10.4045 8.59391L7.48285 7.91551C7.19114 7.84777 6.92536 8.10071 6.97858 8.39542L7.59801 11.8256C7.32824 12.6125 7.2779 13.4391 7.49351 14.2437C7.61973 14.7148 7.82865 15.1468 8.10601 15.5337C8.24716 15.7306 8.48134 15.8333 8.72362 15.8333H15C15.4602 15.8333 15.8333 15.4602 15.8333 15V11.9521C15.5014 11.8617 15.2088 11.5615 15.0993 11.1528C14.9465 10.5825 15.2078 10.0171 15.683 9.88975C15.7329 9.87638 15.7832 9.86838 15.8333 9.86541V6.44469C15.8333 6.37139 15.7455 6.3338 15.6925 6.3844L14.5374 7.48655C13.8434 7.4819 13.1219 7.57151 12.3973 7.76567Z", fill: "currentColor" })] }));
|
|
17275
|
+
}
|
|
17276
|
+
function FilterAscendingIcon({ size = "20", className, }) {
|
|
17277
|
+
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.83333 2.5C6.29357 2.5 6.66667 2.8731 6.66667 3.33333V14.6548L7.74408 13.5774C8.06951 13.252 8.59715 13.252 8.92259 13.5774C9.24803 13.9028 9.24803 14.4305 8.92259 14.7559L6.42259 17.2559C6.09715 17.5814 5.56951 17.5814 5.24408 17.2559L2.74408 14.7559C2.41864 14.4305 2.41864 13.9028 2.74408 13.5774C3.06951 13.252 3.59715 13.252 3.92259 13.5774L5 14.6548V3.33333C5 2.8731 5.3731 2.5 5.83333 2.5Z", fill: "currentColor" }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14.5833 2.5C15.2592 2.5 15.8558 2.94152 16.0533 3.58792L17.0439 6.82978L17.4572 8.06981C17.6028 8.50643 17.3668 8.97836 16.9302 9.1239C16.4936 9.26944 16.0216 9.03348 15.8761 8.59686L15.6494 7.91667H13.5173L13.2906 8.59686C13.145 9.03348 12.6731 9.26944 12.2365 9.1239C11.7999 8.97836 11.5639 8.50643 11.7094 8.06981L12.1228 6.82977L13.1133 3.58792C13.3109 2.94152 13.9074 2.5 14.5833 2.5ZM14.5833 4.48053L14.0427 6.25H15.124L14.5833 4.48053Z", fill: "currentColor" }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.6667 11.6667C11.6667 11.2064 12.0398 10.8333 12.5 10.8333H16.6667C16.99 10.8333 17.2842 11.0204 17.4213 11.3132C17.5585 11.606 17.5139 11.9518 17.3069 12.2002L14.2792 15.8333H16.6667C17.1269 15.8333 17.5 16.2064 17.5 16.6667C17.5 17.1269 17.1269 17.5 16.6667 17.5H12.5C12.1767 17.5 11.8825 17.313 11.7453 17.0201C11.6082 16.7273 11.6528 16.3816 11.8598 16.1332L14.8875 12.5H12.5C12.0398 12.5 11.6667 12.1269 11.6667 11.6667Z", fill: "currentColor" })] }));
|
|
17278
|
+
}
|
|
17279
|
+
function ImageIcon({ size = "20", className, }) {
|
|
17280
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 25", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M4 14.7105L6.84488 12.5821C7.66137 12.0378 8.75215 12.1663 9.41987 12.8853C10.9123 14.4926 12.6426 15.9538 15 15.9538C17.1727 15.9538 18.6125 15.1485 20 13.761M6 20.5H18C19.1046 20.5 20 19.6046 20 18.5V6.5C20 5.39543 19.1046 4.5 18 4.5H6C4.89543 4.5 4 5.39543 4 6.5V18.5C4 19.6046 4.89543 20.5 6 20.5ZM17 9.5C17 10.6046 16.1046 11.5 15 11.5C13.8954 11.5 13 10.6046 13 9.5C13 8.39543 13.8954 7.5 15 7.5C16.1046 7.5 17 8.39543 17 9.5Z", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" }) }));
|
|
17281
|
+
}
|
|
17282
|
+
function FilterTimelineIcon({ size = "20", className, }) {
|
|
17283
|
+
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsxRuntime.jsx("path", { d: "M5.00117 3.33325C5.46141 3.33325 5.8345 3.70635 5.8345 4.16659V13.8206L6.91042 12.7442C7.23577 12.4186 7.76341 12.4185 8.08894 12.7438C8.41446 13.0692 8.4146 13.5968 8.08925 13.9224L5.59058 16.4224C5.43434 16.5787 5.22241 16.6665 5.00139 16.6666C4.78038 16.6666 4.56839 16.5789 4.41207 16.4227L1.91074 13.9227C1.58521 13.5973 1.58507 13.0697 1.91042 12.7442C2.23577 12.4186 2.76341 12.4185 3.08894 12.7438L4.16784 13.8222V4.16659C4.16784 3.70635 4.54093 3.33325 5.00117 3.33325Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M9.99984 4.99992C9.5396 4.99992 9.1665 5.37301 9.1665 5.83325C9.1665 6.29349 9.5396 6.66659 9.99984 6.66659H16.6665C17.1267 6.66659 17.4998 6.29349 17.4998 5.83325C17.4998 5.37301 17.1267 4.99992 16.6665 4.99992H9.99984Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M13.3332 13.3333C12.8729 13.3333 12.4998 13.7063 12.4998 14.1666C12.4998 14.6268 12.8729 14.9999 13.3332 14.9999H16.6665C17.1267 14.9999 17.4998 14.6268 17.4998 14.1666C17.4998 13.7063 17.1267 13.3333 16.6665 13.3333H13.3332Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M10.8332 9.99992C10.8332 9.53968 11.2063 9.16659 11.6665 9.16659H16.6665C17.1267 9.16659 17.4998 9.53968 17.4998 9.99992C17.4998 10.4602 17.1267 10.8333 16.6665 10.8333H11.6665C11.2063 10.8333 10.8332 10.4602 10.8332 9.99992Z", fill: "currentColor" })] }));
|
|
17284
|
+
}
|
|
17285
|
+
|
|
17252
17286
|
function FeeButton(_a) {
|
|
17253
17287
|
var { feeInUsd = "0", chipLabel = "Fee", className, tooltip } = _a, props = __rest$1(_a, ["feeInUsd", "chipLabel", "className", "tooltip"]);
|
|
17254
17288
|
return (jsxRuntime.jsx(Tooltip, Object.assign({}, tooltip, { tooltipWidth: "max", containerClassName: "tw-rounded-squid-m tw-w-full", childrenClassName: "tw-rounded-squid-m", children: jsxRuntime.jsxs("button", Object.assign({}, props, { className: cn("tw-flex tw-h-squid-xl tw-w-full tw-items-center tw-gap-x-squid-xs tw-rounded-squid-m tw-px-squid-xs hover:tw-bg-material-light-thin", className), children: [jsxRuntime.jsx(Chip, { label: chipLabel, className: "tw-hidden mobile-xs:tw-flex" }), jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center", children: [jsxRuntime.jsx(UsdAmount, { usdAmount: feeInUsd }), jsxRuntime.jsx(ChevronDownSmallIcon, { className: "tw-text-grey-600" })] })] })) })));
|
|
@@ -17301,6 +17335,68 @@ const darkTheme = {
|
|
|
17301
17335
|
"highlight-700": "#08A054",
|
|
17302
17336
|
};
|
|
17303
17337
|
|
|
17338
|
+
var createPlugin$2 = {};
|
|
17339
|
+
|
|
17340
|
+
var createPlugin$1 = {};
|
|
17341
|
+
|
|
17342
|
+
(function (exports) {
|
|
17343
|
+
Object.defineProperty(exports, "__esModule", {
|
|
17344
|
+
value: true
|
|
17345
|
+
});
|
|
17346
|
+
Object.defineProperty(exports, "default", {
|
|
17347
|
+
enumerable: true,
|
|
17348
|
+
get: function() {
|
|
17349
|
+
return _default;
|
|
17350
|
+
}
|
|
17351
|
+
});
|
|
17352
|
+
function createPlugin(plugin, config) {
|
|
17353
|
+
return {
|
|
17354
|
+
handler: plugin,
|
|
17355
|
+
config
|
|
17356
|
+
};
|
|
17357
|
+
}
|
|
17358
|
+
createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {
|
|
17359
|
+
const optionsFunction = function(options) {
|
|
17360
|
+
return {
|
|
17361
|
+
__options: options,
|
|
17362
|
+
handler: pluginFunction(options),
|
|
17363
|
+
config: configFunction(options)
|
|
17364
|
+
};
|
|
17365
|
+
};
|
|
17366
|
+
optionsFunction.__isOptionsFunction = true;
|
|
17367
|
+
// Expose plugin dependencies so that `object-hash` returns a different
|
|
17368
|
+
// value if anything here changes, to ensure a rebuild is triggered.
|
|
17369
|
+
optionsFunction.__pluginFunction = pluginFunction;
|
|
17370
|
+
optionsFunction.__configFunction = configFunction;
|
|
17371
|
+
return optionsFunction;
|
|
17372
|
+
};
|
|
17373
|
+
const _default = createPlugin;
|
|
17374
|
+
} (createPlugin$1));
|
|
17375
|
+
|
|
17376
|
+
(function (exports) {
|
|
17377
|
+
Object.defineProperty(exports, "__esModule", {
|
|
17378
|
+
value: true
|
|
17379
|
+
});
|
|
17380
|
+
Object.defineProperty(exports, "default", {
|
|
17381
|
+
enumerable: true,
|
|
17382
|
+
get: function() {
|
|
17383
|
+
return _default;
|
|
17384
|
+
}
|
|
17385
|
+
});
|
|
17386
|
+
const _createPlugin = /*#__PURE__*/ _interop_require_default(createPlugin$1);
|
|
17387
|
+
function _interop_require_default(obj) {
|
|
17388
|
+
return obj && obj.__esModule ? obj : {
|
|
17389
|
+
default: obj
|
|
17390
|
+
};
|
|
17391
|
+
}
|
|
17392
|
+
const _default = _createPlugin.default;
|
|
17393
|
+
} (createPlugin$2));
|
|
17394
|
+
|
|
17395
|
+
let createPlugin = createPlugin$2;
|
|
17396
|
+
var plugin = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
|
|
17397
|
+
|
|
17398
|
+
var plugin$1 = /*@__PURE__*/getDefaultExportFromCjs(plugin);
|
|
17399
|
+
|
|
17304
17400
|
const spacing$1 = {
|
|
17305
17401
|
"squid-xxs": "0.3125rem", // 5px
|
|
17306
17402
|
"squid-xs": "0.625rem", // 10px
|
|
@@ -17615,7 +17711,27 @@ const baseTailwindConfig = {
|
|
|
17615
17711
|
}, {})),
|
|
17616
17712
|
},
|
|
17617
17713
|
},
|
|
17618
|
-
plugins: [
|
|
17714
|
+
plugins: [
|
|
17715
|
+
// custom classes available for anyone extending this config
|
|
17716
|
+
plugin$1(({ addUtilities }) => {
|
|
17717
|
+
addUtilities({
|
|
17718
|
+
".focus-visible-within-outline:has(:focus-visible)": {
|
|
17719
|
+
"outline-style": "solid",
|
|
17720
|
+
"outline-width": "2px",
|
|
17721
|
+
"outline-color": `var(${themeTypesKeys["royal-500"].cssVariable})`,
|
|
17722
|
+
},
|
|
17723
|
+
".scrollbar-hidden": {
|
|
17724
|
+
scrollbarWidth: "none",
|
|
17725
|
+
},
|
|
17726
|
+
".highlight-adjacent:has(button:hover)>button:first-child": {
|
|
17727
|
+
backgroundColor: `var(${themeTypesKeys["material-light-thin"].cssVariable})`,
|
|
17728
|
+
},
|
|
17729
|
+
".highlight-adjacent:has(*:hover) .hide-on-parent-hover": {
|
|
17730
|
+
opacity: "0",
|
|
17731
|
+
},
|
|
17732
|
+
});
|
|
17733
|
+
}),
|
|
17734
|
+
],
|
|
17619
17735
|
};
|
|
17620
17736
|
|
|
17621
17737
|
function StopsButton(_a) {
|
|
@@ -17665,624 +17781,20 @@ function DetailsToolbar({ errorMessage, helpButton, isLoading, isEmpty, flipButt
|
|
|
17665
17781
|
"group-hover/flip-button:tw-rotate-180") }) }) }))) }), jsxRuntime.jsx("div", { className: cn(detailClassName, "tw-justify-end"), children: !!stopsButton && jsxRuntime.jsx(StopsButton, Object.assign({}, stopsButton)) })] })) }));
|
|
17666
17782
|
}
|
|
17667
17783
|
|
|
17668
|
-
function DropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, link, }) {
|
|
17669
|
-
const ContentTag = link ? "a" : "button";
|
|
17670
|
-
const contentTagProps = link
|
|
17671
|
-
? {
|
|
17672
|
-
href: link,
|
|
17673
|
-
target: "_blank",
|
|
17674
|
-
}
|
|
17675
|
-
: {};
|
|
17676
|
-
return (jsxRuntime.jsx("li", { className: "tw-max-h-squid-xl tw-w-full tw-px-squid-xxs", children: jsxRuntime.jsxs(ContentTag, Object.assign({}, contentTagProps, { onClick: (event) => {
|
|
17677
|
-
event.stopPropagation();
|
|
17678
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
17679
|
-
}, className: "tw-flex tw-h-squid-l tw-w-full tw-cursor-pointer tw-items-center tw-gap-squid-xxs tw-rounded-squid-xs tw-px-squid-xxs hover:tw-bg-material-light-thin", children: [jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-between tw-rounded-squid-xs", children: imageUrl ? (jsxRuntime.jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), jsxRuntime.jsx(CaptionText, { className: cn(labelClassName, "tw-max-w-full tw-truncate !tw-leading-[18px]"), children: label })] })) }));
|
|
17680
|
-
}
|
|
17681
|
-
|
|
17682
|
-
function useDropdownMenu(props) {
|
|
17683
|
-
const { initialIsModalOpen, itemsContainerRef } = props !== null && props !== void 0 ? props : {};
|
|
17684
|
-
const [isDropdownOpen, setIsModalOpen] = React$1.useState(Boolean(initialIsModalOpen));
|
|
17685
|
-
const dropdownRef = React$1.useRef(null);
|
|
17686
|
-
const openDropdownButtonRef = React$1.useRef(null);
|
|
17687
|
-
React$1.useEffect(() => {
|
|
17688
|
-
const handleClickOutside = (event) => {
|
|
17689
|
-
var _a;
|
|
17690
|
-
// close modal if the user clicked outside of it
|
|
17691
|
-
if (dropdownRef.current &&
|
|
17692
|
-
!dropdownRef.current.contains(event.target) &&
|
|
17693
|
-
!((_a = openDropdownButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
|
|
17694
|
-
setIsModalOpen(false);
|
|
17695
|
-
}
|
|
17696
|
-
};
|
|
17697
|
-
document.addEventListener("click", handleClickOutside);
|
|
17698
|
-
return () => {
|
|
17699
|
-
document.removeEventListener("click", handleClickOutside);
|
|
17700
|
-
};
|
|
17701
|
-
}, [dropdownRef]);
|
|
17702
|
-
const openDropdown = React$1.useCallback(() => {
|
|
17703
|
-
setIsModalOpen((prev) => !prev);
|
|
17704
|
-
}, []);
|
|
17705
|
-
const closeDropdown = React$1.useCallback(() => {
|
|
17706
|
-
setIsModalOpen(false);
|
|
17707
|
-
}, []);
|
|
17708
|
-
const [dropdownPosition, setDropdownPosition] = React$1.useState(null);
|
|
17709
|
-
const itemRef = React$1.useRef(null);
|
|
17710
|
-
const menuRef = React$1.useRef(null);
|
|
17711
|
-
// Effect to find the best position for the dropdown menu, so it's always visible for the user
|
|
17712
|
-
React$1.useEffect(() => {
|
|
17713
|
-
var _a;
|
|
17714
|
-
if (!isDropdownOpen) {
|
|
17715
|
-
// when the dropdown is closed, we want to reset its position
|
|
17716
|
-
// because user may scroll, and the old position may be out of view, so we'll need to recalculate it
|
|
17717
|
-
setDropdownPosition(null);
|
|
17718
|
-
return;
|
|
17719
|
-
}
|
|
17720
|
-
const item = itemRef.current;
|
|
17721
|
-
const itemsContainer = (_a = itemsContainerRef === null || itemsContainerRef === void 0 ? void 0 : itemsContainerRef.current) !== null && _a !== void 0 ? _a : item === null || item === void 0 ? void 0 : item.parentElement;
|
|
17722
|
-
const dropdownMenu = menuRef.current;
|
|
17723
|
-
if (!item || !dropdownRef.current || !itemsContainer || !dropdownMenu) {
|
|
17724
|
-
return;
|
|
17725
|
-
}
|
|
17726
|
-
// Get the bounding rectangle of the item
|
|
17727
|
-
const itemRect = item.getBoundingClientRect();
|
|
17728
|
-
// Get the bounding rectangle of the container element
|
|
17729
|
-
const containerRect = itemsContainer.getBoundingClientRect();
|
|
17730
|
-
// Calculate the bottom position of the visible area of the the items container
|
|
17731
|
-
const containerVisibleBottom = containerRect.top + containerRect.height;
|
|
17732
|
-
// Calculate the distance from the bottom of the item to the visible bottom of the items container
|
|
17733
|
-
const distanceBetweenItemBottomAndContainerBottomEdge = containerVisibleBottom - itemRect.bottom;
|
|
17734
|
-
// the same but for the top
|
|
17735
|
-
const distanceBetweenItemTopAndContainerTopEdge = itemRect.top - containerRect.top;
|
|
17736
|
-
const dropdownMenuHeight = dropdownMenu.clientHeight;
|
|
17737
|
-
// check if the height of the dropdown is less than the longest distance, either top or bottom
|
|
17738
|
-
// if so, means that the dropdown keeps visible when positioned at the top or bottom of the item
|
|
17739
|
-
const isDropdownVisibleAtItemTopOrBottom = dropdownMenuHeight <=
|
|
17740
|
-
Math.max(distanceBetweenItemBottomAndContainerBottomEdge, distanceBetweenItemTopAndContainerTopEdge);
|
|
17741
|
-
// if the dropdown is not visible at top or bottom of the item
|
|
17742
|
-
// we just center it
|
|
17743
|
-
if (!isDropdownVisibleAtItemTopOrBottom) {
|
|
17744
|
-
return setDropdownPosition("center");
|
|
17745
|
-
}
|
|
17746
|
-
// finally, if the dropdown fits, position it where it has more space
|
|
17747
|
-
if (distanceBetweenItemBottomAndContainerBottomEdge >=
|
|
17748
|
-
distanceBetweenItemTopAndContainerTopEdge) {
|
|
17749
|
-
setDropdownPosition("bottom");
|
|
17750
|
-
}
|
|
17751
|
-
else {
|
|
17752
|
-
setDropdownPosition("top");
|
|
17753
|
-
}
|
|
17754
|
-
}, [isDropdownOpen, menuRef, dropdownPosition, itemRef]);
|
|
17755
|
-
return {
|
|
17756
|
-
isDropdownOpen,
|
|
17757
|
-
openDropdown,
|
|
17758
|
-
closeDropdown,
|
|
17759
|
-
dropdownRef,
|
|
17760
|
-
openDropdownButtonRef,
|
|
17761
|
-
dropdownPosition,
|
|
17762
|
-
itemRef,
|
|
17763
|
-
menuRef,
|
|
17764
|
-
};
|
|
17765
|
-
}
|
|
17766
|
-
|
|
17767
|
-
const IS_SERVER = typeof window === "undefined";
|
|
17768
|
-
const useIsomorphicLayoutEffect$1 = IS_SERVER ? React$1.useEffect : React$1.useLayoutEffect;
|
|
17769
|
-
/**
|
|
17770
|
-
* Custom hook that tracks the state of a media query using the [`Match Media API`](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia).
|
|
17771
|
-
* @param {string} query - The media query to track.
|
|
17772
|
-
* @param {?UseMediaQueryOptions} [options] - The options for customizing the behavior of the hook (optional).
|
|
17773
|
-
* @returns {boolean} The current state of the media query (true if the query matches, false otherwise).
|
|
17774
|
-
* @public
|
|
17775
|
-
* @example
|
|
17776
|
-
* ```tsx
|
|
17777
|
-
* const isSmallScreen = useMediaQuery('(max-width: 600px)');
|
|
17778
|
-
* // Use `isSmallScreen` to conditionally apply styles or logic based on the screen size.
|
|
17779
|
-
* ```
|
|
17780
|
-
*/
|
|
17781
|
-
function useMediaQuery(query, { defaultValue = false, initializeWithValue = true, } = {}) {
|
|
17782
|
-
const getMatches = (query) => {
|
|
17783
|
-
if (IS_SERVER) {
|
|
17784
|
-
return defaultValue;
|
|
17785
|
-
}
|
|
17786
|
-
return window.matchMedia(query).matches;
|
|
17787
|
-
};
|
|
17788
|
-
const [matches, setMatches] = React$1.useState(() => {
|
|
17789
|
-
if (initializeWithValue) {
|
|
17790
|
-
return getMatches(query);
|
|
17791
|
-
}
|
|
17792
|
-
return defaultValue;
|
|
17793
|
-
});
|
|
17794
|
-
// Handles the change event of the media query.
|
|
17795
|
-
function handleChange() {
|
|
17796
|
-
setMatches(getMatches(query));
|
|
17797
|
-
}
|
|
17798
|
-
useIsomorphicLayoutEffect$1(() => {
|
|
17799
|
-
const matchMedia = window.matchMedia(query);
|
|
17800
|
-
// Triggered at the first client-side load and if query changes
|
|
17801
|
-
handleChange();
|
|
17802
|
-
// Use deprecated `addListener` and `removeListener` to support Safari < 14 (#135)
|
|
17803
|
-
if (matchMedia.addListener) {
|
|
17804
|
-
matchMedia.addListener(handleChange);
|
|
17805
|
-
}
|
|
17806
|
-
else {
|
|
17807
|
-
matchMedia.addEventListener("change", handleChange);
|
|
17808
|
-
}
|
|
17809
|
-
return () => {
|
|
17810
|
-
if (matchMedia.removeListener) {
|
|
17811
|
-
matchMedia.removeListener(handleChange);
|
|
17812
|
-
}
|
|
17813
|
-
else {
|
|
17814
|
-
matchMedia.removeEventListener("change", handleChange);
|
|
17815
|
-
}
|
|
17816
|
-
};
|
|
17817
|
-
}, [query]);
|
|
17818
|
-
return matches;
|
|
17819
|
-
}
|
|
17820
|
-
|
|
17821
|
-
function useCollapsibleMenu() {
|
|
17822
|
-
const [isMenuOpen, setIsMenuOpen] = React$1.useState(false);
|
|
17823
|
-
const menuRef = React$1.useRef(null);
|
|
17824
|
-
const toggleMenu = () => {
|
|
17825
|
-
setIsMenuOpen(!isMenuOpen);
|
|
17826
|
-
};
|
|
17827
|
-
React$1.useEffect(() => {
|
|
17828
|
-
const handleClickOutside = (event) => {
|
|
17829
|
-
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
17830
|
-
setIsMenuOpen(false);
|
|
17831
|
-
}
|
|
17832
|
-
};
|
|
17833
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
17834
|
-
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
17835
|
-
}, []);
|
|
17836
|
-
return {
|
|
17837
|
-
isMenuOpen,
|
|
17838
|
-
toggleMenu,
|
|
17839
|
-
menuRef,
|
|
17840
|
-
};
|
|
17841
|
-
}
|
|
17842
|
-
|
|
17843
|
-
const useTimer = ({ immediateStart = true, }) => {
|
|
17844
|
-
const [timer, setTimer] = React$1.useState("0s");
|
|
17845
|
-
const intervalRef = React$1.useRef(null);
|
|
17846
|
-
const startTimer = () => {
|
|
17847
|
-
if (intervalRef.current !== null)
|
|
17848
|
-
return; // Prevent multiple intervals
|
|
17849
|
-
const startTime = Date.now();
|
|
17850
|
-
intervalRef.current = window.setInterval(() => {
|
|
17851
|
-
const elapsedTime = Date.now() - startTime;
|
|
17852
|
-
setTimer(formatDuration(elapsedTime));
|
|
17853
|
-
}, 1000);
|
|
17854
|
-
};
|
|
17855
|
-
const stopTimer = () => {
|
|
17856
|
-
if (intervalRef.current !== null) {
|
|
17857
|
-
clearInterval(intervalRef.current);
|
|
17858
|
-
intervalRef.current = null;
|
|
17859
|
-
}
|
|
17860
|
-
};
|
|
17861
|
-
React$1.useEffect(() => {
|
|
17862
|
-
if (immediateStart) {
|
|
17863
|
-
startTimer();
|
|
17864
|
-
}
|
|
17865
|
-
return () => {
|
|
17866
|
-
stopTimer();
|
|
17867
|
-
};
|
|
17868
|
-
}, [immediateStart]);
|
|
17869
|
-
return { timer, stopTimer, startTimer };
|
|
17870
|
-
};
|
|
17871
|
-
|
|
17872
|
-
const dropdownPositionClassMap$1 = {
|
|
17873
|
-
top: "tw-right-[calc(100%-10px)] tw-bottom-7",
|
|
17874
|
-
bottom: "tw-right-[calc(100%-10px)] tw-top-7",
|
|
17875
|
-
center: "tw-right-[40px] -tw-top-[55px]",
|
|
17876
|
-
};
|
|
17877
|
-
const listItemSizeMap = {
|
|
17878
|
-
small: "tw-h-list-item-small",
|
|
17879
|
-
large: "tw-h-list-item-large",
|
|
17880
|
-
};
|
|
17881
|
-
const collapsedListItemClassMap = {
|
|
17882
|
-
small: "tw-w-[70px]",
|
|
17883
|
-
large: "tw-w-[80px]",
|
|
17884
|
-
};
|
|
17885
|
-
function ListItem(_a) {
|
|
17886
|
-
var { itemTitle, mainImageUrl, subtitle, subtitleOnHover, detail, icon, secondaryImageUrl, placeholderImageUrl, size = "large", mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded = false, detailButtonClassName, loading, containerProps, compactOnMobile, extraPadding = true, itemsContainerRef, dropdownMenuItems: _dropdownMenuItemsProp } = _a, props = __rest$1(_a, ["itemTitle", "mainImageUrl", "subtitle", "subtitleOnHover", "detail", "icon", "secondaryImageUrl", "placeholderImageUrl", "size", "mainIcon", "className", "isSelected", "onDetailClick", "showDetailOnHoverOnly", "rounded", "detailButtonClassName", "loading", "containerProps", "compactOnMobile", "extraPadding", "itemsContainerRef", "dropdownMenuItems"]);
|
|
17887
|
-
const subtitleClassName = cn("tw-h-[14px] tw-max-w-full tw-truncate !tw-leading-[16px] tw-text-grey-500", compactOnMobile ? "tw-hidden mobile-lg:tw-block" : "tw-block");
|
|
17888
|
-
// 'small' variant does not have detail
|
|
17889
|
-
const showDetail = size === "large" && (!!detail || !!icon || showDetailOnHoverOnly);
|
|
17890
|
-
const isDetailInteractive = !!onDetailClick;
|
|
17891
|
-
const DetailTag = isDetailInteractive ? "button" : "div";
|
|
17892
|
-
const detailProps = isDetailInteractive
|
|
17893
|
-
? {
|
|
17894
|
-
onClick: (event) => {
|
|
17895
|
-
// prevent click event from bubbling up to parent
|
|
17896
|
-
event.stopPropagation();
|
|
17897
|
-
onDetailClick === null || onDetailClick === void 0 ? void 0 : onDetailClick();
|
|
17898
|
-
},
|
|
17899
|
-
}
|
|
17900
|
-
: {};
|
|
17901
|
-
// There are two possible ways to handle loading state:
|
|
17902
|
-
// Can be boolean or string
|
|
17903
|
-
// If boolean and true, it will show a full loading skeleton
|
|
17904
|
-
// If it's a non empty string, means that we want to display the skeleton + some text
|
|
17905
|
-
const loadingComponent = () => {
|
|
17906
|
-
if ((loading === null || loading === void 0 ? void 0 : loading.subtitle) === true) {
|
|
17907
|
-
return jsxRuntime.jsx(TextSkeleton, { width: "50px", className: "tw-h-2.5", isLoading: true });
|
|
17908
|
-
}
|
|
17909
|
-
if (typeof (loading === null || loading === void 0 ? void 0 : loading.subtitle) === "string" && loading.subtitle.length > 0) {
|
|
17910
|
-
return (jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsxRuntime.jsx(TextSkeleton, { width: "50px", className: "tw-h-2.5", isLoading: true }), jsxRuntime.jsx(CaptionText, { className: subtitleClassName, children: loading.subtitle })] }));
|
|
17911
|
-
}
|
|
17912
|
-
return null;
|
|
17913
|
-
};
|
|
17914
|
-
const isInteractive = !!props.onClick;
|
|
17915
|
-
const ItemTag = isInteractive ? "button" : "div";
|
|
17916
|
-
const itemProps = isInteractive ? props : {};
|
|
17917
|
-
const { isDropdownOpen, dropdownRef, openDropdownButtonRef, openDropdown, closeDropdown, itemRef, menuRef, dropdownPosition, } = useDropdownMenu({
|
|
17918
|
-
itemsContainerRef,
|
|
17919
|
-
});
|
|
17920
|
-
const dropdownMenuItems = _dropdownMenuItemsProp === null || _dropdownMenuItemsProp === void 0 ? void 0 : _dropdownMenuItemsProp.map((item) => (Object.assign(Object.assign({}, item), { onClick: () => {
|
|
17921
|
-
var _a;
|
|
17922
|
-
(_a = item.onClick) === null || _a === void 0 ? void 0 : _a.call(item);
|
|
17923
|
-
closeDropdown();
|
|
17924
|
-
} })));
|
|
17925
|
-
return (jsxRuntime.jsx("li", Object.assign({}, containerProps, { ref: itemRef, className: cn("tw-flex tw-max-w-full tw-bg-grey-900 tw-text-grey-300", listItemSizeMap[size], extraPadding && "tw-px-squid-xs", compactOnMobile
|
|
17926
|
-
? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
|
|
17927
|
-
: "tw-w-full", className), children: jsxRuntime.jsxs(ItemTag, Object.assign({}, itemProps, { className: cn("tw-group/list-item tw-relative tw-flex tw-w-full tw-max-w-full tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs", isSelected && "tw-bg-material-light-thin", isInteractive && "hover:tw-bg-material-light-thin"), children: [size === "large" ? (jsxRuntime.jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon ? (mainIcon) : (jsxRuntime.jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, placeholderImageUrl: placeholderImageUrl, size: "md", rounded: rounded })) })) : (jsxRuntime.jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon ? (mainIcon) : (jsxRuntime.jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), jsxRuntime.jsxs("div", { className: cn("tw-flex tw-h-[40px] tw-flex-1 tw-flex-col tw-items-start tw-justify-center tw-gap-squid-xxs",
|
|
17928
|
-
// 'large' variant has extra padding
|
|
17929
|
-
size === "large" ? "tw-w-[56%] tw-pl-squid-xxs" : "tw-w-[67%]"), children: [typeof itemTitle === "string" ? (jsxRuntime.jsx(BodyText, { size: "small", className: cn("tw-max-w-full tw-truncate", subtitle && "tw-h-[17px] !tw-leading-[17px]", compactOnMobile ? "tw-hidden mobile-lg:tw-block" : "tw-block"), children: itemTitle })) : (itemTitle), size === "large" &&
|
|
17930
|
-
((loading === null || loading === void 0 ? void 0 : loading.subtitle) ? (loadingComponent()) : subtitle ? (jsxRuntime.jsxs(CaptionText, { className: subtitleClassName, children: [subtitleOnHover && (jsxRuntime.jsx(CaptionText, { className: cn(subtitleClassName, "tw-hidden group-hover/list-item:tw-block"), children: subtitleOnHover })), subtitle] })) : null)] }), showDetail && (jsxRuntime.jsxs(DetailTag, Object.assign({}, detailProps, { className: cn("tw-flex tw-w-fit tw-items-center tw-justify-center tw-rounded-squid-xs", size === "large" ? "tw-h-squid-xl" : "tw-h-squid-l", showDetailOnHoverOnly
|
|
17931
|
-
? "tw-opacity-0 hover:tw-opacity-100 focus:tw-opacity-100 group-hover/list-item:tw-opacity-100 group-focus/list-item:tw-opacity-100"
|
|
17932
|
-
: "tw-flex", isDetailInteractive && "hover:tw-bg-material-light-thin", detailButtonClassName), children: [!!detail && (jsxRuntime.jsx(CaptionText, { className: "min-tw-w-4 min-tw-h-4 tw-px-squid-xxs tw-leading-[10px]", children: detail })), icon ? (jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-justify-center tw-px-[3px] tw-py-2", children: icon })) : null] }))), !!dropdownMenuItems && (jsxRuntime.jsx(ListItemActionsButton, { onClick: openDropdown, ref: openDropdownButtonRef, className: "tw-opacity-0 group-hover/list-item:tw-opacity-100" })), isDropdownOpen && !!dropdownMenuItems ? (jsxRuntime.jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownPosition, className: cn(!!dropdownPosition && dropdownPositionClassMap$1[dropdownPosition]), dropdownRef: dropdownRef, items: dropdownMenuItems })) : null] })) })));
|
|
17933
|
-
}
|
|
17934
|
-
const ListItemActionsButton = React$1.forwardRef((props) => {
|
|
17935
|
-
return (jsxRuntime.jsx("button", Object.assign({}, props, { onClick: (event) => {
|
|
17936
|
-
var _a;
|
|
17937
|
-
event.stopPropagation();
|
|
17938
|
-
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
|
|
17939
|
-
}, className: cn("tw-peer tw-absolute tw-right-squid-xxs tw-top-squid-xxs tw-flex tw-h-squid-xl tw-w-squid-xl tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-material-light-blend-grey-800 tw-p-2 tw-text-grey-300 tw-transition-opacity focus:tw-opacity-100", props.className), children: jsxRuntime.jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })));
|
|
17940
|
-
});
|
|
17941
|
-
|
|
17942
|
-
const dropdownPositionClassMap = {
|
|
17943
|
-
top: "tw-right-[calc(100%-10px)] tw-bottom-7",
|
|
17944
|
-
bottom: "tw-right-[calc(100%-10px)] tw-top-7",
|
|
17945
|
-
center: "tw-right-[40px] -tw-top-[55px]",
|
|
17946
|
-
};
|
|
17947
|
-
const statusBadge = {
|
|
17948
|
-
completed: {},
|
|
17949
|
-
pending: {
|
|
17950
|
-
badge: (jsxRuntime.jsx(Loader, { size: "16", strokeWidth: "4", className: "group-data-[squid-theme-type=dark]:tw-text-grey-100 group-data-[squid-theme-type=light]:tw-text-grey-900" })),
|
|
17951
|
-
containerClassName: "tw-bg-royal-400",
|
|
17952
|
-
},
|
|
17953
|
-
failed: {
|
|
17954
|
-
badge: (jsxRuntime.jsx("span", { className: "tw-bg-grey-900", children: jsxRuntime.jsx(EmojiSadIcon, { className: "tw-text-status-negative" }) })),
|
|
17955
|
-
containerClassName: "tw-bg-status-negative",
|
|
17956
|
-
},
|
|
17957
|
-
warning: {
|
|
17958
|
-
badge: (jsxRuntime.jsx("span", { className: "tw-bg-grey-900", children: jsxRuntime.jsx(EmojiMeh, { className: "tw-text-status-partial" }) })),
|
|
17959
|
-
containerClassName: "tw-bg-status-partial",
|
|
17960
|
-
},
|
|
17961
|
-
};
|
|
17962
|
-
function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuItems: _dropdownMenuItemsProp, itemsContainerRef, status, warningLabel, onClick, }) {
|
|
17963
|
-
const { isDropdownOpen, dropdownRef, openDropdownButtonRef, openDropdown, closeDropdown, itemRef, menuRef, dropdownPosition, } = useDropdownMenu({
|
|
17964
|
-
itemsContainerRef,
|
|
17965
|
-
});
|
|
17966
|
-
const dropdownMenuItems = _dropdownMenuItemsProp === null || _dropdownMenuItemsProp === void 0 ? void 0 : _dropdownMenuItemsProp.map((item) => (Object.assign(Object.assign({}, item), { onClick: () => {
|
|
17967
|
-
var _a;
|
|
17968
|
-
(_a = item.onClick) === null || _a === void 0 ? void 0 : _a.call(item);
|
|
17969
|
-
closeDropdown();
|
|
17970
|
-
} })));
|
|
17971
|
-
const statusLabel = React$1.useMemo(() => {
|
|
17972
|
-
switch (status) {
|
|
17973
|
-
case "completed":
|
|
17974
|
-
return jsxRuntime.jsx(CaptionText, { children: dateCompleted });
|
|
17975
|
-
case "pending":
|
|
17976
|
-
return jsxRuntime.jsx(CaptionText, { className: "tw-text-royal-400", children: "Pending" });
|
|
17977
|
-
case "failed":
|
|
17978
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { className: "tw-text-status-negative", children: "Fail" }), jsxRuntime.jsx(CaptionText, { children: dateCompleted })] }));
|
|
17979
|
-
case "warning":
|
|
17980
|
-
return (jsxRuntime.jsx(CaptionText, { className: "tw-text-status-partial", children: warningLabel }));
|
|
17981
|
-
default:
|
|
17982
|
-
return null;
|
|
17983
|
-
}
|
|
17984
|
-
}, [status, dateCompleted]);
|
|
17985
|
-
const isInteractive = !!onClick;
|
|
17986
|
-
const ItemTag = isInteractive ? "button" : "div";
|
|
17987
|
-
const itemTagProps = isInteractive
|
|
17988
|
-
? {
|
|
17989
|
-
onClick,
|
|
17990
|
-
}
|
|
17991
|
-
: {};
|
|
17992
|
-
return (jsxRuntime.jsx("li", { ref: itemRef, className: "tw-h-list-item-large tw-min-w-list-item-small tw-self-stretch tw-bg-grey-900 tw-px-squid-xs tw-text-grey-300", children: jsxRuntime.jsxs(ItemTag, Object.assign({}, itemTagProps, { className: cn("tw-group/history-item tw-relative tw-flex tw-w-full tw-flex-shrink-0 tw-items-center tw-gap-squid-xs tw-self-stretch tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs", isInteractive && "hover:tw-bg-material-light-thin"), children: [jsxRuntime.jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [!!statusBadge[status].badge && (jsxRuntime.jsx("span", { className: cn("tw-absolute -tw-left-[5px] tw-bottom-0 tw-z-10 tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-center tw-overflow-hidden tw-rounded-full tw-border tw-border-grey-900 tw-p-0.5", statusBadge[status].containerClassName), children: statusBadge[status].badge })), jsxRuntime.jsx("img", { src: firstImageUrl, className: "tw-absolute tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" }), jsxRuntime.jsx("img", { src: secondImageUrl, className: "tw-absolute tw-left-5 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-10 tw-flex-1 tw-flex-col tw-self-stretch", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-justify-between tw-text-grey-500", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center", children: [jsxRuntime.jsx(CaptionText, { children: fromLabel }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronRightSmallIcon, {}) }), jsxRuntime.jsx(CaptionText, { children: toLabel })] }), !!dropdownMenuItems && (jsxRuntime.jsx(ListItemActionsButton, { onClick: openDropdown, ref: openDropdownButtonRef, className: "tw-opacity-0 group-hover/history-item:tw-opacity-100" })), jsxRuntime.jsx("div", { className: cn("tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs", !!dropdownMenuItems &&
|
|
17993
|
-
"tw-transition-opacity group-hover/history-item:tw-hidden group-hover/history-item:tw-opacity-0 peer-focus:tw-hidden peer-focus:tw-opacity-0"), children: statusLabel })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx(BodyText, { size: "small", children: fromAmount }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), jsxRuntime.jsx(BodyText, { size: "small", children: toAmount })] })] }), isDropdownOpen && !!dropdownMenuItems ? (jsxRuntime.jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownPosition, className: cn(!!dropdownPosition && dropdownPositionClassMap[dropdownPosition]), dropdownRef: dropdownRef, items: dropdownMenuItems })) : null] })) }));
|
|
17994
|
-
}
|
|
17995
|
-
|
|
17996
|
-
function MenuItem({ label, imageUrl, icon }) {
|
|
17997
|
-
return (jsxRuntime.jsxs("li", { className: "tw-mx-squid-xxs tw-inline-flex tw-max-h-list-item-small tw-items-center tw-justify-start tw-gap-squid-xxs tw-rounded-squid-xs tw-bg-grey-900 tw-py-squid-xxs tw-pl-squid-xxs tw-pr-squid-xl tw-text-grey-300", children: [jsxRuntime.jsx("div", { className: "tw-h-squid-m tw-w-squid-m", children: imageUrl ? (jsxRuntime.jsx("img", { className: "tw-h-full tw-w-full tw-rounded-squid-xxs", src: imageUrl, alt: "" })) : icon ? (icon) : null }), jsxRuntime.jsx(CaptionText, { children: label })] }));
|
|
17998
|
-
}
|
|
17999
|
-
|
|
18000
|
-
const containerVariantClassNameMap = {
|
|
18001
|
-
small: "tw-px-squid-xs",
|
|
18002
|
-
large: "tw-px-squid-0",
|
|
18003
|
-
};
|
|
18004
|
-
const childrenVariantClassNameMap = {
|
|
18005
|
-
small: "tw-min-h-squid-l tw-px-squid-xs",
|
|
18006
|
-
large: "tw-min-h-squid-xl tw-px-squid-m",
|
|
18007
|
-
};
|
|
18008
|
-
function SmallBodyText(props) {
|
|
18009
|
-
return jsxRuntime.jsx(BodyText, Object.assign({ size: "small" }, props));
|
|
18010
|
-
}
|
|
18011
|
-
function PropertyListItem(_a) {
|
|
18012
|
-
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"]);
|
|
18013
|
-
const Text = variant === "small" ? CaptionText : SmallBodyText;
|
|
18014
|
-
return (jsxRuntime.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: jsxRuntime.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: [jsxRuntime.jsx("div", { className: cn("tw-w-6 tw-text-grey-500", iconClassName), children: icon }), jsxRuntime.jsx(Text, { className: cn("tw-flex-1 tw-text-grey-400", labelClassName), children: jsxRuntime.jsx(TextSkeleton, { isLoading: isLoading, children: label }) }), jsxRuntime.jsx(Text, { className: cn("tw-flex tw-text-grey-300", detailClassName), children: jsxRuntime.jsx(TextSkeleton, { isLoading: isLoading, children: detail }) })] }) })));
|
|
18015
|
-
}
|
|
18016
|
-
|
|
18017
|
-
function SectionTitle(_a) {
|
|
18018
|
-
var { title, icon, accessory, actionIcon, className } = _a, props = __rest$1(_a, ["title", "icon", "accessory", "actionIcon", "className"]);
|
|
18019
|
-
return (jsxRuntime.jsxs("header", Object.assign({}, props, { className: cn("tw-flex tw-h-[46px] tw-w-full tw-items-center tw-gap-squid-xxs tw-bg-grey-900 tw-px-squid-m tw-pb-squid-xs tw-pt-squid-m tw-text-royal-400", className), children: [icon, jsxRuntime.jsx(CaptionText, { children: title }), accessory ? (jsxRuntime.jsx(CaptionText, { className: "tw-flex-1 tw-text-right tw-text-grey-500", children: accessory })) : actionIcon ? (jsxRuntime.jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end", children: actionIcon })) : null] })));
|
|
18020
|
-
}
|
|
18021
|
-
|
|
18022
|
-
function SettingsItem({ icon, label, control, link, transparent = false, helpTooltip, }) {
|
|
18023
|
-
const ContentTag = link ? "a" : "div";
|
|
18024
|
-
const contentTagProps = link
|
|
18025
|
-
? {
|
|
18026
|
-
href: link,
|
|
18027
|
-
target: "_blank",
|
|
18028
|
-
}
|
|
18029
|
-
: {};
|
|
18030
|
-
const helpIcon = !!helpTooltip && (jsxRuntime.jsx(HelpIcon, { className: "tw-cursor-help tw-text-grey-600 hover:tw-text-grey-400" }));
|
|
18031
|
-
const showDetailsBorder = !!control && !link && !(control.type === "switch");
|
|
18032
|
-
return (jsxRuntime.jsx("li", { className: cn("tw-h-[50px] tw-self-stretch tw-px-squid-xs", transparent ? "tw-bg-transparent" : "tw-bg-grey-800"), children: jsxRuntime.jsxs(ContentTag, Object.assign({ className: cn("tw-flex tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xs tw-text-grey-300", link && "hover:tw-bg-material-light-thin") }, contentTagProps, { children: [icon, jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-1 tw-items-center tw-gap-squid-xxs tw-self-stretch", children: [jsxRuntime.jsx(BodyText, { size: "small", children: label }), helpTooltip ? (jsxRuntime.jsx(Tooltip, Object.assign({}, helpTooltip, { children: helpIcon }))) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: helpIcon }))] }), jsxRuntime.jsx("div", { className: cn("tw-flex tw-h-squid-l tw-items-center tw-justify-center tw-rounded-squid-xs", showDetailsBorder &&
|
|
18033
|
-
"tw-rounded-squid-xs tw-border tw-border-solid tw-border-material-light-thin tw-bg-material-dark-thin"), children: !!link ? (jsxRuntime.jsx(SquareArrowTopRight2Icon, { className: "tw-text-material-light-average" })) : (!!control && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [control.type === "amount" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SettingsButton, { onClick: () => control.onChange(control.resetValueControl.value), label: control.resetValueControl.label, isSelected: control.resetValueControl.value === control.value }), control.options.map(({ value }, index, _controls) => (jsxRuntime.jsx(SettingsButton, { label: "$" + value, isSelected: control.value === value, onClick: () => control.onChange(value) }, index))), jsxRuntime.jsx(SettingsSlider, { type: control.type, value: control.value, isSelected: control.value !== control.resetValueControl.value, onChange: control.onChange, decimalsFormat: control.decimalsFormat, max: 999 })] })), control.type === "switch" &&
|
|
18034
|
-
(control.tooltip ? (jsxRuntime.jsx(Tooltip, Object.assign({}, control.tooltip, { children: jsxRuntime.jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }) }))) : (jsxRuntime.jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }))), control.type === "percentage" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SettingsButton, { label: control.resetValueControl.label, isSelected: control.resetValueControl.value === control.value, onClick: control.resetValueControl.onSelect }), jsxRuntime.jsx(SettingsSlider, { onChange: control.onChange, value: control.value, type: "percentage", isSelected: control.value !== control.resetValueControl.value, decimalsFormat: control.decimalsFormat, max: control.max, min: control.min })] })), control.type === "options" && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: control.options.map(({ label, onSelect }, index) => (jsxRuntime.jsx(SettingsButton, { label: label, isSelected: control.selectedLabel === label, onClick: onSelect }, index))) }))] }))) })] })) }));
|
|
18035
|
-
}
|
|
18036
|
-
|
|
18037
|
-
const STEP_ITEM_HEIGHT = 52;
|
|
18038
|
-
const statusBgClassMap = {
|
|
18039
|
-
executed: "!tw-bg-grey-300",
|
|
18040
|
-
ongoing: "!tw-bg-grey-300",
|
|
18041
|
-
pending: "!tw-bg-grey-600",
|
|
18042
|
-
waiting: "!tw-bg-grey-300",
|
|
18043
|
-
error: "!tw-bg-status-negative",
|
|
18044
|
-
success: "!tw-bg-status-positive",
|
|
18045
|
-
warning: "!tw-bg-status-partial",
|
|
18046
|
-
};
|
|
18047
|
-
const separatorClassMap = {
|
|
18048
|
-
executed: "tw-text-grey-300",
|
|
18049
|
-
ongoing: "tw-text-grey-300",
|
|
18050
|
-
pending: "tw-text-grey-600",
|
|
18051
|
-
waiting: "tw-text-grey-300",
|
|
18052
|
-
error: "tw-text-status-negative",
|
|
18053
|
-
success: "tw-text-status-positive",
|
|
18054
|
-
warning: "tw-text-status-partial",
|
|
18055
|
-
};
|
|
18056
|
-
function SwapStepItem({ descriptionBlocks, showStepSeparator = false, link, status = "pending", }) {
|
|
18057
|
-
// these styles are located here instead of outside the component
|
|
18058
|
-
// so they are updated whenever the animation duration changes
|
|
18059
|
-
const transitionStyle = {
|
|
18060
|
-
transition: `background-color ${ANIMATION_DURATIONS.CHANGE_SWAP_STEP}ms, color ${ANIMATION_DURATIONS.CHANGE_SWAP_STEP}ms`,
|
|
18061
|
-
};
|
|
18062
|
-
const chipContent = React$1.useMemo(() => {
|
|
18063
|
-
switch (status) {
|
|
18064
|
-
case "success":
|
|
18065
|
-
case "executed":
|
|
18066
|
-
return jsxRuntime.jsx(Checkmark1Icon, {});
|
|
18067
|
-
case "error":
|
|
18068
|
-
return jsxRuntime.jsx(EmojiSadIcon, { size: "16" });
|
|
18069
|
-
case "warning":
|
|
18070
|
-
return jsxRuntime.jsx(EmojiMeh, { size: "16" });
|
|
18071
|
-
case "waiting":
|
|
18072
|
-
return jsxRuntime.jsx(DotGrid1x3HorizontalIcon, {});
|
|
18073
|
-
case "pending":
|
|
18074
|
-
return null;
|
|
18075
|
-
case "ongoing":
|
|
18076
|
-
return jsxRuntime.jsx(Loader, { size: "16", strokeWidth: "4" });
|
|
18077
|
-
default:
|
|
18078
|
-
return null;
|
|
18079
|
-
}
|
|
18080
|
-
}, [status]);
|
|
18081
|
-
const statusTextClass = React$1.useMemo(() => {
|
|
18082
|
-
switch (status) {
|
|
18083
|
-
case "pending":
|
|
18084
|
-
return "tw-text-grey-600";
|
|
18085
|
-
default:
|
|
18086
|
-
return "tw-text-grey-300";
|
|
18087
|
-
}
|
|
18088
|
-
}, [status]);
|
|
18089
|
-
return (jsxRuntime.jsx("li", { style: {
|
|
18090
|
-
maxHeight: `${STEP_ITEM_HEIGHT}px`,
|
|
18091
|
-
minHeight: `${STEP_ITEM_HEIGHT}px`,
|
|
18092
|
-
}, className: "tw-relative tw-flex tw-w-full tw-flex-col tw-items-start tw-justify-center tw-text-grey-300 tw-transition-colors tw-duration-1000", children: jsxRuntime.jsxs("a", { href: link, target: "_blank", style: Object.assign(Object.assign({}, transitionStyle), { maxHeight: `${STEP_ITEM_HEIGHT}px` }), className: cn("tw-group/swap-step-item tw-flex tw-w-full tw-items-center tw-rounded-squid-xs tw-py-squid-xxs", !!link && "hover:tw-bg-material-light-thin", statusTextClass), children: [jsxRuntime.jsxs("span", { className: "tw-relative tw-flex tw-min-h-squid-l tw-items-center tw-justify-center tw-gap-squid-xxs tw-px-squid-xs", children: [jsxRuntime.jsx(Chip, { style: transitionStyle, className: cn("tw-w-squid-xl", statusBgClassMap[status]), icon: chipContent }), showStepSeparator && (jsxRuntime.jsx("span", { className: cn(separatorClassMap[status], "tw-absolute tw-left-0 tw-top-full tw-mt-0.5"), style: transitionStyle, children: jsxRuntime.jsx(SwapStepSeparator, {}) }))] }), jsxRuntime.jsx(DescriptionBlocks, { className: "tw-min-h-squid-l tw-py-squid-xxs tw-pr-squid-xs", blocks: descriptionBlocks })] }) }));
|
|
18093
|
-
}
|
|
18094
|
-
|
|
18095
|
-
function PipeSeparator(_a) {
|
|
18096
|
-
var { className } = _a, props = __rest$1(_a, ["className"]);
|
|
18097
|
-
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-h-[0.8em] tw-w-[2px] tw-rounded-full tw-bg-[currentColor]", className) })));
|
|
18098
|
-
}
|
|
18099
|
-
|
|
18100
|
-
function ActionLayout({ lineCap = jsxRuntime.jsx(Timeline.CapTop, {}), status = "executed", showTimeline = true, showBody = true, nextStatus, statusIcon, description, title, icon, children, }) {
|
|
18101
|
-
return (jsxRuntime.jsxs(ActionWrapper, { status: status, children: [jsxRuntime.jsx(ActionLineOutRow, { status: nextStatus }), jsxRuntime.jsx(ActionStatusRow, { status: status, icon: statusIcon, children: description }), title && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ActionRow, { children: jsxRuntime.jsxs(Timeline, { className: cn("tw-h-squid-xs", statusTextClassMap[status]), children: [jsxRuntime.jsx(Timeline.CapTop, {}), jsxRuntime.jsx(Timeline.Straight, {}), jsxRuntime.jsx(Timeline.CapBottom, {})] }) }), jsxRuntime.jsxs(ActionRow, { children: [jsxRuntime.jsx("div", { className: "tw-flex tw-items-center tw-justify-center", children: icon }), jsxRuntime.jsx(BodyText, { size: "large", className: cn("tw-flex tw-min-h-squid-l tw-items-center !tw-leading-[1] tw-text-grey-300 tw-transition-opacity tw-duration-200", !showBody && "tw-opacity-0"), children: title })] })] })), jsxRuntime.jsxs(ActionRow, { children: [jsxRuntime.jsxs(Timeline, { className: showTimeline ? statusTextClassMap[status] : "!tw-text-[transparent]", children: [lineCap, jsxRuntime.jsx(Timeline.Straight, {})] }), jsxRuntime.jsx("div", { className: cn("tw-flex tw-flex-col tw-gap-squid-xs tw-pb-squid-xs tw-text-grey-500 tw-transition-opacity tw-duration-200", !showBody && "tw-opacity-0", title && "tw-pt-squid-xxs"), children: children })] })] }));
|
|
18102
|
-
}
|
|
18103
|
-
function ActionProperties({ timestamp, hash, url, }) {
|
|
18104
|
-
return (jsxRuntime.jsxs(CaptionText, { className: "tw-flex tw-items-center tw-gap-squid-xs", children: [timestamp && jsxRuntime.jsx(Timestamp, { time: timestamp }), timestamp && hash && jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-700" }), hash && jsxRuntime.jsx(HashLink, { hash: hash, url: url, showTx: true })] }));
|
|
18105
|
-
}
|
|
18106
|
-
function renderStatusIcon(status, defaultIcon) {
|
|
18107
|
-
switch (status) {
|
|
18108
|
-
case "success":
|
|
18109
|
-
return jsxRuntime.jsx(TransactionState, { status: "success", variant: "compact" });
|
|
18110
|
-
case "executed":
|
|
18111
|
-
return (jsxRuntime.jsx(TransactionState, { status: "executed", variant: "compact", icon: defaultIcon }));
|
|
18112
|
-
case "error":
|
|
18113
|
-
return jsxRuntime.jsx(EmojiSadIcon, { className: "tw-text-status-negative" });
|
|
18114
|
-
case "ongoing":
|
|
18115
|
-
return (jsxRuntime.jsx(Loader, { className: statusTextClassMap.ongoing, strokeWidth: "4", size: "20" }));
|
|
18116
|
-
case "waiting":
|
|
18117
|
-
return jsxRuntime.jsx(TransactionState, { status: "waiting", variant: "compact" });
|
|
18118
|
-
case "warning":
|
|
18119
|
-
return jsxRuntime.jsx(TransactionState, { status: "warning", variant: "compact" });
|
|
18120
|
-
}
|
|
18121
|
-
}
|
|
18122
|
-
const ActionLineOutRow = ({ status }) => (jsxRuntime.jsx(ActionRow, { children: jsxRuntime.jsxs(Timeline, { className: cn("tw-h-squid-xs", status ? statusTextClassMap[status] : "!tw-text-[transparent]"), children: [jsxRuntime.jsx(Timeline.Straight, {}), jsxRuntime.jsx(Timeline.CapBottom, {})] }) }));
|
|
18123
|
-
const ActionStatusRow = ({ children, status, icon, }) => (jsxRuntime.jsxs(ActionRow, { children: [jsxRuntime.jsx("div", { className: "tw-flex tw-items-center tw-justify-center", children: renderStatusIcon(status, icon) }), jsxRuntime.jsx("div", { className: "tw-flex tw-items-center", children: jsxRuntime.jsx(BodyText, { size: "small", tight: true, className: "tw-block tw-w-full tw-text-grey-300", children: children }) })] }));
|
|
18124
|
-
function ActionRow(_a) {
|
|
18125
|
-
var { className } = _a, props = __rest$1(_a, ["className"]);
|
|
18126
|
-
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-grid tw-grid-cols-[40px,1fr,60px] tw-gap-squid-xs tw-pl-squid-m", className) })));
|
|
18127
|
-
}
|
|
18128
|
-
function ActionWrapper({ children, status, className, }) {
|
|
18129
|
-
return (jsxRuntime.jsx("div", { className: cn("tw-relative tw-flex tw-flex-col tw-gap-squid-xxs", status === "waiting" && "tw-bg-grey-800", className), children: children }));
|
|
18130
|
-
}
|
|
18131
|
-
function Timestamp({ time }) {
|
|
18132
|
-
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-text-grey-500", children: [formatRelativeDate(time), jsxRuntime.jsx("span", { className: "tw-text-grey-700", children: "\u2022" }), formatTime(time)] }));
|
|
18133
|
-
}
|
|
18134
|
-
|
|
18135
|
-
function ApproveAction({ status, nextStatus, showTimeline, showBody, profile, chain, wallet, timestamp, hash, url, }) {
|
|
18136
|
-
return (jsxRuntime.jsxs(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(ThumbsUp, { fill: true }), description: "Approve contract", title: profile.label, icon: jsxRuntime.jsx(ImageIcon, { src: profile.imageURI, variant: "round", size: "xlarge" }), lineCap: jsxRuntime.jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxRuntime.jsxs(BodyText, { className: "tw-flex tw-items-center tw-gap-squid-xs", size: "small", children: [jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: chain.name }), jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-300" }), jsxRuntime.jsx(WalletLink, Object.assign({}, wallet))] }) }), (timestamp || hash) && (jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }))] }));
|
|
18137
|
-
}
|
|
18138
|
-
|
|
18139
|
-
function BridgeAction({ status, nextStatus, showTimeline, showBody, token, chain, provider, timestamp, hash, url, }) {
|
|
18140
|
-
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(SquareArrowTopLeftIcon, {}), description: jsxRuntime.jsxs(Inline, { children: ["Bridge", jsxRuntime.jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: token.symbol }) }), "to", jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: jsxRuntime.jsx(BodyText, { size: "small", children: chain.name }) }), "via", jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: (timestamp || hash) && (jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
|
|
18141
|
-
}
|
|
18142
|
-
|
|
18143
|
-
function FeesAction({ status, nextStatus, showTimeline = false, total, lines, }) {
|
|
18144
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(FeesTotal, { status: status, nextStatus: nextStatus, total: total, showTimeline: lines !== undefined || showTimeline }), lines && (jsxRuntime.jsx(FeesLines, { status: status, lines: lines, showTimeline: showTimeline }))] }));
|
|
18145
|
-
}
|
|
18146
|
-
function FeesTotal({ status, nextStatus, total, showTimeline, collapsed, }) {
|
|
18147
|
-
return (jsxRuntime.jsxs(ActionWrapper, { status: status, children: [jsxRuntime.jsx(ActionLineOutRow, { status: nextStatus }), jsxRuntime.jsx(ActionStatusRow, { status: status, icon: jsxRuntime.jsx(TagIconFilled, {}), children: jsxRuntime.jsx(FeesRow, Object.assign({ collapsed: collapsed }, total)) }), jsxRuntime.jsx(ActionRow, { children: jsxRuntime.jsxs(Timeline, { className: cn("tw-h-squid-xs", showTimeline ? statusTextClassMap[status] : "tw-text-transparent"), children: [jsxRuntime.jsx(Timeline.CapTop, {}), jsxRuntime.jsx(Timeline.Straight, {})] }) })] }));
|
|
18148
|
-
}
|
|
18149
|
-
function FeesLines({ status, lines, showTimeline = false, }) {
|
|
18150
|
-
return (jsxRuntime.jsxs(ActionWrapper, { status: status, children: [lines && (jsxRuntime.jsx("div", { children: lines.map((line, index) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [index > 0 && (jsxRuntime.jsx(ActionRow, { children: jsxRuntime.jsxs(Timeline, { className: cn("tw-h-squid-xs", statusTextClassMap[status]), children: [jsxRuntime.jsx(Timeline.CapTop, {}), jsxRuntime.jsx(Timeline.Straight, {})] }) })), jsxRuntime.jsxs(ActionRow, { children: [jsxRuntime.jsxs(Timeline, { className: statusTextClassMap[status], children: [jsxRuntime.jsx(Timeline.Straight, {}), jsxRuntime.jsx(Timeline.ArrowRight, {})] }), jsxRuntime.jsx("div", { className: "tw-relative tw-top-[2px] tw-flex tw-items-end", children: jsxRuntime.jsx(FeesRow, Object.assign({}, line)) })] })] }, index))) })), jsxRuntime.jsx(ActionRow, { children: jsxRuntime.jsxs(Timeline, { className: cn("tw-h-squid-xs", showTimeline
|
|
18151
|
-
? statusTextClassMap[status]
|
|
18152
|
-
: "!tw-text-[transparent]"), children: [jsxRuntime.jsx(Timeline.CapTop, {}), jsxRuntime.jsx(Timeline.Straight, {})] }) })] }));
|
|
18153
|
-
}
|
|
18154
|
-
function FeesRow({ label, usd, amount, symbol, collapsed = false, }) {
|
|
18155
|
-
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-w-full tw-gap-squid-xs", children: [jsxRuntime.jsx(SizeTransition, { children: jsxRuntime.jsx(BodyText, { size: "small", tight: true, className: cn("tw-block tw-truncate tw-text-grey-300", !collapsed && "tw-w-[100px]"), children: label }) }), jsxRuntime.jsx("div", { className: "tw-flex tw-items-center", children: jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-700" }) }), jsxRuntime.jsxs(BodyText, { size: "small", tight: true, className: "tw-flex-grow tw-text-grey-300", children: ["$", usd] }), jsxRuntime.jsxs(CaptionText, { className: "tw-text-right tw-text-grey-500", children: [amount, " ", symbol] })] }));
|
|
18156
|
-
}
|
|
18157
|
-
|
|
18158
|
-
function IncompleteAction({ status, nextStatus, message, buttons, }) {
|
|
18159
|
-
return (jsxRuntime.jsxs(ActionWrapper, { status: status, children: [jsxRuntime.jsx(ActionLineOutRow, { status: nextStatus }), jsxRuntime.jsxs(ActionRow, { children: [jsxRuntime.jsxs(Timeline, { children: [jsxRuntime.jsx(Timeline.ArrowReverse, {}), jsxRuntime.jsx(Timeline.Straight, {})] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-squid-m tw-pb-squid-m", children: [jsxRuntime.jsx(BodyText, { size: "small", tight: true, className: "tw-text-grey-300", children: "Transaction incomplete" }), jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-grey-500", children: message }), jsxRuntime.jsx("div", { className: "tw-flex tw-gap-squid-xs", children: buttons })] })] })] }));
|
|
18160
|
-
}
|
|
18161
|
-
|
|
18162
|
-
function linkActionTimelineProps(actions, collapsed) {
|
|
18163
|
-
return actions.map((action, index) => {
|
|
18164
|
-
var _a;
|
|
18165
|
-
const nextStatus = (_a = actions[index - 1]) === null || _a === void 0 ? void 0 : _a.props.status;
|
|
18166
|
-
return Object.assign(Object.assign({}, action), { props: Object.assign(Object.assign({}, action.props), { showTimeline: index !== actions.length - 1, showBody: !(collapsed && index === 0), nextStatus }) });
|
|
18167
|
-
});
|
|
18168
|
-
}
|
|
18169
|
-
|
|
18170
|
-
function ReceiveNFTAction({ status, nextStatus, showTimeline, showBody, nft, chain, wallet, timestamp, hash, url, }) {
|
|
18171
|
-
return (jsxRuntime.jsxs(ActionLayout, { status: status, statusIcon: jsxRuntime.jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive NFT", title: nft.name, icon: jsxRuntime.jsx(ImageIcon, { src: nft.imageURI, variant: "square", size: "xlarge" }), lineCap: jsxRuntime.jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxRuntime.jsxs(BodyText, { className: "tw-flex tw-items-center tw-gap-squid-xs", size: "small", children: [jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: jsxRuntime.jsx(BodyText, { size: "small", children: chain.name }) }), jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-700" }), jsxRuntime.jsx(WalletLink, Object.assign({}, wallet))] }) }), jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
18172
|
-
}
|
|
18173
|
-
|
|
18174
|
-
function ReceiveTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
|
|
18175
|
-
return (jsxRuntime.jsxs(ActionLayout, { status: status, statusIcon: jsxRuntime.jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive tokens", title: `${amount} ${token.symbol}`, icon: jsxRuntime.jsx(ImageIcon, { src: token.logoURI, variant: "round", size: "xlarge" }), lineCap: jsxRuntime.jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxRuntime.jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs", children: [jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: jsxRuntime.jsx(BodyText, { size: "small", children: chain.name }) }), jsxRuntime.jsx(PipeSeparator, { className: "tw-text-body-small tw-text-grey-700" }), " ", jsxRuntime.jsx(WalletLink, Object.assign({}, wallet))] }) }), jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
18176
|
-
}
|
|
18177
|
-
|
|
18178
|
-
function SendTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
|
|
18179
|
-
return (jsxRuntime.jsxs(ActionLayout, { status: status, statusIcon: jsxRuntime.jsx(ArrowRightUpIcon, {}), nextStatus: nextStatus, description: "Send tokens", title: `${amount} ${token.symbol}`, icon: jsxRuntime.jsx(ImageIcon, { src: token.logoURI, variant: "round", size: "xlarge" }), lineCap: jsxRuntime.jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxRuntime.jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs", children: [jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: chain.name }), jsxRuntime.jsx(PipeSeparator, { className: "tw-text-body-small tw-text-grey-700" }), " ", jsxRuntime.jsx(WalletLink, Object.assign({}, wallet))] }) }), jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
18180
|
-
}
|
|
18181
|
-
|
|
18182
|
-
function StakeAction({ status, nextStatus, showTimeline, showBody, token, provider, timestamp, hash, url, }) {
|
|
18183
|
-
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(PieChartIcon, {}), description: jsxRuntime.jsx(Inline, { children: [
|
|
18184
|
-
"Stake",
|
|
18185
|
-
jsxRuntime.jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: token.symbol }) }),
|
|
18186
|
-
"on",
|
|
18187
|
-
jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) }),
|
|
18188
|
-
] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
18189
|
-
}
|
|
18190
|
-
|
|
18191
|
-
function StartAction({ status, nextStatus, showTimeline = false, showBody = false, timestamp, hash, url, }) {
|
|
18192
|
-
const getDescription = () => {
|
|
18193
|
-
switch (status) {
|
|
18194
|
-
case "error":
|
|
18195
|
-
case "waiting":
|
|
18196
|
-
return "Transaction not started";
|
|
18197
|
-
default:
|
|
18198
|
-
return "Transaction started";
|
|
18199
|
-
}
|
|
18200
|
-
};
|
|
18201
|
-
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(ArrowUpIcon, {}), description: getDescription(), lineCap: jsxRuntime.jsx(Timeline.CapTop, {}), showTimeline: showTimeline, showBody: showBody, children: status === "waiting" ? (jsxRuntime.jsx(CaptionText, { children: "Waiting to confirm..." })) : (jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
|
|
18202
|
-
}
|
|
18203
|
-
|
|
18204
|
-
function SuccessAction({ nextStatus, status, description = status === "error"
|
|
18205
|
-
? "Transaction failed"
|
|
18206
|
-
: "Transaction successful", showTimeline, showBody, timestamp, hash, url, }) {
|
|
18207
|
-
return (jsxRuntime.jsx(ActionLayout, { description: description, status: status, nextStatus: nextStatus, showTimeline: showTimeline, showBody: showBody, children: (timestamp || hash) && (jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
|
|
18208
|
-
}
|
|
18209
|
-
|
|
18210
|
-
function SwapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
|
|
18211
|
-
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxRuntime.jsxs(Inline, { children: ["Swap", jsxRuntime.jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: fromToken.symbol }) }), "to", jsxRuntime.jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: toToken.symbol }) }), "via", jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
18212
|
-
}
|
|
18213
|
-
|
|
18214
|
-
function WrapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
|
|
18215
|
-
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxRuntime.jsxs(Inline, { children: ["Wrap", jsxRuntime.jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: fromToken.symbol }) }), "to", jsxRuntime.jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: toToken.symbol }) }), "via", jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
18216
|
-
}
|
|
18217
|
-
|
|
18218
|
-
const actionComponentMap = {
|
|
18219
|
-
success: SuccessAction,
|
|
18220
|
-
receive_tokens: ReceiveTokensAction,
|
|
18221
|
-
receive_nft: ReceiveNFTAction,
|
|
18222
|
-
approve: ApproveAction,
|
|
18223
|
-
send_tokens: SendTokensAction,
|
|
18224
|
-
swap: SwapAction,
|
|
18225
|
-
bridge: BridgeAction,
|
|
18226
|
-
wrap: WrapAction,
|
|
18227
|
-
stake: StakeAction,
|
|
18228
|
-
start: StartAction,
|
|
18229
|
-
fees: FeesAction,
|
|
18230
|
-
incomplete: IncompleteAction,
|
|
18231
|
-
};
|
|
18232
|
-
function TransactionAction({ type, props }) {
|
|
18233
|
-
const Component = actionComponentMap[type];
|
|
18234
|
-
return jsxRuntime.jsx(Component, Object.assign({}, props));
|
|
18235
|
-
}
|
|
18236
|
-
|
|
18237
|
-
function Transfer({ isLoading, from, to, className }) {
|
|
18238
|
-
return (jsxRuntime.jsx("div", { className: cn("tw-flex tw-items-center tw-gap-squid-xxs", className), children: jsxRuntime.jsxs(Join, { glue: () => jsxRuntime.jsx(ChevronLargeRightIcon, { className: "tw-text-grey-500" }), children: [isLoading ? jsxRuntime.jsx(TextSkeleton, {}) : from, isLoading ? jsxRuntime.jsx(TextSkeleton, {}) : to] }) }));
|
|
18239
|
-
}
|
|
18240
|
-
|
|
18241
|
-
function TransactionItem({ className, isLoading = false, status, image, type, hash, fromChain, toChain, fromAmount, toAmount, timestamp, variant = "full", }) {
|
|
18242
|
-
return (jsxRuntime.jsxs("div", { className: cn("tw-flex tw-items-stretch tw-gap-squid-xs tw-bg-grey-900 tw-p-squid-xs", className), children: [variant === "full" && (jsxRuntime.jsxs("div", { className: "tw-timeline-gradient-mask tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xxs", children: [jsxRuntime.jsxs(Timeline, { className: "tw-flex-grow tw-text-grey-700", children: [jsxRuntime.jsx(Timeline.Straight, {}), jsxRuntime.jsx(Timeline.CapBottom, {})] }), jsxRuntime.jsx(TransactionState, { status: !status || isLoading ? "pending" : status, variant: "compact" }), jsxRuntime.jsxs(Timeline, { className: "tw-flex-grow tw-text-grey-700", children: [jsxRuntime.jsx(Timeline.CapTop, {}), jsxRuntime.jsx(Timeline.Straight, {})] })] })), jsxRuntime.jsx("div", { className: "tw-flex tw-w-[50px] tw-items-center tw-justify-center", children: image }), jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-grow tw-flex-col tw-gap-squid-xxs", children: [jsxRuntime.jsx(CaptionText, { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: jsxRuntime.jsx(TransactionItemHeader, { hash: hash, status: status, type: type, isLoading: isLoading, variant: variant }) }), (isLoading || fromChain || toChain) && (jsxRuntime.jsx(CaptionText, { className: "tw-block tw-h-squid-m", children: jsxRuntime.jsx(Transfer, { className: "tw-text-grey-400", isLoading: isLoading, from: fromChain && (jsxRuntime.jsx(IconLabel, { src: fromChain.logoURI, children: fromChain.name })), to: toChain && (jsxRuntime.jsx(IconLabel, { src: toChain.logoURI, children: toChain.name })) }) })), (isLoading || fromAmount || toAmount) && (jsxRuntime.jsx(Transfer, { className: "tw-text-grey-300", isLoading: isLoading, from: fromAmount ? (jsxRuntime.jsx(BodyText, { size: "small", children: fromAmount })) : undefined, to: toAmount ? (jsxRuntime.jsx(BodyText, { size: "small", children: toAmount })) : undefined }))] }), timestamp && variant === "full" && (jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: formatRelativeTime(timestamp) }))] }));
|
|
18243
|
-
}
|
|
18244
|
-
const TransactionItemHeaderWrapper = ({ children, }) => {
|
|
18245
|
-
return (jsxRuntime.jsx(Join, { glue: () => jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-600" }), children: children }));
|
|
18246
|
-
};
|
|
18247
|
-
const TransactionItemHeader = ({ isLoading, variant, type, hash, status, }) => {
|
|
18248
|
-
if (isLoading) {
|
|
18249
|
-
return (jsxRuntime.jsxs(TransactionItemHeaderWrapper, { children: [jsxRuntime.jsx(TextSkeleton, {}), jsxRuntime.jsx(TextSkeleton, {})] }));
|
|
18250
|
-
}
|
|
18251
|
-
if (variant === "full") {
|
|
18252
|
-
if (!type || !hash)
|
|
18253
|
-
return null;
|
|
18254
|
-
return (jsxRuntime.jsxs(TransactionItemHeaderWrapper, { children: [jsxRuntime.jsx(TxTypeLabel, { type: type }), jsxRuntime.jsx("span", { className: "tw-text-grey-500", children: truncateHash(hash) })] }));
|
|
18255
|
-
}
|
|
18256
|
-
if (status && type) {
|
|
18257
|
-
return (jsxRuntime.jsxs(TransactionItemHeaderWrapper, { children: [jsxRuntime.jsx(TransactionState, { status: status, variant: "small" }), jsxRuntime.jsx(TxTypeLabel, { type: type })] }));
|
|
18258
|
-
}
|
|
18259
|
-
return null;
|
|
18260
|
-
};
|
|
18261
|
-
const TxTypeLabel = ({ type }) => {
|
|
18262
|
-
return (jsxRuntime.jsxs("span", { className: "tw-inline-flex tw-items-center tw-gap-[2px] tw-text-royal-500", children: [type === null || type === void 0 ? void 0 : type.icon, " ", type === null || type === void 0 ? void 0 : type.name] }));
|
|
18263
|
-
};
|
|
18264
|
-
|
|
18265
|
-
function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator = false, }) {
|
|
18266
|
-
return (jsxRuntime.jsxs("li", { className: "tw-flex tw-flex-col tw-self-stretch", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-self-stretch", children: [jsxRuntime.jsx(Track, { imageUrl: imageUrl }), jsxRuntime.jsx(Label, { subtitle: subtitle, descriptionBlocks: descriptionBlocks })] }), showStepSeparator && (jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-xxl tw-justify-center", children: jsxRuntime.jsx("div", { className: "tw-h-squid-m tw-w-1 tw-rounded-full tw-bg-gradient-to-t tw-from-grey-500 tw-to-grey-800" }) }))] }));
|
|
18267
|
-
}
|
|
18268
|
-
function Track({ imageUrl }) {
|
|
18269
|
-
return (jsxRuntime.jsx("div", { className: "tw-relative tw-flex tw-w-squid-xxl tw-min-w-squid-xxl tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-px-squid-xs", children: jsxRuntime.jsx("img", { src: imageUrl, alt: "", className: "tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs" }) }));
|
|
18270
|
-
}
|
|
18271
|
-
function Label({ subtitle, descriptionBlocks, }) {
|
|
18272
|
-
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-items-start", children: [jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-self-stretch tw-py-squid-xxs tw-pr-squid-m tw-text-grey-500", children: jsxRuntime.jsx(CaptionText, { children: subtitle }) }), jsxRuntime.jsx(DescriptionBlocks, { blocks: descriptionBlocks, className: "tw-py-squid-xxs tw-pr-squid-m tw-text-grey-300" })] }));
|
|
18273
|
-
}
|
|
18274
|
-
|
|
18275
17784
|
const borderRadiusClassMap = {
|
|
18276
17785
|
sm: "tw-rounded-squid-s",
|
|
18277
17786
|
lg: "tw-rounded-squid-m",
|
|
18278
17787
|
};
|
|
18279
17788
|
function Menu(_a) {
|
|
18280
|
-
var { children, containerClassName, contentClassName, rounded = "lg", menuRef,
|
|
18281
|
-
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-max-w-[320px]", containerClassName), ref: menuRef, children: jsxRuntime.jsxs("div", { className: cn("tw-relative tw-inline-flex tw-max-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-m tw-bg-material-dark-thick tw-p-squid-xs tw-text-center tw-text-material-light-thick
|
|
17789
|
+
var { children, containerClassName, contentClassName, rounded = "lg", menuRef, contentWrapperProps } = _a, props = __rest$1(_a, ["children", "containerClassName", "contentClassName", "rounded", "menuRef", "contentWrapperProps"]);
|
|
17790
|
+
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-max-w-[320px]", containerClassName), ref: menuRef, children: jsxRuntime.jsxs("div", { className: cn("tw-relative tw-inline-flex tw-max-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-m tw-bg-material-dark-thick tw-p-squid-xs tw-text-center tw-text-material-light-thick group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2", borderRadiusClassMap[rounded], contentClassName,
|
|
17791
|
+
// :before element to create a backdrop
|
|
17792
|
+
// Not applied to the div itself because the backdrop-filter spec does not apply nested backdrop filters
|
|
17793
|
+
"before:tw-absolute before:tw-inset-0 before:-tw-z-[1] before:tw-h-full before:tw-w-full before:tw-rounded-squid-m before:tw-backdrop-blur/20 before:tw-backdrop-saturate-150"), children: [typeof children === "string" ? (jsxRuntime.jsx(CaptionText, { className: "tw-z-20 tw-self-stretch !tw-leading-[10px]", children: children })) : (jsxRuntime.jsx("div", Object.assign({}, contentWrapperProps, { className: cn("tw-z-20 tw-max-w-full tw-text-caption", contentWrapperProps === null || contentWrapperProps === void 0 ? void 0 : contentWrapperProps.className), children: children }))), jsxRuntime.jsx("div", { className: cn("tw-absolute tw-inset-0 tw-z-10 tw-h-full tw-w-full tw-border tw-border-material-light-thin tw-bg-material-light-thin", borderRadiusClassMap[rounded]) })] }) })));
|
|
18282
17794
|
}
|
|
18283
17795
|
|
|
18284
|
-
function DropdownMenu({ dropdownRef,
|
|
18285
|
-
return (jsxRuntime.jsx("div", { ref: dropdownRef, className: "tw-relative", children: jsxRuntime.jsx(Menu, { menuRef: menuRef, rounded: "sm", containerClassName: cn("tw-absolute tw-right-0 tw-z-20", className), contentClassName: "!tw-p-0", children: !isHidden && (jsxRuntime.jsx("ul", { className: cn("tw-flex tw-max-w-full tw-flex-col tw-gap-squid-xxs tw-
|
|
17796
|
+
function DropdownMenu({ dropdownRef, className, menuRef, isHidden = false, listClassName, containerClassName, children, contentWrapperProps, menuContentClassName, }) {
|
|
17797
|
+
return (jsxRuntime.jsx("div", { ref: dropdownRef, className: cn("tw-relative", containerClassName), children: jsxRuntime.jsx(Menu, { menuRef: menuRef, rounded: "sm", containerClassName: cn("tw-absolute tw-right-0 tw-z-20", className), contentClassName: cn("!tw-p-0", menuContentClassName), contentWrapperProps: contentWrapperProps, children: !isHidden && (jsxRuntime.jsx("ul", { className: cn("tw-flex tw-max-w-full tw-flex-col tw-gap-squid-xxs tw-px-0 tw-py-squid-xxs", listClassName), children: children })) }) }));
|
|
18286
17798
|
}
|
|
18287
17799
|
|
|
18288
17800
|
function InfoBox({ title, description, icon }) {
|
|
@@ -18354,6 +17866,11 @@ function NavigationBar(_a) {
|
|
|
18354
17866
|
: "tw-flex"), children: jsxRuntime.jsx(HeadingText, { size: "small", children: title }) })) : null] })));
|
|
18355
17867
|
}
|
|
18356
17868
|
|
|
17869
|
+
function PipeSeparator(_a) {
|
|
17870
|
+
var { className } = _a, props = __rest$1(_a, ["className"]);
|
|
17871
|
+
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-h-[0.8em] tw-w-[2px] tw-rounded-full tw-bg-[currentColor]", className) })));
|
|
17872
|
+
}
|
|
17873
|
+
|
|
18357
17874
|
function CollapsibleMenu({ children, menuRef, isOpen, transitionDuration, size, className, }) {
|
|
18358
17875
|
return (jsxRuntime.jsx("aside", { style: Object.assign({ transitionDuration, transitionTimingFunction: isOpen
|
|
18359
17876
|
? "cubic-bezier(0.4, 1.3, 0.4, 1)"
|
|
@@ -18784,199 +18301,838 @@ function requireWithSelector_development () {
|
|
|
18784
18301
|
var memoizedSnapshot;
|
|
18785
18302
|
var memoizedSelection;
|
|
18786
18303
|
|
|
18787
|
-
var memoizedSelector = function (nextSnapshot) {
|
|
18788
|
-
if (!hasMemo) {
|
|
18789
|
-
// The first time the hook is called, there is no memoized result.
|
|
18790
|
-
hasMemo = true;
|
|
18791
|
-
memoizedSnapshot = nextSnapshot;
|
|
18304
|
+
var memoizedSelector = function (nextSnapshot) {
|
|
18305
|
+
if (!hasMemo) {
|
|
18306
|
+
// The first time the hook is called, there is no memoized result.
|
|
18307
|
+
hasMemo = true;
|
|
18308
|
+
memoizedSnapshot = nextSnapshot;
|
|
18309
|
+
|
|
18310
|
+
var _nextSelection = selector(nextSnapshot);
|
|
18311
|
+
|
|
18312
|
+
if (isEqual !== undefined) {
|
|
18313
|
+
// Even if the selector has changed, the currently rendered selection
|
|
18314
|
+
// may be equal to the new selection. We should attempt to reuse the
|
|
18315
|
+
// current value if possible, to preserve downstream memoizations.
|
|
18316
|
+
if (inst.hasValue) {
|
|
18317
|
+
var currentSelection = inst.value;
|
|
18318
|
+
|
|
18319
|
+
if (isEqual(currentSelection, _nextSelection)) {
|
|
18320
|
+
memoizedSelection = currentSelection;
|
|
18321
|
+
return currentSelection;
|
|
18322
|
+
}
|
|
18323
|
+
}
|
|
18324
|
+
}
|
|
18325
|
+
|
|
18326
|
+
memoizedSelection = _nextSelection;
|
|
18327
|
+
return _nextSelection;
|
|
18328
|
+
} // We may be able to reuse the previous invocation's result.
|
|
18329
|
+
|
|
18330
|
+
|
|
18331
|
+
// We may be able to reuse the previous invocation's result.
|
|
18332
|
+
var prevSnapshot = memoizedSnapshot;
|
|
18333
|
+
var prevSelection = memoizedSelection;
|
|
18334
|
+
|
|
18335
|
+
if (objectIs(prevSnapshot, nextSnapshot)) {
|
|
18336
|
+
// The snapshot is the same as last time. Reuse the previous selection.
|
|
18337
|
+
return prevSelection;
|
|
18338
|
+
} // The snapshot has changed, so we need to compute a new selection.
|
|
18339
|
+
|
|
18340
|
+
|
|
18341
|
+
// The snapshot has changed, so we need to compute a new selection.
|
|
18342
|
+
var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data
|
|
18343
|
+
// has changed. If it hasn't, return the previous selection. That signals
|
|
18344
|
+
// to React that the selections are conceptually equal, and we can bail
|
|
18345
|
+
// out of rendering.
|
|
18346
|
+
|
|
18347
|
+
// If a custom isEqual function is provided, use that to check if the data
|
|
18348
|
+
// has changed. If it hasn't, return the previous selection. That signals
|
|
18349
|
+
// to React that the selections are conceptually equal, and we can bail
|
|
18350
|
+
// out of rendering.
|
|
18351
|
+
if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {
|
|
18352
|
+
return prevSelection;
|
|
18353
|
+
}
|
|
18354
|
+
|
|
18355
|
+
memoizedSnapshot = nextSnapshot;
|
|
18356
|
+
memoizedSelection = nextSelection;
|
|
18357
|
+
return nextSelection;
|
|
18358
|
+
}; // Assigning this to a constant so that Flow knows it can't change.
|
|
18359
|
+
|
|
18360
|
+
|
|
18361
|
+
// Assigning this to a constant so that Flow knows it can't change.
|
|
18362
|
+
var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;
|
|
18363
|
+
|
|
18364
|
+
var getSnapshotWithSelector = function () {
|
|
18365
|
+
return memoizedSelector(getSnapshot());
|
|
18366
|
+
};
|
|
18367
|
+
|
|
18368
|
+
var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {
|
|
18369
|
+
return memoizedSelector(maybeGetServerSnapshot());
|
|
18370
|
+
};
|
|
18371
|
+
return [getSnapshotWithSelector, getServerSnapshotWithSelector];
|
|
18372
|
+
}, [getSnapshot, getServerSnapshot, selector, isEqual]),
|
|
18373
|
+
getSelection = _useMemo[0],
|
|
18374
|
+
getServerSelection = _useMemo[1];
|
|
18375
|
+
|
|
18376
|
+
var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);
|
|
18377
|
+
useEffect(function () {
|
|
18378
|
+
inst.hasValue = true;
|
|
18379
|
+
inst.value = value;
|
|
18380
|
+
}, [value]);
|
|
18381
|
+
useDebugValue(value);
|
|
18382
|
+
return value;
|
|
18383
|
+
}
|
|
18384
|
+
|
|
18385
|
+
withSelector_development.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;
|
|
18386
|
+
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
|
18387
|
+
if (
|
|
18388
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
|
18389
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
|
|
18390
|
+
'function'
|
|
18391
|
+
) {
|
|
18392
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
18393
|
+
}
|
|
18394
|
+
|
|
18395
|
+
})();
|
|
18396
|
+
}
|
|
18397
|
+
return withSelector_development;
|
|
18398
|
+
}
|
|
18399
|
+
|
|
18400
|
+
if (process.env.NODE_ENV === 'production') {
|
|
18401
|
+
withSelector.exports = requireWithSelector_production_min();
|
|
18402
|
+
} else {
|
|
18403
|
+
withSelector.exports = requireWithSelector_development();
|
|
18404
|
+
}
|
|
18405
|
+
|
|
18406
|
+
var withSelectorExports = withSelector.exports;
|
|
18407
|
+
var useSyncExternalStoreExports = /*@__PURE__*/getDefaultExportFromCjs(withSelectorExports);
|
|
18408
|
+
|
|
18409
|
+
const { useDebugValue } = React$1;
|
|
18410
|
+
const { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;
|
|
18411
|
+
let didWarnAboutEqualityFn = false;
|
|
18412
|
+
const identity = (arg) => arg;
|
|
18413
|
+
function useStore(api, selector = identity, equalityFn) {
|
|
18414
|
+
if ((undefined ? undefined.MODE : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
|
|
18415
|
+
console.warn(
|
|
18416
|
+
"[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
|
|
18417
|
+
);
|
|
18418
|
+
didWarnAboutEqualityFn = true;
|
|
18419
|
+
}
|
|
18420
|
+
const slice = useSyncExternalStoreWithSelector(
|
|
18421
|
+
api.subscribe,
|
|
18422
|
+
api.getState,
|
|
18423
|
+
api.getServerState || api.getInitialState,
|
|
18424
|
+
selector,
|
|
18425
|
+
equalityFn
|
|
18426
|
+
);
|
|
18427
|
+
useDebugValue(slice);
|
|
18428
|
+
return slice;
|
|
18429
|
+
}
|
|
18430
|
+
const createImpl = (createState) => {
|
|
18431
|
+
if ((undefined ? undefined.MODE : void 0) !== "production" && typeof createState !== "function") {
|
|
18432
|
+
console.warn(
|
|
18433
|
+
"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
|
|
18434
|
+
);
|
|
18435
|
+
}
|
|
18436
|
+
const api = typeof createState === "function" ? createStore(createState) : createState;
|
|
18437
|
+
const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
|
|
18438
|
+
Object.assign(useBoundStore, api);
|
|
18439
|
+
return useBoundStore;
|
|
18440
|
+
};
|
|
18441
|
+
const create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
18442
|
+
|
|
18443
|
+
const useContainerStore = create(() => ({
|
|
18444
|
+
containerRef: undefined,
|
|
18445
|
+
}));
|
|
18446
|
+
|
|
18447
|
+
function ProductCard({ children }) {
|
|
18448
|
+
const containerRef = React$1.useRef(null);
|
|
18449
|
+
React$1.useEffect(() => {
|
|
18450
|
+
useContainerStore.setState({ containerRef });
|
|
18451
|
+
}, [containerRef]);
|
|
18452
|
+
return (jsxRuntime.jsx("div", { style: {
|
|
18453
|
+
width: `min(100vw, ${MEDIA_QUERIES.MOBILE_LG.value}px)`,
|
|
18454
|
+
}, className: "tw-flex tw-min-h-full tw-max-w-[100vw] tw-flex-col tw-justify-center tw-overflow-hidden tw-bg-grey-900 tw-text-grey-300 tw-outline tw-outline-1 tw-outline-material-light-thin group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-3 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-3 mobile-lg:tw-max-w-card-large mobile-lg:tw-rounded-squid-l", children: jsxRuntime.jsx("div", { ref: containerRef, className: "tw-relative tw-flex tw-h-card-small tw-w-full tw-flex-col tw-justify-end mobile-lg:tw-w-card-large mobile-xs-height:tw-h-card-compact mobile-sm-height:tw-h-card-large", children: children }) }));
|
|
18455
|
+
}
|
|
18456
|
+
function BorderedContainer({ children, className, }) {
|
|
18457
|
+
return (jsxRuntime.jsx("section", { className: cn("tw-border-t tw-border-t-material-light-thin", className), children: children }));
|
|
18458
|
+
}
|
|
18459
|
+
|
|
18460
|
+
function ProfileHeaderBackground() {
|
|
18461
|
+
return (jsxRuntime.jsxs("div", { className: "tw-relative tw-flex tw-min-h-[195px] tw-flex-1 tw-flex-col tw-items-center tw-justify-center tw-self-stretch tw-overflow-hidden tw-rounded-bl-squid-l tw-rounded-br-squid-l tw-rounded-tl-[25px] tw-rounded-tr-[25px] tw-pb-squid-s group-data-[squid-theme-type='dark']:tw-bg-royal-dark group-data-[squid-theme-type='light']:tw-bg-royal-light", children: [jsxRuntime.jsx("div", { className: "tw-h-[240px]", children: [...Array(4)].map((_, i) => (jsxRuntime.jsx(HeaderBackgroundDecorationRow, { index: i }, i))) }), jsxRuntime.jsx("div", { className: "z-10 tw-absolute tw-inset-0 tw-h-[195px] tw-shadow-inset-royal" })] }));
|
|
18462
|
+
}
|
|
18463
|
+
function HeaderBackgroundDecorationRow({ index }) {
|
|
18464
|
+
const logoWithImage = (jsxRuntime.jsx(LogoContainer, { children: jsxRuntime.jsx(SquidLogo, {}) }));
|
|
18465
|
+
const emptyLogo = jsxRuntime.jsx(LogoContainer, {});
|
|
18466
|
+
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-h-[60px] tw-w-[470px] tw-items-center tw-justify-center tw-self-stretch tw-overflow-hidden tw-text-royal-500", children: [index % 2 === 0 ? emptyLogo : logoWithImage, index % 2 === 0 ? logoWithImage : emptyLogo, index % 2 === 0 ? emptyLogo : logoWithImage, index % 2 === 0 ? logoWithImage : emptyLogo, index % 2 === 0 ? emptyLogo : logoWithImage, index % 2 === 0 ? logoWithImage : emptyLogo, index % 2 === 0 ? emptyLogo : logoWithImage] }));
|
|
18467
|
+
}
|
|
18468
|
+
function LogoContainer({ children }) {
|
|
18469
|
+
return (jsxRuntime.jsx("div", { className: "tw-flex tw-h-[60px] tw-w-[60px] tw-items-center tw-justify-center", children: children }));
|
|
18470
|
+
}
|
|
18471
|
+
|
|
18472
|
+
function SwapConfiguration({ amount, tokenPrice = 0, isFetching: isFetchingProp = false, chain, token, direction = "from", onAmountChange, balance, criticalPriceImpactPercentage, error, priceImpactPercentage, maxUsdDecimals, isInputInteractive = true, isLoading = false, inputModeButton, balanceButton, assetsButton, walletButton, }) {
|
|
18473
|
+
var _a, _b, _c;
|
|
18474
|
+
const isWalletButtonInteractive = !isLoading && !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick);
|
|
18475
|
+
const WalletButtonTag = isWalletButtonInteractive ? "button" : "div";
|
|
18476
|
+
const isFetching = isFetchingProp || isLoading;
|
|
18477
|
+
return (jsxRuntime.jsxs("section", { className: "tw-relative tw-flex tw-h-[195px] tw-w-full tw-flex-col tw-border-t tw-border-t-material-light-thin tw-bg-grey-900 tw-pb-squid-m mobile-lg:tw-w-card-large mobile-sm-height:tw-h-[205px]", children: [jsxRuntime.jsx("header", { className: "tw-flex tw-items-center tw-gap-1 tw-px-squid-m tw-py-squid-xs tw-leading-5 tw-text-grey-300 mobile-lg:tw-px-squid-l", children: jsxRuntime.jsx(Tooltip, Object.assign({}, walletButton === null || walletButton === void 0 ? void 0 : walletButton.tooltip, { tooltipWidth: "max", childrenClassName: "tw-rounded-squid-s", containerClassName: "tw-rounded-squid-s", children: jsxRuntime.jsxs(WalletButtonTag, { onClick: isWalletButtonInteractive ? walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick : undefined, className: cn("-tw-ml-squid-xs tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-s tw-px-squid-xs tw-text-grey-600", isWalletButtonInteractive && "hover:tw-bg-material-light-thin", isLoading && "tw-opacity-50"), children: [jsxRuntime.jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === "from" ? "Pay" : "Receive" }), !isLoading && !(walletButton === null || walletButton === void 0 ? void 0 : walletButton.disabled) && !!token && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(BodyText, { size: "small", children: ":" }), jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsxRuntime.jsx(BodyText, { size: "small", className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
|
|
18478
|
+
? "tw-text-grey-300"
|
|
18479
|
+
: "tw-text-royal-400", children: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
|
|
18480
|
+
? walletButton === null || walletButton === void 0 ? void 0 : walletButton.address
|
|
18481
|
+
: (_a = walletButton === null || walletButton === void 0 ? void 0 : walletButton.emptyAddressLabel) !== null && _a !== void 0 ? _a : "Connect wallet" }), jsxRuntime.jsx(ChevronArrowIcon, { className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
|
|
18482
|
+
? "tw-text-grey-600"
|
|
18483
|
+
: "tw-text-royal-400" })] })] }))] }) })) }), jsxRuntime.jsx("div", { className: "tw-px-squid-m mobile-lg:tw-px-squid-l", children: jsxRuntime.jsx(AssetsButton, Object.assign({}, assetsButton, { chain: chain, token: token, isLoading: isLoading })) }), isFetching && (jsxRuntime.jsx("div", { className: "tw-absolute tw-bottom-2 tw-left-squid-m tw-z-10 tw-overflow-hidden mobile-lg:tw-left-squid-l", children: jsxRuntime.jsx("div", { className: "tw-h-[94px] tw-w-[1260px] tw-animate-move-loading-cover-to-right tw-bg-dark-cover" }) })), jsxRuntime.jsx(NumericInput, { inputMode: "decimal", pattern: "[0-9.,]*", token: {
|
|
18484
|
+
decimals: (_b = token === null || token === void 0 ? void 0 : token.decimals) !== null && _b !== void 0 ? _b : 18,
|
|
18485
|
+
symbol: (_c = token === null || token === void 0 ? void 0 : token.symbol) !== null && _c !== void 0 ? _c : "",
|
|
18486
|
+
price: tokenPrice,
|
|
18487
|
+
}, onAmountChange: (value) => {
|
|
18488
|
+
onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(value);
|
|
18489
|
+
}, balance: balance, criticalPriceImpactPercentage: criticalPriceImpactPercentage, error: error, formatIfVerySmall: {
|
|
18490
|
+
token: "0.001",
|
|
18491
|
+
usd: "0.01",
|
|
18492
|
+
}, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: !!token, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading })] }));
|
|
18493
|
+
}
|
|
18494
|
+
|
|
18495
|
+
function SwapProgressViewHeader({ title, description, }) {
|
|
18496
|
+
return (jsxRuntime.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: [jsxRuntime.jsx(BodyText, { size: "large", className: "tw-h-squid-m !tw-leading-[20px] tw-text-grey-300", children: title }), jsxRuntime.jsx(CaptionText, { className: "tw-h-squid-l tw-text-grey-500", children: description })] }));
|
|
18497
|
+
}
|
|
18498
|
+
|
|
18499
|
+
const SPACING = 10;
|
|
18500
|
+
function useDropdownMenu(props) {
|
|
18501
|
+
const { initialIsModalOpen, itemsContainerRef } = props !== null && props !== void 0 ? props : {};
|
|
18502
|
+
const [isDropdownOpen, setIsModalOpen] = React$1.useState(Boolean(initialIsModalOpen));
|
|
18503
|
+
const dropdownRef = React$1.useRef(null);
|
|
18504
|
+
const openDropdownButtonRef = React$1.useRef(null);
|
|
18505
|
+
React$1.useEffect(() => {
|
|
18506
|
+
const handleClickOutside = (event) => {
|
|
18507
|
+
// close modal if the user clicked outside of it
|
|
18508
|
+
var _a;
|
|
18509
|
+
if (dropdownRef.current &&
|
|
18510
|
+
event.target !== openDropdownButtonRef.current &&
|
|
18511
|
+
!dropdownRef.current.contains(event.target) &&
|
|
18512
|
+
!((_a = openDropdownButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
|
|
18513
|
+
setIsModalOpen(false);
|
|
18514
|
+
}
|
|
18515
|
+
};
|
|
18516
|
+
if (isDropdownOpen) {
|
|
18517
|
+
document.addEventListener("click", handleClickOutside);
|
|
18518
|
+
}
|
|
18519
|
+
return () => {
|
|
18520
|
+
document.removeEventListener("click", handleClickOutside);
|
|
18521
|
+
};
|
|
18522
|
+
}, [dropdownRef, isDropdownOpen]);
|
|
18523
|
+
const openDropdown = React$1.useCallback(() => {
|
|
18524
|
+
setIsModalOpen((prev) => !prev);
|
|
18525
|
+
}, []);
|
|
18526
|
+
const closeDropdown = React$1.useCallback(() => {
|
|
18527
|
+
setIsModalOpen(false);
|
|
18528
|
+
}, []);
|
|
18529
|
+
const [dropdownStyles, setDropdownStyles] = React$1.useState(null);
|
|
18530
|
+
const itemRef = React$1.useRef(null);
|
|
18531
|
+
const menuRef = React$1.useRef(null);
|
|
18532
|
+
// Effect to find the best position for the dropdown menu, so it's always visible for the user
|
|
18533
|
+
React$1.useEffect(() => {
|
|
18534
|
+
var _a;
|
|
18535
|
+
if (!isDropdownOpen) {
|
|
18536
|
+
// when the dropdown is closed, we want to reset its position
|
|
18537
|
+
// because user may scroll, and the old position may be out of view, so we'll need to recalculate it
|
|
18538
|
+
setDropdownStyles(null);
|
|
18539
|
+
return;
|
|
18540
|
+
}
|
|
18541
|
+
const item = itemRef.current;
|
|
18542
|
+
const itemsContainer = (_a = itemsContainerRef === null || itemsContainerRef === void 0 ? void 0 : itemsContainerRef.current) !== null && _a !== void 0 ? _a : item === null || item === void 0 ? void 0 : item.parentElement;
|
|
18543
|
+
const dropdownMenu = menuRef.current;
|
|
18544
|
+
if (!item || !dropdownRef.current || !itemsContainer || !dropdownMenu) {
|
|
18545
|
+
return;
|
|
18546
|
+
}
|
|
18547
|
+
// Get the bounding rectangle of the item
|
|
18548
|
+
const itemRect = item.getBoundingClientRect();
|
|
18549
|
+
// Get the bounding rectangle of the container element
|
|
18550
|
+
const containerRect = itemsContainer.getBoundingClientRect();
|
|
18551
|
+
const dropdownMenuRect = dropdownMenu.getBoundingClientRect();
|
|
18552
|
+
// Calculate the bottom position of the visible area of the the items container
|
|
18553
|
+
const containerVisibleBottom = containerRect.top + containerRect.height;
|
|
18554
|
+
// Calculate the distance from the bottom of the item to the visible bottom of the items container
|
|
18555
|
+
const distanceBetweenItemBottomAndContainerBottomEdge = containerVisibleBottom - itemRect.bottom;
|
|
18556
|
+
// the same but for the top
|
|
18557
|
+
const distanceBetweenItemTopAndContainerTopEdge = itemRect.top - containerRect.top;
|
|
18558
|
+
const dropdownMenuHeight = dropdownMenu.clientHeight;
|
|
18559
|
+
const maxHeight = containerRect.bottom - dropdownMenuRect.top - SPACING;
|
|
18560
|
+
// check if the height of the dropdown is less than the longest distance, either top or bottom
|
|
18561
|
+
// if so, means that the dropdown keeps visible when positioned at the top or bottom of the item
|
|
18562
|
+
const isDropdownVisibleAtItemTopOrBottom = dropdownMenuHeight <=
|
|
18563
|
+
Math.max(distanceBetweenItemBottomAndContainerBottomEdge, distanceBetweenItemTopAndContainerTopEdge);
|
|
18564
|
+
// if the dropdown is not visible at top or bottom of the item
|
|
18565
|
+
// we just center it
|
|
18566
|
+
if (!isDropdownVisibleAtItemTopOrBottom) {
|
|
18567
|
+
return setDropdownStyles({
|
|
18568
|
+
position: "center",
|
|
18569
|
+
maxHeight,
|
|
18570
|
+
});
|
|
18571
|
+
}
|
|
18572
|
+
// finally, if the dropdown fits, position it where it has more space
|
|
18573
|
+
if (distanceBetweenItemBottomAndContainerBottomEdge >=
|
|
18574
|
+
distanceBetweenItemTopAndContainerTopEdge) {
|
|
18575
|
+
setDropdownStyles({
|
|
18576
|
+
position: "bottom",
|
|
18577
|
+
maxHeight,
|
|
18578
|
+
});
|
|
18579
|
+
}
|
|
18580
|
+
else {
|
|
18581
|
+
setDropdownStyles({
|
|
18582
|
+
position: "top",
|
|
18583
|
+
maxHeight,
|
|
18584
|
+
});
|
|
18585
|
+
}
|
|
18586
|
+
}, [isDropdownOpen, menuRef, itemRef]);
|
|
18587
|
+
return {
|
|
18588
|
+
isDropdownOpen,
|
|
18589
|
+
openDropdown,
|
|
18590
|
+
closeDropdown,
|
|
18591
|
+
dropdownRef,
|
|
18592
|
+
openDropdownButtonRef,
|
|
18593
|
+
dropdownStyles,
|
|
18594
|
+
itemRef,
|
|
18595
|
+
menuRef,
|
|
18596
|
+
};
|
|
18597
|
+
}
|
|
18598
|
+
|
|
18599
|
+
const IS_SERVER = typeof window === "undefined";
|
|
18600
|
+
const useIsomorphicLayoutEffect$1 = IS_SERVER ? React$1.useEffect : React$1.useLayoutEffect;
|
|
18601
|
+
/**
|
|
18602
|
+
* Custom hook that tracks the state of a media query using the [`Match Media API`](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia).
|
|
18603
|
+
* @param {string} query - The media query to track.
|
|
18604
|
+
* @param {?UseMediaQueryOptions} [options] - The options for customizing the behavior of the hook (optional).
|
|
18605
|
+
* @returns {boolean} The current state of the media query (true if the query matches, false otherwise).
|
|
18606
|
+
* @public
|
|
18607
|
+
* @example
|
|
18608
|
+
* ```tsx
|
|
18609
|
+
* const isSmallScreen = useMediaQuery('(max-width: 600px)');
|
|
18610
|
+
* // Use `isSmallScreen` to conditionally apply styles or logic based on the screen size.
|
|
18611
|
+
* ```
|
|
18612
|
+
*/
|
|
18613
|
+
function useMediaQuery(query, { defaultValue = false, initializeWithValue = true, } = {}) {
|
|
18614
|
+
const getMatches = (query) => {
|
|
18615
|
+
if (IS_SERVER) {
|
|
18616
|
+
return defaultValue;
|
|
18617
|
+
}
|
|
18618
|
+
return window.matchMedia(query).matches;
|
|
18619
|
+
};
|
|
18620
|
+
const [matches, setMatches] = React$1.useState(() => {
|
|
18621
|
+
if (initializeWithValue) {
|
|
18622
|
+
return getMatches(query);
|
|
18623
|
+
}
|
|
18624
|
+
return defaultValue;
|
|
18625
|
+
});
|
|
18626
|
+
// Handles the change event of the media query.
|
|
18627
|
+
function handleChange() {
|
|
18628
|
+
setMatches(getMatches(query));
|
|
18629
|
+
}
|
|
18630
|
+
useIsomorphicLayoutEffect$1(() => {
|
|
18631
|
+
const matchMedia = window.matchMedia(query);
|
|
18632
|
+
// Triggered at the first client-side load and if query changes
|
|
18633
|
+
handleChange();
|
|
18634
|
+
// Use deprecated `addListener` and `removeListener` to support Safari < 14 (#135)
|
|
18635
|
+
if (matchMedia.addListener) {
|
|
18636
|
+
matchMedia.addListener(handleChange);
|
|
18637
|
+
}
|
|
18638
|
+
else {
|
|
18639
|
+
matchMedia.addEventListener("change", handleChange);
|
|
18640
|
+
}
|
|
18641
|
+
return () => {
|
|
18642
|
+
if (matchMedia.removeListener) {
|
|
18643
|
+
matchMedia.removeListener(handleChange);
|
|
18644
|
+
}
|
|
18645
|
+
else {
|
|
18646
|
+
matchMedia.removeEventListener("change", handleChange);
|
|
18647
|
+
}
|
|
18648
|
+
};
|
|
18649
|
+
}, [query]);
|
|
18650
|
+
return matches;
|
|
18651
|
+
}
|
|
18652
|
+
|
|
18653
|
+
function useCollapsibleMenu() {
|
|
18654
|
+
const [isMenuOpen, setIsMenuOpen] = React$1.useState(false);
|
|
18655
|
+
const menuRef = React$1.useRef(null);
|
|
18656
|
+
const toggleMenu = () => {
|
|
18657
|
+
setIsMenuOpen(!isMenuOpen);
|
|
18658
|
+
};
|
|
18659
|
+
React$1.useEffect(() => {
|
|
18660
|
+
const handleClickOutside = (event) => {
|
|
18661
|
+
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
18662
|
+
setIsMenuOpen(false);
|
|
18663
|
+
}
|
|
18664
|
+
};
|
|
18665
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
18666
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
18667
|
+
}, []);
|
|
18668
|
+
return {
|
|
18669
|
+
isMenuOpen,
|
|
18670
|
+
toggleMenu,
|
|
18671
|
+
menuRef,
|
|
18672
|
+
};
|
|
18673
|
+
}
|
|
18674
|
+
|
|
18675
|
+
const useTimer = ({ immediateStart = true, }) => {
|
|
18676
|
+
const [timer, setTimer] = React$1.useState("0s");
|
|
18677
|
+
const intervalRef = React$1.useRef(null);
|
|
18678
|
+
const startTimer = () => {
|
|
18679
|
+
if (intervalRef.current !== null)
|
|
18680
|
+
return; // Prevent multiple intervals
|
|
18681
|
+
const startTime = Date.now();
|
|
18682
|
+
intervalRef.current = window.setInterval(() => {
|
|
18683
|
+
const elapsedTime = Date.now() - startTime;
|
|
18684
|
+
setTimer(formatDuration(elapsedTime));
|
|
18685
|
+
}, 1000);
|
|
18686
|
+
};
|
|
18687
|
+
const stopTimer = () => {
|
|
18688
|
+
if (intervalRef.current !== null) {
|
|
18689
|
+
clearInterval(intervalRef.current);
|
|
18690
|
+
intervalRef.current = null;
|
|
18691
|
+
}
|
|
18692
|
+
};
|
|
18693
|
+
React$1.useEffect(() => {
|
|
18694
|
+
if (immediateStart) {
|
|
18695
|
+
startTimer();
|
|
18696
|
+
}
|
|
18697
|
+
return () => {
|
|
18698
|
+
stopTimer();
|
|
18699
|
+
};
|
|
18700
|
+
}, [immediateStart]);
|
|
18701
|
+
return { timer, stopTimer, startTimer };
|
|
18702
|
+
};
|
|
18703
|
+
|
|
18704
|
+
function BaseDropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, link, control, detail, isSelected, itemRef, children, contentRef, }) {
|
|
18705
|
+
const ContentTag = link
|
|
18706
|
+
? "a"
|
|
18707
|
+
: (control === null || control === void 0 ? void 0 : control.type) === "switch"
|
|
18708
|
+
? "label"
|
|
18709
|
+
: "button";
|
|
18710
|
+
const contentTagProps = link
|
|
18711
|
+
? {
|
|
18712
|
+
href: link,
|
|
18713
|
+
target: "_blank",
|
|
18714
|
+
ref: contentRef,
|
|
18715
|
+
}
|
|
18716
|
+
: {
|
|
18717
|
+
ref: contentRef,
|
|
18718
|
+
};
|
|
18719
|
+
return (jsxRuntime.jsxs("li", { ref: itemRef, className: "tw-max-h-squid-xl tw-w-full tw-min-w-[160px] tw-px-squid-xxs", children: [jsxRuntime.jsxs(ContentTag, Object.assign({}, contentTagProps, { onClick: onClick, className: cn("tw-flex tw-h-squid-l tw-w-full tw-cursor-pointer tw-items-center tw-gap-squid-xxs tw-rounded-squid-xs tw-px-squid-xxs hover:tw-bg-material-light-thin", isSelected && "tw-bg-material-light-thin"), children: [jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-between tw-rounded-squid-xs", children: imageUrl ? (jsxRuntime.jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), jsxRuntime.jsx(CaptionText, { className: cn(labelClassName, "tw-max-w-full tw-flex-1 tw-truncate tw-text-left !tw-leading-[18px]"), children: label }), (control === null || control === void 0 ? void 0 : control.type) === "switch" ? (jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-pl-squid-l", children: jsxRuntime.jsx(Switch, Object.assign({ size: "small" }, control)) })) : detail ? (jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: detail })) : null] })), children] }));
|
|
18720
|
+
}
|
|
18721
|
+
function DropdownMenuItem(props) {
|
|
18722
|
+
if (props.submenu) {
|
|
18723
|
+
return (jsxRuntime.jsx(DropdownMenuItemWithSubmenu, Object.assign({}, props, { submenu: props.submenu, containerRef: props.containerRef })));
|
|
18724
|
+
}
|
|
18725
|
+
return jsxRuntime.jsx(BaseDropdownMenuItem, Object.assign({}, props));
|
|
18726
|
+
}
|
|
18727
|
+
function DropdownMenuItemWithSubmenu(_a) {
|
|
18728
|
+
var _b;
|
|
18729
|
+
var { submenu } = _a, props = __rest$1(_a, ["submenu"]);
|
|
18730
|
+
const { isDropdownOpen, dropdownRef, openDropdown, itemRef, menuRef, openDropdownButtonRef, dropdownStyles, } = useDropdownMenu({
|
|
18731
|
+
itemsContainerRef: props.containerRef,
|
|
18732
|
+
});
|
|
18733
|
+
return (jsxRuntime.jsx("div", { className: "tw-relative tw-flex", children: jsxRuntime.jsx(DropdownMenuItem, Object.assign({ detail: jsxRuntime.jsx(ChevronRightSmallIcon, { size: "20" }) }, props, { containerRef: undefined, itemRef: itemRef, contentRef: openDropdownButtonRef, onClick: (event) => {
|
|
18734
|
+
var _a;
|
|
18735
|
+
openDropdown();
|
|
18736
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
|
|
18737
|
+
}, children: isDropdownOpen && (jsxRuntime.jsx(DropdownMenu, { className: "tw-absolute !tw-right-[calc(100%+3px)] -tw-top-squid-xxs", containerClassName: "!tw-static", dropdownRef: dropdownRef, menuContentClassName: "tw-overflow-hidden", menuRef: menuRef, contentWrapperProps: {
|
|
18738
|
+
style: {
|
|
18739
|
+
maxHeight: (_b = dropdownStyles === null || dropdownStyles === void 0 ? void 0 : dropdownStyles.maxHeight) !== null && _b !== void 0 ? _b : 0,
|
|
18740
|
+
overflow: "auto",
|
|
18741
|
+
scrollbarWidth: "none",
|
|
18742
|
+
},
|
|
18743
|
+
}, children: submenu })) })) }));
|
|
18744
|
+
}
|
|
18792
18745
|
|
|
18793
|
-
|
|
18746
|
+
const dropdownPositionClassMap$1 = {
|
|
18747
|
+
top: "tw-right-full tw-bottom-[50px]",
|
|
18748
|
+
bottom: "tw-right-full tw-top-[50px]",
|
|
18749
|
+
center: "tw-right-[50px] -tw-top-[35px]",
|
|
18750
|
+
};
|
|
18751
|
+
const listItemSizeMap = {
|
|
18752
|
+
small: "tw-h-list-item-small",
|
|
18753
|
+
large: "tw-h-list-item-large",
|
|
18754
|
+
};
|
|
18755
|
+
const collapsedListItemClassMap = {
|
|
18756
|
+
small: "tw-w-[70px]",
|
|
18757
|
+
large: "tw-w-[80px]",
|
|
18758
|
+
};
|
|
18759
|
+
function ListItem(_a) {
|
|
18760
|
+
var { itemTitle, mainImageUrl, subtitle, subtitleOnHover, detail, icon, secondaryImageUrl, placeholderImageUrl, size = "large", mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded = false, detailButtonClassName, loading, containerProps, compactOnMobile, extraPadding = true, itemsContainerRef, dropdownMenuContent } = _a, props = __rest$1(_a, ["itemTitle", "mainImageUrl", "subtitle", "subtitleOnHover", "detail", "icon", "secondaryImageUrl", "placeholderImageUrl", "size", "mainIcon", "className", "isSelected", "onDetailClick", "showDetailOnHoverOnly", "rounded", "detailButtonClassName", "loading", "containerProps", "compactOnMobile", "extraPadding", "itemsContainerRef", "dropdownMenuContent"]);
|
|
18761
|
+
const subtitleClassName = cn("tw-h-[14px] tw-max-w-full tw-truncate !tw-leading-[16px] tw-text-grey-500", compactOnMobile ? "tw-hidden mobile-lg:tw-block" : "tw-block");
|
|
18762
|
+
// 'small' variant does not have detail
|
|
18763
|
+
const showDetail = size === "large" && (!!detail || !!icon || showDetailOnHoverOnly);
|
|
18764
|
+
const isDetailInteractive = !!onDetailClick;
|
|
18765
|
+
const DetailTag = isDetailInteractive ? "button" : "div";
|
|
18766
|
+
const detailProps = isDetailInteractive
|
|
18767
|
+
? {
|
|
18768
|
+
onClick: (event) => {
|
|
18769
|
+
// prevent click event from bubbling up to parent
|
|
18770
|
+
event.stopPropagation();
|
|
18771
|
+
onDetailClick === null || onDetailClick === void 0 ? void 0 : onDetailClick();
|
|
18772
|
+
},
|
|
18773
|
+
}
|
|
18774
|
+
: {};
|
|
18775
|
+
// There are two possible ways to handle loading state:
|
|
18776
|
+
// Can be boolean or string
|
|
18777
|
+
// If boolean and true, it will show a full loading skeleton
|
|
18778
|
+
// If it's a non empty string, means that we want to display the skeleton + some text
|
|
18779
|
+
const loadingComponent = () => {
|
|
18780
|
+
if ((loading === null || loading === void 0 ? void 0 : loading.subtitle) === true) {
|
|
18781
|
+
return jsxRuntime.jsx(TextSkeleton, { width: "50px", className: "tw-h-2.5", isLoading: true });
|
|
18782
|
+
}
|
|
18783
|
+
if (typeof (loading === null || loading === void 0 ? void 0 : loading.subtitle) === "string" && loading.subtitle.length > 0) {
|
|
18784
|
+
return (jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsxRuntime.jsx(TextSkeleton, { width: "50px", className: "tw-h-2.5", isLoading: true }), jsxRuntime.jsx(CaptionText, { className: subtitleClassName, children: loading.subtitle })] }));
|
|
18785
|
+
}
|
|
18786
|
+
return null;
|
|
18787
|
+
};
|
|
18788
|
+
const isInteractive = !!props.onClick;
|
|
18789
|
+
const ItemTag = isInteractive ? "button" : "div";
|
|
18790
|
+
const itemProps = isInteractive ? props : {};
|
|
18791
|
+
const { isDropdownOpen, dropdownRef, openDropdown, openDropdownButtonRef, itemRef, menuRef, dropdownStyles, } = useDropdownMenu({
|
|
18792
|
+
itemsContainerRef,
|
|
18793
|
+
});
|
|
18794
|
+
return (jsxRuntime.jsxs("li", Object.assign({}, containerProps, { ref: itemRef, className: cn("tw-relative tw-flex tw-max-w-full tw-bg-grey-900 tw-text-grey-300 tw-highlight-adjacent", listItemSizeMap[size], extraPadding && "tw-px-squid-xs", compactOnMobile
|
|
18795
|
+
? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
|
|
18796
|
+
: "tw-w-full", className), children: [jsxRuntime.jsxs(ItemTag, Object.assign({}, itemProps, { className: cn("tw-group/list-item tw-peer/list-item tw-relative tw-flex tw-w-full tw-max-w-full tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs", (isSelected || isDropdownOpen) && "tw-bg-material-light-thin", isInteractive && "hover:tw-bg-material-light-thin"), children: [size === "large" ? (jsxRuntime.jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon ? (mainIcon) : (jsxRuntime.jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, placeholderImageUrl: placeholderImageUrl, size: "md", rounded: rounded })) })) : (jsxRuntime.jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon ? (mainIcon) : (jsxRuntime.jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), jsxRuntime.jsxs("div", { className: cn("tw-flex tw-h-[40px] tw-flex-1 tw-flex-col tw-items-start tw-justify-center tw-gap-squid-xxs",
|
|
18797
|
+
// 'large' variant has extra padding
|
|
18798
|
+
size === "large" ? "tw-w-[56%] tw-pl-squid-xxs" : "tw-w-[67%]"), children: [typeof itemTitle === "string" ? (jsxRuntime.jsx(BodyText, { size: "small", className: cn("tw-max-w-full tw-truncate", subtitle && "tw-h-[17px] !tw-leading-[17px]", compactOnMobile ? "tw-hidden mobile-lg:tw-block" : "tw-block"), children: itemTitle })) : (itemTitle), size === "large" &&
|
|
18799
|
+
((loading === null || loading === void 0 ? void 0 : loading.subtitle) ? (loadingComponent()) : subtitle ? (jsxRuntime.jsxs(CaptionText, { className: subtitleClassName, children: [subtitleOnHover && (jsxRuntime.jsx(CaptionText, { className: cn(subtitleClassName, "tw-hidden group-hover/list-item:tw-block"), children: subtitleOnHover })), subtitle] })) : null)] }), showDetail && (jsxRuntime.jsxs(DetailTag, Object.assign({}, detailProps, { className: cn("tw-flex tw-w-fit tw-items-center tw-justify-center tw-rounded-squid-xs", size === "large" ? "tw-h-squid-xl" : "tw-h-squid-l", showDetailOnHoverOnly
|
|
18800
|
+
? "tw-opacity-0 hover:tw-opacity-100 focus:tw-opacity-100 group-hover/list-item:tw-opacity-100 group-focus/list-item:tw-opacity-100"
|
|
18801
|
+
: "tw-flex", isDetailInteractive && "hover:tw-bg-material-light-thin", detailButtonClassName), children: [!!detail && (jsxRuntime.jsx(CaptionText, { className: "min-tw-w-4 min-tw-h-4 tw-px-squid-xxs tw-leading-[10px]", children: detail })), icon ? (jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-justify-center tw-px-[3px] tw-py-2", children: icon })) : null] })))] })), !!dropdownMenuContent && (jsxRuntime.jsx(ListItemActionsButton, { ref: openDropdownButtonRef, onClick: openDropdown, isActive: isDropdownOpen, className: "peer-hover/list-item:tw-opacity-100" })), isDropdownOpen && !!dropdownMenuContent ? (jsxRuntime.jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownStyles, className: cn(!!dropdownStyles &&
|
|
18802
|
+
dropdownPositionClassMap$1[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] })));
|
|
18803
|
+
}
|
|
18804
|
+
const ListItemActionsButton = React$1.forwardRef((props, ref) => {
|
|
18805
|
+
return (jsxRuntime.jsx("button", Object.assign({}, props, { ref: ref, className: cn("tw-peer tw-absolute tw-right-squid-s tw-top-squid-xxs tw-flex tw-h-squid-xl tw-w-squid-xl tw-items-center tw-justify-center tw-rounded-squid-xs tw-p-2 tw-text-grey-300 hover:tw-bg-material-light-thin hover:tw-opacity-100 focus-visible:tw-opacity-100", props.isActive
|
|
18806
|
+
? "tw-bg-material-light-thin tw-opacity-100"
|
|
18807
|
+
: "tw-opacity-0", props.className), children: jsxRuntime.jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })));
|
|
18808
|
+
});
|
|
18794
18809
|
|
|
18795
|
-
|
|
18796
|
-
|
|
18797
|
-
|
|
18798
|
-
|
|
18799
|
-
|
|
18800
|
-
|
|
18810
|
+
const dropdownPositionClassMap = {
|
|
18811
|
+
top: "tw-right-squid-xxs tw-bottom-[50px]",
|
|
18812
|
+
bottom: "tw-right-squid-xxs tw-top-[50px]",
|
|
18813
|
+
center: "tw-right-[50px] tw-translate-y-[calc(-50%+20px)]",
|
|
18814
|
+
};
|
|
18815
|
+
const statusBadge = {
|
|
18816
|
+
completed: {},
|
|
18817
|
+
pending: {
|
|
18818
|
+
badge: (jsxRuntime.jsx(Loader, { size: "16", strokeWidth: "4", className: "group-data-[squid-theme-type=dark]:tw-text-grey-100 group-data-[squid-theme-type=light]:tw-text-grey-900" })),
|
|
18819
|
+
containerClassName: "tw-bg-royal-400",
|
|
18820
|
+
},
|
|
18821
|
+
failed: {
|
|
18822
|
+
badge: (jsxRuntime.jsx("span", { className: "tw-bg-grey-900", children: jsxRuntime.jsx(EmojiSadIcon, { className: "tw-text-status-negative" }) })),
|
|
18823
|
+
containerClassName: "tw-bg-status-negative",
|
|
18824
|
+
},
|
|
18825
|
+
warning: {
|
|
18826
|
+
badge: (jsxRuntime.jsx("span", { className: "tw-bg-grey-900", children: jsxRuntime.jsx(EmojiMeh, { className: "tw-text-status-partial" }) })),
|
|
18827
|
+
containerClassName: "tw-bg-status-partial",
|
|
18828
|
+
},
|
|
18829
|
+
};
|
|
18830
|
+
function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuContent, itemsContainerRef, status, warningLabel, onClick, }) {
|
|
18831
|
+
const { isDropdownOpen, dropdownRef, openDropdown, openDropdownButtonRef, itemRef, menuRef, dropdownStyles, } = useDropdownMenu({
|
|
18832
|
+
itemsContainerRef,
|
|
18833
|
+
});
|
|
18834
|
+
const statusLabel = React$1.useMemo(() => {
|
|
18835
|
+
switch (status) {
|
|
18836
|
+
case "completed":
|
|
18837
|
+
return jsxRuntime.jsx(CaptionText, { children: dateCompleted });
|
|
18838
|
+
case "pending":
|
|
18839
|
+
return jsxRuntime.jsx(CaptionText, { className: "tw-text-royal-400", children: "Pending" });
|
|
18840
|
+
case "failed":
|
|
18841
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { className: "tw-text-status-negative", children: "Fail" }), jsxRuntime.jsx(CaptionText, { children: dateCompleted })] }));
|
|
18842
|
+
case "warning":
|
|
18843
|
+
return (jsxRuntime.jsx(CaptionText, { className: "tw-text-status-partial", children: warningLabel }));
|
|
18844
|
+
default:
|
|
18845
|
+
return null;
|
|
18846
|
+
}
|
|
18847
|
+
}, [status, dateCompleted]);
|
|
18848
|
+
const isInteractive = !!onClick;
|
|
18849
|
+
const ItemTag = isInteractive ? "button" : "div";
|
|
18850
|
+
const itemTagProps = isInteractive
|
|
18851
|
+
? {
|
|
18852
|
+
onClick,
|
|
18853
|
+
}
|
|
18854
|
+
: {};
|
|
18855
|
+
return (jsxRuntime.jsxs("li", { ref: itemRef, className: cn("tw-relative tw-flex tw-h-list-item-large tw-min-w-list-item-small tw-self-stretch tw-bg-grey-900 tw-px-squid-xs tw-text-grey-300", !!dropdownMenuContent && "tw-highlight-adjacent"), children: [jsxRuntime.jsxs(ItemTag, Object.assign({}, itemTagProps, { className: cn("tw-group/history-item tw-peer/history-item tw-relative tw-flex tw-w-full tw-flex-shrink-0 tw-items-center tw-gap-squid-xs tw-self-stretch tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs", isInteractive && "hover:tw-bg-material-light-thin"), children: [jsxRuntime.jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [!!statusBadge[status].badge && (jsxRuntime.jsx("span", { className: cn("tw-absolute -tw-left-[5px] tw-bottom-0 tw-z-10 tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-center tw-overflow-hidden tw-rounded-full tw-border tw-border-grey-900 tw-p-0.5", statusBadge[status].containerClassName), children: statusBadge[status].badge })), jsxRuntime.jsx("img", { src: firstImageUrl, className: "tw-absolute tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" }), jsxRuntime.jsx("img", { src: secondImageUrl, className: "tw-absolute tw-left-5 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-10 tw-flex-1 tw-flex-col tw-self-stretch", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-justify-between tw-text-grey-500", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center", children: [jsxRuntime.jsx(CaptionText, { children: fromLabel }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronRightSmallIcon, {}) }), jsxRuntime.jsx(CaptionText, { children: toLabel })] }), jsxRuntime.jsx("div", { className: cn("tw-hide-on-parent-hover tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs", !!dropdownMenuContent &&
|
|
18856
|
+
"tw-transition-opacity group-hover/history-item:tw-hidden group-hover/history-item:tw-opacity-0 peer-focus:tw-hidden peer-focus:tw-opacity-0", isDropdownOpen && "tw-opacity-0"), children: statusLabel })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx(BodyText, { size: "small", children: fromAmount }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), jsxRuntime.jsx(BodyText, { size: "small", children: toAmount })] })] })] })), !!dropdownMenuContent && (jsxRuntime.jsx(ListItemActionsButton, { ref: openDropdownButtonRef, onClick: openDropdown, isActive: isDropdownOpen, className: "peer-hover/history-item:tw-opacity-100" })), isDropdownOpen && !!dropdownMenuContent ? (jsxRuntime.jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownStyles, className: cn(!!dropdownStyles &&
|
|
18857
|
+
dropdownPositionClassMap[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] }));
|
|
18858
|
+
}
|
|
18801
18859
|
|
|
18802
|
-
|
|
18803
|
-
|
|
18804
|
-
|
|
18805
|
-
}
|
|
18806
|
-
}
|
|
18807
|
-
}
|
|
18860
|
+
function MenuItem({ label, imageUrl, icon }) {
|
|
18861
|
+
return (jsxRuntime.jsxs("li", { className: "tw-mx-squid-xxs tw-inline-flex tw-max-h-list-item-small tw-items-center tw-justify-start tw-gap-squid-xxs tw-rounded-squid-xs tw-bg-grey-900 tw-py-squid-xxs tw-pl-squid-xxs tw-pr-squid-xl tw-text-grey-300", children: [jsxRuntime.jsx("div", { className: "tw-h-squid-m tw-w-squid-m", children: imageUrl ? (jsxRuntime.jsx("img", { className: "tw-h-full tw-w-full tw-rounded-squid-xxs", src: imageUrl, alt: "" })) : icon ? (icon) : null }), jsxRuntime.jsx(CaptionText, { children: label })] }));
|
|
18862
|
+
}
|
|
18808
18863
|
|
|
18809
|
-
|
|
18810
|
-
|
|
18811
|
-
|
|
18864
|
+
const containerVariantClassNameMap = {
|
|
18865
|
+
small: "tw-px-squid-xs",
|
|
18866
|
+
large: "tw-px-squid-0",
|
|
18867
|
+
};
|
|
18868
|
+
const childrenVariantClassNameMap = {
|
|
18869
|
+
small: "tw-min-h-squid-l tw-px-squid-xs",
|
|
18870
|
+
large: "tw-min-h-squid-xl tw-px-squid-m",
|
|
18871
|
+
};
|
|
18872
|
+
function SmallBodyText(props) {
|
|
18873
|
+
return jsxRuntime.jsx(BodyText, Object.assign({ size: "small" }, props));
|
|
18874
|
+
}
|
|
18875
|
+
function PropertyListItem(_a) {
|
|
18876
|
+
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"]);
|
|
18877
|
+
const Text = variant === "small" ? CaptionText : SmallBodyText;
|
|
18878
|
+
return (jsxRuntime.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: jsxRuntime.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: [jsxRuntime.jsx("div", { className: cn("tw-w-6 tw-text-grey-500", iconClassName), children: icon }), jsxRuntime.jsx(Text, { className: cn("tw-flex-1 tw-text-grey-400", labelClassName), children: jsxRuntime.jsx(TextSkeleton, { isLoading: isLoading, children: label }) }), jsxRuntime.jsx(Text, { className: cn("tw-flex tw-text-grey-300", detailClassName), children: jsxRuntime.jsx(TextSkeleton, { isLoading: isLoading, children: detail }) })] }) })));
|
|
18879
|
+
}
|
|
18812
18880
|
|
|
18881
|
+
function SectionTitle(_a) {
|
|
18882
|
+
var { title, icon, accessory, actionIcon, className } = _a, props = __rest$1(_a, ["title", "icon", "accessory", "actionIcon", "className"]);
|
|
18883
|
+
return (jsxRuntime.jsxs("header", Object.assign({}, props, { className: cn("tw-flex tw-h-[46px] tw-w-full tw-items-center tw-gap-squid-xxs tw-bg-grey-900 tw-px-squid-m tw-pb-squid-xs tw-pt-squid-m tw-text-royal-400", className), children: [icon, jsxRuntime.jsx(CaptionText, { children: title }), accessory ? (jsxRuntime.jsx(CaptionText, { className: "tw-flex-1 tw-text-right tw-text-grey-500", children: accessory })) : actionIcon ? (jsxRuntime.jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end", children: actionIcon })) : null] })));
|
|
18884
|
+
}
|
|
18813
18885
|
|
|
18814
|
-
|
|
18815
|
-
|
|
18816
|
-
|
|
18886
|
+
function SettingsItem({ icon, label, control, link, transparent = false, helpTooltip, }) {
|
|
18887
|
+
const ContentTag = link ? "a" : "div";
|
|
18888
|
+
const contentTagProps = link
|
|
18889
|
+
? {
|
|
18890
|
+
href: link,
|
|
18891
|
+
target: "_blank",
|
|
18892
|
+
}
|
|
18893
|
+
: {};
|
|
18894
|
+
const helpIcon = !!helpTooltip && (jsxRuntime.jsx(HelpIcon, { className: "tw-cursor-help tw-text-grey-600 hover:tw-text-grey-400" }));
|
|
18895
|
+
const showDetailsBorder = !!control && !link && !(control.type === "switch");
|
|
18896
|
+
return (jsxRuntime.jsx("li", { className: cn("tw-h-[50px] tw-self-stretch tw-px-squid-xs", transparent ? "tw-bg-transparent" : "tw-bg-grey-800"), children: jsxRuntime.jsxs(ContentTag, Object.assign({ className: cn("tw-flex tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xs tw-text-grey-300", link && "hover:tw-bg-material-light-thin") }, contentTagProps, { children: [icon, jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-1 tw-items-center tw-gap-squid-xxs tw-self-stretch", children: [jsxRuntime.jsx(BodyText, { size: "small", children: label }), helpTooltip ? (jsxRuntime.jsx(Tooltip, Object.assign({}, helpTooltip, { children: helpIcon }))) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: helpIcon }))] }), jsxRuntime.jsx("div", { className: cn("tw-flex tw-h-squid-l tw-items-center tw-justify-center tw-rounded-squid-xs", showDetailsBorder &&
|
|
18897
|
+
"tw-rounded-squid-xs tw-border tw-border-solid tw-border-material-light-thin tw-bg-material-dark-thin"), children: !!link ? (jsxRuntime.jsx(SquareArrowTopRight2Icon, { className: "tw-text-material-light-average" })) : (!!control && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [control.type === "amount" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SettingsButton, { onClick: () => control.onChange(control.resetValueControl.value), label: control.resetValueControl.label, isSelected: control.resetValueControl.value === control.value }), control.options.map(({ value }, index, _controls) => (jsxRuntime.jsx(SettingsButton, { label: "$" + value, isSelected: control.value === value, onClick: () => control.onChange(value) }, index))), jsxRuntime.jsx(SettingsSlider, { type: control.type, value: control.value, isSelected: control.value !== control.resetValueControl.value, onChange: control.onChange, decimalsFormat: control.decimalsFormat, max: 999 })] })), control.type === "switch" &&
|
|
18898
|
+
(control.tooltip ? (jsxRuntime.jsx(Tooltip, Object.assign({}, control.tooltip, { children: jsxRuntime.jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }) }))) : (jsxRuntime.jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }))), control.type === "percentage" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SettingsButton, { label: control.resetValueControl.label, isSelected: control.resetValueControl.value === control.value, onClick: control.resetValueControl.onSelect }), jsxRuntime.jsx(SettingsSlider, { onChange: control.onChange, value: control.value, type: "percentage", isSelected: control.value !== control.resetValueControl.value, decimalsFormat: control.decimalsFormat, max: control.max, min: control.min })] })), control.type === "options" && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: control.options.map(({ label, onSelect }, index) => (jsxRuntime.jsx(SettingsButton, { label: label, isSelected: control.selectedLabel === label, onClick: onSelect }, index))) }))] }))) })] })) }));
|
|
18899
|
+
}
|
|
18817
18900
|
|
|
18818
|
-
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
|
|
18901
|
+
const STEP_ITEM_HEIGHT = 52;
|
|
18902
|
+
const statusBgClassMap = {
|
|
18903
|
+
executed: "!tw-bg-grey-300",
|
|
18904
|
+
ongoing: "!tw-bg-grey-300",
|
|
18905
|
+
pending: "!tw-bg-grey-600",
|
|
18906
|
+
waiting: "!tw-bg-grey-300",
|
|
18907
|
+
error: "!tw-bg-status-negative",
|
|
18908
|
+
success: "!tw-bg-status-positive",
|
|
18909
|
+
warning: "!tw-bg-status-partial",
|
|
18910
|
+
};
|
|
18911
|
+
const separatorClassMap = {
|
|
18912
|
+
executed: "tw-text-grey-300",
|
|
18913
|
+
ongoing: "tw-text-grey-300",
|
|
18914
|
+
pending: "tw-text-grey-600",
|
|
18915
|
+
waiting: "tw-text-grey-300",
|
|
18916
|
+
error: "tw-text-status-negative",
|
|
18917
|
+
success: "tw-text-status-positive",
|
|
18918
|
+
warning: "tw-text-status-partial",
|
|
18919
|
+
};
|
|
18920
|
+
function SwapStepItem({ descriptionBlocks, showStepSeparator = false, link, status = "pending", }) {
|
|
18921
|
+
// these styles are located here instead of outside the component
|
|
18922
|
+
// so they are updated whenever the animation duration changes
|
|
18923
|
+
const transitionStyle = {
|
|
18924
|
+
transition: `background-color ${ANIMATION_DURATIONS.CHANGE_SWAP_STEP}ms, color ${ANIMATION_DURATIONS.CHANGE_SWAP_STEP}ms`,
|
|
18925
|
+
};
|
|
18926
|
+
const chipContent = React$1.useMemo(() => {
|
|
18927
|
+
switch (status) {
|
|
18928
|
+
case "success":
|
|
18929
|
+
case "executed":
|
|
18930
|
+
return jsxRuntime.jsx(Checkmark1Icon, {});
|
|
18931
|
+
case "error":
|
|
18932
|
+
return jsxRuntime.jsx(EmojiSadIcon, { size: "16" });
|
|
18933
|
+
case "warning":
|
|
18934
|
+
return jsxRuntime.jsx(EmojiMeh, { size: "16" });
|
|
18935
|
+
case "waiting":
|
|
18936
|
+
return jsxRuntime.jsx(DotGrid1x3HorizontalIcon, {});
|
|
18937
|
+
case "pending":
|
|
18938
|
+
return null;
|
|
18939
|
+
case "ongoing":
|
|
18940
|
+
return jsxRuntime.jsx(Loader, { size: "16", strokeWidth: "4" });
|
|
18941
|
+
default:
|
|
18942
|
+
return null;
|
|
18943
|
+
}
|
|
18944
|
+
}, [status]);
|
|
18945
|
+
const statusTextClass = React$1.useMemo(() => {
|
|
18946
|
+
switch (status) {
|
|
18947
|
+
case "pending":
|
|
18948
|
+
return "tw-text-grey-600";
|
|
18949
|
+
default:
|
|
18950
|
+
return "tw-text-grey-300";
|
|
18951
|
+
}
|
|
18952
|
+
}, [status]);
|
|
18953
|
+
return (jsxRuntime.jsx("li", { style: {
|
|
18954
|
+
maxHeight: `${STEP_ITEM_HEIGHT}px`,
|
|
18955
|
+
minHeight: `${STEP_ITEM_HEIGHT}px`,
|
|
18956
|
+
}, className: "tw-relative tw-flex tw-w-full tw-flex-col tw-items-start tw-justify-center tw-text-grey-300 tw-transition-colors tw-duration-1000", children: jsxRuntime.jsxs("a", { href: link, target: "_blank", style: Object.assign(Object.assign({}, transitionStyle), { maxHeight: `${STEP_ITEM_HEIGHT}px` }), className: cn("tw-group/swap-step-item tw-flex tw-w-full tw-items-center tw-rounded-squid-xs tw-py-squid-xxs", !!link && "hover:tw-bg-material-light-thin", statusTextClass), children: [jsxRuntime.jsxs("span", { className: "tw-relative tw-flex tw-min-h-squid-l tw-items-center tw-justify-center tw-gap-squid-xxs tw-px-squid-xs", children: [jsxRuntime.jsx(Chip, { style: transitionStyle, className: cn("tw-w-squid-xl", statusBgClassMap[status]), icon: chipContent }), showStepSeparator && (jsxRuntime.jsx("span", { className: cn(separatorClassMap[status], "tw-absolute tw-left-0 tw-top-full tw-mt-0.5"), style: transitionStyle, children: jsxRuntime.jsx(SwapStepSeparator, {}) }))] }), jsxRuntime.jsx(DescriptionBlocks, { className: "tw-min-h-squid-l tw-py-squid-xxs tw-pr-squid-xs", blocks: descriptionBlocks })] }) }));
|
|
18957
|
+
}
|
|
18822
18958
|
|
|
18959
|
+
function ActionLayout({ lineCap = jsxRuntime.jsx(Timeline.CapTop, {}), status = "executed", showTimeline = true, showBody = true, nextStatus, statusIcon, description, title, icon, children, }) {
|
|
18960
|
+
return (jsxRuntime.jsxs(ActionWrapper, { status: status, children: [jsxRuntime.jsx(ActionLineOutRow, { status: nextStatus }), jsxRuntime.jsx(ActionStatusRow, { status: status, icon: statusIcon, children: description }), title && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ActionRow, { children: jsxRuntime.jsxs(Timeline, { className: cn("tw-h-squid-xs", statusTextClassMap[status]), children: [jsxRuntime.jsx(Timeline.CapTop, {}), jsxRuntime.jsx(Timeline.Straight, {}), jsxRuntime.jsx(Timeline.CapBottom, {})] }) }), jsxRuntime.jsxs(ActionRow, { children: [jsxRuntime.jsx("div", { className: "tw-flex tw-items-center tw-justify-center", children: icon }), jsxRuntime.jsx(BodyText, { size: "large", className: cn("tw-flex tw-min-h-squid-l tw-items-center !tw-leading-[1] tw-text-grey-300 tw-transition-opacity tw-duration-200", !showBody && "tw-opacity-0"), children: title })] })] })), jsxRuntime.jsxs(ActionRow, { children: [jsxRuntime.jsxs(Timeline, { className: showTimeline ? statusTextClassMap[status] : "!tw-text-[transparent]", children: [lineCap, jsxRuntime.jsx(Timeline.Straight, {})] }), jsxRuntime.jsx("div", { className: cn("tw-flex tw-flex-col tw-gap-squid-xs tw-pb-squid-xs tw-text-grey-500 tw-transition-opacity tw-duration-200", !showBody && "tw-opacity-0", title && "tw-pt-squid-xxs"), children: children })] })] }));
|
|
18961
|
+
}
|
|
18962
|
+
function ActionProperties({ timestamp, hash, url, }) {
|
|
18963
|
+
return (jsxRuntime.jsxs(CaptionText, { className: "tw-flex tw-items-center tw-gap-squid-xs", children: [timestamp && jsxRuntime.jsx(Timestamp, { time: timestamp }), timestamp && hash && jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-700" }), hash && jsxRuntime.jsx(HashLink, { hash: hash, url: url, showTx: true })] }));
|
|
18964
|
+
}
|
|
18965
|
+
function renderStatusIcon(status, defaultIcon) {
|
|
18966
|
+
switch (status) {
|
|
18967
|
+
case "success":
|
|
18968
|
+
return jsxRuntime.jsx(TransactionState, { status: "success", variant: "compact" });
|
|
18969
|
+
case "executed":
|
|
18970
|
+
return (jsxRuntime.jsx(TransactionState, { status: "executed", variant: "compact", icon: defaultIcon }));
|
|
18971
|
+
case "error":
|
|
18972
|
+
return jsxRuntime.jsx(EmojiSadIcon, { className: "tw-text-status-negative" });
|
|
18973
|
+
case "ongoing":
|
|
18974
|
+
return (jsxRuntime.jsx(Loader, { className: statusTextClassMap.ongoing, strokeWidth: "4", size: "20" }));
|
|
18975
|
+
case "waiting":
|
|
18976
|
+
return jsxRuntime.jsx(TransactionState, { status: "waiting", variant: "compact" });
|
|
18977
|
+
case "warning":
|
|
18978
|
+
return jsxRuntime.jsx(TransactionState, { status: "warning", variant: "compact" });
|
|
18979
|
+
}
|
|
18980
|
+
}
|
|
18981
|
+
const ActionLineOutRow = ({ status }) => (jsxRuntime.jsx(ActionRow, { children: jsxRuntime.jsxs(Timeline, { className: cn("tw-h-squid-xs", status ? statusTextClassMap[status] : "!tw-text-[transparent]"), children: [jsxRuntime.jsx(Timeline.Straight, {}), jsxRuntime.jsx(Timeline.CapBottom, {})] }) }));
|
|
18982
|
+
const ActionStatusRow = ({ children, status, icon, }) => (jsxRuntime.jsxs(ActionRow, { children: [jsxRuntime.jsx("div", { className: "tw-flex tw-items-center tw-justify-center", children: renderStatusIcon(status, icon) }), jsxRuntime.jsx("div", { className: "tw-flex tw-items-center", children: jsxRuntime.jsx(BodyText, { size: "small", tight: true, className: "tw-block tw-w-full tw-text-grey-300", children: children }) })] }));
|
|
18983
|
+
function ActionRow(_a) {
|
|
18984
|
+
var { className } = _a, props = __rest$1(_a, ["className"]);
|
|
18985
|
+
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-grid tw-grid-cols-[40px,1fr,60px] tw-gap-squid-xs tw-pl-squid-m", className) })));
|
|
18986
|
+
}
|
|
18987
|
+
function ActionWrapper({ children, status, className, }) {
|
|
18988
|
+
return (jsxRuntime.jsx("div", { className: cn("tw-relative tw-flex tw-flex-col tw-gap-squid-xxs", status === "waiting" && "tw-bg-grey-800", className), children: children }));
|
|
18989
|
+
}
|
|
18990
|
+
function Timestamp({ time }) {
|
|
18991
|
+
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-text-grey-500", children: [formatRelativeDate(time), jsxRuntime.jsx("span", { className: "tw-text-grey-700", children: "\u2022" }), formatTime(time)] }));
|
|
18992
|
+
}
|
|
18823
18993
|
|
|
18824
|
-
|
|
18825
|
-
|
|
18826
|
-
|
|
18827
|
-
// to React that the selections are conceptually equal, and we can bail
|
|
18828
|
-
// out of rendering.
|
|
18994
|
+
function ApproveAction({ status, nextStatus, showTimeline, showBody, profile, chain, wallet, timestamp, hash, url, }) {
|
|
18995
|
+
return (jsxRuntime.jsxs(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(ThumbsUp, { fill: true }), description: "Approve contract", title: profile.label, icon: jsxRuntime.jsx(Image$1, { src: profile.imageURI, variant: "round", size: "xlarge" }), lineCap: jsxRuntime.jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxRuntime.jsxs(BodyText, { className: "tw-flex tw-items-center tw-gap-squid-xs", size: "small", children: [jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: chain.name }), jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-300" }), jsxRuntime.jsx(WalletLink, Object.assign({}, wallet))] }) }), (timestamp || hash) && (jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }))] }));
|
|
18996
|
+
}
|
|
18829
18997
|
|
|
18830
|
-
|
|
18831
|
-
|
|
18832
|
-
|
|
18833
|
-
// out of rendering.
|
|
18834
|
-
if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {
|
|
18835
|
-
return prevSelection;
|
|
18836
|
-
}
|
|
18998
|
+
function BridgeAction({ status, nextStatus, showTimeline, showBody, token, chain, provider, timestamp, hash, url, }) {
|
|
18999
|
+
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(SquareArrowTopLeftIcon, {}), description: jsxRuntime.jsxs(Inline, { children: ["Bridge", jsxRuntime.jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: token.symbol }) }), "to", jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: jsxRuntime.jsx(BodyText, { size: "small", children: chain.name }) }), "via", jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: (timestamp || hash) && (jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
|
|
19000
|
+
}
|
|
18837
19001
|
|
|
18838
|
-
|
|
18839
|
-
|
|
18840
|
-
|
|
18841
|
-
|
|
19002
|
+
function FeesAction({ status, nextStatus, showTimeline = false, total, lines, }) {
|
|
19003
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(FeesTotal, { status: status, nextStatus: nextStatus, total: total, showTimeline: lines !== undefined || showTimeline }), lines && (jsxRuntime.jsx(FeesLines, { status: status, lines: lines, showTimeline: showTimeline }))] }));
|
|
19004
|
+
}
|
|
19005
|
+
function FeesTotal({ status, nextStatus, total, showTimeline, collapsed, }) {
|
|
19006
|
+
return (jsxRuntime.jsxs(ActionWrapper, { status: status, children: [jsxRuntime.jsx(ActionLineOutRow, { status: nextStatus }), jsxRuntime.jsx(ActionStatusRow, { status: status, icon: jsxRuntime.jsx(TagIconFilled, {}), children: jsxRuntime.jsx(FeesRow, Object.assign({ collapsed: collapsed }, total)) }), jsxRuntime.jsx(ActionRow, { children: jsxRuntime.jsxs(Timeline, { className: cn("tw-h-squid-xs", showTimeline ? statusTextClassMap[status] : "tw-text-transparent"), children: [jsxRuntime.jsx(Timeline.CapTop, {}), jsxRuntime.jsx(Timeline.Straight, {})] }) })] }));
|
|
19007
|
+
}
|
|
19008
|
+
function FeesLines({ status, lines, showTimeline = false, }) {
|
|
19009
|
+
return (jsxRuntime.jsxs(ActionWrapper, { status: status, children: [lines && (jsxRuntime.jsx("div", { children: lines.map((line, index) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [index > 0 && (jsxRuntime.jsx(ActionRow, { children: jsxRuntime.jsxs(Timeline, { className: cn("tw-h-squid-xs", statusTextClassMap[status]), children: [jsxRuntime.jsx(Timeline.CapTop, {}), jsxRuntime.jsx(Timeline.Straight, {})] }) })), jsxRuntime.jsxs(ActionRow, { children: [jsxRuntime.jsxs(Timeline, { className: statusTextClassMap[status], children: [jsxRuntime.jsx(Timeline.Straight, {}), jsxRuntime.jsx(Timeline.ArrowRight, {})] }), jsxRuntime.jsx("div", { className: "tw-relative tw-top-[2px] tw-flex tw-items-end", children: jsxRuntime.jsx(FeesRow, Object.assign({}, line)) })] })] }, index))) })), jsxRuntime.jsx(ActionRow, { children: jsxRuntime.jsxs(Timeline, { className: cn("tw-h-squid-xs", showTimeline
|
|
19010
|
+
? statusTextClassMap[status]
|
|
19011
|
+
: "!tw-text-[transparent]"), children: [jsxRuntime.jsx(Timeline.CapTop, {}), jsxRuntime.jsx(Timeline.Straight, {})] }) })] }));
|
|
19012
|
+
}
|
|
19013
|
+
function FeesRow({ label, usd, amount, symbol, collapsed = false, }) {
|
|
19014
|
+
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-w-full tw-gap-squid-xs", children: [jsxRuntime.jsx(SizeTransition, { children: jsxRuntime.jsx(BodyText, { size: "small", tight: true, className: cn("tw-block tw-truncate tw-text-grey-300", !collapsed && "tw-w-[100px]"), children: label }) }), jsxRuntime.jsx("div", { className: "tw-flex tw-items-center", children: jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-700" }) }), jsxRuntime.jsxs(BodyText, { size: "small", tight: true, className: "tw-flex-grow tw-text-grey-300", children: ["$", usd] }), jsxRuntime.jsxs(CaptionText, { className: "tw-text-right tw-text-grey-500", children: [amount, " ", symbol] })] }));
|
|
19015
|
+
}
|
|
18842
19016
|
|
|
19017
|
+
function IncompleteAction({ status, nextStatus, message, buttons, }) {
|
|
19018
|
+
return (jsxRuntime.jsxs(ActionWrapper, { status: status, children: [jsxRuntime.jsx(ActionLineOutRow, { status: nextStatus }), jsxRuntime.jsxs(ActionRow, { children: [jsxRuntime.jsxs(Timeline, { children: [jsxRuntime.jsx(Timeline.ArrowReverse, {}), jsxRuntime.jsx(Timeline.Straight, {})] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-squid-m tw-pb-squid-m", children: [jsxRuntime.jsx(BodyText, { size: "small", tight: true, className: "tw-text-grey-300", children: "Transaction incomplete" }), jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-grey-500", children: message }), jsxRuntime.jsx("div", { className: "tw-flex tw-gap-squid-xs", children: buttons })] })] })] }));
|
|
19019
|
+
}
|
|
18843
19020
|
|
|
18844
|
-
|
|
18845
|
-
|
|
19021
|
+
function linkActionTimelineProps(actions, collapsed) {
|
|
19022
|
+
return actions.map((action, index) => {
|
|
19023
|
+
var _a;
|
|
19024
|
+
const nextStatus = (_a = actions[index - 1]) === null || _a === void 0 ? void 0 : _a.props.status;
|
|
19025
|
+
return Object.assign(Object.assign({}, action), { props: Object.assign(Object.assign({}, action.props), { showTimeline: index !== actions.length - 1, showBody: !(collapsed && index === 0), nextStatus }) });
|
|
19026
|
+
});
|
|
19027
|
+
}
|
|
18846
19028
|
|
|
18847
|
-
|
|
18848
|
-
|
|
18849
|
-
|
|
19029
|
+
function ReceiveNFTAction({ status, nextStatus, showTimeline, showBody, nft, chain, wallet, timestamp, hash, url, }) {
|
|
19030
|
+
return (jsxRuntime.jsxs(ActionLayout, { status: status, statusIcon: jsxRuntime.jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive NFT", title: nft.name, icon: jsxRuntime.jsx(Image$1, { src: nft.imageURI, variant: "square", size: "xlarge" }), lineCap: jsxRuntime.jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxRuntime.jsxs(BodyText, { className: "tw-flex tw-items-center tw-gap-squid-xs", size: "small", children: [jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: jsxRuntime.jsx(BodyText, { size: "small", children: chain.name }) }), jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-700" }), jsxRuntime.jsx(WalletLink, Object.assign({}, wallet))] }) }), jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
19031
|
+
}
|
|
18850
19032
|
|
|
18851
|
-
|
|
18852
|
-
|
|
18853
|
-
|
|
18854
|
-
return [getSnapshotWithSelector, getServerSnapshotWithSelector];
|
|
18855
|
-
}, [getSnapshot, getServerSnapshot, selector, isEqual]),
|
|
18856
|
-
getSelection = _useMemo[0],
|
|
18857
|
-
getServerSelection = _useMemo[1];
|
|
19033
|
+
function ReceiveTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
|
|
19034
|
+
return (jsxRuntime.jsxs(ActionLayout, { status: status, statusIcon: jsxRuntime.jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive tokens", title: `${amount} ${token.symbol}`, icon: jsxRuntime.jsx(Image$1, { src: token.logoURI, variant: "round", size: "xlarge" }), lineCap: jsxRuntime.jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxRuntime.jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs", children: [jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: jsxRuntime.jsx(BodyText, { size: "small", children: chain.name }) }), jsxRuntime.jsx(PipeSeparator, { className: "tw-text-body-small tw-text-grey-700" }), " ", jsxRuntime.jsx(WalletLink, Object.assign({}, wallet))] }) }), jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
19035
|
+
}
|
|
18858
19036
|
|
|
18859
|
-
|
|
18860
|
-
|
|
18861
|
-
|
|
18862
|
-
inst.value = value;
|
|
18863
|
-
}, [value]);
|
|
18864
|
-
useDebugValue(value);
|
|
18865
|
-
return value;
|
|
18866
|
-
}
|
|
19037
|
+
function SendTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
|
|
19038
|
+
return (jsxRuntime.jsxs(ActionLayout, { status: status, statusIcon: jsxRuntime.jsx(ArrowRightUpIcon, {}), nextStatus: nextStatus, description: "Send tokens", title: `${amount} ${token.symbol}`, icon: jsxRuntime.jsx(Image$1, { src: token.logoURI, variant: "round", size: "xlarge" }), lineCap: jsxRuntime.jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsxRuntime.jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxRuntime.jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs", children: [jsxRuntime.jsx(IconLabel, { src: chain.logoURI, children: chain.name }), jsxRuntime.jsx(PipeSeparator, { className: "tw-text-body-small tw-text-grey-700" }), " ", jsxRuntime.jsx(WalletLink, Object.assign({}, wallet))] }) }), jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
|
|
19039
|
+
}
|
|
18867
19040
|
|
|
18868
|
-
|
|
18869
|
-
|
|
18870
|
-
|
|
18871
|
-
|
|
18872
|
-
|
|
18873
|
-
|
|
18874
|
-
|
|
18875
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
18876
|
-
}
|
|
18877
|
-
|
|
18878
|
-
})();
|
|
18879
|
-
}
|
|
18880
|
-
return withSelector_development;
|
|
19041
|
+
function StakeAction({ status, nextStatus, showTimeline, showBody, token, provider, timestamp, hash, url, }) {
|
|
19042
|
+
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(PieChartIcon, {}), description: jsxRuntime.jsx(Inline, { children: [
|
|
19043
|
+
"Stake",
|
|
19044
|
+
jsxRuntime.jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: token.symbol }) }),
|
|
19045
|
+
"on",
|
|
19046
|
+
jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) }),
|
|
19047
|
+
] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
18881
19048
|
}
|
|
18882
19049
|
|
|
18883
|
-
|
|
18884
|
-
|
|
18885
|
-
|
|
18886
|
-
|
|
19050
|
+
function StartAction({ status, nextStatus, showTimeline = false, showBody = false, timestamp, hash, url, }) {
|
|
19051
|
+
const getDescription = () => {
|
|
19052
|
+
switch (status) {
|
|
19053
|
+
case "error":
|
|
19054
|
+
case "waiting":
|
|
19055
|
+
return "Transaction not started";
|
|
19056
|
+
default:
|
|
19057
|
+
return "Transaction started";
|
|
19058
|
+
}
|
|
19059
|
+
};
|
|
19060
|
+
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(ArrowUpIcon, {}), description: getDescription(), lineCap: jsxRuntime.jsx(Timeline.CapTop, {}), showTimeline: showTimeline, showBody: showBody, children: status === "waiting" ? (jsxRuntime.jsx(CaptionText, { children: "Waiting to confirm..." })) : (jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
|
|
18887
19061
|
}
|
|
18888
19062
|
|
|
18889
|
-
|
|
18890
|
-
|
|
19063
|
+
function SuccessAction({ nextStatus, status, description = status === "error"
|
|
19064
|
+
? "Transaction failed"
|
|
19065
|
+
: "Transaction successful", showTimeline, showBody, timestamp, hash, url, }) {
|
|
19066
|
+
return (jsxRuntime.jsx(ActionLayout, { description: description, status: status, nextStatus: nextStatus, showTimeline: showTimeline, showBody: showBody, children: (timestamp || hash) && (jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
|
|
19067
|
+
}
|
|
18891
19068
|
|
|
18892
|
-
|
|
18893
|
-
|
|
18894
|
-
let didWarnAboutEqualityFn = false;
|
|
18895
|
-
const identity = (arg) => arg;
|
|
18896
|
-
function useStore(api, selector = identity, equalityFn) {
|
|
18897
|
-
if ((undefined ? undefined.MODE : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
|
|
18898
|
-
console.warn(
|
|
18899
|
-
"[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
|
|
18900
|
-
);
|
|
18901
|
-
didWarnAboutEqualityFn = true;
|
|
18902
|
-
}
|
|
18903
|
-
const slice = useSyncExternalStoreWithSelector(
|
|
18904
|
-
api.subscribe,
|
|
18905
|
-
api.getState,
|
|
18906
|
-
api.getServerState || api.getInitialState,
|
|
18907
|
-
selector,
|
|
18908
|
-
equalityFn
|
|
18909
|
-
);
|
|
18910
|
-
useDebugValue(slice);
|
|
18911
|
-
return slice;
|
|
19069
|
+
function SwapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
|
|
19070
|
+
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxRuntime.jsxs(Inline, { children: ["Swap", jsxRuntime.jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: fromToken.symbol }) }), "to", jsxRuntime.jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: toToken.symbol }) }), "via", jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
18912
19071
|
}
|
|
18913
|
-
const createImpl = (createState) => {
|
|
18914
|
-
if ((undefined ? undefined.MODE : void 0) !== "production" && typeof createState !== "function") {
|
|
18915
|
-
console.warn(
|
|
18916
|
-
"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
|
|
18917
|
-
);
|
|
18918
|
-
}
|
|
18919
|
-
const api = typeof createState === "function" ? createStore(createState) : createState;
|
|
18920
|
-
const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
|
|
18921
|
-
Object.assign(useBoundStore, api);
|
|
18922
|
-
return useBoundStore;
|
|
18923
|
-
};
|
|
18924
|
-
const create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
18925
19072
|
|
|
18926
|
-
|
|
18927
|
-
|
|
18928
|
-
}
|
|
19073
|
+
function WrapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
|
|
19074
|
+
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxRuntime.jsxs(Inline, { children: ["Wrap", jsxRuntime.jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: fromToken.symbol }) }), "to", jsxRuntime.jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: toToken.symbol }) }), "via", jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
19075
|
+
}
|
|
18929
19076
|
|
|
18930
|
-
|
|
18931
|
-
|
|
18932
|
-
|
|
18933
|
-
|
|
18934
|
-
|
|
18935
|
-
|
|
18936
|
-
|
|
18937
|
-
|
|
19077
|
+
const actionComponentMap = {
|
|
19078
|
+
success: SuccessAction,
|
|
19079
|
+
receive_tokens: ReceiveTokensAction,
|
|
19080
|
+
receive_nft: ReceiveNFTAction,
|
|
19081
|
+
approve: ApproveAction,
|
|
19082
|
+
send_tokens: SendTokensAction,
|
|
19083
|
+
swap: SwapAction,
|
|
19084
|
+
bridge: BridgeAction,
|
|
19085
|
+
wrap: WrapAction,
|
|
19086
|
+
stake: StakeAction,
|
|
19087
|
+
start: StartAction,
|
|
19088
|
+
fees: FeesAction,
|
|
19089
|
+
incomplete: IncompleteAction,
|
|
19090
|
+
};
|
|
19091
|
+
function TransactionAction({ type, props }) {
|
|
19092
|
+
const Component = actionComponentMap[type];
|
|
19093
|
+
return jsxRuntime.jsx(Component, Object.assign({}, props));
|
|
18938
19094
|
}
|
|
18939
|
-
|
|
18940
|
-
|
|
19095
|
+
|
|
19096
|
+
function Transfer({ isLoading, from, to, className }) {
|
|
19097
|
+
return (jsxRuntime.jsx("div", { className: cn("tw-flex tw-items-center tw-gap-squid-xxs", className), children: jsxRuntime.jsxs(Join, { glue: () => jsxRuntime.jsx(ChevronLargeRightIcon, { className: "tw-text-grey-500" }), children: [isLoading ? jsxRuntime.jsx(TextSkeleton, {}) : from, isLoading ? jsxRuntime.jsx(TextSkeleton, {}) : to] }) }));
|
|
18941
19098
|
}
|
|
18942
19099
|
|
|
18943
|
-
function
|
|
18944
|
-
return (jsxRuntime.jsxs("div", { className: "tw-
|
|
19100
|
+
function TransactionItem({ className, isLoading = false, status, image, type, hash, fromChain, toChain, fromAmount, toAmount, timestamp, variant = "full", }) {
|
|
19101
|
+
return (jsxRuntime.jsxs("div", { className: cn("tw-flex tw-items-stretch tw-gap-squid-xs tw-bg-grey-900 tw-p-squid-xs", className), children: [variant === "full" && (jsxRuntime.jsxs("div", { className: "tw-timeline-gradient-mask tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xxs", children: [jsxRuntime.jsxs(Timeline, { className: "tw-flex-grow tw-text-grey-700", children: [jsxRuntime.jsx(Timeline.Straight, {}), jsxRuntime.jsx(Timeline.CapBottom, {})] }), jsxRuntime.jsx(TransactionState, { status: !status || isLoading ? "pending" : status, variant: "compact" }), jsxRuntime.jsxs(Timeline, { className: "tw-flex-grow tw-text-grey-700", children: [jsxRuntime.jsx(Timeline.CapTop, {}), jsxRuntime.jsx(Timeline.Straight, {})] })] })), jsxRuntime.jsx("div", { className: "tw-flex tw-w-[50px] tw-items-center tw-justify-center", children: image }), jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-grow tw-flex-col tw-gap-squid-xxs", children: [jsxRuntime.jsx(CaptionText, { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: jsxRuntime.jsx(TransactionItemHeader, { hash: hash, status: status, type: type, isLoading: isLoading, variant: variant }) }), (isLoading || fromChain || toChain) && (jsxRuntime.jsx(CaptionText, { className: "tw-block tw-h-squid-m", children: jsxRuntime.jsx(Transfer, { className: "tw-text-grey-400", isLoading: isLoading, from: fromChain && (jsxRuntime.jsx(IconLabel, { src: fromChain.logoURI, children: fromChain.name })), to: toChain && (jsxRuntime.jsx(IconLabel, { src: toChain.logoURI, children: toChain.name })) }) })), (isLoading || fromAmount || toAmount) && (jsxRuntime.jsx(Transfer, { className: "tw-text-grey-300", isLoading: isLoading, from: fromAmount ? (jsxRuntime.jsx(BodyText, { size: "small", children: fromAmount })) : undefined, to: toAmount ? (jsxRuntime.jsx(BodyText, { size: "small", children: toAmount })) : undefined }))] }), timestamp && variant === "full" && (jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: formatRelativeTime(timestamp) }))] }));
|
|
18945
19102
|
}
|
|
18946
|
-
|
|
18947
|
-
|
|
18948
|
-
|
|
18949
|
-
|
|
19103
|
+
const TransactionItemHeaderWrapper = ({ children, }) => {
|
|
19104
|
+
return (jsxRuntime.jsx(Join, { glue: () => jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-600" }), children: children }));
|
|
19105
|
+
};
|
|
19106
|
+
const TransactionItemHeader = ({ isLoading, variant, type, hash, status, }) => {
|
|
19107
|
+
if (isLoading) {
|
|
19108
|
+
return (jsxRuntime.jsxs(TransactionItemHeaderWrapper, { children: [jsxRuntime.jsx(TextSkeleton, {}), jsxRuntime.jsx(TextSkeleton, {})] }));
|
|
19109
|
+
}
|
|
19110
|
+
if (variant === "full") {
|
|
19111
|
+
if (!type || !hash)
|
|
19112
|
+
return null;
|
|
19113
|
+
return (jsxRuntime.jsxs(TransactionItemHeaderWrapper, { children: [jsxRuntime.jsx(TxTypeLabel, { type: type }), jsxRuntime.jsx("span", { className: "tw-text-grey-500", children: truncateHash(hash) })] }));
|
|
19114
|
+
}
|
|
19115
|
+
if (status && type) {
|
|
19116
|
+
return (jsxRuntime.jsxs(TransactionItemHeaderWrapper, { children: [jsxRuntime.jsx(TransactionState, { status: status, variant: "small" }), jsxRuntime.jsx(TxTypeLabel, { type: type })] }));
|
|
19117
|
+
}
|
|
19118
|
+
return null;
|
|
19119
|
+
};
|
|
19120
|
+
const TxTypeLabel = ({ type }) => {
|
|
19121
|
+
return (jsxRuntime.jsxs("span", { className: "tw-inline-flex tw-items-center tw-gap-[2px] tw-text-royal-500", children: [type === null || type === void 0 ? void 0 : type.icon, " ", type === null || type === void 0 ? void 0 : type.name] }));
|
|
19122
|
+
};
|
|
19123
|
+
|
|
19124
|
+
function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator = false, }) {
|
|
19125
|
+
return (jsxRuntime.jsxs("li", { className: "tw-flex tw-flex-col tw-self-stretch", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-self-stretch", children: [jsxRuntime.jsx(Track, { imageUrl: imageUrl }), jsxRuntime.jsx(Label, { subtitle: subtitle, descriptionBlocks: descriptionBlocks })] }), showStepSeparator && (jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-xxl tw-justify-center", children: jsxRuntime.jsx("div", { className: "tw-h-squid-m tw-w-1 tw-rounded-full tw-bg-gradient-to-t tw-from-grey-500 tw-to-grey-800" }) }))] }));
|
|
18950
19126
|
}
|
|
18951
|
-
function
|
|
18952
|
-
return (jsxRuntime.jsx("div", { className: "tw-flex tw-
|
|
19127
|
+
function Track({ imageUrl }) {
|
|
19128
|
+
return (jsxRuntime.jsx("div", { className: "tw-relative tw-flex tw-w-squid-xxl tw-min-w-squid-xxl tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-px-squid-xs", children: jsxRuntime.jsx("img", { src: imageUrl, alt: "", className: "tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs" }) }));
|
|
18953
19129
|
}
|
|
18954
|
-
|
|
18955
|
-
|
|
18956
|
-
var _a, _b, _c;
|
|
18957
|
-
const isWalletButtonInteractive = !isLoading && !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick);
|
|
18958
|
-
const WalletButtonTag = isWalletButtonInteractive ? "button" : "div";
|
|
18959
|
-
const isFetching = isFetchingProp || isLoading;
|
|
18960
|
-
return (jsxRuntime.jsxs("section", { className: "tw-relative tw-flex tw-h-[195px] tw-w-full tw-flex-col tw-border-t tw-border-t-material-light-thin tw-bg-grey-900 tw-pb-squid-m mobile-lg:tw-w-card-large mobile-sm-height:tw-h-[205px]", children: [jsxRuntime.jsx("header", { className: "tw-flex tw-items-center tw-gap-1 tw-px-squid-m tw-py-squid-xs tw-leading-5 tw-text-grey-300 mobile-lg:tw-px-squid-l", children: jsxRuntime.jsx(Tooltip, Object.assign({}, walletButton === null || walletButton === void 0 ? void 0 : walletButton.tooltip, { tooltipWidth: "max", childrenClassName: "tw-rounded-squid-s", containerClassName: "tw-rounded-squid-s", children: jsxRuntime.jsxs(WalletButtonTag, { onClick: isWalletButtonInteractive ? walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick : undefined, className: cn("-tw-ml-squid-xs tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-s tw-px-squid-xs tw-text-grey-600", isWalletButtonInteractive && "hover:tw-bg-material-light-thin", isLoading && "tw-opacity-50"), children: [jsxRuntime.jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === "from" ? "Pay" : "Receive" }), !isLoading && !(walletButton === null || walletButton === void 0 ? void 0 : walletButton.disabled) && !!token && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(BodyText, { size: "small", children: ":" }), jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsxRuntime.jsx(BodyText, { size: "small", className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
|
|
18961
|
-
? "tw-text-grey-300"
|
|
18962
|
-
: "tw-text-royal-400", children: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
|
|
18963
|
-
? walletButton === null || walletButton === void 0 ? void 0 : walletButton.address
|
|
18964
|
-
: (_a = walletButton === null || walletButton === void 0 ? void 0 : walletButton.emptyAddressLabel) !== null && _a !== void 0 ? _a : "Connect wallet" }), jsxRuntime.jsx(ChevronArrowIcon, { className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
|
|
18965
|
-
? "tw-text-grey-600"
|
|
18966
|
-
: "tw-text-royal-400" })] })] }))] }) })) }), jsxRuntime.jsx("div", { className: "tw-px-squid-m mobile-lg:tw-px-squid-l", children: jsxRuntime.jsx(AssetsButton, Object.assign({}, assetsButton, { chain: chain, token: token, isLoading: isLoading })) }), isFetching && (jsxRuntime.jsx("div", { className: "tw-absolute tw-bottom-2 tw-left-squid-m tw-z-10 tw-overflow-hidden mobile-lg:tw-left-squid-l", children: jsxRuntime.jsx("div", { className: "tw-h-[94px] tw-w-[1260px] tw-animate-move-loading-cover-to-right tw-bg-dark-cover" }) })), jsxRuntime.jsx(NumericInput, { inputMode: "decimal", pattern: "[0-9.,]*", token: {
|
|
18967
|
-
decimals: (_b = token === null || token === void 0 ? void 0 : token.decimals) !== null && _b !== void 0 ? _b : 18,
|
|
18968
|
-
symbol: (_c = token === null || token === void 0 ? void 0 : token.symbol) !== null && _c !== void 0 ? _c : "",
|
|
18969
|
-
price: tokenPrice,
|
|
18970
|
-
}, onAmountChange: (value) => {
|
|
18971
|
-
onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(value);
|
|
18972
|
-
}, balance: balance, criticalPriceImpactPercentage: criticalPriceImpactPercentage, error: error, formatIfVerySmall: {
|
|
18973
|
-
token: "0.001",
|
|
18974
|
-
usd: "0.01",
|
|
18975
|
-
}, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: !!token, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading })] }));
|
|
19130
|
+
function Label({ subtitle, descriptionBlocks, }) {
|
|
19131
|
+
return (jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-items-start", children: [jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-self-stretch tw-py-squid-xxs tw-pr-squid-m tw-text-grey-500", children: jsxRuntime.jsx(CaptionText, { children: subtitle }) }), jsxRuntime.jsx(DescriptionBlocks, { blocks: descriptionBlocks, className: "tw-py-squid-xxs tw-pr-squid-m tw-text-grey-300" })] }));
|
|
18976
19132
|
}
|
|
18977
19133
|
|
|
18978
|
-
function
|
|
18979
|
-
return (jsxRuntime.
|
|
19134
|
+
function DropdownMenuTitle({ title }) {
|
|
19135
|
+
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 }) }));
|
|
18980
19136
|
}
|
|
18981
19137
|
|
|
18982
19138
|
const STEPS_LIST_HEIGHT = 400;
|
|
@@ -24916,11 +25072,11 @@ function TransactionHeaderLayout({ isLoading, status, title, image = jsxRuntime.
|
|
|
24916
25072
|
}
|
|
24917
25073
|
|
|
24918
25074
|
function BridgeHeader({ tokenLogoURI, chainLogoURI, title = "Bridge", hash, url, status, }) {
|
|
24919
|
-
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxRuntime.jsxs("div", { className: "tw-relative", children: [jsxRuntime.jsx(
|
|
25075
|
+
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxRuntime.jsxs("div", { className: "tw-relative", children: [jsxRuntime.jsx(Image$1, { src: tokenLogoURI, size: "xlarge", variant: "round" }), jsxRuntime.jsx(Image$1, { src: chainLogoURI, className: "tw-absolute -tw-right-squid-xxs tw-bottom-0" })] }), children: jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsxRuntime.jsx(Chip, { label: "TX" }), jsxRuntime.jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), " "] }) }));
|
|
24920
25076
|
}
|
|
24921
25077
|
|
|
24922
25078
|
function BuyNFTHeader({ imageUrl, title = "Buy NFT", hash, url, status, }) {
|
|
24923
|
-
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxRuntime.jsx(
|
|
25079
|
+
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxRuntime.jsx(Image$1, { src: imageUrl, size: "xlarge" }), children: jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsxRuntime.jsx(Chip, { label: "TX" }), jsxRuntime.jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), " "] }) }));
|
|
24924
25080
|
}
|
|
24925
25081
|
|
|
24926
25082
|
function InteractionHeader({ title = "Interaction", image = jsxRuntime.jsx(Approve, {}), hash, url, status, }) {
|
|
@@ -24928,7 +25084,7 @@ function InteractionHeader({ title = "Interaction", image = jsxRuntime.jsx(Appro
|
|
|
24928
25084
|
}
|
|
24929
25085
|
|
|
24930
25086
|
function ProfileHeader({ imageUrl, title, wallet, amount, }) {
|
|
24931
|
-
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, image: jsxRuntime.jsx(ProfilePicture, { src: imageUrl }), children: jsxRuntime.jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsxRuntime.jsx(WalletLink, Object.assign({}, wallet)), jsxRuntime.jsx(PipeSeparator, {}), jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsxRuntime.jsx(
|
|
25087
|
+
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, image: jsxRuntime.jsx(ProfilePicture, { src: imageUrl }), children: jsxRuntime.jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsxRuntime.jsx(WalletLink, Object.assign({}, wallet)), jsxRuntime.jsx(PipeSeparator, {}), jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsxRuntime.jsx(DollarOutlinedIcon, {}), amount] })] }) }));
|
|
24932
25088
|
}
|
|
24933
25089
|
function ProfilePicture({ src }) {
|
|
24934
25090
|
return (jsxRuntime.jsxs("div", { className: "tw-relative tw-h-[110px] tw-w-[110px] tw-overflow-hidden tw-rounded-full", children: [jsxRuntime.jsx("img", { className: "tw-absolute tw-left-0 tw-top-0 tw-h-full tw-w-full tw-rounded-full", src: src }), jsxRuntime.jsx("div", { className: "tw-absolute tw-h-full tw-w-full tw-rounded-full tw-backdrop-blur-lg" }), jsxRuntime.jsx("div", { className: "tw-absolute tw-inset-squid-xxs tw-block", children: jsxRuntime.jsx("img", { className: "tw-h-full tw-w-full tw-rounded-full tw-border tw-border-material-light-thin", src: src }) })] }));
|
|
@@ -26549,7 +26705,7 @@ const switchKnobCheckedClassMap = {
|
|
|
26549
26705
|
unchecked: "tw-left-[1px]",
|
|
26550
26706
|
},
|
|
26551
26707
|
};
|
|
26552
|
-
function Switch({ checked = false, onChange, size, disabled = false, }) {
|
|
26708
|
+
function Switch({ checked = false, onChange, size, disabled = false, inputProps, }) {
|
|
26553
26709
|
return (
|
|
26554
26710
|
// Switch container
|
|
26555
26711
|
jsxRuntime.jsxs("label", { className: clsx("tw-relative tw-inline-flex tw-items-center tw-justify-end tw-overflow-hidden tw-rounded-squid-m tw-border tw-border-material-light-thin tw-transition-colors",
|
|
@@ -26558,7 +26714,9 @@ function Switch({ checked = false, onChange, size, disabled = false, }) {
|
|
|
26558
26714
|
// checked styles
|
|
26559
26715
|
checked ? "tw-bg-status-positive" : "tw-bg-grey-800",
|
|
26560
26716
|
// disabled styles
|
|
26561
|
-
disabled ? "tw-cursor-not-allowed" : "tw-cursor-pointer"
|
|
26717
|
+
disabled ? "tw-cursor-not-allowed" : "tw-cursor-pointer",
|
|
26718
|
+
// Focus visible styles
|
|
26719
|
+
"tw-focus-visible-within-outline"), children: [jsxRuntime.jsx("input", Object.assign({}, inputProps, { disabled: disabled, checked: checked, onChange: disabled ? undefined : (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.checked), type: "checkbox", className: "tw-peer tw-sr-only" })), jsxRuntime.jsx("span", { style: {
|
|
26562
26720
|
filter: "drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.33)) drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.20))",
|
|
26563
26721
|
}, className: clsx("tw-absolute tw-rounded-full tw-border tw-border-material-light-thin tw-transition-all",
|
|
26564
26722
|
// size styles
|
|
@@ -26747,10 +26905,10 @@ function SettingsButton({ label, isSelected = false, onClick, }) {
|
|
|
26747
26905
|
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 }) }));
|
|
26748
26906
|
}
|
|
26749
26907
|
|
|
26750
|
-
const IconButton = (_a) => {
|
|
26908
|
+
const IconButton = React$1.forwardRef((_a, ref) => {
|
|
26751
26909
|
var { icon } = _a, props = __rest$1(_a, ["icon"]);
|
|
26752
|
-
return (jsxRuntime.jsx("button", Object.assign({}, props, { 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", props.disabled ? "tw-text-grey-600" : "tw-text-grey-300", props.className), children: icon })));
|
|
26753
|
-
};
|
|
26910
|
+
return (jsxRuntime.jsx("button", Object.assign({}, props, { ref: ref, 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", props.disabled ? "tw-text-grey-600" : "tw-text-grey-300", props.className), children: icon })));
|
|
26911
|
+
});
|
|
26754
26912
|
|
|
26755
26913
|
function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }) {
|
|
26756
26914
|
const matchesMobileLg = useMediaQuery(MEDIA_QUERIES.MOBILE_LG.media);
|
|
@@ -26762,7 +26920,7 @@ function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }) {
|
|
|
26762
26920
|
? "tw-w-[180px] tw-max-w-[180px] tw-pt-0"
|
|
26763
26921
|
: "tw-w-[70px] tw-max-w-[70px] tw-pt-squid-xs"), children: [jsxRuntime.jsx(SectionTitle, { title: "Chains", icon: jsxRuntime.jsx(ChainLink, {}), className: cn(matchesMobileLg ? "tw-flex" : "tw-hidden") }), jsxRuntime.jsxs(List, { children: [jsxRuntime.jsx(ListItem, { size: "small", mainIcon: jsxRuntime.jsx("span", { className: "tw-flex tw-h-squid-l tw-w-squid-l tw-flex-1 tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-royal-500 tw-text-[#FBFBFD]", children: jsxRuntime.jsx(ChainLink, { size: "24" }) }), itemTitle: "All Chains", compactOnMobile: true, onClick: () => { } }), chains.map((item) => (jsxRuntime.jsx(ListItem, { size: "small", mainImageUrl: item.iconUrl, itemTitle: item.name, detail: item.name, compactOnMobile: true, onClick: () => { } }, item.name)))] })] }), jsxRuntime.jsxs("div", { style: {
|
|
26764
26922
|
scrollbarWidth: "none",
|
|
26765
|
-
}, className: cn("tw-flex tw-max-h-[540px] tw-flex-col tw-gap-squid-xxs tw-overflow-y-auto tw-overflow-x-hidden", matchesMobileLg ? "tw-w-[299px] tw-max-w-[299px]" : "tw-w-full"), children: [jsxRuntime.jsx(SectionTitle, { title: "Favorite tokens", icon: jsxRuntime.jsx(HeartSmallIcon, {}) }), jsxRuntime.jsx(List, { children: favoriteTokens.map((favToken) => (jsxRuntime.jsx(ListItem, { size: "large", mainImageUrl: favToken.iconUrl, secondaryImageUrl: favToken.iconUrl, itemTitle: favToken.name, subtitle: favToken.symbol,
|
|
26923
|
+
}, className: cn("tw-flex tw-max-h-[540px] tw-flex-col tw-gap-squid-xxs tw-overflow-y-auto tw-overflow-x-hidden", matchesMobileLg ? "tw-w-[299px] tw-max-w-[299px]" : "tw-w-full"), children: [jsxRuntime.jsx(SectionTitle, { title: "Favorite tokens", icon: jsxRuntime.jsx(HeartSmallIcon, {}) }), jsxRuntime.jsx(List, { children: favoriteTokens.map((favToken) => (jsxRuntime.jsx(ListItem, { size: "large", mainImageUrl: favToken.iconUrl, secondaryImageUrl: favToken.iconUrl, itemTitle: favToken.name, subtitle: favToken.symbol, rounded: true, onClick: () => { }, dropdownMenuContent: jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(DropdownMenuItem, { label: "Add to favorites", icon: jsxRuntime.jsx(FilledHeartIcon, {}) }) }) }, favToken.name))) }), jsxRuntime.jsx(SectionTitle, { title: "Your tokens loading", icon: jsxRuntime.jsx(CoinsIcon, {}) }), jsxRuntime.jsx(List, { children: userTokens.map((userToken) => (jsxRuntime.jsx(ListItem, { size: "large", mainImageUrl: userToken.iconUrl, secondaryImageUrl: userToken.iconUrl, itemTitle: userToken.name, subtitle: `${userToken.balance} ${userToken.symbol}`, icon: jsxRuntime.jsx(EmptyHeartIcon, { className: "tw-text-status-negative" }), rounded: true, onClick: () => { }, loading: { subtitle: userToken.symbol } }, userToken.name))) }), jsxRuntime.jsx(SectionTitle, { title: "Your tokens & balance", icon: jsxRuntime.jsx(CoinsIcon, {}) }), jsxRuntime.jsx(List, { children: userTokens.map((userToken) => (jsxRuntime.jsx(ListItem, { size: "large", mainImageUrl: userToken.iconUrl, secondaryImageUrl: userToken.iconUrl, itemTitle: userToken.name, subtitle: `${userToken.balance} ${userToken.symbol}`, icon: jsxRuntime.jsx(EmptyHeartIcon, { className: "tw-text-status-negative" }), rounded: true, onClick: () => { } }, userToken.name))) }), jsxRuntime.jsx(SectionTitle, { title: "Popular tokens", icon: jsxRuntime.jsx(SparkleIcon, {}) }), jsxRuntime.jsx(List, { children: popularTokens.map((popToken) => (jsxRuntime.jsx(ListItem, { size: "large", mainImageUrl: popToken.iconUrl, secondaryImageUrl: popToken.iconUrl, itemTitle: popToken.name, subtitle: popToken.symbol, icon: jsxRuntime.jsx(EmptyHeartIcon, { className: "tw-text-status-negative" }), rounded: true, onClick: () => { } }, popToken.name))) })] })] }) })] }));
|
|
26766
26924
|
}
|
|
26767
26925
|
const List = ({ children }) => {
|
|
26768
26926
|
return (jsxRuntime.jsx("ul", { className: "tw-flex tw-flex-col tw-gap-squid-xxs tw-pb-squid-xs", children: children }));
|
|
@@ -62258,6 +62416,7 @@ exports.AssetsView = AssetsView;
|
|
|
62258
62416
|
exports.BackpackIcon = BackpackIcon;
|
|
62259
62417
|
exports.BadgeImage = BadgeImage;
|
|
62260
62418
|
exports.BankIcon = BankIcon;
|
|
62419
|
+
exports.BellAlarmIcon = BellAlarmIcon;
|
|
62261
62420
|
exports.BlockSkeleton = BlockSkeleton;
|
|
62262
62421
|
exports.BodyText = BodyText;
|
|
62263
62422
|
exports.Boost = Boost;
|
|
@@ -62278,6 +62437,7 @@ exports.BuyNFTTransactionView = BuyNFTTransactionView;
|
|
|
62278
62437
|
exports.CSS_VARS = CSS_VARS;
|
|
62279
62438
|
exports.Calendar = Calendar;
|
|
62280
62439
|
exports.CaptionText = CaptionText;
|
|
62440
|
+
exports.CatSquareIcon = CatSquareIcon;
|
|
62281
62441
|
exports.ChainLink = ChainLink;
|
|
62282
62442
|
exports.Checkmark1Icon = Checkmark1Icon;
|
|
62283
62443
|
exports.Checkmark2Icon = Checkmark2Icon;
|
|
@@ -62294,8 +62454,8 @@ exports.CircleMinusIcon = CircleMinusIcon;
|
|
|
62294
62454
|
exports.CirclePlusIcon = CirclePlusIcon;
|
|
62295
62455
|
exports.CircleX = CircleX;
|
|
62296
62456
|
exports.CircleXFilledIcon = CircleXFilledIcon;
|
|
62297
|
-
exports.ClockIcon = ClockIcon;
|
|
62298
62457
|
exports.ClockOutlineIcon = ClockOutlineIcon;
|
|
62458
|
+
exports.ClockSolidIcon = ClockSolidIcon;
|
|
62299
62459
|
exports.CoinsAddIcon = CoinsAddIcon;
|
|
62300
62460
|
exports.CoinsIcon = CoinsIcon;
|
|
62301
62461
|
exports.Collapse = Collapse;
|
|
@@ -62318,24 +62478,30 @@ exports.DockIconProfile = DockIconProfile;
|
|
|
62318
62478
|
exports.DockIconScan = DockIconScan;
|
|
62319
62479
|
exports.DockIconSwap = DockIconSwap;
|
|
62320
62480
|
exports.DockSwapIcon = DockSwapIcon;
|
|
62321
|
-
exports.
|
|
62481
|
+
exports.DollarOutlinedIcon = DollarOutlinedIcon;
|
|
62482
|
+
exports.DollarSolidIcon = DollarSolidIcon;
|
|
62322
62483
|
exports.DotGrid1x3HorizontalIcon = DotGrid1x3HorizontalIcon;
|
|
62323
62484
|
exports.DropdownMenu = DropdownMenu;
|
|
62324
62485
|
exports.DropdownMenuItem = DropdownMenuItem;
|
|
62486
|
+
exports.DropdownMenuTitle = DropdownMenuTitle;
|
|
62325
62487
|
exports.EmojiMeh = EmojiMeh;
|
|
62326
62488
|
exports.EmojiSadIcon = EmojiSadIcon;
|
|
62327
62489
|
exports.EmptyHeartIcon = EmptyHeartIcon;
|
|
62328
62490
|
exports.ErrorMessage = ErrorMessage;
|
|
62329
62491
|
exports.EthereumIcon = EthereumIcon;
|
|
62330
62492
|
exports.ExplosionIcon = ExplosionIcon;
|
|
62493
|
+
exports.EyeOpenIcon = EyeOpenIcon;
|
|
62331
62494
|
exports.FeeButton = FeeButton;
|
|
62332
62495
|
exports.FeesAction = FeesAction;
|
|
62333
62496
|
exports.FeesLines = FeesLines;
|
|
62334
62497
|
exports.FeesTotal = FeesTotal;
|
|
62335
62498
|
exports.FilledHeartIcon = FilledHeartIcon;
|
|
62499
|
+
exports.FilterAscendingIcon = FilterAscendingIcon;
|
|
62336
62500
|
exports.FilterButton = FilterButton;
|
|
62337
62501
|
exports.FilterIcon = FilterIcon;
|
|
62502
|
+
exports.FilterTimelineIcon = FilterTimelineIcon;
|
|
62338
62503
|
exports.GasIcon = GasIcon;
|
|
62504
|
+
exports.GhostIcon = GhostIcon;
|
|
62339
62505
|
exports.GithubIcon = GithubIcon;
|
|
62340
62506
|
exports.HashLink = HashLink;
|
|
62341
62507
|
exports.HeadingText = HeadingText;
|
|
@@ -62345,6 +62511,7 @@ exports.HistoryItem = HistoryItem;
|
|
|
62345
62511
|
exports.HomeIcon = HomeIcon;
|
|
62346
62512
|
exports.IconButton = IconButton;
|
|
62347
62513
|
exports.IconLabel = IconLabel;
|
|
62514
|
+
exports.Image = Image$1;
|
|
62348
62515
|
exports.ImageIcon = ImageIcon;
|
|
62349
62516
|
exports.ImageSparkle = ImageSparkle;
|
|
62350
62517
|
exports.IncompleteAction = IncompleteAction;
|
|
@@ -62357,6 +62524,7 @@ exports.InteractionProperties = InteractionProperties;
|
|
|
62357
62524
|
exports.InteractionTransactionView = InteractionTransactionView;
|
|
62358
62525
|
exports.Join = Join;
|
|
62359
62526
|
exports.LightningIcon = LightningIcon;
|
|
62527
|
+
exports.LimitIcon = LimitIcon;
|
|
62360
62528
|
exports.LinkIcon = LinkIcon;
|
|
62361
62529
|
exports.List = List;
|
|
62362
62530
|
exports.ListItem = ListItem;
|
|
@@ -62383,6 +62551,7 @@ exports.PercentIcon = PercentIcon;
|
|
|
62383
62551
|
exports.PieChartIcon = PieChartIcon;
|
|
62384
62552
|
exports.PipeSeparator = PipeSeparator;
|
|
62385
62553
|
exports.PlusIcon = PlusIcon;
|
|
62554
|
+
exports.PoopIcon = PoopIcon;
|
|
62386
62555
|
exports.PowerIcon = PowerIcon;
|
|
62387
62556
|
exports.ProductCard = ProductCard;
|
|
62388
62557
|
exports.ProfileHeader = ProfileHeader;
|
|
@@ -62406,6 +62575,7 @@ exports.SettingsButton = SettingsButton;
|
|
|
62406
62575
|
exports.SettingsGearIcon = SettingsGearIcon;
|
|
62407
62576
|
exports.SettingsItem = SettingsItem;
|
|
62408
62577
|
exports.SettingsSlider = SettingsSlider;
|
|
62578
|
+
exports.SettingsSliderIcon = SettingsSliderIcon;
|
|
62409
62579
|
exports.ShoppingBagIcon = ShoppingBagIcon;
|
|
62410
62580
|
exports.SizeTransition = SizeTransition;
|
|
62411
62581
|
exports.SmileIcon = SmileIcon;
|