-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WCMS-16975: Update to design system 8 (#144)
* WCMS-9479: Add responsive styling to filter UI * Add styles to datepicker * bump package.lock * WCMS-16975: Update design system to 8.0.2 * bump package lock * bump version * Fix jest tests * update package.lock * Update based on design feedback * Update class names * Bump version number * Fix date picker styling * Remove unneccessary padding * remove unneeded class name * Missing margin fixes * bump version # * WCMS-17211: DS8 upgrade for data.medicaid * bump version * Footer spacing updates * Missed footer padding * Restore border to add filter UI * Fix for upgrade to ds8 * WCMS-17459: Fix Dropdown render (#147) * WCMS-17327: Fix rows per page display (#148) * Add dropdown fix * 2.3.0
- Loading branch information
1 parent
0d9fd70
commit 5868bad
Showing
43 changed files
with
14,666 additions
and
12,865 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"presets": [ | ||
["@babel/preset-env", { "targets": { "node": "current" } }], | ||
"@babel/preset-react" | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,6 @@ dist | |
.docz | ||
docs | ||
.DS_Store | ||
.parcel-cache | ||
.parcel-cache | ||
|
||
.vscode |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import '@testing-library/jest-dom/extend-expect'; | ||
import '@testing-library/jest-dom'; | ||
import DataTableDensity from './index'; | ||
|
||
describe('<DataTableRowDetails />', () => { | ||
test('Renders 3 options', () => { | ||
render(<DataTableDensity setTablePadding={(p) => console.log(p)} />); | ||
expect(screen.getByText('Tight')).toBeTruthy(); | ||
expect(screen.getByText('Normal')).toBeTruthy(); | ||
expect(screen.getAllByText('Tight')).toBeTruthy(); | ||
expect(screen.getAllByText('Normal')).toBeTruthy(); | ||
expect(screen.getByText('Expanded')).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
src/components/DataTableRowChanger/datatablerowchanger.test.jsx
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
src/components/DataTableRowChanger/datatablerowchanger.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import '@testing-library/jest-dom'; | ||
import DataTableRowChanger from './index'; | ||
|
||
describe('<DataTableRowChanger />', () => { | ||
test('Renders 4 buttons by default', () => { | ||
render(<DataTableRowChanger limit={25} setLimit={() => {return;}} />); | ||
expect(screen.getAllByText(/Rows per page:/i)).toBeTruthy(); | ||
}); | ||
|
||
test('Renders 2 buttons when given an array of 2 rowOptions', () => { | ||
render(<DataTableRowChanger limit={25} setLimit={() => {return;}} />); | ||
expect(screen.getAllByText(/Rows per page:/i)).toBeTruthy(); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Dropdown, DropdownValue, DropdownOption } from '@cmsgov/design-system'; | ||
|
||
type DataTableRowChangerProps = { | ||
limit: DropdownValue, | ||
rowOptions: Array<Number>, | ||
setLimit: Function, | ||
}; | ||
|
||
const DataTableRowChanger = (props: DataTableRowChangerProps) => { | ||
const {limit, rowOptions, setLimit} = props; | ||
const rowOptionsFormatted = rowOptions.map((row: Number) => ({ label: row.toString(), value: row.toString() as DropdownValue } )) as Array<DropdownOption>; | ||
return ( | ||
<div className="ds-u-display--flex"> | ||
<Dropdown | ||
options={rowOptionsFormatted} | ||
label="Rows per page:" | ||
labelClassName="ds-u-margin-top--0" | ||
name="datatable_rows_per_page" | ||
onChange={(e) => setLimit(e.target.value)} | ||
defaultValue={limit.toString()} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
DataTableRowChanger.defaultProps = { | ||
rowOptions: [10, 25, 50, 100], | ||
}; | ||
|
||
DataTableRowChanger.propTypes = { | ||
rowOptions: PropTypes.arrayOf(PropTypes.number), | ||
setLimit: PropTypes.func.isRequired, | ||
limit: PropTypes.number, | ||
}; | ||
|
||
export default DataTableRowChanger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/components/DatasetSearchFacets/dataset_search_facets.test.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/components/DatasetSearchListItem/datasetsearchlistitem.test.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.dc-c-dataset-tags--tag { | ||
display: inline-block; | ||
background: #{var(--color-primary-alt-lightest)}; | ||
background: #{var(--color-info-lightest)}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.