@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.
- package/README.md +4 -4
- package/dist/cjs/index.js +537 -247
- package/dist/cjs/types/components/buttons/AssetsButton.d.ts +2 -2
- package/dist/cjs/types/components/buttons/Button.d.ts +5 -3
- package/dist/cjs/types/components/controls/Input.d.ts +3 -3
- package/dist/cjs/types/components/controls/NumericInput.d.ts +2 -2
- package/dist/cjs/types/components/icons/Generic.d.ts +44 -0
- package/dist/cjs/types/components/icons/Weather.d.ts +8 -0
- package/dist/cjs/types/components/layout/InfoBox.d.ts +3 -3
- package/dist/cjs/types/components/layout/SwapConfiguration.d.ts +2 -1
- package/dist/cjs/types/components/typography/BodyText.d.ts +2 -2
- package/dist/cjs/types/components/typography/HeadingText.d.ts +2 -2
- package/dist/cjs/types/components/views/SwapDetailsView.d.ts +2 -1
- package/dist/cjs/types/core/design-system.d.ts +9 -0
- package/dist/cjs/types/core/externalLinks.d.ts +2 -0
- package/dist/cjs/types/core/index.d.ts +1 -1
- package/dist/cjs/types/core/themes.d.ts +13 -8
- package/dist/cjs/types/core/utils.d.ts +11 -2
- package/dist/cjs/types/hooks/index.d.ts +1 -0
- package/dist/cjs/types/hooks/useUserTheme.d.ts +13 -0
- package/dist/cjs/types/providers/ThemeProvider.d.ts +11 -0
- package/dist/cjs/types/providers/index.d.ts +1 -1
- package/dist/cjs/types/services/internal/colorService.d.ts +9 -4
- package/dist/cjs/types/stories/layout/SwapConfiguration.stories.d.ts +1 -0
- package/dist/cjs/types/stories/views/SwapDetailsView.stories.d.ts +1 -0
- package/dist/cjs/types/types/config.d.ts +28 -29
- package/dist/cjs/types/types/index.d.ts +2 -2
- package/dist/esm/index.js +522 -247
- package/dist/esm/types/components/buttons/AssetsButton.d.ts +2 -2
- package/dist/esm/types/components/buttons/Button.d.ts +5 -3
- package/dist/esm/types/components/controls/Input.d.ts +3 -3
- package/dist/esm/types/components/controls/NumericInput.d.ts +2 -2
- package/dist/esm/types/components/icons/Generic.d.ts +44 -0
- package/dist/esm/types/components/icons/Weather.d.ts +8 -0
- package/dist/esm/types/components/layout/InfoBox.d.ts +3 -3
- package/dist/esm/types/components/layout/SwapConfiguration.d.ts +2 -1
- package/dist/esm/types/components/typography/BodyText.d.ts +2 -2
- package/dist/esm/types/components/typography/HeadingText.d.ts +2 -2
- package/dist/esm/types/components/views/SwapDetailsView.d.ts +2 -1
- package/dist/esm/types/core/design-system.d.ts +9 -0
- package/dist/esm/types/core/externalLinks.d.ts +2 -0
- package/dist/esm/types/core/index.d.ts +1 -1
- package/dist/esm/types/core/themes.d.ts +13 -8
- package/dist/esm/types/core/utils.d.ts +11 -2
- package/dist/esm/types/hooks/index.d.ts +1 -0
- package/dist/esm/types/hooks/useUserTheme.d.ts +13 -0
- package/dist/esm/types/providers/ThemeProvider.d.ts +11 -0
- package/dist/esm/types/providers/index.d.ts +1 -1
- package/dist/esm/types/services/internal/colorService.d.ts +9 -4
- package/dist/esm/types/stories/layout/SwapConfiguration.stories.d.ts +1 -0
- package/dist/esm/types/stories/views/SwapDetailsView.stories.d.ts +1 -0
- package/dist/esm/types/types/config.d.ts +28 -29
- package/dist/esm/types/types/index.d.ts +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +104 -32
- package/package.json +2 -1
- package/dist/cjs/types/providers/SquidConfigProvider.d.ts +0 -9
- package/dist/esm/types/providers/SquidConfigProvider.d.ts +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AssetsButtonVariant } from "../../types/components";
|
|
2
|
-
import { TooltipProps } from "../controls";
|
|
1
|
+
import { type AssetsButtonVariant } from "../../types/components";
|
|
2
|
+
import { type TooltipProps } from "../controls";
|
|
3
3
|
interface AssetsButtonProps {
|
|
4
4
|
token?: {
|
|
5
5
|
iconUrl: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ButtonSize, ButtonVariant } from "../../types/components";
|
|
3
|
-
import { ChipProps } from "./Chip";
|
|
2
|
+
import { type ButtonSize, type ButtonVariant } from "../../types/components";
|
|
3
|
+
import { type ChipProps } from "./Chip";
|
|
4
4
|
interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
5
5
|
label?: string;
|
|
6
6
|
icon?: React.ReactNode;
|
|
@@ -11,6 +11,8 @@ interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
|
11
11
|
isLoading?: boolean;
|
|
12
12
|
chip?: ChipProps;
|
|
13
13
|
containerClassName?: string;
|
|
14
|
+
buttonRef?: React.Ref<HTMLButtonElement>;
|
|
15
|
+
anchorRef?: React.Ref<HTMLAnchorElement>;
|
|
14
16
|
}
|
|
15
|
-
export declare function Button({ label, disabled, size, variant, icon, link, isLoading, chip, containerClassName, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function Button({ label, disabled, size, variant, icon, link, isLoading, chip, containerClassName, anchorRef, buttonRef, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ButtonVariant } from "../../types/components";
|
|
2
|
+
import { type ButtonVariant } from "../../types/components";
|
|
3
3
|
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
showIcon?: boolean;
|
|
@@ -12,9 +12,9 @@ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
|
12
12
|
inputRef?: React.RefObject<HTMLInputElement>;
|
|
13
13
|
}
|
|
14
14
|
export declare function Input({ placeholder, showIcon, className, icon, isError, isWarning, containerClassName, actionButtonProps, autoFocusTimeout, inputRef: inputRefProp, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
|
|
15
|
+
interface InputActionButtonProps {
|
|
16
16
|
onClick?: () => void;
|
|
17
17
|
variant?: ButtonVariant;
|
|
18
18
|
label?: string;
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
20
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SwapDirection } from "../../types/components";
|
|
3
|
-
import { TooltipProps } from "./Tooltip";
|
|
2
|
+
import { type SwapDirection } from "../../types/components";
|
|
3
|
+
import { type TooltipProps } from "./Tooltip";
|
|
4
4
|
interface Token {
|
|
5
5
|
price: number;
|
|
6
6
|
symbol: string;
|
|
@@ -38,3 +38,47 @@ export declare function FilterTimelineIcon({ size, className, }: {
|
|
|
38
38
|
size?: string;
|
|
39
39
|
className?: string;
|
|
40
40
|
}): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function NewspaperIcon({ className, size, }: {
|
|
42
|
+
className?: string;
|
|
43
|
+
size?: string;
|
|
44
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare function AtomIcon({ className, size, }: {
|
|
46
|
+
className?: string;
|
|
47
|
+
size?: string;
|
|
48
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare function SunriseSmallIcon({ className, size, }: {
|
|
50
|
+
className?: string;
|
|
51
|
+
size?: string;
|
|
52
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export declare function CoinsOutlinedIcon({ className, size, }: {
|
|
54
|
+
className?: string;
|
|
55
|
+
size?: string;
|
|
56
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export declare function PhoneIcon({ size, className, }: {
|
|
58
|
+
size?: string;
|
|
59
|
+
className?: string;
|
|
60
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare function LaptopIcon({ size, className, }: {
|
|
62
|
+
size?: string;
|
|
63
|
+
className?: string;
|
|
64
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export declare function CopyIcon({ size, className, }: {
|
|
66
|
+
size?: string;
|
|
67
|
+
className?: string;
|
|
68
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare function FileDownloadIcon({ size, className, }: {
|
|
70
|
+
size?: string;
|
|
71
|
+
className?: string;
|
|
72
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
export declare function CodeSolidSquareIcon({ size, className, }: {
|
|
74
|
+
size?: string;
|
|
75
|
+
className?: string;
|
|
76
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
export declare function CodeBracketsIcon({ size, className, }: {
|
|
78
|
+
size?: string;
|
|
79
|
+
className?: string;
|
|
80
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
export declare function CommandIcon({ size, className, }: {
|
|
82
|
+
size?: string;
|
|
83
|
+
className?: string;
|
|
84
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,3 +10,11 @@ export declare function MoonIcon({ size, className, }: {
|
|
|
10
10
|
size?: string;
|
|
11
11
|
className?: string;
|
|
12
12
|
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function SunOutlinedIcon({ size, className, }: {
|
|
14
|
+
size?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function CrossedOutSunSolidIcon({ size, className, }: {
|
|
18
|
+
size?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
2
|
interface InfoBoxProps {
|
|
3
3
|
title: string;
|
|
4
|
-
description: string;
|
|
5
|
-
icon?:
|
|
4
|
+
description: string | ReactNode;
|
|
5
|
+
icon?: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare function InfoBox({ title, description, icon }: InfoBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -46,6 +46,7 @@ interface SwapConfigurationProps {
|
|
|
46
46
|
emptyAddressLabel?: string;
|
|
47
47
|
disabled?: boolean;
|
|
48
48
|
};
|
|
49
|
+
showNumericInputDetails?: boolean;
|
|
49
50
|
}
|
|
50
|
-
export declare function SwapConfiguration({ amount, tokenPrice, isFetching: isFetchingProp, chain, token, direction, onAmountChange, balance, criticalPriceImpactPercentage, error, priceImpactPercentage, maxUsdDecimals, isInputInteractive, isLoading, inputModeButton, balanceButton, assetsButton, walletButton, }: SwapConfigurationProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare function SwapConfiguration({ amount, tokenPrice, isFetching: isFetchingProp, chain, token, direction, onAmountChange, balance, criticalPriceImpactPercentage, error, priceImpactPercentage, maxUsdDecimals, isInputInteractive, isLoading, inputModeButton, balanceButton, assetsButton, walletButton, showNumericInputDetails, }: SwapConfigurationProps): import("react/jsx-runtime").JSX.Element;
|
|
51
52
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { TextSize } from "../../types/components";
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type TextSize } from "../../types/components";
|
|
3
3
|
interface BodyTextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
size: TextSize;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare function SwapDetailsView({ isLoading, canToggleBoostMode, }: {
|
|
1
|
+
export declare function SwapDetailsView({ isLoading, canToggleBoostMode, displayBoostMode, }: {
|
|
2
2
|
isLoading?: boolean;
|
|
3
3
|
canToggleBoostMode?: boolean;
|
|
4
|
+
displayBoostMode?: boolean;
|
|
4
5
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
import type { Config } from "tailwindcss";
|
|
2
|
+
export declare const spacing: {
|
|
3
|
+
"squid-xxs": string;
|
|
4
|
+
"squid-xs": string;
|
|
5
|
+
"squid-s": string;
|
|
6
|
+
"squid-m": string;
|
|
7
|
+
"squid-l": string;
|
|
8
|
+
"squid-xl": string;
|
|
9
|
+
"squid-xxl": string;
|
|
10
|
+
};
|
|
2
11
|
export declare const baseTailwindConfig: Config;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ROUTING_TOKEN_SUPPORT_ARTICLE = "https://support.squidrouter.com/squid-overview/liquidity-pools/what-is-a-routing-token";
|
|
2
|
+
export declare const PRICE_IMPACT_SUPPORT_ARTICLE = "https://support.squidrouter.com/swapping-with-squid/squid-settings-and-features/what-is-price-impact";
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { ThemeType } from "../types/components";
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
1
|
+
import { type ThemeType } from "../types/components";
|
|
2
|
+
import { type Theme } from "../types/config";
|
|
3
|
+
export interface ThemeConfig {
|
|
4
4
|
name: string;
|
|
5
5
|
themeImgPath: string;
|
|
6
6
|
websiteBackgroundColor: string;
|
|
7
|
-
theme:
|
|
7
|
+
theme: Theme;
|
|
8
8
|
type: ThemeType;
|
|
9
|
-
}
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
9
|
+
}
|
|
10
|
+
export declare const defaultFontSize: Theme["fontSize"];
|
|
11
|
+
export declare const defaultFontWeight: Theme["fontWeight"];
|
|
12
|
+
export declare const defaultFontFamily: Theme["fontFamily"];
|
|
13
|
+
export declare const defaultBorderRadius: Theme["borderRadius"];
|
|
14
|
+
export declare const lightTheme: Theme;
|
|
15
|
+
export declare const darkTheme: Theme;
|
|
16
|
+
export declare const defaultTheme: Required<Theme>;
|
|
17
|
+
export declare const themes: ThemeConfig[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ClassValue } from "clsx";
|
|
2
|
-
import { ComponentProps, ElementType } from "react";
|
|
1
|
+
import { type ClassValue } from "clsx";
|
|
2
|
+
import { type ComponentProps, type ElementType } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* Combines multiple class names into a single string
|
|
5
5
|
*
|
|
@@ -35,4 +35,13 @@ export declare const calcLerp: (a: string, b: string, t: string | number) => str
|
|
|
35
35
|
* @returns The filtered array
|
|
36
36
|
*/
|
|
37
37
|
export declare const getFirstUniques: <T>(array: T[], key: keyof T, count: number) => T[];
|
|
38
|
+
interface FlattenOptions {
|
|
39
|
+
prefix?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function flatten<T extends Record<string, any>>(obj: T, options?: FlattenOptions): Record<string, string>;
|
|
42
|
+
interface ReplaceKeysOptions {
|
|
43
|
+
keysToReplace: Array<[string, string]>;
|
|
44
|
+
}
|
|
45
|
+
export declare function replaceKeys(obj: Record<string, any>, options: ReplaceKeysOptions): Record<string, any>;
|
|
46
|
+
export declare function mapToCssVariables<T extends Record<string, any>>(obj: T): Record<keyof T & string, string>;
|
|
38
47
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ThemeType } from "../types";
|
|
2
|
+
export declare enum ThemePreference {
|
|
3
|
+
LIGHT = "light",
|
|
4
|
+
DARK = "dark",
|
|
5
|
+
SYSTEM = "system"
|
|
6
|
+
}
|
|
7
|
+
export declare function useUserTheme(): {
|
|
8
|
+
themePreference: ThemePreference;
|
|
9
|
+
themeType: ThemeType;
|
|
10
|
+
theme: import("../types").Theme;
|
|
11
|
+
setThemeManually: (theme: ThemePreference) => void;
|
|
12
|
+
isDarkMode: boolean;
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "../styles/compiled-tailwind.css";
|
|
3
|
+
import { type Theme } from "../types";
|
|
4
|
+
import { type ThemeType } from "../types/components";
|
|
5
|
+
interface ThemeProviderProps extends React.ComponentProps<"div"> {
|
|
6
|
+
theme?: Theme;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
themeType?: ThemeType;
|
|
9
|
+
}
|
|
10
|
+
export declare function ThemeProvider({ theme, children, themeType, ...props }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./ThemeProvider";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type Theme } from "../../types/config";
|
|
2
2
|
/**
|
|
3
3
|
* Parses the user readable config to css variables
|
|
4
4
|
* Also maps the public theme variables to the internal theme variables
|
|
@@ -18,9 +18,7 @@ import { SquidTheme } from "../../types/config";
|
|
|
18
18
|
* }
|
|
19
19
|
* @param style
|
|
20
20
|
*/
|
|
21
|
-
export declare const parseSquidTheme: (userTheme?:
|
|
22
|
-
[key: string]: string | undefined;
|
|
23
|
-
} | undefined;
|
|
21
|
+
export declare const parseSquidTheme: (userTheme?: Theme) => Record<string, string | undefined> | undefined;
|
|
24
22
|
export declare function getContrastColor({ r, g, b, }: {
|
|
25
23
|
r: number;
|
|
26
24
|
g: number;
|
|
@@ -36,4 +34,11 @@ export declare function getContrastColor({ r, g, b, }: {
|
|
|
36
34
|
* @returns {string} The hexadecimal color with opacity.
|
|
37
35
|
*/
|
|
38
36
|
export declare function getHexColorFromOpacityPercentage(color: string, opacity: number): string;
|
|
37
|
+
export declare function hexToRgb(hex: string): {
|
|
38
|
+
r: number;
|
|
39
|
+
g: number;
|
|
40
|
+
b: number;
|
|
41
|
+
a: number;
|
|
42
|
+
} | null;
|
|
43
|
+
export declare function rgbToHex(r: number, g: number, b: number): string;
|
|
39
44
|
export declare function blendColors(foreground: string, background: string): string | null;
|
|
@@ -4,6 +4,7 @@ declare const meta: Meta<typeof SwapConfiguration>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const EmptyVariantPrimary: Story;
|
|
7
|
+
export declare const EmptyVariantWithoutNumericInputDetails: Story;
|
|
7
8
|
export declare const EmptyVariantAccent: Story;
|
|
8
9
|
export declare const Loading: Story;
|
|
9
10
|
export declare const LoadingWithAllProps: Story;
|
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
declare const THEME_COLOR_KEYS: readonly ["grey-100", "grey-200", "grey-300", "grey-400", "grey-500", "grey-600", "grey-700", "grey-800", "grey-900", "royal-300", "royal-400", "royal-500", "royal-700", "status-positive", "status-negative", "status-partial", "material-light-thin", "material-light-average", "material-light-thick", "material-dark-thin", "material-dark-average", "material-dark-thick", "highlight-700", "grey-100-005", "material-light-blend-grey-900", "material-light-blend-grey-800"];
|
|
2
|
+
declare const THEME_BORDER_RADIUS_KEYS: readonly ["button-large", "button-medium"];
|
|
3
|
+
declare const THEME_FONT_SIZE_KEYS: readonly ["caption", "body-large", "body-medium", "body-small", "heading-small", "heading-medium", "heading-large"];
|
|
4
|
+
declare const THEME_FONT_WEIGHT_KEYS: readonly ["caption", "body-small", "body-medium", "body-large", "heading-small", "heading-medium", "heading-large"];
|
|
5
|
+
declare const THEME_FONT_FAMILY_KEYS: readonly ["squid-main"];
|
|
6
|
+
type ThemeColors = Record<(typeof THEME_COLOR_KEYS)[number], string>;
|
|
7
|
+
type ThemeFontSize = Record<(typeof THEME_FONT_SIZE_KEYS)[number], string>;
|
|
8
|
+
type ThemeFontWeight = Record<(typeof THEME_FONT_WEIGHT_KEYS)[number], string>;
|
|
9
|
+
type ThemeBorderRadius = Record<(typeof THEME_BORDER_RADIUS_KEYS)[number], string>;
|
|
10
|
+
type ThemeFontFamily = Record<(typeof THEME_FONT_FAMILY_KEYS)[number], string>;
|
|
11
|
+
export interface InternalTheme {
|
|
12
|
+
color: ThemeColors;
|
|
13
|
+
fontSize: ThemeFontSize;
|
|
14
|
+
fontWeight: ThemeFontWeight;
|
|
15
|
+
borderRadius: ThemeBorderRadius;
|
|
16
|
+
fontFamily: ThemeFontFamily;
|
|
17
|
+
}
|
|
18
|
+
export interface Theme extends Omit<InternalTheme, "color"> {
|
|
19
|
+
color: Omit<ThemeColors, "material-light-thin" | "material-light-average" | "material-light-thick" | "material-dark-thin" | "material-dark-average" | "material-dark-thick" | "grey-100-005" | "material-light-blend-grey-900" | "material-light-blend-grey-800">;
|
|
20
|
+
}
|
|
21
|
+
interface CssVariable {
|
|
22
|
+
cssVariable: string;
|
|
23
|
+
}
|
|
24
|
+
type ThemeCssVariables = {
|
|
25
|
+
[K in keyof InternalTheme]: Record<keyof InternalTheme[K], CssVariable>;
|
|
25
26
|
};
|
|
26
|
-
export declare const SQUID_THEME_CSS_VARIABLE_PREFIX = "--squid-theme-";
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* 'st' = Squid Theme
|
|
29
29
|
*/
|
|
30
|
-
export declare const
|
|
31
|
-
|
|
32
|
-
}>;
|
|
30
|
+
export declare const THEME_CSS_VARIABLE_PREFIX = "--st-";
|
|
31
|
+
export declare const themeKeysToCssVariables: ThemeCssVariables;
|
|
33
32
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { Theme } from "./config";
|
|
2
2
|
export * from "./utils";
|
|
3
|
-
export type { SwapState, ThemeType, SwapStep, HistoryItemStatus, ActionStatus, AssetsButtonVariant, DescriptionBlock, } from "./components";
|
|
3
|
+
export type { SwapState, ThemeType, SwapStep, HistoryItemStatus, ActionStatus, AssetsButtonVariant, ButtonVariant, ButtonSize, DescriptionBlock, } from "./components";
|