@zohodesk/components 1.0.0-temp-236 → 1.0.0-temp-239
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 +13 -3
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +5 -5
- package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/light/mode/Component_LightMode.module.css +5 -5
- package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +5 -5
- package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +1 -1
- package/es/Accordion/Accordion.js +85 -0
- package/es/Accordion/AccordionItem.js +63 -0
- package/es/Accordion/__tests__/Accordion.spec.js +11 -0
- package/es/Accordion/__tests__/AccordionItem.spec.js +16 -0
- package/es/Accordion/__tests__/__snapshots__/Accordion.spec.js.snap +12 -0
- package/es/Accordion/__tests__/__snapshots__/AccordionItem.spec.js.snap +23 -0
- package/es/Accordion/index.js +2 -0
- package/es/Accordion/props/defaultProps.js +12 -0
- package/es/Accordion/props/propTypes.js +33 -0
- package/es/Animation/Animation.js +52 -0
- package/es/Animation/__tests__/Animation.spec.js +14 -0
- package/es/Animation/__tests__/__snapshots__/Animation.spec.js.snap +11 -0
- package/es/Animation/props/defaultProps.js +7 -0
- package/es/Animation/props/propTypes.js +12 -0
- package/es/Animation/utils.js +83 -0
- package/es/AppContainer/AppContainer.js +139 -0
- package/es/AppContainer/AppContainer.module.css +18 -0
- package/es/AppContainer/__tests__/AppContainer.spec.js +82 -0
- package/es/AppContainer/__tests__/__snapshots__/AppContainer.spec.js.snap +201 -0
- package/es/AppContainer/props/defaultProps.js +10 -0
- package/es/AppContainer/props/propTypes.js +17 -0
- package/es/Avatar/Avatar.js +195 -0
- package/es/Avatar/Avatar.module.css +176 -0
- package/es/Avatar/__tests__/Avatar.spec.js +181 -0
- package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +591 -0
- package/es/Avatar/props/defaultProps.js +17 -0
- package/es/Avatar/props/propTypes.js +26 -0
- package/es/AvatarTeam/AvatarTeam.js +84 -0
- package/es/AvatarTeam/AvatarTeam.module.css +189 -0
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +138 -0
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +705 -0
- package/es/AvatarTeam/props/defaultProps.js +17 -0
- package/es/AvatarTeam/props/propTypes.js +28 -0
- package/es/Button/Button.js +76 -0
- package/es/Button/__tests__/Button.spec.js +242 -0
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +412 -0
- package/es/Button/css/Button.module.css +613 -0
- package/es/Button/css/cssJSLogic.js +58 -0
- package/es/Button/index.js +2 -0
- package/es/Button/props/defaultProps.js +18 -0
- package/es/Button/props/propTypes.js +28 -0
- package/es/Buttongroup/Buttongroup.js +50 -0
- package/es/Buttongroup/Buttongroup.module.css +105 -0
- package/es/Buttongroup/__tests__/Buttongroup.spec.js +37 -0
- package/es/Buttongroup/__tests__/__snapshots__/Buttongroup.spec.js.snap +191 -0
- package/es/Buttongroup/props/defaultProps.js +6 -0
- package/es/Buttongroup/props/propTypes.js +9 -0
- package/es/Card/Card.js +305 -0
- package/es/Card/Card.module.css +20 -0
- package/es/Card/__tests__/Card.spec.js +90 -0
- package/es/Card/__tests__/__snapshots__/Card.spec.js.snap +56 -0
- package/es/Card/index.js +4 -0
- package/es/Card/props/defaultProps.js +26 -0
- package/es/Card/props/propTypes.js +49 -0
- package/es/CheckBox/CheckBox.js +172 -0
- package/es/CheckBox/CheckBox.module.css +160 -0
- package/es/CheckBox/__tests__/CheckBox.spec.js +240 -0
- package/es/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +1878 -0
- package/es/CheckBox/props/defaultProps.js +18 -0
- package/es/CheckBox/props/propTypes.js +42 -0
- package/es/DateTime/CalendarView.js +223 -0
- package/es/DateTime/DateTime.js +779 -0
- package/es/DateTime/DateTime.module.css +249 -0
- package/es/DateTime/DateTimePopupFooter.js +47 -0
- package/es/DateTime/DateTimePopupHeader.js +105 -0
- package/es/DateTime/DateWidget.js +1142 -0
- package/es/DateTime/DateWidget.module.css +39 -0
- package/es/DateTime/DaysRow.js +32 -0
- package/es/DateTime/Time.js +181 -0
- package/es/DateTime/YearView.js +264 -0
- package/es/DateTime/YearView.module.css +99 -0
- package/es/DateTime/__tests__/CalendarView.spec.js +13 -0
- package/es/DateTime/__tests__/DateTime.spec.js +21 -0
- package/es/DateTime/__tests__/DateTimePopupFooter.spec.js +11 -0
- package/es/DateTime/__tests__/DateTimePopupHeader.spec.js +11 -0
- package/es/DateTime/__tests__/DateWidget.spec.js +11 -0
- package/es/DateTime/__tests__/DaysRow.spec.js +13 -0
- package/es/DateTime/__tests__/Time.spec.js +11 -0
- package/es/DateTime/__tests__/YearView.spec.js +10 -0
- package/es/DateTime/__tests__/__snapshots__/CalendarView.spec.js.snap +312 -0
- package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +938 -0
- package/es/DateTime/__tests__/__snapshots__/DateTimePopupFooter.spec.js.snap +34 -0
- package/es/DateTime/__tests__/__snapshots__/DateTimePopupHeader.spec.js.snap +72 -0
- package/es/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +79 -0
- package/es/DateTime/__tests__/__snapshots__/DaysRow.spec.js.snap +12 -0
- package/es/DateTime/__tests__/__snapshots__/Time.spec.js.snap +310 -0
- package/es/DateTime/common.js +25 -0
- package/es/DateTime/constants.js +57 -0
- package/es/DateTime/dateFormatUtils/dateFormat.js +616 -0
- package/es/DateTime/dateFormatUtils/dateFormats.js +42 -0
- package/es/DateTime/dateFormatUtils/dayChange.js +83 -0
- package/es/DateTime/dateFormatUtils/index.js +267 -0
- package/es/DateTime/dateFormatUtils/monthChange.js +90 -0
- package/es/DateTime/dateFormatUtils/timeChange.js +228 -0
- package/es/DateTime/dateFormatUtils/yearChange.js +121 -0
- package/es/DateTime/index.js +1 -0
- package/es/DateTime/objectUtils.js +55 -0
- package/es/DateTime/props/defaultProps.js +65 -0
- package/es/DateTime/props/propTypes.js +203 -0
- package/es/DateTime/typeChecker.js +19 -0
- package/es/DateTime/validator.js +327 -0
- package/es/DropBox/DropBox.js +80 -0
- package/es/DropBox/DropBoxElement/DropBoxElement.js +137 -0
- package/es/DropBox/DropBoxElement/__tests__/DropBoxElement.spec.js +28 -0
- package/es/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +95 -0
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +442 -0
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +91 -0
- package/es/DropBox/DropBoxElement/props/defaultProps.js +18 -0
- package/es/DropBox/DropBoxElement/props/propTypes.js +51 -0
- package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +54 -0
- package/es/DropBox/DropBoxPositionMapping.js +142 -0
- package/es/DropBox/__tests__/DropBox.spec.js +11 -0
- package/es/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +36 -0
- package/es/DropBox/css/DropBox.module.css +59 -0
- package/es/DropBox/css/cssJSLogic.js +14 -0
- package/es/DropBox/props/defaultProps.js +14 -0
- package/es/DropBox/props/propTypes.js +16 -0
- package/es/DropBox/utils/isMobilePopover.js +17 -0
- package/es/DropDown/DropDown.js +76 -0
- package/es/DropDown/DropDown.module.css +5 -0
- package/es/DropDown/DropDownHeading.js +44 -0
- package/es/DropDown/DropDownHeading.module.css +53 -0
- package/es/DropDown/DropDownItem.js +76 -0
- package/es/DropDown/DropDownItem.module.css +94 -0
- package/es/DropDown/DropDownSearch.js +68 -0
- package/es/DropDown/DropDownSearch.module.css +14 -0
- package/es/DropDown/DropDownSeparator.js +15 -0
- package/es/DropDown/DropDownSeparator.module.css +7 -0
- package/es/DropDown/__tests__/DropDown.spec.js +11 -0
- package/es/DropDown/__tests__/DropDownHeading.spec.js +11 -0
- package/es/DropDown/__tests__/DropDownItem.spec.js +11 -0
- package/es/DropDown/__tests__/DropDownSearch.spec.js +11 -0
- package/es/DropDown/__tests__/DropDownSeparator.spec.js +11 -0
- package/es/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +54 -0
- package/es/DropDown/__tests__/__snapshots__/DropDownHeading.spec.js.snap +12 -0
- package/es/DropDown/__tests__/__snapshots__/DropDownItem.spec.js.snap +11 -0
- package/es/DropDown/__tests__/__snapshots__/DropDownSearch.spec.js.snap +20 -0
- package/es/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +9 -0
- package/es/DropDown/index.js +7 -0
- package/es/DropDown/props/defaultProps.js +21 -0
- package/es/DropDown/props/propTypes.js +66 -0
- package/es/Heading/Heading.js +38 -0
- package/es/Heading/Heading.module.css +5 -0
- package/es/Heading/__tests__/Heading.spec.js +20 -0
- package/es/Heading/__tests__/__snapshots__/Heading.spec.js.snap +63 -0
- package/es/Heading/props/defaultProps.js +5 -0
- package/es/Heading/props/propTypes.js +12 -0
- package/es/Label/Label.js +51 -0
- package/es/Label/Label.module.css +57 -0
- package/es/Label/LabelColors.module.css +21 -0
- package/es/Label/__tests__/Label.spec.js +99 -0
- package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +312 -0
- package/es/Label/props/defaultProps.js +11 -0
- package/es/Label/props/propTypes.js +19 -0
- package/es/Layout/Box.js +115 -0
- package/es/Layout/Container.js +132 -0
- package/es/Layout/Layout.module.css +336 -0
- package/es/Layout/__tests__/Box.spec.js +11 -0
- package/es/Layout/__tests__/Container.spec.js +11 -0
- package/es/Layout/__tests__/__snapshots__/Box.spec.js.snap +16 -0
- package/es/Layout/__tests__/__snapshots__/Container.spec.js.snap +16 -0
- package/es/Layout/index.js +10 -0
- package/es/Layout/props/defaultProps.js +16 -0
- package/es/Layout/props/propTypes.js +46 -0
- package/es/Layout/utils.js +30 -0
- package/es/ListItem/ListContainer.js +105 -0
- package/es/ListItem/ListItem.js +151 -0
- package/es/ListItem/ListItem.module.css +261 -0
- package/es/ListItem/ListItemWithAvatar.js +178 -0
- package/es/ListItem/ListItemWithCheckBox.js +134 -0
- package/es/ListItem/ListItemWithIcon.js +158 -0
- package/es/ListItem/ListItemWithRadio.js +137 -0
- package/es/ListItem/__tests__/ListContainer.spec.js +19 -0
- package/es/ListItem/__tests__/ListItem.spec.js +11 -0
- package/es/ListItem/__tests__/ListItemWithAvatar.spec.js +46 -0
- package/es/ListItem/__tests__/ListItemWithCheckBox.spec.js +46 -0
- package/es/ListItem/__tests__/ListItemWithIcon.spec.js +46 -0
- package/es/ListItem/__tests__/ListItemWithRadio.spec.js +46 -0
- package/es/ListItem/__tests__/__snapshots__/ListContainer.spec.js.snap +27 -0
- package/es/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +29 -0
- package/es/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +222 -0
- package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +492 -0
- package/es/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +222 -0
- package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +487 -0
- package/es/ListItem/index.js +6 -0
- package/es/ListItem/props/defaultProps.js +105 -0
- package/es/ListItem/props/propTypes.js +220 -0
- package/es/Modal/Modal.js +174 -0
- package/es/Modal/Portal/Portal.js +33 -0
- package/es/Modal/Portal/__tests__/Portal.spec.js +28 -0
- package/es/Modal/Portal/__tests__/__snapshots__/Portal.spec.js.snap +30 -0
- package/es/Modal/Portal/props/defaultProps.js +3 -0
- package/es/Modal/Portal/props/propTypes.js +5 -0
- package/es/Modal/__tests__/Modal.spec.js +15 -0
- package/es/Modal/__tests__/__snapshots__/Modal.spec.js.snap +26 -0
- package/es/Modal/props/defaultProps.js +3 -0
- package/es/Modal/props/propTypes.js +7 -0
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +1109 -0
- package/es/MultiSelect/AdvancedMultiSelect.js +604 -0
- package/es/MultiSelect/EmptyState.js +65 -0
- package/es/MultiSelect/MobileHeader/MobileHeader.js +50 -0
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
- package/es/MultiSelect/MobileHeader/__tests__/MobileHeader.spec.js +11 -0
- package/es/MultiSelect/MobileHeader/__tests__/__snapshots__/MobileHeader.spec.js.snap +39 -0
- package/es/MultiSelect/MobileHeader/props/defaultProps.js +7 -0
- package/es/MultiSelect/MobileHeader/props/propTypes.js +7 -0
- package/es/MultiSelect/MultiSelect.js +1186 -0
- package/es/MultiSelect/MultiSelect.module.css +216 -0
- package/es/MultiSelect/MultiSelectHeader.js +32 -0
- package/es/MultiSelect/MultiSelectWithAvatar.js +218 -0
- package/es/MultiSelect/SelectedOptions.js +86 -0
- package/es/MultiSelect/SelectedOptions.module.css +15 -0
- package/es/MultiSelect/Suggestions.js +225 -0
- package/es/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +12 -0
- package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +47 -0
- package/es/MultiSelect/__tests__/EmptyState.spec.js +15 -0
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +36 -0
- package/es/MultiSelect/__tests__/MultiSelectHeader.spec.js +21 -0
- package/es/MultiSelect/__tests__/MultiSelectWithAvatar.spec.js +11 -0
- package/es/MultiSelect/__tests__/SelectedOptions.spec.js +28 -0
- package/es/MultiSelect/__tests__/Suggestions.spec.js +71 -0
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +74 -0
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +534 -0
- package/es/MultiSelect/__tests__/__snapshots__/EmptyState.spec.js.snap +12 -0
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +339 -0
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelectHeader.spec.js.snap +63 -0
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelectWithAvatar.spec.js.snap +85 -0
- package/es/MultiSelect/__tests__/__snapshots__/SelectedOptions.spec.js.snap +80 -0
- package/es/MultiSelect/__tests__/__snapshots__/Suggestions.spec.js.snap +363 -0
- package/es/MultiSelect/constants.js +6 -0
- package/es/MultiSelect/index.js +4 -0
- package/es/MultiSelect/props/defaultProps.js +173 -0
- package/es/MultiSelect/props/propTypes.js +300 -0
- package/es/PopOver/PopOver.js +211 -0
- package/es/PopOver/PopOver.module.css +9 -0
- package/es/PopOver/__tests__/PopOver.spec.js +11 -0
- package/es/PopOver/__tests__/__snapshots__/PopOver.spec.js.snap +13 -0
- package/es/PopOver/index.js +3 -0
- package/es/PopOver/props/defaultProps.js +7 -0
- package/es/PopOver/props/propTypes.js +53 -0
- package/es/Popup/Popup.js +1072 -0
- package/es/Popup/PositionMapping.js +72 -0
- package/es/Popup/Registry.js +36 -0
- package/es/Popup/intersectionObserver.js +49 -0
- package/es/Popup/props/propTypes.js +30 -0
- package/es/Popup/viewPort.js +373 -0
- package/es/Provider/AvatarSize.js +13 -0
- package/es/Provider/Config.js +21 -0
- package/es/Provider/CssProvider.js +16 -0
- package/es/Provider/IdProvider.js +66 -0
- package/es/Provider/LibraryContext.js +57 -0
- package/es/Provider/LibraryContextInit.js +3 -0
- package/es/Provider/NumberGenerator/NumberGenerator.js +136 -0
- package/es/Provider/ZindexProvider.js +57 -0
- package/es/Provider/index.js +4 -0
- package/es/Radio/Radio.js +138 -0
- package/es/Radio/Radio.module.css +115 -0
- package/es/Radio/__tests__/Radio.spec.js +238 -0
- package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +1916 -0
- package/es/Radio/props/defaultProps.js +15 -0
- package/es/Radio/props/propTypes.js +41 -0
- package/es/Responsive/CustomResponsive.js +195 -0
- package/es/Responsive/RefWrapper.js +38 -0
- package/es/Responsive/ResizeComponent.js +197 -0
- package/es/Responsive/ResizeObserver.js +76 -0
- package/es/Responsive/ResizeObserverWithPolyfill.js +140 -0
- package/es/Responsive/Responsive.js +194 -0
- package/es/Responsive/index.js +9 -0
- package/es/Responsive/props/defaultProps.js +13 -0
- package/es/Responsive/props/propTypes.js +25 -0
- package/es/Responsive/sizeObservers.js +141 -0
- package/es/Responsive/utils/index.js +52 -0
- package/es/Responsive/utils/shallowCompare.js +28 -0
- package/es/Responsive/windowResizeObserver.js +51 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +65 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
- package/es/ResponsiveDropBox/__tests__/ResponsiveDropBox.spec.js +11 -0
- package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +42 -0
- package/es/ResponsiveDropBox/props/defaultProps.js +4 -0
- package/es/ResponsiveDropBox/props/propTypes.js +8 -0
- package/es/Ribbon/Ribbon.js +51 -0
- package/es/Ribbon/Ribbon.module.css +500 -0
- package/es/Ribbon/__tests__/Ribbon.spec.js +52 -0
- package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +374 -0
- package/es/Ribbon/props/defaultProps.js +9 -0
- package/es/Ribbon/props/propTypes.js +11 -0
- package/es/RippleEffect/RippleEffect.js +30 -0
- package/es/RippleEffect/RippleEffect.module.css +109 -0
- package/es/RippleEffect/__tests__/RippleEffect.spec.js +69 -0
- package/es/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +161 -0
- package/es/RippleEffect/props/defaultProps.js +10 -0
- package/es/RippleEffect/props/propTypes.js +12 -0
- package/es/Select/GroupSelect.js +825 -0
- package/es/Select/Select.js +1016 -0
- package/es/Select/Select.module.css +138 -0
- package/es/Select/SelectWithAvatar.js +358 -0
- package/es/Select/SelectWithIcon.js +563 -0
- package/es/Select/__tests__/GroupSelect.spec.js +19 -0
- package/es/Select/__tests__/Select.spec.js +1153 -0
- package/es/Select/__tests__/SelectWithAvatar.spec.js +12 -0
- package/es/Select/__tests__/SelectWithIcon.spec.js +12 -0
- package/es/Select/__tests__/__snapshots__/GroupSelect.spec.js.snap +90 -0
- package/es/Select/__tests__/__snapshots__/Select.spec.js.snap +10446 -0
- package/es/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +45 -0
- package/es/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +108 -0
- package/es/Select/index.js +4 -0
- package/es/Select/props/defaultProps.js +131 -0
- package/es/Select/props/propTypes.js +311 -0
- package/es/Stencils/Stencils.js +24 -0
- package/es/Stencils/Stencils.module.css +100 -0
- package/es/Stencils/__tests__/Stencils.spec.js +54 -0
- package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +105 -0
- package/es/Stencils/props/defaultProps.js +7 -0
- package/es/Stencils/props/propTypes.js +8 -0
- package/es/Switch/Switch.js +99 -0
- package/es/Switch/Switch.module.css +128 -0
- package/es/Switch/__tests__/Switch.spec.js +156 -0
- package/es/Switch/__tests__/__snapshots__/Switch.spec.js.snap +831 -0
- package/es/Switch/props/defaultProps.js +11 -0
- package/es/Switch/props/propTypes.js +28 -0
- package/es/Tab/Tab.js +110 -0
- package/es/Tab/Tab.module.css +100 -0
- package/es/Tab/TabContent.js +30 -0
- package/es/Tab/TabContent.module.css +4 -0
- package/es/Tab/TabContentWrapper.js +33 -0
- package/es/Tab/TabWrapper.js +56 -0
- package/es/Tab/Tabs.js +723 -0
- package/es/Tab/Tabs.module.css +167 -0
- package/es/Tab/__tests__/Tab.spec.js +11 -0
- package/es/Tab/__tests__/TabContent.spec.js +11 -0
- package/es/Tab/__tests__/TabContentWrapper.spec.js +11 -0
- package/es/Tab/__tests__/TabLayout.spec.js +34 -0
- package/es/Tab/__tests__/TabWrapper.spec.js +11 -0
- package/es/Tab/__tests__/Tabs.spec.js +11 -0
- package/es/Tab/__tests__/__snapshots__/Tab.spec.js.snap +22 -0
- package/es/Tab/__tests__/__snapshots__/TabContent.spec.js.snap +19 -0
- package/es/Tab/__tests__/__snapshots__/TabContentWrapper.spec.js.snap +12 -0
- package/es/Tab/__tests__/__snapshots__/TabLayout.spec.js.snap +341 -0
- package/es/Tab/__tests__/__snapshots__/TabWrapper.spec.js.snap +20 -0
- package/es/Tab/__tests__/__snapshots__/Tabs.spec.js.snap +33 -0
- package/es/Tab/index.js +5 -0
- package/es/Tab/props/defaultProps.js +51 -0
- package/es/Tab/props/propTypes.js +117 -0
- package/es/Tab/utils/tabConfigs.js +18 -0
- package/es/Tag/Tag.js +163 -0
- package/es/Tag/Tag.module.css +254 -0
- package/es/Tag/__tests__/Tag.spec.js +252 -0
- package/es/Tag/__tests__/__snapshots__/Tag.spec.js.snap +3074 -0
- package/es/Tag/props/defaultProps.js +16 -0
- package/es/Tag/props/propTypes.js +42 -0
- package/es/TextBox/TextBox.js +189 -0
- package/es/TextBox/TextBox.module.css +197 -0
- package/es/TextBox/__tests__/TextBox.spec.js +327 -0
- package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +615 -0
- package/es/TextBox/props/defaultProps.js +20 -0
- package/es/TextBox/props/propTypes.js +53 -0
- package/es/TextBoxIcon/TextBoxIcon.js +203 -0
- package/es/TextBoxIcon/TextBoxIcon.module.css +79 -0
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +268 -0
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +1784 -0
- package/es/TextBoxIcon/props/defaultProps.js +24 -0
- package/es/TextBoxIcon/props/propTypes.js +55 -0
- package/es/Textarea/Textarea.js +125 -0
- package/es/Textarea/Textarea.module.css +148 -0
- package/es/Textarea/__tests__/Textarea.spec.js +266 -0
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +525 -0
- package/es/Textarea/props/defaultProps.js +18 -0
- package/es/Textarea/props/propTypes.js +35 -0
- package/es/Tooltip/Tooltip.js +530 -0
- package/es/Tooltip/Tooltip.module.css +133 -0
- package/es/Tooltip/props/defaultProps.js +4 -0
- package/es/Tooltip/props/propTypes.js +5 -0
- package/es/Typography/Typography.js +38 -0
- package/es/Typography/css/Typography.module.css +489 -0
- package/es/Typography/css/cssJSLogic.js +56 -0
- package/es/Typography/props/defaultProps.js +8 -0
- package/es/Typography/props/propTypes.js +27 -0
- package/es/Typography/utils/index.js +50 -0
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +77 -0
- package/es/VelocityAnimation/VelocityAnimation/__tests__/VelocityAnimation.spec.js +11 -0
- package/es/VelocityAnimation/VelocityAnimation/__tests__/__snapshots__/VelocityAnimation.spec.js.snap +9 -0
- package/es/VelocityAnimation/VelocityAnimation/props/defaultProps.js +7 -0
- package/es/VelocityAnimation/VelocityAnimation/props/propTypes.js +12 -0
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +144 -0
- package/es/VelocityAnimation/VelocityAnimationGroup/__tests__/VelocityAnimationGroup.spec.js +19 -0
- package/es/VelocityAnimation/VelocityAnimationGroup/__tests__/__snapshots__/VelocityAnimationGroup.spec.js.snap +11 -0
- package/es/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +15 -0
- package/es/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +22 -0
- package/es/VelocityAnimation/index.js +2 -0
- package/es/common/a11y.module.css +4 -0
- package/es/common/animation.module.css +624 -0
- package/es/common/avatarsizes.module.css +49 -0
- package/es/common/basic.module.css +31 -0
- package/es/common/basicReset.module.css +40 -0
- package/es/common/boxShadow.module.css +34 -0
- package/es/common/common.module.css +566 -0
- package/es/common/customscroll.module.css +142 -0
- package/es/common/reset.module.css +13 -0
- package/es/common/transition.module.css +146 -0
- package/es/components_layer.module.css +1 -0
- package/es/css.js +41 -0
- package/es/deprecated/PortalLayer/PortalLayer.js +108 -0
- package/es/deprecated/PortalLayer/props/defaultProps.js +5 -0
- package/es/deprecated/PortalLayer/props/propTypes.js +20 -0
- package/es/deprecated/Switch/Switch.js +94 -0
- package/es/deprecated/Switch/props/defaultProps.js +11 -0
- package/es/deprecated/Switch/props/propTypes.js +28 -0
- package/es/index.js +42 -0
- package/es/semantic/Button/Button.js +60 -0
- package/es/semantic/Button/__tests__/Button.spec.js +11 -0
- package/es/semantic/Button/__tests__/__snapshots__/Button.spec.js.snap +15 -0
- package/es/semantic/Button/props/defaultProps.js +12 -0
- package/es/semantic/Button/props/propTypes.js +22 -0
- package/es/semantic/Button/semanticButton.module.css +9 -0
- package/es/semantic/index.js +1 -0
- package/es/utils/Common.js +417 -0
- package/es/utils/ContextOptimizer.js +38 -0
- package/es/utils/constant.js +2 -0
- package/es/utils/constructFullName.js +13 -0
- package/es/utils/cssUtils.js +11 -0
- package/es/utils/datetime/GMTZones.js +48 -0
- package/es/utils/datetime/common.js +204 -0
- package/es/utils/debounce.js +23 -0
- package/es/utils/dropDownUtils.js +510 -0
- package/es/utils/dummyFunction.js +1 -0
- package/es/utils/getHTMLFontSize.js +4 -0
- package/es/utils/getInitial.js +24 -0
- package/es/utils/index.js +1 -0
- package/es/utils/scrollTo.js +13 -0
- package/es/utils/shallowEqual.js +32 -0
- package/es/v1/Accordion/Accordion.js +66 -0
- package/es/v1/Accordion/AccordionItem.js +57 -0
- package/es/v1/Accordion/index.js +2 -0
- package/es/v1/Accordion/props/defaultProps.js +12 -0
- package/es/v1/Accordion/props/propTypes.js +33 -0
- package/es/v1/Animation/Animation.js +45 -0
- package/es/v1/Animation/props/defaultProps.js +7 -0
- package/es/v1/Animation/props/propTypes.js +12 -0
- package/es/v1/Animation/utils.js +83 -0
- package/es/v1/AppContainer/AppContainer.js +115 -0
- package/es/v1/AppContainer/props/defaultProps.js +10 -0
- package/es/v1/AppContainer/props/propTypes.js +17 -0
- package/es/v1/Avatar/Avatar.js +139 -0
- package/es/v1/Avatar/props/defaultProps.js +17 -0
- package/es/v1/Avatar/props/propTypes.js +26 -0
- package/es/v1/AvatarTeam/AvatarTeam.js +70 -0
- package/es/v1/AvatarTeam/props/defaultProps.js +17 -0
- package/es/v1/AvatarTeam/props/propTypes.js +27 -0
- package/es/v1/Button/Button.js +67 -0
- package/es/v1/Button/props/defaultProps.js +18 -0
- package/es/v1/Button/props/propTypes.js +28 -0
- package/es/v1/Buttongroup/Buttongroup.js +31 -0
- package/es/v1/Buttongroup/props/defaultProps.js +6 -0
- package/es/v1/Buttongroup/props/propTypes.js +9 -0
- package/es/v1/Card/Card.js +237 -0
- package/es/v1/Card/index.js +4 -0
- package/es/v1/Card/props/defaultProps.js +25 -0
- package/es/v1/Card/props/propTypes.js +48 -0
- package/es/v1/CheckBox/CheckBox.js +161 -0
- package/es/v1/CheckBox/props/defaultProps.js +18 -0
- package/es/v1/CheckBox/props/propTypes.js +41 -0
- package/es/v1/DateTime/CalendarView.js +254 -0
- package/es/v1/DateTime/DateTime.js +779 -0
- package/es/v1/DateTime/DateTimePopupFooter.js +47 -0
- package/es/v1/DateTime/DateTimePopupHeader.js +105 -0
- package/es/v1/DateTime/DateWidget.js +1134 -0
- package/es/v1/DateTime/DaysRow.js +32 -0
- package/es/v1/DateTime/Time.js +181 -0
- package/es/v1/DateTime/YearView.js +264 -0
- package/es/v1/DateTime/index.js +1 -0
- package/es/v1/DateTime/props/defaultProps.js +63 -0
- package/es/v1/DateTime/props/propTypes.js +206 -0
- package/es/v1/DropBox/DropBox.js +79 -0
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +133 -0
- package/es/v1/DropBox/DropBoxElement/props/defaultProps.js +18 -0
- package/es/v1/DropBox/DropBoxElement/props/propTypes.js +51 -0
- package/es/v1/DropBox/props/defaultProps.js +14 -0
- package/es/v1/DropBox/props/propTypes.js +16 -0
- package/es/v1/DropBox/utils/isMobilePopover.js +17 -0
- package/es/v1/DropDown/DropDown.js +53 -0
- package/es/v1/DropDown/DropDownHeading.js +36 -0
- package/es/v1/DropDown/DropDownItem.js +56 -0
- package/es/v1/DropDown/DropDownSearch.js +58 -0
- package/es/v1/DropDown/DropDownSeparator.js +12 -0
- package/es/v1/DropDown/props/defaultProps.js +21 -0
- package/es/v1/DropDown/props/propTypes.js +66 -0
- package/es/v1/Heading/Heading.js +35 -0
- package/es/v1/Heading/props/defaultProps.js +5 -0
- package/es/v1/Heading/props/propTypes.js +12 -0
- package/es/v1/Label/Label.js +40 -0
- package/es/v1/Label/props/defaultProps.js +11 -0
- package/es/v1/Label/props/propTypes.js +19 -0
- package/es/v1/Layout/Box.js +115 -0
- package/es/v1/Layout/Container.js +132 -0
- package/es/v1/Layout/index.js +2 -0
- package/es/v1/Layout/props/defaultProps.js +16 -0
- package/es/v1/Layout/props/propTypes.js +46 -0
- package/es/v1/ListItem/ListContainer.js +104 -0
- package/es/v1/ListItem/ListItem.js +123 -0
- package/es/v1/ListItem/ListItemWithAvatar.js +143 -0
- package/es/v1/ListItem/ListItemWithCheckBox.js +104 -0
- package/es/v1/ListItem/ListItemWithIcon.js +126 -0
- package/es/v1/ListItem/ListItemWithRadio.js +105 -0
- package/es/v1/ListItem/index.js +6 -0
- package/es/v1/ListItem/props/defaultProps.js +97 -0
- package/es/v1/ListItem/props/propTypes.js +202 -0
- package/es/v1/Modal/Modal.js +125 -0
- package/es/v1/Modal/props/defaultProps.js +3 -0
- package/es/v1/Modal/props/propTypes.js +7 -0
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +1092 -0
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +583 -0
- package/es/v1/MultiSelect/EmptyState.js +64 -0
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +50 -0
- package/es/v1/MultiSelect/MobileHeader/props/defaultProps.js +7 -0
- package/es/v1/MultiSelect/MobileHeader/props/propTypes.js +7 -0
- package/es/v1/MultiSelect/MultiSelect.js +1119 -0
- package/es/v1/MultiSelect/MultiSelectHeader.js +32 -0
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +208 -0
- package/es/v1/MultiSelect/SelectedOptions.js +84 -0
- package/es/v1/MultiSelect/Suggestions.js +141 -0
- package/es/v1/MultiSelect/index.js +4 -0
- package/es/v1/MultiSelect/props/defaultProps.js +165 -0
- package/es/v1/MultiSelect/props/propTypes.js +322 -0
- package/es/v1/PopOver/PopOver.js +176 -0
- package/es/v1/PopOver/props/defaultProps.js +7 -0
- package/es/v1/PopOver/props/propTypes.js +53 -0
- package/es/v1/Popup/Popup.js +644 -0
- package/es/v1/Radio/Radio.js +130 -0
- package/es/v1/Radio/props/defaultProps.js +15 -0
- package/es/v1/Radio/props/propTypes.js +40 -0
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +56 -0
- package/es/v1/ResponsiveDropBox/props/defaultProps.js +4 -0
- package/es/v1/ResponsiveDropBox/props/propTypes.js +8 -0
- package/es/v1/Ribbon/Ribbon.js +33 -0
- package/es/v1/Ribbon/props/defaultProps.js +9 -0
- package/es/v1/Ribbon/props/propTypes.js +11 -0
- package/es/v1/RippleEffect/RippleEffect.js +25 -0
- package/es/v1/RippleEffect/props/defaultProps.js +10 -0
- package/es/v1/RippleEffect/props/propTypes.js +12 -0
- package/es/v1/Select/GroupSelect.js +818 -0
- package/es/v1/Select/Select.js +975 -0
- package/es/v1/Select/SelectWithAvatar.js +356 -0
- package/es/v1/Select/SelectWithIcon.js +545 -0
- package/es/v1/Select/index.js +4 -0
- package/es/v1/Select/props/defaultProps.js +126 -0
- package/es/v1/Select/props/propTypes.js +297 -0
- package/es/v1/Stencils/Stencils.js +26 -0
- package/es/v1/Stencils/props/defaultProps.js +6 -0
- package/es/v1/Stencils/props/propTypes.js +7 -0
- package/es/v1/Switch/Switch.js +138 -0
- package/es/v1/Switch/__tests__/Switch.spec.js +30 -0
- package/es/v1/Switch/__tests__/__snapshots__/Switch.spec.js.snap +135 -0
- package/es/v1/Switch/contants/index.js +24 -0
- package/es/v1/Switch/css/Switch_v1.module.css +140 -0
- package/es/v1/Switch/css/cssJSLogic.js +48 -0
- package/es/v1/Switch/props/defaultProps.js +11 -0
- package/es/v1/Switch/props/propTypes.js +36 -0
- package/es/v1/Switch/useSwitch.js +33 -0
- package/es/v1/Tab/Tab.js +106 -0
- package/es/v1/Tab/TabContent.js +30 -0
- package/es/v1/Tab/TabContentWrapper.js +33 -0
- package/es/v1/Tab/TabWrapper.js +55 -0
- package/es/v1/Tab/Tabs.js +619 -0
- package/es/v1/Tab/index.js +5 -0
- package/es/v1/Tab/props/defaultProps.js +51 -0
- package/es/v1/Tab/props/propTypes.js +117 -0
- package/es/v1/Tab/v1Tab.module.css +100 -0
- package/es/v1/Tab/v1TabContent.module.css +4 -0
- package/es/v1/Tab/v1Tabs.module.css +167 -0
- package/es/v1/Tag/Tag.js +140 -0
- package/es/v1/Tag/props/defaultProps.js +15 -0
- package/es/v1/Tag/props/propTypes.js +36 -0
- package/es/v1/TextBox/TextBox.js +160 -0
- package/es/v1/TextBox/props/defaultProps.js +20 -0
- package/es/v1/TextBox/props/propTypes.js +56 -0
- package/es/v1/TextBoxIcon/TextBoxIcon.js +166 -0
- package/es/v1/TextBoxIcon/props/defaultProps.js +24 -0
- package/es/v1/TextBoxIcon/props/propTypes.js +53 -0
- package/es/v1/Textarea/Textarea.js +100 -0
- package/es/v1/Textarea/props/defaultProps.js +17 -0
- package/es/v1/Textarea/props/propTypes.js +31 -0
- package/es/v1/Tooltip/Tooltip.js +530 -0
- package/es/v1/Tooltip/props/defaultProps.js +4 -0
- package/es/v1/Tooltip/props/propTypes.js +5 -0
- package/es/v1/Typography/Typography.js +38 -0
- package/es/v1/Typography/css/cssJSLogic.js +56 -0
- package/es/v1/Typography/css/v1_Typography.module.css +380 -0
- package/es/v1/Typography/props/defaultProps.js +8 -0
- package/es/v1/Typography/props/propTypes.js +27 -0
- package/es/v1/Typography/utils/index.js +50 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +69 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +7 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +12 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +99 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +15 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +19 -0
- package/es/v1/semantic/Button/Button.js +53 -0
- package/es/v1/semantic/Button/props/defaultProps.js +12 -0
- package/es/v1/semantic/Button/props/propTypes.js +22 -0
- package/es/v1/semantic/index.js +1 -0
- package/lib/Accordion/Accordion.js +134 -0
- package/lib/Accordion/AccordionItem.js +111 -0
- package/lib/Accordion/__tests__/Accordion.spec.js +18 -0
- package/lib/Accordion/__tests__/AccordionItem.spec.js +24 -0
- package/lib/Accordion/__tests__/__snapshots__/Accordion.spec.js.snap +12 -0
- package/lib/Accordion/__tests__/__snapshots__/AccordionItem.spec.js.snap +23 -0
- package/lib/Accordion/index.js +23 -0
- package/lib/Accordion/props/defaultProps.js +20 -0
- package/lib/Accordion/props/propTypes.js +45 -0
- package/lib/Animation/Animation.js +102 -0
- package/lib/Animation/__tests__/Animation.spec.js +21 -0
- package/lib/Animation/__tests__/__snapshots__/Animation.spec.js.snap +11 -0
- package/lib/Animation/props/defaultProps.js +14 -0
- package/lib/Animation/props/propTypes.js +23 -0
- package/lib/Animation/utils.js +94 -0
- package/lib/AppContainer/AppContainer.js +210 -0
- package/lib/AppContainer/AppContainer.module.css +18 -0
- package/lib/AppContainer/__tests__/AppContainer.spec.js +90 -0
- package/lib/AppContainer/__tests__/__snapshots__/AppContainer.spec.js.snap +201 -0
- package/lib/AppContainer/props/defaultProps.js +17 -0
- package/lib/AppContainer/props/propTypes.js +28 -0
- package/lib/Avatar/Avatar.js +253 -0
- package/lib/Avatar/Avatar.module.css +176 -0
- package/lib/Avatar/__tests__/Avatar.spec.js +188 -0
- package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +591 -0
- package/lib/Avatar/props/defaultProps.js +24 -0
- package/lib/Avatar/props/propTypes.js +37 -0
- package/lib/AvatarTeam/AvatarTeam.js +133 -0
- package/lib/AvatarTeam/AvatarTeam.module.css +189 -0
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +145 -0
- package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +705 -0
- package/lib/AvatarTeam/props/defaultProps.js +24 -0
- package/lib/AvatarTeam/props/propTypes.js +40 -0
- package/lib/Button/Button.js +91 -0
- package/lib/Button/__tests__/Button.spec.js +256 -0
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +412 -0
- package/lib/Button/css/Button.module.css +613 -0
- package/lib/Button/css/cssJSLogic.js +45 -0
- package/lib/Button/index.js +23 -0
- package/lib/Button/props/defaultProps.js +27 -0
- package/lib/Button/props/propTypes.js +40 -0
- package/lib/Buttongroup/Buttongroup.js +100 -0
- package/lib/Buttongroup/Buttongroup.module.css +105 -0
- package/lib/Buttongroup/__tests__/Buttongroup.spec.js +44 -0
- package/lib/Buttongroup/__tests__/__snapshots__/Buttongroup.spec.js.snap +191 -0
- package/lib/Buttongroup/props/defaultProps.js +13 -0
- package/lib/Buttongroup/props/propTypes.js +20 -0
- package/lib/Card/Card.js +399 -0
- package/lib/Card/Card.module.css +20 -0
- package/lib/Card/__tests__/Card.spec.js +135 -0
- package/lib/Card/__tests__/__snapshots__/Card.spec.js.snap +56 -0
- package/lib/Card/index.js +37 -0
- package/lib/Card/props/defaultProps.js +36 -0
- package/lib/Card/props/propTypes.js +63 -0
- package/lib/CheckBox/CheckBox.js +223 -0
- package/lib/CheckBox/CheckBox.module.css +160 -0
- package/lib/CheckBox/__tests__/CheckBox.spec.js +248 -0
- package/lib/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +1878 -0
- package/lib/CheckBox/props/defaultProps.js +25 -0
- package/lib/CheckBox/props/propTypes.js +53 -0
- package/lib/DateTime/CalendarView.js +290 -0
- package/lib/DateTime/DateTime.js +879 -0
- package/lib/DateTime/DateTime.module.css +249 -0
- package/lib/DateTime/DateTimePopupFooter.js +96 -0
- package/lib/DateTime/DateTimePopupHeader.js +166 -0
- package/lib/DateTime/DateWidget.js +1173 -0
- package/lib/DateTime/DateWidget.module.css +39 -0
- package/lib/DateTime/DaysRow.js +81 -0
- package/lib/DateTime/Time.js +270 -0
- package/lib/DateTime/YearView.js +325 -0
- package/lib/DateTime/YearView.module.css +99 -0
- package/lib/DateTime/__tests__/CalendarView.spec.js +20 -0
- package/lib/DateTime/__tests__/DateTime.spec.js +28 -0
- package/lib/DateTime/__tests__/DateTimePopupFooter.spec.js +18 -0
- package/lib/DateTime/__tests__/DateTimePopupHeader.spec.js +18 -0
- package/lib/DateTime/__tests__/DateWidget.spec.js +18 -0
- package/lib/DateTime/__tests__/DaysRow.spec.js +20 -0
- package/lib/DateTime/__tests__/Time.spec.js +18 -0
- package/lib/DateTime/__tests__/YearView.spec.js +17 -0
- package/lib/DateTime/__tests__/__snapshots__/CalendarView.spec.js.snap +312 -0
- package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +938 -0
- package/lib/DateTime/__tests__/__snapshots__/DateTimePopupFooter.spec.js.snap +34 -0
- package/lib/DateTime/__tests__/__snapshots__/DateTimePopupHeader.spec.js.snap +72 -0
- package/lib/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +79 -0
- package/lib/DateTime/__tests__/__snapshots__/DaysRow.spec.js.snap +12 -0
- package/lib/DateTime/__tests__/__snapshots__/Time.spec.js.snap +310 -0
- package/lib/DateTime/common.js +36 -0
- package/lib/DateTime/constants.js +77 -0
- package/lib/DateTime/dateFormatUtils/dateFormat.js +627 -0
- package/lib/DateTime/dateFormatUtils/dateFormats.js +50 -0
- package/lib/DateTime/dateFormatUtils/dayChange.js +83 -0
- package/lib/DateTime/dateFormatUtils/index.js +307 -0
- package/lib/DateTime/dateFormatUtils/monthChange.js +96 -0
- package/lib/DateTime/dateFormatUtils/timeChange.js +240 -0
- package/lib/DateTime/dateFormatUtils/yearChange.js +121 -0
- package/lib/DateTime/index.js +15 -0
- package/lib/DateTime/objectUtils.js +76 -0
- package/lib/DateTime/props/defaultProps.js +78 -0
- package/lib/DateTime/props/propTypes.js +235 -0
- package/lib/DateTime/typeChecker.js +26 -0
- package/lib/DateTime/validator.js +353 -0
- package/lib/DropBox/DropBox.js +109 -0
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +150 -0
- package/lib/DropBox/DropBoxElement/__tests__/DropBoxElement.spec.js +35 -0
- package/lib/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +95 -0
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +442 -0
- package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +81 -0
- package/lib/DropBox/DropBoxElement/props/defaultProps.js +25 -0
- package/lib/DropBox/DropBoxElement/props/propTypes.js +62 -0
- package/lib/DropBox/DropBoxElement/useDropboxPosCalc.js +60 -0
- package/lib/DropBox/DropBoxPositionMapping.js +149 -0
- package/lib/DropBox/__tests__/DropBox.spec.js +18 -0
- package/lib/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +36 -0
- package/lib/DropBox/css/DropBox.module.css +59 -0
- package/lib/DropBox/css/cssJSLogic.js +20 -0
- package/lib/DropBox/props/defaultProps.js +30 -0
- package/lib/DropBox/props/propTypes.js +35 -0
- package/lib/DropBox/utils/isMobilePopover.js +25 -0
- package/lib/DropDown/DropDown.js +171 -0
- package/lib/DropDown/DropDown.module.css +5 -0
- package/lib/DropDown/DropDownHeading.js +93 -0
- package/lib/DropDown/DropDownHeading.module.css +53 -0
- package/lib/DropDown/DropDownItem.js +127 -0
- package/lib/DropDown/DropDownItem.module.css +94 -0
- package/lib/DropDown/DropDownSearch.js +117 -0
- package/lib/DropDown/DropDownSearch.module.css +14 -0
- package/lib/DropDown/DropDownSeparator.js +64 -0
- package/lib/DropDown/DropDownSeparator.module.css +7 -0
- package/lib/DropDown/__tests__/DropDown.spec.js +18 -0
- package/lib/DropDown/__tests__/DropDownHeading.spec.js +18 -0
- package/lib/DropDown/__tests__/DropDownItem.spec.js +18 -0
- package/lib/DropDown/__tests__/DropDownSearch.spec.js +18 -0
- package/lib/DropDown/__tests__/DropDownSeparator.spec.js +18 -0
- package/lib/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +54 -0
- package/lib/DropDown/__tests__/__snapshots__/DropDownHeading.spec.js.snap +12 -0
- package/lib/DropDown/__tests__/__snapshots__/DropDownItem.spec.js.snap +11 -0
- package/lib/DropDown/__tests__/__snapshots__/DropDownSearch.spec.js.snap +20 -0
- package/lib/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +9 -0
- package/lib/DropDown/index.js +65 -0
- package/lib/DropDown/props/defaultProps.js +31 -0
- package/lib/DropDown/props/propTypes.js +87 -0
- package/lib/Heading/Heading.js +94 -0
- package/lib/Heading/Heading.module.css +5 -0
- package/lib/Heading/__tests__/Heading.spec.js +27 -0
- package/lib/Heading/__tests__/__snapshots__/Heading.spec.js.snap +63 -0
- package/lib/Heading/props/defaultProps.js +12 -0
- package/lib/Heading/props/propTypes.js +23 -0
- package/lib/Label/Label.js +97 -0
- package/lib/Label/Label.module.css +57 -0
- package/lib/Label/LabelColors.module.css +21 -0
- package/lib/Label/__tests__/Label.spec.js +106 -0
- package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +312 -0
- package/lib/Label/props/defaultProps.js +18 -0
- package/lib/Label/props/propTypes.js +30 -0
- package/lib/Layout/Box.js +128 -0
- package/lib/Layout/Container.js +145 -0
- package/lib/Layout/Layout.module.css +336 -0
- package/lib/Layout/__tests__/Box.spec.js +18 -0
- package/lib/Layout/__tests__/Container.spec.js +18 -0
- package/lib/Layout/__tests__/__snapshots__/Box.spec.js.snap +16 -0
- package/lib/Layout/__tests__/__snapshots__/Container.spec.js.snap +16 -0
- package/lib/Layout/index.js +23 -0
- package/lib/Layout/props/defaultProps.js +24 -0
- package/lib/Layout/props/propTypes.js +58 -0
- package/lib/Layout/utils.js +59 -0
- package/lib/ListItem/ListContainer.js +129 -0
- package/lib/ListItem/ListItem.js +204 -0
- package/lib/ListItem/ListItem.module.css +261 -0
- package/lib/ListItem/ListItemWithAvatar.js +234 -0
- package/lib/ListItem/ListItemWithCheckBox.js +195 -0
- package/lib/ListItem/ListItemWithIcon.js +213 -0
- package/lib/ListItem/ListItemWithRadio.js +198 -0
- package/lib/ListItem/__tests__/ListContainer.spec.js +26 -0
- package/lib/ListItem/__tests__/ListItem.spec.js +18 -0
- package/lib/ListItem/__tests__/ListItemWithAvatar.spec.js +53 -0
- package/lib/ListItem/__tests__/ListItemWithCheckBox.spec.js +53 -0
- package/lib/ListItem/__tests__/ListItemWithIcon.spec.js +53 -0
- package/lib/ListItem/__tests__/ListItemWithRadio.spec.js +53 -0
- package/lib/ListItem/__tests__/__snapshots__/ListContainer.spec.js.snap +27 -0
- package/lib/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +29 -0
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +222 -0
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +492 -0
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +222 -0
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +487 -0
- package/lib/ListItem/index.js +55 -0
- package/lib/ListItem/props/defaultProps.js +117 -0
- package/lib/ListItem/props/propTypes.js +214 -0
- package/lib/Modal/Modal.js +236 -0
- package/lib/Modal/Portal/Portal.js +46 -0
- package/lib/Modal/Portal/__tests__/Portal.spec.js +37 -0
- package/lib/Modal/Portal/__tests__/__snapshots__/Portal.spec.js.snap +30 -0
- package/lib/Modal/Portal/props/defaultProps.js +10 -0
- package/lib/Modal/Portal/props/propTypes.js +16 -0
- package/lib/Modal/__tests__/Modal.spec.js +22 -0
- package/lib/Modal/__tests__/__snapshots__/Modal.spec.js.snap +26 -0
- package/lib/Modal/props/defaultProps.js +10 -0
- package/lib/Modal/props/propTypes.js +18 -0
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +1198 -0
- package/lib/MultiSelect/AdvancedMultiSelect.js +673 -0
- package/lib/MultiSelect/EmptyState.js +114 -0
- package/lib/MultiSelect/MobileHeader/MobileHeader.js +62 -0
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
- package/lib/MultiSelect/MobileHeader/__tests__/MobileHeader.spec.js +18 -0
- package/lib/MultiSelect/MobileHeader/__tests__/__snapshots__/MobileHeader.spec.js.snap +39 -0
- package/lib/MultiSelect/MobileHeader/props/defaultProps.js +14 -0
- package/lib/MultiSelect/MobileHeader/props/propTypes.js +18 -0
- package/lib/MultiSelect/MultiSelect.js +1269 -0
- package/lib/MultiSelect/MultiSelect.module.css +216 -0
- package/lib/MultiSelect/MultiSelectHeader.js +78 -0
- package/lib/MultiSelect/MultiSelectWithAvatar.js +276 -0
- package/lib/MultiSelect/SelectedOptions.js +132 -0
- package/lib/MultiSelect/SelectedOptions.module.css +15 -0
- package/lib/MultiSelect/Suggestions.js +279 -0
- package/lib/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +20 -0
- package/lib/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +56 -0
- package/lib/MultiSelect/__tests__/EmptyState.spec.js +22 -0
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +43 -0
- package/lib/MultiSelect/__tests__/MultiSelectHeader.spec.js +28 -0
- package/lib/MultiSelect/__tests__/MultiSelectWithAvatar.spec.js +18 -0
- package/lib/MultiSelect/__tests__/SelectedOptions.spec.js +35 -0
- package/lib/MultiSelect/__tests__/Suggestions.spec.js +78 -0
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +74 -0
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +534 -0
- package/lib/MultiSelect/__tests__/__snapshots__/EmptyState.spec.js.snap +12 -0
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +339 -0
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelectHeader.spec.js.snap +63 -0
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelectWithAvatar.spec.js.snap +85 -0
- package/lib/MultiSelect/__tests__/__snapshots__/SelectedOptions.spec.js.snap +80 -0
- package/lib/MultiSelect/__tests__/__snapshots__/Suggestions.spec.js.snap +363 -0
- package/lib/MultiSelect/constants.js +13 -0
- package/lib/MultiSelect/index.js +39 -0
- package/lib/MultiSelect/props/defaultProps.js +189 -0
- package/lib/MultiSelect/props/propTypes.js +325 -0
- package/lib/PopOver/PopOver.js +293 -0
- package/lib/PopOver/PopOver.module.css +9 -0
- package/lib/PopOver/__tests__/PopOver.spec.js +18 -0
- package/lib/PopOver/__tests__/__snapshots__/PopOver.spec.js.snap +13 -0
- package/lib/PopOver/index.js +31 -0
- package/lib/PopOver/props/defaultProps.js +15 -0
- package/lib/PopOver/props/propTypes.js +66 -0
- package/lib/Popup/Popup.js +1196 -0
- package/lib/Popup/PositionMapping.js +81 -0
- package/lib/Popup/Registry.js +46 -0
- package/lib/Popup/intersectionObserver.js +72 -0
- package/lib/Popup/props/propTypes.js +51 -0
- package/lib/Popup/viewPort.js +367 -0
- package/lib/Provider/AvatarSize.js +24 -0
- package/lib/Provider/Config.js +30 -0
- package/lib/Provider/CssProvider.js +27 -0
- package/lib/Provider/IdProvider.js +80 -0
- package/lib/Provider/LibraryContext.js +94 -0
- package/lib/Provider/LibraryContextInit.js +15 -0
- package/lib/Provider/NumberGenerator/NumberGenerator.js +174 -0
- package/lib/Provider/ZindexProvider.js +69 -0
- package/lib/Provider/index.js +81 -0
- package/lib/Radio/Radio.js +189 -0
- package/lib/Radio/Radio.module.css +115 -0
- package/lib/Radio/__tests__/Radio.spec.js +246 -0
- package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +1916 -0
- package/lib/Radio/props/defaultProps.js +22 -0
- package/lib/Radio/props/propTypes.js +52 -0
- package/lib/Responsive/CustomResponsive.js +242 -0
- package/lib/Responsive/RefWrapper.js +56 -0
- package/lib/Responsive/ResizeComponent.js +268 -0
- package/lib/Responsive/ResizeObserver.js +100 -0
- package/lib/Responsive/ResizeObserverWithPolyfill.js +168 -0
- package/lib/Responsive/Responsive.js +274 -0
- package/lib/Responsive/index.js +55 -0
- package/lib/Responsive/props/defaultProps.js +23 -0
- package/lib/Responsive/props/propTypes.js +39 -0
- package/lib/Responsive/sizeObservers.js +214 -0
- package/lib/Responsive/utils/index.js +70 -0
- package/lib/Responsive/utils/shallowCompare.js +38 -0
- package/lib/Responsive/windowResizeObserver.js +63 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +124 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
- package/lib/ResponsiveDropBox/__tests__/ResponsiveDropBox.spec.js +18 -0
- package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +42 -0
- package/lib/ResponsiveDropBox/props/defaultProps.js +11 -0
- package/lib/ResponsiveDropBox/props/propTypes.js +27 -0
- package/lib/Ribbon/Ribbon.js +98 -0
- package/lib/Ribbon/Ribbon.module.css +500 -0
- package/lib/Ribbon/__tests__/Ribbon.spec.js +59 -0
- package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +374 -0
- package/lib/Ribbon/props/defaultProps.js +16 -0
- package/lib/Ribbon/props/propTypes.js +22 -0
- package/lib/RippleEffect/RippleEffect.js +45 -0
- package/lib/RippleEffect/RippleEffect.module.css +109 -0
- package/lib/RippleEffect/__tests__/RippleEffect.spec.js +76 -0
- package/lib/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +161 -0
- package/lib/RippleEffect/props/defaultProps.js +17 -0
- package/lib/RippleEffect/props/propTypes.js +23 -0
- package/lib/Select/GroupSelect.js +901 -0
- package/lib/Select/Select.js +1067 -0
- package/lib/Select/Select.module.css +138 -0
- package/lib/Select/SelectWithAvatar.js +408 -0
- package/lib/Select/SelectWithIcon.js +632 -0
- package/lib/Select/__tests__/GroupSelect.spec.js +27 -0
- package/lib/Select/__tests__/Select.spec.js +1398 -0
- package/lib/Select/__tests__/SelectWithAvatar.spec.js +20 -0
- package/lib/Select/__tests__/SelectWithIcon.spec.js +20 -0
- package/lib/Select/__tests__/__snapshots__/GroupSelect.spec.js.snap +90 -0
- package/lib/Select/__tests__/__snapshots__/Select.spec.js.snap +10446 -0
- package/lib/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +45 -0
- package/lib/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +108 -0
- package/lib/Select/index.js +39 -0
- package/lib/Select/props/defaultProps.js +129 -0
- package/lib/Select/props/propTypes.js +333 -0
- package/lib/Stencils/Stencils.js +72 -0
- package/lib/Stencils/Stencils.module.css +100 -0
- package/lib/Stencils/__tests__/Stencils.spec.js +61 -0
- package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +105 -0
- package/lib/Stencils/props/defaultProps.js +14 -0
- package/lib/Stencils/props/propTypes.js +19 -0
- package/lib/Switch/Switch.js +152 -0
- package/lib/Switch/Switch.module.css +128 -0
- package/lib/Switch/__tests__/Switch.spec.js +163 -0
- package/lib/Switch/__tests__/__snapshots__/Switch.spec.js.snap +831 -0
- package/lib/Switch/props/defaultProps.js +18 -0
- package/lib/Switch/props/propTypes.js +39 -0
- package/lib/Tab/Tab.js +134 -0
- package/lib/Tab/Tab.module.css +100 -0
- package/lib/Tab/TabContent.js +42 -0
- package/lib/Tab/TabContent.module.css +4 -0
- package/lib/Tab/TabContentWrapper.js +47 -0
- package/lib/Tab/TabWrapper.js +91 -0
- package/lib/Tab/Tabs.js +787 -0
- package/lib/Tab/Tabs.module.css +167 -0
- package/lib/Tab/__tests__/Tab.spec.js +18 -0
- package/lib/Tab/__tests__/TabContent.spec.js +18 -0
- package/lib/Tab/__tests__/TabContentWrapper.spec.js +18 -0
- package/lib/Tab/__tests__/TabLayout.spec.js +41 -0
- package/lib/Tab/__tests__/TabWrapper.spec.js +18 -0
- package/lib/Tab/__tests__/Tabs.spec.js +18 -0
- package/lib/Tab/__tests__/__snapshots__/Tab.spec.js.snap +22 -0
- package/lib/Tab/__tests__/__snapshots__/TabContent.spec.js.snap +19 -0
- package/lib/Tab/__tests__/__snapshots__/TabContentWrapper.spec.js.snap +12 -0
- package/lib/Tab/__tests__/__snapshots__/TabLayout.spec.js.snap +341 -0
- package/lib/Tab/__tests__/__snapshots__/TabWrapper.spec.js.snap +20 -0
- package/lib/Tab/__tests__/__snapshots__/Tabs.spec.js.snap +33 -0
- package/lib/Tab/index.js +47 -0
- package/lib/Tab/props/defaultProps.js +62 -0
- package/lib/Tab/props/propTypes.js +132 -0
- package/lib/Tab/utils/tabConfigs.js +27 -0
- package/lib/Tag/Tag.js +219 -0
- package/lib/Tag/Tag.module.css +254 -0
- package/lib/Tag/__tests__/Tag.spec.js +270 -0
- package/lib/Tag/__tests__/__snapshots__/Tag.spec.js.snap +3074 -0
- package/lib/Tag/props/defaultProps.js +23 -0
- package/lib/Tag/props/propTypes.js +55 -0
- package/lib/TextBox/TextBox.js +233 -0
- package/lib/TextBox/TextBox.module.css +197 -0
- package/lib/TextBox/__tests__/TextBox.spec.js +334 -0
- package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +615 -0
- package/lib/TextBox/props/defaultProps.js +27 -0
- package/lib/TextBox/props/propTypes.js +64 -0
- package/lib/TextBoxIcon/TextBoxIcon.js +253 -0
- package/lib/TextBoxIcon/TextBoxIcon.module.css +79 -0
- package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +279 -0
- package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +1784 -0
- package/lib/TextBoxIcon/props/defaultProps.js +31 -0
- package/lib/TextBoxIcon/props/propTypes.js +74 -0
- package/lib/Textarea/Textarea.js +168 -0
- package/lib/Textarea/Textarea.module.css +148 -0
- package/lib/Textarea/__tests__/Textarea.spec.js +273 -0
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +525 -0
- package/lib/Textarea/props/defaultProps.js +25 -0
- package/lib/Textarea/props/propTypes.js +46 -0
- package/lib/Tooltip/Tooltip.js +599 -0
- package/lib/Tooltip/Tooltip.module.css +133 -0
- package/lib/Tooltip/props/defaultProps.js +11 -0
- package/lib/Tooltip/props/propTypes.js +16 -0
- package/lib/Typography/Typography.js +56 -0
- package/lib/Typography/css/Typography.module.css +489 -0
- package/lib/Typography/css/cssJSLogic.js +48 -0
- package/lib/Typography/props/defaultProps.js +15 -0
- package/lib/Typography/props/propTypes.js +38 -0
- package/lib/Typography/utils/index.js +59 -0
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +126 -0
- package/lib/VelocityAnimation/VelocityAnimation/__tests__/VelocityAnimation.spec.js +18 -0
- package/lib/VelocityAnimation/VelocityAnimation/__tests__/__snapshots__/VelocityAnimation.spec.js.snap +9 -0
- package/lib/VelocityAnimation/VelocityAnimation/props/defaultProps.js +14 -0
- package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +23 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +216 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/__tests__/VelocityAnimationGroup.spec.js +26 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/__tests__/__snapshots__/VelocityAnimationGroup.spec.js.snap +11 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +22 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +33 -0
- package/lib/VelocityAnimation/index.js +23 -0
- package/lib/common/a11y.module.css +4 -0
- package/lib/common/animation.module.css +624 -0
- package/lib/common/avatarsizes.module.css +49 -0
- package/lib/common/basic.module.css +31 -0
- package/lib/common/basicReset.module.css +40 -0
- package/lib/common/boxShadow.module.css +34 -0
- package/lib/common/common.module.css +566 -0
- package/lib/common/customscroll.module.css +142 -0
- package/lib/common/reset.module.css +13 -0
- package/lib/common/transition.module.css +146 -0
- package/lib/components_layer.module.css +1 -0
- package/lib/css.js +83 -0
- package/lib/deprecated/PortalLayer/PortalLayer.js +153 -0
- package/lib/deprecated/PortalLayer/props/defaultProps.js +12 -0
- package/lib/deprecated/PortalLayer/props/propTypes.js +32 -0
- package/lib/deprecated/Switch/Switch.js +108 -0
- package/lib/deprecated/Switch/props/defaultProps.js +18 -0
- package/lib/deprecated/Switch/props/propTypes.js +39 -0
- package/lib/index.js +417 -0
- package/lib/semantic/Button/Button.js +104 -0
- package/lib/semantic/Button/__tests__/Button.spec.js +18 -0
- package/lib/semantic/Button/__tests__/__snapshots__/Button.spec.js.snap +15 -0
- package/lib/semantic/Button/props/defaultProps.js +19 -0
- package/lib/semantic/Button/props/propTypes.js +33 -0
- package/lib/semantic/Button/semanticButton.module.css +9 -0
- package/lib/semantic/index.js +15 -0
- package/lib/utils/Common.js +521 -0
- package/lib/utils/ContextOptimizer.js +49 -0
- package/lib/utils/constant.js +10 -0
- package/lib/utils/constructFullName.js +34 -0
- package/lib/utils/cssUtils.js +22 -0
- package/lib/utils/datetime/GMTZones.js +55 -0
- package/lib/utils/datetime/common.js +251 -0
- package/lib/utils/debounce.js +30 -0
- package/lib/utils/dropDownUtils.js +691 -0
- package/lib/utils/dummyFunction.js +10 -0
- package/lib/utils/getHTMLFontSize.js +11 -0
- package/lib/utils/getInitial.js +33 -0
- package/lib/utils/index.js +103 -0
- package/lib/utils/scrollTo.js +22 -0
- package/lib/utils/shallowEqual.js +41 -0
- package/lib/v1/Accordion/Accordion.js +98 -0
- package/lib/v1/Accordion/AccordionItem.js +68 -0
- package/lib/v1/Accordion/index.js +23 -0
- package/lib/v1/Accordion/props/defaultProps.js +20 -0
- package/lib/v1/Accordion/props/propTypes.js +45 -0
- package/lib/v1/Animation/Animation.js +61 -0
- package/lib/v1/Animation/props/defaultProps.js +14 -0
- package/lib/v1/Animation/props/propTypes.js +23 -0
- package/lib/v1/Animation/utils.js +94 -0
- package/lib/v1/AppContainer/AppContainer.js +146 -0
- package/lib/v1/AppContainer/props/defaultProps.js +17 -0
- package/lib/v1/AppContainer/props/propTypes.js +28 -0
- package/lib/v1/Avatar/Avatar.js +191 -0
- package/lib/v1/Avatar/props/defaultProps.js +24 -0
- package/lib/v1/Avatar/props/propTypes.js +37 -0
- package/lib/v1/AvatarTeam/AvatarTeam.js +81 -0
- package/lib/v1/AvatarTeam/props/defaultProps.js +24 -0
- package/lib/v1/AvatarTeam/props/propTypes.js +38 -0
- package/lib/v1/Button/Button.js +82 -0
- package/lib/v1/Button/props/defaultProps.js +27 -0
- package/lib/v1/Button/props/propTypes.js +40 -0
- package/lib/v1/Buttongroup/Buttongroup.js +44 -0
- package/lib/v1/Buttongroup/props/defaultProps.js +13 -0
- package/lib/v1/Buttongroup/props/propTypes.js +20 -0
- package/lib/v1/Card/Card.js +269 -0
- package/lib/v1/Card/index.js +37 -0
- package/lib/v1/Card/props/defaultProps.js +35 -0
- package/lib/v1/Card/props/propTypes.js +62 -0
- package/lib/v1/CheckBox/CheckBox.js +172 -0
- package/lib/v1/CheckBox/props/defaultProps.js +25 -0
- package/lib/v1/CheckBox/props/propTypes.js +52 -0
- package/lib/v1/DateTime/CalendarView.js +322 -0
- package/lib/v1/DateTime/DateTime.js +877 -0
- package/lib/v1/DateTime/DateTimePopupFooter.js +96 -0
- package/lib/v1/DateTime/DateTimePopupHeader.js +166 -0
- package/lib/v1/DateTime/DateWidget.js +1163 -0
- package/lib/v1/DateTime/DaysRow.js +81 -0
- package/lib/v1/DateTime/Time.js +270 -0
- package/lib/v1/DateTime/YearView.js +325 -0
- package/lib/v1/DateTime/index.js +15 -0
- package/lib/v1/DateTime/props/defaultProps.js +76 -0
- package/lib/v1/DateTime/props/propTypes.js +238 -0
- package/lib/v1/DropBox/DropBox.js +109 -0
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +146 -0
- package/lib/v1/DropBox/DropBoxElement/props/defaultProps.js +25 -0
- package/lib/v1/DropBox/DropBoxElement/props/propTypes.js +62 -0
- package/lib/v1/DropBox/props/defaultProps.js +30 -0
- package/lib/v1/DropBox/props/propTypes.js +35 -0
- package/lib/v1/DropBox/utils/isMobilePopover.js +25 -0
- package/lib/v1/DropDown/DropDown.js +74 -0
- package/lib/v1/DropDown/DropDownHeading.js +47 -0
- package/lib/v1/DropDown/DropDownItem.js +75 -0
- package/lib/v1/DropDown/DropDownSearch.js +77 -0
- package/lib/v1/DropDown/DropDownSeparator.js +24 -0
- package/lib/v1/DropDown/props/defaultProps.js +31 -0
- package/lib/v1/DropDown/props/propTypes.js +87 -0
- package/lib/v1/Heading/Heading.js +53 -0
- package/lib/v1/Heading/props/defaultProps.js +12 -0
- package/lib/v1/Heading/props/propTypes.js +23 -0
- package/lib/v1/Label/Label.js +51 -0
- package/lib/v1/Label/props/defaultProps.js +18 -0
- package/lib/v1/Label/props/propTypes.js +30 -0
- package/lib/v1/Layout/Box.js +128 -0
- package/lib/v1/Layout/Container.js +145 -0
- package/lib/v1/Layout/index.js +23 -0
- package/lib/v1/Layout/props/defaultProps.js +24 -0
- package/lib/v1/Layout/props/propTypes.js +58 -0
- package/lib/v1/ListItem/ListContainer.js +128 -0
- package/lib/v1/ListItem/ListItem.js +138 -0
- package/lib/v1/ListItem/ListItemWithAvatar.js +167 -0
- package/lib/v1/ListItem/ListItemWithCheckBox.js +126 -0
- package/lib/v1/ListItem/ListItemWithIcon.js +143 -0
- package/lib/v1/ListItem/ListItemWithRadio.js +127 -0
- package/lib/v1/ListItem/index.js +55 -0
- package/lib/v1/ListItem/props/defaultProps.js +109 -0
- package/lib/v1/ListItem/props/propTypes.js +196 -0
- package/lib/v1/Modal/Modal.js +166 -0
- package/lib/v1/Modal/props/defaultProps.js +10 -0
- package/lib/v1/Modal/props/propTypes.js +18 -0
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +1180 -0
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +649 -0
- package/lib/v1/MultiSelect/EmptyState.js +112 -0
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +62 -0
- package/lib/v1/MultiSelect/MobileHeader/props/defaultProps.js +14 -0
- package/lib/v1/MultiSelect/MobileHeader/props/propTypes.js +18 -0
- package/lib/v1/MultiSelect/MultiSelect.js +1202 -0
- package/lib/v1/MultiSelect/MultiSelectHeader.js +78 -0
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +262 -0
- package/lib/v1/MultiSelect/SelectedOptions.js +130 -0
- package/lib/v1/MultiSelect/Suggestions.js +196 -0
- package/lib/v1/MultiSelect/index.js +39 -0
- package/lib/v1/MultiSelect/props/defaultProps.js +181 -0
- package/lib/v1/MultiSelect/props/propTypes.js +350 -0
- package/lib/v1/PopOver/PopOver.js +197 -0
- package/lib/v1/PopOver/props/defaultProps.js +15 -0
- package/lib/v1/PopOver/props/propTypes.js +66 -0
- package/lib/v1/Popup/Popup.js +715 -0
- package/lib/v1/Radio/Radio.js +141 -0
- package/lib/v1/Radio/props/defaultProps.js +22 -0
- package/lib/v1/Radio/props/propTypes.js +51 -0
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +79 -0
- package/lib/v1/ResponsiveDropBox/props/defaultProps.js +11 -0
- package/lib/v1/ResponsiveDropBox/props/propTypes.js +27 -0
- package/lib/v1/Ribbon/Ribbon.js +44 -0
- package/lib/v1/Ribbon/props/defaultProps.js +16 -0
- package/lib/v1/Ribbon/props/propTypes.js +22 -0
- package/lib/v1/RippleEffect/RippleEffect.js +40 -0
- package/lib/v1/RippleEffect/props/defaultProps.js +17 -0
- package/lib/v1/RippleEffect/props/propTypes.js +23 -0
- package/lib/v1/Select/GroupSelect.js +894 -0
- package/lib/v1/Select/Select.js +1025 -0
- package/lib/v1/Select/SelectWithAvatar.js +406 -0
- package/lib/v1/Select/SelectWithIcon.js +607 -0
- package/lib/v1/Select/index.js +39 -0
- package/lib/v1/Select/props/defaultProps.js +125 -0
- package/lib/v1/Select/props/propTypes.js +319 -0
- package/lib/v1/Stencils/Stencils.js +43 -0
- package/lib/v1/Stencils/props/defaultProps.js +13 -0
- package/lib/v1/Stencils/props/propTypes.js +18 -0
- package/lib/v1/Switch/Switch.js +159 -0
- package/lib/v1/Switch/__tests__/Switch.spec.js +37 -0
- package/lib/v1/Switch/__tests__/__snapshots__/Switch.spec.js.snap +135 -0
- package/lib/v1/Switch/contants/index.js +34 -0
- package/lib/v1/Switch/css/Switch_v1.module.css +140 -0
- package/lib/v1/Switch/css/cssJSLogic.js +37 -0
- package/lib/v1/Switch/props/defaultProps.js +18 -0
- package/lib/v1/Switch/props/propTypes.js +47 -0
- package/lib/v1/Switch/useSwitch.js +56 -0
- package/lib/v1/Tab/Tab.js +132 -0
- package/lib/v1/Tab/TabContent.js +42 -0
- package/lib/v1/Tab/TabContentWrapper.js +47 -0
- package/lib/v1/Tab/TabWrapper.js +89 -0
- package/lib/v1/Tab/Tabs.js +688 -0
- package/lib/v1/Tab/index.js +47 -0
- package/lib/v1/Tab/props/defaultProps.js +62 -0
- package/lib/v1/Tab/props/propTypes.js +132 -0
- package/lib/v1/Tab/v1Tab.module.css +100 -0
- package/lib/v1/Tab/v1TabContent.module.css +4 -0
- package/lib/v1/Tab/v1Tabs.module.css +167 -0
- package/lib/v1/Tag/Tag.js +160 -0
- package/lib/v1/Tag/props/defaultProps.js +22 -0
- package/lib/v1/Tag/props/propTypes.js +47 -0
- package/lib/v1/TextBox/TextBox.js +175 -0
- package/lib/v1/TextBox/props/defaultProps.js +27 -0
- package/lib/v1/TextBox/props/propTypes.js +62 -0
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +206 -0
- package/lib/v1/TextBoxIcon/props/defaultProps.js +31 -0
- package/lib/v1/TextBoxIcon/props/propTypes.js +72 -0
- package/lib/v1/Textarea/Textarea.js +118 -0
- package/lib/v1/Textarea/props/defaultProps.js +24 -0
- package/lib/v1/Textarea/props/propTypes.js +42 -0
- package/lib/v1/Tooltip/Tooltip.js +599 -0
- package/lib/v1/Tooltip/props/defaultProps.js +11 -0
- package/lib/v1/Tooltip/props/propTypes.js +16 -0
- package/lib/v1/Typography/Typography.js +56 -0
- package/lib/v1/Typography/css/cssJSLogic.js +48 -0
- package/lib/v1/Typography/css/v1_Typography.module.css +380 -0
- package/lib/v1/Typography/props/defaultProps.js +15 -0
- package/lib/v1/Typography/props/propTypes.js +38 -0
- package/lib/v1/Typography/utils/index.js +59 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +90 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +14 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +23 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +126 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +22 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +30 -0
- package/lib/v1/semantic/Button/Button.js +63 -0
- package/lib/v1/semantic/Button/props/defaultProps.js +19 -0
- package/lib/v1/semantic/Button/props/propTypes.js +33 -0
- package/lib/v1/semantic/index.js +15 -0
- package/package.json +7 -12
- package/.cli/MissedPropType_Keys.html +0 -101
- package/.cli/PropLessFiles.html +0 -101
- package/.cli/PropUnificationExcludeFilesArray.js +0 -231
- package/.cli/PropValidationExcludeFilesArray.js +0 -1
- package/.cli/ThemeValidationExcludeFiles.js +0 -1
- package/.cli/UnValidatedFiles.html +0 -101
- package/.cli/config/variables/variableMapping.json +0 -13
- package/.cli/propValidation_report.html +0 -182
- package/.cli/themeValidate/stringContains.js +0 -1
- package/PropValidationExcludeFilesArray.js +0 -1
- package/coverage/__testUtils__/MockResizeObserver.js.html +0 -163
- package/coverage/__testUtils__/index.html +0 -116
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/coverage-final.json +0 -14
- package/coverage/coverage-summary.json +0 -15
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -206
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/src/Accordion/Accordion.js.html +0 -307
- package/coverage/src/Accordion/AccordionItem.js.html +0 -232
- package/coverage/src/Accordion/index.html +0 -116
- package/coverage/src/Accordion/props/defaultProps.js.html +0 -124
- package/coverage/src/Accordion/props/index.html +0 -131
- package/coverage/src/Accordion/props/propTypes.js.html +0 -190
- package/coverage/src/Animation/Animation.js.html +0 -256
- package/coverage/src/Animation/index.html +0 -131
- package/coverage/src/Animation/props/defaultProps.js.html +0 -106
- package/coverage/src/Animation/props/index.html +0 -131
- package/coverage/src/Animation/props/propTypes.js.html +0 -124
- package/coverage/src/Animation/utils.js.html +0 -331
- package/coverage/src/AppContainer/AppContainer.js.html +0 -475
- package/coverage/src/AppContainer/AppContainer.module.css.html +0 -139
- package/coverage/src/AppContainer/index.html +0 -116
- package/coverage/src/AppContainer/props/defaultProps.js.html +0 -115
- package/coverage/src/AppContainer/props/index.html +0 -131
- package/coverage/src/AppContainer/props/propTypes.js.html +0 -139
- package/coverage/src/Avatar/Avatar.js.html +0 -652
- package/coverage/src/Avatar/Avatar.module.css.html +0 -556
- package/coverage/src/Avatar/index.html +0 -131
- package/coverage/src/Avatar/props/defaultProps.js.html +0 -136
- package/coverage/src/Avatar/props/index.html +0 -131
- package/coverage/src/Avatar/props/propTypes.js.html +0 -166
- package/coverage/src/AvatarTeam/AvatarTeam.js.html +0 -340
- package/coverage/src/AvatarTeam/AvatarTeam.module.css.html +0 -610
- package/coverage/src/AvatarTeam/index.html +0 -131
- package/coverage/src/AvatarTeam/props/defaultProps.js.html +0 -136
- package/coverage/src/AvatarTeam/props/index.html +0 -116
- package/coverage/src/AvatarTeam/props/propTypes.js.html +0 -172
- package/coverage/src/Button/Button.js.html +0 -337
- package/coverage/src/Button/css/Button.module.css.html +0 -1693
- package/coverage/src/Button/css/cssJSLogic.js.html +0 -220
- package/coverage/src/Button/css/index.html +0 -131
- package/coverage/src/Button/index.html +0 -116
- package/coverage/src/Button/props/defaultProps.js.html +0 -142
- package/coverage/src/Button/props/index.html +0 -131
- package/coverage/src/Button/props/propTypes.js.html +0 -220
- package/coverage/src/Buttongroup/Buttongroup.js.html +0 -220
- package/coverage/src/Buttongroup/Buttongroup.module.css.html +0 -298
- package/coverage/src/Buttongroup/index.html +0 -131
- package/coverage/src/Buttongroup/props/defaultProps.js.html +0 -103
- package/coverage/src/Buttongroup/props/index.html +0 -131
- package/coverage/src/Buttongroup/props/propTypes.js.html +0 -115
- package/coverage/src/Card/Card.js.html +0 -976
- package/coverage/src/Card/Card.module.css.html +0 -145
- package/coverage/src/Card/index.html +0 -131
- package/coverage/src/Card/props/defaultProps.js.html +0 -172
- package/coverage/src/Card/props/index.html +0 -131
- package/coverage/src/Card/props/propTypes.js.html +0 -244
- package/coverage/src/CheckBox/CheckBox.js.html +0 -625
- package/coverage/src/CheckBox/CheckBox.module.css.html +0 -547
- package/coverage/src/CheckBox/index.html +0 -131
- package/coverage/src/CheckBox/props/defaultProps.js.html +0 -139
- package/coverage/src/CheckBox/props/index.html +0 -131
- package/coverage/src/CheckBox/props/propTypes.js.html +0 -214
- package/coverage/src/DateTime/CalendarView.js.html +0 -706
- package/coverage/src/DateTime/DateTime.js.html +0 -1954
- package/coverage/src/DateTime/DateTime.module.css.html +0 -733
- package/coverage/src/DateTime/DateTimePopupFooter.js.html +0 -187
- package/coverage/src/DateTime/DateTimePopupHeader.js.html +0 -346
- package/coverage/src/DateTime/DateWidget.js.html +0 -2920
- package/coverage/src/DateTime/DateWidget.module.css.html +0 -190
- package/coverage/src/DateTime/DaysRow.js.html +0 -178
- package/coverage/src/DateTime/Time.js.html +0 -595
- package/coverage/src/DateTime/YearView.js.html +0 -736
- package/coverage/src/DateTime/YearView.module.css.html +0 -340
- package/coverage/src/DateTime/constants.js.html +0 -370
- package/coverage/src/DateTime/dateFormatUtils/dateFormat.js.html +0 -1714
- package/coverage/src/DateTime/dateFormatUtils/dateFormats.js.html +0 -436
- package/coverage/src/DateTime/dateFormatUtils/dayChange.js.html +0 -289
- package/coverage/src/DateTime/dateFormatUtils/index.html +0 -146
- package/coverage/src/DateTime/dateFormatUtils/index.js.html +0 -748
- package/coverage/src/DateTime/dateFormatUtils/monthChange.js.html +0 -325
- package/coverage/src/DateTime/dateFormatUtils/timeChange.js.html +0 -748
- package/coverage/src/DateTime/dateFormatUtils/yearChange.js.html +0 -427
- package/coverage/src/DateTime/index.html +0 -146
- package/coverage/src/DateTime/objectUtils.js.html +0 -274
- package/coverage/src/DateTime/props/defaultProps.js.html +0 -298
- package/coverage/src/DateTime/props/index.html +0 -131
- package/coverage/src/DateTime/props/propTypes.js.html +0 -721
- package/coverage/src/DateTime/typeChecker.js.html +0 -148
- package/coverage/src/DateTime/validator.js.html +0 -1378
- package/coverage/src/DropBox/DropBox.js.html +0 -355
- package/coverage/src/DropBox/DropBoxElement/DropBoxElement.js.html +0 -463
- package/coverage/src/DropBox/DropBoxElement/css/DropBoxElement.module.css.html +0 -1336
- package/coverage/src/DropBox/DropBoxElement/css/cssJSLogic.js.html +0 -349
- package/coverage/src/DropBox/DropBoxElement/css/index.html +0 -131
- package/coverage/src/DropBox/DropBoxElement/index.html +0 -131
- package/coverage/src/DropBox/DropBoxElement/props/defaultProps.js.html +0 -139
- package/coverage/src/DropBox/DropBoxElement/props/index.html +0 -131
- package/coverage/src/DropBox/DropBoxElement/props/propTypes.js.html +0 -313
- package/coverage/src/DropBox/DropBoxElement/useDropboxPosCalc.js.html +0 -244
- package/coverage/src/DropBox/DropBoxPositionMapping.js.html +0 -511
- package/coverage/src/DropBox/css/DropBox.module.css.html +0 -208
- package/coverage/src/DropBox/css/cssJSLogic.js.html +0 -118
- package/coverage/src/DropBox/css/index.html +0 -131
- package/coverage/src/DropBox/index.html +0 -131
- package/coverage/src/DropBox/props/defaultProps.js.html +0 -136
- package/coverage/src/DropBox/props/index.html +0 -131
- package/coverage/src/DropBox/props/propTypes.js.html +0 -142
- package/coverage/src/DropBox/utils/index.html +0 -116
- package/coverage/src/DropBox/utils/isMobilePopover.js.html +0 -133
- package/coverage/src/DropDown/DropDown.js.html +0 -310
- package/coverage/src/DropDown/DropDown.module.css.html +0 -100
- package/coverage/src/DropDown/DropDownHeading.js.html +0 -196
- package/coverage/src/DropDown/DropDownHeading.module.css.html +0 -232
- package/coverage/src/DropDown/DropDownItem.js.html +0 -271
- package/coverage/src/DropDown/DropDownItem.module.css.html +0 -289
- package/coverage/src/DropDown/DropDownSearch.js.html +0 -229
- package/coverage/src/DropDown/DropDownSearch.module.css.html +0 -127
- package/coverage/src/DropDown/DropDownSeparator.js.html +0 -118
- package/coverage/src/DropDown/DropDownSeparator.module.css.html +0 -106
- package/coverage/src/DropDown/index.html +0 -131
- package/coverage/src/DropDown/props/defaultProps.js.html +0 -127
- package/coverage/src/DropDown/props/index.html +0 -131
- package/coverage/src/DropDown/props/propTypes.js.html +0 -310
- package/coverage/src/Heading/Heading.js.html +0 -193
- package/coverage/src/Heading/Heading.module.css.html +0 -97
- package/coverage/src/Heading/index.html +0 -131
- package/coverage/src/Heading/props/defaultProps.js.html +0 -100
- package/coverage/src/Heading/props/index.html +0 -131
- package/coverage/src/Heading/props/propTypes.js.html +0 -124
- package/coverage/src/Label/Label.js.html +0 -250
- package/coverage/src/Label/Label.module.css.html +0 -256
- package/coverage/src/Label/LabelColors.module.css.html +0 -145
- package/coverage/src/Label/index.html +0 -146
- package/coverage/src/Label/props/defaultProps.js.html +0 -118
- package/coverage/src/Label/props/index.html +0 -131
- package/coverage/src/Label/props/propTypes.js.html +0 -145
- package/coverage/src/Layout/Box.js.html +0 -367
- package/coverage/src/Layout/Container.js.html +0 -439
- package/coverage/src/Layout/Layout.module.css.html +0 -1090
- package/coverage/src/Layout/index.html +0 -176
- package/coverage/src/Layout/index.js.html +0 -118
- package/coverage/src/Layout/props/defaultProps.js.html +0 -136
- package/coverage/src/Layout/props/index.html +0 -131
- package/coverage/src/Layout/props/propTypes.js.html +0 -262
- package/coverage/src/Layout/utils.js.html +0 -199
- package/coverage/src/ListItem/ListContainer.js.html +0 -385
- package/coverage/src/ListItem/ListItem.js.html +0 -493
- package/coverage/src/ListItem/ListItem.module.css.html +0 -793
- package/coverage/src/ListItem/ListItemWithAvatar.js.html +0 -577
- package/coverage/src/ListItem/ListItemWithCheckBox.js.html +0 -430
- package/coverage/src/ListItem/ListItemWithIcon.js.html +0 -520
- package/coverage/src/ListItem/ListItemWithRadio.js.html +0 -445
- package/coverage/src/ListItem/index.html +0 -146
- package/coverage/src/ListItem/props/defaultProps.js.html +0 -415
- package/coverage/src/ListItem/props/index.html +0 -131
- package/coverage/src/ListItem/props/propTypes.js.html +0 -763
- package/coverage/src/Modal/Modal.js.html +0 -562
- package/coverage/src/Modal/Portal/Portal.js.html +0 -166
- package/coverage/src/Modal/Portal/index.html +0 -116
- package/coverage/src/Modal/Portal/props/defaultProps.js.html +0 -97
- package/coverage/src/Modal/Portal/props/index.html +0 -131
- package/coverage/src/Modal/Portal/props/propTypes.js.html +0 -100
- package/coverage/src/Modal/index.html +0 -116
- package/coverage/src/Modal/props/defaultProps.js.html +0 -94
- package/coverage/src/Modal/props/index.html +0 -131
- package/coverage/src/Modal/props/propTypes.js.html +0 -109
- package/coverage/src/MultiSelect/AdvancedGroupMultiSelect.js.html +0 -3085
- package/coverage/src/MultiSelect/AdvancedMultiSelect.js.html +0 -1762
- package/coverage/src/MultiSelect/EmptyState.js.html +0 -277
- package/coverage/src/MultiSelect/MobileHeader/MobileHeader.js.html +0 -214
- package/coverage/src/MultiSelect/MobileHeader/MobileHeader.module.css.html +0 -133
- package/coverage/src/MultiSelect/MobileHeader/index.html +0 -131
- package/coverage/src/MultiSelect/MobileHeader/props/defaultProps.js.html +0 -97
- package/coverage/src/MultiSelect/MobileHeader/props/index.html +0 -131
- package/coverage/src/MultiSelect/MobileHeader/props/propTypes.js.html +0 -109
- package/coverage/src/MultiSelect/MultiSelect.js.html +0 -3346
- package/coverage/src/MultiSelect/MultiSelect.module.css.html +0 -658
- package/coverage/src/MultiSelect/MultiSelectHeader.js.html +0 -187
- package/coverage/src/MultiSelect/MultiSelectWithAvatar.js.html +0 -772
- package/coverage/src/MultiSelect/SelectedOptions.js.html +0 -307
- package/coverage/src/MultiSelect/SelectedOptions.module.css.html +0 -112
- package/coverage/src/MultiSelect/Suggestions.js.html +0 -736
- package/coverage/src/MultiSelect/constants.js.html +0 -100
- package/coverage/src/MultiSelect/index.html +0 -146
- package/coverage/src/MultiSelect/props/defaultProps.js.html +0 -628
- package/coverage/src/MultiSelect/props/index.html +0 -131
- package/coverage/src/MultiSelect/props/propTypes.js.html +0 -1063
- package/coverage/src/PopOver/PopOver.js.html +0 -670
- package/coverage/src/PopOver/PopOver.module.css.html +0 -109
- package/coverage/src/PopOver/index.html +0 -131
- package/coverage/src/PopOver/props/defaultProps.js.html +0 -109
- package/coverage/src/PopOver/props/index.html +0 -116
- package/coverage/src/PopOver/props/propTypes.js.html +0 -253
- package/coverage/src/Popup/Popup.js.html +0 -2869
- package/coverage/src/Popup/PositionMapping.js.html +0 -310
- package/coverage/src/Popup/Registry.js.html +0 -205
- package/coverage/src/Popup/index.html +0 -176
- package/coverage/src/Popup/intersectionObserver.js.html +0 -223
- package/coverage/src/Popup/props/index.html +0 -116
- package/coverage/src/Popup/props/propTypes.js.html +0 -232
- package/coverage/src/Popup/viewPort.js.html +0 -1492
- package/coverage/src/Provider/AvatarSize.js.html +0 -124
- package/coverage/src/Provider/Config.js.html +0 -151
- package/coverage/src/Provider/CssProvider.js.html +0 -133
- package/coverage/src/Provider/IdProvider.js.html +0 -289
- package/coverage/src/Provider/LibraryContextInit.js.html +0 -97
- package/coverage/src/Provider/NumberGenerator/NumberGenerator.js.html +0 -523
- package/coverage/src/Provider/NumberGenerator/index.html +0 -116
- package/coverage/src/Provider/ZindexProvider.js.html +0 -253
- package/coverage/src/Provider/index.html +0 -116
- package/coverage/src/Radio/Radio.js.html +0 -472
- package/coverage/src/Radio/Radio.module.css.html +0 -412
- package/coverage/src/Radio/index.html +0 -131
- package/coverage/src/Radio/props/defaultProps.js.html +0 -130
- package/coverage/src/Radio/props/index.html +0 -131
- package/coverage/src/Radio/props/propTypes.js.html +0 -211
- package/coverage/src/Responsive/CustomResponsive.js.html +0 -622
- package/coverage/src/Responsive/RefWrapper.js.html +0 -214
- package/coverage/src/Responsive/ResizeObserver.js.html +0 -274
- package/coverage/src/Responsive/index.html +0 -161
- package/coverage/src/Responsive/props/defaultProps.js.html +0 -133
- package/coverage/src/Responsive/props/index.html +0 -131
- package/coverage/src/Responsive/props/propTypes.js.html +0 -172
- package/coverage/src/Responsive/sizeObservers.js.html +0 -460
- package/coverage/src/Responsive/utils/index.html +0 -116
- package/coverage/src/Responsive/utils/shallowCompare.js.html +0 -148
- package/coverage/src/ResponsiveDropBox/ResponsiveDropBox.js.html +0 -259
- package/coverage/src/ResponsiveDropBox/ResponsiveDropBox.module.css.html +0 -103
- package/coverage/src/ResponsiveDropBox/index.html +0 -131
- package/coverage/src/ResponsiveDropBox/props/defaultProps.js.html +0 -97
- package/coverage/src/ResponsiveDropBox/props/index.html +0 -131
- package/coverage/src/ResponsiveDropBox/props/propTypes.js.html +0 -115
- package/coverage/src/Ribbon/Ribbon.js.html +0 -229
- package/coverage/src/Ribbon/Ribbon.module.css.html +0 -1348
- package/coverage/src/Ribbon/index.html +0 -131
- package/coverage/src/Ribbon/props/defaultProps.js.html +0 -112
- package/coverage/src/Ribbon/props/index.html +0 -131
- package/coverage/src/Ribbon/props/propTypes.js.html +0 -121
- package/coverage/src/RippleEffect/RippleEffect.js.html +0 -172
- package/coverage/src/RippleEffect/RippleEffect.module.css.html +0 -472
- package/coverage/src/RippleEffect/index.html +0 -131
- package/coverage/src/RippleEffect/props/defaultProps.js.html +0 -115
- package/coverage/src/RippleEffect/props/index.html +0 -131
- package/coverage/src/RippleEffect/props/propTypes.js.html +0 -124
- package/coverage/src/Select/GroupSelect.js.html +0 -2209
- package/coverage/src/Select/Select.js.html +0 -2647
- package/coverage/src/Select/Select.module.css.html +0 -463
- package/coverage/src/Select/SelectWithAvatar.js.html +0 -1114
- package/coverage/src/Select/SelectWithIcon.js.html +0 -1573
- package/coverage/src/Select/index.html +0 -131
- package/coverage/src/Select/props/defaultProps.js.html +0 -490
- package/coverage/src/Select/props/index.html +0 -131
- package/coverage/src/Select/props/propTypes.js.html +0 -1138
- package/coverage/src/Stencils/Stencils.js.html +0 -136
- package/coverage/src/Stencils/Stencils.module.css.html +0 -337
- package/coverage/src/Stencils/index.html +0 -131
- package/coverage/src/Stencils/props/defaultProps.js.html +0 -106
- package/coverage/src/Stencils/props/index.html +0 -131
- package/coverage/src/Stencils/props/propTypes.js.html +0 -112
- package/coverage/src/Switch/Switch.js.html +0 -376
- package/coverage/src/Switch/Switch.module.css.html +0 -481
- package/coverage/src/Switch/index.html +0 -131
- package/coverage/src/Switch/props/defaultProps.js.html +0 -118
- package/coverage/src/Switch/props/index.html +0 -131
- package/coverage/src/Switch/props/propTypes.js.html +0 -172
- package/coverage/src/Tab/Tab.js.html +0 -454
- package/coverage/src/Tab/Tab.module.css.html +0 -358
- package/coverage/src/Tab/TabContent.js.html +0 -163
- package/coverage/src/Tab/TabContent.module.css.html +0 -97
- package/coverage/src/Tab/TabContentWrapper.js.html +0 -139
- package/coverage/src/Tab/TabWrapper.js.html +0 -274
- package/coverage/src/Tab/Tabs.js.html +0 -2026
- package/coverage/src/Tab/Tabs.module.css.html +0 -493
- package/coverage/src/Tab/index.html +0 -161
- package/coverage/src/Tab/index.js.html +0 -100
- package/coverage/src/Tab/props/defaultProps.js.html +0 -250
- package/coverage/src/Tab/props/index.html +0 -131
- package/coverage/src/Tab/props/propTypes.js.html +0 -451
- package/coverage/src/Tab/utils/index.html +0 -116
- package/coverage/src/Tab/utils/tabConfigs.js.html +0 -142
- package/coverage/src/Tag/Tag.js.html +0 -544
- package/coverage/src/Tag/Tag.module.css.html +0 -781
- package/coverage/src/Tag/index.html +0 -131
- package/coverage/src/Tag/props/defaultProps.js.html +0 -133
- package/coverage/src/Tag/props/index.html +0 -131
- package/coverage/src/Tag/props/propTypes.js.html +0 -244
- package/coverage/src/TextBox/TextBox.js.html +0 -619
- package/coverage/src/TextBox/TextBox.module.css.html +0 -685
- package/coverage/src/TextBox/index.html +0 -131
- package/coverage/src/TextBox/props/defaultProps.js.html +0 -145
- package/coverage/src/TextBox/props/index.html +0 -131
- package/coverage/src/TextBox/props/propTypes.js.html +0 -247
- package/coverage/src/TextBoxIcon/TextBoxIcon.js.html +0 -661
- package/coverage/src/TextBoxIcon/TextBoxIcon.module.css.html +0 -301
- package/coverage/src/TextBoxIcon/index.html +0 -131
- package/coverage/src/TextBoxIcon/props/defaultProps.js.html +0 -157
- package/coverage/src/TextBoxIcon/props/index.html +0 -131
- package/coverage/src/TextBoxIcon/props/propTypes.js.html +0 -256
- package/coverage/src/Textarea/Textarea.js.html +0 -463
- package/coverage/src/Textarea/Textarea.module.css.html +0 -532
- package/coverage/src/Textarea/index.html +0 -131
- package/coverage/src/Textarea/props/defaultProps.js.html +0 -139
- package/coverage/src/Textarea/props/index.html +0 -131
- package/coverage/src/Textarea/props/propTypes.js.html +0 -193
- package/coverage/src/Tooltip/Tooltip.js.html +0 -1795
- package/coverage/src/Tooltip/Tooltip.module.css.html +0 -484
- package/coverage/src/Tooltip/index.html +0 -131
- package/coverage/src/Tooltip/props/defaultProps.js.html +0 -97
- package/coverage/src/Tooltip/props/index.html +0 -131
- package/coverage/src/Tooltip/props/propTypes.js.html +0 -103
- package/coverage/src/VelocityAnimation/VelocityAnimation/VelocityAnimation.js.html +0 -283
- package/coverage/src/VelocityAnimation/VelocityAnimation/index.html +0 -116
- package/coverage/src/VelocityAnimation/VelocityAnimation/props/defaultProps.js.html +0 -106
- package/coverage/src/VelocityAnimation/VelocityAnimation/props/index.html +0 -131
- package/coverage/src/VelocityAnimation/VelocityAnimation/props/propTypes.js.html +0 -124
- package/coverage/src/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js.html +0 -502
- package/coverage/src/VelocityAnimation/VelocityAnimationGroup/index.html +0 -116
- package/coverage/src/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js.html +0 -130
- package/coverage/src/VelocityAnimation/VelocityAnimationGroup/props/index.html +0 -131
- package/coverage/src/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js.html +0 -154
- package/coverage/src/common/a11y.module.css.html +0 -94
- package/coverage/src/common/avatarsizes.module.css.html +0 -229
- package/coverage/src/common/basic.module.css.html +0 -178
- package/coverage/src/common/boxShadow.module.css.html +0 -184
- package/coverage/src/common/common.module.css.html +0 -1645
- package/coverage/src/common/index.html +0 -116
- package/coverage/src/common/transition.module.css.html +0 -403
- package/coverage/src/semantic/Button/Button.js.html +0 -220
- package/coverage/src/semantic/Button/index.html +0 -131
- package/coverage/src/semantic/Button/props/defaultProps.js.html +0 -121
- package/coverage/src/semantic/Button/props/index.html +0 -131
- package/coverage/src/semantic/Button/props/propTypes.js.html +0 -154
- package/coverage/src/semantic/Button/semanticButton.module.css.html +0 -112
- package/coverage/src/utils/Common.js.html +0 -1267
- package/coverage/src/utils/ContextOptimizer.js.html +0 -196
- package/coverage/src/utils/cssUtils.js.html +0 -118
- package/coverage/src/utils/datetime/GMTZones.js.html +0 -229
- package/coverage/src/utils/datetime/common.js.html +0 -790
- package/coverage/src/utils/datetime/index.html +0 -131
- package/coverage/src/utils/dropDownUtils.js.html +0 -1897
- package/coverage/src/utils/dummyFunction.js.html +0 -88
- package/coverage/src/utils/getInitial.js.html +0 -139
- package/coverage/src/utils/index.html +0 -116
- package/coverage/src/utils/shallowEqual.js.html +0 -181
- package/coverage/src/v1/Switch/Switch.js.html +0 -433
- package/coverage/src/v1/Switch/contants/index.html +0 -116
- package/coverage/src/v1/Switch/contants/index.js.html +0 -166
- package/coverage/src/v1/Switch/css/Switch_v1.module.css.html +0 -439
- package/coverage/src/v1/Switch/css/cssJSLogic.js.html +0 -220
- package/coverage/src/v1/Switch/css/index.html +0 -131
- package/coverage/src/v1/Switch/index.html +0 -131
- package/coverage/src/v1/Switch/props/defaultProps.js.html +0 -115
- package/coverage/src/v1/Switch/props/index.html +0 -131
- package/coverage/src/v1/Switch/props/propTypes.js.html +0 -193
- package/coverage/src/v1/Switch/useSwitch.js.html +0 -154
- package/propValidationArg.json +0 -12
|
@@ -0,0 +1,1398 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@testing-library/react");
|
|
8
|
+
|
|
9
|
+
var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
|
|
10
|
+
|
|
11
|
+
var _IdProvider = require("../../Provider/IdProvider");
|
|
12
|
+
|
|
13
|
+
var _Select = _interopRequireDefault(require("../Select"));
|
|
14
|
+
|
|
15
|
+
require("@testing-library/jest-dom");
|
|
16
|
+
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
18
|
+
|
|
19
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
20
|
+
|
|
21
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
22
|
+
|
|
23
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
24
|
+
|
|
25
|
+
beforeEach(function () {
|
|
26
|
+
(0, _IdProvider.setGlobalId)(0);
|
|
27
|
+
});
|
|
28
|
+
afterEach(function () {
|
|
29
|
+
(0, _react2.cleanup)();
|
|
30
|
+
});
|
|
31
|
+
var selectInputRole = 'Menuitem';
|
|
32
|
+
var dropboxTestId = 'selectComponent_suggestions';
|
|
33
|
+
var listItemRole = 'option';
|
|
34
|
+
var options = [{
|
|
35
|
+
id: '1',
|
|
36
|
+
text: 'Option 1'
|
|
37
|
+
}, {
|
|
38
|
+
id: '2',
|
|
39
|
+
text: 'Option 2'
|
|
40
|
+
}, {
|
|
41
|
+
id: '3',
|
|
42
|
+
text: 'Option 3'
|
|
43
|
+
}];
|
|
44
|
+
var selectOptions = [{
|
|
45
|
+
id: '1',
|
|
46
|
+
text: 'Option 1'
|
|
47
|
+
}, {
|
|
48
|
+
id: '2',
|
|
49
|
+
text: 'Option 2'
|
|
50
|
+
}, {
|
|
51
|
+
id: '3',
|
|
52
|
+
text: 'Option 3'
|
|
53
|
+
}, {
|
|
54
|
+
id: '4',
|
|
55
|
+
text: 'Option 4'
|
|
56
|
+
}, {
|
|
57
|
+
id: '5',
|
|
58
|
+
text: 'Option 5'
|
|
59
|
+
}, {
|
|
60
|
+
id: '6',
|
|
61
|
+
text: 'Option 6'
|
|
62
|
+
}, {
|
|
63
|
+
id: '7',
|
|
64
|
+
text: 'Option 7'
|
|
65
|
+
}, {
|
|
66
|
+
id: '8',
|
|
67
|
+
text: 'Option 8'
|
|
68
|
+
}, {
|
|
69
|
+
id: '9',
|
|
70
|
+
text: 'Option 9'
|
|
71
|
+
}, {
|
|
72
|
+
id: '10',
|
|
73
|
+
text: 'Option 10'
|
|
74
|
+
}];
|
|
75
|
+
describe('Select -', function () {
|
|
76
|
+
test('Should render the Select component', function () {
|
|
77
|
+
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], null)),
|
|
78
|
+
getByRole = _render.getByRole,
|
|
79
|
+
asFragment = _render.asFragment;
|
|
80
|
+
|
|
81
|
+
expect(getByRole(selectInputRole)).toBeInTheDocument();
|
|
82
|
+
expect(asFragment()).toMatchSnapshot();
|
|
83
|
+
});
|
|
84
|
+
test('Should render the placeholder when there is no default value', function () {
|
|
85
|
+
var placeHolder = 'Select Correct Option';
|
|
86
|
+
|
|
87
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
88
|
+
placeHolder: placeHolder,
|
|
89
|
+
isDefaultSelectValue: false,
|
|
90
|
+
options: options
|
|
91
|
+
})),
|
|
92
|
+
getByPlaceholderText = _render2.getByPlaceholderText,
|
|
93
|
+
asFragment = _render2.asFragment;
|
|
94
|
+
|
|
95
|
+
expect(getByPlaceholderText(placeHolder)).toBeInTheDocument();
|
|
96
|
+
expect(asFragment()).toMatchSnapshot();
|
|
97
|
+
});
|
|
98
|
+
test('Should render the default selected value', function () {
|
|
99
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
100
|
+
options: options
|
|
101
|
+
})),
|
|
102
|
+
getByRole = _render3.getByRole,
|
|
103
|
+
asFragment = _render3.asFragment;
|
|
104
|
+
|
|
105
|
+
expect(getByRole(selectInputRole)).toHaveValue('Option 1');
|
|
106
|
+
expect(asFragment()).toMatchSnapshot();
|
|
107
|
+
});
|
|
108
|
+
test('Should render the given selected value', function () {
|
|
109
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
110
|
+
options: options,
|
|
111
|
+
selectedValue: "Option 2"
|
|
112
|
+
})),
|
|
113
|
+
getByRole = _render4.getByRole,
|
|
114
|
+
asFragment = _render4.asFragment;
|
|
115
|
+
|
|
116
|
+
expect(getByRole(selectInputRole)).toHaveValue('Option 2');
|
|
117
|
+
expect(asFragment()).toMatchSnapshot();
|
|
118
|
+
});
|
|
119
|
+
test('Should open the dropdown, when click on the input', function () {
|
|
120
|
+
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], null)),
|
|
121
|
+
getByRole = _render5.getByRole,
|
|
122
|
+
getByTestId = _render5.getByTestId,
|
|
123
|
+
asFragment = _render5.asFragment;
|
|
124
|
+
|
|
125
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
126
|
+
|
|
127
|
+
expect(getByTestId(dropboxTestId)).toBeInTheDocument();
|
|
128
|
+
expect(asFragment()).toMatchSnapshot();
|
|
129
|
+
});
|
|
130
|
+
test('Should open the dropdown, when press down arrow on the input', function () {
|
|
131
|
+
var _render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
132
|
+
options: options
|
|
133
|
+
})),
|
|
134
|
+
getByRole = _render6.getByRole,
|
|
135
|
+
getByTestId = _render6.getByTestId;
|
|
136
|
+
|
|
137
|
+
_react2.fireEvent.keyDown(getByRole(selectInputRole), {
|
|
138
|
+
key: 'ArrowDown',
|
|
139
|
+
keyCode: 40,
|
|
140
|
+
code: 'ArrowDown'
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
expect(getByTestId(dropboxTestId)).toBeInTheDocument();
|
|
144
|
+
});
|
|
145
|
+
test('Should open the dropdown, when isPopupOpenOnEnter is true. If press enter key on the input', function () {
|
|
146
|
+
var _render7 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
147
|
+
isPopupOpenOnEnter: true,
|
|
148
|
+
options: options
|
|
149
|
+
})),
|
|
150
|
+
getByRole = _render7.getByRole,
|
|
151
|
+
getByTestId = _render7.getByTestId;
|
|
152
|
+
|
|
153
|
+
_react2.fireEvent.keyDown(getByRole(selectInputRole), {
|
|
154
|
+
key: 'Enter',
|
|
155
|
+
keyCode: 13,
|
|
156
|
+
code: 'Enter'
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
expect(getByTestId(dropboxTestId)).toBeInTheDocument();
|
|
160
|
+
});
|
|
161
|
+
test('Should open the dropdown, when isPopupOpenOnEnter is true. If press tab key on the input', function () {
|
|
162
|
+
var _render8 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
163
|
+
isPopupOpenOnEnter: true,
|
|
164
|
+
options: options
|
|
165
|
+
})),
|
|
166
|
+
getByRole = _render8.getByRole,
|
|
167
|
+
getByTestId = _render8.getByTestId;
|
|
168
|
+
|
|
169
|
+
_react2.fireEvent.keyDown(getByRole(selectInputRole), {
|
|
170
|
+
key: 'Tab',
|
|
171
|
+
keyCode: 9,
|
|
172
|
+
code: 'Tab'
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
expect(getByTestId(dropboxTestId)).toBeInTheDocument();
|
|
176
|
+
});
|
|
177
|
+
test('Should show the empty message when open the dropdown with no options', function () {
|
|
178
|
+
var emptyMessage = 'No Options Available';
|
|
179
|
+
|
|
180
|
+
var _render9 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
181
|
+
emptyMessage: emptyMessage
|
|
182
|
+
})),
|
|
183
|
+
getByRole = _render9.getByRole,
|
|
184
|
+
queryByRole = _render9.queryByRole,
|
|
185
|
+
getByText = _render9.getByText,
|
|
186
|
+
asFragment = _render9.asFragment;
|
|
187
|
+
|
|
188
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
189
|
+
|
|
190
|
+
expect(queryByRole(listItemRole)).not.toBeInTheDocument();
|
|
191
|
+
expect(getByText(emptyMessage)).toBeInTheDocument();
|
|
192
|
+
expect(asFragment()).toMatchSnapshot();
|
|
193
|
+
});
|
|
194
|
+
test('Should render given the options', function () {
|
|
195
|
+
var _render10 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
196
|
+
options: options
|
|
197
|
+
})),
|
|
198
|
+
getByRole = _render10.getByRole,
|
|
199
|
+
getAllByRole = _render10.getAllByRole,
|
|
200
|
+
asFragment = _render10.asFragment;
|
|
201
|
+
|
|
202
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
203
|
+
|
|
204
|
+
expect(getAllByRole(listItemRole)).toHaveLength(3);
|
|
205
|
+
expect(getAllByRole(listItemRole)[0]).toHaveTextContent('Option 1');
|
|
206
|
+
expect(getAllByRole(listItemRole)[1]).toHaveTextContent('Option 2');
|
|
207
|
+
expect(getAllByRole(listItemRole)[2]).toHaveTextContent('Option 3');
|
|
208
|
+
expect(asFragment()).toMatchSnapshot();
|
|
209
|
+
});
|
|
210
|
+
test('Should trigger the onChange event when select an option', function () {
|
|
211
|
+
var mockOnChange = jest.fn();
|
|
212
|
+
|
|
213
|
+
var _render11 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
214
|
+
options: options,
|
|
215
|
+
onChange: mockOnChange
|
|
216
|
+
})),
|
|
217
|
+
getByRole = _render11.getByRole,
|
|
218
|
+
getAllByRole = _render11.getAllByRole;
|
|
219
|
+
|
|
220
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
221
|
+
|
|
222
|
+
_userEvent["default"].click(getAllByRole(listItemRole)[1]);
|
|
223
|
+
|
|
224
|
+
expect(mockOnChange).toHaveBeenCalledWith('2', {
|
|
225
|
+
groupId: '',
|
|
226
|
+
id: '2',
|
|
227
|
+
text: 'Option 2'
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
test('Should update the value when select the option', function () {
|
|
231
|
+
var _render12 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
232
|
+
options: options
|
|
233
|
+
})),
|
|
234
|
+
getByRole = _render12.getByRole,
|
|
235
|
+
getAllByRole = _render12.getAllByRole,
|
|
236
|
+
rerender = _render12.rerender,
|
|
237
|
+
asFragment = _render12.asFragment;
|
|
238
|
+
|
|
239
|
+
var inputElement = getByRole(selectInputRole);
|
|
240
|
+
expect(inputElement).toHaveValue('Option 1');
|
|
241
|
+
|
|
242
|
+
_userEvent["default"].click(inputElement);
|
|
243
|
+
|
|
244
|
+
expect(asFragment()).toMatchSnapshot();
|
|
245
|
+
|
|
246
|
+
_userEvent["default"].click(getAllByRole(listItemRole)[1]);
|
|
247
|
+
|
|
248
|
+
rerender( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
249
|
+
options: options,
|
|
250
|
+
selectedValue: "Option 2"
|
|
251
|
+
}));
|
|
252
|
+
expect(asFragment()).toMatchSnapshot();
|
|
253
|
+
expect(inputElement).toHaveValue('Option 2');
|
|
254
|
+
});
|
|
255
|
+
test('Should focus the search input, when open the dropdown', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
256
|
+
var _render13, getByRole, getByTestId;
|
|
257
|
+
|
|
258
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
259
|
+
while (1) {
|
|
260
|
+
switch (_context.prev = _context.next) {
|
|
261
|
+
case 0:
|
|
262
|
+
_render13 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
263
|
+
needSearch: true,
|
|
264
|
+
options: options
|
|
265
|
+
})), getByRole = _render13.getByRole, getByTestId = _render13.getByTestId;
|
|
266
|
+
|
|
267
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
268
|
+
|
|
269
|
+
_context.next = 4;
|
|
270
|
+
return (0, _react2.waitFor)(function () {
|
|
271
|
+
expect((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox')).toHaveFocus();
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
case 4:
|
|
275
|
+
case "end":
|
|
276
|
+
return _context.stop();
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}, _callee);
|
|
280
|
+
})));
|
|
281
|
+
test('Should render the only options matching search value', function () {
|
|
282
|
+
var _render14 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
283
|
+
needSearch: true,
|
|
284
|
+
options: options
|
|
285
|
+
})),
|
|
286
|
+
getByRole = _render14.getByRole,
|
|
287
|
+
getAllByRole = _render14.getAllByRole,
|
|
288
|
+
asFragment = _render14.asFragment,
|
|
289
|
+
getByTestId = _render14.getByTestId;
|
|
290
|
+
|
|
291
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
292
|
+
|
|
293
|
+
_userEvent["default"].type((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox'), '2');
|
|
294
|
+
|
|
295
|
+
expect(getAllByRole(listItemRole)).toHaveLength(1);
|
|
296
|
+
expect(asFragment()).toMatchSnapshot();
|
|
297
|
+
});
|
|
298
|
+
test('Should render the only options matching search value even with additional spaces before and after', function () {
|
|
299
|
+
var _render15 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
300
|
+
needSearch: true,
|
|
301
|
+
options: options
|
|
302
|
+
})),
|
|
303
|
+
getByRole = _render15.getByRole,
|
|
304
|
+
getAllByRole = _render15.getAllByRole,
|
|
305
|
+
asFragment = _render15.asFragment,
|
|
306
|
+
getByTestId = _render15.getByTestId;
|
|
307
|
+
|
|
308
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
309
|
+
|
|
310
|
+
_userEvent["default"].type((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox'), ' 2 ');
|
|
311
|
+
|
|
312
|
+
expect(getAllByRole(listItemRole)).toHaveLength(1);
|
|
313
|
+
expect(asFragment()).toMatchSnapshot();
|
|
314
|
+
});
|
|
315
|
+
test('Should trigger given onSearch, when type on the search input', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
316
|
+
var mockOnSearch, _render16, getByRole, getByTestId;
|
|
317
|
+
|
|
318
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
319
|
+
while (1) {
|
|
320
|
+
switch (_context2.prev = _context2.next) {
|
|
321
|
+
case 0:
|
|
322
|
+
mockOnSearch = jest.fn();
|
|
323
|
+
_render16 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
324
|
+
needSearch: true,
|
|
325
|
+
options: options,
|
|
326
|
+
onSearch: mockOnSearch
|
|
327
|
+
})), getByRole = _render16.getByRole, getByTestId = _render16.getByTestId;
|
|
328
|
+
|
|
329
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
330
|
+
|
|
331
|
+
_userEvent["default"].type((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox'), '2');
|
|
332
|
+
|
|
333
|
+
_context2.next = 6;
|
|
334
|
+
return (0, _react2.waitFor)(function () {
|
|
335
|
+
expect(mockOnSearch).toHaveBeenCalledWith('2');
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
case 6:
|
|
339
|
+
case "end":
|
|
340
|
+
return _context2.stop();
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}, _callee2);
|
|
344
|
+
})));
|
|
345
|
+
test('Should render all the options when search value is cleared', function () {
|
|
346
|
+
var _render17 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
347
|
+
needSearch: true,
|
|
348
|
+
options: options
|
|
349
|
+
})),
|
|
350
|
+
getByRole = _render17.getByRole,
|
|
351
|
+
getAllByRole = _render17.getAllByRole,
|
|
352
|
+
asFragment = _render17.asFragment,
|
|
353
|
+
getByTestId = _render17.getByTestId;
|
|
354
|
+
|
|
355
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
356
|
+
|
|
357
|
+
var searchInput = (0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox');
|
|
358
|
+
|
|
359
|
+
_userEvent["default"].type(searchInput, 'option 2');
|
|
360
|
+
|
|
361
|
+
expect(getAllByRole(listItemRole)).toHaveLength(1);
|
|
362
|
+
|
|
363
|
+
_userEvent["default"].click((0, _react2.within)(getByTestId('CardHeader')).getByRole('button'));
|
|
364
|
+
|
|
365
|
+
expect(getAllByRole(listItemRole)).toHaveLength(3);
|
|
366
|
+
expect(searchInput).toHaveValue('');
|
|
367
|
+
expect(searchInput).toHaveFocus();
|
|
368
|
+
expect(asFragment()).toMatchSnapshot();
|
|
369
|
+
});
|
|
370
|
+
test('Should not open the dropdown when disabled', function () {
|
|
371
|
+
var _render18 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
372
|
+
options: options,
|
|
373
|
+
isDisabled: true
|
|
374
|
+
})),
|
|
375
|
+
getByRole = _render18.getByRole,
|
|
376
|
+
queryByTestId = _render18.queryByTestId,
|
|
377
|
+
asFragment = _render18.asFragment;
|
|
378
|
+
|
|
379
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
380
|
+
|
|
381
|
+
expect(queryByTestId(dropboxTestId)).not.toBeInTheDocument();
|
|
382
|
+
expect(asFragment()).toMatchSnapshot();
|
|
383
|
+
});
|
|
384
|
+
test('Should not open the dropdown when readonly', function () {
|
|
385
|
+
var _render19 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
386
|
+
options: options,
|
|
387
|
+
isReadOnly: true
|
|
388
|
+
})),
|
|
389
|
+
getByRole = _render19.getByRole,
|
|
390
|
+
queryByTestId = _render19.queryByTestId,
|
|
391
|
+
asFragment = _render19.asFragment;
|
|
392
|
+
|
|
393
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
394
|
+
|
|
395
|
+
expect(queryByTestId(dropboxTestId)).not.toBeInTheDocument();
|
|
396
|
+
expect(asFragment()).toMatchSnapshot();
|
|
397
|
+
});
|
|
398
|
+
test('Should close the dropdown when clicking outside', function () {
|
|
399
|
+
var _render20 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
400
|
+
options: options
|
|
401
|
+
})),
|
|
402
|
+
getByRole = _render20.getByRole,
|
|
403
|
+
queryByTestId = _render20.queryByTestId,
|
|
404
|
+
asFragment = _render20.asFragment;
|
|
405
|
+
|
|
406
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
407
|
+
|
|
408
|
+
expect(queryByTestId(dropboxTestId)).toBeInTheDocument();
|
|
409
|
+
|
|
410
|
+
_userEvent["default"].click(document.body);
|
|
411
|
+
|
|
412
|
+
expect(queryByTestId(dropboxTestId)).not.toBeInTheDocument();
|
|
413
|
+
expect(asFragment()).toMatchSnapshot();
|
|
414
|
+
});
|
|
415
|
+
test('Should show the custom empty state using getCustomEmptyState prop, when there is no matching options search value', function () {
|
|
416
|
+
var emptyMessage = 'Custom Empty State';
|
|
417
|
+
var getCustomEmptyState = jest.fn(function () {
|
|
418
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, emptyMessage);
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
var _render21 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
422
|
+
needSearch: true,
|
|
423
|
+
options: options,
|
|
424
|
+
getCustomEmptyState: getCustomEmptyState
|
|
425
|
+
})),
|
|
426
|
+
getByText = _render21.getByText,
|
|
427
|
+
getByRole = _render21.getByRole,
|
|
428
|
+
asFragment = _render21.asFragment,
|
|
429
|
+
getByTestId = _render21.getByTestId;
|
|
430
|
+
|
|
431
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
432
|
+
|
|
433
|
+
_userEvent["default"].type((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox'), '5');
|
|
434
|
+
|
|
435
|
+
expect(getByText(emptyMessage)).toBeInTheDocument();
|
|
436
|
+
expect(asFragment()).toMatchSnapshot();
|
|
437
|
+
});
|
|
438
|
+
test('Should call the onKeyDown function, when press any key in the input element', function () {
|
|
439
|
+
var mockKeyDown = jest.fn();
|
|
440
|
+
|
|
441
|
+
var _render22 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
442
|
+
onKeyDown: mockKeyDown
|
|
443
|
+
})),
|
|
444
|
+
getByRole = _render22.getByRole;
|
|
445
|
+
|
|
446
|
+
_react2.fireEvent.keyDown(getByRole(selectInputRole), {
|
|
447
|
+
key: 'a',
|
|
448
|
+
code: 'KeyA'
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
expect(mockKeyDown).toHaveBeenCalled();
|
|
452
|
+
});
|
|
453
|
+
test('Should highlight the next list-items, when arrow keys pressed', function () {
|
|
454
|
+
var _render23 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
455
|
+
options: options
|
|
456
|
+
})),
|
|
457
|
+
getByRole = _render23.getByRole,
|
|
458
|
+
getAllByRole = _render23.getAllByRole,
|
|
459
|
+
asFragment = _render23.asFragment;
|
|
460
|
+
|
|
461
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
462
|
+
|
|
463
|
+
var listItems = getAllByRole(listItemRole);
|
|
464
|
+
expect(listItems[0]).toHaveAttribute("data-a11y-list-active", "true");
|
|
465
|
+
|
|
466
|
+
_userEvent["default"].keyboard('{arrowdown}');
|
|
467
|
+
|
|
468
|
+
expect(listItems[0]).toHaveAttribute("data-a11y-list-active", "false");
|
|
469
|
+
expect(listItems[1]).toHaveAttribute("data-a11y-list-active", "true");
|
|
470
|
+
|
|
471
|
+
_userEvent["default"].keyboard('{arrowdown}');
|
|
472
|
+
|
|
473
|
+
expect(listItems[1]).toHaveAttribute("data-a11y-list-active", "false");
|
|
474
|
+
expect(listItems[2]).toHaveAttribute("data-a11y-list-active", "true");
|
|
475
|
+
|
|
476
|
+
_userEvent["default"].keyboard('{arrowdown}');
|
|
477
|
+
|
|
478
|
+
expect(listItems[2]).toHaveAttribute("data-a11y-list-active", "true");
|
|
479
|
+
|
|
480
|
+
_userEvent["default"].keyboard('{arrowup}');
|
|
481
|
+
|
|
482
|
+
expect(listItems[2]).toHaveAttribute("data-a11y-list-active", "false");
|
|
483
|
+
expect(listItems[1]).toHaveAttribute("data-a11y-list-active", "true");
|
|
484
|
+
expect(asFragment()).toMatchSnapshot();
|
|
485
|
+
|
|
486
|
+
_userEvent["default"].keyboard('{arrowup}');
|
|
487
|
+
|
|
488
|
+
expect(listItems[1]).toHaveAttribute("data-a11y-list-active", "false");
|
|
489
|
+
expect(listItems[0]).toHaveAttribute("data-a11y-list-active", "true");
|
|
490
|
+
|
|
491
|
+
_userEvent["default"].keyboard('{arrowup}');
|
|
492
|
+
|
|
493
|
+
expect(listItems[0]).toHaveAttribute("data-a11y-list-active", "true");
|
|
494
|
+
});
|
|
495
|
+
test('Should update the value, when select the option using keyboard', function () {
|
|
496
|
+
var mockOnChange = jest.fn();
|
|
497
|
+
|
|
498
|
+
var _render24 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
499
|
+
options: options,
|
|
500
|
+
onChange: mockOnChange
|
|
501
|
+
})),
|
|
502
|
+
getByRole = _render24.getByRole,
|
|
503
|
+
asFragment = _render24.asFragment;
|
|
504
|
+
|
|
505
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
506
|
+
|
|
507
|
+
_userEvent["default"].keyboard('{arrowdown}');
|
|
508
|
+
|
|
509
|
+
_userEvent["default"].keyboard('{enter}');
|
|
510
|
+
|
|
511
|
+
expect(mockOnChange).toHaveBeenCalledWith('2', {
|
|
512
|
+
groupId: '',
|
|
513
|
+
id: '2',
|
|
514
|
+
text: 'Option 2'
|
|
515
|
+
});
|
|
516
|
+
expect(asFragment()).toMatchSnapshot();
|
|
517
|
+
});
|
|
518
|
+
test('Should close the dropdown and focus the select input, when press escape key', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
519
|
+
var _render25, getByRole, getByTestId, queryByTestId;
|
|
520
|
+
|
|
521
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
522
|
+
while (1) {
|
|
523
|
+
switch (_context3.prev = _context3.next) {
|
|
524
|
+
case 0:
|
|
525
|
+
_render25 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
526
|
+
needSearch: true,
|
|
527
|
+
options: options
|
|
528
|
+
})), getByRole = _render25.getByRole, getByTestId = _render25.getByTestId, queryByTestId = _render25.queryByTestId;
|
|
529
|
+
|
|
530
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
531
|
+
|
|
532
|
+
expect(queryByTestId(dropboxTestId)).toBeInTheDocument();
|
|
533
|
+
_context3.next = 5;
|
|
534
|
+
return (0, _react2.waitFor)(function () {
|
|
535
|
+
expect((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox')).toHaveFocus();
|
|
536
|
+
});
|
|
537
|
+
|
|
538
|
+
case 5:
|
|
539
|
+
_userEvent["default"].keyboard('{escape}');
|
|
540
|
+
|
|
541
|
+
_context3.next = 8;
|
|
542
|
+
return (0, _react2.waitFor)(function () {
|
|
543
|
+
expect(queryByTestId(dropboxTestId)).not.toBeInTheDocument();
|
|
544
|
+
expect(getByRole(selectInputRole)).toHaveFocus();
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
case 8:
|
|
548
|
+
case "end":
|
|
549
|
+
return _context3.stop();
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}, _callee3);
|
|
553
|
+
})));
|
|
554
|
+
test('Should close the dropdown and trigger the onchange, when press tab key', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
555
|
+
var mockOnChange, _render26, getByRole, getByTestId, queryByTestId;
|
|
556
|
+
|
|
557
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
558
|
+
while (1) {
|
|
559
|
+
switch (_context4.prev = _context4.next) {
|
|
560
|
+
case 0:
|
|
561
|
+
mockOnChange = jest.fn();
|
|
562
|
+
_render26 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
563
|
+
needSearch: true,
|
|
564
|
+
options: options,
|
|
565
|
+
onChange: mockOnChange
|
|
566
|
+
})), getByRole = _render26.getByRole, getByTestId = _render26.getByTestId, queryByTestId = _render26.queryByTestId;
|
|
567
|
+
|
|
568
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
569
|
+
|
|
570
|
+
_context4.next = 5;
|
|
571
|
+
return (0, _react2.waitFor)(function () {
|
|
572
|
+
expect((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox')).toHaveFocus();
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
case 5:
|
|
576
|
+
_react2.fireEvent.keyDown((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox'), {
|
|
577
|
+
key: 'ArrowDown',
|
|
578
|
+
code: 'ArrowDown',
|
|
579
|
+
keyCode: 40
|
|
580
|
+
});
|
|
581
|
+
|
|
582
|
+
_react2.fireEvent.keyDown((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox'), {
|
|
583
|
+
key: 'Tab',
|
|
584
|
+
code: 'Tab',
|
|
585
|
+
keyCode: 9
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
_context4.next = 9;
|
|
589
|
+
return (0, _react2.waitFor)(function () {
|
|
590
|
+
expect(mockOnChange).toHaveBeenCalledWith('2', {
|
|
591
|
+
groupId: '',
|
|
592
|
+
id: '2',
|
|
593
|
+
text: 'Option 2'
|
|
594
|
+
});
|
|
595
|
+
expect(queryByTestId(dropboxTestId)).not.toBeInTheDocument();
|
|
596
|
+
expect(getByRole(selectInputRole)).toHaveFocus();
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
case 9:
|
|
600
|
+
case "end":
|
|
601
|
+
return _context4.stop();
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}, _callee4);
|
|
605
|
+
})));
|
|
606
|
+
test('Should trigger getNextOptions, when scroll to the end of the dropbox list and isNextOptions is true', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
607
|
+
var mockGetNextOptions, _render27, getByRole, getByTestId, asFragment, cardContent;
|
|
608
|
+
|
|
609
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
610
|
+
while (1) {
|
|
611
|
+
switch (_context5.prev = _context5.next) {
|
|
612
|
+
case 0:
|
|
613
|
+
mockGetNextOptions = jest.fn(function () {
|
|
614
|
+
return new Promise(function (resolve) {
|
|
615
|
+
setTimeout(function () {
|
|
616
|
+
resolve();
|
|
617
|
+
}, 2000);
|
|
618
|
+
});
|
|
619
|
+
});
|
|
620
|
+
_render27 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
621
|
+
options: selectOptions,
|
|
622
|
+
isNextOptions: true,
|
|
623
|
+
getNextOptions: mockGetNextOptions
|
|
624
|
+
})), getByRole = _render27.getByRole, getByTestId = _render27.getByTestId, asFragment = _render27.asFragment;
|
|
625
|
+
|
|
626
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
627
|
+
|
|
628
|
+
cardContent = (0, _react2.within)(getByTestId(dropboxTestId)).getByTestId('CardContent');
|
|
629
|
+
Object.defineProperty(cardContent, 'scrollHeight', {
|
|
630
|
+
value: 1000,
|
|
631
|
+
writable: true
|
|
632
|
+
});
|
|
633
|
+
Object.defineProperty(cardContent, 'clientHeight', {
|
|
634
|
+
value: 800,
|
|
635
|
+
writable: true
|
|
636
|
+
});
|
|
637
|
+
Object.defineProperty(cardContent, 'offsetHeight', {
|
|
638
|
+
value: 800,
|
|
639
|
+
writable: true
|
|
640
|
+
});
|
|
641
|
+
|
|
642
|
+
_react2.fireEvent.scroll(cardContent, {
|
|
643
|
+
target: {
|
|
644
|
+
scrollTop: 201
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
_context5.next = 10;
|
|
649
|
+
return (0, _react2.waitFor)(function () {
|
|
650
|
+
var loader = (0, _react2.within)(getByTestId(dropboxTestId)).queryByTestId('loader');
|
|
651
|
+
expect(loader).toBeInTheDocument();
|
|
652
|
+
expect(asFragment()).toMatchSnapshot();
|
|
653
|
+
expect(mockGetNextOptions).toHaveBeenCalledWith('');
|
|
654
|
+
});
|
|
655
|
+
|
|
656
|
+
case 10:
|
|
657
|
+
_context5.next = 12;
|
|
658
|
+
return (0, _react2.waitFor)(function () {
|
|
659
|
+
var loader = (0, _react2.within)(getByTestId(dropboxTestId)).queryByTestId('loader');
|
|
660
|
+
expect(loader).not.toBeInTheDocument();
|
|
661
|
+
}, {
|
|
662
|
+
timeout: 2500
|
|
663
|
+
});
|
|
664
|
+
|
|
665
|
+
case 12:
|
|
666
|
+
case "end":
|
|
667
|
+
return _context5.stop();
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}, _callee5);
|
|
671
|
+
})));
|
|
672
|
+
test('Should trigger getNextOptions, when search with needLocalSearch is false', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
673
|
+
var mockGetNextOptions, _render28, getByRole, getByTestId, asFragment, loader;
|
|
674
|
+
|
|
675
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
676
|
+
while (1) {
|
|
677
|
+
switch (_context6.prev = _context6.next) {
|
|
678
|
+
case 0:
|
|
679
|
+
mockGetNextOptions = jest.fn(function () {
|
|
680
|
+
return new Promise(function (resolve, reject) {
|
|
681
|
+
setTimeout(function () {
|
|
682
|
+
reject();
|
|
683
|
+
}, 2000);
|
|
684
|
+
});
|
|
685
|
+
});
|
|
686
|
+
_render28 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
687
|
+
needSearch: true,
|
|
688
|
+
needLocalSearch: false,
|
|
689
|
+
options: options,
|
|
690
|
+
isNextOptions: true,
|
|
691
|
+
getNextOptions: mockGetNextOptions
|
|
692
|
+
})), getByRole = _render28.getByRole, getByTestId = _render28.getByTestId, asFragment = _render28.asFragment;
|
|
693
|
+
|
|
694
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
695
|
+
|
|
696
|
+
_userEvent["default"].type((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox'), 'a');
|
|
697
|
+
|
|
698
|
+
loader = (0, _react2.within)(getByTestId(dropboxTestId)).queryByTestId('loader');
|
|
699
|
+
_context6.next = 7;
|
|
700
|
+
return (0, _react2.waitFor)(function () {
|
|
701
|
+
expect(loader).toBeInTheDocument();
|
|
702
|
+
expect(asFragment()).toMatchSnapshot();
|
|
703
|
+
expect(mockGetNextOptions).toHaveBeenCalledWith('');
|
|
704
|
+
});
|
|
705
|
+
|
|
706
|
+
case 7:
|
|
707
|
+
_context6.next = 9;
|
|
708
|
+
return (0, _react2.waitFor)(function () {
|
|
709
|
+
expect(loader).not.toBeInTheDocument();
|
|
710
|
+
}, {
|
|
711
|
+
timeout: 2500
|
|
712
|
+
});
|
|
713
|
+
|
|
714
|
+
case 9:
|
|
715
|
+
case "end":
|
|
716
|
+
return _context6.stop();
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}, _callee6);
|
|
720
|
+
})));
|
|
721
|
+
test('Should trigger onChange, when type on select input with autoSelectOnType is true', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
722
|
+
var mockOnChange, optionsList, _render29, getByRole;
|
|
723
|
+
|
|
724
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
725
|
+
while (1) {
|
|
726
|
+
switch (_context7.prev = _context7.next) {
|
|
727
|
+
case 0:
|
|
728
|
+
mockOnChange = jest.fn();
|
|
729
|
+
optionsList = [{
|
|
730
|
+
id: '1',
|
|
731
|
+
text: 'Madurai'
|
|
732
|
+
}, {
|
|
733
|
+
id: '2',
|
|
734
|
+
text: 'Chennai'
|
|
735
|
+
}, {
|
|
736
|
+
id: '3',
|
|
737
|
+
text: 'Coimbatore'
|
|
738
|
+
}, {
|
|
739
|
+
id: '4',
|
|
740
|
+
text: 'Trichy'
|
|
741
|
+
}];
|
|
742
|
+
_render29 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
743
|
+
options: optionsList,
|
|
744
|
+
autoSelectOnType: true,
|
|
745
|
+
onChange: mockOnChange
|
|
746
|
+
})), getByRole = _render29.getByRole;
|
|
747
|
+
|
|
748
|
+
_react2.fireEvent.keyPress(getByRole(selectInputRole), {
|
|
749
|
+
key: 'c',
|
|
750
|
+
code: 'KeyC',
|
|
751
|
+
keyCode: 67,
|
|
752
|
+
charCode: 67
|
|
753
|
+
});
|
|
754
|
+
|
|
755
|
+
_context7.next = 6;
|
|
756
|
+
return (0, _react2.waitFor)(function () {
|
|
757
|
+
expect(mockOnChange).toHaveBeenCalledWith('2', {
|
|
758
|
+
groupId: '',
|
|
759
|
+
id: '2',
|
|
760
|
+
text: 'Chennai'
|
|
761
|
+
});
|
|
762
|
+
});
|
|
763
|
+
|
|
764
|
+
case 6:
|
|
765
|
+
_react2.fireEvent.keyPress(getByRole(selectInputRole), {
|
|
766
|
+
key: 'c',
|
|
767
|
+
code: 'KeyC',
|
|
768
|
+
keyCode: 67,
|
|
769
|
+
charCode: 67
|
|
770
|
+
});
|
|
771
|
+
|
|
772
|
+
_context7.next = 9;
|
|
773
|
+
return (0, _react2.waitFor)(function () {
|
|
774
|
+
expect(mockOnChange).toHaveBeenCalledWith('3', {
|
|
775
|
+
groupId: '',
|
|
776
|
+
id: '3',
|
|
777
|
+
text: 'Coimbatore'
|
|
778
|
+
});
|
|
779
|
+
});
|
|
780
|
+
|
|
781
|
+
case 9:
|
|
782
|
+
_react2.fireEvent.keyPress(getByRole(selectInputRole), {
|
|
783
|
+
key: 'c',
|
|
784
|
+
code: 'KeyC',
|
|
785
|
+
keyCode: 67,
|
|
786
|
+
charCode: 67
|
|
787
|
+
});
|
|
788
|
+
|
|
789
|
+
_context7.next = 12;
|
|
790
|
+
return (0, _react2.waitFor)(function () {
|
|
791
|
+
expect(mockOnChange).toHaveBeenCalledWith('2', {
|
|
792
|
+
groupId: '',
|
|
793
|
+
id: '2',
|
|
794
|
+
text: 'Chennai'
|
|
795
|
+
});
|
|
796
|
+
});
|
|
797
|
+
|
|
798
|
+
case 12:
|
|
799
|
+
case "end":
|
|
800
|
+
return _context7.stop();
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
}, _callee7);
|
|
804
|
+
})));
|
|
805
|
+
test('Should trigger onAddNewOption, when click on the custom search empty state button', function () {
|
|
806
|
+
var addMessage = 'Add New Option';
|
|
807
|
+
var getCustomEmptyState = jest.fn(function (_ref8) {
|
|
808
|
+
var searchString = _ref8.searchString,
|
|
809
|
+
onAddNewOption = _ref8.onAddNewOption;
|
|
810
|
+
return /*#__PURE__*/_react["default"].createElement("button", {
|
|
811
|
+
onClick: onAddNewOption
|
|
812
|
+
}, addMessage);
|
|
813
|
+
});
|
|
814
|
+
var mockOnAddNewOption = jest.fn();
|
|
815
|
+
|
|
816
|
+
var _render30 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
817
|
+
needSearch: true,
|
|
818
|
+
options: options,
|
|
819
|
+
onAddNewOption: mockOnAddNewOption,
|
|
820
|
+
getCustomEmptyState: getCustomEmptyState
|
|
821
|
+
})),
|
|
822
|
+
getByRole = _render30.getByRole,
|
|
823
|
+
getByTestId = _render30.getByTestId,
|
|
824
|
+
asFragment = _render30.asFragment;
|
|
825
|
+
|
|
826
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
827
|
+
|
|
828
|
+
_userEvent["default"].type((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox'), '5');
|
|
829
|
+
|
|
830
|
+
expect(getCustomEmptyState).toHaveBeenCalledWith({
|
|
831
|
+
searchString: '5',
|
|
832
|
+
onAddNewOption: expect.any(Function)
|
|
833
|
+
});
|
|
834
|
+
expect(getByRole('button', {
|
|
835
|
+
name: addMessage
|
|
836
|
+
})).toBeInTheDocument();
|
|
837
|
+
expect(asFragment()).toMatchSnapshot();
|
|
838
|
+
|
|
839
|
+
_userEvent["default"].click(getByRole('button', {
|
|
840
|
+
name: addMessage
|
|
841
|
+
}));
|
|
842
|
+
|
|
843
|
+
expect(mockOnAddNewOption).toHaveBeenCalledWith('5');
|
|
844
|
+
}); // Yellow coverage
|
|
845
|
+
|
|
846
|
+
test('Should trigger the onDropBoxOpen, when open the select', function () {
|
|
847
|
+
var mockOnDropBoxOpen = jest.fn();
|
|
848
|
+
|
|
849
|
+
var _render31 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
850
|
+
options: options,
|
|
851
|
+
onDropBoxOpen: mockOnDropBoxOpen
|
|
852
|
+
})),
|
|
853
|
+
getByRole = _render31.getByRole;
|
|
854
|
+
|
|
855
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
856
|
+
|
|
857
|
+
expect(mockOnDropBoxOpen).toHaveBeenCalledWith('');
|
|
858
|
+
});
|
|
859
|
+
test('Should trigger the onDropBoxClose, when close the select', function () {
|
|
860
|
+
var mockOnDropBoxClose = jest.fn();
|
|
861
|
+
|
|
862
|
+
var _render32 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
863
|
+
options: options,
|
|
864
|
+
onDropBoxClose: mockOnDropBoxClose
|
|
865
|
+
})),
|
|
866
|
+
getByRole = _render32.getByRole;
|
|
867
|
+
|
|
868
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
869
|
+
|
|
870
|
+
_userEvent["default"].click(document.body);
|
|
871
|
+
|
|
872
|
+
expect(mockOnDropBoxClose).toHaveBeenCalledWith();
|
|
873
|
+
});
|
|
874
|
+
test('Should trigger the onSearch with empty string, when close the select and isSearchClearOnClose is true', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
875
|
+
var mockOnSearch, _render33, getByRole, getByTestId;
|
|
876
|
+
|
|
877
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
878
|
+
while (1) {
|
|
879
|
+
switch (_context8.prev = _context8.next) {
|
|
880
|
+
case 0:
|
|
881
|
+
mockOnSearch = jest.fn();
|
|
882
|
+
_render33 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
883
|
+
needSearch: true,
|
|
884
|
+
isSearchClearOnClose: true,
|
|
885
|
+
options: options,
|
|
886
|
+
onSearch: mockOnSearch
|
|
887
|
+
})), getByRole = _render33.getByRole, getByTestId = _render33.getByTestId;
|
|
888
|
+
|
|
889
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
890
|
+
|
|
891
|
+
_userEvent["default"].type((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox'), '2');
|
|
892
|
+
|
|
893
|
+
_context8.next = 6;
|
|
894
|
+
return (0, _react2.waitFor)(function () {
|
|
895
|
+
expect(mockOnSearch).toHaveBeenCalledWith('2');
|
|
896
|
+
});
|
|
897
|
+
|
|
898
|
+
case 6:
|
|
899
|
+
_userEvent["default"].click(document.body);
|
|
900
|
+
|
|
901
|
+
_context8.next = 9;
|
|
902
|
+
return (0, _react2.waitFor)(function () {
|
|
903
|
+
expect(mockOnSearch).toHaveBeenCalledWith('');
|
|
904
|
+
});
|
|
905
|
+
|
|
906
|
+
case 9:
|
|
907
|
+
case "end":
|
|
908
|
+
return _context8.stop();
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
}, _callee8);
|
|
912
|
+
})));
|
|
913
|
+
test('Should trigger the onSearch with search string, when close the select and isSearchClearOnClose is false', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
914
|
+
var mockOnSearch, _render34, getByRole, getByTestId;
|
|
915
|
+
|
|
916
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
917
|
+
while (1) {
|
|
918
|
+
switch (_context9.prev = _context9.next) {
|
|
919
|
+
case 0:
|
|
920
|
+
mockOnSearch = jest.fn();
|
|
921
|
+
_render34 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
922
|
+
needSearch: true,
|
|
923
|
+
isSearchClearOnClose: false,
|
|
924
|
+
options: options,
|
|
925
|
+
onSearch: mockOnSearch
|
|
926
|
+
})), getByRole = _render34.getByRole, getByTestId = _render34.getByTestId;
|
|
927
|
+
|
|
928
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
929
|
+
|
|
930
|
+
_userEvent["default"].type((0, _react2.within)(getByTestId(dropboxTestId)).getByRole('textbox'), '2');
|
|
931
|
+
|
|
932
|
+
_context9.next = 6;
|
|
933
|
+
return (0, _react2.waitFor)(function () {
|
|
934
|
+
expect(mockOnSearch).toHaveBeenCalledWith('2');
|
|
935
|
+
});
|
|
936
|
+
|
|
937
|
+
case 6:
|
|
938
|
+
_userEvent["default"].click(document.body);
|
|
939
|
+
|
|
940
|
+
_context9.next = 9;
|
|
941
|
+
return (0, _react2.waitFor)(function () {
|
|
942
|
+
expect(mockOnSearch).toHaveBeenCalledWith('2');
|
|
943
|
+
});
|
|
944
|
+
|
|
945
|
+
case 9:
|
|
946
|
+
case "end":
|
|
947
|
+
return _context9.stop();
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
}, _callee9);
|
|
951
|
+
})));
|
|
952
|
+
test('Should trigger the getPopupHandlers with popup handlers, when select is mounted', function () {
|
|
953
|
+
var mockGetPopupHandlers = jest.fn();
|
|
954
|
+
(0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
955
|
+
options: options,
|
|
956
|
+
getPopupHandlers: mockGetPopupHandlers
|
|
957
|
+
}));
|
|
958
|
+
expect(mockGetPopupHandlers).toHaveBeenCalledWith({
|
|
959
|
+
removeClose: expect.any(Function),
|
|
960
|
+
openPopup: expect.any(Function),
|
|
961
|
+
closePopup: expect.any(Function),
|
|
962
|
+
togglePopup: expect.any(Function)
|
|
963
|
+
});
|
|
964
|
+
});
|
|
965
|
+
test('Should trigger the getPopupHandlers with null, when select is unmounted', function () {
|
|
966
|
+
var mockGetPopupHandlers = jest.fn();
|
|
967
|
+
|
|
968
|
+
var _render35 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
969
|
+
options: options,
|
|
970
|
+
getPopupHandlers: mockGetPopupHandlers
|
|
971
|
+
})),
|
|
972
|
+
unmount = _render35.unmount;
|
|
973
|
+
|
|
974
|
+
unmount();
|
|
975
|
+
expect(mockGetPopupHandlers).toHaveBeenCalledWith({
|
|
976
|
+
removeClose: null,
|
|
977
|
+
openPopup: null,
|
|
978
|
+
closePopup: null,
|
|
979
|
+
togglePopup: null
|
|
980
|
+
});
|
|
981
|
+
});
|
|
982
|
+
test('Should trigger the togglePopup with given defaultDropBoxPosition', function () {
|
|
983
|
+
var _render36 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
984
|
+
options: options,
|
|
985
|
+
defaultDropBoxPosition: "topCenter"
|
|
986
|
+
})),
|
|
987
|
+
getByRole = _render36.getByRole,
|
|
988
|
+
getByTestId = _render36.getByTestId;
|
|
989
|
+
|
|
990
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
991
|
+
|
|
992
|
+
expect(getByTestId(dropboxTestId)).toHaveAttribute('data-position', 'topMid');
|
|
993
|
+
});
|
|
994
|
+
test('Should trigger the onFocus, when open the select', function () {
|
|
995
|
+
var mockOnFocus = jest.fn();
|
|
996
|
+
|
|
997
|
+
var _render37 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
998
|
+
options: options,
|
|
999
|
+
onFocus: mockOnFocus
|
|
1000
|
+
})),
|
|
1001
|
+
getByRole = _render37.getByRole;
|
|
1002
|
+
|
|
1003
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
1004
|
+
|
|
1005
|
+
expect(mockOnFocus).toHaveBeenCalledWith(expect.any(Object));
|
|
1006
|
+
});
|
|
1007
|
+
test('Should trigger the getPopupHandlers with popup handlers, when select is mounted', function () {
|
|
1008
|
+
var mockGetRef = jest.fn();
|
|
1009
|
+
|
|
1010
|
+
var _render38 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1011
|
+
options: options,
|
|
1012
|
+
getRef: mockGetRef
|
|
1013
|
+
})),
|
|
1014
|
+
getByRole = _render38.getByRole;
|
|
1015
|
+
|
|
1016
|
+
expect(mockGetRef).toHaveBeenCalledWith(getByRole(selectInputRole));
|
|
1017
|
+
});
|
|
1018
|
+
test('Should not open the dropdown, when press down arrow on the input with needSelectDownIcon as false', function () {
|
|
1019
|
+
var _render39 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1020
|
+
options: options,
|
|
1021
|
+
needSelectDownIcon: false
|
|
1022
|
+
})),
|
|
1023
|
+
getByRole = _render39.getByRole,
|
|
1024
|
+
queryByTestId = _render39.queryByTestId;
|
|
1025
|
+
|
|
1026
|
+
_react2.fireEvent.keyDown(getByRole(selectInputRole), {
|
|
1027
|
+
key: 'ArrowDown',
|
|
1028
|
+
keyCode: 40,
|
|
1029
|
+
code: 'ArrowDown'
|
|
1030
|
+
});
|
|
1031
|
+
|
|
1032
|
+
expect(queryByTestId(dropboxTestId)).not.toBeInTheDocument();
|
|
1033
|
+
});
|
|
1034
|
+
test('Should open the dropdown, when press down arrow on the input with getChildren used and needSelectDownIcon as false', function () {
|
|
1035
|
+
var _render40 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1036
|
+
options: options,
|
|
1037
|
+
needSelectDownIcon: false,
|
|
1038
|
+
getChildren: function getChildren() {
|
|
1039
|
+
return /*#__PURE__*/_react["default"].createElement("span", null, "getChildren element");
|
|
1040
|
+
}
|
|
1041
|
+
})),
|
|
1042
|
+
getByRole = _render40.getByRole,
|
|
1043
|
+
getByTestId = _render40.getByTestId;
|
|
1044
|
+
|
|
1045
|
+
_react2.fireEvent.keyDown(getByRole(selectInputRole), {
|
|
1046
|
+
key: 'ArrowDown',
|
|
1047
|
+
keyCode: 40,
|
|
1048
|
+
code: 'ArrowDown'
|
|
1049
|
+
});
|
|
1050
|
+
|
|
1051
|
+
expect(getByTestId(dropboxTestId)).toBeInTheDocument();
|
|
1052
|
+
});
|
|
1053
|
+
});
|
|
1054
|
+
describe('Select snapshot - ', function () {
|
|
1055
|
+
test('Should render with isParentBased as false', function () {
|
|
1056
|
+
var _render41 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1057
|
+
isParentBased: false
|
|
1058
|
+
})),
|
|
1059
|
+
asFragment = _render41.asFragment;
|
|
1060
|
+
|
|
1061
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1062
|
+
});
|
|
1063
|
+
var sizes = ['small', 'medium'];
|
|
1064
|
+
test.each(sizes)('Should render with size as %s', function (size) {
|
|
1065
|
+
var _render42 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1066
|
+
size: size
|
|
1067
|
+
})),
|
|
1068
|
+
asFragment = _render42.asFragment;
|
|
1069
|
+
|
|
1070
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1071
|
+
});
|
|
1072
|
+
test('Should render with iconOnHover as true', function () {
|
|
1073
|
+
var _render43 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1074
|
+
iconOnHover: true
|
|
1075
|
+
})),
|
|
1076
|
+
asFragment = _render43.asFragment;
|
|
1077
|
+
|
|
1078
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1079
|
+
});
|
|
1080
|
+
test('Should render with iconOnHover as true and isReadOnly as true', function () {
|
|
1081
|
+
var _render44 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1082
|
+
iconOnHover: true,
|
|
1083
|
+
isReadOnly: true
|
|
1084
|
+
})),
|
|
1085
|
+
asFragment = _render44.asFragment;
|
|
1086
|
+
|
|
1087
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1088
|
+
});
|
|
1089
|
+
test('Should render with iconOnHover as true and isDisabled as true', function () {
|
|
1090
|
+
var _render45 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1091
|
+
iconOnHover: true,
|
|
1092
|
+
isDisabled: true
|
|
1093
|
+
})),
|
|
1094
|
+
asFragment = _render45.asFragment;
|
|
1095
|
+
|
|
1096
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1097
|
+
});
|
|
1098
|
+
test('Should render with title prop', function () {
|
|
1099
|
+
var _render46 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1100
|
+
title: "Select tooltip"
|
|
1101
|
+
})),
|
|
1102
|
+
asFragment = _render46.asFragment;
|
|
1103
|
+
|
|
1104
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1105
|
+
});
|
|
1106
|
+
test('Should render with dataSelectorId prop', function () {
|
|
1107
|
+
var _render47 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1108
|
+
dataSelectorId: "customSelectorId"
|
|
1109
|
+
})),
|
|
1110
|
+
asFragment = _render47.asFragment;
|
|
1111
|
+
|
|
1112
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1113
|
+
});
|
|
1114
|
+
test('Should render with className prop', function () {
|
|
1115
|
+
var _render48 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1116
|
+
className: "customClass"
|
|
1117
|
+
})),
|
|
1118
|
+
asFragment = _render48.asFragment;
|
|
1119
|
+
|
|
1120
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1121
|
+
});
|
|
1122
|
+
test('Should render with needSelectDownIcon as false', function () {
|
|
1123
|
+
var _render49 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1124
|
+
needSelectDownIcon: false
|
|
1125
|
+
})),
|
|
1126
|
+
asFragment = _render49.asFragment;
|
|
1127
|
+
|
|
1128
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1129
|
+
});
|
|
1130
|
+
test('Should render with isLoading', function () {
|
|
1131
|
+
var _render50 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1132
|
+
isPopupOpen: true,
|
|
1133
|
+
isLoading: true
|
|
1134
|
+
})),
|
|
1135
|
+
asFragment = _render50.asFragment;
|
|
1136
|
+
|
|
1137
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1138
|
+
});
|
|
1139
|
+
test('Should render with children', function () {
|
|
1140
|
+
var _render51 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], null, /*#__PURE__*/_react["default"].createElement("span", null, "children element"))),
|
|
1141
|
+
asFragment = _render51.asFragment;
|
|
1142
|
+
|
|
1143
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1144
|
+
});
|
|
1145
|
+
test('Should render with children and dropdown open', function () {
|
|
1146
|
+
var _render52 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1147
|
+
isPopupOpen: true
|
|
1148
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, "children element"))),
|
|
1149
|
+
asFragment = _render52.asFragment;
|
|
1150
|
+
|
|
1151
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1152
|
+
});
|
|
1153
|
+
var dropBoxSizes = ['small', 'medium', 'large'];
|
|
1154
|
+
test.each(dropBoxSizes)('Should render with dropBoxSize as %s', function (dropBoxSize) {
|
|
1155
|
+
var _render53 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1156
|
+
isPopupOpen: true,
|
|
1157
|
+
dropBoxSize: dropBoxSize,
|
|
1158
|
+
needSearch: true
|
|
1159
|
+
})),
|
|
1160
|
+
asFragment = _render53.asFragment;
|
|
1161
|
+
|
|
1162
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1163
|
+
});
|
|
1164
|
+
test('Should render with getFooter', function () {
|
|
1165
|
+
var _render54 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1166
|
+
isPopupOpen: true,
|
|
1167
|
+
getFooter: function getFooter() {
|
|
1168
|
+
return /*#__PURE__*/_react["default"].createElement("span", null, "getFooter element");
|
|
1169
|
+
}
|
|
1170
|
+
})),
|
|
1171
|
+
asFragment = _render54.asFragment;
|
|
1172
|
+
|
|
1173
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1174
|
+
});
|
|
1175
|
+
test('Should render with getChildren', function () {
|
|
1176
|
+
var _render55 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1177
|
+
isPopupOpen: true,
|
|
1178
|
+
getChildren: function getChildren() {
|
|
1179
|
+
return /*#__PURE__*/_react["default"].createElement("span", null, "getChildren element");
|
|
1180
|
+
}
|
|
1181
|
+
})),
|
|
1182
|
+
asFragment = _render55.asFragment;
|
|
1183
|
+
|
|
1184
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1185
|
+
});
|
|
1186
|
+
test("Should render with customProps", function () {
|
|
1187
|
+
var _render56 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1188
|
+
needSearch: true,
|
|
1189
|
+
options: options,
|
|
1190
|
+
isPopupOpen: true,
|
|
1191
|
+
customProps: {
|
|
1192
|
+
TextBoxProps: {
|
|
1193
|
+
'data-custom-attr': 'true'
|
|
1194
|
+
},
|
|
1195
|
+
DropdownSearchTextBoxProps: {
|
|
1196
|
+
'data-custom-search-attr': 'true'
|
|
1197
|
+
},
|
|
1198
|
+
SuggestionsProps: {
|
|
1199
|
+
listItemSize: 'small'
|
|
1200
|
+
},
|
|
1201
|
+
TextBoxIconProps: {
|
|
1202
|
+
'data-custom-select-attr': 'true'
|
|
1203
|
+
},
|
|
1204
|
+
listItemProps: {
|
|
1205
|
+
'data-custom-listitem-attr': 'true'
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
})),
|
|
1209
|
+
asFragment = _render56.asFragment;
|
|
1210
|
+
|
|
1211
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1212
|
+
});
|
|
1213
|
+
});
|
|
1214
|
+
describe('Select box needSelectDownIcon snapshot - ', function () {
|
|
1215
|
+
[true, false].forEach(function (needSelectDownIcon) {
|
|
1216
|
+
test("Should render with aria properties - needSelectDownIcon as ".concat(needSelectDownIcon), function () {
|
|
1217
|
+
var _render57 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1218
|
+
i18nKeys: {
|
|
1219
|
+
TextBox_ally_label: ''
|
|
1220
|
+
},
|
|
1221
|
+
ariaLabelledby: "customLabelId",
|
|
1222
|
+
options: options,
|
|
1223
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1224
|
+
})),
|
|
1225
|
+
asFragment = _render57.asFragment;
|
|
1226
|
+
|
|
1227
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1228
|
+
});
|
|
1229
|
+
test("Should render with isPopupOpen as true - needSelectDownIcon as ".concat(needSelectDownIcon), function () {
|
|
1230
|
+
var _render58 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1231
|
+
isPopupOpen: true,
|
|
1232
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1233
|
+
})),
|
|
1234
|
+
asFragment = _render58.asFragment;
|
|
1235
|
+
|
|
1236
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1237
|
+
});
|
|
1238
|
+
test("Should render with maxLength - needSelectDownIcon as ".concat(needSelectDownIcon), function () {
|
|
1239
|
+
var _render59 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1240
|
+
maxLength: "100",
|
|
1241
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1242
|
+
})),
|
|
1243
|
+
asFragment = _render59.asFragment;
|
|
1244
|
+
|
|
1245
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1246
|
+
});
|
|
1247
|
+
test("Should render with needBorder as false - needSelectDownIcon as ".concat(needSelectDownIcon), function () {
|
|
1248
|
+
var _render60 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1249
|
+
needBorder: false,
|
|
1250
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1251
|
+
})),
|
|
1252
|
+
asFragment = _render60.asFragment;
|
|
1253
|
+
|
|
1254
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1255
|
+
});
|
|
1256
|
+
test("Should render with placeHolder - needSelectDownIcon as ".concat(needSelectDownIcon), function () {
|
|
1257
|
+
var _render61 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1258
|
+
placeHolder: "custom placeholder",
|
|
1259
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1260
|
+
})),
|
|
1261
|
+
asFragment = _render61.asFragment;
|
|
1262
|
+
|
|
1263
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1264
|
+
});
|
|
1265
|
+
test("Should render with isReadOnly as true - needSelectDownIcon as ".concat(needSelectDownIcon), function () {
|
|
1266
|
+
var _render62 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1267
|
+
isReadOnly: true,
|
|
1268
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1269
|
+
})),
|
|
1270
|
+
asFragment = _render62.asFragment;
|
|
1271
|
+
|
|
1272
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1273
|
+
});
|
|
1274
|
+
test("Should render with isDisabled as true - needSelectDownIcon as ".concat(needSelectDownIcon), function () {
|
|
1275
|
+
var _render63 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1276
|
+
isDisabled: true,
|
|
1277
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1278
|
+
})),
|
|
1279
|
+
asFragment = _render63.asFragment;
|
|
1280
|
+
|
|
1281
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1282
|
+
});
|
|
1283
|
+
var textBoxSizes = ['xsmall', 'small', 'medium', 'xmedium'];
|
|
1284
|
+
test.each(textBoxSizes)("Should render with textBoxSize as %s - needSelectDownIcon as ".concat(needSelectDownIcon), function (textBoxSize) {
|
|
1285
|
+
var _render64 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1286
|
+
textBoxSize: textBoxSize,
|
|
1287
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1288
|
+
})),
|
|
1289
|
+
asFragment = _render64.asFragment;
|
|
1290
|
+
|
|
1291
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1292
|
+
});
|
|
1293
|
+
var textBoxVariants = ['primary', 'secondary', 'default', 'light'];
|
|
1294
|
+
test.each(textBoxVariants)("Should render with textBoxVariant as %s - needSelectDownIcon as ".concat(needSelectDownIcon), function (textBoxVariant) {
|
|
1295
|
+
var _render65 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1296
|
+
textBoxVariant: textBoxVariant,
|
|
1297
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1298
|
+
})),
|
|
1299
|
+
asFragment = _render65.asFragment;
|
|
1300
|
+
|
|
1301
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1302
|
+
});
|
|
1303
|
+
var borderColors = ['transparent', 'default'];
|
|
1304
|
+
test.each(borderColors)("Should render with borderColor as %s - needSelectDownIcon as ".concat(needSelectDownIcon), function (borderColor) {
|
|
1305
|
+
var _render66 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1306
|
+
borderColor: borderColor,
|
|
1307
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1308
|
+
})),
|
|
1309
|
+
asFragment = _render66.asFragment;
|
|
1310
|
+
|
|
1311
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1312
|
+
});
|
|
1313
|
+
test("Should render with htmlId - needSelectDownIcon as ".concat(needSelectDownIcon), function () {
|
|
1314
|
+
var _render67 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1315
|
+
htmlId: "customHtmlId",
|
|
1316
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1317
|
+
})),
|
|
1318
|
+
asFragment = _render67.asFragment;
|
|
1319
|
+
|
|
1320
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1321
|
+
});
|
|
1322
|
+
test("Should render with autoComplete as true - needSelectDownIcon as ".concat(needSelectDownIcon), function () {
|
|
1323
|
+
var _render68 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1324
|
+
autoComplete: true,
|
|
1325
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1326
|
+
})),
|
|
1327
|
+
asFragment = _render68.asFragment;
|
|
1328
|
+
|
|
1329
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1330
|
+
});
|
|
1331
|
+
test("Should render with title - needSelectDownIcon as ".concat(needSelectDownIcon), function () {
|
|
1332
|
+
var _render69 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1333
|
+
title: "custom select title",
|
|
1334
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1335
|
+
})),
|
|
1336
|
+
asFragment = _render69.asFragment;
|
|
1337
|
+
|
|
1338
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1339
|
+
});
|
|
1340
|
+
test("Should render with customProps TextBoxProps - needSelectDownIcon as ".concat(needSelectDownIcon), function () {
|
|
1341
|
+
var _render70 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1342
|
+
customProps: {
|
|
1343
|
+
TextBoxProps: {
|
|
1344
|
+
'data-custom-attr': 'true'
|
|
1345
|
+
}
|
|
1346
|
+
},
|
|
1347
|
+
needSelectDownIcon: needSelectDownIcon
|
|
1348
|
+
})),
|
|
1349
|
+
asFragment = _render70.asFragment;
|
|
1350
|
+
|
|
1351
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1352
|
+
});
|
|
1353
|
+
});
|
|
1354
|
+
});
|
|
1355
|
+
describe('Select dataId snapshot - ', function () {
|
|
1356
|
+
test('Should render with dataId prop - dropbox open', function () {
|
|
1357
|
+
var _render71 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1358
|
+
needSearch: true,
|
|
1359
|
+
options: options,
|
|
1360
|
+
dataId: "customDataId"
|
|
1361
|
+
})),
|
|
1362
|
+
getByRole = _render71.getByRole,
|
|
1363
|
+
asFragment = _render71.asFragment;
|
|
1364
|
+
|
|
1365
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
1366
|
+
|
|
1367
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1368
|
+
});
|
|
1369
|
+
test('Should render with dataId prop - isDisabled as true', function () {
|
|
1370
|
+
var _render72 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1371
|
+
isDisabled: true,
|
|
1372
|
+
dataId: "customDataId"
|
|
1373
|
+
})),
|
|
1374
|
+
asFragment = _render72.asFragment;
|
|
1375
|
+
|
|
1376
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1377
|
+
});
|
|
1378
|
+
test('Should render with dataId prop - isReadOnly as true', function () {
|
|
1379
|
+
var _render73 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1380
|
+
isReadOnly: true,
|
|
1381
|
+
dataId: "customDataId"
|
|
1382
|
+
})),
|
|
1383
|
+
asFragment = _render73.asFragment;
|
|
1384
|
+
|
|
1385
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1386
|
+
});
|
|
1387
|
+
test('Should render with dataId prop - empty state and needSelectDownIcon as false', function () {
|
|
1388
|
+
var _render74 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Select["default"], {
|
|
1389
|
+
needSelectDownIcon: false
|
|
1390
|
+
})),
|
|
1391
|
+
getByRole = _render74.getByRole,
|
|
1392
|
+
asFragment = _render74.asFragment;
|
|
1393
|
+
|
|
1394
|
+
_userEvent["default"].click(getByRole(selectInputRole));
|
|
1395
|
+
|
|
1396
|
+
expect(asFragment()).toMatchSnapshot();
|
|
1397
|
+
});
|
|
1398
|
+
});
|