@zohodesk/components 1.0.0-temp-191 → 1.0.0-temp-193
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 +4 -0
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +29 -2
- package/assets/Appearance/light/mode/Component_LightMode.module.css +29 -2
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +29 -2
- package/es/AppContainer/AppContainer.js +9 -10
- package/es/AppContainer/AppContainer.module.css +2 -2
- package/es/Avatar/Avatar.js +5 -4
- package/es/Avatar/Avatar.module.css +44 -26
- package/es/AvatarTeam/AvatarTeam.js +7 -7
- package/es/AvatarTeam/AvatarTeam.module.css +62 -74
- package/es/Button/Button.js +6 -5
- package/es/Button/css/Button.module.css +156 -100
- package/es/Buttongroup/Buttongroup.module.css +50 -17
- package/es/CheckBox/CheckBox.js +8 -8
- package/es/CheckBox/CheckBox.module.css +35 -60
- package/es/DateTime/DateTime.js +8 -2
- package/es/DateTime/DateTime.module.css +85 -57
- package/es/DateTime/DateWidget.js +14 -3
- package/es/DateTime/DateWidget.module.css +11 -7
- package/es/DateTime/Time.js +30 -13
- package/es/DateTime/YearView.module.css +34 -21
- package/es/DateTime/props/defaultProps.js +4 -2
- package/es/DateTime/props/propTypes.js +6 -3
- package/es/DropBox/DropBox.js +11 -10
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +100 -81
- package/es/DropBox/css/DropBox.module.css +23 -6
- package/es/DropDown/DropDown.js +1 -2
- package/es/DropDown/DropDown.module.css +2 -2
- package/es/DropDown/DropDownHeading.module.css +15 -15
- package/es/DropDown/DropDownItem.module.css +40 -22
- package/es/DropDown/DropDownSearch.module.css +3 -3
- package/es/DropDown/DropDownSeparator.module.css +2 -2
- package/es/Heading/Heading.module.css +2 -2
- package/es/Label/Label.module.css +11 -23
- package/es/Label/LabelColors.module.css +1 -7
- package/es/Layout/Layout.module.css +15 -15
- package/es/ListItem/ListContainer.js +5 -6
- package/es/ListItem/ListItem.js +5 -4
- package/es/ListItem/ListItem.module.css +80 -98
- package/es/ListItem/ListItemWithAvatar.js +5 -4
- package/es/ListItem/ListItemWithCheckBox.js +5 -4
- package/es/ListItem/ListItemWithIcon.js +5 -4
- package/es/ListItem/ListItemWithRadio.js +5 -4
- package/es/Modal/Modal.js +5 -4
- package/es/MultiSelect/AdvancedMultiSelect.js +9 -8
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +16 -19
- package/es/MultiSelect/MultiSelect.module.css +55 -69
- package/es/MultiSelect/MultiSelectWithAvatar.js +5 -4
- package/es/MultiSelect/SelectedOptions.js +8 -6
- package/es/MultiSelect/SelectedOptions.module.css +11 -5
- package/es/MultiSelect/Suggestions.js +8 -6
- package/es/MultiSelect/props/defaultProps.js +4 -2
- package/es/PopOver/PopOver.module.css +2 -2
- package/es/Popup/Popup.js +4 -3
- package/es/Radio/Radio.js +8 -8
- package/es/Radio/Radio.module.css +22 -37
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +4 -2
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +2 -2
- package/es/Ribbon/Ribbon.module.css +143 -64
- package/es/RippleEffect/RippleEffect.module.css +9 -27
- package/es/Select/Select.js +5 -4
- package/es/Select/Select.module.css +33 -22
- package/es/Stencils/Stencils.module.css +32 -14
- package/es/Switch/Switch.js +8 -8
- package/es/Switch/Switch.module.css +30 -35
- package/es/Tab/Tab.js +5 -4
- package/es/Tab/Tab.module.css +28 -39
- package/es/Tab/TabContentWrapper.js +5 -4
- package/es/Tab/TabWrapper.js +4 -2
- package/es/Tab/Tabs.js +16 -16
- package/es/Tab/Tabs.module.css +51 -29
- package/es/Tag/Tag.module.css +60 -91
- package/es/TextBox/TextBox.js +5 -5
- package/es/TextBox/TextBox.module.css +19 -23
- package/es/TextBoxIcon/TextBoxIcon.js +4 -2
- package/es/TextBoxIcon/TextBoxIcon.module.css +15 -8
- package/es/Textarea/Textarea.js +6 -4
- package/es/Textarea/Textarea.module.css +30 -60
- package/es/Tooltip/Tooltip.module.css +12 -13
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +5 -4
- package/es/common/animation.module.css +227 -29
- package/es/common/avatarsizes.module.css +16 -16
- package/es/common/basicReset.module.css +5 -15
- package/es/common/common.module.css +82 -36
- package/es/common/customscroll.module.css +33 -12
- package/es/common/transition.module.css +50 -10
- package/es/deprecated/PortalLayer/PortalLayer.js +6 -8
- package/es/semantic/Button/semanticButton.module.css +3 -3
- package/es/v1/AppContainer/AppContainer.js +9 -10
- package/es/v1/Avatar/Avatar.js +5 -4
- package/es/v1/AvatarTeam/AvatarTeam.js +7 -7
- package/es/v1/Button/Button.js +6 -5
- package/es/v1/CheckBox/CheckBox.js +8 -8
- package/es/v1/DropBox/DropBox.js +11 -10
- package/es/v1/DropDown/DropDown.js +1 -2
- package/es/v1/ListItem/ListContainer.js +5 -6
- package/es/v1/ListItem/ListItem.js +5 -4
- package/es/v1/ListItem/ListItemWithAvatar.js +5 -4
- package/es/v1/ListItem/ListItemWithCheckBox.js +5 -4
- package/es/v1/ListItem/ListItemWithIcon.js +5 -4
- package/es/v1/ListItem/ListItemWithRadio.js +5 -4
- package/es/v1/Modal/Modal.js +5 -4
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +9 -8
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +5 -4
- package/es/v1/MultiSelect/SelectedOptions.js +8 -6
- package/es/v1/MultiSelect/Suggestions.js +8 -6
- package/es/v1/MultiSelect/props/defaultProps.js +4 -2
- package/es/v1/Popup/Popup.js +4 -3
- package/es/v1/Radio/Radio.js +8 -8
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +4 -2
- package/es/v1/Select/Select.js +5 -4
- package/es/v1/Switch/Switch.js +8 -8
- package/es/v1/Tab/Tab.js +5 -4
- package/es/v1/Tab/TabContentWrapper.js +5 -4
- package/es/v1/Tab/TabWrapper.js +4 -2
- package/es/v1/Tab/Tabs.js +16 -16
- package/es/v1/Tab/v1Tab.module.css +28 -39
- package/es/v1/Tab/v1Tabs.module.css +51 -29
- package/es/v1/TextBox/TextBox.js +5 -5
- package/es/v1/TextBoxIcon/TextBoxIcon.js +4 -2
- package/es/v1/Textarea/Textarea.js +6 -4
- package/es/v1/Typography/css/Typography.module.css +39 -33
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +5 -4
- package/lib/AppContainer/AppContainer.module.css +2 -2
- package/lib/Avatar/Avatar.module.css +44 -26
- package/lib/AvatarTeam/AvatarTeam.module.css +62 -74
- package/lib/Button/css/Button.module.css +156 -100
- package/lib/Buttongroup/Buttongroup.module.css +50 -17
- package/lib/CheckBox/CheckBox.module.css +35 -60
- package/lib/DateTime/DateTime.js +13 -2
- package/lib/DateTime/DateTime.module.css +85 -57
- package/lib/DateTime/DateWidget.js +19 -3
- package/lib/DateTime/DateWidget.module.css +11 -7
- package/lib/DateTime/Time.js +35 -13
- package/lib/DateTime/YearView.module.css +34 -21
- package/lib/DateTime/props/defaultProps.js +4 -2
- package/lib/DateTime/props/propTypes.js +6 -3
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +100 -81
- package/lib/DropBox/css/DropBox.module.css +23 -6
- package/lib/DropDown/DropDown.module.css +2 -2
- package/lib/DropDown/DropDownHeading.module.css +15 -15
- package/lib/DropDown/DropDownItem.module.css +40 -22
- package/lib/DropDown/DropDownSearch.module.css +3 -3
- package/lib/DropDown/DropDownSeparator.module.css +2 -2
- package/lib/Heading/Heading.module.css +2 -2
- package/lib/Label/Label.module.css +11 -23
- package/lib/Label/LabelColors.module.css +1 -7
- package/lib/Layout/Layout.module.css +15 -15
- package/lib/ListItem/ListItem.module.css +80 -98
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +16 -19
- package/lib/MultiSelect/MultiSelect.module.css +55 -69
- package/lib/MultiSelect/SelectedOptions.module.css +11 -5
- package/lib/MultiSelect/props/defaultProps.js +4 -2
- package/lib/PopOver/PopOver.module.css +2 -2
- package/lib/Radio/Radio.module.css +22 -37
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +2 -2
- package/lib/Ribbon/Ribbon.module.css +143 -64
- package/lib/RippleEffect/RippleEffect.module.css +9 -27
- package/lib/Select/Select.module.css +33 -22
- package/lib/Stencils/Stencils.module.css +32 -14
- package/lib/Switch/Switch.module.css +30 -35
- package/lib/Tab/Tab.module.css +28 -39
- package/lib/Tab/Tabs.module.css +51 -29
- package/lib/Tag/Tag.module.css +60 -91
- package/lib/TextBox/TextBox.module.css +19 -23
- package/lib/TextBoxIcon/TextBoxIcon.module.css +15 -8
- package/lib/Textarea/Textarea.module.css +30 -60
- package/lib/Tooltip/Tooltip.module.css +12 -13
- package/lib/common/animation.module.css +227 -29
- package/lib/common/avatarsizes.module.css +16 -16
- package/lib/common/basicReset.module.css +5 -15
- package/lib/common/common.module.css +82 -36
- package/lib/common/customscroll.module.css +33 -12
- package/lib/common/transition.module.css +50 -10
- package/lib/semantic/Button/semanticButton.module.css +3 -3
- package/lib/v1/MultiSelect/props/defaultProps.js +4 -2
- package/lib/v1/Tab/v1Tab.module.css +28 -39
- package/lib/v1/Tab/v1Tabs.module.css +51 -29
- package/lib/v1/Typography/css/Typography.module.css +39 -33
- package/package.json +3 -3
- package/result.json +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.varClass {
|
|
2
2
|
/* stencils default variables */
|
|
3
|
-
--stencil_height:
|
|
3
|
+
--stencil_height: var(--zd_size9);
|
|
4
4
|
--stencil_width: 100%;
|
|
5
5
|
--stencil_border_radius: 5px;
|
|
6
6
|
}
|
|
@@ -11,14 +11,23 @@
|
|
|
11
11
|
border-radius: var(--stencil_border_radius);
|
|
12
12
|
}
|
|
13
13
|
.stencil {
|
|
14
|
-
|
|
14
|
+
background-size: 800px 1px;
|
|
15
|
+
}
|
|
16
|
+
[dir=ltr] .stencil {
|
|
17
|
+
animation-name: placeHolderShimmer-ltr ;
|
|
18
|
+
animation-fill-mode: forwards;
|
|
19
|
+
animation-iteration-count: infinite;
|
|
20
|
+
animation-duration: var(--zd_transition10);
|
|
21
|
+
animation-timing-function: linear;
|
|
22
|
+
}
|
|
23
|
+
[dir=rtl] .stencil {
|
|
24
|
+
animation-name: placeHolderShimmer-rtl ;
|
|
15
25
|
animation-fill-mode: forwards;
|
|
16
26
|
animation-iteration-count: infinite;
|
|
17
27
|
animation-duration: var(--zd_transition10);
|
|
18
28
|
animation-timing-function: linear;
|
|
19
|
-
background-size: 800px 1px;
|
|
20
29
|
}
|
|
21
|
-
@keyframes placeHolderShimmer {
|
|
30
|
+
@keyframes placeHolderShimmer-ltr {
|
|
22
31
|
0% {
|
|
23
32
|
background-position: calc(var(--zd_size468) * -1) 0;
|
|
24
33
|
}
|
|
@@ -27,10 +36,19 @@
|
|
|
27
36
|
background-position: var(--zd_size468) 0;
|
|
28
37
|
}
|
|
29
38
|
}
|
|
39
|
+
@keyframes placeHolderShimmer-rtl {
|
|
40
|
+
0% {
|
|
41
|
+
background-position: calc(100% - (var(--zd_size468) * -1)) 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
100% {
|
|
45
|
+
background-position: var(--zd_size468) 100%;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
30
48
|
|
|
31
49
|
.rectangular {
|
|
32
50
|
composes: stencil;
|
|
33
|
-
--stencil_height:
|
|
51
|
+
--stencil_height: var(--zd_size9);
|
|
34
52
|
--stencil_border_radius: 5px;
|
|
35
53
|
}
|
|
36
54
|
.primary {
|
|
@@ -47,16 +65,16 @@
|
|
|
47
65
|
}
|
|
48
66
|
|
|
49
67
|
.small {
|
|
50
|
-
--stencil_width:
|
|
68
|
+
--stencil_width: var(--zd_size110);
|
|
51
69
|
}
|
|
52
70
|
.default {
|
|
53
71
|
--stencil_width: 100%;
|
|
54
72
|
}
|
|
55
73
|
.medium {
|
|
56
|
-
--stencil_width:
|
|
74
|
+
--stencil_width: var(--zd_size170);
|
|
57
75
|
}
|
|
58
76
|
.large {
|
|
59
|
-
--stencil_width:
|
|
77
|
+
--stencil_width: var(--zd_size220);
|
|
60
78
|
}
|
|
61
79
|
|
|
62
80
|
.circle {
|
|
@@ -64,15 +82,15 @@
|
|
|
64
82
|
--stencil_border_radius: 50%;
|
|
65
83
|
}
|
|
66
84
|
.clarge {
|
|
67
|
-
--stencil_width:
|
|
68
|
-
--stencil_height:
|
|
85
|
+
--stencil_width: var(--zd_size42);
|
|
86
|
+
--stencil_height: var(--zd_size42);
|
|
69
87
|
}
|
|
70
88
|
.cmedium,
|
|
71
89
|
.cdefault {
|
|
72
|
-
--stencil_width:
|
|
73
|
-
--stencil_height:
|
|
90
|
+
--stencil_width: var(--zd_size30);
|
|
91
|
+
--stencil_height: var(--zd_size30);
|
|
74
92
|
}
|
|
75
93
|
.csmall {
|
|
76
|
-
--stencil_width:
|
|
77
|
-
--stencil_height:
|
|
94
|
+
--stencil_width: var(--zd_size20);
|
|
95
|
+
--stencil_height: var(--zd_size20);
|
|
78
96
|
}
|
package/es/Switch/Switch.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
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
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { defaultProps } from './props/defaultProps';
|
|
3
5
|
import { propTypes } from './props/propTypes';
|
|
@@ -48,7 +50,7 @@ export default class Switch extends React.Component {
|
|
|
48
50
|
customLabel = ''
|
|
49
51
|
} = customClass;
|
|
50
52
|
size !== 'small' ? size = 'switch_medium' : size = 'switch_small';
|
|
51
|
-
return /*#__PURE__*/React.createElement(Container, {
|
|
53
|
+
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
52
54
|
align: "vertical",
|
|
53
55
|
isCover: false,
|
|
54
56
|
alignBox: "row",
|
|
@@ -57,9 +59,8 @@ export default class Switch extends React.Component {
|
|
|
57
59
|
"data-title": disabled ? disableTitle : title,
|
|
58
60
|
"aria-checked": checked,
|
|
59
61
|
role: "switch",
|
|
60
|
-
dataSelectorId: dataSelectorId
|
|
61
|
-
|
|
62
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
62
|
+
dataSelectorId: dataSelectorId
|
|
63
|
+
}, SwitchProps), /*#__PURE__*/React.createElement(Box, {
|
|
63
64
|
className: `${style[size]} ${customSwitchSize}`
|
|
64
65
|
}, /*#__PURE__*/React.createElement("input", {
|
|
65
66
|
type: "checkbox",
|
|
@@ -77,16 +78,15 @@ export default class Switch extends React.Component {
|
|
|
77
78
|
"data-test-id": dataId,
|
|
78
79
|
className: `${style.label} ${style[`${size}Label`]} ${customSwitch}`,
|
|
79
80
|
tabIndex: isReadOnly || disabled ? '-1' : '0'
|
|
80
|
-
})), text && /*#__PURE__*/React.createElement(Label, {
|
|
81
|
+
})), text && /*#__PURE__*/React.createElement(Label, _extends({
|
|
81
82
|
text: text,
|
|
82
83
|
palette: labelPalette,
|
|
83
84
|
id: id,
|
|
84
85
|
size: labelSize,
|
|
85
86
|
type: "subtitle",
|
|
86
87
|
onClick: !disabled || !isReadOnly ? this.onChange : null,
|
|
87
|
-
customClass: customLabel
|
|
88
|
-
|
|
89
|
-
}));
|
|
88
|
+
customClass: customLabel
|
|
89
|
+
}, LabelProps)));
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
}
|
|
@@ -37,13 +37,11 @@
|
|
|
37
37
|
{
|
|
38
38
|
--switch_off_bg_color: var(--zdt_switch_effect_off_bg);
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
/*rtl:begin:ignore*/
|
|
42
40
|
.label:after {
|
|
43
41
|
content: '';
|
|
44
42
|
display: block;
|
|
45
43
|
position: absolute;
|
|
46
|
-
right: 50
|
|
44
|
+
right: 50% ;
|
|
47
45
|
transition: all var(--zd_transition2);
|
|
48
46
|
box-shadow: var(--switch_cricle_box_shadow);
|
|
49
47
|
background-color: var(--switch_circle_bg_color);
|
|
@@ -55,59 +53,49 @@
|
|
|
55
53
|
}
|
|
56
54
|
|
|
57
55
|
.checked+.label:after {
|
|
58
|
-
right: -
|
|
56
|
+
right: calc( var(--zd_size1) * -1 ) ;
|
|
59
57
|
}
|
|
60
58
|
|
|
61
|
-
/*rtl:end:ignore*/
|
|
62
|
-
|
|
63
59
|
.input {
|
|
64
60
|
display: none;
|
|
65
61
|
}
|
|
66
62
|
|
|
67
63
|
.small {
|
|
68
|
-
height:
|
|
69
|
-
width:
|
|
64
|
+
height: var(--zd_size14) ;
|
|
65
|
+
width: var(--zd_size28) ;
|
|
70
66
|
}
|
|
71
|
-
|
|
72
|
-
/*rtl:begin:ignore*/
|
|
73
67
|
.switch_smallLabel {
|
|
74
|
-
height:
|
|
75
|
-
width:
|
|
76
|
-
top: -
|
|
77
|
-
left:
|
|
68
|
+
height: var(--zd_size9) ;
|
|
69
|
+
width: var(--zd_size22) ;
|
|
70
|
+
top: calc( var(--zd_size2) * -1 ) ;
|
|
71
|
+
left: var(--zd_size2) ;
|
|
78
72
|
}
|
|
79
|
-
|
|
80
|
-
/*rtl:end:ignore*/
|
|
81
73
|
.switch_smallLabel:after {
|
|
82
|
-
width:
|
|
83
|
-
height:
|
|
84
|
-
top: -
|
|
74
|
+
width: var(--zd_size12) ;
|
|
75
|
+
height: var(--zd_size12) ;
|
|
76
|
+
top: calc( var(--zd_size2) * -1 ) ;
|
|
85
77
|
}
|
|
86
78
|
|
|
87
79
|
.medium {
|
|
88
|
-
height:
|
|
89
|
-
width:
|
|
80
|
+
height: var(--zd_size18) ;
|
|
81
|
+
width: var(--zd_size34) ;
|
|
90
82
|
}
|
|
91
|
-
|
|
92
|
-
/*rtl:begin:ignore*/
|
|
93
83
|
.switch_mediumLabel {
|
|
94
|
-
height:
|
|
95
|
-
width:
|
|
96
|
-
top:
|
|
97
|
-
left:
|
|
84
|
+
height: var(--zd_size13) ;
|
|
85
|
+
width: var(--zd_size31) ;
|
|
86
|
+
top: var(--zd_size2) ;
|
|
87
|
+
left: var(--zd_size2) ;
|
|
98
88
|
}
|
|
99
|
-
|
|
100
|
-
/*rtl:end:ignore*/
|
|
101
89
|
.switch_mediumLabel:after {
|
|
102
|
-
width:
|
|
103
|
-
height:
|
|
104
|
-
top: -
|
|
90
|
+
width: var(--zd_size18) ;
|
|
91
|
+
height: var(--zd_size18) ;
|
|
92
|
+
top: calc( var(--zd_size3) * -1 ) ;
|
|
105
93
|
}
|
|
106
94
|
|
|
107
95
|
.input:disabled+.label {
|
|
96
|
+
opacity: 0.4;
|
|
108
97
|
border-color: var(--zdt_switch_default_off_bg);
|
|
109
98
|
cursor: not-allowed;
|
|
110
|
-
opacity: 0.4;
|
|
111
99
|
}
|
|
112
100
|
|
|
113
101
|
.switch {
|
|
@@ -128,6 +116,13 @@
|
|
|
128
116
|
|
|
129
117
|
.switch+label {
|
|
130
118
|
position: relative;
|
|
131
|
-
top: -
|
|
132
|
-
|
|
119
|
+
top: calc( var(--zd_size1) * -1 ) ;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[dir=ltr] .switch+label {
|
|
123
|
+
margin-left: var(--zd_size12) ;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
[dir=rtl] .switch+label {
|
|
127
|
+
margin-right: var(--zd_size12) ;
|
|
133
128
|
}
|
package/es/Tab/Tab.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
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
|
+
|
|
1
3
|
/* eslint-disable react/forbid-component-props */
|
|
2
4
|
|
|
3
5
|
/* eslint css-modules/no-unused-class: [2, { markAsUsed: ['text', 'tabAlpha', 'alphaActive', 'gammaActive', 'betaActive', 'deltaActive', 'tabGamma', 'tabBeta', 'tabDelta',', 'specialActive', 'tabSpecial', 'alphaActive_border', 'gammaActive_border', 'betaActive_border', 'deltaActive_border'] }] */
|
|
@@ -68,7 +70,7 @@ export default function Tab(_ref) {
|
|
|
68
70
|
let activeClasses = cs([needAppearance && activeWithAppearance, activeClass]);
|
|
69
71
|
let inActiveClasses = needAppearance && cs([styles[styleContent.tab], tabTypes[type] && styles[`${`${type}Hover`}`]]);
|
|
70
72
|
let tabClass = cs([styles.tab, align === 'vertical' ? styles.vertical : styles.horizontal, isDisabled && styles.disabled, needBorder && !isAnimate && needAppearance && styles.border, isActive ? activeClasses : inActiveClasses, className]);
|
|
71
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
73
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
72
74
|
tourId: tourId,
|
|
73
75
|
tagName: isLink ? 'a' : 'div',
|
|
74
76
|
className: tabClass,
|
|
@@ -86,9 +88,8 @@ export default function Tab(_ref) {
|
|
|
86
88
|
"aria-selected": isActive ? true : false,
|
|
87
89
|
tabIndex: isLink ? undefined : isActive && !isDisabled ? '0' : '0',
|
|
88
90
|
"aria-label": text ? text : null,
|
|
89
|
-
dataSelectorId: dataSelectorId
|
|
90
|
-
|
|
91
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
91
|
+
dataSelectorId: dataSelectorId
|
|
92
|
+
}, customProps), /*#__PURE__*/React.createElement(Container, {
|
|
92
93
|
alignBox: "row",
|
|
93
94
|
align: "both",
|
|
94
95
|
className: styles.textContainer
|
package/es/Tab/Tab.module.css
CHANGED
|
@@ -1,32 +1,26 @@
|
|
|
1
1
|
.tab {
|
|
2
2
|
text-transform: uppercase;
|
|
3
|
-
cursor: pointer;
|
|
4
3
|
letter-spacing: 0.6px;
|
|
5
4
|
text-decoration: none;
|
|
5
|
+
cursor: pointer;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
7
|
.vertical {
|
|
9
|
-
height: 100
|
|
8
|
+
height: 100% ;
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
.horizontal {
|
|
13
|
-
width: 100
|
|
14
|
-
max-width: 100
|
|
11
|
+
width: 100% ;
|
|
12
|
+
max-width: 100% ;
|
|
15
13
|
}
|
|
16
|
-
|
|
17
14
|
.textContainer,
|
|
18
15
|
.tabText {
|
|
19
|
-
max-width: inherit;
|
|
16
|
+
max-width: inherit ;
|
|
20
17
|
}
|
|
21
|
-
|
|
22
18
|
.tabText {
|
|
23
19
|
composes: dotted from '../common/common.module.css';
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
.disabled {
|
|
27
22
|
cursor: not-allowed;
|
|
28
23
|
}
|
|
29
|
-
|
|
30
24
|
.border {
|
|
31
25
|
border-bottom: 1px solid var(--zdt_tab_default_border);
|
|
32
26
|
}
|
|
@@ -36,76 +30,71 @@
|
|
|
36
30
|
.delta {
|
|
37
31
|
transition: all var(--zd_transition2);
|
|
38
32
|
}
|
|
39
|
-
|
|
40
33
|
.alpha {
|
|
41
|
-
|
|
42
|
-
font-size: 11px;
|
|
34
|
+
font-size: var(--zd_font_size11) ;
|
|
43
35
|
line-height: 3;
|
|
36
|
+
padding: 0 var(--zd_size18) ;
|
|
44
37
|
}
|
|
45
|
-
|
|
46
38
|
.tabAlpha {
|
|
47
39
|
composes: alpha;
|
|
48
40
|
color: var(--zdt_tab_alpha_text);
|
|
49
41
|
}
|
|
50
|
-
|
|
51
42
|
.alphaHover:hover {
|
|
52
|
-
color: var(--
|
|
43
|
+
color: var(--zdt_tab_alpha_hover_text);
|
|
53
44
|
background-color: var(--zdt_tab_alpha_hover_bg);
|
|
54
45
|
}
|
|
55
|
-
|
|
56
46
|
.alphaActive {
|
|
57
47
|
composes: alpha;
|
|
58
48
|
color: var(--zdt_tab_alpha_active_text);
|
|
59
49
|
}
|
|
60
|
-
|
|
61
|
-
.alphaActive_border,
|
|
62
|
-
.betaActive_border {
|
|
50
|
+
.alphaActive_border, .betaActive_border {
|
|
63
51
|
border-color: var(--zdt_tab_alpha_active_border);
|
|
64
52
|
}
|
|
65
|
-
|
|
66
53
|
.deltaActive_border {
|
|
67
54
|
border-color: var(--zdt_tab_delta_active_border);
|
|
68
55
|
}
|
|
69
|
-
|
|
70
56
|
.beta {
|
|
71
|
-
|
|
72
|
-
font-size: 14px;
|
|
57
|
+
font-size: var(--zd_font_size14) ;
|
|
73
58
|
line-height: 4.2857;
|
|
74
|
-
margin-right: 40px;
|
|
75
59
|
text-transform: capitalize;
|
|
60
|
+
padding: 0 var(--zd_size4) ;
|
|
61
|
+
}
|
|
62
|
+
[dir=ltr] .beta {
|
|
63
|
+
margin-right: var(--zd_size40) ;
|
|
64
|
+
}
|
|
65
|
+
[dir=rtl] .beta {
|
|
66
|
+
margin-left: var(--zd_size40) ;
|
|
76
67
|
}
|
|
77
|
-
|
|
78
68
|
.tabBeta {
|
|
79
69
|
composes: beta;
|
|
80
70
|
color: var(--zdt_tab_alpha_text);
|
|
81
71
|
}
|
|
82
|
-
|
|
83
72
|
.betaHover:hover {
|
|
84
|
-
color: var(--
|
|
73
|
+
color: var(--zdt_tab_alpha_hover_text);
|
|
85
74
|
}
|
|
86
|
-
|
|
87
75
|
.betaActive {
|
|
88
76
|
composes: beta;
|
|
89
|
-
color: var(--
|
|
77
|
+
color: var(--zdt_tab_alpha_hover_text);
|
|
90
78
|
}
|
|
91
|
-
|
|
92
79
|
.delta {
|
|
93
|
-
|
|
94
|
-
font-size: 11px;
|
|
80
|
+
font-size: var(--zd_font_size11) ;
|
|
95
81
|
line-height: 3;
|
|
96
|
-
|
|
82
|
+
padding: 0 var(--zd_size4) ;
|
|
83
|
+
}
|
|
84
|
+
[dir=ltr] .delta {
|
|
85
|
+
margin-right: var(--zd_size10) ;
|
|
86
|
+
}
|
|
87
|
+
[dir=rtl] .delta {
|
|
88
|
+
margin-left: var(--zd_size10) ;
|
|
97
89
|
}
|
|
98
|
-
|
|
99
90
|
.tabDelta {
|
|
100
91
|
composes: delta;
|
|
101
92
|
color: var(--zdt_tab_alpha_text);
|
|
102
93
|
}
|
|
103
|
-
|
|
104
94
|
.deltaHover:hover {
|
|
105
95
|
color: var(--zdt_tab_alpha_active_text);
|
|
106
96
|
}
|
|
107
|
-
|
|
108
97
|
.deltaActive {
|
|
109
98
|
composes: delta;
|
|
110
99
|
color: var(--zdt_tab_alpha_active_text);
|
|
111
|
-
}
|
|
100
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
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
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { TabContentWrapper_defaultProps } from './props/defaultProps';
|
|
3
5
|
import { TabContentWrapper_propTypes } from './props/propTypes';
|
|
@@ -16,16 +18,15 @@ const TabContentWrapper = _ref => {
|
|
|
16
18
|
tagName,
|
|
17
19
|
a11y
|
|
18
20
|
} = _ref;
|
|
19
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
21
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
20
22
|
flexible: true,
|
|
21
23
|
style: style,
|
|
22
24
|
dataId: dataId,
|
|
23
25
|
className: className,
|
|
24
26
|
onScroll: onScroll,
|
|
25
27
|
dataSelectorId: dataSelectorId,
|
|
26
|
-
tagName: tagName
|
|
27
|
-
|
|
28
|
-
}, React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) && child.props.id === selectedTab ? child : null));
|
|
28
|
+
tagName: tagName
|
|
29
|
+
}, a11y), React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) && child.props.id === selectedTab ? child : null));
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
TabContentWrapper.defaultProps = TabContentWrapper_defaultProps;
|
package/es/Tab/TabWrapper.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
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
|
+
|
|
1
3
|
import React, { useState, useCallback } from 'react';
|
|
2
4
|
import { TabWrapper_defaultProps } from './props/defaultProps';
|
|
3
5
|
import { TabWrapper_propTypes } from './props/propTypes';
|
|
@@ -35,7 +37,7 @@ function TabWrapper(_ref) {
|
|
|
35
37
|
let TabsChild = child.type;
|
|
36
38
|
let selectedTab = hookToDisableInternalState ? defaultTab : selectedTabInternal;
|
|
37
39
|
return /*#__PURE__*/React.createElement(TabsChild // eslint-disable-next-line react/no-array-index-key
|
|
38
|
-
, {
|
|
40
|
+
, _extends({}, child.props, {
|
|
39
41
|
selectedTab: selectedTab,
|
|
40
42
|
onSelect: setSelectedTab,
|
|
41
43
|
type: type,
|
|
@@ -46,7 +48,7 @@ function TabWrapper(_ref) {
|
|
|
46
48
|
needAppearance: needAppearance,
|
|
47
49
|
hookToDisableInternalState: hookToDisableInternalState,
|
|
48
50
|
align: align
|
|
49
|
-
});
|
|
51
|
+
}));
|
|
50
52
|
}));
|
|
51
53
|
}
|
|
52
54
|
|
package/es/Tab/Tabs.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
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
|
+
|
|
1
3
|
/* eslint-disable react/forbid-component-props */
|
|
2
4
|
|
|
3
5
|
/* eslint css-modules/no-unused-class: [2, {
|
|
@@ -457,7 +459,7 @@ class Tabs extends React.Component {
|
|
|
457
459
|
classProps.className = itemClass;
|
|
458
460
|
}
|
|
459
461
|
|
|
460
|
-
return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(MainTab, {
|
|
462
|
+
return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(MainTab, _extends({}, child.props, {
|
|
461
463
|
key: child.props.id,
|
|
462
464
|
getTabRef: this.getTabRef,
|
|
463
465
|
onSelect: onSelect,
|
|
@@ -468,23 +470,22 @@ class Tabs extends React.Component {
|
|
|
468
470
|
needBorder: needTabBorder,
|
|
469
471
|
needAppearance: needAppearance,
|
|
470
472
|
align: align,
|
|
471
|
-
isVirtual: isVirtual
|
|
472
|
-
|
|
473
|
-
});
|
|
473
|
+
isVirtual: isVirtual
|
|
474
|
+
}, classProps));
|
|
474
475
|
}), React.Children.count(moreTabs) ? /*#__PURE__*/React.createElement(Box, {
|
|
475
476
|
className: `${tabsStyle.menu} `,
|
|
476
477
|
dataSelectorId: `${dataSelectorId}_moreIcon`
|
|
477
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
478
|
+
}, /*#__PURE__*/React.createElement(Container, _extends({
|
|
478
479
|
className: `${btnstyle.buttonReset} ${moreButtonClass} ${isPopupOpen ? moreButtonActiveClass : ''}`,
|
|
479
480
|
align: "both",
|
|
480
481
|
onClick: this.togglePopup,
|
|
481
482
|
dataId: "moreTabs",
|
|
482
|
-
eleRef: getTargetRef
|
|
483
|
-
|
|
483
|
+
eleRef: getTargetRef
|
|
484
|
+
}, MoreButtonProps, {
|
|
484
485
|
"aria-label": "MoreTabs",
|
|
485
486
|
role: "link",
|
|
486
487
|
tagName: "button"
|
|
487
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
488
|
+
}), /*#__PURE__*/React.createElement(Icon, {
|
|
488
489
|
name: iconName,
|
|
489
490
|
size: iconSize
|
|
490
491
|
})), isPopupOpen && /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
@@ -494,7 +495,7 @@ class Tabs extends React.Component {
|
|
|
494
495
|
let {
|
|
495
496
|
tabletMode
|
|
496
497
|
} = _ref2;
|
|
497
|
-
return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
498
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, _extends({
|
|
498
499
|
isActive: isPopupReady,
|
|
499
500
|
isAnimate: true,
|
|
500
501
|
size: "medium",
|
|
@@ -504,12 +505,12 @@ class Tabs extends React.Component {
|
|
|
504
505
|
boxPosition: position,
|
|
505
506
|
getRef: getContainerRef,
|
|
506
507
|
isBoxPaddingNeed: true,
|
|
507
|
-
isArrow: false
|
|
508
|
-
|
|
508
|
+
isArrow: false
|
|
509
|
+
}, DropBoxProps, {
|
|
509
510
|
isResponsivePadding: true,
|
|
510
511
|
needFocusScope: true,
|
|
511
512
|
onClose: this.togglePopup
|
|
512
|
-
}, getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(this.props), /*#__PURE__*/React.createElement(Box, {
|
|
513
|
+
}), getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(this.props), /*#__PURE__*/React.createElement(Box, {
|
|
513
514
|
flexible: true,
|
|
514
515
|
shrink: true,
|
|
515
516
|
scroll: "vertical",
|
|
@@ -530,7 +531,7 @@ class Tabs extends React.Component {
|
|
|
530
531
|
dataId
|
|
531
532
|
} = child.props;
|
|
532
533
|
const value = text ? text : showTitleInMoreOptions ? title : null;
|
|
533
|
-
return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(ListItem, {
|
|
534
|
+
return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(ListItem, _extends({
|
|
534
535
|
key: id,
|
|
535
536
|
value: value,
|
|
536
537
|
onClick: this.moreTabSelect,
|
|
@@ -543,9 +544,8 @@ class Tabs extends React.Component {
|
|
|
543
544
|
customListItem: menuItemClass
|
|
544
545
|
},
|
|
545
546
|
target: "self",
|
|
546
|
-
dataId: `${dataId}_Tab
|
|
547
|
-
|
|
548
|
-
}, !showTitleInMoreOptions ? children : null);
|
|
547
|
+
dataId: `${dataId}_Tab`
|
|
548
|
+
}, ListItemProps), !showTitleInMoreOptions ? children : null);
|
|
549
549
|
})));
|
|
550
550
|
})) : null);
|
|
551
551
|
}
|