@zohodesk/components 1.0.0-temp-193 → 1.0.0-temp-194
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/es/AppContainer/AppContainer.js +10 -9
- package/es/Avatar/Avatar.js +4 -5
- package/es/AvatarTeam/AvatarTeam.js +7 -7
- package/es/Button/Button.js +5 -6
- package/es/CheckBox/CheckBox.js +8 -8
- package/es/DateTime/DateTime.js +2 -8
- package/es/DateTime/DateWidget.js +3 -14
- package/es/DateTime/Time.js +13 -30
- package/es/DateTime/props/defaultProps.js +2 -4
- package/es/DateTime/props/propTypes.js +3 -6
- package/es/DropBox/DropBox.js +10 -11
- package/es/DropDown/DropDown.js +2 -1
- package/es/ListItem/ListContainer.js +6 -5
- package/es/ListItem/ListItem.js +4 -5
- package/es/ListItem/ListItemWithAvatar.js +4 -5
- package/es/ListItem/ListItemWithCheckBox.js +4 -5
- package/es/ListItem/ListItemWithIcon.js +4 -5
- package/es/ListItem/ListItemWithRadio.js +4 -5
- package/es/Modal/Modal.js +4 -5
- package/es/MultiSelect/AdvancedMultiSelect.js +8 -9
- package/es/MultiSelect/MultiSelectWithAvatar.js +4 -5
- package/es/MultiSelect/SelectedOptions.js +6 -8
- package/es/MultiSelect/Suggestions.js +6 -8
- package/es/Popup/Popup.js +3 -4
- package/es/Radio/Radio.js +8 -8
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +2 -4
- package/es/Select/Select.js +4 -5
- package/es/Switch/Switch.js +8 -8
- package/es/Tab/Tab.js +4 -5
- package/es/Tab/TabContentWrapper.js +4 -5
- package/es/Tab/TabWrapper.js +5 -6
- package/es/Tab/Tabs.js +16 -16
- package/es/Tab/props/propTypes.js +1 -0
- package/es/TextBox/TextBox.js +5 -5
- package/es/TextBoxIcon/TextBoxIcon.js +2 -4
- package/es/Textarea/Textarea.js +4 -6
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
- package/es/deprecated/PortalLayer/PortalLayer.js +8 -6
- package/es/v1/AppContainer/AppContainer.js +10 -9
- package/es/v1/Avatar/Avatar.js +4 -5
- package/es/v1/AvatarTeam/AvatarTeam.js +7 -7
- package/es/v1/Button/Button.js +5 -6
- package/es/v1/CheckBox/CheckBox.js +8 -8
- package/es/v1/DropBox/DropBox.js +10 -11
- package/es/v1/DropDown/DropDown.js +2 -1
- package/es/v1/ListItem/ListContainer.js +6 -5
- package/es/v1/ListItem/ListItem.js +4 -5
- package/es/v1/ListItem/ListItemWithAvatar.js +4 -5
- package/es/v1/ListItem/ListItemWithCheckBox.js +4 -5
- package/es/v1/ListItem/ListItemWithIcon.js +4 -5
- package/es/v1/ListItem/ListItemWithRadio.js +4 -5
- package/es/v1/Modal/Modal.js +4 -5
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +8 -9
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +4 -5
- package/es/v1/MultiSelect/SelectedOptions.js +6 -8
- package/es/v1/MultiSelect/Suggestions.js +6 -8
- package/es/v1/Popup/Popup.js +3 -4
- package/es/v1/Radio/Radio.js +8 -8
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +2 -4
- package/es/v1/Select/Select.js +4 -5
- package/es/v1/Switch/Switch.js +8 -8
- package/es/v1/Tab/Tab.js +4 -5
- package/es/v1/Tab/TabContentWrapper.js +4 -5
- package/es/v1/Tab/TabWrapper.js +2 -4
- package/es/v1/Tab/Tabs.js +16 -16
- package/es/v1/TextBox/TextBox.js +5 -5
- package/es/v1/TextBoxIcon/TextBoxIcon.js +2 -4
- package/es/v1/Textarea/Textarea.js +4 -6
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
- package/lib/DateTime/DateTime.js +2 -13
- package/lib/DateTime/DateWidget.js +3 -19
- package/lib/DateTime/Time.js +13 -35
- package/lib/DateTime/props/defaultProps.js +2 -4
- package/lib/DateTime/props/propTypes.js +3 -6
- package/lib/Tab/TabWrapper.js +3 -2
- package/lib/Tab/props/propTypes.js +1 -0
- package/package.json +1 -1
- package/result.json +1 -1
|
@@ -11,12 +11,14 @@ let RefElement = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
11
11
|
isChildrenRestrictionNeeded = true,
|
|
12
12
|
isActive
|
|
13
13
|
} = props;
|
|
14
|
-
return isChildrenRestrictionNeeded ? isActive ? renderChildren ? renderChildren(ref) : /*#__PURE__*/React.createElement(Element, Object.assign({}, elementProps, {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
return isChildrenRestrictionNeeded ? isActive ? renderChildren ? renderChildren(ref) : /*#__PURE__*/React.createElement(Element, { ...Object.assign({}, elementProps, {
|
|
15
|
+
forwardRef: ref
|
|
16
|
+
})
|
|
17
|
+
}) : null : renderChildren ? renderChildren(ref, isActive) : /*#__PURE__*/React.createElement(Element, { ...Object.assign({}, elementProps, {
|
|
18
|
+
isActive,
|
|
19
|
+
forwardRef: ref
|
|
20
|
+
})
|
|
21
|
+
});
|
|
20
22
|
});
|
|
21
23
|
RefElement.propTypes = RefElement_propTypes;
|
|
22
24
|
export { RefElement };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import React, { useEffect, useRef, useLayoutEffect } from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes } from './props/propTypes';
|
|
@@ -93,23 +91,26 @@ export default function AppContainer(props) {
|
|
|
93
91
|
}
|
|
94
92
|
};
|
|
95
93
|
}, []);
|
|
96
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container,
|
|
94
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, {
|
|
97
95
|
className: `${style.container} ${className}`,
|
|
98
96
|
dataId: dataId,
|
|
99
97
|
dataSelectorId: dataSelectorId,
|
|
100
98
|
tagName: tagName,
|
|
101
|
-
eleRef: getContainerRef
|
|
102
|
-
|
|
99
|
+
eleRef: getContainerRef,
|
|
100
|
+
...ContainerProps,
|
|
101
|
+
...ExtraProps
|
|
102
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
103
103
|
flexible: true
|
|
104
|
-
}, children)), needTooltip ? /*#__PURE__*/React.createElement("div",
|
|
104
|
+
}, children)), needTooltip ? /*#__PURE__*/React.createElement("div", { ...ExtraProps,
|
|
105
105
|
className: `${style.container} ${style.tooltip} ${tooltipParentClass}`,
|
|
106
106
|
"data-id": `${dataId}_tooltip`,
|
|
107
107
|
"data-test-id": `${dataId}_tooltip`,
|
|
108
108
|
"data-selector-id": `${dataSelectorId}_tooltip`
|
|
109
|
-
}
|
|
109
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
110
110
|
ref: setTooltipRef,
|
|
111
|
-
customClass: tooltipClass
|
|
112
|
-
|
|
111
|
+
customClass: tooltipClass,
|
|
112
|
+
...TooltipProps
|
|
113
|
+
})) : null);
|
|
113
114
|
}
|
|
114
115
|
AppContainer.propTypes = propTypes;
|
|
115
116
|
AppContainer.defaultProps = defaultProps; // if (__DOCS__) {
|
package/es/v1/Avatar/Avatar.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import React, { useState } from 'react';
|
|
4
2
|
import { useEffectCallOnlyAfterState } from '@zohodesk/hooks';
|
|
5
3
|
import { defaultProps } from './props/defaultProps';
|
|
@@ -105,15 +103,16 @@ function Avatar(props) {
|
|
|
105
103
|
let showDefaultBorder = src && !isInvalidImageList && needDefaultBorder;
|
|
106
104
|
let borderStyle = (showDefaultBorder || !src || !showAvatar || showInitial) && needBorder ? `${style.border} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ` : '';
|
|
107
105
|
borderStyle = showAlternateAvatar ? '' : borderStyle;
|
|
108
|
-
return /*#__PURE__*/React.createElement("div",
|
|
106
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
109
107
|
className: `${style.avatar} ${style[size]} ${AvatarSize(size)} ${style[shapeStyle]} ${style[palette]} ${textStyle} ${borderStyle} ${customClass ? customClass : ''}`,
|
|
110
108
|
"data-title": needTitle ? title ? title : name : null,
|
|
111
109
|
"data-id": dataId,
|
|
112
110
|
"data-test-id": dataId,
|
|
113
111
|
onClick: onClick,
|
|
114
112
|
"data-selector-id": dataSelectorId,
|
|
115
|
-
tabIndex: onClick ? 0 : null
|
|
116
|
-
|
|
113
|
+
tabIndex: onClick ? 0 : null,
|
|
114
|
+
...AvatarProps
|
|
115
|
+
}, showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
|
|
117
116
|
className: `${style.initial}`,
|
|
118
117
|
"data-id": `${dataId}_AvatarInitial`,
|
|
119
118
|
"data-test-id": `${dataId}_AvatarInitial`,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes } from './props/propTypes';
|
|
@@ -41,12 +39,13 @@ export default function AvatarTeam(props) {
|
|
|
41
39
|
customAvatarTeam = ''
|
|
42
40
|
} = customClass;
|
|
43
41
|
const border = borderOnHover || onClick;
|
|
44
|
-
return /*#__PURE__*/React.createElement("span",
|
|
42
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
45
43
|
className: `${style.container} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} `,
|
|
46
44
|
"data-id": dataId,
|
|
47
45
|
"data-test-id": dataId,
|
|
48
|
-
"data-selector-id": dataSelectorId
|
|
49
|
-
|
|
46
|
+
"data-selector-id": dataSelectorId,
|
|
47
|
+
...AvatarTeamProps
|
|
48
|
+
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
50
49
|
name: name,
|
|
51
50
|
onClick: onClick,
|
|
52
51
|
palette: palette,
|
|
@@ -60,8 +59,9 @@ export default function AvatarTeam(props) {
|
|
|
60
59
|
borderOnHover: border,
|
|
61
60
|
needInnerBorder: needInnerBorder,
|
|
62
61
|
needBorder: needBorder,
|
|
63
|
-
needDefaultBorder: needDefaultBorder
|
|
64
|
-
|
|
62
|
+
needDefaultBorder: needDefaultBorder,
|
|
63
|
+
...AvatarProps
|
|
64
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
65
65
|
className: `${style.team} ${isFilled ? `${style[`${palette}Filled`]}` : style.nofill}
|
|
66
66
|
${style[`${size}team`]} ${customAvatarTeam}`
|
|
67
67
|
}));
|
package/es/v1/Button/Button.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes } from './props/propTypes';
|
|
@@ -39,7 +37,7 @@ export default function Button(props) {
|
|
|
39
37
|
style: finalStyle
|
|
40
38
|
});
|
|
41
39
|
let statusLower = status.toLowerCase();
|
|
42
|
-
return /*#__PURE__*/React.createElement("button",
|
|
40
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
43
41
|
className: buttonClass,
|
|
44
42
|
"data-id": disabled ? `${dataId}_disabled` : dataId,
|
|
45
43
|
"data-test-id": disabled ? `${dataId}_disabled` : dataId,
|
|
@@ -48,10 +46,11 @@ export default function Button(props) {
|
|
|
48
46
|
"data-title": title,
|
|
49
47
|
type: "button",
|
|
50
48
|
ref: getRef,
|
|
51
|
-
"data-selector-id": dataSelectorId
|
|
52
|
-
|
|
49
|
+
"data-selector-id": dataSelectorId,
|
|
50
|
+
...customProps,
|
|
51
|
+
...a11y,
|
|
53
52
|
id: id
|
|
54
|
-
}
|
|
53
|
+
}, children ? children : text, statusLower !== 'none' && needAppearance && /*#__PURE__*/React.createElement("div", {
|
|
55
54
|
className: finalStyle.overlay
|
|
56
55
|
}, /*#__PURE__*/React.createElement("div", {
|
|
57
56
|
className: loaderParentClass
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { propTypes } from './props/propTypes';
|
|
5
3
|
import { defaultProps } from './props/defaultProps';
|
|
@@ -66,7 +64,7 @@ const CheckBox = props => {
|
|
|
66
64
|
role = 'checkbox',
|
|
67
65
|
ariaChecked = checked
|
|
68
66
|
} = a11y;
|
|
69
|
-
return /*#__PURE__*/React.createElement(Container,
|
|
67
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
70
68
|
dataId: dataId,
|
|
71
69
|
isCover: false,
|
|
72
70
|
isInline: text ? false : true,
|
|
@@ -83,8 +81,9 @@ const CheckBox = props => {
|
|
|
83
81
|
"aria-label": ariaLabel,
|
|
84
82
|
"aria-labelledby": ariaLabelledby,
|
|
85
83
|
"aria-hidden": ariaHidden,
|
|
86
|
-
"data-selector-id": dataSelectorId || id
|
|
87
|
-
|
|
84
|
+
"data-selector-id": dataSelectorId || id,
|
|
85
|
+
...CheckBoxProps
|
|
86
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
88
87
|
className: `${style.boxContainer} ${style[size]} ${customCBoxSize} ${isFilled ? style.filled : ''}`
|
|
89
88
|
}, /*#__PURE__*/React.createElement("input", {
|
|
90
89
|
type: "hidden",
|
|
@@ -136,7 +135,7 @@ const CheckBox = props => {
|
|
|
136
135
|
}) : null))), text && /*#__PURE__*/React.createElement(Box, {
|
|
137
136
|
flexible: true,
|
|
138
137
|
className: style.text
|
|
139
|
-
}, /*#__PURE__*/React.createElement(Label,
|
|
138
|
+
}, /*#__PURE__*/React.createElement(Label, {
|
|
140
139
|
text: text,
|
|
141
140
|
palette: disabled ? 'disable' : labelPalette,
|
|
142
141
|
id: id,
|
|
@@ -147,8 +146,9 @@ const CheckBox = props => {
|
|
|
147
146
|
customClass: `${active && !disabled ? `${style[`active${palette}Label`]}` : ''}
|
|
148
147
|
${checked && active ? `${style[`checked${palette}Label`]}` : ''}
|
|
149
148
|
${accessMode} ${customLabel}`,
|
|
150
|
-
title: toolTip ? toolTip : text
|
|
151
|
-
|
|
149
|
+
title: toolTip ? toolTip : text,
|
|
150
|
+
...LabelProps
|
|
151
|
+
})));
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
export default CheckBox;
|
package/es/v1/DropBox/DropBox.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import React, { useRef, useContext } from 'react';
|
|
4
2
|
import FocusScope from '@zohodesk/a11y/es/FocusScope/FocusScope';
|
|
5
3
|
import Modal from '../Modal/Modal';
|
|
@@ -41,27 +39,28 @@ export default function DropBox(props) {
|
|
|
41
39
|
const {
|
|
42
40
|
zIndexStyle
|
|
43
41
|
} = cssJSLogic(props);
|
|
44
|
-
const dropBoxEle = needFocusScope ? /*#__PURE__*/React.createElement(FocusScope,
|
|
42
|
+
const dropBoxEle = needFocusScope ? /*#__PURE__*/React.createElement(FocusScope, {
|
|
45
43
|
onClose: onClose,
|
|
46
44
|
elementRef: dropBoxRef,
|
|
47
45
|
needAutoFocus: needAutoFocus,
|
|
48
46
|
needRestoreFocus: needRestoreFocus,
|
|
49
47
|
needListNavigation: needListNavigation,
|
|
50
48
|
needFocusLoop: needFocusLoop,
|
|
51
|
-
needEnterAction: needEnterAction
|
|
52
|
-
|
|
49
|
+
needEnterAction: needEnterAction,
|
|
50
|
+
...focusScopeProps
|
|
51
|
+
}, /*#__PURE__*/React.createElement(DropBoxElement, {
|
|
53
52
|
isModel: isModel,
|
|
54
|
-
direction: direction
|
|
55
|
-
|
|
53
|
+
direction: direction,
|
|
54
|
+
...props,
|
|
56
55
|
zIndexStyle: zIndexStyle,
|
|
57
56
|
subContainerRef: dropBoxRef
|
|
58
|
-
}))
|
|
57
|
+
})) : /*#__PURE__*/React.createElement(DropBoxElement, {
|
|
59
58
|
isModel: isModel,
|
|
60
59
|
subContainerRef: dropBoxRef,
|
|
61
|
-
direction: direction
|
|
62
|
-
|
|
60
|
+
direction: direction,
|
|
61
|
+
...props,
|
|
63
62
|
zIndexStyle: zIndexStyle
|
|
64
|
-
})
|
|
63
|
+
});
|
|
65
64
|
return isModel && isActive ? /*#__PURE__*/React.createElement(Modal, {
|
|
66
65
|
portalId: portalId
|
|
67
66
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -7,7 +7,8 @@ export default function DropDown(props) {
|
|
|
7
7
|
let {
|
|
8
8
|
children
|
|
9
9
|
} = props;
|
|
10
|
-
return /*#__PURE__*/React.createElement(PopOver, props
|
|
10
|
+
return /*#__PURE__*/React.createElement(PopOver, { ...props
|
|
11
|
+
}, /*#__PURE__*/React.createElement(PopOverTarget, null, children[0]), /*#__PURE__*/React.createElement(PopOverContainer, null, children[1]));
|
|
11
12
|
}
|
|
12
13
|
DropDown.propTypes = DropDown_propTypes;
|
|
13
14
|
export function DropDownTarget(props) {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
/**** Libraries ****/
|
|
4
2
|
import React, { useCallback } from 'react';
|
|
5
3
|
import { Container } from '../Layout';
|
|
@@ -73,7 +71,7 @@ const ListContainer = props => {
|
|
|
73
71
|
options.tabindex = '0';
|
|
74
72
|
}
|
|
75
73
|
|
|
76
|
-
return /*#__PURE__*/React.createElement(Container,
|
|
74
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
77
75
|
role: role,
|
|
78
76
|
"data-a11y-inset-focus": insetFocus,
|
|
79
77
|
"aria-selected": ariaSelected,
|
|
@@ -89,8 +87,11 @@ const ListContainer = props => {
|
|
|
89
87
|
onMouseOver: onMouseOver,
|
|
90
88
|
eleRef: eleRef,
|
|
91
89
|
tagName: isLink ? 'a' : 'li',
|
|
92
|
-
"data-title": isDisabled ? disableTitle : title
|
|
93
|
-
|
|
90
|
+
"data-title": isDisabled ? disableTitle : title,
|
|
91
|
+
...options,
|
|
92
|
+
...customProps,
|
|
93
|
+
...a11yAttributes
|
|
94
|
+
}, children);
|
|
94
95
|
};
|
|
95
96
|
|
|
96
97
|
ListContainer.defaultProps = ListContainerDefaultProps;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
/**** Libraries ****/
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { Box } from '../Layout';
|
|
@@ -73,7 +71,7 @@ const ListItem = props => {
|
|
|
73
71
|
} = listA11y;
|
|
74
72
|
let tickIconPalette = style[`${palette}Tick`] ? style[`${palette}Tick`] : '';
|
|
75
73
|
let dataIdString = dataId ? dataId : value ? String(value).replace("'", '_') : 'listItem';
|
|
76
|
-
return /*#__PURE__*/React.createElement(ListContainer,
|
|
74
|
+
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
77
75
|
a11y: listA11y,
|
|
78
76
|
size: size,
|
|
79
77
|
palette: palette,
|
|
@@ -94,8 +92,9 @@ const ListItem = props => {
|
|
|
94
92
|
onClick: handleClick,
|
|
95
93
|
onMouseEnter: handleMouseEnter,
|
|
96
94
|
eleRef: handleRef,
|
|
97
|
-
customProps: ListItemProps
|
|
98
|
-
|
|
95
|
+
customProps: ListItemProps,
|
|
96
|
+
...ContainerProps
|
|
97
|
+
}, value ? /*#__PURE__*/React.createElement(Box, {
|
|
99
98
|
shrink: true,
|
|
100
99
|
adjust: true,
|
|
101
100
|
className: needMultiLineText ? style.multiLineValue : style.value
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
/**** Libraries ****/
|
|
4
2
|
import React, { memo } from 'react';
|
|
5
3
|
import { Box } from '../Layout';
|
|
@@ -78,7 +76,7 @@ const ListItemWithAvatar = props => {
|
|
|
78
76
|
} = listA11y;
|
|
79
77
|
let isDarkPalette = palette === 'dark';
|
|
80
78
|
let dataIdString = value ? value : dataId;
|
|
81
|
-
return /*#__PURE__*/React.createElement(ListContainer,
|
|
79
|
+
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
82
80
|
a11y: listA11y,
|
|
83
81
|
size: size,
|
|
84
82
|
palette: palette,
|
|
@@ -96,8 +94,9 @@ const ListItemWithAvatar = props => {
|
|
|
96
94
|
eleRef: handleRef,
|
|
97
95
|
disableTitle: disableTitle,
|
|
98
96
|
title: null,
|
|
99
|
-
customProps: ListItemProps
|
|
100
|
-
|
|
97
|
+
customProps: ListItemProps,
|
|
98
|
+
...ContainerProps
|
|
99
|
+
}, name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
|
|
101
100
|
className: style.leftAvatar
|
|
102
101
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
103
102
|
name: name,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import ListContainer from './ListContainer';
|
|
5
3
|
import { ListItemWithCheckBoxDefaultProps } from './props/defaultProps';
|
|
@@ -58,7 +56,7 @@ const ListItemWithCheckBox = props => {
|
|
|
58
56
|
customCheckBox = '',
|
|
59
57
|
customLabel = ''
|
|
60
58
|
} = customClass;
|
|
61
|
-
return /*#__PURE__*/React.createElement(ListContainer,
|
|
59
|
+
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
62
60
|
a11y: listA11y,
|
|
63
61
|
size: size,
|
|
64
62
|
palette: palette,
|
|
@@ -74,8 +72,9 @@ const ListItemWithCheckBox = props => {
|
|
|
74
72
|
eleRef: handleRef,
|
|
75
73
|
disableTitle: disableTitle,
|
|
76
74
|
title: null,
|
|
77
|
-
customProps: ListItemProps
|
|
78
|
-
|
|
75
|
+
customProps: ListItemProps,
|
|
76
|
+
...ContainerProps
|
|
77
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
79
78
|
className: style.iconBox
|
|
80
79
|
}, /*#__PURE__*/React.createElement(CheckBox, {
|
|
81
80
|
checked: checked,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
/**** Libraries ****/
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { Box } from '../Layout';
|
|
@@ -68,7 +66,7 @@ const ListItemWithIcon = props => {
|
|
|
68
66
|
ariaHidden
|
|
69
67
|
} = listA11y;
|
|
70
68
|
let dataIdString = dataId ? `${dataId.replace("'", '_')}` : value.toLowerCase().replace("'", '_');
|
|
71
|
-
return /*#__PURE__*/React.createElement(ListContainer,
|
|
69
|
+
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
72
70
|
a11y: listA11y,
|
|
73
71
|
size: size,
|
|
74
72
|
palette: palette,
|
|
@@ -89,8 +87,9 @@ const ListItemWithIcon = props => {
|
|
|
89
87
|
eleRef: handleRef,
|
|
90
88
|
disableTitle: disableTitle,
|
|
91
89
|
title: null,
|
|
92
|
-
customProps: ListItemProps
|
|
93
|
-
|
|
90
|
+
customProps: ListItemProps,
|
|
91
|
+
...ContainerProps
|
|
92
|
+
}, iconName && /*#__PURE__*/React.createElement(Box, {
|
|
94
93
|
"aria-hidden": true,
|
|
95
94
|
className: style.iconBox,
|
|
96
95
|
dataId: dataId ? `${dataId}_Icon` : `${value.toLowerCase().replace("'", '_')}_Icon`
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import Radio from '../Radio/Radio';
|
|
5
3
|
import { Box } from '../Layout';
|
|
@@ -58,7 +56,7 @@ const ListItemWithRadio = props => {
|
|
|
58
56
|
customRadio = '',
|
|
59
57
|
customRadioWrap = ''
|
|
60
58
|
} = customClass;
|
|
61
|
-
return /*#__PURE__*/React.createElement(ListContainer,
|
|
59
|
+
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
62
60
|
a11y: listA11y,
|
|
63
61
|
size: size,
|
|
64
62
|
palette: palette,
|
|
@@ -74,8 +72,9 @@ const ListItemWithRadio = props => {
|
|
|
74
72
|
eleRef: handleRef,
|
|
75
73
|
disableTitle: disableTitle,
|
|
76
74
|
title: null,
|
|
77
|
-
customProps: ListItemProps
|
|
78
|
-
|
|
75
|
+
customProps: ListItemProps,
|
|
76
|
+
...ContainerProps
|
|
77
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
79
78
|
className: style.iconBox
|
|
80
79
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
81
80
|
checked: checked,
|
package/es/v1/Modal/Modal.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
4
2
|
import ReactDOM from 'react-dom';
|
|
5
3
|
import useEffectCallOnlyAfterState from '@zohodesk/hooks/es/utils/useEffectCallOnlyAfterState';
|
|
@@ -112,9 +110,10 @@ export default function Modal(props) {
|
|
|
112
110
|
|
|
113
111
|
if (isMounted) {
|
|
114
112
|
if (Element) {
|
|
115
|
-
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Element,
|
|
116
|
-
ref: setRef
|
|
117
|
-
|
|
113
|
+
return /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Element, {
|
|
114
|
+
ref: setRef,
|
|
115
|
+
...elementProps
|
|
116
|
+
}), portalDiv.current);
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
return null;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
/**** Libraries ****/
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { AdvancedMultiSelect_propTypes } from './props/propTypes';
|
|
@@ -488,7 +486,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
488
486
|
let {
|
|
489
487
|
tabletMode
|
|
490
488
|
} = _ref2;
|
|
491
|
-
return /*#__PURE__*/React.createElement(ResponsiveDropBox,
|
|
489
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
492
490
|
animationStyle: animationStyle,
|
|
493
491
|
boxPosition: position || `${defaultDropBoxPosition}Center`,
|
|
494
492
|
getRef: getContainerRef,
|
|
@@ -502,11 +500,11 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
502
500
|
a11y: {
|
|
503
501
|
role: 'listbox',
|
|
504
502
|
ariaMultiselectable: true
|
|
505
|
-
}
|
|
506
|
-
|
|
503
|
+
},
|
|
504
|
+
...DropBoxProps,
|
|
507
505
|
alignBox: "row",
|
|
508
506
|
isResponsivePadding: getFooter ? false : true
|
|
509
|
-
}
|
|
507
|
+
}, isLoading ? /*#__PURE__*/React.createElement(Container, {
|
|
510
508
|
align: "both",
|
|
511
509
|
className: style.loader
|
|
512
510
|
}, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(Box, {
|
|
@@ -523,7 +521,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
523
521
|
shrink: true,
|
|
524
522
|
customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
|
|
525
523
|
eleRef: this.suggestionContainerRef
|
|
526
|
-
}, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions,
|
|
524
|
+
}, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
|
|
527
525
|
suggestions: suggestions,
|
|
528
526
|
selectedOptions: allselectedOptionIds,
|
|
529
527
|
getRef: this.suggestionItemRef,
|
|
@@ -534,8 +532,9 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
534
532
|
listItemSize: listItemSize,
|
|
535
533
|
a11y: {
|
|
536
534
|
role: 'option'
|
|
537
|
-
}
|
|
538
|
-
|
|
535
|
+
},
|
|
536
|
+
...SuggestionsProps
|
|
537
|
+
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
539
538
|
isLoading: isFetchingOptions,
|
|
540
539
|
options: options,
|
|
541
540
|
searchString: searchStr,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
/**** Libraries ****/
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { MultiSelectWithAvatar_propTypes } from './props/propTypes';
|
|
@@ -160,7 +158,7 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
160
158
|
shrink: true,
|
|
161
159
|
customClass: !isModel && dropBoxSize ? style[dropBoxSize] : '',
|
|
162
160
|
eleRef: this.suggestionContainerRef
|
|
163
|
-
}, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions,
|
|
161
|
+
}, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
|
|
164
162
|
needTick: keepSelectedOptions,
|
|
165
163
|
suggestions: suggestions,
|
|
166
164
|
getRef: this.suggestionItemRef,
|
|
@@ -173,8 +171,9 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
173
171
|
selectedOptions: selectedOptionIds,
|
|
174
172
|
a11y: {
|
|
175
173
|
role: 'option'
|
|
176
|
-
}
|
|
177
|
-
|
|
174
|
+
},
|
|
175
|
+
...SuggestionsProps
|
|
176
|
+
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
178
177
|
isLoading: isFetchingOptions,
|
|
179
178
|
options: options,
|
|
180
179
|
searchString: searchStr,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
/**** Libraries ****/
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { SelectedOptions_propTypes } from './props/propTypes';
|
|
@@ -52,28 +50,28 @@ export default class SelectedOptions extends React.PureComponent {
|
|
|
52
50
|
return /*#__PURE__*/React.createElement(Box, {
|
|
53
51
|
className: `${style.tag} ${style[size]}`,
|
|
54
52
|
key: `${id}photoTag`
|
|
55
|
-
}, /*#__PURE__*/React.createElement(Tag,
|
|
53
|
+
}, /*#__PURE__*/React.createElement(Tag, { ...commonProps,
|
|
56
54
|
active: highLightedSelectOptions.indexOf(id) >= 0,
|
|
57
55
|
hasAvatar: true,
|
|
58
56
|
imageURL: photoURL
|
|
59
|
-
}))
|
|
57
|
+
}));
|
|
60
58
|
} else if (optionType === 'icon') {
|
|
61
59
|
return /*#__PURE__*/React.createElement(Box, {
|
|
62
60
|
className: `${style.tag} ${style[size]}`,
|
|
63
61
|
key: `${id}iconTag`
|
|
64
|
-
}, /*#__PURE__*/React.createElement(Tag,
|
|
62
|
+
}, /*#__PURE__*/React.createElement(Tag, { ...commonProps,
|
|
65
63
|
active: highLightedSelectOptions.indexOf(id) >= 0,
|
|
66
64
|
iconName: icon,
|
|
67
65
|
iconSize: iconSize
|
|
68
|
-
}))
|
|
66
|
+
}));
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
return /*#__PURE__*/React.createElement(Box, {
|
|
72
70
|
className: `${style.tag} ${style[size]}`,
|
|
73
71
|
key: `${id}tag`
|
|
74
|
-
}, /*#__PURE__*/React.createElement(Tag,
|
|
72
|
+
}, /*#__PURE__*/React.createElement(Tag, { ...commonProps,
|
|
75
73
|
active: highLightedSelectOptions.indexOf(id) >= 0
|
|
76
|
-
}))
|
|
74
|
+
}));
|
|
77
75
|
}));
|
|
78
76
|
}
|
|
79
77
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
/**** Libraries ****/
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { Suggestions_propTypes } from './props/propTypes';
|
|
@@ -76,7 +74,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
76
74
|
}
|
|
77
75
|
|
|
78
76
|
if (optionType === 'avatar') {
|
|
79
|
-
return /*#__PURE__*/React.createElement(ListItemWithAvatar,
|
|
77
|
+
return /*#__PURE__*/React.createElement(ListItemWithAvatar, { ...commonProps,
|
|
80
78
|
autoHover: false,
|
|
81
79
|
getRef: getRef,
|
|
82
80
|
highlight: isHighlight,
|
|
@@ -95,9 +93,9 @@ export default class Suggestions extends React.PureComponent {
|
|
|
95
93
|
avatarPalette: avatarPalette,
|
|
96
94
|
palette: palette,
|
|
97
95
|
a11y: list_a11y
|
|
98
|
-
})
|
|
96
|
+
});
|
|
99
97
|
} else if (optionType === 'icon') {
|
|
100
|
-
return /*#__PURE__*/React.createElement(ListItemWithIcon,
|
|
98
|
+
return /*#__PURE__*/React.createElement(ListItemWithIcon, { ...commonProps,
|
|
101
99
|
autoHover: false,
|
|
102
100
|
getRef: getRef,
|
|
103
101
|
highlight: isHighlight,
|
|
@@ -115,10 +113,10 @@ export default class Suggestions extends React.PureComponent {
|
|
|
115
113
|
size: listItemSize,
|
|
116
114
|
palette: palette,
|
|
117
115
|
a11y: list_a11y
|
|
118
|
-
})
|
|
116
|
+
});
|
|
119
117
|
}
|
|
120
118
|
|
|
121
|
-
return /*#__PURE__*/React.createElement(ListItem,
|
|
119
|
+
return /*#__PURE__*/React.createElement(ListItem, { ...commonProps,
|
|
122
120
|
autoHover: false,
|
|
123
121
|
getRef: getRef,
|
|
124
122
|
highlight: isHighlight,
|
|
@@ -134,7 +132,7 @@ export default class Suggestions extends React.PureComponent {
|
|
|
134
132
|
size: listItemSize,
|
|
135
133
|
palette: palette,
|
|
136
134
|
a11y: list_a11y
|
|
137
|
-
})
|
|
135
|
+
});
|
|
138
136
|
})));
|
|
139
137
|
}
|
|
140
138
|
|
package/es/v1/Popup/Popup.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
|
-
|
|
3
1
|
/**** Libraries ****/
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
@@ -623,14 +621,15 @@ const Popup = function (Component) {
|
|
|
623
621
|
isPopupOpen
|
|
624
622
|
} = this.state;
|
|
625
623
|
const localState = isPopupReady ? this.state : {};
|
|
626
|
-
return /*#__PURE__*/React.createElement(Component,
|
|
624
|
+
return /*#__PURE__*/React.createElement(Component, { ...this.props,
|
|
625
|
+
...this.state,
|
|
627
626
|
openPopupOnly: this.openPopupOnly,
|
|
628
627
|
closePopupOnly: this.closePopupOnly,
|
|
629
628
|
togglePopup: this.togglePopup,
|
|
630
629
|
removeClose: this.removeClose,
|
|
631
630
|
getTargetRef: this.getTargetRef,
|
|
632
631
|
getContainerRef: this.getContainerRef
|
|
633
|
-
})
|
|
632
|
+
});
|
|
634
633
|
}
|
|
635
634
|
|
|
636
635
|
}
|