@zohodesk/components 1.0.0-temp-80 → 1.0.0-temp-81
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 +1098 -1084
- package/assets/Appearance/dark/mode/darkMode.module.css +2 -1
- package/assets/Appearance/default/mode/defaultMode.module.css +2 -1
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +2 -1
- package/docs/external/active-line.js +72 -72
- package/docs/external/autorefresh.js +47 -47
- package/docs/external/codemirror.js +9681 -9681
- package/docs/external/css/hopscotch.css +576 -576
- package/docs/external/css/styleGuide.css +1100 -1100
- package/docs/external/css.js +466 -466
- package/docs/external/designTokens.js +1 -1
- package/docs/external/foldcode.js +151 -151
- package/docs/external/format.js +129 -129
- package/docs/external/htmlmixed.js +84 -84
- package/docs/external/index.html +127 -127
- package/docs/external/javascript.js +422 -422
- package/docs/external/jsx.js +147 -147
- package/docs/external/matchbrackets.js +145 -145
- package/docs/external/xml.js +322 -322
- package/docs/package.json +41 -41
- package/docs/src/index.js +1311 -1311
- package/es/AppContainer/AppContainer.module.css +18 -18
- package/es/Avatar/Avatar.js +9 -9
- package/es/Avatar/Avatar.module.css +135 -135
- 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 -161
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +226 -226
- package/es/AvatarTeam/docs/AvatarTeam__custom.docs.js +0 -0
- package/es/AvatarTeam/docs/AvatarTeam__default.docs.js +0 -0
- package/es/AvatarTeam/docs/AvatarTeam__palette.docs.js +0 -0
- package/es/AvatarTeam/docs/AvatarTeam__size.docs.js +0 -0
- package/es/Button/Button.js +9 -7
- package/es/Button/Button.module.css +521 -521
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +191 -191
- package/es/Button/docs/Button__custom.docs.js +0 -0
- package/es/Button/docs/Button__default.docs.js +0 -0
- package/es/Buttongroup/Buttongroup.js +1 -1
- package/es/Buttongroup/Buttongroup.module.css +89 -89
- 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/Card/docs/Card__Custom.docs.js +0 -0
- package/es/Card/docs/Card__Default.docs.js +0 -0
- package/es/Card/docs/Card__Scroll.docs.js +0 -0
- package/es/CheckBox/CheckBox.js +0 -0
- package/es/CheckBox/CheckBox.module.css +157 -157
- package/es/CheckBox/docs/CheckBox__custom.docs.js +0 -0
- package/es/CheckBox/docs/CheckBox__default.docs.js +0 -0
- package/es/DateTime/CalendarView.js +22 -11
- package/es/DateTime/DateTime.js +16 -3
- package/es/DateTime/DateTime.module.css +232 -187
- package/es/DateTime/DateWidget.js +0 -0
- package/es/DateTime/DateWidget.module.css +38 -38
- package/es/DateTime/YearView.js +0 -0
- package/es/DateTime/YearView.module.css +81 -81
- package/es/DateTime/common.js +0 -0
- package/es/DateTime/docs/DateTime__default.docs.js +0 -0
- package/es/DateTime/docs/DateWidget__default.docs.js +0 -0
- package/es/DateTime/index.js +0 -0
- package/es/DateTime/objectUtils.js +0 -0
- package/es/DateTime/props/propTypes.js +4 -2
- package/es/DateTime/typeChecker.js +0 -0
- package/es/DateTime/validator.js +0 -0
- package/es/DropBox/DropBox.js +24 -4
- package/es/DropBox/DropBox.module.css +406 -406
- package/es/DropBox/DropBoxPositionMapping.json +144 -144
- package/es/DropBox/props/defaultProps.js +2 -1
- package/es/DropBox/props/propTypes.js +1 -0
- 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 -53
- package/es/DropDown/DropDownItem.js +0 -0
- package/es/DropDown/DropDownItem.module.css +94 -94
- 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/Heading/Heading.module.css +4 -4
- 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/Label/docs/Label__clipped.docs.js +0 -0
- package/es/Label/docs/Label__custom.docs.js +0 -0
- package/es/Label/docs/Label__palette.docs.js +0 -0
- package/es/Label/docs/Label__size.docs.js +0 -0
- package/es/Label/docs/Label__type.docs.js +0 -0
- package/es/Layout/Box.js +0 -0
- package/es/Layout/Container.js +0 -0
- package/es/Layout/Layout.module.css +335 -335
- package/es/Layout/docs/Layout__default.docs.js +0 -0
- package/es/Layout/utils.js +0 -0
- package/es/LightNightMode/Colors.json +496 -496
- package/es/ListItem/ListContainer.js +2 -1
- package/es/ListItem/ListItem.js +0 -0
- package/es/ListItem/ListItem.module.css +209 -209
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +5 -5
- package/es/MultiSelect/AdvancedMultiSelect.js +11 -3
- package/es/MultiSelect/MultiSelect.js +23 -17
- package/es/MultiSelect/MultiSelect.module.css +205 -205
- package/es/MultiSelect/MultiSelectWithAvatar.js +11 -3
- package/es/MultiSelect/SelectedOptions.module.css +15 -15
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +0 -0
- package/es/MultiSelect/props/defaultProps.js +8 -4
- package/es/MultiSelect/props/propTypes.js +8 -4
- 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 +7 -36
- package/es/Radio/Radio.js +0 -0
- package/es/Radio/Radio.module.css +112 -112
- package/es/Radio/docs/Radio__custom.docs.js +0 -0
- package/es/Radio/docs/Radio__default.docs.js +0 -0
- package/es/Responsive/CustomResponsive.js +0 -0
- package/es/Responsive/docs/Responsive__Custom.docs.js +0 -0
- package/es/Responsive/docs/style.module.css +55 -55
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -6
- package/es/Ribbon/Ribbon.js +0 -0
- package/es/Ribbon/Ribbon.module.css +376 -376
- package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +163 -163
- package/es/Ribbon/docs/Ribbon__custom.docs.js +0 -0
- package/es/Ribbon/docs/Ribbon__default.docs.js +0 -0
- package/es/RippleEffect/RippleEffect.module.css +92 -92
- package/es/Select/GroupSelect.js +15 -7
- package/es/Select/Select.js +15 -15
- package/es/Select/Select.module.css +109 -106
- package/es/Select/SelectWithAvatar.js +12 -4
- package/es/Select/SelectWithIcon.js +71 -13
- package/es/Select/__tests__/Select.spec.js +0 -0
- package/es/Select/docs/SelectWithIcon__default.docs.js +0 -0
- package/es/Select/docs/Select__default.docs.js +0 -0
- package/es/Select/props/defaultProps.js +8 -4
- package/es/Select/props/propTypes.js +8 -4
- package/es/Stencils/Stencils.js +0 -0
- package/es/Stencils/Stencils.module.css +96 -96
- package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +49 -49
- package/es/Switch/Switch.js +7 -5
- package/es/Switch/Switch.module.css +110 -110
- package/es/Switch/docs/Switch__custom.docs.js +0 -0
- package/es/Switch/docs/Switch__default.docs.js +0 -0
- package/es/Tab/Tab.module.css +101 -101
- package/es/Tab/TabContent.js +1 -1
- package/es/Tab/TabContent.module.css +4 -4
- package/es/Tab/Tabs.js +25 -20
- package/es/Tab/Tabs.module.css +141 -141
- package/es/Tab/docs/tabdocs.module.css +29 -29
- package/es/Tag/Tag.js +8 -8
- package/es/Tag/Tag.module.css +254 -254
- package/es/Tag/docs/Tag__custom.docs.js +0 -0
- package/es/Tag/docs/Tag__default.docs.js +0 -0
- package/es/TextBox/TextBox.js +0 -0
- package/es/TextBox/TextBox.module.css +157 -157
- package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +127 -127
- package/es/TextBox/docs/TextBox__custom.docs.js +0 -0
- package/es/TextBox/docs/TextBox__default.docs.js +0 -0
- package/es/TextBox/docs/TextBox__variant.docs.js +0 -0
- package/es/TextBoxIcon/TextBoxIcon.js +0 -0
- package/es/TextBoxIcon/TextBoxIcon.module.css +78 -78
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +334 -334
- package/es/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +0 -0
- package/es/TextBoxIcon/docs/TextBoxIcon__default.docs.js +0 -0
- package/es/Textarea/Textarea.js +0 -0
- package/es/Textarea/Textarea.module.css +139 -139
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +97 -97
- package/es/Textarea/docs/Textarea__custom.docs.js +0 -0
- package/es/Textarea/docs/Textarea__default.docs.js +0 -0
- package/es/Textarea/docs/Textarea__disabled.docs.js +0 -0
- package/es/Tooltip/Tooltip.module.css +109 -109
- package/es/common/animation.module.css +624 -624
- package/es/common/avatarsizes.module.css +44 -44
- package/es/common/basic.module.css +33 -33
- package/es/common/basicReset.module.css +40 -40
- package/es/common/common.module.css +524 -524
- package/es/common/customscroll.module.css +89 -89
- package/es/common/docStyle.module.css +766 -887
- package/es/common/reset.module.css +12 -12
- package/es/common/transition.module.css +146 -146
- package/es/deprecated/AdvancedMultiSelect.module.css +126 -126
- package/es/semantic/Button/semanticButton.module.css +9 -9
- package/es/utils/Common.js +18 -0
- package/es/utils/dropDownUtils.js +0 -0
- package/lib/AppContainer/AppContainer.module.css +18 -18
- package/lib/Avatar/Avatar.js +9 -9
- package/lib/Avatar/Avatar.module.css +135 -135
- 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/AvatarTeam/docs/AvatarTeam__custom.docs.js +0 -0
- package/lib/AvatarTeam/docs/AvatarTeam__default.docs.js +0 -0
- package/lib/AvatarTeam/docs/AvatarTeam__palette.docs.js +0 -0
- package/lib/AvatarTeam/docs/AvatarTeam__size.docs.js +0 -0
- package/lib/Button/Button.js +9 -7
- package/lib/Button/Button.module.css +521 -521
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +191 -191
- package/lib/Button/docs/Button__custom.docs.js +0 -0
- package/lib/Button/docs/Button__default.docs.js +0 -0
- 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/Card/docs/Card__Custom.docs.js +0 -0
- package/lib/Card/docs/Card__Default.docs.js +0 -0
- package/lib/Card/docs/Card__Scroll.docs.js +0 -0
- package/lib/CheckBox/CheckBox.js +0 -0
- package/lib/CheckBox/CheckBox.module.css +157 -157
- package/lib/CheckBox/docs/CheckBox__custom.docs.js +0 -0
- package/lib/CheckBox/docs/CheckBox__default.docs.js +0 -0
- package/lib/DateTime/CalendarView.js +22 -11
- package/lib/DateTime/DateTime.js +16 -3
- package/lib/DateTime/DateTime.module.css +232 -187
- package/lib/DateTime/DateWidget.js +0 -0
- package/lib/DateTime/DateWidget.module.css +38 -38
- package/lib/DateTime/YearView.js +0 -0
- package/lib/DateTime/YearView.module.css +81 -81
- package/lib/DateTime/common.js +0 -0
- package/lib/DateTime/docs/DateTime__default.docs.js +0 -0
- package/lib/DateTime/docs/DateWidget__default.docs.js +0 -0
- package/lib/DateTime/index.js +0 -0
- package/lib/DateTime/objectUtils.js +0 -0
- package/lib/DateTime/props/propTypes.js +4 -2
- package/lib/DateTime/typeChecker.js +0 -0
- package/lib/DateTime/validator.js +0 -0
- package/lib/DropBox/DropBox.js +24 -4
- package/lib/DropBox/DropBox.module.css +406 -406
- package/lib/DropBox/DropBoxPositionMapping.json +144 -144
- package/lib/DropBox/props/defaultProps.js +2 -1
- package/lib/DropBox/props/propTypes.js +1 -0
- 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/Heading/Heading.module.css +4 -4
- 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/Label/docs/Label__clipped.docs.js +0 -0
- package/lib/Label/docs/Label__custom.docs.js +0 -0
- package/lib/Label/docs/Label__palette.docs.js +0 -0
- package/lib/Label/docs/Label__size.docs.js +0 -0
- package/lib/Label/docs/Label__type.docs.js +0 -0
- package/lib/Layout/Box.js +0 -0
- package/lib/Layout/Container.js +0 -0
- package/lib/Layout/Layout.module.css +335 -335
- package/lib/Layout/docs/Layout__default.docs.js +0 -0
- package/lib/Layout/utils.js +0 -0
- package/lib/LightNightMode/Colors.json +496 -496
- package/lib/ListItem/ListContainer.js +2 -1
- package/lib/ListItem/ListItem.js +0 -0
- package/lib/ListItem/ListItem.module.css +209 -209
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +5 -5
- package/lib/MultiSelect/AdvancedMultiSelect.js +11 -3
- package/lib/MultiSelect/MultiSelect.js +81 -72
- package/lib/MultiSelect/MultiSelect.module.css +205 -205
- package/lib/MultiSelect/MultiSelectWithAvatar.js +11 -3
- package/lib/MultiSelect/SelectedOptions.module.css +15 -15
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +0 -0
- package/lib/MultiSelect/props/defaultProps.js +8 -4
- package/lib/MultiSelect/props/propTypes.js +8 -4
- 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.js +4 -37
- package/lib/Radio/Radio.js +0 -0
- package/lib/Radio/Radio.module.css +112 -112
- package/lib/Radio/docs/Radio__custom.docs.js +0 -0
- package/lib/Radio/docs/Radio__default.docs.js +0 -0
- package/lib/Responsive/CustomResponsive.js +0 -0
- package/lib/Responsive/docs/Responsive__Custom.docs.js +0 -0
- package/lib/Responsive/docs/style.module.css +55 -55
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -6
- 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/Ribbon/docs/Ribbon__custom.docs.js +0 -0
- package/lib/Ribbon/docs/Ribbon__default.docs.js +0 -0
- package/lib/RippleEffect/RippleEffect.module.css +92 -92
- package/lib/Select/GroupSelect.js +14 -6
- package/lib/Select/Select.js +14 -13
- package/lib/Select/Select.module.css +109 -106
- package/lib/Select/SelectWithAvatar.js +12 -4
- package/lib/Select/SelectWithIcon.js +85 -21
- package/lib/Select/__tests__/Select.spec.js +0 -0
- package/lib/Select/docs/SelectWithIcon__default.docs.js +0 -0
- package/lib/Select/docs/Select__default.docs.js +0 -0
- package/lib/Select/props/defaultProps.js +7 -4
- package/lib/Select/props/propTypes.js +8 -4
- 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 +7 -5
- package/lib/Switch/Switch.module.css +110 -110
- package/lib/Switch/docs/Switch__custom.docs.js +0 -0
- package/lib/Switch/docs/Switch__default.docs.js +0 -0
- package/lib/Tab/Tab.module.css +101 -101
- package/lib/Tab/TabContent.js +1 -1
- package/lib/Tab/TabContent.module.css +4 -4
- package/lib/Tab/Tabs.js +19 -14
- package/lib/Tab/Tabs.module.css +141 -141
- package/lib/Tab/docs/tabdocs.module.css +29 -29
- package/lib/Tag/Tag.js +8 -8
- package/lib/Tag/Tag.module.css +254 -254
- package/lib/Tag/docs/Tag__custom.docs.js +0 -0
- package/lib/Tag/docs/Tag__default.docs.js +0 -0
- 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/TextBox/docs/TextBox__custom.docs.js +0 -0
- package/lib/TextBox/docs/TextBox__default.docs.js +0 -0
- package/lib/TextBox/docs/TextBox__variant.docs.js +0 -0
- 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/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +0 -0
- package/lib/TextBoxIcon/docs/TextBoxIcon__default.docs.js +0 -0
- 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/Textarea/docs/Textarea__custom.docs.js +0 -0
- package/lib/Textarea/docs/Textarea__default.docs.js +0 -0
- package/lib/Textarea/docs/Textarea__disabled.docs.js +0 -0
- package/lib/Tooltip/Tooltip.module.css +109 -109
- 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 +524 -524
- package/lib/common/customscroll.module.css +89 -89
- package/lib/common/docStyle.module.css +766 -887
- package/lib/common/reset.module.css +12 -12
- package/lib/common/transition.module.css +146 -146
- package/lib/deprecated/AdvancedMultiSelect.module.css +126 -126
- package/lib/semantic/Button/semanticButton.module.css +9 -9
- package/lib/utils/Common.js +18 -0
- package/lib/utils/dropDownUtils.js +0 -0
- package/package.json +82 -76
- package/assets/Appearance/dark/mode/contrast/darkContrast.module.css +0 -343
- package/assets/Appearance/dark/themes/blue/contrast/blueDarkCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/dark/themes/green/contrast/greenDarkCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/dark/themes/orange/contrast/orangeDarkCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/dark/themes/red/contrast/redDarkCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/dark/themes/yellow/contrast/yellowDarkCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/default/mode/contrast/defaultContrast.module.css +0 -343
- package/assets/Appearance/default/themes/blue/contrast/blueDefaultCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/default/themes/green/contrast/greenDefaultCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/default/themes/orange/contrast/orangeDefaultCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/default/themes/red/contrast/redDefaultCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/default/themes/yellow/contrast/yellowDefaultCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/pureDark/mode/contrast/pureDarkContrast.module.css +0 -343
- package/assets/Appearance/pureDark/themes/blue/contrast/bluePureDarkCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/pureDark/themes/green/contrast/greenPureDarkCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/pureDark/themes/orange/contrast/orangePureDarkCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/pureDark/themes/red/contrast/redPureDarkCTAThemeContrast.module.css +0 -34
- package/assets/Appearance/pureDark/themes/yellow/contrast/yellowPureDarkCTAThemeContrast.module.css +0 -34
|
@@ -1,106 +1,109 @@
|
|
|
1
|
-
.input {
|
|
2
|
-
cursor: pointer;
|
|
3
|
-
}
|
|
4
|
-
.small {
|
|
5
|
-
max-height: var(--zd_size200);
|
|
6
|
-
}
|
|
7
|
-
.medium {
|
|
8
|
-
max-height: var(--zd_size350);
|
|
9
|
-
}
|
|
10
|
-
.large {
|
|
11
|
-
max-height: var(--zd_size400);
|
|
12
|
-
}
|
|
13
|
-
.emptyState {
|
|
14
|
-
font-size: var(--zd_font_size14);
|
|
15
|
-
color: var(--zdt_select_emptystate_text);
|
|
16
|
-
composes: semibold from '../common/common.module.css';
|
|
17
|
-
}
|
|
18
|
-
.box_small .emptyState {
|
|
19
|
-
padding: var(--zd_size12) var(--zd_size6);
|
|
20
|
-
}
|
|
21
|
-
.box_medium .emptyState {
|
|
22
|
-
padding: var(--zd_size12) var(--zd_size15);
|
|
23
|
-
}
|
|
24
|
-
.hide {
|
|
25
|
-
composes: vishidden from '../common/common.module.css';
|
|
26
|
-
}
|
|
27
|
-
.container {
|
|
28
|
-
position: relative;
|
|
29
|
-
}
|
|
30
|
-
.arrowIcon {
|
|
31
|
-
height: var(--zd_size8);
|
|
32
|
-
line-height: var(--zd_size8);
|
|
33
|
-
}
|
|
34
|
-
.small.search {
|
|
35
|
-
padding: 0 var(--zd_size5);
|
|
36
|
-
}
|
|
37
|
-
.medium.search {
|
|
38
|
-
padding: var(--zd_size3) var(--zd_size20) 0;
|
|
39
|
-
}
|
|
40
|
-
.title {
|
|
41
|
-
margin-bottom: var(--zd_size6);
|
|
42
|
-
}
|
|
43
|
-
.groupTitle {
|
|
44
|
-
margin: var(--zd_size6) 0;
|
|
45
|
-
}
|
|
46
|
-
.listItemContainer {
|
|
47
|
-
padding: var(--zd_size10) 0;
|
|
48
|
-
}
|
|
49
|
-
.responsivelistItemContainer {
|
|
50
|
-
padding: var(--zd_size10) 0 0;
|
|
51
|
-
}
|
|
52
|
-
.readonly {
|
|
53
|
-
--textboxicon_icon_cursor: not-allowed;
|
|
54
|
-
}
|
|
55
|
-
.transparentContainer .arrowIcon {
|
|
56
|
-
opacity: 0;
|
|
57
|
-
visibility: hidden;
|
|
58
|
-
}
|
|
59
|
-
.transparentContainer:hover .arrowIcon {
|
|
60
|
-
opacity: 1;
|
|
61
|
-
visibility: visible;
|
|
62
|
-
}
|
|
63
|
-
.disable {
|
|
64
|
-
color: var(--zdt_select_disable_text);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.leftIcon {
|
|
68
|
-
position: absolute;
|
|
69
|
-
top: 0;
|
|
70
|
-
bottom: 0;
|
|
71
|
-
width: var(--zd_size30);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
[dir=ltr] .leftIcon {
|
|
75
|
-
left: 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
[dir=rtl] .leftIcon {
|
|
79
|
-
right: 0;
|
|
80
|
-
}
|
|
81
|
-
[dir=ltr] .iconSelect {
|
|
82
|
-
padding-left: var(--zd_size30);
|
|
83
|
-
}
|
|
84
|
-
[dir=rtl] .iconSelect {
|
|
85
|
-
padding-right: var(--zd_size30);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.dropBoxList {
|
|
89
|
-
padding: var(--zd_size10) 0;
|
|
90
|
-
}
|
|
91
|
-
.responsivedropBoxList{
|
|
92
|
-
padding: var(--zd_size10) 0 0 0;
|
|
93
|
-
}
|
|
94
|
-
.rotate {
|
|
95
|
-
transform: rotateX(180deg);
|
|
96
|
-
}
|
|
97
|
-
.iconOnHoverStyle .arrowIcon,
|
|
98
|
-
.iconOnHoverReadonly .arrowIcon,
|
|
99
|
-
.iconOnHoverReadonly:hover .arrowIcon {
|
|
100
|
-
opacity: 0;
|
|
101
|
-
visibility: hidden;
|
|
102
|
-
}
|
|
103
|
-
.iconOnHoverStyle:hover .arrowIcon {
|
|
104
|
-
opacity: 1;
|
|
105
|
-
visibility: visible;
|
|
106
|
-
}
|
|
1
|
+
.input {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
}
|
|
4
|
+
.small {
|
|
5
|
+
max-height: var(--zd_size200);
|
|
6
|
+
}
|
|
7
|
+
.medium {
|
|
8
|
+
max-height: var(--zd_size350);
|
|
9
|
+
}
|
|
10
|
+
.large {
|
|
11
|
+
max-height: var(--zd_size400);
|
|
12
|
+
}
|
|
13
|
+
.emptyState {
|
|
14
|
+
font-size: var(--zd_font_size14);
|
|
15
|
+
color: var(--zdt_select_emptystate_text);
|
|
16
|
+
composes: semibold from '../common/common.module.css';
|
|
17
|
+
}
|
|
18
|
+
.box_small .emptyState {
|
|
19
|
+
padding: var(--zd_size12) var(--zd_size6);
|
|
20
|
+
}
|
|
21
|
+
.box_medium .emptyState {
|
|
22
|
+
padding: var(--zd_size12) var(--zd_size15);
|
|
23
|
+
}
|
|
24
|
+
.hide {
|
|
25
|
+
composes: vishidden from '../common/common.module.css';
|
|
26
|
+
}
|
|
27
|
+
.container {
|
|
28
|
+
position: relative;
|
|
29
|
+
}
|
|
30
|
+
.arrowIcon {
|
|
31
|
+
height: var(--zd_size8);
|
|
32
|
+
line-height: var(--zd_size8);
|
|
33
|
+
}
|
|
34
|
+
.small.search {
|
|
35
|
+
padding: 0 var(--zd_size5);
|
|
36
|
+
}
|
|
37
|
+
.medium.search {
|
|
38
|
+
padding: var(--zd_size3) var(--zd_size20) 0;
|
|
39
|
+
}
|
|
40
|
+
.title {
|
|
41
|
+
margin-bottom: var(--zd_size6);
|
|
42
|
+
}
|
|
43
|
+
.groupTitle {
|
|
44
|
+
margin: var(--zd_size6) 0;
|
|
45
|
+
}
|
|
46
|
+
.listItemContainer {
|
|
47
|
+
padding: var(--zd_size10) 0;
|
|
48
|
+
}
|
|
49
|
+
.responsivelistItemContainer {
|
|
50
|
+
padding: var(--zd_size10) 0 0;
|
|
51
|
+
}
|
|
52
|
+
.readonly {
|
|
53
|
+
--textboxicon_icon_cursor: not-allowed;
|
|
54
|
+
}
|
|
55
|
+
.transparentContainer .arrowIcon {
|
|
56
|
+
opacity: 0;
|
|
57
|
+
visibility: hidden;
|
|
58
|
+
}
|
|
59
|
+
.transparentContainer:hover .arrowIcon {
|
|
60
|
+
opacity: 1;
|
|
61
|
+
visibility: visible;
|
|
62
|
+
}
|
|
63
|
+
.disable {
|
|
64
|
+
color: var(--zdt_select_disable_text);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.leftIcon {
|
|
68
|
+
position: absolute;
|
|
69
|
+
top: 0;
|
|
70
|
+
bottom: 0;
|
|
71
|
+
width: var(--zd_size30);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
[dir=ltr] .leftIcon {
|
|
75
|
+
left: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[dir=rtl] .leftIcon {
|
|
79
|
+
right: 0;
|
|
80
|
+
}
|
|
81
|
+
[dir=ltr] .iconSelect {
|
|
82
|
+
padding-left: var(--zd_size30);
|
|
83
|
+
}
|
|
84
|
+
[dir=rtl] .iconSelect {
|
|
85
|
+
padding-right: var(--zd_size30);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.dropBoxList {
|
|
89
|
+
padding: var(--zd_size10) 0;
|
|
90
|
+
}
|
|
91
|
+
.responsivedropBoxList{
|
|
92
|
+
padding: var(--zd_size10) 0 0 0;
|
|
93
|
+
}
|
|
94
|
+
.rotate {
|
|
95
|
+
transform: rotateX(180deg);
|
|
96
|
+
}
|
|
97
|
+
.iconOnHoverStyle .arrowIcon,
|
|
98
|
+
.iconOnHoverReadonly .arrowIcon,
|
|
99
|
+
.iconOnHoverReadonly:hover .arrowIcon {
|
|
100
|
+
opacity: 0;
|
|
101
|
+
visibility: hidden;
|
|
102
|
+
}
|
|
103
|
+
.iconOnHoverStyle:hover .arrowIcon {
|
|
104
|
+
opacity: 1;
|
|
105
|
+
visibility: visible;
|
|
106
|
+
}
|
|
107
|
+
.loader {
|
|
108
|
+
padding: var(--zd_size10);
|
|
109
|
+
}
|
|
@@ -21,6 +21,7 @@ var _DropDownHeading = _interopRequireDefault(require("../DropDown/DropDownHeadi
|
|
|
21
21
|
var _IdProvider = require("../Provider/IdProvider");
|
|
22
22
|
var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
|
|
23
23
|
var _CustomResponsive = require("../Responsive/CustomResponsive");
|
|
24
|
+
var _Loader = _interopRequireDefault(require("@zohodesk/svg/lib/Loader/Loader"));
|
|
24
25
|
var _MultiSelectModule = _interopRequireDefault(require("../MultiSelect/MultiSelect.module.css"));
|
|
25
26
|
var _SelectModule = _interopRequireDefault(require("./Select.module.css"));
|
|
26
27
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -160,7 +161,8 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
160
161
|
groupName = _this$props.groupName,
|
|
161
162
|
i18nKeys = _this$props.i18nKeys,
|
|
162
163
|
htmlId = _this$props.htmlId,
|
|
163
|
-
needEffect = _this$props.needEffect
|
|
164
|
+
needEffect = _this$props.needEffect,
|
|
165
|
+
isLoading = _this$props.isLoading;
|
|
164
166
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
165
167
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
166
168
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -252,7 +254,10 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
252
254
|
isPadding: false,
|
|
253
255
|
isResponsivePadding: true,
|
|
254
256
|
alignBox: "row"
|
|
255
|
-
}, /*#__PURE__*/_react["default"].createElement(_Layout.
|
|
257
|
+
}, isLoading ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
258
|
+
align: "both",
|
|
259
|
+
className: _MultiSelectModule["default"].loader
|
|
260
|
+
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null)) : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
256
261
|
flexible: true
|
|
257
262
|
}, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
258
263
|
onScroll: _this2.handleScroll
|
|
@@ -309,7 +314,10 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
309
314
|
dataId: dataId,
|
|
310
315
|
i18nKeys: i18nKeys,
|
|
311
316
|
htmlId: ariaErrorId
|
|
312
|
-
})
|
|
317
|
+
}), isFetchingOptions && /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
318
|
+
isCover: false,
|
|
319
|
+
align: "both"
|
|
320
|
+
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null))))));
|
|
313
321
|
}) : null);
|
|
314
322
|
}
|
|
315
323
|
}]);
|
|
@@ -328,5 +336,5 @@ if (false) {
|
|
|
328
336
|
// eslint-disable-next-line react/forbid-foreign-prop-types
|
|
329
337
|
SelectWithAvatar.propTypes = SelectWithAvatarComponent.propTypes;
|
|
330
338
|
}
|
|
331
|
-
var _default =
|
|
339
|
+
var _default = SelectWithAvatar;
|
|
332
340
|
exports["default"] = _default;
|
|
@@ -18,6 +18,7 @@ var _Layout = require("../Layout");
|
|
|
18
18
|
var _IdProvider = require("../Provider/IdProvider");
|
|
19
19
|
var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
|
|
20
20
|
var _CustomResponsive = require("../Responsive/CustomResponsive");
|
|
21
|
+
var _Loader = _interopRequireDefault(require("@zohodesk/svg/lib/Loader/Loader"));
|
|
21
22
|
var _Common = require("../utils/Common.js");
|
|
22
23
|
var _SelectModule = _interopRequireDefault(require("./Select.module.css"));
|
|
23
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -43,8 +44,10 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
43
44
|
_this.state = {
|
|
44
45
|
searchValue: '',
|
|
45
46
|
selectedIndex: 0,
|
|
46
|
-
options: props.options
|
|
47
|
+
options: props.options,
|
|
48
|
+
isFetchingOptions: false
|
|
47
49
|
};
|
|
50
|
+
_this._isMounted = false;
|
|
48
51
|
_this.onSearchClear = _this.onSearchClear.bind(_assertThisInitialized(_this));
|
|
49
52
|
_this.onSearch = _this.onSearch.bind(_assertThisInitialized(_this));
|
|
50
53
|
_this.togglePopup = _this.togglePopup.bind(_assertThisInitialized(_this));
|
|
@@ -57,9 +60,21 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
57
60
|
_this.inputRef = _this.inputRef.bind(_assertThisInitialized(_this));
|
|
58
61
|
_this.handleScroll = _this.handleScroll.bind(_assertThisInitialized(_this));
|
|
59
62
|
_this.getNextAriaId = (0, _IdProvider.getUniqueId)(_assertThisInitialized(_this));
|
|
63
|
+
_this.handleGetNextOptions = _this.handleGetNextOptions.bind(_assertThisInitialized(_this));
|
|
64
|
+
_this.handleFetchOptions = _this.handleFetchOptions.bind(_assertThisInitialized(_this));
|
|
60
65
|
return _this;
|
|
61
66
|
}
|
|
62
67
|
_createClass(SelectWithIcon, [{
|
|
68
|
+
key: "componentDidMount",
|
|
69
|
+
value: function componentDidMount() {
|
|
70
|
+
this._isMounted = true;
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
key: "componentWillUnmount",
|
|
74
|
+
value: function componentWillUnmount() {
|
|
75
|
+
this._isMounted = false;
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
63
78
|
key: "inputRef",
|
|
64
79
|
value: function inputRef(el) {
|
|
65
80
|
this.input = el;
|
|
@@ -98,8 +113,6 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
98
113
|
selectedIndex = _this$state.selectedIndex,
|
|
99
114
|
options = _this$state.options;
|
|
100
115
|
var _this$props = this.props,
|
|
101
|
-
isNextOptions = _this$props.isNextOptions,
|
|
102
|
-
getNextOptions = _this$props.getNextOptions,
|
|
103
116
|
idKey = _this$props.idKey,
|
|
104
117
|
valueKey = _this$props.valueKey,
|
|
105
118
|
isPopupOpen = _this$props.isPopupOpen,
|
|
@@ -126,7 +139,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
126
139
|
});
|
|
127
140
|
} else {
|
|
128
141
|
if (selectedIndex === options.length - 3) {
|
|
129
|
-
|
|
142
|
+
this.handleGetNextOptions();
|
|
130
143
|
}
|
|
131
144
|
this.setState({
|
|
132
145
|
selectedIndex: selectedIndex + 1
|
|
@@ -235,11 +248,55 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
235
248
|
}, {
|
|
236
249
|
key: "handleScroll",
|
|
237
250
|
value: function handleScroll(e) {
|
|
251
|
+
var ele = e.target;
|
|
252
|
+
var isScrollReachedBottom = (0, _Common.findScrollEnd)(ele);
|
|
253
|
+
isScrollReachedBottom && this.handleGetNextOptions();
|
|
254
|
+
}
|
|
255
|
+
}, {
|
|
256
|
+
key: "UNSAFE_componentWillReceiveProps",
|
|
257
|
+
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
258
|
+
if (nextProps.options.length != this.props.options.length) {
|
|
259
|
+
this.setState({
|
|
260
|
+
options: nextProps.options
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}, {
|
|
265
|
+
key: "handleGetNextOptions",
|
|
266
|
+
value: function handleGetNextOptions() {
|
|
238
267
|
var _this$props6 = this.props,
|
|
239
268
|
isNextOptions = _this$props6.isNextOptions,
|
|
240
269
|
getNextOptions = _this$props6.getNextOptions;
|
|
241
|
-
|
|
242
|
-
|
|
270
|
+
var searchValue = this.state.searchValue;
|
|
271
|
+
isNextOptions && getNextOptions && this.handleFetchOptions(getNextOptions, searchValue);
|
|
272
|
+
}
|
|
273
|
+
}, {
|
|
274
|
+
key: "handleFetchOptions",
|
|
275
|
+
value: function handleFetchOptions(APICall) {
|
|
276
|
+
var _this4 = this;
|
|
277
|
+
var searchValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
278
|
+
var _this$state$isFetchin = this.state.isFetchingOptions,
|
|
279
|
+
isFetchingOptions = _this$state$isFetchin === void 0 ? false : _this$state$isFetchin;
|
|
280
|
+
var _isMounted = this._isMounted;
|
|
281
|
+
if (!isFetchingOptions && APICall) {
|
|
282
|
+
this.setState({
|
|
283
|
+
isFetchingOptions: true
|
|
284
|
+
});
|
|
285
|
+
try {
|
|
286
|
+
return APICall(searchValue).then(function () {
|
|
287
|
+
_isMounted && _this4.setState({
|
|
288
|
+
isFetchingOptions: false
|
|
289
|
+
});
|
|
290
|
+
}, function () {
|
|
291
|
+
_isMounted && _this4.setState({
|
|
292
|
+
isFetchingOptions: false
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
} catch (e) {
|
|
296
|
+
_isMounted && this.setState({
|
|
297
|
+
isFetchingOptions: false
|
|
298
|
+
});
|
|
299
|
+
}
|
|
243
300
|
}
|
|
244
301
|
}
|
|
245
302
|
}, {
|
|
@@ -255,7 +312,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
255
312
|
}, {
|
|
256
313
|
key: "render",
|
|
257
314
|
value: function render() {
|
|
258
|
-
var
|
|
315
|
+
var _this5 = this;
|
|
259
316
|
var _this$props7 = this.props,
|
|
260
317
|
animationStyle = _this$props7.animationStyle,
|
|
261
318
|
removeClose = _this$props7.removeClose,
|
|
@@ -290,13 +347,13 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
290
347
|
boxSize = _this$props7.boxSize,
|
|
291
348
|
dropBoxSize = _this$props7.dropBoxSize,
|
|
292
349
|
emptyMessage = _this$props7.emptyMessage,
|
|
293
|
-
isFetchingOptions = _this$props7.isFetchingOptions,
|
|
294
350
|
needIcon = _this$props7.needIcon,
|
|
295
351
|
iconName = _this$props7.iconName,
|
|
296
352
|
iconSize = _this$props7.iconSize,
|
|
297
353
|
iconClass = _this$props7.iconClass,
|
|
298
354
|
i18nKeys = _this$props7.i18nKeys,
|
|
299
|
-
htmlId = _this$props7.htmlId
|
|
355
|
+
htmlId = _this$props7.htmlId,
|
|
356
|
+
isLoading = _this$props7.isLoading;
|
|
300
357
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
301
358
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
302
359
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -304,7 +361,8 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
304
361
|
var _this$state3 = this.state,
|
|
305
362
|
searchValue = _this$state3.searchValue,
|
|
306
363
|
selectedIndex = _this$state3.selectedIndex,
|
|
307
|
-
options = _this$state3.options
|
|
364
|
+
options = _this$state3.options,
|
|
365
|
+
isFetchingOptions = _this$state3.isFetchingOptions;
|
|
308
366
|
var setAriaId = this.getNextAriaId();
|
|
309
367
|
var ariaErrorId = this.getNextAriaId();
|
|
310
368
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -384,10 +442,13 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
384
442
|
isPadding: false,
|
|
385
443
|
isResponsivePadding: true,
|
|
386
444
|
alignBox: "row"
|
|
387
|
-
}, /*#__PURE__*/_react["default"].createElement(_Layout.
|
|
445
|
+
}, isLoading ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
446
|
+
align: "both",
|
|
447
|
+
className: _SelectModule["default"].loader
|
|
448
|
+
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null)) : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
388
449
|
flexible: true
|
|
389
450
|
}, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
390
|
-
onScroll:
|
|
451
|
+
onScroll: _this5.handleScroll,
|
|
391
452
|
htmlId: setAriaId,
|
|
392
453
|
a11y: {
|
|
393
454
|
role: 'listbox'
|
|
@@ -395,13 +456,13 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
395
456
|
}, needSearch ? /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
396
457
|
className: "".concat(_SelectModule["default"].search, " ").concat(_SelectModule["default"][size])
|
|
397
458
|
}, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
|
|
398
|
-
onClear:
|
|
399
|
-
onChange:
|
|
459
|
+
onClear: _this5.onSearchClear,
|
|
460
|
+
onChange: _this5.onSearch,
|
|
400
461
|
placeHolder: searchBoxPlaceHolder,
|
|
401
462
|
value: searchValue,
|
|
402
463
|
maxLength: maxLength,
|
|
403
|
-
onKeyDown:
|
|
404
|
-
inputRef:
|
|
464
|
+
onKeyDown: _this5.handleKeyDown,
|
|
465
|
+
inputRef: _this5.searchInputRef,
|
|
405
466
|
size: searchBoxSize,
|
|
406
467
|
dataId: "".concat(dataId, "_search"),
|
|
407
468
|
a11y: {
|
|
@@ -411,7 +472,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
411
472
|
}))) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
412
473
|
customClass: "".concat(tabletMode ? _SelectModule["default"].responsivedropBoxList : _SelectModule["default"].dropBoxList, " ").concat(!tabletMode && dropBoxSize ? _SelectModule["default"][dropBoxSize] : ''),
|
|
413
474
|
shrink: true,
|
|
414
|
-
eleRef:
|
|
475
|
+
eleRef: _this5.scrollContentRef
|
|
415
476
|
}, options.length ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, options.map(function (options, i) {
|
|
416
477
|
var iconName = options.iconName,
|
|
417
478
|
iconSize = options.iconSize,
|
|
@@ -420,7 +481,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
420
481
|
key: options[idKey],
|
|
421
482
|
value: options[valueKey],
|
|
422
483
|
size: "medium",
|
|
423
|
-
onClick:
|
|
484
|
+
onClick: _this5.handleChange,
|
|
424
485
|
id: options[idKey],
|
|
425
486
|
index: i,
|
|
426
487
|
title: options[valueKey],
|
|
@@ -432,9 +493,9 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
432
493
|
active: selectedId === options[idKey],
|
|
433
494
|
needBorder: needListBorder,
|
|
434
495
|
needTick: needTick,
|
|
435
|
-
onMouseEnter:
|
|
496
|
+
onMouseEnter: _this5.handleMouseEnter,
|
|
436
497
|
highlight: selectedIndex === i,
|
|
437
|
-
getRef:
|
|
498
|
+
getRef: _this5.itemRef,
|
|
438
499
|
a11y: {
|
|
439
500
|
role: 'option',
|
|
440
501
|
ariaSelected: selectedId === options[idKey]
|
|
@@ -448,7 +509,10 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
448
509
|
dataId: dataId,
|
|
449
510
|
i18nKeys: i18nKeys,
|
|
450
511
|
htmlId: ariaErrorId
|
|
451
|
-
})
|
|
512
|
+
}), isFetchingOptions && /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
513
|
+
isCover: false,
|
|
514
|
+
align: "both"
|
|
515
|
+
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null))))));
|
|
452
516
|
}) : null);
|
|
453
517
|
}
|
|
454
518
|
}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -38,7 +38,8 @@ var Select_defaultProps = {
|
|
|
38
38
|
isSearchClearOnClose: true,
|
|
39
39
|
i18nKeys: {},
|
|
40
40
|
iconOnHover: false,
|
|
41
|
-
customProps: {}
|
|
41
|
+
customProps: {},
|
|
42
|
+
isLoading: false
|
|
42
43
|
};
|
|
43
44
|
exports.Select_defaultProps = Select_defaultProps;
|
|
44
45
|
var GroupSelect_defaultProps = {
|
|
@@ -70,7 +71,8 @@ var GroupSelect_defaultProps = {
|
|
|
70
71
|
needLocalSearch: true,
|
|
71
72
|
isSearchClearOnClose: true,
|
|
72
73
|
i18nKeys: {},
|
|
73
|
-
iconOnHover: false
|
|
74
|
+
iconOnHover: false,
|
|
75
|
+
isLoading: false
|
|
74
76
|
};
|
|
75
77
|
exports.GroupSelect_defaultProps = GroupSelect_defaultProps;
|
|
76
78
|
var SelectWithAvatar_defaultProps = {
|
|
@@ -93,7 +95,8 @@ var SelectWithAvatar_defaultProps = {
|
|
|
93
95
|
borderColor: 'default',
|
|
94
96
|
isSearchClearOnClose: true,
|
|
95
97
|
i18nKeys: {},
|
|
96
|
-
needEffect: true
|
|
98
|
+
needEffect: true,
|
|
99
|
+
isLoading: false
|
|
97
100
|
};
|
|
98
101
|
exports.SelectWithAvatar_defaultProps = SelectWithAvatar_defaultProps;
|
|
99
102
|
var SelectWithIcon_defaultProps = (_SelectWithIcon_defau = {
|
|
@@ -105,5 +108,5 @@ var SelectWithIcon_defaultProps = (_SelectWithIcon_defau = {
|
|
|
105
108
|
needListBorder: false,
|
|
106
109
|
needSearch: false,
|
|
107
110
|
boxSize: 'default'
|
|
108
|
-
}, _defineProperty(_SelectWithIcon_defau, "needListBorder", false), _defineProperty(_SelectWithIcon_defau, "needCloseOnSelect", true), _defineProperty(_SelectWithIcon_defau, "borderColor", 'default'), _defineProperty(_SelectWithIcon_defau, "needTick", true), _defineProperty(_SelectWithIcon_defau, "searchBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "size", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxSize", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxVariant", 'default'), _defineProperty(_SelectWithIcon_defau, "dataId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dropBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "needIcon", true), _defineProperty(_SelectWithIcon_defau, "iconSize", '14'), _defineProperty(_SelectWithIcon_defau, "i18nKeys", {}), _SelectWithIcon_defau);
|
|
111
|
+
}, _defineProperty(_SelectWithIcon_defau, "needListBorder", false), _defineProperty(_SelectWithIcon_defau, "needCloseOnSelect", true), _defineProperty(_SelectWithIcon_defau, "borderColor", 'default'), _defineProperty(_SelectWithIcon_defau, "needTick", true), _defineProperty(_SelectWithIcon_defau, "searchBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "size", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxSize", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxVariant", 'default'), _defineProperty(_SelectWithIcon_defau, "dataId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dropBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "needIcon", true), _defineProperty(_SelectWithIcon_defau, "iconSize", '14'), _defineProperty(_SelectWithIcon_defau, "i18nKeys", {}), _defineProperty(_SelectWithIcon_defau, "isLoading", false), _SelectWithIcon_defau);
|
|
109
112
|
exports.SelectWithIcon_defaultProps = SelectWithIcon_defaultProps;
|
|
@@ -90,7 +90,8 @@ var Select_propTypes = {
|
|
|
90
90
|
DropdownSearchTextBoxProps: _propTypes["default"].object,
|
|
91
91
|
listItemProps: _propTypes["default"].object,
|
|
92
92
|
SuggestionsProps: _propTypes["default"].object
|
|
93
|
-
})
|
|
93
|
+
}),
|
|
94
|
+
isLoading: _propTypes["default"].bool
|
|
94
95
|
};
|
|
95
96
|
exports.Select_propTypes = Select_propTypes;
|
|
96
97
|
var GroupSelect_propTypes = {
|
|
@@ -167,7 +168,8 @@ var GroupSelect_propTypes = {
|
|
|
167
168
|
emptyText: _propTypes["default"].string,
|
|
168
169
|
noMoreText: _propTypes["default"].string,
|
|
169
170
|
searchEmptyText: _propTypes["default"].string
|
|
170
|
-
})
|
|
171
|
+
}),
|
|
172
|
+
isLoading: _propTypes["default"].bool
|
|
171
173
|
};
|
|
172
174
|
exports.GroupSelect_propTypes = GroupSelect_propTypes;
|
|
173
175
|
var SelectWithAvatar_propTypes = {
|
|
@@ -225,7 +227,8 @@ var SelectWithAvatar_propTypes = {
|
|
|
225
227
|
togglePopup: _propTypes["default"].func,
|
|
226
228
|
valueField: _propTypes["default"].string,
|
|
227
229
|
htmlId: _propTypes["default"].string,
|
|
228
|
-
needEffect: _propTypes["default"].bool
|
|
230
|
+
needEffect: _propTypes["default"].bool,
|
|
231
|
+
isLoading: _propTypes["default"].bool
|
|
229
232
|
};
|
|
230
233
|
exports.SelectWithAvatar_propTypes = SelectWithAvatar_propTypes;
|
|
231
234
|
var SelectWithIcon_propTypes = {
|
|
@@ -271,6 +274,7 @@ var SelectWithIcon_propTypes = {
|
|
|
271
274
|
textBoxVariant: _propTypes["default"].oneOf(['primary', 'secondary', 'default']),
|
|
272
275
|
togglePopup: _propTypes["default"].func,
|
|
273
276
|
valueKey: _propTypes["default"].string,
|
|
274
|
-
htmlId: _propTypes["default"].string
|
|
277
|
+
htmlId: _propTypes["default"].string,
|
|
278
|
+
isLoading: _propTypes["default"].bool
|
|
275
279
|
};
|
|
276
280
|
exports.SelectWithIcon_propTypes = SelectWithIcon_propTypes;
|
package/lib/Stencils/Stencils.js
CHANGED
|
File without changes
|