@cagovweb/state-template 6.3.1-beta7 → 6.3.1-beta8
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/dist/css/cagov.core.css +2 -2
- package/dist/css/cagov.core.min.css +2 -2
- package/dist/js/cagov.core.js +12 -10
- package/dist/js/cagov.core.min.js +2 -2
- package/dist/readme.md +2 -2
- package/package.json +1 -1
package/dist/js/cagov.core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var StateTemplateNpmPackageVersion="6.3.1-
|
|
1
|
+
var StateTemplateNpmPackageVersion="6.3.1-beta8";
|
|
2
2
|
/*!
|
|
3
3
|
* Bootstrap v5.3.0 (https://getbootstrap.com/)
|
|
4
4
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
@@ -8731,8 +8731,6 @@ window.addEventListener("load", () => {
|
|
|
8731
8731
|
.querySelectorAll(".second-level-link")
|
|
8732
8732
|
.forEach((/**@type {HTMLElement} */ el) => (el.tabIndex = -1));
|
|
8733
8733
|
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
8734
|
document
|
|
8737
8735
|
.querySelectorAll(".rotate")
|
|
8738
8736
|
.forEach(
|
|
@@ -8753,14 +8751,13 @@ window.addEventListener("load", () => {
|
|
|
8753
8751
|
)
|
|
8754
8752
|
);
|
|
8755
8753
|
|
|
8756
|
-
|
|
8754
|
+
const getAllFirstLevelNavLinks = () =>
|
|
8757
8755
|
/** @type { NodeListOf<HTMLElement>} */ (
|
|
8758
8756
|
navSearchCont.querySelectorAll(
|
|
8759
|
-
|
|
8757
|
+
"a.first-level-link, button.first-level-btn"
|
|
8760
8758
|
)
|
|
8761
8759
|
);
|
|
8762
8760
|
|
|
8763
|
-
|
|
8764
8761
|
// Escape key event listener
|
|
8765
8762
|
document.addEventListener("keydown", e => {
|
|
8766
8763
|
if (navSearchCont.classList.contains("visible")) {
|
|
@@ -8824,12 +8821,16 @@ window.addEventListener("load", () => {
|
|
|
8824
8821
|
|
|
8825
8822
|
// Button click close menu function
|
|
8826
8823
|
const closeMenu = () => {
|
|
8827
|
-
navSearchCont.classList.
|
|
8824
|
+
if (navSearchCont.classList.contains("visible")) {
|
|
8825
|
+
navSearchCont.classList.remove("visible");
|
|
8826
|
+
|
|
8827
|
+
//Set focus only when close actually happens
|
|
8828
|
+
navToggleBtn.focus();
|
|
8829
|
+
}
|
|
8830
|
+
|
|
8828
8831
|
navSearchCont.classList.add("not-visible");
|
|
8829
8832
|
|
|
8830
8833
|
setClosed();
|
|
8831
|
-
|
|
8832
|
-
navToggleBtn.focus();
|
|
8833
8834
|
};
|
|
8834
8835
|
|
|
8835
8836
|
const setClosed = () => {
|
|
@@ -8855,8 +8856,9 @@ window.addEventListener("load", () => {
|
|
|
8855
8856
|
// Button Click event
|
|
8856
8857
|
navMobileMenuToggleBtn.addEventListener("click", closeMenu);
|
|
8857
8858
|
|
|
8858
|
-
const mobileCheck = () => {
|
|
8859
|
+
const mobileCheck = () => {
|
|
8859
8860
|
NavReset();
|
|
8861
|
+
|
|
8860
8862
|
// desktop
|
|
8861
8863
|
if (isDesktopWidth()) {
|
|
8862
8864
|
getAllFirstLevelNavLinks().forEach(el => el.removeAttribute("tabindex"));
|