@zohodesk/components 1.5.4 → 1.5.6
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 +17 -0
- package/es/AppContainer/AppContainer.module.css +1 -1
- package/es/DropBox/DropBoxElement/DropBoxElement.js +1 -1
- package/es/DropBox/utils/isMobilePopover.js +3 -14
- package/es/ListItem/ListItemWithCheckBox.js +2 -0
- package/es/ListItem/ListItemWithRadio.js +2 -0
- package/es/ListItem/props/defaultProps.js +2 -0
- package/es/ListItem/props/propTypes.js +2 -0
- package/es/Popup/Popup.js +32 -1045
- package/es/shared/ArrowIcon/ArrowIcon.module.css +2 -3
- package/es/utils/Common.js +1 -1
- package/es/v1/Popup/Popup.js +2 -2
- package/lib/AppContainer/AppContainer.module.css +1 -1
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +5 -5
- package/lib/DropBox/utils/isMobilePopover.js +4 -14
- package/lib/ListItem/ListItemWithCheckBox.js +2 -0
- package/lib/ListItem/ListItemWithRadio.js +2 -0
- package/lib/ListItem/props/defaultProps.js +2 -0
- package/lib/ListItem/props/propTypes.js +2 -0
- package/lib/Popup/Popup.js +36 -1149
- package/lib/shared/ArrowIcon/ArrowIcon.module.css +2 -3
- package/lib/utils/Common.js +1 -1
- package/lib/v1/Popup/Popup.js +4 -4
- package/package.json +8 -8
- package/es/DropBox/DropBoxPositionMapping.js +0 -142
- package/es/Popup/PositionMapping.js +0 -72
- package/es/Popup/Registry.js +0 -36
- package/es/Popup/intersectionObserver.js +0 -49
- package/es/Popup/viewPort.js +0 -373
- package/lib/DropBox/DropBoxPositionMapping.js +0 -149
- package/lib/Popup/PositionMapping.js +0 -81
- package/lib/Popup/Registry.js +0 -46
- package/lib/Popup/intersectionObserver.js +0 -72
- package/lib/Popup/viewPort.js +0 -367
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
visibility: hidden;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.transparentContainer .
|
|
16
|
+
.transparentContainer .active,
|
|
17
17
|
.transparentContainer:hover .arrowIcon {
|
|
18
18
|
opacity: 1;
|
|
19
19
|
visibility: visible;
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
.rotated,
|
|
31
31
|
.active,
|
|
32
|
-
.arrowContainer:hover .arrowIcon
|
|
33
|
-
.transparentContainer:hover .arrowIcon {
|
|
32
|
+
.arrowContainer:hover .arrowIcon {
|
|
34
33
|
--local-arrowIcon-color: var(--zdt_arrowicon_hover_icon);
|
|
35
34
|
}
|
|
36
35
|
|
package/es/utils/Common.js
CHANGED
package/es/v1/Popup/Popup.js
CHANGED
|
@@ -5,8 +5,8 @@ import hoistStatics from 'hoist-non-react-statics';
|
|
|
5
5
|
/**** Methods ****/
|
|
6
6
|
|
|
7
7
|
import { debounce, isDescendant, isTextSelected, cancelBubblingEffect } from "../../utils/Common.js";
|
|
8
|
-
import viewPort from
|
|
9
|
-
import { absolutePositionMapping, rtlAbsolutePositionMapping, rtlFixedPositionMapping } from
|
|
8
|
+
import viewPort from '@zohodesk/dotkit/es/react/components/Popup/utils/viewPort.js';
|
|
9
|
+
import { absolutePositionMapping, rtlAbsolutePositionMapping, rtlFixedPositionMapping } from '@zohodesk/dotkit/es/react/components/Popup/utils/positioning.js';
|
|
10
10
|
import ResizeObserver from '@zohodesk/virtualizer/lib/commons/ResizeObserver.js';
|
|
11
11
|
let lastOpenedGroup = [];
|
|
12
12
|
let popups = {};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
.container, .container button, .container input, .container textarea ,.container select {
|
|
12
12
|
/* font-family: var(--zd_regular); */
|
|
13
|
-
font-family: var(--zd-font-family), var(--zd_fallback_font, ZDLato);
|
|
13
|
+
font-family: var(--zd-font-family, ''), var(--zd_fallback_font, ZDLato);
|
|
14
14
|
}
|
|
15
15
|
.tooltip {
|
|
16
16
|
height: 0 ;
|
|
@@ -11,7 +11,7 @@ var _useDropboxPosCalc2 = _interopRequireDefault(require("./useDropboxPosCalc"))
|
|
|
11
11
|
|
|
12
12
|
var _cssJSLogic2 = _interopRequireDefault(require("./css/cssJSLogic"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _positioning = require("@zohodesk/dotkit/es/react/components/Popup/utils/positioning");
|
|
15
15
|
|
|
16
16
|
var _defaultProps = require("./props/defaultProps");
|
|
17
17
|
|
|
@@ -75,13 +75,13 @@ function DropBoxElement(props) {
|
|
|
75
75
|
ariaMultiselectable = a11y.ariaMultiselectable,
|
|
76
76
|
ariaLabelledby = a11y.ariaLabelledby;
|
|
77
77
|
boxPosition = boxPosition && boxPosition != 'undefined' ? boxPosition : 'bottomCenter';
|
|
78
|
-
var boxDirection =
|
|
78
|
+
var boxDirection = _positioning.positionMapping[boxPosition].direction;
|
|
79
79
|
|
|
80
80
|
if (isAbsolute) {
|
|
81
|
-
arrowPosition = arrowPosition ? arrowPosition :
|
|
82
|
-
boxPosition =
|
|
81
|
+
arrowPosition = arrowPosition ? arrowPosition : _positioning.positionMapping[boxPosition].arrowPosition;
|
|
82
|
+
boxPosition = _positioning.positionMapping[boxPosition].positionStyle;
|
|
83
83
|
} else {
|
|
84
|
-
arrowPosition =
|
|
84
|
+
arrowPosition = _positioning.positionMapping[boxPosition].arrowPosition;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
var _useDropboxPosCalc = (0, _useDropboxPosCalc2["default"])(props),
|
|
@@ -7,19 +7,9 @@ exports["default"] = isMobilePopover;
|
|
|
7
7
|
|
|
8
8
|
var _Config = require("../../Provider/Config");
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
// let { needResponsive } = props;
|
|
12
|
-
var windowWidth,
|
|
13
|
-
mobileWidth = (0, _Config.getLibraryConfig)('mobileWidth'),
|
|
14
|
-
isModel = false;
|
|
15
|
-
|
|
16
|
-
if (needResponsive) {
|
|
17
|
-
windowWidth = window.innerWidth;
|
|
10
|
+
var _device = require("@zohodesk/dotkit/es/utils/device.js");
|
|
18
11
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return isModel ? true : false;
|
|
12
|
+
function isMobilePopover(needResponsive) {
|
|
13
|
+
var mobileWidth = (0, _Config.getLibraryConfig)('mobileWidth');
|
|
14
|
+
return (0, _device.isMobilePopover)(needResponsive, mobileWidth);
|
|
25
15
|
}
|
|
@@ -110,6 +110,7 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
110
110
|
checked = _this$props4.checked,
|
|
111
111
|
autoHover = _this$props4.autoHover,
|
|
112
112
|
palette = _this$props4.palette,
|
|
113
|
+
needBorder = _this$props4.needBorder,
|
|
113
114
|
dataId = _this$props4.dataId,
|
|
114
115
|
dataSelectorId = _this$props4.dataSelectorId,
|
|
115
116
|
title = _this$props4.title,
|
|
@@ -148,6 +149,7 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
148
149
|
isDisabled: isDisabled,
|
|
149
150
|
active: active,
|
|
150
151
|
autoHover: autoHover,
|
|
152
|
+
needBorder: needBorder,
|
|
151
153
|
customClass: customListItem,
|
|
152
154
|
dataId: "".concat(dataId ? dataId : value, "_ListItemWithCheckBox"),
|
|
153
155
|
dataSelectorId: dataSelectorId,
|
|
@@ -110,6 +110,7 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
110
110
|
checked = _this$props4.checked,
|
|
111
111
|
autoHover = _this$props4.autoHover,
|
|
112
112
|
palette = _this$props4.palette,
|
|
113
|
+
needBorder = _this$props4.needBorder,
|
|
113
114
|
id = _this$props4.id,
|
|
114
115
|
dataId = _this$props4.dataId,
|
|
115
116
|
dataSelectorId = _this$props4.dataSelectorId,
|
|
@@ -149,6 +150,7 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
149
150
|
isDisabled: isDisabled,
|
|
150
151
|
active: active,
|
|
151
152
|
autoHover: autoHover,
|
|
153
|
+
needBorder: needBorder,
|
|
152
154
|
customClass: customListItem,
|
|
153
155
|
dataId: dataId,
|
|
154
156
|
dataSelectorId: dataSelectorId,
|
|
@@ -65,6 +65,7 @@ var ListItemWithCheckBoxDefaultProps = {
|
|
|
65
65
|
autoHover: false,
|
|
66
66
|
checked: false,
|
|
67
67
|
highlight: false,
|
|
68
|
+
needBorder: true,
|
|
68
69
|
palette: 'default',
|
|
69
70
|
size: 'medium',
|
|
70
71
|
value: 'List',
|
|
@@ -102,6 +103,7 @@ var ListItemWithRadioDefaultProps = {
|
|
|
102
103
|
autoHover: false,
|
|
103
104
|
checked: false,
|
|
104
105
|
highlight: false,
|
|
106
|
+
needBorder: true,
|
|
105
107
|
palette: 'default',
|
|
106
108
|
size: 'medium',
|
|
107
109
|
value: 'List',
|
|
@@ -127,6 +127,7 @@ var ListItemWithCheckBox_Props = {
|
|
|
127
127
|
title: _propTypes["default"].string,
|
|
128
128
|
value: _propTypes["default"].string,
|
|
129
129
|
secondaryValue: _propTypes["default"].string,
|
|
130
|
+
needBorder: _propTypes["default"].bool,
|
|
130
131
|
renderValueRightPlaceholderNode: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].func]),
|
|
131
132
|
lhsAlignContent: _propTypes["default"].oneOf(['start', 'center', 'end']),
|
|
132
133
|
lhsJustifyContent: _propTypes["default"].oneOf(['start', 'center', 'end']),
|
|
@@ -205,6 +206,7 @@ var ListItemWithRadio_Props = {
|
|
|
205
206
|
title: _propTypes["default"].string,
|
|
206
207
|
value: _propTypes["default"].string,
|
|
207
208
|
secondaryValue: _propTypes["default"].string,
|
|
209
|
+
needBorder: _propTypes["default"].bool,
|
|
208
210
|
renderValueRightPlaceholderNode: _propTypes["default"].oneOfType([_propTypes["default"].node, _propTypes["default"].func]),
|
|
209
211
|
lhsAlignContent: _propTypes["default"].oneOf(['start', 'center', 'end']),
|
|
210
212
|
lhsJustifyContent: _propTypes["default"].oneOf(['start', 'center', 'end']),
|