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