@zohodesk/components 1.0.0-temp-259.5 → 1.0.0-temp-262
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/CHANGELOG.md +37 -0
- package/assets/Appearance/dark/mode/Component_v1_DarkMode.module.css +20 -0
- package/assets/Appearance/dark/themes/blue/blue_componentsCTA_DarkModifyCategory.module.css +2 -0
- package/assets/Appearance/dark/themes/green/green_componentsCTA_DarkModifyCategory.module.css +2 -0
- package/assets/Appearance/dark/themes/orange/orange_componentsCTA_DarkModifyCategory.module.css +2 -0
- package/assets/Appearance/dark/themes/red/red_componentsCTA_DarkModifyCategory.module.css +2 -0
- package/assets/Appearance/dark/themes/yellow/yellow_componentsCTA_DarkModifyCategory.module.css +2 -0
- package/assets/Appearance/light/mode/Component_LightMode.module.css +1 -1
- package/assets/Appearance/light/mode/Component_v1_LightMode.module.css +20 -0
- package/assets/Appearance/light/themes/blue/blue_componentsCTA_LightModifyCategory.module.css +2 -0
- package/assets/Appearance/light/themes/green/green_componentsCTA_LightModifyCategory.module.css +2 -0
- package/assets/Appearance/light/themes/orange/orange_componentsCTA_LightModifyCategory.module.css +2 -0
- package/assets/Appearance/light/themes/red/red_componentsCTA_LightModifyCategory.module.css +2 -0
- package/assets/Appearance/light/themes/yellow/yellow_componentsCTA_LightModifyCategory.module.css +2 -0
- package/assets/Appearance/pureDark/mode/Component_v1_PureDarkMode.module.css +20 -0
- package/assets/Appearance/pureDark/themes/blue/blue_componentsCTA_PureDarkModifyCategory.module.css +2 -0
- package/assets/Appearance/pureDark/themes/green/green_componentsCTA_PureDarkModifyCategory.module.css +2 -0
- package/assets/Appearance/pureDark/themes/orange/orange_componentsCTA_PureDarkModifyCategory.module.css +2 -0
- package/assets/Appearance/pureDark/themes/red/red_componentsCTA_PureDarkModifyCategory.module.css +2 -0
- package/assets/Appearance/pureDark/themes/yellow/yellow_componentsCTA_PureDarkModifyCategory.module.css +2 -0
- package/cbt.config.js +1 -0
- package/es/Accordion/__tests__/Accordion.spec.js +117 -3
- package/es/Accordion/__tests__/AccordionItem.spec.js +118 -6
- package/es/Accordion/__tests__/__snapshots__/Accordion.spec.js.snap +344 -2
- package/es/Accordion/__tests__/__snapshots__/AccordionItem.spec.js.snap +155 -3
- package/es/Animation/__tests__/Animation.spec.js +28 -4
- package/es/Animation/__tests__/__snapshots__/Animation.spec.js.snap +92 -2
- package/es/Avatar/Avatar.module.css +5 -11
- package/es/AvatarTeam/AvatarTeam.module.css +1 -3
- package/es/Button/css/Button.module.css +8 -12
- package/es/Card/Card.module.css +2 -2
- package/es/CheckBox/CheckBox.js +1 -1
- package/es/CheckBox/CheckBox.module.css +4 -6
- package/es/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +1 -1
- package/es/DateTime/DateTime.module.css +15 -22
- package/es/DateTime/DateWidget.js +1 -1
- package/es/DateTime/DateWidget.module.css +10 -5
- package/es/DateTime/YearView.module.css +6 -9
- package/es/DateTime/__tests__/CalendarView.spec.js +70 -3
- package/es/DateTime/__tests__/DateTime.spec.js +89 -6
- package/es/DateTime/__tests__/DateTimePopupFooter.spec.js +20 -2
- package/es/DateTime/__tests__/DateTimePopupHeader.spec.js +29 -2
- package/es/DateTime/__tests__/DateWidget.spec.js +34 -2
- package/es/DateTime/__tests__/DaysRow.spec.js +19 -3
- package/es/DateTime/__tests__/Time.spec.js +50 -3
- package/es/DateTime/__tests__/YearView.spec.js +60 -3
- package/es/DateTime/__tests__/__snapshots__/CalendarView.spec.js.snap +2907 -170
- package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +4392 -108
- package/es/DateTime/__tests__/__snapshots__/DateTimePopupFooter.spec.js.snap +67 -1
- package/es/DateTime/__tests__/__snapshots__/DateTimePopupHeader.spec.js.snap +187 -1
- package/es/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +266 -2
- package/es/DateTime/__tests__/__snapshots__/DaysRow.spec.js.snap +155 -2
- package/es/DateTime/__tests__/__snapshots__/Time.spec.js.snap +522 -5
- package/es/DateTime/__tests__/__snapshots__/YearView.spec.js.snap +540 -0
- package/es/DividerLine/DividerLine.js +40 -0
- package/es/DividerLine/__tests__/DividerLine.spec.js +81 -0
- package/es/DividerLine/__tests__/__snapshots__/DividerLine.spec.js.snap +131 -0
- package/es/DividerLine/constants/index.js +29 -0
- package/es/DividerLine/css/DividerLine.module.css +51 -0
- package/es/DividerLine/css/cssJSLogic.js +1 -0
- package/es/DividerLine/css/dividerLine.cva.js +42 -0
- package/es/DividerLine/props/defaultProps.js +11 -0
- package/es/DividerLine/props/propTypes.js +19 -0
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +7 -11
- package/es/DropBox/css/DropBox.module.css +3 -3
- package/es/DropDown/DropDownHeading.module.css +1 -1
- package/es/DropDown/DropDownItem.module.css +3 -7
- package/es/DropDown/DropDownSeparator.js +9 -4
- package/es/DropDown/DropDownSeparator.module.css +0 -4
- package/es/DropDown/__tests__/DropDownSeparator.spec.js +8 -0
- package/es/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +12 -2
- package/es/Heading/Heading.module.css +1 -1
- package/es/Heading/__tests__/Heading.spec.js +57 -3
- package/es/Heading/__tests__/__snapshots__/Heading.spec.js.snap +87 -14
- package/es/Label/Label.module.css +3 -3
- package/es/ListItem/ListItem.module.css +9 -13
- package/es/ListItem/__tests__/ListContainer.spec.js +228 -1
- package/es/ListItem/__tests__/ListItem.spec.js +359 -1
- package/es/ListItem/__tests__/ListItemWithAvatar.spec.js +390 -1
- package/es/ListItem/__tests__/ListItemWithCheckBox.spec.js +214 -1
- package/es/ListItem/__tests__/ListItemWithIcon.spec.js +303 -1
- package/es/ListItem/__tests__/ListItemWithRadio.spec.js +230 -1
- package/es/ListItem/__tests__/__snapshots__/ListContainer.spec.js.snap +602 -0
- package/es/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +1807 -0
- package/es/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +2703 -0
- package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +2909 -0
- package/es/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +2009 -0
- package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +3070 -0
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +1 -0
- package/es/MultiSelect/AdvancedMultiSelect.js +1 -0
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +1 -1
- package/es/MultiSelect/MultiSelect.module.css +13 -21
- package/es/MultiSelect/SelectedOptions.js +3 -3
- package/es/MultiSelect/SelectedOptions.module.css +1 -1
- package/es/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +713 -1
- package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +740 -1
- package/es/MultiSelect/__tests__/EmptyState.spec.js +268 -1
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +899 -2
- package/es/MultiSelect/__tests__/MultiSelectHeader.spec.js +50 -1
- package/es/MultiSelect/__tests__/MultiSelectWithAvatar.spec.js +487 -1
- package/es/MultiSelect/__tests__/SelectedOptions.spec.js +291 -1
- package/es/MultiSelect/__tests__/Suggestions.spec.js +370 -2
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +11906 -0
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +12180 -0
- package/es/MultiSelect/__tests__/__snapshots__/EmptyState.spec.js.snap +253 -0
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +14209 -0
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelectHeader.spec.js.snap +136 -0
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelectWithAvatar.spec.js.snap +11506 -0
- package/es/MultiSelect/__tests__/__snapshots__/SelectedOptions.spec.js.snap +1382 -0
- package/es/MultiSelect/__tests__/__snapshots__/Suggestions.spec.js.snap +3611 -0
- package/es/PopOver/PopOver.module.css +2 -2
- package/es/PopOver/__tests__/PopOver.spec.js +141 -2
- package/es/PopOver/__tests__/__snapshots__/PopOver.spec.js.snap +1260 -0
- package/es/Radio/Radio.module.css +8 -8
- package/es/ResponsiveDropBox/__tests__/ResponsiveDropBox.spec.js +212 -1
- package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +1802 -0
- package/es/Ribbon/Ribbon.module.css +12 -19
- package/es/RippleEffect/RippleEffect.module.css +2 -2
- package/es/Select/Select.module.css +4 -4
- package/es/Select/SelectWithAvatar.js +14 -3
- package/es/Select/SelectWithIcon.js +23 -1
- package/es/Select/__tests__/SelectWithAvatar.spec.js +17 -0
- package/es/Select/__tests__/SelectWithIcon.spec.js +18 -0
- package/es/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +47 -0
- package/es/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +19 -0
- package/es/Select/props/propTypes.js +1 -0
- package/es/Switch/Switch.module.css +4 -7
- package/es/Tab/Tab.module.css +5 -8
- package/es/Tab/TabContent.module.css +1 -1
- package/es/Tab/Tabs.module.css +8 -10
- package/es/Tab/__tests__/Tab.spec.js +249 -1
- package/es/Tab/__tests__/TabContent.spec.js +34 -1
- package/es/Tab/__tests__/TabContentWrapper.spec.js +72 -1
- package/es/Tab/__tests__/TabWrapper.spec.js +163 -1
- package/es/Tab/__tests__/Tabs.spec.js +681 -1
- package/es/Tab/__tests__/__snapshots__/Tab.spec.js.snap +1049 -0
- package/es/Tab/__tests__/__snapshots__/TabContent.spec.js.snap +99 -0
- package/es/Tab/__tests__/__snapshots__/TabContentWrapper.spec.js.snap +121 -0
- package/es/Tab/__tests__/__snapshots__/TabWrapper.spec.js.snap +2002 -0
- package/es/Tab/__tests__/__snapshots__/Tabs.spec.js.snap +11053 -0
- package/es/Tag/Tag.module.css +4 -7
- package/es/TextBoxIcon/TextBoxIcon.module.css +1 -1
- package/es/Textarea/Textarea.module.css +4 -5
- package/es/Tooltip/Tooltip.js +4 -1
- package/es/Tooltip/Tooltip.module.css +3 -7
- package/es/Tooltip/__tests__/Tooltip.spec.js +590 -0
- package/es/Tooltip/__tests__/__snapshots__/Tooltip.spec.js.snap +813 -0
- package/es/Typography/css/Typography.module.css +33 -40
- package/es/common/animation.module.css +8 -8
- package/es/common/basic.module.css +5 -5
- package/es/common/common.module.css +85 -157
- package/es/common/transition.module.css +2 -0
- package/es/index.d.ts +39 -0
- package/es/index.js +12 -12
- package/es/semantic/Button/semanticButton.module.css +1 -5
- package/es/shared/InputFieldLine/InputFieldLine.module.css +1 -1
- package/es/v1/Button/__tests__/__snapshots__/Button.spec.js.snap +1 -1
- package/es/v1/Button/css/Button_v1.module.css +2 -3
- package/es/v1/Label/css/Label_v1.module.css +1 -1
- package/es/v1/Switch/css/Switch_v1.module.css +5 -9
- package/es/v1/Tab/Tab.js +150 -0
- package/es/v1/Tab/TabList.js +145 -0
- package/es/v1/Tab/TabMoreMenu.js +245 -0
- package/es/v1/Tab/TabPanel.js +51 -0
- package/es/v1/Tab/Tabs.js +125 -0
- package/es/v1/Tab/__tests__/Tab.spec.js +824 -0
- package/es/v1/Tab/__tests__/__snapshots__/Tab.spec.js.snap +4684 -0
- package/es/v1/Tab/constants/index.js +105 -0
- package/es/v1/Tab/constants/presets.js +22 -0
- package/es/v1/Tab/context.js +19 -0
- package/es/v1/Tab/core/Tab.js +60 -0
- package/es/v1/Tab/core/TabList.js +51 -0
- package/es/v1/Tab/core/TabListFocusScope.js +18 -0
- package/es/v1/Tab/core/TabPanel.js +54 -0
- package/es/v1/Tab/core/Tabs.js +45 -0
- package/es/v1/Tab/core/index.js +6 -0
- package/es/v1/Tab/css/Tab_v1.module.css +369 -0
- package/es/v1/Tab/css/cssJSLogic.js +1 -0
- package/es/v1/Tab/css/tab.cva.js +163 -0
- package/es/v1/Tab/index.js +8 -0
- package/es/v1/Tab/props/defaultProps.js +55 -0
- package/es/v1/Tab/props/propTypes.js +215 -0
- package/es/v1/Tab/utils/pinSelectedTab.js +44 -0
- package/es/v1/shared/Spinner/Spinner_v1.module.css +3 -5
- package/es/v1/shared/SuccessTick/SuccessTick_v1.module.css +1 -2
- package/lib/Accordion/__tests__/Accordion.spec.js +122 -2
- package/lib/Accordion/__tests__/AccordionItem.spec.js +126 -4
- package/lib/Accordion/__tests__/__snapshots__/Accordion.spec.js.snap +344 -2
- package/lib/Accordion/__tests__/__snapshots__/AccordionItem.spec.js.snap +155 -3
- package/lib/Animation/__tests__/Animation.spec.js +31 -5
- package/lib/Animation/__tests__/__snapshots__/Animation.spec.js.snap +92 -2
- package/lib/Avatar/Avatar.module.css +5 -11
- package/lib/AvatarTeam/AvatarTeam.module.css +1 -3
- package/lib/Button/css/Button.module.css +8 -12
- package/lib/Card/Card.module.css +2 -2
- package/lib/CheckBox/CheckBox.js +1 -1
- package/lib/CheckBox/CheckBox.module.css +4 -6
- package/lib/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +1 -1
- package/lib/DateTime/DateTime.module.css +15 -22
- package/lib/DateTime/DateWidget.js +1 -1
- package/lib/DateTime/DateWidget.module.css +10 -5
- package/lib/DateTime/YearView.module.css +6 -9
- package/lib/DateTime/__tests__/CalendarView.spec.js +71 -2
- package/lib/DateTime/__tests__/DateTime.spec.js +92 -6
- package/lib/DateTime/__tests__/DateTimePopupFooter.spec.js +21 -1
- package/lib/DateTime/__tests__/DateTimePopupHeader.spec.js +30 -1
- package/lib/DateTime/__tests__/DateWidget.spec.js +35 -1
- package/lib/DateTime/__tests__/DaysRow.spec.js +20 -2
- package/lib/DateTime/__tests__/Time.spec.js +51 -2
- package/lib/DateTime/__tests__/YearView.spec.js +61 -2
- package/lib/DateTime/__tests__/__snapshots__/CalendarView.spec.js.snap +2907 -170
- package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +4392 -108
- package/lib/DateTime/__tests__/__snapshots__/DateTimePopupFooter.spec.js.snap +67 -1
- package/lib/DateTime/__tests__/__snapshots__/DateTimePopupHeader.spec.js.snap +187 -1
- package/lib/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +266 -2
- package/lib/DateTime/__tests__/__snapshots__/DaysRow.spec.js.snap +155 -2
- package/lib/DateTime/__tests__/__snapshots__/Time.spec.js.snap +522 -5
- package/lib/DateTime/__tests__/__snapshots__/YearView.spec.js.snap +540 -0
- package/lib/DividerLine/DividerLine.js +50 -0
- package/lib/DividerLine/__tests__/DividerLine.spec.js +88 -0
- package/lib/DividerLine/__tests__/__snapshots__/DividerLine.spec.js.snap +131 -0
- package/lib/DividerLine/constants/index.js +39 -0
- package/lib/DividerLine/css/DividerLine.module.css +51 -0
- package/lib/DividerLine/css/cssJSLogic.js +13 -0
- package/lib/DividerLine/css/dividerLine.cva.js +57 -0
- package/lib/DividerLine/props/defaultProps.js +21 -0
- package/lib/DividerLine/props/propTypes.js +31 -0
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +7 -11
- package/lib/DropBox/css/DropBox.module.css +3 -3
- package/lib/DropDown/DropDownHeading.module.css +1 -1
- package/lib/DropDown/DropDownItem.module.css +3 -7
- package/lib/DropDown/DropDownSeparator.js +9 -4
- package/lib/DropDown/DropDownSeparator.module.css +0 -4
- package/lib/DropDown/__tests__/DropDownSeparator.spec.js +8 -0
- package/lib/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +12 -2
- package/lib/Heading/Heading.module.css +1 -1
- package/lib/Heading/__tests__/Heading.spec.js +60 -4
- package/lib/Heading/__tests__/__snapshots__/Heading.spec.js.snap +87 -14
- package/lib/Label/Label.module.css +3 -3
- package/lib/ListItem/ListItem.module.css +9 -13
- package/lib/ListItem/__tests__/ListContainer.spec.js +229 -0
- package/lib/ListItem/__tests__/ListItem.spec.js +362 -0
- package/lib/ListItem/__tests__/ListItemWithAvatar.spec.js +391 -0
- package/lib/ListItem/__tests__/ListItemWithCheckBox.spec.js +215 -0
- package/lib/ListItem/__tests__/ListItemWithIcon.spec.js +304 -0
- package/lib/ListItem/__tests__/ListItemWithRadio.spec.js +231 -0
- package/lib/ListItem/__tests__/__snapshots__/ListContainer.spec.js.snap +602 -0
- package/lib/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +1807 -0
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +2703 -0
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +2909 -0
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +2009 -0
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +3070 -0
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +1 -0
- package/lib/MultiSelect/AdvancedMultiSelect.js +1 -0
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +1 -1
- package/lib/MultiSelect/MultiSelect.module.css +13 -21
- package/lib/MultiSelect/SelectedOptions.js +3 -3
- package/lib/MultiSelect/SelectedOptions.module.css +1 -1
- package/lib/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +734 -0
- package/lib/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +751 -0
- package/lib/MultiSelect/__tests__/EmptyState.spec.js +273 -0
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +920 -0
- package/lib/MultiSelect/__tests__/MultiSelectHeader.spec.js +51 -0
- package/lib/MultiSelect/__tests__/MultiSelectWithAvatar.spec.js +497 -0
- package/lib/MultiSelect/__tests__/SelectedOptions.spec.js +305 -0
- package/lib/MultiSelect/__tests__/Suggestions.spec.js +375 -0
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +11906 -0
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +12180 -0
- package/lib/MultiSelect/__tests__/__snapshots__/EmptyState.spec.js.snap +253 -0
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +14209 -0
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelectHeader.spec.js.snap +136 -0
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelectWithAvatar.spec.js.snap +11506 -0
- package/lib/MultiSelect/__tests__/__snapshots__/SelectedOptions.spec.js.snap +1382 -0
- package/lib/MultiSelect/__tests__/__snapshots__/Suggestions.spec.js.snap +3611 -0
- package/lib/PopOver/PopOver.module.css +2 -2
- package/lib/PopOver/__tests__/PopOver.spec.js +150 -1
- package/lib/PopOver/__tests__/__snapshots__/PopOver.spec.js.snap +1260 -0
- package/lib/Radio/Radio.module.css +8 -8
- package/lib/ResponsiveDropBox/__tests__/ResponsiveDropBox.spec.js +213 -0
- package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +1802 -0
- package/lib/Ribbon/Ribbon.module.css +12 -19
- package/lib/RippleEffect/RippleEffect.module.css +2 -2
- package/lib/Select/Select.module.css +4 -4
- package/lib/Select/SelectWithAvatar.js +15 -3
- package/lib/Select/SelectWithIcon.js +26 -1
- package/lib/Select/__tests__/SelectWithAvatar.spec.js +20 -0
- package/lib/Select/__tests__/SelectWithIcon.spec.js +21 -0
- package/lib/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +47 -0
- package/lib/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +19 -0
- package/lib/Select/props/propTypes.js +1 -0
- package/lib/Switch/Switch.module.css +4 -7
- package/lib/Tab/Tab.module.css +5 -8
- package/lib/Tab/TabContent.module.css +1 -1
- package/lib/Tab/Tabs.module.css +8 -10
- package/lib/Tab/__tests__/Tab.spec.js +250 -0
- package/lib/Tab/__tests__/TabContent.spec.js +35 -0
- package/lib/Tab/__tests__/TabContentWrapper.spec.js +76 -0
- package/lib/Tab/__tests__/TabWrapper.spec.js +174 -0
- package/lib/Tab/__tests__/Tabs.spec.js +741 -0
- package/lib/Tab/__tests__/__snapshots__/Tab.spec.js.snap +1049 -0
- package/lib/Tab/__tests__/__snapshots__/TabContent.spec.js.snap +99 -0
- package/lib/Tab/__tests__/__snapshots__/TabContentWrapper.spec.js.snap +121 -0
- package/lib/Tab/__tests__/__snapshots__/TabWrapper.spec.js.snap +2002 -0
- package/lib/Tab/__tests__/__snapshots__/Tabs.spec.js.snap +11053 -0
- package/lib/Tag/Tag.module.css +4 -7
- package/lib/TextBoxIcon/TextBoxIcon.module.css +1 -1
- package/lib/Textarea/Textarea.module.css +4 -5
- package/lib/Tooltip/Tooltip.js +6 -1
- package/lib/Tooltip/Tooltip.module.css +3 -7
- package/lib/Tooltip/__tests__/Tooltip.spec.js +629 -0
- package/lib/Tooltip/__tests__/__snapshots__/Tooltip.spec.js.snap +813 -0
- package/lib/Typography/css/Typography.module.css +33 -40
- package/lib/common/animation.module.css +8 -8
- package/lib/common/basic.module.css +5 -5
- package/lib/common/common.module.css +85 -157
- package/lib/common/transition.module.css +2 -0
- package/lib/index.d.ts +39 -0
- package/lib/index.js +270 -173
- package/lib/semantic/Button/semanticButton.module.css +1 -5
- package/lib/shared/InputFieldLine/InputFieldLine.module.css +1 -1
- package/lib/v1/Button/__tests__/__snapshots__/Button.spec.js.snap +1 -1
- package/lib/v1/Button/css/Button_v1.module.css +2 -3
- package/lib/v1/Label/css/Label_v1.module.css +1 -1
- package/lib/v1/Switch/css/Switch_v1.module.css +5 -9
- package/lib/v1/Tab/Tab.js +171 -0
- package/lib/v1/Tab/TabList.js +180 -0
- package/lib/v1/Tab/TabMoreMenu.js +284 -0
- package/lib/v1/Tab/TabPanel.js +64 -0
- package/lib/v1/Tab/Tabs.js +151 -0
- package/lib/v1/Tab/__tests__/Tab.spec.js +913 -0
- package/lib/v1/Tab/__tests__/__snapshots__/Tab.spec.js.snap +4684 -0
- package/lib/v1/Tab/constants/index.js +109 -0
- package/lib/v1/Tab/constants/presets.js +31 -0
- package/lib/v1/Tab/context.js +30 -0
- package/lib/v1/Tab/core/Tab.js +88 -0
- package/lib/v1/Tab/core/TabList.js +82 -0
- package/lib/v1/Tab/core/TabListFocusScope.js +28 -0
- package/lib/v1/Tab/core/TabPanel.js +85 -0
- package/lib/v1/Tab/core/Tabs.js +63 -0
- package/lib/v1/Tab/core/index.js +109 -0
- package/lib/v1/Tab/css/Tab_v1.module.css +369 -0
- package/lib/v1/Tab/css/cssJSLogic.js +25 -0
- package/lib/v1/Tab/css/tab.cva.js +173 -0
- package/lib/v1/Tab/index.js +141 -0
- package/lib/v1/Tab/props/defaultProps.js +69 -0
- package/lib/v1/Tab/props/propTypes.js +240 -0
- package/lib/v1/Tab/utils/pinSelectedTab.js +59 -0
- package/lib/v1/shared/Spinner/Spinner_v1.module.css +3 -5
- package/lib/v1/shared/SuccessTick/SuccessTick_v1.module.css +1 -2
- package/package.json +25 -21
- package/tsconfig.jest.json +5 -0
- package/tsconfig.json +9 -0
- package/ut.config.js +2 -1
|
@@ -1,6 +1,87 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
|
-
exports[`Heading
|
|
3
|
+
exports[`Heading Render with a11y 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<h1
|
|
6
|
+
class="reset"
|
|
7
|
+
tabindex="0"
|
|
8
|
+
/>
|
|
9
|
+
</DocumentFragment>
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
exports[`Heading Render with className 1`] = `
|
|
13
|
+
<DocumentFragment>
|
|
14
|
+
<h1
|
|
15
|
+
class="reset custom-heading-class"
|
|
16
|
+
/>
|
|
17
|
+
</DocumentFragment>
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
exports[`Heading Render with dataId 1`] = `
|
|
21
|
+
<DocumentFragment>
|
|
22
|
+
<h1
|
|
23
|
+
class="reset"
|
|
24
|
+
data-id="customHeading"
|
|
25
|
+
data-test-id="customHeading"
|
|
26
|
+
/>
|
|
27
|
+
</DocumentFragment>
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
exports[`Heading Render with dataTitle overriding title 1`] = `
|
|
31
|
+
<DocumentFragment>
|
|
32
|
+
<h1
|
|
33
|
+
class="reset"
|
|
34
|
+
data-title="Custom Data Title"
|
|
35
|
+
>
|
|
36
|
+
Heading Title
|
|
37
|
+
</h1>
|
|
38
|
+
</DocumentFragment>
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
exports[`Heading Render with default props 1`] = `
|
|
42
|
+
<DocumentFragment>
|
|
43
|
+
<h1
|
|
44
|
+
class="reset"
|
|
45
|
+
/>
|
|
46
|
+
</DocumentFragment>
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
exports[`Heading Render with tagName as h2 1`] = `
|
|
50
|
+
<DocumentFragment>
|
|
51
|
+
<h2
|
|
52
|
+
class="reset"
|
|
53
|
+
/>
|
|
54
|
+
</DocumentFragment>
|
|
55
|
+
`;
|
|
56
|
+
|
|
57
|
+
exports[`Heading Render with tagName as h3 1`] = `
|
|
58
|
+
<DocumentFragment>
|
|
59
|
+
<h3
|
|
60
|
+
class="reset"
|
|
61
|
+
/>
|
|
62
|
+
</DocumentFragment>
|
|
63
|
+
`;
|
|
64
|
+
|
|
65
|
+
exports[`Heading Render with tagName as span 1`] = `
|
|
66
|
+
<DocumentFragment>
|
|
67
|
+
<span
|
|
68
|
+
class="reset"
|
|
69
|
+
/>
|
|
70
|
+
</DocumentFragment>
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
exports[`Heading Render with title 1`] = `
|
|
74
|
+
<DocumentFragment>
|
|
75
|
+
<h1
|
|
76
|
+
class="reset"
|
|
77
|
+
data-title="Heading Title"
|
|
78
|
+
>
|
|
79
|
+
Heading Title
|
|
80
|
+
</h1>
|
|
81
|
+
</DocumentFragment>
|
|
82
|
+
`;
|
|
83
|
+
|
|
84
|
+
exports[`Heading Render with whiteSpace as break-spaces 1`] = `
|
|
4
85
|
<DocumentFragment>
|
|
5
86
|
<h1
|
|
6
87
|
class="reset whiteSpace_breakSpaces"
|
|
@@ -9,7 +90,7 @@ exports[`Heading Should render whiteSpace of Heading - break-spaces 1`] = `
|
|
|
9
90
|
</DocumentFragment>
|
|
10
91
|
`;
|
|
11
92
|
|
|
12
|
-
exports[`Heading
|
|
93
|
+
exports[`Heading Render with whiteSpace as normal 1`] = `
|
|
13
94
|
<DocumentFragment>
|
|
14
95
|
<h1
|
|
15
96
|
class="reset whiteSpace_normal"
|
|
@@ -18,7 +99,7 @@ exports[`Heading Should render whiteSpace of Heading - normal 1`] = `
|
|
|
18
99
|
</DocumentFragment>
|
|
19
100
|
`;
|
|
20
101
|
|
|
21
|
-
exports[`Heading
|
|
102
|
+
exports[`Heading Render with whiteSpace as nowrap 1`] = `
|
|
22
103
|
<DocumentFragment>
|
|
23
104
|
<h1
|
|
24
105
|
class="reset whiteSpace_nowrap"
|
|
@@ -27,7 +108,7 @@ exports[`Heading Should render whiteSpace of Heading - nowrap 1`] = `
|
|
|
27
108
|
</DocumentFragment>
|
|
28
109
|
`;
|
|
29
110
|
|
|
30
|
-
exports[`Heading
|
|
111
|
+
exports[`Heading Render with whiteSpace as pre 1`] = `
|
|
31
112
|
<DocumentFragment>
|
|
32
113
|
<h1
|
|
33
114
|
class="reset whiteSpace_pre"
|
|
@@ -36,7 +117,7 @@ exports[`Heading Should render whiteSpace of Heading - pre 1`] = `
|
|
|
36
117
|
</DocumentFragment>
|
|
37
118
|
`;
|
|
38
119
|
|
|
39
|
-
exports[`Heading
|
|
120
|
+
exports[`Heading Render with whiteSpace as pre-line 1`] = `
|
|
40
121
|
<DocumentFragment>
|
|
41
122
|
<h1
|
|
42
123
|
class="reset whiteSpace_preLine"
|
|
@@ -45,7 +126,7 @@ exports[`Heading Should render whiteSpace of Heading - pre-line 1`] = `
|
|
|
45
126
|
</DocumentFragment>
|
|
46
127
|
`;
|
|
47
128
|
|
|
48
|
-
exports[`Heading
|
|
129
|
+
exports[`Heading Render with whiteSpace as pre-wrap 1`] = `
|
|
49
130
|
<DocumentFragment>
|
|
50
131
|
<h1
|
|
51
132
|
class="reset whiteSpace_preWrap"
|
|
@@ -53,11 +134,3 @@ exports[`Heading Should render whiteSpace of Heading - pre-wrap 1`] = `
|
|
|
53
134
|
/>
|
|
54
135
|
</DocumentFragment>
|
|
55
136
|
`;
|
|
56
|
-
|
|
57
|
-
exports[`Heading rendering the defult props 1`] = `
|
|
58
|
-
<DocumentFragment>
|
|
59
|
-
<h1
|
|
60
|
-
class="reset"
|
|
61
|
-
/>
|
|
62
|
-
</DocumentFragment>
|
|
63
|
-
`;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
/* css:lineheight-validation:ignore */
|
|
10
10
|
.label {
|
|
11
11
|
composes: varClass;
|
|
12
|
-
|
|
12
|
+
composes: d-align-middle from global;
|
|
13
13
|
line-height: var(--label_line_height);
|
|
14
14
|
font-size: var(--label_font_size);
|
|
15
15
|
color: var(--label_text_color);
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
--label_cursor: default;
|
|
41
41
|
}
|
|
42
42
|
.title {
|
|
43
|
-
|
|
43
|
+
composes: d-block from global;
|
|
44
44
|
}
|
|
45
45
|
.subtitle {
|
|
46
|
-
|
|
46
|
+
composes: d-inline-block from global;
|
|
47
47
|
}
|
|
48
48
|
.font_default {
|
|
49
49
|
--label_font_weight: var(--zd-fw-normal);
|
|
@@ -28,18 +28,15 @@
|
|
|
28
28
|
}
|
|
29
29
|
.list {
|
|
30
30
|
composes: varClass;
|
|
31
|
-
|
|
31
|
+
composes: d-relative d-border-solid d-cursor-pointer d-no-underline from global;
|
|
32
32
|
list-style: none;
|
|
33
33
|
color: var(--listitem_text_color);
|
|
34
34
|
font-size: var(--listitem_font_size);
|
|
35
35
|
height: var(--listitem_height);
|
|
36
36
|
min-height: var(--listitem_min_height);
|
|
37
|
-
text-decoration: none;
|
|
38
37
|
padding: var(--listitem_padding);
|
|
39
38
|
border-width: var(--listitem_border_width);
|
|
40
|
-
border-style: solid;
|
|
41
39
|
border-color: var(--listitem_border_color);
|
|
42
|
-
cursor: pointer;
|
|
43
40
|
}
|
|
44
41
|
.list, .default, .secondary {
|
|
45
42
|
background-color: var(--listitem_bg_color);
|
|
@@ -93,9 +90,9 @@
|
|
|
93
90
|
composes: dflex from '../common/common.module.css';
|
|
94
91
|
}
|
|
95
92
|
.iconBox {
|
|
93
|
+
composes: d-text-center from global;
|
|
96
94
|
width: var(--zd_size20) ;
|
|
97
95
|
margin-inline-end: var(--zd_size10) ;
|
|
98
|
-
text-align: center;
|
|
99
96
|
}
|
|
100
97
|
.iconBox,
|
|
101
98
|
.leftAvatar {
|
|
@@ -126,22 +123,21 @@
|
|
|
126
123
|
composes: justifyFend from '../common/common.module.css';
|
|
127
124
|
}
|
|
128
125
|
.selfAlign_center{
|
|
129
|
-
|
|
126
|
+
composes: d-self-center from global;
|
|
130
127
|
}
|
|
131
128
|
|
|
132
129
|
.contentWrapper {
|
|
133
130
|
composes: dflex flexrow from '../common/common.module.css';
|
|
134
|
-
|
|
135
|
-
width: 100% ;
|
|
131
|
+
composes: d-items-stretch d-w-full from global;
|
|
136
132
|
}
|
|
137
133
|
.alignLhsBox_end {
|
|
138
|
-
|
|
134
|
+
composes: d-items-end from global;
|
|
139
135
|
}
|
|
140
136
|
.alignLhsBox_center {
|
|
141
|
-
|
|
137
|
+
composes: d-items-center from global;
|
|
142
138
|
}
|
|
143
139
|
.lhsBoxInner{
|
|
144
|
-
|
|
140
|
+
composes: d-h-full from global;
|
|
145
141
|
max-height: calc((var(--listitem_font_size) * var(--listitem_multiline_lineheight)) * 2 );
|
|
146
142
|
}
|
|
147
143
|
.defaultHover, .primaryHover, .dangerHover, .secondaryHover, .darkHover {
|
|
@@ -225,7 +221,7 @@
|
|
|
225
221
|
.tickIcon,
|
|
226
222
|
.defaultTick,
|
|
227
223
|
.darkTick {
|
|
228
|
-
|
|
224
|
+
composes: d-absolute from global;
|
|
229
225
|
color: var(--listitem_tickicon_color);
|
|
230
226
|
top:50% ;
|
|
231
227
|
font-size: 0 ;
|
|
@@ -281,5 +277,5 @@
|
|
|
281
277
|
}
|
|
282
278
|
|
|
283
279
|
.titleBox {
|
|
284
|
-
|
|
280
|
+
composes: d-items-stretch from global;
|
|
285
281
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
2
|
+
import { render, cleanup } from '@testing-library/react';
|
|
3
3
|
import ListContainer from "../ListContainer";
|
|
4
4
|
describe('ListContainer', () => {
|
|
5
|
+
afterEach(() => cleanup());
|
|
5
6
|
test('rendering the defult props', () => {
|
|
6
7
|
const {
|
|
7
8
|
asFragment
|
|
@@ -16,4 +17,230 @@ describe('ListContainer', () => {
|
|
|
16
17
|
}));
|
|
17
18
|
expect(asFragment()).toMatchSnapshot();
|
|
18
19
|
});
|
|
20
|
+
const palettes = ['primary', 'secondary', 'dark', 'danger']; // primary and danger add no class until active/highlight/autoHover, so danger would match primary here
|
|
21
|
+
|
|
22
|
+
const inertPalettes = ['primary', 'secondary', 'dark'];
|
|
23
|
+
const sizes = ['small', 'large'];
|
|
24
|
+
const aligns = ['horizontal', 'both', 'top', 'right', 'bottom', 'left', 'between', 'around'];
|
|
25
|
+
test.each(inertPalettes)('Render with palette as %s', palette => {
|
|
26
|
+
const {
|
|
27
|
+
asFragment
|
|
28
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
29
|
+
palette: palette
|
|
30
|
+
}));
|
|
31
|
+
expect(asFragment()).toMatchSnapshot();
|
|
32
|
+
});
|
|
33
|
+
test.each(sizes)('Render with size as %s', size => {
|
|
34
|
+
const {
|
|
35
|
+
asFragment
|
|
36
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
37
|
+
size: size
|
|
38
|
+
}));
|
|
39
|
+
expect(asFragment()).toMatchSnapshot();
|
|
40
|
+
});
|
|
41
|
+
test.each(aligns)('Render with align as %s', align => {
|
|
42
|
+
const {
|
|
43
|
+
asFragment
|
|
44
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
45
|
+
align: align
|
|
46
|
+
}));
|
|
47
|
+
expect(asFragment()).toMatchSnapshot();
|
|
48
|
+
});
|
|
49
|
+
test.each(palettes)('Render with active and palette as %s', palette => {
|
|
50
|
+
const {
|
|
51
|
+
asFragment
|
|
52
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
53
|
+
active: true,
|
|
54
|
+
palette: palette
|
|
55
|
+
}));
|
|
56
|
+
expect(asFragment()).toMatchSnapshot();
|
|
57
|
+
});
|
|
58
|
+
test.each(palettes)('Render with highlight and palette as %s', palette => {
|
|
59
|
+
const {
|
|
60
|
+
asFragment
|
|
61
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
62
|
+
highlight: true,
|
|
63
|
+
palette: palette
|
|
64
|
+
}));
|
|
65
|
+
expect(asFragment()).toMatchSnapshot();
|
|
66
|
+
});
|
|
67
|
+
test.each(palettes)('Render with autoHover and palette as %s', palette => {
|
|
68
|
+
const {
|
|
69
|
+
asFragment
|
|
70
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
71
|
+
autoHover: true,
|
|
72
|
+
palette: palette
|
|
73
|
+
}));
|
|
74
|
+
expect(asFragment()).toMatchSnapshot();
|
|
75
|
+
});
|
|
76
|
+
test.each(sizes)('Render with needTick and size as %s', size => {
|
|
77
|
+
const {
|
|
78
|
+
asFragment
|
|
79
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
80
|
+
needTick: true,
|
|
81
|
+
size: size
|
|
82
|
+
}));
|
|
83
|
+
expect(asFragment()).toMatchSnapshot();
|
|
84
|
+
});
|
|
85
|
+
test('Render with active', () => {
|
|
86
|
+
const {
|
|
87
|
+
asFragment
|
|
88
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
89
|
+
active: true
|
|
90
|
+
}));
|
|
91
|
+
expect(asFragment()).toMatchSnapshot();
|
|
92
|
+
});
|
|
93
|
+
test('Render with active and needBorder=false', () => {
|
|
94
|
+
const {
|
|
95
|
+
asFragment
|
|
96
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
97
|
+
active: true,
|
|
98
|
+
needBorder: false
|
|
99
|
+
}));
|
|
100
|
+
expect(asFragment()).toMatchSnapshot();
|
|
101
|
+
});
|
|
102
|
+
test('Render with highlight', () => {
|
|
103
|
+
const {
|
|
104
|
+
asFragment
|
|
105
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
106
|
+
highlight: true
|
|
107
|
+
}));
|
|
108
|
+
expect(asFragment()).toMatchSnapshot();
|
|
109
|
+
});
|
|
110
|
+
test('Render with autoHover', () => {
|
|
111
|
+
const {
|
|
112
|
+
asFragment
|
|
113
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
114
|
+
autoHover: true
|
|
115
|
+
}));
|
|
116
|
+
expect(asFragment()).toMatchSnapshot();
|
|
117
|
+
});
|
|
118
|
+
test('Render with highlight, autoHover and isDisabled', () => {
|
|
119
|
+
const {
|
|
120
|
+
asFragment
|
|
121
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
122
|
+
highlight: true,
|
|
123
|
+
autoHover: true,
|
|
124
|
+
isDisabled: true
|
|
125
|
+
}));
|
|
126
|
+
expect(asFragment()).toMatchSnapshot();
|
|
127
|
+
});
|
|
128
|
+
test('Render with needTick', () => {
|
|
129
|
+
const {
|
|
130
|
+
asFragment
|
|
131
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
132
|
+
needTick: true
|
|
133
|
+
}));
|
|
134
|
+
expect(asFragment()).toMatchSnapshot();
|
|
135
|
+
});
|
|
136
|
+
test('Render with needBorder=false', () => {
|
|
137
|
+
const {
|
|
138
|
+
asFragment
|
|
139
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
140
|
+
needBorder: false
|
|
141
|
+
}));
|
|
142
|
+
expect(asFragment()).toMatchSnapshot();
|
|
143
|
+
});
|
|
144
|
+
test('Render with title', () => {
|
|
145
|
+
const {
|
|
146
|
+
asFragment
|
|
147
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
148
|
+
title: "List container title"
|
|
149
|
+
}));
|
|
150
|
+
expect(asFragment()).toMatchSnapshot();
|
|
151
|
+
});
|
|
152
|
+
test('Render with isDisabled and disableTitle', () => {
|
|
153
|
+
const {
|
|
154
|
+
asFragment
|
|
155
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
156
|
+
isDisabled: true,
|
|
157
|
+
title: "List container title",
|
|
158
|
+
disableTitle: "Disabled title"
|
|
159
|
+
}));
|
|
160
|
+
expect(asFragment()).toMatchSnapshot();
|
|
161
|
+
});
|
|
162
|
+
test('Render with isLink and href', () => {
|
|
163
|
+
const {
|
|
164
|
+
asFragment
|
|
165
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
166
|
+
isLink: true,
|
|
167
|
+
href: "/list-container"
|
|
168
|
+
}));
|
|
169
|
+
expect(asFragment()).toMatchSnapshot();
|
|
170
|
+
});
|
|
171
|
+
test('Render with isLink, href and target as self', () => {
|
|
172
|
+
const {
|
|
173
|
+
asFragment
|
|
174
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
175
|
+
isLink: true,
|
|
176
|
+
href: "/list-container",
|
|
177
|
+
target: "self"
|
|
178
|
+
}));
|
|
179
|
+
expect(asFragment()).toMatchSnapshot();
|
|
180
|
+
});
|
|
181
|
+
test('Render with customClass', () => {
|
|
182
|
+
const {
|
|
183
|
+
asFragment
|
|
184
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
185
|
+
customClass: "custom-list-container"
|
|
186
|
+
}));
|
|
187
|
+
expect(asFragment()).toMatchSnapshot();
|
|
188
|
+
});
|
|
189
|
+
test('Render with dataId and dataSelectorId', () => {
|
|
190
|
+
const {
|
|
191
|
+
asFragment
|
|
192
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
193
|
+
dataId: "list-container-dataId",
|
|
194
|
+
dataSelectorId: "list-container-dataSelectorId"
|
|
195
|
+
}));
|
|
196
|
+
expect(asFragment()).toMatchSnapshot();
|
|
197
|
+
});
|
|
198
|
+
test('Render with a11y role, ariaSelected and ariaLabel', () => {
|
|
199
|
+
const {
|
|
200
|
+
asFragment
|
|
201
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
202
|
+
a11y: {
|
|
203
|
+
role: 'option',
|
|
204
|
+
ariaSelected: true,
|
|
205
|
+
ariaLabel: 'List container label'
|
|
206
|
+
}
|
|
207
|
+
}));
|
|
208
|
+
expect(asFragment()).toMatchSnapshot();
|
|
209
|
+
});
|
|
210
|
+
test('Render with a11y insetFocus=false', () => {
|
|
211
|
+
const {
|
|
212
|
+
asFragment
|
|
213
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
214
|
+
a11y: {
|
|
215
|
+
insetFocus: false
|
|
216
|
+
}
|
|
217
|
+
}));
|
|
218
|
+
expect(asFragment()).toMatchSnapshot();
|
|
219
|
+
});
|
|
220
|
+
test('Render with a11y extra attributes', () => {
|
|
221
|
+
const {
|
|
222
|
+
asFragment
|
|
223
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
224
|
+
a11y: {
|
|
225
|
+
'aria-describedby': 'list-container-description'
|
|
226
|
+
}
|
|
227
|
+
}));
|
|
228
|
+
expect(asFragment()).toMatchSnapshot();
|
|
229
|
+
});
|
|
230
|
+
test('Render with customProps', () => {
|
|
231
|
+
const {
|
|
232
|
+
asFragment
|
|
233
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, {
|
|
234
|
+
customProps: {
|
|
235
|
+
'data-custom-attr': 'true'
|
|
236
|
+
}
|
|
237
|
+
}));
|
|
238
|
+
expect(asFragment()).toMatchSnapshot();
|
|
239
|
+
});
|
|
240
|
+
test('Render with children', () => {
|
|
241
|
+
const {
|
|
242
|
+
asFragment
|
|
243
|
+
} = render( /*#__PURE__*/React.createElement(ListContainer, null, /*#__PURE__*/React.createElement("span", null, "List container content")));
|
|
244
|
+
expect(asFragment()).toMatchSnapshot();
|
|
245
|
+
});
|
|
19
246
|
});
|