@zendeskgarden/react-notifications 8.47.2 → 8.48.0

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.cjs.js CHANGED
@@ -215,7 +215,7 @@ function _nonIterableRest() {
215
215
  var COMPONENT_ID$5 = 'notifications.close';
216
216
  var StyledClose = styled__default["default"].button.attrs({
217
217
  'data-garden-id': COMPONENT_ID$5,
218
- 'data-garden-version': '8.47.2'
218
+ 'data-garden-version': '8.48.0'
219
219
  }).withConfig({
220
220
  displayName: "StyledClose",
221
221
  componentId: "sc-1mr9nx1-0"
@@ -247,7 +247,7 @@ StyledClose.defaultProps = {
247
247
  var COMPONENT_ID$4 = 'notifications.paragraph';
248
248
  var StyledParagraph = styled__default["default"].p.attrs({
249
249
  'data-garden-id': COMPONENT_ID$4,
250
- 'data-garden-version': '8.47.2'
250
+ 'data-garden-version': '8.48.0'
251
251
  }).withConfig({
252
252
  displayName: "StyledParagraph",
253
253
  componentId: "sc-12tmd6p-0"
@@ -263,7 +263,7 @@ StyledParagraph.defaultProps = {
263
263
  var COMPONENT_ID$3 = 'notifications.title';
264
264
  var StyledTitle = styled__default["default"].div.attrs({
265
265
  'data-garden-id': COMPONENT_ID$3,
266
- 'data-garden-version': '8.47.2'
266
+ 'data-garden-version': '8.48.0'
267
267
  }).withConfig({
268
268
  displayName: "StyledTitle",
269
269
  componentId: "sc-xx4jsv-0"
@@ -335,7 +335,7 @@ var colorStyles$1 = function colorStyles(props) {
335
335
  var StyledAlert = styled__default["default"](StyledBase).attrs(function (props) {
336
336
  return {
337
337
  'data-garden-id': COMPONENT_ID$2,
338
- 'data-garden-version': '8.47.2',
338
+ 'data-garden-version': '8.48.0',
339
339
  role: props.role === undefined ? 'alert' : props.role
340
340
  };
341
341
  }).withConfig({
@@ -382,7 +382,7 @@ var colorStyles = function colorStyles(props) {
382
382
  var StyledNotification = styled__default["default"](StyledBase).attrs(function (props) {
383
383
  return {
384
384
  'data-garden-id': COMPONENT_ID$1,
385
- 'data-garden-version': '8.47.2',
385
+ 'data-garden-version': '8.48.0',
386
386
  role: props.role === undefined ? 'status' : props.role
387
387
  };
388
388
  }).withConfig({
@@ -401,7 +401,7 @@ StyledNotification.defaultProps = {
401
401
  var COMPONENT_ID = 'notifications.well';
402
402
  var StyledWell = styled__default["default"](StyledBase).attrs({
403
403
  'data-garden-id': COMPONENT_ID,
404
- 'data-garden-version': '8.47.2'
404
+ 'data-garden-version': '8.48.0'
405
405
  }).withConfig({
406
406
  displayName: "StyledWell",
407
407
  componentId: "sc-a5831c-0"
@@ -706,6 +706,8 @@ var toasterReducer = function toasterReducer(state, action) {
706
706
  }
707
707
  };
708
708
 
709
+ var ToastContext = React.createContext(undefined);
710
+
709
711
  var DEFAULT_TOAST_OPTIONS = {
710
712
  autoDismiss: 5000,
711
713
  placement: 'top-end'
@@ -946,7 +948,6 @@ var ToastSlot = function ToastSlot(_ref) {
946
948
  }));
947
949
  };
948
950
 
949
- var ToastContext = React.createContext(undefined);
950
951
  var ToastProvider = function ToastProvider(_ref) {
951
952
  var limit = _ref.limit,
952
953
  zIndex = _ref.zIndex,
@@ -987,7 +988,8 @@ ToastProvider.defaultProps = {
987
988
  };
988
989
  ToastProvider.propTypes = {
989
990
  limit: PropTypes__default["default"].number,
990
- zIndex: PropTypes__default["default"].number
991
+ zIndex: PropTypes__default["default"].number,
992
+ placementProps: PropTypes__default["default"].object
991
993
  };
992
994
 
993
995
  exports.Alert = Alert;
package/dist/index.esm.js CHANGED
@@ -187,7 +187,7 @@ function _nonIterableRest() {
187
187
  var COMPONENT_ID$5 = 'notifications.close';
188
188
  var StyledClose = styled.button.attrs({
189
189
  'data-garden-id': COMPONENT_ID$5,
190
- 'data-garden-version': '8.47.2'
190
+ 'data-garden-version': '8.48.0'
191
191
  }).withConfig({
192
192
  displayName: "StyledClose",
193
193
  componentId: "sc-1mr9nx1-0"
@@ -219,7 +219,7 @@ StyledClose.defaultProps = {
219
219
  var COMPONENT_ID$4 = 'notifications.paragraph';
220
220
  var StyledParagraph = styled.p.attrs({
221
221
  'data-garden-id': COMPONENT_ID$4,
222
- 'data-garden-version': '8.47.2'
222
+ 'data-garden-version': '8.48.0'
223
223
  }).withConfig({
224
224
  displayName: "StyledParagraph",
225
225
  componentId: "sc-12tmd6p-0"
@@ -235,7 +235,7 @@ StyledParagraph.defaultProps = {
235
235
  var COMPONENT_ID$3 = 'notifications.title';
236
236
  var StyledTitle = styled.div.attrs({
237
237
  'data-garden-id': COMPONENT_ID$3,
238
- 'data-garden-version': '8.47.2'
238
+ 'data-garden-version': '8.48.0'
239
239
  }).withConfig({
240
240
  displayName: "StyledTitle",
241
241
  componentId: "sc-xx4jsv-0"
@@ -307,7 +307,7 @@ var colorStyles$1 = function colorStyles(props) {
307
307
  var StyledAlert = styled(StyledBase).attrs(function (props) {
308
308
  return {
309
309
  'data-garden-id': COMPONENT_ID$2,
310
- 'data-garden-version': '8.47.2',
310
+ 'data-garden-version': '8.48.0',
311
311
  role: props.role === undefined ? 'alert' : props.role
312
312
  };
313
313
  }).withConfig({
@@ -354,7 +354,7 @@ var colorStyles = function colorStyles(props) {
354
354
  var StyledNotification = styled(StyledBase).attrs(function (props) {
355
355
  return {
356
356
  'data-garden-id': COMPONENT_ID$1,
357
- 'data-garden-version': '8.47.2',
357
+ 'data-garden-version': '8.48.0',
358
358
  role: props.role === undefined ? 'status' : props.role
359
359
  };
360
360
  }).withConfig({
@@ -373,7 +373,7 @@ StyledNotification.defaultProps = {
373
373
  var COMPONENT_ID = 'notifications.well';
374
374
  var StyledWell = styled(StyledBase).attrs({
375
375
  'data-garden-id': COMPONENT_ID,
376
- 'data-garden-version': '8.47.2'
376
+ 'data-garden-version': '8.48.0'
377
377
  }).withConfig({
378
378
  displayName: "StyledWell",
379
379
  componentId: "sc-a5831c-0"
@@ -678,6 +678,8 @@ var toasterReducer = function toasterReducer(state, action) {
678
678
  }
679
679
  };
680
680
 
681
+ var ToastContext = createContext(undefined);
682
+
681
683
  var DEFAULT_TOAST_OPTIONS = {
682
684
  autoDismiss: 5000,
683
685
  placement: 'top-end'
@@ -918,7 +920,6 @@ var ToastSlot = function ToastSlot(_ref) {
918
920
  }));
919
921
  };
920
922
 
921
- var ToastContext = createContext(undefined);
922
923
  var ToastProvider = function ToastProvider(_ref) {
923
924
  var limit = _ref.limit,
924
925
  zIndex = _ref.zIndex,
@@ -959,7 +960,8 @@ ToastProvider.defaultProps = {
959
960
  };
960
961
  ToastProvider.propTypes = {
961
962
  limit: PropTypes.number,
962
- zIndex: PropTypes.number
963
+ zIndex: PropTypes.number,
964
+ placementProps: PropTypes.object
963
965
  };
964
966
 
965
967
  export { Alert, Close, Notification, Paragraph, Title, ToastProvider, Well, useToast };
@@ -7,6 +7,7 @@
7
7
  import React, { HTMLAttributes } from 'react';
8
8
  import { VALIDATION_TYPE } from '../utils/types';
9
9
  export interface INotificationProps extends HTMLAttributes<HTMLDivElement> {
10
+ /** Applies notification type styles */
10
11
  type?: VALIDATION_TYPE;
11
12
  }
12
13
  /**
@@ -4,11 +4,10 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import React from 'react';
8
7
  import { IToast } from './reducer';
9
8
  interface IToastProps {
10
9
  toast: IToast;
11
10
  pauseTimers: boolean;
12
11
  }
13
- export declare const Toast: React.FC<IToastProps>;
12
+ export declare const Toast: ({ toast, pauseTimers }: IToastProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
14
13
  export {};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import { Dispatch } from 'react';
8
+ import { IToasterState, ToasterReducerAction } from './reducer';
9
+ interface IToastContext {
10
+ state: IToasterState;
11
+ dispatch: Dispatch<ToasterReducerAction>;
12
+ }
13
+ export declare const ToastContext: import("react").Context<IToastContext | undefined>;
14
+ export {};
@@ -4,24 +4,32 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import React, { Dispatch, HTMLAttributes } from 'react';
8
- import { IToasterState, ToasterReducerAction, ToastPlacement } from './reducer';
9
- export declare const ToastContext: React.Context<{
10
- state: IToasterState;
11
- dispatch: Dispatch<ToasterReducerAction>;
12
- } | undefined>;
7
+ import { HTMLAttributes, PropsWithChildren } from 'react';
8
+ import PropTypes from 'prop-types';
9
+ import { ToastPlacement } from './reducer';
13
10
  export interface IToastProviderProps {
14
11
  /**
15
12
  * Limits the number of visible toasts
16
13
  */
17
14
  limit?: number;
18
- /**
19
- * Sets the `z-index` of the toast
20
- */
21
- zIndex?: number;
22
15
  /**
23
16
  * Passes placement-based customization props to the toast's parent element
24
17
  */
25
18
  placementProps?: Partial<Record<ToastPlacement, HTMLAttributes<HTMLDivElement>>>;
19
+ /**
20
+ * Sets the `z-index` of the toast
21
+ */
22
+ zIndex?: number;
26
23
  }
27
- export declare const ToastProvider: React.FC<IToastProviderProps>;
24
+ export declare const ToastProvider: {
25
+ ({ limit, zIndex, placementProps, children }: PropsWithChildren<IToastProviderProps>): JSX.Element;
26
+ displayName: string;
27
+ defaultProps: {
28
+ limit: number;
29
+ };
30
+ propTypes: {
31
+ limit: PropTypes.Requireable<number>;
32
+ zIndex: PropTypes.Requireable<number>;
33
+ placementProps: PropTypes.Requireable<object>;
34
+ };
35
+ };
@@ -4,7 +4,7 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import React, { HTMLAttributes } from 'react';
7
+ import { HTMLAttributes } from 'react';
8
8
  import { IToast, ToastPlacement } from './reducer';
9
9
  interface IToastSlotProps extends HTMLAttributes<HTMLDivElement> {
10
10
  toasts: IToast[];
@@ -12,5 +12,5 @@ interface IToastSlotProps extends HTMLAttributes<HTMLDivElement> {
12
12
  limit: number;
13
13
  zIndex?: number;
14
14
  }
15
- export declare const ToastSlot: React.FC<IToastSlotProps>;
15
+ export declare const ToastSlot: ({ toasts, placement, zIndex, limit, ...props }: IToastSlotProps) => JSX.Element;
16
16
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-notifications",
3
- "version": "8.47.2",
3
+ "version": "8.48.0",
4
4
  "description": "Notification and Well components within the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/react-transition-group": "4.4.4",
37
- "@zendeskgarden/react-theming": "^8.47.2",
37
+ "@zendeskgarden/react-theming": "^8.48.0",
38
38
  "@zendeskgarden/svg-icons": "6.30.2"
39
39
  },
40
40
  "keywords": [
@@ -47,5 +47,5 @@
47
47
  "access": "public"
48
48
  },
49
49
  "zendeskgarden:src": "src/index.ts",
50
- "gitHead": "41cb43f285760417ae2145e47eca0e4a600455ab"
50
+ "gitHead": "75f36aee62043004650c3eb2e1583b98a87d71f8"
51
51
  }