@zohodesk/components 1.0.0-alpha-230 → 1.0.0-alpha-233
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 +11 -0
- package/es/DropBox/DropBox.js +1 -1
- package/es/ListItem/ListContainer.js +19 -2
- package/es/ListItem/ListItem.module.css +8 -2
- package/es/MultiSelect/MultiSelect.js +2 -6
- package/lib/DropBox/DropBox.js +1 -1
- package/lib/ListItem/ListContainer.js +25 -2
- package/lib/ListItem/ListItem.module.css +8 -2
- package/lib/MultiSelect/MultiSelect.js +2 -5
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -32,6 +32,17 @@ 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-233
|
|
36
|
+
|
|
37
|
+
- MultiSelect => On press tab key selecting option removed
|
|
38
|
+
|
|
39
|
+
# 1.0.0-alpha-232
|
|
40
|
+
|
|
41
|
+
- ListContainer => Mobile Responsive Implemented
|
|
42
|
+
# 1.0.0-alpha-231
|
|
43
|
+
|
|
44
|
+
- DropBox - Position Undefined Issue Solved
|
|
45
|
+
|
|
35
46
|
# 1.0.0-alpha-230
|
|
36
47
|
|
|
37
48
|
- 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
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || 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); }
|
|
2
2
|
|
|
3
3
|
/**** Libraries ****/
|
|
4
|
-
import React from 'react';
|
|
4
|
+
import React, { useCallback } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { Container } from '../Layout';
|
|
7
7
|
import CssProvider from '../Provider/CssProvider';
|
|
8
8
|
import style from './ListItem.module.css';
|
|
9
|
+
import { useResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
9
10
|
|
|
10
11
|
const ListContainer = props => {
|
|
11
12
|
const {
|
|
@@ -32,6 +33,22 @@ const ListContainer = props => {
|
|
|
32
33
|
onMouseOver,
|
|
33
34
|
eleRef
|
|
34
35
|
} = props;
|
|
36
|
+
const responsiveFunc = useCallback(_ref => {
|
|
37
|
+
let {
|
|
38
|
+
mediaQueryOR,
|
|
39
|
+
isTouchDevice
|
|
40
|
+
} = _ref;
|
|
41
|
+
return {
|
|
42
|
+
mobileToTab: mediaQueryOR([{
|
|
43
|
+
maxWidth: 700
|
|
44
|
+
}]),
|
|
45
|
+
isTouchDevice: isTouchDevice
|
|
46
|
+
};
|
|
47
|
+
}, []);
|
|
48
|
+
const {
|
|
49
|
+
mobileToTab,
|
|
50
|
+
isTouchDevice
|
|
51
|
+
} = useResponsiveReceiver('Helmet', responsiveFunc);
|
|
35
52
|
const {
|
|
36
53
|
role,
|
|
37
54
|
ariaSelected
|
|
@@ -57,7 +74,7 @@ const ListContainer = props => {
|
|
|
57
74
|
isCover: false,
|
|
58
75
|
align: "vertical",
|
|
59
76
|
alignBox: "row",
|
|
60
|
-
className: `${style.list} ${style[size]} ${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}`,
|
|
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}`,
|
|
61
78
|
dataId: dataId,
|
|
62
79
|
onClick: !isDisabled && onClick,
|
|
63
80
|
onMouseEnter: onMouseEnter,
|
|
@@ -184,10 +184,10 @@
|
|
|
184
184
|
[dir=ltr] .mediumwithTick {
|
|
185
185
|
--listitem_padding: var(--zd_size9) var(--zd_size39) var(--zd_size9)
|
|
186
186
|
var(--zd_size20)
|
|
187
|
-
/*rtl: var(--zd_size9) var(--zd_size20) var(--zd_size9) var(--
|
|
187
|
+
/*rtl: var(--zd_size9) var(--zd_size20) var(--zd_size9) var(--zd_size39)*/;
|
|
188
188
|
}
|
|
189
189
|
[dir=rtl] .mediumwithTick {
|
|
190
|
-
--listitem_padding: var(--zd_size9) var(--zd_size20) var(--zd_size9) var(--
|
|
190
|
+
--listitem_padding: var(--zd_size9) var(--zd_size20) var(--zd_size9) var(--zd_size39);
|
|
191
191
|
}
|
|
192
192
|
[dir=ltr] .largewithTick {
|
|
193
193
|
--listitem_padding: var(--zd_size10) var(--zd_size39) var(--zd_size10)
|
|
@@ -197,3 +197,9 @@
|
|
|
197
197
|
[dir=rtl] .largewithTick {
|
|
198
198
|
--listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size39);
|
|
199
199
|
}
|
|
200
|
+
.responsiveHeight {
|
|
201
|
+
--listitem_height: var(--zd_size45);
|
|
202
|
+
font-size: var(--zd_font_size15);
|
|
203
|
+
padding-top: var(--zd_size10);
|
|
204
|
+
padding-bottom: var(--zd_size10);
|
|
205
|
+
}
|
|
@@ -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
|
}
|
|
@@ -1145,7 +1140,8 @@ MultiSelectComponent.defaultProps = {
|
|
|
1145
1140
|
textBoxClass: '',
|
|
1146
1141
|
palette: 'default',
|
|
1147
1142
|
isSearchClearOnSelect: true,
|
|
1148
|
-
needEffect: true
|
|
1143
|
+
needEffect: true,
|
|
1144
|
+
boxSize: 'default'
|
|
1149
1145
|
};
|
|
1150
1146
|
|
|
1151
1147
|
if (false) {
|
package/lib/DropBox/DropBox.js
CHANGED
|
@@ -171,7 +171,7 @@ var DropBoxElement = /*#__PURE__*/function (_React$Component) {
|
|
|
171
171
|
} : {};
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
boxPosition = boxPosition ? boxPosition : 'bottomCenter';
|
|
174
|
+
boxPosition = boxPosition && boxPosition != 'undefined' ? boxPosition : 'bottomCenter';
|
|
175
175
|
var boxDirection = _DropBoxPositionMapping.positionMapping[boxPosition].direction;
|
|
176
176
|
/*getting box direction*/
|
|
177
177
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
13
|
|
|
@@ -15,8 +17,14 @@ var _CssProvider = _interopRequireDefault(require("../Provider/CssProvider"));
|
|
|
15
17
|
|
|
16
18
|
var _ListItemModule = _interopRequireDefault(require("./ListItem.module.css"));
|
|
17
19
|
|
|
20
|
+
var _CustomResponsive = require("../Responsive/CustomResponsive");
|
|
21
|
+
|
|
18
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
23
|
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
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
|
+
|
|
20
28
|
function _extends() { _extends = Object.assign || 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); }
|
|
21
29
|
|
|
22
30
|
var ListContainer = function ListContainer(props) {
|
|
@@ -42,6 +50,21 @@ var ListContainer = function ListContainer(props) {
|
|
|
42
50
|
onMouseEnter = props.onMouseEnter,
|
|
43
51
|
onMouseOver = props.onMouseOver,
|
|
44
52
|
eleRef = props.eleRef;
|
|
53
|
+
var responsiveFunc = (0, _react.useCallback)(function (_ref) {
|
|
54
|
+
var mediaQueryOR = _ref.mediaQueryOR,
|
|
55
|
+
isTouchDevice = _ref.isTouchDevice;
|
|
56
|
+
return {
|
|
57
|
+
mobileToTab: mediaQueryOR([{
|
|
58
|
+
maxWidth: 700
|
|
59
|
+
}]),
|
|
60
|
+
isTouchDevice: isTouchDevice
|
|
61
|
+
};
|
|
62
|
+
}, []);
|
|
63
|
+
|
|
64
|
+
var _useResponsiveReceive = (0, _CustomResponsive.useResponsiveReceiver)('Helmet', responsiveFunc),
|
|
65
|
+
mobileToTab = _useResponsiveReceive.mobileToTab,
|
|
66
|
+
isTouchDevice = _useResponsiveReceive.isTouchDevice;
|
|
67
|
+
|
|
45
68
|
var role = a11y.role,
|
|
46
69
|
ariaSelected = a11y.ariaSelected;
|
|
47
70
|
var options = {};
|
|
@@ -65,7 +88,7 @@ var ListContainer = function ListContainer(props) {
|
|
|
65
88
|
isCover: false,
|
|
66
89
|
align: "vertical",
|
|
67
90
|
alignBox: "row",
|
|
68
|
-
className: "".concat(_ListItemModule["default"].list, " ").concat(_ListItemModule["default"][size], " ").concat(_ListItemModule["default"][palette], " ").concat(active ? _ListItemModule["default"]["active".concat(palette)] : highlight && !isDisabled ? _ListItemModule["default"]["".concat(palette, "Hover")] : '', " ").concat(autoHover && !isDisabled ? _ListItemModule["default"]["".concat(palette, "Effect")] : '', " ").concat(needTick ? _ListItemModule["default"]["".concat(size, "withTick")] : '', " ").concat(isDisabled ? (0, _CssProvider["default"])('isDisable') : '', " ").concat(needBorder ? active ? _ListItemModule["default"].activewithBorder : _ListItemModule["default"].withBorder : '', " ").concat(customClass),
|
|
91
|
+
className: "".concat(_ListItemModule["default"].list, " ").concat(_ListItemModule["default"][size], " ").concat(mobileToTab && isTouchDevice ? _ListItemModule["default"].responsiveHeight : '', " ").concat(_ListItemModule["default"][palette], " ").concat(active ? _ListItemModule["default"]["active".concat(palette)] : highlight && !isDisabled ? _ListItemModule["default"]["".concat(palette, "Hover")] : '', " ").concat(autoHover && !isDisabled ? _ListItemModule["default"]["".concat(palette, "Effect")] : '', " ").concat(needTick ? _ListItemModule["default"]["".concat(size, "withTick")] : '', " ").concat(isDisabled ? (0, _CssProvider["default"])('isDisable') : '', " ").concat(needBorder ? active ? _ListItemModule["default"].activewithBorder : _ListItemModule["default"].withBorder : '', " ").concat(customClass),
|
|
69
92
|
dataId: dataId,
|
|
70
93
|
onClick: !isDisabled && onClick,
|
|
71
94
|
onMouseEnter: onMouseEnter,
|
|
@@ -184,10 +184,10 @@
|
|
|
184
184
|
[dir=ltr] .mediumwithTick {
|
|
185
185
|
--listitem_padding: var(--zd_size9) var(--zd_size39) var(--zd_size9)
|
|
186
186
|
var(--zd_size20)
|
|
187
|
-
/*rtl: var(--zd_size9) var(--zd_size20) var(--zd_size9) var(--
|
|
187
|
+
/*rtl: var(--zd_size9) var(--zd_size20) var(--zd_size9) var(--zd_size39)*/;
|
|
188
188
|
}
|
|
189
189
|
[dir=rtl] .mediumwithTick {
|
|
190
|
-
--listitem_padding: var(--zd_size9) var(--zd_size20) var(--zd_size9) var(--
|
|
190
|
+
--listitem_padding: var(--zd_size9) var(--zd_size20) var(--zd_size9) var(--zd_size39);
|
|
191
191
|
}
|
|
192
192
|
[dir=ltr] .largewithTick {
|
|
193
193
|
--listitem_padding: var(--zd_size10) var(--zd_size39) var(--zd_size10)
|
|
@@ -197,3 +197,9 @@
|
|
|
197
197
|
[dir=rtl] .largewithTick {
|
|
198
198
|
--listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size39);
|
|
199
199
|
}
|
|
200
|
+
.responsiveHeight {
|
|
201
|
+
--listitem_height: var(--zd_size45);
|
|
202
|
+
font-size: var(--zd_font_size15);
|
|
203
|
+
padding-top: var(--zd_size10);
|
|
204
|
+
padding-bottom: var(--zd_size10);
|
|
205
|
+
}
|
|
@@ -512,10 +512,6 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
512
512
|
}
|
|
513
513
|
} else if (keyCode === 27) {// this.handlePopupClose(e);
|
|
514
514
|
} else if (keyCode === 9) {
|
|
515
|
-
var _selectedOption = suggestions[hoverOption] || {};
|
|
516
|
-
|
|
517
|
-
var _id = _selectedOption.id;
|
|
518
|
-
isPopupOpen && !(0, _Common.getIsEmptyValue)(_id) && this.handleSelectOption(_id, e);
|
|
519
515
|
this.handlePopupClose(e);
|
|
520
516
|
}
|
|
521
517
|
}
|
|
@@ -1219,7 +1215,8 @@ MultiSelectComponent.defaultProps = {
|
|
|
1219
1215
|
textBoxClass: '',
|
|
1220
1216
|
palette: 'default',
|
|
1221
1217
|
isSearchClearOnSelect: true,
|
|
1222
|
-
needEffect: true
|
|
1218
|
+
needEffect: true,
|
|
1219
|
+
boxSize: 'default'
|
|
1223
1220
|
};
|
|
1224
1221
|
|
|
1225
1222
|
if (false) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/components",
|
|
3
|
-
"version": "1.0.0-alpha-
|
|
3
|
+
"version": "1.0.0-alpha-233",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"jsnext:main": "es/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
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 clean && 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
25
|
"build:css:umd": "npm run clean && npm run init && react-cli build:css:umd",
|
|
26
26
|
"coverage": "react-cli coverage",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@zohodesk/variables": "1.0.0-beta.29",
|
|
38
38
|
"@zohodesk/icons": "1.0.0-beta.92",
|
|
39
39
|
"@zohodesk/virtualizer": "1.0.3",
|
|
40
|
-
"velocity-react": "
|
|
40
|
+
"velocity-react": "1.4.3",
|
|
41
41
|
"react-sortable-hoc": "^0.8.3",
|
|
42
42
|
"@zohodesk/svg": "1.0.0-beta.41"
|
|
43
43
|
},
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"selectn": "1.1.2"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@zohodesk/icons": "
|
|
52
|
-
"@zohodesk/variables": "
|
|
53
|
-
"@zohodesk/svg": "
|
|
54
|
-
"@zohodesk/virtualizer": "
|
|
55
|
-
"velocity-react": "
|
|
51
|
+
"@zohodesk/icons": "1.0.0-beta.92",
|
|
52
|
+
"@zohodesk/variables": "1.0.0-beta.29",
|
|
53
|
+
"@zohodesk/svg": "1.0.0-beta.41",
|
|
54
|
+
"@zohodesk/virtualizer": "1.0.3",
|
|
55
|
+
"velocity-react": "1.4.3",
|
|
56
56
|
"react-sortable-hoc": "^0.8.3"
|
|
57
57
|
},
|
|
58
58
|
"react-cli": {
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"runner": "preprocess/index.js"
|
|
61
61
|
},
|
|
62
62
|
"docs": {
|
|
63
|
+
"disableES5Transpile": true,
|
|
63
64
|
"componentFolder": "./src",
|
|
64
65
|
"cssUniqueness": "false",
|
|
65
66
|
"rtlExclude": [
|