@primer/components 30.0.0-rc.7552fa6d → 30.0.0-rc.9be85598
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 +2 -0
- package/dist/browser.esm.js +1 -1
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +1 -1
- package/dist/browser.umd.js.map +1 -1
- package/lib/ActionList/Item.js +1 -1
- package/lib/__tests__/ActionList.js +0 -3
- package/lib/__tests__/ActionMenu.js +0 -3
- package/lib/__tests__/AnchoredOverlay.js +0 -1
- package/lib/__tests__/Avatar.js +1 -4
- package/lib/__tests__/AvatarStack.js +0 -3
- package/lib/__tests__/BorderBox.js +1 -4
- package/lib/__tests__/Box.js +1 -4
- package/lib/__tests__/BranchName.js +1 -4
- package/lib/__tests__/Breadcrumbs.js +1 -4
- package/lib/__tests__/BreadcrumbsItem.js +1 -4
- package/lib/__tests__/Button.js +7 -16
- package/lib/__tests__/CircleBadge.js +0 -4
- package/lib/__tests__/CircleOcticon.js +0 -3
- package/lib/__tests__/CounterLabel.js +1 -4
- package/lib/__tests__/Details.js +1 -4
- package/lib/__tests__/Dialog.js +1 -5
- package/lib/__tests__/Dropdown.js +1 -8
- package/lib/__tests__/DropdownMenu.js +0 -3
- package/lib/__tests__/FilterList.js +1 -4
- package/lib/__tests__/FilterListItem.js +1 -4
- package/lib/__tests__/FilteredSearch.js +1 -4
- package/lib/__tests__/Flash.js +1 -4
- package/lib/__tests__/Flex.js +1 -4
- package/lib/__tests__/FormGroup.js +2 -6
- package/lib/__tests__/Grid.js +1 -4
- package/lib/__tests__/Header.js +3 -8
- package/lib/__tests__/Heading.js +1 -4
- package/lib/__tests__/Label.js +1 -4
- package/lib/__tests__/LabelGroup.js +1 -4
- package/lib/__tests__/Link.js +1 -4
- package/lib/__tests__/Pagehead.js +1 -4
- package/lib/__tests__/Pagination/Pagination.js +0 -3
- package/lib/__tests__/PointerBox.js +1 -4
- package/lib/__tests__/Popover.js +0 -4
- package/lib/__tests__/Position.js +4 -10
- package/lib/__tests__/ProgressBar.js +1 -4
- package/lib/__tests__/SelectPanel.js +0 -3
- package/lib/__tests__/SideNav.js +2 -6
- package/lib/__tests__/Spinner.js +1 -4
- package/lib/__tests__/StateLabel.js +0 -3
- package/lib/__tests__/StyledOcticon.js +0 -3
- package/lib/__tests__/SubNav.js +1 -4
- package/lib/__tests__/SubNavLink.js +1 -4
- package/lib/__tests__/TabNav.js +2 -6
- package/lib/__tests__/Text.js +1 -4
- package/lib/__tests__/TextInput.js +0 -3
- package/lib/__tests__/Timeline.js +2 -7
- package/lib/__tests__/Tooltip.js +1 -4
- package/lib/__tests__/Truncate.js +0 -3
- package/lib/__tests__/UnderlineNav.js +1 -4
- package/lib/__tests__/UnderlineNavLink.js +1 -4
- package/lib/utils/testing.d.ts +0 -1
- package/lib-esm/ActionList/Item.js +1 -1
- package/lib-esm/__tests__/ActionList.js +0 -2
- package/lib-esm/__tests__/ActionMenu.js +0 -2
- package/lib-esm/__tests__/AnchoredOverlay.js +0 -1
- package/lib-esm/__tests__/Avatar.js +1 -3
- package/lib-esm/__tests__/AvatarStack.js +0 -2
- package/lib-esm/__tests__/BorderBox.js +1 -3
- package/lib-esm/__tests__/Box.js +1 -3
- package/lib-esm/__tests__/BranchName.js +1 -3
- package/lib-esm/__tests__/Breadcrumbs.js +1 -3
- package/lib-esm/__tests__/BreadcrumbsItem.js +1 -3
- package/lib-esm/__tests__/Button.js +7 -15
- package/lib-esm/__tests__/CircleBadge.js +0 -3
- package/lib-esm/__tests__/CircleOcticon.js +0 -2
- package/lib-esm/__tests__/CounterLabel.js +1 -3
- package/lib-esm/__tests__/Details.js +1 -3
- package/lib-esm/__tests__/Dialog.js +1 -4
- package/lib-esm/__tests__/Dropdown.js +1 -7
- package/lib-esm/__tests__/DropdownMenu.js +0 -2
- package/lib-esm/__tests__/FilterList.js +1 -3
- package/lib-esm/__tests__/FilterListItem.js +1 -3
- package/lib-esm/__tests__/FilteredSearch.js +1 -3
- package/lib-esm/__tests__/Flash.js +1 -3
- package/lib-esm/__tests__/Flex.js +1 -3
- package/lib-esm/__tests__/FormGroup.js +2 -5
- package/lib-esm/__tests__/Grid.js +1 -3
- package/lib-esm/__tests__/Header.js +3 -7
- package/lib-esm/__tests__/Heading.js +1 -3
- package/lib-esm/__tests__/Label.js +1 -3
- package/lib-esm/__tests__/LabelGroup.js +1 -3
- package/lib-esm/__tests__/Link.js +1 -3
- package/lib-esm/__tests__/Pagehead.js +1 -3
- package/lib-esm/__tests__/Pagination/Pagination.js +0 -2
- package/lib-esm/__tests__/PointerBox.js +1 -3
- package/lib-esm/__tests__/Popover.js +0 -3
- package/lib-esm/__tests__/Position.js +4 -9
- package/lib-esm/__tests__/ProgressBar.js +1 -3
- package/lib-esm/__tests__/SelectPanel.js +0 -2
- package/lib-esm/__tests__/SideNav.js +2 -5
- package/lib-esm/__tests__/Spinner.js +1 -3
- package/lib-esm/__tests__/StateLabel.js +0 -2
- package/lib-esm/__tests__/StyledOcticon.js +0 -2
- package/lib-esm/__tests__/SubNav.js +1 -3
- package/lib-esm/__tests__/SubNavLink.js +1 -3
- package/lib-esm/__tests__/TabNav.js +2 -5
- package/lib-esm/__tests__/Text.js +1 -3
- package/lib-esm/__tests__/TextInput.js +0 -2
- package/lib-esm/__tests__/Timeline.js +2 -6
- package/lib-esm/__tests__/Tooltip.js +1 -3
- package/lib-esm/__tests__/Truncate.js +0 -2
- package/lib-esm/__tests__/UnderlineNav.js +1 -3
- package/lib-esm/__tests__/UnderlineNavLink.js +1 -3
- package/lib-esm/utils/testing.d.ts +0 -1
- package/package-lock.json +69 -15
- package/package.json +3 -3
- package/src/ActionList/Item.tsx +1 -1
- package/src/__tests__/ActionList.tsx +0 -2
- package/src/__tests__/ActionMenu.tsx +0 -2
- package/src/__tests__/AnchoredOverlay.tsx +0 -1
- package/src/__tests__/Avatar.tsx +1 -2
- package/src/__tests__/AvatarStack.tsx +1 -2
- package/src/__tests__/BorderBox.tsx +1 -2
- package/src/__tests__/Box.tsx +1 -2
- package/src/__tests__/BranchName.tsx +1 -2
- package/src/__tests__/Breadcrumbs.tsx +1 -2
- package/src/__tests__/BreadcrumbsItem.tsx +1 -2
- package/src/__tests__/Button.tsx +7 -8
- package/src/__tests__/CircleBadge.tsx +0 -3
- package/src/__tests__/CircleOcticon.tsx +0 -2
- package/src/__tests__/CounterLabel.tsx +1 -2
- package/src/__tests__/Details.tsx +1 -2
- package/src/__tests__/Dialog.tsx +1 -3
- package/src/__tests__/Dropdown.tsx +2 -6
- package/src/__tests__/DropdownMenu.tsx +0 -2
- package/src/__tests__/FilterList.tsx +1 -2
- package/src/__tests__/FilterListItem.tsx +1 -2
- package/src/__tests__/FilteredSearch.tsx +1 -2
- package/src/__tests__/Flash.tsx +1 -2
- package/src/__tests__/Flex.tsx +1 -2
- package/src/__tests__/FormGroup.tsx +2 -3
- package/src/__tests__/Grid.tsx +1 -2
- package/src/__tests__/Header.tsx +3 -4
- package/src/__tests__/Heading.tsx +1 -2
- package/src/__tests__/Label.tsx +1 -2
- package/src/__tests__/LabelGroup.tsx +1 -2
- package/src/__tests__/Link.tsx +1 -2
- package/src/__tests__/Pagehead.tsx +1 -2
- package/src/__tests__/Pagination/Pagination.tsx +1 -2
- package/src/__tests__/PointerBox.tsx +1 -2
- package/src/__tests__/Popover.tsx +2 -3
- package/src/__tests__/Position.tsx +4 -5
- package/src/__tests__/ProgressBar.tsx +1 -2
- package/src/__tests__/SelectPanel.tsx +0 -2
- package/src/__tests__/SideNav.tsx +2 -3
- package/src/__tests__/Spinner.tsx +1 -3
- package/src/__tests__/StateLabel.tsx +0 -2
- package/src/__tests__/StyledOcticon.tsx +0 -2
- package/src/__tests__/SubNav.tsx +1 -2
- package/src/__tests__/SubNavLink.tsx +1 -2
- package/src/__tests__/TabNav.tsx +2 -3
- package/src/__tests__/Text.tsx +1 -2
- package/src/__tests__/TextInput.tsx +1 -2
- package/src/__tests__/Timeline.tsx +3 -4
- package/src/__tests__/Tooltip.tsx +1 -2
- package/src/__tests__/Truncate.tsx +0 -2
- package/src/__tests__/UnderlineNav.tsx +1 -2
- package/src/__tests__/UnderlineNavLink.tsx +1 -2
- package/src/utils/testing.tsx +0 -1
- package/stats.html +1 -1
@@ -4,7 +4,6 @@ import { axe, toHaveNoViolations } from 'jest-axe';
|
|
4
4
|
import React from 'react';
|
5
5
|
import theme from '../theme';
|
6
6
|
import { SelectPanel } from '../SelectPanel';
|
7
|
-
import { COMMON } from '../constants';
|
8
7
|
import { behavesAsComponent, checkExports } from '../utils/testing';
|
9
8
|
import { BaseStyles, SSRProvider, ThemeProvider } from '..';
|
10
9
|
expect.extend(toHaveNoViolations);
|
@@ -45,7 +44,6 @@ describe('SelectPanel', () => {
|
|
45
44
|
});
|
46
45
|
behavesAsComponent({
|
47
46
|
Component: SelectPanel,
|
48
|
-
systemPropArray: [COMMON],
|
49
47
|
options: {
|
50
48
|
skipAs: true,
|
51
49
|
skipSx: true
|
@@ -1,23 +1,20 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { SideNav } from '..';
|
3
3
|
import { render, behavesAsComponent, mount, checkExports } from '../utils/testing';
|
4
|
-
import { BORDER, COMMON, LAYOUT, FLEX, TYPOGRAPHY } from '../constants';
|
5
4
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
6
5
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
7
6
|
import 'babel-polyfill';
|
8
7
|
expect.extend(toHaveNoViolations);
|
9
8
|
describe('SideNav', () => {
|
10
9
|
behavesAsComponent({
|
11
|
-
Component: SideNav
|
12
|
-
systemPropArray: [BORDER, LAYOUT, COMMON, FLEX]
|
10
|
+
Component: SideNav
|
13
11
|
});
|
14
12
|
checkExports('SideNav', {
|
15
13
|
default: SideNav
|
16
14
|
});
|
17
15
|
describe('SideNav.Link', () => {
|
18
16
|
behavesAsComponent({
|
19
|
-
Component: SideNav.Link
|
20
|
-
systemPropArray: [COMMON, TYPOGRAPHY]
|
17
|
+
Component: SideNav.Link
|
21
18
|
});
|
22
19
|
});
|
23
20
|
it('should have no axe violations', async () => {
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Spinner } from '..';
|
3
3
|
import { behavesAsComponent, checkExports } from '../utils/testing';
|
4
|
-
import { COMMON } from '../constants';
|
5
4
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
6
5
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
7
6
|
import 'babel-polyfill';
|
@@ -11,8 +10,7 @@ describe('Spinner', () => {
|
|
11
10
|
cleanup();
|
12
11
|
});
|
13
12
|
behavesAsComponent({
|
14
|
-
Component: Spinner
|
15
|
-
systemPropArray: [COMMON]
|
13
|
+
Component: Spinner
|
16
14
|
});
|
17
15
|
checkExports('Spinner', {
|
18
16
|
default: Spinner
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { StateLabel } from '..';
|
3
3
|
import { render, behavesAsComponent, checkExports } from '../utils/testing';
|
4
|
-
import { COMMON } from '../constants';
|
5
4
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
6
5
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
7
6
|
import 'babel-polyfill';
|
@@ -9,7 +8,6 @@ expect.extend(toHaveNoViolations);
|
|
9
8
|
describe('StateLabel', () => {
|
10
9
|
behavesAsComponent({
|
11
10
|
Component: StateLabel,
|
12
|
-
systemPropArray: [COMMON],
|
13
11
|
toRender: () => /*#__PURE__*/React.createElement(StateLabel, {
|
14
12
|
status: "issueOpened"
|
15
13
|
}, "Open"),
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
2
2
|
import { XIcon } from '@primer/octicons-react';
|
3
3
|
import { StyledOcticon } from '..';
|
4
4
|
import { behavesAsComponent, checkExports } from '../utils/testing';
|
5
|
-
import { COMMON } from '../constants';
|
6
5
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
7
6
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
8
7
|
import 'babel-polyfill';
|
@@ -10,7 +9,6 @@ expect.extend(toHaveNoViolations);
|
|
10
9
|
describe('StyledOcticon', () => {
|
11
10
|
behavesAsComponent({
|
12
11
|
Component: StyledOcticon,
|
13
|
-
systemPropArray: [COMMON],
|
14
12
|
toRender: () => /*#__PURE__*/React.createElement(StyledOcticon, {
|
15
13
|
icon: XIcon
|
16
14
|
})
|
@@ -1,15 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { SubNav } from '..';
|
3
3
|
import { mount, render, rendersClass, behavesAsComponent, checkExports } from '../utils/testing';
|
4
|
-
import { COMMON } from '../constants';
|
5
4
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
6
5
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
7
6
|
import 'babel-polyfill';
|
8
7
|
expect.extend(toHaveNoViolations);
|
9
8
|
describe('SubNav', () => {
|
10
9
|
behavesAsComponent({
|
11
|
-
Component: SubNav
|
12
|
-
systemPropArray: [COMMON]
|
10
|
+
Component: SubNav
|
13
11
|
});
|
14
12
|
checkExports('SubNav', {
|
15
13
|
default: SubNav
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { SubNav } from '..';
|
3
|
-
import { COMMON } from '../constants';
|
4
3
|
import { render, behavesAsComponent } from '../utils/testing';
|
5
4
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
6
5
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
@@ -8,8 +7,7 @@ import 'babel-polyfill';
|
|
8
7
|
expect.extend(toHaveNoViolations);
|
9
8
|
describe('SubNav.Link', () => {
|
10
9
|
behavesAsComponent({
|
11
|
-
Component: SubNav.Link
|
12
|
-
systemPropArray: [COMMON]
|
10
|
+
Component: SubNav.Link
|
13
11
|
});
|
14
12
|
it('renders an <a> by default', () => {
|
15
13
|
expect(render( /*#__PURE__*/React.createElement(SubNav.Link, null)).type).toEqual('a');
|
@@ -1,23 +1,20 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { TabNav } from '..';
|
3
3
|
import { behavesAsComponent, checkExports } from '../utils/testing';
|
4
|
-
import { COMMON } from '../constants';
|
5
4
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
6
5
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
7
6
|
import 'babel-polyfill';
|
8
7
|
expect.extend(toHaveNoViolations);
|
9
8
|
describe('TabNav', () => {
|
10
9
|
behavesAsComponent({
|
11
|
-
Component: TabNav
|
12
|
-
systemPropArray: [COMMON]
|
10
|
+
Component: TabNav
|
13
11
|
});
|
14
12
|
checkExports('TabNav', {
|
15
13
|
default: TabNav
|
16
14
|
});
|
17
15
|
describe('TabNav.Link', () => {
|
18
16
|
behavesAsComponent({
|
19
|
-
Component: TabNav.Link
|
20
|
-
systemPropArray: [COMMON]
|
17
|
+
Component: TabNav.Link
|
21
18
|
});
|
22
19
|
});
|
23
20
|
it('should have no axe violations', async () => {
|
@@ -2,15 +2,13 @@ import React from 'react';
|
|
2
2
|
import { Text } from '..';
|
3
3
|
import theme from '../theme';
|
4
4
|
import { px, render, renderStyles, behavesAsComponent, checkExports } from '../utils/testing';
|
5
|
-
import { COMMON, TYPOGRAPHY } from '../constants';
|
6
5
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
7
6
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
8
7
|
import 'babel-polyfill';
|
9
8
|
expect.extend(toHaveNoViolations);
|
10
9
|
describe('Text', () => {
|
11
10
|
behavesAsComponent({
|
12
|
-
Component: Text
|
13
|
-
systemPropArray: [COMMON, TYPOGRAPHY]
|
11
|
+
Component: Text
|
14
12
|
});
|
15
13
|
checkExports('Text', {
|
16
14
|
default: Text
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { TextInput } from '..';
|
3
3
|
import { render, mount, behavesAsComponent, checkExports } from '../utils/testing';
|
4
|
-
import { COMMON } from '../constants';
|
5
4
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
6
5
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
7
6
|
import 'babel-polyfill';
|
@@ -9,7 +8,6 @@ expect.extend(toHaveNoViolations);
|
|
9
8
|
describe('TextInput', () => {
|
10
9
|
behavesAsComponent({
|
11
10
|
Component: TextInput,
|
12
|
-
systemPropArray: [COMMON],
|
13
11
|
options: {
|
14
12
|
skipAs: true
|
15
13
|
}
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import 'babel-polyfill';
|
2
|
-
import { COMMON, FLEX, LAYOUT } from '../constants';
|
3
2
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
4
3
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
5
4
|
import { render, rendersClass, behavesAsComponent, checkExports } from '../utils/testing';
|
@@ -8,8 +7,7 @@ import { Timeline } from '..';
|
|
8
7
|
expect.extend(toHaveNoViolations);
|
9
8
|
describe('Timeline', () => {
|
10
9
|
behavesAsComponent({
|
11
|
-
Component: Timeline
|
12
|
-
systemPropArray: [COMMON, FLEX, LAYOUT]
|
10
|
+
Component: Timeline
|
13
11
|
});
|
14
12
|
checkExports('Timeline', {
|
15
13
|
default: Timeline
|
@@ -30,8 +28,7 @@ describe('Timeline', () => {
|
|
30
28
|
});
|
31
29
|
describe('Timeline.Item', () => {
|
32
30
|
behavesAsComponent({
|
33
|
-
Component: Timeline.Item
|
34
|
-
systemPropArray: [COMMON, FLEX, LAYOUT]
|
31
|
+
Component: Timeline.Item
|
35
32
|
});
|
36
33
|
it('should have no axe violations', async () => {
|
37
34
|
const {
|
@@ -53,7 +50,6 @@ describe('Timeline.Item', () => {
|
|
53
50
|
describe('Timeline.Badge', () => {
|
54
51
|
behavesAsComponent({
|
55
52
|
Component: Timeline.Badge,
|
56
|
-
systemPropArray: [COMMON, LAYOUT],
|
57
53
|
options: {
|
58
54
|
skipAs: true
|
59
55
|
}
|
@@ -1,15 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import Tooltip from '../Tooltip';
|
3
3
|
import { render, renderClasses, rendersClass, behavesAsComponent, checkExports } from '../utils/testing';
|
4
|
-
import { COMMON } from '../constants';
|
5
4
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
6
5
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
7
6
|
import 'babel-polyfill';
|
8
7
|
expect.extend(toHaveNoViolations);
|
9
8
|
describe('Tooltip', () => {
|
10
9
|
behavesAsComponent({
|
11
|
-
Component: Tooltip
|
12
|
-
systemPropArray: [COMMON]
|
10
|
+
Component: Tooltip
|
13
11
|
});
|
14
12
|
checkExports('Tooltip', {
|
15
13
|
default: Tooltip
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Truncate } from '..';
|
3
|
-
import { COMMON, TYPOGRAPHY } from '../constants';
|
4
3
|
import { render, behavesAsComponent, checkExports } from '../utils/testing';
|
5
4
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
6
5
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
@@ -9,7 +8,6 @@ expect.extend(toHaveNoViolations);
|
|
9
8
|
describe('Truncate', () => {
|
10
9
|
behavesAsComponent({
|
11
10
|
Component: Truncate,
|
12
|
-
systemPropArray: [COMMON, TYPOGRAPHY],
|
13
11
|
toRender: () => /*#__PURE__*/React.createElement(Truncate, {
|
14
12
|
title: "a-long-branch-name"
|
15
13
|
})
|
@@ -1,15 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { UnderlineNav } from '..';
|
3
3
|
import { mount, render, rendersClass, behavesAsComponent, checkExports } from '../utils/testing';
|
4
|
-
import { COMMON } from '../constants';
|
5
4
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
6
5
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
7
6
|
import 'babel-polyfill';
|
8
7
|
expect.extend(toHaveNoViolations);
|
9
8
|
describe('UnderlineNav', () => {
|
10
9
|
behavesAsComponent({
|
11
|
-
Component: UnderlineNav
|
12
|
-
systemPropArray: [COMMON]
|
10
|
+
Component: UnderlineNav
|
13
11
|
});
|
14
12
|
checkExports('UnderlineNav', {
|
15
13
|
default: UnderlineNav
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { UnderlineNav } from '..';
|
3
|
-
import { COMMON } from '../constants';
|
4
3
|
import { render, behavesAsComponent } from '../utils/testing';
|
5
4
|
import { render as HTMLRender, cleanup } from '@testing-library/react';
|
6
5
|
import { axe, toHaveNoViolations } from 'jest-axe';
|
@@ -8,8 +7,7 @@ import 'babel-polyfill';
|
|
8
7
|
expect.extend(toHaveNoViolations);
|
9
8
|
describe('UnderlineNav.Link', () => {
|
10
9
|
behavesAsComponent({
|
11
|
-
Component: UnderlineNav.Link
|
12
|
-
systemPropArray: [COMMON]
|
10
|
+
Component: UnderlineNav.Link
|
13
11
|
});
|
14
12
|
it('renders an <a> by default', () => {
|
15
13
|
expect(render( /*#__PURE__*/React.createElement(UnderlineNav.Link, null)).type).toEqual('a');
|
package/package-lock.json
CHANGED
@@ -9331,9 +9331,9 @@
|
|
9331
9331
|
}
|
9332
9332
|
},
|
9333
9333
|
"@types/jest-axe": {
|
9334
|
-
"version": "3.5.
|
9335
|
-
"resolved": "https://registry.npmjs.org/@types/jest-axe/-/jest-axe-3.5.
|
9336
|
-
"integrity": "sha512-
|
9334
|
+
"version": "3.5.3",
|
9335
|
+
"resolved": "https://registry.npmjs.org/@types/jest-axe/-/jest-axe-3.5.3.tgz",
|
9336
|
+
"integrity": "sha512-ad9qI9f+00N8IlOuGh6dnZ6o0BDdV9VhGfTUr1zCejsPvOfZd6eohffe4JYxUoUuRYEftyMcaJ6Ux4+MsOpGHg==",
|
9337
9337
|
"dev": true,
|
9338
9338
|
"requires": {
|
9339
9339
|
"@types/jest": "*",
|
@@ -9705,25 +9705,79 @@
|
|
9705
9705
|
}
|
9706
9706
|
},
|
9707
9707
|
"@typescript-eslint/eslint-plugin": {
|
9708
|
-
"version": "4.
|
9709
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.
|
9710
|
-
"integrity": "sha512-
|
9708
|
+
"version": "4.31.2",
|
9709
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.2.tgz",
|
9710
|
+
"integrity": "sha512-w63SCQ4bIwWN/+3FxzpnWrDjQRXVEGiTt9tJTRptRXeFvdZc/wLiz3FQUwNQ2CVoRGI6KUWMNUj/pk63noUfcA==",
|
9711
9711
|
"dev": true,
|
9712
9712
|
"requires": {
|
9713
|
-
"@typescript-eslint/experimental-utils": "4.
|
9714
|
-
"@typescript-eslint/scope-manager": "4.
|
9713
|
+
"@typescript-eslint/experimental-utils": "4.31.2",
|
9714
|
+
"@typescript-eslint/scope-manager": "4.31.2",
|
9715
9715
|
"debug": "^4.3.1",
|
9716
9716
|
"functional-red-black-tree": "^1.0.1",
|
9717
|
-
"lodash": "^4.17.21",
|
9718
9717
|
"regexpp": "^3.1.0",
|
9719
9718
|
"semver": "^7.3.5",
|
9720
9719
|
"tsutils": "^3.21.0"
|
9721
9720
|
},
|
9722
9721
|
"dependencies": {
|
9722
|
+
"@typescript-eslint/experimental-utils": {
|
9723
|
+
"version": "4.31.2",
|
9724
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.31.2.tgz",
|
9725
|
+
"integrity": "sha512-3tm2T4nyA970yQ6R3JZV9l0yilE2FedYg8dcXrTar34zC9r6JB7WyBQbpIVongKPlhEMjhQ01qkwrzWy38Bk1Q==",
|
9726
|
+
"dev": true,
|
9727
|
+
"requires": {
|
9728
|
+
"@types/json-schema": "^7.0.7",
|
9729
|
+
"@typescript-eslint/scope-manager": "4.31.2",
|
9730
|
+
"@typescript-eslint/types": "4.31.2",
|
9731
|
+
"@typescript-eslint/typescript-estree": "4.31.2",
|
9732
|
+
"eslint-scope": "^5.1.1",
|
9733
|
+
"eslint-utils": "^3.0.0"
|
9734
|
+
}
|
9735
|
+
},
|
9736
|
+
"@typescript-eslint/scope-manager": {
|
9737
|
+
"version": "4.31.2",
|
9738
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.31.2.tgz",
|
9739
|
+
"integrity": "sha512-2JGwudpFoR/3Czq6mPpE8zBPYdHWFGL6lUNIGolbKQeSNv4EAiHaR5GVDQaLA0FwgcdcMtRk+SBJbFGL7+La5w==",
|
9740
|
+
"dev": true,
|
9741
|
+
"requires": {
|
9742
|
+
"@typescript-eslint/types": "4.31.2",
|
9743
|
+
"@typescript-eslint/visitor-keys": "4.31.2"
|
9744
|
+
}
|
9745
|
+
},
|
9746
|
+
"@typescript-eslint/types": {
|
9747
|
+
"version": "4.31.2",
|
9748
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.31.2.tgz",
|
9749
|
+
"integrity": "sha512-kWiTTBCTKEdBGrZKwFvOlGNcAsKGJSBc8xLvSjSppFO88AqGxGNYtF36EuEYG6XZ9vT0xX8RNiHbQUKglbSi1w==",
|
9750
|
+
"dev": true
|
9751
|
+
},
|
9752
|
+
"@typescript-eslint/typescript-estree": {
|
9753
|
+
"version": "4.31.2",
|
9754
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.31.2.tgz",
|
9755
|
+
"integrity": "sha512-ieBq8U9at6PvaC7/Z6oe8D3czeW5d//Fo1xkF/s9394VR0bg/UaMYPdARiWyKX+lLEjY3w/FNZJxitMsiWv+wA==",
|
9756
|
+
"dev": true,
|
9757
|
+
"requires": {
|
9758
|
+
"@typescript-eslint/types": "4.31.2",
|
9759
|
+
"@typescript-eslint/visitor-keys": "4.31.2",
|
9760
|
+
"debug": "^4.3.1",
|
9761
|
+
"globby": "^11.0.3",
|
9762
|
+
"is-glob": "^4.0.1",
|
9763
|
+
"semver": "^7.3.5",
|
9764
|
+
"tsutils": "^3.21.0"
|
9765
|
+
}
|
9766
|
+
},
|
9767
|
+
"@typescript-eslint/visitor-keys": {
|
9768
|
+
"version": "4.31.2",
|
9769
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.31.2.tgz",
|
9770
|
+
"integrity": "sha512-PrBId7EQq2Nibns7dd/ch6S6/M4/iwLM9McbgeEbCXfxdwRUNxJ4UNreJ6Gh3fI2GNKNrWnQxKL7oCPmngKBug==",
|
9771
|
+
"dev": true,
|
9772
|
+
"requires": {
|
9773
|
+
"@typescript-eslint/types": "4.31.2",
|
9774
|
+
"eslint-visitor-keys": "^2.0.0"
|
9775
|
+
}
|
9776
|
+
},
|
9723
9777
|
"debug": {
|
9724
|
-
"version": "4.3.
|
9725
|
-
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.
|
9726
|
-
"integrity": "sha512-
|
9778
|
+
"version": "4.3.2",
|
9779
|
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
|
9780
|
+
"integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
|
9727
9781
|
"dev": true,
|
9728
9782
|
"requires": {
|
9729
9783
|
"ms": "2.1.2"
|
@@ -10552,9 +10606,9 @@
|
|
10552
10606
|
}
|
10553
10607
|
},
|
10554
10608
|
"axe-core": {
|
10555
|
-
"version": "3.5.
|
10556
|
-
"resolved": "https://registry.npmjs.org/axe-core/-/axe-core-3.5.
|
10557
|
-
"integrity": "sha512-
|
10609
|
+
"version": "3.5.6",
|
10610
|
+
"resolved": "https://registry.npmjs.org/axe-core/-/axe-core-3.5.6.tgz",
|
10611
|
+
"integrity": "sha512-LEUDjgmdJoA3LqklSTwKYqkjcZ4HKc4ddIYGSAiSkr46NTjzg2L9RNB+lekO9P7Dlpa87+hBtzc2Fzn/+GUWMQ==",
|
10558
10612
|
"dev": true
|
10559
10613
|
},
|
10560
10614
|
"axobject-query": {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/components",
|
3
|
-
"version": "30.0.0-rc.
|
3
|
+
"version": "30.0.0-rc.9be85598",
|
4
4
|
"description": "Primer react components",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"module": "lib-esm/index.js",
|
@@ -86,10 +86,10 @@
|
|
86
86
|
"@types/chroma-js": "2.1.3",
|
87
87
|
"@types/enzyme": "3.10.9",
|
88
88
|
"@types/jest": "26.0.23",
|
89
|
-
"@types/jest-axe": "3.5.
|
89
|
+
"@types/jest-axe": "3.5.3",
|
90
90
|
"@types/lodash.isempty": "4.4.6",
|
91
91
|
"@types/lodash.isobject": "3.0.6",
|
92
|
-
"@typescript-eslint/eslint-plugin": "4.
|
92
|
+
"@typescript-eslint/eslint-plugin": "4.31.2",
|
93
93
|
"@typescript-eslint/parser": "4.26.1",
|
94
94
|
"@wojtekmaj/enzyme-adapter-react-17": "0.6.3",
|
95
95
|
"babel-core": "7.0.0-bridge.0",
|
package/src/ActionList/Item.tsx
CHANGED
@@ -146,7 +146,7 @@ const getItemVariant = (variant = 'default', disabled?: boolean) => {
|
|
146
146
|
}
|
147
147
|
default:
|
148
148
|
return {
|
149
|
-
color: '
|
149
|
+
color: get('colors.fg.default'),
|
150
150
|
iconColor: get('colors.fg.muted'),
|
151
151
|
annotationColor: get('colors.fg.muted'),
|
152
152
|
hoverCursor: 'pointer'
|
@@ -4,7 +4,6 @@ import {axe, toHaveNoViolations} from 'jest-axe'
|
|
4
4
|
import React from 'react'
|
5
5
|
import theme from '../theme'
|
6
6
|
import {ActionList} from '../ActionList'
|
7
|
-
import {COMMON} from '../constants'
|
8
7
|
import {behavesAsComponent, checkExports} from '../utils/testing'
|
9
8
|
import {BaseStyles, ThemeProvider} from '..'
|
10
9
|
expect.extend(toHaveNoViolations)
|
@@ -30,7 +29,6 @@ function SimpleActionList(): JSX.Element {
|
|
30
29
|
describe('ActionList', () => {
|
31
30
|
behavesAsComponent({
|
32
31
|
Component: ActionList,
|
33
|
-
systemPropArray: [COMMON],
|
34
32
|
options: {skipAs: true, skipSx: true},
|
35
33
|
toRender: () => <ActionList items={[]} />
|
36
34
|
})
|
@@ -4,7 +4,6 @@ import {axe, toHaveNoViolations} from 'jest-axe'
|
|
4
4
|
import React from 'react'
|
5
5
|
import theme from '../theme'
|
6
6
|
import {ActionMenu} from '../ActionMenu'
|
7
|
-
import {COMMON} from '../constants'
|
8
7
|
import {behavesAsComponent, checkExports} from '../utils/testing'
|
9
8
|
import {BaseStyles, SSRProvider, ThemeProvider} from '..'
|
10
9
|
import {ItemProps} from '../ActionList/Item'
|
@@ -40,7 +39,6 @@ describe('ActionMenu', () => {
|
|
40
39
|
|
41
40
|
behavesAsComponent({
|
42
41
|
Component: ActionMenu,
|
43
|
-
systemPropArray: [COMMON],
|
44
42
|
options: {skipAs: true, skipSx: true},
|
45
43
|
toRender: () => (
|
46
44
|
<SSRProvider>
|
package/src/__tests__/Avatar.tsx
CHANGED
@@ -5,11 +5,10 @@ import {px, render, behavesAsComponent, checkExports} from '../utils/testing'
|
|
5
5
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
6
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
7
|
import 'babel-polyfill'
|
8
|
-
import {COMMON} from '../constants'
|
9
8
|
expect.extend(toHaveNoViolations)
|
10
9
|
|
11
10
|
describe('Avatar', () => {
|
12
|
-
behavesAsComponent({Component: Avatar
|
11
|
+
behavesAsComponent({Component: Avatar})
|
13
12
|
|
14
13
|
checkExports('Avatar', {
|
15
14
|
default: Avatar
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {AvatarStack} from '..'
|
3
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {COMMON} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
@@ -26,7 +25,7 @@ const rightAvatarComp = (
|
|
26
25
|
)
|
27
26
|
|
28
27
|
describe('Avatar', () => {
|
29
|
-
behavesAsComponent({Component: AvatarStack,
|
28
|
+
behavesAsComponent({Component: AvatarStack, toRender: () => avatarComp})
|
30
29
|
|
31
30
|
checkExports('AvatarStack', {
|
32
31
|
default: AvatarStack
|
@@ -2,14 +2,13 @@ import React from 'react'
|
|
2
2
|
import theme from '../theme'
|
3
3
|
import {BorderBox} from '..'
|
4
4
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
5
|
-
import {LAYOUT, COMMON, BORDER, FLEX} from '../constants'
|
6
5
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
7
6
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
8
7
|
import 'babel-polyfill'
|
9
8
|
expect.extend(toHaveNoViolations)
|
10
9
|
|
11
10
|
describe('BorderBox', () => {
|
12
|
-
behavesAsComponent({Component: BorderBox
|
11
|
+
behavesAsComponent({Component: BorderBox})
|
13
12
|
|
14
13
|
checkExports('BorderBox', {
|
15
14
|
default: BorderBox
|
package/src/__tests__/Box.tsx
CHANGED
@@ -3,13 +3,12 @@ import 'babel-polyfill'
|
|
3
3
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
4
4
|
import React from 'react'
|
5
5
|
import {Box} from '..'
|
6
|
-
import {COMMON, FLEX, LAYOUT} from '../constants'
|
7
6
|
import theme from '../theme'
|
8
7
|
import {behavesAsComponent, checkExports, render} from '../utils/testing'
|
9
8
|
expect.extend(toHaveNoViolations)
|
10
9
|
|
11
10
|
describe('Box', () => {
|
12
|
-
behavesAsComponent({Component: Box
|
11
|
+
behavesAsComponent({Component: Box})
|
13
12
|
|
14
13
|
checkExports('Box', {
|
15
14
|
default: Box
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {BranchName} from '..'
|
3
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {COMMON} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('BranchName', () => {
|
11
|
-
behavesAsComponent({Component: BranchName
|
10
|
+
behavesAsComponent({Component: BranchName})
|
12
11
|
|
13
12
|
checkExports('BranchName', {
|
14
13
|
default: BranchName
|
@@ -1,14 +1,13 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import {Breadcrumbs, Breadcrumb} from '..'
|
3
3
|
import {render, behavesAsComponent, checkExports} from '../utils/testing'
|
4
|
-
import {COMMON} from '../constants'
|
5
4
|
import {render as HTMLRender, cleanup} from '@testing-library/react'
|
6
5
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
7
6
|
import 'babel-polyfill'
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('Breadcrumbs', () => {
|
11
|
-
behavesAsComponent({Component: Breadcrumbs
|
10
|
+
behavesAsComponent({Component: Breadcrumbs})
|
12
11
|
|
13
12
|
checkExports('Breadcrumbs', {
|
14
13
|
default: Breadcrumbs,
|
@@ -3,12 +3,11 @@ import 'babel-polyfill'
|
|
3
3
|
import {axe, toHaveNoViolations} from 'jest-axe'
|
4
4
|
import React from 'react'
|
5
5
|
import {Breadcrumbs} from '..'
|
6
|
-
import {COMMON} from '../constants'
|
7
6
|
import {behavesAsComponent, render} from '../utils/testing'
|
8
7
|
expect.extend(toHaveNoViolations)
|
9
8
|
|
10
9
|
describe('Breadcrumbs.Item', () => {
|
11
|
-
behavesAsComponent({Component: Breadcrumbs.Item
|
10
|
+
behavesAsComponent({Component: Breadcrumbs.Item})
|
12
11
|
|
13
12
|
it('renders an <a> by default', () => {
|
14
13
|
expect(render(<Breadcrumbs.Item />).type).toEqual('a')
|