@0xsquid/ui 0.27.0 → 0.27.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/cjs/index.js +1242 -975
- 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 +68 -0
- package/dist/cjs/types/components/icons/Search.d.ts +4 -1
- package/dist/cjs/types/components/icons/Weather.d.ts +4 -0
- 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/index.d.ts +1 -0
- package/dist/cjs/types/hooks/useDropdownMenu.d.ts +7 -3
- package/dist/cjs/types/hooks/useUserTheme.d.ts +13 -0
- package/dist/cjs/types/providers/ThemeProvider.d.ts +11 -0
- package/dist/cjs/types/providers/index.d.ts +1 -1
- 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 +1219 -973
- 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 +68 -0
- package/dist/esm/types/components/icons/Search.d.ts +4 -1
- package/dist/esm/types/components/icons/Weather.d.ts +4 -0
- 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/index.d.ts +1 -0
- package/dist/esm/types/hooks/useDropdownMenu.d.ts +7 -3
- package/dist/esm/types/hooks/useUserTheme.d.ts +13 -0
- package/dist/esm/types/providers/ThemeProvider.d.ts +11 -0
- package/dist/esm/types/providers/index.d.ts +1 -1
- 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 +859 -723
- package/package.json +2 -1
- package/dist/cjs/types/components/badges/ImageIcon.d.ts +0 -9
- package/dist/cjs/types/providers/SquidConfigProvider.d.ts +0 -9
- package/dist/esm/types/components/badges/ImageIcon.d.ts +0 -9
- package/dist/esm/types/providers/SquidConfigProvider.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" }) }));
|
|
@@ -17224,6 +17227,9 @@ function SunIcon({ size = "24", className, }) {
|
|
|
17224
17227
|
function MoonIcon({ size = "20", className, }) {
|
|
17225
17228
|
return (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsxRuntime.jsx("path", { d: "M10.0463 2.99972C10.2292 2.73432 10.2427 2.38723 10.0809 2.10846C9.91903 1.8297 9.61096 1.66925 9.28979 1.69647C5.02109 2.05816 1.66992 5.63639 1.66992 9.9982C1.66992 14.5997 5.40018 18.33 10.0017 18.33C14.3636 18.33 17.9419 14.9787 18.3035 10.7098C18.3307 10.3887 18.1702 10.0806 17.8914 9.91879C17.6127 9.75698 17.2656 9.77044 17.0002 9.95336C16.1951 10.5083 15.2201 10.8331 14.1667 10.8331C11.4052 10.8331 9.16667 8.59452 9.16667 5.8331C9.16667 4.77977 9.49145 3.80481 10.0463 2.99972Z", fill: "currentColor" }) }));
|
|
17226
17229
|
}
|
|
17230
|
+
function SunOutlinedIcon({ size = "24", className, }) {
|
|
17231
|
+
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 3V2M12 22V21M18.3598 5.64005L19.0698 4.93005M4.93016 19.07L5.64016 18.36M21 12H22M2 12H3M18.3598 18.36L19.0698 19.07M4.93016 4.93005L5.64016 5.64005M15.5355 8.46447C17.4882 10.4171 17.4882 13.5829 15.5355 15.5355C13.5829 17.4882 10.4171 17.4882 8.46447 15.5355C6.51185 13.5829 6.51185 10.4171 8.46447 8.46447C10.4171 6.51185 13.5829 6.51185 15.5355 8.46447Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
17232
|
+
}
|
|
17227
17233
|
|
|
17228
17234
|
const dockIconClassname = "tw-text-grey-900";
|
|
17229
17235
|
const dockIconSelectedClassname = "group-data-[squid-theme-type=dark]:tw-text-royal-700 group-data-[squid-theme-type=light]:tw-text-volt-700";
|
|
@@ -17249,6 +17255,58 @@ function DockIconHelp({ isSelected = false }) {
|
|
|
17249
17255
|
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
17256
|
}
|
|
17251
17257
|
|
|
17258
|
+
function GhostIcon({ size = "20", className, }) {
|
|
17259
|
+
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" }) }));
|
|
17260
|
+
}
|
|
17261
|
+
function SettingsSliderIcon({ size = "20", className, }) {
|
|
17262
|
+
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" })] }));
|
|
17263
|
+
}
|
|
17264
|
+
function EyeOpenIcon({ size = "20", className, }) {
|
|
17265
|
+
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" }) }));
|
|
17266
|
+
}
|
|
17267
|
+
function BellAlarmIcon({ size = "20", className, }) {
|
|
17268
|
+
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" })] }));
|
|
17269
|
+
}
|
|
17270
|
+
function LimitIcon({ 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: "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" }) }));
|
|
17272
|
+
}
|
|
17273
|
+
function PoopIcon({ size = "20", className, }) {
|
|
17274
|
+
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" }) }));
|
|
17275
|
+
}
|
|
17276
|
+
function CatSquareIcon({ 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", { 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" })] }));
|
|
17278
|
+
}
|
|
17279
|
+
function FilterAscendingIcon({ size = "20", className, }) {
|
|
17280
|
+
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" })] }));
|
|
17281
|
+
}
|
|
17282
|
+
function ImageIcon({ size = "20", className, }) {
|
|
17283
|
+
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" }) }));
|
|
17284
|
+
}
|
|
17285
|
+
function FilterTimelineIcon({ size = "20", className, }) {
|
|
17286
|
+
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" })] }));
|
|
17287
|
+
}
|
|
17288
|
+
function PhoneIcon({ size = "24", className, }) {
|
|
17289
|
+
return (jsxRuntime.jsx("svg", { className: className, xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 25 24", fill: "none", children: jsxRuntime.jsx("path", { d: "M10.5 19H14.5M8.5 22H16.5C17.6046 22 18.5 21.1046 18.5 20V4C18.5 2.89543 17.6046 2 16.5 2H8.5C7.39543 2 6.5 2.89543 6.5 4V20C6.5 21.1046 7.39543 22 8.5 22Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
|
|
17290
|
+
}
|
|
17291
|
+
function LaptopIcon({ size = "24", className, }) {
|
|
17292
|
+
return (jsxRuntime.jsxs("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: "M4.5 6C4.5 4.89543 5.39543 4 6.5 4H18.5C19.6046 4 20.5 4.89543 20.5 6V15C20.5 15.5523 20.0523 16 19.5 16H5.5C4.94772 16 4.5 15.5523 4.5 15V6Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M2.5 16H22.5V18C22.5 19.1046 21.6046 20 20.5 20H4.5C3.39543 20 2.5 19.1046 2.5 18V16Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square", strokeLinejoin: "round" })] }));
|
|
17293
|
+
}
|
|
17294
|
+
function CopyIcon({ size = "20", className, }) {
|
|
17295
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 21 20", fill: "none", className: className, children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.16663 6.66666V3.54166C7.16663 2.50612 8.00609 1.66666 9.04163 1.66666H16.9583C17.9938 1.66666 18.8333 2.50612 18.8333 3.54166V11.4583C18.8333 12.4939 17.9938 13.3333 16.9583 13.3333H13.8333V16.4583C13.8333 17.4939 12.9938 18.3333 11.9583 18.3333H4.04163C3.00609 18.3333 2.16663 17.4939 2.16663 16.4583V8.54166C2.16663 7.50612 3.00609 6.66666 4.04163 6.66666H7.16663ZM9.04163 13.3333C8.00609 13.3333 7.16663 12.4939 7.16663 11.4583V8.33332H4.04163C3.92657 8.33332 3.83329 8.4266 3.83329 8.54166V16.4583C3.83329 16.5734 3.92657 16.6667 4.04163 16.6667H11.9583C12.0734 16.6667 12.1666 16.5734 12.1666 16.4583V13.3333H9.04163Z", fill: "currentColor" }) }));
|
|
17296
|
+
}
|
|
17297
|
+
function FileDownloadIcon({ size = "20", className, }) {
|
|
17298
|
+
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 21 20", fill: "none", children: [jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.33337 1.66666H10.5V5.83332C10.5 7.21404 11.6193 8.33332 13 8.33332H17.1667V15.8333C17.1667 17.214 16.0474 18.3333 14.6667 18.3333H6.33337C4.95266 18.3333 3.83337 17.214 3.83337 15.8333V4.16666C3.83337 2.78594 4.95266 1.66666 6.33337 1.66666ZM13.1726 14.3392L11.0893 16.4226C10.7639 16.748 10.2362 16.748 9.91079 16.4226L7.82745 14.3392C7.50201 14.0138 7.50201 13.4862 7.82745 13.1607C8.15289 12.8353 8.68053 12.8353 9.00596 13.1607L9.66671 13.8215V10.8333C9.66671 10.3731 10.0398 9.99999 10.5 9.99999C10.9603 9.99999 11.3334 10.3731 11.3334 10.8333V13.8215L11.9941 13.1607C12.3196 12.8353 12.8472 12.8353 13.1726 13.1607C13.4981 13.4862 13.4981 14.0138 13.1726 14.3392Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M12.1667 2.15481L16.6786 6.66666H13C12.5398 6.66666 12.1667 6.29356 12.1667 5.83332V2.15481Z", fill: "currentColor" })] }));
|
|
17299
|
+
}
|
|
17300
|
+
function CodeSolidSquareIcon({ size = "24", className, }) {
|
|
17301
|
+
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", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.5 6C3.5 4.34315 4.84315 3 6.5 3H18.5C20.1569 3 21.5 4.34315 21.5 6V18C21.5 19.6569 20.1569 21 18.5 21H6.5C4.84315 21 3.5 19.6569 3.5 18V6ZM11.2071 8.79289C11.5976 9.18342 11.5976 9.81658 11.2071 10.2071L9.41421 12L11.2071 13.7929C11.5976 14.1834 11.5976 14.8166 11.2071 15.2071C10.8166 15.5976 10.1834 15.5976 9.79289 15.2071L8 13.4142C7.21895 12.6332 7.21895 11.3668 8 10.5858L9.79289 8.79289C10.1834 8.40237 10.8166 8.40237 11.2071 8.79289ZM15.2071 8.79289C14.8166 8.40237 14.1834 8.40237 13.7929 8.79289C13.4024 9.18342 13.4024 9.81658 13.7929 10.2071L15.5858 12L13.7929 13.7929C13.4024 14.1834 13.4024 14.8166 13.7929 15.2071C14.1834 15.5976 14.8166 15.5976 15.2071 15.2071L17 13.4142C17.781 12.6332 17.781 11.3668 17 10.5858L15.2071 8.79289Z", fill: "currentColor" }) }));
|
|
17302
|
+
}
|
|
17303
|
+
function CodeBracketsIcon({ size = "20", className, }) {
|
|
17304
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.8688 2.5249C12.3153 2.63652 12.5867 3.08896 12.4751 3.53546L9.14178 16.8688C9.03015 17.3153 8.57771 17.5868 8.13121 17.4752C7.68472 17.3635 7.41325 16.9111 7.52487 16.4646L10.8582 3.13123C10.9698 2.68474 11.4223 2.41327 11.8688 2.5249ZM5.58925 6.07746C5.91469 6.4029 5.91469 6.93053 5.58925 7.25597L3.43443 9.41079C3.10899 9.73623 3.10899 10.2639 3.43443 10.5893L5.58925 12.7441C5.91469 13.0696 5.91469 13.5972 5.58925 13.9226C5.26381 14.2481 4.73617 14.2481 4.41074 13.9226L2.25591 11.7678C1.2796 10.7915 1.27961 9.20859 2.25592 8.23228L4.41074 6.07746C4.73617 5.75202 5.26381 5.75202 5.58925 6.07746ZM14.4107 6.07746C14.7362 5.75202 15.2638 5.75202 15.5892 6.07746L17.7441 8.23228C18.7204 9.20859 18.7204 10.7915 17.7441 11.7678L15.5892 13.9226C15.2638 14.2481 14.7362 14.2481 14.4107 13.9226C14.0853 13.5972 14.0853 13.0696 14.4107 12.7441L16.5656 10.5893C16.891 10.2639 16.891 9.73623 16.5656 9.41079L14.4107 7.25597C14.0853 6.93053 14.0853 6.4029 14.4107 6.07746Z", fill: "currentColor" }) }));
|
|
17305
|
+
}
|
|
17306
|
+
function CommandIcon({ size = "22", className, }) {
|
|
17307
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 22 22", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M8 17V17C8 16.0219 8.28951 15.0657 8.83205 14.2519L13.1679 7.74808C13.7105 6.93427 14 5.97808 14 5V5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
17308
|
+
}
|
|
17309
|
+
|
|
17252
17310
|
function FeeButton(_a) {
|
|
17253
17311
|
var { feeInUsd = "0", chipLabel = "Fee", className, tooltip } = _a, props = __rest$1(_a, ["feeInUsd", "chipLabel", "className", "tooltip"]);
|
|
17254
17312
|
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 +17359,68 @@ const darkTheme = {
|
|
|
17301
17359
|
"highlight-700": "#08A054",
|
|
17302
17360
|
};
|
|
17303
17361
|
|
|
17362
|
+
var createPlugin$2 = {};
|
|
17363
|
+
|
|
17364
|
+
var createPlugin$1 = {};
|
|
17365
|
+
|
|
17366
|
+
(function (exports) {
|
|
17367
|
+
Object.defineProperty(exports, "__esModule", {
|
|
17368
|
+
value: true
|
|
17369
|
+
});
|
|
17370
|
+
Object.defineProperty(exports, "default", {
|
|
17371
|
+
enumerable: true,
|
|
17372
|
+
get: function() {
|
|
17373
|
+
return _default;
|
|
17374
|
+
}
|
|
17375
|
+
});
|
|
17376
|
+
function createPlugin(plugin, config) {
|
|
17377
|
+
return {
|
|
17378
|
+
handler: plugin,
|
|
17379
|
+
config
|
|
17380
|
+
};
|
|
17381
|
+
}
|
|
17382
|
+
createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {
|
|
17383
|
+
const optionsFunction = function(options) {
|
|
17384
|
+
return {
|
|
17385
|
+
__options: options,
|
|
17386
|
+
handler: pluginFunction(options),
|
|
17387
|
+
config: configFunction(options)
|
|
17388
|
+
};
|
|
17389
|
+
};
|
|
17390
|
+
optionsFunction.__isOptionsFunction = true;
|
|
17391
|
+
// Expose plugin dependencies so that `object-hash` returns a different
|
|
17392
|
+
// value if anything here changes, to ensure a rebuild is triggered.
|
|
17393
|
+
optionsFunction.__pluginFunction = pluginFunction;
|
|
17394
|
+
optionsFunction.__configFunction = configFunction;
|
|
17395
|
+
return optionsFunction;
|
|
17396
|
+
};
|
|
17397
|
+
const _default = createPlugin;
|
|
17398
|
+
} (createPlugin$1));
|
|
17399
|
+
|
|
17400
|
+
(function (exports) {
|
|
17401
|
+
Object.defineProperty(exports, "__esModule", {
|
|
17402
|
+
value: true
|
|
17403
|
+
});
|
|
17404
|
+
Object.defineProperty(exports, "default", {
|
|
17405
|
+
enumerable: true,
|
|
17406
|
+
get: function() {
|
|
17407
|
+
return _default;
|
|
17408
|
+
}
|
|
17409
|
+
});
|
|
17410
|
+
const _createPlugin = /*#__PURE__*/ _interop_require_default(createPlugin$1);
|
|
17411
|
+
function _interop_require_default(obj) {
|
|
17412
|
+
return obj && obj.__esModule ? obj : {
|
|
17413
|
+
default: obj
|
|
17414
|
+
};
|
|
17415
|
+
}
|
|
17416
|
+
const _default = _createPlugin.default;
|
|
17417
|
+
} (createPlugin$2));
|
|
17418
|
+
|
|
17419
|
+
let createPlugin = createPlugin$2;
|
|
17420
|
+
var plugin = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
|
|
17421
|
+
|
|
17422
|
+
var plugin$1 = /*@__PURE__*/getDefaultExportFromCjs(plugin);
|
|
17423
|
+
|
|
17304
17424
|
const spacing$1 = {
|
|
17305
17425
|
"squid-xxs": "0.3125rem", // 5px
|
|
17306
17426
|
"squid-xs": "0.625rem", // 10px
|
|
@@ -17615,7 +17735,27 @@ const baseTailwindConfig = {
|
|
|
17615
17735
|
}, {})),
|
|
17616
17736
|
},
|
|
17617
17737
|
},
|
|
17618
|
-
plugins: [
|
|
17738
|
+
plugins: [
|
|
17739
|
+
// custom classes available for anyone extending this config
|
|
17740
|
+
plugin$1(({ addUtilities }) => {
|
|
17741
|
+
addUtilities({
|
|
17742
|
+
".focus-visible-within-outline:has(:focus-visible)": {
|
|
17743
|
+
"outline-style": "solid",
|
|
17744
|
+
"outline-width": "2px",
|
|
17745
|
+
"outline-color": `var(${themeTypesKeys["royal-500"].cssVariable})`,
|
|
17746
|
+
},
|
|
17747
|
+
".scrollbar-hidden": {
|
|
17748
|
+
scrollbarWidth: "none",
|
|
17749
|
+
},
|
|
17750
|
+
".highlight-adjacent:has(button:hover)>button:first-child": {
|
|
17751
|
+
backgroundColor: `var(${themeTypesKeys["material-light-thin"].cssVariable})`,
|
|
17752
|
+
},
|
|
17753
|
+
".highlight-adjacent:has(*:hover) .hide-on-parent-hover": {
|
|
17754
|
+
opacity: "0",
|
|
17755
|
+
},
|
|
17756
|
+
});
|
|
17757
|
+
}),
|
|
17758
|
+
],
|
|
17619
17759
|
};
|
|
17620
17760
|
|
|
17621
17761
|
function StopsButton(_a) {
|
|
@@ -17665,431 +17805,89 @@ function DetailsToolbar({ errorMessage, helpButton, isLoading, isEmpty, flipButt
|
|
|
17665
17805
|
"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
17806
|
}
|
|
17667
17807
|
|
|
17668
|
-
|
|
17669
|
-
|
|
17670
|
-
|
|
17671
|
-
|
|
17672
|
-
|
|
17673
|
-
|
|
17674
|
-
|
|
17675
|
-
|
|
17676
|
-
|
|
17677
|
-
|
|
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
|
-
};
|
|
17808
|
+
const borderRadiusClassMap = {
|
|
17809
|
+
sm: "tw-rounded-squid-s",
|
|
17810
|
+
lg: "tw-rounded-squid-m",
|
|
17811
|
+
};
|
|
17812
|
+
function Menu(_a) {
|
|
17813
|
+
var { children, containerClassName, contentClassName, rounded = "lg", menuRef, contentWrapperProps } = _a, props = __rest$1(_a, ["children", "containerClassName", "contentClassName", "rounded", "menuRef", "contentWrapperProps"]);
|
|
17814
|
+
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,
|
|
17815
|
+
// :before element to create a backdrop
|
|
17816
|
+
// Not applied to the div itself because the backdrop-filter spec does not apply nested backdrop filters
|
|
17817
|
+
"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]) })] }) })));
|
|
17765
17818
|
}
|
|
17766
17819
|
|
|
17767
|
-
|
|
17768
|
-
|
|
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;
|
|
17820
|
+
function DropdownMenu({ dropdownRef, className, menuRef, isHidden = false, listClassName, containerClassName, children, contentWrapperProps, menuContentClassName, }) {
|
|
17821
|
+
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 })) }) }));
|
|
17819
17822
|
}
|
|
17820
17823
|
|
|
17821
|
-
function
|
|
17822
|
-
|
|
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
|
-
};
|
|
17824
|
+
function InfoBox({ title, description, icon }) {
|
|
17825
|
+
return (jsxRuntime.jsxs("div", { className: "tw-align-self-stretch tw-flex tw-flex-col tw-items-center tw-gap-squid-xs tw-px-squid-m tw-pb-squid-l tw-pt-squid-xs tw-text-royal-400", children: [icon, jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xxs tw-text-center", children: [jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[9px]", children: title }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: description })] })] }));
|
|
17841
17826
|
}
|
|
17842
17827
|
|
|
17843
|
-
const
|
|
17844
|
-
|
|
17845
|
-
|
|
17846
|
-
|
|
17847
|
-
|
|
17848
|
-
|
|
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
|
-
};
|
|
17828
|
+
const modalWidthClassMap = {
|
|
17829
|
+
large: "mobile-lg:tw-w-modal-large",
|
|
17830
|
+
"extra-large": "mobile-lg:tw-w-modal-extra-large",
|
|
17831
|
+
};
|
|
17832
|
+
function Modal({ children, className, onBackdropClick, isOpen: _isOpen = true, maxHeight = false, width = "large", }) {
|
|
17833
|
+
const [isOpen, setIsOpen] = React$1.useState(_isOpen);
|
|
17861
17834
|
React$1.useEffect(() => {
|
|
17862
|
-
if (
|
|
17863
|
-
|
|
17864
|
-
|
|
17835
|
+
if (_isOpen)
|
|
17836
|
+
return setIsOpen(true);
|
|
17837
|
+
const timeoutId = setTimeout(() => {
|
|
17838
|
+
setIsOpen(false);
|
|
17839
|
+
}, ANIMATION_DURATIONS.HIDE_MODAL);
|
|
17865
17840
|
return () => {
|
|
17866
|
-
|
|
17841
|
+
clearTimeout(timeoutId);
|
|
17867
17842
|
};
|
|
17868
|
-
}, [
|
|
17869
|
-
return
|
|
17870
|
-
|
|
17871
|
-
|
|
17872
|
-
|
|
17873
|
-
|
|
17874
|
-
|
|
17875
|
-
|
|
17876
|
-
}
|
|
17877
|
-
|
|
17878
|
-
|
|
17879
|
-
|
|
17880
|
-
}
|
|
17881
|
-
|
|
17882
|
-
|
|
17883
|
-
|
|
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 })] }));
|
|
17843
|
+
}, [_isOpen]);
|
|
17844
|
+
return (
|
|
17845
|
+
// modal container (backdrop)
|
|
17846
|
+
isOpen && (jsxRuntime.jsx("div", { onClick: onBackdropClick
|
|
17847
|
+
? (event) => {
|
|
17848
|
+
if (event.target === event.currentTarget) {
|
|
17849
|
+
onBackdropClick();
|
|
17850
|
+
}
|
|
17851
|
+
}
|
|
17852
|
+
: undefined, style: {
|
|
17853
|
+
[CSS_VARS.BLUR_IN_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
|
|
17854
|
+
[CSS_VARS.BLUR_OUT_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
|
|
17855
|
+
}, className: cn("tw-absolute tw-inset-0 tw-z-40 tw-flex tw-items-start tw-justify-center tw-px-squid-xs tw-py-squid-xl tw-pb-squid-m", _isOpen ? "tw-animate-blur-in" : "tw-animate-blur-out"), children: jsxRuntime.jsx("div", { style: {
|
|
17856
|
+
[CSS_VARS.SLIDE_TO_TOP_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
|
|
17857
|
+
[CSS_VARS.SLIDE_TO_BOTTOM_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
|
|
17858
|
+
}, className: cn("tw-relative tw-flex tw-max-h-modal-compact tw-max-w-full tw-flex-col tw-items-start tw-justify-end tw-gap-squid-xxs tw-self-end mobile-xs:tw-w-modal-compact mobile-lg:tw-max-h-modal-large", className, _isOpen ? "tw-animate-slide-to-top" : "tw-animate-slide-to-bottom", maxHeight && "tw-h-full", modalWidthClassMap[width]), children: children }) })));
|
|
17998
17859
|
}
|
|
17999
17860
|
|
|
18000
|
-
const
|
|
18001
|
-
|
|
18002
|
-
|
|
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",
|
|
17861
|
+
const borderTypeClassMap = {
|
|
17862
|
+
border: "tw-border tw-border-material-light-thin",
|
|
17863
|
+
outline: "tw-outline tw-outline-1 -tw-outline-offset-[1px] tw-outline-material-light-thin",
|
|
18007
17864
|
};
|
|
18008
|
-
function
|
|
18009
|
-
|
|
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] })));
|
|
17865
|
+
function ModalContent(_a) {
|
|
17866
|
+
var { children, addGap = false, paddingY = false, borderType = "border", className } = _a, props = __rest$1(_a, ["children", "addGap", "paddingY", "borderType", "className"]);
|
|
17867
|
+
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-flex tw-h-full tw-max-h-[445px] tw-w-full tw-flex-col tw-self-stretch tw-rounded-squid-l tw-bg-grey-800 tw-text-grey-300 mobile-sm-height:tw-max-h-[535px]", addGap && "tw-gap-squid-xxs tw-pt-squid-xxs", borderTypeClassMap[borderType], paddingY && "tw-py-squid-xxs", className), children: children })));
|
|
18020
17868
|
}
|
|
18021
|
-
|
|
18022
|
-
|
|
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))) }))] }))) })] })) }));
|
|
17869
|
+
function ModalContentDivider() {
|
|
17870
|
+
return (jsxRuntime.jsx("svg", { width: "100%", height: "11", viewBox: "0 0 400 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("rect", { x: "1", y: "5", width: "398", height: "1", fill: "currentColor" }) }));
|
|
18035
17871
|
}
|
|
18036
17872
|
|
|
18037
|
-
|
|
18038
|
-
|
|
18039
|
-
|
|
18040
|
-
|
|
18041
|
-
|
|
18042
|
-
|
|
18043
|
-
|
|
18044
|
-
|
|
18045
|
-
|
|
18046
|
-
|
|
18047
|
-
|
|
18048
|
-
|
|
18049
|
-
|
|
18050
|
-
|
|
18051
|
-
|
|
18052
|
-
|
|
18053
|
-
|
|
18054
|
-
|
|
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 })] }) }));
|
|
17873
|
+
function NavigationBar(_a) {
|
|
17874
|
+
var { title, displayBackButton = false, logoUrl, transparent = false, displayButtonShadows = false, onBackButtonClick, actions, isLoading = false } = _a, props = __rest$1(_a, ["title", "displayBackButton", "logoUrl", "transparent", "displayButtonShadows", "onBackButtonClick", "actions", "isLoading"]);
|
|
17875
|
+
return (jsxRuntime.jsxs("nav", Object.assign({}, props, { className: cn("tw-flex tw-max-h-[120px] tw-flex-row-reverse tw-text-grey-300 mobile-xs-height:tw-flex-col", transparent ? "tw-bg-transparent" : "tw-bg-grey-900", props.className), children: [jsxRuntime.jsxs("div", { className: cn("tw-flex tw-h-squid-xxl tw-items-center tw-justify-end tw-gap-x-squid-xs tw-pl-squid-m", displayBackButton
|
|
17876
|
+
? "tw-w-full tw-pr-squid-xs mobile-xs-height:tw-pr-squid-m"
|
|
17877
|
+
: "tw-pr-squid-m mobile-lg:tw-pl-squid-l", !title && "tw-w-full mobile-xs-height:tw-w-[unset]"), children: [displayBackButton ? (jsxRuntime.jsx(Button$1, { className: displayButtonShadows
|
|
17878
|
+
? "group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2"
|
|
17879
|
+
: undefined, variant: "tertiary", size: "md", isLoading: isLoading, icon: jsxRuntime.jsx(ArrowLeftIcon, {}), onClick: onBackButtonClick })) : null, logoUrl ? (jsxRuntime.jsx("img", { src: logoUrl, className: "tw-h-squid-xl tw-min-w-squid-xl" })) : null, jsxRuntime.jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end tw-gap-squid-xxs", children: actions === null || actions === void 0 ? void 0 : actions.map((action) => {
|
|
17880
|
+
var _a;
|
|
17881
|
+
return (jsxRuntime.jsx(Tooltip, Object.assign({}, action.tooltip, { tooltipContent: isLoading ? undefined : (_a = action.tooltip) === null || _a === void 0 ? void 0 : _a.tooltipContent, childrenClassName: "tw-rounded-squid-m", containerClassName: "tw-rounded-squid-m", tooltipWidth: "max", children: jsxRuntime.jsx(Button$1, { size: "md", variant: "tertiary", isLoading: isLoading, label: typeof action.labelOrIcon === "string"
|
|
17882
|
+
? action.labelOrIcon
|
|
17883
|
+
: undefined, className: "tw-text-grey-300", icon: typeof action.labelOrIcon === "string"
|
|
17884
|
+
? null
|
|
17885
|
+
: action.labelOrIcon, onClick: action.onClick, chip: action.chip }) }), action.id));
|
|
17886
|
+
}) })] }), title ? (jsxRuntime.jsx("div", { className: cn("tw-h-squid-xxl tw-w-full tw-items-center tw-px-squid-m tw-py-squid-xxs mobile-lg:tw-px-squid-l",
|
|
17887
|
+
// hide the title on small screens when back button is displayed, so it's positioned on the left
|
|
17888
|
+
displayBackButton
|
|
17889
|
+
? "tw-hidden mobile-xs-height:tw-flex"
|
|
17890
|
+
: "tw-flex"), children: jsxRuntime.jsx(HeadingText, { size: "small", children: title }) })) : null] })));
|
|
18093
17891
|
}
|
|
18094
17892
|
|
|
18095
17893
|
function PipeSeparator(_a) {
|
|
@@ -18097,275 +17895,18 @@ function PipeSeparator(_a) {
|
|
|
18097
17895
|
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-h-[0.8em] tw-w-[2px] tw-rounded-full tw-bg-[currentColor]", className) })));
|
|
18098
17896
|
}
|
|
18099
17897
|
|
|
18100
|
-
function
|
|
18101
|
-
return (jsxRuntime.
|
|
18102
|
-
|
|
18103
|
-
|
|
18104
|
-
|
|
18105
|
-
}
|
|
18106
|
-
|
|
18107
|
-
|
|
18108
|
-
|
|
18109
|
-
|
|
18110
|
-
|
|
18111
|
-
|
|
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
|
-
const borderRadiusClassMap = {
|
|
18276
|
-
sm: "tw-rounded-squid-s",
|
|
18277
|
-
lg: "tw-rounded-squid-m",
|
|
18278
|
-
};
|
|
18279
|
-
function Menu(_a) {
|
|
18280
|
-
var { children, containerClassName, contentClassName, rounded = "lg", menuRef, contentWrapperClassName } = _a, props = __rest$1(_a, ["children", "containerClassName", "contentClassName", "rounded", "menuRef", "contentWrapperClassName"]);
|
|
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 tw-backdrop-blur/20 tw-backdrop-saturate-150 group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2", borderRadiusClassMap[rounded], contentClassName), children: [typeof children === "string" ? (jsxRuntime.jsx(CaptionText, { className: "tw-z-20 tw-self-stretch !tw-leading-[10px]", children: children })) : (jsxRuntime.jsx("div", { className: cn("tw-z-20 tw-max-w-full tw-text-caption", contentWrapperClassName), 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
|
-
}
|
|
18283
|
-
|
|
18284
|
-
function DropdownMenu({ dropdownRef, items, className, menuRef, isHidden = false, listClassName, }) {
|
|
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-overflow-auto tw-px-0 tw-py-squid-xxs", listClassName), children: items.map((item) => (jsxRuntime.jsx(DropdownMenuItem, Object.assign({}, item), item.label))) })) }) }));
|
|
18286
|
-
}
|
|
18287
|
-
|
|
18288
|
-
function InfoBox({ title, description, icon }) {
|
|
18289
|
-
return (jsxRuntime.jsxs("div", { className: "tw-align-self-stretch tw-flex tw-flex-col tw-items-center tw-gap-squid-xs tw-px-squid-m tw-pb-squid-l tw-pt-squid-xs tw-text-royal-400", children: [icon, jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xxs tw-text-center", children: [jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[9px]", children: title }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: description })] })] }));
|
|
18290
|
-
}
|
|
18291
|
-
|
|
18292
|
-
const modalWidthClassMap = {
|
|
18293
|
-
large: "mobile-lg:tw-w-modal-large",
|
|
18294
|
-
"extra-large": "mobile-lg:tw-w-modal-extra-large",
|
|
18295
|
-
};
|
|
18296
|
-
function Modal({ children, className, onBackdropClick, isOpen: _isOpen = true, maxHeight = false, width = "large", }) {
|
|
18297
|
-
const [isOpen, setIsOpen] = React$1.useState(_isOpen);
|
|
18298
|
-
React$1.useEffect(() => {
|
|
18299
|
-
if (_isOpen)
|
|
18300
|
-
return setIsOpen(true);
|
|
18301
|
-
const timeoutId = setTimeout(() => {
|
|
18302
|
-
setIsOpen(false);
|
|
18303
|
-
}, ANIMATION_DURATIONS.HIDE_MODAL);
|
|
18304
|
-
return () => {
|
|
18305
|
-
clearTimeout(timeoutId);
|
|
18306
|
-
};
|
|
18307
|
-
}, [_isOpen]);
|
|
18308
|
-
return (
|
|
18309
|
-
// modal container (backdrop)
|
|
18310
|
-
isOpen && (jsxRuntime.jsx("div", { onClick: onBackdropClick
|
|
18311
|
-
? (event) => {
|
|
18312
|
-
if (event.target === event.currentTarget) {
|
|
18313
|
-
onBackdropClick();
|
|
18314
|
-
}
|
|
18315
|
-
}
|
|
18316
|
-
: undefined, style: {
|
|
18317
|
-
[CSS_VARS.BLUR_IN_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
|
|
18318
|
-
[CSS_VARS.BLUR_OUT_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
|
|
18319
|
-
}, className: cn("tw-absolute tw-inset-0 tw-z-40 tw-flex tw-items-start tw-justify-center tw-px-squid-xs tw-py-squid-xl tw-pb-squid-m", _isOpen ? "tw-animate-blur-in" : "tw-animate-blur-out"), children: jsxRuntime.jsx("div", { style: {
|
|
18320
|
-
[CSS_VARS.SLIDE_TO_TOP_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
|
|
18321
|
-
[CSS_VARS.SLIDE_TO_BOTTOM_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
|
|
18322
|
-
}, className: cn("tw-relative tw-flex tw-max-h-modal-compact tw-max-w-full tw-flex-col tw-items-start tw-justify-end tw-gap-squid-xxs tw-self-end mobile-xs:tw-w-modal-compact mobile-lg:tw-max-h-modal-large", className, _isOpen ? "tw-animate-slide-to-top" : "tw-animate-slide-to-bottom", maxHeight && "tw-h-full", modalWidthClassMap[width]), children: children }) })));
|
|
18323
|
-
}
|
|
18324
|
-
|
|
18325
|
-
const borderTypeClassMap = {
|
|
18326
|
-
border: "tw-border tw-border-material-light-thin",
|
|
18327
|
-
outline: "tw-outline tw-outline-1 -tw-outline-offset-[1px] tw-outline-material-light-thin",
|
|
18328
|
-
};
|
|
18329
|
-
function ModalContent(_a) {
|
|
18330
|
-
var { children, addGap = false, paddingY = false, borderType = "border", className } = _a, props = __rest$1(_a, ["children", "addGap", "paddingY", "borderType", "className"]);
|
|
18331
|
-
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-flex tw-h-full tw-max-h-[445px] tw-w-full tw-flex-col tw-self-stretch tw-rounded-squid-l tw-bg-grey-800 tw-text-grey-300 mobile-sm-height:tw-max-h-[535px]", addGap && "tw-gap-squid-xxs tw-pt-squid-xxs", borderTypeClassMap[borderType], paddingY && "tw-py-squid-xxs", className), children: children })));
|
|
18332
|
-
}
|
|
18333
|
-
function ModalContentDivider() {
|
|
18334
|
-
return (jsxRuntime.jsx("svg", { width: "100%", height: "11", viewBox: "0 0 400 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("rect", { x: "1", y: "5", width: "398", height: "1", fill: "currentColor" }) }));
|
|
18335
|
-
}
|
|
18336
|
-
|
|
18337
|
-
function NavigationBar(_a) {
|
|
18338
|
-
var { title, displayBackButton = false, logoUrl, transparent = false, displayButtonShadows = false, onBackButtonClick, actions, isLoading = false } = _a, props = __rest$1(_a, ["title", "displayBackButton", "logoUrl", "transparent", "displayButtonShadows", "onBackButtonClick", "actions", "isLoading"]);
|
|
18339
|
-
return (jsxRuntime.jsxs("nav", Object.assign({}, props, { className: cn("tw-flex tw-max-h-[120px] tw-flex-row-reverse tw-text-grey-300 mobile-xs-height:tw-flex-col", transparent ? "tw-bg-transparent" : "tw-bg-grey-900", props.className), children: [jsxRuntime.jsxs("div", { className: cn("tw-flex tw-h-squid-xxl tw-items-center tw-justify-end tw-gap-x-squid-xs tw-pl-squid-m", displayBackButton
|
|
18340
|
-
? "tw-w-full tw-pr-squid-xs mobile-xs-height:tw-pr-squid-m"
|
|
18341
|
-
: "tw-pr-squid-m mobile-lg:tw-pl-squid-l", !title && "tw-w-full mobile-xs-height:tw-w-[unset]"), children: [displayBackButton ? (jsxRuntime.jsx(Button$1, { className: displayButtonShadows
|
|
18342
|
-
? "group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2"
|
|
18343
|
-
: undefined, variant: "tertiary", size: "md", isLoading: isLoading, icon: jsxRuntime.jsx(ArrowLeftIcon, {}), onClick: onBackButtonClick })) : null, logoUrl ? (jsxRuntime.jsx("img", { src: logoUrl, className: "tw-h-squid-xl tw-min-w-squid-xl" })) : null, jsxRuntime.jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end tw-gap-squid-xxs", children: actions === null || actions === void 0 ? void 0 : actions.map((action) => {
|
|
18344
|
-
var _a;
|
|
18345
|
-
return (jsxRuntime.jsx(Tooltip, Object.assign({}, action.tooltip, { tooltipContent: isLoading ? undefined : (_a = action.tooltip) === null || _a === void 0 ? void 0 : _a.tooltipContent, childrenClassName: "tw-rounded-squid-m", containerClassName: "tw-rounded-squid-m", tooltipWidth: "max", children: jsxRuntime.jsx(Button$1, { size: "md", variant: "tertiary", isLoading: isLoading, label: typeof action.labelOrIcon === "string"
|
|
18346
|
-
? action.labelOrIcon
|
|
18347
|
-
: undefined, className: "tw-text-grey-300", icon: typeof action.labelOrIcon === "string"
|
|
18348
|
-
? null
|
|
18349
|
-
: action.labelOrIcon, onClick: action.onClick, chip: action.chip }) }), action.id));
|
|
18350
|
-
}) })] }), title ? (jsxRuntime.jsx("div", { className: cn("tw-h-squid-xxl tw-w-full tw-items-center tw-px-squid-m tw-py-squid-xxs mobile-lg:tw-px-squid-l",
|
|
18351
|
-
// hide the title on small screens when back button is displayed, so it's positioned on the left
|
|
18352
|
-
displayBackButton
|
|
18353
|
-
? "tw-hidden mobile-xs-height:tw-flex"
|
|
18354
|
-
: "tw-flex"), children: jsxRuntime.jsx(HeadingText, { size: "small", children: title }) })) : null] })));
|
|
18355
|
-
}
|
|
18356
|
-
|
|
18357
|
-
function CollapsibleMenu({ children, menuRef, isOpen, transitionDuration, size, className, }) {
|
|
18358
|
-
return (jsxRuntime.jsx("aside", { style: Object.assign({ transitionDuration, transitionTimingFunction: isOpen
|
|
18359
|
-
? "cubic-bezier(0.4, 1.3, 0.4, 1)"
|
|
18360
|
-
: undefined, [CSS_VARS.COLLAPSIBLE_MENU_OPEN_WIDTH]: size.open.width, [CSS_VARS.COLLAPSIBLE_MENU_OPEN_HEIGHT]: size.open.height, [CSS_VARS.COLLAPSIBLE_MENU_CLOSED_WIDTH]: size.closed.width, [CSS_VARS.COLLAPSIBLE_MENU_CLOSED_HEIGHT]: size.closed.height }, (isOpen
|
|
18361
|
-
? {
|
|
18362
|
-
width: `var(${CSS_VARS.COLLAPSIBLE_MENU_OPEN_WIDTH})`,
|
|
18363
|
-
height: `var(${CSS_VARS.COLLAPSIBLE_MENU_OPEN_HEIGHT})`,
|
|
18364
|
-
}
|
|
18365
|
-
: {
|
|
18366
|
-
width: `var(${CSS_VARS.COLLAPSIBLE_MENU_CLOSED_WIDTH})`,
|
|
18367
|
-
height: `var(${CSS_VARS.COLLAPSIBLE_MENU_CLOSED_HEIGHT})`,
|
|
18368
|
-
})), className: cn("tw-fixed tw-z-40 tw-flex tw-flex-col tw-overflow-hidden tw-bg-grey-900 tw-text-grey-200 tw-shadow-elevation-light-3 tw-outline-material-light-thin", className), ref: menuRef, children: children }));
|
|
17898
|
+
function CollapsibleMenu({ children, menuRef, isOpen, transitionDuration, size, className, }) {
|
|
17899
|
+
return (jsxRuntime.jsx("aside", { style: Object.assign({ transitionDuration, transitionTimingFunction: isOpen
|
|
17900
|
+
? "cubic-bezier(0.4, 1.3, 0.4, 1)"
|
|
17901
|
+
: undefined, [CSS_VARS.COLLAPSIBLE_MENU_OPEN_WIDTH]: size.open.width, [CSS_VARS.COLLAPSIBLE_MENU_OPEN_HEIGHT]: size.open.height, [CSS_VARS.COLLAPSIBLE_MENU_CLOSED_WIDTH]: size.closed.width, [CSS_VARS.COLLAPSIBLE_MENU_CLOSED_HEIGHT]: size.closed.height }, (isOpen
|
|
17902
|
+
? {
|
|
17903
|
+
width: `var(${CSS_VARS.COLLAPSIBLE_MENU_OPEN_WIDTH})`,
|
|
17904
|
+
height: `var(${CSS_VARS.COLLAPSIBLE_MENU_OPEN_HEIGHT})`,
|
|
17905
|
+
}
|
|
17906
|
+
: {
|
|
17907
|
+
width: `var(${CSS_VARS.COLLAPSIBLE_MENU_CLOSED_WIDTH})`,
|
|
17908
|
+
height: `var(${CSS_VARS.COLLAPSIBLE_MENU_CLOSED_HEIGHT})`,
|
|
17909
|
+
})), className: cn("tw-fixed tw-z-40 tw-flex tw-flex-col tw-overflow-hidden tw-bg-grey-900 tw-text-grey-200 tw-shadow-elevation-light-3 tw-outline-material-light-thin", className), ref: menuRef, children: children }));
|
|
18369
17910
|
}
|
|
18370
17911
|
|
|
18371
17912
|
const createStoreImpl = (createState) => {
|
|
@@ -18673,310 +18214,1012 @@ function requireUseSyncExternalStoreShim_development () {
|
|
|
18673
18214
|
return useSyncExternalStoreShim_development;
|
|
18674
18215
|
}
|
|
18675
18216
|
|
|
18676
|
-
var hasRequiredShim;
|
|
18677
|
-
|
|
18678
|
-
function requireShim () {
|
|
18679
|
-
if (hasRequiredShim) return shim.exports;
|
|
18680
|
-
hasRequiredShim = 1;
|
|
18681
|
-
|
|
18682
|
-
if (process.env.NODE_ENV === 'production') {
|
|
18683
|
-
shim.exports = requireUseSyncExternalStoreShim_production_min();
|
|
18684
|
-
} else {
|
|
18685
|
-
shim.exports = requireUseSyncExternalStoreShim_development();
|
|
18686
|
-
}
|
|
18687
|
-
return shim.exports;
|
|
18217
|
+
var hasRequiredShim;
|
|
18218
|
+
|
|
18219
|
+
function requireShim () {
|
|
18220
|
+
if (hasRequiredShim) return shim.exports;
|
|
18221
|
+
hasRequiredShim = 1;
|
|
18222
|
+
|
|
18223
|
+
if (process.env.NODE_ENV === 'production') {
|
|
18224
|
+
shim.exports = requireUseSyncExternalStoreShim_production_min();
|
|
18225
|
+
} else {
|
|
18226
|
+
shim.exports = requireUseSyncExternalStoreShim_development();
|
|
18227
|
+
}
|
|
18228
|
+
return shim.exports;
|
|
18229
|
+
}
|
|
18230
|
+
|
|
18231
|
+
/**
|
|
18232
|
+
* @license React
|
|
18233
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
18234
|
+
*
|
|
18235
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
18236
|
+
*
|
|
18237
|
+
* This source code is licensed under the MIT license found in the
|
|
18238
|
+
* LICENSE file in the root directory of this source tree.
|
|
18239
|
+
*/
|
|
18240
|
+
|
|
18241
|
+
var hasRequiredWithSelector_production_min;
|
|
18242
|
+
|
|
18243
|
+
function requireWithSelector_production_min () {
|
|
18244
|
+
if (hasRequiredWithSelector_production_min) return withSelector_production_min;
|
|
18245
|
+
hasRequiredWithSelector_production_min = 1;
|
|
18246
|
+
var h=React$1,n=requireShim();function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q="function"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;
|
|
18247
|
+
withSelector_production_min.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f;}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return [function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);
|
|
18248
|
+
u(function(){f.hasValue=!0;f.value=d;},[d]);w(d);return d};
|
|
18249
|
+
return withSelector_production_min;
|
|
18250
|
+
}
|
|
18251
|
+
|
|
18252
|
+
var withSelector_development = {};
|
|
18253
|
+
|
|
18254
|
+
/**
|
|
18255
|
+
* @license React
|
|
18256
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
18257
|
+
*
|
|
18258
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
18259
|
+
*
|
|
18260
|
+
* This source code is licensed under the MIT license found in the
|
|
18261
|
+
* LICENSE file in the root directory of this source tree.
|
|
18262
|
+
*/
|
|
18263
|
+
|
|
18264
|
+
var hasRequiredWithSelector_development;
|
|
18265
|
+
|
|
18266
|
+
function requireWithSelector_development () {
|
|
18267
|
+
if (hasRequiredWithSelector_development) return withSelector_development;
|
|
18268
|
+
hasRequiredWithSelector_development = 1;
|
|
18269
|
+
|
|
18270
|
+
if (process.env.NODE_ENV !== "production") {
|
|
18271
|
+
(function() {
|
|
18272
|
+
|
|
18273
|
+
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
|
18274
|
+
if (
|
|
18275
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
|
18276
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
|
|
18277
|
+
'function'
|
|
18278
|
+
) {
|
|
18279
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
18280
|
+
}
|
|
18281
|
+
var React = React$1;
|
|
18282
|
+
var shim = requireShim();
|
|
18283
|
+
|
|
18284
|
+
/**
|
|
18285
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
18286
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
18287
|
+
*/
|
|
18288
|
+
function is(x, y) {
|
|
18289
|
+
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
|
|
18290
|
+
;
|
|
18291
|
+
}
|
|
18292
|
+
|
|
18293
|
+
var objectIs = typeof Object.is === 'function' ? Object.is : is;
|
|
18294
|
+
|
|
18295
|
+
var useSyncExternalStore = shim.useSyncExternalStore;
|
|
18296
|
+
|
|
18297
|
+
// for CommonJS interop.
|
|
18298
|
+
|
|
18299
|
+
var useRef = React.useRef,
|
|
18300
|
+
useEffect = React.useEffect,
|
|
18301
|
+
useMemo = React.useMemo,
|
|
18302
|
+
useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.
|
|
18303
|
+
|
|
18304
|
+
function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
18305
|
+
// Use this to track the rendered snapshot.
|
|
18306
|
+
var instRef = useRef(null);
|
|
18307
|
+
var inst;
|
|
18308
|
+
|
|
18309
|
+
if (instRef.current === null) {
|
|
18310
|
+
inst = {
|
|
18311
|
+
hasValue: false,
|
|
18312
|
+
value: null
|
|
18313
|
+
};
|
|
18314
|
+
instRef.current = inst;
|
|
18315
|
+
} else {
|
|
18316
|
+
inst = instRef.current;
|
|
18317
|
+
}
|
|
18318
|
+
|
|
18319
|
+
var _useMemo = useMemo(function () {
|
|
18320
|
+
// Track the memoized state using closure variables that are local to this
|
|
18321
|
+
// memoized instance of a getSnapshot function. Intentionally not using a
|
|
18322
|
+
// useRef hook, because that state would be shared across all concurrent
|
|
18323
|
+
// copies of the hook/component.
|
|
18324
|
+
var hasMemo = false;
|
|
18325
|
+
var memoizedSnapshot;
|
|
18326
|
+
var memoizedSelection;
|
|
18327
|
+
|
|
18328
|
+
var memoizedSelector = function (nextSnapshot) {
|
|
18329
|
+
if (!hasMemo) {
|
|
18330
|
+
// The first time the hook is called, there is no memoized result.
|
|
18331
|
+
hasMemo = true;
|
|
18332
|
+
memoizedSnapshot = nextSnapshot;
|
|
18333
|
+
|
|
18334
|
+
var _nextSelection = selector(nextSnapshot);
|
|
18335
|
+
|
|
18336
|
+
if (isEqual !== undefined) {
|
|
18337
|
+
// Even if the selector has changed, the currently rendered selection
|
|
18338
|
+
// may be equal to the new selection. We should attempt to reuse the
|
|
18339
|
+
// current value if possible, to preserve downstream memoizations.
|
|
18340
|
+
if (inst.hasValue) {
|
|
18341
|
+
var currentSelection = inst.value;
|
|
18342
|
+
|
|
18343
|
+
if (isEqual(currentSelection, _nextSelection)) {
|
|
18344
|
+
memoizedSelection = currentSelection;
|
|
18345
|
+
return currentSelection;
|
|
18346
|
+
}
|
|
18347
|
+
}
|
|
18348
|
+
}
|
|
18349
|
+
|
|
18350
|
+
memoizedSelection = _nextSelection;
|
|
18351
|
+
return _nextSelection;
|
|
18352
|
+
} // We may be able to reuse the previous invocation's result.
|
|
18353
|
+
|
|
18354
|
+
|
|
18355
|
+
// We may be able to reuse the previous invocation's result.
|
|
18356
|
+
var prevSnapshot = memoizedSnapshot;
|
|
18357
|
+
var prevSelection = memoizedSelection;
|
|
18358
|
+
|
|
18359
|
+
if (objectIs(prevSnapshot, nextSnapshot)) {
|
|
18360
|
+
// The snapshot is the same as last time. Reuse the previous selection.
|
|
18361
|
+
return prevSelection;
|
|
18362
|
+
} // The snapshot has changed, so we need to compute a new selection.
|
|
18363
|
+
|
|
18364
|
+
|
|
18365
|
+
// The snapshot has changed, so we need to compute a new selection.
|
|
18366
|
+
var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data
|
|
18367
|
+
// has changed. If it hasn't, return the previous selection. That signals
|
|
18368
|
+
// to React that the selections are conceptually equal, and we can bail
|
|
18369
|
+
// out of rendering.
|
|
18370
|
+
|
|
18371
|
+
// If a custom isEqual function is provided, use that to check if the data
|
|
18372
|
+
// has changed. If it hasn't, return the previous selection. That signals
|
|
18373
|
+
// to React that the selections are conceptually equal, and we can bail
|
|
18374
|
+
// out of rendering.
|
|
18375
|
+
if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {
|
|
18376
|
+
return prevSelection;
|
|
18377
|
+
}
|
|
18378
|
+
|
|
18379
|
+
memoizedSnapshot = nextSnapshot;
|
|
18380
|
+
memoizedSelection = nextSelection;
|
|
18381
|
+
return nextSelection;
|
|
18382
|
+
}; // Assigning this to a constant so that Flow knows it can't change.
|
|
18383
|
+
|
|
18384
|
+
|
|
18385
|
+
// Assigning this to a constant so that Flow knows it can't change.
|
|
18386
|
+
var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;
|
|
18387
|
+
|
|
18388
|
+
var getSnapshotWithSelector = function () {
|
|
18389
|
+
return memoizedSelector(getSnapshot());
|
|
18390
|
+
};
|
|
18391
|
+
|
|
18392
|
+
var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {
|
|
18393
|
+
return memoizedSelector(maybeGetServerSnapshot());
|
|
18394
|
+
};
|
|
18395
|
+
return [getSnapshotWithSelector, getServerSnapshotWithSelector];
|
|
18396
|
+
}, [getSnapshot, getServerSnapshot, selector, isEqual]),
|
|
18397
|
+
getSelection = _useMemo[0],
|
|
18398
|
+
getServerSelection = _useMemo[1];
|
|
18399
|
+
|
|
18400
|
+
var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);
|
|
18401
|
+
useEffect(function () {
|
|
18402
|
+
inst.hasValue = true;
|
|
18403
|
+
inst.value = value;
|
|
18404
|
+
}, [value]);
|
|
18405
|
+
useDebugValue(value);
|
|
18406
|
+
return value;
|
|
18407
|
+
}
|
|
18408
|
+
|
|
18409
|
+
withSelector_development.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;
|
|
18410
|
+
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
|
18411
|
+
if (
|
|
18412
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
|
18413
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
|
|
18414
|
+
'function'
|
|
18415
|
+
) {
|
|
18416
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
18417
|
+
}
|
|
18418
|
+
|
|
18419
|
+
})();
|
|
18420
|
+
}
|
|
18421
|
+
return withSelector_development;
|
|
18422
|
+
}
|
|
18423
|
+
|
|
18424
|
+
if (process.env.NODE_ENV === 'production') {
|
|
18425
|
+
withSelector.exports = requireWithSelector_production_min();
|
|
18426
|
+
} else {
|
|
18427
|
+
withSelector.exports = requireWithSelector_development();
|
|
18428
|
+
}
|
|
18429
|
+
|
|
18430
|
+
var withSelectorExports = withSelector.exports;
|
|
18431
|
+
var useSyncExternalStoreExports = /*@__PURE__*/getDefaultExportFromCjs(withSelectorExports);
|
|
18432
|
+
|
|
18433
|
+
const { useDebugValue } = React$1;
|
|
18434
|
+
const { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;
|
|
18435
|
+
let didWarnAboutEqualityFn = false;
|
|
18436
|
+
const identity = (arg) => arg;
|
|
18437
|
+
function useStore(api, selector = identity, equalityFn) {
|
|
18438
|
+
if ((undefined ? undefined.MODE : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
|
|
18439
|
+
console.warn(
|
|
18440
|
+
"[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"
|
|
18441
|
+
);
|
|
18442
|
+
didWarnAboutEqualityFn = true;
|
|
18443
|
+
}
|
|
18444
|
+
const slice = useSyncExternalStoreWithSelector(
|
|
18445
|
+
api.subscribe,
|
|
18446
|
+
api.getState,
|
|
18447
|
+
api.getServerState || api.getInitialState,
|
|
18448
|
+
selector,
|
|
18449
|
+
equalityFn
|
|
18450
|
+
);
|
|
18451
|
+
useDebugValue(slice);
|
|
18452
|
+
return slice;
|
|
18453
|
+
}
|
|
18454
|
+
const createImpl = (createState) => {
|
|
18455
|
+
if ((undefined ? undefined.MODE : void 0) !== "production" && typeof createState !== "function") {
|
|
18456
|
+
console.warn(
|
|
18457
|
+
"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
|
|
18458
|
+
);
|
|
18459
|
+
}
|
|
18460
|
+
const api = typeof createState === "function" ? createStore(createState) : createState;
|
|
18461
|
+
const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
|
|
18462
|
+
Object.assign(useBoundStore, api);
|
|
18463
|
+
return useBoundStore;
|
|
18464
|
+
};
|
|
18465
|
+
const create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
18466
|
+
|
|
18467
|
+
const useContainerStore = create(() => ({
|
|
18468
|
+
containerRef: undefined,
|
|
18469
|
+
}));
|
|
18470
|
+
|
|
18471
|
+
function ProductCard({ children }) {
|
|
18472
|
+
const containerRef = React$1.useRef(null);
|
|
18473
|
+
React$1.useEffect(() => {
|
|
18474
|
+
useContainerStore.setState({ containerRef });
|
|
18475
|
+
}, [containerRef]);
|
|
18476
|
+
return (jsxRuntime.jsx("div", { style: {
|
|
18477
|
+
width: `min(100vw, ${MEDIA_QUERIES.MOBILE_LG.value}px)`,
|
|
18478
|
+
}, 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 }) }));
|
|
18479
|
+
}
|
|
18480
|
+
function BorderedContainer({ children, className, }) {
|
|
18481
|
+
return (jsxRuntime.jsx("section", { className: cn("tw-border-t tw-border-t-material-light-thin", className), children: children }));
|
|
18482
|
+
}
|
|
18483
|
+
|
|
18484
|
+
function ProfileHeaderBackground() {
|
|
18485
|
+
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" })] }));
|
|
18486
|
+
}
|
|
18487
|
+
function HeaderBackgroundDecorationRow({ index }) {
|
|
18488
|
+
const logoWithImage = (jsxRuntime.jsx(LogoContainer, { children: jsxRuntime.jsx(SquidLogo, {}) }));
|
|
18489
|
+
const emptyLogo = jsxRuntime.jsx(LogoContainer, {});
|
|
18490
|
+
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] }));
|
|
18491
|
+
}
|
|
18492
|
+
function LogoContainer({ children }) {
|
|
18493
|
+
return (jsxRuntime.jsx("div", { className: "tw-flex tw-h-[60px] tw-w-[60px] tw-items-center tw-justify-center", children: children }));
|
|
18494
|
+
}
|
|
18495
|
+
|
|
18496
|
+
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, }) {
|
|
18497
|
+
var _a, _b, _c;
|
|
18498
|
+
const isWalletButtonInteractive = !isLoading && !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick);
|
|
18499
|
+
const WalletButtonTag = isWalletButtonInteractive ? "button" : "div";
|
|
18500
|
+
const isFetching = isFetchingProp || isLoading;
|
|
18501
|
+
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)
|
|
18502
|
+
? "tw-text-grey-300"
|
|
18503
|
+
: "tw-text-royal-400", children: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
|
|
18504
|
+
? walletButton === null || walletButton === void 0 ? void 0 : walletButton.address
|
|
18505
|
+
: (_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)
|
|
18506
|
+
? "tw-text-grey-600"
|
|
18507
|
+
: "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: {
|
|
18508
|
+
decimals: (_b = token === null || token === void 0 ? void 0 : token.decimals) !== null && _b !== void 0 ? _b : 18,
|
|
18509
|
+
symbol: (_c = token === null || token === void 0 ? void 0 : token.symbol) !== null && _c !== void 0 ? _c : "",
|
|
18510
|
+
price: tokenPrice,
|
|
18511
|
+
}, onAmountChange: (value) => {
|
|
18512
|
+
onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(value);
|
|
18513
|
+
}, balance: balance, criticalPriceImpactPercentage: criticalPriceImpactPercentage, error: error, formatIfVerySmall: {
|
|
18514
|
+
token: "0.001",
|
|
18515
|
+
usd: "0.01",
|
|
18516
|
+
}, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: !!token, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading })] }));
|
|
18517
|
+
}
|
|
18518
|
+
|
|
18519
|
+
function SwapProgressViewHeader({ title, description, }) {
|
|
18520
|
+
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 })] }));
|
|
18521
|
+
}
|
|
18522
|
+
|
|
18523
|
+
const SPACING = 10;
|
|
18524
|
+
function useDropdownMenu(props) {
|
|
18525
|
+
const { initialIsModalOpen, itemsContainerRef } = props !== null && props !== void 0 ? props : {};
|
|
18526
|
+
const [isDropdownOpen, setIsModalOpen] = React$1.useState(Boolean(initialIsModalOpen));
|
|
18527
|
+
const dropdownRef = React$1.useRef(null);
|
|
18528
|
+
const openDropdownButtonRef = React$1.useRef(null);
|
|
18529
|
+
React$1.useEffect(() => {
|
|
18530
|
+
const handleClickOutside = (event) => {
|
|
18531
|
+
// close modal if the user clicked outside of it
|
|
18532
|
+
var _a;
|
|
18533
|
+
if (dropdownRef.current &&
|
|
18534
|
+
event.target !== openDropdownButtonRef.current &&
|
|
18535
|
+
!dropdownRef.current.contains(event.target) &&
|
|
18536
|
+
!((_a = openDropdownButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
|
|
18537
|
+
setIsModalOpen(false);
|
|
18538
|
+
}
|
|
18539
|
+
};
|
|
18540
|
+
if (isDropdownOpen) {
|
|
18541
|
+
document.addEventListener("click", handleClickOutside);
|
|
18542
|
+
}
|
|
18543
|
+
return () => {
|
|
18544
|
+
document.removeEventListener("click", handleClickOutside);
|
|
18545
|
+
};
|
|
18546
|
+
}, [dropdownRef, isDropdownOpen]);
|
|
18547
|
+
const openDropdown = React$1.useCallback(() => {
|
|
18548
|
+
setIsModalOpen((prev) => !prev);
|
|
18549
|
+
}, []);
|
|
18550
|
+
const closeDropdown = React$1.useCallback(() => {
|
|
18551
|
+
setIsModalOpen(false);
|
|
18552
|
+
}, []);
|
|
18553
|
+
const [dropdownStyles, setDropdownStyles] = React$1.useState(null);
|
|
18554
|
+
const itemRef = React$1.useRef(null);
|
|
18555
|
+
const menuRef = React$1.useRef(null);
|
|
18556
|
+
// Effect to find the best position for the dropdown menu, so it's always visible for the user
|
|
18557
|
+
React$1.useEffect(() => {
|
|
18558
|
+
var _a;
|
|
18559
|
+
if (!isDropdownOpen) {
|
|
18560
|
+
// when the dropdown is closed, we want to reset its position
|
|
18561
|
+
// because user may scroll, and the old position may be out of view, so we'll need to recalculate it
|
|
18562
|
+
setDropdownStyles(null);
|
|
18563
|
+
return;
|
|
18564
|
+
}
|
|
18565
|
+
const item = itemRef.current;
|
|
18566
|
+
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;
|
|
18567
|
+
const dropdownMenu = menuRef.current;
|
|
18568
|
+
if (!item || !dropdownRef.current || !itemsContainer || !dropdownMenu) {
|
|
18569
|
+
return;
|
|
18570
|
+
}
|
|
18571
|
+
// Get the bounding rectangle of the item
|
|
18572
|
+
const itemRect = item.getBoundingClientRect();
|
|
18573
|
+
// Get the bounding rectangle of the container element
|
|
18574
|
+
const containerRect = itemsContainer.getBoundingClientRect();
|
|
18575
|
+
const dropdownMenuRect = dropdownMenu.getBoundingClientRect();
|
|
18576
|
+
// Calculate the bottom position of the visible area of the the items container
|
|
18577
|
+
const containerVisibleBottom = containerRect.top + containerRect.height;
|
|
18578
|
+
// Calculate the distance from the bottom of the item to the visible bottom of the items container
|
|
18579
|
+
const distanceBetweenItemBottomAndContainerBottomEdge = containerVisibleBottom - itemRect.bottom;
|
|
18580
|
+
// the same but for the top
|
|
18581
|
+
const distanceBetweenItemTopAndContainerTopEdge = itemRect.top - containerRect.top;
|
|
18582
|
+
const dropdownMenuHeight = dropdownMenu.clientHeight;
|
|
18583
|
+
const maxHeight = containerRect.bottom - dropdownMenuRect.top - SPACING;
|
|
18584
|
+
// check if the height of the dropdown is less than the longest distance, either top or bottom
|
|
18585
|
+
// if so, means that the dropdown keeps visible when positioned at the top or bottom of the item
|
|
18586
|
+
const isDropdownVisibleAtItemTopOrBottom = dropdownMenuHeight <=
|
|
18587
|
+
Math.max(distanceBetweenItemBottomAndContainerBottomEdge, distanceBetweenItemTopAndContainerTopEdge);
|
|
18588
|
+
// if the dropdown is not visible at top or bottom of the item
|
|
18589
|
+
// we just center it
|
|
18590
|
+
if (!isDropdownVisibleAtItemTopOrBottom) {
|
|
18591
|
+
return setDropdownStyles({
|
|
18592
|
+
position: "center",
|
|
18593
|
+
maxHeight,
|
|
18594
|
+
});
|
|
18595
|
+
}
|
|
18596
|
+
// finally, if the dropdown fits, position it where it has more space
|
|
18597
|
+
if (distanceBetweenItemBottomAndContainerBottomEdge >=
|
|
18598
|
+
distanceBetweenItemTopAndContainerTopEdge) {
|
|
18599
|
+
setDropdownStyles({
|
|
18600
|
+
position: "bottom",
|
|
18601
|
+
maxHeight,
|
|
18602
|
+
});
|
|
18603
|
+
}
|
|
18604
|
+
else {
|
|
18605
|
+
setDropdownStyles({
|
|
18606
|
+
position: "top",
|
|
18607
|
+
maxHeight,
|
|
18608
|
+
});
|
|
18609
|
+
}
|
|
18610
|
+
}, [isDropdownOpen, menuRef, itemRef]);
|
|
18611
|
+
return {
|
|
18612
|
+
isDropdownOpen,
|
|
18613
|
+
openDropdown,
|
|
18614
|
+
closeDropdown,
|
|
18615
|
+
dropdownRef,
|
|
18616
|
+
openDropdownButtonRef,
|
|
18617
|
+
dropdownStyles,
|
|
18618
|
+
itemRef,
|
|
18619
|
+
menuRef,
|
|
18620
|
+
};
|
|
18621
|
+
}
|
|
18622
|
+
|
|
18623
|
+
const IS_SERVER = typeof window === "undefined";
|
|
18624
|
+
const useIsomorphicLayoutEffect$1 = IS_SERVER ? React$1.useEffect : React$1.useLayoutEffect;
|
|
18625
|
+
/**
|
|
18626
|
+
* 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).
|
|
18627
|
+
* @param {string} query - The media query to track.
|
|
18628
|
+
* @param {?UseMediaQueryOptions} [options] - The options for customizing the behavior of the hook (optional).
|
|
18629
|
+
* @returns {boolean} The current state of the media query (true if the query matches, false otherwise).
|
|
18630
|
+
* @public
|
|
18631
|
+
* @example
|
|
18632
|
+
* ```tsx
|
|
18633
|
+
* const isSmallScreen = useMediaQuery('(max-width: 600px)');
|
|
18634
|
+
* // Use `isSmallScreen` to conditionally apply styles or logic based on the screen size.
|
|
18635
|
+
* ```
|
|
18636
|
+
*/
|
|
18637
|
+
function useMediaQuery(query, { defaultValue = false, initializeWithValue = true, } = {}) {
|
|
18638
|
+
const getMatches = (query) => {
|
|
18639
|
+
if (IS_SERVER) {
|
|
18640
|
+
return defaultValue;
|
|
18641
|
+
}
|
|
18642
|
+
return window.matchMedia(query).matches;
|
|
18643
|
+
};
|
|
18644
|
+
const [matches, setMatches] = React$1.useState(() => {
|
|
18645
|
+
if (initializeWithValue) {
|
|
18646
|
+
return getMatches(query);
|
|
18647
|
+
}
|
|
18648
|
+
return defaultValue;
|
|
18649
|
+
});
|
|
18650
|
+
// Handles the change event of the media query.
|
|
18651
|
+
function handleChange() {
|
|
18652
|
+
setMatches(getMatches(query));
|
|
18653
|
+
}
|
|
18654
|
+
useIsomorphicLayoutEffect$1(() => {
|
|
18655
|
+
const matchMedia = window.matchMedia(query);
|
|
18656
|
+
// Triggered at the first client-side load and if query changes
|
|
18657
|
+
handleChange();
|
|
18658
|
+
// Use deprecated `addListener` and `removeListener` to support Safari < 14 (#135)
|
|
18659
|
+
if (matchMedia.addListener) {
|
|
18660
|
+
matchMedia.addListener(handleChange);
|
|
18661
|
+
}
|
|
18662
|
+
else {
|
|
18663
|
+
matchMedia.addEventListener("change", handleChange);
|
|
18664
|
+
}
|
|
18665
|
+
return () => {
|
|
18666
|
+
if (matchMedia.removeListener) {
|
|
18667
|
+
matchMedia.removeListener(handleChange);
|
|
18668
|
+
}
|
|
18669
|
+
else {
|
|
18670
|
+
matchMedia.removeEventListener("change", handleChange);
|
|
18671
|
+
}
|
|
18672
|
+
};
|
|
18673
|
+
}, [query]);
|
|
18674
|
+
return matches;
|
|
18675
|
+
}
|
|
18676
|
+
|
|
18677
|
+
function useCollapsibleMenu() {
|
|
18678
|
+
const [isMenuOpen, setIsMenuOpen] = React$1.useState(false);
|
|
18679
|
+
const menuRef = React$1.useRef(null);
|
|
18680
|
+
const toggleMenu = () => {
|
|
18681
|
+
setIsMenuOpen(!isMenuOpen);
|
|
18682
|
+
};
|
|
18683
|
+
React$1.useEffect(() => {
|
|
18684
|
+
const handleClickOutside = (event) => {
|
|
18685
|
+
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
18686
|
+
setIsMenuOpen(false);
|
|
18687
|
+
}
|
|
18688
|
+
};
|
|
18689
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
18690
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
18691
|
+
}, []);
|
|
18692
|
+
return {
|
|
18693
|
+
isMenuOpen,
|
|
18694
|
+
toggleMenu,
|
|
18695
|
+
menuRef,
|
|
18696
|
+
};
|
|
18697
|
+
}
|
|
18698
|
+
|
|
18699
|
+
const useTimer = ({ immediateStart = true, }) => {
|
|
18700
|
+
const [timer, setTimer] = React$1.useState("0s");
|
|
18701
|
+
const intervalRef = React$1.useRef(null);
|
|
18702
|
+
const startTimer = () => {
|
|
18703
|
+
if (intervalRef.current !== null)
|
|
18704
|
+
return; // Prevent multiple intervals
|
|
18705
|
+
const startTime = Date.now();
|
|
18706
|
+
intervalRef.current = window.setInterval(() => {
|
|
18707
|
+
const elapsedTime = Date.now() - startTime;
|
|
18708
|
+
setTimer(formatDuration(elapsedTime));
|
|
18709
|
+
}, 1000);
|
|
18710
|
+
};
|
|
18711
|
+
const stopTimer = () => {
|
|
18712
|
+
if (intervalRef.current !== null) {
|
|
18713
|
+
clearInterval(intervalRef.current);
|
|
18714
|
+
intervalRef.current = null;
|
|
18715
|
+
}
|
|
18716
|
+
};
|
|
18717
|
+
React$1.useEffect(() => {
|
|
18718
|
+
if (immediateStart) {
|
|
18719
|
+
startTimer();
|
|
18720
|
+
}
|
|
18721
|
+
return () => {
|
|
18722
|
+
stopTimer();
|
|
18723
|
+
};
|
|
18724
|
+
}, [immediateStart]);
|
|
18725
|
+
return { timer, stopTimer, startTimer };
|
|
18726
|
+
};
|
|
18727
|
+
|
|
18728
|
+
exports.ThemePreference = void 0;
|
|
18729
|
+
(function (ThemePreference) {
|
|
18730
|
+
ThemePreference["LIGHT"] = "light";
|
|
18731
|
+
ThemePreference["DARK"] = "dark";
|
|
18732
|
+
ThemePreference["SYSTEM"] = "system";
|
|
18733
|
+
})(exports.ThemePreference || (exports.ThemePreference = {}));
|
|
18734
|
+
const THEME_STORAGE_KEY = "__squid-app-theme-type__";
|
|
18735
|
+
const THEME_CHANGE_EVENT = "squid-app-theme-change";
|
|
18736
|
+
const THEME_MEDIA_QUERY = "(prefers-color-scheme: light)";
|
|
18737
|
+
function useUserTheme() {
|
|
18738
|
+
const [themePreference, setThemePreference] = React$1.useState(getInitialTheme);
|
|
18739
|
+
const [themeType, setThemeType] = React$1.useState(getEffectiveTheme(themePreference));
|
|
18740
|
+
React$1.useEffect(() => {
|
|
18741
|
+
const handleThemeChange = (e) => {
|
|
18742
|
+
setThemePreference(e.detail);
|
|
18743
|
+
};
|
|
18744
|
+
window.addEventListener(THEME_CHANGE_EVENT, handleThemeChange);
|
|
18745
|
+
return () => {
|
|
18746
|
+
window.removeEventListener(THEME_CHANGE_EVENT, handleThemeChange);
|
|
18747
|
+
};
|
|
18748
|
+
}, []);
|
|
18749
|
+
React$1.useEffect(() => {
|
|
18750
|
+
const mediaQuery = window.matchMedia(THEME_MEDIA_QUERY);
|
|
18751
|
+
const handleChange = () => {
|
|
18752
|
+
if (themePreference === exports.ThemePreference.SYSTEM) {
|
|
18753
|
+
setThemeType(mediaQuery.matches ? "light" : "dark");
|
|
18754
|
+
}
|
|
18755
|
+
};
|
|
18756
|
+
mediaQuery.addEventListener("change", handleChange);
|
|
18757
|
+
handleChange();
|
|
18758
|
+
return () => {
|
|
18759
|
+
mediaQuery.removeEventListener("change", handleChange);
|
|
18760
|
+
};
|
|
18761
|
+
}, [themePreference]);
|
|
18762
|
+
React$1.useEffect(() => {
|
|
18763
|
+
setThemeType(getEffectiveTheme(themePreference));
|
|
18764
|
+
}, [themePreference]);
|
|
18765
|
+
const setThemeManually = (theme) => {
|
|
18766
|
+
setThemePreference(theme);
|
|
18767
|
+
localStorage.setItem(THEME_STORAGE_KEY, theme);
|
|
18768
|
+
window.dispatchEvent(new CustomEvent(THEME_CHANGE_EVENT, { detail: theme }));
|
|
18769
|
+
};
|
|
18770
|
+
const isDarkMode = React$1.useMemo(() => themeType === "dark", [themeType]);
|
|
18771
|
+
return {
|
|
18772
|
+
themePreference,
|
|
18773
|
+
themeType,
|
|
18774
|
+
theme: isDarkMode ? darkTheme : lightTheme,
|
|
18775
|
+
setThemeManually,
|
|
18776
|
+
isDarkMode,
|
|
18777
|
+
};
|
|
18778
|
+
}
|
|
18779
|
+
function getInitialTheme() {
|
|
18780
|
+
var _a;
|
|
18781
|
+
if (typeof window === "undefined")
|
|
18782
|
+
return exports.ThemePreference.SYSTEM;
|
|
18783
|
+
return ((_a = localStorage.getItem(THEME_STORAGE_KEY)) !== null && _a !== void 0 ? _a : exports.ThemePreference.SYSTEM);
|
|
18784
|
+
}
|
|
18785
|
+
function getEffectiveTheme(themeType) {
|
|
18786
|
+
if (themeType !== exports.ThemePreference.SYSTEM)
|
|
18787
|
+
return themeType;
|
|
18788
|
+
return window.matchMedia(THEME_MEDIA_QUERY).matches ? "light" : "dark";
|
|
18789
|
+
}
|
|
18790
|
+
|
|
18791
|
+
function BaseDropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, link, control, detail, isSelected, itemRef, children, contentRef, }) {
|
|
18792
|
+
const ContentTag = link
|
|
18793
|
+
? "a"
|
|
18794
|
+
: (control === null || control === void 0 ? void 0 : control.type) === "switch"
|
|
18795
|
+
? "label"
|
|
18796
|
+
: "button";
|
|
18797
|
+
const contentTagProps = link
|
|
18798
|
+
? {
|
|
18799
|
+
href: link,
|
|
18800
|
+
target: "_blank",
|
|
18801
|
+
ref: contentRef,
|
|
18802
|
+
}
|
|
18803
|
+
: {
|
|
18804
|
+
ref: contentRef,
|
|
18805
|
+
};
|
|
18806
|
+
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] }));
|
|
18807
|
+
}
|
|
18808
|
+
function DropdownMenuItem(props) {
|
|
18809
|
+
if (props.submenu) {
|
|
18810
|
+
return (jsxRuntime.jsx(DropdownMenuItemWithSubmenu, Object.assign({}, props, { submenu: props.submenu, containerRef: props.containerRef })));
|
|
18811
|
+
}
|
|
18812
|
+
return jsxRuntime.jsx(BaseDropdownMenuItem, Object.assign({}, props));
|
|
18813
|
+
}
|
|
18814
|
+
function DropdownMenuItemWithSubmenu(_a) {
|
|
18815
|
+
var _b;
|
|
18816
|
+
var { submenu } = _a, props = __rest$1(_a, ["submenu"]);
|
|
18817
|
+
const { isDropdownOpen, dropdownRef, openDropdown, itemRef, menuRef, openDropdownButtonRef, dropdownStyles, } = useDropdownMenu({
|
|
18818
|
+
itemsContainerRef: props.containerRef,
|
|
18819
|
+
});
|
|
18820
|
+
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) => {
|
|
18821
|
+
var _a;
|
|
18822
|
+
openDropdown();
|
|
18823
|
+
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
|
|
18824
|
+
}, 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: {
|
|
18825
|
+
style: {
|
|
18826
|
+
maxHeight: (_b = dropdownStyles === null || dropdownStyles === void 0 ? void 0 : dropdownStyles.maxHeight) !== null && _b !== void 0 ? _b : 0,
|
|
18827
|
+
overflow: "auto",
|
|
18828
|
+
scrollbarWidth: "none",
|
|
18829
|
+
},
|
|
18830
|
+
}, children: submenu })) })) }));
|
|
18831
|
+
}
|
|
18832
|
+
|
|
18833
|
+
const dropdownPositionClassMap$1 = {
|
|
18834
|
+
top: "tw-right-full tw-bottom-[50px]",
|
|
18835
|
+
bottom: "tw-right-full tw-top-[50px]",
|
|
18836
|
+
center: "tw-right-[50px] -tw-top-[35px]",
|
|
18837
|
+
};
|
|
18838
|
+
const listItemSizeMap = {
|
|
18839
|
+
small: "tw-h-list-item-small",
|
|
18840
|
+
large: "tw-h-list-item-large",
|
|
18841
|
+
};
|
|
18842
|
+
const collapsedListItemClassMap = {
|
|
18843
|
+
small: "tw-w-[70px]",
|
|
18844
|
+
large: "tw-w-[80px]",
|
|
18845
|
+
};
|
|
18846
|
+
function ListItem(_a) {
|
|
18847
|
+
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"]);
|
|
18848
|
+
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");
|
|
18849
|
+
// 'small' variant does not have detail
|
|
18850
|
+
const showDetail = size === "large" && (!!detail || !!icon || showDetailOnHoverOnly);
|
|
18851
|
+
const isDetailInteractive = !!onDetailClick;
|
|
18852
|
+
const DetailTag = isDetailInteractive ? "button" : "div";
|
|
18853
|
+
const detailProps = isDetailInteractive
|
|
18854
|
+
? {
|
|
18855
|
+
onClick: (event) => {
|
|
18856
|
+
// prevent click event from bubbling up to parent
|
|
18857
|
+
event.stopPropagation();
|
|
18858
|
+
onDetailClick === null || onDetailClick === void 0 ? void 0 : onDetailClick();
|
|
18859
|
+
},
|
|
18860
|
+
}
|
|
18861
|
+
: {};
|
|
18862
|
+
// There are two possible ways to handle loading state:
|
|
18863
|
+
// Can be boolean or string
|
|
18864
|
+
// If boolean and true, it will show a full loading skeleton
|
|
18865
|
+
// If it's a non empty string, means that we want to display the skeleton + some text
|
|
18866
|
+
const loadingComponent = () => {
|
|
18867
|
+
if ((loading === null || loading === void 0 ? void 0 : loading.subtitle) === true) {
|
|
18868
|
+
return jsxRuntime.jsx(TextSkeleton, { width: "50px", className: "tw-h-2.5", isLoading: true });
|
|
18869
|
+
}
|
|
18870
|
+
if (typeof (loading === null || loading === void 0 ? void 0 : loading.subtitle) === "string" && loading.subtitle.length > 0) {
|
|
18871
|
+
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 })] }));
|
|
18872
|
+
}
|
|
18873
|
+
return null;
|
|
18874
|
+
};
|
|
18875
|
+
const isInteractive = !!props.onClick;
|
|
18876
|
+
const ItemTag = isInteractive ? "button" : "div";
|
|
18877
|
+
const itemProps = isInteractive ? props : {};
|
|
18878
|
+
const { isDropdownOpen, dropdownRef, openDropdown, openDropdownButtonRef, itemRef, menuRef, dropdownStyles, } = useDropdownMenu({
|
|
18879
|
+
itemsContainerRef,
|
|
18880
|
+
});
|
|
18881
|
+
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
|
|
18882
|
+
? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
|
|
18883
|
+
: "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",
|
|
18884
|
+
// 'large' variant has extra padding
|
|
18885
|
+
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" &&
|
|
18886
|
+
((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
|
|
18887
|
+
? "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"
|
|
18888
|
+
: "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 &&
|
|
18889
|
+
dropdownPositionClassMap$1[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] })));
|
|
18890
|
+
}
|
|
18891
|
+
const ListItemActionsButton = React$1.forwardRef((props, ref) => {
|
|
18892
|
+
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
|
|
18893
|
+
? "tw-bg-material-light-thin tw-opacity-100"
|
|
18894
|
+
: "tw-opacity-0", props.className), children: jsxRuntime.jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })));
|
|
18895
|
+
});
|
|
18896
|
+
|
|
18897
|
+
const dropdownPositionClassMap = {
|
|
18898
|
+
top: "tw-right-squid-xxs tw-bottom-[50px]",
|
|
18899
|
+
bottom: "tw-right-squid-xxs tw-top-[50px]",
|
|
18900
|
+
center: "tw-right-[50px] tw-translate-y-[calc(-50%+20px)]",
|
|
18901
|
+
};
|
|
18902
|
+
const statusBadge = {
|
|
18903
|
+
completed: {},
|
|
18904
|
+
pending: {
|
|
18905
|
+
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" })),
|
|
18906
|
+
containerClassName: "tw-bg-royal-400",
|
|
18907
|
+
},
|
|
18908
|
+
failed: {
|
|
18909
|
+
badge: (jsxRuntime.jsx("span", { className: "tw-bg-grey-900", children: jsxRuntime.jsx(EmojiSadIcon, { className: "tw-text-status-negative" }) })),
|
|
18910
|
+
containerClassName: "tw-bg-status-negative",
|
|
18911
|
+
},
|
|
18912
|
+
warning: {
|
|
18913
|
+
badge: (jsxRuntime.jsx("span", { className: "tw-bg-grey-900", children: jsxRuntime.jsx(EmojiMeh, { className: "tw-text-status-partial" }) })),
|
|
18914
|
+
containerClassName: "tw-bg-status-partial",
|
|
18915
|
+
},
|
|
18916
|
+
};
|
|
18917
|
+
function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuContent, itemsContainerRef, status, warningLabel, onClick, }) {
|
|
18918
|
+
const { isDropdownOpen, dropdownRef, openDropdown, openDropdownButtonRef, itemRef, menuRef, dropdownStyles, } = useDropdownMenu({
|
|
18919
|
+
itemsContainerRef,
|
|
18920
|
+
});
|
|
18921
|
+
const statusLabel = React$1.useMemo(() => {
|
|
18922
|
+
switch (status) {
|
|
18923
|
+
case "completed":
|
|
18924
|
+
return jsxRuntime.jsx(CaptionText, { children: dateCompleted });
|
|
18925
|
+
case "pending":
|
|
18926
|
+
return jsxRuntime.jsx(CaptionText, { className: "tw-text-royal-400", children: "Pending" });
|
|
18927
|
+
case "failed":
|
|
18928
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { className: "tw-text-status-negative", children: "Fail" }), jsxRuntime.jsx(CaptionText, { children: dateCompleted })] }));
|
|
18929
|
+
case "warning":
|
|
18930
|
+
return (jsxRuntime.jsx(CaptionText, { className: "tw-text-status-partial", children: warningLabel }));
|
|
18931
|
+
default:
|
|
18932
|
+
return null;
|
|
18933
|
+
}
|
|
18934
|
+
}, [status, dateCompleted]);
|
|
18935
|
+
const isInteractive = !!onClick;
|
|
18936
|
+
const ItemTag = isInteractive ? "button" : "div";
|
|
18937
|
+
const itemTagProps = isInteractive
|
|
18938
|
+
? {
|
|
18939
|
+
onClick,
|
|
18940
|
+
}
|
|
18941
|
+
: {};
|
|
18942
|
+
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-flex tw-items-center tw-justify-center tw-gap-squid-xxs tw-hide-on-parent-hover", !!dropdownMenuContent &&
|
|
18943
|
+
"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 &&
|
|
18944
|
+
dropdownPositionClassMap[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] }));
|
|
18945
|
+
}
|
|
18946
|
+
|
|
18947
|
+
function MenuItem({ label, imageUrl, icon }) {
|
|
18948
|
+
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 })] }));
|
|
18688
18949
|
}
|
|
18689
18950
|
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
|
|
18696
|
-
|
|
18697
|
-
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
|
|
18702
|
-
|
|
18703
|
-
|
|
18704
|
-
|
|
18705
|
-
var h=React$1,n=requireShim();function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q="function"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;
|
|
18706
|
-
withSelector_production_min.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f;}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return [function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);
|
|
18707
|
-
u(function(){f.hasValue=!0;f.value=d;},[d]);w(d);return d};
|
|
18708
|
-
return withSelector_production_min;
|
|
18951
|
+
const containerVariantClassNameMap = {
|
|
18952
|
+
small: "tw-px-squid-xs",
|
|
18953
|
+
large: "tw-px-squid-0",
|
|
18954
|
+
};
|
|
18955
|
+
const childrenVariantClassNameMap = {
|
|
18956
|
+
small: "tw-min-h-squid-l tw-px-squid-xs",
|
|
18957
|
+
large: "tw-min-h-squid-xl tw-px-squid-m",
|
|
18958
|
+
};
|
|
18959
|
+
function SmallBodyText(props) {
|
|
18960
|
+
return jsxRuntime.jsx(BodyText, Object.assign({ size: "small" }, props));
|
|
18961
|
+
}
|
|
18962
|
+
function PropertyListItem(_a) {
|
|
18963
|
+
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"]);
|
|
18964
|
+
const Text = variant === "small" ? CaptionText : SmallBodyText;
|
|
18965
|
+
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 }) })] }) })));
|
|
18709
18966
|
}
|
|
18710
18967
|
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
|
|
18715
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
18716
|
-
*
|
|
18717
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
18718
|
-
*
|
|
18719
|
-
* This source code is licensed under the MIT license found in the
|
|
18720
|
-
* LICENSE file in the root directory of this source tree.
|
|
18721
|
-
*/
|
|
18722
|
-
|
|
18723
|
-
var hasRequiredWithSelector_development;
|
|
18724
|
-
|
|
18725
|
-
function requireWithSelector_development () {
|
|
18726
|
-
if (hasRequiredWithSelector_development) return withSelector_development;
|
|
18727
|
-
hasRequiredWithSelector_development = 1;
|
|
18728
|
-
|
|
18729
|
-
if (process.env.NODE_ENV !== "production") {
|
|
18730
|
-
(function() {
|
|
18731
|
-
|
|
18732
|
-
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
|
18733
|
-
if (
|
|
18734
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
|
18735
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
|
|
18736
|
-
'function'
|
|
18737
|
-
) {
|
|
18738
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
18739
|
-
}
|
|
18740
|
-
var React = React$1;
|
|
18741
|
-
var shim = requireShim();
|
|
18742
|
-
|
|
18743
|
-
/**
|
|
18744
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
18745
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
18746
|
-
*/
|
|
18747
|
-
function is(x, y) {
|
|
18748
|
-
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
|
|
18749
|
-
;
|
|
18750
|
-
}
|
|
18751
|
-
|
|
18752
|
-
var objectIs = typeof Object.is === 'function' ? Object.is : is;
|
|
18753
|
-
|
|
18754
|
-
var useSyncExternalStore = shim.useSyncExternalStore;
|
|
18755
|
-
|
|
18756
|
-
// for CommonJS interop.
|
|
18757
|
-
|
|
18758
|
-
var useRef = React.useRef,
|
|
18759
|
-
useEffect = React.useEffect,
|
|
18760
|
-
useMemo = React.useMemo,
|
|
18761
|
-
useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.
|
|
18762
|
-
|
|
18763
|
-
function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
18764
|
-
// Use this to track the rendered snapshot.
|
|
18765
|
-
var instRef = useRef(null);
|
|
18766
|
-
var inst;
|
|
18767
|
-
|
|
18768
|
-
if (instRef.current === null) {
|
|
18769
|
-
inst = {
|
|
18770
|
-
hasValue: false,
|
|
18771
|
-
value: null
|
|
18772
|
-
};
|
|
18773
|
-
instRef.current = inst;
|
|
18774
|
-
} else {
|
|
18775
|
-
inst = instRef.current;
|
|
18776
|
-
}
|
|
18777
|
-
|
|
18778
|
-
var _useMemo = useMemo(function () {
|
|
18779
|
-
// Track the memoized state using closure variables that are local to this
|
|
18780
|
-
// memoized instance of a getSnapshot function. Intentionally not using a
|
|
18781
|
-
// useRef hook, because that state would be shared across all concurrent
|
|
18782
|
-
// copies of the hook/component.
|
|
18783
|
-
var hasMemo = false;
|
|
18784
|
-
var memoizedSnapshot;
|
|
18785
|
-
var memoizedSelection;
|
|
18786
|
-
|
|
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;
|
|
18792
|
-
|
|
18793
|
-
var _nextSelection = selector(nextSnapshot);
|
|
18794
|
-
|
|
18795
|
-
if (isEqual !== undefined) {
|
|
18796
|
-
// Even if the selector has changed, the currently rendered selection
|
|
18797
|
-
// may be equal to the new selection. We should attempt to reuse the
|
|
18798
|
-
// current value if possible, to preserve downstream memoizations.
|
|
18799
|
-
if (inst.hasValue) {
|
|
18800
|
-
var currentSelection = inst.value;
|
|
18801
|
-
|
|
18802
|
-
if (isEqual(currentSelection, _nextSelection)) {
|
|
18803
|
-
memoizedSelection = currentSelection;
|
|
18804
|
-
return currentSelection;
|
|
18805
|
-
}
|
|
18806
|
-
}
|
|
18807
|
-
}
|
|
18808
|
-
|
|
18809
|
-
memoizedSelection = _nextSelection;
|
|
18810
|
-
return _nextSelection;
|
|
18811
|
-
} // We may be able to reuse the previous invocation's result.
|
|
18812
|
-
|
|
18968
|
+
function SectionTitle(_a) {
|
|
18969
|
+
var { title, icon, accessory, actionIcon, className } = _a, props = __rest$1(_a, ["title", "icon", "accessory", "actionIcon", "className"]);
|
|
18970
|
+
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] })));
|
|
18971
|
+
}
|
|
18813
18972
|
|
|
18814
|
-
|
|
18815
|
-
|
|
18816
|
-
|
|
18973
|
+
function SettingsItem({ icon, label, control, link, transparent = false, helpTooltip, }) {
|
|
18974
|
+
const ContentTag = link ? "a" : "div";
|
|
18975
|
+
const contentTagProps = link
|
|
18976
|
+
? {
|
|
18977
|
+
href: link,
|
|
18978
|
+
target: "_blank",
|
|
18979
|
+
}
|
|
18980
|
+
: {};
|
|
18981
|
+
const helpIcon = !!helpTooltip && (jsxRuntime.jsx(HelpIcon, { className: "tw-cursor-help tw-text-grey-600 hover:tw-text-grey-400" }));
|
|
18982
|
+
const showDetailsBorder = !!control && !link && !(control.type === "switch");
|
|
18983
|
+
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 &&
|
|
18984
|
+
"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" &&
|
|
18985
|
+
(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))) }))] }))) })] })) }));
|
|
18986
|
+
}
|
|
18817
18987
|
|
|
18818
|
-
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
|
|
18988
|
+
const STEP_ITEM_HEIGHT = 52;
|
|
18989
|
+
const statusBgClassMap = {
|
|
18990
|
+
executed: "!tw-bg-grey-300",
|
|
18991
|
+
ongoing: "!tw-bg-grey-300",
|
|
18992
|
+
pending: "!tw-bg-grey-600",
|
|
18993
|
+
waiting: "!tw-bg-grey-300",
|
|
18994
|
+
error: "!tw-bg-status-negative",
|
|
18995
|
+
success: "!tw-bg-status-positive",
|
|
18996
|
+
warning: "!tw-bg-status-partial",
|
|
18997
|
+
};
|
|
18998
|
+
const separatorClassMap = {
|
|
18999
|
+
executed: "tw-text-grey-300",
|
|
19000
|
+
ongoing: "tw-text-grey-300",
|
|
19001
|
+
pending: "tw-text-grey-600",
|
|
19002
|
+
waiting: "tw-text-grey-300",
|
|
19003
|
+
error: "tw-text-status-negative",
|
|
19004
|
+
success: "tw-text-status-positive",
|
|
19005
|
+
warning: "tw-text-status-partial",
|
|
19006
|
+
};
|
|
19007
|
+
function SwapStepItem({ descriptionBlocks, showStepSeparator = false, link, status = "pending", }) {
|
|
19008
|
+
// these styles are located here instead of outside the component
|
|
19009
|
+
// so they are updated whenever the animation duration changes
|
|
19010
|
+
const transitionStyle = {
|
|
19011
|
+
transition: `background-color ${ANIMATION_DURATIONS.CHANGE_SWAP_STEP}ms, color ${ANIMATION_DURATIONS.CHANGE_SWAP_STEP}ms`,
|
|
19012
|
+
};
|
|
19013
|
+
const chipContent = React$1.useMemo(() => {
|
|
19014
|
+
switch (status) {
|
|
19015
|
+
case "success":
|
|
19016
|
+
case "executed":
|
|
19017
|
+
return jsxRuntime.jsx(Checkmark1Icon, {});
|
|
19018
|
+
case "error":
|
|
19019
|
+
return jsxRuntime.jsx(EmojiSadIcon, { size: "16" });
|
|
19020
|
+
case "warning":
|
|
19021
|
+
return jsxRuntime.jsx(EmojiMeh, { size: "16" });
|
|
19022
|
+
case "waiting":
|
|
19023
|
+
return jsxRuntime.jsx(DotGrid1x3HorizontalIcon, {});
|
|
19024
|
+
case "pending":
|
|
19025
|
+
return null;
|
|
19026
|
+
case "ongoing":
|
|
19027
|
+
return jsxRuntime.jsx(Loader, { size: "16", strokeWidth: "4" });
|
|
19028
|
+
default:
|
|
19029
|
+
return null;
|
|
19030
|
+
}
|
|
19031
|
+
}, [status]);
|
|
19032
|
+
const statusTextClass = React$1.useMemo(() => {
|
|
19033
|
+
switch (status) {
|
|
19034
|
+
case "pending":
|
|
19035
|
+
return "tw-text-grey-600";
|
|
19036
|
+
default:
|
|
19037
|
+
return "tw-text-grey-300";
|
|
19038
|
+
}
|
|
19039
|
+
}, [status]);
|
|
19040
|
+
return (jsxRuntime.jsx("li", { style: {
|
|
19041
|
+
maxHeight: `${STEP_ITEM_HEIGHT}px`,
|
|
19042
|
+
minHeight: `${STEP_ITEM_HEIGHT}px`,
|
|
19043
|
+
}, 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 })] }) }));
|
|
19044
|
+
}
|
|
18822
19045
|
|
|
19046
|
+
function ActionLayout({ lineCap = jsxRuntime.jsx(Timeline.CapTop, {}), status = "executed", showTimeline = true, showBody = true, nextStatus, statusIcon, description, title, icon, children, }) {
|
|
19047
|
+
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 })] })] }));
|
|
19048
|
+
}
|
|
19049
|
+
function ActionProperties({ timestamp, hash, url, }) {
|
|
19050
|
+
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 })] }));
|
|
19051
|
+
}
|
|
19052
|
+
function renderStatusIcon(status, defaultIcon) {
|
|
19053
|
+
switch (status) {
|
|
19054
|
+
case "success":
|
|
19055
|
+
return jsxRuntime.jsx(TransactionState, { status: "success", variant: "compact" });
|
|
19056
|
+
case "executed":
|
|
19057
|
+
return (jsxRuntime.jsx(TransactionState, { status: "executed", variant: "compact", icon: defaultIcon }));
|
|
19058
|
+
case "error":
|
|
19059
|
+
return jsxRuntime.jsx(EmojiSadIcon, { className: "tw-text-status-negative" });
|
|
19060
|
+
case "ongoing":
|
|
19061
|
+
return (jsxRuntime.jsx(Loader, { className: statusTextClassMap.ongoing, strokeWidth: "4", size: "20" }));
|
|
19062
|
+
case "waiting":
|
|
19063
|
+
return jsxRuntime.jsx(TransactionState, { status: "waiting", variant: "compact" });
|
|
19064
|
+
case "warning":
|
|
19065
|
+
return jsxRuntime.jsx(TransactionState, { status: "warning", variant: "compact" });
|
|
19066
|
+
}
|
|
19067
|
+
}
|
|
19068
|
+
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, {})] }) }));
|
|
19069
|
+
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 }) })] }));
|
|
19070
|
+
function ActionRow(_a) {
|
|
19071
|
+
var { className } = _a, props = __rest$1(_a, ["className"]);
|
|
19072
|
+
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) })));
|
|
19073
|
+
}
|
|
19074
|
+
function ActionWrapper({ children, status, className, }) {
|
|
19075
|
+
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 }));
|
|
19076
|
+
}
|
|
19077
|
+
function Timestamp({ time }) {
|
|
19078
|
+
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)] }));
|
|
19079
|
+
}
|
|
18823
19080
|
|
|
18824
|
-
|
|
18825
|
-
|
|
18826
|
-
|
|
18827
|
-
// to React that the selections are conceptually equal, and we can bail
|
|
18828
|
-
// out of rendering.
|
|
19081
|
+
function ApproveAction({ status, nextStatus, showTimeline, showBody, profile, chain, wallet, timestamp, hash, url, }) {
|
|
19082
|
+
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 }))] }));
|
|
19083
|
+
}
|
|
18829
19084
|
|
|
18830
|
-
|
|
18831
|
-
|
|
18832
|
-
|
|
18833
|
-
// out of rendering.
|
|
18834
|
-
if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {
|
|
18835
|
-
return prevSelection;
|
|
18836
|
-
}
|
|
19085
|
+
function BridgeAction({ status, nextStatus, showTimeline, showBody, token, chain, provider, timestamp, hash, url, }) {
|
|
19086
|
+
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 })) }));
|
|
19087
|
+
}
|
|
18837
19088
|
|
|
18838
|
-
|
|
18839
|
-
|
|
18840
|
-
|
|
18841
|
-
|
|
19089
|
+
function FeesAction({ status, nextStatus, showTimeline = false, total, lines, }) {
|
|
19090
|
+
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 }))] }));
|
|
19091
|
+
}
|
|
19092
|
+
function FeesTotal({ status, nextStatus, total, showTimeline, collapsed, }) {
|
|
19093
|
+
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, {})] }) })] }));
|
|
19094
|
+
}
|
|
19095
|
+
function FeesLines({ status, lines, showTimeline = false, }) {
|
|
19096
|
+
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
|
|
19097
|
+
? statusTextClassMap[status]
|
|
19098
|
+
: "!tw-text-[transparent]"), children: [jsxRuntime.jsx(Timeline.CapTop, {}), jsxRuntime.jsx(Timeline.Straight, {})] }) })] }));
|
|
19099
|
+
}
|
|
19100
|
+
function FeesRow({ label, usd, amount, symbol, collapsed = false, }) {
|
|
19101
|
+
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] })] }));
|
|
19102
|
+
}
|
|
18842
19103
|
|
|
19104
|
+
function IncompleteAction({ status, nextStatus, message, buttons, }) {
|
|
19105
|
+
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 })] })] })] }));
|
|
19106
|
+
}
|
|
18843
19107
|
|
|
18844
|
-
|
|
18845
|
-
|
|
19108
|
+
function linkActionTimelineProps(actions, collapsed) {
|
|
19109
|
+
return actions.map((action, index) => {
|
|
19110
|
+
var _a;
|
|
19111
|
+
const nextStatus = (_a = actions[index - 1]) === null || _a === void 0 ? void 0 : _a.props.status;
|
|
19112
|
+
return Object.assign(Object.assign({}, action), { props: Object.assign(Object.assign({}, action.props), { showTimeline: index !== actions.length - 1, showBody: !(collapsed && index === 0), nextStatus }) });
|
|
19113
|
+
});
|
|
19114
|
+
}
|
|
18846
19115
|
|
|
18847
|
-
|
|
18848
|
-
|
|
18849
|
-
|
|
19116
|
+
function ReceiveNFTAction({ status, nextStatus, showTimeline, showBody, nft, chain, wallet, timestamp, hash, url, }) {
|
|
19117
|
+
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 })] }));
|
|
19118
|
+
}
|
|
18850
19119
|
|
|
18851
|
-
|
|
18852
|
-
|
|
18853
|
-
|
|
18854
|
-
return [getSnapshotWithSelector, getServerSnapshotWithSelector];
|
|
18855
|
-
}, [getSnapshot, getServerSnapshot, selector, isEqual]),
|
|
18856
|
-
getSelection = _useMemo[0],
|
|
18857
|
-
getServerSelection = _useMemo[1];
|
|
19120
|
+
function ReceiveTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
|
|
19121
|
+
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 })] }));
|
|
19122
|
+
}
|
|
18858
19123
|
|
|
18859
|
-
|
|
18860
|
-
|
|
18861
|
-
|
|
18862
|
-
inst.value = value;
|
|
18863
|
-
}, [value]);
|
|
18864
|
-
useDebugValue(value);
|
|
18865
|
-
return value;
|
|
18866
|
-
}
|
|
19124
|
+
function SendTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
|
|
19125
|
+
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 })] }));
|
|
19126
|
+
}
|
|
18867
19127
|
|
|
18868
|
-
|
|
18869
|
-
|
|
18870
|
-
|
|
18871
|
-
|
|
18872
|
-
|
|
18873
|
-
|
|
18874
|
-
|
|
18875
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
18876
|
-
}
|
|
18877
|
-
|
|
18878
|
-
})();
|
|
18879
|
-
}
|
|
18880
|
-
return withSelector_development;
|
|
19128
|
+
function StakeAction({ status, nextStatus, showTimeline, showBody, token, provider, timestamp, hash, url, }) {
|
|
19129
|
+
return (jsxRuntime.jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsxRuntime.jsx(PieChartIcon, {}), description: jsxRuntime.jsx(Inline, { children: [
|
|
19130
|
+
"Stake",
|
|
19131
|
+
jsxRuntime.jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: token.symbol }) }),
|
|
19132
|
+
"on",
|
|
19133
|
+
jsxRuntime.jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsxRuntime.jsx(BodyText, { size: "small", children: provider.name }) }),
|
|
19134
|
+
] }), showTimeline: showTimeline, showBody: showBody, children: jsxRuntime.jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
|
|
18881
19135
|
}
|
|
18882
19136
|
|
|
18883
|
-
|
|
18884
|
-
|
|
18885
|
-
|
|
18886
|
-
|
|
19137
|
+
function StartAction({ status, nextStatus, showTimeline = false, showBody = false, timestamp, hash, url, }) {
|
|
19138
|
+
const getDescription = () => {
|
|
19139
|
+
switch (status) {
|
|
19140
|
+
case "error":
|
|
19141
|
+
case "waiting":
|
|
19142
|
+
return "Transaction not started";
|
|
19143
|
+
default:
|
|
19144
|
+
return "Transaction started";
|
|
19145
|
+
}
|
|
19146
|
+
};
|
|
19147
|
+
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
19148
|
}
|
|
18888
19149
|
|
|
18889
|
-
|
|
18890
|
-
|
|
19150
|
+
function SuccessAction({ nextStatus, status, description = status === "error"
|
|
19151
|
+
? "Transaction failed"
|
|
19152
|
+
: "Transaction successful", showTimeline, showBody, timestamp, hash, url, }) {
|
|
19153
|
+
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 })) }));
|
|
19154
|
+
}
|
|
18891
19155
|
|
|
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;
|
|
19156
|
+
function SwapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
|
|
19157
|
+
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
19158
|
}
|
|
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
19159
|
|
|
18926
|
-
|
|
18927
|
-
|
|
18928
|
-
}
|
|
19160
|
+
function WrapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
|
|
19161
|
+
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 }) }));
|
|
19162
|
+
}
|
|
18929
19163
|
|
|
18930
|
-
|
|
18931
|
-
|
|
18932
|
-
|
|
18933
|
-
|
|
18934
|
-
|
|
18935
|
-
|
|
18936
|
-
|
|
18937
|
-
|
|
19164
|
+
const actionComponentMap = {
|
|
19165
|
+
success: SuccessAction,
|
|
19166
|
+
receive_tokens: ReceiveTokensAction,
|
|
19167
|
+
receive_nft: ReceiveNFTAction,
|
|
19168
|
+
approve: ApproveAction,
|
|
19169
|
+
send_tokens: SendTokensAction,
|
|
19170
|
+
swap: SwapAction,
|
|
19171
|
+
bridge: BridgeAction,
|
|
19172
|
+
wrap: WrapAction,
|
|
19173
|
+
stake: StakeAction,
|
|
19174
|
+
start: StartAction,
|
|
19175
|
+
fees: FeesAction,
|
|
19176
|
+
incomplete: IncompleteAction,
|
|
19177
|
+
};
|
|
19178
|
+
function TransactionAction({ type, props }) {
|
|
19179
|
+
const Component = actionComponentMap[type];
|
|
19180
|
+
return jsxRuntime.jsx(Component, Object.assign({}, props));
|
|
18938
19181
|
}
|
|
18939
|
-
|
|
18940
|
-
|
|
19182
|
+
|
|
19183
|
+
function Transfer({ isLoading, from, to, className }) {
|
|
19184
|
+
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
19185
|
}
|
|
18942
19186
|
|
|
18943
|
-
function
|
|
18944
|
-
return (jsxRuntime.jsxs("div", { className: "tw-
|
|
19187
|
+
function TransactionItem({ className, isLoading = false, status, image, type, hash, fromChain, toChain, fromAmount, toAmount, timestamp, variant = "full", }) {
|
|
19188
|
+
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
19189
|
}
|
|
18946
|
-
|
|
18947
|
-
|
|
18948
|
-
|
|
18949
|
-
|
|
19190
|
+
const TransactionItemHeaderWrapper = ({ children, }) => {
|
|
19191
|
+
return (jsxRuntime.jsx(Join, { glue: () => jsxRuntime.jsx(PipeSeparator, { className: "tw-text-grey-600" }), children: children }));
|
|
19192
|
+
};
|
|
19193
|
+
const TransactionItemHeader = ({ isLoading, variant, type, hash, status, }) => {
|
|
19194
|
+
if (isLoading) {
|
|
19195
|
+
return (jsxRuntime.jsxs(TransactionItemHeaderWrapper, { children: [jsxRuntime.jsx(TextSkeleton, {}), jsxRuntime.jsx(TextSkeleton, {})] }));
|
|
19196
|
+
}
|
|
19197
|
+
if (variant === "full") {
|
|
19198
|
+
if (!type || !hash)
|
|
19199
|
+
return null;
|
|
19200
|
+
return (jsxRuntime.jsxs(TransactionItemHeaderWrapper, { children: [jsxRuntime.jsx(TxTypeLabel, { type: type }), jsxRuntime.jsx("span", { className: "tw-text-grey-500", children: truncateHash(hash) })] }));
|
|
19201
|
+
}
|
|
19202
|
+
if (status && type) {
|
|
19203
|
+
return (jsxRuntime.jsxs(TransactionItemHeaderWrapper, { children: [jsxRuntime.jsx(TransactionState, { status: status, variant: "small" }), jsxRuntime.jsx(TxTypeLabel, { type: type })] }));
|
|
19204
|
+
}
|
|
19205
|
+
return null;
|
|
19206
|
+
};
|
|
19207
|
+
const TxTypeLabel = ({ type }) => {
|
|
19208
|
+
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] }));
|
|
19209
|
+
};
|
|
19210
|
+
|
|
19211
|
+
function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator = false, }) {
|
|
19212
|
+
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
19213
|
}
|
|
18951
|
-
function
|
|
18952
|
-
return (jsxRuntime.jsx("div", { className: "tw-flex tw-
|
|
19214
|
+
function Track({ imageUrl }) {
|
|
19215
|
+
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
19216
|
}
|
|
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 })] }));
|
|
19217
|
+
function Label({ subtitle, descriptionBlocks, }) {
|
|
19218
|
+
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
19219
|
}
|
|
18977
19220
|
|
|
18978
|
-
function
|
|
18979
|
-
return (jsxRuntime.
|
|
19221
|
+
function DropdownMenuTitle({ title }) {
|
|
19222
|
+
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
19223
|
}
|
|
18981
19224
|
|
|
18982
19225
|
const STEPS_LIST_HEIGHT = 400;
|
|
@@ -24916,11 +25159,11 @@ function TransactionHeaderLayout({ isLoading, status, title, image = jsxRuntime.
|
|
|
24916
25159
|
}
|
|
24917
25160
|
|
|
24918
25161
|
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(
|
|
25162
|
+
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
25163
|
}
|
|
24921
25164
|
|
|
24922
25165
|
function BuyNFTHeader({ imageUrl, title = "Buy NFT", hash, url, status, }) {
|
|
24923
|
-
return (jsxRuntime.jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxRuntime.jsx(
|
|
25166
|
+
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
25167
|
}
|
|
24925
25168
|
|
|
24926
25169
|
function InteractionHeader({ title = "Interaction", image = jsxRuntime.jsx(Approve, {}), hash, url, status, }) {
|
|
@@ -24928,7 +25171,7 @@ function InteractionHeader({ title = "Interaction", image = jsxRuntime.jsx(Appro
|
|
|
24928
25171
|
}
|
|
24929
25172
|
|
|
24930
25173
|
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(
|
|
25174
|
+
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
25175
|
}
|
|
24933
25176
|
function ProfilePicture({ src }) {
|
|
24934
25177
|
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 +26792,7 @@ const switchKnobCheckedClassMap = {
|
|
|
26549
26792
|
unchecked: "tw-left-[1px]",
|
|
26550
26793
|
},
|
|
26551
26794
|
};
|
|
26552
|
-
function Switch({ checked = false, onChange, size, disabled = false, }) {
|
|
26795
|
+
function Switch({ checked = false, onChange, size, disabled = false, inputProps, }) {
|
|
26553
26796
|
return (
|
|
26554
26797
|
// Switch container
|
|
26555
26798
|
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 +26801,9 @@ function Switch({ checked = false, onChange, size, disabled = false, }) {
|
|
|
26558
26801
|
// checked styles
|
|
26559
26802
|
checked ? "tw-bg-status-positive" : "tw-bg-grey-800",
|
|
26560
26803
|
// disabled styles
|
|
26561
|
-
disabled ? "tw-cursor-not-allowed" : "tw-cursor-pointer"
|
|
26804
|
+
disabled ? "tw-cursor-not-allowed" : "tw-cursor-pointer",
|
|
26805
|
+
// Focus visible styles
|
|
26806
|
+
"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
26807
|
filter: "drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.33)) drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.20))",
|
|
26563
26808
|
}, className: clsx("tw-absolute tw-rounded-full tw-border tw-border-material-light-thin tw-transition-all",
|
|
26564
26809
|
// size styles
|
|
@@ -26747,10 +26992,10 @@ function SettingsButton({ label, isSelected = false, onClick, }) {
|
|
|
26747
26992
|
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
26993
|
}
|
|
26749
26994
|
|
|
26750
|
-
const IconButton = (_a) => {
|
|
26995
|
+
const IconButton = React$1.forwardRef((_a, ref) => {
|
|
26751
26996
|
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
|
-
};
|
|
26997
|
+
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 })));
|
|
26998
|
+
});
|
|
26754
26999
|
|
|
26755
27000
|
function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }) {
|
|
26756
27001
|
const matchesMobileLg = useMediaQuery(MEDIA_QUERIES.MOBILE_LG.media);
|
|
@@ -26762,7 +27007,7 @@ function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }) {
|
|
|
26762
27007
|
? "tw-w-[180px] tw-max-w-[180px] tw-pt-0"
|
|
26763
27008
|
: "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
27009
|
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,
|
|
27010
|
+
}, 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
27011
|
}
|
|
26767
27012
|
const List = ({ children }) => {
|
|
26768
27013
|
return (jsxRuntime.jsx("ul", { className: "tw-flex tw-flex-col tw-gap-squid-xxs tw-pb-squid-xs", children: children }));
|
|
@@ -62220,9 +62465,10 @@ function blendColors(foreground, background) {
|
|
|
62220
62465
|
return rgbToHex(r, g, b);
|
|
62221
62466
|
}
|
|
62222
62467
|
|
|
62223
|
-
function
|
|
62468
|
+
function ThemeProvider(_a) {
|
|
62469
|
+
var { theme = lightTheme, children, themeType = "light" } = _a, props = __rest$1(_a, ["theme", "children", "themeType"]);
|
|
62224
62470
|
const parsedStyle = parseSquidTheme(theme);
|
|
62225
|
-
return (jsxRuntime.jsx("div", { style: parsedStyle, "data-squid-theme-type": themeType, className: "tw-group tw-relative tw-h-screen tw-font-geist mobile-lg:tw-h-auto", children: children }));
|
|
62471
|
+
return (jsxRuntime.jsx("div", Object.assign({}, props, { style: Object.assign(Object.assign({}, props.style), parsedStyle), "data-squid-theme-type": themeType, className: cn("tw-group tw-relative tw-h-screen tw-font-geist mobile-lg:tw-h-auto", props.className), children: children })));
|
|
62226
62472
|
}
|
|
62227
62473
|
|
|
62228
62474
|
exports.ActionLayout = ActionLayout;
|
|
@@ -62258,6 +62504,7 @@ exports.AssetsView = AssetsView;
|
|
|
62258
62504
|
exports.BackpackIcon = BackpackIcon;
|
|
62259
62505
|
exports.BadgeImage = BadgeImage;
|
|
62260
62506
|
exports.BankIcon = BankIcon;
|
|
62507
|
+
exports.BellAlarmIcon = BellAlarmIcon;
|
|
62261
62508
|
exports.BlockSkeleton = BlockSkeleton;
|
|
62262
62509
|
exports.BodyText = BodyText;
|
|
62263
62510
|
exports.Boost = Boost;
|
|
@@ -62278,6 +62525,7 @@ exports.BuyNFTTransactionView = BuyNFTTransactionView;
|
|
|
62278
62525
|
exports.CSS_VARS = CSS_VARS;
|
|
62279
62526
|
exports.Calendar = Calendar;
|
|
62280
62527
|
exports.CaptionText = CaptionText;
|
|
62528
|
+
exports.CatSquareIcon = CatSquareIcon;
|
|
62281
62529
|
exports.ChainLink = ChainLink;
|
|
62282
62530
|
exports.Checkmark1Icon = Checkmark1Icon;
|
|
62283
62531
|
exports.Checkmark2Icon = Checkmark2Icon;
|
|
@@ -62294,18 +62542,22 @@ exports.CircleMinusIcon = CircleMinusIcon;
|
|
|
62294
62542
|
exports.CirclePlusIcon = CirclePlusIcon;
|
|
62295
62543
|
exports.CircleX = CircleX;
|
|
62296
62544
|
exports.CircleXFilledIcon = CircleXFilledIcon;
|
|
62297
|
-
exports.ClockIcon = ClockIcon;
|
|
62298
62545
|
exports.ClockOutlineIcon = ClockOutlineIcon;
|
|
62546
|
+
exports.ClockSolidIcon = ClockSolidIcon;
|
|
62547
|
+
exports.CodeBracketsIcon = CodeBracketsIcon;
|
|
62548
|
+
exports.CodeSolidSquareIcon = CodeSolidSquareIcon;
|
|
62299
62549
|
exports.CoinsAddIcon = CoinsAddIcon;
|
|
62300
62550
|
exports.CoinsIcon = CoinsIcon;
|
|
62301
62551
|
exports.Collapse = Collapse;
|
|
62302
62552
|
exports.CollapsibleMenu = CollapsibleMenu;
|
|
62303
62553
|
exports.CollectionIcon = CollectionIcon;
|
|
62304
62554
|
exports.ColorPaletteIcon = ColorPaletteIcon;
|
|
62555
|
+
exports.CommandIcon = CommandIcon;
|
|
62305
62556
|
exports.CompassRoundOutlinedIcon = CompassRoundOutlinedIcon;
|
|
62306
62557
|
exports.CompassRoundSolidIcon = CompassRoundSolidIcon;
|
|
62307
62558
|
exports.ConsoleIcon = ConsoleIcon;
|
|
62308
62559
|
exports.Copy = Copy;
|
|
62560
|
+
exports.CopyIcon = CopyIcon;
|
|
62309
62561
|
exports.CrossAnimatedIcon = CrossAnimatedIcon;
|
|
62310
62562
|
exports.DashboardFast = DashboardFast;
|
|
62311
62563
|
exports.DescriptionBlocks = DescriptionBlocks;
|
|
@@ -62318,24 +62570,31 @@ exports.DockIconProfile = DockIconProfile;
|
|
|
62318
62570
|
exports.DockIconScan = DockIconScan;
|
|
62319
62571
|
exports.DockIconSwap = DockIconSwap;
|
|
62320
62572
|
exports.DockSwapIcon = DockSwapIcon;
|
|
62321
|
-
exports.
|
|
62573
|
+
exports.DollarOutlinedIcon = DollarOutlinedIcon;
|
|
62574
|
+
exports.DollarSolidIcon = DollarSolidIcon;
|
|
62322
62575
|
exports.DotGrid1x3HorizontalIcon = DotGrid1x3HorizontalIcon;
|
|
62323
62576
|
exports.DropdownMenu = DropdownMenu;
|
|
62324
62577
|
exports.DropdownMenuItem = DropdownMenuItem;
|
|
62578
|
+
exports.DropdownMenuTitle = DropdownMenuTitle;
|
|
62325
62579
|
exports.EmojiMeh = EmojiMeh;
|
|
62326
62580
|
exports.EmojiSadIcon = EmojiSadIcon;
|
|
62327
62581
|
exports.EmptyHeartIcon = EmptyHeartIcon;
|
|
62328
62582
|
exports.ErrorMessage = ErrorMessage;
|
|
62329
62583
|
exports.EthereumIcon = EthereumIcon;
|
|
62330
62584
|
exports.ExplosionIcon = ExplosionIcon;
|
|
62585
|
+
exports.EyeOpenIcon = EyeOpenIcon;
|
|
62331
62586
|
exports.FeeButton = FeeButton;
|
|
62332
62587
|
exports.FeesAction = FeesAction;
|
|
62333
62588
|
exports.FeesLines = FeesLines;
|
|
62334
62589
|
exports.FeesTotal = FeesTotal;
|
|
62590
|
+
exports.FileDownloadIcon = FileDownloadIcon;
|
|
62335
62591
|
exports.FilledHeartIcon = FilledHeartIcon;
|
|
62592
|
+
exports.FilterAscendingIcon = FilterAscendingIcon;
|
|
62336
62593
|
exports.FilterButton = FilterButton;
|
|
62337
62594
|
exports.FilterIcon = FilterIcon;
|
|
62595
|
+
exports.FilterTimelineIcon = FilterTimelineIcon;
|
|
62338
62596
|
exports.GasIcon = GasIcon;
|
|
62597
|
+
exports.GhostIcon = GhostIcon;
|
|
62339
62598
|
exports.GithubIcon = GithubIcon;
|
|
62340
62599
|
exports.HashLink = HashLink;
|
|
62341
62600
|
exports.HeadingText = HeadingText;
|
|
@@ -62345,6 +62604,7 @@ exports.HistoryItem = HistoryItem;
|
|
|
62345
62604
|
exports.HomeIcon = HomeIcon;
|
|
62346
62605
|
exports.IconButton = IconButton;
|
|
62347
62606
|
exports.IconLabel = IconLabel;
|
|
62607
|
+
exports.Image = Image$1;
|
|
62348
62608
|
exports.ImageIcon = ImageIcon;
|
|
62349
62609
|
exports.ImageSparkle = ImageSparkle;
|
|
62350
62610
|
exports.IncompleteAction = IncompleteAction;
|
|
@@ -62356,7 +62616,9 @@ exports.InteractionHeader = InteractionHeader;
|
|
|
62356
62616
|
exports.InteractionProperties = InteractionProperties;
|
|
62357
62617
|
exports.InteractionTransactionView = InteractionTransactionView;
|
|
62358
62618
|
exports.Join = Join;
|
|
62619
|
+
exports.LaptopIcon = LaptopIcon;
|
|
62359
62620
|
exports.LightningIcon = LightningIcon;
|
|
62621
|
+
exports.LimitIcon = LimitIcon;
|
|
62360
62622
|
exports.LinkIcon = LinkIcon;
|
|
62361
62623
|
exports.List = List;
|
|
62362
62624
|
exports.ListItem = ListItem;
|
|
@@ -62380,9 +62642,11 @@ exports.NotAllowedIcon = NotAllowedIcon;
|
|
|
62380
62642
|
exports.NumericInput = NumericInput;
|
|
62381
62643
|
exports.PathSquareIcon = PathSquareIcon;
|
|
62382
62644
|
exports.PercentIcon = PercentIcon;
|
|
62645
|
+
exports.PhoneIcon = PhoneIcon;
|
|
62383
62646
|
exports.PieChartIcon = PieChartIcon;
|
|
62384
62647
|
exports.PipeSeparator = PipeSeparator;
|
|
62385
62648
|
exports.PlusIcon = PlusIcon;
|
|
62649
|
+
exports.PoopIcon = PoopIcon;
|
|
62386
62650
|
exports.PowerIcon = PowerIcon;
|
|
62387
62651
|
exports.ProductCard = ProductCard;
|
|
62388
62652
|
exports.ProfileHeader = ProfileHeader;
|
|
@@ -62406,6 +62670,7 @@ exports.SettingsButton = SettingsButton;
|
|
|
62406
62670
|
exports.SettingsGearIcon = SettingsGearIcon;
|
|
62407
62671
|
exports.SettingsItem = SettingsItem;
|
|
62408
62672
|
exports.SettingsSlider = SettingsSlider;
|
|
62673
|
+
exports.SettingsSliderIcon = SettingsSliderIcon;
|
|
62409
62674
|
exports.ShoppingBagIcon = ShoppingBagIcon;
|
|
62410
62675
|
exports.SizeTransition = SizeTransition;
|
|
62411
62676
|
exports.SmileIcon = SmileIcon;
|
|
@@ -62416,13 +62681,13 @@ exports.SparklesIcon = SparklesIcon;
|
|
|
62416
62681
|
exports.SquareArrowCenter = SquareArrowCenter;
|
|
62417
62682
|
exports.SquareArrowTopLeftIcon = SquareArrowTopLeftIcon;
|
|
62418
62683
|
exports.SquareArrowTopRight2Icon = SquareArrowTopRight2Icon;
|
|
62419
|
-
exports.SquidConfigProvider = SquidConfigProvider;
|
|
62420
62684
|
exports.SquidLogo = SquidLogo;
|
|
62421
62685
|
exports.StakeAction = StakeAction;
|
|
62422
62686
|
exports.StartAction = StartAction;
|
|
62423
62687
|
exports.StocksIcon = StocksIcon;
|
|
62424
62688
|
exports.SuccessAction = SuccessAction;
|
|
62425
62689
|
exports.SunIcon = SunIcon;
|
|
62690
|
+
exports.SunOutlinedIcon = SunOutlinedIcon;
|
|
62426
62691
|
exports.SunriseIcon = SunriseIcon;
|
|
62427
62692
|
exports.SwapAction = SwapAction;
|
|
62428
62693
|
exports.SwapConfiguration = SwapConfiguration;
|
|
@@ -62444,6 +62709,7 @@ exports.Switch = Switch;
|
|
|
62444
62709
|
exports.TagIcon = TagIcon;
|
|
62445
62710
|
exports.TagIconFilled = TagIconFilled;
|
|
62446
62711
|
exports.TextSkeleton = TextSkeleton;
|
|
62712
|
+
exports.ThemeProvider = ThemeProvider;
|
|
62447
62713
|
exports.ThumbsUp = ThumbsUp;
|
|
62448
62714
|
exports.Tick = Tick;
|
|
62449
62715
|
exports.TimeFliesIcon = TimeFliesIcon;
|
|
@@ -62485,4 +62751,5 @@ exports.useMediaQuery = useMediaQuery;
|
|
|
62485
62751
|
exports.useOnResize = useOnResize;
|
|
62486
62752
|
exports.useRect = useRect;
|
|
62487
62753
|
exports.useTimer = useTimer;
|
|
62754
|
+
exports.useUserTheme = useUserTheme;
|
|
62488
62755
|
exports.useVersion = useVersion;
|