@zohodesk/components 1.6.0 → 1.6.2
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 +18 -1
- package/_react-cli.config.js +24 -0
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +330 -321
- package/assets/Appearance/dark/mode/Component_v1_DarkMode.module.css +15 -9
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkModifyCategory.module.css +466 -466
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkTheme.module.css +34 -34
- package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +33 -29
- package/assets/Appearance/dark/themes/green/green_CTA_DarkModifyCategory.module.css +466 -466
- package/assets/Appearance/dark/themes/green/green_CTA_DarkTheme.module.css +34 -34
- package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +33 -29
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkModifyCategory.module.css +466 -466
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkTheme.module.css +34 -34
- package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +33 -29
- package/assets/Appearance/dark/themes/red/red_CTA_DarkModifyCategory.module.css +466 -466
- package/assets/Appearance/dark/themes/red/red_CTA_DarkTheme.module.css +34 -34
- package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +33 -29
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkModifyCategory.module.css +466 -466
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkTheme.module.css +34 -34
- package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +33 -29
- package/assets/Appearance/light/mode/Component_LightMode.module.css +330 -321
- package/assets/Appearance/light/mode/Component_v1_LightMode.module.css +15 -9
- package/assets/Appearance/light/themes/blue/blue_CTA_LightModifyCategory.module.css +466 -466
- package/assets/Appearance/light/themes/blue/blue_CTA_LightTheme.module.css +34 -34
- package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +33 -29
- package/assets/Appearance/light/themes/green/green_CTA_LightModifyCategory.module.css +466 -466
- package/assets/Appearance/light/themes/green/green_CTA_LightTheme.module.css +34 -34
- package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +33 -29
- package/assets/Appearance/light/themes/orange/orange_CTA_LightModifyCategory.module.css +466 -466
- package/assets/Appearance/light/themes/orange/orange_CTA_LightTheme.module.css +34 -34
- package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +33 -29
- package/assets/Appearance/light/themes/red/red_CTA_LightModifyCategory.module.css +466 -466
- package/assets/Appearance/light/themes/red/red_CTA_LightTheme.module.css +34 -34
- package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +33 -29
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightModifyCategory.module.css +466 -466
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightTheme.module.css +34 -34
- package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +33 -29
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +330 -321
- package/assets/Appearance/pureDark/mode/Component_v1_PureDarkMode.module.css +15 -9
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkModifyCategory.module.css +466 -466
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkTheme.module.css +34 -34
- package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +33 -29
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkModifyCategory.module.css +466 -466
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkTheme.module.css +34 -34
- package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +33 -29
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkModifyCategory.module.css +466 -466
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkTheme.module.css +34 -34
- package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +33 -29
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkModifyCategory.module.css +466 -466
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkTheme.module.css +34 -34
- package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +33 -29
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkModifyCategory.module.css +466 -466
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkTheme.module.css +34 -34
- package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +33 -29
- package/assets/Contrast/darkContrastLightness.module.css +36 -36
- package/assets/Contrast/lightContrastLightness.module.css +36 -36
- package/assets/Contrast/pureDarkContrastLightness.module.css +36 -36
- package/cbt.config.js +41 -0
- package/es/AppContainer/AppContainer.js +9 -10
- package/es/Avatar/Avatar.js +5 -4
- package/es/Avatar/Avatar.module.css +8 -8
- package/es/AvatarTeam/AvatarTeam.js +7 -7
- package/es/AvatarTeam/AvatarTeam.module.css +30 -30
- package/es/Button/Button.js +6 -5
- package/es/Button/css/Button.module.css +19 -19
- package/es/Buttongroup/Buttongroup.js +0 -0
- package/es/Buttongroup/Buttongroup.module.css +5 -3
- package/es/Card/Card.js +0 -0
- package/es/CheckBox/CheckBox.js +11 -11
- package/es/ColorSelect/ColorMultiSelect.js +4 -2
- package/es/ColorSelect/ColorSingleSelect.js +4 -2
- package/es/ColorSelect/_shared/ColorIndicator/ColorIndicator.js +4 -3
- package/es/ColorSelect/_shared/ColorIndicator/ColorIndicator.module.css +2 -2
- package/es/ColorSelect/_shared/ColoredTag/ColoredTag.js +4 -2
- package/es/ColorSelect/_shared/helpers/renderHelpers.js +6 -4
- package/es/DateTime/CalendarView.js +0 -0
- package/es/DateTime/DateTime.js +5 -4
- package/es/DateTime/DateWidget.js +5 -4
- package/es/DateTime/Time.js +11 -12
- package/es/DateTime/YearView.js +0 -0
- package/es/DateTime/common.js +0 -0
- package/es/DateTime/index.js +0 -0
- package/es/DateTime/objectUtils.js +0 -0
- package/es/DateTime/typeChecker.js +0 -0
- package/es/DateTime/validator.js +0 -0
- package/es/DropBox/DropBox.js +11 -10
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +6 -3
- package/es/DropDown/DropDown.js +1 -2
- package/es/DropDown/DropDownHeading.js +0 -0
- package/es/DropDown/DropDownHeading.module.css +4 -4
- package/es/DropDown/DropDownItem.js +0 -0
- package/es/DropDown/DropDownItem.module.css +4 -4
- package/es/DropDown/DropDownSearch.js +0 -0
- package/es/DropDown/DropDownSearch.module.css +3 -3
- package/es/DropDown/DropDownSeparator.js +0 -0
- package/es/Label/Label.js +7 -7
- package/es/Label/Label.module.css +5 -5
- package/es/Layout/Box.js +0 -0
- package/es/Layout/Container.js +0 -0
- package/es/Layout/utils.js +0 -0
- package/es/ListItem/ListContainer.js +5 -6
- package/es/ListItem/ListItem.js +5 -4
- package/es/ListItem/ListItem.module.css +30 -19
- package/es/ListItem/ListItemWithAvatar.js +10 -11
- package/es/ListItem/ListItemWithCheckBox.js +5 -4
- package/es/ListItem/ListItemWithIcon.js +5 -4
- package/es/ListItem/ListItemWithRadio.js +5 -4
- package/es/Modal/Modal.js +5 -4
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +2 -0
- package/es/MultiSelect/AdvancedMultiSelect.js +11 -8
- package/es/MultiSelect/EmptyState.js +16 -2
- package/es/MultiSelect/MultiSelect.js +10 -8
- package/es/MultiSelect/MultiSelectWithAvatar.js +7 -4
- package/es/MultiSelect/SelectedOptions.js +8 -6
- package/es/MultiSelect/Suggestions.js +8 -6
- package/es/MultiSelect/props/propTypes.js +3 -0
- package/es/Popup/Popup.js +0 -0
- package/es/Provider/LibraryContext.js +11 -3
- package/es/Radio/Radio.js +11 -11
- package/es/Radio/Radio.module.css +9 -8
- package/es/Responsive/CustomResponsive.js +0 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +4 -2
- package/es/Ribbon/Ribbon.js +0 -0
- package/es/Ribbon/Ribbon.module.css +25 -20
- package/es/Select/GroupSelect.js +13 -12
- package/es/Select/Select.js +14 -12
- package/es/Select/SelectWithAvatar.js +13 -12
- package/es/Select/SelectWithIcon.js +10 -8
- package/es/Select/props/propTypes.js +3 -0
- package/es/Stencils/Stencils.js +0 -0
- package/es/Stencils/Stencils.module.css +11 -11
- package/es/Switch/Switch.js +8 -8
- package/es/Tab/Tab.js +5 -4
- package/es/Tab/TabContentWrapper.js +5 -4
- package/es/Tab/TabWrapper.js +4 -2
- package/es/Tab/Tabs.js +19 -20
- package/es/Tag/Tag.js +11 -12
- package/es/Tag/Tag.module.css +18 -17
- package/es/TextBox/TextBox.js +5 -5
- package/es/TextBox/TextBox.module.css +9 -9
- package/es/TextBoxIcon/TextBoxIcon.js +4 -2
- package/es/TextBoxIcon/TextBoxIcon.module.css +1 -1
- package/es/Textarea/Textarea.js +7 -6
- package/es/Textarea/Textarea.module.css +18 -18
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +5 -4
- package/es/common/avatarsizes.module.css +16 -16
- package/es/common/common.module.css +2 -2
- package/es/deprecated/PortalLayer/PortalLayer.js +6 -8
- package/es/deprecated/Switch/Switch.js +8 -8
- package/es/shared/ArrowIcon/ArrowIcon.js +6 -6
- package/es/shared/InputFieldLine/InputFieldLine.js +6 -6
- package/es/shared/InputFieldLine/InputFieldLine.module.css +2 -2
- package/es/utils/Common.js +0 -0
- package/es/utils/dropDownUtils.js +0 -0
- package/es/v1/Label/Label.js +98 -33
- package/es/v1/Label/__tests__/Label.spec.js +214 -0
- package/es/v1/Label/__tests__/__snapshots__/Label.spec.js.snap +457 -0
- package/es/v1/Label/constants/index.js +8 -0
- package/es/v1/Label/css/Label_v1.module.css +42 -0
- package/es/v1/Label/css/cssJSLogic.js +44 -0
- package/es/v1/Label/props/defaultProps.js +14 -9
- package/es/v1/Label/props/propTypes.js +34 -14
- package/es/v1/Switch/Switch.js +7 -6
- package/es/v1/Switch/css/Switch_v1.module.css +28 -28
- package/lib/Avatar/Avatar.module.css +8 -8
- package/lib/AvatarTeam/AvatarTeam.js +0 -0
- package/lib/AvatarTeam/AvatarTeam.module.css +30 -30
- package/lib/Button/Button.js +0 -0
- package/lib/Button/css/Button.module.css +19 -19
- package/lib/Buttongroup/Buttongroup.js +0 -0
- package/lib/Buttongroup/Buttongroup.module.css +5 -3
- package/lib/Card/Card.js +0 -0
- package/lib/CheckBox/CheckBox.js +0 -0
- package/lib/ColorSelect/_shared/ColorIndicator/ColorIndicator.module.css +2 -2
- package/lib/DateTime/CalendarView.js +0 -0
- package/lib/DateTime/DateTime.js +0 -0
- package/lib/DateTime/DateWidget.js +0 -0
- package/lib/DateTime/YearView.js +0 -0
- package/lib/DateTime/common.js +0 -0
- package/lib/DateTime/index.js +0 -0
- package/lib/DateTime/objectUtils.js +0 -0
- package/lib/DateTime/typeChecker.js +0 -0
- package/lib/DateTime/validator.js +0 -0
- package/lib/DropBox/DropBox.js +0 -0
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +6 -3
- package/lib/DropDown/DropDown.js +0 -0
- package/lib/DropDown/DropDownHeading.js +0 -0
- package/lib/DropDown/DropDownHeading.module.css +4 -4
- package/lib/DropDown/DropDownItem.js +0 -0
- package/lib/DropDown/DropDownItem.module.css +4 -4
- package/lib/DropDown/DropDownSearch.js +0 -0
- package/lib/DropDown/DropDownSearch.module.css +3 -3
- package/lib/DropDown/DropDownSeparator.js +0 -0
- package/lib/Label/Label.js +0 -0
- package/lib/Label/Label.module.css +5 -5
- package/lib/Layout/Box.js +0 -0
- package/lib/Layout/Container.js +0 -0
- package/lib/Layout/utils.js +0 -0
- package/lib/ListItem/ListItem.js +0 -0
- package/lib/ListItem/ListItem.module.css +30 -19
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +2 -0
- package/lib/MultiSelect/AdvancedMultiSelect.js +2 -0
- package/lib/MultiSelect/EmptyState.js +17 -2
- package/lib/MultiSelect/MultiSelect.js +2 -0
- package/lib/MultiSelect/MultiSelectWithAvatar.js +2 -0
- package/lib/MultiSelect/props/propTypes.js +3 -0
- package/lib/Popup/Popup.js +0 -0
- package/lib/Provider/LibraryContext.js +11 -3
- package/lib/Radio/Radio.js +0 -0
- package/lib/Radio/Radio.module.css +9 -8
- package/lib/Responsive/CustomResponsive.js +0 -0
- package/lib/Ribbon/Ribbon.js +0 -0
- package/lib/Ribbon/Ribbon.module.css +25 -20
- package/lib/Select/GroupSelect.js +2 -0
- package/lib/Select/Select.js +2 -0
- package/lib/Select/SelectWithAvatar.js +2 -0
- package/lib/Select/SelectWithIcon.js +2 -0
- package/lib/Select/props/propTypes.js +3 -0
- package/lib/Stencils/Stencils.js +0 -0
- package/lib/Stencils/Stencils.module.css +11 -11
- package/lib/Switch/Switch.js +0 -0
- package/lib/Tag/Tag.js +0 -0
- package/lib/Tag/Tag.module.css +18 -17
- package/lib/TextBox/TextBox.js +0 -0
- package/lib/TextBox/TextBox.module.css +9 -9
- package/lib/TextBoxIcon/TextBoxIcon.js +0 -0
- package/lib/TextBoxIcon/TextBoxIcon.module.css +1 -1
- package/lib/Textarea/Textarea.js +0 -0
- package/lib/Textarea/Textarea.module.css +18 -18
- package/lib/common/avatarsizes.module.css +16 -16
- package/lib/common/common.module.css +2 -2
- package/lib/deprecated/Switch/Switch.js +0 -0
- package/lib/shared/InputFieldLine/InputFieldLine.module.css +2 -2
- package/lib/utils/Common.js +0 -0
- package/lib/utils/dropDownUtils.js +0 -0
- package/lib/v1/Label/Label.js +104 -36
- package/lib/v1/Label/__tests__/Label.spec.js +221 -0
- package/lib/v1/Label/__tests__/__snapshots__/Label.spec.js.snap +457 -0
- package/lib/v1/Label/constants/index.js +16 -0
- package/lib/v1/Label/css/Label_v1.module.css +42 -0
- package/lib/v1/Label/css/cssJSLogic.js +38 -0
- package/lib/v1/Label/props/defaultProps.js +16 -11
- package/lib/v1/Label/props/propTypes.js +36 -16
- package/lib/v1/Switch/css/Switch_v1.module.css +28 -28
- package/package.json +15 -20
- package/es/v1/Accordion/Accordion.js +0 -66
- package/es/v1/Accordion/AccordionItem.js +0 -57
- package/es/v1/Accordion/index.js +0 -2
- package/es/v1/Accordion/props/defaultProps.js +0 -12
- package/es/v1/Accordion/props/propTypes.js +0 -33
- package/es/v1/Animation/Animation.js +0 -45
- package/es/v1/Animation/props/defaultProps.js +0 -7
- package/es/v1/Animation/props/propTypes.js +0 -12
- package/es/v1/Animation/utils.js +0 -83
- package/es/v1/AppContainer/AppContainer.js +0 -115
- package/es/v1/AppContainer/props/defaultProps.js +0 -10
- package/es/v1/AppContainer/props/propTypes.js +0 -17
- package/es/v1/Avatar/Avatar.js +0 -139
- package/es/v1/Avatar/props/defaultProps.js +0 -17
- package/es/v1/Avatar/props/propTypes.js +0 -26
- package/es/v1/AvatarTeam/AvatarTeam.js +0 -70
- package/es/v1/AvatarTeam/props/defaultProps.js +0 -17
- package/es/v1/AvatarTeam/props/propTypes.js +0 -27
- package/es/v1/Button/Button.js +0 -67
- package/es/v1/Button/props/defaultProps.js +0 -18
- package/es/v1/Button/props/propTypes.js +0 -28
- package/es/v1/Buttongroup/Buttongroup.js +0 -31
- package/es/v1/Buttongroup/props/defaultProps.js +0 -6
- package/es/v1/Buttongroup/props/propTypes.js +0 -9
- package/es/v1/Card/Card.js +0 -237
- package/es/v1/Card/index.js +0 -4
- package/es/v1/Card/props/defaultProps.js +0 -25
- package/es/v1/Card/props/propTypes.js +0 -48
- package/es/v1/CheckBox/CheckBox.js +0 -161
- package/es/v1/CheckBox/props/defaultProps.js +0 -18
- package/es/v1/CheckBox/props/propTypes.js +0 -41
- package/es/v1/DateTime/CalendarView.js +0 -254
- package/es/v1/DateTime/DateTime.js +0 -779
- package/es/v1/DateTime/DateTimePopupFooter.js +0 -47
- package/es/v1/DateTime/DateTimePopupHeader.js +0 -105
- package/es/v1/DateTime/DateWidget.js +0 -1134
- package/es/v1/DateTime/DaysRow.js +0 -32
- package/es/v1/DateTime/Time.js +0 -181
- package/es/v1/DateTime/YearView.js +0 -264
- package/es/v1/DateTime/index.js +0 -1
- package/es/v1/DateTime/props/defaultProps.js +0 -63
- package/es/v1/DateTime/props/propTypes.js +0 -206
- package/es/v1/DropBox/DropBox.js +0 -79
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +0 -133
- package/es/v1/DropBox/DropBoxElement/props/defaultProps.js +0 -18
- package/es/v1/DropBox/DropBoxElement/props/propTypes.js +0 -51
- package/es/v1/DropBox/props/defaultProps.js +0 -14
- package/es/v1/DropBox/props/propTypes.js +0 -16
- package/es/v1/DropBox/utils/isMobilePopover.js +0 -17
- package/es/v1/DropDown/DropDown.js +0 -53
- package/es/v1/DropDown/DropDownHeading.js +0 -36
- package/es/v1/DropDown/DropDownItem.js +0 -56
- package/es/v1/DropDown/DropDownSearch.js +0 -58
- package/es/v1/DropDown/DropDownSeparator.js +0 -12
- package/es/v1/DropDown/props/defaultProps.js +0 -21
- package/es/v1/DropDown/props/propTypes.js +0 -66
- package/es/v1/Heading/Heading.js +0 -35
- package/es/v1/Heading/props/defaultProps.js +0 -5
- package/es/v1/Heading/props/propTypes.js +0 -12
- package/es/v1/Layout/Box.js +0 -115
- package/es/v1/Layout/Container.js +0 -132
- package/es/v1/Layout/index.js +0 -2
- package/es/v1/Layout/props/defaultProps.js +0 -16
- package/es/v1/Layout/props/propTypes.js +0 -46
- package/es/v1/ListItem/ListContainer.js +0 -104
- package/es/v1/ListItem/ListItem.js +0 -123
- package/es/v1/ListItem/ListItemWithAvatar.js +0 -143
- package/es/v1/ListItem/ListItemWithCheckBox.js +0 -104
- package/es/v1/ListItem/ListItemWithIcon.js +0 -126
- package/es/v1/ListItem/ListItemWithRadio.js +0 -105
- package/es/v1/ListItem/index.js +0 -6
- package/es/v1/ListItem/props/defaultProps.js +0 -97
- package/es/v1/ListItem/props/propTypes.js +0 -202
- package/es/v1/Modal/Modal.js +0 -125
- package/es/v1/Modal/props/defaultProps.js +0 -3
- package/es/v1/Modal/props/propTypes.js +0 -7
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +0 -1092
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +0 -583
- package/es/v1/MultiSelect/EmptyState.js +0 -64
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +0 -50
- package/es/v1/MultiSelect/MobileHeader/props/defaultProps.js +0 -7
- package/es/v1/MultiSelect/MobileHeader/props/propTypes.js +0 -7
- package/es/v1/MultiSelect/MultiSelect.js +0 -1119
- package/es/v1/MultiSelect/MultiSelectHeader.js +0 -32
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +0 -208
- package/es/v1/MultiSelect/SelectedOptions.js +0 -84
- package/es/v1/MultiSelect/Suggestions.js +0 -141
- package/es/v1/MultiSelect/index.js +0 -4
- package/es/v1/MultiSelect/props/defaultProps.js +0 -165
- package/es/v1/MultiSelect/props/propTypes.js +0 -322
- package/es/v1/PopOver/PopOver.js +0 -176
- package/es/v1/PopOver/props/defaultProps.js +0 -7
- package/es/v1/PopOver/props/propTypes.js +0 -53
- package/es/v1/Popup/Popup.js +0 -644
- package/es/v1/Radio/Radio.js +0 -130
- package/es/v1/Radio/props/defaultProps.js +0 -15
- package/es/v1/Radio/props/propTypes.js +0 -40
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +0 -56
- package/es/v1/ResponsiveDropBox/props/defaultProps.js +0 -4
- package/es/v1/ResponsiveDropBox/props/propTypes.js +0 -8
- package/es/v1/Ribbon/Ribbon.js +0 -33
- package/es/v1/Ribbon/props/defaultProps.js +0 -9
- package/es/v1/Ribbon/props/propTypes.js +0 -11
- package/es/v1/RippleEffect/RippleEffect.js +0 -25
- package/es/v1/RippleEffect/props/defaultProps.js +0 -10
- package/es/v1/RippleEffect/props/propTypes.js +0 -12
- package/es/v1/Select/GroupSelect.js +0 -818
- package/es/v1/Select/Select.js +0 -975
- package/es/v1/Select/SelectWithAvatar.js +0 -356
- package/es/v1/Select/SelectWithIcon.js +0 -545
- package/es/v1/Select/index.js +0 -4
- package/es/v1/Select/props/defaultProps.js +0 -126
- package/es/v1/Select/props/propTypes.js +0 -297
- package/es/v1/Stencils/Stencils.js +0 -26
- package/es/v1/Stencils/props/defaultProps.js +0 -6
- package/es/v1/Stencils/props/propTypes.js +0 -7
- package/es/v1/Tab/Tab.js +0 -106
- package/es/v1/Tab/TabContent.js +0 -30
- package/es/v1/Tab/TabContentWrapper.js +0 -33
- package/es/v1/Tab/TabWrapper.js +0 -55
- package/es/v1/Tab/Tabs.js +0 -619
- package/es/v1/Tab/index.js +0 -5
- package/es/v1/Tab/props/defaultProps.js +0 -51
- package/es/v1/Tab/props/propTypes.js +0 -117
- package/es/v1/Tab/v1Tab.module.css +0 -100
- package/es/v1/Tab/v1TabContent.module.css +0 -4
- package/es/v1/Tab/v1Tabs.module.css +0 -167
- package/es/v1/Tag/Tag.js +0 -140
- package/es/v1/Tag/props/defaultProps.js +0 -15
- package/es/v1/Tag/props/propTypes.js +0 -36
- package/es/v1/TextBox/TextBox.js +0 -160
- package/es/v1/TextBox/props/defaultProps.js +0 -20
- package/es/v1/TextBox/props/propTypes.js +0 -56
- package/es/v1/TextBoxIcon/TextBoxIcon.js +0 -166
- package/es/v1/TextBoxIcon/props/defaultProps.js +0 -24
- package/es/v1/TextBoxIcon/props/propTypes.js +0 -53
- package/es/v1/Textarea/Textarea.js +0 -100
- package/es/v1/Textarea/props/defaultProps.js +0 -17
- package/es/v1/Textarea/props/propTypes.js +0 -31
- package/es/v1/Tooltip/Tooltip.js +0 -530
- package/es/v1/Tooltip/props/defaultProps.js +0 -4
- package/es/v1/Tooltip/props/propTypes.js +0 -5
- package/es/v1/Typography/Typography.js +0 -38
- package/es/v1/Typography/css/cssJSLogic.js +0 -56
- package/es/v1/Typography/css/v1_Typography.module.css +0 -380
- package/es/v1/Typography/props/defaultProps.js +0 -8
- package/es/v1/Typography/props/propTypes.js +0 -27
- package/es/v1/Typography/utils/index.js +0 -50
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -69
- package/es/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +0 -7
- package/es/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -12
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +0 -99
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +0 -15
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -19
- package/es/v1/semantic/Button/Button.js +0 -53
- package/es/v1/semantic/Button/props/defaultProps.js +0 -12
- package/es/v1/semantic/Button/props/propTypes.js +0 -22
- package/es/v1/semantic/index.js +0 -1
- package/lib/v1/Accordion/Accordion.js +0 -98
- package/lib/v1/Accordion/AccordionItem.js +0 -68
- package/lib/v1/Accordion/index.js +0 -23
- package/lib/v1/Accordion/props/defaultProps.js +0 -20
- package/lib/v1/Accordion/props/propTypes.js +0 -45
- package/lib/v1/Animation/Animation.js +0 -61
- package/lib/v1/Animation/props/defaultProps.js +0 -14
- package/lib/v1/Animation/props/propTypes.js +0 -23
- package/lib/v1/Animation/utils.js +0 -94
- package/lib/v1/AppContainer/AppContainer.js +0 -146
- package/lib/v1/AppContainer/props/defaultProps.js +0 -17
- package/lib/v1/AppContainer/props/propTypes.js +0 -28
- package/lib/v1/Avatar/Avatar.js +0 -191
- package/lib/v1/Avatar/props/defaultProps.js +0 -24
- package/lib/v1/Avatar/props/propTypes.js +0 -37
- package/lib/v1/AvatarTeam/AvatarTeam.js +0 -81
- package/lib/v1/AvatarTeam/props/defaultProps.js +0 -24
- package/lib/v1/AvatarTeam/props/propTypes.js +0 -38
- package/lib/v1/Button/Button.js +0 -82
- package/lib/v1/Button/props/defaultProps.js +0 -27
- package/lib/v1/Button/props/propTypes.js +0 -40
- package/lib/v1/Buttongroup/Buttongroup.js +0 -44
- package/lib/v1/Buttongroup/props/defaultProps.js +0 -13
- package/lib/v1/Buttongroup/props/propTypes.js +0 -20
- package/lib/v1/Card/Card.js +0 -269
- package/lib/v1/Card/index.js +0 -37
- package/lib/v1/Card/props/defaultProps.js +0 -35
- package/lib/v1/Card/props/propTypes.js +0 -62
- package/lib/v1/CheckBox/CheckBox.js +0 -172
- package/lib/v1/CheckBox/props/defaultProps.js +0 -25
- package/lib/v1/CheckBox/props/propTypes.js +0 -52
- package/lib/v1/DateTime/CalendarView.js +0 -322
- package/lib/v1/DateTime/DateTime.js +0 -877
- package/lib/v1/DateTime/DateTimePopupFooter.js +0 -96
- package/lib/v1/DateTime/DateTimePopupHeader.js +0 -166
- package/lib/v1/DateTime/DateWidget.js +0 -1163
- package/lib/v1/DateTime/DaysRow.js +0 -81
- package/lib/v1/DateTime/Time.js +0 -270
- package/lib/v1/DateTime/YearView.js +0 -325
- package/lib/v1/DateTime/index.js +0 -15
- package/lib/v1/DateTime/props/defaultProps.js +0 -76
- package/lib/v1/DateTime/props/propTypes.js +0 -238
- package/lib/v1/DropBox/DropBox.js +0 -109
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +0 -146
- package/lib/v1/DropBox/DropBoxElement/props/defaultProps.js +0 -25
- package/lib/v1/DropBox/DropBoxElement/props/propTypes.js +0 -62
- package/lib/v1/DropBox/props/defaultProps.js +0 -30
- package/lib/v1/DropBox/props/propTypes.js +0 -35
- package/lib/v1/DropBox/utils/isMobilePopover.js +0 -25
- package/lib/v1/DropDown/DropDown.js +0 -74
- package/lib/v1/DropDown/DropDownHeading.js +0 -47
- package/lib/v1/DropDown/DropDownItem.js +0 -75
- package/lib/v1/DropDown/DropDownSearch.js +0 -77
- package/lib/v1/DropDown/DropDownSeparator.js +0 -24
- package/lib/v1/DropDown/props/defaultProps.js +0 -31
- package/lib/v1/DropDown/props/propTypes.js +0 -87
- package/lib/v1/Heading/Heading.js +0 -53
- package/lib/v1/Heading/props/defaultProps.js +0 -12
- package/lib/v1/Heading/props/propTypes.js +0 -23
- package/lib/v1/Layout/Box.js +0 -128
- package/lib/v1/Layout/Container.js +0 -145
- package/lib/v1/Layout/index.js +0 -23
- package/lib/v1/Layout/props/defaultProps.js +0 -24
- package/lib/v1/Layout/props/propTypes.js +0 -58
- package/lib/v1/ListItem/ListContainer.js +0 -128
- package/lib/v1/ListItem/ListItem.js +0 -138
- package/lib/v1/ListItem/ListItemWithAvatar.js +0 -167
- package/lib/v1/ListItem/ListItemWithCheckBox.js +0 -126
- package/lib/v1/ListItem/ListItemWithIcon.js +0 -143
- package/lib/v1/ListItem/ListItemWithRadio.js +0 -127
- package/lib/v1/ListItem/index.js +0 -55
- package/lib/v1/ListItem/props/defaultProps.js +0 -109
- package/lib/v1/ListItem/props/propTypes.js +0 -196
- package/lib/v1/Modal/Modal.js +0 -166
- package/lib/v1/Modal/props/defaultProps.js +0 -10
- package/lib/v1/Modal/props/propTypes.js +0 -18
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +0 -1180
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +0 -649
- package/lib/v1/MultiSelect/EmptyState.js +0 -112
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +0 -62
- package/lib/v1/MultiSelect/MobileHeader/props/defaultProps.js +0 -14
- package/lib/v1/MultiSelect/MobileHeader/props/propTypes.js +0 -18
- package/lib/v1/MultiSelect/MultiSelect.js +0 -1202
- package/lib/v1/MultiSelect/MultiSelectHeader.js +0 -78
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +0 -262
- package/lib/v1/MultiSelect/SelectedOptions.js +0 -130
- package/lib/v1/MultiSelect/Suggestions.js +0 -196
- package/lib/v1/MultiSelect/index.js +0 -39
- package/lib/v1/MultiSelect/props/defaultProps.js +0 -181
- package/lib/v1/MultiSelect/props/propTypes.js +0 -350
- package/lib/v1/PopOver/PopOver.js +0 -197
- package/lib/v1/PopOver/props/defaultProps.js +0 -15
- package/lib/v1/PopOver/props/propTypes.js +0 -66
- package/lib/v1/Popup/Popup.js +0 -715
- package/lib/v1/Radio/Radio.js +0 -141
- package/lib/v1/Radio/props/defaultProps.js +0 -22
- package/lib/v1/Radio/props/propTypes.js +0 -51
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +0 -79
- package/lib/v1/ResponsiveDropBox/props/defaultProps.js +0 -11
- package/lib/v1/ResponsiveDropBox/props/propTypes.js +0 -27
- package/lib/v1/Ribbon/Ribbon.js +0 -44
- package/lib/v1/Ribbon/props/defaultProps.js +0 -16
- package/lib/v1/Ribbon/props/propTypes.js +0 -22
- package/lib/v1/RippleEffect/RippleEffect.js +0 -40
- package/lib/v1/RippleEffect/props/defaultProps.js +0 -17
- package/lib/v1/RippleEffect/props/propTypes.js +0 -23
- package/lib/v1/Select/GroupSelect.js +0 -894
- package/lib/v1/Select/Select.js +0 -1025
- package/lib/v1/Select/SelectWithAvatar.js +0 -406
- package/lib/v1/Select/SelectWithIcon.js +0 -607
- package/lib/v1/Select/index.js +0 -39
- package/lib/v1/Select/props/defaultProps.js +0 -125
- package/lib/v1/Select/props/propTypes.js +0 -319
- package/lib/v1/Stencils/Stencils.js +0 -43
- package/lib/v1/Stencils/props/defaultProps.js +0 -13
- package/lib/v1/Stencils/props/propTypes.js +0 -18
- package/lib/v1/Tab/Tab.js +0 -132
- package/lib/v1/Tab/TabContent.js +0 -42
- package/lib/v1/Tab/TabContentWrapper.js +0 -47
- package/lib/v1/Tab/TabWrapper.js +0 -89
- package/lib/v1/Tab/Tabs.js +0 -688
- package/lib/v1/Tab/index.js +0 -47
- package/lib/v1/Tab/props/defaultProps.js +0 -62
- package/lib/v1/Tab/props/propTypes.js +0 -132
- package/lib/v1/Tab/v1Tab.module.css +0 -100
- package/lib/v1/Tab/v1TabContent.module.css +0 -4
- package/lib/v1/Tab/v1Tabs.module.css +0 -167
- package/lib/v1/Tag/Tag.js +0 -160
- package/lib/v1/Tag/props/defaultProps.js +0 -22
- package/lib/v1/Tag/props/propTypes.js +0 -47
- package/lib/v1/TextBox/TextBox.js +0 -175
- package/lib/v1/TextBox/props/defaultProps.js +0 -27
- package/lib/v1/TextBox/props/propTypes.js +0 -62
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +0 -206
- package/lib/v1/TextBoxIcon/props/defaultProps.js +0 -31
- package/lib/v1/TextBoxIcon/props/propTypes.js +0 -72
- package/lib/v1/Textarea/Textarea.js +0 -118
- package/lib/v1/Textarea/props/defaultProps.js +0 -24
- package/lib/v1/Textarea/props/propTypes.js +0 -42
- package/lib/v1/Tooltip/Tooltip.js +0 -599
- package/lib/v1/Tooltip/props/defaultProps.js +0 -11
- package/lib/v1/Tooltip/props/propTypes.js +0 -16
- package/lib/v1/Typography/Typography.js +0 -56
- package/lib/v1/Typography/css/cssJSLogic.js +0 -48
- package/lib/v1/Typography/css/v1_Typography.module.css +0 -380
- package/lib/v1/Typography/props/defaultProps.js +0 -15
- package/lib/v1/Typography/props/propTypes.js +0 -38
- package/lib/v1/Typography/utils/index.js +0 -59
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -90
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +0 -14
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -23
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +0 -126
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +0 -22
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -30
- package/lib/v1/semantic/Button/Button.js +0 -63
- package/lib/v1/semantic/Button/props/defaultProps.js +0 -19
- package/lib/v1/semantic/Button/props/propTypes.js +0 -33
- package/lib/v1/semantic/index.js +0 -15
package/es/v1/Animation/utils.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
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,115 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useLayoutEffect } from 'react';
|
|
2
|
-
import { defaultProps } from "./props/defaultProps";
|
|
3
|
-
import { propTypes } from "./props/propTypes";
|
|
4
|
-
import { Container, Box } from "../Layout";
|
|
5
|
-
import Tooltip from "../Tooltip/Tooltip";
|
|
6
|
-
import '@zohodesk/variables/assets/transitionVariables.module.css';
|
|
7
|
-
import '@zohodesk/variables/assets/no_transitionVariables.module.css';
|
|
8
|
-
import "../../common/a11y.module.css";
|
|
9
|
-
import "../../common/boxShadow.module.css";
|
|
10
|
-
import style from "../../AppContainer/AppContainer.module.css";
|
|
11
|
-
import { getLibraryConfig, setLibraryConfig } from "../../Provider/Config";
|
|
12
|
-
export default function AppContainer(props) {
|
|
13
|
-
let {
|
|
14
|
-
className,
|
|
15
|
-
children,
|
|
16
|
-
tagName,
|
|
17
|
-
dataId,
|
|
18
|
-
dataSelectorId,
|
|
19
|
-
tooltipClass,
|
|
20
|
-
tooltipParentClass,
|
|
21
|
-
needTooltip,
|
|
22
|
-
customProps,
|
|
23
|
-
eleRef
|
|
24
|
-
} = props;
|
|
25
|
-
let {
|
|
26
|
-
ContainerProps = {},
|
|
27
|
-
TooltipProps = {},
|
|
28
|
-
ExtraProps = {}
|
|
29
|
-
} = customProps;
|
|
30
|
-
const tooltipRef = useRef(null);
|
|
31
|
-
const containerElement = useRef(null);
|
|
32
|
-
const timer = useRef(null);
|
|
33
|
-
const tooltipDebounce = useRef(getLibraryConfig('tooltipDebounce'));
|
|
34
|
-
useLayoutEffect(() => {
|
|
35
|
-
setLibraryConfig({
|
|
36
|
-
getTooltipContainer: () => containerElement.current
|
|
37
|
-
});
|
|
38
|
-
}, []);
|
|
39
|
-
|
|
40
|
-
function mouseOverDispatch(e) {
|
|
41
|
-
if (tooltipRef.current) {
|
|
42
|
-
tooltipRef.current.handleOver(e, containerElement.current);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function removeTimeout() {
|
|
47
|
-
if (timer.current) {
|
|
48
|
-
timer.current = clearTimeout(timer.current);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function handleOver(e) {
|
|
53
|
-
if (timer.current) {
|
|
54
|
-
timer.current = clearTimeout(timer.current);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
timer.current = setTimeout(() => mouseOverDispatch(e), tooltipDebounce.current);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function getContainerRef(ref) {
|
|
61
|
-
containerElement.current = ref;
|
|
62
|
-
eleRef && eleRef(ref);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function setTooltipRef(ref) {
|
|
66
|
-
tooltipRef.current = ref;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
useEffect(() => {
|
|
70
|
-
if (containerElement.current && needTooltip) {
|
|
71
|
-
containerElement.current.addEventListener('mouseover', handleOver, false);
|
|
72
|
-
containerElement.current.addEventListener('mouseout', removeTimeout, false);
|
|
73
|
-
tooltipRef.current.observeElement();
|
|
74
|
-
}
|
|
75
|
-
}, []);
|
|
76
|
-
useEffect(() => {
|
|
77
|
-
return () => {
|
|
78
|
-
if (containerElement.current && needTooltip) {
|
|
79
|
-
containerElement.current.removeEventListener('mouseover', handleOver, false);
|
|
80
|
-
containerElement.current.addEventListener('mouseout', removeTimeout, false);
|
|
81
|
-
tooltipRef.current.unObserveElement();
|
|
82
|
-
setLibraryConfig({
|
|
83
|
-
getTooltipContainer: () => null
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
}, []);
|
|
88
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, {
|
|
89
|
-
className: `${style.container} ${className}`,
|
|
90
|
-
dataId: dataId,
|
|
91
|
-
dataSelectorId: dataSelectorId,
|
|
92
|
-
tagName: tagName,
|
|
93
|
-
eleRef: getContainerRef,
|
|
94
|
-
...ContainerProps,
|
|
95
|
-
...ExtraProps
|
|
96
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
97
|
-
flexible: true
|
|
98
|
-
}, children)), needTooltip ? /*#__PURE__*/React.createElement("div", { ...ExtraProps,
|
|
99
|
-
className: `${style.container} ${style.tooltip} ${tooltipParentClass}`,
|
|
100
|
-
"data-id": `${dataId}_tooltip`,
|
|
101
|
-
"data-test-id": `${dataId}_tooltip`,
|
|
102
|
-
"data-selector-id": `${dataSelectorId}_tooltip`
|
|
103
|
-
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
104
|
-
ref: setTooltipRef,
|
|
105
|
-
customClass: tooltipClass,
|
|
106
|
-
...TooltipProps
|
|
107
|
-
})) : null);
|
|
108
|
-
}
|
|
109
|
-
AppContainer.propTypes = propTypes;
|
|
110
|
-
AppContainer.defaultProps = defaultProps; // if (__DOCS__) {
|
|
111
|
-
// AppContainer.docs = {
|
|
112
|
-
// componentGroup: 'Template',
|
|
113
|
-
// folderName: 'Style Guide'
|
|
114
|
-
// };
|
|
115
|
-
// }
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
export const propTypes = {
|
|
3
|
-
children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]),
|
|
4
|
-
dataId: PropTypes.string,
|
|
5
|
-
dataSelectorId: PropTypes.string,
|
|
6
|
-
eleRef: PropTypes.func,
|
|
7
|
-
tagName: PropTypes.string,
|
|
8
|
-
className: PropTypes.string,
|
|
9
|
-
needTooltip: PropTypes.bool,
|
|
10
|
-
tooltipClass: PropTypes.string,
|
|
11
|
-
tooltipParentClass: PropTypes.string,
|
|
12
|
-
customProps: PropTypes.shape({
|
|
13
|
-
ContainerProps: PropTypes.object,
|
|
14
|
-
TooltipProps: PropTypes.object,
|
|
15
|
-
ExtraProps: PropTypes.object
|
|
16
|
-
})
|
|
17
|
-
};
|
package/es/v1/Avatar/Avatar.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { useEffectCallOnlyAfterState } from '@zohodesk/hooks';
|
|
3
|
-
import { defaultProps } from "./props/defaultProps";
|
|
4
|
-
import { propTypes } from "./props/propTypes";
|
|
5
|
-
import { getInitial } from "../../utils/getInitial";
|
|
6
|
-
import AvatarSize from "../../Provider/AvatarSize";
|
|
7
|
-
import style from "../../Avatar/Avatar.module.css";
|
|
8
|
-
/*
|
|
9
|
-
1. need to change name into firstName lastName
|
|
10
|
-
2. pattern support via context as well as props
|
|
11
|
-
3. prop high priority to arrange firstName lastName
|
|
12
|
-
4. team pass name as lastName and pass pattern via prop
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
function Avatar(props) {
|
|
16
|
-
let {
|
|
17
|
-
src,
|
|
18
|
-
name,
|
|
19
|
-
size,
|
|
20
|
-
palette,
|
|
21
|
-
onClick,
|
|
22
|
-
title,
|
|
23
|
-
shape,
|
|
24
|
-
needTitle,
|
|
25
|
-
dataId,
|
|
26
|
-
initial,
|
|
27
|
-
needBorder,
|
|
28
|
-
borderOnActive,
|
|
29
|
-
borderOnHover,
|
|
30
|
-
textPalette,
|
|
31
|
-
customClass,
|
|
32
|
-
alternateSrc,
|
|
33
|
-
isAnimate,
|
|
34
|
-
dataSelectorId,
|
|
35
|
-
customProps,
|
|
36
|
-
needInnerBorder,
|
|
37
|
-
needDefaultBorder
|
|
38
|
-
} = props;
|
|
39
|
-
let {
|
|
40
|
-
AvatarProps = {}
|
|
41
|
-
} = customProps;
|
|
42
|
-
const [isLoaded, setLoaded] = useState(false);
|
|
43
|
-
|
|
44
|
-
const putInvalidImageURLJSON = () => {
|
|
45
|
-
let _validImgArr = [...Avatar.validImageURLs];
|
|
46
|
-
let _invalidImgArr = [...Avatar.invalidImageURLs]; // if (alternateSrc) {
|
|
47
|
-
// _validImgArr.push(alternateSrc);
|
|
48
|
-
// }
|
|
49
|
-
|
|
50
|
-
const validIndex = _validImgArr.indexOf(src);
|
|
51
|
-
|
|
52
|
-
if (validIndex !== -1) {
|
|
53
|
-
_validImgArr.splice(validIndex, 1);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
_invalidImgArr.push(src);
|
|
57
|
-
|
|
58
|
-
Avatar.invalidImageURLs = _invalidImgArr;
|
|
59
|
-
Avatar.validImageURLs = _validImgArr;
|
|
60
|
-
setLoaded(isLoaded => !isLoaded);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const putValidImageURLJSON = () => {
|
|
64
|
-
const validImgArr = Avatar.validImageURLs;
|
|
65
|
-
const invalidImgArr = Avatar.invalidImageURLs;
|
|
66
|
-
|
|
67
|
-
if (src && validImgArr.indexOf(src) === -1 && invalidImgArr.indexOf(src) === -1) {
|
|
68
|
-
let _validImgArr = [...validImgArr];
|
|
69
|
-
|
|
70
|
-
_validImgArr.push(src);
|
|
71
|
-
|
|
72
|
-
Avatar.validImageURLs = _validImgArr;
|
|
73
|
-
setLoaded(isLoaded => !isLoaded);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
/* this will cause error if user name already have some space need to move firstName lastName user preference pattern*/
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const getInitialByFullName = function () {
|
|
80
|
-
let fullName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
81
|
-
fullName = (fullName || '').trim();
|
|
82
|
-
let nameList = fullName.split(' ');
|
|
83
|
-
|
|
84
|
-
if (nameList.length === 1) {
|
|
85
|
-
return getInitial('', nameList[0]);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return getInitial(nameList[0], nameList[1]);
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
useEffectCallOnlyAfterState(() => {
|
|
92
|
-
setLoaded(isLoaded => !isLoaded);
|
|
93
|
-
}, [src]);
|
|
94
|
-
let textStyle = textPalette ? style[textPalette] : palette === 'secondary' ? style.white : style.black;
|
|
95
|
-
let shapeStyle = shape === 'circle' ? 'circle' : `square_${size}`;
|
|
96
|
-
initial = initial || getInitialByFullName(name);
|
|
97
|
-
let isInvalidImageList = Avatar.invalidImageURLs.indexOf(src) !== -1; //let isValidImageList = Avatar.validImageURLs.indexOf(src) !== -1;
|
|
98
|
-
|
|
99
|
-
let showAvatar = src && !isInvalidImageList;
|
|
100
|
-
let showInitial = !showAvatar || showAvatar && isInvalidImageList;
|
|
101
|
-
const showAlternateAvatar = alternateSrc ? showInitial : false;
|
|
102
|
-
let border = borderOnHover || onClick;
|
|
103
|
-
let showDefaultBorder = src && !isInvalidImageList && needDefaultBorder;
|
|
104
|
-
let borderStyle = (showDefaultBorder || !src || !showAvatar || showInitial) && needBorder ? `${style.border} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} ` : '';
|
|
105
|
-
borderStyle = showAlternateAvatar ? '' : borderStyle;
|
|
106
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
107
|
-
className: `${style.avatar} ${style[size]} ${AvatarSize(size)} ${style[shapeStyle]} ${style[palette]} ${textStyle} ${borderStyle} ${customClass ? customClass : ''}`,
|
|
108
|
-
"data-title": needTitle ? title ? title : name : null,
|
|
109
|
-
"data-id": dataId,
|
|
110
|
-
"data-test-id": dataId,
|
|
111
|
-
onClick: onClick,
|
|
112
|
-
"data-selector-id": dataSelectorId,
|
|
113
|
-
tabIndex: onClick ? 0 : null,
|
|
114
|
-
...AvatarProps
|
|
115
|
-
}, showInitial && !showAlternateAvatar && /*#__PURE__*/React.createElement("span", {
|
|
116
|
-
className: `${style.initial}`,
|
|
117
|
-
"data-id": `${dataId}_AvatarInitial`,
|
|
118
|
-
"data-test-id": `${dataId}_AvatarInitial`,
|
|
119
|
-
"data-selector-id": `${dataSelectorId}_AvatarInitial`
|
|
120
|
-
}, initial), (showAvatar || showAlternateAvatar) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("img", {
|
|
121
|
-
className: `${style.image} ${isAnimate ? style.animate : ''} ${needInnerBorder ? style.innerBorder : ''}`,
|
|
122
|
-
"data-id": `${dataId}_AvatarImg`,
|
|
123
|
-
"data-test-id": `${dataId}_AvatarImg`,
|
|
124
|
-
"data-selector-id": `${dataSelectorId}_AvatarImg`,
|
|
125
|
-
name: name,
|
|
126
|
-
onError: putInvalidImageURLJSON,
|
|
127
|
-
onLoad: putValidImageURLJSON,
|
|
128
|
-
src: showAlternateAvatar ? alternateSrc : src,
|
|
129
|
-
alt: name
|
|
130
|
-
}), showDefaultBorder ? null : /*#__PURE__*/React.createElement("span", {
|
|
131
|
-
className: `${style.shadow} ${textStyle} `
|
|
132
|
-
})));
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export default Avatar;
|
|
136
|
-
Avatar.defaultProps = defaultProps;
|
|
137
|
-
Avatar.propTypes = propTypes;
|
|
138
|
-
Avatar.invalidImageURLs = [];
|
|
139
|
-
Avatar.validImageURLs = [];
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const defaultProps = {
|
|
2
|
-
needTitle: true,
|
|
3
|
-
palette: 'primary',
|
|
4
|
-
shape: 'circle',
|
|
5
|
-
size: 'medium',
|
|
6
|
-
src: null,
|
|
7
|
-
title: null,
|
|
8
|
-
dataId: 'Avatar',
|
|
9
|
-
needBorder: true,
|
|
10
|
-
borderOnActive: false,
|
|
11
|
-
borderOnHover: false,
|
|
12
|
-
customProps: {},
|
|
13
|
-
isAnimate: true,
|
|
14
|
-
dataSelectorId: 'avatar',
|
|
15
|
-
needInnerBorder: false,
|
|
16
|
-
needDefaultBorder: false
|
|
17
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
export const propTypes = {
|
|
3
|
-
dataId: PropTypes.string,
|
|
4
|
-
dataSelectorId: PropTypes.string,
|
|
5
|
-
initial: PropTypes.string,
|
|
6
|
-
name: PropTypes.string.isRequired,
|
|
7
|
-
needBorder: PropTypes.bool,
|
|
8
|
-
needTitle: PropTypes.bool,
|
|
9
|
-
onClick: PropTypes.func,
|
|
10
|
-
palette: PropTypes.oneOf(['primary', 'secondary', 'info', 'default']),
|
|
11
|
-
shape: PropTypes.oneOf(['circle', 'square']),
|
|
12
|
-
size: PropTypes.oneOf(['xxsmall', 'small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
13
|
-
src: PropTypes.string,
|
|
14
|
-
textPalette: PropTypes.oneOf(['white', 'black']),
|
|
15
|
-
title: PropTypes.string,
|
|
16
|
-
customClass: PropTypes.string,
|
|
17
|
-
alternateSrc: PropTypes.string,
|
|
18
|
-
borderOnActive: PropTypes.bool,
|
|
19
|
-
borderOnHover: PropTypes.bool,
|
|
20
|
-
customProps: PropTypes.shape({
|
|
21
|
-
AvatarProps: PropTypes.object
|
|
22
|
-
}),
|
|
23
|
-
isAnimate: PropTypes.bool,
|
|
24
|
-
needInnerBorder: PropTypes.bool,
|
|
25
|
-
needDefaultBorder: PropTypes.bool
|
|
26
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { defaultProps } from "./props/defaultProps";
|
|
3
|
-
import { propTypes } from "./props/propTypes";
|
|
4
|
-
import Avatar from "../Avatar/Avatar";
|
|
5
|
-
import style from "../../AvatarTeam/AvatarTeam.module.css";
|
|
6
|
-
/* once avatar support firstname lastname and pattern
|
|
7
|
-
pass lastName as team name and pattern ["FIRST_NAME","LAST_NAME"] as props
|
|
8
|
-
|
|
9
|
-
Not going to export to external then can kept inside supportapp
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
export default function AvatarTeam(props) {
|
|
13
|
-
const {
|
|
14
|
-
src,
|
|
15
|
-
name,
|
|
16
|
-
size,
|
|
17
|
-
palette,
|
|
18
|
-
textPalette,
|
|
19
|
-
onClick,
|
|
20
|
-
title,
|
|
21
|
-
isFilled,
|
|
22
|
-
dataId,
|
|
23
|
-
needTitle,
|
|
24
|
-
customClass,
|
|
25
|
-
borderOnActive,
|
|
26
|
-
borderOnHover,
|
|
27
|
-
dataSelectorId,
|
|
28
|
-
customProps,
|
|
29
|
-
needInnerBorder,
|
|
30
|
-
needBorder,
|
|
31
|
-
needDefaultBorder
|
|
32
|
-
} = props;
|
|
33
|
-
const {
|
|
34
|
-
AvatarTeamProps = {},
|
|
35
|
-
AvatarProps = {}
|
|
36
|
-
} = customProps;
|
|
37
|
-
const {
|
|
38
|
-
customAvatar = '',
|
|
39
|
-
customAvatarTeam = ''
|
|
40
|
-
} = customClass;
|
|
41
|
-
const border = borderOnHover || onClick;
|
|
42
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
43
|
-
className: `${style.container} ${borderOnActive ? style.borderOnActive : border ? style.borderOnHover : ''} `,
|
|
44
|
-
"data-id": dataId,
|
|
45
|
-
"data-test-id": dataId,
|
|
46
|
-
"data-selector-id": dataSelectorId,
|
|
47
|
-
...AvatarTeamProps
|
|
48
|
-
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
49
|
-
name: name,
|
|
50
|
-
onClick: onClick,
|
|
51
|
-
palette: palette,
|
|
52
|
-
textPalette: textPalette,
|
|
53
|
-
size: size,
|
|
54
|
-
src: src,
|
|
55
|
-
title: title,
|
|
56
|
-
needTitle: needTitle,
|
|
57
|
-
customClass: customAvatar,
|
|
58
|
-
borderOnActive: borderOnActive,
|
|
59
|
-
borderOnHover: border,
|
|
60
|
-
needInnerBorder: needInnerBorder,
|
|
61
|
-
needBorder: needBorder,
|
|
62
|
-
needDefaultBorder: needDefaultBorder,
|
|
63
|
-
...AvatarProps
|
|
64
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
65
|
-
className: `${style.team} ${isFilled ? `${style[`${palette}Filled`]}` : style.nofill}
|
|
66
|
-
${style[`${size}team`]} ${customAvatarTeam}`
|
|
67
|
-
}));
|
|
68
|
-
}
|
|
69
|
-
AvatarTeam.defaultProps = defaultProps;
|
|
70
|
-
AvatarTeam.propTypes = propTypes;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const defaultProps = {
|
|
2
|
-
isFilled: false,
|
|
3
|
-
palette: 'primary',
|
|
4
|
-
size: 'medium',
|
|
5
|
-
src: null,
|
|
6
|
-
title: null,
|
|
7
|
-
dataId: 'avatarTeamComp',
|
|
8
|
-
dataSelectorId: 'avatarTeam',
|
|
9
|
-
needTitle: true,
|
|
10
|
-
customClass: {},
|
|
11
|
-
borderOnActive: false,
|
|
12
|
-
borderOnHover: false,
|
|
13
|
-
customProps: {},
|
|
14
|
-
needInnerBorder: true,
|
|
15
|
-
needBorder: true,
|
|
16
|
-
needDefaultBorder: true
|
|
17
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
export const propTypes = {
|
|
3
|
-
dataId: PropTypes.string,
|
|
4
|
-
dataSelectorId: PropTypes.string,
|
|
5
|
-
isFilled: PropTypes.bool,
|
|
6
|
-
name: PropTypes.string.isRequired,
|
|
7
|
-
needTitle: PropTypes.bool,
|
|
8
|
-
onClick: PropTypes.func,
|
|
9
|
-
palette: PropTypes.oneOf(['primary', 'secondary', 'info']),
|
|
10
|
-
size: PropTypes.oneOf(['xxsmall', 'small', 'xsmall', 'medium', 'xmedium', 'large', 'xlarge']),
|
|
11
|
-
src: PropTypes.string,
|
|
12
|
-
textPalette: PropTypes.oneOf(['white', 'black']),
|
|
13
|
-
needBorder: PropTypes.bool,
|
|
14
|
-
title: PropTypes.string,
|
|
15
|
-
customClass: PropTypes.shape({
|
|
16
|
-
customAvatar: PropTypes.string,
|
|
17
|
-
customAvatarTeam: PropTypes.string
|
|
18
|
-
}),
|
|
19
|
-
borderOnActive: PropTypes.bool,
|
|
20
|
-
borderOnHover: PropTypes.bool,
|
|
21
|
-
needInnerBorder: PropTypes.bool,
|
|
22
|
-
needDefaultBorder: PropTypes.bool,
|
|
23
|
-
customProps: PropTypes.shape({
|
|
24
|
-
AvatarTeamProps: PropTypes.object,
|
|
25
|
-
AvatarProps: PropTypes.object
|
|
26
|
-
})
|
|
27
|
-
};
|
package/es/v1/Button/Button.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { defaultProps } from "./props/defaultProps";
|
|
3
|
-
import { propTypes } from "./props/propTypes";
|
|
4
|
-
import cssJSLogic from "../../Button/css/cssJSLogic";
|
|
5
|
-
import { mergeStyle } from '@zohodesk/utils';
|
|
6
|
-
import style from "../../Button/css/Button.module.css";
|
|
7
|
-
/*
|
|
8
|
-
Button text and children props?
|
|
9
|
-
use children for both cases
|
|
10
|
-
toLowerCase check needed?
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
export default function Button(props) {
|
|
14
|
-
let {
|
|
15
|
-
text,
|
|
16
|
-
disabled,
|
|
17
|
-
onClick,
|
|
18
|
-
status,
|
|
19
|
-
children,
|
|
20
|
-
dataId,
|
|
21
|
-
needAppearance,
|
|
22
|
-
getRef,
|
|
23
|
-
title,
|
|
24
|
-
dataSelectorId,
|
|
25
|
-
customProps,
|
|
26
|
-
customStyle,
|
|
27
|
-
a11y,
|
|
28
|
-
id
|
|
29
|
-
} = props;
|
|
30
|
-
const finalStyle = mergeStyle(style, customStyle);
|
|
31
|
-
const {
|
|
32
|
-
buttonClass,
|
|
33
|
-
loaderParentClass,
|
|
34
|
-
loaderChildClass
|
|
35
|
-
} = cssJSLogic({
|
|
36
|
-
props,
|
|
37
|
-
style: finalStyle
|
|
38
|
-
});
|
|
39
|
-
let statusLower = status.toLowerCase();
|
|
40
|
-
return /*#__PURE__*/React.createElement("button", {
|
|
41
|
-
className: buttonClass,
|
|
42
|
-
"data-id": disabled ? `${dataId}_disabled` : dataId,
|
|
43
|
-
"data-test-id": disabled ? `${dataId}_disabled` : dataId,
|
|
44
|
-
disabled: disabled || statusLower === 'loading',
|
|
45
|
-
onClick: onClick,
|
|
46
|
-
"data-title": title,
|
|
47
|
-
type: "button",
|
|
48
|
-
ref: getRef,
|
|
49
|
-
"data-selector-id": dataSelectorId,
|
|
50
|
-
...customProps,
|
|
51
|
-
...a11y,
|
|
52
|
-
id: id
|
|
53
|
-
}, children ? children : text, statusLower !== 'none' && needAppearance && /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: finalStyle.overlay
|
|
55
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
56
|
-
className: loaderParentClass
|
|
57
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
58
|
-
className: loaderChildClass
|
|
59
|
-
}))));
|
|
60
|
-
}
|
|
61
|
-
Button.defaultProps = defaultProps;
|
|
62
|
-
Button.propTypes = propTypes; // if (__DOCS__) {
|
|
63
|
-
// Button.docs = {
|
|
64
|
-
// componentGroup: 'Form Elements',
|
|
65
|
-
// folderName: 'Style Guide'
|
|
66
|
-
// };
|
|
67
|
-
// }
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { dummyFunction } from "../../../utils/dummyFunction";
|
|
2
|
-
export const defaultProps = {
|
|
3
|
-
children: null,
|
|
4
|
-
dataId: 'buttonComp',
|
|
5
|
-
dataSelectorId: 'button',
|
|
6
|
-
disabled: false,
|
|
7
|
-
isBold: true,
|
|
8
|
-
needAppearance: true,
|
|
9
|
-
onClick: dummyFunction,
|
|
10
|
-
palette: 'primary',
|
|
11
|
-
rounded: false,
|
|
12
|
-
size: 'medium',
|
|
13
|
-
status: 'none',
|
|
14
|
-
text: 'Button',
|
|
15
|
-
customClass: {},
|
|
16
|
-
customProps: {},
|
|
17
|
-
a11y: {}
|
|
18
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
export const propTypes = {
|
|
3
|
-
children: PropTypes.node,
|
|
4
|
-
dataId: PropTypes.string,
|
|
5
|
-
dataSelectorId: PropTypes.string,
|
|
6
|
-
disabled: PropTypes.bool,
|
|
7
|
-
getRef: PropTypes.func,
|
|
8
|
-
isBold: PropTypes.bool,
|
|
9
|
-
needAppearance: PropTypes.bool,
|
|
10
|
-
onClick: PropTypes.func,
|
|
11
|
-
palette: PropTypes.oneOf(['plainPrimary', 'plainSecondary', 'primary', 'primaryFilled', 'danger', 'dangerFilled', 'secondary', 'secondaryFilled', 'successFilled', 'info', 'tertiaryFilled']),
|
|
12
|
-
rounded: PropTypes.bool,
|
|
13
|
-
size: PropTypes.oneOf(['small', 'medium', 'large', 'xlarge']),
|
|
14
|
-
status: PropTypes.oneOf(['loading', 'success', 'none']),
|
|
15
|
-
text: PropTypes.string,
|
|
16
|
-
title: PropTypes.string,
|
|
17
|
-
customClass: PropTypes.shape({
|
|
18
|
-
customButton: PropTypes.string,
|
|
19
|
-
customStatus: PropTypes.string,
|
|
20
|
-
customStatusSize: PropTypes.string
|
|
21
|
-
}),
|
|
22
|
-
customStyle: PropTypes.object,
|
|
23
|
-
customProps: PropTypes.object,
|
|
24
|
-
id: PropTypes.string,
|
|
25
|
-
a11y: PropTypes.object,
|
|
26
|
-
shouldStrikeThroughDisabled: PropTypes.bool
|
|
27
|
-
};
|
|
28
|
-
export default propTypes;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { defaultProps } from "./props/defaultProps";
|
|
3
|
-
import { propTypes } from "./props/propTypes";
|
|
4
|
-
import style from "../../Buttongroup/Buttongroup.module.css";
|
|
5
|
-
export default function Buttongroup(props) {
|
|
6
|
-
const {
|
|
7
|
-
children,
|
|
8
|
-
type,
|
|
9
|
-
buttonPosition,
|
|
10
|
-
customClass,
|
|
11
|
-
dataId,
|
|
12
|
-
dataSelectorId
|
|
13
|
-
} = props;
|
|
14
|
-
const btnGroup = [];
|
|
15
|
-
children && children.forEach(child => {
|
|
16
|
-
let btnRight = /*#__PURE__*/React.createElement("span", {
|
|
17
|
-
className: style[type]
|
|
18
|
-
}, child);
|
|
19
|
-
btnGroup.push(btnRight);
|
|
20
|
-
});
|
|
21
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
-
className: `${style.buttonGroup} ${style[type]} ${customClass ? customClass : ''}`,
|
|
23
|
-
"data-id": dataId,
|
|
24
|
-
"data-test-id": dataId,
|
|
25
|
-
"data-selector-id": dataSelectorId
|
|
26
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
27
|
-
className: style[`align${buttonPosition}`]
|
|
28
|
-
}, children));
|
|
29
|
-
}
|
|
30
|
-
Buttongroup.defaultProps = defaultProps;
|
|
31
|
-
Buttongroup.propTypes = propTypes;
|