@zohodesk/components 1.0.0-temp-192 → 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/DropBox/DropBox.js +10 -11
- package/es/DropDown/DropDown.js +2 -1
- package/es/ListItem/ListContainer.js +6 -5
- package/es/ListItem/ListItem.js +6 -7
- package/es/ListItem/ListItem.module.css +18 -85
- package/es/ListItem/ListItemWithAvatar.js +7 -8
- package/es/ListItem/ListItemWithCheckBox.js +4 -5
- package/es/ListItem/ListItemWithIcon.js +6 -7
- package/es/ListItem/ListItemWithRadio.js +4 -5
- package/es/Modal/Modal.js +4 -5
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +3 -9
- package/es/MultiSelect/AdvancedMultiSelect.js +8 -9
- package/es/MultiSelect/MultiSelect.js +3 -9
- package/es/MultiSelect/MultiSelectWithAvatar.js +3 -6
- package/es/MultiSelect/SelectedOptions.js +6 -8
- package/es/MultiSelect/Suggestions.js +10 -16
- package/es/MultiSelect/props/defaultProps.js +5 -9
- package/es/MultiSelect/props/propTypes.js +3 -7
- package/es/Popup/Popup.js +3 -4
- package/es/Radio/Radio.js +8 -8
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +2 -4
- package/es/Select/GroupSelect.js +3 -9
- package/es/Select/Select.js +4 -5
- package/es/Select/SelectWithAvatar.js +3 -9
- package/es/Select/SelectWithIcon.js +3 -9
- package/es/Select/props/defaultProps.js +3 -6
- package/es/Select/props/propTypes.js +3 -6
- 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/ListItem/ListItem.js +2 -2
- package/lib/ListItem/ListItem.module.css +18 -85
- package/lib/ListItem/ListItemWithAvatar.js +3 -3
- package/lib/ListItem/ListItemWithIcon.js +2 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -7
- package/lib/MultiSelect/MultiSelect.js +3 -8
- package/lib/MultiSelect/MultiSelectWithAvatar.js +1 -3
- package/lib/MultiSelect/Suggestions.js +4 -8
- package/lib/MultiSelect/props/defaultProps.js +5 -9
- package/lib/MultiSelect/props/propTypes.js +6 -9
- package/lib/Select/GroupSelect.js +3 -8
- package/lib/Select/SelectWithAvatar.js +3 -8
- package/lib/Select/SelectWithIcon.js +3 -8
- package/lib/Select/props/defaultProps.js +3 -5
- package/lib/Select/props/propTypes.js +3 -6
- package/lib/Tab/TabWrapper.js +3 -2
- package/lib/Tab/props/propTypes.js +1 -0
- package/package.json +3 -3
- package/result.json +1 -1
|
@@ -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';
|
|
@@ -108,23 +106,26 @@ export default class AppContainer extends React.Component {
|
|
|
108
106
|
TooltipProps = {},
|
|
109
107
|
ExtraProps = {}
|
|
110
108
|
} = customProps;
|
|
111
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container,
|
|
109
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, {
|
|
112
110
|
className: `${style.container} ${className}`,
|
|
113
111
|
dataId: dataId,
|
|
114
112
|
dataSelectorId: dataSelectorId,
|
|
115
113
|
tagName: tagName,
|
|
116
|
-
eleRef: this.getContainerRef
|
|
117
|
-
|
|
114
|
+
eleRef: this.getContainerRef,
|
|
115
|
+
...ContainerProps,
|
|
116
|
+
...ExtraProps
|
|
117
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
118
118
|
flexible: true
|
|
119
|
-
}, children)), needTooltip ? /*#__PURE__*/React.createElement("div",
|
|
119
|
+
}, children)), needTooltip ? /*#__PURE__*/React.createElement("div", { ...ExtraProps,
|
|
120
120
|
className: `${style.container} ${style.tooltip} ${tooltipParentClass}`,
|
|
121
121
|
"data-id": `${dataId}_tooltip`,
|
|
122
122
|
"data-test-id": `${dataId}_tooltip`,
|
|
123
123
|
"data-selector-id": `${dataSelectorId}_tooltip`
|
|
124
|
-
}
|
|
124
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
125
125
|
ref: this.setTooltipRef,
|
|
126
|
-
customClass: tooltipClass
|
|
127
|
-
|
|
126
|
+
customClass: tooltipClass,
|
|
127
|
+
...TooltipProps
|
|
128
|
+
})) : null);
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
}
|
package/es/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 from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes } from './props/propTypes';
|
|
@@ -156,15 +154,16 @@ export default class Avatar extends React.Component {
|
|
|
156
154
|
let showDefaultBorder = src && !isInvalidImageList && needDefaultBorder;
|
|
157
155
|
let borderStyle = (showDefaultBorder || !src || !showAvatar || showInitial) && needBorder ? `${style.border} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ` : '';
|
|
158
156
|
borderStyle = showAlternateAvatar ? '' : borderStyle;
|
|
159
|
-
return /*#__PURE__*/React.createElement("div",
|
|
157
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
160
158
|
className: `${style.avatar} ${style[size]} ${AvatarSize(size)} ${style[shapeStyle]} ${style[palette]} ${textStyle} ${borderStyle} ${customClass ? customClass : ''}`,
|
|
161
159
|
"data-title": needTitle ? title ? title : name : null,
|
|
162
160
|
"data-id": dataId,
|
|
163
161
|
"data-test-id": dataId,
|
|
164
162
|
onClick: onClick,
|
|
165
163
|
"data-selector-id": dataSelectorId,
|
|
166
|
-
tabIndex: onClick ? 0 : null
|
|
167
|
-
|
|
164
|
+
tabIndex: onClick ? 0 : null,
|
|
165
|
+
...AvatarProps
|
|
166
|
+
}, showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
|
|
168
167
|
className: `${style.initial}`,
|
|
169
168
|
"data-id": `${dataId}_AvatarInitial`,
|
|
170
169
|
"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';
|
|
@@ -47,12 +45,13 @@ export default class AvatarTeam extends React.Component {
|
|
|
47
45
|
customAvatarTeam = ''
|
|
48
46
|
} = customClass;
|
|
49
47
|
let border = borderOnHover || onClick;
|
|
50
|
-
return /*#__PURE__*/React.createElement("span",
|
|
48
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
51
49
|
className: `${style.container} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} `,
|
|
52
50
|
"data-id": dataId,
|
|
53
51
|
"data-test-id": dataId,
|
|
54
|
-
"data-selector-id": dataSelectorId
|
|
55
|
-
|
|
52
|
+
"data-selector-id": dataSelectorId,
|
|
53
|
+
...AvatarTeamProps
|
|
54
|
+
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
56
55
|
name: name,
|
|
57
56
|
onClick: onClick,
|
|
58
57
|
palette: palette,
|
|
@@ -66,8 +65,9 @@ export default class AvatarTeam extends React.Component {
|
|
|
66
65
|
borderOnHover: border,
|
|
67
66
|
needInnerBorder: needInnerBorder,
|
|
68
67
|
needBorder: needBorder,
|
|
69
|
-
needDefaultBorder: needDefaultBorder
|
|
70
|
-
|
|
68
|
+
needDefaultBorder: needDefaultBorder,
|
|
69
|
+
...AvatarProps
|
|
70
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
71
71
|
className: `${style.team} ${isFilled ? `${style[`${palette}Filled`]}` : style.nofill}
|
|
72
72
|
${style[`${size}team`]} ${customAvatarTeam}`
|
|
73
73
|
}));
|
package/es/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';
|
|
@@ -41,7 +39,7 @@ export default function Button(props) {
|
|
|
41
39
|
style: finalStyle
|
|
42
40
|
});
|
|
43
41
|
let statusLower = status.toLowerCase();
|
|
44
|
-
return /*#__PURE__*/React.createElement("button",
|
|
42
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
45
43
|
className: buttonClass,
|
|
46
44
|
"data-id": disabled ? `${dataId}_disabled` : dataId,
|
|
47
45
|
"data-test-id": disabled ? `${dataId}_disabled` : dataId,
|
|
@@ -50,10 +48,11 @@ export default function Button(props) {
|
|
|
50
48
|
"data-title": title,
|
|
51
49
|
type: "button",
|
|
52
50
|
ref: getRef,
|
|
53
|
-
"data-selector-id": dataSelectorId
|
|
54
|
-
|
|
51
|
+
"data-selector-id": dataSelectorId,
|
|
52
|
+
...customProps,
|
|
53
|
+
...a11y,
|
|
55
54
|
id: id
|
|
56
|
-
}
|
|
55
|
+
}, children ? children : text, statusLower !== 'none' && needAppearance && /*#__PURE__*/React.createElement("div", {
|
|
57
56
|
className: finalStyle.overlay
|
|
58
57
|
}, /*#__PURE__*/React.createElement("div", {
|
|
59
58
|
className: loaderParentClass
|
package/es/CheckBox/CheckBox.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 { propTypes } from './props/propTypes';
|
|
5
3
|
import { defaultProps } from './props/defaultProps';
|
|
@@ -75,7 +73,7 @@ export default class CheckBox extends React.Component {
|
|
|
75
73
|
role = 'checkbox',
|
|
76
74
|
ariaChecked = checked
|
|
77
75
|
} = a11y;
|
|
78
|
-
return /*#__PURE__*/React.createElement(Container,
|
|
76
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
79
77
|
dataId: dataId,
|
|
80
78
|
isCover: false,
|
|
81
79
|
isInline: text ? false : true,
|
|
@@ -92,8 +90,9 @@ export default class CheckBox extends React.Component {
|
|
|
92
90
|
"aria-label": ariaLabel,
|
|
93
91
|
"aria-labelledby": ariaLabelledby,
|
|
94
92
|
"aria-hidden": ariaHidden,
|
|
95
|
-
"data-selector-id": dataSelectorId || id
|
|
96
|
-
|
|
93
|
+
"data-selector-id": dataSelectorId || id,
|
|
94
|
+
...CheckBoxProps
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
97
96
|
className: `${style.boxContainer} ${style[size]} ${customCBoxSize} ${isFilled ? style.filled : ''}`
|
|
98
97
|
}, /*#__PURE__*/React.createElement("input", {
|
|
99
98
|
type: "hidden",
|
|
@@ -145,7 +144,7 @@ export default class CheckBox extends React.Component {
|
|
|
145
144
|
}) : null))), text && /*#__PURE__*/React.createElement(Box, {
|
|
146
145
|
flexible: true,
|
|
147
146
|
className: style.text
|
|
148
|
-
}, /*#__PURE__*/React.createElement(Label,
|
|
147
|
+
}, /*#__PURE__*/React.createElement(Label, {
|
|
149
148
|
text: text,
|
|
150
149
|
palette: disabled ? 'disable' : labelPalette,
|
|
151
150
|
id: id,
|
|
@@ -156,8 +155,9 @@ export default class CheckBox extends React.Component {
|
|
|
156
155
|
customClass: `${active && !disabled ? `${style[`active${palette}Label`]}` : ''}
|
|
157
156
|
${checked && active ? `${style[`checked${palette}Label`]}` : ''}
|
|
158
157
|
${accessMode} ${customLabel}`,
|
|
159
|
-
title: toolTip ? toolTip : text
|
|
160
|
-
|
|
158
|
+
title: toolTip ? toolTip : text,
|
|
159
|
+
...LabelProps
|
|
160
|
+
})));
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
}
|
package/es/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'; // import { getLibraryConfig } from '../Provider/Config';
|
|
@@ -42,27 +40,28 @@ export default function DropBox(props) {
|
|
|
42
40
|
const {
|
|
43
41
|
zIndexStyle
|
|
44
42
|
} = cssJSLogic(props);
|
|
45
|
-
const dropBoxEle = needFocusScope ? /*#__PURE__*/React.createElement(FocusScope,
|
|
43
|
+
const dropBoxEle = needFocusScope ? /*#__PURE__*/React.createElement(FocusScope, {
|
|
46
44
|
onClose: onClose,
|
|
47
45
|
elementRef: dropBoxRef,
|
|
48
46
|
needAutoFocus: needAutoFocus,
|
|
49
47
|
needRestoreFocus: needRestoreFocus,
|
|
50
48
|
needListNavigation: needListNavigation,
|
|
51
49
|
needFocusLoop: needFocusLoop,
|
|
52
|
-
needEnterAction: needEnterAction
|
|
53
|
-
|
|
50
|
+
needEnterAction: needEnterAction,
|
|
51
|
+
...focusScopeProps
|
|
52
|
+
}, /*#__PURE__*/React.createElement(DropBoxElement, {
|
|
54
53
|
isModel: isModel,
|
|
55
|
-
direction: direction
|
|
56
|
-
|
|
54
|
+
direction: direction,
|
|
55
|
+
...props,
|
|
57
56
|
zIndexStyle: zIndexStyle,
|
|
58
57
|
subContainerRef: dropBoxRef
|
|
59
|
-
}))
|
|
58
|
+
})) : /*#__PURE__*/React.createElement(DropBoxElement, {
|
|
60
59
|
isModel: isModel,
|
|
61
60
|
subContainerRef: dropBoxRef,
|
|
62
|
-
direction: direction
|
|
63
|
-
|
|
61
|
+
direction: direction,
|
|
62
|
+
...props,
|
|
64
63
|
zIndexStyle: zIndexStyle
|
|
65
|
-
})
|
|
64
|
+
});
|
|
66
65
|
return isModel && isActive ? /*#__PURE__*/React.createElement(Modal, {
|
|
67
66
|
portalId: portalId
|
|
68
67
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
package/es/DropDown/DropDown.js
CHANGED
|
@@ -10,7 +10,8 @@ export default class DropDown extends React.Component {
|
|
|
10
10
|
let {
|
|
11
11
|
children
|
|
12
12
|
} = this.props;
|
|
13
|
-
return /*#__PURE__*/React.createElement(PopOver, this.props
|
|
13
|
+
return /*#__PURE__*/React.createElement(PopOver, { ...this.props
|
|
14
|
+
}, /*#__PURE__*/React.createElement(PopOverTarget, null, children[0]), /*#__PURE__*/React.createElement(PopOverContainer, null, children[1]));
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
}
|
|
@@ -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;
|
package/es/ListItem/ListItem.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 { Box } from '../Layout';
|
|
@@ -92,7 +90,7 @@ export default class ListItem extends React.Component {
|
|
|
92
90
|
} = listA11y;
|
|
93
91
|
let tickIconPalette = style[`${palette}Tick`] ? style[`${palette}Tick`] : '';
|
|
94
92
|
let dataIdString = dataId ? dataId : value ? String(value).replace("'", '_') : 'listItem';
|
|
95
|
-
return /*#__PURE__*/React.createElement(ListContainer,
|
|
93
|
+
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
96
94
|
a11y: listA11y,
|
|
97
95
|
size: size,
|
|
98
96
|
palette: palette,
|
|
@@ -102,7 +100,7 @@ export default class ListItem extends React.Component {
|
|
|
102
100
|
autoHover: autoHover,
|
|
103
101
|
needTick: needTick,
|
|
104
102
|
needBorder: needBorder,
|
|
105
|
-
customClass:
|
|
103
|
+
customClass: customListItem,
|
|
106
104
|
dataId: dataIdString,
|
|
107
105
|
dataSelectorId: `${dataSelectorId}`,
|
|
108
106
|
isLink: isLink,
|
|
@@ -113,8 +111,9 @@ export default class ListItem extends React.Component {
|
|
|
113
111
|
onClick: this.handleClick,
|
|
114
112
|
onMouseEnter: this.handleMouseEnter,
|
|
115
113
|
eleRef: this.getRef,
|
|
116
|
-
customProps: ListItemProps
|
|
117
|
-
|
|
114
|
+
customProps: ListItemProps,
|
|
115
|
+
...ContainerProps
|
|
116
|
+
}, value ? /*#__PURE__*/React.createElement(Box, {
|
|
118
117
|
shrink: true,
|
|
119
118
|
adjust: true,
|
|
120
119
|
className: needMultiLineText ? style.multiLineValue : style.value
|
|
@@ -123,7 +122,7 @@ export default class ListItem extends React.Component {
|
|
|
123
122
|
adjust: true,
|
|
124
123
|
className: style.children
|
|
125
124
|
}, children) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
126
|
-
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon}
|
|
125
|
+
className: `${style.tickIcon} ${tickIconPalette} ${customTickIcon}`,
|
|
127
126
|
"aria-hidden": ariaHidden,
|
|
128
127
|
dataId: `${dataIdString}_tickIcon`,
|
|
129
128
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -17,9 +17,8 @@
|
|
|
17
17
|
}[dir=ltr] .varClass {
|
|
18
18
|
--listitem_avatar_margin: 0 var(--zd_size15) 0 0;
|
|
19
19
|
}[dir=rtl] .varClass {
|
|
20
|
-
--listitem_avatar_margin: 0 var(--zd_size15)
|
|
20
|
+
--listitem_avatar_margin: 0 0 0 var(--zd_size15);
|
|
21
21
|
}
|
|
22
|
-
|
|
23
22
|
.list {
|
|
24
23
|
composes: varClass;
|
|
25
24
|
position: relative;
|
|
@@ -35,84 +34,62 @@
|
|
|
35
34
|
border-color: var(--listitem_border_color);
|
|
36
35
|
cursor: pointer;
|
|
37
36
|
}
|
|
38
|
-
|
|
39
37
|
.list, .default, .secondary {
|
|
40
38
|
background-color: var(--listitem_bg_color);
|
|
41
39
|
}
|
|
42
|
-
|
|
43
40
|
[dir=ltr] .withBorder {
|
|
44
|
-
--listitem_border_width: 0 0 0 1px
|
|
45
|
-
/*rtl: 0 1px 0 0*/
|
|
46
|
-
;
|
|
41
|
+
--listitem_border_width: 0 0 0 1px /*rtl: 0 1px 0 0*/;
|
|
47
42
|
}
|
|
48
|
-
|
|
49
43
|
[dir=rtl] .withBorder {
|
|
50
|
-
--listitem_border_width: 0 0 0
|
|
44
|
+
--listitem_border_width: 0 1px 0 0;
|
|
51
45
|
}
|
|
52
|
-
|
|
53
46
|
.active {
|
|
54
47
|
--listitem_border_color: var(--zdt_listitem_active_border);
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
[dir=ltr] .small {
|
|
58
50
|
--listitem_padding: var(--zd_size7) var(--zd_size3) var(--zd_size7) var(--zd_size5);
|
|
59
51
|
}
|
|
60
|
-
|
|
61
52
|
[dir=rtl] .small {
|
|
62
|
-
--listitem_padding: var(--zd_size7) var(--
|
|
53
|
+
--listitem_padding: var(--zd_size7) var(--zd_size5) var(--zd_size7) var(--zd_size3);
|
|
63
54
|
}
|
|
64
|
-
|
|
65
55
|
.medium {
|
|
66
56
|
--listitem_padding: var(--zd_size7) var(--zd_size20);
|
|
67
57
|
--listitem_min_height: var(--zd_size35);
|
|
68
58
|
}
|
|
69
|
-
|
|
70
59
|
.large {
|
|
71
60
|
--listitem_height: var(--zd_size48);
|
|
72
61
|
}
|
|
73
|
-
|
|
74
62
|
[dir=ltr] .large {
|
|
75
63
|
--listitem_padding: var(--zd_size10) var(--zd_size3) var(--zd_size10) var(--zd_size25);
|
|
76
64
|
}
|
|
77
|
-
|
|
78
65
|
[dir=rtl] .large {
|
|
79
|
-
--listitem_padding: var(--zd_size10) var(--
|
|
66
|
+
--listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3);
|
|
80
67
|
}
|
|
81
|
-
|
|
82
68
|
.value,
|
|
83
69
|
.children {
|
|
84
70
|
composes: dotted from '../common/common.module.css';
|
|
85
71
|
}
|
|
86
|
-
|
|
87
|
-
.value {
|
|
72
|
+
.value, .multiLineValue {
|
|
88
73
|
line-height: 1.5385;
|
|
89
74
|
}
|
|
90
|
-
|
|
91
|
-
.multiLineValue {
|
|
92
|
-
line-height: 1.3076;
|
|
75
|
+
.multiLineValue{
|
|
93
76
|
word-break: break-word;
|
|
94
|
-
|
|
95
|
-
composes: clamp from '../common/common.module.css';
|
|
77
|
+
composes: clamp from '../common/common.module.css'
|
|
96
78
|
}
|
|
97
|
-
|
|
98
79
|
.iconBox {
|
|
99
80
|
width: var(--zd_size20) ;
|
|
100
81
|
text-align: center;
|
|
101
82
|
}
|
|
102
|
-
|
|
103
83
|
[dir=ltr] .iconBox {
|
|
104
84
|
margin-right: var(--zd_size10) ;
|
|
105
85
|
}
|
|
106
|
-
|
|
107
86
|
[dir=rtl] .iconBox {
|
|
108
87
|
margin-left: var(--zd_size10) ;
|
|
109
88
|
}
|
|
110
|
-
|
|
111
89
|
.iconBox,
|
|
112
90
|
.leftAvatar {
|
|
113
91
|
font-size: 0 ;
|
|
114
92
|
}
|
|
115
|
-
|
|
116
93
|
.leftAvatar {
|
|
117
94
|
margin: var(--listitem_avatar_margin);
|
|
118
95
|
}
|
|
@@ -120,78 +97,61 @@
|
|
|
120
97
|
.defaultHover, .primaryHover, .secondaryHover, .darkHover {
|
|
121
98
|
background-color: var(--listitem_highlight_bg_color);
|
|
122
99
|
}
|
|
123
|
-
|
|
124
100
|
.activewithBorder {
|
|
125
101
|
--listitem_border_color: var(--zdt_listitem_active_border);
|
|
126
102
|
}
|
|
127
|
-
|
|
128
103
|
[dir=ltr] .activewithBorder {
|
|
129
|
-
--listitem_border_width: 0 0 0 1px
|
|
130
|
-
/*rtl: 0 1px 0 0*/
|
|
131
|
-
;
|
|
104
|
+
--listitem_border_width: 0 0 0 1px /*rtl: 0 1px 0 0*/;
|
|
132
105
|
}
|
|
133
|
-
|
|
134
106
|
[dir=rtl] .activewithBorder {
|
|
135
|
-
--listitem_border_width: 0 0 0
|
|
107
|
+
--listitem_border_width: 0 1px 0 0;
|
|
136
108
|
}
|
|
137
109
|
|
|
138
110
|
.defaultHover,
|
|
139
111
|
.defaultEffect:hover
|
|
140
|
-
|
|
141
112
|
/* .defaultEffect:focus */
|
|
142
|
-
|
|
113
|
+
{
|
|
143
114
|
--listitem_bg_color: var(--zdt_listitem_highlight_bg);
|
|
144
115
|
}
|
|
145
|
-
|
|
146
116
|
.primaryHover,
|
|
147
117
|
.primaryEffect:hover
|
|
148
|
-
|
|
149
118
|
/* .primaryEffect:focus */
|
|
150
|
-
|
|
119
|
+
{
|
|
151
120
|
--listitem_bg_color: var(--zdt_listitem_primary_bg);
|
|
152
121
|
--listitem_highlight_bg_color: var(--zdt_listitem_primary_bg);
|
|
153
122
|
}
|
|
154
|
-
|
|
155
123
|
.secondaryHover,
|
|
156
124
|
.secondaryEffect:hover
|
|
157
|
-
|
|
158
125
|
/* .secondaryEffect:focus */
|
|
159
|
-
|
|
126
|
+
{
|
|
160
127
|
--listitem_bg_color: var(--zdt_listitem_secondary_bg);
|
|
161
128
|
--listitem_highlight_bg_color: var(--zdt_listitem_secondary_bg);
|
|
162
129
|
--listitem_text_color: var(--zdt_listitem_secondary_text);
|
|
163
130
|
}
|
|
164
|
-
|
|
165
131
|
.darkHover,
|
|
166
132
|
.darkEffect:hover
|
|
167
|
-
|
|
168
133
|
/* .darkEffect:focus */
|
|
169
|
-
|
|
134
|
+
{
|
|
170
135
|
--listitem_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
171
136
|
--listitem_highlight_bg_color: var(--zdt_listitem_dark_effect_bg);
|
|
172
137
|
}
|
|
173
|
-
|
|
174
138
|
.activedefault, .activeprimary, .activesecondary, .activedark {
|
|
175
139
|
background-color: var(--listitem_active_bg_color);
|
|
176
140
|
}
|
|
177
|
-
|
|
178
141
|
.activedefault,
|
|
179
142
|
.activedefault:hover,
|
|
180
143
|
.activeprimary,
|
|
181
144
|
.activeprimary:hover {
|
|
182
145
|
--listitem_active_bg_color: var(--zdt_listitem_primary_bg);
|
|
183
146
|
}
|
|
184
|
-
|
|
185
147
|
.activesecondary {
|
|
186
148
|
--listitem_active_bg_color: var(--zdt_listitem_secondary_bg);
|
|
187
149
|
--listitem_text_color: var(--zdt_listitem_secondary_text);
|
|
188
150
|
}
|
|
189
|
-
|
|
190
151
|
.dark {
|
|
191
152
|
--listitem_bg_color: var(--zdt_listitem_dark_bg);
|
|
192
153
|
--listitem_text_color: var(--zdt_listitem_dark_text);
|
|
193
154
|
}
|
|
194
|
-
|
|
195
155
|
.activedark {
|
|
196
156
|
--listitem_active_bg_color: var(--zdt_listitem_dark_active_bg);
|
|
197
157
|
}
|
|
@@ -210,63 +170,36 @@
|
|
|
210
170
|
[dir=rtl] .tickIcon, [dir=rtl] .defaultTick, [dir=rtl] .darkTick {
|
|
211
171
|
left: var(--zd_size20) ;
|
|
212
172
|
}
|
|
213
|
-
|
|
214
173
|
.defaultTick {
|
|
215
174
|
--listitem_tickicon_color: var(--zdt_listitem_default_tickicon);
|
|
216
175
|
}
|
|
217
|
-
|
|
218
176
|
.darkTick {
|
|
219
177
|
--listitem_tickicon_color: var(--zdt_listitem_dark_tickicon);
|
|
220
178
|
}
|
|
221
|
-
|
|
222
|
-
.defaultTick>i {
|
|
179
|
+
.defaultTick > i {
|
|
223
180
|
display: block;
|
|
224
181
|
}
|
|
225
|
-
|
|
226
182
|
[dir=ltr] .smallwithTick {
|
|
227
183
|
--listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size5);
|
|
228
184
|
}
|
|
229
|
-
|
|
230
185
|
[dir=rtl] .smallwithTick {
|
|
231
|
-
--listitem_padding: var(--zd_size7) var(--
|
|
186
|
+
--listitem_padding: var(--zd_size7) var(--zd_size5) var(--zd_size7) var(--zd_size39);
|
|
232
187
|
}
|
|
233
|
-
|
|
234
188
|
[dir=ltr] .mediumwithTick {
|
|
235
189
|
--listitem_padding: var(--zd_size7) var(--zd_size39) var(--zd_size7) var(--zd_size20);
|
|
236
190
|
}
|
|
237
|
-
|
|
238
191
|
[dir=rtl] .mediumwithTick {
|
|
239
|
-
--listitem_padding: var(--zd_size7) var(--
|
|
192
|
+
--listitem_padding: var(--zd_size7) var(--zd_size20) var(--zd_size7) var(--zd_size39);
|
|
240
193
|
}
|
|
241
|
-
|
|
242
194
|
[dir=ltr] .largewithTick {
|
|
243
195
|
--listitem_padding: var(--zd_size10) var(--zd_size39) var(--zd_size10) var(--zd_size25);
|
|
244
196
|
}
|
|
245
|
-
|
|
246
197
|
[dir=rtl] .largewithTick {
|
|
247
|
-
--listitem_padding: var(--zd_size10) var(--
|
|
198
|
+
--listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size39);
|
|
248
199
|
}
|
|
249
|
-
|
|
250
200
|
.responsiveHeight {
|
|
251
201
|
--listitem_min_height: var(--zd_size45);
|
|
252
202
|
font-size: var(--zd_font_size15) ;
|
|
253
203
|
padding-top: var(--zd_size10) ;
|
|
254
204
|
padding-bottom: var(--zd_size10) ;
|
|
255
205
|
}
|
|
256
|
-
|
|
257
|
-
.autoHeight {
|
|
258
|
-
height: auto ;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.tickIconCenter {
|
|
262
|
-
top: 50% ;
|
|
263
|
-
transform: translateY(-50%);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.txtAlignBaseLine {
|
|
267
|
-
align-items: baseline;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.alignSelfTop {
|
|
271
|
-
align-self: start;
|
|
272
|
-
}
|
|
@@ -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';
|
|
@@ -97,7 +95,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
97
95
|
} = listA11y;
|
|
98
96
|
let isDarkPalette = palette === 'dark';
|
|
99
97
|
let dataIdString = value ? value : dataId;
|
|
100
|
-
return /*#__PURE__*/React.createElement(ListContainer,
|
|
98
|
+
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
101
99
|
a11y: listA11y,
|
|
102
100
|
size: size,
|
|
103
101
|
palette: palette,
|
|
@@ -107,7 +105,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
107
105
|
autoHover: autoHover,
|
|
108
106
|
needTick: needTick,
|
|
109
107
|
needBorder: needBorder,
|
|
110
|
-
customClass:
|
|
108
|
+
customClass: customListItem,
|
|
111
109
|
dataId: `${dataIdString}_ListItemWithAvatar`,
|
|
112
110
|
dataSelectorId: `${dataSelectorId}`,
|
|
113
111
|
onClick: this.handleClick,
|
|
@@ -115,9 +113,10 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
115
113
|
eleRef: this.getRef,
|
|
116
114
|
disableTitle: disableTitle,
|
|
117
115
|
title: null,
|
|
118
|
-
customProps: ListItemProps
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
customProps: ListItemProps,
|
|
117
|
+
...ContainerProps
|
|
118
|
+
}, name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
|
|
119
|
+
className: style.leftAvatar
|
|
121
120
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
122
121
|
name: name,
|
|
123
122
|
size: "small",
|
|
@@ -144,7 +143,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
144
143
|
"data-title": isDisabled ? null : title,
|
|
145
144
|
className: needMultiLineText ? style.multiLineValue : style.value
|
|
146
145
|
}, value) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
147
|
-
className:
|
|
146
|
+
className: style.tickIcon,
|
|
148
147
|
"aria-hidden": ariaHidden,
|
|
149
148
|
dataId: `${dataIdString}_tickIcon`,
|
|
150
149
|
dataSelectorId: `${dataSelectorId}_tickIcon`
|
|
@@ -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';
|
|
@@ -76,7 +74,7 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
76
74
|
customCheckBox = '',
|
|
77
75
|
customLabel = ''
|
|
78
76
|
} = customClass;
|
|
79
|
-
return /*#__PURE__*/React.createElement(ListContainer,
|
|
77
|
+
return /*#__PURE__*/React.createElement(ListContainer, {
|
|
80
78
|
a11y: listA11y,
|
|
81
79
|
size: size,
|
|
82
80
|
palette: palette,
|
|
@@ -92,8 +90,9 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
92
90
|
eleRef: this.getRef,
|
|
93
91
|
disableTitle: disableTitle,
|
|
94
92
|
title: null,
|
|
95
|
-
customProps: ListItemProps
|
|
96
|
-
|
|
93
|
+
customProps: ListItemProps,
|
|
94
|
+
...ContainerProps
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
97
96
|
className: style.iconBox
|
|
98
97
|
}, /*#__PURE__*/React.createElement(CheckBox, {
|
|
99
98
|
checked: checked,
|