@zohodesk/components 1.0.0-temp-183 → 1.0.0-temp-184
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/.cli/stringContains.js +1 -0
- package/README.md +6 -0
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkModifyCategory.module.css +15 -0
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkTheme.module.css +1 -0
- package/assets/Appearance/dark/themes/green/green_CTA_DarkModifyCategory.module.css +15 -0
- package/assets/Appearance/dark/themes/green/green_CTA_DarkTheme.module.css +1 -0
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkModifyCategory.module.css +15 -0
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkTheme.module.css +1 -0
- package/assets/Appearance/dark/themes/red/red_CTA_DarkModifyCategory.module.css +15 -0
- package/assets/Appearance/dark/themes/red/red_CTA_DarkTheme.module.css +1 -0
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkModifyCategory.module.css +15 -0
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkTheme.module.css +1 -0
- package/assets/Appearance/light/themes/blue/blue_CTA_LightModifyCategory.module.css +15 -0
- package/assets/Appearance/light/themes/blue/blue_CTA_LightTheme.module.css +1 -0
- package/assets/Appearance/light/themes/green/green_CTA_LightModifyCategory.module.css +15 -0
- package/assets/Appearance/light/themes/green/green_CTA_LightTheme.module.css +1 -0
- package/assets/Appearance/light/themes/orange/orange_CTA_LightModifyCategory.module.css +15 -0
- package/assets/Appearance/light/themes/orange/orange_CTA_LightTheme.module.css +1 -0
- package/assets/Appearance/light/themes/red/red_CTA_LightModifyCategory.module.css +15 -0
- package/assets/Appearance/light/themes/red/red_CTA_LightTheme.module.css +1 -0
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightModifyCategory.module.css +15 -0
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightTheme.module.css +1 -0
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkModifyCategory.module.css +15 -0
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkTheme.module.css +1 -0
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkModifyCategory.module.css +15 -0
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkTheme.module.css +1 -0
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkModifyCategory.module.css +15 -0
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkTheme.module.css +1 -0
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkModifyCategory.module.css +15 -0
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkTheme.module.css +1 -0
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkModifyCategory.module.css +15 -0
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkTheme.module.css +1 -0
- package/es/AvatarTeam/AvatarTeam.module.css +2 -0
- package/es/DropBox/DropBoxElement/DropBoxElement.js +2 -1
- package/es/Select/Select.js +10 -2
- package/es/Select/Select.module.css +26 -1
- package/es/Tab/TabContentWrapper.js +8 -4
- package/es/Tab/props/defaultProps.js +2 -1
- package/es/Tab/props/propTypes.js +3 -1
- package/es/TextBox/TextBox.js +7 -1
- package/es/TextBox/TextBox.module.css +39 -1
- package/es/TextBox/props/defaultProps.js +1 -0
- package/es/TextBox/props/propTypes.js +1 -0
- package/es/TextBoxIcon/TextBoxIcon.js +2 -0
- package/es/TextBoxIcon/props/defaultProps.js +1 -0
- package/es/TextBoxIcon/props/propTypes.js +1 -0
- package/es/Tooltip/Tooltip.js +4 -2
- package/es/Tooltip/Tooltip.module.css +0 -4
- package/es/common/customscroll.module.css +0 -10
- package/es/v1/Select/Select.js +10 -2
- package/es/v1/Tab/Tab.js +1 -3
- package/es/v1/Tab/TabContent.js +1 -1
- package/es/v1/Tab/Tabs.js +175 -262
- package/es/v1/Tab/v1Tab.module.css +100 -0
- package/es/v1/Tab/v1TabContent.module.css +4 -0
- package/es/v1/Tab/v1Tabs.module.css +137 -0
- package/es/v1/TextBox/TextBox.js +7 -2
- package/es/v1/TextBox/props/defaultProps.js +1 -0
- package/es/v1/TextBox/props/propTypes.js +1 -0
- package/es/v1/TextBoxIcon/TextBoxIcon.js +3 -1
- package/es/v1/TextBoxIcon/props/defaultProps.js +1 -0
- package/es/v1/TextBoxIcon/props/propTypes.js +1 -0
- package/es/v1/Tooltip/Tooltip.js +4 -2
- package/lib/AvatarTeam/AvatarTeam.module.css +2 -0
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +2 -1
- package/lib/Select/Select.js +11 -2
- package/lib/Select/Select.module.css +26 -1
- package/lib/Tab/TabContentWrapper.js +8 -4
- package/lib/Tab/props/defaultProps.js +2 -1
- package/lib/Tab/props/propTypes.js +3 -1
- package/lib/TextBox/TextBox.js +9 -1
- package/lib/TextBox/TextBox.module.css +39 -1
- package/lib/TextBox/props/defaultProps.js +1 -0
- package/lib/TextBox/props/propTypes.js +1 -1
- package/lib/TextBoxIcon/TextBoxIcon.js +2 -0
- package/lib/TextBoxIcon/props/defaultProps.js +1 -0
- package/lib/TextBoxIcon/props/propTypes.js +1 -0
- package/lib/Tooltip/Tooltip.js +4 -2
- package/lib/Tooltip/Tooltip.module.css +0 -4
- package/lib/common/customscroll.module.css +0 -10
- package/lib/v1/Select/Select.js +11 -2
- package/lib/v1/Tab/Tab.js +6 -6
- package/lib/v1/Tab/TabContent.js +2 -2
- package/lib/v1/Tab/Tabs.js +434 -530
- package/lib/v1/Tab/v1Tab.module.css +100 -0
- package/lib/v1/Tab/v1TabContent.module.css +4 -0
- package/lib/v1/Tab/v1Tabs.module.css +137 -0
- package/lib/v1/TextBox/TextBox.js +8 -2
- package/lib/v1/TextBox/props/defaultProps.js +1 -0
- package/lib/v1/TextBox/props/propTypes.js +1 -1
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +3 -1
- package/lib/v1/TextBoxIcon/props/defaultProps.js +1 -0
- package/lib/v1/TextBoxIcon/props/propTypes.js +1 -0
- package/lib/v1/Tooltip/Tooltip.js +4 -2
- package/package.json +8 -7
- package/result.json +1 -1
- /package/.cli/{AppearanceThemeValidationExcludeFiles.js → ThemeValidationExcludeFiles.js} +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
.tab {
|
|
2
|
+
text-transform: uppercase;
|
|
3
|
+
letter-spacing: 0.6px;
|
|
4
|
+
text-decoration: none;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
}
|
|
7
|
+
.vertical {
|
|
8
|
+
height: 100%;
|
|
9
|
+
}
|
|
10
|
+
.horizontal {
|
|
11
|
+
width: 100%;
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
}
|
|
14
|
+
.textContainer,
|
|
15
|
+
.tabText {
|
|
16
|
+
max-width: inherit;
|
|
17
|
+
}
|
|
18
|
+
.tabText {
|
|
19
|
+
composes: dotted from '../../common/common.module.css';
|
|
20
|
+
}
|
|
21
|
+
.disabled {
|
|
22
|
+
cursor: not-allowed;
|
|
23
|
+
}
|
|
24
|
+
.border {
|
|
25
|
+
border-bottom: 1px solid var(--zdt_tab_default_border);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.alpha,
|
|
29
|
+
.beta,
|
|
30
|
+
.delta {
|
|
31
|
+
transition: all var(--zd_transition2);
|
|
32
|
+
}
|
|
33
|
+
.alpha {
|
|
34
|
+
font-size: 11px;
|
|
35
|
+
line-height: 3;
|
|
36
|
+
padding: 0 18px;
|
|
37
|
+
}
|
|
38
|
+
.tabAlpha {
|
|
39
|
+
composes: alpha;
|
|
40
|
+
color: var(--zdt_tab_alpha_text);
|
|
41
|
+
}
|
|
42
|
+
.alphaHover:hover {
|
|
43
|
+
color: var(--zdt_tab_alpha_hover_text);
|
|
44
|
+
background-color: var(--zdt_tab_alpha_hover_bg);
|
|
45
|
+
}
|
|
46
|
+
.alphaActive {
|
|
47
|
+
composes: alpha;
|
|
48
|
+
color: var(--zdt_tab_alpha_active_text);
|
|
49
|
+
}
|
|
50
|
+
.alphaActive_border, .betaActive_border {
|
|
51
|
+
border-color: var(--zdt_tab_alpha_active_border);
|
|
52
|
+
}
|
|
53
|
+
.deltaActive_border {
|
|
54
|
+
border-color: var(--zdt_tab_delta_active_border);
|
|
55
|
+
}
|
|
56
|
+
.beta {
|
|
57
|
+
font-size: 14px;
|
|
58
|
+
line-height: 4.2857;
|
|
59
|
+
text-transform: capitalize;
|
|
60
|
+
padding: 0 4px;
|
|
61
|
+
}
|
|
62
|
+
[dir=ltr] .beta {
|
|
63
|
+
margin-right: 40px;
|
|
64
|
+
}
|
|
65
|
+
[dir=rtl] .beta {
|
|
66
|
+
margin-left: 40px;
|
|
67
|
+
}
|
|
68
|
+
.tabBeta {
|
|
69
|
+
composes: beta;
|
|
70
|
+
color: var(--zdt_tab_alpha_text);
|
|
71
|
+
}
|
|
72
|
+
.betaHover:hover {
|
|
73
|
+
color: var(--zdt_tab_alpha_hover_text);
|
|
74
|
+
}
|
|
75
|
+
.betaActive {
|
|
76
|
+
composes: beta;
|
|
77
|
+
color: var(--zdt_tab_alpha_hover_text);
|
|
78
|
+
}
|
|
79
|
+
.delta {
|
|
80
|
+
font-size: 11px;
|
|
81
|
+
line-height: 3;
|
|
82
|
+
padding: 0 4px;
|
|
83
|
+
}
|
|
84
|
+
[dir=ltr] .delta {
|
|
85
|
+
margin-right: 10px;
|
|
86
|
+
}
|
|
87
|
+
[dir=rtl] .delta {
|
|
88
|
+
margin-left: 10px;
|
|
89
|
+
}
|
|
90
|
+
.tabDelta {
|
|
91
|
+
composes: delta;
|
|
92
|
+
color: var(--zdt_tab_alpha_text);
|
|
93
|
+
}
|
|
94
|
+
.deltaHover:hover {
|
|
95
|
+
color: var(--zdt_tab_alpha_active_text);
|
|
96
|
+
}
|
|
97
|
+
.deltaActive {
|
|
98
|
+
composes: delta;
|
|
99
|
+
color: var(--zdt_tab_alpha_active_text);
|
|
100
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
.tab {
|
|
2
|
+
position: relative;
|
|
3
|
+
z-index: 1;
|
|
4
|
+
--tab_position_gap: 22px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.alpha {
|
|
8
|
+
height: 35px;
|
|
9
|
+
background-color: var(--zdt_tabs_alpha_bg);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
[dir=ltr] .alpha_padding {
|
|
13
|
+
padding-left: 15px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
[dir=rtl] .alpha_padding {
|
|
17
|
+
padding-right: 15px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.alpha_border {
|
|
21
|
+
border-width: 0 0 1px 0;
|
|
22
|
+
border-color: var(--zdt_tabs_alpha_border);
|
|
23
|
+
border-style: solid;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.alpha::after {
|
|
27
|
+
content: '';
|
|
28
|
+
position: absolute;
|
|
29
|
+
z-index: -2;
|
|
30
|
+
width: 76%;
|
|
31
|
+
bottom: 0;
|
|
32
|
+
height: 10px;
|
|
33
|
+
border-radius: 100px / 5px;
|
|
34
|
+
box-shadow: var(--zd_bs_tabs_shadow);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[dir=ltr] .alpha::after {
|
|
38
|
+
left: 12%;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[dir=rtl] .alpha::after {
|
|
42
|
+
right: 12%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.alpha:before {
|
|
46
|
+
content: '';
|
|
47
|
+
position: absolute;
|
|
48
|
+
z-index: -1;
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 100%;
|
|
51
|
+
top: 0;
|
|
52
|
+
background: inherit;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[dir=ltr] .alpha:before {
|
|
56
|
+
left: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[dir=rtl] .alpha:before {
|
|
60
|
+
right: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.beta {
|
|
64
|
+
height: 61px;
|
|
65
|
+
background-color: var(--zdt_tabs_alpha_bg);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[dir=ltr] .beta_padding {
|
|
69
|
+
padding-left: 13px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[dir=rtl] .beta_padding {
|
|
73
|
+
padding-right: 13px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.beta_border {
|
|
77
|
+
border-bottom: 1px solid var(--zdt_tabs_alpha_border);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.delta {
|
|
81
|
+
height: 35px;
|
|
82
|
+
background-color: var(--zdt_tabs_alpha_bg);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[dir=ltr] .delta_padding {
|
|
86
|
+
padding-left: 10px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
[dir=rtl] .delta_padding {
|
|
90
|
+
padding-right: 10px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.delta_border {
|
|
94
|
+
border-bottom: 1px dotted var(--zdt_tabs_alpha_border);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.delta .highlight {
|
|
98
|
+
border-color: var(--zdt_tabs_delta_border);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.maxWidth {
|
|
102
|
+
max-width: 100%;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.highlight {
|
|
106
|
+
position: absolute;
|
|
107
|
+
bottom: 0;
|
|
108
|
+
border-bottom: 1px solid var(--zdt_tabs_highlight_border);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.lineAnimate {
|
|
112
|
+
transition: transform var(--zd_transition3) linear;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.menu {
|
|
116
|
+
position: relative;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.menuBox {
|
|
121
|
+
max-height: 220px;
|
|
122
|
+
}
|
|
123
|
+
.bottomRightToLeft,
|
|
124
|
+
.topRightToLeft,
|
|
125
|
+
.bottomCenterToLeft {
|
|
126
|
+
right: calc(var(--tab_position_gap) * -1);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.bottomLeftToRight,
|
|
130
|
+
.topLeftToRight,
|
|
131
|
+
.bottomCenterToRight {
|
|
132
|
+
left: calc(var(--tab_position_gap) * -1);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.hidden {
|
|
136
|
+
visibility: hidden;
|
|
137
|
+
}
|
package/es/v1/TextBox/TextBox.js
CHANGED
|
@@ -38,7 +38,8 @@ function TextBox(props) {
|
|
|
38
38
|
onFocus,
|
|
39
39
|
onBlur,
|
|
40
40
|
onChange,
|
|
41
|
-
inputRef
|
|
41
|
+
inputRef,
|
|
42
|
+
isScrollPrevent
|
|
42
43
|
} = props;
|
|
43
44
|
let {
|
|
44
45
|
ariaLabel,
|
|
@@ -94,6 +95,9 @@ function TextBox(props) {
|
|
|
94
95
|
} = e.target;
|
|
95
96
|
onChange && !isReadOnly && onChange(value, e);
|
|
96
97
|
};
|
|
98
|
+
const handlePreventTextBoxScroll = () => {
|
|
99
|
+
this.inputEle.scrollLeft = 0;
|
|
100
|
+
};
|
|
97
101
|
let classList = needAppearance ? `${style.container} ${style[size]} ${style[variant]} ${needBorder ? style.border : ''} ${isDisabled && !needEffect || isReadOnly && !needEffect ? '' : style.effect} ${isFocus ? style.focus : ''}` : `${style.basic}`;
|
|
98
102
|
value = value === null || value === undefined ? '' : value;
|
|
99
103
|
return /*#__PURE__*/React.createElement("input", _extends({
|
|
@@ -111,7 +115,7 @@ function TextBox(props) {
|
|
|
111
115
|
"aria-activedescendant": ariaActivedescendant,
|
|
112
116
|
"aria-readonly": ariaReadonly,
|
|
113
117
|
"aria-multiselectable": ariaMultiselectable,
|
|
114
|
-
className: `${isReadOnly && needReadOnlyStyle ? style.readonly : ''} ${isClickable ? style.pointer : ''} ${classList} ${style[`borderColor_${borderColor}`]} ${customClass ? customClass : ''}`,
|
|
118
|
+
className: `${isReadOnly && needReadOnlyStyle ? style.readonly : ''} ${isClickable ? style.pointer : ''} ${classList} ${style[`borderColor_${borderColor}`]} ${isScrollPrevent ? style.inputDotted : ''} ${customClass ? customClass : ''}`,
|
|
115
119
|
"data-id": `${dataId}`,
|
|
116
120
|
"data-test-id": `${dataId}`,
|
|
117
121
|
"data-selector-id": dataSelectorId,
|
|
@@ -128,6 +132,7 @@ function TextBox(props) {
|
|
|
128
132
|
ref: handleRef,
|
|
129
133
|
type: type,
|
|
130
134
|
value: value,
|
|
135
|
+
onScroll: isScrollPrevent ? handlePreventTextBoxScroll : '',
|
|
131
136
|
onKeyPress: onKeyPress,
|
|
132
137
|
onMouseDown: onMouseDown
|
|
133
138
|
}, options.current, customProps));
|
|
@@ -48,7 +48,8 @@ export default function TextBoxIcon(props) {
|
|
|
48
48
|
customProps,
|
|
49
49
|
inputRef,
|
|
50
50
|
onFocus,
|
|
51
|
-
onBlur
|
|
51
|
+
onBlur,
|
|
52
|
+
isScrollPrevent
|
|
52
53
|
} = props;
|
|
53
54
|
const {
|
|
54
55
|
customTBoxWrap = '',
|
|
@@ -117,6 +118,7 @@ export default function TextBoxIcon(props) {
|
|
|
117
118
|
onKeyPress: onKeyPress,
|
|
118
119
|
onMouseDown: onMouseDown,
|
|
119
120
|
needBorder: false,
|
|
121
|
+
isScrollPrevent: isScrollPrevent,
|
|
120
122
|
customClass: customTextBox,
|
|
121
123
|
customProps: TextBoxProps
|
|
122
124
|
}))), /*#__PURE__*/React.createElement(Box, {
|
package/es/v1/Tooltip/Tooltip.js
CHANGED
|
@@ -136,7 +136,9 @@ export default class Tooltip extends React.Component {
|
|
|
136
136
|
if (title !== '' && title) {
|
|
137
137
|
titleDiv.setAttribute('data-title', title);
|
|
138
138
|
titleDiv.removeAttribute('title');
|
|
139
|
-
|
|
139
|
+
let isInputElementType = element.type === 'text';
|
|
140
|
+
let elementText = isInputElementType ? element.value : element.innerText;
|
|
141
|
+
if (element.nodeName !== 'I' && elementText && elementText.trim() !== '') {
|
|
140
142
|
let isContentDotted = '';
|
|
141
143
|
if (element.scrollWidth !== 0) {
|
|
142
144
|
isContentDotted = element.offsetWidth < element.scrollWidth;
|
|
@@ -151,7 +153,7 @@ export default class Tooltip extends React.Component {
|
|
|
151
153
|
const scrollWidth = selectn('parentElement.scrollWidth', element) || 0;
|
|
152
154
|
isContentDotted = offWidth < scrollWidth;
|
|
153
155
|
}
|
|
154
|
-
let originText =
|
|
156
|
+
let originText = elementText.replace(/\s/g, '').toLowerCase();
|
|
155
157
|
let tooltipText = title.replace(/\s/g, '').toLowerCase();
|
|
156
158
|
let isDefaultTooltip = element.hasAttribute('data-istitle') || element.hasAttribute('istitle') ? element.getAttribute('data-istitle') || element.getAttribute('istitle') : 'false';
|
|
157
159
|
isDefaultTooltip = isDefaultTooltip === 'true';
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
height: var(--avatarteam_height);
|
|
32
32
|
outline-width: var(--avatarteam_outline_width);
|
|
33
33
|
outline-style: var(--avatarteam_outline_style);
|
|
34
|
+
/* css:theme-validation:ignore */
|
|
34
35
|
outline-color: var(--avatarteam_outline_color);
|
|
35
36
|
border-width: var(--avatarteam_border_width);
|
|
36
37
|
border-style: var(--avatarteam_border_style);
|
|
@@ -75,6 +76,7 @@
|
|
|
75
76
|
top: var(--avatarteam_bottom_top);
|
|
76
77
|
outline-width: var(--avatarteam_outline_width);
|
|
77
78
|
outline-style: var(--avatarteam_outline_style);
|
|
79
|
+
/* css:theme-validation:ignore */
|
|
78
80
|
outline-color: var( --avatarteam_outline_color);
|
|
79
81
|
}
|
|
80
82
|
.team:after, .team:before {
|
|
@@ -99,7 +99,8 @@ function DropBoxElement(props) {
|
|
|
99
99
|
"aria-multiselectable": ariaMultiselectable,
|
|
100
100
|
"aria-labelledby": ariaLabelledby,
|
|
101
101
|
tabIndex: tabIndex,
|
|
102
|
-
onAnimationEnd: isAnimate && FireOnAnimationEnd
|
|
102
|
+
onAnimationEnd: isAnimate && FireOnAnimationEnd,
|
|
103
|
+
"data-a11y-focus-main-area": true
|
|
103
104
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
104
105
|
tabIndex: "-1",
|
|
105
106
|
className: "".concat(subContainerClass, " ").concat(_DropBoxElementModule["default"]["".concat(palette, "Palette")]),
|
package/lib/Select/Select.js
CHANGED
|
@@ -28,6 +28,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
28
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
29
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
30
30
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
33
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
34
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
32
35
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
33
36
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -763,8 +766,11 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
763
766
|
htmlId: htmlId,
|
|
764
767
|
isFocus: isPopupReady,
|
|
765
768
|
autoComplete: autoComplete,
|
|
769
|
+
isScrollPrevent: true,
|
|
766
770
|
customProps: {
|
|
767
|
-
TextBoxProps:
|
|
771
|
+
TextBoxProps: _objectSpread({
|
|
772
|
+
'data-title': title || selected
|
|
773
|
+
}, TextBoxProps)
|
|
768
774
|
}
|
|
769
775
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
770
776
|
alignBox: "row",
|
|
@@ -812,7 +818,10 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
812
818
|
htmlId: htmlId,
|
|
813
819
|
autoComplete: autoComplete,
|
|
814
820
|
isFocus: isPopupReady,
|
|
815
|
-
|
|
821
|
+
isScrollPrevent: true,
|
|
822
|
+
customProps: _objectSpread({
|
|
823
|
+
'data-title': title || selected
|
|
824
|
+
}, TextBoxProps)
|
|
816
825
|
})), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
|
|
817
826
|
query: this.responsiveFunc,
|
|
818
827
|
responsiveId: "Helmet"
|
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
.input {
|
|
2
2
|
cursor: pointer;
|
|
3
3
|
}
|
|
4
|
+
|
|
4
5
|
.small {
|
|
5
6
|
max-height: 200px;
|
|
6
7
|
}
|
|
8
|
+
|
|
7
9
|
.medium {
|
|
8
10
|
max-height: 350px;
|
|
9
11
|
}
|
|
12
|
+
|
|
10
13
|
.large {
|
|
11
14
|
max-height: 400px;
|
|
12
15
|
}
|
|
16
|
+
|
|
13
17
|
.emptyState {
|
|
14
18
|
font-size: 14px;
|
|
15
19
|
color: var(--zdt_select_emptystate_text);
|
|
16
20
|
composes: semibold from '../common/common.module.css';
|
|
17
21
|
}
|
|
22
|
+
|
|
18
23
|
.box_small .emptyState {
|
|
19
24
|
padding: 12px 6px;
|
|
20
25
|
}
|
|
26
|
+
|
|
21
27
|
.box_medium .emptyState {
|
|
22
28
|
padding: 12px 15px;
|
|
23
29
|
}
|
|
30
|
+
|
|
24
31
|
.hide {
|
|
25
32
|
composes: vishidden from '../common/common.module.css';
|
|
26
33
|
}
|
|
34
|
+
|
|
27
35
|
.container {
|
|
28
36
|
position: relative;
|
|
29
37
|
}
|
|
@@ -32,35 +40,45 @@
|
|
|
32
40
|
height: 8px;
|
|
33
41
|
line-height: var(--zd_size8);
|
|
34
42
|
}
|
|
43
|
+
|
|
35
44
|
.small.search {
|
|
36
45
|
padding: 0 5px;
|
|
37
46
|
}
|
|
47
|
+
|
|
38
48
|
.medium.search {
|
|
39
49
|
padding: 3px 20px 0;
|
|
40
50
|
}
|
|
51
|
+
|
|
41
52
|
.title {
|
|
42
53
|
margin-bottom: 6px;
|
|
43
54
|
}
|
|
55
|
+
|
|
44
56
|
.groupTitle {
|
|
45
57
|
margin: 6px 0;
|
|
46
58
|
}
|
|
59
|
+
|
|
47
60
|
.listItemContainer {
|
|
48
61
|
padding: 10px 0;
|
|
49
62
|
}
|
|
63
|
+
|
|
50
64
|
.responsivelistItemContainer {
|
|
51
65
|
padding: 10px 0 0;
|
|
52
66
|
}
|
|
67
|
+
|
|
53
68
|
.readonly {
|
|
54
69
|
--textboxicon_icon_cursor: not-allowed;
|
|
55
70
|
}
|
|
71
|
+
|
|
56
72
|
.transparentContainer .arrowIcon {
|
|
57
73
|
opacity: 0;
|
|
58
74
|
visibility: hidden;
|
|
59
75
|
}
|
|
76
|
+
|
|
60
77
|
.transparentContainer:hover .arrowIcon {
|
|
61
78
|
opacity: 1;
|
|
62
79
|
visibility: visible;
|
|
63
80
|
}
|
|
81
|
+
|
|
64
82
|
.disable {
|
|
65
83
|
color: var(--zdt_select_disable_text);
|
|
66
84
|
}
|
|
@@ -79,9 +97,11 @@
|
|
|
79
97
|
[dir=rtl] .leftIcon {
|
|
80
98
|
right: 0;
|
|
81
99
|
}
|
|
100
|
+
|
|
82
101
|
[dir=ltr] .iconSelect {
|
|
83
102
|
padding-left: 30px;
|
|
84
103
|
}
|
|
104
|
+
|
|
85
105
|
[dir=rtl] .iconSelect {
|
|
86
106
|
padding-right: 30px;
|
|
87
107
|
}
|
|
@@ -89,22 +109,27 @@
|
|
|
89
109
|
.dropBoxList {
|
|
90
110
|
padding: 10px 0;
|
|
91
111
|
}
|
|
92
|
-
|
|
112
|
+
|
|
113
|
+
.responsivedropBoxList {
|
|
93
114
|
padding: 10px 0 0 0;
|
|
94
115
|
}
|
|
116
|
+
|
|
95
117
|
.rotate {
|
|
96
118
|
transform: rotateX(180deg);
|
|
97
119
|
}
|
|
120
|
+
|
|
98
121
|
.iconOnHoverStyle .arrowIcon,
|
|
99
122
|
.iconOnHoverReadonly .arrowIcon,
|
|
100
123
|
.iconOnHoverReadonly:hover .arrowIcon {
|
|
101
124
|
opacity: 0;
|
|
102
125
|
visibility: hidden;
|
|
103
126
|
}
|
|
127
|
+
|
|
104
128
|
.iconOnHoverStyle:hover .arrowIcon {
|
|
105
129
|
opacity: 1;
|
|
106
130
|
visibility: visible;
|
|
107
131
|
}
|
|
132
|
+
|
|
108
133
|
.loader {
|
|
109
134
|
padding: 10px;
|
|
110
135
|
}
|
|
@@ -9,6 +9,7 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
9
9
|
var _propTypes = require("./props/propTypes");
|
|
10
10
|
var _Layout = require("../Layout");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
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); }
|
|
12
13
|
/* eslint-disable react/forbid-component-props */
|
|
13
14
|
var TabContentWrapper = function TabContentWrapper(_ref) {
|
|
14
15
|
var style = _ref.style,
|
|
@@ -17,15 +18,18 @@ var TabContentWrapper = function TabContentWrapper(_ref) {
|
|
|
17
18
|
dataId = _ref.dataId,
|
|
18
19
|
selectedTab = _ref.selectedTab,
|
|
19
20
|
onScroll = _ref.onScroll,
|
|
20
|
-
dataSelectorId = _ref.dataSelectorId
|
|
21
|
-
|
|
21
|
+
dataSelectorId = _ref.dataSelectorId,
|
|
22
|
+
tagName = _ref.tagName,
|
|
23
|
+
a11y = _ref.a11y;
|
|
24
|
+
return /*#__PURE__*/_react["default"].createElement(_Layout.Box, _extends({
|
|
22
25
|
flexible: true,
|
|
23
26
|
style: style,
|
|
24
27
|
dataId: dataId,
|
|
25
28
|
className: className,
|
|
26
29
|
onScroll: onScroll,
|
|
27
|
-
dataSelectorId: dataSelectorId
|
|
28
|
-
|
|
30
|
+
dataSelectorId: dataSelectorId,
|
|
31
|
+
tagName: tagName
|
|
32
|
+
}, a11y), _react["default"].Children.map(children, function (child) {
|
|
29
33
|
return /*#__PURE__*/_react["default"].isValidElement(child) && child.props.id === selectedTab ? child : null;
|
|
30
34
|
}));
|
|
31
35
|
};
|
|
@@ -17,7 +17,8 @@ var TabContent_defaultProps = {
|
|
|
17
17
|
exports.TabContent_defaultProps = TabContent_defaultProps;
|
|
18
18
|
var TabContentWrapper_defaultProps = {
|
|
19
19
|
children: [],
|
|
20
|
-
dataSelectorId: 'tabContentWrapper'
|
|
20
|
+
dataSelectorId: 'tabContentWrapper',
|
|
21
|
+
a11y: {}
|
|
21
22
|
};
|
|
22
23
|
exports.TabContentWrapper_defaultProps = TabContentWrapper_defaultProps;
|
|
23
24
|
var Tabs_defaultProps = {
|
|
@@ -49,7 +49,9 @@ var TabContentWrapper_propTypes = {
|
|
|
49
49
|
onScroll: _propTypes["default"].func,
|
|
50
50
|
selectedTab: _propTypes["default"].string,
|
|
51
51
|
style: _propTypes["default"].object,
|
|
52
|
-
dataSelectorId: _propTypes["default"].string
|
|
52
|
+
dataSelectorId: _propTypes["default"].string,
|
|
53
|
+
a11y: _propTypes["default"].object,
|
|
54
|
+
tagName: _propTypes["default"].string
|
|
53
55
|
};
|
|
54
56
|
exports.TabContentWrapper_propTypes = TabContentWrapper_propTypes;
|
|
55
57
|
var Tabs_propTypes = {
|
package/lib/TextBox/TextBox.js
CHANGED
|
@@ -35,6 +35,7 @@ var TextBox = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
35
35
|
_this.setFocus = _this.setFocus.bind(_assertThisInitialized(_this));
|
|
36
36
|
_this.handleFocus = _this.handleFocus.bind(_assertThisInitialized(_this));
|
|
37
37
|
_this.handleBlur = _this.handleBlur.bind(_assertThisInitialized(_this));
|
|
38
|
+
_this.handlePreventTextBoxScroll = _this.handlePreventTextBoxScroll.bind(_assertThisInitialized(_this));
|
|
38
39
|
return _this;
|
|
39
40
|
}
|
|
40
41
|
_createClass(TextBox, [{
|
|
@@ -83,6 +84,11 @@ var TextBox = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
83
84
|
isReadOnly = _this$props3.isReadOnly;
|
|
84
85
|
onChange && !isReadOnly && onChange(value, e);
|
|
85
86
|
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "handlePreventTextBoxScroll",
|
|
89
|
+
value: function handlePreventTextBoxScroll() {
|
|
90
|
+
this.inputEle.scrollLeft = 0;
|
|
91
|
+
}
|
|
86
92
|
}, {
|
|
87
93
|
key: "render",
|
|
88
94
|
value: function render() {
|
|
@@ -115,6 +121,7 @@ var TextBox = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
115
121
|
a11y = _this$props4.a11y,
|
|
116
122
|
customClass = _this$props4.customClass,
|
|
117
123
|
isFocus = _this$props4.isFocus,
|
|
124
|
+
isScrollPrevent = _this$props4.isScrollPrevent,
|
|
118
125
|
customProps = _this$props4.customProps,
|
|
119
126
|
dataSelectorId = _this$props4.dataSelectorId;
|
|
120
127
|
var ariaLabel = a11y.ariaLabel,
|
|
@@ -161,7 +168,7 @@ var TextBox = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
161
168
|
"aria-activedescendant": ariaActivedescendant,
|
|
162
169
|
"aria-readonly": ariaReadonly,
|
|
163
170
|
"aria-multiselectable": ariaMultiselectable,
|
|
164
|
-
className: "".concat(isReadOnly && needReadOnlyStyle ? _TextBoxModule["default"].readonly : '', " ").concat(isClickable ? _TextBoxModule["default"].pointer : '', " ").concat(classList, " ").concat(_TextBoxModule["default"]["borderColor_".concat(borderColor)], " ").concat(customClass ? customClass : ''),
|
|
171
|
+
className: "".concat(isReadOnly && needReadOnlyStyle ? _TextBoxModule["default"].readonly : '', " ").concat(isClickable ? _TextBoxModule["default"].pointer : '', " ").concat(classList, " ").concat(_TextBoxModule["default"]["borderColor_".concat(borderColor)], " ").concat(isScrollPrevent ? _TextBoxModule["default"].inputDotted : '', " ").concat(customClass ? customClass : ''),
|
|
165
172
|
"data-id": "".concat(dataId),
|
|
166
173
|
"data-test-id": "".concat(dataId),
|
|
167
174
|
"data-selector-id": dataSelectorId,
|
|
@@ -178,6 +185,7 @@ var TextBox = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
178
185
|
ref: this.inputRef,
|
|
179
186
|
type: type,
|
|
180
187
|
value: value,
|
|
188
|
+
onScroll: isScrollPrevent ? this.handlePreventTextBoxScroll : '',
|
|
181
189
|
onKeyPress: onKeyPress,
|
|
182
190
|
onMouseDown: onMouseDown
|
|
183
191
|
}, options, customProps));
|