@0xsquid/ui 0.22.0 → 0.22.1

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 CHANGED
@@ -2984,9 +2984,13 @@ function Chip(_a) {
2984
2984
  }
2985
2985
 
2986
2986
  const baseButtonClassName = 'tw-border tw-relative tw-overflow-hidden tw-group/base-button tw-flex tw-items-center tw-justify-center';
2987
+ const buttonWidthClassnameMap = {
2988
+ md: 'tw-min-w-[60px]',
2989
+ lg: 'tw-w-full',
2990
+ };
2987
2991
  const buttonSizeClassMap = {
2988
- md: 'tw-px-squid-xs tw-py-squid-xxs tw-min-w-[60px] tw-h-squid-xl',
2989
- lg: 'tw-p-1 tw-h-button tw-w-full',
2992
+ md: 'tw-px-squid-xs tw-py-squid-xxs tw-h-squid-xl',
2993
+ lg: 'tw-p-1 tw-h-button',
2990
2994
  };
2991
2995
  const roundedClassMap = {
2992
2996
  md: 'tw-rounded-squid-m',
@@ -3002,7 +3006,7 @@ const buttonVariantClassMap = {
3002
3006
  const buttonDisabledClass = '!tw-bg-grey-800 !tw-text-grey-600 tw-cursor-not-allowed';
3003
3007
  const loadingClassname = 'tw-invisible tw-opacity-0';
3004
3008
  function Button$1(_a) {
3005
- var { label, disabled, size, variant, icon, link, isLoading = false, chip } = _a, props = __rest$1(_a, ["label", "disabled", "size", "variant", "icon", "link", "isLoading", "chip"]);
3009
+ var { label, disabled, size, variant, icon, link, isLoading = false, chip, containerClassName } = _a, props = __rest$1(_a, ["label", "disabled", "size", "variant", "icon", "link", "isLoading", "chip", "containerClassName"]);
3006
3010
  const chipElement = chip ? (jsxRuntime.jsx(Chip, Object.assign({}, chip, { className: cn('tw-absolute -tw-right-squid-xxs -tw-top-squid-xxs tw-z-10', chip.className) }))) : null;
3007
3011
  const children = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!disabled && !isLoading && (jsxRuntime.jsx(ButtonHoverOverlay, { className: roundedClassMap[size] })), jsxRuntime.jsx("div", { className: "tw-relative tw-z-[5] tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs", children: !label && !icon ? (props.children) : size === 'lg' ? (jsxRuntime.jsx("span", { className: "tw-px-squid-m", children: jsxRuntime.jsx(BodyText, { className: isLoading ? loadingClassname : '', size: "medium", children: label }) })) : size === 'md' ? (label && !icon ? (
3008
3012
  // label only
@@ -3011,15 +3015,16 @@ function Button$1(_a) {
3011
3015
  isLoading ? null : (icon)) : (
3012
3016
  // icon and label
3013
3017
  jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon, jsxRuntime.jsx(BodyText, { className: "tw-pr-1", size: "small", children: label })] }))) : null })] }));
3014
- const className = cn(baseButtonClassName, buttonSizeClassMap[size], buttonVariantClassMap[variant], 'tw-border-material-light-thin', !disabled && !isLoading && 'hover:tw-border-material-light-average', roundedClassMap[size],
3018
+ const className = cn(baseButtonClassName, buttonSizeClassMap[size], buttonWidthClassnameMap[size], buttonVariantClassMap[variant], 'tw-border-material-light-thin', !disabled && !isLoading && 'hover:tw-border-material-light-average', roundedClassMap[size],
3015
3019
  // disabled styles
3016
3020
  disabled && buttonDisabledClass, isLoading && 'tw-cursor-not-allowed',
3017
3021
  // custom classes from props
3018
3022
  props.className);
3023
+ const ButtonWrapper = ({ children }) => (jsxRuntime.jsx("div", { className: cn('tw-relative', buttonWidthClassnameMap[size], roundedClassMap[size], containerClassName), children: children }));
3019
3024
  if (link) {
3020
- return (jsxRuntime.jsxs("div", { className: "tw-relative tw-w-full", children: [jsxRuntime.jsx("a", { "aria-disabled": disabled, href: disabled ? undefined : link, target: "_blank", className: className, children: children }), chipElement] }));
3025
+ return (jsxRuntime.jsxs(ButtonWrapper, { children: [jsxRuntime.jsx("a", { "aria-disabled": disabled, href: disabled ? undefined : link, target: "_blank", className: className, children: children }), chipElement] }));
3021
3026
  }
3022
- return (jsxRuntime.jsxs("div", { className: "tw-relative tw-w-full", children: [jsxRuntime.jsx("button", Object.assign({}, props, { "aria-disabled": disabled || isLoading, className: className, disabled: disabled || isLoading, children: children })), chipElement] }));
3027
+ return (jsxRuntime.jsxs(ButtonWrapper, { children: [jsxRuntime.jsx("button", Object.assign({}, props, { "aria-disabled": disabled || isLoading, className: className, disabled: disabled || isLoading, children: children })), chipElement] }));
3023
3028
  }
3024
3029
  const ButtonHoverOverlay = ({ className }) => {
3025
3030
  return (jsxRuntime.jsx("span", { className: cn('tw-absolute tw-inset-0 tw-z-0 tw-hidden tw-h-full tw-w-full tw-bg-material-light-thin group-hover/base-button:tw-block', className) }));
@@ -18225,7 +18230,7 @@ const SwapStepsCollapsed = React.forwardRef((props, ref) => {
18225
18230
  scrollbarWidth: 'none',
18226
18231
  }, className: "tw-relative tw-flex tw-w-modal-compact tw-flex-1 tw-grow-0 tw-flex-col-reverse tw-items-center tw-self-stretch tw-overflow-y-auto tw-overflow-x-hidden tw-px-squid-xs tw-pb-squid-xxs mobile-lg:tw-w-modal-large", children: steps.map((step, index) => (jsxRuntime.jsx(SwapStepItem, { descriptionBlocks: step.descriptionBlocks,
18227
18232
  // show separator for all steps except the first one
18228
- showStepSeparator: index > 0, link: step.link, status: newStepIndex < index ? 'pending' : step.status }, index))) }), jsxRuntime.jsx("footer", { className: "tw-flex tw-max-h-[55px] tw-min-h-[55px] tw-w-full tw-justify-center tw-gap-squid-xs tw-self-stretch tw-px-squid-s tw-pb-squid-s", children: jsxRuntime.jsx(Button$1, { size: "md", variant: "secondary", onClick: footerButton === null || footerButton === void 0 ? void 0 : footerButton.onClick, link: footerButton === null || footerButton === void 0 ? void 0 : footerButton.link, label: footerButton === null || footerButton === void 0 ? void 0 : footerButton.label, className: "tw-w-full" }) })] }) })] }) }) }));
18233
+ showStepSeparator: index > 0, link: step.link, status: newStepIndex < index ? 'pending' : step.status }, index))) }), jsxRuntime.jsx("footer", { className: "tw-flex tw-max-h-[55px] tw-min-h-[55px] tw-w-full tw-justify-center tw-gap-squid-xs tw-self-stretch tw-px-squid-s tw-pb-squid-s", children: jsxRuntime.jsx(Button$1, { size: "md", variant: "secondary", onClick: footerButton === null || footerButton === void 0 ? void 0 : footerButton.onClick, link: footerButton === null || footerButton === void 0 ? void 0 : footerButton.link, label: footerButton === null || footerButton === void 0 ? void 0 : footerButton.label, className: "tw-w-full", containerClassName: "tw-w-full" }) })] }) })] }) }) }));
18229
18234
  });
18230
18235
 
18231
18236
  const WIDTH_SM = '69';
@@ -25053,11 +25058,11 @@ function MainView({ isLoading }) {
25053
25058
  }
25054
25059
 
25055
25060
  function RecipientView({ type }) {
25056
- return (jsxRuntime.jsxs(ProductCard, { children: [jsxRuntime.jsx(NavigationBar, { title: type === 'paymentMethod' ? 'Pay' : 'Receive', displayBackButton: true }), jsxRuntime.jsx(BorderedContainer, { children: jsxRuntime.jsx(FlexContainer, { children: type === 'paymentMethod' || type === 'recipientEmpty' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionTitle, { title: "Your wallet", icon: jsxRuntime.jsx(PunkIcon, {}) }), jsxRuntime.jsx(ListItem, { itemTitle: "so-so.eth", subtitle: "0x2276\u2026F3c56", mainImageUrl: "/assets/images/avatar.png", size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { }, detail: "Connected" }), jsxRuntime.jsx("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-center tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", children: jsxRuntime.jsx(Button$1, { size: "md", variant: "primary", label: "Change wallet", className: "tw-w-full" }) })] })) : type === 'recipientTypingEns' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SearchAddress, { type: type }), jsxRuntime.jsx(ListItem, { itemTitle: "souljabags.eth", subtitle: "0x25c9\u202623d5", mainImageUrl: "/assets/images/punks.png", size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { } }), jsxRuntime.jsx(ListItem, { itemTitle: "souljaboy.eth", subtitle: "0x0ec8\u202604c1", mainIcon: jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-royal-500 tw-text-grey-100", children: jsxRuntime.jsx(PunkIcon, { size: "30" }) }), size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { } })] })) : type === 'recipientTypingAddress' ? (jsxRuntime.jsx(SearchAddress, { type: type })) : null }) }), type === 'paymentMethod' ? (jsxRuntime.jsx(BorderedContainer, { className: "tw-flex-1 tw-pt-squid-xs", children: jsxRuntime.jsxs(FlexContainer, { children: [jsxRuntime.jsx(SectionTitle, { title: 'Centralized Exchange', icon: type === 'paymentMethod' ? jsxRuntime.jsx(BankIcon, {}) : jsxRuntime.jsx(WalletIcon, {}) }), jsxRuntime.jsx(DepositSection, {})] }) })) : type === 'recipientEmpty' ? (jsxRuntime.jsx(BorderedContainer, { className: "tw-flex-1 tw-pt-squid-xs", children: jsxRuntime.jsxs(FlexContainer, { children: [jsxRuntime.jsx(SearchAddress, { type: type }), jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-w-full tw-flex-1 tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xxs tw-self-stretch tw-px-squid-xxl tw-py-squid-xl", children: jsxRuntime.jsx(CaptionText, { className: "tw-max-w-[200px] tw-text-center tw-text-grey-500", children: "Wallets you add and swap to will appear here" }) })] }) })) : type === 'recipientTypingEns' || type === 'recipientTypingAddress' ? (jsxRuntime.jsx("div", {})) : null, ' '] }));
25061
+ return (jsxRuntime.jsxs(ProductCard, { children: [jsxRuntime.jsx(NavigationBar, { title: type === 'paymentMethod' ? 'Pay' : 'Receive', displayBackButton: true }), jsxRuntime.jsx(BorderedContainer, { children: jsxRuntime.jsx(FlexContainer, { children: type === 'paymentMethod' || type === 'recipientEmpty' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionTitle, { title: "Your wallet", icon: jsxRuntime.jsx(PunkIcon, {}) }), jsxRuntime.jsx(ListItem, { itemTitle: "so-so.eth", subtitle: "0x2276\u2026F3c56", mainImageUrl: "/assets/images/avatar.png", size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { }, detail: "Connected" }), jsxRuntime.jsx("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-center tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", children: jsxRuntime.jsx(Button$1, { size: "md", variant: "primary", label: "Change wallet", className: "tw-w-full", containerClassName: "tw-w-full" }) })] })) : type === 'recipientTypingEns' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SearchAddress, { type: type }), jsxRuntime.jsx(ListItem, { itemTitle: "souljabags.eth", subtitle: "0x25c9\u202623d5", mainImageUrl: "/assets/images/punks.png", size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { } }), jsxRuntime.jsx(ListItem, { itemTitle: "souljaboy.eth", subtitle: "0x0ec8\u202604c1", mainIcon: jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-royal-500 tw-text-grey-100", children: jsxRuntime.jsx(PunkIcon, { size: "30" }) }), size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { } })] })) : type === 'recipientTypingAddress' ? (jsxRuntime.jsx(SearchAddress, { type: type })) : null }) }), type === 'paymentMethod' ? (jsxRuntime.jsx(BorderedContainer, { className: "tw-flex-1 tw-pt-squid-xs", children: jsxRuntime.jsxs(FlexContainer, { children: [jsxRuntime.jsx(SectionTitle, { title: 'Centralized Exchange', icon: type === 'paymentMethod' ? jsxRuntime.jsx(BankIcon, {}) : jsxRuntime.jsx(WalletIcon, {}) }), jsxRuntime.jsx(DepositSection, {})] }) })) : type === 'recipientEmpty' ? (jsxRuntime.jsx(BorderedContainer, { className: "tw-flex-1 tw-pt-squid-xs", children: jsxRuntime.jsxs(FlexContainer, { children: [jsxRuntime.jsx(SearchAddress, { type: type }), jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-w-full tw-flex-1 tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xxs tw-self-stretch tw-px-squid-xxl tw-py-squid-xl", children: jsxRuntime.jsx(CaptionText, { className: "tw-max-w-[200px] tw-text-center tw-text-grey-500", children: "Wallets you add and swap to will appear here" }) })] }) })) : type === 'recipientTypingEns' || type === 'recipientTypingAddress' ? (jsxRuntime.jsx("div", {})) : null, ' '] }));
25057
25062
  }
25058
- const FlexContainer = ({ children }) => (jsxRuntime.jsx("div", { className: "mobile-lg:tw-px-squid-xs tw-flex tw-h-full tw-flex-1 tw-flex-col tw-items-center tw-gap-squid-xxs tw-px-0", children: children }));
25063
+ const FlexContainer = ({ children }) => (jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-flex-1 tw-flex-col tw-items-center tw-gap-squid-xxs tw-px-0 mobile-lg:tw-px-squid-xs", children: children }));
25059
25064
  const DepositSection = () => {
25060
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ListItem, { itemTitle: "Deposit", mainIcon: jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-royal-500 tw-text-grey-100", children: jsxRuntime.jsx(CoinsAddIcon, {}) }), className: "tw-w-full tw-max-w-none", onClick: () => { } }), jsxRuntime.jsx(CaptionText, { className: "tw-px-squid-m tw-py-squid-xxs tw-text-grey-500", children: "In case of swapping from a centralized exchange, you can send your tokens to a temporary deposit account that will handle the swap instead." }), jsxRuntime.jsx("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-center tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", children: jsxRuntime.jsx(Button$1, { size: "md", variant: "tertiary", label: "Learn more", className: "tw-w-full" }) })] }));
25065
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ListItem, { itemTitle: "Deposit", mainIcon: jsxRuntime.jsx("div", { className: "tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-royal-500 tw-text-grey-100", children: jsxRuntime.jsx(CoinsAddIcon, {}) }), className: "tw-w-full tw-max-w-none", onClick: () => { } }), jsxRuntime.jsx(CaptionText, { className: "tw-px-squid-m tw-py-squid-xxs tw-text-grey-500", children: "In case of swapping from a centralized exchange, you can send your tokens to a temporary deposit account that will handle the swap instead." }), jsxRuntime.jsx("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-center tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", children: jsxRuntime.jsx(Button$1, { size: "md", variant: "tertiary", label: "Learn more", className: "tw-w-full", containerClassName: "tw-w-full" }) })] }));
25061
25066
  };
25062
25067
  const SearchAddress = ({ type }) => {
25063
25068
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionTitle, { title: 'Custom wallet', icon: jsxRuntime.jsx(WalletIcon, {}), accessory: type === 'recipientTypingEns'
@@ -10,6 +10,7 @@ interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
10
10
  link?: string;
11
11
  isLoading?: boolean;
12
12
  chip?: ChipProps;
13
+ containerClassName?: string;
13
14
  }
14
- export declare function Button({ label, disabled, size, variant, icon, link, isLoading, chip, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function Button({ label, disabled, size, variant, icon, link, isLoading, chip, containerClassName, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
15
16
  export {};
package/dist/esm/index.js CHANGED
@@ -2964,9 +2964,13 @@ function Chip(_a) {
2964
2964
  }
2965
2965
 
2966
2966
  const baseButtonClassName = 'tw-border tw-relative tw-overflow-hidden tw-group/base-button tw-flex tw-items-center tw-justify-center';
2967
+ const buttonWidthClassnameMap = {
2968
+ md: 'tw-min-w-[60px]',
2969
+ lg: 'tw-w-full',
2970
+ };
2967
2971
  const buttonSizeClassMap = {
2968
- md: 'tw-px-squid-xs tw-py-squid-xxs tw-min-w-[60px] tw-h-squid-xl',
2969
- lg: 'tw-p-1 tw-h-button tw-w-full',
2972
+ md: 'tw-px-squid-xs tw-py-squid-xxs tw-h-squid-xl',
2973
+ lg: 'tw-p-1 tw-h-button',
2970
2974
  };
2971
2975
  const roundedClassMap = {
2972
2976
  md: 'tw-rounded-squid-m',
@@ -2982,7 +2986,7 @@ const buttonVariantClassMap = {
2982
2986
  const buttonDisabledClass = '!tw-bg-grey-800 !tw-text-grey-600 tw-cursor-not-allowed';
2983
2987
  const loadingClassname = 'tw-invisible tw-opacity-0';
2984
2988
  function Button$1(_a) {
2985
- var { label, disabled, size, variant, icon, link, isLoading = false, chip } = _a, props = __rest$1(_a, ["label", "disabled", "size", "variant", "icon", "link", "isLoading", "chip"]);
2989
+ var { label, disabled, size, variant, icon, link, isLoading = false, chip, containerClassName } = _a, props = __rest$1(_a, ["label", "disabled", "size", "variant", "icon", "link", "isLoading", "chip", "containerClassName"]);
2986
2990
  const chipElement = chip ? (jsx(Chip, Object.assign({}, chip, { className: cn('tw-absolute -tw-right-squid-xxs -tw-top-squid-xxs tw-z-10', chip.className) }))) : null;
2987
2991
  const children = (jsxs(Fragment, { children: [!disabled && !isLoading && (jsx(ButtonHoverOverlay, { className: roundedClassMap[size] })), jsx("div", { className: "tw-relative tw-z-[5] tw-flex tw-items-center tw-justify-center tw-gap-squid-xxs", children: !label && !icon ? (props.children) : size === 'lg' ? (jsx("span", { className: "tw-px-squid-m", children: jsx(BodyText, { className: isLoading ? loadingClassname : '', size: "medium", children: label }) })) : size === 'md' ? (label && !icon ? (
2988
2992
  // label only
@@ -2991,15 +2995,16 @@ function Button$1(_a) {
2991
2995
  isLoading ? null : (icon)) : (
2992
2996
  // icon and label
2993
2997
  jsxs(Fragment, { children: [icon, jsx(BodyText, { className: "tw-pr-1", size: "small", children: label })] }))) : null })] }));
2994
- const className = cn(baseButtonClassName, buttonSizeClassMap[size], buttonVariantClassMap[variant], 'tw-border-material-light-thin', !disabled && !isLoading && 'hover:tw-border-material-light-average', roundedClassMap[size],
2998
+ const className = cn(baseButtonClassName, buttonSizeClassMap[size], buttonWidthClassnameMap[size], buttonVariantClassMap[variant], 'tw-border-material-light-thin', !disabled && !isLoading && 'hover:tw-border-material-light-average', roundedClassMap[size],
2995
2999
  // disabled styles
2996
3000
  disabled && buttonDisabledClass, isLoading && 'tw-cursor-not-allowed',
2997
3001
  // custom classes from props
2998
3002
  props.className);
3003
+ const ButtonWrapper = ({ children }) => (jsx("div", { className: cn('tw-relative', buttonWidthClassnameMap[size], roundedClassMap[size], containerClassName), children: children }));
2999
3004
  if (link) {
3000
- return (jsxs("div", { className: "tw-relative tw-w-full", children: [jsx("a", { "aria-disabled": disabled, href: disabled ? undefined : link, target: "_blank", className: className, children: children }), chipElement] }));
3005
+ return (jsxs(ButtonWrapper, { children: [jsx("a", { "aria-disabled": disabled, href: disabled ? undefined : link, target: "_blank", className: className, children: children }), chipElement] }));
3001
3006
  }
3002
- return (jsxs("div", { className: "tw-relative tw-w-full", children: [jsx("button", Object.assign({}, props, { "aria-disabled": disabled || isLoading, className: className, disabled: disabled || isLoading, children: children })), chipElement] }));
3007
+ return (jsxs(ButtonWrapper, { children: [jsx("button", Object.assign({}, props, { "aria-disabled": disabled || isLoading, className: className, disabled: disabled || isLoading, children: children })), chipElement] }));
3003
3008
  }
3004
3009
  const ButtonHoverOverlay = ({ className }) => {
3005
3010
  return (jsx("span", { className: cn('tw-absolute tw-inset-0 tw-z-0 tw-hidden tw-h-full tw-w-full tw-bg-material-light-thin group-hover/base-button:tw-block', className) }));
@@ -18205,7 +18210,7 @@ const SwapStepsCollapsed = forwardRef((props, ref) => {
18205
18210
  scrollbarWidth: 'none',
18206
18211
  }, className: "tw-relative tw-flex tw-w-modal-compact tw-flex-1 tw-grow-0 tw-flex-col-reverse tw-items-center tw-self-stretch tw-overflow-y-auto tw-overflow-x-hidden tw-px-squid-xs tw-pb-squid-xxs mobile-lg:tw-w-modal-large", children: steps.map((step, index) => (jsx(SwapStepItem, { descriptionBlocks: step.descriptionBlocks,
18207
18212
  // show separator for all steps except the first one
18208
- showStepSeparator: index > 0, link: step.link, status: newStepIndex < index ? 'pending' : step.status }, index))) }), jsx("footer", { className: "tw-flex tw-max-h-[55px] tw-min-h-[55px] tw-w-full tw-justify-center tw-gap-squid-xs tw-self-stretch tw-px-squid-s tw-pb-squid-s", children: jsx(Button$1, { size: "md", variant: "secondary", onClick: footerButton === null || footerButton === void 0 ? void 0 : footerButton.onClick, link: footerButton === null || footerButton === void 0 ? void 0 : footerButton.link, label: footerButton === null || footerButton === void 0 ? void 0 : footerButton.label, className: "tw-w-full" }) })] }) })] }) }) }));
18213
+ showStepSeparator: index > 0, link: step.link, status: newStepIndex < index ? 'pending' : step.status }, index))) }), jsx("footer", { className: "tw-flex tw-max-h-[55px] tw-min-h-[55px] tw-w-full tw-justify-center tw-gap-squid-xs tw-self-stretch tw-px-squid-s tw-pb-squid-s", children: jsx(Button$1, { size: "md", variant: "secondary", onClick: footerButton === null || footerButton === void 0 ? void 0 : footerButton.onClick, link: footerButton === null || footerButton === void 0 ? void 0 : footerButton.link, label: footerButton === null || footerButton === void 0 ? void 0 : footerButton.label, className: "tw-w-full", containerClassName: "tw-w-full" }) })] }) })] }) }) }));
18209
18214
  });
18210
18215
 
18211
18216
  const WIDTH_SM = '69';
@@ -25033,11 +25038,11 @@ function MainView({ isLoading }) {
25033
25038
  }
25034
25039
 
25035
25040
  function RecipientView({ type }) {
25036
- return (jsxs(ProductCard, { children: [jsx(NavigationBar, { title: type === 'paymentMethod' ? 'Pay' : 'Receive', displayBackButton: true }), jsx(BorderedContainer, { children: jsx(FlexContainer, { children: type === 'paymentMethod' || type === 'recipientEmpty' ? (jsxs(Fragment, { children: [jsx(SectionTitle, { title: "Your wallet", icon: jsx(PunkIcon, {}) }), jsx(ListItem, { itemTitle: "so-so.eth", subtitle: "0x2276\u2026F3c56", mainImageUrl: "/assets/images/avatar.png", size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { }, detail: "Connected" }), jsx("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-center tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", children: jsx(Button$1, { size: "md", variant: "primary", label: "Change wallet", className: "tw-w-full" }) })] })) : type === 'recipientTypingEns' ? (jsxs(Fragment, { children: [jsx(SearchAddress, { type: type }), jsx(ListItem, { itemTitle: "souljabags.eth", subtitle: "0x25c9\u202623d5", mainImageUrl: "/assets/images/punks.png", size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { } }), jsx(ListItem, { itemTitle: "souljaboy.eth", subtitle: "0x0ec8\u202604c1", mainIcon: jsx("div", { className: "tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-royal-500 tw-text-grey-100", children: jsx(PunkIcon, { size: "30" }) }), size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { } })] })) : type === 'recipientTypingAddress' ? (jsx(SearchAddress, { type: type })) : null }) }), type === 'paymentMethod' ? (jsx(BorderedContainer, { className: "tw-flex-1 tw-pt-squid-xs", children: jsxs(FlexContainer, { children: [jsx(SectionTitle, { title: 'Centralized Exchange', icon: type === 'paymentMethod' ? jsx(BankIcon, {}) : jsx(WalletIcon, {}) }), jsx(DepositSection, {})] }) })) : type === 'recipientEmpty' ? (jsx(BorderedContainer, { className: "tw-flex-1 tw-pt-squid-xs", children: jsxs(FlexContainer, { children: [jsx(SearchAddress, { type: type }), jsx("div", { className: "tw-flex tw-h-full tw-w-full tw-flex-1 tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xxs tw-self-stretch tw-px-squid-xxl tw-py-squid-xl", children: jsx(CaptionText, { className: "tw-max-w-[200px] tw-text-center tw-text-grey-500", children: "Wallets you add and swap to will appear here" }) })] }) })) : type === 'recipientTypingEns' || type === 'recipientTypingAddress' ? (jsx("div", {})) : null, ' '] }));
25041
+ return (jsxs(ProductCard, { children: [jsx(NavigationBar, { title: type === 'paymentMethod' ? 'Pay' : 'Receive', displayBackButton: true }), jsx(BorderedContainer, { children: jsx(FlexContainer, { children: type === 'paymentMethod' || type === 'recipientEmpty' ? (jsxs(Fragment, { children: [jsx(SectionTitle, { title: "Your wallet", icon: jsx(PunkIcon, {}) }), jsx(ListItem, { itemTitle: "so-so.eth", subtitle: "0x2276\u2026F3c56", mainImageUrl: "/assets/images/avatar.png", size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { }, detail: "Connected" }), jsx("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-center tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", children: jsx(Button$1, { size: "md", variant: "primary", label: "Change wallet", className: "tw-w-full", containerClassName: "tw-w-full" }) })] })) : type === 'recipientTypingEns' ? (jsxs(Fragment, { children: [jsx(SearchAddress, { type: type }), jsx(ListItem, { itemTitle: "souljabags.eth", subtitle: "0x25c9\u202623d5", mainImageUrl: "/assets/images/punks.png", size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { } }), jsx(ListItem, { itemTitle: "souljaboy.eth", subtitle: "0x0ec8\u202604c1", mainIcon: jsx("div", { className: "tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-royal-500 tw-text-grey-100", children: jsx(PunkIcon, { size: "30" }) }), size: "large", className: "tw-w-full tw-max-w-none", onClick: () => { } })] })) : type === 'recipientTypingAddress' ? (jsx(SearchAddress, { type: type })) : null }) }), type === 'paymentMethod' ? (jsx(BorderedContainer, { className: "tw-flex-1 tw-pt-squid-xs", children: jsxs(FlexContainer, { children: [jsx(SectionTitle, { title: 'Centralized Exchange', icon: type === 'paymentMethod' ? jsx(BankIcon, {}) : jsx(WalletIcon, {}) }), jsx(DepositSection, {})] }) })) : type === 'recipientEmpty' ? (jsx(BorderedContainer, { className: "tw-flex-1 tw-pt-squid-xs", children: jsxs(FlexContainer, { children: [jsx(SearchAddress, { type: type }), jsx("div", { className: "tw-flex tw-h-full tw-w-full tw-flex-1 tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xxs tw-self-stretch tw-px-squid-xxl tw-py-squid-xl", children: jsx(CaptionText, { className: "tw-max-w-[200px] tw-text-center tw-text-grey-500", children: "Wallets you add and swap to will appear here" }) })] }) })) : type === 'recipientTypingEns' || type === 'recipientTypingAddress' ? (jsx("div", {})) : null, ' '] }));
25037
25042
  }
25038
- const FlexContainer = ({ children }) => (jsx("div", { className: "mobile-lg:tw-px-squid-xs tw-flex tw-h-full tw-flex-1 tw-flex-col tw-items-center tw-gap-squid-xxs tw-px-0", children: children }));
25043
+ const FlexContainer = ({ children }) => (jsx("div", { className: "tw-flex tw-h-full tw-flex-1 tw-flex-col tw-items-center tw-gap-squid-xxs tw-px-0 mobile-lg:tw-px-squid-xs", children: children }));
25039
25044
  const DepositSection = () => {
25040
- return (jsxs(Fragment, { children: [jsx(ListItem, { itemTitle: "Deposit", mainIcon: jsx("div", { className: "tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-royal-500 tw-text-grey-100", children: jsx(CoinsAddIcon, {}) }), className: "tw-w-full tw-max-w-none", onClick: () => { } }), jsx(CaptionText, { className: "tw-px-squid-m tw-py-squid-xxs tw-text-grey-500", children: "In case of swapping from a centralized exchange, you can send your tokens to a temporary deposit account that will handle the swap instead." }), jsx("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-center tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", children: jsx(Button$1, { size: "md", variant: "tertiary", label: "Learn more", className: "tw-w-full" }) })] }));
25045
+ return (jsxs(Fragment, { children: [jsx(ListItem, { itemTitle: "Deposit", mainIcon: jsx("div", { className: "tw-flex tw-h-full tw-items-center tw-justify-center tw-rounded-squid-xs tw-bg-royal-500 tw-text-grey-100", children: jsx(CoinsAddIcon, {}) }), className: "tw-w-full tw-max-w-none", onClick: () => { } }), jsx(CaptionText, { className: "tw-px-squid-m tw-py-squid-xxs tw-text-grey-500", children: "In case of swapping from a centralized exchange, you can send your tokens to a temporary deposit account that will handle the swap instead." }), jsx("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-center tw-px-squid-m tw-pb-squid-s tw-pt-squid-xxs", children: jsx(Button$1, { size: "md", variant: "tertiary", label: "Learn more", className: "tw-w-full", containerClassName: "tw-w-full" }) })] }));
25041
25046
  };
25042
25047
  const SearchAddress = ({ type }) => {
25043
25048
  return (jsxs(Fragment, { children: [jsx(SectionTitle, { title: 'Custom wallet', icon: jsx(WalletIcon, {}), accessory: type === 'recipientTypingEns'
@@ -10,6 +10,7 @@ interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
10
10
  link?: string;
11
11
  isLoading?: boolean;
12
12
  chip?: ChipProps;
13
+ containerClassName?: string;
13
14
  }
14
- export declare function Button({ label, disabled, size, variant, icon, link, isLoading, chip, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function Button({ label, disabled, size, variant, icon, link, isLoading, chip, containerClassName, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
15
16
  export {};
package/dist/index.d.ts CHANGED
@@ -272,8 +272,9 @@ interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
272
272
  link?: string;
273
273
  isLoading?: boolean;
274
274
  chip?: ChipProps;
275
+ containerClassName?: string;
275
276
  }
276
- declare function Button({ label, disabled, size, variant, icon, link, isLoading, chip, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
277
+ declare function Button({ label, disabled, size, variant, icon, link, isLoading, chip, containerClassName, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
277
278
 
278
279
  interface FeeButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
279
280
  feeInUsd?: string;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git+https://github.com/0xsquid/squid-ui.git"
6
6
  },
7
7
  "description": "Squid's UI components",
8
- "version": "0.22.0",
8
+ "version": "0.22.1",
9
9
  "author": "",
10
10
  "license": "MIT",
11
11
  "resolutions": {