@0xsquid/ui 0.3.0 → 0.4.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 (119) hide show
  1. package/dist/cjs/index.js +284 -129
  2. package/dist/cjs/types/components/buttons/AssetsButton.d.ts +10 -0
  3. package/dist/cjs/types/components/buttons/BoostButton.d.ts +1 -1
  4. package/dist/cjs/types/components/buttons/SettingsButton.d.ts +4 -0
  5. package/dist/cjs/types/components/buttons/index.d.ts +2 -1
  6. package/dist/cjs/types/components/controls/SettingsSlider.d.ts +5 -0
  7. package/dist/cjs/types/components/controls/Switch.d.ts +2 -2
  8. package/dist/cjs/types/components/controls/Tooltip.d.ts +4 -2
  9. package/dist/cjs/types/components/controls/index.d.ts +1 -0
  10. package/dist/cjs/types/components/icons/Arrow.d.ts +20 -0
  11. package/dist/cjs/types/components/icons/Clock.d.ts +8 -0
  12. package/dist/cjs/types/components/icons/Coins.d.ts +4 -0
  13. package/dist/cjs/types/components/icons/CompassRound.d.ts +8 -0
  14. package/dist/cjs/types/components/icons/DashboardFast.d.ts +4 -0
  15. package/dist/cjs/types/components/icons/DotGrid.d.ts +4 -1
  16. package/dist/cjs/types/components/icons/Help.d.ts +16 -0
  17. package/dist/cjs/types/components/icons/Infinity.d.ts +4 -0
  18. package/dist/cjs/types/components/icons/Lightning.d.ts +4 -0
  19. package/dist/cjs/types/components/icons/SquidLogo.d.ts +1 -0
  20. package/dist/cjs/types/components/icons/SwapStepSeparator.d.ts +1 -0
  21. package/dist/cjs/types/components/icons/TradingViewSteps.d.ts +4 -0
  22. package/dist/cjs/types/components/layout/Boost.d.ts +9 -1
  23. package/dist/cjs/types/components/layout/DropdownMenu.d.ts +9 -0
  24. package/dist/cjs/types/components/layout/Menu.d.ts +6 -2
  25. package/dist/cjs/types/components/layout/NavigationBar.d.ts +3 -1
  26. package/dist/cjs/types/components/layout/SwapProgressViewHeader.d.ts +6 -0
  27. package/dist/cjs/types/components/layout/SwapStepsCollapsed.d.ts +5 -0
  28. package/dist/cjs/types/components/layout/TokenPair.d.ts +12 -0
  29. package/dist/cjs/types/components/layout/index.d.ts +3 -0
  30. package/dist/cjs/types/components/lists/DropdownMenuItem.d.ts +3 -3
  31. package/dist/cjs/types/components/lists/SettingsItem.d.ts +9 -0
  32. package/dist/cjs/types/components/lists/SwapDetailListItem.d.ts +8 -0
  33. package/dist/cjs/types/components/lists/SwapStepItem.d.ts +9 -0
  34. package/dist/cjs/types/components/lists/index.d.ts +3 -0
  35. package/dist/cjs/types/components/views/ProfileView.d.ts +1 -0
  36. package/dist/cjs/types/components/views/SwapDetailsView.d.ts +1 -0
  37. package/dist/cjs/types/core/themes.d.ts +2 -0
  38. package/dist/cjs/types/hooks/index.d.ts +1 -0
  39. package/dist/cjs/types/hooks/useModal.d.ts +10 -0
  40. package/dist/cjs/types/index.d.ts +1 -0
  41. package/dist/cjs/types/providers/SquidConfigProvider.d.ts +4 -2
  42. package/dist/cjs/types/stories/buttons/{Dropdown.stories.d.ts → AssetsButton.stories.d.ts} +3 -2
  43. package/dist/cjs/types/stories/buttons/SettingsButton.stories.d.ts +6 -0
  44. package/dist/cjs/types/stories/controls/SettingsSlider.stories.d.ts +7 -0
  45. package/dist/cjs/types/stories/layout/Boost.stories.d.ts +6 -0
  46. package/dist/cjs/types/stories/layout/DropdownMenu.stories.d.ts +6 -0
  47. package/dist/cjs/types/stories/layout/Menu.stories.d.ts +2 -0
  48. package/dist/cjs/types/stories/layout/NavigationBar.stories.d.ts +1 -0
  49. package/dist/cjs/types/stories/layout/SwapProgressView.stories.d.ts +9 -0
  50. package/dist/cjs/types/stories/layout/SwapProgressViewHeader.stories.d.ts +6 -0
  51. package/dist/cjs/types/stories/layout/TokenPair.stories.d.ts +6 -0
  52. package/dist/cjs/types/stories/lists/SettingsItem.stories.d.ts +9 -0
  53. package/dist/cjs/types/stories/lists/SwapDetailListItem.stories.d.ts +7 -0
  54. package/dist/cjs/types/stories/lists/SwapStepItem.stories.d.ts +10 -0
  55. package/dist/cjs/types/stories/views/ProfileView.stories.d.ts +6 -0
  56. package/dist/cjs/types/stories/views/SwapDetailsView.stories.d.ts +6 -0
  57. package/dist/cjs/types/types/components.d.ts +11 -0
  58. package/dist/esm/index.js +276 -130
  59. package/dist/esm/types/components/buttons/AssetsButton.d.ts +10 -0
  60. package/dist/esm/types/components/buttons/BoostButton.d.ts +1 -1
  61. package/dist/esm/types/components/buttons/SettingsButton.d.ts +4 -0
  62. package/dist/esm/types/components/buttons/index.d.ts +2 -1
  63. package/dist/esm/types/components/controls/SettingsSlider.d.ts +5 -0
  64. package/dist/esm/types/components/controls/Switch.d.ts +2 -2
  65. package/dist/esm/types/components/controls/Tooltip.d.ts +4 -2
  66. package/dist/esm/types/components/controls/index.d.ts +1 -0
  67. package/dist/esm/types/components/icons/Arrow.d.ts +20 -0
  68. package/dist/esm/types/components/icons/Clock.d.ts +8 -0
  69. package/dist/esm/types/components/icons/Coins.d.ts +4 -0
  70. package/dist/esm/types/components/icons/CompassRound.d.ts +8 -0
  71. package/dist/esm/types/components/icons/DashboardFast.d.ts +4 -0
  72. package/dist/esm/types/components/icons/DotGrid.d.ts +4 -1
  73. package/dist/esm/types/components/icons/Help.d.ts +16 -0
  74. package/dist/esm/types/components/icons/Infinity.d.ts +4 -0
  75. package/dist/esm/types/components/icons/Lightning.d.ts +4 -0
  76. package/dist/esm/types/components/icons/SquidLogo.d.ts +1 -0
  77. package/dist/esm/types/components/icons/SwapStepSeparator.d.ts +1 -0
  78. package/dist/esm/types/components/icons/TradingViewSteps.d.ts +4 -0
  79. package/dist/esm/types/components/layout/Boost.d.ts +9 -1
  80. package/dist/esm/types/components/layout/DropdownMenu.d.ts +9 -0
  81. package/dist/esm/types/components/layout/Menu.d.ts +6 -2
  82. package/dist/esm/types/components/layout/NavigationBar.d.ts +3 -1
  83. package/dist/esm/types/components/layout/SwapProgressViewHeader.d.ts +6 -0
  84. package/dist/esm/types/components/layout/SwapStepsCollapsed.d.ts +5 -0
  85. package/dist/esm/types/components/layout/TokenPair.d.ts +12 -0
  86. package/dist/esm/types/components/layout/index.d.ts +3 -0
  87. package/dist/esm/types/components/lists/DropdownMenuItem.d.ts +3 -3
  88. package/dist/esm/types/components/lists/SettingsItem.d.ts +9 -0
  89. package/dist/esm/types/components/lists/SwapDetailListItem.d.ts +8 -0
  90. package/dist/esm/types/components/lists/SwapStepItem.d.ts +9 -0
  91. package/dist/esm/types/components/lists/index.d.ts +3 -0
  92. package/dist/esm/types/components/views/ProfileView.d.ts +1 -0
  93. package/dist/esm/types/components/views/SwapDetailsView.d.ts +1 -0
  94. package/dist/esm/types/core/themes.d.ts +2 -0
  95. package/dist/esm/types/hooks/index.d.ts +1 -0
  96. package/dist/esm/types/hooks/useModal.d.ts +10 -0
  97. package/dist/esm/types/index.d.ts +1 -0
  98. package/dist/esm/types/providers/SquidConfigProvider.d.ts +4 -2
  99. package/dist/esm/types/stories/buttons/{Dropdown.stories.d.ts → AssetsButton.stories.d.ts} +3 -2
  100. package/dist/esm/types/stories/buttons/SettingsButton.stories.d.ts +6 -0
  101. package/dist/esm/types/stories/controls/SettingsSlider.stories.d.ts +7 -0
  102. package/dist/esm/types/stories/layout/Boost.stories.d.ts +6 -0
  103. package/dist/esm/types/stories/layout/DropdownMenu.stories.d.ts +6 -0
  104. package/dist/esm/types/stories/layout/Menu.stories.d.ts +2 -0
  105. package/dist/esm/types/stories/layout/NavigationBar.stories.d.ts +1 -0
  106. package/dist/esm/types/stories/layout/SwapProgressView.stories.d.ts +9 -0
  107. package/dist/esm/types/stories/layout/SwapProgressViewHeader.stories.d.ts +6 -0
  108. package/dist/esm/types/stories/layout/TokenPair.stories.d.ts +6 -0
  109. package/dist/esm/types/stories/lists/SettingsItem.stories.d.ts +9 -0
  110. package/dist/esm/types/stories/lists/SwapDetailListItem.stories.d.ts +7 -0
  111. package/dist/esm/types/stories/lists/SwapStepItem.stories.d.ts +10 -0
  112. package/dist/esm/types/stories/views/ProfileView.stories.d.ts +6 -0
  113. package/dist/esm/types/stories/views/SwapDetailsView.stories.d.ts +6 -0
  114. package/dist/esm/types/types/components.d.ts +11 -0
  115. package/dist/index.css +337 -54
  116. package/dist/index.d.ts +116 -23
  117. package/package.json +1 -1
  118. package/dist/cjs/types/components/buttons/Dropdown.d.ts +0 -10
  119. package/dist/esm/types/components/buttons/Dropdown.d.ts +0 -10
package/dist/cjs/index.js CHANGED
@@ -2637,6 +2637,9 @@ function ChevronRightSmallIcon() {
2637
2637
  function ArrowLeftIcon() {
2638
2638
  return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: jsxRuntime.jsx("path", { d: "M10 6L4 12L10 18M5 12H20", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
2639
2639
  }
2640
+ function ChevronGrabberVerticalIcon({ size = '16', className, }) {
2641
+ return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M5.33301 6.00002L7.52827 3.80476C7.78862 3.54441 8.21073 3.54441 8.47108 3.80476L10.6663 6.00002M5.33301 10L7.52827 12.1953C7.78862 12.4556 8.21073 12.4556 8.47108 12.1953L10.6663 10", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
2642
+ }
2640
2643
 
2641
2644
  function ArrowButton(_a) {
2642
2645
  var { label, disabled } = _a, props = __rest(_a, ["label", "disabled"]);
@@ -2647,72 +2650,6 @@ function ArrowButton(_a) {
2647
2650
  'aria-disabled:tw-bg-grey-600 aria-disabled:tw-text-grey-800'), children: jsxRuntime.jsx(ArrowRightIcon, {}) })] })));
2648
2651
  }
2649
2652
 
2650
- const animationDuration = '500ms';
2651
- function BoostButton({ boostMode = 'normal', onToggleBoostMode, }) {
2652
- const boostIndicatorRef = react.useRef(null);
2653
- function handleToggleBoostMode() {
2654
- if (!boostIndicatorRef.current)
2655
- return;
2656
- // we don't want to trigger the animation when the component is mounted
2657
- // so we set the animation duration only when user clicks the button
2658
- boostIndicatorRef.current.style.setProperty('--boost-animation-duration', animationDuration);
2659
- if (boostIndicatorRef.current.dataset.boostMode === 'normal') {
2660
- boostIndicatorRef.current.dataset.boostMode = 'boost';
2661
- onToggleBoostMode === null || onToggleBoostMode === void 0 ? void 0 : onToggleBoostMode({ boostMode: 'boost' });
2662
- }
2663
- else {
2664
- boostIndicatorRef.current.dataset.boostMode = 'normal';
2665
- onToggleBoostMode === null || onToggleBoostMode === void 0 ? void 0 : onToggleBoostMode({ boostMode: 'normal' });
2666
- }
2667
- }
2668
- return (jsxRuntime.jsxs("div", { onClick: handleToggleBoostMode, className: "tw-relative tw-flex tw-h-squid-xl tw-w-[140px] tw-flex-col tw-justify-between tw-overflow-hidden tw-bg-grey-900 tw-pb-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-left-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-r tw-from-grey-900 tw-to-transparent" }), jsxRuntime.jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-right-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-l tw-from-grey-900 tw-to-transparent" }), jsxRuntime.jsxs("div", { ref: boostIndicatorRef, "data-boost-mode": boostMode, className: "tw-group tw-peer tw-flex tw-h-full tw-items-center tw-justify-between tw-transition-transform data-[boost-mode=boost]:tw-animate-move-to-left-with-spring-bounce data-[boost-mode=normal]:tw-animate-move-to-right-with-spring-bounce", children: [jsxRuntime.jsx("div", { className: "tw-w-1/2 tw-text-center", children: jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-grey-300", children: "Normal" }) }), jsxRuntime.jsxs("div", { className: "tw-w-1/2 tw-text-center", children: [jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-status-positive", children: "Boost" }), ' '] }), jsxRuntime.jsx("div", { className: "tw-absolute tw-bottom-0 tw-h-1.5 tw-w-[1.5px] tw-rounded-sm tw-bg-grey-500 tw-text-grey-500 group-data-[boost-mode=boost]:tw-left-[calc(50%-2px)] group-data-[boost-mode=normal]:tw-left-[calc(50%-6px)]", style: {
2669
- boxShadow: generateMarkerLines(40),
2670
- } })] }), jsxRuntime.jsx("div", { className: cn('tw-absolute tw-bottom-0.5 tw-left-[calc(50%-1.5px)] tw-z-20 tw-h-[10px] tw-w-[3px] tw-rounded-sm tw-transition-colors peer-data-[boost-mode=boost]:tw-bg-status-positive peer-data-[boost-mode=normal]:tw-bg-current', `tw-duration-${animationDuration}`) })] }));
2671
- }
2672
- function generateMarkerLines(count) {
2673
- const halfCount = Math.ceil(count / 2);
2674
- const rightShadows = Array.from({ length: halfCount }, (_, index) => {
2675
- return `-${(index + 1) * 6}px 0 currentColor`;
2676
- });
2677
- const leftShadows = Array.from({ length: halfCount }, (_, index) => {
2678
- return `${(index + 1) * 6}px 0 currentColor`;
2679
- });
2680
- const allShadows = [...rightShadows, ...leftShadows];
2681
- return allShadows.join(', ');
2682
- }
2683
-
2684
- const buttonSizeClassMap = {
2685
- md: 'tw-px-squid-xs tw-py-squid-xxs tw-rounded-squid-m tw-border tw-flex tw-items-center tw-gap-squid-xxs tw-min-w-[60px] tw-h-squid-xl tw-justify-center',
2686
- lg: 'tw-border tw-rounded-squid-xxl tw-p-1 tw-h-button tw-w-full',
2687
- };
2688
- const buttonVariantClassMap = {
2689
- primary: 'tw-bg-royal-500 tw-text-grey-100 tw-border-material-light-thin',
2690
- secondary: 'tw-bg-grey-100 tw-text-grey-800 tw-border-material-light-thin',
2691
- tertiary: 'tw-bg-grey-800 tw-text-grey-300 tw-border-material-light-thin',
2692
- };
2693
- // right now all variants have the same disabled styles
2694
- // in the future, we can add more disabled styles for different variants
2695
- const buttonDisabledClass = 'disabled:tw-bg-grey-800 disabled:tw-text-grey-600';
2696
- function Button(_a) {
2697
- var { label, disabled, size, variant, icon } = _a, props = __rest(_a, ["label", "disabled", "size", "variant", "icon"]);
2698
- return (jsxRuntime.jsx("button", Object.assign({}, props, { disabled: disabled, className: clsx(buttonSizeClassMap[size], buttonVariantClassMap[variant],
2699
- // disabled styles
2700
- buttonDisabledClass,
2701
- // custom classes from props
2702
- props.className), children: size === 'lg' ? (jsxRuntime.jsx("span", { className: "tw-px-squid-m", children: jsxRuntime.jsx(BodyText, { size: "medium", children: label }) })) : size === 'md' ? (label && !icon ? (
2703
- // label only
2704
- jsxRuntime.jsx(BodyText, { size: "small", children: label })) : !label && icon ? (
2705
- // icon only
2706
- icon) : (
2707
- // icon and label
2708
- jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon, jsxRuntime.jsx(BodyText, { className: "tw-pr-1", size: "small", children: label })] }))) : null })));
2709
- }
2710
-
2711
- function Chip(_a) {
2712
- var { label, icon } = _a, props = __rest(_a, ["label", "icon"]);
2713
- return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn('tw-flex tw-h-squid-m tw-items-center tw-justify-center tw-rounded-squid-m tw-bg-grey-500 tw-text-grey-900', icon && 'tw-w-squid-m', props.className), children: label ? (jsxRuntime.jsx(CaptionText, { className: "tw-min-w-squid-xl tw-px-squid-xxs tw-text-center", children: label })) : (icon) })));
2714
- }
2715
-
2716
2653
  function PlusIcon() {
2717
2654
  return (jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M12 17V12M12 12V7M12 12H17M12 12H7", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }) }));
2718
2655
  }
@@ -2823,41 +2760,119 @@ const themeTypesKeys = {
2823
2760
  },
2824
2761
  };
2825
2762
 
2826
- const imageClass = 'tw-w-10 tw-aspect-square tw-ml-2 tw-mr-2 -tw-translate-x-2 tw-flex tw-items-center tw-justify-center';
2827
- const defaultDropdownColor = `var(${themeTypesKeys['royal-500'].cssVariable})`;
2828
- function Dropdown({ chainImageUrl, tokenImageUrl, tokenSymbol, chainBgColor = defaultDropdownColor, tokenBgColor = defaultDropdownColor, tokenTextColor, }) {
2829
- const dropdownGradient = react.useMemo(() => {
2830
- // if no chain icon, gradient is as follows:
2831
- // 0%-100% default color
2763
+ const imageClass = 'tw-w-[40px] tw-aspect-square tw-flex tw-items-center tw-justify-center';
2764
+ const defaultBgColor = `var(${themeTypesKeys['royal-500'].cssVariable})`;
2765
+ function AssetsButton({ chainImageUrl, tokenImageUrl, tokenSymbol, chainBgColor = defaultBgColor, tokenBgColor = defaultBgColor, tokenTextColor, }) {
2766
+ const bgGradient = react.useMemo(() => {
2832
2767
  if (!chainImageUrl) {
2833
- return `linear-gradient(to right, ${defaultDropdownColor}, ${defaultDropdownColor})`;
2768
+ return `linear-gradient(to right, ${defaultBgColor}, ${defaultBgColor})`;
2834
2769
  }
2835
- // if chain icon present but no token icon, gradient is as follows:
2836
- // 0%-25% chain color, 25%-100% default color
2837
2770
  if (!tokenImageUrl) {
2838
- return `linear-gradient(to right, ${chainBgColor} 25%, ${defaultDropdownColor} 30%)`;
2771
+ return `linear-gradient(90deg, ${chainBgColor} 54.86%, ${tokenBgColor} 95.83%)`;
2839
2772
  }
2840
- // if both chain and token icons present, gradient is as follows:
2841
- // 0%-20% chain color, 20%-100% token color
2842
- return `linear-gradient(to right, ${chainBgColor} 20%, ${tokenBgColor} 25%)`;
2773
+ return `linear-gradient(to right, ${chainBgColor} 47.5%, ${tokenBgColor} 52.5%)`;
2843
2774
  }, [chainBgColor, tokenBgColor]);
2844
- return (jsxRuntime.jsxs("div", { className: "tw-token-chain-mask tw-flex tw-h-10 tw-w-[209px] tw-items-center tw-text-grey-100", style: {
2845
- backgroundImage: dropdownGradient,
2846
- }, children: [jsxRuntime.jsx("div", { className: clsx(imageClass), children: chainImageUrl ? jsxRuntime.jsx("img", { src: chainImageUrl, alt: "" }) : jsxRuntime.jsx(PlusIcon, {}) }), tokenImageUrl && chainImageUrl ? (jsxRuntime.jsx("div", { className: clsx(imageClass), children: jsxRuntime.jsx("img", { src: tokenImageUrl, alt: "" }) })) : null, tokenImageUrl && chainImageUrl ? (jsxRuntime.jsx("span", { style: { color: tokenTextColor }, children: jsxRuntime.jsx(TokenSymbol, { symbol: tokenSymbol || '' }) })) : (jsxRuntime.jsx(SelectTokenLabel, {}))] }));
2775
+ return (jsxRuntime.jsxs("div", { className: "tw-relative tw-flex tw-h-squid-xl tw-min-w-[209px] tw-items-center tw-text-grey-100", children: [jsxRuntime.jsx("svg", { className: "tw-absolute tw-left-0 tw-z-10 tw-h-[40px] tw-w-[72px] tw-text-material-light-thin", viewBox: "0 0 72 40", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "m57.86 5.86c-.53.53-1.05 1.06-1.56 1.59-3.29 3.38-6.37 6.55-10.3 6.55s-7.01-3.17-10.3-6.55c-.51-.53-1.03-1.06-1.56-1.59-3.9-3.91-9.02-5.86-14.14-5.86s-10.24 1.95-14.14 5.86c-3.91 3.9-5.86 9.02-5.86 14.14s1.95 10.24 5.86 14.14c3.91 3.91 9.02 5.86 14.14 5.86s10.24-1.95 14.14-5.86c.52-.53 1.04-1.06 1.55-1.58 3.29-3.39 6.37-6.56 10.31-6.56s7.02 3.17 10.31 6.56c.51.53 1.03 1.06 1.55 1.58 3.91 3.91 9.02 5.86 14.14 5.86v-40c-5.12 0-10.24 1.95-14.14 5.86zm14.14 33.14c-5.07 0-9.85-1.98-13.43-5.56-.52-.52-1.02-1.04-1.54-1.57-3.43-3.53-6.67-6.86-11.02-6.86s-7.6 3.33-11.04 6.88c-.5.52-1.01 1.04-1.53 1.56-3.59 3.59-8.36 5.57-13.44 5.57s-9.85-1.98-13.43-5.57c-3.59-3.59-5.56-8.36-5.56-13.43s1.98-9.85 5.56-13.44c3.58-3.6 8.35-5.58 13.43-5.58s9.85 1.98 13.44 5.57c.52.52 1.04 1.05 1.55 1.58 3.43 3.53 6.66 6.86 11.02 6.86s7.59-3.33 11.02-6.86c.51-.52 1.02-1.05 1.55-1.58 3.59-3.59 8.36-5.56 13.43-5.56v38z" }) }), jsxRuntime.jsx("div", { className: cn('tw-assets-button-mask tw-flex tw-h-squid-xl tw-items-center tw-justify-between', tokenImageUrl ? 'tw-w-[90px]' : 'tw-w-full tw-max-w-[72px]'), style: {
2776
+ backgroundImage: bgGradient,
2777
+ }, children: jsxRuntime.jsx("div", { className: clsx(imageClass), children: chainImageUrl ? (jsxRuntime.jsx("img", { src: chainImageUrl, alt: "" })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(PlusIcon, {}) })) }) }), tokenImageUrl && chainImageUrl ? (jsxRuntime.jsx("div", { className: clsx(imageClass, 'tw-absolute tw-left-[54px] tw-h-squid-xl tw-rounded-bl-full tw-rounded-tl-full tw-border-b tw-border-t tw-border-material-light-thin'), style: {
2778
+ backgroundColor: tokenBgColor,
2779
+ }, children: jsxRuntime.jsx("img", { src: tokenImageUrl, alt: "", className: "tw-h-full -tw-translate-x-[2px]" }) })) : null, jsxRuntime.jsxs("div", { className: cn('tw-flex tw-h-squid-xl tw-w-fit tw-min-w-squid-xl tw-items-center tw-gap-squid-xxs tw-rounded-br-full tw-rounded-tr-full tw-border-b tw-border-r tw-border-t tw-border-material-light-thin tw-py-squid-xs tw-pr-squid-xs', tokenImageUrl && 'tw-pl-[7px]'), style: {
2780
+ backgroundColor: tokenBgColor,
2781
+ color: tokenTextColor,
2782
+ }, children: [jsxRuntime.jsx(BodyText, { size: "small", className: "tw-leading-[13px]", children: tokenImageUrl ? tokenSymbol : 'Select token' }), jsxRuntime.jsx(ChevronLargeRightIcon, {})] })] }));
2847
2783
  }
2848
- const TokenSymbol = ({ symbol }) => {
2849
- return (jsxRuntime.jsxs("div", { className: "tw-mx-auto tw-flex tw-items-center tw-justify-center tw-gap-1.5", children: [jsxRuntime.jsx(BodyText, { size: "small", children: symbol }), jsxRuntime.jsx(ChevronArrowIcon, {})] }));
2784
+
2785
+ const animationDuration = '500ms';
2786
+ function BoostButton({ boostMode, onToggleBoostMode, }) {
2787
+ const boostIndicatorRef = react.useRef(null);
2788
+ function handleToggleBoostMode() {
2789
+ if (!boostIndicatorRef.current)
2790
+ return;
2791
+ // we don't want to trigger the animation when the component is mounted
2792
+ // so we set the animation duration only when user clicks the button
2793
+ boostIndicatorRef.current.style.setProperty('--boost-animation-duration', animationDuration);
2794
+ if (boostIndicatorRef.current.dataset.boostMode === 'normal') {
2795
+ boostIndicatorRef.current.dataset.boostMode = 'boost';
2796
+ onToggleBoostMode === null || onToggleBoostMode === void 0 ? void 0 : onToggleBoostMode({ boostMode: 'boost' });
2797
+ }
2798
+ else {
2799
+ boostIndicatorRef.current.dataset.boostMode = 'normal';
2800
+ onToggleBoostMode === null || onToggleBoostMode === void 0 ? void 0 : onToggleBoostMode({ boostMode: 'normal' });
2801
+ }
2802
+ }
2803
+ return (jsxRuntime.jsxs("div", { onClick: handleToggleBoostMode, className: "tw-relative tw-flex tw-h-squid-xl tw-w-[140px] tw-flex-col tw-justify-between tw-overflow-hidden tw-bg-grey-900 tw-pb-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-left-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-r tw-from-grey-900 tw-to-transparent" }), jsxRuntime.jsx("span", { className: "tw-via-grey-900/70 tw-absolute tw-right-0 tw-top-0 tw-z-10 tw-h-full tw-w-8 tw-bg-gradient-to-l tw-from-grey-900 tw-to-transparent" }), jsxRuntime.jsxs("div", { ref: boostIndicatorRef, "data-boost-mode": boostMode, className: "tw-group tw-peer tw-flex tw-h-full tw-items-center tw-justify-between tw-transition-transform data-[boost-mode=boost]:tw-animate-move-to-left-with-spring-bounce data-[boost-mode=normal]:tw-animate-move-to-right-with-spring-bounce", children: [jsxRuntime.jsx("div", { className: "tw-w-1/2 tw-text-center", children: jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-grey-300", children: "Normal" }) }), jsxRuntime.jsxs("div", { className: "tw-w-1/2 tw-text-center", children: [jsxRuntime.jsx(BodyText, { size: "small", className: "tw-text-status-positive", children: "Boost" }), ' '] }), jsxRuntime.jsx("div", { className: "tw-absolute tw-bottom-0 tw-h-1.5 tw-w-[1.5px] tw-rounded-sm tw-bg-grey-500 tw-text-grey-500 group-data-[boost-mode=boost]:tw-left-[calc(50%-2px)] group-data-[boost-mode=normal]:tw-left-[calc(50%-6px)]", style: {
2804
+ boxShadow: generateMarkerLines(40),
2805
+ } })] }), jsxRuntime.jsx("div", { className: cn('tw-absolute tw-bottom-0.5 tw-left-[calc(50%-1.5px)] tw-z-20 tw-h-[10px] tw-w-[3px] tw-rounded-sm tw-transition-colors peer-data-[boost-mode=boost]:tw-bg-status-positive peer-data-[boost-mode=normal]:tw-bg-current'), style: {
2806
+ transitionDuration: animationDuration,
2807
+ } })] }));
2808
+ }
2809
+ function generateMarkerLines(count) {
2810
+ const halfCount = Math.ceil(count / 2);
2811
+ const rightShadows = Array.from({ length: halfCount }, (_, index) => {
2812
+ return `-${(index + 1) * 6}px 0 currentColor`;
2813
+ });
2814
+ const leftShadows = Array.from({ length: halfCount }, (_, index) => {
2815
+ return `${(index + 1) * 6}px 0 currentColor`;
2816
+ });
2817
+ const allShadows = [...rightShadows, ...leftShadows];
2818
+ return allShadows.join(', ');
2819
+ }
2820
+
2821
+ const buttonSizeClassMap = {
2822
+ md: 'tw-px-squid-xs tw-py-squid-xxs tw-rounded-squid-m tw-border tw-flex tw-items-center tw-gap-squid-xxs tw-min-w-[60px] tw-h-squid-xl tw-justify-center',
2823
+ lg: 'tw-border tw-rounded-squid-xxl tw-p-1 tw-h-button tw-w-full',
2850
2824
  };
2851
- const SelectTokenLabel = () => {
2852
- return (jsxRuntime.jsxs("div", { className: "tw-mx-auto tw-flex tw-items-center tw-justify-center tw-gap-1.5", children: [jsxRuntime.jsx(BodyText, { size: "small", children: "Select token" }), jsxRuntime.jsx(ChevronArrowIcon, {})] }));
2825
+ const buttonVariantClassMap = {
2826
+ primary: 'tw-bg-royal-500 tw-text-grey-100 tw-border-material-light-thin',
2827
+ secondary: 'tw-bg-grey-100 tw-text-grey-800 tw-border-material-light-thin',
2828
+ tertiary: 'tw-bg-grey-800 tw-text-grey-300 tw-border-material-light-thin',
2853
2829
  };
2830
+ // right now all variants have the same disabled styles
2831
+ // in the future, we can add more disabled styles for different variants
2832
+ const buttonDisabledClass = 'disabled:tw-bg-grey-800 disabled:tw-text-grey-600';
2833
+ function Button(_a) {
2834
+ var { label, disabled, size, variant, icon } = _a, props = __rest(_a, ["label", "disabled", "size", "variant", "icon"]);
2835
+ return (jsxRuntime.jsx("button", Object.assign({}, props, { disabled: disabled, className: clsx(buttonSizeClassMap[size], buttonVariantClassMap[variant],
2836
+ // disabled styles
2837
+ buttonDisabledClass,
2838
+ // custom classes from props
2839
+ props.className), children: size === 'lg' ? (jsxRuntime.jsx("span", { className: "tw-px-squid-m", children: jsxRuntime.jsx(BodyText, { size: "medium", children: label }) })) : size === 'md' ? (label && !icon ? (
2840
+ // label only
2841
+ jsxRuntime.jsx(BodyText, { size: "small", children: label })) : !label && icon ? (
2842
+ // icon only
2843
+ icon) : (
2844
+ // icon and label
2845
+ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon, jsxRuntime.jsx(BodyText, { className: "tw-pr-1", size: "small", children: label })] }))) : null })));
2846
+ }
2847
+
2848
+ function Chip(_a) {
2849
+ var { label, icon } = _a, props = __rest(_a, ["label", "icon"]);
2850
+ return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn('tw-flex tw-h-squid-m tw-items-center tw-justify-center tw-rounded-squid-m tw-bg-grey-500 tw-text-grey-900', icon && 'tw-w-squid-m', props.className), children: label ? (jsxRuntime.jsx(CaptionText, { className: "tw-min-w-squid-xl tw-px-squid-xxs tw-text-center", children: label })) : (icon) })));
2851
+ }
2854
2852
 
2855
2853
  function EthereumIcon() {
2856
2854
  return (jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("path", { d: "M9.99866 2.91669L9.99866 12.6994L14.471 10.1298L9.99866 2.91669Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M9.99872 2.91669L5.52637 10.1298L9.99872 12.6995V8.15387V2.91669Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M9.99866 13.5226V17.0802L14.4737 10.9542L9.99866 13.5226Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M9.99872 17.0801V13.5225L5.52637 10.9542L9.99872 17.0801Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M9.99866 12.6994L14.4709 10.1298L9.99866 8.15387V12.6994Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M5.52637 10.1298L9.99865 12.6994V8.15387L5.52637 10.1298Z", fill: "currentColor" })] }));
2857
2855
  }
2858
2856
 
2859
2857
  function FeeButton() {
2860
- return (jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-xl tw-items-center tw-gap-x-squid-xs tw-px-squid-xs", children: [jsxRuntime.jsx(Chip, { label: "Fee" }), jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsxRuntime.jsx(Chip, { icon: jsxRuntime.jsx(EthereumIcon, {}) }), jsxRuntime.jsx(UsdAmount, { usdAmount: 560 })] })] }));
2858
+ return (jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-xl tw-items-center tw-gap-x-squid-xs tw-rounded-squid-m tw-px-squid-xs hover:tw-bg-material-light-thin", children: [jsxRuntime.jsx(Chip, { label: "Fee" }), jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsxRuntime.jsx(Chip, { icon: jsxRuntime.jsx(EthereumIcon, {}) }), jsxRuntime.jsx(UsdAmount, { usdAmount: 560 })] })] }));
2859
+ }
2860
+
2861
+ // font size, line height, and letter spacing classes
2862
+ const textClassMap = {
2863
+ small: 'tw-text-heading-small tw-tracking-heading-small tw-leading-heading-small',
2864
+ medium: 'tw-text-heading-medium tw-tracking-heading-medium tw-leading-heading-medium',
2865
+ large: 'tw-text-heading-large tw-tracking-heading-large tw-leading-heading-large',
2866
+ };
2867
+ function HeadingText({ children, bold, size }) {
2868
+ const fontWeightClass = bold
2869
+ ? 'tw-font-heading-bold'
2870
+ : 'tw-font-heading-regular';
2871
+ return (jsxRuntime.jsx("h6", { className: clsx(textClassMap[size], fontWeightClass), children: children }));
2872
+ }
2873
+
2874
+ function SettingsButton({ label }) {
2875
+ return (jsxRuntime.jsx("button", { className: "tw-flex tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-border-2 tw-border-transparent tw-p-squid-xs", children: jsxRuntime.jsx(CaptionText, { children: label }) }));
2861
2876
  }
2862
2877
 
2863
2878
  function SearchIcon() {
@@ -2872,6 +2887,10 @@ const PasteButton = () => {
2872
2887
  return (jsxRuntime.jsx("button", { className: "tw-h-[30px] tw-rounded-full tw-border tw-border-grey-700 tw-bg-grey-800 tw-px-2 tw-text-grey-300", children: jsxRuntime.jsx(CaptionText, { children: "Paste" }) }));
2873
2888
  };
2874
2889
 
2890
+ function SettingsSlider({ value, type }) {
2891
+ return (jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-rounded-squid-xs tw-border-royal-500 tw-p-squid-xs", children: [jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-justify-center", children: type === 'percentage' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-600", children: String(value) }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-300", children: "%" })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-300", children: "$" }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-600", children: String(value) })] })) }), jsxRuntime.jsx(Chip, { icon: jsxRuntime.jsx(ChevronGrabberVerticalIcon, { className: "tw-text-grey-900" }) })] }));
2892
+ }
2893
+
2875
2894
  const switchSizeClassMap = {
2876
2895
  small: 'tw-w-[36px] tw-h-squid-m tw-p-0.5',
2877
2896
  large: 'tw-w-[54px] tw-h-squid-l tw-p-[3px]',
@@ -2880,14 +2899,14 @@ const switchCircleSizeClassMap = {
2880
2899
  small: 'tw-w-4 tw-h-4',
2881
2900
  large: 'tw-w-6 tw-h-6',
2882
2901
  };
2883
- function Switch({ checked, onChange, size }) {
2902
+ function Switch({ checked = false, onChange, size }) {
2884
2903
  return (
2885
2904
  // Switch container
2886
2905
  jsxRuntime.jsxs("label", { className: clsx('tw-relative tw-inline-flex tw-items-center tw-justify-end tw-overflow-hidden tw-rounded-squid-m tw-border tw-border-material-light-thin',
2887
2906
  // size styles
2888
2907
  switchSizeClassMap[size],
2889
2908
  // checked styles
2890
- checked ? 'tw-bg-status-positive' : 'tw-bg-grey-800'), children: [jsxRuntime.jsx("input", { checked: checked, onChange: (e) => onChange(e.target.checked), type: "checkbox", className: "tw-peer tw-sr-only" }), jsxRuntime.jsx("span", { style: {
2909
+ checked ? 'tw-bg-status-positive' : 'tw-bg-grey-800'), children: [jsxRuntime.jsx("input", { checked: checked, onChange: (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.checked), type: "checkbox", className: "tw-peer tw-sr-only" }), jsxRuntime.jsx("span", { style: {
2891
2910
  filter: 'drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.33)) drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.20))',
2892
2911
  }, className: clsx('tw-absolute tw-rounded-full tw-border tw-border-material-light-thin',
2893
2912
  // size styles
@@ -2898,12 +2917,13 @@ function Switch({ checked, onChange, size }) {
2898
2917
  : 'tw-left-0.5 tw-bg-grey-500') })] }));
2899
2918
  }
2900
2919
 
2920
+ const borderRadiusClassMap = {
2921
+ sm: 'tw-rounded-squid-s',
2922
+ lg: 'tw-rounded-squid-m',
2923
+ };
2901
2924
  function Menu(_a) {
2902
- var { children, menuClassName, contentClassName } = _a, props = __rest(_a, ["children", "menuClassName", "contentClassName"]);
2903
- return (jsxRuntime.jsx("div", Object.assign({}, props, { className: menuClassName, children: jsxRuntime.jsx("div", { style: {
2904
- boxShadow: '0px 2px 5px 1px rgba(0, 0, 0, 0.20), 0px 5px 20px -1px rgba(0, 0, 0, 0.33)',
2905
- backdropFilter: 'blur(calc(20px / 2))',
2906
- }, className: cn('tw-w-full tw-max-w-[320px] tw-items-center tw-justify-center tw-rounded-squid-m tw-border tw-border-material-light-thin tw-bg-material-dark-thick tw-p-squid-s tw-text-center tw-text-material-light-thick', contentClassName), children: typeof children === 'string' ? (jsxRuntime.jsx(CaptionText, { children: children })) : (children) }) })));
2925
+ var { children, containerClassName, contentClassName, title, displayControls, rounded = 'lg' } = _a, props = __rest(_a, ["children", "containerClassName", "contentClassName", "title", "displayControls", "rounded"]);
2926
+ return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn('tw-max-w-[320px]', containerClassName), children: jsxRuntime.jsxs("div", { className: cn('tw-backdrop-blur/10 tw-relative tw-inline-flex 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-s 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), children: [title ? (jsxRuntime.jsx("div", { className: "tw-z-20 tw-flex tw-flex-col tw-items-center tw-justify-center tw-self-stretch tw-py-squid-xxs tw-text-grey-100", children: jsxRuntime.jsx(BodyText, { size: "small", className: "tw-self-stretch !tw-leading-[10px]", children: title }) })) : null, typeof children === 'string' ? (jsxRuntime.jsx(CaptionText, { className: "tw-z-20 tw-self-stretch", children: children })) : (jsxRuntime.jsx("div", { className: "tw-z-20", children: children })), displayControls ? (jsxRuntime.jsx("div", { className: "tw-z-20 tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xs", children: jsxRuntime.jsx(Button, { size: "md", variant: "tertiary", label: "Learn more", className: "tw-self-stretch" }) })) : null, jsxRuntime.jsx("div", { className: cn('tw-backdrop-blur/10 tw-absolute tw-z-10 tw-h-full tw-w-full tw-border tw-border-material-light-thin tw-bg-material-light-thin', borderRadiusClassMap[rounded]) })] }) })));
2907
2927
  }
2908
2928
 
2909
2929
  const tooltipWidthClassMap = {
@@ -2919,12 +2939,12 @@ const tooltipThresholdClassMap = {
2919
2939
  xl: 'tw-pb-squid-xl',
2920
2940
  xxl: 'tw-pb-squid-xxl',
2921
2941
  };
2922
- function Tooltip({ children, tooltipContent, tooltipWidth = 'container', threshold = 'xxs', className, }) {
2923
- return (jsxRuntime.jsxs("div", { className: cn('tw-relative', className), children: [jsxRuntime.jsx("div", { className: "tw-peer", children: children }), jsxRuntime.jsx(Menu, { menuClassName: cn('tw-absolute peer-hover:tw-block hover:tw-block tw-hidden tw-z-40', 'tw-left-1/2 -tw-translate-x-1/2 tw-bottom-full', tooltipWidthClassMap[tooltipWidth], tooltipThresholdClassMap[threshold]), children: tooltipContent })] }));
2942
+ function Tooltip({ children, tooltipContent, tooltipWidth = 'container', threshold = 'xxs', containerClassName, childrenClassName, tooltipClassName, }) {
2943
+ return (jsxRuntime.jsxs("div", { className: cn('tw-relative', containerClassName), children: [jsxRuntime.jsx("div", { className: cn('tw-peer', childrenClassName), children: children }), jsxRuntime.jsx(Menu, { containerClassName: cn('tw-absolute tw-z-40 tw-hidden hover:tw-block peer-hover:tw-block', 'tw-bottom-full tw-left-1/2 -tw-translate-x-1/2', tooltipWidthClassMap[tooltipWidth], tooltipThresholdClassMap[threshold], tooltipClassName), children: tooltipContent })] }));
2924
2944
  }
2925
2945
 
2926
- function Boost() {
2927
- return (jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-xl tw-items-center tw-gap-x-squid-xxs", children: [jsxRuntime.jsx(BoostButton, {}), jsxRuntime.jsx(Chip, { label: "20s", className: "tw-bg-status-positive tw-text-grey-900" })] }));
2946
+ function Boost({ boostMode, onToggleBoostMode }) {
2947
+ return (jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-xl tw-items-center tw-gap-x-squid-xxs tw-bg-grey-900 tw-pr-squid-xxs", children: [jsxRuntime.jsx(BoostButton, { boostMode: boostMode, onToggleBoostMode: onToggleBoostMode }), jsxRuntime.jsx(Chip, { label: boostMode === 'normal' ? '10m' : '20s', className: cn('tw-text-grey-900 tw-transition-colors', boostMode === 'normal' ? 'tw-bg-grey-300' : 'tw-bg-status-positive') })] }));
2928
2948
  }
2929
2949
 
2930
2950
  var DetailsToolbarState;
@@ -2947,7 +2967,7 @@ const detailStateClassMap = {
2947
2967
  };
2948
2968
  function DetailsToolbar({ state = DetailsToolbarState.FULL, errorMessage, }) {
2949
2969
  const detailClassName = cn('tw-w-[190px]', detailStateClassMap[state]);
2950
- return (jsxRuntime.jsx("aside", { className: "tw-h-squid-[50px] tw-flex tw-w-[480px] tw-items-center tw-justify-around tw-bg-grey-900 tw-px-squid-m tw-py-squid-xxs tw-text-grey-500", children: state === DetailsToolbarState.ERROR ? (jsxRuntime.jsx(ErrorMessage, { message: errorMessage })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: detailClassName, children: jsxRuntime.jsx(FeeButton, {}) }), jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-xl tw-w-squid-xxl tw-items-center tw-justify-center", children: state === DetailsToolbarState.LOADING ? (jsxRuntime.jsx(Loader, { size: "32" })) : (jsxRuntime.jsx(Button, { variant: "tertiary", size: "md", className: "tw-border-transparent tw-bg-transparent", icon: jsxRuntime.jsx(ChevronLargeDownIcon, {}) })) }), jsxRuntime.jsx("div", { className: detailClassName, children: jsxRuntime.jsx(Boost, {}) })] })) }));
2970
+ return (jsxRuntime.jsx("aside", { className: "tw-h-squid-[50px] tw-flex tw-w-[480px] tw-items-center tw-justify-around tw-bg-grey-900 tw-px-squid-m tw-py-squid-xxs tw-text-grey-500", children: state === DetailsToolbarState.ERROR ? (jsxRuntime.jsx(ErrorMessage, { message: errorMessage })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: detailClassName, children: jsxRuntime.jsx(FeeButton, {}) }), jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-xl tw-w-squid-xxl tw-items-center tw-justify-center", children: state === DetailsToolbarState.LOADING ? (jsxRuntime.jsx(Loader, { size: "32" })) : (jsxRuntime.jsx(Button, { variant: "tertiary", size: "md", className: "tw-border-transparent tw-bg-transparent hover:tw-bg-material-light-thin", icon: jsxRuntime.jsx(ChevronLargeDownIcon, {}) })) }), jsxRuntime.jsx("div", { className: detailClassName, children: jsxRuntime.jsx(Boost, { boostMode: "boost" }) })] })) }));
2951
2971
  }
2952
2972
  const ErrorMessage = ({ message }) => {
2953
2973
  return (jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-xl tw-flex-1 tw-items-center tw-gap-squid-xxs tw-text-status-negative", children: [jsxRuntime.jsx(EmojiSadIcon, {}), jsxRuntime.jsx(CaptionText, { children: message })] }));
@@ -2956,30 +2976,19 @@ const ErrorMessage = ({ message }) => {
2956
2976
  function Modal({ children }) {
2957
2977
  return (
2958
2978
  // modal container
2959
- jsxRuntime.jsx("div", { className: "tw-absolute tw-inset-0 tw-flex tw-items-start tw-justify-center tw-bg-material-dark-thick tw-px-squid-xs tw-py-squid-xl tw-pb-squid-m", style: {
2960
- backdropFilter: 'blur(20px)',
2961
- }, children: jsxRuntime.jsx("div", { className: "tw-relative tw-flex tw-h-[600px] tw-w-[400px] tw-flex-col tw-items-start tw-gap-squid-xxs tw-self-end tw-overflow-hidden", children: children }) }));
2962
- }
2963
-
2964
- // font size, line height, and letter spacing classes
2965
- const textClassMap = {
2966
- small: 'tw-text-heading-small tw-tracking-heading-small tw-leading-heading-small',
2967
- medium: 'tw-text-heading-medium tw-tracking-heading-medium tw-leading-heading-medium',
2968
- large: 'tw-text-heading-large tw-tracking-heading-large tw-leading-heading-large',
2969
- };
2970
- function HeadingText({ children, bold, size }) {
2971
- const fontWeightClass = bold
2972
- ? 'tw-font-heading-bold'
2973
- : 'tw-font-heading-regular';
2974
- return (jsxRuntime.jsx("h6", { className: clsx(textClassMap[size], fontWeightClass), children: children }));
2979
+ jsxRuntime.jsx("div", { className: "tw-backdrop-blur/20 tw-absolute tw-inset-0 tw-flex tw-items-start tw-justify-center tw-bg-material-dark-thick tw-px-squid-xs tw-py-squid-xl tw-pb-squid-m", children: jsxRuntime.jsx("div", { className: "tw-relative tw-flex tw-h-[600px] tw-w-[400px] tw-flex-col tw-items-start tw-justify-end tw-gap-squid-xxs tw-self-end", children: children }) }));
2975
2980
  }
2976
2981
 
2977
- function NavigationBar({ title, displayBackButton = false, logoUrl, }) {
2978
- return (jsxRuntime.jsxs("nav", { className: cn('tw-flex tw-max-h-[120px] tw-min-w-96 tw-flex-col tw-bg-grey-900 tw-text-grey-300'), children: [jsxRuntime.jsxs("div", { className: cn('tw-flex tw-h-squid-xxl tw-items-center tw-justify-end tw-gap-x-squid-xs', displayBackButton ? 'tw-px-squid-m' : 'tw-pl-squid-l tw-pr-squid-m'), children: [displayBackButton ? (jsxRuntime.jsx(Button, { variant: "tertiary", size: "md", icon: jsxRuntime.jsx(ArrowLeftIcon, {}) })) : null, logoUrl ? (jsxRuntime.jsx("img", { src: logoUrl, className: "tw-h-squid-xl tw-min-w-squid-xl" })) : null, jsxRuntime.jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end", children: jsxRuntime.jsx(AddressButton, { label: "Connect" }) })] }), title ? (jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-xxl tw-items-center tw-px-squid-l tw-py-squid-xxs", children: jsxRuntime.jsx(HeadingText, { size: "small", children: title }) })) : null] }));
2982
+ function NavigationBar({ title, displayBackButton = false, logoUrl, transparent = false, displayButtonShadows = false, }) {
2983
+ return (jsxRuntime.jsxs("nav", { className: cn('tw-flex tw-max-h-[120px] tw-min-w-96 tw-flex-col tw-text-grey-300', transparent ? 'tw-bg-transparent' : 'tw-bg-grey-900'), children: [jsxRuntime.jsxs("div", { className: cn('tw-flex tw-h-squid-xxl tw-items-center tw-justify-end tw-gap-x-squid-xs', displayBackButton ? 'tw-px-squid-m' : 'tw-pl-squid-l tw-pr-squid-m'), children: [displayBackButton ? (jsxRuntime.jsx(Button, { className: displayButtonShadows
2984
+ ? 'group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2 group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2'
2985
+ : undefined, variant: "tertiary", size: "md", icon: jsxRuntime.jsx(ArrowLeftIcon, {}) })) : null, logoUrl ? (jsxRuntime.jsx("img", { src: logoUrl, className: "tw-h-squid-xl tw-min-w-squid-xl" })) : null, jsxRuntime.jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end", children: jsxRuntime.jsx(AddressButton, { className: displayButtonShadows
2986
+ ? 'group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2 group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2'
2987
+ : undefined, label: "Connect" }) })] }), title ? (jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-xxl tw-items-center tw-px-squid-l tw-py-squid-xxs", children: jsxRuntime.jsx(HeadingText, { size: "small", children: title }) })) : null] }));
2979
2988
  }
2980
2989
 
2981
2990
  function ProductCard({ children }) {
2982
- return (jsxRuntime.jsx("div", { className: "tw-h-card tw-min-h-card tw-w-card tw-rounded-squid-xl tw-border-[1px] tw-border-solid tw-border-material-light-thick tw-bg-material-light-thick tw-p-squid-xs tw-backdrop-blur-[calc(1.25rem/2)]", children: jsxRuntime.jsx("div", { className: "tw-relative tw-flex tw-h-full tw-max-h-[660px] tw-w-full tw-flex-col tw-overflow-hidden tw-rounded-squid-l tw-bg-grey-900 tw-text-grey-300", children: children }) }));
2991
+ return (jsxRuntime.jsx("div", { className: "tw-backdrop-blur/10 tw-h-card tw-min-h-card tw-w-card tw-rounded-squid-xl tw-border-[1px] tw-border-solid tw-border-material-light-thick tw-bg-material-light-thick tw-p-squid-xs", children: jsxRuntime.jsx("div", { className: "tw-relative tw-flex tw-h-full tw-max-h-[660px] tw-w-full tw-flex-col tw-overflow-hidden tw-rounded-squid-l tw-bg-grey-900 tw-text-grey-300", children: children }) }));
2983
2992
  }
2984
2993
 
2985
2994
  function MaxIcon() {
@@ -2998,19 +3007,91 @@ function SwapConfiguration({ priceImpactPercentage, amount = 0, swapAmountUsd =
2998
3007
  const priceImpactClass = (priceImpactPercentage !== null && priceImpactPercentage !== void 0 ? priceImpactPercentage : 0) > 5
2999
3008
  ? 'tw-text-status-negative'
3000
3009
  : 'tw-text-grey-300';
3001
- return (jsxRuntime.jsxs("section", { className: "tw-h-[205px] tw-max-h-[205px] tw-bg-grey-900 tw-px-squid-l tw-pb-squid-m", children: [jsxRuntime.jsxs("header", { className: "tw-flex tw-items-center tw-gap-1 tw-py-squid-s tw-leading-5 tw-text-grey-300", children: [jsxRuntime.jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === 'from' ? 'Pay' : 'Receive' }), jsxRuntime.jsx(BodyText, { className: "tw-text-grey-600", size: "small", children: ":" }), jsxRuntime.jsx(WalletAddress, { ens: "so-so.eth" })] }), jsxRuntime.jsx(Dropdown, { chainImageUrl: chain === null || chain === void 0 ? void 0 : chain.iconUrl, tokenImageUrl: token === null || token === void 0 ? void 0 : token.iconUrl, tokenSymbol: token === null || token === void 0 ? void 0 : token.symbol, chainBgColor: chain === null || chain === void 0 ? void 0 : chain.bgColor, tokenBgColor: token === null || token === void 0 ? void 0 : token.bgColor, tokenTextColor: token === null || token === void 0 ? void 0 : token.textColor }), jsxRuntime.jsx("input", { className: "tw-h-[75px] tw-w-full tw-bg-transparent tw-py-squid-m tw-text-heading-small tw-font-heading-regular tw-text-royal-400 placeholder:tw-text-grey-600 focus:tw-outline-none", placeholder: "0", value: amount }), !(token === null || token === void 0 ? void 0 : token.iconUrl) || isFetching ? null : (jsxRuntime.jsxs("footer", { className: "tw-flex tw-h-squid-m tw-max-h-squid-m tw-items-center tw-justify-between tw-gap-2 tw-text-grey-500", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-1.5", children: [jsxRuntime.jsx(SwapInputsIcon, {}), jsxRuntime.jsx(UsdAmount, { usdAmount: swapAmountUsd }), priceImpactPercentage ? (jsxRuntime.jsxs("span", { className: clsx('tw-flex tw-items-center', priceImpactClass), children: [jsxRuntime.jsx(ArrowTriangle, {}), jsxRuntime.jsx(CaptionText, { bold: true, children: priceImpactPercentage.toString().concat('%') })] })) : null] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-1.5", children: [jsxRuntime.jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsxRuntime.jsx(CaptionText, { children: balance }), jsxRuntime.jsx(MaxIcon, {})] })] }))] }));
3010
+ return (jsxRuntime.jsxs("section", { className: "tw-h-[205px] tw-max-h-[205px] tw-bg-grey-900 tw-pb-squid-m", children: [jsxRuntime.jsx("header", { className: "tw-flex tw-items-center tw-gap-1 tw-px-squid-l tw-py-squid-xs tw-leading-5 tw-text-grey-300", children: jsxRuntime.jsxs("div", { className: "-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 hover:tw-bg-material-light-thin", children: [jsxRuntime.jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === 'from' ? 'Pay' : 'Receive' }), jsxRuntime.jsx(BodyText, { className: "tw-text-grey-600", size: "small", children: ":" }), jsxRuntime.jsx(WalletAddress, { ens: "so-so.eth" })] }) }), jsxRuntime.jsx("div", { className: "tw-px-squid-l", children: jsxRuntime.jsx(AssetsButton, { chainImageUrl: chain === null || chain === void 0 ? void 0 : chain.iconUrl, tokenImageUrl: token === null || token === void 0 ? void 0 : token.iconUrl, tokenSymbol: token === null || token === void 0 ? void 0 : token.symbol, chainBgColor: chain === null || chain === void 0 ? void 0 : chain.bgColor, tokenBgColor: token === null || token === void 0 ? void 0 : token.bgColor, tokenTextColor: token === null || token === void 0 ? void 0 : token.textColor }) }), jsxRuntime.jsx("div", { className: "tw-px-squid-m", children: jsxRuntime.jsx("input", { className: "tw-my-squid-xs tw-h-[55px] tw-w-full tw-rounded-squid-s tw-bg-transparent tw-px-squid-xs tw-py-squid-s tw-text-heading-small tw-font-heading-regular tw-text-royal-400 placeholder:tw-text-grey-600 hover:tw-bg-material-light-thin focus:tw-bg-material-light-thin focus:tw-outline-none", placeholder: "0", value: amount }) }), !(token === null || token === void 0 ? void 0 : token.iconUrl) || isFetching ? null : (jsxRuntime.jsxs("footer", { className: "tw-flex tw-h-squid-m tw-max-h-squid-m tw-items-center tw-justify-between tw-gap-2 tw-px-squid-m tw-text-grey-500", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-l tw-items-center tw-gap-1.5 tw-rounded-squid-s tw-px-squid-xs hover:tw-bg-material-light-thin", children: [jsxRuntime.jsx(SwapInputsIcon, {}), jsxRuntime.jsx(UsdAmount, { usdAmount: swapAmountUsd }), priceImpactPercentage ? (jsxRuntime.jsxs("span", { className: clsx('tw-flex tw-items-center', priceImpactClass), children: [jsxRuntime.jsx(ArrowTriangle, {}), jsxRuntime.jsx(CaptionText, { bold: true, children: priceImpactPercentage.toString().concat('%') })] })) : null] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-l tw-items-center tw-gap-1.5 tw-rounded-squid-s tw-px-squid-xs hover:tw-bg-material-light-thin", children: [jsxRuntime.jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsxRuntime.jsx(CaptionText, { children: balance }), jsxRuntime.jsx(MaxIcon, {})] })] }))] }));
3011
+ }
3012
+
3013
+ function SwapProgressViewHeader({ title, description, }) {
3014
+ return (jsxRuntime.jsxs("header", { className: "tw-flex tw-h-[95px] tw-w-full tw-flex-col tw-gap-squid-s tw-bg-grey-800 tw-px-squid-m tw-py-squid-s", children: [jsxRuntime.jsx(BodyText, { size: "large", className: "tw-h-squid-m !tw-leading-[20px] tw-text-grey-300", children: title }), jsxRuntime.jsx(CaptionText, { className: "tw-h-squid-l tw-text-grey-500", children: description })] }));
3002
3015
  }
3003
3016
 
3004
- function DropdownMenuItem({ label, imageUrl, icon, }) {
3005
- return (jsxRuntime.jsx("li", { className: "tw-max-h-squid-xl tw-w-full tw-px-squid-xxs", children: jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-xs tw-pl-squid-xxs", children: [jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-between tw-rounded-squid-xs", children: imageUrl ? (jsxRuntime.jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), jsxRuntime.jsx(CaptionText, { children: label })] }) }));
3017
+ function SwapStepSeparator() {
3018
+ return (jsxRuntime.jsx("span", { className: "tw-flex tw-h-squid-m tw-w-squid-xxl tw-items-center tw-justify-center tw-self-stretch tw-py-0.5", children: jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "4", height: "21", viewBox: "0 0 4 21", fill: "none", children: jsxRuntime.jsx("path", { d: "M2 2.5V18.5", stroke: "currentColor", "stroke-width": "4", "stroke-linecap": "round" }) }) }));
3006
3019
  }
3007
3020
 
3008
- function DotGrid1x3HorizontalIcon() {
3009
- return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.33325 8.00008C1.33325 7.2637 1.93021 6.66675 2.66659 6.66675C3.40297 6.66675 3.99992 7.2637 3.99992 8.00008C3.99992 8.73646 3.40297 9.33341 2.66659 9.33341C1.93021 9.33341 1.33325 8.73646 1.33325 8.00008ZM6.66659 8.00008C6.66659 7.2637 7.26354 6.66675 7.99992 6.66675C8.7363 6.66675 9.33325 7.2637 9.33325 8.00008C9.33325 8.73646 8.7363 9.33341 7.99992 9.33341C7.26354 9.33341 6.66659 8.73646 6.66659 8.00008ZM11.9999 8.00008C11.9999 7.2637 12.5969 6.66675 13.3333 6.66675C14.0696 6.66675 14.6666 7.2637 14.6666 8.00008C14.6666 8.73646 14.0696 9.33341 13.3333 9.33341C12.5969 9.33341 11.9999 8.73646 11.9999 8.00008Z", fill: "currentColor" }) }));
3021
+ function DropdownMenuItem({ label, imageUrl, icon, labelClassName, }) {
3022
+ return (jsxRuntime.jsx("li", { className: "tw-max-h-squid-xl tw-w-full tw-px-squid-xxs", children: jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-xs tw-pl-squid-xxs hover:tw-bg-material-light-thin", children: [jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-between tw-rounded-squid-xs", children: imageUrl ? (jsxRuntime.jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), jsxRuntime.jsx(CaptionText, { className: labelClassName, children: label })] }) }));
3023
+ }
3024
+
3025
+ function useModal(props) {
3026
+ const [isModalOpen, setIsModalOpen] = react.useState(Boolean(props === null || props === void 0 ? void 0 : props.initialIsModalOpen));
3027
+ const modalRef = react.useRef(null);
3028
+ const openModalButtonRef = react.useRef(null);
3029
+ react.useEffect(() => {
3030
+ const handleClickOutside = (event) => {
3031
+ var _a;
3032
+ // close modal if the user clicked outside of it
3033
+ if (modalRef.current &&
3034
+ !modalRef.current.contains(event.target) &&
3035
+ !((_a = openModalButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
3036
+ setIsModalOpen(false);
3037
+ }
3038
+ };
3039
+ document.addEventListener('click', handleClickOutside);
3040
+ return () => {
3041
+ document.removeEventListener('click', handleClickOutside);
3042
+ };
3043
+ }, [modalRef]);
3044
+ const openModal = react.useCallback(() => {
3045
+ setIsModalOpen((prev) => !prev);
3046
+ }, []);
3047
+ const closeModal = react.useCallback(() => {
3048
+ setIsModalOpen(false);
3049
+ }, []);
3050
+ return {
3051
+ isModalOpen,
3052
+ openModal,
3053
+ closeModal,
3054
+ modalRef,
3055
+ openModalButtonRef,
3056
+ };
3057
+ }
3058
+
3059
+ function CompassRound({ size = '20', className, }) {
3060
+ return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsxRuntime.jsx("path", { d: "M17.7087 9.99996C17.7087 14.2572 14.2575 17.7083 10.0003 17.7083C5.74313 17.7083 2.29199 14.2572 2.29199 9.99996C2.29199 5.74276 5.74313 2.29163 10.0003 2.29163C14.2575 2.29163 17.7087 5.74276 17.7087 9.99996Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linejoin": "round" }), jsxRuntime.jsx("path", { d: "M12.2135 7.27515L8.79307 8.208C8.5084 8.28564 8.286 8.50803 8.20837 8.7927L7.27552 12.2132C7.19069 12.5242 7.47609 12.8096 7.78713 12.7248L11.2076 11.7919C11.4923 11.7143 11.7146 11.4919 11.7923 11.2072L12.7251 7.78677C12.81 7.47573 12.5246 7.19032 12.2135 7.27515Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linejoin": "round" })] }));
3061
+ }
3062
+ function CircleX({ size = '20', className, }) {
3063
+ return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M12.5003 7.49996L7.50033 12.5M12.5003 12.5L7.50033 7.49996M17.7087 9.99996C17.7087 14.2572 14.2575 17.7083 10.0003 17.7083C5.74313 17.7083 2.29199 14.2572 2.29199 9.99996C2.29199 5.74276 5.74313 2.29163 10.0003 2.29163C14.2575 2.29163 17.7087 5.74276 17.7087 9.99996Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round" }) }));
3064
+ }
3065
+
3066
+ function DotGrid1x3HorizontalIcon({ className, size = '16', }) {
3067
+ return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", className: className, children: jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M1.33325 8.00008C1.33325 7.2637 1.93021 6.66675 2.66659 6.66675C3.40297 6.66675 3.99992 7.2637 3.99992 8.00008C3.99992 8.73646 3.40297 9.33341 2.66659 9.33341C1.93021 9.33341 1.33325 8.73646 1.33325 8.00008ZM6.66659 8.00008C6.66659 7.2637 7.26354 6.66675 7.99992 6.66675C8.7363 6.66675 9.33325 7.2637 9.33325 8.00008C9.33325 8.73646 8.7363 9.33341 7.99992 9.33341C7.26354 9.33341 6.66659 8.73646 6.66659 8.00008ZM11.9999 8.00008C11.9999 7.2637 12.5969 6.66675 13.3333 6.66675C14.0696 6.66675 14.6666 7.2637 14.6666 8.00008C14.6666 8.73646 14.0696 9.33341 13.3333 9.33341C12.5969 9.33341 11.9999 8.73646 11.9999 8.00008Z", fill: "currentColor" }) }));
3068
+ }
3069
+
3070
+ function RefreshIcon() {
3071
+ return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [jsxRuntime.jsx("path", { d: "M10.8333 17.4999C11.2936 17.4999 11.6667 17.1269 11.6667 16.6666C11.6667 16.2064 11.2936 15.8333 10.8333 15.8333C10.3731 15.8333 10 16.2064 10 16.6666C10 17.1269 10.3731 17.4999 10.8333 17.4999Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M17.5 9.16661C17.5 8.70638 17.1269 8.33328 16.6667 8.33328C16.2064 8.33328 15.8333 8.70638 15.8333 9.16661C15.8333 9.62685 16.2064 9.99995 16.6667 9.99995C17.1269 9.99995 17.5 9.62685 17.5 9.16661Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M16.6079 11.8899C17.0065 12.12 17.143 12.6297 16.9129 13.0283C16.6828 13.4268 16.1731 13.5634 15.7746 13.3333C15.376 13.1032 15.2394 12.5935 15.4695 12.1949C15.6997 11.7964 16.2093 11.6598 16.6079 11.8899Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M14.473 16.0785C14.8716 15.8483 15.0081 15.3387 14.778 14.9401C14.5479 14.5415 14.0382 14.405 13.6397 14.6351C13.2411 14.8652 13.1045 15.3749 13.3347 15.7734C13.5648 16.172 14.0744 16.3086 14.473 16.0785Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M15.7725 6.66661C15.3739 6.89673 14.8642 6.76017 14.6341 6.36159C14.404 5.96301 14.5405 5.45335 14.9391 5.22323C15.3377 4.99312 15.8474 5.12968 16.0775 5.52826C16.3076 5.92683 16.171 6.43649 15.7725 6.66661Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M7.70833 12.2917V16.875H3.125M7.5 16.4063C4.93915 15.4062 3.125 12.915 3.125 10C3.125 6.20304 6.20304 3.125 10 3.125C10.9614 3.125 11.8768 3.32235 12.7077 3.67876", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }));
3072
+ }
3073
+
3074
+ function DropdownMenu({ dropdownRef, items, className, }) {
3075
+ return (jsxRuntime.jsx("div", { ref: dropdownRef, children: jsxRuntime.jsx(Menu, { rounded: "sm", containerClassName: cn('tw-absolute tw-right-0 tw-z-20', className), contentClassName: "!tw-p-0", children: jsxRuntime.jsx("ul", { className: "custom-scrollbar tw-flex tw-w-[144px] tw-flex-col tw-gap-squid-xxs tw-overflow-auto tw-px-0 tw-py-squid-xxs", children: items.map((item) => (jsxRuntime.jsx(DropdownMenuItem, Object.assign({}, item)))) }) }) }));
3010
3076
  }
3011
3077
 
3012
3078
  function HistoryItem({ firstImageUrl, secondImageUrl, isPending, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, pendingLabel = 'Pending', }) {
3013
- return (jsxRuntime.jsxs("li", { className: "tw-flex tw-h-list-item-large tw-w-list-item-small tw-items-center tw-gap-squid-xs tw-bg-grey-900 tw-px-squid-m tw-py-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [isPending ? (jsxRuntime.jsx("span", { className: "tw-absolute -tw-left-[5px] tw-bottom-0 tw-z-30 tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-center tw-rounded-full tw-border tw-border-grey-900 tw-bg-royal-400 tw-p-0.5", children: jsxRuntime.jsx(DotGrid1x3HorizontalIcon, {}) })) : null, jsxRuntime.jsx("img", { src: firstImageUrl, className: "tw-absolute tw-z-20 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" }), jsxRuntime.jsx("img", { src: secondImageUrl, className: "tw-absolute tw-left-5 tw-z-10 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-10 tw-w-[230px] tw-flex-col", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-justify-between tw-text-grey-500", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center", children: [jsxRuntime.jsx(CaptionText, { children: fromLabel }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronRightSmallIcon, {}) }), jsxRuntime.jsx(CaptionText, { children: toLabel })] }), isPending ? (jsxRuntime.jsx(CaptionText, { className: "tw-text-royal-400", children: pendingLabel })) : (jsxRuntime.jsx(CaptionText, { children: dateCompleted }))] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx(BodyText, { size: "small", children: fromAmount }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), jsxRuntime.jsx(BodyText, { size: "small", children: toAmount })] })] })] }));
3079
+ const { isModalOpen, modalRef, openModalButtonRef, openModal } = useModal();
3080
+ return (jsxRuntime.jsx("li", { className: "tw-h-list-item-large tw-min-w-list-item-small tw-self-stretch tw-bg-grey-900 tw-px-squid-xs tw-text-grey-300", children: jsxRuntime.jsxs("div", { className: "tw-group/history-item tw-relative tw-flex 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 hover:tw-bg-material-light-thin", children: [jsxRuntime.jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [isPending ? (jsxRuntime.jsx("span", { className: "tw-absolute -tw-left-[5px] tw-bottom-0 tw-z-30 tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-center tw-rounded-full tw-border tw-border-grey-900 tw-bg-royal-400 tw-p-0.5", children: jsxRuntime.jsx(DotGrid1x3HorizontalIcon, {}) })) : null, jsxRuntime.jsx("img", { src: firstImageUrl, className: "tw-absolute tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" }), jsxRuntime.jsx("img", { src: secondImageUrl, className: "tw-absolute tw-left-5 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-10 tw-flex-1 tw-flex-col tw-self-stretch", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-justify-between tw-text-grey-500", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center", children: [jsxRuntime.jsx(CaptionText, { children: fromLabel }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronRightSmallIcon, {}) }), jsxRuntime.jsx(CaptionText, { children: toLabel })] }), jsxRuntime.jsx("div", { className: "tw-transition-opacity group-hover/history-item:tw-opacity-0", children: isPending ? (jsxRuntime.jsx(CaptionText, { className: "tw-text-royal-400", children: pendingLabel })) : (jsxRuntime.jsx(CaptionText, { children: dateCompleted })) }), jsxRuntime.jsx("button", { className: "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-thin tw-p-2 tw-text-grey-300 tw-opacity-0 tw-transition-opacity group-hover/history-item:tw-opacity-100", onClick: openModal, ref: openModalButtonRef, children: jsxRuntime.jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx(BodyText, { size: "small", children: fromAmount }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), jsxRuntime.jsx(BodyText, { size: "small", children: toAmount })] })] }), isModalOpen ? (jsxRuntime.jsx(DropdownMenu, { dropdownRef: modalRef, items: [
3081
+ {
3082
+ label: 'Repeat swap',
3083
+ icon: jsxRuntime.jsx(RefreshIcon, {}),
3084
+ },
3085
+ {
3086
+ label: 'View on xyz',
3087
+ icon: jsxRuntime.jsx(CompassRound, {}),
3088
+ },
3089
+ {
3090
+ label: 'Clear',
3091
+ labelClassName: 'tw-text-status-negative',
3092
+ icon: jsxRuntime.jsx(CircleX, { className: "tw-text-status-negative" }),
3093
+ },
3094
+ ] })) : null] }) }));
3014
3095
  }
3015
3096
 
3016
3097
  const listItemSizeMap = {
@@ -3031,6 +3112,73 @@ function SectionTitle({ title, icon, accessory, actionIcon, className, }) {
3031
3112
  return (jsxRuntime.jsxs("header", { className: cn('tw-flex tw-h-[46px] tw-w-full tw-items-center tw-gap-squid-xxs tw-bg-grey-900 tw-px-squid-m tw-pb-squid-xs tw-pt-squid-m tw-text-royal-400', className), children: [icon, jsxRuntime.jsx(CaptionText, { children: title }), accessory ? (jsxRuntime.jsx(CaptionText, { className: "tw-flex-1 tw-text-right tw-text-grey-500", children: accessory })) : actionIcon ? (jsxRuntime.jsx("span", { className: "tw-flex tw-flex-1 tw-items-center tw-justify-end", children: actionIcon })) : null] }));
3032
3113
  }
3033
3114
 
3115
+ function HelpIcon({ size = '20', className, }) {
3116
+ return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_457_36778)", children: jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0C15.5228 0 20 4.47715 20 10ZM6 7C6 4.46214 8.03736 3 10 3C12.1193 3 14 4.66531 14 7C14 7.93746 13.7596 8.6603 13.368 9.2586C13.0353 9.76679 12.6034 10.1601 12.2697 10.4639L12.1757 10.5497C11.8041 10.8904 11.534 11.1593 11.337 11.504C11.1513 11.8288 11 12.2794 11 13C11 13.5523 10.5523 14 10 14C9.44772 14 9 13.5523 9 13C9 11.9706 9.22366 11.1712 9.60051 10.5117C9.96604 9.87199 10.4459 9.42214 10.8243 9.07535L10.8834 9.02116L10.8834 9.02116L10.8834 9.02115C11.2572 8.67885 11.5066 8.45039 11.6945 8.16328C11.8654 7.9022 12 7.56254 12 7C12 5.83469 11.0807 5 10 5C8.96264 5 8 5.73786 8 7C8 7.55228 7.55228 8 7 8C6.44772 8 6 7.55228 6 7ZM10 15C9.44771 15 9 15.4477 9 16C9 16.5523 9.44771 17 10 17C10.5523 17 11 16.5523 11 16C11 15.4477 10.5523 15 10 15Z", fill: "currentColor" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_457_36778", children: jsxRuntime.jsx("rect", { width: "20", height: "20", fill: "white" }) }) })] }));
3117
+ }
3118
+
3119
+ function SettingsItem({ icon, label, controls, transparentControls = false, showHelpIcon = true, }) {
3120
+ return (jsxRuntime.jsxs("li", { className: "tw-flex tw-h-[50px] tw-scroll-px-5 tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-bg-grey-900 tw-px-5 tw-py-squid-xs tw-text-grey-300", children: [icon, jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-1 tw-items-center tw-gap-squid-xxs tw-self-stretch", children: [jsxRuntime.jsx(BodyText, { size: "small", children: label }), showHelpIcon ? jsxRuntime.jsx(HelpIcon, { className: "tw-text-grey-600" }) : null] }), jsxRuntime.jsx("div", { className: cn('tw-flex tw-h-squid-l tw-items-center tw-justify-center tw-rounded-squid-xs', transparentControls ? '' : 'tw-bg-grey-800'), children: controls })] }));
3121
+ }
3122
+
3123
+ function SwapDetailListItem({ label, detail, icon, }) {
3124
+ return (jsxRuntime.jsx("li", { className: "tw-swap-detail-list-item-gradient tw-h-squid-l tw-w-full tw-bg-grey-800 tw-px-squid-xs tw-text-grey-300", children: jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-l tw-items-center tw-justify-between tw-gap-squid-xs tw-rounded-squid-xs tw-px-squid-xs", children: [jsxRuntime.jsx("div", { className: "tw-h-6 tw-w-6 tw-text-grey-500", children: icon }), jsxRuntime.jsx(CaptionText, { className: "tw-flex-1 tw-text-grey-500", children: label }), typeof detail === 'string' ? (jsxRuntime.jsx(CaptionText, { children: detail })) : (detail)] }) }));
3125
+ }
3126
+
3127
+ function SwapStepItem({ descriptionBlocks, chipContent, showStepSeparator = false, }) {
3128
+ return (jsxRuntime.jsxs("li", { className: "tw-flex tw-w-list-item-large tw-flex-col tw-items-start tw-bg-grey-800 tw-text-grey-300", children: [showStepSeparator && jsxRuntime.jsx(SwapStepSeparator, {}), jsxRuntime.jsxs("div", { className: "tw-flex tw-w-full tw-items-center tw-text-royal-400", children: [jsxRuntime.jsx("span", { className: "tw-relative tw-flex tw-min-h-squid-l tw-items-center tw-justify-center tw-gap-squid-xxs tw-px-squid-xs", children: jsxRuntime.jsx(Chip, { className: "tw-w-squid-xl tw-bg-royal-400 tw-text-grey-900", icon: typeof chipContent === 'string' ? (jsxRuntime.jsx(CaptionText, { children: chipContent })) : (chipContent) }) }), jsxRuntime.jsx("div", { className: "tw-flex tw-min-h-squid-l tw-flex-1 tw-flex-wrap tw-items-center tw-justify-start tw-gap-squid-xxs tw-py-squid-xxs", children: descriptionBlocks.map(({ type, value }, index) => {
3129
+ if (type === 'string') {
3130
+ return (
3131
+ // Instead of displaying the string into a single <BodyText />
3132
+ // we split it into multiple <BodyText />
3133
+ // for edge case where the string is too long to fit in one line
3134
+ value
3135
+ .trim()
3136
+ .split(' ')
3137
+ .map((word, i) => (jsxRuntime.jsx(BodyText, { size: "small", className: "tw-leading-[20px]", children: word }, i))));
3138
+ }
3139
+ else if (type === 'image') {
3140
+ return (jsxRuntime.jsx("img", { src: value, className: "tw-h-squid-m tw-w-squid-m tw-rounded-full" }, index));
3141
+ }
3142
+ return null;
3143
+ }) })] })] }));
3144
+ }
3145
+
3146
+ function SwapStepsCollapsed({ steps, currentStepCount: _currentStepCount, }) {
3147
+ // handles if route component is mounted
3148
+ const [isRouteVisible, setIsRouteVisible] = react.useState(false);
3149
+ const currentStepCount = Math.round(_currentStepCount);
3150
+ // handles if route component is animating to show
3151
+ const [isShowRouteAnimationRunning, setIsShowRouteAnimationRunning] = react.useState(false);
3152
+ const currentStep = steps[currentStepCount - 1];
3153
+ const isLastStep = currentStepCount === steps.length;
3154
+ const isFirstStep = currentStepCount === 1;
3155
+ react.useEffect(() => {
3156
+ // we do not want to unmount the route component if the animation to show route is running
3157
+ if (isShowRouteAnimationRunning)
3158
+ return;
3159
+ // unmount route component when the animation of hiding is done
3160
+ const timeoutId = setTimeout(() => {
3161
+ setIsRouteVisible(false);
3162
+ }, 350);
3163
+ return () => {
3164
+ clearTimeout(timeoutId);
3165
+ };
3166
+ }, [isShowRouteAnimationRunning]);
3167
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Tooltip, { tooltipContent: "View route", tooltipWidth: "max", containerClassName: "tw-w-full tw-rounded-full", childrenClassName: "tw-w-full tw-rounded-full", children: jsxRuntime.jsxs("button", { onClick: () => {
3168
+ // mount route component and start animation
3169
+ setIsRouteVisible(true);
3170
+ setIsShowRouteAnimationRunning(true);
3171
+ }, className: "tw-relative tw-flex tw-min-h-button tw-w-full tw-items-center tw-overflow-hidden tw-rounded-squid-xxl tw-border tw-border-material-light-thin tw-bg-grey-800 tw-px-squid-xs tw-text-grey-300", children: [!isLastStep && (jsxRuntime.jsxs("span", { className: "tw-absolute -tw-top-1.5", children: [jsxRuntime.jsx("span", { className: "tw-absolute tw-top-1 tw-h-full tw-w-full -tw-translate-x-1/2 tw-bg-gradient-to-b tw-from-grey-800 tw-to-transparent" }), jsxRuntime.jsx(SwapStepSeparator, {})] })), jsxRuntime.jsx(SwapStepItem, { descriptionBlocks: currentStep.descriptionBlocks, chipContent: currentStep.chipContent }), !isFirstStep && (jsxRuntime.jsxs("span", { className: "tw-absolute -tw-bottom-1.5", children: [jsxRuntime.jsx("span", { className: "tw-absolute tw-bottom-1 tw-h-full tw-w-full -tw-translate-x-1/2 tw-bg-gradient-to-b tw-from-transparent tw-to-grey-800" }), jsxRuntime.jsx(SwapStepSeparator, {})] }))] }) }), isRouteVisible && (jsxRuntime.jsxs("div", { className: cn('tw-absolute tw-top-0 tw-z-20 tw-flex tw-h-[536px] tw-w-full tw-flex-col tw-gap-squid-xxs tw-overflow-hidden tw-rounded-squid-l tw-border tw-border-material-light-thin tw-bg-grey-800', isShowRouteAnimationRunning
3172
+ ? 'tw-animate-slide-to-top'
3173
+ : 'tw-animate-slide-to-bottom'), children: [jsxRuntime.jsx("div", { className: "tw-flex tw-h-[52px] tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-p-squid-xs", children: jsxRuntime.jsx("button", { onClick: () => setIsShowRouteAnimationRunning(false), className: "tw-flex tw-h-squid-xl tw-w-40 tw-items-center tw-justify-center tw-rounded-squid-xs tw-px-10 hover:tw-bg-material-light-thin", children: jsxRuntime.jsx("span", { className: "tw-flex tw-h-8 tw-w-8 tw-items-center tw-justify-center tw-text-grey-300", children: jsxRuntime.jsx(ChevronLargeDownIcon, { size: "32" }) }) }) }), jsxRuntime.jsx("ul", { className: "custom-scrollbar tw-flex tw-w-[400px] tw-flex-1 tw-flex-col-reverse tw-items-center tw-self-stretch tw-overflow-y-auto tw-overflow-x-hidden tw-px-squid-xs", children: steps.map((step, index) => (jsxRuntime.jsx(SwapStepItem, { descriptionBlocks: step.descriptionBlocks, chipContent: step.chipContent, showStepSeparator: !(index === steps.length - 1) }, index))) }), jsxRuntime.jsx("footer", { className: "tw-flex tw-items-end tw-justify-center tw-gap-squid-xs tw-self-stretch tw-p-squid-s", children: jsxRuntime.jsx(Button, { size: "md", variant: "secondary", label: "View on Squidscan", className: "tw-w-full" }) })] }))] }));
3174
+ }
3175
+
3176
+ function TokenPair({ firstToken, secondToken }) {
3177
+ return (jsxRuntime.jsxs("div", { className: "tw-relative tw-h-[42px] tw-w-[94px]", children: [jsxRuntime.jsxs("svg", { width: "94", height: "42", viewBox: "0 0 94 42", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "tw-absolute tw-z-10 tw-text-material-light-average", children: [jsxRuntime.jsx("g", { filter: "url(#filter0_b_457_51391)", children: jsxRuntime.jsx("path", { d: "M58.5042 35.4956L58.5043 35.4957C62.5071 39.4985 67.7544 41.5 73.0001 41.5C84.3219 41.5 93.5 32.3218 93.5 21C93.5 9.67822 84.3219 0.5 73.0001 0.5C67.7544 0.499977 62.5071 2.50151 58.5043 6.50431C57.9743 7.03437 57.4538 7.57007 56.9412 8.09756L56.9403 8.09852C55.2889 9.79812 53.7279 11.4027 52.097 12.5879C50.4734 13.7678 48.8225 14.5 47 14.5C45.1775 14.5 43.5266 13.7678 41.903 12.5879C40.2721 11.4027 38.7111 9.79812 37.0597 8.09852L37.0589 8.09766C36.5463 7.57013 36.0258 7.03441 35.4957 6.50431C31.4929 2.50151 26.2456 0.499977 20.9999 0.5C15.7543 0.500023 10.5071 2.50156 6.50431 6.50431C2.50153 10.5071 0.5 15.7544 0.5 21C0.5 26.2456 2.50153 31.4929 6.50431 35.4957C10.5071 39.4984 15.7543 41.5 20.9999 41.5C26.2456 41.5 31.4929 39.4985 35.4957 35.4957L35.4958 35.4956C36.023 34.968 36.5408 34.4349 37.0508 33.9099L37.0521 33.9086C38.7042 32.2077 40.2665 30.6013 41.8988 29.4147C43.5238 28.2333 45.1763 27.5 47 27.5C48.8237 27.5 50.4762 28.2333 52.1012 29.4147C53.7335 30.6013 55.2958 32.2077 56.9479 33.9086L56.9492 33.9099C57.4592 34.4349 57.977 34.968 58.5042 35.4956Z", stroke: "currentColor" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsxs("filter", { id: "filter0_b_457_51391", x: "-20", y: "-20", width: "134", height: "82", filterUnits: "userSpaceOnUse", "color-interpolation-filters": "sRGB", children: [jsxRuntime.jsx("feFlood", { "flood-opacity": "0", result: "BackgroundImageFix" }), jsxRuntime.jsx("feGaussianBlur", { in: "BackgroundImageFix", stdDeviation: "10" }), jsxRuntime.jsx("feComposite", { in2: "SourceAlpha", operator: "in", result: "effect1_backgroundBlur_457_51391" }), jsxRuntime.jsx("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_backgroundBlur_457_51391", result: "shape" })] }) })] }), jsxRuntime.jsxs("div", { className: "tw-token-pair-mask tw-z-10 tw-flex tw-h-full tw-w-full tw-items-center tw-justify-between", style: {
3178
+ background: `linear-gradient(to right, ${firstToken.bgColor} 43.48%, ${secondToken.bgColor} 56.52%)`,
3179
+ }, children: [jsxRuntime.jsx("img", { className: "tw-ml-[1px] tw-aspect-square tw-w-10", src: firstToken.imageUrl }), jsxRuntime.jsx("img", { className: "tw-mr-[1px] tw-aspect-square tw-w-10", src: secondToken.imageUrl })] })] }));
3180
+ }
3181
+
3034
3182
  /**
3035
3183
  * Parsing the user readable config to css variables with HSL values
3036
3184
  * @param style
@@ -3084,15 +3232,14 @@ function getHexColorFromOpacityPercentage(color, opacity) {
3084
3232
  .padStart(2, '0')).toUpperCase();
3085
3233
  }
3086
3234
 
3087
- const squidConfigContext = react.createContext(undefined);
3088
- function SquidConfigProvider({ theme, children, }) {
3089
- const Provider = squidConfigContext.Provider;
3235
+ function SquidConfigProvider({ theme, children, themeType = 'light', }) {
3090
3236
  const parsedStyle = getParsedStyle(theme);
3091
- return (jsxRuntime.jsx(Provider, { value: theme, children: jsxRuntime.jsx("div", { style: parsedStyle, className: clsx('tw-text-base-content tw-relative tw-font-geist'), children: children }) }));
3237
+ return (jsxRuntime.jsx("div", { style: parsedStyle, "data-squid-theme-type": themeType, className: clsx('tw-text-base-content tw-group tw-relative tw-font-geist'), children: children }));
3092
3238
  }
3093
3239
 
3094
3240
  exports.AddressButton = AddressButton;
3095
3241
  exports.ArrowButton = ArrowButton;
3242
+ exports.AssetsButton = AssetsButton;
3096
3243
  exports.BadgeImage = BadgeImage;
3097
3244
  exports.BodyText = BodyText;
3098
3245
  exports.Boost = Boost;
@@ -3101,7 +3248,6 @@ exports.Button = Button;
3101
3248
  exports.CaptionText = CaptionText;
3102
3249
  exports.Chip = Chip;
3103
3250
  exports.DetailsToolbar = DetailsToolbar;
3104
- exports.Dropdown = Dropdown;
3105
3251
  exports.DropdownMenuItem = DropdownMenuItem;
3106
3252
  exports.FeeButton = FeeButton;
3107
3253
  exports.HeadingText = HeadingText;
@@ -3114,9 +3260,18 @@ exports.Modal = Modal;
3114
3260
  exports.NavigationBar = NavigationBar;
3115
3261
  exports.ProductCard = ProductCard;
3116
3262
  exports.SectionTitle = SectionTitle;
3263
+ exports.SettingsButton = SettingsButton;
3264
+ exports.SettingsItem = SettingsItem;
3265
+ exports.SettingsSlider = SettingsSlider;
3117
3266
  exports.SquidConfigProvider = SquidConfigProvider;
3118
3267
  exports.SwapConfiguration = SwapConfiguration;
3268
+ exports.SwapDetailListItem = SwapDetailListItem;
3269
+ exports.SwapProgressViewHeader = SwapProgressViewHeader;
3270
+ exports.SwapStepItem = SwapStepItem;
3271
+ exports.SwapStepsCollapsed = SwapStepsCollapsed;
3119
3272
  exports.Switch = Switch;
3273
+ exports.TokenPair = TokenPair;
3120
3274
  exports.Tooltip = Tooltip;
3121
3275
  exports.UsdAmount = UsdAmount;
3122
3276
  exports.WalletAddress = WalletAddress;
3277
+ exports.useModal = useModal;