@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
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, cleanup } from '@testing-library/react';
|
|
3
|
+
import Label from "../Label"; // Hoisted enum values (PropTypes.oneOf enforcement)
|
|
4
|
+
|
|
5
|
+
const REQUIRED_TYPE_VALUES = ['asterisk', 'text'];
|
|
6
|
+
const SIZE_VALUES = ['small', 'medium'];
|
|
7
|
+
const PALETTE_VALUES = ['default', 'secondary'];
|
|
8
|
+
const TEXT_WEIGHT_VALUES = ['regular', 'semibold'];
|
|
9
|
+
const LAYOUT_VALUES = ['inline', 'block'];
|
|
10
|
+
afterEach(cleanup);
|
|
11
|
+
describe('Label - Snapshot', () => {
|
|
12
|
+
test('Render with default props', () => {
|
|
13
|
+
const {
|
|
14
|
+
asFragment
|
|
15
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
16
|
+
text: "Label text"
|
|
17
|
+
}));
|
|
18
|
+
expect(asFragment()).toMatchSnapshot();
|
|
19
|
+
});
|
|
20
|
+
test.each(REQUIRED_TYPE_VALUES)('Render with requiredType=%s', value => {
|
|
21
|
+
const {
|
|
22
|
+
asFragment
|
|
23
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
24
|
+
text: "Label text",
|
|
25
|
+
isRequired: true,
|
|
26
|
+
requiredType: value
|
|
27
|
+
}));
|
|
28
|
+
expect(asFragment()).toMatchSnapshot();
|
|
29
|
+
});
|
|
30
|
+
test.each(SIZE_VALUES)('Render with size=%s', value => {
|
|
31
|
+
const {
|
|
32
|
+
asFragment
|
|
33
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
34
|
+
text: "Label text",
|
|
35
|
+
size: value
|
|
36
|
+
}));
|
|
37
|
+
expect(asFragment()).toMatchSnapshot();
|
|
38
|
+
});
|
|
39
|
+
test.each(PALETTE_VALUES)('Render with palette=%s', value => {
|
|
40
|
+
const {
|
|
41
|
+
asFragment
|
|
42
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
43
|
+
text: "Label text",
|
|
44
|
+
palette: value
|
|
45
|
+
}));
|
|
46
|
+
expect(asFragment()).toMatchSnapshot();
|
|
47
|
+
});
|
|
48
|
+
test.each(TEXT_WEIGHT_VALUES)('Render with fontWeight=%s', value => {
|
|
49
|
+
const {
|
|
50
|
+
asFragment
|
|
51
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
52
|
+
text: "Label text",
|
|
53
|
+
fontWeight: value
|
|
54
|
+
}));
|
|
55
|
+
expect(asFragment()).toMatchSnapshot();
|
|
56
|
+
});
|
|
57
|
+
test.each(LAYOUT_VALUES)('Render with layout=%s', value => {
|
|
58
|
+
const {
|
|
59
|
+
asFragment
|
|
60
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
61
|
+
text: "Label text",
|
|
62
|
+
layout: value
|
|
63
|
+
}));
|
|
64
|
+
expect(asFragment()).toMatchSnapshot();
|
|
65
|
+
});
|
|
66
|
+
test('Render with shouldHighlightRequired=true', () => {
|
|
67
|
+
const {
|
|
68
|
+
asFragment
|
|
69
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
70
|
+
text: "Label text",
|
|
71
|
+
isRequired: true,
|
|
72
|
+
shouldHighlightRequired: true
|
|
73
|
+
}));
|
|
74
|
+
expect(asFragment()).toMatchSnapshot();
|
|
75
|
+
});
|
|
76
|
+
test('Render with isClipped=true', () => {
|
|
77
|
+
const {
|
|
78
|
+
asFragment
|
|
79
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
80
|
+
text: "Label text",
|
|
81
|
+
isClipped: true
|
|
82
|
+
}));
|
|
83
|
+
expect(asFragment()).toMatchSnapshot();
|
|
84
|
+
});
|
|
85
|
+
test('Render with isRequired=true', () => {
|
|
86
|
+
const {
|
|
87
|
+
asFragment
|
|
88
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
89
|
+
text: "Label text",
|
|
90
|
+
isRequired: true
|
|
91
|
+
}));
|
|
92
|
+
expect(asFragment()).toMatchSnapshot();
|
|
93
|
+
});
|
|
94
|
+
test('Render with isRequired=true isClipped=true', () => {
|
|
95
|
+
const {
|
|
96
|
+
asFragment
|
|
97
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
98
|
+
text: "Label text",
|
|
99
|
+
isRequired: true,
|
|
100
|
+
isClipped: true
|
|
101
|
+
}));
|
|
102
|
+
expect(asFragment()).toMatchSnapshot();
|
|
103
|
+
});
|
|
104
|
+
test('Render with isDisabled=true', () => {
|
|
105
|
+
const {
|
|
106
|
+
asFragment
|
|
107
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
108
|
+
text: "Label text",
|
|
109
|
+
isDisabled: true
|
|
110
|
+
}));
|
|
111
|
+
expect(asFragment()).toMatchSnapshot();
|
|
112
|
+
});
|
|
113
|
+
test('Render with isReadOnly=true', () => {
|
|
114
|
+
const {
|
|
115
|
+
asFragment
|
|
116
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
117
|
+
text: "Label text",
|
|
118
|
+
isReadOnly: true
|
|
119
|
+
}));
|
|
120
|
+
expect(asFragment()).toMatchSnapshot();
|
|
121
|
+
});
|
|
122
|
+
test('Render with htmlFor', () => {
|
|
123
|
+
const {
|
|
124
|
+
asFragment
|
|
125
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
126
|
+
text: "Label text",
|
|
127
|
+
htmlFor: "input-id"
|
|
128
|
+
}));
|
|
129
|
+
expect(asFragment()).toMatchSnapshot();
|
|
130
|
+
});
|
|
131
|
+
test('Render with i18nKeys', () => {
|
|
132
|
+
const {
|
|
133
|
+
asFragment
|
|
134
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
135
|
+
text: "Label text",
|
|
136
|
+
isRequired: true,
|
|
137
|
+
requiredType: "text",
|
|
138
|
+
i18nKeys: {
|
|
139
|
+
requiredText: 'Custom Required'
|
|
140
|
+
}
|
|
141
|
+
}));
|
|
142
|
+
expect(asFragment()).toMatchSnapshot();
|
|
143
|
+
});
|
|
144
|
+
test('Render with customClass', () => {
|
|
145
|
+
const {
|
|
146
|
+
asFragment
|
|
147
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
148
|
+
text: "Label text",
|
|
149
|
+
customClass: {
|
|
150
|
+
container: 'custom-container',
|
|
151
|
+
label: 'custom-label'
|
|
152
|
+
}
|
|
153
|
+
}));
|
|
154
|
+
expect(asFragment()).toMatchSnapshot();
|
|
155
|
+
});
|
|
156
|
+
test('Render with customProps', () => {
|
|
157
|
+
const {
|
|
158
|
+
asFragment
|
|
159
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
160
|
+
text: "Label text",
|
|
161
|
+
customProps: {
|
|
162
|
+
container: {
|
|
163
|
+
$flag_shrink: true
|
|
164
|
+
},
|
|
165
|
+
label: {
|
|
166
|
+
$ui_lineClamp: '2'
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}));
|
|
170
|
+
expect(asFragment()).toMatchSnapshot();
|
|
171
|
+
});
|
|
172
|
+
test('Render with customId and testId', () => {
|
|
173
|
+
const {
|
|
174
|
+
asFragment
|
|
175
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
176
|
+
text: "Label text",
|
|
177
|
+
customId: "label-customId",
|
|
178
|
+
testId: "label-testId"
|
|
179
|
+
}));
|
|
180
|
+
expect(asFragment()).toMatchSnapshot();
|
|
181
|
+
});
|
|
182
|
+
test('Render with tag attributes', () => {
|
|
183
|
+
const {
|
|
184
|
+
asFragment
|
|
185
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
186
|
+
text: "Label text",
|
|
187
|
+
tagAttributes: {
|
|
188
|
+
container: {
|
|
189
|
+
'data-custom-attr': 'true'
|
|
190
|
+
},
|
|
191
|
+
label: {
|
|
192
|
+
'data-custom-attr': 'true'
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}));
|
|
196
|
+
expect(asFragment()).toMatchSnapshot();
|
|
197
|
+
});
|
|
198
|
+
test('Render with a11y attributes', () => {
|
|
199
|
+
const {
|
|
200
|
+
asFragment
|
|
201
|
+
} = render( /*#__PURE__*/React.createElement(Label, {
|
|
202
|
+
text: "Label text",
|
|
203
|
+
a11yAttributes: {
|
|
204
|
+
container: {
|
|
205
|
+
role: 'group'
|
|
206
|
+
},
|
|
207
|
+
label: {
|
|
208
|
+
'aria-label': 'Custom label'
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}));
|
|
212
|
+
expect(asFragment()).toMatchSnapshot();
|
|
213
|
+
});
|
|
214
|
+
});
|
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Label - Snapshot Render with a11y attributes 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="inlineFlex row alignItems_center container default"
|
|
7
|
+
data-id="flex"
|
|
8
|
+
data-test-id="flex"
|
|
9
|
+
role="group"
|
|
10
|
+
>
|
|
11
|
+
<label
|
|
12
|
+
aria-label="Custom label"
|
|
13
|
+
class="size14 font_regular label"
|
|
14
|
+
data-title="Label text"
|
|
15
|
+
>
|
|
16
|
+
Label text
|
|
17
|
+
</label>
|
|
18
|
+
</div>
|
|
19
|
+
</DocumentFragment>
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
exports[`Label - Snapshot Render with customClass 1`] = `
|
|
23
|
+
<DocumentFragment>
|
|
24
|
+
<div
|
|
25
|
+
class="inlineFlex row alignItems_center container default custom-container"
|
|
26
|
+
data-id="flex"
|
|
27
|
+
data-test-id="flex"
|
|
28
|
+
>
|
|
29
|
+
<label
|
|
30
|
+
class="size14 font_regular label custom-label"
|
|
31
|
+
data-title="Label text"
|
|
32
|
+
>
|
|
33
|
+
Label text
|
|
34
|
+
</label>
|
|
35
|
+
</div>
|
|
36
|
+
</DocumentFragment>
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
exports[`Label - Snapshot Render with customId and testId 1`] = `
|
|
40
|
+
<DocumentFragment>
|
|
41
|
+
<div
|
|
42
|
+
class="inlineFlex row alignItems_center container default"
|
|
43
|
+
data-id="label-customId"
|
|
44
|
+
data-selector-id="label-customId"
|
|
45
|
+
data-test-id="label-testId"
|
|
46
|
+
>
|
|
47
|
+
<label
|
|
48
|
+
class="size14 font_regular label"
|
|
49
|
+
data-title="Label text"
|
|
50
|
+
>
|
|
51
|
+
Label text
|
|
52
|
+
</label>
|
|
53
|
+
</div>
|
|
54
|
+
</DocumentFragment>
|
|
55
|
+
`;
|
|
56
|
+
|
|
57
|
+
exports[`Label - Snapshot Render with customProps 1`] = `
|
|
58
|
+
<DocumentFragment>
|
|
59
|
+
<div
|
|
60
|
+
class="inlineFlex row alignItems_center shrink container default"
|
|
61
|
+
data-id="flex"
|
|
62
|
+
data-test-id="flex"
|
|
63
|
+
>
|
|
64
|
+
<label
|
|
65
|
+
class="size14 lineclamp_2 font_regular label"
|
|
66
|
+
data-title="Label text"
|
|
67
|
+
>
|
|
68
|
+
Label text
|
|
69
|
+
</label>
|
|
70
|
+
</div>
|
|
71
|
+
</DocumentFragment>
|
|
72
|
+
`;
|
|
73
|
+
|
|
74
|
+
exports[`Label - Snapshot Render with default props 1`] = `
|
|
75
|
+
<DocumentFragment>
|
|
76
|
+
<div
|
|
77
|
+
class="inlineFlex row alignItems_center container default"
|
|
78
|
+
data-id="flex"
|
|
79
|
+
data-test-id="flex"
|
|
80
|
+
>
|
|
81
|
+
<label
|
|
82
|
+
class="size14 font_regular label"
|
|
83
|
+
data-title="Label text"
|
|
84
|
+
>
|
|
85
|
+
Label text
|
|
86
|
+
</label>
|
|
87
|
+
</div>
|
|
88
|
+
</DocumentFragment>
|
|
89
|
+
`;
|
|
90
|
+
|
|
91
|
+
exports[`Label - Snapshot Render with fontWeight=regular 1`] = `
|
|
92
|
+
<DocumentFragment>
|
|
93
|
+
<div
|
|
94
|
+
class="inlineFlex row alignItems_center container default"
|
|
95
|
+
data-id="flex"
|
|
96
|
+
data-test-id="flex"
|
|
97
|
+
>
|
|
98
|
+
<label
|
|
99
|
+
class="size14 font_regular label"
|
|
100
|
+
data-title="Label text"
|
|
101
|
+
>
|
|
102
|
+
Label text
|
|
103
|
+
</label>
|
|
104
|
+
</div>
|
|
105
|
+
</DocumentFragment>
|
|
106
|
+
`;
|
|
107
|
+
|
|
108
|
+
exports[`Label - Snapshot Render with fontWeight=semibold 1`] = `
|
|
109
|
+
<DocumentFragment>
|
|
110
|
+
<div
|
|
111
|
+
class="inlineFlex row alignItems_center container default"
|
|
112
|
+
data-id="flex"
|
|
113
|
+
data-test-id="flex"
|
|
114
|
+
>
|
|
115
|
+
<label
|
|
116
|
+
class="size14 font_semibold label"
|
|
117
|
+
data-title="Label text"
|
|
118
|
+
>
|
|
119
|
+
Label text
|
|
120
|
+
</label>
|
|
121
|
+
</div>
|
|
122
|
+
</DocumentFragment>
|
|
123
|
+
`;
|
|
124
|
+
|
|
125
|
+
exports[`Label - Snapshot Render with htmlFor 1`] = `
|
|
126
|
+
<DocumentFragment>
|
|
127
|
+
<div
|
|
128
|
+
class="inlineFlex row alignItems_center container default"
|
|
129
|
+
data-id="flex"
|
|
130
|
+
data-test-id="flex"
|
|
131
|
+
>
|
|
132
|
+
<label
|
|
133
|
+
class="size14 font_regular label"
|
|
134
|
+
data-title="Label text"
|
|
135
|
+
for="input-id"
|
|
136
|
+
>
|
|
137
|
+
Label text
|
|
138
|
+
</label>
|
|
139
|
+
</div>
|
|
140
|
+
</DocumentFragment>
|
|
141
|
+
`;
|
|
142
|
+
|
|
143
|
+
exports[`Label - Snapshot Render with i18nKeys 1`] = `
|
|
144
|
+
<DocumentFragment>
|
|
145
|
+
<div
|
|
146
|
+
class="inlineFlex row alignItems_center container default"
|
|
147
|
+
data-id="flex"
|
|
148
|
+
data-test-id="flex"
|
|
149
|
+
>
|
|
150
|
+
<label
|
|
151
|
+
class="size14 font_regular label"
|
|
152
|
+
data-title="Label text"
|
|
153
|
+
>
|
|
154
|
+
Label text
|
|
155
|
+
<span
|
|
156
|
+
aria-hidden="true"
|
|
157
|
+
class="size14 font_regular requiredCommon flexshrink requiredText"
|
|
158
|
+
data-title=""
|
|
159
|
+
>
|
|
160
|
+
(Custom Required)
|
|
161
|
+
</span>
|
|
162
|
+
</label>
|
|
163
|
+
</div>
|
|
164
|
+
</DocumentFragment>
|
|
165
|
+
`;
|
|
166
|
+
|
|
167
|
+
exports[`Label - Snapshot Render with isClipped=true 1`] = `
|
|
168
|
+
<DocumentFragment>
|
|
169
|
+
<div
|
|
170
|
+
class="inlineFlex row alignItems_center container default"
|
|
171
|
+
data-id="flex"
|
|
172
|
+
data-test-id="flex"
|
|
173
|
+
>
|
|
174
|
+
<label
|
|
175
|
+
class="dotted size14 font_regular label"
|
|
176
|
+
data-title="Label text"
|
|
177
|
+
>
|
|
178
|
+
Label text
|
|
179
|
+
</label>
|
|
180
|
+
</div>
|
|
181
|
+
</DocumentFragment>
|
|
182
|
+
`;
|
|
183
|
+
|
|
184
|
+
exports[`Label - Snapshot Render with isDisabled=true 1`] = `
|
|
185
|
+
<DocumentFragment>
|
|
186
|
+
<div
|
|
187
|
+
class="inlineFlex row alignItems_center container disabled"
|
|
188
|
+
data-id="flex"
|
|
189
|
+
data-test-id="flex"
|
|
190
|
+
>
|
|
191
|
+
<label
|
|
192
|
+
class="size14 font_regular label"
|
|
193
|
+
data-title="Label text"
|
|
194
|
+
>
|
|
195
|
+
Label text
|
|
196
|
+
</label>
|
|
197
|
+
</div>
|
|
198
|
+
</DocumentFragment>
|
|
199
|
+
`;
|
|
200
|
+
|
|
201
|
+
exports[`Label - Snapshot Render with isReadOnly=true 1`] = `
|
|
202
|
+
<DocumentFragment>
|
|
203
|
+
<div
|
|
204
|
+
class="inlineFlex row alignItems_center container readonly default"
|
|
205
|
+
data-id="flex"
|
|
206
|
+
data-test-id="flex"
|
|
207
|
+
>
|
|
208
|
+
<label
|
|
209
|
+
class="size14 font_regular label"
|
|
210
|
+
data-title="Label text"
|
|
211
|
+
>
|
|
212
|
+
Label text
|
|
213
|
+
</label>
|
|
214
|
+
</div>
|
|
215
|
+
</DocumentFragment>
|
|
216
|
+
`;
|
|
217
|
+
|
|
218
|
+
exports[`Label - Snapshot Render with isRequired=true 1`] = `
|
|
219
|
+
<DocumentFragment>
|
|
220
|
+
<div
|
|
221
|
+
class="inlineFlex row alignItems_center container default"
|
|
222
|
+
data-id="flex"
|
|
223
|
+
data-test-id="flex"
|
|
224
|
+
>
|
|
225
|
+
<label
|
|
226
|
+
class="size14 font_regular label"
|
|
227
|
+
data-title="Label text"
|
|
228
|
+
>
|
|
229
|
+
Label text
|
|
230
|
+
<span
|
|
231
|
+
aria-hidden="true"
|
|
232
|
+
class="size14 font_regular requiredCommon flexshrink asterisk"
|
|
233
|
+
data-title=""
|
|
234
|
+
>
|
|
235
|
+
*
|
|
236
|
+
</span>
|
|
237
|
+
</label>
|
|
238
|
+
</div>
|
|
239
|
+
</DocumentFragment>
|
|
240
|
+
`;
|
|
241
|
+
|
|
242
|
+
exports[`Label - Snapshot Render with isRequired=true isClipped=true 1`] = `
|
|
243
|
+
<DocumentFragment>
|
|
244
|
+
<div
|
|
245
|
+
class="inlineFlex row alignItems_center container default"
|
|
246
|
+
data-id="flex"
|
|
247
|
+
data-test-id="flex"
|
|
248
|
+
>
|
|
249
|
+
<label
|
|
250
|
+
class="dotted size14 font_regular label"
|
|
251
|
+
data-title="Label text"
|
|
252
|
+
>
|
|
253
|
+
Label text
|
|
254
|
+
</label>
|
|
255
|
+
<span
|
|
256
|
+
aria-hidden="true"
|
|
257
|
+
class="size14 font_regular requiredCommon flexshrink asterisk"
|
|
258
|
+
data-title=""
|
|
259
|
+
>
|
|
260
|
+
*
|
|
261
|
+
</span>
|
|
262
|
+
</div>
|
|
263
|
+
</DocumentFragment>
|
|
264
|
+
`;
|
|
265
|
+
|
|
266
|
+
exports[`Label - Snapshot Render with layout=block 1`] = `
|
|
267
|
+
<DocumentFragment>
|
|
268
|
+
<div
|
|
269
|
+
class="flex row alignItems_center container default"
|
|
270
|
+
data-id="flex"
|
|
271
|
+
data-test-id="flex"
|
|
272
|
+
>
|
|
273
|
+
<label
|
|
274
|
+
class="size14 font_regular label"
|
|
275
|
+
data-title="Label text"
|
|
276
|
+
>
|
|
277
|
+
Label text
|
|
278
|
+
</label>
|
|
279
|
+
</div>
|
|
280
|
+
</DocumentFragment>
|
|
281
|
+
`;
|
|
282
|
+
|
|
283
|
+
exports[`Label - Snapshot Render with layout=inline 1`] = `
|
|
284
|
+
<DocumentFragment>
|
|
285
|
+
<div
|
|
286
|
+
class="inlineFlex row alignItems_center container default"
|
|
287
|
+
data-id="flex"
|
|
288
|
+
data-test-id="flex"
|
|
289
|
+
>
|
|
290
|
+
<label
|
|
291
|
+
class="size14 font_regular label"
|
|
292
|
+
data-title="Label text"
|
|
293
|
+
>
|
|
294
|
+
Label text
|
|
295
|
+
</label>
|
|
296
|
+
</div>
|
|
297
|
+
</DocumentFragment>
|
|
298
|
+
`;
|
|
299
|
+
|
|
300
|
+
exports[`Label - Snapshot Render with palette=default 1`] = `
|
|
301
|
+
<DocumentFragment>
|
|
302
|
+
<div
|
|
303
|
+
class="inlineFlex row alignItems_center container default"
|
|
304
|
+
data-id="flex"
|
|
305
|
+
data-test-id="flex"
|
|
306
|
+
>
|
|
307
|
+
<label
|
|
308
|
+
class="size14 font_regular label"
|
|
309
|
+
data-title="Label text"
|
|
310
|
+
>
|
|
311
|
+
Label text
|
|
312
|
+
</label>
|
|
313
|
+
</div>
|
|
314
|
+
</DocumentFragment>
|
|
315
|
+
`;
|
|
316
|
+
|
|
317
|
+
exports[`Label - Snapshot Render with palette=secondary 1`] = `
|
|
318
|
+
<DocumentFragment>
|
|
319
|
+
<div
|
|
320
|
+
class="inlineFlex row alignItems_center container secondary"
|
|
321
|
+
data-id="flex"
|
|
322
|
+
data-test-id="flex"
|
|
323
|
+
>
|
|
324
|
+
<label
|
|
325
|
+
class="size14 font_regular label"
|
|
326
|
+
data-title="Label text"
|
|
327
|
+
>
|
|
328
|
+
Label text
|
|
329
|
+
</label>
|
|
330
|
+
</div>
|
|
331
|
+
</DocumentFragment>
|
|
332
|
+
`;
|
|
333
|
+
|
|
334
|
+
exports[`Label - Snapshot Render with requiredType=asterisk 1`] = `
|
|
335
|
+
<DocumentFragment>
|
|
336
|
+
<div
|
|
337
|
+
class="inlineFlex row alignItems_center container default"
|
|
338
|
+
data-id="flex"
|
|
339
|
+
data-test-id="flex"
|
|
340
|
+
>
|
|
341
|
+
<label
|
|
342
|
+
class="size14 font_regular label"
|
|
343
|
+
data-title="Label text"
|
|
344
|
+
>
|
|
345
|
+
Label text
|
|
346
|
+
<span
|
|
347
|
+
aria-hidden="true"
|
|
348
|
+
class="size14 font_regular requiredCommon flexshrink asterisk"
|
|
349
|
+
data-title=""
|
|
350
|
+
>
|
|
351
|
+
*
|
|
352
|
+
</span>
|
|
353
|
+
</label>
|
|
354
|
+
</div>
|
|
355
|
+
</DocumentFragment>
|
|
356
|
+
`;
|
|
357
|
+
|
|
358
|
+
exports[`Label - Snapshot Render with requiredType=text 1`] = `
|
|
359
|
+
<DocumentFragment>
|
|
360
|
+
<div
|
|
361
|
+
class="inlineFlex row alignItems_center container default"
|
|
362
|
+
data-id="flex"
|
|
363
|
+
data-test-id="flex"
|
|
364
|
+
>
|
|
365
|
+
<label
|
|
366
|
+
class="size14 font_regular label"
|
|
367
|
+
data-title="Label text"
|
|
368
|
+
>
|
|
369
|
+
Label text
|
|
370
|
+
<span
|
|
371
|
+
aria-hidden="true"
|
|
372
|
+
class="size14 font_regular requiredCommon flexshrink requiredText"
|
|
373
|
+
data-title=""
|
|
374
|
+
>
|
|
375
|
+
(Required)
|
|
376
|
+
</span>
|
|
377
|
+
</label>
|
|
378
|
+
</div>
|
|
379
|
+
</DocumentFragment>
|
|
380
|
+
`;
|
|
381
|
+
|
|
382
|
+
exports[`Label - Snapshot Render with shouldHighlightRequired=true 1`] = `
|
|
383
|
+
<DocumentFragment>
|
|
384
|
+
<div
|
|
385
|
+
class="inlineFlex row alignItems_center container required"
|
|
386
|
+
data-id="flex"
|
|
387
|
+
data-test-id="flex"
|
|
388
|
+
>
|
|
389
|
+
<label
|
|
390
|
+
class="size14 font_regular label"
|
|
391
|
+
data-title="Label text"
|
|
392
|
+
>
|
|
393
|
+
Label text
|
|
394
|
+
<span
|
|
395
|
+
aria-hidden="true"
|
|
396
|
+
class="size14 font_regular requiredCommon flexshrink asterisk"
|
|
397
|
+
data-title=""
|
|
398
|
+
>
|
|
399
|
+
*
|
|
400
|
+
</span>
|
|
401
|
+
</label>
|
|
402
|
+
</div>
|
|
403
|
+
</DocumentFragment>
|
|
404
|
+
`;
|
|
405
|
+
|
|
406
|
+
exports[`Label - Snapshot Render with size=medium 1`] = `
|
|
407
|
+
<DocumentFragment>
|
|
408
|
+
<div
|
|
409
|
+
class="inlineFlex row alignItems_center container default"
|
|
410
|
+
data-id="flex"
|
|
411
|
+
data-test-id="flex"
|
|
412
|
+
>
|
|
413
|
+
<label
|
|
414
|
+
class="size14 font_regular label"
|
|
415
|
+
data-title="Label text"
|
|
416
|
+
>
|
|
417
|
+
Label text
|
|
418
|
+
</label>
|
|
419
|
+
</div>
|
|
420
|
+
</DocumentFragment>
|
|
421
|
+
`;
|
|
422
|
+
|
|
423
|
+
exports[`Label - Snapshot Render with size=small 1`] = `
|
|
424
|
+
<DocumentFragment>
|
|
425
|
+
<div
|
|
426
|
+
class="inlineFlex row alignItems_center container default"
|
|
427
|
+
data-id="flex"
|
|
428
|
+
data-test-id="flex"
|
|
429
|
+
>
|
|
430
|
+
<label
|
|
431
|
+
class="size13 font_regular label"
|
|
432
|
+
data-title="Label text"
|
|
433
|
+
>
|
|
434
|
+
Label text
|
|
435
|
+
</label>
|
|
436
|
+
</div>
|
|
437
|
+
</DocumentFragment>
|
|
438
|
+
`;
|
|
439
|
+
|
|
440
|
+
exports[`Label - Snapshot Render with tag attributes 1`] = `
|
|
441
|
+
<DocumentFragment>
|
|
442
|
+
<div
|
|
443
|
+
class="inlineFlex row alignItems_center container default"
|
|
444
|
+
data-custom-attr="true"
|
|
445
|
+
data-id="flex"
|
|
446
|
+
data-test-id="flex"
|
|
447
|
+
>
|
|
448
|
+
<label
|
|
449
|
+
class="size14 font_regular label"
|
|
450
|
+
data-custom-attr="true"
|
|
451
|
+
data-title="Label text"
|
|
452
|
+
>
|
|
453
|
+
Label text
|
|
454
|
+
</label>
|
|
455
|
+
</div>
|
|
456
|
+
</DocumentFragment>
|
|
457
|
+
`;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
--local-label-cursor: pointer;
|
|
3
|
+
max-width: 100% ;
|
|
4
|
+
}
|
|
5
|
+
.label {
|
|
6
|
+
/*css:theme-validation:ignore*/
|
|
7
|
+
color: var(--local-label-text-color);
|
|
8
|
+
cursor: var(--local-label-cursor);
|
|
9
|
+
}
|
|
10
|
+
.required .label {
|
|
11
|
+
/*css:theme-validation:ignore*/
|
|
12
|
+
color: var(--local-label-required-text-color);
|
|
13
|
+
}
|
|
14
|
+
.disabled:not(.required) .label {
|
|
15
|
+
/*css:theme-validation:ignore*/
|
|
16
|
+
color: var(--local-label-disabled-text-color);
|
|
17
|
+
}
|
|
18
|
+
.default {
|
|
19
|
+
--local-label-text-color: var(--zdt_v1_label_text);
|
|
20
|
+
}
|
|
21
|
+
.secondary {
|
|
22
|
+
--local-label-text-color: var(--zdt_v1_label_secondary_text);
|
|
23
|
+
}
|
|
24
|
+
.required {
|
|
25
|
+
--local-label-required-text-color: var(--zdt_v1_label_required_text);
|
|
26
|
+
}
|
|
27
|
+
.disabled {
|
|
28
|
+
--local-label-disabled-text-color: var(--zdt_v1_label_disabled_text);
|
|
29
|
+
}
|
|
30
|
+
.disabled, .readonly {
|
|
31
|
+
--local-label-cursor: not-allowed;
|
|
32
|
+
}
|
|
33
|
+
.requiredCommon {
|
|
34
|
+
color: var(--zdt_v1_label_required_text);
|
|
35
|
+
cursor: var(--local-label-cursor);
|
|
36
|
+
}
|
|
37
|
+
.requiredText {
|
|
38
|
+
margin-inline-start: var(--zd_size4) ;
|
|
39
|
+
}
|
|
40
|
+
.asterisk {
|
|
41
|
+
margin-inline-start: var(--zd_size2) ;
|
|
42
|
+
}
|