@zohodesk/components 1.0.0-temp-168 → 1.0.0-temp-169
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/PropLessFiles.html +1 -1
- package/.cli/PropValidationExcludeFilesArray.js +13 -3
- package/.cli/propValidation_report.html +1 -1
- package/README.md +48 -0
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +1 -0
- package/assets/Appearance/light/mode/Component_LightMode.module.css +1 -0
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +1 -0
- package/coverage/Button/Button.js.html +1 -1
- package/coverage/Button/css/Button.module.css.html +1 -1
- package/coverage/Button/css/cssJSLogic.js.html +1 -1
- package/coverage/Button/css/index.html +1 -1
- package/coverage/Button/index.html +1 -1
- package/coverage/Button/props/defaultProps.js.html +3 -6
- package/coverage/Button/props/index.html +1 -1
- package/coverage/Button/props/propTypes.js.html +9 -3
- package/coverage/Buttongroup/Buttongroup.js.html +1 -1
- package/coverage/Buttongroup/Buttongroup.module.css.html +1 -1
- package/coverage/Buttongroup/index.html +1 -1
- package/coverage/Buttongroup/props/defaultProps.js.html +1 -1
- package/coverage/Buttongroup/props/index.html +1 -1
- package/coverage/Buttongroup/props/propTypes.js.html +1 -1
- package/coverage/coverage-final.json +10 -10
- package/coverage/coverage-summary.json +10 -10
- package/coverage/index.html +1 -1
- package/coverage/utils/dummyFunction.js.html +1 -1
- package/coverage/utils/index.html +1 -1
- package/es/AppContainer/AppContainer.js +3 -0
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -28
- package/es/Button/props/defaultProps.js +1 -2
- package/es/Button/props/propTypes.js +3 -1
- package/es/DateTime/DateTime.module.css +2 -0
- package/es/DateTime/DateWidget.js +2 -1
- package/es/DateTime/dateFormatUtils/dayChange.js +2 -1
- package/es/DateTime/dateFormatUtils/index.js +1 -1
- package/es/DateTime/dateFormatUtils/monthChange.js +2 -1
- package/es/DateTime/dateFormatUtils/timeChange.js +4 -4
- package/es/DateTime/dateFormatUtils/yearChange.js +2 -1
- package/es/DropBox/DropBox.js +10 -10
- package/es/DropDown/DropDown.js +1 -7
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +7 -5
- package/es/MultiSelect/AdvancedMultiSelect.js +4 -4
- package/es/MultiSelect/MobileHeader/MobileHeader.js +50 -0
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
- package/es/MultiSelect/MobileHeader/props/defaultProps.js +7 -0
- package/es/MultiSelect/MobileHeader/props/propTypes.js +7 -0
- package/es/MultiSelect/MultiSelect.js +112 -91
- package/es/MultiSelect/MultiSelect.module.css +2 -5
- package/es/MultiSelect/MultiSelectHeader.js +1 -2
- package/es/MultiSelect/MultiSelectWithAvatar.js +15 -112
- package/es/MultiSelect/props/defaultProps.js +3 -1
- package/es/MultiSelect/props/propTypes.js +9 -57
- package/es/Responsive/RefWrapper.js +2 -1
- package/es/Select/GroupSelect.js +3 -5
- package/es/Select/Select.js +2 -5
- package/es/Select/SelectWithAvatar.js +2 -1
- package/es/Select/SelectWithIcon.js +5 -2
- package/es/TextBox/TextBox.js +3 -3
- package/es/TextBox/TextBox.module.css +5 -4
- package/es/Textarea/Textarea.module.css +3 -4
- package/es/deprecated/PortalLayer/props/propTypes.js +3 -1
- package/es/index.js +2 -1
- package/es/utils/Common.js +3 -0
- package/es/v1/Accordion/Accordion.js +66 -0
- package/es/v1/Accordion/AccordionItem.js +57 -0
- package/es/v1/Accordion/index.js +2 -0
- package/es/v1/Animation/Animation.js +127 -0
- package/es/v1/AppContainer/AppContainer.js +137 -0
- package/es/v1/Avatar/Avatar.js +139 -0
- package/es/v1/AvatarTeam/AvatarTeam.js +70 -0
- package/es/v1/Button/Button.js +68 -0
- package/es/v1/Buttongroup/Buttongroup.js +31 -0
- package/es/v1/Card/Card.js +271 -0
- package/es/v1/CheckBox/CheckBox.js +155 -0
- package/es/v1/DateTime/CalendarView.js +218 -0
- package/es/v1/DateTime/DateTime.js +783 -0
- package/es/v1/DateTime/DateTimePopupFooter.js +47 -0
- package/es/v1/DateTime/DateTimePopupHeader.js +105 -0
- package/es/v1/DateTime/DateWidget.js +1098 -0
- package/es/v1/DateTime/DaysRow.js +31 -0
- package/es/v1/DateTime/Time.js +166 -0
- package/es/v1/DateTime/YearView.js +264 -0
- package/es/v1/DateTime/index.js +1 -0
- package/es/v1/DropBox/DropBox.js +91 -0
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +132 -0
- package/es/v1/DropDown/DropDown.js +73 -0
- package/es/v1/DropDown/DropDownHeading.js +44 -0
- package/es/v1/DropDown/DropDownItem.js +76 -0
- package/es/v1/DropDown/DropDownSearch.js +63 -0
- package/es/v1/DropDown/DropDownSeparator.js +15 -0
- package/es/v1/Heading/Heading.js +32 -0
- package/es/v1/Label/Label.js +40 -0
- package/es/v1/Layout/Box.js +115 -0
- package/es/v1/Layout/Container.js +132 -0
- package/es/v1/Layout/index.js +2 -0
- package/es/v1/ListItem/ListContainer.js +102 -0
- package/es/v1/ListItem/ListItem.js +124 -0
- package/es/v1/ListItem/ListItemWithAvatar.js +145 -0
- package/es/v1/ListItem/ListItemWithCheckBox.js +104 -0
- package/es/v1/ListItem/ListItemWithIcon.js +127 -0
- package/es/v1/ListItem/ListItemWithRadio.js +105 -0
- package/es/v1/ListItem/index.js +6 -0
- package/es/v1/Modal/Modal.js +154 -0
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +1079 -0
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +568 -0
- package/es/v1/MultiSelect/EmptyState.js +64 -0
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +50 -0
- package/es/v1/MultiSelect/MultiSelect.js +1120 -0
- package/es/v1/MultiSelect/MultiSelectHeader.js +32 -0
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +216 -0
- package/es/v1/MultiSelect/SelectedOptions.js +82 -0
- package/es/v1/MultiSelect/Suggestions.js +142 -0
- package/es/v1/MultiSelect/index.js +4 -0
- package/es/v1/PopOver/PopOver.js +176 -0
- package/es/v1/Popup/Popup.js +645 -0
- package/es/v1/Radio/Radio.js +115 -0
- package/es/v1/Responsive/CustomResponsive.js +195 -0
- package/es/v1/Responsive/RefWrapper.js +39 -0
- package/es/v1/Responsive/ResizeComponent.js +197 -0
- package/es/v1/Responsive/ResizeObserver.js +140 -0
- package/es/v1/Responsive/Responsive.js +194 -0
- package/es/v1/Responsive/index.js +9 -0
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +58 -0
- package/es/v1/Ribbon/Ribbon.js +33 -0
- package/es/v1/RippleEffect/RippleEffect.js +24 -0
- package/es/v1/Select/GroupSelect.js +800 -0
- package/es/v1/Select/Select.js +966 -0
- package/es/v1/Select/SelectWithAvatar.js +344 -0
- package/es/v1/Select/SelectWithIcon.js +535 -0
- package/es/v1/Select/index.js +4 -0
- package/es/v1/Stencils/Stencils.js +26 -0
- package/es/v1/Switch/Switch.js +94 -0
- package/es/v1/Tab/Tab.js +108 -0
- package/es/v1/Tab/TabContent.js +30 -0
- package/es/v1/Tab/TabContentWrapper.js +29 -0
- package/es/v1/Tab/TabWrapper.js +57 -0
- package/es/v1/Tab/Tabs.js +612 -0
- package/es/v1/Tab/index.js +5 -0
- package/es/v1/Tag/Tag.js +134 -0
- package/es/v1/TextBox/TextBox.js +154 -0
- package/es/v1/TextBoxIcon/TextBoxIcon.js +158 -0
- package/es/v1/Textarea/Textarea.js +102 -0
- package/es/v1/Tooltip/Tooltip.js +518 -0
- package/es/v1/Typography/Typography.js +38 -0
- package/es/v1/Typography/css/Typography.module.css +376 -0
- package/es/v1/Typography/css/cssJSLogic.js +46 -0
- package/es/v1/Typography/css/letterSpacingMap.js +12 -0
- package/es/v1/Typography/props/defaultProps.js +8 -0
- package/es/v1/Typography/props/propTypes.js +24 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +69 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +100 -0
- package/es/v1/semantic/Button/Button.js +53 -0
- package/es/v1/semantic/index.js +1 -0
- package/lib/AppContainer/AppContainer.js +5 -0
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -28
- package/lib/Button/props/defaultProps.js +1 -2
- package/lib/Button/props/propTypes.js +3 -1
- package/lib/DateTime/DateTime.module.css +2 -0
- package/lib/DateTime/DateWidget.js +2 -1
- package/lib/DateTime/dateFormatUtils/dayChange.js +3 -1
- package/lib/DateTime/dateFormatUtils/index.js +1 -1
- package/lib/DateTime/dateFormatUtils/monthChange.js +3 -1
- package/lib/DateTime/dateFormatUtils/timeChange.js +3 -3
- package/lib/DateTime/dateFormatUtils/yearChange.js +3 -1
- package/lib/DropBox/DropBox.js +15 -15
- package/lib/DropDown/DropDown.js +1 -6
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +7 -6
- package/lib/MultiSelect/AdvancedMultiSelect.js +4 -4
- package/lib/MultiSelect/MobileHeader/MobileHeader.js +62 -0
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
- package/lib/MultiSelect/MobileHeader/props/defaultProps.js +14 -0
- package/lib/MultiSelect/MobileHeader/props/propTypes.js +18 -0
- package/lib/MultiSelect/MultiSelect.js +116 -96
- package/lib/MultiSelect/MultiSelect.module.css +2 -5
- package/lib/MultiSelect/MultiSelectHeader.js +1 -2
- package/lib/MultiSelect/MultiSelectWithAvatar.js +18 -113
- package/lib/MultiSelect/props/defaultProps.js +3 -1
- package/lib/MultiSelect/props/propTypes.js +19 -60
- package/lib/Responsive/RefWrapper.js +2 -1
- package/lib/Select/GroupSelect.js +2 -2
- package/lib/Select/Select.js +1 -2
- package/lib/Select/SelectWithAvatar.js +2 -1
- package/lib/Select/SelectWithIcon.js +5 -3
- package/lib/TextBox/TextBox.js +10 -10
- package/lib/TextBox/TextBox.module.css +5 -4
- package/lib/Textarea/Textarea.module.css +3 -4
- package/lib/deprecated/PortalLayer/props/propTypes.js +3 -1
- package/lib/index.js +10 -1
- package/lib/utils/Common.js +5 -0
- package/lib/v1/Accordion/Accordion.js +98 -0
- package/lib/v1/Accordion/AccordionItem.js +68 -0
- package/lib/v1/Accordion/index.js +23 -0
- package/lib/v1/Animation/Animation.js +143 -0
- package/lib/v1/AppContainer/AppContainer.js +209 -0
- package/lib/v1/Avatar/Avatar.js +190 -0
- package/lib/v1/AvatarTeam/AvatarTeam.js +81 -0
- package/lib/v1/Button/Button.js +82 -0
- package/lib/v1/Buttongroup/Buttongroup.js +44 -0
- package/lib/v1/Card/Card.js +365 -0
- package/lib/v1/CheckBox/CheckBox.js +166 -0
- package/lib/v1/DateTime/CalendarView.js +285 -0
- package/lib/v1/DateTime/DateTime.js +872 -0
- package/lib/v1/DateTime/DateTimePopupFooter.js +96 -0
- package/lib/v1/DateTime/DateTimePopupHeader.js +166 -0
- package/lib/v1/DateTime/DateWidget.js +1125 -0
- package/lib/v1/DateTime/DaysRow.js +80 -0
- package/lib/v1/DateTime/Time.js +254 -0
- package/lib/v1/DateTime/YearView.js +325 -0
- package/lib/v1/DateTime/index.js +15 -0
- package/lib/v1/DropBox/DropBox.js +119 -0
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +145 -0
- package/lib/v1/DropDown/DropDown.js +170 -0
- package/lib/v1/DropDown/DropDownHeading.js +93 -0
- package/lib/v1/DropDown/DropDownItem.js +127 -0
- package/lib/v1/DropDown/DropDownSearch.js +113 -0
- package/lib/v1/DropDown/DropDownSeparator.js +64 -0
- package/lib/v1/Heading/Heading.js +49 -0
- package/lib/v1/Label/Label.js +51 -0
- package/lib/v1/Layout/Box.js +128 -0
- package/lib/v1/Layout/Container.js +145 -0
- package/lib/v1/Layout/index.js +23 -0
- package/lib/v1/ListItem/ListContainer.js +120 -0
- package/lib/v1/ListItem/ListItem.js +138 -0
- package/lib/v1/ListItem/ListItemWithAvatar.js +162 -0
- package/lib/v1/ListItem/ListItemWithCheckBox.js +125 -0
- package/lib/v1/ListItem/ListItemWithIcon.js +143 -0
- package/lib/v1/ListItem/ListItemWithRadio.js +126 -0
- package/lib/v1/ListItem/index.js +55 -0
- package/lib/v1/Modal/Modal.js +212 -0
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +1167 -0
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +634 -0
- package/lib/v1/MultiSelect/EmptyState.js +112 -0
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +62 -0
- package/lib/v1/MultiSelect/MultiSelect.js +1201 -0
- package/lib/v1/MultiSelect/MultiSelectHeader.js +78 -0
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +270 -0
- package/lib/v1/MultiSelect/SelectedOptions.js +126 -0
- package/lib/v1/MultiSelect/Suggestions.js +195 -0
- package/lib/v1/MultiSelect/index.js +39 -0
- package/lib/v1/PopOver/PopOver.js +197 -0
- package/lib/v1/Popup/Popup.js +715 -0
- package/lib/v1/Radio/Radio.js +126 -0
- package/lib/v1/Responsive/CustomResponsive.js +242 -0
- package/lib/v1/Responsive/RefWrapper.js +57 -0
- package/lib/v1/Responsive/ResizeComponent.js +268 -0
- package/lib/v1/Responsive/ResizeObserver.js +168 -0
- package/lib/v1/Responsive/Responsive.js +274 -0
- package/lib/v1/Responsive/index.js +55 -0
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +79 -0
- package/lib/v1/Ribbon/Ribbon.js +44 -0
- package/lib/v1/RippleEffect/RippleEffect.js +39 -0
- package/lib/v1/Select/GroupSelect.js +876 -0
- package/lib/v1/Select/Select.js +1012 -0
- package/lib/v1/Select/SelectWithAvatar.js +394 -0
- package/lib/v1/Select/SelectWithIcon.js +597 -0
- package/lib/v1/Select/index.js +39 -0
- package/lib/v1/Stencils/Stencils.js +43 -0
- package/lib/v1/Switch/Switch.js +108 -0
- package/lib/v1/Tab/Tab.js +132 -0
- package/lib/v1/Tab/TabContent.js +42 -0
- package/lib/v1/Tab/TabContentWrapper.js +42 -0
- package/lib/v1/Tab/TabWrapper.js +89 -0
- package/lib/v1/Tab/Tabs.js +680 -0
- package/lib/v1/Tab/index.js +47 -0
- package/lib/v1/Tag/Tag.js +154 -0
- package/lib/v1/TextBox/TextBox.js +168 -0
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +196 -0
- package/lib/v1/Textarea/Textarea.js +118 -0
- package/lib/v1/Tooltip/Tooltip.js +586 -0
- package/lib/v1/Typography/Typography.js +56 -0
- package/lib/v1/Typography/css/Typography.module.css +376 -0
- package/lib/v1/Typography/css/cssJSLogic.js +41 -0
- package/lib/v1/Typography/css/letterSpacingMap.js +20 -0
- package/lib/v1/Typography/props/defaultProps.js +15 -0
- package/lib/v1/Typography/props/propTypes.js +35 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +90 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +126 -0
- package/lib/v1/semantic/Button/Button.js +63 -0
- package/lib/v1/semantic/index.js +15 -0
- package/package.json +10 -10
- package/result.json +1 -1
|
@@ -4,28 +4,25 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { MultiSelectWithAvatar_propTypes } from './props/propTypes';
|
|
6
6
|
import { MultiSelectWithAvatar_defaultProps } from './props/defaultProps';
|
|
7
|
+
import { defaultProps as MobileHeader_defaultProps } from './MobileHeader/props/defaultProps';
|
|
7
8
|
/**** Components ****/
|
|
8
9
|
|
|
9
10
|
import { MultiSelectComponent } from './MultiSelect';
|
|
10
11
|
import Popup from '../Popup/Popup';
|
|
11
|
-
import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
|
|
12
12
|
import { Container, Box } from '../Layout';
|
|
13
13
|
import Card, { CardContent, CardHeader } from '../Card/Card';
|
|
14
|
-
import SelectedOptions from './SelectedOptions';
|
|
15
14
|
import Suggestions from './Suggestions';
|
|
16
15
|
import EmptyState from './EmptyState';
|
|
17
|
-
import MultiSelectHeader from './MultiSelectHeader';
|
|
18
16
|
import CssProvider from '../Provider/CssProvider';
|
|
19
17
|
import { getUniqueId } from '../Provider/IdProvider';
|
|
20
18
|
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
21
19
|
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
22
20
|
import Loader from '@zohodesk/svg/lib/Loader/Loader';
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
import { Icon } from '@zohodesk/icons';
|
|
21
|
+
import MultiSelectHeader from './MultiSelectHeader';
|
|
26
22
|
/**** CSS ****/
|
|
27
23
|
|
|
28
24
|
import style from './MultiSelect.module.css';
|
|
25
|
+
import MobileHeader from './MobileHeader/MobileHeader';
|
|
29
26
|
/*eslint-disable react/sort-prop-types*/
|
|
30
27
|
|
|
31
28
|
/* eslint-disable react/forbid-component-props */
|
|
@@ -76,7 +73,6 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
76
73
|
emptyMessage,
|
|
77
74
|
noMoreOptionsMessage,
|
|
78
75
|
dropBoxSize,
|
|
79
|
-
placeHolder,
|
|
80
76
|
isPopupOpen,
|
|
81
77
|
isPopupReady,
|
|
82
78
|
position,
|
|
@@ -86,24 +82,15 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
86
82
|
removeClose,
|
|
87
83
|
isAnimate,
|
|
88
84
|
animationStyle,
|
|
89
|
-
textBoxSize,
|
|
90
|
-
variant,
|
|
91
|
-
size,
|
|
92
85
|
isDisabled,
|
|
93
86
|
title,
|
|
94
87
|
dataId,
|
|
95
88
|
dataSelectorId,
|
|
96
89
|
needResponsive,
|
|
97
90
|
borderColor,
|
|
98
|
-
textBoxClass,
|
|
99
|
-
needBorder,
|
|
100
91
|
disableAction,
|
|
101
92
|
palette,
|
|
102
|
-
htmlId,
|
|
103
93
|
i18nKeys,
|
|
104
|
-
a11y,
|
|
105
|
-
children,
|
|
106
|
-
customChildrenClass,
|
|
107
94
|
isBoxPaddingNeed,
|
|
108
95
|
needEffect,
|
|
109
96
|
isLoading,
|
|
@@ -111,16 +98,9 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
111
98
|
customProps
|
|
112
99
|
} = this.props;
|
|
113
100
|
let {
|
|
114
|
-
TextBoxProps = {},
|
|
115
101
|
SuggestionsProps = {}
|
|
116
102
|
} = customProps;
|
|
117
|
-
|
|
118
|
-
clearText = 'Clear all'
|
|
119
|
-
} = i18nKeys;
|
|
120
|
-
const {
|
|
121
|
-
clearLabel = 'Clear all'
|
|
122
|
-
} = a11y;
|
|
123
|
-
i18nKeys = Object.assign({}, i18nKeys, {
|
|
103
|
+
i18nKeys = Object.assign({}, MobileHeader_defaultProps.i18nKeys, i18nKeys, {
|
|
124
104
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
125
105
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage,
|
|
126
106
|
noMoreText: i18nKeys.noMoreText || noMoreOptionsMessage
|
|
@@ -129,17 +109,14 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
129
109
|
selectedOptions,
|
|
130
110
|
searchStr,
|
|
131
111
|
hoverOption,
|
|
132
|
-
highLightedSelectOptions,
|
|
133
112
|
options,
|
|
134
113
|
isFetchingOptions,
|
|
135
|
-
isActive,
|
|
136
114
|
selectedOptionIds
|
|
137
115
|
} = this.state;
|
|
138
116
|
const suggestions = this.handleFilterSuggestions();
|
|
139
117
|
const setAriaId = this.getNextAriaId();
|
|
140
118
|
const ariaErrorId = this.getNextAriaId();
|
|
141
119
|
const popUpState = !isReadOnly && !isDisabled && !disableAction && isPopupOpen;
|
|
142
|
-
const isShowClearIcon = !isReadOnly && !isDisabled && !disableAction && selectedOptions.length > 1;
|
|
143
120
|
return /*#__PURE__*/React.createElement("div", {
|
|
144
121
|
className: ` ${style.wrapper} ${isDisabled ? style.disabled : ''} ${isReadOnly ? style.readOnly : ''} ${disableAction ? CssProvider('isBlock') : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''}`,
|
|
145
122
|
"data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`,
|
|
@@ -147,79 +124,7 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
147
124
|
"data-title": isDisabled ? title : null,
|
|
148
125
|
onClick: this.handleInputFocus,
|
|
149
126
|
"data-selector-id": dataSelectorId
|
|
150
|
-
}, /*#__PURE__*/React.createElement(
|
|
151
|
-
align: "vertical",
|
|
152
|
-
alignBox: "row",
|
|
153
|
-
className: `${style.container} ${style[size]} ${needBorder ? style[`borderColor_${borderColor}`] : ''} ${isActive && needBorder ? style.active : ''} ${textBoxClass ? textBoxClass : ''} ${needBorder ? style.hasBorder : ''}`,
|
|
154
|
-
eleRef: this.selectedOptionContainerRef,
|
|
155
|
-
wrap: "wrap"
|
|
156
|
-
}, /*#__PURE__*/React.createElement(SelectedOptions, {
|
|
157
|
-
selectedOptions: selectedOptions,
|
|
158
|
-
highLightedSelectOptions: highLightedSelectOptions,
|
|
159
|
-
isReadOnly: isReadOnly,
|
|
160
|
-
getRef: this.selectedOptionRef,
|
|
161
|
-
onRemove: this.handleRemoveOption,
|
|
162
|
-
onSelect: this.handleClickSelectedOption,
|
|
163
|
-
size: size,
|
|
164
|
-
palette: palette
|
|
165
|
-
}), /*#__PURE__*/React.createElement(Box, {
|
|
166
|
-
flexible: true,
|
|
167
|
-
className: style.wrapper,
|
|
168
|
-
adjust: true,
|
|
169
|
-
shrink: true
|
|
170
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
171
|
-
className: ` ${style.custmSpan} ${textBoxSize === 'xmedium' ? style.custmSpanXmedium : style.custmSpanMedium} ${isShowClearIcon ? style.clearIconSpace : ''}
|
|
172
|
-
${customChildrenClass ? customChildrenClass : ''}`
|
|
173
|
-
}, searchStr), /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
174
|
-
isDisabled: isDisabled,
|
|
175
|
-
inputRef: this.searchInputRef,
|
|
176
|
-
needBorder: false,
|
|
177
|
-
onBlur: this.handleInactive,
|
|
178
|
-
onChange: this.handleSearch,
|
|
179
|
-
onClick: this.handleInputCick,
|
|
180
|
-
onFocus: this.handleActive,
|
|
181
|
-
onKeyDown: this.handleKeyDown,
|
|
182
|
-
placeHolder: selectedOptions.length >= 1 ? '' : placeHolder,
|
|
183
|
-
size: textBoxSize,
|
|
184
|
-
value: searchStr,
|
|
185
|
-
variant: variant,
|
|
186
|
-
dataId: `${dataId}_textBox`,
|
|
187
|
-
isReadOnly: isReadOnly,
|
|
188
|
-
tabindex: isDisabled && '-1',
|
|
189
|
-
htmlId: htmlId,
|
|
190
|
-
a11y: {
|
|
191
|
-
ariaExpanded: popUpState ? true : false,
|
|
192
|
-
ariaHaspopup: true,
|
|
193
|
-
role: 'combobox',
|
|
194
|
-
ariaControls: setAriaId,
|
|
195
|
-
ariaOwns: setAriaId,
|
|
196
|
-
ariaDescribedby: ariaErrorId
|
|
197
|
-
},
|
|
198
|
-
customClass: {
|
|
199
|
-
customTBoxWrap: style.custmInputWrapper
|
|
200
|
-
},
|
|
201
|
-
autoComplete: false,
|
|
202
|
-
customProps: {
|
|
203
|
-
TextBoxProps: TextBoxProps
|
|
204
|
-
}
|
|
205
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
206
|
-
isCover: false,
|
|
207
|
-
alignBox: "row",
|
|
208
|
-
align: "vertical",
|
|
209
|
-
className: style.iconContainer
|
|
210
|
-
}, children ? /*#__PURE__*/React.createElement(Box, {
|
|
211
|
-
dataId: `${dataId}_children`
|
|
212
|
-
}, children) : null, isShowClearIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
213
|
-
className: `${style.delete} ${style[`${palette}Delete`]}`,
|
|
214
|
-
dataId: `${dataId}_clearIcon`,
|
|
215
|
-
"data-title": clearText,
|
|
216
|
-
onClick: this.handleDeselectAll,
|
|
217
|
-
tagName: "button",
|
|
218
|
-
"aria-label": clearLabel
|
|
219
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
220
|
-
name: "ZD-delete",
|
|
221
|
-
size: "15"
|
|
222
|
-
})) : null)))), popUpState ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
127
|
+
}, this.getSelectionUI(), popUpState ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
223
128
|
query: this.responsiveFunc,
|
|
224
129
|
responsiveId: "Helmet"
|
|
225
130
|
}, _ref2 => {
|
|
@@ -250,13 +155,18 @@ class MultiSelectWithAvatarComponent extends MultiSelectComponent {
|
|
|
250
155
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
251
156
|
customClass: `${style.box} ${style[`${palette}Box`]}`,
|
|
252
157
|
onScroll: this.handleScroll
|
|
253
|
-
}, /*#__PURE__*/React.createElement(
|
|
254
|
-
|
|
158
|
+
}, tabletMode && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MobileHeader, {
|
|
159
|
+
selectedOptions: selectedOptions,
|
|
160
|
+
i18nKeys: i18nKeys,
|
|
161
|
+
onClick: this.handlePopupClose
|
|
162
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
163
|
+
className: style.effect
|
|
164
|
+
}, this.getSelectionUI(true)))), needSelectAll ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
|
|
255
165
|
onSelect: this.handleSelectAll,
|
|
256
166
|
selectAllText: selectAllText,
|
|
257
167
|
suggestions: suggestions,
|
|
258
168
|
dataId: dataId
|
|
259
|
-
})), isLoading ? /*#__PURE__*/React.createElement(Container, {
|
|
169
|
+
})) : null, isLoading ? /*#__PURE__*/React.createElement(Container, {
|
|
260
170
|
align: "both",
|
|
261
171
|
className: style.loader
|
|
262
172
|
}, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(CardContent, {
|
|
@@ -299,13 +209,6 @@ MultiSelectWithAvatarComponent.propTypes = MultiSelectWithAvatar_propTypes;
|
|
|
299
209
|
MultiSelectWithAvatarComponent.defaultProps = MultiSelectWithAvatar_defaultProps;
|
|
300
210
|
MultiSelectWithAvatarComponent.displayName = 'MultiSelectWithAvatar';
|
|
301
211
|
const MultiSelectWithAvatar = Popup(MultiSelectWithAvatarComponent);
|
|
302
|
-
MultiSelectWithAvatar.defaultProps = MultiSelectWithAvatarComponent.defaultProps;
|
|
303
|
-
|
|
304
|
-
// componentGroup: 'Form Elements',
|
|
305
|
-
// folderName: 'Style Guide'
|
|
306
|
-
// };
|
|
307
|
-
// // eslint-disable-next-line react/forbid-foreign-prop-types
|
|
308
|
-
// MultiSelectWithAvatar.propTypes = MultiSelectWithAvatarComponent.propTypes;
|
|
309
|
-
// }
|
|
310
|
-
|
|
212
|
+
MultiSelectWithAvatar.defaultProps = MultiSelectWithAvatarComponent.defaultProps;
|
|
213
|
+
MultiSelectWithAvatar.propTypes = MultiSelectWithAvatarComponent.propTypes;
|
|
311
214
|
export default MultiSelectWithAvatar;
|
|
@@ -107,7 +107,9 @@ export const MultiSelect_defaultProps = {
|
|
|
107
107
|
boxSize: 'default',
|
|
108
108
|
isLoading: false,
|
|
109
109
|
dataSelectorId: 'multiSelect',
|
|
110
|
-
keepSelectedOptions: false
|
|
110
|
+
keepSelectedOptions: false,
|
|
111
|
+
selectedOptionsCount: 0,
|
|
112
|
+
cardHeaderName: ''
|
|
111
113
|
};
|
|
112
114
|
export const MultiSelectHeader_defaultProps = {
|
|
113
115
|
dataId: 'MultiSelectHeader'
|
|
@@ -62,7 +62,8 @@ export const AdvancedGroupMultiSelect_propTypes = {
|
|
|
62
62
|
onChange: PropTypes.func,
|
|
63
63
|
needToCloseOnSelect: PropTypes.func,
|
|
64
64
|
searchStr: PropTypes.string,
|
|
65
|
-
children: PropTypes.node
|
|
65
|
+
children: PropTypes.node,
|
|
66
|
+
dataSelectorId: PropTypes.string
|
|
66
67
|
};
|
|
67
68
|
export const AdvancedMultiSelect_propTypes = {
|
|
68
69
|
id: PropTypes.string.isRequired,
|
|
@@ -164,7 +165,7 @@ export const MultiSelect_propTypes = {
|
|
|
164
165
|
borderColor: PropTypes.oneOf(['transparent', 'default', 'dark']),
|
|
165
166
|
closePopupOnly: PropTypes.func,
|
|
166
167
|
dataId: PropTypes.string,
|
|
167
|
-
defaultDropBoxPosition: PropTypes.
|
|
168
|
+
defaultDropBoxPosition: PropTypes.oneOf(['bottom', 'top', 'left', 'right']),
|
|
168
169
|
disableAction: PropTypes.bool,
|
|
169
170
|
dropBoxSize: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
170
171
|
emptyMessage: PropTypes.string.isRequired,
|
|
@@ -197,7 +198,6 @@ export const MultiSelect_propTypes = {
|
|
|
197
198
|
needBorder: PropTypes.bool,
|
|
198
199
|
needLocalSearch: PropTypes.bool,
|
|
199
200
|
needResponsive: PropTypes.bool,
|
|
200
|
-
needSelectAll: PropTypes.bool,
|
|
201
201
|
needToCloseOnSelect: PropTypes.bool,
|
|
202
202
|
//For Group multiSelect
|
|
203
203
|
noMoreOptionsMessage: PropTypes.string,
|
|
@@ -219,7 +219,6 @@ export const MultiSelect_propTypes = {
|
|
|
219
219
|
removeClose: PropTypes.func,
|
|
220
220
|
searchDebounceTime: PropTypes.number,
|
|
221
221
|
searchEmptyMessage: PropTypes.string,
|
|
222
|
-
selectAllText: PropTypes.string,
|
|
223
222
|
selectedOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])).isRequired,
|
|
224
223
|
size: PropTypes.oneOf(['medium', 'xmedium']),
|
|
225
224
|
textBoxClass: PropTypes.string,
|
|
@@ -239,77 +238,30 @@ export const MultiSelect_propTypes = {
|
|
|
239
238
|
boxSize: PropTypes.string,
|
|
240
239
|
isLoading: PropTypes.bool,
|
|
241
240
|
dataSelectorId: PropTypes.string,
|
|
242
|
-
keepSelectedOptions: PropTypes.bool
|
|
241
|
+
keepSelectedOptions: PropTypes.bool,
|
|
242
|
+
needSelectAll: PropTypes.bool,
|
|
243
|
+
selectAllText: PropTypes.string,
|
|
244
|
+
setAriaId: PropTypes.string,
|
|
245
|
+
ariaErrorId: PropTypes.string
|
|
243
246
|
};
|
|
244
247
|
export const MultiSelectHeader_propTypes = {
|
|
245
248
|
dataId: PropTypes.string,
|
|
246
|
-
needSelectAll: PropTypes.bool,
|
|
247
249
|
onSelect: PropTypes.func,
|
|
248
250
|
selectAllText: PropTypes.string,
|
|
249
251
|
suggestions: PropTypes.array
|
|
250
252
|
};
|
|
251
253
|
export const MultiSelectWithAvatar_propTypes = {
|
|
252
|
-
dropBoxSize: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
253
254
|
options: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), PropTypes.arrayOf(PropTypes.shape({
|
|
254
255
|
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
255
256
|
text: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
256
257
|
photoURL: PropTypes.string
|
|
257
258
|
}))]).isRequired,
|
|
258
|
-
placeHolder: PropTypes.string,
|
|
259
|
-
emptyMessage: PropTypes.string.isRequired,
|
|
260
|
-
valueField: PropTypes.string,
|
|
261
|
-
textField: PropTypes.string,
|
|
262
259
|
imageField: PropTypes.string,
|
|
263
|
-
isReadOnly: PropTypes.bool,
|
|
264
|
-
needSelectAll: PropTypes.bool,
|
|
265
|
-
selectAllText: PropTypes.string,
|
|
266
|
-
defaultDropBoxPosition: PropTypes.oneOf(['bottom', 'top', 'left', 'right']),
|
|
267
|
-
searchEmptyMessage: PropTypes.string,
|
|
268
|
-
noMoreOptionsMessage: PropTypes.string,
|
|
269
|
-
isAnimate: PropTypes.bool,
|
|
270
|
-
animationStyle: PropTypes.string,
|
|
271
|
-
size: PropTypes.oneOf(['medium', 'xmedium']),
|
|
272
|
-
textBoxSize: PropTypes.oneOf(['small', 'medium', 'xmedium']),
|
|
273
|
-
variant: PropTypes.string,
|
|
274
|
-
isDisabled: PropTypes.bool,
|
|
275
|
-
title: PropTypes.string,
|
|
276
|
-
needResponsive: PropTypes.bool,
|
|
277
|
-
dataId: PropTypes.string,
|
|
278
|
-
borderColor: PropTypes.oneOf(['transparent', 'default']),
|
|
279
|
-
textBoxClass: PropTypes.string,
|
|
280
|
-
needBorder: PropTypes.bool,
|
|
281
|
-
disableAction: PropTypes.bool,
|
|
282
|
-
palette: PropTypes.oneOf(['default', 'dark']),
|
|
283
|
-
htmlId: PropTypes.string,
|
|
284
|
-
isBoxPaddingNeed: PropTypes.bool,
|
|
285
|
-
needEffect: PropTypes.bool,
|
|
286
|
-
keepSelectedOptions: PropTypes.bool,
|
|
287
260
|
customProps: PropTypes.shape({
|
|
288
261
|
SuggestionsProps: PropTypes.object,
|
|
289
262
|
DropBoxProps: PropTypes.object
|
|
290
263
|
}),
|
|
291
|
-
|
|
292
|
-
/**** Popup props ****/
|
|
293
|
-
isPopupOpen: PropTypes.bool,
|
|
294
|
-
isPopupReady: PropTypes.bool,
|
|
295
|
-
removeClose: PropTypes.func,
|
|
296
|
-
position: PropTypes.string,
|
|
297
|
-
getContainerRef: PropTypes.func,
|
|
298
|
-
i18nKeys: PropTypes.shape({
|
|
299
|
-
clearText: PropTypes.string,
|
|
300
|
-
loadingText: PropTypes.string,
|
|
301
|
-
emptyText: PropTypes.string,
|
|
302
|
-
noMoreText: PropTypes.string,
|
|
303
|
-
searchEmptyText: PropTypes.string
|
|
304
|
-
}),
|
|
305
|
-
a11y: PropTypes.shape({
|
|
306
|
-
clearLabel: PropTypes.string
|
|
307
|
-
}),
|
|
308
|
-
children: PropTypes.node,
|
|
309
|
-
customChildrenClass: PropTypes.string,
|
|
310
|
-
disabledOptions: PropTypes.arrayOf(PropTypes.string),
|
|
311
|
-
isLoading: PropTypes.bool,
|
|
312
|
-
dataSelectorId: PropTypes.string
|
|
264
|
+
...MultiSelect_propTypes
|
|
313
265
|
};
|
|
314
266
|
export const SelectedOptions_propTypes = {
|
|
315
267
|
getRef: PropTypes.func,
|
package/es/Select/GroupSelect.js
CHANGED
|
@@ -21,7 +21,7 @@ import style from './Select.module.css';
|
|
|
21
21
|
/**** Methods ****/
|
|
22
22
|
|
|
23
23
|
import { makeGetGroupSelectOptions, optionIdGrouping, makeGetGroupSelectFilterSuggestions, extractOptionId } from '../utils/dropDownUtils';
|
|
24
|
-
import { getIsEmptyValue, scrollTo, debounce, getSearchString, findScrollEnd } from '../utils/Common';
|
|
24
|
+
import { getIsEmptyValue, scrollTo, debounce, getSearchString, findScrollEnd, getKeyValue } from '../utils/Common';
|
|
25
25
|
/* eslint-disable react/no-unused-prop-types */
|
|
26
26
|
|
|
27
27
|
/* eslint-disable react/sort-prop-types */
|
|
@@ -425,10 +425,7 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
425
425
|
}
|
|
426
426
|
|
|
427
427
|
handleValueInputChange(e) {
|
|
428
|
-
let
|
|
429
|
-
which
|
|
430
|
-
} = e;
|
|
431
|
-
let typeString = String.fromCharCode(which);
|
|
428
|
+
let typeString = getKeyValue(e);
|
|
432
429
|
let {
|
|
433
430
|
isPopupOpen,
|
|
434
431
|
autoSelectOnType
|
|
@@ -790,6 +787,7 @@ GroupSelectComponent.defaultProps = GroupSelect_defaultProps;
|
|
|
790
787
|
GroupSelectComponent.displayName = 'GroupSelect';
|
|
791
788
|
let GroupSelect = Popup(GroupSelectComponent);
|
|
792
789
|
GroupSelect.defaultProps = GroupSelectComponent.defaultProps;
|
|
790
|
+
GroupSelect.propTypes = GroupSelectComponent.propTypes;
|
|
793
791
|
export default GroupSelect; // if (__DOCS__) {
|
|
794
792
|
// GroupSelect.docs = {
|
|
795
793
|
// componentGroup: 'Form Elements',
|
package/es/Select/Select.js
CHANGED
|
@@ -21,7 +21,7 @@ import Loader from '@zohodesk/svg/lib/Loader/Loader';
|
|
|
21
21
|
/**** Methods ****/
|
|
22
22
|
|
|
23
23
|
import { makeFormatOptions, makeGetMultiSelectFilterSuggestions as makeGetFilterSuggestions, makeGetSelectedValueText as makeGetSelectedValue } from '../utils/dropDownUtils';
|
|
24
|
-
import { debounce, scrollTo, getIsEmptyValue, getSearchString, findScrollEnd } from '../utils/Common.js';
|
|
24
|
+
import { debounce, scrollTo, getIsEmptyValue, getSearchString, findScrollEnd, getKeyValue } from '../utils/Common.js';
|
|
25
25
|
/**** CSS ****/
|
|
26
26
|
|
|
27
27
|
import style from './Select.module.css';
|
|
@@ -564,10 +564,7 @@ export class SelectComponent extends Component {
|
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
handleValueInputChange(e) {
|
|
567
|
-
let
|
|
568
|
-
which
|
|
569
|
-
} = e;
|
|
570
|
-
let typeString = String.fromCharCode(which);
|
|
567
|
+
let typeString = getKeyValue(e);
|
|
571
568
|
let {
|
|
572
569
|
isPopupOpen,
|
|
573
570
|
autoSelectOnType
|
|
@@ -331,7 +331,8 @@ SelectWithAvatarComponent.propTypes = SelectWithAvatar_propTypes;
|
|
|
331
331
|
SelectWithAvatarComponent.defaultProps = SelectWithAvatar_defaultProps;
|
|
332
332
|
SelectWithAvatarComponent.displayName = 'SelectWithAvatar';
|
|
333
333
|
let SelectWithAvatar = Popup(SelectWithAvatarComponent);
|
|
334
|
-
SelectWithAvatar.defaultProps = SelectWithAvatarComponent.defaultProps;
|
|
334
|
+
SelectWithAvatar.defaultProps = SelectWithAvatarComponent.defaultProps;
|
|
335
|
+
SelectWithAvatar.propTypes = SelectWithAvatarComponent.propTypes; // if (__DOCS__) {
|
|
335
336
|
// SelectWithAvatar.docs = {
|
|
336
337
|
// componentGroup: 'Form Elements',
|
|
337
338
|
// folderName: 'Style Guide'
|
|
@@ -520,11 +520,14 @@ class SelectWithIcon extends Component {
|
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
SelectWithIcon.propTypes = SelectWithIcon_propTypes;
|
|
523
|
-
SelectWithIcon.defaultProps = SelectWithIcon_defaultProps;
|
|
523
|
+
SelectWithIcon.defaultProps = SelectWithIcon_defaultProps;
|
|
524
|
+
const SelectWithIconComponent = Popup(SelectWithIcon);
|
|
525
|
+
SelectWithIconComponent.defaultProps = SelectWithIcon.defaultProps;
|
|
526
|
+
SelectWithIconComponent.propTypes = SelectWithIcon.propTypes; // if (__DOCS__) {
|
|
524
527
|
// SelectWithIcon.docs = {
|
|
525
528
|
// componentGroup: 'Form Elements',
|
|
526
529
|
// folderName: 'Style Guide'
|
|
527
530
|
// };
|
|
528
531
|
// }
|
|
529
532
|
|
|
530
|
-
export default
|
|
533
|
+
export default SelectWithIconComponent;
|
package/es/TextBox/TextBox.js
CHANGED
|
@@ -6,7 +6,7 @@ import { propTypes } from './props/propTypes';
|
|
|
6
6
|
/* eslint css-modules/no-unused-class: [2, { markAsUsed: ['xmedium', 'medium', 'small', 'default', 'primary', 'secondary'] }] */
|
|
7
7
|
|
|
8
8
|
import style from './TextBox.module.css';
|
|
9
|
-
export default class
|
|
9
|
+
export default class TextBox extends React.PureComponent {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(props);
|
|
12
12
|
this.onChange = this.onChange.bind(this);
|
|
@@ -171,8 +171,8 @@ export default class Textbox extends React.PureComponent {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
}
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
TextBox.defaultProps = defaultProps;
|
|
175
|
+
TextBox.propTypes = propTypes; // if (__DOCS__) {
|
|
176
176
|
// Textbox.docs = {
|
|
177
177
|
// componentGroup: 'Form Elements',
|
|
178
178
|
// folderName: 'Style Guide',
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
/* Variable:Ignore */
|
|
14
14
|
--textbox_letter_spacing: 0.1px;
|
|
15
15
|
--textbox_padding: 0;
|
|
16
|
-
--textbox_cursor: auto;
|
|
17
16
|
--textbox_line_height: 35px;
|
|
18
17
|
|
|
19
18
|
/* textbox placeholder default variable */
|
|
@@ -26,7 +25,7 @@
|
|
|
26
25
|
appearance: none;
|
|
27
26
|
letter-spacing: var(--textbox_letter_spacing);
|
|
28
27
|
border: var(--textbox_border_width);
|
|
29
|
-
cursor:
|
|
28
|
+
cursor: text;
|
|
30
29
|
}
|
|
31
30
|
.basic::placeholder {
|
|
32
31
|
color: var(--textbox_placeholder_text_color);
|
|
@@ -60,9 +59,11 @@
|
|
|
60
59
|
.basic:disabled,
|
|
61
60
|
.container:disabled,
|
|
62
61
|
.container:disabled:hover {
|
|
63
|
-
--textbox_cursor: not-allowed;
|
|
64
62
|
--textbox_text_color: var(--zdt_textbox_disabled_text);
|
|
65
63
|
}
|
|
64
|
+
.basic:disabled, .container:disabled, .container:disabled:hover {
|
|
65
|
+
cursor: not-allowed;
|
|
66
|
+
}
|
|
66
67
|
.container:disabled,
|
|
67
68
|
.container:disabled:hover {
|
|
68
69
|
--textbox_bg_color: none;
|
|
@@ -80,7 +81,7 @@
|
|
|
80
81
|
color: var(--textbox_placeholder_text_color);
|
|
81
82
|
}
|
|
82
83
|
.pointer {
|
|
83
|
-
|
|
84
|
+
cursor: pointer;
|
|
84
85
|
}
|
|
85
86
|
/* Need Border */
|
|
86
87
|
.border, .effect:hover, .effect:focus {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/* textarea default variables */
|
|
3
3
|
--textarea_border_width: 0;
|
|
4
4
|
--textarea_border_color: none;
|
|
5
|
-
--textarea_cursor: auto;
|
|
6
5
|
--textarea_text_color: var(--zdt_textarea_default_text);
|
|
7
6
|
--textarea_font_size: var(--zd_font_size14);
|
|
8
7
|
--textarea_line_height: 22px;
|
|
@@ -20,7 +19,7 @@
|
|
|
20
19
|
outline: 0;
|
|
21
20
|
letter-spacing: 0.1px;
|
|
22
21
|
color: var(--textarea_text_color);
|
|
23
|
-
cursor:
|
|
22
|
+
cursor:text;
|
|
24
23
|
}
|
|
25
24
|
.basic, .noBorder {
|
|
26
25
|
border-width: var(--textarea_border_width);
|
|
@@ -38,11 +37,11 @@
|
|
|
38
37
|
color: var(--textarea_placeholder_text_color);
|
|
39
38
|
}
|
|
40
39
|
.basic:disabled {
|
|
41
|
-
--textarea_cursor: not-allowed;
|
|
42
40
|
--textarea_text_color: var(--zdt_textarea_default_text);
|
|
41
|
+
cursor: not-allowed;
|
|
43
42
|
}
|
|
44
43
|
.readonly {
|
|
45
|
-
|
|
44
|
+
cursor: not-allowed;
|
|
46
45
|
}
|
|
47
46
|
.resizeX {
|
|
48
47
|
composes: resizeX from '../common/common.module.css';
|
|
@@ -7,7 +7,9 @@ export const propTypes = {
|
|
|
7
7
|
portalId: PropTypes.string,
|
|
8
8
|
renderChildren: PropTypes.func,
|
|
9
9
|
saveGetFunction: PropTypes.func,
|
|
10
|
-
saveUpdateFunction: PropTypes.func
|
|
10
|
+
saveUpdateFunction: PropTypes.func,
|
|
11
|
+
isActive: PropTypes.bool,
|
|
12
|
+
name: PropTypes.string
|
|
11
13
|
};
|
|
12
14
|
export const RefElement_propTypes = {
|
|
13
15
|
Element: PropTypes.node,
|
package/es/index.js
CHANGED
|
@@ -38,4 +38,5 @@ export { default as Tooltip } from './Tooltip/Tooltip';
|
|
|
38
38
|
import * as _utils from './utils';
|
|
39
39
|
export { _utils as utils };
|
|
40
40
|
export * from './VelocityAnimation';
|
|
41
|
-
export * from './semantic';
|
|
41
|
+
export * from './semantic';
|
|
42
|
+
export { default as Typography } from './v1/Typography/Typography';
|
package/es/utils/Common.js
CHANGED
|
@@ -20,6 +20,9 @@ export const stopAllEventPropagation = e => {
|
|
|
20
20
|
export function cancelBubblingEffect(e) {
|
|
21
21
|
e && e.stopPropagation && e.stopPropagation();
|
|
22
22
|
e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation && e.nativeEvent.stopImmediatePropagation();
|
|
23
|
+
}
|
|
24
|
+
export function getKeyValue(event) {
|
|
25
|
+
return event && event.key && event.key;
|
|
23
26
|
} // export function getCommentsDetails(
|
|
24
27
|
// commentIds = [],
|
|
25
28
|
// comments = {},
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { useEffectCallOnlyAfterState } from '@zohodesk/hooks';
|
|
3
|
+
import { Accordion_defaultProps } from '../../Accordion/props/defaultProps';
|
|
4
|
+
import { Accordion_propTypes } from '../../Accordion/props/propTypes';
|
|
5
|
+
export default function Accordion(props) {
|
|
6
|
+
const {
|
|
7
|
+
className,
|
|
8
|
+
height,
|
|
9
|
+
unMount,
|
|
10
|
+
disableInternalState,
|
|
11
|
+
selectedItem: propSelectedItem,
|
|
12
|
+
a11y,
|
|
13
|
+
dataId,
|
|
14
|
+
dataSelectorId,
|
|
15
|
+
onSelect,
|
|
16
|
+
children
|
|
17
|
+
} = props;
|
|
18
|
+
const {
|
|
19
|
+
role,
|
|
20
|
+
ariaExpanded,
|
|
21
|
+
ariaHaspopup
|
|
22
|
+
} = a11y;
|
|
23
|
+
const [selectedItem, setSelectedItem] = useState(propSelectedItem);
|
|
24
|
+
|
|
25
|
+
function selectMenu(selectedItem) {
|
|
26
|
+
if (onSelect) {
|
|
27
|
+
onSelect(selectedItem);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
!disableInternalState && setSelectedItem(selectedItem);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
useEffectCallOnlyAfterState(() => {
|
|
34
|
+
if (!disableInternalState) {
|
|
35
|
+
setSelectedItem(propSelectedItem);
|
|
36
|
+
}
|
|
37
|
+
}, [propSelectedItem]);
|
|
38
|
+
let renderChildren = React.Children.map(children, child => {
|
|
39
|
+
if (child) {
|
|
40
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
41
|
+
selectedItem: disableInternalState ? propSelectedItem : selectedItem,
|
|
42
|
+
selectMenu: selectMenu,
|
|
43
|
+
unMount: unMount
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: className ? className : '',
|
|
49
|
+
style: {
|
|
50
|
+
height
|
|
51
|
+
},
|
|
52
|
+
role: role,
|
|
53
|
+
"aria-expanded": ariaExpanded,
|
|
54
|
+
"aria-haspopup": ariaHaspopup,
|
|
55
|
+
"data-id": dataId,
|
|
56
|
+
"data-test-id": dataId,
|
|
57
|
+
"data-selector-id": dataSelectorId
|
|
58
|
+
}, renderChildren);
|
|
59
|
+
}
|
|
60
|
+
Accordion.propTypes = Accordion_propTypes;
|
|
61
|
+
Accordion.defaultProps = Accordion_defaultProps; // if (__DOCS__) {
|
|
62
|
+
// Accordion.docs = {
|
|
63
|
+
// componentGroup: 'Animation',
|
|
64
|
+
// folderName: 'Style Guide'
|
|
65
|
+
// };
|
|
66
|
+
// }
|