@0xsquid/ui 0.9.5 → 0.10.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.
Files changed (43) hide show
  1. package/dist/cjs/index.js +88 -41
  2. package/dist/cjs/types/components/buttons/BoostButton.d.ts +2 -1
  3. package/dist/cjs/types/components/buttons/Button.d.ts +2 -1
  4. package/dist/cjs/types/components/controls/Tooltip.d.ts +2 -1
  5. package/dist/cjs/types/components/icons/Social.d.ts +4 -0
  6. package/dist/cjs/types/components/layout/Boost.d.ts +2 -1
  7. package/dist/cjs/types/components/layout/DetailsToolbar.d.ts +2 -1
  8. package/dist/cjs/types/components/layout/SwapConfiguration.d.ts +2 -1
  9. package/dist/cjs/types/components/lists/ListItem.d.ts +1 -1
  10. package/dist/cjs/types/core/constants.d.ts +4 -0
  11. package/dist/cjs/types/core/themes.d.ts +1 -0
  12. package/dist/cjs/types/providers/SquidConfigProvider.d.ts +1 -1
  13. package/dist/cjs/types/stories/buttons/BoostButton.stories.d.ts +1 -0
  14. package/dist/cjs/types/stories/buttons/Button.stories.d.ts +2 -0
  15. package/dist/cjs/types/stories/controls/Tooltip.stories.d.ts +1 -0
  16. package/dist/cjs/types/stories/layout/Boost.stories.d.ts +1 -0
  17. package/dist/cjs/types/stories/layout/DetailsToolbar.stories.d.ts +1 -0
  18. package/dist/cjs/types/stories/lists/ListItem.stories.d.ts +1 -0
  19. package/dist/esm/index.js +88 -41
  20. package/dist/esm/types/components/buttons/BoostButton.d.ts +2 -1
  21. package/dist/esm/types/components/buttons/Button.d.ts +2 -1
  22. package/dist/esm/types/components/controls/Tooltip.d.ts +2 -1
  23. package/dist/esm/types/components/icons/Social.d.ts +4 -0
  24. package/dist/esm/types/components/layout/Boost.d.ts +2 -1
  25. package/dist/esm/types/components/layout/DetailsToolbar.d.ts +2 -1
  26. package/dist/esm/types/components/layout/SwapConfiguration.d.ts +2 -1
  27. package/dist/esm/types/components/lists/ListItem.d.ts +1 -1
  28. package/dist/esm/types/core/constants.d.ts +4 -0
  29. package/dist/esm/types/core/themes.d.ts +1 -0
  30. package/dist/esm/types/providers/SquidConfigProvider.d.ts +1 -1
  31. package/dist/esm/types/stories/buttons/BoostButton.stories.d.ts +1 -0
  32. package/dist/esm/types/stories/buttons/Button.stories.d.ts +2 -0
  33. package/dist/esm/types/stories/controls/Tooltip.stories.d.ts +1 -0
  34. package/dist/esm/types/stories/layout/Boost.stories.d.ts +1 -0
  35. package/dist/esm/types/stories/layout/DetailsToolbar.stories.d.ts +1 -0
  36. package/dist/esm/types/stories/lists/ListItem.stories.d.ts +1 -0
  37. package/dist/index.css +90 -40
  38. package/dist/index.d.ts +14 -8
  39. package/package.json +1 -1
  40. package/dist/cjs/types/components/views/ProfileView.d.ts +0 -1
  41. package/dist/cjs/types/stories/views/ProfileView.stories.d.ts +0 -6
  42. package/dist/esm/types/components/views/ProfileView.d.ts +0 -1
  43. package/dist/esm/types/stories/views/ProfileView.stories.d.ts +0 -6
package/dist/index.css CHANGED
@@ -788,10 +788,6 @@ video {
788
788
  margin-left: -0.25rem;
789
789
  }
790
790
 
791
- .-tw-ml-\[5px\] {
792
- margin-left: -5px;
793
- }
794
-
795
791
  .-tw-ml-squid-xs {
796
792
  margin-left: -0.625rem;
797
793
  }
@@ -888,10 +884,6 @@ video {
888
884
  height: 195px;
889
885
  }
890
886
 
891
- .tw-h-\[200px\] {
892
- height: 200px;
893
- }
894
-
895
887
  .tw-h-\[205px\] {
896
888
  height: 205px;
897
889
  }
@@ -900,10 +892,6 @@ video {
900
892
  height: 21px;
901
893
  }
902
894
 
903
- .tw-h-\[22px\] {
904
- height: 22px;
905
- }
906
-
907
895
  .tw-h-\[240px\] {
908
896
  height: 240px;
909
897
  }
@@ -948,10 +936,6 @@ video {
948
936
  height: 60px;
949
937
  }
950
938
 
951
- .tw-h-\[90px\] {
952
- height: 90px;
953
- }
954
-
955
939
  .tw-h-\[95px\] {
956
940
  height: 95px;
957
941
  }
@@ -1440,6 +1424,20 @@ video {
1440
1424
  animation: tw-fade-out 0.2s ease-out both;
1441
1425
  }
1442
1426
 
1427
+ @keyframes tw-hide {
1428
+ 0% {
1429
+ display: block;
1430
+ }
1431
+
1432
+ 100% {
1433
+ display: none;
1434
+ }
1435
+ }
1436
+
1437
+ .tw-animate-hide {
1438
+ animation: tw-hide 0s ease-out forwards;
1439
+ }
1440
+
1443
1441
  @keyframes tw-loading-gradient {
1444
1442
  0% {
1445
1443
  transform: translateX(-70%);
@@ -1760,10 +1758,6 @@ video {
1760
1758
  border-width: 1px;
1761
1759
  }
1762
1760
 
1763
- .tw-border-\[5px\] {
1764
- border-width: 5px;
1765
- }
1766
-
1767
1761
  .tw-border-b {
1768
1762
  border-bottom-width: 1px;
1769
1763
  }
@@ -1792,10 +1786,6 @@ video {
1792
1786
  border-color: var(--squid-theme-grey-900);
1793
1787
  }
1794
1788
 
1795
- .tw-border-material-dark-average {
1796
- border-color: var(--squid-theme-material-dark-average);
1797
- }
1798
-
1799
1789
  .tw-border-material-light-thick {
1800
1790
  border-color: var(--squid-theme-material-light-thick);
1801
1791
  }
@@ -1989,10 +1979,6 @@ video {
1989
1979
  padding: 0.625rem;
1990
1980
  }
1991
1981
 
1992
- .tw-p-squid-xxs {
1993
- padding: 0.3125rem;
1994
- }
1995
-
1996
1982
  .\!tw-px-squid-m {
1997
1983
  padding-left: 1.25rem !important;
1998
1984
  padding-right: 1.25rem !important;
@@ -2296,10 +2282,18 @@ video {
2296
2282
  line-height: 10px !important;
2297
2283
  }
2298
2284
 
2285
+ .\!tw-leading-\[11px\] {
2286
+ line-height: 11px !important;
2287
+ }
2288
+
2299
2289
  .\!tw-leading-\[13px\] {
2300
2290
  line-height: 13px !important;
2301
2291
  }
2302
2292
 
2293
+ .\!tw-leading-\[17px\] {
2294
+ line-height: 17px !important;
2295
+ }
2296
+
2303
2297
  .\!tw-leading-\[18px\] {
2304
2298
  line-height: 18px !important;
2305
2299
  }
@@ -2542,6 +2536,10 @@ video {
2542
2536
  transition-duration: 150ms;
2543
2537
  }
2544
2538
 
2539
+ .tw-duration-100 {
2540
+ transition-duration: 100ms;
2541
+ }
2542
+
2545
2543
  .tw-duration-200 {
2546
2544
  transition-duration: 200ms;
2547
2545
  }
@@ -2550,6 +2548,10 @@ video {
2550
2548
  transition-duration: 300ms;
2551
2549
  }
2552
2550
 
2551
+ .tw-duration-\[50ms\] {
2552
+ transition-duration: 50ms;
2553
+ }
2554
+
2553
2555
  .tw-ease-in-out {
2554
2556
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
2555
2557
  }
@@ -2603,13 +2605,15 @@ li {
2603
2605
  }
2604
2606
 
2605
2607
  button,
2606
- input {
2608
+ input,
2609
+ a {
2607
2610
  outline: 2px solid transparent;
2608
2611
  outline-offset: -1px;
2609
2612
  }
2610
2613
 
2611
2614
  button:focus,
2612
- input:focus {
2615
+ input:focus,
2616
+ a:focus {
2613
2617
  outline-width: 2px;
2614
2618
  outline-color: var(--squid-theme-royal-500);
2615
2619
  }
@@ -2648,8 +2652,22 @@ input[type='number'] {
2648
2652
  outline-color: var(--squid-theme-status-negative);
2649
2653
  }
2650
2654
 
2651
- .hover\:tw-block:hover {
2652
- display: block;
2655
+ @keyframes tw-display {
2656
+ 0% {
2657
+ display: none;
2658
+ }
2659
+
2660
+ 100% {
2661
+ display: block;
2662
+ }
2663
+ }
2664
+
2665
+ .hover\:tw-animate-display-delayed:hover {
2666
+ animation: tw-display 0s var(--squid-animation-display-delayed-duration, 0s) ease-out both;
2667
+ }
2668
+
2669
+ .hover\:tw-bg-grey-700:hover {
2670
+ background-color: var(--squid-theme-grey-700);
2653
2671
  }
2654
2672
 
2655
2673
  .hover\:tw-bg-material-light-thin:hover {
@@ -2660,6 +2678,10 @@ input[type='number'] {
2660
2678
  color: var(--squid-theme-grey-400);
2661
2679
  }
2662
2680
 
2681
+ .hover\:tw-opacity-100:hover {
2682
+ opacity: 1;
2683
+ }
2684
+
2663
2685
  .focus\:tw-bg-material-light-thin:focus {
2664
2686
  background-color: var(--squid-theme-material-light-thin);
2665
2687
  }
@@ -2693,14 +2715,16 @@ input[type='number'] {
2693
2715
  display: block;
2694
2716
  }
2695
2717
 
2696
- .tw-group\/list-item:hover .group-hover\/list-item\:tw-flex {
2697
- display: flex;
2698
- }
2699
-
2700
2718
  .tw-group\/history-item:hover .group-hover\/history-item\:tw-hidden {
2701
2719
  display: none;
2702
2720
  }
2703
2721
 
2722
+ .tw-group\/swap-step-item-button:hover .group-hover\/swap-step-item-button\:tw-from-grey-700 {
2723
+ --tw-gradient-from: var(--squid-theme-grey-700) var(--tw-gradient-from-position);
2724
+ --tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);
2725
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
2726
+ }
2727
+
2704
2728
  .tw-group\/history-item:hover .group-hover\/history-item\:tw-opacity-0 {
2705
2729
  opacity: 0;
2706
2730
  }
@@ -2709,13 +2733,31 @@ input[type='number'] {
2709
2733
  opacity: 1;
2710
2734
  }
2711
2735
 
2736
+ .tw-group\/list-item:hover .group-hover\/list-item\:tw-opacity-100 {
2737
+ opacity: 1;
2738
+ }
2739
+
2740
+ .tw-group\/list-item:focus .group-focus\/list-item\:tw-opacity-100 {
2741
+ opacity: 1;
2742
+ }
2743
+
2712
2744
  .tw-group:disabled .group-disabled\:tw-grayscale {
2713
2745
  --tw-grayscale: grayscale(100%);
2714
2746
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2715
2747
  }
2716
2748
 
2717
- .tw-peer:hover ~ .peer-hover\:tw-block {
2718
- display: block;
2749
+ @keyframes tw-display {
2750
+ 0% {
2751
+ display: none;
2752
+ }
2753
+
2754
+ 100% {
2755
+ display: block;
2756
+ }
2757
+ }
2758
+
2759
+ .tw-peer:hover ~ .peer-hover\:tw-animate-display-delayed {
2760
+ animation: tw-display 0s var(--squid-animation-display-delayed-duration, 0s) ease-out both;
2719
2761
  }
2720
2762
 
2721
2763
  .tw-peer:focus ~ .peer-focus\:tw-hidden {
@@ -2753,7 +2795,7 @@ input[type='number'] {
2753
2795
  }
2754
2796
 
2755
2797
  .data-\[boost-mode\=boost\]\:tw-animate-move-to-left-with-spring-bounce[data-boost-mode=boost] {
2756
- animation: tw-move-to-left-with-spring-bounce var(--boost-animation-duration, 0s) ease-out both;
2798
+ animation: tw-move-to-left-with-spring-bounce var(--squid-animation-move-with-spring-bounce-duration, 0s) ease-out both;
2757
2799
  }
2758
2800
 
2759
2801
  @keyframes tw-move-to-right-with-spring-bounce {
@@ -2775,7 +2817,7 @@ input[type='number'] {
2775
2817
  }
2776
2818
 
2777
2819
  .data-\[boost-mode\=normal\]\:tw-animate-move-to-right-with-spring-bounce[data-boost-mode=normal] {
2778
- animation: tw-move-to-right-with-spring-bounce var(--boost-animation-duration, 0s) ease-out both;
2820
+ animation: tw-move-to-right-with-spring-bounce var(--squid-animation-move-with-spring-bounce-duration, 0s) ease-out both;
2779
2821
  }
2780
2822
 
2781
2823
  .tw-group[data-boost-mode=boost] .group-data-\[boost-mode\=boost\]\:tw-left-\[calc\(50\%-2px\)\] {
@@ -2794,6 +2836,14 @@ input[type='number'] {
2794
2836
  background-image: linear-gradient(180deg, #A577D8 0%, #BF91F2 100%);
2795
2837
  }
2796
2838
 
2839
+ .tw-group[data-squid-theme-type=dark] .group-data-\[squid-theme-type\=dark\]\:tw-text-grey-100 {
2840
+ color: var(--squid-theme-grey-100);
2841
+ }
2842
+
2843
+ .tw-group[data-squid-theme-type=light] .group-data-\[squid-theme-type\=light\]\:tw-text-grey-900 {
2844
+ color: var(--squid-theme-grey-900);
2845
+ }
2846
+
2797
2847
  .tw-group[data-squid-theme-type=dark] .group-data-\[squid-theme-type\=dark\]\:tw-shadow-elevation-dark-2 {
2798
2848
  --tw-shadow: 0px 2px 5px 1px rgba(0, 0, 0, 0.20), 0px 5px 20px -1px rgba(0, 0, 0, 0.33);
2799
2849
  --tw-shadow-colored: 0px 2px 5px 1px var(--tw-shadow-color), 0px 5px 20px -1px var(--tw-shadow-color);
package/dist/index.d.ts CHANGED
@@ -72,8 +72,9 @@ interface BoostButtonProps {
72
72
  boostMode: BoostMode;
73
73
  }) => void;
74
74
  boostDisabledMessage?: string;
75
+ tooltipDisplayDelayMs?: number;
75
76
  }
76
- declare function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode, boostDisabledMessage, }: BoostButtonProps): react_jsx_runtime.JSX.Element;
77
+ declare function BoostButton({ boostMode, onToggleBoostMode, canToggleBoostMode, boostDisabledMessage, tooltipDisplayDelayMs, }: BoostButtonProps): react_jsx_runtime.JSX.Element;
77
78
 
78
79
  interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
79
80
  label?: string;
@@ -81,8 +82,9 @@ interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
81
82
  variant: ButtonVariant;
82
83
  size: ButtonSize;
83
84
  disabled?: boolean;
85
+ link?: string;
84
86
  }
85
- declare function Button({ label, disabled, size, variant, icon, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
87
+ declare function Button({ label, disabled, size, variant, icon, link, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
86
88
 
87
89
  interface ChipProps extends React.HTMLAttributes<HTMLDivElement> {
88
90
  label?: string;
@@ -147,8 +149,9 @@ interface TooltipProps {
147
149
  containerClassName?: string;
148
150
  childrenClassName?: string;
149
151
  tooltipClassName?: string;
152
+ displayDelayMs?: number;
150
153
  }
151
- declare function Tooltip({ children, tooltipContent, tooltipWidth, threshold, containerClassName, childrenClassName, tooltipClassName, }: TooltipProps): react_jsx_runtime.JSX.Element;
154
+ declare function Tooltip({ children, tooltipContent, tooltipWidth, threshold, containerClassName, childrenClassName, tooltipClassName, displayDelayMs, }: TooltipProps): react_jsx_runtime.JSX.Element;
152
155
 
153
156
  interface BoostProps {
154
157
  boostMode: BoostMode;
@@ -158,8 +161,9 @@ interface BoostProps {
158
161
  estimatedTime: string;
159
162
  boostDisabledMessage?: string;
160
163
  canToggleBoostMode?: boolean;
164
+ boostTooltipDisplayDelayMs?: number;
161
165
  }
162
- declare function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode, }: BoostProps): react_jsx_runtime.JSX.Element;
166
+ declare function Boost({ boostMode, onToggleBoostMode, estimatedTime, boostDisabledMessage, canToggleBoostMode, boostTooltipDisplayDelayMs, }: BoostProps): react_jsx_runtime.JSX.Element;
163
167
 
164
168
  interface DetailsToolbarProps {
165
169
  errorMessage?: string;
@@ -179,8 +183,9 @@ interface DetailsToolbarProps {
179
183
  label: string;
180
184
  onClick: () => void;
181
185
  };
186
+ boostTooltipDisplayDelayMs?: number;
182
187
  }
183
- declare function DetailsToolbar({ errorMessage, boostMode, onToggleBoostMode, onInvertSwapButtonClick, onFeeButtonClick, feeInUsd, estimatedTime, canToggleBoostMode, boostDisabledMessage, helpButton, isLoading, isEmpty, }: DetailsToolbarProps): react_jsx_runtime.JSX.Element;
188
+ declare function DetailsToolbar({ errorMessage, boostMode, onToggleBoostMode, onInvertSwapButtonClick, onFeeButtonClick, feeInUsd, estimatedTime, canToggleBoostMode, boostDisabledMessage, helpButton, isLoading, isEmpty, boostTooltipDisplayDelayMs, }: DetailsToolbarProps): react_jsx_runtime.JSX.Element;
184
189
 
185
190
  interface DropdownMenuItemProps {
186
191
  label: string;
@@ -206,7 +211,7 @@ interface HistoryItemProps {
206
211
  }
207
212
  declare function HistoryItem({ firstImageUrl, secondImageUrl, isPending, dateCompleted, fromAmount, fromLabel, toAmount, toLabel, pendingLabel, dropdownMenuItems, itemsContainerRef, }: HistoryItemProps): react_jsx_runtime.JSX.Element;
208
213
 
209
- interface ListItemProps extends React.HTMLAttributes<HTMLLIElement> {
214
+ interface ListItemProps extends React.HTMLAttributes<HTMLButtonElement> {
210
215
  itemTitle: string | React.ReactNode;
211
216
  mainImageUrl?: string;
212
217
  secondaryImageUrl?: string;
@@ -398,8 +403,9 @@ interface SwapConfigurationProps {
398
403
  };
399
404
  criticalPriceImpactPercentage?: number;
400
405
  emptyAddressLabel?: string;
406
+ onSwapAmountButtonClick?: () => void;
401
407
  }
402
- declare function SwapConfiguration({ priceImpactPercentage, amount, forcedAmount, swapAmountUsd, balance, isFetching, chain, token, direction, onAmountChange, onWalletButtonClick, onAssetsButtonClick, onBalanceButtonClick, address, error, criticalPriceImpactPercentage, emptyAddressLabel, }: SwapConfigurationProps): react_jsx_runtime.JSX.Element;
408
+ declare function SwapConfiguration({ priceImpactPercentage, amount, forcedAmount, swapAmountUsd, balance, isFetching, chain, token, direction, onAmountChange, onWalletButtonClick, onAssetsButtonClick, onBalanceButtonClick, onSwapAmountButtonClick, address, error, criticalPriceImpactPercentage, emptyAddressLabel, }: SwapConfigurationProps): react_jsx_runtime.JSX.Element;
403
409
 
404
410
  interface SwapProgressViewHeaderProps {
405
411
  title: string;
@@ -466,7 +472,7 @@ type SquidTheme = {
466
472
  };
467
473
 
468
474
  declare function SquidConfigProvider({ theme, children, themeType, }: {
469
- theme: SquidTheme;
475
+ theme?: SquidTheme;
470
476
  children?: React.ReactNode;
471
477
  themeType?: ThemeType;
472
478
  }): react_jsx_runtime.JSX.Element;
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.9.5",
8
+ "version": "0.10.1",
9
9
  "author": "",
10
10
  "license": "MIT",
11
11
  "scripts": {
@@ -1 +0,0 @@
1
- export declare function ProfileView(): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { ProfileView } from '../../components/views/ProfileView';
3
- declare const meta: Meta<typeof ProfileView>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const Default: Story;
@@ -1 +0,0 @@
1
- export declare function ProfileView(): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { ProfileView } from '../../components/views/ProfileView';
3
- declare const meta: Meta<typeof ProfileView>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const Default: Story;