@0xsquid/ui 2.2.0 → 2.2.2
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 +96 -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/SwapConfiguration.stories.d.ts +2 -1
- package/dist/cjs/types/types/config.d.ts +5 -6
- package/dist/esm/index.js +96 -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/SwapConfiguration.stories.d.ts +2 -1
- package/dist/esm/types/types/config.d.ts +5 -6
- package/dist/index.css +1 -1
- package/dist/index.d.ts +19 -9
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -2855,7 +2855,7 @@ function Checkmark1Icon({ className, size = "16", }) {
|
|
|
2855
2855
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 16 16", fill: "none", className: className, children: jsx("path", { 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" }) }));
|
|
2856
2856
|
}
|
|
2857
2857
|
function Checkmark2Icon({ className, size = "16", style, }) {
|
|
2858
|
-
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM15.774 10.1333C16.1237 9.70582 16.0607 9.0758 15.6332 8.72607C15.2058 8.37635 14.5758 8.43935 14.226 8.86679L10.4258 13.5116L9.20711 12.2929C8.81658 11.9024 8.18342 11.9024 7.79289 12.2929C7.40237 12.6834 7.40237 13.3166 7.79289 13.7071L9.79289 15.7071C9.99267 15.9069 10.2676 16.0129 10.5498 15.9988C10.832 15.9847 11.095 15.8519 11.274 15.6333L15.774 10.1333Z", fill: "
|
|
2858
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM15.774 10.1333C16.1237 9.70582 16.0607 9.0758 15.6332 8.72607C15.2058 8.37635 14.5758 8.43935 14.226 8.86679L10.4258 13.5116L9.20711 12.2929C8.81658 11.9024 8.18342 11.9024 7.79289 12.2929C7.40237 12.6834 7.40237 13.3166 7.79289 13.7071L9.79289 15.7071C9.99267 15.9069 10.2676 16.0129 10.5498 15.9988C10.832 15.9847 11.095 15.8519 11.274 15.6333L15.774 10.1333Z", fill: "currentColor", className: className, style: style }) }));
|
|
2859
2859
|
}
|
|
2860
2860
|
|
|
2861
2861
|
function DotGrid1x3HorizontalIcon({ className, size = "16", }) {
|
|
@@ -3126,14 +3126,14 @@ const THEME_COLOR_KEYS = [
|
|
|
3126
3126
|
"status-positive",
|
|
3127
3127
|
"status-negative",
|
|
3128
3128
|
"status-partial",
|
|
3129
|
-
//
|
|
3129
|
+
// lg button variant colors
|
|
3130
3130
|
"button-lg-primary-bg",
|
|
3131
3131
|
"button-lg-primary-text",
|
|
3132
3132
|
"button-lg-secondary-bg",
|
|
3133
3133
|
"button-lg-secondary-text",
|
|
3134
3134
|
"button-lg-tertiary-bg",
|
|
3135
3135
|
"button-lg-tertiary-text",
|
|
3136
|
-
//
|
|
3136
|
+
// md button variant colors
|
|
3137
3137
|
"button-md-primary-bg",
|
|
3138
3138
|
"button-md-primary-text",
|
|
3139
3139
|
"button-md-secondary-bg",
|
|
@@ -3150,6 +3150,10 @@ const THEME_COLOR_KEYS = [
|
|
|
3150
3150
|
"animation-text",
|
|
3151
3151
|
// modal
|
|
3152
3152
|
"modal-backdrop",
|
|
3153
|
+
// menu
|
|
3154
|
+
"menu-bg",
|
|
3155
|
+
"menu-text",
|
|
3156
|
+
"menu-backdrop",
|
|
3153
3157
|
// material-* variants are generated internally and are not part of the public theme
|
|
3154
3158
|
"material-light-thin",
|
|
3155
3159
|
"material-light-average",
|
|
@@ -3173,8 +3177,8 @@ const THEME_BORDER_RADIUS_KEYS = [
|
|
|
3173
3177
|
"button-md-tertiary",
|
|
3174
3178
|
"container",
|
|
3175
3179
|
"input",
|
|
3176
|
-
"
|
|
3177
|
-
"
|
|
3180
|
+
"menu-sm",
|
|
3181
|
+
"menu-lg",
|
|
3178
3182
|
"modal",
|
|
3179
3183
|
];
|
|
3180
3184
|
const THEME_FONT_SIZE_KEYS = [
|
|
@@ -3226,7 +3230,7 @@ function SearchIcon({ className, size = "24", }) {
|
|
|
3226
3230
|
|
|
3227
3231
|
function Input(_a) {
|
|
3228
3232
|
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"]);
|
|
3229
|
-
const showActionButton =
|
|
3233
|
+
const showActionButton = actionButtonProps != null;
|
|
3230
3234
|
const localInputRef = useRef(null);
|
|
3231
3235
|
const inputRef = inputRefProp !== null && inputRefProp !== void 0 ? inputRefProp : localInputRef;
|
|
3232
3236
|
useEffect(() => {
|
|
@@ -3240,10 +3244,10 @@ function Input(_a) {
|
|
|
3240
3244
|
clearTimeout(timeoutId);
|
|
3241
3245
|
};
|
|
3242
3246
|
}, [autoFocusTimeout]);
|
|
3243
|
-
return (jsxs("div", { className: cn("tw-
|
|
3247
|
+
return (jsxs("div", { className: cn("tw-relative tw-w-full tw-text-input-placeholder", containerClassName), children: [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 ? (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 || jsx(SearchIcon, {}) })) : null, showActionButton ? (jsx("div", { className: "tw-absolute tw-inset-y-0 tw-right-1.5 tw-flex tw-items-center tw-justify-center", children: jsx(InputActionButton, Object.assign({}, actionButtonProps)) })) : null] }));
|
|
3244
3248
|
}
|
|
3245
3249
|
const InputActionButton = ({ onClick, variant = "tertiary", label = "Paste", }) => {
|
|
3246
|
-
return (jsx(Button$1, { size: "md", variant: variant, onClick: onClick, className: "!tw-h-[30px] !tw-w-fit !tw-min-w-0", children: jsx(CaptionText, { children: label }) }));
|
|
3250
|
+
return (jsx(Button$1, { size: "md", variant: variant, onClick: onClick, className: "!tw-h-[30px] !tw-w-fit !tw-min-w-0 !tw-rounded-input", children: jsx(CaptionText, { children: label }) }));
|
|
3247
3251
|
};
|
|
3248
3252
|
|
|
3249
3253
|
/*
|
|
@@ -7375,7 +7379,6 @@ const create = (createState) => createState ? createImpl(createState) : createIm
|
|
|
7375
7379
|
|
|
7376
7380
|
const useSettingsStore = create(() => ({
|
|
7377
7381
|
showProgressAnimation: true,
|
|
7378
|
-
showModalBackdrop: true,
|
|
7379
7382
|
}));
|
|
7380
7383
|
|
|
7381
7384
|
const AnimationWrapper = (playerProps) => {
|
|
@@ -18438,9 +18441,9 @@ const defaultBorderRadius = {
|
|
|
18438
18441
|
"button-md-secondary": spacing$1["squid-m"],
|
|
18439
18442
|
"button-md-tertiary": spacing$1["squid-m"],
|
|
18440
18443
|
container: spacing$1["squid-l"],
|
|
18441
|
-
input: "
|
|
18442
|
-
"
|
|
18443
|
-
"
|
|
18444
|
+
input: "9999px",
|
|
18445
|
+
"menu-sm": spacing$1["squid-s"],
|
|
18446
|
+
"menu-lg": spacing$1["squid-m"],
|
|
18444
18447
|
modal: spacing$1["squid-l"],
|
|
18445
18448
|
};
|
|
18446
18449
|
const lightTheme = {
|
|
@@ -18473,6 +18476,33 @@ const lightTheme = {
|
|
|
18473
18476
|
"status-partial": "#EC9213",
|
|
18474
18477
|
// highlight
|
|
18475
18478
|
"highlight-700": "#E4FE53",
|
|
18479
|
+
// animation
|
|
18480
|
+
"animation-bg": "#B893EC",
|
|
18481
|
+
"animation-text": "#FBFBFD",
|
|
18482
|
+
// buttons
|
|
18483
|
+
"button-lg-primary-bg": "#B893EC",
|
|
18484
|
+
"button-lg-primary-text": "#FBFBFD",
|
|
18485
|
+
"button-lg-secondary-bg": "#17191C",
|
|
18486
|
+
"button-lg-secondary-text": "#EDEEF3",
|
|
18487
|
+
"button-lg-tertiary-bg": "#EDEEF3",
|
|
18488
|
+
"button-lg-tertiary-text": "#292C32",
|
|
18489
|
+
"button-md-primary-bg": "#B893EC",
|
|
18490
|
+
"button-md-primary-text": "#FBFBFD",
|
|
18491
|
+
"button-md-secondary-bg": "#17191C",
|
|
18492
|
+
"button-md-secondary-text": "#EDEEF3",
|
|
18493
|
+
"button-md-tertiary-bg": "#EDEEF3",
|
|
18494
|
+
"button-md-tertiary-text": "#292C32",
|
|
18495
|
+
// input
|
|
18496
|
+
"input-bg": "#FBFBFD",
|
|
18497
|
+
"input-placeholder": "#A7ABBE",
|
|
18498
|
+
"input-selection": "#292C32",
|
|
18499
|
+
"input-text": "#292C32",
|
|
18500
|
+
// menu
|
|
18501
|
+
"menu-bg": "#FBFBFDA8",
|
|
18502
|
+
"menu-text": "#17191CA8",
|
|
18503
|
+
"menu-backdrop": "#17191C1A",
|
|
18504
|
+
// modal
|
|
18505
|
+
"modal-backdrop": "#FBFBFD54",
|
|
18476
18506
|
},
|
|
18477
18507
|
};
|
|
18478
18508
|
const darkTheme = {
|
|
@@ -18505,6 +18535,33 @@ const darkTheme = {
|
|
|
18505
18535
|
"status-partial": "#F3AF25",
|
|
18506
18536
|
// highlight
|
|
18507
18537
|
"highlight-700": "#E4FE53",
|
|
18538
|
+
// animation
|
|
18539
|
+
"animation-bg": "#9E79D2",
|
|
18540
|
+
"animation-text": "#FBFBFD",
|
|
18541
|
+
// buttons
|
|
18542
|
+
"button-lg-primary-bg": "#9E79D2",
|
|
18543
|
+
"button-lg-primary-text": "#FBFBFD",
|
|
18544
|
+
"button-lg-secondary-bg": "#FBFBFD",
|
|
18545
|
+
"button-lg-secondary-text": "#292C32",
|
|
18546
|
+
"button-lg-tertiary-bg": "#292C32",
|
|
18547
|
+
"button-lg-tertiary-text": "#D1D6E0",
|
|
18548
|
+
"button-md-primary-bg": "#9E79D2",
|
|
18549
|
+
"button-md-primary-text": "#FBFBFD",
|
|
18550
|
+
"button-md-secondary-bg": "#FBFBFD",
|
|
18551
|
+
"button-md-secondary-text": "#292C32",
|
|
18552
|
+
"button-md-tertiary-bg": "#292C32",
|
|
18553
|
+
"button-md-tertiary-text": "#D1D6E0",
|
|
18554
|
+
// input
|
|
18555
|
+
"input-bg": "#17191C",
|
|
18556
|
+
"input-placeholder": "#676B7E",
|
|
18557
|
+
"input-text": "#D1D6E0",
|
|
18558
|
+
"input-selection": "#D1D6E0",
|
|
18559
|
+
// menu
|
|
18560
|
+
"menu-bg": "#17191CA8",
|
|
18561
|
+
"menu-text": "#FBFBFDA8",
|
|
18562
|
+
"menu-backdrop": "#FBFBFD1A",
|
|
18563
|
+
// modal
|
|
18564
|
+
"modal-backdrop": "#17191C54",
|
|
18508
18565
|
},
|
|
18509
18566
|
};
|
|
18510
18567
|
|
|
@@ -18556,15 +18613,15 @@ function DetailsToolbar({ errorMessage, helpButton, isLoading, isEmpty, flipButt
|
|
|
18556
18613
|
}
|
|
18557
18614
|
|
|
18558
18615
|
const borderRadiusClassMap = {
|
|
18559
|
-
sm: "tw-rounded-
|
|
18560
|
-
lg: "tw-rounded-
|
|
18616
|
+
sm: "tw-rounded-menu-sm before:tw-rounded-menu-sm",
|
|
18617
|
+
lg: "tw-rounded-menu-lg before:tw-rounded-menu-lg",
|
|
18561
18618
|
};
|
|
18562
18619
|
function Menu(_a) {
|
|
18563
18620
|
var { children, containerClassName, contentClassName, rounded = "lg", menuRef, contentWrapperProps } = _a, props = __rest$1(_a, ["children", "containerClassName", "contentClassName", "rounded", "menuRef", "contentWrapperProps"]);
|
|
18564
|
-
return (jsx("div", Object.assign({}, props, { className: cn("tw-max-w-[320px]", containerClassName), ref: menuRef, children: 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-
|
|
18621
|
+
return (jsx("div", Object.assign({}, props, { className: cn("tw-max-w-[320px]", containerClassName), ref: menuRef, children: 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,
|
|
18565
18622
|
// :before element to create a backdrop
|
|
18566
18623
|
// Not applied to the div itself because the backdrop-filter spec does not apply nested backdrop filters
|
|
18567
|
-
"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" ? (jsx(CaptionText, { className: "tw-z-20 tw-self-stretch !tw-leading-[10px]", children: children })) : (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 }))), 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
|
|
18624
|
+
"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" ? (jsx(CaptionText, { className: "tw-z-20 tw-self-stretch !tw-leading-[10px]", children: children })) : (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 }))), 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]) })] }) })));
|
|
18568
18625
|
}
|
|
18569
18626
|
|
|
18570
18627
|
function DropdownMenu({ dropdownRef, className, menuRef, isHidden = false, listClassName, containerClassName, children, contentWrapperProps, menuContentClassName, }) {
|
|
@@ -18581,7 +18638,6 @@ const modalWidthClassMap = {
|
|
|
18581
18638
|
};
|
|
18582
18639
|
function Modal({ children, className, onBackdropClick, isOpen: _isOpen = true, maxHeight = false, width = "large", }) {
|
|
18583
18640
|
const [isOpen, setIsOpen] = useState(_isOpen);
|
|
18584
|
-
const showBackdrop = useSettingsStore((state) => state.showModalBackdrop);
|
|
18585
18641
|
useEffect(() => {
|
|
18586
18642
|
if (_isOpen) {
|
|
18587
18643
|
setIsOpen(true);
|
|
@@ -18605,8 +18661,7 @@ function Modal({ children, className, onBackdropClick, isOpen: _isOpen = true, m
|
|
|
18605
18661
|
: undefined, style: {
|
|
18606
18662
|
[CSS_VARS.BLUR_IN_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
|
|
18607
18663
|
[CSS_VARS.BLUR_OUT_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
|
|
18608
|
-
}, 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",
|
|
18609
|
-
(_isOpen ? "tw-animate-blur-in" : "tw-animate-blur-out")), children: jsx("div", { style: {
|
|
18664
|
+
}, 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: jsx("div", { style: {
|
|
18610
18665
|
[CSS_VARS.SLIDE_TO_TOP_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
|
|
18611
18666
|
[CSS_VARS.SLIDE_TO_BOTTOM_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
|
|
18612
18667
|
}, 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 }) })));
|
|
@@ -18618,7 +18673,7 @@ const borderTypeClassMap = {
|
|
|
18618
18673
|
};
|
|
18619
18674
|
function ModalContent(_a) {
|
|
18620
18675
|
var { children, addGap = false, paddingY = false, borderType = "border", className } = _a, props = __rest$1(_a, ["children", "addGap", "paddingY", "borderType", "className"]);
|
|
18621
|
-
return (jsx("div", Object.assign({}, props, { className: cn("tw-
|
|
18676
|
+
return (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 })));
|
|
18622
18677
|
}
|
|
18623
18678
|
function ModalContentDivider() {
|
|
18624
18679
|
return (jsx("svg", { width: "100%", height: "11", viewBox: "0 0 400 11", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("rect", { x: "1", y: "5", width: "398", height: "1", fill: "currentColor" }) }));
|
|
@@ -19001,7 +19056,7 @@ function BaseDropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick,
|
|
|
19001
19056
|
: {
|
|
19002
19057
|
ref: contentRef,
|
|
19003
19058
|
};
|
|
19004
|
-
return (jsxs("li", { ref: itemRef, className: "tw-max-h-squid-xl tw-w-full tw-min-w-[160px] tw-px-squid-xxs", children: [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-
|
|
19059
|
+
return (jsxs("li", { ref: itemRef, className: "tw-max-h-squid-xl tw-w-full tw-min-w-[160px] tw-px-squid-xxs", children: [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: [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 ? (jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), 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" ? (jsx("span", { className: "tw-flex tw-items-center tw-pl-squid-l", children: jsx(Switch, Object.assign({ size: "small" }, control)) })) : detail ? (jsx("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: detail })) : null] })), children] }));
|
|
19005
19060
|
}
|
|
19006
19061
|
function DropdownMenuItem(props) {
|
|
19007
19062
|
if (props.submenu) {
|
|
@@ -19110,7 +19165,7 @@ function ListItem(_a) {
|
|
|
19110
19165
|
if (isDropdownOpen)
|
|
19111
19166
|
closeDropdown();
|
|
19112
19167
|
};
|
|
19113
|
-
return (jsxs("li", Object.assign({}, containerProps, { ref: itemRef, className: cn("tw-
|
|
19168
|
+
return (jsxs("li", Object.assign({}, containerProps, { ref: itemRef, className: cn("tw-relative tw-flex tw-max-w-full tw-bg-grey-900 tw-text-grey-300 tw-highlight-adjacent", listItemSizeMap[size], extraPadding && "tw-px-squid-xs", compactOnMobile
|
|
19114
19169
|
? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
|
|
19115
19170
|
: "tw-w-full", className), children: [jsxs(ItemTag, Object.assign({}, itemProps, { onClick: handleItemClick, className: cn("tw-group/list-item tw-peer/list-item tw-relative tw-flex tw-w-full tw-max-w-full tw-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" ? (jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon || (jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, placeholderImageUrl: placeholderImageUrl, size: "md", rounded: rounded })) })) : (jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon || (jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), 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",
|
|
19116
19171
|
// 'large' variant has extra padding
|
|
@@ -19124,9 +19179,10 @@ function ListItem(_a) {
|
|
|
19124
19179
|
dropdownPositionClassMap$1[dropdownStyles.position]), dropdownRef: dropdownRef, children: dropdownMenuContent })) : null] })));
|
|
19125
19180
|
}
|
|
19126
19181
|
const ListItemActionsButton = forwardRef((_a, ref) => {
|
|
19127
|
-
var { isActive, className } = _a, props = __rest$1(_a, ["isActive", "className"]);
|
|
19182
|
+
var { isActive = false, className } = _a, props = __rest$1(_a, ["isActive", "className"]);
|
|
19128
19183
|
return (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: jsx(DotGrid1x3HorizontalIcon, { size: "24" }) })));
|
|
19129
19184
|
});
|
|
19185
|
+
ListItemActionsButton.displayName = "ListItemActionsButton";
|
|
19130
19186
|
|
|
19131
19187
|
const dropdownPositionClassMap = {
|
|
19132
19188
|
top: "tw-right-squid-xxs tw-bottom-[50px]",
|
|
@@ -19492,7 +19548,7 @@ const SwapStepsCollapsed = forwardRef((props, ref) => {
|
|
|
19492
19548
|
const routeStepsListRef = useRef(null);
|
|
19493
19549
|
const handleToggleRouteSteps = () => {
|
|
19494
19550
|
if (isRouteVisible) {
|
|
19495
|
-
if (routeStepsListRef.current) {
|
|
19551
|
+
if (routeStepsListRef.current != null) {
|
|
19496
19552
|
// reset scroll position of route steps list
|
|
19497
19553
|
routeStepsListRef.current.scrollTo({
|
|
19498
19554
|
top: routeStepsListRef.current.scrollHeight,
|
|
@@ -19508,18 +19564,18 @@ const SwapStepsCollapsed = forwardRef((props, ref) => {
|
|
|
19508
19564
|
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
19509
19565
|
}
|
|
19510
19566
|
};
|
|
19511
|
-
return (jsx("div", { className: "tw-relative tw-h-[60px] tw-w-modal-compact tw-max-w-full tw-rounded-
|
|
19567
|
+
return (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: 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: jsxs("div", { className: "tw-flex tw-flex-col tw-justify-end", children: [!isRouteVisible && (jsxs(Fragment, { children: [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" }), 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" })] })), jsx("div", { onClick: handleToggleRouteSteps, style: {
|
|
19512
19568
|
[CSS_VARS.FADE_OUT_DURATION]: `${ANIMATION_DURATIONS.HIDE_ROUTE}ms`,
|
|
19513
19569
|
[CSS_VARS.FADE_IN_DURATION]: `${ANIMATION_DURATIONS.SHOW_ROUTE}ms`,
|
|
19514
|
-
}, className: cn("tw-absolute tw-top-0 tw-h-[535px] tw-w-full tw-rounded-
|
|
19570
|
+
}, 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
|
|
19515
19571
|
? "tw-animate-fade-in"
|
|
19516
19572
|
: "tw-animate-fade-out") }), jsx("div", { style: {
|
|
19517
19573
|
zIndex: 20,
|
|
19518
19574
|
display: isRouteVisible ? "none" : "block",
|
|
19519
|
-
}, onClick: handleToggleRouteSteps, className: "tw-absolute tw-inset-0 tw-h-[60px] tw-cursor-pointer tw-rounded-
|
|
19575
|
+
}, 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" }), jsx("div", { onClick: isShowRouteAnimationRunning ? undefined : handleToggleRouteSteps, style: {
|
|
19520
19576
|
[CSS_VARS.COLLAPSE_ROUTE_DURATION]: `${ANIMATION_DURATIONS.HIDE_ROUTE}ms`,
|
|
19521
19577
|
[CSS_VARS.EXPAND_ROUTE_DURATION]: `${ANIMATION_DURATIONS.SHOW_ROUTE}ms`,
|
|
19522
|
-
}, className: cn("tw-relative tw-h-[60px] tw-max-h-[470px] tw-w-full tw-overflow-hidden tw-rounded-
|
|
19578
|
+
}, 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 &&
|
|
19523
19579
|
(isShowRouteAnimationRunning
|
|
19524
19580
|
? "tw-animate-expand-route"
|
|
19525
19581
|
: "tw-animate-collapse-route")), children: jsxs("div", { className: cn("tw-flex tw-flex-col tw-gap-squid-xxs", isRouteVisible || isShowRouteAnimationRunning
|
|
@@ -26934,7 +26990,7 @@ function NumericInput(_a) {
|
|
|
26934
26990
|
? "tw-opacity-0"
|
|
26935
26991
|
: "" }), jsx(CaptionText, { bold: true, children: priceImpactPercentage.toString().concat("%") })] })) : null] }) }))), 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: jsxs(BalanceChipTag, { onClick: onBalanceButtonClick, className: cn(buttonClassName, balanceChipClickable
|
|
26936
26992
|
? interactiveChipClassName
|
|
26937
|
-
: notInteractiveChipClassName), children: [jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsx(CaptionText, { children: balanceFormatted }), jsx(Chip, { label: "Max" })] }) }))] }))] }));
|
|
26993
|
+
: notInteractiveChipClassName), children: [jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsx(CaptionText, { children: balanceFormatted }), !(balanceButton === null || balanceButton === void 0 ? void 0 : balanceButton.hideMaxChip) && jsx(Chip, { label: "Max" })] }) }))] }))] }));
|
|
26938
26994
|
}
|
|
26939
26995
|
|
|
26940
26996
|
function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSelected = false, }) {
|
|
@@ -68829,7 +68885,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
|
|
|
68829
68885
|
? ""
|
|
68830
68886
|
: showSwapInfoSection
|
|
68831
68887
|
? "tw-animate-scale-and-fade-up"
|
|
68832
|
-
: "tw-animate-scale-and-fade-down"), children: [jsx("div", { className: "tw-flex tw-h-[130px] tw-w-full tw-items-center tw-justify-center tw-rounded-tl-
|
|
68888
|
+
: "tw-animate-scale-and-fade-down"), children: [jsx("div", { className: "tw-flex tw-h-[130px] tw-w-full tw-items-center tw-justify-center tw-rounded-tl-modal tw-rounded-tr-modal tw-bg-animation-bg tw-text-material-light-thin mobile-xs-height:tw-h-[160px]", style: {
|
|
68833
68889
|
// box shadow simulating bottom outline (we do not use css outline because cannot apply it to only one side)
|
|
68834
68890
|
boxShadow: "0 1px 0 currentColor",
|
|
68835
68891
|
}, children: jsx("div", { children: jsx(AnimationWrapper, { style: {
|
|
@@ -69121,7 +69177,6 @@ const parseSquidTheme = (userTheme, themeType) => {
|
|
|
69121
69177
|
// color representing the blend of material-light and grey-300
|
|
69122
69178
|
"material-light-blend-grey-800": (_b = blendColors(materialVariants["material-light-thin"], fullPublicTheme.color["grey-800"])) !== null && _b !== void 0 ? _b : "",
|
|
69123
69179
|
};
|
|
69124
|
-
// The default colors for buttons that will be used if the user didn't provide any
|
|
69125
69180
|
const defaultButtonColors = {
|
|
69126
69181
|
"button-lg-primary-bg": fullPublicTheme.color["royal-500"],
|
|
69127
69182
|
"button-lg-primary-text": fullPublicTheme.color[themeType === "light" ? "grey-900" : "grey-100"],
|
|
@@ -69149,10 +69204,18 @@ const parseSquidTheme = (userTheme, themeType) => {
|
|
|
69149
69204
|
const defaultModalColors = {
|
|
69150
69205
|
"modal-backdrop": materialVariants["material-dark-average"],
|
|
69151
69206
|
};
|
|
69207
|
+
const defaultMenuColors = {
|
|
69208
|
+
"menu-bg": materialVariants["material-dark-thick"],
|
|
69209
|
+
"menu-text": materialVariants["material-light-thick"],
|
|
69210
|
+
"menu-backdrop": materialVariants["material-light-thin"],
|
|
69211
|
+
};
|
|
69152
69212
|
// Adds the internal colors and any missing config to the full theme
|
|
69153
69213
|
const fullTheme = deepmerge$1({
|
|
69154
|
-
color: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, materialVariants), opacityVariants), defaultButtonColors), defaultInputColors), defaultAnimationColors), defaultModalColors),
|
|
69214
|
+
color: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, materialVariants), opacityVariants), defaultButtonColors), defaultInputColors), defaultAnimationColors), defaultModalColors), defaultMenuColors),
|
|
69155
69215
|
}, fullPublicTheme);
|
|
69216
|
+
console.log({
|
|
69217
|
+
fullTheme,
|
|
69218
|
+
});
|
|
69156
69219
|
return flatten(fullTheme, {
|
|
69157
69220
|
prefix: THEME_CSS_VARIABLE_PREFIX,
|
|
69158
69221
|
});
|
|
@@ -69242,4 +69305,4 @@ function ThemeProvider(_a) {
|
|
|
69242
69305
|
return (jsx("div", Object.assign({}, props, { style: Object.assign(Object.assign({}, props.style), parsedStyle), "data-squid-theme-type": themeType, className: cn("tw-group tw-relative tw-flex tw-font-squid-main tw-h-d-screen mobile-lg:tw-h-auto", props.className), children: children })));
|
|
69243
69306
|
}
|
|
69244
69307
|
|
|
69245
|
-
export { ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, AssetsView, AtomIcon, BackpackIcon, BadgeImage, BankIcon, BellAlarmIcon, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, BrokenHeartIcon, BubblesIcon, Button$1 as Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, CatSquareIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CodeBracketsIcon, CodeSolidSquareIcon, CoinsAddIcon, CoinsIcon, CoinsOutlinedIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CommandIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy, CopyIcon, CrossAnimatedIcon, CrossedOutSunSolidIcon, DashboardFast, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, DropdownMenuTitle, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FeeButton, FeesAction, FeesLines, FeesTotal, FileDownloadIcon, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HistoryItem, HomeIcon, IconButton, IconLabel, Image$1 as Image, ImageIcon, ImageSparkle, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LaptopIcon, LightningIcon, LimitIcon, LinkIcon, List, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MainView, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, MoonIcon, NavigationBar, NewspaperIcon, NotAllowedIcon, NumericInput, PathSquareIcon, PercentIcon, PhoneIcon, PieChartIcon, PipeSeparator, PlusIcon, PoopIcon, PowerIcon, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, PunkIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RecipientView, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, SettingsGearIcon, SettingsItem, SettingsSlider, SettingsSliderIcon, ShoppingBagIcon, SizeTransition, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidLogo, StakeAction, StartAction, StocksIcon, SuccessAction, SunIcon, SunOutlinedIcon, SunriseIcon, SunriseSmallIcon, SwapAction, SwapConfiguration, SwapDetailsView, SwapErrorIcon, SwapHeader, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProgressViewHeader, SwapProperties, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, TagIcon, TagIconFilled, TextSkeleton, ThemePreference, ThemeProvider, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenPair, Tooltip, TradingViewStepsIcon, TransactionAction, TransactionFilters, TransactionHeader, TransactionHeaderLayout, TransactionItem, TransactionProperties, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, TranslateIcon, TriangleExclamation, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WalletsView, WrapAction, XSocial, baseTailwindConfig, blendColors, cn, darkTheme, getContrastColor, getHexColorFromOpacityPercentage, hexToRgb, isValidHexColor, lightTheme, linkActionTimelineProps, parseSquidTheme, pxToRem, remToPx, rgbToHex, statusTextClassMap, transactionErrorPauseAnimation, transactionFailureAnimation, transactionHalfSuccessAnimation, transactionPendingAnimation, transactionProcessingAnimation, transactionRejectedAnimation, transactionSuccessAnimation, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useUserTheme, useVersion };
|
|
69308
|
+
export { ActionLayout, ActionLineOutRow, ActionProperties, ActionRow, ActionStatusRow, ActionWrapper, AddressButton, AnimationWrapper, AppContainer, Approve, ApproveAction, ArrowBottomTopIcon, ArrowButton, ArrowCornerDownRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowOutOfBoxIcon, ArrowRightDownCircleIcon, ArrowRightDownIcon, ArrowRightIcon, ArrowRightUpCircleIcon, ArrowRightUpIcon, ArrowRotate, ArrowSplit, ArrowTriangle, ArrowUpIcon, ArrowWallDownIcon, ArrowsSwapIcon, AssetsButton, AssetsView, AtomIcon, BackpackIcon, BadgeImage, BankIcon, BellAlarmIcon, BlockSkeleton, BodyText, Boost, BoostBadge, BoostButton, BorderedContainer, Breadcrumb, BridgeAction, BridgeHeader, BridgeProperties, BridgeTransactionView, BrokenHeartIcon, BubblesIcon, Button$1 as Button, BuyNFTHeader, BuyNFTProperties, BuyNFTTransactionView, CSS_VARS, Calendar, CaptionText, CatSquareIcon, ChainLink, Checkmark1Icon, Checkmark2Icon, ChevronArrowIcon, ChevronDownSmallIcon, ChevronGrabberVerticalIcon, ChevronLargeDownIcon, ChevronLargeRightIcon, ChevronRightSmallIcon, ChevronTopIcon, ChevronTopSmallIcon, Chip, CircleMinusIcon, CirclePlusIcon, CircleX, CircleXFilledIcon, ClockOutlineIcon, ClockSolidIcon, CodeBracketsIcon, CodeSolidSquareIcon, CoinsAddIcon, CoinsIcon, CoinsOutlinedIcon, Collapse, CollapsibleMenu, CollectionIcon, ColorPaletteIcon, CommandIcon, CompassRoundOutlinedIcon, CompassRoundSolidIcon, ConsoleIcon, Copy, CopyIcon, CrossAnimatedIcon, CrossedOutSunSolidIcon, DashboardFast, DescriptionBlocks, DetailsToolbar, DiscordIcon, DockIconAnalytics, DockIconCheckout, DockIconHelp, DockIconProfile, DockIconScan, DockIconSwap, DockSwapIcon, DollarOutlinedIcon, DollarSolidIcon, DotGrid1x3HorizontalIcon, DropdownMenu, DropdownMenuItem, DropdownMenuTitle, EmojiMeh, EmojiSadIcon, EmptyHeartIcon, ErrorMessage, EthereumIcon, ExplosionIcon, EyeOpenIcon, FeeButton, FeesAction, FeesLines, FeesTotal, FileDownloadIcon, FilledHeartIcon, FilterAscendingIcon, FilterButton, FilterIcon, FilterTimelineIcon, GasIcon, GhostIcon, GithubIcon, HashLink, HeadingText, HeartSmallIcon, HelpIcon, HistoryItem, HomeIcon, IconButton, IconLabel, Image$1 as Image, ImageIcon, ImageSparkle, IncompleteAction, InfinityIcon, InfoBox, Inline, Input, InteractionHeader, InteractionProperties, InteractionTransactionView, Join, LaptopIcon, LightningIcon, LimitIcon, LinkIcon, List, ListItem, ListItemActionsButton, Loader, LoadingProvider, LoadingSkeleton, MEDIA_QUERIES, MainView, MaxIcon, Menu, MenuItem, MenuSwapIcon, MirrorIcon, Modal, ModalContent, ModalContentDivider, MoonIcon, NavigationBar, NewspaperIcon, NotAllowedIcon, NumericInput, PathSquareIcon, PercentIcon, PhoneIcon, PieChartIcon, PipeSeparator, PlusIcon, PoopIcon, PowerIcon, ProductCard, ProfileHeader, ProfileHeaderBackground, PropertiesLayout, PropertyListItem, PunkIcon, RangeInput, ReceiptBillIcon, ReceiveNFTAction, ReceiveTokensAction, RecipientView, RefreshIcon, ReorderIcon, RouteStep, STEP_ITEM_HEIGHT, SearchIcon, SectionTitle, SendTokensAction, SettingsButton, SettingsGearIcon, SettingsItem, SettingsSlider, SettingsSliderIcon, ShoppingBagIcon, SizeTransition, SmileIcon, SnapIcon, SortIcon, SparkleIcon, SparklesIcon, SquareArrowCenter, SquareArrowTopLeftIcon, SquareArrowTopRight2Icon, SquidLogo, StakeAction, StartAction, StocksIcon, SuccessAction, SunIcon, SunOutlinedIcon, SunriseIcon, SunriseSmallIcon, SwapAction, SwapConfiguration, SwapDetailsView, SwapErrorIcon, SwapHeader, SwapIcon, SwapInputsIcon, SwapProgressView, SwapProgressViewHeader, SwapProperties, SwapStepItem, SwapStepSeparator, SwapStepsCollapsed, SwapSuccessIcon, SwapTransactionView, SwapWarningIcon, Switch, TagIcon, TagIconFilled, TextSkeleton, ThemePreference, ThemeProvider, ThumbsUp, Tick, TimeFliesIcon, Timeline, Timestamp, Toast, TokenPair, Tooltip, TradingViewStepsIcon, TransactionAction, TransactionFilters, TransactionHeader, TransactionHeaderLayout, TransactionItem, TransactionProperties, TransactionSearch, TransactionState, TransactionView, TransactionViewLayout, Transfer, TranslateIcon, TriangleExclamation, UsdAmount, WalletFilledIcon, WalletIcon, WalletLink, WalletsView, WrapAction, XSocial, baseTailwindConfig, blendColors, cn, darkTheme, getContrastColor, getHexColorFromOpacityPercentage, hexToRgb, isValidHexColor, lightTheme, linkActionTimelineProps, parseSquidTheme, pxToRem, remToPx, rgbToHex, spacing$1 as spacing, statusTextClassMap, transactionErrorPauseAnimation, transactionFailureAnimation, transactionHalfSuccessAnimation, transactionPendingAnimation, transactionProcessingAnimation, transactionRejectedAnimation, transactionSuccessAnimation, useCollapsibleMenu, useDropdownMenu, useMediaQuery, useOnResize, useRect, useTimer, useUserTheme, useVersion };
|
|
@@ -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
|
/**
|
|
@@ -53,6 +53,5 @@ export declare const THEME_CSS_VARIABLE_PREFIX = "--st-";
|
|
|
53
53
|
export declare const themeKeysToCssVariables: ThemeCssVariables;
|
|
54
54
|
export interface Settings {
|
|
55
55
|
showProgressAnimation: boolean;
|
|
56
|
-
showModalBackdrop: boolean;
|
|
57
56
|
}
|
|
58
57
|
export {};
|