@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
package/es/Popup/Popup.js
DELETED
|
@@ -1,1049 +0,0 @@
|
|
|
1
|
-
/**** Libraries ****/
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import hoistStatics from 'hoist-non-react-statics';
|
|
4
|
-
import { PopupPropTypes, ContextTypes } from "./props/propTypes";
|
|
5
|
-
/**** Methods ****/
|
|
6
|
-
|
|
7
|
-
import { debounce, isDescendant, isTextSelected, cancelBubblingEffect, DUMMY_OBJECT } from "../utils/Common.js";
|
|
8
|
-
import viewPort from "./viewPort";
|
|
9
|
-
import { absolutePositionMapping, rtlAbsolutePositionMapping, rtlFixedPositionMapping } from "./PositionMapping.js";
|
|
10
|
-
import ResizeObserver from '@zohodesk/virtualizer/lib/commons/ResizeObserver.js';
|
|
11
|
-
import { addIntersectionObserver, removeIntersectionObserver } from "./intersectionObserver";
|
|
12
|
-
import { positionMapping } from "../DropBox/DropBoxPositionMapping.js";
|
|
13
|
-
import isMobilePopover from "../DropBox/utils/isMobilePopover.js";
|
|
14
|
-
import selectn from 'selectn';
|
|
15
|
-
import Registry from "./Registry.js";
|
|
16
|
-
|
|
17
|
-
global.closeGroupPopups = function (groupName) {
|
|
18
|
-
const groupPopups = Registry.popups[groupName] || [];
|
|
19
|
-
groupPopups.forEach(popup => {
|
|
20
|
-
popup.state.isPopupOpen && popup.setState({
|
|
21
|
-
isPopupOpen: false,
|
|
22
|
-
isPopupReady: false
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const defaultState = {
|
|
28
|
-
position: 'bottomCenter',
|
|
29
|
-
height: '0px',
|
|
30
|
-
positions: {},
|
|
31
|
-
//{bottomCenter: true, bottomLeft: false, ...}
|
|
32
|
-
positionsOffset: {},
|
|
33
|
-
//{bottomCenter: {left: ‘’,top: ‘’ }, .....}
|
|
34
|
-
targetOffset: {},
|
|
35
|
-
//{height: ‘’, width: ‘’,}
|
|
36
|
-
popupOffset: {},
|
|
37
|
-
//{height: ‘’, width: ‘’,}
|
|
38
|
-
isAbsolutePositioningNeeded: true
|
|
39
|
-
};
|
|
40
|
-
const SCROLL_BLOCK_EVENTS = Object.freeze([{
|
|
41
|
-
name: 'wheel',
|
|
42
|
-
handlerName: 'handleBlockScroll',
|
|
43
|
-
options: {
|
|
44
|
-
capture: true,
|
|
45
|
-
passive: false
|
|
46
|
-
}
|
|
47
|
-
}, {
|
|
48
|
-
name: 'touchmove',
|
|
49
|
-
handlerName: 'handleBlockScroll',
|
|
50
|
-
options: {
|
|
51
|
-
capture: true,
|
|
52
|
-
passive: false
|
|
53
|
-
}
|
|
54
|
-
}, {
|
|
55
|
-
name: 'scroll',
|
|
56
|
-
handlerName: 'handlePositionChange',
|
|
57
|
-
options: {
|
|
58
|
-
capture: true,
|
|
59
|
-
passive: false
|
|
60
|
-
}
|
|
61
|
-
}, {
|
|
62
|
-
name: 'keydown',
|
|
63
|
-
handlerName: 'preventKeyboardScroll',
|
|
64
|
-
options: {
|
|
65
|
-
capture: true,
|
|
66
|
-
passive: false
|
|
67
|
-
}
|
|
68
|
-
}]);
|
|
69
|
-
const IFRAME_SCROLL_BLOCK_EVENTS = Object.freeze(SCROLL_BLOCK_EVENTS.filter(event => event.name !== 'keydown'));
|
|
70
|
-
const CLICK_EVENTS = Object.freeze([{
|
|
71
|
-
name: 'click',
|
|
72
|
-
handlerName: 'documentClickHandler',
|
|
73
|
-
options: {
|
|
74
|
-
capture: false,
|
|
75
|
-
passive: false
|
|
76
|
-
}
|
|
77
|
-
}, {
|
|
78
|
-
name: 'click',
|
|
79
|
-
handlerName: 'documentClickHandler1',
|
|
80
|
-
options: {
|
|
81
|
-
capture: true,
|
|
82
|
-
passive: false
|
|
83
|
-
}
|
|
84
|
-
}]);
|
|
85
|
-
/* eslint-disable react/no-deprecated */
|
|
86
|
-
|
|
87
|
-
/* eslint-disable react/prop-types */
|
|
88
|
-
|
|
89
|
-
const Popup = function (Component) {
|
|
90
|
-
let group = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'global';
|
|
91
|
-
let needResizeHandling = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
92
|
-
let {
|
|
93
|
-
isAbsolutePositioningNeeded: isAbsolutePopup = true,
|
|
94
|
-
isArrow: needPopupArrow = false,
|
|
95
|
-
customOrder: customPositionOrder = [],
|
|
96
|
-
scrollDebounceTime: popupScrollDebounceTime = 0,
|
|
97
|
-
closeOnScroll: closeOnScrollPopup = false,
|
|
98
|
-
isOutsideScrollBlocked: isOutsideScrollBlock = false
|
|
99
|
-
} = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
100
|
-
|
|
101
|
-
class Popup extends React.Component {
|
|
102
|
-
constructor(props) {
|
|
103
|
-
super(props);
|
|
104
|
-
this.state = {
|
|
105
|
-
isPopupOpen: props.isPopupOpen || false,
|
|
106
|
-
position: 'bottomCenter',
|
|
107
|
-
height: '0px',
|
|
108
|
-
isPopupReady: props.isPopupOpen || false,
|
|
109
|
-
positions: {},
|
|
110
|
-
//{bottomCenter: true, bottomLeft: false, ...}
|
|
111
|
-
positionsOffset: {},
|
|
112
|
-
//{bottomCenter: {left: ‘’,top: ‘’ }, .....}
|
|
113
|
-
targetOffset: {},
|
|
114
|
-
//{height: ‘’, width: ‘’,}
|
|
115
|
-
popupOffset: {},
|
|
116
|
-
//{height: ‘’, width: ‘’,}
|
|
117
|
-
isAbsolutePositioningNeeded: true,
|
|
118
|
-
isMobile: false
|
|
119
|
-
};
|
|
120
|
-
this.togglePopup = this.togglePopup.bind(this);
|
|
121
|
-
this.documentClickHandler = this.documentClickHandler.bind(this);
|
|
122
|
-
this.documentClickHandler1 = this.documentClickHandler1.bind(this);
|
|
123
|
-
this.removeClose = this.removeClose.bind(this);
|
|
124
|
-
this.documentKeyupHandler = this.documentKeyupHandler.bind(this);
|
|
125
|
-
this.openPopupOnly = this.openPopupOnly.bind(this);
|
|
126
|
-
this.closePopupOnly = this.closePopupOnly.bind(this);
|
|
127
|
-
this.getTargetRef = this.getTargetRef.bind(this);
|
|
128
|
-
this.getContainerRef = this.getContainerRef.bind(this);
|
|
129
|
-
this.handlePopupPosition = this.handlePopupPosition.bind(this);
|
|
130
|
-
this.handleResize = debounce(this.handleResize.bind(this), 300);
|
|
131
|
-
this.handlePopupResize = this.handlePopupResize.bind(this);
|
|
132
|
-
this.getIsAbsolutePopup = this.getIsAbsolutePopup.bind(this);
|
|
133
|
-
this.getIsOutsideScrollBlocked = this.getIsOutsideScrollBlocked.bind(this);
|
|
134
|
-
this.getNeedArrow = this.getNeedArrow.bind(this);
|
|
135
|
-
this.getCustomPositionOrder = this.getCustomPositionOrder.bind(this);
|
|
136
|
-
this.handleOpenPopupPositionChange = this.handleOpenPopupPositionChange.bind(this);
|
|
137
|
-
this.getScrollDebounceTime = this.getScrollDebounceTime.bind(this);
|
|
138
|
-
this.getCloseOnScrollPopup = this.getCloseOnScrollPopup.bind(this);
|
|
139
|
-
this.handleCloseLastOpenedGroup = this.handleCloseLastOpenedGroup.bind(this);
|
|
140
|
-
this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);
|
|
141
|
-
this.handleDocumentFocus = this.handleDocumentFocus.bind(this);
|
|
142
|
-
this.handleGetNeedPrevent = this.handleGetNeedPrevent.bind(this);
|
|
143
|
-
this.handleBlockScroll = this.handleBlockScroll.bind(this);
|
|
144
|
-
this.handlePositionChange = this.handlePositionChange.bind(this);
|
|
145
|
-
this.preventKeyboardScroll = this.preventKeyboardScroll.bind(this);
|
|
146
|
-
this.updateListeners = this.updateListeners.bind(this);
|
|
147
|
-
this.addScrollBlockListeners = this.addScrollBlockListeners.bind(this);
|
|
148
|
-
this.removeScrollBlockListeners = this.removeScrollBlockListeners.bind(this);
|
|
149
|
-
this.addScrollToUpdateListeners = this.addScrollToUpdateListeners.bind(this);
|
|
150
|
-
this.removeScrollToUpdateListeners = this.removeScrollToUpdateListeners.bind(this);
|
|
151
|
-
this.handleAddingScrollBlock = this.handleAddingScrollBlock.bind(this);
|
|
152
|
-
this.handleRemovingScrollBlock = this.handleRemovingScrollBlock.bind(this);
|
|
153
|
-
this.handleIntersectionObserver = this.handleIntersectionObserver.bind(this);
|
|
154
|
-
this.updateVisibilityOnIntersection = this.updateVisibilityOnIntersection.bind(this);
|
|
155
|
-
this.handleAddingScrollToUpdatePosition = this.handleAddingScrollToUpdatePosition.bind(this);
|
|
156
|
-
this.handleRemovingScrollToUpdatePosition = this.handleRemovingScrollToUpdatePosition.bind(this);
|
|
157
|
-
this.setContainerDynamicPositioning = this.setContainerDynamicPositioning.bind(this);
|
|
158
|
-
this.updatePopupState = this.updatePopupState.bind(this);
|
|
159
|
-
this.handleScrollAndBlockEvents = this.handleScrollAndBlockEvents.bind(this);
|
|
160
|
-
this.handleIframeEventListeners = this.handleIframeEventListeners.bind(this);
|
|
161
|
-
this.handleDropElementStyleUpdate = this.handleDropElementStyleUpdate.bind(this);
|
|
162
|
-
this.positionRef = /*#__PURE__*/React.createRef();
|
|
163
|
-
this.rootElement = Registry.getRootElement();
|
|
164
|
-
this.popupObserver = new ResizeObserver(this.handlePopupResize);
|
|
165
|
-
this.cancelRaf = this.cancelRaf.bind(this);
|
|
166
|
-
this.cancelPendingAnimationFrames = this.cancelPendingAnimationFrames.bind(this);
|
|
167
|
-
this.setPositionRafId = null;
|
|
168
|
-
this.resizePositionRafId = null; //dropBoxSize
|
|
169
|
-
|
|
170
|
-
this.size = null;
|
|
171
|
-
this.isTargetElementVisible = false;
|
|
172
|
-
this.isAbsolutePopup = isAbsolutePopup;
|
|
173
|
-
this.needPopupArrow = needPopupArrow;
|
|
174
|
-
this.customPositionOrder = customPositionOrder;
|
|
175
|
-
this.scrollDebounceTime = popupScrollDebounceTime;
|
|
176
|
-
this.closeOnScroll = closeOnScrollPopup;
|
|
177
|
-
this.isOutsideScrollBlock = isOutsideScrollBlock;
|
|
178
|
-
const scrollDebounceTime = this.getScrollDebounceTime(this);
|
|
179
|
-
this.updatePositionOnScroll = scrollDebounceTime > 0 ? debounce(this.updatePositionOnScroll.bind(this), scrollDebounceTime) : this.updatePositionOnScroll.bind(this); // this.handleScroll = debounce(this.handleScroll.bind(this), scrollDebounceTime);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
componentDidMount() {
|
|
183
|
-
const group = this.getGroup();
|
|
184
|
-
const groupPopups = Registry.popups[group] || [];
|
|
185
|
-
groupPopups.push(this);
|
|
186
|
-
Registry.popups[group] = groupPopups;
|
|
187
|
-
|
|
188
|
-
if (Object.keys(Registry.popups).length === 1 && groupPopups.length === 1 && Registry.listenerPopupRef === undefined) {
|
|
189
|
-
Registry.listenerPopupRef = this;
|
|
190
|
-
Registry.listenerPopupRef.updateListeners(true, CLICK_EVENTS, document);
|
|
191
|
-
document.addEventListener('keyup', Registry.listenerPopupRef.documentKeyupHandler, false); // document.addEventListener('scroll', Registry.listenerPopupRef.handleScroll, true);
|
|
192
|
-
|
|
193
|
-
window.addEventListener('resize', Registry.listenerPopupRef.handleResize);
|
|
194
|
-
document.addEventListener('mousedown', Registry.listenerPopupRef.handleDocumentMouseDown, true);
|
|
195
|
-
document.addEventListener('focus', Registry.listenerPopupRef.handleDocumentFocus, true);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
200
|
-
const {
|
|
201
|
-
isPopupOpen
|
|
202
|
-
} = this.state;
|
|
203
|
-
|
|
204
|
-
if (typeof nextProps.isPopupOpen !== 'undefined' && nextProps.isPopupOpen !== isPopupOpen) {
|
|
205
|
-
this.setState({
|
|
206
|
-
isPopupOpen: nextProps.isPopupOpen,
|
|
207
|
-
isPopupReady: nextProps.isPopupOpen
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
handleScrollAndBlockEvents(shouldAdd) {
|
|
213
|
-
if (shouldAdd) {
|
|
214
|
-
this.handleAddingScrollBlock();
|
|
215
|
-
this.handleAddingScrollToUpdatePosition();
|
|
216
|
-
} else {
|
|
217
|
-
this.handleRemovingScrollBlock();
|
|
218
|
-
this.handleRemovingScrollToUpdatePosition();
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
handleIframeEventListeners(shouldAdd, eventList) {
|
|
223
|
-
this.rootElement.querySelectorAll('iframe').forEach(frame => {
|
|
224
|
-
const frameDocument = frame.contentDocument;
|
|
225
|
-
|
|
226
|
-
if (frameDocument) {
|
|
227
|
-
this.updateListeners(shouldAdd, eventList, frameDocument);
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
componentDidUpdate(prevProps, prevState) {
|
|
233
|
-
const {
|
|
234
|
-
isPopupReady,
|
|
235
|
-
isMobile
|
|
236
|
-
} = this.state;
|
|
237
|
-
const {
|
|
238
|
-
isPopupReady: oldStateOpen = false,
|
|
239
|
-
isMobile: oldIsMobileState
|
|
240
|
-
} = prevState || {};
|
|
241
|
-
const {
|
|
242
|
-
dropElement
|
|
243
|
-
} = this;
|
|
244
|
-
const {
|
|
245
|
-
needResizeHandling: propResizeHandling
|
|
246
|
-
} = this.props;
|
|
247
|
-
|
|
248
|
-
if (oldStateOpen !== isPopupReady) {
|
|
249
|
-
if (isPopupReady && dropElement && (propResizeHandling !== undefined ? propResizeHandling : needResizeHandling)) {
|
|
250
|
-
this.popupObserver.replaceObservationElement(dropElement);
|
|
251
|
-
} else if (!isPopupReady) {
|
|
252
|
-
this.size = null;
|
|
253
|
-
this.popupObserver.disconnect();
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
if (oldStateOpen !== isPopupReady && !isMobile || oldIsMobileState !== isMobile) {
|
|
258
|
-
const shouldAdd = isPopupReady && !isMobile;
|
|
259
|
-
this.handleScrollAndBlockEvents(shouldAdd);
|
|
260
|
-
this.handleIframeEventListeners(shouldAdd, CLICK_EVENTS);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
cancelRaf(refName) {
|
|
265
|
-
const id = this[refName];
|
|
266
|
-
|
|
267
|
-
if (id) {
|
|
268
|
-
cancelAnimationFrame(id);
|
|
269
|
-
this[refName] = null;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
cancelPendingAnimationFrames() {
|
|
274
|
-
this.cancelRaf('setPositionRafId');
|
|
275
|
-
this.cancelRaf('resizePositionRafId');
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
componentWillUnmount() {
|
|
279
|
-
const group = this.getGroup();
|
|
280
|
-
Registry.popups = Object.keys(Registry.popups).reduce((res, groupName) => {
|
|
281
|
-
if (groupName === group) {
|
|
282
|
-
const groupPopups = Registry.popups[group];
|
|
283
|
-
const newGroupPopups = groupPopups.filter(popup => popup !== this);
|
|
284
|
-
newGroupPopups.length === 0 && Registry.lastOpenedGroup.indexOf(group) >= 0 && Registry.lastOpenedGroup.splice(Registry.lastOpenedGroup.indexOf(group), 1);
|
|
285
|
-
res[group] = newGroupPopups;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
return res;
|
|
289
|
-
}, Registry.popups);
|
|
290
|
-
this.handleRemovingScrollBlock();
|
|
291
|
-
this.handleRemovingScrollToUpdatePosition();
|
|
292
|
-
this.handleIframeEventListeners(false, CLICK_EVENTS);
|
|
293
|
-
let noPopups = true;
|
|
294
|
-
|
|
295
|
-
for (const i in Registry.popups) {
|
|
296
|
-
if (Registry.popups[i].length >= 1) {
|
|
297
|
-
noPopups = false;
|
|
298
|
-
break;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
if (this.popupObserver) {
|
|
303
|
-
this.popupObserver.disconnect();
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
if (noPopups && Registry.listenerPopupRef !== undefined) {
|
|
307
|
-
Registry.listenerPopupRef.updateListeners(false, CLICK_EVENTS, document);
|
|
308
|
-
document.removeEventListener('keyup', Registry.listenerPopupRef.documentKeyupHandler); // document.removeEventListener('scroll', Registry.listenerPopupRef.handleScroll);
|
|
309
|
-
|
|
310
|
-
window.removeEventListener('resize', Registry.listenerPopupRef.handleResize);
|
|
311
|
-
document.removeEventListener('mousedown', Registry.listenerPopupRef.handleDocumentMouseDown, true);
|
|
312
|
-
document.removeEventListener('focus', Registry.listenerPopupRef.handleDocumentFocus, true);
|
|
313
|
-
Registry.listenerPopupRef = undefined;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
this.cancelPendingAnimationFrames();
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
handleAddingScrollBlock() {
|
|
320
|
-
const isAbsolutePositioningNeeded = this.getIsAbsolutePopup(this);
|
|
321
|
-
const isOutsideScrollBlocked = this.getIsOutsideScrollBlocked(this);
|
|
322
|
-
|
|
323
|
-
if (isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
|
|
324
|
-
addIntersectionObserver(this.placeHolderElement, this.handleIntersectionObserver);
|
|
325
|
-
this.addScrollBlockListeners();
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
handleRemovingScrollBlock() {
|
|
330
|
-
const isAbsolutePositioningNeeded = this.getIsAbsolutePopup(this);
|
|
331
|
-
const isOutsideScrollBlocked = this.getIsOutsideScrollBlocked(this);
|
|
332
|
-
|
|
333
|
-
if (isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
|
|
334
|
-
removeIntersectionObserver(this.placeHolderElement, this.handleIntersectionObserver);
|
|
335
|
-
this.removeScrollBlockListeners();
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
handleAddingScrollToUpdatePosition() {
|
|
340
|
-
const isAbsolutePositioningNeeded = this.getIsAbsolutePopup(this);
|
|
341
|
-
const isOutsideScrollBlocked = this.getIsOutsideScrollBlocked(this);
|
|
342
|
-
|
|
343
|
-
if (!isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
|
|
344
|
-
addIntersectionObserver(this.placeHolderElement, this.updateVisibilityOnIntersection);
|
|
345
|
-
const shouldAddScrollToUpdatePositionListeners = Registry.getOpenedScrollableFixedPopups().length === 1 && Registry.scrollableListenerPopupRef === undefined;
|
|
346
|
-
|
|
347
|
-
if (shouldAddScrollToUpdatePositionListeners) {
|
|
348
|
-
Registry.scrollableListenerPopupRef = this;
|
|
349
|
-
Registry.scrollableListenerPopupRef.addScrollToUpdateListeners();
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
handleRemovingScrollToUpdatePosition() {
|
|
355
|
-
const isAbsolutePositioningNeeded = this.getIsAbsolutePopup(this);
|
|
356
|
-
const isOutsideScrollBlocked = this.getIsOutsideScrollBlocked(this);
|
|
357
|
-
|
|
358
|
-
if (!isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
|
|
359
|
-
removeIntersectionObserver(this.placeHolderElement, this.updateVisibilityOnIntersection);
|
|
360
|
-
const shouldRemoveScrollToUpdatePositionListeners = Registry.getOpenedScrollableFixedPopups().length === 0 && Registry.scrollableListenerPopupRef !== undefined;
|
|
361
|
-
|
|
362
|
-
if (shouldRemoveScrollToUpdatePositionListeners) {
|
|
363
|
-
Registry.scrollableListenerPopupRef.removeScrollToUpdateListeners();
|
|
364
|
-
Registry.scrollableListenerPopupRef = undefined;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
handleDropElementStyleUpdate(_ref) {
|
|
370
|
-
let {
|
|
371
|
-
top = '',
|
|
372
|
-
left = '',
|
|
373
|
-
bottom = '',
|
|
374
|
-
right = ''
|
|
375
|
-
} = _ref;
|
|
376
|
-
const {
|
|
377
|
-
dropElement
|
|
378
|
-
} = this;
|
|
379
|
-
Object.assign(dropElement.style, {
|
|
380
|
-
top: top ? `${top}px` : '',
|
|
381
|
-
left: left ? `${left}px` : '',
|
|
382
|
-
right: right ? `${right}px` : '',
|
|
383
|
-
bottom: bottom ? `${bottom}px` : ''
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
setContainerDynamicPositioning(betterPosition, needArrow) {
|
|
388
|
-
const {
|
|
389
|
-
dropElement
|
|
390
|
-
} = this;
|
|
391
|
-
const {
|
|
392
|
-
isMobile
|
|
393
|
-
} = this.state;
|
|
394
|
-
const {
|
|
395
|
-
view,
|
|
396
|
-
viewsOffset
|
|
397
|
-
} = betterPosition || DUMMY_OBJECT;
|
|
398
|
-
const styleToApply = selectn(`${view}`, viewsOffset);
|
|
399
|
-
|
|
400
|
-
if (isMobile) {
|
|
401
|
-
this.handleDropElementStyleUpdate({
|
|
402
|
-
top: '',
|
|
403
|
-
left: '',
|
|
404
|
-
right: '',
|
|
405
|
-
bottom: ''
|
|
406
|
-
});
|
|
407
|
-
} else {
|
|
408
|
-
this.handleDropElementStyleUpdate(styleToApply);
|
|
409
|
-
|
|
410
|
-
if (this.positionRef.current !== view) {
|
|
411
|
-
dropElement.setAttribute('data-position', `${view}`);
|
|
412
|
-
dropElement.setAttribute('data-box-direction', selectn(`${view}.direction`, positionMapping));
|
|
413
|
-
|
|
414
|
-
if (needArrow) {
|
|
415
|
-
dropElement.setAttribute('data-arrow-position', selectn(`${view}.arrowPosition`, positionMapping));
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
this.positionRef.current = view;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
updatePositionOnScroll(e) {
|
|
424
|
-
const scrollablePopups = Registry.getOpenedScrollableFixedPopups(); // Check if the event target is outside all dropElements
|
|
425
|
-
|
|
426
|
-
scrollablePopups.forEach(_ref2 => {
|
|
427
|
-
let {
|
|
428
|
-
placeHolderElement,
|
|
429
|
-
defaultPosition,
|
|
430
|
-
isTargetElementVisible,
|
|
431
|
-
handlePopupPosition
|
|
432
|
-
} = _ref2;
|
|
433
|
-
|
|
434
|
-
if (e.target.contains(placeHolderElement) && isTargetElementVisible) {
|
|
435
|
-
handlePopupPosition(defaultPosition, true);
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
updateListeners() {
|
|
441
|
-
let add = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
442
|
-
let eventList = arguments.length > 1 ? arguments[1] : undefined;
|
|
443
|
-
let element = arguments.length > 2 ? arguments[2] : undefined;
|
|
444
|
-
const method = add ? 'addEventListener' : 'removeEventListener';
|
|
445
|
-
eventList.forEach(_ref3 => {
|
|
446
|
-
let {
|
|
447
|
-
name,
|
|
448
|
-
handlerName,
|
|
449
|
-
options
|
|
450
|
-
} = _ref3;
|
|
451
|
-
const handler = this[handlerName];
|
|
452
|
-
|
|
453
|
-
if (handler) {
|
|
454
|
-
element[method](name, handler, options);
|
|
455
|
-
}
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
addScrollBlockListeners() {
|
|
460
|
-
// Only add scroll block listeners if at least one open popup needs outside scroll blocked
|
|
461
|
-
const shouldAddScrollBlockListeners = Registry.getOpenedScrollBlockedFixedPopups().length === 1 && Registry.scrollBlockedListenerPopupRef === undefined;
|
|
462
|
-
|
|
463
|
-
if (shouldAddScrollBlockListeners) {
|
|
464
|
-
Registry.scrollBlockedListenerPopupRef = this; // Main document
|
|
465
|
-
|
|
466
|
-
Registry.scrollBlockedListenerPopupRef.updateListeners(true, SCROLL_BLOCK_EVENTS, document); // Attach event listeners to all iframes within rootElement
|
|
467
|
-
|
|
468
|
-
Registry.scrollBlockedListenerPopupRef.handleIframeEventListeners(true, IFRAME_SCROLL_BLOCK_EVENTS);
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
removeScrollBlockListeners() {
|
|
473
|
-
// Only remove scroll block listeners if at least one open popup needs outside scroll blocked
|
|
474
|
-
const shouldRemoveScrollBlockListeners = Registry.getOpenedScrollBlockedFixedPopups().length === 0 && Registry.scrollBlockedListenerPopupRef !== undefined;
|
|
475
|
-
|
|
476
|
-
if (shouldRemoveScrollBlockListeners) {
|
|
477
|
-
Registry.scrollBlockedListenerPopupRef.updateListeners(false, SCROLL_BLOCK_EVENTS, document);
|
|
478
|
-
Registry.scrollBlockedListenerPopupRef.handleIframeEventListeners(false, IFRAME_SCROLL_BLOCK_EVENTS);
|
|
479
|
-
Registry.scrollBlockedListenerPopupRef = undefined;
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
addScrollToUpdateListeners() {
|
|
484
|
-
document.addEventListener('scroll', this.updatePositionOnScroll, {
|
|
485
|
-
capture: true,
|
|
486
|
-
passive: false
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
removeScrollToUpdateListeners() {
|
|
491
|
-
document.removeEventListener('scroll', this.updatePositionOnScroll, {
|
|
492
|
-
capture: true,
|
|
493
|
-
passive: false
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
handleBlockScroll(event) {
|
|
498
|
-
const scrollBlockedPopups = Registry.getOpenedScrollBlockedFixedPopups(); // Check if the event target is outside all dropElements
|
|
499
|
-
|
|
500
|
-
const isOutsideAllDropElements = scrollBlockedPopups.every(_ref4 => {
|
|
501
|
-
let {
|
|
502
|
-
dropElement
|
|
503
|
-
} = _ref4;
|
|
504
|
-
return dropElement && dropElement !== event.target && !dropElement.contains(event.target);
|
|
505
|
-
});
|
|
506
|
-
|
|
507
|
-
if (isOutsideAllDropElements) {
|
|
508
|
-
event.preventDefault();
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
handlePositionChange(event) {
|
|
513
|
-
const scrollBlockedPopups = Registry.getOpenedScrollBlockedFixedPopups();
|
|
514
|
-
scrollBlockedPopups.forEach(_ref5 => {
|
|
515
|
-
let {
|
|
516
|
-
placeHolderElement,
|
|
517
|
-
dropElement,
|
|
518
|
-
handlePopupPosition,
|
|
519
|
-
state
|
|
520
|
-
} = _ref5;
|
|
521
|
-
|
|
522
|
-
if (dropElement && dropElement !== event.target && !dropElement.contains(event.target) && placeHolderElement && placeHolderElement !== event.target && !placeHolderElement.contains(event.target) && event.target.contains(placeHolderElement)) {
|
|
523
|
-
handlePopupPosition(state.position, true);
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
preventKeyboardScroll(event) {
|
|
529
|
-
const keys = [32, 37, 38, 39, 40]; // Space, Arrow keys
|
|
530
|
-
|
|
531
|
-
const scrollBlockedPopups = Registry.getOpenedScrollBlockedFixedPopups(); // Check if the event target is outside all dropElements
|
|
532
|
-
|
|
533
|
-
const isOutsideAllDropElements = scrollBlockedPopups.every(_ref6 => {
|
|
534
|
-
let {
|
|
535
|
-
dropElement
|
|
536
|
-
} = _ref6;
|
|
537
|
-
return dropElement && dropElement !== event.target && !dropElement.contains(event.target) && keys.includes(event.keyCode);
|
|
538
|
-
});
|
|
539
|
-
|
|
540
|
-
if (isOutsideAllDropElements) {
|
|
541
|
-
event.preventDefault();
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
handleIntersectionObserver(entry) {
|
|
546
|
-
if (entry.intersectionRatio === 0 && entry.isIntersecting === false) {
|
|
547
|
-
this.closePopupOnly();
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
updateVisibilityOnIntersection(entry) {
|
|
552
|
-
const {
|
|
553
|
-
dropElement
|
|
554
|
-
} = this;
|
|
555
|
-
if (!dropElement) return;
|
|
556
|
-
|
|
557
|
-
if (entry.isIntersecting === true) {
|
|
558
|
-
this.isTargetElementVisible = true;
|
|
559
|
-
dropElement.setAttribute('data-visible', 'visible');
|
|
560
|
-
} else if (entry.intersectionRatio === 0 && entry.isIntersecting === false) {
|
|
561
|
-
this.isTargetElementVisible = false;
|
|
562
|
-
dropElement.setAttribute('data-visible', 'hidden');
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
getGroup() {
|
|
567
|
-
const {
|
|
568
|
-
popupGroup
|
|
569
|
-
} = this.props;
|
|
570
|
-
return popupGroup || group;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
getNeedArrow(popup) {
|
|
574
|
-
const {
|
|
575
|
-
isArrow
|
|
576
|
-
} = popup.props;
|
|
577
|
-
const {
|
|
578
|
-
needPopupArrow
|
|
579
|
-
} = popup;
|
|
580
|
-
return isArrow !== undefined ? isArrow : needPopupArrow;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
getScrollDebounceTime(popup) {
|
|
584
|
-
const {
|
|
585
|
-
scrollDebounceTime
|
|
586
|
-
} = popup.props;
|
|
587
|
-
const {
|
|
588
|
-
scrollDebounceTime: popupScrollDebounceTime
|
|
589
|
-
} = popup;
|
|
590
|
-
return scrollDebounceTime !== undefined ? scrollDebounceTime : popupScrollDebounceTime;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
getCloseOnScrollPopup(popup) {
|
|
594
|
-
const {
|
|
595
|
-
closeOnScroll
|
|
596
|
-
} = popup.props;
|
|
597
|
-
const {
|
|
598
|
-
closeOnScroll: closeOnScrollPopup
|
|
599
|
-
} = popup;
|
|
600
|
-
return closeOnScroll !== undefined ? closeOnScroll : closeOnScrollPopup;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
getIsAbsolutePopup(popup) {
|
|
604
|
-
const {
|
|
605
|
-
isAbsolutePositioningNeeded
|
|
606
|
-
} = popup.props;
|
|
607
|
-
const {
|
|
608
|
-
isAbsolutePopup
|
|
609
|
-
} = popup;
|
|
610
|
-
return isAbsolutePositioningNeeded !== undefined ? isAbsolutePositioningNeeded : isAbsolutePopup;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
getIsOutsideScrollBlocked(popup) {
|
|
614
|
-
const {
|
|
615
|
-
isOutsideScrollBlocked
|
|
616
|
-
} = popup.props;
|
|
617
|
-
const {
|
|
618
|
-
isOutsideScrollBlock
|
|
619
|
-
} = popup;
|
|
620
|
-
return isOutsideScrollBlocked !== undefined ? isOutsideScrollBlocked : isOutsideScrollBlock;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
getCustomPositionOrder(popup) {
|
|
624
|
-
const {
|
|
625
|
-
customOrder = []
|
|
626
|
-
} = popup.props;
|
|
627
|
-
const {
|
|
628
|
-
customPositionOrder
|
|
629
|
-
} = popup;
|
|
630
|
-
return customOrder.length !== 0 ? customOrder : customPositionOrder;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
togglePopup(e, defaultPosition) {
|
|
634
|
-
const group = this.getGroup();
|
|
635
|
-
this.removeClose(e);
|
|
636
|
-
const {
|
|
637
|
-
isPopupOpen
|
|
638
|
-
} = this.state;
|
|
639
|
-
const groupPopups = Registry.popups[group] || [];
|
|
640
|
-
Registry.lastOpenedGroup = !isPopupOpen && Registry.lastOpenedGroup.indexOf(group) === -1 ? [group, ...Registry.lastOpenedGroup] : Registry.lastOpenedGroup;
|
|
641
|
-
isPopupOpen && Registry.lastOpenedGroup.splice(0, 1);
|
|
642
|
-
groupPopups.forEach(popup => {
|
|
643
|
-
if (popup !== this && popup.state.isPopupOpen) {
|
|
644
|
-
popup.setState({
|
|
645
|
-
isPopupOpen: false,
|
|
646
|
-
isPopupReady: false
|
|
647
|
-
});
|
|
648
|
-
}
|
|
649
|
-
});
|
|
650
|
-
|
|
651
|
-
if (isPopupOpen) {
|
|
652
|
-
this.setState({
|
|
653
|
-
isPopupOpen: false,
|
|
654
|
-
isPopupReady: false
|
|
655
|
-
});
|
|
656
|
-
} else {
|
|
657
|
-
this.handlePopupPosition(defaultPosition);
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
openPopupOnly(e, defaultPosition) {
|
|
662
|
-
const group = this.getGroup();
|
|
663
|
-
this.removeClose(e);
|
|
664
|
-
Registry.lastOpenedGroup = Registry.lastOpenedGroup.indexOf(group) === -1 ? [group, ...Registry.lastOpenedGroup] : Registry.lastOpenedGroup;
|
|
665
|
-
this.handlePopupPosition(defaultPosition);
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
closePopupOnly(e) {
|
|
669
|
-
this.removeClose(e);
|
|
670
|
-
const {
|
|
671
|
-
isPopupOpen
|
|
672
|
-
} = this.state;
|
|
673
|
-
|
|
674
|
-
if (isPopupOpen) {
|
|
675
|
-
Registry.lastOpenedGroup.splice(0, 1);
|
|
676
|
-
this.setState({
|
|
677
|
-
isPopupOpen: false,
|
|
678
|
-
isPopupReady: false
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
handleCloseLastOpenedGroup() {
|
|
684
|
-
const groupPopups = Registry.lastOpenedGroup.length ? Registry.popups[Registry.lastOpenedGroup[0]] || [] : [];
|
|
685
|
-
Registry.lastOpenedGroup.splice(0, 1);
|
|
686
|
-
groupPopups.forEach(popup => {
|
|
687
|
-
popup.state.isPopupOpen && popup.setState({
|
|
688
|
-
isPopupOpen: false,
|
|
689
|
-
isPopupReady: false
|
|
690
|
-
});
|
|
691
|
-
});
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
handleDocumentMouseDown(e) {
|
|
695
|
-
const needPrevent = this.handleGetNeedPrevent(e);
|
|
696
|
-
|
|
697
|
-
if (needPrevent) {
|
|
698
|
-
this.removeClose(e);
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
handleDocumentFocus(e) {
|
|
703
|
-
const needPrevent = this.handleGetNeedPrevent(e);
|
|
704
|
-
|
|
705
|
-
if (needPrevent) {
|
|
706
|
-
this.removeClose(e);
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
handleGetNeedPrevent(e) {
|
|
711
|
-
let needPrevent = false;
|
|
712
|
-
|
|
713
|
-
if (Registry.lastOpenedGroup.length > 1) {
|
|
714
|
-
const {
|
|
715
|
-
target
|
|
716
|
-
} = e;
|
|
717
|
-
const groupPopups = Registry.lastOpenedGroup.length ? Registry.popups[Registry.lastOpenedGroup[0]] : [];
|
|
718
|
-
let openedPopup = null; // eslint-disable-next-line guard-for-in
|
|
719
|
-
|
|
720
|
-
for (const i in groupPopups) {
|
|
721
|
-
const {
|
|
722
|
-
isPopupOpen
|
|
723
|
-
} = groupPopups[i].state;
|
|
724
|
-
|
|
725
|
-
if (isPopupOpen) {
|
|
726
|
-
openedPopup = groupPopups[i];
|
|
727
|
-
break;
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
if (openedPopup) {
|
|
732
|
-
const {
|
|
733
|
-
dropElement,
|
|
734
|
-
placeHolderElement
|
|
735
|
-
} = openedPopup;
|
|
736
|
-
const isDropBoxChild = isDescendant(dropElement, target);
|
|
737
|
-
const isTargetChild = isDescendant(placeHolderElement, target); // const isPopupMassUpdateChild = isDescendant(
|
|
738
|
-
// massUpdateParent,
|
|
739
|
-
// dropElement
|
|
740
|
-
// );
|
|
741
|
-
|
|
742
|
-
if (!isDropBoxChild && !isTargetChild // && isPopupMassUpdateChild
|
|
743
|
-
) {
|
|
744
|
-
needPrevent = true;
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
return needPrevent;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
documentClickHandler1(e) {
|
|
753
|
-
const needPrevent = this.handleGetNeedPrevent(e);
|
|
754
|
-
|
|
755
|
-
if (needPrevent) {
|
|
756
|
-
this.removeClose(e);
|
|
757
|
-
this.handleCloseLastOpenedGroup();
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
documentClickHandler() {
|
|
762
|
-
try {
|
|
763
|
-
Object.keys(Registry.popups).forEach(groupName => {
|
|
764
|
-
const groupPopups = Registry.popups[groupName] || [];
|
|
765
|
-
groupPopups.forEach(popup => {
|
|
766
|
-
popup.state.isPopupOpen && (!popup.props.checkBeforeClose || popup.props.checkBeforeClose && popup.props.checkBeforeClose()) && !isTextSelected() && popup.setState({
|
|
767
|
-
isPopupOpen: false,
|
|
768
|
-
isPopupReady: false
|
|
769
|
-
});
|
|
770
|
-
});
|
|
771
|
-
});
|
|
772
|
-
Registry.lastOpenedGroup = [];
|
|
773
|
-
} catch (e) {// eslint-disable-next-line no-console
|
|
774
|
-
//console.error('popup component not unmounted properly', e);
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
documentKeyupHandler(e) {
|
|
779
|
-
try {
|
|
780
|
-
if (e.keyCode === 27) {
|
|
781
|
-
this.handleCloseLastOpenedGroup();
|
|
782
|
-
}
|
|
783
|
-
} catch (e) {// eslint-disable-next-line no-console
|
|
784
|
-
//console.log('error', e);
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
removeClose(e) {
|
|
789
|
-
// e && e.preventDefault && e.preventDefault();
|
|
790
|
-
cancelBubblingEffect(e);
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
updatePopupState(view, views, viewsOffset, targetOffset, popupOffset, isAbsolute) {
|
|
794
|
-
const isMobile = isMobilePopover(true);
|
|
795
|
-
this.setState({
|
|
796
|
-
isPopupReady: true,
|
|
797
|
-
position: view,
|
|
798
|
-
positions: views,
|
|
799
|
-
positionsOffset: viewsOffset,
|
|
800
|
-
targetOffset,
|
|
801
|
-
popupOffset,
|
|
802
|
-
isAbsolutePositioningNeeded: isAbsolute,
|
|
803
|
-
isMobile: isMobile
|
|
804
|
-
});
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
handlePopupPosition() {
|
|
808
|
-
let defaultPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bottomCenter';
|
|
809
|
-
let isUpdatePosition = arguments.length > 1 ? arguments[1] : undefined;
|
|
810
|
-
// isUpdatePosition --->>> Window resize and dropBox resize and to update the position
|
|
811
|
-
const {
|
|
812
|
-
direction
|
|
813
|
-
} = this.context || {};
|
|
814
|
-
const {
|
|
815
|
-
placeHolderElement,
|
|
816
|
-
dropElement
|
|
817
|
-
} = this;
|
|
818
|
-
const needArrow = this.getNeedArrow(this);
|
|
819
|
-
const isAbsolute = this.getIsAbsolutePopup(this);
|
|
820
|
-
const customOrder = this.getCustomPositionOrder(this);
|
|
821
|
-
|
|
822
|
-
if (direction === 'rtl') {
|
|
823
|
-
defaultPosition = isAbsolute ? rtlAbsolutePositionMapping[defaultPosition] : rtlFixedPositionMapping[defaultPosition];
|
|
824
|
-
} else {
|
|
825
|
-
defaultPosition = isAbsolute ? absolutePositionMapping[defaultPosition] : defaultPosition;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
if (!placeHolderElement && !dropElement) {
|
|
829
|
-
const isMobile = isMobilePopover(true);
|
|
830
|
-
this.setState({
|
|
831
|
-
isPopupOpen: true,
|
|
832
|
-
isPopupReady: true,
|
|
833
|
-
isMobile: isMobile
|
|
834
|
-
});
|
|
835
|
-
return;
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
const setPosition = () => {
|
|
839
|
-
this.cancelRaf('setPositionRafId');
|
|
840
|
-
this.setPositionRafId = requestAnimationFrame(() => {
|
|
841
|
-
const {
|
|
842
|
-
placeHolderElement,
|
|
843
|
-
dropElement
|
|
844
|
-
} = this;
|
|
845
|
-
const {
|
|
846
|
-
position,
|
|
847
|
-
isPopupReady
|
|
848
|
-
} = this.state;
|
|
849
|
-
const scrollContainer = placeHolderElement ? placeHolderElement.closest('[data-scroll=true]') || document.body : document.body;
|
|
850
|
-
const betterPosition = viewPort.betterView(dropElement, placeHolderElement, defaultPosition, scrollContainer, {
|
|
851
|
-
needArrow,
|
|
852
|
-
isAbsolute,
|
|
853
|
-
customOrder
|
|
854
|
-
});
|
|
855
|
-
const {
|
|
856
|
-
view,
|
|
857
|
-
views,
|
|
858
|
-
viewsOffset,
|
|
859
|
-
targetOffset,
|
|
860
|
-
popupOffset
|
|
861
|
-
} = betterPosition || DUMMY_OBJECT;
|
|
862
|
-
|
|
863
|
-
if (!isAbsolute) {
|
|
864
|
-
if (!isPopupReady) {
|
|
865
|
-
this.updatePopupState(view, views, viewsOffset, targetOffset, popupOffset, isAbsolute);
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
if (!dropElement) {
|
|
869
|
-
return;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
this.setContainerDynamicPositioning(betterPosition, needArrow);
|
|
873
|
-
} else {
|
|
874
|
-
if (position !== view || !isPopupReady) {
|
|
875
|
-
this.updatePopupState(view, views, viewsOffset, targetOffset, popupOffset, isAbsolute);
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
this.setPositionRafId = null;
|
|
880
|
-
});
|
|
881
|
-
};
|
|
882
|
-
|
|
883
|
-
if (isUpdatePosition) {
|
|
884
|
-
setPosition();
|
|
885
|
-
} else {
|
|
886
|
-
this.defaultPosition = defaultPosition;
|
|
887
|
-
this.setState({
|
|
888
|
-
isPopupOpen: true,
|
|
889
|
-
isPopupReady: false
|
|
890
|
-
}, setPosition);
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
handleOpenPopupPositionChange() {
|
|
895
|
-
Object.keys(Registry.popups).forEach(groupName => {
|
|
896
|
-
const groupPopups = Registry.popups[groupName] || [];
|
|
897
|
-
groupPopups.forEach(popup => {
|
|
898
|
-
if (popup.state.isPopupOpen) {
|
|
899
|
-
const {
|
|
900
|
-
placeHolderElement,
|
|
901
|
-
dropElement,
|
|
902
|
-
defaultPosition
|
|
903
|
-
} = popup;
|
|
904
|
-
const {
|
|
905
|
-
position,
|
|
906
|
-
positionsOffset = {}
|
|
907
|
-
} = popup.state;
|
|
908
|
-
|
|
909
|
-
if (placeHolderElement && dropElement) {
|
|
910
|
-
const scrollContainer = placeHolderElement.closest('[data-scroll=true]') || document.body;
|
|
911
|
-
this.cancelRaf('resizePositionRafId');
|
|
912
|
-
this.resizePositionRafId = requestAnimationFrame(() => {
|
|
913
|
-
const needArrow = this.getNeedArrow(popup);
|
|
914
|
-
const isAbsolute = this.getIsAbsolutePopup(popup);
|
|
915
|
-
const customOrder = this.getCustomPositionOrder(popup);
|
|
916
|
-
const isMobile = isMobilePopover(true);
|
|
917
|
-
const betterPosition = viewPort.betterView(dropElement, placeHolderElement, defaultPosition, scrollContainer, {
|
|
918
|
-
needArrow,
|
|
919
|
-
isAbsolute,
|
|
920
|
-
customOrder
|
|
921
|
-
});
|
|
922
|
-
const {
|
|
923
|
-
view,
|
|
924
|
-
views,
|
|
925
|
-
viewsOffset = {},
|
|
926
|
-
targetOffset,
|
|
927
|
-
popupOffset
|
|
928
|
-
} = betterPosition || {};
|
|
929
|
-
const {
|
|
930
|
-
left: oldLeft = '',
|
|
931
|
-
top: oldTop = '',
|
|
932
|
-
bottom: oldBottom = '',
|
|
933
|
-
right: oldRight = ''
|
|
934
|
-
} = positionsOffset[position] || {};
|
|
935
|
-
const {
|
|
936
|
-
left = '',
|
|
937
|
-
top = '',
|
|
938
|
-
bottom = '',
|
|
939
|
-
right = ''
|
|
940
|
-
} = viewsOffset[view] || {};
|
|
941
|
-
const changeState = isAbsolute ? position !== view : oldLeft !== left || oldTop !== top || oldBottom !== bottom || oldRight !== right; // let isInViewPort = viewPort.isInViewPort(
|
|
942
|
-
// placeHolderElement,
|
|
943
|
-
// scrollContainer
|
|
944
|
-
// );
|
|
945
|
-
|
|
946
|
-
if (changeState) {
|
|
947
|
-
popup.setState({
|
|
948
|
-
position: view,
|
|
949
|
-
positions: views,
|
|
950
|
-
positionsOffset: viewsOffset,
|
|
951
|
-
targetOffset,
|
|
952
|
-
popupOffset,
|
|
953
|
-
isAbsolutePositioningNeeded: isAbsolute,
|
|
954
|
-
isMobile: isMobile
|
|
955
|
-
});
|
|
956
|
-
} // if (!isInViewPort && !isAbsolute) {
|
|
957
|
-
// popup.setState({ isPopupOpen: false, isPopupReady: false });
|
|
958
|
-
// } else if (view && changeState) {
|
|
959
|
-
// popup.setState({
|
|
960
|
-
// position: view,
|
|
961
|
-
// positions: views,
|
|
962
|
-
// positionsOffset: viewsOffset,
|
|
963
|
-
// targetOffset,
|
|
964
|
-
// popupOffset,
|
|
965
|
-
// isAbsolutePositioningNeeded: isAbsolute
|
|
966
|
-
// });
|
|
967
|
-
// }
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
this.resizePositionRafId = null;
|
|
971
|
-
});
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
});
|
|
975
|
-
});
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
handleResize() {
|
|
979
|
-
this.handleOpenPopupPositionChange();
|
|
980
|
-
} // handleScroll(e) {
|
|
981
|
-
// // this.handleOpenPopupPositionChange();
|
|
982
|
-
// const { closeOnScroll } = this.getCloseOnScrollPopup(this);
|
|
983
|
-
// const { isPopupReady } = this.state;
|
|
984
|
-
// if (isPopupReady) {
|
|
985
|
-
// console.log('onscrollPopupREady');
|
|
986
|
-
// }
|
|
987
|
-
// if (isPopupReady && closeOnScroll) {
|
|
988
|
-
// console.log(this, 'handle Scroll');
|
|
989
|
-
// this.togglePopup(e);
|
|
990
|
-
// }
|
|
991
|
-
// }
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
handlePopupResize(popupSize) {
|
|
995
|
-
const {
|
|
996
|
-
height,
|
|
997
|
-
width
|
|
998
|
-
} = popupSize;
|
|
999
|
-
const {
|
|
1000
|
-
height: oldHeight = 0,
|
|
1001
|
-
width: oldWidth = 0
|
|
1002
|
-
} = this.size || {};
|
|
1003
|
-
const {
|
|
1004
|
-
isPopupReady,
|
|
1005
|
-
position
|
|
1006
|
-
} = this.state;
|
|
1007
|
-
|
|
1008
|
-
if (isPopupReady && this.size && (oldHeight !== height || width !== oldWidth)) {
|
|
1009
|
-
this.handlePopupPosition(position, true);
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
this.size = popupSize;
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
getTargetRef(el) {
|
|
1016
|
-
this.placeHolderElement = el;
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
getContainerRef(el) {
|
|
1020
|
-
this.dropElement = el;
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
render() {
|
|
1024
|
-
// const { isPopupReady, isPopupOpen } = this.state;
|
|
1025
|
-
const {
|
|
1026
|
-
isMobile,
|
|
1027
|
-
...restState
|
|
1028
|
-
} = this.state; // const localState = isPopupReady ? this.state : {};
|
|
1029
|
-
|
|
1030
|
-
return /*#__PURE__*/React.createElement(Component, { ...this.props,
|
|
1031
|
-
...restState,
|
|
1032
|
-
openPopupOnly: this.openPopupOnly,
|
|
1033
|
-
closePopupOnly: this.closePopupOnly,
|
|
1034
|
-
togglePopup: this.togglePopup,
|
|
1035
|
-
removeClose: this.removeClose,
|
|
1036
|
-
getTargetRef: this.getTargetRef,
|
|
1037
|
-
getContainerRef: this.getContainerRef
|
|
1038
|
-
});
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
Popup.displayName = Component.displayName || Component.name || Popup.name;
|
|
1044
|
-
Popup.contextTypes = ContextTypes;
|
|
1045
|
-
Popup.propTypes = PopupPropTypes;
|
|
1046
|
-
return hoistStatics(Popup, Component);
|
|
1047
|
-
};
|
|
1048
|
-
|
|
1049
|
-
export default Popup;
|