@zohodesk/dot 1.0.0-beta.203 → 1.0.0-beta.204
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/README.md +5 -0
- package/es/Appearance/dark/mode/dotDarkMode.module.css +2 -1
- package/es/Appearance/dark/themes/blue/blueDarkDotTheme.module.css +1 -1
- package/es/Appearance/default/mode/dotDefaultMode.module.css +2 -1
- package/es/Appearance/default/themes/blue/blueDefaultDotTheme.module.css +1 -1
- package/es/version2/GlobalNotification/GlobalNotification.js +18 -6
- package/es/version2/notification/DesktopNotification/DesktopNotification.js +13 -5
- package/lib/Appearance/dark/mode/dotDarkMode.module.css +2 -1
- package/lib/Appearance/dark/themes/blue/blueDarkDotTheme.module.css +1 -1
- package/lib/Appearance/default/mode/dotDefaultMode.module.css +2 -1
- package/lib/Appearance/default/themes/blue/blueDefaultDotTheme.module.css +1 -1
- package/lib/version2/GlobalNotification/GlobalNotification.js +18 -6
- package/lib/version2/notification/DesktopNotification/DesktopNotification.js +13 -5
- package/package.json +3 -3
- package/src/Appearance/dark/mode/dotDarkMode.module.css +2 -1
- package/src/Appearance/dark/themes/blue/blueDarkDotTheme.module.css +1 -1
- package/src/Appearance/default/mode/dotDefaultMode.module.css +2 -1
- package/src/Appearance/default/themes/blue/blueDefaultDotTheme.module.css +1 -1
- package/src/version2/GlobalNotification/GlobalNotification.js +12 -4
- package/src/version2/notification/DesktopNotification/DesktopNotification.js +10 -3
package/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.0.0-beta.204
|
|
6
|
+
|
|
7
|
+
- blueDefaultTheme & blueDarkTheme class name added in Mode & Blue DotTheme files
|
|
8
|
+
- GlobalNotification, DesktopNotification => customProps prop added
|
|
9
|
+
|
|
5
10
|
# 1.0.0-beta.203
|
|
6
11
|
|
|
7
12
|
- ListLayout => active, keyboarActive css priority fixed
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[data-mode='dark'] {
|
|
1
|
+
[data-mode='dark'], :global(.blueDarkTheme) [data-desk-theme="blue"] {
|
|
2
2
|
/* action button */
|
|
3
3
|
--zdt_actionButton_primaryFilled_bg: var(--zdt_cta_primary_bg);
|
|
4
4
|
--zdt_actionButton_primaryFilled_hover_bg: var(--zdt_cta_primary_hover_bg);
|
|
@@ -457,6 +457,7 @@
|
|
|
457
457
|
--zdt_commonalert_close_hover_bg: #583a45;
|
|
458
458
|
--zdt_commonalert_success_hover_bg: #2c4e42;
|
|
459
459
|
--zdt_commonalert_info_hover_bg: var(--zdt_cta_primary_light_bg);
|
|
460
|
+
--zdt_commonalert_plaininfo_hover_bg: #262f3d;
|
|
460
461
|
--zdt_commonalert_danger_hover_bg: #583a45;
|
|
461
462
|
--zdt_commonalert_error_hover_bg: #583a45;
|
|
462
463
|
--zdt_commonalert_warning_hover_bg: #583c2c;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[data-mode='default'] {
|
|
1
|
+
[data-mode='default'], :global(.blueDefaultTheme) [data-desk-theme="blue"] {
|
|
2
2
|
/* action button */
|
|
3
3
|
--zdt_actionButton_primaryFilled_bg: var(--zdt_cta_primary_bg);
|
|
4
4
|
--zdt_actionButton_primaryFilled_hover_bg: var(--zdt_cta_primary_hover_bg);
|
|
@@ -457,6 +457,7 @@
|
|
|
457
457
|
--zdt_commonalert_close_hover_bg: var(--dot_bg_paleRed);
|
|
458
458
|
--zdt_commonalert_success_hover_bg: #e9f7ef;
|
|
459
459
|
--zdt_commonalert_info_hover_bg: var(--zdt_cta_primary_light_bg);
|
|
460
|
+
--zdt_commonalert_plaininfo_hover_bg: var(--dot_bg_lavender);
|
|
460
461
|
--zdt_commonalert_danger_hover_bg: var(--dot_bg_paleRed);
|
|
461
462
|
--zdt_commonalert_error_hover_bg: var(--dot_bg_paleRed);
|
|
462
463
|
--zdt_commonalert_warning_hover_bg: #fff1e6;
|
|
@@ -50,7 +50,8 @@ export default class GlobalNotification extends React.Component {
|
|
|
50
50
|
message,
|
|
51
51
|
hideMessage,
|
|
52
52
|
onClick,
|
|
53
|
-
i18nKeys = {}
|
|
53
|
+
i18nKeys = {},
|
|
54
|
+
customProps
|
|
54
55
|
} = this.props;
|
|
55
56
|
let {
|
|
56
57
|
closeTitle = 'Close'
|
|
@@ -60,7 +61,8 @@ export default class GlobalNotification extends React.Component {
|
|
|
60
61
|
message: message,
|
|
61
62
|
hideMessage: hideMessage,
|
|
62
63
|
onClick: onClick,
|
|
63
|
-
closeTitle: closeTitle
|
|
64
|
+
closeTitle: closeTitle,
|
|
65
|
+
customProps: customProps
|
|
64
66
|
});
|
|
65
67
|
}
|
|
66
68
|
|
|
@@ -72,7 +74,13 @@ GlobalNotification.propTypes = {
|
|
|
72
74
|
onClick: PropTypes.func,
|
|
73
75
|
showMessage: PropTypes.bool,
|
|
74
76
|
type: PropTypes.oneOf(['success', 'danger', 'info', 'warning', 'error']),
|
|
75
|
-
i18nKeys: PropTypes.object
|
|
77
|
+
i18nKeys: PropTypes.object,
|
|
78
|
+
customProps: PropTypes.shape({
|
|
79
|
+
ExtraProps: PropTypes.object
|
|
80
|
+
})
|
|
81
|
+
};
|
|
82
|
+
GlobalNotification.defaultProps = {
|
|
83
|
+
customProps: {}
|
|
76
84
|
};
|
|
77
85
|
|
|
78
86
|
if (false) {
|
|
@@ -96,12 +104,16 @@ export function GlobalNotificationUI(props) {
|
|
|
96
104
|
type = '',
|
|
97
105
|
message,
|
|
98
106
|
onClick,
|
|
99
|
-
closeTitle = ''
|
|
107
|
+
closeTitle = '',
|
|
108
|
+
customProps = {}
|
|
100
109
|
} = props;
|
|
101
|
-
|
|
110
|
+
let {
|
|
111
|
+
ExtraProps = {}
|
|
112
|
+
} = customProps;
|
|
113
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
102
114
|
className: `${style.message} ${type ? style[type] : ''}`,
|
|
103
115
|
"data-id": `show_${type}_message`
|
|
104
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
116
|
+
}, ExtraProps), /*#__PURE__*/React.createElement(Container, {
|
|
105
117
|
className: `${style.container}`,
|
|
106
118
|
alignBox: "row",
|
|
107
119
|
isCover: false,
|
|
@@ -57,7 +57,8 @@ export function DesktopNotificationUI(props) {
|
|
|
57
57
|
onClose,
|
|
58
58
|
needClose,
|
|
59
59
|
customClass = {},
|
|
60
|
-
i18nKeys = {}
|
|
60
|
+
i18nKeys = {},
|
|
61
|
+
customProps
|
|
61
62
|
} = props;
|
|
62
63
|
let {
|
|
63
64
|
closeTitle = 'Close'
|
|
@@ -68,6 +69,9 @@ export function DesktopNotificationUI(props) {
|
|
|
68
69
|
let {
|
|
69
70
|
buttonPalette = 'dangerFilled'
|
|
70
71
|
} = buttonPaletteObject[type] || {};
|
|
72
|
+
let {
|
|
73
|
+
ExtraProps = {}
|
|
74
|
+
} = customProps;
|
|
71
75
|
|
|
72
76
|
function onClickSubmit(e) {
|
|
73
77
|
onSubmit && onSubmit();
|
|
@@ -88,12 +92,12 @@ export function DesktopNotificationUI(props) {
|
|
|
88
92
|
style: needAutoZindex && isAnimate ? {
|
|
89
93
|
zIndex: `${Zindex}`
|
|
90
94
|
} : {}
|
|
91
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Container, _extends({
|
|
92
96
|
className: `${style.container} ${isAnimate ? animateClass : animateRemoveClass} ${style[`${size}`] ? style[`${size}`] : ''} ${isShrinkView ? style.globalNotify : ''} ${containerClass}`,
|
|
93
97
|
isCover: false,
|
|
94
98
|
dataId: dataId,
|
|
95
99
|
isInline: uiVariantTwo
|
|
96
|
-
}, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(DesktopNotificationHeader, {
|
|
100
|
+
}, ExtraProps), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(DesktopNotificationHeader, {
|
|
97
101
|
type: type,
|
|
98
102
|
title: title,
|
|
99
103
|
variant: titleVariant,
|
|
@@ -177,7 +181,10 @@ DesktopNotification.propTypes = {
|
|
|
177
181
|
submitText: PropTypes.string,
|
|
178
182
|
submitType: PropTypes.oneOf(['primary', 'danger', 'success']),
|
|
179
183
|
titleVariant: PropTypes.oneOf(['primary', 'secondary']),
|
|
180
|
-
type: PropTypes.oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification', 'alarm'])
|
|
184
|
+
type: PropTypes.oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification', 'alarm']),
|
|
185
|
+
customProps: PropTypes.shape({
|
|
186
|
+
ExtraProps: PropTypes.object
|
|
187
|
+
})
|
|
181
188
|
};
|
|
182
189
|
DesktopNotification.defaultProps = {
|
|
183
190
|
isMore: false,
|
|
@@ -190,7 +197,8 @@ DesktopNotification.defaultProps = {
|
|
|
190
197
|
needIcon: true,
|
|
191
198
|
titleVariant: 'primary',
|
|
192
199
|
isShrinkView: false,
|
|
193
|
-
needClose: true
|
|
200
|
+
needClose: true,
|
|
201
|
+
customProps: {}
|
|
194
202
|
};
|
|
195
203
|
|
|
196
204
|
if (false) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[data-mode='dark'] {
|
|
1
|
+
[data-mode='dark'], :global(.blueDarkTheme) [data-desk-theme="blue"] {
|
|
2
2
|
/* action button */
|
|
3
3
|
--zdt_actionButton_primaryFilled_bg: var(--zdt_cta_primary_bg);
|
|
4
4
|
--zdt_actionButton_primaryFilled_hover_bg: var(--zdt_cta_primary_hover_bg);
|
|
@@ -457,6 +457,7 @@
|
|
|
457
457
|
--zdt_commonalert_close_hover_bg: #583a45;
|
|
458
458
|
--zdt_commonalert_success_hover_bg: #2c4e42;
|
|
459
459
|
--zdt_commonalert_info_hover_bg: var(--zdt_cta_primary_light_bg);
|
|
460
|
+
--zdt_commonalert_plaininfo_hover_bg: #262f3d;
|
|
460
461
|
--zdt_commonalert_danger_hover_bg: #583a45;
|
|
461
462
|
--zdt_commonalert_error_hover_bg: #583a45;
|
|
462
463
|
--zdt_commonalert_warning_hover_bg: #583c2c;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[data-mode='default'] {
|
|
1
|
+
[data-mode='default'], :global(.blueDefaultTheme) [data-desk-theme="blue"] {
|
|
2
2
|
/* action button */
|
|
3
3
|
--zdt_actionButton_primaryFilled_bg: var(--zdt_cta_primary_bg);
|
|
4
4
|
--zdt_actionButton_primaryFilled_hover_bg: var(--zdt_cta_primary_hover_bg);
|
|
@@ -457,6 +457,7 @@
|
|
|
457
457
|
--zdt_commonalert_close_hover_bg: var(--dot_bg_paleRed);
|
|
458
458
|
--zdt_commonalert_success_hover_bg: #e9f7ef;
|
|
459
459
|
--zdt_commonalert_info_hover_bg: var(--zdt_cta_primary_light_bg);
|
|
460
|
+
--zdt_commonalert_plaininfo_hover_bg: var(--dot_bg_lavender);
|
|
460
461
|
--zdt_commonalert_danger_hover_bg: var(--dot_bg_paleRed);
|
|
461
462
|
--zdt_commonalert_error_hover_bg: var(--dot_bg_paleRed);
|
|
462
463
|
--zdt_commonalert_warning_hover_bg: #fff1e6;
|
|
@@ -102,7 +102,8 @@ var GlobalNotification = /*#__PURE__*/function (_React$Component) {
|
|
|
102
102
|
hideMessage = _this$props3.hideMessage,
|
|
103
103
|
onClick = _this$props3.onClick,
|
|
104
104
|
_this$props3$i18nKeys = _this$props3.i18nKeys,
|
|
105
|
-
i18nKeys = _this$props3$i18nKeys === void 0 ? {} : _this$props3$i18nKeys
|
|
105
|
+
i18nKeys = _this$props3$i18nKeys === void 0 ? {} : _this$props3$i18nKeys,
|
|
106
|
+
customProps = _this$props3.customProps;
|
|
106
107
|
var _i18nKeys$closeTitle = i18nKeys.closeTitle,
|
|
107
108
|
closeTitle = _i18nKeys$closeTitle === void 0 ? 'Close' : _i18nKeys$closeTitle;
|
|
108
109
|
return /*#__PURE__*/_react["default"].createElement(GlobalNotificationUI, {
|
|
@@ -110,7 +111,8 @@ var GlobalNotification = /*#__PURE__*/function (_React$Component) {
|
|
|
110
111
|
message: message,
|
|
111
112
|
hideMessage: hideMessage,
|
|
112
113
|
onClick: onClick,
|
|
113
|
-
closeTitle: closeTitle
|
|
114
|
+
closeTitle: closeTitle,
|
|
115
|
+
customProps: customProps
|
|
114
116
|
});
|
|
115
117
|
}
|
|
116
118
|
}]);
|
|
@@ -126,7 +128,13 @@ GlobalNotification.propTypes = {
|
|
|
126
128
|
onClick: _propTypes["default"].func,
|
|
127
129
|
showMessage: _propTypes["default"].bool,
|
|
128
130
|
type: _propTypes["default"].oneOf(['success', 'danger', 'info', 'warning', 'error']),
|
|
129
|
-
i18nKeys: _propTypes["default"].object
|
|
131
|
+
i18nKeys: _propTypes["default"].object,
|
|
132
|
+
customProps: _propTypes["default"].shape({
|
|
133
|
+
ExtraProps: _propTypes["default"].object
|
|
134
|
+
})
|
|
135
|
+
};
|
|
136
|
+
GlobalNotification.defaultProps = {
|
|
137
|
+
customProps: {}
|
|
130
138
|
};
|
|
131
139
|
|
|
132
140
|
if (false) {
|
|
@@ -149,11 +157,15 @@ function GlobalNotificationUI(props) {
|
|
|
149
157
|
message = props.message,
|
|
150
158
|
onClick = props.onClick,
|
|
151
159
|
_props$closeTitle = props.closeTitle,
|
|
152
|
-
closeTitle = _props$closeTitle === void 0 ? '' : _props$closeTitle
|
|
153
|
-
|
|
160
|
+
closeTitle = _props$closeTitle === void 0 ? '' : _props$closeTitle,
|
|
161
|
+
_props$customProps = props.customProps,
|
|
162
|
+
customProps = _props$customProps === void 0 ? {} : _props$customProps;
|
|
163
|
+
var _customProps$ExtraPro = customProps.ExtraProps,
|
|
164
|
+
ExtraProps = _customProps$ExtraPro === void 0 ? {} : _customProps$ExtraPro;
|
|
165
|
+
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
154
166
|
className: "".concat(_GlobalNotificationModule["default"].message, " ").concat(type ? _GlobalNotificationModule["default"][type] : ''),
|
|
155
167
|
"data-id": "show_".concat(type, "_message")
|
|
156
|
-
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
168
|
+
}, ExtraProps), /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
157
169
|
className: "".concat(_GlobalNotificationModule["default"].container),
|
|
158
170
|
alignBox: "row",
|
|
159
171
|
isCover: false,
|
|
@@ -85,7 +85,8 @@ function DesktopNotificationUI(props) {
|
|
|
85
85
|
_props$customClass = props.customClass,
|
|
86
86
|
customClass = _props$customClass === void 0 ? {} : _props$customClass,
|
|
87
87
|
_props$i18nKeys = props.i18nKeys,
|
|
88
|
-
i18nKeys = _props$i18nKeys === void 0 ? {} : _props$i18nKeys
|
|
88
|
+
i18nKeys = _props$i18nKeys === void 0 ? {} : _props$i18nKeys,
|
|
89
|
+
customProps = props.customProps;
|
|
89
90
|
var _i18nKeys$closeTitle = i18nKeys.closeTitle,
|
|
90
91
|
closeTitle = _i18nKeys$closeTitle === void 0 ? 'Close' : _i18nKeys$closeTitle;
|
|
91
92
|
var containerClass = customClass.containerClass;
|
|
@@ -94,6 +95,9 @@ function DesktopNotificationUI(props) {
|
|
|
94
95
|
_ref$buttonPalette = _ref.buttonPalette,
|
|
95
96
|
buttonPalette = _ref$buttonPalette === void 0 ? 'dangerFilled' : _ref$buttonPalette;
|
|
96
97
|
|
|
98
|
+
var _customProps$ExtraPro = customProps.ExtraProps,
|
|
99
|
+
ExtraProps = _customProps$ExtraPro === void 0 ? {} : _customProps$ExtraPro;
|
|
100
|
+
|
|
97
101
|
function onClickSubmit(e) {
|
|
98
102
|
onSubmit && onSubmit();
|
|
99
103
|
}
|
|
@@ -113,12 +117,12 @@ function DesktopNotificationUI(props) {
|
|
|
113
117
|
style: needAutoZindex && isAnimate ? {
|
|
114
118
|
zIndex: "".concat(Zindex)
|
|
115
119
|
} : {}
|
|
116
|
-
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
120
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, _extends({
|
|
117
121
|
className: "".concat(_DesktopNotificationModule["default"].container, " ").concat(isAnimate ? animateClass : animateRemoveClass, " ").concat(_DesktopNotificationModule["default"]["".concat(size)] ? _DesktopNotificationModule["default"]["".concat(size)] : '', " ").concat(isShrinkView ? _DesktopNotificationModule["default"].globalNotify : '', " ").concat(containerClass),
|
|
118
122
|
isCover: false,
|
|
119
123
|
dataId: dataId,
|
|
120
124
|
isInline: uiVariantTwo
|
|
121
|
-
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_DesktopNotificationHeader["default"], {
|
|
125
|
+
}, ExtraProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_DesktopNotificationHeader["default"], {
|
|
122
126
|
type: type,
|
|
123
127
|
title: title,
|
|
124
128
|
variant: titleVariant,
|
|
@@ -204,7 +208,10 @@ DesktopNotification.propTypes = {
|
|
|
204
208
|
submitText: _propTypes["default"].string,
|
|
205
209
|
submitType: _propTypes["default"].oneOf(['primary', 'danger', 'success']),
|
|
206
210
|
titleVariant: _propTypes["default"].oneOf(['primary', 'secondary']),
|
|
207
|
-
type: _propTypes["default"].oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification', 'alarm'])
|
|
211
|
+
type: _propTypes["default"].oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification', 'alarm']),
|
|
212
|
+
customProps: _propTypes["default"].shape({
|
|
213
|
+
ExtraProps: _propTypes["default"].object
|
|
214
|
+
})
|
|
208
215
|
};
|
|
209
216
|
DesktopNotification.defaultProps = {
|
|
210
217
|
isMore: false,
|
|
@@ -217,7 +224,8 @@ DesktopNotification.defaultProps = {
|
|
|
217
224
|
needIcon: true,
|
|
218
225
|
titleVariant: 'primary',
|
|
219
226
|
isShrinkView: false,
|
|
220
|
-
needClose: true
|
|
227
|
+
needClose: true,
|
|
228
|
+
customProps: {}
|
|
221
229
|
};
|
|
222
230
|
|
|
223
231
|
if (false) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/dot",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.204",
|
|
4
4
|
"main": "lib/index",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"jsnext:main": "es/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"velocity-react": "^1.4.3",
|
|
33
33
|
"@zohodesk/variables": "1.0.0-beta.25",
|
|
34
34
|
"@zohodesk/i18n": "^1.0.0-beta.7",
|
|
35
|
-
"@zohodesk/components": "1.0.0-alpha-
|
|
35
|
+
"@zohodesk/components": "1.0.0-alpha-221",
|
|
36
36
|
"@zohodesk/icons": "1.0.0-beta.85",
|
|
37
37
|
"@zohodesk/svg": "1.0.0-beta.37",
|
|
38
38
|
"@zohodesk/virtualizer": "1.0.3",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"velocity-react": "^1.4.3",
|
|
43
43
|
"@zohodesk/variables": "^1.0.0-beta.25",
|
|
44
44
|
"@zohodesk/i18n": "^1.0.0-beta.7",
|
|
45
|
-
"@zohodesk/components": "1.0.0-alpha-
|
|
45
|
+
"@zohodesk/components": "1.0.0-alpha-221",
|
|
46
46
|
"@zohodesk/icons": "^1.0.0-beta.85",
|
|
47
47
|
"@zohodesk/svg": "^1.0.0-beta.37"
|
|
48
48
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[data-mode='dark'] {
|
|
1
|
+
[data-mode='dark'], :global(.blueDarkTheme) [data-desk-theme="blue"] {
|
|
2
2
|
/* action button */
|
|
3
3
|
--zdt_actionButton_primaryFilled_bg: var(--zdt_cta_primary_bg);
|
|
4
4
|
--zdt_actionButton_primaryFilled_hover_bg: var(--zdt_cta_primary_hover_bg);
|
|
@@ -457,6 +457,7 @@
|
|
|
457
457
|
--zdt_commonalert_close_hover_bg: #583a45;
|
|
458
458
|
--zdt_commonalert_success_hover_bg: #2c4e42;
|
|
459
459
|
--zdt_commonalert_info_hover_bg: var(--zdt_cta_primary_light_bg);
|
|
460
|
+
--zdt_commonalert_plaininfo_hover_bg: #262f3d;
|
|
460
461
|
--zdt_commonalert_danger_hover_bg: #583a45;
|
|
461
462
|
--zdt_commonalert_error_hover_bg: #583a45;
|
|
462
463
|
--zdt_commonalert_warning_hover_bg: #583c2c;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[data-mode='default'] {
|
|
1
|
+
[data-mode='default'], :global(.blueDefaultTheme) [data-desk-theme="blue"] {
|
|
2
2
|
/* action button */
|
|
3
3
|
--zdt_actionButton_primaryFilled_bg: var(--zdt_cta_primary_bg);
|
|
4
4
|
--zdt_actionButton_primaryFilled_hover_bg: var(--zdt_cta_primary_hover_bg);
|
|
@@ -457,6 +457,7 @@
|
|
|
457
457
|
--zdt_commonalert_close_hover_bg: var(--dot_bg_paleRed);
|
|
458
458
|
--zdt_commonalert_success_hover_bg: #e9f7ef;
|
|
459
459
|
--zdt_commonalert_info_hover_bg: var(--zdt_cta_primary_light_bg);
|
|
460
|
+
--zdt_commonalert_plaininfo_hover_bg: var(--dot_bg_lavender);
|
|
460
461
|
--zdt_commonalert_danger_hover_bg: var(--dot_bg_paleRed);
|
|
461
462
|
--zdt_commonalert_error_hover_bg: var(--dot_bg_paleRed);
|
|
462
463
|
--zdt_commonalert_warning_hover_bg: #fff1e6;
|
|
@@ -36,7 +36,7 @@ export default class GlobalNotification extends React.Component {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
render() {
|
|
39
|
-
let { type, message, hideMessage, onClick,i18nKeys={} } = this.props;
|
|
39
|
+
let { type, message, hideMessage, onClick, i18nKeys={}, customProps } = this.props;
|
|
40
40
|
let { closeTitle = 'Close' } = i18nKeys;
|
|
41
41
|
return (
|
|
42
42
|
<GlobalNotificationUI
|
|
@@ -45,6 +45,7 @@ export default class GlobalNotification extends React.Component {
|
|
|
45
45
|
hideMessage={hideMessage}
|
|
46
46
|
onClick={onClick}
|
|
47
47
|
closeTitle={closeTitle}
|
|
48
|
+
customProps={customProps}
|
|
48
49
|
/>
|
|
49
50
|
);
|
|
50
51
|
}
|
|
@@ -56,8 +57,14 @@ GlobalNotification.propTypes = {
|
|
|
56
57
|
onClick: PropTypes.func,
|
|
57
58
|
showMessage: PropTypes.bool,
|
|
58
59
|
type: PropTypes.oneOf(['success', 'danger', 'info', 'warning', 'error']),
|
|
59
|
-
i18nKeys: PropTypes.object
|
|
60
|
+
i18nKeys: PropTypes.object,
|
|
61
|
+
customProps:PropTypes.shape({
|
|
62
|
+
ExtraProps: PropTypes.object
|
|
63
|
+
})
|
|
60
64
|
};
|
|
65
|
+
GlobalNotification.defaultProps = {
|
|
66
|
+
customProps: {}
|
|
67
|
+
}
|
|
61
68
|
if (__DOCS__) {
|
|
62
69
|
GlobalNotification.docs = {
|
|
63
70
|
componentGroup: 'GlobalNotification',
|
|
@@ -71,9 +78,10 @@ export function GlobalNotificationUI(props) {
|
|
|
71
78
|
hideMessage && hideMessage(e);
|
|
72
79
|
onClose && onClose(e);
|
|
73
80
|
}
|
|
74
|
-
let { type = '', message, onClick, closeTitle='' } = props;
|
|
81
|
+
let { type = '', message, onClick, closeTitle='', customProps={} } = props;
|
|
82
|
+
let { ExtraProps={} } = customProps;
|
|
75
83
|
return (
|
|
76
|
-
<div className={`${style.message} ${type ? style[type] : ''}`} data-id={`show_${type}_message`}>
|
|
84
|
+
<div className={`${style.message} ${type ? style[type] : ''}`} data-id={`show_${type}_message`} {...ExtraProps} >
|
|
77
85
|
<Container
|
|
78
86
|
className={`${style.container}`}
|
|
79
87
|
alignBox='row'
|
|
@@ -58,11 +58,13 @@ export function DesktopNotificationUI(props) {
|
|
|
58
58
|
onClose,
|
|
59
59
|
needClose,
|
|
60
60
|
customClass = {},
|
|
61
|
-
i18nKeys = {}
|
|
61
|
+
i18nKeys = {},
|
|
62
|
+
customProps
|
|
62
63
|
} = props;
|
|
63
64
|
let { closeTitle = 'Close' } = i18nKeys;
|
|
64
65
|
let { containerClass } = customClass;
|
|
65
66
|
let { buttonPalette = 'dangerFilled' } = buttonPaletteObject[type] || {};
|
|
67
|
+
let { ExtraProps={} } = customProps;
|
|
66
68
|
|
|
67
69
|
function onClickSubmit(e) {
|
|
68
70
|
onSubmit && onSubmit();
|
|
@@ -94,6 +96,7 @@ export function DesktopNotificationUI(props) {
|
|
|
94
96
|
isCover={false}
|
|
95
97
|
dataId={dataId}
|
|
96
98
|
isInline={uiVariantTwo}
|
|
99
|
+
{...ExtraProps}
|
|
97
100
|
>
|
|
98
101
|
<Box>
|
|
99
102
|
<DesktopNotificationHeader
|
|
@@ -227,7 +230,10 @@ DesktopNotification.propTypes = {
|
|
|
227
230
|
'info',
|
|
228
231
|
'notification',
|
|
229
232
|
'alarm'
|
|
230
|
-
])
|
|
233
|
+
]),
|
|
234
|
+
customProps:PropTypes.shape({
|
|
235
|
+
ExtraProps: PropTypes.object
|
|
236
|
+
})
|
|
231
237
|
};
|
|
232
238
|
DesktopNotification.defaultProps = {
|
|
233
239
|
isMore: false,
|
|
@@ -240,7 +246,8 @@ DesktopNotification.defaultProps = {
|
|
|
240
246
|
needIcon: true,
|
|
241
247
|
titleVariant: 'primary',
|
|
242
248
|
isShrinkView: false,
|
|
243
|
-
needClose: true
|
|
249
|
+
needClose: true,
|
|
250
|
+
customProps: {}
|
|
244
251
|
};
|
|
245
252
|
|
|
246
253
|
if (__DOCS__) {
|