@zohodesk/components 1.0.0-temp-189.2 → 1.0.0-temp-190
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/README.md +5 -8
- package/es/CheckBox/CheckBox.js +0 -10
- package/es/CheckBox/props/propTypes.js +0 -1
- package/es/Radio/Radio.js +7 -26
- package/es/Radio/Radio.module.css +0 -3
- package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +3 -3
- package/es/Radio/props/defaultProps.js +0 -1
- package/es/Radio/props/propTypes.js +0 -7
- package/es/v1/AppContainer/AppContainer.js +6 -0
- package/es/v1/CheckBox/CheckBox.js +0 -6
- package/es/v1/CheckBox/props/propTypes.js +0 -1
- package/es/v1/Radio/Radio.js +7 -22
- package/es/v1/Radio/props/defaultProps.js +0 -1
- package/es/v1/Radio/props/propTypes.js +0 -7
- package/es/v1/Select/SelectWithAvatar.js +4 -3
- package/es/v1/Select/props/propTypes.js +2 -1
- package/lib/CheckBox/CheckBox.js +24 -34
- package/lib/CheckBox/props/propTypes.js +0 -1
- package/lib/Radio/Radio.js +26 -45
- package/lib/Radio/Radio.module.css +0 -3
- package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +3 -3
- package/lib/Radio/props/defaultProps.js +0 -1
- package/lib/Radio/props/propTypes.js +0 -7
- package/lib/v1/AppContainer/AppContainer.js +12 -0
- package/lib/v1/CheckBox/CheckBox.js +0 -6
- package/lib/v1/CheckBox/props/propTypes.js +0 -1
- package/lib/v1/Radio/Radio.js +7 -22
- package/lib/v1/Radio/props/defaultProps.js +0 -1
- package/lib/v1/Radio/props/propTypes.js +0 -7
- package/lib/v1/Select/SelectWithAvatar.js +3 -2
- package/lib/v1/Select/props/propTypes.js +2 -1
- package/package.json +1 -1
- package/result.json +1 -1
package/README.md
CHANGED
|
@@ -32,20 +32,17 @@ In this Package, we Provide Some Basic Components to Build Web App
|
|
|
32
32
|
- TextBoxIcon
|
|
33
33
|
- Tooltip
|
|
34
34
|
|
|
35
|
-
# 1.2.28
|
|
36
|
-
|
|
37
|
-
- **CheckBox** - getContainerRef prop supported
|
|
38
|
-
- **Radio** - children, customProps, getRef props supported. tabIndex option supported inside a11y prop
|
|
39
|
-
|
|
40
35
|
# 1.2.27
|
|
41
36
|
|
|
42
37
|
- **DateWidget** - The issue with the YearView Open State Reset on Blur Event in DidMount has been resolved
|
|
43
38
|
|
|
39
|
+
|
|
44
40
|
# 1.2.26
|
|
45
41
|
|
|
46
|
-
- **MultiSelect, MultiSelectWithAvatar** - Mobile Header Render Issue in Mobile Responsive Fixed.
|
|
47
|
-
- **isMobilePopover** - Function added in Dropbox.
|
|
48
|
-
- **Tag** - closeTitle not working issue fixed ( because value sends in wrong prop key data-title)
|
|
42
|
+
- ** MultiSelect, MultiSelectWithAvatar ** - Mobile Header Render Issue in Mobile Responsive Fixed.
|
|
43
|
+
- ** isMobilePopover ** - Function added in Dropbox.
|
|
44
|
+
- ** Tag ** - closeTitle not working issue fixed ( because value sends in wrong prop key data-title)
|
|
45
|
+
|
|
49
46
|
|
|
50
47
|
# 1.2.25
|
|
51
48
|
|
package/es/CheckBox/CheckBox.js
CHANGED
|
@@ -11,7 +11,6 @@ export default class CheckBox extends React.Component {
|
|
|
11
11
|
constructor(props) {
|
|
12
12
|
super(props);
|
|
13
13
|
this.onChange = this.onChange.bind(this);
|
|
14
|
-
this.handleGetContainerRef = this.handleGetContainerRef.bind(this);
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
onChange(e) {
|
|
@@ -22,14 +21,6 @@ export default class CheckBox extends React.Component {
|
|
|
22
21
|
onChange && onChange(!checked, e);
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
handleGetContainerRef(ele) {
|
|
26
|
-
let {
|
|
27
|
-
getContainerRef,
|
|
28
|
-
id
|
|
29
|
-
} = this.props;
|
|
30
|
-
getContainerRef && getContainerRef(ele, id);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
24
|
render() {
|
|
34
25
|
let {
|
|
35
26
|
id,
|
|
@@ -87,7 +78,6 @@ export default class CheckBox extends React.Component {
|
|
|
87
78
|
onClick: isReadOnly || disabled ? null : this.onChange,
|
|
88
79
|
tabIndex: isReadOnly || disabled || ariaHidden ? '-1' : '0',
|
|
89
80
|
"aria-checked": ariaChecked,
|
|
90
|
-
eleRef: this.handleGetContainerRef,
|
|
91
81
|
role: role,
|
|
92
82
|
"aria-label": ariaLabel,
|
|
93
83
|
"aria-labelledby": ariaLabelledby,
|
package/es/Radio/Radio.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
|
/* eslint css-modules/no-unused-class: [2, { markAsUsed: ['small', 'medium'] }] */
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { defaultProps } from './props/defaultProps';
|
|
@@ -11,7 +9,6 @@ export default class Radio extends React.Component {
|
|
|
11
9
|
constructor(props) {
|
|
12
10
|
super(props);
|
|
13
11
|
this.onChange = this.onChange.bind(this);
|
|
14
|
-
this.handleGetRef = this.handleGetRef.bind(this);
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
onChange(e) {
|
|
@@ -22,14 +19,6 @@ export default class Radio extends React.Component {
|
|
|
22
19
|
onChange && onChange(value, e);
|
|
23
20
|
}
|
|
24
21
|
|
|
25
|
-
handleGetRef(ele) {
|
|
26
|
-
let {
|
|
27
|
-
getRef,
|
|
28
|
-
value
|
|
29
|
-
} = this.props;
|
|
30
|
-
getRef && getRef(ele, value);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
22
|
render() {
|
|
34
23
|
let {
|
|
35
24
|
id,
|
|
@@ -49,8 +38,6 @@ export default class Radio extends React.Component {
|
|
|
49
38
|
active,
|
|
50
39
|
isFilled,
|
|
51
40
|
customClass,
|
|
52
|
-
customProps,
|
|
53
|
-
children,
|
|
54
41
|
a11y
|
|
55
42
|
} = this.props;
|
|
56
43
|
let {
|
|
@@ -63,17 +50,12 @@ export default class Radio extends React.Component {
|
|
|
63
50
|
let {
|
|
64
51
|
ariaHidden,
|
|
65
52
|
role = 'radio',
|
|
66
|
-
tabIndex,
|
|
67
53
|
ariaChecked = checked,
|
|
68
54
|
ariaLabel,
|
|
69
55
|
ariaLabelledby,
|
|
70
56
|
ariaReadonly = isReadOnly || disabled ? true : false
|
|
71
57
|
} = a11y;
|
|
72
|
-
|
|
73
|
-
ContainerProps = {},
|
|
74
|
-
LabelProps = {}
|
|
75
|
-
} = customProps;
|
|
76
|
-
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
58
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
77
59
|
dataId: value ? value.toLowerCase() : 'RadioComp',
|
|
78
60
|
isCover: false,
|
|
79
61
|
isInline: text ? false : true,
|
|
@@ -83,14 +65,13 @@ export default class Radio extends React.Component {
|
|
|
83
65
|
"data-title": toolTip,
|
|
84
66
|
onClick: !isReadOnly && !disabled ? this.onChange : '',
|
|
85
67
|
"aria-checked": ariaChecked,
|
|
86
|
-
tabindex: isReadOnly || disabled || ariaHidden ? '-1' :
|
|
87
|
-
eleRef: this.handleGetRef,
|
|
68
|
+
tabindex: isReadOnly || disabled || ariaHidden ? '-1' : '0',
|
|
88
69
|
role: role,
|
|
89
70
|
"aria-Hidden": ariaHidden,
|
|
90
71
|
"aria-label": ariaLabel,
|
|
91
72
|
"aria-labelledby": ariaLabelledby,
|
|
92
73
|
"aria-readonly": ariaReadonly
|
|
93
|
-
},
|
|
74
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
94
75
|
className: `${style.radio} ${checked ? `${style[`rdBox${palette}`]}` : ''}
|
|
95
76
|
${isReadOnly || disabled ? '' : `${style[`hover${palette}`]}`} ${style[size]} ${isFilled ? style.filled : ''} ${style[`centerPath${palette}`]} ${customRadio}`
|
|
96
77
|
}, /*#__PURE__*/React.createElement("input", {
|
|
@@ -116,18 +97,18 @@ export default class Radio extends React.Component {
|
|
|
116
97
|
}) : null))), text && /*#__PURE__*/React.createElement(Box, {
|
|
117
98
|
flexible: true,
|
|
118
99
|
className: style.text
|
|
119
|
-
}, /*#__PURE__*/React.createElement(Label,
|
|
100
|
+
}, /*#__PURE__*/React.createElement(Label, {
|
|
120
101
|
text: text,
|
|
121
|
-
palette: labelPalette,
|
|
102
|
+
palette: disabled ? 'disable' : labelPalette,
|
|
122
103
|
size: labelSize,
|
|
123
104
|
type: "title",
|
|
124
105
|
clipped: true,
|
|
125
106
|
dataId: `${text}_label`,
|
|
126
107
|
variant: variant,
|
|
127
108
|
title: toolTip ? toolTip : text,
|
|
128
|
-
customClass: `${checked && active ? `${style[`${palette}checkedActive`]}` : ''}
|
|
109
|
+
customClass: `${checked && active && !disabled ? `${style[`${palette}checkedActive`]}` : ''}
|
|
129
110
|
${style[`${palette}Label`]} ${accessMode} ${customLabel}`
|
|
130
|
-
}
|
|
111
|
+
})));
|
|
131
112
|
}
|
|
132
113
|
|
|
133
114
|
}
|
|
@@ -1145,7 +1145,7 @@ exports[`Radio rendering the accessMode when disabled 1`] = `
|
|
|
1145
1145
|
data-test-id="boxComponent"
|
|
1146
1146
|
>
|
|
1147
1147
|
<label
|
|
1148
|
-
class="label title medium
|
|
1148
|
+
class="label title medium disable font_default
|
|
1149
1149
|
dotted cursor
|
|
1150
1150
|
primaryLabel disabled "
|
|
1151
1151
|
data-id="RadioText_label"
|
|
@@ -1505,7 +1505,7 @@ exports[`Radio rendering the disabled is true 1`] = `
|
|
|
1505
1505
|
data-test-id="boxComponent"
|
|
1506
1506
|
>
|
|
1507
1507
|
<label
|
|
1508
|
-
class="label title medium
|
|
1508
|
+
class="label title medium disable font_default
|
|
1509
1509
|
dotted cursor
|
|
1510
1510
|
undefined disabled "
|
|
1511
1511
|
data-id="RadioText_label"
|
|
@@ -1567,7 +1567,7 @@ exports[`Radio rendering the disabledTitle 1`] = `
|
|
|
1567
1567
|
data-test-id="boxComponent"
|
|
1568
1568
|
>
|
|
1569
1569
|
<label
|
|
1570
|
-
class="label title medium
|
|
1570
|
+
class="label title medium disable font_default
|
|
1571
1571
|
dotted cursor
|
|
1572
1572
|
primaryLabel disabled "
|
|
1573
1573
|
data-id="RadioText_label"
|
|
@@ -4,7 +4,6 @@ export const propTypes = {
|
|
|
4
4
|
checked: PropTypes.bool,
|
|
5
5
|
disabled: PropTypes.bool,
|
|
6
6
|
disabledTitle: PropTypes.string,
|
|
7
|
-
getRef: PropTypes.func,
|
|
8
7
|
id: PropTypes.string,
|
|
9
8
|
isFilled: PropTypes.bool,
|
|
10
9
|
isReadOnly: PropTypes.bool,
|
|
@@ -21,20 +20,14 @@ export const propTypes = {
|
|
|
21
20
|
customRadio: PropTypes.string,
|
|
22
21
|
customLabel: PropTypes.string
|
|
23
22
|
}),
|
|
24
|
-
customProps: PropTypes.exact({
|
|
25
|
-
ContainerProps: PropTypes.object,
|
|
26
|
-
LabelProps: PropTypes.object
|
|
27
|
-
}),
|
|
28
23
|
a11y: PropTypes.shape({
|
|
29
24
|
ariaChecked: PropTypes.bool,
|
|
30
25
|
ariaHidden: PropTypes.bool,
|
|
31
26
|
role: PropTypes.string,
|
|
32
|
-
tabIndex: PropTypes.oneOfType(PropTypes.string, PropTypes.number),
|
|
33
27
|
ariaLabelledby: PropTypes.string,
|
|
34
28
|
ariaLabel: PropTypes.string,
|
|
35
29
|
ariaReadonly: PropTypes.bool
|
|
36
30
|
}),
|
|
37
|
-
children: PropTypes.node,
|
|
38
31
|
onChange: PropTypes.func,
|
|
39
32
|
text: PropTypes.string
|
|
40
33
|
};
|
|
@@ -5,6 +5,12 @@ import { defaultProps } from './props/defaultProps';
|
|
|
5
5
|
import { propTypes } from './props/propTypes';
|
|
6
6
|
import { Container, Box } from '../Layout';
|
|
7
7
|
import Tooltip from '../Tooltip/Tooltip';
|
|
8
|
+
import '../../common/basic.module.css';
|
|
9
|
+
import '@zohodesk/variables/assets/colorVariables.module.css';
|
|
10
|
+
import '@zohodesk/variables/assets/dotVariables.module.css';
|
|
11
|
+
import '@zohodesk/variables/assets/sizeVariables.module.css';
|
|
12
|
+
import '@zohodesk/variables/assets/fontsizeVariables.module.css';
|
|
13
|
+
import '@zohodesk/variables/lib/fontFamilyVariables.module.css';
|
|
8
14
|
import '@zohodesk/variables/assets/transitionVariables.module.css';
|
|
9
15
|
import '@zohodesk/variables/assets/no_transitionVariables.module.css';
|
|
10
16
|
import '../../common/a11y.module.css';
|
|
@@ -24,7 +24,6 @@ const CheckBox = props => {
|
|
|
24
24
|
isFilled,
|
|
25
25
|
isClipped,
|
|
26
26
|
getRef,
|
|
27
|
-
getContainerRef,
|
|
28
27
|
variant,
|
|
29
28
|
active,
|
|
30
29
|
dataId,
|
|
@@ -43,10 +42,6 @@ const CheckBox = props => {
|
|
|
43
42
|
onChange && onChange(!checked, e);
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
function handleGetContainerRef(ele) {
|
|
47
|
-
getContainerRef && getContainerRef(ele, id);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
45
|
let {
|
|
51
46
|
CheckBoxProps = {},
|
|
52
47
|
LabelProps = {}
|
|
@@ -78,7 +73,6 @@ const CheckBox = props => {
|
|
|
78
73
|
onClick: isReadOnly || disabled ? null : onChange,
|
|
79
74
|
tabIndex: isReadOnly || disabled || ariaHidden ? '-1' : '0',
|
|
80
75
|
"aria-checked": ariaChecked,
|
|
81
|
-
eleRef: handleGetContainerRef,
|
|
82
76
|
role: role,
|
|
83
77
|
"aria-label": ariaLabel,
|
|
84
78
|
"aria-labelledby": ariaLabelledby,
|
package/es/v1/Radio/Radio.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';
|
|
@@ -26,9 +24,6 @@ const Radio = props => {
|
|
|
26
24
|
active,
|
|
27
25
|
isFilled,
|
|
28
26
|
customClass,
|
|
29
|
-
customProps,
|
|
30
|
-
getRef,
|
|
31
|
-
children,
|
|
32
27
|
a11y
|
|
33
28
|
} = props;
|
|
34
29
|
let {
|
|
@@ -41,16 +36,11 @@ const Radio = props => {
|
|
|
41
36
|
let {
|
|
42
37
|
ariaHidden,
|
|
43
38
|
role = 'radio',
|
|
44
|
-
tabIndex,
|
|
45
39
|
ariaChecked = checked,
|
|
46
40
|
ariaLabel,
|
|
47
41
|
ariaLabelledby,
|
|
48
42
|
ariaReadonly = isReadOnly || disabled ? true : false
|
|
49
43
|
} = a11y;
|
|
50
|
-
let {
|
|
51
|
-
ContainerProps = {},
|
|
52
|
-
LabelProps = {}
|
|
53
|
-
} = customProps;
|
|
54
44
|
|
|
55
45
|
function onChange(e) {
|
|
56
46
|
const {
|
|
@@ -59,11 +49,7 @@ const Radio = props => {
|
|
|
59
49
|
onChange && onChange(value, e);
|
|
60
50
|
}
|
|
61
51
|
|
|
62
|
-
|
|
63
|
-
getRef && getRef(ele, value);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
52
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
67
53
|
dataId: value ? value.toLowerCase() : 'RadioComp',
|
|
68
54
|
isCover: false,
|
|
69
55
|
isInline: text ? false : true,
|
|
@@ -73,14 +59,13 @@ const Radio = props => {
|
|
|
73
59
|
"data-title": toolTip,
|
|
74
60
|
onClick: !isReadOnly && !disabled ? onChange : '',
|
|
75
61
|
"aria-checked": ariaChecked,
|
|
76
|
-
tabindex: isReadOnly || disabled || ariaHidden ? '-1' :
|
|
77
|
-
eleRef: handleGetRef,
|
|
62
|
+
tabindex: isReadOnly || disabled || ariaHidden ? '-1' : '0',
|
|
78
63
|
role: role,
|
|
79
64
|
"aria-Hidden": ariaHidden,
|
|
80
65
|
"aria-label": ariaLabel,
|
|
81
66
|
"aria-labelledby": ariaLabelledby,
|
|
82
67
|
"aria-readonly": ariaReadonly
|
|
83
|
-
},
|
|
68
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
84
69
|
className: `${style.radio} ${checked ? `${style[`rdBox${palette}`]}` : ''}
|
|
85
70
|
${isReadOnly || disabled ? '' : `${style[`hover${palette}`]}`} ${style[size]} ${isFilled ? style.filled : ''} ${style[`centerPath${palette}`]} ${customRadio}`
|
|
86
71
|
}, /*#__PURE__*/React.createElement("input", {
|
|
@@ -106,18 +91,18 @@ const Radio = props => {
|
|
|
106
91
|
}) : null))), text && /*#__PURE__*/React.createElement(Box, {
|
|
107
92
|
flexible: true,
|
|
108
93
|
className: style.text
|
|
109
|
-
}, /*#__PURE__*/React.createElement(Label,
|
|
94
|
+
}, /*#__PURE__*/React.createElement(Label, {
|
|
110
95
|
text: text,
|
|
111
|
-
palette: labelPalette,
|
|
96
|
+
palette: disabled ? 'disable' : labelPalette,
|
|
112
97
|
size: labelSize,
|
|
113
98
|
type: "title",
|
|
114
99
|
clipped: true,
|
|
115
100
|
dataId: `${text}_label`,
|
|
116
101
|
variant: variant,
|
|
117
102
|
title: toolTip ? toolTip : text,
|
|
118
|
-
customClass: `${checked && active ? `${style[`${palette}checkedActive`]}` : ''}
|
|
103
|
+
customClass: `${checked && active && !disabled ? `${style[`${palette}checkedActive`]}` : ''}
|
|
119
104
|
${style[`${palette}Label`]} ${accessMode} ${customLabel}`
|
|
120
|
-
}
|
|
105
|
+
})));
|
|
121
106
|
};
|
|
122
107
|
|
|
123
108
|
export default Radio;
|
|
@@ -4,7 +4,6 @@ export const propTypes = {
|
|
|
4
4
|
checked: PropTypes.bool,
|
|
5
5
|
disabled: PropTypes.bool,
|
|
6
6
|
disabledTitle: PropTypes.string,
|
|
7
|
-
getRef: PropTypes.func,
|
|
8
7
|
id: PropTypes.string,
|
|
9
8
|
isFilled: PropTypes.bool,
|
|
10
9
|
isReadOnly: PropTypes.bool,
|
|
@@ -21,20 +20,14 @@ export const propTypes = {
|
|
|
21
20
|
customRadio: PropTypes.string,
|
|
22
21
|
customLabel: PropTypes.string
|
|
23
22
|
}),
|
|
24
|
-
customProps: PropTypes.exact({
|
|
25
|
-
ContainerProps: PropTypes.object,
|
|
26
|
-
LabelProps: PropTypes.object
|
|
27
|
-
}),
|
|
28
23
|
a11y: PropTypes.shape({
|
|
29
24
|
ariaChecked: PropTypes.bool,
|
|
30
25
|
ariaHidden: PropTypes.bool,
|
|
31
26
|
role: PropTypes.string,
|
|
32
|
-
tabIndex: PropTypes.oneOfType(PropTypes.string, PropTypes.number),
|
|
33
27
|
ariaLabelledby: PropTypes.string,
|
|
34
28
|
ariaLabel: PropTypes.string,
|
|
35
29
|
ariaReadonly: PropTypes.bool
|
|
36
30
|
}),
|
|
37
|
-
children: PropTypes.node,
|
|
38
31
|
onChange: PropTypes.func,
|
|
39
32
|
text: PropTypes.string
|
|
40
33
|
};
|
|
@@ -10,7 +10,7 @@ import Tag from '../Tag/Tag';
|
|
|
10
10
|
import Textbox from '../TextBox/TextBox';
|
|
11
11
|
import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
|
|
12
12
|
import { Container, Box } from '../Layout';
|
|
13
|
-
import Card, { CardContent, CardHeader } from '../Card/Card';
|
|
13
|
+
import Card, { CardContent, CardHeader, CardFooter } from '../Card/Card';
|
|
14
14
|
import Suggestions from '../MultiSelect/Suggestions';
|
|
15
15
|
import EmptyState from '../MultiSelect/EmptyState';
|
|
16
16
|
import DropDownHeading from '../DropDown/DropDownHeading';
|
|
@@ -158,7 +158,8 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
158
158
|
htmlId,
|
|
159
159
|
needEffect,
|
|
160
160
|
isLoading,
|
|
161
|
-
dataSelectorId
|
|
161
|
+
dataSelectorId,
|
|
162
|
+
getFooter
|
|
162
163
|
} = this.props;
|
|
163
164
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
164
165
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
@@ -321,7 +322,7 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
321
322
|
}), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
|
|
322
323
|
isCover: false,
|
|
323
324
|
align: "both"
|
|
324
|
-
}, /*#__PURE__*/React.createElement(Loader, null))))));
|
|
325
|
+
}, /*#__PURE__*/React.createElement(Loader, null))), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)));
|
|
325
326
|
}) : null);
|
|
326
327
|
}
|
|
327
328
|
|
|
@@ -230,7 +230,8 @@ export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
|
230
230
|
htmlId: PropTypes.string,
|
|
231
231
|
needEffect: PropTypes.bool,
|
|
232
232
|
isLoading: PropTypes.bool,
|
|
233
|
-
dataSelectorId: PropTypes.string
|
|
233
|
+
dataSelectorId: PropTypes.string,
|
|
234
|
+
getFooter: PropTypes.func
|
|
234
235
|
};
|
|
235
236
|
export const SelectWithIcon_propTypes = {
|
|
236
237
|
animationStyle: PropTypes.oneOf(['default', 'bounce']),
|
package/lib/CheckBox/CheckBox.js
CHANGED
|
@@ -57,7 +57,6 @@ var CheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
57
57
|
|
|
58
58
|
_this = _super.call(this, props);
|
|
59
59
|
_this.onChange = _this.onChange.bind(_assertThisInitialized(_this));
|
|
60
|
-
_this.handleGetContainerRef = _this.handleGetContainerRef.bind(_assertThisInitialized(_this));
|
|
61
60
|
return _this;
|
|
62
61
|
}
|
|
63
62
|
|
|
@@ -69,41 +68,33 @@ var CheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
69
68
|
checked = _this$props.checked;
|
|
70
69
|
onChange && onChange(!checked, e);
|
|
71
70
|
}
|
|
72
|
-
}, {
|
|
73
|
-
key: "handleGetContainerRef",
|
|
74
|
-
value: function handleGetContainerRef(ele) {
|
|
75
|
-
var _this$props2 = this.props,
|
|
76
|
-
getContainerRef = _this$props2.getContainerRef,
|
|
77
|
-
id = _this$props2.id;
|
|
78
|
-
getContainerRef && getContainerRef(ele, id);
|
|
79
|
-
}
|
|
80
71
|
}, {
|
|
81
72
|
key: "render",
|
|
82
73
|
value: function render() {
|
|
83
|
-
var _this$
|
|
84
|
-
id = _this$
|
|
85
|
-
checked = _this$
|
|
86
|
-
disabled = _this$
|
|
87
|
-
isReadOnly = _this$
|
|
88
|
-
disabledTitle = _this$
|
|
89
|
-
title = _this$
|
|
90
|
-
palette = _this$
|
|
91
|
-
text = _this$
|
|
92
|
-
size = _this$
|
|
93
|
-
labelPalette = _this$
|
|
94
|
-
labelSize = _this$
|
|
95
|
-
isFilled = _this$
|
|
96
|
-
isClipped = _this$
|
|
97
|
-
getRef = _this$
|
|
98
|
-
variant = _this$
|
|
99
|
-
active = _this$
|
|
100
|
-
dataId = _this$
|
|
101
|
-
name = _this$
|
|
102
|
-
activeStyle = _this$
|
|
103
|
-
a11y = _this$
|
|
104
|
-
customClass = _this$
|
|
105
|
-
customProps = _this$
|
|
106
|
-
dataSelectorId = _this$
|
|
74
|
+
var _this$props2 = this.props,
|
|
75
|
+
id = _this$props2.id,
|
|
76
|
+
checked = _this$props2.checked,
|
|
77
|
+
disabled = _this$props2.disabled,
|
|
78
|
+
isReadOnly = _this$props2.isReadOnly,
|
|
79
|
+
disabledTitle = _this$props2.disabledTitle,
|
|
80
|
+
title = _this$props2.title,
|
|
81
|
+
palette = _this$props2.palette,
|
|
82
|
+
text = _this$props2.text,
|
|
83
|
+
size = _this$props2.size,
|
|
84
|
+
labelPalette = _this$props2.labelPalette,
|
|
85
|
+
labelSize = _this$props2.labelSize,
|
|
86
|
+
isFilled = _this$props2.isFilled,
|
|
87
|
+
isClipped = _this$props2.isClipped,
|
|
88
|
+
getRef = _this$props2.getRef,
|
|
89
|
+
variant = _this$props2.variant,
|
|
90
|
+
active = _this$props2.active,
|
|
91
|
+
dataId = _this$props2.dataId,
|
|
92
|
+
name = _this$props2.name,
|
|
93
|
+
activeStyle = _this$props2.activeStyle,
|
|
94
|
+
a11y = _this$props2.a11y,
|
|
95
|
+
customClass = _this$props2.customClass,
|
|
96
|
+
customProps = _this$props2.customProps,
|
|
97
|
+
dataSelectorId = _this$props2.dataSelectorId;
|
|
107
98
|
var _customProps$CheckBox = customProps.CheckBoxProps,
|
|
108
99
|
CheckBoxProps = _customProps$CheckBox === void 0 ? {} : _customProps$CheckBox,
|
|
109
100
|
_customProps$LabelPro = customProps.LabelProps,
|
|
@@ -136,7 +127,6 @@ var CheckBox = /*#__PURE__*/function (_React$Component) {
|
|
|
136
127
|
onClick: isReadOnly || disabled ? null : this.onChange,
|
|
137
128
|
tabIndex: isReadOnly || disabled || ariaHidden ? '-1' : '0',
|
|
138
129
|
"aria-checked": ariaChecked,
|
|
139
|
-
eleRef: this.handleGetContainerRef,
|
|
140
130
|
role: role,
|
|
141
131
|
"aria-label": ariaLabel,
|
|
142
132
|
"aria-labelledby": ariaLabelledby,
|
|
@@ -18,7 +18,6 @@ var propTypes = {
|
|
|
18
18
|
disabled: _propTypes["default"].bool,
|
|
19
19
|
disabledTitle: _propTypes["default"].string,
|
|
20
20
|
getRef: _propTypes["default"].func,
|
|
21
|
-
getContainerRef: _propTypes["default"].func,
|
|
22
21
|
id: _propTypes["default"].string,
|
|
23
22
|
isFilled: _propTypes["default"].bool,
|
|
24
23
|
isClipped: _propTypes["default"].bool,
|