@zohodesk/components 1.4.11 → 1.4.13
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 -0
- package/package.json +4 -3
- package/es/Accordion/Accordion.js +0 -85
- package/es/Accordion/AccordionItem.js +0 -63
- package/es/Accordion/__tests__/Accordion.spec.js +0 -11
- package/es/Accordion/__tests__/AccordionItem.spec.js +0 -16
- package/es/Accordion/__tests__/__snapshots__/Accordion.spec.js.snap +0 -12
- package/es/Accordion/__tests__/__snapshots__/AccordionItem.spec.js.snap +0 -23
- package/es/Accordion/index.js +0 -2
- package/es/Accordion/props/defaultProps.js +0 -12
- package/es/Accordion/props/propTypes.js +0 -33
- package/es/Animation/Animation.js +0 -52
- package/es/Animation/__tests__/Animation.spec.js +0 -14
- package/es/Animation/__tests__/__snapshots__/Animation.spec.js.snap +0 -11
- package/es/Animation/props/defaultProps.js +0 -7
- package/es/Animation/props/propTypes.js +0 -12
- package/es/Animation/utils.js +0 -83
- package/es/AppContainer/AppContainer.js +0 -139
- package/es/AppContainer/AppContainer.module.css +0 -18
- package/es/AppContainer/__tests__/AppContainer.spec.js +0 -82
- package/es/AppContainer/__tests__/__snapshots__/AppContainer.spec.js.snap +0 -201
- package/es/AppContainer/props/defaultProps.js +0 -10
- package/es/AppContainer/props/propTypes.js +0 -17
- package/es/Avatar/Avatar.js +0 -195
- package/es/Avatar/Avatar.module.css +0 -176
- package/es/Avatar/__tests__/Avatar.spec.js +0 -181
- package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +0 -591
- package/es/Avatar/props/defaultProps.js +0 -17
- package/es/Avatar/props/propTypes.js +0 -26
- package/es/AvatarTeam/AvatarTeam.js +0 -84
- package/es/AvatarTeam/AvatarTeam.module.css +0 -189
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -138
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +0 -705
- package/es/AvatarTeam/props/defaultProps.js +0 -17
- package/es/AvatarTeam/props/propTypes.js +0 -28
- package/es/Button/Button.js +0 -76
- package/es/Button/__tests__/Button.spec.js +0 -242
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -412
- package/es/Button/css/Button.module.css +0 -613
- package/es/Button/css/cssJSLogic.js +0 -58
- package/es/Button/index.js +0 -2
- package/es/Button/props/defaultProps.js +0 -18
- package/es/Button/props/propTypes.js +0 -28
- package/es/Buttongroup/Buttongroup.js +0 -50
- package/es/Buttongroup/Buttongroup.module.css +0 -105
- package/es/Buttongroup/__tests__/Buttongroup.spec.js +0 -37
- package/es/Buttongroup/__tests__/__snapshots__/Buttongroup.spec.js.snap +0 -191
- package/es/Buttongroup/props/defaultProps.js +0 -6
- package/es/Buttongroup/props/propTypes.js +0 -9
- package/es/Card/Card.js +0 -305
- package/es/Card/Card.module.css +0 -20
- package/es/Card/__tests__/Card.spec.js +0 -90
- package/es/Card/__tests__/__snapshots__/Card.spec.js.snap +0 -56
- package/es/Card/index.js +0 -4
- package/es/Card/props/defaultProps.js +0 -26
- package/es/Card/props/propTypes.js +0 -49
- package/es/CheckBox/CheckBox.js +0 -172
- package/es/CheckBox/CheckBox.module.css +0 -160
- package/es/CheckBox/__tests__/CheckBox.spec.js +0 -240
- package/es/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +0 -1878
- package/es/CheckBox/props/defaultProps.js +0 -18
- package/es/CheckBox/props/propTypes.js +0 -42
- package/es/DateTime/CalendarView.js +0 -223
- package/es/DateTime/DateTime.js +0 -779
- package/es/DateTime/DateTime.module.css +0 -249
- package/es/DateTime/DateTimePopupFooter.js +0 -47
- package/es/DateTime/DateTimePopupHeader.js +0 -105
- package/es/DateTime/DateWidget.js +0 -1142
- package/es/DateTime/DateWidget.module.css +0 -39
- package/es/DateTime/DaysRow.js +0 -32
- package/es/DateTime/Time.js +0 -181
- package/es/DateTime/YearView.js +0 -264
- package/es/DateTime/YearView.module.css +0 -99
- package/es/DateTime/__tests__/CalendarView.spec.js +0 -13
- package/es/DateTime/__tests__/DateTime.spec.js +0 -21
- package/es/DateTime/__tests__/DateTimePopupFooter.spec.js +0 -11
- package/es/DateTime/__tests__/DateTimePopupHeader.spec.js +0 -11
- package/es/DateTime/__tests__/DateWidget.spec.js +0 -11
- package/es/DateTime/__tests__/DaysRow.spec.js +0 -13
- package/es/DateTime/__tests__/Time.spec.js +0 -11
- package/es/DateTime/__tests__/YearView.spec.js +0 -10
- package/es/DateTime/__tests__/__snapshots__/CalendarView.spec.js.snap +0 -312
- package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +0 -938
- package/es/DateTime/__tests__/__snapshots__/DateTimePopupFooter.spec.js.snap +0 -34
- package/es/DateTime/__tests__/__snapshots__/DateTimePopupHeader.spec.js.snap +0 -72
- package/es/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +0 -79
- package/es/DateTime/__tests__/__snapshots__/DaysRow.spec.js.snap +0 -12
- package/es/DateTime/__tests__/__snapshots__/Time.spec.js.snap +0 -310
- package/es/DateTime/common.js +0 -25
- package/es/DateTime/constants.js +0 -57
- package/es/DateTime/dateFormatUtils/dateFormat.js +0 -616
- package/es/DateTime/dateFormatUtils/dateFormats.js +0 -42
- package/es/DateTime/dateFormatUtils/dayChange.js +0 -83
- package/es/DateTime/dateFormatUtils/index.js +0 -267
- package/es/DateTime/dateFormatUtils/monthChange.js +0 -90
- package/es/DateTime/dateFormatUtils/timeChange.js +0 -228
- package/es/DateTime/dateFormatUtils/yearChange.js +0 -121
- package/es/DateTime/index.js +0 -1
- package/es/DateTime/objectUtils.js +0 -55
- package/es/DateTime/props/defaultProps.js +0 -65
- package/es/DateTime/props/propTypes.js +0 -203
- package/es/DateTime/typeChecker.js +0 -19
- package/es/DateTime/validator.js +0 -327
- package/es/DropBox/DropBox.js +0 -80
- package/es/DropBox/DropBoxElement/DropBoxElement.js +0 -137
- package/es/DropBox/DropBoxElement/__tests__/DropBoxElement.spec.js +0 -28
- package/es/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +0 -95
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +0 -442
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +0 -91
- package/es/DropBox/DropBoxElement/props/defaultProps.js +0 -18
- package/es/DropBox/DropBoxElement/props/propTypes.js +0 -51
- package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +0 -54
- package/es/DropBox/DropBoxPositionMapping.js +0 -142
- package/es/DropBox/__tests__/DropBox.spec.js +0 -11
- package/es/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +0 -36
- package/es/DropBox/css/DropBox.module.css +0 -59
- package/es/DropBox/css/cssJSLogic.js +0 -14
- package/es/DropBox/props/defaultProps.js +0 -14
- package/es/DropBox/props/propTypes.js +0 -16
- package/es/DropBox/utils/isMobilePopover.js +0 -17
- package/es/DropDown/DropDown.js +0 -76
- package/es/DropDown/DropDown.module.css +0 -5
- package/es/DropDown/DropDownHeading.js +0 -44
- package/es/DropDown/DropDownHeading.module.css +0 -53
- package/es/DropDown/DropDownItem.js +0 -76
- package/es/DropDown/DropDownItem.module.css +0 -94
- package/es/DropDown/DropDownSearch.js +0 -68
- package/es/DropDown/DropDownSearch.module.css +0 -14
- package/es/DropDown/DropDownSeparator.js +0 -15
- package/es/DropDown/DropDownSeparator.module.css +0 -7
- package/es/DropDown/__tests__/DropDown.spec.js +0 -11
- package/es/DropDown/__tests__/DropDownHeading.spec.js +0 -11
- package/es/DropDown/__tests__/DropDownItem.spec.js +0 -11
- package/es/DropDown/__tests__/DropDownSearch.spec.js +0 -11
- package/es/DropDown/__tests__/DropDownSeparator.spec.js +0 -11
- package/es/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +0 -54
- package/es/DropDown/__tests__/__snapshots__/DropDownHeading.spec.js.snap +0 -12
- package/es/DropDown/__tests__/__snapshots__/DropDownItem.spec.js.snap +0 -11
- package/es/DropDown/__tests__/__snapshots__/DropDownSearch.spec.js.snap +0 -20
- package/es/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +0 -9
- package/es/DropDown/index.js +0 -7
- package/es/DropDown/props/defaultProps.js +0 -21
- package/es/DropDown/props/propTypes.js +0 -66
- package/es/Heading/Heading.js +0 -38
- package/es/Heading/Heading.module.css +0 -5
- package/es/Heading/__tests__/Heading.spec.js +0 -20
- package/es/Heading/__tests__/__snapshots__/Heading.spec.js.snap +0 -63
- package/es/Heading/props/defaultProps.js +0 -5
- package/es/Heading/props/propTypes.js +0 -12
- package/es/Label/Label.js +0 -51
- package/es/Label/Label.module.css +0 -57
- package/es/Label/LabelColors.module.css +0 -21
- package/es/Label/__tests__/Label.spec.js +0 -99
- package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -312
- package/es/Label/props/defaultProps.js +0 -11
- package/es/Label/props/propTypes.js +0 -19
- package/es/Layout/Box.js +0 -115
- package/es/Layout/Container.js +0 -132
- package/es/Layout/Layout.module.css +0 -336
- package/es/Layout/__tests__/Box.spec.js +0 -11
- package/es/Layout/__tests__/Container.spec.js +0 -11
- package/es/Layout/__tests__/__snapshots__/Box.spec.js.snap +0 -16
- package/es/Layout/__tests__/__snapshots__/Container.spec.js.snap +0 -16
- package/es/Layout/index.js +0 -10
- package/es/Layout/props/defaultProps.js +0 -16
- package/es/Layout/props/propTypes.js +0 -46
- package/es/Layout/utils.js +0 -30
- package/es/ListItem/ListContainer.js +0 -105
- package/es/ListItem/ListItem.js +0 -151
- package/es/ListItem/ListItem.module.css +0 -261
- package/es/ListItem/ListItemWithAvatar.js +0 -178
- package/es/ListItem/ListItemWithCheckBox.js +0 -134
- package/es/ListItem/ListItemWithIcon.js +0 -158
- package/es/ListItem/ListItemWithRadio.js +0 -137
- package/es/ListItem/__tests__/ListContainer.spec.js +0 -19
- package/es/ListItem/__tests__/ListItem.spec.js +0 -11
- package/es/ListItem/__tests__/ListItemWithAvatar.spec.js +0 -46
- package/es/ListItem/__tests__/ListItemWithCheckBox.spec.js +0 -46
- package/es/ListItem/__tests__/ListItemWithIcon.spec.js +0 -46
- package/es/ListItem/__tests__/ListItemWithRadio.spec.js +0 -46
- package/es/ListItem/__tests__/__snapshots__/ListContainer.spec.js.snap +0 -27
- package/es/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +0 -29
- package/es/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +0 -222
- package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +0 -492
- package/es/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +0 -222
- package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +0 -487
- package/es/ListItem/index.js +0 -6
- package/es/ListItem/props/defaultProps.js +0 -105
- package/es/ListItem/props/propTypes.js +0 -220
- package/es/Modal/Modal.js +0 -174
- package/es/Modal/Portal/Portal.js +0 -33
- package/es/Modal/Portal/__tests__/Portal.spec.js +0 -28
- package/es/Modal/Portal/__tests__/__snapshots__/Portal.spec.js.snap +0 -30
- package/es/Modal/Portal/props/defaultProps.js +0 -3
- package/es/Modal/Portal/props/propTypes.js +0 -5
- package/es/Modal/__tests__/Modal.spec.js +0 -15
- package/es/Modal/__tests__/__snapshots__/Modal.spec.js.snap +0 -26
- package/es/Modal/props/defaultProps.js +0 -3
- package/es/Modal/props/propTypes.js +0 -7
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +0 -1109
- package/es/MultiSelect/AdvancedMultiSelect.js +0 -604
- package/es/MultiSelect/EmptyState.js +0 -65
- package/es/MultiSelect/MobileHeader/MobileHeader.js +0 -50
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +0 -16
- package/es/MultiSelect/MobileHeader/__tests__/MobileHeader.spec.js +0 -11
- package/es/MultiSelect/MobileHeader/__tests__/__snapshots__/MobileHeader.spec.js.snap +0 -39
- package/es/MultiSelect/MobileHeader/props/defaultProps.js +0 -7
- package/es/MultiSelect/MobileHeader/props/propTypes.js +0 -7
- package/es/MultiSelect/MultiSelect.js +0 -1186
- package/es/MultiSelect/MultiSelect.module.css +0 -216
- package/es/MultiSelect/MultiSelectHeader.js +0 -32
- package/es/MultiSelect/MultiSelectWithAvatar.js +0 -218
- package/es/MultiSelect/SelectedOptions.js +0 -86
- package/es/MultiSelect/SelectedOptions.module.css +0 -15
- package/es/MultiSelect/Suggestions.js +0 -225
- package/es/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +0 -12
- package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +0 -47
- package/es/MultiSelect/__tests__/EmptyState.spec.js +0 -15
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +0 -36
- package/es/MultiSelect/__tests__/MultiSelectHeader.spec.js +0 -21
- package/es/MultiSelect/__tests__/MultiSelectWithAvatar.spec.js +0 -11
- package/es/MultiSelect/__tests__/SelectedOptions.spec.js +0 -28
- package/es/MultiSelect/__tests__/Suggestions.spec.js +0 -71
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +0 -74
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +0 -534
- package/es/MultiSelect/__tests__/__snapshots__/EmptyState.spec.js.snap +0 -12
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +0 -339
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelectHeader.spec.js.snap +0 -63
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelectWithAvatar.spec.js.snap +0 -85
- package/es/MultiSelect/__tests__/__snapshots__/SelectedOptions.spec.js.snap +0 -80
- package/es/MultiSelect/__tests__/__snapshots__/Suggestions.spec.js.snap +0 -363
- package/es/MultiSelect/constants.js +0 -6
- package/es/MultiSelect/index.js +0 -4
- package/es/MultiSelect/props/defaultProps.js +0 -173
- package/es/MultiSelect/props/propTypes.js +0 -300
- package/es/PopOver/PopOver.js +0 -211
- package/es/PopOver/PopOver.module.css +0 -9
- package/es/PopOver/__tests__/PopOver.spec.js +0 -11
- package/es/PopOver/__tests__/__snapshots__/PopOver.spec.js.snap +0 -13
- package/es/PopOver/index.js +0 -3
- package/es/PopOver/props/defaultProps.js +0 -7
- package/es/PopOver/props/propTypes.js +0 -53
- package/es/Popup/Popup.js +0 -1049
- package/es/Popup/PositionMapping.js +0 -72
- package/es/Popup/Registry.js +0 -36
- package/es/Popup/intersectionObserver.js +0 -49
- package/es/Popup/props/propTypes.js +0 -30
- package/es/Popup/viewPort.js +0 -373
- package/es/Provider/AvatarSize.js +0 -13
- package/es/Provider/Config.js +0 -21
- package/es/Provider/CssProvider.js +0 -16
- package/es/Provider/IdProvider.js +0 -66
- package/es/Provider/LibraryContext.js +0 -57
- package/es/Provider/LibraryContextInit.js +0 -3
- package/es/Provider/NumberGenerator/NumberGenerator.js +0 -136
- package/es/Provider/ZindexProvider.js +0 -57
- package/es/Provider/index.js +0 -4
- package/es/Radio/Radio.js +0 -138
- package/es/Radio/Radio.module.css +0 -115
- package/es/Radio/__tests__/Radio.spec.js +0 -238
- package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +0 -1916
- package/es/Radio/props/defaultProps.js +0 -15
- package/es/Radio/props/propTypes.js +0 -41
- package/es/Responsive/CustomResponsive.js +0 -195
- package/es/Responsive/RefWrapper.js +0 -38
- package/es/Responsive/ResizeComponent.js +0 -197
- package/es/Responsive/ResizeObserver.js +0 -76
- package/es/Responsive/ResizeObserverWithPolyfill.js +0 -140
- package/es/Responsive/Responsive.js +0 -194
- package/es/Responsive/index.js +0 -9
- package/es/Responsive/props/defaultProps.js +0 -13
- package/es/Responsive/props/propTypes.js +0 -25
- package/es/Responsive/sizeObservers.js +0 -141
- package/es/Responsive/utils/index.js +0 -52
- package/es/Responsive/utils/shallowCompare.js +0 -28
- package/es/Responsive/windowResizeObserver.js +0 -51
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +0 -65
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +0 -6
- package/es/ResponsiveDropBox/__tests__/ResponsiveDropBox.spec.js +0 -11
- package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +0 -42
- package/es/ResponsiveDropBox/props/defaultProps.js +0 -4
- package/es/ResponsiveDropBox/props/propTypes.js +0 -8
- package/es/Ribbon/Ribbon.js +0 -51
- package/es/Ribbon/Ribbon.module.css +0 -500
- package/es/Ribbon/__tests__/Ribbon.spec.js +0 -52
- package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +0 -374
- package/es/Ribbon/props/defaultProps.js +0 -9
- package/es/Ribbon/props/propTypes.js +0 -11
- package/es/RippleEffect/RippleEffect.js +0 -30
- package/es/RippleEffect/RippleEffect.module.css +0 -109
- package/es/RippleEffect/__tests__/RippleEffect.spec.js +0 -69
- package/es/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +0 -161
- package/es/RippleEffect/props/defaultProps.js +0 -10
- package/es/RippleEffect/props/propTypes.js +0 -12
- package/es/Select/GroupSelect.js +0 -825
- package/es/Select/Select.js +0 -1016
- package/es/Select/Select.module.css +0 -138
- package/es/Select/SelectWithAvatar.js +0 -358
- package/es/Select/SelectWithIcon.js +0 -563
- package/es/Select/__tests__/GroupSelect.spec.js +0 -19
- package/es/Select/__tests__/Select.spec.js +0 -1153
- package/es/Select/__tests__/SelectWithAvatar.spec.js +0 -12
- package/es/Select/__tests__/SelectWithIcon.spec.js +0 -12
- package/es/Select/__tests__/__snapshots__/GroupSelect.spec.js.snap +0 -90
- package/es/Select/__tests__/__snapshots__/Select.spec.js.snap +0 -10446
- package/es/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +0 -45
- package/es/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +0 -108
- package/es/Select/index.js +0 -4
- package/es/Select/props/defaultProps.js +0 -131
- package/es/Select/props/propTypes.js +0 -311
- package/es/Stencils/Stencils.js +0 -24
- package/es/Stencils/Stencils.module.css +0 -100
- package/es/Stencils/__tests__/Stencils.spec.js +0 -54
- package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +0 -105
- package/es/Stencils/props/defaultProps.js +0 -7
- package/es/Stencils/props/propTypes.js +0 -8
- package/es/Switch/Switch.js +0 -99
- package/es/Switch/Switch.module.css +0 -128
- package/es/Switch/__tests__/Switch.spec.js +0 -156
- package/es/Switch/__tests__/__snapshots__/Switch.spec.js.snap +0 -831
- package/es/Switch/props/defaultProps.js +0 -11
- package/es/Switch/props/propTypes.js +0 -28
- package/es/Tab/Tab.js +0 -110
- package/es/Tab/Tab.module.css +0 -100
- package/es/Tab/TabContent.js +0 -30
- package/es/Tab/TabContent.module.css +0 -4
- package/es/Tab/TabContentWrapper.js +0 -33
- package/es/Tab/TabWrapper.js +0 -56
- package/es/Tab/Tabs.js +0 -723
- package/es/Tab/Tabs.module.css +0 -167
- package/es/Tab/__tests__/Tab.spec.js +0 -11
- package/es/Tab/__tests__/TabContent.spec.js +0 -11
- package/es/Tab/__tests__/TabContentWrapper.spec.js +0 -11
- package/es/Tab/__tests__/TabLayout.spec.js +0 -34
- package/es/Tab/__tests__/TabWrapper.spec.js +0 -11
- package/es/Tab/__tests__/Tabs.spec.js +0 -11
- package/es/Tab/__tests__/__snapshots__/Tab.spec.js.snap +0 -22
- package/es/Tab/__tests__/__snapshots__/TabContent.spec.js.snap +0 -19
- package/es/Tab/__tests__/__snapshots__/TabContentWrapper.spec.js.snap +0 -12
- package/es/Tab/__tests__/__snapshots__/TabLayout.spec.js.snap +0 -341
- package/es/Tab/__tests__/__snapshots__/TabWrapper.spec.js.snap +0 -20
- package/es/Tab/__tests__/__snapshots__/Tabs.spec.js.snap +0 -33
- package/es/Tab/index.js +0 -5
- package/es/Tab/props/defaultProps.js +0 -51
- package/es/Tab/props/propTypes.js +0 -117
- package/es/Tab/utils/tabConfigs.js +0 -18
- package/es/Tag/Tag.js +0 -163
- package/es/Tag/Tag.module.css +0 -254
- package/es/Tag/__tests__/Tag.spec.js +0 -252
- package/es/Tag/__tests__/__snapshots__/Tag.spec.js.snap +0 -3074
- package/es/Tag/props/defaultProps.js +0 -16
- package/es/Tag/props/propTypes.js +0 -42
- package/es/TextBox/TextBox.js +0 -189
- package/es/TextBox/TextBox.module.css +0 -197
- package/es/TextBox/__tests__/TextBox.spec.js +0 -327
- package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -615
- package/es/TextBox/props/defaultProps.js +0 -20
- package/es/TextBox/props/propTypes.js +0 -53
- package/es/TextBoxIcon/TextBoxIcon.js +0 -203
- package/es/TextBoxIcon/TextBoxIcon.module.css +0 -79
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -268
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -1784
- package/es/TextBoxIcon/props/defaultProps.js +0 -24
- package/es/TextBoxIcon/props/propTypes.js +0 -55
- package/es/Textarea/Textarea.js +0 -125
- package/es/Textarea/Textarea.module.css +0 -148
- package/es/Textarea/__tests__/Textarea.spec.js +0 -266
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -525
- package/es/Textarea/props/defaultProps.js +0 -18
- package/es/Textarea/props/propTypes.js +0 -35
- package/es/Tooltip/Tooltip.js +0 -530
- package/es/Tooltip/Tooltip.module.css +0 -133
- package/es/Tooltip/props/defaultProps.js +0 -4
- package/es/Tooltip/props/propTypes.js +0 -5
- package/es/Typography/Typography.js +0 -38
- package/es/Typography/css/Typography.module.css +0 -489
- package/es/Typography/css/cssJSLogic.js +0 -56
- package/es/Typography/props/defaultProps.js +0 -8
- package/es/Typography/props/propTypes.js +0 -27
- package/es/Typography/utils/index.js +0 -50
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -77
- package/es/VelocityAnimation/VelocityAnimation/__tests__/VelocityAnimation.spec.js +0 -11
- package/es/VelocityAnimation/VelocityAnimation/__tests__/__snapshots__/VelocityAnimation.spec.js.snap +0 -9
- package/es/VelocityAnimation/VelocityAnimation/props/defaultProps.js +0 -7
- package/es/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -12
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +0 -144
- package/es/VelocityAnimation/VelocityAnimationGroup/__tests__/VelocityAnimationGroup.spec.js +0 -19
- package/es/VelocityAnimation/VelocityAnimationGroup/__tests__/__snapshots__/VelocityAnimationGroup.spec.js.snap +0 -11
- package/es/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +0 -15
- package/es/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -22
- package/es/VelocityAnimation/index.js +0 -2
- package/es/common/a11y.module.css +0 -4
- package/es/common/animation.module.css +0 -624
- package/es/common/avatarsizes.module.css +0 -49
- package/es/common/basic.module.css +0 -31
- package/es/common/basicReset.module.css +0 -40
- package/es/common/boxShadow.module.css +0 -34
- package/es/common/common.module.css +0 -559
- package/es/common/customscroll.module.css +0 -142
- package/es/common/reset.module.css +0 -13
- package/es/common/transition.module.css +0 -146
- package/es/components_layer.module.css +0 -1
- package/es/css.js +0 -41
- package/es/deprecated/PortalLayer/PortalLayer.js +0 -108
- package/es/deprecated/PortalLayer/props/defaultProps.js +0 -5
- package/es/deprecated/PortalLayer/props/propTypes.js +0 -20
- package/es/deprecated/Switch/Switch.js +0 -94
- package/es/deprecated/Switch/props/defaultProps.js +0 -11
- package/es/deprecated/Switch/props/propTypes.js +0 -28
- package/es/index.js +0 -42
- package/es/semantic/Button/Button.js +0 -60
- package/es/semantic/Button/__tests__/Button.spec.js +0 -11
- package/es/semantic/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -15
- package/es/semantic/Button/props/defaultProps.js +0 -12
- package/es/semantic/Button/props/propTypes.js +0 -22
- package/es/semantic/Button/semanticButton.module.css +0 -9
- package/es/semantic/index.js +0 -1
- package/es/utils/Common.js +0 -417
- package/es/utils/ContextOptimizer.js +0 -38
- package/es/utils/constant.js +0 -2
- package/es/utils/constructFullName.js +0 -13
- package/es/utils/cssUtils.js +0 -11
- package/es/utils/datetime/GMTZones.js +0 -48
- package/es/utils/datetime/common.js +0 -204
- package/es/utils/debounce.js +0 -23
- package/es/utils/dropDownUtils.js +0 -510
- package/es/utils/dummyFunction.js +0 -1
- package/es/utils/getHTMLFontSize.js +0 -4
- package/es/utils/getInitial.js +0 -24
- package/es/utils/index.js +0 -1
- package/es/utils/scrollTo.js +0 -13
- package/es/utils/shallowEqual.js +0 -32
- package/es/v1/Accordion/Accordion.js +0 -66
- package/es/v1/Accordion/AccordionItem.js +0 -57
- package/es/v1/Accordion/index.js +0 -2
- package/es/v1/Accordion/props/defaultProps.js +0 -12
- package/es/v1/Accordion/props/propTypes.js +0 -33
- package/es/v1/Animation/Animation.js +0 -45
- package/es/v1/Animation/props/defaultProps.js +0 -7
- package/es/v1/Animation/props/propTypes.js +0 -12
- package/es/v1/Animation/utils.js +0 -83
- package/es/v1/AppContainer/AppContainer.js +0 -115
- package/es/v1/AppContainer/props/defaultProps.js +0 -10
- package/es/v1/AppContainer/props/propTypes.js +0 -17
- package/es/v1/Avatar/Avatar.js +0 -139
- package/es/v1/Avatar/props/defaultProps.js +0 -17
- package/es/v1/Avatar/props/propTypes.js +0 -26
- package/es/v1/AvatarTeam/AvatarTeam.js +0 -70
- package/es/v1/AvatarTeam/props/defaultProps.js +0 -17
- package/es/v1/AvatarTeam/props/propTypes.js +0 -27
- package/es/v1/Button/Button.js +0 -67
- package/es/v1/Button/props/defaultProps.js +0 -18
- package/es/v1/Button/props/propTypes.js +0 -28
- package/es/v1/Buttongroup/Buttongroup.js +0 -31
- package/es/v1/Buttongroup/props/defaultProps.js +0 -6
- package/es/v1/Buttongroup/props/propTypes.js +0 -9
- package/es/v1/Card/Card.js +0 -237
- package/es/v1/Card/index.js +0 -4
- package/es/v1/Card/props/defaultProps.js +0 -25
- package/es/v1/Card/props/propTypes.js +0 -48
- package/es/v1/CheckBox/CheckBox.js +0 -161
- package/es/v1/CheckBox/props/defaultProps.js +0 -18
- package/es/v1/CheckBox/props/propTypes.js +0 -41
- package/es/v1/DateTime/CalendarView.js +0 -254
- package/es/v1/DateTime/DateTime.js +0 -779
- package/es/v1/DateTime/DateTimePopupFooter.js +0 -47
- package/es/v1/DateTime/DateTimePopupHeader.js +0 -105
- package/es/v1/DateTime/DateWidget.js +0 -1134
- package/es/v1/DateTime/DaysRow.js +0 -32
- package/es/v1/DateTime/Time.js +0 -181
- package/es/v1/DateTime/YearView.js +0 -264
- package/es/v1/DateTime/index.js +0 -1
- package/es/v1/DateTime/props/defaultProps.js +0 -63
- package/es/v1/DateTime/props/propTypes.js +0 -206
- package/es/v1/DropBox/DropBox.js +0 -79
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +0 -133
- package/es/v1/DropBox/DropBoxElement/props/defaultProps.js +0 -18
- package/es/v1/DropBox/DropBoxElement/props/propTypes.js +0 -51
- package/es/v1/DropBox/props/defaultProps.js +0 -14
- package/es/v1/DropBox/props/propTypes.js +0 -16
- package/es/v1/DropBox/utils/isMobilePopover.js +0 -17
- package/es/v1/DropDown/DropDown.js +0 -53
- package/es/v1/DropDown/DropDownHeading.js +0 -36
- package/es/v1/DropDown/DropDownItem.js +0 -56
- package/es/v1/DropDown/DropDownSearch.js +0 -58
- package/es/v1/DropDown/DropDownSeparator.js +0 -12
- package/es/v1/DropDown/props/defaultProps.js +0 -21
- package/es/v1/DropDown/props/propTypes.js +0 -66
- package/es/v1/Heading/Heading.js +0 -35
- package/es/v1/Heading/props/defaultProps.js +0 -5
- package/es/v1/Heading/props/propTypes.js +0 -12
- package/es/v1/Label/Label.js +0 -40
- package/es/v1/Label/props/defaultProps.js +0 -11
- package/es/v1/Label/props/propTypes.js +0 -19
- package/es/v1/Layout/Box.js +0 -115
- package/es/v1/Layout/Container.js +0 -132
- package/es/v1/Layout/index.js +0 -2
- package/es/v1/Layout/props/defaultProps.js +0 -16
- package/es/v1/Layout/props/propTypes.js +0 -46
- package/es/v1/ListItem/ListContainer.js +0 -104
- package/es/v1/ListItem/ListItem.js +0 -123
- package/es/v1/ListItem/ListItemWithAvatar.js +0 -143
- package/es/v1/ListItem/ListItemWithCheckBox.js +0 -104
- package/es/v1/ListItem/ListItemWithIcon.js +0 -126
- package/es/v1/ListItem/ListItemWithRadio.js +0 -105
- package/es/v1/ListItem/index.js +0 -6
- package/es/v1/ListItem/props/defaultProps.js +0 -97
- package/es/v1/ListItem/props/propTypes.js +0 -202
- package/es/v1/Modal/Modal.js +0 -125
- package/es/v1/Modal/props/defaultProps.js +0 -3
- package/es/v1/Modal/props/propTypes.js +0 -7
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +0 -1092
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +0 -583
- package/es/v1/MultiSelect/EmptyState.js +0 -64
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +0 -50
- package/es/v1/MultiSelect/MobileHeader/props/defaultProps.js +0 -7
- package/es/v1/MultiSelect/MobileHeader/props/propTypes.js +0 -7
- package/es/v1/MultiSelect/MultiSelect.js +0 -1119
- package/es/v1/MultiSelect/MultiSelectHeader.js +0 -32
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +0 -208
- package/es/v1/MultiSelect/SelectedOptions.js +0 -84
- package/es/v1/MultiSelect/Suggestions.js +0 -141
- package/es/v1/MultiSelect/index.js +0 -4
- package/es/v1/MultiSelect/props/defaultProps.js +0 -165
- package/es/v1/MultiSelect/props/propTypes.js +0 -322
- package/es/v1/PopOver/PopOver.js +0 -176
- package/es/v1/PopOver/props/defaultProps.js +0 -7
- package/es/v1/PopOver/props/propTypes.js +0 -53
- package/es/v1/Popup/Popup.js +0 -644
- package/es/v1/Radio/Radio.js +0 -130
- package/es/v1/Radio/props/defaultProps.js +0 -15
- package/es/v1/Radio/props/propTypes.js +0 -40
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +0 -56
- package/es/v1/ResponsiveDropBox/props/defaultProps.js +0 -4
- package/es/v1/ResponsiveDropBox/props/propTypes.js +0 -8
- package/es/v1/Ribbon/Ribbon.js +0 -33
- package/es/v1/Ribbon/props/defaultProps.js +0 -9
- package/es/v1/Ribbon/props/propTypes.js +0 -11
- package/es/v1/RippleEffect/RippleEffect.js +0 -25
- package/es/v1/RippleEffect/props/defaultProps.js +0 -10
- package/es/v1/RippleEffect/props/propTypes.js +0 -12
- package/es/v1/Select/GroupSelect.js +0 -818
- package/es/v1/Select/Select.js +0 -975
- package/es/v1/Select/SelectWithAvatar.js +0 -356
- package/es/v1/Select/SelectWithIcon.js +0 -545
- package/es/v1/Select/index.js +0 -4
- package/es/v1/Select/props/defaultProps.js +0 -126
- package/es/v1/Select/props/propTypes.js +0 -297
- package/es/v1/Stencils/Stencils.js +0 -26
- package/es/v1/Stencils/props/defaultProps.js +0 -6
- package/es/v1/Stencils/props/propTypes.js +0 -7
- package/es/v1/Switch/Switch.js +0 -138
- package/es/v1/Switch/__tests__/Switch.spec.js +0 -30
- package/es/v1/Switch/__tests__/__snapshots__/Switch.spec.js.snap +0 -135
- package/es/v1/Switch/contants/index.js +0 -24
- package/es/v1/Switch/css/Switch_v1.module.css +0 -134
- package/es/v1/Switch/css/cssJSLogic.js +0 -48
- package/es/v1/Switch/props/defaultProps.js +0 -11
- package/es/v1/Switch/props/propTypes.js +0 -36
- package/es/v1/Switch/useSwitch.js +0 -33
- package/es/v1/Tab/Tab.js +0 -106
- package/es/v1/Tab/TabContent.js +0 -30
- package/es/v1/Tab/TabContentWrapper.js +0 -33
- package/es/v1/Tab/TabWrapper.js +0 -55
- package/es/v1/Tab/Tabs.js +0 -619
- package/es/v1/Tab/index.js +0 -5
- package/es/v1/Tab/props/defaultProps.js +0 -51
- package/es/v1/Tab/props/propTypes.js +0 -117
- package/es/v1/Tab/v1Tab.module.css +0 -100
- package/es/v1/Tab/v1TabContent.module.css +0 -4
- package/es/v1/Tab/v1Tabs.module.css +0 -167
- package/es/v1/Tag/Tag.js +0 -140
- package/es/v1/Tag/props/defaultProps.js +0 -15
- package/es/v1/Tag/props/propTypes.js +0 -36
- package/es/v1/TextBox/TextBox.js +0 -160
- package/es/v1/TextBox/props/defaultProps.js +0 -20
- package/es/v1/TextBox/props/propTypes.js +0 -56
- package/es/v1/TextBoxIcon/TextBoxIcon.js +0 -166
- package/es/v1/TextBoxIcon/props/defaultProps.js +0 -24
- package/es/v1/TextBoxIcon/props/propTypes.js +0 -53
- package/es/v1/Textarea/Textarea.js +0 -100
- package/es/v1/Textarea/props/defaultProps.js +0 -17
- package/es/v1/Textarea/props/propTypes.js +0 -31
- package/es/v1/Tooltip/Tooltip.js +0 -530
- package/es/v1/Tooltip/props/defaultProps.js +0 -4
- package/es/v1/Tooltip/props/propTypes.js +0 -5
- package/es/v1/Typography/Typography.js +0 -38
- package/es/v1/Typography/css/cssJSLogic.js +0 -56
- package/es/v1/Typography/css/v1_Typography.module.css +0 -380
- package/es/v1/Typography/props/defaultProps.js +0 -8
- package/es/v1/Typography/props/propTypes.js +0 -27
- package/es/v1/Typography/utils/index.js +0 -50
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -69
- package/es/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +0 -7
- package/es/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -12
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +0 -99
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +0 -15
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -19
- package/es/v1/semantic/Button/Button.js +0 -53
- package/es/v1/semantic/Button/props/defaultProps.js +0 -12
- package/es/v1/semantic/Button/props/propTypes.js +0 -22
- package/es/v1/semantic/index.js +0 -1
- package/lib/Accordion/Accordion.js +0 -134
- package/lib/Accordion/AccordionItem.js +0 -111
- package/lib/Accordion/__tests__/Accordion.spec.js +0 -18
- package/lib/Accordion/__tests__/AccordionItem.spec.js +0 -24
- package/lib/Accordion/__tests__/__snapshots__/Accordion.spec.js.snap +0 -12
- package/lib/Accordion/__tests__/__snapshots__/AccordionItem.spec.js.snap +0 -23
- package/lib/Accordion/index.js +0 -23
- package/lib/Accordion/props/defaultProps.js +0 -20
- package/lib/Accordion/props/propTypes.js +0 -45
- package/lib/Animation/Animation.js +0 -102
- package/lib/Animation/__tests__/Animation.spec.js +0 -21
- package/lib/Animation/__tests__/__snapshots__/Animation.spec.js.snap +0 -11
- package/lib/Animation/props/defaultProps.js +0 -14
- package/lib/Animation/props/propTypes.js +0 -23
- package/lib/Animation/utils.js +0 -94
- package/lib/AppContainer/AppContainer.js +0 -210
- package/lib/AppContainer/AppContainer.module.css +0 -18
- package/lib/AppContainer/__tests__/AppContainer.spec.js +0 -90
- package/lib/AppContainer/__tests__/__snapshots__/AppContainer.spec.js.snap +0 -201
- package/lib/AppContainer/props/defaultProps.js +0 -17
- package/lib/AppContainer/props/propTypes.js +0 -28
- package/lib/Avatar/Avatar.js +0 -253
- package/lib/Avatar/Avatar.module.css +0 -176
- package/lib/Avatar/__tests__/Avatar.spec.js +0 -188
- package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +0 -591
- package/lib/Avatar/props/defaultProps.js +0 -24
- package/lib/Avatar/props/propTypes.js +0 -37
- package/lib/AvatarTeam/AvatarTeam.js +0 -133
- package/lib/AvatarTeam/AvatarTeam.module.css +0 -189
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -145
- package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +0 -705
- package/lib/AvatarTeam/props/defaultProps.js +0 -24
- package/lib/AvatarTeam/props/propTypes.js +0 -40
- package/lib/Button/Button.js +0 -91
- package/lib/Button/__tests__/Button.spec.js +0 -256
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -412
- package/lib/Button/css/Button.module.css +0 -613
- package/lib/Button/css/cssJSLogic.js +0 -45
- package/lib/Button/index.js +0 -23
- package/lib/Button/props/defaultProps.js +0 -27
- package/lib/Button/props/propTypes.js +0 -40
- package/lib/Buttongroup/Buttongroup.js +0 -100
- package/lib/Buttongroup/Buttongroup.module.css +0 -105
- package/lib/Buttongroup/__tests__/Buttongroup.spec.js +0 -44
- package/lib/Buttongroup/__tests__/__snapshots__/Buttongroup.spec.js.snap +0 -191
- package/lib/Buttongroup/props/defaultProps.js +0 -13
- package/lib/Buttongroup/props/propTypes.js +0 -20
- package/lib/Card/Card.js +0 -399
- package/lib/Card/Card.module.css +0 -20
- package/lib/Card/__tests__/Card.spec.js +0 -135
- package/lib/Card/__tests__/__snapshots__/Card.spec.js.snap +0 -56
- package/lib/Card/index.js +0 -37
- package/lib/Card/props/defaultProps.js +0 -36
- package/lib/Card/props/propTypes.js +0 -63
- package/lib/CheckBox/CheckBox.js +0 -223
- package/lib/CheckBox/CheckBox.module.css +0 -160
- package/lib/CheckBox/__tests__/CheckBox.spec.js +0 -248
- package/lib/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +0 -1878
- package/lib/CheckBox/props/defaultProps.js +0 -25
- package/lib/CheckBox/props/propTypes.js +0 -53
- package/lib/DateTime/CalendarView.js +0 -290
- package/lib/DateTime/DateTime.js +0 -879
- package/lib/DateTime/DateTime.module.css +0 -249
- package/lib/DateTime/DateTimePopupFooter.js +0 -96
- package/lib/DateTime/DateTimePopupHeader.js +0 -166
- package/lib/DateTime/DateWidget.js +0 -1173
- package/lib/DateTime/DateWidget.module.css +0 -39
- package/lib/DateTime/DaysRow.js +0 -81
- package/lib/DateTime/Time.js +0 -270
- package/lib/DateTime/YearView.js +0 -325
- package/lib/DateTime/YearView.module.css +0 -99
- package/lib/DateTime/__tests__/CalendarView.spec.js +0 -20
- package/lib/DateTime/__tests__/DateTime.spec.js +0 -28
- package/lib/DateTime/__tests__/DateTimePopupFooter.spec.js +0 -18
- package/lib/DateTime/__tests__/DateTimePopupHeader.spec.js +0 -18
- package/lib/DateTime/__tests__/DateWidget.spec.js +0 -18
- package/lib/DateTime/__tests__/DaysRow.spec.js +0 -20
- package/lib/DateTime/__tests__/Time.spec.js +0 -18
- package/lib/DateTime/__tests__/YearView.spec.js +0 -17
- package/lib/DateTime/__tests__/__snapshots__/CalendarView.spec.js.snap +0 -312
- package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +0 -938
- package/lib/DateTime/__tests__/__snapshots__/DateTimePopupFooter.spec.js.snap +0 -34
- package/lib/DateTime/__tests__/__snapshots__/DateTimePopupHeader.spec.js.snap +0 -72
- package/lib/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +0 -79
- package/lib/DateTime/__tests__/__snapshots__/DaysRow.spec.js.snap +0 -12
- package/lib/DateTime/__tests__/__snapshots__/Time.spec.js.snap +0 -310
- package/lib/DateTime/common.js +0 -36
- package/lib/DateTime/constants.js +0 -77
- package/lib/DateTime/dateFormatUtils/dateFormat.js +0 -627
- package/lib/DateTime/dateFormatUtils/dateFormats.js +0 -50
- package/lib/DateTime/dateFormatUtils/dayChange.js +0 -83
- package/lib/DateTime/dateFormatUtils/index.js +0 -307
- package/lib/DateTime/dateFormatUtils/monthChange.js +0 -96
- package/lib/DateTime/dateFormatUtils/timeChange.js +0 -240
- package/lib/DateTime/dateFormatUtils/yearChange.js +0 -121
- package/lib/DateTime/index.js +0 -15
- package/lib/DateTime/objectUtils.js +0 -76
- package/lib/DateTime/props/defaultProps.js +0 -78
- package/lib/DateTime/props/propTypes.js +0 -235
- package/lib/DateTime/typeChecker.js +0 -26
- package/lib/DateTime/validator.js +0 -353
- package/lib/DropBox/DropBox.js +0 -109
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +0 -150
- package/lib/DropBox/DropBoxElement/__tests__/DropBoxElement.spec.js +0 -35
- package/lib/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +0 -95
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +0 -442
- package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +0 -81
- package/lib/DropBox/DropBoxElement/props/defaultProps.js +0 -25
- package/lib/DropBox/DropBoxElement/props/propTypes.js +0 -62
- package/lib/DropBox/DropBoxElement/useDropboxPosCalc.js +0 -60
- package/lib/DropBox/DropBoxPositionMapping.js +0 -149
- package/lib/DropBox/__tests__/DropBox.spec.js +0 -18
- package/lib/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +0 -36
- package/lib/DropBox/css/DropBox.module.css +0 -59
- package/lib/DropBox/css/cssJSLogic.js +0 -20
- package/lib/DropBox/props/defaultProps.js +0 -30
- package/lib/DropBox/props/propTypes.js +0 -35
- package/lib/DropBox/utils/isMobilePopover.js +0 -25
- package/lib/DropDown/DropDown.js +0 -171
- package/lib/DropDown/DropDown.module.css +0 -5
- package/lib/DropDown/DropDownHeading.js +0 -93
- package/lib/DropDown/DropDownHeading.module.css +0 -53
- package/lib/DropDown/DropDownItem.js +0 -127
- package/lib/DropDown/DropDownItem.module.css +0 -94
- package/lib/DropDown/DropDownSearch.js +0 -117
- package/lib/DropDown/DropDownSearch.module.css +0 -14
- package/lib/DropDown/DropDownSeparator.js +0 -64
- package/lib/DropDown/DropDownSeparator.module.css +0 -7
- package/lib/DropDown/__tests__/DropDown.spec.js +0 -18
- package/lib/DropDown/__tests__/DropDownHeading.spec.js +0 -18
- package/lib/DropDown/__tests__/DropDownItem.spec.js +0 -18
- package/lib/DropDown/__tests__/DropDownSearch.spec.js +0 -18
- package/lib/DropDown/__tests__/DropDownSeparator.spec.js +0 -18
- package/lib/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +0 -54
- package/lib/DropDown/__tests__/__snapshots__/DropDownHeading.spec.js.snap +0 -12
- package/lib/DropDown/__tests__/__snapshots__/DropDownItem.spec.js.snap +0 -11
- package/lib/DropDown/__tests__/__snapshots__/DropDownSearch.spec.js.snap +0 -20
- package/lib/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +0 -9
- package/lib/DropDown/index.js +0 -65
- package/lib/DropDown/props/defaultProps.js +0 -31
- package/lib/DropDown/props/propTypes.js +0 -87
- package/lib/Heading/Heading.js +0 -94
- package/lib/Heading/Heading.module.css +0 -5
- package/lib/Heading/__tests__/Heading.spec.js +0 -27
- package/lib/Heading/__tests__/__snapshots__/Heading.spec.js.snap +0 -63
- package/lib/Heading/props/defaultProps.js +0 -12
- package/lib/Heading/props/propTypes.js +0 -23
- package/lib/Label/Label.js +0 -97
- package/lib/Label/Label.module.css +0 -57
- package/lib/Label/LabelColors.module.css +0 -21
- package/lib/Label/__tests__/Label.spec.js +0 -106
- package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -312
- package/lib/Label/props/defaultProps.js +0 -18
- package/lib/Label/props/propTypes.js +0 -30
- package/lib/Layout/Box.js +0 -128
- package/lib/Layout/Container.js +0 -145
- package/lib/Layout/Layout.module.css +0 -336
- package/lib/Layout/__tests__/Box.spec.js +0 -18
- package/lib/Layout/__tests__/Container.spec.js +0 -18
- package/lib/Layout/__tests__/__snapshots__/Box.spec.js.snap +0 -16
- package/lib/Layout/__tests__/__snapshots__/Container.spec.js.snap +0 -16
- package/lib/Layout/index.js +0 -23
- package/lib/Layout/props/defaultProps.js +0 -24
- package/lib/Layout/props/propTypes.js +0 -58
- package/lib/Layout/utils.js +0 -59
- package/lib/ListItem/ListContainer.js +0 -129
- package/lib/ListItem/ListItem.js +0 -204
- package/lib/ListItem/ListItem.module.css +0 -261
- package/lib/ListItem/ListItemWithAvatar.js +0 -234
- package/lib/ListItem/ListItemWithCheckBox.js +0 -195
- package/lib/ListItem/ListItemWithIcon.js +0 -213
- package/lib/ListItem/ListItemWithRadio.js +0 -198
- package/lib/ListItem/__tests__/ListContainer.spec.js +0 -26
- package/lib/ListItem/__tests__/ListItem.spec.js +0 -18
- package/lib/ListItem/__tests__/ListItemWithAvatar.spec.js +0 -53
- package/lib/ListItem/__tests__/ListItemWithCheckBox.spec.js +0 -53
- package/lib/ListItem/__tests__/ListItemWithIcon.spec.js +0 -53
- package/lib/ListItem/__tests__/ListItemWithRadio.spec.js +0 -53
- package/lib/ListItem/__tests__/__snapshots__/ListContainer.spec.js.snap +0 -27
- package/lib/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +0 -29
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +0 -222
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +0 -492
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +0 -222
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +0 -487
- package/lib/ListItem/index.js +0 -55
- package/lib/ListItem/props/defaultProps.js +0 -117
- package/lib/ListItem/props/propTypes.js +0 -214
- package/lib/Modal/Modal.js +0 -236
- package/lib/Modal/Portal/Portal.js +0 -46
- package/lib/Modal/Portal/__tests__/Portal.spec.js +0 -37
- package/lib/Modal/Portal/__tests__/__snapshots__/Portal.spec.js.snap +0 -30
- package/lib/Modal/Portal/props/defaultProps.js +0 -10
- package/lib/Modal/Portal/props/propTypes.js +0 -16
- package/lib/Modal/__tests__/Modal.spec.js +0 -22
- package/lib/Modal/__tests__/__snapshots__/Modal.spec.js.snap +0 -26
- package/lib/Modal/props/defaultProps.js +0 -10
- package/lib/Modal/props/propTypes.js +0 -18
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +0 -1198
- package/lib/MultiSelect/AdvancedMultiSelect.js +0 -673
- package/lib/MultiSelect/EmptyState.js +0 -114
- package/lib/MultiSelect/MobileHeader/MobileHeader.js +0 -62
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +0 -16
- package/lib/MultiSelect/MobileHeader/__tests__/MobileHeader.spec.js +0 -18
- package/lib/MultiSelect/MobileHeader/__tests__/__snapshots__/MobileHeader.spec.js.snap +0 -39
- package/lib/MultiSelect/MobileHeader/props/defaultProps.js +0 -14
- package/lib/MultiSelect/MobileHeader/props/propTypes.js +0 -18
- package/lib/MultiSelect/MultiSelect.js +0 -1269
- package/lib/MultiSelect/MultiSelect.module.css +0 -216
- package/lib/MultiSelect/MultiSelectHeader.js +0 -78
- package/lib/MultiSelect/MultiSelectWithAvatar.js +0 -276
- package/lib/MultiSelect/SelectedOptions.js +0 -132
- package/lib/MultiSelect/SelectedOptions.module.css +0 -15
- package/lib/MultiSelect/Suggestions.js +0 -279
- package/lib/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +0 -20
- package/lib/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +0 -56
- package/lib/MultiSelect/__tests__/EmptyState.spec.js +0 -22
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +0 -43
- package/lib/MultiSelect/__tests__/MultiSelectHeader.spec.js +0 -28
- package/lib/MultiSelect/__tests__/MultiSelectWithAvatar.spec.js +0 -18
- package/lib/MultiSelect/__tests__/SelectedOptions.spec.js +0 -35
- package/lib/MultiSelect/__tests__/Suggestions.spec.js +0 -78
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +0 -74
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +0 -534
- package/lib/MultiSelect/__tests__/__snapshots__/EmptyState.spec.js.snap +0 -12
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +0 -339
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelectHeader.spec.js.snap +0 -63
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelectWithAvatar.spec.js.snap +0 -85
- package/lib/MultiSelect/__tests__/__snapshots__/SelectedOptions.spec.js.snap +0 -80
- package/lib/MultiSelect/__tests__/__snapshots__/Suggestions.spec.js.snap +0 -363
- package/lib/MultiSelect/constants.js +0 -13
- package/lib/MultiSelect/index.js +0 -39
- package/lib/MultiSelect/props/defaultProps.js +0 -189
- package/lib/MultiSelect/props/propTypes.js +0 -325
- package/lib/PopOver/PopOver.js +0 -293
- package/lib/PopOver/PopOver.module.css +0 -9
- package/lib/PopOver/__tests__/PopOver.spec.js +0 -18
- package/lib/PopOver/__tests__/__snapshots__/PopOver.spec.js.snap +0 -13
- package/lib/PopOver/index.js +0 -31
- package/lib/PopOver/props/defaultProps.js +0 -15
- package/lib/PopOver/props/propTypes.js +0 -66
- package/lib/Popup/Popup.js +0 -1169
- package/lib/Popup/PositionMapping.js +0 -81
- package/lib/Popup/Registry.js +0 -46
- package/lib/Popup/intersectionObserver.js +0 -72
- package/lib/Popup/props/propTypes.js +0 -51
- package/lib/Popup/viewPort.js +0 -367
- package/lib/Provider/AvatarSize.js +0 -24
- package/lib/Provider/Config.js +0 -30
- package/lib/Provider/CssProvider.js +0 -27
- package/lib/Provider/IdProvider.js +0 -80
- package/lib/Provider/LibraryContext.js +0 -94
- package/lib/Provider/LibraryContextInit.js +0 -15
- package/lib/Provider/NumberGenerator/NumberGenerator.js +0 -174
- package/lib/Provider/ZindexProvider.js +0 -69
- package/lib/Provider/index.js +0 -81
- package/lib/Radio/Radio.js +0 -189
- package/lib/Radio/Radio.module.css +0 -115
- package/lib/Radio/__tests__/Radio.spec.js +0 -246
- package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +0 -1916
- package/lib/Radio/props/defaultProps.js +0 -22
- package/lib/Radio/props/propTypes.js +0 -52
- package/lib/Responsive/CustomResponsive.js +0 -242
- package/lib/Responsive/RefWrapper.js +0 -56
- package/lib/Responsive/ResizeComponent.js +0 -268
- package/lib/Responsive/ResizeObserver.js +0 -100
- package/lib/Responsive/ResizeObserverWithPolyfill.js +0 -168
- package/lib/Responsive/Responsive.js +0 -274
- package/lib/Responsive/index.js +0 -55
- package/lib/Responsive/props/defaultProps.js +0 -23
- package/lib/Responsive/props/propTypes.js +0 -39
- package/lib/Responsive/sizeObservers.js +0 -214
- package/lib/Responsive/utils/index.js +0 -70
- package/lib/Responsive/utils/shallowCompare.js +0 -38
- package/lib/Responsive/windowResizeObserver.js +0 -63
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +0 -124
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +0 -6
- package/lib/ResponsiveDropBox/__tests__/ResponsiveDropBox.spec.js +0 -18
- package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +0 -42
- package/lib/ResponsiveDropBox/props/defaultProps.js +0 -11
- package/lib/ResponsiveDropBox/props/propTypes.js +0 -27
- package/lib/Ribbon/Ribbon.js +0 -98
- package/lib/Ribbon/Ribbon.module.css +0 -500
- package/lib/Ribbon/__tests__/Ribbon.spec.js +0 -59
- package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +0 -374
- package/lib/Ribbon/props/defaultProps.js +0 -16
- package/lib/Ribbon/props/propTypes.js +0 -22
- package/lib/RippleEffect/RippleEffect.js +0 -45
- package/lib/RippleEffect/RippleEffect.module.css +0 -109
- package/lib/RippleEffect/__tests__/RippleEffect.spec.js +0 -76
- package/lib/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +0 -161
- package/lib/RippleEffect/props/defaultProps.js +0 -17
- package/lib/RippleEffect/props/propTypes.js +0 -23
- package/lib/Select/GroupSelect.js +0 -901
- package/lib/Select/Select.js +0 -1067
- package/lib/Select/Select.module.css +0 -138
- package/lib/Select/SelectWithAvatar.js +0 -408
- package/lib/Select/SelectWithIcon.js +0 -632
- package/lib/Select/__tests__/GroupSelect.spec.js +0 -27
- package/lib/Select/__tests__/Select.spec.js +0 -1398
- package/lib/Select/__tests__/SelectWithAvatar.spec.js +0 -20
- package/lib/Select/__tests__/SelectWithIcon.spec.js +0 -20
- package/lib/Select/__tests__/__snapshots__/GroupSelect.spec.js.snap +0 -90
- package/lib/Select/__tests__/__snapshots__/Select.spec.js.snap +0 -10446
- package/lib/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +0 -45
- package/lib/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +0 -108
- package/lib/Select/index.js +0 -39
- package/lib/Select/props/defaultProps.js +0 -129
- package/lib/Select/props/propTypes.js +0 -333
- package/lib/Stencils/Stencils.js +0 -72
- package/lib/Stencils/Stencils.module.css +0 -100
- package/lib/Stencils/__tests__/Stencils.spec.js +0 -61
- package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +0 -105
- package/lib/Stencils/props/defaultProps.js +0 -14
- package/lib/Stencils/props/propTypes.js +0 -19
- package/lib/Switch/Switch.js +0 -152
- package/lib/Switch/Switch.module.css +0 -128
- package/lib/Switch/__tests__/Switch.spec.js +0 -163
- package/lib/Switch/__tests__/__snapshots__/Switch.spec.js.snap +0 -831
- package/lib/Switch/props/defaultProps.js +0 -18
- package/lib/Switch/props/propTypes.js +0 -39
- package/lib/Tab/Tab.js +0 -134
- package/lib/Tab/Tab.module.css +0 -100
- package/lib/Tab/TabContent.js +0 -42
- package/lib/Tab/TabContent.module.css +0 -4
- package/lib/Tab/TabContentWrapper.js +0 -47
- package/lib/Tab/TabWrapper.js +0 -91
- package/lib/Tab/Tabs.js +0 -787
- package/lib/Tab/Tabs.module.css +0 -167
- package/lib/Tab/__tests__/Tab.spec.js +0 -18
- package/lib/Tab/__tests__/TabContent.spec.js +0 -18
- package/lib/Tab/__tests__/TabContentWrapper.spec.js +0 -18
- package/lib/Tab/__tests__/TabLayout.spec.js +0 -41
- package/lib/Tab/__tests__/TabWrapper.spec.js +0 -18
- package/lib/Tab/__tests__/Tabs.spec.js +0 -18
- package/lib/Tab/__tests__/__snapshots__/Tab.spec.js.snap +0 -22
- package/lib/Tab/__tests__/__snapshots__/TabContent.spec.js.snap +0 -19
- package/lib/Tab/__tests__/__snapshots__/TabContentWrapper.spec.js.snap +0 -12
- package/lib/Tab/__tests__/__snapshots__/TabLayout.spec.js.snap +0 -341
- package/lib/Tab/__tests__/__snapshots__/TabWrapper.spec.js.snap +0 -20
- package/lib/Tab/__tests__/__snapshots__/Tabs.spec.js.snap +0 -33
- package/lib/Tab/index.js +0 -47
- package/lib/Tab/props/defaultProps.js +0 -62
- package/lib/Tab/props/propTypes.js +0 -132
- package/lib/Tab/utils/tabConfigs.js +0 -27
- package/lib/Tag/Tag.js +0 -219
- package/lib/Tag/Tag.module.css +0 -254
- package/lib/Tag/__tests__/Tag.spec.js +0 -270
- package/lib/Tag/__tests__/__snapshots__/Tag.spec.js.snap +0 -3074
- package/lib/Tag/props/defaultProps.js +0 -23
- package/lib/Tag/props/propTypes.js +0 -55
- package/lib/TextBox/TextBox.js +0 -233
- package/lib/TextBox/TextBox.module.css +0 -197
- package/lib/TextBox/__tests__/TextBox.spec.js +0 -334
- package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -615
- package/lib/TextBox/props/defaultProps.js +0 -27
- package/lib/TextBox/props/propTypes.js +0 -64
- package/lib/TextBoxIcon/TextBoxIcon.js +0 -253
- package/lib/TextBoxIcon/TextBoxIcon.module.css +0 -79
- package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -279
- package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -1784
- package/lib/TextBoxIcon/props/defaultProps.js +0 -31
- package/lib/TextBoxIcon/props/propTypes.js +0 -74
- package/lib/Textarea/Textarea.js +0 -168
- package/lib/Textarea/Textarea.module.css +0 -148
- package/lib/Textarea/__tests__/Textarea.spec.js +0 -273
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -525
- package/lib/Textarea/props/defaultProps.js +0 -25
- package/lib/Textarea/props/propTypes.js +0 -46
- package/lib/Tooltip/Tooltip.js +0 -599
- package/lib/Tooltip/Tooltip.module.css +0 -133
- package/lib/Tooltip/props/defaultProps.js +0 -11
- package/lib/Tooltip/props/propTypes.js +0 -16
- package/lib/Typography/Typography.js +0 -56
- package/lib/Typography/css/Typography.module.css +0 -489
- package/lib/Typography/css/cssJSLogic.js +0 -48
- package/lib/Typography/props/defaultProps.js +0 -15
- package/lib/Typography/props/propTypes.js +0 -38
- package/lib/Typography/utils/index.js +0 -59
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -126
- package/lib/VelocityAnimation/VelocityAnimation/__tests__/VelocityAnimation.spec.js +0 -18
- package/lib/VelocityAnimation/VelocityAnimation/__tests__/__snapshots__/VelocityAnimation.spec.js.snap +0 -9
- package/lib/VelocityAnimation/VelocityAnimation/props/defaultProps.js +0 -14
- package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -23
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +0 -216
- package/lib/VelocityAnimation/VelocityAnimationGroup/__tests__/VelocityAnimationGroup.spec.js +0 -26
- package/lib/VelocityAnimation/VelocityAnimationGroup/__tests__/__snapshots__/VelocityAnimationGroup.spec.js.snap +0 -11
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +0 -22
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -33
- package/lib/VelocityAnimation/index.js +0 -23
- package/lib/common/a11y.module.css +0 -4
- package/lib/common/animation.module.css +0 -624
- package/lib/common/avatarsizes.module.css +0 -49
- package/lib/common/basic.module.css +0 -31
- package/lib/common/basicReset.module.css +0 -40
- package/lib/common/boxShadow.module.css +0 -34
- package/lib/common/common.module.css +0 -559
- package/lib/common/customscroll.module.css +0 -142
- package/lib/common/reset.module.css +0 -13
- package/lib/common/transition.module.css +0 -146
- package/lib/components_layer.module.css +0 -1
- package/lib/css.js +0 -83
- package/lib/deprecated/PortalLayer/PortalLayer.js +0 -153
- package/lib/deprecated/PortalLayer/props/defaultProps.js +0 -12
- package/lib/deprecated/PortalLayer/props/propTypes.js +0 -32
- package/lib/deprecated/Switch/Switch.js +0 -108
- package/lib/deprecated/Switch/props/defaultProps.js +0 -18
- package/lib/deprecated/Switch/props/propTypes.js +0 -39
- package/lib/index.js +0 -417
- package/lib/semantic/Button/Button.js +0 -104
- package/lib/semantic/Button/__tests__/Button.spec.js +0 -18
- package/lib/semantic/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -15
- package/lib/semantic/Button/props/defaultProps.js +0 -19
- package/lib/semantic/Button/props/propTypes.js +0 -33
- package/lib/semantic/Button/semanticButton.module.css +0 -9
- package/lib/semantic/index.js +0 -15
- package/lib/utils/Common.js +0 -521
- package/lib/utils/ContextOptimizer.js +0 -49
- package/lib/utils/constant.js +0 -10
- package/lib/utils/constructFullName.js +0 -34
- package/lib/utils/cssUtils.js +0 -22
- package/lib/utils/datetime/GMTZones.js +0 -55
- package/lib/utils/datetime/common.js +0 -251
- package/lib/utils/debounce.js +0 -30
- package/lib/utils/dropDownUtils.js +0 -691
- package/lib/utils/dummyFunction.js +0 -10
- package/lib/utils/getHTMLFontSize.js +0 -11
- package/lib/utils/getInitial.js +0 -33
- package/lib/utils/index.js +0 -103
- package/lib/utils/scrollTo.js +0 -22
- package/lib/utils/shallowEqual.js +0 -41
- package/lib/v1/Accordion/Accordion.js +0 -98
- package/lib/v1/Accordion/AccordionItem.js +0 -68
- package/lib/v1/Accordion/index.js +0 -23
- package/lib/v1/Accordion/props/defaultProps.js +0 -20
- package/lib/v1/Accordion/props/propTypes.js +0 -45
- package/lib/v1/Animation/Animation.js +0 -61
- package/lib/v1/Animation/props/defaultProps.js +0 -14
- package/lib/v1/Animation/props/propTypes.js +0 -23
- package/lib/v1/Animation/utils.js +0 -94
- package/lib/v1/AppContainer/AppContainer.js +0 -146
- package/lib/v1/AppContainer/props/defaultProps.js +0 -17
- package/lib/v1/AppContainer/props/propTypes.js +0 -28
- package/lib/v1/Avatar/Avatar.js +0 -191
- package/lib/v1/Avatar/props/defaultProps.js +0 -24
- package/lib/v1/Avatar/props/propTypes.js +0 -37
- package/lib/v1/AvatarTeam/AvatarTeam.js +0 -81
- package/lib/v1/AvatarTeam/props/defaultProps.js +0 -24
- package/lib/v1/AvatarTeam/props/propTypes.js +0 -38
- package/lib/v1/Button/Button.js +0 -82
- package/lib/v1/Button/props/defaultProps.js +0 -27
- package/lib/v1/Button/props/propTypes.js +0 -40
- package/lib/v1/Buttongroup/Buttongroup.js +0 -44
- package/lib/v1/Buttongroup/props/defaultProps.js +0 -13
- package/lib/v1/Buttongroup/props/propTypes.js +0 -20
- package/lib/v1/Card/Card.js +0 -269
- package/lib/v1/Card/index.js +0 -37
- package/lib/v1/Card/props/defaultProps.js +0 -35
- package/lib/v1/Card/props/propTypes.js +0 -62
- package/lib/v1/CheckBox/CheckBox.js +0 -172
- package/lib/v1/CheckBox/props/defaultProps.js +0 -25
- package/lib/v1/CheckBox/props/propTypes.js +0 -52
- package/lib/v1/DateTime/CalendarView.js +0 -322
- package/lib/v1/DateTime/DateTime.js +0 -877
- package/lib/v1/DateTime/DateTimePopupFooter.js +0 -96
- package/lib/v1/DateTime/DateTimePopupHeader.js +0 -166
- package/lib/v1/DateTime/DateWidget.js +0 -1163
- package/lib/v1/DateTime/DaysRow.js +0 -81
- package/lib/v1/DateTime/Time.js +0 -270
- package/lib/v1/DateTime/YearView.js +0 -325
- package/lib/v1/DateTime/index.js +0 -15
- package/lib/v1/DateTime/props/defaultProps.js +0 -76
- package/lib/v1/DateTime/props/propTypes.js +0 -238
- package/lib/v1/DropBox/DropBox.js +0 -109
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +0 -146
- package/lib/v1/DropBox/DropBoxElement/props/defaultProps.js +0 -25
- package/lib/v1/DropBox/DropBoxElement/props/propTypes.js +0 -62
- package/lib/v1/DropBox/props/defaultProps.js +0 -30
- package/lib/v1/DropBox/props/propTypes.js +0 -35
- package/lib/v1/DropBox/utils/isMobilePopover.js +0 -25
- package/lib/v1/DropDown/DropDown.js +0 -74
- package/lib/v1/DropDown/DropDownHeading.js +0 -47
- package/lib/v1/DropDown/DropDownItem.js +0 -75
- package/lib/v1/DropDown/DropDownSearch.js +0 -77
- package/lib/v1/DropDown/DropDownSeparator.js +0 -24
- package/lib/v1/DropDown/props/defaultProps.js +0 -31
- package/lib/v1/DropDown/props/propTypes.js +0 -87
- package/lib/v1/Heading/Heading.js +0 -53
- package/lib/v1/Heading/props/defaultProps.js +0 -12
- package/lib/v1/Heading/props/propTypes.js +0 -23
- package/lib/v1/Label/Label.js +0 -51
- package/lib/v1/Label/props/defaultProps.js +0 -18
- package/lib/v1/Label/props/propTypes.js +0 -30
- package/lib/v1/Layout/Box.js +0 -128
- package/lib/v1/Layout/Container.js +0 -145
- package/lib/v1/Layout/index.js +0 -23
- package/lib/v1/Layout/props/defaultProps.js +0 -24
- package/lib/v1/Layout/props/propTypes.js +0 -58
- package/lib/v1/ListItem/ListContainer.js +0 -128
- package/lib/v1/ListItem/ListItem.js +0 -138
- package/lib/v1/ListItem/ListItemWithAvatar.js +0 -167
- package/lib/v1/ListItem/ListItemWithCheckBox.js +0 -126
- package/lib/v1/ListItem/ListItemWithIcon.js +0 -143
- package/lib/v1/ListItem/ListItemWithRadio.js +0 -127
- package/lib/v1/ListItem/index.js +0 -55
- package/lib/v1/ListItem/props/defaultProps.js +0 -109
- package/lib/v1/ListItem/props/propTypes.js +0 -196
- package/lib/v1/Modal/Modal.js +0 -166
- package/lib/v1/Modal/props/defaultProps.js +0 -10
- package/lib/v1/Modal/props/propTypes.js +0 -18
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +0 -1180
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +0 -649
- package/lib/v1/MultiSelect/EmptyState.js +0 -112
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +0 -62
- package/lib/v1/MultiSelect/MobileHeader/props/defaultProps.js +0 -14
- package/lib/v1/MultiSelect/MobileHeader/props/propTypes.js +0 -18
- package/lib/v1/MultiSelect/MultiSelect.js +0 -1202
- package/lib/v1/MultiSelect/MultiSelectHeader.js +0 -78
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +0 -262
- package/lib/v1/MultiSelect/SelectedOptions.js +0 -130
- package/lib/v1/MultiSelect/Suggestions.js +0 -196
- package/lib/v1/MultiSelect/index.js +0 -39
- package/lib/v1/MultiSelect/props/defaultProps.js +0 -181
- package/lib/v1/MultiSelect/props/propTypes.js +0 -350
- package/lib/v1/PopOver/PopOver.js +0 -197
- package/lib/v1/PopOver/props/defaultProps.js +0 -15
- package/lib/v1/PopOver/props/propTypes.js +0 -66
- package/lib/v1/Popup/Popup.js +0 -715
- package/lib/v1/Radio/Radio.js +0 -141
- package/lib/v1/Radio/props/defaultProps.js +0 -22
- package/lib/v1/Radio/props/propTypes.js +0 -51
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +0 -79
- package/lib/v1/ResponsiveDropBox/props/defaultProps.js +0 -11
- package/lib/v1/ResponsiveDropBox/props/propTypes.js +0 -27
- package/lib/v1/Ribbon/Ribbon.js +0 -44
- package/lib/v1/Ribbon/props/defaultProps.js +0 -16
- package/lib/v1/Ribbon/props/propTypes.js +0 -22
- package/lib/v1/RippleEffect/RippleEffect.js +0 -40
- package/lib/v1/RippleEffect/props/defaultProps.js +0 -17
- package/lib/v1/RippleEffect/props/propTypes.js +0 -23
- package/lib/v1/Select/GroupSelect.js +0 -894
- package/lib/v1/Select/Select.js +0 -1025
- package/lib/v1/Select/SelectWithAvatar.js +0 -406
- package/lib/v1/Select/SelectWithIcon.js +0 -607
- package/lib/v1/Select/index.js +0 -39
- package/lib/v1/Select/props/defaultProps.js +0 -125
- package/lib/v1/Select/props/propTypes.js +0 -319
- package/lib/v1/Stencils/Stencils.js +0 -43
- package/lib/v1/Stencils/props/defaultProps.js +0 -13
- package/lib/v1/Stencils/props/propTypes.js +0 -18
- package/lib/v1/Switch/Switch.js +0 -159
- package/lib/v1/Switch/__tests__/Switch.spec.js +0 -37
- package/lib/v1/Switch/__tests__/__snapshots__/Switch.spec.js.snap +0 -135
- package/lib/v1/Switch/contants/index.js +0 -34
- package/lib/v1/Switch/css/Switch_v1.module.css +0 -134
- package/lib/v1/Switch/css/cssJSLogic.js +0 -37
- package/lib/v1/Switch/props/defaultProps.js +0 -18
- package/lib/v1/Switch/props/propTypes.js +0 -47
- package/lib/v1/Switch/useSwitch.js +0 -56
- package/lib/v1/Tab/Tab.js +0 -132
- package/lib/v1/Tab/TabContent.js +0 -42
- package/lib/v1/Tab/TabContentWrapper.js +0 -47
- package/lib/v1/Tab/TabWrapper.js +0 -89
- package/lib/v1/Tab/Tabs.js +0 -688
- package/lib/v1/Tab/index.js +0 -47
- package/lib/v1/Tab/props/defaultProps.js +0 -62
- package/lib/v1/Tab/props/propTypes.js +0 -132
- package/lib/v1/Tab/v1Tab.module.css +0 -100
- package/lib/v1/Tab/v1TabContent.module.css +0 -4
- package/lib/v1/Tab/v1Tabs.module.css +0 -167
- package/lib/v1/Tag/Tag.js +0 -160
- package/lib/v1/Tag/props/defaultProps.js +0 -22
- package/lib/v1/Tag/props/propTypes.js +0 -47
- package/lib/v1/TextBox/TextBox.js +0 -175
- package/lib/v1/TextBox/props/defaultProps.js +0 -27
- package/lib/v1/TextBox/props/propTypes.js +0 -62
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +0 -206
- package/lib/v1/TextBoxIcon/props/defaultProps.js +0 -31
- package/lib/v1/TextBoxIcon/props/propTypes.js +0 -72
- package/lib/v1/Textarea/Textarea.js +0 -118
- package/lib/v1/Textarea/props/defaultProps.js +0 -24
- package/lib/v1/Textarea/props/propTypes.js +0 -42
- package/lib/v1/Tooltip/Tooltip.js +0 -599
- package/lib/v1/Tooltip/props/defaultProps.js +0 -11
- package/lib/v1/Tooltip/props/propTypes.js +0 -16
- package/lib/v1/Typography/Typography.js +0 -56
- package/lib/v1/Typography/css/cssJSLogic.js +0 -48
- package/lib/v1/Typography/css/v1_Typography.module.css +0 -380
- package/lib/v1/Typography/props/defaultProps.js +0 -15
- package/lib/v1/Typography/props/propTypes.js +0 -38
- package/lib/v1/Typography/utils/index.js +0 -59
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -90
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +0 -14
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -23
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +0 -126
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +0 -22
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -30
- package/lib/v1/semantic/Button/Button.js +0 -63
- package/lib/v1/semantic/Button/props/defaultProps.js +0 -19
- package/lib/v1/semantic/Button/props/propTypes.js +0 -33
- package/lib/v1/semantic/index.js +0 -15
|
@@ -1,1398 +0,0 @@
|
|
|
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
|
-
});
|