@0xsquid/ui 2.6.3 → 2.6.5

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 (49) hide show
  1. package/dist/cjs/index.js +333 -148
  2. package/dist/cjs/types/components/buttons/Button.d.ts +4 -1
  3. package/dist/cjs/types/components/buttons/Chip.d.ts +1 -1
  4. package/dist/cjs/types/components/controls/LargeNumericInput.d.ts +6 -0
  5. package/dist/cjs/types/components/controls/NumericInput.d.ts +2 -1
  6. package/dist/cjs/types/components/controls/Switch.d.ts +1 -1
  7. package/dist/cjs/types/components/controls/index.d.ts +2 -1
  8. package/dist/cjs/types/components/icons/Generic.d.ts +8 -0
  9. package/dist/cjs/types/components/layout/AnimationWrapper.d.ts +3 -0
  10. package/dist/cjs/types/components/layout/ModalTitle.d.ts +5 -0
  11. package/dist/cjs/types/components/layout/SwapConfiguration.d.ts +3 -1
  12. package/dist/cjs/types/components/layout/index.d.ts +1 -0
  13. package/dist/cjs/types/components/lists/ListItem.d.ts +4 -1
  14. package/dist/cjs/types/core/utils.d.ts +7 -0
  15. package/dist/cjs/types/hooks/useColorFromSeed.d.ts +1 -0
  16. package/dist/cjs/types/stories/buttons/AssetsButton.stories.d.ts +1 -0
  17. package/dist/cjs/types/stories/buttons/Button.stories.d.ts +30 -15
  18. package/dist/cjs/types/stories/buttons/Chip.stories.d.ts +2 -1
  19. package/dist/cjs/types/stories/controls/Switch.stories.d.ts +5 -3
  20. package/dist/cjs/types/stories/lists/ListItem.stories.d.ts +3 -0
  21. package/dist/cjs/types/types/components.d.ts +1 -1
  22. package/dist/cjs/types/types/config.d.ts +3 -3
  23. package/dist/cjs/types/types/index.d.ts +1 -1
  24. package/dist/esm/index.js +329 -150
  25. package/dist/esm/types/components/buttons/Button.d.ts +4 -1
  26. package/dist/esm/types/components/buttons/Chip.d.ts +1 -1
  27. package/dist/esm/types/components/controls/LargeNumericInput.d.ts +6 -0
  28. package/dist/esm/types/components/controls/NumericInput.d.ts +2 -1
  29. package/dist/esm/types/components/controls/Switch.d.ts +1 -1
  30. package/dist/esm/types/components/controls/index.d.ts +2 -1
  31. package/dist/esm/types/components/icons/Generic.d.ts +8 -0
  32. package/dist/esm/types/components/layout/AnimationWrapper.d.ts +3 -0
  33. package/dist/esm/types/components/layout/ModalTitle.d.ts +5 -0
  34. package/dist/esm/types/components/layout/SwapConfiguration.d.ts +3 -1
  35. package/dist/esm/types/components/layout/index.d.ts +1 -0
  36. package/dist/esm/types/components/lists/ListItem.d.ts +4 -1
  37. package/dist/esm/types/core/utils.d.ts +7 -0
  38. package/dist/esm/types/hooks/useColorFromSeed.d.ts +1 -0
  39. package/dist/esm/types/stories/buttons/AssetsButton.stories.d.ts +1 -0
  40. package/dist/esm/types/stories/buttons/Button.stories.d.ts +30 -15
  41. package/dist/esm/types/stories/buttons/Chip.stories.d.ts +2 -1
  42. package/dist/esm/types/stories/controls/Switch.stories.d.ts +5 -3
  43. package/dist/esm/types/stories/lists/ListItem.stories.d.ts +3 -0
  44. package/dist/esm/types/types/components.d.ts +1 -1
  45. package/dist/esm/types/types/config.d.ts +3 -3
  46. package/dist/esm/types/types/index.d.ts +1 -1
  47. package/dist/index.css +1 -1
  48. package/dist/index.d.ts +51 -20
  49. package/package.json +1 -1
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
- import React__default$1, { useState, createContext, useContext, useMemo, useRef, useEffect, useLayoutEffect, useInsertionEffect, useCallback, forwardRef, Fragment as Fragment$1, createElement, useId as useId$1, Component, cloneElement, Children, isValidElement, useImperativeHandle } from 'react';
3
+ import React__default$1, { useState, createContext, useContext, useMemo, useRef, useEffect, useCallback, useLayoutEffect, useInsertionEffect, forwardRef, Fragment as Fragment$1, createElement, useId as useId$1, Component, cloneElement, Children, isValidElement, useImperativeHandle } from 'react';
4
4
 
5
5
  const CSS_VARS = {
6
6
  MOVE_WITH_SPRING_BOUNCE_DURATION: "--squid-animation-move-with-spring-bounce-duration",
@@ -97,6 +97,13 @@ const THEME_COLOR_KEYS = [
97
97
  "button-md-secondary-text",
98
98
  "button-md-tertiary-bg",
99
99
  "button-md-tertiary-text",
100
+ // sm button variant colors
101
+ "button-sm-primary-bg",
102
+ "button-sm-primary-text",
103
+ "button-sm-secondary-bg",
104
+ "button-sm-secondary-text",
105
+ "button-sm-tertiary-bg",
106
+ "button-sm-tertiary-text",
100
107
  // input colors
101
108
  "input-placeholder",
102
109
  "input-text",
@@ -126,12 +133,18 @@ const THEME_COLOR_KEYS = [
126
133
  "material-light-blend-grey-800",
127
134
  ];
128
135
  const THEME_BORDER_RADIUS_KEYS = [
136
+ // lg button
129
137
  "button-lg-primary",
130
138
  "button-lg-secondary",
131
139
  "button-lg-tertiary",
140
+ // md button
132
141
  "button-md-primary",
133
142
  "button-md-secondary",
134
143
  "button-md-tertiary",
144
+ // sm button
145
+ "button-sm-primary",
146
+ "button-sm-secondary",
147
+ "button-sm-tertiary",
135
148
  "container",
136
149
  "input",
137
150
  "menu-sm",
@@ -2933,6 +2946,19 @@ function mapToCssVariables(obj) {
2933
2946
  return acc;
2934
2947
  }, {});
2935
2948
  }
2949
+ /**
2950
+ * Simple hash function to create a deterministic index from a given string.
2951
+ * @param {string} str - The input string to hash.
2952
+ * @param {number} max - The maximum value for the hash.
2953
+ * @returns {number} - The index within the array.
2954
+ */
2955
+ function hashStringToIndex(str, max) {
2956
+ let index = 0;
2957
+ for (let i = 0; i < str.length; i++) {
2958
+ index = (index * 31 + str.charCodeAt(i)) % max;
2959
+ }
2960
+ return index;
2961
+ }
2936
2962
 
2937
2963
  const spacing$1 = {
2938
2964
  "squid-xxs": "0.3125rem", // 5px
@@ -3327,12 +3353,18 @@ const defaultFontFamily = {
3327
3353
  "squid-main": "Geist, sans-serif",
3328
3354
  };
3329
3355
  const defaultBorderRadius = {
3356
+ // lg button
3330
3357
  "button-lg-primary": spacing$1["squid-xxl"],
3331
3358
  "button-lg-secondary": spacing$1["squid-xxl"],
3332
3359
  "button-lg-tertiary": spacing$1["squid-xxl"],
3360
+ // md button
3333
3361
  "button-md-primary": spacing$1["squid-m"],
3334
3362
  "button-md-secondary": spacing$1["squid-m"],
3335
3363
  "button-md-tertiary": spacing$1["squid-m"],
3364
+ // sm button
3365
+ "button-sm-primary": spacing$1["squid-m"],
3366
+ "button-sm-secondary": spacing$1["squid-m"],
3367
+ "button-sm-tertiary": spacing$1["squid-m"],
3336
3368
  container: spacing$1["squid-l"],
3337
3369
  input: "9999px",
3338
3370
  "menu-sm": spacing$1["squid-s"],
@@ -3374,18 +3406,27 @@ const lightTheme = {
3374
3406
  "animation-bg": "#B893EC",
3375
3407
  "animation-text": "#FBFBFD",
3376
3408
  // buttons
3409
+ // lg button
3377
3410
  "button-lg-primary-bg": "#B893EC",
3378
3411
  "button-lg-primary-text": "#FBFBFD",
3379
3412
  "button-lg-secondary-bg": "#17191C",
3380
3413
  "button-lg-secondary-text": "#EDEEF3",
3381
3414
  "button-lg-tertiary-bg": "#EDEEF3",
3382
3415
  "button-lg-tertiary-text": "#292C32",
3416
+ // md button
3383
3417
  "button-md-primary-bg": "#B893EC",
3384
3418
  "button-md-primary-text": "#FBFBFD",
3385
3419
  "button-md-secondary-bg": "#17191C",
3386
3420
  "button-md-secondary-text": "#EDEEF3",
3387
3421
  "button-md-tertiary-bg": "#EDEEF3",
3388
3422
  "button-md-tertiary-text": "#292C32",
3423
+ // sm button
3424
+ "button-sm-primary-bg": "#B893EC",
3425
+ "button-sm-primary-text": "#FBFBFD",
3426
+ "button-sm-secondary-bg": "#17191C",
3427
+ "button-sm-secondary-text": "#EDEEF3",
3428
+ "button-sm-tertiary-bg": "#EDEEF3",
3429
+ "button-sm-tertiary-text": "#292C32",
3389
3430
  // input
3390
3431
  "input-bg": "#FBFBFD",
3391
3432
  "input-placeholder": "#A7ABBE",
@@ -3434,18 +3475,27 @@ const darkTheme = {
3434
3475
  "animation-bg": "#9E79D2",
3435
3476
  "animation-text": "#FBFBFD",
3436
3477
  // buttons
3478
+ // lg button
3437
3479
  "button-lg-primary-bg": "#9E79D2",
3438
3480
  "button-lg-primary-text": "#FBFBFD",
3439
3481
  "button-lg-secondary-bg": "#FBFBFD",
3440
3482
  "button-lg-secondary-text": "#292C32",
3441
3483
  "button-lg-tertiary-bg": "#292C32",
3442
3484
  "button-lg-tertiary-text": "#D1D6E0",
3485
+ // md button
3443
3486
  "button-md-primary-bg": "#9E79D2",
3444
3487
  "button-md-primary-text": "#FBFBFD",
3445
3488
  "button-md-secondary-bg": "#FBFBFD",
3446
3489
  "button-md-secondary-text": "#292C32",
3447
3490
  "button-md-tertiary-bg": "#292C32",
3448
3491
  "button-md-tertiary-text": "#D1D6E0",
3492
+ // sm button
3493
+ "button-sm-primary-bg": "#9E79D2",
3494
+ "button-sm-primary-text": "#FBFBFD",
3495
+ "button-sm-secondary-bg": "#FBFBFD",
3496
+ "button-sm-secondary-text": "#292C32",
3497
+ "button-sm-tertiary-bg": "#292C32",
3498
+ "button-sm-tertiary-text": "#D1D6E0",
3449
3499
  // input
3450
3500
  "input-bg": "#17191C",
3451
3501
  "input-placeholder": "#676B7E",
@@ -3524,7 +3574,7 @@ const boxShadowClassMap = {
3524
3574
  xlarge: "tw-shadow-elevation-light-2",
3525
3575
  xxlarge: "tw-shadow-elevation-dark-1",
3526
3576
  };
3527
- const roundedClassMap$1 = {
3577
+ const roundedClassMap = {
3528
3578
  xxs: "tw-rounded-squid-xxs",
3529
3579
  xs: "tw-rounded-squid-xs",
3530
3580
  s: "tw-rounded-squid-s",
@@ -3553,7 +3603,7 @@ const borderClassMap = {
3553
3603
  };
3554
3604
  function Image$1(_a) {
3555
3605
  var { src, size = "medium", className: propsClassName, placeholderImageUrl, border = "none", rounded = "xxs", shadow = false, children, containerProps } = _a, props = __rest$1(_a, ["src", "size", "className", "placeholderImageUrl", "border", "rounded", "shadow", "children", "containerProps"]);
3556
- const className = cn("tw-object-cover tw-aspect-square tw-relative tw-duration-300 tw-transition-[width,height] tw-max-w-full tw-bg-grey-500", sizeClassMap$1[size], propsClassName, roundedClassMap$1[rounded], shadow && boxShadowClassMap[size], borderClassMap[border]);
3606
+ const className = cn("tw-object-cover tw-aspect-square tw-relative tw-duration-300 tw-transition-[width,height] tw-max-w-full tw-bg-grey-500", sizeClassMap$1[size], propsClassName, roundedClassMap[rounded], shadow && boxShadowClassMap[size], borderClassMap[border]);
3557
3607
  const [imageState, setImageState] = useState(ImageState.LOADED);
3558
3608
  return (jsxs("div", Object.assign({}, containerProps, { className: cn("tw-relative", containerProps === null || containerProps === void 0 ? void 0 : containerProps.className), children: [border === "gradient" && (jsx("span", { style: {
3559
3609
  borderRadius: gradientRoundedClassMap[rounded],
@@ -4012,6 +4062,12 @@ function ArrowExpandIcon({ className, size = "24", }) {
4012
4062
  function MoneyBagIcon({ className, size = "24", }) {
4013
4063
  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: "M9.5 8H14.5M9.5 8C9.5 8 3.99996 11 4 16C4.00003 20.0207 7.97931 21 12 21C16.0207 21 20 20.0207 20 16C20 11 14.5 8 14.5 8M9.5 8L8.55725 5.48601C8.23089 4.6157 8.56249 3.64123 9.45158 3.37016C10.1074 3.1702 10.9686 3 12 3C13.0314 3 13.8926 3.1702 14.5484 3.37016C15.4375 3.64123 15.7691 4.6157 15.4427 5.48601L14.5 8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
4014
4064
  }
4065
+ function PluginIcon({ size = "16", className, }) {
4066
+ 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 1.99998C6.66675 1.63179 6.36827 1.33331 6.00008 1.33331C5.63189 1.33331 5.33341 1.63179 5.33341 1.99998V3.99998H4.66675C3.56218 3.99998 2.66675 4.89541 2.66675 5.99998V9.33331C2.66675 11.1743 4.15913 12.6666 6.00008 12.6666H7.33341V14C7.33341 14.3682 7.63189 14.6666 8.00008 14.6666C8.36827 14.6666 8.66675 14.3682 8.66675 14V12.6666H10.0001C11.841 12.6666 13.3334 11.1743 13.3334 9.33331V5.99998C13.3334 4.89541 12.438 3.99998 11.3334 3.99998H10.6667V1.99998C10.6667 1.63179 10.3683 1.33331 10.0001 1.33331C9.63189 1.33331 9.33341 1.63179 9.33341 1.99998V3.99998H6.66675V1.99998Z", fill: "currentColor" }) }));
4067
+ }
4068
+ function CircleCheckIcon({ className, size = "24", }) {
4069
+ 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", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM15.774 10.1333C16.1237 9.70582 16.0607 9.0758 15.6332 8.72607C15.2058 8.37635 14.5758 8.43935 14.226 8.86679L10.4258 13.5116L9.20711 12.2929C8.81658 11.9024 8.18342 11.9024 7.79289 12.2929C7.40237 12.6834 7.40237 13.3166 7.79289 13.7071L9.79289 15.7071C9.99267 15.9069 10.2676 16.0129 10.5498 15.9988C10.832 15.9847 11.095 15.8519 11.274 15.6333L15.774 10.1333Z", fill: "currentColor" }) }));
4070
+ }
4015
4071
 
4016
4072
  function EmptyHeartIcon({ className }) {
4017
4073
  return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", className: className, children: jsx("path", { d: "M21 10C21 15.75 12.75 20 12 20C11.25 20 3 15.75 3 10C3 6 5.5 4 8 4C10.5 4 12 5.5 12 5.5C12 5.5 13.5 4 16 4C18.5 4 21 6 21 10Z", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" }) }));
@@ -4375,19 +4431,28 @@ function ImageStack(_a) {
4375
4431
 
4376
4432
  function Chip(_a) {
4377
4433
  var { label, icon } = _a, props = __rest$1(_a, ["label", "icon"]);
4378
- return (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 ? (jsx(CaptionText, { className: "tw-min-w-squid-xl tw-text-nowrap tw-px-squid-xxs tw-text-center", children: label })) : (icon) })));
4434
+ const isInteractive = !!props.onClick;
4435
+ const ChipTag = isInteractive ? "button" : "div";
4436
+ return (jsx(ChipTag, 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", isInteractive && "hover:tw-bg-grey-300", props.className), children: label ? (jsx(CaptionText, { className: "tw-min-w-squid-xl tw-text-nowrap tw-px-squid-xxs tw-text-center", children: label })) : (icon) })));
4379
4437
  }
4380
4438
 
4439
+ const loaderSizeMap = {
4440
+ sm: "16px",
4441
+ md: "24px",
4442
+ lg: "36px",
4443
+ };
4381
4444
  const baseButtonClassName = "tw-border tw-relative tw-overflow-hidden tw-group/base-button tw-flex tw-items-center tw-justify-center";
4382
4445
  const buttonWidthClassnameMap = {
4446
+ sm: "tw-w-max",
4383
4447
  md: "tw-min-w-[60px]",
4384
4448
  lg: "tw-w-full",
4385
4449
  };
4386
4450
  const buttonSizeClassMap = {
4387
4451
  md: "tw-px-squid-xs tw-py-squid-xxs tw-h-squid-xl",
4388
4452
  lg: "tw-p-1 tw-h-button",
4453
+ sm: "tw-h-squid-l tw-px-squid-xs",
4389
4454
  };
4390
- const roundedClassMap = {
4455
+ const buttonRoundedClassMap = {
4391
4456
  lg: {
4392
4457
  primary: "tw-rounded-button-lg-primary",
4393
4458
  secondary: "tw-rounded-button-lg-secondary",
@@ -4398,6 +4463,11 @@ const roundedClassMap = {
4398
4463
  secondary: "tw-rounded-button-md-secondary",
4399
4464
  tertiary: "tw-rounded-button-md-tertiary",
4400
4465
  },
4466
+ sm: {
4467
+ primary: "tw-rounded-button-sm-primary",
4468
+ secondary: "tw-rounded-button-sm-secondary",
4469
+ tertiary: "tw-rounded-button-sm-tertiary",
4470
+ },
4401
4471
  };
4402
4472
  const buttonVariantClassMap = {
4403
4473
  lg: {
@@ -4410,22 +4480,24 @@ const buttonVariantClassMap = {
4410
4480
  secondary: "tw-bg-button-md-secondary-bg tw-text-button-md-secondary-text",
4411
4481
  tertiary: "tw-bg-button-md-tertiary-bg tw-text-button-md-tertiary-text",
4412
4482
  },
4483
+ sm: {
4484
+ primary: "tw-bg-button-sm-primary-bg tw-text-button-sm-primary-text",
4485
+ secondary: "tw-bg-button-sm-secondary-bg tw-text-button-sm-secondary-text",
4486
+ tertiary: "tw-bg-button-sm-tertiary-bg tw-text-button-sm-tertiary-text",
4487
+ },
4413
4488
  };
4414
4489
  // right now all variants have the same disabled styles
4415
4490
  // in the future, we can add more disabled styles for different variants
4416
4491
  const buttonDisabledClass = "!tw-bg-grey-800 !tw-text-grey-600 tw-cursor-not-allowed";
4417
4492
  const loadingClassname = "tw-invisible tw-opacity-0";
4418
4493
  function Button$1(_a) {
4419
- var { label, disabled = false, size, variant, icon, link, isLoading = false, showLoader = false, chip, containerClassName, anchorRef, buttonRef } = _a, props = __rest$1(_a, ["label", "disabled", "size", "variant", "icon", "link", "isLoading", "showLoader", "chip", "containerClassName", "anchorRef", "buttonRef"]);
4494
+ var { label, disabled = false, size, variant, icon, link, isLoading = false, showLoader = false, loaderSize = "md", chip, containerClassName, anchorRef, buttonRef } = _a, props = __rest$1(_a, ["label", "disabled", "size", "variant", "icon", "link", "isLoading", "showLoader", "loaderSize", "chip", "containerClassName", "anchorRef", "buttonRef"]);
4420
4495
  const chipElement = chip != null ? (jsx(Chip, Object.assign({}, chip, { className: cn("tw-absolute -tw-right-squid-xxs -tw-top-squid-xxs tw-z-10", chip.className) }))) : null;
4421
- const children = (jsxs(Fragment, { children: [!disabled && !isLoading && (jsx(ButtonHoverOverlay, { className: roundedClassMap[size][variant] })), jsx("div", { className: "tw-relative tw-z-[5] tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs", children: label == null && icon == null ? (props.children) : size === "lg" ? (jsxs("span", { className: "tw-flex tw-items-center tw-justify-center tw-gap-squid-xs tw-px-squid-m", children: [showLoader && jsx(Loader, {}), jsx(BodyText, { className: isLoading ? loadingClassname : "", size: "medium", children: label })] })) : size === "md" ? (label != null && icon == null ? (
4422
- // label only
4423
- jsx(BodyText, { className: isLoading ? loadingClassname : "", size: "small", children: label })) : label == null && icon != null ? (
4424
- // icon only
4425
- isLoading ? null : (icon)) : (
4426
- // icon and label
4427
- jsxs(Fragment, { children: [icon, jsx(BodyText, { className: "tw-pr-1", size: "small", children: label })] }))) : null })] }));
4428
- const className = cn(baseButtonClassName, buttonSizeClassMap[size], buttonWidthClassnameMap[size], buttonVariantClassMap[size][variant], "tw-border-material-light-thin", !disabled && !isLoading && "hover:tw-border-material-light-average", roundedClassMap[size][variant],
4496
+ const children = (jsxs(Fragment, { children: [!disabled && !isLoading && (jsx(ButtonHoverOverlay, { className: buttonRoundedClassMap[size][variant] })), jsx("div", { className: "tw-relative tw-z-[5] tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs", children: label == null && icon == null && !showLoader ? (props.children) : (jsxs("span", { className: cn("tw-flex tw-items-center tw-justify-center", size === "lg"
4497
+ ? "tw-gap-squid-xs tw-px-squid-m"
4498
+ : "tw-gap-squid-xxs"), children: [showLoader && jsx(Loader, { size: loaderSizeMap[loaderSize] }), !isLoading && icon, label != null &&
4499
+ (size === "sm" ? (jsx(CaptionText, { className: cn(isLoading && loadingClassname, icon != null && "tw-pr-1"), children: label })) : (jsx(BodyText, { className: cn(isLoading && loadingClassname, icon != null && "tw-pr-1"), size: size === "lg" ? "medium" : "small", children: label })))] })) })] }));
4500
+ const className = cn(baseButtonClassName, buttonSizeClassMap[size], buttonWidthClassnameMap[size], buttonVariantClassMap[size][variant], "tw-border-material-light-thin", !disabled && !isLoading && "hover:tw-border-material-light-average", buttonRoundedClassMap[size][variant],
4429
4501
  // disabled styles
4430
4502
  disabled && buttonDisabledClass, isLoading && "tw-cursor-not-allowed",
4431
4503
  // custom classes from props
@@ -4443,7 +4515,7 @@ function Button$1(_a) {
4443
4515
  const ButtonHoverOverlay = ({ className }) => {
4444
4516
  return (jsx("span", { className: cn("tw-absolute tw-inset-0 tw-z-0 tw-hidden tw-h-full tw-w-full tw-bg-material-light-thin group-hover/base-button:tw-block", className) }));
4445
4517
  };
4446
- const ButtonWrapper = ({ children, size, variant, className, }) => (jsx("div", { className: cn("tw-relative", buttonWidthClassnameMap[size], roundedClassMap[size][variant], className), children: children }));
4518
+ const ButtonWrapper = ({ children, size, variant, className, }) => (jsx("div", { className: cn("tw-relative", buttonWidthClassnameMap[size], buttonRoundedClassMap[size][variant], className), children: children }));
4447
4519
 
4448
4520
  function AccountsButton(_a) {
4449
4521
  var { imageUrls } = _a, props = __rest$1(_a, ["imageUrls"]);
@@ -4469,6 +4541,26 @@ function ArrowButton(_a) {
4469
4541
  "aria-disabled:tw-bg-grey-600 aria-disabled:tw-text-grey-800"), children: jsx(ArrowRightIcon, {}) })] })));
4470
4542
  }
4471
4543
 
4544
+ const colors = [
4545
+ "#D94E41",
4546
+ "#E58845",
4547
+ "#D9BA21",
4548
+ "#B1CC29",
4549
+ "#66CC33",
4550
+ "#19A654",
4551
+ "#56BFB6",
4552
+ "#45B0E5",
4553
+ "#3973E5",
4554
+ "#7562D9",
4555
+ "#B167E5",
4556
+ "#E573BF",
4557
+ ];
4558
+ function useColorFromSeed(seed) {
4559
+ return useMemo(() => {
4560
+ return colors[hashStringToIndex(seed, colors.length)];
4561
+ }, [seed]);
4562
+ }
4563
+
4472
4564
  function Input(_a) {
4473
4565
  var { placeholder = "Search", showIcon = true, className, icon, isError = false, isWarning = false, containerClassName, actionButtonProps, autoFocusTimeout, inputRef: inputRefProp } = _a, props = __rest$1(_a, ["placeholder", "showIcon", "className", "icon", "isError", "isWarning", "containerClassName", "actionButtonProps", "autoFocusTimeout", "inputRef"]);
4474
4566
  const showActionButton = actionButtonProps != null;
@@ -4491,6 +4583,40 @@ const InputActionButton = ({ onClick, variant = "tertiary", label = "Paste", })
4491
4583
  return (jsx(Button$1, { size: "md", variant: variant, onClick: onClick, className: "!tw-h-[30px] !tw-w-fit !tw-min-w-0 !tw-rounded-input", children: jsx(CaptionText, { children: label }) }));
4492
4584
  };
4493
4585
 
4586
+ const placeholder = "0";
4587
+ const suggestedAmounts = ["100", "500", "1000"];
4588
+ function LargeNumericInput({ onChange, value }) {
4589
+ const inputRef = useRef(null);
4590
+ const inputValueSpyRef = useRef(null);
4591
+ useEffect(() => {
4592
+ const observer = new ResizeObserver((entries) => {
4593
+ var _a;
4594
+ if (!inputRef.current)
4595
+ return;
4596
+ // update input width to match the width of the invisible span
4597
+ // this is needed to center the input
4598
+ inputRef.current.style.width = `${(_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect.width}px`;
4599
+ });
4600
+ if (inputValueSpyRef.current) {
4601
+ observer.observe(inputValueSpyRef.current);
4602
+ }
4603
+ return () => {
4604
+ observer.disconnect();
4605
+ };
4606
+ }, []);
4607
+ const handleInputChange = useCallback((event) => {
4608
+ // Replace commas with dots
4609
+ const value = event.target.value.replace(/,/g, ".");
4610
+ // Check that the input value is a valid number
4611
+ const isValidAmount = /^\d*\.?\d{0,6}$/.test(value);
4612
+ if (isValidAmount)
4613
+ onChange(value || "");
4614
+ }, [onChange]);
4615
+ return (jsxs("section", { className: "tw-flex tw-flex-1 tw-flex-col tw-items-center tw-justify-center tw-self-stretch tw-px-squid-l tw-pb-squid-m", children: [jsxs("div", { className: "tw-relative tw-flex tw-w-full tw-flex-1 tw-items-center tw-justify-center tw-self-stretch tw-text-7xl tw-text-royal-500", children: [jsx("span", { ref: inputValueSpyRef, className: "tw-pointer-events-none tw-absolute tw-opacity-0", children: value || placeholder }), jsx("span", { children: "$" }), jsx("input", { inputMode: "decimal", pattern: "[0-9.,]*", ref: inputRef, value: value, onChange: handleInputChange, className: "tw-max-w-full tw-bg-transparent tw-placeholder-royal-500 tw-outline-none focus:tw-outline-none", placeholder: placeholder })] }), jsx("footer", { className: "tw-flex tw-h-squid-m tw-items-center tw-justify-center tw-gap-squid-xxs tw-self-stretch", children: suggestedAmounts.map((amount) => (jsx(Chip, { label: `$${amount}`, onClick: () => {
4616
+ onChange(amount);
4617
+ } }, amount))) })] }));
4618
+ }
4619
+
4494
4620
  /*
4495
4621
  * bignumber.js v9.1.2
4496
4622
  * A JavaScript library for arbitrary-precision arithmetic.
@@ -8619,6 +8745,12 @@ const AnimationWrapper = (playerProps) => {
8619
8745
  }, []);
8620
8746
  return (jsx("div", { id: "squid-lottie-animation", className: clsx("tw-h-full [&>*]:tw-h-full", "tw-transition-all", display ? "tw-opacity-100" : "tw-opacity-0"), children: showAnimation && jsx(Player, Object.assign({}, playerProps)) }));
8621
8747
  };
8748
+ function AnimationCard({ children }) {
8749
+ return (jsx("div", { className: "tw-flex tw-h-[130px] tw-w-full tw-items-center tw-justify-center tw-rounded-tl-modal tw-rounded-tr-modal tw-bg-animation-bg tw-py-squid-s tw-text-material-light-thin mobile-xs-height:tw-h-[160px]", style: {
8750
+ // box shadow simulating bottom outline (we do not use css outline because cannot apply it to only one side)
8751
+ boxShadow: "0 1px 0 currentColor",
8752
+ }, children: children }));
8753
+ }
8622
8754
 
8623
8755
  const borderRadiusClassMap = {
8624
8756
  sm: "tw-rounded-menu-sm before:tw-rounded-menu-sm",
@@ -18915,6 +19047,10 @@ function ModalContentDivider() {
18915
19047
  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" }) }));
18916
19048
  }
18917
19049
 
19050
+ function ModalTitle({ title }) {
19051
+ return (jsx("div", { className: "tw-flex tw-h-squid-xxl tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-px-squid-m tw-py-squid-xs", children: jsx(BodyText, { size: "small", children: title }) }));
19052
+ }
19053
+
18918
19054
  function NavigationBar(_a) {
18919
19055
  var { title, displayBackButton = false, logoUrl, transparent = false, displayButtonShadows = false, onBackButtonClick, actions, isLoading = false, subtitle, paddingRight = 0 } = _a, props = __rest$1(_a, ["title", "displayBackButton", "logoUrl", "transparent", "displayButtonShadows", "onBackButtonClick", "actions", "isLoading", "subtitle", "paddingRight"]);
18920
19056
  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
@@ -18972,7 +19108,7 @@ function LogoContainer({ children }) {
18972
19108
  return (jsx("div", { className: "tw-flex tw-h-[60px] tw-w-[60px] tw-items-center tw-justify-center", children: children }));
18973
19109
  }
18974
19110
 
18975
- 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, showNumericInputDetails = true, }) {
19111
+ 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, showNumericInputDetails = true, fullHeight = true, debounceInput = true, }) {
18976
19112
  var _a, _b;
18977
19113
  const isWalletButtonInteractive = !isLoading && !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick);
18978
19114
  const WalletButtonTag = isWalletButtonInteractive ? "button" : "div";
@@ -18981,7 +19117,7 @@ function SwapConfiguration({ amount, tokenPrice = 0, isFetching: isFetchingProp
18981
19117
  !(walletButton === null || walletButton === void 0 ? void 0 : walletButton.disabled) &&
18982
19118
  !!token &&
18983
19119
  (!!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.address) || !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.emptyAddressLabel));
18984
- return (jsxs("section", { className: "tw-relative tw-flex tw-h-full 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", 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" }), showWalletButtonLabel && (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)
19120
+ return (jsxs("section", { className: cn("tw-relative tw-flex tw-w-full tw-flex-col tw-border-t tw-border-t-material-light-thin tw-bg-grey-900 mobile-lg:tw-w-card-large", fullHeight && "tw-h-full tw-pb-squid-m"), 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" }), showWalletButtonLabel && (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)
18985
19121
  ? "tw-text-grey-300"
18986
19122
  : "tw-text-royal-500", children: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
18987
19123
  ? walletButton === null || walletButton === void 0 ? void 0 : walletButton.address
@@ -18996,7 +19132,7 @@ function SwapConfiguration({ amount, tokenPrice = 0, isFetching: isFetchingProp
18996
19132
  }, balance: balance, criticalPriceImpactPercentage: criticalPriceImpactPercentage, error: error, formatIfVerySmall: {
18997
19133
  token: "0.001",
18998
19134
  usd: "0.01",
18999
- }, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: showNumericInputDetails, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading })] }));
19135
+ }, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: showNumericInputDetails, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading, debounceInput: debounceInput })] }));
19000
19136
  }
19001
19137
 
19002
19138
  function AccountListItem({ isConnected, imageUrls = [], imageUrl, badgeUrl, actions, subtitle, title, }) {
@@ -19362,7 +19498,7 @@ const collapsedListItemClassMap = {
19362
19498
  large: "tw-w-[80px]",
19363
19499
  };
19364
19500
  function ListItem(_a) {
19365
- var { itemTitle, mainImageUrl, subtitle, subtitleOnHover, detail, icon, secondaryImageUrl, placeholderImageUrl, size = "large", mainIcon, className, isSelected = false, onDetailClick, showDetailOnHoverOnly, rounded = "xxs", detailButtonClassName, loading, containerProps, compactOnMobile, extraPadding = true, itemsContainerRef, dropdownMenuContent, imageGroup, multilineSubtitle = false } = _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", "imageGroup", "multilineSubtitle"]);
19501
+ var { itemTitle, mainImageUrl, subtitle, subtitleOnHover, detail, icon, secondaryImageUrl, placeholderImageUrl, size = "large", mainIcon, className, isSelected = false, onDetailClick, showDetailOnHoverOnly, rounded = "xxs", detailButtonClassName, loading, containerProps, compactOnMobile, extraPadding = true, itemsContainerRef, dropdownMenuContent, imageGroup, multilineSubtitle = false, control } = _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", "imageGroup", "multilineSubtitle", "control"]);
19366
19502
  const { isDropdownOpen, dropdownRef, openDropdown, closeDropdown, openDropdownButtonRef, itemRef, menuRef, dropdownStyles, } = useDropdownMenu({
19367
19503
  itemsContainerRef,
19368
19504
  });
@@ -19398,9 +19534,11 @@ function ListItem(_a) {
19398
19534
  }
19399
19535
  return null;
19400
19536
  };
19401
- const isInteractive = !!props.onClick;
19402
- const ItemTag = isInteractive ? "button" : "div";
19403
- const itemProps = isInteractive ? props : {};
19537
+ const isInteractive = !!props.onClick || !!control;
19538
+ const ItemTag = isInteractive ? (control ? "label" : "button") : "div";
19539
+ const itemProps = isInteractive
19540
+ ? props
19541
+ : {};
19404
19542
  const handleInteraction = (e) => {
19405
19543
  var _a;
19406
19544
  e.preventDefault();
@@ -19417,9 +19555,9 @@ function ListItem(_a) {
19417
19555
  };
19418
19556
  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", !multilineSubtitle && listItemSizeMap[size], extraPadding && "tw-px-squid-xs", compactOnMobile
19419
19557
  ? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
19420
- : "tw-w-full", className), children: [jsxs(ItemTag, Object.assign({}, itemProps, { onClick: handleItemClick, className: cn("tw-group/list-item tw-peer/list-item tw-relative tw-flex tw-w-full tw-max-w-full tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs", !multilineSubtitle
19558
+ : "tw-w-full", className), children: [jsxs(ItemTag, Object.assign({}, itemProps, { onClick: control == null ? handleItemClick : undefined, className: cn("tw-group/list-item tw-peer/list-item tw-relative tw-flex tw-w-full tw-max-w-full tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs", !multilineSubtitle
19421
19559
  ? "tw-items-center tw-py-squid-xxs"
19422
- : "tw-py-squid-xs", (isSelected || isDropdownOpen) && "tw-bg-material-light-thin", isInteractive && "hover:tw-bg-material-light-thin", isInteractive && "tw-text-left tw-normal-case"), children: [size === "large" ? (jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon !== null && mainIcon !== void 0 ? mainIcon : (imageGroup != null ? (jsx(ImageGroup, { size: "small", imageUrls: imageGroup })) : (jsx(BadgeImage, { image: {
19560
+ : "tw-py-squid-xs", (isSelected || isDropdownOpen) && "tw-bg-material-light-thin", isInteractive && control == null && "hover:tw-bg-material-light-thin", isInteractive && "tw-text-left tw-normal-case"), children: [size === "large" ? (jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon !== null && mainIcon !== void 0 ? mainIcon : (imageGroup != null ? (jsx(ImageGroup, { size: "small", imageUrls: imageGroup })) : (jsx(BadgeImage, { image: {
19423
19561
  src: mainImageUrl,
19424
19562
  placeholderImageUrl,
19425
19563
  size: "xlarge",
@@ -19439,7 +19577,7 @@ function ListItem(_a) {
19439
19577
  : "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: (e) => {
19440
19578
  e.stopPropagation();
19441
19579
  isDropdownOpen ? closeDropdown() : openDropdown();
19442
- }, isActive: isDropdownOpen, className: "tw-z-20 peer-hover/list-item:tw-opacity-100" }))] })), isDropdownOpen && !!dropdownMenuContent ? (jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownStyles, className: cn(!!dropdownStyles &&
19580
+ }, isActive: isDropdownOpen, className: "tw-z-20 peer-hover/list-item:tw-opacity-100" })), control] })), isDropdownOpen && !!dropdownMenuContent ? (jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownStyles, className: cn(!!dropdownStyles &&
19443
19581
  dropdownPositionClassMap$1[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] })));
19444
19582
  }
19445
19583
  const ListItemActionsButton = forwardRef((_a, ref) => {
@@ -27281,7 +27419,7 @@ function NumericInput(_a) {
27281
27419
  var { priceImpactPercentage, balance = "0", error, criticalPriceImpactPercentage = 5, token, onAmountChange, forcedAmount, maxUsdDecimals = 2, formatIfVerySmall = {
27282
27420
  token: "0.001",
27283
27421
  usd: "0.01",
27284
- }, showDetails = true, isLoading = false, direction, inputModeButton, isInteractive = false, balanceButton } = _a, props = __rest$1(_a, ["priceImpactPercentage", "balance", "error", "criticalPriceImpactPercentage", "token", "onAmountChange", "forcedAmount", "maxUsdDecimals", "formatIfVerySmall", "showDetails", "isLoading", "direction", "inputModeButton", "isInteractive", "balanceButton"]);
27422
+ }, showDetails = true, isLoading = false, direction, inputModeButton, isInteractive = false, balanceButton, debounceInput = true } = _a, props = __rest$1(_a, ["priceImpactPercentage", "balance", "error", "criticalPriceImpactPercentage", "token", "onAmountChange", "forcedAmount", "maxUsdDecimals", "formatIfVerySmall", "showDetails", "isLoading", "direction", "inputModeButton", "isInteractive", "balanceButton", "debounceInput"]);
27285
27423
  const [inputValue, setInputValue] = useState("");
27286
27424
  const [userInputType, setUserInputType] = useState(UserInputType.TOKEN);
27287
27425
  const balanceChipClickable = isInteractive && parseFloat(balance) > 0;
@@ -27296,16 +27434,14 @@ function NumericInput(_a) {
27296
27434
  ? safeNewValue
27297
27435
  : convertTokenAmountToUSD(safeNewValue, token.price, maxUsdDecimals);
27298
27436
  setInputValue(formattedAmount);
27299
- }, [userInputType, token.price, direction, token.decimals]);
27437
+ }, [userInputType, token.price, token.decimals]);
27300
27438
  const onBalanceButtonClick = useCallback(() => {
27301
27439
  if (balanceChipClickable) {
27302
27440
  updateInputValue(balance);
27303
27441
  onAmountChange(balance);
27304
27442
  }
27305
- }, [balance, direction, onAmountChange, updateInputValue]);
27306
- const onAmountChangeDebounced = useCallback(debounce$1(onAmountChange, 1000), [
27307
- onAmountChange,
27308
- ]);
27443
+ }, [balance, onAmountChange, updateInputValue]);
27444
+ const onAmountChangeDebounced = useCallback(debounce$1(onAmountChange, debounceInput ? 1000 : 0), [onAmountChange]);
27309
27445
  const handleInputChange = (e) => {
27310
27446
  const value = e.target.value.replace(/,/g, "."); // Replace commas with dots
27311
27447
  const maxDecimalsForInputType = userInputType === UserInputType.TOKEN ? token.decimals : maxUsdDecimals;
@@ -27445,110 +27581,6 @@ function NumericInput(_a) {
27445
27581
  : notInteractiveChipClassName), children: [jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsxs("div", { children: [userInputType === UserInputType.USD && (jsx(CaptionText, { className: "tw-opacity-66", children: "$" })), jsx(CaptionText, { children: balanceFormatted })] }), !(balanceButton === null || balanceButton === void 0 ? void 0 : balanceButton.hideMaxChip) && jsx(Chip, { label: "Max" })] }) }))] }))] }));
27446
27582
  }
27447
27583
 
27448
- function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSelected = false, }) {
27449
- const [isInputVisible, setIsInputVisible] = useState(false);
27450
- const [inputValue, setInputValue] = useState(String(value !== null && value !== void 0 ? value : 0));
27451
- useEffect(() => {
27452
- if (!isInputVisible)
27453
- return;
27454
- const handleOutsideClick = (event) => {
27455
- var _a;
27456
- const clickedElementIsDifferentThanMenu = event.target !== menuRef.current;
27457
- const clickedElementIsDifferentThanSlider = event.target !== sliderRef.current;
27458
- const sliderContainsClickedElement = (_a = sliderRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target);
27459
- const hideInput = clickedElementIsDifferentThanMenu &&
27460
- (!clickedElementIsDifferentThanSlider || !sliderContainsClickedElement);
27461
- if (hideInput) {
27462
- handleCloseInput();
27463
- }
27464
- };
27465
- document.addEventListener("click", handleOutsideClick);
27466
- return () => {
27467
- document.removeEventListener("click", handleOutsideClick);
27468
- };
27469
- }, [isInputVisible]);
27470
- const menuRef = useRef(null);
27471
- const sliderRef = useRef(null);
27472
- const handleSubmit = useCallback((value) => {
27473
- handleCloseInput();
27474
- onChange === null || onChange === void 0 ? void 0 : onChange(value === "" ? undefined : Number(value));
27475
- }, [onChange]);
27476
- const handleKeyDown = useCallback((e) => {
27477
- // block unwanted (but still valid) characters
27478
- if (["e", "E", "+", "-"].includes(e.key)) {
27479
- e.preventDefault();
27480
- return;
27481
- }
27482
- // close input when pressing escape
27483
- if (e.key === "Escape") {
27484
- handleCloseInput();
27485
- }
27486
- }, []);
27487
- const handleOpenInput = useCallback(() => {
27488
- setIsInputVisible(true);
27489
- }, []);
27490
- const handleCloseInput = useCallback(() => {
27491
- setIsInputVisible(false);
27492
- }, []);
27493
- return (jsxs("div", { ref: sliderRef, className: "tw-relative tw-flex tw-h-[30px] tw-items-center tw-justify-center tw-rounded-squid-xs", children: [jsxs("button", { className: cn("tw-relative tw-flex tw-h-full tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-p-squid-xs tw-pr-[40px] tw-text-left tw-text-caption tw-font-caption tw-leading-[10px] -tw-outline-offset-2 placeholder-shown:tw-text-grey-600 hover:tw-bg-material-light-thin", value === 0 || value === undefined
27494
- ? "tw-text-grey-600"
27495
- : "tw-text-grey-300", isInputVisible ? "tw-bg-material-light-thin" : "tw-bg-transparent", isSelected && "tw-outline tw-outline-2 tw-outline-royal-500"), children: [value !== null && value !== void 0 ? value : 0, jsx(CaptionText, { className: "!tw-font-medium !tw-leading-[10px] tw-text-grey-300", children: type === "percentage" ? "%" : "$" })] }), jsx("button", { onClick: handleOpenInput, className: "tw-absolute tw-right-squid-xs tw-flex tw-h-[26px] tw-w-[26px] tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-xxs !tw-font-medium tw-leading-[10px] hover:tw-bg-material-light-thin", children: jsx(Chip, { icon: jsx(ChevronGrabberVerticalIcon, { className: "tw-text-grey-900" }) }) }), isInputVisible && (jsx(Menu, { menuRef: menuRef, containerClassName: "tw-absolute tw-bottom-full tw-z-10 tw-pb-squid-m tw-w-[160px]", children: jsx("form", { onSubmit: (e) => {
27496
- e.preventDefault();
27497
- handleSubmit(inputValue);
27498
- }, children: jsx(Input, { autoFocus: true, min: min, max: max, onKeyDown: handleKeyDown, step: decimalsFormat, placeholder: "0", type: "number", defaultValue: value, value: inputValue, onChange: (e) => {
27499
- const isValid = e.target.checkValidity();
27500
- if (!isValid)
27501
- return;
27502
- setInputValue(e.target.value);
27503
- }, showIcon: false, actionButtonProps: {
27504
- label: "Ok",
27505
- onClick: () => {
27506
- handleSubmit(inputValue);
27507
- },
27508
- variant: "primary",
27509
- } }) }) }))] }));
27510
- }
27511
-
27512
- const switchSizeClassMap = {
27513
- small: "tw-w-[36px] tw-h-squid-m tw-p-0.5",
27514
- large: "tw-w-[54px] tw-h-squid-l tw-p-[3px]",
27515
- };
27516
- const switchKnobSizeClassMap = {
27517
- small: "tw-w-4 tw-h-4",
27518
- large: "tw-w-6 tw-h-6",
27519
- };
27520
- const switchKnobCheckedClassMap = {
27521
- large: {
27522
- checked: "tw-left-[26px]",
27523
- unchecked: "tw-left-[2px]",
27524
- },
27525
- small: {
27526
- checked: "tw-left-[17px]",
27527
- unchecked: "tw-left-[1px]",
27528
- },
27529
- };
27530
- function Switch({ checked = false, onChange, size, disabled = false, inputProps, }) {
27531
- return (
27532
- // Switch container
27533
- 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",
27534
- // size styles
27535
- switchSizeClassMap[size],
27536
- // checked styles
27537
- checked ? "tw-bg-status-positive" : "tw-bg-grey-800",
27538
- // disabled styles
27539
- disabled ? "tw-cursor-not-allowed" : "tw-cursor-pointer",
27540
- // Focus visible styles
27541
- "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: {
27542
- filter: "drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.33)) drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.20))",
27543
- }, className: clsx("tw-absolute tw-rounded-full tw-border tw-border-material-light-thin tw-transition-all",
27544
- // size styles
27545
- switchKnobSizeClassMap[size],
27546
- // checked styles
27547
- switchKnobCheckedClassMap[size][checked ? "checked" : "unchecked"], checked
27548
- ? "group-data-[squid-theme-type=dark]:tw-bg-grey-100 group-data-[squid-theme-type=light]:tw-bg-grey-900"
27549
- : "tw-bg-grey-500") })] }));
27550
- }
27551
-
27552
27584
  function RangeInput({ label, initialValue, onChange, min = 0, max = 99, isWarning = false, }) {
27553
27585
  const [pressedButton, setPressedButton] = useState(null);
27554
27586
  const inputRef = useRef(null);
@@ -27660,7 +27692,116 @@ function RangeInput({ label, initialValue, onChange, min = 0, max = 99, isWarnin
27660
27692
  }, onMouseLeave: handleUpdateValue, className: cn("tw-relative tw-flex tw-h-full tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-p-squid-xxs tw-text-left tw-text-caption tw-font-caption tw-leading-[10px] placeholder-shown:tw-text-grey-600 hover:tw-bg-material-light-thin"), children: jsx(CirclePlusIcon, {}) })] })] }) }));
27661
27693
  }
27662
27694
 
27663
- const imageClass = "tw-w-[40px] tw-aspect-square tw-flex tw-items-center tw-justify-center";
27695
+ function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSelected = false, }) {
27696
+ const [isInputVisible, setIsInputVisible] = useState(false);
27697
+ const [inputValue, setInputValue] = useState(String(value !== null && value !== void 0 ? value : 0));
27698
+ useEffect(() => {
27699
+ if (!isInputVisible)
27700
+ return;
27701
+ const handleOutsideClick = (event) => {
27702
+ var _a;
27703
+ const clickedElementIsDifferentThanMenu = event.target !== menuRef.current;
27704
+ const clickedElementIsDifferentThanSlider = event.target !== sliderRef.current;
27705
+ const sliderContainsClickedElement = (_a = sliderRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target);
27706
+ const hideInput = clickedElementIsDifferentThanMenu &&
27707
+ (!clickedElementIsDifferentThanSlider || !sliderContainsClickedElement);
27708
+ if (hideInput) {
27709
+ handleCloseInput();
27710
+ }
27711
+ };
27712
+ document.addEventListener("click", handleOutsideClick);
27713
+ return () => {
27714
+ document.removeEventListener("click", handleOutsideClick);
27715
+ };
27716
+ }, [isInputVisible]);
27717
+ const menuRef = useRef(null);
27718
+ const sliderRef = useRef(null);
27719
+ const handleSubmit = useCallback((value) => {
27720
+ handleCloseInput();
27721
+ onChange === null || onChange === void 0 ? void 0 : onChange(value === "" ? undefined : Number(value));
27722
+ }, [onChange]);
27723
+ const handleKeyDown = useCallback((e) => {
27724
+ // block unwanted (but still valid) characters
27725
+ if (["e", "E", "+", "-"].includes(e.key)) {
27726
+ e.preventDefault();
27727
+ return;
27728
+ }
27729
+ // close input when pressing escape
27730
+ if (e.key === "Escape") {
27731
+ handleCloseInput();
27732
+ }
27733
+ }, []);
27734
+ const handleOpenInput = useCallback(() => {
27735
+ setIsInputVisible(true);
27736
+ }, []);
27737
+ const handleCloseInput = useCallback(() => {
27738
+ setIsInputVisible(false);
27739
+ }, []);
27740
+ return (jsxs("div", { ref: sliderRef, className: "tw-relative tw-flex tw-h-[30px] tw-items-center tw-justify-center tw-rounded-squid-xs", children: [jsxs("button", { className: cn("tw-relative tw-flex tw-h-full tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-p-squid-xs tw-pr-[40px] tw-text-left tw-text-caption tw-font-caption tw-leading-[10px] -tw-outline-offset-2 placeholder-shown:tw-text-grey-600 hover:tw-bg-material-light-thin", value === 0 || value === undefined
27741
+ ? "tw-text-grey-600"
27742
+ : "tw-text-grey-300", isInputVisible ? "tw-bg-material-light-thin" : "tw-bg-transparent", isSelected && "tw-outline tw-outline-2 tw-outline-royal-500"), children: [value !== null && value !== void 0 ? value : 0, jsx(CaptionText, { className: "!tw-font-medium !tw-leading-[10px] tw-text-grey-300", children: type === "percentage" ? "%" : "$" })] }), jsx("button", { onClick: handleOpenInput, className: "tw-absolute tw-right-squid-xs tw-flex tw-h-[26px] tw-w-[26px] tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-xxs !tw-font-medium tw-leading-[10px] hover:tw-bg-material-light-thin", children: jsx(Chip, { icon: jsx(ChevronGrabberVerticalIcon, { className: "tw-text-grey-900" }) }) }), isInputVisible && (jsx(Menu, { menuRef: menuRef, containerClassName: "tw-absolute tw-bottom-full tw-z-10 tw-pb-squid-m tw-w-[160px]", children: jsx("form", { onSubmit: (e) => {
27743
+ e.preventDefault();
27744
+ handleSubmit(inputValue);
27745
+ }, children: jsx(Input, { autoFocus: true, min: min, max: max, onKeyDown: handleKeyDown, step: decimalsFormat, placeholder: "0", type: "number", defaultValue: value, value: inputValue, onChange: (e) => {
27746
+ const isValid = e.target.checkValidity();
27747
+ if (!isValid)
27748
+ return;
27749
+ setInputValue(e.target.value);
27750
+ }, showIcon: false, actionButtonProps: {
27751
+ label: "Ok",
27752
+ onClick: () => {
27753
+ handleSubmit(inputValue);
27754
+ },
27755
+ variant: "primary",
27756
+ } }) }) }))] }));
27757
+ }
27758
+
27759
+ const switchSizeClassMap = {
27760
+ small: "tw-w-[36px] tw-h-squid-m tw-p-0.5",
27761
+ large: "tw-w-[54px] tw-h-squid-l tw-p-[3px]",
27762
+ };
27763
+ const switchKnobSizeClassMap = {
27764
+ small: "tw-w-4 tw-h-4",
27765
+ large: "tw-w-6 tw-h-6",
27766
+ };
27767
+ const switchKnobCheckedClassMap = {
27768
+ large: {
27769
+ checked: "tw-left-[26px]",
27770
+ unchecked: "tw-left-[2px]",
27771
+ },
27772
+ small: {
27773
+ checked: "tw-left-[17px]",
27774
+ unchecked: "tw-left-[1px]",
27775
+ },
27776
+ };
27777
+ function Switch({ checked = false, onChange, size, disabled = false, inputProps, }) {
27778
+ return (
27779
+ // Switch container
27780
+ 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",
27781
+ // size styles
27782
+ switchSizeClassMap[size],
27783
+ // checked styles
27784
+ disabled || !checked ? "tw-bg-grey-800" : "tw-bg-status-positive",
27785
+ // disabled styles
27786
+ disabled ? "tw-cursor-not-allowed" : "tw-cursor-pointer",
27787
+ // Focus visible styles
27788
+ "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: {
27789
+ filter: disabled
27790
+ ? "drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.10)) drop-shadow(0px 1px 5px rgba(0, 0, 0, 0.10))"
27791
+ : "drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.33)) drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.20))",
27792
+ }, className: clsx("tw-absolute tw-rounded-full tw-border tw-border-material-light-thin tw-transition-all",
27793
+ // size styles
27794
+ switchKnobSizeClassMap[size],
27795
+ // checked styles
27796
+ switchKnobCheckedClassMap[size][checked ? "checked" : "unchecked"], disabled
27797
+ ? "group-data-[squid-theme-type=dark]:tw-bg-grey-700 group-data-[squid-theme-type=light]:tw-bg-grey-900"
27798
+ : checked
27799
+ ? "group-data-[squid-theme-type=dark]:tw-bg-grey-100 group-data-[squid-theme-type=light]:tw-bg-grey-900"
27800
+ : "tw-bg-grey-500") })] }));
27801
+ }
27802
+
27803
+ const imageWrapperClassName = "tw-w-[40px] tw-aspect-square tw-flex tw-items-center tw-justify-center";
27804
+ const tokenImageClassName = "tw-absolute tw-h-squid-xl tw-w-squid-xl tw-rounded-full tw-object-cover";
27664
27805
  const themeKeyVariantMap = {
27665
27806
  primary: "grey-800",
27666
27807
  accent: "royal-500",
@@ -27680,6 +27821,12 @@ var AssetsButtonState;
27680
27821
  AssetsButtonState[AssetsButtonState["EMPTY"] = 2] = "EMPTY";
27681
27822
  AssetsButtonState[AssetsButtonState["LOADING"] = 3] = "LOADING";
27682
27823
  })(AssetsButtonState || (AssetsButtonState = {}));
27824
+ var ImageLoadingState;
27825
+ (function (ImageLoadingState) {
27826
+ ImageLoadingState[ImageLoadingState["LOADING"] = 0] = "LOADING";
27827
+ ImageLoadingState[ImageLoadingState["LOADED"] = 1] = "LOADED";
27828
+ ImageLoadingState[ImageLoadingState["ERROR"] = 2] = "ERROR";
27829
+ })(ImageLoadingState || (ImageLoadingState = {}));
27683
27830
  const outlineWidthMap = {
27684
27831
  [AssetsButtonState.LOADING]: {
27685
27832
  inner: 75,
@@ -27699,7 +27846,9 @@ const outlineWidthMap = {
27699
27846
  },
27700
27847
  };
27701
27848
  function AssetsButton({ chain, token, onClick, variant = "primary", isLoading = false, tooltip, emptyTokenLabel = "Select token", }) {
27702
- var _a, _b;
27849
+ var _a, _b, _c, _d;
27850
+ const [tokenImageLoadingState, setTokenImageLoadingState] = useState(ImageLoadingState.LOADING);
27851
+ const fallbackBgColor = useColorFromSeed((_a = token === null || token === void 0 ? void 0 : token.symbol) !== null && _a !== void 0 ? _a : "");
27703
27852
  const state = useMemo(() => {
27704
27853
  if (chain != null && !isLoading) {
27705
27854
  if (token != null) {
@@ -27714,10 +27863,27 @@ function AssetsButton({ chain, token, onClick, variant = "primary", isLoading =
27714
27863
  }, [token, chain, isLoading]);
27715
27864
  const defaultBgColor = `var(${themeKeysToCssVariables.color[themeKeyVariantMap[variant]].cssVariable})`;
27716
27865
  const outlineWidth = outlineWidthMap[state];
27717
- const chainBgColor = (_a = chain === null || chain === void 0 ? void 0 : chain.bgColor) !== null && _a !== void 0 ? _a : defaultBgColor;
27718
- const tokenBgColor = state === AssetsButtonState.FULL
27719
- ? (_b = token === null || token === void 0 ? void 0 : token.bgColor) !== null && _b !== void 0 ? _b : defaultBgColor
27720
- : defaultBgColor;
27866
+ const chainBgColor = (_b = chain === null || chain === void 0 ? void 0 : chain.bgColor) !== null && _b !== void 0 ? _b : defaultBgColor;
27867
+ const tokenTextColor = tokenImageLoadingState === ImageLoadingState.ERROR
27868
+ ? "#fff"
27869
+ : token === null || token === void 0 ? void 0 : token.textColor;
27870
+ const tokenBgColor = useMemo(() => {
27871
+ if (state !== AssetsButtonState.FULL) {
27872
+ return defaultBgColor;
27873
+ }
27874
+ if (tokenImageLoadingState === ImageLoadingState.ERROR) {
27875
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
27876
+ return fallbackBgColor || defaultBgColor;
27877
+ }
27878
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
27879
+ return (token === null || token === void 0 ? void 0 : token.bgColor) || defaultBgColor;
27880
+ }, [
27881
+ state,
27882
+ token === null || token === void 0 ? void 0 : token.bgColor,
27883
+ defaultBgColor,
27884
+ tokenImageLoadingState,
27885
+ fallbackBgColor,
27886
+ ]);
27721
27887
  const bgGradient = useMemo(() => {
27722
27888
  switch (state) {
27723
27889
  case AssetsButtonState.EMPTY:
@@ -27735,12 +27901,22 @@ function AssetsButton({ chain, token, onClick, variant = "primary", isLoading =
27735
27901
  ? "tw-cursor-not-allowed"
27736
27902
  : "tw-group/assets-button"), children: [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: 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" }) }), jsxs("svg", { className: "tw-absolute -tw-left-[2px] -tw-top-[2px] tw-z-20 tw-hidden group-hover/assets-button:tw-block", xmlns: "http://www.w3.org/2000/svg", width: outlineWidth.inner, height: "44", viewBox: `0 0 ${outlineWidth.inner} 44`, fill: "none", children: [jsx("clipPath", { id: "halfClip1", children: jsx("rect", { x: "0", y: "0", width: outlineWidth.inner, height: "44" }) }), jsx("path", { d: "M59.1506 36.849L59.1508 36.8492C63.2511 40.9496 68.6272 43 74.0001 43H145C156.598 43 166 33.598 166 22C166 10.402 156.598 1 145 1H74.0001C68.6272 0.999977 63.2511 3.05042 59.1508 7.15076C58.6183 7.68325 58.0958 8.22097 57.5842 8.74755L57.5817 8.75009C55.9228 10.4574 54.3925 12.0283 52.8031 13.1834C51.2282 14.3279 49.6791 15 48 15C46.3209 15 44.7718 14.3279 43.1969 13.1834C41.6075 12.0283 40.0772 10.4574 38.4183 8.75009L38.4159 8.74759C37.9042 8.22101 37.3817 7.68327 36.8492 7.15076C32.7489 3.05042 27.3728 0.999977 21.9999 1C16.6271 1.00002 11.251 3.05047 7.15076 7.15076C3.05045 11.2511 1 16.6272 1 22C1 27.3728 3.05045 32.7489 7.15076 36.8492C11.251 40.9495 16.6271 43 21.9999 43C27.3728 43 32.7489 40.9496 36.8492 36.8492L36.8494 36.849C37.3794 36.3188 37.8994 35.7834 38.4088 35.2589L38.4108 35.2569C40.0704 33.5483 41.6019 31.9756 43.1928 30.8191C44.7691 29.6731 46.3197 29 48 29C49.6803 29 51.2309 29.6731 52.8072 30.8191C54.3981 31.9756 55.9296 33.5483 57.5892 35.2569L57.5912 35.2589C58.1006 35.7834 58.6206 36.3188 59.1506 36.849Z", stroke: "currentColor", className: "tw-text-grey-900", strokeWidth: "2", clipPath: "url(#halfClip1)" })] }), jsxs("svg", { className: "tw-absolute -tw-left-[4px] -tw-top-[4px] tw-z-10 tw-hidden group-hover/assets-button:tw-block", xmlns: "http://www.w3.org/2000/svg", width: outlineWidth.outer, height: "48", viewBox: `0 0 ${outlineWidth.outer} 48`, fill: "none", children: [jsx("clipPath", { id: "halfClip2", children: jsx("rect", { x: "0", y: "0", width: outlineWidth.outer, height: "48" }) }), jsx("path", { d: "M60.4432 39.5559L60.4437 39.5564C64.7391 43.8517 70.3729 46 76.0001 46H147C159.15 46 169 36.1503 169 24C169 11.8497 159.15 2 147 2H76.0001C70.3729 1.99998 64.7391 4.14825 60.4437 8.44365C59.9062 8.98109 59.3797 9.52298 58.8697 10.0479L58.8645 10.0532C57.1905 11.7761 55.7217 13.2796 54.2152 14.3745C52.7378 15.4481 51.3923 16 50 16C48.6077 16 47.2622 15.4481 45.7848 14.3745C44.2783 13.2796 42.8095 11.7761 41.1355 10.0532L41.1305 10.0481C40.6205 9.52314 40.0939 8.98117 39.5563 8.44365C35.2609 4.14825 29.6271 1.99998 23.9999 2C18.3727 2.00002 12.739 4.1483 8.44365 8.44365C4.14827 12.739 2 18.3728 2 24C2 29.6272 4.14827 35.261 8.44365 39.5564C12.739 43.8517 18.3727 46 23.9999 46C29.6271 46 35.2609 43.8517 39.5563 39.5564L39.5568 39.5559C40.0917 39.0207 40.6159 38.481 41.1237 37.9582L41.1281 37.9537C42.8028 36.2295 44.2728 34.7243 45.7808 33.6279C47.2597 32.5528 48.6066 32 50 32C51.3934 32 52.7403 32.5528 54.2192 33.6279C55.7272 34.7243 57.1972 36.2295 58.8719 37.9537L58.8763 37.9582C59.3841 38.481 59.9083 39.0207 60.4432 39.5559Z", stroke: "currentColor", className: "tw-text-material-light-average", strokeWidth: "4", clipPath: "url(#halfClip2)" })] }), jsx("div", { className: cn("tw-assets-button-mask tw-flex tw-h-squid-xl tw-w-[92px] tw-items-center tw-justify-between", state !== AssetsButtonState.FULL && "!tw-w-[72px]"), style: {
27737
27903
  backgroundImage: bgGradient,
27738
- }, children: jsx("div", { className: clsx(imageClass), children: state === AssetsButtonState.CHAIN_ONLY ||
27739
- state === AssetsButtonState.FULL ? (jsx("img", { src: chain === null || chain === void 0 ? void 0 : chain.iconUrl, alt: "", className: "tw-h-squid-xl tw-w-squid-xl tw-rounded-full tw-object-cover" })) : (state !== AssetsButtonState.LOADING && (jsx("span", { className: emptyChainIconTextClassNameMap[variant], children: jsx(PlusIcon, {}) }))) }) }), state === AssetsButtonState.FULL ? (jsxs("div", { className: clsx(imageClass, "tw-absolute tw-left-[54px] tw-z-[5] tw-h-squid-xl tw-overflow-hidden"), children: [jsx("div", { className: "tw-absolute tw-right-0 tw-h-full tw-w-[22px]", style: {
27904
+ }, children: jsx("div", { className: clsx(imageWrapperClassName), children: state === AssetsButtonState.CHAIN_ONLY ||
27905
+ state === AssetsButtonState.FULL ? (jsx("img", { src: chain === null || chain === void 0 ? void 0 : chain.iconUrl, alt: "", className: "tw-h-squid-xl tw-w-squid-xl tw-rounded-full tw-object-cover" })) : (state !== AssetsButtonState.LOADING && (jsx("span", { className: emptyChainIconTextClassNameMap[variant], children: jsx(PlusIcon, {}) }))) }) }), state === AssetsButtonState.FULL ? (jsxs("div", { className: clsx(imageWrapperClassName, "tw-absolute tw-left-[54px] tw-z-[5] tw-h-squid-xl tw-overflow-hidden"), children: [jsx("div", { className: "tw-absolute tw-right-0 tw-h-full tw-w-[22px]", style: {
27740
27906
  backgroundColor: tokenBgColor,
27741
- } }), jsx("img", { src: token === null || token === void 0 ? void 0 : token.iconUrl, alt: token === null || token === void 0 ? void 0 : token.symbol, className: "tw-absolute tw-h-squid-xl tw-w-squid-xl tw-rounded-full tw-object-cover" }), jsx("div", { className: "tw-absolute tw-right-0 tw-h-full tw-w-[22px] tw-border-b\n tw-border-t tw-border-material-light-thin" })] })) : null, jsxs("div", { className: cn("tw-relative tw-flex tw-h-squid-xl tw-w-fit tw-min-w-fit tw-items-center tw-gap-squid-xxs tw-rounded-br-full tw-rounded-tr-full tw-border tw-border-l-0 tw-border-material-light-thin tw-py-squid-xs tw-pr-squid-xs before:tw-absolute before:-tw-inset-[3px] before:tw-z-[1] before:tw-w-[calc(100%+3px)] before:tw-translate-x-[3px] before:tw-rounded-br-full before:tw-rounded-tr-full before:tw-border-2 before:tw-border-l-0 before:tw-border-transparent after:tw-absolute after:-tw-inset-[5px] after:tw-z-0 after:tw-w-[calc(100%+4px)] after:tw-translate-x-[6px] after:tw-rounded-br-full after:tw-rounded-tr-full after:tw-border-4 after:tw-border-l-0 after:tw-border-transparent group-hover/assets-button:before:tw-border-grey-900 group-hover/assets-button:after:tw-border-material-light-average", state === AssetsButtonState.FULL && "tw-pl-[7px]"), style: {
27907
+ } }), tokenImageLoadingState === ImageLoadingState.ERROR && (
27908
+ // show fallback
27909
+ jsx("div", { style: { color: tokenTextColor }, className: cn(tokenImageClassName, "tw-flex tw-items-center tw-justify-center tw-text-body-small"), children: (_d = (_c = token === null || token === void 0 ? void 0 : token.symbol) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.toUpperCase() })), jsx("img", { onLoad: () => {
27910
+ setTokenImageLoadingState(ImageLoadingState.LOADED);
27911
+ }, onError: () => {
27912
+ setTokenImageLoadingState(ImageLoadingState.ERROR);
27913
+ }, src: token === null || token === void 0 ? void 0 : token.iconUrl, alt: token === null || token === void 0 ? void 0 : token.symbol, className: cn(tokenImageClassName,
27914
+ // when image load failed, hide it with opacity: 0 instead of display: none
27915
+ // so new images can load and update the loading state
27916
+ tokenImageLoadingState === ImageLoadingState.ERROR &&
27917
+ "tw-opacity-0") }), jsx("div", { className: "tw-absolute tw-right-0 tw-h-full tw-w-[22px] tw-border-b\n tw-border-t tw-border-material-light-thin" })] })) : null, jsxs("div", { className: cn("tw-relative tw-flex tw-h-squid-xl tw-w-fit tw-min-w-fit tw-items-center tw-gap-squid-xxs tw-rounded-br-full tw-rounded-tr-full tw-border tw-border-l-0 tw-border-material-light-thin tw-py-squid-xs tw-pr-squid-xs before:tw-absolute before:-tw-inset-[3px] before:tw-z-[1] before:tw-w-[calc(100%+3px)] before:tw-translate-x-[3px] before:tw-rounded-br-full before:tw-rounded-tr-full before:tw-border-2 before:tw-border-l-0 before:tw-border-transparent after:tw-absolute after:-tw-inset-[5px] after:tw-z-0 after:tw-w-[calc(100%+4px)] after:tw-translate-x-[6px] after:tw-rounded-br-full after:tw-rounded-tr-full after:tw-border-4 after:tw-border-l-0 after:tw-border-transparent group-hover/assets-button:before:tw-border-grey-900 group-hover/assets-button:after:tw-border-material-light-average", state === AssetsButtonState.FULL && "tw-pl-[7px]"), style: {
27742
27918
  backgroundColor: tokenBgColor,
27743
- color: token === null || token === void 0 ? void 0 : token.textColor,
27919
+ color: tokenTextColor,
27744
27920
  }, children: [jsx(BodyText, { size: "small", className: cn("tw-leading-[13px]", state === AssetsButtonState.LOADING && "tw-min-w-[135px]"), children: state === AssetsButtonState.FULL
27745
27921
  ? token === null || token === void 0 ? void 0 : token.symbol
27746
27922
  : state !== AssetsButtonState.LOADING && emptyTokenLabel }), state !== AssetsButtonState.LOADING && (jsx(ChevronLargeRightIcon, { className: "tw-w-4 tw-min-w-4 tw-opacity-66" }))] })] }) })));
@@ -69258,10 +69434,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
69258
69434
  ? ""
69259
69435
  : showSwapInfoSection
69260
69436
  ? "tw-animate-scale-and-fade-up"
69261
- : "tw-animate-scale-and-fade-down"), children: [jsx("div", { className: "tw-flex tw-h-[130px] tw-w-full tw-items-center tw-justify-center tw-rounded-tl-modal tw-rounded-tr-modal tw-bg-animation-bg tw-py-squid-s tw-text-material-light-thin mobile-xs-height:tw-h-[160px]", style: {
69262
- // box shadow simulating bottom outline (we do not use css outline because cannot apply it to only one side)
69263
- boxShadow: "0 1px 0 currentColor",
69264
- }, children: jsx(AnimationWrapper, { style: {
69437
+ : "tw-animate-scale-and-fade-down"), children: [jsx(AnimationCard, { children: jsx(AnimationWrapper, { style: {
69265
69438
  height: "100%",
69266
69439
  maxHeight: "100%",
69267
69440
  width: "auto",
@@ -69598,6 +69771,12 @@ const parseSquidTheme = (userTheme, themeType) => {
69598
69771
  "button-md-secondary-text": fullPublicTheme.color["grey-800"],
69599
69772
  "button-md-tertiary-bg": fullPublicTheme.color["grey-800"],
69600
69773
  "button-md-tertiary-text": fullPublicTheme.color["grey-300"],
69774
+ "button-sm-primary-bg": fullPublicTheme.color["royal-500"],
69775
+ "button-sm-primary-text": fullPublicTheme.color[themeType === "light" ? "grey-900" : "grey-100"],
69776
+ "button-sm-secondary-bg": fullPublicTheme.color["grey-100"],
69777
+ "button-sm-secondary-text": fullPublicTheme.color["grey-800"],
69778
+ "button-sm-tertiary-bg": fullPublicTheme.color["grey-800"],
69779
+ "button-sm-tertiary-text": fullPublicTheme.color["grey-300"],
69601
69780
  };
69602
69781
  const defaultInputColors = {
69603
69782
  "input-placeholder": fullPublicTheme.color["grey-600"],
@@ -69753,4 +69932,4 @@ function ThemeProvider(_a) {
69753
69932
  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-flex tw-font-squid-main tw-h-d-screen mobile-lg:tw-h-auto", props.className), children: children })));
69754
69933
  }
69755
69934
 
69756
- export { ANIMATION_DURATIONS, AccountListItem, AccountsButton, ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, Announcement, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowExpandIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, AtomIcon, BackpackIcon, BadgeImage, BankIcon, BellAlarmIcon, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BrokenHeartIcon, BubblesIcon, Button$1 as Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, CatSquareIcon, CelebrateIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CodeBracketsIcon, CodeSolidSquareIcon, CoinsAddIcon, CoinsIcon, CoinsOutlinedIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CommandIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy2Icon, CopyOutlinedIcon, CrossAnimatedIcon, CrossedOutSunSolidIcon, DashboardFast, DepositAddressView, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, DropdownMenuTitle, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FarcasterIcon, FavouriteFilterIcon, FeeButton, FeesAction, FeesLines, FeesTotal, FileDownloadIcon, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HighestPriceRangeIcon, HistoryItem, HomeIcon, IconButton, IconLabel, Image$1 as Image, ImageGroup, ImageIcon, ImageSparkle, ImageStack, ImageState, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LaptopIcon, LightningIcon, LimitIcon, LinkIcon, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MarketCapIcon, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, MoneyBagIcon, MoonIcon, NavigationBar, NewsIcon, NewspaperIcon, NotAllowedIcon, NumericInput, PathSquareIcon, PauseIcon, PercentIcon, PhoneIcon, PieChartIcon, PipeSeparator, PlusIcon, PoopIcon, PowerIcon, PriceChange, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, PunkIcon, QrCodeIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, SettingsGearIcon, SettingsItem, SettingsSlider, SettingsSliderIcon, ShoppingBagIcon, SizeTransition, SmileFilledIcon, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidLogo, SquidVector, StakeAction, StarLinesIcon, StartAction, StocksIcon, SuccessAction, SunIcon, SunOutlinedIcon, SunriseIcon, SunriseSmallIcon, SwapAction, SwapConfiguration, SwapErrorIcon, SwapHeader, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProperties, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, Tab, Tabs, TagIcon, TagIconFilled, TelegramIcon, TextSkeleton, ThemePreference, ThemeProvider, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenDetailsView, TokenGroup, TokenGroups, TokenPair, Tooltip, TradingViewStepsIcon, TransactionAction, TransactionFilters, TransactionHeader, TransactionHeaderLayout, TransactionItem, TransactionProperties, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, TranslateIcon, TriangleExclamation, TxProgressViewHeader, UnsupportedPairNotice, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WrapAction, XSocialIcon, adjustColorForContrast, baseTailwindConfig, blendColors, cn, darkTheme, getColorBrightness, getContrastColor, getHexColorFromOpacityPercentage, getWalletCardBackground, hexToRgb, isValidHexColor, lightTheme, linkActionTimelineProps, parseColor, parseSquidTheme, pxToRem, remToPx, rgbToHex, spacing$1 as spacing, statusTextClassMap, themeKeysToCssVariables, transactionErrorPauseAnimation, transactionFailureAnimation, transactionHalfSuccessAnimation, transactionPendingAnimation, transactionProcessingAnimation, transactionRejectedAnimation, transactionSuccessAnimation, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useUserTheme, useVersion };
69935
+ export { ANIMATION_DURATIONS, AccountListItem, AccountsButton, ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AnimationCard, AnimationWrapper, Announcement, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowExpandIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, AtomIcon, BackpackIcon, BadgeImage, BankIcon, BellAlarmIcon, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BrokenHeartIcon, BubblesIcon, Button$1 as Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, CatSquareIcon, CelebrateIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, CircleCheckIcon, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CodeBracketsIcon, CodeSolidSquareIcon, CoinsAddIcon, CoinsIcon, CoinsOutlinedIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CommandIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy2Icon, CopyOutlinedIcon, CrossAnimatedIcon, CrossedOutSunSolidIcon, DashboardFast, DepositAddressView, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, DropdownMenuTitle, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FarcasterIcon, FavouriteFilterIcon, FeeButton, FeesAction, FeesLines, FeesTotal, FileDownloadIcon, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HighestPriceRangeIcon, HistoryItem, HomeIcon, IconButton, IconLabel, Image$1 as Image, ImageGroup, ImageIcon, ImageSparkle, ImageStack, ImageState, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LaptopIcon, LargeNumericInput, LightningIcon, LimitIcon, LinkIcon, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MarketCapIcon, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, ModalTitle, MoneyBagIcon, MoonIcon, NavigationBar, NewsIcon, NewspaperIcon, NotAllowedIcon, NumericInput, PathSquareIcon, PauseIcon, PercentIcon, PhoneIcon, PieChartIcon, PipeSeparator, PluginIcon, PlusIcon, PoopIcon, PowerIcon, PriceChange, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, PunkIcon, QrCodeIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, SettingsGearIcon, SettingsItem, SettingsSlider, SettingsSliderIcon, ShoppingBagIcon, SizeTransition, SmileFilledIcon, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidLogo, SquidVector, StakeAction, StarLinesIcon, StartAction, StocksIcon, SuccessAction, SunIcon, SunOutlinedIcon, SunriseIcon, SunriseSmallIcon, SwapAction, SwapConfiguration, SwapErrorIcon, SwapHeader, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProperties, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, Tab, Tabs, TagIcon, TagIconFilled, TelegramIcon, TextSkeleton, ThemePreference, ThemeProvider, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenDetailsView, TokenGroup, TokenGroups, TokenPair, Tooltip, TradingViewStepsIcon, TransactionAction, TransactionFilters, TransactionHeader, TransactionHeaderLayout, TransactionItem, TransactionProperties, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, TranslateIcon, TriangleExclamation, TxProgressViewHeader, UnsupportedPairNotice, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WrapAction, XSocialIcon, adjustColorForContrast, baseTailwindConfig, blendColors, buttonRoundedClassMap, cn, darkTheme, getColorBrightness, getContrastColor, getHexColorFromOpacityPercentage, getWalletCardBackground, hexToRgb, isValidHexColor, lightTheme, linkActionTimelineProps, parseColor, parseSquidTheme, pxToRem, remToPx, rgbToHex, spacing$1 as spacing, statusTextClassMap, themeKeysToCssVariables, transactionErrorPauseAnimation, transactionFailureAnimation, transactionHalfSuccessAnimation, transactionPendingAnimation, transactionProcessingAnimation, transactionRejectedAnimation, transactionSuccessAnimation, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useUserTheme, useVersion };