@newjersey/njwds 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -1
- package/README.md +4 -0
- package/dist/css/button.css +1 -1
- package/dist/css/button.css.map +1 -1
- package/dist/css/icon.css +1 -1
- package/dist/css/icon.css.map +1 -1
- package/dist/css/styles.css +2 -2
- package/dist/css/styles.css.map +1 -1
- package/gulpfile.js +20 -26
- package/package.json +26 -2
- package/src/components/banner/banner.config.yml +2 -2
- package/src/components/banner/banner.njk +8 -1
- package/src/components/feedback-widget/feedback-widget.config.yml +1 -1
- package/src/components/identifier/identifier.njk +2 -2
- package/src/data/matched-colors.json +2 -1
- package/src/sass/_uswds-theme-custom-styles.scss +14 -12
package/gulpfile.js
CHANGED
|
@@ -49,9 +49,9 @@ const JS_DEST = "./dist/js";
|
|
|
49
49
|
// Compiled CSS destination
|
|
50
50
|
const CSS_DEST = "./dist/css";
|
|
51
51
|
|
|
52
|
-
const DIST_DIR = "./dist"
|
|
52
|
+
const DIST_DIR = "./dist";
|
|
53
53
|
|
|
54
|
-
const FRACTAL_STATIC_ASSETS_DIR = "./public"
|
|
54
|
+
const FRACTAL_STATIC_ASSETS_DIR = "./public";
|
|
55
55
|
|
|
56
56
|
// Site CSS destination
|
|
57
57
|
// Like the _site/assets/css directory in Jekyll, if necessary.
|
|
@@ -65,9 +65,7 @@ TASKS
|
|
|
65
65
|
*/
|
|
66
66
|
|
|
67
67
|
gulp.task("copy-uswds-setup", () => {
|
|
68
|
-
return gulp
|
|
69
|
-
.src(`${uswds}/scss/theme/**/**`)
|
|
70
|
-
.pipe(gulp.dest(`${PROJECT_SASS_SRC}`));
|
|
68
|
+
return gulp.src(`${uswds}/scss/theme/**/**`).pipe(gulp.dest(`${PROJECT_SASS_SRC}`));
|
|
71
69
|
});
|
|
72
70
|
|
|
73
71
|
gulp.task("copy-uswds-fonts", () => {
|
|
@@ -86,12 +84,12 @@ gulp.task("copy-uswds-js", () => {
|
|
|
86
84
|
return gulp.src(`${uswds}/dist/js/**/**`).pipe(gulp.dest(`${JS_DEST}`));
|
|
87
85
|
});
|
|
88
86
|
|
|
89
|
-
gulp.task("build-sass", function(done) {
|
|
87
|
+
gulp.task("build-sass", function (done) {
|
|
90
88
|
var plugins = [
|
|
91
89
|
// Autoprefix
|
|
92
90
|
autoprefixer({
|
|
93
91
|
cascade: false,
|
|
94
|
-
grid: true
|
|
92
|
+
grid: true,
|
|
95
93
|
}),
|
|
96
94
|
// Minify
|
|
97
95
|
csso({ forceMediaMerge: false }),
|
|
@@ -102,12 +100,8 @@ gulp.task("build-sass", function(done) {
|
|
|
102
100
|
.pipe(sourcemaps.init({ largeFile: true }))
|
|
103
101
|
.pipe(
|
|
104
102
|
sass({
|
|
105
|
-
includePaths: [
|
|
106
|
-
|
|
107
|
-
`${uswds}`,
|
|
108
|
-
`${uswds}/packages`
|
|
109
|
-
]
|
|
110
|
-
})
|
|
103
|
+
includePaths: [`${PROJECT_SASS_SRC}`, `${uswds}`, `${uswds}/packages`],
|
|
104
|
+
}),
|
|
111
105
|
)
|
|
112
106
|
.pipe(replace(/\buswds @version\b/g, "based on uswds v" + pkg.version))
|
|
113
107
|
.pipe(postcss(plugins))
|
|
@@ -125,8 +119,8 @@ gulp.task(
|
|
|
125
119
|
"copy-uswds-fonts",
|
|
126
120
|
"copy-uswds-images",
|
|
127
121
|
"copy-uswds-js",
|
|
128
|
-
"build-sass"
|
|
129
|
-
)
|
|
122
|
+
"build-sass",
|
|
123
|
+
),
|
|
130
124
|
);
|
|
131
125
|
|
|
132
126
|
gulp.task(
|
|
@@ -136,22 +130,22 @@ gulp.task(
|
|
|
136
130
|
"copy-uswds-images",
|
|
137
131
|
"copy-src-images",
|
|
138
132
|
"copy-uswds-js",
|
|
139
|
-
"build-sass"
|
|
140
|
-
)
|
|
133
|
+
"build-sass",
|
|
134
|
+
),
|
|
141
135
|
);
|
|
142
136
|
|
|
143
137
|
gulp.task("copy-dist-to-fractal-assets", () => {
|
|
144
138
|
return gulp.src(`${DIST_DIR}/**/**`).pipe(gulp.dest(`${FRACTAL_STATIC_ASSETS_DIR}/dist`));
|
|
145
139
|
});
|
|
146
140
|
|
|
147
|
-
gulp.task("watch-sass", function() {
|
|
148
|
-
gulp.watch(
|
|
141
|
+
gulp.task("watch-sass", function () {
|
|
142
|
+
gulp.watch(
|
|
143
|
+
`${PROJECT_SASS_SRC}/**/*.scss`,
|
|
144
|
+
gulp.series("copy-src-images", "build-sass", "copy-dist-to-fractal-assets"),
|
|
145
|
+
);
|
|
149
146
|
});
|
|
150
147
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
"copy-src-images",
|
|
154
|
-
|
|
155
|
-
"copy-dist-to-fractal-assets",
|
|
156
|
-
"watch-sass",
|
|
157
|
-
));
|
|
148
|
+
gulp.task(
|
|
149
|
+
"watch-fractal",
|
|
150
|
+
gulp.series("copy-src-images", "build-sass", "copy-dist-to-fractal-assets", "watch-sass"),
|
|
151
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newjersey/njwds",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "NJ Web Design Standards",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
"import-components": "cp -nr node_modules/uswds/src/components ./src/",
|
|
10
10
|
"build-docs": "gulp copy-dist-to-fractal-assets && fractal build",
|
|
11
11
|
"start": "fractal start --sync & gulp watch-fractal",
|
|
12
|
-
"deploy": "npm ci && npm run build-docs && gh-pages -d build"
|
|
12
|
+
"deploy": "npm ci && npm run build-docs && gh-pages -d build",
|
|
13
|
+
"format": "prettier . --write",
|
|
14
|
+
"format:check": "prettier . --check",
|
|
15
|
+
"lint": "eslint",
|
|
16
|
+
"test": "echo \"Warn: no test specified\" && exit 0"
|
|
13
17
|
},
|
|
14
18
|
"repository": {
|
|
15
19
|
"type": "git",
|
|
@@ -25,10 +29,21 @@
|
|
|
25
29
|
"@uswds/uswds": "3.10.0"
|
|
26
30
|
},
|
|
27
31
|
"devDependencies": {
|
|
32
|
+
"@eslint/js": "^9.39.2",
|
|
28
33
|
"@frctl/fractal": "^1.5.1",
|
|
29
34
|
"@frctl/nunjucks": "^2.0.5",
|
|
35
|
+
"@html-eslint/eslint-plugin": "^0.52.1",
|
|
36
|
+
"@types/node": "^22.19.6",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^8.53.0",
|
|
38
|
+
"@typescript-eslint/parser": "^8.53.0",
|
|
30
39
|
"autoprefixer": "^10.4.0",
|
|
40
|
+
"eslint": "^9.39.2",
|
|
41
|
+
"eslint-config-prettier": "^10.1.8",
|
|
42
|
+
"eslint-plugin-lit": "^2.1.1",
|
|
43
|
+
"eslint-plugin-lit-a11y": "^5.1.1",
|
|
44
|
+
"eslint-plugin-wc": "^3.0.2",
|
|
31
45
|
"gh-pages": "^3.1.0",
|
|
46
|
+
"globals": "^17.0.0",
|
|
32
47
|
"gulp": "^4.0.2",
|
|
33
48
|
"gulp-postcss": "^9.0.1",
|
|
34
49
|
"gulp-rename": "^2.0.0",
|
|
@@ -36,11 +51,20 @@
|
|
|
36
51
|
"gulp-sass": "^5.1.0",
|
|
37
52
|
"gulp-sourcemaps": "^3.0.0",
|
|
38
53
|
"gulp-svg-sprite": "^1.5.0",
|
|
54
|
+
"husky": "^9.1.7",
|
|
55
|
+
"jiti": "^2.6.1",
|
|
56
|
+
"lint-staged": "^16.2.7",
|
|
39
57
|
"postcss": "^8.3.11",
|
|
40
58
|
"postcss-csso": "^5.0.1",
|
|
59
|
+
"prettier": "^3.7.4",
|
|
41
60
|
"sass": "^1.51.0",
|
|
61
|
+
"typescript": "^5.9.3",
|
|
62
|
+
"typescript-eslint": "^8.53.0",
|
|
42
63
|
"uswds-gulp": "github:uswds/uswds-gulp"
|
|
43
64
|
},
|
|
65
|
+
"lint-staged": {
|
|
66
|
+
"**/*": "prettier --write --ignore-unknown"
|
|
67
|
+
},
|
|
44
68
|
"files": [
|
|
45
69
|
"dist",
|
|
46
70
|
"src",
|
|
@@ -14,5 +14,5 @@ context:
|
|
|
14
14
|
# be updated when the banner text changes in order to keep the same
|
|
15
15
|
# wrapping behavior.
|
|
16
16
|
stateOfNjText: "Official Site of the State of New Jersey"
|
|
17
|
-
governorName: "Governor
|
|
18
|
-
ltGovernorName: "Lt. Governor
|
|
17
|
+
governorName: "Governor Mikie Sherrill"
|
|
18
|
+
ltGovernorName: "Lt. Governor Dr. Dale G. Caldwell"
|
|
@@ -9,7 +9,14 @@
|
|
|
9
9
|
<a href="https://nj.gov">{{ banner.stateOfNjText }}</a>
|
|
10
10
|
</div>
|
|
11
11
|
<ul class="grid-col-auto display-flex flex-align-center">
|
|
12
|
-
<li>
|
|
12
|
+
<li>
|
|
13
|
+
<a
|
|
14
|
+
href="https://nj.gov/governor/"
|
|
15
|
+
target="_blank"
|
|
16
|
+
>
|
|
17
|
+
{{ banner.governorName }} • {{ banner.ltGovernorName }}
|
|
18
|
+
</a>
|
|
19
|
+
</li>
|
|
13
20
|
<li class="grid-col-auto">
|
|
14
21
|
<a
|
|
15
22
|
class="display-flex flex-align-center"
|
|
@@ -2,7 +2,7 @@ label: Feedback widget
|
|
|
2
2
|
default: success
|
|
3
3
|
|
|
4
4
|
context:
|
|
5
|
-
mockFetchScriptSrc: "
|
|
5
|
+
mockFetchScriptSrc: "../../public/js/mockFetch.js"
|
|
6
6
|
widgetVersion: "latest"
|
|
7
7
|
feedbackApiUrl: "https://innovation.nj.gov/app/feedback/dev"
|
|
8
8
|
mockSuccessResponse: { status: 200, body: { message: "Success", feedbackId: 1 } }
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
<ul class="usa-identifier__required-links-list">
|
|
71
71
|
<li class="usa-identifier__required-links-item">
|
|
72
72
|
<a href="https://nj.gov/governor/admin/about/" class="usa-identifier__required-link">
|
|
73
|
-
Governor
|
|
73
|
+
Governor Mikie Sherrill
|
|
74
74
|
</a>
|
|
75
75
|
</li>
|
|
76
76
|
<li class="usa-identifier__required-links-item">
|
|
77
77
|
<a href="https://nj.gov/governor/admin/lt/"
|
|
78
78
|
class="usa-identifier__required-link">
|
|
79
|
-
Lt. Governor
|
|
79
|
+
Lt. Governor Dr. Dale G. Caldwell
|
|
80
80
|
</a>
|
|
81
81
|
</li>
|
|
82
82
|
<li class="usa-identifier__required-links-item">
|
|
@@ -46,7 +46,7 @@ i.e.
|
|
|
46
46
|
|
|
47
47
|
// Set min-width so the names are hidden before the stateOfNjText wraps to
|
|
48
48
|
// 3 lines
|
|
49
|
-
@media (min-width:
|
|
49
|
+
@media (min-width: 46rem) {
|
|
50
50
|
display: inline;
|
|
51
51
|
}
|
|
52
52
|
@include u-margin-right(1);
|
|
@@ -256,14 +256,14 @@ i.e.
|
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
.usa-icon:not(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
259
|
+
.usa-icon--size-3,
|
|
260
|
+
.usa-icon--size-4,
|
|
261
|
+
.usa-icon--size-5,
|
|
262
|
+
.usa-icon--size-6,
|
|
263
|
+
.usa-icon--size-7,
|
|
264
|
+
.usa-icon--size-8,
|
|
265
|
+
.usa-icon--size-9
|
|
266
|
+
) {
|
|
267
267
|
height: 20px;
|
|
268
268
|
width: 20px;
|
|
269
269
|
}
|
|
@@ -292,9 +292,11 @@ i.e.
|
|
|
292
292
|
.usa-checkbox__input--tile + [class*="__label"] {
|
|
293
293
|
border-color: color($theme-color-base-light);
|
|
294
294
|
}
|
|
295
|
-
.usa-radio__input.usa-radio__input--tile:checked + [class*="__label"]::before,
|
|
296
|
-
.usa-checkbox__input.usa-checkbox__input--tile:checked + [class*="__label"]::before{
|
|
297
|
-
box-shadow:
|
|
295
|
+
.usa-radio__input.usa-radio__input--tile:checked + [class*="__label"]::before,
|
|
296
|
+
.usa-checkbox__input.usa-checkbox__input--tile:checked + [class*="__label"]::before {
|
|
297
|
+
box-shadow:
|
|
298
|
+
0 0 0 2px #005ea2,
|
|
299
|
+
inset 0 0 0 2px #cfe8ff;
|
|
298
300
|
}
|
|
299
301
|
|
|
300
302
|
.nj-error-message-container {
|