@zendeskgarden/react-notifications 9.0.0-next.20 → 9.0.0-next.22

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.
Files changed (39) hide show
  1. package/dist/esm/elements/Close.js +40 -0
  2. package/dist/esm/elements/Notification.js +3 -3
  3. package/dist/esm/elements/Paragraph.js +28 -0
  4. package/dist/esm/elements/{Well.js → Title.js} +8 -20
  5. package/dist/esm/elements/alert/Alert.js +56 -0
  6. package/dist/esm/elements/{content → alert}/Close.js +1 -1
  7. package/dist/esm/elements/{content → alert}/Paragraph.js +1 -1
  8. package/dist/esm/elements/{content → alert}/Title.js +1 -1
  9. package/dist/esm/elements/well/Well.js +47 -0
  10. package/dist/esm/index.js +5 -5
  11. package/dist/esm/styled/StyledAlert.js +1 -1
  12. package/dist/esm/styled/StyledBase.js +1 -1
  13. package/dist/esm/styled/StyledIcon.js +1 -1
  14. package/dist/esm/styled/StyledNotification.js +1 -1
  15. package/dist/esm/styled/StyledWell.js +1 -1
  16. package/dist/esm/styled/content/StyledClose.js +1 -1
  17. package/dist/esm/styled/content/StyledParagraph.js +1 -1
  18. package/dist/esm/styled/content/StyledTitle.js +1 -1
  19. package/dist/esm/styled/global-alert/StyledGlobalAlert.js +1 -1
  20. package/dist/esm/styled/global-alert/StyledGlobalAlertButton.js +1 -1
  21. package/dist/esm/styled/global-alert/StyledGlobalAlertClose.js +1 -1
  22. package/dist/esm/styled/global-alert/StyledGlobalAlertContent.js +1 -1
  23. package/dist/esm/styled/global-alert/StyledGlobalAlertIcon.js +1 -1
  24. package/dist/esm/styled/global-alert/StyledGlobalAlertTitle.js +1 -1
  25. package/dist/index.cjs.js +55 -24
  26. package/dist/typings/elements/Notification.d.ts +3 -3
  27. package/dist/typings/elements/{content/Title.d.ts → Title.d.ts} +1 -1
  28. package/dist/typings/elements/{Alert.d.ts → alert/Alert.d.ts} +4 -4
  29. package/dist/typings/elements/alert/Close.d.ts +11 -0
  30. package/dist/typings/elements/alert/Paragraph.d.ts +11 -0
  31. package/dist/typings/elements/alert/Title.d.ts +12 -0
  32. package/dist/typings/elements/well/Paragraph.d.ts +11 -0
  33. package/dist/typings/elements/well/Title.d.ts +12 -0
  34. package/dist/typings/elements/{Well.d.ts → well/Well.d.ts} +3 -3
  35. package/dist/typings/index.d.ts +5 -5
  36. package/package.json +4 -4
  37. package/dist/esm/elements/Alert.js +0 -56
  38. /package/dist/typings/elements/{content/Close.d.ts → Close.d.ts} +0 -0
  39. /package/dist/typings/elements/{content/Paragraph.d.ts → Paragraph.d.ts} +0 -0
@@ -0,0 +1,40 @@
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 React__default from 'react';
8
+ import { StyledClose } from '../styled/content/StyledClose.js';
9
+ import '../styled/content/StyledParagraph.js';
10
+ import '../styled/content/StyledTitle.js';
11
+ import '../styled/StyledAlert.js';
12
+ import '../styled/StyledNotification.js';
13
+ import '../styled/StyledWell.js';
14
+ import '../styled/StyledIcon.js';
15
+ import '../styled/StyledBase.js';
16
+ import '../styled/global-alert/StyledGlobalAlert.js';
17
+ import '../styled/global-alert/StyledGlobalAlertButton.js';
18
+ import '../styled/global-alert/StyledGlobalAlertClose.js';
19
+ import '../styled/global-alert/StyledGlobalAlertContent.js';
20
+ import '../styled/global-alert/StyledGlobalAlertIcon.js';
21
+ import '../styled/global-alert/StyledGlobalAlertTitle.js';
22
+ import { useNotificationsContext } from '../utils/useNotificationsContext.js';
23
+ import { useText } from '@zendeskgarden/react-theming';
24
+ import SvgXStroke from '../node_modules/@zendeskgarden/svg-icons/src/16/x-stroke.svg.js';
25
+
26
+ const Close = React__default.forwardRef((props, ref) => {
27
+ const ariaLabel = useText(Close, props, 'aria-label', 'Close');
28
+ const type = useNotificationsContext();
29
+ return React__default.createElement(StyledClose, Object.assign({
30
+ ref: ref,
31
+ $type: type,
32
+ "aria-label": ariaLabel
33
+ }, props, {
34
+ focusInset: true,
35
+ size: "small"
36
+ }), React__default.createElement(SvgXStroke, null));
37
+ });
38
+ Close.displayName = 'Notification.Close';
39
+
40
+ export { Close };
@@ -23,9 +23,9 @@ import '../styled/global-alert/StyledGlobalAlertContent.js';
23
23
  import '../styled/global-alert/StyledGlobalAlertIcon.js';
24
24
  import '../styled/global-alert/StyledGlobalAlertTitle.js';
25
25
  import { validationIcons } from '../utils/icons.js';
26
- import { Title } from './content/Title.js';
27
- import { Paragraph } from './content/Paragraph.js';
28
- import { Close } from './content/Close.js';
26
+ import { Title } from './Title.js';
27
+ import { Paragraph } from './Paragraph.js';
28
+ import { Close } from './Close.js';
29
29
 
30
30
  const NotificationComponent = forwardRef((_ref, ref) => {
31
31
  let {
@@ -0,0 +1,28 @@
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 React__default from 'react';
8
+ import '../styled/content/StyledClose.js';
9
+ import { StyledParagraph } from '../styled/content/StyledParagraph.js';
10
+ import '../styled/content/StyledTitle.js';
11
+ import '../styled/StyledAlert.js';
12
+ import '../styled/StyledNotification.js';
13
+ import '../styled/StyledWell.js';
14
+ import '../styled/StyledIcon.js';
15
+ import '../styled/StyledBase.js';
16
+ import '../styled/global-alert/StyledGlobalAlert.js';
17
+ import '../styled/global-alert/StyledGlobalAlertButton.js';
18
+ import '../styled/global-alert/StyledGlobalAlertClose.js';
19
+ import '../styled/global-alert/StyledGlobalAlertContent.js';
20
+ import '../styled/global-alert/StyledGlobalAlertIcon.js';
21
+ import '../styled/global-alert/StyledGlobalAlertTitle.js';
22
+
23
+ const Paragraph = React__default.forwardRef((props, ref) => React__default.createElement(StyledParagraph, Object.assign({
24
+ ref: ref
25
+ }, props)));
26
+ Paragraph.displayName = 'Notification.Paragraph';
27
+
28
+ export { Paragraph };
@@ -5,13 +5,12 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import React__default from 'react';
8
- import PropTypes from 'prop-types';
9
8
  import '../styled/content/StyledClose.js';
10
9
  import '../styled/content/StyledParagraph.js';
11
- import '../styled/content/StyledTitle.js';
10
+ import { StyledTitle } from '../styled/content/StyledTitle.js';
12
11
  import '../styled/StyledAlert.js';
13
12
  import '../styled/StyledNotification.js';
14
- import { StyledWell } from '../styled/StyledWell.js';
13
+ import '../styled/StyledWell.js';
15
14
  import '../styled/StyledIcon.js';
16
15
  import '../styled/StyledBase.js';
17
16
  import '../styled/global-alert/StyledGlobalAlert.js';
@@ -20,28 +19,17 @@ import '../styled/global-alert/StyledGlobalAlertClose.js';
20
19
  import '../styled/global-alert/StyledGlobalAlertContent.js';
21
20
  import '../styled/global-alert/StyledGlobalAlertIcon.js';
22
21
  import '../styled/global-alert/StyledGlobalAlertTitle.js';
23
- import { Title } from './content/Title.js';
24
- import { Paragraph } from './content/Paragraph.js';
25
22
 
26
- const WellComponent = React__default.forwardRef((_ref, ref) => {
23
+ const Title = React__default.forwardRef((_ref, ref) => {
27
24
  let {
28
- isFloating,
29
- isRecessed,
25
+ isRegular,
30
26
  ...props
31
27
  } = _ref;
32
- return React__default.createElement(StyledWell, Object.assign({
28
+ return React__default.createElement(StyledTitle, Object.assign({
33
29
  ref: ref,
34
- $isFloating: isFloating,
35
- $isRecessed: isRecessed
30
+ $isRegular: isRegular
36
31
  }, props));
37
32
  });
38
- WellComponent.displayName = 'Well';
39
- WellComponent.propTypes = {
40
- isRecessed: PropTypes.bool,
41
- isFloating: PropTypes.bool
42
- };
43
- const Well = WellComponent;
44
- Well.Paragraph = Paragraph;
45
- Well.Title = Title;
33
+ Title.displayName = 'Notification.Title';
46
34
 
47
- export { Well, WellComponent };
35
+ export { Title };
@@ -0,0 +1,56 @@
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 React__default from 'react';
8
+ import PropTypes from 'prop-types';
9
+ import { TYPE } from '../../types/index.js';
10
+ import '../../styled/content/StyledClose.js';
11
+ import '../../styled/content/StyledParagraph.js';
12
+ import '../../styled/content/StyledTitle.js';
13
+ import { StyledAlert } from '../../styled/StyledAlert.js';
14
+ import '../../styled/StyledNotification.js';
15
+ import '../../styled/StyledWell.js';
16
+ import { StyledIcon } from '../../styled/StyledIcon.js';
17
+ import '../../styled/StyledBase.js';
18
+ import '../../styled/global-alert/StyledGlobalAlert.js';
19
+ import '../../styled/global-alert/StyledGlobalAlertButton.js';
20
+ import '../../styled/global-alert/StyledGlobalAlertClose.js';
21
+ import '../../styled/global-alert/StyledGlobalAlertContent.js';
22
+ import '../../styled/global-alert/StyledGlobalAlertIcon.js';
23
+ import '../../styled/global-alert/StyledGlobalAlertTitle.js';
24
+ import { validationIcons } from '../../utils/icons.js';
25
+ import { NotificationsContext } from '../../utils/useNotificationsContext.js';
26
+ import { Title } from './Title.js';
27
+ import { Paragraph } from './Paragraph.js';
28
+ import { Close } from './Close.js';
29
+
30
+ const AlertComponent = React__default.forwardRef((_ref, ref) => {
31
+ let {
32
+ role,
33
+ type,
34
+ ...props
35
+ } = _ref;
36
+ const Icon = validationIcons[type];
37
+ return React__default.createElement(NotificationsContext.Provider, {
38
+ value: type
39
+ }, React__default.createElement(StyledAlert, Object.assign({
40
+ ref: ref,
41
+ $type: type,
42
+ role: role === undefined ? 'alert' : role
43
+ }, props), React__default.createElement(StyledIcon, {
44
+ $type: type
45
+ }, React__default.createElement(Icon, null)), props.children));
46
+ });
47
+ AlertComponent.displayName = 'Alert';
48
+ AlertComponent.propTypes = {
49
+ type: PropTypes.oneOf(TYPE).isRequired
50
+ };
51
+ const Alert = AlertComponent;
52
+ Alert.Close = Close;
53
+ Alert.Paragraph = Paragraph;
54
+ Alert.Title = Title;
55
+
56
+ export { Alert, AlertComponent };
@@ -35,6 +35,6 @@ const Close = React__default.forwardRef((props, ref) => {
35
35
  size: "small"
36
36
  }), React__default.createElement(SvgXStroke, null));
37
37
  });
38
- Close.displayName = 'Close';
38
+ Close.displayName = 'Alert.Close';
39
39
 
40
40
  export { Close };
@@ -23,6 +23,6 @@ import '../../styled/global-alert/StyledGlobalAlertTitle.js';
23
23
  const Paragraph = React__default.forwardRef((props, ref) => React__default.createElement(StyledParagraph, Object.assign({
24
24
  ref: ref
25
25
  }, props)));
26
- Paragraph.displayName = 'Paragraph';
26
+ Paragraph.displayName = 'Alert.Paragraph';
27
27
 
28
28
  export { Paragraph };
@@ -30,6 +30,6 @@ const Title = React__default.forwardRef((_ref, ref) => {
30
30
  $isRegular: isRegular
31
31
  }, props));
32
32
  });
33
- Title.displayName = 'Title';
33
+ Title.displayName = 'Alert.Title';
34
34
 
35
35
  export { Title };
@@ -0,0 +1,47 @@
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 React__default from 'react';
8
+ import PropTypes from 'prop-types';
9
+ import '../../styled/content/StyledClose.js';
10
+ import '../../styled/content/StyledParagraph.js';
11
+ import '../../styled/content/StyledTitle.js';
12
+ import '../../styled/StyledAlert.js';
13
+ import '../../styled/StyledNotification.js';
14
+ import { StyledWell } from '../../styled/StyledWell.js';
15
+ import '../../styled/StyledIcon.js';
16
+ import '../../styled/StyledBase.js';
17
+ import '../../styled/global-alert/StyledGlobalAlert.js';
18
+ import '../../styled/global-alert/StyledGlobalAlertButton.js';
19
+ import '../../styled/global-alert/StyledGlobalAlertClose.js';
20
+ import '../../styled/global-alert/StyledGlobalAlertContent.js';
21
+ import '../../styled/global-alert/StyledGlobalAlertIcon.js';
22
+ import '../../styled/global-alert/StyledGlobalAlertTitle.js';
23
+ import { Title } from '../Title.js';
24
+ import { Paragraph } from '../Paragraph.js';
25
+
26
+ const WellComponent = React__default.forwardRef((_ref, ref) => {
27
+ let {
28
+ isFloating,
29
+ isRecessed,
30
+ ...props
31
+ } = _ref;
32
+ return React__default.createElement(StyledWell, Object.assign({
33
+ ref: ref,
34
+ $isFloating: isFloating,
35
+ $isRecessed: isRecessed
36
+ }, props));
37
+ });
38
+ WellComponent.displayName = 'Well';
39
+ WellComponent.propTypes = {
40
+ isRecessed: PropTypes.bool,
41
+ isFloating: PropTypes.bool
42
+ };
43
+ const Well = WellComponent;
44
+ Well.Paragraph = Paragraph;
45
+ Well.Title = Title;
46
+
47
+ export { Well, WellComponent };
package/dist/esm/index.js CHANGED
@@ -4,12 +4,12 @@
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 { Alert } from './elements/Alert.js';
7
+ export { Alert } from './elements/alert/Alert.js';
8
8
  export { Notification } from './elements/Notification.js';
9
- export { Well } from './elements/Well.js';
10
- export { Close } from './elements/content/Close.js';
11
- export { Paragraph } from './elements/content/Paragraph.js';
12
- export { Title } from './elements/content/Title.js';
9
+ export { Well } from './elements/well/Well.js';
10
+ export { Close } from './elements/Close.js';
11
+ export { Paragraph } from './elements/Paragraph.js';
12
+ export { Title } from './elements/Title.js';
13
13
  export { ToastProvider } from './elements/toaster/ToastProvider.js';
14
14
  export { useToast } from './elements/toaster/useToast.js';
15
15
  export { GlobalAlert } from './elements/global-alert/GlobalAlert.js';
@@ -39,7 +39,7 @@ const colorStyles = props => {
39
39
  };
40
40
  const StyledAlert = styled(StyledBase).attrs({
41
41
  'data-garden-id': COMPONENT_ID,
42
- 'data-garden-version': '9.0.0-next.20'
42
+ 'data-garden-version': '9.0.0-next.22'
43
43
  }).withConfig({
44
44
  displayName: "StyledAlert",
45
45
  componentId: "sc-fyn8jp-0"
@@ -80,7 +80,7 @@ const padding = props => {
80
80
  };
81
81
  const StyledBase = styled.div.attrs({
82
82
  'data-garden-id': COMPONENT_ID,
83
- 'data-garden-version': '9.0.0-next.20'
83
+ 'data-garden-version': '9.0.0-next.22'
84
84
  }).withConfig({
85
85
  displayName: "StyledBase",
86
86
  componentId: "sc-14syaqw-0"
@@ -49,7 +49,7 @@ const colorStyles = _ref2 => {
49
49
  };
50
50
  const StyledIcon = styled(StyledBaseIcon).attrs({
51
51
  'data-garden-id': COMPONENT_ID,
52
- 'data-garden-version': '9.0.0-next.20'
52
+ 'data-garden-version': '9.0.0-next.22'
53
53
  }).withConfig({
54
54
  displayName: "StyledIcon",
55
55
  componentId: "sc-msklws-0"
@@ -41,7 +41,7 @@ const colorStyles = props => {
41
41
  };
42
42
  const StyledNotification = styled(StyledBase).attrs({
43
43
  'data-garden-id': COMPONENT_ID,
44
- 'data-garden-version': '9.0.0-next.20'
44
+ 'data-garden-version': '9.0.0-next.22'
45
45
  }).withConfig({
46
46
  displayName: "StyledNotification",
47
47
  componentId: "sc-uf6jh-0"
@@ -35,7 +35,7 @@ const colorStyles = _ref => {
35
35
  };
36
36
  const StyledWell = styled(StyledBase).attrs({
37
37
  'data-garden-id': COMPONENT_ID,
38
- 'data-garden-version': '9.0.0-next.20'
38
+ 'data-garden-version': '9.0.0-next.22'
39
39
  }).withConfig({
40
40
  displayName: "StyledWell",
41
41
  componentId: "sc-a5831c-0"
@@ -58,7 +58,7 @@ const colorStyles = _ref => {
58
58
  };
59
59
  const StyledClose = styled(IconButton).attrs({
60
60
  'data-garden-id': COMPONENT_ID,
61
- 'data-garden-version': '9.0.0-next.20'
61
+ 'data-garden-version': '9.0.0-next.22'
62
62
  }).withConfig({
63
63
  displayName: "StyledClose",
64
64
  componentId: "sc-1mr9nx1-0"
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
10
10
  const COMPONENT_ID = 'notifications.paragraph';
11
11
  const StyledParagraph = styled.p.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.0.0-next.20'
13
+ 'data-garden-version': '9.0.0-next.22'
14
14
  }).withConfig({
15
15
  displayName: "StyledParagraph",
16
16
  componentId: "sc-12tmd6p-0"
@@ -10,7 +10,7 @@ import { getColor, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden
10
10
  const COMPONENT_ID = 'notifications.title';
11
11
  const StyledTitle = styled.div.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.0.0-next.20'
13
+ 'data-garden-version': '9.0.0-next.22'
14
14
  }).withConfig({
15
15
  displayName: "StyledTitle",
16
16
  componentId: "sc-xx4jsv-0"
@@ -148,7 +148,7 @@ const sizeStyles = props => {
148
148
  };
149
149
  const StyledGlobalAlert = styled.div.attrs({
150
150
  'data-garden-id': COMPONENT_ID,
151
- 'data-garden-version': '9.0.0-next.20'
151
+ 'data-garden-version': '9.0.0-next.22'
152
152
  }).withConfig({
153
153
  displayName: "StyledGlobalAlert",
154
154
  componentId: "sc-k6rimt-0"
@@ -106,7 +106,7 @@ function sizeStyles(props) {
106
106
  }
107
107
  const StyledGlobalAlertButton = styled(Button).attrs({
108
108
  'data-garden-id': COMPONENT_ID,
109
- 'data-garden-version': '9.0.0-next.20'
109
+ 'data-garden-version': '9.0.0-next.22'
110
110
  }).withConfig({
111
111
  displayName: "StyledGlobalAlertButton",
112
112
  componentId: "sc-1txe91a-0"
@@ -91,7 +91,7 @@ const sizeStyles = props => {
91
91
  };
92
92
  const StyledGlobalAlertClose = styled(IconButton).attrs({
93
93
  'data-garden-id': COMPONENT_ID,
94
- 'data-garden-version': '9.0.0-next.20'
94
+ 'data-garden-version': '9.0.0-next.22'
95
95
  }).withConfig({
96
96
  displayName: "StyledGlobalAlertClose",
97
97
  componentId: "sc-1g5s93s-0"
@@ -10,7 +10,7 @@ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-the
10
10
  const COMPONENT_ID = 'notifications.global_alert.content';
11
11
  const StyledGlobalAlertContent = styled.div.attrs({
12
12
  'data-garden-id': COMPONENT_ID,
13
- 'data-garden-version': '9.0.0-next.20'
13
+ 'data-garden-version': '9.0.0-next.22'
14
14
  }).withConfig({
15
15
  displayName: "StyledGlobalAlertContent",
16
16
  componentId: "sc-rept0u-0"
@@ -53,7 +53,7 @@ const colorStyles = _ref => {
53
53
  };
54
54
  const StyledGlobalAlertIcon = styled(StyledBaseIcon).attrs({
55
55
  'data-garden-id': COMPONENT_ID,
56
- 'data-garden-version': '9.0.0-next.20'
56
+ 'data-garden-version': '9.0.0-next.22'
57
57
  }).withConfig({
58
58
  displayName: "StyledGlobalAlertIcon",
59
59
  componentId: "sc-84ne9k-0"
@@ -37,7 +37,7 @@ const colorStyles = _ref => {
37
37
  };
38
38
  const StyledGlobalAlertTitle = styled.div.attrs({
39
39
  'data-garden-id': COMPONENT_ID,
40
- 'data-garden-version': '9.0.0-next.20'
40
+ 'data-garden-version': '9.0.0-next.22'
41
41
  }).withConfig({
42
42
  displayName: "StyledGlobalAlertTitle",
43
43
  componentId: "sc-10clqbo-0"
package/dist/index.cjs.js CHANGED
@@ -206,7 +206,7 @@ const colorStyles$a = _ref => {
206
206
  };
207
207
  const StyledClose = styled__default.default(reactButtons.IconButton).attrs({
208
208
  'data-garden-id': COMPONENT_ID$d,
209
- 'data-garden-version': '9.0.0-next.20'
209
+ 'data-garden-version': '9.0.0-next.22'
210
210
  }).withConfig({
211
211
  displayName: "StyledClose",
212
212
  componentId: "sc-1mr9nx1-0"
@@ -218,7 +218,7 @@ StyledClose.defaultProps = {
218
218
  const COMPONENT_ID$c = 'notifications.paragraph';
219
219
  const StyledParagraph = styled__default.default.p.attrs({
220
220
  'data-garden-id': COMPONENT_ID$c,
221
- 'data-garden-version': '9.0.0-next.20'
221
+ 'data-garden-version': '9.0.0-next.22'
222
222
  }).withConfig({
223
223
  displayName: "StyledParagraph",
224
224
  componentId: "sc-12tmd6p-0"
@@ -230,7 +230,7 @@ StyledParagraph.defaultProps = {
230
230
  const COMPONENT_ID$b = 'notifications.title';
231
231
  const StyledTitle = styled__default.default.div.attrs({
232
232
  'data-garden-id': COMPONENT_ID$b,
233
- 'data-garden-version': '9.0.0-next.20'
233
+ 'data-garden-version': '9.0.0-next.22'
234
234
  }).withConfig({
235
235
  displayName: "StyledTitle",
236
236
  componentId: "sc-xx4jsv-0"
@@ -314,7 +314,7 @@ const padding = props => {
314
314
  };
315
315
  const StyledBase = styled__default.default.div.attrs({
316
316
  'data-garden-id': COMPONENT_ID$a,
317
- 'data-garden-version': '9.0.0-next.20'
317
+ 'data-garden-version': '9.0.0-next.22'
318
318
  }).withConfig({
319
319
  displayName: "StyledBase",
320
320
  componentId: "sc-14syaqw-0"
@@ -352,7 +352,7 @@ const colorStyles$8 = props => {
352
352
  };
353
353
  const StyledAlert = styled__default.default(StyledBase).attrs({
354
354
  'data-garden-id': COMPONENT_ID$9,
355
- 'data-garden-version': '9.0.0-next.20'
355
+ 'data-garden-version': '9.0.0-next.22'
356
356
  }).withConfig({
357
357
  displayName: "StyledAlert",
358
358
  componentId: "sc-fyn8jp-0"
@@ -390,7 +390,7 @@ const colorStyles$7 = props => {
390
390
  };
391
391
  const StyledNotification = styled__default.default(StyledBase).attrs({
392
392
  'data-garden-id': COMPONENT_ID$8,
393
- 'data-garden-version': '9.0.0-next.20'
393
+ 'data-garden-version': '9.0.0-next.22'
394
394
  }).withConfig({
395
395
  displayName: "StyledNotification",
396
396
  componentId: "sc-uf6jh-0"
@@ -429,7 +429,7 @@ const colorStyles$6 = _ref => {
429
429
  };
430
430
  const StyledWell = styled__default.default(StyledBase).attrs({
431
431
  'data-garden-id': COMPONENT_ID$7,
432
- 'data-garden-version': '9.0.0-next.20'
432
+ 'data-garden-version': '9.0.0-next.22'
433
433
  }).withConfig({
434
434
  displayName: "StyledWell",
435
435
  componentId: "sc-a5831c-0"
@@ -479,7 +479,7 @@ const colorStyles$5 = _ref2 => {
479
479
  };
480
480
  const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
481
481
  'data-garden-id': COMPONENT_ID$6,
482
- 'data-garden-version': '9.0.0-next.20'
482
+ 'data-garden-version': '9.0.0-next.22'
483
483
  }).withConfig({
484
484
  displayName: "StyledIcon",
485
485
  componentId: "sc-msklws-0"
@@ -629,7 +629,7 @@ const sizeStyles$3 = props => {
629
629
  };
630
630
  const StyledGlobalAlert = styled__default.default.div.attrs({
631
631
  'data-garden-id': COMPONENT_ID$5,
632
- 'data-garden-version': '9.0.0-next.20'
632
+ 'data-garden-version': '9.0.0-next.22'
633
633
  }).withConfig({
634
634
  displayName: "StyledGlobalAlert",
635
635
  componentId: "sc-k6rimt-0"
@@ -721,7 +721,7 @@ const sizeStyles$2 = props => {
721
721
  };
722
722
  const StyledGlobalAlertClose = styled__default.default(reactButtons.IconButton).attrs({
723
723
  'data-garden-id': COMPONENT_ID$4,
724
- 'data-garden-version': '9.0.0-next.20'
724
+ 'data-garden-version': '9.0.0-next.22'
725
725
  }).withConfig({
726
726
  displayName: "StyledGlobalAlertClose",
727
727
  componentId: "sc-1g5s93s-0"
@@ -827,7 +827,7 @@ function sizeStyles$1(props) {
827
827
  }
828
828
  const StyledGlobalAlertButton = styled__default.default(reactButtons.Button).attrs({
829
829
  'data-garden-id': COMPONENT_ID$3,
830
- 'data-garden-version': '9.0.0-next.20'
830
+ 'data-garden-version': '9.0.0-next.22'
831
831
  }).withConfig({
832
832
  displayName: "StyledGlobalAlertButton",
833
833
  componentId: "sc-1txe91a-0"
@@ -839,7 +839,7 @@ StyledGlobalAlertButton.defaultProps = {
839
839
  const COMPONENT_ID$2 = 'notifications.global_alert.content';
840
840
  const StyledGlobalAlertContent = styled__default.default.div.attrs({
841
841
  'data-garden-id': COMPONENT_ID$2,
842
- 'data-garden-version': '9.0.0-next.20'
842
+ 'data-garden-version': '9.0.0-next.22'
843
843
  }).withConfig({
844
844
  displayName: "StyledGlobalAlertContent",
845
845
  componentId: "sc-rept0u-0"
@@ -893,7 +893,7 @@ const colorStyles$1 = _ref => {
893
893
  };
894
894
  const StyledGlobalAlertIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
895
895
  'data-garden-id': COMPONENT_ID$1,
896
- 'data-garden-version': '9.0.0-next.20'
896
+ 'data-garden-version': '9.0.0-next.22'
897
897
  }).withConfig({
898
898
  displayName: "StyledGlobalAlertIcon",
899
899
  componentId: "sc-84ne9k-0"
@@ -932,7 +932,7 @@ const colorStyles = _ref => {
932
932
  };
933
933
  const StyledGlobalAlertTitle = styled__default.default.div.attrs({
934
934
  'data-garden-id': COMPONENT_ID,
935
- 'data-garden-version': '9.0.0-next.20'
935
+ 'data-garden-version': '9.0.0-next.22'
936
936
  }).withConfig({
937
937
  displayName: "StyledGlobalAlertTitle",
938
938
  componentId: "sc-10clqbo-0"
@@ -946,7 +946,7 @@ const useNotificationsContext = () => {
946
946
  return React.useContext(NotificationsContext);
947
947
  };
948
948
 
949
- const Title = React__namespace.default.forwardRef((_ref, ref) => {
949
+ const Title$1 = React__namespace.default.forwardRef((_ref, ref) => {
950
950
  let {
951
951
  isRegular,
952
952
  ...props
@@ -956,12 +956,12 @@ const Title = React__namespace.default.forwardRef((_ref, ref) => {
956
956
  $isRegular: isRegular
957
957
  }, props));
958
958
  });
959
- Title.displayName = 'Title';
959
+ Title$1.displayName = 'Alert.Title';
960
960
 
961
- const Paragraph = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledParagraph, Object.assign({
961
+ const Paragraph$1 = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledParagraph, Object.assign({
962
962
  ref: ref
963
963
  }, props)));
964
- Paragraph.displayName = 'Paragraph';
964
+ Paragraph$1.displayName = 'Alert.Paragraph';
965
965
 
966
966
  var _path;
967
967
  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); }
@@ -980,8 +980,8 @@ var SvgXStroke = function SvgXStroke(props) {
980
980
  })));
981
981
  };
982
982
 
983
- const Close = React__namespace.default.forwardRef((props, ref) => {
984
- const ariaLabel = reactTheming.useText(Close, props, 'aria-label', 'Close');
983
+ const Close$1 = React__namespace.default.forwardRef((props, ref) => {
984
+ const ariaLabel = reactTheming.useText(Close$1, props, 'aria-label', 'Close');
985
985
  const type = useNotificationsContext();
986
986
  return React__namespace.default.createElement(StyledClose, Object.assign({
987
987
  ref: ref,
@@ -992,7 +992,7 @@ const Close = React__namespace.default.forwardRef((props, ref) => {
992
992
  size: "small"
993
993
  }), React__namespace.default.createElement(SvgXStroke, null));
994
994
  });
995
- Close.displayName = 'Close';
995
+ Close$1.displayName = 'Alert.Close';
996
996
 
997
997
  const AlertComponent = React__namespace.default.forwardRef((_ref, ref) => {
998
998
  let {
@@ -1016,9 +1016,40 @@ AlertComponent.propTypes = {
1016
1016
  type: PropTypes__default.default.oneOf(TYPE).isRequired
1017
1017
  };
1018
1018
  const Alert = AlertComponent;
1019
- Alert.Close = Close;
1020
- Alert.Paragraph = Paragraph;
1021
- Alert.Title = Title;
1019
+ Alert.Close = Close$1;
1020
+ Alert.Paragraph = Paragraph$1;
1021
+ Alert.Title = Title$1;
1022
+
1023
+ const Title = React__namespace.default.forwardRef((_ref, ref) => {
1024
+ let {
1025
+ isRegular,
1026
+ ...props
1027
+ } = _ref;
1028
+ return React__namespace.default.createElement(StyledTitle, Object.assign({
1029
+ ref: ref,
1030
+ $isRegular: isRegular
1031
+ }, props));
1032
+ });
1033
+ Title.displayName = 'Notification.Title';
1034
+
1035
+ const Paragraph = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledParagraph, Object.assign({
1036
+ ref: ref
1037
+ }, props)));
1038
+ Paragraph.displayName = 'Notification.Paragraph';
1039
+
1040
+ const Close = React__namespace.default.forwardRef((props, ref) => {
1041
+ const ariaLabel = reactTheming.useText(Close, props, 'aria-label', 'Close');
1042
+ const type = useNotificationsContext();
1043
+ return React__namespace.default.createElement(StyledClose, Object.assign({
1044
+ ref: ref,
1045
+ $type: type,
1046
+ "aria-label": ariaLabel
1047
+ }, props, {
1048
+ focusInset: true,
1049
+ size: "small"
1050
+ }), React__namespace.default.createElement(SvgXStroke, null));
1051
+ });
1052
+ Close.displayName = 'Notification.Close';
1022
1053
 
1023
1054
  const NotificationComponent = React.forwardRef((_ref, ref) => {
1024
1055
  let {
@@ -6,9 +6,9 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import { INotificationProps } from '../types';
9
- import { Title } from './content/Title';
10
- import { Paragraph } from './content/Paragraph';
11
- import { Close } from './content/Close';
9
+ import { Title } from './Title';
10
+ import { Paragraph } from './Paragraph';
11
+ import { Close } from './Close';
12
12
  export declare const NotificationComponent: React.ForwardRefExoticComponent<INotificationProps & React.RefAttributes<HTMLDivElement>>;
13
13
  /**
14
14
  * @extends HTMLAttributes<HTMLDivElement>
@@ -5,7 +5,7 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import React from 'react';
8
- import { ITitleProps } from '../../types';
8
+ import { ITitleProps } from '../types';
9
9
  /**
10
10
  * @deprecated use `Alert.Title`, `Notification.Title`, or `Well.Title` instead
11
11
  *
@@ -5,10 +5,10 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import React from 'react';
8
- import { IAlertProps } from '../types';
9
- import { Title } from './content/Title';
10
- import { Paragraph } from './content/Paragraph';
11
- import { Close } from './content/Close';
8
+ import { IAlertProps } from '../../types';
9
+ import { Title } from './Title';
10
+ import { Paragraph } from './Paragraph';
11
+ import { Close } from './Close';
12
12
  export declare const AlertComponent: React.ForwardRefExoticComponent<IAlertProps & React.RefAttributes<HTMLDivElement>>;
13
13
  /**
14
14
  * @extends HTMLAttributes<HTMLDivElement>
@@ -0,0 +1,11 @@
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 React from 'react';
8
+ /**
9
+ * @extends ButtonHTMLAttributes<HTMLButtonElement>
10
+ */
11
+ export declare const Close: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,11 @@
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 React from 'react';
8
+ /**
9
+ * @extends HTMLAttributes<HTMLParagraphElement>
10
+ */
11
+ export declare const Paragraph: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
@@ -0,0 +1,12 @@
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 React from 'react';
8
+ import { ITitleProps } from '../../types';
9
+ /**
10
+ * @extends HTMLAttributes<HTMLDivElement>
11
+ */
12
+ export declare const Title: React.ForwardRefExoticComponent<ITitleProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,11 @@
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 React from 'react';
8
+ /**
9
+ * @extends HTMLAttributes<HTMLParagraphElement>
10
+ */
11
+ export declare const Paragraph: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
@@ -0,0 +1,12 @@
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 React from 'react';
8
+ import { ITitleProps } from '../../types';
9
+ /**
10
+ * @extends HTMLAttributes<HTMLDivElement>
11
+ */
12
+ export declare const Title: React.ForwardRefExoticComponent<ITitleProps & React.RefAttributes<HTMLDivElement>>;
@@ -5,9 +5,9 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import React from 'react';
8
- import { IWellProps } from '../types';
9
- import { Title } from './content/Title';
10
- import { Paragraph } from './content/Paragraph';
8
+ import { IWellProps } from '../../types';
9
+ import { Title } from '../Title';
10
+ import { Paragraph } from '../Paragraph';
11
11
  export declare const WellComponent: React.ForwardRefExoticComponent<IWellProps & React.RefAttributes<HTMLDivElement>>;
12
12
  /**
13
13
  * @extends HTMLAttributes<HTMLDivElement>
@@ -4,12 +4,12 @@
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 { Alert } from './elements/Alert';
7
+ export { Alert } from './elements/alert/Alert';
8
8
  export { Notification } from './elements/Notification';
9
- export { Well } from './elements/Well';
10
- export { Close } from './elements/content/Close';
11
- export { Paragraph } from './elements/content/Paragraph';
12
- export { Title } from './elements/content/Title';
9
+ export { Well } from './elements/well/Well';
10
+ export { Close } from './elements/Close';
11
+ export { Paragraph } from './elements/Paragraph';
12
+ export { Title } from './elements/Title';
13
13
  export { ToastProvider } from './elements/toaster/ToastProvider';
14
14
  export { useToast, type IToastOptions, type IToast } from './elements/toaster/useToast';
15
15
  export { GlobalAlert } from './elements/global-alert/GlobalAlert';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-notifications",
3
- "version": "9.0.0-next.20",
3
+ "version": "9.0.0-next.22",
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": "^9.0.0-next.20",
24
+ "@zendeskgarden/react-buttons": "^9.0.0-next.22",
25
25
  "polished": "^4.3.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.10",
38
- "@zendeskgarden/react-theming": "^9.0.0-next.20",
38
+ "@zendeskgarden/react-theming": "^9.0.0-next.22",
39
39
  "@zendeskgarden/svg-icons": "7.1.1"
40
40
  },
41
41
  "keywords": [
@@ -48,5 +48,5 @@
48
48
  "access": "public"
49
49
  },
50
50
  "zendeskgarden:src": "src/index.ts",
51
- "gitHead": "eab087ac0d6e74b3a4489d37d067baf7a225e7a8"
51
+ "gitHead": "46309385a1495c2297da23409f4196f662fe418b"
52
52
  }
@@ -1,56 +0,0 @@
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 React__default from 'react';
8
- import PropTypes from 'prop-types';
9
- import { TYPE } from '../types/index.js';
10
- import '../styled/content/StyledClose.js';
11
- import '../styled/content/StyledParagraph.js';
12
- import '../styled/content/StyledTitle.js';
13
- import { StyledAlert } from '../styled/StyledAlert.js';
14
- import '../styled/StyledNotification.js';
15
- import '../styled/StyledWell.js';
16
- import { StyledIcon } from '../styled/StyledIcon.js';
17
- import '../styled/StyledBase.js';
18
- import '../styled/global-alert/StyledGlobalAlert.js';
19
- import '../styled/global-alert/StyledGlobalAlertButton.js';
20
- import '../styled/global-alert/StyledGlobalAlertClose.js';
21
- import '../styled/global-alert/StyledGlobalAlertContent.js';
22
- import '../styled/global-alert/StyledGlobalAlertIcon.js';
23
- import '../styled/global-alert/StyledGlobalAlertTitle.js';
24
- import { validationIcons } from '../utils/icons.js';
25
- import { NotificationsContext } from '../utils/useNotificationsContext.js';
26
- import { Title } from './content/Title.js';
27
- import { Paragraph } from './content/Paragraph.js';
28
- import { Close } from './content/Close.js';
29
-
30
- const AlertComponent = React__default.forwardRef((_ref, ref) => {
31
- let {
32
- role,
33
- type,
34
- ...props
35
- } = _ref;
36
- const Icon = validationIcons[type];
37
- return React__default.createElement(NotificationsContext.Provider, {
38
- value: type
39
- }, React__default.createElement(StyledAlert, Object.assign({
40
- ref: ref,
41
- $type: type,
42
- role: role === undefined ? 'alert' : role
43
- }, props), React__default.createElement(StyledIcon, {
44
- $type: type
45
- }, React__default.createElement(Icon, null)), props.children));
46
- });
47
- AlertComponent.displayName = 'Alert';
48
- AlertComponent.propTypes = {
49
- type: PropTypes.oneOf(TYPE).isRequired
50
- };
51
- const Alert = AlertComponent;
52
- Alert.Close = Close;
53
- Alert.Paragraph = Paragraph;
54
- Alert.Title = Title;
55
-
56
- export { Alert, AlertComponent };