@0xsquid/ui 2.6.4 → 2.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/cjs/index.js +175 -125
  2. package/dist/cjs/types/components/buttons/Chip.d.ts +1 -1
  3. package/dist/cjs/types/components/controls/LargeNumericInput.d.ts +6 -0
  4. package/dist/cjs/types/components/controls/NumericInput.d.ts +2 -1
  5. package/dist/cjs/types/components/controls/index.d.ts +2 -1
  6. package/dist/cjs/types/components/layout/AnimationWrapper.d.ts +3 -0
  7. package/dist/cjs/types/components/layout/ModalTitle.d.ts +5 -0
  8. package/dist/cjs/types/components/layout/SwapConfiguration.d.ts +3 -1
  9. package/dist/cjs/types/components/layout/index.d.ts +1 -0
  10. package/dist/cjs/types/stories/buttons/Chip.stories.d.ts +2 -1
  11. package/dist/cjs/types/stories/controls/Input.stories.d.ts +1 -1
  12. package/dist/cjs/types/stories/controls/LargeNumericInput.stories.d.ts +6 -0
  13. package/dist/cjs/types/stories/layout/SwapConfiguration.stories.d.ts +2 -0
  14. package/dist/esm/index.js +174 -127
  15. package/dist/esm/types/components/buttons/Chip.d.ts +1 -1
  16. package/dist/esm/types/components/controls/LargeNumericInput.d.ts +6 -0
  17. package/dist/esm/types/components/controls/NumericInput.d.ts +2 -1
  18. package/dist/esm/types/components/controls/index.d.ts +2 -1
  19. package/dist/esm/types/components/layout/AnimationWrapper.d.ts +3 -0
  20. package/dist/esm/types/components/layout/ModalTitle.d.ts +5 -0
  21. package/dist/esm/types/components/layout/SwapConfiguration.d.ts +3 -1
  22. package/dist/esm/types/components/layout/index.d.ts +1 -0
  23. package/dist/esm/types/stories/buttons/Chip.stories.d.ts +2 -1
  24. package/dist/esm/types/stories/controls/Input.stories.d.ts +1 -1
  25. package/dist/esm/types/stories/controls/LargeNumericInput.stories.d.ts +6 -0
  26. package/dist/esm/types/stories/layout/SwapConfiguration.stories.d.ts +2 -0
  27. package/dist/index.css +1 -1
  28. package/dist/index.d.ts +31 -14
  29. package/package.json +1 -1
package/dist/cjs/index.js CHANGED
@@ -4451,7 +4451,9 @@ function ImageStack(_a) {
4451
4451
 
4452
4452
  function Chip(_a) {
4453
4453
  var { label, icon } = _a, props = __rest$1(_a, ["label", "icon"]);
4454
- return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-flex tw-h-squid-m tw-items-center tw-justify-center tw-rounded-squid-m tw-bg-grey-500 tw-text-grey-900", icon && "tw-w-squid-m", props.className), children: label ? (jsxRuntime.jsx(CaptionText, { className: "tw-min-w-squid-xl tw-text-nowrap tw-px-squid-xxs tw-text-center", children: label })) : (icon) })));
4454
+ const isInteractive = !!props.onClick;
4455
+ const ChipTag = isInteractive ? "button" : "div";
4456
+ return (jsxRuntime.jsx(ChipTag, Object.assign({}, props, { className: cn("tw-flex tw-h-squid-m tw-items-center tw-justify-center tw-rounded-squid-m tw-bg-grey-500 tw-text-grey-900", icon && "tw-w-squid-m", isInteractive && "hover:tw-bg-grey-300", props.className), children: label ? (jsxRuntime.jsx(CaptionText, { className: "tw-min-w-squid-xl tw-text-nowrap tw-px-squid-xxs tw-text-center", children: label })) : (icon) })));
4455
4457
  }
4456
4458
 
4457
4459
  const loaderSizeMap = {
@@ -4601,6 +4603,40 @@ const InputActionButton = ({ onClick, variant = "tertiary", label = "Paste", })
4601
4603
  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 }) }));
4602
4604
  };
4603
4605
 
4606
+ const placeholder = "0";
4607
+ const suggestedAmounts = ["100", "500", "1000"];
4608
+ function LargeNumericInput({ onChange, value }) {
4609
+ const inputRef = React$1.useRef(null);
4610
+ const inputValueSpyRef = React$1.useRef(null);
4611
+ React$1.useEffect(() => {
4612
+ const observer = new ResizeObserver((entries) => {
4613
+ var _a;
4614
+ if (!inputRef.current)
4615
+ return;
4616
+ // update input width to match the width of the invisible span
4617
+ // this is needed to center the input
4618
+ inputRef.current.style.width = `${(_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect.width}px`;
4619
+ });
4620
+ if (inputValueSpyRef.current) {
4621
+ observer.observe(inputValueSpyRef.current);
4622
+ }
4623
+ return () => {
4624
+ observer.disconnect();
4625
+ };
4626
+ }, []);
4627
+ const handleInputChange = React$1.useCallback((event) => {
4628
+ // Replace commas with dots
4629
+ const value = event.target.value.replace(/,/g, ".");
4630
+ // Check that the input value is a valid number
4631
+ const isValidAmount = /^\d*\.?\d{0,6}$/.test(value);
4632
+ if (isValidAmount)
4633
+ onChange(value || "");
4634
+ }, [onChange]);
4635
+ return (jsxRuntime.jsxs("section", { className: "tw-flex tw-flex-1 tw-flex-col tw-items-center tw-justify-center tw-self-stretch tw-px-squid-l tw-pb-squid-m", children: [jsxRuntime.jsx("div", { className: "tw-relative tw-flex tw-w-full tw-flex-1 tw-items-center tw-justify-center tw-self-stretch tw-text-7xl tw-text-royal-500", children: jsxRuntime.jsxs("label", { className: "tw-flex tw-max-w-full tw-cursor-text tw-items-center tw-overflow-hidden tw-rounded-squid-l tw-px-squid-s tw-py-squid-xxs focus-within:tw-bg-material-light-thin hover:tw-bg-material-light-thin", children: [jsxRuntime.jsx("span", { ref: inputValueSpyRef, className: "tw-pointer-events-none tw-absolute tw-opacity-0", children: value || placeholder }), jsxRuntime.jsx("span", { children: "$" }), jsxRuntime.jsx("input", { inputMode: "decimal", pattern: "[0-9.,]*", ref: inputRef, value: value, onChange: handleInputChange, className: "tw-max-w-[calc(100%-3.125rem)] tw-bg-transparent tw-placeholder-royal-500 tw-outline-none focus:tw-outline-none", placeholder: placeholder })] }) }), jsxRuntime.jsx("footer", { className: "tw-flex tw-h-squid-m tw-items-center tw-justify-center tw-gap-squid-xxs tw-self-stretch", children: suggestedAmounts.map((amount) => (jsxRuntime.jsx(Chip, { label: `$${amount}`, onClick: () => {
4636
+ onChange(amount);
4637
+ } }, amount))) })] }));
4638
+ }
4639
+
4604
4640
  /*
4605
4641
  * bignumber.js v9.1.2
4606
4642
  * A JavaScript library for arbitrary-precision arithmetic.
@@ -8729,6 +8765,12 @@ const AnimationWrapper = (playerProps) => {
8729
8765
  }, []);
8730
8766
  return (jsxRuntime.jsx("div", { id: "squid-lottie-animation", className: clsx("tw-h-full [&>*]:tw-h-full", "tw-transition-all", display ? "tw-opacity-100" : "tw-opacity-0"), children: showAnimation && jsxRuntime.jsx(Player, Object.assign({}, playerProps)) }));
8731
8767
  };
8768
+ function AnimationCard({ children }) {
8769
+ return (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-py-squid-s tw-text-material-light-thin mobile-xs-height:tw-h-[160px]", style: {
8770
+ // box shadow simulating bottom outline (we do not use css outline because cannot apply it to only one side)
8771
+ boxShadow: "0 1px 0 currentColor",
8772
+ }, children: children }));
8773
+ }
8732
8774
 
8733
8775
  const borderRadiusClassMap = {
8734
8776
  sm: "tw-rounded-menu-sm before:tw-rounded-menu-sm",
@@ -19025,6 +19067,10 @@ function ModalContentDivider() {
19025
19067
  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" }) }));
19026
19068
  }
19027
19069
 
19070
+ function ModalTitle({ title }) {
19071
+ return (jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-xxl tw-items-center tw-justify-center tw-gap-squid-xs tw-self-stretch tw-px-squid-m tw-py-squid-xs", children: jsxRuntime.jsx(BodyText, { size: "small", children: title }) }));
19072
+ }
19073
+
19028
19074
  function NavigationBar(_a) {
19029
19075
  var { title, displayBackButton = false, logoUrl, transparent = false, displayButtonShadows = false, onBackButtonClick, actions, isLoading = false, subtitle, paddingRight = 0 } = _a, props = __rest$1(_a, ["title", "displayBackButton", "logoUrl", "transparent", "displayButtonShadows", "onBackButtonClick", "actions", "isLoading", "subtitle", "paddingRight"]);
19030
19076
  return (jsxRuntime.jsxs("nav", Object.assign({}, props, { className: cn("tw-flex tw-max-h-[120px] tw-flex-row-reverse tw-text-grey-300 mobile-xs-height:tw-flex-col", transparent ? "tw-bg-transparent" : "tw-bg-grey-900", props.className), children: [jsxRuntime.jsxs("div", { className: cn("tw-flex tw-h-squid-xxl tw-items-center tw-justify-end tw-gap-x-squid-xs tw-pl-squid-m", displayBackButton
@@ -19082,7 +19128,7 @@ function LogoContainer({ children }) {
19082
19128
  return (jsxRuntime.jsx("div", { className: "tw-flex tw-h-[60px] tw-w-[60px] tw-items-center tw-justify-center", children: children }));
19083
19129
  }
19084
19130
 
19085
- function SwapConfiguration({ amount, tokenPrice = 0, isFetching: isFetchingProp = false, chain, token, direction = "from", onAmountChange, balance, criticalPriceImpactPercentage, error, priceImpactPercentage, maxUsdDecimals, isInputInteractive = true, isLoading = false, inputModeButton, balanceButton, assetsButton, walletButton, showNumericInputDetails = true, }) {
19131
+ function SwapConfiguration({ amount, tokenPrice = 0, isFetching: isFetchingProp = false, chain, token, direction = "from", onAmountChange, balance, criticalPriceImpactPercentage, error, priceImpactPercentage, maxUsdDecimals, isInputInteractive = true, isLoading = false, inputModeButton, balanceButton, assetsButton, walletButton, showNumericInputDetails = true, fullHeight = true, debounceInput = true, }) {
19086
19132
  var _a, _b;
19087
19133
  const isWalletButtonInteractive = !isLoading && !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick);
19088
19134
  const WalletButtonTag = isWalletButtonInteractive ? "button" : "div";
@@ -19091,13 +19137,13 @@ function SwapConfiguration({ amount, tokenPrice = 0, isFetching: isFetchingProp
19091
19137
  !(walletButton === null || walletButton === void 0 ? void 0 : walletButton.disabled) &&
19092
19138
  !!token &&
19093
19139
  (!!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.address) || !!(walletButton === null || walletButton === void 0 ? void 0 : walletButton.emptyAddressLabel));
19094
- return (jsxRuntime.jsxs("section", { className: "tw-relative tw-flex tw-h-full tw-w-full tw-flex-col tw-border-t tw-border-t-material-light-thin tw-bg-grey-900 tw-pb-squid-m mobile-lg:tw-w-card-large", children: [jsxRuntime.jsx("header", { className: "tw-flex tw-items-center tw-gap-1 tw-px-squid-m tw-py-squid-xs tw-leading-5 tw-text-grey-300 mobile-lg:tw-px-squid-l", children: jsxRuntime.jsx(Tooltip, Object.assign({}, walletButton === null || walletButton === void 0 ? void 0 : walletButton.tooltip, { tooltipWidth: "max", childrenClassName: "tw-rounded-squid-s", containerClassName: "tw-rounded-squid-s", children: jsxRuntime.jsxs(WalletButtonTag, { onClick: isWalletButtonInteractive ? walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick : undefined, className: cn("-tw-ml-squid-xs tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-s tw-px-squid-xs tw-text-grey-600", isWalletButtonInteractive && "hover:tw-bg-material-light-thin", isLoading && "tw-opacity-50"), children: [jsxRuntime.jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === "from" ? "Pay" : "Receive" }), showWalletButtonLabel && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(BodyText, { size: "small", children: ":" }), jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsxRuntime.jsx(BodyText, { size: "small", className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
19140
+ return (jsxRuntime.jsxs("section", { className: cn("tw-relative tw-flex tw-w-full tw-flex-col tw-border-t tw-border-t-material-light-thin tw-bg-grey-900 mobile-lg:tw-w-card-large", fullHeight && "tw-h-full tw-pb-squid-m"), children: [jsxRuntime.jsx("header", { className: "tw-flex tw-items-center tw-gap-1 tw-px-squid-m tw-py-squid-xs tw-leading-5 tw-text-grey-300 mobile-lg:tw-px-squid-l", children: jsxRuntime.jsx(Tooltip, Object.assign({}, walletButton === null || walletButton === void 0 ? void 0 : walletButton.tooltip, { tooltipWidth: "max", childrenClassName: "tw-rounded-squid-s", containerClassName: "tw-rounded-squid-s", children: jsxRuntime.jsxs(WalletButtonTag, { onClick: isWalletButtonInteractive ? walletButton === null || walletButton === void 0 ? void 0 : walletButton.onClick : undefined, className: cn("-tw-ml-squid-xs tw-flex tw-h-squid-l tw-items-center tw-gap-squid-xxs tw-rounded-squid-s tw-px-squid-xs tw-text-grey-600", isWalletButtonInteractive && "hover:tw-bg-material-light-thin", isLoading && "tw-opacity-50"), children: [jsxRuntime.jsx(BodyText, { className: "tw-text-grey-500", size: "small", children: direction === "from" ? "Pay" : "Receive" }), showWalletButtonLabel && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(BodyText, { size: "small", children: ":" }), jsxRuntime.jsxs("div", { className: "tw-flex tw-items-center tw-gap-1", children: [jsxRuntime.jsx(BodyText, { size: "small", className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
19095
19141
  ? "tw-text-grey-300"
19096
19142
  : "tw-text-royal-500", children: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
19097
19143
  ? walletButton === null || walletButton === void 0 ? void 0 : walletButton.address
19098
19144
  : walletButton === null || walletButton === void 0 ? void 0 : walletButton.emptyAddressLabel }), jsxRuntime.jsx(ChevronArrowIcon, { className: (walletButton === null || walletButton === void 0 ? void 0 : walletButton.address)
19099
19145
  ? "tw-text-grey-600"
19100
- : "tw-text-royal-500" })] })] }))] }) })) }), jsxRuntime.jsx("div", { className: "tw-px-squid-m mobile-lg:tw-px-squid-l", children: jsxRuntime.jsx(AssetsButton, Object.assign({}, assetsButton, { chain: chain, token: token, isLoading: isLoading })) }), isFetching && (jsxRuntime.jsx("div", { className: "tw-absolute tw-bottom-2 tw-left-squid-m tw-z-10 tw-overflow-hidden mobile-lg:tw-left-squid-l", children: jsxRuntime.jsx("div", { className: "tw-h-[94px] tw-w-[1260px] tw-animate-move-loading-cover-to-right tw-bg-dark-cover" }) })), jsxRuntime.jsx(NumericInput, { inputMode: "decimal", pattern: "[0-9.,]*", token: {
19146
+ : "tw-text-royal-500" })] })] }))] }) })) }), jsxRuntime.jsx("div", { className: "tw-px-squid-m mobile-lg:tw-px-squid-l", children: jsxRuntime.jsx(AssetsButton, Object.assign({}, assetsButton, { chain: chain, token: token, isLoading: isLoading })) }), jsxRuntime.jsx(NumericInput, { inputMode: "decimal", pattern: "[0-9.,]*", token: {
19101
19147
  decimals: (_a = token === null || token === void 0 ? void 0 : token.decimals) !== null && _a !== void 0 ? _a : 18,
19102
19148
  symbol: (_b = token === null || token === void 0 ? void 0 : token.symbol) !== null && _b !== void 0 ? _b : "",
19103
19149
  price: tokenPrice,
@@ -19106,7 +19152,7 @@ function SwapConfiguration({ amount, tokenPrice = 0, isFetching: isFetchingProp
19106
19152
  }, balance: balance, criticalPriceImpactPercentage: criticalPriceImpactPercentage, error: error, formatIfVerySmall: {
19107
19153
  token: "0.001",
19108
19154
  usd: "0.01",
19109
- }, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: showNumericInputDetails, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading })] }));
19155
+ }, maxUsdDecimals: maxUsdDecimals, isLoading: isFetching, priceImpactPercentage: priceImpactPercentage, showDetails: showNumericInputDetails, direction: direction, forcedAmount: amount, inputModeButton: inputModeButton, balanceButton: balanceButton, isInteractive: isInputInteractive && !isLoading, debounceInput: debounceInput })] }));
19110
19156
  }
19111
19157
 
19112
19158
  function AccountListItem({ isConnected, imageUrls = [], imageUrl, badgeUrl, actions, subtitle, title, }) {
@@ -27393,7 +27439,7 @@ function NumericInput(_a) {
27393
27439
  var { priceImpactPercentage, balance = "0", error, criticalPriceImpactPercentage = 5, token, onAmountChange, forcedAmount, maxUsdDecimals = 2, formatIfVerySmall = {
27394
27440
  token: "0.001",
27395
27441
  usd: "0.01",
27396
- }, showDetails = true, isLoading = false, direction, inputModeButton, isInteractive = false, balanceButton } = _a, props = __rest$1(_a, ["priceImpactPercentage", "balance", "error", "criticalPriceImpactPercentage", "token", "onAmountChange", "forcedAmount", "maxUsdDecimals", "formatIfVerySmall", "showDetails", "isLoading", "direction", "inputModeButton", "isInteractive", "balanceButton"]);
27442
+ }, showDetails = true, isLoading = false, direction, inputModeButton, isInteractive = false, balanceButton, debounceInput = true } = _a, props = __rest$1(_a, ["priceImpactPercentage", "balance", "error", "criticalPriceImpactPercentage", "token", "onAmountChange", "forcedAmount", "maxUsdDecimals", "formatIfVerySmall", "showDetails", "isLoading", "direction", "inputModeButton", "isInteractive", "balanceButton", "debounceInput"]);
27397
27443
  const [inputValue, setInputValue] = React$1.useState("");
27398
27444
  const [userInputType, setUserInputType] = React$1.useState(UserInputType.TOKEN);
27399
27445
  const balanceChipClickable = isInteractive && parseFloat(balance) > 0;
@@ -27408,16 +27454,14 @@ function NumericInput(_a) {
27408
27454
  ? safeNewValue
27409
27455
  : convertTokenAmountToUSD(safeNewValue, token.price, maxUsdDecimals);
27410
27456
  setInputValue(formattedAmount);
27411
- }, [userInputType, token.price, direction, token.decimals]);
27457
+ }, [userInputType, token.price, token.decimals]);
27412
27458
  const onBalanceButtonClick = React$1.useCallback(() => {
27413
27459
  if (balanceChipClickable) {
27414
27460
  updateInputValue(balance);
27415
27461
  onAmountChange(balance);
27416
27462
  }
27417
- }, [balance, direction, onAmountChange, updateInputValue]);
27418
- const onAmountChangeDebounced = React$1.useCallback(debounce$1(onAmountChange, 1000), [
27419
- onAmountChange,
27420
- ]);
27463
+ }, [balance, onAmountChange, updateInputValue]);
27464
+ const onAmountChangeDebounced = React$1.useCallback(debounce$1(onAmountChange, debounceInput ? 1000 : 0), [onAmountChange]);
27421
27465
  const handleInputChange = (e) => {
27422
27466
  const value = e.target.value.replace(/,/g, "."); // Replace commas with dots
27423
27467
  const maxDecimalsForInputType = userInputType === UserInputType.TOKEN ? token.decimals : maxUsdDecimals;
@@ -27538,9 +27582,9 @@ function NumericInput(_a) {
27538
27582
  }, [userInputType, balance, token.price]);
27539
27583
  const containerClassname = "tw-px-squid-xs !tw-h-full tw-pt-squid-xxs mobile-xs-height:tw-pb-squid-s tw-text-heading-small tw-font-regular mobile-lg:tw-px-squid-m tw-relative tw-h-[65px] mobile-sm-height:tw-h-[75px]";
27540
27584
  const inputRef = React$1.useRef(null);
27541
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isInteractive && !isLoading ? (jsxRuntime.jsxs("form", { className: containerClassname, onSubmit: (e) => {
27585
+ return (jsxRuntime.jsxs("div", { className: "tw-relative tw-flex tw-w-full tw-flex-col", children: [isLoading && (jsxRuntime.jsx("div", { className: "tw-pointer-events-none tw-absolute tw-inset-0 tw-top-squid-xxs tw-z-10 tw-overflow-hidden", children: jsxRuntime.jsx("div", { className: "tw-h-full tw-w-[78.75rem] tw-animate-move-loading-cover-to-right tw-bg-dark-cover" }) })), isInteractive && !isLoading ? (jsxRuntime.jsxs("form", { className: containerClassname, onSubmit: (e) => {
27542
27586
  e.preventDefault();
27543
- }, children: [userInputType === UserInputType.USD && (jsxRuntime.jsx("span", { className: "tw-absolute tw-left-5 tw-top-[11px] tw-leading-[43px] tw-text-grey-600 mobile-lg:tw-left-[30px]", children: "$" })), jsxRuntime.jsx("input", Object.assign({ ref: inputRef, type: "text", value: inputValue, onChange: handleInputChange, placeholder: "0", className: cn("tw-h-[55px] tw-w-full tw-rounded-squid-s tw-bg-transparent tw-px-squid-xs tw-py-squid-s tw-text-grey-300 placeholder:tw-text-grey-600 hover:tw-bg-material-light-thin focus:tw-bg-material-light-thin focus:tw-text-royal-500 focus:tw-outline-none", userInputType === UserInputType.USD && "tw-pl-[33px]") }, props))] })) : (jsxRuntime.jsx("div", { className: cn(containerClassname, (isLoading || Number(inputValue || 0) === 0) && loadingClassName), children: jsxRuntime.jsx("div", { className: "tw-font-regular tw-flex tw-h-[55px] tw-w-full tw-items-center tw-rounded-squid-s tw-bg-transparent tw-px-squid-xs tw-py-squid-s tw-text-heading-small tw-text-grey-300", children: jsxRuntime.jsx("span", { children: inputValue || 0 }) }) })), !showDetails ? null : (jsxRuntime.jsxs("footer", { className: cn("tw-flex tw-h-squid-m tw-max-h-squid-m tw-items-center tw-justify-between tw-gap-2 tw-px-squid-xs tw-text-grey-500 mobile-lg:tw-px-squid-m", isLoading && loadingClassName), children: [error ? (jsxRuntime.jsx("div", { className: "tw-px-squid-xs", children: jsxRuntime.jsx(ErrorMessage, { message: error.message }) })) : (jsxRuntime.jsx(Tooltip, Object.assign({}, (isLoading
27587
+ }, children: [userInputType === UserInputType.USD && (jsxRuntime.jsx("span", { className: "tw-absolute tw-left-5 tw-top-[11px] tw-leading-[43px] tw-text-grey-600 mobile-lg:tw-left-[30px]", children: "$" })), jsxRuntime.jsx("input", Object.assign({ ref: inputRef, type: "text", value: inputValue, onChange: handleInputChange, placeholder: "0", className: cn("tw-h-[55px] tw-w-full tw-rounded-squid-s tw-bg-transparent tw-px-squid-xs tw-py-squid-s tw-text-grey-300 placeholder:tw-text-grey-600 hover:tw-bg-material-light-thin focus:tw-bg-material-light-thin focus:tw-text-royal-500 focus:tw-outline-none", userInputType === UserInputType.USD && "tw-pl-[33px]") }, props))] })) : (jsxRuntime.jsx("div", { className: cn(containerClassname, (isLoading || Number(inputValue || 0) === 0) && loadingClassName), children: jsxRuntime.jsx("div", { className: "tw-font-regular tw-flex tw-h-[55px] tw-w-full tw-cursor-default tw-items-center tw-rounded-squid-s tw-bg-transparent tw-px-squid-xs tw-py-squid-s tw-text-heading-small tw-text-grey-300", children: jsxRuntime.jsx("span", { children: inputValue || 0 }) }) })), !showDetails ? null : (jsxRuntime.jsxs("footer", { className: cn("tw-flex tw-h-squid-m tw-max-h-squid-m tw-items-center tw-justify-between tw-gap-2 tw-px-squid-xs tw-text-grey-500 mobile-lg:tw-px-squid-m", isLoading && loadingClassName), children: [error ? (jsxRuntime.jsx("div", { className: "tw-px-squid-xs", children: jsxRuntime.jsx(ErrorMessage, { message: error.message }) })) : (jsxRuntime.jsx(Tooltip, Object.assign({}, (isLoading
27544
27588
  ? undefined
27545
27589
  : userInputType === UserInputType.TOKEN
27546
27590
  ? inputModeButton === null || inputModeButton === void 0 ? void 0 : inputModeButton.tokenModeTooltip
@@ -27557,114 +27601,6 @@ function NumericInput(_a) {
27557
27601
  : notInteractiveChipClassName), children: [jsxRuntime.jsx(CaptionText, { className: "tw-opacity-66", children: "Balance" }), jsxRuntime.jsxs("div", { children: [userInputType === UserInputType.USD && (jsxRuntime.jsx(CaptionText, { className: "tw-opacity-66", children: "$" })), jsxRuntime.jsx(CaptionText, { children: balanceFormatted })] }), !(balanceButton === null || balanceButton === void 0 ? void 0 : balanceButton.hideMaxChip) && jsxRuntime.jsx(Chip, { label: "Max" })] }) }))] }))] }));
27558
27602
  }
27559
27603
 
27560
- function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSelected = false, }) {
27561
- const [isInputVisible, setIsInputVisible] = React$1.useState(false);
27562
- const [inputValue, setInputValue] = React$1.useState(String(value !== null && value !== void 0 ? value : 0));
27563
- React$1.useEffect(() => {
27564
- if (!isInputVisible)
27565
- return;
27566
- const handleOutsideClick = (event) => {
27567
- var _a;
27568
- const clickedElementIsDifferentThanMenu = event.target !== menuRef.current;
27569
- const clickedElementIsDifferentThanSlider = event.target !== sliderRef.current;
27570
- const sliderContainsClickedElement = (_a = sliderRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target);
27571
- const hideInput = clickedElementIsDifferentThanMenu &&
27572
- (!clickedElementIsDifferentThanSlider || !sliderContainsClickedElement);
27573
- if (hideInput) {
27574
- handleCloseInput();
27575
- }
27576
- };
27577
- document.addEventListener("click", handleOutsideClick);
27578
- return () => {
27579
- document.removeEventListener("click", handleOutsideClick);
27580
- };
27581
- }, [isInputVisible]);
27582
- const menuRef = React$1.useRef(null);
27583
- const sliderRef = React$1.useRef(null);
27584
- const handleSubmit = React$1.useCallback((value) => {
27585
- handleCloseInput();
27586
- onChange === null || onChange === void 0 ? void 0 : onChange(value === "" ? undefined : Number(value));
27587
- }, [onChange]);
27588
- const handleKeyDown = React$1.useCallback((e) => {
27589
- // block unwanted (but still valid) characters
27590
- if (["e", "E", "+", "-"].includes(e.key)) {
27591
- e.preventDefault();
27592
- return;
27593
- }
27594
- // close input when pressing escape
27595
- if (e.key === "Escape") {
27596
- handleCloseInput();
27597
- }
27598
- }, []);
27599
- const handleOpenInput = React$1.useCallback(() => {
27600
- setIsInputVisible(true);
27601
- }, []);
27602
- const handleCloseInput = React$1.useCallback(() => {
27603
- setIsInputVisible(false);
27604
- }, []);
27605
- return (jsxRuntime.jsxs("div", { ref: sliderRef, className: "tw-relative tw-flex tw-h-[30px] tw-items-center tw-justify-center tw-rounded-squid-xs", children: [jsxRuntime.jsxs("button", { className: cn("tw-relative tw-flex tw-h-full tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-p-squid-xs tw-pr-[40px] tw-text-left tw-text-caption tw-font-caption tw-leading-[10px] -tw-outline-offset-2 placeholder-shown:tw-text-grey-600 hover:tw-bg-material-light-thin", value === 0 || value === undefined
27606
- ? "tw-text-grey-600"
27607
- : "tw-text-grey-300", isInputVisible ? "tw-bg-material-light-thin" : "tw-bg-transparent", isSelected && "tw-outline tw-outline-2 tw-outline-royal-500"), children: [value !== null && value !== void 0 ? value : 0, jsxRuntime.jsx(CaptionText, { className: "!tw-font-medium !tw-leading-[10px] tw-text-grey-300", children: type === "percentage" ? "%" : "$" })] }), jsxRuntime.jsx("button", { onClick: handleOpenInput, className: "tw-absolute tw-right-squid-xs tw-flex tw-h-[26px] tw-w-[26px] tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-xxs !tw-font-medium tw-leading-[10px] hover:tw-bg-material-light-thin", children: jsxRuntime.jsx(Chip, { icon: jsxRuntime.jsx(ChevronGrabberVerticalIcon, { className: "tw-text-grey-900" }) }) }), isInputVisible && (jsxRuntime.jsx(Menu, { menuRef: menuRef, containerClassName: "tw-absolute tw-bottom-full tw-z-10 tw-pb-squid-m tw-w-[160px]", children: jsxRuntime.jsx("form", { onSubmit: (e) => {
27608
- e.preventDefault();
27609
- handleSubmit(inputValue);
27610
- }, children: jsxRuntime.jsx(Input, { autoFocus: true, min: min, max: max, onKeyDown: handleKeyDown, step: decimalsFormat, placeholder: "0", type: "number", defaultValue: value, value: inputValue, onChange: (e) => {
27611
- const isValid = e.target.checkValidity();
27612
- if (!isValid)
27613
- return;
27614
- setInputValue(e.target.value);
27615
- }, showIcon: false, actionButtonProps: {
27616
- label: "Ok",
27617
- onClick: () => {
27618
- handleSubmit(inputValue);
27619
- },
27620
- variant: "primary",
27621
- } }) }) }))] }));
27622
- }
27623
-
27624
- const switchSizeClassMap = {
27625
- small: "tw-w-[36px] tw-h-squid-m tw-p-0.5",
27626
- large: "tw-w-[54px] tw-h-squid-l tw-p-[3px]",
27627
- };
27628
- const switchKnobSizeClassMap = {
27629
- small: "tw-w-4 tw-h-4",
27630
- large: "tw-w-6 tw-h-6",
27631
- };
27632
- const switchKnobCheckedClassMap = {
27633
- large: {
27634
- checked: "tw-left-[26px]",
27635
- unchecked: "tw-left-[2px]",
27636
- },
27637
- small: {
27638
- checked: "tw-left-[17px]",
27639
- unchecked: "tw-left-[1px]",
27640
- },
27641
- };
27642
- function Switch({ checked = false, onChange, size, disabled = false, inputProps, }) {
27643
- return (
27644
- // Switch container
27645
- jsxRuntime.jsxs("label", { className: clsx("tw-relative tw-inline-flex tw-items-center tw-justify-end tw-overflow-hidden tw-rounded-squid-m tw-border tw-border-material-light-thin tw-transition-colors",
27646
- // size styles
27647
- switchSizeClassMap[size],
27648
- // checked styles
27649
- disabled || !checked ? "tw-bg-grey-800" : "tw-bg-status-positive",
27650
- // disabled styles
27651
- disabled ? "tw-cursor-not-allowed" : "tw-cursor-pointer",
27652
- // Focus visible styles
27653
- "tw-focus-visible-within-outline"), children: [jsxRuntime.jsx("input", Object.assign({}, inputProps, { disabled: disabled, checked: checked, onChange: disabled ? undefined : (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.checked), type: "checkbox", className: "tw-peer tw-sr-only" })), jsxRuntime.jsx("span", { style: {
27654
- filter: disabled
27655
- ? "drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.10)) drop-shadow(0px 1px 5px rgba(0, 0, 0, 0.10))"
27656
- : "drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.33)) drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.20))",
27657
- }, className: clsx("tw-absolute tw-rounded-full tw-border tw-border-material-light-thin tw-transition-all",
27658
- // size styles
27659
- switchKnobSizeClassMap[size],
27660
- // checked styles
27661
- switchKnobCheckedClassMap[size][checked ? "checked" : "unchecked"], disabled
27662
- ? "group-data-[squid-theme-type=dark]:tw-bg-grey-700 group-data-[squid-theme-type=light]:tw-bg-grey-900"
27663
- : checked
27664
- ? "group-data-[squid-theme-type=dark]:tw-bg-grey-100 group-data-[squid-theme-type=light]:tw-bg-grey-900"
27665
- : "tw-bg-grey-500") })] }));
27666
- }
27667
-
27668
27604
  function RangeInput({ label, initialValue, onChange, min = 0, max = 99, isWarning = false, }) {
27669
27605
  const [pressedButton, setPressedButton] = React$1.useState(null);
27670
27606
  const inputRef = React$1.useRef(null);
@@ -27776,6 +27712,114 @@ function RangeInput({ label, initialValue, onChange, min = 0, max = 99, isWarnin
27776
27712
  }, onMouseLeave: handleUpdateValue, className: cn("tw-relative tw-flex tw-h-full tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-p-squid-xxs tw-text-left tw-text-caption tw-font-caption tw-leading-[10px] placeholder-shown:tw-text-grey-600 hover:tw-bg-material-light-thin"), children: jsxRuntime.jsx(CirclePlusIcon, {}) })] })] }) }));
27777
27713
  }
27778
27714
 
27715
+ function SettingsSlider({ value, type, onChange, decimalsFormat, max, min, isSelected = false, }) {
27716
+ const [isInputVisible, setIsInputVisible] = React$1.useState(false);
27717
+ const [inputValue, setInputValue] = React$1.useState(String(value !== null && value !== void 0 ? value : 0));
27718
+ React$1.useEffect(() => {
27719
+ if (!isInputVisible)
27720
+ return;
27721
+ const handleOutsideClick = (event) => {
27722
+ var _a;
27723
+ const clickedElementIsDifferentThanMenu = event.target !== menuRef.current;
27724
+ const clickedElementIsDifferentThanSlider = event.target !== sliderRef.current;
27725
+ const sliderContainsClickedElement = (_a = sliderRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target);
27726
+ const hideInput = clickedElementIsDifferentThanMenu &&
27727
+ (!clickedElementIsDifferentThanSlider || !sliderContainsClickedElement);
27728
+ if (hideInput) {
27729
+ handleCloseInput();
27730
+ }
27731
+ };
27732
+ document.addEventListener("click", handleOutsideClick);
27733
+ return () => {
27734
+ document.removeEventListener("click", handleOutsideClick);
27735
+ };
27736
+ }, [isInputVisible]);
27737
+ const menuRef = React$1.useRef(null);
27738
+ const sliderRef = React$1.useRef(null);
27739
+ const handleSubmit = React$1.useCallback((value) => {
27740
+ handleCloseInput();
27741
+ onChange === null || onChange === void 0 ? void 0 : onChange(value === "" ? undefined : Number(value));
27742
+ }, [onChange]);
27743
+ const handleKeyDown = React$1.useCallback((e) => {
27744
+ // block unwanted (but still valid) characters
27745
+ if (["e", "E", "+", "-"].includes(e.key)) {
27746
+ e.preventDefault();
27747
+ return;
27748
+ }
27749
+ // close input when pressing escape
27750
+ if (e.key === "Escape") {
27751
+ handleCloseInput();
27752
+ }
27753
+ }, []);
27754
+ const handleOpenInput = React$1.useCallback(() => {
27755
+ setIsInputVisible(true);
27756
+ }, []);
27757
+ const handleCloseInput = React$1.useCallback(() => {
27758
+ setIsInputVisible(false);
27759
+ }, []);
27760
+ return (jsxRuntime.jsxs("div", { ref: sliderRef, className: "tw-relative tw-flex tw-h-[30px] tw-items-center tw-justify-center tw-rounded-squid-xs", children: [jsxRuntime.jsxs("button", { className: cn("tw-relative tw-flex tw-h-full tw-items-center tw-justify-center tw-self-stretch tw-rounded-squid-xs tw-p-squid-xs tw-pr-[40px] tw-text-left tw-text-caption tw-font-caption tw-leading-[10px] -tw-outline-offset-2 placeholder-shown:tw-text-grey-600 hover:tw-bg-material-light-thin", value === 0 || value === undefined
27761
+ ? "tw-text-grey-600"
27762
+ : "tw-text-grey-300", isInputVisible ? "tw-bg-material-light-thin" : "tw-bg-transparent", isSelected && "tw-outline tw-outline-2 tw-outline-royal-500"), children: [value !== null && value !== void 0 ? value : 0, jsxRuntime.jsx(CaptionText, { className: "!tw-font-medium !tw-leading-[10px] tw-text-grey-300", children: type === "percentage" ? "%" : "$" })] }), jsxRuntime.jsx("button", { onClick: handleOpenInput, className: "tw-absolute tw-right-squid-xs tw-flex tw-h-[26px] tw-w-[26px] tw-items-center tw-justify-center tw-gap-squid-xs tw-rounded-squid-xxs !tw-font-medium tw-leading-[10px] hover:tw-bg-material-light-thin", children: jsxRuntime.jsx(Chip, { icon: jsxRuntime.jsx(ChevronGrabberVerticalIcon, { className: "tw-text-grey-900" }) }) }), isInputVisible && (jsxRuntime.jsx(Menu, { menuRef: menuRef, containerClassName: "tw-absolute tw-bottom-full tw-z-10 tw-pb-squid-m tw-w-[160px]", children: jsxRuntime.jsx("form", { onSubmit: (e) => {
27763
+ e.preventDefault();
27764
+ handleSubmit(inputValue);
27765
+ }, children: jsxRuntime.jsx(Input, { autoFocus: true, min: min, max: max, onKeyDown: handleKeyDown, step: decimalsFormat, placeholder: "0", type: "number", defaultValue: value, value: inputValue, onChange: (e) => {
27766
+ const isValid = e.target.checkValidity();
27767
+ if (!isValid)
27768
+ return;
27769
+ setInputValue(e.target.value);
27770
+ }, showIcon: false, actionButtonProps: {
27771
+ label: "Ok",
27772
+ onClick: () => {
27773
+ handleSubmit(inputValue);
27774
+ },
27775
+ variant: "primary",
27776
+ } }) }) }))] }));
27777
+ }
27778
+
27779
+ const switchSizeClassMap = {
27780
+ small: "tw-w-[36px] tw-h-squid-m tw-p-0.5",
27781
+ large: "tw-w-[54px] tw-h-squid-l tw-p-[3px]",
27782
+ };
27783
+ const switchKnobSizeClassMap = {
27784
+ small: "tw-w-4 tw-h-4",
27785
+ large: "tw-w-6 tw-h-6",
27786
+ };
27787
+ const switchKnobCheckedClassMap = {
27788
+ large: {
27789
+ checked: "tw-left-[26px]",
27790
+ unchecked: "tw-left-[2px]",
27791
+ },
27792
+ small: {
27793
+ checked: "tw-left-[17px]",
27794
+ unchecked: "tw-left-[1px]",
27795
+ },
27796
+ };
27797
+ function Switch({ checked = false, onChange, size, disabled = false, inputProps, }) {
27798
+ return (
27799
+ // Switch container
27800
+ jsxRuntime.jsxs("label", { className: clsx("tw-relative tw-inline-flex tw-items-center tw-justify-end tw-overflow-hidden tw-rounded-squid-m tw-border tw-border-material-light-thin tw-transition-colors",
27801
+ // size styles
27802
+ switchSizeClassMap[size],
27803
+ // checked styles
27804
+ disabled || !checked ? "tw-bg-grey-800" : "tw-bg-status-positive",
27805
+ // disabled styles
27806
+ disabled ? "tw-cursor-not-allowed" : "tw-cursor-pointer",
27807
+ // Focus visible styles
27808
+ "tw-focus-visible-within-outline"), children: [jsxRuntime.jsx("input", Object.assign({}, inputProps, { disabled: disabled, checked: checked, onChange: disabled ? undefined : (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.checked), type: "checkbox", className: "tw-peer tw-sr-only" })), jsxRuntime.jsx("span", { style: {
27809
+ filter: disabled
27810
+ ? "drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.10)) drop-shadow(0px 1px 5px rgba(0, 0, 0, 0.10))"
27811
+ : "drop-shadow(0px 5px 20px rgba(0, 0, 0, 0.33)) drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.20))",
27812
+ }, className: clsx("tw-absolute tw-rounded-full tw-border tw-border-material-light-thin tw-transition-all",
27813
+ // size styles
27814
+ switchKnobSizeClassMap[size],
27815
+ // checked styles
27816
+ switchKnobCheckedClassMap[size][checked ? "checked" : "unchecked"], disabled
27817
+ ? "group-data-[squid-theme-type=dark]:tw-bg-grey-700 group-data-[squid-theme-type=light]:tw-bg-grey-900"
27818
+ : checked
27819
+ ? "group-data-[squid-theme-type=dark]:tw-bg-grey-100 group-data-[squid-theme-type=light]:tw-bg-grey-900"
27820
+ : "tw-bg-grey-500") })] }));
27821
+ }
27822
+
27779
27823
  const imageWrapperClassName = "tw-w-[40px] tw-aspect-square tw-flex tw-items-center tw-justify-center";
27780
27824
  const tokenImageClassName = "tw-absolute tw-h-squid-xl tw-w-squid-xl tw-rounded-full tw-object-cover";
27781
27825
  const themeKeyVariantMap = {
@@ -69410,10 +69454,7 @@ function SwapProgressView({ steps, isOpen = true, handleClose, handleComplete, s
69410
69454
  ? ""
69411
69455
  : showSwapInfoSection
69412
69456
  ? "tw-animate-scale-and-fade-up"
69413
- : "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-py-squid-s tw-text-material-light-thin mobile-xs-height:tw-h-[160px]", style: {
69414
- // box shadow simulating bottom outline (we do not use css outline because cannot apply it to only one side)
69415
- boxShadow: "0 1px 0 currentColor",
69416
- }, children: jsxRuntime.jsx(AnimationWrapper, { style: {
69457
+ : "tw-animate-scale-and-fade-down"), children: [jsxRuntime.jsx(AnimationCard, { children: jsxRuntime.jsx(AnimationWrapper, { style: {
69417
69458
  height: "100%",
69418
69459
  maxHeight: "100%",
69419
69460
  width: "auto",
@@ -69750,6 +69791,12 @@ const parseSquidTheme = (userTheme, themeType) => {
69750
69791
  "button-md-secondary-text": fullPublicTheme.color["grey-800"],
69751
69792
  "button-md-tertiary-bg": fullPublicTheme.color["grey-800"],
69752
69793
  "button-md-tertiary-text": fullPublicTheme.color["grey-300"],
69794
+ "button-sm-primary-bg": fullPublicTheme.color["royal-500"],
69795
+ "button-sm-primary-text": fullPublicTheme.color[themeType === "light" ? "grey-900" : "grey-100"],
69796
+ "button-sm-secondary-bg": fullPublicTheme.color["grey-100"],
69797
+ "button-sm-secondary-text": fullPublicTheme.color["grey-800"],
69798
+ "button-sm-tertiary-bg": fullPublicTheme.color["grey-800"],
69799
+ "button-sm-tertiary-text": fullPublicTheme.color["grey-300"],
69753
69800
  };
69754
69801
  const defaultInputColors = {
69755
69802
  "input-placeholder": fullPublicTheme.color["grey-600"],
@@ -69915,6 +69962,7 @@ exports.ActionRow = ActionRow;
69915
69962
  exports.ActionStatusRow = ActionStatusRow;
69916
69963
  exports.ActionWrapper = ActionWrapper;
69917
69964
  exports.AddressButton = AddressButton;
69965
+ exports.AnimationCard = AnimationCard;
69918
69966
  exports.AnimationWrapper = AnimationWrapper;
69919
69967
  exports.Announcement = Announcement;
69920
69968
  exports.AppContainer = AppContainer;
@@ -70065,6 +70113,7 @@ exports.InteractionProperties = InteractionProperties;
70065
70113
  exports.InteractionTransactionView = InteractionTransactionView;
70066
70114
  exports.Join = Join;
70067
70115
  exports.LaptopIcon = LaptopIcon;
70116
+ exports.LargeNumericInput = LargeNumericInput;
70068
70117
  exports.LightningIcon = LightningIcon;
70069
70118
  exports.LimitIcon = LimitIcon;
70070
70119
  exports.LinkIcon = LinkIcon;
@@ -70083,6 +70132,7 @@ exports.MirrorIcon = MirrorIcon;
70083
70132
  exports.Modal = Modal;
70084
70133
  exports.ModalContent = ModalContent;
70085
70134
  exports.ModalContentDivider = ModalContentDivider;
70135
+ exports.ModalTitle = ModalTitle;
70086
70136
  exports.MoneyBagIcon = MoneyBagIcon;
70087
70137
  exports.MoonIcon = MoonIcon;
70088
70138
  exports.NavigationBar = NavigationBar;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export interface ChipProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ export interface ChipProps extends React.HTMLAttributes<HTMLDivElement | HTMLButtonElement> {
3
3
  label?: string;
4
4
  icon?: React.ReactNode;
5
5
  }
@@ -0,0 +1,6 @@
1
+ interface LargeNumericInputProps {
2
+ value?: string;
3
+ onChange: (value: string) => void;
4
+ }
5
+ export declare function LargeNumericInput({ onChange, value }: LargeNumericInputProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -34,6 +34,7 @@ interface NumericInputProps extends React.InputHTMLAttributes<HTMLInputElement>
34
34
  tooltip?: Omit<TooltipProps, "children">;
35
35
  hideMaxChip?: boolean;
36
36
  };
37
+ debounceInput?: boolean;
37
38
  }
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;
39
+ export declare function NumericInput({ priceImpactPercentage, balance, error, criticalPriceImpactPercentage, token, onAmountChange, forcedAmount, maxUsdDecimals, formatIfVerySmall, showDetails, isLoading, direction, inputModeButton, isInteractive, balanceButton, debounceInput, ...props }: NumericInputProps): import("react/jsx-runtime").JSX.Element;
39
40
  export {};
@@ -1,6 +1,7 @@
1
1
  export * from "./Input";
2
+ export * from "./LargeNumericInput";
2
3
  export * from "./NumericInput";
4
+ export * from "./RangeInput";
3
5
  export * from "./SettingsSlider";
4
6
  export * from "./Switch";
5
7
  export * from "./Tooltip";
6
- export * from "./RangeInput";
@@ -3,4 +3,7 @@ import { Player } from "@lottiefiles/react-lottie-player";
3
3
  interface Props extends React.ComponentProps<typeof Player> {
4
4
  }
5
5
  export declare const AnimationWrapper: (playerProps: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export declare function AnimationCard({ children }: {
7
+ children?: React.ReactNode;
8
+ }): import("react/jsx-runtime").JSX.Element;
6
9
  export {};
@@ -0,0 +1,5 @@
1
+ interface ModalTitleProps {
2
+ title: string;
3
+ }
4
+ export declare function ModalTitle({ title }: ModalTitleProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -48,6 +48,8 @@ interface SwapConfigurationProps {
48
48
  disabled?: boolean;
49
49
  };
50
50
  showNumericInputDetails?: boolean;
51
+ fullHeight?: boolean;
52
+ debounceInput?: boolean;
51
53
  }
52
- 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;
54
+ export declare function SwapConfiguration({ amount, tokenPrice, isFetching: isFetchingProp, chain, token, direction, onAmountChange, balance, criticalPriceImpactPercentage, error, priceImpactPercentage, maxUsdDecimals, isInputInteractive, isLoading, inputModeButton, balanceButton, assetsButton, walletButton, showNumericInputDetails, fullHeight, debounceInput, }: SwapConfigurationProps): import("react/jsx-runtime").JSX.Element;
53
55
  export {};
@@ -16,6 +16,7 @@ export * from "./Join";
16
16
  export * from "./Menu";
17
17
  export * from "./Modal";
18
18
  export * from "./ModalContent";
19
+ export * from "./ModalTitle";
19
20
  export * from "./NavigationBar";
20
21
  export * from "./PipeSeparator";
21
22
  export * from "./ProductCard";
@@ -1,7 +1,8 @@
1
- import { Meta, StoryObj } from "@storybook/react";
1
+ import { type Meta, type StoryObj } from "@storybook/react";
2
2
  import { Chip } from "../../components/buttons/Chip";
3
3
  declare const meta: Meta<typeof Chip>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Text: Story;
7
7
  export declare const Icon: Story;
8
+ export declare const Interactive: Story;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from "@storybook/react";
1
+ import { type Meta, type StoryObj } from "@storybook/react";
2
2
  import { Input } from "../../components/controls/Input";
3
3
  declare const meta: Meta<typeof Input>;
4
4
  export default meta;
@@ -0,0 +1,6 @@
1
+ import { type Meta, type StoryObj } from "@storybook/react";
2
+ import { LargeNumericInput } from "../../components/controls/LargeNumericInput";
3
+ declare const meta: Meta<typeof LargeNumericInput>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
@@ -4,7 +4,9 @@ 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 EmptyVariantPrimaryLoading: Story;
7
8
  export declare const EmptyVariantWithoutNumericInputDetails: Story;
9
+ export declare const WithoutNumericInputDetailsLoading: Story;
8
10
  export declare const EmptyVariantAccent: Story;
9
11
  export declare const Loading: Story;
10
12
  export declare const LoadingWithAllProps: Story;