@0xsquid/ui 0.23.2-beta.1 → 0.23.2-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/cjs/index.js +207 -152
  2. package/dist/cjs/types/components/badges/TransactionState.d.ts +0 -5
  3. package/dist/cjs/types/components/icons/Bag.d.ts +4 -0
  4. package/dist/cjs/types/components/icons/CrossAnimatedIcon.d.ts +7 -0
  5. package/dist/cjs/types/components/icons/EmojiSad.d.ts +4 -0
  6. package/dist/cjs/types/components/icons/HomeIcon.d.ts +16 -0
  7. package/dist/cjs/types/components/icons/Social.d.ts +12 -0
  8. package/dist/cjs/types/components/icons/SquidLogo.d.ts +4 -1
  9. package/dist/cjs/types/components/icons/Weather.d.ts +12 -0
  10. package/dist/cjs/types/components/icons/index.d.ts +2 -0
  11. package/dist/cjs/types/components/layout/CollapsibleMenu.d.ts +20 -0
  12. package/dist/cjs/types/components/layout/index.d.ts +1 -0
  13. package/dist/cjs/types/components/lists/TransactionItem.d.ts +8 -5
  14. package/dist/cjs/types/core/constants.d.ts +4 -0
  15. package/dist/cjs/types/core/index.d.ts +1 -1
  16. package/dist/cjs/types/hooks/index.d.ts +4 -0
  17. package/dist/cjs/types/hooks/useCollapsibleMenu.d.ts +6 -0
  18. package/dist/cjs/types/stories/badges/TransactionState.stories.d.ts +5 -0
  19. package/dist/cjs/types/stories/lists/TransactionItem.stories.d.ts +5 -0
  20. package/dist/cjs/types/types/components.d.ts +1 -1
  21. package/dist/esm/index.js +188 -151
  22. package/dist/esm/types/components/badges/TransactionState.d.ts +0 -5
  23. package/dist/esm/types/components/icons/Bag.d.ts +4 -0
  24. package/dist/esm/types/components/icons/CrossAnimatedIcon.d.ts +7 -0
  25. package/dist/esm/types/components/icons/EmojiSad.d.ts +4 -0
  26. package/dist/esm/types/components/icons/HomeIcon.d.ts +16 -0
  27. package/dist/esm/types/components/icons/Social.d.ts +12 -0
  28. package/dist/esm/types/components/icons/SquidLogo.d.ts +4 -1
  29. package/dist/esm/types/components/icons/Weather.d.ts +12 -0
  30. package/dist/esm/types/components/icons/index.d.ts +2 -0
  31. package/dist/esm/types/components/layout/CollapsibleMenu.d.ts +20 -0
  32. package/dist/esm/types/components/layout/index.d.ts +1 -0
  33. package/dist/esm/types/components/lists/TransactionItem.d.ts +8 -5
  34. package/dist/esm/types/core/constants.d.ts +4 -0
  35. package/dist/esm/types/core/index.d.ts +1 -1
  36. package/dist/esm/types/hooks/index.d.ts +4 -0
  37. package/dist/esm/types/hooks/useCollapsibleMenu.d.ts +6 -0
  38. package/dist/esm/types/stories/badges/TransactionState.stories.d.ts +5 -0
  39. package/dist/esm/types/stories/lists/TransactionItem.stories.d.ts +5 -0
  40. package/dist/esm/types/types/components.d.ts +1 -1
  41. package/dist/index.css +1 -1
  42. package/dist/index.d.ts +129 -13
  43. package/package.json +1 -1
@@ -1,11 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ActionStatus, TransactionStateVariant } from '../../types/components';
3
- export declare const statusBgClassMap: Record<ActionStatus, string>;
4
3
  export declare const statusTextClassMap: Record<ActionStatus, string>;
5
- export declare const statusColorClassMap: {
6
- bg: Record<ActionStatus, string>;
7
- text: Record<ActionStatus, string>;
8
- };
9
4
  interface TransactionStateProps extends React.HTMLAttributes<HTMLDivElement> {
10
5
  status: ActionStatus;
11
6
  variant?: TransactionStateVariant;
@@ -1 +1,5 @@
1
1
  export declare function BagIcon(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function BackpackIcon({ size, className, }: {
3
+ size?: string;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare function CrossAnimatedIcon({ size, isOpen, transitionDuration, className, }: {
3
+ size?: number;
4
+ isOpen?: boolean;
5
+ transitionDuration?: React.CSSProperties['transitionDuration'];
6
+ className?: string;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -6,3 +6,7 @@ export declare function EmojiMeh({ className, size, }: {
6
6
  className?: string;
7
7
  size?: string;
8
8
  }): import("react/jsx-runtime").JSX.Element;
9
+ export declare function SmileIcon({ size, className, }: {
10
+ size?: string;
11
+ className?: string;
12
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,19 @@
1
1
  export declare function HomeIcon({ className }: {
2
2
  className?: string;
3
3
  }): import("react/jsx-runtime").JSX.Element;
4
+ export declare function MenuSwapIcon({ size, className, }: {
5
+ size?: string;
6
+ className?: string;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ export declare function ColorPaletteIcon({ size, className, }: {
9
+ size?: string;
10
+ className?: string;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ export declare function ConsoleIcon({ size, className, }: {
13
+ size?: string;
14
+ className?: string;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ export declare function BubblesIcon({ size, className, }: {
17
+ size?: string;
18
+ className?: string;
19
+ }): import("react/jsx-runtime").JSX.Element;
@@ -2,3 +2,15 @@ export declare function XSocial({ className, size, }: {
2
2
  size?: string;
3
3
  className?: string;
4
4
  }): import("react/jsx-runtime").JSX.Element;
5
+ export declare function GithubIcon({ size, className, }: {
6
+ size?: string;
7
+ className?: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export declare function DiscordIcon({ size, className, }: {
10
+ size?: string;
11
+ className?: string;
12
+ }): import("react/jsx-runtime").JSX.Element;
13
+ export declare function MirrorIcon({ size, className, }: {
14
+ size?: string;
15
+ className?: string;
16
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1 +1,4 @@
1
- export declare function SquidLogo(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function SquidLogo({ size, className, }: {
2
+ size?: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ export declare function SunriseIcon({ size, className, }: {
2
+ size?: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export declare function SunIcon({ size, className, }: {
6
+ size?: string;
7
+ className?: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export declare function MoonIcon({ size, className, }: {
10
+ size?: string;
11
+ className?: string;
12
+ }): import("react/jsx-runtime").JSX.Element;
@@ -49,3 +49,5 @@ export * from './Timeline';
49
49
  export * from './TradingViewSteps';
50
50
  export * from './TriangleExclamation';
51
51
  export * from './Wallet';
52
+ export * from './CrossAnimatedIcon';
53
+ export * from './Weather';
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ interface CollapsibleMenuProps {
3
+ menuRef: React.MutableRefObject<HTMLDivElement | null>;
4
+ size: {
5
+ open: {
6
+ width: string;
7
+ height: string;
8
+ };
9
+ closed: {
10
+ width: string;
11
+ height: string;
12
+ };
13
+ };
14
+ children?: React.ReactNode;
15
+ isOpen?: boolean;
16
+ transitionDuration?: React.CSSProperties['transitionDuration'];
17
+ className?: string;
18
+ }
19
+ export declare function CollapsibleMenu({ children, menuRef, isOpen, transitionDuration, size, className, }: CollapsibleMenuProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -15,6 +15,7 @@ export * from './Modal';
15
15
  export * from './ModalContent';
16
16
  export * from './NavigationBar';
17
17
  export * from './PipeSeparator';
18
+ export * from './CollapsibleMenu';
18
19
  export * from './ProductCard';
19
20
  export * from './ProfileHeaderBackground';
20
21
  export * from './SwapConfiguration';
@@ -1,14 +1,16 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ActionStatus } from '../../types/components';
3
+ type TransactionItemVariant = 'compact' | 'full';
4
+ type TransactionItemType = {
5
+ icon?: ReactNode;
6
+ name: string;
7
+ };
3
8
  interface TransactionItemProps {
4
9
  className?: string;
5
10
  isLoading?: boolean;
6
11
  status?: ActionStatus;
7
12
  image?: ReactNode;
8
- type?: {
9
- icon?: ReactNode;
10
- name: string;
11
- };
13
+ type?: TransactionItemType;
12
14
  hash?: string;
13
15
  fromChain?: {
14
16
  logoURI: string;
@@ -21,6 +23,7 @@ interface TransactionItemProps {
21
23
  fromAmount?: string;
22
24
  toAmount?: string;
23
25
  timestamp?: number;
26
+ variant?: TransactionItemVariant;
24
27
  }
25
- export declare function TransactionItem({ className, isLoading, status, image, type, hash, fromChain, toChain, fromAmount, toAmount, timestamp, }: TransactionItemProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function TransactionItem({ className, isLoading, status, image, type, hash, fromChain, toChain, fromAmount, toAmount, timestamp, variant, }: TransactionItemProps): import("react/jsx-runtime").JSX.Element;
26
29
  export {};
@@ -14,6 +14,10 @@ export declare const CSS_VARS: {
14
14
  SLIDE_TO_BOTTOM_DURATION: string;
15
15
  BLUR_IN_DURATION: string;
16
16
  BLUR_OUT_DURATION: string;
17
+ COLLAPSIBLE_MENU_OPEN_WIDTH: string;
18
+ COLLAPSIBLE_MENU_OPEN_HEIGHT: string;
19
+ COLLAPSIBLE_MENU_CLOSED_WIDTH: string;
20
+ COLLAPSIBLE_MENU_CLOSED_HEIGHT: string;
17
21
  };
18
22
  export declare const ANIMATION_DURATIONS: {
19
23
  SHOW_ROUTE: number;
@@ -1,3 +1,3 @@
1
- export { MEDIA_QUERIES } from './constants';
1
+ export { MEDIA_QUERIES, CSS_VARS } from './constants';
2
2
  export { darkTheme, lightTheme } from './themes';
3
3
  export { baseTailwindConfig } from './design-system';
@@ -1,2 +1,6 @@
1
1
  export * from './useDropdownMenu';
2
2
  export * from './useMediaQuery';
3
+ export * from './useCollapsibleMenu';
4
+ export * from './useRect';
5
+ export * from './useVersion';
6
+ export * from './useTimer';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare function useCollapsibleMenu(): {
3
+ isMenuOpen: boolean;
4
+ toggleMenu: () => void;
5
+ menuRef: import("react").RefObject<HTMLDivElement>;
6
+ };
@@ -5,11 +5,16 @@ export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Success: Story;
7
7
  export declare const SuccessCompact: Story;
8
+ export declare const SuccessSmall: Story;
8
9
  export declare const Fail: Story;
9
10
  export declare const FailCompact: Story;
11
+ export declare const FailSmall: Story;
10
12
  export declare const Processing: Story;
11
13
  export declare const ProcessingCompact: Story;
14
+ export declare const ProcessingSmall: Story;
12
15
  export declare const Waiting: Story;
13
16
  export declare const WaitingCompact: Story;
17
+ export declare const WaitingSmall: Story;
14
18
  export declare const Incomplete: Story;
15
19
  export declare const IncompleteCompact: Story;
20
+ export declare const IncompleteSmall: Story;
@@ -4,7 +4,12 @@ declare const meta: Meta<typeof TransactionItem>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Swap: Story;
7
+ export declare const SwapCompact: Story;
7
8
  export declare const NFT: Story;
9
+ export declare const NFTCompact: Story;
8
10
  export declare const Bridge: Story;
11
+ export declare const BridgeCompact: Story;
9
12
  export declare const Approve: Story;
13
+ export declare const ApproveCompact: Story;
10
14
  export declare const Loading: Story;
15
+ export declare const LoadingCompact: Story;
@@ -32,7 +32,7 @@ export type DetailsToolbarState = 'full' | 'loading' | 'empty' | 'error';
32
32
  export type ThemeType = 'light' | 'dark';
33
33
  export type ActionStatus = 'pending' | 'waiting' | 'ongoing' | 'executed' | 'success' | 'error' | 'warning';
34
34
  export type InputMode = 'token' | 'price';
35
- export type TransactionStateVariant = 'full' | 'compact';
35
+ export type TransactionStateVariant = 'full' | 'compact' | 'small';
36
36
  export type TokenPairVariant = 'horizontal' | 'vertical';
37
37
  export type TokenPairSize = 'small' | 'medium';
38
38
  export type ImageIconVariant = 'square' | 'round' | 'proportional';