@zendeskgarden/react-notifications 8.62.1 → 8.63.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
@@ -7,8 +7,6 @@
7
7
 
8
8
  'use strict';
9
9
 
10
- Object.defineProperty(exports, '__esModule', { value: true });
11
-
12
10
  var React = require('react');
13
11
  var PropTypes = require('prop-types');
14
12
  var styled = require('styled-components');
@@ -18,7 +16,7 @@ var polished = require('polished');
18
16
  var reactTransitionGroup = require('react-transition-group');
19
17
  var reactUid = require('react-uid');
20
18
 
21
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
19
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
22
20
 
23
21
  function _interopNamespace(e) {
24
22
  if (e && e.__esModule) return e;
@@ -34,14 +32,13 @@ function _interopNamespace(e) {
34
32
  }
35
33
  });
36
34
  }
37
- n["default"] = e;
35
+ n.default = e;
38
36
  return Object.freeze(n);
39
37
  }
40
38
 
41
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
42
39
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
43
- var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
44
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
40
+ var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
41
+ var styled__default = /*#__PURE__*/_interopDefault(styled);
45
42
 
46
43
  function _extends$6() {
47
44
  _extends$6 = Object.assign ? Object.assign.bind() : function (target) {
@@ -61,9 +58,9 @@ function _extends$6() {
61
58
  const TYPE = ['success', 'warning', 'error', 'info'];
62
59
 
63
60
  const COMPONENT_ID$b = 'notifications.close';
64
- const StyledClose = styled__default["default"].button.attrs({
61
+ const StyledClose = styled__default.default.button.attrs({
65
62
  'data-garden-id': COMPONENT_ID$b,
66
- 'data-garden-version': '8.62.1'
63
+ 'data-garden-version': '8.63.0'
67
64
  }).withConfig({
68
65
  displayName: "StyledClose",
69
66
  componentId: "sc-1mr9nx1-0"
@@ -73,9 +70,9 @@ StyledClose.defaultProps = {
73
70
  };
74
71
 
75
72
  const COMPONENT_ID$a = 'notifications.paragraph';
76
- const StyledParagraph = styled__default["default"].p.attrs({
73
+ const StyledParagraph = styled__default.default.p.attrs({
77
74
  'data-garden-id': COMPONENT_ID$a,
78
- 'data-garden-version': '8.62.1'
75
+ 'data-garden-version': '8.63.0'
79
76
  }).withConfig({
80
77
  displayName: "StyledParagraph",
81
78
  componentId: "sc-12tmd6p-0"
@@ -85,9 +82,9 @@ StyledParagraph.defaultProps = {
85
82
  };
86
83
 
87
84
  const COMPONENT_ID$9 = 'notifications.title';
88
- const StyledTitle = styled__default["default"].div.attrs({
85
+ const StyledTitle = styled__default.default.div.attrs({
89
86
  'data-garden-id': COMPONENT_ID$9,
90
- 'data-garden-version': '8.62.1'
87
+ 'data-garden-version': '8.63.0'
91
88
  }).withConfig({
92
89
  displayName: "StyledTitle",
93
90
  componentId: "sc-xx4jsv-0"
@@ -132,7 +129,7 @@ const padding = props => {
132
129
  const paddingHorizontal = `${space.base * 10}px`;
133
130
  return `${paddingVertical} ${paddingHorizontal}`;
134
131
  };
135
- const StyledBase = styled__default["default"].div.withConfig({
132
+ const StyledBase = styled__default.default.div.withConfig({
136
133
  displayName: "StyledBase",
137
134
  componentId: "sc-14syaqw-0"
138
135
  })(["position:relative;border:", ";border-radius:", ";box-shadow:", ";padding:", ";line-height:", ";font-size:", ";direction:", ";", ";"], props => props.theme.borders.sm, props => props.theme.borderRadii.md, props => props.isFloating && boxShadow, padding, props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.theme.fontSizes.md, props => props.theme.rtl && 'rtl', colorStyles$6);
@@ -142,9 +139,9 @@ StyledBase.defaultProps = {
142
139
 
143
140
  const COMPONENT_ID$8 = 'notifications.alert';
144
141
  const colorStyles$5 = props => styled.css(["", "{color:", ";}"], StyledTitle, props.hue && reactTheming.getColor(props.hue, 800, props.theme));
145
- const StyledAlert = styled__default["default"](StyledBase).attrs(props => ({
142
+ const StyledAlert = styled__default.default(StyledBase).attrs(props => ({
146
143
  'data-garden-id': COMPONENT_ID$8,
147
- 'data-garden-version': '8.62.1',
144
+ 'data-garden-version': '8.63.0',
148
145
  role: props.role === undefined ? 'alert' : props.role
149
146
  })).withConfig({
150
147
  displayName: "StyledAlert",
@@ -189,25 +186,25 @@ const colorStyles$4 = props => {
189
186
  }
190
187
  return styled.css(["", "{color:", ";}"], StyledTitle, color);
191
188
  };
192
- const StyledNotification = styled__default["default"](StyledBase).attrs(props => ({
189
+ const StyledNotification = styled__default.default(StyledBase).attrs(props => ({
193
190
  'data-garden-id': COMPONENT_ID$7,
194
- 'data-garden-version': '8.62.1',
191
+ 'data-garden-version': '8.63.0',
195
192
  role: props.role === undefined ? 'status' : props.role
196
193
  })).withConfig({
197
194
  displayName: "StyledNotification",
198
195
  componentId: "sc-uf6jh-0"
199
196
  })(["", " ", ";"], colorStyles$4, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
200
197
  StyledNotification.propTypes = {
201
- type: PropTypes__default["default"].oneOf(TYPE)
198
+ type: PropTypes__default.default.oneOf(TYPE)
202
199
  };
203
200
  StyledNotification.defaultProps = {
204
201
  theme: reactTheming.DEFAULT_THEME
205
202
  };
206
203
 
207
204
  const COMPONENT_ID$6 = 'notifications.well';
208
- const StyledWell = styled__default["default"](StyledBase).attrs({
205
+ const StyledWell = styled__default.default(StyledBase).attrs({
209
206
  'data-garden-id': COMPONENT_ID$6,
210
- 'data-garden-version': '8.62.1'
207
+ 'data-garden-version': '8.63.0'
211
208
  }).withConfig({
212
209
  displayName: "StyledWell",
213
210
  componentId: "sc-a5831c-0"
@@ -216,12 +213,12 @@ StyledWell.defaultProps = {
216
213
  theme: reactTheming.DEFAULT_THEME
217
214
  };
218
215
 
219
- const StyledIcon = styled__default["default"](_ref => {
216
+ const StyledIcon = styled__default.default(_ref => {
220
217
  let {
221
218
  children,
222
219
  ...props
223
220
  } = _ref;
224
- return React__default["default"].cloneElement(React.Children.only(children), props);
221
+ return React__namespace.default.cloneElement(React.Children.only(children), props);
225
222
  }).withConfig({
226
223
  displayName: "StyledIcon",
227
224
  componentId: "sc-msklws-0"
@@ -285,9 +282,9 @@ const sizeStyles$3 = props => {
285
282
  const lineHeight = reactTheming.getLineHeight(space.base * 5, fontSizes.md);
286
283
  return styled.css(["padding:", "px;min-height:", "px;line-height:", ";font-size:", ";"], padding, minHeight, lineHeight, fontSizes.md);
287
284
  };
288
- const StyledGlobalAlert = styled__default["default"].div.attrs({
285
+ const StyledGlobalAlert = styled__default.default.div.attrs({
289
286
  'data-garden-id': COMPONENT_ID$5,
290
- 'data-garden-version': '8.62.1'
287
+ 'data-garden-version': '8.63.0'
291
288
  }).withConfig({
292
289
  displayName: "StyledGlobalAlert",
293
290
  componentId: "sc-k6rimt-0"
@@ -341,9 +338,9 @@ const sizeStyles$2 = props => {
341
338
  const marginEnd = `-${props.theme.space.base * 2}px`;
342
339
  return styled.css(["margin:", " ", " ", " ", ";"], marginVertical, props.theme.rtl ? marginStart : marginEnd, marginVertical, props.theme.rtl ? marginEnd : marginStart);
343
340
  };
344
- const StyledGlobalAlertClose = styled__default["default"](reactButtons.IconButton).attrs({
341
+ const StyledGlobalAlertClose = styled__default.default(reactButtons.IconButton).attrs({
345
342
  'data-garden-id': COMPONENT_ID$4,
346
- 'data-garden-version': '8.62.1',
343
+ 'data-garden-version': '8.63.0',
347
344
  size: 'small'
348
345
  }).withConfig({
349
346
  displayName: "StyledGlobalAlertClose",
@@ -392,9 +389,9 @@ function sizeStyles$1(props) {
392
389
  const marginStart = `${props.theme.space.base * 2}px`;
393
390
  return styled.css(["margin:", " ", " ", " ", ";"], marginVertical, props.theme.rtl ? marginStart : 0, marginVertical, props.theme.rtl ? 0 : marginStart);
394
391
  }
395
- const StyledGlobalAlertButton = styled__default["default"](reactButtons.Button).attrs({
392
+ const StyledGlobalAlertButton = styled__default.default(reactButtons.Button).attrs({
396
393
  'data-garden-id': COMPONENT_ID$3,
397
- 'data-garden-version': '8.62.1',
394
+ 'data-garden-version': '8.63.0',
398
395
  focusInset: false,
399
396
  isDanger: false,
400
397
  isLink: false,
@@ -411,9 +408,9 @@ StyledGlobalAlertButton.defaultProps = {
411
408
  };
412
409
 
413
410
  const COMPONENT_ID$2 = 'notifications.global-alert.content';
414
- const StyledGlobalAlertContent = styled__default["default"].div.attrs({
411
+ const StyledGlobalAlertContent = styled__default.default.div.attrs({
415
412
  'data-garden-id': COMPONENT_ID$2,
416
- 'data-garden-version': '8.62.1'
413
+ 'data-garden-version': '8.63.0'
417
414
  }).withConfig({
418
415
  displayName: "StyledGlobalAlertContent",
419
416
  componentId: "sc-rept0u-0"
@@ -429,15 +426,15 @@ const sizeStyles = props => {
429
426
  const marginHorizontal = `${props.theme.space.base * 2}px`;
430
427
  return styled.css(["margin-top:", ";margin-", ":", ";width:", ";height:", ";"], marginTop, props.theme.rtl ? 'left' : 'right', marginHorizontal, size, size);
431
428
  };
432
- const StyledGlobalAlertIcon = styled__default["default"](_ref => {
429
+ const StyledGlobalAlertIcon = styled__default.default(_ref => {
433
430
  let {
434
431
  children,
435
432
  ...props
436
433
  } = _ref;
437
- return React__default["default"].cloneElement(React.Children.only(children), props);
434
+ return React__namespace.default.cloneElement(React.Children.only(children), props);
438
435
  }).attrs({
439
436
  'data-garden-id': COMPONENT_ID$1,
440
- 'data-garden-version': '8.62.1'
437
+ 'data-garden-version': '8.63.0'
441
438
  }).withConfig({
442
439
  displayName: "StyledGlobalAlertIcon",
443
440
  componentId: "sc-84ne9k-0"
@@ -463,9 +460,9 @@ const colorStyles = props => {
463
460
  }
464
461
  return styled.css(["color:", ";"], color);
465
462
  };
466
- const StyledGlobalAlertTitle = styled__default["default"].div.attrs({
463
+ const StyledGlobalAlertTitle = styled__default.default.div.attrs({
467
464
  'data-garden-id': COMPONENT_ID,
468
- 'data-garden-version': '8.62.1'
465
+ 'data-garden-version': '8.63.0'
469
466
  }).withConfig({
470
467
  displayName: "StyledGlobalAlertTitle",
471
468
  componentId: "sc-10clqbo-0"
@@ -475,9 +472,7 @@ StyledGlobalAlertTitle.defaultProps = {
475
472
  };
476
473
 
477
474
  var _g$2, _circle$2;
478
-
479
475
  function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
480
-
481
476
  var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
482
477
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
483
478
  xmlns: "http://www.w3.org/2000/svg",
@@ -485,8 +480,7 @@ var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
485
480
  height: 16,
486
481
  focusable: "false",
487
482
  viewBox: "0 0 16 16",
488
- "aria-hidden": "true",
489
- role: "img"
483
+ "aria-hidden": "true"
490
484
  }, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
491
485
  fill: "none",
492
486
  stroke: "currentColor"
@@ -506,9 +500,7 @@ var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
506
500
  };
507
501
 
508
502
  var _g$1;
509
-
510
503
  function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
511
-
512
504
  var SvgCheckCircleStroke = function SvgCheckCircleStroke(props) {
513
505
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
514
506
  xmlns: "http://www.w3.org/2000/svg",
@@ -516,8 +508,7 @@ var SvgCheckCircleStroke = function SvgCheckCircleStroke(props) {
516
508
  height: 16,
517
509
  focusable: "false",
518
510
  viewBox: "0 0 16 16",
519
- "aria-hidden": "true",
520
- role: "img"
511
+ "aria-hidden": "true"
521
512
  }, props), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
522
513
  fill: "none",
523
514
  stroke: "currentColor"
@@ -533,9 +524,7 @@ var SvgCheckCircleStroke = function SvgCheckCircleStroke(props) {
533
524
  };
534
525
 
535
526
  var _path$2, _circle$1;
536
-
537
527
  function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
538
-
539
528
  var SvgAlertWarningStroke = function SvgAlertWarningStroke(props) {
540
529
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
541
530
  xmlns: "http://www.w3.org/2000/svg",
@@ -543,8 +532,7 @@ var SvgAlertWarningStroke = function SvgAlertWarningStroke(props) {
543
532
  height: 16,
544
533
  focusable: "false",
545
534
  viewBox: "0 0 16 16",
546
- "aria-hidden": "true",
547
- role: "img"
535
+ "aria-hidden": "true"
548
536
  }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
549
537
  fill: "none",
550
538
  stroke: "currentColor",
@@ -559,9 +547,7 @@ var SvgAlertWarningStroke = function SvgAlertWarningStroke(props) {
559
547
  };
560
548
 
561
549
  var _g, _circle;
562
-
563
550
  function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
564
-
565
551
  var SvgInfoStroke = function SvgInfoStroke(props) {
566
552
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
567
553
  xmlns: "http://www.w3.org/2000/svg",
@@ -569,8 +555,7 @@ var SvgInfoStroke = function SvgInfoStroke(props) {
569
555
  height: 16,
570
556
  focusable: "false",
571
557
  viewBox: "0 0 16 16",
572
- "aria-hidden": "true",
573
- role: "img"
558
+ "aria-hidden": "true"
574
559
  }, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
575
560
  stroke: "currentColor"
576
561
  }, /*#__PURE__*/React__namespace.createElement("circle", {
@@ -607,52 +592,50 @@ const useNotificationsContext = () => {
607
592
  return React.useContext(NotificationsContext);
608
593
  };
609
594
 
610
- const Alert = React__default["default"].forwardRef((props, ref) => {
595
+ const Alert = React__namespace.default.forwardRef((props, ref) => {
611
596
  const hue = validationHues[props.type];
612
597
  const Icon = validationIcons[props.type];
613
- return React__default["default"].createElement(NotificationsContext.Provider, {
598
+ return React__namespace.default.createElement(NotificationsContext.Provider, {
614
599
  value: hue
615
- }, React__default["default"].createElement(StyledAlert, _extends$6({
600
+ }, React__namespace.default.createElement(StyledAlert, _extends$6({
616
601
  ref: ref,
617
602
  hue: hue
618
- }, props), React__default["default"].createElement(StyledIcon, {
603
+ }, props), React__namespace.default.createElement(StyledIcon, {
619
604
  hue: hue
620
- }, React__default["default"].createElement(Icon, null)), props.children));
605
+ }, React__namespace.default.createElement(Icon, null)), props.children));
621
606
  });
622
607
  Alert.displayName = 'Alert';
623
608
  Alert.propTypes = {
624
- type: PropTypes__default["default"].oneOf(TYPE).isRequired
609
+ type: PropTypes__default.default.oneOf(TYPE).isRequired
625
610
  };
626
611
 
627
- const Notification = React__default["default"].forwardRef((props, ref) => {
612
+ const Notification = React__namespace.default.forwardRef((props, ref) => {
628
613
  const Icon = props.type ? validationIcons[props.type] : SvgInfoStroke;
629
614
  const hue = props.type && validationHues[props.type];
630
- return React__default["default"].createElement(StyledNotification, _extends$6({
615
+ return React__namespace.default.createElement(StyledNotification, _extends$6({
631
616
  ref: ref,
632
617
  type: props.type,
633
618
  isFloating: true
634
- }, props), props.type && React__default["default"].createElement(StyledIcon, {
619
+ }, props), props.type && React__namespace.default.createElement(StyledIcon, {
635
620
  hue: hue
636
- }, React__default["default"].createElement(Icon, null)), props.children);
621
+ }, React__namespace.default.createElement(Icon, null)), props.children);
637
622
  });
638
623
  Notification.displayName = 'Notification';
639
624
  Notification.propTypes = {
640
- type: PropTypes__default["default"].oneOf(TYPE)
625
+ type: PropTypes__default.default.oneOf(TYPE)
641
626
  };
642
627
 
643
- const Well = React__default["default"].forwardRef((props, ref) => React__default["default"].createElement(StyledWell, _extends$6({
628
+ const Well = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledWell, _extends$6({
644
629
  ref: ref
645
630
  }, props)));
646
631
  Well.displayName = 'Well';
647
632
  Well.propTypes = {
648
- isRecessed: PropTypes__default["default"].bool,
649
- isFloating: PropTypes__default["default"].bool
633
+ isRecessed: PropTypes__default.default.bool,
634
+ isFloating: PropTypes__default.default.bool
650
635
  };
651
636
 
652
637
  var _path$1;
653
-
654
638
  function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
655
-
656
639
  var SvgXStroke$1 = function SvgXStroke(props) {
657
640
  return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
658
641
  xmlns: "http://www.w3.org/2000/svg",
@@ -660,8 +643,7 @@ var SvgXStroke$1 = function SvgXStroke(props) {
660
643
  height: 12,
661
644
  focusable: "false",
662
645
  viewBox: "0 0 12 12",
663
- "aria-hidden": "true",
664
- role: "img"
646
+ "aria-hidden": "true"
665
647
  }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
666
648
  stroke: "currentColor",
667
649
  strokeLinecap: "round",
@@ -669,23 +651,23 @@ var SvgXStroke$1 = function SvgXStroke(props) {
669
651
  })));
670
652
  };
671
653
 
672
- const Close = React__default["default"].forwardRef((props, ref) => {
654
+ const Close = React__namespace.default.forwardRef((props, ref) => {
673
655
  const ariaLabel = reactTheming.useText(Close, props, 'aria-label', 'Close');
674
656
  const hue = useNotificationsContext();
675
- return React__default["default"].createElement(StyledClose, _extends$6({
657
+ return React__namespace.default.createElement(StyledClose, _extends$6({
676
658
  ref: ref,
677
659
  hue: hue,
678
660
  "aria-label": ariaLabel
679
- }, props), React__default["default"].createElement(SvgXStroke$1, null));
661
+ }, props), React__namespace.default.createElement(SvgXStroke$1, null));
680
662
  });
681
663
  Close.displayName = 'Close';
682
664
 
683
- const Paragraph = React__default["default"].forwardRef((props, ref) => React__default["default"].createElement(StyledParagraph, _extends$6({
665
+ const Paragraph = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledParagraph, _extends$6({
684
666
  ref: ref
685
667
  }, props)));
686
668
  Paragraph.displayName = 'Paragraph';
687
669
 
688
- const Title = React__default["default"].forwardRef((props, ref) => React__default["default"].createElement(StyledTitle, _extends$6({
670
+ const Title = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledTitle, _extends$6({
689
671
  ref: ref
690
672
  }, props)));
691
673
  Title.displayName = 'Title';
@@ -864,7 +846,7 @@ const Toast = _ref => {
864
846
 
865
847
  const TRANSITION_CLASS = 'garden-toast-transition';
866
848
  const DEFAULT_DURATION = '400ms';
867
- const StyledFadeInTransition = styled__default["default"].div.withConfig({
849
+ const StyledFadeInTransition = styled__default.default.div.withConfig({
868
850
  displayName: "styled__StyledFadeInTransition",
869
851
  componentId: "sc-nq0usb-0"
870
852
  })(["transition:opacity ", " ease-in 300ms;opacity:", ";margin-bottom:", "px;", " &.", "-enter{transform:translateY( ", " );opacity:0;max-height:0;}&.", "-enter-active{transform:translateY(0);transition:opacity ", " ease-in,transform ", " cubic-bezier(0.15,0.85,0.35,1.2),max-height ", ";opacity:1;max-height:500px;}&.", "-exit{opacity:1;max-height:500px;}&.", "-exit-active{transition:opacity 550ms ease-out,max-height ", " linear 150ms;opacity:0;max-height:0;}"], DEFAULT_DURATION, p => p.isHidden ? '0 !important' : 1, p => p.theme.space.base * 2, p => p.isHidden && polished.hideVisually(), TRANSITION_CLASS, props => {
@@ -885,7 +867,7 @@ const placementStyles = props => {
885
867
  const bottomLeftStyles = styled.css(["bottom:", ";left:", ";"], verticalDistance, horizontalDistance);
886
868
  const bottomStyles = styled.css(["bottom:", ";left:50%;transform:translate(-50%,0);"], verticalDistance);
887
869
  const bottomRightStyles = styled.css(["right:", ";bottom:", ";"], horizontalDistance, verticalDistance);
888
- switch (props.$placement) {
870
+ switch (props.toastPlacement) {
889
871
  case 'top-start':
890
872
  if (props.theme.rtl) {
891
873
  return topRightStyles;
@@ -914,11 +896,11 @@ const placementStyles = props => {
914
896
  return '';
915
897
  }
916
898
  };
917
- const StyledTransitionGroup = styled__default["default"](reactTransitionGroup.TransitionGroup).withConfig({
918
- displayName: "styled__StyledTransitionGroup",
899
+ const StyledTransitionContainer = styled__default.default.div.withConfig({
900
+ displayName: "styled__StyledTransitionContainer",
919
901
  componentId: "sc-nq0usb-1"
920
- })(["position:fixed;z-index:", ";", ";"], props => props.$zIndex, placementStyles);
921
- StyledTransitionGroup.defaultProps = {
902
+ })(["position:fixed;z-index:", ";", ";"], props => props.toastZIndex, placementStyles);
903
+ StyledTransitionContainer.defaultProps = {
922
904
  theme: reactTheming.DEFAULT_THEME
923
905
  };
924
906
 
@@ -962,15 +944,15 @@ const ToastSlot = _ref => {
962
944
  }
963
945
  return index >= limit;
964
946
  }, [limit, placement, toasts.length]);
965
- return React__default["default"].createElement(StyledTransitionGroup, _extends$6({
947
+ return React__namespace.default.createElement(StyledTransitionContainer, _extends$6({
966
948
  key: placement,
967
- $placement: placement,
968
- $zIndex: zIndex,
949
+ toastPlacement: placement,
950
+ toastZIndex: zIndex,
969
951
  onMouseEnter: handleMouseEnter,
970
952
  onMouseLeave: handleMouseLeave
971
- }, props), toasts.map((toast, index) => {
972
- const transitionRef = React__default["default"].createRef();
973
- return React__default["default"].createElement(reactTransitionGroup.CSSTransition, {
953
+ }, props), React__namespace.default.createElement(reactTransitionGroup.TransitionGroup, null, toasts.map((toast, index) => {
954
+ const transitionRef = React__namespace.default.createRef();
955
+ return React__namespace.default.createElement(reactTransitionGroup.CSSTransition, {
974
956
  key: toast.id,
975
957
  timeout: {
976
958
  enter: 400,
@@ -979,15 +961,15 @@ const ToastSlot = _ref => {
979
961
  unmountOnExit: true,
980
962
  classNames: TRANSITION_CLASS,
981
963
  nodeRef: transitionRef
982
- }, React__default["default"].createElement(StyledFadeInTransition, {
964
+ }, React__namespace.default.createElement(StyledFadeInTransition, {
983
965
  ref: transitionRef,
984
966
  placement: placement,
985
967
  isHidden: isHidden(index)
986
- }, React__default["default"].createElement(Toast, {
968
+ }, React__namespace.default.createElement(Toast, {
987
969
  toast: toast,
988
970
  pauseTimers: pauseTimers || isHidden(index)
989
971
  })));
990
- }));
972
+ })));
991
973
  };
992
974
 
993
975
  const ToastProvider = _ref => {
@@ -1007,14 +989,14 @@ const ToastProvider = _ref => {
1007
989
  if (placement === 'bottom' || placement === 'bottom-start' || placement === 'bottom-end') {
1008
990
  matchingToasts = matchingToasts.reverse();
1009
991
  }
1010
- return React__default["default"].createElement(ToastSlot, _extends$6({
992
+ return React__namespace.default.createElement(ToastSlot, _extends$6({
1011
993
  placement: placement,
1012
994
  toasts: matchingToasts,
1013
995
  zIndex: zIndex,
1014
996
  limit: limit
1015
997
  }, placementProps[placement]));
1016
998
  }, [limit, state.toasts, zIndex, placementProps]);
1017
- return React__default["default"].createElement(ToastContext.Provider, {
999
+ return React__namespace.default.createElement(ToastContext.Provider, {
1018
1000
  value: contextValue
1019
1001
  }, toastsByPlacement('top-start'), toastsByPlacement('top'), toastsByPlacement('top-end'), children, toastsByPlacement('bottom-start'), toastsByPlacement('bottom'), toastsByPlacement('bottom-end'));
1020
1002
  };
@@ -1023,9 +1005,9 @@ ToastProvider.defaultProps = {
1023
1005
  limit: 4
1024
1006
  };
1025
1007
  ToastProvider.propTypes = {
1026
- limit: PropTypes__default["default"].number,
1027
- zIndex: PropTypes__default["default"].number,
1028
- placementProps: PropTypes__default["default"].object
1008
+ limit: PropTypes__default.default.number,
1009
+ zIndex: PropTypes__default.default.number,
1010
+ placementProps: PropTypes__default.default.object
1029
1011
  };
1030
1012
 
1031
1013
  const GlobalAlertContext = React.createContext({
@@ -1041,7 +1023,7 @@ const GlobalAlertButton = React.forwardRef((_ref, ref) => {
1041
1023
  const {
1042
1024
  type
1043
1025
  } = useGlobalAlertContext();
1044
- return React__default["default"].createElement(StyledGlobalAlertButton, _extends$6({
1026
+ return React__namespace.default.createElement(StyledGlobalAlertButton, _extends$6({
1045
1027
  ref: ref,
1046
1028
  alertType: type
1047
1029
  }, props, {
@@ -1051,13 +1033,11 @@ const GlobalAlertButton = React.forwardRef((_ref, ref) => {
1051
1033
  });
1052
1034
  GlobalAlertButton.displayName = 'GlobalAlert.Button';
1053
1035
  GlobalAlertButton.propTypes = {
1054
- isBasic: PropTypes__default["default"].bool
1036
+ isBasic: PropTypes__default.default.bool
1055
1037
  };
1056
1038
 
1057
1039
  var _path;
1058
-
1059
1040
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1060
-
1061
1041
  var SvgXStroke = function SvgXStroke(props) {
1062
1042
  return /*#__PURE__*/React__namespace.createElement("svg", _extends({
1063
1043
  xmlns: "http://www.w3.org/2000/svg",
@@ -1065,8 +1045,7 @@ var SvgXStroke = function SvgXStroke(props) {
1065
1045
  height: 16,
1066
1046
  focusable: "false",
1067
1047
  viewBox: "0 0 16 16",
1068
- "aria-hidden": "true",
1069
- role: "img"
1048
+ "aria-hidden": "true"
1070
1049
  }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
1071
1050
  stroke: "currentColor",
1072
1051
  strokeLinecap: "round",
@@ -1079,10 +1058,10 @@ const GlobalAlertClose = React.forwardRef((props, ref) => {
1079
1058
  type
1080
1059
  } = useGlobalAlertContext();
1081
1060
  const label = reactTheming.useText(GlobalAlertClose, props, 'aria-label', 'Close');
1082
- return React__default["default"].createElement(StyledGlobalAlertClose, _extends$6({
1061
+ return React__namespace.default.createElement(StyledGlobalAlertClose, _extends$6({
1083
1062
  ref: ref,
1084
1063
  alertType: type
1085
- }, props), React__default["default"].createElement(SvgXStroke, {
1064
+ }, props), React__namespace.default.createElement(SvgXStroke, {
1086
1065
  role: "img",
1087
1066
  "aria-label": label
1088
1067
  }));
@@ -1090,7 +1069,7 @@ const GlobalAlertClose = React.forwardRef((props, ref) => {
1090
1069
  GlobalAlertClose.displayName = 'GlobalAlert.Close';
1091
1070
 
1092
1071
  const GlobalAlertContent = React.forwardRef((props, ref) => {
1093
- return React__default["default"].createElement(StyledGlobalAlertContent, _extends$6({
1072
+ return React__namespace.default.createElement(StyledGlobalAlertContent, _extends$6({
1094
1073
  ref: ref
1095
1074
  }, props));
1096
1075
  });
@@ -1100,14 +1079,14 @@ const GlobalAlertTitle = React.forwardRef((props, ref) => {
1100
1079
  const {
1101
1080
  type
1102
1081
  } = useGlobalAlertContext();
1103
- return React__default["default"].createElement(StyledGlobalAlertTitle, _extends$6({
1082
+ return React__namespace.default.createElement(StyledGlobalAlertTitle, _extends$6({
1104
1083
  alertType: type,
1105
1084
  ref: ref
1106
1085
  }, props));
1107
1086
  });
1108
1087
  GlobalAlertTitle.displayName = 'GlobalAlert.Title';
1109
1088
  GlobalAlertTitle.propTypes = {
1110
- isRegular: PropTypes__default["default"].bool
1089
+ isRegular: PropTypes__default.default.bool
1111
1090
  };
1112
1091
 
1113
1092
  const GlobalAlertComponent = React.forwardRef((_ref, ref) => {
@@ -1115,19 +1094,19 @@ const GlobalAlertComponent = React.forwardRef((_ref, ref) => {
1115
1094
  type,
1116
1095
  ...props
1117
1096
  } = _ref;
1118
- return React__default["default"].createElement(GlobalAlertContext.Provider, {
1097
+ return React__namespace.default.createElement(GlobalAlertContext.Provider, {
1119
1098
  value: React.useMemo(() => ({
1120
1099
  type
1121
1100
  }), [type])
1122
- }, React__default["default"].createElement(StyledGlobalAlert, _extends$6({
1101
+ }, React__namespace.default.createElement(StyledGlobalAlert, _extends$6({
1123
1102
  ref: ref,
1124
1103
  role: "status",
1125
1104
  alertType: type
1126
1105
  }, props), {
1127
- success: React__default["default"].createElement(StyledGlobalAlertIcon, null, React__default["default"].createElement(SvgCheckCircleStroke, null)),
1128
- error: React__default["default"].createElement(StyledGlobalAlertIcon, null, React__default["default"].createElement(SvgAlertErrorStroke, null)),
1129
- warning: React__default["default"].createElement(StyledGlobalAlertIcon, null, React__default["default"].createElement(SvgAlertWarningStroke, null)),
1130
- info: React__default["default"].createElement(StyledGlobalAlertIcon, null, React__default["default"].createElement(SvgInfoStroke, null))
1106
+ success: React__namespace.default.createElement(StyledGlobalAlertIcon, null, React__namespace.default.createElement(SvgCheckCircleStroke, null)),
1107
+ error: React__namespace.default.createElement(StyledGlobalAlertIcon, null, React__namespace.default.createElement(SvgAlertErrorStroke, null)),
1108
+ warning: React__namespace.default.createElement(StyledGlobalAlertIcon, null, React__namespace.default.createElement(SvgAlertWarningStroke, null)),
1109
+ info: React__namespace.default.createElement(StyledGlobalAlertIcon, null, React__namespace.default.createElement(SvgInfoStroke, null))
1131
1110
  }[type], props.children));
1132
1111
  });
1133
1112
  GlobalAlertComponent.displayName = 'GlobalAlert';
@@ -1137,7 +1116,7 @@ GlobalAlert.Close = GlobalAlertClose;
1137
1116
  GlobalAlert.Content = GlobalAlertContent;
1138
1117
  GlobalAlert.Title = GlobalAlertTitle;
1139
1118
  GlobalAlert.propTypes = {
1140
- type: PropTypes__default["default"].oneOf(TYPE).isRequired
1119
+ type: PropTypes__default.default.oneOf(TYPE).isRequired
1141
1120
  };
1142
1121
 
1143
1122
  exports.Alert = Alert;
package/dist/index.esm.js CHANGED
@@ -35,7 +35,7 @@ const TYPE = ['success', 'warning', 'error', 'info'];
35
35
  const COMPONENT_ID$b = 'notifications.close';
36
36
  const StyledClose = styled.button.attrs({
37
37
  'data-garden-id': COMPONENT_ID$b,
38
- 'data-garden-version': '8.62.1'
38
+ 'data-garden-version': '8.63.0'
39
39
  }).withConfig({
40
40
  displayName: "StyledClose",
41
41
  componentId: "sc-1mr9nx1-0"
@@ -47,7 +47,7 @@ StyledClose.defaultProps = {
47
47
  const COMPONENT_ID$a = 'notifications.paragraph';
48
48
  const StyledParagraph = styled.p.attrs({
49
49
  'data-garden-id': COMPONENT_ID$a,
50
- 'data-garden-version': '8.62.1'
50
+ 'data-garden-version': '8.63.0'
51
51
  }).withConfig({
52
52
  displayName: "StyledParagraph",
53
53
  componentId: "sc-12tmd6p-0"
@@ -59,7 +59,7 @@ StyledParagraph.defaultProps = {
59
59
  const COMPONENT_ID$9 = 'notifications.title';
60
60
  const StyledTitle = styled.div.attrs({
61
61
  'data-garden-id': COMPONENT_ID$9,
62
- 'data-garden-version': '8.62.1'
62
+ 'data-garden-version': '8.63.0'
63
63
  }).withConfig({
64
64
  displayName: "StyledTitle",
65
65
  componentId: "sc-xx4jsv-0"
@@ -116,7 +116,7 @@ const COMPONENT_ID$8 = 'notifications.alert';
116
116
  const colorStyles$5 = props => css(["", "{color:", ";}"], StyledTitle, props.hue && getColor(props.hue, 800, props.theme));
117
117
  const StyledAlert = styled(StyledBase).attrs(props => ({
118
118
  'data-garden-id': COMPONENT_ID$8,
119
- 'data-garden-version': '8.62.1',
119
+ 'data-garden-version': '8.63.0',
120
120
  role: props.role === undefined ? 'alert' : props.role
121
121
  })).withConfig({
122
122
  displayName: "StyledAlert",
@@ -163,7 +163,7 @@ const colorStyles$4 = props => {
163
163
  };
164
164
  const StyledNotification = styled(StyledBase).attrs(props => ({
165
165
  'data-garden-id': COMPONENT_ID$7,
166
- 'data-garden-version': '8.62.1',
166
+ 'data-garden-version': '8.63.0',
167
167
  role: props.role === undefined ? 'status' : props.role
168
168
  })).withConfig({
169
169
  displayName: "StyledNotification",
@@ -179,7 +179,7 @@ StyledNotification.defaultProps = {
179
179
  const COMPONENT_ID$6 = 'notifications.well';
180
180
  const StyledWell = styled(StyledBase).attrs({
181
181
  'data-garden-id': COMPONENT_ID$6,
182
- 'data-garden-version': '8.62.1'
182
+ 'data-garden-version': '8.63.0'
183
183
  }).withConfig({
184
184
  displayName: "StyledWell",
185
185
  componentId: "sc-a5831c-0"
@@ -259,7 +259,7 @@ const sizeStyles$3 = props => {
259
259
  };
260
260
  const StyledGlobalAlert = styled.div.attrs({
261
261
  'data-garden-id': COMPONENT_ID$5,
262
- 'data-garden-version': '8.62.1'
262
+ 'data-garden-version': '8.63.0'
263
263
  }).withConfig({
264
264
  displayName: "StyledGlobalAlert",
265
265
  componentId: "sc-k6rimt-0"
@@ -315,7 +315,7 @@ const sizeStyles$2 = props => {
315
315
  };
316
316
  const StyledGlobalAlertClose = styled(IconButton).attrs({
317
317
  'data-garden-id': COMPONENT_ID$4,
318
- 'data-garden-version': '8.62.1',
318
+ 'data-garden-version': '8.63.0',
319
319
  size: 'small'
320
320
  }).withConfig({
321
321
  displayName: "StyledGlobalAlertClose",
@@ -366,7 +366,7 @@ function sizeStyles$1(props) {
366
366
  }
367
367
  const StyledGlobalAlertButton = styled(Button).attrs({
368
368
  'data-garden-id': COMPONENT_ID$3,
369
- 'data-garden-version': '8.62.1',
369
+ 'data-garden-version': '8.63.0',
370
370
  focusInset: false,
371
371
  isDanger: false,
372
372
  isLink: false,
@@ -385,7 +385,7 @@ StyledGlobalAlertButton.defaultProps = {
385
385
  const COMPONENT_ID$2 = 'notifications.global-alert.content';
386
386
  const StyledGlobalAlertContent = styled.div.attrs({
387
387
  'data-garden-id': COMPONENT_ID$2,
388
- 'data-garden-version': '8.62.1'
388
+ 'data-garden-version': '8.63.0'
389
389
  }).withConfig({
390
390
  displayName: "StyledGlobalAlertContent",
391
391
  componentId: "sc-rept0u-0"
@@ -409,7 +409,7 @@ const StyledGlobalAlertIcon = styled(_ref => {
409
409
  return React__default.cloneElement(Children.only(children), props);
410
410
  }).attrs({
411
411
  'data-garden-id': COMPONENT_ID$1,
412
- 'data-garden-version': '8.62.1'
412
+ 'data-garden-version': '8.63.0'
413
413
  }).withConfig({
414
414
  displayName: "StyledGlobalAlertIcon",
415
415
  componentId: "sc-84ne9k-0"
@@ -437,7 +437,7 @@ const colorStyles = props => {
437
437
  };
438
438
  const StyledGlobalAlertTitle = styled.div.attrs({
439
439
  'data-garden-id': COMPONENT_ID,
440
- 'data-garden-version': '8.62.1'
440
+ 'data-garden-version': '8.63.0'
441
441
  }).withConfig({
442
442
  displayName: "StyledGlobalAlertTitle",
443
443
  componentId: "sc-10clqbo-0"
@@ -447,9 +447,7 @@ StyledGlobalAlertTitle.defaultProps = {
447
447
  };
448
448
 
449
449
  var _g$2, _circle$2;
450
-
451
450
  function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
452
-
453
451
  var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
454
452
  return /*#__PURE__*/React.createElement("svg", _extends$5({
455
453
  xmlns: "http://www.w3.org/2000/svg",
@@ -457,8 +455,7 @@ var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
457
455
  height: 16,
458
456
  focusable: "false",
459
457
  viewBox: "0 0 16 16",
460
- "aria-hidden": "true",
461
- role: "img"
458
+ "aria-hidden": "true"
462
459
  }, props), _g$2 || (_g$2 = /*#__PURE__*/React.createElement("g", {
463
460
  fill: "none",
464
461
  stroke: "currentColor"
@@ -478,9 +475,7 @@ var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
478
475
  };
479
476
 
480
477
  var _g$1;
481
-
482
478
  function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
483
-
484
479
  var SvgCheckCircleStroke = function SvgCheckCircleStroke(props) {
485
480
  return /*#__PURE__*/React.createElement("svg", _extends$4({
486
481
  xmlns: "http://www.w3.org/2000/svg",
@@ -488,8 +483,7 @@ var SvgCheckCircleStroke = function SvgCheckCircleStroke(props) {
488
483
  height: 16,
489
484
  focusable: "false",
490
485
  viewBox: "0 0 16 16",
491
- "aria-hidden": "true",
492
- role: "img"
486
+ "aria-hidden": "true"
493
487
  }, props), _g$1 || (_g$1 = /*#__PURE__*/React.createElement("g", {
494
488
  fill: "none",
495
489
  stroke: "currentColor"
@@ -505,9 +499,7 @@ var SvgCheckCircleStroke = function SvgCheckCircleStroke(props) {
505
499
  };
506
500
 
507
501
  var _path$2, _circle$1;
508
-
509
502
  function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
510
-
511
503
  var SvgAlertWarningStroke = function SvgAlertWarningStroke(props) {
512
504
  return /*#__PURE__*/React.createElement("svg", _extends$3({
513
505
  xmlns: "http://www.w3.org/2000/svg",
@@ -515,8 +507,7 @@ var SvgAlertWarningStroke = function SvgAlertWarningStroke(props) {
515
507
  height: 16,
516
508
  focusable: "false",
517
509
  viewBox: "0 0 16 16",
518
- "aria-hidden": "true",
519
- role: "img"
510
+ "aria-hidden": "true"
520
511
  }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
521
512
  fill: "none",
522
513
  stroke: "currentColor",
@@ -531,9 +522,7 @@ var SvgAlertWarningStroke = function SvgAlertWarningStroke(props) {
531
522
  };
532
523
 
533
524
  var _g, _circle;
534
-
535
525
  function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
536
-
537
526
  var SvgInfoStroke = function SvgInfoStroke(props) {
538
527
  return /*#__PURE__*/React.createElement("svg", _extends$2({
539
528
  xmlns: "http://www.w3.org/2000/svg",
@@ -541,8 +530,7 @@ var SvgInfoStroke = function SvgInfoStroke(props) {
541
530
  height: 16,
542
531
  focusable: "false",
543
532
  viewBox: "0 0 16 16",
544
- "aria-hidden": "true",
545
- role: "img"
533
+ "aria-hidden": "true"
546
534
  }, props), _g || (_g = /*#__PURE__*/React.createElement("g", {
547
535
  stroke: "currentColor"
548
536
  }, /*#__PURE__*/React.createElement("circle", {
@@ -622,9 +610,7 @@ Well.propTypes = {
622
610
  };
623
611
 
624
612
  var _path$1;
625
-
626
613
  function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
627
-
628
614
  var SvgXStroke$1 = function SvgXStroke(props) {
629
615
  return /*#__PURE__*/React.createElement("svg", _extends$1({
630
616
  xmlns: "http://www.w3.org/2000/svg",
@@ -632,8 +618,7 @@ var SvgXStroke$1 = function SvgXStroke(props) {
632
618
  height: 12,
633
619
  focusable: "false",
634
620
  viewBox: "0 0 12 12",
635
- "aria-hidden": "true",
636
- role: "img"
621
+ "aria-hidden": "true"
637
622
  }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
638
623
  stroke: "currentColor",
639
624
  strokeLinecap: "round",
@@ -857,7 +842,7 @@ const placementStyles = props => {
857
842
  const bottomLeftStyles = css(["bottom:", ";left:", ";"], verticalDistance, horizontalDistance);
858
843
  const bottomStyles = css(["bottom:", ";left:50%;transform:translate(-50%,0);"], verticalDistance);
859
844
  const bottomRightStyles = css(["right:", ";bottom:", ";"], horizontalDistance, verticalDistance);
860
- switch (props.$placement) {
845
+ switch (props.toastPlacement) {
861
846
  case 'top-start':
862
847
  if (props.theme.rtl) {
863
848
  return topRightStyles;
@@ -886,11 +871,11 @@ const placementStyles = props => {
886
871
  return '';
887
872
  }
888
873
  };
889
- const StyledTransitionGroup = styled(TransitionGroup).withConfig({
890
- displayName: "styled__StyledTransitionGroup",
874
+ const StyledTransitionContainer = styled.div.withConfig({
875
+ displayName: "styled__StyledTransitionContainer",
891
876
  componentId: "sc-nq0usb-1"
892
- })(["position:fixed;z-index:", ";", ";"], props => props.$zIndex, placementStyles);
893
- StyledTransitionGroup.defaultProps = {
877
+ })(["position:fixed;z-index:", ";", ";"], props => props.toastZIndex, placementStyles);
878
+ StyledTransitionContainer.defaultProps = {
894
879
  theme: DEFAULT_THEME
895
880
  };
896
881
 
@@ -934,13 +919,13 @@ const ToastSlot = _ref => {
934
919
  }
935
920
  return index >= limit;
936
921
  }, [limit, placement, toasts.length]);
937
- return React__default.createElement(StyledTransitionGroup, _extends$6({
922
+ return React__default.createElement(StyledTransitionContainer, _extends$6({
938
923
  key: placement,
939
- $placement: placement,
940
- $zIndex: zIndex,
924
+ toastPlacement: placement,
925
+ toastZIndex: zIndex,
941
926
  onMouseEnter: handleMouseEnter,
942
927
  onMouseLeave: handleMouseLeave
943
- }, props), toasts.map((toast, index) => {
928
+ }, props), React__default.createElement(TransitionGroup, null, toasts.map((toast, index) => {
944
929
  const transitionRef = React__default.createRef();
945
930
  return React__default.createElement(CSSTransition, {
946
931
  key: toast.id,
@@ -959,7 +944,7 @@ const ToastSlot = _ref => {
959
944
  toast: toast,
960
945
  pauseTimers: pauseTimers || isHidden(index)
961
946
  })));
962
- }));
947
+ })));
963
948
  };
964
949
 
965
950
  const ToastProvider = _ref => {
@@ -1027,9 +1012,7 @@ GlobalAlertButton.propTypes = {
1027
1012
  };
1028
1013
 
1029
1014
  var _path;
1030
-
1031
1015
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1032
-
1033
1016
  var SvgXStroke = function SvgXStroke(props) {
1034
1017
  return /*#__PURE__*/React.createElement("svg", _extends({
1035
1018
  xmlns: "http://www.w3.org/2000/svg",
@@ -1037,8 +1020,7 @@ var SvgXStroke = function SvgXStroke(props) {
1037
1020
  height: 16,
1038
1021
  focusable: "false",
1039
1022
  viewBox: "0 0 16 16",
1040
- "aria-hidden": "true",
1041
- role: "img"
1023
+ "aria-hidden": "true"
1042
1024
  }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
1043
1025
  stroke: "currentColor",
1044
1026
  strokeLinecap: "round",
@@ -5,6 +5,10 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import React from 'react';
8
+ /**
9
+ * 1. role='img' on `svg` is valid WAI-ARIA usage in this context.
10
+ * https://dequeuniversity.com/rules/axe/4.2/svg-img-alt
11
+ */
8
12
  /**
9
13
  * @extends ButtonHTMLAttributes<HTMLButtonElement>
10
14
  */
@@ -5,6 +5,6 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import { IGlobalAlertProps } from '../../types';
8
- export declare type GlobalAlertContextProps = Pick<IGlobalAlertProps, 'type'>;
8
+ export type GlobalAlertContextProps = Pick<IGlobalAlertProps, 'type'>;
9
9
  export declare const GlobalAlertContext: import("react").Context<GlobalAlertContextProps>;
10
10
  export declare const useGlobalAlertContext: () => GlobalAlertContextProps;
@@ -8,7 +8,7 @@ import { Content, IToast, IToastOptions } from './useToast';
8
8
  export interface IToasterState {
9
9
  toasts: IToast[];
10
10
  }
11
- export declare type ToasterReducerAction = {
11
+ export type ToasterReducerAction = {
12
12
  type: 'ADD_TOAST';
13
13
  payload: IToast;
14
14
  } | {
@@ -5,16 +5,15 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import { DefaultTheme } from 'styled-components';
8
- import { TransitionGroup } from 'react-transition-group';
9
8
  import { Placement } from '../../types';
10
9
  export declare const TRANSITION_CLASS = "garden-toast-transition";
11
10
  export declare const StyledFadeInTransition: import("styled-components").StyledComponent<"div", DefaultTheme, {
12
11
  isHidden: boolean;
13
12
  placement: Placement;
14
13
  }, never>;
15
- interface IStyledTransitionGroupProps {
16
- $placement: Placement;
17
- $zIndex?: number;
14
+ interface IStyledTransitionContainerProps {
15
+ toastPlacement: Placement;
16
+ toastZIndex?: number;
18
17
  }
19
- export declare const StyledTransitionGroup: import("styled-components").StyledComponent<typeof TransitionGroup, DefaultTheme, IStyledTransitionGroupProps, never>;
18
+ export declare const StyledTransitionContainer: import("styled-components").StyledComponent<"div", DefaultTheme, IStyledTransitionContainerProps, never>;
20
19
  export {};
@@ -14,7 +14,7 @@ export interface IToastOptions {
14
14
  /** Adjusts the placement of the toast content */
15
15
  placement: Placement;
16
16
  }
17
- export declare type Content = ({ close }: {
17
+ export type Content = ({ close }: {
18
18
  close: () => void;
19
19
  }) => ReactElement;
20
20
  export interface IToast {
@@ -8,8 +8,8 @@ import { HTMLAttributes, ButtonHTMLAttributes } from 'react';
8
8
  import { IButtonProps } from '@zendeskgarden/react-buttons';
9
9
  export declare const PLACEMENT: readonly ["top-start", "top", "top-end", "bottom-start", "bottom", "bottom-end"];
10
10
  export declare const TYPE: readonly ["success", "warning", "error", "info"];
11
- export declare type Placement = typeof PLACEMENT[number];
12
- export declare type Type = typeof TYPE[number];
11
+ export type Placement = (typeof PLACEMENT)[number];
12
+ export type Type = (typeof TYPE)[number];
13
13
  export interface IAlertProps extends HTMLAttributes<HTMLDivElement> {
14
14
  /** Applies alert type styles */
15
15
  type: Type;
@@ -4,6 +4,6 @@
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
- export declare type Hue = 'successHue' | 'warningHue' | 'dangerHue' | 'neutralHue';
7
+ export type Hue = 'successHue' | 'warningHue' | 'dangerHue' | 'neutralHue';
8
8
  export declare const NotificationsContext: import("react").Context<Hue | undefined>;
9
9
  export declare const useNotificationsContext: () => Hue | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-notifications",
3
- "version": "8.62.1",
3
+ "version": "8.63.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>",
@@ -21,7 +21,7 @@
21
21
  "sideEffects": false,
22
22
  "types": "dist/typings/index.d.ts",
23
23
  "dependencies": {
24
- "@zendeskgarden/react-buttons": "^8.62.1",
24
+ "@zendeskgarden/react-buttons": "^8.63.0",
25
25
  "polished": "^4.1.1",
26
26
  "prop-types": "^15.5.7",
27
27
  "react-transition-group": "^4.4.2",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/react-transition-group": "4.4.5",
38
- "@zendeskgarden/react-theming": "^8.62.1",
38
+ "@zendeskgarden/react-theming": "^8.63.0",
39
39
  "@zendeskgarden/svg-icons": "6.33.0"
40
40
  },
41
41
  "keywords": [
@@ -48,5 +48,5 @@
48
48
  "access": "public"
49
49
  },
50
50
  "zendeskgarden:src": "src/index.ts",
51
- "gitHead": "e84b3603c69975dc0ef30029364da15fc1e4fc03"
51
+ "gitHead": "4b8715305a769881b143c7195c5b31e687422926"
52
52
  }