Skip to content

Commit 3633bb1

Browse files
authored
Merge pull request #4236 from uswds/release-2.12.0
Release 2.12.0
2 parents de44902 + 1e076a9 commit 3633bb1

File tree

173 files changed

+7670
-6384
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+7670
-6384
lines changed

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
*.html
21
*.njk
32
*.woff*
43
*.svg

LICENSE.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
## A few parts of this project are not in the public domain
22

3+
### Copyright ownership of Works created by U.S. federal employees
4+
5+
This repository contains both the original design for Google Material Icons (the “Work”, as defined in Section 1 of the Apache 2.0 License) and modifications made by the General Services Administration (GSA). This repository combines the Work and these GSA modifications, which is a “Modified Version” of Material Icons.
6+
7+
This repository also contains both original designs for Source Sans Pro, Merriweather, and Font Awesome (the “Font Software”, as defined in Section 1 of the SIL Open Font License, version 1.1) and modifications made by the General Services Administration (GSA). This repository combines the Work and these GSA modifications, which is a “Modified Version” of Source Sans Pro, Merriweather, Public Sans, and Font Awesome respectively.
8+
9+
As a work of the United States Government, the software modifications made by GSA are not subject to copyright within the United States. Additionally, GSA waives copyright and related rights in its software modifications worldwide through the CC0 1.0 Universal Public Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/).
10+
11+
The Work (as defined in the Apache 2.0 License) and Font Software (as defined in the SIL Open Font License, Version 1.1) remains subject to copyright under the respective open source license. The section below lists which works are subject to particular open source licenses.
12+
13+
This Modified Version packaged as `dist/img/sprite.svg` contains both design elements under the Apache 2.0 License and design modifications by GSA released as CC0. It is a “joint work” made of the icon set and modifications combined into a single work.
14+
315
### Files licensed under the SIL Open Font License, Version 1.1
416

517
The Source Sans Pro font files in `src/fonts/source-sans-pro` are a [customized subset](https://github.com/miguelsousa/source-sans-pro-subset) of [Source Sans Pro](https://github.com/adobe-fonts/source-sans-pro) owned by Adobe Systems Incorporated, licensed under the [SIL Open Font License, Version 1.1](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL_web), and copyright 2010, 2012, 2014 [Adobe Systems Incorporated], with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States or other countries.
@@ -8,19 +20,17 @@ The Merriweather font files in `src/fonts/merriweather` are the version 2.001 fi
820

921
The Public Sans font files in `src/fonts/public-sans` are licensed under the [SIL Open Font License, Version 1.1](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL_web). Public Sans is a modification of Libre Franklin, copyright [Impallari Type](www.impallari.com).
1022

11-
The files in `src/img` are from [Font Awesome](http://fontawesome.io/) by Dave Gandy under the [SIL Open Font License, Version 1.1](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL_web).
23+
Icon files in `src/img` and `src/img/social-icons` are from [Font Awesome](http://fontawesome.io/) by Dave Gandy under the [SIL Open Font License, Version 1.1](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL_web).
1224

1325
### Files licensed under the Apache 2.0 License
1426

1527
The Roboto Mono font files in `src/fonts/roboto-mono` are licensed under the [Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt).
1628

17-
The Google Material icons in `src/img/usa-icons` and `src/img/usa-icons-unused` are licensed under the [Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt).
29+
The Google Material Icons in `src/img/usa-icons` and `src/img/material-icons` are licensed under the [Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt).
1830

1931
### Files licensed under the MIT license
2032

21-
The files in `src/stylesheets/lib` are from:
22-
23-
- [Normalize.css](https://github.com/necolas/normalize.css), copyright Nicolas Gallagher and Jonathan Neal, under the [MIT license](https://github.com/necolas/normalize.css/blob/master/LICENSE.md).
33+
The files in `src/stylesheets/lib` are from [Normalize.css](https://github.com/necolas/normalize.css), copyright Nicolas Gallagher and Jonathan Neal, under the [MIT license](https://github.com/necolas/normalize.css/blob/master/LICENSE.md).
2434

2535
#### Full license text for the MIT licensed files:
2636

@@ -44,13 +54,13 @@ Additionally, we waive copyright and related rights in the work worldwide throug
4454

4555
This is a human-readable summary of the [Legal Code (read the full text)](https://creativecommons.org/publicdomain/zero/1.0/legalcode).
4656

47-
#### No Copyright
57+
#### No copyright
4858

4959
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
5060

5161
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
5262

53-
#### Other Information
63+
#### Other information
5464

5565
In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights.
5666

@@ -59,3 +69,7 @@ Unless expressly stated otherwise, the person who associated a work with this de
5969
### Contributions to this project
6070

6171
As stated in [CONTRIBUTING](CONTRIBUTING.md), all contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.
72+
73+
### Trademark
74+
75+
GSA owns, reserves, and retains all rights, title, and interest in all trademarks owned by GSA. The User does not acquire any right or interest of any kind in any GSA trademark because of their use of the Modified Version or any of the modifications made to the Work by GSA.

README.md

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,35 @@ This repository is for the design system code itself. We maintain [another repos
88

99
## Contents
1010

11-
- [Background](#background)
12-
- [Recent updates](#recent-updates)
13-
- [Getting started](#getting-started)
14-
- [Using the design system](#using-the-design-system)
15-
- [Download and install](#download-and-install)
16-
- [Install using `npm`](#install-using-npm)
17-
- [Using the USWDS package](#using-the-uswds-package)
18-
- [Sass and theme settings](#sass-and-theme-settings)
19-
- [Sass compilation requirements](#sass-compilation-requirements)
20-
- [JavaScript](#javascript)
21-
- [Use another framework or package manager](#use-another-framework-or-package-manager)
22-
- [CSS architecture](#css-architecture)
23-
- [JS customization](#js-customization)
24-
- [Customization, theming, and tokens](#customization-theming-and-tokens)
25-
- [Using tokens in theme settings](#using-tokens-in-theme-settings)
26-
- [Set the base asset paths (fonts and images)](#set-the-base-asset-paths-fonts-and-images)
27-
- [Main variables that can be customized](#main-variables-that-can-be-customized)
28-
- [Where things live](#where-things-live)
29-
- [Browser support](#browser-support)
30-
- [Accessibility](#accessibility)
31-
- [Fractal](#fractal)
32-
- [Template compatibility](#template-compatibility)
33-
- [Need installation help?](#need-installation-help)
34-
- [Contributing to the code base](#contributing-to-the-code-base)
35-
- [Reuse of open-source style guides](#reuse-of-open-source-style-guides)
36-
- [Licenses and attribution](#licenses-and-attribution)
11+
- [United States Web Design System](#united-states-web-design-system)
12+
- [Contents](#contents)
13+
- [Background](#background)
14+
- [Recent updates](#recent-updates)
15+
- [Getting started](#getting-started)
16+
- [Using the design system](#using-the-design-system)
17+
- [Download and install](#download-and-install)
18+
- [Install using npm](#install-using-npm)
19+
- [Using the USWDS package](#using-the-uswds-package)
20+
- [Sass and theme settings](#sass-and-theme-settings)
21+
- [Sass compilation requirements](#sass-compilation-requirements)
22+
- [JavaScript](#javascript)
23+
- [Use another framework or package manager](#use-another-framework-or-package-manager)
24+
- [CSS architecture](#css-architecture)
25+
- [JS customization](#js-customization)
26+
- [Customization, theming, and tokens](#customization-theming-and-tokens)
27+
- [Using tokens in theme settings](#using-tokens-in-theme-settings)
28+
- [Set the base asset paths (fonts and images)](#set-the-base-asset-paths-fonts-and-images)
29+
- [Where things live](#where-things-live)
30+
- [Browser support](#browser-support)
31+
- [Accessibility](#accessibility)
32+
- [Fractal](#fractal)
33+
- [Template compatibility](#template-compatibility)
34+
- [Long-term support of v1.x](#long-term-support-of-v1x)
35+
- [Need installation help?](#need-installation-help)
36+
- [Contributing to the code base](#contributing-to-the-code-base)
37+
- [Reuse of open-source style guides](#reuse-of-open-source-style-guides)
38+
- [Licenses and attribution](#licenses-and-attribution)
39+
- [Contributing](#contributing)
3740

3841
## Background
3942

@@ -62,12 +65,12 @@ How you implement the design system depends on the needs of your project and you
6265

6366
### Download and install
6467

65-
1. Download the [USWDS zip file](https://github.com/uswds/uswds/releases/download/v2.11.2/uswds-2.11.2.zip) from the latest USWDS release and open that file.
68+
1. Download the [USWDS zip file](https://github.com/uswds/uswds/releases/download/v2.12.0/uswds-2.12.0.zip) from the latest USWDS release and open that file.
6669

6770
After extracting the zip file you should see the following file and folder structure:
6871

6972
```
70-
uswds-2.11.2/
73+
uswds-2.12.0/
7174
├── css/
7275
│   ├── uswds.min.css.map
7376
│   ├── uswds.min.css
@@ -98,7 +101,7 @@ How you implement the design system depends on the needs of your project and you
98101
```
99102
example-project/
100103
├── assets/
101-
│   ├── uswds-2.11.2/
104+
│   ├── uswds-2.12.0/
102105
│   ├── stylesheets/
103106
│   ├── images/
104107
│   └── javascript/
@@ -118,11 +121,11 @@ How you implement the design system depends on the needs of your project and you
118121
<meta charset="utf-8" />
119122
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
120123
<title>My Example Project</title>
121-
<script src="assets/uswds-2.11.2/js/uswds-init.min.js"></script>
122-
<link rel="stylesheet" href="assets/uswds-2.11.2/css/uswds.min.css" />
124+
<script src="assets/uswds-2.12.0/js/uswds-init.min.js"></script>
125+
<link rel="stylesheet" href="assets/uswds-2.12.0/css/uswds.min.css" />
123126
</head>
124127
<body>
125-
<script src="assets/uswds-2.11.2/js/uswds.min.js"></script>
128+
<script src="assets/uswds-2.12.0/js/uswds.min.js"></script>
126129
</body>
127130
</html>
128131
```
@@ -247,7 +250,7 @@ We recommend using a **minifier** like [csso](https://github.com/css/csso) to co
247250

248251
### Use another framework or package manager
249252

250-
If you’re using another framework or package manager that doesn’t support `npm`, you can find the source files in this repository and use them in your project. Otherwise, we recommend that you follow the [download instructions](#download). Please note that the core team [isn’t responsible for all frameworks’ implementations](https://github.com/uswds/uswds/issues/877).
253+
If you’re using another framework or package manager that doesn’t support `npm`, you can find the source files in this repository and use them in your project. Otherwise, we recommend that you follow the [download instructions](#download-and-install). Please note that the core team [isn’t responsible for all frameworks’ implementations](https://github.com/uswds/uswds/issues/877).
251254

252255
If you’re interested in maintaining a package that helps us distribute USWDS, the project’s build system can help you create distribution bundles to use in your project. Please read our [contributing guidelines](CONTRIBUTING.md#building-the-project-locally-with--gulp-) to locally build distributions for your framework or package manager.
253256

@@ -304,7 +307,9 @@ function App() {
304307

305308
useEffect(() => {
306309
// initialize
307-
characterCount.on(ref); // default ref is document.body, if you want to use default you do not have to pass arguments
310+
characterCount.on(ref);
311+
// default ref is document.body, if you want to use
312+
// default you do not have to pass arguments
308313
accordion.on();
309314

310315
// remove event listeners when component un-mounts.
@@ -321,7 +326,9 @@ Angular example:
321326
```js
322327
export class App implements OnInit {
323328
constructor() {
324-
this.ref = document.body; // default ref is document.body, if you want to use default you do not have to pass arguments
329+
this.ref = document.body;
330+
// default ref is document.body, if you want to use
331+
// default you do not have to pass arguments
325332
}
326333

327334
ngOnInit() {
@@ -338,6 +345,8 @@ export class App implements OnInit {
338345
}
339346
```
340347

348+
> Those using **Webpack 5** can take advantage of the updated exports field which allows declaration for requests like `import "uswds"` or `import accordion from "uswds/src/js/components/accordion"`
349+
341350
## Customization, theming, and tokens
342351

343352
USWDS 2.0 provides extensive support for theming via its theme settings files introduced in [Sass and theme settings](#sass-and-theme-settings), above.

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ We include a security and vulnerability report with every USWDS release, and rel
1515
We encourage you to verify the security and status of the USWDS package:
1616

1717
1. **Check the vulnerability badge.** Confirm the vulnerability badge in the [USWDS Github code repository](https://github.com/uswds/uswds) says there are `0` vulnerabilities.
18-
1. **Download the package via npm.** We recommend using the [npm package](https://designsystem.digital.gov/documentation/developers/#install-using-npm) instead of the [zip file](https://designsystem.digital.gov/documentation/developers/#download), whenever possible. Using npm makes it easier to stay up-to-date and use the latest USWDS version as a project dependency, and is a secure and reliable way to download USWDS source code.
18+
1. **Download the package via npm.** We recommend using the [npm package](https://designsystem.digital.gov/documentation/developers/#install-using-npm) instead of the [zip file](https://designsystem.digital.gov/documentation/developers/#download-and-install), whenever possible. Using npm makes it easier to stay up-to-date and use the latest USWDS version as a project dependency, and is a secure and reliable way to download USWDS source code.
1919

2020
## Report a security issue
2121

config/gulp/sass.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@ const gulpStylelint = require("gulp-stylelint");
88
const postcss = require("gulp-postcss");
99
const replace = require("gulp-replace");
1010
const rename = require("gulp-rename");
11-
const sass = require("gulp-sass");
11+
const sass = require("gulp-dart-scss");
1212
const sourcemaps = require("gulp-sourcemaps");
1313
const changed = require("gulp-changed");
1414
const dutil = require("./doc-util");
1515
const pkg = require("../../package.json");
16+
const { logError } = require("./doc-util");
1617

1718
const task = "sass";
1819
const normalizeCssFilter = filter("**/normalize.css", { restore: true });
1920

20-
sass.compiler = require("sass");
21-
2221
const IGNORE_STRING = "This file is ignored";
2322
const ignoreStylelintIgnoreWarnings = (lintResults) =>
2423
formatters.string(
@@ -91,13 +90,7 @@ gulp.task(
9190
return gulp
9291
.src("src/stylesheets/uswds.scss")
9392
.pipe(sourcemaps.init({ largeFile: true }))
94-
.pipe(
95-
sass
96-
.sync({
97-
outputStyle: "expanded",
98-
})
99-
.on("error", sass.logError)
100-
)
93+
.pipe(sass({ outputStyle: "expanded" }).on("error", logError))
10194
.pipe(postcss(pluginsProcess))
10295
.pipe(replace(/\buswds @version\b/g, `uswds v${pkg.version}`))
10396
.pipe(gulp.dest("dist/css"))

examples/README.md

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

examples/browserify/README.md

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

examples/browserify/js/.gitignore

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

examples/browserify/package.json

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

examples/browserify/src/js/main.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)