diff --git a/assets/package-lock.json b/assets/package-lock.json index eaf3acb122aefd968db18471b2ba05ee415fb2b7..439c655c9677063e2fc9ae08132d024f8c57384a 100644 --- a/assets/package-lock.json +++ b/assets/package-lock.json @@ -30,7 +30,7 @@ "redux": "4.1.2", "redux-thunk": "2.4.1", "reselect": "4.1.5", - "wdfn-viz": "2.1.2" + "wdfn-viz": "3.0.0" }, "devDependencies": { "@rollup/plugin-alias": "3.1.9", @@ -67,7 +67,7 @@ "terser": "5.12.1" }, "engines": { - "node": "16.14.2" + "node": "16.15.0" } }, "node_modules/@babel/code-frame": { @@ -2310,6 +2310,21 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@uswds/uswds": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@uswds/uswds/-/uswds-3.0.0.tgz", + "integrity": "sha512-fe+jdvU+XnxHBwML0gtx6ODktk/tSDaDIOYyWZ1+GeU3dwuhVfc5EWFGDLqo0o1n9mHprU4vjAaZMHv8pQEYLg==", + "dependencies": { + "classlist-polyfill": "1.0.3", + "domready": "1.0.8", + "object-assign": "4.1.1", + "receptor": "1.0.0", + "resolve-id-refs": "0.1.0" + }, + "engines": { + "node": ">= 4" + } + }, "node_modules/abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -4068,9 +4083,9 @@ } }, "node_modules/classlist-polyfill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/classlist-polyfill/-/classlist-polyfill-1.2.0.tgz", - "integrity": "sha1-k1vC39lFiodrJ5YXUUY4vKqWSi4=" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/classlist-polyfill/-/classlist-polyfill-1.0.3.tgz", + "integrity": "sha1-fNWpIHyNaTL1kv3qprRTUu1xaQ0=" }, "node_modules/cli-boxes": { "version": "2.2.1", @@ -16179,21 +16194,6 @@ "node": ">=0.10.0" } }, - "node_modules/uswds": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/uswds/-/uswds-2.13.2.tgz", - "integrity": "sha512-dhHH2SgFfZFQz7OckCig5oa/4AO0eYKWZM0pRLZUovbU5zwy1USsnjZkPhlVw9eKL6OG87mc1wuhj5Jbw28uvw==", - "dependencies": { - "classlist-polyfill": "^1.0.3", - "domready": "^1.0.8", - "object-assign": "^4.1.1", - "receptor": "^1.0.0", - "resolve-id-refs": "^0.1.0" - }, - "engines": { - "node": ">= 4" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -16352,14 +16352,14 @@ } }, "node_modules/wdfn-viz": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/wdfn-viz/-/wdfn-viz-2.1.2.tgz", - "integrity": "sha512-t2GFKRKaFlgAERlTi6h3vX0JaNhFSxAc0hM6wm4uCtiEaajWuaUIuKxtts712vzV/MwMZbCYk5gejMuEXsxMHA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/wdfn-viz/-/wdfn-viz-3.0.0.tgz", + "integrity": "sha512-HTwLIHYbnmJMeY69Bk812RQyBBiuJvOFboHUcqMwNRh+MyInUC1GAS5sbKsclt6mBgiq4A5B0s5TNnMp16EnPA==", "dependencies": { - "uswds": "2.13.2" + "@uswds/uswds": "3.0.0" }, "engines": { - "node": ">= 10" + "node": ">= 12" } }, "node_modules/webidl-conversions": { @@ -18380,6 +18380,18 @@ "eslint-visitor-keys": "^3.0.0" } }, + "@uswds/uswds": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@uswds/uswds/-/uswds-3.0.0.tgz", + "integrity": "sha512-fe+jdvU+XnxHBwML0gtx6ODktk/tSDaDIOYyWZ1+GeU3dwuhVfc5EWFGDLqo0o1n9mHprU4vjAaZMHv8pQEYLg==", + "requires": { + "classlist-polyfill": "1.0.3", + "domready": "1.0.8", + "object-assign": "4.1.1", + "receptor": "1.0.0", + "resolve-id-refs": "0.1.0" + } + }, "abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -19766,9 +19778,9 @@ } }, "classlist-polyfill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/classlist-polyfill/-/classlist-polyfill-1.2.0.tgz", - "integrity": "sha1-k1vC39lFiodrJ5YXUUY4vKqWSi4=" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/classlist-polyfill/-/classlist-polyfill-1.0.3.tgz", + "integrity": "sha1-fNWpIHyNaTL1kv3qprRTUu1xaQ0=" }, "cli-boxes": { "version": "2.2.1", @@ -29132,18 +29144,6 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, - "uswds": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/uswds/-/uswds-2.13.2.tgz", - "integrity": "sha512-dhHH2SgFfZFQz7OckCig5oa/4AO0eYKWZM0pRLZUovbU5zwy1USsnjZkPhlVw9eKL6OG87mc1wuhj5Jbw28uvw==", - "requires": { - "classlist-polyfill": "^1.0.3", - "domready": "^1.0.8", - "object-assign": "^4.1.1", - "receptor": "^1.0.0", - "resolve-id-refs": "^0.1.0" - } - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -29280,11 +29280,11 @@ } }, "wdfn-viz": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/wdfn-viz/-/wdfn-viz-2.1.2.tgz", - "integrity": "sha512-t2GFKRKaFlgAERlTi6h3vX0JaNhFSxAc0hM6wm4uCtiEaajWuaUIuKxtts712vzV/MwMZbCYk5gejMuEXsxMHA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/wdfn-viz/-/wdfn-viz-3.0.0.tgz", + "integrity": "sha512-HTwLIHYbnmJMeY69Bk812RQyBBiuJvOFboHUcqMwNRh+MyInUC1GAS5sbKsclt6mBgiq4A5B0s5TNnMp16EnPA==", "requires": { - "uswds": "2.13.2" + "@uswds/uswds": "3.0.0" } }, "webidl-conversions": { diff --git a/assets/package.json b/assets/package.json index a988c1178b570c8d9b9ccff577540494eeba3411..da7ed89f6a853139f2d7a89a12b0b10a0de80675 100644 --- a/assets/package.json +++ b/assets/package.json @@ -10,14 +10,14 @@ "clean": "rm -rf dist && mkdir dist", "build": "npm run clean && run-p build:* && npm run hash-assets", "build:css": "run-p build:css:*", - "build:css:common": "sass --load-path node_modules/wdfn-viz/src/stylesheets --load-path node_modules/uswds/src/stylesheets src/styles/common.scss dist/common.css && postcss dist/common.css --map -o dist/common.css", - "build:css:monitoring-location": "sass --load-path node_modules/leaflet/dist --load-path node_modules/leaflet-gesture-handling/dist --load-path node_modules/wdfn-viz/src/stylesheets --load-path node_modules/uswds/src/stylesheets src/styles/monitoring-location.scss dist/monitoring_location.css && postcss dist/monitoring_location.css --map -o dist/monitoring_location.css", - "build:css:network": "sass --load-path node_modules/leaflet/dist --load-path node_modules/leaflet-gesture-handling/dist --load-path node_modules/wdfn-viz/src/stylesheets --load-path node_modules/uswds/src/stylesheets src/styles/network.scss dist/network.css && postcss dist/network.css --map -o dist/network.css", - "build:fonts": "mkdir -p dist/fonts && cp -r node_modules/uswds/src/fonts/* dist/fonts", - "build:images": "mkdir -p dist/img && mkdir -p dist/images && cp -r node_modules/uswds/src/img/* dist/img && cp -r node_modules/wdfn-viz/src/img/* dist/img && cp -r node_modules/leaflet/dist/images/* dist/images && cp -r src/img/* dist/img", + "build:css:common": "sass --load-path node_modules/wdfn-viz/src/stylesheets --load-path node_modules/@uswds/uswds/src/stylesheets --load-path node_modules/@uswds/uswds/packages src/styles/common.scss dist/common.css && postcss dist/common.css --map -o dist/common.css", + "build:css:monitoring-location": "sass --load-path node_modules/leaflet/dist --load-path node_modules/leaflet-gesture-handling/dist --load-path node_modules/wdfn-viz/src/stylesheets --load-path node_modules/@uswds/uswds/src/stylesheets --load-path node_modules/@uswds/uswds/packages src/styles/monitoring-location.scss dist/monitoring_location.css && postcss dist/monitoring_location.css --map -o dist/monitoring_location.css", + "build:css:network": "sass --load-path node_modules/leaflet/dist --load-path node_modules/leaflet-gesture-handling/dist --load-path node_modules/wdfn-viz/src/stylesheets --load-path node_modules/@uswds/uswds/src/stylesheets --load-path node_modules/@uswds/uswds/packages src/styles/network.scss dist/network.css && postcss dist/network.css --map -o dist/network.css", + "build:fonts": "mkdir -p dist/fonts && cp -r node_modules/@uswds/uswds/dist/fonts/* dist/fonts", + "build:images": "mkdir -p dist/img && mkdir -p dist/images && cp -r node_modules/@uswds/uswds/dist/img/* dist/img && cp -r node_modules/wdfn-viz/src/img/* dist/img && cp -r node_modules/leaflet/dist/images/* dist/images && cp -r src/img/* dist/img", "build:js": "rollup -c --environment NODE_ENV:production && mkdir -p dist/scripts", "build:wdfnviz": "mkdir -p dist/scripts && cp node_modules/wdfn-viz/dist/wdfnviz.js dist/scripts && cp node_modules/wdfn-viz/dist/wdfnviz.css dist", - "build:uswdsjs": "mkdir -p dist/scripts && cp node_modules/uswds/dist/js/uswds.min.js dist/scripts && cp node_modules/uswds/dist/js/uswds-init.min.* dist/scripts", + "build:uswdsjs": "mkdir -p dist/scripts && cp node_modules/@uswds/uswds/dist/js/uswds.min.js dist/scripts && cp node_modules/@uswds/uswds/dist/js/uswds-init.min.* dist/scripts", "build:autotrack": "terser --output dist/autotrack.js node_modules/autotrack/autotrack.js", "hash-assets": "gulp --gulpfile ./gulpfile.js revall", "lint": "run-p lint:*", @@ -32,7 +32,7 @@ "watch:js": "mkdir -p dist/scripts && npm run build:wdfnviz && npm run build:uswdsjs && rollup -c --watch" }, "engines": { - "node": "16.14.2" + "node": "16.15.0" }, "repository": { "type": "git", @@ -100,6 +100,6 @@ "redux": "4.1.2", "redux-thunk": "2.4.1", "reselect": "4.1.5", - "wdfn-viz": "2.1.2" + "wdfn-viz": "3.0.0" } } diff --git a/assets/rollup.config.js b/assets/rollup.config.js index 305c132f180e4f675e0fb586bdc41de9ebde074c..08bc9540029324adceb06bff57abb14cf91c2062 100644 --- a/assets/rollup.config.js +++ b/assets/rollup.config.js @@ -18,7 +18,7 @@ const env = process.env.NODE_ENV || 'development'; const getBundleConfig = function(src, dest) { const entries = [ - {find: 'uswds-components', replacement: path.resolve(__dirname, 'node_modules/uswds/src/js/components')}, + {find: 'uswds-components', replacement: path.resolve(__dirname, 'node_modules/@uswds/uswds/packages')}, {find: 'ui', replacement: path.resolve(__dirname, 'src/scripts/')}, {find: 'ml', replacement: path.resolve(__dirname, 'src/scripts/monitoring-location')}, {find:'d3render', replacement: path.resolve(__dirname, 'src/scripts/d3-rendering')}, diff --git a/assets/src/scripts/d3-rendering/info-tooltip.js b/assets/src/scripts/d3-rendering/info-tooltip.js index 16727bc90a40de017adf5d1492cdd23394a201f3..ccd4ffdfbbf75dff0b524e1b0d0b8a8265bb2b24 100644 --- a/assets/src/scripts/d3-rendering/info-tooltip.js +++ b/assets/src/scripts/d3-rendering/info-tooltip.js @@ -9,7 +9,7 @@ import config from 'ui/config.js'; */ // Required to initialize USWDS components after page load -import {tooltip as uswds_tooltip} from 'uswds-components'; +import uswds_tooltip from 'uswds-components/usa-tooltip/src/index.js'; export const appendInfoTooltip = function(elem, text, position = 'right') { let tooltip = elem.append('div') diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/time-span-controls.js b/assets/src/scripts/monitoring-location/components/hydrograph/time-span-controls.js index 909d197aad8c81f6d1bbd9ecdfef333b221f420b..f7189b019d91111e69b4f7b1f1d6ee79b4542330 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/time-span-controls.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/time-span-controls.js @@ -1,7 +1,7 @@ import {select} from 'd3-selection'; import {DateTime} from 'luxon'; // required to make the USWDS component JS available to init after page load -import {datePicker} from 'uswds-components'; +import datePicker from 'uswds-components/usa-date-picker/src/index.js'; import config from 'ui/config'; import {link} from 'ui/lib/d3-redux'; diff --git a/assets/src/scripts/monitoring-location/components/hydrograph/time-span-controls.test.js b/assets/src/scripts/monitoring-location/components/hydrograph/time-span-controls.test.js index 6b3fd0fc555fd6fdc5b4b70635e7457969542d94..ab7225e470a6d9e4d27aae89bc333a4632f99b1a 100644 --- a/assets/src/scripts/monitoring-location/components/hydrograph/time-span-controls.test.js +++ b/assets/src/scripts/monitoring-location/components/hydrograph/time-span-controls.test.js @@ -1,7 +1,7 @@ import {select} from 'd3-selection'; import {enableFetchMocks, disableFetchMocks} from 'jest-fetch-mock'; import mockConsole from 'jest-mock-console'; -import {datePicker} from 'uswds-components'; +import datePicker from 'uswds-components/usa-date-picker/src/index'; import config from 'ui/config'; import * as utils from 'ui/utils'; diff --git a/assets/src/styles/components/_dv-hydrograph.scss b/assets/src/styles/components/_dv-hydrograph.scss index 682f8c51ee006b74eb88d117dea8b07f163ec1c7..47de4f90f2361e7757cabd74c02b75799fabe556 100644 --- a/assets/src/styles/components/_dv-hydrograph.scss +++ b/assets/src/styles/components/_dv-hydrograph.scss @@ -107,7 +107,7 @@ $provisional-time-series: #d95f02; display: none; font-size: 1.5em; font-style: italic; - @include uswds.at-media(uswds.$theme-site-max-width) { + @include uswds.at-media(uswds.$theme-grid-container-max-width) { display: block; } } diff --git a/wdfn-server/waterdata/templates/partials/header.html b/wdfn-server/waterdata/templates/partials/header.html index f71f84ca2da0c43fd8ec3dd1decdc496be9248d6..34026e63c373dac2d6136409aae27b0379ffae29 100644 --- a/wdfn-server/waterdata/templates/partials/header.html +++ b/wdfn-server/waterdata/templates/partials/header.html @@ -65,7 +65,7 @@ </div> <nav aria-label="Primary navigation" role="navigation" class="usa-nav"> <div class="usa-nav__inner"> - <button class="usa-nav__close"><img src="{{ 'img/close.svg' | static_url }}" alt="close"></button> + <button class="usa-nav__close"><img src="{{ 'img/usa-icons/close.svg' | static_url }}" alt="close"></button> <ul class="usa-nav__primary usa-accordion"> <li class="usa-nav__primary-item"> <button class="usa-accordion__button usa-nav__link"