Skip to content

Commit 303decf

Browse files
committed
chore(styled-react): remove Breadcrumbs, Table, Timeline, Truncate
1 parent 421ebf0 commit 303decf

9 files changed

Lines changed: 1 addition & 363 deletions

File tree

packages/styled-react/src/__tests__/__snapshots__/exports.test.ts.snap

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ exports[`@primer/styled-react exports 1`] = `
55
"ActionList",
66
"BaseStyles",
77
"Box",
8-
"Breadcrumb",
9-
"Breadcrumbs",
108
"Button",
119
"Dialog",
1210
"Flash",
@@ -26,9 +24,7 @@ exports[`@primer/styled-react exports 1`] = `
2624
"theme",
2725
"themeGet",
2826
"ThemeProvider",
29-
"Timeline",
3027
"ToggleSwitch",
31-
"Truncate",
3228
"UnderlineNav",
3329
"useColorSchemeVar",
3430
"useTheme",
@@ -47,6 +43,5 @@ exports[`@primer/styled-react/deprecated exports 1`] = `
4743
exports[`@primer/styled-react/experimental exports 1`] = `
4844
[
4945
"Dialog",
50-
"Table",
5146
]
5247
`;
Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
11
import {render, screen} from '@testing-library/react'
22
import {describe, expect, test} from 'vitest'
3-
import {Dialog, Table} from '../experimental'
3+
import {Dialog} from '../experimental'
44

55
describe('@primer/react/experimental', () => {
66
test('Dialog supports `sx` prop', () => {
77
render(<Dialog data-testid="component" onClose={() => {}} sx={{background: 'red'}} />)
88
expect(window.getComputedStyle(screen.getByRole('dialog')).backgroundColor).toBe('rgb(255, 0, 0)')
99
})
10-
11-
test('Table.Container', () => {
12-
render(<Table.Container data-testid="component" sx={{background: 'red'}} />)
13-
expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)')
14-
})
15-
16-
test('Table.Container supports `sx` prop', () => {
17-
render(
18-
<Table.Container data-testid="component" sx={{background: 'red'}}>
19-
<Table.Row>
20-
<Table.Cell>cell</Table.Cell>
21-
</Table.Row>
22-
</Table.Container>,
23-
)
24-
expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)')
25-
})
2610
})

packages/styled-react/src/__tests__/primer-react.browser.test.tsx

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {describe, expect, test} from 'vitest'
33
import {
44
ActionList,
55
Box,
6-
Breadcrumbs,
76
Button,
87
Dialog,
98
Flash,
@@ -18,8 +17,6 @@ import {
1817
Spinner,
1918
Text,
2019
TextInput,
21-
Timeline,
22-
Truncate,
2320
UnderlineNav,
2421
} from '../'
2522

@@ -35,17 +32,6 @@ describe('@primer/react', () => {
3532
expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)')
3633
})
3734

38-
test('Breadcrumbs supports `sx` prop', () => {
39-
render(<Breadcrumbs sx={{background: 'red'}} />)
40-
expect(window.getComputedStyle(screen.getByLabelText('Breadcrumbs')).backgroundColor).toBe('rgb(255, 0, 0)')
41-
})
42-
43-
test('Breadcrumbs.Item supports `sx` prop', () => {
44-
render(<Breadcrumbs.Item as="li" data-testid="component" sx={{background: 'red'}} selected />)
45-
expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)')
46-
expect(screen.getByTestId('component').className.includes('selected')).toBe(true)
47-
})
48-
4935
test('Button supports `sx` prop', () => {
5036
render(<Button as="button" data-testid="component" sx={{background: 'red'}} size="medium" />)
5137
expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)')
@@ -197,37 +183,6 @@ describe('@primer/react', () => {
197183
expect(window.getComputedStyle(screen.getByRole('button')).backgroundColor).toBe('rgb(255, 0, 0)')
198184
})
199185

200-
test('Timeline supports `sx` prop', () => {
201-
render(<Timeline data-testid="component" sx={{background: 'red'}} />)
202-
expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)')
203-
})
204-
205-
test('Timeline.Badge supports `sx` prop', () => {
206-
render(<Timeline.Badge data-testid="component" sx={{background: 'red'}} />)
207-
expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)')
208-
})
209-
210-
test('Timeline.Break supports `sx` prop', () => {
211-
render(<Timeline.Break data-testid="component" sx={{background: 'red'}} />)
212-
expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)')
213-
})
214-
215-
test('Timeline.Item supports `sx` prop', () => {
216-
render(<Timeline.Item data-testid="component" sx={{background: 'red'}} />)
217-
expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)')
218-
})
219-
220-
test('Timeline.Body supports `sx` prop', () => {
221-
render(<Timeline.Body data-testid="component" sx={{background: 'red'}} />)
222-
expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)')
223-
})
224-
225-
test('Truncate supports `sx` prop', () => {
226-
render(<Truncate as="div" data-testid="component" sx={{background: 'red'}} title="test" />)
227-
expect(window.getComputedStyle(screen.getByTestId('component')).backgroundColor).toBe('rgb(255, 0, 0)')
228-
expect(screen.getByTestId('component')).toHaveAttribute('title', 'test')
229-
})
230-
231186
test('UnderlineNav supports `sx` prop', () => {
232187
render(
233188
<UnderlineNav as="nav" aria-label="navigation" data-testid="component" sx={{background: 'red'}} variant="inset">

packages/styled-react/src/components/Breadcrumbs.tsx

Lines changed: 0 additions & 42 deletions
This file was deleted.

packages/styled-react/src/components/DataTable.tsx

Lines changed: 0 additions & 51 deletions
This file was deleted.

packages/styled-react/src/components/Timeline.tsx

Lines changed: 0 additions & 44 deletions
This file was deleted.

packages/styled-react/src/components/Truncate.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

packages/styled-react/src/experimental.tsx

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -11,71 +11,3 @@ export {
1111
*/
1212
type DialogProps,
1313
} from './components/Dialog'
14-
15-
export {
16-
/**
17-
* @deprecated Usage of the `sx` prop with this component is no longer
18-
* supported. Use the component from `@primer/react` with CSS Modules instead.
19-
*/
20-
Table,
21-
22-
/**
23-
* @deprecated Usage of the `sx` prop with this component is no longer
24-
* supported. Use the component from `@primer/react` with CSS Modules instead.
25-
*/
26-
type DataTableContainerProps,
27-
28-
/**
29-
* @deprecated Usage of the `sx` prop with this component is no longer
30-
* supported. Use the component from `@primer/react` with CSS Modules instead.
31-
*/
32-
type TableProps,
33-
34-
/**
35-
* @deprecated Usage of the `sx` prop with this component is no longer
36-
* supported. Use the component from `@primer/react` with CSS Modules instead.
37-
*/
38-
type TableHeadProps,
39-
40-
/**
41-
* @deprecated Usage of the `sx` prop with this component is no longer
42-
* supported. Use the component from `@primer/react` with CSS Modules instead.
43-
*/
44-
type TableBodyProps,
45-
46-
/**
47-
* @deprecated Usage of the `sx` prop with this component is no longer
48-
* supported. Use the component from `@primer/react` with CSS Modules instead.
49-
*/
50-
type TableRowProps,
51-
52-
/**
53-
* @deprecated Usage of the `sx` prop with this component is no longer
54-
* supported. Use the component from `@primer/react` with CSS Modules instead.
55-
*/
56-
type TableHeaderProps,
57-
58-
/**
59-
* @deprecated Usage of the `sx` prop with this component is no longer
60-
* supported. Use the component from `@primer/react` with CSS Modules instead.
61-
*/
62-
type TableCellProps,
63-
64-
/**
65-
* @deprecated Usage of the `sx` prop with this component is no longer
66-
* supported. Use the component from `@primer/react` with CSS Modules instead.
67-
*/
68-
type TableTitleProps,
69-
70-
/**
71-
* @deprecated Usage of the `sx` prop with this component is no longer
72-
* supported. Use the component from `@primer/react` with CSS Modules instead.
73-
*/
74-
type TableSubtitleProps,
75-
76-
/**
77-
* @deprecated Usage of the `sx` prop with this component is no longer
78-
* supported. Use the component from `@primer/react` with CSS Modules instead.
79-
*/
80-
type TableActionsProps,
81-
} from './components/DataTable'

0 commit comments

Comments
 (0)