@zohodesk/components 1.0.0-temp-162 → 1.0.0-temp-163
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/es/Avatar/Avatar.js +3 -7
- package/es/DateTime/CalendarView.js +1 -4
- package/es/DateTime/DateTime.module.css +4 -4
- package/es/DateTime/DateTimePopupHeader.js +7 -4
- package/es/DateTime/DaysRow.js +2 -5
- package/es/DateTime/Time.js +2 -5
- package/es/DateTime/YearView.js +9 -9
- package/es/DateTime/YearView.module.css +4 -1
- package/es/Heading/Heading.js +7 -7
- package/es/Heading/Heading.module.css +1 -68
- package/es/Heading/props/defaultProps.js +1 -3
- package/es/Heading/props/propTypes.js +3 -4
- package/es/Label/Label.js +3 -6
- package/es/ListItem/ListItem.js +3 -7
- package/es/ListItem/ListItem.module.css +1 -0
- package/es/ListItem/ListItemWithAvatar.js +3 -7
- package/es/ListItem/ListItemWithCheckBox.js +3 -7
- package/es/ListItem/ListItemWithIcon.js +2 -6
- package/es/ListItem/ListItemWithRadio.js +3 -7
- package/es/Responsive/ResizeComponent.js +16 -4
- package/es/Tab/Tab.js +2 -4
- package/es/Tab/Tabs.js +21 -8
- package/es/Tag/Tag.js +3 -8
- package/es/index.js +1 -3
- package/lib/Avatar/Avatar.js +3 -7
- package/lib/DateTime/CalendarView.js +1 -4
- package/lib/DateTime/DateTime.module.css +4 -4
- package/lib/DateTime/DateTimePopupHeader.js +7 -4
- package/lib/DateTime/DaysRow.js +2 -5
- package/lib/DateTime/Time.js +2 -5
- package/lib/DateTime/YearView.js +9 -9
- package/lib/DateTime/YearView.module.css +4 -1
- package/lib/Heading/Heading.js +8 -7
- package/lib/Heading/Heading.module.css +1 -68
- package/lib/Heading/props/defaultProps.js +1 -3
- package/lib/Heading/props/propTypes.js +3 -4
- package/lib/Label/Label.js +2 -5
- package/lib/ListItem/ListItem.js +3 -7
- package/lib/ListItem/ListItem.module.css +1 -0
- package/lib/ListItem/ListItemWithAvatar.js +3 -7
- package/lib/ListItem/ListItemWithCheckBox.js +3 -7
- package/lib/ListItem/ListItemWithIcon.js +2 -6
- package/lib/ListItem/ListItemWithRadio.js +3 -7
- package/lib/Responsive/ResizeComponent.js +15 -3
- package/lib/Tab/Tab.js +2 -4
- package/lib/Tab/Tabs.js +29 -18
- package/lib/Tag/Tag.js +3 -8
- package/lib/index.js +1 -17
- package/package.json +1 -1
- package/es/Text/Text.js +0 -27
- package/es/Text/Text.module.css +0 -72
- package/es/Text/props/defaultProps.js +0 -7
- package/es/Text/props/propTypes.js +0 -12
- package/es/Typography/Typography.js +0 -28
- package/es/Typography/Typography.module.css +0 -72
- package/es/Typography/props/defaultProps.js +0 -8
- package/es/Typography/props/propTypes.js +0 -12
- package/lib/Text/Text.js +0 -58
- package/lib/Text/Text.module.css +0 -72
- package/lib/Text/props/defaultProps.js +0 -14
- package/lib/Text/props/propTypes.js +0 -20
- package/lib/Typography/Typography.js +0 -59
- package/lib/Typography/Typography.module.css +0 -72
- package/lib/Typography/props/defaultProps.js +0 -15
- package/lib/Typography/props/propTypes.js +0 -20
package/es/Avatar/Avatar.js
CHANGED
|
@@ -4,7 +4,6 @@ import { defaultProps } from './props/defaultProps';
|
|
|
4
4
|
import { propTypes } from './props/propTypes';
|
|
5
5
|
import { getInitial } from '../utils/getInitial';
|
|
6
6
|
import AvatarSize from '../Provider/AvatarSize';
|
|
7
|
-
import Typography from '../Typography/Typography';
|
|
8
7
|
import style from './Avatar.module.css';
|
|
9
8
|
/*
|
|
10
9
|
1. need to change name into firstName lastName
|
|
@@ -151,13 +150,10 @@ export default class Avatar extends React.Component {
|
|
|
151
150
|
"data-id": dataId,
|
|
152
151
|
onClick: onClick,
|
|
153
152
|
"data-selector-id": dataSelectorId
|
|
154
|
-
}, AvatarProps), showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement(
|
|
153
|
+
}, AvatarProps), showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
|
|
155
154
|
className: `${style.initial}`,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
'data-selector-id': `${dataSelectorId}_AvatarInitial`
|
|
159
|
-
},
|
|
160
|
-
tagName: "span"
|
|
155
|
+
"data-id": `${dataId}_AvatarInitial`,
|
|
156
|
+
"data-selector-id": `${dataSelectorId}_AvatarInitial`
|
|
161
157
|
}, initial), (showAvatar || showAlternateAvatar) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("img", {
|
|
162
158
|
className: `${style.image} ${isAnimate ? style.animate : ''} ${needInnerBorder ? style.innerBorder : ''}`,
|
|
163
159
|
"data-id": `${dataId}_AvatarImg`,
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { Span_propTypes, CalendarView_propTypes } from './props/propTypes';
|
|
3
3
|
import { CalendarView_defaultProps, Span_defaultProps } from './props/defaultProps';
|
|
4
4
|
import { Container, Box } from '../Layout';
|
|
5
|
-
import Typography from '../Typography/Typography';
|
|
6
5
|
import style from './DateTime.module.css';
|
|
7
6
|
import { getMonthEnd } from '../utils/datetime/common';
|
|
8
7
|
import DaysRow from './DaysRow';
|
|
@@ -199,9 +198,7 @@ export class Span extends React.PureComponent {
|
|
|
199
198
|
key: i,
|
|
200
199
|
onClick: this.handleSelectChild,
|
|
201
200
|
"aria-label": incremday
|
|
202
|
-
},
|
|
203
|
-
size: "13"
|
|
204
|
-
}, incremday));
|
|
201
|
+
}, incremday);
|
|
205
202
|
}
|
|
206
203
|
}
|
|
207
204
|
Span.propTypes = Span_propTypes;
|
|
@@ -44,15 +44,13 @@
|
|
|
44
44
|
|
|
45
45
|
.thArrow,
|
|
46
46
|
.datesStr {
|
|
47
|
+
font-size: 13px;
|
|
47
48
|
color: var(--zdt_datetime_datestr_text);
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
.thArrow, .datesStr {
|
|
51
52
|
cursor: pointer;
|
|
52
53
|
}
|
|
53
|
-
.thArrow{
|
|
54
|
-
font-size: var(--zd_font_size13);
|
|
55
|
-
}
|
|
56
54
|
|
|
57
55
|
.thArrow:hover,
|
|
58
56
|
.datesStr:hover {
|
|
@@ -96,6 +94,7 @@
|
|
|
96
94
|
}
|
|
97
95
|
|
|
98
96
|
.daysStr {
|
|
97
|
+
font-size: 10px;
|
|
99
98
|
color: var(--zdt_datetime_daystr_text);
|
|
100
99
|
text-transform: uppercase;
|
|
101
100
|
composes: semibold;
|
|
@@ -202,6 +201,7 @@
|
|
|
202
201
|
|
|
203
202
|
.text {
|
|
204
203
|
composes: boxPadding;
|
|
204
|
+
font-size: 11px;
|
|
205
205
|
text-transform: uppercase;
|
|
206
206
|
color: var(--zdt_datetime_text);
|
|
207
207
|
composes: semibold;
|
|
@@ -233,4 +233,4 @@
|
|
|
233
233
|
border-radius: 3px;
|
|
234
234
|
box-shadow: var(--zd_bs_dropbox_bottom);
|
|
235
235
|
background-color: var(--zdt_dropbox_default_bg);
|
|
236
|
-
}
|
|
236
|
+
}
|
|
@@ -6,7 +6,7 @@ import React, { PureComponent } from 'react';
|
|
|
6
6
|
/** ** Components *** */
|
|
7
7
|
import { Container, Box } from '../Layout';
|
|
8
8
|
import { Icon } from '@zohodesk/icons';
|
|
9
|
-
import
|
|
9
|
+
import Heading from '../Heading/Heading';
|
|
10
10
|
|
|
11
11
|
/** ** CSS *** */
|
|
12
12
|
import style from './DateTime.module.css';
|
|
@@ -58,11 +58,14 @@ export default class DateTimePopupHeader extends PureComponent {
|
|
|
58
58
|
className: style.dateText,
|
|
59
59
|
dataId: "selectYear",
|
|
60
60
|
onClick: onOpenYearView
|
|
61
|
-
}, /*#__PURE__*/React.createElement(
|
|
61
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
62
62
|
className: style.thMonYear,
|
|
63
|
+
title: showMonthTxt,
|
|
63
64
|
tagName: "h2",
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
a11y: {
|
|
66
|
+
tabindex: '0'
|
|
67
|
+
}
|
|
68
|
+
}), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Icon, {
|
|
66
69
|
name: "ZD-GN-dropdown",
|
|
67
70
|
size: "12",
|
|
68
71
|
iconClass: style.downArrow
|
package/es/DateTime/DaysRow.js
CHANGED
|
@@ -7,7 +7,6 @@ import style from './DateTime.module.css';
|
|
|
7
7
|
|
|
8
8
|
/** ** Components *** */
|
|
9
9
|
import { Container, Box } from '../Layout';
|
|
10
|
-
import Typography from '../Typography/Typography';
|
|
11
10
|
export default class DaysRow extends PureComponent {
|
|
12
11
|
render() {
|
|
13
12
|
const {
|
|
@@ -20,11 +19,9 @@ export default class DaysRow extends PureComponent {
|
|
|
20
19
|
className: style.days
|
|
21
20
|
}, dayNames.map((dayName, index) => /*#__PURE__*/React.createElement(Box, {
|
|
22
21
|
key: dayName,
|
|
22
|
+
className: `${style.daysStr} ${style.grid} ${index === 0 ? style.sunday : ''}`,
|
|
23
23
|
"data-title": dayName,
|
|
24
24
|
"aria-label": dayName
|
|
25
|
-
},
|
|
26
|
-
className: `${style.daysStr} ${style.grid} ${index === 0 ? style.sunday : ''}`,
|
|
27
|
-
size: "10"
|
|
28
|
-
}, " ", dayNamesShort[index]))));
|
|
25
|
+
}, dayNamesShort[index])));
|
|
29
26
|
}
|
|
30
27
|
}
|
package/es/DateTime/Time.js
CHANGED
|
@@ -5,7 +5,6 @@ import React, { PureComponent } from 'react';
|
|
|
5
5
|
/**** Components ****/
|
|
6
6
|
import { Container, Box } from '../Layout';
|
|
7
7
|
import Select from '../Select/Select';
|
|
8
|
-
import Typography from '../Typography/Typography';
|
|
9
8
|
|
|
10
9
|
/** ** CSS *** */
|
|
11
10
|
import style from './DateTime.module.css';
|
|
@@ -28,10 +27,8 @@ export default class Time extends PureComponent {
|
|
|
28
27
|
amPm,
|
|
29
28
|
is24Hour
|
|
30
29
|
} = this.props;
|
|
31
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
32
|
-
className: style.text
|
|
33
|
-
tagName: "span",
|
|
34
|
-
size: "11"
|
|
30
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
31
|
+
className: style.text
|
|
35
32
|
}, timeText), /*#__PURE__*/React.createElement(Container, {
|
|
36
33
|
alignBox: "row",
|
|
37
34
|
align: "vertical",
|
package/es/DateTime/YearView.js
CHANGED
|
@@ -7,7 +7,7 @@ import { YearView_defaultProps } from './props/defaultProps';
|
|
|
7
7
|
import { Virtualizer } from '@zohodesk/virtualizer';
|
|
8
8
|
import { Container, Box } from '../Layout';
|
|
9
9
|
import { Icon } from '@zohodesk/icons';
|
|
10
|
-
import
|
|
10
|
+
import Heading from '../Heading/Heading';
|
|
11
11
|
/**** CSS ****/
|
|
12
12
|
import style from './YearView.module.css';
|
|
13
13
|
|
|
@@ -52,12 +52,14 @@ class Year extends React.PureComponent {
|
|
|
52
52
|
align: "vertical"
|
|
53
53
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
54
54
|
flexible: true
|
|
55
|
-
}, /*#__PURE__*/React.createElement(
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
56
56
|
className: style.yearText,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
title: year,
|
|
58
|
+
a11y: {
|
|
59
|
+
tabindex: '0'
|
|
60
|
+
},
|
|
61
|
+
tagName: "h4"
|
|
62
|
+
})), /*#__PURE__*/React.createElement(Icon, {
|
|
61
63
|
name: "ZD-arrowDownSingle",
|
|
62
64
|
size: "7",
|
|
63
65
|
isBold: true,
|
|
@@ -92,9 +94,7 @@ class Month extends React.PureComponent {
|
|
|
92
94
|
onClick: this.handleClick,
|
|
93
95
|
"data-title": hoverText,
|
|
94
96
|
"aria-label": month
|
|
95
|
-
},
|
|
96
|
-
size: "12"
|
|
97
|
-
}, displayText));
|
|
97
|
+
}, displayText);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
export default class YearView extends React.PureComponent {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
.month {
|
|
10
10
|
width: 30.333%;
|
|
11
|
+
font-size: 12px;
|
|
11
12
|
line-height: var(--zd_size26);
|
|
12
13
|
height: 26px;
|
|
13
14
|
color: var(--zdt_yearview_month_text);
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
|
|
48
49
|
.yearText {
|
|
49
50
|
color: var(--zdt_yearview_yeartext_text);
|
|
51
|
+
font-size: 11px;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
.arrow {
|
|
@@ -61,6 +63,7 @@
|
|
|
61
63
|
.isActive .yearText {
|
|
62
64
|
font-family: var(--zd_semibold);
|
|
63
65
|
color: var(--zdt_yearview_year_hover_text);
|
|
66
|
+
font-size: 11px;
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
.arrowActive {
|
|
@@ -93,4 +96,4 @@
|
|
|
93
96
|
.toggleYear {
|
|
94
97
|
height: 0;
|
|
95
98
|
padding: 0;
|
|
96
|
-
}
|
|
99
|
+
}
|
package/es/Heading/Heading.js
CHANGED
|
@@ -7,21 +7,21 @@ export default class Heading extends React.Component {
|
|
|
7
7
|
let {
|
|
8
8
|
tagName,
|
|
9
9
|
className,
|
|
10
|
+
onClick,
|
|
11
|
+
onDoubleClick,
|
|
10
12
|
title,
|
|
11
13
|
dataTitle,
|
|
12
14
|
dataId,
|
|
13
|
-
a11y
|
|
14
|
-
customProps,
|
|
15
|
-
size,
|
|
16
|
-
children
|
|
15
|
+
a11y
|
|
17
16
|
} = this.props;
|
|
18
17
|
return /*#__PURE__*/React.createElement(tagName, {
|
|
19
|
-
className: `${style.reset} ${
|
|
18
|
+
className: `${style.reset} ${className}`,
|
|
19
|
+
onClick,
|
|
20
|
+
onDoubleClick,
|
|
20
21
|
'data-title': dataTitle || title,
|
|
21
22
|
'data-id': dataId,
|
|
22
|
-
...customProps,
|
|
23
23
|
...a11y
|
|
24
|
-
}, title
|
|
24
|
+
}, title);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
Heading.propTypes = propTypes;
|
|
@@ -2,71 +2,4 @@
|
|
|
2
2
|
font-size: initial;
|
|
3
3
|
font-weight: initial;
|
|
4
4
|
margin: initial;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.size8{
|
|
8
|
-
font-size: 8px;
|
|
9
|
-
}
|
|
10
|
-
.size9{
|
|
11
|
-
font-size: 9px;
|
|
12
|
-
}
|
|
13
|
-
.size10{
|
|
14
|
-
font-size: 10px;
|
|
15
|
-
}
|
|
16
|
-
.size11{
|
|
17
|
-
font-size: 11px;
|
|
18
|
-
}
|
|
19
|
-
.size12{
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
}
|
|
22
|
-
.size13{
|
|
23
|
-
font-size: 13px;
|
|
24
|
-
}
|
|
25
|
-
.size14{
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
}
|
|
28
|
-
.size15{
|
|
29
|
-
font-size: 15px;
|
|
30
|
-
}
|
|
31
|
-
.size16{
|
|
32
|
-
font-size: 16px;
|
|
33
|
-
}
|
|
34
|
-
.size17{
|
|
35
|
-
font-size: 17px;
|
|
36
|
-
}
|
|
37
|
-
.size18{
|
|
38
|
-
font-size: 18px;
|
|
39
|
-
}
|
|
40
|
-
.size19{
|
|
41
|
-
font-size: 19px;
|
|
42
|
-
}
|
|
43
|
-
.size20{
|
|
44
|
-
font-size: 20px;
|
|
45
|
-
}
|
|
46
|
-
.size21{
|
|
47
|
-
font-size: 21px;
|
|
48
|
-
}
|
|
49
|
-
.size22{
|
|
50
|
-
font-size: 22px;
|
|
51
|
-
}
|
|
52
|
-
.size23{
|
|
53
|
-
font-size: 23px;
|
|
54
|
-
}
|
|
55
|
-
.size24{
|
|
56
|
-
font-size: 24px;
|
|
57
|
-
}
|
|
58
|
-
.size25{
|
|
59
|
-
font-size: 25px;
|
|
60
|
-
}
|
|
61
|
-
.size26{
|
|
62
|
-
font-size: 26px;
|
|
63
|
-
}
|
|
64
|
-
.size30{
|
|
65
|
-
font-size: 30px;
|
|
66
|
-
}
|
|
67
|
-
.size50{
|
|
68
|
-
font-size: 50px;
|
|
69
|
-
}
|
|
70
|
-
.sizeinherit{
|
|
71
|
-
font-size: inherit;
|
|
72
|
-
}
|
|
5
|
+
}
|
|
@@ -5,8 +5,7 @@ export const propTypes = {
|
|
|
5
5
|
title: PropTypes.string,
|
|
6
6
|
dataId: PropTypes.string,
|
|
7
7
|
dataTitle: PropTypes.string,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
a11y: PropTypes.object
|
|
11
|
-
size: PropTypes.oneOf(['8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '30', '50', 'inherit'])
|
|
8
|
+
onClick: PropTypes.func,
|
|
9
|
+
onDoubleClick: PropTypes.func,
|
|
10
|
+
a11y: PropTypes.object
|
|
12
11
|
};
|
package/es/Label/Label.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { defaultProps } from './props/defaultProps';
|
|
6
6
|
import { propTypes } from './props/propTypes';
|
|
7
|
-
import Typography from '../Typography/Typography';
|
|
8
7
|
import style from './Label.module.css';
|
|
9
8
|
import colors from './LabelColors.module.css';
|
|
10
9
|
export default class Label extends React.Component {
|
|
@@ -25,17 +24,15 @@ export default class Label extends React.Component {
|
|
|
25
24
|
id
|
|
26
25
|
} = this.props;
|
|
27
26
|
return /*#__PURE__*/React.createElement("label", {
|
|
28
|
-
className: `${style.label} ${style[type]} ${colors[palette]} ${style[`font_${variant}`]}
|
|
29
|
-
|
|
27
|
+
className: `${style.label} ${style[type]} ${style[size]} ${colors[palette]} ${style[`font_${variant}`]}
|
|
28
|
+
${clipped ? style.dotted : ''} ${onClick ? style.pointer : style.cursor} ${customClass} `,
|
|
30
29
|
htmlFor: htmlFor,
|
|
31
30
|
"data-title": title,
|
|
32
31
|
"data-id": dataId,
|
|
33
32
|
"data-selector-id": dataSelectorId,
|
|
34
33
|
onClick: onClick,
|
|
35
34
|
id: id
|
|
36
|
-
},
|
|
37
|
-
className: `${clipped ? style.dotted : ''} ${style[size]}`
|
|
38
|
-
}, text));
|
|
35
|
+
}, text);
|
|
39
36
|
}
|
|
40
37
|
}
|
|
41
38
|
Label.defaultProps = defaultProps;
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -6,7 +6,6 @@ import ListContainer from './ListContainer';
|
|
|
6
6
|
import { ListItemDefaultProps } from './props/defaultProps';
|
|
7
7
|
import { ListItem_Props } from './props/propTypes';
|
|
8
8
|
/**** Components ****/
|
|
9
|
-
import Typography from '../Typography/Typography';
|
|
10
9
|
import { Icon } from '@zohodesk/icons';
|
|
11
10
|
/**** CSS ****/
|
|
12
11
|
import style from './ListItem.module.css';
|
|
@@ -105,12 +104,9 @@ export default class ListItem extends React.Component {
|
|
|
105
104
|
customProps: ListItemProps
|
|
106
105
|
}, ContainerProps), value ? /*#__PURE__*/React.createElement(Box, {
|
|
107
106
|
shrink: true,
|
|
108
|
-
adjust: true
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
size: "13",
|
|
112
|
-
dataTitle: value
|
|
113
|
-
}, value)) : null, children ? /*#__PURE__*/React.createElement(Box, {
|
|
107
|
+
adjust: true,
|
|
108
|
+
className: needMultiLineText ? style.multiLineValue : style.value
|
|
109
|
+
}, value) : null, children ? /*#__PURE__*/React.createElement(Box, {
|
|
114
110
|
shrink: true,
|
|
115
111
|
adjust: true,
|
|
116
112
|
className: style.children
|
|
@@ -10,7 +10,6 @@ import { ListItemWithAvatar_Props } from './props/propTypes';
|
|
|
10
10
|
import Avatar from '../Avatar/Avatar';
|
|
11
11
|
import AvatarTeam from '../AvatarTeam/AvatarTeam';
|
|
12
12
|
import { Icon } from '@zohodesk/icons';
|
|
13
|
-
import Typography from '../Typography/Typography';
|
|
14
13
|
/**** CSS ****/
|
|
15
14
|
import style from './ListItem.module.css';
|
|
16
15
|
export default class ListItemWithAvatar extends React.PureComponent {
|
|
@@ -131,12 +130,9 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
131
130
|
})) : null, value ? /*#__PURE__*/React.createElement(Box, {
|
|
132
131
|
flexible: true,
|
|
133
132
|
shrink: true,
|
|
134
|
-
"data-title": isDisabled ? null : title
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
size: "13",
|
|
138
|
-
dataTitle: value
|
|
139
|
-
}, value)) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
133
|
+
"data-title": isDisabled ? null : title,
|
|
134
|
+
className: needMultiLineText ? style.multiLineValue : style.value
|
|
135
|
+
}, value) : null, needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
140
136
|
className: style.tickIcon,
|
|
141
137
|
"aria-hidden": ariaHidden,
|
|
142
138
|
dataId: `${dataIdString}_tickIcon`,
|
|
@@ -5,7 +5,6 @@ import { ListItemWithCheckBoxDefaultProps } from './props/defaultProps';
|
|
|
5
5
|
import { ListItemWithCheckBox_Props } from './props/propTypes';
|
|
6
6
|
import CheckBox from '../CheckBox/CheckBox';
|
|
7
7
|
import { Box } from '../Layout';
|
|
8
|
-
import Typography from '../Typography/Typography';
|
|
9
8
|
import style from './ListItem.module.css';
|
|
10
9
|
export default class ListItemWithCheckBox extends React.Component {
|
|
11
10
|
constructor(props) {
|
|
@@ -99,12 +98,9 @@ export default class ListItemWithCheckBox extends React.Component {
|
|
|
99
98
|
})), /*#__PURE__*/React.createElement(Box, {
|
|
100
99
|
flexible: true,
|
|
101
100
|
shrink: true,
|
|
102
|
-
"data-title": isDisabled ? null : title
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
size: "13",
|
|
106
|
-
dataTitle: value
|
|
107
|
-
}, value)));
|
|
101
|
+
"data-title": isDisabled ? null : title,
|
|
102
|
+
className: needMultiLineText ? style.multiLineValue : style.value
|
|
103
|
+
}, value));
|
|
108
104
|
}
|
|
109
105
|
}
|
|
110
106
|
ListItemWithCheckBox.defaultProps = ListItemWithCheckBoxDefaultProps;
|
|
@@ -6,7 +6,6 @@ import { Icon } from '@zohodesk/icons';
|
|
|
6
6
|
import ListContainer from './ListContainer';
|
|
7
7
|
import { ListItemWithIconDefaultProps } from './props/defaultProps';
|
|
8
8
|
import { ListItemWithIcon_Props } from './props/propTypes';
|
|
9
|
-
import Typography from '../Typography/Typography';
|
|
10
9
|
/**** CSS ****/
|
|
11
10
|
import style from './ListItem.module.css';
|
|
12
11
|
export default class ListItemWithIcon extends React.Component {
|
|
@@ -112,13 +111,10 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
112
111
|
}) : null, value && /*#__PURE__*/React.createElement(Box, {
|
|
113
112
|
flexible: true,
|
|
114
113
|
shrink: true,
|
|
114
|
+
className: needMultiLineText ? style.multiLineValue : style.value,
|
|
115
115
|
"data-title": isDisabled ? null : title,
|
|
116
116
|
dataId: `${dataIdString}_Text`
|
|
117
|
-
}, /*#__PURE__*/React.createElement(
|
|
118
|
-
className: needMultiLineText ? style.multiLineValue : style.value,
|
|
119
|
-
size: "13",
|
|
120
|
-
dataTitle: value
|
|
121
|
-
}, value)), needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
117
|
+
}, value), needTick && active ? /*#__PURE__*/React.createElement(Box, {
|
|
122
118
|
className: style.tickIcon,
|
|
123
119
|
"aria-hidden": ariaHidden,
|
|
124
120
|
dataId: `${dataIdString}_tickIcon`,
|
|
@@ -5,7 +5,6 @@ import { Box } from '../Layout';
|
|
|
5
5
|
import ListContainer from './ListContainer';
|
|
6
6
|
import { ListItemWithRadioDefaultProps } from './props/defaultProps';
|
|
7
7
|
import { ListItemWithRadio_Props } from './props/propTypes';
|
|
8
|
-
import Typography from '../Typography/Typography';
|
|
9
8
|
import style from './ListItem.module.css';
|
|
10
9
|
export default class ListItemWithRadio extends React.Component {
|
|
11
10
|
constructor(props) {
|
|
@@ -101,12 +100,9 @@ export default class ListItemWithRadio extends React.Component {
|
|
|
101
100
|
})), /*#__PURE__*/React.createElement(Box, {
|
|
102
101
|
flexible: true,
|
|
103
102
|
shrink: true,
|
|
104
|
-
"data-title": disableTitle ? null : title
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
size: "13",
|
|
108
|
-
dataTitle: value
|
|
109
|
-
}, value)));
|
|
103
|
+
"data-title": disableTitle ? null : title,
|
|
104
|
+
className: needMultiLineText ? style.multiLineValue : style.value
|
|
105
|
+
}, value));
|
|
110
106
|
}
|
|
111
107
|
}
|
|
112
108
|
ListItemWithRadio.defaultProps = ListItemWithRadioDefaultProps;
|
|
@@ -5,15 +5,27 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import ResizeObserver from './ResizeObserver';
|
|
8
|
-
import { getElementSpace
|
|
8
|
+
import { getElementSpace } from '../utils/Common';
|
|
9
9
|
export default class ResizeComponent extends React.Component {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(props);
|
|
12
12
|
this.noSpaceForChildren = false;
|
|
13
13
|
this.childrenCurrentList = [];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const debounce = function (cb) {
|
|
15
|
+
let timer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
16
|
+
let timeoutId = null;
|
|
17
|
+
return () => {
|
|
18
|
+
if (timeoutId) {
|
|
19
|
+
clearTimeout(timeoutId);
|
|
20
|
+
}
|
|
21
|
+
timeoutId = setTimeout(() => {
|
|
22
|
+
cb();
|
|
23
|
+
}, timer);
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
this.widthCheck = debounce(this.widthCheck.bind(this), 500); // this.widthCheck = this.widthCheck.bind(this);
|
|
27
|
+
|
|
28
|
+
this.onResize = debounce(this.onResize.bind(this), 500);
|
|
17
29
|
this.onResizeMutation = this.onResizeMutation.bind(this);
|
|
18
30
|
this.tabsObserver = new ResizeObserver(this.onResize);
|
|
19
31
|
this.tabObserver = new MutationObserver(this.onResizeMutation);
|
package/es/Tab/Tab.js
CHANGED
|
@@ -6,7 +6,6 @@ import React, { useMemo, useCallback } from 'react';
|
|
|
6
6
|
import { Tab_defaultProps } from './props/defaultProps';
|
|
7
7
|
import { Tab_propTypes } from './props/propTypes';
|
|
8
8
|
import { Box, Container } from '../Layout';
|
|
9
|
-
import Typography from '../Typography/Typography';
|
|
10
9
|
import { cs } from '../utils/Common';
|
|
11
10
|
import styles from './Tab.module.css';
|
|
12
11
|
const tabTypes = {
|
|
@@ -94,10 +93,9 @@ export default function Tab(_ref) {
|
|
|
94
93
|
className: styles.textContainer
|
|
95
94
|
}, text && /*#__PURE__*/React.createElement(Box, {
|
|
96
95
|
flexible: true,
|
|
97
|
-
adjust: true
|
|
98
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
96
|
+
adjust: true,
|
|
99
97
|
className: styles.tabText
|
|
100
|
-
}, text)
|
|
98
|
+
}, text), children ? /*#__PURE__*/React.createElement(Box, {
|
|
101
99
|
shrink: true
|
|
102
100
|
}, children) : null));
|
|
103
101
|
}
|
package/es/Tab/Tabs.js
CHANGED
|
@@ -32,7 +32,19 @@ class Tabs extends React.Component {
|
|
|
32
32
|
tabKeys: []
|
|
33
33
|
};
|
|
34
34
|
bind.apply(this, ['moreTabSelect', 'onResize', 'onTabResize', 'getHighlightRef', 'getTabsRef', 'getTabRef', 'getHighlightDim', 'onSizeChange', 'onScroll', 'togglePopup', 'setMaxDim']);
|
|
35
|
-
|
|
35
|
+
const debounce = function (cb) {
|
|
36
|
+
let timer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
37
|
+
let timeoutId = null;
|
|
38
|
+
return () => {
|
|
39
|
+
if (timeoutId) {
|
|
40
|
+
clearTimeout(timeoutId);
|
|
41
|
+
}
|
|
42
|
+
timeoutId = setTimeout(() => {
|
|
43
|
+
cb();
|
|
44
|
+
}, timer);
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
this.tabsObserver = new ResizeObserver(debounce(this.onResize));
|
|
36
48
|
this.tabObserver = {};
|
|
37
49
|
}
|
|
38
50
|
onTabResize(size, target) {
|
|
@@ -215,15 +227,16 @@ class Tabs extends React.Component {
|
|
|
215
227
|
isResponsive
|
|
216
228
|
} = this.props;
|
|
217
229
|
if (this.tabsEle && isResponsive) {
|
|
218
|
-
if (!timer) {
|
|
219
|
-
|
|
220
|
-
} else {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
230
|
+
// if (!timer) {
|
|
231
|
+
// this.onSizeChange();
|
|
232
|
+
// } else {
|
|
233
|
+
// setTimeout(() => {
|
|
234
|
+
this.onSizeChange();
|
|
235
|
+
// }, timer);
|
|
236
|
+
// }
|
|
225
237
|
}
|
|
226
238
|
}
|
|
239
|
+
|
|
227
240
|
getTotalDimension() {
|
|
228
241
|
let {
|
|
229
242
|
align
|
package/es/Tag/Tag.js
CHANGED
|
@@ -5,7 +5,6 @@ import { Icon } from '@zohodesk/icons';
|
|
|
5
5
|
import Avatar from '../Avatar/Avatar';
|
|
6
6
|
import { Container } from '../Layout';
|
|
7
7
|
import Button from '../semantic/Button/Button';
|
|
8
|
-
import Typography from '../Typography/Typography';
|
|
9
8
|
import { getUniqueId } from '../Provider/IdProvider';
|
|
10
9
|
import style from './Tag.module.css';
|
|
11
10
|
|
|
@@ -118,14 +117,10 @@ export default class Tag extends PureComponent {
|
|
|
118
117
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
119
118
|
name: iconName,
|
|
120
119
|
size: iconSize
|
|
121
|
-
})) : null, /*#__PURE__*/React.createElement(
|
|
120
|
+
})) : null, /*#__PURE__*/React.createElement("div", {
|
|
122
121
|
className: `${style.text} ${textSizes}`,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
customProps: {
|
|
127
|
-
id: getAriaId
|
|
128
|
-
}
|
|
122
|
+
"aria-hidden": true,
|
|
123
|
+
id: getAriaId
|
|
129
124
|
}, text), onRemove && /*#__PURE__*/React.createElement(Button, {
|
|
130
125
|
customClass: `${style.close} ${active ? style[`active${closePalette}Close`] : ''}
|
|
131
126
|
${rounded ? style.lgRadiusClose : style.smRadiusClose} ${isDarkPalette ? style.darkTagClose : ''}
|
package/es/index.js
CHANGED
|
@@ -38,6 +38,4 @@ export { default as Tooltip } from './Tooltip/Tooltip';
|
|
|
38
38
|
import * as _utils from './utils';
|
|
39
39
|
export { _utils as utils };
|
|
40
40
|
export * from './VelocityAnimation';
|
|
41
|
-
export * from './semantic';
|
|
42
|
-
export { default as Text } from './Text/Text';
|
|
43
|
-
export { default as Typography } from './Typography/Typography';
|
|
41
|
+
export * from './semantic';
|