@zohodesk/components 1.2.29 → 1.2.31
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 +8 -0
- package/es/AppContainer/AppContainer.js +10 -9
- package/es/Avatar/Avatar.js +4 -5
- package/es/Avatar/Avatar.module.css +0 -12
- package/es/AvatarTeam/AvatarTeam.js +7 -7
- package/es/AvatarTeam/AvatarTeam.module.css +0 -4
- package/es/Button/Button.js +5 -6
- package/es/Button/css/Button.module.css +0 -6
- package/es/Buttongroup/Buttongroup.module.css +0 -2
- package/es/CheckBox/CheckBox.js +8 -8
- package/es/CheckBox/CheckBox.module.css +0 -2
- package/es/DateTime/DateTime.module.css +0 -1
- package/es/DropBox/DropBox.js +10 -11
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +0 -7
- package/es/DropBox/css/DropBox.module.css +0 -1
- package/es/DropDown/DropDown.js +2 -1
- package/es/DropDown/DropDownHeading.module.css +0 -6
- package/es/DropDown/DropDownItem.module.css +0 -3
- package/es/Label/Label.module.css +0 -1
- package/es/ListItem/ListContainer.js +6 -5
- package/es/ListItem/ListItem.js +4 -5
- package/es/ListItem/ListItem.module.css +0 -21
- package/es/ListItem/ListItemWithAvatar.js +4 -5
- package/es/ListItem/ListItemWithCheckBox.js +4 -5
- package/es/ListItem/ListItemWithIcon.js +4 -5
- package/es/ListItem/ListItemWithRadio.js +4 -5
- package/es/Modal/Modal.js +4 -5
- package/es/MultiSelect/AdvancedMultiSelect.js +8 -9
- package/es/MultiSelect/MultiSelectWithAvatar.js +4 -5
- package/es/MultiSelect/SelectedOptions.js +6 -8
- package/es/MultiSelect/Suggestions.js +6 -8
- package/es/MultiSelect/props/defaultProps.js +4 -2
- package/es/PopOver/PopOver.module.css +3 -3
- package/es/Popup/Popup.js +3 -4
- package/es/Radio/Radio.js +8 -8
- package/es/Radio/Radio.module.css +0 -1
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +2 -4
- package/es/Ribbon/Ribbon.module.css +0 -4
- package/es/Select/GroupSelect.js +11 -6
- package/es/Select/Select.js +4 -6
- package/es/Select/props/defaultProps.js +1 -0
- package/es/Switch/Switch.js +8 -8
- package/es/Switch/Switch.module.css +0 -2
- package/es/Tab/Tab.js +4 -5
- package/es/Tab/TabContentWrapper.js +4 -5
- package/es/Tab/TabWrapper.js +2 -4
- package/es/Tab/Tabs.js +16 -16
- package/es/Tag/Tag.module.css +0 -6
- package/es/TextBox/TextBox.js +5 -5
- package/es/TextBox/TextBox.module.css +1 -21
- package/es/TextBoxIcon/TextBoxIcon.js +2 -4
- package/es/TextBoxIcon/TextBoxIcon.module.css +0 -5
- package/es/Textarea/Textarea.js +4 -6
- package/es/Textarea/Textarea.module.css +0 -6
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
- package/es/common/customscroll.module.css +27 -3
- package/es/deprecated/PortalLayer/PortalLayer.js +8 -6
- package/es/v1/AppContainer/AppContainer.js +10 -9
- package/es/v1/Avatar/Avatar.js +4 -5
- package/es/v1/AvatarTeam/AvatarTeam.js +7 -7
- package/es/v1/Button/Button.js +5 -6
- package/es/v1/CheckBox/CheckBox.js +8 -8
- package/es/v1/DropBox/DropBox.js +10 -11
- package/es/v1/DropDown/DropDown.js +2 -1
- package/es/v1/ListItem/ListContainer.js +6 -5
- package/es/v1/ListItem/ListItem.js +4 -5
- package/es/v1/ListItem/ListItemWithAvatar.js +4 -5
- package/es/v1/ListItem/ListItemWithCheckBox.js +4 -5
- package/es/v1/ListItem/ListItemWithIcon.js +4 -5
- package/es/v1/ListItem/ListItemWithRadio.js +4 -5
- package/es/v1/Modal/Modal.js +4 -5
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +8 -9
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +4 -5
- package/es/v1/MultiSelect/SelectedOptions.js +6 -8
- package/es/v1/MultiSelect/Suggestions.js +6 -8
- package/es/v1/MultiSelect/props/defaultProps.js +4 -2
- package/es/v1/Popup/Popup.js +3 -4
- package/es/v1/Radio/Radio.js +8 -8
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +2 -4
- package/es/v1/Select/GroupSelect.js +11 -6
- package/es/v1/Select/Select.js +4 -6
- package/es/v1/Select/props/defaultProps.js +1 -0
- package/es/v1/Switch/Switch.js +8 -8
- package/es/v1/Tab/Tab.js +4 -5
- package/es/v1/Tab/TabContentWrapper.js +4 -5
- package/es/v1/Tab/TabWrapper.js +2 -4
- package/es/v1/Tab/Tabs.js +16 -16
- package/es/v1/TextBox/TextBox.js +5 -5
- package/es/v1/TextBoxIcon/TextBoxIcon.js +2 -4
- package/es/v1/Textarea/Textarea.js +4 -6
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
- package/lib/Avatar/Avatar.module.css +0 -12
- package/lib/AvatarTeam/AvatarTeam.module.css +0 -4
- package/lib/Button/css/Button.module.css +0 -6
- package/lib/Buttongroup/Buttongroup.module.css +0 -2
- package/lib/CheckBox/CheckBox.module.css +0 -2
- package/lib/DateTime/DateTime.module.css +0 -1
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +0 -7
- package/lib/DropBox/css/DropBox.module.css +0 -1
- package/lib/DropDown/DropDownHeading.module.css +0 -6
- package/lib/DropDown/DropDownItem.module.css +0 -3
- package/lib/Label/Label.module.css +0 -1
- package/lib/ListItem/ListItem.module.css +0 -21
- package/lib/MultiSelect/props/defaultProps.js +4 -2
- package/lib/PopOver/PopOver.module.css +3 -3
- package/lib/Radio/Radio.module.css +0 -1
- package/lib/Ribbon/Ribbon.module.css +0 -4
- package/lib/Select/GroupSelect.js +11 -6
- package/lib/Select/Select.js +0 -2
- package/lib/Select/props/defaultProps.js +1 -0
- package/lib/Switch/Switch.module.css +0 -2
- package/lib/Tag/Tag.module.css +0 -6
- package/lib/TextBox/TextBox.module.css +1 -21
- package/lib/TextBoxIcon/TextBoxIcon.module.css +0 -5
- package/lib/Textarea/Textarea.module.css +0 -6
- package/lib/common/customscroll.module.css +27 -3
- package/lib/v1/MultiSelect/props/defaultProps.js +4 -2
- package/lib/v1/Select/GroupSelect.js +11 -6
- package/lib/v1/Select/Select.js +0 -2
- package/lib/v1/Select/props/defaultProps.js +1 -0
- package/package.json +10 -10
- package/result.json +1 -1
package/es/Tab/Tabs.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/* eslint-disable react/forbid-component-props */
|
|
4
2
|
|
|
5
3
|
/* eslint css-modules/no-unused-class: [2, {
|
|
@@ -459,7 +457,7 @@ class Tabs extends React.Component {
|
|
|
459
457
|
classProps.className = itemClass;
|
|
460
458
|
}
|
|
461
459
|
|
|
462
|
-
return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(MainTab,
|
|
460
|
+
return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(MainTab, { ...child.props,
|
|
463
461
|
key: child.props.id,
|
|
464
462
|
getTabRef: this.getTabRef,
|
|
465
463
|
onSelect: onSelect,
|
|
@@ -470,22 +468,23 @@ class Tabs extends React.Component {
|
|
|
470
468
|
needBorder: needTabBorder,
|
|
471
469
|
needAppearance: needAppearance,
|
|
472
470
|
align: align,
|
|
473
|
-
isVirtual: isVirtual
|
|
474
|
-
|
|
471
|
+
isVirtual: isVirtual,
|
|
472
|
+
...classProps
|
|
473
|
+
});
|
|
475
474
|
}), React.Children.count(moreTabs) ? /*#__PURE__*/React.createElement(Box, {
|
|
476
475
|
className: `${tabsStyle.menu} `,
|
|
477
476
|
dataSelectorId: `${dataSelectorId}_moreIcon`
|
|
478
|
-
}, /*#__PURE__*/React.createElement(Container,
|
|
477
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
479
478
|
className: `${btnstyle.buttonReset} ${moreButtonClass} ${isPopupOpen ? moreButtonActiveClass : ''}`,
|
|
480
479
|
align: "both",
|
|
481
480
|
onClick: this.togglePopup,
|
|
482
481
|
dataId: "moreTabs",
|
|
483
|
-
eleRef: getTargetRef
|
|
484
|
-
|
|
482
|
+
eleRef: getTargetRef,
|
|
483
|
+
...MoreButtonProps,
|
|
485
484
|
"aria-label": "MoreTabs",
|
|
486
485
|
role: "link",
|
|
487
486
|
tagName: "button"
|
|
488
|
-
}
|
|
487
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
489
488
|
name: iconName,
|
|
490
489
|
size: iconSize
|
|
491
490
|
})), isPopupOpen && /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
@@ -495,7 +494,7 @@ class Tabs extends React.Component {
|
|
|
495
494
|
let {
|
|
496
495
|
tabletMode
|
|
497
496
|
} = _ref2;
|
|
498
|
-
return /*#__PURE__*/React.createElement(ResponsiveDropBox,
|
|
497
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
499
498
|
isActive: isPopupReady,
|
|
500
499
|
isAnimate: true,
|
|
501
500
|
size: "medium",
|
|
@@ -505,12 +504,12 @@ class Tabs extends React.Component {
|
|
|
505
504
|
boxPosition: position,
|
|
506
505
|
getRef: getContainerRef,
|
|
507
506
|
isBoxPaddingNeed: true,
|
|
508
|
-
isArrow: false
|
|
509
|
-
|
|
507
|
+
isArrow: false,
|
|
508
|
+
...DropBoxProps,
|
|
510
509
|
isResponsivePadding: true,
|
|
511
510
|
needFocusScope: true,
|
|
512
511
|
onClose: this.togglePopup
|
|
513
|
-
}
|
|
512
|
+
}, getCustomDropBoxHeaderPlaceHolder && getCustomDropBoxHeaderPlaceHolder(this.props), /*#__PURE__*/React.createElement(Box, {
|
|
514
513
|
flexible: true,
|
|
515
514
|
shrink: true,
|
|
516
515
|
scroll: "vertical",
|
|
@@ -531,7 +530,7 @@ class Tabs extends React.Component {
|
|
|
531
530
|
dataId
|
|
532
531
|
} = child.props;
|
|
533
532
|
const value = text ? text : showTitleInMoreOptions ? title : null;
|
|
534
|
-
return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(ListItem,
|
|
533
|
+
return /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.createElement(ListItem, {
|
|
535
534
|
key: id,
|
|
536
535
|
value: value,
|
|
537
536
|
onClick: this.moreTabSelect,
|
|
@@ -544,8 +543,9 @@ class Tabs extends React.Component {
|
|
|
544
543
|
customListItem: menuItemClass
|
|
545
544
|
},
|
|
546
545
|
target: "self",
|
|
547
|
-
dataId: `${dataId}_Tab
|
|
548
|
-
|
|
546
|
+
dataId: `${dataId}_Tab`,
|
|
547
|
+
...ListItemProps
|
|
548
|
+
}, !showTitleInMoreOptions ? children : null);
|
|
549
549
|
})));
|
|
550
550
|
})) : null);
|
|
551
551
|
}
|
package/es/Tag/Tag.module.css
CHANGED
|
@@ -34,13 +34,10 @@
|
|
|
34
34
|
composes: dInflex alignVertical flexrow from '../common/common.module.css';
|
|
35
35
|
position: relative;
|
|
36
36
|
vertical-align: middle;
|
|
37
|
-
/* css:theme-validation:ignore */
|
|
38
37
|
color: var(--tag_text_color);
|
|
39
|
-
/* css:theme-validation:ignore */
|
|
40
38
|
font-size: var(--tag_font_size);
|
|
41
39
|
letter-spacing: var(--tag_letter_spacing);
|
|
42
40
|
height: var(--tag_height);
|
|
43
|
-
/* css:theme-validation:ignore */
|
|
44
41
|
max-width: 100% ;
|
|
45
42
|
background-color: var(--tag_bg_color);
|
|
46
43
|
border-radius: var(--tag_border_radius);
|
|
@@ -125,13 +122,11 @@
|
|
|
125
122
|
display: block;
|
|
126
123
|
}
|
|
127
124
|
.close {
|
|
128
|
-
/* css:theme-validation:ignore */
|
|
129
125
|
color: var(--tag_closeicon_color);
|
|
130
126
|
display: none;
|
|
131
127
|
position: absolute;
|
|
132
128
|
top: 0 ;
|
|
133
129
|
bottom: 0 ;
|
|
134
|
-
/* css:theme-validation:ignore */
|
|
135
130
|
padding: var(--tag_closeicon_padding);
|
|
136
131
|
cursor: var(--tag_closeicon_cursor);
|
|
137
132
|
border-radius: var(--tag_closeicon_border_radius);
|
|
@@ -229,7 +224,6 @@
|
|
|
229
224
|
}
|
|
230
225
|
|
|
231
226
|
.icon {
|
|
232
|
-
/* css:theme-validation:ignore */
|
|
233
227
|
margin: var(--tag_icon_margin);
|
|
234
228
|
background-color: var(--tag_icon_bg_color);
|
|
235
229
|
}
|
package/es/TextBox/TextBox.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes } from './props/propTypes';
|
|
@@ -139,7 +137,7 @@ export default class TextBox extends React.PureComponent {
|
|
|
139
137
|
|
|
140
138
|
let classList = needAppearance ? `${style.container} ${style[size]} ${style[variant]} ${needBorder ? style.border : ''} ${isDisabled && !needEffect || isReadOnly && !needEffect ? '' : style.effect} ${isFocus ? style.focus : ''}` : `${style.basic}`;
|
|
141
139
|
value = value === null || value === undefined ? '' : value;
|
|
142
|
-
return /*#__PURE__*/React.createElement("input",
|
|
140
|
+
return /*#__PURE__*/React.createElement("input", {
|
|
143
141
|
"aria-label": ariaLabel,
|
|
144
142
|
"aria-invalid": ariaInvalid,
|
|
145
143
|
"aria-autocomplete": ariaAutocomplete,
|
|
@@ -173,8 +171,10 @@ export default class TextBox extends React.PureComponent {
|
|
|
173
171
|
value: value,
|
|
174
172
|
onScroll: isScrollPrevent ? this.handlePreventTextBoxScroll : '',
|
|
175
173
|
onKeyPress: onKeyPress,
|
|
176
|
-
onMouseDown: onMouseDown
|
|
177
|
-
|
|
174
|
+
onMouseDown: onMouseDown,
|
|
175
|
+
...options,
|
|
176
|
+
...customProps
|
|
177
|
+
});
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
}
|
|
@@ -32,36 +32,30 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.basic::placeholder {
|
|
35
|
-
/* css:theme-validation:ignore */
|
|
36
35
|
color: var(--textbox_placeholder_text_color);
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
.basic::-webkit-placeholder {
|
|
40
|
-
/* css:theme-validation:ignore */
|
|
41
39
|
color: var(--textbox_placeholder_text_color);
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
.basic::-moz-placeholder {
|
|
45
|
-
/* css:theme-validation:ignore */
|
|
46
43
|
color: var(--textbox_placeholder_text_color);
|
|
47
44
|
}
|
|
48
45
|
|
|
49
46
|
.basic::-ms-placeholder {
|
|
50
|
-
/* css:theme-validation:ignore */
|
|
51
47
|
color: var(--textbox_placeholder_text_color);
|
|
52
48
|
}
|
|
49
|
+
|
|
53
50
|
/* css:lineheight-validation:ignore */
|
|
54
51
|
.container {
|
|
55
52
|
composes: basic;
|
|
56
|
-
/* css:theme-validation:ignore */
|
|
57
53
|
transition: border var(--zd_transition2) linear 0s;
|
|
58
54
|
-moz-transition: border var(--zd_transition2) linear 0s;
|
|
59
55
|
width: var(--textbox_width);
|
|
60
|
-
/* css:theme-validation:ignore */
|
|
61
56
|
color: var(--textbox_text_color);
|
|
62
57
|
font-size: var(--textbox_font_size);
|
|
63
58
|
height: var(--textbox_height);
|
|
64
|
-
/* css:theme-validation:ignore */
|
|
65
59
|
line-height: var(--textbox_line_height);
|
|
66
60
|
background-color: var(--textbox_bg_color);
|
|
67
61
|
-webkit-transition: border var(--zd_transition2) linear 0s;
|
|
@@ -85,22 +79,18 @@
|
|
|
85
79
|
}
|
|
86
80
|
|
|
87
81
|
.container::placeholder {
|
|
88
|
-
/* css:theme-validation:ignore */
|
|
89
82
|
color: var(--textbox_placeholder_text_color);
|
|
90
83
|
}
|
|
91
84
|
|
|
92
85
|
.container::-webkit-placeholder {
|
|
93
|
-
/* css:theme-validation:ignore */
|
|
94
86
|
color: var(--textbox_placeholder_text_color);
|
|
95
87
|
}
|
|
96
88
|
|
|
97
89
|
.container::-moz-placeholder {
|
|
98
|
-
/* css:theme-validation:ignore */
|
|
99
90
|
color: var(--textbox_placeholder_text_color);
|
|
100
91
|
}
|
|
101
92
|
|
|
102
93
|
.container::-ms-placeholder {
|
|
103
|
-
/* css:theme-validation:ignore */
|
|
104
94
|
color: var(--textbox_placeholder_text_color);
|
|
105
95
|
}
|
|
106
96
|
|
|
@@ -114,11 +104,6 @@
|
|
|
114
104
|
border-style: var(--textbox_border_style);
|
|
115
105
|
}
|
|
116
106
|
|
|
117
|
-
.effect:hover,
|
|
118
|
-
.effect:focus {
|
|
119
|
-
/* css:theme-validation:ignore */
|
|
120
|
-
}
|
|
121
|
-
|
|
122
107
|
.effect:hover, .effect:focus {
|
|
123
108
|
border-color: var(--textbox_border_color);
|
|
124
109
|
}
|
|
@@ -127,11 +112,6 @@
|
|
|
127
112
|
--textbox_border_width: 0 0 1px 0;
|
|
128
113
|
}
|
|
129
114
|
|
|
130
|
-
.borderColor_transparent,
|
|
131
|
-
.borderColor_default {
|
|
132
|
-
/* css:theme-validation:ignore */
|
|
133
|
-
}
|
|
134
|
-
|
|
135
115
|
.borderColor_transparent, .borderColor_default {
|
|
136
116
|
border-color: var(--textbox_border_color);
|
|
137
117
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes } from './props/propTypes';
|
|
@@ -127,7 +125,7 @@ export default class TextBoxIcon extends React.Component {
|
|
|
127
125
|
"data-title": isDisabled ? title : null
|
|
128
126
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
129
127
|
flexible: true
|
|
130
|
-
}, /*#__PURE__*/React.createElement(TextBox,
|
|
128
|
+
}, /*#__PURE__*/React.createElement(TextBox, { ...this.props,
|
|
131
129
|
dataId: dataId,
|
|
132
130
|
size: size,
|
|
133
131
|
variant: variant,
|
|
@@ -155,7 +153,7 @@ export default class TextBoxIcon extends React.Component {
|
|
|
155
153
|
isScrollPrevent: isScrollPrevent,
|
|
156
154
|
customClass: customTextBox,
|
|
157
155
|
customProps: TextBoxProps
|
|
158
|
-
}))
|
|
156
|
+
})), /*#__PURE__*/React.createElement(Box, {
|
|
159
157
|
className: `${style.iconContainer} ${customTBoxIcon}`
|
|
160
158
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
161
159
|
alignBox: "row"
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
cursor: var(--textboxicon_icon_cursor);
|
|
25
25
|
}
|
|
26
26
|
.iconContainer {
|
|
27
|
-
/* css:theme-validation:ignore */
|
|
28
27
|
color: var(--textboxicon_icon_color);
|
|
29
28
|
}
|
|
30
29
|
.effect:hover .iconContainer,
|
|
@@ -51,10 +50,6 @@
|
|
|
51
50
|
right: 0 ;
|
|
52
51
|
left: 0 ;
|
|
53
52
|
}
|
|
54
|
-
.line,
|
|
55
|
-
.borderColor_default {
|
|
56
|
-
/* css:theme-validation:ignore */
|
|
57
|
-
}
|
|
58
53
|
.line, .borderColor_default {
|
|
59
54
|
background-color: var(--textboxicon_line_color);
|
|
60
55
|
}
|
package/es/Textarea/Textarea.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes } from './props/propTypes';
|
|
@@ -87,12 +85,12 @@ export default class Textarea extends React.Component {
|
|
|
87
85
|
}
|
|
88
86
|
|
|
89
87
|
let classList = needAppearance ? `${style.container} ${style[size]} ${style[variant]} ${needBorder ? style.needBorder : style.noBorder} ${resize ? style[resizes[resize]] : style[resizes.none]} ${animated ? `${style[`${size}animated`]}` : ''} ${isDisabled && !needEffect || isReadOnly && !needEffect ? '' : style.effect}` : `${style.basic}`;
|
|
90
|
-
return /*#__PURE__*/React.createElement("textarea",
|
|
88
|
+
return /*#__PURE__*/React.createElement("textarea", {
|
|
91
89
|
"aria-label": ariaLabel,
|
|
92
90
|
"aria-labelledby": ariaLabelledby,
|
|
93
91
|
className: `${customClass} ${isReadOnly && needReadOnlyStyle ? style.readonly : ''} ${classList} ${style[`borderColor_${borderColor}`]}`,
|
|
94
|
-
placeholder: placeHolder
|
|
95
|
-
|
|
92
|
+
placeholder: placeHolder,
|
|
93
|
+
...options,
|
|
96
94
|
"data-id": dataId,
|
|
97
95
|
"data-test-id": dataId,
|
|
98
96
|
maxLength: maxLength,
|
|
@@ -104,7 +102,7 @@ export default class Textarea extends React.Component {
|
|
|
104
102
|
value: text,
|
|
105
103
|
id: htmlId,
|
|
106
104
|
"data-selector-id": dataSelectorId
|
|
107
|
-
})
|
|
105
|
+
});
|
|
108
106
|
}
|
|
109
107
|
|
|
110
108
|
}
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
appearance: none;
|
|
20
20
|
outline: 0;
|
|
21
21
|
letter-spacing: 0.1px;
|
|
22
|
-
/* css:theme-validation:ignore */
|
|
23
22
|
color: var(--textarea_text_color);
|
|
24
23
|
cursor: var(--textarea_cursor);
|
|
25
24
|
}
|
|
@@ -27,19 +26,15 @@
|
|
|
27
26
|
border-width: var(--textarea_border_width);
|
|
28
27
|
}
|
|
29
28
|
.basic::placeholder {
|
|
30
|
-
/* css:theme-validation:ignore */
|
|
31
29
|
color: var(--textarea_placeholder_text_color);
|
|
32
30
|
}
|
|
33
31
|
.basic::-webkit-placeholder {
|
|
34
|
-
/* css:theme-validation:ignore */
|
|
35
32
|
color: var(--textarea_placeholder_text_color);
|
|
36
33
|
}
|
|
37
34
|
.basic::-moz-placeholder {
|
|
38
|
-
/* css:theme-validation:ignore */
|
|
39
35
|
color: var(--textarea_placeholder_text_color);
|
|
40
36
|
}
|
|
41
37
|
.basic::-ms-placeholder {
|
|
42
|
-
/* css:theme-validation:ignore */
|
|
43
38
|
color: var(--textarea_placeholder_text_color);
|
|
44
39
|
}
|
|
45
40
|
.basic:disabled {
|
|
@@ -73,7 +68,6 @@
|
|
|
73
68
|
min-width: var(--zd_size100) ;
|
|
74
69
|
font-size: var(--textarea_font_size);
|
|
75
70
|
line-height: var(--textarea_line_height);
|
|
76
|
-
/* css:theme-validation:ignore */
|
|
77
71
|
height: var(--textarea_height);
|
|
78
72
|
-webkit-transition: border var(--zd_transition2) linear 0s,
|
|
79
73
|
height var(--zd_transition2) linear 0s;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes } from './props/propTypes';
|
|
@@ -86,14 +84,15 @@ export default class VelocityAnimationGroup extends React.Component {
|
|
|
86
84
|
delay: exitDelay ? exitDelay : 0,
|
|
87
85
|
display: 'none'
|
|
88
86
|
};
|
|
89
|
-
return /*#__PURE__*/React.createElement(VelocityTransitionGroup,
|
|
87
|
+
return /*#__PURE__*/React.createElement(VelocityTransitionGroup, {
|
|
90
88
|
enter: enterAnimation,
|
|
91
89
|
leave: exitAnimation,
|
|
92
90
|
component: component && component,
|
|
93
91
|
runOnMount: runOnMount,
|
|
94
92
|
enterHideStyle: enterHideStyle,
|
|
95
|
-
enterShowStyle: enterShowStyle
|
|
96
|
-
|
|
93
|
+
enterShowStyle: enterShowStyle,
|
|
94
|
+
...childProps
|
|
95
|
+
}, isActive ? children : null);
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
--zd-scroll-thump-hoverbg: var(--zdt_customscroll_thump_hover_bg);
|
|
10
10
|
--zd-scroll-border: var(--zdt_customscroll_border);
|
|
11
11
|
}
|
|
12
|
+
|
|
12
13
|
.scroll[data-scroll-palette='dark'],
|
|
13
14
|
.scroll [data-scroll-palette='dark'] {
|
|
14
15
|
--zd-scroll-bg: var(--zdt_customscroll_dark_bg);
|
|
@@ -16,92 +17,114 @@
|
|
|
16
17
|
--zd-scroll-thump-hoverbg: var(--zdt_customscroll_thump_dark_hover_bg);
|
|
17
18
|
--zd-scroll-border: var(--zdt_customscroll_dark_border);
|
|
18
19
|
}
|
|
20
|
+
|
|
19
21
|
.scroll,
|
|
20
22
|
.scroll * {
|
|
23
|
+
/* css:theme-validation:ignore */
|
|
21
24
|
scrollbar-color: var(--zd-scroll-thump) var(--zd-scroll-bg);
|
|
22
25
|
scrollbar-width: thin;
|
|
26
|
+
/* css:theme-validation:ignore */
|
|
23
27
|
-ms-scrollbar-highlight-color: var(--zd-scroll-bg);
|
|
28
|
+
/* css:theme-validation:ignore */
|
|
24
29
|
-ms-scrollbar-face-color: var(--zd-scroll-thump);
|
|
25
30
|
}
|
|
31
|
+
|
|
26
32
|
.scroll::-webkit-scrollbar,
|
|
27
33
|
.scroll ::-webkit-scrollbar {
|
|
28
34
|
/* css:theme-validation:ignore */
|
|
29
35
|
}
|
|
36
|
+
|
|
30
37
|
.scroll::-webkit-scrollbar, .scroll ::-webkit-scrollbar {
|
|
31
38
|
background: var(--zd-scroll-corner-bg);
|
|
32
39
|
}
|
|
40
|
+
|
|
33
41
|
.scroll::-webkit-scrollbar:hover,
|
|
34
42
|
.scroll ::-webkit-scrollbar:hover {
|
|
35
43
|
/* css:theme-validation:ignore */
|
|
36
44
|
}
|
|
45
|
+
|
|
37
46
|
.scroll::-webkit-scrollbar:hover, .scroll ::-webkit-scrollbar:hover {
|
|
38
47
|
background: var(--zd-scroll-bg);
|
|
39
48
|
}
|
|
49
|
+
|
|
40
50
|
.scroll::-webkit-scrollbar:horizontal,
|
|
41
51
|
.scroll ::-webkit-scrollbar:horizontal {
|
|
42
52
|
height: var(--zd-scroll-height);
|
|
43
53
|
}
|
|
54
|
+
|
|
44
55
|
.scroll::-webkit-scrollbar:vertical,
|
|
45
56
|
.scroll ::-webkit-scrollbar:vertical {
|
|
46
57
|
width: var(--zd-scroll-width);
|
|
47
58
|
}
|
|
59
|
+
|
|
48
60
|
.scroll::-webkit-scrollbar-button,
|
|
49
61
|
.scroll ::-webkit-scrollbar-button {
|
|
50
62
|
display: none;
|
|
51
63
|
width: 0 ;
|
|
52
64
|
height: 0 ;
|
|
53
65
|
}
|
|
66
|
+
|
|
54
67
|
[dir=ltr] .scroll::-webkit-scrollbar-track:vertical, [dir=ltr] .scroll ::-webkit-scrollbar-track:vertical {
|
|
55
68
|
border-left: 1px solid transparent;
|
|
56
69
|
border-right: 1px solid transparent;
|
|
57
70
|
}
|
|
71
|
+
|
|
58
72
|
[dir=rtl] .scroll::-webkit-scrollbar-track:vertical, [dir=rtl] .scroll ::-webkit-scrollbar-track:vertical {
|
|
59
73
|
border-right: 1px solid transparent;
|
|
60
74
|
border-left: 1px solid transparent;
|
|
61
75
|
}
|
|
76
|
+
|
|
62
77
|
.scroll::-webkit-scrollbar-track:vertical:hover,
|
|
63
78
|
.scroll ::-webkit-scrollbar-track:vertical:hover {
|
|
64
79
|
/* css:theme-validation:ignore */
|
|
65
80
|
}
|
|
81
|
+
|
|
66
82
|
.scroll::-webkit-scrollbar-track:vertical:hover, .scroll ::-webkit-scrollbar-track:vertical:hover {
|
|
67
83
|
border-color: var(--zd-scroll-border);
|
|
68
84
|
}
|
|
85
|
+
|
|
69
86
|
.scroll::-webkit-scrollbar-track:horizontal, .scroll ::-webkit-scrollbar-track:horizontal {
|
|
70
87
|
border-top: 1px solid transparent;
|
|
71
88
|
border-bottom: 1px solid transparent;
|
|
72
89
|
}
|
|
90
|
+
|
|
73
91
|
.scroll::-webkit-scrollbar-track:horizontal:hover,
|
|
74
92
|
.scroll ::-webkit-scrollbar-track:horizontal:hover {
|
|
75
93
|
/* css:theme-validation:ignore */
|
|
76
94
|
}
|
|
95
|
+
|
|
77
96
|
.scroll::-webkit-scrollbar-track:horizontal:hover, .scroll ::-webkit-scrollbar-track:horizontal:hover {
|
|
78
97
|
border-color: var(--zd-scroll-border);
|
|
79
98
|
}
|
|
99
|
+
|
|
80
100
|
.scroll::-webkit-scrollbar-track-piece, .scroll ::-webkit-scrollbar-track-piece {
|
|
81
101
|
background: inherit;
|
|
82
102
|
}
|
|
103
|
+
|
|
83
104
|
.scroll::-webkit-scrollbar-thumb,
|
|
84
105
|
.scroll ::-webkit-scrollbar-thumb {
|
|
85
|
-
/* css:theme-validation:ignore */
|
|
86
106
|
/* css:theme-validation:ignore */
|
|
87
107
|
/* display: none; */
|
|
88
108
|
}
|
|
109
|
+
|
|
89
110
|
.scroll::-webkit-scrollbar-thumb, .scroll ::-webkit-scrollbar-thumb {
|
|
90
111
|
border-radius: 10px;
|
|
91
112
|
background: var(--zd-scroll-thump);
|
|
92
113
|
background-clip: padding-box;
|
|
93
114
|
border: 3px solid transparent;
|
|
94
115
|
}
|
|
116
|
+
|
|
95
117
|
.scroll::-webkit-scrollbar-thumb:hover,
|
|
96
118
|
.scroll ::-webkit-scrollbar-thumb:hover {
|
|
97
119
|
/* css:theme-validation:ignore */
|
|
98
|
-
/* css:theme-validation:ignore */
|
|
99
120
|
}
|
|
121
|
+
|
|
100
122
|
.scroll::-webkit-scrollbar-thumb:hover, .scroll ::-webkit-scrollbar-thumb:hover {
|
|
101
123
|
background: var(--zd-scroll-thump-hoverbg);
|
|
102
124
|
background-clip: padding-box;
|
|
103
125
|
border: 3px solid transparent;
|
|
104
126
|
}
|
|
127
|
+
|
|
105
128
|
/* .scroll:hover > ::-webkit-scrollbar-thumb,
|
|
106
129
|
.scroll *:hover > ::-webkit-scrollbar-thumb {
|
|
107
130
|
display: block;
|
|
@@ -113,6 +136,7 @@
|
|
|
113
136
|
.scroll::-webkit-scrollbar-corner, .scroll ::-webkit-scrollbar-corner {
|
|
114
137
|
background: var(--zd-scroll-corner-bg);
|
|
115
138
|
}
|
|
139
|
+
|
|
116
140
|
.scroll::-webkit-resizer, .scroll ::-webkit-resizer {
|
|
117
141
|
background: inherit;
|
|
118
|
-
}
|
|
142
|
+
}
|
|
@@ -11,12 +11,14 @@ let RefElement = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
11
11
|
isChildrenRestrictionNeeded = true,
|
|
12
12
|
isActive
|
|
13
13
|
} = props;
|
|
14
|
-
return isChildrenRestrictionNeeded ? isActive ? renderChildren ? renderChildren(ref) : /*#__PURE__*/React.createElement(Element, Object.assign({}, elementProps, {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
return isChildrenRestrictionNeeded ? isActive ? renderChildren ? renderChildren(ref) : /*#__PURE__*/React.createElement(Element, { ...Object.assign({}, elementProps, {
|
|
15
|
+
forwardRef: ref
|
|
16
|
+
})
|
|
17
|
+
}) : null : renderChildren ? renderChildren(ref, isActive) : /*#__PURE__*/React.createElement(Element, { ...Object.assign({}, elementProps, {
|
|
18
|
+
isActive,
|
|
19
|
+
forwardRef: ref
|
|
20
|
+
})
|
|
21
|
+
});
|
|
20
22
|
});
|
|
21
23
|
RefElement.propTypes = RefElement_propTypes;
|
|
22
24
|
export { RefElement };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import React, { useEffect, useRef, useLayoutEffect } from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes } from './props/propTypes';
|
|
@@ -93,23 +91,26 @@ export default function AppContainer(props) {
|
|
|
93
91
|
}
|
|
94
92
|
};
|
|
95
93
|
}, []);
|
|
96
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container,
|
|
94
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, {
|
|
97
95
|
className: `${style.container} ${className}`,
|
|
98
96
|
dataId: dataId,
|
|
99
97
|
dataSelectorId: dataSelectorId,
|
|
100
98
|
tagName: tagName,
|
|
101
|
-
eleRef: getContainerRef
|
|
102
|
-
|
|
99
|
+
eleRef: getContainerRef,
|
|
100
|
+
...ContainerProps,
|
|
101
|
+
...ExtraProps
|
|
102
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
103
103
|
flexible: true
|
|
104
|
-
}, children)), needTooltip ? /*#__PURE__*/React.createElement("div",
|
|
104
|
+
}, children)), needTooltip ? /*#__PURE__*/React.createElement("div", { ...ExtraProps,
|
|
105
105
|
className: `${style.container} ${style.tooltip} ${tooltipParentClass}`,
|
|
106
106
|
"data-id": `${dataId}_tooltip`,
|
|
107
107
|
"data-test-id": `${dataId}_tooltip`,
|
|
108
108
|
"data-selector-id": `${dataSelectorId}_tooltip`
|
|
109
|
-
}
|
|
109
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
110
110
|
ref: setTooltipRef,
|
|
111
|
-
customClass: tooltipClass
|
|
112
|
-
|
|
111
|
+
customClass: tooltipClass,
|
|
112
|
+
...TooltipProps
|
|
113
|
+
})) : null);
|
|
113
114
|
}
|
|
114
115
|
AppContainer.propTypes = propTypes;
|
|
115
116
|
AppContainer.defaultProps = defaultProps; // if (__DOCS__) {
|
package/es/v1/Avatar/Avatar.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import React, { useState } from 'react';
|
|
4
2
|
import { useEffectCallOnlyAfterState } from '@zohodesk/hooks';
|
|
5
3
|
import { defaultProps } from './props/defaultProps';
|
|
@@ -105,15 +103,16 @@ function Avatar(props) {
|
|
|
105
103
|
let showDefaultBorder = src && !isInvalidImageList && needDefaultBorder;
|
|
106
104
|
let borderStyle = (showDefaultBorder || !src || !showAvatar || showInitial) && needBorder ? `${style.border} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ` : '';
|
|
107
105
|
borderStyle = showAlternateAvatar ? '' : borderStyle;
|
|
108
|
-
return /*#__PURE__*/React.createElement("div",
|
|
106
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
109
107
|
className: `${style.avatar} ${style[size]} ${AvatarSize(size)} ${style[shapeStyle]} ${style[palette]} ${textStyle} ${borderStyle} ${customClass ? customClass : ''}`,
|
|
110
108
|
"data-title": needTitle ? title ? title : name : null,
|
|
111
109
|
"data-id": dataId,
|
|
112
110
|
"data-test-id": dataId,
|
|
113
111
|
onClick: onClick,
|
|
114
112
|
"data-selector-id": dataSelectorId,
|
|
115
|
-
tabIndex: onClick ? 0 : null
|
|
116
|
-
|
|
113
|
+
tabIndex: onClick ? 0 : null,
|
|
114
|
+
...AvatarProps
|
|
115
|
+
}, showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
|
|
117
116
|
className: `${style.initial}`,
|
|
118
117
|
"data-id": `${dataId}_AvatarInitial`,
|
|
119
118
|
"data-test-id": `${dataId}_AvatarInitial`,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes } from './props/propTypes';
|
|
@@ -41,12 +39,13 @@ export default function AvatarTeam(props) {
|
|
|
41
39
|
customAvatarTeam = ''
|
|
42
40
|
} = customClass;
|
|
43
41
|
const border = borderOnHover || onClick;
|
|
44
|
-
return /*#__PURE__*/React.createElement("span",
|
|
42
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
45
43
|
className: `${style.container} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} `,
|
|
46
44
|
"data-id": dataId,
|
|
47
45
|
"data-test-id": dataId,
|
|
48
|
-
"data-selector-id": dataSelectorId
|
|
49
|
-
|
|
46
|
+
"data-selector-id": dataSelectorId,
|
|
47
|
+
...AvatarTeamProps
|
|
48
|
+
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
50
49
|
name: name,
|
|
51
50
|
onClick: onClick,
|
|
52
51
|
palette: palette,
|
|
@@ -60,8 +59,9 @@ export default function AvatarTeam(props) {
|
|
|
60
59
|
borderOnHover: border,
|
|
61
60
|
needInnerBorder: needInnerBorder,
|
|
62
61
|
needBorder: needBorder,
|
|
63
|
-
needDefaultBorder: needDefaultBorder
|
|
64
|
-
|
|
62
|
+
needDefaultBorder: needDefaultBorder,
|
|
63
|
+
...AvatarProps
|
|
64
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
65
65
|
className: `${style.team} ${isFilled ? `${style[`${palette}Filled`]}` : style.nofill}
|
|
66
66
|
${style[`${size}team`]} ${customAvatarTeam}`
|
|
67
67
|
}));
|
package/es/v1/Button/Button.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import React from 'react';
|
|
4
2
|
import { defaultProps } from './props/defaultProps';
|
|
5
3
|
import { propTypes } from './props/propTypes';
|
|
@@ -39,7 +37,7 @@ export default function Button(props) {
|
|
|
39
37
|
style: finalStyle
|
|
40
38
|
});
|
|
41
39
|
let statusLower = status.toLowerCase();
|
|
42
|
-
return /*#__PURE__*/React.createElement("button",
|
|
40
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
43
41
|
className: buttonClass,
|
|
44
42
|
"data-id": disabled ? `${dataId}_disabled` : dataId,
|
|
45
43
|
"data-test-id": disabled ? `${dataId}_disabled` : dataId,
|
|
@@ -48,10 +46,11 @@ export default function Button(props) {
|
|
|
48
46
|
"data-title": title,
|
|
49
47
|
type: "button",
|
|
50
48
|
ref: getRef,
|
|
51
|
-
"data-selector-id": dataSelectorId
|
|
52
|
-
|
|
49
|
+
"data-selector-id": dataSelectorId,
|
|
50
|
+
...customProps,
|
|
51
|
+
...a11y,
|
|
53
52
|
id: id
|
|
54
|
-
}
|
|
53
|
+
}, children ? children : text, statusLower !== 'none' && needAppearance && /*#__PURE__*/React.createElement("div", {
|
|
55
54
|
className: finalStyle.overlay
|
|
56
55
|
}, /*#__PURE__*/React.createElement("div", {
|
|
57
56
|
className: loaderParentClass
|