@zohodesk/dot 1.0.0-temp-199 → 1.0.0-temp-187.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/propValidation_report.html +1 -1
- package/README.md +4 -0
- package/es/Drawer/Drawer.js +4 -7
- package/es/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +1 -1
- package/es/Drawer/props/defaultProps.js +1 -0
- package/es/Drawer/props/propTypes.js +1 -0
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +4 -2
- package/es/list/DepartmentDropDown/DepartmentDropDown.js +7 -2
- package/es/list/DepartmentDropDown/props/defaultProps.js +2 -1
- package/es/list/DepartmentDropDown/props/propTypes.js +2 -1
- package/es/list/status/StatusListItem/StatusListItem.module.css +35 -5
- package/es/lookup/header/Search/LookupSearch.module.css +26 -26
- package/es/lookup/header/Search/Search.js +38 -55
- package/es/lookup/header/Search/props/defaultProps.js +1 -2
- package/es/lookup/header/Search/props/propTypes.js +1 -5
- package/lib/Drawer/Drawer.js +4 -7
- package/lib/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +1 -1
- package/lib/Drawer/props/defaultProps.js +1 -0
- package/lib/Drawer/props/propTypes.js +1 -0
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -3
- package/lib/list/DepartmentDropDown/DepartmentDropDown.js +8 -3
- package/lib/list/DepartmentDropDown/props/defaultProps.js +2 -1
- package/lib/list/DepartmentDropDown/props/propTypes.js +1 -1
- package/lib/list/status/StatusListItem/StatusListItem.module.css +35 -5
- package/lib/lookup/header/Search/LookupSearch.module.css +26 -26
- package/lib/lookup/header/Search/Search.js +64 -73
- package/lib/lookup/header/Search/props/defaultProps.js +1 -2
- package/lib/lookup/header/Search/props/propTypes.js +3 -9
- package/package.json +3 -3
package/README.md
CHANGED
package/es/Drawer/Drawer.js
CHANGED
|
@@ -149,7 +149,8 @@ export default class Drawer extends React.Component {
|
|
|
149
149
|
onClose,
|
|
150
150
|
needFocusScope,
|
|
151
151
|
customProps,
|
|
152
|
-
a11y
|
|
152
|
+
a11y,
|
|
153
|
+
customDrawerClass
|
|
153
154
|
} = this.props;
|
|
154
155
|
const {
|
|
155
156
|
focusScopeProps = {}
|
|
@@ -174,7 +175,7 @@ export default class Drawer extends React.Component {
|
|
|
174
175
|
return child;
|
|
175
176
|
});
|
|
176
177
|
let content = /*#__PURE__*/React.createElement(Box, {
|
|
177
|
-
className: `${style.container} ${style.columns} ${style.drawerModal} ${uptoTablet ? style.mbleSize : style[size]}`,
|
|
178
|
+
className: `${style.container} ${style.columns} ${style.drawerModal} ${uptoTablet ? style.mbleSize : style[size]} ${customDrawerClass}`,
|
|
178
179
|
"data-a11y-need-focus-style": "false",
|
|
179
180
|
tabindex: -1,
|
|
180
181
|
eleRef: this.createRef,
|
|
@@ -281,8 +282,4 @@ export default class Drawer extends React.Component {
|
|
|
281
282
|
|
|
282
283
|
}
|
|
283
284
|
Drawer.propTypes = Drawer_propTypes;
|
|
284
|
-
Drawer.defaultProps = Drawer_defaultProps;
|
|
285
|
-
// Drawer.docs = {
|
|
286
|
-
// componentGroup: 'Template'
|
|
287
|
-
// };
|
|
288
|
-
// }
|
|
285
|
+
Drawer.defaultProps = Drawer_defaultProps;
|
|
@@ -12,7 +12,7 @@ exports[`Drawer rendering the isActive true 1`] = `
|
|
|
12
12
|
style="z-index: 4;"
|
|
13
13
|
>
|
|
14
14
|
<div
|
|
15
|
-
class="container columns drawerModal small
|
|
15
|
+
class="container columns drawerModal small shrinkOff"
|
|
16
16
|
data-a11y-need-focus-style="false"
|
|
17
17
|
data-id="boxComponent"
|
|
18
18
|
data-selector-id="box"
|
|
@@ -32,6 +32,7 @@ export const Footer_propTypes = {
|
|
|
32
32
|
export const Drawer_propTypes = {
|
|
33
33
|
children: PropTypes.node,
|
|
34
34
|
customClass: PropTypes.string,
|
|
35
|
+
customDrawerClass: PropTypes.string,
|
|
35
36
|
forwardRef: PropTypes.object,
|
|
36
37
|
isActive: PropTypes.bool,
|
|
37
38
|
needAutoZindex: PropTypes.bool,
|
|
@@ -164,7 +164,8 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
164
164
|
const {
|
|
165
165
|
TextBoxIconProps = {},
|
|
166
166
|
TagWrapperProps = {},
|
|
167
|
-
TagProps = {}
|
|
167
|
+
TagProps = {},
|
|
168
|
+
listProps = {}
|
|
168
169
|
} = customProps;
|
|
169
170
|
return /*#__PURE__*/React.createElement("div", {
|
|
170
171
|
className: `${style.container} ${!isReadOnly ? ` ${needBorder ? style.hasBorder : ''}
|
|
@@ -298,7 +299,8 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
298
299
|
getRef: this.getSelectedItemRef,
|
|
299
300
|
isDisabled: listDisabled,
|
|
300
301
|
customProps: listItemProps,
|
|
301
|
-
customClass: listItemClass
|
|
302
|
+
customClass: listItemClass,
|
|
303
|
+
...listProps
|
|
302
304
|
}, isNew ? /*#__PURE__*/React.createElement(Container, {
|
|
303
305
|
alignBox: "row",
|
|
304
306
|
align: "vertical"
|
|
@@ -48,8 +48,12 @@ class DepartmentDropDown extends Component {
|
|
|
48
48
|
onSearch,
|
|
49
49
|
needSearchFetching,
|
|
50
50
|
searchStr,
|
|
51
|
-
i18nKeys
|
|
51
|
+
i18nKeys,
|
|
52
|
+
customProps
|
|
52
53
|
} = this.props;
|
|
54
|
+
const {
|
|
55
|
+
toggleDropDownProps = {}
|
|
56
|
+
} = customProps;
|
|
53
57
|
let {
|
|
54
58
|
title = 'Move Department',
|
|
55
59
|
searchEmptyText = 'No results found',
|
|
@@ -84,7 +88,8 @@ class DepartmentDropDown extends Component {
|
|
|
84
88
|
getNextOptions: getNextOptions,
|
|
85
89
|
isNextOptions: isNextOptions,
|
|
86
90
|
onSearch: onSearch,
|
|
87
|
-
needSearchFetching: needSearchFetching
|
|
91
|
+
needSearchFetching: needSearchFetching,
|
|
92
|
+
...toggleDropDownProps
|
|
88
93
|
});
|
|
89
94
|
}
|
|
90
95
|
|
|
@@ -6,43 +6,58 @@
|
|
|
6
6
|
min-height: var(--zd_size35) ;
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
}
|
|
9
|
+
|
|
9
10
|
[dir=ltr] .withBorder {
|
|
10
11
|
border-left: 1px solid var(--zdt_statuslistitem_default_border);
|
|
11
12
|
}
|
|
13
|
+
|
|
12
14
|
[dir=rtl] .withBorder {
|
|
13
15
|
border-right: 1px solid var(--zdt_statuslistitem_default_border);
|
|
14
16
|
}
|
|
17
|
+
|
|
15
18
|
[dir=ltr] .small {
|
|
16
19
|
padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5) ;
|
|
17
20
|
}
|
|
21
|
+
|
|
18
22
|
[dir=rtl] .small {
|
|
19
23
|
padding: var(--zd_size7) var(--zd_size5) var(--zd_size7) var(--zd_size3) ;
|
|
20
24
|
}
|
|
25
|
+
|
|
21
26
|
.medium {
|
|
22
27
|
padding: var(--zd_size7) var(--zd_size20) ;
|
|
23
28
|
}
|
|
29
|
+
|
|
24
30
|
.large {
|
|
25
31
|
height: var(--zd_size48) ;
|
|
26
32
|
}
|
|
33
|
+
|
|
27
34
|
[dir=ltr] .large {
|
|
28
35
|
padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25) ;
|
|
29
36
|
}
|
|
37
|
+
|
|
30
38
|
[dir=rtl] .large {
|
|
31
39
|
padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3) ;
|
|
32
40
|
}
|
|
33
|
-
|
|
41
|
+
|
|
42
|
+
.value,
|
|
43
|
+
.multiLineValue {
|
|
34
44
|
line-height: 1.5385;
|
|
35
45
|
}
|
|
46
|
+
|
|
36
47
|
.value {
|
|
37
48
|
composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
|
|
38
49
|
}
|
|
39
|
-
|
|
50
|
+
|
|
51
|
+
.multiLineValue {
|
|
40
52
|
word-break: break-word;
|
|
53
|
+
-webkit-line-clamp: 2;
|
|
41
54
|
composes: clamp from '~@zohodesk/components/lib/common/common.module.css';
|
|
42
55
|
}
|
|
56
|
+
|
|
43
57
|
[dir=ltr] .withBorder.active {
|
|
44
58
|
border-left-color: var(--zdt_statuslistitem_default_active_border);
|
|
45
59
|
}
|
|
60
|
+
|
|
46
61
|
[dir=rtl] .withBorder.active {
|
|
47
62
|
border-right-color: var(--zdt_statuslistitem_default_active_border);
|
|
48
63
|
}
|
|
@@ -50,44 +65,56 @@
|
|
|
50
65
|
.default.hover, .default.effect:hover {
|
|
51
66
|
background-color: var(--zdt_statuslistitem_default_effect_bg);
|
|
52
67
|
}
|
|
68
|
+
|
|
53
69
|
.primary.hover, .primary.effect:hover, .selected {
|
|
54
70
|
background-color: var(--zdt_statuslistitem_primary_efffect_bg);
|
|
55
71
|
}
|
|
72
|
+
|
|
56
73
|
.secondary.hover, .secondary.effect:hover {
|
|
57
74
|
background-color: var(--zdt_statuslistitem_secondary_effect_bg);
|
|
58
75
|
}
|
|
76
|
+
|
|
59
77
|
.list.active.default, .list.active.primary {
|
|
60
78
|
background-color: var(--zdt_statuslistitem_primary_efffect_bg);
|
|
61
79
|
}
|
|
80
|
+
|
|
62
81
|
.list.active.secondary {
|
|
63
82
|
background-color: var(--zdt_statuslistitem_secondary_effect_bg);
|
|
64
83
|
}
|
|
84
|
+
|
|
65
85
|
.secondary.hover,
|
|
66
86
|
.secondary.effect:hover,
|
|
67
87
|
.list.active.secondary {
|
|
68
88
|
color: var(--zdt_statuslistitem_secondary_effect_text);
|
|
69
89
|
}
|
|
90
|
+
|
|
70
91
|
.tickIcon {
|
|
71
92
|
color: var(--zdt_statuslistitem_tickicon);
|
|
72
93
|
position: absolute;
|
|
73
|
-
top:50% ;
|
|
94
|
+
top: 50% ;
|
|
74
95
|
transform: translateY(-50%);
|
|
75
96
|
}
|
|
97
|
+
|
|
76
98
|
[dir=ltr] .tickIcon {
|
|
77
99
|
right: var(--zd_size20) ;
|
|
78
100
|
}
|
|
101
|
+
|
|
79
102
|
[dir=rtl] .tickIcon {
|
|
80
103
|
left: var(--zd_size20) ;
|
|
81
104
|
}
|
|
82
|
-
|
|
105
|
+
|
|
106
|
+
.tickIcon>i {
|
|
83
107
|
display: block;
|
|
84
108
|
}
|
|
109
|
+
|
|
85
110
|
[dir=ltr] .active.withTick {
|
|
86
111
|
padding-right: var(--zd_size39) ;
|
|
87
112
|
}
|
|
113
|
+
|
|
88
114
|
[dir=rtl] .active.withTick {
|
|
89
115
|
padding-left: var(--zd_size39) ;
|
|
90
116
|
}
|
|
117
|
+
|
|
91
118
|
/* Status Type */
|
|
92
119
|
.statusType {
|
|
93
120
|
width: var(--zd_size8) ;
|
|
@@ -100,12 +127,15 @@
|
|
|
100
127
|
[dir=rtl] .statusType {
|
|
101
128
|
margin-left: var(--zd_size13) ;
|
|
102
129
|
}
|
|
130
|
+
|
|
103
131
|
.black {
|
|
104
132
|
background-color: var(--zdt_statuslistitem_black_bg);
|
|
105
133
|
}
|
|
134
|
+
|
|
106
135
|
.orange {
|
|
107
136
|
background-color: var(--zdt_statuslistitem_orange_bg);
|
|
108
137
|
}
|
|
138
|
+
|
|
109
139
|
.green {
|
|
110
140
|
background-color: var(--zdt_statuslistitem_green_bg);
|
|
111
|
-
}
|
|
141
|
+
}
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
.
|
|
1
|
+
.searchStyle,
|
|
2
|
+
.boxStyle {
|
|
2
3
|
transition: var(--zd_transition1);
|
|
3
|
-
width: var(--
|
|
4
|
+
width: var(--zd_size96) ;
|
|
4
5
|
height: var(--zd_size28) ;
|
|
5
6
|
position: relative;
|
|
7
|
+
}.searchStyle, .boxStyle {
|
|
8
|
+
background: none;
|
|
6
9
|
}
|
|
7
|
-
.
|
|
8
|
-
|
|
10
|
+
.boxStyle {
|
|
11
|
+
width: var(--zd_size160) ;
|
|
9
12
|
border-radius: 4px;
|
|
13
|
+
border: 1px solid var(--zdt_lookupsearch_boxstyle_border);
|
|
10
14
|
}
|
|
11
|
-
.
|
|
12
|
-
border-bottom: 1px solid transparent;
|
|
13
|
-
}
|
|
14
|
-
.boxType, .borderType {
|
|
15
|
-
border-color: var(--zdt_lookupsearch_boxstyle_border);
|
|
16
|
-
}
|
|
17
|
-
.boxType:hover, .borderType:hover {
|
|
15
|
+
.searchStyle:hover, .boxStyle:hover {
|
|
18
16
|
border-color: var(--zdt_lookupsearch_boxstyle_hover_border);
|
|
19
17
|
}
|
|
20
|
-
.boxType.active, .borderType.active {
|
|
21
|
-
border-color: var(--zdt_lookupsearch_boxstyle_activer_border);
|
|
22
|
-
}
|
|
23
18
|
.focusWidth {
|
|
24
19
|
width: var(--zd_size220) ;
|
|
25
20
|
}
|
|
@@ -27,31 +22,36 @@
|
|
|
27
22
|
position: relative;
|
|
28
23
|
height: var(--zd_size28) ;
|
|
29
24
|
cursor: pointer;
|
|
30
|
-
padding: 0 var(--zd_size9) ;
|
|
31
25
|
}
|
|
32
26
|
.drpSearchBox::after {
|
|
33
27
|
content: '';
|
|
34
28
|
position: absolute;
|
|
35
|
-
top: var(--
|
|
36
|
-
bottom: var(--
|
|
29
|
+
top: var(--zd_size8) ;
|
|
30
|
+
bottom: var(--zd_size8) ;
|
|
37
31
|
}
|
|
38
32
|
[dir=ltr] .drpSearchBox::after {
|
|
39
|
-
right: var(--
|
|
33
|
+
right: calc( var(--zd_size1) * -1 ) ;
|
|
40
34
|
border-right: 1px solid var(--zdt_lookupsearch_boxstyle_border);
|
|
41
35
|
}
|
|
42
36
|
[dir=rtl] .drpSearchBox::after {
|
|
43
|
-
left: var(--
|
|
37
|
+
left: calc( var(--zd_size1) * -1 ) ;
|
|
44
38
|
border-left: 1px solid var(--zdt_lookupsearch_boxstyle_border);
|
|
45
39
|
}
|
|
46
|
-
|
|
47
|
-
padding
|
|
40
|
+
.inputBox, .drpSearchBox {
|
|
41
|
+
padding: 0 var(--zd_size9) ;
|
|
42
|
+
}
|
|
43
|
+
[dir=ltr] .searchIconBox {
|
|
44
|
+
padding: var(--zd_size4) 0 var(--zd_size4) var(--zd_size9) ;
|
|
48
45
|
}
|
|
49
|
-
[dir=rtl] .
|
|
50
|
-
padding
|
|
46
|
+
[dir=rtl] .searchIconBox {
|
|
47
|
+
padding: var(--zd_size4) var(--zd_size9) var(--zd_size4) 0 ;
|
|
51
48
|
}
|
|
52
49
|
.active, .boxStyle.active, .lineActive.drpSearchBox::after {
|
|
53
50
|
border-color: var(--zdt_lookupsearch_boxstyle_activer_border);
|
|
54
51
|
}
|
|
55
|
-
.iconArrow {
|
|
56
|
-
margin:
|
|
57
|
-
}
|
|
52
|
+
[dir=ltr] .iconArrow {
|
|
53
|
+
margin-left: var(--zd_size5) ;
|
|
54
|
+
}
|
|
55
|
+
[dir=rtl] .iconArrow {
|
|
56
|
+
margin-right: var(--zd_size5) ;
|
|
57
|
+
}
|
|
@@ -8,7 +8,6 @@ import { Search_propTypes, SearchUI_propTypes } from "./props/propTypes";
|
|
|
8
8
|
|
|
9
9
|
import TextBoxIcon from '@zohodesk/components/lib/TextBoxIcon/TextBoxIcon';
|
|
10
10
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
11
|
-
import { mergeStyle } from '@zohodesk/utils';
|
|
12
11
|
import { Icon } from '@zohodesk/icons';
|
|
13
12
|
import ToggleDropDown from "../../../dropdown/ToggleDropDown/ToggleDropDown";
|
|
14
13
|
/** * Methods ** */
|
|
@@ -17,19 +16,33 @@ import { debounce } from '@zohodesk/components/lib/utils/debounce';
|
|
|
17
16
|
import { cancelBubblingEffect } from '@zohodesk/components/es/utils/Common';
|
|
18
17
|
/** * CSS ** */
|
|
19
18
|
|
|
20
|
-
import
|
|
19
|
+
import style from "./LookupSearch.module.css";
|
|
21
20
|
export default class Search extends Component {
|
|
22
21
|
constructor(props) {
|
|
23
22
|
super(props);
|
|
23
|
+
this.handleDropDownOpen = this.handleDropDownOpen.bind(this);
|
|
24
|
+
this.handleDropDownClose = this.handleDropDownClose.bind(this);
|
|
24
25
|
this.handleTextBoxFocus = this.handleTextBoxFocus.bind(this);
|
|
25
26
|
this.handleTextBoxBlur = this.handleTextBoxBlur.bind(this);
|
|
26
27
|
this.handleGetTextBoxRef = this.handleGetTextBoxRef.bind(this);
|
|
27
|
-
this.handleRenderChildren = this.handleRenderChildren.bind(this);
|
|
28
28
|
this.state = {
|
|
29
|
-
isFocus: false
|
|
29
|
+
isFocus: false,
|
|
30
|
+
isDropDownOpen: false
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
handleDropDownOpen() {
|
|
35
|
+
this.setState({
|
|
36
|
+
isDropDownOpen: true
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
handleDropDownClose() {
|
|
41
|
+
this.setState({
|
|
42
|
+
isDropDownOpen: false
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
33
46
|
handleTextBoxFocus(e) {
|
|
34
47
|
const {
|
|
35
48
|
onFocus
|
|
@@ -58,45 +71,22 @@ export default class Search extends Component {
|
|
|
58
71
|
getRef && getRef(el);
|
|
59
72
|
}
|
|
60
73
|
|
|
61
|
-
handleRenderChildren(_ref) {
|
|
62
|
-
let {
|
|
63
|
-
isActive
|
|
64
|
-
} = _ref;
|
|
65
|
-
const {
|
|
66
|
-
value,
|
|
67
|
-
selectedId,
|
|
68
|
-
renderChildren
|
|
69
|
-
} = this.props;
|
|
70
|
-
|
|
71
|
-
if (renderChildren) {
|
|
72
|
-
return renderChildren({
|
|
73
|
-
isActive,
|
|
74
|
-
value,
|
|
75
|
-
selectedId
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
74
|
render() {
|
|
83
75
|
const {
|
|
84
76
|
options,
|
|
85
77
|
onSelect,
|
|
86
78
|
value,
|
|
87
|
-
selectedId
|
|
88
|
-
renderChildren
|
|
79
|
+
selectedId
|
|
89
80
|
} = this.props;
|
|
90
81
|
const {
|
|
91
|
-
isFocus
|
|
82
|
+
isFocus,
|
|
83
|
+
isDropDownOpen
|
|
92
84
|
} = this.state;
|
|
93
85
|
const searchUIExtraProps = {
|
|
94
|
-
isFocus: isFocus,
|
|
86
|
+
isFocus: isFocus || isDropDownOpen,
|
|
95
87
|
onFocus: this.handleTextBoxFocus,
|
|
96
88
|
onBlur: this.handleTextBoxBlur,
|
|
97
|
-
getRef: this.handleGetTextBoxRef
|
|
98
|
-
value: value,
|
|
99
|
-
renderChildren: renderChildren ? this.handleRenderChildren : null
|
|
89
|
+
getRef: this.handleGetTextBoxRef
|
|
100
90
|
};
|
|
101
91
|
return options ? /*#__PURE__*/React.createElement(ToggleDropDown, {
|
|
102
92
|
value: value,
|
|
@@ -105,7 +95,9 @@ export default class Search extends Component {
|
|
|
105
95
|
needTick: true,
|
|
106
96
|
isArrow: false,
|
|
107
97
|
isToggleStateNeeded: true,
|
|
108
|
-
selectedId: selectedId
|
|
98
|
+
selectedId: selectedId,
|
|
99
|
+
onDropDownOpen: this.handleDropDownOpen,
|
|
100
|
+
onDropDownClose: this.handleDropDownClose
|
|
109
101
|
}, /*#__PURE__*/React.createElement(SearchUI, { ...this.props,
|
|
110
102
|
...searchUIExtraProps
|
|
111
103
|
})) : /*#__PURE__*/React.createElement(SearchUI, { ...this.props,
|
|
@@ -179,27 +171,15 @@ class SearchUI extends Component {
|
|
|
179
171
|
activeClass,
|
|
180
172
|
isFocus,
|
|
181
173
|
onFocus,
|
|
182
|
-
onBlur
|
|
183
|
-
renderChildren,
|
|
184
|
-
isActive,
|
|
185
|
-
customStyle
|
|
174
|
+
onBlur
|
|
186
175
|
} = this.props;
|
|
187
|
-
const isInActiveState = isFocus || isActive;
|
|
188
|
-
const isFocusWidth = isFocus || searchStr || isActive;
|
|
189
|
-
const style = mergeStyle(defaultStyle, customStyle);
|
|
190
176
|
return /*#__PURE__*/React.createElement(Container, {
|
|
191
177
|
isCover: false,
|
|
192
178
|
alignBox: "row",
|
|
193
179
|
align: "vertical",
|
|
194
|
-
className: `
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
${isFocusWidth ? style.focusWidth : ''}
|
|
198
|
-
`
|
|
199
|
-
}, renderChildren && options ? renderChildren({
|
|
200
|
-
isActive
|
|
201
|
-
}) : options ? /*#__PURE__*/React.createElement(Container, {
|
|
202
|
-
className: `${style.drpSearchBox} ${isInActiveState ? style.lineActive : ''}`,
|
|
180
|
+
className: `${style.searchStyle} ${isBoxed ? style.boxStyle : ''} ${isFocus ? `${style.active} ${activeClass ? activeClass : ''} ` : ''} ${searchStr || isFocus ? style.focusWidth : ''}`
|
|
181
|
+
}, options && /*#__PURE__*/React.createElement(Container, {
|
|
182
|
+
className: `${style.drpSearchBox} ${isFocus ? style.lineActive : ''}`,
|
|
203
183
|
isCover: false,
|
|
204
184
|
align: "vertical",
|
|
205
185
|
alignBox: "row",
|
|
@@ -211,13 +191,17 @@ class SearchUI extends Component {
|
|
|
211
191
|
name: "ZD-down",
|
|
212
192
|
size: "7",
|
|
213
193
|
iconClass: style.iconArrow
|
|
214
|
-
}))
|
|
194
|
+
})), isSearchIconNeed && /*#__PURE__*/React.createElement(Box, {
|
|
195
|
+
className: style.searchIconBox
|
|
196
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
215
197
|
name: "ZD-search",
|
|
216
|
-
size: "11"
|
|
217
|
-
|
|
218
|
-
}) : null, /*#__PURE__*/React.createElement(Box, {
|
|
198
|
+
size: "11"
|
|
199
|
+
})), /*#__PURE__*/React.createElement(Box, {
|
|
219
200
|
flexible: true
|
|
220
201
|
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
202
|
+
customClass: {
|
|
203
|
+
customTextBox: `${isBoxed ? style.inputBox : ''}`
|
|
204
|
+
},
|
|
221
205
|
customProps: {
|
|
222
206
|
TextBoxProps: {
|
|
223
207
|
'data-a11y-autofocus': true
|
|
@@ -235,8 +219,7 @@ class SearchUI extends Component {
|
|
|
235
219
|
size: "small",
|
|
236
220
|
inputRef: getRef,
|
|
237
221
|
onClear: this.handleClear,
|
|
238
|
-
onClearMouseDown: cancelBubblingEffect
|
|
239
|
-
needBorder: false
|
|
222
|
+
onClearMouseDown: cancelBubblingEffect
|
|
240
223
|
})));
|
|
241
224
|
}
|
|
242
225
|
|
|
@@ -24,9 +24,5 @@ export const SearchUI_propTypes = {
|
|
|
24
24
|
options: PropTypes.array,
|
|
25
25
|
placeHolder: PropTypes.string,
|
|
26
26
|
searchStr: PropTypes.string,
|
|
27
|
-
title: PropTypes.string
|
|
28
|
-
renderChildren: PropTypes.func,
|
|
29
|
-
isActive: PropTypes.bool,
|
|
30
|
-
renderChildren: PropTypes.func,
|
|
31
|
-
customStyle: PropTypes.object
|
|
27
|
+
title: PropTypes.string
|
|
32
28
|
};
|
package/lib/Drawer/Drawer.js
CHANGED
|
@@ -256,7 +256,8 @@ var Drawer = /*#__PURE__*/function (_React$Component4) {
|
|
|
256
256
|
onClose = _this$props4.onClose,
|
|
257
257
|
needFocusScope = _this$props4.needFocusScope,
|
|
258
258
|
customProps = _this$props4.customProps,
|
|
259
|
-
a11y = _this$props4.a11y
|
|
259
|
+
a11y = _this$props4.a11y,
|
|
260
|
+
customDrawerClass = _this$props4.customDrawerClass;
|
|
260
261
|
var _customProps$focusSco = customProps.focusScopeProps,
|
|
261
262
|
focusScopeProps = _customProps$focusSco === void 0 ? {} : _customProps$focusSco;
|
|
262
263
|
var _focusScopeProps$need = focusScopeProps.needAutoFocus,
|
|
@@ -284,7 +285,7 @@ var Drawer = /*#__PURE__*/function (_React$Component4) {
|
|
|
284
285
|
});
|
|
285
286
|
|
|
286
287
|
var content = /*#__PURE__*/_react["default"].createElement(_Layout.Box, _extends({
|
|
287
|
-
className: "".concat(_DrawerModule["default"].container, " ").concat(_DrawerModule["default"].columns, " ").concat(_DrawerModule["default"].drawerModal, " ").concat(uptoTablet ? _DrawerModule["default"].mbleSize : _DrawerModule["default"][size]),
|
|
288
|
+
className: "".concat(_DrawerModule["default"].container, " ").concat(_DrawerModule["default"].columns, " ").concat(_DrawerModule["default"].drawerModal, " ").concat(uptoTablet ? _DrawerModule["default"].mbleSize : _DrawerModule["default"][size], " ").concat(customDrawerClass),
|
|
288
289
|
"data-a11y-need-focus-style": "false",
|
|
289
290
|
tabindex: -1,
|
|
290
291
|
eleRef: this.createRef
|
|
@@ -394,8 +395,4 @@ var Drawer = /*#__PURE__*/function (_React$Component4) {
|
|
|
394
395
|
|
|
395
396
|
exports["default"] = Drawer;
|
|
396
397
|
Drawer.propTypes = _propTypes.Drawer_propTypes;
|
|
397
|
-
Drawer.defaultProps = _defaultProps.Drawer_defaultProps;
|
|
398
|
-
// Drawer.docs = {
|
|
399
|
-
// componentGroup: 'Template'
|
|
400
|
-
// };
|
|
401
|
-
// }
|
|
398
|
+
Drawer.defaultProps = _defaultProps.Drawer_defaultProps;
|
|
@@ -12,7 +12,7 @@ exports[`Drawer rendering the isActive true 1`] = `
|
|
|
12
12
|
style="z-index: 4;"
|
|
13
13
|
>
|
|
14
14
|
<div
|
|
15
|
-
class="container columns drawerModal small
|
|
15
|
+
class="container columns drawerModal small shrinkOff"
|
|
16
16
|
data-a11y-need-focus-style="false"
|
|
17
17
|
data-id="boxComponent"
|
|
18
18
|
data-selector-id="box"
|
|
@@ -45,6 +45,7 @@ exports.Footer_propTypes = Footer_propTypes;
|
|
|
45
45
|
var Drawer_propTypes = {
|
|
46
46
|
children: _propTypes["default"].node,
|
|
47
47
|
customClass: _propTypes["default"].string,
|
|
48
|
+
customDrawerClass: _propTypes["default"].string,
|
|
48
49
|
forwardRef: _propTypes["default"].object,
|
|
49
50
|
isActive: _propTypes["default"].bool,
|
|
50
51
|
needAutoZindex: _propTypes["default"].bool,
|
|
@@ -227,7 +227,9 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
227
227
|
_customProps$TagWrapp = customProps.TagWrapperProps,
|
|
228
228
|
TagWrapperProps = _customProps$TagWrapp === void 0 ? {} : _customProps$TagWrapp,
|
|
229
229
|
_customProps$TagProps = customProps.TagProps,
|
|
230
|
-
TagProps = _customProps$TagProps === void 0 ? {} : _customProps$TagProps
|
|
230
|
+
TagProps = _customProps$TagProps === void 0 ? {} : _customProps$TagProps,
|
|
231
|
+
_customProps$listProp = customProps.listProps,
|
|
232
|
+
listProps = _customProps$listProp === void 0 ? {} : _customProps$listProp;
|
|
231
233
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
232
234
|
className: "".concat(_TagsMultiSelectModule["default"].container, " ").concat(!isReadOnly ? " ".concat(needBorder ? _TagsMultiSelectModule["default"].hasBorder : '', "\n ").concat(needBorder ? _TagsMultiSelectModule["default"]["borderColor_".concat(borderColor)] : _TagsMultiSelectModule["default"].borderColor_transparent, " ").concat(isPopupReady && needBorder ? _TagsMultiSelectModule["default"].active : '') : '', " ").concat(className),
|
|
233
235
|
onClick: _General.stopBubbling,
|
|
@@ -336,7 +338,7 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
336
338
|
var name = item.name,
|
|
337
339
|
isNew = item.isNew,
|
|
338
340
|
listItemProps = item.listItemProps;
|
|
339
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, searchList.length > 1 && isNew ? /*#__PURE__*/_react["default"].createElement(_DropDownSeparator["default"], null) : null, /*#__PURE__*/_react["default"].createElement(_ListItem["default"], {
|
|
341
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, searchList.length > 1 && isNew ? /*#__PURE__*/_react["default"].createElement(_DropDownSeparator["default"], null) : null, /*#__PURE__*/_react["default"].createElement(_ListItem["default"], _extends({
|
|
340
342
|
key: index,
|
|
341
343
|
index: index,
|
|
342
344
|
autoHover: true,
|
|
@@ -349,7 +351,7 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
349
351
|
isDisabled: listDisabled,
|
|
350
352
|
customProps: listItemProps,
|
|
351
353
|
customClass: listItemClass
|
|
352
|
-
}, isNew ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
354
|
+
}, listProps), isNew ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
353
355
|
alignBox: "row",
|
|
354
356
|
align: "vertical"
|
|
355
357
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
@@ -25,6 +25,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
28
30
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
31
|
|
|
30
32
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -100,7 +102,10 @@ var DepartmentDropDown = /*#__PURE__*/function (_Component) {
|
|
|
100
102
|
onSearch = _this$props3.onSearch,
|
|
101
103
|
needSearchFetching = _this$props3.needSearchFetching,
|
|
102
104
|
searchStr = _this$props3.searchStr,
|
|
103
|
-
i18nKeys = _this$props3.i18nKeys
|
|
105
|
+
i18nKeys = _this$props3.i18nKeys,
|
|
106
|
+
customProps = _this$props3.customProps;
|
|
107
|
+
var _customProps$toggleDr = customProps.toggleDropDownProps,
|
|
108
|
+
toggleDropDownProps = _customProps$toggleDr === void 0 ? {} : _customProps$toggleDr;
|
|
104
109
|
var _i18nKeys$title = i18nKeys.title,
|
|
105
110
|
title = _i18nKeys$title === void 0 ? 'Move Department' : _i18nKeys$title,
|
|
106
111
|
_i18nKeys$searchEmpty = i18nKeys.searchEmptyText,
|
|
@@ -109,7 +114,7 @@ var DepartmentDropDown = /*#__PURE__*/function (_Component) {
|
|
|
109
114
|
searchErrorText = _i18nKeys$searchError === void 0 ? 'No results' : _i18nKeys$searchError,
|
|
110
115
|
_i18nKeys$placeholder = i18nKeys.placeholder,
|
|
111
116
|
placeholder = _i18nKeys$placeholder === void 0 ? 'Search Department' : _i18nKeys$placeholder;
|
|
112
|
-
return /*#__PURE__*/_react["default"].createElement(_ToggleDropDown["default"], {
|
|
117
|
+
return /*#__PURE__*/_react["default"].createElement(_ToggleDropDown["default"], _extends({
|
|
113
118
|
title: title,
|
|
114
119
|
options: departmentList,
|
|
115
120
|
value: /*#__PURE__*/_react["default"].createElement(_SecondaryText.DepartmentText, {
|
|
@@ -138,7 +143,7 @@ var DepartmentDropDown = /*#__PURE__*/function (_Component) {
|
|
|
138
143
|
isNextOptions: isNextOptions,
|
|
139
144
|
onSearch: onSearch,
|
|
140
145
|
needSearchFetching: needSearchFetching
|
|
141
|
-
});
|
|
146
|
+
}, toggleDropDownProps));
|
|
142
147
|
}
|
|
143
148
|
}]);
|
|
144
149
|
|