@rango-dev/ui 0.28.2-next.0 → 0.28.2-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -6
- package/dist/index.js.map +4 -4
- package/dist/widget/ui/src/components/Alert/Alert.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Alert/Alert.styles.d.ts +4 -4
- package/dist/widget/ui/src/components/Alert/Alert.types.d.ts +2 -0
- package/dist/widget/ui/src/components/Alert/Alert.types.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Button/Button.d.ts +6 -6
- package/dist/widget/ui/src/components/Button/Button.styles.d.ts +1 -1
- package/dist/widget/ui/src/components/Divider/Divider.d.ts +1 -1
- package/dist/widget/ui/src/components/Divider/Divider.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Divider/Divider.styles.d.ts +2 -2
- package/dist/widget/ui/src/components/Icon/common.d.ts +2 -2
- package/dist/widget/ui/src/components/MessageBox/MessageBox.styles.d.ts +1 -1
- package/dist/widget/ui/src/components/Modal/Modal.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Modal/Modal.types.d.ts +6 -1
- package/dist/widget/ui/src/components/Modal/Modal.types.d.ts.map +1 -1
- package/dist/widget/ui/src/components/RadioGroup/RadioGroup.styles.d.ts +1 -1
- package/dist/widget/ui/src/components/StepDetails/StepDetails.styles.d.ts +4 -4
- package/dist/widget/ui/src/components/SvgIcon/SvgIcon.style.d.ts +1 -1
- package/dist/widget/ui/src/components/Toast/Toast.Provider.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Toast/Toast.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Toast/Toast.stories.d.ts +4 -3
- package/dist/widget/ui/src/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Toast/Toast.styles.d.ts +4 -6
- package/dist/widget/ui/src/components/Toast/Toast.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Toast/Toast.types.d.ts +14 -14
- package/dist/widget/ui/src/components/Toast/Toast.types.d.ts.map +1 -1
- package/dist/widget/ui/src/components/TokenAmount/TokenAmount.styles.d.ts +1 -1
- package/dist/widget/ui/src/components/Typography/NotSelectableTypography.d.ts +163 -0
- package/dist/widget/ui/src/components/Typography/NotSelectableTypography.d.ts.map +1 -0
- package/dist/widget/ui/src/components/Typography/Typography.types.d.ts +1 -1
- package/dist/widget/ui/src/components/Typography/Typography.types.d.ts.map +1 -1
- package/dist/widget/ui/src/components/Typography/index.d.ts +1 -0
- package/dist/widget/ui/src/components/Typography/index.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/ConnectWalletsModal/ConnectWalletsModal.d.ts.map +1 -1
- package/dist/widget/ui/src/containers/SwapInput/SwapInput.styles.d.ts +6 -6
- package/dist/widget/ui/src/containers/SwapInput/TokenSection.styles.d.ts +6 -6
- package/dist/widget/ui/src/icons/Autorenew.d.ts +5 -0
- package/dist/widget/ui/src/icons/Autorenew.d.ts.map +1 -0
- package/dist/widget/ui/src/icons/Exit.d.ts +5 -0
- package/dist/widget/ui/src/icons/Exit.d.ts.map +1 -0
- package/dist/widget/ui/src/icons/Swap.d.ts +5 -0
- package/dist/widget/ui/src/icons/Swap.d.ts.map +1 -0
- package/dist/widget/ui/src/icons/index.d.ts +3 -0
- package/dist/widget/ui/src/icons/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Alert/Alert.tsx +2 -0
- package/src/components/Alert/Alert.types.ts +2 -0
- package/src/components/Divider/Divider.tsx +2 -1
- package/src/components/Modal/Modal.tsx +6 -5
- package/src/components/Modal/Modal.types.ts +6 -1
- package/src/components/Toast/Toast.Provider.tsx +82 -44
- package/src/components/Toast/Toast.stories.tsx +18 -21
- package/src/components/Toast/Toast.styles.ts +74 -38
- package/src/components/Toast/Toast.tsx +54 -27
- package/src/components/Toast/Toast.types.ts +19 -17
- package/src/components/Typography/NotSelectableTypography.ts +7 -0
- package/src/components/Typography/Typography.types.tsx +1 -1
- package/src/components/Typography/index.ts +1 -0
- package/src/containers/ConnectWalletsModal/ConnectWalletsModal.tsx +3 -1
- package/src/icons/Autorenew.tsx +20 -0
- package/src/icons/Exit.tsx +20 -0
- package/src/icons/Swap.tsx +20 -0
- package/src/icons/index.ts +3 -0
|
@@ -553,13 +553,13 @@ export declare const MaxButton: import("@stitches/react/types/styled-component")
|
|
|
553
553
|
"aria-braillelabel"?: string | undefined;
|
|
554
554
|
"aria-brailleroledescription"?: string | undefined;
|
|
555
555
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
556
|
-
"aria-checked"?: boolean | "
|
|
556
|
+
"aria-checked"?: boolean | "true" | "mixed" | "false" | undefined;
|
|
557
557
|
"aria-colcount"?: number | undefined;
|
|
558
558
|
"aria-colindex"?: number | undefined;
|
|
559
559
|
"aria-colindextext"?: string | undefined;
|
|
560
560
|
"aria-colspan"?: number | undefined;
|
|
561
561
|
"aria-controls"?: string | undefined;
|
|
562
|
-
"aria-current"?: boolean | "time" | "
|
|
562
|
+
"aria-current"?: boolean | "time" | "true" | "page" | "false" | "step" | "location" | "date" | undefined;
|
|
563
563
|
"aria-describedby"?: string | undefined;
|
|
564
564
|
"aria-description"?: string | undefined;
|
|
565
565
|
"aria-details"?: string | undefined;
|
|
@@ -569,7 +569,7 @@ export declare const MaxButton: import("@stitches/react/types/styled-component")
|
|
|
569
569
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
570
570
|
"aria-flowto"?: string | undefined;
|
|
571
571
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
572
|
-
"aria-haspopup"?: boolean | "dialog" | "menu" | "grid" | "
|
|
572
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "grid" | "true" | "listbox" | "false" | "tree" | undefined;
|
|
573
573
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
574
574
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
575
575
|
"aria-keyshortcuts"?: string | undefined;
|
|
@@ -580,11 +580,11 @@ export declare const MaxButton: import("@stitches/react/types/styled-component")
|
|
|
580
580
|
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
581
581
|
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
582
582
|
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
583
|
-
"aria-orientation"?: "
|
|
583
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
584
584
|
"aria-owns"?: string | undefined;
|
|
585
585
|
"aria-placeholder"?: string | undefined;
|
|
586
586
|
"aria-posinset"?: number | undefined;
|
|
587
|
-
"aria-pressed"?: boolean | "
|
|
587
|
+
"aria-pressed"?: boolean | "true" | "mixed" | "false" | undefined;
|
|
588
588
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
589
589
|
"aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
590
590
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
@@ -768,7 +768,7 @@ export declare const MaxButton: import("@stitches/react/types/styled-component")
|
|
|
768
768
|
} & {
|
|
769
769
|
size?: "small" | "medium" | "large" | "xsmall" | "xxsmall" | undefined;
|
|
770
770
|
variant?: "default" | "contained" | "outlined" | "ghost" | undefined;
|
|
771
|
-
type?: "
|
|
771
|
+
type?: "primary" | "secondary" | "success" | "warning" | "error" | undefined;
|
|
772
772
|
loading?: boolean | undefined;
|
|
773
773
|
disabled?: boolean | undefined;
|
|
774
774
|
prefix?: import("react").ReactNode;
|
|
@@ -57,13 +57,13 @@ export declare const Container: import("@stitches/react/types/styled-component")
|
|
|
57
57
|
"aria-braillelabel"?: string | undefined;
|
|
58
58
|
"aria-brailleroledescription"?: string | undefined;
|
|
59
59
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
60
|
-
"aria-checked"?: boolean | "
|
|
60
|
+
"aria-checked"?: boolean | "true" | "mixed" | "false" | undefined;
|
|
61
61
|
"aria-colcount"?: number | undefined;
|
|
62
62
|
"aria-colindex"?: number | undefined;
|
|
63
63
|
"aria-colindextext"?: string | undefined;
|
|
64
64
|
"aria-colspan"?: number | undefined;
|
|
65
65
|
"aria-controls"?: string | undefined;
|
|
66
|
-
"aria-current"?: boolean | "time" | "
|
|
66
|
+
"aria-current"?: boolean | "time" | "true" | "page" | "false" | "step" | "location" | "date" | undefined;
|
|
67
67
|
"aria-describedby"?: string | undefined;
|
|
68
68
|
"aria-description"?: string | undefined;
|
|
69
69
|
"aria-details"?: string | undefined;
|
|
@@ -73,7 +73,7 @@ export declare const Container: import("@stitches/react/types/styled-component")
|
|
|
73
73
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
74
74
|
"aria-flowto"?: string | undefined;
|
|
75
75
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
76
|
-
"aria-haspopup"?: boolean | "dialog" | "menu" | "grid" | "
|
|
76
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "grid" | "true" | "listbox" | "false" | "tree" | undefined;
|
|
77
77
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
78
78
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
79
79
|
"aria-keyshortcuts"?: string | undefined;
|
|
@@ -84,11 +84,11 @@ export declare const Container: import("@stitches/react/types/styled-component")
|
|
|
84
84
|
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
85
85
|
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
86
86
|
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
87
|
-
"aria-orientation"?: "
|
|
87
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
88
88
|
"aria-owns"?: string | undefined;
|
|
89
89
|
"aria-placeholder"?: string | undefined;
|
|
90
90
|
"aria-posinset"?: number | undefined;
|
|
91
|
-
"aria-pressed"?: boolean | "
|
|
91
|
+
"aria-pressed"?: boolean | "true" | "mixed" | "false" | undefined;
|
|
92
92
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
93
93
|
"aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
94
94
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
@@ -272,7 +272,7 @@ export declare const Container: import("@stitches/react/types/styled-component")
|
|
|
272
272
|
} & {
|
|
273
273
|
size?: "small" | "medium" | "large" | "xsmall" | "xxsmall" | undefined;
|
|
274
274
|
variant?: "default" | "contained" | "outlined" | "ghost" | undefined;
|
|
275
|
-
type?: "
|
|
275
|
+
type?: "primary" | "secondary" | "success" | "warning" | "error" | undefined;
|
|
276
276
|
loading?: boolean | undefined;
|
|
277
277
|
disabled?: boolean | undefined;
|
|
278
278
|
prefix?: import("react").ReactNode;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SvgIconPropsWithChildren } from '../components/SvgIcon';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare function SvgAutorenew(props: SvgIconPropsWithChildren): React.FunctionComponentElement<SvgIconPropsWithChildren>;
|
|
4
|
+
export default SvgAutorenew;
|
|
5
|
+
//# sourceMappingURL=Autorenew.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Autorenew.d.ts","sourceRoot":"","sources":["../../../../../src/icons/Autorenew.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAwB,MAAM,OAAO,CAAC;AAI7C,iBAAS,YAAY,CAAC,KAAK,EAAE,wBAAwB,4DAYpD;AACD,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SvgIconPropsWithChildren } from '../components/SvgIcon';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare function SvgExit(props: SvgIconPropsWithChildren): React.FunctionComponentElement<SvgIconPropsWithChildren>;
|
|
4
|
+
export default SvgExit;
|
|
5
|
+
//# sourceMappingURL=Exit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Exit.d.ts","sourceRoot":"","sources":["../../../../../src/icons/Exit.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAwB,MAAM,OAAO,CAAC;AAI7C,iBAAS,OAAO,CAAC,KAAK,EAAE,wBAAwB,4DAY/C;AACD,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SvgIconPropsWithChildren } from '../components/SvgIcon';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare function SvgSwap(props: SvgIconPropsWithChildren): React.FunctionComponentElement<SvgIconPropsWithChildren>;
|
|
4
|
+
export default SvgSwap;
|
|
5
|
+
//# sourceMappingURL=Swap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Swap.d.ts","sourceRoot":"","sources":["../../../../../src/icons/Swap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,KAAwB,MAAM,OAAO,CAAC;AAI7C,iBAAS,OAAO,CAAC,KAAK,EAAE,wBAAwB,4DAY/C;AACD,eAAe,OAAO,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as AddIcon } from './Add';
|
|
2
2
|
export { default as AutoThemeIcon } from './AutoTheme';
|
|
3
|
+
export { default as AutorenewIcon } from './Autorenew';
|
|
3
4
|
export { default as BorderRadiusIcon } from './BorderRadius';
|
|
4
5
|
export { default as ChevronDownIcon } from './ChevronDown';
|
|
5
6
|
export { default as ChevronLeftIcon } from './ChevronLeft';
|
|
@@ -16,6 +17,7 @@ export { default as DesktopIcon } from './Desktop';
|
|
|
16
17
|
export { default as DoneIcon } from './Done';
|
|
17
18
|
export { default as EvmCategoryIcon } from './EvmCategory';
|
|
18
19
|
export { default as ErrorIcon } from './Error';
|
|
20
|
+
export { default as ExitIcon } from './Exit';
|
|
19
21
|
export { default as ExternalLinkIcon } from './ExternalLink';
|
|
20
22
|
export { default as FontIcon } from './Font';
|
|
21
23
|
export { default as GasIcon } from './Gas';
|
|
@@ -41,6 +43,7 @@ export { default as RefreshIcon } from './Refresh';
|
|
|
41
43
|
export { default as ReverseIcon } from './Reverse';
|
|
42
44
|
export { default as RouteIcon } from './Route';
|
|
43
45
|
export { default as SearchIcon } from './Search';
|
|
46
|
+
export { default as SwapIcon } from './Swap';
|
|
44
47
|
export { default as TimeIcon } from './Time';
|
|
45
48
|
export { default as TransactionIcon } from './Transaction';
|
|
46
49
|
export { default as UtxoCategoryIcon } from './UtxoCategory';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAC;A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AM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,KAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -18,6 +18,7 @@ export function Alert(props: PropsWithChildren<PropTypes>) {
|
|
|
18
18
|
action,
|
|
19
19
|
containerStyles,
|
|
20
20
|
variant = 'regular',
|
|
21
|
+
titleAlign,
|
|
21
22
|
} = props;
|
|
22
23
|
const isFooterString = typeof footer === 'string';
|
|
23
24
|
|
|
@@ -36,6 +37,7 @@ export function Alert(props: PropsWithChildren<PropTypes>) {
|
|
|
36
37
|
{title && (
|
|
37
38
|
<Typography
|
|
38
39
|
color={getColor(type, variant)}
|
|
40
|
+
align={titleAlign}
|
|
39
41
|
variant="body"
|
|
40
42
|
className="title_typography"
|
|
41
43
|
size={variant === 'regular' ? 'xsmall' : 'small'}>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BaseAlign } from '../Typography/Typography.types';
|
|
1
2
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
3
|
|
|
3
4
|
export type Type = 'success' | 'warning' | 'error' | 'info' | 'loading';
|
|
@@ -9,4 +10,5 @@ export interface PropTypes {
|
|
|
9
10
|
action?: ReactNode;
|
|
10
11
|
variant?: 'alarm' | 'regular';
|
|
11
12
|
containerStyles?: CSSProperties;
|
|
13
|
+
titleAlign?: BaseAlign;
|
|
12
14
|
}
|
|
@@ -9,6 +9,7 @@ const DEFAULT_SIZE = 12;
|
|
|
9
9
|
export function Divider({
|
|
10
10
|
size = DEFAULT_SIZE,
|
|
11
11
|
direction = 'vertical',
|
|
12
|
+
...props
|
|
12
13
|
}: PropTypes) {
|
|
13
|
-
return <DividerContainer size={size} direction={direction} />;
|
|
14
|
+
return <DividerContainer size={size} direction={direction} {...props} />;
|
|
14
15
|
}
|
|
@@ -27,7 +27,7 @@ export function Modal(props: PropsWithChildren<PropTypes>) {
|
|
|
27
27
|
title,
|
|
28
28
|
open,
|
|
29
29
|
onClose,
|
|
30
|
-
|
|
30
|
+
styles,
|
|
31
31
|
anchor = 'bottom',
|
|
32
32
|
container = document.body,
|
|
33
33
|
prefix,
|
|
@@ -84,10 +84,11 @@ export function Modal(props: PropsWithChildren<PropTypes>) {
|
|
|
84
84
|
<BackDrop
|
|
85
85
|
active={active}
|
|
86
86
|
onClick={handleBackDropClick}
|
|
87
|
-
anchor={anchor}
|
|
87
|
+
anchor={anchor}
|
|
88
|
+
css={styles?.root}>
|
|
88
89
|
<ModalContainer
|
|
89
90
|
active={active}
|
|
90
|
-
css={
|
|
91
|
+
css={styles?.container}
|
|
91
92
|
anchor={anchor}>
|
|
92
93
|
{header ?? (
|
|
93
94
|
<ModalHeader noTitle={!title && dismissible && !prefix}>
|
|
@@ -107,9 +108,9 @@ export function Modal(props: PropsWithChildren<PropTypes>) {
|
|
|
107
108
|
</Flex>
|
|
108
109
|
</ModalHeader>
|
|
109
110
|
)}
|
|
110
|
-
<Content>{children}</Content>
|
|
111
|
+
<Content css={styles?.content}>{children}</Content>
|
|
111
112
|
|
|
112
|
-
<Footer>
|
|
113
|
+
<Footer css={styles?.footer}>
|
|
113
114
|
{footer && <div className="footer__content">{footer}</div>}
|
|
114
115
|
|
|
115
116
|
<div
|
|
@@ -15,7 +15,12 @@ export interface PropTypes {
|
|
|
15
15
|
prefix?: React.ReactNode;
|
|
16
16
|
suffix?: React.ReactNode;
|
|
17
17
|
container?: HTMLElement;
|
|
18
|
-
|
|
18
|
+
styles?: {
|
|
19
|
+
root?: Stitches.CSS<typeof config>;
|
|
20
|
+
container?: Stitches.CSS<typeof config>;
|
|
21
|
+
content?: Stitches.CSS<typeof config>;
|
|
22
|
+
footer?: Stitches.CSS<typeof config>;
|
|
23
|
+
};
|
|
19
24
|
footer?: React.ReactNode;
|
|
20
25
|
hasWatermark?: boolean;
|
|
21
26
|
hasCloseIcon?: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
ProviderContext,
|
|
3
3
|
ProviderPropTypes,
|
|
4
|
+
ToastPosition,
|
|
4
5
|
ToastProps,
|
|
5
6
|
ToastType,
|
|
6
7
|
} from './Toast.types';
|
|
@@ -15,61 +16,98 @@ import { ToastContainer } from './Toast.styles';
|
|
|
15
16
|
|
|
16
17
|
const ToastContext = createContext<ProviderContext | undefined>(undefined);
|
|
17
18
|
|
|
19
|
+
const renderToastContainer = (
|
|
20
|
+
toasts: ToastProps[],
|
|
21
|
+
position: ToastPosition
|
|
22
|
+
) => (
|
|
23
|
+
<>
|
|
24
|
+
{toasts.length > 0 && (
|
|
25
|
+
<ToastContainer style={toasts[0].containerStyle} position={position}>
|
|
26
|
+
{toasts.map((toast) => (
|
|
27
|
+
<Toast {...toast} key={toast.id} />
|
|
28
|
+
))}
|
|
29
|
+
</ToastContainer>
|
|
30
|
+
)}
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
|
|
18
34
|
export const ToastProvider = (props: PropsWithChildren<ProviderPropTypes>) => {
|
|
19
35
|
const generateId = useMemo(() => idGenerator(), []);
|
|
20
36
|
|
|
21
|
-
const {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const [toasts, setToasts] = useState<ToastProps[]>([]);
|
|
37
|
+
const { children, container } = props;
|
|
38
|
+
const [leftTopToasts, setLeftTopToasts] = useState<ToastProps[]>([]);
|
|
39
|
+
const [leftBottomToasts, setLeftBottomToasts] = useState<ToastProps[]>([]);
|
|
40
|
+
const [rightTopToasts, setRightTopToasts] = useState<ToastProps[]>([]);
|
|
41
|
+
const [rightBottomToasts, setRightBottomToasts] = useState<ToastProps[]>([]);
|
|
42
|
+
const [centerTopToasts, setCenterTopToasts] = useState<ToastProps[]>([]);
|
|
43
|
+
const [centerBottomToasts, setCenterBottomToasts] = useState<ToastProps[]>(
|
|
44
|
+
[]
|
|
45
|
+
);
|
|
31
46
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
const getToastSetter = (position: ToastPosition) => {
|
|
48
|
+
switch (position) {
|
|
49
|
+
case 'right-top':
|
|
50
|
+
return setRightTopToasts;
|
|
51
|
+
case 'right-bottom':
|
|
52
|
+
return setRightBottomToasts;
|
|
53
|
+
case 'left-top':
|
|
54
|
+
return setLeftTopToasts;
|
|
55
|
+
case 'left-bottom':
|
|
56
|
+
return setLeftBottomToasts;
|
|
57
|
+
case 'center-top':
|
|
58
|
+
return setCenterTopToasts;
|
|
59
|
+
default:
|
|
60
|
+
return setCenterBottomToasts;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const handleAddToast = (content: ToastType) => {
|
|
65
|
+
const addToasts = () => getToastSetter(content.position);
|
|
66
|
+
|
|
67
|
+
addToasts()((toasts) => {
|
|
68
|
+
const isToastExistById = toasts.find((toast) => toast.id === content.id);
|
|
69
|
+
if (isToastExistById) {
|
|
70
|
+
console.warn(
|
|
71
|
+
'Trying to send a toast with an existing ID. Please update the toast ID or use it after the toast is hidden'
|
|
38
72
|
);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
73
|
+
return toasts;
|
|
74
|
+
}
|
|
75
|
+
return [
|
|
76
|
+
...toasts,
|
|
77
|
+
{
|
|
78
|
+
...content,
|
|
79
|
+
id: content.id || generateId(),
|
|
80
|
+
},
|
|
81
|
+
];
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const handleRemoveToast = (id: number | string, position: ToastPosition) => {
|
|
86
|
+
const removeFromToasts = () => getToastSetter(position);
|
|
87
|
+
|
|
88
|
+
removeFromToasts()((toasts) => toasts.filter((t) => t.id !== id));
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
92
|
+
const toastApis = {
|
|
93
|
+
addToast: (content: ToastType) => handleAddToast(content),
|
|
94
|
+
removeToast: (id: number | string, position: ToastPosition) =>
|
|
95
|
+
handleRemoveToast(id, position),
|
|
58
96
|
};
|
|
59
97
|
|
|
60
98
|
return (
|
|
61
|
-
<ToastContext.Provider value={
|
|
99
|
+
<ToastContext.Provider value={toastApis}>
|
|
62
100
|
{children}
|
|
63
101
|
{container &&
|
|
64
102
|
createPortal(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
{
|
|
70
|
-
|
|
71
|
-
)
|
|
72
|
-
|
|
103
|
+
<>
|
|
104
|
+
{renderToastContainer(rightTopToasts, 'right-top')}
|
|
105
|
+
{renderToastContainer(leftTopToasts, 'left-top')}
|
|
106
|
+
{renderToastContainer(centerTopToasts, 'center-top')}
|
|
107
|
+
{renderToastContainer(rightBottomToasts, 'right-bottom')}
|
|
108
|
+
{renderToastContainer(leftBottomToasts, 'left-bottom')}
|
|
109
|
+
{renderToastContainer(centerBottomToasts, 'center-bottom')}
|
|
110
|
+
</>,
|
|
73
111
|
container
|
|
74
112
|
)}
|
|
75
113
|
</ToastContext.Provider>
|
|
@@ -16,7 +16,8 @@ export default {
|
|
|
16
16
|
type: 'success',
|
|
17
17
|
title: 'Please change your wallet network to Polygon',
|
|
18
18
|
autoHideDuration: 5_000,
|
|
19
|
-
|
|
19
|
+
position: 'right-top',
|
|
20
|
+
variant: 'standard',
|
|
20
21
|
},
|
|
21
22
|
argTypes: {
|
|
22
23
|
type: {
|
|
@@ -26,30 +27,26 @@ export default {
|
|
|
26
27
|
options: ['success', 'warning', 'error', 'info', 'loading'],
|
|
27
28
|
},
|
|
28
29
|
},
|
|
30
|
+
position: {
|
|
31
|
+
name: 'position',
|
|
32
|
+
control: {
|
|
33
|
+
type: 'select',
|
|
34
|
+
options: [
|
|
35
|
+
'right-top',
|
|
36
|
+
'left-top',
|
|
37
|
+
'center-top',
|
|
38
|
+
'right-bottom',
|
|
39
|
+
'left-bottom',
|
|
40
|
+
'center-bottom',
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
29
44
|
},
|
|
30
45
|
} as Meta<typeof Toast>;
|
|
31
46
|
|
|
32
|
-
export const
|
|
33
|
-
return (
|
|
34
|
-
<ToastProvider
|
|
35
|
-
container={document.body}
|
|
36
|
-
anchorOrigin={{
|
|
37
|
-
horizontal: props.horizontal,
|
|
38
|
-
vertical: 'top',
|
|
39
|
-
}}>
|
|
40
|
-
<ToastComponent {...props} />
|
|
41
|
-
</ToastProvider>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const BottomToasts = (props: ToastProps) => {
|
|
47
|
+
export const Main = (props: ToastProps) => {
|
|
46
48
|
return (
|
|
47
|
-
<ToastProvider
|
|
48
|
-
container={document.body}
|
|
49
|
-
anchorOrigin={{
|
|
50
|
-
horizontal: props.horizontal,
|
|
51
|
-
vertical: 'bottom',
|
|
52
|
-
}}>
|
|
49
|
+
<ToastProvider container={document.body}>
|
|
53
50
|
<ToastComponent {...props} />
|
|
54
51
|
</ToastProvider>
|
|
55
52
|
);
|
|
@@ -7,18 +7,7 @@ const toastOpacity = keyframes({
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
export const ToastContentContainer = styled('div', {
|
|
10
|
-
|
|
11
|
-
horizontal: {
|
|
12
|
-
right: {
|
|
13
|
-
right: 12,
|
|
14
|
-
animation: `${toastOpacity} .7s`,
|
|
15
|
-
},
|
|
16
|
-
left: {
|
|
17
|
-
left: 12,
|
|
18
|
-
animation: `${toastOpacity} .7s`,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
10
|
+
animation: `${toastOpacity} .7s`,
|
|
22
11
|
});
|
|
23
12
|
|
|
24
13
|
export const ToastContainer = styled('div', {
|
|
@@ -28,20 +17,31 @@ export const ToastContainer = styled('div', {
|
|
|
28
17
|
gap: '$4',
|
|
29
18
|
flexDirection: 'column',
|
|
30
19
|
variants: {
|
|
31
|
-
|
|
32
|
-
right: {
|
|
20
|
+
position: {
|
|
21
|
+
'right-top': {
|
|
33
22
|
right: 12,
|
|
23
|
+
top: 2,
|
|
34
24
|
},
|
|
35
|
-
|
|
25
|
+
'right-bottom': {
|
|
26
|
+
right: 12,
|
|
27
|
+
bottom: 2,
|
|
28
|
+
},
|
|
29
|
+
'left-top': {
|
|
36
30
|
left: 12,
|
|
31
|
+
top: 2,
|
|
37
32
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
'left-bottom': {
|
|
34
|
+
left: 12,
|
|
35
|
+
bottom: 2,
|
|
36
|
+
},
|
|
37
|
+
'center-top': {
|
|
38
|
+
left: '50%',
|
|
39
|
+
transform: 'translateX(-50%)',
|
|
42
40
|
top: 2,
|
|
43
41
|
},
|
|
44
|
-
bottom: {
|
|
42
|
+
'center-bottom': {
|
|
43
|
+
left: '50%',
|
|
44
|
+
transform: 'translateX(-50%)',
|
|
45
45
|
bottom: 2,
|
|
46
46
|
},
|
|
47
47
|
},
|
|
@@ -53,36 +53,73 @@ export const AlertBox = styled('div', {
|
|
|
53
53
|
borderRadius: '$sm',
|
|
54
54
|
width: '292px',
|
|
55
55
|
minHeight: '52px',
|
|
56
|
-
backgroundColor: '$background',
|
|
57
|
-
borderRight: '1px solid',
|
|
58
|
-
[`.${darkTheme} &`]: {
|
|
59
|
-
backgroundColor: '#070917',
|
|
60
|
-
},
|
|
61
|
-
'&:hover': {
|
|
62
|
-
backgroundColor: '$info100',
|
|
63
|
-
[`.${darkTheme} &`]: {
|
|
64
|
-
backgroundColor: '#111733',
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
56
|
variants: {
|
|
57
|
+
variant: {
|
|
58
|
+
custom: {
|
|
59
|
+
backgroundColor: '$background',
|
|
60
|
+
borderRight: '1px solid',
|
|
61
|
+
'&:hover': {
|
|
62
|
+
backgroundColor: '$info100',
|
|
63
|
+
[`.${darkTheme} &`]: {
|
|
64
|
+
backgroundColor: '$neutral300',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
standard: {
|
|
69
|
+
'& ._alert': {
|
|
70
|
+
padding: '$10',
|
|
71
|
+
width: '100%',
|
|
72
|
+
justifyContent: 'center',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
68
77
|
type: {
|
|
69
|
-
error: {
|
|
78
|
+
error: {},
|
|
79
|
+
success: {},
|
|
80
|
+
warning: {},
|
|
81
|
+
info: {},
|
|
82
|
+
loading: {},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
compoundVariants: [
|
|
86
|
+
{
|
|
87
|
+
variant: 'custom',
|
|
88
|
+
type: 'error',
|
|
89
|
+
|
|
90
|
+
css: {
|
|
70
91
|
borderRightColor: '$error500',
|
|
71
92
|
},
|
|
72
|
-
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
variant: 'custom',
|
|
96
|
+
type: 'success',
|
|
97
|
+
css: {
|
|
73
98
|
borderRightColor: '$success500',
|
|
74
99
|
},
|
|
75
|
-
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
variant: 'custom',
|
|
103
|
+
type: 'warning',
|
|
104
|
+
css: {
|
|
76
105
|
borderRightColor: '$warning500',
|
|
77
106
|
},
|
|
78
|
-
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
variant: 'custom',
|
|
110
|
+
type: 'info',
|
|
111
|
+
css: {
|
|
79
112
|
borderRightColor: '$info500',
|
|
80
113
|
},
|
|
81
|
-
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
variant: 'custom',
|
|
117
|
+
type: 'loading',
|
|
118
|
+
css: {
|
|
82
119
|
borderRightColor: '$info500',
|
|
83
120
|
},
|
|
84
121
|
},
|
|
85
|
-
|
|
122
|
+
],
|
|
86
123
|
});
|
|
87
124
|
|
|
88
125
|
export const AlertFlexContainer = styled('div', {
|
|
@@ -108,6 +145,5 @@ export const StyledTypography = styled(Typography, {
|
|
|
108
145
|
|
|
109
146
|
export const ToastStoryContainer = styled('div', {
|
|
110
147
|
display: 'flex',
|
|
111
|
-
justifyContent: 'center',
|
|
112
148
|
alignItems: 'center',
|
|
113
149
|
});
|