@synerise/ds-alert 0.8.40 → 0.8.42

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
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
+ ## [0.8.42](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.8.41...@synerise/ds-alert@0.8.42) (2024-12-11)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-alert
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.8.41](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.8.40...@synerise/ds-alert@0.8.41) (2024-12-04)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-alert
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.8.40](https://github.com/Synerise/synerise-design/compare/@synerise/ds-alert@0.8.39...@synerise/ds-alert@0.8.40) (2024-11-29)
7
23
 
8
24
  **Note:** Version bump only for package @synerise/ds-alert
package/README.md CHANGED
@@ -30,6 +30,8 @@ import Alert from '@synerise/ds-alert'
30
30
 
31
31
  ### Notifications
32
32
 
33
+ **DEPRECATED** Notification component will no longer be supported
34
+
33
35
  Notifications API offer three things:
34
36
 
35
37
  * `<Notification/>` component for styled content,
@@ -3,8 +3,8 @@ import { NotificationInstance } from 'antd/lib/notification';
3
3
  import type { ArgsProps, NotificationApi } from 'antd/es/notification';
4
4
  import 'antd/lib/notification/style/index.less';
5
5
  /**
6
- * Typings for using better autocompletion for defining an argument for `notificationOpen`'s message property.
7
- */
6
+ * @deprecated - Notification component will no longer be supported
7
+ **/
8
8
  export type NotificationProps = {
9
9
  /** content of the notification */
10
10
  children?: JSX.Element | React.ReactNode | React.ReactNode[];
@@ -23,43 +23,18 @@ type NotificationApiHook = ReturnType<NotificationApi['useNotification']>;
23
23
  type ApiHook = NotificationApiHook[0];
24
24
  type ContextHolder = NotificationApiHook[1];
25
25
  /**
26
- * Component with the content of the notification.
27
- * Note that in order to show notification you need to use `notificationOpen`
28
- */
26
+ * @deprecated - Notification component will no longer be supported
27
+ **/
29
28
  export declare function Notification({ buttonText, children, onButtonClick, onClose, icon, closeIconClassName, }: NotificationProps): JSX.Element;
30
29
  /**
31
- * creates a div, mounts it in getContainer and returns reference to it.
32
- * This is a helper function for creating a getContainer-compatible element,
33
- * which later should be passed to getContainer option in `antd-notification`'s api
34
- *
35
- * @param @contextHolder notification's hook api context
36
- * @param @getContainer where to mount styled wrapper; can be a ref=React.useRef, <div ref={ref}/>
30
+ * @deprecated - Notification component will no longer be supported
37
31
  **/
38
32
  export declare function mountInstance(contextHolder?: ContextHolder, { getContainer, className }?: {
39
33
  getContainer?: (() => HTMLElement) | undefined;
40
34
  className?: string | undefined;
41
35
  }): [Promise<HTMLElement>, HTMLElement, () => void];
42
36
  /**
43
- * Function for showing new notifications.
44
- * It requires proper context to be injected (see `notificationApi.useNotification`)
45
- * and `message` prop in its first argument.
46
- * Below you will find an example usage.
47
- * Please remember that it is on you to provide contextHolder in the right place.
48
- * ```
49
- * import { notificationApi, Notification, notificationOpen } from '@synerise/ds-alert';
50
- * const [api, contextHolder] = notificationApi.useNotification();
51
- *
52
- * function App() {
53
- * return (<div id="app">
54
- * {contextHolder}
55
- * <button onClick={() => notificationOpen({
56
- * message: <Notification>You have been notified.</Notification>
57
- * })}>
58
- * Show notification
59
- * </button>);
60
- *
61
- * ReactDOM.render(<App/>, document.querySelector('#app'));
62
- * ```
63
- */
37
+ * @deprecated - Notification component will no longer be supported
38
+ **/
64
39
  export declare function notificationOpen({ type, className, message, icon, onClick, onClose, closeIconClassName, placement, ...props }: NotificationProps, notificationApi?: ApiHook, contextHolder?: ContextHolder): Promise<void>;
65
40
  export default Notification;
@@ -17,13 +17,12 @@ import Icon, { UserAddM, CloseM } from '@synerise/ds-icon';
17
17
  import * as S from './Notification.styles';
18
18
 
19
19
  /**
20
- * Typings for using better autocompletion for defining an argument for `notificationOpen`'s message property.
21
- */
20
+ * @deprecated - Notification component will no longer be supported
21
+ **/
22
22
 
23
23
  /**
24
- * Component with the content of the notification.
25
- * Note that in order to show notification you need to use `notificationOpen`
26
- */
24
+ * @deprecated - Notification component will no longer be supported
25
+ **/
27
26
  export function Notification(_ref) {
28
27
  var buttonText = _ref.buttonText,
29
28
  _ref$children = _ref.children,
@@ -50,12 +49,7 @@ export function Notification(_ref) {
50
49
  }
51
50
 
52
51
  /**
53
- * creates a div, mounts it in getContainer and returns reference to it.
54
- * This is a helper function for creating a getContainer-compatible element,
55
- * which later should be passed to getContainer option in `antd-notification`'s api
56
- *
57
- * @param @contextHolder notification's hook api context
58
- * @param @getContainer where to mount styled wrapper; can be a ref=React.useRef, <div ref={ref}/>
52
+ * @deprecated - Notification component will no longer be supported
59
53
  **/
60
54
  export function mountInstance(contextHolder, _temp) {
61
55
  var _ref2 = _temp === void 0 ? {} : _temp,
@@ -82,27 +76,8 @@ export function mountInstance(contextHolder, _temp) {
82
76
  }
83
77
 
84
78
  /**
85
- * Function for showing new notifications.
86
- * It requires proper context to be injected (see `notificationApi.useNotification`)
87
- * and `message` prop in its first argument.
88
- * Below you will find an example usage.
89
- * Please remember that it is on you to provide contextHolder in the right place.
90
- * ```
91
- * import { notificationApi, Notification, notificationOpen } from '@synerise/ds-alert';
92
- * const [api, contextHolder] = notificationApi.useNotification();
93
- *
94
- * function App() {
95
- * return (<div id="app">
96
- * {contextHolder}
97
- * <button onClick={() => notificationOpen({
98
- * message: <Notification>You have been notified.</Notification>
99
- * })}>
100
- * Show notification
101
- * </button>);
102
- *
103
- * ReactDOM.render(<App/>, document.querySelector('#app'));
104
- * ```
105
- */
79
+ * @deprecated - Notification component will no longer be supported
80
+ **/
106
81
  export function notificationOpen(_x, _x2, _x3) {
107
82
  return _notificationOpen.apply(this, arguments);
108
83
  }
@@ -1,6 +1,18 @@
1
+ /**
2
+ * @deprecated - Notification component will no longer be supported
3
+ **/
1
4
  export declare const NotificationsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ /**
6
+ * @deprecated - Notification component will no longer be supported
7
+ **/
2
8
  export declare const Shrink: import("styled-components").StyledComponent<"div", any, {}, never>;
9
+ /**
10
+ * @deprecated - Notification component will no longer be supported
11
+ **/
3
12
  export declare const TextLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
13
+ /**
14
+ * @deprecated - Notification component will no longer be supported
15
+ **/
4
16
  export declare const NotificationsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
5
17
  declare const _default: {
6
18
  NotificationsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,5 +1,9 @@
1
1
  import styled from 'styled-components';
2
2
  import { theme } from '@synerise/ds-core';
3
+
4
+ /**
5
+ * @deprecated - Notification component will no longer be supported
6
+ **/
3
7
  export var NotificationsContainer = styled.div.withConfig({
4
8
  displayName: "Notificationstyles__NotificationsContainer",
5
9
  componentId: "sc-1ke52b0-0"
@@ -7,14 +11,26 @@ export var NotificationsContainer = styled.div.withConfig({
7
11
  var _palette;
8
12
  return (_palette = ((props == null ? void 0 : props.theme) || theme).palette) == null ? void 0 : _palette['grey-800'];
9
13
  });
14
+
15
+ /**
16
+ * @deprecated - Notification component will no longer be supported
17
+ **/
10
18
  export var Shrink = styled.div.withConfig({
11
19
  displayName: "Notificationstyles__Shrink",
12
20
  componentId: "sc-1ke52b0-1"
13
21
  })(["flex-grow:0;"]);
22
+
23
+ /**
24
+ * @deprecated - Notification component will no longer be supported
25
+ **/
14
26
  export var TextLabel = styled.div.withConfig({
15
27
  displayName: "Notificationstyles__TextLabel",
16
28
  componentId: "sc-1ke52b0-2"
17
29
  })(["flex-grow:1;font-size:13px;"]);
30
+
31
+ /**
32
+ * @deprecated - Notification component will no longer be supported
33
+ **/
18
34
  export var NotificationsWrapper = styled.div.withConfig({
19
35
  displayName: "Notificationstyles__NotificationsWrapper",
20
36
  componentId: "sc-1ke52b0-3"
package/dist/index.d.ts CHANGED
@@ -12,9 +12,8 @@ export declare const AlertStyles: {
12
12
  IconAlert: typeof IconAlertStyles;
13
13
  };
14
14
  /**
15
- * notificationApi is required for properly handling injecting ContextApi for styling and locales.
16
- * It's a proxy to `antd`'s `notification` module.
17
- */
15
+ * @deprecated - Notification component will no longer be supported
16
+ **/
18
17
  export declare const notificationsApi: import("antd/lib/notification").NotificationApi;
19
18
  export type { NotificationProps } from './Notification/Notification';
20
19
  export { default as Notification } from './Notification/Notification';
@@ -28,4 +27,7 @@ export { default as InlineAlert } from './InlineAlert/InlineAlert';
28
27
  export { default as AlertInfo } from './AlertInfo/AlertInfo';
29
28
  export type { AlertSize } from './AlertInfo/AlertInfo.types';
30
29
  export { AlertMessage } from './Alert.styles';
30
+ /**
31
+ * @deprecated - Notification component will no longer be supported
32
+ **/
31
33
  export * as S from './Notification/Notification.styles';
package/dist/index.js CHANGED
@@ -14,9 +14,8 @@ export var AlertStyles = {
14
14
  };
15
15
 
16
16
  /**
17
- * notificationApi is required for properly handling injecting ContextApi for styling and locales.
18
- * It's a proxy to `antd`'s `notification` module.
19
- */
17
+ * @deprecated - Notification component will no longer be supported
18
+ **/
20
19
  export var notificationsApi = notification;
21
20
  export { default as Notification } from './Notification/Notification';
22
21
  export { notificationOpen } from './Notification/Notification';
@@ -27,6 +26,9 @@ export { default as InlineAlert } from './InlineAlert/InlineAlert';
27
26
  export { default as AlertInfo } from './AlertInfo/AlertInfo';
28
27
  // @deprecated use AlertStyles.Alert instead
29
28
  export { AlertMessage } from './Alert.styles';
30
- // @deprecated use AlertStyles.Notification instead
29
+
30
+ /**
31
+ * @deprecated - Notification component will no longer be supported
32
+ **/
31
33
  import * as _S from './Notification/Notification.styles';
32
34
  export { _S as S };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-alert",
3
- "version": "0.8.40",
3
+ "version": "0.8.42",
4
4
  "description": "Alert 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-button": "^0.21.21",
37
+ "@synerise/ds-button": "^0.22.0",
38
38
  "@synerise/ds-icon": "^0.68.0",
39
- "@synerise/ds-unordered-list": "^0.3.16",
39
+ "@synerise/ds-unordered-list": "^0.3.17",
40
40
  "@synerise/ds-utils": "^0.31.2",
41
41
  "animate.css": "^4.1.1",
42
42
  "react-animate-height": "^2.0.23",
@@ -48,5 +48,5 @@
48
48
  "react": ">=16.9.0 <= 17.0.2",
49
49
  "styled-components": "5.0.1"
50
50
  },
51
- "gitHead": "9ebd107163650754a5f55680d62d30812d740084"
51
+ "gitHead": "05aa1b6f2038d83cc94b2270fd495c8df2c09dd5"
52
52
  }