@zohodesk/components 1.2.19 → 1.2.21
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/PropUnificationExcludeFilesArray.js +231 -0
- package/.cli/propValidation_report.html +24 -2
- package/PropValidationExcludeFilesArray.js +1 -0
- package/README.md +10 -0
- package/es/Avatar/Avatar.js +2 -1
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +1 -0
- package/es/DateTime/DateTime.module.css +2 -2
- package/es/DateTime/YearView.module.css +1 -1
- package/es/Label/Label.module.css +6 -1
- package/es/ListItem/ListContainer.js +3 -2
- package/es/ListItem/ListItem.module.css +1 -1
- package/es/MultiSelect/Suggestions.js +2 -1
- package/es/Ribbon/Ribbon.module.css +49 -3
- package/es/Select/Select.js +13 -4
- package/es/Select/Select.module.css +27 -1
- package/es/Switch/Switch.js +2 -2
- package/es/Switch/__tests__/__snapshots__/Switch.spec.js.snap +22 -22
- package/es/Tab/Tab.module.css +3 -3
- package/es/TextBox/TextBox.js +8 -1
- package/es/TextBox/TextBox.module.css +45 -6
- 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/Textarea/Textarea.module.css +4 -3
- package/es/Tooltip/Tooltip.js +4 -2
- package/es/Tooltip/Tooltip.module.css +1 -1
- package/es/v1/Accordion/Accordion.js +2 -2
- package/es/v1/Accordion/AccordionItem.js +2 -2
- package/es/v1/Accordion/props/defaultProps.js +12 -0
- package/es/v1/Accordion/props/propTypes.js +33 -0
- package/es/v1/Animation/Animation.js +2 -2
- package/es/v1/Animation/props/defaultProps.js +7 -0
- package/es/v1/Animation/props/propTypes.js +12 -0
- package/es/v1/AppContainer/AppContainer.js +2 -2
- package/es/v1/AppContainer/props/defaultProps.js +10 -0
- package/es/v1/AppContainer/props/propTypes.js +17 -0
- package/es/v1/Avatar/Avatar.js +4 -3
- package/es/v1/Avatar/props/defaultProps.js +17 -0
- package/es/v1/Avatar/props/propTypes.js +26 -0
- package/es/v1/AvatarTeam/AvatarTeam.js +3 -3
- package/es/v1/AvatarTeam/props/defaultProps.js +17 -0
- package/es/v1/AvatarTeam/props/propTypes.js +27 -0
- package/es/v1/Button/Button.js +2 -2
- package/es/v1/Button/props/defaultProps.js +18 -0
- package/es/v1/Button/props/propTypes.js +27 -0
- package/es/v1/Buttongroup/Buttongroup.js +2 -2
- package/es/v1/Buttongroup/props/defaultProps.js +6 -0
- package/es/v1/Buttongroup/props/propTypes.js +9 -0
- package/es/v1/Card/Card.js +3 -3
- package/es/v1/Card/props/defaultProps.js +25 -0
- package/es/v1/Card/props/propTypes.js +48 -0
- package/es/v1/CheckBox/CheckBox.js +5 -5
- package/es/v1/CheckBox/props/defaultProps.js +18 -0
- package/es/v1/CheckBox/props/propTypes.js +40 -0
- package/es/v1/DropBox/DropBox.js +2 -2
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +2 -2
- package/es/v1/DropBox/DropBoxElement/props/defaultProps.js +18 -0
- package/es/v1/DropBox/DropBoxElement/props/propTypes.js +51 -0
- package/es/v1/DropBox/props/defaultProps.js +14 -0
- package/es/v1/DropBox/props/propTypes.js +16 -0
- package/es/v1/DropDown/DropDown.js +2 -2
- package/es/v1/DropDown/DropDownHeading.js +2 -2
- package/es/v1/DropDown/DropDownItem.js +2 -2
- package/es/v1/DropDown/DropDownSearch.js +2 -2
- package/es/v1/DropDown/DropDownSeparator.js +1 -1
- package/es/v1/DropDown/props/defaultProps.js +20 -0
- package/es/v1/DropDown/props/propTypes.js +65 -0
- package/es/v1/Heading/Heading.js +2 -2
- package/es/v1/Heading/props/defaultProps.js +5 -0
- package/es/v1/Heading/props/propTypes.js +11 -0
- package/es/v1/Label/Label.js +2 -2
- package/es/v1/Label/props/defaultProps.js +11 -0
- package/es/v1/Label/props/propTypes.js +19 -0
- package/es/v1/Layout/Box.js +2 -2
- package/es/v1/Layout/Container.js +2 -2
- package/es/v1/Layout/props/defaultProps.js +16 -0
- package/es/v1/Layout/props/propTypes.js +46 -0
- package/es/v1/ListItem/ListContainer.js +5 -4
- package/es/v1/ListItem/ListItem.js +2 -2
- package/es/v1/ListItem/ListItemWithAvatar.js +2 -2
- package/es/v1/ListItem/ListItemWithCheckBox.js +2 -2
- package/es/v1/ListItem/ListItemWithIcon.js +2 -2
- package/es/v1/ListItem/ListItemWithRadio.js +2 -2
- package/es/v1/ListItem/props/defaultProps.js +97 -0
- package/es/v1/ListItem/props/propTypes.js +202 -0
- package/es/v1/Modal/Modal.js +2 -2
- package/es/v1/Modal/props/defaultProps.js +3 -0
- package/es/v1/Modal/props/propTypes.js +7 -0
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +2 -2
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +2 -2
- package/es/v1/MultiSelect/EmptyState.js +2 -2
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +2 -2
- package/es/v1/MultiSelect/MobileHeader/props/defaultProps.js +7 -0
- package/es/v1/MultiSelect/MobileHeader/props/propTypes.js +7 -0
- package/es/v1/MultiSelect/MultiSelect.js +3 -3
- package/es/v1/MultiSelect/MultiSelectHeader.js +2 -2
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +3 -3
- package/es/v1/MultiSelect/SelectedOptions.js +2 -2
- package/es/v1/MultiSelect/Suggestions.js +4 -3
- package/es/v1/MultiSelect/props/defaultProps.js +153 -0
- package/es/v1/MultiSelect/props/propTypes.js +312 -0
- package/es/v1/PopOver/PopOver.js +2 -2
- package/es/v1/PopOver/props/defaultProps.js +7 -0
- package/es/v1/PopOver/props/propTypes.js +53 -0
- package/es/v1/Radio/Radio.js +4 -4
- package/es/v1/Radio/props/defaultProps.js +14 -0
- package/es/v1/Radio/props/propTypes.js +33 -0
- package/es/v1/Responsive/CustomResponsive.js +2 -2
- package/es/v1/Responsive/Responsive.js +2 -2
- package/es/v1/Responsive/props/defaultProps.js +13 -0
- package/es/v1/Responsive/props/propTypes.js +25 -0
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +2 -2
- package/es/v1/ResponsiveDropBox/props/defaultProps.js +4 -0
- package/es/v1/ResponsiveDropBox/props/propTypes.js +8 -0
- package/es/v1/Ribbon/Ribbon.js +3 -3
- package/es/v1/Ribbon/props/defaultProps.js +9 -0
- package/es/v1/Ribbon/props/propTypes.js +11 -0
- package/es/v1/RippleEffect/RippleEffect.js +2 -2
- package/es/v1/RippleEffect/props/defaultProps.js +9 -0
- package/es/v1/RippleEffect/props/propTypes.js +11 -0
- package/es/v1/Select/GroupSelect.js +2 -2
- package/es/v1/Select/Select.js +15 -6
- package/es/v1/Select/SelectWithAvatar.js +2 -2
- package/es/v1/Select/SelectWithIcon.js +2 -2
- package/es/v1/Select/props/defaultProps.js +119 -0
- package/es/v1/Select/props/propTypes.js +288 -0
- package/es/v1/Stencils/Stencils.js +2 -2
- package/es/v1/Stencils/props/defaultProps.js +6 -0
- package/es/v1/Stencils/props/propTypes.js +7 -0
- package/es/v1/Switch/Switch.js +4 -4
- package/es/v1/Switch/props/defaultProps.js +11 -0
- package/es/v1/Switch/props/propTypes.js +28 -0
- package/es/v1/Tab/Tab.js +3 -4
- package/es/v1/Tab/TabContent.js +3 -3
- package/es/v1/Tab/TabContentWrapper.js +2 -2
- package/es/v1/Tab/TabWrapper.js +2 -2
- package/es/v1/Tab/Tabs.js +184 -273
- package/es/v1/Tab/props/defaultProps.js +44 -0
- package/es/v1/Tab/props/propTypes.js +106 -0
- 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/Tag/Tag.js +2 -2
- package/es/v1/Tag/props/defaultProps.js +14 -0
- package/es/v1/Tag/props/propTypes.js +35 -0
- package/es/v1/TextBox/TextBox.js +10 -4
- package/es/v1/TextBox/props/defaultProps.js +20 -0
- package/es/v1/TextBox/props/propTypes.js +56 -0
- package/es/v1/TextBoxIcon/TextBoxIcon.js +5 -3
- package/es/v1/TextBoxIcon/props/defaultProps.js +23 -0
- package/es/v1/TextBoxIcon/props/propTypes.js +52 -0
- package/es/v1/Textarea/Textarea.js +2 -2
- package/es/v1/Textarea/props/defaultProps.js +17 -0
- package/es/v1/Textarea/props/propTypes.js +31 -0
- package/es/v1/Tooltip/Tooltip.js +6 -4
- package/es/v1/Tooltip/props/defaultProps.js +4 -0
- package/es/v1/Tooltip/props/propTypes.js +5 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +2 -2
- package/es/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +7 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +12 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +2 -2
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +15 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +19 -0
- package/es/v1/semantic/Button/Button.js +2 -2
- package/es/v1/semantic/Button/props/defaultProps.js +12 -0
- package/es/v1/semantic/Button/props/propTypes.js +22 -0
- package/lib/Avatar/Avatar.js +2 -1
- package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +1 -0
- package/lib/DateTime/DateTime.module.css +2 -2
- package/lib/DateTime/YearView.module.css +1 -1
- package/lib/Label/Label.module.css +6 -1
- package/lib/ListItem/ListContainer.js +10 -2
- package/lib/ListItem/ListItem.module.css +1 -1
- package/lib/MultiSelect/Suggestions.js +2 -1
- package/lib/Ribbon/Ribbon.module.css +49 -3
- package/lib/Select/Select.js +17 -4
- package/lib/Select/Select.module.css +27 -1
- package/lib/Switch/Switch.js +2 -2
- package/lib/Switch/__tests__/__snapshots__/Switch.spec.js.snap +22 -22
- package/lib/Tab/Tab.module.css +3 -3
- package/lib/TextBox/TextBox.js +9 -1
- package/lib/TextBox/TextBox.module.css +45 -6
- 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/Textarea/Textarea.module.css +4 -3
- package/lib/Tooltip/Tooltip.js +4 -2
- package/lib/Tooltip/Tooltip.module.css +1 -1
- package/lib/v1/Accordion/Accordion.js +2 -2
- package/lib/v1/Accordion/AccordionItem.js +2 -2
- package/lib/v1/Accordion/props/defaultProps.js +20 -0
- package/lib/v1/Accordion/props/propTypes.js +45 -0
- package/lib/v1/Animation/Animation.js +2 -2
- package/lib/v1/Animation/props/defaultProps.js +14 -0
- package/lib/v1/Animation/props/propTypes.js +23 -0
- package/lib/v1/AppContainer/AppContainer.js +2 -2
- package/lib/v1/AppContainer/props/defaultProps.js +17 -0
- package/lib/v1/AppContainer/props/propTypes.js +28 -0
- package/lib/v1/Avatar/Avatar.js +4 -3
- package/lib/v1/Avatar/props/defaultProps.js +24 -0
- package/lib/v1/Avatar/props/propTypes.js +37 -0
- package/lib/v1/AvatarTeam/AvatarTeam.js +3 -3
- package/lib/v1/AvatarTeam/props/defaultProps.js +24 -0
- package/lib/v1/AvatarTeam/props/propTypes.js +38 -0
- package/lib/v1/Button/Button.js +2 -2
- package/lib/v1/Button/props/defaultProps.js +27 -0
- package/lib/v1/Button/props/propTypes.js +39 -0
- package/lib/v1/Buttongroup/Buttongroup.js +2 -2
- package/lib/v1/Buttongroup/props/defaultProps.js +13 -0
- package/lib/v1/Buttongroup/props/propTypes.js +20 -0
- package/lib/v1/Card/Card.js +3 -3
- package/lib/v1/Card/props/defaultProps.js +35 -0
- package/lib/v1/Card/props/propTypes.js +62 -0
- package/lib/v1/CheckBox/CheckBox.js +5 -5
- package/lib/v1/CheckBox/props/defaultProps.js +25 -0
- package/lib/v1/CheckBox/props/propTypes.js +51 -0
- package/lib/v1/DropBox/DropBox.js +2 -2
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +2 -2
- package/lib/v1/DropBox/DropBoxElement/props/defaultProps.js +25 -0
- package/lib/v1/DropBox/DropBoxElement/props/propTypes.js +62 -0
- package/lib/v1/DropBox/props/defaultProps.js +30 -0
- package/lib/v1/DropBox/props/propTypes.js +35 -0
- package/lib/v1/DropDown/DropDown.js +2 -2
- package/lib/v1/DropDown/DropDownHeading.js +2 -2
- package/lib/v1/DropDown/DropDownItem.js +2 -2
- package/lib/v1/DropDown/DropDownSearch.js +2 -2
- package/lib/v1/DropDown/DropDownSeparator.js +1 -1
- package/lib/v1/DropDown/props/defaultProps.js +30 -0
- package/lib/v1/DropDown/props/propTypes.js +87 -0
- package/lib/v1/Heading/Heading.js +2 -2
- package/lib/v1/Heading/props/defaultProps.js +12 -0
- package/lib/v1/Heading/props/propTypes.js +22 -0
- package/lib/v1/Label/Label.js +2 -2
- package/lib/v1/Label/props/defaultProps.js +18 -0
- package/lib/v1/Label/props/propTypes.js +30 -0
- package/lib/v1/Layout/Box.js +2 -2
- package/lib/v1/Layout/Container.js +2 -2
- package/lib/v1/Layout/props/defaultProps.js +24 -0
- package/lib/v1/Layout/props/propTypes.js +58 -0
- package/lib/v1/ListItem/ListContainer.js +12 -4
- package/lib/v1/ListItem/ListItem.js +2 -2
- package/lib/v1/ListItem/ListItemWithAvatar.js +2 -2
- package/lib/v1/ListItem/ListItemWithCheckBox.js +2 -2
- package/lib/v1/ListItem/ListItemWithIcon.js +2 -2
- package/lib/v1/ListItem/ListItemWithRadio.js +2 -2
- package/lib/v1/ListItem/props/defaultProps.js +109 -0
- package/lib/v1/ListItem/props/propTypes.js +196 -0
- package/lib/v1/Modal/Modal.js +2 -2
- package/lib/v1/Modal/props/defaultProps.js +10 -0
- package/lib/v1/Modal/props/propTypes.js +18 -0
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +2 -2
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +2 -2
- package/lib/v1/MultiSelect/EmptyState.js +2 -2
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +2 -2
- package/lib/v1/MultiSelect/MobileHeader/props/defaultProps.js +14 -0
- package/lib/v1/MultiSelect/MobileHeader/props/propTypes.js +18 -0
- package/lib/v1/MultiSelect/MultiSelect.js +3 -3
- package/lib/v1/MultiSelect/MultiSelectHeader.js +2 -2
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +3 -3
- package/lib/v1/MultiSelect/SelectedOptions.js +2 -2
- package/lib/v1/MultiSelect/Suggestions.js +4 -3
- package/lib/v1/MultiSelect/props/defaultProps.js +169 -0
- package/lib/v1/MultiSelect/props/propTypes.js +340 -0
- package/lib/v1/PopOver/PopOver.js +2 -2
- package/lib/v1/PopOver/props/defaultProps.js +15 -0
- package/lib/v1/PopOver/props/propTypes.js +66 -0
- package/lib/v1/Radio/Radio.js +4 -4
- package/lib/v1/Radio/props/defaultProps.js +21 -0
- package/lib/v1/Radio/props/propTypes.js +44 -0
- package/lib/v1/Responsive/CustomResponsive.js +2 -2
- package/lib/v1/Responsive/Responsive.js +2 -2
- package/lib/v1/Responsive/props/defaultProps.js +23 -0
- package/lib/v1/Responsive/props/propTypes.js +39 -0
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +2 -2
- package/lib/v1/ResponsiveDropBox/props/defaultProps.js +11 -0
- package/lib/v1/ResponsiveDropBox/props/propTypes.js +27 -0
- package/lib/v1/Ribbon/Ribbon.js +3 -3
- package/lib/v1/Ribbon/props/defaultProps.js +16 -0
- package/lib/v1/Ribbon/props/propTypes.js +22 -0
- package/lib/v1/RippleEffect/RippleEffect.js +2 -2
- package/lib/v1/RippleEffect/props/defaultProps.js +16 -0
- package/lib/v1/RippleEffect/props/propTypes.js +22 -0
- package/lib/v1/Select/GroupSelect.js +2 -2
- package/lib/v1/Select/Select.js +19 -6
- package/lib/v1/Select/SelectWithAvatar.js +2 -2
- package/lib/v1/Select/SelectWithIcon.js +2 -2
- package/lib/v1/Select/props/defaultProps.js +120 -0
- package/lib/v1/Select/props/propTypes.js +310 -0
- package/lib/v1/Stencils/Stencils.js +2 -2
- package/lib/v1/Stencils/props/defaultProps.js +13 -0
- package/lib/v1/Stencils/props/propTypes.js +18 -0
- package/lib/v1/Switch/Switch.js +4 -4
- package/lib/v1/Switch/props/defaultProps.js +18 -0
- package/lib/v1/Switch/props/propTypes.js +39 -0
- package/lib/v1/Tab/Tab.js +8 -8
- package/lib/v1/Tab/TabContent.js +4 -4
- package/lib/v1/Tab/TabContentWrapper.js +2 -2
- package/lib/v1/Tab/TabWrapper.js +2 -2
- package/lib/v1/Tab/Tabs.js +480 -569
- package/lib/v1/Tab/props/defaultProps.js +55 -0
- package/lib/v1/Tab/props/propTypes.js +121 -0
- 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/Tag/Tag.js +2 -2
- package/lib/v1/Tag/props/defaultProps.js +21 -0
- package/lib/v1/Tag/props/propTypes.js +46 -0
- package/lib/v1/TextBox/TextBox.js +12 -4
- package/lib/v1/TextBox/props/defaultProps.js +27 -0
- package/lib/v1/TextBox/props/propTypes.js +62 -0
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +5 -3
- package/lib/v1/TextBoxIcon/props/defaultProps.js +30 -0
- package/lib/v1/TextBoxIcon/props/propTypes.js +71 -0
- package/lib/v1/Textarea/Textarea.js +2 -2
- package/lib/v1/Textarea/props/defaultProps.js +24 -0
- package/lib/v1/Textarea/props/propTypes.js +42 -0
- package/lib/v1/Tooltip/Tooltip.js +6 -4
- package/lib/v1/Tooltip/props/defaultProps.js +11 -0
- package/lib/v1/Tooltip/props/propTypes.js +16 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +2 -2
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +14 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +23 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +2 -2
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +22 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +30 -0
- package/lib/v1/semantic/Button/Button.js +2 -2
- package/lib/v1/semantic/Button/props/defaultProps.js +19 -0
- package/lib/v1/semantic/Button/props/propTypes.js +33 -0
- package/package.json +13 -11
- package/propValidationArg.json +8 -0
- package/result.json +1 -1
package/es/v1/Select/Select.js
CHANGED
|
@@ -2,8 +2,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
|
|
3
3
|
/**** Libraries ****/
|
|
4
4
|
import React, { Component } from 'react';
|
|
5
|
-
import { Select_defaultProps } from '
|
|
6
|
-
import { Select_propTypes } from '
|
|
5
|
+
import { Select_defaultProps } from './props/defaultProps';
|
|
6
|
+
import { Select_propTypes } from './props/propTypes';
|
|
7
7
|
/**** Components ****/
|
|
8
8
|
|
|
9
9
|
import Popup from '../Popup/Popup';
|
|
@@ -298,7 +298,8 @@ export class SelectComponent extends Component {
|
|
|
298
298
|
isPopupOpen,
|
|
299
299
|
onKeyDown,
|
|
300
300
|
isPopupOpenOnEnter,
|
|
301
|
-
needCloseOnSelect
|
|
301
|
+
needCloseOnSelect,
|
|
302
|
+
isPopupReady
|
|
302
303
|
} = this.props;
|
|
303
304
|
let {
|
|
304
305
|
hoverIndex,
|
|
@@ -351,7 +352,7 @@ export class SelectComponent extends Component {
|
|
|
351
352
|
id
|
|
352
353
|
} = option || {};
|
|
353
354
|
|
|
354
|
-
if (
|
|
355
|
+
if (isPopupReady && !getIsEmptyValue(id) && onChange) {
|
|
355
356
|
onChange(id, optionsNormalize[id]);
|
|
356
357
|
needCloseOnSelect && this.handlePopupClose(e);
|
|
357
358
|
}
|
|
@@ -801,8 +802,12 @@ export class SelectComponent extends Component {
|
|
|
801
802
|
htmlId: htmlId,
|
|
802
803
|
isFocus: isPopupReady,
|
|
803
804
|
autoComplete: autoComplete,
|
|
805
|
+
isScrollPrevent: true,
|
|
804
806
|
customProps: {
|
|
805
|
-
TextBoxProps:
|
|
807
|
+
TextBoxProps: {
|
|
808
|
+
'data-title': title || selected,
|
|
809
|
+
...TextBoxProps
|
|
810
|
+
}
|
|
806
811
|
}
|
|
807
812
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
808
813
|
alignBox: "row",
|
|
@@ -850,7 +855,11 @@ export class SelectComponent extends Component {
|
|
|
850
855
|
htmlId: htmlId,
|
|
851
856
|
autoComplete: autoComplete,
|
|
852
857
|
isFocus: isPopupReady,
|
|
853
|
-
|
|
858
|
+
isScrollPrevent: true,
|
|
859
|
+
customProps: {
|
|
860
|
+
'data-title': title || selected,
|
|
861
|
+
...TextBoxProps
|
|
862
|
+
}
|
|
854
863
|
})), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
855
864
|
query: this.responsiveFunc,
|
|
856
865
|
responsiveId: "Helmet"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**** Libraries ****/
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { SelectWithAvatar_defaultProps } from '
|
|
4
|
-
import { SelectWithAvatar_propTypes } from '
|
|
3
|
+
import { SelectWithAvatar_defaultProps } from './props/defaultProps';
|
|
4
|
+
import { SelectWithAvatar_propTypes } from './props/propTypes';
|
|
5
5
|
/**** Components ****/
|
|
6
6
|
|
|
7
7
|
import { SelectComponent } from './Select';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { SelectWithIcon_defaultProps } from '
|
|
3
|
-
import { SelectWithIcon_propTypes } from '
|
|
2
|
+
import { SelectWithIcon_defaultProps } from './props/defaultProps';
|
|
3
|
+
import { SelectWithIcon_propTypes } from './props/propTypes';
|
|
4
4
|
/**** Components ****/
|
|
5
5
|
|
|
6
6
|
import Popup from '../Popup/Popup';
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { getLibraryConfig } from '../../Provider/Config';
|
|
2
|
+
export const Select_defaultProps = {
|
|
3
|
+
animationStyle: 'bounce',
|
|
4
|
+
autoComplete: getLibraryConfig('autoComplete'),
|
|
5
|
+
autoSelectOnType: true,
|
|
6
|
+
dataId: 'selectComponent',
|
|
7
|
+
dataSelectorId: 'select',
|
|
8
|
+
dropBoxSize: 'small',
|
|
9
|
+
isDefaultSelectValue: true,
|
|
10
|
+
isDisabled: false,
|
|
11
|
+
isPopupOpenOnEnter: false,
|
|
12
|
+
isReadOnly: false,
|
|
13
|
+
needBorder: true,
|
|
14
|
+
needLocalSearch: true,
|
|
15
|
+
needSearch: false,
|
|
16
|
+
needSelectDownIcon: true,
|
|
17
|
+
placeHolder: '',
|
|
18
|
+
searchBoxPlaceHolder: 'Search',
|
|
19
|
+
searchBoxSize: 'small',
|
|
20
|
+
size: 'medium',
|
|
21
|
+
textBoxSize: 'medium',
|
|
22
|
+
textBoxVariant: 'default',
|
|
23
|
+
textField: 'text',
|
|
24
|
+
valueField: 'id',
|
|
25
|
+
borderColor: 'default',
|
|
26
|
+
needTick: true,
|
|
27
|
+
boxSize: 'default',
|
|
28
|
+
needListBorder: false,
|
|
29
|
+
needCloseOnSelect: true,
|
|
30
|
+
isParentBased: true,
|
|
31
|
+
isSearchClearOnClose: true,
|
|
32
|
+
i18nKeys: {},
|
|
33
|
+
iconOnHover: false,
|
|
34
|
+
customProps: {},
|
|
35
|
+
isLoading: false,
|
|
36
|
+
isAbsolutePositioningNeeded: true
|
|
37
|
+
};
|
|
38
|
+
export const GroupSelect_defaultProps = {
|
|
39
|
+
animationStyle: 'bounce',
|
|
40
|
+
defaultDropBoxPosition: 'bottom',
|
|
41
|
+
dropBoxSize: 'small',
|
|
42
|
+
dataSelectorId: 'groupSelect',
|
|
43
|
+
isDefaultSelectValue: true,
|
|
44
|
+
isDisabled: false,
|
|
45
|
+
isReadOnly: false,
|
|
46
|
+
needBorder: true,
|
|
47
|
+
needSearch: false,
|
|
48
|
+
needSelectDownIcon: true,
|
|
49
|
+
placeHolder: '',
|
|
50
|
+
searchBoxPlaceHolder: 'Search',
|
|
51
|
+
searchBoxSize: 'small',
|
|
52
|
+
size: 'medium',
|
|
53
|
+
textBoxSize: 'medium',
|
|
54
|
+
textBoxVariant: 'default',
|
|
55
|
+
textField: 'text',
|
|
56
|
+
valueField: 'id',
|
|
57
|
+
autoSelectOnType: true,
|
|
58
|
+
dataIdSlctComp: 'selectComponent',
|
|
59
|
+
dataIdDownIcon: 'downIcon',
|
|
60
|
+
dataIdLoading: 'loading',
|
|
61
|
+
dataIdSrchEmptyMsg: 'searchEmptyMessage',
|
|
62
|
+
isPopupOpenOnEnter: false,
|
|
63
|
+
borderColor: 'default',
|
|
64
|
+
needTick: true,
|
|
65
|
+
needLocalSearch: true,
|
|
66
|
+
isSearchClearOnClose: true,
|
|
67
|
+
i18nKeys: {},
|
|
68
|
+
iconOnHover: false,
|
|
69
|
+
isLoading: false
|
|
70
|
+
};
|
|
71
|
+
export const SelectWithAvatar_defaultProps = {
|
|
72
|
+
animationStyle: 'bounce',
|
|
73
|
+
defaultDropBoxPosition: 'bottom',
|
|
74
|
+
dropBoxSize: 'small',
|
|
75
|
+
isDefaultSelectValue: false,
|
|
76
|
+
isDisabled: false,
|
|
77
|
+
isReadOnly: false,
|
|
78
|
+
needBorder: true,
|
|
79
|
+
needLocalSearch: true,
|
|
80
|
+
needSearch: true,
|
|
81
|
+
placeHolder: '',
|
|
82
|
+
size: 'medium',
|
|
83
|
+
textBoxSize: 'medium',
|
|
84
|
+
textBoxVariant: 'default',
|
|
85
|
+
textField: 'text',
|
|
86
|
+
valueField: 'id',
|
|
87
|
+
dataId: 'selectWithAvatar',
|
|
88
|
+
dataSelectorId: 'selectWithAvatar',
|
|
89
|
+
borderColor: 'default',
|
|
90
|
+
isSearchClearOnClose: true,
|
|
91
|
+
i18nKeys: {},
|
|
92
|
+
needEffect: true,
|
|
93
|
+
isLoading: false
|
|
94
|
+
};
|
|
95
|
+
export const SelectWithIcon_defaultProps = {
|
|
96
|
+
isReadOnly: false,
|
|
97
|
+
isDisabled: false,
|
|
98
|
+
animationStyle: 'bounce',
|
|
99
|
+
valueKey: 'value',
|
|
100
|
+
idKey: 'id',
|
|
101
|
+
needListBorder: false,
|
|
102
|
+
needSearch: false,
|
|
103
|
+
boxSize: 'default',
|
|
104
|
+
needListBorder: false,
|
|
105
|
+
needCloseOnSelect: true,
|
|
106
|
+
borderColor: 'default',
|
|
107
|
+
needTick: true,
|
|
108
|
+
searchBoxSize: 'small',
|
|
109
|
+
size: 'medium',
|
|
110
|
+
textBoxSize: 'medium',
|
|
111
|
+
textBoxVariant: 'default',
|
|
112
|
+
dataId: 'selectWithIcon',
|
|
113
|
+
dataSelectorId: 'selectWithIcon',
|
|
114
|
+
dropBoxSize: 'small',
|
|
115
|
+
needIcon: true,
|
|
116
|
+
iconSize: '14',
|
|
117
|
+
i18nKeys: {},
|
|
118
|
+
isLoading: false
|
|
119
|
+
};
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export const Select_propTypes = {
|
|
3
|
+
animationStyle: PropTypes.string,
|
|
4
|
+
autoComplete: PropTypes.bool,
|
|
5
|
+
autoSelectDebouneTime: PropTypes.number,
|
|
6
|
+
autoSelectOnType: PropTypes.bool,
|
|
7
|
+
borderColor: PropTypes.oneOf(['transparent', 'default']),
|
|
8
|
+
boxSize: PropTypes.string,
|
|
9
|
+
className: PropTypes.string,
|
|
10
|
+
closePopupOnly: PropTypes.func,
|
|
11
|
+
dataId: PropTypes.string,
|
|
12
|
+
defaultDropBoxPosition: PropTypes.string,
|
|
13
|
+
dropBoxSize: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
14
|
+
emptyMessage: PropTypes.string,
|
|
15
|
+
excludeOptions: PropTypes.array,
|
|
16
|
+
getChildren: PropTypes.func,
|
|
17
|
+
getContainerRef: PropTypes.func,
|
|
18
|
+
getCustomEmptyState: PropTypes.func,
|
|
19
|
+
getFooter: PropTypes.func,
|
|
20
|
+
getNextOptions: PropTypes.func,
|
|
21
|
+
getPopupHandlers: PropTypes.func,
|
|
22
|
+
getRef: PropTypes.func,
|
|
23
|
+
getTargetRef: PropTypes.func,
|
|
24
|
+
i18nKeys: PropTypes.shape({
|
|
25
|
+
loadingText: PropTypes.string,
|
|
26
|
+
emptyText: PropTypes.string,
|
|
27
|
+
noMoreText: PropTypes.string,
|
|
28
|
+
searchEmptyText: PropTypes.string
|
|
29
|
+
}),
|
|
30
|
+
isDefaultSelectValue: PropTypes.bool,
|
|
31
|
+
isDisabled: PropTypes.bool,
|
|
32
|
+
isNextOptions: PropTypes.bool,
|
|
33
|
+
isParentBased: PropTypes.bool,
|
|
34
|
+
isPopupOpen: PropTypes.bool,
|
|
35
|
+
isPopupOpenOnEnter: PropTypes.bool,
|
|
36
|
+
isPopupReady: PropTypes.bool,
|
|
37
|
+
isReadOnly: PropTypes.bool,
|
|
38
|
+
isSearchClearOnClose: PropTypes.bool,
|
|
39
|
+
listItemSize: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
40
|
+
maxLength: PropTypes.string,
|
|
41
|
+
needBorder: PropTypes.bool,
|
|
42
|
+
needCloseOnSelect: PropTypes.bool,
|
|
43
|
+
needListBorder: PropTypes.bool,
|
|
44
|
+
needLocalSearch: PropTypes.bool,
|
|
45
|
+
needResponsive: PropTypes.bool,
|
|
46
|
+
needSearch: PropTypes.bool,
|
|
47
|
+
needSelectDownIcon: PropTypes.bool,
|
|
48
|
+
needTick: PropTypes.bool,
|
|
49
|
+
onAddNewOption: PropTypes.func,
|
|
50
|
+
onChange: PropTypes.func.isRequired,
|
|
51
|
+
onDropBoxClose: PropTypes.func,
|
|
52
|
+
onDropBoxOpen: PropTypes.func,
|
|
53
|
+
onKeyDown: PropTypes.func,
|
|
54
|
+
onSearch: PropTypes.func,
|
|
55
|
+
options: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), PropTypes.arrayOf(PropTypes.shape({
|
|
56
|
+
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
57
|
+
text: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
58
|
+
}))]).isRequired,
|
|
59
|
+
placeHolder: PropTypes.string,
|
|
60
|
+
position: PropTypes.string,
|
|
61
|
+
removeClose: PropTypes.func,
|
|
62
|
+
searchBoxPlaceHolder: PropTypes.string,
|
|
63
|
+
searchBoxSize: PropTypes.string,
|
|
64
|
+
searchDebounceTime: PropTypes.number,
|
|
65
|
+
searchEmptyMessage: PropTypes.string,
|
|
66
|
+
selectedValue: PropTypes.oneOfType([PropTypes.oneOfType([PropTypes.string, PropTypes.number]), PropTypes.shape({
|
|
67
|
+
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
68
|
+
text: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
69
|
+
})]),
|
|
70
|
+
size: PropTypes.oneOf(['small', 'medium']),
|
|
71
|
+
textBoxSize: PropTypes.string,
|
|
72
|
+
textBoxVariant: PropTypes.string,
|
|
73
|
+
textField: PropTypes.string,
|
|
74
|
+
title: PropTypes.string,
|
|
75
|
+
togglePopup: PropTypes.func,
|
|
76
|
+
valueField: PropTypes.string,
|
|
77
|
+
htmlId: PropTypes.string,
|
|
78
|
+
children: PropTypes.node,
|
|
79
|
+
onFocus: PropTypes.func,
|
|
80
|
+
iconOnHover: PropTypes.bool,
|
|
81
|
+
customProps: PropTypes.shape({
|
|
82
|
+
TextBoxProps: PropTypes.object,
|
|
83
|
+
DropdownSearchTextBoxProps: PropTypes.object,
|
|
84
|
+
listItemProps: PropTypes.object,
|
|
85
|
+
SuggestionsProps: PropTypes.object
|
|
86
|
+
}),
|
|
87
|
+
isLoading: PropTypes.bool,
|
|
88
|
+
dataSelectorId: PropTypes.string,
|
|
89
|
+
isAbsolutePositioningNeeded: PropTypes.bool,
|
|
90
|
+
openPopupOnly: PropTypes.bool,
|
|
91
|
+
ariaLabelledby: PropTypes.string,
|
|
92
|
+
positionsOffset: PropTypes.array,
|
|
93
|
+
targetOffset: PropTypes.array,
|
|
94
|
+
isRestrictScroll: PropTypes.bool,
|
|
95
|
+
dropBoxPortalId: PropTypes.string
|
|
96
|
+
};
|
|
97
|
+
export const GroupSelect_propTypes = {
|
|
98
|
+
groupedOptions: PropTypes.arrayOf(PropTypes.shape({
|
|
99
|
+
id: PropTypes.string.isRequired,
|
|
100
|
+
name: PropTypes.string.isRequired,
|
|
101
|
+
valueField: PropTypes.string,
|
|
102
|
+
textField: PropTypes.string,
|
|
103
|
+
options: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), PropTypes.arrayOf(PropTypes.shape({
|
|
104
|
+
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
105
|
+
text: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
106
|
+
}))])
|
|
107
|
+
})),
|
|
108
|
+
selectedOption: PropTypes.shape({
|
|
109
|
+
groupId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
110
|
+
selected: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
111
|
+
}),
|
|
112
|
+
emptyMessage: PropTypes.string.isRequired,
|
|
113
|
+
placeHolder: PropTypes.string,
|
|
114
|
+
onChange: PropTypes.func.isRequired,
|
|
115
|
+
onKeyDown: PropTypes.func,
|
|
116
|
+
searchBoxPlaceHolder: PropTypes.string,
|
|
117
|
+
needSearch: PropTypes.bool,
|
|
118
|
+
searchEmptyMessage: PropTypes.string,
|
|
119
|
+
getRef: PropTypes.func,
|
|
120
|
+
isDisabled: PropTypes.bool,
|
|
121
|
+
isReadOnly: PropTypes.bool,
|
|
122
|
+
needSelectDownIcon: PropTypes.bool,
|
|
123
|
+
isPopupOpenOnEnter: PropTypes.bool,
|
|
124
|
+
maxLength: PropTypes.string,
|
|
125
|
+
needBorder: PropTypes.bool,
|
|
126
|
+
autoSelectOnType: PropTypes.bool,
|
|
127
|
+
autoSelectDebouneTime: PropTypes.number,
|
|
128
|
+
dataId: PropTypes.string,
|
|
129
|
+
dataIdSlctComp: PropTypes.string,
|
|
130
|
+
dataIdDownIcon: PropTypes.string,
|
|
131
|
+
dataIdSrchEmptyMsg: PropTypes.string,
|
|
132
|
+
isNextOptions: PropTypes.bool,
|
|
133
|
+
getNextOptions: PropTypes.func,
|
|
134
|
+
searchDebounceTime: PropTypes.func,
|
|
135
|
+
needLocalSearch: PropTypes.bool,
|
|
136
|
+
onSearch: PropTypes.func,
|
|
137
|
+
isSearchClearOnClose: PropTypes.bool,
|
|
138
|
+
animationStyle: PropTypes.string,
|
|
139
|
+
dropBoxSize: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
140
|
+
defaultDropBoxPosition: PropTypes.oneOf(['bottom', 'top', 'left', 'right']),
|
|
141
|
+
size: PropTypes.oneOf(['medium', 'xmedium']),
|
|
142
|
+
textBoxSize: PropTypes.oneOf(['small', 'medium', 'xmedium']),
|
|
143
|
+
title: PropTypes.string,
|
|
144
|
+
needResponsive: PropTypes.bool,
|
|
145
|
+
className: PropTypes.string,
|
|
146
|
+
textBoxVariant: PropTypes.string,
|
|
147
|
+
searchBoxSize: PropTypes.string,
|
|
148
|
+
borderColor: PropTypes.oneOf(['transparent', 'default']),
|
|
149
|
+
needTick: PropTypes.bool,
|
|
150
|
+
children: PropTypes.node,
|
|
151
|
+
getFooter: PropTypes.func,
|
|
152
|
+
htmlId: PropTypes.string,
|
|
153
|
+
iconOnHover: PropTypes.bool,
|
|
154
|
+
|
|
155
|
+
/**** Popup Props ****/
|
|
156
|
+
isPopupOpen: PropTypes.bool,
|
|
157
|
+
isPopupReady: PropTypes.bool,
|
|
158
|
+
togglePopup: PropTypes.func,
|
|
159
|
+
getTargetRef: PropTypes.func,
|
|
160
|
+
getContainerRef: PropTypes.func,
|
|
161
|
+
closePopupOnly: PropTypes.func,
|
|
162
|
+
position: PropTypes.string,
|
|
163
|
+
removeClose: PropTypes.func,
|
|
164
|
+
i18nKeys: PropTypes.shape({
|
|
165
|
+
loadingText: PropTypes.string,
|
|
166
|
+
emptyText: PropTypes.string,
|
|
167
|
+
noMoreText: PropTypes.string,
|
|
168
|
+
searchEmptyText: PropTypes.string
|
|
169
|
+
}),
|
|
170
|
+
isLoading: PropTypes.bool,
|
|
171
|
+
dataSelectorId: PropTypes.string,
|
|
172
|
+
isDefaultSelectValue: PropTypes.bool
|
|
173
|
+
};
|
|
174
|
+
export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
175
|
+
textBoxClass: PropTypes.string,
|
|
176
|
+
imageField: PropTypes.string,
|
|
177
|
+
animationStyle: PropTypes.string,
|
|
178
|
+
avatarPalette: PropTypes.string,
|
|
179
|
+
borderColor: PropTypes.oneOf(['transparent', 'default']),
|
|
180
|
+
className: PropTypes.string,
|
|
181
|
+
closePopupOnly: PropTypes.func,
|
|
182
|
+
dataId: PropTypes.string,
|
|
183
|
+
defaultDropBoxPosition: PropTypes.oneOf(['bottom', 'top', 'left', 'right']),
|
|
184
|
+
dropBoxSize: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
185
|
+
emptyMessage: PropTypes.string,
|
|
186
|
+
excludeOptions: PropTypes.array,
|
|
187
|
+
getContainerRef: PropTypes.func,
|
|
188
|
+
getNextOptions: PropTypes.func,
|
|
189
|
+
getRef: PropTypes.func,
|
|
190
|
+
groupName: PropTypes.string,
|
|
191
|
+
i18nKeys: PropTypes.shape({
|
|
192
|
+
loadingText: PropTypes.string,
|
|
193
|
+
emptyText: PropTypes.string,
|
|
194
|
+
noMoreText: PropTypes.string,
|
|
195
|
+
searchEmptyText: PropTypes.string
|
|
196
|
+
}),
|
|
197
|
+
isDisabled: PropTypes.bool,
|
|
198
|
+
isNextOptions: PropTypes.bool,
|
|
199
|
+
isPopupOpen: PropTypes.bool,
|
|
200
|
+
isPopupReady: PropTypes.bool,
|
|
201
|
+
isReadOnly: PropTypes.bool,
|
|
202
|
+
isSearchClearOnClose: PropTypes.bool,
|
|
203
|
+
maxLength: PropTypes.string,
|
|
204
|
+
needBorder: PropTypes.bool,
|
|
205
|
+
needLocalSearch: PropTypes.bool,
|
|
206
|
+
needResponsive: PropTypes.bool,
|
|
207
|
+
onChange: PropTypes.func.isRequired,
|
|
208
|
+
onDropBoxClose: PropTypes.func,
|
|
209
|
+
onDropBoxOpen: PropTypes.func,
|
|
210
|
+
onRemove: PropTypes.func,
|
|
211
|
+
onSearch: PropTypes.func,
|
|
212
|
+
options: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.shape({
|
|
213
|
+
id: PropTypes.string,
|
|
214
|
+
text: PropTypes.string,
|
|
215
|
+
photoURL: PropTypes.string
|
|
216
|
+
}))]).isRequired,
|
|
217
|
+
position: PropTypes.string,
|
|
218
|
+
removeClose: PropTypes.func,
|
|
219
|
+
searchDebounceTime: PropTypes.number,
|
|
220
|
+
searchEmptyMessage: PropTypes.string,
|
|
221
|
+
selectedValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
222
|
+
size: PropTypes.oneOf(['small', 'medium']),
|
|
223
|
+
tagSize: PropTypes.string,
|
|
224
|
+
textBoxSize: PropTypes.string,
|
|
225
|
+
textBoxVariant: PropTypes.string,
|
|
226
|
+
textField: PropTypes.string,
|
|
227
|
+
title: PropTypes.string,
|
|
228
|
+
togglePopup: PropTypes.func,
|
|
229
|
+
valueField: PropTypes.string,
|
|
230
|
+
htmlId: PropTypes.string,
|
|
231
|
+
needEffect: PropTypes.bool,
|
|
232
|
+
isLoading: PropTypes.bool,
|
|
233
|
+
dataSelectorId: PropTypes.string
|
|
234
|
+
};
|
|
235
|
+
export const SelectWithIcon_propTypes = {
|
|
236
|
+
animationStyle: PropTypes.oneOf(['default', 'bounce']),
|
|
237
|
+
borderColor: PropTypes.oneOf(['transparent', 'default']),
|
|
238
|
+
boxPosition: PropTypes.oneOf(['bottomRight', 'bottomLeft', 'bottomCenter', 'topRight', 'topLeft', 'topCenter', 'rightTop', 'rightBottom', 'rightCenter', 'leftTop', 'leftBottom', 'leftCenter']),
|
|
239
|
+
dataId: PropTypes.string,
|
|
240
|
+
dropBoxSize: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
241
|
+
getContainerRef: PropTypes.func,
|
|
242
|
+
getNextOptions: PropTypes.func,
|
|
243
|
+
getTargetRef: PropTypes.func,
|
|
244
|
+
i18nKeys: PropTypes.shape({
|
|
245
|
+
loadingText: PropTypes.string,
|
|
246
|
+
emptyText: PropTypes.string,
|
|
247
|
+
noMoreText: PropTypes.string,
|
|
248
|
+
searchEmptyText: PropTypes.string
|
|
249
|
+
}),
|
|
250
|
+
iconClass: PropTypes.string,
|
|
251
|
+
iconName: PropTypes.string,
|
|
252
|
+
iconSize: PropTypes.string,
|
|
253
|
+
idKey: PropTypes.string,
|
|
254
|
+
isDisabled: PropTypes.bool,
|
|
255
|
+
isNextOptions: PropTypes.bool,
|
|
256
|
+
isPopupOpen: PropTypes.bool,
|
|
257
|
+
isPopupReady: PropTypes.bool,
|
|
258
|
+
isReadOnly: PropTypes.bool,
|
|
259
|
+
maxLength: PropTypes.string,
|
|
260
|
+
needIcon: PropTypes.bool,
|
|
261
|
+
needListBorder: PropTypes.bool,
|
|
262
|
+
needSearch: PropTypes.bool,
|
|
263
|
+
needTick: PropTypes.bool,
|
|
264
|
+
onChange: PropTypes.func,
|
|
265
|
+
options: PropTypes.array,
|
|
266
|
+
placeHolder: PropTypes.string,
|
|
267
|
+
position: PropTypes.string,
|
|
268
|
+
removeClose: PropTypes.func,
|
|
269
|
+
searchBoxPlaceHolder: PropTypes.string,
|
|
270
|
+
searchEmptyMessage: PropTypes.string,
|
|
271
|
+
selectedId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
272
|
+
selectedValue: PropTypes.string,
|
|
273
|
+
size: PropTypes.oneOf(['small', 'medium']),
|
|
274
|
+
textBoxSize: PropTypes.oneOf(['small', 'medium', 'xmedium']),
|
|
275
|
+
textBoxVariant: PropTypes.oneOf(['primary', 'secondary', 'default']),
|
|
276
|
+
togglePopup: PropTypes.func,
|
|
277
|
+
valueKey: PropTypes.string,
|
|
278
|
+
htmlId: PropTypes.string,
|
|
279
|
+
isLoading: PropTypes.bool,
|
|
280
|
+
dataSelectorId: PropTypes.string,
|
|
281
|
+
title: PropTypes.string,
|
|
282
|
+
className: PropTypes.string,
|
|
283
|
+
needBorder: PropTypes.bool,
|
|
284
|
+
searchBoxSize: PropTypes.string,
|
|
285
|
+
needResponsive: PropTypes.bool,
|
|
286
|
+
boxSize: PropTypes.string,
|
|
287
|
+
emptyMessage: PropTypes.string
|
|
288
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
|
-
import { defaultProps } from '
|
|
3
|
-
import { propTypes } from '
|
|
2
|
+
import { defaultProps } from './props/defaultProps';
|
|
3
|
+
import { propTypes } from './props/propTypes';
|
|
4
4
|
import style from '../../Stencils/Stencils.module.css';
|
|
5
5
|
|
|
6
6
|
function Stencils(props) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export const propTypes = {
|
|
3
|
+
palette: PropTypes.oneOf(['primary', 'secondary', 'dark']),
|
|
4
|
+
shape: PropTypes.oneOf(['rect', 'circle']),
|
|
5
|
+
size: PropTypes.oneOf(['small', 'medium', 'large', 'default']),
|
|
6
|
+
customClass: PropTypes.string
|
|
7
|
+
};
|
package/es/v1/Switch/Switch.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
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
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { defaultProps } from '
|
|
5
|
-
import { propTypes } from '
|
|
4
|
+
import { defaultProps } from './props/defaultProps';
|
|
5
|
+
import { propTypes } from './props/propTypes';
|
|
6
6
|
import { Container, Box } from '../Layout';
|
|
7
7
|
import Label from '../Label/Label';
|
|
8
8
|
import style from '../../Switch/Switch.module.css';
|
|
@@ -54,7 +54,6 @@ const Switch = props => {
|
|
|
54
54
|
"data-title": disabled ? disableTitle : title,
|
|
55
55
|
"aria-checked": checked,
|
|
56
56
|
role: "switch",
|
|
57
|
-
tabIndex: isReadOnly || disabled ? '-1' : '0',
|
|
58
57
|
dataSelectorId: dataSelectorId
|
|
59
58
|
}, SwitchProps), /*#__PURE__*/React.createElement(Box, {
|
|
60
59
|
className: `${style[size]} ${customSwitchSize}`
|
|
@@ -72,7 +71,8 @@ const Switch = props => {
|
|
|
72
71
|
htmlFor: id,
|
|
73
72
|
"data-id": dataId,
|
|
74
73
|
"data-test-id": dataId,
|
|
75
|
-
className: `${style.label} ${style[`${size}Label`]} ${customSwitch}
|
|
74
|
+
className: `${style.label} ${style[`${size}Label`]} ${customSwitch}`,
|
|
75
|
+
tabIndex: isReadOnly || disabled ? '-1' : '0'
|
|
76
76
|
})), text && /*#__PURE__*/React.createElement(Label, _extends({
|
|
77
77
|
text: text,
|
|
78
78
|
palette: labelPalette,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export const propTypes = {
|
|
3
|
+
checked: PropTypes.bool,
|
|
4
|
+
dataId: PropTypes.string,
|
|
5
|
+
dataSelectorId: PropTypes.string,
|
|
6
|
+
disableTitle: PropTypes.string,
|
|
7
|
+
disabled: PropTypes.bool,
|
|
8
|
+
id: PropTypes.string.isRequired,
|
|
9
|
+
isReadOnly: PropTypes.bool,
|
|
10
|
+
labelPalette: PropTypes.oneOf(['default', 'primary', 'secondary', 'danger', 'mandatory']),
|
|
11
|
+
labelSize: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
12
|
+
name: PropTypes.string,
|
|
13
|
+
onChange: PropTypes.func,
|
|
14
|
+
size: PropTypes.oneOf(['small', 'medium']),
|
|
15
|
+
text: PropTypes.string,
|
|
16
|
+
title: PropTypes.string,
|
|
17
|
+
value: PropTypes.bool,
|
|
18
|
+
customClass: PropTypes.shape({
|
|
19
|
+
customSwitchWrap: PropTypes.string,
|
|
20
|
+
customSwitch: PropTypes.string,
|
|
21
|
+
customSwitchSize: PropTypes.string,
|
|
22
|
+
customLabel: PropTypes.string
|
|
23
|
+
}),
|
|
24
|
+
customProps: PropTypes.shape({
|
|
25
|
+
SwitchProps: PropTypes.object,
|
|
26
|
+
LabelProps: PropTypes.object
|
|
27
|
+
})
|
|
28
|
+
};
|
package/es/v1/Tab/Tab.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
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
2
|
|
|
3
|
-
/* eslint-disable react/forbid-component-props */
|
|
4
3
|
import React, { useMemo, useCallback } from 'react';
|
|
5
|
-
import { Tab_defaultProps } from '
|
|
6
|
-
import { Tab_propTypes } from '
|
|
4
|
+
import { Tab_defaultProps } from './props/defaultProps';
|
|
5
|
+
import { Tab_propTypes } from './props/propTypes';
|
|
7
6
|
import { Box, Container } from '../Layout';
|
|
8
7
|
import { cs } from '../../utils/Common';
|
|
9
|
-
import styles from '
|
|
8
|
+
import styles from './v1Tab.module.css';
|
|
10
9
|
const tabTypes = {
|
|
11
10
|
alpha: {
|
|
12
11
|
active: 'alphaActive',
|
package/es/v1/Tab/TabContent.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TabContent_defaultProps } from '
|
|
3
|
-
import { TabContent_propTypes } from '
|
|
2
|
+
import { TabContent_defaultProps } from './props/defaultProps';
|
|
3
|
+
import { TabContent_propTypes } from './props/propTypes';
|
|
4
4
|
import { Container } from '../Layout';
|
|
5
|
-
import style from '
|
|
5
|
+
import style from './v1TabContent.module.css';
|
|
6
6
|
/* eslint-disable react/forbid-component-props */
|
|
7
7
|
|
|
8
8
|
const TabContent = _ref => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TabContentWrapper_defaultProps } from '
|
|
3
|
-
import { TabContentWrapper_propTypes } from '
|
|
2
|
+
import { TabContentWrapper_defaultProps } from './props/defaultProps';
|
|
3
|
+
import { TabContentWrapper_propTypes } from './props/propTypes';
|
|
4
4
|
import { Box } from '../Layout';
|
|
5
5
|
/* eslint-disable react/forbid-component-props */
|
|
6
6
|
|
package/es/v1/Tab/TabWrapper.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
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
2
|
|
|
3
3
|
import React, { useState, useCallback } from 'react';
|
|
4
|
-
import { TabWrapper_defaultProps } from '
|
|
5
|
-
import { TabWrapper_propTypes } from '
|
|
4
|
+
import { TabWrapper_defaultProps } from './props/defaultProps';
|
|
5
|
+
import { TabWrapper_propTypes } from './props/propTypes';
|
|
6
6
|
import { Container } from '../Layout';
|
|
7
7
|
|
|
8
8
|
function TabWrapper(_ref) {
|