@zohodesk/components 1.0.0-alpha-276 → 1.0.0-alpha-278
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 +12 -0
- package/es/Buttongroup/Buttongroup.js +1 -1
- package/es/DateTime/DateTime.js +2 -2
- package/es/DropBox/DropBox.js +24 -12
- package/es/DropBox/props/defaultProps.js +2 -1
- package/es/DropBox/props/propTypes.js +2 -1
- package/es/ListItem/ListContainer.js +3 -2
- package/es/ListItem/ListItem.js +8 -3
- package/es/ListItem/ListItemWithAvatar.js +8 -3
- package/es/ListItem/ListItemWithCheckBox.js +5 -1
- package/es/ListItem/ListItemWithIcon.js +8 -3
- package/es/ListItem/ListItemWithRadio.js +5 -1
- package/es/MultiSelect/props/propTypes.js +1 -1
- package/es/Select/Select.js +2 -0
- package/lib/Buttongroup/Buttongroup.js +1 -1
- package/lib/DateTime/DateTime.js +2 -2
- package/lib/DropBox/DropBox.js +26 -12
- package/lib/DropBox/props/defaultProps.js +2 -1
- package/lib/DropBox/props/propTypes.js +2 -1
- package/lib/ListItem/ListContainer.js +4 -2
- package/lib/ListItem/ListItem.js +14 -3
- package/lib/ListItem/ListItemWithAvatar.js +14 -3
- package/lib/ListItem/ListItemWithCheckBox.js +12 -1
- package/lib/ListItem/ListItemWithIcon.js +14 -3
- package/lib/ListItem/ListItemWithRadio.js +12 -1
- package/lib/MultiSelect/props/propTypes.js +1 -1
- package/lib/Select/Select.js +2 -0
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -32,6 +32,18 @@ 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-278
|
|
36
|
+
|
|
37
|
+
- **DateTime** - Date.Raplace check added to avoid run time error
|
|
38
|
+
|
|
39
|
+
# 1.0.0-alpha-277
|
|
40
|
+
|
|
41
|
+
- **DropBox** - `focusScopeProps` will be served by `customProps` from now.
|
|
42
|
+
|
|
43
|
+
- **ListItem, ListItemWithAvatar, ListItemWithIcon, ListItemWithCheckBox, ListItemWithRadio** - default role `option` has been added to the list item container.
|
|
44
|
+
|
|
45
|
+
- **ListContainer** - A11y prop key => `data-a11y-inset-focus` set `true` as default for the ListContainer.
|
|
46
|
+
|
|
35
47
|
# 1.0.0-alpha-276
|
|
36
48
|
|
|
37
49
|
- **DateTime** - TimeZone null Case Handled
|
|
@@ -16,7 +16,7 @@ export default class Buttongroup extends React.Component {
|
|
|
16
16
|
dataSelectorId
|
|
17
17
|
} = this.props;
|
|
18
18
|
let btnGroup = [];
|
|
19
|
-
children.forEach(child => {
|
|
19
|
+
children && children.forEach(child => {
|
|
20
20
|
let btnRight = /*#__PURE__*/React.createElement("span", {
|
|
21
21
|
className: style[type]
|
|
22
22
|
}, child);
|
package/es/DateTime/DateTime.js
CHANGED
|
@@ -112,8 +112,8 @@ export default class DateTime extends React.PureComponent {
|
|
|
112
112
|
if (timeZone && value) {
|
|
113
113
|
result = datetime.toDate(datetime.tz.utcToTz(value, timeZone));
|
|
114
114
|
} else {
|
|
115
|
-
value = value.replace('Z', '');
|
|
116
|
-
result = new Date(value);
|
|
115
|
+
value = value ? value.replace('Z', '') : null;
|
|
116
|
+
result = value ? new Date(value) : new Date();
|
|
117
117
|
}
|
|
118
118
|
} else {
|
|
119
119
|
if (value) {
|
package/es/DropBox/DropBox.js
CHANGED
|
@@ -12,7 +12,7 @@ import { DropBoxPropTypes } from './props/propTypes';
|
|
|
12
12
|
import { stopPropagation } from './../utils/Common';
|
|
13
13
|
import style from './css/DropBox.module.css';
|
|
14
14
|
export default function DropBox(props) {
|
|
15
|
-
const
|
|
15
|
+
const dropBoxRef = useRef(null);
|
|
16
16
|
const DropBoxContext = useContext(LibraryContext);
|
|
17
17
|
const {
|
|
18
18
|
needResponsive,
|
|
@@ -21,8 +21,19 @@ export default function DropBox(props) {
|
|
|
21
21
|
isAbsolutePositioningNeeded,
|
|
22
22
|
isRestrictScroll,
|
|
23
23
|
needFocusScope,
|
|
24
|
-
onClose
|
|
24
|
+
onClose,
|
|
25
|
+
customProps
|
|
25
26
|
} = props;
|
|
27
|
+
const {
|
|
28
|
+
focusScopeProps = {}
|
|
29
|
+
} = customProps;
|
|
30
|
+
const {
|
|
31
|
+
autoFocus = true,
|
|
32
|
+
restoreFocus = true,
|
|
33
|
+
needArrowLoop = true,
|
|
34
|
+
needTabLoop = false,
|
|
35
|
+
enableEnterAction = true
|
|
36
|
+
} = focusScopeProps;
|
|
26
37
|
const {
|
|
27
38
|
direction
|
|
28
39
|
} = DropBoxContext || {};
|
|
@@ -41,22 +52,23 @@ export default function DropBox(props) {
|
|
|
41
52
|
const {
|
|
42
53
|
zIndexStyle
|
|
43
54
|
} = cssJSLogic(props);
|
|
44
|
-
const dropBoxEle = needFocusScope ? /*#__PURE__*/React.createElement(FocusScope, {
|
|
45
|
-
|
|
46
|
-
elementRef:
|
|
47
|
-
autoFocus:
|
|
48
|
-
restoreFocus:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
const dropBoxEle = needFocusScope ? /*#__PURE__*/React.createElement(FocusScope, _extends({
|
|
56
|
+
onClose: onClose,
|
|
57
|
+
elementRef: dropBoxRef,
|
|
58
|
+
autoFocus: autoFocus,
|
|
59
|
+
restoreFocus: restoreFocus,
|
|
60
|
+
needArrowLoop: needArrowLoop,
|
|
61
|
+
needTabLoop: needTabLoop,
|
|
62
|
+
enableEnterAction: enableEnterAction
|
|
63
|
+
}, focusScopeProps), /*#__PURE__*/React.createElement(DropBoxElement, _extends({
|
|
52
64
|
isModel: isModel,
|
|
53
65
|
direction: direction
|
|
54
66
|
}, props, {
|
|
55
67
|
zIndexStyle: zIndexStyle,
|
|
56
|
-
subContainerRef:
|
|
68
|
+
subContainerRef: dropBoxRef
|
|
57
69
|
}))) : /*#__PURE__*/React.createElement(DropBoxElement, _extends({
|
|
58
70
|
isModel: isModel,
|
|
59
|
-
subContainerRef:
|
|
71
|
+
subContainerRef: dropBoxRef,
|
|
60
72
|
direction: direction
|
|
61
73
|
}, props, {
|
|
62
74
|
zIndexStyle: zIndexStyle
|
|
@@ -6,7 +6,8 @@ export const defaultProps = {
|
|
|
6
6
|
isAbsolutePositioningNeeded: true,
|
|
7
7
|
isRestrictScroll: false,
|
|
8
8
|
needFocusScope: false,
|
|
9
|
-
needAutoZindex: true
|
|
9
|
+
needAutoZindex: true,
|
|
10
|
+
customProps: {}
|
|
10
11
|
};
|
|
11
12
|
export const DropBoxDefaultProps = { ...DropBoxElementDefaultProps,
|
|
12
13
|
...defaultProps
|
|
@@ -7,7 +7,8 @@ export const propTypes = {
|
|
|
7
7
|
isAbsolutePositioningNeeded: PropTypes.bool,
|
|
8
8
|
isRestrictScroll: PropTypes.bool,
|
|
9
9
|
needFocusScope: PropTypes.bool,
|
|
10
|
-
needAutoZindex: PropTypes.bool
|
|
10
|
+
needAutoZindex: PropTypes.bool,
|
|
11
|
+
customProps: PropTypes.object
|
|
11
12
|
};
|
|
12
13
|
export const DropBoxPropTypes = { ...DropBoxElementPropTypes,
|
|
13
14
|
...propTypes
|
|
@@ -54,7 +54,8 @@ const ListContainer = props => {
|
|
|
54
54
|
const {
|
|
55
55
|
role,
|
|
56
56
|
ariaSelected,
|
|
57
|
-
ariaLabel
|
|
57
|
+
ariaLabel,
|
|
58
|
+
insetFocus = true
|
|
58
59
|
} = a11y;
|
|
59
60
|
const options = {};
|
|
60
61
|
|
|
@@ -73,7 +74,7 @@ const ListContainer = props => {
|
|
|
73
74
|
|
|
74
75
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
75
76
|
role: role,
|
|
76
|
-
"data-a11y-
|
|
77
|
+
"data-a11y-inset-focus": insetFocus,
|
|
77
78
|
"aria-selected": ariaSelected,
|
|
78
79
|
"aria-label": ariaLabel,
|
|
79
80
|
isCover: false,
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -82,13 +82,18 @@ export default class ListItem extends React.Component {
|
|
|
82
82
|
customListItem = '',
|
|
83
83
|
customTickIcon = ''
|
|
84
84
|
} = customClass;
|
|
85
|
+
const listA11y = {
|
|
86
|
+
ariaHidden: true,
|
|
87
|
+
role: 'option',
|
|
88
|
+
...a11y
|
|
89
|
+
};
|
|
85
90
|
let {
|
|
86
|
-
ariaHidden
|
|
87
|
-
} =
|
|
91
|
+
ariaHidden
|
|
92
|
+
} = listA11y;
|
|
88
93
|
let tickIconPalette = style[`${palette}Tick`] ? style[`${palette}Tick`] : '';
|
|
89
94
|
let dataIdString = dataId ? dataId : value ? String(value).replace("'", '_') : 'listItem';
|
|
90
95
|
return /*#__PURE__*/React.createElement(ListContainer, _extends({
|
|
91
|
-
a11y:
|
|
96
|
+
a11y: listA11y,
|
|
92
97
|
size: size,
|
|
93
98
|
palette: palette,
|
|
94
99
|
highlight: highlight,
|
|
@@ -87,13 +87,18 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
87
87
|
customAvatar = '',
|
|
88
88
|
customAvatarTeam = ''
|
|
89
89
|
} = customClass;
|
|
90
|
+
const listA11y = {
|
|
91
|
+
ariaHidden: true,
|
|
92
|
+
role: 'option',
|
|
93
|
+
...a11y
|
|
94
|
+
};
|
|
90
95
|
let {
|
|
91
|
-
ariaHidden
|
|
92
|
-
} =
|
|
96
|
+
ariaHidden
|
|
97
|
+
} = listA11y;
|
|
93
98
|
let isDarkPalette = palette === 'dark';
|
|
94
99
|
let dataIdString = value ? value : dataId;
|
|
95
100
|
return /*#__PURE__*/React.createElement(ListContainer, _extends({
|
|
96
|
-
a11y:
|
|
101
|
+
a11y: listA11y,
|
|
97
102
|
size: size,
|
|
98
103
|
palette: palette,
|
|
99
104
|
highlight: highlight,
|
|
@@ -63,6 +63,10 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
63
63
|
customProps,
|
|
64
64
|
needMultiLineText
|
|
65
65
|
} = this.props;
|
|
66
|
+
const listA11y = {
|
|
67
|
+
role: 'option',
|
|
68
|
+
...a11y
|
|
69
|
+
};
|
|
66
70
|
let {
|
|
67
71
|
ListItemProps = {},
|
|
68
72
|
ContainerProps = {}
|
|
@@ -73,7 +77,7 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
73
77
|
customLabel = ''
|
|
74
78
|
} = customClass;
|
|
75
79
|
return /*#__PURE__*/React.createElement(ListContainer, _extends({
|
|
76
|
-
a11y:
|
|
80
|
+
a11y: listA11y,
|
|
77
81
|
size: size,
|
|
78
82
|
palette: palette,
|
|
79
83
|
highlight: highlight,
|
|
@@ -78,12 +78,17 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
78
78
|
ListItemProps = {},
|
|
79
79
|
ContainerProps = {}
|
|
80
80
|
} = customProps;
|
|
81
|
+
const listA11y = {
|
|
82
|
+
ariaHidden: true,
|
|
83
|
+
role: 'option',
|
|
84
|
+
...a11y
|
|
85
|
+
};
|
|
81
86
|
let {
|
|
82
|
-
ariaHidden
|
|
83
|
-
} =
|
|
87
|
+
ariaHidden
|
|
88
|
+
} = listA11y;
|
|
84
89
|
let dataIdString = dataId ? `${dataId.replace("'", '_')}` : value.toLowerCase().replace("'", '_');
|
|
85
90
|
return /*#__PURE__*/React.createElement(ListContainer, _extends({
|
|
86
|
-
a11y:
|
|
91
|
+
a11y: listA11y,
|
|
87
92
|
size: size,
|
|
88
93
|
palette: palette,
|
|
89
94
|
highlight: highlight,
|
|
@@ -68,13 +68,17 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
68
68
|
ListItemProps = {},
|
|
69
69
|
ContainerProps = {}
|
|
70
70
|
} = customProps;
|
|
71
|
+
const listA11y = {
|
|
72
|
+
role: 'option',
|
|
73
|
+
...a11y
|
|
74
|
+
};
|
|
71
75
|
let {
|
|
72
76
|
customListItem = '',
|
|
73
77
|
customRadio = '',
|
|
74
78
|
customRadioWrap = ''
|
|
75
79
|
} = customClass;
|
|
76
80
|
return /*#__PURE__*/React.createElement(ListContainer, _extends({
|
|
77
|
-
a11y:
|
|
81
|
+
a11y: listA11y,
|
|
78
82
|
size: size,
|
|
79
83
|
palette: palette,
|
|
80
84
|
highlight: highlight,
|
|
@@ -10,7 +10,7 @@ export const AdvancedGroupMultiSelect_propTypes = {
|
|
|
10
10
|
emptyMessage: PropTypes.string.isRequired,
|
|
11
11
|
getContainerRef: PropTypes.func,
|
|
12
12
|
getFooter: PropTypes.func,
|
|
13
|
-
groupedOptions: PropTypes.array.
|
|
13
|
+
groupedOptions: PropTypes.array.isRequired,
|
|
14
14
|
i18nKeys: PropTypes.shape({
|
|
15
15
|
loadingText: PropTypes.string,
|
|
16
16
|
emptyText: PropTypes.string,
|
package/es/Select/Select.js
CHANGED
|
@@ -953,6 +953,8 @@ SelectComponent.defaultProps = Select_defaultProps;
|
|
|
953
953
|
SelectComponent.displayName = 'Select';
|
|
954
954
|
let Select = Popup(SelectComponent);
|
|
955
955
|
Select.defaultProps = SelectComponent.defaultProps;
|
|
956
|
+
Select.propTypes = Select_propTypes;
|
|
957
|
+
Select.displayName = 'Select';
|
|
956
958
|
export default Select; // if (__DOCS__) {
|
|
957
959
|
// Select.docs = {
|
|
958
960
|
// componentGroup: 'Form Elements',
|
|
@@ -61,7 +61,7 @@ var Buttongroup = /*#__PURE__*/function (_React$Component) {
|
|
|
61
61
|
dataId = _this$props.dataId,
|
|
62
62
|
dataSelectorId = _this$props.dataSelectorId;
|
|
63
63
|
var btnGroup = [];
|
|
64
|
-
children.forEach(function (child) {
|
|
64
|
+
children && children.forEach(function (child) {
|
|
65
65
|
var btnRight = /*#__PURE__*/_react["default"].createElement("span", {
|
|
66
66
|
className: _ButtongroupModule["default"][type]
|
|
67
67
|
}, child);
|
package/lib/DateTime/DateTime.js
CHANGED
|
@@ -182,8 +182,8 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
182
182
|
if (timeZone && value) {
|
|
183
183
|
result = _datetimejs["default"].toDate(_datetimejs["default"].tz.utcToTz(value, timeZone));
|
|
184
184
|
} else {
|
|
185
|
-
value = value.replace('Z', '');
|
|
186
|
-
result = new Date(value);
|
|
185
|
+
value = value ? value.replace('Z', '') : null;
|
|
186
|
+
result = value ? new Date(value) : new Date();
|
|
187
187
|
}
|
|
188
188
|
} else {
|
|
189
189
|
if (value) {
|
package/lib/DropBox/DropBox.js
CHANGED
|
@@ -38,7 +38,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
38
38
|
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); }
|
|
39
39
|
|
|
40
40
|
function DropBox(props) {
|
|
41
|
-
var
|
|
41
|
+
var dropBoxRef = (0, _react.useRef)(null);
|
|
42
42
|
var DropBoxContext = (0, _react.useContext)(_LibraryContextInit["default"]);
|
|
43
43
|
var needResponsive = props.needResponsive,
|
|
44
44
|
portalId = props.portalId,
|
|
@@ -46,7 +46,20 @@ function DropBox(props) {
|
|
|
46
46
|
isAbsolutePositioningNeeded = props.isAbsolutePositioningNeeded,
|
|
47
47
|
isRestrictScroll = props.isRestrictScroll,
|
|
48
48
|
needFocusScope = props.needFocusScope,
|
|
49
|
-
onClose = props.onClose
|
|
49
|
+
onClose = props.onClose,
|
|
50
|
+
customProps = props.customProps;
|
|
51
|
+
var _customProps$focusSco = customProps.focusScopeProps,
|
|
52
|
+
focusScopeProps = _customProps$focusSco === void 0 ? {} : _customProps$focusSco;
|
|
53
|
+
var _focusScopeProps$auto = focusScopeProps.autoFocus,
|
|
54
|
+
autoFocus = _focusScopeProps$auto === void 0 ? true : _focusScopeProps$auto,
|
|
55
|
+
_focusScopeProps$rest = focusScopeProps.restoreFocus,
|
|
56
|
+
restoreFocus = _focusScopeProps$rest === void 0 ? true : _focusScopeProps$rest,
|
|
57
|
+
_focusScopeProps$need = focusScopeProps.needArrowLoop,
|
|
58
|
+
needArrowLoop = _focusScopeProps$need === void 0 ? true : _focusScopeProps$need,
|
|
59
|
+
_focusScopeProps$need2 = focusScopeProps.needTabLoop,
|
|
60
|
+
needTabLoop = _focusScopeProps$need2 === void 0 ? false : _focusScopeProps$need2,
|
|
61
|
+
_focusScopeProps$enab = focusScopeProps.enableEnterAction,
|
|
62
|
+
enableEnterAction = _focusScopeProps$enab === void 0 ? true : _focusScopeProps$enab;
|
|
50
63
|
|
|
51
64
|
var _ref = DropBoxContext || {},
|
|
52
65
|
direction = _ref.direction;
|
|
@@ -66,22 +79,23 @@ function DropBox(props) {
|
|
|
66
79
|
var _cssJSLogic = (0, _cssJSLogic2["default"])(props),
|
|
67
80
|
zIndexStyle = _cssJSLogic.zIndexStyle;
|
|
68
81
|
|
|
69
|
-
var dropBoxEle = needFocusScope ? /*#__PURE__*/_react["default"].createElement(_FocusScope["default"], {
|
|
70
|
-
|
|
71
|
-
elementRef:
|
|
72
|
-
autoFocus:
|
|
73
|
-
restoreFocus:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
var dropBoxEle = needFocusScope ? /*#__PURE__*/_react["default"].createElement(_FocusScope["default"], _extends({
|
|
83
|
+
onClose: onClose,
|
|
84
|
+
elementRef: dropBoxRef,
|
|
85
|
+
autoFocus: autoFocus,
|
|
86
|
+
restoreFocus: restoreFocus,
|
|
87
|
+
needArrowLoop: needArrowLoop,
|
|
88
|
+
needTabLoop: needTabLoop,
|
|
89
|
+
enableEnterAction: enableEnterAction
|
|
90
|
+
}, focusScopeProps), /*#__PURE__*/_react["default"].createElement(_DropBoxElement["default"], _extends({
|
|
77
91
|
isModel: isModel,
|
|
78
92
|
direction: direction
|
|
79
93
|
}, props, {
|
|
80
94
|
zIndexStyle: zIndexStyle,
|
|
81
|
-
subContainerRef:
|
|
95
|
+
subContainerRef: dropBoxRef
|
|
82
96
|
}))) : /*#__PURE__*/_react["default"].createElement(_DropBoxElement["default"], _extends({
|
|
83
97
|
isModel: isModel,
|
|
84
|
-
subContainerRef:
|
|
98
|
+
subContainerRef: dropBoxRef,
|
|
85
99
|
direction: direction
|
|
86
100
|
}, props, {
|
|
87
101
|
zIndexStyle: zIndexStyle
|
|
@@ -24,7 +24,8 @@ var propTypes = {
|
|
|
24
24
|
isAbsolutePositioningNeeded: _propTypes["default"].bool,
|
|
25
25
|
isRestrictScroll: _propTypes["default"].bool,
|
|
26
26
|
needFocusScope: _propTypes["default"].bool,
|
|
27
|
-
needAutoZindex: _propTypes["default"].bool
|
|
27
|
+
needAutoZindex: _propTypes["default"].bool,
|
|
28
|
+
customProps: _propTypes["default"].object
|
|
28
29
|
};
|
|
29
30
|
exports.propTypes = propTypes;
|
|
30
31
|
|
|
@@ -70,7 +70,9 @@ var ListContainer = function ListContainer(props) {
|
|
|
70
70
|
|
|
71
71
|
var role = a11y.role,
|
|
72
72
|
ariaSelected = a11y.ariaSelected,
|
|
73
|
-
ariaLabel = a11y.ariaLabel
|
|
73
|
+
ariaLabel = a11y.ariaLabel,
|
|
74
|
+
_a11y$insetFocus = a11y.insetFocus,
|
|
75
|
+
insetFocus = _a11y$insetFocus === void 0 ? true : _a11y$insetFocus;
|
|
74
76
|
var options = {};
|
|
75
77
|
|
|
76
78
|
if (isLink) {
|
|
@@ -88,7 +90,7 @@ var ListContainer = function ListContainer(props) {
|
|
|
88
90
|
|
|
89
91
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, _extends({
|
|
90
92
|
role: role,
|
|
91
|
-
"data-a11y-
|
|
93
|
+
"data-a11y-inset-focus": insetFocus,
|
|
92
94
|
"aria-selected": ariaSelected,
|
|
93
95
|
"aria-label": ariaLabel,
|
|
94
96
|
isCover: false,
|
package/lib/ListItem/ListItem.js
CHANGED
|
@@ -25,6 +25,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
25
25
|
|
|
26
26
|
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); }
|
|
27
27
|
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
+
|
|
32
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
|
+
|
|
28
34
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
35
|
|
|
30
36
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -125,12 +131,17 @@ var ListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
125
131
|
customListItem = _customClass$customLi === void 0 ? '' : _customClass$customLi,
|
|
126
132
|
_customClass$customTi = customClass.customTickIcon,
|
|
127
133
|
customTickIcon = _customClass$customTi === void 0 ? '' : _customClass$customTi;
|
|
128
|
-
|
|
129
|
-
|
|
134
|
+
|
|
135
|
+
var listA11y = _objectSpread({
|
|
136
|
+
ariaHidden: true,
|
|
137
|
+
role: 'option'
|
|
138
|
+
}, a11y);
|
|
139
|
+
|
|
140
|
+
var ariaHidden = listA11y.ariaHidden;
|
|
130
141
|
var tickIconPalette = _ListItemModule["default"]["".concat(palette, "Tick")] ? _ListItemModule["default"]["".concat(palette, "Tick")] : '';
|
|
131
142
|
var dataIdString = dataId ? dataId : value ? String(value).replace("'", '_') : 'listItem';
|
|
132
143
|
return /*#__PURE__*/_react["default"].createElement(_ListContainer["default"], _extends({
|
|
133
|
-
a11y:
|
|
144
|
+
a11y: listA11y,
|
|
134
145
|
size: size,
|
|
135
146
|
palette: palette,
|
|
136
147
|
highlight: highlight,
|
|
@@ -29,6 +29,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
29
29
|
|
|
30
30
|
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); }
|
|
31
31
|
|
|
32
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
33
|
+
|
|
34
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
35
|
+
|
|
36
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
37
|
+
|
|
32
38
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
33
39
|
|
|
34
40
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -133,12 +139,17 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
133
139
|
customAvatar = _customClass$customAv === void 0 ? '' : _customClass$customAv,
|
|
134
140
|
_customClass$customAv2 = customClass.customAvatarTeam,
|
|
135
141
|
customAvatarTeam = _customClass$customAv2 === void 0 ? '' : _customClass$customAv2;
|
|
136
|
-
|
|
137
|
-
|
|
142
|
+
|
|
143
|
+
var listA11y = _objectSpread({
|
|
144
|
+
ariaHidden: true,
|
|
145
|
+
role: 'option'
|
|
146
|
+
}, a11y);
|
|
147
|
+
|
|
148
|
+
var ariaHidden = listA11y.ariaHidden;
|
|
138
149
|
var isDarkPalette = palette === 'dark';
|
|
139
150
|
var dataIdString = value ? value : dataId;
|
|
140
151
|
return /*#__PURE__*/_react["default"].createElement(_ListContainer["default"], _extends({
|
|
141
|
-
a11y:
|
|
152
|
+
a11y: listA11y,
|
|
142
153
|
size: size,
|
|
143
154
|
palette: palette,
|
|
144
155
|
highlight: highlight,
|
|
@@ -25,6 +25,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
25
25
|
|
|
26
26
|
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); }
|
|
27
27
|
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
+
|
|
32
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
|
+
|
|
28
34
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
35
|
|
|
30
36
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -111,6 +117,11 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
111
117
|
customClass = _this$props4.customClass,
|
|
112
118
|
customProps = _this$props4.customProps,
|
|
113
119
|
needMultiLineText = _this$props4.needMultiLineText;
|
|
120
|
+
|
|
121
|
+
var listA11y = _objectSpread({
|
|
122
|
+
role: 'option'
|
|
123
|
+
}, a11y);
|
|
124
|
+
|
|
114
125
|
var _customProps$ListItem = customProps.ListItemProps,
|
|
115
126
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
116
127
|
_customProps$Containe = customProps.ContainerProps,
|
|
@@ -122,7 +133,7 @@ var ListItemWithCheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
122
133
|
_customClass$customLa = customClass.customLabel,
|
|
123
134
|
customLabel = _customClass$customLa === void 0 ? '' : _customClass$customLa;
|
|
124
135
|
return /*#__PURE__*/_react["default"].createElement(_ListContainer["default"], _extends({
|
|
125
|
-
a11y:
|
|
136
|
+
a11y: listA11y,
|
|
126
137
|
size: size,
|
|
127
138
|
palette: palette,
|
|
128
139
|
highlight: highlight,
|
|
@@ -25,6 +25,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
25
25
|
|
|
26
26
|
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); }
|
|
27
27
|
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
+
|
|
32
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
|
+
|
|
28
34
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
35
|
|
|
30
36
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -123,11 +129,16 @@ var ListItemWithIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
123
129
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
124
130
|
_customProps$Containe = customProps.ContainerProps,
|
|
125
131
|
ContainerProps = _customProps$Containe === void 0 ? {} : _customProps$Containe;
|
|
126
|
-
|
|
127
|
-
|
|
132
|
+
|
|
133
|
+
var listA11y = _objectSpread({
|
|
134
|
+
ariaHidden: true,
|
|
135
|
+
role: 'option'
|
|
136
|
+
}, a11y);
|
|
137
|
+
|
|
138
|
+
var ariaHidden = listA11y.ariaHidden;
|
|
128
139
|
var dataIdString = dataId ? "".concat(dataId.replace("'", '_')) : value.toLowerCase().replace("'", '_');
|
|
129
140
|
return /*#__PURE__*/_react["default"].createElement(_ListContainer["default"], _extends({
|
|
130
|
-
a11y:
|
|
141
|
+
a11y: listA11y,
|
|
131
142
|
size: size,
|
|
132
143
|
palette: palette,
|
|
133
144
|
highlight: highlight,
|
|
@@ -25,6 +25,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
25
25
|
|
|
26
26
|
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); }
|
|
27
27
|
|
|
28
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
+
|
|
30
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
+
|
|
32
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
|
+
|
|
28
34
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
35
|
|
|
30
36
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -116,6 +122,11 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
116
122
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
117
123
|
_customProps$Containe = customProps.ContainerProps,
|
|
118
124
|
ContainerProps = _customProps$Containe === void 0 ? {} : _customProps$Containe;
|
|
125
|
+
|
|
126
|
+
var listA11y = _objectSpread({
|
|
127
|
+
role: 'option'
|
|
128
|
+
}, a11y);
|
|
129
|
+
|
|
119
130
|
var _customClass$customLi = customClass.customListItem,
|
|
120
131
|
customListItem = _customClass$customLi === void 0 ? '' : _customClass$customLi,
|
|
121
132
|
_customClass$customRa = customClass.customRadio,
|
|
@@ -123,7 +134,7 @@ var ListItemWithRadio = /*#__PURE__*/function (_React$Component) {
|
|
|
123
134
|
_customClass$customRa2 = customClass.customRadioWrap,
|
|
124
135
|
customRadioWrap = _customClass$customRa2 === void 0 ? '' : _customClass$customRa2;
|
|
125
136
|
return /*#__PURE__*/_react["default"].createElement(_ListContainer["default"], _extends({
|
|
126
|
-
a11y:
|
|
137
|
+
a11y: listA11y,
|
|
127
138
|
size: size,
|
|
128
139
|
palette: palette,
|
|
129
140
|
highlight: highlight,
|
|
@@ -20,7 +20,7 @@ var AdvancedGroupMultiSelect_propTypes = {
|
|
|
20
20
|
emptyMessage: _propTypes["default"].string.isRequired,
|
|
21
21
|
getContainerRef: _propTypes["default"].func,
|
|
22
22
|
getFooter: _propTypes["default"].func,
|
|
23
|
-
groupedOptions: _propTypes["default"].array.
|
|
23
|
+
groupedOptions: _propTypes["default"].array.isRequired,
|
|
24
24
|
i18nKeys: _propTypes["default"].shape({
|
|
25
25
|
loadingText: _propTypes["default"].string,
|
|
26
26
|
emptyText: _propTypes["default"].string,
|
package/lib/Select/Select.js
CHANGED
|
@@ -994,6 +994,8 @@ SelectComponent.defaultProps = _defaultProps.Select_defaultProps;
|
|
|
994
994
|
SelectComponent.displayName = 'Select';
|
|
995
995
|
var Select = (0, _Popup["default"])(SelectComponent);
|
|
996
996
|
Select.defaultProps = SelectComponent.defaultProps;
|
|
997
|
+
Select.propTypes = _propTypes.Select_propTypes;
|
|
998
|
+
Select.displayName = 'Select';
|
|
997
999
|
var _default = Select; // if (__DOCS__) {
|
|
998
1000
|
// Select.docs = {
|
|
999
1001
|
// componentGroup: 'Form Elements',
|
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-278",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -48,11 +48,13 @@
|
|
|
48
48
|
"cssVariableConvert": "react-cli variableConverter ./lib ./lib && react-cli variableConverter ./es ./es",
|
|
49
49
|
"variable:addignore": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/variableIgnore.js ./src",
|
|
50
50
|
"variable:convert": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/pxParserPostcss.js ./src",
|
|
51
|
-
"variable:check": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/variableErrorCheck.js ./src ./node_modules/@zohodesk-private/css-variable-migrator/es/config/cssVariableReplacementOptions.json"
|
|
51
|
+
"variable:check": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/variableErrorCheck.js ./src ./node_modules/@zohodesk-private/css-variable-migrator/es/config/cssVariableReplacementOptions.json",
|
|
52
|
+
"review:props": "node ./node_modules/@zohodesk-private/react-prop-validator/es/propValidation.js ./src/ ./.cli "
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
55
|
+
"@zohodesk-private/react-prop-validator": "0.0.4",
|
|
54
56
|
"@zohodesk-private/css-variable-migrator": "^1.0.5",
|
|
55
|
-
"@zohodesk/a11y": "
|
|
57
|
+
"@zohodesk/a11y": "2.0.0",
|
|
56
58
|
"@zohodesk-private/node-plugins": "^1.0.0",
|
|
57
59
|
"@zohodesk/docstool": "1.0.0-alpha-2",
|
|
58
60
|
"@zohodesk/icons": "1.0.0-beta.132",
|