@zohodesk/components 1.0.0-alpha-259 → 1.0.0-alpha-261
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 +21 -5
- package/es/DateTime/DateTimePopupHeader.js +1 -1
- package/es/DateTime/DateWidget.js +3 -4
- package/es/DateTime/YearView.js +1 -1
- package/es/DateTime/index.js +1 -1
- package/es/DropDown/index.js +7 -0
- package/es/Layout/index.js +9 -9
- package/es/ListItem/ListItem.js +1 -1
- package/es/ListItem/ListItemWithAvatar.js +1 -1
- package/es/ListItem/ListItemWithIcon.js +1 -1
- package/es/ListItem/index.js +6 -0
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +1 -1
- package/es/MultiSelect/AdvancedMultiSelect.js +1 -1
- package/es/MultiSelect/MultiSelect.js +1 -1
- package/es/MultiSelect/MultiSelectWithAvatar.js +1 -1
- package/es/MultiSelect/Suggestions.js +4 -2
- package/es/MultiSelect/index.js +4 -0
- package/es/PopOver/index.js +3 -0
- package/es/Popup/Popup.js +2 -2
- package/es/Provider/IdProvider.js +8 -7
- package/es/Provider/index.js +4 -0
- package/es/Responsive/index.js +11 -8
- package/es/Select/GroupSelect.js +1 -1
- package/es/Select/Select.js +1 -1
- package/es/Select/SelectWithIcon.js +1 -1
- package/es/Select/index.js +4 -0
- package/es/Tab/Tab.module.css +0 -1
- package/es/Tab/Tabs.js +1 -1
- package/es/Tab/Tabs.module.css +0 -1
- package/es/Tag/Tag.js +1 -1
- package/es/TextBoxIcon/TextBoxIcon.js +21 -4
- package/es/VelocityAnimation/index.js +2 -0
- package/es/index.js +30 -146
- package/es/semantic/index.js +1 -0
- package/es/utils/Common.js +17 -2
- package/es/utils/css/compileClassNames.js +23 -0
- package/es/utils/css/mergeStyle.js +42 -0
- package/es/utils/css/utils.js +23 -0
- package/es/utils/index.js +3 -0
- package/lib/Accordion/Accordion.js +3 -1
- package/lib/Accordion/AccordionItem.js +3 -1
- package/lib/Animation/Animation.js +3 -1
- package/lib/AppContainer/AppContainer.js +3 -1
- package/lib/Avatar/Avatar.js +4 -2
- package/lib/AvatarTeam/AvatarTeam.js +3 -1
- package/lib/Button/Button.js +3 -1
- package/lib/Buttongroup/Buttongroup.js +5 -2
- package/lib/Card/Card.js +3 -1
- package/lib/CheckBox/CheckBox.js +3 -1
- package/lib/DateTime/CalendarView.js +5 -2
- package/lib/DateTime/DateTime.js +5 -3
- package/lib/DateTime/DateTimePopupFooter.js +3 -1
- package/lib/DateTime/DateTimePopupHeader.js +7 -5
- package/lib/DateTime/DateWidget.js +6 -6
- package/lib/DateTime/DaysRow.js +3 -1
- package/lib/DateTime/Time.js +3 -1
- package/lib/DateTime/YearView.js +5 -3
- package/lib/DateTime/dateFormatUtils/timeChange.js +2 -2
- package/lib/DateTime/index.js +1 -1
- package/lib/DateTime/validator.js +4 -4
- package/lib/DropBox/DropBox.js +3 -1
- package/lib/DropDown/DropDown.js +5 -2
- package/lib/DropDown/DropDownHeading.js +3 -1
- package/lib/DropDown/DropDownItem.js +3 -1
- package/lib/DropDown/DropDownSearch.js +5 -2
- package/lib/DropDown/DropDownSeparator.js +3 -1
- package/lib/DropDown/index.js +56 -0
- package/lib/DropDown/props/propTypes.js +4 -1
- package/lib/Heading/Heading.js +4 -2
- package/lib/Label/Label.js +3 -1
- package/lib/Layout/index.js +1 -11
- package/lib/ListItem/ListItem.js +5 -3
- package/lib/ListItem/ListItemWithAvatar.js +5 -3
- package/lib/ListItem/ListItemWithCheckBox.js +3 -1
- package/lib/ListItem/ListItemWithIcon.js +6 -4
- package/lib/ListItem/ListItemWithRadio.js +3 -1
- package/lib/ListItem/index.js +48 -0
- package/lib/ListItem/props/propTypes.js +4 -1
- package/lib/Modal/Modal.js +3 -1
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +8 -6
- package/lib/MultiSelect/AdvancedMultiSelect.js +6 -4
- package/lib/MultiSelect/EmptyState.js +3 -1
- package/lib/MultiSelect/MultiSelect.js +7 -5
- package/lib/MultiSelect/MultiSelectHeader.js +3 -1
- package/lib/MultiSelect/MultiSelectWithAvatar.js +5 -3
- package/lib/MultiSelect/SelectedOptions.js +5 -2
- package/lib/MultiSelect/Suggestions.js +9 -5
- package/lib/MultiSelect/index.js +34 -0
- package/lib/PopOver/PopOver.js +3 -1
- package/lib/PopOver/index.js +27 -0
- package/lib/Popup/Popup.js +5 -3
- package/lib/Popup/__tests__/Popup.spec.js +3 -1
- package/lib/Provider/IdProvider.js +8 -8
- package/lib/Provider/LibraryContext.js +5 -3
- package/lib/Provider/NumberGenerator/NumberGenerator.js +1 -1
- package/lib/Provider/index.js +76 -0
- package/lib/Radio/Radio.js +3 -1
- package/lib/Responsive/CustomResponsive.js +6 -4
- package/lib/Responsive/RefWrapper.js +4 -2
- package/lib/Responsive/ResizeComponent.js +9 -4
- package/lib/Responsive/ResizeObserver.js +4 -1
- package/lib/Responsive/Responsive.js +6 -4
- package/lib/Responsive/index.js +45 -22
- package/lib/Responsive/sizeObservers.js +4 -2
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +3 -1
- package/lib/Ribbon/Ribbon.js +3 -1
- package/lib/Select/GroupSelect.js +7 -5
- package/lib/Select/Select.js +5 -3
- package/lib/Select/SelectWithAvatar.js +3 -1
- package/lib/Select/SelectWithIcon.js +6 -4
- package/lib/Select/__tests__/Select.spec.js +2 -2
- package/lib/Select/index.js +34 -0
- package/lib/Select/props/defaultProps.js +4 -1
- package/lib/Stencils/Stencils.js +3 -1
- package/lib/Switch/Switch.js +3 -1
- package/lib/Tab/Tab.module.css +0 -1
- package/lib/Tab/TabWrapper.js +2 -2
- package/lib/Tab/Tabs.js +6 -4
- package/lib/Tab/Tabs.module.css +0 -1
- package/lib/Tag/Tag.js +6 -4
- package/lib/TextBox/TextBox.js +3 -1
- package/lib/TextBox/props/propTypes.js +4 -1
- package/lib/TextBoxIcon/TextBoxIcon.js +27 -7
- package/lib/Textarea/Textarea.js +3 -1
- package/lib/Tooltip/Tooltip.js +3 -1
- package/lib/Tooltip/__tests__/Tooltip.spec.js +3 -1
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -1
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -2
- package/lib/VelocityAnimation/index.js +20 -0
- package/lib/deprecated/PortalLayer/PortalLayer.js +3 -1
- package/lib/index.js +157 -210
- package/lib/semantic/Button/Button.js +3 -1
- package/lib/semantic/index.js +13 -0
- package/lib/utils/Common.js +18 -2
- package/lib/utils/constructFullName.js +2 -2
- package/lib/utils/css/compileClassNames.js +31 -0
- package/lib/utils/css/mergeStyle.js +52 -0
- package/lib/utils/css/utils.js +33 -0
- package/lib/utils/dropDownUtils.js +5 -3
- package/lib/utils/index.js +117 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -32,21 +32,37 @@ In this Package, we Provide Some Basic Components to Build Web App
|
|
|
32
32
|
- TextBoxIcon
|
|
33
33
|
- Tooltip
|
|
34
34
|
|
|
35
|
-
# 1.0.0-alpha-
|
|
35
|
+
# 1.0.0-alpha-261
|
|
36
|
+
|
|
37
|
+
- **Tab,Tabs** - Removed offsection property from css.
|
|
38
|
+
- compileClassNames , mergeStyle utils added
|
|
39
|
+
- index export object fixed
|
|
40
|
+
|
|
41
|
+
# 1.0.0-alpha-260
|
|
42
|
+
|
|
43
|
+
- **TextBoxIcon** - OnClear Focus in TextBox issue Resolved.
|
|
36
44
|
|
|
37
|
-
-
|
|
45
|
+
- Suggestions - `listItemCustomProps` prop support given for all suggestion to control all listitems.
|
|
46
|
+
|
|
47
|
+
- `isTextSelected` - common method added in utils to know any text highlighted or not.
|
|
48
|
+
|
|
49
|
+
- **Popup** - Issue fix: While click on the document, popup won't close if any text highlighted in the product.
|
|
50
|
+
|
|
51
|
+
# 1.0.0-alpha-259
|
|
38
52
|
|
|
53
|
+
- **Avatar**
|
|
54
|
+
|
|
39
55
|
`needInnerBorder` and `needDefaultBorder` prop has been added.
|
|
40
56
|
|
|
41
|
-
`xxsmall` option added for
|
|
57
|
+
`xxsmall` option added for size prop.
|
|
42
58
|
|
|
43
59
|
- **AvatarTeam** - `needInnerBorder`, `needBorder` and `needDefaultBorder` props has been added.
|
|
44
60
|
|
|
45
61
|
# 1.0.0-alpha-258
|
|
46
62
|
|
|
47
|
-
- **CheckBox** - dataSlector prop changed to dataSelectorId
|
|
63
|
+
- **CheckBox** - dataSlector prop changed to `dataSelectorId`.
|
|
48
64
|
|
|
49
|
-
- dataSelectorId prop added for all components
|
|
65
|
+
- `dataSelectorId` prop added for all components
|
|
50
66
|
|
|
51
67
|
# 1.0.0-alpha-257
|
|
52
68
|
|
|
@@ -5,7 +5,7 @@ import React, { PureComponent } from 'react';
|
|
|
5
5
|
|
|
6
6
|
/** ** Components *** */
|
|
7
7
|
import { Container, Box } from '../Layout';
|
|
8
|
-
import Icon from '@zohodesk/icons
|
|
8
|
+
import { Icon } from '@zohodesk/icons';
|
|
9
9
|
import Heading from '../Heading/Heading';
|
|
10
10
|
|
|
11
11
|
/** ** CSS *** */
|
|
@@ -7,7 +7,7 @@ import datetime from '@zohodesk/datetimejs';
|
|
|
7
7
|
/**** Components ****/
|
|
8
8
|
import DateTime from './DateTime';
|
|
9
9
|
import Popup from '../Popup/Popup';
|
|
10
|
-
import Icon from '@zohodesk/icons
|
|
10
|
+
import { Icon } from '@zohodesk/icons';
|
|
11
11
|
import { Container } from '../Layout';
|
|
12
12
|
import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
|
|
13
13
|
|
|
@@ -829,10 +829,9 @@ class DateWidgetComponent extends React.Component {
|
|
|
829
829
|
isError: false
|
|
830
830
|
});
|
|
831
831
|
value && onSelect && onSelect('', id);
|
|
832
|
-
this.valueInput && this.valueInput.focus({
|
|
833
|
-
preventScroll: true
|
|
834
|
-
});
|
|
832
|
+
// this.valueInput && this.valueInput.focus({ preventScroll: true });
|
|
835
833
|
}
|
|
834
|
+
|
|
836
835
|
handleDateTimeClear(e) {
|
|
837
836
|
this.handleDateClear();
|
|
838
837
|
const {
|
package/es/DateTime/YearView.js
CHANGED
|
@@ -6,7 +6,7 @@ import { YearView_defaultProps } from './props/defaultProps';
|
|
|
6
6
|
/**** Components ****/
|
|
7
7
|
import { Virtualizer } from '@zohodesk/virtualizer';
|
|
8
8
|
import { Container, Box } from '../Layout';
|
|
9
|
-
import Icon from '@zohodesk/icons
|
|
9
|
+
import { Icon } from '@zohodesk/icons';
|
|
10
10
|
import Heading from '../Heading/Heading';
|
|
11
11
|
/**** CSS ****/
|
|
12
12
|
import style from './YearView.module.css';
|
package/es/DateTime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as DateWidget } from './DateWidget
|
|
1
|
+
export { default as DateWidget } from './DateWidget';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as DropDown } from './DropDown';
|
|
2
|
+
export { DropDownTarget } from './DropDown';
|
|
3
|
+
export { DropDownItemContainer } from './DropDown';
|
|
4
|
+
export { default as DropDownHeading } from './DropDownHeading';
|
|
5
|
+
export { default as DropDownItem } from './DropDownItem';
|
|
6
|
+
export { default as DropDownSearch } from './DropDownSearch';
|
|
7
|
+
export { default as DropDownSeparator } from './DropDownSeparator';
|
package/es/Layout/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { default as Container } from './Container';
|
|
2
2
|
export { default as Box } from './Box';
|
|
3
|
-
let Layout = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
export { Layout };
|
|
3
|
+
// let Layout = {
|
|
4
|
+
// docs: {
|
|
5
|
+
// componentGroup: 'Layout',
|
|
6
|
+
// folderName: 'Style Guide',
|
|
7
|
+
// external: true,
|
|
8
|
+
// description: ' '
|
|
9
|
+
// }
|
|
10
|
+
// };
|
|
11
|
+
// export { Layout };
|
package/es/ListItem/ListItem.js
CHANGED
|
@@ -6,7 +6,7 @@ import ListContainer from './ListContainer';
|
|
|
6
6
|
import { ListItemDefaultProps } from './props/defaultProps';
|
|
7
7
|
import { ListItem_Props } from './props/propTypes';
|
|
8
8
|
/**** Components ****/
|
|
9
|
-
import Icon from '@zohodesk/icons
|
|
9
|
+
import { Icon } from '@zohodesk/icons';
|
|
10
10
|
/**** CSS ****/
|
|
11
11
|
import style from './ListItem.module.css';
|
|
12
12
|
export default class ListItem extends React.Component {
|
|
@@ -9,7 +9,7 @@ import { ListItemWithAvatar_Props } from './props/propTypes';
|
|
|
9
9
|
/**** Components ****/
|
|
10
10
|
import Avatar from '../Avatar/Avatar';
|
|
11
11
|
import AvatarTeam from '../AvatarTeam/AvatarTeam';
|
|
12
|
-
import Icon from '@zohodesk/icons
|
|
12
|
+
import { Icon } from '@zohodesk/icons';
|
|
13
13
|
/**** CSS ****/
|
|
14
14
|
import style from './ListItem.module.css';
|
|
15
15
|
export default class ListItemWithAvatar extends React.PureComponent {
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
/**** Libraries ****/
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Box } from '../Layout';
|
|
5
|
-
import Icon from '@zohodesk/icons
|
|
5
|
+
import { Icon } from '@zohodesk/icons';
|
|
6
6
|
import ListContainer from './ListContainer';
|
|
7
7
|
import { ListItemWithIconDefaultProps } from './props/defaultProps';
|
|
8
8
|
import { ListItemWithIcon_Props } from './props/propTypes';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as ListContainer } from './ListContainer';
|
|
2
|
+
export { default as ListItem } from './ListItem';
|
|
3
|
+
export { default as ListItemWithAvatar } from './ListItemWithAvatar';
|
|
4
|
+
export { default as ListItemWithCheckBox } from './ListItemWithCheckBox';
|
|
5
|
+
export { default as ListItemWithIcon } from './ListItemWithIcon';
|
|
6
|
+
export { default as ListItemWithRadio } from './ListItemWithRadio';
|
|
@@ -17,7 +17,7 @@ import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
|
17
17
|
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
18
18
|
|
|
19
19
|
/**** Icons ****/
|
|
20
|
-
import Icon from '@zohodesk/icons
|
|
20
|
+
import { Icon } from '@zohodesk/icons';
|
|
21
21
|
/**** CSS ****/
|
|
22
22
|
import style from './MultiSelect.module.css';
|
|
23
23
|
|
|
@@ -14,7 +14,7 @@ import Popup from '../Popup/Popup';
|
|
|
14
14
|
import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
|
|
15
15
|
import { Container, Box } from '../Layout';
|
|
16
16
|
import Card, { CardContent, CardHeader, CardFooter } from '../Card/Card';
|
|
17
|
-
import Icon from '@zohodesk/icons
|
|
17
|
+
import { Icon } from '@zohodesk/icons';
|
|
18
18
|
import { getUniqueId } from '../Provider/IdProvider';
|
|
19
19
|
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
20
20
|
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
@@ -18,7 +18,7 @@ import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
|
18
18
|
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
19
19
|
import Loader from '@zohodesk/svg/lib/Loader/Loader';
|
|
20
20
|
/**** Icons ****/
|
|
21
|
-
import Icon from '@zohodesk/icons
|
|
21
|
+
import { Icon } from '@zohodesk/icons';
|
|
22
22
|
/**** CSS ****/
|
|
23
23
|
import style from './MultiSelect.module.css';
|
|
24
24
|
|
|
@@ -20,7 +20,7 @@ import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
|
20
20
|
import Loader from '@zohodesk/svg/lib/Loader/Loader';
|
|
21
21
|
|
|
22
22
|
/**** Icons ****/
|
|
23
|
-
import Icon from '@zohodesk/icons
|
|
23
|
+
import { Icon } from '@zohodesk/icons';
|
|
24
24
|
/**** CSS ****/
|
|
25
25
|
import style from './MultiSelect.module.css';
|
|
26
26
|
|
|
@@ -52,7 +52,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
52
52
|
optionType,
|
|
53
53
|
iconSize,
|
|
54
54
|
isDisabled,
|
|
55
|
-
listItemProps
|
|
55
|
+
listItemProps,
|
|
56
|
+
listItemCustomProps = {}
|
|
56
57
|
} = suggestion;
|
|
57
58
|
const isActive = activeId === id || selectedOptions.indexOf(id) >= 0;
|
|
58
59
|
const isHighlight = hoverOption === index || id === hoverId ? true : false;
|
|
@@ -61,7 +62,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
61
62
|
ariaLabel: value
|
|
62
63
|
});
|
|
63
64
|
const commonProps = {
|
|
64
|
-
isDisabled
|
|
65
|
+
isDisabled,
|
|
66
|
+
...listItemCustomProps
|
|
65
67
|
};
|
|
66
68
|
if (listItemProps) {
|
|
67
69
|
commonProps.customProps = {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as MultiSelect } from './MultiSelect';
|
|
2
|
+
export { default as MultiSelectWithAvatar } from './MultiSelectWithAvatar';
|
|
3
|
+
export { default as AdvancedMultiSelect } from './AdvancedMultiSelect';
|
|
4
|
+
export { default as AdvancedGroupMultiSelect } from './AdvancedGroupMultiSelect';
|
package/es/Popup/Popup.js
CHANGED
|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import hoistStatics from 'hoist-non-react-statics';
|
|
6
6
|
|
|
7
7
|
/**** Methods ****/
|
|
8
|
-
import { debounce, isDescendant } from '../utils/Common.js';
|
|
8
|
+
import { debounce, isDescendant, isTextSelected } from '../utils/Common.js';
|
|
9
9
|
import viewPort from './viewPort';
|
|
10
10
|
import { absolutePositionMapping, rtlAbsolutePositionMapping, rtlFixedPositionMapping } from './PositionMapping.json';
|
|
11
11
|
import ResizeObserver from '@zohodesk/virtualizer/lib/commons/ResizeObserver.js';
|
|
@@ -352,7 +352,7 @@ const Popup = function (Component) {
|
|
|
352
352
|
Object.keys(popups).forEach(groupName => {
|
|
353
353
|
const groupPopups = popups[groupName] || [];
|
|
354
354
|
groupPopups.forEach(popup => {
|
|
355
|
-
popup.state.isPopupOpen && (!popup.props.checkBeforeClose || popup.props.checkBeforeClose && popup.props.checkBeforeClose()) && popup.setState({
|
|
355
|
+
popup.state.isPopupOpen && (!popup.props.checkBeforeClose || popup.props.checkBeforeClose && popup.props.checkBeforeClose()) && !isTextSelected() && popup.setState({
|
|
356
356
|
isPopupOpen: false,
|
|
357
357
|
isPopupReady: false
|
|
358
358
|
});
|
|
@@ -51,10 +51,11 @@ export function getUniqueId(Component, prefix) {
|
|
|
51
51
|
callback
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
54
|
+
|
|
55
|
+
// let Provider = {
|
|
56
|
+
// docs: {
|
|
57
|
+
// componentGroup: 'Provider',
|
|
58
|
+
// folderName: 'Functions'
|
|
59
|
+
// }
|
|
60
|
+
// };
|
|
61
|
+
// export { Provider };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { getLibraryConfig, setLibraryConfig } from './Config';
|
|
2
|
+
export { default as LibraryContextProvider } from './LibraryContext';
|
|
3
|
+
export { removeGlobalZIndexPrefix, setInitialZIndex, useZIndex, getZIndex } from './ZindexProvider';
|
|
4
|
+
export { setGlobalIdPrefix, removeGlobalIdPrefix, useUniqueId, getUniqueId } from './IdProvider';
|
package/es/Responsive/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
export { ResponsiveSender as CustomResponsiveSender, ResponsiveReceiver as CustomResponsiveReceiver, useResponsiveReceiver as useCustomResponsiveReceiver } from './CustomResponsive';
|
|
2
|
+
export { ResponsiveSender, ResponsiveReceiver, useResponsiveReceiver } from './Responsive';
|
|
3
|
+
export { default as ResizeComponent } from './ResizeComponent';
|
|
4
|
+
|
|
5
|
+
// let Responsive = {
|
|
6
|
+
// docs: {
|
|
7
|
+
// componentGroup: 'Layout',
|
|
8
|
+
// folderName: 'Style Guide'
|
|
9
|
+
// }
|
|
10
|
+
// };
|
|
11
|
+
// export { Responsive };
|
package/es/Select/GroupSelect.js
CHANGED
|
@@ -10,7 +10,7 @@ import Textbox from '../TextBox/TextBox';
|
|
|
10
10
|
import Card, { CardHeader, CardContent, CardFooter } from '../Card/Card';
|
|
11
11
|
import Suggestions from '../MultiSelect/Suggestions';
|
|
12
12
|
import EmptyState from '../MultiSelect/EmptyState';
|
|
13
|
-
import Icon from '@zohodesk/icons
|
|
13
|
+
import { Icon } from '@zohodesk/icons';
|
|
14
14
|
import Loader from '@zohodesk/svg/lib/Loader/Loader';
|
|
15
15
|
import DropDownHeading from '../DropDown/DropDownHeading';
|
|
16
16
|
import { Container, Box } from '../Layout';
|
package/es/Select/Select.js
CHANGED
|
@@ -12,7 +12,7 @@ import Card, { CardHeader, CardContent, CardFooter } from '../Card/Card';
|
|
|
12
12
|
import Suggestions from '../MultiSelect/Suggestions';
|
|
13
13
|
import EmptyState from '../MultiSelect/EmptyState';
|
|
14
14
|
import { getUniqueId } from '../Provider/IdProvider';
|
|
15
|
-
import Icon from '@zohodesk/icons
|
|
15
|
+
import { Icon } from '@zohodesk/icons';
|
|
16
16
|
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
17
17
|
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
18
18
|
import Loader from '@zohodesk/svg/lib/Loader/Loader';
|
|
@@ -4,7 +4,7 @@ import { SelectWithIcon_propTypes } from './props/propTypes';
|
|
|
4
4
|
/**** Components ****/
|
|
5
5
|
import Popup from '../Popup/Popup';
|
|
6
6
|
import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
|
|
7
|
-
import Icon from '@zohodesk/icons
|
|
7
|
+
import { Icon } from '@zohodesk/icons';
|
|
8
8
|
import ListItemWithIcon from '../ListItem/ListItemWithIcon';
|
|
9
9
|
import Card, { CardHeader, CardContent } from '../Card/Card';
|
|
10
10
|
import EmptyState from '../MultiSelect/EmptyState';
|
package/es/Tab/Tab.module.css
CHANGED
package/es/Tab/Tabs.js
CHANGED
|
@@ -15,7 +15,7 @@ import { remConvert, getTotalDimension, cs, bind, throttle } from '../utils/Comm
|
|
|
15
15
|
import { Box, Container } from '../Layout';
|
|
16
16
|
import ResizeObserver from '../Responsive/ResizeObserver';
|
|
17
17
|
import ListItem from '../ListItem/ListItem';
|
|
18
|
-
import Icon from '@zohodesk/icons
|
|
18
|
+
import { Icon } from '@zohodesk/icons';
|
|
19
19
|
import tabsStyle from './Tabs.module.css';
|
|
20
20
|
import Popup from '../Popup/Popup';
|
|
21
21
|
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
package/es/Tab/Tabs.module.css
CHANGED
package/es/Tag/Tag.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import { defaultProps } from './props/defaultProps';
|
|
3
3
|
import { propTypes } from './props/propTypes';
|
|
4
|
-
import Icon from '@zohodesk/icons
|
|
4
|
+
import { Icon } from '@zohodesk/icons';
|
|
5
5
|
import Avatar from '../Avatar/Avatar';
|
|
6
6
|
import { Container } from '../Layout';
|
|
7
7
|
import Button from '../semantic/Button/Button';
|
|
@@ -4,7 +4,7 @@ import { defaultProps } from './props/defaultProps';
|
|
|
4
4
|
import { propTypes } from './props/propTypes';
|
|
5
5
|
import TextBox from '../TextBox/TextBox';
|
|
6
6
|
import { Container, Box } from '../Layout';
|
|
7
|
-
import Icon from '@zohodesk/icons
|
|
7
|
+
import { Icon } from '@zohodesk/icons';
|
|
8
8
|
import btnStyle from '../semantic/Button/semanticButton.module.css';
|
|
9
9
|
import style from './TextBoxIcon.module.css';
|
|
10
10
|
/* eslint-disable react/forbid-component-props */
|
|
@@ -17,6 +17,24 @@ export default class TextBoxIcon extends React.Component {
|
|
|
17
17
|
};
|
|
18
18
|
this.handleFocus = this.handleFocus.bind(this);
|
|
19
19
|
this.handleBlur = this.handleBlur.bind(this);
|
|
20
|
+
this.handleRef = this.handleRef.bind(this);
|
|
21
|
+
this.handleClear = this.handleClear.bind(this);
|
|
22
|
+
}
|
|
23
|
+
handleRef(ele) {
|
|
24
|
+
let {
|
|
25
|
+
inputRef
|
|
26
|
+
} = this.props;
|
|
27
|
+
this.inputEle = ele;
|
|
28
|
+
inputRef && inputRef(ele);
|
|
29
|
+
}
|
|
30
|
+
handleClear() {
|
|
31
|
+
let {
|
|
32
|
+
onClear
|
|
33
|
+
} = this.props;
|
|
34
|
+
onClear && onClear();
|
|
35
|
+
this.inputEle && this.inputEle.focus({
|
|
36
|
+
preventScroll: true
|
|
37
|
+
});
|
|
20
38
|
}
|
|
21
39
|
handleFocus(e) {
|
|
22
40
|
const {
|
|
@@ -49,7 +67,6 @@ export default class TextBoxIcon extends React.Component {
|
|
|
49
67
|
placeHolder,
|
|
50
68
|
size,
|
|
51
69
|
onKeyUp,
|
|
52
|
-
inputRef,
|
|
53
70
|
isReadOnly,
|
|
54
71
|
isDisabled,
|
|
55
72
|
children,
|
|
@@ -121,7 +138,7 @@ export default class TextBoxIcon extends React.Component {
|
|
|
121
138
|
onClick: onClick,
|
|
122
139
|
isReadOnly: isReadOnly,
|
|
123
140
|
isDisabled: isDisabled,
|
|
124
|
-
inputRef:
|
|
141
|
+
inputRef: this.handleRef,
|
|
125
142
|
needReadOnlyStyle: needReadOnlyStyle,
|
|
126
143
|
isClickable: isClickable,
|
|
127
144
|
onKeyPress: onKeyPress,
|
|
@@ -135,7 +152,7 @@ export default class TextBoxIcon extends React.Component {
|
|
|
135
152
|
alignBox: "row"
|
|
136
153
|
}, value && onClear && value.length > 1 && !isDisabled && !isReadOnly || showClearIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
137
154
|
className: `${btnStyle.buttonReset} ${style.icon}`,
|
|
138
|
-
onClick:
|
|
155
|
+
onClick: this.handleClear,
|
|
139
156
|
dataId: `${dataId}_ClearIcon`,
|
|
140
157
|
"data-title": clearText,
|
|
141
158
|
tagName: "button"
|