Skip to content

Commit 1dfde98

Browse files
authored
Merge branch 'develop' into mh/add-flag-prop
2 parents fbc3074 + 6d48c13 commit 1dfde98

File tree

11 files changed

+141
-83
lines changed

11 files changed

+141
-83
lines changed

.changeset/good-needles-fix.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@uswds/elements": patch
3+
---
4+
5+
- Add documentaton
6+
- Export types for various front-end frameworks
7+
- Add component registration helper with collision checking for custom elements
8+
- Provide React wrapper for web component implementation

.changeset/pre.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"@uswds/elements": "1.0.0-alpha.2"
66
},
77
"changesets": [
8+
"good-needles-fix",
89
"petite-dodos-call",
910
"twenty-socks-reflect"
1011
]

CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
# @uswds/elements
22

3+
## 1.0.0-alpha.5
4+
5+
### Patch Changes
6+
7+
- 395cb36: - Add documentaton
8+
- Export types for various front-end frameworks
9+
- Add component registration helper with collision checking for custom elements
10+
- Provide React wrapper for web component implementation
11+
312
## 1.0.0-alpha.4
413

514
### Patch Changes
615

716
- 3661a08: Web components: TypeScript conversion and build improvements.
8-
- Resolved vite error [#222](https://github.com/uswds/uswds-elements/issues/222#issue-3623280254)
9-
- Provided types export in package [#221](https://github.com/uswds/uswds-elements/issues/221)
17+
- Resolved vite error [#222](https://github.com/uswds/uswds-elements/issues/222#issue-3623280254)
18+
- Provided types export in package [#221](https://github.com/uswds/uswds-elements/issues/221)
1019

1120
## 1.0.0-alpha.3
1221

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
> [!CAUTION]
2-
> Work on USWDS Elements, the Web Component version of the Design System, is happening in this repository. This code may not all be suitable for production use. Please refer to the documentation for each component.
2+
> Work on development of the HTML Web Component version of the U.S. Web Design System, called USWDS Elements, is happening in this repository. This code may not all be suitable for production use. Work on USWDS Elements is currently taking a slower-than-previous iterative approach to development. Each USWDS Elements component in this repository may be in a different state of development, with USWDS Banner always intended to be closest to stable. Please refer to the documentation for the status of each component.
33
44
# USWDS Elements
55

66
The [United States Web Design System](https://designsystem.digital.gov) is a toolkit of principles, guidance, and code that includes a library of open source user interface components and a visual style guide for U.S. federal government websites.
77

8-
This repository contains the code for the Web Component-based version of the design system, which is currently in pre-release status, with a goal release of May 2025. We maintain other repositories for the [current version of the design system](https://github.com/uswds/uswds), which we call USWDS Core, as well as [its documentation and website](https://github.com/uswds/uswds-site). For USWDS Core and its documentation on the web, visit [https://designsystem.digital.gov](https://designsystem.digital.gov).
8+
This repository contains the code for the Web Component-based version of the design system, which is currently in pre-release status. We maintain other repositories for the [current version of the design system](https://github.com/uswds/uswds), which we call USWDS Core, as well as [its documentation and website](https://github.com/uswds/uswds-site). For USWDS Core and its documentation, visit [https://designsystem.digital.gov](https://designsystem.digital.gov).
99

10-
Over the course of the next several months and beyond, we will incrementally build new [Web Component](https://developer.mozilla.org/en-US/docs/Web/API/Web_components)-based implementations of USWDS Core. As we ship new USWDS Web Components, our intent is that you'll be able to use them alongside existing USWDS code.
10+
We're working on incrementally building new [Web Component](https://developer.mozilla.org/en-US/docs/Web/API/Web_components)-based implementations of USWDS Core components. As we ship new USWDS Elements Web Components, our intent is that you'll be able to use them alongside existing USWDS code.
1111

1212
- [More on our decision to use Web Components](https://github.com/uswds/uswds-proposals/blob/main/decisions/0001-use-web-components.md)
1313

1414
## Upgrading to Web Components
1515

16-
We are releasing these Web Components (USWDS Elements) incrementally with the intent that they can also be added gradually to existing sites that are currently using USWDS. If you aren't currently using USWDS or you're using a version older than USWDS 3, we recommend adopting version 3 in the near term rather than waiting until all of USWDS Elements is production-ready.
16+
We're releasing these Web Components (USWDS Elements) incrementally with the intent that they can also be added gradually to existing sites that are currently using USWDS Core. If you aren't currently using USWDS or you're using a version older than the current USWDS 3, we recommend adopting version 3 in the near term rather than waiting until all of USWDS Elements is production-ready.
1717

1818
## Installation using node and npm
1919

20-
1. Install `node/npm`. Below is a link to find the install method that coincides with your operating system:
20+
1. Install `node/npm`. In the link below you can find the install method that coincides with your operating system:
2121
- Node (see [.nvmrc](https://github.com/uswds/uswds-elements/blob/develop/.nvmrc) for version number), [Installation guides](https://nodejs.org/en/download)
2222

2323
**Note for Windows users:** If you are using Windows and are unfamiliar with Node or npm, we recommend following [Team Treehouse's tutorial](http://blog.teamtreehouse.com/install-node-js-npm-windows) for more information or [installing and running your project from Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl#install-nvm-nodejs-and-npm).
@@ -43,7 +43,7 @@ The `@uswds/elements` module is now installed as a dependency.
4343

4444
## Using USWDS Elements in your project
4545

46-
How you add the component to a page may vary depending on the tools you use in your work. If you use Vite, you can add components by importing them into a script that is imported elsewhere into a page:
46+
How you add a USWDS Elements component to a page might vary depending on your tools. If you use Vite, you can add components by importing them into a script that's imported elsewhere into a page:
4747
4848
```js
4949
// Importing into a javascript file, like index.js
@@ -62,7 +62,7 @@ import { UsaBanner } from "@uswds/elements";
6262
6363
Each USWDS Element provides support for theming by exposing CSS custom properties (CSS variables) that can be used to control the appearance of the component.
6464
65-
There are interactive form controls in our Storybook instance that demonstrate how to use the theming variables, provide custom text, and otherwise customize the components.
65+
Interactive form controls in our Storybook instance can demonstrate how to use the theming variables, provide custom text, and otherwise customize the components.
6666
6767
For example, the `usa-banner` component can be customized by setting the `--usa-banner-background-color` CSS variable to a color of your choosing:
6868
@@ -76,9 +76,9 @@ For example, the `usa-banner` component can be customized by setting the `--usa-
7676
<usa-banner></usa-banner>
7777
```
7878
79-
This can be seen in the demo on the [USWDS Elements Storybook](<https://federalist-ab6c0bdb-eccd-4b26-bb5f-b0154661e999.sites.pages.cloud.gov/site/uswds/web-components/?path=/story/components-banner--default&args=--usa-banner-background-color:!hex(e4f7ff)>).
79+
You can see this in the demo on the [USWDS Elements Storybook](<https://federalist-ab6c0bdb-eccd-4b26-bb5f-b0154661e999.sites.pages.cloud.gov/site/uswds/web-components/?path=/story/components-banner--default&args=--usa-banner-background-color:!hex(e4f7ff)>).
8080
81-
**Note:** Please be mindful of the accessibility implications of customizing component appearance. It is your responsibility to ensure that your customizations meet the [accessibility requirements](https://designsystem.digital.gov/accessibility/) of the design system and pass any [WCAG 2.2](https://www.w3.org/TR/WCAG22/) or [Section 508](https://www.section508.gov/) accessibility tests.
81+
**Note:** Please be mindful of the accessibility implications of customizing component appearance. It's **your** responsibility to ensure that your customizations meet the [accessibility requirements](https://designsystem.digital.gov/accessibility/) of the design system and pass any [WCAG 2.2](https://www.w3.org/TR/WCAG22/) or [Section 508](https://www.section508.gov/) accessibility tests.
8282

8383
## Documentation
8484

@@ -108,15 +108,15 @@ We use Changesets to manage changelogs, version bumps, pre-releases (alpha/beta)
108108

109109
### Pre-release flow
110110

111-
If you are working on a pre-release version, enter pre-release mode:
111+
If you're working on a pre-release version, enter pre-release mode:
112112
113113
```bash
114114
npx @changesets/cli pre enter <tag> # for example, npx @changesets/cli pre enter alpha
115115
```
116116
117117
This will write a `.changeset/pre.json` that configures the pre-release tag and initial version. This file should be committed to the repository.
118118
119-
**Note:** Once you are in pre-release mode, you do not have to enter it every time. When you are ready to exit pre-release mode, run:
119+
**Note:** Once you're in pre-release mode, you don't have to enter it every time. When you're ready to exit pre-release mode, run:
120120

121121
```bash
122122
npx @changesets/cli pre exit
@@ -131,7 +131,7 @@ npx @changesets/cli pre exit
131131
npx @changesets/cli
132132
```
133133

134-
- The command creates a file under the `.changeset/` directory that describes the packages and the release type (patch/minor/major). You can edit this file to add more details, such as a link to the issue or pull request that the change addresses. The file will get a nonsensical name like `fire-penguin-annex.md`, and that's to be expected. These files are only in the repository for a short time and are used to generate changelogs and version bumps. They are not published to NPM and are cleaned up after the release is published.
134+
- The command creates a file under the `.changeset/` directory that describes the packages and the release type (patch/minor/major). You can edit this file to add more details, such as a link to the issue or pull request that the change addresses. The file will automatically get a nonsensical name like `fire-penguin-annex.md`, and that's normal. These files are only in the repository for a short time, to generate changelogs and version bumps. They aren't published to NPM and are cleaned up after the release is published.
135135

136136
2. Bump versions locally (optional)
137137
- To update package.json versions and changelogs locally before publishing:
@@ -160,7 +160,7 @@ npx @changesets/cli pre exit
160160

161161
#### How the automation works (GitHub Actions)
162162

163-
- There is a CI workflow configured to automate release and publish:
163+
- There's a CI workflow configured to automate release and publish:
164164
- The workflow runs on pushes to `main` and uses the Changesets GitHub Action.
165165
- The action can either create a release PR or publish directly to NPM depending on repository and action settings.
166166
- The workflow uses repository secrets:
@@ -176,10 +176,10 @@ npx @changesets/cli pre exit
176176
- CI vs local publish:
177177
- For most contributors, pushing a properly authored changeset and opening a PR is the recommended route—automation will create the release or open the release PR for maintainers to review.
178178
- If you must publish locally, make sure `NPM_TOKEN` is configured in your environment or use a CI/protected account to run the publish steps.
179-
- If releases are not being published as expected:
179+
- If releases aren't being published as expected:
180180
- Verify `NPM_TOKEN` exists in repository secrets and has publish scope.
181181
- Ensure the commit/push to `main` contains a changeset (or the automation has been triggered by the Changesets action).
182-
- Review the release workflow logs in GitHub Actions for details (it will show the changesets step and any publishing errors).
182+
- Review the release workflow logs in GitHub Actions for details (it'll show the changesets step and any publishing errors).
183183
- If you want to change the default pre-release tag (for example, from `alpha` to `beta`), update the `.changeset/pre.json` file and follow the pre-mode steps above.
184184
185185
Example quick flow (pre-release -> publish via automation)

examples/with-astro/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"astro": "astro"
1010
},
1111
"dependencies": {
12-
"@uswds/elements": "1.0.0-alpha.4",
12+
"@uswds/elements": "1.0.0-alpha.5",
1313
"astro": "^5.16.0"
1414
}
15-
}
15+
}

examples/with-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@uswds/elements": "1.0.0-alpha.4",
13+
"@uswds/elements": "1.0.0-alpha.5",
1414
"react": "^19.2.0",
1515
"react-dom": "^19.2.0"
1616
},

examples/with-solid/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@uswds/elements": "1.0.0-alpha.4",
12+
"@uswds/elements": "1.0.0-alpha.5",
1313
"solid-js": "^1.9.10"
1414
},
1515
"devDependencies": {

examples/with-vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@uswds/elements": "1.0.0-alpha.4",
12+
"@uswds/elements": "1.0.0-alpha.5",
1313
"vue": "^3.5.24"
1414
},
1515
"devDependencies": {

0 commit comments

Comments
 (0)