@zohodesk/dot 1.0.0-temp-165 → 1.0.0-temp-167

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 (103) hide show
  1. package/.cli/AppearanceThemeValidationExcludeFiles.js +1 -0
  2. package/.cli/propValidation_report.html +1 -1
  3. package/README.md +3 -1
  4. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +3 -0
  5. package/assets/Appearance/light/mode/Dot_LightMode.module.css +3 -0
  6. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +3 -0
  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 +9 -2
  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.module.css +1 -0
  45. package/es/list/Dot/Dot.module.css +1 -0
  46. package/es/list/ListLayout/ListLayout.module.css +12 -0
  47. package/es/list/Subject/Subject.module.css +1 -0
  48. package/es/list/Thread/Thread.module.css +1 -0
  49. package/es/setup/header/Search/Search.module.css +1 -0
  50. package/es/setup/table/TableRow/SetupTableRow.module.css +3 -2
  51. package/es/v1/notification/DesktopNotification/DesktopNotification.js +79 -55
  52. package/es/v1/notification/DesktopNotification/props/defaultProps.js +3 -1
  53. package/es/v1/notification/DesktopNotification/props/propTypes.js +2 -1
  54. package/es/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +59 -23
  55. package/es/v1/notification/DesktopNotificationHeader/props/defaultProps.js +3 -1
  56. package/es/v1/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
  57. package/es/version2/GlobalNotification/GlobalNotification.module.css +3 -0
  58. package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -0
  59. package/es/version2/notification/DesktopNotification/DesktopNotification.js +78 -55
  60. package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +10 -4
  61. package/es/version2/notification/DesktopNotification/props/defaultProps.js +3 -1
  62. package/es/version2/notification/DesktopNotification/props/propTypes.js +2 -1
  63. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +59 -23
  64. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +14 -17
  65. package/es/version2/notification/DesktopNotificationHeader/props/defaultProps.js +3 -1
  66. package/es/version2/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
  67. package/lib/ActionButton/ActionButton.module.css +7 -0
  68. package/lib/AlphabeticList/AlphabeticList.module.css +2 -0
  69. package/lib/AttachmentViewer/AttachmentViewer.module.css +2 -0
  70. package/lib/ChannelIcon/ChannelIcon.module.css +4 -0
  71. package/lib/FormAction/FormAction.module.css +2 -0
  72. package/lib/IconButton/IconButton.module.css +1 -0
  73. package/lib/Provider/Config.js +2 -1
  74. package/lib/TagWithIcon/TagWithIcon.module.css +19 -5
  75. package/lib/avatar/AvatarIcon/AvatarIcon.module.css +6 -0
  76. package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +9 -2
  77. package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
  78. package/lib/layout/SubtabLayout/SubtabLayout.module.css +2 -0
  79. package/lib/list/Comment/Comment.module.css +1 -0
  80. package/lib/list/Dot/Dot.module.css +1 -0
  81. package/lib/list/ListLayout/ListLayout.module.css +12 -0
  82. package/lib/list/Subject/Subject.module.css +1 -0
  83. package/lib/list/Thread/Thread.module.css +1 -0
  84. package/lib/setup/header/Search/Search.module.css +1 -0
  85. package/lib/setup/table/TableRow/SetupTableRow.module.css +3 -2
  86. package/lib/v1/notification/DesktopNotification/DesktopNotification.js +74 -55
  87. package/lib/v1/notification/DesktopNotification/props/defaultProps.js +5 -1
  88. package/lib/v1/notification/DesktopNotification/props/propTypes.js +2 -1
  89. package/lib/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +57 -23
  90. package/lib/v1/notification/DesktopNotificationHeader/props/defaultProps.js +5 -1
  91. package/lib/v1/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
  92. package/lib/version2/GlobalNotification/GlobalNotification.module.css +3 -0
  93. package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -0
  94. package/lib/version2/notification/DesktopNotification/DesktopNotification.js +74 -55
  95. package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +10 -4
  96. package/lib/version2/notification/DesktopNotification/props/defaultProps.js +5 -1
  97. package/lib/version2/notification/DesktopNotification/props/propTypes.js +2 -1
  98. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +57 -23
  99. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +14 -17
  100. package/lib/version2/notification/DesktopNotificationHeader/props/defaultProps.js +5 -1
  101. package/lib/version2/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
  102. package/package.json +10 -8
  103. package/result.json +1 -1
@@ -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
  }
@@ -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
+ }
@@ -9,6 +9,7 @@ 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: {
@@ -61,7 +62,8 @@ export function DesktopNotificationUI(props) {
61
62
  renderAlertIcon,
62
63
  customClass = {},
63
64
  i18nKeys = {},
64
- customProps
65
+ customProps,
66
+ responsiveId
65
67
  } = props;
66
68
  let {
67
69
  closeTitle = 'Close'
@@ -90,66 +92,88 @@ export function DesktopNotificationUI(props) {
90
92
  let Zindex = isAnimate ? getNextIndex() : null;
91
93
  let uiVariantOne = title && (info || secondaryInfo);
92
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
+
93
107
  return /*#__PURE__*/React.createElement("div", {
94
108
  className: style.parentElement,
95
109
  style: needAutoZindex && isAnimate ? {
96
110
  zIndex: `${Zindex}`
97
111
  } : {},
98
112
  "data-selector-id": dataSelectorId
99
- }, /*#__PURE__*/React.createElement(Container, _extends({
100
- className: `${style.container} ${isAnimate ? animateClass : animateRemoveClass} ${style[`${size}`] ? style[`${size}`] : ''} ${isShrinkView ? style.globalNotify : ''} ${containerClass}`,
101
- isCover: false,
102
- dataId: dataId,
103
- isInline: uiVariantTwo
104
- }, ExtraProps), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(DesktopNotificationHeader, {
105
- type: type,
106
- title: title,
107
- variant: titleVariant,
108
- needIcon: needIcon,
109
- onClose: onClose,
110
- closeTitle: closeTitle,
111
- renderAlertIcon: renderAlertIcon,
112
- dataId: `${dataId}_close`,
113
- needClose: needClose
114
- })), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Container, {
115
- alignBox: "column"
116
- }, uiVariantOne && /*#__PURE__*/React.createElement(Box, {
117
- flexible: true
118
- }, /*#__PURE__*/React.createElement("div", {
119
- className: `${style.section} ${style.infoText}`
120
- }, subTitle && /*#__PURE__*/React.createElement("div", {
121
- className: `${style.subTitle} ${info || secondaryInfo ? style.subTitleMargin : ''}`
122
- }, subTitle), info && /*#__PURE__*/React.createElement("div", null, info), secondaryInfo && /*#__PURE__*/React.createElement("div", {
123
- className: `${info ? style.secondaryInfo : ''}`
124
- }, secondaryInfo))), getSectionContainer && /*#__PURE__*/React.createElement(Box, {
125
- flexible: true
126
- }, getSectionContainer()), submitText || cancelText ? /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement("div", {
127
- className: style.footer
128
- }, isMore ? /*#__PURE__*/React.createElement("div", {
129
- className: `${style.message}`
130
- }, message) : null, /*#__PURE__*/React.createElement(FormAction, {
131
- size: "small",
132
- paddingLeftSize: "xmedium"
133
- }, submitText ? /*#__PURE__*/React.createElement("div", {
134
- onClick: onClickSubmit,
135
- "data-id": `${dataId}_submitButton`,
136
- "data-test-id": `${dataId}_submitButton`
137
- }, /*#__PURE__*/React.createElement(Container, {
138
- align: "vertical",
139
- alignBox: "row"
140
- }, getSubmitContainer ? /*#__PURE__*/React.createElement(Box, {
141
- flexible: true
142
- }, getSubmitContainer()) : /*#__PURE__*/React.createElement(Box, {
143
- flexible: true
144
- }, /*#__PURE__*/React.createElement(Button, {
145
- text: submitText,
146
- palette: submitType ? submitType : buttonPalette
147
- })))) : null, cancelText ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
148
- text: cancelText,
149
- palette: "secondary",
150
- dataId: `${dataId}_cancelButton`,
151
- onClick: onClickCancel
152
- })) : 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
+ }));
153
177
  }
154
178
  DesktopNotificationUI.propTypes = DesktopNotificationUI_propTypes;
155
179
  DesktopNotificationUI.propTypes = defaultProps;
@@ -1,3 +1,4 @@
1
+ import { getDotLibraryConfig } from '../../../../Provider/Config';
1
2
  export default {
2
3
  isMore: false,
3
4
  isAnimate: true,
@@ -11,5 +12,6 @@ export default {
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/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 {
@@ -15,36 +17,70 @@ export default function DesktopNotificationHeader(props) {
15
17
  needIcon,
16
18
  title,
17
19
  renderAlertIcon,
18
- needClose
20
+ needClose,
21
+ responsiveId
19
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
+
20
35
  return /*#__PURE__*/React.createElement(Container, {
21
36
  align: "vertical",
22
37
  alignBox: "row",
23
38
  className: `${style.container} ${style[variant]} ${style[type]}`,
24
39
  isCover: false,
25
40
  wrap: "wrap"
26
- }, needIcon ? /*#__PURE__*/React.createElement("div", {
27
- className: style.iconContainer
28
- }, renderAlertIcon ? renderAlertIcon() : /*#__PURE__*/React.createElement(AlertIcons, {
29
- type: type
30
- })) : null, /*#__PURE__*/React.createElement(Box, {
31
- flexible: true
32
- }, /*#__PURE__*/React.createElement(Container, {
33
- alignBox: "row",
34
- align: "center"
35
- }, variant === 'primary' ? /*#__PURE__*/React.createElement(Box, {
36
- className: style.title,
37
- shrink: true
38
- }, title) : /*#__PURE__*/React.createElement(Box, {
39
- className: `${style.infoText}`
40
- }, title))), needClose ? /*#__PURE__*/React.createElement(Box, {
41
- className: style.close
42
- }, /*#__PURE__*/React.createElement(AlertClose, {
43
- onClose: onClose,
44
- dataTitle: closeTitle,
45
- dataId: dataId,
46
- type: "light"
47
- })) : 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
+ }));
48
84
  }
49
85
  DesktopNotificationHeader.propTypes = propTypes;
50
86
  DesktopNotificationHeader.defaultProps = defaultProps; // if (__DOCS__) {
@@ -1,5 +1,7 @@
1
+ import { getDotLibraryConfig } from '../../../../Provider/Config';
1
2
  export default {
2
3
  needIcon: true,
3
4
  variant: 'primary',
4
- needClose: true
5
+ needClose: true,
6
+ responsiveId: getDotLibraryConfig('desktopNotificationResponsiveId')
5
7
  };
@@ -8,5 +8,6 @@ export default {
8
8
  title: PropTypes.string,
9
9
  renderAlertIcon: PropTypes.func,
10
10
  type: PropTypes.oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification', 'alarm']),
11
- variant: PropTypes.oneOf(['primary', 'secondary'])
11
+ variant: PropTypes.oneOf(['primary', 'secondary']),
12
+ responsiveId: PropTypes.string
12
13
  };
@@ -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: 1.3333;
@@ -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']),