@zohodesk/dot 1.4.0 → 1.4.2

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 (155) hide show
  1. package/.cli/AppearanceThemeValidationExcludeFiles.js +1 -0
  2. package/.cli/PropLessFiles.html +1 -1
  3. package/.cli/PropUnificationExcludeFilesArray.js +345 -0
  4. package/.cli/PropValidationExcludeFilesArray.js +8 -1
  5. package/.cli/propValidation_report.html +24 -2
  6. package/README.md +12 -0
  7. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +3 -0
  8. package/assets/Appearance/light/mode/Dot_LightMode.module.css +3 -0
  9. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +3 -0
  10. package/coverage/ExternalLink/ExternalLink.js.html +1 -1
  11. package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
  12. package/coverage/ExternalLink/index.html +1 -1
  13. package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
  14. package/coverage/ExternalLink/props/index.html +1 -1
  15. package/coverage/ExternalLink/props/propTypes.js.html +1 -1
  16. package/coverage/IconButton/IconButton.js.html +1 -1
  17. package/coverage/IconButton/IconButton.module.css.html +5 -2
  18. package/coverage/IconButton/index.html +1 -1
  19. package/coverage/IconButton/props/defaultProps.js.html +1 -1
  20. package/coverage/IconButton/props/index.html +1 -1
  21. package/coverage/IconButton/props/propTypes.js.html +1 -1
  22. package/coverage/Image/Image.js.html +1 -1
  23. package/coverage/Image/Image.module.css.html +1 -1
  24. package/coverage/Image/index.html +1 -1
  25. package/coverage/Image/props/defaultProps.js.html +1 -1
  26. package/coverage/Image/props/index.html +1 -1
  27. package/coverage/Image/props/propTypes.js.html +1 -1
  28. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
  29. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
  30. package/coverage/avatar/AvatarWithTeam/index.html +1 -1
  31. package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
  32. package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
  33. package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
  34. package/coverage/coverage-final.json +16 -16
  35. package/coverage/coverage-summary.json +16 -16
  36. package/coverage/index.html +1 -1
  37. package/es/ActionButton/ActionButton.js +10 -1
  38. package/es/ActionButton/ActionButton.module.css +7 -0
  39. package/es/ActionButton/props/propTypes.js +2 -1
  40. package/es/AlphabeticList/AlphabeticList.module.css +2 -0
  41. package/es/AttachmentViewer/AttachmentViewer.module.css +2 -0
  42. package/es/ChannelIcon/ChannelIcon.module.css +4 -0
  43. package/es/Drawer/Drawer.js +2 -5
  44. package/es/FormAction/FormAction.module.css +2 -0
  45. package/es/IconButton/IconButton.module.css +1 -0
  46. package/es/Link/Link.js +1 -2
  47. package/es/Provider/Config.js +2 -1
  48. package/es/TagWithIcon/TagWithIcon.module.css +19 -5
  49. package/es/avatar/AvatarIcon/AvatarIcon.module.css +6 -0
  50. package/es/avatar/AvatarStatus/AvatarStatus.js +0 -1
  51. package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -0
  52. package/es/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
  53. package/es/layout/SubtabLayout/SubtabLayout.module.css +2 -0
  54. package/es/list/Comment/Comment.module.css +1 -0
  55. package/es/list/Dot/Dot.module.css +1 -0
  56. package/es/list/ListLayout/ListLayout.js +1 -1
  57. package/es/list/ListLayout/ListLayout.module.css +12 -0
  58. package/es/list/Subject/Subject.module.css +1 -0
  59. package/es/list/Thread/Thread.module.css +1 -0
  60. package/es/list/status/StatusDropdown/StatusDropdown.js +6 -6
  61. package/es/lookup/Lookup/Lookup.js +1 -1
  62. package/es/setup/header/Search/Search.module.css +1 -0
  63. package/es/setup/table/TableRow/SetupTableRow.module.css +3 -2
  64. package/es/v1/ActionButton/ActionButton.js +7 -2
  65. package/es/v1/Drawer/Drawer.js +2 -5
  66. package/es/v1/Link/Link.js +1 -2
  67. package/es/v1/avatar/AvatarStatus/AvatarStatus.js +0 -1
  68. package/es/v1/list/ListLayout/ListLayout.js +1 -1
  69. package/es/v1/list/status/StatusDropdown/StatusDropdown.js +6 -6
  70. package/es/v1/lookup/Lookup/Lookup.js +1 -1
  71. package/es/v1/notification/DesktopNotification/DesktopNotification.js +79 -55
  72. package/es/v1/notification/DesktopNotification/props/defaultProps.js +3 -1
  73. package/es/v1/notification/DesktopNotification/props/propTypes.js +2 -1
  74. package/es/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +59 -23
  75. package/es/v1/notification/DesktopNotificationHeader/props/defaultProps.js +3 -1
  76. package/es/v1/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
  77. package/es/v1/setup/header/Button/Button.js +17 -29
  78. package/es/v1/setup/header/Link/Link.js +23 -35
  79. package/es/v1/setup/header/Search/Search.js +43 -69
  80. package/es/v1/setup/header/Views/Views.js +27 -39
  81. package/es/v1/setup/helptips/Description/Description.js +8 -20
  82. package/es/v1/setup/helptips/Link/Link.js +20 -32
  83. package/es/v1/setup/helptips/ListGroup/ListGroup.js +18 -30
  84. package/es/v1/setup/helptips/Title/Title.js +8 -20
  85. package/es/version2/GlobalNotification/GlobalNotification.module.css +3 -0
  86. package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -0
  87. package/es/version2/notification/DesktopNotification/DesktopNotification.js +78 -55
  88. package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +10 -4
  89. package/es/version2/notification/DesktopNotification/props/defaultProps.js +3 -1
  90. package/es/version2/notification/DesktopNotification/props/propTypes.js +2 -1
  91. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +59 -23
  92. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +14 -17
  93. package/es/version2/notification/DesktopNotificationHeader/props/defaultProps.js +3 -1
  94. package/es/version2/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
  95. package/lib/ActionButton/ActionButton.js +41 -32
  96. package/lib/ActionButton/ActionButton.module.css +7 -0
  97. package/lib/ActionButton/props/propTypes.js +2 -1
  98. package/lib/AlphabeticList/AlphabeticList.module.css +2 -0
  99. package/lib/AttachmentViewer/AttachmentViewer.module.css +2 -0
  100. package/lib/ChannelIcon/ChannelIcon.module.css +4 -0
  101. package/lib/Drawer/Drawer.js +2 -5
  102. package/lib/FormAction/FormAction.module.css +2 -0
  103. package/lib/IconButton/IconButton.module.css +1 -0
  104. package/lib/Link/Link.js +1 -2
  105. package/lib/Provider/Config.js +2 -1
  106. package/lib/TagWithIcon/TagWithIcon.module.css +19 -5
  107. package/lib/avatar/AvatarIcon/AvatarIcon.module.css +6 -0
  108. package/lib/avatar/AvatarStatus/AvatarStatus.js +0 -1
  109. package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -0
  110. package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
  111. package/lib/layout/SubtabLayout/SubtabLayout.module.css +2 -0
  112. package/lib/list/Comment/Comment.module.css +1 -0
  113. package/lib/list/Dot/Dot.module.css +1 -0
  114. package/lib/list/ListLayout/ListLayout.js +1 -1
  115. package/lib/list/ListLayout/ListLayout.module.css +12 -0
  116. package/lib/list/Subject/Subject.module.css +1 -0
  117. package/lib/list/Thread/Thread.module.css +1 -0
  118. package/lib/list/status/StatusDropdown/StatusDropdown.js +6 -6
  119. package/lib/lookup/Lookup/Lookup.js +1 -1
  120. package/lib/setup/header/Search/Search.module.css +1 -0
  121. package/lib/setup/table/TableRow/SetupTableRow.module.css +3 -2
  122. package/lib/v1/ActionButton/ActionButton.js +7 -2
  123. package/lib/v1/Drawer/Drawer.js +2 -5
  124. package/lib/v1/Link/Link.js +1 -2
  125. package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +0 -1
  126. package/lib/v1/list/ListLayout/ListLayout.js +1 -1
  127. package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +6 -6
  128. package/lib/v1/lookup/Lookup/Lookup.js +1 -1
  129. package/lib/v1/notification/DesktopNotification/DesktopNotification.js +74 -55
  130. package/lib/v1/notification/DesktopNotification/props/defaultProps.js +5 -1
  131. package/lib/v1/notification/DesktopNotification/props/propTypes.js +2 -1
  132. package/lib/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +57 -23
  133. package/lib/v1/notification/DesktopNotificationHeader/props/defaultProps.js +5 -1
  134. package/lib/v1/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
  135. package/lib/v1/setup/header/Button/Button.js +17 -63
  136. package/lib/v1/setup/header/Link/Link.js +23 -69
  137. package/lib/v1/setup/header/Search/Search.js +57 -89
  138. package/lib/v1/setup/header/Views/Views.js +27 -73
  139. package/lib/v1/setup/helptips/Description/Description.js +8 -53
  140. package/lib/v1/setup/helptips/Link/Link.js +23 -69
  141. package/lib/v1/setup/helptips/ListGroup/ListGroup.js +26 -72
  142. package/lib/v1/setup/helptips/Title/Title.js +8 -53
  143. package/lib/version2/GlobalNotification/GlobalNotification.module.css +3 -0
  144. package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -0
  145. package/lib/version2/notification/DesktopNotification/DesktopNotification.js +74 -55
  146. package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +10 -4
  147. package/lib/version2/notification/DesktopNotification/props/defaultProps.js +5 -1
  148. package/lib/version2/notification/DesktopNotification/props/propTypes.js +2 -1
  149. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +57 -23
  150. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +14 -17
  151. package/lib/version2/notification/DesktopNotificationHeader/props/defaultProps.js +5 -1
  152. package/lib/version2/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
  153. package/package.json +15 -13
  154. package/propValidationArg.json +8 -0
  155. package/result.json +1 -1
@@ -3,44 +3,32 @@ import { defaultProps } from '../../../../setup/header/Views/props/defaultProps'
3
3
  import { propTypes } from '../../../../setup/header/Views/props/propTypes';
4
4
  import style from '../../../../setup/header/Views/Views.module.css';
5
5
  import { Icon } from '@zohodesk/icons';
6
- export default class Views extends React.Component {
7
- constructor(props) {
8
- super(props);
9
- }
10
-
11
- render() {
12
- let {
13
- isGrid,
14
- isList,
15
- gridTitle,
16
- listTitle,
17
- onListClick,
18
- onGridClick
19
- } = this.props;
20
- return /*#__PURE__*/React.createElement("span", {
21
- className: style.container
22
- }, /*#__PURE__*/React.createElement("span", {
23
- className: `${style.icon} ${style.first} ${isList ? style.active : ''}`,
24
- "data-title": !isList ? listTitle : null,
25
- onClick: onListClick
26
- }, /*#__PURE__*/React.createElement(Icon, {
27
- name: "ZD-list22",
28
- size: "10"
29
- })), /*#__PURE__*/React.createElement("span", {
30
- className: `${style.icon} ${style.last} ${isGrid ? style.active : ''}`,
31
- "data-title": !isGrid ? gridTitle : null,
32
- onClick: onGridClick
33
- }, /*#__PURE__*/React.createElement(Icon, {
34
- name: "ZD-grid",
35
- size: "11"
36
- })));
37
- }
38
-
6
+ export default function Views(props) {
7
+ let {
8
+ isGrid,
9
+ isList,
10
+ gridTitle,
11
+ listTitle,
12
+ onListClick,
13
+ onGridClick
14
+ } = props;
15
+ return /*#__PURE__*/React.createElement("span", {
16
+ className: style.container
17
+ }, /*#__PURE__*/React.createElement("span", {
18
+ className: `${style.icon} ${style.first} ${isList ? style.active : ''}`,
19
+ "data-title": !isList ? listTitle : null,
20
+ onClick: onListClick
21
+ }, /*#__PURE__*/React.createElement(Icon, {
22
+ name: "ZD-list22",
23
+ size: "10"
24
+ })), /*#__PURE__*/React.createElement("span", {
25
+ className: `${style.icon} ${style.last} ${isGrid ? style.active : ''}`,
26
+ "data-title": !isGrid ? gridTitle : null,
27
+ onClick: onGridClick
28
+ }, /*#__PURE__*/React.createElement(Icon, {
29
+ name: "ZD-grid",
30
+ size: "11"
31
+ })));
39
32
  }
40
33
  Views.propTypes = propTypes;
41
- Views.defaultProps = defaultProps; // if (__DOCS__) {
42
- // Views.docs = {
43
- // componentGroup: 'Header',
44
- // folderName: 'Setup'
45
- // };
46
- // }
34
+ Views.defaultProps = defaultProps;
@@ -1,24 +1,12 @@
1
1
  import React from 'react';
2
2
  import { propTypes } from '../../../../setup/helptips/Description/props/propTypes';
3
3
  import style from '../../../../setup/helptips/Description/HelpTipsDescription.module.css';
4
- export default class Description extends React.Component {
5
- constructor(props) {
6
- super(props);
7
- }
8
-
9
- render() {
10
- let {
11
- text
12
- } = this.props;
13
- return /*#__PURE__*/React.createElement("p", {
14
- className: style.text
15
- }, text);
16
- }
17
-
4
+ export default function Description(props) {
5
+ let {
6
+ text
7
+ } = props;
8
+ return /*#__PURE__*/React.createElement("p", {
9
+ className: style.text
10
+ }, text);
18
11
  }
19
- Description.propTypes = propTypes; // if (__DOCS__) {
20
- // Description.docs = {
21
- // componentGroup: 'HelpTips',
22
- // folderName: 'Setup'
23
- // };
24
- // }
12
+ Description.propTypes = propTypes;
@@ -2,40 +2,28 @@ import React from 'react';
2
2
  import { propTypes } from '../../../../setup/helptips/Link/props/propTypes';
3
3
  import style from '../../../../setup/helptips/Link/HelpTipsLink.module.css';
4
4
  import ExternalLink from '../../../ExternalLink/ExternalLink';
5
- export default class Link extends React.Component {
6
- constructor(props) {
7
- super(props);
8
- }
9
-
10
- render() {
11
- let {
12
- text,
13
- url,
14
- onClick,
15
- isDangerous = false
16
- } = this.props;
17
-
18
- if (isDangerous) {
19
- return /*#__PURE__*/React.createElement("div", {
20
- className: style.container,
21
- onClick: onClick,
22
- dangerouslySetInnerHTML: {
23
- __html: text
24
- }
25
- });
26
- }
5
+ export default function Link(props) {
6
+ let {
7
+ text,
8
+ url,
9
+ onClick,
10
+ isDangerous = false
11
+ } = props;
27
12
 
28
- return /*#__PURE__*/React.createElement(ExternalLink, {
29
- href: url,
13
+ if (isDangerous) {
14
+ return /*#__PURE__*/React.createElement("div", {
15
+ className: style.container,
30
16
  onClick: onClick,
31
- className: style.text
32
- }, text);
17
+ dangerouslySetInnerHTML: {
18
+ __html: text
19
+ }
20
+ });
33
21
  }
34
22
 
23
+ return /*#__PURE__*/React.createElement(ExternalLink, {
24
+ href: url,
25
+ onClick: onClick,
26
+ className: style.text
27
+ }, text);
35
28
  }
36
- Link.propTypes = propTypes; // if (__DOCS__) {
37
- // Link.docs = {
38
- // componentGroup: 'HelpTips',
39
- // folderName: 'Setup'
40
- // };
41
- // }
29
+ Link.propTypes = propTypes;
@@ -1,39 +1,27 @@
1
1
  import React from 'react';
2
2
  import { propTypes } from '../../../../setup/helptips/ListGroup/props/propTypes';
3
3
  import style from '../../../../setup/helptips/ListGroup/ListGroup.module.css';
4
- export default class ListGroup extends React.Component {
5
- constructor(props) {
6
- super(props);
7
- }
8
-
9
- render() {
10
- let {
11
- isOrder,
12
- data
13
- } = this.props;
14
-
15
- if (isOrder) {
16
- return /*#__PURE__*/React.createElement("ol", {
17
- className: style.container,
18
- type: "1"
19
- }, data.map((text, index) => /*#__PURE__*/React.createElement("li", {
20
- className: style.orderData,
21
- key: index
22
- }, text)));
23
- }
4
+ export default function ListGroup(props) {
5
+ let {
6
+ isOrder,
7
+ data
8
+ } = props;
24
9
 
25
- return /*#__PURE__*/React.createElement("ul", {
26
- className: style.container
10
+ if (isOrder) {
11
+ return /*#__PURE__*/React.createElement("ol", {
12
+ className: style.container,
13
+ type: "1"
27
14
  }, data.map((text, index) => /*#__PURE__*/React.createElement("li", {
28
- className: style.unOrderData,
15
+ className: style.orderData,
29
16
  key: index
30
- }, data)));
17
+ }, text)));
31
18
  }
32
19
 
20
+ return /*#__PURE__*/React.createElement("ul", {
21
+ className: style.container
22
+ }, data.map((text, index) => /*#__PURE__*/React.createElement("li", {
23
+ className: style.unOrderData,
24
+ key: index
25
+ }, text)));
33
26
  }
34
- ListGroup.propTypes = propTypes; // if (__DOCS__) {
35
- // ListGroup.docs = {
36
- // componentGroup: 'HelpTips',
37
- // folderName: 'Setup'
38
- // };
39
- // }
27
+ ListGroup.propTypes = propTypes;
@@ -1,24 +1,12 @@
1
1
  import React from 'react';
2
2
  import { propTypes } from '../../../../setup/helptips/Title/props/propTypes';
3
3
  import style from '../../../../setup/helptips/Title/HelpTipsTitle.module.css';
4
- export default class Title extends React.Component {
5
- constructor(props) {
6
- super(props);
7
- }
8
-
9
- render() {
10
- let {
11
- text
12
- } = this.props;
13
- return /*#__PURE__*/React.createElement("div", {
14
- className: style.title
15
- }, text);
16
- }
17
-
4
+ export default function Title(props) {
5
+ let {
6
+ text
7
+ } = props;
8
+ return /*#__PURE__*/React.createElement("div", {
9
+ className: style.title
10
+ }, text);
18
11
  }
19
- Title.propTypes = propTypes; // if (__DOCS__) {
20
- // Title.docs = {
21
- // componentGroup: 'HelpTips',
22
- // folderName: 'Setup'
23
- // };
24
- // }
12
+ Title.propTypes = propTypes;
@@ -29,6 +29,9 @@
29
29
  .container {
30
30
  position: relative;
31
31
  pointer-events: initial;
32
+ /* css:theme-validation:ignore */
33
+ /* css:theme-validation:ignore */
34
+ /* css:theme-validation:ignore */
32
35
  color: var(--globalnotification_text_color);
33
36
  max-width: var(--zd_size490) ;
34
37
  composes: wbreak from '~@zohodesk/components/lib/common/common.module.css';
@@ -4,6 +4,7 @@
4
4
  .container {
5
5
  composes: varClass;
6
6
  position: relative;
7
+ /* css:theme-validation:ignore */
7
8
  background-color: var(--zdt_alertlookup_bg);
8
9
  border-style: solid;
9
10
  border-color: var(--commonalert_border_color);
@@ -9,6 +9,7 @@ import AutoClose from '../../../actions/AutoClose';
9
9
  import Button from '@zohodesk/components/lib/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 './DesktopNotification.module.css';
13
14
  let buttonPaletteObject = {
14
15
  success: {
@@ -60,7 +61,8 @@ export function DesktopNotificationUI(props) {
60
61
  needClose,
61
62
  customClass = {},
62
63
  i18nKeys = {},
63
- customProps
64
+ customProps,
65
+ responsiveId
64
66
  } = props;
65
67
  let {
66
68
  closeTitle = 'Close'
@@ -89,66 +91,87 @@ export function DesktopNotificationUI(props) {
89
91
  let Zindex = isAnimate ? getNextIndex() : null;
90
92
  let uiVariantOne = title && (info || secondaryInfo);
91
93
  let uiVariantTwo = title && !(info || secondaryInfo) && !getSectionContainer;
94
+
95
+ function responsiveFunc(_ref) {
96
+ let {
97
+ mediaQueryOR
98
+ } = _ref;
99
+ return {
100
+ uptoTablet: mediaQueryOR([{
101
+ maxWidth: 760
102
+ }])
103
+ };
104
+ }
105
+
92
106
  return /*#__PURE__*/React.createElement("div", {
93
107
  className: style.parentElement,
94
108
  style: needAutoZindex && isAnimate ? {
95
109
  zIndex: `${Zindex}`
96
110
  } : {},
97
111
  "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
- tagName: "p"
129
- }, message) : null, /*#__PURE__*/React.createElement(FormAction, {
130
- size: "small",
131
- paddingLeftSize: "xmedium"
132
- }, submitText ? /*#__PURE__*/React.createElement("div", {
133
- onClick: onClickSubmit,
134
- "data-id": `${dataId}_submitButton`,
135
- "data-test-id": `${dataId}_submitButton`
136
- }, /*#__PURE__*/React.createElement(Container, {
137
- align: "vertical",
138
- alignBox: "row"
139
- }, getSubmitContainer ? /*#__PURE__*/React.createElement(Box, {
140
- flexible: true
141
- }, getSubmitContainer()) : /*#__PURE__*/React.createElement(Box, {
142
- flexible: true
143
- }, /*#__PURE__*/React.createElement(Button, {
144
- text: submitText,
145
- palette: submitType ? submitType : buttonPalette
146
- })))) : null, cancelText ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
147
- text: cancelText,
148
- palette: "secondary",
149
- dataId: `${dataId}_cancelButton`,
150
- onClick: onClickCancel
151
- })) : null))) : null)), getBottomContainer ? /*#__PURE__*/React.createElement(Box, null, getBottomContainer()) : null));
112
+ }, /*#__PURE__*/React.createElement(ResponsiveReceiver, {
113
+ query: responsiveFunc,
114
+ responsiveId: responsiveId
115
+ }, _ref2 => {
116
+ let {
117
+ uptoTablet
118
+ } = _ref2;
119
+ return /*#__PURE__*/React.createElement(Container, _extends({
120
+ className: `${style.container} ${isAnimate ? animateClass : animateRemoveClass}
121
+ ${isShrinkView ? style.globalNotify : ''} ${containerClass} ${uptoTablet ? style.tapWidth : style[`${size}`]}`,
122
+ isCover: false,
123
+ dataId: dataId,
124
+ isInline: uiVariantTwo
125
+ }, ExtraProps), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(DesktopNotificationHeader, {
126
+ type: type,
127
+ title: title,
128
+ variant: titleVariant,
129
+ needIcon: needIcon,
130
+ onClose: onClose,
131
+ closeTitle: closeTitle,
132
+ dataId: `${dataId}_close`,
133
+ needClose: needClose
134
+ })), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Container, {
135
+ alignBox: "column"
136
+ }, uiVariantOne && /*#__PURE__*/React.createElement(Box, {
137
+ flexible: true
138
+ }, /*#__PURE__*/React.createElement("div", {
139
+ className: `${style.section} ${style.infoText}`
140
+ }, subTitle && /*#__PURE__*/React.createElement("div", {
141
+ className: `${style.subTitle} ${info || secondaryInfo ? style.subTitleMargin : ''}`
142
+ }, subTitle), info && /*#__PURE__*/React.createElement("div", null, info), secondaryInfo && /*#__PURE__*/React.createElement("div", {
143
+ className: `${info ? style.secondaryInfo : ''}`
144
+ }, secondaryInfo))), getSectionContainer && /*#__PURE__*/React.createElement(Box, {
145
+ flexible: true
146
+ }, getSectionContainer()), submitText || cancelText ? /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement("div", {
147
+ className: style.footer
148
+ }, isMore ? /*#__PURE__*/React.createElement("div", {
149
+ className: `${style.message}`,
150
+ tagName: "p"
151
+ }, message) : null, /*#__PURE__*/React.createElement(FormAction, {
152
+ size: "small",
153
+ paddingLeftSize: "xmedium"
154
+ }, submitText ? /*#__PURE__*/React.createElement("div", {
155
+ onClick: onClickSubmit,
156
+ "data-id": `${dataId}_submitButton`,
157
+ "data-test-id": `${dataId}_submitButton`
158
+ }, /*#__PURE__*/React.createElement(Container, {
159
+ align: "vertical",
160
+ alignBox: "row"
161
+ }, getSubmitContainer ? /*#__PURE__*/React.createElement(Box, {
162
+ flexible: true
163
+ }, getSubmitContainer()) : /*#__PURE__*/React.createElement(Box, {
164
+ flexible: true
165
+ }, /*#__PURE__*/React.createElement(Button, {
166
+ text: submitText,
167
+ palette: submitType ? submitType : buttonPalette
168
+ })))) : null, cancelText ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
169
+ text: cancelText,
170
+ palette: "secondary",
171
+ dataId: `${dataId}_cancelButton`,
172
+ onClick: onClickCancel
173
+ })) : null))) : null)), getBottomContainer ? /*#__PURE__*/React.createElement(Box, null, getBottomContainer()) : null);
174
+ }));
152
175
  }
153
176
  DesktopNotificationUI.propTypes = DesktopNotificationUI_propTypes;
154
177
  export default function DesktopNotification(props) {
@@ -28,6 +28,7 @@
28
28
  }
29
29
 
30
30
  /* Size */
31
+
31
32
  .medium {
32
33
  width: var(--zd_size452) ;
33
34
  }
@@ -35,6 +36,10 @@
35
36
  .large {
36
37
  width: var(--zd_size580) ;
37
38
  }
39
+ .tapWidth{
40
+ max-width: 100% ;
41
+ min-width: 100% ;
42
+ }
38
43
 
39
44
  /* Animation Style */
40
45
  .closeAnimation {
@@ -76,12 +81,12 @@
76
81
  /* Container Style */
77
82
  .message {
78
83
  position: relative;
79
- color: var(--zd_smoke18);
84
+ color: var(--zdt_desktopnotification_message_text);
80
85
  font-size: var(--zd_font_size11) ;
81
86
  composes: dotted textCap from '~@zohodesk/components/lib/common/common.module.css';
82
87
  height: var(--zd_size33) ;
83
88
  transition: padding var(--zd_transition3), height var(--zd_transition3);
84
- border-top: 1px solid var(--zd_smoke1);
89
+ border-top: 1px solid var(--zdt_desktopnotification_message_border);
85
90
  cursor: pointer;
86
91
  }
87
92
  [dir=ltr] .message {
@@ -92,7 +97,7 @@
92
97
  }
93
98
 
94
99
  .message:hover {
95
- background: var(--zd_alabaster);
100
+ background: var(--zdt_desktopnotification_message_hover_bg);
96
101
  }
97
102
 
98
103
  /* Section */
@@ -100,6 +105,7 @@
100
105
  padding: var(--zd_size15) var(--zd_size30) var(--zd_size30) ;
101
106
  }
102
107
 
108
+
103
109
  .subTitle {
104
110
  font-size: var(--zd_font_size15) ;
105
111
  line-height: var(--zd_size20);
@@ -124,4 +130,4 @@
124
130
  .footer {
125
131
  overflow: hidden;
126
132
  border-radius: 0 0 var(--zd_size10) var(--zd_size10);
127
- }
133
+ }
@@ -1,3 +1,4 @@
1
+ import { getDotLibraryConfig } from '../../../../Provider/Config';
1
2
  export const defaultProps = {
2
3
  isMore: false,
3
4
  isAnimate: true,
@@ -11,5 +12,6 @@ export const defaultProps = {
11
12
  isShrinkView: false,
12
13
  needClose: true,
13
14
  customProps: {},
14
- dataSelectorId: 'desktopNotification'
15
+ dataSelectorId: 'desktopNotification',
16
+ responsiveId: getDotLibraryConfig('desktopNotificationResponsiveId')
15
17
  };
@@ -4,7 +4,8 @@ export const propTypes = {
4
4
  onPortalClose: PropTypes.func,
5
5
  autoClose: PropTypes.bool,
6
6
  hideTime: PropTypes.string,
7
- Element: PropTypes.element
7
+ Element: PropTypes.element,
8
+ responsiveId: PropTypes.string
8
9
  };
9
10
  export const DesktopNotificationUI_propTypes = {
10
11
  type: PropTypes.oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification', 'alarm']),
@@ -4,6 +4,8 @@ import { propTypes } from './props/propTypes';
4
4
  import { Container, Box } from '@zohodesk/components/lib/Layout';
5
5
  import AlertClose from '../../AlertClose/AlertClose';
6
6
  import AlertIcons from '../../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 './DesktopNotificationHeader.module.css';
8
10
  export default class DesktopNotificationHeader extends Component {
9
11
  constructor(props) {
@@ -19,36 +21,70 @@ export default class DesktopNotificationHeader extends Component {
19
21
  type = '',
20
22
  needIcon,
21
23
  title,
22
- needClose
24
+ needClose,
25
+ responsiveId
23
26
  } = this.props;
27
+
28
+ function responsiveFunc(_ref) {
29
+ let {
30
+ mediaQueryOR
31
+ } = _ref;
32
+ return {
33
+ uptoTablet: mediaQueryOR([{
34
+ maxWidth: 760
35
+ }])
36
+ };
37
+ }
38
+
24
39
  return /*#__PURE__*/React.createElement(Container, {
25
40
  align: "vertical",
26
41
  alignBox: "row",
27
42
  className: `${style.container} ${style[variant]} ${style[type]}`,
28
43
  isCover: false,
29
44
  wrap: "wrap"
30
- }, needIcon ? /*#__PURE__*/React.createElement("div", {
31
- className: style.iconContainer
32
- }, /*#__PURE__*/React.createElement(AlertIcons, {
33
- type: type
34
- })) : null, /*#__PURE__*/React.createElement(Box, {
35
- flexible: true
36
- }, /*#__PURE__*/React.createElement(Container, {
37
- alignBox: "row",
38
- align: "center"
39
- }, variant === 'primary' ? /*#__PURE__*/React.createElement(Box, {
40
- className: style.title,
41
- shrink: true
42
- }, title) : /*#__PURE__*/React.createElement(Box, {
43
- className: `${style.infoText}`
44
- }, title))), needClose ? /*#__PURE__*/React.createElement(Box, {
45
- className: style.close
46
- }, /*#__PURE__*/React.createElement(AlertClose, {
47
- onClose: onClose,
48
- dataTitle: closeTitle,
49
- dataId: dataId,
50
- type: "light"
51
- })) : null);
45
+ }, /*#__PURE__*/React.createElement(ResponsiveReceiver, {
46
+ query: responsiveFunc,
47
+ responsiveId: responsiveId
48
+ }, _ref2 => {
49
+ let {
50
+ uptoTablet
51
+ } = _ref2;
52
+ return /*#__PURE__*/React.createElement(React.Fragment, null, needIcon ? /*#__PURE__*/React.createElement("div", {
53
+ className: style.iconContainer
54
+ }, /*#__PURE__*/React.createElement(AlertIcons, {
55
+ type: type
56
+ })) : null, /*#__PURE__*/React.createElement(Box, {
57
+ flexible: true
58
+ }, /*#__PURE__*/React.createElement(Container, {
59
+ alignBox: "row",
60
+ align: "center"
61
+ }, variant === 'primary' ? /*#__PURE__*/React.createElement(Box, {
62
+ shrink: true
63
+ }, /*#__PURE__*/React.createElement(Typography, {
64
+ $i18n_dataTitle: title,
65
+ $ui_className: style.title,
66
+ $ui_tagName: "h1",
67
+ $ui_size: uptoTablet ? '16' : '18',
68
+ $ui_lineHeight: "20",
69
+ $ui_weight: "bold",
70
+ $flag_reset: true,
71
+ $ui_wordBreak: "breakWord"
72
+ }, title)) : /*#__PURE__*/React.createElement(Box, {
73
+ className: `${style.infoText}`
74
+ }, /*#__PURE__*/React.createElement(Typography, {
75
+ $i18n_dataTitle: title,
76
+ $ui_className: style.title,
77
+ $ui_size: "14",
78
+ $ui_wordBreak: "breakWord"
79
+ }, title)))), needClose ? /*#__PURE__*/React.createElement(Box, {
80
+ className: style.close
81
+ }, /*#__PURE__*/React.createElement(AlertClose, {
82
+ onClose: onClose,
83
+ dataTitle: closeTitle,
84
+ dataId: dataId,
85
+ type: "light"
86
+ })) : null);
87
+ }));
52
88
  }
53
89
 
54
90
  }