@zohodesk/dot 1.3.3 → 1.4.1

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 (145) hide show
  1. package/.cli/AppearanceThemeValidationExcludeFiles.js +1 -0
  2. package/.cli/propValidation_report.html +1 -1
  3. package/README.md +14 -0
  4. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +3 -7
  5. package/assets/Appearance/light/mode/Dot_LightMode.module.css +3 -7
  6. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +3 -7
  7. package/coverage/ExternalLink/ExternalLink.js.html +1 -1
  8. package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
  9. package/coverage/ExternalLink/index.html +1 -1
  10. package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
  11. package/coverage/ExternalLink/props/index.html +1 -1
  12. package/coverage/ExternalLink/props/propTypes.js.html +1 -1
  13. package/coverage/IconButton/IconButton.js.html +1 -1
  14. package/coverage/IconButton/IconButton.module.css.html +5 -2
  15. package/coverage/IconButton/index.html +1 -1
  16. package/coverage/IconButton/props/defaultProps.js.html +1 -1
  17. package/coverage/IconButton/props/index.html +1 -1
  18. package/coverage/IconButton/props/propTypes.js.html +1 -1
  19. package/coverage/Image/Image.js.html +1 -1
  20. package/coverage/Image/Image.module.css.html +1 -1
  21. package/coverage/Image/index.html +1 -1
  22. package/coverage/Image/props/defaultProps.js.html +1 -1
  23. package/coverage/Image/props/index.html +1 -1
  24. package/coverage/Image/props/propTypes.js.html +1 -1
  25. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
  26. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
  27. package/coverage/avatar/AvatarWithTeam/index.html +1 -1
  28. package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
  29. package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
  30. package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
  31. package/coverage/index.html +1 -1
  32. package/es/ActionButton/ActionButton.module.css +7 -0
  33. package/es/AlphabeticList/AlphabeticList.module.css +2 -0
  34. package/es/AttachmentViewer/AttachmentViewer.module.css +2 -0
  35. package/es/ChannelIcon/ChannelIcon.module.css +4 -0
  36. package/es/FormAction/FormAction.module.css +2 -0
  37. package/es/IconButton/IconButton.module.css +1 -0
  38. package/es/Provider/Config.js +2 -1
  39. package/es/TagWithIcon/TagWithIcon.module.css +19 -5
  40. package/es/avatar/AvatarIcon/AvatarIcon.module.css +6 -0
  41. package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -0
  42. package/es/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
  43. package/es/layout/SubtabLayout/SubtabLayout.module.css +2 -0
  44. package/es/list/Comment/Comment.js +4 -7
  45. package/es/list/Comment/Comment.module.css +1 -0
  46. package/es/list/Comment/props/defaultProps.js +2 -1
  47. package/es/list/Comment/props/propTypes.js +1 -0
  48. package/es/list/Dot/Dot.module.css +1 -0
  49. package/es/list/ListLayout/ListLayout.module.css +12 -0
  50. package/es/list/Subject/Subject.module.css +1 -0
  51. package/es/list/Thread/Thread.module.css +1 -0
  52. package/es/list/index.js +1 -2
  53. package/es/setup/header/Search/Search.module.css +1 -0
  54. package/es/setup/table/TableRow/SetupTableRow.module.css +3 -2
  55. package/es/v1/alert/AlertHeader/AlertHeader.js +2 -1
  56. package/es/v1/list/Comment/Comment.js +4 -7
  57. package/es/v1/list/index.js +1 -2
  58. package/es/v1/notification/DesktopNotification/DesktopNotification.js +84 -57
  59. package/es/v1/notification/DesktopNotification/props/defaultProps.js +17 -0
  60. package/es/v1/notification/DesktopNotification/props/propTypes.js +43 -0
  61. package/es/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +63 -26
  62. package/es/v1/notification/DesktopNotificationHeader/props/defaultProps.js +7 -0
  63. package/es/v1/notification/DesktopNotificationHeader/props/propTypes.js +13 -0
  64. package/es/v1/setup/header/Button/Button.js +17 -29
  65. package/es/v1/setup/header/Link/Link.js +23 -35
  66. package/es/v1/setup/header/Search/Search.js +43 -69
  67. package/es/v1/setup/header/Views/Views.js +27 -39
  68. package/es/v1/setup/helptips/Description/Description.js +8 -20
  69. package/es/v1/setup/helptips/Link/Link.js +20 -32
  70. package/es/v1/setup/helptips/ListGroup/ListGroup.js +18 -30
  71. package/es/v1/setup/helptips/Title/Title.js +8 -20
  72. package/es/version2/GlobalNotification/GlobalNotification.module.css +3 -0
  73. package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -0
  74. package/es/version2/lookup/AlertLookup/AlertLookupNew.module.css +1 -1
  75. package/es/version2/notification/DesktopNotification/DesktopNotification.js +78 -55
  76. package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +10 -4
  77. package/es/version2/notification/DesktopNotification/props/defaultProps.js +3 -1
  78. package/es/version2/notification/DesktopNotification/props/propTypes.js +2 -1
  79. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +59 -23
  80. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +14 -17
  81. package/es/version2/notification/DesktopNotificationHeader/props/defaultProps.js +3 -1
  82. package/es/version2/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
  83. package/lib/ActionButton/ActionButton.module.css +7 -0
  84. package/lib/AlphabeticList/AlphabeticList.module.css +2 -0
  85. package/lib/AttachmentViewer/AttachmentViewer.module.css +2 -0
  86. package/lib/ChannelIcon/ChannelIcon.module.css +4 -0
  87. package/lib/FormAction/FormAction.module.css +2 -0
  88. package/lib/IconButton/IconButton.module.css +1 -0
  89. package/lib/Provider/Config.js +2 -1
  90. package/lib/TagWithIcon/TagWithIcon.module.css +19 -5
  91. package/lib/avatar/AvatarIcon/AvatarIcon.module.css +6 -0
  92. package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -0
  93. package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
  94. package/lib/layout/SubtabLayout/SubtabLayout.module.css +2 -0
  95. package/lib/list/Comment/Comment.js +4 -8
  96. package/lib/list/Comment/Comment.module.css +1 -0
  97. package/lib/list/Comment/props/defaultProps.js +2 -1
  98. package/lib/list/Comment/props/propTypes.js +1 -0
  99. package/lib/list/Dot/Dot.module.css +1 -0
  100. package/lib/list/ListLayout/ListLayout.module.css +12 -0
  101. package/lib/list/Subject/Subject.module.css +1 -0
  102. package/lib/list/Thread/Thread.module.css +1 -0
  103. package/lib/list/index.js +0 -8
  104. package/lib/setup/header/Search/Search.module.css +1 -0
  105. package/lib/setup/table/TableRow/SetupTableRow.module.css +3 -2
  106. package/lib/v1/alert/AlertHeader/AlertHeader.js +2 -1
  107. package/lib/v1/list/Comment/Comment.js +4 -8
  108. package/lib/v1/list/index.js +0 -8
  109. package/lib/v1/notification/DesktopNotification/DesktopNotification.js +80 -64
  110. package/lib/v1/notification/DesktopNotification/props/defaultProps.js +26 -0
  111. package/lib/v1/notification/DesktopNotification/props/propTypes.js +55 -0
  112. package/lib/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +63 -34
  113. package/lib/v1/notification/DesktopNotificationHeader/props/defaultProps.js +16 -0
  114. package/lib/v1/notification/DesktopNotificationHeader/props/propTypes.js +24 -0
  115. package/lib/v1/setup/header/Button/Button.js +17 -63
  116. package/lib/v1/setup/header/Link/Link.js +23 -69
  117. package/lib/v1/setup/header/Search/Search.js +57 -89
  118. package/lib/v1/setup/header/Views/Views.js +27 -73
  119. package/lib/v1/setup/helptips/Description/Description.js +8 -53
  120. package/lib/v1/setup/helptips/Link/Link.js +23 -69
  121. package/lib/v1/setup/helptips/ListGroup/ListGroup.js +26 -72
  122. package/lib/v1/setup/helptips/Title/Title.js +8 -53
  123. package/lib/version2/GlobalNotification/GlobalNotification.module.css +3 -0
  124. package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -0
  125. package/lib/version2/lookup/AlertLookup/AlertLookupNew.module.css +1 -1
  126. package/lib/version2/notification/DesktopNotification/DesktopNotification.js +74 -55
  127. package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +10 -4
  128. package/lib/version2/notification/DesktopNotification/props/defaultProps.js +5 -1
  129. package/lib/version2/notification/DesktopNotification/props/propTypes.js +2 -1
  130. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +57 -23
  131. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +14 -17
  132. package/lib/version2/notification/DesktopNotificationHeader/props/defaultProps.js +5 -1
  133. package/lib/version2/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
  134. package/package.json +11 -11
  135. package/result.json +1 -1
  136. package/es/list/UserTime/UserTime.js +0 -83
  137. package/es/list/UserTime/UserTime.module.css +0 -58
  138. package/es/list/UserTime/props/defaultProps.js +0 -3
  139. package/es/list/UserTime/props/propTypes.js +0 -18
  140. package/es/v1/list/UserTime/UserTime.js +0 -83
  141. package/lib/list/UserTime/UserTime.js +0 -136
  142. package/lib/list/UserTime/UserTime.module.css +0 -58
  143. package/lib/list/UserTime/props/defaultProps.js +0 -10
  144. package/lib/list/UserTime/props/propTypes.js +0 -29
  145. package/lib/v1/list/UserTime/UserTime.js +0 -136
@@ -48,6 +48,7 @@
48
48
  }
49
49
 
50
50
  .tertiary_borderStyle {
51
+ /* css:theme-validation:ignore */
51
52
  border-bottom: 1px solid var(--borderColor);
52
53
  }
53
54
 
@@ -149,6 +150,7 @@
149
150
 
150
151
  .footer {
151
152
  composes: varClass;
153
+ /* css:theme-validation:ignore */
152
154
  border-top: 1px solid var(--borderColor);
153
155
  }
154
156
 
@@ -2,7 +2,6 @@ import React, { Component } from 'react';
2
2
  import { defaultProps } from './props/defaultProps';
3
3
  import { propTypes } from './props/propTypes';
4
4
  import { Icon } from '@zohodesk/icons';
5
- import { i18NProviderUtils } from '@zohodesk/i18n';
6
5
  import Button from '@zohodesk/components/lib/semantic/Button/Button';
7
6
  import style from './Comment.module.css';
8
7
  export default class Comment extends Component {
@@ -14,18 +13,16 @@ export default class Comment extends Component {
14
13
  let {
15
14
  count,
16
15
  onClick,
17
- className
16
+ className,
17
+ title
18
18
  } = this.props;
19
- let i18N = i18NProviderUtils.getI18NValue;
20
- let commentCount = parseInt(count);
21
- let commentTitle = !commentCount ? i18N('tabs.request.comment') : commentCount > 1 ? i18N('support.comment.many', count) : i18N('support.comment.one');
22
19
  return /*#__PURE__*/React.createElement(Button, {
23
20
  customClass: `${style.container} ${className} `,
24
21
  onClick: onClick,
25
22
  dataId: "commentLstContainer",
26
- title: commentTitle,
23
+ title: title,
27
24
  a11y: {
28
- ariaLabel: commentTitle
25
+ ariaLabel: title
29
26
  }
30
27
  }, /*#__PURE__*/React.createElement(Icon, {
31
28
  name: "ZD-TK-commentLine",
@@ -5,6 +5,7 @@
5
5
  composes: varClass;
6
6
  composes: inlineBlockMiddle from '../listCommon.module.css';
7
7
  position: relative;
8
+ /* css:theme-validation:ignore */
8
9
  color: var(--icon_color);
9
10
  padding: 0 var(--zd_size2) ;
10
11
  cursor: pointer;
@@ -1,3 +1,4 @@
1
1
  export const defaultProps = {
2
- className: ''
2
+ className: '',
3
+ title: ''
3
4
  };
@@ -2,5 +2,6 @@ import PropTypes from 'prop-types';
2
2
  export const propTypes = {
3
3
  className: PropTypes.string,
4
4
  count: PropTypes.string,
5
+ title: PropTypes.string,
5
6
  onClick: PropTypes.func
6
7
  };
@@ -4,6 +4,7 @@
4
4
  .dot {
5
5
  composes: varClass;
6
6
  font-size: var(--zd_font_size16) ;
7
+ /* css:theme-validation:ignore */
7
8
  color: var(--dotColor);
8
9
  transform: perspective(1px);
9
10
  }
@@ -35,10 +35,22 @@
35
35
  padding: var(--zd_size2) 0 ;
36
36
  }
37
37
 
38
+ .compact .innerContainer,
39
+ .classic .innerContainer,
40
+ .superCompact .innerContainer {
41
+ /* css:theme-validation:ignore */
42
+ }
43
+
38
44
  .compact .innerContainer, .classic .innerContainer, .superCompact .innerContainer {
39
45
  border-bottom: 1px dotted var(--listBorder);
40
46
  }
41
47
 
48
+ .compact,
49
+ .classic,
50
+ .superCompact {
51
+ /* css:theme-validation:ignore */
52
+ }
53
+
42
54
  [dir=ltr] .compact, [dir=ltr] .classic, [dir=ltr] .superCompact {
43
55
  border-left: var(--zd_size2) solid transparent;
44
56
  }
@@ -3,6 +3,7 @@
3
3
  }
4
4
  .subject {
5
5
  composes: varClass;
6
+ /* css:theme-validation:ignore */
6
7
  color: var(--subject_text);
7
8
  display: block;
8
9
  }
@@ -4,6 +4,7 @@
4
4
  .container {
5
5
  composes: varClass;
6
6
  position: relative;
7
+ /* css:theme-validation:ignore */
7
8
  color: var(--icon_color);
8
9
  cursor: pointer;
9
10
  }
package/es/list/index.js CHANGED
@@ -13,5 +13,4 @@ export { default as StatusDropdown } from './status/StatusDropdown/StatusDropdow
13
13
  export { default as StatusListItem } from './status/StatusListItem/StatusListItem';
14
14
  export { default as Subject } from './Subject/Subject';
15
15
  export { default as TagNew } from './TagNew/TagNew';
16
- export { default as Thread } from './Thread/Thread';
17
- export { default as UserTime } from './UserTime/UserTime';
16
+ export { default as Thread } from './Thread/Thread';
@@ -35,6 +35,7 @@
35
35
  font-size: var(--zd_font_size13) ;
36
36
  width: 100% ;
37
37
  letter-spacing: 0.2px;
38
+ /* css:theme-validation:ignore */
38
39
  transition: all var(--zd_transition3) ease;
39
40
  color: var(--zdt_search_input_text);
40
41
  font-family: var(--zd_regular);
@@ -9,6 +9,7 @@
9
9
  margin-left: var(--zd_size40) ;
10
10
  margin-right: var(--zd_size40) ;
11
11
  }
12
+
12
13
  .container:hover {
13
- background-color: var( --zdt_setuptablerow_hover_bg);
14
- }
14
+ background-color: var(--zdt_setuptablerow_hover_bg);
15
+ }
@@ -64,10 +64,11 @@ export default function AlertHeader(props) {
64
64
  shrink: true,
65
65
  id: htmlId
66
66
  }, title), children && /*#__PURE__*/React.createElement(Box, {
67
+ shrink: true,
67
68
  adjust: true,
68
69
  flexible: true
69
70
  }, children))), onClose && /*#__PURE__*/React.createElement(Box, {
70
- className: style.close
71
+ className: finalStyle.close
71
72
  }, /*#__PURE__*/React.createElement(AlertClose, {
72
73
  onClose: onClose,
73
74
  dataTitle: closeTitle,
@@ -2,25 +2,22 @@ import React from 'react';
2
2
  import { defaultProps } from '../../../list/Comment/props/defaultProps';
3
3
  import { propTypes } from '../../../list/Comment/props/propTypes';
4
4
  import { Icon } from '@zohodesk/icons';
5
- import { i18NProviderUtils } from '@zohodesk/i18n';
6
5
  import Button from '@zohodesk/components/es/v1/semantic/Button/Button';
7
6
  import style from '../../../list/Comment/Comment.module.css';
8
7
  export default function Comment(props) {
9
8
  let {
10
9
  count,
11
10
  onClick,
12
- className
11
+ className,
12
+ title
13
13
  } = props;
14
- let i18N = i18NProviderUtils.getI18NValue;
15
- let commentCount = parseInt(count);
16
- let commentTitle = !commentCount ? i18N('tabs.request.comment') : commentCount > 1 ? i18N('support.comment.many', count) : i18N('support.comment.one');
17
14
  return /*#__PURE__*/React.createElement(Button, {
18
15
  customClass: `${style.container} ${className} `,
19
16
  onClick: onClick,
20
17
  dataId: "commentLstContainer",
21
- title: commentTitle,
18
+ title: title,
22
19
  a11y: {
23
- ariaLabel: commentTitle
20
+ ariaLabel: title
24
21
  }
25
22
  }, /*#__PURE__*/React.createElement(Icon, {
26
23
  name: "ZD-TK-commentLine",
@@ -13,5 +13,4 @@ export { default as StatusDropdown } from './status/StatusDropdown/StatusDropdow
13
13
  export { default as StatusListItem } from './status/StatusListItem/StatusListItem';
14
14
  export { default as Subject } from './Subject/Subject';
15
15
  export { default as TagNew } from './TagNew/TagNew';
16
- export { default as Thread } from './Thread/Thread';
17
- export { default as UserTime } from './UserTime/UserTime';
16
+ export { default as Thread } from './Thread/Thread';
@@ -1,14 +1,15 @@
1
1
  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); }
2
2
 
3
- import React, { useState } from 'react';
4
- import { defaultProps } from '../../../version2/notification/DesktopNotification/props/defaultProps';
5
- import { propTypes, DesktopNotificationUI_propTypes } from '../../../version2/notification/DesktopNotification/props/propTypes';
3
+ import React from 'react';
4
+ import defaultProps from './props/defaultProps';
5
+ import { propTypes, DesktopNotificationUI_propTypes } from './props/propTypes';
6
6
  import { Container, Box } from '@zohodesk/components/es/v1/Layout';
7
7
  import { useZIndex } from '@zohodesk/components/es/v1/Provider/ZindexProvider';
8
8
  import AutoClose from '../../../actions/AutoClose';
9
9
  import Button from '@zohodesk/components/es/v1/Button/Button';
10
10
  import FormAction from '../../../FormAction/FormAction';
11
11
  import DesktopNotificationHeader from '../DesktopNotificationHeader/DesktopNotificationHeader';
12
+ import { ResponsiveReceiver } from '@zohodesk/components/lib/Responsive/CustomResponsive';
12
13
  import style from '../../../version2/notification/DesktopNotification/DesktopNotification.module.css';
13
14
  let buttonPaletteObject = {
14
15
  success: {
@@ -58,9 +59,11 @@ export function DesktopNotificationUI(props) {
58
59
  size,
59
60
  onClose,
60
61
  needClose,
62
+ renderAlertIcon,
61
63
  customClass = {},
62
64
  i18nKeys = {},
63
- customProps
65
+ customProps,
66
+ responsiveId
64
67
  } = props;
65
68
  let {
66
69
  closeTitle = 'Close'
@@ -89,67 +92,91 @@ export function DesktopNotificationUI(props) {
89
92
  let Zindex = isAnimate ? getNextIndex() : null;
90
93
  let uiVariantOne = title && (info || secondaryInfo);
91
94
  let uiVariantTwo = title && !(info || secondaryInfo) && !getSectionContainer;
95
+
96
+ function responsiveFunc(_ref) {
97
+ let {
98
+ mediaQueryOR
99
+ } = _ref;
100
+ return {
101
+ uptoTablet: mediaQueryOR([{
102
+ maxWidth: 760
103
+ }])
104
+ };
105
+ }
106
+
92
107
  return /*#__PURE__*/React.createElement("div", {
93
108
  className: style.parentElement,
94
109
  style: needAutoZindex && isAnimate ? {
95
110
  zIndex: `${Zindex}`
96
111
  } : {},
97
112
  "data-selector-id": dataSelectorId
98
- }, /*#__PURE__*/React.createElement(Container, _extends({
99
- className: `${style.container} ${isAnimate ? animateClass : animateRemoveClass} ${style[`${size}`] ? style[`${size}`] : ''} ${isShrinkView ? style.globalNotify : ''} ${containerClass}`,
100
- isCover: false,
101
- dataId: dataId,
102
- isInline: uiVariantTwo
103
- }, ExtraProps), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(DesktopNotificationHeader, {
104
- type: type,
105
- title: title,
106
- variant: titleVariant,
107
- needIcon: needIcon,
108
- onClose: onClose,
109
- closeTitle: closeTitle,
110
- dataId: `${dataId}_close`,
111
- needClose: needClose
112
- })), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Container, {
113
- alignBox: "column"
114
- }, uiVariantOne && /*#__PURE__*/React.createElement(Box, {
115
- flexible: true
116
- }, /*#__PURE__*/React.createElement("div", {
117
- className: `${style.section} ${style.infoText}`
118
- }, subTitle && /*#__PURE__*/React.createElement("div", {
119
- className: `${style.subTitle} ${info || secondaryInfo ? style.subTitleMargin : ''}`
120
- }, subTitle), info && /*#__PURE__*/React.createElement("div", null, info), secondaryInfo && /*#__PURE__*/React.createElement("div", {
121
- className: `${info ? style.secondaryInfo : ''}`
122
- }, secondaryInfo))), getSectionContainer && /*#__PURE__*/React.createElement(Box, {
123
- flexible: true
124
- }, getSectionContainer()), submitText || cancelText ? /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement("div", {
125
- className: style.footer
126
- }, isMore ? /*#__PURE__*/React.createElement("div", {
127
- className: `${style.message}`
128
- }, message) : null, /*#__PURE__*/React.createElement(FormAction, {
129
- size: "small",
130
- paddingLeftSize: "xmedium"
131
- }, submitText ? /*#__PURE__*/React.createElement("div", {
132
- onClick: onClickSubmit,
133
- "data-id": `${dataId}_submitButton`,
134
- "data-test-id": `${dataId}_submitButton`
135
- }, /*#__PURE__*/React.createElement(Container, {
136
- align: "vertical",
137
- alignBox: "row"
138
- }, getSubmitContainer ? /*#__PURE__*/React.createElement(Box, {
139
- flexible: true
140
- }, getSubmitContainer()) : /*#__PURE__*/React.createElement(Box, {
141
- flexible: true
142
- }, /*#__PURE__*/React.createElement(Button, {
143
- text: submitText,
144
- palette: submitType ? submitType : buttonPalette
145
- })))) : null, cancelText ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
146
- text: cancelText,
147
- palette: "secondary",
148
- dataId: `${dataId}_cancelButton`,
149
- onClick: onClickCancel
150
- })) : null))) : null)), getBottomContainer ? /*#__PURE__*/React.createElement(Box, null, getBottomContainer()) : null));
113
+ }, /*#__PURE__*/React.createElement(ResponsiveReceiver, {
114
+ query: responsiveFunc,
115
+ responsiveId: responsiveId
116
+ }, _ref2 => {
117
+ let {
118
+ uptoTablet
119
+ } = _ref2;
120
+ return /*#__PURE__*/React.createElement(Container, _extends({
121
+ className: `${style.container} ${isAnimate ? animateClass : animateRemoveClass}
122
+ ${isShrinkView ? style.globalNotify : ''} ${containerClass}
123
+ ${uptoTablet ? style.tapWidth : style[`${size}`]}`,
124
+ isCover: false,
125
+ dataId: dataId,
126
+ isInline: uiVariantTwo
127
+ }, ExtraProps), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(DesktopNotificationHeader, {
128
+ type: type,
129
+ title: title,
130
+ variant: titleVariant,
131
+ needIcon: needIcon,
132
+ onClose: onClose,
133
+ closeTitle: closeTitle,
134
+ renderAlertIcon: renderAlertIcon,
135
+ dataId: `${dataId}_close`,
136
+ needClose: needClose
137
+ })), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Container, {
138
+ alignBox: "column"
139
+ }, uiVariantOne && /*#__PURE__*/React.createElement(Box, {
140
+ flexible: true
141
+ }, /*#__PURE__*/React.createElement("div", {
142
+ className: `${style.section} ${style.infoText}`
143
+ }, subTitle && /*#__PURE__*/React.createElement("div", {
144
+ className: `${style.subTitle} ${info || secondaryInfo ? style.subTitleMargin : ''}`
145
+ }, subTitle), info && /*#__PURE__*/React.createElement("div", null, info), secondaryInfo && /*#__PURE__*/React.createElement("div", {
146
+ className: `${info ? style.secondaryInfo : ''}`
147
+ }, secondaryInfo))), getSectionContainer && /*#__PURE__*/React.createElement(Box, {
148
+ flexible: true
149
+ }, getSectionContainer()), submitText || cancelText ? /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement("div", {
150
+ className: style.footer
151
+ }, isMore ? /*#__PURE__*/React.createElement("div", {
152
+ className: `${style.message}`
153
+ }, message) : null, /*#__PURE__*/React.createElement(FormAction, {
154
+ size: "small",
155
+ paddingLeftSize: "xmedium"
156
+ }, submitText ? /*#__PURE__*/React.createElement("div", {
157
+ onClick: onClickSubmit,
158
+ "data-id": `${dataId}_submitButton`,
159
+ "data-test-id": `${dataId}_submitButton`
160
+ }, /*#__PURE__*/React.createElement(Container, {
161
+ align: "vertical",
162
+ alignBox: "row"
163
+ }, getSubmitContainer ? /*#__PURE__*/React.createElement(Box, {
164
+ flexible: true
165
+ }, getSubmitContainer()) : /*#__PURE__*/React.createElement(Box, {
166
+ flexible: true
167
+ }, /*#__PURE__*/React.createElement(Button, {
168
+ text: submitText,
169
+ palette: submitType ? submitType : buttonPalette
170
+ })))) : null, cancelText ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
171
+ text: cancelText,
172
+ palette: "secondary",
173
+ dataId: `${dataId}_cancelButton`,
174
+ onClick: onClickCancel
175
+ })) : null))) : null)), getBottomContainer ? /*#__PURE__*/React.createElement(Box, null, getBottomContainer()) : null);
176
+ }));
151
177
  }
152
178
  DesktopNotificationUI.propTypes = DesktopNotificationUI_propTypes;
179
+ DesktopNotificationUI.propTypes = defaultProps;
153
180
  export default function DesktopNotification(props) {
154
181
  return /*#__PURE__*/React.createElement(AutoClose, _extends({}, props, {
155
182
  Element: DesktopNotificationUI
@@ -0,0 +1,17 @@
1
+ import { getDotLibraryConfig } from '../../../../Provider/Config';
2
+ export default {
3
+ isMore: false,
4
+ isAnimate: true,
5
+ isClose: false,
6
+ autoClose: false,
7
+ hideTime: '3000',
8
+ dataId: 'toastMessage',
9
+ needAutoZindex: true,
10
+ needIcon: true,
11
+ titleVariant: 'primary',
12
+ isShrinkView: false,
13
+ needClose: true,
14
+ customProps: {},
15
+ dataSelectorId: 'desktopNotification',
16
+ responsiveId: getDotLibraryConfig('desktopNotificationResponsiveId')
17
+ };
@@ -0,0 +1,43 @@
1
+ import PropTypes from 'prop-types';
2
+ export const propTypes = {
3
+ isClose: PropTypes.bool,
4
+ onPortalClose: PropTypes.func,
5
+ autoClose: PropTypes.bool,
6
+ hideTime: PropTypes.string,
7
+ Element: PropTypes.element,
8
+ responsiveId: PropTypes.string
9
+ };
10
+ export const DesktopNotificationUI_propTypes = {
11
+ type: PropTypes.oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification', 'alarm']),
12
+ cancelText: PropTypes.string,
13
+ submitText: PropTypes.string,
14
+ submitType: PropTypes.oneOf(['primary', 'danger', 'success']),
15
+ isMore: PropTypes.bool,
16
+ customClass: PropTypes.object,
17
+ dataId: PropTypes.string,
18
+ getBottomContainer: PropTypes.func,
19
+ getSectionContainer: PropTypes.func,
20
+ getSubmitContainer: PropTypes.func,
21
+ i18nKeys: PropTypes.object,
22
+ dataSelectorId: PropTypes.string,
23
+ info: PropTypes.string,
24
+ isAnimate: PropTypes.bool,
25
+ isShrinkView: PropTypes.bool,
26
+ message: PropTypes.string,
27
+ needAutoZindex: PropTypes.bool,
28
+ needClose: PropTypes.bool,
29
+ needIcon: PropTypes.bool,
30
+ onCancel: PropTypes.func,
31
+ onClose: PropTypes.func,
32
+ onSubmit: PropTypes.func,
33
+ secondaryInfo: PropTypes.string,
34
+ size: PropTypes.oneOf(['medium', 'large']),
35
+ subTitle: PropTypes.string,
36
+ titleVariant: PropTypes.oneOf(['primary', 'secondary']),
37
+ isClose: PropTypes.bool,
38
+ renderAlertIcon: PropTypes.func,
39
+ customProps: PropTypes.shape({
40
+ ExtraProps: PropTypes.object
41
+ }),
42
+ title: PropTypes.string
43
+ };
@@ -1,9 +1,11 @@
1
- import React, { Component } from 'react';
2
- import { defaultProps } from '../../../version2/notification/DesktopNotificationHeader/props/defaultProps';
3
- import { propTypes } from '../../../version2/notification/DesktopNotificationHeader/props/propTypes';
1
+ import React from 'react';
2
+ import defaultProps from './props/defaultProps';
3
+ import propTypes from './props/propTypes';
4
4
  import { Container, Box } from '@zohodesk/components/es/v1/Layout';
5
5
  import AlertClose from '../../alert/AlertClose/AlertClose';
6
6
  import AlertIcons from '../../alert/alertIcons/AlertIcons';
7
+ import { ResponsiveReceiver } from '@zohodesk/components/lib/Responsive/CustomResponsive';
8
+ import Typography from '@zohodesk/components/es/v1/Typography/Typography';
7
9
  import style from '../../../version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css';
8
10
  export default function DesktopNotificationHeader(props) {
9
11
  let {
@@ -14,36 +16,71 @@ export default function DesktopNotificationHeader(props) {
14
16
  type = '',
15
17
  needIcon,
16
18
  title,
17
- needClose
19
+ renderAlertIcon,
20
+ needClose,
21
+ responsiveId
18
22
  } = props;
23
+
24
+ function responsiveFunc(_ref) {
25
+ let {
26
+ mediaQueryOR
27
+ } = _ref;
28
+ return {
29
+ uptoTablet: mediaQueryOR([{
30
+ maxWidth: 760
31
+ }])
32
+ };
33
+ }
34
+
19
35
  return /*#__PURE__*/React.createElement(Container, {
20
36
  align: "vertical",
21
37
  alignBox: "row",
22
38
  className: `${style.container} ${style[variant]} ${style[type]}`,
23
39
  isCover: false,
24
40
  wrap: "wrap"
25
- }, needIcon ? /*#__PURE__*/React.createElement("div", {
26
- className: style.iconContainer
27
- }, /*#__PURE__*/React.createElement(AlertIcons, {
28
- type: type
29
- })) : null, /*#__PURE__*/React.createElement(Box, {
30
- flexible: true
31
- }, /*#__PURE__*/React.createElement(Container, {
32
- alignBox: "row",
33
- align: "center"
34
- }, variant === 'primary' ? /*#__PURE__*/React.createElement(Box, {
35
- className: style.title,
36
- shrink: true
37
- }, title) : /*#__PURE__*/React.createElement(Box, {
38
- className: `${style.infoText}`
39
- }, title))), needClose ? /*#__PURE__*/React.createElement(Box, {
40
- className: style.close
41
- }, /*#__PURE__*/React.createElement(AlertClose, {
42
- onClose: onClose,
43
- dataTitle: closeTitle,
44
- dataId: dataId,
45
- type: "light"
46
- })) : null);
41
+ }, /*#__PURE__*/React.createElement(ResponsiveReceiver, {
42
+ query: responsiveFunc,
43
+ responsiveId: responsiveId
44
+ }, _ref2 => {
45
+ let {
46
+ uptoTablet
47
+ } = _ref2;
48
+ return /*#__PURE__*/React.createElement(React.Fragment, null, needIcon ? /*#__PURE__*/React.createElement("div", {
49
+ className: style.iconContainer
50
+ }, renderAlertIcon ? renderAlertIcon() : /*#__PURE__*/React.createElement(AlertIcons, {
51
+ type: type
52
+ })) : null, /*#__PURE__*/React.createElement(Box, {
53
+ flexible: true
54
+ }, /*#__PURE__*/React.createElement(Container, {
55
+ alignBox: "row",
56
+ align: "center"
57
+ }, variant === 'primary' ? /*#__PURE__*/React.createElement(Box, {
58
+ shrink: true
59
+ }, /*#__PURE__*/React.createElement(Typography, {
60
+ $i18n_dataTitle: title,
61
+ $ui_className: style.title,
62
+ $ui_tagName: "h1",
63
+ $ui_size: uptoTablet ? '16' : '18',
64
+ $ui_lineHeight: "20",
65
+ $ui_weight: "bold",
66
+ $flag_reset: true,
67
+ $ui_wordBreak: "breakWord"
68
+ }, title)) : /*#__PURE__*/React.createElement(Box, {
69
+ className: `${style.infoText}`
70
+ }, /*#__PURE__*/React.createElement(Typography, {
71
+ $i18n_dataTitle: title,
72
+ $ui_className: style.title,
73
+ $ui_size: "14",
74
+ $ui_wordBreak: "breakWord"
75
+ }, title)))), needClose ? /*#__PURE__*/React.createElement(Box, {
76
+ className: style.close
77
+ }, /*#__PURE__*/React.createElement(AlertClose, {
78
+ onClose: onClose,
79
+ dataTitle: closeTitle,
80
+ dataId: dataId,
81
+ type: "light"
82
+ })) : null);
83
+ }));
47
84
  }
48
85
  DesktopNotificationHeader.propTypes = propTypes;
49
86
  DesktopNotificationHeader.defaultProps = defaultProps; // if (__DOCS__) {
@@ -0,0 +1,7 @@
1
+ import { getDotLibraryConfig } from '../../../../Provider/Config';
2
+ export default {
3
+ needIcon: true,
4
+ variant: 'primary',
5
+ needClose: true,
6
+ responsiveId: getDotLibraryConfig('desktopNotificationResponsiveId')
7
+ };
@@ -0,0 +1,13 @@
1
+ import PropTypes from 'prop-types';
2
+ export default {
3
+ closeTitle: PropTypes.string,
4
+ dataId: PropTypes.string,
5
+ needClose: PropTypes.bool,
6
+ needIcon: PropTypes.bool,
7
+ onClose: PropTypes.func,
8
+ title: PropTypes.string,
9
+ renderAlertIcon: PropTypes.func,
10
+ type: PropTypes.oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification', 'alarm']),
11
+ variant: PropTypes.oneOf(['primary', 'secondary']),
12
+ responsiveId: PropTypes.string
13
+ };
@@ -3,34 +3,22 @@ import { defaultProps } from '../../../../setup/header/Button/props/defaultProps
3
3
  import { propTypes } from '../../../../setup/header/Button/props/propTypes';
4
4
  import GenButton from '@zohodesk/components/es/v1/Button/Button';
5
5
  import style from '../../../../setup/header/Button/HeaderButton.module.css';
6
- export default class Button extends React.Component {
7
- constructor(props) {
8
- super(props);
9
- }
10
-
11
- render() {
12
- let {
13
- palette,
14
- text,
15
- onClick,
16
- id
17
- } = this.props;
18
- return /*#__PURE__*/React.createElement("div", {
19
- className: style.container
20
- }, /*#__PURE__*/React.createElement(GenButton, {
21
- id: id,
22
- onClick: onClick,
23
- palette: palette,
24
- size: "medium",
25
- text: text
26
- }));
27
- }
28
-
6
+ export default function Button(props) {
7
+ let {
8
+ palette,
9
+ text,
10
+ onClick,
11
+ id
12
+ } = props;
13
+ return /*#__PURE__*/React.createElement("div", {
14
+ className: style.container
15
+ }, /*#__PURE__*/React.createElement(GenButton, {
16
+ id: id,
17
+ onClick: onClick,
18
+ palette: palette,
19
+ size: "medium",
20
+ text: text
21
+ }));
29
22
  }
30
23
  Button.defaultProps = defaultProps;
31
- Button.propTypes = propTypes; // if (__DOCS__) {
32
- // Button.docs = {
33
- // componentGroup: 'Header',
34
- // folderName: 'Setup'
35
- // };
36
- // }
24
+ Button.propTypes = propTypes;