@0xsquid/ui 0.27.0 → 0.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/cjs/index.js +962 -792
  2. package/dist/cjs/types/components/badges/IconLabel.d.ts +2 -2
  3. package/dist/cjs/types/components/badges/Image.d.ts +9 -0
  4. package/dist/cjs/types/components/badges/index.d.ts +1 -1
  5. package/dist/cjs/types/components/buttons/IconButton.d.ts +1 -1
  6. package/dist/cjs/types/components/controls/Switch.d.ts +4 -3
  7. package/dist/cjs/types/components/icons/Arrow.d.ts +4 -1
  8. package/dist/cjs/types/components/icons/Clock.d.ts +1 -1
  9. package/dist/cjs/types/components/icons/Coins.d.ts +5 -1
  10. package/dist/cjs/types/components/icons/Generic.d.ts +40 -0
  11. package/dist/cjs/types/components/icons/Search.d.ts +4 -1
  12. package/dist/cjs/types/components/icons/index.d.ts +1 -0
  13. package/dist/cjs/types/components/layout/DropdownMenu.d.ts +6 -3
  14. package/dist/cjs/types/components/layout/Menu.d.ts +2 -2
  15. package/dist/cjs/types/components/lists/DropdownMenuItem.d.ts +17 -2
  16. package/dist/cjs/types/components/lists/DropdownMenuTitle.d.ts +3 -0
  17. package/dist/cjs/types/components/lists/HistoryItem.d.ts +2 -3
  18. package/dist/cjs/types/components/lists/ListItem.d.ts +5 -4
  19. package/dist/cjs/types/components/lists/index.d.ts +1 -0
  20. package/dist/cjs/types/hooks/useDropdownMenu.d.ts +7 -3
  21. package/dist/cjs/types/stories/badges/ImageIcon.stories.d.ts +2 -2
  22. package/dist/cjs/types/stories/layout/DropdownMenu.stories.d.ts +4 -1
  23. package/dist/cjs/types/stories/lists/DropdownMenuItem.stories.d.ts +7 -2
  24. package/dist/cjs/types/stories/lists/DropdownMenuTitle.stories.d.ts +6 -0
  25. package/dist/cjs/types/stories/lists/HistoryItem.stories.d.ts +1 -0
  26. package/dist/cjs/types/types/components.d.ts +2 -2
  27. package/dist/cjs/types/types/index.d.ts +1 -0
  28. package/dist/cjs/types/types/utils.d.ts +11 -0
  29. package/dist/esm/index.js +949 -791
  30. package/dist/esm/types/components/badges/IconLabel.d.ts +2 -2
  31. package/dist/esm/types/components/badges/Image.d.ts +9 -0
  32. package/dist/esm/types/components/badges/index.d.ts +1 -1
  33. package/dist/esm/types/components/buttons/IconButton.d.ts +1 -1
  34. package/dist/esm/types/components/controls/Switch.d.ts +4 -3
  35. package/dist/esm/types/components/icons/Arrow.d.ts +4 -1
  36. package/dist/esm/types/components/icons/Clock.d.ts +1 -1
  37. package/dist/esm/types/components/icons/Coins.d.ts +5 -1
  38. package/dist/esm/types/components/icons/Generic.d.ts +40 -0
  39. package/dist/esm/types/components/icons/Search.d.ts +4 -1
  40. package/dist/esm/types/components/icons/index.d.ts +1 -0
  41. package/dist/esm/types/components/layout/DropdownMenu.d.ts +6 -3
  42. package/dist/esm/types/components/layout/Menu.d.ts +2 -2
  43. package/dist/esm/types/components/lists/DropdownMenuItem.d.ts +17 -2
  44. package/dist/esm/types/components/lists/DropdownMenuTitle.d.ts +3 -0
  45. package/dist/esm/types/components/lists/HistoryItem.d.ts +2 -3
  46. package/dist/esm/types/components/lists/ListItem.d.ts +5 -4
  47. package/dist/esm/types/components/lists/index.d.ts +1 -0
  48. package/dist/esm/types/hooks/useDropdownMenu.d.ts +7 -3
  49. package/dist/esm/types/stories/badges/ImageIcon.stories.d.ts +2 -2
  50. package/dist/esm/types/stories/layout/DropdownMenu.stories.d.ts +4 -1
  51. package/dist/esm/types/stories/lists/DropdownMenuItem.stories.d.ts +7 -2
  52. package/dist/esm/types/stories/lists/DropdownMenuTitle.stories.d.ts +6 -0
  53. package/dist/esm/types/stories/lists/HistoryItem.stories.d.ts +1 -0
  54. package/dist/esm/types/types/components.d.ts +2 -2
  55. package/dist/esm/types/types/index.d.ts +1 -0
  56. package/dist/esm/types/types/utils.d.ts +11 -0
  57. package/dist/index.css +1 -1
  58. package/dist/index.d.ts +818 -728
  59. package/package.json +1 -1
  60. package/dist/cjs/types/components/badges/ImageIcon.d.ts +0 -9
  61. package/dist/esm/types/components/badges/ImageIcon.d.ts +0 -9
package/dist/esm/index.js CHANGED
@@ -2770,7 +2770,7 @@ const sizeClassMap = {
2770
2770
  large: "tw-w-squid-l tw-shadow-elevation-light-2",
2771
2771
  xlarge: "tw-w-squid-xl tw-shadow-elevation-light-2",
2772
2772
  };
2773
- function ImageIcon({ src, variant = "proportional", size = "medium", className: propsClassName, }) {
2773
+ function Image$1({ src, variant = "proportional", size = "medium", className: propsClassName, }) {
2774
2774
  const className = cn("tw-bg-grey-300 tw-object-cover", variantClassMap$1[variant], sizeClassMap[size], propsClassName);
2775
2775
  if (src) {
2776
2776
  return jsx("img", { className: className, src: src });
@@ -2781,7 +2781,7 @@ function ImageIcon({ src, variant = "proportional", size = "medium", className:
2781
2781
  }
2782
2782
 
2783
2783
  function IconLabel({ src, children, variant }) {
2784
- return (jsxs("div", { className: "tw-inline-flex tw-items-center tw-gap-squid-xxs", children: [src && jsx(ImageIcon, { src: src, variant: variant }), typeof children === "string" ? (jsx(CaptionText, { children: children })) : (children)] }));
2784
+ return (jsxs("div", { className: "tw-inline-flex tw-items-center tw-gap-squid-xxs", children: [src && jsx(Image$1, { src: src, variant: variant }), typeof children === "string" ? (jsx(CaptionText, { children: children })) : (children)] }));
2785
2785
  }
2786
2786
 
2787
2787
  const LoadingContext = createContext(false);
@@ -2927,8 +2927,8 @@ function ChevronTopIcon({ className }) {
2927
2927
  function ChevronLargeRightIcon({ size = "16", className, }) {
2928
2928
  return (jsx("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M6.66675 14L9.64035 8.64754C9.86407 8.24484 9.86407 7.75519 9.64035 7.35249L6.66675 2", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
2929
2929
  }
2930
- function ChevronRightSmallIcon() {
2931
- return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: 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" }) }));
2930
+ function ChevronRightSmallIcon({ className, size = "16", }) {
2931
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", className: className, children: 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" }) }));
2932
2932
  }
2933
2933
  function ArrowLeftIcon({ className, size = "24", }) {
2934
2934
  return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: jsx("path", { d: "M10 6L4 12L10 18M5 12H20", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
@@ -3098,8 +3098,8 @@ const themeTypesKeys = Object.fromEntries(INTERNAL_SQUID_THEME_KEYS.map((key) =>
3098
3098
  },
3099
3099
  ]));
3100
3100
 
3101
- function SearchIcon() {
3102
- return (jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: 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" }) }));
3101
+ function SearchIcon({ className, size = "24", }) {
3102
+ return (jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "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" }) }));
3103
3103
  }
3104
3104
 
3105
3105
  function Input(_a) {
@@ -16841,7 +16841,7 @@ function DescriptionBlocks(_a) {
16841
16841
  .split(" ")
16842
16842
  .map((word, i) => (jsx(BodyText, { size: "small", tight: true, children: word }, i))));
16843
16843
  case "image":
16844
- return (jsx(ImageIcon, { src: block.value, variant: block.rounded ? "round" : "square" }, index));
16844
+ return (jsx(Image$1, { src: block.value, variant: block.rounded ? "round" : "square" }, index));
16845
16845
  }
16846
16846
  }) })));
16847
16847
  }
@@ -16902,7 +16902,7 @@ function ChainLink({ size = "16", strokeWidth = "2", }) {
16902
16902
  return (jsx("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: 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" }) }));
16903
16903
  }
16904
16904
 
16905
- function ClockIcon({ className, size = "16", }) {
16905
+ function ClockSolidIcon({ className, size = "16", }) {
16906
16906
  return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", className: className, children: 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" }) }));
16907
16907
  }
16908
16908
  function ClockOutlineIcon({ className, size = "24", }) {
@@ -16924,12 +16924,15 @@ function CoinsIcon() {
16924
16924
  function CoinsAddIcon() {
16925
16925
  return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", fill: "none", children: [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" }), 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" })] }));
16926
16926
  }
16927
- function Dollar({ className, size = "24", }) {
16927
+ function DollarOutlinedIcon({ className, size = "24", }) {
16928
16928
  return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: jsx("path", { d: "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" }) }));
16929
16929
  }
16930
16930
  function StocksIcon({ size = "24", className, }) {
16931
16931
  return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 25 24", fill: "none", className: className, children: jsx("path", { 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" }) }));
16932
16932
  }
16933
+ function DollarSolidIcon({ size = "20", className, }) {
16934
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "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" }) }));
16935
+ }
16933
16936
 
16934
16937
  function CollectionIcon() {
16935
16938
  return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", children: 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" }) }));
@@ -17229,6 +17232,37 @@ function DockIconHelp({ isSelected = false }) {
17229
17232
  return (jsxs("svg", { className: getDockIconClassname({ isSelected }), xmlns: "http://www.w3.org/2000/svg", width: "80", height: "80", viewBox: "0 0 100 100", fill: "none", children: [jsxs("g", { filter: "url(#filter0_dd_1744_41485)", children: [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" }), 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" })] }), jsxs("mask", { id: "path-3-outside-1_1744_41485", maskUnits: "userSpaceOnUse", x: "67.4766", y: "19.3555", width: "9", height: "9", fill: "black", children: [jsx("rect", { fill: "white", x: "67.4766", y: "19.3555", width: "9", height: "9" }), 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" })] }), 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" }), 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)" }), 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" }), 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" }), 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" }), jsx("path", { d: "M71.8123 23.1934L69.9766 25.0292", className: "tw-stroke-grey-300", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M73.1507 24.3089L70.6973 21.8555", className: "tw-stroke-grey-300", strokeLinecap: "round", strokeLinejoin: "round" }), 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" }), 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" }), 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" }), 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" }), 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" }), 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" }), 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" }), 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" }), jsx("defs", { children: jsxs("filter", { id: "filter0_dd_1744_41485", x: "0", y: "0", width: "100", height: "100", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [jsx("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), 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" }), jsx("feMorphology", { radius: "1", operator: "erode", in: "SourceAlpha", result: "effect1_dropShadow_1744_41485" }), jsx("feOffset", { dy: "5" }), jsx("feGaussianBlur", { stdDeviation: "10" }), jsx("feComposite", { in2: "hardAlpha", operator: "out" }), 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" }), jsx("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_1744_41485" }), 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" }), jsx("feOffset", { dy: "1" }), jsx("feGaussianBlur", { stdDeviation: "2.5" }), jsx("feComposite", { in2: "hardAlpha", operator: "out" }), 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" }), jsx("feBlend", { mode: "normal", in2: "effect1_dropShadow_1744_41485", result: "effect2_dropShadow_1744_41485" }), jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect2_dropShadow_1744_41485", result: "shape" })] }) })] }));
17230
17233
  }
17231
17234
 
17235
+ function GhostIcon({ size = "20", className, }) {
17236
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "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" }) }));
17237
+ }
17238
+ function SettingsSliderIcon({ size = "20", className, }) {
17239
+ return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsx("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" }), 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" })] }));
17240
+ }
17241
+ function EyeOpenIcon({ size = "20", className, }) {
17242
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "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" }) }));
17243
+ }
17244
+ function BellAlarmIcon({ size = "20", className, }) {
17245
+ return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsx("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" }), 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" })] }));
17246
+ }
17247
+ function LimitIcon({ size = "20", className, }) {
17248
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "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" }) }));
17249
+ }
17250
+ function PoopIcon({ size = "20", className, }) {
17251
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "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" }) }));
17252
+ }
17253
+ function CatSquareIcon({ size = "20", className, }) {
17254
+ return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsx("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" }), 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" }), 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" })] }));
17255
+ }
17256
+ function FilterAscendingIcon({ size = "20", className, }) {
17257
+ return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsx("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" }), 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" }), 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" })] }));
17258
+ }
17259
+ function ImageIcon({ size = "20", className, }) {
17260
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 25", fill: "none", className: className, children: 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" }) }));
17261
+ }
17262
+ function FilterTimelineIcon({ size = "20", className, }) {
17263
+ return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsx("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" }), 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" }), 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" }), 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" })] }));
17264
+ }
17265
+
17232
17266
  function FeeButton(_a) {
17233
17267
  var { feeInUsd = "0", chipLabel = "Fee", className, tooltip } = _a, props = __rest$1(_a, ["feeInUsd", "chipLabel", "className", "tooltip"]);
17234
17268
  return (jsx(Tooltip, Object.assign({}, tooltip, { tooltipWidth: "max", containerClassName: "tw-rounded-squid-m tw-w-full", childrenClassName: "tw-rounded-squid-m", children: jsxs("button", Object.assign({}, props, { className: cn("tw-flex tw-h-squid-xl tw-w-full tw-items-center tw-gap-x-squid-xs tw-rounded-squid-m tw-px-squid-xs hover:tw-bg-material-light-thin", className), children: [jsx(Chip, { label: chipLabel, className: "tw-hidden mobile-xs:tw-flex" }), jsxs("span", { className: "tw-flex tw-items-center", children: [jsx(UsdAmount, { usdAmount: feeInUsd }), jsx(ChevronDownSmallIcon, { className: "tw-text-grey-600" })] })] })) })));
@@ -17281,6 +17315,68 @@ const darkTheme = {
17281
17315
  "highlight-700": "#08A054",
17282
17316
  };
17283
17317
 
17318
+ var createPlugin$2 = {};
17319
+
17320
+ var createPlugin$1 = {};
17321
+
17322
+ (function (exports) {
17323
+ Object.defineProperty(exports, "__esModule", {
17324
+ value: true
17325
+ });
17326
+ Object.defineProperty(exports, "default", {
17327
+ enumerable: true,
17328
+ get: function() {
17329
+ return _default;
17330
+ }
17331
+ });
17332
+ function createPlugin(plugin, config) {
17333
+ return {
17334
+ handler: plugin,
17335
+ config
17336
+ };
17337
+ }
17338
+ createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {
17339
+ const optionsFunction = function(options) {
17340
+ return {
17341
+ __options: options,
17342
+ handler: pluginFunction(options),
17343
+ config: configFunction(options)
17344
+ };
17345
+ };
17346
+ optionsFunction.__isOptionsFunction = true;
17347
+ // Expose plugin dependencies so that `object-hash` returns a different
17348
+ // value if anything here changes, to ensure a rebuild is triggered.
17349
+ optionsFunction.__pluginFunction = pluginFunction;
17350
+ optionsFunction.__configFunction = configFunction;
17351
+ return optionsFunction;
17352
+ };
17353
+ const _default = createPlugin;
17354
+ } (createPlugin$1));
17355
+
17356
+ (function (exports) {
17357
+ Object.defineProperty(exports, "__esModule", {
17358
+ value: true
17359
+ });
17360
+ Object.defineProperty(exports, "default", {
17361
+ enumerable: true,
17362
+ get: function() {
17363
+ return _default;
17364
+ }
17365
+ });
17366
+ const _createPlugin = /*#__PURE__*/ _interop_require_default(createPlugin$1);
17367
+ function _interop_require_default(obj) {
17368
+ return obj && obj.__esModule ? obj : {
17369
+ default: obj
17370
+ };
17371
+ }
17372
+ const _default = _createPlugin.default;
17373
+ } (createPlugin$2));
17374
+
17375
+ let createPlugin = createPlugin$2;
17376
+ var plugin = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
17377
+
17378
+ var plugin$1 = /*@__PURE__*/getDefaultExportFromCjs(plugin);
17379
+
17284
17380
  const spacing$1 = {
17285
17381
  "squid-xxs": "0.3125rem", // 5px
17286
17382
  "squid-xs": "0.625rem", // 10px
@@ -17595,7 +17691,27 @@ const baseTailwindConfig = {
17595
17691
  }, {})),
17596
17692
  },
17597
17693
  },
17598
- plugins: [],
17694
+ plugins: [
17695
+ // custom classes available for anyone extending this config
17696
+ plugin$1(({ addUtilities }) => {
17697
+ addUtilities({
17698
+ ".focus-visible-within-outline:has(:focus-visible)": {
17699
+ "outline-style": "solid",
17700
+ "outline-width": "2px",
17701
+ "outline-color": `var(${themeTypesKeys["royal-500"].cssVariable})`,
17702
+ },
17703
+ ".scrollbar-hidden": {
17704
+ scrollbarWidth: "none",
17705
+ },
17706
+ ".highlight-adjacent:has(button:hover)>button:first-child": {
17707
+ backgroundColor: `var(${themeTypesKeys["material-light-thin"].cssVariable})`,
17708
+ },
17709
+ ".highlight-adjacent:has(*:hover) .hide-on-parent-hover": {
17710
+ opacity: "0",
17711
+ },
17712
+ });
17713
+ }),
17714
+ ],
17599
17715
  };
17600
17716
 
17601
17717
  function StopsButton(_a) {
@@ -17645,624 +17761,20 @@ function DetailsToolbar({ errorMessage, helpButton, isLoading, isEmpty, flipButt
17645
17761
  "group-hover/flip-button:tw-rotate-180") }) }) }))) }), jsx("div", { className: cn(detailClassName, "tw-justify-end"), children: !!stopsButton && jsx(StopsButton, Object.assign({}, stopsButton)) })] })) }));
17646
17762
  }
17647
17763
 
17648
- function DropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, link, }) {
17649
- const ContentTag = link ? "a" : "button";
17650
- const contentTagProps = link
17651
- ? {
17652
- href: link,
17653
- target: "_blank",
17654
- }
17655
- : {};
17656
- return (jsx("li", { className: "tw-max-h-squid-xl tw-w-full tw-px-squid-xxs", children: jsxs(ContentTag, Object.assign({}, contentTagProps, { onClick: (event) => {
17657
- event.stopPropagation();
17658
- onClick === null || onClick === void 0 ? void 0 : onClick();
17659
- }, 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: [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 ? (jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), jsx(CaptionText, { className: cn(labelClassName, "tw-max-w-full tw-truncate !tw-leading-[18px]"), children: label })] })) }));
17660
- }
17661
-
17662
- function useDropdownMenu(props) {
17663
- const { initialIsModalOpen, itemsContainerRef } = props !== null && props !== void 0 ? props : {};
17664
- const [isDropdownOpen, setIsModalOpen] = useState(Boolean(initialIsModalOpen));
17665
- const dropdownRef = useRef(null);
17666
- const openDropdownButtonRef = useRef(null);
17667
- useEffect(() => {
17668
- const handleClickOutside = (event) => {
17669
- var _a;
17670
- // close modal if the user clicked outside of it
17671
- if (dropdownRef.current &&
17672
- !dropdownRef.current.contains(event.target) &&
17673
- !((_a = openDropdownButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
17674
- setIsModalOpen(false);
17675
- }
17676
- };
17677
- document.addEventListener("click", handleClickOutside);
17678
- return () => {
17679
- document.removeEventListener("click", handleClickOutside);
17680
- };
17681
- }, [dropdownRef]);
17682
- const openDropdown = useCallback(() => {
17683
- setIsModalOpen((prev) => !prev);
17684
- }, []);
17685
- const closeDropdown = useCallback(() => {
17686
- setIsModalOpen(false);
17687
- }, []);
17688
- const [dropdownPosition, setDropdownPosition] = useState(null);
17689
- const itemRef = useRef(null);
17690
- const menuRef = useRef(null);
17691
- // Effect to find the best position for the dropdown menu, so it's always visible for the user
17692
- useEffect(() => {
17693
- var _a;
17694
- if (!isDropdownOpen) {
17695
- // when the dropdown is closed, we want to reset its position
17696
- // because user may scroll, and the old position may be out of view, so we'll need to recalculate it
17697
- setDropdownPosition(null);
17698
- return;
17699
- }
17700
- const item = itemRef.current;
17701
- 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;
17702
- const dropdownMenu = menuRef.current;
17703
- if (!item || !dropdownRef.current || !itemsContainer || !dropdownMenu) {
17704
- return;
17705
- }
17706
- // Get the bounding rectangle of the item
17707
- const itemRect = item.getBoundingClientRect();
17708
- // Get the bounding rectangle of the container element
17709
- const containerRect = itemsContainer.getBoundingClientRect();
17710
- // Calculate the bottom position of the visible area of the the items container
17711
- const containerVisibleBottom = containerRect.top + containerRect.height;
17712
- // Calculate the distance from the bottom of the item to the visible bottom of the items container
17713
- const distanceBetweenItemBottomAndContainerBottomEdge = containerVisibleBottom - itemRect.bottom;
17714
- // the same but for the top
17715
- const distanceBetweenItemTopAndContainerTopEdge = itemRect.top - containerRect.top;
17716
- const dropdownMenuHeight = dropdownMenu.clientHeight;
17717
- // check if the height of the dropdown is less than the longest distance, either top or bottom
17718
- // if so, means that the dropdown keeps visible when positioned at the top or bottom of the item
17719
- const isDropdownVisibleAtItemTopOrBottom = dropdownMenuHeight <=
17720
- Math.max(distanceBetweenItemBottomAndContainerBottomEdge, distanceBetweenItemTopAndContainerTopEdge);
17721
- // if the dropdown is not visible at top or bottom of the item
17722
- // we just center it
17723
- if (!isDropdownVisibleAtItemTopOrBottom) {
17724
- return setDropdownPosition("center");
17725
- }
17726
- // finally, if the dropdown fits, position it where it has more space
17727
- if (distanceBetweenItemBottomAndContainerBottomEdge >=
17728
- distanceBetweenItemTopAndContainerTopEdge) {
17729
- setDropdownPosition("bottom");
17730
- }
17731
- else {
17732
- setDropdownPosition("top");
17733
- }
17734
- }, [isDropdownOpen, menuRef, dropdownPosition, itemRef]);
17735
- return {
17736
- isDropdownOpen,
17737
- openDropdown,
17738
- closeDropdown,
17739
- dropdownRef,
17740
- openDropdownButtonRef,
17741
- dropdownPosition,
17742
- itemRef,
17743
- menuRef,
17744
- };
17745
- }
17746
-
17747
- const IS_SERVER = typeof window === "undefined";
17748
- const useIsomorphicLayoutEffect$1 = IS_SERVER ? useEffect : useLayoutEffect;
17749
- /**
17750
- * 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).
17751
- * @param {string} query - The media query to track.
17752
- * @param {?UseMediaQueryOptions} [options] - The options for customizing the behavior of the hook (optional).
17753
- * @returns {boolean} The current state of the media query (true if the query matches, false otherwise).
17754
- * @public
17755
- * @example
17756
- * ```tsx
17757
- * const isSmallScreen = useMediaQuery('(max-width: 600px)');
17758
- * // Use `isSmallScreen` to conditionally apply styles or logic based on the screen size.
17759
- * ```
17760
- */
17761
- function useMediaQuery(query, { defaultValue = false, initializeWithValue = true, } = {}) {
17762
- const getMatches = (query) => {
17763
- if (IS_SERVER) {
17764
- return defaultValue;
17765
- }
17766
- return window.matchMedia(query).matches;
17767
- };
17768
- const [matches, setMatches] = useState(() => {
17769
- if (initializeWithValue) {
17770
- return getMatches(query);
17771
- }
17772
- return defaultValue;
17773
- });
17774
- // Handles the change event of the media query.
17775
- function handleChange() {
17776
- setMatches(getMatches(query));
17777
- }
17778
- useIsomorphicLayoutEffect$1(() => {
17779
- const matchMedia = window.matchMedia(query);
17780
- // Triggered at the first client-side load and if query changes
17781
- handleChange();
17782
- // Use deprecated `addListener` and `removeListener` to support Safari < 14 (#135)
17783
- if (matchMedia.addListener) {
17784
- matchMedia.addListener(handleChange);
17785
- }
17786
- else {
17787
- matchMedia.addEventListener("change", handleChange);
17788
- }
17789
- return () => {
17790
- if (matchMedia.removeListener) {
17791
- matchMedia.removeListener(handleChange);
17792
- }
17793
- else {
17794
- matchMedia.removeEventListener("change", handleChange);
17795
- }
17796
- };
17797
- }, [query]);
17798
- return matches;
17799
- }
17800
-
17801
- function useCollapsibleMenu() {
17802
- const [isMenuOpen, setIsMenuOpen] = useState(false);
17803
- const menuRef = useRef(null);
17804
- const toggleMenu = () => {
17805
- setIsMenuOpen(!isMenuOpen);
17806
- };
17807
- useEffect(() => {
17808
- const handleClickOutside = (event) => {
17809
- if (menuRef.current && !menuRef.current.contains(event.target)) {
17810
- setIsMenuOpen(false);
17811
- }
17812
- };
17813
- document.addEventListener("mousedown", handleClickOutside);
17814
- return () => document.removeEventListener("mousedown", handleClickOutside);
17815
- }, []);
17816
- return {
17817
- isMenuOpen,
17818
- toggleMenu,
17819
- menuRef,
17820
- };
17821
- }
17822
-
17823
- const useTimer = ({ immediateStart = true, }) => {
17824
- const [timer, setTimer] = useState("0s");
17825
- const intervalRef = useRef(null);
17826
- const startTimer = () => {
17827
- if (intervalRef.current !== null)
17828
- return; // Prevent multiple intervals
17829
- const startTime = Date.now();
17830
- intervalRef.current = window.setInterval(() => {
17831
- const elapsedTime = Date.now() - startTime;
17832
- setTimer(formatDuration(elapsedTime));
17833
- }, 1000);
17834
- };
17835
- const stopTimer = () => {
17836
- if (intervalRef.current !== null) {
17837
- clearInterval(intervalRef.current);
17838
- intervalRef.current = null;
17839
- }
17840
- };
17841
- useEffect(() => {
17842
- if (immediateStart) {
17843
- startTimer();
17844
- }
17845
- return () => {
17846
- stopTimer();
17847
- };
17848
- }, [immediateStart]);
17849
- return { timer, stopTimer, startTimer };
17850
- };
17851
-
17852
- const dropdownPositionClassMap$1 = {
17853
- top: "tw-right-[calc(100%-10px)] tw-bottom-7",
17854
- bottom: "tw-right-[calc(100%-10px)] tw-top-7",
17855
- center: "tw-right-[40px] -tw-top-[55px]",
17856
- };
17857
- const listItemSizeMap = {
17858
- small: "tw-h-list-item-small",
17859
- large: "tw-h-list-item-large",
17860
- };
17861
- const collapsedListItemClassMap = {
17862
- small: "tw-w-[70px]",
17863
- large: "tw-w-[80px]",
17864
- };
17865
- function ListItem(_a) {
17866
- 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"]);
17867
- 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");
17868
- // 'small' variant does not have detail
17869
- const showDetail = size === "large" && (!!detail || !!icon || showDetailOnHoverOnly);
17870
- const isDetailInteractive = !!onDetailClick;
17871
- const DetailTag = isDetailInteractive ? "button" : "div";
17872
- const detailProps = isDetailInteractive
17873
- ? {
17874
- onClick: (event) => {
17875
- // prevent click event from bubbling up to parent
17876
- event.stopPropagation();
17877
- onDetailClick === null || onDetailClick === void 0 ? void 0 : onDetailClick();
17878
- },
17879
- }
17880
- : {};
17881
- // There are two possible ways to handle loading state:
17882
- // Can be boolean or string
17883
- // If boolean and true, it will show a full loading skeleton
17884
- // If it's a non empty string, means that we want to display the skeleton + some text
17885
- const loadingComponent = () => {
17886
- if ((loading === null || loading === void 0 ? void 0 : loading.subtitle) === true) {
17887
- return jsx(TextSkeleton, { width: "50px", className: "tw-h-2.5", isLoading: true });
17888
- }
17889
- if (typeof (loading === null || loading === void 0 ? void 0 : loading.subtitle) === "string" && loading.subtitle.length > 0) {
17890
- return (jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsx(TextSkeleton, { width: "50px", className: "tw-h-2.5", isLoading: true }), jsx(CaptionText, { className: subtitleClassName, children: loading.subtitle })] }));
17891
- }
17892
- return null;
17893
- };
17894
- const isInteractive = !!props.onClick;
17895
- const ItemTag = isInteractive ? "button" : "div";
17896
- const itemProps = isInteractive ? props : {};
17897
- const { isDropdownOpen, dropdownRef, openDropdownButtonRef, openDropdown, closeDropdown, itemRef, menuRef, dropdownPosition, } = useDropdownMenu({
17898
- itemsContainerRef,
17899
- });
17900
- const dropdownMenuItems = _dropdownMenuItemsProp === null || _dropdownMenuItemsProp === void 0 ? void 0 : _dropdownMenuItemsProp.map((item) => (Object.assign(Object.assign({}, item), { onClick: () => {
17901
- var _a;
17902
- (_a = item.onClick) === null || _a === void 0 ? void 0 : _a.call(item);
17903
- closeDropdown();
17904
- } })));
17905
- return (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
17906
- ? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
17907
- : "tw-w-full", className), children: 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" ? (jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon ? (mainIcon) : (jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, placeholderImageUrl: placeholderImageUrl, size: "md", rounded: rounded })) })) : (jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon ? (mainIcon) : (jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), 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",
17908
- // 'large' variant has extra padding
17909
- size === "large" ? "tw-w-[56%] tw-pl-squid-xxs" : "tw-w-[67%]"), children: [typeof itemTitle === "string" ? (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" &&
17910
- ((loading === null || loading === void 0 ? void 0 : loading.subtitle) ? (loadingComponent()) : subtitle ? (jsxs(CaptionText, { className: subtitleClassName, children: [subtitleOnHover && (jsx(CaptionText, { className: cn(subtitleClassName, "tw-hidden group-hover/list-item:tw-block"), children: subtitleOnHover })), subtitle] })) : null)] }), showDetail && (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
17911
- ? "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"
17912
- : "tw-flex", isDetailInteractive && "hover:tw-bg-material-light-thin", detailButtonClassName), children: [!!detail && (jsx(CaptionText, { className: "min-tw-w-4 min-tw-h-4 tw-px-squid-xxs tw-leading-[10px]", children: detail })), icon ? (jsx("span", { className: "tw-flex tw-items-center tw-justify-center tw-px-[3px] tw-py-2", children: icon })) : null] }))), !!dropdownMenuItems && (jsx(ListItemActionsButton, { onClick: openDropdown, ref: openDropdownButtonRef, className: "tw-opacity-0 group-hover/list-item:tw-opacity-100" })), isDropdownOpen && !!dropdownMenuItems ? (jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownPosition, className: cn(!!dropdownPosition && dropdownPositionClassMap$1[dropdownPosition]), dropdownRef: dropdownRef, items: dropdownMenuItems })) : null] })) })));
17913
- }
17914
- const ListItemActionsButton = forwardRef((props) => {
17915
- return (jsx("button", Object.assign({}, props, { onClick: (event) => {
17916
- var _a;
17917
- event.stopPropagation();
17918
- (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
17919
- }, 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: jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })));
17920
- });
17921
-
17922
- const dropdownPositionClassMap = {
17923
- top: "tw-right-[calc(100%-10px)] tw-bottom-7",
17924
- bottom: "tw-right-[calc(100%-10px)] tw-top-7",
17925
- center: "tw-right-[40px] -tw-top-[55px]",
17926
- };
17927
- const statusBadge = {
17928
- completed: {},
17929
- pending: {
17930
- badge: (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" })),
17931
- containerClassName: "tw-bg-royal-400",
17932
- },
17933
- failed: {
17934
- badge: (jsx("span", { className: "tw-bg-grey-900", children: jsx(EmojiSadIcon, { className: "tw-text-status-negative" }) })),
17935
- containerClassName: "tw-bg-status-negative",
17936
- },
17937
- warning: {
17938
- badge: (jsx("span", { className: "tw-bg-grey-900", children: jsx(EmojiMeh, { className: "tw-text-status-partial" }) })),
17939
- containerClassName: "tw-bg-status-partial",
17940
- },
17941
- };
17942
- function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuItems: _dropdownMenuItemsProp, itemsContainerRef, status, warningLabel, onClick, }) {
17943
- const { isDropdownOpen, dropdownRef, openDropdownButtonRef, openDropdown, closeDropdown, itemRef, menuRef, dropdownPosition, } = useDropdownMenu({
17944
- itemsContainerRef,
17945
- });
17946
- const dropdownMenuItems = _dropdownMenuItemsProp === null || _dropdownMenuItemsProp === void 0 ? void 0 : _dropdownMenuItemsProp.map((item) => (Object.assign(Object.assign({}, item), { onClick: () => {
17947
- var _a;
17948
- (_a = item.onClick) === null || _a === void 0 ? void 0 : _a.call(item);
17949
- closeDropdown();
17950
- } })));
17951
- const statusLabel = useMemo(() => {
17952
- switch (status) {
17953
- case "completed":
17954
- return jsx(CaptionText, { children: dateCompleted });
17955
- case "pending":
17956
- return jsx(CaptionText, { className: "tw-text-royal-400", children: "Pending" });
17957
- case "failed":
17958
- return (jsxs(Fragment, { children: [jsx(CaptionText, { className: "tw-text-status-negative", children: "Fail" }), jsx(CaptionText, { children: dateCompleted })] }));
17959
- case "warning":
17960
- return (jsx(CaptionText, { className: "tw-text-status-partial", children: warningLabel }));
17961
- default:
17962
- return null;
17963
- }
17964
- }, [status, dateCompleted]);
17965
- const isInteractive = !!onClick;
17966
- const ItemTag = isInteractive ? "button" : "div";
17967
- const itemTagProps = isInteractive
17968
- ? {
17969
- onClick,
17970
- }
17971
- : {};
17972
- return (jsx("li", { ref: itemRef, className: "tw-h-list-item-large tw-min-w-list-item-small tw-self-stretch tw-bg-grey-900 tw-px-squid-xs tw-text-grey-300", children: jsxs(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: [jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [!!statusBadge[status].badge && (jsx("span", { className: cn("tw-absolute -tw-left-[5px] tw-bottom-0 tw-z-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 })), jsx("img", { src: firstImageUrl, className: "tw-absolute tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" }), jsx("img", { src: secondImageUrl, className: "tw-absolute tw-left-5 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" })] }), jsxs("div", { className: "tw-flex tw-h-10 tw-flex-1 tw-flex-col tw-self-stretch", children: [jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-justify-between tw-text-grey-500", children: [jsxs("div", { className: "tw-flex tw-items-center", children: [jsx(CaptionText, { children: fromLabel }), jsx("span", { className: "tw-text-grey-600", children: jsx(ChevronRightSmallIcon, {}) }), jsx(CaptionText, { children: toLabel })] }), !!dropdownMenuItems && (jsx(ListItemActionsButton, { onClick: openDropdown, ref: openDropdownButtonRef, className: "tw-opacity-0 group-hover/history-item:tw-opacity-100" })), jsx("div", { className: cn("tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs", !!dropdownMenuItems &&
17973
- "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 })] }), jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: [jsx(BodyText, { size: "small", children: fromAmount }), jsx("span", { className: "tw-text-grey-600", children: jsx(ChevronLargeRightIcon, {}) }), jsx(BodyText, { size: "small", children: toAmount })] })] }), isDropdownOpen && !!dropdownMenuItems ? (jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownPosition, className: cn(!!dropdownPosition && dropdownPositionClassMap[dropdownPosition]), dropdownRef: dropdownRef, items: dropdownMenuItems })) : null] })) }));
17974
- }
17975
-
17976
- function MenuItem({ label, imageUrl, icon }) {
17977
- return (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: [jsx("div", { className: "tw-h-squid-m tw-w-squid-m", children: imageUrl ? (jsx("img", { className: "tw-h-full tw-w-full tw-rounded-squid-xxs", src: imageUrl, alt: "" })) : icon ? (icon) : null }), jsx(CaptionText, { children: label })] }));
17978
- }
17979
-
17980
- const containerVariantClassNameMap = {
17981
- small: "tw-px-squid-xs",
17982
- large: "tw-px-squid-0",
17983
- };
17984
- const childrenVariantClassNameMap = {
17985
- small: "tw-min-h-squid-l tw-px-squid-xs",
17986
- large: "tw-min-h-squid-xl tw-px-squid-m",
17987
- };
17988
- function SmallBodyText(props) {
17989
- return jsx(BodyText, Object.assign({ size: "small" }, props));
17990
- }
17991
- function PropertyListItem(_a) {
17992
- 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"]);
17993
- const Text = variant === "small" ? CaptionText : SmallBodyText;
17994
- return (jsx("li", Object.assign({}, props, { className: cn("tw-flex tw-w-full tw-gap-squid-xs tw-rounded-squid-xs tw-text-grey-300", showGradientBg && "squid-property-row-bg", containerVariantClassNameMap[variant], className), children: jsxs("div", { className: cn("tw-flex tw-h-squid-l tw-w-full tw-items-center tw-justify-between tw-gap-squid-xs tw-rounded-squid-xs", childrenVariantClassNameMap[variant]), children: [jsx("div", { className: cn("tw-w-6 tw-text-grey-500", iconClassName), children: icon }), jsx(Text, { className: cn("tw-flex-1 tw-text-grey-400", labelClassName), children: jsx(TextSkeleton, { isLoading: isLoading, children: label }) }), jsx(Text, { className: cn("tw-flex tw-text-grey-300", detailClassName), children: jsx(TextSkeleton, { isLoading: isLoading, children: detail }) })] }) })));
17995
- }
17996
-
17997
- function SectionTitle(_a) {
17998
- var { title, icon, accessory, actionIcon, className } = _a, props = __rest$1(_a, ["title", "icon", "accessory", "actionIcon", "className"]);
17999
- return (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, jsx(CaptionText, { children: title }), accessory ? (jsx(CaptionText, { className: "tw-flex-1 tw-text-right tw-text-grey-500", children: accessory })) : actionIcon ? (jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end", children: actionIcon })) : null] })));
18000
- }
18001
-
18002
- function SettingsItem({ icon, label, control, link, transparent = false, helpTooltip, }) {
18003
- const ContentTag = link ? "a" : "div";
18004
- const contentTagProps = link
18005
- ? {
18006
- href: link,
18007
- target: "_blank",
18008
- }
18009
- : {};
18010
- const helpIcon = !!helpTooltip && (jsx(HelpIcon, { className: "tw-cursor-help tw-text-grey-600 hover:tw-text-grey-400" }));
18011
- const showDetailsBorder = !!control && !link && !(control.type === "switch");
18012
- return (jsx("li", { className: cn("tw-h-[50px] tw-self-stretch tw-px-squid-xs", transparent ? "tw-bg-transparent" : "tw-bg-grey-800"), children: jsxs(ContentTag, Object.assign({ className: cn("tw-flex tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xs tw-text-grey-300", link && "hover:tw-bg-material-light-thin") }, contentTagProps, { children: [icon, jsxs("div", { className: "tw-flex tw-flex-1 tw-items-center tw-gap-squid-xxs tw-self-stretch", children: [jsx(BodyText, { size: "small", children: label }), helpTooltip ? (jsx(Tooltip, Object.assign({}, helpTooltip, { children: helpIcon }))) : (jsx(Fragment, { children: helpIcon }))] }), jsx("div", { className: cn("tw-flex tw-h-squid-l tw-items-center tw-justify-center tw-rounded-squid-xs", showDetailsBorder &&
18013
- "tw-rounded-squid-xs tw-border tw-border-solid tw-border-material-light-thin tw-bg-material-dark-thin"), children: !!link ? (jsx(SquareArrowTopRight2Icon, { className: "tw-text-material-light-average" })) : (!!control && (jsxs(Fragment, { children: [control.type === "amount" && (jsxs(Fragment, { children: [jsx(SettingsButton, { onClick: () => control.onChange(control.resetValueControl.value), label: control.resetValueControl.label, isSelected: control.resetValueControl.value === control.value }), control.options.map(({ value }, index, _controls) => (jsx(SettingsButton, { label: "$" + value, isSelected: control.value === value, onClick: () => control.onChange(value) }, index))), jsx(SettingsSlider, { type: control.type, value: control.value, isSelected: control.value !== control.resetValueControl.value, onChange: control.onChange, decimalsFormat: control.decimalsFormat, max: 999 })] })), control.type === "switch" &&
18014
- (control.tooltip ? (jsx(Tooltip, Object.assign({}, control.tooltip, { children: jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }) }))) : (jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }))), control.type === "percentage" && (jsxs(Fragment, { children: [jsx(SettingsButton, { label: control.resetValueControl.label, isSelected: control.resetValueControl.value === control.value, onClick: control.resetValueControl.onSelect }), jsx(SettingsSlider, { onChange: control.onChange, value: control.value, type: "percentage", isSelected: control.value !== control.resetValueControl.value, decimalsFormat: control.decimalsFormat, max: control.max, min: control.min })] })), control.type === "options" && (jsx(Fragment, { children: control.options.map(({ label, onSelect }, index) => (jsx(SettingsButton, { label: label, isSelected: control.selectedLabel === label, onClick: onSelect }, index))) }))] }))) })] })) }));
18015
- }
18016
-
18017
- const STEP_ITEM_HEIGHT = 52;
18018
- const statusBgClassMap = {
18019
- executed: "!tw-bg-grey-300",
18020
- ongoing: "!tw-bg-grey-300",
18021
- pending: "!tw-bg-grey-600",
18022
- waiting: "!tw-bg-grey-300",
18023
- error: "!tw-bg-status-negative",
18024
- success: "!tw-bg-status-positive",
18025
- warning: "!tw-bg-status-partial",
18026
- };
18027
- const separatorClassMap = {
18028
- executed: "tw-text-grey-300",
18029
- ongoing: "tw-text-grey-300",
18030
- pending: "tw-text-grey-600",
18031
- waiting: "tw-text-grey-300",
18032
- error: "tw-text-status-negative",
18033
- success: "tw-text-status-positive",
18034
- warning: "tw-text-status-partial",
18035
- };
18036
- function SwapStepItem({ descriptionBlocks, showStepSeparator = false, link, status = "pending", }) {
18037
- // these styles are located here instead of outside the component
18038
- // so they are updated whenever the animation duration changes
18039
- const transitionStyle = {
18040
- transition: `background-color ${ANIMATION_DURATIONS.CHANGE_SWAP_STEP}ms, color ${ANIMATION_DURATIONS.CHANGE_SWAP_STEP}ms`,
18041
- };
18042
- const chipContent = useMemo(() => {
18043
- switch (status) {
18044
- case "success":
18045
- case "executed":
18046
- return jsx(Checkmark1Icon, {});
18047
- case "error":
18048
- return jsx(EmojiSadIcon, { size: "16" });
18049
- case "warning":
18050
- return jsx(EmojiMeh, { size: "16" });
18051
- case "waiting":
18052
- return jsx(DotGrid1x3HorizontalIcon, {});
18053
- case "pending":
18054
- return null;
18055
- case "ongoing":
18056
- return jsx(Loader, { size: "16", strokeWidth: "4" });
18057
- default:
18058
- return null;
18059
- }
18060
- }, [status]);
18061
- const statusTextClass = useMemo(() => {
18062
- switch (status) {
18063
- case "pending":
18064
- return "tw-text-grey-600";
18065
- default:
18066
- return "tw-text-grey-300";
18067
- }
18068
- }, [status]);
18069
- return (jsx("li", { style: {
18070
- maxHeight: `${STEP_ITEM_HEIGHT}px`,
18071
- minHeight: `${STEP_ITEM_HEIGHT}px`,
18072
- }, 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: 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: [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: [jsx(Chip, { style: transitionStyle, className: cn("tw-w-squid-xl", statusBgClassMap[status]), icon: chipContent }), showStepSeparator && (jsx("span", { className: cn(separatorClassMap[status], "tw-absolute tw-left-0 tw-top-full tw-mt-0.5"), style: transitionStyle, children: jsx(SwapStepSeparator, {}) }))] }), jsx(DescriptionBlocks, { className: "tw-min-h-squid-l tw-py-squid-xxs tw-pr-squid-xs", blocks: descriptionBlocks })] }) }));
18073
- }
18074
-
18075
- function PipeSeparator(_a) {
18076
- var { className } = _a, props = __rest$1(_a, ["className"]);
18077
- return (jsx("div", Object.assign({}, props, { className: cn("tw-h-[0.8em] tw-w-[2px] tw-rounded-full tw-bg-[currentColor]", className) })));
18078
- }
18079
-
18080
- function ActionLayout({ lineCap = jsx(Timeline.CapTop, {}), status = "executed", showTimeline = true, showBody = true, nextStatus, statusIcon, description, title, icon, children, }) {
18081
- return (jsxs(ActionWrapper, { status: status, children: [jsx(ActionLineOutRow, { status: nextStatus }), jsx(ActionStatusRow, { status: status, icon: statusIcon, children: description }), title && (jsxs(Fragment, { children: [jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", statusTextClassMap[status]), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {}), jsx(Timeline.CapBottom, {})] }) }), jsxs(ActionRow, { children: [jsx("div", { className: "tw-flex tw-items-center tw-justify-center", children: icon }), 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 })] })] })), jsxs(ActionRow, { children: [jsxs(Timeline, { className: showTimeline ? statusTextClassMap[status] : "!tw-text-[transparent]", children: [lineCap, jsx(Timeline.Straight, {})] }), 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 })] })] }));
18082
- }
18083
- function ActionProperties({ timestamp, hash, url, }) {
18084
- return (jsxs(CaptionText, { className: "tw-flex tw-items-center tw-gap-squid-xs", children: [timestamp && jsx(Timestamp, { time: timestamp }), timestamp && hash && jsx(PipeSeparator, { className: "tw-text-grey-700" }), hash && jsx(HashLink, { hash: hash, url: url, showTx: true })] }));
18085
- }
18086
- function renderStatusIcon(status, defaultIcon) {
18087
- switch (status) {
18088
- case "success":
18089
- return jsx(TransactionState, { status: "success", variant: "compact" });
18090
- case "executed":
18091
- return (jsx(TransactionState, { status: "executed", variant: "compact", icon: defaultIcon }));
18092
- case "error":
18093
- return jsx(EmojiSadIcon, { className: "tw-text-status-negative" });
18094
- case "ongoing":
18095
- return (jsx(Loader, { className: statusTextClassMap.ongoing, strokeWidth: "4", size: "20" }));
18096
- case "waiting":
18097
- return jsx(TransactionState, { status: "waiting", variant: "compact" });
18098
- case "warning":
18099
- return jsx(TransactionState, { status: "warning", variant: "compact" });
18100
- }
18101
- }
18102
- const ActionLineOutRow = ({ status }) => (jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", status ? statusTextClassMap[status] : "!tw-text-[transparent]"), children: [jsx(Timeline.Straight, {}), jsx(Timeline.CapBottom, {})] }) }));
18103
- const ActionStatusRow = ({ children, status, icon, }) => (jsxs(ActionRow, { children: [jsx("div", { className: "tw-flex tw-items-center tw-justify-center", children: renderStatusIcon(status, icon) }), jsx("div", { className: "tw-flex tw-items-center", children: jsx(BodyText, { size: "small", tight: true, className: "tw-block tw-w-full tw-text-grey-300", children: children }) })] }));
18104
- function ActionRow(_a) {
18105
- var { className } = _a, props = __rest$1(_a, ["className"]);
18106
- return (jsx("div", Object.assign({}, props, { className: cn("tw-grid tw-grid-cols-[40px,1fr,60px] tw-gap-squid-xs tw-pl-squid-m", className) })));
18107
- }
18108
- function ActionWrapper({ children, status, className, }) {
18109
- return (jsx("div", { className: cn("tw-relative tw-flex tw-flex-col tw-gap-squid-xxs", status === "waiting" && "tw-bg-grey-800", className), children: children }));
18110
- }
18111
- function Timestamp({ time }) {
18112
- return (jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-text-grey-500", children: [formatRelativeDate(time), jsx("span", { className: "tw-text-grey-700", children: "\u2022" }), formatTime(time)] }));
18113
- }
18114
-
18115
- function ApproveAction({ status, nextStatus, showTimeline, showBody, profile, chain, wallet, timestamp, hash, url, }) {
18116
- return (jsxs(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(ThumbsUp, { fill: true }), description: "Approve contract", title: profile.label, icon: jsx(ImageIcon, { src: profile.imageURI, variant: "round", size: "xlarge" }), lineCap: jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxs(BodyText, { className: "tw-flex tw-items-center tw-gap-squid-xs", size: "small", children: [jsx(IconLabel, { src: chain.logoURI, children: chain.name }), jsx(PipeSeparator, { className: "tw-text-grey-300" }), jsx(WalletLink, Object.assign({}, wallet))] }) }), (timestamp || hash) && (jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }))] }));
18117
- }
18118
-
18119
- function BridgeAction({ status, nextStatus, showTimeline, showBody, token, chain, provider, timestamp, hash, url, }) {
18120
- return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(SquareArrowTopLeftIcon, {}), description: jsxs(Inline, { children: ["Bridge", jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: token.symbol }) }), "to", jsx(IconLabel, { src: chain.logoURI, children: jsx(BodyText, { size: "small", children: chain.name }) }), "via", jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: (timestamp || hash) && (jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
18121
- }
18122
-
18123
- function FeesAction({ status, nextStatus, showTimeline = false, total, lines, }) {
18124
- return (jsxs(Fragment, { children: [jsx(FeesTotal, { status: status, nextStatus: nextStatus, total: total, showTimeline: lines !== undefined || showTimeline }), lines && (jsx(FeesLines, { status: status, lines: lines, showTimeline: showTimeline }))] }));
18125
- }
18126
- function FeesTotal({ status, nextStatus, total, showTimeline, collapsed, }) {
18127
- return (jsxs(ActionWrapper, { status: status, children: [jsx(ActionLineOutRow, { status: nextStatus }), jsx(ActionStatusRow, { status: status, icon: jsx(TagIconFilled, {}), children: jsx(FeesRow, Object.assign({ collapsed: collapsed }, total)) }), jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", showTimeline ? statusTextClassMap[status] : "tw-text-transparent"), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] }) })] }));
18128
- }
18129
- function FeesLines({ status, lines, showTimeline = false, }) {
18130
- return (jsxs(ActionWrapper, { status: status, children: [lines && (jsx("div", { children: lines.map((line, index) => (jsxs(Fragment, { children: [index > 0 && (jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", statusTextClassMap[status]), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] }) })), jsxs(ActionRow, { children: [jsxs(Timeline, { className: statusTextClassMap[status], children: [jsx(Timeline.Straight, {}), jsx(Timeline.ArrowRight, {})] }), jsx("div", { className: "tw-relative tw-top-[2px] tw-flex tw-items-end", children: jsx(FeesRow, Object.assign({}, line)) })] })] }, index))) })), jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", showTimeline
18131
- ? statusTextClassMap[status]
18132
- : "!tw-text-[transparent]"), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] }) })] }));
18133
- }
18134
- function FeesRow({ label, usd, amount, symbol, collapsed = false, }) {
18135
- return (jsxs("div", { className: "tw-flex tw-w-full tw-gap-squid-xs", children: [jsx(SizeTransition, { children: jsx(BodyText, { size: "small", tight: true, className: cn("tw-block tw-truncate tw-text-grey-300", !collapsed && "tw-w-[100px]"), children: label }) }), jsx("div", { className: "tw-flex tw-items-center", children: jsx(PipeSeparator, { className: "tw-text-grey-700" }) }), jsxs(BodyText, { size: "small", tight: true, className: "tw-flex-grow tw-text-grey-300", children: ["$", usd] }), jsxs(CaptionText, { className: "tw-text-right tw-text-grey-500", children: [amount, " ", symbol] })] }));
18136
- }
18137
-
18138
- function IncompleteAction({ status, nextStatus, message, buttons, }) {
18139
- return (jsxs(ActionWrapper, { status: status, children: [jsx(ActionLineOutRow, { status: nextStatus }), jsxs(ActionRow, { children: [jsxs(Timeline, { children: [jsx(Timeline.ArrowReverse, {}), jsx(Timeline.Straight, {})] }), jsxs("div", { className: "tw-flex tw-flex-col tw-gap-squid-m tw-pb-squid-m", children: [jsx(BodyText, { size: "small", tight: true, className: "tw-text-grey-300", children: "Transaction incomplete" }), jsx(BodyText, { size: "small", className: "tw-text-grey-500", children: message }), jsx("div", { className: "tw-flex tw-gap-squid-xs", children: buttons })] })] })] }));
18140
- }
18141
-
18142
- function linkActionTimelineProps(actions, collapsed) {
18143
- return actions.map((action, index) => {
18144
- var _a;
18145
- const nextStatus = (_a = actions[index - 1]) === null || _a === void 0 ? void 0 : _a.props.status;
18146
- return Object.assign(Object.assign({}, action), { props: Object.assign(Object.assign({}, action.props), { showTimeline: index !== actions.length - 1, showBody: !(collapsed && index === 0), nextStatus }) });
18147
- });
18148
- }
18149
-
18150
- function ReceiveNFTAction({ status, nextStatus, showTimeline, showBody, nft, chain, wallet, timestamp, hash, url, }) {
18151
- return (jsxs(ActionLayout, { status: status, statusIcon: jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive NFT", title: nft.name, icon: jsx(ImageIcon, { src: nft.imageURI, variant: "square", size: "xlarge" }), lineCap: jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxs(BodyText, { className: "tw-flex tw-items-center tw-gap-squid-xs", size: "small", children: [jsx(IconLabel, { src: chain.logoURI, children: jsx(BodyText, { size: "small", children: chain.name }) }), jsx(PipeSeparator, { className: "tw-text-grey-700" }), jsx(WalletLink, Object.assign({}, wallet))] }) }), jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
18152
- }
18153
-
18154
- function ReceiveTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
18155
- return (jsxs(ActionLayout, { status: status, statusIcon: jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive tokens", title: `${amount} ${token.symbol}`, icon: jsx(ImageIcon, { src: token.logoURI, variant: "round", size: "xlarge" }), lineCap: jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs", children: [jsx(IconLabel, { src: chain.logoURI, children: jsx(BodyText, { size: "small", children: chain.name }) }), jsx(PipeSeparator, { className: "tw-text-body-small tw-text-grey-700" }), " ", jsx(WalletLink, Object.assign({}, wallet))] }) }), jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
18156
- }
18157
-
18158
- function SendTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
18159
- return (jsxs(ActionLayout, { status: status, statusIcon: jsx(ArrowRightUpIcon, {}), nextStatus: nextStatus, description: "Send tokens", title: `${amount} ${token.symbol}`, icon: jsx(ImageIcon, { src: token.logoURI, variant: "round", size: "xlarge" }), lineCap: jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs", children: [jsx(IconLabel, { src: chain.logoURI, children: chain.name }), jsx(PipeSeparator, { className: "tw-text-body-small tw-text-grey-700" }), " ", jsx(WalletLink, Object.assign({}, wallet))] }) }), jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
18160
- }
18161
-
18162
- function StakeAction({ status, nextStatus, showTimeline, showBody, token, provider, timestamp, hash, url, }) {
18163
- return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(PieChartIcon, {}), description: jsx(Inline, { children: [
18164
- "Stake",
18165
- jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: token.symbol }) }),
18166
- "on",
18167
- jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) }),
18168
- ] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
18169
- }
18170
-
18171
- function StartAction({ status, nextStatus, showTimeline = false, showBody = false, timestamp, hash, url, }) {
18172
- const getDescription = () => {
18173
- switch (status) {
18174
- case "error":
18175
- case "waiting":
18176
- return "Transaction not started";
18177
- default:
18178
- return "Transaction started";
18179
- }
18180
- };
18181
- return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(ArrowUpIcon, {}), description: getDescription(), lineCap: jsx(Timeline.CapTop, {}), showTimeline: showTimeline, showBody: showBody, children: status === "waiting" ? (jsx(CaptionText, { children: "Waiting to confirm..." })) : (jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
18182
- }
18183
-
18184
- function SuccessAction({ nextStatus, status, description = status === "error"
18185
- ? "Transaction failed"
18186
- : "Transaction successful", showTimeline, showBody, timestamp, hash, url, }) {
18187
- return (jsx(ActionLayout, { description: description, status: status, nextStatus: nextStatus, showTimeline: showTimeline, showBody: showBody, children: (timestamp || hash) && (jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
18188
- }
18189
-
18190
- function SwapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
18191
- return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxs(Inline, { children: ["Swap", jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: fromToken.symbol }) }), "to", jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: toToken.symbol }) }), "via", jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
18192
- }
18193
-
18194
- function WrapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
18195
- return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxs(Inline, { children: ["Wrap", jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: fromToken.symbol }) }), "to", jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: toToken.symbol }) }), "via", jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
18196
- }
18197
-
18198
- const actionComponentMap = {
18199
- success: SuccessAction,
18200
- receive_tokens: ReceiveTokensAction,
18201
- receive_nft: ReceiveNFTAction,
18202
- approve: ApproveAction,
18203
- send_tokens: SendTokensAction,
18204
- swap: SwapAction,
18205
- bridge: BridgeAction,
18206
- wrap: WrapAction,
18207
- stake: StakeAction,
18208
- start: StartAction,
18209
- fees: FeesAction,
18210
- incomplete: IncompleteAction,
18211
- };
18212
- function TransactionAction({ type, props }) {
18213
- const Component = actionComponentMap[type];
18214
- return jsx(Component, Object.assign({}, props));
18215
- }
18216
-
18217
- function Transfer({ isLoading, from, to, className }) {
18218
- return (jsx("div", { className: cn("tw-flex tw-items-center tw-gap-squid-xxs", className), children: jsxs(Join, { glue: () => jsx(ChevronLargeRightIcon, { className: "tw-text-grey-500" }), children: [isLoading ? jsx(TextSkeleton, {}) : from, isLoading ? jsx(TextSkeleton, {}) : to] }) }));
18219
- }
18220
-
18221
- function TransactionItem({ className, isLoading = false, status, image, type, hash, fromChain, toChain, fromAmount, toAmount, timestamp, variant = "full", }) {
18222
- return (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" && (jsxs("div", { className: "tw-timeline-gradient-mask tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xxs", children: [jsxs(Timeline, { className: "tw-flex-grow tw-text-grey-700", children: [jsx(Timeline.Straight, {}), jsx(Timeline.CapBottom, {})] }), jsx(TransactionState, { status: !status || isLoading ? "pending" : status, variant: "compact" }), jsxs(Timeline, { className: "tw-flex-grow tw-text-grey-700", children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] })] })), jsx("div", { className: "tw-flex tw-w-[50px] tw-items-center tw-justify-center", children: image }), jsxs("div", { className: "tw-flex tw-flex-grow tw-flex-col tw-gap-squid-xxs", children: [jsx(CaptionText, { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: jsx(TransactionItemHeader, { hash: hash, status: status, type: type, isLoading: isLoading, variant: variant }) }), (isLoading || fromChain || toChain) && (jsx(CaptionText, { className: "tw-block tw-h-squid-m", children: jsx(Transfer, { className: "tw-text-grey-400", isLoading: isLoading, from: fromChain && (jsx(IconLabel, { src: fromChain.logoURI, children: fromChain.name })), to: toChain && (jsx(IconLabel, { src: toChain.logoURI, children: toChain.name })) }) })), (isLoading || fromAmount || toAmount) && (jsx(Transfer, { className: "tw-text-grey-300", isLoading: isLoading, from: fromAmount ? (jsx(BodyText, { size: "small", children: fromAmount })) : undefined, to: toAmount ? (jsx(BodyText, { size: "small", children: toAmount })) : undefined }))] }), timestamp && variant === "full" && (jsx(CaptionText, { className: "tw-text-grey-500", children: formatRelativeTime(timestamp) }))] }));
18223
- }
18224
- const TransactionItemHeaderWrapper = ({ children, }) => {
18225
- return (jsx(Join, { glue: () => jsx(PipeSeparator, { className: "tw-text-grey-600" }), children: children }));
18226
- };
18227
- const TransactionItemHeader = ({ isLoading, variant, type, hash, status, }) => {
18228
- if (isLoading) {
18229
- return (jsxs(TransactionItemHeaderWrapper, { children: [jsx(TextSkeleton, {}), jsx(TextSkeleton, {})] }));
18230
- }
18231
- if (variant === "full") {
18232
- if (!type || !hash)
18233
- return null;
18234
- return (jsxs(TransactionItemHeaderWrapper, { children: [jsx(TxTypeLabel, { type: type }), jsx("span", { className: "tw-text-grey-500", children: truncateHash(hash) })] }));
18235
- }
18236
- if (status && type) {
18237
- return (jsxs(TransactionItemHeaderWrapper, { children: [jsx(TransactionState, { status: status, variant: "small" }), jsx(TxTypeLabel, { type: type })] }));
18238
- }
18239
- return null;
18240
- };
18241
- const TxTypeLabel = ({ type }) => {
18242
- return (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] }));
18243
- };
18244
-
18245
- function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator = false, }) {
18246
- return (jsxs("li", { className: "tw-flex tw-flex-col tw-self-stretch", children: [jsxs("div", { className: "tw-flex tw-items-center tw-self-stretch", children: [jsx(Track, { imageUrl: imageUrl }), jsx(Label, { subtitle: subtitle, descriptionBlocks: descriptionBlocks })] }), showStepSeparator && (jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-xxl tw-justify-center", children: 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" }) }))] }));
18247
- }
18248
- function Track({ imageUrl }) {
18249
- return (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: jsx("img", { src: imageUrl, alt: "", className: "tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs" }) }));
18250
- }
18251
- function Label({ subtitle, descriptionBlocks, }) {
18252
- return (jsxs("div", { className: "tw-flex tw-flex-col tw-items-start", children: [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: jsx(CaptionText, { children: subtitle }) }), jsx(DescriptionBlocks, { blocks: descriptionBlocks, className: "tw-py-squid-xxs tw-pr-squid-m tw-text-grey-300" })] }));
18253
- }
18254
-
18255
17764
  const borderRadiusClassMap = {
18256
17765
  sm: "tw-rounded-squid-s",
18257
17766
  lg: "tw-rounded-squid-m",
18258
17767
  };
18259
17768
  function Menu(_a) {
18260
- var { children, containerClassName, contentClassName, rounded = "lg", menuRef, contentWrapperClassName } = _a, props = __rest$1(_a, ["children", "containerClassName", "contentClassName", "rounded", "menuRef", "contentWrapperClassName"]);
18261
- return (jsx("div", Object.assign({}, props, { className: cn("tw-max-w-[320px]", containerClassName), ref: menuRef, children: 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" ? (jsx(CaptionText, { className: "tw-z-20 tw-self-stretch !tw-leading-[10px]", children: children })) : (jsx("div", { className: cn("tw-z-20 tw-max-w-full tw-text-caption", contentWrapperClassName), children: children })), 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]) })] }) })));
17769
+ var { children, containerClassName, contentClassName, rounded = "lg", menuRef, contentWrapperProps } = _a, props = __rest$1(_a, ["children", "containerClassName", "contentClassName", "rounded", "menuRef", "contentWrapperProps"]);
17770
+ return (jsx("div", Object.assign({}, props, { className: cn("tw-max-w-[320px]", containerClassName), ref: menuRef, children: 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,
17771
+ // :before element to create a backdrop
17772
+ // Not applied to the div itself because the backdrop-filter spec does not apply nested backdrop filters
17773
+ "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" ? (jsx(CaptionText, { className: "tw-z-20 tw-self-stretch !tw-leading-[10px]", children: children })) : (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 }))), 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]) })] }) })));
18262
17774
  }
18263
17775
 
18264
- function DropdownMenu({ dropdownRef, items, className, menuRef, isHidden = false, listClassName, }) {
18265
- return (jsx("div", { ref: dropdownRef, className: "tw-relative", children: jsx(Menu, { menuRef: menuRef, rounded: "sm", containerClassName: cn("tw-absolute tw-right-0 tw-z-20", className), contentClassName: "!tw-p-0", children: !isHidden && (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) => (jsx(DropdownMenuItem, Object.assign({}, item), item.label))) })) }) }));
17776
+ function DropdownMenu({ dropdownRef, className, menuRef, isHidden = false, listClassName, containerClassName, children, contentWrapperProps, menuContentClassName, }) {
17777
+ return (jsx("div", { ref: dropdownRef, className: cn("tw-relative", containerClassName), children: 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 && (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 })) }) }));
18266
17778
  }
18267
17779
 
18268
17780
  function InfoBox({ title, description, icon }) {
@@ -18334,6 +17846,11 @@ function NavigationBar(_a) {
18334
17846
  : "tw-flex"), children: jsx(HeadingText, { size: "small", children: title }) })) : null] })));
18335
17847
  }
18336
17848
 
17849
+ function PipeSeparator(_a) {
17850
+ var { className } = _a, props = __rest$1(_a, ["className"]);
17851
+ return (jsx("div", Object.assign({}, props, { className: cn("tw-h-[0.8em] tw-w-[2px] tw-rounded-full tw-bg-[currentColor]", className) })));
17852
+ }
17853
+
18337
17854
  function CollapsibleMenu({ children, menuRef, isOpen, transitionDuration, size, className, }) {
18338
17855
  return (jsx("aside", { style: Object.assign({ transitionDuration, transitionTimingFunction: isOpen
18339
17856
  ? "cubic-bezier(0.4, 1.3, 0.4, 1)"
@@ -18764,199 +18281,838 @@ function requireWithSelector_development () {
18764
18281
  var memoizedSnapshot;
18765
18282
  var memoizedSelection;
18766
18283
 
18767
- var memoizedSelector = function (nextSnapshot) {
18768
- if (!hasMemo) {
18769
- // The first time the hook is called, there is no memoized result.
18770
- hasMemo = true;
18771
- memoizedSnapshot = nextSnapshot;
18284
+ var memoizedSelector = function (nextSnapshot) {
18285
+ if (!hasMemo) {
18286
+ // The first time the hook is called, there is no memoized result.
18287
+ hasMemo = true;
18288
+ memoizedSnapshot = nextSnapshot;
18289
+
18290
+ var _nextSelection = selector(nextSnapshot);
18291
+
18292
+ if (isEqual !== undefined) {
18293
+ // Even if the selector has changed, the currently rendered selection
18294
+ // may be equal to the new selection. We should attempt to reuse the
18295
+ // current value if possible, to preserve downstream memoizations.
18296
+ if (inst.hasValue) {
18297
+ var currentSelection = inst.value;
18298
+
18299
+ if (isEqual(currentSelection, _nextSelection)) {
18300
+ memoizedSelection = currentSelection;
18301
+ return currentSelection;
18302
+ }
18303
+ }
18304
+ }
18305
+
18306
+ memoizedSelection = _nextSelection;
18307
+ return _nextSelection;
18308
+ } // We may be able to reuse the previous invocation's result.
18309
+
18310
+
18311
+ // We may be able to reuse the previous invocation's result.
18312
+ var prevSnapshot = memoizedSnapshot;
18313
+ var prevSelection = memoizedSelection;
18314
+
18315
+ if (objectIs(prevSnapshot, nextSnapshot)) {
18316
+ // The snapshot is the same as last time. Reuse the previous selection.
18317
+ return prevSelection;
18318
+ } // The snapshot has changed, so we need to compute a new selection.
18319
+
18320
+
18321
+ // The snapshot has changed, so we need to compute a new selection.
18322
+ var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data
18323
+ // has changed. If it hasn't, return the previous selection. That signals
18324
+ // to React that the selections are conceptually equal, and we can bail
18325
+ // out of rendering.
18326
+
18327
+ // If a custom isEqual function is provided, use that to check if the data
18328
+ // has changed. If it hasn't, return the previous selection. That signals
18329
+ // to React that the selections are conceptually equal, and we can bail
18330
+ // out of rendering.
18331
+ if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {
18332
+ return prevSelection;
18333
+ }
18334
+
18335
+ memoizedSnapshot = nextSnapshot;
18336
+ memoizedSelection = nextSelection;
18337
+ return nextSelection;
18338
+ }; // Assigning this to a constant so that Flow knows it can't change.
18339
+
18340
+
18341
+ // Assigning this to a constant so that Flow knows it can't change.
18342
+ var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;
18343
+
18344
+ var getSnapshotWithSelector = function () {
18345
+ return memoizedSelector(getSnapshot());
18346
+ };
18347
+
18348
+ var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {
18349
+ return memoizedSelector(maybeGetServerSnapshot());
18350
+ };
18351
+ return [getSnapshotWithSelector, getServerSnapshotWithSelector];
18352
+ }, [getSnapshot, getServerSnapshot, selector, isEqual]),
18353
+ getSelection = _useMemo[0],
18354
+ getServerSelection = _useMemo[1];
18355
+
18356
+ var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);
18357
+ useEffect(function () {
18358
+ inst.hasValue = true;
18359
+ inst.value = value;
18360
+ }, [value]);
18361
+ useDebugValue(value);
18362
+ return value;
18363
+ }
18364
+
18365
+ withSelector_development.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;
18366
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
18367
+ if (
18368
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
18369
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
18370
+ 'function'
18371
+ ) {
18372
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
18373
+ }
18374
+
18375
+ })();
18376
+ }
18377
+ return withSelector_development;
18378
+ }
18379
+
18380
+ if (process.env.NODE_ENV === 'production') {
18381
+ withSelector.exports = requireWithSelector_production_min();
18382
+ } else {
18383
+ withSelector.exports = requireWithSelector_development();
18384
+ }
18385
+
18386
+ var withSelectorExports = withSelector.exports;
18387
+ var useSyncExternalStoreExports = /*@__PURE__*/getDefaultExportFromCjs(withSelectorExports);
18388
+
18389
+ const { useDebugValue } = React__default$1;
18390
+ const { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;
18391
+ let didWarnAboutEqualityFn = false;
18392
+ const identity = (arg) => arg;
18393
+ function useStore(api, selector = identity, equalityFn) {
18394
+ if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
18395
+ console.warn(
18396
+ "[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"
18397
+ );
18398
+ didWarnAboutEqualityFn = true;
18399
+ }
18400
+ const slice = useSyncExternalStoreWithSelector(
18401
+ api.subscribe,
18402
+ api.getState,
18403
+ api.getServerState || api.getInitialState,
18404
+ selector,
18405
+ equalityFn
18406
+ );
18407
+ useDebugValue(slice);
18408
+ return slice;
18409
+ }
18410
+ const createImpl = (createState) => {
18411
+ if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && typeof createState !== "function") {
18412
+ console.warn(
18413
+ "[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
18414
+ );
18415
+ }
18416
+ const api = typeof createState === "function" ? createStore(createState) : createState;
18417
+ const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
18418
+ Object.assign(useBoundStore, api);
18419
+ return useBoundStore;
18420
+ };
18421
+ const create = (createState) => createState ? createImpl(createState) : createImpl;
18422
+
18423
+ const useContainerStore = create(() => ({
18424
+ containerRef: undefined,
18425
+ }));
18426
+
18427
+ function ProductCard({ children }) {
18428
+ const containerRef = useRef(null);
18429
+ useEffect(() => {
18430
+ useContainerStore.setState({ containerRef });
18431
+ }, [containerRef]);
18432
+ return (jsx("div", { style: {
18433
+ width: `min(100vw, ${MEDIA_QUERIES.MOBILE_LG.value}px)`,
18434
+ }, 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: 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 }) }));
18435
+ }
18436
+ function BorderedContainer({ children, className, }) {
18437
+ return (jsx("section", { className: cn("tw-border-t tw-border-t-material-light-thin", className), children: children }));
18438
+ }
18439
+
18440
+ function ProfileHeaderBackground() {
18441
+ return (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: [jsx("div", { className: "tw-h-[240px]", children: [...Array(4)].map((_, i) => (jsx(HeaderBackgroundDecorationRow, { index: i }, i))) }), jsx("div", { className: "z-10 tw-absolute tw-inset-0 tw-h-[195px] tw-shadow-inset-royal" })] }));
18442
+ }
18443
+ function HeaderBackgroundDecorationRow({ index }) {
18444
+ const logoWithImage = (jsx(LogoContainer, { children: jsx(SquidLogo, {}) }));
18445
+ const emptyLogo = jsx(LogoContainer, {});
18446
+ return (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] }));
18447
+ }
18448
+ function LogoContainer({ children }) {
18449
+ return (jsx("div", { className: "tw-flex tw-h-[60px] tw-w-[60px] tw-items-center tw-justify-center", children: children }));
18450
+ }
18451
+
18452
+ 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, }) {
18453
+ var _a, _b, _c;
18454
+ const isWalletButtonInteractive = !isLoading && !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick);
18455
+ const WalletButtonTag = isWalletButtonInteractive ? "button" : "div";
18456
+ const isFetching = isFetchingProp || isLoading;
18457
+ return (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: [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: 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: 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: [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 && (jsxs(Fragment, { children: [jsx(BodyText, { size: "small", children: ":" }), jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsx(BodyText, { size: "small", className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18458
+ ? "tw-text-grey-300"
18459
+ : "tw-text-royal-400", children: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18460
+ ? walletButton === null || walletButton === void 0 ? void 0 : walletButton.address
18461
+ : (_a = walletButton === null || walletButton === void 0 ? void 0 : walletButton.emptyAddressLabel) !== null && _a !== void 0 ? _a : "Connect wallet" }), jsx(ChevronArrowIcon, { className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18462
+ ? "tw-text-grey-600"
18463
+ : "tw-text-royal-400" })] })] }))] }) })) }), jsx("div", { className: "tw-px-squid-m mobile-lg:tw-px-squid-l", children: jsx(AssetsButton, Object.assign({}, assetsButton, { chain: chain, token: token, isLoading: isLoading })) }), isFetching && (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: jsx("div", { className: "tw-h-[94px] tw-w-[1260px] tw-animate-move-loading-cover-to-right tw-bg-dark-cover" }) })), jsx(NumericInput, { inputMode: "decimal", pattern: "[0-9.,]*", token: {
18464
+ decimals: (_b = token === null || token === void 0 ? void 0 : token.decimals) !== null && _b !== void 0 ? _b : 18,
18465
+ symbol: (_c = token === null || token === void 0 ? void 0 : token.symbol) !== null && _c !== void 0 ? _c : "",
18466
+ price: tokenPrice,
18467
+ }, onAmountChange: (value) => {
18468
+ onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(value);
18469
+ }, balance: balance, criticalPriceImpactPercentage: criticalPriceImpactPercentage, error: error, formatIfVerySmall: {
18470
+ token: "0.001",
18471
+ usd: "0.01",
18472
+ }, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: !!token, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading })] }));
18473
+ }
18474
+
18475
+ function SwapProgressViewHeader({ title, description, }) {
18476
+ return (jsxs("header", { className: "tw-flex tw-h-[95px] tw-w-full tw-flex-col tw-gap-squid-s tw-bg-grey-800 tw-px-squid-m tw-py-squid-s", children: [jsx(BodyText, { size: "large", className: "tw-h-squid-m !tw-leading-[20px] tw-text-grey-300", children: title }), jsx(CaptionText, { className: "tw-h-squid-l tw-text-grey-500", children: description })] }));
18477
+ }
18478
+
18479
+ const SPACING = 10;
18480
+ function useDropdownMenu(props) {
18481
+ const { initialIsModalOpen, itemsContainerRef } = props !== null && props !== void 0 ? props : {};
18482
+ const [isDropdownOpen, setIsModalOpen] = useState(Boolean(initialIsModalOpen));
18483
+ const dropdownRef = useRef(null);
18484
+ const openDropdownButtonRef = useRef(null);
18485
+ useEffect(() => {
18486
+ const handleClickOutside = (event) => {
18487
+ // close modal if the user clicked outside of it
18488
+ var _a;
18489
+ if (dropdownRef.current &&
18490
+ event.target !== openDropdownButtonRef.current &&
18491
+ !dropdownRef.current.contains(event.target) &&
18492
+ !((_a = openDropdownButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
18493
+ setIsModalOpen(false);
18494
+ }
18495
+ };
18496
+ if (isDropdownOpen) {
18497
+ document.addEventListener("click", handleClickOutside);
18498
+ }
18499
+ return () => {
18500
+ document.removeEventListener("click", handleClickOutside);
18501
+ };
18502
+ }, [dropdownRef, isDropdownOpen]);
18503
+ const openDropdown = useCallback(() => {
18504
+ setIsModalOpen((prev) => !prev);
18505
+ }, []);
18506
+ const closeDropdown = useCallback(() => {
18507
+ setIsModalOpen(false);
18508
+ }, []);
18509
+ const [dropdownStyles, setDropdownStyles] = useState(null);
18510
+ const itemRef = useRef(null);
18511
+ const menuRef = useRef(null);
18512
+ // Effect to find the best position for the dropdown menu, so it's always visible for the user
18513
+ useEffect(() => {
18514
+ var _a;
18515
+ if (!isDropdownOpen) {
18516
+ // when the dropdown is closed, we want to reset its position
18517
+ // because user may scroll, and the old position may be out of view, so we'll need to recalculate it
18518
+ setDropdownStyles(null);
18519
+ return;
18520
+ }
18521
+ const item = itemRef.current;
18522
+ 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;
18523
+ const dropdownMenu = menuRef.current;
18524
+ if (!item || !dropdownRef.current || !itemsContainer || !dropdownMenu) {
18525
+ return;
18526
+ }
18527
+ // Get the bounding rectangle of the item
18528
+ const itemRect = item.getBoundingClientRect();
18529
+ // Get the bounding rectangle of the container element
18530
+ const containerRect = itemsContainer.getBoundingClientRect();
18531
+ const dropdownMenuRect = dropdownMenu.getBoundingClientRect();
18532
+ // Calculate the bottom position of the visible area of the the items container
18533
+ const containerVisibleBottom = containerRect.top + containerRect.height;
18534
+ // Calculate the distance from the bottom of the item to the visible bottom of the items container
18535
+ const distanceBetweenItemBottomAndContainerBottomEdge = containerVisibleBottom - itemRect.bottom;
18536
+ // the same but for the top
18537
+ const distanceBetweenItemTopAndContainerTopEdge = itemRect.top - containerRect.top;
18538
+ const dropdownMenuHeight = dropdownMenu.clientHeight;
18539
+ const maxHeight = containerRect.bottom - dropdownMenuRect.top - SPACING;
18540
+ // check if the height of the dropdown is less than the longest distance, either top or bottom
18541
+ // if so, means that the dropdown keeps visible when positioned at the top or bottom of the item
18542
+ const isDropdownVisibleAtItemTopOrBottom = dropdownMenuHeight <=
18543
+ Math.max(distanceBetweenItemBottomAndContainerBottomEdge, distanceBetweenItemTopAndContainerTopEdge);
18544
+ // if the dropdown is not visible at top or bottom of the item
18545
+ // we just center it
18546
+ if (!isDropdownVisibleAtItemTopOrBottom) {
18547
+ return setDropdownStyles({
18548
+ position: "center",
18549
+ maxHeight,
18550
+ });
18551
+ }
18552
+ // finally, if the dropdown fits, position it where it has more space
18553
+ if (distanceBetweenItemBottomAndContainerBottomEdge >=
18554
+ distanceBetweenItemTopAndContainerTopEdge) {
18555
+ setDropdownStyles({
18556
+ position: "bottom",
18557
+ maxHeight,
18558
+ });
18559
+ }
18560
+ else {
18561
+ setDropdownStyles({
18562
+ position: "top",
18563
+ maxHeight,
18564
+ });
18565
+ }
18566
+ }, [isDropdownOpen, menuRef, itemRef]);
18567
+ return {
18568
+ isDropdownOpen,
18569
+ openDropdown,
18570
+ closeDropdown,
18571
+ dropdownRef,
18572
+ openDropdownButtonRef,
18573
+ dropdownStyles,
18574
+ itemRef,
18575
+ menuRef,
18576
+ };
18577
+ }
18578
+
18579
+ const IS_SERVER = typeof window === "undefined";
18580
+ const useIsomorphicLayoutEffect$1 = IS_SERVER ? useEffect : useLayoutEffect;
18581
+ /**
18582
+ * 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).
18583
+ * @param {string} query - The media query to track.
18584
+ * @param {?UseMediaQueryOptions} [options] - The options for customizing the behavior of the hook (optional).
18585
+ * @returns {boolean} The current state of the media query (true if the query matches, false otherwise).
18586
+ * @public
18587
+ * @example
18588
+ * ```tsx
18589
+ * const isSmallScreen = useMediaQuery('(max-width: 600px)');
18590
+ * // Use `isSmallScreen` to conditionally apply styles or logic based on the screen size.
18591
+ * ```
18592
+ */
18593
+ function useMediaQuery(query, { defaultValue = false, initializeWithValue = true, } = {}) {
18594
+ const getMatches = (query) => {
18595
+ if (IS_SERVER) {
18596
+ return defaultValue;
18597
+ }
18598
+ return window.matchMedia(query).matches;
18599
+ };
18600
+ const [matches, setMatches] = useState(() => {
18601
+ if (initializeWithValue) {
18602
+ return getMatches(query);
18603
+ }
18604
+ return defaultValue;
18605
+ });
18606
+ // Handles the change event of the media query.
18607
+ function handleChange() {
18608
+ setMatches(getMatches(query));
18609
+ }
18610
+ useIsomorphicLayoutEffect$1(() => {
18611
+ const matchMedia = window.matchMedia(query);
18612
+ // Triggered at the first client-side load and if query changes
18613
+ handleChange();
18614
+ // Use deprecated `addListener` and `removeListener` to support Safari < 14 (#135)
18615
+ if (matchMedia.addListener) {
18616
+ matchMedia.addListener(handleChange);
18617
+ }
18618
+ else {
18619
+ matchMedia.addEventListener("change", handleChange);
18620
+ }
18621
+ return () => {
18622
+ if (matchMedia.removeListener) {
18623
+ matchMedia.removeListener(handleChange);
18624
+ }
18625
+ else {
18626
+ matchMedia.removeEventListener("change", handleChange);
18627
+ }
18628
+ };
18629
+ }, [query]);
18630
+ return matches;
18631
+ }
18632
+
18633
+ function useCollapsibleMenu() {
18634
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
18635
+ const menuRef = useRef(null);
18636
+ const toggleMenu = () => {
18637
+ setIsMenuOpen(!isMenuOpen);
18638
+ };
18639
+ useEffect(() => {
18640
+ const handleClickOutside = (event) => {
18641
+ if (menuRef.current && !menuRef.current.contains(event.target)) {
18642
+ setIsMenuOpen(false);
18643
+ }
18644
+ };
18645
+ document.addEventListener("mousedown", handleClickOutside);
18646
+ return () => document.removeEventListener("mousedown", handleClickOutside);
18647
+ }, []);
18648
+ return {
18649
+ isMenuOpen,
18650
+ toggleMenu,
18651
+ menuRef,
18652
+ };
18653
+ }
18654
+
18655
+ const useTimer = ({ immediateStart = true, }) => {
18656
+ const [timer, setTimer] = useState("0s");
18657
+ const intervalRef = useRef(null);
18658
+ const startTimer = () => {
18659
+ if (intervalRef.current !== null)
18660
+ return; // Prevent multiple intervals
18661
+ const startTime = Date.now();
18662
+ intervalRef.current = window.setInterval(() => {
18663
+ const elapsedTime = Date.now() - startTime;
18664
+ setTimer(formatDuration(elapsedTime));
18665
+ }, 1000);
18666
+ };
18667
+ const stopTimer = () => {
18668
+ if (intervalRef.current !== null) {
18669
+ clearInterval(intervalRef.current);
18670
+ intervalRef.current = null;
18671
+ }
18672
+ };
18673
+ useEffect(() => {
18674
+ if (immediateStart) {
18675
+ startTimer();
18676
+ }
18677
+ return () => {
18678
+ stopTimer();
18679
+ };
18680
+ }, [immediateStart]);
18681
+ return { timer, stopTimer, startTimer };
18682
+ };
18683
+
18684
+ function BaseDropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, link, control, detail, isSelected, itemRef, children, contentRef, }) {
18685
+ const ContentTag = link
18686
+ ? "a"
18687
+ : (control === null || control === void 0 ? void 0 : control.type) === "switch"
18688
+ ? "label"
18689
+ : "button";
18690
+ const contentTagProps = link
18691
+ ? {
18692
+ href: link,
18693
+ target: "_blank",
18694
+ ref: contentRef,
18695
+ }
18696
+ : {
18697
+ ref: contentRef,
18698
+ };
18699
+ return (jsxs("li", { ref: itemRef, className: "tw-max-h-squid-xl tw-w-full tw-min-w-[160px] tw-px-squid-xxs", children: [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: [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 ? (jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), 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" ? (jsx("span", { className: "tw-flex tw-items-center tw-pl-squid-l", children: jsx(Switch, Object.assign({ size: "small" }, control)) })) : detail ? (jsx("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: detail })) : null] })), children] }));
18700
+ }
18701
+ function DropdownMenuItem(props) {
18702
+ if (props.submenu) {
18703
+ return (jsx(DropdownMenuItemWithSubmenu, Object.assign({}, props, { submenu: props.submenu, containerRef: props.containerRef })));
18704
+ }
18705
+ return jsx(BaseDropdownMenuItem, Object.assign({}, props));
18706
+ }
18707
+ function DropdownMenuItemWithSubmenu(_a) {
18708
+ var _b;
18709
+ var { submenu } = _a, props = __rest$1(_a, ["submenu"]);
18710
+ const { isDropdownOpen, dropdownRef, openDropdown, itemRef, menuRef, openDropdownButtonRef, dropdownStyles, } = useDropdownMenu({
18711
+ itemsContainerRef: props.containerRef,
18712
+ });
18713
+ return (jsx("div", { className: "tw-relative tw-flex", children: jsx(DropdownMenuItem, Object.assign({ detail: jsx(ChevronRightSmallIcon, { size: "20" }) }, props, { containerRef: undefined, itemRef: itemRef, contentRef: openDropdownButtonRef, onClick: (event) => {
18714
+ var _a;
18715
+ openDropdown();
18716
+ (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
18717
+ }, children: isDropdownOpen && (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: {
18718
+ style: {
18719
+ maxHeight: (_b = dropdownStyles === null || dropdownStyles === void 0 ? void 0 : dropdownStyles.maxHeight) !== null && _b !== void 0 ? _b : 0,
18720
+ overflow: "auto",
18721
+ scrollbarWidth: "none",
18722
+ },
18723
+ }, children: submenu })) })) }));
18724
+ }
18772
18725
 
18773
- var _nextSelection = selector(nextSnapshot);
18726
+ const dropdownPositionClassMap$1 = {
18727
+ top: "tw-right-full tw-bottom-[50px]",
18728
+ bottom: "tw-right-full tw-top-[50px]",
18729
+ center: "tw-right-[50px] -tw-top-[35px]",
18730
+ };
18731
+ const listItemSizeMap = {
18732
+ small: "tw-h-list-item-small",
18733
+ large: "tw-h-list-item-large",
18734
+ };
18735
+ const collapsedListItemClassMap = {
18736
+ small: "tw-w-[70px]",
18737
+ large: "tw-w-[80px]",
18738
+ };
18739
+ function ListItem(_a) {
18740
+ 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"]);
18741
+ 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");
18742
+ // 'small' variant does not have detail
18743
+ const showDetail = size === "large" && (!!detail || !!icon || showDetailOnHoverOnly);
18744
+ const isDetailInteractive = !!onDetailClick;
18745
+ const DetailTag = isDetailInteractive ? "button" : "div";
18746
+ const detailProps = isDetailInteractive
18747
+ ? {
18748
+ onClick: (event) => {
18749
+ // prevent click event from bubbling up to parent
18750
+ event.stopPropagation();
18751
+ onDetailClick === null || onDetailClick === void 0 ? void 0 : onDetailClick();
18752
+ },
18753
+ }
18754
+ : {};
18755
+ // There are two possible ways to handle loading state:
18756
+ // Can be boolean or string
18757
+ // If boolean and true, it will show a full loading skeleton
18758
+ // If it's a non empty string, means that we want to display the skeleton + some text
18759
+ const loadingComponent = () => {
18760
+ if ((loading === null || loading === void 0 ? void 0 : loading.subtitle) === true) {
18761
+ return jsx(TextSkeleton, { width: "50px", className: "tw-h-2.5", isLoading: true });
18762
+ }
18763
+ if (typeof (loading === null || loading === void 0 ? void 0 : loading.subtitle) === "string" && loading.subtitle.length > 0) {
18764
+ return (jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsx(TextSkeleton, { width: "50px", className: "tw-h-2.5", isLoading: true }), jsx(CaptionText, { className: subtitleClassName, children: loading.subtitle })] }));
18765
+ }
18766
+ return null;
18767
+ };
18768
+ const isInteractive = !!props.onClick;
18769
+ const ItemTag = isInteractive ? "button" : "div";
18770
+ const itemProps = isInteractive ? props : {};
18771
+ const { isDropdownOpen, dropdownRef, openDropdown, openDropdownButtonRef, itemRef, menuRef, dropdownStyles, } = useDropdownMenu({
18772
+ itemsContainerRef,
18773
+ });
18774
+ return (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
18775
+ ? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
18776
+ : "tw-w-full", className), children: [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" ? (jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon ? (mainIcon) : (jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, placeholderImageUrl: placeholderImageUrl, size: "md", rounded: rounded })) })) : (jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon ? (mainIcon) : (jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), 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",
18777
+ // 'large' variant has extra padding
18778
+ size === "large" ? "tw-w-[56%] tw-pl-squid-xxs" : "tw-w-[67%]"), children: [typeof itemTitle === "string" ? (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" &&
18779
+ ((loading === null || loading === void 0 ? void 0 : loading.subtitle) ? (loadingComponent()) : subtitle ? (jsxs(CaptionText, { className: subtitleClassName, children: [subtitleOnHover && (jsx(CaptionText, { className: cn(subtitleClassName, "tw-hidden group-hover/list-item:tw-block"), children: subtitleOnHover })), subtitle] })) : null)] }), showDetail && (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
18780
+ ? "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"
18781
+ : "tw-flex", isDetailInteractive && "hover:tw-bg-material-light-thin", detailButtonClassName), children: [!!detail && (jsx(CaptionText, { className: "min-tw-w-4 min-tw-h-4 tw-px-squid-xxs tw-leading-[10px]", children: detail })), icon ? (jsx("span", { className: "tw-flex tw-items-center tw-justify-center tw-px-[3px] tw-py-2", children: icon })) : null] })))] })), !!dropdownMenuContent && (jsx(ListItemActionsButton, { ref: openDropdownButtonRef, onClick: openDropdown, isActive: isDropdownOpen, className: "peer-hover/list-item:tw-opacity-100" })), isDropdownOpen && !!dropdownMenuContent ? (jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownStyles, className: cn(!!dropdownStyles &&
18782
+ dropdownPositionClassMap$1[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] })));
18783
+ }
18784
+ const ListItemActionsButton = forwardRef((props, ref) => {
18785
+ return (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
18786
+ ? "tw-bg-material-light-thin tw-opacity-100"
18787
+ : "tw-opacity-0", props.className), children: jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })));
18788
+ });
18774
18789
 
18775
- if (isEqual !== undefined) {
18776
- // Even if the selector has changed, the currently rendered selection
18777
- // may be equal to the new selection. We should attempt to reuse the
18778
- // current value if possible, to preserve downstream memoizations.
18779
- if (inst.hasValue) {
18780
- var currentSelection = inst.value;
18790
+ const dropdownPositionClassMap = {
18791
+ top: "tw-right-squid-xxs tw-bottom-[50px]",
18792
+ bottom: "tw-right-squid-xxs tw-top-[50px]",
18793
+ center: "tw-right-[50px] tw-translate-y-[calc(-50%+20px)]",
18794
+ };
18795
+ const statusBadge = {
18796
+ completed: {},
18797
+ pending: {
18798
+ badge: (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" })),
18799
+ containerClassName: "tw-bg-royal-400",
18800
+ },
18801
+ failed: {
18802
+ badge: (jsx("span", { className: "tw-bg-grey-900", children: jsx(EmojiSadIcon, { className: "tw-text-status-negative" }) })),
18803
+ containerClassName: "tw-bg-status-negative",
18804
+ },
18805
+ warning: {
18806
+ badge: (jsx("span", { className: "tw-bg-grey-900", children: jsx(EmojiMeh, { className: "tw-text-status-partial" }) })),
18807
+ containerClassName: "tw-bg-status-partial",
18808
+ },
18809
+ };
18810
+ function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuContent, itemsContainerRef, status, warningLabel, onClick, }) {
18811
+ const { isDropdownOpen, dropdownRef, openDropdown, openDropdownButtonRef, itemRef, menuRef, dropdownStyles, } = useDropdownMenu({
18812
+ itemsContainerRef,
18813
+ });
18814
+ const statusLabel = useMemo(() => {
18815
+ switch (status) {
18816
+ case "completed":
18817
+ return jsx(CaptionText, { children: dateCompleted });
18818
+ case "pending":
18819
+ return jsx(CaptionText, { className: "tw-text-royal-400", children: "Pending" });
18820
+ case "failed":
18821
+ return (jsxs(Fragment, { children: [jsx(CaptionText, { className: "tw-text-status-negative", children: "Fail" }), jsx(CaptionText, { children: dateCompleted })] }));
18822
+ case "warning":
18823
+ return (jsx(CaptionText, { className: "tw-text-status-partial", children: warningLabel }));
18824
+ default:
18825
+ return null;
18826
+ }
18827
+ }, [status, dateCompleted]);
18828
+ const isInteractive = !!onClick;
18829
+ const ItemTag = isInteractive ? "button" : "div";
18830
+ const itemTagProps = isInteractive
18831
+ ? {
18832
+ onClick,
18833
+ }
18834
+ : {};
18835
+ return (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: [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: [jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [!!statusBadge[status].badge && (jsx("span", { className: cn("tw-absolute -tw-left-[5px] tw-bottom-0 tw-z-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 })), jsx("img", { src: firstImageUrl, className: "tw-absolute tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" }), jsx("img", { src: secondImageUrl, className: "tw-absolute tw-left-5 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" })] }), jsxs("div", { className: "tw-flex tw-h-10 tw-flex-1 tw-flex-col tw-self-stretch", children: [jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-justify-between tw-text-grey-500", children: [jsxs("div", { className: "tw-flex tw-items-center", children: [jsx(CaptionText, { children: fromLabel }), jsx("span", { className: "tw-text-grey-600", children: jsx(ChevronRightSmallIcon, {}) }), jsx(CaptionText, { children: toLabel })] }), jsx("div", { className: cn("tw-hide-on-parent-hover tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs", !!dropdownMenuContent &&
18836
+ "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 })] }), jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: [jsx(BodyText, { size: "small", children: fromAmount }), jsx("span", { className: "tw-text-grey-600", children: jsx(ChevronLargeRightIcon, {}) }), jsx(BodyText, { size: "small", children: toAmount })] })] })] })), !!dropdownMenuContent && (jsx(ListItemActionsButton, { ref: openDropdownButtonRef, onClick: openDropdown, isActive: isDropdownOpen, className: "peer-hover/history-item:tw-opacity-100" })), isDropdownOpen && !!dropdownMenuContent ? (jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownStyles, className: cn(!!dropdownStyles &&
18837
+ dropdownPositionClassMap[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] }));
18838
+ }
18781
18839
 
18782
- if (isEqual(currentSelection, _nextSelection)) {
18783
- memoizedSelection = currentSelection;
18784
- return currentSelection;
18785
- }
18786
- }
18787
- }
18840
+ function MenuItem({ label, imageUrl, icon }) {
18841
+ return (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: [jsx("div", { className: "tw-h-squid-m tw-w-squid-m", children: imageUrl ? (jsx("img", { className: "tw-h-full tw-w-full tw-rounded-squid-xxs", src: imageUrl, alt: "" })) : icon ? (icon) : null }), jsx(CaptionText, { children: label })] }));
18842
+ }
18788
18843
 
18789
- memoizedSelection = _nextSelection;
18790
- return _nextSelection;
18791
- } // We may be able to reuse the previous invocation's result.
18844
+ const containerVariantClassNameMap = {
18845
+ small: "tw-px-squid-xs",
18846
+ large: "tw-px-squid-0",
18847
+ };
18848
+ const childrenVariantClassNameMap = {
18849
+ small: "tw-min-h-squid-l tw-px-squid-xs",
18850
+ large: "tw-min-h-squid-xl tw-px-squid-m",
18851
+ };
18852
+ function SmallBodyText(props) {
18853
+ return jsx(BodyText, Object.assign({ size: "small" }, props));
18854
+ }
18855
+ function PropertyListItem(_a) {
18856
+ 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"]);
18857
+ const Text = variant === "small" ? CaptionText : SmallBodyText;
18858
+ return (jsx("li", Object.assign({}, props, { className: cn("tw-flex tw-w-full tw-gap-squid-xs tw-rounded-squid-xs tw-text-grey-300", showGradientBg && "squid-property-row-bg", containerVariantClassNameMap[variant], className), children: jsxs("div", { className: cn("tw-flex tw-h-squid-l tw-w-full tw-items-center tw-justify-between tw-gap-squid-xs tw-rounded-squid-xs", childrenVariantClassNameMap[variant]), children: [jsx("div", { className: cn("tw-w-6 tw-text-grey-500", iconClassName), children: icon }), jsx(Text, { className: cn("tw-flex-1 tw-text-grey-400", labelClassName), children: jsx(TextSkeleton, { isLoading: isLoading, children: label }) }), jsx(Text, { className: cn("tw-flex tw-text-grey-300", detailClassName), children: jsx(TextSkeleton, { isLoading: isLoading, children: detail }) })] }) })));
18859
+ }
18792
18860
 
18861
+ function SectionTitle(_a) {
18862
+ var { title, icon, accessory, actionIcon, className } = _a, props = __rest$1(_a, ["title", "icon", "accessory", "actionIcon", "className"]);
18863
+ return (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, jsx(CaptionText, { children: title }), accessory ? (jsx(CaptionText, { className: "tw-flex-1 tw-text-right tw-text-grey-500", children: accessory })) : actionIcon ? (jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end", children: actionIcon })) : null] })));
18864
+ }
18793
18865
 
18794
- // We may be able to reuse the previous invocation's result.
18795
- var prevSnapshot = memoizedSnapshot;
18796
- var prevSelection = memoizedSelection;
18866
+ function SettingsItem({ icon, label, control, link, transparent = false, helpTooltip, }) {
18867
+ const ContentTag = link ? "a" : "div";
18868
+ const contentTagProps = link
18869
+ ? {
18870
+ href: link,
18871
+ target: "_blank",
18872
+ }
18873
+ : {};
18874
+ const helpIcon = !!helpTooltip && (jsx(HelpIcon, { className: "tw-cursor-help tw-text-grey-600 hover:tw-text-grey-400" }));
18875
+ const showDetailsBorder = !!control && !link && !(control.type === "switch");
18876
+ return (jsx("li", { className: cn("tw-h-[50px] tw-self-stretch tw-px-squid-xs", transparent ? "tw-bg-transparent" : "tw-bg-grey-800"), children: jsxs(ContentTag, Object.assign({ className: cn("tw-flex tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xs tw-text-grey-300", link && "hover:tw-bg-material-light-thin") }, contentTagProps, { children: [icon, jsxs("div", { className: "tw-flex tw-flex-1 tw-items-center tw-gap-squid-xxs tw-self-stretch", children: [jsx(BodyText, { size: "small", children: label }), helpTooltip ? (jsx(Tooltip, Object.assign({}, helpTooltip, { children: helpIcon }))) : (jsx(Fragment, { children: helpIcon }))] }), jsx("div", { className: cn("tw-flex tw-h-squid-l tw-items-center tw-justify-center tw-rounded-squid-xs", showDetailsBorder &&
18877
+ "tw-rounded-squid-xs tw-border tw-border-solid tw-border-material-light-thin tw-bg-material-dark-thin"), children: !!link ? (jsx(SquareArrowTopRight2Icon, { className: "tw-text-material-light-average" })) : (!!control && (jsxs(Fragment, { children: [control.type === "amount" && (jsxs(Fragment, { children: [jsx(SettingsButton, { onClick: () => control.onChange(control.resetValueControl.value), label: control.resetValueControl.label, isSelected: control.resetValueControl.value === control.value }), control.options.map(({ value }, index, _controls) => (jsx(SettingsButton, { label: "$" + value, isSelected: control.value === value, onClick: () => control.onChange(value) }, index))), jsx(SettingsSlider, { type: control.type, value: control.value, isSelected: control.value !== control.resetValueControl.value, onChange: control.onChange, decimalsFormat: control.decimalsFormat, max: 999 })] })), control.type === "switch" &&
18878
+ (control.tooltip ? (jsx(Tooltip, Object.assign({}, control.tooltip, { children: jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }) }))) : (jsx(Switch, { size: "large", checked: control.checked, onChange: control.onChange, disabled: control.disabled }))), control.type === "percentage" && (jsxs(Fragment, { children: [jsx(SettingsButton, { label: control.resetValueControl.label, isSelected: control.resetValueControl.value === control.value, onClick: control.resetValueControl.onSelect }), jsx(SettingsSlider, { onChange: control.onChange, value: control.value, type: "percentage", isSelected: control.value !== control.resetValueControl.value, decimalsFormat: control.decimalsFormat, max: control.max, min: control.min })] })), control.type === "options" && (jsx(Fragment, { children: control.options.map(({ label, onSelect }, index) => (jsx(SettingsButton, { label: label, isSelected: control.selectedLabel === label, onClick: onSelect }, index))) }))] }))) })] })) }));
18879
+ }
18797
18880
 
18798
- if (objectIs(prevSnapshot, nextSnapshot)) {
18799
- // The snapshot is the same as last time. Reuse the previous selection.
18800
- return prevSelection;
18801
- } // The snapshot has changed, so we need to compute a new selection.
18881
+ const STEP_ITEM_HEIGHT = 52;
18882
+ const statusBgClassMap = {
18883
+ executed: "!tw-bg-grey-300",
18884
+ ongoing: "!tw-bg-grey-300",
18885
+ pending: "!tw-bg-grey-600",
18886
+ waiting: "!tw-bg-grey-300",
18887
+ error: "!tw-bg-status-negative",
18888
+ success: "!tw-bg-status-positive",
18889
+ warning: "!tw-bg-status-partial",
18890
+ };
18891
+ const separatorClassMap = {
18892
+ executed: "tw-text-grey-300",
18893
+ ongoing: "tw-text-grey-300",
18894
+ pending: "tw-text-grey-600",
18895
+ waiting: "tw-text-grey-300",
18896
+ error: "tw-text-status-negative",
18897
+ success: "tw-text-status-positive",
18898
+ warning: "tw-text-status-partial",
18899
+ };
18900
+ function SwapStepItem({ descriptionBlocks, showStepSeparator = false, link, status = "pending", }) {
18901
+ // these styles are located here instead of outside the component
18902
+ // so they are updated whenever the animation duration changes
18903
+ const transitionStyle = {
18904
+ transition: `background-color ${ANIMATION_DURATIONS.CHANGE_SWAP_STEP}ms, color ${ANIMATION_DURATIONS.CHANGE_SWAP_STEP}ms`,
18905
+ };
18906
+ const chipContent = useMemo(() => {
18907
+ switch (status) {
18908
+ case "success":
18909
+ case "executed":
18910
+ return jsx(Checkmark1Icon, {});
18911
+ case "error":
18912
+ return jsx(EmojiSadIcon, { size: "16" });
18913
+ case "warning":
18914
+ return jsx(EmojiMeh, { size: "16" });
18915
+ case "waiting":
18916
+ return jsx(DotGrid1x3HorizontalIcon, {});
18917
+ case "pending":
18918
+ return null;
18919
+ case "ongoing":
18920
+ return jsx(Loader, { size: "16", strokeWidth: "4" });
18921
+ default:
18922
+ return null;
18923
+ }
18924
+ }, [status]);
18925
+ const statusTextClass = useMemo(() => {
18926
+ switch (status) {
18927
+ case "pending":
18928
+ return "tw-text-grey-600";
18929
+ default:
18930
+ return "tw-text-grey-300";
18931
+ }
18932
+ }, [status]);
18933
+ return (jsx("li", { style: {
18934
+ maxHeight: `${STEP_ITEM_HEIGHT}px`,
18935
+ minHeight: `${STEP_ITEM_HEIGHT}px`,
18936
+ }, 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: 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: [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: [jsx(Chip, { style: transitionStyle, className: cn("tw-w-squid-xl", statusBgClassMap[status]), icon: chipContent }), showStepSeparator && (jsx("span", { className: cn(separatorClassMap[status], "tw-absolute tw-left-0 tw-top-full tw-mt-0.5"), style: transitionStyle, children: jsx(SwapStepSeparator, {}) }))] }), jsx(DescriptionBlocks, { className: "tw-min-h-squid-l tw-py-squid-xxs tw-pr-squid-xs", blocks: descriptionBlocks })] }) }));
18937
+ }
18802
18938
 
18939
+ function ActionLayout({ lineCap = jsx(Timeline.CapTop, {}), status = "executed", showTimeline = true, showBody = true, nextStatus, statusIcon, description, title, icon, children, }) {
18940
+ return (jsxs(ActionWrapper, { status: status, children: [jsx(ActionLineOutRow, { status: nextStatus }), jsx(ActionStatusRow, { status: status, icon: statusIcon, children: description }), title && (jsxs(Fragment, { children: [jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", statusTextClassMap[status]), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {}), jsx(Timeline.CapBottom, {})] }) }), jsxs(ActionRow, { children: [jsx("div", { className: "tw-flex tw-items-center tw-justify-center", children: icon }), 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 })] })] })), jsxs(ActionRow, { children: [jsxs(Timeline, { className: showTimeline ? statusTextClassMap[status] : "!tw-text-[transparent]", children: [lineCap, jsx(Timeline.Straight, {})] }), 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 })] })] }));
18941
+ }
18942
+ function ActionProperties({ timestamp, hash, url, }) {
18943
+ return (jsxs(CaptionText, { className: "tw-flex tw-items-center tw-gap-squid-xs", children: [timestamp && jsx(Timestamp, { time: timestamp }), timestamp && hash && jsx(PipeSeparator, { className: "tw-text-grey-700" }), hash && jsx(HashLink, { hash: hash, url: url, showTx: true })] }));
18944
+ }
18945
+ function renderStatusIcon(status, defaultIcon) {
18946
+ switch (status) {
18947
+ case "success":
18948
+ return jsx(TransactionState, { status: "success", variant: "compact" });
18949
+ case "executed":
18950
+ return (jsx(TransactionState, { status: "executed", variant: "compact", icon: defaultIcon }));
18951
+ case "error":
18952
+ return jsx(EmojiSadIcon, { className: "tw-text-status-negative" });
18953
+ case "ongoing":
18954
+ return (jsx(Loader, { className: statusTextClassMap.ongoing, strokeWidth: "4", size: "20" }));
18955
+ case "waiting":
18956
+ return jsx(TransactionState, { status: "waiting", variant: "compact" });
18957
+ case "warning":
18958
+ return jsx(TransactionState, { status: "warning", variant: "compact" });
18959
+ }
18960
+ }
18961
+ const ActionLineOutRow = ({ status }) => (jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", status ? statusTextClassMap[status] : "!tw-text-[transparent]"), children: [jsx(Timeline.Straight, {}), jsx(Timeline.CapBottom, {})] }) }));
18962
+ const ActionStatusRow = ({ children, status, icon, }) => (jsxs(ActionRow, { children: [jsx("div", { className: "tw-flex tw-items-center tw-justify-center", children: renderStatusIcon(status, icon) }), jsx("div", { className: "tw-flex tw-items-center", children: jsx(BodyText, { size: "small", tight: true, className: "tw-block tw-w-full tw-text-grey-300", children: children }) })] }));
18963
+ function ActionRow(_a) {
18964
+ var { className } = _a, props = __rest$1(_a, ["className"]);
18965
+ return (jsx("div", Object.assign({}, props, { className: cn("tw-grid tw-grid-cols-[40px,1fr,60px] tw-gap-squid-xs tw-pl-squid-m", className) })));
18966
+ }
18967
+ function ActionWrapper({ children, status, className, }) {
18968
+ return (jsx("div", { className: cn("tw-relative tw-flex tw-flex-col tw-gap-squid-xxs", status === "waiting" && "tw-bg-grey-800", className), children: children }));
18969
+ }
18970
+ function Timestamp({ time }) {
18971
+ return (jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-text-grey-500", children: [formatRelativeDate(time), jsx("span", { className: "tw-text-grey-700", children: "\u2022" }), formatTime(time)] }));
18972
+ }
18803
18973
 
18804
- // The snapshot has changed, so we need to compute a new selection.
18805
- var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data
18806
- // has changed. If it hasn't, return the previous selection. That signals
18807
- // to React that the selections are conceptually equal, and we can bail
18808
- // out of rendering.
18974
+ function ApproveAction({ status, nextStatus, showTimeline, showBody, profile, chain, wallet, timestamp, hash, url, }) {
18975
+ return (jsxs(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(ThumbsUp, { fill: true }), description: "Approve contract", title: profile.label, icon: jsx(Image$1, { src: profile.imageURI, variant: "round", size: "xlarge" }), lineCap: jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxs(BodyText, { className: "tw-flex tw-items-center tw-gap-squid-xs", size: "small", children: [jsx(IconLabel, { src: chain.logoURI, children: chain.name }), jsx(PipeSeparator, { className: "tw-text-grey-300" }), jsx(WalletLink, Object.assign({}, wallet))] }) }), (timestamp || hash) && (jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }))] }));
18976
+ }
18809
18977
 
18810
- // If a custom isEqual function is provided, use that to check if the data
18811
- // has changed. If it hasn't, return the previous selection. That signals
18812
- // to React that the selections are conceptually equal, and we can bail
18813
- // out of rendering.
18814
- if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {
18815
- return prevSelection;
18816
- }
18978
+ function BridgeAction({ status, nextStatus, showTimeline, showBody, token, chain, provider, timestamp, hash, url, }) {
18979
+ return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(SquareArrowTopLeftIcon, {}), description: jsxs(Inline, { children: ["Bridge", jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: token.symbol }) }), "to", jsx(IconLabel, { src: chain.logoURI, children: jsx(BodyText, { size: "small", children: chain.name }) }), "via", jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: (timestamp || hash) && (jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
18980
+ }
18817
18981
 
18818
- memoizedSnapshot = nextSnapshot;
18819
- memoizedSelection = nextSelection;
18820
- return nextSelection;
18821
- }; // Assigning this to a constant so that Flow knows it can't change.
18982
+ function FeesAction({ status, nextStatus, showTimeline = false, total, lines, }) {
18983
+ return (jsxs(Fragment, { children: [jsx(FeesTotal, { status: status, nextStatus: nextStatus, total: total, showTimeline: lines !== undefined || showTimeline }), lines && (jsx(FeesLines, { status: status, lines: lines, showTimeline: showTimeline }))] }));
18984
+ }
18985
+ function FeesTotal({ status, nextStatus, total, showTimeline, collapsed, }) {
18986
+ return (jsxs(ActionWrapper, { status: status, children: [jsx(ActionLineOutRow, { status: nextStatus }), jsx(ActionStatusRow, { status: status, icon: jsx(TagIconFilled, {}), children: jsx(FeesRow, Object.assign({ collapsed: collapsed }, total)) }), jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", showTimeline ? statusTextClassMap[status] : "tw-text-transparent"), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] }) })] }));
18987
+ }
18988
+ function FeesLines({ status, lines, showTimeline = false, }) {
18989
+ return (jsxs(ActionWrapper, { status: status, children: [lines && (jsx("div", { children: lines.map((line, index) => (jsxs(Fragment, { children: [index > 0 && (jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", statusTextClassMap[status]), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] }) })), jsxs(ActionRow, { children: [jsxs(Timeline, { className: statusTextClassMap[status], children: [jsx(Timeline.Straight, {}), jsx(Timeline.ArrowRight, {})] }), jsx("div", { className: "tw-relative tw-top-[2px] tw-flex tw-items-end", children: jsx(FeesRow, Object.assign({}, line)) })] })] }, index))) })), jsx(ActionRow, { children: jsxs(Timeline, { className: cn("tw-h-squid-xs", showTimeline
18990
+ ? statusTextClassMap[status]
18991
+ : "!tw-text-[transparent]"), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] }) })] }));
18992
+ }
18993
+ function FeesRow({ label, usd, amount, symbol, collapsed = false, }) {
18994
+ return (jsxs("div", { className: "tw-flex tw-w-full tw-gap-squid-xs", children: [jsx(SizeTransition, { children: jsx(BodyText, { size: "small", tight: true, className: cn("tw-block tw-truncate tw-text-grey-300", !collapsed && "tw-w-[100px]"), children: label }) }), jsx("div", { className: "tw-flex tw-items-center", children: jsx(PipeSeparator, { className: "tw-text-grey-700" }) }), jsxs(BodyText, { size: "small", tight: true, className: "tw-flex-grow tw-text-grey-300", children: ["$", usd] }), jsxs(CaptionText, { className: "tw-text-right tw-text-grey-500", children: [amount, " ", symbol] })] }));
18995
+ }
18822
18996
 
18997
+ function IncompleteAction({ status, nextStatus, message, buttons, }) {
18998
+ return (jsxs(ActionWrapper, { status: status, children: [jsx(ActionLineOutRow, { status: nextStatus }), jsxs(ActionRow, { children: [jsxs(Timeline, { children: [jsx(Timeline.ArrowReverse, {}), jsx(Timeline.Straight, {})] }), jsxs("div", { className: "tw-flex tw-flex-col tw-gap-squid-m tw-pb-squid-m", children: [jsx(BodyText, { size: "small", tight: true, className: "tw-text-grey-300", children: "Transaction incomplete" }), jsx(BodyText, { size: "small", className: "tw-text-grey-500", children: message }), jsx("div", { className: "tw-flex tw-gap-squid-xs", children: buttons })] })] })] }));
18999
+ }
18823
19000
 
18824
- // Assigning this to a constant so that Flow knows it can't change.
18825
- var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;
19001
+ function linkActionTimelineProps(actions, collapsed) {
19002
+ return actions.map((action, index) => {
19003
+ var _a;
19004
+ const nextStatus = (_a = actions[index - 1]) === null || _a === void 0 ? void 0 : _a.props.status;
19005
+ return Object.assign(Object.assign({}, action), { props: Object.assign(Object.assign({}, action.props), { showTimeline: index !== actions.length - 1, showBody: !(collapsed && index === 0), nextStatus }) });
19006
+ });
19007
+ }
18826
19008
 
18827
- var getSnapshotWithSelector = function () {
18828
- return memoizedSelector(getSnapshot());
18829
- };
19009
+ function ReceiveNFTAction({ status, nextStatus, showTimeline, showBody, nft, chain, wallet, timestamp, hash, url, }) {
19010
+ return (jsxs(ActionLayout, { status: status, statusIcon: jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive NFT", title: nft.name, icon: jsx(Image$1, { src: nft.imageURI, variant: "square", size: "xlarge" }), lineCap: jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxs(BodyText, { className: "tw-flex tw-items-center tw-gap-squid-xs", size: "small", children: [jsx(IconLabel, { src: chain.logoURI, children: jsx(BodyText, { size: "small", children: chain.name }) }), jsx(PipeSeparator, { className: "tw-text-grey-700" }), jsx(WalletLink, Object.assign({}, wallet))] }) }), jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
19011
+ }
18830
19012
 
18831
- var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {
18832
- return memoizedSelector(maybeGetServerSnapshot());
18833
- };
18834
- return [getSnapshotWithSelector, getServerSnapshotWithSelector];
18835
- }, [getSnapshot, getServerSnapshot, selector, isEqual]),
18836
- getSelection = _useMemo[0],
18837
- getServerSelection = _useMemo[1];
19013
+ function ReceiveTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
19014
+ return (jsxs(ActionLayout, { status: status, statusIcon: jsx(ArrowRightDownIcon, {}), nextStatus: nextStatus, description: "Receive tokens", title: `${amount} ${token.symbol}`, icon: jsx(Image$1, { src: token.logoURI, variant: "round", size: "xlarge" }), lineCap: jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs", children: [jsx(IconLabel, { src: chain.logoURI, children: jsx(BodyText, { size: "small", children: chain.name }) }), jsx(PipeSeparator, { className: "tw-text-body-small tw-text-grey-700" }), " ", jsx(WalletLink, Object.assign({}, wallet))] }) }), jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
19015
+ }
18838
19016
 
18839
- var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);
18840
- useEffect(function () {
18841
- inst.hasValue = true;
18842
- inst.value = value;
18843
- }, [value]);
18844
- useDebugValue(value);
18845
- return value;
18846
- }
19017
+ function SendTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
19018
+ return (jsxs(ActionLayout, { status: status, statusIcon: jsx(ArrowRightUpIcon, {}), nextStatus: nextStatus, description: "Send tokens", title: `${amount} ${token.symbol}`, icon: jsx(Image$1, { src: token.logoURI, variant: "round", size: "xlarge" }), lineCap: jsx(Timeline.ArrowUp, {}), showTimeline: showTimeline, showBody: showBody, children: [jsx("div", { className: "tw-flex tw-flex-col tw-gap-squid-xs", children: jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs", children: [jsx(IconLabel, { src: chain.logoURI, children: chain.name }), jsx(PipeSeparator, { className: "tw-text-body-small tw-text-grey-700" }), " ", jsx(WalletLink, Object.assign({}, wallet))] }) }), jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })] }));
19019
+ }
18847
19020
 
18848
- withSelector_development.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;
18849
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
18850
- if (
18851
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
18852
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
18853
- 'function'
18854
- ) {
18855
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
18856
- }
18857
-
18858
- })();
18859
- }
18860
- return withSelector_development;
19021
+ function StakeAction({ status, nextStatus, showTimeline, showBody, token, provider, timestamp, hash, url, }) {
19022
+ return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(PieChartIcon, {}), description: jsx(Inline, { children: [
19023
+ "Stake",
19024
+ jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: token.symbol }) }),
19025
+ "on",
19026
+ jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) }),
19027
+ ] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
18861
19028
  }
18862
19029
 
18863
- if (process.env.NODE_ENV === 'production') {
18864
- withSelector.exports = requireWithSelector_production_min();
18865
- } else {
18866
- withSelector.exports = requireWithSelector_development();
19030
+ function StartAction({ status, nextStatus, showTimeline = false, showBody = false, timestamp, hash, url, }) {
19031
+ const getDescription = () => {
19032
+ switch (status) {
19033
+ case "error":
19034
+ case "waiting":
19035
+ return "Transaction not started";
19036
+ default:
19037
+ return "Transaction started";
19038
+ }
19039
+ };
19040
+ return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(ArrowUpIcon, {}), description: getDescription(), lineCap: jsx(Timeline.CapTop, {}), showTimeline: showTimeline, showBody: showBody, children: status === "waiting" ? (jsx(CaptionText, { children: "Waiting to confirm..." })) : (jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
18867
19041
  }
18868
19042
 
18869
- var withSelectorExports = withSelector.exports;
18870
- var useSyncExternalStoreExports = /*@__PURE__*/getDefaultExportFromCjs(withSelectorExports);
19043
+ function SuccessAction({ nextStatus, status, description = status === "error"
19044
+ ? "Transaction failed"
19045
+ : "Transaction successful", showTimeline, showBody, timestamp, hash, url, }) {
19046
+ return (jsx(ActionLayout, { description: description, status: status, nextStatus: nextStatus, showTimeline: showTimeline, showBody: showBody, children: (timestamp || hash) && (jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
19047
+ }
18871
19048
 
18872
- const { useDebugValue } = React__default$1;
18873
- const { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;
18874
- let didWarnAboutEqualityFn = false;
18875
- const identity = (arg) => arg;
18876
- function useStore(api, selector = identity, equalityFn) {
18877
- if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
18878
- console.warn(
18879
- "[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"
18880
- );
18881
- didWarnAboutEqualityFn = true;
18882
- }
18883
- const slice = useSyncExternalStoreWithSelector(
18884
- api.subscribe,
18885
- api.getState,
18886
- api.getServerState || api.getInitialState,
18887
- selector,
18888
- equalityFn
18889
- );
18890
- useDebugValue(slice);
18891
- return slice;
19049
+ function SwapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
19050
+ return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxs(Inline, { children: ["Swap", jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: fromToken.symbol }) }), "to", jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: toToken.symbol }) }), "via", jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
18892
19051
  }
18893
- const createImpl = (createState) => {
18894
- if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && typeof createState !== "function") {
18895
- console.warn(
18896
- "[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
18897
- );
18898
- }
18899
- const api = typeof createState === "function" ? createStore(createState) : createState;
18900
- const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
18901
- Object.assign(useBoundStore, api);
18902
- return useBoundStore;
18903
- };
18904
- const create = (createState) => createState ? createImpl(createState) : createImpl;
18905
19052
 
18906
- const useContainerStore = create(() => ({
18907
- containerRef: undefined,
18908
- }));
19053
+ function WrapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
19054
+ return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(ArrowBottomTopIcon, { size: "16" }), description: jsxs(Inline, { children: ["Wrap", jsx(IconLabel, { src: fromToken.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: fromToken.symbol }) }), "to", jsx(IconLabel, { src: toToken.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: toToken.symbol }) }), "via", jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) })] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
19055
+ }
18909
19056
 
18910
- function ProductCard({ children }) {
18911
- const containerRef = useRef(null);
18912
- useEffect(() => {
18913
- useContainerStore.setState({ containerRef });
18914
- }, [containerRef]);
18915
- return (jsx("div", { style: {
18916
- width: `min(100vw, ${MEDIA_QUERIES.MOBILE_LG.value}px)`,
18917
- }, 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: 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 }) }));
19057
+ const actionComponentMap = {
19058
+ success: SuccessAction,
19059
+ receive_tokens: ReceiveTokensAction,
19060
+ receive_nft: ReceiveNFTAction,
19061
+ approve: ApproveAction,
19062
+ send_tokens: SendTokensAction,
19063
+ swap: SwapAction,
19064
+ bridge: BridgeAction,
19065
+ wrap: WrapAction,
19066
+ stake: StakeAction,
19067
+ start: StartAction,
19068
+ fees: FeesAction,
19069
+ incomplete: IncompleteAction,
19070
+ };
19071
+ function TransactionAction({ type, props }) {
19072
+ const Component = actionComponentMap[type];
19073
+ return jsx(Component, Object.assign({}, props));
18918
19074
  }
18919
- function BorderedContainer({ children, className, }) {
18920
- return (jsx("section", { className: cn("tw-border-t tw-border-t-material-light-thin", className), children: children }));
19075
+
19076
+ function Transfer({ isLoading, from, to, className }) {
19077
+ return (jsx("div", { className: cn("tw-flex tw-items-center tw-gap-squid-xxs", className), children: jsxs(Join, { glue: () => jsx(ChevronLargeRightIcon, { className: "tw-text-grey-500" }), children: [isLoading ? jsx(TextSkeleton, {}) : from, isLoading ? jsx(TextSkeleton, {}) : to] }) }));
18921
19078
  }
18922
19079
 
18923
- function ProfileHeaderBackground() {
18924
- return (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: [jsx("div", { className: "tw-h-[240px]", children: [...Array(4)].map((_, i) => (jsx(HeaderBackgroundDecorationRow, { index: i }, i))) }), jsx("div", { className: "z-10 tw-absolute tw-inset-0 tw-h-[195px] tw-shadow-inset-royal" })] }));
19080
+ function TransactionItem({ className, isLoading = false, status, image, type, hash, fromChain, toChain, fromAmount, toAmount, timestamp, variant = "full", }) {
19081
+ return (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" && (jsxs("div", { className: "tw-timeline-gradient-mask tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xxs", children: [jsxs(Timeline, { className: "tw-flex-grow tw-text-grey-700", children: [jsx(Timeline.Straight, {}), jsx(Timeline.CapBottom, {})] }), jsx(TransactionState, { status: !status || isLoading ? "pending" : status, variant: "compact" }), jsxs(Timeline, { className: "tw-flex-grow tw-text-grey-700", children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] })] })), jsx("div", { className: "tw-flex tw-w-[50px] tw-items-center tw-justify-center", children: image }), jsxs("div", { className: "tw-flex tw-flex-grow tw-flex-col tw-gap-squid-xxs", children: [jsx(CaptionText, { className: "tw-flex tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: jsx(TransactionItemHeader, { hash: hash, status: status, type: type, isLoading: isLoading, variant: variant }) }), (isLoading || fromChain || toChain) && (jsx(CaptionText, { className: "tw-block tw-h-squid-m", children: jsx(Transfer, { className: "tw-text-grey-400", isLoading: isLoading, from: fromChain && (jsx(IconLabel, { src: fromChain.logoURI, children: fromChain.name })), to: toChain && (jsx(IconLabel, { src: toChain.logoURI, children: toChain.name })) }) })), (isLoading || fromAmount || toAmount) && (jsx(Transfer, { className: "tw-text-grey-300", isLoading: isLoading, from: fromAmount ? (jsx(BodyText, { size: "small", children: fromAmount })) : undefined, to: toAmount ? (jsx(BodyText, { size: "small", children: toAmount })) : undefined }))] }), timestamp && variant === "full" && (jsx(CaptionText, { className: "tw-text-grey-500", children: formatRelativeTime(timestamp) }))] }));
18925
19082
  }
18926
- function HeaderBackgroundDecorationRow({ index }) {
18927
- const logoWithImage = (jsx(LogoContainer, { children: jsx(SquidLogo, {}) }));
18928
- const emptyLogo = jsx(LogoContainer, {});
18929
- return (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] }));
19083
+ const TransactionItemHeaderWrapper = ({ children, }) => {
19084
+ return (jsx(Join, { glue: () => jsx(PipeSeparator, { className: "tw-text-grey-600" }), children: children }));
19085
+ };
19086
+ const TransactionItemHeader = ({ isLoading, variant, type, hash, status, }) => {
19087
+ if (isLoading) {
19088
+ return (jsxs(TransactionItemHeaderWrapper, { children: [jsx(TextSkeleton, {}), jsx(TextSkeleton, {})] }));
19089
+ }
19090
+ if (variant === "full") {
19091
+ if (!type || !hash)
19092
+ return null;
19093
+ return (jsxs(TransactionItemHeaderWrapper, { children: [jsx(TxTypeLabel, { type: type }), jsx("span", { className: "tw-text-grey-500", children: truncateHash(hash) })] }));
19094
+ }
19095
+ if (status && type) {
19096
+ return (jsxs(TransactionItemHeaderWrapper, { children: [jsx(TransactionState, { status: status, variant: "small" }), jsx(TxTypeLabel, { type: type })] }));
19097
+ }
19098
+ return null;
19099
+ };
19100
+ const TxTypeLabel = ({ type }) => {
19101
+ return (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] }));
19102
+ };
19103
+
19104
+ function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator = false, }) {
19105
+ return (jsxs("li", { className: "tw-flex tw-flex-col tw-self-stretch", children: [jsxs("div", { className: "tw-flex tw-items-center tw-self-stretch", children: [jsx(Track, { imageUrl: imageUrl }), jsx(Label, { subtitle: subtitle, descriptionBlocks: descriptionBlocks })] }), showStepSeparator && (jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-xxl tw-justify-center", children: 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" }) }))] }));
18930
19106
  }
18931
- function LogoContainer({ children }) {
18932
- return (jsx("div", { className: "tw-flex tw-h-[60px] tw-w-[60px] tw-items-center tw-justify-center", children: children }));
19107
+ function Track({ imageUrl }) {
19108
+ return (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: jsx("img", { src: imageUrl, alt: "", className: "tw-h-squid-m tw-w-squid-m tw-rounded-squid-xxs" }) }));
18933
19109
  }
18934
-
18935
- 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, }) {
18936
- var _a, _b, _c;
18937
- const isWalletButtonInteractive = !isLoading && !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick);
18938
- const WalletButtonTag = isWalletButtonInteractive ? "button" : "div";
18939
- const isFetching = isFetchingProp || isLoading;
18940
- return (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: [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: 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: 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: [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 && (jsxs(Fragment, { children: [jsx(BodyText, { size: "small", children: ":" }), jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsx(BodyText, { size: "small", className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18941
- ? "tw-text-grey-300"
18942
- : "tw-text-royal-400", children: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18943
- ? walletButton === null || walletButton === void 0 ? void 0 : walletButton.address
18944
- : (_a = walletButton === null || walletButton === void 0 ? void 0 : walletButton.emptyAddressLabel) !== null && _a !== void 0 ? _a : "Connect wallet" }), jsx(ChevronArrowIcon, { className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18945
- ? "tw-text-grey-600"
18946
- : "tw-text-royal-400" })] })] }))] }) })) }), jsx("div", { className: "tw-px-squid-m mobile-lg:tw-px-squid-l", children: jsx(AssetsButton, Object.assign({}, assetsButton, { chain: chain, token: token, isLoading: isLoading })) }), isFetching && (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: jsx("div", { className: "tw-h-[94px] tw-w-[1260px] tw-animate-move-loading-cover-to-right tw-bg-dark-cover" }) })), jsx(NumericInput, { inputMode: "decimal", pattern: "[0-9.,]*", token: {
18947
- decimals: (_b = token === null || token === void 0 ? void 0 : token.decimals) !== null && _b !== void 0 ? _b : 18,
18948
- symbol: (_c = token === null || token === void 0 ? void 0 : token.symbol) !== null && _c !== void 0 ? _c : "",
18949
- price: tokenPrice,
18950
- }, onAmountChange: (value) => {
18951
- onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(value);
18952
- }, balance: balance, criticalPriceImpactPercentage: criticalPriceImpactPercentage, error: error, formatIfVerySmall: {
18953
- token: "0.001",
18954
- usd: "0.01",
18955
- }, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: !!token, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading })] }));
19110
+ function Label({ subtitle, descriptionBlocks, }) {
19111
+ return (jsxs("div", { className: "tw-flex tw-flex-col tw-items-start", children: [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: jsx(CaptionText, { children: subtitle }) }), jsx(DescriptionBlocks, { blocks: descriptionBlocks, className: "tw-py-squid-xxs tw-pr-squid-m tw-text-grey-300" })] }));
18956
19112
  }
18957
19113
 
18958
- function SwapProgressViewHeader({ title, description, }) {
18959
- return (jsxs("header", { className: "tw-flex tw-h-[95px] tw-w-full tw-flex-col tw-gap-squid-s tw-bg-grey-800 tw-px-squid-m tw-py-squid-s", children: [jsx(BodyText, { size: "large", className: "tw-h-squid-m !tw-leading-[20px] tw-text-grey-300", children: title }), jsx(CaptionText, { className: "tw-h-squid-l tw-text-grey-500", children: description })] }));
19114
+ function DropdownMenuTitle({ title }) {
19115
+ return (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: jsx(CaptionText, { children: title }) }));
18960
19116
  }
18961
19117
 
18962
19118
  const STEPS_LIST_HEIGHT = 400;
@@ -24896,11 +25052,11 @@ function TransactionHeaderLayout({ isLoading, status, title, image = jsx("span",
24896
25052
  }
24897
25053
 
24898
25054
  function BridgeHeader({ tokenLogoURI, chainLogoURI, title = "Bridge", hash, url, status, }) {
24899
- return (jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxs("div", { className: "tw-relative", children: [jsx(ImageIcon, { src: tokenLogoURI, size: "xlarge", variant: "round" }), jsx(ImageIcon, { src: chainLogoURI, className: "tw-absolute -tw-right-squid-xxs tw-bottom-0" })] }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), " "] }) }));
25055
+ return (jsx(TransactionHeaderLayout, { title: title, status: status, image: jsxs("div", { className: "tw-relative", children: [jsx(Image$1, { src: tokenLogoURI, size: "xlarge", variant: "round" }), jsx(Image$1, { src: chainLogoURI, className: "tw-absolute -tw-right-squid-xxs tw-bottom-0" })] }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), " "] }) }));
24900
25056
  }
24901
25057
 
24902
25058
  function BuyNFTHeader({ imageUrl, title = "Buy NFT", hash, url, status, }) {
24903
- return (jsx(TransactionHeaderLayout, { title: title, status: status, image: jsx(ImageIcon, { src: imageUrl, size: "xlarge" }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), " "] }) }));
25059
+ return (jsx(TransactionHeaderLayout, { title: title, status: status, image: jsx(Image$1, { src: imageUrl, size: "xlarge" }), children: jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(Chip, { label: "TX" }), jsx(HashLink, { hash: hash, url: url, showCopyButton: true }), " "] }) }));
24904
25060
  }
24905
25061
 
24906
25062
  function InteractionHeader({ title = "Interaction", image = jsx(Approve, {}), hash, url, status, }) {
@@ -24908,7 +25064,7 @@ function InteractionHeader({ title = "Interaction", image = jsx(Approve, {}), ha
24908
25064
  }
24909
25065
 
24910
25066
  function ProfileHeader({ imageUrl, title, wallet, amount, }) {
24911
- return (jsx(TransactionHeaderLayout, { title: title, image: jsx(ProfilePicture, { src: imageUrl }), children: jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(WalletLink, Object.assign({}, wallet)), jsx(PipeSeparator, {}), jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsx(Dollar, {}), amount] })] }) }));
25067
+ return (jsx(TransactionHeaderLayout, { title: title, image: jsx(ProfilePicture, { src: imageUrl }), children: jsxs(BodyText, { size: "small", className: "tw-flex tw-items-center tw-gap-squid-xs tw-text-grey-500", children: [jsx(WalletLink, Object.assign({}, wallet)), jsx(PipeSeparator, {}), jsxs("div", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsx(DollarOutlinedIcon, {}), amount] })] }) }));
24912
25068
  }
24913
25069
  function ProfilePicture({ src }) {
24914
25070
  return (jsxs("div", { className: "tw-relative tw-h-[110px] tw-w-[110px] tw-overflow-hidden tw-rounded-full", children: [jsx("img", { className: "tw-absolute tw-left-0 tw-top-0 tw-h-full tw-w-full tw-rounded-full", src: src }), jsx("div", { className: "tw-absolute tw-h-full tw-w-full tw-rounded-full tw-backdrop-blur-lg" }), jsx("div", { className: "tw-absolute tw-inset-squid-xxs tw-block", children: jsx("img", { className: "tw-h-full tw-w-full tw-rounded-full tw-border tw-border-material-light-thin", src: src }) })] }));
@@ -26529,7 +26685,7 @@ const switchKnobCheckedClassMap = {
26529
26685
  unchecked: "tw-left-[1px]",
26530
26686
  },
26531
26687
  };
26532
- function Switch({ checked = false, onChange, size, disabled = false, }) {
26688
+ function Switch({ checked = false, onChange, size, disabled = false, inputProps, }) {
26533
26689
  return (
26534
26690
  // Switch container
26535
26691
  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",
@@ -26538,7 +26694,9 @@ function Switch({ checked = false, onChange, size, disabled = false, }) {
26538
26694
  // checked styles
26539
26695
  checked ? "tw-bg-status-positive" : "tw-bg-grey-800",
26540
26696
  // disabled styles
26541
- disabled ? "tw-cursor-not-allowed" : "tw-cursor-pointer"), children: [jsx("input", { 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" }), jsx("span", { style: {
26697
+ disabled ? "tw-cursor-not-allowed" : "tw-cursor-pointer",
26698
+ // Focus visible styles
26699
+ "tw-focus-visible-within-outline"), children: [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" })), jsx("span", { style: {
26542
26700
  filter: "drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.33)) drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.20))",
26543
26701
  }, className: clsx("tw-absolute tw-rounded-full tw-border tw-border-material-light-thin tw-transition-all",
26544
26702
  // size styles
@@ -26727,10 +26885,10 @@ function SettingsButton({ label, isSelected = false, onClick, }) {
26727
26885
  return (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: jsx(CaptionText, { className: "!tw-font-medium", children: label }) }));
26728
26886
  }
26729
26887
 
26730
- const IconButton = (_a) => {
26888
+ const IconButton = forwardRef((_a, ref) => {
26731
26889
  var { icon } = _a, props = __rest$1(_a, ["icon"]);
26732
- return (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 })));
26733
- };
26890
+ return (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 })));
26891
+ });
26734
26892
 
26735
26893
  function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }) {
26736
26894
  const matchesMobileLg = useMediaQuery(MEDIA_QUERIES.MOBILE_LG.media);
@@ -26742,7 +26900,7 @@ function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }) {
26742
26900
  ? "tw-w-[180px] tw-max-w-[180px] tw-pt-0"
26743
26901
  : "tw-w-[70px] tw-max-w-[70px] tw-pt-squid-xs"), children: [jsx(SectionTitle, { title: "Chains", icon: jsx(ChainLink, {}), className: cn(matchesMobileLg ? "tw-flex" : "tw-hidden") }), jsxs(List, { children: [jsx(ListItem, { size: "small", mainIcon: 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: jsx(ChainLink, { size: "24" }) }), itemTitle: "All Chains", compactOnMobile: true, onClick: () => { } }), chains.map((item) => (jsx(ListItem, { size: "small", mainImageUrl: item.iconUrl, itemTitle: item.name, detail: item.name, compactOnMobile: true, onClick: () => { } }, item.name)))] })] }), jsxs("div", { style: {
26744
26902
  scrollbarWidth: "none",
26745
- }, 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: [jsx(SectionTitle, { title: "Favorite tokens", icon: jsx(HeartSmallIcon, {}) }), jsx(List, { children: favoriteTokens.map((favToken) => (jsx(ListItem, { size: "large", mainImageUrl: favToken.iconUrl, secondaryImageUrl: favToken.iconUrl, itemTitle: favToken.name, subtitle: favToken.symbol, icon: jsx(BrokenHeartIcon, { className: "tw-text-status-negative" }), showDetailOnHoverOnly: true, rounded: true, onClick: () => { } }, favToken.name))) }), jsx(SectionTitle, { title: "Your tokens loading", icon: jsx(CoinsIcon, {}) }), jsx(List, { children: userTokens.map((userToken) => (jsx(ListItem, { size: "large", mainImageUrl: userToken.iconUrl, secondaryImageUrl: userToken.iconUrl, itemTitle: userToken.name, subtitle: `${userToken.balance} ${userToken.symbol}`, icon: jsx(EmptyHeartIcon, { className: "tw-text-status-negative" }), showDetailOnHoverOnly: true, rounded: true, onClick: () => { }, loading: { subtitle: userToken.symbol } }, userToken.name))) }), jsx(SectionTitle, { title: "Your tokens & balance", icon: jsx(CoinsIcon, {}) }), jsx(List, { children: userTokens.map((userToken) => (jsx(ListItem, { size: "large", mainImageUrl: userToken.iconUrl, secondaryImageUrl: userToken.iconUrl, itemTitle: userToken.name, subtitle: `${userToken.balance} ${userToken.symbol}`, icon: jsx(EmptyHeartIcon, { className: "tw-text-status-negative" }), showDetailOnHoverOnly: true, rounded: true, onClick: () => { } }, userToken.name))) }), jsx(SectionTitle, { title: "Popular tokens", icon: jsx(SparkleIcon, {}) }), jsx(List, { children: popularTokens.map((popToken) => (jsx(ListItem, { size: "large", mainImageUrl: popToken.iconUrl, secondaryImageUrl: popToken.iconUrl, itemTitle: popToken.name, subtitle: popToken.symbol, icon: jsx(EmptyHeartIcon, { className: "tw-text-status-negative" }), showDetailOnHoverOnly: true, rounded: true, onClick: () => { } }, popToken.name))) })] })] }) })] }));
26903
+ }, 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: [jsx(SectionTitle, { title: "Favorite tokens", icon: jsx(HeartSmallIcon, {}) }), jsx(List, { children: favoriteTokens.map((favToken) => (jsx(ListItem, { size: "large", mainImageUrl: favToken.iconUrl, secondaryImageUrl: favToken.iconUrl, itemTitle: favToken.name, subtitle: favToken.symbol, rounded: true, onClick: () => { }, dropdownMenuContent: jsx(Fragment, { children: jsx(DropdownMenuItem, { label: "Add to favorites", icon: jsx(FilledHeartIcon, {}) }) }) }, favToken.name))) }), jsx(SectionTitle, { title: "Your tokens loading", icon: jsx(CoinsIcon, {}) }), jsx(List, { children: userTokens.map((userToken) => (jsx(ListItem, { size: "large", mainImageUrl: userToken.iconUrl, secondaryImageUrl: userToken.iconUrl, itemTitle: userToken.name, subtitle: `${userToken.balance} ${userToken.symbol}`, icon: jsx(EmptyHeartIcon, { className: "tw-text-status-negative" }), rounded: true, onClick: () => { }, loading: { subtitle: userToken.symbol } }, userToken.name))) }), jsx(SectionTitle, { title: "Your tokens & balance", icon: jsx(CoinsIcon, {}) }), jsx(List, { children: userTokens.map((userToken) => (jsx(ListItem, { size: "large", mainImageUrl: userToken.iconUrl, secondaryImageUrl: userToken.iconUrl, itemTitle: userToken.name, subtitle: `${userToken.balance} ${userToken.symbol}`, icon: jsx(EmptyHeartIcon, { className: "tw-text-status-negative" }), rounded: true, onClick: () => { } }, userToken.name))) }), jsx(SectionTitle, { title: "Popular tokens", icon: jsx(SparkleIcon, {}) }), jsx(List, { children: popularTokens.map((popToken) => (jsx(ListItem, { size: "large", mainImageUrl: popToken.iconUrl, secondaryImageUrl: popToken.iconUrl, itemTitle: popToken.name, subtitle: popToken.symbol, icon: jsx(EmptyHeartIcon, { className: "tw-text-status-negative" }), rounded: true, onClick: () => { } }, popToken.name))) })] })] }) })] }));
26746
26904
  }
26747
26905
  const List = ({ children }) => {
26748
26906
  return (jsx("ul", { className: "tw-flex tw-flex-col tw-gap-squid-xxs tw-pb-squid-xs", children: children }));
@@ -62205,4 +62363,4 @@ function SquidConfigProvider({ theme = lightTheme, children, themeType = "light"
62205
62363
  return (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 }));
62206
62364
  }
62207
62365
 
62208
- export { ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, AssetsView, BackpackIcon, BadgeImage, BankIcon, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, BrokenHeartIcon, BubblesIcon, Button$1 as Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockIcon, ClockOutlineIcon, CoinsAddIcon, CoinsIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy, CrossAnimatedIcon, DashboardFast, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, Dollar, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, FeeButton, FeesAction, FeesLines, FeesTotal, FilledHeartIcon, FilterButton, FilterIcon, GasIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HistoryItem, HomeIcon, IconButton, IconLabel, ImageIcon, ImageSparkle, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LightningIcon, LinkIcon, List, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MainView, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, MoonIcon, NavigationBar, NotAllowedIcon, NumericInput, PathSquareIcon, PercentIcon, PieChartIcon, PipeSeparator, PlusIcon, PowerIcon, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, PunkIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RecipientView, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, SettingsGearIcon, SettingsItem, SettingsSlider, ShoppingBagIcon, SizeTransition, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidConfigProvider, SquidLogo, StakeAction, StartAction, StocksIcon, SuccessAction, SunIcon, SunriseIcon, SwapAction, SwapConfiguration, SwapDetailsView, SwapErrorIcon, SwapHeader, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProgressViewHeader, SwapProperties, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, TagIcon, TagIconFilled, TextSkeleton, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenPair, Tooltip, TradingViewStepsIcon, TransactionAction, TransactionFilters, TransactionHeader, TransactionHeaderLayout, TransactionItem, TransactionProperties, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, TranslateIcon, TriangleExclamation, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WalletsView, WrapAction, XSocial, baseTailwindConfig, cn, darkTheme, lightTheme, linkActionTimelineProps, statusTextClassMap, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useVersion };
62366
+ export { ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, AssetsView, BackpackIcon, BadgeImage, BankIcon, BellAlarmIcon, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, BrokenHeartIcon, BubblesIcon, Button$1 as Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, CatSquareIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CoinsAddIcon, CoinsIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy, CrossAnimatedIcon, DashboardFast, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, DropdownMenuTitle, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FeeButton, FeesAction, FeesLines, FeesTotal, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HistoryItem, HomeIcon, IconButton, IconLabel, Image$1 as Image, ImageIcon, ImageSparkle, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LightningIcon, LimitIcon, LinkIcon, List, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MainView, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, MoonIcon, NavigationBar, NotAllowedIcon, NumericInput, PathSquareIcon, PercentIcon, PieChartIcon, PipeSeparator, PlusIcon, PoopIcon, PowerIcon, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, PunkIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RecipientView, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, SettingsGearIcon, SettingsItem, SettingsSlider, SettingsSliderIcon, ShoppingBagIcon, SizeTransition, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidConfigProvider, SquidLogo, StakeAction, StartAction, StocksIcon, SuccessAction, SunIcon, SunriseIcon, SwapAction, SwapConfiguration, SwapDetailsView, SwapErrorIcon, SwapHeader, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProgressViewHeader, SwapProperties, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, TagIcon, TagIconFilled, TextSkeleton, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenPair, Tooltip, TradingViewStepsIcon, TransactionAction, TransactionFilters, TransactionHeader, TransactionHeaderLayout, TransactionItem, TransactionProperties, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, TranslateIcon, TriangleExclamation, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WalletsView, WrapAction, XSocial, baseTailwindConfig, cn, darkTheme, lightTheme, linkActionTimelineProps, statusTextClassMap, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useVersion };