Socket
Socket
Sign inDemoInstall

@trussworks/react-uswds

Package Overview
Dependencies
Maintainers
8
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trussworks/react-uswds - npm Package Compare versions

Comparing version 1.9.1 to 1.9.2

13

CHANGELOG.md

@@ -5,2 +5,15 @@ # Changelog

### [1.9.2](https://github.com/trussworks/react-uswds/compare/1.9.1...1.9.2) (2020-09-10)
### Bug Fixes
* Change happo command to check for github user ([#451](https://github.com/trussworks/react-uswds/issues/451)) ([cd0add9](https://github.com/trussworks/react-uswds/commit/cd0add9bd922bafe858bda9a658b9e0983ebec38))
### Documentation & Examples
* **storybook:** Upgrade to 6.0.12 ([#418](https://github.com/trussworks/react-uswds/issues/418)) ([65d91cc](https://github.com/trussworks/react-uswds/commit/65d91ccd77fb102e819480412cc4fc84631b6f51))
* Improve documentation for new contributors, trussels ([#402](https://github.com/trussworks/react-uswds/issues/402)) ([0849a30](https://github.com/trussworks/react-uswds/commit/0849a3093365514741387edd66e7e948861babaa))
### [1.9.1](https://github.com/trussworks/react-uswds/compare/1.9.0...1.9.1) (2020-08-18)

@@ -7,0 +20,0 @@

3

lib/index.d.ts

@@ -59,2 +59,3 @@ import './styles/index.scss';

/** Truss-designed components */
export { Modal, Overlay, ModalContainer, connectModal, ConnectedModalProps, useModal, ModalHook, } from './components/Modal/Modal';
export { Modal, Overlay, ModalContainer, connectModal, useModal, } from './components/Modal/Modal';
export type { ConnectedModalProps, ModalHook } from './components/Modal/Modal';
{
"name": "@trussworks/react-uswds",
"version": "1.9.1",
"version": "1.9.2",
"description": "React USWDS 2.0 component library",

@@ -72,8 +72,8 @@ "keywords": [

"@babel/preset-react": "^7.10.4",
"@storybook/addon-docs": "^5.3.19",
"@storybook/addon-docs": "^6.0.12",
"@storybook/addon-viewport": "^6.0.12",
"@storybook/react": "^5.3.19",
"@storybook/react": "^6.0.12",
"@storybook/storybook-deployer": "^2.8.6",
"@testing-library/jest-dom": "^5.3.0",
"@testing-library/react": "^10.0.1",
"@testing-library/react": "^11.0.2",
"@testing-library/react-hooks": "^3.2.1",

@@ -128,4 +128,5 @@ "@types/classnames": "^2.2.9",

"resolutions": {
"webpack/acorn": "^6.4.1",
"acorn-globals/acorn": "^6.4.1"
"bl": "^4.0.3",
"acorn-globals/acorn": "^6.4.1",
"webpack/acorn": "^6.4.1"
},

@@ -132,0 +133,0 @@ "husky": {

@@ -7,34 +7,31 @@ # @trussworks/react-uswds

React USWDS 2.0 component library
**ReactUSWDS Component Library**
This is a front end component library whose aim is to develop [React](https://reactjs.org/) implementations of the design patterns defined by the [United States Web Design System (USWDS) 2.0](https://designsystem.digital.gov/). The primary goal of this library is to document and provide common UI components that can be included in other projects that adhere to or are based off of the USWDS, removing a significant amount of overhead UI development from such projects.
This is a frontend component library, built in [React](https://reactjs.org/) with [Typescript](https://www.typescriptlang.org/), based on design patterns defined by the [United States Web Design System (USWDS) 2.0](https://designsystem.digital.gov/). Our primary goal is to document and provide common UI components following the USWDS specification. This library removes a significant amount of overhead UI development for projects based on this standard.
A deployed instance of the ReactUSWDS Storybook is located at: https://trussworks.github.io/react-uswds/
A deployed instance of the ReactUSWDS Storybook is located at: [https://trussworks.github.io/react-uswds/](https://trussworks.github.io/react-uswds/)
## Table of Contents
An example application, built with React-USWDS, can be found in the `/example` folder and run with the appropriate [`yarn:example` commands](./docs/contributing.md#available-commands).
1. [Background](#background)
1. [Install](#install)
1. [Usage](#usage)
1. [Maintainers](#maintainers)
1. [Contributing](#contributing)
1. [License](#license)
1. [Roadmap](#roadmap)
**Table of Contents**
- [@trussworks/react-uswds](#trussworksreact-uswds)
- [Background](#background)
- [Non-Goals](#non-goals)
- [Install](#install)
- [Usage](#usage)
- [Maintainers](#maintainers)
- [Contributing](#contributing)
- [License](#license)
## Background
The primary deliverable is a published npm package that can be included as a dependency in other projects that use USWDS with React. In order for these components to be actually useful, they should follow best practices and baseline standards for accessible, semantic, markup; be well-tested across browsers and devices; and allow for an appropriate level of customization in implementation (such as via React `props`). Therefore we should adhere to these development guidelines as much as possible:
The primary deliverable is a published npm package that can be included as a dependency in other projects that use USWDS with React. In order for these components to be useful, they should follow best practices for accessible, semantic, markup; be well-tested across browsers and devices; and allow for an appropriate level of customization. We adhere to a set of [development guidelines](./docs/contributing.md#guidelines) as much as possible and use automation to enforce tests, linting, and other standards.
- Encourage a strict separation of concerns, focusing on UI (rendered HTML and CSS) rather than any application logic.
- Expose the necessary props for composability and extensibility, such as event handlers, custom CSS classes, etc.
- Maintain a high standard of unit test coverage and cross-browser/device support, so that projects including this depedency can focus on integration and implementation.
- Provide thorough documentation (using a web interface such as Storybook) so that users can view the components as they render in the UI, the source code required to use them, and specifications such as how props are used, a11y support, and test coverage.
- Consistent and transparent versioning so that multiple projects can rely on this package, and it can be maintained as React and USWDS release new versions while also providing backwards compatibility.
### Non-Goals
#### Non-Goals
This is not meant to be a one-size-fits-all front end solution, We are starting off with the opinionated decision to cater towards projects that use the U.S. Design System 2.0, and encapsulate these specific styles and markup in React components.
This is not meant to be a one-size-fits-all front end solution to every Truss web project. We are starting off with the very opinionated decision to cater towards a project that wants to use (or at least branch off of) USWDS 2.0, and is using React as a front end framework.
In the process, we expect to gain learnings around how to best abstract out UI code from implementation; how to better standardize and document front end code practices; and how to develop, maintain, and distribute a shared JS library in alignment with our [company values at Truss](https://truss.works/values).
In addition to working towards the above outcomes, we are hoping to gain learnings around how to best abstract out UI code from implementation; help demonstrate and standardize front end code practices for other Truss projects; and develop and distribute a shared JS library to other teams.
## Install

@@ -68,34 +65,6 @@

**[More info about using USWDS CSS & SCSS](./docs/scss.md)**
Note: If you aren't already using USWDS as a dependency, you also need to import uswds styles. **[Read more info about using USWDS styles and assets here](./docs/styles_and_assets.md)**
### Icons
Having issues? See [FAQs](./docs/faqs.md).
[USWDS recommends using Font Awesome](https://designsystem.digital.gov/components/icons/), and that project [provides a package for use with React](https://github.com/FortAwesome/react-fontawesome).
To add this to your project, install react-font-awesome and at least one style of icon:
```
yarn add @fortawesome/fontawesome-svg-core \
@fortawesome/free-solid-svg-icons \
@fortawesome/react-fontawesome
```
You can then add Font Awesome icons to your projects using the `FontAwesome` component:
```jsx
import ReactDOM from 'react-dom'
import { Button } from '@trussworks/react-uswds'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faSave } from '@fortawesome/free-solid-svg-icons'
const button = <Button type="button">
<FontAwesomeIcon icon={faSave} /> Save Changes
</Button>;
ReactDOM.render(button, document.body);
```
For more information on working with and configuring react-fontawesome, please see [that project's documentation](https://github.com/FortAwesome/react-fontawesome#installation). To find specific icons for your project, [search on the Font Awesome site](https://fontawesome.com/icons).
## Maintainers

@@ -102,0 +71,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc