@0xsquid/ui 0.27.5 → 0.27.7-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/index.js +537 -247
  3. package/dist/cjs/types/components/buttons/AssetsButton.d.ts +2 -2
  4. package/dist/cjs/types/components/buttons/Button.d.ts +5 -3
  5. package/dist/cjs/types/components/controls/Input.d.ts +3 -3
  6. package/dist/cjs/types/components/controls/NumericInput.d.ts +2 -2
  7. package/dist/cjs/types/components/icons/Generic.d.ts +44 -0
  8. package/dist/cjs/types/components/icons/Weather.d.ts +8 -0
  9. package/dist/cjs/types/components/layout/InfoBox.d.ts +3 -3
  10. package/dist/cjs/types/components/layout/SwapConfiguration.d.ts +2 -1
  11. package/dist/cjs/types/components/typography/BodyText.d.ts +2 -2
  12. package/dist/cjs/types/components/typography/HeadingText.d.ts +2 -2
  13. package/dist/cjs/types/components/views/SwapDetailsView.d.ts +2 -1
  14. package/dist/cjs/types/core/design-system.d.ts +9 -0
  15. package/dist/cjs/types/core/externalLinks.d.ts +2 -0
  16. package/dist/cjs/types/core/index.d.ts +1 -1
  17. package/dist/cjs/types/core/themes.d.ts +13 -8
  18. package/dist/cjs/types/core/utils.d.ts +11 -2
  19. package/dist/cjs/types/hooks/index.d.ts +1 -0
  20. package/dist/cjs/types/hooks/useUserTheme.d.ts +13 -0
  21. package/dist/cjs/types/providers/ThemeProvider.d.ts +11 -0
  22. package/dist/cjs/types/providers/index.d.ts +1 -1
  23. package/dist/cjs/types/services/internal/colorService.d.ts +9 -4
  24. package/dist/cjs/types/stories/layout/SwapConfiguration.stories.d.ts +1 -0
  25. package/dist/cjs/types/stories/views/SwapDetailsView.stories.d.ts +1 -0
  26. package/dist/cjs/types/types/config.d.ts +28 -29
  27. package/dist/cjs/types/types/index.d.ts +2 -2
  28. package/dist/esm/index.js +522 -247
  29. package/dist/esm/types/components/buttons/AssetsButton.d.ts +2 -2
  30. package/dist/esm/types/components/buttons/Button.d.ts +5 -3
  31. package/dist/esm/types/components/controls/Input.d.ts +3 -3
  32. package/dist/esm/types/components/controls/NumericInput.d.ts +2 -2
  33. package/dist/esm/types/components/icons/Generic.d.ts +44 -0
  34. package/dist/esm/types/components/icons/Weather.d.ts +8 -0
  35. package/dist/esm/types/components/layout/InfoBox.d.ts +3 -3
  36. package/dist/esm/types/components/layout/SwapConfiguration.d.ts +2 -1
  37. package/dist/esm/types/components/typography/BodyText.d.ts +2 -2
  38. package/dist/esm/types/components/typography/HeadingText.d.ts +2 -2
  39. package/dist/esm/types/components/views/SwapDetailsView.d.ts +2 -1
  40. package/dist/esm/types/core/design-system.d.ts +9 -0
  41. package/dist/esm/types/core/externalLinks.d.ts +2 -0
  42. package/dist/esm/types/core/index.d.ts +1 -1
  43. package/dist/esm/types/core/themes.d.ts +13 -8
  44. package/dist/esm/types/core/utils.d.ts +11 -2
  45. package/dist/esm/types/hooks/index.d.ts +1 -0
  46. package/dist/esm/types/hooks/useUserTheme.d.ts +13 -0
  47. package/dist/esm/types/providers/ThemeProvider.d.ts +11 -0
  48. package/dist/esm/types/providers/index.d.ts +1 -1
  49. package/dist/esm/types/services/internal/colorService.d.ts +9 -4
  50. package/dist/esm/types/stories/layout/SwapConfiguration.stories.d.ts +1 -0
  51. package/dist/esm/types/stories/views/SwapDetailsView.stories.d.ts +1 -0
  52. package/dist/esm/types/types/config.d.ts +28 -29
  53. package/dist/esm/types/types/index.d.ts +2 -2
  54. package/dist/index.css +1 -1
  55. package/dist/index.d.ts +104 -32
  56. package/package.json +2 -1
  57. package/dist/cjs/types/providers/SquidConfigProvider.d.ts +0 -9
  58. package/dist/esm/types/providers/SquidConfigProvider.d.ts +0 -9
package/dist/cjs/index.js CHANGED
@@ -2653,6 +2653,37 @@ const getFirstUniques = (array, key, count) => {
2653
2653
  }
2654
2654
  return uniqueItems;
2655
2655
  };
2656
+ function isObject$3(value) {
2657
+ return typeof value === "object" && !Array.isArray(value) && value !== null;
2658
+ }
2659
+ function flatten(obj, options = {}) {
2660
+ const parsed = {};
2661
+ function toKebabCase(key) {
2662
+ return key.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
2663
+ }
2664
+ function recurse(current, currentPrefix) {
2665
+ var _a;
2666
+ for (const [key, value] of Object.entries(current)) {
2667
+ const newPrefix = `${currentPrefix}${toKebabCase(key)}`;
2668
+ if (isObject$3(value)) {
2669
+ recurse(value, `${newPrefix}-`);
2670
+ }
2671
+ else if (typeof value === "string" || typeof value === "number") {
2672
+ parsed[`${(_a = options.prefix) !== null && _a !== void 0 ? _a : ""}${newPrefix}`] = String(value);
2673
+ }
2674
+ }
2675
+ }
2676
+ recurse(obj, "");
2677
+ return parsed;
2678
+ }
2679
+ // Map theme keys to css variables
2680
+ // Example { "accent-gold": "var(--accent-gold)" }
2681
+ function mapToCssVariables(obj) {
2682
+ return Object.entries(obj).reduce((acc, [key, { cssVariable }]) => {
2683
+ acc[key] = `var(${cssVariable})`;
2684
+ return acc;
2685
+ }, {});
2686
+ }
2656
2687
 
2657
2688
  const badgeSizeClassMap = {
2658
2689
  sm: "tw-w-4 tw-h-4",
@@ -2746,36 +2777,30 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
2746
2777
 
2747
2778
  // font size, line height, and letter spacing classes
2748
2779
  const textClassMap$1 = {
2749
- small: "tw-text-body-small tw-tracking-body-small tw-leading-body-small",
2750
- medium: "tw-text-body-medium tw-tracking-body-medium tw-leading-body-medium",
2751
- large: "tw-text-body-large tw-tracking-body-large tw-leading-body-large",
2780
+ small: "tw-text-body-small tw-tracking-body-small tw-leading-body-small tw-font-body-small",
2781
+ medium: "tw-text-body-medium tw-tracking-body-medium tw-leading-body-medium tw-font-body-medium",
2782
+ large: "tw-text-body-large tw-tracking-body-large tw-leading-body-large tw-font-body-large",
2752
2783
  };
2753
2784
  function BodyText(_a) {
2754
- var { size, children, bold, tight } = _a, props = __rest$1(_a, ["size", "children", "bold", "tight"]);
2755
- const fontWeightClass = bold
2756
- ? "tw-font-typography-bold"
2757
- : "tw-font-typography-regular";
2785
+ var { size, children, bold = false, tight = false } = _a, props = __rest$1(_a, ["size", "children", "bold", "tight"]);
2786
+ const fontWeightClass = bold ? "!tw-font-bold" : "!tw-font-regular";
2758
2787
  return (jsxRuntime.jsx("span", Object.assign({}, props, { className: cn(textClassMap$1[size], fontWeightClass, tight && "!tw-leading-[1]", props.className), children: children })));
2759
2788
  }
2760
2789
 
2761
2790
  function CaptionText(_a) {
2762
- var { children, bold } = _a, props = __rest$1(_a, ["children", "bold"]);
2763
- const boldClass = bold
2764
- ? "tw-font-typography-bold"
2765
- : "tw-font-typography-regular";
2766
- return (jsxRuntime.jsx("span", Object.assign({}, props, { className: cn(boldClass, "tw-text-caption tw-leading-caption", props.className), children: children })));
2791
+ var { children, bold = false } = _a, props = __rest$1(_a, ["children", "bold"]);
2792
+ const boldClass = bold && "!tw-font-bold";
2793
+ return (jsxRuntime.jsx("span", Object.assign({}, props, { className: cn(boldClass, "tw-text-caption tw-font-caption tw-leading-caption", props.className), children: children })));
2767
2794
  }
2768
2795
 
2769
2796
  // font size, line height, and letter spacing classes
2770
2797
  const textClassMap = {
2771
- small: "tw-text-heading-small tw-tracking-heading-small tw-leading-heading-small",
2772
- medium: "tw-text-heading-medium tw-tracking-heading-medium tw-leading-heading-medium",
2773
- large: "tw-text-heading-large tw-tracking-heading-large tw-leading-heading-large",
2774
- };
2775
- function HeadingText({ children, bold, size, className, }) {
2776
- const fontWeightClass = bold
2777
- ? "tw-font-heading-bold"
2778
- : "tw-font-heading-regular";
2798
+ small: "tw-text-heading-small tw-tracking-heading-small tw-leading-heading-small tw-font-heading-small",
2799
+ medium: "tw-text-heading-medium tw-tracking-heading-medium tw-leading-heading-medium tw-font-heading-medium",
2800
+ large: "tw-text-heading-large tw-tracking-heading-large tw-leading-heading-large tw-font-heading-large",
2801
+ };
2802
+ function HeadingText({ children, bold = false, size, className, }) {
2803
+ const fontWeightClass = bold ? "!tw-font-bold" : "!tw-font-regular";
2779
2804
  return (jsxRuntime.jsx("h6", { className: clsx(textClassMap[size], fontWeightClass, className), children: children }));
2780
2805
  }
2781
2806
 
@@ -3027,8 +3052,8 @@ const buttonSizeClassMap = {
3027
3052
  lg: "tw-p-1 tw-h-button",
3028
3053
  };
3029
3054
  const roundedClassMap = {
3030
- md: "tw-rounded-squid-m",
3031
- lg: "tw-rounded-squid-xxl",
3055
+ md: "tw-rounded-button-medium",
3056
+ lg: "tw-rounded-button-large",
3032
3057
  };
3033
3058
  const buttonVariantClassMap = {
3034
3059
  primary: "tw-bg-royal-500 group-data-[squid-theme-type=light]:tw-text-grey-900 group-data-[squid-theme-type=dark]:tw-text-grey-100",
@@ -3040,11 +3065,11 @@ const buttonVariantClassMap = {
3040
3065
  const buttonDisabledClass = "!tw-bg-grey-800 !tw-text-grey-600 tw-cursor-not-allowed";
3041
3066
  const loadingClassname = "tw-invisible tw-opacity-0";
3042
3067
  function Button$1(_a) {
3043
- var { label, disabled, size, variant, icon, link, isLoading = false, chip, containerClassName } = _a, props = __rest$1(_a, ["label", "disabled", "size", "variant", "icon", "link", "isLoading", "chip", "containerClassName"]);
3044
- const chipElement = chip ? (jsxRuntime.jsx(Chip, Object.assign({}, chip, { className: cn("tw-absolute -tw-right-squid-xxs -tw-top-squid-xxs tw-z-10", chip.className) }))) : null;
3045
- const children = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!disabled && !isLoading && (jsxRuntime.jsx(ButtonHoverOverlay, { className: roundedClassMap[size] })), jsxRuntime.jsx("div", { className: "tw-relative tw-z-[5] tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs", children: !label && !icon ? (props.children) : size === "lg" ? (jsxRuntime.jsx("span", { className: "tw-px-squid-m", children: jsxRuntime.jsx(BodyText, { className: isLoading ? loadingClassname : "", size: "medium", children: label }) })) : size === "md" ? (label && !icon ? (
3068
+ var { label, disabled = false, size, variant, icon, link, isLoading = false, chip, containerClassName, anchorRef, buttonRef } = _a, props = __rest$1(_a, ["label", "disabled", "size", "variant", "icon", "link", "isLoading", "chip", "containerClassName", "anchorRef", "buttonRef"]);
3069
+ const chipElement = chip != null ? (jsxRuntime.jsx(Chip, Object.assign({}, chip, { className: cn("tw-absolute -tw-right-squid-xxs -tw-top-squid-xxs tw-z-10", chip.className) }))) : null;
3070
+ const children = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!disabled && !isLoading && (jsxRuntime.jsx(ButtonHoverOverlay, { className: roundedClassMap[size] })), jsxRuntime.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" ? (jsxRuntime.jsx("span", { className: "tw-px-squid-m", children: jsxRuntime.jsx(BodyText, { className: isLoading ? loadingClassname : "", size: "medium", children: label }) })) : size === "md" ? (label != null && icon == null ? (
3046
3071
  // label only
3047
- jsxRuntime.jsx(BodyText, { className: isLoading ? loadingClassname : "", size: "small", children: label })) : !label && icon ? (
3072
+ jsxRuntime.jsx(BodyText, { className: isLoading ? loadingClassname : "", size: "small", children: label })) : label == null && icon != null ? (
3048
3073
  // icon only
3049
3074
  isLoading ? null : (icon)) : (
3050
3075
  // icon and label
@@ -3055,10 +3080,10 @@ function Button$1(_a) {
3055
3080
  // custom classes from props
3056
3081
  props.className);
3057
3082
  const ButtonWrapper = ({ children }) => (jsxRuntime.jsx("div", { className: cn("tw-relative", buttonWidthClassnameMap[size], roundedClassMap[size], containerClassName), children: children }));
3058
- if (link) {
3059
- return (jsxRuntime.jsxs(ButtonWrapper, { children: [jsxRuntime.jsx("a", { "aria-disabled": disabled, href: disabled ? undefined : link, target: "_blank", className: className, children: children }), chipElement] }));
3083
+ if (link != null) {
3084
+ return (jsxRuntime.jsxs(ButtonWrapper, { children: [jsxRuntime.jsx("a", { ref: anchorRef, "aria-disabled": disabled, href: disabled ? undefined : link, target: "_blank", className: className, rel: "noreferrer", children: children }), chipElement] }));
3060
3085
  }
3061
- return (jsxRuntime.jsxs(ButtonWrapper, { children: [jsxRuntime.jsx("button", Object.assign({}, props, { "aria-disabled": disabled || isLoading, className: className, disabled: disabled || isLoading, children: children })), chipElement] }));
3086
+ return (jsxRuntime.jsxs(ButtonWrapper, { children: [jsxRuntime.jsx("button", Object.assign({}, props, { ref: buttonRef, "aria-disabled": disabled || isLoading, className: className, disabled: disabled || isLoading, children: children })), chipElement] }));
3062
3087
  }
3063
3088
  const ButtonHoverOverlay = ({ className }) => {
3064
3089
  return (jsxRuntime.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) }));
@@ -3076,7 +3101,140 @@ function ArrowButton(_a) {
3076
3101
  "aria-disabled:tw-bg-grey-600 aria-disabled:tw-text-grey-800"), children: jsxRuntime.jsx(ArrowRightIcon, {}) })] })));
3077
3102
  }
3078
3103
 
3079
- const INTERNAL_SQUID_THEME_KEYS = [
3104
+ // const INTERNAL_THEME_COLOR_KEYS = [
3105
+ // "grey-100",
3106
+ // "grey-200",
3107
+ // "grey-300",
3108
+ // "grey-400",
3109
+ // "grey-500",
3110
+ // "grey-600",
3111
+ // "grey-700",
3112
+ // "grey-800",
3113
+ // "grey-900",
3114
+ // "royal-300",
3115
+ // "royal-400",
3116
+ // "royal-500",
3117
+ // "royal-700",
3118
+ // "status-positive",
3119
+ // "status-negative",
3120
+ // "status-partial",
3121
+ // "material-light-thin",
3122
+ // "material-light-average",
3123
+ // "material-light-thick",
3124
+ // "material-dark-thin",
3125
+ // "material-dark-average",
3126
+ // "material-dark-thick",
3127
+ // // grey-100 with 0.05 opacity
3128
+ // "grey-100-005",
3129
+ // // material-light and grey-900 blended color
3130
+ // "material-light-blend-grey-900",
3131
+ // // material-light and grey-300 blended color
3132
+ // "material-light-blend-grey-800",
3133
+ // "volt-700",
3134
+ // ] as const;
3135
+ // const THEME_BORDER_RADIUS_KEYS = ["button-lg", "button-md"] as const;
3136
+ // const THEME_TEXT_KEYS = [
3137
+ // "caption-size",
3138
+ // "caption-weight",
3139
+ // "body-large-size",
3140
+ // "body-large-weight",
3141
+ // "body-medium-size",
3142
+ // "body-medium-weight",
3143
+ // "body-small-size",
3144
+ // "body-small-weight",
3145
+ // "heading-small-size",
3146
+ // "heading-small-weight",
3147
+ // "heading-medium-size",
3148
+ // "heading-medium-weight",
3149
+ // "heading-large-size",
3150
+ // "heading-large-weight",
3151
+ // ] as const;
3152
+ // export type InternalThemeColors = Record<
3153
+ // (typeof INTERNAL_THEME_COLOR_KEYS)[number],
3154
+ // string
3155
+ // >;
3156
+ // export type ThemeBorderRadius = Record<
3157
+ // (typeof THEME_BORDER_RADIUS_KEYS)[number],
3158
+ // string
3159
+ // >;
3160
+ // export interface InternalSquidTheme {
3161
+ // colors: InternalThemeColors;
3162
+ // fontFamily: string;
3163
+ // text: ThemeText;
3164
+ // borderRadius: ThemeBorderRadius;
3165
+ // }
3166
+ // export interface SquidTheme {
3167
+ // colors: SquidThemeColors;
3168
+ // fontFamily?: string;
3169
+ // text?: ThemeText;
3170
+ // borderRadius?: ThemeBorderRadius;
3171
+ // }
3172
+ // // User-readable colors config
3173
+ // // renames:
3174
+ // // grey- to content-
3175
+ // // royal- to accent-
3176
+ // export interface SquidThemeColors {
3177
+ // "content-100": string;
3178
+ // "content-200": string;
3179
+ // "content-300": string;
3180
+ // "content-400": string;
3181
+ // "content-500": string;
3182
+ // "content-600": string;
3183
+ // "content-700": string;
3184
+ // "content-800": string;
3185
+ // "content-900": string;
3186
+ // "accent-300": string;
3187
+ // "accent-400": string;
3188
+ // "accent-500": string;
3189
+ // "accent-700": string;
3190
+ // "status-positive": string;
3191
+ // "status-negative": string;
3192
+ // "status-warning": string;
3193
+ // "highlight-700": string;
3194
+ // }
3195
+ // export type ThemeText = Record<(typeof THEME_TEXT_KEYS)[number], string>;
3196
+ // export const SQUID_THEME_CSS_VARIABLE_PREFIX = "--st-";
3197
+ // const themeColorKeysToCssVariablesMap = Object.fromEntries(
3198
+ // INTERNAL_THEME_COLOR_KEYS.map((key) => [
3199
+ // key,
3200
+ // {
3201
+ // cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}color-${key}`,
3202
+ // },
3203
+ // ]),
3204
+ // ) as Record<keyof InternalThemeColors, { cssVariable: string }>;
3205
+ // const themeBorderRadiusKeysToCssVariablesMap = Object.fromEntries(
3206
+ // THEME_BORDER_RADIUS_KEYS.map((key) => [
3207
+ // key,
3208
+ // {
3209
+ // cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}borderRadius-${key}`,
3210
+ // },
3211
+ // ]),
3212
+ // ) as Record<keyof ThemeBorderRadius, { cssVariable: string }>;
3213
+ // const themeTextKeysToCssVariablesMap = Object.fromEntries(
3214
+ // THEME_TEXT_KEYS.map((key) => [
3215
+ // key,
3216
+ // {
3217
+ // cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}text-${key}`,
3218
+ // },
3219
+ // ]),
3220
+ // ) as Record<keyof ThemeText, { cssVariable: string }>;
3221
+ // type ThemeCssVariableMap<T extends Record<string, any>> = {
3222
+ // [K in keyof T]: { cssVariable: string };
3223
+ // };
3224
+ // interface InternalThemeMap {
3225
+ // colors: ThemeCssVariableMap<InternalThemeColors>;
3226
+ // borderRadius: ThemeCssVariableMap<ThemeBorderRadius>;
3227
+ // text: ThemeCssVariableMap<ThemeText>;
3228
+ // }
3229
+ // export const internalThemeKeysToCssVariablesMap: InternalThemeMap = {
3230
+ // colors: themeColorKeysToCssVariablesMap,
3231
+ // borderRadius: themeBorderRadiusKeysToCssVariablesMap,
3232
+ // text: themeTextKeysToCssVariablesMap,
3233
+ // };
3234
+ // console.log({
3235
+ // internalThemeKeysToCssVariablesMap,
3236
+ // });
3237
+ const THEME_COLOR_KEYS = [
3080
3238
  "grey-100",
3081
3239
  "grey-200",
3082
3240
  "grey-300",
@@ -3099,24 +3257,56 @@ const INTERNAL_SQUID_THEME_KEYS = [
3099
3257
  "material-dark-thin",
3100
3258
  "material-dark-average",
3101
3259
  "material-dark-thick",
3260
+ "highlight-700",
3102
3261
  // grey-100 with 0.05 opacity
3103
3262
  "grey-100-005",
3104
3263
  // material-light and grey-900 blended color
3105
3264
  "material-light-blend-grey-900",
3106
3265
  // material-light and grey-300 blended color
3107
3266
  "material-light-blend-grey-800",
3108
- "volt-700",
3109
3267
  ];
3110
- const SQUID_THEME_CSS_VARIABLE_PREFIX = "--squid-theme-";
3268
+ const THEME_BORDER_RADIUS_KEYS = ["button-large", "button-medium"];
3269
+ const THEME_FONT_SIZE_KEYS = [
3270
+ "caption",
3271
+ "body-large",
3272
+ "body-medium",
3273
+ "body-small",
3274
+ "heading-small",
3275
+ "heading-medium",
3276
+ "heading-large",
3277
+ ];
3278
+ const THEME_FONT_WEIGHT_KEYS = [
3279
+ "caption",
3280
+ "body-small",
3281
+ "body-medium",
3282
+ "body-large",
3283
+ "heading-small",
3284
+ "heading-medium",
3285
+ "heading-large",
3286
+ ];
3287
+ const THEME_FONT_FAMILY_KEYS = ["squid-main"];
3111
3288
  /**
3112
- * Mapping between readable variables name and css variables used TailwindCSS config
3289
+ * 'st' = Squid Theme
3113
3290
  */
3114
- const themeTypesKeys = Object.fromEntries(INTERNAL_SQUID_THEME_KEYS.map((key) => [
3115
- key,
3116
- {
3117
- cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}${key}`,
3118
- },
3119
- ]));
3291
+ const THEME_CSS_VARIABLE_PREFIX = "--st-";
3292
+ function keysToCssVariables(keys, prefix) {
3293
+ return keys.reduce((acc, key) => {
3294
+ acc[key] = {
3295
+ cssVariable: `${THEME_CSS_VARIABLE_PREFIX}${prefix}-${String(key)}`,
3296
+ };
3297
+ return acc;
3298
+ },
3299
+ // eslint-disable-next-line @typescript-eslint/prefer-reduce-type-parameter, @typescript-eslint/consistent-type-assertions
3300
+ {});
3301
+ }
3302
+ const themeKeysToCssVariables = {
3303
+ color: keysToCssVariables(THEME_COLOR_KEYS, "color"),
3304
+ borderRadius: keysToCssVariables(THEME_BORDER_RADIUS_KEYS, "border-radius"),
3305
+ // text: keysToCssVariables<ThemeText>(THEME_TEXT_KEYS, "text"),
3306
+ fontSize: keysToCssVariables(THEME_FONT_SIZE_KEYS, "font-size"),
3307
+ fontWeight: keysToCssVariables(THEME_FONT_WEIGHT_KEYS, "font-weight"),
3308
+ fontFamily: keysToCssVariables(THEME_FONT_FAMILY_KEYS, "font-family"),
3309
+ };
3120
3310
 
3121
3311
  function SearchIcon({ className, size = "24", }) {
3122
3312
  return (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsxRuntime.jsx("path", { d: "M20 20L16.05 16.05M18 11C18 14.866 14.866 18 11 18C7.13401 18 4 14.866 4 11C4 7.13401 7.13401 4 11 4C14.866 4 18 7.13401 18 11Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
@@ -3134,9 +3324,11 @@ function Input(_a) {
3134
3324
  var _a;
3135
3325
  (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
3136
3326
  }, autoFocusTimeout);
3137
- return () => clearTimeout(timeoutId);
3327
+ return () => {
3328
+ clearTimeout(timeoutId);
3329
+ };
3138
3330
  }, [autoFocusTimeout]);
3139
- return (jsxRuntime.jsxs("div", { className: cn("tw-relative tw-w-full tw-text-grey-600", containerClassName), children: [jsxRuntime.jsx("input", Object.assign({}, props, { ref: inputRef, "aria-invalid": isError, className: cn("tw-relative tw-h-10 tw-w-full tw-rounded-full tw-border tw-border-material-light-thin tw-bg-grey-900 tw-text-body-small tw-font-typography-regular tw-text-grey-300 placeholder:tw-text-grey-600 invalid:tw-outline-status-negative", showIcon ? "tw-pl-[40px]" : "tw-px-squid-s", showActionButton ? "tw-pr-[70px]" : "tw-pr-2.5", isError && "!tw-outline-status-negative", className, isWarning && "focus-visible:tw-outline-status-partial"), placeholder: placeholder })), showIcon ? (jsxRuntime.jsx("div", { className: "tw-absolute tw-inset-y-0 tw-left-0 tw-flex tw-h-full tw-w-[44px] tw-items-center tw-justify-center tw-px-squid-xs", children: icon || jsxRuntime.jsx(SearchIcon, {}) })) : null, showActionButton ? (jsxRuntime.jsx("div", { className: "tw-absolute tw-inset-y-0 tw-right-1.5 tw-flex tw-items-center tw-justify-center", children: jsxRuntime.jsx(InputActionButton, Object.assign({}, actionButtonProps)) })) : null] }));
3331
+ return (jsxRuntime.jsxs("div", { className: cn("tw-relative tw-w-full tw-text-grey-600", containerClassName), children: [jsxRuntime.jsx("input", Object.assign({}, props, { ref: inputRef, "aria-invalid": isError, className: cn("tw-font-regular tw-relative tw-h-10 tw-w-full tw-rounded-full tw-border tw-border-material-light-thin tw-bg-grey-900 tw-text-body-small tw-text-grey-300 placeholder:tw-text-grey-600 invalid:tw-outline-status-negative", showIcon ? "tw-pl-[40px]" : "tw-px-squid-s", showActionButton ? "tw-pr-[70px]" : "tw-pr-2.5", isError && "!tw-outline-status-negative", className, isWarning && "focus-visible:tw-outline-status-partial"), placeholder: placeholder })), showIcon ? (jsxRuntime.jsx("div", { className: "tw-absolute tw-inset-y-0 tw-left-0 tw-flex tw-h-full tw-w-[44px] tw-items-center tw-justify-center tw-px-squid-xs", children: icon || jsxRuntime.jsx(SearchIcon, {}) })) : null, showActionButton ? (jsxRuntime.jsx("div", { className: "tw-absolute tw-inset-y-0 tw-right-1.5 tw-flex tw-items-center tw-justify-center", children: jsxRuntime.jsx(InputActionButton, Object.assign({}, actionButtonProps)) })) : null] }));
3140
3332
  }
3141
3333
  const InputActionButton = ({ onClick, variant = "tertiary", label = "Paste", }) => {
3142
3334
  return (jsxRuntime.jsx(Button$1, { size: "md", variant: variant, onClick: onClick, className: "!tw-h-[30px] !tw-w-fit !tw-min-w-0", children: jsxRuntime.jsx(CaptionText, { children: label }) }));
@@ -16755,9 +16947,9 @@ const ANIMATION_DURATIONS = {
16755
16947
  BOOST_BUTTON: 500,
16756
16948
  };
16757
16949
  const ANIMATION_TIMINGS = {
16758
- EXPAND_ROUTE: "linear", //'cubic-bezier(.32, .72, 0, 1)',
16759
- COLLAPSE_ROUTE: "linear", //'cubic-bezier(.32, .72, 0, 1)',
16760
- CHANGE_SWAP_STEP: "linear", //'cubic-bezier(.4,0,.2,1)',
16950
+ EXPAND_ROUTE: "linear", // 'cubic-bezier(.32, .72, 0, 1)',
16951
+ COLLAPSE_ROUTE: "linear", // 'cubic-bezier(.32, .72, 0, 1)',
16952
+ CHANGE_SWAP_STEP: "linear", // 'cubic-bezier(.4,0,.2,1)',
16761
16953
  SHOW_ROUTE: "cubic-bezier(.165,.84,.44,1)",
16762
16954
  HIDE_ROUTE: "cubic-bezier(.165,.84,.44,1)",
16763
16955
  };
@@ -17271,6 +17463,12 @@ function SunIcon({ size = "24", className, }) {
17271
17463
  function MoonIcon({ size = "20", className, }) {
17272
17464
  return (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsxRuntime.jsx("path", { d: "M10.0463 2.99972C10.2292 2.73432 10.2427 2.38723 10.0809 2.10846C9.91903 1.8297 9.61096 1.66925 9.28979 1.69647C5.02109 2.05816 1.66992 5.63639 1.66992 9.9982C1.66992 14.5997 5.40018 18.33 10.0017 18.33C14.3636 18.33 17.9419 14.9787 18.3035 10.7098C18.3307 10.3887 18.1702 10.0806 17.8914 9.91879C17.6127 9.75698 17.2656 9.77044 17.0002 9.95336C16.1951 10.5083 15.2201 10.8331 14.1667 10.8331C11.4052 10.8331 9.16667 8.59452 9.16667 5.8331C9.16667 4.77977 9.49145 3.80481 10.0463 2.99972Z", fill: "currentColor" }) }));
17273
17465
  }
17466
+ function SunOutlinedIcon({ size = "24", className, }) {
17467
+ return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M12 3V2M12 22V21M18.3598 5.64005L19.0698 4.93005M4.93016 19.07L5.64016 18.36M21 12H22M2 12H3M18.3598 18.36L19.0698 19.07M4.93016 4.93005L5.64016 5.64005M15.5355 8.46447C17.4882 10.4171 17.4882 13.5829 15.5355 15.5355C13.5829 17.4882 10.4171 17.4882 8.46447 15.5355C6.51185 13.5829 6.51185 10.4171 8.46447 8.46447C10.4171 6.51185 13.5829 6.51185 15.5355 8.46447Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
17468
+ }
17469
+ function CrossedOutSunSolidIcon({ size = "20", className, }) {
17470
+ 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", { clipPath: "url(#clip0_3313_9942)", children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 0.833313C10.4603 0.833313 10.8334 1.20641 10.8334 1.66665V2.49998C10.8334 2.96022 10.4603 3.33331 10 3.33331C9.5398 3.33331 9.16671 2.96022 9.16671 2.49998V1.66665C9.16671 1.20641 9.5398 0.833313 10 0.833313ZM10 16.6667C10.4603 16.6667 10.8334 17.0398 10.8334 17.5V18.3333C10.8334 18.7936 10.4603 19.1667 10 19.1667C9.5398 19.1667 9.16671 18.7936 9.16671 18.3333V17.5C9.16671 17.0398 9.5398 16.6667 10 16.6667ZM16.6667 10C16.6667 9.53976 17.0398 9.16666 17.5 9.16666H18.3334C18.7936 9.16666 19.1667 9.53976 19.1667 10C19.1667 10.4602 18.7936 10.8333 18.3334 10.8333H17.5C17.0398 10.8333 16.6667 10.4602 16.6667 10ZM0.833374 10C0.833374 9.53976 1.20647 9.16666 1.66671 9.16666H2.50004C2.96028 9.16666 3.33337 9.53976 3.33337 10C3.33337 10.4602 2.96028 10.8333 2.50004 10.8333H1.66671C1.20647 10.8333 0.833374 10.4602 0.833374 10ZM14.7107 14.7107C15.0361 14.3853 15.5637 14.3853 15.8892 14.7107L16.4808 15.3024C16.8063 15.6278 16.8063 16.1554 16.4808 16.4809C16.1554 16.8063 15.6278 16.8063 15.3023 16.4809L14.7107 15.8892C14.3852 15.5638 14.3852 15.0361 14.7107 14.7107ZM3.51925 3.5191C3.84469 3.19366 4.37232 3.19366 4.69776 3.5191L5.28943 4.11077C5.61486 4.43621 5.61486 4.96384 5.28943 5.28928C4.96399 5.61472 4.43635 5.61472 4.11091 5.28928L3.51925 4.69761C3.19381 4.37218 3.19381 3.84454 3.51925 3.5191ZM6.46451 6.46445C7.91429 5.01466 10.0329 4.64131 11.8271 5.34441L5.34447 11.8271C4.64137 10.0328 5.01472 7.91423 6.46451 6.46445ZM8.17288 14.6555L14.6556 8.17282C15.3587 9.96708 14.9854 12.0857 13.5356 13.5355C12.0858 14.9853 9.96714 15.3587 8.17288 14.6555ZM17.2071 4.20709C17.5976 3.81657 17.5976 3.1834 17.2071 2.79288C16.8166 2.40235 16.1834 2.40235 15.7929 2.79288L2.79289 15.7929C2.40237 16.1834 2.40237 16.8166 2.79289 17.2071C3.18342 17.5976 3.81658 17.5976 4.20711 17.2071L17.2071 4.20709Z", fill: "currentColor" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_3313_9942", children: jsxRuntime.jsx("rect", { width: size, height: size, fill: "currentColor" }) }) })] }));
17471
+ }
17274
17472
 
17275
17473
  const dockIconClassname = "tw-text-grey-900";
17276
17474
  const dockIconSelectedClassname = "group-data-[squid-theme-type=dark]:tw-text-royal-700 group-data-[squid-theme-type=light]:tw-text-volt-700";
@@ -17326,59 +17524,45 @@ function ImageIcon({ size = "20", className, }) {
17326
17524
  function FilterTimelineIcon({ size = "20", className, }) {
17327
17525
  return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsxRuntime.jsx("path", { d: "M5.00117 3.33325C5.46141 3.33325 5.8345 3.70635 5.8345 4.16659V13.8206L6.91042 12.7442C7.23577 12.4186 7.76341 12.4185 8.08894 12.7438C8.41446 13.0692 8.4146 13.5968 8.08925 13.9224L5.59058 16.4224C5.43434 16.5787 5.22241 16.6665 5.00139 16.6666C4.78038 16.6666 4.56839 16.5789 4.41207 16.4227L1.91074 13.9227C1.58521 13.5973 1.58507 13.0697 1.91042 12.7442C2.23577 12.4186 2.76341 12.4185 3.08894 12.7438L4.16784 13.8222V4.16659C4.16784 3.70635 4.54093 3.33325 5.00117 3.33325Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M9.99984 4.99992C9.5396 4.99992 9.1665 5.37301 9.1665 5.83325C9.1665 6.29349 9.5396 6.66659 9.99984 6.66659H16.6665C17.1267 6.66659 17.4998 6.29349 17.4998 5.83325C17.4998 5.37301 17.1267 4.99992 16.6665 4.99992H9.99984Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M13.3332 13.3333C12.8729 13.3333 12.4998 13.7063 12.4998 14.1666C12.4998 14.6268 12.8729 14.9999 13.3332 14.9999H16.6665C17.1267 14.9999 17.4998 14.6268 17.4998 14.1666C17.4998 13.7063 17.1267 13.3333 16.6665 13.3333H13.3332Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M10.8332 9.99992C10.8332 9.53968 11.2063 9.16659 11.6665 9.16659H16.6665C17.1267 9.16659 17.4998 9.53968 17.4998 9.99992C17.4998 10.4602 17.1267 10.8333 16.6665 10.8333H11.6665C11.2063 10.8333 10.8332 10.4602 10.8332 9.99992Z", fill: "currentColor" })] }));
17328
17526
  }
17527
+ function NewspaperIcon({ className, size = "24", }) {
17528
+ return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M12 8C12 6.34315 13.3431 5 15 5H20C21.1046 5 22 5.89543 22 7V17C22 18.1046 21.1046 19 20 19H15.277C14.5966 19 13.9296 19.1642 13.3508 19.5219C12.772 19.8796 12.3043 20.3914 12 21M12 8C12 6.34315 10.6569 5 9 5H4C2.89543 5 2 5.89543 2 7V17C2 18.1046 2.89543 19 4 19H8.723C9.40341 19 10.0704 19.1642 10.6492 19.5219C11.228 19.8796 11.6957 20.3914 12 21M12 8V21", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
17529
+ }
17530
+ function AtomIcon({ className, size = "24", }) {
17531
+ return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: [jsxRuntime.jsx("path", { d: "M19.4739 4.52612C21.0463 6.09858 18.9749 10.7195 14.8472 14.8472C10.7195 18.9749 6.09858 21.0463 4.52612 19.4739C2.95366 17.9014 5.0251 13.2805 9.15281 9.15281C13.2805 5.0251 17.9014 2.95366 19.4739 4.52612Z", stroke: "currentColor", strokeWidth: "2" }), jsxRuntime.jsx("path", { d: "M19.4739 19.4739C17.9014 21.0463 13.2805 18.9749 9.15281 14.8472C5.0251 10.7195 2.95366 6.09858 4.52612 4.52612C6.09858 2.95366 10.7195 5.0251 14.8472 9.15281C18.9749 13.2805 21.0463 17.9014 19.4739 19.4739Z", stroke: "currentColor", strokeWidth: "2" })] }));
17532
+ }
17533
+ function SunriseSmallIcon({ className, size = "20", }) {
17534
+ return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: [jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.99984 1.66663C10.4601 1.66663 10.8332 2.03972 10.8332 2.49996V3.33329C10.8332 3.79353 10.4601 4.16663 9.99984 4.16663C9.5396 4.16663 9.1665 3.79353 9.1665 3.33329V2.49996C9.1665 2.03972 9.5396 1.66663 9.99984 1.66663ZM1.6665 9.99996C1.6665 9.53972 2.0396 9.16663 2.49984 9.16663H3.33317C3.79341 9.16663 4.1665 9.53972 4.1665 9.99996C4.1665 10.4602 3.79341 10.8333 3.33317 10.8333H2.49984C2.0396 10.8333 1.6665 10.4602 1.6665 9.99996ZM15.8332 9.99996C15.8332 9.53972 16.2063 9.16663 16.6665 9.16663H17.4998C17.9601 9.16663 18.3332 9.53972 18.3332 9.99996C18.3332 10.4602 17.9601 10.8333 17.4998 10.8333H16.6665C16.2063 10.8333 15.8332 10.4602 15.8332 9.99996Z", fill: "currentColor" }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14.1241 5.87517C13.7987 5.54973 13.7987 5.0221 14.1241 4.69666L14.7134 4.1074C15.0388 3.78197 15.5665 3.78197 15.8919 4.1074C16.2173 4.43284 16.2173 4.96048 15.8919 5.28592L15.3026 5.87517C14.9772 6.20061 14.4496 6.20061 14.1241 5.87517Z", fill: "currentColor" }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.6665 13.3333C1.6665 12.8731 2.0396 12.5 2.49984 12.5H17.4998C17.9601 12.5 18.3332 12.8731 18.3332 13.3333C18.3332 13.7935 17.9601 14.1666 17.4998 14.1666H2.49984C2.0396 14.1666 1.6665 13.7935 1.6665 13.3333ZM4.99984 16.6666C4.99984 16.2064 5.37293 15.8333 5.83317 15.8333H14.1665C14.6267 15.8333 14.9998 16.2064 14.9998 16.6666C14.9998 17.1269 14.6267 17.5 14.1665 17.5H5.83317C5.37293 17.5 4.99984 17.1269 4.99984 16.6666Z", fill: "currentColor" }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.10785 4.1074C4.43328 3.78197 4.96092 3.78197 5.28636 4.1074L5.87561 4.69666C6.20105 5.0221 6.20105 5.54973 5.87561 5.87517C5.55018 6.20061 5.02254 6.20061 4.6971 5.87517L4.10785 5.28591C3.78241 4.96048 3.78241 4.43284 4.10785 4.1074Z", fill: "currentColor" }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.6665 10.8333C6.20627 10.8333 5.83317 10.4602 5.83317 9.99996C5.83317 7.69877 7.69865 5.83329 9.99984 5.83329C12.301 5.83329 14.1665 7.69877 14.1665 9.99996C14.1665 10.4602 13.7934 10.8333 13.3332 10.8333C11.9184 10.8333 8.08126 10.8333 6.6665 10.8333Z", fill: "currentColor" })] }));
17535
+ }
17536
+ function CoinsOutlinedIcon({ className, size = "24", }) {
17537
+ return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M9 16C5.68629 16 3 13.3137 3 10C3 6.68629 5.68629 4 9 4C11.4597 4 13.5737 5.48012 14.5 7.59829M21 14C21 17.3137 18.3137 20 15 20C12.3841 20 10.1591 18.3259 9.33811 15.9906C9.11911 15.3677 9 14.6978 9 14C9 10.7998 11.5055 8.1847 14.6619 8.00937C14.7738 8.00315 14.8865 8 15 8C18.3137 8 21 10.6863 21 14Z", stroke: "currentColor", strokeWidth: "2" }) }));
17538
+ }
17539
+ function PhoneIcon({ size = "24", className, }) {
17540
+ return (jsxRuntime.jsx("svg", { className: className, xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 25 24", fill: "none", children: jsxRuntime.jsx("path", { d: "M10.5 19H14.5M8.5 22H16.5C17.6046 22 18.5 21.1046 18.5 20V4C18.5 2.89543 17.6046 2 16.5 2H8.5C7.39543 2 6.5 2.89543 6.5 4V20C6.5 21.1046 7.39543 22 8.5 22Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
17541
+ }
17542
+ function LaptopIcon({ size = "24", className, }) {
17543
+ return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 25 24", fill: "none", className: className, children: [jsxRuntime.jsx("path", { d: "M4.5 6C4.5 4.89543 5.39543 4 6.5 4H18.5C19.6046 4 20.5 4.89543 20.5 6V15C20.5 15.5523 20.0523 16 19.5 16H5.5C4.94772 16 4.5 15.5523 4.5 15V6Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M2.5 16H22.5V18C22.5 19.1046 21.6046 20 20.5 20H4.5C3.39543 20 2.5 19.1046 2.5 18V16Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square", strokeLinejoin: "round" })] }));
17544
+ }
17545
+ function CopyIcon({ size = "20", className, }) {
17546
+ return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 21 20", fill: "none", className: className, children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.16663 6.66666V3.54166C7.16663 2.50612 8.00609 1.66666 9.04163 1.66666H16.9583C17.9938 1.66666 18.8333 2.50612 18.8333 3.54166V11.4583C18.8333 12.4939 17.9938 13.3333 16.9583 13.3333H13.8333V16.4583C13.8333 17.4939 12.9938 18.3333 11.9583 18.3333H4.04163C3.00609 18.3333 2.16663 17.4939 2.16663 16.4583V8.54166C2.16663 7.50612 3.00609 6.66666 4.04163 6.66666H7.16663ZM9.04163 13.3333C8.00609 13.3333 7.16663 12.4939 7.16663 11.4583V8.33332H4.04163C3.92657 8.33332 3.83329 8.4266 3.83329 8.54166V16.4583C3.83329 16.5734 3.92657 16.6667 4.04163 16.6667H11.9583C12.0734 16.6667 12.1666 16.5734 12.1666 16.4583V13.3333H9.04163Z", fill: "currentColor" }) }));
17547
+ }
17548
+ function FileDownloadIcon({ size = "20", className, }) {
17549
+ return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 21 20", fill: "none", children: [jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.33337 1.66666H10.5V5.83332C10.5 7.21404 11.6193 8.33332 13 8.33332H17.1667V15.8333C17.1667 17.214 16.0474 18.3333 14.6667 18.3333H6.33337C4.95266 18.3333 3.83337 17.214 3.83337 15.8333V4.16666C3.83337 2.78594 4.95266 1.66666 6.33337 1.66666ZM13.1726 14.3392L11.0893 16.4226C10.7639 16.748 10.2362 16.748 9.91079 16.4226L7.82745 14.3392C7.50201 14.0138 7.50201 13.4862 7.82745 13.1607C8.15289 12.8353 8.68053 12.8353 9.00596 13.1607L9.66671 13.8215V10.8333C9.66671 10.3731 10.0398 9.99999 10.5 9.99999C10.9603 9.99999 11.3334 10.3731 11.3334 10.8333V13.8215L11.9941 13.1607C12.3196 12.8353 12.8472 12.8353 13.1726 13.1607C13.4981 13.4862 13.4981 14.0138 13.1726 14.3392Z", fill: "currentColor" }), jsxRuntime.jsx("path", { d: "M12.1667 2.15481L16.6786 6.66666H13C12.5398 6.66666 12.1667 6.29356 12.1667 5.83332V2.15481Z", fill: "currentColor" })] }));
17550
+ }
17551
+ function CodeSolidSquareIcon({ size = "24", className, }) {
17552
+ return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 25 24", fill: "none", className: className, children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.5 6C3.5 4.34315 4.84315 3 6.5 3H18.5C20.1569 3 21.5 4.34315 21.5 6V18C21.5 19.6569 20.1569 21 18.5 21H6.5C4.84315 21 3.5 19.6569 3.5 18V6ZM11.2071 8.79289C11.5976 9.18342 11.5976 9.81658 11.2071 10.2071L9.41421 12L11.2071 13.7929C11.5976 14.1834 11.5976 14.8166 11.2071 15.2071C10.8166 15.5976 10.1834 15.5976 9.79289 15.2071L8 13.4142C7.21895 12.6332 7.21895 11.3668 8 10.5858L9.79289 8.79289C10.1834 8.40237 10.8166 8.40237 11.2071 8.79289ZM15.2071 8.79289C14.8166 8.40237 14.1834 8.40237 13.7929 8.79289C13.4024 9.18342 13.4024 9.81658 13.7929 10.2071L15.5858 12L13.7929 13.7929C13.4024 14.1834 13.4024 14.8166 13.7929 15.2071C14.1834 15.5976 14.8166 15.5976 15.2071 15.2071L17 13.4142C17.781 12.6332 17.781 11.3668 17 10.5858L15.2071 8.79289Z", fill: "currentColor" }) }));
17553
+ }
17554
+ function CodeBracketsIcon({ size = "20", className, }) {
17555
+ return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 20 20", fill: "none", className: className, children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.8688 2.5249C12.3153 2.63652 12.5867 3.08896 12.4751 3.53546L9.14178 16.8688C9.03015 17.3153 8.57771 17.5868 8.13121 17.4752C7.68472 17.3635 7.41325 16.9111 7.52487 16.4646L10.8582 3.13123C10.9698 2.68474 11.4223 2.41327 11.8688 2.5249ZM5.58925 6.07746C5.91469 6.4029 5.91469 6.93053 5.58925 7.25597L3.43443 9.41079C3.10899 9.73623 3.10899 10.2639 3.43443 10.5893L5.58925 12.7441C5.91469 13.0696 5.91469 13.5972 5.58925 13.9226C5.26381 14.2481 4.73617 14.2481 4.41074 13.9226L2.25591 11.7678C1.2796 10.7915 1.27961 9.20859 2.25592 8.23228L4.41074 6.07746C4.73617 5.75202 5.26381 5.75202 5.58925 6.07746ZM14.4107 6.07746C14.7362 5.75202 15.2638 5.75202 15.5892 6.07746L17.7441 8.23228C18.7204 9.20859 18.7204 10.7915 17.7441 11.7678L15.5892 13.9226C15.2638 14.2481 14.7362 14.2481 14.4107 13.9226C14.0853 13.5972 14.0853 13.0696 14.4107 12.7441L16.5656 10.5893C16.891 10.2639 16.891 9.73623 16.5656 9.41079L14.4107 7.25597C14.0853 6.93053 14.0853 6.4029 14.4107 6.07746Z", fill: "currentColor" }) }));
17556
+ }
17557
+ function CommandIcon({ size = "22", className, }) {
17558
+ return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 22 22", fill: "none", className: className, children: jsxRuntime.jsx("path", { d: "M8 17V17C8 16.0219 8.28951 15.0657 8.83205 14.2519L13.1679 7.74808C13.7105 6.93427 14 5.97808 14 5V5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
17559
+ }
17329
17560
 
17330
17561
  function FeeButton(_a) {
17331
17562
  var { feeInUsd = "0", chipLabel = "Fee", className, tooltip } = _a, props = __rest$1(_a, ["feeInUsd", "chipLabel", "className", "tooltip"]);
17332
17563
  return (jsxRuntime.jsx(Tooltip, Object.assign({}, tooltip, { tooltipWidth: "max", containerClassName: "tw-rounded-squid-m tw-w-full", childrenClassName: "tw-rounded-squid-m", children: jsxRuntime.jsxs("button", Object.assign({}, props, { className: cn("tw-flex tw-h-squid-xl tw-w-full tw-items-center tw-gap-x-squid-xs tw-rounded-squid-m tw-px-squid-xs hover:tw-bg-material-light-thin", className), children: [jsxRuntime.jsx(Chip, { label: chipLabel, className: "tw-hidden mobile-xs:tw-flex" }), jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center", children: [jsxRuntime.jsx(UsdAmount, { usdAmount: feeInUsd }), jsxRuntime.jsx(ChevronDownSmallIcon, { className: "tw-text-grey-600" })] })] })) })));
17333
17564
  }
17334
17565
 
17335
- const lightTheme = {
17336
- // content
17337
- "content-100": "#17191C",
17338
- "content-200": "#292C32",
17339
- "content-300": "#292C32",
17340
- "content-400": "#676B7E",
17341
- "content-500": "#8A8FA8",
17342
- "content-600": "#A7ABBE",
17343
- "content-700": "#D1D6E0",
17344
- "content-800": "#EDEEF3",
17345
- "content-900": "#FBFBFD",
17346
- // accent
17347
- "accent-300": "#8C53C5",
17348
- "accent-400": "#9E79D2",
17349
- "accent-500": "#B893EC",
17350
- "accent-700": "#E3D0FD",
17351
- // status
17352
- "status-positive": "#17CF26",
17353
- "status-negative": "#FF5B4D",
17354
- "status-warning": "#EC9213",
17355
- // highlight
17356
- "highlight-700": "#E4FE53",
17357
- };
17358
- const darkTheme = {
17359
- // content
17360
- "content-100": "#FBFBFD",
17361
- "content-200": "#EDEFF3",
17362
- "content-300": "#D1D6E0",
17363
- "content-400": "#A7ABBE",
17364
- "content-500": "#8A8FA8",
17365
- "content-600": "#676B7E",
17366
- "content-700": "#4C515D",
17367
- "content-800": "#292C32",
17368
- "content-900": "#17191C",
17369
- // accent
17370
- "accent-300": "#D9BEF4",
17371
- "accent-400": "#B893EC",
17372
- "accent-500": "#9E79D2",
17373
- "accent-700": "#6B45A1",
17374
- // status
17375
- "status-positive": "#7AE870",
17376
- "status-negative": "#FF4D5B",
17377
- "status-warning": "#F3AF25",
17378
- // highlight
17379
- "highlight-700": "#08A054",
17380
- };
17381
-
17382
17566
  var createPlugin$2 = {};
17383
17567
 
17384
17568
  var createPlugin$1 = {};
@@ -17487,7 +17671,7 @@ const boxShadow = {
17487
17671
  const backgrounds = {
17488
17672
  "royal-light": "linear-gradient(180deg, #A577D8 0%, #BF91F2 100%)",
17489
17673
  "royal-dark": "linear-gradient(180deg, #BF91F2 0%, #A577D8 100%)",
17490
- "dark-cover": "linear-gradient(90deg, var(--squid-theme-material-dark-thick) 45.4%, transparent 50.85%, var(--squid-theme-material-dark-thick) 55.61%)",
17674
+ "dark-cover": `linear-gradient(90deg, var(${themeKeysToCssVariables.color["material-dark-thick"].cssVariable}) 45.4%, transparent 50.85%, var(${themeKeysToCssVariables.color["material-dark-thick"].cssVariable}) 55.61%)`,
17491
17675
  };
17492
17676
  const baseTailwindConfig = {
17493
17677
  prefix: "tw-",
@@ -17612,13 +17796,13 @@ const baseTailwindConfig = {
17612
17796
  },
17613
17797
  "100%": {
17614
17798
  "backdrop-filter": "blur(20px) saturate(150%)",
17615
- "background-color": `var(${themeTypesKeys["material-dark-average"].cssVariable})`,
17799
+ "background-color": `var(${themeKeysToCssVariables.color["material-dark-average"].cssVariable})`,
17616
17800
  },
17617
17801
  },
17618
17802
  "blur-out": {
17619
17803
  "0%": {
17620
17804
  "backdrop-filter": "blur(20px) saturate(150%)",
17621
- "background-color": `var(${themeTypesKeys["material-dark-average"].cssVariable})`,
17805
+ "background-color": `var(${themeKeysToCssVariables.color["material-dark-average"].cssVariable})`,
17622
17806
  },
17623
17807
  "100%": {
17624
17808
  "backdrop-filter": "blur(0px)",
@@ -17693,9 +17877,7 @@ const baseTailwindConfig = {
17693
17877
  33: "0.33",
17694
17878
  66: "0.66",
17695
17879
  },
17696
- fontFamily: {
17697
- geist: ["Geist", "sans-serif"],
17698
- },
17880
+ fontFamily: mapToCssVariables(themeKeysToCssVariables.fontFamily),
17699
17881
  letterSpacing: {
17700
17882
  // body text
17701
17883
  "body-small": "-0.366px",
@@ -17706,26 +17888,8 @@ const baseTailwindConfig = {
17706
17888
  "heading-medium": "-2.465px",
17707
17889
  "heading-large": "-3.525px",
17708
17890
  },
17709
- fontSize: {
17710
- // caption text
17711
- caption: "0.875rem", // 14px
17712
- // body text
17713
- "body-small": "1.14375rem", // 18.5px
17714
- "body-medium": "1.40625rem", // 22.5px
17715
- "body-large": "1.75625rem", // 28.1px
17716
- // heading
17717
- "heading-small": "2.1875rem", // 35px
17718
- "heading-medium": "3.08125rem", // 49.3px
17719
- "heading-large": "4.40625rem", // 70.5px
17720
- },
17721
- fontWeight: {
17722
- // body text and caption text
17723
- "typography-regular": "400",
17724
- "typography-bold": "600",
17725
- // headings
17726
- "heading-regular": "400",
17727
- "heading-bold": "600",
17728
- },
17891
+ fontSize: mapToCssVariables(themeKeysToCssVariables.fontSize),
17892
+ fontWeight: mapToCssVariables(themeKeysToCssVariables.fontWeight),
17729
17893
  lineHeight: {
17730
17894
  // caption text
17731
17895
  caption: "19.6px",
@@ -17745,14 +17909,11 @@ const baseTailwindConfig = {
17745
17909
  maxWidth: widths,
17746
17910
  maxHeight: heights,
17747
17911
  spacing: spacing$1,
17748
- borderRadius: spacing$1,
17912
+ borderRadius: Object.assign(Object.assign({}, spacing$1), mapToCssVariables(themeKeysToCssVariables.borderRadius)),
17749
17913
  boxShadow,
17750
17914
  backgroundImage: backgrounds,
17751
17915
  backdropBlur,
17752
- colors: Object.assign({}, Object.entries(themeTypesKeys).reduce((acc, [key, { cssVariable }]) => {
17753
- acc[key] = `var(${cssVariable})`;
17754
- return acc;
17755
- }, {})),
17916
+ colors: mapToCssVariables(themeKeysToCssVariables.color),
17756
17917
  },
17757
17918
  },
17758
17919
  plugins: [
@@ -17762,13 +17923,13 @@ const baseTailwindConfig = {
17762
17923
  ".focus-visible-within-outline:has(:focus-visible)": {
17763
17924
  "outline-style": "solid",
17764
17925
  "outline-width": "2px",
17765
- "outline-color": `var(${themeTypesKeys["royal-500"].cssVariable})`,
17926
+ "outline-color": `var(${themeKeysToCssVariables.color["royal-500"].cssVariable})`,
17766
17927
  },
17767
17928
  ".scrollbar-hidden": {
17768
17929
  scrollbarWidth: "none",
17769
17930
  },
17770
17931
  ".highlight-adjacent:has(button:hover)>button:first-child": {
17771
- backgroundColor: `var(${themeTypesKeys["material-light-thin"].cssVariable})`,
17932
+ backgroundColor: `var(${themeKeysToCssVariables.color["material-light-thin"].cssVariable})`,
17772
17933
  },
17773
17934
  ".highlight-adjacent:has(*:hover) .hide-on-parent-hover": {
17774
17935
  opacity: "0",
@@ -17781,9 +17942,94 @@ const baseTailwindConfig = {
17781
17942
  ],
17782
17943
  };
17783
17944
 
17945
+ const defaultFontSize = {
17946
+ caption: "0.875rem", // 14px
17947
+ "body-small": "1.14375rem", // 18.5px
17948
+ "body-medium": "1.40625rem", // 22.5px
17949
+ "body-large": "1.75625rem", // 28.1px
17950
+ "heading-small": "2.1875rem", // 35,px
17951
+ "heading-medium": "3.08125rem", // 49.3px
17952
+ "heading-large": "4.40625rem", // 70.5px
17953
+ };
17954
+ const defaultFontWeight = {
17955
+ caption: "400",
17956
+ "body-small": "400",
17957
+ "body-medium": "400",
17958
+ "body-large": "400",
17959
+ "heading-small": "400",
17960
+ "heading-medium": "400",
17961
+ "heading-large": "400",
17962
+ };
17963
+ const defaultFontFamily = {
17964
+ "squid-main": "Geist, sans-serif",
17965
+ };
17966
+ const defaultBorderRadius = {
17967
+ "button-large": spacing$1["squid-xxl"],
17968
+ "button-medium": spacing$1["squid-m"],
17969
+ };
17970
+ const lightTheme = {
17971
+ borderRadius: defaultBorderRadius,
17972
+ fontSize: defaultFontSize,
17973
+ fontWeight: defaultFontWeight,
17974
+ fontFamily: defaultFontFamily,
17975
+ color: {
17976
+ // content
17977
+ "grey-100": "#17191C",
17978
+ "grey-200": "#292C32",
17979
+ "grey-300": "#292C32",
17980
+ "grey-400": "#676B7E",
17981
+ "grey-500": "#8A8FA8",
17982
+ "grey-600": "#A7ABBE",
17983
+ "grey-700": "#D1D6E0",
17984
+ "grey-800": "#EDEEF3",
17985
+ "grey-900": "#FBFBFD",
17986
+ // accent
17987
+ "royal-300": "#8C53C5",
17988
+ "royal-400": "#9E79D2",
17989
+ "royal-500": "#B893EC",
17990
+ "royal-700": "#E3D0FD",
17991
+ // status
17992
+ "status-positive": "#17CF26",
17993
+ "status-negative": "#FF5B4D",
17994
+ "status-partial": "#EC9213",
17995
+ // highlight
17996
+ "highlight-700": "#E4FE53",
17997
+ },
17998
+ };
17999
+ const darkTheme = {
18000
+ borderRadius: defaultBorderRadius,
18001
+ fontSize: defaultFontSize,
18002
+ fontWeight: defaultFontWeight,
18003
+ fontFamily: defaultFontFamily,
18004
+ color: {
18005
+ // content
18006
+ "grey-100": "#FBFBFD",
18007
+ "grey-200": "#EDEFF3",
18008
+ "grey-300": "#D1D6E0",
18009
+ "grey-400": "#A7ABBE",
18010
+ "grey-500": "#8A8FA8",
18011
+ "grey-600": "#676B7E",
18012
+ "grey-700": "#4C515D",
18013
+ "grey-800": "#292C32",
18014
+ "grey-900": "#17191C",
18015
+ // accent
18016
+ "royal-300": "#D9BEF4",
18017
+ "royal-400": "#B893EC",
18018
+ "royal-500": "#9E79D2",
18019
+ "royal-700": "#6B45A1",
18020
+ // status
18021
+ "status-positive": "#7AE870",
18022
+ "status-negative": "#FF4D5B",
18023
+ "status-partial": "#F3AF25",
18024
+ // highlight
18025
+ "highlight-700": "#08A054",
18026
+ },
18027
+ };
18028
+ const defaultTheme = lightTheme;
18029
+
17784
18030
  function StopsButton(_a) {
17785
18031
  var { stopsCount = 0, estimatedTime = "0s", tooltip, providers } = _a, props = __rest$1(_a, ["stopsCount", "estimatedTime", "tooltip", "providers"]);
17786
- return (jsxRuntime.jsx(Tooltip, Object.assign({}, tooltip, { tooltipWidth: "max", containerClassName: "mobile-lg:tw-w-[190px] tw-rounded-squid-m tw-justify-end tw-flex", childrenClassName: "tw-rounded-squid-m tw-w-fit", children: jsxRuntime.jsxs("button", Object.assign({}, props, { onClick: props.disabled ? undefined : props.onClick, className: "tw-group/stops-button tw-flex tw-h-squid-xl tw-flex-1 tw-items-center tw-justify-end tw-rounded-squid-m tw-pr-squid-xs hover:tw-bg-material-light-thin", children: [jsxRuntime.jsx(Providers, { providers: providers }), jsxRuntime.jsxs(CaptionText, { className: "tw-flex tw-max-w-full tw-items-center tw-gap-[3px] tw-truncate tw-text-grey-500 mobile-lg:tw-w-[50px]", children: [jsxRuntime.jsx("span", { children: stopsCount }), jsxRuntime.jsx("span", { className: "tw-hidden mobile-lg:tw-block", children: "stops" })] }), jsxRuntime.jsx(ChevronDownSmallIcon, { className: "tw-text-grey-600" }), jsxRuntime.jsx("div", { className: "tw-pl-squid-xs", children: jsxRuntime.jsx(Chip, { label: estimatedTime }) })] })) })));
18032
+ return (jsxRuntime.jsx(Tooltip, Object.assign({}, tooltip, { tooltipWidth: "max", containerClassName: "mobile-lg:tw-w-[190px] tw-rounded-squid-m tw-justify-end tw-flex", childrenClassName: "tw-rounded-squid-m tw-w-fit", children: jsxRuntime.jsxs("button", Object.assign({}, props, { onClick: props.disabled ? undefined : props.onClick, className: "tw-group/stops-button tw-flex tw-h-squid-xl tw-flex-1 tw-items-center tw-justify-end tw-rounded-squid-m tw-pr-squid-xs hover:tw-bg-material-light-thin", children: [jsxRuntime.jsx(Providers, { providers: providers }), jsxRuntime.jsxs(CaptionText, { className: "tw-flex tw-max-w-full tw-items-center tw-gap-[3px] tw-truncate tw-text-grey-500 mobile-lg:tw-w-[50px]", children: [jsxRuntime.jsx("span", { children: stopsCount }), jsxRuntime.jsx("span", { className: "tw-hidden mobile-lg:tw-block", children: Number(stopsCount) === 1 ? "stop" : "stops" })] }), jsxRuntime.jsx(ChevronDownSmallIcon, { className: "tw-text-grey-600" }), jsxRuntime.jsx("div", { className: "tw-pl-squid-xs", children: jsxRuntime.jsx(Chip, { label: estimatedTime }) })] })) })));
17787
18033
  }
17788
18034
  const MAX_PROVIDERS = 4;
17789
18035
  const spacing = {
@@ -17837,7 +18083,7 @@ function Menu(_a) {
17837
18083
  return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-max-w-[320px]", containerClassName), ref: menuRef, children: jsxRuntime.jsxs("div", { className: cn("tw-relative tw-inline-flex tw-max-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-m tw-bg-material-dark-thick tw-p-squid-xs tw-text-center tw-text-material-light-thick group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2", borderRadiusClassMap[rounded], contentClassName,
17838
18084
  // :before element to create a backdrop
17839
18085
  // Not applied to the div itself because the backdrop-filter spec does not apply nested backdrop filters
17840
- "before:tw-absolute before:tw-inset-0 before:-tw-z-[1] before:tw-h-full before:tw-w-full before:tw-rounded-squid-m before:tw-backdrop-blur/20 before:tw-backdrop-saturate-150"), children: [typeof children === "string" ? (jsxRuntime.jsx(CaptionText, { className: "tw-z-20 tw-self-stretch !tw-leading-[10px]", children: children })) : (jsxRuntime.jsx("div", Object.assign({}, contentWrapperProps, { className: cn("tw-z-20 tw-max-w-full tw-text-caption", contentWrapperProps === null || contentWrapperProps === void 0 ? void 0 : contentWrapperProps.className), children: children }))), jsxRuntime.jsx("div", { className: cn("tw-absolute tw-inset-0 tw-z-10 tw-h-full tw-w-full tw-border tw-border-material-light-thin tw-bg-material-light-thin", borderRadiusClassMap[rounded]) })] }) })));
18086
+ "before:tw-absolute before:tw-inset-0 before:-tw-z-[1] before:tw-h-full before:tw-w-full before:tw-rounded-squid-m before:tw-backdrop-blur/20 before:tw-backdrop-saturate-150"), children: [typeof children === "string" ? (jsxRuntime.jsx(CaptionText, { className: "tw-z-20 tw-self-stretch !tw-leading-[10px]", children: children })) : (jsxRuntime.jsx("div", Object.assign({}, contentWrapperProps, { className: cn("tw-z-20 tw-max-w-full tw-text-caption tw-font-caption", contentWrapperProps === null || contentWrapperProps === void 0 ? void 0 : contentWrapperProps.className), children: children }))), jsxRuntime.jsx("div", { className: cn("tw-absolute tw-inset-0 tw-z-10 tw-h-full tw-w-full tw-border tw-border-material-light-thin tw-bg-material-light-thin", borderRadiusClassMap[rounded]) })] }) })));
17841
18087
  }
17842
18088
 
17843
18089
  function DropdownMenu({ dropdownRef, className, menuRef, isHidden = false, listClassName, containerClassName, children, contentWrapperProps, menuContentClassName, }) {
@@ -17845,7 +18091,7 @@ function DropdownMenu({ dropdownRef, className, menuRef, isHidden = false, listC
17845
18091
  }
17846
18092
 
17847
18093
  function InfoBox({ title, description, icon }) {
17848
- return (jsxRuntime.jsxs("div", { className: "tw-align-self-stretch tw-flex tw-flex-col tw-items-center tw-gap-squid-xs tw-px-squid-m tw-pb-squid-l tw-pt-squid-xs tw-text-royal-400", children: [icon, jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xxs tw-text-center", children: [jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[9px]", children: title }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: description })] })] }));
18094
+ return (jsxRuntime.jsxs("div", { className: "tw-align-self-stretch tw-flex tw-flex-col tw-items-center tw-gap-squid-xs tw-px-squid-m tw-pb-squid-l tw-pt-squid-xs tw-text-royal-400", children: [icon, jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-pt-squid-xxs tw-text-center", children: [jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[9px]", children: title }), typeof description === "string" ? (jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: description })) : (description)] })] }));
17849
18095
  }
17850
18096
 
17851
18097
  const modalWidthClassMap = {
@@ -18515,7 +18761,7 @@ function LogoContainer({ children }) {
18515
18761
  return (jsxRuntime.jsx("div", { className: "tw-flex tw-h-[60px] tw-w-[60px] tw-items-center tw-justify-center", children: children }));
18516
18762
  }
18517
18763
 
18518
- 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, }) {
18764
+ 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, }) {
18519
18765
  var _a, _b, _c;
18520
18766
  const isWalletButtonInteractive = !isLoading && !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick);
18521
18767
  const WalletButtonTag = isWalletButtonInteractive ? "button" : "div";
@@ -18535,7 +18781,7 @@ function SwapConfiguration({ amount, tokenPrice = 0, isFetching: isFetchingProp
18535
18781
  }, balance: balance, criticalPriceImpactPercentage: criticalPriceImpactPercentage, error: error, formatIfVerySmall: {
18536
18782
  token: "0.001",
18537
18783
  usd: "0.01",
18538
- }, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: !!token, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading })] }));
18784
+ }, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: showNumericInputDetails, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading })] }));
18539
18785
  }
18540
18786
 
18541
18787
  function SwapProgressViewHeader({ title, description, }) {
@@ -18747,6 +18993,69 @@ const useTimer = ({ immediateStart = true, }) => {
18747
18993
  return { timer, stopTimer, startTimer };
18748
18994
  };
18749
18995
 
18996
+ exports.ThemePreference = void 0;
18997
+ (function (ThemePreference) {
18998
+ ThemePreference["LIGHT"] = "light";
18999
+ ThemePreference["DARK"] = "dark";
19000
+ ThemePreference["SYSTEM"] = "system";
19001
+ })(exports.ThemePreference || (exports.ThemePreference = {}));
19002
+ const THEME_STORAGE_KEY = "__squid-app-theme-type__";
19003
+ const THEME_CHANGE_EVENT = "squid-app-theme-change";
19004
+ const THEME_MEDIA_QUERY = "(prefers-color-scheme: light)";
19005
+ function useUserTheme() {
19006
+ const [themePreference, setThemePreference] = React$1.useState(getInitialTheme);
19007
+ const [themeType, setThemeType] = React$1.useState(getEffectiveTheme(themePreference));
19008
+ React$1.useEffect(() => {
19009
+ const handleThemeChange = (e) => {
19010
+ setThemePreference(e.detail);
19011
+ };
19012
+ window.addEventListener(THEME_CHANGE_EVENT, handleThemeChange);
19013
+ return () => {
19014
+ window.removeEventListener(THEME_CHANGE_EVENT, handleThemeChange);
19015
+ };
19016
+ }, []);
19017
+ React$1.useEffect(() => {
19018
+ const mediaQuery = window.matchMedia(THEME_MEDIA_QUERY);
19019
+ const handleChange = () => {
19020
+ if (themePreference === exports.ThemePreference.SYSTEM) {
19021
+ setThemeType(mediaQuery.matches ? "light" : "dark");
19022
+ }
19023
+ };
19024
+ mediaQuery.addEventListener("change", handleChange);
19025
+ handleChange();
19026
+ return () => {
19027
+ mediaQuery.removeEventListener("change", handleChange);
19028
+ };
19029
+ }, [themePreference]);
19030
+ React$1.useEffect(() => {
19031
+ setThemeType(getEffectiveTheme(themePreference));
19032
+ }, [themePreference]);
19033
+ const setThemeManually = (theme) => {
19034
+ setThemePreference(theme);
19035
+ localStorage.setItem(THEME_STORAGE_KEY, theme);
19036
+ window.dispatchEvent(new CustomEvent(THEME_CHANGE_EVENT, { detail: theme }));
19037
+ };
19038
+ const isDarkMode = React$1.useMemo(() => themeType === "dark", [themeType]);
19039
+ return {
19040
+ themePreference,
19041
+ themeType,
19042
+ theme: isDarkMode ? darkTheme : lightTheme,
19043
+ setThemeManually,
19044
+ isDarkMode,
19045
+ };
19046
+ }
19047
+ function getInitialTheme() {
19048
+ var _a;
19049
+ if (typeof window === "undefined")
19050
+ return exports.ThemePreference.SYSTEM;
19051
+ return ((_a = localStorage.getItem(THEME_STORAGE_KEY)) !== null && _a !== void 0 ? _a : exports.ThemePreference.SYSTEM);
19052
+ }
19053
+ function getEffectiveTheme(themeType) {
19054
+ if (themeType !== exports.ThemePreference.SYSTEM)
19055
+ return themeType;
19056
+ return window.matchMedia(THEME_MEDIA_QUERY).matches ? "light" : "dark";
19057
+ }
19058
+
18750
19059
  function BaseDropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick, link, control, detail, isSelected, itemRef, children, contentRef, }) {
18751
19060
  const ContentTag = link
18752
19061
  ? "a"
@@ -18934,7 +19243,7 @@ function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount,
18934
19243
  onClick,
18935
19244
  }
18936
19245
  : {};
18937
- return (jsxRuntime.jsxs("li", { ref: itemRef, className: cn("tw-relative tw-flex tw-h-list-item-large tw-min-w-list-item-small tw-self-stretch tw-bg-grey-900 tw-px-squid-xs tw-text-grey-300", !!dropdownMenuContent && "tw-highlight-adjacent"), children: [jsxRuntime.jsxs(ItemTag, Object.assign({}, itemTagProps, { className: cn("tw-group/history-item tw-peer/history-item tw-relative tw-flex tw-w-full tw-flex-shrink-0 tw-items-center tw-gap-squid-xs tw-self-stretch tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs", isInteractive && "hover:tw-bg-material-light-thin"), children: [jsxRuntime.jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [!!statusBadge[status].badge && (jsxRuntime.jsx("span", { className: cn("tw-absolute -tw-left-[5px] tw-bottom-0 tw-z-10 tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-center tw-overflow-hidden tw-rounded-full tw-border tw-border-grey-900 tw-p-0.5", statusBadge[status].containerClassName), children: statusBadge[status].badge })), jsxRuntime.jsx("img", { src: firstImageUrl, className: "tw-absolute tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" }), jsxRuntime.jsx("img", { src: secondImageUrl, className: "tw-absolute tw-left-5 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-10 tw-flex-1 tw-flex-col tw-self-stretch", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-justify-between tw-text-grey-500", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center", children: [jsxRuntime.jsx(CaptionText, { children: fromLabel }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronRightSmallIcon, {}) }), jsxRuntime.jsx(CaptionText, { children: toLabel })] }), jsxRuntime.jsx("div", { className: cn("tw-hide-on-parent-hover tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs", !!dropdownMenuContent &&
19246
+ return (jsxRuntime.jsxs("li", { ref: itemRef, className: cn("tw-relative tw-flex tw-h-list-item-large tw-min-w-list-item-small tw-self-stretch tw-bg-grey-900 tw-px-squid-xs tw-text-grey-300", !!dropdownMenuContent && "tw-highlight-adjacent"), children: [jsxRuntime.jsxs(ItemTag, Object.assign({}, itemTagProps, { className: cn("tw-group/history-item tw-peer/history-item tw-relative tw-flex tw-w-full tw-flex-shrink-0 tw-items-center tw-gap-squid-xs tw-self-stretch tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs", isInteractive && "hover:tw-bg-material-light-thin"), children: [jsxRuntime.jsxs("div", { className: "tw-relative tw-h-10 tw-w-[60px]", children: [!!statusBadge[status].badge && (jsxRuntime.jsx("span", { className: cn("tw-absolute -tw-left-[5px] tw-bottom-0 tw-z-10 tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-center tw-overflow-hidden tw-rounded-full tw-border tw-border-grey-900 tw-p-0.5", statusBadge[status].containerClassName), children: statusBadge[status].badge })), jsxRuntime.jsx("img", { src: firstImageUrl, className: "tw-absolute tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" }), jsxRuntime.jsx("img", { src: secondImageUrl, className: "tw-absolute tw-left-5 tw-h-10 tw-w-10 tw-rounded-full tw-border tw-border-grey-900" })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-10 tw-flex-1 tw-flex-col tw-self-stretch", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-justify-between tw-text-grey-500", children: [jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center", children: [jsxRuntime.jsx(CaptionText, { children: fromLabel }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronRightSmallIcon, {}) }), jsxRuntime.jsx(CaptionText, { children: toLabel })] }), jsxRuntime.jsx("div", { className: cn("tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs tw-hide-on-parent-hover", !!dropdownMenuContent &&
18938
19247
  "tw-transition-opacity group-hover/history-item:tw-hidden group-hover/history-item:tw-opacity-0 peer-focus:tw-hidden peer-focus:tw-opacity-0", isDropdownOpen && "tw-opacity-0"), children: statusLabel })] }), jsxRuntime.jsxs("div", { className: "tw-flex tw-h-5 tw-items-center tw-gap-squid-xxs tw-text-grey-300", children: [jsxRuntime.jsx(BodyText, { size: "small", children: fromAmount }), jsxRuntime.jsx("span", { className: "tw-text-grey-600", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), jsxRuntime.jsx(BodyText, { size: "small", children: toAmount })] })] })] })), !!dropdownMenuContent && (jsxRuntime.jsx(ListItemActionsButton, { ref: openDropdownButtonRef, onClick: openDropdown, isActive: isDropdownOpen, className: "peer-hover/history-item:tw-opacity-100" })), isDropdownOpen && !!dropdownMenuContent ? (jsxRuntime.jsx(DropdownMenu, { menuRef: menuRef, isHidden: !dropdownStyles, className: cn(!!dropdownStyles &&
18939
19248
  dropdownPositionClassMap[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] }));
18940
19249
  }
@@ -26677,11 +26986,11 @@ function NumericInput(_a) {
26677
26986
  const balanceFormatted = React$1.useMemo(() => {
26678
26987
  return formatTokenAmount(balance !== null && balance !== void 0 ? balance : "0");
26679
26988
  }, [balance]);
26680
- const containerClassname = "tw-px-squid-xs tw-pb-[15px] tw-pt-[5px] tw-text-heading-small tw-font-heading-regular mobile-lg:tw-px-squid-m tw-relative tw-h-[65px] mobile-sm-height:tw-h-[75px]";
26989
+ const containerClassname = "tw-px-squid-xs tw-pb-[15px] tw-pt-[5px] tw-text-heading-small tw-font-regular mobile-lg:tw-px-squid-m tw-relative tw-h-[65px] mobile-sm-height:tw-h-[75px]";
26681
26990
  const inputRef = React$1.useRef(null);
26682
26991
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isInteractive && !isLoading ? (jsxRuntime.jsxs("form", { className: containerClassname, onSubmit: (e) => {
26683
26992
  e.preventDefault();
26684
- }, children: [userInputType === UserInputType.USD && (jsxRuntime.jsx("span", { className: "tw-absolute tw-left-5 tw-top-[11px] tw-leading-[43px] tw-text-grey-600 mobile-lg:tw-left-[30px]", children: "$" })), jsxRuntime.jsx("input", Object.assign({ ref: inputRef, type: "text", value: inputValue, onChange: handleInputChange, placeholder: "0", className: cn("tw-h-[55px] tw-w-full tw-rounded-squid-s tw-bg-transparent tw-px-squid-xs tw-py-squid-s tw-text-grey-300 placeholder:tw-text-grey-600 hover:tw-bg-material-light-thin focus:tw-bg-material-light-thin focus:tw-text-royal-400 focus:tw-outline-none", userInputType === UserInputType.USD && "tw-pl-[33px]") }, props))] })) : (jsxRuntime.jsx("div", { className: cn(containerClassname, (isLoading || Number(inputValue || 0) === 0) && loadingClassName), children: jsxRuntime.jsx("div", { className: "tw-flex tw-h-[55px] tw-w-full tw-items-center 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-grey-300 mobile-sm-height:tw-h-[65px]", children: jsxRuntime.jsx("span", { children: inputValue || 0 }) }) })), !showDetails ? null : (jsxRuntime.jsxs("footer", { className: cn("tw-flex tw-h-squid-m tw-max-h-squid-m tw-items-center tw-justify-between tw-gap-2 tw-px-squid-xs tw-text-grey-500 mobile-lg:tw-px-squid-m", isLoading && loadingClassName), children: [error ? (jsxRuntime.jsx("div", { className: "tw-px-squid-xs", children: jsxRuntime.jsx(ErrorMessage, { message: error.message }) })) : (jsxRuntime.jsx(Tooltip, Object.assign({}, (isLoading
26993
+ }, children: [userInputType === UserInputType.USD && (jsxRuntime.jsx("span", { className: "tw-absolute tw-left-5 tw-top-[11px] tw-leading-[43px] tw-text-grey-600 mobile-lg:tw-left-[30px]", children: "$" })), jsxRuntime.jsx("input", Object.assign({ ref: inputRef, type: "text", value: inputValue, onChange: handleInputChange, placeholder: "0", className: cn("tw-h-[55px] tw-w-full tw-rounded-squid-s tw-bg-transparent tw-px-squid-xs tw-py-squid-s tw-text-grey-300 placeholder:tw-text-grey-600 hover:tw-bg-material-light-thin focus:tw-bg-material-light-thin focus:tw-text-royal-400 focus:tw-outline-none", userInputType === UserInputType.USD && "tw-pl-[33px]") }, props))] })) : (jsxRuntime.jsx("div", { className: cn(containerClassname, (isLoading || Number(inputValue || 0) === 0) && loadingClassName), children: jsxRuntime.jsx("div", { className: "tw-font-regular tw-flex tw-h-[55px] tw-w-full tw-items-center tw-rounded-squid-s tw-bg-transparent tw-px-squid-xs tw-py-squid-s tw-text-heading-small tw-text-grey-300 mobile-sm-height:tw-h-[65px]", children: jsxRuntime.jsx("span", { children: inputValue || 0 }) }) })), !showDetails ? null : (jsxRuntime.jsxs("footer", { className: cn("tw-flex tw-h-squid-m tw-max-h-squid-m tw-items-center tw-justify-between tw-gap-2 tw-px-squid-xs tw-text-grey-500 mobile-lg:tw-px-squid-m", isLoading && loadingClassName), children: [error ? (jsxRuntime.jsx("div", { className: "tw-px-squid-xs", children: jsxRuntime.jsx(ErrorMessage, { message: error.message }) })) : (jsxRuntime.jsx(Tooltip, Object.assign({}, (isLoading
26685
26994
  ? undefined
26686
26995
  : userInputType === UserInputType.TOKEN
26687
26996
  ? inputModeButton === null || inputModeButton === void 0 ? void 0 : inputModeButton.tokenModeTooltip
@@ -26698,7 +27007,7 @@ function NumericInput(_a) {
26698
27007
  : notInteractiveChipClassName), children: [jsxRuntime.jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsxRuntime.jsx(CaptionText, { children: balanceFormatted }), jsxRuntime.jsx(Chip, { label: "Max" })] }) }))] }))] }));
26699
27008
  }
26700
27009
 
26701
- function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSelected, }) {
27010
+ function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSelected = false, }) {
26702
27011
  const [isInputVisible, setIsInputVisible] = React$1.useState(false);
26703
27012
  const [inputValue, setInputValue] = React$1.useState(String(value !== null && value !== void 0 ? value : 0));
26704
27013
  React$1.useEffect(() => {
@@ -26728,11 +27037,14 @@ function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSel
26728
27037
  }, [onChange]);
26729
27038
  const handleKeyDown = React$1.useCallback((e) => {
26730
27039
  // block unwanted (but still valid) characters
26731
- if (["e", "E", "+", "-"].includes(e.key))
26732
- return e.preventDefault();
27040
+ if (["e", "E", "+", "-"].includes(e.key)) {
27041
+ e.preventDefault();
27042
+ return;
27043
+ }
26733
27044
  // close input when pressing escape
26734
- if (e.key === "Escape")
26735
- return handleCloseInput();
27045
+ if (e.key === "Escape") {
27046
+ handleCloseInput();
27047
+ }
26736
27048
  }, []);
26737
27049
  const handleOpenInput = React$1.useCallback(() => {
26738
27050
  setIsInputVisible(true);
@@ -26740,7 +27052,7 @@ function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSel
26740
27052
  const handleCloseInput = React$1.useCallback(() => {
26741
27053
  setIsInputVisible(false);
26742
27054
  }, []);
26743
- return (jsxRuntime.jsxs("div", { ref: sliderRef, className: "tw-relative tw-flex tw-h-[30px] tw-items-center tw-justify-center tw-rounded-squid-xs", children: [jsxRuntime.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-medium tw-leading-[10px] -tw-outline-offset-2 placeholder-shown:tw-text-grey-600 hover:tw-bg-material-light-thin", value === 0 || value === undefined
27055
+ return (jsxRuntime.jsxs("div", { ref: sliderRef, className: "tw-relative tw-flex tw-h-[30px] tw-items-center tw-justify-center tw-rounded-squid-xs", children: [jsxRuntime.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
26744
27056
  ? "tw-text-grey-600"
26745
27057
  : "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, jsxRuntime.jsx(CaptionText, { className: "!tw-font-medium !tw-leading-[10px] tw-text-grey-300", children: type === "percentage" ? "%" : "$" })] }), jsxRuntime.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: jsxRuntime.jsx(Chip, { icon: jsxRuntime.jsx(ChevronGrabberVerticalIcon, { className: "tw-text-grey-900" }) }) }), isInputVisible && (jsxRuntime.jsx(Menu, { menuRef: menuRef, containerClassName: "tw-absolute tw-bottom-full tw-z-10 tw-pb-squid-m tw-w-[160px]", children: jsxRuntime.jsx("form", { onSubmit: (e) => {
26746
27058
  e.preventDefault();
@@ -26882,7 +27194,7 @@ function RangeInput({ label, initialValue, onChange, min = 0, max = 99, isWarnin
26882
27194
  if (event.key === "Enter" || event.key === " ") {
26883
27195
  handleUpdateValue();
26884
27196
  }
26885
- }, onMouseLeave: handleUpdateValue, className: cn("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-medium tw-leading-[10px] placeholder-shown:tw-text-grey-600 hover:tw-bg-material-light-thin"), children: jsxRuntime.jsx(CircleMinusIcon, {}) }), jsxRuntime.jsxs("div", { className: "tw-relative", children: [jsxRuntime.jsx(Input, { step: 0.1, min: min, max: max, isWarning: isWarning, defaultValue: initialValue || "0", placeholder: "0", showIcon: false, type: "number", inputRef: inputRef, onChange: (event) => {
27197
+ }, onMouseLeave: handleUpdateValue, className: cn("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: jsxRuntime.jsx(CircleMinusIcon, {}) }), jsxRuntime.jsxs("div", { className: "tw-relative", children: [jsxRuntime.jsx(Input, { step: 0.1, min: min, max: max, isWarning: isWarning, defaultValue: initialValue !== null && initialValue !== void 0 ? initialValue : "0", placeholder: "0", showIcon: false, type: "number", inputRef: inputRef, onChange: (event) => {
26886
27198
  var _a;
26887
27199
  if (!inputDecoratorRef.current || !inputRef.current)
26888
27200
  return;
@@ -26907,7 +27219,7 @@ function RangeInput({ label, initialValue, onChange, min = 0, max = 99, isWarnin
26907
27219
  if (event.key === "Enter" || event.key === " ") {
26908
27220
  handleUpdateValue();
26909
27221
  }
26910
- }, 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-medium tw-leading-[10px] placeholder-shown:tw-text-grey-600 hover:tw-bg-material-light-thin"), children: jsxRuntime.jsx(CirclePlusIcon, {}) })] })] }) }));
27222
+ }, 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: jsxRuntime.jsx(CirclePlusIcon, {}) })] })] }) }));
26911
27223
  }
26912
27224
 
26913
27225
  const imageClass = "tw-w-[40px] tw-aspect-square tw-flex tw-items-center tw-justify-center";
@@ -26939,9 +27251,9 @@ const outlineWidthMap = {
26939
27251
  };
26940
27252
  function AssetsButton({ chain, token, onClick, variant = "primary", isLoading = false, tooltip, }) {
26941
27253
  var _a;
26942
- const defaultBgColor = `var(${themeTypesKeys[themeKeyVariantMap[variant]].cssVariable})`;
27254
+ const defaultBgColor = `var(${themeKeysToCssVariables.color[themeKeyVariantMap[variant]].cssVariable})`;
26943
27255
  const outlineWidth = outlineWidthMap[isLoading ? "loading" : !!token && !!chain ? "full" : "empty"];
26944
- const chainBgColor = (_a = (chain && chain.bgColor)) !== null && _a !== void 0 ? _a : defaultBgColor;
27256
+ const chainBgColor = (_a = chain === null || chain === void 0 ? void 0 : chain.bgColor) !== null && _a !== void 0 ? _a : defaultBgColor;
26945
27257
  const tokenBgColor = (chain && token && !isLoading && token.bgColor) || defaultBgColor;
26946
27258
  const bgGradient = React$1.useMemo(() => {
26947
27259
  if (!chain || isLoading) {
@@ -26970,7 +27282,7 @@ function AssetsButton({ chain, token, onClick, variant = "primary", isLoading =
26970
27282
  function FilterButton({ selected, numApplied = 0, onClick, }) {
26971
27283
  return (jsxRuntime.jsxs("div", { className: "tw-relative", children: [jsxRuntime.jsx(Button$1, { variant: "tertiary", size: "md", className: cn(selected
26972
27284
  ? "!tw-bg-grey-500 !tw-text-grey-800"
26973
- : "!tw-border-transparent !tw-bg-grey-800 !tw-text-grey-500"), onClick: onClick, children: jsxRuntime.jsx(FilterIcon, {}) }), numApplied > 0 && (jsxRuntime.jsx("div", { className: "tw-absolute tw-right-0 tw-top-0 tw-h-squid-m tw-w-squid-xl -tw-translate-y-1/2 tw-translate-x-1/2 tw-rounded-full tw-bg-[#E4FE53] tw-text-center tw-leading-[1] tw-text-grey-200 dark:tw-text-grey-900", children: jsxRuntime.jsx(CaptionText, { children: numApplied }) }))] }));
27285
+ : "!tw-border-transparent !tw-bg-grey-800 !tw-text-grey-500"), onClick: onClick, children: jsxRuntime.jsx(FilterIcon, {}) }), numApplied > 0 && (jsxRuntime.jsx("div", { className: "tw-absolute tw-right-0 tw-top-0 tw-h-squid-m tw-w-squid-xl -tw-translate-y-1/2 tw-translate-x-1/2 tw-rounded-full tw-bg-volt-700 tw-text-center tw-leading-[1] tw-text-grey-200 dark:tw-text-grey-900", children: jsxRuntime.jsx(CaptionText, { children: numApplied }) }))] }));
26974
27286
  }
26975
27287
 
26976
27288
  function SettingsButton({ label, isSelected = false, onClick, }) {
@@ -26978,9 +27290,10 @@ function SettingsButton({ label, isSelected = false, onClick, }) {
26978
27290
  }
26979
27291
 
26980
27292
  const IconButton = React$1.forwardRef((_a, ref) => {
26981
- var { icon } = _a, props = __rest$1(_a, ["icon"]);
26982
- return (jsxRuntime.jsx("button", Object.assign({}, props, { ref: ref, className: cn("tw-flex tw-h-8 tw-w-8 tw-min-w-8 tw-items-center tw-justify-center tw-rounded-squid-xs hover:tw-bg-material-light-thin", props.disabled ? "tw-text-grey-600" : "tw-text-grey-300", props.className), children: icon })));
27293
+ var { icon, disabled = false } = _a, props = __rest$1(_a, ["icon", "disabled"]);
27294
+ return (jsxRuntime.jsx("button", Object.assign({}, props, { ref: ref, disabled: disabled, className: cn("tw-flex tw-h-8 tw-w-8 tw-min-w-8 tw-items-center tw-justify-center tw-rounded-squid-xs hover:tw-bg-material-light-thin", disabled ? "tw-text-grey-600" : "tw-text-grey-300", props.className), children: icon })));
26983
27295
  });
27296
+ IconButton.displayName = "IconButton";
26984
27297
 
26985
27298
  function AssetsView({ chains, favoriteTokens, popularTokens, userTokens, }) {
26986
27299
  const matchesMobileLg = useMediaQuery(MEDIA_QUERIES.MOBILE_LG.media);
@@ -27124,11 +27437,13 @@ const SearchAddress = ({ type }) => {
27124
27437
  }, icon: jsxRuntime.jsx("img", { src: "/assets/images/blast.jpg", className: "tw-rounded-squid-xxs" }) })) : null, jsxRuntime.jsx(Button$1, { size: "md", variant: "primary", icon: jsxRuntime.jsx(ArrowRightIcon, {}), disabled: type === "recipientEmpty" })] })] }));
27125
27438
  };
27126
27439
 
27127
- function SwapDetailsView({ isLoading, canToggleBoostMode = true, }) {
27440
+ const ROUTING_TOKEN_SUPPORT_ARTICLE = "https://support.squidrouter.com/squid-overview/liquidity-pools/what-is-a-routing-token";
27441
+
27442
+ function SwapDetailsView({ isLoading, canToggleBoostMode = true, displayBoostMode = false, }) {
27128
27443
  const [isModalOpen, setIsModalOpen] = React$1.useState(true);
27129
27444
  return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(Modal, { isOpen: isModalOpen, onBackdropClick: () => {
27130
27445
  setIsModalOpen(false);
27131
- }, children: [jsxRuntime.jsxs(ModalContent, { children: [jsxRuntime.jsx(Settings, { canToggleBoostMode: canToggleBoostMode }), jsxRuntime.jsxs("ul", { className: "tw-flex tw-flex-col tw-items-start tw-gap-squid-xxs tw-self-stretch tw-py-squid-xs", children: [jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ClockOutlineIcon, {}), label: "Estimated time to complete", detail: "~20s" }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ArrowBottomTopIcon, {}), label: "Exchange rate", detail: "1 ETH = 4,031.05 USDC" }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ArrowWallDownIcon, {}), label: "Receive minimum", detail: "750.5 USDC" }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(GasIcon, {}), label: "Cross-chain gas fees", detail: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { children: "0.02534 ETH" }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: "$9.92" })] }) }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ReorderIcon, {}), label: "Expected gas refund", detail: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { children: "-0.06336 ETH" }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: "-$2.48" })] }) }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ReceiptBillIcon, {}), label: "Total fee", detail: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { children: "0.0177 ETH" }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: "$7.43" })] }) })] }), jsxRuntime.jsx(InfoBox, { icon: jsxRuntime.jsx(SnapIcon, {}), title: "Squid\u2019s price commitment", description: "In case of market price fluctuating significantly, your transaction may revert and you will receive axlUSDC on the destination chain instead." })] }), jsxRuntime.jsx(Button$1, { size: "lg", variant: "secondary", label: "Close", onClick: () => {
27446
+ }, children: [jsxRuntime.jsxs(ModalContent, { children: [displayBoostMode && (jsxRuntime.jsx(Settings, { canToggleBoostMode: canToggleBoostMode })), jsxRuntime.jsxs("ul", { className: "tw-flex tw-flex-col tw-items-start tw-gap-squid-xxs tw-self-stretch tw-py-squid-m", children: [jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ArrowBottomTopIcon, {}), label: "Exchange rate", detail: "1 ETH = 4,031.05 USDC" }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ArrowWallDownIcon, {}), label: "Receive minimum", detail: "750.5 USDC" }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(GasIcon, {}), label: "Cross-chain gas fees", detail: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { children: "0.02534 ETH" }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: "$9.92" })] }) }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ReorderIcon, {}), label: "Expected gas refund", detail: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { children: "-0.06336 ETH" }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: "-$2.48" })] }) }), jsxRuntime.jsx(PropertyListItem, { isLoading: isLoading, icon: jsxRuntime.jsx(ReceiptBillIcon, {}), label: "Total fee", detail: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(CaptionText, { children: "0.0177 ETH" }), jsxRuntime.jsx(CaptionText, { className: "tw-text-grey-500", children: "$7.43" })] }) })] }), jsxRuntime.jsx("span", { children: jsxRuntime.jsx(InfoBox, { icon: jsxRuntime.jsx(SnapIcon, {}), title: "Squid's price commitment", description: jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(CaptionText, { className: "tw-text-grey-500", children: ["In case of market prices fluctuating significantly, your transaction may revert and you will receive one of Squid's routing tokens on the destination chain instead.", " ", jsxRuntime.jsx("a", { className: "tw-text-grey-300", href: ROUTING_TOKEN_SUPPORT_ARTICLE, target: "_blank", children: "Learn more" })] }) }) }) })] }), jsxRuntime.jsx(Button$1, { size: "lg", variant: "secondary", label: "Close", onClick: () => {
27132
27447
  setIsModalOpen(false);
27133
27448
  } })] }) }));
27134
27449
  }
@@ -62283,27 +62598,7 @@ function WalletsView() {
62283
62598
  return (jsxRuntime.jsxs(Modal, { maxHeight: true, children: [jsxRuntime.jsxs(ModalContent, { addGap: true, children: [jsxRuntime.jsx("div", { className: "tw-px-squid-xs tw-py-squid-xxs", children: jsxRuntime.jsx(Input, { placeholder: "Select your wallet" }) }), jsxRuntime.jsxs("ul", { className: "tw-flex tw-flex-col tw-gap-squid-xxs tw-overflow-auto tw-py-squid-xxs", children: [jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", detail: "Installed", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Rainbow" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", detail: "Installed", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" }), jsxRuntime.jsx("span", { className: "tw-text-material-light-thin", children: jsxRuntime.jsx(ModalContentDivider, {}) }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", subtitle: "Connect with an Injected Wallet", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Browser Extension" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" }), " ", jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Rainbow" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" }), " ", jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Rainbow" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" }), " ", jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Rainbow" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" })] })] }), jsxRuntime.jsx(Button$1, { size: "lg", variant: "secondary", label: "Cancel" })] }));
62284
62599
  }
62285
62600
 
62286
- // list of the theme variables that need to be replaced
62287
- // from the user readable theme config
62288
- // to the internal theme config
62289
- const themeKeysToReplace = [
62290
- {
62291
- userKey: "content",
62292
- internalKey: "grey",
62293
- },
62294
- {
62295
- userKey: "accent",
62296
- internalKey: "royal",
62297
- },
62298
- {
62299
- userKey: "status-warning",
62300
- internalKey: "status-partial",
62301
- },
62302
- {
62303
- userKey: "highlight",
62304
- internalKey: "volt",
62305
- },
62306
- ];
62601
+ /* eslint-disable @typescript-eslint/prefer-reduce-type-parameter */
62307
62602
  /**
62308
62603
  * Parses the user readable config to css variables
62309
62604
  * Also maps the public theme variables to the internal theme variables
@@ -62325,22 +62620,12 @@ const themeKeysToReplace = [
62325
62620
  */
62326
62621
  const parseSquidTheme = (userTheme) => {
62327
62622
  var _a, _b;
62328
- if (!userTheme)
62623
+ if (userTheme == null)
62329
62624
  return undefined;
62330
- let squidTheme = Object.entries(userTheme).reduce((internalKeys, [userKey, userValue]) => {
62331
- // content-* -> grey-*
62332
- // accent-* -> royal-*
62333
- const keyToReplace = themeKeysToReplace.find((k) => userKey.includes(k.userKey));
62334
- if (keyToReplace) {
62335
- const newKey = userKey.replace(keyToReplace.userKey, keyToReplace.internalKey);
62336
- internalKeys[newKey] = userValue;
62337
- }
62338
- else {
62339
- internalKeys[userKey] = userValue;
62340
- }
62341
- return internalKeys;
62342
- }, {});
62343
- // add material-{light,dark}-{thin,average,thick} colors to the squid theme object
62625
+ console.log({
62626
+ userTheme,
62627
+ });
62628
+ // add material-{light,dark}-{thin,average,thick} colors to the squid theme object
62344
62629
  // using the following formula:
62345
62630
  // material-light-thin -> grey-100 + 10% opacity
62346
62631
  // material-light-average -> grey-100 + 33% opacity
@@ -62349,50 +62634,38 @@ const parseSquidTheme = (userTheme) => {
62349
62634
  // material-dark-average -> grey-900 + 33% opacity
62350
62635
  // material-dark-thick -> grey-900 + 66% opacity
62351
62636
  const materialVariants = {
62352
- "material-light-thin": getHexColorFromOpacityPercentage(squidTheme["grey-100"], 0.1),
62353
- "material-light-average": getHexColorFromOpacityPercentage(squidTheme["grey-100"], 0.33),
62354
- "material-light-thick": getHexColorFromOpacityPercentage(squidTheme["grey-100"], 0.66),
62355
- "material-dark-thin": getHexColorFromOpacityPercentage(squidTheme["grey-900"], 0.1),
62356
- "material-dark-average": getHexColorFromOpacityPercentage(squidTheme["grey-900"], 0.33),
62357
- "material-dark-thick": getHexColorFromOpacityPercentage(squidTheme["grey-900"], 0.66),
62637
+ "material-light-thin": getHexColorFromOpacityPercentage(userTheme.color["grey-100"], 0.1),
62638
+ "material-light-average": getHexColorFromOpacityPercentage(userTheme.color["grey-100"], 0.33),
62639
+ "material-light-thick": getHexColorFromOpacityPercentage(userTheme.color["grey-100"], 0.66),
62640
+ "material-dark-thin": getHexColorFromOpacityPercentage(userTheme.color["grey-900"], 0.1),
62641
+ "material-dark-average": getHexColorFromOpacityPercentage(userTheme.color["grey-900"], 0.33),
62642
+ "material-dark-thick": getHexColorFromOpacityPercentage(userTheme.color["grey-900"], 0.66),
62358
62643
  };
62359
- squidTheme = Object.assign(Object.assign({}, squidTheme), materialVariants);
62360
- const styleKeys = Object.keys(themeTypesKeys);
62361
- const parsed = styleKeys.map((sk) => {
62362
- const themeItem = themeTypesKeys[sk];
62363
- let userValue = squidTheme[sk];
62364
- return {
62365
- [themeItem.cssVariable]: userValue,
62366
- };
62367
- });
62368
- // adds a variant with 0.05 opacity for each color
62369
- // will result in variables like this:
62370
- // var(--squid-theme-grey-100-005) --> grey-100 with 0.05 opacity
62371
- // styleKeys.forEach((sk) => {
62372
- // const themeItem = themeTypesKeys[sk]
62373
- // const valueWith005Opacity = getHexColorFromOpacityPercentage(
62374
- // style[sk], // i.e "#ffffff"
62375
- // 0.05,
62376
- // )
62377
- // // { "--squid-theme-grey-100-005": "#ffffff80" }
62378
- // parsed.push({
62379
- // [`${themeItem.cssVariable}-005`]: valueWith005Opacity,
62380
- // })
62381
- // })
62382
- parsed.push({
62383
- [themeTypesKeys["grey-100-005"].cssVariable]: getHexColorFromOpacityPercentage(squidTheme["grey-100"], 0.05),
62384
- });
62385
- // color representing the blend of material-light and grey-900
62386
- parsed.push({
62387
- [themeTypesKeys["material-light-blend-grey-900"].cssVariable]: (_a = blendColors(squidTheme["material-light-thin"], squidTheme["grey-900"])) !== null && _a !== void 0 ? _a : "",
62388
- });
62389
- // color representing the blend of material-light and grey-300
62390
- parsed.push({
62391
- [themeTypesKeys["material-light-blend-grey-800"].cssVariable]: (_b = blendColors(squidTheme["material-light-thin"], squidTheme["grey-800"])) !== null && _b !== void 0 ? _b : "",
62392
- });
62393
- return parsed.reduce((a, v) => {
62394
- const key = Object.keys(v)[0];
62395
- return Object.assign(Object.assign({}, a), { [key]: v[key] });
62644
+ const opacityVariants = {
62645
+ // opacity variants
62646
+ "grey-100-005": getHexColorFromOpacityPercentage(userTheme.color["grey-100"], 0.05),
62647
+ // color representing the blend of material-light and grey-900
62648
+ "material-light-blend-grey-900": (_a = blendColors(materialVariants["material-light-thin"], userTheme.color["grey-900"])) !== null && _a !== void 0 ? _a : "",
62649
+ // color representing the blend of material-light and grey-300
62650
+ "material-light-blend-grey-800": (_b = blendColors(materialVariants["material-light-thin"], userTheme.color["grey-800"])) !== null && _b !== void 0 ? _b : "",
62651
+ };
62652
+ // Adds the internal colors to the user theme
62653
+ const internalTheme = Object.assign(Object.assign({}, userTheme), { color: Object.assign(Object.assign(Object.assign({}, userTheme.color), materialVariants), opacityVariants) });
62654
+ // return flatten(
62655
+ // {
62656
+ // ...userTheme,
62657
+ // colors: {
62658
+ // ...userTheme,
62659
+ // ...materialVariants,
62660
+ // ...opacityVariants,
62661
+ // },
62662
+ // },
62663
+ // {
62664
+ // prefix: SQUID_THEME_CSS_VARIABLE_PREFIX,
62665
+ // },
62666
+ // );
62667
+ return flatten(internalTheme, {
62668
+ prefix: THEME_CSS_VARIABLE_PREFIX,
62396
62669
  });
62397
62670
  };
62398
62671
  /**
@@ -62411,20 +62684,21 @@ function getHexColorFromOpacityPercentage(color, opacity) {
62411
62684
  .padStart(2, "0")).toUpperCase();
62412
62685
  }
62413
62686
  function hexToRgb(hex) {
62687
+ var _a;
62414
62688
  // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
62415
- let shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;
62416
- hex = hex.replace(shorthandRegex, function (m, r, g, b, a) {
62417
- return r + r + g + g + b + b + (a ? a + a : "");
62689
+ const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;
62690
+ const cleanHex = hex.replace(shorthandRegex, function (m, r, g, b, a) {
62691
+ return r + r + g + g + b + b + (a != null ? a + a : "");
62418
62692
  });
62419
- let result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(hex);
62420
- return result
62421
- ? {
62422
- r: parseInt(result[1], 16),
62423
- g: parseInt(result[2], 16),
62424
- b: parseInt(result[3], 16),
62425
- a: result[4] ? parseInt(result[4], 16) / 255 : 1,
62426
- }
62427
- : null;
62693
+ const [, r, g, b, a] = ((_a = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(cleanHex)) !== null && _a !== void 0 ? _a : []);
62694
+ if (r == null || g == null || b == null)
62695
+ return null;
62696
+ return {
62697
+ r: parseInt(r, 16),
62698
+ g: parseInt(g, 16),
62699
+ b: parseInt(b, 16),
62700
+ a: a != null ? parseInt(a, 16) / 255 : 1,
62701
+ };
62428
62702
  }
62429
62703
  function rgbToHex(r, g, b) {
62430
62704
  return ("#" +
@@ -62441,19 +62715,20 @@ function rgbToHex(r, g, b) {
62441
62715
  // let resultingColor = blendColors(foregroundColor, bgColor)
62442
62716
  // console.log(resultingColor) // Output: ~#2f3033
62443
62717
  function blendColors(foreground, background) {
62444
- let fg = hexToRgb(foreground);
62445
- let bg = hexToRgb(background);
62446
- if (!fg || !bg)
62718
+ const fg = hexToRgb(foreground);
62719
+ const bg = hexToRgb(background);
62720
+ if (fg == null || bg == null)
62447
62721
  return null;
62448
- let r = Math.round(fg.r * fg.a + bg.r * (1 - fg.a));
62449
- let g = Math.round(fg.g * fg.a + bg.g * (1 - fg.a));
62450
- let b = Math.round(fg.b * fg.a + bg.b * (1 - fg.a));
62722
+ const r = Math.round(fg.r * fg.a + bg.r * (1 - fg.a));
62723
+ const g = Math.round(fg.g * fg.a + bg.g * (1 - fg.a));
62724
+ const b = Math.round(fg.b * fg.a + bg.b * (1 - fg.a));
62451
62725
  return rgbToHex(r, g, b);
62452
62726
  }
62453
62727
 
62454
- function SquidConfigProvider({ theme = lightTheme, children, themeType = "light", }) {
62728
+ function ThemeProvider(_a) {
62729
+ var { theme = lightTheme, children, themeType = "light" } = _a, props = __rest$1(_a, ["theme", "children", "themeType"]);
62455
62730
  const parsedStyle = parseSquidTheme(theme);
62456
- return (jsxRuntime.jsx("div", { style: parsedStyle, "data-squid-theme-type": themeType, className: "tw-h-d-screen tw-group tw-relative tw-flex tw-font-geist mobile-lg:tw-h-auto", children: children }));
62731
+ return (jsxRuntime.jsx("div", Object.assign({}, props, { style: Object.assign(Object.assign({}, props.style), parsedStyle), "data-squid-theme-type": themeType, className: cn("tw-font-squid-main tw-group tw-relative tw-flex tw-h-d-screen mobile-lg:tw-h-auto", props.className), children: children })));
62457
62732
  }
62458
62733
 
62459
62734
  exports.ActionLayout = ActionLayout;
@@ -62486,6 +62761,7 @@ exports.ArrowWallDownIcon = ArrowWallDownIcon;
62486
62761
  exports.ArrowsSwapIcon = ArrowsSwapIcon;
62487
62762
  exports.AssetsButton = AssetsButton;
62488
62763
  exports.AssetsView = AssetsView;
62764
+ exports.AtomIcon = AtomIcon;
62489
62765
  exports.BackpackIcon = BackpackIcon;
62490
62766
  exports.BadgeImage = BadgeImage;
62491
62767
  exports.BankIcon = BankIcon;
@@ -62529,17 +62805,23 @@ exports.CircleX = CircleX;
62529
62805
  exports.CircleXFilledIcon = CircleXFilledIcon;
62530
62806
  exports.ClockOutlineIcon = ClockOutlineIcon;
62531
62807
  exports.ClockSolidIcon = ClockSolidIcon;
62808
+ exports.CodeBracketsIcon = CodeBracketsIcon;
62809
+ exports.CodeSolidSquareIcon = CodeSolidSquareIcon;
62532
62810
  exports.CoinsAddIcon = CoinsAddIcon;
62533
62811
  exports.CoinsIcon = CoinsIcon;
62812
+ exports.CoinsOutlinedIcon = CoinsOutlinedIcon;
62534
62813
  exports.Collapse = Collapse;
62535
62814
  exports.CollapsibleMenu = CollapsibleMenu;
62536
62815
  exports.CollectionIcon = CollectionIcon;
62537
62816
  exports.ColorPaletteIcon = ColorPaletteIcon;
62817
+ exports.CommandIcon = CommandIcon;
62538
62818
  exports.CompassRoundOutlinedIcon = CompassRoundOutlinedIcon;
62539
62819
  exports.CompassRoundSolidIcon = CompassRoundSolidIcon;
62540
62820
  exports.ConsoleIcon = ConsoleIcon;
62541
62821
  exports.Copy = Copy;
62822
+ exports.CopyIcon = CopyIcon;
62542
62823
  exports.CrossAnimatedIcon = CrossAnimatedIcon;
62824
+ exports.CrossedOutSunSolidIcon = CrossedOutSunSolidIcon;
62543
62825
  exports.DashboardFast = DashboardFast;
62544
62826
  exports.DescriptionBlocks = DescriptionBlocks;
62545
62827
  exports.DetailsToolbar = DetailsToolbar;
@@ -62568,6 +62850,7 @@ exports.FeeButton = FeeButton;
62568
62850
  exports.FeesAction = FeesAction;
62569
62851
  exports.FeesLines = FeesLines;
62570
62852
  exports.FeesTotal = FeesTotal;
62853
+ exports.FileDownloadIcon = FileDownloadIcon;
62571
62854
  exports.FilledHeartIcon = FilledHeartIcon;
62572
62855
  exports.FilterAscendingIcon = FilterAscendingIcon;
62573
62856
  exports.FilterButton = FilterButton;
@@ -62596,6 +62879,7 @@ exports.InteractionHeader = InteractionHeader;
62596
62879
  exports.InteractionProperties = InteractionProperties;
62597
62880
  exports.InteractionTransactionView = InteractionTransactionView;
62598
62881
  exports.Join = Join;
62882
+ exports.LaptopIcon = LaptopIcon;
62599
62883
  exports.LightningIcon = LightningIcon;
62600
62884
  exports.LimitIcon = LimitIcon;
62601
62885
  exports.LinkIcon = LinkIcon;
@@ -62617,10 +62901,12 @@ exports.ModalContent = ModalContent;
62617
62901
  exports.ModalContentDivider = ModalContentDivider;
62618
62902
  exports.MoonIcon = MoonIcon;
62619
62903
  exports.NavigationBar = NavigationBar;
62904
+ exports.NewspaperIcon = NewspaperIcon;
62620
62905
  exports.NotAllowedIcon = NotAllowedIcon;
62621
62906
  exports.NumericInput = NumericInput;
62622
62907
  exports.PathSquareIcon = PathSquareIcon;
62623
62908
  exports.PercentIcon = PercentIcon;
62909
+ exports.PhoneIcon = PhoneIcon;
62624
62910
  exports.PieChartIcon = PieChartIcon;
62625
62911
  exports.PipeSeparator = PipeSeparator;
62626
62912
  exports.PlusIcon = PlusIcon;
@@ -62659,14 +62945,15 @@ exports.SparklesIcon = SparklesIcon;
62659
62945
  exports.SquareArrowCenter = SquareArrowCenter;
62660
62946
  exports.SquareArrowTopLeftIcon = SquareArrowTopLeftIcon;
62661
62947
  exports.SquareArrowTopRight2Icon = SquareArrowTopRight2Icon;
62662
- exports.SquidConfigProvider = SquidConfigProvider;
62663
62948
  exports.SquidLogo = SquidLogo;
62664
62949
  exports.StakeAction = StakeAction;
62665
62950
  exports.StartAction = StartAction;
62666
62951
  exports.StocksIcon = StocksIcon;
62667
62952
  exports.SuccessAction = SuccessAction;
62668
62953
  exports.SunIcon = SunIcon;
62954
+ exports.SunOutlinedIcon = SunOutlinedIcon;
62669
62955
  exports.SunriseIcon = SunriseIcon;
62956
+ exports.SunriseSmallIcon = SunriseSmallIcon;
62670
62957
  exports.SwapAction = SwapAction;
62671
62958
  exports.SwapConfiguration = SwapConfiguration;
62672
62959
  exports.SwapDetailsView = SwapDetailsView;
@@ -62687,6 +62974,7 @@ exports.Switch = Switch;
62687
62974
  exports.TagIcon = TagIcon;
62688
62975
  exports.TagIconFilled = TagIconFilled;
62689
62976
  exports.TextSkeleton = TextSkeleton;
62977
+ exports.ThemeProvider = ThemeProvider;
62690
62978
  exports.ThumbsUp = ThumbsUp;
62691
62979
  exports.Tick = Tick;
62692
62980
  exports.TimeFliesIcon = TimeFliesIcon;
@@ -62719,6 +63007,7 @@ exports.XSocial = XSocial;
62719
63007
  exports.baseTailwindConfig = baseTailwindConfig;
62720
63008
  exports.cn = cn;
62721
63009
  exports.darkTheme = darkTheme;
63010
+ exports.defaultTheme = defaultTheme;
62722
63011
  exports.lightTheme = lightTheme;
62723
63012
  exports.linkActionTimelineProps = linkActionTimelineProps;
62724
63013
  exports.statusTextClassMap = statusTextClassMap;
@@ -62728,4 +63017,5 @@ exports.useMediaQuery = useMediaQuery;
62728
63017
  exports.useOnResize = useOnResize;
62729
63018
  exports.useRect = useRect;
62730
63019
  exports.useTimer = useTimer;
63020
+ exports.useUserTheme = useUserTheme;
62731
63021
  exports.useVersion = useVersion;