@zohodesk/components 1.1.1 → 1.2.0-temp-195
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/.cli/MissedPropType_Keys.html +101 -0
- package/.cli/PropLessFiles.html +101 -0
- package/.cli/PropUnificationExcludeFilesArray.js +231 -0
- package/.cli/PropValidationExcludeFilesArray.js +1 -0
- package/.cli/ThemeValidationExcludeFiles.js +1 -0
- package/.cli/UnValidatedFiles.html +101 -0
- package/.cli/propValidation_report.html +182 -0
- package/.cli/stringContains.js +1 -0
- package/PropValidationExcludeFilesArray.js +1 -0
- package/README.md +1418 -1270
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +174 -169
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkModifyCategory.module.css +465 -450
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkTheme.module.css +31 -30
- package/assets/Appearance/dark/themes/green/green_CTA_DarkModifyCategory.module.css +465 -450
- package/assets/Appearance/dark/themes/green/green_CTA_DarkTheme.module.css +31 -30
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkModifyCategory.module.css +465 -450
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkTheme.module.css +31 -30
- package/assets/Appearance/dark/themes/red/red_CTA_DarkModifyCategory.module.css +465 -450
- package/assets/Appearance/dark/themes/red/red_CTA_DarkTheme.module.css +31 -30
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkModifyCategory.module.css +465 -450
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkTheme.module.css +31 -30
- package/assets/Appearance/light/mode/Component_LightMode.module.css +173 -168
- package/assets/Appearance/light/themes/blue/blue_CTA_LightModifyCategory.module.css +465 -450
- package/assets/Appearance/light/themes/blue/blue_CTA_LightTheme.module.css +31 -30
- package/assets/Appearance/light/themes/green/green_CTA_LightModifyCategory.module.css +465 -450
- package/assets/Appearance/light/themes/green/green_CTA_LightTheme.module.css +31 -30
- package/assets/Appearance/light/themes/orange/orange_CTA_LightModifyCategory.module.css +465 -450
- package/assets/Appearance/light/themes/orange/orange_CTA_LightTheme.module.css +31 -30
- package/assets/Appearance/light/themes/red/red_CTA_LightModifyCategory.module.css +465 -450
- package/assets/Appearance/light/themes/red/red_CTA_LightTheme.module.css +31 -30
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightModifyCategory.module.css +465 -450
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightTheme.module.css +31 -30
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +174 -169
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkModifyCategory.module.css +465 -450
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkTheme.module.css +31 -30
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkModifyCategory.module.css +465 -450
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkTheme.module.css +31 -30
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkModifyCategory.module.css +465 -450
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkTheme.module.css +31 -30
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkModifyCategory.module.css +465 -450
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkTheme.module.css +31 -30
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkModifyCategory.module.css +465 -450
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkTheme.module.css +31 -30
- package/assets/Contrast/darkContrastLightness.module.css +34 -34
- package/assets/Contrast/lightContrastLightness.module.css +34 -34
- package/assets/Contrast/pureDarkContrastLightness.module.css +34 -34
- package/es/Animation/Animation.js +4 -86
- package/es/Animation/utils.js +83 -0
- package/es/AppContainer/AppContainer.js +13 -9
- package/es/AppContainer/AppContainer.module.css +18 -18
- package/es/Avatar/Avatar.js +14 -14
- package/es/Avatar/Avatar.module.css +175 -175
- package/es/Avatar/__tests__/Avatar.spec.js +181 -0
- package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +591 -0
- package/es/AvatarTeam/AvatarTeam.js +14 -14
- package/es/AvatarTeam/AvatarTeam.module.css +189 -189
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +138 -0
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +705 -0
- package/es/Button/Button.js +14 -11
- package/es/Button/__tests__/Button.spec.js +122 -61
- package/es/Button/css/Button.module.css +528 -526
- package/es/Button/css/cssJSLogic.js +1 -1
- package/es/Button/props/defaultProps.js +2 -1
- package/es/Button/props/propTypes.js +3 -2
- package/es/Buttongroup/Buttongroup.js +1 -1
- package/es/Buttongroup/Buttongroup.module.css +104 -105
- package/es/Buttongroup/__tests__/Buttongroup.spec.js +37 -0
- package/es/Buttongroup/__tests__/__snapshots__/Buttongroup.spec.js.snap +191 -0
- package/es/Card/Card.js +4 -4
- package/es/Card/Card.module.css +20 -20
- package/es/Card/props/propTypes.js +9 -4
- package/es/CheckBox/CheckBox.js +18 -8
- package/es/CheckBox/CheckBox.module.css +157 -157
- package/es/CheckBox/props/propTypes.js +1 -2
- package/es/DateTime/CalendarView.js +0 -0
- package/es/DateTime/DateTime.js +2 -29
- package/es/DateTime/DateTime.module.css +248 -235
- package/es/DateTime/DateTimePopupFooter.js +5 -1
- package/es/DateTime/DateTimePopupHeader.js +3 -1
- package/es/DateTime/DateWidget.js +17 -12
- package/es/DateTime/DateWidget.module.css +38 -38
- package/es/DateTime/DaysRow.js +3 -1
- package/es/DateTime/Time.js +4 -0
- package/es/DateTime/YearView.js +0 -1
- package/es/DateTime/YearView.module.css +98 -98
- package/es/DateTime/common.js +0 -0
- package/es/DateTime/dateFormatUtils/dateFormat.js +14 -2
- package/es/DateTime/dateFormatUtils/dayChange.js +2 -1
- package/es/DateTime/dateFormatUtils/index.js +3 -5
- package/es/DateTime/dateFormatUtils/monthChange.js +2 -1
- package/es/DateTime/dateFormatUtils/timeChange.js +4 -4
- package/es/DateTime/dateFormatUtils/yearChange.js +2 -1
- package/es/DateTime/index.js +0 -0
- package/es/DateTime/objectUtils.js +0 -0
- package/es/DateTime/props/defaultProps.js +6 -0
- package/es/DateTime/props/propTypes.js +58 -6
- package/es/DateTime/typeChecker.js +0 -0
- package/es/DateTime/validator.js +0 -0
- package/es/DropBox/DropBox.js +24 -35
- package/es/DropBox/DropBoxElement/DropBoxElement.js +3 -2
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +431 -434
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +1 -1
- package/es/DropBox/DropBoxElement/props/propTypes.js +7 -1
- package/es/DropBox/DropBoxPositionMapping.json +144 -144
- package/es/DropBox/css/DropBox.module.css +58 -58
- package/es/DropBox/props/propTypes.js +2 -1
- package/es/DropBox/utils/isMobilePopover.js +17 -0
- package/es/DropDown/DropDown.js +3 -8
- package/es/DropDown/DropDown.module.css +5 -5
- package/es/DropDown/DropDownHeading.js +0 -0
- package/es/DropDown/DropDownHeading.module.css +53 -53
- package/es/DropDown/DropDownItem.js +0 -0
- package/es/DropDown/DropDownItem.module.css +94 -94
- package/es/DropDown/DropDownSearch.js +0 -0
- package/es/DropDown/DropDownSearch.module.css +14 -14
- package/es/DropDown/DropDownSeparator.js +0 -0
- package/es/DropDown/DropDownSeparator.module.css +7 -7
- package/es/DropDown/props/propTypes.js +5 -18
- package/es/Heading/Heading.module.css +4 -4
- package/es/Label/Label.js +9 -4
- package/es/Label/Label.module.css +57 -52
- package/es/Label/LabelColors.module.css +20 -20
- package/es/Label/__tests__/Label.spec.js +99 -0
- package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +312 -0
- package/es/Label/props/propTypes.js +5 -1
- package/es/Layout/Box.js +2 -1
- package/es/Layout/Container.js +2 -1
- package/es/Layout/Layout.module.css +335 -335
- package/es/Layout/utils.js +0 -0
- package/es/ListItem/ListContainer.js +8 -6
- package/es/ListItem/ListItem.js +4 -5
- package/es/ListItem/ListItem.module.css +205 -216
- package/es/ListItem/ListItemWithAvatar.js +4 -5
- package/es/ListItem/ListItemWithCheckBox.js +4 -5
- package/es/ListItem/ListItemWithIcon.js +4 -5
- package/es/ListItem/ListItemWithRadio.js +4 -5
- package/es/ListItem/props/propTypes.js +9 -4
- package/es/Modal/Modal.js +4 -5
- package/es/Modal/props/propTypes.js +2 -1
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +12 -10
- package/es/MultiSelect/AdvancedMultiSelect.js +12 -13
- package/es/MultiSelect/MobileHeader/MobileHeader.js +50 -0
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
- package/es/MultiSelect/MobileHeader/props/defaultProps.js +7 -0
- package/es/MultiSelect/MobileHeader/props/propTypes.js +7 -0
- package/es/MultiSelect/MultiSelect.js +183 -179
- package/es/MultiSelect/MultiSelect.module.css +204 -207
- package/es/MultiSelect/MultiSelectHeader.js +1 -2
- package/es/MultiSelect/MultiSelectWithAvatar.js +75 -190
- package/es/MultiSelect/SelectedOptions.js +6 -8
- package/es/MultiSelect/SelectedOptions.module.css +15 -15
- package/es/MultiSelect/Suggestions.js +8 -9
- package/es/MultiSelect/props/defaultProps.js +6 -2
- package/es/MultiSelect/props/propTypes.js +149 -211
- package/es/PopOver/PopOver.js +1 -9
- package/es/PopOver/PopOver.module.css +9 -8
- package/es/Popup/Popup.js +3 -4
- package/es/Popup/PositionMapping.json +73 -73
- package/es/Radio/Radio.js +26 -12
- package/es/Radio/Radio.module.css +115 -112
- package/es/Radio/__tests__/Radio.spec.js +241 -0
- package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +1837 -0
- package/es/Radio/props/defaultProps.js +1 -0
- package/es/Radio/props/propTypes.js +10 -2
- package/es/Responsive/CustomResponsive.js +0 -0
- package/es/Responsive/RefWrapper.js +2 -1
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +2 -4
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -6
- package/es/ResponsiveDropBox/props/propTypes.js +2 -1
- package/es/Ribbon/Ribbon.js +0 -0
- package/es/Ribbon/Ribbon.module.css +499 -454
- package/es/Ribbon/__tests__/Ribbon.spec.js +52 -0
- package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +374 -0
- package/es/RippleEffect/RippleEffect.js +3 -2
- package/es/RippleEffect/RippleEffect.module.css +92 -92
- package/es/RippleEffect/__tests__/RippleEffect.spec.js +69 -0
- package/es/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +171 -0
- package/es/RippleEffect/props/defaultProps.js +1 -0
- package/es/RippleEffect/props/propTypes.js +1 -0
- package/es/Select/GroupSelect.js +14 -11
- package/es/Select/Select.js +20 -16
- package/es/Select/Select.module.css +134 -108
- package/es/Select/SelectWithAvatar.js +2 -1
- package/es/Select/SelectWithIcon.js +5 -2
- package/es/Select/props/defaultProps.js +1 -0
- package/es/Select/props/propTypes.js +20 -7
- package/es/Stencils/Stencils.js +0 -0
- package/es/Stencils/Stencils.module.css +96 -96
- package/es/Stencils/__tests__/Stencils.spec.js +46 -0
- package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +89 -0
- package/es/Switch/Switch.js +10 -10
- package/es/Switch/Switch.module.css +127 -127
- package/es/Switch/__tests__/Switch.spec.js +156 -0
- package/es/Switch/__tests__/__snapshots__/Switch.spec.js.snap +831 -0
- package/es/Tab/Tab.js +4 -5
- package/es/Tab/Tab.module.css +100 -100
- package/es/Tab/TabContent.module.css +4 -4
- package/es/Tab/TabContentWrapper.js +6 -2
- package/es/Tab/TabWrapper.js +2 -4
- package/es/Tab/Tabs.js +33 -33
- package/es/Tab/Tabs.module.css +136 -136
- package/es/Tab/props/defaultProps.js +2 -1
- package/es/Tab/props/propTypes.js +3 -2
- package/es/Tag/Tag.js +12 -11
- package/es/Tag/Tag.module.css +253 -254
- package/es/Tag/props/propTypes.js +2 -1
- package/es/TextBox/TextBox.js +16 -9
- package/es/TextBox/TextBox.module.css +197 -158
- package/es/TextBox/props/defaultProps.js +1 -1
- package/es/TextBox/props/propTypes.js +3 -1
- package/es/TextBoxIcon/TextBoxIcon.js +4 -4
- package/es/TextBoxIcon/TextBoxIcon.module.css +79 -79
- package/es/TextBoxIcon/props/defaultProps.js +1 -0
- package/es/TextBoxIcon/props/propTypes.js +3 -1
- package/es/Textarea/Textarea.js +4 -6
- package/es/Textarea/Textarea.module.css +140 -139
- package/es/Textarea/props/propTypes.js +0 -1
- package/es/Tooltip/Tooltip.js +4 -2
- package/es/Tooltip/Tooltip.module.css +140 -140
- package/es/Tooltip/props/propTypes.js +0 -3
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
- package/es/common/a11y.module.css +3 -3
- package/es/common/animation.module.css +624 -624
- package/es/common/avatarsizes.module.css +48 -48
- package/es/common/basic.module.css +33 -33
- package/es/common/basicReset.module.css +40 -40
- package/es/common/boxShadow.module.css +33 -33
- package/es/common/common.module.css +524 -524
- package/es/common/customscroll.module.css +142 -91
- package/es/common/reset.module.css +13 -13
- package/es/common/transition.module.css +146 -146
- package/es/deprecated/PortalLayer/PortalLayer.js +11 -8
- package/es/deprecated/PortalLayer/props/propTypes.js +10 -1
- package/es/index.js +2 -1
- package/es/semantic/Button/props/propTypes.js +1 -5
- package/es/semantic/Button/semanticButton.module.css +9 -9
- package/es/utils/Common.js +3 -0
- package/es/utils/dropDownUtils.js +0 -0
- package/es/utils/index.js +0 -2
- package/es/v1/Accordion/Accordion.js +66 -0
- package/es/v1/Accordion/AccordionItem.js +57 -0
- package/es/v1/Accordion/index.js +2 -0
- package/es/v1/Accordion/props/defaultProps.js +12 -0
- package/es/v1/Accordion/props/propTypes.js +33 -0
- package/es/v1/Animation/Animation.js +45 -0
- package/es/v1/Animation/props/defaultProps.js +7 -0
- package/es/v1/Animation/props/propTypes.js +12 -0
- package/es/v1/Animation/utils.js +83 -0
- package/es/v1/AppContainer/AppContainer.js +121 -0
- package/es/v1/AppContainer/props/defaultProps.js +10 -0
- package/es/v1/AppContainer/props/propTypes.js +17 -0
- package/es/v1/Avatar/Avatar.js +139 -0
- package/es/v1/Avatar/props/defaultProps.js +17 -0
- package/es/v1/Avatar/props/propTypes.js +26 -0
- package/es/v1/AvatarTeam/AvatarTeam.js +70 -0
- package/es/v1/AvatarTeam/props/defaultProps.js +17 -0
- package/es/v1/AvatarTeam/props/propTypes.js +27 -0
- package/es/v1/Button/Button.js +67 -0
- package/es/v1/Button/props/defaultProps.js +18 -0
- package/es/v1/Button/props/propTypes.js +27 -0
- package/es/v1/Buttongroup/Buttongroup.js +31 -0
- package/es/v1/Buttongroup/props/defaultProps.js +6 -0
- package/es/v1/Buttongroup/props/propTypes.js +9 -0
- package/es/v1/Card/Card.js +237 -0
- package/es/v1/Card/index.js +4 -0
- package/es/v1/Card/props/defaultProps.js +25 -0
- package/es/v1/Card/props/propTypes.js +48 -0
- package/es/v1/CheckBox/CheckBox.js +161 -0
- package/es/v1/CheckBox/props/defaultProps.js +18 -0
- package/es/v1/CheckBox/props/propTypes.js +41 -0
- package/es/v1/DateTime/CalendarView.js +251 -0
- package/es/v1/DateTime/DateTime.js +760 -0
- package/es/v1/DateTime/DateTimePopupFooter.js +47 -0
- package/es/v1/DateTime/DateTimePopupHeader.js +105 -0
- package/es/v1/DateTime/DateWidget.js +1107 -0
- package/es/v1/DateTime/DaysRow.js +31 -0
- package/es/v1/DateTime/Time.js +166 -0
- package/es/v1/DateTime/YearView.js +264 -0
- package/es/v1/DateTime/index.js +1 -0
- package/es/v1/DateTime/props/defaultProps.js +57 -0
- package/es/v1/DateTime/props/propTypes.js +195 -0
- package/es/v1/DropBox/DropBox.js +79 -0
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +133 -0
- package/es/v1/DropBox/DropBoxElement/props/defaultProps.js +18 -0
- package/es/v1/DropBox/DropBoxElement/props/propTypes.js +51 -0
- package/es/v1/DropBox/props/defaultProps.js +14 -0
- package/es/v1/DropBox/props/propTypes.js +16 -0
- package/es/v1/DropBox/utils/isMobilePopover.js +17 -0
- package/es/v1/DropDown/DropDown.js +53 -0
- package/es/v1/DropDown/DropDownHeading.js +36 -0
- package/es/v1/DropDown/DropDownItem.js +56 -0
- package/es/v1/DropDown/DropDownSearch.js +55 -0
- package/es/v1/DropDown/DropDownSeparator.js +12 -0
- package/es/v1/DropDown/props/defaultProps.js +20 -0
- package/es/v1/DropDown/props/propTypes.js +65 -0
- package/es/v1/Heading/Heading.js +32 -0
- package/es/v1/Heading/props/defaultProps.js +5 -0
- package/es/v1/Heading/props/propTypes.js +11 -0
- package/es/v1/Label/Label.js +40 -0
- package/es/v1/Label/props/defaultProps.js +11 -0
- package/es/v1/Label/props/propTypes.js +19 -0
- package/es/v1/Layout/Box.js +115 -0
- package/es/v1/Layout/Container.js +132 -0
- package/es/v1/Layout/index.js +2 -0
- package/es/v1/Layout/props/defaultProps.js +16 -0
- package/es/v1/Layout/props/propTypes.js +46 -0
- package/es/v1/ListItem/ListContainer.js +104 -0
- package/es/v1/ListItem/ListItem.js +123 -0
- package/es/v1/ListItem/ListItemWithAvatar.js +143 -0
- package/es/v1/ListItem/ListItemWithCheckBox.js +103 -0
- package/es/v1/ListItem/ListItemWithIcon.js +126 -0
- package/es/v1/ListItem/ListItemWithRadio.js +104 -0
- package/es/v1/ListItem/index.js +6 -0
- package/es/v1/ListItem/props/defaultProps.js +97 -0
- package/es/v1/ListItem/props/propTypes.js +202 -0
- package/es/v1/Modal/Modal.js +125 -0
- package/es/v1/Modal/props/defaultProps.js +3 -0
- package/es/v1/Modal/props/propTypes.js +7 -0
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +1079 -0
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +567 -0
- package/es/v1/MultiSelect/EmptyState.js +64 -0
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +50 -0
- package/es/v1/MultiSelect/MobileHeader/props/defaultProps.js +7 -0
- package/es/v1/MultiSelect/MobileHeader/props/propTypes.js +7 -0
- package/es/v1/MultiSelect/MultiSelect.js +1103 -0
- package/es/v1/MultiSelect/MultiSelectHeader.js +32 -0
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +199 -0
- package/es/v1/MultiSelect/SelectedOptions.js +80 -0
- package/es/v1/MultiSelect/Suggestions.js +141 -0
- package/es/v1/MultiSelect/index.js +4 -0
- package/es/v1/MultiSelect/props/defaultProps.js +155 -0
- package/es/v1/MultiSelect/props/propTypes.js +312 -0
- package/es/v1/PopOver/PopOver.js +176 -0
- package/es/v1/PopOver/props/defaultProps.js +7 -0
- package/es/v1/PopOver/props/propTypes.js +53 -0
- package/es/v1/Popup/Popup.js +644 -0
- package/es/v1/Radio/Radio.js +130 -0
- package/es/v1/Radio/props/defaultProps.js +15 -0
- package/es/v1/Radio/props/propTypes.js +40 -0
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +56 -0
- package/es/v1/ResponsiveDropBox/props/defaultProps.js +4 -0
- package/es/v1/ResponsiveDropBox/props/propTypes.js +8 -0
- package/es/v1/Ribbon/Ribbon.js +33 -0
- package/es/v1/Ribbon/props/defaultProps.js +9 -0
- package/es/v1/Ribbon/props/propTypes.js +11 -0
- package/es/v1/RippleEffect/RippleEffect.js +25 -0
- package/es/v1/RippleEffect/props/defaultProps.js +10 -0
- package/es/v1/RippleEffect/props/propTypes.js +12 -0
- package/es/v1/Select/GroupSelect.js +805 -0
- package/es/v1/Select/Select.js +973 -0
- package/es/v1/Select/SelectWithAvatar.js +344 -0
- package/es/v1/Select/SelectWithIcon.js +535 -0
- package/es/v1/Select/index.js +4 -0
- package/es/v1/Select/props/defaultProps.js +120 -0
- package/es/v1/Select/props/propTypes.js +288 -0
- package/es/v1/Stencils/Stencils.js +26 -0
- package/es/v1/Stencils/props/defaultProps.js +6 -0
- package/es/v1/Stencils/props/propTypes.js +7 -0
- package/es/v1/Switch/Switch.js +94 -0
- package/es/v1/Switch/props/defaultProps.js +11 -0
- package/es/v1/Switch/props/propTypes.js +28 -0
- package/es/v1/Tab/Tab.js +106 -0
- package/es/v1/Tab/TabContent.js +30 -0
- package/es/v1/Tab/TabContentWrapper.js +33 -0
- package/es/v1/Tab/TabWrapper.js +55 -0
- package/es/v1/Tab/Tabs.js +523 -0
- package/es/v1/Tab/index.js +5 -0
- package/es/v1/Tab/props/defaultProps.js +45 -0
- package/es/v1/Tab/props/propTypes.js +108 -0
- package/es/v1/Tab/v1Tab.module.css +100 -0
- package/es/v1/Tab/v1TabContent.module.css +4 -0
- package/es/v1/Tab/v1Tabs.module.css +137 -0
- package/es/v1/Tag/Tag.js +138 -0
- package/es/v1/Tag/props/defaultProps.js +14 -0
- package/es/v1/Tag/props/propTypes.js +35 -0
- package/es/v1/TextBox/TextBox.js +160 -0
- package/es/v1/TextBox/props/defaultProps.js +20 -0
- package/es/v1/TextBox/props/propTypes.js +56 -0
- package/es/v1/TextBoxIcon/TextBoxIcon.js +158 -0
- package/es/v1/TextBoxIcon/props/defaultProps.js +23 -0
- package/es/v1/TextBoxIcon/props/propTypes.js +52 -0
- package/es/v1/Textarea/Textarea.js +100 -0
- package/es/v1/Textarea/props/defaultProps.js +17 -0
- package/es/v1/Textarea/props/propTypes.js +31 -0
- package/es/v1/Tooltip/Tooltip.js +520 -0
- package/es/v1/Tooltip/props/defaultProps.js +4 -0
- package/es/v1/Tooltip/props/propTypes.js +5 -0
- package/es/v1/Typography/Typography.js +38 -0
- package/es/v1/Typography/css/Typography.module.css +380 -0
- package/es/v1/Typography/css/cssJSLogic.js +56 -0
- package/es/v1/Typography/props/defaultProps.js +8 -0
- package/es/v1/Typography/props/propTypes.js +27 -0
- package/es/v1/Typography/utils/index.js +50 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +69 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +7 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +12 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +99 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +15 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +19 -0
- package/es/v1/semantic/Button/Button.js +53 -0
- package/es/v1/semantic/Button/props/defaultProps.js +12 -0
- package/es/v1/semantic/Button/props/propTypes.js +22 -0
- package/es/v1/semantic/index.js +1 -0
- package/install.md +10 -10
- package/lib/Animation/Animation.js +4 -86
- package/lib/Animation/utils.js +94 -0
- package/lib/AppContainer/AppContainer.js +5 -0
- package/lib/AppContainer/AppContainer.module.css +18 -18
- package/lib/Avatar/Avatar.js +11 -10
- package/lib/Avatar/Avatar.module.css +175 -175
- package/lib/Avatar/__tests__/Avatar.spec.js +188 -0
- package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +591 -0
- package/lib/AvatarTeam/AvatarTeam.js +7 -7
- package/lib/AvatarTeam/AvatarTeam.module.css +189 -189
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +145 -0
- package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +705 -0
- package/lib/Button/Button.js +11 -7
- package/lib/Button/__tests__/Button.spec.js +129 -62
- package/lib/Button/css/Button.module.css +528 -526
- package/lib/Button/css/cssJSLogic.js +1 -1
- package/lib/Button/props/defaultProps.js +2 -1
- package/lib/Button/props/propTypes.js +3 -2
- package/lib/Buttongroup/Buttongroup.js +1 -1
- package/lib/Buttongroup/Buttongroup.module.css +104 -105
- package/lib/Buttongroup/__tests__/Buttongroup.spec.js +44 -0
- package/lib/Buttongroup/__tests__/__snapshots__/Buttongroup.spec.js.snap +191 -0
- package/lib/Card/Card.js +4 -4
- package/lib/Card/Card.module.css +20 -20
- package/lib/Card/props/propTypes.js +9 -4
- package/lib/CheckBox/CheckBox.js +34 -24
- package/lib/CheckBox/CheckBox.module.css +157 -157
- package/lib/CheckBox/props/propTypes.js +1 -2
- package/lib/DateTime/CalendarView.js +0 -0
- package/lib/DateTime/DateTime.js +3 -30
- package/lib/DateTime/DateTime.module.css +248 -235
- package/lib/DateTime/DateTimePopupFooter.js +7 -1
- package/lib/DateTime/DateTimePopupHeader.js +4 -1
- package/lib/DateTime/DateWidget.js +24 -19
- package/lib/DateTime/DateWidget.module.css +38 -38
- package/lib/DateTime/DaysRow.js +4 -1
- package/lib/DateTime/Time.js +6 -0
- package/lib/DateTime/YearView.js +0 -1
- package/lib/DateTime/YearView.module.css +98 -98
- package/lib/DateTime/common.js +0 -0
- package/lib/DateTime/dateFormatUtils/dateFormat.js +16 -2
- package/lib/DateTime/dateFormatUtils/dayChange.js +3 -1
- package/lib/DateTime/dateFormatUtils/index.js +3 -7
- package/lib/DateTime/dateFormatUtils/monthChange.js +3 -1
- package/lib/DateTime/dateFormatUtils/timeChange.js +3 -3
- package/lib/DateTime/dateFormatUtils/yearChange.js +3 -1
- package/lib/DateTime/index.js +0 -0
- package/lib/DateTime/objectUtils.js +0 -0
- package/lib/DateTime/props/defaultProps.js +10 -2
- package/lib/DateTime/props/propTypes.js +64 -8
- package/lib/DateTime/typeChecker.js +0 -0
- package/lib/DateTime/validator.js +0 -0
- package/lib/DropBox/DropBox.js +18 -28
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +3 -2
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +431 -434
- package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +1 -1
- package/lib/DropBox/DropBoxElement/props/propTypes.js +7 -1
- package/lib/DropBox/DropBoxPositionMapping.json +144 -144
- package/lib/DropBox/css/DropBox.module.css +58 -58
- package/lib/DropBox/props/propTypes.js +2 -1
- package/lib/DropBox/utils/isMobilePopover.js +25 -0
- package/lib/DropDown/DropDown.js +1 -6
- package/lib/DropDown/DropDown.module.css +5 -5
- package/lib/DropDown/DropDownHeading.js +0 -0
- package/lib/DropDown/DropDownHeading.module.css +53 -53
- package/lib/DropDown/DropDownItem.js +0 -0
- package/lib/DropDown/DropDownItem.module.css +94 -94
- package/lib/DropDown/DropDownSearch.js +0 -0
- package/lib/DropDown/DropDownSearch.module.css +14 -14
- package/lib/DropDown/DropDownSeparator.js +0 -0
- package/lib/DropDown/DropDownSeparator.module.css +7 -7
- package/lib/DropDown/props/propTypes.js +11 -19
- package/lib/Heading/Heading.module.css +4 -4
- package/lib/Label/Label.js +6 -2
- package/lib/Label/Label.module.css +57 -52
- package/lib/Label/LabelColors.module.css +20 -20
- package/lib/Label/__tests__/Label.spec.js +106 -0
- package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +312 -0
- package/lib/Label/props/propTypes.js +5 -1
- package/lib/Layout/Box.js +0 -1
- package/lib/Layout/Container.js +0 -1
- package/lib/Layout/Layout.module.css +335 -335
- package/lib/Layout/utils.js +0 -0
- package/lib/ListItem/ListContainer.js +10 -2
- package/lib/ListItem/ListItem.js +0 -0
- package/lib/ListItem/ListItem.module.css +205 -216
- package/lib/ListItem/props/propTypes.js +9 -4
- package/lib/Modal/props/propTypes.js +2 -1
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +12 -11
- package/lib/MultiSelect/AdvancedMultiSelect.js +4 -4
- package/lib/MultiSelect/MobileHeader/MobileHeader.js +62 -0
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
- package/lib/MultiSelect/MobileHeader/props/defaultProps.js +14 -0
- package/lib/MultiSelect/MobileHeader/props/propTypes.js +18 -0
- package/lib/MultiSelect/MultiSelect.js +183 -180
- package/lib/MultiSelect/MultiSelect.module.css +204 -207
- package/lib/MultiSelect/MultiSelectHeader.js +1 -2
- package/lib/MultiSelect/MultiSelectWithAvatar.js +76 -188
- package/lib/MultiSelect/SelectedOptions.module.css +15 -15
- package/lib/MultiSelect/Suggestions.js +2 -1
- package/lib/MultiSelect/props/defaultProps.js +6 -2
- package/lib/MultiSelect/props/propTypes.js +163 -215
- package/lib/PopOver/PopOver.js +1 -8
- package/lib/PopOver/PopOver.module.css +9 -8
- package/lib/Popup/Popup.js +0 -0
- package/lib/Popup/PositionMapping.json +73 -73
- package/lib/Radio/Radio.js +46 -32
- package/lib/Radio/Radio.module.css +115 -112
- package/lib/Radio/__tests__/Radio.spec.js +250 -0
- package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +1837 -0
- package/lib/Radio/props/defaultProps.js +1 -0
- package/lib/Radio/props/propTypes.js +10 -2
- package/lib/Responsive/CustomResponsive.js +0 -0
- package/lib/Responsive/RefWrapper.js +2 -1
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -6
- package/lib/ResponsiveDropBox/props/propTypes.js +11 -2
- package/lib/Ribbon/Ribbon.js +0 -0
- package/lib/Ribbon/Ribbon.module.css +499 -454
- package/lib/Ribbon/__tests__/Ribbon.spec.js +59 -0
- package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +374 -0
- package/lib/RippleEffect/RippleEffect.js +5 -4
- package/lib/RippleEffect/RippleEffect.module.css +92 -92
- package/lib/RippleEffect/__tests__/RippleEffect.spec.js +76 -0
- package/lib/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +171 -0
- package/lib/RippleEffect/props/defaultProps.js +1 -0
- package/lib/RippleEffect/props/propTypes.js +1 -0
- package/lib/Select/GroupSelect.js +13 -8
- package/lib/Select/Select.js +19 -9
- package/lib/Select/Select.module.css +134 -108
- package/lib/Select/SelectWithAvatar.js +2 -1
- package/lib/Select/SelectWithIcon.js +5 -3
- package/lib/Select/props/defaultProps.js +1 -0
- package/lib/Select/props/propTypes.js +29 -8
- package/lib/Stencils/Stencils.js +0 -0
- package/lib/Stencils/Stencils.module.css +96 -96
- package/lib/Stencils/__tests__/Stencils.spec.js +53 -0
- package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +89 -0
- package/lib/Switch/Switch.js +2 -2
- package/lib/Switch/Switch.module.css +127 -127
- package/lib/Switch/__tests__/Switch.spec.js +163 -0
- package/lib/Switch/__tests__/__snapshots__/Switch.spec.js.snap +831 -0
- package/lib/Tab/Tab.module.css +100 -100
- package/lib/Tab/TabContent.module.css +4 -4
- package/lib/Tab/TabContentWrapper.js +9 -4
- package/lib/Tab/Tabs.js +11 -11
- package/lib/Tab/Tabs.module.css +136 -136
- package/lib/Tab/props/defaultProps.js +2 -1
- package/lib/Tab/props/propTypes.js +3 -2
- package/lib/Tag/Tag.js +12 -11
- package/lib/Tag/Tag.module.css +253 -254
- package/lib/Tag/props/propTypes.js +2 -1
- package/lib/TextBox/TextBox.js +19 -11
- package/lib/TextBox/TextBox.module.css +197 -158
- package/lib/TextBox/props/defaultProps.js +1 -1
- package/lib/TextBox/props/propTypes.js +1 -1
- package/lib/TextBoxIcon/TextBoxIcon.js +2 -0
- package/lib/TextBoxIcon/TextBoxIcon.module.css +79 -79
- package/lib/TextBoxIcon/props/defaultProps.js +1 -0
- package/lib/TextBoxIcon/props/propTypes.js +12 -2
- package/lib/Textarea/Textarea.js +0 -0
- package/lib/Textarea/Textarea.module.css +140 -139
- package/lib/Textarea/props/propTypes.js +0 -1
- package/lib/Tooltip/Tooltip.js +4 -2
- package/lib/Tooltip/Tooltip.module.css +140 -140
- package/lib/Tooltip/props/propTypes.js +0 -3
- package/lib/common/a11y.module.css +3 -3
- package/lib/common/animation.module.css +624 -624
- package/lib/common/avatarsizes.module.css +48 -48
- package/lib/common/basic.module.css +33 -33
- package/lib/common/basicReset.module.css +40 -40
- package/lib/common/boxShadow.module.css +33 -33
- package/lib/common/common.module.css +524 -524
- package/lib/common/customscroll.module.css +142 -91
- package/lib/common/reset.module.css +13 -13
- package/lib/common/transition.module.css +146 -146
- package/lib/deprecated/PortalLayer/PortalLayer.js +2 -1
- package/lib/deprecated/PortalLayer/props/propTypes.js +13 -3
- package/lib/index.js +10 -1
- package/lib/semantic/Button/props/propTypes.js +1 -5
- package/lib/semantic/Button/semanticButton.module.css +9 -9
- package/lib/utils/Common.js +5 -0
- package/lib/utils/dropDownUtils.js +0 -0
- package/lib/utils/index.js +1 -19
- package/lib/v1/Accordion/Accordion.js +98 -0
- package/lib/v1/Accordion/AccordionItem.js +68 -0
- package/lib/v1/Accordion/index.js +23 -0
- package/lib/v1/Accordion/props/defaultProps.js +20 -0
- package/lib/v1/Accordion/props/propTypes.js +45 -0
- package/lib/v1/Animation/Animation.js +61 -0
- package/lib/v1/Animation/props/defaultProps.js +14 -0
- package/lib/v1/Animation/props/propTypes.js +23 -0
- package/lib/v1/Animation/utils.js +94 -0
- package/lib/v1/AppContainer/AppContainer.js +158 -0
- package/lib/v1/AppContainer/props/defaultProps.js +17 -0
- package/lib/v1/AppContainer/props/propTypes.js +28 -0
- package/lib/v1/Avatar/Avatar.js +191 -0
- package/lib/v1/Avatar/props/defaultProps.js +24 -0
- package/lib/v1/Avatar/props/propTypes.js +37 -0
- package/lib/v1/AvatarTeam/AvatarTeam.js +81 -0
- package/lib/v1/AvatarTeam/props/defaultProps.js +24 -0
- package/lib/v1/AvatarTeam/props/propTypes.js +38 -0
- package/lib/v1/Button/Button.js +82 -0
- package/lib/v1/Button/props/defaultProps.js +27 -0
- package/lib/v1/Button/props/propTypes.js +39 -0
- package/lib/v1/Buttongroup/Buttongroup.js +44 -0
- package/lib/v1/Buttongroup/props/defaultProps.js +13 -0
- package/lib/v1/Buttongroup/props/propTypes.js +20 -0
- package/lib/v1/Card/Card.js +269 -0
- package/lib/v1/Card/index.js +37 -0
- package/lib/v1/Card/props/defaultProps.js +35 -0
- package/lib/v1/Card/props/propTypes.js +62 -0
- package/lib/v1/CheckBox/CheckBox.js +172 -0
- package/lib/v1/CheckBox/props/defaultProps.js +25 -0
- package/lib/v1/CheckBox/props/propTypes.js +52 -0
- package/lib/v1/DateTime/CalendarView.js +319 -0
- package/lib/v1/DateTime/DateTime.js +849 -0
- package/lib/v1/DateTime/DateTimePopupFooter.js +96 -0
- package/lib/v1/DateTime/DateTimePopupHeader.js +166 -0
- package/lib/v1/DateTime/DateWidget.js +1134 -0
- package/lib/v1/DateTime/DaysRow.js +80 -0
- package/lib/v1/DateTime/Time.js +254 -0
- package/lib/v1/DateTime/YearView.js +325 -0
- package/lib/v1/DateTime/index.js +15 -0
- package/lib/v1/DateTime/props/defaultProps.js +70 -0
- package/lib/v1/DateTime/props/propTypes.js +227 -0
- package/lib/v1/DropBox/DropBox.js +109 -0
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +146 -0
- package/lib/v1/DropBox/DropBoxElement/props/defaultProps.js +25 -0
- package/lib/v1/DropBox/DropBoxElement/props/propTypes.js +62 -0
- package/lib/v1/DropBox/props/defaultProps.js +30 -0
- package/lib/v1/DropBox/props/propTypes.js +35 -0
- package/lib/v1/DropBox/utils/isMobilePopover.js +25 -0
- package/lib/v1/DropDown/DropDown.js +74 -0
- package/lib/v1/DropDown/DropDownHeading.js +47 -0
- package/lib/v1/DropDown/DropDownItem.js +75 -0
- package/lib/v1/DropDown/DropDownSearch.js +74 -0
- package/lib/v1/DropDown/DropDownSeparator.js +24 -0
- package/lib/v1/DropDown/props/defaultProps.js +30 -0
- package/lib/v1/DropDown/props/propTypes.js +87 -0
- package/lib/v1/Heading/Heading.js +49 -0
- package/lib/v1/Heading/props/defaultProps.js +12 -0
- package/lib/v1/Heading/props/propTypes.js +22 -0
- package/lib/v1/Label/Label.js +51 -0
- package/lib/v1/Label/props/defaultProps.js +18 -0
- package/lib/v1/Label/props/propTypes.js +30 -0
- package/lib/v1/Layout/Box.js +128 -0
- package/lib/v1/Layout/Container.js +145 -0
- package/lib/v1/Layout/index.js +23 -0
- package/lib/v1/Layout/props/defaultProps.js +24 -0
- package/lib/v1/Layout/props/propTypes.js +58 -0
- package/lib/v1/ListItem/ListContainer.js +128 -0
- package/lib/v1/ListItem/ListItem.js +138 -0
- package/lib/v1/ListItem/ListItemWithAvatar.js +167 -0
- package/lib/v1/ListItem/ListItemWithCheckBox.js +125 -0
- package/lib/v1/ListItem/ListItemWithIcon.js +143 -0
- package/lib/v1/ListItem/ListItemWithRadio.js +126 -0
- package/lib/v1/ListItem/index.js +55 -0
- package/lib/v1/ListItem/props/defaultProps.js +109 -0
- package/lib/v1/ListItem/props/propTypes.js +196 -0
- package/lib/v1/Modal/Modal.js +166 -0
- package/lib/v1/Modal/props/defaultProps.js +10 -0
- package/lib/v1/Modal/props/propTypes.js +18 -0
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +1167 -0
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +634 -0
- package/lib/v1/MultiSelect/EmptyState.js +112 -0
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +62 -0
- package/lib/v1/MultiSelect/MobileHeader/props/defaultProps.js +14 -0
- package/lib/v1/MultiSelect/MobileHeader/props/propTypes.js +18 -0
- package/lib/v1/MultiSelect/MultiSelect.js +1186 -0
- package/lib/v1/MultiSelect/MultiSelectHeader.js +78 -0
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +253 -0
- package/lib/v1/MultiSelect/SelectedOptions.js +126 -0
- package/lib/v1/MultiSelect/Suggestions.js +196 -0
- package/lib/v1/MultiSelect/index.js +39 -0
- package/lib/v1/MultiSelect/props/defaultProps.js +171 -0
- package/lib/v1/MultiSelect/props/propTypes.js +340 -0
- package/lib/v1/PopOver/PopOver.js +197 -0
- package/lib/v1/PopOver/props/defaultProps.js +15 -0
- package/lib/v1/PopOver/props/propTypes.js +66 -0
- package/lib/v1/Popup/Popup.js +715 -0
- package/lib/v1/Radio/Radio.js +141 -0
- package/lib/v1/Radio/props/defaultProps.js +22 -0
- package/lib/v1/Radio/props/propTypes.js +51 -0
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +79 -0
- package/lib/v1/ResponsiveDropBox/props/defaultProps.js +11 -0
- package/lib/v1/ResponsiveDropBox/props/propTypes.js +27 -0
- package/lib/v1/Ribbon/Ribbon.js +44 -0
- package/lib/v1/Ribbon/props/defaultProps.js +16 -0
- package/lib/v1/Ribbon/props/propTypes.js +22 -0
- package/lib/v1/RippleEffect/RippleEffect.js +40 -0
- package/lib/v1/RippleEffect/props/defaultProps.js +17 -0
- package/lib/v1/RippleEffect/props/propTypes.js +23 -0
- package/lib/v1/Select/GroupSelect.js +881 -0
- package/lib/v1/Select/Select.js +1023 -0
- package/lib/v1/Select/SelectWithAvatar.js +394 -0
- package/lib/v1/Select/SelectWithIcon.js +597 -0
- package/lib/v1/Select/index.js +39 -0
- package/lib/v1/Select/props/defaultProps.js +121 -0
- package/lib/v1/Select/props/propTypes.js +310 -0
- package/lib/v1/Stencils/Stencils.js +43 -0
- package/lib/v1/Stencils/props/defaultProps.js +13 -0
- package/lib/v1/Stencils/props/propTypes.js +18 -0
- package/lib/v1/Switch/Switch.js +108 -0
- package/lib/v1/Switch/props/defaultProps.js +18 -0
- package/lib/v1/Switch/props/propTypes.js +39 -0
- package/lib/v1/Tab/Tab.js +132 -0
- package/lib/v1/Tab/TabContent.js +42 -0
- package/lib/v1/Tab/TabContentWrapper.js +47 -0
- package/lib/v1/Tab/TabWrapper.js +89 -0
- package/lib/v1/Tab/Tabs.js +591 -0
- package/lib/v1/Tab/index.js +47 -0
- package/lib/v1/Tab/props/defaultProps.js +56 -0
- package/lib/v1/Tab/props/propTypes.js +123 -0
- package/lib/v1/Tab/v1Tab.module.css +100 -0
- package/lib/v1/Tab/v1TabContent.module.css +4 -0
- package/lib/v1/Tab/v1Tabs.module.css +137 -0
- package/lib/v1/Tag/Tag.js +157 -0
- package/lib/v1/Tag/props/defaultProps.js +21 -0
- package/lib/v1/Tag/props/propTypes.js +46 -0
- package/lib/v1/TextBox/TextBox.js +175 -0
- package/lib/v1/TextBox/props/defaultProps.js +27 -0
- package/lib/v1/TextBox/props/propTypes.js +62 -0
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +198 -0
- package/lib/v1/TextBoxIcon/props/defaultProps.js +30 -0
- package/lib/v1/TextBoxIcon/props/propTypes.js +71 -0
- package/lib/v1/Textarea/Textarea.js +118 -0
- package/lib/v1/Textarea/props/defaultProps.js +24 -0
- package/lib/v1/Textarea/props/propTypes.js +42 -0
- package/lib/v1/Tooltip/Tooltip.js +588 -0
- package/lib/v1/Tooltip/props/defaultProps.js +11 -0
- package/lib/v1/Tooltip/props/propTypes.js +16 -0
- package/lib/v1/Typography/Typography.js +56 -0
- package/lib/v1/Typography/css/Typography.module.css +380 -0
- package/lib/v1/Typography/css/cssJSLogic.js +48 -0
- package/lib/v1/Typography/props/defaultProps.js +15 -0
- package/lib/v1/Typography/props/propTypes.js +38 -0
- package/lib/v1/Typography/utils/index.js +59 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +90 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +14 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +23 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +126 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +22 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +30 -0
- package/lib/v1/semantic/Button/Button.js +63 -0
- package/lib/v1/semantic/Button/props/defaultProps.js +19 -0
- package/lib/v1/semantic/Button/props/propTypes.js +33 -0
- package/lib/v1/semantic/index.js +15 -0
- package/package.json +98 -122
- package/postPublish.js +8 -8
- package/prePublish.js +70 -70
- package/propValidationArg.json +12 -0
- package/react-cli.config.js +24 -0
- package/result.json +1 -1
- package/es/deprecated/AdvancedMultiSelect.module.css +0 -127
- package/es/deprecated/advancedMultiSelectVariableJson.js +0 -80
- package/es/utils/css/compileClassNames.js +0 -28
- package/es/utils/css/mergeStyle.js +0 -57
- package/es/utils/css/utils.js +0 -24
- package/lib/deprecated/AdvancedMultiSelect.module.css +0 -127
- package/lib/deprecated/advancedMultiSelectVariableJson.js +0 -82
- package/lib/utils/css/compileClassNames.js +0 -37
- package/lib/utils/css/mergeStyle.js +0 -69
- package/lib/utils/css/utils.js +0 -41
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _defaultProps = require("./props/defaultProps");
|
|
13
|
+
|
|
14
|
+
var _propTypes = require("./props/propTypes");
|
|
15
|
+
|
|
16
|
+
var _Config = require("../../Provider/Config");
|
|
17
|
+
|
|
18
|
+
var _TooltipModule = _interopRequireDefault(require("../../Tooltip/Tooltip.module.css"));
|
|
19
|
+
|
|
20
|
+
var _ResizeObserver = _interopRequireDefault(require("../../Responsive/ResizeObserver"));
|
|
21
|
+
|
|
22
|
+
var _selectn = _interopRequireDefault(require("selectn"));
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
+
|
|
28
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
29
|
+
|
|
30
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
31
|
+
|
|
32
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
33
|
+
|
|
34
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
|
+
|
|
36
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
37
|
+
|
|
38
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
39
|
+
|
|
40
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
41
|
+
|
|
42
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
|
+
|
|
44
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
45
|
+
|
|
46
|
+
var Tooltip = /*#__PURE__*/function (_React$Component) {
|
|
47
|
+
_inherits(Tooltip, _React$Component);
|
|
48
|
+
|
|
49
|
+
var _super = _createSuper(Tooltip);
|
|
50
|
+
|
|
51
|
+
function Tooltip(props) {
|
|
52
|
+
var _this;
|
|
53
|
+
|
|
54
|
+
_classCallCheck(this, Tooltip);
|
|
55
|
+
|
|
56
|
+
_this = _super.call(this, props);
|
|
57
|
+
_this.state = {
|
|
58
|
+
title: null,
|
|
59
|
+
left: 0,
|
|
60
|
+
top: 0,
|
|
61
|
+
arrowLeft: 0,
|
|
62
|
+
isArrowRight: null,
|
|
63
|
+
isHtml: false
|
|
64
|
+
};
|
|
65
|
+
_this.handleOver = _this.handleOver.bind(_assertThisInitialized(_this));
|
|
66
|
+
_this.getToolTipDOM = _this.getToolTipDOM.bind(_assertThisInitialized(_this));
|
|
67
|
+
_this.reset = _this.reset.bind(_assertThisInitialized(_this));
|
|
68
|
+
_this.getDirection = document.getElementsByTagName('html')[0];
|
|
69
|
+
_this.leftRightScreenEdge = _this.leftRightScreenEdge.bind(_assertThisInitialized(_this));
|
|
70
|
+
_this.topBottomScreenEdge = _this.topBottomScreenEdge.bind(_assertThisInitialized(_this));
|
|
71
|
+
_this.observer = new _ResizeObserver["default"](_this.onResize);
|
|
72
|
+
_this.isResized = true;
|
|
73
|
+
_this.tooltipContainerClientRect = {};
|
|
74
|
+
_this.tooltipContainerEl = {};
|
|
75
|
+
return _this;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
_createClass(Tooltip, [{
|
|
79
|
+
key: "onResize",
|
|
80
|
+
value: function onResize(sizeOfObservedEl, observedEl) {
|
|
81
|
+
this.isResized = true;
|
|
82
|
+
}
|
|
83
|
+
}, {
|
|
84
|
+
key: "observeElement",
|
|
85
|
+
value: function observeElement() {
|
|
86
|
+
this.tooltipContainerEl = this.getToolTipContainerEl();
|
|
87
|
+
this.observer.observe(this.tooltipContainerEl);
|
|
88
|
+
}
|
|
89
|
+
}, {
|
|
90
|
+
key: "unObserveElement",
|
|
91
|
+
value: function unObserveElement() {
|
|
92
|
+
this.observer.disconnect();
|
|
93
|
+
}
|
|
94
|
+
}, {
|
|
95
|
+
key: "getClientRectOfContEl",
|
|
96
|
+
value: function getClientRectOfContEl(el) {
|
|
97
|
+
if (this.isResized) {
|
|
98
|
+
return this.setClientRectOfContEl(el);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return this.tooltipContainerClientRect;
|
|
102
|
+
}
|
|
103
|
+
}, {
|
|
104
|
+
key: "setClientRectOfContEl",
|
|
105
|
+
value: function setClientRectOfContEl(containerEl) {
|
|
106
|
+
this.isResized = false;
|
|
107
|
+
this.tooltipContainerClientRect = containerEl.getBoundingClientRect();
|
|
108
|
+
return this.tooltipContainerClientRect;
|
|
109
|
+
}
|
|
110
|
+
}, {
|
|
111
|
+
key: "getToolTipContainerEl",
|
|
112
|
+
value: function getToolTipContainerEl() {
|
|
113
|
+
var getTooltipContainer = (0, _Config.getLibraryConfig)('getTooltipContainer');
|
|
114
|
+
var tooltipContainer = typeof getTooltipContainer === 'function' ? getTooltipContainer() : null;
|
|
115
|
+
return tooltipContainer ? tooltipContainer : document.body;
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "getToolTipDOM",
|
|
119
|
+
value: function getToolTipDOM(el) {
|
|
120
|
+
this.toolTip = el;
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
key: "reset",
|
|
124
|
+
value: function reset() {
|
|
125
|
+
var title = this.state.title;
|
|
126
|
+
|
|
127
|
+
if (title !== null) {
|
|
128
|
+
this.setState({
|
|
129
|
+
title: null,
|
|
130
|
+
top: 0,
|
|
131
|
+
left: 0
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/* left and right screen edge check for top and bottom tooltip position */
|
|
136
|
+
|
|
137
|
+
}, {
|
|
138
|
+
key: "leftRightScreenEdge",
|
|
139
|
+
value: function leftRightScreenEdge(tLeft, toolTipArrowLeft, thisLeft, thisWidth, tooltipoffsetWidth, bodyWidth, rightEdge, bodyLeft) {
|
|
140
|
+
if (tLeft - bodyLeft <= 1) {
|
|
141
|
+
// top & bottom position left side screen edge case
|
|
142
|
+
tLeft = bodyLeft + 2;
|
|
143
|
+
toolTipArrowLeft = parseInt(thisLeft - bodyLeft + thisWidth / 2 - 6);
|
|
144
|
+
} else if (tLeft - bodyLeft + tooltipoffsetWidth > bodyWidth) {
|
|
145
|
+
// top & bottom position right side screen edge case
|
|
146
|
+
rightEdge = tLeft + tooltipoffsetWidth - bodyWidth + 2;
|
|
147
|
+
tLeft = tLeft + bodyLeft - rightEdge;
|
|
148
|
+
toolTipArrowLeft = toolTipArrowLeft - bodyLeft + rightEdge;
|
|
149
|
+
} else if (tLeft + tooltipoffsetWidth + tooltipoffsetWidth >= bodyWidth - 2) {
|
|
150
|
+
// top & bottom center screen tooltip collide with right edge screen
|
|
151
|
+
tLeft = parseInt(thisLeft - (tooltipoffsetWidth - thisWidth) / 2);
|
|
152
|
+
toolTipArrowLeft = parseInt(tooltipoffsetWidth / 2 - 4);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return {
|
|
156
|
+
tLeft: tLeft,
|
|
157
|
+
toolTipArrowLeft: toolTipArrowLeft,
|
|
158
|
+
thisLeft: thisLeft,
|
|
159
|
+
thisWidth: thisWidth,
|
|
160
|
+
tooltipoffsetWidth: tooltipoffsetWidth,
|
|
161
|
+
bodyWidth: bodyWidth,
|
|
162
|
+
rightEdge: rightEdge
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/* top and bottom screen edge check for left and right tooltip position */
|
|
166
|
+
|
|
167
|
+
}, {
|
|
168
|
+
key: "topBottomScreenEdge",
|
|
169
|
+
value: function topBottomScreenEdge(tTop, toolTipArrowTop, thisTop, thisHeight, tooltipoffsetHeight, bodyHeight, bottomEdge) {
|
|
170
|
+
if (tTop <= 1) {
|
|
171
|
+
tTop = 2;
|
|
172
|
+
toolTipArrowTop = parseInt(thisTop + thisHeight / 2);
|
|
173
|
+
} else if (tTop + tooltipoffsetHeight > bodyHeight) {
|
|
174
|
+
bottomEdge = tTop + tooltipoffsetHeight - bodyHeight + 2;
|
|
175
|
+
tTop -= bottomEdge;
|
|
176
|
+
toolTipArrowTop += bottomEdge;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return {
|
|
180
|
+
tTop: tTop,
|
|
181
|
+
toolTipArrowTop: toolTipArrowTop,
|
|
182
|
+
thisTop: thisTop,
|
|
183
|
+
thisHeight: thisHeight,
|
|
184
|
+
tooltipoffsetHeight: tooltipoffsetHeight,
|
|
185
|
+
bodyHeight: bodyHeight,
|
|
186
|
+
bottomEdge: bottomEdge
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
}, {
|
|
190
|
+
key: "handleOver",
|
|
191
|
+
value: function handleOver(e, targetElement) {
|
|
192
|
+
var _this2 = this;
|
|
193
|
+
|
|
194
|
+
var containerElement = this.tooltipContainerEl;
|
|
195
|
+
var element = e.target;
|
|
196
|
+
var titleDiv = element.hasAttribute('data-title') || element.hasAttribute('title') ? element : element.closest('[data-title]') || element.closest('[title]');
|
|
197
|
+
|
|
198
|
+
if (titleDiv) {
|
|
199
|
+
var title = titleDiv.getAttribute('data-title') || titleDiv.getAttribute('title');
|
|
200
|
+
/* if data-title-position is left or right change right and left in rtl case */
|
|
201
|
+
|
|
202
|
+
var isPosition = titleDiv.getAttribute('data-title-position');
|
|
203
|
+
var elem = this.getDirection;
|
|
204
|
+
|
|
205
|
+
if (elem.getAttribute('dir') == 'rtl') {
|
|
206
|
+
if (isPosition == 'left') {
|
|
207
|
+
isPosition = 'right';
|
|
208
|
+
} else if (isPosition == 'right') {
|
|
209
|
+
isPosition = 'left';
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (title !== '' && title) {
|
|
214
|
+
titleDiv.setAttribute('data-title', title);
|
|
215
|
+
titleDiv.removeAttribute('title');
|
|
216
|
+
var isInputElementType = element.type === 'text';
|
|
217
|
+
var elementText = isInputElementType ? element.value : element.innerText;
|
|
218
|
+
|
|
219
|
+
if (element.nodeName !== 'I' && elementText && elementText.trim() !== '') {
|
|
220
|
+
var isContentDotted = '';
|
|
221
|
+
|
|
222
|
+
if (element.scrollWidth !== 0) {
|
|
223
|
+
isContentDotted = element.offsetWidth < element.scrollWidth;
|
|
224
|
+
|
|
225
|
+
if (!isContentDotted) {
|
|
226
|
+
isContentDotted = element.offsetHeight < element.scrollHeight;
|
|
227
|
+
} // if (!isContentDotted) {Need to check the code Sivanesh
|
|
228
|
+
// isContentDotted = element.offsetHeight < element.scrollHeight;
|
|
229
|
+
// }
|
|
230
|
+
|
|
231
|
+
} else {
|
|
232
|
+
var offWidth = (0, _selectn["default"])('parentElement.offsetWidth', element) || 0;
|
|
233
|
+
var scrollWidth = (0, _selectn["default"])('parentElement.scrollWidth', element) || 0;
|
|
234
|
+
isContentDotted = offWidth < scrollWidth;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
var originText = elementText.replace(/\s/g, '').toLowerCase();
|
|
238
|
+
var tooltipText = title.replace(/\s/g, '').toLowerCase();
|
|
239
|
+
var isDefaultTooltip = element.hasAttribute('data-istitle') || element.hasAttribute('istitle') ? element.getAttribute('data-istitle') || element.getAttribute('istitle') : 'false';
|
|
240
|
+
isDefaultTooltip = isDefaultTooltip === 'true';
|
|
241
|
+
var isSameText = originText.indexOf(tooltipText) !== -1 ? true : false;
|
|
242
|
+
|
|
243
|
+
if (!isContentDotted && isSameText && !isDefaultTooltip) {
|
|
244
|
+
return false;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (isContentDotted && titleDiv.getAttribute('data-dottedTitle')) {
|
|
248
|
+
title = titleDiv.getAttribute('data-dottedTitle');
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
var isHtml = titleDiv.getAttribute('data-ishtml');
|
|
253
|
+
var dataTooltipnoArrow = titleDiv.getAttribute('data-tooltip-noarrow') === 'true' ? true : false;
|
|
254
|
+
var dataTooltipWrap = titleDiv.getAttribute('data-title-wrap') === 'true' ? true : false;
|
|
255
|
+
var clientRect = titleDiv.getBoundingClientRect();
|
|
256
|
+
var boxLayout = this.getClientRectOfContEl(containerElement);
|
|
257
|
+
this.setState({
|
|
258
|
+
title: title,
|
|
259
|
+
isHtml: isHtml,
|
|
260
|
+
dataTooltipnoArrow: dataTooltipnoArrow,
|
|
261
|
+
dataTooltipWrap: dataTooltipWrap
|
|
262
|
+
}, function () {
|
|
263
|
+
var tooltip = _this2.toolTip;
|
|
264
|
+
|
|
265
|
+
if (tooltip) {
|
|
266
|
+
/* element top, left, height, width */
|
|
267
|
+
var thisTop = clientRect.top;
|
|
268
|
+
var thisLeft = clientRect.left;
|
|
269
|
+
var thisHeight = clientRect.height;
|
|
270
|
+
var thisWidth = clientRect.width;
|
|
271
|
+
/* box layout left spacing */
|
|
272
|
+
|
|
273
|
+
var bodyLeft = boxLayout.left; // let checkTop = thisTop + thisHeight;
|
|
274
|
+
|
|
275
|
+
/* element left plus element width */
|
|
276
|
+
|
|
277
|
+
var checkLeft = thisLeft + thisWidth;
|
|
278
|
+
var tTop;
|
|
279
|
+
var tLeft;
|
|
280
|
+
var toolTipArrowTop;
|
|
281
|
+
var toolTipArrowLeft;
|
|
282
|
+
var rightEdge;
|
|
283
|
+
var bottomEdge;
|
|
284
|
+
var tooltipLeft;
|
|
285
|
+
/* offset width, height of body */
|
|
286
|
+
|
|
287
|
+
var bodyWidth = containerElement.offsetWidth;
|
|
288
|
+
var bodyHeight = containerElement.offsetHeight;
|
|
289
|
+
var isArrowHorizontal = false;
|
|
290
|
+
var isArrowDown = false;
|
|
291
|
+
var isArrowRight = false;
|
|
292
|
+
var tWidth = '';
|
|
293
|
+
/* overall body height minus element top + element height */
|
|
294
|
+
|
|
295
|
+
var thisBottom = bodyHeight - (thisTop + thisHeight);
|
|
296
|
+
/* overall body width minus element left + element width */
|
|
297
|
+
|
|
298
|
+
var thisRight = bodyWidth - (thisLeft + thisWidth);
|
|
299
|
+
/* tooltip width and height */
|
|
300
|
+
|
|
301
|
+
var tooltipoffsetWidth = tooltip.offsetWidth;
|
|
302
|
+
var tooltipoffsetHeight = tooltip.offsetHeight;
|
|
303
|
+
|
|
304
|
+
if (isPosition) {
|
|
305
|
+
if (isPosition == 'top') {
|
|
306
|
+
/* if top does not have enough space show tooltip in bottom area */
|
|
307
|
+
if (thisTop <= tooltipoffsetHeight + 5) {
|
|
308
|
+
/* if top space is larger than bottom space show tooltip in top area */
|
|
309
|
+
if (thisTop > thisBottom) {
|
|
310
|
+
tTop = parseInt(thisTop - (tooltipoffsetHeight + 10));
|
|
311
|
+
tLeft = parseInt(thisLeft - (tooltipoffsetWidth - thisWidth) / 2 + 2);
|
|
312
|
+
toolTipArrowTop = parseInt(tooltipoffsetHeight - 4);
|
|
313
|
+
toolTipArrowLeft = parseInt(tooltipoffsetWidth / 2 - 6);
|
|
314
|
+
isArrowDown = true;
|
|
315
|
+
} else {
|
|
316
|
+
/* bottom position */
|
|
317
|
+
tTop = parseInt(thisTop + (thisHeight + 10));
|
|
318
|
+
tLeft = parseInt(thisLeft - (tooltipoffsetWidth - thisWidth) / 2 + 2);
|
|
319
|
+
toolTipArrowTop = -4;
|
|
320
|
+
toolTipArrowLeft = parseInt(tooltipoffsetWidth / 2 - 6);
|
|
321
|
+
isArrowDown = false;
|
|
322
|
+
}
|
|
323
|
+
} else {
|
|
324
|
+
/* if top have enough space show tooltip in top area */
|
|
325
|
+
tTop = parseInt(thisTop - (tooltipoffsetHeight + 10));
|
|
326
|
+
tLeft = parseInt(thisLeft - (tooltipoffsetWidth - thisWidth) / 2 + 2);
|
|
327
|
+
toolTipArrowTop = parseInt(tooltipoffsetHeight - 4);
|
|
328
|
+
toolTipArrowLeft = parseInt(tooltipoffsetWidth / 2 - 6);
|
|
329
|
+
isArrowDown = true;
|
|
330
|
+
}
|
|
331
|
+
/* top tooltip left and right corner edge case */
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
var values = _this2.leftRightScreenEdge(tLeft, toolTipArrowLeft, thisLeft, thisWidth, tooltipoffsetWidth, bodyWidth, rightEdge, bodyLeft);
|
|
335
|
+
|
|
336
|
+
tLeft = values.tLeft, toolTipArrowLeft = values.toolTipArrowLeft, thisLeft = values.thisLeft, thisWidth = values.thisWidth, tooltipoffsetWidth = values.tooltipoffsetWidth, bodyWidth = values.bodyWidth, rightEdge = values.rightEdge;
|
|
337
|
+
} else if (isPosition == 'bottom') {
|
|
338
|
+
/* if bottom does not have enough space show tooltip in top area */
|
|
339
|
+
if (thisBottom <= tooltipoffsetHeight + 5) {
|
|
340
|
+
/* if bottom space is larger than top space show tooltip in bottom area */
|
|
341
|
+
if (thisTop > thisBottom) {
|
|
342
|
+
tTop = parseInt(thisTop - (tooltipoffsetHeight + 10));
|
|
343
|
+
tLeft = parseInt(thisLeft - (tooltipoffsetWidth - thisWidth) / 2 + 2);
|
|
344
|
+
toolTipArrowTop = parseInt(tooltipoffsetHeight - 4);
|
|
345
|
+
toolTipArrowLeft = parseInt(tooltipoffsetWidth / 2 - 6);
|
|
346
|
+
isArrowDown = true;
|
|
347
|
+
} else {
|
|
348
|
+
/* top position */
|
|
349
|
+
tTop = parseInt(thisTop + (thisHeight + 10));
|
|
350
|
+
tLeft = parseInt(thisLeft - (tooltipoffsetWidth - thisWidth) / 2 + 2);
|
|
351
|
+
toolTipArrowTop = -4;
|
|
352
|
+
toolTipArrowLeft = parseInt(tooltipoffsetWidth / 2 - 6);
|
|
353
|
+
isArrowDown = false;
|
|
354
|
+
}
|
|
355
|
+
} else {
|
|
356
|
+
/* if bottom have enough space show tooltip in bottom area */
|
|
357
|
+
tTop = parseInt(thisTop + (thisHeight + 10));
|
|
358
|
+
tLeft = parseInt(thisLeft - (tooltipoffsetWidth - thisWidth) / 2 + 2);
|
|
359
|
+
toolTipArrowTop = -4;
|
|
360
|
+
toolTipArrowLeft = parseInt(tooltipoffsetWidth / 2 - 6);
|
|
361
|
+
isArrowDown = false;
|
|
362
|
+
}
|
|
363
|
+
/* bottom tooltip left and right corner edge case */
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
var _values = _this2.leftRightScreenEdge(tLeft, toolTipArrowLeft, thisLeft, thisWidth, tooltipoffsetWidth, bodyWidth, rightEdge, bodyLeft);
|
|
367
|
+
|
|
368
|
+
tLeft = _values.tLeft, toolTipArrowLeft = _values.toolTipArrowLeft, thisLeft = _values.thisLeft, thisWidth = _values.thisWidth, tooltipoffsetWidth = _values.tooltipoffsetWidth, bodyWidth = _values.bodyWidth, rightEdge = _values.rightEdge;
|
|
369
|
+
} else if (isPosition == 'left') {
|
|
370
|
+
isArrowHorizontal = true;
|
|
371
|
+
|
|
372
|
+
if (thisLeft - bodyLeft <= tooltipoffsetWidth) {
|
|
373
|
+
if (thisLeft - bodyLeft <= thisRight) {
|
|
374
|
+
/* if left does not have enough space show tooltip in right area */
|
|
375
|
+
tTop = parseInt(thisTop + (thisHeight / 2 - tooltipoffsetHeight / 2));
|
|
376
|
+
tLeft = parseInt(thisLeft + thisWidth + 10);
|
|
377
|
+
toolTipArrowTop = parseInt(tooltipoffsetHeight / 2 - 1);
|
|
378
|
+
toolTipArrowLeft = -1;
|
|
379
|
+
isArrowRight = false;
|
|
380
|
+
} else {
|
|
381
|
+
/* if left space is larger than right space show tooltip in left (default) area */
|
|
382
|
+
if (bodyLeft + tooltipoffsetWidth >= thisLeft) {
|
|
383
|
+
/* if tooltip width is greater than left space, set left space width to tooltip */
|
|
384
|
+
tWidth = thisLeft;
|
|
385
|
+
tTop = parseInt(thisTop + (thisHeight / 2 - tooltipoffsetHeight / 2));
|
|
386
|
+
tLeft = parseInt(thisLeft - tWidth - 7);
|
|
387
|
+
toolTipArrowTop = parseInt(tooltipoffsetHeight / 2 - 1);
|
|
388
|
+
toolTipArrowLeft = parseInt(tWidth - 2);
|
|
389
|
+
isArrowRight = true;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
} else {
|
|
393
|
+
/* if left have enough space show tooltip in left area */
|
|
394
|
+
tTop = parseInt(thisTop + (thisHeight / 2 - tooltipoffsetHeight / 2));
|
|
395
|
+
tLeft = parseInt(thisLeft - tooltipoffsetWidth - 7);
|
|
396
|
+
toolTipArrowTop = parseInt(tooltipoffsetHeight / 2 - 1);
|
|
397
|
+
toolTipArrowLeft = parseInt(tooltipoffsetWidth - 2);
|
|
398
|
+
isArrowRight = true;
|
|
399
|
+
}
|
|
400
|
+
/* left tooltip top and bottom corner edge case */
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
var _values2 = _this2.topBottomScreenEdge(tTop, toolTipArrowTop, thisTop, thisHeight, tooltipoffsetHeight, bodyHeight, bottomEdge);
|
|
404
|
+
|
|
405
|
+
tTop = _values2.tTop, toolTipArrowTop = _values2.toolTipArrowTop, thisTop = _values2.thisTop, thisHeight = _values2.thisHeight, tooltipoffsetHeight = _values2.tooltipoffsetHeight, bodyHeight = _values2.bodyHeight, bottomEdge = _values2.bottomEdge;
|
|
406
|
+
} else if (isPosition == 'right') {
|
|
407
|
+
isArrowHorizontal = true;
|
|
408
|
+
|
|
409
|
+
if (thisRight + bodyLeft <= tooltipoffsetWidth) {
|
|
410
|
+
if (thisLeft + bodyLeft <= thisRight) {
|
|
411
|
+
/* if right space is larger than left space show tooltip in right (default) area */
|
|
412
|
+
tTop = parseInt(thisTop + (thisHeight / 2 - tooltipoffsetHeight / 2));
|
|
413
|
+
tLeft = parseInt(thisLeft + thisWidth + 7);
|
|
414
|
+
toolTipArrowTop = parseInt(tooltipoffsetHeight / 2 - 1);
|
|
415
|
+
toolTipArrowLeft = -1;
|
|
416
|
+
isArrowRight = false;
|
|
417
|
+
} else {
|
|
418
|
+
/* if right does not have enough space show tooltip in left area */
|
|
419
|
+
if (tooltipoffsetWidth >= thisLeft) {
|
|
420
|
+
/* if tooltip width is greater than left space, set left space width to tooltip */
|
|
421
|
+
tWidth = thisLeft;
|
|
422
|
+
tTop = parseInt(thisTop + (thisHeight / 2 - tooltipoffsetHeight / 2));
|
|
423
|
+
tLeft = parseInt(thisLeft - tWidth - 7);
|
|
424
|
+
toolTipArrowTop = parseInt(tooltipoffsetHeight / 2 - 1);
|
|
425
|
+
toolTipArrowLeft = parseInt(tWidth - 2);
|
|
426
|
+
isArrowRight = true;
|
|
427
|
+
} else {
|
|
428
|
+
/* show tooltip in left area without setting left space width to tooltip */
|
|
429
|
+
tTop = parseInt(thisTop + (thisHeight / 2 - tooltipoffsetHeight / 2));
|
|
430
|
+
tLeft = parseInt(thisLeft - tooltipoffsetWidth - 7);
|
|
431
|
+
toolTipArrowTop = parseInt(tooltipoffsetHeight / 2 - 1);
|
|
432
|
+
toolTipArrowLeft = parseInt(tooltipoffsetWidth - 2);
|
|
433
|
+
isArrowRight = true;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
} else {
|
|
437
|
+
/* if right have enough space show tooltip in right area */
|
|
438
|
+
tTop = parseInt(thisTop + (thisHeight / 2 - tooltipoffsetHeight / 2));
|
|
439
|
+
tLeft = parseInt(thisLeft + thisWidth + 7);
|
|
440
|
+
toolTipArrowTop = parseInt(tooltipoffsetHeight / 2 - 1);
|
|
441
|
+
toolTipArrowLeft = -1;
|
|
442
|
+
isArrowRight = false;
|
|
443
|
+
}
|
|
444
|
+
/* right tooltip left and right corner edge case */
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
var _values3 = _this2.topBottomScreenEdge(tTop, toolTipArrowTop, thisTop, thisHeight, tooltipoffsetHeight, bodyHeight, bottomEdge);
|
|
448
|
+
|
|
449
|
+
tTop = _values3.tTop, toolTipArrowTop = _values3.toolTipArrowTop, thisTop = _values3.thisTop, thisHeight = _values3.thisHeight, tooltipoffsetHeight = _values3.tooltipoffsetHeight, bodyHeight = _values3.bodyHeight, bottomEdge = _values3.bottomEdge;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
_this2.setState({
|
|
453
|
+
top: tTop,
|
|
454
|
+
left: tLeft,
|
|
455
|
+
arrowTop: toolTipArrowTop,
|
|
456
|
+
arrowLeft: toolTipArrowLeft,
|
|
457
|
+
isArrowHorizontal: isArrowHorizontal,
|
|
458
|
+
isArrowDown: isArrowDown,
|
|
459
|
+
isArrowRight: isArrowRight,
|
|
460
|
+
width: tWidth
|
|
461
|
+
});
|
|
462
|
+
} else {
|
|
463
|
+
_this2.setState({
|
|
464
|
+
isArrowRight: null
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
tTop = parseInt(thisTop + thisHeight + 10);
|
|
468
|
+
tLeft = parseInt(thisLeft - (tooltipoffsetWidth / 2 - thisWidth / 2) + 2);
|
|
469
|
+
tooltipLeft = parseInt(tooltipoffsetWidth / 2 - 6);
|
|
470
|
+
|
|
471
|
+
if (tLeft - bodyLeft <= 1) {
|
|
472
|
+
// default left side screen edge case
|
|
473
|
+
tooltipLeft = parseInt(thisLeft - bodyLeft + thisWidth / 2 - 6);
|
|
474
|
+
tLeft = bodyLeft + 2;
|
|
475
|
+
} else if (tLeft - bodyLeft + tooltipoffsetWidth > bodyWidth) {
|
|
476
|
+
checkLeft = tLeft + tooltipoffsetWidth - bodyWidth + 2;
|
|
477
|
+
tooltipLeft = tooltipLeft - bodyLeft + checkLeft;
|
|
478
|
+
tLeft = tLeft + bodyLeft - checkLeft;
|
|
479
|
+
} else if (tLeft + tooltipoffsetWidth >= bodyWidth - 2) {
|
|
480
|
+
// default center screen tooltip collide with right edge screen
|
|
481
|
+
tLeft = parseInt(thisLeft - (tooltipoffsetWidth - thisWidth) / 2);
|
|
482
|
+
tooltipLeft = parseInt(tooltipoffsetWidth / 2 - 4);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
isArrowDown = false;
|
|
486
|
+
|
|
487
|
+
if (tTop + tooltipoffsetHeight > bodyHeight) {
|
|
488
|
+
/* if bottom does not have enough space show tooltip in top area */
|
|
489
|
+
if (thisTop > thisBottom) {
|
|
490
|
+
isArrowDown = true;
|
|
491
|
+
tTop -= tooltipoffsetHeight + thisHeight + 20;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
if (isArrowDown) {
|
|
496
|
+
var arrowTop = tooltipoffsetHeight - 4;
|
|
497
|
+
|
|
498
|
+
_this2.setState({
|
|
499
|
+
top: tTop,
|
|
500
|
+
left: tLeft,
|
|
501
|
+
arrowLeft: tooltipLeft,
|
|
502
|
+
arrowTop: arrowTop,
|
|
503
|
+
isArrowDown: true,
|
|
504
|
+
isArrowHorizontal: isArrowHorizontal
|
|
505
|
+
});
|
|
506
|
+
} else {
|
|
507
|
+
_this2.setState({
|
|
508
|
+
top: tTop,
|
|
509
|
+
left: tLeft,
|
|
510
|
+
arrowLeft: tooltipLeft,
|
|
511
|
+
arrowTop: -4,
|
|
512
|
+
isArrowDown: false,
|
|
513
|
+
isArrowHorizontal: isArrowHorizontal
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
titleDiv.addEventListener('click', this.reset);
|
|
520
|
+
titleDiv.addEventListener('mouseup', this.reset);
|
|
521
|
+
titleDiv.addEventListener('mouseleave', this.reset);
|
|
522
|
+
}
|
|
523
|
+
} else {
|
|
524
|
+
this.reset();
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}, {
|
|
528
|
+
key: "render",
|
|
529
|
+
value: function render() {
|
|
530
|
+
var _this$state = this.state,
|
|
531
|
+
title = _this$state.title,
|
|
532
|
+
left = _this$state.left,
|
|
533
|
+
top = _this$state.top,
|
|
534
|
+
arrowLeft = _this$state.arrowLeft,
|
|
535
|
+
arrowTop = _this$state.arrowTop,
|
|
536
|
+
isArrowDown = _this$state.isArrowDown,
|
|
537
|
+
isArrowRight = _this$state.isArrowRight,
|
|
538
|
+
isArrowHorizontal = _this$state.isArrowHorizontal,
|
|
539
|
+
width = _this$state.width,
|
|
540
|
+
isHtml = _this$state.isHtml,
|
|
541
|
+
dataTooltipnoArrow = _this$state.dataTooltipnoArrow,
|
|
542
|
+
dataTooltipWrap = _this$state.dataTooltipWrap;
|
|
543
|
+
var _this$props = this.props,
|
|
544
|
+
dataId = _this$props.dataId,
|
|
545
|
+
customClass = _this$props.customClass;
|
|
546
|
+
var arrowStyle = isArrowHorizontal ? isArrowRight ? _TooltipModule["default"].arrowRight : _TooltipModule["default"].arrowLeft : isArrowDown ? _TooltipModule["default"].arrowDown : _TooltipModule["default"].arrowUp;
|
|
547
|
+
title = title ? title.trim() : null;
|
|
548
|
+
var tooltipCss = "".concat(_TooltipModule["default"].tooltipcont, " ").concat(dataTooltipWrap ? _TooltipModule["default"].tooltipWrapCont : _TooltipModule["default"].tooltipNormalCont);
|
|
549
|
+
return title ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
550
|
+
className: "".concat(customClass, " ").concat(_TooltipModule["default"].tooltiptext),
|
|
551
|
+
style: {
|
|
552
|
+
left: left,
|
|
553
|
+
top: top,
|
|
554
|
+
width: width
|
|
555
|
+
},
|
|
556
|
+
ref: this.getToolTipDOM,
|
|
557
|
+
"data-id": dataId,
|
|
558
|
+
"data-test-id": dataId
|
|
559
|
+
}, !dataTooltipnoArrow ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
560
|
+
className: "".concat(_TooltipModule["default"].tooltiparrow, " ").concat(arrowStyle),
|
|
561
|
+
style: {
|
|
562
|
+
left: arrowLeft,
|
|
563
|
+
top: arrowTop
|
|
564
|
+
}
|
|
565
|
+
}) : null, isHtml ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
566
|
+
className: tooltipCss,
|
|
567
|
+
dangerouslySetInnerHTML: {
|
|
568
|
+
__html: title
|
|
569
|
+
}
|
|
570
|
+
}) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
571
|
+
className: tooltipCss
|
|
572
|
+
}, title)) : null;
|
|
573
|
+
}
|
|
574
|
+
}]);
|
|
575
|
+
|
|
576
|
+
return Tooltip;
|
|
577
|
+
}(_react["default"].Component);
|
|
578
|
+
|
|
579
|
+
exports["default"] = Tooltip;
|
|
580
|
+
Tooltip.propTypes = _propTypes.propTypes;
|
|
581
|
+
Tooltip.defaultProps = _defaultProps.defaultProps; // if (__DOCS__) {
|
|
582
|
+
// Tooltip.docs = {
|
|
583
|
+
// componentGroup: 'Atom',
|
|
584
|
+
// folderName: 'Style Guide',
|
|
585
|
+
// description: ' ',
|
|
586
|
+
// external: true
|
|
587
|
+
// };
|
|
588
|
+
// }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.propTypes = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var propTypes = {
|
|
13
|
+
dataId: _propTypes["default"].string,
|
|
14
|
+
customClass: _propTypes["default"].string
|
|
15
|
+
};
|
|
16
|
+
exports.propTypes = propTypes;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _defaultProps = require("./props/defaultProps");
|
|
11
|
+
|
|
12
|
+
var _propTypes = require("./props/propTypes");
|
|
13
|
+
|
|
14
|
+
var _cssJSLogic2 = _interopRequireDefault(require("./css/cssJSLogic"));
|
|
15
|
+
|
|
16
|
+
var _utils = require("@zohodesk/utils");
|
|
17
|
+
|
|
18
|
+
var _TypographyModule = _interopRequireDefault(require("./css/Typography.module.css"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
+
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
|
+
|
|
26
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
+
|
|
28
|
+
var Typography = function Typography(props) {
|
|
29
|
+
var children = props.children,
|
|
30
|
+
$ui_tagName = props.$ui_tagName,
|
|
31
|
+
$i18n_dataTitle = props.$i18n_dataTitle,
|
|
32
|
+
testId = props.testId,
|
|
33
|
+
customId = props.customId,
|
|
34
|
+
$tagAttributes_text = props.$tagAttributes_text,
|
|
35
|
+
$a11yAttributes_text = props.$a11yAttributes_text,
|
|
36
|
+
customStyle = props.customStyle;
|
|
37
|
+
var style = (0, _utils.mergeStyle)(_TypographyModule["default"], customStyle);
|
|
38
|
+
|
|
39
|
+
var _cssJSLogic = (0, _cssJSLogic2["default"])({
|
|
40
|
+
props: props,
|
|
41
|
+
style: style
|
|
42
|
+
}),
|
|
43
|
+
typographyClass = _cssJSLogic.typographyClass;
|
|
44
|
+
|
|
45
|
+
return /*#__PURE__*/_react["default"].createElement($ui_tagName, _objectSpread(_objectSpread({
|
|
46
|
+
className: typographyClass,
|
|
47
|
+
'data-title': $i18n_dataTitle,
|
|
48
|
+
'data-id': customId,
|
|
49
|
+
'data-test-id': testId
|
|
50
|
+
}, $tagAttributes_text), $a11yAttributes_text), children);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
Typography.propTypes = _propTypes.propTypes;
|
|
54
|
+
Typography.defaultProps = _defaultProps.defaultProps;
|
|
55
|
+
var _default = Typography;
|
|
56
|
+
exports["default"] = _default;
|