@zohodesk/dot 1.0.0-beta.227 → 1.0.0-beta.229
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 +8 -0
- package/es/ActionButton/ActionButton.js +7 -3
- package/es/Provider.js +6 -104
- package/es/deprecated/SelectDropdown/SelectDropdown.js +59 -35
- package/es/deprecated/SelectDropdown/SelectDropdown.module.css +1 -0
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +183 -160
- package/es/dropdown/ToggleDropDown/ToggleDropDown.module.css +3 -0
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +93 -65
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +7 -3
- package/es/list/GridStencils/GridStencils.module.css +7 -18
- package/es/list/status/StatusDropdown/StatusDropdown.js +103 -80
- package/es/list/status/StatusDropdown/StatusDropdown.module.css +3 -0
- package/es/lookup/header/ViewDropDown/ViewDropDown.js +79 -54
- package/lib/ActionButton/ActionButton.js +7 -3
- package/lib/Provider.js +7 -122
- package/lib/deprecated/SelectDropdown/SelectDropdown.js +60 -38
- package/lib/deprecated/SelectDropdown/SelectDropdown.module.css +1 -0
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +182 -161
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.module.css +3 -0
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +91 -65
- package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +7 -3
- package/lib/list/GridStencils/GridStencils.module.css +7 -18
- package/lib/list/status/StatusDropdown/StatusDropdown.js +102 -81
- package/lib/list/status/StatusDropdown/StatusDropdown.module.css +3 -0
- package/lib/lookup/header/ViewDropDown/ViewDropDown.js +75 -52
- package/package.json +5 -5
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
.stenLoading {
|
|
2
2
|
position: relative;
|
|
3
|
-
width: var(--zd_size265);
|
|
4
3
|
background-color: var(--zdt_gridstencils_default_bg);
|
|
5
4
|
border-bottom: 1px solid var(--zdt_gridstencils_default_border);
|
|
6
|
-
padding: var(--zd_size13) var(--
|
|
7
|
-
margin:
|
|
5
|
+
padding: var(--zd_size13) var(--zd_size15) var(--zd_size11) var(--zd_size15);
|
|
6
|
+
margin-bottom: var(--zd_size10) ;
|
|
8
7
|
border-radius: var(--zd_size5);
|
|
9
8
|
}
|
|
10
9
|
[dir=ltr] .stenLoadbody {
|
|
@@ -28,7 +27,6 @@
|
|
|
28
27
|
[dir=rtl] .stenLoadbody::after {
|
|
29
28
|
left: var(--zd_size20);
|
|
30
29
|
}
|
|
31
|
-
|
|
32
30
|
.lineBar {
|
|
33
31
|
width: 90%;
|
|
34
32
|
}
|
|
@@ -54,14 +52,14 @@
|
|
|
54
52
|
background-repeat: no-repeat;
|
|
55
53
|
}
|
|
56
54
|
[dir=ltr] .stenListBAr {
|
|
57
|
-
-webkit-animation-duration:var(--zd_transition10);
|
|
55
|
+
-webkit-animation-duration: var(--zd_transition10);
|
|
58
56
|
-webkit-animation-fill-mode: forwards;
|
|
59
57
|
-webkit-animation-iteration-count: infinite;
|
|
60
58
|
-webkit-animation-name: placeHolderShimmer;
|
|
61
59
|
-webkit-animation-timing-function: linear;
|
|
62
60
|
}
|
|
63
61
|
[dir=rtl] .stenListBAr {
|
|
64
|
-
-webkit-animation-duration:var(--zd_transition10);
|
|
62
|
+
-webkit-animation-duration: var(--zd_transition10);
|
|
65
63
|
-webkit-animation-fill-mode: forwards;
|
|
66
64
|
-webkit-animation-iteration-count: infinite;
|
|
67
65
|
-webkit-animation-name: placeHolderShimmer;
|
|
@@ -104,13 +102,11 @@
|
|
|
104
102
|
[dir=rtl] .threeLayout .stenLoadbody::before {
|
|
105
103
|
right: var(--zd_size16);
|
|
106
104
|
}
|
|
107
|
-
|
|
108
105
|
[dir=ltr] .threeLayout .stenLoadbody {
|
|
109
|
-
margin: var(--zd_size8) var(--zd_size20) var(--zd_size8) 0
|
|
106
|
+
margin: var(--zd_size8) var(--zd_size20) var(--zd_size8) 0;
|
|
110
107
|
}
|
|
111
|
-
|
|
112
108
|
[dir=rtl] .threeLayout .stenLoadbody {
|
|
113
|
-
margin: var(--zd_size8) 0 var(--zd_size8) var(--zd_size20)
|
|
109
|
+
margin: var(--zd_size8) 0 var(--zd_size8) var(--zd_size20);
|
|
114
110
|
}
|
|
115
111
|
.threeLayout .stenLoadbody::after {
|
|
116
112
|
top: var(--zd_size15);
|
|
@@ -122,31 +118,24 @@
|
|
|
122
118
|
[dir=rtl] .threeLayout .stenLoadbody::after {
|
|
123
119
|
left: var(--zd_size20);
|
|
124
120
|
}
|
|
125
|
-
|
|
126
121
|
[dir=ltr] .leftCont .stenLoadbody::before {
|
|
127
122
|
left: var(--zd_size33);
|
|
128
123
|
}
|
|
129
|
-
|
|
130
124
|
[dir=rtl] .leftCont .stenLoadbody::before {
|
|
131
125
|
right: var(--zd_size33);
|
|
132
126
|
}
|
|
133
|
-
|
|
134
127
|
[dir=ltr] .leftCont .stenLoadbody {
|
|
135
128
|
margin: var(--zd_size8) var(--zd_size20) var(--zd_size8) var(--zd_size46);
|
|
136
129
|
}
|
|
137
|
-
|
|
138
130
|
[dir=rtl] .leftCont .stenLoadbody {
|
|
139
131
|
margin: var(--zd_size8) var(--zd_size46) var(--zd_size8) var(--zd_size20);
|
|
140
132
|
}
|
|
141
|
-
|
|
142
133
|
[dir=ltr] .leftCont .stenLoadbody::after {
|
|
143
134
|
right: var(--zd_size40);
|
|
144
135
|
}
|
|
145
|
-
|
|
146
136
|
[dir=rtl] .leftCont .stenLoadbody::after {
|
|
147
137
|
left: var(--zd_size40);
|
|
148
138
|
}
|
|
149
|
-
|
|
150
139
|
.leftCont .lineBar {
|
|
151
140
|
width: 80%;
|
|
152
141
|
}
|
|
@@ -155,4 +144,4 @@
|
|
|
155
144
|
}
|
|
156
145
|
.leftCont .lineBar3 {
|
|
157
146
|
width: 40%;
|
|
158
|
-
}
|
|
147
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
4
|
-
import DropBox from '@zohodesk/components/lib/DropBox/DropBox';
|
|
5
4
|
import Popup from '@zohodesk/components/lib/Popup/Popup';
|
|
6
5
|
import { Box, Container } from '@zohodesk/components/lib/Layout';
|
|
7
6
|
import DropDownHeading from '@zohodesk/components/lib/DropDown/DropDownHeading';
|
|
@@ -13,6 +12,8 @@ import TextBox from '@zohodesk/components/lib/TextBox/TextBox';
|
|
|
13
12
|
import CommonEmptyState from '../../../emptystate/CommonEmptyState/CommonEmptyState';
|
|
14
13
|
import StatusListItem from '../StatusListItem/StatusListItem';
|
|
15
14
|
import commonStyle from '@zohodesk/components/lib/common/common.module.css';
|
|
15
|
+
import ResponsiveDropBox from '@zohodesk/components/lib/ResponsiveDropBox/ResponsiveDropBox';
|
|
16
|
+
import { ResponsiveReceiver } from '@zohodesk/components/lib/Responsive/CustomResponsive';
|
|
16
17
|
import { getUniqueId } from '@zohodesk/components/lib/Provider/IdProvider';
|
|
17
18
|
import btnStyle from '@zohodesk/components/lib/semantic/Button/semanticButton.module.css';
|
|
18
19
|
import style from './StatusDropdown.module.css';
|
|
@@ -247,6 +248,17 @@ export class StatusDropdown extends React.Component {
|
|
|
247
248
|
}
|
|
248
249
|
}
|
|
249
250
|
|
|
251
|
+
responsiveFunc(_ref) {
|
|
252
|
+
let {
|
|
253
|
+
mediaQueryOR
|
|
254
|
+
} = _ref;
|
|
255
|
+
return {
|
|
256
|
+
tabletMode: mediaQueryOR([{
|
|
257
|
+
maxWidth: 700
|
|
258
|
+
}])
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
|
|
250
262
|
render() {
|
|
251
263
|
let {
|
|
252
264
|
options,
|
|
@@ -336,85 +348,96 @@ export class StatusDropdown extends React.Component {
|
|
|
336
348
|
name: "ZD-down",
|
|
337
349
|
iconClass: `${'toggleDropIcon'} ${style.arrow} ${style[`${arrowIconPosition}_arrow`]}`,
|
|
338
350
|
dataId: "statusdownarrow"
|
|
339
|
-
}) : null), isPopupOpen && isEditable ? /*#__PURE__*/React.createElement(
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
351
|
+
}) : null), isPopupOpen && isEditable ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
352
|
+
query: this.responsiveFunc,
|
|
353
|
+
responsiveId: "Helmet"
|
|
354
|
+
}, _ref2 => {
|
|
355
|
+
let {
|
|
356
|
+
tabletMode
|
|
357
|
+
} = _ref2;
|
|
358
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
359
|
+
boxPosition: position,
|
|
360
|
+
isActive: isPopupReady,
|
|
361
|
+
onClick: removeClose,
|
|
362
|
+
size: boxSize,
|
|
363
|
+
right: right,
|
|
364
|
+
left: left,
|
|
365
|
+
top: top,
|
|
366
|
+
bottom: bottom,
|
|
367
|
+
isArrow: isArrow,
|
|
368
|
+
isAnimate: true,
|
|
369
|
+
getRef: getContainerRef,
|
|
370
|
+
customClass: {
|
|
371
|
+
customDropBoxWrap: style.dropBoxContainer
|
|
372
|
+
},
|
|
373
|
+
needResponsive: needResponsive,
|
|
374
|
+
isResponsivePadding: true
|
|
375
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
|
|
376
|
+
className: style.search
|
|
377
|
+
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
378
|
+
placeHolder: placeHolderText,
|
|
379
|
+
onChange: this.handleChange,
|
|
380
|
+
value: searchString,
|
|
381
|
+
onClear: this.onSearchClear,
|
|
382
|
+
size: searchBoxSize,
|
|
383
|
+
inputRef: this.searchInputRef,
|
|
384
|
+
onKeyDown: this.handleKeyDown,
|
|
385
|
+
a11y: {
|
|
386
|
+
ariaHaspopup: true,
|
|
387
|
+
ariaExpanded: true,
|
|
388
|
+
role: 'combobox',
|
|
389
|
+
ariaActivedescendant: value,
|
|
390
|
+
ariaOwns: ariaTitleId
|
|
391
|
+
}
|
|
392
|
+
})) : null, title && options.length != 0 && /*#__PURE__*/React.createElement(Box, {
|
|
393
|
+
className: style.title
|
|
394
|
+
}, /*#__PURE__*/React.createElement(DropDownHeading, {
|
|
395
|
+
htmlId: ariaTitleId,
|
|
396
|
+
text: title,
|
|
397
|
+
a11y: {
|
|
398
|
+
role: 'heading'
|
|
399
|
+
}
|
|
400
|
+
})), /*#__PURE__*/React.createElement(Box, {
|
|
401
|
+
scroll: "vertical",
|
|
402
|
+
flexible: true,
|
|
403
|
+
shrink: true,
|
|
404
|
+
dataId: `${dataId}_list`,
|
|
405
|
+
className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
|
|
406
|
+
eleRef: this.scrollContentRef,
|
|
407
|
+
onScroll: this.handleScroll,
|
|
408
|
+
role: isSearch ? 'listbox' : 'menu',
|
|
409
|
+
"aria-labelledby": ariaTitleId,
|
|
410
|
+
tabindex: "0"
|
|
411
|
+
}, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) => /*#__PURE__*/React.createElement(React.Fragment, {
|
|
412
|
+
key: i
|
|
413
|
+
}, /*#__PURE__*/React.createElement(StatusListItem, {
|
|
414
|
+
dataId: `dataid_${i}`,
|
|
415
|
+
value: item[keyName],
|
|
416
|
+
id: item[idName],
|
|
417
|
+
active: value === item[keyName],
|
|
418
|
+
onClick: this.onSelect.bind(this, item),
|
|
419
|
+
index: i,
|
|
420
|
+
highlight: selectedIndex === i,
|
|
421
|
+
needTick: needTick,
|
|
422
|
+
needBorder: false,
|
|
423
|
+
onMouseEnter: this.handleMouseEnter,
|
|
424
|
+
getRef: this.itemRef,
|
|
425
|
+
bulletColor: item[statusColor],
|
|
426
|
+
title: item[keyName],
|
|
427
|
+
a11y: {
|
|
428
|
+
role: isSearch ? 'option' : 'menuitem',
|
|
429
|
+
ariaSelected: value === item[keyName]
|
|
430
|
+
}
|
|
431
|
+
})))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
|
|
432
|
+
className: style.svgWrapper,
|
|
433
|
+
title: searchErrorText || 'No results',
|
|
434
|
+
description: searchEmptyHint,
|
|
435
|
+
size: "small",
|
|
436
|
+
getEmptyState: this.emptySearchSVG
|
|
437
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
438
|
+
className: style.loader
|
|
439
|
+
}, /*#__PURE__*/React.createElement(Loader, null)))));
|
|
440
|
+
}) : null);
|
|
418
441
|
}
|
|
419
442
|
|
|
420
443
|
}
|
|
@@ -5,14 +5,15 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
|
|
6
6
|
import { SelectComponent } from '@zohodesk/components/lib/Select/Select';
|
|
7
7
|
import Popup from '@zohodesk/components/lib/Popup/Popup';
|
|
8
|
-
import DropBox from '@zohodesk/components/lib/DropBox/DropBox';
|
|
9
8
|
import ListItem from '@zohodesk/components/lib/ListItem/ListItem';
|
|
10
9
|
import DropDownSearch from '@zohodesk/components/lib/DropDown/DropDownSearch';
|
|
11
10
|
import { Card, CardHeader, CardContent } from '@zohodesk/components/lib/Card';
|
|
11
|
+
import ResponsiveDropBox from '@zohodesk/components/lib/ResponsiveDropBox/ResponsiveDropBox';
|
|
12
|
+
import { ResponsiveReceiver } from '@zohodesk/components/lib/Responsive/CustomResponsive';
|
|
12
13
|
/**** Icons ****/
|
|
13
14
|
|
|
14
15
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
15
|
-
import { Container } from '@zohodesk/components/lib/Layout';
|
|
16
|
+
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
16
17
|
import Loader from '@zohodesk/svg/lib/svg/Loader';
|
|
17
18
|
import style from './ViewDropDown.module.css';
|
|
18
19
|
/* eslint-disable react/forbid-component-props */
|
|
@@ -37,6 +38,17 @@ class DropDown extends SelectComponent {
|
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
|
|
41
|
+
responsiveFunc(_ref) {
|
|
42
|
+
let {
|
|
43
|
+
mediaQueryOR
|
|
44
|
+
} = _ref;
|
|
45
|
+
return {
|
|
46
|
+
tabletMode: mediaQueryOR([{
|
|
47
|
+
maxWidth: 700
|
|
48
|
+
}])
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
40
52
|
render() {
|
|
41
53
|
var _this = this;
|
|
42
54
|
|
|
@@ -80,58 +92,71 @@ class DropDown extends SelectComponent {
|
|
|
80
92
|
name: "ZD-down",
|
|
81
93
|
size: "7",
|
|
82
94
|
iconClass: style.arrowIcon
|
|
83
|
-
}))), isPopupOpen ? /*#__PURE__*/React.createElement(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
-
|
|
95
|
+
}))), isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
96
|
+
query: this.responsiveFunc,
|
|
97
|
+
responsiveId: "Helmet"
|
|
98
|
+
}, _ref2 => {
|
|
99
|
+
let {
|
|
100
|
+
tabletMode
|
|
101
|
+
} = _ref2;
|
|
102
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
103
|
+
isAnimate: true,
|
|
104
|
+
isArrow: false,
|
|
105
|
+
isActive: isPopupReady,
|
|
106
|
+
boxPosition: position || `${defaultDropBoxPosition}Center`,
|
|
107
|
+
getRef: getContainerRef,
|
|
108
|
+
onClick: removeClose,
|
|
109
|
+
animationStyle: animationStyle,
|
|
110
|
+
size: "large",
|
|
111
|
+
alignBox: "row",
|
|
112
|
+
isResponsivePadding: true
|
|
113
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
114
|
+
flexible: true
|
|
115
|
+
}, /*#__PURE__*/React.createElement(Card, null, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(DropDownSearch, {
|
|
116
|
+
value: searchStr,
|
|
117
|
+
onChange: this.handleSearch,
|
|
118
|
+
onKeyDown: this.onSearchKeyDown,
|
|
119
|
+
getRef: this.searchInputRef,
|
|
120
|
+
size: searchBoxSize,
|
|
121
|
+
variant: searchBoxVariant,
|
|
122
|
+
placeHolder: searchBoxPlaceHolder,
|
|
123
|
+
maxLength: maxLength
|
|
124
|
+
})) : null, /*#__PURE__*/React.createElement(CardContent, {
|
|
125
|
+
shrink: true,
|
|
126
|
+
eleRef: this.suggestionContainerRef,
|
|
127
|
+
customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : ''
|
|
128
|
+
}, suggestions.length ? /*#__PURE__*/React.createElement("div", {
|
|
129
|
+
className: style.listItemContainer
|
|
130
|
+
}, suggestions.map(function () {
|
|
131
|
+
let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
132
|
+
let index = arguments.length > 1 ? arguments[1] : undefined;
|
|
133
|
+
const {
|
|
134
|
+
id,
|
|
135
|
+
value
|
|
136
|
+
} = option;
|
|
137
|
+
return /*#__PURE__*/React.createElement(ListItem, {
|
|
138
|
+
active: id === selectedId,
|
|
139
|
+
getRef: _this.suggestionItemRef,
|
|
140
|
+
highlight: hoverIndex === index ? true : false,
|
|
141
|
+
id: id,
|
|
142
|
+
key: `${id}dropDown`,
|
|
143
|
+
onClick: _this.handleChange,
|
|
144
|
+
onMouseEnter: _this.handleMouseEnter,
|
|
145
|
+
size: "medium",
|
|
146
|
+
value: value,
|
|
147
|
+
index: index,
|
|
148
|
+
needTick: true,
|
|
149
|
+
needBorder: false
|
|
150
|
+
});
|
|
151
|
+
})) : isFetchingOptions ? /*#__PURE__*/React.createElement(Container, {
|
|
152
|
+
align: "both",
|
|
153
|
+
className: style.loader
|
|
154
|
+
}, /*#__PURE__*/React.createElement(Loader, null)) : searchStr ? /*#__PURE__*/React.createElement("div", {
|
|
155
|
+
className: style.emptyState
|
|
156
|
+
}, searchEmptyMessage || emptyMessage) : /*#__PURE__*/React.createElement("div", {
|
|
157
|
+
className: style.emptyState
|
|
158
|
+
}, emptyMessage)))));
|
|
159
|
+
}) : null);
|
|
135
160
|
}
|
|
136
161
|
|
|
137
162
|
}
|
|
@@ -19,7 +19,7 @@ var _Button = _interopRequireDefault(require("@zohodesk/components/lib/Button/Bu
|
|
|
19
19
|
|
|
20
20
|
var _Layout = require("@zohodesk/components/lib/Layout");
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _ResponsiveDropBox = _interopRequireDefault(require("@zohodesk/components/lib/ResponsiveDropBox/ResponsiveDropBox"));
|
|
23
23
|
|
|
24
24
|
var _CssProvider = _interopRequireDefault(require("@zohodesk/components/lib/Provider/CssProvider"));
|
|
25
25
|
|
|
@@ -154,7 +154,7 @@ var ActionButton = /*#__PURE__*/function (_React$Component) {
|
|
|
154
154
|
name: "ZD-down",
|
|
155
155
|
size: "6",
|
|
156
156
|
iconClass: _ActionButtonModule["default"].arrow
|
|
157
|
-
})), isPopupOpen ? /*#__PURE__*/_react["default"].createElement(
|
|
157
|
+
})), isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
|
|
158
158
|
size: "small",
|
|
159
159
|
isActive: isPopupOpen,
|
|
160
160
|
boxPosition: position,
|
|
@@ -165,7 +165,11 @@ var ActionButton = /*#__PURE__*/function (_React$Component) {
|
|
|
165
165
|
},
|
|
166
166
|
isBoxPaddingNeed: isBoxPaddingNeed,
|
|
167
167
|
getRef: getContainerRef
|
|
168
|
-
},
|
|
168
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
169
|
+
flexible: true,
|
|
170
|
+
shrink: true,
|
|
171
|
+
scroll: "vertical"
|
|
172
|
+
}, children)) : null) : null));
|
|
169
173
|
}
|
|
170
174
|
}]);
|
|
171
175
|
|
package/lib/Provider.js
CHANGED
|
@@ -19,6 +19,8 @@ var _LibraryContextInit = _interopRequireDefault(require("@zohodesk/components/l
|
|
|
19
19
|
|
|
20
20
|
var _datetimejs = _interopRequireDefault(require("@zohodesk/datetimejs"));
|
|
21
21
|
|
|
22
|
+
var _ThemeTool = _interopRequireDefault(require("../../common/lib/ThemeTool/ThemeTool"));
|
|
23
|
+
|
|
22
24
|
var _i18n2 = _interopRequireDefault(require("./i18n"));
|
|
23
25
|
|
|
24
26
|
require("@zohodesk/components/assets/Appearance/default/themes/blue/blueDefaultCTATheme.module.css");
|
|
@@ -209,6 +211,7 @@ var Provider = /*#__PURE__*/function (_React$Component) {
|
|
|
209
211
|
themeName: 'blue'
|
|
210
212
|
};
|
|
211
213
|
_this.setTheme = _this.setTheme.bind(_assertThisInitialized(_this));
|
|
214
|
+
_this.setAppearance = _this.setAppearance.bind(_assertThisInitialized(_this));
|
|
212
215
|
return _this;
|
|
213
216
|
}
|
|
214
217
|
|
|
@@ -229,56 +232,9 @@ var Provider = /*#__PURE__*/function (_React$Component) {
|
|
|
229
232
|
}, {
|
|
230
233
|
key: "render",
|
|
231
234
|
value: function render() {
|
|
232
|
-
var _this2 = this;
|
|
233
|
-
|
|
234
235
|
var _this$state = this.state,
|
|
235
236
|
appearanceName = _this$state.appearanceName,
|
|
236
237
|
themeName = _this$state.themeName;
|
|
237
|
-
var themeClass = {
|
|
238
|
-
width: '20px',
|
|
239
|
-
height: '20px',
|
|
240
|
-
borderRadius: '3px',
|
|
241
|
-
display: 'flex',
|
|
242
|
-
border: '1px solid #ccc',
|
|
243
|
-
margin: '0 5px',
|
|
244
|
-
cursor: 'pointer',
|
|
245
|
-
backgroundColor: '#0a73eb'
|
|
246
|
-
};
|
|
247
|
-
var green = {
|
|
248
|
-
backgroundColor: '#26a942'
|
|
249
|
-
};
|
|
250
|
-
var red = {
|
|
251
|
-
backgroundColor: '#de3535'
|
|
252
|
-
};
|
|
253
|
-
var orange = {
|
|
254
|
-
backgroundColor: '#e57717'
|
|
255
|
-
};
|
|
256
|
-
var yellow = {
|
|
257
|
-
backgroundColor: '#e8b923'
|
|
258
|
-
};
|
|
259
|
-
var light = {
|
|
260
|
-
backgroundColor: '#fff'
|
|
261
|
-
};
|
|
262
|
-
var night = {
|
|
263
|
-
backgroundColor: '#232b38'
|
|
264
|
-
};
|
|
265
|
-
var dark = {
|
|
266
|
-
backgroundColor: '#212121'
|
|
267
|
-
};
|
|
268
|
-
var fixedPosition = {
|
|
269
|
-
position: 'fixed',
|
|
270
|
-
bottom: '0',
|
|
271
|
-
backgroundColor: '#272727',
|
|
272
|
-
padding: '10px',
|
|
273
|
-
borderRadius: '15px 15px 0 0',
|
|
274
|
-
minWidth: '100px',
|
|
275
|
-
textAlign: 'center',
|
|
276
|
-
boxShadow: '0 0 3px #000',
|
|
277
|
-
fontSize: '12px',
|
|
278
|
-
zIndex: '3',
|
|
279
|
-
display: 'flex',
|
|
280
|
-
alignItems: 'center'
|
|
281
|
-
};
|
|
282
238
|
return /*#__PURE__*/_react["default"].createElement(_i18n.I18NProvider, {
|
|
283
239
|
i18n: _i18n2["default"],
|
|
284
240
|
timeZone: "Asia/Kolkata",
|
|
@@ -300,81 +256,10 @@ var Provider = /*#__PURE__*/function (_React$Component) {
|
|
|
300
256
|
}
|
|
301
257
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
302
258
|
scroll: "vertical"
|
|
303
|
-
}, this.props.children), /*#__PURE__*/_react["default"].createElement("
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
})
|
|
308
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
309
|
-
style: {
|
|
310
|
-
color: '#fff'
|
|
311
|
-
}
|
|
312
|
-
}, "Appearance:"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
313
|
-
style: {
|
|
314
|
-
display: 'flex'
|
|
315
|
-
}
|
|
316
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
317
|
-
title: "Light Mode",
|
|
318
|
-
style: Object.assign({}, themeClass, light),
|
|
319
|
-
onClick: function onClick() {
|
|
320
|
-
return _this2.setAppearance('default');
|
|
321
|
-
}
|
|
322
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
323
|
-
title: "Night Mode",
|
|
324
|
-
style: Object.assign({}, themeClass, night),
|
|
325
|
-
onClick: function onClick() {
|
|
326
|
-
return _this2.setAppearance('dark');
|
|
327
|
-
}
|
|
328
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
329
|
-
title: "Dark Mode",
|
|
330
|
-
style: Object.assign({}, themeClass, dark),
|
|
331
|
-
onClick: function onClick() {
|
|
332
|
-
return _this2.setAppearance('pureDark');
|
|
333
|
-
}
|
|
334
|
-
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
335
|
-
style: Object.assign({}, fixedPosition, {
|
|
336
|
-
left: '80%',
|
|
337
|
-
transform: 'translate(-80%)'
|
|
338
|
-
})
|
|
339
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
340
|
-
style: {
|
|
341
|
-
color: '#fff'
|
|
342
|
-
}
|
|
343
|
-
}, "Themes:"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
344
|
-
style: {
|
|
345
|
-
display: 'flex'
|
|
346
|
-
}
|
|
347
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
348
|
-
title: "Blue Theme",
|
|
349
|
-
style: themeClass,
|
|
350
|
-
onClick: function onClick() {
|
|
351
|
-
return _this2.setTheme('blue');
|
|
352
|
-
}
|
|
353
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
354
|
-
title: "Green Theme",
|
|
355
|
-
style: Object.assign({}, themeClass, green),
|
|
356
|
-
onClick: function onClick() {
|
|
357
|
-
return _this2.setTheme('green');
|
|
358
|
-
}
|
|
359
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
360
|
-
title: "Red Theme",
|
|
361
|
-
style: Object.assign({}, themeClass, red),
|
|
362
|
-
onClick: function onClick() {
|
|
363
|
-
return _this2.setTheme('red');
|
|
364
|
-
}
|
|
365
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
366
|
-
title: "Orange Theme",
|
|
367
|
-
style: Object.assign({}, themeClass, orange),
|
|
368
|
-
onClick: function onClick() {
|
|
369
|
-
return _this2.setTheme('orange');
|
|
370
|
-
}
|
|
371
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
372
|
-
title: "Yellow Theme",
|
|
373
|
-
style: Object.assign({}, themeClass, yellow),
|
|
374
|
-
onClick: function onClick() {
|
|
375
|
-
return _this2.setTheme('yellow');
|
|
376
|
-
}
|
|
377
|
-
}))))));
|
|
259
|
+
}, this.props.children), /*#__PURE__*/_react["default"].createElement(_ThemeTool["default"], {
|
|
260
|
+
onThemeChange: this.setTheme,
|
|
261
|
+
onAppearanceChange: this.setAppearance
|
|
262
|
+
}))));
|
|
378
263
|
}
|
|
379
264
|
}]);
|
|
380
265
|
|