@usace/groundwork 4.3.1 → 5.0.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/dist/es/components/button.js +125 -0
- package/dist/es/components/buttons/popover.js +51 -0
- package/dist/es/components/buttons/standard-buttons.js +54 -0
- package/dist/es/components/data-grid/data-grid-header.js +54 -0
- package/dist/es/components/data-grid/data-grid-row.js +44 -0
- package/dist/es/components/data-grid/data-grid-selector.js +65 -0
- package/dist/es/components/data-grid/data-grid.js +89 -0
- package/dist/es/components/display/accordion.js +24 -0
- package/dist/es/components/display/badge.js +56 -0
- package/dist/es/components/display/card.js +13 -0
- package/dist/es/components/display/divider.js +25 -0
- package/dist/es/components/display/headings.js +34 -0
- package/dist/es/components/display/loader.js +10 -0
- package/dist/es/components/display/modal.js +39 -0
- package/dist/es/components/display/progress-bar.js +20 -0
- package/dist/es/components/display/skeleton.js +9 -0
- package/dist/es/components/display/text.js +31 -0
- package/dist/es/components/form/checkboxes.js +72 -0
- package/dist/es/components/form/dropdown.js +20 -0
- package/dist/es/components/form/fieldset.js +60 -0
- package/dist/es/components/form/input.js +55 -0
- package/dist/es/components/form/radio-group.js +57 -0
- package/dist/es/components/form/textarea.js +34 -0
- package/dist/es/components/hero.js +67 -0
- package/dist/es/components/layout/container.js +12 -0
- package/dist/es/components/layout/usace-box.js +18 -0
- package/dist/es/components/navigation/breadcrumbs.js +39 -0
- package/dist/es/components/navigation/link-provider.js +15 -0
- package/dist/es/components/navigation/link.js +15 -0
- package/dist/es/components/navigation/tabs.js +35 -0
- package/dist/es/components/profile-dropdown.js +61 -0
- package/dist/es/components/search.js +37 -0
- package/dist/es/components/table.js +101 -0
- package/dist/es/composite/footer/essayons.js +22 -0
- package/dist/es/composite/footer/footer-links.js +28 -0
- package/dist/es/composite/footer/index.js +147 -0
- package/dist/es/composite/footer/logo-banner.js +100 -0
- package/dist/es/composite/footer/social-links.js +55 -0
- package/dist/es/composite/header/index.js +91 -0
- package/dist/es/composite/header/navbar-links.js +71 -0
- package/dist/es/composite/header/overlay-links.js +68 -0
- package/dist/es/composite/header/usa-banner/USABanner.js +130 -0
- package/dist/es/composite/sidebar/index.js +102 -0
- package/dist/es/composite/site-wrapper/dod-warning.js +46 -0
- package/dist/es/composite/site-wrapper/index.js +49 -0
- package/dist/es/gw-merge.js +11 -0
- package/dist/es/hooks/useIsMobile.js +32 -0
- package/dist/es/hooks/useScrollFade.js +19 -0
- package/dist/es/img/Army-250-year-logo.js +4 -0
- package/dist/es/img/Magnifying_glass_icon.js +4 -0
- package/dist/es/img/USACE-250-year-logo.js +4 -0
- package/dist/es/img/armystar-logo-rb.js +4 -0
- package/dist/es/img/cwbi-logo.js +4 -0
- package/dist/es/img/essayonscrest.js +4 -0
- package/dist/es/img/icon-dot-gov.js +4 -0
- package/dist/es/img/icon-https.js +4 -0
- package/dist/es/img/rsgis-logo.js +4 -0
- package/dist/es/img/us_flag_small.js +4 -0
- package/dist/es/img/usace-logo-color.js +4 -0
- package/dist/es/index.js +37 -0
- package/dist/es/utils/paths.js +19 -0
- package/dist/es/utils/sizes.js +14 -0
- package/dist/groundwork.css +2 -1
- package/dist/groundwork.umd.cjs +1 -0
- package/package.json +55 -9
- package/dist/groundwork.es.js +0 -9435
- package/dist/groundwork.umd.js +0 -5
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import e from "../../components/navigation/link.js";
|
|
2
|
+
import { Fragment as t, useState as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import { Menu as a, MenuItem as o, MenuItems as s } from "@headlessui/react";
|
|
5
|
+
//#region lib/composite/header/navbar-links.jsx
|
|
6
|
+
var c = (...e) => e.filter(Boolean).join(" ");
|
|
7
|
+
function l({ link: l, ...u }) {
|
|
8
|
+
let [d, f] = n(!1), p = c("gw:inline-block gw:relative gw:h-12 gw:inline-flex gw:w-auto gw:justify-center gw:items-center gw:px-3 gw:text-sm gw:text-nowrap", d ? "gw:bg-nav-dark-gray gw:text-white" : "gw:text-nav-light-gray", l.children ? "gw:after:content-['▼'] gw:after:text-[10px] gw:after:ml-2" : "");
|
|
9
|
+
return /* @__PURE__ */ i(a, {
|
|
10
|
+
as: "li",
|
|
11
|
+
className: "gw:relative",
|
|
12
|
+
onMouseOver: () => f(!0),
|
|
13
|
+
onMouseLeave: () => f(!1),
|
|
14
|
+
children: [/* @__PURE__ */ r(e, {
|
|
15
|
+
href: l?.href,
|
|
16
|
+
target: l?.target,
|
|
17
|
+
rel: l?.rel,
|
|
18
|
+
className: p,
|
|
19
|
+
...u,
|
|
20
|
+
children: l.text
|
|
21
|
+
}), l.children && d && /* @__PURE__ */ r(s, {
|
|
22
|
+
static: !0,
|
|
23
|
+
as: "ul",
|
|
24
|
+
className: "gw:absolute gw:left-0 gw:top-12 gw:bg-nav-dark-gray gw:z-20! gw:w-max gw:p-0",
|
|
25
|
+
children: l.children.map((n) => /* @__PURE__ */ r(o, {
|
|
26
|
+
as: t,
|
|
27
|
+
children: n.children ? /* @__PURE__ */ i("div", {
|
|
28
|
+
className: "gw:relative gw:group",
|
|
29
|
+
children: [/* @__PURE__ */ r(e, {
|
|
30
|
+
href: n?.href,
|
|
31
|
+
target: n?.target,
|
|
32
|
+
rel: n?.rel,
|
|
33
|
+
className: "after:gw:content-['►'] gw:after:ml-2 gw:after:text-[10px] gw:block gw:text-sm gw:border-b gw:border-nav-black gw:bg-nav-dark-gray gw:hover:bg-nav-translucent-gray gw:text-nav-light-gray gw:hover:text-white gw:text-nowrap gw:font-semibold gw:px-3 gw:py-2 gw:bg-none",
|
|
34
|
+
children: n.text
|
|
35
|
+
}), /* @__PURE__ */ r(s, {
|
|
36
|
+
static: !0,
|
|
37
|
+
as: "ul",
|
|
38
|
+
className: "gw:absolute gw:left-full gw:top-0 gw:bg-nav-dark-gray gw:z-30! gw:w-max gw:p-0 gw:shadow-lg gw:hidden gw:group-hover:block",
|
|
39
|
+
children: n.children.map((t) => (t.children || console.warn("Header items can only be 2 levels deep. Please reorganize your header links. This helps to avoid CSS issues."), /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(e, {
|
|
40
|
+
href: t?.href,
|
|
41
|
+
target: t?.target,
|
|
42
|
+
rel: t?.rel,
|
|
43
|
+
className: "gw:block gw:text-sm gw:border-b gw:border-nav-black gw:bg-nav-dark-gray gw:hover:bg-nav-translucent-gray gw:text-nav-light-gray gw:hover:text-white gw:text-nowrap gw:font-semibold gw:px-3 gw:py-2 gw:bg-none",
|
|
44
|
+
children: t.text
|
|
45
|
+
}) }, t.id || t.text)))
|
|
46
|
+
})]
|
|
47
|
+
}) : /* @__PURE__ */ r(e, {
|
|
48
|
+
href: n?.href,
|
|
49
|
+
target: n?.target,
|
|
50
|
+
rel: n?.rel,
|
|
51
|
+
className: "gw:block gw:text-sm gw:border-b gw:border-nav-black gw:bg-nav-dark-gray gw:hover:bg-nav-translucent-gray gw:text-nav-light-gray gw:hover:text-white gw:text-nowrap gw:font-semibold gw:px-3 gw:py-2 gw:bg-none",
|
|
52
|
+
children: n.text
|
|
53
|
+
})
|
|
54
|
+
}, n.id || n.text))
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function u({ links: e, ...t }) {
|
|
59
|
+
return /* @__PURE__ */ r("ul", {
|
|
60
|
+
role: "list",
|
|
61
|
+
className: "gw:flex gw:flex-row gw:flex-wrap gw:justify-start gw:m-0 gw:pl-0 gw:w-full",
|
|
62
|
+
...t,
|
|
63
|
+
children: e.map((e) => /* @__PURE__ */ r(l, { link: e }, e.id || e.text))
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
var d = ({ links: e = [] }) => /* @__PURE__ */ r("div", {
|
|
67
|
+
className: "gw:hidden gw:md:flex gw:flex-row gw:content-center gw:justify-between gw:w-full gw:min-h-12 gw:pr-3",
|
|
68
|
+
children: /* @__PURE__ */ r(u, { links: e })
|
|
69
|
+
});
|
|
70
|
+
//#endregion
|
|
71
|
+
export { d as NavbarLinks, d as default };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import e from "../../components/navigation/link.js";
|
|
2
|
+
import { Button as t } from "../../components/button.js";
|
|
3
|
+
import { useState as n } from "react";
|
|
4
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import { FaCaretDown as o, FaCaretUp as s } from "react-icons/fa";
|
|
6
|
+
import { VscClose as c } from "react-icons/vsc";
|
|
7
|
+
//#region lib/composite/header/overlay-links.jsx
|
|
8
|
+
function l({ link: t, close: c }) {
|
|
9
|
+
let [l, d] = n(!1);
|
|
10
|
+
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("div", {
|
|
11
|
+
className: "gw:flex gw:justify-between gw:items-center gw:text-white gw:text-xl gw:font-semibold gw:px-4 gw:py-2",
|
|
12
|
+
children: [/* @__PURE__ */ i(e, {
|
|
13
|
+
href: t.href,
|
|
14
|
+
onClick: c,
|
|
15
|
+
children: t.text
|
|
16
|
+
}), /* @__PURE__ */ i("span", {
|
|
17
|
+
className: "gw:grow",
|
|
18
|
+
onClick: () => {
|
|
19
|
+
d(!l);
|
|
20
|
+
},
|
|
21
|
+
children: /* @__PURE__ */ i("span", {
|
|
22
|
+
className: "gw:flex gw:justify-end",
|
|
23
|
+
children: t.children && i(l ? s : o, {})
|
|
24
|
+
})
|
|
25
|
+
})]
|
|
26
|
+
}), t.children && l ? /* @__PURE__ */ i("div", {
|
|
27
|
+
className: "gw:pl-5",
|
|
28
|
+
children: /* @__PURE__ */ i(u, {
|
|
29
|
+
links: t.children,
|
|
30
|
+
close: c
|
|
31
|
+
})
|
|
32
|
+
}) : null] });
|
|
33
|
+
}
|
|
34
|
+
function u({ links: e, close: t }) {
|
|
35
|
+
return /* @__PURE__ */ i("ul", {
|
|
36
|
+
className: "gw:flex gw:flex-col",
|
|
37
|
+
children: e.map((e) => /* @__PURE__ */ i(l, {
|
|
38
|
+
link: e,
|
|
39
|
+
close: t
|
|
40
|
+
}, e.id || e.text))
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function d({ links: e = [], onClose: n }) {
|
|
44
|
+
let r = () => {
|
|
45
|
+
n && typeof n == "function" && n();
|
|
46
|
+
};
|
|
47
|
+
return /* @__PURE__ */ a("div", {
|
|
48
|
+
className: "gw:fixed gw:top-0 gw:left-0 gw:h-full gw:right-0 gw:bg-nav-black gw:bg-opacity-90 gw:z-50",
|
|
49
|
+
children: [/* @__PURE__ */ i("div", {
|
|
50
|
+
className: "gw:flex gw:justify-end",
|
|
51
|
+
children: /* @__PURE__ */ i(t, {
|
|
52
|
+
style: "plain",
|
|
53
|
+
color: "white",
|
|
54
|
+
size: "lg",
|
|
55
|
+
onClick: r,
|
|
56
|
+
children: /* @__PURE__ */ i(c, {})
|
|
57
|
+
})
|
|
58
|
+
}), /* @__PURE__ */ i("div", {
|
|
59
|
+
className: "gw:relative gw:h-full gw:overflow-y-auto gw:hide-scrollbar",
|
|
60
|
+
children: /* @__PURE__ */ i(u, {
|
|
61
|
+
links: e,
|
|
62
|
+
close: r
|
|
63
|
+
})
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { d as OverlayLinks, d as default };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import e from "../../../gw-merge.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import t from "../../../img/us_flag_small.js";
|
|
4
|
+
import n from "../../../img/icon-dot-gov.js";
|
|
5
|
+
import r from "../../../img/icon-https.js";
|
|
6
|
+
import { useState as i } from "react";
|
|
7
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
|
+
//#region lib/composite/header/usa-banner/USABanner.jsx
|
|
9
|
+
function s(...e) {
|
|
10
|
+
return e.filter(Boolean).join(" ");
|
|
11
|
+
}
|
|
12
|
+
var c = ({ fluidNav: c }) => {
|
|
13
|
+
let [l, u] = i(!1);
|
|
14
|
+
return /* @__PURE__ */ a("div", {
|
|
15
|
+
className: "header_banner_container gw:bg-gov-banner-black gw:text-white",
|
|
16
|
+
children: /* @__PURE__ */ o("div", {
|
|
17
|
+
className: e("header_banner_inner gw:sm:my-0 gw:sm:mx-auto gw:sm:font-sm", c ? "gw:max-w-screen" : "gw:px-4 gw:max-w-(--gw:breakpoint-2xl)"),
|
|
18
|
+
children: [/* @__PURE__ */ o("div", {
|
|
19
|
+
className: "header_banner_flag gw:fill-gov-banner-gray gw:py-1.5 gw:h-12 gw:sm:h-8 gw:px-0 gw:text-sm gw:box-border gw:flex gw:items-center gw:justify-start",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ a("img", {
|
|
22
|
+
src: t,
|
|
23
|
+
className: "gw:mr-2",
|
|
24
|
+
role: "presentation",
|
|
25
|
+
"aria-label": "U.S. Government Flag",
|
|
26
|
+
alt: "U.S. Government Flag"
|
|
27
|
+
}),
|
|
28
|
+
"An official website of the United States government",
|
|
29
|
+
/* @__PURE__ */ a("div", {
|
|
30
|
+
className: "header_banner_accordion gw:text-gov-banner-gray gw:border-0 gw:cursor-pointer gw:text-sm gw:outline-hidden gw:text-left gw:transition-all gw:duration-300 gw:ease-out gw:my-0 gw:ms-1 gw:me-2.5 gw:sm:me-0 gw:inline-block focus:outline-5 focus:outline-focus-ring",
|
|
31
|
+
tabIndex: 0,
|
|
32
|
+
children: /* @__PURE__ */ o("u", {
|
|
33
|
+
onClick: () => {
|
|
34
|
+
u(!l);
|
|
35
|
+
},
|
|
36
|
+
children: ["Here's how you know", /* @__PURE__ */ a("span", {
|
|
37
|
+
className: s("expand-more-container gw:inline-block gw:align-top", l ? "gw:transform gw:rotate-180" : ""),
|
|
38
|
+
children: /* @__PURE__ */ o("svg", {
|
|
39
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
+
height: "24",
|
|
41
|
+
viewBox: "0 0 24 24",
|
|
42
|
+
width: "24",
|
|
43
|
+
className: "gw:inline-block gw:relative gw:transition-all gw:delay-300 gw:ease-out gw:align-middle gw:h-[18px] gw:w-[18px]",
|
|
44
|
+
children: [/* @__PURE__ */ a("path", {
|
|
45
|
+
d: "M0 0h24v24H0z",
|
|
46
|
+
fill: "none"
|
|
47
|
+
}), /* @__PURE__ */ a("path", {
|
|
48
|
+
className: "expand-more",
|
|
49
|
+
d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
50
|
+
})]
|
|
51
|
+
})
|
|
52
|
+
})]
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}), l ? /* @__PURE__ */ o("div", {
|
|
57
|
+
className: "header_banner_panel gw:flex gw:flex-col gw:md:flex-row gw:my-0 gw:mx-auto gw:overflow-hidden gw:pt-6 gw:pb-4 gw:max-h-[328px] active",
|
|
58
|
+
children: [/* @__PURE__ */ o("div", {
|
|
59
|
+
className: "header_banner_panel_item",
|
|
60
|
+
children: [/* @__PURE__ */ a("img", {
|
|
61
|
+
src: n,
|
|
62
|
+
alt: "Generic government building icon",
|
|
63
|
+
"aria-label": "Generic government building icon",
|
|
64
|
+
className: "gw:h-[50px] gw:w-[50px] gw:mr-4"
|
|
65
|
+
}), /* @__PURE__ */ o("div", {
|
|
66
|
+
id: "dnn_ctl03_bannerContentLeft",
|
|
67
|
+
className: "header_banner_content gw:text-sm gw:leading-7 gw:w-full gw:mb-2.5 gw:-tracking-tighter",
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ a("p", {
|
|
70
|
+
className: "banner-contentLeft-text mb-0 gw:text-lg gw:text-white",
|
|
71
|
+
children: /* @__PURE__ */ a("strong", { children: " Official websites use .mil " })
|
|
72
|
+
}),
|
|
73
|
+
"A ",
|
|
74
|
+
/* @__PURE__ */ a("strong", { children: ".mil" }),
|
|
75
|
+
" website belongs to an official U.S. Department of Defense organization in the United States."
|
|
76
|
+
]
|
|
77
|
+
})]
|
|
78
|
+
}), /* @__PURE__ */ o("div", {
|
|
79
|
+
className: "header_banner_panel_item https",
|
|
80
|
+
children: [/* @__PURE__ */ a("img", {
|
|
81
|
+
src: r,
|
|
82
|
+
alt: "HTTPS secure lock icon",
|
|
83
|
+
"aria-label": "HTTPS secure lock icon",
|
|
84
|
+
className: "gw:h-[50px] gw:w-[50px] gw:mr-4"
|
|
85
|
+
}), /* @__PURE__ */ o("div", {
|
|
86
|
+
id: "dnn_ctl03_bannerContentRight",
|
|
87
|
+
className: "header_banner_content gw:text-sm gw:leading-7 gw:w-full gw:mb-2.5 gw:-tracking-tighter",
|
|
88
|
+
children: [/* @__PURE__ */ a("p", {
|
|
89
|
+
className: "banner-contentRight-text mb-0 gw:text-lg gw:text-white",
|
|
90
|
+
children: /* @__PURE__ */ a("strong", { children: "Secure .mil websites use HTTPS" })
|
|
91
|
+
}), /* @__PURE__ */ o("div", { children: [
|
|
92
|
+
" ",
|
|
93
|
+
"A",
|
|
94
|
+
" ",
|
|
95
|
+
/* @__PURE__ */ o("strong", { children: [
|
|
96
|
+
"lock (",
|
|
97
|
+
/* @__PURE__ */ a("span", {
|
|
98
|
+
className: "header_banner_icon_lock gw:inline-block gw:h-[15px] gw:w-[15px] gw:my-0 gw:mx-2 gw:relative",
|
|
99
|
+
children: /* @__PURE__ */ o("svg", {
|
|
100
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
101
|
+
width: "52",
|
|
102
|
+
height: "64",
|
|
103
|
+
viewBox: "0 0 52 64",
|
|
104
|
+
className: "gw:fill-black gw:h-[15px] gw:w-[15px]",
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ a("title", { children: "lock " }),
|
|
107
|
+
/* @__PURE__ */ a("path", {
|
|
108
|
+
className: "icon_lock gw:fill-white",
|
|
109
|
+
fillRule: "evenodd",
|
|
110
|
+
d: "M26 0c10.493 0 19 8.507 19 19v9h3a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V32a4 4 0 0 1 4-4h3v-9C7 8.507 15.507 0 26 0zm0 8c-5.979 0-10.843 4.77-10.996 10.712L15 19v9h22v-9c0-6.075-4.925-11-11-11z"
|
|
111
|
+
}),
|
|
112
|
+
" "
|
|
113
|
+
]
|
|
114
|
+
})
|
|
115
|
+
}),
|
|
116
|
+
")"
|
|
117
|
+
] }),
|
|
118
|
+
" ",
|
|
119
|
+
"or ",
|
|
120
|
+
/* @__PURE__ */ a("strong", { children: " https://" }),
|
|
121
|
+
" means you’ve safely connected to the .mil website. Share sensitive information only on official, secure websites."
|
|
122
|
+
] })]
|
|
123
|
+
})]
|
|
124
|
+
})]
|
|
125
|
+
}) : null]
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
//#endregion
|
|
130
|
+
export { c as USABanner, c as default };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { UsaceBox as e } from "../../components/layout/usace-box.js";
|
|
2
|
+
import t from "../../components/navigation/link.js";
|
|
3
|
+
import { useIsMobile as n } from "../../hooks/useIsMobile.js";
|
|
4
|
+
import { Dropdown as r } from "../../components/form/dropdown.js";
|
|
5
|
+
import { flattenLinks as i } from "../../utils/paths.js";
|
|
6
|
+
import { PopoutMenu as a } from "../../components/buttons/popover.js";
|
|
7
|
+
import { useRef as o } from "react";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
//#region lib/composite/sidebar/index.jsx
|
|
10
|
+
var l = 3, u = `Maximum sidebar nesting level of ${l} is exceeded for %s. To ensure a clean and readable sidebar, please reduce the nesting level of your links by moving some of them to the top level.`;
|
|
11
|
+
function d({ link: e, selectedPath: n, enablePopout: r, popoutDirection: i = "right", maxScrollHeight: o = "50vh", level: f = 0 }) {
|
|
12
|
+
typeof o != "string" && (console.warn("maxScrollHeight must be a string. Something like '50vh' or '100px'. Defaulting to '50vh'"), o = "50vh");
|
|
13
|
+
let p = n === e?.href;
|
|
14
|
+
return f > l ? (console.error(u.replaceAll("%s", e?.text)), null) : /* @__PURE__ */ s("div", {
|
|
15
|
+
className: "gw:py-2 gw:border-b gw:border-b-gray-200 gw:hover:bg-gray-100 ",
|
|
16
|
+
children: e?.children ? /* @__PURE__ */ c(a, {
|
|
17
|
+
title: e?.text,
|
|
18
|
+
level: f,
|
|
19
|
+
direction: i,
|
|
20
|
+
children: [/* @__PURE__ */ s(t, {
|
|
21
|
+
href: e?.href,
|
|
22
|
+
target: e?.target,
|
|
23
|
+
rel: e?.rel,
|
|
24
|
+
className: `gw:sticky gw:top-0 gw:flex gw:items-center gw:gap-1 gw:p-2 gw:border-b-[1px] gw:border-b-gray-200 gw:bg-gray-100 gw:font-bold ${p ? "gw:bg-gray-100 gw:rounded" : ""}`,
|
|
25
|
+
children: e?.text
|
|
26
|
+
}, e?.id), /* @__PURE__ */ s("div", {
|
|
27
|
+
className: "gw:overflow-y-auto",
|
|
28
|
+
style: { maxHeight: o },
|
|
29
|
+
children: e?.children?.map((e) => d({
|
|
30
|
+
link: e,
|
|
31
|
+
selectedPath: n,
|
|
32
|
+
enablePopout: r,
|
|
33
|
+
popoutDirection: i,
|
|
34
|
+
maxScrollHeight: o,
|
|
35
|
+
level: f + 1
|
|
36
|
+
}))
|
|
37
|
+
})]
|
|
38
|
+
}) : /* @__PURE__ */ s(t, {
|
|
39
|
+
href: e?.href,
|
|
40
|
+
target: e?.target,
|
|
41
|
+
rel: e?.rel,
|
|
42
|
+
className: "gw:z-20 gw:flex gw:items-center gw:px-1",
|
|
43
|
+
children: e?.text
|
|
44
|
+
}, e?.id)
|
|
45
|
+
}, e?.id);
|
|
46
|
+
}
|
|
47
|
+
function f(e, n, r = 0) {
|
|
48
|
+
let i = n === e?.href, a = { paddingLeft: `${r * 20}px` };
|
|
49
|
+
return r > l ? (console.error(u.replaceAll("%s", e?.text)), null) : /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s(t, {
|
|
50
|
+
href: e?.href,
|
|
51
|
+
target: e?.target,
|
|
52
|
+
rel: e?.rel,
|
|
53
|
+
children: /* @__PURE__ */ c("div", {
|
|
54
|
+
className: `gw:text-lg ${r === 0 ? "gw:font-bold" : ""} gw:pl-1 gw:py-1 gw:flex gw:justify-between gw:items-center ${e?.href ? "gw:cursor-pointer gw:hover:bg-gray-100" : "gw:cursor-default"} ${i ? "gw:bg-gray-100 gw:rounded" : ""}`,
|
|
55
|
+
style: a,
|
|
56
|
+
children: [e?.text, i]
|
|
57
|
+
})
|
|
58
|
+
}), e?.children && /* @__PURE__ */ s("div", { children: e?.children.map((e) => f(e, n, r + 1)) })] }, e?.id);
|
|
59
|
+
}
|
|
60
|
+
function p({ title: a = "Contents", selectedPath: l, sidebarLinks: u, enablePopout: p, popoutDirection: m, maxScrollHeight: h }) {
|
|
61
|
+
let g = n(), _ = o(null), v = o(null);
|
|
62
|
+
if (m && !p) throw Error("popoutDirection can only be used when enablePopout is true");
|
|
63
|
+
return g ? /* @__PURE__ */ s(e, {
|
|
64
|
+
ref: _,
|
|
65
|
+
title: a,
|
|
66
|
+
className: "gw:text-sm gw:my-5",
|
|
67
|
+
id: "sidebar",
|
|
68
|
+
children: /* @__PURE__ */ c("div", {
|
|
69
|
+
className: "gw:w-full gw:m-auto gw:flex gw:justify-between gw:items-center gw:gap-2",
|
|
70
|
+
children: [/* @__PURE__ */ s(r, {
|
|
71
|
+
className: "gw:w-5/6 gw:m-auto",
|
|
72
|
+
value: l,
|
|
73
|
+
onChange: (e) => {
|
|
74
|
+
v.current.href = e.target.value, v.current.click();
|
|
75
|
+
},
|
|
76
|
+
options: i(u).map((e, t) => /* @__PURE__ */ s("option", {
|
|
77
|
+
value: e?.href,
|
|
78
|
+
className: "gw:pl-2",
|
|
79
|
+
children: `${"\xA0".repeat(e?.level * 2)}${e?.text}`
|
|
80
|
+
}, t + e?.href + "-mobile-sidebar"))
|
|
81
|
+
}), /* @__PURE__ */ s(t, {
|
|
82
|
+
className: "hidden",
|
|
83
|
+
href: "#",
|
|
84
|
+
ref: v,
|
|
85
|
+
"aria-hidden": "true"
|
|
86
|
+
})]
|
|
87
|
+
})
|
|
88
|
+
}) : /* @__PURE__ */ s(e, {
|
|
89
|
+
ref: _,
|
|
90
|
+
title: a,
|
|
91
|
+
id: "sidebar",
|
|
92
|
+
children: u.map((e) => p ? d({
|
|
93
|
+
link: e,
|
|
94
|
+
selectedPath: l,
|
|
95
|
+
enablePopout: p,
|
|
96
|
+
maxScrollHeight: h,
|
|
97
|
+
popoutDirection: m
|
|
98
|
+
}) : f(e, l))
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
export { p as Sidebar, p as default };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Modal as e } from "../../components/display/modal.js";
|
|
2
|
+
import { Button as t } from "../../components/button.js";
|
|
3
|
+
import { useEffect as n, useState as r } from "react";
|
|
4
|
+
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
//#region lib/composite/site-wrapper/dod-warning.jsx
|
|
6
|
+
function s(e = 1e3 * 60 * 60 * 24 * 30) {
|
|
7
|
+
let t = !1;
|
|
8
|
+
if (t = window.localStorage.getItem("gw:dod-warn-accept") || !1, t) try {
|
|
9
|
+
/* @__PURE__ */ new Date() - new Date(t) > e ? (window.localStorage.removeItem("gw:dod-warn-accept"), t = !1) : t = !0;
|
|
10
|
+
} catch {
|
|
11
|
+
return !1;
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
}
|
|
15
|
+
function c() {
|
|
16
|
+
window.localStorage.setItem("gw:dod-warn-accept", (/* @__PURE__ */ new Date()).getTime());
|
|
17
|
+
}
|
|
18
|
+
function l({ warningTimeout: l }) {
|
|
19
|
+
let [u, d] = r(!s(l));
|
|
20
|
+
return n(() => {
|
|
21
|
+
u || c();
|
|
22
|
+
}, [u]), /* @__PURE__ */ a(e, {
|
|
23
|
+
opened: u,
|
|
24
|
+
onClose: () => d(!1),
|
|
25
|
+
dialogTitle: "US Department of Defense Warning Statement",
|
|
26
|
+
dialogDescription: /* @__PURE__ */ a(i, { children: "You are accessing a U.S. Government (USG) website that is provided for USG-authorized use only. By visiting this website, you consent to the following conditions:" }),
|
|
27
|
+
size: "2xl",
|
|
28
|
+
buttons: /* @__PURE__ */ a(t, {
|
|
29
|
+
className: "gw:w-full",
|
|
30
|
+
onClick: () => d(!1),
|
|
31
|
+
children: "I Agree"
|
|
32
|
+
}),
|
|
33
|
+
children: /* @__PURE__ */ o("ul", {
|
|
34
|
+
className: "gw:list-disc gw:p-3",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ a("li", { children: "The USG routinely intercepts and monitors communications on this website for purposes including, but not limited to, penetration testing, COMSEC, monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations." }),
|
|
37
|
+
/* @__PURE__ */ a("li", { children: "At any time, the USG may inspect and seize data stored on this website." }),
|
|
38
|
+
/* @__PURE__ */ a("li", { children: "Communications using, or data stored on, this website are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose." }),
|
|
39
|
+
/* @__PURE__ */ a("li", { children: "This website includes security measures (e.g., authentication and access controls) to protect USG interests — not for your personal benefit or privacy." }),
|
|
40
|
+
/* @__PURE__ */ a("li", { children: "Notwithstanding the above, using this website does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential." })
|
|
41
|
+
]
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { l as default };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Header as e } from "../header/index.js";
|
|
2
|
+
import { Footer as t } from "../footer/index.js";
|
|
3
|
+
import { USABanner as n } from "../header/usa-banner/USABanner.js";
|
|
4
|
+
import r from "./dod-warning.js";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
//#region lib/composite/site-wrapper/index.jsx
|
|
7
|
+
function o({ children: o, navRight: s = void 0, showFooter: c = !0, links: l, usaBanner: u = !0, msgBanner: d = void 0, msgBannerPosition: f = "top", title: p = "US Army Corps of Engineers", homeUrl: m = "#", fluidNav: h = !1, subtitle: g = "", missionText: _ = "", aboutText: v = "", facebookUrl: y = "", twitterUrl: b = "", youtubeUrl: x = "", flickrUrl: S = "", instagramUrl: C = "", linkedInUrl: w = "", usaceLinks: T = [], externalLinks: E = [], armyLogo: D = !0, army250Logo: O = !1, usaceLogo: k = !0, usace250Logo: A = !1, rsgisLogo: j = !1, cwbiLogo: M = !1, showWarning: N = !1, warningTimeout: P = void 0 }) {
|
|
8
|
+
return ["top", "bottom"].includes(f) || console.warn("You must specify top or bottom for messageBannerPosition. Ignoring parameter"), /* @__PURE__ */ a("div", {
|
|
9
|
+
className: "gw:grid gw:min-h-screen gw:grid-rows-1fr-auto",
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ a("div", { children: [
|
|
12
|
+
u && /* @__PURE__ */ i(n, { fluidNav: h }),
|
|
13
|
+
d && f === "top" ? d : null,
|
|
14
|
+
/* @__PURE__ */ i(e, {
|
|
15
|
+
links: l,
|
|
16
|
+
title: p,
|
|
17
|
+
subtitle: g,
|
|
18
|
+
navRight: s,
|
|
19
|
+
fluidNav: h,
|
|
20
|
+
homeUrl: m
|
|
21
|
+
}),
|
|
22
|
+
d && f === "bottom" ? d : null,
|
|
23
|
+
o
|
|
24
|
+
] }),
|
|
25
|
+
c && /* @__PURE__ */ i(t, {
|
|
26
|
+
fluidNav: h,
|
|
27
|
+
missionText: _,
|
|
28
|
+
aboutText: v,
|
|
29
|
+
facebookUrl: y,
|
|
30
|
+
twitterUrl: b,
|
|
31
|
+
youtubeUrl: x,
|
|
32
|
+
flickrUrl: S,
|
|
33
|
+
instagramUrl: C,
|
|
34
|
+
linkedInUrl: w,
|
|
35
|
+
usaceLinks: T,
|
|
36
|
+
externalLinks: E,
|
|
37
|
+
armyLogo: D,
|
|
38
|
+
army250Logo: O,
|
|
39
|
+
usaceLogo: k,
|
|
40
|
+
usace250Logo: A,
|
|
41
|
+
rsgisLogo: j,
|
|
42
|
+
cwbiLogo: M
|
|
43
|
+
}),
|
|
44
|
+
N && /* @__PURE__ */ i(r, { warningTimeout: P })
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { o as SiteWrapper, o as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { extendTailwindMerge as e } from "tailwind-merge";
|
|
2
|
+
//#region lib/gw-merge.js
|
|
3
|
+
var t = ["gw", "gww"], n = e({ experimentalParseClassName: ({ className: e, parseClassName: n }) => {
|
|
4
|
+
let r = n(e);
|
|
5
|
+
return Array.isArray(r.modifiers) && r.modifiers.length && t.some((e) => r.modifiers.includes(e)) ? {
|
|
6
|
+
...r,
|
|
7
|
+
modifiers: r.modifiers.filter((e) => !t.includes(e))
|
|
8
|
+
} : r;
|
|
9
|
+
} });
|
|
10
|
+
//#endregion
|
|
11
|
+
export { n as default, n as gwMerge };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useEffect as e, useState as t } from "react";
|
|
2
|
+
//#region lib/hooks/useIsMobile.js
|
|
3
|
+
function n(n = "768px") {
|
|
4
|
+
if (n = n.replace("px", ""), n = parseInt(n), isNaN(n)) throw Error("Invalid breakpoint. Must be number > 1.");
|
|
5
|
+
if (n <= 0) throw Error("Breakpoint must be greater than 0.");
|
|
6
|
+
switch (n) {
|
|
7
|
+
case "sm":
|
|
8
|
+
n = 640;
|
|
9
|
+
break;
|
|
10
|
+
case "md":
|
|
11
|
+
n = 768;
|
|
12
|
+
break;
|
|
13
|
+
case "lg":
|
|
14
|
+
n = 1024;
|
|
15
|
+
break;
|
|
16
|
+
case "xl":
|
|
17
|
+
n = 1280;
|
|
18
|
+
break;
|
|
19
|
+
case "2xl":
|
|
20
|
+
n = 1536;
|
|
21
|
+
break;
|
|
22
|
+
default: break;
|
|
23
|
+
}
|
|
24
|
+
n += "px";
|
|
25
|
+
let [r, i] = t(!1);
|
|
26
|
+
return e(() => {
|
|
27
|
+
let e = window.matchMedia(`(max-width: ${n})`), t = () => i(e.matches);
|
|
28
|
+
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
29
|
+
}, [n]), r;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { n as useIsMobile };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useEffect as e, useRef as t, useState as n } from "react";
|
|
2
|
+
//#region lib/hooks/useScrollFade.js
|
|
3
|
+
function r() {
|
|
4
|
+
let r = t(null), [i, a] = n(!1);
|
|
5
|
+
return e(() => {
|
|
6
|
+
let e = r.current;
|
|
7
|
+
if (!e) return;
|
|
8
|
+
let t = () => {
|
|
9
|
+
let t = e.scrollHeight > e.clientHeight && e.scrollTop + e.clientHeight < e.scrollHeight;
|
|
10
|
+
a(t);
|
|
11
|
+
};
|
|
12
|
+
return t(), e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
|
|
13
|
+
}, []), {
|
|
14
|
+
scrollRef: r,
|
|
15
|
+
showFade: i
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { r as default };
|