@zohodesk/components 1.0.0-temp-38 → 1.0.0-temp-42
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 +68 -20
- package/es/AppContainer/AppContainer.js +47 -6
- package/es/Appearance/dark/mode/darkMode.module.css +355 -402
- package/es/Appearance/dark/themes/blue/blueDarkCTATheme.module.css +33 -33
- package/es/Appearance/dark/themes/blue/blueDarkComponentTheme.module.css +41 -30
- package/es/Appearance/dark/themes/green/greenDarkCTATheme.module.css +32 -32
- package/es/Appearance/dark/themes/green/greenDarkComponentTheme.module.css +40 -29
- package/es/Appearance/dark/themes/orange/orangeDarkCTATheme.module.css +32 -32
- package/es/Appearance/dark/themes/orange/orangeDarkComponentTheme.module.css +40 -29
- package/es/Appearance/dark/themes/red/redDarkCTATheme.module.css +32 -32
- package/es/Appearance/dark/themes/red/redDarkComponentTheme.module.css +40 -29
- package/es/Appearance/dark/themes/yellow/yellowDarkCTATheme.module.css +32 -32
- package/es/Appearance/dark/themes/yellow/yellowDarkComponentTheme.module.css +40 -29
- package/es/Appearance/default/mode/defaultMode.module.css +356 -403
- package/es/Appearance/default/themes/blue/blueDefaultCTATheme.module.css +33 -33
- package/es/Appearance/default/themes/blue/blueDefaultComponentTheme.module.css +41 -30
- package/es/Appearance/default/themes/green/greenDefaultCTATheme.module.css +32 -32
- package/es/Appearance/default/themes/green/greenDefaultComponentTheme.module.css +40 -29
- package/es/Appearance/default/themes/orange/orangeDefaultCTATheme.module.css +32 -32
- package/es/Appearance/default/themes/orange/orangeDefaultComponentTheme.module.css +40 -29
- package/es/Appearance/default/themes/red/redDefaultCTATheme.module.css +32 -32
- package/es/Appearance/default/themes/red/redDefaultComponentTheme.module.css +40 -29
- package/es/Appearance/default/themes/yellow/yellowDefaultCTATheme.module.css +32 -32
- package/es/Appearance/default/themes/yellow/yellowDefaultComponentTheme.module.css +40 -29
- package/es/Button/Button.module.css +7 -7
- package/es/ListItem/ListItemWithAvatar.js +11 -3
- package/es/ListItem/ListItemWithIcon.js +12 -4
- package/es/MultiSelect/AdvancedMultiSelect.js +21 -9
- package/es/MultiSelect/MultiSelect.js +9 -2
- package/es/MultiSelect/Suggestions.js +11 -2
- package/es/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +18 -3
- package/es/Provider/Config.js +2 -1
- package/es/Provider.js +8 -2
- package/es/Responsive/ResizeComponent.js +1 -1
- package/es/Select/GroupSelect.js +4 -4
- package/es/Select/Select.js +51 -10
- package/es/Select/docs/Select__default.docs.js +79 -0
- package/es/Stencils/Stencils.js +1 -1
- package/es/Tab/Tabs.js +14 -2
- package/es/Tag/Tag.module.css +1 -0
- package/es/TextBox/TextBox.js +7 -4
- package/es/TextBoxIcon/TextBoxIcon.js +13 -4
- package/es/common/animation.module.css +12 -0
- package/es/utils/Common.js +1 -1
- package/es/utils/ContextOptimizer.js +1 -1
- package/es/utils/dropDownUtils.js +12 -5
- package/es/utils/shallowEqual.js +32 -0
- package/lib/Accordion/Accordion.js +3 -3
- package/lib/Accordion/AccordionItem.js +3 -3
- package/lib/Accordion/docs/Accordion__Demo.docs.js +3 -3
- package/lib/Animation/Animation.js +3 -3
- package/lib/Animation/docs/Animation__default.docs.js +3 -3
- package/lib/Animation/docs/Animation__fadeIn.docs.js +3 -3
- package/lib/Animation/docs/Animation__scaleIn.docs.js +3 -3
- package/lib/Animation/docs/Animation__skewIn.docs.js +3 -3
- package/lib/Animation/docs/Animation__slideDown.docs.js +3 -3
- package/lib/Animation/docs/Animation__slideLeft.docs.js +3 -3
- package/lib/Animation/docs/Animation__zoomIn.docs.js +3 -3
- package/lib/AppContainer/AppContainer.js +59 -10
- package/lib/AppContainer/docs/AppContainer__default.docs.js +3 -3
- package/lib/Appearance/dark/mode/darkMode.module.css +355 -402
- package/lib/Appearance/dark/themes/blue/blueDarkCTATheme.module.css +33 -33
- package/lib/Appearance/dark/themes/blue/blueDarkComponentTheme.module.css +41 -30
- package/lib/Appearance/dark/themes/green/greenDarkCTATheme.module.css +32 -32
- package/lib/Appearance/dark/themes/green/greenDarkComponentTheme.module.css +40 -29
- package/lib/Appearance/dark/themes/orange/orangeDarkCTATheme.module.css +32 -32
- package/lib/Appearance/dark/themes/orange/orangeDarkComponentTheme.module.css +40 -29
- package/lib/Appearance/dark/themes/red/redDarkCTATheme.module.css +32 -32
- package/lib/Appearance/dark/themes/red/redDarkComponentTheme.module.css +40 -29
- package/lib/Appearance/dark/themes/yellow/yellowDarkCTATheme.module.css +32 -32
- package/lib/Appearance/dark/themes/yellow/yellowDarkComponentTheme.module.css +40 -29
- package/lib/Appearance/default/mode/defaultMode.module.css +356 -403
- package/lib/Appearance/default/themes/blue/blueDefaultCTATheme.module.css +33 -33
- package/lib/Appearance/default/themes/blue/blueDefaultComponentTheme.module.css +41 -30
- package/lib/Appearance/default/themes/green/greenDefaultCTATheme.module.css +32 -32
- package/lib/Appearance/default/themes/green/greenDefaultComponentTheme.module.css +40 -29
- package/lib/Appearance/default/themes/orange/orangeDefaultCTATheme.module.css +32 -32
- package/lib/Appearance/default/themes/orange/orangeDefaultComponentTheme.module.css +40 -29
- package/lib/Appearance/default/themes/red/redDefaultCTATheme.module.css +32 -32
- package/lib/Appearance/default/themes/red/redDefaultComponentTheme.module.css +40 -29
- package/lib/Appearance/default/themes/yellow/yellowDefaultCTATheme.module.css +32 -32
- package/lib/Appearance/default/themes/yellow/yellowDefaultComponentTheme.module.css +40 -29
- package/lib/Avatar/Avatar.js +3 -3
- package/lib/Avatar/docs/Avatar__custom.docs.js +3 -3
- package/lib/Avatar/docs/Avatar__default.docs.js +3 -3
- package/lib/Avatar/docs/Avatar__palette.docs.js +3 -3
- package/lib/Avatar/docs/Avatar__text.docs.js +3 -3
- package/lib/AvatarTeam/AvatarTeam.js +3 -3
- package/lib/AvatarTeam/docs/AvatarTeam__custom.docs.js +3 -3
- package/lib/AvatarTeam/docs/AvatarTeam__default.docs.js +3 -3
- package/lib/AvatarTeam/docs/AvatarTeam__palette.docs.js +3 -3
- package/lib/AvatarTeam/docs/AvatarTeam__size.docs.js +3 -3
- package/lib/Button/Button.js +3 -3
- package/lib/Button/Button.module.css +7 -7
- package/lib/Button/docs/Button__custom.docs.js +3 -3
- package/lib/Button/docs/Button__default.docs.js +3 -3
- package/lib/Buttongroup/Buttongroup.js +3 -3
- package/lib/Buttongroup/docs/Buttongroup__custom.docs.js +3 -3
- package/lib/Buttongroup/docs/Buttongroup__footer.docs.js +3 -3
- package/lib/Buttongroup/docs/Buttongroup__header.docs.js +3 -3
- package/lib/Card/Card.js +3 -3
- package/lib/Card/__tests__/Card.spec.js +1 -1
- package/lib/Card/docs/Card__Custom.docs.js +3 -3
- package/lib/Card/docs/Card__Default.docs.js +3 -3
- package/lib/Card/docs/Card__Scroll.docs.js +3 -3
- package/lib/Card/index.js +1 -1
- package/lib/CheckBox/CheckBox.js +3 -3
- package/lib/CheckBox/docs/CheckBox__custom.docs.js +3 -3
- package/lib/CheckBox/docs/CheckBox__default.docs.js +3 -3
- package/lib/DateTime/CalendarView.js +3 -3
- package/lib/DateTime/DateTime.js +3 -3
- package/lib/DateTime/DateTimePopupFooter.js +3 -3
- package/lib/DateTime/DateTimePopupHeader.js +3 -3
- package/lib/DateTime/DateWidget.js +3 -3
- package/lib/DateTime/DaysRow.js +3 -3
- package/lib/DateTime/Time.js +3 -3
- package/lib/DateTime/YearView.js +3 -3
- package/lib/DateTime/__tests__/CalendarView.spec.js +1 -1
- package/lib/DateTime/__tests__/DateTime.spec.js +1 -1
- package/lib/DateTime/docs/DateTime__default.docs.js +3 -3
- package/lib/DateTime/docs/DateWidget__default.docs.js +3 -3
- package/lib/DateTime/objectUtils.js +1 -1
- package/lib/DropBox/DropBox.js +3 -3
- package/lib/DropBox/docs/DropBox__custom.docs.js +3 -3
- package/lib/DropBox/docs/DropBox__customOrder.docs.js +3 -3
- package/lib/DropBox/docs/DropBox__fixedPosition.docs.js +3 -3
- package/lib/DropBox/docs/DropBox__position.docs.js +3 -3
- package/lib/DropBox/docs/DropBox__size.docs.js +3 -3
- package/lib/DropDown/DropDown.js +3 -3
- package/lib/DropDown/DropDownHeading.js +3 -3
- package/lib/DropDown/DropDownItem.js +3 -3
- package/lib/DropDown/DropDownSearch.js +3 -3
- package/lib/DropDown/DropDownSeparator.js +3 -3
- package/lib/DropDown/docs/DropDownHeading__custom.docs.js +3 -3
- package/lib/DropDown/docs/DropDownHeading__default.docs.js +3 -3
- package/lib/Label/Label.js +3 -3
- package/lib/Label/docs/Label__clipped.docs.js +3 -3
- package/lib/Label/docs/Label__custom.docs.js +3 -3
- package/lib/Label/docs/Label__palette.docs.js +3 -3
- package/lib/Label/docs/Label__size.docs.js +3 -3
- package/lib/Label/docs/Label__type.docs.js +3 -3
- package/lib/Layout/docs/Layout__Hidden.docs.js +3 -3
- package/lib/Layout/docs/Layout__default.docs.js +3 -3
- package/lib/Layout/docs/Layout__four_Column.docs.js +3 -3
- package/lib/Layout/docs/Layout__three_Column.docs.js +3 -3
- package/lib/Layout/docs/Layout__two_Column.docs.js +3 -3
- package/lib/LightNightMode/docs/AlternativeColors.docs.js +3 -3
- package/lib/ListItem/ListItem.js +3 -3
- package/lib/ListItem/ListItemWithAvatar.js +12 -6
- package/lib/ListItem/ListItemWithCheckBox.js +3 -3
- package/lib/ListItem/ListItemWithIcon.js +14 -7
- package/lib/ListItem/ListItemWithRadio.js +3 -3
- package/lib/ListItem/docs/ListItemWithAvatar__custom.docs.js +3 -3
- package/lib/ListItem/docs/ListItemWithAvatar__default.docs.js +3 -3
- package/lib/ListItem/docs/ListItemWithCheckBox__custom.docs.js +3 -3
- package/lib/ListItem/docs/ListItemWithCheckBox__default.docs.js +3 -3
- package/lib/ListItem/docs/ListItemWithIcon__custom.docs.js +3 -3
- package/lib/ListItem/docs/ListItemWithIcon__default.docs.js +3 -3
- package/lib/ListItem/docs/ListItemWithRadio__custom.docs.js +3 -3
- package/lib/ListItem/docs/ListItemWithRadio__default.docs.js +3 -3
- package/lib/ListItem/docs/ListItem__custom.docs.js +3 -3
- package/lib/ListItem/docs/ListItem__default.docs.js +3 -3
- package/lib/Modal/Modal.js +3 -3
- package/lib/Modal/__docs__/Modal__default.docs.js +3 -3
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -3
- package/lib/MultiSelect/AdvancedMultiSelect.js +23 -11
- package/lib/MultiSelect/EmptyState.js +3 -3
- package/lib/MultiSelect/MultiSelect.js +11 -5
- package/lib/MultiSelect/MultiSelectHeader.js +3 -3
- package/lib/MultiSelect/MultiSelectWithAvatar.js +3 -3
- package/lib/MultiSelect/SelectedOptions.js +3 -3
- package/lib/MultiSelect/Suggestions.js +19 -5
- package/lib/MultiSelect/docs/AdvancedGroupMultiSelect__default.docs.js +3 -3
- package/lib/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +21 -6
- package/lib/MultiSelect/docs/MultiSelectWithAvatar__default.docs.js +3 -3
- package/lib/MultiSelect/docs/MultiSelect__default.docs.js +3 -3
- package/lib/PopOver/PopOver.js +3 -3
- package/lib/PopOver/docs/PopOver__default.docs.js +3 -3
- package/lib/Popup/Popup.js +3 -3
- package/lib/Popup/__tests__/Popup.spec.js +3 -3
- package/lib/Provider/Config.js +2 -1
- package/lib/Provider/LibraryContext.js +3 -3
- package/lib/Provider/NumberGenerator/NumberGenerator.js +1 -1
- package/lib/Provider/docs/Provider_Id__Class.docs.js +3 -3
- package/lib/Provider/docs/Provider_Zindex__Class.docs.js +3 -3
- package/lib/Provider.js +12 -5
- package/lib/Radio/Radio.js +3 -3
- package/lib/Radio/docs/Radio__custom.docs.js +3 -3
- package/lib/Radio/docs/Radio__default.docs.js +3 -3
- package/lib/Responsive/CustomResponsive.js +3 -3
- package/lib/Responsive/RefWrapper.js +1 -1
- package/lib/Responsive/ResizeComponent.js +4 -4
- package/lib/Responsive/ResizeObserver.js +1 -1
- package/lib/Responsive/Responsive.js +3 -3
- package/lib/Responsive/docs/Responsive__Custom.docs.js +3 -3
- package/lib/Responsive/docs/Responsive__default.docs.js +3 -3
- package/lib/Responsive/sizeObservers.js +4 -4
- package/lib/Responsive/utils/shallowCompare.js +1 -1
- package/lib/Ribbon/Ribbon.js +3 -3
- package/lib/Ribbon/docs/Ribbon__custom.docs.js +3 -3
- package/lib/Ribbon/docs/Ribbon__default.docs.js +3 -3
- package/lib/RippleEffect/docs/RippleEffect__default.docs.js +3 -3
- package/lib/Select/GroupSelect.js +6 -6
- package/lib/Select/Select.js +57 -15
- package/lib/Select/SelectWithAvatar.js +3 -3
- package/lib/Select/SelectWithIcon.js +3 -3
- package/lib/Select/docs/GroupSelect__default.docs.js +3 -3
- package/lib/Select/docs/SelectWithAvatar__default.docs.js +3 -3
- package/lib/Select/docs/SelectWithIcon__default.docs.js +3 -3
- package/lib/Select/docs/Select__default.docs.js +82 -3
- package/lib/Stencils/Stencils.js +6 -6
- package/lib/Stencils/docs/Stencils__custom.docs.js +3 -3
- package/lib/Stencils/docs/Stencils__default.docs.js +3 -3
- package/lib/Switch/Switch.js +3 -3
- package/lib/Switch/docs/Switch__custom.docs.js +3 -3
- package/lib/Switch/docs/Switch__default.docs.js +3 -3
- package/lib/Tab/Tab.js +1 -1
- package/lib/Tab/TabWrapper.js +1 -1
- package/lib/Tab/Tabs.js +16 -5
- package/lib/Tab/docs/Tab__default.docs.js +3 -3
- package/lib/Tag/Tag.js +3 -3
- package/lib/Tag/Tag.module.css +1 -0
- package/lib/Tag/docs/Tag__custom.docs.js +3 -3
- package/lib/Tag/docs/Tag__default.docs.js +3 -3
- package/lib/TextBox/TextBox.js +9 -7
- package/lib/TextBox/docs/TextBox__custom.docs.js +3 -3
- package/lib/TextBox/docs/TextBox__default.docs.js +3 -3
- package/lib/TextBox/docs/TextBox__size.docs.js +3 -3
- package/lib/TextBox/docs/TextBox__variant.docs.js +3 -3
- package/lib/TextBoxIcon/TextBoxIcon.js +15 -7
- package/lib/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +3 -3
- package/lib/TextBoxIcon/docs/TextBoxIcon__default.docs.js +3 -3
- package/lib/Textarea/Textarea.js +3 -3
- package/lib/Textarea/docs/Textarea__animated.docs.js +3 -3
- package/lib/Textarea/docs/Textarea__custom.docs.js +3 -3
- package/lib/Textarea/docs/Textarea__default.docs.js +3 -3
- package/lib/Textarea/docs/Textarea__disabled.docs.js +3 -3
- package/lib/Tooltip/Tooltip.js +3 -3
- package/lib/Tooltip/__tests__/Tooltip.spec.js +3 -3
- package/lib/Tooltip/docs/Tooltip__default.docs.js +3 -3
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -3
- package/lib/VelocityAnimation/VelocityAnimation/docs/VelocityAnimation__demo.docs.js +3 -3
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +3 -3
- package/lib/VelocityAnimation/VelocityAnimationGroup/docs/VelocityAnimationGroup__demo.docs.js +3 -3
- package/lib/a11y/FocusScope/FocusScope.js +1 -1
- package/lib/a11y/FocusScope/docs/FocusScope__default.docs.js +3 -3
- package/lib/beta/FocusRing/FocusRing.js +3 -3
- package/lib/beta/FocusRing/docs/FocusRing__default.docs.js +3 -3
- package/lib/common/animation.module.css +12 -0
- package/lib/deprecated/PortalLayer/PortalLayer.js +3 -3
- package/lib/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +3 -3
- package/lib/semantic/Button/Button.js +3 -3
- package/lib/semantic/Button/docs/Button__default.docs.js +3 -3
- package/lib/utils/Common.js +1 -1
- package/lib/utils/ContextOptimizer.js +2 -2
- package/lib/utils/datetime/common.js +1 -1
- package/lib/utils/dropDownUtils.js +14 -5
- package/lib/utils/shallowEqual.js +41 -0
- package/package.json +9 -5
- package/preprocess/componentAppearanceColors.js +65 -0
- package/preprocess/componentThemeColors.js +119 -0
- package/preprocess/ctaThemeColors.js +95 -0
- package/preprocess/index.js +3 -0
- package/preprocess/json/componentAppearanceVariableJson.js +1515 -0
- package/preprocess/json/componentThemeVariableJson.js +259 -0
- package/preprocess/json/ctaThemeVariableJson.js +337 -0
- package/es/deprecated/Theme/darkTheme.module.css +0 -393
- package/es/deprecated/Theme/defaultTheme.module.css +0 -393
- package/es/deprecated/Theme/palette/darkCTAPalette.module.css +0 -116
- package/es/deprecated/Theme/palette/darkPalette.module.css +0 -155
- package/es/deprecated/Theme/palette/defaultCTAPalette.module.css +0 -116
- package/es/deprecated/Theme/palette/defaultPalette.module.css +0 -155
- package/es/deprecated/customscroll_Old.module.css +0 -46
- package/lib/deprecated/Theme/darkTheme.module.css +0 -393
- package/lib/deprecated/Theme/defaultTheme.module.css +0 -393
- package/lib/deprecated/Theme/palette/darkCTAPalette.module.css +0 -116
- package/lib/deprecated/Theme/palette/darkPalette.module.css +0 -155
- package/lib/deprecated/Theme/palette/defaultCTAPalette.module.css +0 -116
- package/lib/deprecated/Theme/palette/defaultPalette.module.css +0 -155
- package/lib/deprecated/customscroll_Old.module.css +0 -46
|
@@ -1,31 +1,42 @@
|
|
|
1
1
|
[data-mode='default'][data-theme='yellow'] {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
2
|
+
/* stencil */
|
|
3
|
+
--zdt_stencil_dark_bg: rgba(255, 255, 255, 0.07);
|
|
4
|
+
--zdt_stencil_dark_gradient_bg: linear-gradient(left, rgba(255, 255, 255, 0.07) 0, rgba(255, 255, 255, 0.03) 33.33%, rgba(255, 255, 255, 0.03) 66.66%, rgba(255, 255, 255, 0.07) 100%);
|
|
5
|
+
|
|
6
|
+
/* dropbox */
|
|
7
|
+
--zdt_dropbox_dark_bg: #313323;
|
|
8
|
+
|
|
9
|
+
/* listitem */
|
|
10
|
+
--zdt_listitem_dark_bg: #313323;
|
|
11
|
+
--zdt_listitem_dark_text: #d0d0d4;
|
|
12
|
+
--zdt_listitem_dark_effect_bg: rgba(255, 255, 255, 0.12);
|
|
13
|
+
--zdt_listitem_dark_active_bg: #494c34;
|
|
14
|
+
--zdt_listitem_dark_tickicon: #e8b923;
|
|
15
|
+
|
|
16
|
+
/* tag */
|
|
17
|
+
--zdt_tag_dark_text: #d0d0d4;
|
|
18
|
+
--zdt_tag_dark_bg: rgba(255, 255, 255, 0.07);
|
|
19
|
+
--zdt_tag_dark_hover_text: #d0d0d4;
|
|
20
|
+
--zdt_tag_dark_hover_bg: #503348;
|
|
21
|
+
--zdt_tag_dark_close_bg: #864654;
|
|
22
|
+
--zdt_tag_dark_close_text: #de3535;
|
|
23
|
+
|
|
24
|
+
/* multiselect */
|
|
25
|
+
--zdt_multiselect_dark_border: rgba(255, 255, 255, 0.2);
|
|
26
|
+
--zdt_multiselect_darkmsg_bg: rgba(255, 255, 255, 0.02);
|
|
27
|
+
--zdt_multiselect_darkmsg_text: #d0d0d4;
|
|
28
|
+
--zdt_multiselect_darkdelete_hover_text: var(--dot_text_white);
|
|
29
|
+
|
|
30
|
+
/* avatar */
|
|
31
|
+
--zdt_avatar_white_border: rgba(255, 255, 255, 0.2);
|
|
32
|
+
--zdt_avatar_white_text: var(--dot_text_white);
|
|
33
|
+
|
|
34
|
+
/* label */
|
|
35
|
+
--zdt_label_dark_text: #d0d0d4;
|
|
36
|
+
|
|
37
|
+
/* textbox */
|
|
38
|
+
--zdt_textbox_light_text: var(--dot_text_white);
|
|
39
|
+
|
|
40
|
+
/* dropdown */
|
|
41
|
+
--zdt_dropdown_darkheading_text: var(--dot_text_white);
|
|
31
42
|
}
|
|
@@ -276,15 +276,15 @@
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
[dir=ltr] .loadingelement {
|
|
279
|
-
animation: crlrotate-ltr var(--
|
|
280
|
-
-moz-animation: crlrotate-ltr var(--
|
|
281
|
-
-webkit-animation: crlrotate-ltr var(--
|
|
279
|
+
animation: crlrotate-ltr var(--zd_no_transition8) linear infinite;
|
|
280
|
+
-moz-animation: crlrotate-ltr var(--zd_no_transition8) linear infinite;
|
|
281
|
+
-webkit-animation: crlrotate-ltr var(--zd_no_transition8) linear infinite;
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
[dir=rtl] .loadingelement {
|
|
285
|
-
animation: crlrotate-rtl var(--
|
|
286
|
-
-moz-animation: crlrotate-rtl var(--
|
|
287
|
-
-webkit-animation: crlrotate-rtl var(--
|
|
285
|
+
animation: crlrotate-rtl var(--zd_no_transition8) linear infinite;
|
|
286
|
+
-moz-animation: crlrotate-rtl var(--zd_no_transition8) linear infinite;
|
|
287
|
+
-webkit-animation: crlrotate-rtl var(--zd_no_transition8) linear infinite;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
.loadingelement:before,
|
|
@@ -463,7 +463,7 @@
|
|
|
463
463
|
border-width: 2px 2px 0 0;
|
|
464
464
|
border-style: solid;
|
|
465
465
|
border-color: var(--button_success_border_color);
|
|
466
|
-
animation: tick var(--
|
|
466
|
+
animation: tick var(--zd_no_transition3) ease 0s forwards;
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
@keyframes tick {
|
|
@@ -72,8 +72,12 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
72
72
|
needAvatarTitle,
|
|
73
73
|
avatarPalette,
|
|
74
74
|
a11y,
|
|
75
|
-
customClass
|
|
75
|
+
customClass,
|
|
76
|
+
customProps
|
|
76
77
|
} = this.props;
|
|
78
|
+
let {
|
|
79
|
+
ListItemProps = {}
|
|
80
|
+
} = customProps;
|
|
77
81
|
let {
|
|
78
82
|
customListItem = '',
|
|
79
83
|
customAvatar = '',
|
|
@@ -109,7 +113,7 @@ export default class ListItemWithAvatar extends React.PureComponent {
|
|
|
109
113
|
tagName: "li",
|
|
110
114
|
dataId: `${dataIdString}_ListItemWithAvatar`,
|
|
111
115
|
"data-title": isDisabled ? disableTitle : null
|
|
112
|
-
}, options), name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
|
|
116
|
+
}, options, ListItemProps), name || imgSrc ? /*#__PURE__*/React.createElement(Box, {
|
|
113
117
|
className: style.leftAvatar
|
|
114
118
|
}, isTeam ? /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
115
119
|
name: name,
|
|
@@ -160,7 +164,8 @@ ListItemWithAvatar.defaultProps = {
|
|
|
160
164
|
needBorder: true,
|
|
161
165
|
needAvatarTitle: true,
|
|
162
166
|
a11y: {},
|
|
163
|
-
customClass: {}
|
|
167
|
+
customClass: {},
|
|
168
|
+
customProps: {}
|
|
164
169
|
};
|
|
165
170
|
ListItemWithAvatar.propTypes = {
|
|
166
171
|
active: PropTypes.bool,
|
|
@@ -196,6 +201,9 @@ ListItemWithAvatar.propTypes = {
|
|
|
196
201
|
customListItem: PropTypes.string,
|
|
197
202
|
customAvatar: PropTypes.string,
|
|
198
203
|
customAvatarTeam: PropTypes.string
|
|
204
|
+
}),
|
|
205
|
+
customProps: PropTypes.shape({
|
|
206
|
+
ListItemProps: PropTypes.object
|
|
199
207
|
})
|
|
200
208
|
};
|
|
201
209
|
|
|
@@ -65,8 +65,12 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
65
65
|
isDisabled,
|
|
66
66
|
disableTitle,
|
|
67
67
|
a11y,
|
|
68
|
-
customClass
|
|
68
|
+
customClass,
|
|
69
|
+
customProps
|
|
69
70
|
} = this.props;
|
|
71
|
+
let {
|
|
72
|
+
ListItemProps = {}
|
|
73
|
+
} = customProps;
|
|
70
74
|
let {
|
|
71
75
|
role,
|
|
72
76
|
ariaSelected,
|
|
@@ -96,7 +100,7 @@ export default class ListItemWithIcon extends React.Component {
|
|
|
96
100
|
eleRef: this.getRef,
|
|
97
101
|
tagName: "li",
|
|
98
102
|
"data-title": isDisabled ? disableTitle : null
|
|
99
|
-
}, options), iconName && /*#__PURE__*/React.createElement(Box, {
|
|
103
|
+
}, options, ListItemProps), iconName && /*#__PURE__*/React.createElement(Box, {
|
|
100
104
|
"aria-hidden": true,
|
|
101
105
|
className: style.iconBox,
|
|
102
106
|
dataId: dataId ? `${dataId}_Icon` : `${value.toLowerCase().replace("'", '_')}_Icon`
|
|
@@ -135,7 +139,8 @@ ListItemWithIcon.defaultProps = {
|
|
|
135
139
|
value: 'List',
|
|
136
140
|
needBorder: true,
|
|
137
141
|
a11y: {},
|
|
138
|
-
customClass: ''
|
|
142
|
+
customClass: '',
|
|
143
|
+
customProps: {}
|
|
139
144
|
};
|
|
140
145
|
ListItemWithIcon.propTypes = {
|
|
141
146
|
active: PropTypes.bool,
|
|
@@ -163,7 +168,10 @@ ListItemWithIcon.propTypes = {
|
|
|
163
168
|
ariaSelected: PropTypes.bool,
|
|
164
169
|
ariaHidden: PropTypes.bool
|
|
165
170
|
}),
|
|
166
|
-
customClass: PropTypes.string
|
|
171
|
+
customClass: PropTypes.string,
|
|
172
|
+
customProps: PropTypes.shape({
|
|
173
|
+
ListItemProps: PropTypes.object
|
|
174
|
+
})
|
|
167
175
|
};
|
|
168
176
|
|
|
169
177
|
if (false) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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
|
+
|
|
1
3
|
/**** Libraries ****/
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
@@ -20,7 +22,7 @@ import { getUniqueId } from '../Provider/IdProvider';
|
|
|
20
22
|
import style from './AdvancedMultiSelect.module.css';
|
|
21
23
|
/**** Methods ****/
|
|
22
24
|
|
|
23
|
-
import { getIsEmptyValue } from '../utils/Common.js';
|
|
25
|
+
import { getIsEmptyValue, getSearchString } from '../utils/Common.js';
|
|
24
26
|
import { filterSelectedOptions } from '../utils/dropDownUtils';
|
|
25
27
|
/* eslint-disable react/sort-prop-types */
|
|
26
28
|
|
|
@@ -67,7 +69,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
67
69
|
} = this.getFilterSuggestions({
|
|
68
70
|
options,
|
|
69
71
|
selectedOptions: dummyArray,
|
|
70
|
-
searchStr: searchStr
|
|
72
|
+
searchStr: getSearchString(searchStr),
|
|
71
73
|
needSearch: needLocalSearch
|
|
72
74
|
});
|
|
73
75
|
this.suggestionsOrder = suggestionIds;
|
|
@@ -346,8 +348,13 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
346
348
|
a11y,
|
|
347
349
|
borderColor,
|
|
348
350
|
isBoxPaddingNeed,
|
|
349
|
-
getFooter
|
|
351
|
+
getFooter,
|
|
352
|
+
customProps
|
|
350
353
|
} = this.props;
|
|
354
|
+
let {
|
|
355
|
+
SuggestionsProps = {},
|
|
356
|
+
DropBoxProps = {}
|
|
357
|
+
} = customProps;
|
|
351
358
|
const {
|
|
352
359
|
clearText = 'Clear all'
|
|
353
360
|
} = i18nKeys;
|
|
@@ -433,7 +440,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
433
440
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
434
441
|
name: "ZD-delete",
|
|
435
442
|
size: "15"
|
|
436
|
-
})) : null), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
|
|
443
|
+
})) : null), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, _extends({
|
|
437
444
|
animationStyle: animationStyle,
|
|
438
445
|
boxPosition: position || `${defaultDropBoxPosition}Center`,
|
|
439
446
|
getRef: getContainerRef,
|
|
@@ -448,7 +455,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
448
455
|
role: 'listbox',
|
|
449
456
|
ariaMultiselectable: true
|
|
450
457
|
}
|
|
451
|
-
}, /*#__PURE__*/React.createElement(Card, {
|
|
458
|
+
}, DropBoxProps), /*#__PURE__*/React.createElement(Card, {
|
|
452
459
|
customClass: style.box,
|
|
453
460
|
onScroll: this.handleScroll
|
|
454
461
|
}, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
|
|
@@ -460,7 +467,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
460
467
|
})), /*#__PURE__*/React.createElement(CardContent, {
|
|
461
468
|
customClass: dropBoxSize ? style[dropBoxSize] : '',
|
|
462
469
|
eleRef: this.suggestionContainerRef
|
|
463
|
-
}, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
|
|
470
|
+
}, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
|
|
464
471
|
suggestions: suggestions,
|
|
465
472
|
selectedOptions: allselectedOptionIds,
|
|
466
473
|
getRef: this.suggestionItemRef,
|
|
@@ -472,7 +479,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
472
479
|
a11y: {
|
|
473
480
|
role: 'option'
|
|
474
481
|
}
|
|
475
|
-
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
482
|
+
}, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
476
483
|
isLoading: isFetchingOptions,
|
|
477
484
|
options: options,
|
|
478
485
|
searchString: searchStr,
|
|
@@ -560,7 +567,11 @@ AdvancedMultiSelectComponent.propTypes = {
|
|
|
560
567
|
isBoxPaddingNeed: PropTypes.bool,
|
|
561
568
|
isSearchClearOnSelect: PropTypes.bool,
|
|
562
569
|
disabledOptions: PropTypes.arrayOf(PropTypes.string),
|
|
563
|
-
getFooter: PropTypes.func
|
|
570
|
+
getFooter: PropTypes.func,
|
|
571
|
+
customProps: PropTypes.shape({
|
|
572
|
+
SuggestionsProps: PropTypes.object,
|
|
573
|
+
DropBoxProps: PropTypes.object
|
|
574
|
+
})
|
|
564
575
|
};
|
|
565
576
|
AdvancedMultiSelectComponent.defaultProps = {
|
|
566
577
|
animationStyle: 'bounce',
|
|
@@ -587,7 +598,8 @@ AdvancedMultiSelectComponent.defaultProps = {
|
|
|
587
598
|
a11y: {},
|
|
588
599
|
borderColor: 'default',
|
|
589
600
|
isBoxPaddingNeed: true,
|
|
590
|
-
isSearchClearOnSelect: true
|
|
601
|
+
isSearchClearOnSelect: true,
|
|
602
|
+
customProps: {}
|
|
591
603
|
};
|
|
592
604
|
AdvancedMultiSelectComponent.displayName = 'AdvancedMultiSelect';
|
|
593
605
|
const AdvancedMultiSelect = Popup(AdvancedMultiSelectComponent);
|
|
@@ -260,7 +260,7 @@ export class MultiSelectComponent extends React.Component {
|
|
|
260
260
|
} = this.getFilterSuggestions({
|
|
261
261
|
options,
|
|
262
262
|
selectedOptions,
|
|
263
|
-
searchStr: searchStr
|
|
263
|
+
searchStr: getSearchString(searchStr),
|
|
264
264
|
needSearch: needLocalSearch
|
|
265
265
|
});
|
|
266
266
|
this.suggestionsOrder = suggestionIds;
|
|
@@ -292,7 +292,7 @@ export class MultiSelectComponent extends React.Component {
|
|
|
292
292
|
} = this.props;
|
|
293
293
|
const highLightedSelectOptionsLen = highLightedSelectOptions.length;
|
|
294
294
|
|
|
295
|
-
if (isPopupOpen && (keyCode === 38 || keyCode === 40 || keyCode === 13 || keyCode === 27)) {
|
|
295
|
+
if (isPopupOpen && (keyCode === 38 || keyCode === 40 || keyCode === 13 || keyCode === 27 || keyCode === 9)) {
|
|
296
296
|
suggestions = this.handleFilterSuggestions();
|
|
297
297
|
}
|
|
298
298
|
|
|
@@ -420,6 +420,13 @@ export class MultiSelectComponent extends React.Component {
|
|
|
420
420
|
});
|
|
421
421
|
}
|
|
422
422
|
} else if (keyCode === 27) {// this.handlePopupClose(e);
|
|
423
|
+
} else if (keyCode === 9) {
|
|
424
|
+
const selectedOption = suggestions[hoverOption] || {};
|
|
425
|
+
const {
|
|
426
|
+
id
|
|
427
|
+
} = selectedOption;
|
|
428
|
+
isPopupOpen && !getIsEmptyValue(id) && this.handleSelectOption(id, e);
|
|
429
|
+
this.handlePopupClose(e);
|
|
423
430
|
}
|
|
424
431
|
}
|
|
425
432
|
|
|
@@ -51,7 +51,8 @@ export default class Suggestions extends React.PureComponent {
|
|
|
51
51
|
icon,
|
|
52
52
|
optionType,
|
|
53
53
|
iconSize,
|
|
54
|
-
isDisabled
|
|
54
|
+
isDisabled,
|
|
55
|
+
listItemProps
|
|
55
56
|
} = suggestion;
|
|
56
57
|
const isActive = activeId === id || selectedOptions.indexOf(id) >= 0;
|
|
57
58
|
const isHighlight = hoverOption === index || id === hoverId ? true : false;
|
|
@@ -62,6 +63,13 @@ export default class Suggestions extends React.PureComponent {
|
|
|
62
63
|
isDisabled
|
|
63
64
|
};
|
|
64
65
|
|
|
66
|
+
if (listItemProps) {
|
|
67
|
+
commonProps.customProps = {
|
|
68
|
+
'ListItemProps': { ...listItemProps
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
65
73
|
if (optionType === 'avatar') {
|
|
66
74
|
return /*#__PURE__*/React.createElement(ListItemWithAvatar, _extends({}, commonProps, {
|
|
67
75
|
autoHover: false,
|
|
@@ -151,7 +159,8 @@ Suggestions.propTypes = {
|
|
|
151
159
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
152
160
|
photoURL: PropTypes.string,
|
|
153
161
|
logo: PropTypes.string,
|
|
154
|
-
optionType: PropTypes.string
|
|
162
|
+
optionType: PropTypes.string,
|
|
163
|
+
listItemProps: PropTypes.object
|
|
155
164
|
}))
|
|
156
165
|
};
|
|
157
166
|
Suggestions.defaultProps = {
|
|
@@ -9,10 +9,20 @@ export default class AdvancedMultiSelect__default extends Component {
|
|
|
9
9
|
this.state = {
|
|
10
10
|
options: [{
|
|
11
11
|
id: 2,
|
|
12
|
-
text: 'text2'
|
|
12
|
+
text: 'text2',
|
|
13
|
+
listItemProps: {
|
|
14
|
+
style: {
|
|
15
|
+
color: 'red'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
13
18
|
}, {
|
|
14
19
|
id: 3,
|
|
15
|
-
text: 'text3'
|
|
20
|
+
text: 'text3',
|
|
21
|
+
listItemProps: {
|
|
22
|
+
style: {
|
|
23
|
+
color: 'blue'
|
|
24
|
+
}
|
|
25
|
+
}
|
|
16
26
|
}, {
|
|
17
27
|
id: 4,
|
|
18
28
|
text: 'text4'
|
|
@@ -85,7 +95,12 @@ export default class AdvancedMultiSelect__default extends Component {
|
|
|
85
95
|
noMoreText: 'No More Options .',
|
|
86
96
|
searchEmptyText: 'No Matches Found .'
|
|
87
97
|
},
|
|
88
|
-
getFooter: this.getFooter
|
|
98
|
+
getFooter: this.getFooter,
|
|
99
|
+
customProps: {
|
|
100
|
+
SuggestionsProps: {
|
|
101
|
+
needBorder: false
|
|
102
|
+
}
|
|
103
|
+
}
|
|
89
104
|
});
|
|
90
105
|
}
|
|
91
106
|
|
package/es/Provider/Config.js
CHANGED
package/es/Provider.js
CHANGED
|
@@ -28,6 +28,7 @@ import './Appearance/dark/themes/orange/orangeDarkComponentTheme.module.css';
|
|
|
28
28
|
import './Appearance/dark/themes/red/redDarkComponentTheme.module.css';
|
|
29
29
|
import './Appearance/dark/themes/yellow/yellowDarkComponentTheme.module.css';
|
|
30
30
|
import './Appearance/dark/mode/darkMode.module.css';
|
|
31
|
+
import LibraryContext from './Provider/LibraryContextInit';
|
|
31
32
|
import { setGlobalIdPrefix } from './Provider/IdProvider';
|
|
32
33
|
export default class Provider extends React.Component {
|
|
33
34
|
constructor(props) {
|
|
@@ -88,7 +89,12 @@ export default class Provider extends React.Component {
|
|
|
88
89
|
let yellow = {
|
|
89
90
|
backgroundColor: '#e8b923'
|
|
90
91
|
};
|
|
91
|
-
return /*#__PURE__*/React.createElement(
|
|
92
|
+
return /*#__PURE__*/React.createElement(LibraryContext.Provider, {
|
|
93
|
+
value: {
|
|
94
|
+
isReducedMotion: false,
|
|
95
|
+
direction: 'ltr'
|
|
96
|
+
}
|
|
97
|
+
}, /*#__PURE__*/React.createElement(AppContainer, {
|
|
92
98
|
customProps: {
|
|
93
99
|
ExtraProps: {
|
|
94
100
|
'data-mode': appearanceName,
|
|
@@ -146,7 +152,7 @@ export default class Provider extends React.Component {
|
|
|
146
152
|
onClick: () => this.setTheme('yellow')
|
|
147
153
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
148
154
|
"data-portal": "portal1"
|
|
149
|
-
}));
|
|
155
|
+
})));
|
|
150
156
|
}
|
|
151
157
|
|
|
152
158
|
}
|
|
@@ -42,7 +42,7 @@ export default class ResizeComponent extends React.Component {
|
|
|
42
42
|
let newAdded = false;
|
|
43
43
|
mutation.addedNodes.forEach(mut => {
|
|
44
44
|
// Here we can listen for icon nodes. Confirm with bk
|
|
45
|
-
if (mut.attributes['data-responsive'] && (childrenList.length !== this.querySelector().length || this.childrenCurrentList.length !== this.querySelector().length)) {
|
|
45
|
+
if (mut.attributes && mut.attributes['data-responsive'] && (childrenList.length !== this.querySelector().length || this.childrenCurrentList.length !== this.querySelector().length)) {
|
|
46
46
|
newAdded = true;
|
|
47
47
|
}
|
|
48
48
|
});
|
package/es/Select/GroupSelect.js
CHANGED
|
@@ -18,7 +18,7 @@ import style from './Select.module.css';
|
|
|
18
18
|
/**** Methods ****/
|
|
19
19
|
|
|
20
20
|
import { makeGetGroupSelectOptions, optionIdGrouping, makeGetGroupSelectFilterSuggestions, extractOptionId } from '../utils/dropDownUtils';
|
|
21
|
-
import { getIsEmptyValue, scrollTo, debounce } from '../utils/Common';
|
|
21
|
+
import { getIsEmptyValue, scrollTo, debounce, getSearchString } from '../utils/Common';
|
|
22
22
|
/* eslint-disable react/no-unused-prop-types */
|
|
23
23
|
|
|
24
24
|
/* eslint-disable react/sort-prop-types */
|
|
@@ -214,7 +214,7 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
214
214
|
} = this.state;
|
|
215
215
|
|
|
216
216
|
if (needSearch && searchStr && searchStr.trim().length) {
|
|
217
|
-
searchStr = searchStr
|
|
217
|
+
searchStr = getSearchString(searchStr);
|
|
218
218
|
let {
|
|
219
219
|
suggestionGroups,
|
|
220
220
|
suggestionOptionIds
|
|
@@ -253,8 +253,8 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
253
253
|
let {
|
|
254
254
|
onSearch
|
|
255
255
|
} = this.props;
|
|
256
|
-
let searchStrRegex = searchStr
|
|
257
|
-
let valueStrRegex = value
|
|
256
|
+
let searchStrRegex = getSearchString(searchStr);
|
|
257
|
+
let valueStrRegex = getSearchString(value);
|
|
258
258
|
let isSearch = searchStrRegex !== valueStrRegex ? true : false;
|
|
259
259
|
this.setState({
|
|
260
260
|
searchStr: value,
|
package/es/Select/Select.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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
|
+
|
|
1
3
|
/**** Libraries ****/
|
|
2
4
|
import React, { Component } from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
@@ -246,12 +248,17 @@ export class SelectComponent extends Component {
|
|
|
246
248
|
let {
|
|
247
249
|
options,
|
|
248
250
|
valueField,
|
|
249
|
-
textField
|
|
251
|
+
textField,
|
|
252
|
+
customProps = {}
|
|
250
253
|
} = props;
|
|
254
|
+
let {
|
|
255
|
+
listItemProps = {}
|
|
256
|
+
} = customProps;
|
|
251
257
|
return this.formatOptions({
|
|
252
258
|
options,
|
|
253
259
|
valueField,
|
|
254
|
-
textField
|
|
260
|
+
textField,
|
|
261
|
+
listItemProps
|
|
255
262
|
});
|
|
256
263
|
}
|
|
257
264
|
|
|
@@ -339,6 +346,20 @@ export class SelectComponent extends Component {
|
|
|
339
346
|
this.valueInput && this.valueInput.focus({
|
|
340
347
|
preventScroll: true
|
|
341
348
|
}); //this.handlePopupClose(e);
|
|
349
|
+
} else if (keyCode === 9) {
|
|
350
|
+
let option = options[hoverIndex];
|
|
351
|
+
let {
|
|
352
|
+
id
|
|
353
|
+
} = option || {};
|
|
354
|
+
|
|
355
|
+
if (isPopupOpen && !getIsEmptyValue(id)) {
|
|
356
|
+
onChange && onChange(id, optionsNormalize[id]);
|
|
357
|
+
needCloseOnSelect && this.handlePopupClose(e);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
if (!isPopupOpen && isPopupOpenOnEnter) {
|
|
361
|
+
this.togglePopup(e);
|
|
362
|
+
}
|
|
342
363
|
}
|
|
343
364
|
}
|
|
344
365
|
|
|
@@ -693,7 +714,8 @@ export class SelectComponent extends Component {
|
|
|
693
714
|
i18nKeys,
|
|
694
715
|
htmlId,
|
|
695
716
|
children,
|
|
696
|
-
iconOnHover
|
|
717
|
+
iconOnHover,
|
|
718
|
+
customProps
|
|
697
719
|
} = this.props;
|
|
698
720
|
let {
|
|
699
721
|
TextBoxIcon_i18n,
|
|
@@ -714,6 +736,11 @@ export class SelectComponent extends Component {
|
|
|
714
736
|
let suggestions = this.handleFilterSuggestions();
|
|
715
737
|
let setAriaId = this.getNextAriaId();
|
|
716
738
|
let ariaErrorId = this.getNextAriaId();
|
|
739
|
+
let {
|
|
740
|
+
TextBoxProps = {},
|
|
741
|
+
DropdownSearchTextBoxProps = {},
|
|
742
|
+
SuggestionsProps = {}
|
|
743
|
+
} = customProps;
|
|
717
744
|
return /*#__PURE__*/React.createElement("div", {
|
|
718
745
|
className: `${isParentBased || isReadOnly || isDisabled ? style.container : ''} ${style[`box_${size}`]} ${isReadOnly ? style.readonly : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${iconOnHover && (isReadOnly || isDisabled) ? style.iconOnHoverReadonly : iconOnHover && !(isReadOnly || isDisabled) ? style.iconOnHoverStyle : ''}`,
|
|
719
746
|
"data-title": isDisabled ? title : ''
|
|
@@ -756,7 +783,10 @@ export class SelectComponent extends Component {
|
|
|
756
783
|
borderColor: borderColor,
|
|
757
784
|
htmlId: htmlId,
|
|
758
785
|
isFocus: isPopupReady,
|
|
759
|
-
autoComplete: false
|
|
786
|
+
autoComplete: false,
|
|
787
|
+
customProps: {
|
|
788
|
+
TextBoxProps: TextBoxProps
|
|
789
|
+
}
|
|
760
790
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
761
791
|
alignBox: "row",
|
|
762
792
|
align: "both"
|
|
@@ -801,7 +831,8 @@ export class SelectComponent extends Component {
|
|
|
801
831
|
borderColor: borderColor,
|
|
802
832
|
htmlId: htmlId,
|
|
803
833
|
autoComplete: false,
|
|
804
|
-
isFocus: isPopupReady
|
|
834
|
+
isFocus: isPopupReady,
|
|
835
|
+
customProps: TextBoxProps
|
|
805
836
|
})), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
|
|
806
837
|
animationStyle: animationStyle,
|
|
807
838
|
boxPosition: position || `${defaultDropBoxPosition}Center`,
|
|
@@ -834,11 +865,14 @@ export class SelectComponent extends Component {
|
|
|
834
865
|
onClear: this.handleClearSearch,
|
|
835
866
|
dataId: `${dataId}_search`,
|
|
836
867
|
i18nKeys: TextBoxIcon_i18n,
|
|
837
|
-
autoComplete: false
|
|
868
|
+
autoComplete: false,
|
|
869
|
+
customProps: {
|
|
870
|
+
TextBoxProps: DropdownSearchTextBoxProps
|
|
871
|
+
}
|
|
838
872
|
}))) : null, /*#__PURE__*/React.createElement(CardContent, {
|
|
839
873
|
customClass: dropBoxSize ? style[dropBoxSize] : '',
|
|
840
874
|
eleRef: this.suggestionContainerRef
|
|
841
|
-
}, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
|
|
875
|
+
}, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
|
|
842
876
|
activeId: selectedId,
|
|
843
877
|
suggestions: suggestions,
|
|
844
878
|
getRef: this.suggestionItemRef,
|
|
@@ -856,7 +890,7 @@ export class SelectComponent extends Component {
|
|
|
856
890
|
ariaParentRole: 'listbox',
|
|
857
891
|
role: 'option'
|
|
858
892
|
}
|
|
859
|
-
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
893
|
+
}, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
860
894
|
isLoading: isFetchingOptions,
|
|
861
895
|
options: options,
|
|
862
896
|
searchString: searchStr,
|
|
@@ -946,7 +980,13 @@ SelectComponent.propTypes = {
|
|
|
946
980
|
htmlId: PropTypes.string,
|
|
947
981
|
children: PropTypes.node,
|
|
948
982
|
onFocus: PropTypes.func,
|
|
949
|
-
iconOnHover: PropTypes.bool
|
|
983
|
+
iconOnHover: PropTypes.bool,
|
|
984
|
+
customProps: PropTypes.shape({
|
|
985
|
+
TextBoxProps: PropTypes.object,
|
|
986
|
+
DropdownSearchTextBoxProps: PropTypes.object,
|
|
987
|
+
listItemProps: PropTypes.object,
|
|
988
|
+
SuggestionsProps: PropTypes.object
|
|
989
|
+
})
|
|
950
990
|
};
|
|
951
991
|
SelectComponent.defaultProps = {
|
|
952
992
|
animationStyle: 'bounce',
|
|
@@ -978,7 +1018,8 @@ SelectComponent.defaultProps = {
|
|
|
978
1018
|
isParentBased: true,
|
|
979
1019
|
isSearchClearOnClose: true,
|
|
980
1020
|
i18nKeys: {},
|
|
981
|
-
iconOnHover: false
|
|
1021
|
+
iconOnHover: false,
|
|
1022
|
+
customProps: {}
|
|
982
1023
|
};
|
|
983
1024
|
SelectComponent.displayName = 'Select';
|
|
984
1025
|
let Select = Popup(SelectComponent);
|