@patternfly/react-core 6.2.1-prerelease.9 → 6.2.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/CHANGELOG.md +11 -13
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/AboutModal/package.json +1 -1
- package/dist/dynamic/components/Accordion/package.json +1 -1
- package/dist/dynamic/components/ActionList/package.json +1 -1
- package/dist/dynamic/components/Alert/package.json +1 -1
- package/dist/dynamic/components/Avatar/package.json +1 -1
- package/dist/dynamic/components/BackToTop/package.json +1 -1
- package/dist/dynamic/components/Backdrop/package.json +1 -1
- package/dist/dynamic/components/BackgroundImage/package.json +1 -1
- package/dist/dynamic/components/Badge/package.json +1 -1
- package/dist/dynamic/components/Banner/package.json +1 -1
- package/dist/dynamic/components/Brand/package.json +1 -1
- package/dist/dynamic/components/Breadcrumb/package.json +1 -1
- package/dist/dynamic/components/Button/package.json +1 -1
- package/dist/dynamic/components/CalendarMonth/package.json +1 -1
- package/dist/dynamic/components/Card/package.json +1 -1
- package/dist/dynamic/components/Checkbox/package.json +1 -1
- package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/Content/package.json +1 -1
- package/dist/dynamic/components/DataList/package.json +1 -1
- package/dist/dynamic/components/DatePicker/package.json +1 -1
- package/dist/dynamic/components/DescriptionList/package.json +1 -1
- package/dist/dynamic/components/Divider/package.json +1 -1
- package/dist/dynamic/components/Drawer/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/components/EmptyState/package.json +1 -1
- package/dist/dynamic/components/ExpandableSection/package.json +1 -1
- package/dist/dynamic/components/FileUpload/package.json +1 -1
- package/dist/dynamic/components/Form/package.json +1 -1
- package/dist/dynamic/components/FormSelect/package.json +1 -1
- package/dist/dynamic/components/HelperText/package.json +1 -1
- package/dist/dynamic/components/Hint/package.json +1 -1
- package/dist/dynamic/components/Icon/package.json +1 -1
- package/dist/dynamic/components/InputGroup/package.json +1 -1
- package/dist/dynamic/components/JumpLinks/package.json +1 -1
- package/dist/dynamic/components/Label/package.json +1 -1
- package/dist/dynamic/components/List/package.json +1 -1
- package/dist/dynamic/components/LoginPage/package.json +1 -1
- package/dist/dynamic/components/Masthead/package.json +1 -1
- package/dist/dynamic/components/Menu/package.json +1 -1
- package/dist/dynamic/components/MenuToggle/package.json +1 -1
- package/dist/dynamic/components/Modal/package.json +1 -1
- package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
- package/dist/dynamic/components/Nav/package.json +1 -1
- package/dist/dynamic/components/NotificationBadge/package.json +1 -1
- package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
- package/dist/dynamic/components/NumberInput/package.json +1 -1
- package/dist/dynamic/components/OverflowMenu/package.json +1 -1
- package/dist/dynamic/components/Page/package.json +1 -1
- package/dist/dynamic/components/Pagination/package.json +1 -1
- package/dist/dynamic/components/Panel/package.json +1 -1
- package/dist/dynamic/components/Popover/package.json +1 -1
- package/dist/dynamic/components/Progress/package.json +1 -1
- package/dist/dynamic/components/ProgressStepper/package.json +1 -1
- package/dist/dynamic/components/Radio/package.json +1 -1
- package/dist/dynamic/components/SearchInput/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/dist/dynamic/components/Sidebar/package.json +1 -1
- package/dist/dynamic/components/SimpleList/package.json +1 -1
- package/dist/dynamic/components/Skeleton/package.json +1 -1
- package/dist/dynamic/components/SkipToContent/package.json +1 -1
- package/dist/dynamic/components/Slider/package.json +1 -1
- package/dist/dynamic/components/Spinner/package.json +1 -1
- package/dist/dynamic/components/Switch/package.json +1 -1
- package/dist/dynamic/components/Tabs/package.json +1 -1
- package/dist/dynamic/components/TextArea/package.json +1 -1
- package/dist/dynamic/components/TextInput/package.json +1 -1
- package/dist/dynamic/components/TextInputGroup/package.json +1 -1
- package/dist/dynamic/components/TimePicker/package.json +1 -1
- package/dist/dynamic/components/Timestamp/package.json +1 -1
- package/dist/dynamic/components/Title/package.json +1 -1
- package/dist/dynamic/components/ToggleGroup/package.json +1 -1
- package/dist/dynamic/components/Toolbar/package.json +1 -1
- package/dist/dynamic/components/Tooltip/package.json +1 -1
- package/dist/dynamic/components/TreeView/package.json +1 -1
- package/dist/dynamic/components/Truncate/package.json +1 -1
- package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
- package/dist/dynamic/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
- package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
- package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
- package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
- package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
- package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
- package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
- package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
- package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
- package/dist/dynamic/helpers/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/fileUtils/package.json +1 -1
- package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
- package/dist/dynamic/helpers/package.json +1 -1
- package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
- package/dist/dynamic/helpers/typeUtils/package.json +1 -1
- package/dist/dynamic/helpers/useInterval/package.json +1 -1
- package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
- package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
- package/dist/dynamic/helpers/util/package.json +1 -1
- package/dist/dynamic/layouts/Bullseye/package.json +1 -1
- package/dist/dynamic/layouts/Flex/package.json +1 -1
- package/dist/dynamic/layouts/Gallery/package.json +1 -1
- package/dist/dynamic/layouts/Grid/package.json +1 -1
- package/dist/dynamic/layouts/Level/package.json +1 -1
- package/dist/dynamic/layouts/Split/package.json +1 -1
- package/dist/dynamic/layouts/Stack/package.json +1 -1
- package/dist/dynamic/styles/package.json +1 -1
- package/dist/esm/components/Divider/Divider.d.ts +0 -2
- package/dist/esm/components/Divider/Divider.d.ts.map +1 -1
- package/dist/esm/components/Divider/Divider.js +2 -2
- package/dist/esm/components/Divider/Divider.js.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
- package/dist/esm/components/Form/FormFieldGroup.d.ts +1 -1
- package/dist/esm/components/Form/FormFieldGroup.d.ts.map +1 -1
- package/dist/esm/components/Form/FormFieldGroupExpandable.d.ts +1 -1
- package/dist/esm/components/Form/FormFieldGroupExpandable.d.ts.map +1 -1
- package/dist/esm/components/Form/InternalFormFieldGroup.d.ts +1 -1
- package/dist/esm/components/Form/InternalFormFieldGroup.d.ts.map +1 -1
- package/dist/esm/components/List/List.d.ts.map +1 -1
- package/dist/esm/components/List/List.js +2 -2
- package/dist/esm/components/List/List.js.map +1 -1
- package/dist/esm/components/List/ListItem.d.ts +2 -4
- package/dist/esm/components/List/ListItem.d.ts.map +1 -1
- package/dist/esm/components/List/ListItem.js +2 -2
- package/dist/esm/components/List/ListItem.js.map +1 -1
- package/dist/esm/components/Nav/Nav.d.ts +1 -1
- package/dist/esm/components/Nav/Nav.d.ts.map +1 -1
- package/dist/esm/components/Nav/NavItemSeparator.d.ts.map +1 -1
- package/dist/esm/components/Nav/NavItemSeparator.js +2 -2
- package/dist/esm/components/Nav/NavItemSeparator.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.d.ts +1 -1
- package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.d.ts +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.js +3 -4
- package/dist/esm/components/Toolbar/ToolbarItem.js.map +1 -1
- package/dist/esm/components/Truncate/Truncate.d.ts +1 -11
- package/dist/esm/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/esm/components/Truncate/Truncate.js +6 -43
- package/dist/esm/components/Truncate/Truncate.js.map +1 -1
- package/dist/esm/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/js/components/Divider/Divider.d.ts +0 -2
- package/dist/js/components/Divider/Divider.d.ts.map +1 -1
- package/dist/js/components/Divider/Divider.js +2 -2
- package/dist/js/components/Divider/Divider.js.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
- package/dist/js/components/Form/FormFieldGroup.d.ts +1 -1
- package/dist/js/components/Form/FormFieldGroup.d.ts.map +1 -1
- package/dist/js/components/Form/FormFieldGroupExpandable.d.ts +1 -1
- package/dist/js/components/Form/FormFieldGroupExpandable.d.ts.map +1 -1
- package/dist/js/components/Form/InternalFormFieldGroup.d.ts +1 -1
- package/dist/js/components/Form/InternalFormFieldGroup.d.ts.map +1 -1
- package/dist/js/components/List/List.d.ts.map +1 -1
- package/dist/js/components/List/List.js +2 -2
- package/dist/js/components/List/List.js.map +1 -1
- package/dist/js/components/List/ListItem.d.ts +2 -4
- package/dist/js/components/List/ListItem.d.ts.map +1 -1
- package/dist/js/components/List/ListItem.js +2 -2
- package/dist/js/components/List/ListItem.js.map +1 -1
- package/dist/js/components/Nav/Nav.d.ts +1 -1
- package/dist/js/components/Nav/Nav.d.ts.map +1 -1
- package/dist/js/components/Nav/NavItemSeparator.d.ts.map +1 -1
- package/dist/js/components/Nav/NavItemSeparator.js +2 -2
- package/dist/js/components/Nav/NavItemSeparator.js.map +1 -1
- package/dist/js/components/Tabs/Tabs.d.ts +1 -1
- package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/js/components/Tabs/Tabs.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.d.ts +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarItem.js +3 -4
- package/dist/js/components/Toolbar/ToolbarItem.js.map +1 -1
- package/dist/js/components/Truncate/Truncate.d.ts +1 -11
- package/dist/js/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/js/components/Truncate/Truncate.js +5 -42
- package/dist/js/components/Truncate/Truncate.js.map +1 -1
- package/dist/js/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/umd/assets/{output-Dz39wdRo.css → output-AyA9e2xy.css} +14502 -14589
- package/dist/umd/react-core.min.js +3 -3
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +8 -8
- package/src/components/Alert/examples/Alert.md +3 -0
- package/src/components/DescriptionList/examples/DescriptionListAutoFitBasic.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthModified.tsx +1 -5
- package/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthResponsive.tsx +1 -5
- package/src/components/DescriptionList/examples/DescriptionListBasic.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListColumnFill.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListCompact.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListCompactHorizontal.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListDefaultAutoColumn.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListDefaultInlineGrid.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListDefaultResponsiveColumns.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListDefaultThreeColLg.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListDefaultTwoCol.tsx +0 -1
- package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardHorizontalTermWidth.tsx +1 -7
- package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardThreeColumn.tsx +1 -5
- package/src/components/DescriptionList/examples/DescriptionListFluidHorizontal.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListHorizontal.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListHorizontalAutoColumn.tsx +1 -6
- package/src/components/DescriptionList/examples/DescriptionListHorizontalCustomTermWidth.tsx +0 -1
- package/src/components/DescriptionList/examples/DescriptionListHorizontalResponsiveColumns.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListHorizontalThreeColLg.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListHorizontalTwoCol.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListIconsOnTerms.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListResponsiveHoriVertGroup.tsx +0 -1
- package/src/components/DescriptionList/examples/DescriptionListWithCard.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySize.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySizeAndCard.tsx +1 -5
- package/src/components/DescriptionList/examples/DescriptionListWithTermHelpText.tsx +1 -1
- package/src/components/Divider/Divider.tsx +1 -4
- package/src/components/Divider/__tests__/Divider.test.tsx +0 -10
- package/src/components/DualListSelector/examples/DualListSelectorBasicSearch.tsx +0 -1
- package/src/components/DualListSelector/examples/DualListSelectorComplexOptionsActions.tsx +0 -1
- package/src/components/DualListSelector/examples/DualListSelectorTree.tsx +0 -1
- package/src/components/ExpandableSection/ExpandableSection.tsx +1 -1
- package/src/components/ExpandableSection/ExpandableSectionToggle.tsx +1 -1
- package/src/components/Form/FormFieldGroup.tsx +1 -1
- package/src/components/Form/FormFieldGroupExpandable.tsx +1 -1
- package/src/components/Form/InternalFormFieldGroup.tsx +1 -1
- package/src/components/List/List.tsx +0 -3
- package/src/components/List/ListItem.tsx +4 -7
- package/src/components/List/__tests__/Generated/ListItem.test.tsx +12 -0
- package/src/components/List/__tests__/Generated/__snapshots__/ListItem.test.tsx.snap +13 -0
- package/src/components/List/__tests__/List.test.tsx +101 -97
- package/src/components/List/__tests__/__snapshots__/List.test.tsx.snap +261 -4
- package/src/components/Nav/Nav.tsx +1 -1
- package/src/components/Nav/NavItemSeparator.tsx +1 -2
- package/src/components/Progress/examples/ProgressTitleOutsideOfProgressBar.tsx +1 -1
- package/src/components/SearchInput/examples/SearchInputAdvanced.tsx +0 -1
- package/src/components/SearchInput/examples/SearchInputBasic.tsx +0 -1
- package/src/components/SearchInput/examples/SearchInputFocusSearch.tsx +1 -7
- package/src/components/SearchInput/examples/SearchInputWithExpandable.tsx +0 -1
- package/src/components/SearchInput/examples/SearchInputWithNavigableOptions.tsx +0 -1
- package/src/components/SearchInput/examples/SearchInputWithResultCount.tsx +0 -1
- package/src/components/SearchInput/examples/SearchInputWithSubmitButton.tsx +0 -1
- package/src/components/Tabs/Tabs.tsx +1 -3
- package/src/components/Toolbar/ToolbarGroup.tsx +1 -1
- package/src/components/Toolbar/ToolbarItem.tsx +1 -11
- package/src/components/Truncate/Truncate.tsx +22 -109
- package/src/components/Truncate/__tests__/Truncate.test.tsx +2 -70
- package/src/components/Truncate/__tests__/__snapshots__/Truncate.test.tsx.snap +0 -37
- package/src/components/Truncate/examples/Truncate.md +36 -32
- package/src/components/Wizard/WizardNavInternal.tsx +1 -1
- package/src/components/Wizard/examples/WizardGetCurrentStep.tsx +1 -1
- package/src/demos/DescriptionList/examples/DescriptionListBasic.tsx +1 -1
- package/src/demos/DescriptionList/examples/DescriptionListInDrawer.tsx +1 -1
- package/src/demos/SearchInput/SearchInput.md +0 -2
- package/src/demos/examples/Card/CardDetails.tsx +2 -2
- package/src/demos/examples/Card/CardEventsView.tsx +1 -1
- package/src/demos/examples/Card/CardLogView.tsx +1 -1
- package/src/demos/examples/Card/CardStatusTabbed.tsx +3 -3
- package/src/components/List/__tests__/ListItem.test.tsx +0 -51
- package/src/components/List/__tests__/__snapshots__/ListItem.test.tsx.snap +0 -34
- package/src/components/Truncate/examples/TruncateCustomTooltipPosition.tsx +0 -10
- package/src/components/Truncate/examples/TruncateDefault.tsx +0 -7
- package/src/components/Truncate/examples/TruncateMaxChars.tsx +0 -27
- package/src/components/Truncate/examples/TruncateMiddle.tsx +0 -11
- package/src/components/Truncate/examples/TruncateStart.tsx +0 -7
|
@@ -1,113 +1,117 @@
|
|
|
1
1
|
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { List, ListVariant, ListComponent, OrderType } from '../List';
|
|
3
|
-
import styles from '@patternfly/react-styles/css/components/List/list';
|
|
4
|
-
|
|
5
|
-
describe('Shared tests between ol and ul lists', () => {
|
|
6
|
-
Object.values(ListComponent).forEach((component) => {
|
|
7
|
-
test(`Renders without children for ${component} list`, () => {
|
|
8
|
-
render(<List component={component}></List>);
|
|
9
|
-
|
|
10
|
-
expect(screen.getByRole('list')).toBeVisible();
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
test(`Renders children for ${component} list`, () => {
|
|
14
|
-
render(<List component={component}>Children content</List>);
|
|
15
|
-
|
|
16
|
-
expect(screen.getByRole('list')).toHaveTextContent('Children content');
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
test(`Renders with ${component} tag`, () => {
|
|
20
|
-
render(<List component={component}></List>);
|
|
21
|
-
|
|
22
|
-
expect(screen.getByRole('list').tagName).toBe(component.toUpperCase());
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
test(`Renders with only class ${styles.list} by default for ${component} list`, () => {
|
|
26
|
-
render(<List component={component}></List>);
|
|
27
|
-
|
|
28
|
-
expect(screen.getByRole('list')).toHaveClass(styles.list, { exact: true });
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
test(`Renders with custom class when className is passed for ${component} list`, () => {
|
|
32
|
-
render(<List component={component} className="custom-class"></List>);
|
|
33
|
-
|
|
34
|
-
expect(screen.getByRole('list')).toHaveClass('custom-class');
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
test(`Renders with variant class ${styles.modifiers.inline} when variant prop is inline for ${component} list`, () => {
|
|
38
|
-
render(<List component={component} variant={ListVariant.inline}></List>);
|
|
39
|
-
|
|
40
|
-
expect(screen.getByRole('list')).toHaveClass(styles.modifiers.inline);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
test(`Renders with class ${styles.modifiers.bordered} when isBordered is true for ${component} list`, () => {
|
|
44
|
-
render(<List component={component} isBordered></List>);
|
|
45
|
-
|
|
46
|
-
expect(screen.getByRole('list')).toHaveClass(styles.modifiers.bordered);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
test(`Renders with class ${styles.modifiers.plain} when isPlain is true for ${component} list`, () => {
|
|
50
|
-
render(<List component={component} isPlain></List>);
|
|
51
|
-
|
|
52
|
-
expect(screen.getByRole('list')).toHaveClass(styles.modifiers.plain);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
test(`Renders with class ${styles.modifiers.iconLg} when iconSize is "large" for ${component} list`, () => {
|
|
56
|
-
render(<List component={component} iconSize="large"></List>);
|
|
57
2
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
3
|
+
import BookOpen from '@patternfly/react-icons/dist/esm/icons/book-open-icon';
|
|
4
|
+
import Key from '@patternfly/react-icons/dist/esm/icons/key-icon';
|
|
5
|
+
import Desktop from '@patternfly/react-icons/dist/esm/icons/desktop-icon';
|
|
6
|
+
import { List, ListVariant, ListComponent, OrderType } from '../List';
|
|
7
|
+
import { ListItem } from '../ListItem';
|
|
8
|
+
|
|
9
|
+
const ListItems = () => (
|
|
10
|
+
<List>
|
|
11
|
+
<ListItem>First</ListItem>
|
|
12
|
+
<ListItem>Second</ListItem>
|
|
13
|
+
<ListItem>Third</ListItem>
|
|
14
|
+
</List>
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
describe('List', () => {
|
|
18
|
+
test('simple list', () => {
|
|
19
|
+
const { asFragment } = render(
|
|
20
|
+
<List>
|
|
21
|
+
<ListItems />
|
|
22
|
+
</List>
|
|
23
|
+
);
|
|
24
|
+
expect(asFragment()).toMatchSnapshot();
|
|
25
|
+
});
|
|
81
26
|
|
|
82
|
-
|
|
83
|
-
}
|
|
27
|
+
test('inline list', () => {
|
|
28
|
+
const { asFragment } = render(
|
|
29
|
+
<List variant={ListVariant.inline}>
|
|
30
|
+
<ListItems />
|
|
31
|
+
</List>
|
|
32
|
+
);
|
|
33
|
+
expect(asFragment()).toMatchSnapshot();
|
|
34
|
+
});
|
|
84
35
|
|
|
85
|
-
|
|
86
|
-
|
|
36
|
+
test('ordered list', () => {
|
|
37
|
+
const { asFragment } = render(
|
|
38
|
+
<List component={ListComponent.ol}>
|
|
39
|
+
<ListItem>Apple</ListItem>
|
|
40
|
+
<ListItem>Banana</ListItem>
|
|
41
|
+
<ListItem>Orange</ListItem>
|
|
42
|
+
</List>
|
|
43
|
+
);
|
|
44
|
+
expect(asFragment()).toMatchSnapshot();
|
|
45
|
+
});
|
|
87
46
|
|
|
88
|
-
|
|
89
|
-
|
|
47
|
+
test('ordered list starts with 2nd item', () => {
|
|
48
|
+
render(
|
|
49
|
+
<List component={ListComponent.ol} start={2}>
|
|
50
|
+
<ListItem>Banana</ListItem>
|
|
51
|
+
<ListItem>Orange</ListItem>
|
|
52
|
+
</List>
|
|
53
|
+
);
|
|
54
|
+
expect(screen.getByRole('list')).toHaveAttribute('start', '2');
|
|
90
55
|
});
|
|
91
|
-
});
|
|
92
56
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
57
|
+
test('ordered list items will be numbered with uppercase letters', () => {
|
|
58
|
+
render(
|
|
59
|
+
<List component={ListComponent.ol} type={OrderType.uppercaseLetter}>
|
|
60
|
+
<ListItem>Banana</ListItem>
|
|
61
|
+
<ListItem>Orange</ListItem>
|
|
62
|
+
</List>
|
|
63
|
+
);
|
|
64
|
+
expect(screen.getByRole('list')).toHaveAttribute('type', 'A');
|
|
65
|
+
});
|
|
96
66
|
|
|
97
|
-
|
|
67
|
+
test('inlined ordered list', () => {
|
|
68
|
+
render(
|
|
69
|
+
<List variant={ListVariant.inline} component={ListComponent.ol}>
|
|
70
|
+
<ListItem>Apple</ListItem>
|
|
71
|
+
<ListItem>Banana</ListItem>
|
|
72
|
+
<ListItem>Orange</ListItem>
|
|
73
|
+
</List>
|
|
74
|
+
);
|
|
75
|
+
expect(screen.getByRole('list')).toHaveClass('pf-m-inline');
|
|
98
76
|
});
|
|
99
77
|
|
|
100
|
-
test(
|
|
101
|
-
render(
|
|
78
|
+
test('bordered list', () => {
|
|
79
|
+
render(
|
|
80
|
+
<List isBordered>
|
|
81
|
+
<ListItems />
|
|
82
|
+
</List>
|
|
83
|
+
);
|
|
84
|
+
expect(screen.getAllByRole('list')[0]).toHaveClass('pf-m-bordered');
|
|
85
|
+
});
|
|
102
86
|
|
|
103
|
-
|
|
87
|
+
test('plain list', () => {
|
|
88
|
+
render(
|
|
89
|
+
<List isPlain>
|
|
90
|
+
<ListItems />
|
|
91
|
+
</List>
|
|
92
|
+
);
|
|
93
|
+
expect(screen.getAllByRole('list')[0]).toHaveClass('pf-m-plain');
|
|
104
94
|
});
|
|
105
|
-
});
|
|
106
95
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
96
|
+
test('icon list', () => {
|
|
97
|
+
const { asFragment } = render(
|
|
98
|
+
<List isPlain>
|
|
99
|
+
<ListItem icon={<BookOpen />}>Apple</ListItem>
|
|
100
|
+
<ListItem icon={<Key />}>Banana</ListItem>
|
|
101
|
+
<ListItem icon={<Desktop />}>Orange</ListItem>
|
|
102
|
+
</List>
|
|
103
|
+
);
|
|
104
|
+
expect(asFragment()).toMatchSnapshot();
|
|
105
|
+
});
|
|
110
106
|
|
|
111
|
-
|
|
107
|
+
test('icon large list', () => {
|
|
108
|
+
const { asFragment } = render(
|
|
109
|
+
<List iconSize="large">
|
|
110
|
+
<ListItem icon={<BookOpen />}>Apple</ListItem>
|
|
111
|
+
<ListItem icon={<Key />}>Banana</ListItem>
|
|
112
|
+
<ListItem icon={<Desktop />}>Orange</ListItem>
|
|
113
|
+
</List>
|
|
114
|
+
);
|
|
115
|
+
expect(asFragment()).toMatchSnapshot();
|
|
112
116
|
});
|
|
113
117
|
});
|
|
@@ -1,18 +1,275 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`
|
|
3
|
+
exports[`List icon large list 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<ul
|
|
6
|
+
class="pf-v6-c-list pf-m-icon-lg"
|
|
7
|
+
>
|
|
8
|
+
<li
|
|
9
|
+
class="pf-v6-c-list__item"
|
|
10
|
+
>
|
|
11
|
+
<span
|
|
12
|
+
class="pf-v6-c-list__item-icon"
|
|
13
|
+
>
|
|
14
|
+
<svg
|
|
15
|
+
aria-hidden="true"
|
|
16
|
+
class="pf-v6-svg"
|
|
17
|
+
fill="currentColor"
|
|
18
|
+
height="1em"
|
|
19
|
+
role="img"
|
|
20
|
+
viewBox="0 0 576 512"
|
|
21
|
+
width="1em"
|
|
22
|
+
>
|
|
23
|
+
<path
|
|
24
|
+
d="M542.22 32.05c-54.8 3.11-163.72 14.43-230.96 55.59-4.64 2.84-7.27 7.89-7.27 13.17v363.87c0 11.55 12.63 18.85 23.28 13.49 69.18-34.82 169.23-44.32 218.7-46.92 16.89-.89 30.02-14.43 30.02-30.66V62.75c.01-17.71-15.35-31.74-33.77-30.7zM264.73 87.64C197.5 46.48 88.58 35.17 33.78 32.05 15.36 31.01 0 45.04 0 62.75V400.6c0 16.24 13.13 29.78 30.02 30.66 49.49 2.6 149.59 12.11 218.77 46.95 10.62 5.35 23.21-1.94 23.21-13.46V100.63c0-5.29-2.62-10.14-7.27-12.99z"
|
|
25
|
+
/>
|
|
26
|
+
</svg>
|
|
27
|
+
</span>
|
|
28
|
+
<span
|
|
29
|
+
class="pf-v6-c-list__item-text"
|
|
30
|
+
>
|
|
31
|
+
Apple
|
|
32
|
+
</span>
|
|
33
|
+
</li>
|
|
34
|
+
<li
|
|
35
|
+
class="pf-v6-c-list__item"
|
|
36
|
+
>
|
|
37
|
+
<span
|
|
38
|
+
class="pf-v6-c-list__item-icon"
|
|
39
|
+
>
|
|
40
|
+
<svg
|
|
41
|
+
aria-hidden="true"
|
|
42
|
+
class="pf-v6-svg"
|
|
43
|
+
fill="currentColor"
|
|
44
|
+
height="1em"
|
|
45
|
+
role="img"
|
|
46
|
+
viewBox="0 0 1024 1024"
|
|
47
|
+
width="1em"
|
|
48
|
+
>
|
|
49
|
+
<path
|
|
50
|
+
d="M802,320 C748.980664,320 706,277.019336 706,224 C706,170.980664 748.980664,128 802,128 C855.019336,128 898,170.980664 898,224 C898,277.019336 855.019336,320 802,320 M704,0 C527.3,0 384,143.3 384,320 C383.937788,357.490503 390.505571,394.696657 403.4,429.9 L0,824.1 L0,1024 L192,1024 L192,896 L320,896 L320,768 L448,768 L597,622 C596.906403,621.881923 596.838304,621.745723 596.8,621.6 C631.220126,633.811107 667.47802,640.034477 704,640 C880.7,640 1024,496.7 1024,320 C1024,143.3 880.7,0 704,0"
|
|
51
|
+
/>
|
|
52
|
+
</svg>
|
|
53
|
+
</span>
|
|
54
|
+
<span
|
|
55
|
+
class="pf-v6-c-list__item-text"
|
|
56
|
+
>
|
|
57
|
+
Banana
|
|
58
|
+
</span>
|
|
59
|
+
</li>
|
|
60
|
+
<li
|
|
61
|
+
class="pf-v6-c-list__item"
|
|
62
|
+
>
|
|
63
|
+
<span
|
|
64
|
+
class="pf-v6-c-list__item-icon"
|
|
65
|
+
>
|
|
66
|
+
<svg
|
|
67
|
+
aria-hidden="true"
|
|
68
|
+
class="pf-v6-svg"
|
|
69
|
+
fill="currentColor"
|
|
70
|
+
height="1em"
|
|
71
|
+
role="img"
|
|
72
|
+
viewBox="0 0 576 512"
|
|
73
|
+
width="1em"
|
|
74
|
+
>
|
|
75
|
+
<path
|
|
76
|
+
d="M528 0H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h192l-16 48h-72c-13.3 0-24 10.7-24 24s10.7 24 24 24h272c13.3 0 24-10.7 24-24s-10.7-24-24-24h-72l-16-48h192c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-16 352H64V64h448v288z"
|
|
77
|
+
/>
|
|
78
|
+
</svg>
|
|
79
|
+
</span>
|
|
80
|
+
<span
|
|
81
|
+
class="pf-v6-c-list__item-text"
|
|
82
|
+
>
|
|
83
|
+
Orange
|
|
84
|
+
</span>
|
|
85
|
+
</li>
|
|
86
|
+
</ul>
|
|
87
|
+
</DocumentFragment>
|
|
88
|
+
`;
|
|
89
|
+
|
|
90
|
+
exports[`List icon list 1`] = `
|
|
91
|
+
<DocumentFragment>
|
|
92
|
+
<ul
|
|
93
|
+
class="pf-v6-c-list pf-m-plain"
|
|
94
|
+
role="list"
|
|
95
|
+
>
|
|
96
|
+
<li
|
|
97
|
+
class="pf-v6-c-list__item"
|
|
98
|
+
>
|
|
99
|
+
<span
|
|
100
|
+
class="pf-v6-c-list__item-icon"
|
|
101
|
+
>
|
|
102
|
+
<svg
|
|
103
|
+
aria-hidden="true"
|
|
104
|
+
class="pf-v6-svg"
|
|
105
|
+
fill="currentColor"
|
|
106
|
+
height="1em"
|
|
107
|
+
role="img"
|
|
108
|
+
viewBox="0 0 576 512"
|
|
109
|
+
width="1em"
|
|
110
|
+
>
|
|
111
|
+
<path
|
|
112
|
+
d="M542.22 32.05c-54.8 3.11-163.72 14.43-230.96 55.59-4.64 2.84-7.27 7.89-7.27 13.17v363.87c0 11.55 12.63 18.85 23.28 13.49 69.18-34.82 169.23-44.32 218.7-46.92 16.89-.89 30.02-14.43 30.02-30.66V62.75c.01-17.71-15.35-31.74-33.77-30.7zM264.73 87.64C197.5 46.48 88.58 35.17 33.78 32.05 15.36 31.01 0 45.04 0 62.75V400.6c0 16.24 13.13 29.78 30.02 30.66 49.49 2.6 149.59 12.11 218.77 46.95 10.62 5.35 23.21-1.94 23.21-13.46V100.63c0-5.29-2.62-10.14-7.27-12.99z"
|
|
113
|
+
/>
|
|
114
|
+
</svg>
|
|
115
|
+
</span>
|
|
116
|
+
<span
|
|
117
|
+
class="pf-v6-c-list__item-text"
|
|
118
|
+
>
|
|
119
|
+
Apple
|
|
120
|
+
</span>
|
|
121
|
+
</li>
|
|
122
|
+
<li
|
|
123
|
+
class="pf-v6-c-list__item"
|
|
124
|
+
>
|
|
125
|
+
<span
|
|
126
|
+
class="pf-v6-c-list__item-icon"
|
|
127
|
+
>
|
|
128
|
+
<svg
|
|
129
|
+
aria-hidden="true"
|
|
130
|
+
class="pf-v6-svg"
|
|
131
|
+
fill="currentColor"
|
|
132
|
+
height="1em"
|
|
133
|
+
role="img"
|
|
134
|
+
viewBox="0 0 1024 1024"
|
|
135
|
+
width="1em"
|
|
136
|
+
>
|
|
137
|
+
<path
|
|
138
|
+
d="M802,320 C748.980664,320 706,277.019336 706,224 C706,170.980664 748.980664,128 802,128 C855.019336,128 898,170.980664 898,224 C898,277.019336 855.019336,320 802,320 M704,0 C527.3,0 384,143.3 384,320 C383.937788,357.490503 390.505571,394.696657 403.4,429.9 L0,824.1 L0,1024 L192,1024 L192,896 L320,896 L320,768 L448,768 L597,622 C596.906403,621.881923 596.838304,621.745723 596.8,621.6 C631.220126,633.811107 667.47802,640.034477 704,640 C880.7,640 1024,496.7 1024,320 C1024,143.3 880.7,0 704,0"
|
|
139
|
+
/>
|
|
140
|
+
</svg>
|
|
141
|
+
</span>
|
|
142
|
+
<span
|
|
143
|
+
class="pf-v6-c-list__item-text"
|
|
144
|
+
>
|
|
145
|
+
Banana
|
|
146
|
+
</span>
|
|
147
|
+
</li>
|
|
148
|
+
<li
|
|
149
|
+
class="pf-v6-c-list__item"
|
|
150
|
+
>
|
|
151
|
+
<span
|
|
152
|
+
class="pf-v6-c-list__item-icon"
|
|
153
|
+
>
|
|
154
|
+
<svg
|
|
155
|
+
aria-hidden="true"
|
|
156
|
+
class="pf-v6-svg"
|
|
157
|
+
fill="currentColor"
|
|
158
|
+
height="1em"
|
|
159
|
+
role="img"
|
|
160
|
+
viewBox="0 0 576 512"
|
|
161
|
+
width="1em"
|
|
162
|
+
>
|
|
163
|
+
<path
|
|
164
|
+
d="M528 0H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h192l-16 48h-72c-13.3 0-24 10.7-24 24s10.7 24 24 24h272c13.3 0 24-10.7 24-24s-10.7-24-24-24h-72l-16-48h192c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-16 352H64V64h448v288z"
|
|
165
|
+
/>
|
|
166
|
+
</svg>
|
|
167
|
+
</span>
|
|
168
|
+
<span
|
|
169
|
+
class="pf-v6-c-list__item-text"
|
|
170
|
+
>
|
|
171
|
+
Orange
|
|
172
|
+
</span>
|
|
173
|
+
</li>
|
|
174
|
+
</ul>
|
|
175
|
+
</DocumentFragment>
|
|
176
|
+
`;
|
|
177
|
+
|
|
178
|
+
exports[`List inline list 1`] = `
|
|
179
|
+
<DocumentFragment>
|
|
180
|
+
<ul
|
|
181
|
+
class="pf-v6-c-list pf-m-inline"
|
|
182
|
+
>
|
|
183
|
+
<ul
|
|
184
|
+
class="pf-v6-c-list"
|
|
185
|
+
>
|
|
186
|
+
<li
|
|
187
|
+
class=""
|
|
188
|
+
>
|
|
189
|
+
<span>
|
|
190
|
+
First
|
|
191
|
+
</span>
|
|
192
|
+
</li>
|
|
193
|
+
<li
|
|
194
|
+
class=""
|
|
195
|
+
>
|
|
196
|
+
<span>
|
|
197
|
+
Second
|
|
198
|
+
</span>
|
|
199
|
+
</li>
|
|
200
|
+
<li
|
|
201
|
+
class=""
|
|
202
|
+
>
|
|
203
|
+
<span>
|
|
204
|
+
Third
|
|
205
|
+
</span>
|
|
206
|
+
</li>
|
|
207
|
+
</ul>
|
|
208
|
+
</ul>
|
|
209
|
+
</DocumentFragment>
|
|
210
|
+
`;
|
|
211
|
+
|
|
212
|
+
exports[`List ordered list 1`] = `
|
|
4
213
|
<DocumentFragment>
|
|
5
214
|
<ol
|
|
6
215
|
class="pf-v6-c-list"
|
|
7
216
|
type="1"
|
|
8
|
-
|
|
217
|
+
>
|
|
218
|
+
<li
|
|
219
|
+
class=""
|
|
220
|
+
>
|
|
221
|
+
<span>
|
|
222
|
+
Apple
|
|
223
|
+
</span>
|
|
224
|
+
</li>
|
|
225
|
+
<li
|
|
226
|
+
class=""
|
|
227
|
+
>
|
|
228
|
+
<span>
|
|
229
|
+
Banana
|
|
230
|
+
</span>
|
|
231
|
+
</li>
|
|
232
|
+
<li
|
|
233
|
+
class=""
|
|
234
|
+
>
|
|
235
|
+
<span>
|
|
236
|
+
Orange
|
|
237
|
+
</span>
|
|
238
|
+
</li>
|
|
239
|
+
</ol>
|
|
9
240
|
</DocumentFragment>
|
|
10
241
|
`;
|
|
11
242
|
|
|
12
|
-
exports[`
|
|
243
|
+
exports[`List simple list 1`] = `
|
|
13
244
|
<DocumentFragment>
|
|
14
245
|
<ul
|
|
15
246
|
class="pf-v6-c-list"
|
|
16
|
-
|
|
247
|
+
>
|
|
248
|
+
<ul
|
|
249
|
+
class="pf-v6-c-list"
|
|
250
|
+
>
|
|
251
|
+
<li
|
|
252
|
+
class=""
|
|
253
|
+
>
|
|
254
|
+
<span>
|
|
255
|
+
First
|
|
256
|
+
</span>
|
|
257
|
+
</li>
|
|
258
|
+
<li
|
|
259
|
+
class=""
|
|
260
|
+
>
|
|
261
|
+
<span>
|
|
262
|
+
Second
|
|
263
|
+
</span>
|
|
264
|
+
</li>
|
|
265
|
+
<li
|
|
266
|
+
class=""
|
|
267
|
+
>
|
|
268
|
+
<span>
|
|
269
|
+
Third
|
|
270
|
+
</span>
|
|
271
|
+
</li>
|
|
272
|
+
</ul>
|
|
273
|
+
</ul>
|
|
17
274
|
</DocumentFragment>
|
|
18
275
|
`;
|
|
@@ -10,7 +10,7 @@ export type NavSelectClickHandler = (
|
|
|
10
10
|
to: string
|
|
11
11
|
) => void;
|
|
12
12
|
export interface NavProps
|
|
13
|
-
extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, 'onSelect'
|
|
13
|
+
extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, 'onSelect'>,
|
|
14
14
|
OUIAProps {
|
|
15
15
|
/** Anything that can be rendered inside of the nav */
|
|
16
16
|
children?: React.ReactNode;
|
|
@@ -2,7 +2,6 @@ import { Divider, DividerProps } from '../Divider';
|
|
|
2
2
|
|
|
3
3
|
export const NavItemSeparator: React.FunctionComponent<DividerProps> = ({
|
|
4
4
|
component = 'li',
|
|
5
|
-
role = 'presentation',
|
|
6
5
|
...props
|
|
7
|
-
}: DividerProps) => <Divider component={component}
|
|
6
|
+
}: DividerProps) => <Divider component={component} {...props} />;
|
|
8
7
|
NavItemSeparator.displayName = 'NavItemSeparator';
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from '@patternfly/react-core';
|
|
9
9
|
|
|
10
10
|
export const ProgressTitleOutsideOfProgressBar: React.FunctionComponent = () => (
|
|
11
|
-
<DescriptionList
|
|
11
|
+
<DescriptionList>
|
|
12
12
|
<DescriptionListGroup>
|
|
13
13
|
<DescriptionListTerm id="title-outside-progress-example-label">Title outside of progress bar</DescriptionListTerm>
|
|
14
14
|
<DescriptionListDescription>
|
|
@@ -7,13 +7,7 @@ export const SearchInputFocusSearch: React.FunctionComponent = () => {
|
|
|
7
7
|
|
|
8
8
|
return (
|
|
9
9
|
<>
|
|
10
|
-
<SearchInput
|
|
11
|
-
ref={ref}
|
|
12
|
-
value={value}
|
|
13
|
-
onChange={(_event, value) => setValue(value)}
|
|
14
|
-
onClear={() => setValue('')}
|
|
15
|
-
aria-label="Search focus using ref example"
|
|
16
|
-
/>
|
|
10
|
+
<SearchInput ref={ref} value={value} onChange={(_event, value) => setValue(value)} onClear={() => setValue('')} />
|
|
17
11
|
<Button onClick={() => ref.current && ref.current.focus()}>Focus on the search input</Button>
|
|
18
12
|
</>
|
|
19
13
|
);
|
|
@@ -29,7 +29,6 @@ export const SearchInputWithNavigableOptions: React.FunctionComponent = () => {
|
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
31
|
<SearchInput
|
|
32
|
-
aria-label="Search match with navigable options example"
|
|
33
32
|
placeholder="Find by name"
|
|
34
33
|
value={value}
|
|
35
34
|
onChange={(_event, value) => onChange(value)}
|
|
@@ -31,9 +31,7 @@ export interface HorizontalOverflowObject {
|
|
|
31
31
|
type TabElement = React.ReactElement<TabProps, React.JSXElementConstructor<TabProps>>;
|
|
32
32
|
type TabsChild = TabElement | boolean | null | undefined;
|
|
33
33
|
|
|
34
|
-
export interface TabsProps
|
|
35
|
-
extends Omit<React.HTMLProps<HTMLElement | HTMLDivElement>, 'onSelect' | 'onToggle'>,
|
|
36
|
-
OUIAProps {
|
|
34
|
+
export interface TabsProps extends Omit<React.HTMLProps<HTMLElement | HTMLDivElement>, 'onSelect'>, OUIAProps {
|
|
37
35
|
/** Content rendered inside the tabs component. Only `Tab` components or expressions resulting in a falsy value are allowed here. */
|
|
38
36
|
children: TabsChild | TabsChild[];
|
|
39
37
|
/** Additional classes added to the tabs */
|
|
@@ -12,7 +12,7 @@ export enum ToolbarGroupVariant {
|
|
|
12
12
|
'label-group' = 'label-group'
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'ref'
|
|
15
|
+
export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'ref'> {
|
|
16
16
|
/** Classes applied to root element of the data toolbar group */
|
|
17
17
|
className?: string;
|
|
18
18
|
/** A type modifier which modifies spacing specifically depending on the type of group */
|
|
@@ -185,19 +185,10 @@ export const ToolbarItem: React.FunctionComponent<ToolbarItemProps> = ({
|
|
|
185
185
|
children,
|
|
186
186
|
isAllExpanded,
|
|
187
187
|
isOverflowContainer,
|
|
188
|
-
role,
|
|
189
188
|
...props
|
|
190
189
|
}: ToolbarItemProps) => {
|
|
191
190
|
if (variant === ToolbarItemVariant.separator) {
|
|
192
|
-
|
|
193
|
-
return (
|
|
194
|
-
<Divider
|
|
195
|
-
className={css(className)}
|
|
196
|
-
orientation={{ default: 'vertical' }}
|
|
197
|
-
{...props}
|
|
198
|
-
{...(isDividerRoleValid && { role: role as 'separator' | 'presentation' })}
|
|
199
|
-
/>
|
|
200
|
-
);
|
|
191
|
+
return <Divider className={css(className)} orientation={{ default: 'vertical' }} {...props} />;
|
|
201
192
|
}
|
|
202
193
|
|
|
203
194
|
return (
|
|
@@ -226,7 +217,6 @@ export const ToolbarItem: React.FunctionComponent<ToolbarItemProps> = ({
|
|
|
226
217
|
)}
|
|
227
218
|
{...(variant === 'label' && { 'aria-hidden': true })}
|
|
228
219
|
id={id}
|
|
229
|
-
role={role}
|
|
230
220
|
{...props}
|
|
231
221
|
>
|
|
232
222
|
{children}
|