@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.
- package/.cli/AppearanceThemeValidationExcludeFiles.js +1 -0
- package/.cli/PropLessFiles.html +1 -1
- package/.cli/PropUnificationExcludeFilesArray.js +345 -0
- package/.cli/PropValidationExcludeFilesArray.js +8 -1
- package/.cli/propValidation_report.html +24 -2
- package/README.md +12 -0
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +3 -0
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +3 -0
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +3 -0
- package/coverage/ExternalLink/ExternalLink.js.html +1 -1
- package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
- package/coverage/ExternalLink/index.html +1 -1
- package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
- package/coverage/ExternalLink/props/index.html +1 -1
- package/coverage/ExternalLink/props/propTypes.js.html +1 -1
- package/coverage/IconButton/IconButton.js.html +1 -1
- package/coverage/IconButton/IconButton.module.css.html +5 -2
- package/coverage/IconButton/index.html +1 -1
- package/coverage/IconButton/props/defaultProps.js.html +1 -1
- package/coverage/IconButton/props/index.html +1 -1
- package/coverage/IconButton/props/propTypes.js.html +1 -1
- package/coverage/Image/Image.js.html +1 -1
- package/coverage/Image/Image.module.css.html +1 -1
- package/coverage/Image/index.html +1 -1
- package/coverage/Image/props/defaultProps.js.html +1 -1
- package/coverage/Image/props/index.html +1 -1
- package/coverage/Image/props/propTypes.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
- package/coverage/avatar/AvatarWithTeam/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
- package/coverage/coverage-final.json +16 -16
- package/coverage/coverage-summary.json +16 -16
- package/coverage/index.html +1 -1
- package/es/ActionButton/ActionButton.js +10 -1
- package/es/ActionButton/ActionButton.module.css +7 -0
- package/es/ActionButton/props/propTypes.js +2 -1
- package/es/AlphabeticList/AlphabeticList.module.css +2 -0
- package/es/AttachmentViewer/AttachmentViewer.module.css +2 -0
- package/es/ChannelIcon/ChannelIcon.module.css +4 -0
- package/es/Drawer/Drawer.js +2 -5
- package/es/FormAction/FormAction.module.css +2 -0
- package/es/IconButton/IconButton.module.css +1 -0
- package/es/Link/Link.js +1 -2
- package/es/Provider/Config.js +2 -1
- package/es/TagWithIcon/TagWithIcon.module.css +19 -5
- package/es/avatar/AvatarIcon/AvatarIcon.module.css +6 -0
- package/es/avatar/AvatarStatus/AvatarStatus.js +0 -1
- package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -0
- package/es/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
- package/es/layout/SubtabLayout/SubtabLayout.module.css +2 -0
- package/es/list/Comment/Comment.module.css +1 -0
- package/es/list/Dot/Dot.module.css +1 -0
- package/es/list/ListLayout/ListLayout.js +1 -1
- package/es/list/ListLayout/ListLayout.module.css +12 -0
- package/es/list/Subject/Subject.module.css +1 -0
- package/es/list/Thread/Thread.module.css +1 -0
- package/es/list/status/StatusDropdown/StatusDropdown.js +6 -6
- package/es/lookup/Lookup/Lookup.js +1 -1
- package/es/setup/header/Search/Search.module.css +1 -0
- package/es/setup/table/TableRow/SetupTableRow.module.css +3 -2
- package/es/v1/ActionButton/ActionButton.js +7 -2
- package/es/v1/Drawer/Drawer.js +2 -5
- package/es/v1/Link/Link.js +1 -2
- package/es/v1/avatar/AvatarStatus/AvatarStatus.js +0 -1
- package/es/v1/list/ListLayout/ListLayout.js +1 -1
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +6 -6
- package/es/v1/lookup/Lookup/Lookup.js +1 -1
- package/es/v1/notification/DesktopNotification/DesktopNotification.js +79 -55
- package/es/v1/notification/DesktopNotification/props/defaultProps.js +3 -1
- package/es/v1/notification/DesktopNotification/props/propTypes.js +2 -1
- package/es/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +59 -23
- package/es/v1/notification/DesktopNotificationHeader/props/defaultProps.js +3 -1
- package/es/v1/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
- package/es/v1/setup/header/Button/Button.js +17 -29
- package/es/v1/setup/header/Link/Link.js +23 -35
- package/es/v1/setup/header/Search/Search.js +43 -69
- package/es/v1/setup/header/Views/Views.js +27 -39
- package/es/v1/setup/helptips/Description/Description.js +8 -20
- package/es/v1/setup/helptips/Link/Link.js +20 -32
- package/es/v1/setup/helptips/ListGroup/ListGroup.js +18 -30
- package/es/v1/setup/helptips/Title/Title.js +8 -20
- package/es/version2/GlobalNotification/GlobalNotification.module.css +3 -0
- package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -0
- package/es/version2/notification/DesktopNotification/DesktopNotification.js +78 -55
- package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +10 -4
- package/es/version2/notification/DesktopNotification/props/defaultProps.js +3 -1
- package/es/version2/notification/DesktopNotification/props/propTypes.js +2 -1
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +59 -23
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +14 -17
- package/es/version2/notification/DesktopNotificationHeader/props/defaultProps.js +3 -1
- package/es/version2/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
- package/lib/ActionButton/ActionButton.js +41 -32
- package/lib/ActionButton/ActionButton.module.css +7 -0
- package/lib/ActionButton/props/propTypes.js +2 -1
- package/lib/AlphabeticList/AlphabeticList.module.css +2 -0
- package/lib/AttachmentViewer/AttachmentViewer.module.css +2 -0
- package/lib/ChannelIcon/ChannelIcon.module.css +4 -0
- package/lib/Drawer/Drawer.js +2 -5
- package/lib/FormAction/FormAction.module.css +2 -0
- package/lib/IconButton/IconButton.module.css +1 -0
- package/lib/Link/Link.js +1 -2
- package/lib/Provider/Config.js +2 -1
- package/lib/TagWithIcon/TagWithIcon.module.css +19 -5
- package/lib/avatar/AvatarIcon/AvatarIcon.module.css +6 -0
- package/lib/avatar/AvatarStatus/AvatarStatus.js +0 -1
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -0
- package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
- package/lib/layout/SubtabLayout/SubtabLayout.module.css +2 -0
- package/lib/list/Comment/Comment.module.css +1 -0
- package/lib/list/Dot/Dot.module.css +1 -0
- package/lib/list/ListLayout/ListLayout.js +1 -1
- package/lib/list/ListLayout/ListLayout.module.css +12 -0
- package/lib/list/Subject/Subject.module.css +1 -0
- package/lib/list/Thread/Thread.module.css +1 -0
- package/lib/list/status/StatusDropdown/StatusDropdown.js +6 -6
- package/lib/lookup/Lookup/Lookup.js +1 -1
- package/lib/setup/header/Search/Search.module.css +1 -0
- package/lib/setup/table/TableRow/SetupTableRow.module.css +3 -2
- package/lib/v1/ActionButton/ActionButton.js +7 -2
- package/lib/v1/Drawer/Drawer.js +2 -5
- package/lib/v1/Link/Link.js +1 -2
- package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +0 -1
- package/lib/v1/list/ListLayout/ListLayout.js +1 -1
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +6 -6
- package/lib/v1/lookup/Lookup/Lookup.js +1 -1
- package/lib/v1/notification/DesktopNotification/DesktopNotification.js +74 -55
- package/lib/v1/notification/DesktopNotification/props/defaultProps.js +5 -1
- package/lib/v1/notification/DesktopNotification/props/propTypes.js +2 -1
- package/lib/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +57 -23
- package/lib/v1/notification/DesktopNotificationHeader/props/defaultProps.js +5 -1
- package/lib/v1/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
- package/lib/v1/setup/header/Button/Button.js +17 -63
- package/lib/v1/setup/header/Link/Link.js +23 -69
- package/lib/v1/setup/header/Search/Search.js +57 -89
- package/lib/v1/setup/header/Views/Views.js +27 -73
- package/lib/v1/setup/helptips/Description/Description.js +8 -53
- package/lib/v1/setup/helptips/Link/Link.js +23 -69
- package/lib/v1/setup/helptips/ListGroup/ListGroup.js +26 -72
- package/lib/v1/setup/helptips/Title/Title.js +8 -53
- package/lib/version2/GlobalNotification/GlobalNotification.module.css +3 -0
- package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -0
- package/lib/version2/notification/DesktopNotification/DesktopNotification.js +74 -55
- package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +10 -4
- package/lib/version2/notification/DesktopNotification/props/defaultProps.js +5 -1
- package/lib/version2/notification/DesktopNotification/props/propTypes.js +2 -1
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +57 -23
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +14 -17
- package/lib/version2/notification/DesktopNotificationHeader/props/defaultProps.js +5 -1
- package/lib/version2/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
- package/package.json +15 -13
- package/propValidationArg.json +8 -0
- package/result.json +1 -1
|
@@ -247,8 +247,8 @@ function StatusDropdown(props) {
|
|
|
247
247
|
dataId: dataId,
|
|
248
248
|
onClick: removeClose,
|
|
249
249
|
disabled: isDisabled || isReadOnly ? true : false,
|
|
250
|
-
"aria-haspopup":
|
|
251
|
-
"aria-expanded":
|
|
250
|
+
"aria-haspopup": isSearch ? 'listbox' : 'menu',
|
|
251
|
+
"aria-expanded": isPopupReady && isEditable ? true : false,
|
|
252
252
|
tabIndex: tabIndex,
|
|
253
253
|
"aria-labelledby": ariaLabelledby,
|
|
254
254
|
"aria-label": ariaLabel,
|
|
@@ -307,10 +307,10 @@ function StatusDropdown(props) {
|
|
|
307
307
|
inputRef: searchInputRef,
|
|
308
308
|
onKeyDown: handleKeyDown,
|
|
309
309
|
a11y: {
|
|
310
|
-
ariaHaspopup:
|
|
311
|
-
ariaExpanded:
|
|
310
|
+
ariaHaspopup: isSearch ? 'listbox' : 'menu',
|
|
311
|
+
ariaExpanded: isPopupReady,
|
|
312
312
|
role: 'combobox',
|
|
313
|
-
ariaActivedescendant: value,
|
|
313
|
+
ariaActivedescendant: isPopupReady ? value : '',
|
|
314
314
|
ariaOwns: ariaTitleId
|
|
315
315
|
}
|
|
316
316
|
})) : null, title && optionsList.length != 0 && /*#__PURE__*/React.createElement(Box, {
|
|
@@ -332,7 +332,7 @@ function StatusDropdown(props) {
|
|
|
332
332
|
onScroll: handleScroll,
|
|
333
333
|
role: isSearch ? 'listbox' : 'menu',
|
|
334
334
|
"aria-labelledby": ariaTitleId,
|
|
335
|
-
tabindex: "
|
|
335
|
+
tabindex: "-1"
|
|
336
336
|
}, optionsList.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, optionsList.map((item, i) => /*#__PURE__*/React.createElement(React.Fragment, {
|
|
337
337
|
key: i
|
|
338
338
|
}, /*#__PURE__*/React.createElement(StatusListItem, {
|
|
@@ -45,7 +45,7 @@ export default function Lookup(props) {
|
|
|
45
45
|
needRestoreFocus = true,
|
|
46
46
|
needListNavigation = false,
|
|
47
47
|
needFocusLoop = true,
|
|
48
|
-
needEnterAction =
|
|
48
|
+
needEnterAction = true
|
|
49
49
|
} = focusScopeProps;
|
|
50
50
|
const createRef = useRef(null);
|
|
51
51
|
const handleKeyDown = useCallback(e => {
|
|
@@ -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(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
"
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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__) {
|
|
@@ -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
|
};
|
|
@@ -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
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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;
|
|
32
|
-
// Button.docs = {
|
|
33
|
-
// componentGroup: 'Header',
|
|
34
|
-
// folderName: 'Setup'
|
|
35
|
-
// };
|
|
36
|
-
// }
|
|
24
|
+
Button.propTypes = propTypes;
|
|
@@ -5,40 +5,28 @@ import { Icon } from '@zohodesk/icons';
|
|
|
5
5
|
import { Box } from '@zohodesk/components/es/v1/Layout';
|
|
6
6
|
import ExternalLink from '../../../ExternalLink/ExternalLink';
|
|
7
7
|
import style from '../../../../setup/header/Link/HeaderLink.module.css';
|
|
8
|
-
export default
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
iconClass: iconClass ? iconClass : ''
|
|
31
|
-
})), /*#__PURE__*/React.createElement(Box, {
|
|
32
|
-
className: style.text,
|
|
33
|
-
flexible: true
|
|
34
|
-
}, text));
|
|
35
|
-
}
|
|
36
|
-
|
|
8
|
+
export default function Link(props) {
|
|
9
|
+
let {
|
|
10
|
+
url,
|
|
11
|
+
text,
|
|
12
|
+
iconName,
|
|
13
|
+
iconClass,
|
|
14
|
+
iconSize
|
|
15
|
+
} = props;
|
|
16
|
+
return /*#__PURE__*/React.createElement(ExternalLink, {
|
|
17
|
+
className: style.container,
|
|
18
|
+
href: url
|
|
19
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
20
|
+
className: style.icon
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
22
|
+
isBold: true,
|
|
23
|
+
name: iconName,
|
|
24
|
+
size: iconSize,
|
|
25
|
+
iconClass: iconClass ? iconClass : ''
|
|
26
|
+
})), /*#__PURE__*/React.createElement(Box, {
|
|
27
|
+
className: style.text,
|
|
28
|
+
flexible: true
|
|
29
|
+
}, text));
|
|
37
30
|
}
|
|
38
31
|
Link.defaultProps = defaultProps;
|
|
39
|
-
Link.propTypes = propTypes;
|
|
40
|
-
// Link.docs = {
|
|
41
|
-
// componentGroup: 'Header',
|
|
42
|
-
// folderName: 'Setup'
|
|
43
|
-
// };
|
|
44
|
-
// }
|
|
32
|
+
Link.propTypes = propTypes;
|
|
@@ -1,81 +1,55 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import { defaultProps } from '../../../../setup/header/Search/props/defaultProps';
|
|
3
3
|
import { propTypes } from '../../../../setup/header/Search/props/propTypes';
|
|
4
4
|
import { Icon } from '@zohodesk/icons';
|
|
5
5
|
import TextBox from '@zohodesk/components/es/v1/TextBox/TextBox';
|
|
6
6
|
import style from '../../../../setup/header/Search/Search.module.css';
|
|
7
|
-
export default
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
export default function Search(props) {
|
|
8
|
+
let {
|
|
9
|
+
placeHolder,
|
|
10
|
+
maxLength,
|
|
11
|
+
value,
|
|
12
|
+
onChange,
|
|
13
|
+
onKeyPress,
|
|
14
|
+
onFocus,
|
|
15
|
+
onBlur,
|
|
16
|
+
customClass
|
|
17
|
+
} = props;
|
|
18
|
+
let [isFocus, setIsFocus] = useState(false);
|
|
19
|
+
let [resetValue] = useState(value || '');
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
onFocus
|
|
24
|
-
} = this.props;
|
|
25
|
-
this.setState({
|
|
26
|
-
isFocus: true
|
|
27
|
-
});
|
|
21
|
+
const handleFocus = (id, name, value) => {
|
|
22
|
+
setIsFocus(true);
|
|
28
23
|
onFocus && onFocus(id, name, value);
|
|
29
|
-
}
|
|
24
|
+
};
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
this.state.value == '' && this.setState({
|
|
36
|
-
isFocus: false
|
|
37
|
-
});
|
|
38
|
-
onBlur && onBlur(id, name, value);
|
|
39
|
-
}
|
|
26
|
+
const handleBlur = (id, name, value) => {
|
|
27
|
+
if (resetValue == '') {
|
|
28
|
+
setIsFocus(false);
|
|
29
|
+
}
|
|
40
30
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
placeHolder,
|
|
44
|
-
maxLength,
|
|
45
|
-
value,
|
|
46
|
-
onChange,
|
|
47
|
-
onKeyPress,
|
|
48
|
-
customClass
|
|
49
|
-
} = this.props;
|
|
50
|
-
let {
|
|
51
|
-
isFocus
|
|
52
|
-
} = this.state;
|
|
53
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: `${style.container} ${isFocus ? style.active : ''} ${customClass}`
|
|
55
|
-
}, /*#__PURE__*/React.createElement(TextBox, {
|
|
56
|
-
placeHolder: placeHolder,
|
|
57
|
-
customClass: style.input,
|
|
58
|
-
maxLength: maxLength,
|
|
59
|
-
value: value,
|
|
60
|
-
onChange: onChange,
|
|
61
|
-
onKeyUp: onKeyPress,
|
|
62
|
-
onFocus: this.onFocus,
|
|
63
|
-
needAppearance: false,
|
|
64
|
-
onBlur: this.onBlur
|
|
65
|
-
}), value != '' && value ? /*#__PURE__*/React.createElement("span", {
|
|
66
|
-
className: style.icon,
|
|
67
|
-
onClick: this.onBlur
|
|
68
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
69
|
-
name: "ZD-close",
|
|
70
|
-
size: "19"
|
|
71
|
-
})) : null);
|
|
72
|
-
}
|
|
31
|
+
onBlur && onBlur(id, name, value);
|
|
32
|
+
};
|
|
73
33
|
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: `${style.container} ${isFocus ? style.active : ''} ${customClass}`
|
|
36
|
+
}, /*#__PURE__*/React.createElement(TextBox, {
|
|
37
|
+
placeHolder: placeHolder,
|
|
38
|
+
customClass: style.input,
|
|
39
|
+
maxLength: maxLength,
|
|
40
|
+
value: value,
|
|
41
|
+
onChange: onChange,
|
|
42
|
+
onKeyUp: onKeyPress,
|
|
43
|
+
onFocus: handleFocus,
|
|
44
|
+
needAppearance: false,
|
|
45
|
+
onBlur: handleBlur
|
|
46
|
+
}), value != '' && value ? /*#__PURE__*/React.createElement("span", {
|
|
47
|
+
className: style.icon,
|
|
48
|
+
onClick: handleBlur
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
50
|
+
name: "ZD-close",
|
|
51
|
+
size: "19"
|
|
52
|
+
})) : null);
|
|
74
53
|
}
|
|
75
54
|
Search.propTypes = propTypes;
|
|
76
|
-
Search.defaultProps = defaultProps;
|
|
77
|
-
// Search.docs = {
|
|
78
|
-
// componentGroup: 'Header',
|
|
79
|
-
// folderName: 'Setup'
|
|
80
|
-
// };
|
|
81
|
-
// }
|
|
55
|
+
Search.defaultProps = defaultProps;
|