@synerise/ds-toast 1.1.4 → 1.1.6
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/CHANGELOG.md +9 -6
- package/README.md +4 -1
- package/dist/Toast.d.ts +1 -1
- package/dist/Toast.js +2 -2
- package/dist/Toast.styles.d.ts +3 -3
- package/dist/Toast.styles.js +2 -2
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +1 -1
- package/dist/utils/showToast.d.ts +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [1.1.
|
|
6
|
+
## [1.1.6](https://github.com/Synerise/synerise-design/compare/@synerise/ds-toast@1.1.5...@synerise/ds-toast@1.1.6) (2025-07-01)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @synerise/ds-toast
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
## [1.1.
|
|
14
|
+
## [1.1.5](https://github.com/Synerise/synerise-design/compare/@synerise/ds-toast@1.1.4...@synerise/ds-toast@1.1.5) (2025-06-26)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @synerise/ds-toast
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
## [1.1.
|
|
22
|
+
## [1.1.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-toast@1.1.3...@synerise/ds-toast@1.1.4) (2025-06-24)
|
|
23
23
|
|
|
24
24
|
**Note:** Version bump only for package @synerise/ds-toast
|
|
25
25
|
|
|
@@ -27,17 +27,20 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
## [1.1.
|
|
30
|
+
## [1.1.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-toast@1.1.2...@synerise/ds-toast@1.1.3) (2025-06-05)
|
|
31
31
|
|
|
32
32
|
**Note:** Version bump only for package @synerise/ds-toast
|
|
33
33
|
|
|
34
|
+
## [1.1.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-toast@1.1.1...@synerise/ds-toast@1.1.2) (2025-05-26)
|
|
34
35
|
|
|
36
|
+
**Note:** Version bump only for package @synerise/ds-toast
|
|
35
37
|
|
|
38
|
+
## [1.1.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-toast@1.1.0...@synerise/ds-toast@1.1.1) (2025-05-19)
|
|
36
39
|
|
|
40
|
+
**Note:** Version bump only for package @synerise/ds-toast
|
|
37
41
|
|
|
38
42
|
# 1.1.0 (2025-05-07)
|
|
39
43
|
|
|
40
|
-
|
|
41
44
|
### Features
|
|
42
45
|
|
|
43
|
-
|
|
46
|
+
- **toast:** toast component ([0cb20d0](https://github.com/Synerise/synerise-design/commit/0cb20d07b48d1c768a0ddf133b1970a4a13444ca))
|
package/README.md
CHANGED
|
@@ -64,10 +64,13 @@ import Button from '@synerise/ds-button';
|
|
|
64
64
|
### Additional methods
|
|
65
65
|
|
|
66
66
|
#### removeToast(toastId?)
|
|
67
|
+
|
|
67
68
|
Removes a specific or all displayed toasts instantly
|
|
68
69
|
|
|
69
70
|
#### dismissToast(toastId?)
|
|
71
|
+
|
|
70
72
|
Removes a specific or all displayed toasts with an exit animation.
|
|
71
73
|
|
|
72
74
|
#### showToast(type, toastProps, toastOptions?)
|
|
73
|
-
|
|
75
|
+
|
|
76
|
+
enders a Toast of specified `type`, using toastProps and then displays it using the Toaster with toastOptoins. returns a toastID that can be later used to remove / dismiss that toast manually.
|
package/dist/Toast.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ShowToastProps, ToastCustomisationOptions, ToastProps } from './Toast.types';
|
|
2
|
+
import { type ShowToastProps, type ToastCustomisationOptions, type ToastProps } from './Toast.types';
|
|
3
3
|
export declare const Toast: {
|
|
4
4
|
({ type, message, description, expander, expandedContent, withClose, customIcon, expanded, onExpand, onCloseClick, button, ...htmlAttributes }: ToastProps): React.JSX.Element;
|
|
5
5
|
success(props: ShowToastProps, options?: ToastCustomisationOptions): string;
|
package/dist/Toast.js
CHANGED
|
@@ -2,10 +2,10 @@ var _excluded = ["type", "message", "description", "expander", "expandedContent"
|
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import React, { useCallback, useMemo } from 'react';
|
|
5
|
-
import Icon, {
|
|
5
|
+
import Icon, { AngleDownS, CloseM } from '@synerise/ds-icon';
|
|
6
6
|
import * as S from './Toast.styles';
|
|
7
|
-
import { showToast } from './utils/showToast';
|
|
8
7
|
import { ICONS } from './constants';
|
|
8
|
+
import { showToast } from './utils/showToast';
|
|
9
9
|
export var Toast = function Toast(_ref) {
|
|
10
10
|
var type = _ref.type,
|
|
11
11
|
message = _ref.message,
|
package/dist/Toast.styles.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ToastType } from './Toast.types';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type Keyframes } from 'styled-components';
|
|
3
|
+
import { type ToastType } from './Toast.types';
|
|
4
4
|
export declare const closingAnimation: () => Keyframes;
|
|
5
5
|
export declare const AlertContent: import("styled-components").StyledComponent<"div", any, {
|
|
6
6
|
hasBottomMargin?: boolean | undefined;
|
package/dist/Toast.styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled, { keyframes } from 'styled-components';
|
|
2
|
-
import { hexToRgba } from '@synerise/ds-utils';
|
|
3
2
|
import { UnorderedList } from '@synerise/ds-unordered-list/dist/Unordered-list.styles';
|
|
3
|
+
import { hexToRgba } from '@synerise/ds-utils';
|
|
4
4
|
var getDescriptionColorForType = function getDescriptionColorForType(_ref) {
|
|
5
5
|
var toastType = _ref.toastType,
|
|
6
6
|
theme = _ref.theme;
|
|
@@ -148,6 +148,6 @@ export var AlertDescription = styled.div.withConfig({
|
|
|
148
148
|
export var Container = styled.div.withConfig({
|
|
149
149
|
displayName: "Toaststyles__Container",
|
|
150
150
|
componentId: "sc-wwaizr-16"
|
|
151
|
-
})(["display:flex;flex-direction:row;max-width:500px;align-items:flex-start;justify-content:center;background-color:", ";border-radius:4px;box-shadow:", ";", ",", ",", "{svg{fill:", ";}}", ",", ",", ":hover,", "{color:", ";}", ":hover{", "{background-image:linear-gradient(to right,", " 20%,rgba(255,255,255,0) 10%);color:", ";}}", "{svg{color:", ";fill:", ";}}"], getBackgroundColorForType, function (props) {
|
|
151
|
+
})(["display:flex;flex-direction:row;max-width:500px;align-items:flex-start;justify-content:center;background-color:", ";border-radius:4px;box-shadow:", ";", ",", ",", "{svg{fill:", ";}}", ",", ",", ":hover,", "{color:", ";}", ":hover{", "{background-image:linear-gradient( to right,", " 20%,rgba(255,255,255,0) 10% );color:", ";}}", "{svg{color:", ";fill:", ";}}"], getBackgroundColorForType, function (props) {
|
|
152
152
|
return props.color ? "0px 16px 32px 5px " + hexToRgba(props.theme.palette['grey-900'], 0.2) : 'none';
|
|
153
153
|
}, IconExpanderWrapper, IconOrderWrapper, IconCloseWrapper, getDescriptionColorForType, OrderWrapper, AlertMessage, NumberWrapper, AlertDescription, getDescriptionColorForType, OrderWrapper, NumberWrapper, getDescriptionColorForType, getDescriptionColorForType, IconWrapper, getIconColorForType, getIconColorForType);
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ToastType } from './Toast.types';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ToastType } from './Toast.types';
|
|
3
3
|
export declare const ICONS: Record<ToastType, ReactNode>;
|
package/dist/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Check3M, InfoFillM, WarningFillM } from '@synerise/ds-icon';
|
|
3
3
|
export var ICONS = {
|
|
4
4
|
success: /*#__PURE__*/React.createElement(Check3M, null),
|
|
5
5
|
warning: /*#__PURE__*/React.createElement(WarningFillM, null),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ShowToastProps, ToastCustomisationOptions, ToastType } from '../Toast.types';
|
|
1
|
+
import { type ShowToastProps, type ToastCustomisationOptions, type ToastType } from '../Toast.types';
|
|
2
2
|
export declare const showToast: (type: ToastType, props: ShowToastProps, options?: ToastCustomisationOptions) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-toast",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Toast UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-icon": "^1.5.
|
|
38
|
-
"@synerise/ds-unordered-list": "^1.1.
|
|
39
|
-
"@synerise/ds-utils": "^1.3.
|
|
37
|
+
"@synerise/ds-icon": "^1.5.4",
|
|
38
|
+
"@synerise/ds-unordered-list": "^1.1.8",
|
|
39
|
+
"@synerise/ds-utils": "^1.3.1",
|
|
40
40
|
"react-hot-toast": "^2.5.2"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"react": ">=16.9.0 <= 18.3.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@synerise/ds-toaster": "^1.1.
|
|
47
|
+
"@synerise/ds-toaster": "^1.1.2"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "4512641033ba3581a3df208143c547fcfed45895"
|
|
50
50
|
}
|