@zohodesk/components 1.0.0-temp-56 → 1.0.0-temp-60
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 +15 -0
- package/es/AppContainer/AppContainer.js +1 -1
- package/es/DropBox/DropBox.js +1 -1
- package/es/ListItem/ListContainer.js +7 -4
- package/es/ListItem/ListItem.js +1 -1
- package/es/ListItem/ListItem.module.css +4 -4
- package/es/ListItem/ListItemWithAvatar.js +1 -1
- package/es/ListItem/ListItemWithCheckBox.js +1 -1
- package/es/ListItem/ListItemWithIcon.js +1 -1
- package/es/ListItem/ListItemWithRadio.js +1 -1
- package/es/MultiSelect/MultiSelect.js +0 -5
- package/es/Provider/Config.js +3 -1
- package/es/Select/GroupSelect.js +1 -1
- package/es/Tooltip/Tooltip.js +14 -8
- package/es/Tooltip/Tooltip.module.css +6 -1
- package/package.json +11 -9
package/README.md
CHANGED
|
@@ -32,6 +32,21 @@ In this Package, we Provide Some Basic Components to Build Web App
|
|
|
32
32
|
- TextBoxIcon
|
|
33
33
|
- Tooltip
|
|
34
34
|
|
|
35
|
+
# 1.0.0-alpha-234
|
|
36
|
+
|
|
37
|
+
- MultiSelect => SelectedId fix on component did update
|
|
38
|
+
|
|
39
|
+
# 1.0.0-alpha-233
|
|
40
|
+
|
|
41
|
+
- MultiSelect => On press tab key selecting option removed
|
|
42
|
+
|
|
43
|
+
# 1.0.0-alpha-232
|
|
44
|
+
|
|
45
|
+
- ListContainer => Mobile Responsive Implemented
|
|
46
|
+
# 1.0.0-alpha-231
|
|
47
|
+
|
|
48
|
+
- DropBox - Position Undefined Issue Solved
|
|
49
|
+
|
|
35
50
|
# 1.0.0-alpha-230
|
|
36
51
|
|
|
37
52
|
- Avatar, AdvancedGroupMultiSelect, AdvancedMultiSelect, MultiSelect, MultiSelectWithAvatar, GroupSelect, Select, SelectWithAvatar, SelectWithIcon, TextBoxIcon => Tooltip undefined case solved
|
package/es/DropBox/DropBox.js
CHANGED
|
@@ -117,7 +117,7 @@ export class DropBoxElement extends React.Component {
|
|
|
117
117
|
} : {};
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
boxPosition = boxPosition ? boxPosition : 'bottomCenter';
|
|
120
|
+
boxPosition = boxPosition && boxPosition != 'undefined' ? boxPosition : 'bottomCenter';
|
|
121
121
|
const boxDirection = positionMapping[boxPosition].direction;
|
|
122
122
|
/*getting box direction*/
|
|
123
123
|
|
|
@@ -35,16 +35,19 @@ const ListContainer = props => {
|
|
|
35
35
|
} = props;
|
|
36
36
|
const responsiveFunc = useCallback(_ref => {
|
|
37
37
|
let {
|
|
38
|
-
mediaQueryOR
|
|
38
|
+
mediaQueryOR,
|
|
39
|
+
isTouchDevice
|
|
39
40
|
} = _ref;
|
|
40
41
|
return {
|
|
41
42
|
mobileToTab: mediaQueryOR([{
|
|
42
43
|
maxWidth: 700
|
|
43
|
-
}])
|
|
44
|
+
}]),
|
|
45
|
+
isTouchDevice: isTouchDevice
|
|
44
46
|
};
|
|
45
47
|
}, []);
|
|
46
48
|
const {
|
|
47
|
-
mobileToTab
|
|
49
|
+
mobileToTab,
|
|
50
|
+
isTouchDevice
|
|
48
51
|
} = useResponsiveReceiver('Helmet', responsiveFunc);
|
|
49
52
|
const {
|
|
50
53
|
role,
|
|
@@ -71,7 +74,7 @@ const ListContainer = props => {
|
|
|
71
74
|
isCover: false,
|
|
72
75
|
align: "vertical",
|
|
73
76
|
alignBox: "row",
|
|
74
|
-
className: `${style.list}
|
|
77
|
+
className: `${style.list} ${style[size]} ${mobileToTab && isTouchDevice ? style.responsiveHeight : ''} ${style[palette]} ${active ? style[`active${palette}`] : highlight && !isDisabled ? style[`${palette}Hover`] : ''} ${autoHover && !isDisabled ? style[`${palette}Effect`] : ''} ${needTick ? style[`${size}withTick`] : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? active ? style.activewithBorder : style.withBorder : ''} ${customClass}`,
|
|
75
78
|
dataId: dataId,
|
|
76
79
|
onClick: !isDisabled && onClick,
|
|
77
80
|
onMouseEnter: onMouseEnter,
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -94,7 +94,7 @@ export default class ListItem extends React.Component {
|
|
|
94
94
|
autoHover: autoHover,
|
|
95
95
|
needTick: needTick,
|
|
96
96
|
needBorder: needBorder,
|
|
97
|
-
customClass:
|
|
97
|
+
customClass: customListItem,
|
|
98
98
|
dataId: dataIdString,
|
|
99
99
|
isLink: isLink,
|
|
100
100
|
href: href,
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
.mediumwithTick {
|
|
159
159
|
--listitem_padding: var(--zd_size9) var(--zd_size39) var(--zd_size9)
|
|
160
160
|
var(--zd_size20)
|
|
161
|
-
/*rtl: var(--zd_size9) var(--zd_size20) var(--zd_size9) var(--
|
|
161
|
+
/*rtl: var(--zd_size9) var(--zd_size20) var(--zd_size9) var(--zd_size39)*/;
|
|
162
162
|
}
|
|
163
163
|
.largewithTick {
|
|
164
164
|
--listitem_padding: var(--zd_size10) var(--zd_size39) var(--zd_size10)
|
|
@@ -166,8 +166,8 @@
|
|
|
166
166
|
/*rtl: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size39)*/;
|
|
167
167
|
}
|
|
168
168
|
.responsiveHeight {
|
|
169
|
-
--listitem_padding: var(--zd_size10) var(--zd_size3) var(--zd_size10)
|
|
170
|
-
var(--zd_size20)
|
|
171
|
-
/*rtl: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3)*/;
|
|
172
169
|
--listitem_height: var(--zd_size45);
|
|
170
|
+
padding-top: var(--zd_size10);
|
|
171
|
+
padding-bottom: var(--zd_size10);
|
|
172
|
+
font-size: var(--zd_font_size15);
|
|
173
173
|
}
|
|
@@ -99,7 +99,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
99
99
|
autoHover: autoHover,
|
|
100
100
|
needTick: needTick,
|
|
101
101
|
needBorder: needBorder,
|
|
102
|
-
customClass:
|
|
102
|
+
customClass: customListItem,
|
|
103
103
|
dataId: `${dataIdString}_ListItemWithAvatar`,
|
|
104
104
|
onClick: this.handleClick,
|
|
105
105
|
onMouseEnter: this.handleMouseEnter,
|
|
@@ -77,7 +77,7 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
77
77
|
isDisabled: isDisabled,
|
|
78
78
|
active: active,
|
|
79
79
|
autoHover: autoHover,
|
|
80
|
-
customClass:
|
|
80
|
+
customClass: customListItem,
|
|
81
81
|
dataId: `${dataId ? dataId : value}_ListItemWithCheckBox`,
|
|
82
82
|
onClick: this.onClick,
|
|
83
83
|
onMouseOver: this.onHover,
|
|
@@ -89,7 +89,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
89
89
|
autoHover: autoHover,
|
|
90
90
|
needTick: needTick,
|
|
91
91
|
needBorder: needBorder,
|
|
92
|
-
customClass:
|
|
92
|
+
customClass: customClass,
|
|
93
93
|
dataId: dataIdString,
|
|
94
94
|
isLink: isLink,
|
|
95
95
|
href: href,
|
|
@@ -78,7 +78,7 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
78
78
|
isDisabled: isDisabled,
|
|
79
79
|
active: active,
|
|
80
80
|
autoHover: autoHover,
|
|
81
|
-
customClass:
|
|
81
|
+
customClass: customListItem,
|
|
82
82
|
dataId: dataId,
|
|
83
83
|
onClick: this.onClick,
|
|
84
84
|
onMouseOver: this.onHover,
|
|
@@ -422,11 +422,6 @@ export class MultiSelectComponent extends React.Component {
|
|
|
422
422
|
}
|
|
423
423
|
} else if (keyCode === 27) {// this.handlePopupClose(e);
|
|
424
424
|
} else if (keyCode === 9) {
|
|
425
|
-
const selectedOption = suggestions[hoverOption] || {};
|
|
426
|
-
const {
|
|
427
|
-
id
|
|
428
|
-
} = selectedOption;
|
|
429
|
-
isPopupOpen && !getIsEmptyValue(id) && this.handleSelectOption(id, e);
|
|
430
425
|
this.handlePopupClose(e);
|
|
431
426
|
}
|
|
432
427
|
}
|
package/es/Provider/Config.js
CHANGED
package/es/Select/GroupSelect.js
CHANGED
|
@@ -127,7 +127,7 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
127
127
|
let {
|
|
128
128
|
selectedId,
|
|
129
129
|
hoverIndex
|
|
130
|
-
} = this.handleGetSelectedId(this.props,
|
|
130
|
+
} = this.handleGetSelectedId(this.props, newOptionIds);
|
|
131
131
|
newSelectedId = selectedId;
|
|
132
132
|
this.setState({
|
|
133
133
|
selectedId,
|
package/es/Tooltip/Tooltip.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { getLibraryConfig } from '../Provider/Config';
|
|
3
4
|
import style from './Tooltip.module.css';
|
|
4
5
|
export default class Tooltip extends React.Component {
|
|
5
6
|
constructor(props) {
|
|
@@ -90,7 +91,8 @@ export default class Tooltip extends React.Component {
|
|
|
90
91
|
};
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
handleOver(e) {
|
|
94
|
+
handleOver(e, targetElement) {
|
|
95
|
+
let containerElement = getLibraryConfig('tooltipContainer') === 'root' && targetElement ? targetElement : document.body;
|
|
94
96
|
let element = e.target;
|
|
95
97
|
let titleDiv = element.hasAttribute('data-title') || element.hasAttribute('title') ? element : element.closest('[data-title]') || element.closest('[title]');
|
|
96
98
|
|
|
@@ -146,12 +148,14 @@ export default class Tooltip extends React.Component {
|
|
|
146
148
|
|
|
147
149
|
let isHtml = titleDiv.getAttribute('data-ishtml');
|
|
148
150
|
let dataTooltipnoArrow = titleDiv.getAttribute('data-tooltip-noarrow') === 'true' ? true : false;
|
|
151
|
+
let dataTooltipWrap = titleDiv.getAttribute('data-title-wrap') === 'true' ? true : false;
|
|
149
152
|
let clientRect = titleDiv.getBoundingClientRect();
|
|
150
|
-
let boxLayout =
|
|
153
|
+
let boxLayout = containerElement.getBoundingClientRect();
|
|
151
154
|
this.setState({
|
|
152
155
|
title,
|
|
153
156
|
isHtml,
|
|
154
|
-
dataTooltipnoArrow
|
|
157
|
+
dataTooltipnoArrow,
|
|
158
|
+
dataTooltipWrap
|
|
155
159
|
}, () => {
|
|
156
160
|
let tooltip = this.toolTip;
|
|
157
161
|
|
|
@@ -177,8 +181,8 @@ export default class Tooltip extends React.Component {
|
|
|
177
181
|
let tooltipLeft;
|
|
178
182
|
/* offset width, height of body */
|
|
179
183
|
|
|
180
|
-
let bodyWidth =
|
|
181
|
-
let bodyHeight =
|
|
184
|
+
let bodyWidth = containerElement.offsetWidth;
|
|
185
|
+
let bodyHeight = containerElement.offsetHeight;
|
|
182
186
|
let isArrowHorizontal = false;
|
|
183
187
|
let isArrowDown = false;
|
|
184
188
|
let isArrowRight = false;
|
|
@@ -424,7 +428,8 @@ export default class Tooltip extends React.Component {
|
|
|
424
428
|
isArrowHorizontal,
|
|
425
429
|
width,
|
|
426
430
|
isHtml,
|
|
427
|
-
dataTooltipnoArrow
|
|
431
|
+
dataTooltipnoArrow,
|
|
432
|
+
dataTooltipWrap
|
|
428
433
|
} = this.state;
|
|
429
434
|
let {
|
|
430
435
|
dataId,
|
|
@@ -432,6 +437,7 @@ export default class Tooltip extends React.Component {
|
|
|
432
437
|
} = this.props;
|
|
433
438
|
let arrowStyle = isArrowHorizontal ? isArrowRight ? style.arrowRight : style.arrowLeft : isArrowDown ? style.arrowDown : style.arrowUp;
|
|
434
439
|
title = title ? title.trim() : null;
|
|
440
|
+
let tooltipCss = `${style.tooltipcont} ${dataTooltipWrap ? style.tooltipWrapCont : style.tooltipNormalCont}`;
|
|
435
441
|
return title ? /*#__PURE__*/React.createElement("div", {
|
|
436
442
|
className: `${customClass} ${style.tooltiptext}`,
|
|
437
443
|
style: {
|
|
@@ -448,12 +454,12 @@ export default class Tooltip extends React.Component {
|
|
|
448
454
|
top: arrowTop
|
|
449
455
|
}
|
|
450
456
|
}) : null, isHtml ? /*#__PURE__*/React.createElement("div", {
|
|
451
|
-
className:
|
|
457
|
+
className: tooltipCss,
|
|
452
458
|
dangerouslySetInnerHTML: {
|
|
453
459
|
__html: title
|
|
454
460
|
}
|
|
455
461
|
}) : /*#__PURE__*/React.createElement("div", {
|
|
456
|
-
className:
|
|
462
|
+
className: tooltipCss
|
|
457
463
|
}, title)) : null;
|
|
458
464
|
}
|
|
459
465
|
|
|
@@ -19,9 +19,14 @@
|
|
|
19
19
|
max-width: 420px;
|
|
20
20
|
line-height: var(--zd_size20);
|
|
21
21
|
min-height: var(--zd_size24);
|
|
22
|
-
white-space: normal;
|
|
23
22
|
overflow: hidden;
|
|
24
23
|
}
|
|
24
|
+
.tooltipWrapCont {
|
|
25
|
+
white-space: pre-wrap;
|
|
26
|
+
}
|
|
27
|
+
.tooltipNormalCont {
|
|
28
|
+
white-space: normal;
|
|
29
|
+
}
|
|
25
30
|
/*rtl:begin:ignore*/
|
|
26
31
|
.tooltiparrow {
|
|
27
32
|
content: '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/components",
|
|
3
|
-
"version": "1.0.0-temp-
|
|
3
|
+
"version": "1.0.0-temp-60",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"jsnext:main": "es/index.js",
|
|
@@ -20,8 +20,9 @@
|
|
|
20
20
|
"docs": "npm run dubCheck && react-cli docs",
|
|
21
21
|
"build": " react-cli build:component:cmjs",
|
|
22
22
|
"buildlocal": " react-cli build:component:cmjs && npm run rtl",
|
|
23
|
-
"build:dev": "npm run build:es --module:mode=dev -- -w",
|
|
23
|
+
"build:dev": "npm run build:variables && npm run build && npm run build:es --module:mode=dev -- -w",
|
|
24
24
|
"build:es": "react-cli build:library:es",
|
|
25
|
+
"rtl:watch": "react-cli rtl ./src ./es -w",
|
|
25
26
|
"build:css:umd": "npm run clean && npm run init && react-cli build:css:umd",
|
|
26
27
|
"coverage": "react-cli coverage",
|
|
27
28
|
"prepare": "react-cli clean assets && npm run init && npm run build && npm run build:es && npm run rtl",
|
|
@@ -35,9 +36,9 @@
|
|
|
35
36
|
"devDependencies": {
|
|
36
37
|
"@zohodesk/docstool": "1.0.0-alpha-2",
|
|
37
38
|
"@zohodesk/variables": "1.0.0-beta.29",
|
|
38
|
-
"@zohodesk/icons": "1.0.0-beta.
|
|
39
|
+
"@zohodesk/icons": "1.0.0-beta.96",
|
|
39
40
|
"@zohodesk/virtualizer": "1.0.3",
|
|
40
|
-
"velocity-react": "
|
|
41
|
+
"velocity-react": "1.4.3",
|
|
41
42
|
"react-sortable-hoc": "^0.8.3",
|
|
42
43
|
"@zohodesk/svg": "1.0.0-beta.41"
|
|
43
44
|
},
|
|
@@ -48,11 +49,11 @@
|
|
|
48
49
|
"selectn": "1.1.2"
|
|
49
50
|
},
|
|
50
51
|
"peerDependencies": {
|
|
51
|
-
"@zohodesk/icons": "
|
|
52
|
-
"@zohodesk/variables": "
|
|
53
|
-
"@zohodesk/svg": "
|
|
54
|
-
"@zohodesk/virtualizer": "
|
|
55
|
-
"velocity-react": "
|
|
52
|
+
"@zohodesk/icons": "1.0.0-beta.96",
|
|
53
|
+
"@zohodesk/variables": "1.0.0-beta.29",
|
|
54
|
+
"@zohodesk/svg": "1.0.0-beta.41",
|
|
55
|
+
"@zohodesk/virtualizer": "1.0.3",
|
|
56
|
+
"velocity-react": "1.4.3",
|
|
56
57
|
"react-sortable-hoc": "^0.8.3"
|
|
57
58
|
},
|
|
58
59
|
"react-cli": {
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"runner": "preprocess/index.js"
|
|
61
62
|
},
|
|
62
63
|
"docs": {
|
|
64
|
+
"disableES5Transpile": true,
|
|
63
65
|
"componentFolder": "./src",
|
|
64
66
|
"cssUniqueness": "false",
|
|
65
67
|
"rtlExclude": [
|