@0xsquid/ui 0.27.0 → 0.27.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/index.js +1242 -975
  3. package/dist/cjs/types/components/badges/IconLabel.d.ts +2 -2
  4. package/dist/cjs/types/components/badges/Image.d.ts +9 -0
  5. package/dist/cjs/types/components/badges/index.d.ts +1 -1
  6. package/dist/cjs/types/components/buttons/IconButton.d.ts +1 -1
  7. package/dist/cjs/types/components/controls/Switch.d.ts +4 -3
  8. package/dist/cjs/types/components/icons/Arrow.d.ts +4 -1
  9. package/dist/cjs/types/components/icons/Clock.d.ts +1 -1
  10. package/dist/cjs/types/components/icons/Coins.d.ts +5 -1
  11. package/dist/cjs/types/components/icons/Generic.d.ts +68 -0
  12. package/dist/cjs/types/components/icons/Search.d.ts +4 -1
  13. package/dist/cjs/types/components/icons/Weather.d.ts +4 -0
  14. package/dist/cjs/types/components/icons/index.d.ts +1 -0
  15. package/dist/cjs/types/components/layout/DropdownMenu.d.ts +6 -3
  16. package/dist/cjs/types/components/layout/Menu.d.ts +2 -2
  17. package/dist/cjs/types/components/lists/DropdownMenuItem.d.ts +17 -2
  18. package/dist/cjs/types/components/lists/DropdownMenuTitle.d.ts +3 -0
  19. package/dist/cjs/types/components/lists/HistoryItem.d.ts +2 -3
  20. package/dist/cjs/types/components/lists/ListItem.d.ts +5 -4
  21. package/dist/cjs/types/components/lists/index.d.ts +1 -0
  22. package/dist/cjs/types/hooks/index.d.ts +1 -0
  23. package/dist/cjs/types/hooks/useDropdownMenu.d.ts +7 -3
  24. package/dist/cjs/types/hooks/useUserTheme.d.ts +13 -0
  25. package/dist/cjs/types/providers/ThemeProvider.d.ts +11 -0
  26. package/dist/cjs/types/providers/index.d.ts +1 -1
  27. package/dist/cjs/types/stories/badges/ImageIcon.stories.d.ts +2 -2
  28. package/dist/cjs/types/stories/layout/DropdownMenu.stories.d.ts +4 -1
  29. package/dist/cjs/types/stories/lists/DropdownMenuItem.stories.d.ts +7 -2
  30. package/dist/cjs/types/stories/lists/DropdownMenuTitle.stories.d.ts +6 -0
  31. package/dist/cjs/types/stories/lists/HistoryItem.stories.d.ts +1 -0
  32. package/dist/cjs/types/types/components.d.ts +2 -2
  33. package/dist/cjs/types/types/index.d.ts +1 -0
  34. package/dist/cjs/types/types/utils.d.ts +11 -0
  35. package/dist/esm/index.js +1219 -973
  36. package/dist/esm/types/components/badges/IconLabel.d.ts +2 -2
  37. package/dist/esm/types/components/badges/Image.d.ts +9 -0
  38. package/dist/esm/types/components/badges/index.d.ts +1 -1
  39. package/dist/esm/types/components/buttons/IconButton.d.ts +1 -1
  40. package/dist/esm/types/components/controls/Switch.d.ts +4 -3
  41. package/dist/esm/types/components/icons/Arrow.d.ts +4 -1
  42. package/dist/esm/types/components/icons/Clock.d.ts +1 -1
  43. package/dist/esm/types/components/icons/Coins.d.ts +5 -1
  44. package/dist/esm/types/components/icons/Generic.d.ts +68 -0
  45. package/dist/esm/types/components/icons/Search.d.ts +4 -1
  46. package/dist/esm/types/components/icons/Weather.d.ts +4 -0
  47. package/dist/esm/types/components/icons/index.d.ts +1 -0
  48. package/dist/esm/types/components/layout/DropdownMenu.d.ts +6 -3
  49. package/dist/esm/types/components/layout/Menu.d.ts +2 -2
  50. package/dist/esm/types/components/lists/DropdownMenuItem.d.ts +17 -2
  51. package/dist/esm/types/components/lists/DropdownMenuTitle.d.ts +3 -0
  52. package/dist/esm/types/components/lists/HistoryItem.d.ts +2 -3
  53. package/dist/esm/types/components/lists/ListItem.d.ts +5 -4
  54. package/dist/esm/types/components/lists/index.d.ts +1 -0
  55. package/dist/esm/types/hooks/index.d.ts +1 -0
  56. package/dist/esm/types/hooks/useDropdownMenu.d.ts +7 -3
  57. package/dist/esm/types/hooks/useUserTheme.d.ts +13 -0
  58. package/dist/esm/types/providers/ThemeProvider.d.ts +11 -0
  59. package/dist/esm/types/providers/index.d.ts +1 -1
  60. package/dist/esm/types/stories/badges/ImageIcon.stories.d.ts +2 -2
  61. package/dist/esm/types/stories/layout/DropdownMenu.stories.d.ts +4 -1
  62. package/dist/esm/types/stories/lists/DropdownMenuItem.stories.d.ts +7 -2
  63. package/dist/esm/types/stories/lists/DropdownMenuTitle.stories.d.ts +6 -0
  64. package/dist/esm/types/stories/lists/HistoryItem.stories.d.ts +1 -0
  65. package/dist/esm/types/types/components.d.ts +2 -2
  66. package/dist/esm/types/types/index.d.ts +1 -0
  67. package/dist/esm/types/types/utils.d.ts +11 -0
  68. package/dist/index.css +1 -1
  69. package/dist/index.d.ts +859 -723
  70. package/package.json +2 -1
  71. package/dist/cjs/types/components/badges/ImageIcon.d.ts +0 -9
  72. package/dist/cjs/types/providers/SquidConfigProvider.d.ts +0 -9
  73. package/dist/esm/types/components/badges/ImageIcon.d.ts +0 -9
  74. package/dist/esm/types/providers/SquidConfigProvider.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" }) }));
@@ -17204,6 +17207,9 @@ function SunIcon({ size = "24", className, }) {
17204
17207
  function MoonIcon({ size = "20", className, }) {
17205
17208
  return (jsx("svg", { width: size, height: size, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M10.0463 2.99972C10.2292 2.73432 10.2427 2.38723 10.0809 2.10846C9.91903 1.8297 9.61096 1.66925 9.28979 1.69647C5.02109 2.05816 1.66992 5.63639 1.66992 9.9982C1.66992 14.5997 5.40018 18.33 10.0017 18.33C14.3636 18.33 17.9419 14.9787 18.3035 10.7098C18.3307 10.3887 18.1702 10.0806 17.8914 9.91879C17.6127 9.75698 17.2656 9.77044 17.0002 9.95336C16.1951 10.5083 15.2201 10.8331 14.1667 10.8331C11.4052 10.8331 9.16667 8.59452 9.16667 5.8331C9.16667 4.77977 9.49145 3.80481 10.0463 2.99972Z", fill: "currentColor" }) }));
17206
17209
  }
17210
+ function SunOutlinedIcon({ size = "24", className, }) {
17211
+ 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 3V2M12 22V21M18.3598 5.64005L19.0698 4.93005M4.93016 19.07L5.64016 18.36M21 12H22M2 12H3M18.3598 18.36L19.0698 19.07M4.93016 4.93005L5.64016 5.64005M15.5355 8.46447C17.4882 10.4171 17.4882 13.5829 15.5355 15.5355C13.5829 17.4882 10.4171 17.4882 8.46447 15.5355C6.51185 13.5829 6.51185 10.4171 8.46447 8.46447C10.4171 6.51185 13.5829 6.51185 15.5355 8.46447Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
17212
+ }
17207
17213
 
17208
17214
  const dockIconClassname = "tw-text-grey-900";
17209
17215
  const dockIconSelectedClassname = "group-data-[squid-theme-type=dark]:tw-text-royal-700 group-data-[squid-theme-type=light]:tw-text-volt-700";
@@ -17229,6 +17235,58 @@ function DockIconHelp({ isSelected = false }) {
17229
17235
  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
17236
  }
17231
17237
 
17238
+ function GhostIcon({ size = "20", className, }) {
17239
+ 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" }) }));
17240
+ }
17241
+ function SettingsSliderIcon({ size = "20", className, }) {
17242
+ 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" })] }));
17243
+ }
17244
+ function EyeOpenIcon({ size = "20", className, }) {
17245
+ 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" }) }));
17246
+ }
17247
+ function BellAlarmIcon({ size = "20", className, }) {
17248
+ 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" })] }));
17249
+ }
17250
+ function LimitIcon({ 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: "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" }) }));
17252
+ }
17253
+ function PoopIcon({ size = "20", className, }) {
17254
+ 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" }) }));
17255
+ }
17256
+ function CatSquareIcon({ 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", { 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" })] }));
17258
+ }
17259
+ function FilterAscendingIcon({ size = "20", className, }) {
17260
+ 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" })] }));
17261
+ }
17262
+ function ImageIcon({ size = "20", className, }) {
17263
+ 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" }) }));
17264
+ }
17265
+ function FilterTimelineIcon({ size = "20", className, }) {
17266
+ 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" })] }));
17267
+ }
17268
+ function PhoneIcon({ size = "24", className, }) {
17269
+ return (jsx("svg", { className: className, xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 25 24", fill: "none", children: jsx("path", { d: "M10.5 19H14.5M8.5 22H16.5C17.6046 22 18.5 21.1046 18.5 20V4C18.5 2.89543 17.6046 2 16.5 2H8.5C7.39543 2 6.5 2.89543 6.5 4V20C6.5 21.1046 7.39543 22 8.5 22Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
17270
+ }
17271
+ function LaptopIcon({ size = "24", className, }) {
17272
+ return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 25 24", fill: "none", className: className, children: [jsx("path", { d: "M4.5 6C4.5 4.89543 5.39543 4 6.5 4H18.5C19.6046 4 20.5 4.89543 20.5 6V15C20.5 15.5523 20.0523 16 19.5 16H5.5C4.94772 16 4.5 15.5523 4.5 15V6Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square", strokeLinejoin: "round" }), jsx("path", { d: "M2.5 16H22.5V18C22.5 19.1046 21.6046 20 20.5 20H4.5C3.39543 20 2.5 19.1046 2.5 18V16Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square", strokeLinejoin: "round" })] }));
17273
+ }
17274
+ function CopyIcon({ size = "20", className, }) {
17275
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 21 20", fill: "none", className: className, children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.16663 6.66666V3.54166C7.16663 2.50612 8.00609 1.66666 9.04163 1.66666H16.9583C17.9938 1.66666 18.8333 2.50612 18.8333 3.54166V11.4583C18.8333 12.4939 17.9938 13.3333 16.9583 13.3333H13.8333V16.4583C13.8333 17.4939 12.9938 18.3333 11.9583 18.3333H4.04163C3.00609 18.3333 2.16663 17.4939 2.16663 16.4583V8.54166C2.16663 7.50612 3.00609 6.66666 4.04163 6.66666H7.16663ZM9.04163 13.3333C8.00609 13.3333 7.16663 12.4939 7.16663 11.4583V8.33332H4.04163C3.92657 8.33332 3.83329 8.4266 3.83329 8.54166V16.4583C3.83329 16.5734 3.92657 16.6667 4.04163 16.6667H11.9583C12.0734 16.6667 12.1666 16.5734 12.1666 16.4583V13.3333H9.04163Z", fill: "currentColor" }) }));
17276
+ }
17277
+ function FileDownloadIcon({ size = "20", className, }) {
17278
+ return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 21 20", fill: "none", children: [jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.33337 1.66666H10.5V5.83332C10.5 7.21404 11.6193 8.33332 13 8.33332H17.1667V15.8333C17.1667 17.214 16.0474 18.3333 14.6667 18.3333H6.33337C4.95266 18.3333 3.83337 17.214 3.83337 15.8333V4.16666C3.83337 2.78594 4.95266 1.66666 6.33337 1.66666ZM13.1726 14.3392L11.0893 16.4226C10.7639 16.748 10.2362 16.748 9.91079 16.4226L7.82745 14.3392C7.50201 14.0138 7.50201 13.4862 7.82745 13.1607C8.15289 12.8353 8.68053 12.8353 9.00596 13.1607L9.66671 13.8215V10.8333C9.66671 10.3731 10.0398 9.99999 10.5 9.99999C10.9603 9.99999 11.3334 10.3731 11.3334 10.8333V13.8215L11.9941 13.1607C12.3196 12.8353 12.8472 12.8353 13.1726 13.1607C13.4981 13.4862 13.4981 14.0138 13.1726 14.3392Z", fill: "currentColor" }), jsx("path", { d: "M12.1667 2.15481L16.6786 6.66666H13C12.5398 6.66666 12.1667 6.29356 12.1667 5.83332V2.15481Z", fill: "currentColor" })] }));
17279
+ }
17280
+ function CodeSolidSquareIcon({ size = "24", className, }) {
17281
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 25 24", fill: "none", className: className, children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.5 6C3.5 4.34315 4.84315 3 6.5 3H18.5C20.1569 3 21.5 4.34315 21.5 6V18C21.5 19.6569 20.1569 21 18.5 21H6.5C4.84315 21 3.5 19.6569 3.5 18V6ZM11.2071 8.79289C11.5976 9.18342 11.5976 9.81658 11.2071 10.2071L9.41421 12L11.2071 13.7929C11.5976 14.1834 11.5976 14.8166 11.2071 15.2071C10.8166 15.5976 10.1834 15.5976 9.79289 15.2071L8 13.4142C7.21895 12.6332 7.21895 11.3668 8 10.5858L9.79289 8.79289C10.1834 8.40237 10.8166 8.40237 11.2071 8.79289ZM15.2071 8.79289C14.8166 8.40237 14.1834 8.40237 13.7929 8.79289C13.4024 9.18342 13.4024 9.81658 13.7929 10.2071L15.5858 12L13.7929 13.7929C13.4024 14.1834 13.4024 14.8166 13.7929 15.2071C14.1834 15.5976 14.8166 15.5976 15.2071 15.2071L17 13.4142C17.781 12.6332 17.781 11.3668 17 10.5858L15.2071 8.79289Z", fill: "currentColor" }) }));
17282
+ }
17283
+ function CodeBracketsIcon({ size = "20", className, }) {
17284
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.8688 2.5249C12.3153 2.63652 12.5867 3.08896 12.4751 3.53546L9.14178 16.8688C9.03015 17.3153 8.57771 17.5868 8.13121 17.4752C7.68472 17.3635 7.41325 16.9111 7.52487 16.4646L10.8582 3.13123C10.9698 2.68474 11.4223 2.41327 11.8688 2.5249ZM5.58925 6.07746C5.91469 6.4029 5.91469 6.93053 5.58925 7.25597L3.43443 9.41079C3.10899 9.73623 3.10899 10.2639 3.43443 10.5893L5.58925 12.7441C5.91469 13.0696 5.91469 13.5972 5.58925 13.9226C5.26381 14.2481 4.73617 14.2481 4.41074 13.9226L2.25591 11.7678C1.2796 10.7915 1.27961 9.20859 2.25592 8.23228L4.41074 6.07746C4.73617 5.75202 5.26381 5.75202 5.58925 6.07746ZM14.4107 6.07746C14.7362 5.75202 15.2638 5.75202 15.5892 6.07746L17.7441 8.23228C18.7204 9.20859 18.7204 10.7915 17.7441 11.7678L15.5892 13.9226C15.2638 14.2481 14.7362 14.2481 14.4107 13.9226C14.0853 13.5972 14.0853 13.0696 14.4107 12.7441L16.5656 10.5893C16.891 10.2639 16.891 9.73623 16.5656 9.41079L14.4107 7.25597C14.0853 6.93053 14.0853 6.4029 14.4107 6.07746Z", fill: "currentColor" }) }));
17285
+ }
17286
+ function CommandIcon({ size = "22", className, }) {
17287
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 22 22", fill: "none", className: className, children: jsx("path", { d: "M8 17V17C8 16.0219 8.28951 15.0657 8.83205 14.2519L13.1679 7.74808C13.7105 6.93427 14 5.97808 14 5V5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
17288
+ }
17289
+
17232
17290
  function FeeButton(_a) {
17233
17291
  var { feeInUsd = "0", chipLabel = "Fee", className, tooltip } = _a, props = __rest$1(_a, ["feeInUsd", "chipLabel", "className", "tooltip"]);
17234
17292
  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 +17339,68 @@ const darkTheme = {
17281
17339
  "highlight-700": "#08A054",
17282
17340
  };
17283
17341
 
17342
+ var createPlugin$2 = {};
17343
+
17344
+ var createPlugin$1 = {};
17345
+
17346
+ (function (exports) {
17347
+ Object.defineProperty(exports, "__esModule", {
17348
+ value: true
17349
+ });
17350
+ Object.defineProperty(exports, "default", {
17351
+ enumerable: true,
17352
+ get: function() {
17353
+ return _default;
17354
+ }
17355
+ });
17356
+ function createPlugin(plugin, config) {
17357
+ return {
17358
+ handler: plugin,
17359
+ config
17360
+ };
17361
+ }
17362
+ createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {
17363
+ const optionsFunction = function(options) {
17364
+ return {
17365
+ __options: options,
17366
+ handler: pluginFunction(options),
17367
+ config: configFunction(options)
17368
+ };
17369
+ };
17370
+ optionsFunction.__isOptionsFunction = true;
17371
+ // Expose plugin dependencies so that `object-hash` returns a different
17372
+ // value if anything here changes, to ensure a rebuild is triggered.
17373
+ optionsFunction.__pluginFunction = pluginFunction;
17374
+ optionsFunction.__configFunction = configFunction;
17375
+ return optionsFunction;
17376
+ };
17377
+ const _default = createPlugin;
17378
+ } (createPlugin$1));
17379
+
17380
+ (function (exports) {
17381
+ Object.defineProperty(exports, "__esModule", {
17382
+ value: true
17383
+ });
17384
+ Object.defineProperty(exports, "default", {
17385
+ enumerable: true,
17386
+ get: function() {
17387
+ return _default;
17388
+ }
17389
+ });
17390
+ const _createPlugin = /*#__PURE__*/ _interop_require_default(createPlugin$1);
17391
+ function _interop_require_default(obj) {
17392
+ return obj && obj.__esModule ? obj : {
17393
+ default: obj
17394
+ };
17395
+ }
17396
+ const _default = _createPlugin.default;
17397
+ } (createPlugin$2));
17398
+
17399
+ let createPlugin = createPlugin$2;
17400
+ var plugin = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default;
17401
+
17402
+ var plugin$1 = /*@__PURE__*/getDefaultExportFromCjs(plugin);
17403
+
17284
17404
  const spacing$1 = {
17285
17405
  "squid-xxs": "0.3125rem", // 5px
17286
17406
  "squid-xs": "0.625rem", // 10px
@@ -17595,7 +17715,27 @@ const baseTailwindConfig = {
17595
17715
  }, {})),
17596
17716
  },
17597
17717
  },
17598
- plugins: [],
17718
+ plugins: [
17719
+ // custom classes available for anyone extending this config
17720
+ plugin$1(({ addUtilities }) => {
17721
+ addUtilities({
17722
+ ".focus-visible-within-outline:has(:focus-visible)": {
17723
+ "outline-style": "solid",
17724
+ "outline-width": "2px",
17725
+ "outline-color": `var(${themeTypesKeys["royal-500"].cssVariable})`,
17726
+ },
17727
+ ".scrollbar-hidden": {
17728
+ scrollbarWidth: "none",
17729
+ },
17730
+ ".highlight-adjacent:has(button:hover)>button:first-child": {
17731
+ backgroundColor: `var(${themeTypesKeys["material-light-thin"].cssVariable})`,
17732
+ },
17733
+ ".highlight-adjacent:has(*:hover) .hide-on-parent-hover": {
17734
+ opacity: "0",
17735
+ },
17736
+ });
17737
+ }),
17738
+ ],
17599
17739
  };
17600
17740
 
17601
17741
  function StopsButton(_a) {
@@ -17645,431 +17785,89 @@ function DetailsToolbar({ errorMessage, helpButton, isLoading, isEmpty, flipButt
17645
17785
  "group-hover/flip-button:tw-rotate-180") }) }) }))) }), jsx("div", { className: cn(detailClassName, "tw-justify-end"), children: !!stopsButton && jsx(StopsButton, Object.assign({}, stopsButton)) })] })) }));
17646
17786
  }
17647
17787
 
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
- };
17788
+ const borderRadiusClassMap = {
17789
+ sm: "tw-rounded-squid-s",
17790
+ lg: "tw-rounded-squid-m",
17791
+ };
17792
+ function Menu(_a) {
17793
+ var { children, containerClassName, contentClassName, rounded = "lg", menuRef, contentWrapperProps } = _a, props = __rest$1(_a, ["children", "containerClassName", "contentClassName", "rounded", "menuRef", "contentWrapperProps"]);
17794
+ 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,
17795
+ // :before element to create a backdrop
17796
+ // Not applied to the div itself because the backdrop-filter spec does not apply nested backdrop filters
17797
+ "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]) })] }) })));
17745
17798
  }
17746
17799
 
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;
17800
+ function DropdownMenu({ dropdownRef, className, menuRef, isHidden = false, listClassName, containerClassName, children, contentWrapperProps, menuContentClassName, }) {
17801
+ 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 })) }) }));
17799
17802
  }
17800
17803
 
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
- };
17804
+ function InfoBox({ title, description, icon }) {
17805
+ return (jsxs("div", { className: "tw-align-self-stretch tw-flex tw-flex-col tw-items-center tw-gap-squid-xs tw-px-squid-m tw-pb-squid-l tw-pt-squid-xs tw-text-royal-400", children: [icon, jsxs("div", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xxs tw-text-center", children: [jsx(BodyText, { size: "small", className: "!tw-leading-[9px]", children: title }), jsx(CaptionText, { className: "tw-text-grey-500", children: description })] })] }));
17821
17806
  }
17822
17807
 
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
- };
17808
+ const modalWidthClassMap = {
17809
+ large: "mobile-lg:tw-w-modal-large",
17810
+ "extra-large": "mobile-lg:tw-w-modal-extra-large",
17811
+ };
17812
+ function Modal({ children, className, onBackdropClick, isOpen: _isOpen = true, maxHeight = false, width = "large", }) {
17813
+ const [isOpen, setIsOpen] = useState(_isOpen);
17841
17814
  useEffect(() => {
17842
- if (immediateStart) {
17843
- startTimer();
17844
- }
17815
+ if (_isOpen)
17816
+ return setIsOpen(true);
17817
+ const timeoutId = setTimeout(() => {
17818
+ setIsOpen(false);
17819
+ }, ANIMATION_DURATIONS.HIDE_MODAL);
17845
17820
  return () => {
17846
- stopTimer();
17821
+ clearTimeout(timeoutId);
17847
17822
  };
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 })] }));
17823
+ }, [_isOpen]);
17824
+ return (
17825
+ // modal container (backdrop)
17826
+ isOpen && (jsx("div", { onClick: onBackdropClick
17827
+ ? (event) => {
17828
+ if (event.target === event.currentTarget) {
17829
+ onBackdropClick();
17830
+ }
17831
+ }
17832
+ : undefined, style: {
17833
+ [CSS_VARS.BLUR_IN_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
17834
+ [CSS_VARS.BLUR_OUT_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
17835
+ }, className: cn("tw-absolute tw-inset-0 tw-z-40 tw-flex tw-items-start tw-justify-center tw-px-squid-xs tw-py-squid-xl tw-pb-squid-m", _isOpen ? "tw-animate-blur-in" : "tw-animate-blur-out"), children: jsx("div", { style: {
17836
+ [CSS_VARS.SLIDE_TO_TOP_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
17837
+ [CSS_VARS.SLIDE_TO_BOTTOM_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
17838
+ }, className: cn("tw-relative tw-flex tw-max-h-modal-compact tw-max-w-full tw-flex-col tw-items-start tw-justify-end tw-gap-squid-xxs tw-self-end mobile-xs:tw-w-modal-compact mobile-lg:tw-max-h-modal-large", className, _isOpen ? "tw-animate-slide-to-top" : "tw-animate-slide-to-bottom", maxHeight && "tw-h-full", modalWidthClassMap[width]), children: children }) })));
17978
17839
  }
17979
17840
 
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",
17841
+ const borderTypeClassMap = {
17842
+ border: "tw-border tw-border-material-light-thin",
17843
+ outline: "tw-outline tw-outline-1 -tw-outline-offset-[1px] tw-outline-material-light-thin",
17987
17844
  };
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] })));
17845
+ function ModalContent(_a) {
17846
+ var { children, addGap = false, paddingY = false, borderType = "border", className } = _a, props = __rest$1(_a, ["children", "addGap", "paddingY", "borderType", "className"]);
17847
+ return (jsx("div", Object.assign({}, props, { className: cn("tw-flex tw-h-full tw-max-h-[445px] tw-w-full tw-flex-col tw-self-stretch tw-rounded-squid-l tw-bg-grey-800 tw-text-grey-300 mobile-sm-height:tw-max-h-[535px]", addGap && "tw-gap-squid-xxs tw-pt-squid-xxs", borderTypeClassMap[borderType], paddingY && "tw-py-squid-xxs", className), children: children })));
18000
17848
  }
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))) }))] }))) })] })) }));
17849
+ function ModalContentDivider() {
17850
+ return (jsx("svg", { width: "100%", height: "11", viewBox: "0 0 400 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("rect", { x: "1", y: "5", width: "398", height: "1", fill: "currentColor" }) }));
18015
17851
  }
18016
17852
 
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 })] }) }));
17853
+ function NavigationBar(_a) {
17854
+ var { title, displayBackButton = false, logoUrl, transparent = false, displayButtonShadows = false, onBackButtonClick, actions, isLoading = false } = _a, props = __rest$1(_a, ["title", "displayBackButton", "logoUrl", "transparent", "displayButtonShadows", "onBackButtonClick", "actions", "isLoading"]);
17855
+ return (jsxs("nav", Object.assign({}, props, { className: cn("tw-flex tw-max-h-[120px] tw-flex-row-reverse tw-text-grey-300 mobile-xs-height:tw-flex-col", transparent ? "tw-bg-transparent" : "tw-bg-grey-900", props.className), children: [jsxs("div", { className: cn("tw-flex tw-h-squid-xxl tw-items-center tw-justify-end tw-gap-x-squid-xs tw-pl-squid-m", displayBackButton
17856
+ ? "tw-w-full tw-pr-squid-xs mobile-xs-height:tw-pr-squid-m"
17857
+ : "tw-pr-squid-m mobile-lg:tw-pl-squid-l", !title && "tw-w-full mobile-xs-height:tw-w-[unset]"), children: [displayBackButton ? (jsx(Button$1, { className: displayButtonShadows
17858
+ ? "group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2"
17859
+ : undefined, variant: "tertiary", size: "md", isLoading: isLoading, icon: jsx(ArrowLeftIcon, {}), onClick: onBackButtonClick })) : null, logoUrl ? (jsx("img", { src: logoUrl, className: "tw-h-squid-xl tw-min-w-squid-xl" })) : null, jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end tw-gap-squid-xxs", children: actions === null || actions === void 0 ? void 0 : actions.map((action) => {
17860
+ var _a;
17861
+ return (jsx(Tooltip, Object.assign({}, action.tooltip, { tooltipContent: isLoading ? undefined : (_a = action.tooltip) === null || _a === void 0 ? void 0 : _a.tooltipContent, childrenClassName: "tw-rounded-squid-m", containerClassName: "tw-rounded-squid-m", tooltipWidth: "max", children: jsx(Button$1, { size: "md", variant: "tertiary", isLoading: isLoading, label: typeof action.labelOrIcon === "string"
17862
+ ? action.labelOrIcon
17863
+ : undefined, className: "tw-text-grey-300", icon: typeof action.labelOrIcon === "string"
17864
+ ? null
17865
+ : action.labelOrIcon, onClick: action.onClick, chip: action.chip }) }), action.id));
17866
+ }) })] }), title ? (jsx("div", { className: cn("tw-h-squid-xxl tw-w-full tw-items-center tw-px-squid-m tw-py-squid-xxs mobile-lg:tw-px-squid-l",
17867
+ // hide the title on small screens when back button is displayed, so it's positioned on the left
17868
+ displayBackButton
17869
+ ? "tw-hidden mobile-xs-height:tw-flex"
17870
+ : "tw-flex"), children: jsx(HeadingText, { size: "small", children: title }) })) : null] })));
18073
17871
  }
18074
17872
 
18075
17873
  function PipeSeparator(_a) {
@@ -18077,275 +17875,18 @@ function PipeSeparator(_a) {
18077
17875
  return (jsx("div", Object.assign({}, props, { className: cn("tw-h-[0.8em] tw-w-[2px] tw-rounded-full tw-bg-[currentColor]", className) })));
18078
17876
  }
18079
17877
 
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
- const borderRadiusClassMap = {
18256
- sm: "tw-rounded-squid-s",
18257
- lg: "tw-rounded-squid-m",
18258
- };
18259
- 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]) })] }) })));
18262
- }
18263
-
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))) })) }) }));
18266
- }
18267
-
18268
- function InfoBox({ title, description, icon }) {
18269
- return (jsxs("div", { className: "tw-align-self-stretch tw-flex tw-flex-col tw-items-center tw-gap-squid-xs tw-px-squid-m tw-pb-squid-l tw-pt-squid-xs tw-text-royal-400", children: [icon, jsxs("div", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xxs tw-text-center", children: [jsx(BodyText, { size: "small", className: "!tw-leading-[9px]", children: title }), jsx(CaptionText, { className: "tw-text-grey-500", children: description })] })] }));
18270
- }
18271
-
18272
- const modalWidthClassMap = {
18273
- large: "mobile-lg:tw-w-modal-large",
18274
- "extra-large": "mobile-lg:tw-w-modal-extra-large",
18275
- };
18276
- function Modal({ children, className, onBackdropClick, isOpen: _isOpen = true, maxHeight = false, width = "large", }) {
18277
- const [isOpen, setIsOpen] = useState(_isOpen);
18278
- useEffect(() => {
18279
- if (_isOpen)
18280
- return setIsOpen(true);
18281
- const timeoutId = setTimeout(() => {
18282
- setIsOpen(false);
18283
- }, ANIMATION_DURATIONS.HIDE_MODAL);
18284
- return () => {
18285
- clearTimeout(timeoutId);
18286
- };
18287
- }, [_isOpen]);
18288
- return (
18289
- // modal container (backdrop)
18290
- isOpen && (jsx("div", { onClick: onBackdropClick
18291
- ? (event) => {
18292
- if (event.target === event.currentTarget) {
18293
- onBackdropClick();
18294
- }
18295
- }
18296
- : undefined, style: {
18297
- [CSS_VARS.BLUR_IN_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
18298
- [CSS_VARS.BLUR_OUT_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
18299
- }, className: cn("tw-absolute tw-inset-0 tw-z-40 tw-flex tw-items-start tw-justify-center tw-px-squid-xs tw-py-squid-xl tw-pb-squid-m", _isOpen ? "tw-animate-blur-in" : "tw-animate-blur-out"), children: jsx("div", { style: {
18300
- [CSS_VARS.SLIDE_TO_TOP_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
18301
- [CSS_VARS.SLIDE_TO_BOTTOM_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
18302
- }, className: cn("tw-relative tw-flex tw-max-h-modal-compact tw-max-w-full tw-flex-col tw-items-start tw-justify-end tw-gap-squid-xxs tw-self-end mobile-xs:tw-w-modal-compact mobile-lg:tw-max-h-modal-large", className, _isOpen ? "tw-animate-slide-to-top" : "tw-animate-slide-to-bottom", maxHeight && "tw-h-full", modalWidthClassMap[width]), children: children }) })));
18303
- }
18304
-
18305
- const borderTypeClassMap = {
18306
- border: "tw-border tw-border-material-light-thin",
18307
- outline: "tw-outline tw-outline-1 -tw-outline-offset-[1px] tw-outline-material-light-thin",
18308
- };
18309
- function ModalContent(_a) {
18310
- var { children, addGap = false, paddingY = false, borderType = "border", className } = _a, props = __rest$1(_a, ["children", "addGap", "paddingY", "borderType", "className"]);
18311
- return (jsx("div", Object.assign({}, props, { className: cn("tw-flex tw-h-full tw-max-h-[445px] tw-w-full tw-flex-col tw-self-stretch tw-rounded-squid-l tw-bg-grey-800 tw-text-grey-300 mobile-sm-height:tw-max-h-[535px]", addGap && "tw-gap-squid-xxs tw-pt-squid-xxs", borderTypeClassMap[borderType], paddingY && "tw-py-squid-xxs", className), children: children })));
18312
- }
18313
- function ModalContentDivider() {
18314
- return (jsx("svg", { width: "100%", height: "11", viewBox: "0 0 400 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("rect", { x: "1", y: "5", width: "398", height: "1", fill: "currentColor" }) }));
18315
- }
18316
-
18317
- function NavigationBar(_a) {
18318
- var { title, displayBackButton = false, logoUrl, transparent = false, displayButtonShadows = false, onBackButtonClick, actions, isLoading = false } = _a, props = __rest$1(_a, ["title", "displayBackButton", "logoUrl", "transparent", "displayButtonShadows", "onBackButtonClick", "actions", "isLoading"]);
18319
- return (jsxs("nav", Object.assign({}, props, { className: cn("tw-flex tw-max-h-[120px] tw-flex-row-reverse tw-text-grey-300 mobile-xs-height:tw-flex-col", transparent ? "tw-bg-transparent" : "tw-bg-grey-900", props.className), children: [jsxs("div", { className: cn("tw-flex tw-h-squid-xxl tw-items-center tw-justify-end tw-gap-x-squid-xs tw-pl-squid-m", displayBackButton
18320
- ? "tw-w-full tw-pr-squid-xs mobile-xs-height:tw-pr-squid-m"
18321
- : "tw-pr-squid-m mobile-lg:tw-pl-squid-l", !title && "tw-w-full mobile-xs-height:tw-w-[unset]"), children: [displayBackButton ? (jsx(Button$1, { className: displayButtonShadows
18322
- ? "group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2"
18323
- : undefined, variant: "tertiary", size: "md", isLoading: isLoading, icon: jsx(ArrowLeftIcon, {}), onClick: onBackButtonClick })) : null, logoUrl ? (jsx("img", { src: logoUrl, className: "tw-h-squid-xl tw-min-w-squid-xl" })) : null, jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end tw-gap-squid-xxs", children: actions === null || actions === void 0 ? void 0 : actions.map((action) => {
18324
- var _a;
18325
- return (jsx(Tooltip, Object.assign({}, action.tooltip, { tooltipContent: isLoading ? undefined : (_a = action.tooltip) === null || _a === void 0 ? void 0 : _a.tooltipContent, childrenClassName: "tw-rounded-squid-m", containerClassName: "tw-rounded-squid-m", tooltipWidth: "max", children: jsx(Button$1, { size: "md", variant: "tertiary", isLoading: isLoading, label: typeof action.labelOrIcon === "string"
18326
- ? action.labelOrIcon
18327
- : undefined, className: "tw-text-grey-300", icon: typeof action.labelOrIcon === "string"
18328
- ? null
18329
- : action.labelOrIcon, onClick: action.onClick, chip: action.chip }) }), action.id));
18330
- }) })] }), title ? (jsx("div", { className: cn("tw-h-squid-xxl tw-w-full tw-items-center tw-px-squid-m tw-py-squid-xxs mobile-lg:tw-px-squid-l",
18331
- // hide the title on small screens when back button is displayed, so it's positioned on the left
18332
- displayBackButton
18333
- ? "tw-hidden mobile-xs-height:tw-flex"
18334
- : "tw-flex"), children: jsx(HeadingText, { size: "small", children: title }) })) : null] })));
18335
- }
18336
-
18337
- function CollapsibleMenu({ children, menuRef, isOpen, transitionDuration, size, className, }) {
18338
- return (jsx("aside", { style: Object.assign({ transitionDuration, transitionTimingFunction: isOpen
18339
- ? "cubic-bezier(0.4, 1.3, 0.4, 1)"
18340
- : undefined, [CSS_VARS.COLLAPSIBLE_MENU_OPEN_WIDTH]: size.open.width, [CSS_VARS.COLLAPSIBLE_MENU_OPEN_HEIGHT]: size.open.height, [CSS_VARS.COLLAPSIBLE_MENU_CLOSED_WIDTH]: size.closed.width, [CSS_VARS.COLLAPSIBLE_MENU_CLOSED_HEIGHT]: size.closed.height }, (isOpen
18341
- ? {
18342
- width: `var(${CSS_VARS.COLLAPSIBLE_MENU_OPEN_WIDTH})`,
18343
- height: `var(${CSS_VARS.COLLAPSIBLE_MENU_OPEN_HEIGHT})`,
18344
- }
18345
- : {
18346
- width: `var(${CSS_VARS.COLLAPSIBLE_MENU_CLOSED_WIDTH})`,
18347
- height: `var(${CSS_VARS.COLLAPSIBLE_MENU_CLOSED_HEIGHT})`,
18348
- })), className: cn("tw-fixed tw-z-40 tw-flex tw-flex-col tw-overflow-hidden tw-bg-grey-900 tw-text-grey-200 tw-shadow-elevation-light-3 tw-outline-material-light-thin", className), ref: menuRef, children: children }));
17878
+ function CollapsibleMenu({ children, menuRef, isOpen, transitionDuration, size, className, }) {
17879
+ return (jsx("aside", { style: Object.assign({ transitionDuration, transitionTimingFunction: isOpen
17880
+ ? "cubic-bezier(0.4, 1.3, 0.4, 1)"
17881
+ : undefined, [CSS_VARS.COLLAPSIBLE_MENU_OPEN_WIDTH]: size.open.width, [CSS_VARS.COLLAPSIBLE_MENU_OPEN_HEIGHT]: size.open.height, [CSS_VARS.COLLAPSIBLE_MENU_CLOSED_WIDTH]: size.closed.width, [CSS_VARS.COLLAPSIBLE_MENU_CLOSED_HEIGHT]: size.closed.height }, (isOpen
17882
+ ? {
17883
+ width: `var(${CSS_VARS.COLLAPSIBLE_MENU_OPEN_WIDTH})`,
17884
+ height: `var(${CSS_VARS.COLLAPSIBLE_MENU_OPEN_HEIGHT})`,
17885
+ }
17886
+ : {
17887
+ width: `var(${CSS_VARS.COLLAPSIBLE_MENU_CLOSED_WIDTH})`,
17888
+ height: `var(${CSS_VARS.COLLAPSIBLE_MENU_CLOSED_HEIGHT})`,
17889
+ })), className: cn("tw-fixed tw-z-40 tw-flex tw-flex-col tw-overflow-hidden tw-bg-grey-900 tw-text-grey-200 tw-shadow-elevation-light-3 tw-outline-material-light-thin", className), ref: menuRef, children: children }));
18349
17890
  }
18350
17891
 
18351
17892
  const createStoreImpl = (createState) => {
@@ -18653,310 +18194,1012 @@ function requireUseSyncExternalStoreShim_development () {
18653
18194
  return useSyncExternalStoreShim_development;
18654
18195
  }
18655
18196
 
18656
- var hasRequiredShim;
18657
-
18658
- function requireShim () {
18659
- if (hasRequiredShim) return shim.exports;
18660
- hasRequiredShim = 1;
18661
-
18662
- if (process.env.NODE_ENV === 'production') {
18663
- shim.exports = requireUseSyncExternalStoreShim_production_min();
18664
- } else {
18665
- shim.exports = requireUseSyncExternalStoreShim_development();
18666
- }
18667
- return shim.exports;
18197
+ var hasRequiredShim;
18198
+
18199
+ function requireShim () {
18200
+ if (hasRequiredShim) return shim.exports;
18201
+ hasRequiredShim = 1;
18202
+
18203
+ if (process.env.NODE_ENV === 'production') {
18204
+ shim.exports = requireUseSyncExternalStoreShim_production_min();
18205
+ } else {
18206
+ shim.exports = requireUseSyncExternalStoreShim_development();
18207
+ }
18208
+ return shim.exports;
18209
+ }
18210
+
18211
+ /**
18212
+ * @license React
18213
+ * use-sync-external-store-shim/with-selector.production.min.js
18214
+ *
18215
+ * Copyright (c) Facebook, Inc. and its affiliates.
18216
+ *
18217
+ * This source code is licensed under the MIT license found in the
18218
+ * LICENSE file in the root directory of this source tree.
18219
+ */
18220
+
18221
+ var hasRequiredWithSelector_production_min;
18222
+
18223
+ function requireWithSelector_production_min () {
18224
+ if (hasRequiredWithSelector_production_min) return withSelector_production_min;
18225
+ hasRequiredWithSelector_production_min = 1;
18226
+ var h=React__default$1,n=requireShim();function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q="function"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;
18227
+ withSelector_production_min.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f;}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return [function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);
18228
+ u(function(){f.hasValue=!0;f.value=d;},[d]);w(d);return d};
18229
+ return withSelector_production_min;
18230
+ }
18231
+
18232
+ var withSelector_development = {};
18233
+
18234
+ /**
18235
+ * @license React
18236
+ * use-sync-external-store-shim/with-selector.development.js
18237
+ *
18238
+ * Copyright (c) Facebook, Inc. and its affiliates.
18239
+ *
18240
+ * This source code is licensed under the MIT license found in the
18241
+ * LICENSE file in the root directory of this source tree.
18242
+ */
18243
+
18244
+ var hasRequiredWithSelector_development;
18245
+
18246
+ function requireWithSelector_development () {
18247
+ if (hasRequiredWithSelector_development) return withSelector_development;
18248
+ hasRequiredWithSelector_development = 1;
18249
+
18250
+ if (process.env.NODE_ENV !== "production") {
18251
+ (function() {
18252
+
18253
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
18254
+ if (
18255
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
18256
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
18257
+ 'function'
18258
+ ) {
18259
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
18260
+ }
18261
+ var React = React__default$1;
18262
+ var shim = requireShim();
18263
+
18264
+ /**
18265
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
18266
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
18267
+ */
18268
+ function is(x, y) {
18269
+ return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
18270
+ ;
18271
+ }
18272
+
18273
+ var objectIs = typeof Object.is === 'function' ? Object.is : is;
18274
+
18275
+ var useSyncExternalStore = shim.useSyncExternalStore;
18276
+
18277
+ // for CommonJS interop.
18278
+
18279
+ var useRef = React.useRef,
18280
+ useEffect = React.useEffect,
18281
+ useMemo = React.useMemo,
18282
+ useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.
18283
+
18284
+ function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
18285
+ // Use this to track the rendered snapshot.
18286
+ var instRef = useRef(null);
18287
+ var inst;
18288
+
18289
+ if (instRef.current === null) {
18290
+ inst = {
18291
+ hasValue: false,
18292
+ value: null
18293
+ };
18294
+ instRef.current = inst;
18295
+ } else {
18296
+ inst = instRef.current;
18297
+ }
18298
+
18299
+ var _useMemo = useMemo(function () {
18300
+ // Track the memoized state using closure variables that are local to this
18301
+ // memoized instance of a getSnapshot function. Intentionally not using a
18302
+ // useRef hook, because that state would be shared across all concurrent
18303
+ // copies of the hook/component.
18304
+ var hasMemo = false;
18305
+ var memoizedSnapshot;
18306
+ var memoizedSelection;
18307
+
18308
+ var memoizedSelector = function (nextSnapshot) {
18309
+ if (!hasMemo) {
18310
+ // The first time the hook is called, there is no memoized result.
18311
+ hasMemo = true;
18312
+ memoizedSnapshot = nextSnapshot;
18313
+
18314
+ var _nextSelection = selector(nextSnapshot);
18315
+
18316
+ if (isEqual !== undefined) {
18317
+ // Even if the selector has changed, the currently rendered selection
18318
+ // may be equal to the new selection. We should attempt to reuse the
18319
+ // current value if possible, to preserve downstream memoizations.
18320
+ if (inst.hasValue) {
18321
+ var currentSelection = inst.value;
18322
+
18323
+ if (isEqual(currentSelection, _nextSelection)) {
18324
+ memoizedSelection = currentSelection;
18325
+ return currentSelection;
18326
+ }
18327
+ }
18328
+ }
18329
+
18330
+ memoizedSelection = _nextSelection;
18331
+ return _nextSelection;
18332
+ } // We may be able to reuse the previous invocation's result.
18333
+
18334
+
18335
+ // We may be able to reuse the previous invocation's result.
18336
+ var prevSnapshot = memoizedSnapshot;
18337
+ var prevSelection = memoizedSelection;
18338
+
18339
+ if (objectIs(prevSnapshot, nextSnapshot)) {
18340
+ // The snapshot is the same as last time. Reuse the previous selection.
18341
+ return prevSelection;
18342
+ } // The snapshot has changed, so we need to compute a new selection.
18343
+
18344
+
18345
+ // The snapshot has changed, so we need to compute a new selection.
18346
+ var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data
18347
+ // has changed. If it hasn't, return the previous selection. That signals
18348
+ // to React that the selections are conceptually equal, and we can bail
18349
+ // out of rendering.
18350
+
18351
+ // If a custom isEqual function is provided, use that to check if the data
18352
+ // has changed. If it hasn't, return the previous selection. That signals
18353
+ // to React that the selections are conceptually equal, and we can bail
18354
+ // out of rendering.
18355
+ if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {
18356
+ return prevSelection;
18357
+ }
18358
+
18359
+ memoizedSnapshot = nextSnapshot;
18360
+ memoizedSelection = nextSelection;
18361
+ return nextSelection;
18362
+ }; // Assigning this to a constant so that Flow knows it can't change.
18363
+
18364
+
18365
+ // Assigning this to a constant so that Flow knows it can't change.
18366
+ var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;
18367
+
18368
+ var getSnapshotWithSelector = function () {
18369
+ return memoizedSelector(getSnapshot());
18370
+ };
18371
+
18372
+ var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {
18373
+ return memoizedSelector(maybeGetServerSnapshot());
18374
+ };
18375
+ return [getSnapshotWithSelector, getServerSnapshotWithSelector];
18376
+ }, [getSnapshot, getServerSnapshot, selector, isEqual]),
18377
+ getSelection = _useMemo[0],
18378
+ getServerSelection = _useMemo[1];
18379
+
18380
+ var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);
18381
+ useEffect(function () {
18382
+ inst.hasValue = true;
18383
+ inst.value = value;
18384
+ }, [value]);
18385
+ useDebugValue(value);
18386
+ return value;
18387
+ }
18388
+
18389
+ withSelector_development.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;
18390
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
18391
+ if (
18392
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
18393
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
18394
+ 'function'
18395
+ ) {
18396
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
18397
+ }
18398
+
18399
+ })();
18400
+ }
18401
+ return withSelector_development;
18402
+ }
18403
+
18404
+ if (process.env.NODE_ENV === 'production') {
18405
+ withSelector.exports = requireWithSelector_production_min();
18406
+ } else {
18407
+ withSelector.exports = requireWithSelector_development();
18408
+ }
18409
+
18410
+ var withSelectorExports = withSelector.exports;
18411
+ var useSyncExternalStoreExports = /*@__PURE__*/getDefaultExportFromCjs(withSelectorExports);
18412
+
18413
+ const { useDebugValue } = React__default$1;
18414
+ const { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;
18415
+ let didWarnAboutEqualityFn = false;
18416
+ const identity = (arg) => arg;
18417
+ function useStore(api, selector = identity, equalityFn) {
18418
+ if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
18419
+ console.warn(
18420
+ "[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"
18421
+ );
18422
+ didWarnAboutEqualityFn = true;
18423
+ }
18424
+ const slice = useSyncExternalStoreWithSelector(
18425
+ api.subscribe,
18426
+ api.getState,
18427
+ api.getServerState || api.getInitialState,
18428
+ selector,
18429
+ equalityFn
18430
+ );
18431
+ useDebugValue(slice);
18432
+ return slice;
18433
+ }
18434
+ const createImpl = (createState) => {
18435
+ if ((import.meta.env ? import.meta.env.MODE : void 0) !== "production" && typeof createState !== "function") {
18436
+ console.warn(
18437
+ "[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
18438
+ );
18439
+ }
18440
+ const api = typeof createState === "function" ? createStore(createState) : createState;
18441
+ const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);
18442
+ Object.assign(useBoundStore, api);
18443
+ return useBoundStore;
18444
+ };
18445
+ const create = (createState) => createState ? createImpl(createState) : createImpl;
18446
+
18447
+ const useContainerStore = create(() => ({
18448
+ containerRef: undefined,
18449
+ }));
18450
+
18451
+ function ProductCard({ children }) {
18452
+ const containerRef = useRef(null);
18453
+ useEffect(() => {
18454
+ useContainerStore.setState({ containerRef });
18455
+ }, [containerRef]);
18456
+ return (jsx("div", { style: {
18457
+ width: `min(100vw, ${MEDIA_QUERIES.MOBILE_LG.value}px)`,
18458
+ }, 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 }) }));
18459
+ }
18460
+ function BorderedContainer({ children, className, }) {
18461
+ return (jsx("section", { className: cn("tw-border-t tw-border-t-material-light-thin", className), children: children }));
18462
+ }
18463
+
18464
+ function ProfileHeaderBackground() {
18465
+ 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" })] }));
18466
+ }
18467
+ function HeaderBackgroundDecorationRow({ index }) {
18468
+ const logoWithImage = (jsx(LogoContainer, { children: jsx(SquidLogo, {}) }));
18469
+ const emptyLogo = jsx(LogoContainer, {});
18470
+ 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] }));
18471
+ }
18472
+ function LogoContainer({ children }) {
18473
+ return (jsx("div", { className: "tw-flex tw-h-[60px] tw-w-[60px] tw-items-center tw-justify-center", children: children }));
18474
+ }
18475
+
18476
+ 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, }) {
18477
+ var _a, _b, _c;
18478
+ const isWalletButtonInteractive = !isLoading && !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick);
18479
+ const WalletButtonTag = isWalletButtonInteractive ? "button" : "div";
18480
+ const isFetching = isFetchingProp || isLoading;
18481
+ 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)
18482
+ ? "tw-text-grey-300"
18483
+ : "tw-text-royal-400", children: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18484
+ ? walletButton === null || walletButton === void 0 ? void 0 : walletButton.address
18485
+ : (_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)
18486
+ ? "tw-text-grey-600"
18487
+ : "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: {
18488
+ decimals: (_b = token === null || token === void 0 ? void 0 : token.decimals) !== null && _b !== void 0 ? _b : 18,
18489
+ symbol: (_c = token === null || token === void 0 ? void 0 : token.symbol) !== null && _c !== void 0 ? _c : "",
18490
+ price: tokenPrice,
18491
+ }, onAmountChange: (value) => {
18492
+ onAmountChange === null || onAmountChange === void 0 ? void 0 : onAmountChange(value);
18493
+ }, balance: balance, criticalPriceImpactPercentage: criticalPriceImpactPercentage, error: error, formatIfVerySmall: {
18494
+ token: "0.001",
18495
+ usd: "0.01",
18496
+ }, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: !!token, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading })] }));
18497
+ }
18498
+
18499
+ function SwapProgressViewHeader({ title, description, }) {
18500
+ 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 })] }));
18501
+ }
18502
+
18503
+ const SPACING = 10;
18504
+ function useDropdownMenu(props) {
18505
+ const { initialIsModalOpen, itemsContainerRef } = props !== null && props !== void 0 ? props : {};
18506
+ const [isDropdownOpen, setIsModalOpen] = useState(Boolean(initialIsModalOpen));
18507
+ const dropdownRef = useRef(null);
18508
+ const openDropdownButtonRef = useRef(null);
18509
+ useEffect(() => {
18510
+ const handleClickOutside = (event) => {
18511
+ // close modal if the user clicked outside of it
18512
+ var _a;
18513
+ if (dropdownRef.current &&
18514
+ event.target !== openDropdownButtonRef.current &&
18515
+ !dropdownRef.current.contains(event.target) &&
18516
+ !((_a = openDropdownButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
18517
+ setIsModalOpen(false);
18518
+ }
18519
+ };
18520
+ if (isDropdownOpen) {
18521
+ document.addEventListener("click", handleClickOutside);
18522
+ }
18523
+ return () => {
18524
+ document.removeEventListener("click", handleClickOutside);
18525
+ };
18526
+ }, [dropdownRef, isDropdownOpen]);
18527
+ const openDropdown = useCallback(() => {
18528
+ setIsModalOpen((prev) => !prev);
18529
+ }, []);
18530
+ const closeDropdown = useCallback(() => {
18531
+ setIsModalOpen(false);
18532
+ }, []);
18533
+ const [dropdownStyles, setDropdownStyles] = useState(null);
18534
+ const itemRef = useRef(null);
18535
+ const menuRef = useRef(null);
18536
+ // Effect to find the best position for the dropdown menu, so it's always visible for the user
18537
+ useEffect(() => {
18538
+ var _a;
18539
+ if (!isDropdownOpen) {
18540
+ // when the dropdown is closed, we want to reset its position
18541
+ // because user may scroll, and the old position may be out of view, so we'll need to recalculate it
18542
+ setDropdownStyles(null);
18543
+ return;
18544
+ }
18545
+ const item = itemRef.current;
18546
+ 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;
18547
+ const dropdownMenu = menuRef.current;
18548
+ if (!item || !dropdownRef.current || !itemsContainer || !dropdownMenu) {
18549
+ return;
18550
+ }
18551
+ // Get the bounding rectangle of the item
18552
+ const itemRect = item.getBoundingClientRect();
18553
+ // Get the bounding rectangle of the container element
18554
+ const containerRect = itemsContainer.getBoundingClientRect();
18555
+ const dropdownMenuRect = dropdownMenu.getBoundingClientRect();
18556
+ // Calculate the bottom position of the visible area of the the items container
18557
+ const containerVisibleBottom = containerRect.top + containerRect.height;
18558
+ // Calculate the distance from the bottom of the item to the visible bottom of the items container
18559
+ const distanceBetweenItemBottomAndContainerBottomEdge = containerVisibleBottom - itemRect.bottom;
18560
+ // the same but for the top
18561
+ const distanceBetweenItemTopAndContainerTopEdge = itemRect.top - containerRect.top;
18562
+ const dropdownMenuHeight = dropdownMenu.clientHeight;
18563
+ const maxHeight = containerRect.bottom - dropdownMenuRect.top - SPACING;
18564
+ // check if the height of the dropdown is less than the longest distance, either top or bottom
18565
+ // if so, means that the dropdown keeps visible when positioned at the top or bottom of the item
18566
+ const isDropdownVisibleAtItemTopOrBottom = dropdownMenuHeight <=
18567
+ Math.max(distanceBetweenItemBottomAndContainerBottomEdge, distanceBetweenItemTopAndContainerTopEdge);
18568
+ // if the dropdown is not visible at top or bottom of the item
18569
+ // we just center it
18570
+ if (!isDropdownVisibleAtItemTopOrBottom) {
18571
+ return setDropdownStyles({
18572
+ position: "center",
18573
+ maxHeight,
18574
+ });
18575
+ }
18576
+ // finally, if the dropdown fits, position it where it has more space
18577
+ if (distanceBetweenItemBottomAndContainerBottomEdge >=
18578
+ distanceBetweenItemTopAndContainerTopEdge) {
18579
+ setDropdownStyles({
18580
+ position: "bottom",
18581
+ maxHeight,
18582
+ });
18583
+ }
18584
+ else {
18585
+ setDropdownStyles({
18586
+ position: "top",
18587
+ maxHeight,
18588
+ });
18589
+ }
18590
+ }, [isDropdownOpen, menuRef, itemRef]);
18591
+ return {
18592
+ isDropdownOpen,
18593
+ openDropdown,
18594
+ closeDropdown,
18595
+ dropdownRef,
18596
+ openDropdownButtonRef,
18597
+ dropdownStyles,
18598
+ itemRef,
18599
+ menuRef,
18600
+ };
18601
+ }
18602
+
18603
+ const IS_SERVER = typeof window === "undefined";
18604
+ const useIsomorphicLayoutEffect$1 = IS_SERVER ? useEffect : useLayoutEffect;
18605
+ /**
18606
+ * 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).
18607
+ * @param {string} query - The media query to track.
18608
+ * @param {?UseMediaQueryOptions} [options] - The options for customizing the behavior of the hook (optional).
18609
+ * @returns {boolean} The current state of the media query (true if the query matches, false otherwise).
18610
+ * @public
18611
+ * @example
18612
+ * ```tsx
18613
+ * const isSmallScreen = useMediaQuery('(max-width: 600px)');
18614
+ * // Use `isSmallScreen` to conditionally apply styles or logic based on the screen size.
18615
+ * ```
18616
+ */
18617
+ function useMediaQuery(query, { defaultValue = false, initializeWithValue = true, } = {}) {
18618
+ const getMatches = (query) => {
18619
+ if (IS_SERVER) {
18620
+ return defaultValue;
18621
+ }
18622
+ return window.matchMedia(query).matches;
18623
+ };
18624
+ const [matches, setMatches] = useState(() => {
18625
+ if (initializeWithValue) {
18626
+ return getMatches(query);
18627
+ }
18628
+ return defaultValue;
18629
+ });
18630
+ // Handles the change event of the media query.
18631
+ function handleChange() {
18632
+ setMatches(getMatches(query));
18633
+ }
18634
+ useIsomorphicLayoutEffect$1(() => {
18635
+ const matchMedia = window.matchMedia(query);
18636
+ // Triggered at the first client-side load and if query changes
18637
+ handleChange();
18638
+ // Use deprecated `addListener` and `removeListener` to support Safari < 14 (#135)
18639
+ if (matchMedia.addListener) {
18640
+ matchMedia.addListener(handleChange);
18641
+ }
18642
+ else {
18643
+ matchMedia.addEventListener("change", handleChange);
18644
+ }
18645
+ return () => {
18646
+ if (matchMedia.removeListener) {
18647
+ matchMedia.removeListener(handleChange);
18648
+ }
18649
+ else {
18650
+ matchMedia.removeEventListener("change", handleChange);
18651
+ }
18652
+ };
18653
+ }, [query]);
18654
+ return matches;
18655
+ }
18656
+
18657
+ function useCollapsibleMenu() {
18658
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
18659
+ const menuRef = useRef(null);
18660
+ const toggleMenu = () => {
18661
+ setIsMenuOpen(!isMenuOpen);
18662
+ };
18663
+ useEffect(() => {
18664
+ const handleClickOutside = (event) => {
18665
+ if (menuRef.current && !menuRef.current.contains(event.target)) {
18666
+ setIsMenuOpen(false);
18667
+ }
18668
+ };
18669
+ document.addEventListener("mousedown", handleClickOutside);
18670
+ return () => document.removeEventListener("mousedown", handleClickOutside);
18671
+ }, []);
18672
+ return {
18673
+ isMenuOpen,
18674
+ toggleMenu,
18675
+ menuRef,
18676
+ };
18677
+ }
18678
+
18679
+ const useTimer = ({ immediateStart = true, }) => {
18680
+ const [timer, setTimer] = useState("0s");
18681
+ const intervalRef = useRef(null);
18682
+ const startTimer = () => {
18683
+ if (intervalRef.current !== null)
18684
+ return; // Prevent multiple intervals
18685
+ const startTime = Date.now();
18686
+ intervalRef.current = window.setInterval(() => {
18687
+ const elapsedTime = Date.now() - startTime;
18688
+ setTimer(formatDuration(elapsedTime));
18689
+ }, 1000);
18690
+ };
18691
+ const stopTimer = () => {
18692
+ if (intervalRef.current !== null) {
18693
+ clearInterval(intervalRef.current);
18694
+ intervalRef.current = null;
18695
+ }
18696
+ };
18697
+ useEffect(() => {
18698
+ if (immediateStart) {
18699
+ startTimer();
18700
+ }
18701
+ return () => {
18702
+ stopTimer();
18703
+ };
18704
+ }, [immediateStart]);
18705
+ return { timer, stopTimer, startTimer };
18706
+ };
18707
+
18708
+ var ThemePreference;
18709
+ (function (ThemePreference) {
18710
+ ThemePreference["LIGHT"] = "light";
18711
+ ThemePreference["DARK"] = "dark";
18712
+ ThemePreference["SYSTEM"] = "system";
18713
+ })(ThemePreference || (ThemePreference = {}));
18714
+ const THEME_STORAGE_KEY = "__squid-app-theme-type__";
18715
+ const THEME_CHANGE_EVENT = "squid-app-theme-change";
18716
+ const THEME_MEDIA_QUERY = "(prefers-color-scheme: light)";
18717
+ function useUserTheme() {
18718
+ const [themePreference, setThemePreference] = useState(getInitialTheme);
18719
+ const [themeType, setThemeType] = useState(getEffectiveTheme(themePreference));
18720
+ useEffect(() => {
18721
+ const handleThemeChange = (e) => {
18722
+ setThemePreference(e.detail);
18723
+ };
18724
+ window.addEventListener(THEME_CHANGE_EVENT, handleThemeChange);
18725
+ return () => {
18726
+ window.removeEventListener(THEME_CHANGE_EVENT, handleThemeChange);
18727
+ };
18728
+ }, []);
18729
+ useEffect(() => {
18730
+ const mediaQuery = window.matchMedia(THEME_MEDIA_QUERY);
18731
+ const handleChange = () => {
18732
+ if (themePreference === ThemePreference.SYSTEM) {
18733
+ setThemeType(mediaQuery.matches ? "light" : "dark");
18734
+ }
18735
+ };
18736
+ mediaQuery.addEventListener("change", handleChange);
18737
+ handleChange();
18738
+ return () => {
18739
+ mediaQuery.removeEventListener("change", handleChange);
18740
+ };
18741
+ }, [themePreference]);
18742
+ useEffect(() => {
18743
+ setThemeType(getEffectiveTheme(themePreference));
18744
+ }, [themePreference]);
18745
+ const setThemeManually = (theme) => {
18746
+ setThemePreference(theme);
18747
+ localStorage.setItem(THEME_STORAGE_KEY, theme);
18748
+ window.dispatchEvent(new CustomEvent(THEME_CHANGE_EVENT, { detail: theme }));
18749
+ };
18750
+ const isDarkMode = useMemo(() => themeType === "dark", [themeType]);
18751
+ return {
18752
+ themePreference,
18753
+ themeType,
18754
+ theme: isDarkMode ? darkTheme : lightTheme,
18755
+ setThemeManually,
18756
+ isDarkMode,
18757
+ };
18758
+ }
18759
+ function getInitialTheme() {
18760
+ var _a;
18761
+ if (typeof window === "undefined")
18762
+ return ThemePreference.SYSTEM;
18763
+ return ((_a = localStorage.getItem(THEME_STORAGE_KEY)) !== null && _a !== void 0 ? _a : ThemePreference.SYSTEM);
18764
+ }
18765
+ function getEffectiveTheme(themeType) {
18766
+ if (themeType !== ThemePreference.SYSTEM)
18767
+ return themeType;
18768
+ return window.matchMedia(THEME_MEDIA_QUERY).matches ? "light" : "dark";
18769
+ }
18770
+
18771
+ function BaseDropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, link, control, detail, isSelected, itemRef, children, contentRef, }) {
18772
+ const ContentTag = link
18773
+ ? "a"
18774
+ : (control === null || control === void 0 ? void 0 : control.type) === "switch"
18775
+ ? "label"
18776
+ : "button";
18777
+ const contentTagProps = link
18778
+ ? {
18779
+ href: link,
18780
+ target: "_blank",
18781
+ ref: contentRef,
18782
+ }
18783
+ : {
18784
+ ref: contentRef,
18785
+ };
18786
+ 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] }));
18787
+ }
18788
+ function DropdownMenuItem(props) {
18789
+ if (props.submenu) {
18790
+ return (jsx(DropdownMenuItemWithSubmenu, Object.assign({}, props, { submenu: props.submenu, containerRef: props.containerRef })));
18791
+ }
18792
+ return jsx(BaseDropdownMenuItem, Object.assign({}, props));
18793
+ }
18794
+ function DropdownMenuItemWithSubmenu(_a) {
18795
+ var _b;
18796
+ var { submenu } = _a, props = __rest$1(_a, ["submenu"]);
18797
+ const { isDropdownOpen, dropdownRef, openDropdown, itemRef, menuRef, openDropdownButtonRef, dropdownStyles, } = useDropdownMenu({
18798
+ itemsContainerRef: props.containerRef,
18799
+ });
18800
+ 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) => {
18801
+ var _a;
18802
+ openDropdown();
18803
+ (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
18804
+ }, 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: {
18805
+ style: {
18806
+ maxHeight: (_b = dropdownStyles === null || dropdownStyles === void 0 ? void 0 : dropdownStyles.maxHeight) !== null && _b !== void 0 ? _b : 0,
18807
+ overflow: "auto",
18808
+ scrollbarWidth: "none",
18809
+ },
18810
+ }, children: submenu })) })) }));
18811
+ }
18812
+
18813
+ const dropdownPositionClassMap$1 = {
18814
+ top: "tw-right-full tw-bottom-[50px]",
18815
+ bottom: "tw-right-full tw-top-[50px]",
18816
+ center: "tw-right-[50px] -tw-top-[35px]",
18817
+ };
18818
+ const listItemSizeMap = {
18819
+ small: "tw-h-list-item-small",
18820
+ large: "tw-h-list-item-large",
18821
+ };
18822
+ const collapsedListItemClassMap = {
18823
+ small: "tw-w-[70px]",
18824
+ large: "tw-w-[80px]",
18825
+ };
18826
+ function ListItem(_a) {
18827
+ 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"]);
18828
+ 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");
18829
+ // 'small' variant does not have detail
18830
+ const showDetail = size === "large" && (!!detail || !!icon || showDetailOnHoverOnly);
18831
+ const isDetailInteractive = !!onDetailClick;
18832
+ const DetailTag = isDetailInteractive ? "button" : "div";
18833
+ const detailProps = isDetailInteractive
18834
+ ? {
18835
+ onClick: (event) => {
18836
+ // prevent click event from bubbling up to parent
18837
+ event.stopPropagation();
18838
+ onDetailClick === null || onDetailClick === void 0 ? void 0 : onDetailClick();
18839
+ },
18840
+ }
18841
+ : {};
18842
+ // There are two possible ways to handle loading state:
18843
+ // Can be boolean or string
18844
+ // If boolean and true, it will show a full loading skeleton
18845
+ // If it's a non empty string, means that we want to display the skeleton + some text
18846
+ const loadingComponent = () => {
18847
+ if ((loading === null || loading === void 0 ? void 0 : loading.subtitle) === true) {
18848
+ return jsx(TextSkeleton, { width: "50px", className: "tw-h-2.5", isLoading: true });
18849
+ }
18850
+ if (typeof (loading === null || loading === void 0 ? void 0 : loading.subtitle) === "string" && loading.subtitle.length > 0) {
18851
+ 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 })] }));
18852
+ }
18853
+ return null;
18854
+ };
18855
+ const isInteractive = !!props.onClick;
18856
+ const ItemTag = isInteractive ? "button" : "div";
18857
+ const itemProps = isInteractive ? props : {};
18858
+ const { isDropdownOpen, dropdownRef, openDropdown, openDropdownButtonRef, itemRef, menuRef, dropdownStyles, } = useDropdownMenu({
18859
+ itemsContainerRef,
18860
+ });
18861
+ 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
18862
+ ? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
18863
+ : "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",
18864
+ // 'large' variant has extra padding
18865
+ 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" &&
18866
+ ((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
18867
+ ? "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"
18868
+ : "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 &&
18869
+ dropdownPositionClassMap$1[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] })));
18870
+ }
18871
+ const ListItemActionsButton = forwardRef((props, ref) => {
18872
+ 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
18873
+ ? "tw-bg-material-light-thin tw-opacity-100"
18874
+ : "tw-opacity-0", props.className), children: jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })));
18875
+ });
18876
+
18877
+ const dropdownPositionClassMap = {
18878
+ top: "tw-right-squid-xxs tw-bottom-[50px]",
18879
+ bottom: "tw-right-squid-xxs tw-top-[50px]",
18880
+ center: "tw-right-[50px] tw-translate-y-[calc(-50%+20px)]",
18881
+ };
18882
+ const statusBadge = {
18883
+ completed: {},
18884
+ pending: {
18885
+ 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" })),
18886
+ containerClassName: "tw-bg-royal-400",
18887
+ },
18888
+ failed: {
18889
+ badge: (jsx("span", { className: "tw-bg-grey-900", children: jsx(EmojiSadIcon, { className: "tw-text-status-negative" }) })),
18890
+ containerClassName: "tw-bg-status-negative",
18891
+ },
18892
+ warning: {
18893
+ badge: (jsx("span", { className: "tw-bg-grey-900", children: jsx(EmojiMeh, { className: "tw-text-status-partial" }) })),
18894
+ containerClassName: "tw-bg-status-partial",
18895
+ },
18896
+ };
18897
+ function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, dropdownMenuContent, itemsContainerRef, status, warningLabel, onClick, }) {
18898
+ const { isDropdownOpen, dropdownRef, openDropdown, openDropdownButtonRef, itemRef, menuRef, dropdownStyles, } = useDropdownMenu({
18899
+ itemsContainerRef,
18900
+ });
18901
+ const statusLabel = useMemo(() => {
18902
+ switch (status) {
18903
+ case "completed":
18904
+ return jsx(CaptionText, { children: dateCompleted });
18905
+ case "pending":
18906
+ return jsx(CaptionText, { className: "tw-text-royal-400", children: "Pending" });
18907
+ case "failed":
18908
+ return (jsxs(Fragment, { children: [jsx(CaptionText, { className: "tw-text-status-negative", children: "Fail" }), jsx(CaptionText, { children: dateCompleted })] }));
18909
+ case "warning":
18910
+ return (jsx(CaptionText, { className: "tw-text-status-partial", children: warningLabel }));
18911
+ default:
18912
+ return null;
18913
+ }
18914
+ }, [status, dateCompleted]);
18915
+ const isInteractive = !!onClick;
18916
+ const ItemTag = isInteractive ? "button" : "div";
18917
+ const itemTagProps = isInteractive
18918
+ ? {
18919
+ onClick,
18920
+ }
18921
+ : {};
18922
+ 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-flex tw-items-center tw-justify-center tw-gap-squid-xxs tw-hide-on-parent-hover", !!dropdownMenuContent &&
18923
+ "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 &&
18924
+ dropdownPositionClassMap[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] }));
18925
+ }
18926
+
18927
+ function MenuItem({ label, imageUrl, icon }) {
18928
+ 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 })] }));
18668
18929
  }
18669
18930
 
18670
- /**
18671
- * @license React
18672
- * use-sync-external-store-shim/with-selector.production.min.js
18673
- *
18674
- * Copyright (c) Facebook, Inc. and its affiliates.
18675
- *
18676
- * This source code is licensed under the MIT license found in the
18677
- * LICENSE file in the root directory of this source tree.
18678
- */
18679
-
18680
- var hasRequiredWithSelector_production_min;
18681
-
18682
- function requireWithSelector_production_min () {
18683
- if (hasRequiredWithSelector_production_min) return withSelector_production_min;
18684
- hasRequiredWithSelector_production_min = 1;
18685
- var h=React__default$1,n=requireShim();function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q="function"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;
18686
- withSelector_production_min.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f;}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return [function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);
18687
- u(function(){f.hasValue=!0;f.value=d;},[d]);w(d);return d};
18688
- return withSelector_production_min;
18931
+ const containerVariantClassNameMap = {
18932
+ small: "tw-px-squid-xs",
18933
+ large: "tw-px-squid-0",
18934
+ };
18935
+ const childrenVariantClassNameMap = {
18936
+ small: "tw-min-h-squid-l tw-px-squid-xs",
18937
+ large: "tw-min-h-squid-xl tw-px-squid-m",
18938
+ };
18939
+ function SmallBodyText(props) {
18940
+ return jsx(BodyText, Object.assign({ size: "small" }, props));
18941
+ }
18942
+ function PropertyListItem(_a) {
18943
+ 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"]);
18944
+ const Text = variant === "small" ? CaptionText : SmallBodyText;
18945
+ 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 }) })] }) })));
18689
18946
  }
18690
18947
 
18691
- var withSelector_development = {};
18692
-
18693
- /**
18694
- * @license React
18695
- * use-sync-external-store-shim/with-selector.development.js
18696
- *
18697
- * Copyright (c) Facebook, Inc. and its affiliates.
18698
- *
18699
- * This source code is licensed under the MIT license found in the
18700
- * LICENSE file in the root directory of this source tree.
18701
- */
18702
-
18703
- var hasRequiredWithSelector_development;
18704
-
18705
- function requireWithSelector_development () {
18706
- if (hasRequiredWithSelector_development) return withSelector_development;
18707
- hasRequiredWithSelector_development = 1;
18708
-
18709
- if (process.env.NODE_ENV !== "production") {
18710
- (function() {
18711
-
18712
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
18713
- if (
18714
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
18715
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
18716
- 'function'
18717
- ) {
18718
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
18719
- }
18720
- var React = React__default$1;
18721
- var shim = requireShim();
18722
-
18723
- /**
18724
- * inlined Object.is polyfill to avoid requiring consumers ship their own
18725
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
18726
- */
18727
- function is(x, y) {
18728
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
18729
- ;
18730
- }
18731
-
18732
- var objectIs = typeof Object.is === 'function' ? Object.is : is;
18733
-
18734
- var useSyncExternalStore = shim.useSyncExternalStore;
18735
-
18736
- // for CommonJS interop.
18737
-
18738
- var useRef = React.useRef,
18739
- useEffect = React.useEffect,
18740
- useMemo = React.useMemo,
18741
- useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.
18742
-
18743
- function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
18744
- // Use this to track the rendered snapshot.
18745
- var instRef = useRef(null);
18746
- var inst;
18747
-
18748
- if (instRef.current === null) {
18749
- inst = {
18750
- hasValue: false,
18751
- value: null
18752
- };
18753
- instRef.current = inst;
18754
- } else {
18755
- inst = instRef.current;
18756
- }
18757
-
18758
- var _useMemo = useMemo(function () {
18759
- // Track the memoized state using closure variables that are local to this
18760
- // memoized instance of a getSnapshot function. Intentionally not using a
18761
- // useRef hook, because that state would be shared across all concurrent
18762
- // copies of the hook/component.
18763
- var hasMemo = false;
18764
- var memoizedSnapshot;
18765
- var memoizedSelection;
18766
-
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;
18772
-
18773
- var _nextSelection = selector(nextSnapshot);
18774
-
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;
18781
-
18782
- if (isEqual(currentSelection, _nextSelection)) {
18783
- memoizedSelection = currentSelection;
18784
- return currentSelection;
18785
- }
18786
- }
18787
- }
18788
-
18789
- memoizedSelection = _nextSelection;
18790
- return _nextSelection;
18791
- } // We may be able to reuse the previous invocation's result.
18792
-
18948
+ function SectionTitle(_a) {
18949
+ var { title, icon, accessory, actionIcon, className } = _a, props = __rest$1(_a, ["title", "icon", "accessory", "actionIcon", "className"]);
18950
+ 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] })));
18951
+ }
18793
18952
 
18794
- // We may be able to reuse the previous invocation's result.
18795
- var prevSnapshot = memoizedSnapshot;
18796
- var prevSelection = memoizedSelection;
18953
+ function SettingsItem({ icon, label, control, link, transparent = false, helpTooltip, }) {
18954
+ const ContentTag = link ? "a" : "div";
18955
+ const contentTagProps = link
18956
+ ? {
18957
+ href: link,
18958
+ target: "_blank",
18959
+ }
18960
+ : {};
18961
+ const helpIcon = !!helpTooltip && (jsx(HelpIcon, { className: "tw-cursor-help tw-text-grey-600 hover:tw-text-grey-400" }));
18962
+ const showDetailsBorder = !!control && !link && !(control.type === "switch");
18963
+ 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 &&
18964
+ "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" &&
18965
+ (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))) }))] }))) })] })) }));
18966
+ }
18797
18967
 
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.
18968
+ const STEP_ITEM_HEIGHT = 52;
18969
+ const statusBgClassMap = {
18970
+ executed: "!tw-bg-grey-300",
18971
+ ongoing: "!tw-bg-grey-300",
18972
+ pending: "!tw-bg-grey-600",
18973
+ waiting: "!tw-bg-grey-300",
18974
+ error: "!tw-bg-status-negative",
18975
+ success: "!tw-bg-status-positive",
18976
+ warning: "!tw-bg-status-partial",
18977
+ };
18978
+ const separatorClassMap = {
18979
+ executed: "tw-text-grey-300",
18980
+ ongoing: "tw-text-grey-300",
18981
+ pending: "tw-text-grey-600",
18982
+ waiting: "tw-text-grey-300",
18983
+ error: "tw-text-status-negative",
18984
+ success: "tw-text-status-positive",
18985
+ warning: "tw-text-status-partial",
18986
+ };
18987
+ function SwapStepItem({ descriptionBlocks, showStepSeparator = false, link, status = "pending", }) {
18988
+ // these styles are located here instead of outside the component
18989
+ // so they are updated whenever the animation duration changes
18990
+ const transitionStyle = {
18991
+ transition: `background-color ${ANIMATION_DURATIONS.CHANGE_SWAP_STEP}ms, color ${ANIMATION_DURATIONS.CHANGE_SWAP_STEP}ms`,
18992
+ };
18993
+ const chipContent = useMemo(() => {
18994
+ switch (status) {
18995
+ case "success":
18996
+ case "executed":
18997
+ return jsx(Checkmark1Icon, {});
18998
+ case "error":
18999
+ return jsx(EmojiSadIcon, { size: "16" });
19000
+ case "warning":
19001
+ return jsx(EmojiMeh, { size: "16" });
19002
+ case "waiting":
19003
+ return jsx(DotGrid1x3HorizontalIcon, {});
19004
+ case "pending":
19005
+ return null;
19006
+ case "ongoing":
19007
+ return jsx(Loader, { size: "16", strokeWidth: "4" });
19008
+ default:
19009
+ return null;
19010
+ }
19011
+ }, [status]);
19012
+ const statusTextClass = useMemo(() => {
19013
+ switch (status) {
19014
+ case "pending":
19015
+ return "tw-text-grey-600";
19016
+ default:
19017
+ return "tw-text-grey-300";
19018
+ }
19019
+ }, [status]);
19020
+ return (jsx("li", { style: {
19021
+ maxHeight: `${STEP_ITEM_HEIGHT}px`,
19022
+ minHeight: `${STEP_ITEM_HEIGHT}px`,
19023
+ }, 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 })] }) }));
19024
+ }
18802
19025
 
19026
+ function ActionLayout({ lineCap = jsx(Timeline.CapTop, {}), status = "executed", showTimeline = true, showBody = true, nextStatus, statusIcon, description, title, icon, children, }) {
19027
+ 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 })] })] }));
19028
+ }
19029
+ function ActionProperties({ timestamp, hash, url, }) {
19030
+ 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 })] }));
19031
+ }
19032
+ function renderStatusIcon(status, defaultIcon) {
19033
+ switch (status) {
19034
+ case "success":
19035
+ return jsx(TransactionState, { status: "success", variant: "compact" });
19036
+ case "executed":
19037
+ return (jsx(TransactionState, { status: "executed", variant: "compact", icon: defaultIcon }));
19038
+ case "error":
19039
+ return jsx(EmojiSadIcon, { className: "tw-text-status-negative" });
19040
+ case "ongoing":
19041
+ return (jsx(Loader, { className: statusTextClassMap.ongoing, strokeWidth: "4", size: "20" }));
19042
+ case "waiting":
19043
+ return jsx(TransactionState, { status: "waiting", variant: "compact" });
19044
+ case "warning":
19045
+ return jsx(TransactionState, { status: "warning", variant: "compact" });
19046
+ }
19047
+ }
19048
+ 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, {})] }) }));
19049
+ 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 }) })] }));
19050
+ function ActionRow(_a) {
19051
+ var { className } = _a, props = __rest$1(_a, ["className"]);
19052
+ 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) })));
19053
+ }
19054
+ function ActionWrapper({ children, status, className, }) {
19055
+ 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 }));
19056
+ }
19057
+ function Timestamp({ time }) {
19058
+ 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)] }));
19059
+ }
18803
19060
 
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.
19061
+ function ApproveAction({ status, nextStatus, showTimeline, showBody, profile, chain, wallet, timestamp, hash, url, }) {
19062
+ 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 }))] }));
19063
+ }
18809
19064
 
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
- }
19065
+ function BridgeAction({ status, nextStatus, showTimeline, showBody, token, chain, provider, timestamp, hash, url, }) {
19066
+ 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 })) }));
19067
+ }
18817
19068
 
18818
- memoizedSnapshot = nextSnapshot;
18819
- memoizedSelection = nextSelection;
18820
- return nextSelection;
18821
- }; // Assigning this to a constant so that Flow knows it can't change.
19069
+ function FeesAction({ status, nextStatus, showTimeline = false, total, lines, }) {
19070
+ 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 }))] }));
19071
+ }
19072
+ function FeesTotal({ status, nextStatus, total, showTimeline, collapsed, }) {
19073
+ 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, {})] }) })] }));
19074
+ }
19075
+ function FeesLines({ status, lines, showTimeline = false, }) {
19076
+ 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
19077
+ ? statusTextClassMap[status]
19078
+ : "!tw-text-[transparent]"), children: [jsx(Timeline.CapTop, {}), jsx(Timeline.Straight, {})] }) })] }));
19079
+ }
19080
+ function FeesRow({ label, usd, amount, symbol, collapsed = false, }) {
19081
+ 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] })] }));
19082
+ }
18822
19083
 
19084
+ function IncompleteAction({ status, nextStatus, message, buttons, }) {
19085
+ 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 })] })] })] }));
19086
+ }
18823
19087
 
18824
- // Assigning this to a constant so that Flow knows it can't change.
18825
- var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;
19088
+ function linkActionTimelineProps(actions, collapsed) {
19089
+ return actions.map((action, index) => {
19090
+ var _a;
19091
+ const nextStatus = (_a = actions[index - 1]) === null || _a === void 0 ? void 0 : _a.props.status;
19092
+ return Object.assign(Object.assign({}, action), { props: Object.assign(Object.assign({}, action.props), { showTimeline: index !== actions.length - 1, showBody: !(collapsed && index === 0), nextStatus }) });
19093
+ });
19094
+ }
18826
19095
 
18827
- var getSnapshotWithSelector = function () {
18828
- return memoizedSelector(getSnapshot());
18829
- };
19096
+ function ReceiveNFTAction({ status, nextStatus, showTimeline, showBody, nft, chain, wallet, timestamp, hash, url, }) {
19097
+ 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 })] }));
19098
+ }
18830
19099
 
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];
19100
+ function ReceiveTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
19101
+ 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 })] }));
19102
+ }
18838
19103
 
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
- }
19104
+ function SendTokensAction({ status, nextStatus, showTimeline, showBody, token, amount, chain, wallet, timestamp, hash, url, }) {
19105
+ 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 })] }));
19106
+ }
18847
19107
 
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;
19108
+ function StakeAction({ status, nextStatus, showTimeline, showBody, token, provider, timestamp, hash, url, }) {
19109
+ return (jsx(ActionLayout, { status: status, nextStatus: nextStatus, statusIcon: jsx(PieChartIcon, {}), description: jsx(Inline, { children: [
19110
+ "Stake",
19111
+ jsx(IconLabel, { src: token.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: token.symbol }) }),
19112
+ "on",
19113
+ jsx(IconLabel, { src: provider.logoURI, variant: "round", children: jsx(BodyText, { size: "small", children: provider.name }) }),
19114
+ ] }), showTimeline: showTimeline, showBody: showBody, children: jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url }) }));
18861
19115
  }
18862
19116
 
18863
- if (process.env.NODE_ENV === 'production') {
18864
- withSelector.exports = requireWithSelector_production_min();
18865
- } else {
18866
- withSelector.exports = requireWithSelector_development();
19117
+ function StartAction({ status, nextStatus, showTimeline = false, showBody = false, timestamp, hash, url, }) {
19118
+ const getDescription = () => {
19119
+ switch (status) {
19120
+ case "error":
19121
+ case "waiting":
19122
+ return "Transaction not started";
19123
+ default:
19124
+ return "Transaction started";
19125
+ }
19126
+ };
19127
+ 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
19128
  }
18868
19129
 
18869
- var withSelectorExports = withSelector.exports;
18870
- var useSyncExternalStoreExports = /*@__PURE__*/getDefaultExportFromCjs(withSelectorExports);
19130
+ function SuccessAction({ nextStatus, status, description = status === "error"
19131
+ ? "Transaction failed"
19132
+ : "Transaction successful", showTimeline, showBody, timestamp, hash, url, }) {
19133
+ return (jsx(ActionLayout, { description: description, status: status, nextStatus: nextStatus, showTimeline: showTimeline, showBody: showBody, children: (timestamp || hash) && (jsx(ActionProperties, { timestamp: timestamp, hash: hash, url: url })) }));
19134
+ }
18871
19135
 
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;
19136
+ function SwapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
19137
+ 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
19138
  }
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
19139
 
18906
- const useContainerStore = create(() => ({
18907
- containerRef: undefined,
18908
- }));
19140
+ function WrapAction({ status, nextStatus, showTimeline, showBody, fromToken, toToken, provider, timestamp, hash, url, }) {
19141
+ 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 }) }));
19142
+ }
18909
19143
 
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 }) }));
19144
+ const actionComponentMap = {
19145
+ success: SuccessAction,
19146
+ receive_tokens: ReceiveTokensAction,
19147
+ receive_nft: ReceiveNFTAction,
19148
+ approve: ApproveAction,
19149
+ send_tokens: SendTokensAction,
19150
+ swap: SwapAction,
19151
+ bridge: BridgeAction,
19152
+ wrap: WrapAction,
19153
+ stake: StakeAction,
19154
+ start: StartAction,
19155
+ fees: FeesAction,
19156
+ incomplete: IncompleteAction,
19157
+ };
19158
+ function TransactionAction({ type, props }) {
19159
+ const Component = actionComponentMap[type];
19160
+ return jsx(Component, Object.assign({}, props));
18918
19161
  }
18919
- function BorderedContainer({ children, className, }) {
18920
- return (jsx("section", { className: cn("tw-border-t tw-border-t-material-light-thin", className), children: children }));
19162
+
19163
+ function Transfer({ isLoading, from, to, className }) {
19164
+ 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
19165
  }
18922
19166
 
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" })] }));
19167
+ function TransactionItem({ className, isLoading = false, status, image, type, hash, fromChain, toChain, fromAmount, toAmount, timestamp, variant = "full", }) {
19168
+ 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
19169
  }
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] }));
19170
+ const TransactionItemHeaderWrapper = ({ children, }) => {
19171
+ return (jsx(Join, { glue: () => jsx(PipeSeparator, { className: "tw-text-grey-600" }), children: children }));
19172
+ };
19173
+ const TransactionItemHeader = ({ isLoading, variant, type, hash, status, }) => {
19174
+ if (isLoading) {
19175
+ return (jsxs(TransactionItemHeaderWrapper, { children: [jsx(TextSkeleton, {}), jsx(TextSkeleton, {})] }));
19176
+ }
19177
+ if (variant === "full") {
19178
+ if (!type || !hash)
19179
+ return null;
19180
+ return (jsxs(TransactionItemHeaderWrapper, { children: [jsx(TxTypeLabel, { type: type }), jsx("span", { className: "tw-text-grey-500", children: truncateHash(hash) })] }));
19181
+ }
19182
+ if (status && type) {
19183
+ return (jsxs(TransactionItemHeaderWrapper, { children: [jsx(TransactionState, { status: status, variant: "small" }), jsx(TxTypeLabel, { type: type })] }));
19184
+ }
19185
+ return null;
19186
+ };
19187
+ const TxTypeLabel = ({ type }) => {
19188
+ 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] }));
19189
+ };
19190
+
19191
+ function RouteStep({ imageUrl, descriptionBlocks, subtitle, showStepSeparator = false, }) {
19192
+ 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
19193
  }
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 }));
19194
+ function Track({ imageUrl }) {
19195
+ 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
19196
  }
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 })] }));
19197
+ function Label({ subtitle, descriptionBlocks, }) {
19198
+ 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
19199
  }
18957
19200
 
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 })] }));
19201
+ function DropdownMenuTitle({ title }) {
19202
+ 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
19203
  }
18961
19204
 
18962
19205
  const STEPS_LIST_HEIGHT = 400;
@@ -24896,11 +25139,11 @@ function TransactionHeaderLayout({ isLoading, status, title, image = jsx("span",
24896
25139
  }
24897
25140
 
24898
25141
  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 }), " "] }) }));
25142
+ 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
25143
  }
24901
25144
 
24902
25145
  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 }), " "] }) }));
25146
+ 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
25147
  }
24905
25148
 
24906
25149
  function InteractionHeader({ title = "Interaction", image = jsx(Approve, {}), hash, url, status, }) {
@@ -24908,7 +25151,7 @@ function InteractionHeader({ title = "Interaction", image = jsx(Approve, {}), ha
24908
25151
  }
24909
25152
 
24910
25153
  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] })] }) }));
25154
+ 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
25155
  }
24913
25156
  function ProfilePicture({ src }) {
24914
25157
  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 +26772,7 @@ const switchKnobCheckedClassMap = {
26529
26772
  unchecked: "tw-left-[1px]",
26530
26773
  },
26531
26774
  };
26532
- function Switch({ checked = false, onChange, size, disabled = false, }) {
26775
+ function Switch({ checked = false, onChange, size, disabled = false, inputProps, }) {
26533
26776
  return (
26534
26777
  // Switch container
26535
26778
  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 +26781,9 @@ function Switch({ checked = false, onChange, size, disabled = false, }) {
26538
26781
  // checked styles
26539
26782
  checked ? "tw-bg-status-positive" : "tw-bg-grey-800",
26540
26783
  // 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: {
26784
+ disabled ? "tw-cursor-not-allowed" : "tw-cursor-pointer",
26785
+ // Focus visible styles
26786
+ "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
26787
  filter: "drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.33)) drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.20))",
26543
26788
  }, className: clsx("tw-absolute tw-rounded-full tw-border tw-border-material-light-thin tw-transition-all",
26544
26789
  // size styles
@@ -26727,10 +26972,10 @@ function SettingsButton({ label, isSelected = false, onClick, }) {
26727
26972
  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
26973
  }
26729
26974
 
26730
- const IconButton = (_a) => {
26975
+ const IconButton = forwardRef((_a, ref) => {
26731
26976
  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
- };
26977
+ 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 })));
26978
+ });
26734
26979
 
26735
26980
  function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }) {
26736
26981
  const matchesMobileLg = useMediaQuery(MEDIA_QUERIES.MOBILE_LG.media);
@@ -26742,7 +26987,7 @@ function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }) {
26742
26987
  ? "tw-w-[180px] tw-max-w-[180px] tw-pt-0"
26743
26988
  : "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
26989
  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))) })] })] }) })] }));
26990
+ }, 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
26991
  }
26747
26992
  const List = ({ children }) => {
26748
26993
  return (jsx("ul", { className: "tw-flex tw-flex-col tw-gap-squid-xxs tw-pb-squid-xs", children: children }));
@@ -62200,9 +62445,10 @@ function blendColors(foreground, background) {
62200
62445
  return rgbToHex(r, g, b);
62201
62446
  }
62202
62447
 
62203
- function SquidConfigProvider({ theme = lightTheme, children, themeType = "light", }) {
62448
+ function ThemeProvider(_a) {
62449
+ var { theme = lightTheme, children, themeType = "light" } = _a, props = __rest$1(_a, ["theme", "children", "themeType"]);
62204
62450
  const parsedStyle = parseSquidTheme(theme);
62205
- 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 }));
62451
+ return (jsx("div", Object.assign({}, props, { style: Object.assign(Object.assign({}, props.style), parsedStyle), "data-squid-theme-type": themeType, className: cn("tw-group tw-relative tw-h-screen tw-font-geist mobile-lg:tw-h-auto", props.className), children: children })));
62206
62452
  }
62207
62453
 
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 };
62454
+ 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, CodeBracketsIcon, CodeSolidSquareIcon, CoinsAddIcon, CoinsIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CommandIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy, CopyIcon, 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, FileDownloadIcon, 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, LaptopIcon, 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, PhoneIcon, 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, SquidLogo, StakeAction, StartAction, StocksIcon, SuccessAction, SunIcon, SunOutlinedIcon, SunriseIcon, SwapAction, SwapConfiguration, SwapDetailsView, SwapErrorIcon, SwapHeader, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProgressViewHeader, SwapProperties, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, TagIcon, TagIconFilled, TextSkeleton, ThemePreference, ThemeProvider, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, 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, useUserTheme, useVersion };