@zohodesk/components 1.0.0-temp-610 → 1.0.0-temp-68
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 +1020 -1020
- package/assets/Appearance/dark/mode/darkMode.module.css +1 -1
- package/assets/Appearance/dark/themes/blue/blueDarkComponentTheme.module.css +1 -1
- package/assets/Appearance/default/mode/defaultMode.module.css +1 -1
- package/assets/Appearance/default/themes/blue/blueDefaultComponentTheme.module.css +1 -1
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +358 -0
- package/assets/Appearance/pureDark/themes/blue/bluePureDarkCTATheme.module.css +34 -0
- package/assets/Appearance/pureDark/themes/blue/bluePureDarkComponentTheme.module.css +42 -0
- package/assets/Appearance/pureDark/themes/green/greenPureDarkCTATheme.module.css +34 -0
- package/assets/Appearance/pureDark/themes/green/greenPureDarkComponentTheme.module.css +42 -0
- package/assets/Appearance/pureDark/themes/orange/orangePureDarkCTATheme.module.css +34 -0
- package/assets/Appearance/pureDark/themes/orange/orangePureDarkComponentTheme.module.css +42 -0
- package/assets/Appearance/pureDark/themes/red/redPureDarkCTATheme.module.css +34 -0
- package/assets/Appearance/pureDark/themes/red/redPureDarkComponentTheme.module.css +42 -0
- package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkCTATheme.module.css +34 -0
- package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkComponentTheme.module.css +42 -0
- package/es/AppContainer/AppContainer.module.css +18 -18
- package/es/Avatar/Avatar.js +9 -9
- package/es/Avatar/Avatar.module.css +117 -115
- package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +288 -288
- package/es/AvatarTeam/AvatarTeam.js +7 -7
- package/es/AvatarTeam/AvatarTeam.module.css +161 -147
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +226 -226
- package/es/Button/Button.js +4 -4
- package/es/Button/Button.module.css +521 -448
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +191 -191
- package/es/Buttongroup/Buttongroup.js +1 -1
- package/es/Buttongroup/Buttongroup.module.css +89 -60
- package/es/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +146 -146
- package/es/Card/Card.js +4 -4
- package/es/Card/Card.module.css +20 -20
- package/es/CheckBox/CheckBox.js +0 -0
- package/es/CheckBox/CheckBox.module.css +153 -147
- package/es/DateTime/CalendarView.js +0 -0
- package/es/DateTime/DateTime.js +17 -39
- package/es/DateTime/DateTime.module.css +187 -160
- package/es/DateTime/DateWidget.js +0 -0
- package/es/DateTime/DateWidget.module.css +42 -38
- package/es/DateTime/YearView.js +0 -0
- package/es/DateTime/YearView.module.css +80 -70
- package/es/DateTime/common.js +0 -0
- package/es/DateTime/index.js +0 -0
- package/es/DateTime/objectUtils.js +0 -0
- package/es/DateTime/typeChecker.js +0 -0
- package/es/DateTime/validator.js +0 -0
- package/es/DropBox/DropBox.js +0 -0
- package/es/DropBox/DropBox.module.css +406 -370
- package/es/DropBox/DropBoxPositionMapping.json +144 -144
- package/es/DropDown/DropDown.js +0 -0
- package/es/DropDown/DropDown.module.css +5 -5
- package/es/DropDown/DropDownHeading.js +0 -0
- package/es/DropDown/DropDownHeading.module.css +53 -49
- package/es/DropDown/DropDownItem.js +0 -0
- package/es/DropDown/DropDownItem.module.css +94 -68
- package/es/DropDown/DropDownSearch.js +0 -0
- package/es/DropDown/DropDownSearch.module.css +14 -14
- package/es/DropDown/DropDownSeparator.js +0 -0
- package/es/DropDown/DropDownSeparator.module.css +7 -7
- package/es/Label/Label.js +2 -2
- package/es/Label/Label.module.css +52 -52
- package/es/Label/LabelColors.module.css +20 -20
- package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +101 -101
- package/es/Layout/Box.js +0 -0
- package/es/Layout/Container.js +0 -0
- package/es/Layout/Layout.module.css +324 -324
- package/es/Layout/utils.js +0 -0
- package/es/LightNightMode/Colors.json +397 -397
- package/es/ListItem/ListItem.js +0 -0
- package/es/ListItem/ListItem.module.css +205 -173
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +77 -99
- package/es/MultiSelect/AdvancedMultiSelect.js +49 -71
- package/es/MultiSelect/AdvancedMultiSelect.module.css +127 -116
- package/es/MultiSelect/MultiSelect.js +60 -83
- package/es/MultiSelect/MultiSelect.module.css +193 -178
- package/es/MultiSelect/MultiSelectWithAvatar.js +52 -75
- package/es/MultiSelect/SelectedOptions.module.css +15 -9
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +0 -0
- package/es/PopOver/PopOver.module.css +8 -8
- package/es/Popup/Popup.js +0 -0
- package/es/Popup/PositionMapping.json +73 -73
- package/es/Provider.js +72 -35
- package/es/Radio/Radio.js +0 -0
- package/es/Radio/Radio.module.css +110 -104
- package/es/Responsive/CustomResponsive.js +0 -0
- package/es/Responsive/Responsive.js +0 -1
- package/es/Ribbon/Ribbon.js +0 -0
- package/es/Ribbon/Ribbon.module.css +376 -311
- package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +163 -163
- package/es/RippleEffect/RippleEffect.module.css +70 -99
- package/es/Select/GroupSelect.js +74 -96
- package/es/Select/Select.js +68 -92
- package/es/Select/Select.module.css +100 -96
- package/es/Select/SelectWithAvatar.js +66 -89
- package/es/Select/SelectWithIcon.js +74 -98
- package/es/Select/__tests__/Select.spec.js +0 -0
- package/es/Stencils/Stencils.js +0 -0
- package/es/Stencils/Stencils.module.css +96 -78
- package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +49 -49
- package/es/Switch/Switch.js +0 -0
- package/es/Switch/Switch.module.css +109 -110
- package/es/Tab/Tab.module.css +101 -92
- package/es/Tab/TabContent.module.css +4 -4
- package/es/Tab/Tabs.js +17 -17
- package/es/Tab/Tabs.module.css +140 -107
- package/es/Tag/Tag.js +8 -8
- package/es/Tag/Tag.module.css +250 -228
- package/es/TextBox/TextBox.js +0 -0
- package/es/TextBox/TextBox.module.css +157 -161
- package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +127 -127
- package/es/TextBoxIcon/TextBoxIcon.js +0 -0
- package/es/TextBoxIcon/TextBoxIcon.module.css +78 -71
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +334 -334
- package/es/Textarea/Textarea.js +0 -0
- package/es/Textarea/Textarea.module.css +139 -140
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +97 -97
- package/es/Tooltip/Tooltip.module.css +109 -108
- package/es/beta/FocusRing/FocusRing.module.css +151 -126
- package/es/common/animation.module.css +624 -426
- package/es/common/avatarsizes.module.css +44 -44
- package/es/common/basic.module.css +33 -33
- package/es/common/basicReset.module.css +40 -50
- package/es/common/common.module.css +502 -458
- package/es/common/customscroll.module.css +89 -93
- package/es/common/docStyle.module.css +766 -715
- package/es/common/reset.module.css +12 -12
- package/es/common/transition.module.css +146 -106
- package/es/index.js +1 -2
- package/es/semantic/Button/semanticButton.module.css +9 -9
- package/es/utils/Common.js +0 -0
- package/es/utils/dropDownUtils.js +0 -0
- package/lib/AppContainer/AppContainer.js +1 -1
- package/lib/AppContainer/AppContainer.module.css +18 -18
- package/lib/Avatar/Avatar.js +9 -9
- package/lib/Avatar/Avatar.module.css +117 -117
- package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +288 -288
- package/lib/AvatarTeam/AvatarTeam.js +7 -7
- package/lib/AvatarTeam/AvatarTeam.module.css +161 -161
- package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +226 -226
- package/lib/Button/Button.js +4 -4
- package/lib/Button/Button.module.css +521 -521
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +191 -191
- package/lib/Buttongroup/Buttongroup.js +1 -1
- package/lib/Buttongroup/Buttongroup.module.css +89 -89
- package/lib/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +146 -146
- package/lib/Card/Card.js +4 -4
- package/lib/Card/Card.module.css +20 -20
- package/lib/CheckBox/CheckBox.js +2 -1
- package/lib/CheckBox/CheckBox.module.css +153 -153
- package/lib/DateTime/CalendarView.js +0 -0
- package/lib/DateTime/DateTime.js +0 -0
- package/lib/DateTime/DateTime.module.css +187 -187
- package/lib/DateTime/DateWidget.js +0 -0
- package/lib/DateTime/DateWidget.module.css +42 -42
- package/lib/DateTime/YearView.js +0 -0
- package/lib/DateTime/YearView.module.css +80 -80
- package/lib/DateTime/common.js +0 -0
- package/lib/DateTime/index.js +0 -0
- package/lib/DateTime/objectUtils.js +0 -0
- package/lib/DateTime/typeChecker.js +0 -0
- package/lib/DateTime/validator.js +0 -0
- package/lib/DropBox/DropBox.js +1 -1
- package/lib/DropBox/DropBox.module.css +406 -406
- package/lib/DropBox/DropBoxPositionMapping.json +144 -144
- package/lib/DropDown/DropDown.js +0 -0
- package/lib/DropDown/DropDown.module.css +5 -5
- package/lib/DropDown/DropDownHeading.js +0 -0
- package/lib/DropDown/DropDownHeading.module.css +53 -53
- package/lib/DropDown/DropDownItem.js +0 -0
- package/lib/DropDown/DropDownItem.module.css +94 -94
- package/lib/DropDown/DropDownSearch.js +0 -0
- package/lib/DropDown/DropDownSearch.module.css +14 -14
- package/lib/DropDown/DropDownSeparator.js +0 -0
- package/lib/DropDown/DropDownSeparator.module.css +7 -7
- package/lib/Label/Label.js +0 -0
- package/lib/Label/Label.module.css +52 -52
- package/lib/Label/LabelColors.module.css +20 -20
- package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +101 -101
- package/lib/Layout/Box.js +0 -0
- package/lib/Layout/Container.js +0 -0
- package/lib/Layout/Layout.module.css +324 -324
- package/lib/Layout/utils.js +0 -0
- package/lib/LightNightMode/Colors.json +397 -397
- package/lib/ListItem/ListContainer.js +7 -4
- package/lib/ListItem/ListItem.js +1 -1
- package/lib/ListItem/ListItem.module.css +205 -210
- package/lib/ListItem/ListItemWithAvatar.js +1 -1
- package/lib/ListItem/ListItemWithCheckBox.js +1 -1
- package/lib/ListItem/ListItemWithIcon.js +1 -1
- package/lib/ListItem/ListItemWithRadio.js +1 -1
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +12 -8
- package/lib/MultiSelect/AdvancedMultiSelect.module.css +127 -127
- package/lib/MultiSelect/MultiSelect.js +12 -11
- package/lib/MultiSelect/MultiSelect.module.css +193 -193
- package/lib/MultiSelect/MultiSelectWithAvatar.js +0 -0
- package/lib/MultiSelect/SelectedOptions.module.css +15 -15
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +0 -0
- package/lib/PopOver/PopOver.module.css +8 -8
- package/lib/Popup/Popup.js +0 -0
- package/lib/Popup/PositionMapping.json +73 -73
- package/lib/Provider/Config.js +4 -1
- package/lib/Provider.js +88 -37
- package/lib/Radio/Radio.js +0 -0
- package/lib/Radio/Radio.module.css +110 -110
- package/lib/Responsive/CustomResponsive.js +0 -0
- package/lib/Ribbon/Ribbon.js +0 -0
- package/lib/Ribbon/Ribbon.module.css +376 -376
- package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +163 -163
- package/lib/RippleEffect/RippleEffect.module.css +70 -70
- package/lib/Select/GroupSelect.js +1 -1
- package/lib/Select/Select.js +9 -4
- package/lib/Select/Select.module.css +100 -100
- package/lib/Select/SelectWithAvatar.js +0 -0
- package/lib/Select/SelectWithIcon.js +0 -0
- package/lib/Select/__tests__/Select.spec.js +0 -0
- package/lib/Stencils/Stencils.js +0 -0
- package/lib/Stencils/Stencils.module.css +96 -96
- package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +49 -49
- package/lib/Switch/Switch.js +0 -0
- package/lib/Switch/Switch.module.css +109 -109
- package/lib/Tab/Tab.module.css +101 -101
- package/lib/Tab/TabContent.module.css +4 -4
- package/lib/Tab/Tabs.js +11 -11
- package/lib/Tab/Tabs.module.css +140 -140
- package/lib/Tag/Tag.js +8 -8
- package/lib/Tag/Tag.module.css +250 -250
- package/lib/TextBox/TextBox.js +0 -0
- package/lib/TextBox/TextBox.module.css +157 -157
- package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +127 -127
- package/lib/TextBoxIcon/TextBoxIcon.js +0 -0
- package/lib/TextBoxIcon/TextBoxIcon.module.css +78 -78
- package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +334 -334
- package/lib/Textarea/Textarea.js +0 -0
- package/lib/Textarea/Textarea.module.css +139 -139
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +97 -97
- package/lib/Tooltip/Tooltip.js +15 -8
- package/lib/Tooltip/Tooltip.module.css +109 -104
- package/lib/beta/FocusRing/FocusRing.module.css +151 -151
- package/lib/common/animation.module.css +624 -624
- package/lib/common/avatarsizes.module.css +44 -44
- package/lib/common/basic.module.css +33 -33
- package/lib/common/basicReset.module.css +40 -40
- package/lib/common/common.module.css +502 -502
- package/lib/common/customscroll.module.css +89 -89
- package/lib/common/docStyle.module.css +766 -762
- package/lib/common/reset.module.css +12 -12
- package/lib/common/transition.module.css +146 -146
- package/lib/semantic/Button/semanticButton.module.css +9 -9
- package/lib/utils/Common.js +0 -0
- package/lib/utils/dropDownUtils.js +0 -0
- package/package.json +75 -75
- package/es/ResponsiveDropbox/ResponsiveDropbox.js +0 -74
- package/es/ResponsiveDropbox/ResponsiveDropbox.module.css +0 -6
|
@@ -11,13 +11,12 @@ import Suggestions from './Suggestions';
|
|
|
11
11
|
import EmptyState from './EmptyState';
|
|
12
12
|
import MultiSelectHeader from './MultiSelectHeader';
|
|
13
13
|
import Popup from '../Popup/Popup';
|
|
14
|
+
import DropBox from '../DropBox/DropBox';
|
|
14
15
|
import Textbox from '../TextBox/TextBox';
|
|
15
16
|
import { Container, Box } from '../Layout';
|
|
16
17
|
import Card, { CardContent, CardHeader, CardFooter } from '../Card/Card';
|
|
17
18
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
18
19
|
import { getUniqueId } from '../Provider/IdProvider';
|
|
19
|
-
import ResponsiveDropbox from '../ResponsiveDropbox/ResponsiveDropbox';
|
|
20
|
-
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
21
20
|
/**** CSS ****/
|
|
22
21
|
|
|
23
22
|
import style from './AdvancedMultiSelect.module.css';
|
|
@@ -317,17 +316,6 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
317
316
|
});
|
|
318
317
|
}
|
|
319
318
|
|
|
320
|
-
responsiveFunc(_ref) {
|
|
321
|
-
let {
|
|
322
|
-
mediaQueryOR
|
|
323
|
-
} = _ref;
|
|
324
|
-
return {
|
|
325
|
-
tabletMode: mediaQueryOR([{
|
|
326
|
-
maxWidth: 700
|
|
327
|
-
}])
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
|
|
331
319
|
render() {
|
|
332
320
|
let {
|
|
333
321
|
isReadOnly,
|
|
@@ -464,64 +452,54 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
464
452
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
465
453
|
name: "ZD-delete",
|
|
466
454
|
size: "15"
|
|
467
|
-
})) : null), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
}, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
516
|
-
isLoading: isFetchingOptions,
|
|
517
|
-
options: options,
|
|
518
|
-
searchString: searchStr,
|
|
519
|
-
suggestions: suggestions,
|
|
520
|
-
dataId: dataIdLoading,
|
|
521
|
-
i18nKeys: i18nKeys,
|
|
522
|
-
htmlId: ariaErrorId
|
|
523
|
-
})), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)));
|
|
524
|
-
}) : null);
|
|
455
|
+
})) : null), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, _extends({
|
|
456
|
+
animationStyle: animationStyle,
|
|
457
|
+
boxPosition: position || `${defaultDropBoxPosition}Center`,
|
|
458
|
+
getRef: getContainerRef,
|
|
459
|
+
isActive: isPopupReady,
|
|
460
|
+
isAnimate: isAnimate,
|
|
461
|
+
isArrow: false,
|
|
462
|
+
onClick: removeClose,
|
|
463
|
+
isPadding: false,
|
|
464
|
+
isBoxPaddingNeed: isBoxPaddingNeed,
|
|
465
|
+
htmlId: setAriaId,
|
|
466
|
+
a11y: {
|
|
467
|
+
role: 'listbox',
|
|
468
|
+
ariaMultiselectable: true
|
|
469
|
+
}
|
|
470
|
+
}, DropBoxProps), /*#__PURE__*/React.createElement(Card, {
|
|
471
|
+
customClass: style.box,
|
|
472
|
+
onScroll: this.handleScroll
|
|
473
|
+
}, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
|
|
474
|
+
needSelectAll: needSelectAll,
|
|
475
|
+
onSelect: this.handleSelectAll,
|
|
476
|
+
selectAllText: selectAllText,
|
|
477
|
+
suggestions: suggestions,
|
|
478
|
+
dataId: dataIdSelectAllEle
|
|
479
|
+
})), /*#__PURE__*/React.createElement(CardContent, {
|
|
480
|
+
customClass: dropBoxSize ? style[dropBoxSize] : '',
|
|
481
|
+
eleRef: this.suggestionContainerRef
|
|
482
|
+
}, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
|
|
483
|
+
suggestions: suggestions,
|
|
484
|
+
selectedOptions: allselectedOptionIds,
|
|
485
|
+
getRef: this.suggestionItemRef,
|
|
486
|
+
hoverOption: hoverOption,
|
|
487
|
+
onClick: this.handleSelectOption,
|
|
488
|
+
onMouseEnter: this.handleMouseEnter,
|
|
489
|
+
needTick: true,
|
|
490
|
+
listItemSize: listItemSize,
|
|
491
|
+
a11y: {
|
|
492
|
+
role: 'option'
|
|
493
|
+
}
|
|
494
|
+
}, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
495
|
+
isLoading: isFetchingOptions,
|
|
496
|
+
options: options,
|
|
497
|
+
searchString: searchStr,
|
|
498
|
+
suggestions: suggestions,
|
|
499
|
+
dataId: dataIdLoading,
|
|
500
|
+
i18nKeys: i18nKeys,
|
|
501
|
+
htmlId: ariaErrorId
|
|
502
|
+
})), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)) : null);
|
|
525
503
|
}
|
|
526
504
|
|
|
527
505
|
}
|
|
@@ -1,116 +1,127 @@
|
|
|
1
|
-
.wrapper {
|
|
2
|
-
position: relative;
|
|
3
|
-
}
|
|
4
|
-
.disabled,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
border-bottom-style: solid;
|
|
14
|
-
border-bottom-width: 1px;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
1
|
+
.wrapper {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
.disabled, .readOnly {
|
|
5
|
+
cursor: not-allowed;
|
|
6
|
+
}
|
|
7
|
+
.container {
|
|
8
|
+
max-height: var(--zd_size120);
|
|
9
|
+
composes: oflowy from '../common/common.module.css';
|
|
10
|
+
}
|
|
11
|
+
.hasBorder {
|
|
12
|
+
transition: border var(--zd_transition2) linear 0s;
|
|
13
|
+
border-bottom-style: solid;
|
|
14
|
+
border-bottom-width: 1px;
|
|
15
|
+
}
|
|
16
|
+
.borderColor_transparent {
|
|
17
|
+
border-bottom-color: var(--zdt_advancedmultiselect_transparent_border);
|
|
18
|
+
}
|
|
19
|
+
.effect .borderColor_transparent:hover {
|
|
20
|
+
border-bottom-color: var(--zdt_advancedmultiselect_transparent_hover_border);
|
|
21
|
+
}
|
|
22
|
+
.effect .borderColor_transparent.active {
|
|
23
|
+
border-bottom-color: var(--zdt_advancedmultiselect_transparent_active_border);
|
|
24
|
+
}
|
|
25
|
+
.borderColor_default {
|
|
26
|
+
border-bottom-color: var(--zdt_advancedmultiselect_default_border);
|
|
27
|
+
}
|
|
28
|
+
.effect .borderColor_default:hover {
|
|
29
|
+
border-bottom-color: var(--zdt_advancedmultiselect_default_hover_border);
|
|
30
|
+
}
|
|
31
|
+
.effect .borderColor_default.active {
|
|
32
|
+
border-bottom-color: var(--zdt_advancedmultiselect_default_active_border);
|
|
33
|
+
}
|
|
34
|
+
.borderColor_dark {
|
|
35
|
+
border-bottom-color: var(--zdt_advancedmultiselect_dark_border);
|
|
36
|
+
}
|
|
37
|
+
.effect .borderColor_dark:hover {
|
|
38
|
+
border-bottom-color: var(--zdt_advancedmultiselect_dark_hover_border);
|
|
39
|
+
}
|
|
40
|
+
.effect .borderColor_dark.active {
|
|
41
|
+
border-bottom-color: var(--zdt_advancedmultiselect_dark_active_border);
|
|
42
|
+
}
|
|
43
|
+
[dir=ltr] .container.medium {
|
|
44
|
+
padding: 0 var(--zd_size34) var(--zd_size7) 0;
|
|
45
|
+
}
|
|
46
|
+
[dir=rtl] .container.medium {
|
|
47
|
+
padding: 0 0 var(--zd_size7) var(--zd_size34);
|
|
48
|
+
}
|
|
49
|
+
.container.xmedium {
|
|
50
|
+
min-height: var(--zd_size30);
|
|
51
|
+
}
|
|
52
|
+
[dir=ltr] .container.xmedium {
|
|
53
|
+
padding: 0 var(--zd_size34) var(--zd_size1) 0;
|
|
54
|
+
}
|
|
55
|
+
[dir=rtl] .container.xmedium {
|
|
56
|
+
padding: 0 0 var(--zd_size1) var(--zd_size34);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.delete {
|
|
60
|
+
position: absolute;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
color: var(--zdt_advancedmultiselect_delete_text);
|
|
63
|
+
padding-bottom: var(--zd_size10);
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
background-color: var(--zdt_advancedmultiselect_delete_bg);
|
|
66
|
+
border: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[dir=ltr] .delete {
|
|
70
|
+
right: var(--zd_size15);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
[dir=rtl] .delete {
|
|
74
|
+
left: var(--zd_size15);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.delete:hover {
|
|
78
|
+
color: var(--zdt_advancedmultiselect_delete_hover_text);
|
|
79
|
+
}
|
|
80
|
+
.transparentContainer .delete {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
visibility: hidden;
|
|
83
|
+
}
|
|
84
|
+
.transparentContainer:hover .delete {
|
|
85
|
+
opacity: 1;
|
|
86
|
+
visibility: visible;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.box {
|
|
90
|
+
background: var(--zdt_advancedmultiselect_box_bg);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.small {
|
|
94
|
+
max-height: var(--zd_size200);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.medium {
|
|
98
|
+
max-height: var(--zd_size350);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.large {
|
|
102
|
+
max-height: var(--zd_size400);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.dropContainer {
|
|
106
|
+
display: inline-block;
|
|
107
|
+
max-width: 100%;
|
|
108
|
+
margin-bottom: var(--zd_size5);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.dropPopup {
|
|
112
|
+
font-size: var(--zd_font_size13);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.dropPopup :global .toggleDropIcon {
|
|
116
|
+
color: var(--zdt_advancedmultiselect_droppopup_text);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.more {
|
|
120
|
+
font-size: var(--zd_font_size14);
|
|
121
|
+
color: var(--zdt_advancedmultiselect_more_text);
|
|
122
|
+
font-family: inherit;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
margin-top: var(--zd_size5);
|
|
125
|
+
background-color: var(--zdt_advancedmultiselect_delete_bg);
|
|
126
|
+
border: 0;
|
|
127
|
+
}
|
|
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
/**** Components ****/
|
|
5
5
|
|
|
6
6
|
import Popup from '../Popup/Popup';
|
|
7
|
+
import DropBox from '../DropBox/DropBox';
|
|
7
8
|
import TextBoxIcon from '../TextBoxIcon/TextBoxIcon';
|
|
8
9
|
import { Container, Box } from '../Layout';
|
|
9
10
|
import Card, { CardContent, CardHeader, CardFooter } from '../Card/Card';
|
|
@@ -13,8 +14,6 @@ import EmptyState from './EmptyState';
|
|
|
13
14
|
import MultiSelectHeader from './MultiSelectHeader';
|
|
14
15
|
import CssProvider from '../Provider/CssProvider';
|
|
15
16
|
import { getUniqueId } from '../Provider/IdProvider';
|
|
16
|
-
import ResponsiveDropbox from '../ResponsiveDropbox/ResponsiveDropbox';
|
|
17
|
-
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
18
17
|
/**** Icons ****/
|
|
19
18
|
|
|
20
19
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
@@ -315,8 +314,8 @@ export class MultiSelectComponent extends React.Component {
|
|
|
315
314
|
if (suggestionsLen && isPopupOpen && keyCode === 38) {
|
|
316
315
|
//up arrow
|
|
317
316
|
|
|
318
|
-
/*if (hoverOption === 0) { //disable first to last option higlight
|
|
319
|
-
!isNextOptions && this.setState({ hoverOption: suggestionsLen - 1 });
|
|
317
|
+
/*if (hoverOption === 0) { //disable first to last option higlight
|
|
318
|
+
!isNextOptions && this.setState({ hoverOption: suggestionsLen - 1 });
|
|
320
319
|
}*/
|
|
321
320
|
if (hoverOption) {
|
|
322
321
|
this.setState({
|
|
@@ -326,9 +325,9 @@ export class MultiSelectComponent extends React.Component {
|
|
|
326
325
|
} else if (suggestionsLen && isPopupOpen && keyCode === 40) {
|
|
327
326
|
//down arrow
|
|
328
327
|
|
|
329
|
-
/*else if (hoverOption === suggestionsLen - 1 || hoverOption === null) {
|
|
330
|
-
//disable last to first option higlight
|
|
331
|
-
!isNextOptions && this.setState({ hoverOption: 0 });
|
|
328
|
+
/*else if (hoverOption === suggestionsLen - 1 || hoverOption === null) {
|
|
329
|
+
//disable last to first option higlight
|
|
330
|
+
!isNextOptions && this.setState({ hoverOption: 0 });
|
|
332
331
|
}*/
|
|
333
332
|
if (isNextOptions && suggestionsLen >= 5 && hoverOption === suggestionsLen - 3) {
|
|
334
333
|
getNextOptions && this.handleFetchOptions(getNextOptions, searchStr);
|
|
@@ -830,17 +829,6 @@ export class MultiSelectComponent extends React.Component {
|
|
|
830
829
|
});
|
|
831
830
|
}
|
|
832
831
|
|
|
833
|
-
responsiveFunc(_ref) {
|
|
834
|
-
let {
|
|
835
|
-
mediaQueryOR
|
|
836
|
-
} = _ref;
|
|
837
|
-
return {
|
|
838
|
-
tabletMode: mediaQueryOR([{
|
|
839
|
-
maxWidth: 700
|
|
840
|
-
}])
|
|
841
|
-
};
|
|
842
|
-
}
|
|
843
|
-
|
|
844
832
|
render() {
|
|
845
833
|
let {
|
|
846
834
|
isReadOnly,
|
|
@@ -990,71 +978,60 @@ export class MultiSelectComponent extends React.Component {
|
|
|
990
978
|
size: "15"
|
|
991
979
|
})) : null, children ? /*#__PURE__*/React.createElement(Box, {
|
|
992
980
|
dataId: `${dataId}_children`
|
|
993
|
-
}, children) : null)))), !isReadOnly && !isDisabled && !disableAction && isPopupOpen ? /*#__PURE__*/React.createElement(
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1048
|
-
isLoading: isFetchingOptions,
|
|
1049
|
-
options: options,
|
|
1050
|
-
searchString: searchStr,
|
|
1051
|
-
suggestions: suggestions,
|
|
1052
|
-
dataId: dataId,
|
|
1053
|
-
palette: palette,
|
|
1054
|
-
i18nKeys: i18nKeys,
|
|
1055
|
-
htmlId: ariaErrorId
|
|
1056
|
-
})), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)));
|
|
1057
|
-
}) : null);
|
|
981
|
+
}, children) : null)))), !isReadOnly && !isDisabled && !disableAction && isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
|
|
982
|
+
animationStyle: animationStyle,
|
|
983
|
+
boxPosition: position || `${defaultDropBoxPosition}`,
|
|
984
|
+
getRef: getContainerRef,
|
|
985
|
+
isActive: isPopupReady,
|
|
986
|
+
isAnimate: isAnimate,
|
|
987
|
+
isArrow: false,
|
|
988
|
+
onClick: removeClose,
|
|
989
|
+
needResponsive: needResponsive,
|
|
990
|
+
isPadding: false,
|
|
991
|
+
isBoxPaddingNeed: isBoxPaddingNeed,
|
|
992
|
+
palette: palette,
|
|
993
|
+
htmlId: setAriaId,
|
|
994
|
+
a11y: {
|
|
995
|
+
role: 'listbox',
|
|
996
|
+
ariaMultiselectable: true
|
|
997
|
+
},
|
|
998
|
+
size: boxSize
|
|
999
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
1000
|
+
customClass: `${style.box} ${style[`${palette}Box`]}`,
|
|
1001
|
+
onScroll: this.handleScroll
|
|
1002
|
+
}, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
|
|
1003
|
+
needSelectAll: needSelectAll,
|
|
1004
|
+
onSelect: this.handleSelectAll,
|
|
1005
|
+
selectAllText: selectAllText,
|
|
1006
|
+
suggestions: suggestions,
|
|
1007
|
+
dataId: dataId
|
|
1008
|
+
})), /*#__PURE__*/React.createElement(CardContent, {
|
|
1009
|
+
customClass: dropBoxSize ? style[dropBoxSize] : '',
|
|
1010
|
+
eleRef: this.suggestionContainerRef
|
|
1011
|
+
}, isSearching ? /*#__PURE__*/React.createElement("div", {
|
|
1012
|
+
className: style[palette]
|
|
1013
|
+
}, searchText) : suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
|
|
1014
|
+
suggestions: suggestions,
|
|
1015
|
+
getRef: this.suggestionItemRef,
|
|
1016
|
+
hoverOption: hoverOption,
|
|
1017
|
+
onClick: this.handleSelectOption,
|
|
1018
|
+
onMouseEnter: this.handleMouseEnter,
|
|
1019
|
+
needBorder: false,
|
|
1020
|
+
dataId: `${dataId}_Options`,
|
|
1021
|
+
palette: palette,
|
|
1022
|
+
a11y: {
|
|
1023
|
+
role: 'option'
|
|
1024
|
+
}
|
|
1025
|
+
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1026
|
+
isLoading: isFetchingOptions,
|
|
1027
|
+
options: options,
|
|
1028
|
+
searchString: searchStr,
|
|
1029
|
+
suggestions: suggestions,
|
|
1030
|
+
dataId: dataId,
|
|
1031
|
+
palette: palette,
|
|
1032
|
+
i18nKeys: i18nKeys,
|
|
1033
|
+
htmlId: ariaErrorId
|
|
1034
|
+
})), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)) : null);
|
|
1058
1035
|
}
|
|
1059
1036
|
|
|
1060
1037
|
}
|