@zohodesk/components 1.2.23 → 1.2.24
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 +4 -0
- package/es/Accordion/Accordion.js +7 -3
- package/es/Accordion/AccordionItem.js +4 -2
- package/es/Animation/Animation.js +7 -89
- package/es/Animation/utils.js +83 -0
- package/es/AppContainer/AppContainer.js +14 -3
- package/es/AppContainer/AppContainer.module.css +2 -2
- package/es/Avatar/Avatar.js +23 -11
- package/es/Avatar/Avatar.module.css +18 -18
- package/es/AvatarTeam/AvatarTeam.js +3 -3
- package/es/AvatarTeam/AvatarTeam.module.css +35 -35
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +1 -2
- package/es/Button/Button.js +4 -3
- package/es/Button/css/Button.module.css +70 -70
- package/es/Buttongroup/Buttongroup.js +3 -3
- package/es/Buttongroup/Buttongroup.module.css +13 -15
- package/es/Card/Card.js +21 -10
- package/es/CheckBox/CheckBox.js +5 -3
- package/es/CheckBox/CheckBox.module.css +15 -15
- package/es/DateTime/CalendarView.js +32 -20
- package/es/DateTime/DateTime.js +69 -6
- package/es/DateTime/DateTime.module.css +40 -40
- package/es/DateTime/DateTimePopupFooter.js +4 -1
- package/es/DateTime/DateTimePopupHeader.js +8 -2
- package/es/DateTime/DateWidget.js +98 -35
- package/es/DateTime/DateWidget.module.css +5 -5
- package/es/DateTime/DaysRow.js +4 -1
- package/es/DateTime/Time.js +10 -1
- package/es/DateTime/YearView.js +28 -4
- package/es/DateTime/YearView.module.css +15 -15
- package/es/DateTime/common.js +3 -0
- package/es/DateTime/constants.js +1 -0
- package/es/DateTime/dateFormatUtils/dateFormat.js +65 -30
- package/es/DateTime/dateFormatUtils/dateFormats.js +0 -1
- package/es/DateTime/dateFormatUtils/dayChange.js +13 -4
- package/es/DateTime/dateFormatUtils/index.js +31 -1
- package/es/DateTime/dateFormatUtils/monthChange.js +8 -0
- package/es/DateTime/dateFormatUtils/timeChange.js +22 -6
- package/es/DateTime/dateFormatUtils/yearChange.js +11 -2
- package/es/DateTime/objectUtils.js +14 -20
- package/es/DateTime/typeChecker.js +3 -0
- package/es/DateTime/validator.js +58 -6
- package/es/DropBox/DropBox.js +6 -2
- package/es/DropBox/DropBoxElement/DropBoxElement.js +7 -0
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +73 -76
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +5 -3
- package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +3 -0
- package/es/DropBox/css/DropBox.module.css +6 -6
- package/es/DropBox/props/defaultProps.js +1 -2
- package/es/DropBox/props/propTypes.js +1 -2
- package/es/DropDown/DropDown.js +7 -1
- package/es/DropDown/DropDown.module.css +2 -2
- package/es/DropDown/DropDownHeading.js +4 -5
- package/es/DropDown/DropDownHeading.module.css +6 -6
- package/es/DropDown/DropDownItem.js +6 -0
- package/es/DropDown/DropDownItem.module.css +12 -12
- package/es/DropDown/DropDownSearch.js +4 -0
- package/es/DropDown/DropDownSearch.module.css +3 -3
- package/es/DropDown/DropDownSeparator.js +1 -0
- package/es/DropDown/DropDownSeparator.module.css +2 -2
- package/es/DropDown/props/propTypes.js +1 -2
- package/es/Heading/Heading.js +2 -3
- package/es/Heading/Heading.module.css +2 -2
- package/es/Label/Label.js +2 -3
- package/es/Label/Label.module.css +5 -5
- package/es/Label/__tests__/Label.spec.js +1 -2
- package/es/Layout/Box.js +15 -2
- package/es/Layout/Container.js +14 -3
- package/es/Layout/Layout.module.css +15 -15
- package/es/Layout/index.js +1 -2
- package/es/Layout/utils.js +1 -0
- package/es/ListItem/ListContainer.js +8 -3
- package/es/ListItem/ListItem.js +9 -3
- package/es/ListItem/ListItem.module.css +27 -38
- package/es/ListItem/ListItemWithAvatar.js +9 -3
- package/es/ListItem/ListItemWithCheckBox.js +7 -2
- package/es/ListItem/ListItemWithIcon.js +8 -3
- package/es/ListItem/ListItemWithRadio.js +7 -3
- package/es/Modal/Modal.js +28 -11
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +89 -13
- package/es/MultiSelect/AdvancedMultiSelect.js +32 -9
- package/es/MultiSelect/EmptyState.js +2 -0
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +5 -5
- package/es/MultiSelect/MultiSelect.js +99 -30
- package/es/MultiSelect/MultiSelect.module.css +31 -31
- package/es/MultiSelect/MultiSelectHeader.js +3 -0
- package/es/MultiSelect/MultiSelectWithAvatar.js +10 -3
- package/es/MultiSelect/SelectedOptions.js +6 -3
- package/es/MultiSelect/SelectedOptions.module.css +5 -5
- package/es/MultiSelect/Suggestions.js +7 -3
- package/es/MultiSelect/props/propTypes.js +2 -2
- package/es/PopOver/PopOver.js +16 -0
- package/es/Popup/Popup.js +77 -24
- package/es/Popup/viewPort.js +16 -4
- package/es/Provider/IdProvider.js +10 -5
- package/es/Provider/LibraryContext.js +6 -4
- package/es/Provider/NumberGenerator/NumberGenerator.js +21 -7
- package/es/Provider/ZindexProvider.js +9 -2
- package/es/Radio/Radio.js +3 -0
- package/es/Radio/Radio.module.css +9 -9
- package/es/Responsive/CustomResponsive.js +30 -18
- package/es/Responsive/RefWrapper.js +6 -7
- package/es/Responsive/ResizeComponent.js +35 -25
- package/es/Responsive/ResizeObserver.js +26 -6
- package/es/Responsive/Responsive.js +34 -20
- package/es/Responsive/index.js +1 -3
- package/es/Responsive/sizeObservers.js +28 -7
- package/es/Responsive/utils/index.js +7 -5
- package/es/Responsive/utils/shallowCompare.js +7 -2
- package/es/Responsive/windowResizeObserver.js +7 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +4 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +2 -2
- package/es/ResponsiveDropBox/props/propTypes.js +1 -2
- package/es/Ribbon/Ribbon.js +3 -2
- package/es/Ribbon/Ribbon.module.css +45 -48
- package/es/RippleEffect/RippleEffect.js +1 -3
- package/es/Select/GroupSelect.js +58 -14
- package/es/Select/Select.js +79 -33
- package/es/Select/Select.module.css +23 -23
- package/es/Select/SelectWithAvatar.js +17 -4
- package/es/Select/SelectWithIcon.js +46 -5
- package/es/Select/props/propTypes.js +2 -2
- package/es/Stencils/Stencils.js +3 -3
- package/es/Stencils/Stencils.module.css +11 -11
- package/es/Switch/Switch.js +5 -3
- package/es/Switch/Switch.module.css +23 -23
- package/es/Tab/Tab.js +4 -4
- package/es/Tab/Tab.module.css +14 -14
- package/es/Tab/TabContent.js +1 -0
- package/es/Tab/TabContentWrapper.js +3 -0
- package/es/Tab/TabWrapper.js +5 -2
- package/es/Tab/Tabs.js +54 -7
- package/es/Tab/Tabs.module.css +22 -22
- package/es/Tag/Tag.js +6 -3
- package/es/Tag/Tag.module.css +24 -25
- package/es/TextBox/TextBox.js +16 -3
- package/es/TextBox/TextBox.module.css +9 -9
- package/es/TextBoxIcon/TextBoxIcon.js +9 -2
- package/es/TextBoxIcon/TextBoxIcon.module.css +7 -7
- package/es/TextBoxIcon/props/propTypes.js +1 -2
- package/es/Textarea/Textarea.js +12 -3
- package/es/Textarea/Textarea.module.css +21 -21
- package/es/Tooltip/Tooltip.js +58 -14
- package/es/Tooltip/Tooltip.module.css +5 -5
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -2
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +7 -5
- package/es/common/animation.module.css +8 -8
- package/es/common/avatarsizes.module.css +16 -16
- package/es/common/basicReset.module.css +3 -3
- package/es/common/common.module.css +24 -24
- package/es/common/customscroll.module.css +2 -2
- package/es/deprecated/PortalLayer/PortalLayer.js +25 -20
- package/es/semantic/Button/Button.js +3 -2
- package/es/semantic/Button/semanticButton.module.css +1 -1
- package/es/utils/Common.js +54 -9
- package/es/utils/ContextOptimizer.js +4 -5
- package/es/utils/constructFullName.js +2 -0
- package/es/utils/datetime/common.js +16 -5
- package/es/utils/debounce.js +5 -1
- package/es/utils/dropDownUtils.js +68 -11
- package/es/utils/getInitial.js +4 -0
- package/es/utils/shallowEqual.js +6 -0
- package/es/v1/Accordion/Accordion.js +4 -3
- package/es/v1/Accordion/AccordionItem.js +4 -2
- package/es/v1/Animation/Animation.js +5 -89
- package/es/v1/Animation/utils.js +83 -0
- package/es/v1/AppContainer/AppContainer.js +9 -3
- package/es/v1/Avatar/Avatar.js +18 -6
- package/es/v1/AvatarTeam/AvatarTeam.js +1 -0
- package/es/v1/Button/Button.js +3 -3
- package/es/v1/Card/Card.js +16 -8
- package/es/v1/CheckBox/CheckBox.js +6 -3
- package/es/v1/DateTime/CalendarView.js +32 -20
- package/es/v1/DateTime/DateTime.js +69 -6
- package/es/v1/DateTime/DateTimePopupFooter.js +4 -1
- package/es/v1/DateTime/DateTimePopupHeader.js +8 -2
- package/es/v1/DateTime/DateWidget.js +98 -35
- package/es/v1/DateTime/DaysRow.js +4 -1
- package/es/v1/DateTime/Time.js +10 -1
- package/es/v1/DateTime/YearView.js +28 -4
- package/es/v1/DropBox/DropBox.js +6 -2
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +7 -0
- package/es/v1/DropBox/props/defaultProps.js +1 -2
- package/es/v1/DropBox/props/propTypes.js +1 -2
- package/es/v1/DropDown/DropDown.js +3 -0
- package/es/v1/DropDown/DropDownHeading.js +2 -2
- package/es/v1/DropDown/DropDownItem.js +5 -0
- package/es/v1/DropDown/DropDownSearch.js +3 -2
- package/es/v1/DropDown/props/propTypes.js +1 -2
- package/es/v1/Heading/Heading.js +1 -3
- package/es/v1/Layout/Box.js +15 -2
- package/es/v1/Layout/Container.js +14 -3
- package/es/v1/ListItem/ListContainer.js +8 -3
- package/es/v1/ListItem/ListItem.js +10 -3
- package/es/v1/ListItem/ListItemWithAvatar.js +9 -1
- package/es/v1/ListItem/ListItemWithCheckBox.js +8 -2
- package/es/v1/ListItem/ListItemWithIcon.js +9 -3
- package/es/v1/ListItem/ListItemWithRadio.js +8 -3
- package/es/v1/Modal/Modal.js +17 -1
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +90 -15
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +32 -9
- package/es/v1/MultiSelect/EmptyState.js +2 -0
- package/es/v1/MultiSelect/MultiSelect.js +100 -31
- package/es/v1/MultiSelect/MultiSelectHeader.js +3 -0
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +11 -3
- package/es/v1/MultiSelect/SelectedOptions.js +6 -3
- package/es/v1/MultiSelect/Suggestions.js +7 -3
- package/es/v1/MultiSelect/props/propTypes.js +2 -2
- package/es/v1/PopOver/PopOver.js +11 -0
- package/es/v1/Popup/Popup.js +77 -24
- package/es/v1/Provider/IdProvider.js +10 -5
- package/es/v1/Provider/LibraryContext.js +6 -4
- package/es/v1/Provider/NumberGenerator/NumberGenerator.js +21 -7
- package/es/v1/Provider/ZindexProvider.js +9 -2
- package/es/v1/Radio/Radio.js +5 -2
- package/es/v1/Responsive/CustomResponsive.js +30 -18
- package/es/v1/Responsive/RefWrapper.js +6 -7
- package/es/v1/Responsive/ResizeComponent.js +35 -25
- package/es/v1/Responsive/ResizeObserver.js +26 -6
- package/es/v1/Responsive/Responsive.js +34 -20
- package/es/v1/Responsive/index.js +1 -3
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +1 -0
- package/es/v1/ResponsiveDropBox/props/propTypes.js +1 -2
- package/es/v1/Select/GroupSelect.js +58 -14
- package/es/v1/Select/Select.js +81 -37
- package/es/v1/Select/SelectWithAvatar.js +17 -4
- package/es/v1/Select/SelectWithIcon.js +46 -5
- package/es/v1/Select/props/propTypes.js +2 -2
- package/es/v1/Stencils/Stencils.js +2 -0
- package/es/v1/Switch/Switch.js +6 -3
- package/es/v1/Tab/Tab.js +3 -3
- package/es/v1/Tab/TabContent.js +1 -0
- package/es/v1/Tab/TabContentWrapper.js +3 -0
- package/es/v1/Tab/TabWrapper.js +5 -2
- package/es/v1/Tab/Tabs.js +54 -9
- package/es/v1/Tab/v1Tab.module.css +14 -14
- package/es/v1/Tab/v1Tabs.module.css +22 -22
- package/es/v1/Tag/Tag.js +5 -1
- package/es/v1/TextBox/TextBox.js +14 -0
- package/es/v1/TextBoxIcon/TextBoxIcon.js +6 -2
- package/es/v1/TextBoxIcon/props/propTypes.js +1 -2
- package/es/v1/Textarea/Textarea.js +10 -3
- package/es/v1/Tooltip/Tooltip.js +58 -14
- package/es/v1/Typography/Typography.js +2 -0
- package/es/v1/Typography/css/Typography.module.css +31 -31
- package/es/v1/Typography/css/cssJSLogic.js +3 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +1 -2
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +5 -4
- package/es/v1/semantic/Button/Button.js +1 -2
- package/lib/Accordion/Accordion.js +42 -18
- package/lib/Accordion/AccordionItem.js +40 -18
- package/lib/Accordion/index.js +3 -0
- package/lib/Accordion/props/propTypes.js +3 -0
- package/lib/Animation/Animation.js +42 -104
- package/lib/Animation/props/propTypes.js +3 -0
- package/lib/Animation/utils.js +94 -0
- package/lib/AppContainer/AppContainer.js +58 -20
- package/lib/AppContainer/AppContainer.module.css +2 -2
- package/lib/AppContainer/props/propTypes.js +3 -0
- package/lib/Avatar/Avatar.js +78 -38
- package/lib/Avatar/Avatar.module.css +18 -18
- package/lib/Avatar/__tests__/Avatar.spec.js +95 -71
- package/lib/Avatar/props/propTypes.js +3 -0
- package/lib/AvatarTeam/AvatarTeam.js +52 -30
- package/lib/AvatarTeam/AvatarTeam.module.css +35 -35
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +77 -61
- package/lib/AvatarTeam/props/propTypes.js +3 -0
- package/lib/Button/Button.js +33 -22
- package/lib/Button/__tests__/Button.spec.js +65 -48
- package/lib/Button/css/Button.module.css +70 -70
- package/lib/Button/css/cssJSLogic.js +18 -17
- package/lib/Button/index.js +3 -0
- package/lib/Button/props/defaultProps.js +2 -0
- package/lib/Button/props/propTypes.js +3 -0
- package/lib/Buttongroup/Buttongroup.js +32 -12
- package/lib/Buttongroup/Buttongroup.module.css +13 -15
- package/lib/Buttongroup/__tests__/Buttongroup.spec.js +18 -10
- package/lib/Buttongroup/props/propTypes.js +3 -0
- package/lib/Card/Card.js +102 -46
- package/lib/Card/index.js +4 -0
- package/lib/Card/props/propTypes.js +3 -0
- package/lib/CheckBox/CheckBox.js +71 -47
- package/lib/CheckBox/CheckBox.module.css +15 -15
- package/lib/CheckBox/props/propTypes.js +3 -0
- package/lib/DateTime/CalendarView.js +82 -42
- package/lib/DateTime/DateTime.js +244 -156
- package/lib/DateTime/DateTime.module.css +40 -40
- package/lib/DateTime/DateTimePopupFooter.js +33 -8
- package/lib/DateTime/DateTimePopupHeader.js +49 -17
- package/lib/DateTime/DateWidget.js +350 -249
- package/lib/DateTime/DateWidget.module.css +5 -5
- package/lib/DateTime/DaysRow.js +28 -5
- package/lib/DateTime/Time.js +75 -32
- package/lib/DateTime/YearView.js +76 -27
- package/lib/DateTime/YearView.module.css +15 -15
- package/lib/DateTime/common.js +6 -0
- package/lib/DateTime/constants.js +1 -0
- package/lib/DateTime/dateFormatUtils/dateFormat.js +187 -122
- package/lib/DateTime/dateFormatUtils/dateFormats.js +0 -1
- package/lib/DateTime/dateFormatUtils/dayChange.js +15 -7
- package/lib/DateTime/dateFormatUtils/index.js +73 -16
- package/lib/DateTime/dateFormatUtils/monthChange.js +20 -9
- package/lib/DateTime/dateFormatUtils/timeChange.js +54 -22
- package/lib/DateTime/dateFormatUtils/yearChange.js +23 -11
- package/lib/DateTime/index.js +2 -0
- package/lib/DateTime/objectUtils.js +24 -20
- package/lib/DateTime/props/propTypes.js +11 -1
- package/lib/DateTime/typeChecker.js +4 -0
- package/lib/DateTime/validator.js +73 -10
- package/lib/DropBox/DropBox.js +45 -21
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +59 -38
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +73 -76
- package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +42 -34
- package/lib/DropBox/DropBoxElement/props/propTypes.js +3 -0
- package/lib/DropBox/DropBoxElement/useDropboxPosCalc.js +14 -9
- package/lib/DropBox/css/DropBox.module.css +6 -6
- package/lib/DropBox/css/cssJSLogic.js +3 -1
- package/lib/DropBox/props/defaultProps.js +8 -4
- package/lib/DropBox/props/propTypes.js +10 -4
- package/lib/DropDown/DropDown.js +51 -5
- package/lib/DropDown/DropDown.module.css +2 -2
- package/lib/DropDown/DropDownHeading.js +39 -20
- package/lib/DropDown/DropDownHeading.module.css +6 -6
- package/lib/DropDown/DropDownItem.js +42 -20
- package/lib/DropDown/DropDownItem.module.css +12 -12
- package/lib/DropDown/DropDownSearch.js +40 -17
- package/lib/DropDown/DropDownSearch.module.css +3 -3
- package/lib/DropDown/DropDownSeparator.js +24 -4
- package/lib/DropDown/DropDownSeparator.module.css +2 -2
- package/lib/DropDown/index.js +9 -0
- package/lib/DropDown/props/propTypes.js +10 -4
- package/lib/Heading/Heading.js +37 -15
- package/lib/Heading/Heading.module.css +2 -2
- package/lib/Heading/props/propTypes.js +3 -0
- package/lib/Label/Label.js +41 -21
- package/lib/Label/Label.module.css +5 -5
- package/lib/Label/__tests__/Label.spec.js +48 -34
- package/lib/Label/props/propTypes.js +3 -0
- package/lib/Layout/Box.js +35 -15
- package/lib/Layout/Container.js +33 -14
- package/lib/Layout/Layout.module.css +15 -15
- package/lib/Layout/index.js +3 -0
- package/lib/Layout/props/propTypes.js +3 -0
- package/lib/Layout/utils.js +11 -0
- package/lib/ListItem/ListContainer.js +55 -30
- package/lib/ListItem/ListItem.js +74 -45
- package/lib/ListItem/ListItem.module.css +27 -38
- package/lib/ListItem/ListItemWithAvatar.js +80 -48
- package/lib/ListItem/ListItemWithCheckBox.js +70 -40
- package/lib/ListItem/ListItemWithIcon.js +73 -44
- package/lib/ListItem/ListItemWithRadio.js +71 -42
- package/lib/ListItem/index.js +7 -0
- package/lib/ListItem/props/propTypes.js +6 -4
- package/lib/Modal/Modal.js +45 -10
- package/lib/Modal/props/propTypes.js +3 -0
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +293 -166
- package/lib/MultiSelect/AdvancedMultiSelect.js +202 -125
- package/lib/MultiSelect/EmptyState.js +45 -24
- package/lib/MultiSelect/MobileHeader/MobileHeader.js +14 -5
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +5 -5
- package/lib/MultiSelect/MobileHeader/props/propTypes.js +3 -0
- package/lib/MultiSelect/MultiSelect.js +333 -214
- package/lib/MultiSelect/MultiSelect.module.css +31 -31
- package/lib/MultiSelect/MultiSelectHeader.js +29 -7
- package/lib/MultiSelect/MultiSelectWithAvatar.js +85 -43
- package/lib/MultiSelect/SelectedOptions.js +43 -17
- package/lib/MultiSelect/SelectedOptions.module.css +5 -5
- package/lib/MultiSelect/Suggestions.js +64 -32
- package/lib/MultiSelect/index.js +5 -0
- package/lib/MultiSelect/props/defaultProps.js +2 -0
- package/lib/MultiSelect/props/propTypes.js +14 -4
- package/lib/PopOver/PopOver.js +94 -47
- package/lib/PopOver/index.js +4 -0
- package/lib/PopOver/props/propTypes.js +3 -0
- package/lib/Popup/Popup.js +158 -81
- package/lib/Popup/viewPort.js +28 -14
- package/lib/Provider/AvatarSize.js +4 -0
- package/lib/Provider/Config.js +2 -0
- package/lib/Provider/CssProvider.js +4 -0
- package/lib/Provider/IdProvider.js +17 -6
- package/lib/Provider/LibraryContext.js +35 -15
- package/lib/Provider/LibraryContextInit.js +4 -0
- package/lib/Provider/NumberGenerator/NumberGenerator.js +44 -15
- package/lib/Provider/ZindexProvider.js +15 -3
- package/lib/Provider/index.js +5 -0
- package/lib/Radio/Radio.js +60 -36
- package/lib/Radio/Radio.module.css +9 -9
- package/lib/Radio/__tests__/Radio.spec.js +134 -103
- package/lib/Radio/props/propTypes.js +3 -0
- package/lib/Responsive/CustomResponsive.js +73 -29
- package/lib/Responsive/RefWrapper.js +17 -11
- package/lib/Responsive/ResizeComponent.js +62 -36
- package/lib/Responsive/ResizeObserver.js +24 -10
- package/lib/Responsive/Responsive.js +80 -30
- package/lib/Responsive/index.js +4 -0
- package/lib/Responsive/props/propTypes.js +3 -0
- package/lib/Responsive/sizeObservers.js +53 -17
- package/lib/Responsive/utils/index.js +11 -3
- package/lib/Responsive/utils/shallowCompare.js +11 -2
- package/lib/Responsive/windowResizeObserver.js +8 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +45 -17
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +2 -2
- package/lib/ResponsiveDropBox/props/propTypes.js +9 -4
- package/lib/Ribbon/Ribbon.js +33 -13
- package/lib/Ribbon/Ribbon.module.css +45 -48
- package/lib/Ribbon/__tests__/Ribbon.spec.js +24 -14
- package/lib/Ribbon/props/propTypes.js +3 -0
- package/lib/RippleEffect/RippleEffect.js +18 -10
- package/lib/RippleEffect/__tests__/RippleEffect.spec.js +34 -22
- package/lib/RippleEffect/props/propTypes.js +3 -0
- package/lib/Select/GroupSelect.js +229 -130
- package/lib/Select/Select.js +295 -211
- package/lib/Select/Select.module.css +23 -23
- package/lib/Select/SelectWithAvatar.js +102 -56
- package/lib/Select/SelectWithIcon.js +131 -76
- package/lib/Select/index.js +5 -0
- package/lib/Select/props/defaultProps.js +5 -4
- package/lib/Select/props/propTypes.js +10 -4
- package/lib/Stencils/Stencils.js +29 -10
- package/lib/Stencils/Stencils.module.css +11 -11
- package/lib/Stencils/__tests__/Stencils.spec.js +22 -13
- package/lib/Stencils/props/propTypes.js +3 -0
- package/lib/Switch/Switch.js +57 -34
- package/lib/Switch/Switch.module.css +23 -23
- package/lib/Switch/__tests__/Switch.spec.js +91 -72
- package/lib/Switch/props/propTypes.js +3 -0
- package/lib/Tab/Tab.js +40 -27
- package/lib/Tab/Tab.module.css +14 -14
- package/lib/Tab/TabContent.js +12 -5
- package/lib/Tab/TabContentWrapper.js +16 -8
- package/lib/Tab/TabWrapper.js +37 -19
- package/lib/Tab/Tabs.js +171 -91
- package/lib/Tab/Tabs.module.css +22 -22
- package/lib/Tab/index.js +6 -0
- package/lib/Tab/props/propTypes.js +3 -0
- package/lib/Tag/Tag.js +72 -43
- package/lib/Tag/Tag.module.css +24 -25
- package/lib/Tag/props/propTypes.js +3 -0
- package/lib/TextBox/TextBox.js +86 -60
- package/lib/TextBox/TextBox.module.css +9 -9
- package/lib/TextBox/props/propTypes.js +6 -4
- package/lib/TextBoxIcon/TextBoxIcon.js +80 -53
- package/lib/TextBoxIcon/TextBoxIcon.module.css +7 -7
- package/lib/TextBoxIcon/props/propTypes.js +9 -4
- package/lib/Textarea/Textarea.js +54 -29
- package/lib/Textarea/Textarea.module.css +21 -21
- package/lib/Textarea/props/propTypes.js +3 -0
- package/lib/Tooltip/Tooltip.js +94 -31
- package/lib/Tooltip/Tooltip.module.css +5 -5
- package/lib/Tooltip/props/propTypes.js +3 -0
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +40 -16
- package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +3 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +53 -25
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +3 -0
- package/lib/VelocityAnimation/index.js +3 -0
- package/lib/common/animation.module.css +8 -8
- package/lib/common/avatarsizes.module.css +16 -16
- package/lib/common/basicReset.module.css +3 -3
- package/lib/common/common.module.css +24 -24
- package/lib/common/customscroll.module.css +2 -2
- package/lib/css.js +40 -0
- package/lib/deprecated/PortalLayer/PortalLayer.js +46 -23
- package/lib/deprecated/PortalLayer/props/propTypes.js +3 -0
- package/lib/index.js +58 -0
- package/lib/semantic/Button/Button.js +42 -22
- package/lib/semantic/Button/props/propTypes.js +3 -0
- package/lib/semantic/Button/semanticButton.module.css +1 -1
- package/lib/semantic/index.js +2 -0
- package/lib/utils/Common.js +111 -18
- package/lib/utils/ContextOptimizer.js +16 -10
- package/lib/utils/constructFullName.js +13 -4
- package/lib/utils/datetime/common.js +34 -5
- package/lib/utils/debounce.js +6 -1
- package/lib/utils/dropDownUtils.js +175 -59
- package/lib/utils/dummyFunction.js +2 -0
- package/lib/utils/getHTMLFontSize.js +1 -0
- package/lib/utils/getInitial.js +6 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/scrollTo.js +2 -0
- package/lib/utils/shallowEqual.js +8 -0
- package/lib/v1/Accordion/Accordion.js +38 -19
- package/lib/v1/Accordion/AccordionItem.js +23 -13
- package/lib/v1/Accordion/index.js +3 -0
- package/lib/v1/Accordion/props/propTypes.js +3 -0
- package/lib/v1/Animation/Animation.js +24 -100
- package/lib/v1/Animation/props/propTypes.js +3 -0
- package/lib/v1/Animation/utils.js +94 -0
- package/lib/v1/AppContainer/AppContainer.js +46 -17
- package/lib/v1/AppContainer/props/propTypes.js +3 -0
- package/lib/v1/Avatar/Avatar.js +68 -32
- package/lib/v1/Avatar/props/propTypes.js +3 -0
- package/lib/v1/AvatarTeam/AvatarTeam.js +32 -24
- package/lib/v1/AvatarTeam/props/propTypes.js +3 -0
- package/lib/v1/Button/Button.js +32 -22
- package/lib/v1/Button/props/defaultProps.js +2 -0
- package/lib/v1/Button/props/propTypes.js +3 -0
- package/lib/v1/Buttongroup/Buttongroup.js +13 -5
- package/lib/v1/Buttongroup/props/propTypes.js +3 -0
- package/lib/v1/Card/Card.js +78 -44
- package/lib/v1/Card/index.js +4 -0
- package/lib/v1/Card/props/propTypes.js +3 -0
- package/lib/v1/CheckBox/CheckBox.js +52 -41
- package/lib/v1/CheckBox/props/propTypes.js +3 -0
- package/lib/v1/DateTime/CalendarView.js +89 -48
- package/lib/v1/DateTime/DateTime.js +246 -158
- package/lib/v1/DateTime/DateTimePopupFooter.js +33 -8
- package/lib/v1/DateTime/DateTimePopupHeader.js +49 -17
- package/lib/v1/DateTime/DateWidget.js +352 -251
- package/lib/v1/DateTime/DaysRow.js +28 -5
- package/lib/v1/DateTime/Time.js +75 -32
- package/lib/v1/DateTime/YearView.js +76 -27
- package/lib/v1/DateTime/index.js +2 -0
- package/lib/v1/DateTime/props/propTypes.js +11 -1
- package/lib/v1/DropBox/DropBox.js +45 -21
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +59 -38
- package/lib/v1/DropBox/DropBoxElement/props/propTypes.js +3 -0
- package/lib/v1/DropBox/props/defaultProps.js +8 -4
- package/lib/v1/DropBox/props/propTypes.js +10 -4
- package/lib/v1/DropDown/DropDown.js +23 -3
- package/lib/v1/DropDown/DropDownHeading.js +20 -13
- package/lib/v1/DropDown/DropDownItem.js +26 -11
- package/lib/v1/DropDown/DropDownSearch.js +28 -16
- package/lib/v1/DropDown/DropDownSeparator.js +7 -1
- package/lib/v1/DropDown/props/propTypes.js +10 -4
- package/lib/v1/Heading/Heading.js +19 -14
- package/lib/v1/Heading/props/propTypes.js +3 -0
- package/lib/v1/Label/Label.js +22 -14
- package/lib/v1/Label/props/propTypes.js +3 -0
- package/lib/v1/Layout/Box.js +35 -15
- package/lib/v1/Layout/Container.js +33 -14
- package/lib/v1/Layout/index.js +3 -0
- package/lib/v1/Layout/props/propTypes.js +3 -0
- package/lib/v1/ListItem/ListContainer.js +55 -30
- package/lib/v1/ListItem/ListItem.js +53 -38
- package/lib/v1/ListItem/ListItemWithAvatar.js +62 -39
- package/lib/v1/ListItem/ListItemWithCheckBox.js +49 -34
- package/lib/v1/ListItem/ListItemWithIcon.js +52 -37
- package/lib/v1/ListItem/ListItemWithRadio.js +49 -35
- package/lib/v1/ListItem/index.js +7 -0
- package/lib/v1/ListItem/props/propTypes.js +6 -4
- package/lib/v1/Modal/Modal.js +46 -9
- package/lib/v1/Modal/props/propTypes.js +3 -0
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +294 -168
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +202 -125
- package/lib/v1/MultiSelect/EmptyState.js +45 -24
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +14 -5
- package/lib/v1/MultiSelect/MobileHeader/props/propTypes.js +3 -0
- package/lib/v1/MultiSelect/MultiSelect.js +335 -216
- package/lib/v1/MultiSelect/MultiSelectHeader.js +29 -7
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +86 -43
- package/lib/v1/MultiSelect/SelectedOptions.js +43 -17
- package/lib/v1/MultiSelect/Suggestions.js +64 -32
- package/lib/v1/MultiSelect/index.js +5 -0
- package/lib/v1/MultiSelect/props/defaultProps.js +2 -0
- package/lib/v1/MultiSelect/props/propTypes.js +14 -4
- package/lib/v1/PopOver/PopOver.js +71 -40
- package/lib/v1/PopOver/props/propTypes.js +3 -0
- package/lib/v1/Popup/Popup.js +158 -81
- package/lib/v1/Provider/AvatarSize.js +4 -0
- package/lib/v1/Provider/Config.js +2 -0
- package/lib/v1/Provider/CssProvider.js +4 -0
- package/lib/v1/Provider/IdProvider.js +17 -6
- package/lib/v1/Provider/LibraryContext.js +35 -15
- package/lib/v1/Provider/LibraryContextInit.js +4 -0
- package/lib/v1/Provider/NumberGenerator/NumberGenerator.js +44 -15
- package/lib/v1/Provider/ZindexProvider.js +15 -3
- package/lib/v1/Provider/index.js +5 -0
- package/lib/v1/Radio/Radio.js +42 -32
- package/lib/v1/Radio/props/propTypes.js +3 -0
- package/lib/v1/Responsive/CustomResponsive.js +73 -29
- package/lib/v1/Responsive/RefWrapper.js +17 -11
- package/lib/v1/Responsive/ResizeComponent.js +62 -36
- package/lib/v1/Responsive/ResizeObserver.js +24 -10
- package/lib/v1/Responsive/Responsive.js +80 -30
- package/lib/v1/Responsive/index.js +4 -0
- package/lib/v1/Responsive/props/propTypes.js +3 -0
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +27 -13
- package/lib/v1/ResponsiveDropBox/props/propTypes.js +9 -4
- package/lib/v1/Ribbon/Ribbon.js +14 -7
- package/lib/v1/Ribbon/props/propTypes.js +3 -0
- package/lib/v1/RippleEffect/RippleEffect.js +17 -7
- package/lib/v1/RippleEffect/props/propTypes.js +3 -0
- package/lib/v1/Select/GroupSelect.js +229 -130
- package/lib/v1/Select/Select.js +297 -214
- package/lib/v1/Select/SelectWithAvatar.js +102 -56
- package/lib/v1/Select/SelectWithIcon.js +131 -76
- package/lib/v1/Select/index.js +5 -0
- package/lib/v1/Select/props/defaultProps.js +5 -4
- package/lib/v1/Select/props/propTypes.js +10 -4
- package/lib/v1/Stencils/Stencils.js +13 -3
- package/lib/v1/Stencils/props/propTypes.js +3 -0
- package/lib/v1/Switch/Switch.js +38 -25
- package/lib/v1/Switch/props/propTypes.js +3 -0
- package/lib/v1/Tab/Tab.js +40 -27
- package/lib/v1/Tab/TabContent.js +12 -5
- package/lib/v1/Tab/TabContentWrapper.js +16 -8
- package/lib/v1/Tab/TabWrapper.js +37 -19
- package/lib/v1/Tab/Tabs.js +170 -83
- package/lib/v1/Tab/index.js +6 -0
- package/lib/v1/Tab/props/propTypes.js +3 -0
- package/lib/v1/Tab/v1Tab.module.css +14 -14
- package/lib/v1/Tab/v1Tabs.module.css +22 -22
- package/lib/v1/Tag/Tag.js +50 -32
- package/lib/v1/Tag/props/propTypes.js +3 -0
- package/lib/v1/TextBox/TextBox.js +70 -47
- package/lib/v1/TextBox/props/propTypes.js +6 -4
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +80 -55
- package/lib/v1/TextBoxIcon/props/propTypes.js +9 -4
- package/lib/v1/Textarea/Textarea.js +45 -28
- package/lib/v1/Textarea/props/propTypes.js +3 -0
- package/lib/v1/Tooltip/Tooltip.js +94 -31
- package/lib/v1/Tooltip/props/propTypes.js +3 -0
- package/lib/v1/Typography/Typography.js +26 -15
- package/lib/v1/Typography/css/Typography.module.css +31 -31
- package/lib/v1/Typography/css/cssJSLogic.js +25 -20
- package/lib/v1/Typography/props/propTypes.js +3 -0
- package/lib/v1/Typography/utils/index.js +1 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +25 -12
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +3 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +38 -22
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +3 -0
- package/lib/v1/semantic/Button/Button.js +24 -18
- package/lib/v1/semantic/Button/props/propTypes.js +3 -0
- package/lib/v1/semantic/index.js +2 -0
- package/package.json +2 -2
- package/result.json +1 -1
- package/.DS_Store +0 -0
package/README.md
CHANGED
|
@@ -32,6 +32,10 @@ In this Package, we Provide Some Basic Components to Build Web App
|
|
|
32
32
|
- TextBoxIcon
|
|
33
33
|
- Tooltip
|
|
34
34
|
|
|
35
|
+
# 1.2.24
|
|
36
|
+
|
|
37
|
+
- **Animation** - style object moved to utils.
|
|
38
|
+
|
|
35
39
|
# 1.2.23
|
|
36
40
|
|
|
37
41
|
- **DropBoxElement** - A dropdown has been incorporated as one of the main focus areas, utilizing the `data-a11y-focus-main-area` attribute.
|
|
@@ -9,18 +9,22 @@ export default class Accordion extends React.Component {
|
|
|
9
9
|
};
|
|
10
10
|
this.selectMenu = this.selectMenu.bind(this);
|
|
11
11
|
}
|
|
12
|
+
|
|
12
13
|
selectMenu(selectedItem) {
|
|
13
14
|
let {
|
|
14
15
|
onSelect,
|
|
15
16
|
disableInternalState
|
|
16
17
|
} = this.props;
|
|
18
|
+
|
|
17
19
|
if (onSelect) {
|
|
18
20
|
onSelect(selectedItem);
|
|
19
21
|
}
|
|
22
|
+
|
|
20
23
|
!disableInternalState && this.setState({
|
|
21
24
|
selectedItem
|
|
22
25
|
});
|
|
23
26
|
}
|
|
27
|
+
|
|
24
28
|
componentWillReceiveProps(nextProps) {
|
|
25
29
|
if (this.props.selectedItem !== nextProps.selectedItem && !this.props.disableInternalState) {
|
|
26
30
|
this.setState({
|
|
@@ -28,6 +32,7 @@ export default class Accordion extends React.Component {
|
|
|
28
32
|
});
|
|
29
33
|
}
|
|
30
34
|
}
|
|
35
|
+
|
|
31
36
|
render() {
|
|
32
37
|
let {
|
|
33
38
|
className,
|
|
@@ -69,11 +74,10 @@ export default class Accordion extends React.Component {
|
|
|
69
74
|
"data-selector-id": dataSelectorId
|
|
70
75
|
}, children);
|
|
71
76
|
}
|
|
77
|
+
|
|
72
78
|
}
|
|
73
79
|
Accordion.propTypes = Accordion_propTypes;
|
|
74
|
-
Accordion.defaultProps = Accordion_defaultProps;
|
|
75
|
-
|
|
76
|
-
// if (__DOCS__) {
|
|
80
|
+
Accordion.defaultProps = Accordion_defaultProps; // if (__DOCS__) {
|
|
77
81
|
// Accordion.docs = {
|
|
78
82
|
// componentGroup: 'Animation',
|
|
79
83
|
// folderName: 'Style Guide'
|
|
@@ -8,6 +8,7 @@ export default class AccordionItem extends React.Component {
|
|
|
8
8
|
super(props);
|
|
9
9
|
this.equalityCheck = this.equalityCheck.bind(this);
|
|
10
10
|
}
|
|
11
|
+
|
|
11
12
|
equalityCheck() {
|
|
12
13
|
let {
|
|
13
14
|
equalityCheck,
|
|
@@ -16,6 +17,7 @@ export default class AccordionItem extends React.Component {
|
|
|
16
17
|
} = this.props;
|
|
17
18
|
return equalityCheck ? equalityCheck(id, selectedItem) : selectedItem == id;
|
|
18
19
|
}
|
|
20
|
+
|
|
19
21
|
render() {
|
|
20
22
|
let {
|
|
21
23
|
id,
|
|
@@ -50,10 +52,10 @@ export default class AccordionItem extends React.Component {
|
|
|
50
52
|
isActive: this.equalityCheck()
|
|
51
53
|
}, children[1]));
|
|
52
54
|
}
|
|
55
|
+
|
|
53
56
|
}
|
|
54
57
|
AccordionItem.propTypes = AccordionItem_propTypes;
|
|
55
|
-
AccordionItem.defaultProps = AccordionItem_defaultProps;
|
|
56
|
-
// if (__DOCS__) {
|
|
58
|
+
AccordionItem.defaultProps = AccordionItem_defaultProps; // if (__DOCS__) {
|
|
57
59
|
// AccordionItem.docs = {
|
|
58
60
|
// componentGroup: 'Animation',
|
|
59
61
|
// folderName: 'Style Guide'
|
|
@@ -2,11 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import { defaultProps } from './props/defaultProps';
|
|
3
3
|
import { propTypes } from './props/propTypes';
|
|
4
4
|
import { CSSTransition } from 'react-transition-group';
|
|
5
|
-
import
|
|
5
|
+
import { animationStyle } from './utils';
|
|
6
6
|
export default class Animation extends React.Component {
|
|
7
7
|
constructor(props) {
|
|
8
8
|
super(props);
|
|
9
9
|
}
|
|
10
|
+
|
|
10
11
|
render() {
|
|
11
12
|
let {
|
|
12
13
|
name,
|
|
@@ -19,91 +20,9 @@ export default class Animation extends React.Component {
|
|
|
19
20
|
onExit = () => {},
|
|
20
21
|
delayClassName = null
|
|
21
22
|
} = this.props;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
enterActive: style.zoomInEnterActive,
|
|
26
|
-
enterDone: style.zoomInEnterActive,
|
|
27
|
-
exit: style.zoomInLeave,
|
|
28
|
-
exitActive: style.zoomInLeaveActive,
|
|
29
|
-
exitDone: style.zoomInLeaveActive,
|
|
30
|
-
appear: style.zoomInEnter,
|
|
31
|
-
appearActive: style.zoomInEnterActive
|
|
32
|
-
},
|
|
33
|
-
scaleIn: {
|
|
34
|
-
enter: style.scaleInEnter,
|
|
35
|
-
enterActive: style.scaleInEnterActive,
|
|
36
|
-
enterDone: style.scaleInEnterActive,
|
|
37
|
-
exit: style.scaleInLeave,
|
|
38
|
-
exitActive: style.scaleInLeaveActive,
|
|
39
|
-
exitDone: style.scaleInLeaveActive,
|
|
40
|
-
appear: style.scaleInEnter,
|
|
41
|
-
appearActive: style.scaleInEnterActive
|
|
42
|
-
},
|
|
43
|
-
fadeIn: {
|
|
44
|
-
enter: style.fadeInEnter,
|
|
45
|
-
enterActive: style.fadeInEnterActive,
|
|
46
|
-
enterDone: style.fadeInEnterActive,
|
|
47
|
-
exit: style.fadeInLeave,
|
|
48
|
-
exitActive: style.fadeInLeaveActive,
|
|
49
|
-
exitDone: style.fadeInLeaveActive,
|
|
50
|
-
appear: style.fadeInEnter,
|
|
51
|
-
appearActive: style.fadeInEnterActive
|
|
52
|
-
},
|
|
53
|
-
slideLeft: {
|
|
54
|
-
enter: style.slideLeftEnter,
|
|
55
|
-
enterActive: style.slideLeftEnterActive,
|
|
56
|
-
enterDone: style.slideLeftEnterActive,
|
|
57
|
-
exit: style.slideLeftLeave,
|
|
58
|
-
exitActive: style.slideLeftLeaveActive,
|
|
59
|
-
exitDone: style.slideLeftLeaveActive,
|
|
60
|
-
appear: style.slideLeftEnter,
|
|
61
|
-
appearActive: style.slideLeftEnterActive
|
|
62
|
-
},
|
|
63
|
-
slideDown: {
|
|
64
|
-
enter: style.slideDownEnter,
|
|
65
|
-
enterActive: style.slideDownEnterActive,
|
|
66
|
-
enterDone: style.slideDownEnterActive,
|
|
67
|
-
exit: style.slideDownLeave,
|
|
68
|
-
exitActive: style.slideDownLeaveActive,
|
|
69
|
-
exitDone: style.slideDownLeaveActive,
|
|
70
|
-
appear: style.slideDownEnter,
|
|
71
|
-
appearActive: style.slideDownEnterActive
|
|
72
|
-
},
|
|
73
|
-
skewIn: {
|
|
74
|
-
enter: style.skewInEnter,
|
|
75
|
-
enterActive: style.skewInEnterActive,
|
|
76
|
-
enterDone: style.skewInEnterActive,
|
|
77
|
-
exit: style.skewInLeave,
|
|
78
|
-
exitActive: style.skewInLeaveActive,
|
|
79
|
-
exitDone: style.skewInLeaveActive,
|
|
80
|
-
appear: style.skewInEnter,
|
|
81
|
-
appearActive: style.skewInEnterActive
|
|
82
|
-
},
|
|
83
|
-
none: {
|
|
84
|
-
enter: style.noneEnter,
|
|
85
|
-
enterActive: style.noneEnterActive,
|
|
86
|
-
enterDone: style.noneEnterActive,
|
|
87
|
-
exit: style.noneLeave,
|
|
88
|
-
exitActive: style.noneLeaveActive,
|
|
89
|
-
exitDone: style.noneLeaveActive,
|
|
90
|
-
appear: style.noneEnter,
|
|
91
|
-
appearActive: style.noneEnterActive
|
|
92
|
-
},
|
|
93
|
-
default: {
|
|
94
|
-
enter: style.defaultEnter,
|
|
95
|
-
enterActive: style.defaultEnterActive,
|
|
96
|
-
enterDone: style.defaultEnterActive,
|
|
97
|
-
exit: style.defaultLeave,
|
|
98
|
-
exitActive: style.defaultLeaveActive,
|
|
99
|
-
exitDone: style.defaultLeaveActive,
|
|
100
|
-
appear: style.defaultEnter,
|
|
101
|
-
appearActive: style.defaultEnterActive
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
let newClassNames = delayClassName ? Object.assign({}, animation[name], {
|
|
105
|
-
exit: `${delayClassName} ${animation[name].exit}`
|
|
106
|
-
}) : animation[name];
|
|
23
|
+
let newClassNames = delayClassName ? Object.assign({}, animationStyle[name], {
|
|
24
|
+
exit: `${delayClassName} ${animationStyle[name].exit}`
|
|
25
|
+
}) : animationStyle[name];
|
|
107
26
|
return /*#__PURE__*/React.createElement(CSSTransition, {
|
|
108
27
|
classNames: newClassNames && newClassNames,
|
|
109
28
|
in: isActive,
|
|
@@ -120,11 +39,10 @@ export default class Animation extends React.Component {
|
|
|
120
39
|
onExit: onExit
|
|
121
40
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, children));
|
|
122
41
|
}
|
|
42
|
+
|
|
123
43
|
}
|
|
124
44
|
Animation.propTypes = propTypes;
|
|
125
|
-
Animation.defaultProps = defaultProps;
|
|
126
|
-
|
|
127
|
-
// if (__DOCS__) {
|
|
45
|
+
Animation.defaultProps = defaultProps; // if (__DOCS__) {
|
|
128
46
|
// Animation.docs = {
|
|
129
47
|
// componentGroup: 'Animation',
|
|
130
48
|
// folderName: 'Style Guide',
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import style from '../common/transition.module.css';
|
|
2
|
+
export const animationStyle = {
|
|
3
|
+
zoomIn: {
|
|
4
|
+
enter: style.zoomInEnter,
|
|
5
|
+
enterActive: style.zoomInEnterActive,
|
|
6
|
+
enterDone: style.zoomInEnterActive,
|
|
7
|
+
exit: style.zoomInLeave,
|
|
8
|
+
exitActive: style.zoomInLeaveActive,
|
|
9
|
+
exitDone: style.zoomInLeaveActive,
|
|
10
|
+
appear: style.zoomInEnter,
|
|
11
|
+
appearActive: style.zoomInEnterActive
|
|
12
|
+
},
|
|
13
|
+
scaleIn: {
|
|
14
|
+
enter: style.scaleInEnter,
|
|
15
|
+
enterActive: style.scaleInEnterActive,
|
|
16
|
+
enterDone: style.scaleInEnterActive,
|
|
17
|
+
exit: style.scaleInLeave,
|
|
18
|
+
exitActive: style.scaleInLeaveActive,
|
|
19
|
+
exitDone: style.scaleInLeaveActive,
|
|
20
|
+
appear: style.scaleInEnter,
|
|
21
|
+
appearActive: style.scaleInEnterActive
|
|
22
|
+
},
|
|
23
|
+
fadeIn: {
|
|
24
|
+
enter: style.fadeInEnter,
|
|
25
|
+
enterActive: style.fadeInEnterActive,
|
|
26
|
+
enterDone: style.fadeInEnterActive,
|
|
27
|
+
exit: style.fadeInLeave,
|
|
28
|
+
exitActive: style.fadeInLeaveActive,
|
|
29
|
+
exitDone: style.fadeInLeaveActive,
|
|
30
|
+
appear: style.fadeInEnter,
|
|
31
|
+
appearActive: style.fadeInEnterActive
|
|
32
|
+
},
|
|
33
|
+
slideLeft: {
|
|
34
|
+
enter: style.slideLeftEnter,
|
|
35
|
+
enterActive: style.slideLeftEnterActive,
|
|
36
|
+
enterDone: style.slideLeftEnterActive,
|
|
37
|
+
exit: style.slideLeftLeave,
|
|
38
|
+
exitActive: style.slideLeftLeaveActive,
|
|
39
|
+
exitDone: style.slideLeftLeaveActive,
|
|
40
|
+
appear: style.slideLeftEnter,
|
|
41
|
+
appearActive: style.slideLeftEnterActive
|
|
42
|
+
},
|
|
43
|
+
slideDown: {
|
|
44
|
+
enter: style.slideDownEnter,
|
|
45
|
+
enterActive: style.slideDownEnterActive,
|
|
46
|
+
enterDone: style.slideDownEnterActive,
|
|
47
|
+
exit: style.slideDownLeave,
|
|
48
|
+
exitActive: style.slideDownLeaveActive,
|
|
49
|
+
exitDone: style.slideDownLeaveActive,
|
|
50
|
+
appear: style.slideDownEnter,
|
|
51
|
+
appearActive: style.slideDownEnterActive
|
|
52
|
+
},
|
|
53
|
+
skewIn: {
|
|
54
|
+
enter: style.skewInEnter,
|
|
55
|
+
enterActive: style.skewInEnterActive,
|
|
56
|
+
enterDone: style.skewInEnterActive,
|
|
57
|
+
exit: style.skewInLeave,
|
|
58
|
+
exitActive: style.skewInLeaveActive,
|
|
59
|
+
exitDone: style.skewInLeaveActive,
|
|
60
|
+
appear: style.skewInEnter,
|
|
61
|
+
appearActive: style.skewInEnterActive
|
|
62
|
+
},
|
|
63
|
+
none: {
|
|
64
|
+
enter: style.noneEnter,
|
|
65
|
+
enterActive: style.noneEnterActive,
|
|
66
|
+
enterDone: style.noneEnterActive,
|
|
67
|
+
exit: style.noneLeave,
|
|
68
|
+
exitActive: style.noneLeaveActive,
|
|
69
|
+
exitDone: style.noneLeaveActive,
|
|
70
|
+
appear: style.noneEnter,
|
|
71
|
+
appearActive: style.noneEnterActive
|
|
72
|
+
},
|
|
73
|
+
default: {
|
|
74
|
+
enter: style.defaultEnter,
|
|
75
|
+
enterActive: style.defaultEnterActive,
|
|
76
|
+
enterDone: style.defaultEnterActive,
|
|
77
|
+
exit: style.defaultLeave,
|
|
78
|
+
exitActive: style.defaultLeaveActive,
|
|
79
|
+
exitDone: style.defaultLeaveActive,
|
|
80
|
+
appear: style.defaultEnter,
|
|
81
|
+
appearActive: style.defaultEnterActive
|
|
82
|
+
}
|
|
83
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { defaultProps } from './props/defaultProps';
|
|
4
5
|
import { propTypes } from './props/propTypes';
|
|
@@ -30,22 +31,27 @@ export default class AppContainer extends React.Component {
|
|
|
30
31
|
getTooltipContainer: () => this.containerElement
|
|
31
32
|
});
|
|
32
33
|
}
|
|
34
|
+
|
|
33
35
|
mouseOverDispatch(e) {
|
|
34
36
|
if (this.tooltipRef) {
|
|
35
37
|
this.tooltipRef.handleOver(e, this.containerElement);
|
|
36
38
|
}
|
|
37
39
|
}
|
|
40
|
+
|
|
38
41
|
removeTimeout() {
|
|
39
42
|
if (this.timer) {
|
|
40
43
|
this.timer = clearTimeout(this.timer);
|
|
41
44
|
}
|
|
42
45
|
}
|
|
46
|
+
|
|
43
47
|
handleOver(e) {
|
|
44
48
|
if (this.timer) {
|
|
45
49
|
this.timer = clearTimeout(this.timer);
|
|
46
50
|
}
|
|
51
|
+
|
|
47
52
|
this.timer = setTimeout(() => this.mouseOverDispatch(e), this.tooltipDebounce);
|
|
48
53
|
}
|
|
54
|
+
|
|
49
55
|
getContainerRef(ref) {
|
|
50
56
|
let {
|
|
51
57
|
eleRef
|
|
@@ -53,23 +59,28 @@ export default class AppContainer extends React.Component {
|
|
|
53
59
|
this.containerElement = ref;
|
|
54
60
|
eleRef && eleRef(ref);
|
|
55
61
|
}
|
|
62
|
+
|
|
56
63
|
setTooltipRef(ref) {
|
|
57
64
|
this.tooltipRef = ref;
|
|
58
65
|
}
|
|
66
|
+
|
|
59
67
|
componentDidMount() {
|
|
60
68
|
let {
|
|
61
69
|
needTooltip
|
|
62
70
|
} = this.props;
|
|
71
|
+
|
|
63
72
|
if (this.containerElement && needTooltip) {
|
|
64
73
|
this.containerElement.addEventListener('mouseover', this.handleOver, false);
|
|
65
74
|
this.containerElement.addEventListener('mouseout', this.removeTimeout, false);
|
|
66
75
|
this.tooltipRef.observeElement();
|
|
67
76
|
}
|
|
68
77
|
}
|
|
78
|
+
|
|
69
79
|
componentWillUnmount() {
|
|
70
80
|
let {
|
|
71
81
|
needTooltip
|
|
72
82
|
} = this.props;
|
|
83
|
+
|
|
73
84
|
if (this.containerElement && needTooltip) {
|
|
74
85
|
this.containerElement.removeEventListener('mouseover', this.handleOver, false);
|
|
75
86
|
this.containerElement.addEventListener('mouseout', this.removeTimeout, false);
|
|
@@ -79,6 +90,7 @@ export default class AppContainer extends React.Component {
|
|
|
79
90
|
});
|
|
80
91
|
}
|
|
81
92
|
}
|
|
93
|
+
|
|
82
94
|
render() {
|
|
83
95
|
let {
|
|
84
96
|
className,
|
|
@@ -114,11 +126,10 @@ export default class AppContainer extends React.Component {
|
|
|
114
126
|
customClass: tooltipClass
|
|
115
127
|
}, TooltipProps))) : null);
|
|
116
128
|
}
|
|
129
|
+
|
|
117
130
|
}
|
|
118
131
|
AppContainer.propTypes = propTypes;
|
|
119
|
-
AppContainer.defaultProps = defaultProps;
|
|
120
|
-
|
|
121
|
-
// if (__DOCS__) {
|
|
132
|
+
AppContainer.defaultProps = defaultProps; // if (__DOCS__) {
|
|
122
133
|
// AppContainer.docs = {
|
|
123
134
|
// componentGroup: 'Template',
|
|
124
135
|
// folderName: 'Style Guide'
|
package/es/Avatar/Avatar.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { defaultProps } from './props/defaultProps';
|
|
4
5
|
import { propTypes } from './props/propTypes';
|
|
@@ -17,6 +18,7 @@ eslint css-modules/no-unused-class: [2, { markAsUsed: ['circle', 'square',
|
|
|
17
18
|
'small','medium','xmedium',"xsmall", "large", "xlarge", "primary", "secondary",
|
|
18
19
|
"info","default"] }]
|
|
19
20
|
*/
|
|
21
|
+
|
|
20
22
|
export default class Avatar extends React.Component {
|
|
21
23
|
constructor(props) {
|
|
22
24
|
super(props);
|
|
@@ -27,6 +29,7 @@ export default class Avatar extends React.Component {
|
|
|
27
29
|
this.putValidImageURLJSON = this.putValidImageURLJSON.bind(this);
|
|
28
30
|
this.getInitialByFullName = this.getInitialByFullName.bind(this);
|
|
29
31
|
}
|
|
32
|
+
|
|
30
33
|
componentDidUpdate(prevProps, prevState) {
|
|
31
34
|
let {
|
|
32
35
|
src
|
|
@@ -34,12 +37,14 @@ export default class Avatar extends React.Component {
|
|
|
34
37
|
let {
|
|
35
38
|
isLoaded
|
|
36
39
|
} = this.state;
|
|
40
|
+
|
|
37
41
|
if (prevProps.src !== src) {
|
|
38
42
|
this.setState({
|
|
39
43
|
isLoaded: !isLoaded
|
|
40
44
|
});
|
|
41
45
|
}
|
|
42
46
|
}
|
|
47
|
+
|
|
43
48
|
putInvalidImageURLJSON() {
|
|
44
49
|
const {
|
|
45
50
|
src,
|
|
@@ -49,23 +54,25 @@ export default class Avatar extends React.Component {
|
|
|
49
54
|
isLoaded
|
|
50
55
|
} = this.state;
|
|
51
56
|
let _validImgArr = [...Avatar.validImageURLs];
|
|
52
|
-
let _invalidImgArr = [...Avatar.invalidImageURLs];
|
|
53
|
-
|
|
54
|
-
// if (alternateSrc) {
|
|
57
|
+
let _invalidImgArr = [...Avatar.invalidImageURLs]; // if (alternateSrc) {
|
|
55
58
|
// _validImgArr.push(alternateSrc);
|
|
56
59
|
// }
|
|
57
60
|
|
|
58
61
|
const validIndex = _validImgArr.indexOf(src);
|
|
62
|
+
|
|
59
63
|
if (validIndex !== -1) {
|
|
60
64
|
_validImgArr.splice(validIndex, 1);
|
|
61
65
|
}
|
|
66
|
+
|
|
62
67
|
_invalidImgArr.push(src);
|
|
68
|
+
|
|
63
69
|
Avatar.invalidImageURLs = _invalidImgArr;
|
|
64
70
|
Avatar.validImageURLs = _validImgArr;
|
|
65
71
|
this.setState({
|
|
66
72
|
isLoaded: !isLoaded
|
|
67
73
|
});
|
|
68
74
|
}
|
|
75
|
+
|
|
69
76
|
putValidImageURLJSON() {
|
|
70
77
|
const {
|
|
71
78
|
src
|
|
@@ -75,28 +82,32 @@ export default class Avatar extends React.Component {
|
|
|
75
82
|
} = this.state;
|
|
76
83
|
const validImgArr = Avatar.validImageURLs;
|
|
77
84
|
const invalidImgArr = Avatar.invalidImageURLs;
|
|
85
|
+
|
|
78
86
|
if (src && validImgArr.indexOf(src) === -1 && invalidImgArr.indexOf(src) === -1) {
|
|
79
87
|
let _validImgArr = [...validImgArr];
|
|
88
|
+
|
|
80
89
|
_validImgArr.push(src);
|
|
90
|
+
|
|
81
91
|
Avatar.validImageURLs = _validImgArr;
|
|
82
92
|
this.setState({
|
|
83
93
|
isLoaded: !isLoaded
|
|
84
94
|
});
|
|
85
95
|
}
|
|
86
96
|
}
|
|
87
|
-
|
|
88
97
|
/* this will cause error if user name already have some space need to move firstName lastName user preference pattern*/
|
|
98
|
+
|
|
99
|
+
|
|
89
100
|
getInitialByFullName() {
|
|
90
101
|
let fullName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
91
102
|
fullName = (fullName || '').trim();
|
|
92
103
|
let nameList = fullName.split(' ');
|
|
104
|
+
|
|
93
105
|
if (nameList.length === 1) {
|
|
94
106
|
return getInitial('', nameList[0]);
|
|
95
107
|
}
|
|
96
|
-
return getInitial(nameList[0], nameList[1]);
|
|
97
|
-
}
|
|
98
108
|
|
|
99
|
-
|
|
109
|
+
return getInitial(nameList[0], nameList[1]);
|
|
110
|
+
} // componentDidMount() {
|
|
100
111
|
// const { src } = this.props;
|
|
101
112
|
// const validImgArr = Avatar.validImageURLs;
|
|
102
113
|
// if (validImgArr.indexOf(src) === -1) {
|
|
@@ -105,6 +116,7 @@ export default class Avatar extends React.Component {
|
|
|
105
116
|
// }
|
|
106
117
|
// }
|
|
107
118
|
|
|
119
|
+
|
|
108
120
|
render() {
|
|
109
121
|
let {
|
|
110
122
|
src,
|
|
@@ -135,8 +147,8 @@ export default class Avatar extends React.Component {
|
|
|
135
147
|
let textStyle = textPalette ? style[textPalette] : palette === 'secondary' ? style.white : style.black;
|
|
136
148
|
let shapeStyle = shape === 'circle' ? 'circle' : `square_${size}`;
|
|
137
149
|
initial = initial || this.getInitialByFullName(name);
|
|
138
|
-
let isInvalidImageList = Avatar.invalidImageURLs.indexOf(src) !== -1;
|
|
139
|
-
|
|
150
|
+
let isInvalidImageList = Avatar.invalidImageURLs.indexOf(src) !== -1; //let isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
|
|
151
|
+
|
|
140
152
|
let showAvatar = src && !isInvalidImageList;
|
|
141
153
|
let showInitial = !showAvatar || showAvatar && isInvalidImageList;
|
|
142
154
|
const showAlternateAvatar = alternateSrc ? showInitial : false;
|
|
@@ -171,12 +183,12 @@ export default class Avatar extends React.Component {
|
|
|
171
183
|
className: `${style.shadow} ${textStyle} `
|
|
172
184
|
})));
|
|
173
185
|
}
|
|
186
|
+
|
|
174
187
|
}
|
|
175
188
|
Avatar.defaultProps = defaultProps;
|
|
176
189
|
Avatar.propTypes = propTypes;
|
|
177
190
|
Avatar.invalidImageURLs = [];
|
|
178
|
-
Avatar.validImageURLs = [];
|
|
179
|
-
// if (__DOCS__) {
|
|
191
|
+
Avatar.validImageURLs = []; // if (__DOCS__) {
|
|
180
192
|
// Avatar.docs = {
|
|
181
193
|
// componentGroup: 'Avatar Group',
|
|
182
194
|
// folderName: 'Style Guide'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.varClass {
|
|
2
2
|
/* avatar default variables */
|
|
3
3
|
--avatar_text_color: var(--zdt_avatar_default_text);
|
|
4
|
-
--avatar_font_size:
|
|
4
|
+
--avatar_font_size: var(--zd_font_size14);
|
|
5
5
|
--avatar_bg_color: var(--zdt_avatar_default_bg);
|
|
6
6
|
--avatar_border_radius: 50%;
|
|
7
7
|
--avatar_border_width: 0;
|
|
@@ -49,19 +49,19 @@
|
|
|
49
49
|
|
|
50
50
|
.shadow {
|
|
51
51
|
position: absolute;
|
|
52
|
-
height: 100
|
|
53
|
-
width: 100
|
|
54
|
-
top: 0;
|
|
52
|
+
height: 100% ;
|
|
53
|
+
width: 100% ;
|
|
54
|
+
top: 0 ;
|
|
55
55
|
pointer-events: none;
|
|
56
56
|
border-radius: var(--avatar_border_radius);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
[dir=ltr] .shadow {
|
|
60
|
-
left: 0;
|
|
60
|
+
left: 0 ;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
[dir=rtl] .shadow {
|
|
64
|
-
right: 0;
|
|
64
|
+
right: 0 ;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.shadow.black {
|
|
@@ -81,20 +81,20 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.image {
|
|
84
|
-
width: 100
|
|
85
|
-
height: 100
|
|
84
|
+
width: 100% ;
|
|
85
|
+
height: 100% ;
|
|
86
86
|
position: absolute;
|
|
87
|
-
top: 0;
|
|
87
|
+
top: 0 ;
|
|
88
88
|
z-index: 0;
|
|
89
89
|
border-radius: var(--avatar_border_radius);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
[dir=ltr] .image {
|
|
93
|
-
left: 0;
|
|
93
|
+
left: 0 ;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
[dir=rtl] .image {
|
|
97
|
-
right: 0;
|
|
97
|
+
right: 0 ;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.animate {
|
|
@@ -153,31 +153,31 @@
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
.xxsmall {
|
|
156
|
-
--avatar_font_size:
|
|
156
|
+
--avatar_font_size: var(--zd_font_size8);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
.small {
|
|
160
|
-
--avatar_font_size:
|
|
160
|
+
--avatar_font_size: var(--zd_font_size9);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
.xsmall {
|
|
164
|
-
--avatar_font_size:
|
|
164
|
+
--avatar_font_size: var(--zd_font_size12);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
.medium {
|
|
168
|
-
--avatar_font_size:
|
|
168
|
+
--avatar_font_size: var(--zd_font_size14);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
.xmedium {
|
|
172
|
-
--avatar_font_size:
|
|
172
|
+
--avatar_font_size: var(--zd_font_size14);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
.large {
|
|
176
|
-
--avatar_font_size:
|
|
176
|
+
--avatar_font_size: var(--zd_font_size18);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
.xlarge {
|
|
180
|
-
--avatar_font_size:
|
|
180
|
+
--avatar_font_size: var(--zd_font_size28);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
.white {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { defaultProps } from './props/defaultProps';
|
|
4
5
|
import { propTypes } from './props/propTypes';
|
|
@@ -71,11 +72,10 @@ export default class AvatarTeam extends React.Component {
|
|
|
71
72
|
${style[`${size}team`]} ${customAvatarTeam}`
|
|
72
73
|
}));
|
|
73
74
|
}
|
|
75
|
+
|
|
74
76
|
}
|
|
75
77
|
AvatarTeam.defaultProps = defaultProps;
|
|
76
|
-
AvatarTeam.propTypes = propTypes;
|
|
77
|
-
|
|
78
|
-
// if (__DOCS__) {
|
|
78
|
+
AvatarTeam.propTypes = propTypes; // if (__DOCS__) {
|
|
79
79
|
// AvatarTeam.docs = {
|
|
80
80
|
// componentGroup: 'Avatar Group',
|
|
81
81
|
// folderName: 'Style Guide',
|