@soul-refiner/design-system 0.2.82 → 0.2.83

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.
@@ -7,13 +7,20 @@ export const AnimatedToast = ({ message, type, onClose, }) => {
7
7
  const handleDismiss = () => {
8
8
  setDismissed(true);
9
9
  };
10
- return (React.createElement(Container, { className: `toast ${dismissed ? 'toast-dismissed' : ''}` },
11
- React.createElement(Toast, { content: message, type: type, onClose: onClose, handleDismiss: handleDismiss })));
10
+ return (React.createElement(Wrapper, null,
11
+ React.createElement(Container, null,
12
+ React.createElement(Toast, { content: message, type: type, onClose: onClose, handleDismiss: handleDismiss }))));
12
13
  };
14
+ const Wrapper = styled.div `
15
+ display: flex;
16
+ row-gap: 12px;
17
+ position: fixed;
18
+ z-index: 9999;
19
+ bottom: 16px;
20
+ right: 16px;
21
+ `;
13
22
  const Container = styled.div `
14
- .toast {
15
- animation: slide-in 0.4s ease-in-out forwards;
16
- }
23
+ animation: slide-in 0.4s ease-in-out forwards;
17
24
 
18
25
  .toast-dismissed {
19
26
  animation: slide-out 0.4s ease-in-out forwards;
@@ -11,7 +11,7 @@ export const Toast = ({ content, href, onClose, type, handleDismiss, }) => {
11
11
  success: React.createElement(AlertCircle, { size: 24 }),
12
12
  warning: React.createElement(AlertTriangle, { size: 24 }),
13
13
  };
14
- return (React.createElement(Wrapper, { as: "output", "$align": "center", "$dir": "row", "$gap": 8, "$type": type },
14
+ return (React.createElement(Wrapper, { as: "output", "$dir": "row", "$gap": 8, "$type": type },
15
15
  iconLookup[type],
16
16
  React.createElement(P, { as: "span" }, content),
17
17
  href && (React.createElement(P, { sx: "padding-left: 8px;", as: "a", href: href, "$color": "primary-blue-2" }, "View")),
@@ -61,9 +61,6 @@ const ToastProgress = styled.div `
61
61
  }
62
62
  `;
63
63
  const Wrapper = styled.output `
64
- position: fixed;
65
- bottom: 24px;
66
- right: 24px;
67
64
  width: 99vw;
68
65
  max-width: 476px;
69
66
  box-sizing: border-box;
@@ -72,22 +69,6 @@ const Wrapper = styled.output `
72
69
  box-shadow: var(--elevation-2);
73
70
  border-radius: var(--small);
74
71
 
75
- &::before {
76
- position: absolute;
77
- content: '';
78
- left: 0px;
79
- width: 4px;
80
- height: 100%;
81
- background-color: ${({ $type }) => $type === 'error'
82
- ? 'var(--color-red-4)'
83
- : $type === 'info'
84
- ? 'var(--color-blue-4)'
85
- : $type === 'success'
86
- ? 'var(--color-green-3)'
87
- : 'var(--color-orange-5)'};
88
- border-radius: 8px 0px 0px 8px;
89
- }
90
-
91
72
  & > svg {
92
73
  fill: ${({ $type }) => $type === 'error'
93
74
  ? 'var(--color-red-4)'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soul-refiner/design-system",
3
- "version": "0.2.82",
3
+ "version": "0.2.83",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "publishConfig": {