@0xsquid/ui 2.2.0 → 2.2.3
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/dist/cjs/index.js +93 -32
- package/dist/cjs/types/components/controls/NumericInput.d.ts +1 -0
- package/dist/cjs/types/components/layout/SwapConfiguration.d.ts +1 -0
- package/dist/cjs/types/components/layout/SwapStepsCollapsed.d.ts +3 -3
- package/dist/cjs/types/components/lists/DropdownMenuItem.d.ts +2 -2
- package/dist/cjs/types/core/index.d.ts +1 -1
- package/dist/cjs/types/stories/layout/DetailsToolbar.stories.d.ts +1 -1
- package/dist/cjs/types/stories/layout/SwapConfiguration.stories.d.ts +2 -1
- package/dist/cjs/types/types/config.d.ts +9 -6
- package/dist/esm/index.js +93 -33
- package/dist/esm/types/components/controls/NumericInput.d.ts +1 -0
- package/dist/esm/types/components/layout/SwapConfiguration.d.ts +1 -0
- package/dist/esm/types/components/layout/SwapStepsCollapsed.d.ts +3 -3
- package/dist/esm/types/components/lists/DropdownMenuItem.d.ts +2 -2
- package/dist/esm/types/core/index.d.ts +1 -1
- package/dist/esm/types/stories/layout/DetailsToolbar.stories.d.ts +1 -1
- package/dist/esm/types/stories/layout/SwapConfiguration.stories.d.ts +2 -1
- package/dist/esm/types/types/config.d.ts +9 -6
- package/dist/index.css +1 -1
- package/dist/index.d.ts +23 -9
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -2875,7 +2875,7 @@ function Checkmark1Icon({ className, size = "16", }) {
|
|
|
2875
2875
|
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", className: className, children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12.8809 2.82977C13.3432 3.13201 13.4729 3.75174 13.1706 4.21399L7.50398 12.8807C7.3318 13.144 7.04572 13.3109 6.73174 13.3313C6.41777 13.3517 6.11252 13.2231 5.90775 12.9842L2.90775 9.4842C2.54833 9.06487 2.59689 8.43357 3.01622 8.07415C3.43554 7.71473 4.06684 7.76329 4.42627 8.18262L6.55918 10.671L11.4967 3.11949C11.7989 2.65725 12.4187 2.52753 12.8809 2.82977Z", fill: "currentColor" }) }));
|
|
2876
2876
|
}
|
|
2877
2877
|
function Checkmark2Icon({ className, size = "16", style, }) {
|
|
2878
|
-
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM15.774 10.1333C16.1237 9.70582 16.0607 9.0758 15.6332 8.72607C15.2058 8.37635 14.5758 8.43935 14.226 8.86679L10.4258 13.5116L9.20711 12.2929C8.81658 11.9024 8.18342 11.9024 7.79289 12.2929C7.40237 12.6834 7.40237 13.3166 7.79289 13.7071L9.79289 15.7071C9.99267 15.9069 10.2676 16.0129 10.5498 15.9988C10.832 15.9847 11.095 15.8519 11.274 15.6333L15.774 10.1333Z", fill: "
|
|
2878
|
+
return (jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM15.774 10.1333C16.1237 9.70582 16.0607 9.0758 15.6332 8.72607C15.2058 8.37635 14.5758 8.43935 14.226 8.86679L10.4258 13.5116L9.20711 12.2929C8.81658 11.9024 8.18342 11.9024 7.79289 12.2929C7.40237 12.6834 7.40237 13.3166 7.79289 13.7071L9.79289 15.7071C9.99267 15.9069 10.2676 16.0129 10.5498 15.9988C10.832 15.9847 11.095 15.8519 11.274 15.6333L15.774 10.1333Z", fill: "currentColor", className: className, style: style }) }));
|
|
2879
2879
|
}
|
|
2880
2880
|
|
|
2881
2881
|
function DotGrid1x3HorizontalIcon({ className, size = "16", }) {
|
|
@@ -3146,14 +3146,14 @@ const THEME_COLOR_KEYS = [
|
|
|
3146
3146
|
"status-positive",
|
|
3147
3147
|
"status-negative",
|
|
3148
3148
|
"status-partial",
|
|
3149
|
-
//
|
|
3149
|
+
// lg button variant colors
|
|
3150
3150
|
"button-lg-primary-bg",
|
|
3151
3151
|
"button-lg-primary-text",
|
|
3152
3152
|
"button-lg-secondary-bg",
|
|
3153
3153
|
"button-lg-secondary-text",
|
|
3154
3154
|
"button-lg-tertiary-bg",
|
|
3155
3155
|
"button-lg-tertiary-text",
|
|
3156
|
-
//
|
|
3156
|
+
// md button variant colors
|
|
3157
3157
|
"button-md-primary-bg",
|
|
3158
3158
|
"button-md-primary-text",
|
|
3159
3159
|
"button-md-secondary-bg",
|
|
@@ -3170,6 +3170,10 @@ const THEME_COLOR_KEYS = [
|
|
|
3170
3170
|
"animation-text",
|
|
3171
3171
|
// modal
|
|
3172
3172
|
"modal-backdrop",
|
|
3173
|
+
// menu
|
|
3174
|
+
"menu-bg",
|
|
3175
|
+
"menu-text",
|
|
3176
|
+
"menu-backdrop",
|
|
3173
3177
|
// material-* variants are generated internally and are not part of the public theme
|
|
3174
3178
|
"material-light-thin",
|
|
3175
3179
|
"material-light-average",
|
|
@@ -3193,8 +3197,8 @@ const THEME_BORDER_RADIUS_KEYS = [
|
|
|
3193
3197
|
"button-md-tertiary",
|
|
3194
3198
|
"container",
|
|
3195
3199
|
"input",
|
|
3196
|
-
"
|
|
3197
|
-
"
|
|
3200
|
+
"menu-sm",
|
|
3201
|
+
"menu-lg",
|
|
3198
3202
|
"modal",
|
|
3199
3203
|
];
|
|
3200
3204
|
const THEME_FONT_SIZE_KEYS = [
|
|
@@ -3246,7 +3250,7 @@ function SearchIcon({ className, size = "24", }) {
|
|
|
3246
3250
|
|
|
3247
3251
|
function Input(_a) {
|
|
3248
3252
|
var { placeholder = "Search", showIcon = true, className, icon, isError = false, isWarning = false, containerClassName, actionButtonProps, autoFocusTimeout, inputRef: inputRefProp } = _a, props = __rest$1(_a, ["placeholder", "showIcon", "className", "icon", "isError", "isWarning", "containerClassName", "actionButtonProps", "autoFocusTimeout", "inputRef"]);
|
|
3249
|
-
const showActionButton =
|
|
3253
|
+
const showActionButton = actionButtonProps != null;
|
|
3250
3254
|
const localInputRef = React$1.useRef(null);
|
|
3251
3255
|
const inputRef = inputRefProp !== null && inputRefProp !== void 0 ? inputRefProp : localInputRef;
|
|
3252
3256
|
React$1.useEffect(() => {
|
|
@@ -3260,10 +3264,10 @@ function Input(_a) {
|
|
|
3260
3264
|
clearTimeout(timeoutId);
|
|
3261
3265
|
};
|
|
3262
3266
|
}, [autoFocusTimeout]);
|
|
3263
|
-
return (jsxRuntime.jsxs("div", { className: cn("tw-
|
|
3267
|
+
return (jsxRuntime.jsxs("div", { className: cn("tw-relative tw-w-full tw-text-input-placeholder", 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-input tw-border tw-border-material-light-thin tw-bg-input-bg tw-text-body-small tw-text-input-text selection:tw-bg-input-selection placeholder:tw-text-input-placeholder 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] }));
|
|
3264
3268
|
}
|
|
3265
3269
|
const InputActionButton = ({ onClick, variant = "tertiary", label = "Paste", }) => {
|
|
3266
|
-
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 }) }));
|
|
3270
|
+
return (jsxRuntime.jsx(Button$1, { size: "md", variant: variant, onClick: onClick, className: "!tw-h-[30px] !tw-w-fit !tw-min-w-0 !tw-rounded-input", children: jsxRuntime.jsx(CaptionText, { children: label }) }));
|
|
3267
3271
|
};
|
|
3268
3272
|
|
|
3269
3273
|
/*
|
|
@@ -7395,7 +7399,6 @@ const create = (createState) => createState ? createImpl(createState) : createIm
|
|
|
7395
7399
|
|
|
7396
7400
|
const useSettingsStore = create(() => ({
|
|
7397
7401
|
showProgressAnimation: true,
|
|
7398
|
-
showModalBackdrop: true,
|
|
7399
7402
|
}));
|
|
7400
7403
|
|
|
7401
7404
|
const AnimationWrapper = (playerProps) => {
|
|
@@ -18458,9 +18461,9 @@ const defaultBorderRadius = {
|
|
|
18458
18461
|
"button-md-secondary": spacing$1["squid-m"],
|
|
18459
18462
|
"button-md-tertiary": spacing$1["squid-m"],
|
|
18460
18463
|
container: spacing$1["squid-l"],
|
|
18461
|
-
input: "
|
|
18462
|
-
"
|
|
18463
|
-
"
|
|
18464
|
+
input: "9999px",
|
|
18465
|
+
"menu-sm": spacing$1["squid-s"],
|
|
18466
|
+
"menu-lg": spacing$1["squid-m"],
|
|
18464
18467
|
modal: spacing$1["squid-l"],
|
|
18465
18468
|
};
|
|
18466
18469
|
const lightTheme = {
|
|
@@ -18493,6 +18496,33 @@ const lightTheme = {
|
|
|
18493
18496
|
"status-partial": "#EC9213",
|
|
18494
18497
|
// highlight
|
|
18495
18498
|
"highlight-700": "#E4FE53",
|
|
18499
|
+
// animation
|
|
18500
|
+
"animation-bg": "#B893EC",
|
|
18501
|
+
"animation-text": "#FBFBFD",
|
|
18502
|
+
// buttons
|
|
18503
|
+
"button-lg-primary-bg": "#B893EC",
|
|
18504
|
+
"button-lg-primary-text": "#FBFBFD",
|
|
18505
|
+
"button-lg-secondary-bg": "#17191C",
|
|
18506
|
+
"button-lg-secondary-text": "#EDEEF3",
|
|
18507
|
+
"button-lg-tertiary-bg": "#EDEEF3",
|
|
18508
|
+
"button-lg-tertiary-text": "#292C32",
|
|
18509
|
+
"button-md-primary-bg": "#B893EC",
|
|
18510
|
+
"button-md-primary-text": "#FBFBFD",
|
|
18511
|
+
"button-md-secondary-bg": "#17191C",
|
|
18512
|
+
"button-md-secondary-text": "#EDEEF3",
|
|
18513
|
+
"button-md-tertiary-bg": "#EDEEF3",
|
|
18514
|
+
"button-md-tertiary-text": "#292C32",
|
|
18515
|
+
// input
|
|
18516
|
+
"input-bg": "#FBFBFD",
|
|
18517
|
+
"input-placeholder": "#A7ABBE",
|
|
18518
|
+
"input-selection": "#292C32",
|
|
18519
|
+
"input-text": "#292C32",
|
|
18520
|
+
// menu
|
|
18521
|
+
"menu-bg": "#FBFBFDA8",
|
|
18522
|
+
"menu-text": "#17191CA8",
|
|
18523
|
+
"menu-backdrop": "#17191C1A",
|
|
18524
|
+
// modal
|
|
18525
|
+
"modal-backdrop": "#FBFBFD54",
|
|
18496
18526
|
},
|
|
18497
18527
|
};
|
|
18498
18528
|
const darkTheme = {
|
|
@@ -18525,6 +18555,33 @@ const darkTheme = {
|
|
|
18525
18555
|
"status-partial": "#F3AF25",
|
|
18526
18556
|
// highlight
|
|
18527
18557
|
"highlight-700": "#E4FE53",
|
|
18558
|
+
// animation
|
|
18559
|
+
"animation-bg": "#9E79D2",
|
|
18560
|
+
"animation-text": "#FBFBFD",
|
|
18561
|
+
// buttons
|
|
18562
|
+
"button-lg-primary-bg": "#9E79D2",
|
|
18563
|
+
"button-lg-primary-text": "#FBFBFD",
|
|
18564
|
+
"button-lg-secondary-bg": "#FBFBFD",
|
|
18565
|
+
"button-lg-secondary-text": "#292C32",
|
|
18566
|
+
"button-lg-tertiary-bg": "#292C32",
|
|
18567
|
+
"button-lg-tertiary-text": "#D1D6E0",
|
|
18568
|
+
"button-md-primary-bg": "#9E79D2",
|
|
18569
|
+
"button-md-primary-text": "#FBFBFD",
|
|
18570
|
+
"button-md-secondary-bg": "#FBFBFD",
|
|
18571
|
+
"button-md-secondary-text": "#292C32",
|
|
18572
|
+
"button-md-tertiary-bg": "#292C32",
|
|
18573
|
+
"button-md-tertiary-text": "#D1D6E0",
|
|
18574
|
+
// input
|
|
18575
|
+
"input-bg": "#17191C",
|
|
18576
|
+
"input-placeholder": "#676B7E",
|
|
18577
|
+
"input-text": "#D1D6E0",
|
|
18578
|
+
"input-selection": "#D1D6E0",
|
|
18579
|
+
// menu
|
|
18580
|
+
"menu-bg": "#17191CA8",
|
|
18581
|
+
"menu-text": "#FBFBFDA8",
|
|
18582
|
+
"menu-backdrop": "#FBFBFD1A",
|
|
18583
|
+
// modal
|
|
18584
|
+
"modal-backdrop": "#17191C54",
|
|
18528
18585
|
},
|
|
18529
18586
|
};
|
|
18530
18587
|
|
|
@@ -18576,15 +18633,15 @@ function DetailsToolbar({ errorMessage, helpButton, isLoading, isEmpty, flipButt
|
|
|
18576
18633
|
}
|
|
18577
18634
|
|
|
18578
18635
|
const borderRadiusClassMap = {
|
|
18579
|
-
sm: "tw-rounded-
|
|
18580
|
-
lg: "tw-rounded-
|
|
18636
|
+
sm: "tw-rounded-menu-sm before:tw-rounded-menu-sm",
|
|
18637
|
+
lg: "tw-rounded-menu-lg before:tw-rounded-menu-lg",
|
|
18581
18638
|
};
|
|
18582
18639
|
function Menu(_a) {
|
|
18583
18640
|
var { children, containerClassName, contentClassName, rounded = "lg", menuRef, contentWrapperProps } = _a, props = __rest$1(_a, ["children", "containerClassName", "contentClassName", "rounded", "menuRef", "contentWrapperProps"]);
|
|
18584
|
-
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-
|
|
18641
|
+
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-max-w-[320px]", containerClassName), ref: menuRef, children: jsxRuntime.jsxs("div", { className: cn("tw-bg-menu-bg tw-text-menu-text tw-relative tw-inline-flex tw-max-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-p-squid-xs tw-text-center 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,
|
|
18585
18642
|
// :before element to create a backdrop
|
|
18586
18643
|
// Not applied to the div itself because the backdrop-filter spec does not apply nested backdrop filters
|
|
18587
|
-
"before:tw-absolute before:tw-inset-0 before:-tw-z-[1] before:tw-h-full before:tw-w-full before:tw-
|
|
18644
|
+
"before:tw-absolute before:tw-inset-0 before:-tw-z-[1] before:tw-h-full before:tw-w-full 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-bg-menu-backdrop tw-absolute tw-inset-0 tw-z-10 tw-h-full tw-w-full tw-border tw-border-material-light-thin", borderRadiusClassMap[rounded]) })] }) })));
|
|
18588
18645
|
}
|
|
18589
18646
|
|
|
18590
18647
|
function DropdownMenu({ dropdownRef, className, menuRef, isHidden = false, listClassName, containerClassName, children, contentWrapperProps, menuContentClassName, }) {
|
|
@@ -18601,7 +18658,6 @@ const modalWidthClassMap = {
|
|
|
18601
18658
|
};
|
|
18602
18659
|
function Modal({ children, className, onBackdropClick, isOpen: _isOpen = true, maxHeight = false, width = "large", }) {
|
|
18603
18660
|
const [isOpen, setIsOpen] = React$1.useState(_isOpen);
|
|
18604
|
-
const showBackdrop = useSettingsStore((state) => state.showModalBackdrop);
|
|
18605
18661
|
React$1.useEffect(() => {
|
|
18606
18662
|
if (_isOpen) {
|
|
18607
18663
|
setIsOpen(true);
|
|
@@ -18625,8 +18681,7 @@ function Modal({ children, className, onBackdropClick, isOpen: _isOpen = true, m
|
|
|
18625
18681
|
: undefined, style: {
|
|
18626
18682
|
[CSS_VARS.BLUR_IN_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
|
|
18627
18683
|
[CSS_VARS.BLUR_OUT_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
|
|
18628
|
-
}, className: cn("tw-absolute tw-inset-0 tw-z-40 tw-flex tw-items-start tw-justify-center tw-px-squid-xs tw-py-squid-xl tw-pb-squid-m",
|
|
18629
|
-
(_isOpen ? "tw-animate-blur-in" : "tw-animate-blur-out")), children: jsxRuntime.jsx("div", { style: {
|
|
18684
|
+
}, className: cn("tw-absolute tw-inset-0 tw-z-40 tw-flex tw-items-start tw-justify-center tw-px-squid-xs tw-py-squid-xl tw-pb-squid-m", _isOpen ? "tw-animate-blur-in" : "tw-animate-blur-out"), children: jsxRuntime.jsx("div", { style: {
|
|
18630
18685
|
[CSS_VARS.SLIDE_TO_TOP_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
|
|
18631
18686
|
[CSS_VARS.SLIDE_TO_BOTTOM_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
|
|
18632
18687
|
}, className: cn("tw-relative tw-flex tw-max-h-modal-compact tw-max-w-full tw-flex-col tw-items-start tw-justify-end tw-gap-squid-xxs tw-self-end mobile-xs:tw-w-modal-compact mobile-lg:tw-max-h-modal-large", className, _isOpen ? "tw-animate-slide-to-top" : "tw-animate-slide-to-bottom", maxHeight && "tw-h-full", modalWidthClassMap[width]), children: children }) })));
|
|
@@ -18638,7 +18693,7 @@ const borderTypeClassMap = {
|
|
|
18638
18693
|
};
|
|
18639
18694
|
function ModalContent(_a) {
|
|
18640
18695
|
var { children, addGap = false, paddingY = false, borderType = "border", className } = _a, props = __rest$1(_a, ["children", "addGap", "paddingY", "borderType", "className"]);
|
|
18641
|
-
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-
|
|
18696
|
+
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-flex tw-h-full tw-max-h-[445px] tw-w-full tw-flex-col tw-self-stretch tw-rounded-modal tw-bg-grey-800 tw-text-grey-300 mobile-sm-height:tw-max-h-[535px]", addGap && "tw-gap-squid-xxs tw-pt-squid-xxs", borderTypeClassMap[borderType], paddingY && "tw-py-squid-xxs", className), children: children })));
|
|
18642
18697
|
}
|
|
18643
18698
|
function ModalContentDivider() {
|
|
18644
18699
|
return (jsxRuntime.jsx("svg", { width: "100%", height: "11", viewBox: "0 0 400 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("rect", { x: "1", y: "5", width: "398", height: "1", fill: "currentColor" }) }));
|
|
@@ -19021,7 +19076,7 @@ function BaseDropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick,
|
|
|
19021
19076
|
: {
|
|
19022
19077
|
ref: contentRef,
|
|
19023
19078
|
};
|
|
19024
|
-
return (jsxRuntime.jsxs("li", { ref: itemRef, className: "tw-max-h-squid-xl tw-w-full tw-min-w-[160px] tw-px-squid-xxs", children: [jsxRuntime.jsxs(ContentTag, Object.assign({}, contentTagProps, { onClick: onClick, className: cn("tw-flex tw-h-squid-l tw-w-full tw-cursor-pointer tw-items-center tw-gap-squid-xxs tw-
|
|
19079
|
+
return (jsxRuntime.jsxs("li", { ref: itemRef, className: "tw-max-h-squid-xl tw-w-full tw-min-w-[160px] tw-px-squid-xxs", children: [jsxRuntime.jsxs(ContentTag, Object.assign({}, contentTagProps, { onClick: onClick, className: cn("tw-rounded-menu-sm tw-flex tw-h-squid-l tw-w-full tw-cursor-pointer tw-items-center tw-gap-squid-xxs tw-px-squid-xxs hover:tw-bg-material-light-thin", isSelected && "tw-bg-material-light-thin"), children: [jsxRuntime.jsx("div", { className: "tw-rounded-menu-sm tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-between", children: imageUrl ? (jsxRuntime.jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), jsxRuntime.jsx(CaptionText, { className: cn(labelClassName, "tw-max-w-full tw-flex-1 tw-truncate tw-text-left !tw-leading-[18px]"), children: label }), (control === null || control === void 0 ? void 0 : control.type) === "switch" ? (jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-pl-squid-l", children: jsxRuntime.jsx(Switch, Object.assign({ size: "small" }, control)) })) : detail ? (jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: detail })) : null] })), children] }));
|
|
19025
19080
|
}
|
|
19026
19081
|
function DropdownMenuItem(props) {
|
|
19027
19082
|
if (props.submenu) {
|
|
@@ -19130,7 +19185,7 @@ function ListItem(_a) {
|
|
|
19130
19185
|
if (isDropdownOpen)
|
|
19131
19186
|
closeDropdown();
|
|
19132
19187
|
};
|
|
19133
|
-
return (jsxRuntime.jsxs("li", Object.assign({}, containerProps, { ref: itemRef, className: cn("tw-
|
|
19188
|
+
return (jsxRuntime.jsxs("li", Object.assign({}, containerProps, { ref: itemRef, className: cn("tw-relative tw-flex tw-max-w-full tw-bg-grey-900 tw-text-grey-300 tw-highlight-adjacent", listItemSizeMap[size], extraPadding && "tw-px-squid-xs", compactOnMobile
|
|
19134
19189
|
? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
|
|
19135
19190
|
: "tw-w-full", className), children: [jsxRuntime.jsxs(ItemTag, Object.assign({}, itemProps, { onClick: handleItemClick, className: cn("tw-group/list-item tw-peer/list-item tw-relative tw-flex tw-w-full tw-max-w-full tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs", (isSelected || isDropdownOpen) && "tw-bg-material-light-thin", isInteractive && "hover:tw-bg-material-light-thin"), children: [size === "large" ? (jsxRuntime.jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon || (jsxRuntime.jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, placeholderImageUrl: placeholderImageUrl, size: "md", rounded: rounded })) })) : (jsxRuntime.jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon || (jsxRuntime.jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), jsxRuntime.jsxs("div", { className: cn("tw-flex tw-h-[40px] tw-flex-1 tw-flex-col tw-items-start tw-justify-center tw-gap-squid-xxs",
|
|
19136
19191
|
// 'large' variant has extra padding
|
|
@@ -19144,9 +19199,10 @@ function ListItem(_a) {
|
|
|
19144
19199
|
dropdownPositionClassMap$1[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] })));
|
|
19145
19200
|
}
|
|
19146
19201
|
const ListItemActionsButton = React$1.forwardRef((_a, ref) => {
|
|
19147
|
-
var { isActive, className } = _a, props = __rest$1(_a, ["isActive", "className"]);
|
|
19202
|
+
var { isActive = false, className } = _a, props = __rest$1(_a, ["isActive", "className"]);
|
|
19148
19203
|
return (jsxRuntime.jsx("button", Object.assign({}, props, { ref: ref, className: cn("tw-peer tw-absolute tw-right-squid-s tw-top-squid-xxs tw-flex tw-h-squid-xl tw-w-squid-xl tw-items-center tw-justify-center tw-rounded-squid-xs tw-p-2 tw-text-grey-300 hover:tw-bg-material-light-thin hover:tw-opacity-100 focus-visible:tw-opacity-100", isActive ? "tw-bg-material-light-thin tw-opacity-100" : "tw-opacity-0", className), children: jsxRuntime.jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })));
|
|
19149
19204
|
});
|
|
19205
|
+
ListItemActionsButton.displayName = "ListItemActionsButton";
|
|
19150
19206
|
|
|
19151
19207
|
const dropdownPositionClassMap = {
|
|
19152
19208
|
top: "tw-right-squid-xxs tw-bottom-[50px]",
|
|
@@ -19512,7 +19568,7 @@ const SwapStepsCollapsed = React$1.forwardRef((props, ref) => {
|
|
|
19512
19568
|
const routeStepsListRef = React$1.useRef(null);
|
|
19513
19569
|
const handleToggleRouteSteps = () => {
|
|
19514
19570
|
if (isRouteVisible) {
|
|
19515
|
-
if (routeStepsListRef.current) {
|
|
19571
|
+
if (routeStepsListRef.current != null) {
|
|
19516
19572
|
// reset scroll position of route steps list
|
|
19517
19573
|
routeStepsListRef.current.scrollTo({
|
|
19518
19574
|
top: routeStepsListRef.current.scrollHeight,
|
|
@@ -19528,18 +19584,18 @@ const SwapStepsCollapsed = React$1.forwardRef((props, ref) => {
|
|
|
19528
19584
|
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
19529
19585
|
}
|
|
19530
19586
|
};
|
|
19531
|
-
return (jsxRuntime.jsx("div", { className: "tw-relative tw-h-[60px] tw-w-modal-compact tw-max-w-full tw-rounded-
|
|
19587
|
+
return (jsxRuntime.jsx("div", { className: "tw-relative tw-h-[60px] tw-w-modal-compact tw-max-w-full tw-rounded-button-lg-tertiary mobile-lg:tw-min-w-modal-large", children: jsxRuntime.jsx("div", { className: cn("tw-absolute tw-bottom-0 tw-z-10 tw-flex tw-w-full tw-max-w-modal-compact tw-flex-col tw-justify-end tw-gap-squid-xxs tw-overflow-hidden tw-rounded-button-lg-tertiary mobile-lg:tw-max-w-modal-large", isRouteVisible ? "tw-h-[535px]" : "tw-h-[60px]"), children: jsxRuntime.jsxs("div", { className: "tw-flex tw-flex-col tw-justify-end", children: [!isRouteVisible && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: "tw-absolute tw-left-0 tw-top-0 tw-z-10 tw-h-[21px] tw-w-full tw-bg-gradient-to-b tw-from-grey-800 tw-transition-colors group-hover/swap-step-item-button:tw-from-grey-600" }), jsxRuntime.jsx("span", { className: "tw-absolute tw-bottom-0 tw-left-0 tw-z-10 tw-h-[21px] tw-w-full tw-bg-gradient-to-t tw-from-grey-800 tw-transition-colors group-hover/swap-step-item-button:tw-from-grey-600" })] })), jsxRuntime.jsx("div", { onClick: handleToggleRouteSteps, style: {
|
|
19532
19588
|
[CSS_VARS.FADE_OUT_DURATION]: `${ANIMATION_DURATIONS.HIDE_ROUTE}ms`,
|
|
19533
19589
|
[CSS_VARS.FADE_IN_DURATION]: `${ANIMATION_DURATIONS.SHOW_ROUTE}ms`,
|
|
19534
|
-
}, className: cn("tw-absolute tw-top-0 tw-h-[535px] tw-w-full tw-rounded-
|
|
19590
|
+
}, className: cn("tw-absolute tw-top-0 tw-h-[535px] tw-w-full tw-rounded-button-lg-tertiary tw-bg-material-dark-thick tw-backdrop-blur/10 ", isShowRouteAnimationRunning
|
|
19535
19591
|
? "tw-animate-fade-in"
|
|
19536
19592
|
: "tw-animate-fade-out") }), jsxRuntime.jsx("div", { style: {
|
|
19537
19593
|
zIndex: 20,
|
|
19538
19594
|
display: isRouteVisible ? "none" : "block",
|
|
19539
|
-
}, onClick: handleToggleRouteSteps, className: "tw-absolute tw-inset-0 tw-h-[60px] tw-cursor-pointer tw-rounded-
|
|
19595
|
+
}, onClick: handleToggleRouteSteps, className: "tw-absolute tw-inset-0 tw-h-[60px] tw-cursor-pointer tw-rounded-button-lg-tertiary tw-border tw-border-material-light-thin hover:tw-border-material-light-average hover:tw-bg-material-light-thin" }), jsxRuntime.jsx("div", { onClick: isShowRouteAnimationRunning ? undefined : handleToggleRouteSteps, style: {
|
|
19540
19596
|
[CSS_VARS.COLLAPSE_ROUTE_DURATION]: `${ANIMATION_DURATIONS.HIDE_ROUTE}ms`,
|
|
19541
19597
|
[CSS_VARS.EXPAND_ROUTE_DURATION]: `${ANIMATION_DURATIONS.SHOW_ROUTE}ms`,
|
|
19542
|
-
}, className: cn("tw-relative tw-h-[60px] tw-max-h-[470px] tw-w-full tw-overflow-hidden tw-rounded-
|
|
19598
|
+
}, className: cn("tw-relative tw-h-[60px] tw-max-h-[470px] tw-w-full tw-overflow-hidden tw-rounded-button-lg-tertiary tw-border tw-border-material-light-thin tw-bg-grey-800 tw-backdrop-blur-2xl mobile-xs-height:tw-max-h-[535px]", isRouteVisible &&
|
|
19543
19599
|
(isShowRouteAnimationRunning
|
|
19544
19600
|
? "tw-animate-expand-route"
|
|
19545
19601
|
: "tw-animate-collapse-route")), children: jsxRuntime.jsxs("div", { className: cn("tw-flex tw-flex-col tw-gap-squid-xxs", isRouteVisible || isShowRouteAnimationRunning
|
|
@@ -26954,7 +27010,7 @@ function NumericInput(_a) {
|
|
|
26954
27010
|
? "tw-opacity-0"
|
|
26955
27011
|
: "" }), jsxRuntime.jsx(CaptionText, { bold: true, children: priceImpactPercentage.toString().concat("%") })] })) : null] }) }))), jsxRuntime.jsx(Tooltip, Object.assign({}, (isLoading ? undefined : balanceButton === null || balanceButton === void 0 ? void 0 : balanceButton.tooltip), { tooltipWidth: "max", childrenClassName: "tw-rounded-squid-s", containerClassName: "tw-rounded-squid-s", children: jsxRuntime.jsxs(BalanceChipTag, { onClick: onBalanceButtonClick, className: cn(buttonClassName, balanceChipClickable
|
|
26956
27012
|
? interactiveChipClassName
|
|
26957
|
-
: notInteractiveChipClassName), children: [jsxRuntime.jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsxRuntime.jsx(CaptionText, { children: balanceFormatted }), jsxRuntime.jsx(Chip, { label: "Max" })] }) }))] }))] }));
|
|
27013
|
+
: notInteractiveChipClassName), children: [jsxRuntime.jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsxRuntime.jsx(CaptionText, { children: balanceFormatted }), !(balanceButton === null || balanceButton === void 0 ? void 0 : balanceButton.hideMaxChip) && jsxRuntime.jsx(Chip, { label: "Max" })] }) }))] }))] }));
|
|
26958
27014
|
}
|
|
26959
27015
|
|
|
26960
27016
|
function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSelected = false, }) {
|
|
@@ -68849,7 +68905,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
|
|
|
68849
68905
|
? ""
|
|
68850
68906
|
: showSwapInfoSection
|
|
68851
68907
|
? "tw-animate-scale-and-fade-up"
|
|
68852
|
-
: "tw-animate-scale-and-fade-down"), children: [jsxRuntime.jsx("div", { className: "tw-flex tw-h-[130px] tw-w-full tw-items-center tw-justify-center tw-rounded-tl-
|
|
68908
|
+
: "tw-animate-scale-and-fade-down"), children: [jsxRuntime.jsx("div", { className: "tw-flex tw-h-[130px] tw-w-full tw-items-center tw-justify-center tw-rounded-tl-modal tw-rounded-tr-modal tw-bg-animation-bg tw-text-material-light-thin mobile-xs-height:tw-h-[160px]", style: {
|
|
68853
68909
|
// box shadow simulating bottom outline (we do not use css outline because cannot apply it to only one side)
|
|
68854
68910
|
boxShadow: "0 1px 0 currentColor",
|
|
68855
68911
|
}, children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(AnimationWrapper, { style: {
|
|
@@ -69141,7 +69197,6 @@ const parseSquidTheme = (userTheme, themeType) => {
|
|
|
69141
69197
|
// color representing the blend of material-light and grey-300
|
|
69142
69198
|
"material-light-blend-grey-800": (_b = blendColors(materialVariants["material-light-thin"], fullPublicTheme.color["grey-800"])) !== null && _b !== void 0 ? _b : "",
|
|
69143
69199
|
};
|
|
69144
|
-
// The default colors for buttons that will be used if the user didn't provide any
|
|
69145
69200
|
const defaultButtonColors = {
|
|
69146
69201
|
"button-lg-primary-bg": fullPublicTheme.color["royal-500"],
|
|
69147
69202
|
"button-lg-primary-text": fullPublicTheme.color[themeType === "light" ? "grey-900" : "grey-100"],
|
|
@@ -69169,9 +69224,14 @@ const parseSquidTheme = (userTheme, themeType) => {
|
|
|
69169
69224
|
const defaultModalColors = {
|
|
69170
69225
|
"modal-backdrop": materialVariants["material-dark-average"],
|
|
69171
69226
|
};
|
|
69227
|
+
const defaultMenuColors = {
|
|
69228
|
+
"menu-bg": materialVariants["material-dark-thick"],
|
|
69229
|
+
"menu-text": materialVariants["material-light-thick"],
|
|
69230
|
+
"menu-backdrop": materialVariants["material-light-thin"],
|
|
69231
|
+
};
|
|
69172
69232
|
// Adds the internal colors and any missing config to the full theme
|
|
69173
69233
|
const fullTheme = deepmerge$1({
|
|
69174
|
-
color: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, materialVariants), opacityVariants), defaultButtonColors), defaultInputColors), defaultAnimationColors), defaultModalColors),
|
|
69234
|
+
color: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, materialVariants), opacityVariants), defaultButtonColors), defaultInputColors), defaultAnimationColors), defaultModalColors), defaultMenuColors),
|
|
69175
69235
|
}, fullPublicTheme);
|
|
69176
69236
|
return flatten(fullTheme, {
|
|
69177
69237
|
prefix: THEME_CSS_VARIABLE_PREFIX,
|
|
@@ -69549,6 +69609,7 @@ exports.parseSquidTheme = parseSquidTheme;
|
|
|
69549
69609
|
exports.pxToRem = pxToRem;
|
|
69550
69610
|
exports.remToPx = remToPx;
|
|
69551
69611
|
exports.rgbToHex = rgbToHex;
|
|
69612
|
+
exports.spacing = spacing$1;
|
|
69552
69613
|
exports.statusTextClassMap = statusTextClassMap;
|
|
69553
69614
|
exports.transactionErrorPauseAnimation = transactionErrorPauseAnimation;
|
|
69554
69615
|
exports.transactionFailureAnimation = transactionFailureAnimation;
|
|
@@ -32,6 +32,7 @@ interface NumericInputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
32
32
|
isInteractive?: boolean;
|
|
33
33
|
balanceButton?: {
|
|
34
34
|
tooltip?: Omit<TooltipProps, "children">;
|
|
35
|
+
hideMaxChip?: boolean;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
export declare function NumericInput({ priceImpactPercentage, balance, error, criticalPriceImpactPercentage, token, onAmountChange, forcedAmount, maxUsdDecimals, formatIfVerySmall, showDetails, isLoading, direction, inputModeButton, isInteractive, balanceButton, ...props }: NumericInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SwapStep } from "../../types/components";
|
|
3
|
-
export
|
|
2
|
+
import { type SwapStep } from "../../types/components";
|
|
3
|
+
export interface SwapStepsCollapsedFooterButton {
|
|
4
4
|
label: string;
|
|
5
5
|
link?: string;
|
|
6
6
|
onClick?: () => void;
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
8
|
interface SwapStepsCollapsedProps {
|
|
9
9
|
steps: SwapStep[];
|
|
10
10
|
currentStepIndex: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AllOrNone } from "../../types";
|
|
3
|
-
import { SwitchProps } from "../controls";
|
|
2
|
+
import { type AllOrNone } from "../../types";
|
|
3
|
+
import { type SwitchProps } from "../controls";
|
|
4
4
|
interface DropdownMenuItemControl extends Omit<SwitchProps, "size"> {
|
|
5
5
|
type: "switch";
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
1
|
+
import { type Meta, type StoryObj } from "@storybook/react";
|
|
2
2
|
import { SwapConfiguration } from "../../components/layout/SwapConfiguration";
|
|
3
3
|
declare const meta: Meta<typeof SwapConfiguration>;
|
|
4
4
|
export default meta;
|
|
@@ -25,6 +25,7 @@ export declare const FromAddressEmpty: Story;
|
|
|
25
25
|
export declare const ToAddressEmpty: Story;
|
|
26
26
|
export declare const Error: Story;
|
|
27
27
|
export declare const WithTooltips: Story;
|
|
28
|
+
export declare const HideMaxChip: Story;
|
|
28
29
|
export declare const WithoutSourceConnectLabels: Story;
|
|
29
30
|
export declare const WithoutDestConnectLabels: Story;
|
|
30
31
|
export declare const AddressOnly: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DeepPartial } from "./utils";
|
|
2
|
-
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", "highlight-700", "status-positive", "status-negative", "status-partial", "button-lg-primary-bg", "button-lg-primary-text", "button-lg-secondary-bg", "button-lg-secondary-text", "button-lg-tertiary-bg", "button-lg-tertiary-text", "button-md-primary-bg", "button-md-primary-text", "button-md-secondary-bg", "button-md-secondary-text", "button-md-tertiary-bg", "button-md-tertiary-text", "input-placeholder", "input-text", "input-selection", "input-bg", "animation-bg", "animation-text", "modal-backdrop", "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"];
|
|
3
|
-
declare const THEME_BORDER_RADIUS_KEYS: readonly ["button-lg-primary", "button-lg-secondary", "button-lg-tertiary", "button-md-primary", "button-md-secondary", "button-md-tertiary", "container", "input", "
|
|
2
|
+
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", "highlight-700", "status-positive", "status-negative", "status-partial", "button-lg-primary-bg", "button-lg-primary-text", "button-lg-secondary-bg", "button-lg-secondary-text", "button-lg-tertiary-bg", "button-lg-tertiary-text", "button-md-primary-bg", "button-md-primary-text", "button-md-secondary-bg", "button-md-secondary-text", "button-md-tertiary-bg", "button-md-tertiary-text", "input-placeholder", "input-text", "input-selection", "input-bg", "animation-bg", "animation-text", "modal-backdrop", "menu-bg", "menu-text", "menu-backdrop", "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"];
|
|
3
|
+
declare const THEME_BORDER_RADIUS_KEYS: readonly ["button-lg-primary", "button-lg-secondary", "button-lg-tertiary", "button-md-primary", "button-md-secondary", "button-md-tertiary", "container", "input", "menu-sm", "menu-lg", "modal"];
|
|
4
4
|
declare const THEME_FONT_SIZE_KEYS: readonly ["caption", "body-large", "body-medium", "body-small", "heading-small", "heading-medium", "heading-large"];
|
|
5
5
|
declare const THEME_FONT_WEIGHT_KEYS: readonly ["caption", "body-small", "body-medium", "body-large", "heading-small", "heading-medium", "heading-large"];
|
|
6
6
|
declare const THEME_FONT_FAMILY_KEYS: readonly ["squid-main"];
|
|
@@ -23,12 +23,12 @@ export interface InternalTheme {
|
|
|
23
23
|
boxShadow: ThemeBoxShadow;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* These colors are optional
|
|
27
27
|
* and will be generated internally using the base colors if not provided
|
|
28
28
|
*/
|
|
29
|
-
type OptionalColorsKeys = "button-lg-primary-bg" | "button-lg-primary-text" | "button-lg-secondary-bg" | "button-lg-secondary-text" | "button-lg-tertiary-bg" | "button-lg-tertiary-text" | "button-md-primary-bg" | "button-md-primary-text" | "button-md-secondary-bg" | "button-md-secondary-text" | "button-md-tertiary-bg" | "button-md-tertiary-text" | "input-placeholder" | "input-text" | "input-selection" | "input-bg" | "animation-bg" | "animation-text" | "modal-backdrop";
|
|
29
|
+
type OptionalColorsKeys = "button-lg-primary-bg" | "button-lg-primary-text" | "button-lg-secondary-bg" | "button-lg-secondary-text" | "button-lg-tertiary-bg" | "button-lg-tertiary-text" | "button-md-primary-bg" | "button-md-primary-text" | "button-md-secondary-bg" | "button-md-secondary-text" | "button-md-tertiary-bg" | "button-md-tertiary-text" | "input-placeholder" | "input-text" | "input-selection" | "input-bg" | "animation-bg" | "animation-text" | "modal-backdrop" | "menu-bg" | "menu-text" | "menu-backdrop";
|
|
30
30
|
/**
|
|
31
|
-
* These
|
|
31
|
+
* These colors are generated internally using the base colors
|
|
32
32
|
*/
|
|
33
33
|
type HiddenColorsKeys = "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";
|
|
34
34
|
/**
|
|
@@ -39,6 +39,10 @@ export interface PublicTheme extends Omit<InternalTheme, "color"> {
|
|
|
39
39
|
color: // Remove the hidden colors and the optional colors
|
|
40
40
|
Omit<InternalTheme["color"], HiddenColorsKeys | OptionalColorsKeys> & Partial<Pick<InternalTheme["color"], OptionalColorsKeys>>;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* The theme interface exposed for the end user
|
|
44
|
+
* Everything is optional, any missing config will be generated internally
|
|
45
|
+
*/
|
|
42
46
|
export type Theme = DeepPartial<PublicTheme>;
|
|
43
47
|
interface CssVariable {
|
|
44
48
|
cssVariable: string;
|
|
@@ -53,6 +57,5 @@ export declare const THEME_CSS_VARIABLE_PREFIX = "--st-";
|
|
|
53
57
|
export declare const themeKeysToCssVariables: ThemeCssVariables;
|
|
54
58
|
export interface Settings {
|
|
55
59
|
showProgressAnimation: boolean;
|
|
56
|
-
showModalBackdrop: boolean;
|
|
57
60
|
}
|
|
58
61
|
export {};
|