@usace/groundwork 4.3.2 → 5.0.1
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 +53 -9
- package/dist/groundwork.es.js +0 -9434
- package/dist/groundwork.umd.js +0 -5
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
//#region lib/components/display/loader.jsx
|
|
3
|
+
function t() {
|
|
4
|
+
return /* @__PURE__ */ e("div", {
|
|
5
|
+
className: "gw:h-full gw:flex gw:flex-col gw:align-center gw:justify-center",
|
|
6
|
+
children: /* @__PURE__ */ e("span", { className: "gwloader" })
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { t as Loader, t as default };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import { WIDTH_OPTIONS as t } from "../../utils/sizes.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Description as i, Dialog as a, DialogBackdrop as o, DialogPanel as s, DialogTitle as c } from "@headlessui/react";
|
|
5
|
+
//#region lib/components/display/modal.jsx
|
|
6
|
+
var l = ["dialog", "alertdialog"];
|
|
7
|
+
function u({ opened: u = !1, onClose: d, dialogTitle: f, dialogDescription: p, isStatic: m = !1, autoFocus: h = !1, dialogTransition: g = !1, dialogPanelTransition: _ = !1, unmount: v = !0, role: y = "dialog", buttons: b, size: x = "2xl", className: S, children: C }) {
|
|
8
|
+
return t[x] || (console.error(`Invalid size prop: ${x}. Must be one of: 'sx', 'sm', 'md', 'lg', 'xl', '2xl', '4xl', 'full'`), console.warn(`Defaulting to '2xl' for size of <Modal modalTitle="${f}" .../>`), x = "2xl"), l.includes(y) || (console.error(`Invalid role option for dialog ${y}. Must be one of: 'dialog','alertdialog'`), console.warn(`Defaulting to 'dialog' for role of <Modal modalTitle="${f}" .../>`), y = "dialog"), /* @__PURE__ */ r(a, {
|
|
9
|
+
open: u,
|
|
10
|
+
onClose: d,
|
|
11
|
+
static: m,
|
|
12
|
+
autoFocus: h,
|
|
13
|
+
transition: g,
|
|
14
|
+
unmount: v,
|
|
15
|
+
role: y,
|
|
16
|
+
className: e("gw:relative", "gw:z-200", S),
|
|
17
|
+
children: [/* @__PURE__ */ n(o, { className: "gw:fixed gw:inset-0 gw:bg-black/30" }), /* @__PURE__ */ n("div", {
|
|
18
|
+
className: "gw:fixed gw:inset-0 gw:w-screen gw:overflow-auto gw:p-4",
|
|
19
|
+
children: /* @__PURE__ */ n("div", {
|
|
20
|
+
className: "gw:flex gw:min-h-full gw:items-center gw:justify-center",
|
|
21
|
+
children: /* @__PURE__ */ r(s, {
|
|
22
|
+
className: e(t[x], "gw:space-y-4", "gw:border", "gw:rounded-lg", "gw:shadow-lg", "gw:bg-white", "gw:p-12"),
|
|
23
|
+
transition: _,
|
|
24
|
+
children: [
|
|
25
|
+
f && /* @__PURE__ */ n(c, {
|
|
26
|
+
className: "gw:font-bold gw:text-center",
|
|
27
|
+
children: f
|
|
28
|
+
}),
|
|
29
|
+
p && /* @__PURE__ */ n(i, { children: p }),
|
|
30
|
+
C,
|
|
31
|
+
b
|
|
32
|
+
]
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { u as Modal, u as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region lib/components/display/progress-bar.jsx
|
|
4
|
+
var n = ({ progress: n, hideOnDone: r = !0, showProgress: i, bgColor: a = "gw:bg-blue-600", textColor: o = "gw:text-blue-100", className: s, baseDuration: c = 300, ...l }) => {
|
|
5
|
+
if (typeof n != "number") throw Error("Progress is expected to be a number!");
|
|
6
|
+
return n < 0 && (n = 0), n > 100 && (n = 100), /* @__PURE__ */ t("div", {
|
|
7
|
+
className: e("gw:w-full gw:bg-gray-200 gw:rounded-full gw:dark:bg-gray-700", r && n === 100 ? "gw:hidden" : ""),
|
|
8
|
+
children: /* @__PURE__ */ t("div", {
|
|
9
|
+
className: e(a, o, i && "gw:min-h-4", "gw:text-xs gw:font-medium gw:text-center gw:p-0.5 gw:leading-none gw:rounded-full", s),
|
|
10
|
+
style: {
|
|
11
|
+
width: `${Math.round(n)}%`,
|
|
12
|
+
transition: `width ${c}ms ease-in-out`
|
|
13
|
+
},
|
|
14
|
+
...l,
|
|
15
|
+
children: i && n > 5 ? `${n.toFixed(0)} %` : ""
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { n as ProgressBar, n as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region lib/components/display/skeleton.jsx
|
|
4
|
+
var n = ({ type: n, className: r, ...i }) => /* @__PURE__ */ t("div", {
|
|
5
|
+
className: e("gw:animate-pulse gw:rounded-md gw:bg-gray-400", n === "card" ? "gw:w-80 gw:h-36" : "gw:w-12 gw:h-5", r),
|
|
6
|
+
...i
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as Skeleton, n as default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import t from "../navigation/link.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/components/display/text.jsx
|
|
5
|
+
function r({ className: t, ...r }) {
|
|
6
|
+
return /* @__PURE__ */ n("p", {
|
|
7
|
+
...r,
|
|
8
|
+
"data-slot": "text",
|
|
9
|
+
className: e("gw:text-sm/6 gw:text-zinc-500 gw:md:text-base/6 gw:dark:text-zinc-400", t)
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function i({ className: r, ...i }) {
|
|
13
|
+
return /* @__PURE__ */ n(t, {
|
|
14
|
+
...i,
|
|
15
|
+
className: e("gw:text-zinc-950 gw:underline gw:decoration-zinc-950/50 gw:data-hover:decoration-zinc-950 gw:dark:text-white gw:dark:decoration-white/50 dark:data-[hover]:decoration-white", r)
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function a({ className: t, ...r }) {
|
|
19
|
+
return /* @__PURE__ */ n("strong", {
|
|
20
|
+
...r,
|
|
21
|
+
className: e("gw:font-medium gw:text-zinc-950 gw:dark:text-white", t)
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function o({ className: t, ...r }) {
|
|
25
|
+
return /* @__PURE__ */ n("code", {
|
|
26
|
+
...r,
|
|
27
|
+
className: e("gw:rounded gw:border gw:border-zinc-950/10 gw:bg-zinc-950/2.5 gw:px-0.5 gw:text-sm gw:font-medium gw:text-zinc-950 gw:sm:text-[0.8125rem] gw:dark:border-white/20 gw:dark:bg-white/5 gw:dark:text-white", t)
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { o as Code, a as Strong, r as Text, i as TextLink };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import { Fieldset as t } from "./fieldset.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/components/form/checkboxes.jsx
|
|
5
|
+
function i({ content: i, legend: a, className: o, ...s }) {
|
|
6
|
+
return !i || !Array.isArray(i) || i.length === 0 ? (console.warn("Checkboxes component requires a non-empty array of content items."), null) : /* @__PURE__ */ r(t, {
|
|
7
|
+
className: o,
|
|
8
|
+
...s,
|
|
9
|
+
children: [a && /* @__PURE__ */ n("legend", {
|
|
10
|
+
className: "gw:sr-only",
|
|
11
|
+
children: a
|
|
12
|
+
}), i.map((t, i) => /* @__PURE__ */ n("div", {
|
|
13
|
+
className: "gw:space-y-5",
|
|
14
|
+
children: /* @__PURE__ */ r("div", {
|
|
15
|
+
className: "gw:flex gw:gap-3",
|
|
16
|
+
children: [/* @__PURE__ */ n("div", {
|
|
17
|
+
className: "gw:flex gw:h-6 gw:shrink-0 gw:items-center",
|
|
18
|
+
children: /* @__PURE__ */ r("div", {
|
|
19
|
+
className: "gw:group gw:grid gw:size-4 gw:grid-cols-1",
|
|
20
|
+
children: [/* @__PURE__ */ n("input", {
|
|
21
|
+
defaultChecked: t?.defaultChecked || !1,
|
|
22
|
+
disabled: t?.disabled || !1,
|
|
23
|
+
onClick: t?.onClick,
|
|
24
|
+
onChange: t?.onChange,
|
|
25
|
+
...t?.inputProps,
|
|
26
|
+
id: t?.id || `checkbox-${i}-${a}`,
|
|
27
|
+
name: t?.name || `checkbox-${i}-${a}`,
|
|
28
|
+
type: "checkbox",
|
|
29
|
+
"aria-describedby": t?.ariaDescribedBy || t?.name || `checkbox-${i}-${a}-description`,
|
|
30
|
+
className: e("gw:col-start-1 gw:row-start-1 gw:appearance-none gw:rounded gw:border gw:border-gray-300 gw:bg-white", "gw:checked:border-indigo-600 gw:checked:bg-indigo-600 gw:indeterminate:border-indigo-600 gw:indeterminate:bg-indigo-600", "gw:focus-visible:outline gw:focus-visible:outline-2 gw:focus-visible:outline-offset-2 gw:focus-visible:outline-indigo-600 gw:disabled:border-gray-300", "gw:disabled:bg-gray-100 gw:disabled:checked:bg-gray-100 gw:forced-colors:appearance-auto", t?.inputProps?.className)
|
|
31
|
+
}), /* @__PURE__ */ r("svg", {
|
|
32
|
+
fill: "none",
|
|
33
|
+
viewBox: "0 0 14 14",
|
|
34
|
+
className: "gw:pointer-events-none gw:col-start-1 gw:row-start-1 gw:size-3.5 gw:self-center gw:justify-self-center gw:stroke-white gw:group-has-disabled:stroke-gray-950/25",
|
|
35
|
+
children: [/* @__PURE__ */ n("path", {
|
|
36
|
+
d: "M3 8L6 11L11 3.5",
|
|
37
|
+
strokeWidth: 2,
|
|
38
|
+
strokeLinecap: "round",
|
|
39
|
+
strokeLinejoin: "round",
|
|
40
|
+
className: "gw:group-has-[:checked]:gw:opacity-100"
|
|
41
|
+
}), /* @__PURE__ */ n("path", {
|
|
42
|
+
d: "M3 7H11",
|
|
43
|
+
strokeWidth: 2,
|
|
44
|
+
strokeLinecap: "round",
|
|
45
|
+
strokeLinejoin: "round",
|
|
46
|
+
className: "gw:opacity-0 gw:group-has-indeterminate:opacity-100"
|
|
47
|
+
})]
|
|
48
|
+
})]
|
|
49
|
+
})
|
|
50
|
+
}), /* @__PURE__ */ r("div", {
|
|
51
|
+
className: "text-sm/6",
|
|
52
|
+
children: [t?.label && /* @__PURE__ */ n("label", {
|
|
53
|
+
htmlFor: "comments",
|
|
54
|
+
className: "gw:font-medium gw:text-gray-900",
|
|
55
|
+
...t?.labelProps,
|
|
56
|
+
children: t.label
|
|
57
|
+
}), t?.description && /* @__PURE__ */ n("p", {
|
|
58
|
+
id: `comments-${t?.id}-description`,
|
|
59
|
+
className: e("gw:text-gray-500", t?.className),
|
|
60
|
+
children: t.description
|
|
61
|
+
})]
|
|
62
|
+
})]
|
|
63
|
+
})
|
|
64
|
+
}, [
|
|
65
|
+
i,
|
|
66
|
+
"checkbox",
|
|
67
|
+
a
|
|
68
|
+
].join("-")))]
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { i as Checkboxes, i as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
//#region lib/components/form/dropdown.jsx
|
|
4
|
+
function i({ label: i, options: a, labelClassName: o = "", className: s = "", onChange: c, value: l, ...u }) {
|
|
5
|
+
return !a || a.length === 0 ? (console.error(`Dropdown ${i} must have at least one option with value and text.`), null) : /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("label", {
|
|
6
|
+
htmlFor: i + "-id",
|
|
7
|
+
className: e("gw:block gw:text-sm gw:font-medium gw:leading-6 gw:text-gray-900", o),
|
|
8
|
+
children: i
|
|
9
|
+
}), /* @__PURE__ */ n("select", {
|
|
10
|
+
id: i,
|
|
11
|
+
name: i,
|
|
12
|
+
onChange: c,
|
|
13
|
+
className: e("gw:mt-2 gw:pr-5 gw:w-full gw:rounded-md gw:border-0 gw:py-1.5 gw:pl-3 gw:border-r-8 gw:border-transparent gw:text-gray-600 gw:ring-1 gw:ring-gray-300 gw:focus:ring-2 gw:focus:ring-indigo-600 gw:sm:text-sm gw:sm:leading-6", s),
|
|
14
|
+
value: l,
|
|
15
|
+
...u,
|
|
16
|
+
children: a
|
|
17
|
+
})] });
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { i as Dropdown, i as default };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import { useMemo as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { Description as r, Field as i, Fieldset as a, Label as o, Legend as s } from "@headlessui/react";
|
|
5
|
+
//#region lib/components/form/fieldset.jsx
|
|
6
|
+
function c({ className: r, ...i }) {
|
|
7
|
+
let o = t(() => e("gw:[&>*+[data-slot=control]]:mt-6 gw:*:data-[slot=text]:mt-1", r), [r]);
|
|
8
|
+
return /* @__PURE__ */ n(a, {
|
|
9
|
+
...i,
|
|
10
|
+
className: o
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function l({ ...r }) {
|
|
14
|
+
let i = t(() => e("gw:text-base/6 gw:font-semibold gw:text-zinc-950 gw:data-disabled:opacity-50 gw:sm:text-sm/6 gw:dark:text-white", r.className), [r.className]);
|
|
15
|
+
return /* @__PURE__ */ n(s, {
|
|
16
|
+
...r,
|
|
17
|
+
"data-slot": "legend",
|
|
18
|
+
className: i
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function u({ className: r, ...i }) {
|
|
22
|
+
let a = t(() => e("gw:space-y-8", r), [r]);
|
|
23
|
+
return /* @__PURE__ */ n("div", {
|
|
24
|
+
...i,
|
|
25
|
+
"data-slot": "control",
|
|
26
|
+
className: a
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function d({ className: r, ...a }) {
|
|
30
|
+
return /* @__PURE__ */ n(i, {
|
|
31
|
+
className: t(() => e("gw:[&>[data-slot=label]+[data-slot=control]]:mt-3", "gw:[&>[data-slot=label]+[data-slot=description]]:mt-1", "gw:[&>[data-slot=description]+[data-slot=control]]:mt-3", "gw:[&>[data-slot=control]+[data-slot=description]]:mt-3", "gw:[&>[data-slot=control]+[data-slot=error]]:mt-3", "gw:*:data-[slot=label]:font-medium", r), [r]),
|
|
32
|
+
...a
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function f({ className: r, ...i }) {
|
|
36
|
+
let a = t(() => e("gw:select-none gw:text-base/6 gw:text-zinc-950 gw:data-disabled:opacity-50 gw:sm:text-sm/6 gw:dark:text-white", r), [r]);
|
|
37
|
+
return /* @__PURE__ */ n(o, {
|
|
38
|
+
...i,
|
|
39
|
+
"data-slot": "label",
|
|
40
|
+
className: a
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function p({ className: i, ...a }) {
|
|
44
|
+
let o = t(() => e("gw:text-base/6 gw:text-zinc-500 gw:data-disabled:opacity-50 gw:sm:text-sm/6 gw:dark:text-zinc-400", i), [i]);
|
|
45
|
+
return /* @__PURE__ */ n(r, {
|
|
46
|
+
...a,
|
|
47
|
+
"data-slot": "description",
|
|
48
|
+
className: o
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function m({ className: i, ...a }) {
|
|
52
|
+
let o = t(() => e("gw:text-base/6 gw:text-red-600 gw:data-disabled:opacity-50 gw:sm:text-sm/6 gw:dark:text-red-500", i), [i]);
|
|
53
|
+
return /* @__PURE__ */ n(r, {
|
|
54
|
+
...a,
|
|
55
|
+
"data-slot": "error",
|
|
56
|
+
className: o
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { p as Description, m as ErrorMessage, d as Field, u as FieldGroup, c as Fieldset, f as Label, l as Legend };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { Input as r } from "@headlessui/react";
|
|
5
|
+
//#region lib/components/form/input.jsx
|
|
6
|
+
var i = [
|
|
7
|
+
"date",
|
|
8
|
+
"datetime-local",
|
|
9
|
+
"month",
|
|
10
|
+
"time",
|
|
11
|
+
"week"
|
|
12
|
+
], a = t(function({ className: t, ...a }, o) {
|
|
13
|
+
return /* @__PURE__ */ n("span", {
|
|
14
|
+
"data-slot": "control",
|
|
15
|
+
className: e([
|
|
16
|
+
"gw:relative gw:block gw:w-full",
|
|
17
|
+
"gw:before:absolute gw:before:inset-px gw:before:rounded-sm gw:before:bg-white gw:before:shadow-sm",
|
|
18
|
+
"gw:dark:before:hidden",
|
|
19
|
+
"gw:after:pointer-events-none gw:after:absolute gw:after:inset-0 gw:after:rounded-lg gw:after:ring-inset gw:after:ring-transparent sm:after:gw:focus-within:ring-2 sm:after:gw:focus-within:gw:ring-blue-500",
|
|
20
|
+
"gw:has-data-disabled:opacity-50 gw:has-data-disabled:before:bg-zinc-950/5 gw:has-data-disabled:before:shadow-none",
|
|
21
|
+
"gw:has-data-invalid:before:shadow-red-500/10",
|
|
22
|
+
t
|
|
23
|
+
]),
|
|
24
|
+
children: /* @__PURE__ */ n(r, {
|
|
25
|
+
ref: o,
|
|
26
|
+
className: e([
|
|
27
|
+
a.type && i.includes(a.type) && [
|
|
28
|
+
"gw:[&::-webkit-datetime-edit-fields-wrapper]:p-0",
|
|
29
|
+
"gw:[&::-webkit-date-and-time-value]:min-h-[1.5em]",
|
|
30
|
+
"gw:[&::-webkit-datetime-edit]:inline-flex",
|
|
31
|
+
"gw:[&::-webkit-datetime-edit]:p-0",
|
|
32
|
+
"gw:[&::-webkit-datetime-edit-year-field]:p-0",
|
|
33
|
+
"gw:[&::-webkit-datetime-edit-month-field]:p-0",
|
|
34
|
+
"gw:[&::-webkit-datetime-edit-day-field]:p-0",
|
|
35
|
+
"gw:[&::-webkit-datetime-edit-hour-field]:p-0",
|
|
36
|
+
"gw:[&::-webkit-datetime-edit-minute-field]:p-0",
|
|
37
|
+
"gw:[&::-webkit-datetime-edit-second-field]:p-0",
|
|
38
|
+
"gw:[&::-webkit-datetime-edit-millisecond-field]:p-0",
|
|
39
|
+
"gw:[&::-webkit-datetime-edit-meridiem-field]:p-0"
|
|
40
|
+
],
|
|
41
|
+
"gw:relative gw:block gw:w-full gw:appearance-none gw:rounded-lg gw:px-[calc(--spacing(3.5)-1px)] gw:py-[calc(--spacing(2.5)-1px)] gw:sm:px-[calc(--spacing(3)-1px)] gw:sm:py-[calc(--spacing(1.5)-1px)]",
|
|
42
|
+
"gw:text-base/6 gw:text-zinc-950 gw:placeholder:text-zinc-500 gw:sm:text-sm/6 gw:dark:text-white",
|
|
43
|
+
"gw:border gw:border-zinc-950/10 gw:data-hover:border-zinc-950/20 gw:dark:border-white/10 gw:dark:data-hover:border-white/20",
|
|
44
|
+
"gw:bg-transparent gw:dark:bg-white/5",
|
|
45
|
+
"gw:focus:outline-hidden",
|
|
46
|
+
"gw:data-invalid:border-red-500 gw:data-invalid:data-hover:border-red-500 gw:dark:data-invalid:border-red-500 gw:dark:data-invalid:data-hover:border-red-500",
|
|
47
|
+
"gw:data-disabled:border-zinc-950/20 dark:gw:data-[hover]:data-[disabled]:gw:border-white/15 gw:dark:data-disabled:border-white/15 gw:dark:data-disabled:bg-white/2.5",
|
|
48
|
+
"gw:file:bg-gray-100 gw:file:text-gray-900 gw:file:px-2 gw:file:rounded-sm gw:file:border-1 gw:file:border-gray-500"
|
|
49
|
+
]),
|
|
50
|
+
...a
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
//#endregion
|
|
55
|
+
export { a as Input };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import { Fieldset as t } from "./fieldset.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/components/form/radio-group.jsx
|
|
5
|
+
function i({ legend: i, content: a, label: o, defaultChecked: s, className: c, ...l }) {
|
|
6
|
+
if (!a) throw Error("content is required for radio group!");
|
|
7
|
+
return /* @__PURE__ */ r(t, {
|
|
8
|
+
className: e("gw:my-2", c),
|
|
9
|
+
...l,
|
|
10
|
+
children: [
|
|
11
|
+
i && /* @__PURE__ */ n("legend", {
|
|
12
|
+
className: "gw:text-sm/6 gw:font-semibold gw:text-gray-900",
|
|
13
|
+
children: i
|
|
14
|
+
}),
|
|
15
|
+
o && /* @__PURE__ */ n("p", {
|
|
16
|
+
className: "gw:mt-1 gw:text-sm/6 gw:text-gray-600",
|
|
17
|
+
children: o
|
|
18
|
+
}),
|
|
19
|
+
/* @__PURE__ */ n("div", {
|
|
20
|
+
className: "gw:mt-6 gw:space-y-6",
|
|
21
|
+
children: a.map((t, i) => {
|
|
22
|
+
let a = t?.id || `radio-${o}-${i}`;
|
|
23
|
+
return /* @__PURE__ */ r("div", {
|
|
24
|
+
className: "gw:flex gw:items-center",
|
|
25
|
+
children: [/* @__PURE__ */ n("input", {
|
|
26
|
+
defaultChecked: a === s,
|
|
27
|
+
onClick: t?.onClick,
|
|
28
|
+
onChange: t?.onChange,
|
|
29
|
+
id: a,
|
|
30
|
+
name: "notification-method",
|
|
31
|
+
type: "radio",
|
|
32
|
+
className: "gw:relative gw:size-4 gw:appearance-none gw:rounded-full gw:border gw:border-gray-300 gw:bg-white gw:before:absolute gw:before:inset-1 gw:before:rounded-full gw:before:bg-white gw:checked:border-indigo-600 gw:checked:bg-indigo-600 gw:focus-visible:outline gw:focus-visible:outline-2 gw:focus-visible:outline-offset-2 gw:focus-visible:outline-indigo-600 gw:disabled:border-gray-300 gw:disabled:bg-gray-100 gw:disabled:before:bg-gray-400 gw:forced-colors:appearance-auto forced-colors:gw:before:gw:hidden [&:not(:checked)]:gw:before:gw:hidden"
|
|
33
|
+
}), /* @__PURE__ */ n("label", {
|
|
34
|
+
htmlFor: a,
|
|
35
|
+
className: e("gw:ml-3 gw:block gw:text-sm/6 gw:font-medium gw:text-gray-900", t?.className),
|
|
36
|
+
children: t.text
|
|
37
|
+
})]
|
|
38
|
+
}, a);
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
i.defaultProps = {
|
|
45
|
+
legend: "string",
|
|
46
|
+
content: [{
|
|
47
|
+
id: 0,
|
|
48
|
+
text: "string"
|
|
49
|
+
}],
|
|
50
|
+
label: "string",
|
|
51
|
+
onClick: () => {},
|
|
52
|
+
onChange: () => {},
|
|
53
|
+
defaultChecked: "string",
|
|
54
|
+
className: "string"
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { i as RadioGroup, i as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { Textarea as r } from "@headlessui/react";
|
|
5
|
+
//#region lib/components/form/textarea.jsx
|
|
6
|
+
var i = t(function({ className: t, resizable: i = !0, ...a }, o) {
|
|
7
|
+
return /* @__PURE__ */ n("span", {
|
|
8
|
+
"data-slot": "control",
|
|
9
|
+
className: e([
|
|
10
|
+
t,
|
|
11
|
+
"gw:relative gw:block gw:w-full",
|
|
12
|
+
"gw:before:absolute gw:before:inset-px gw:before:rounded-sm gw:before:bg-white gw:before:shadow-sm",
|
|
13
|
+
"gw:dark:before:hidden",
|
|
14
|
+
"gw:after:pointer-events-none gw:after:absolute gw:after:inset-0 gw:after:rounded-lg gw:after:ring-inset gw:after:ring-transparent gw:sm:focus-within:after:ring-2 gw:sm:focus-within:after:ring-blue-500",
|
|
15
|
+
"gw:has-data-disabled:opacity-50 gw:has-data-disabled:before:bg-zinc-950/5 gw:has-data-disabled:before:shadow-none"
|
|
16
|
+
]),
|
|
17
|
+
children: /* @__PURE__ */ n(r, {
|
|
18
|
+
ref: o,
|
|
19
|
+
className: e([
|
|
20
|
+
"gw:relative gw:block gw:h-full gw:w-full gw:appearance-none gw:rounded-lg gw:px-[calc(--spacing(3.5)-1px)] gw:py-[calc(--spacing(2.5)-1px)] gw:sm:px-[calc(--spacing(3)-1px)] gw:sm:py-[calc(--spacing(1.5)-1px)]",
|
|
21
|
+
"gw:text-base/6 gw:text-zinc-950 gw:placeholder:text-zinc-500 gw:sm:text-sm/6 gw:dark:text-white",
|
|
22
|
+
"gw:border gw:border-zinc-950/10 gw:data-hover:border-zinc-950/20 gw:dark:border-white/10 gw:dark:data-hover:border-white/20",
|
|
23
|
+
"gw:bg-transparent gw:dark:bg-white/5",
|
|
24
|
+
"gw:focus:outline-hidden",
|
|
25
|
+
"gw:data-invalid:border-red-500 gw:data-invalid:data-hover:border-red-500 gw:dark:data-invalid:border-red-600 gw:dark:data-invalid:data-hover:border-red-600",
|
|
26
|
+
"gw:disabled:border-zinc-950/20 gw:dark:disabled:border-white/15 gw:dark:disabled:bg-white/2.5 gw:dark:data-hover:disabled:border-white/15",
|
|
27
|
+
i ? "gw:resize-y" : "gw:resize-none"
|
|
28
|
+
]),
|
|
29
|
+
...a
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
//#endregion
|
|
34
|
+
export { i as Textarea };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Container as e } from "./layout/container.js";
|
|
2
|
+
import { useEffect as t, useState as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/components/hero.jsx
|
|
5
|
+
function a({ title: a, subtitle: o, image: s, alt: c, children: l, duration_ms: u = 12e3, imgHeight: d, imgWidth: f, opacity: p = .5 }) {
|
|
6
|
+
let m = Array.isArray(s), h = Array.isArray(c), [g, _] = n(m ? s[0] : s), [v, y] = n(h ? c[0] : c);
|
|
7
|
+
function b(e) {
|
|
8
|
+
return Math.floor(Math.random() * e);
|
|
9
|
+
}
|
|
10
|
+
if (t(() => {
|
|
11
|
+
if (!m) return;
|
|
12
|
+
let e = setInterval(() => {
|
|
13
|
+
let e = b(s.length);
|
|
14
|
+
_(s[e]), c && y(c[e]);
|
|
15
|
+
}, u);
|
|
16
|
+
return () => clearInterval(e);
|
|
17
|
+
}, [
|
|
18
|
+
s,
|
|
19
|
+
c,
|
|
20
|
+
u,
|
|
21
|
+
m
|
|
22
|
+
]), m && h && s.length !== c.length) throw Error("Error rendering hero image. Your image and alt text arrays must be the same length.");
|
|
23
|
+
return /* @__PURE__ */ i("div", {
|
|
24
|
+
className: "gw:relative",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ r("div", {
|
|
27
|
+
className: "gw:h-56 gw:w-full gw:overflow-clip gw:bg-zinc-950 gw:md:h-1/5 gw:md:max-h-[500px]",
|
|
28
|
+
children: /* @__PURE__ */ r("img", {
|
|
29
|
+
src: g,
|
|
30
|
+
alt: v,
|
|
31
|
+
"aria-label": c,
|
|
32
|
+
className: "gw:object-cover gw:object-center gw:w-full gw:h-full",
|
|
33
|
+
style: {
|
|
34
|
+
height: d,
|
|
35
|
+
width: f
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ r("div", {
|
|
40
|
+
style: { opacity: p },
|
|
41
|
+
className: "gw:absolute gw:inset-0 gw:bg-zinc-950"
|
|
42
|
+
}),
|
|
43
|
+
l && /* @__PURE__ */ r("div", {
|
|
44
|
+
className: "gw:absolute gw:inset-0 gw:flex gw:items-center gw:justify-center",
|
|
45
|
+
children: l
|
|
46
|
+
}),
|
|
47
|
+
a && /* @__PURE__ */ r(e, {
|
|
48
|
+
className: "gw:relative",
|
|
49
|
+
children: /* @__PURE__ */ r("div", {
|
|
50
|
+
className: "gw:absolute gw:bottom-0 gw:left-0 gw:max-w-7xl gw:mx-auto gw:px-4",
|
|
51
|
+
children: /* @__PURE__ */ i("div", {
|
|
52
|
+
className: "gw:pb-8",
|
|
53
|
+
children: [/* @__PURE__ */ r("h1", {
|
|
54
|
+
className: "gw:text-4xl gw:font-extrabold gw:tracking-tight gw:text-white gw:sm:text-5xl gw:lg:text-6xl",
|
|
55
|
+
children: a
|
|
56
|
+
}), /* @__PURE__ */ r("p", {
|
|
57
|
+
className: "gw:mt-1 gw:text-xl gw:text-zinc-200",
|
|
58
|
+
children: o
|
|
59
|
+
})]
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { a as Hero, a as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import { useMemo as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/components/layout/container.jsx
|
|
5
|
+
function r({ className: r, children: i, fluid: a }) {
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
className: t(() => e("gw:w-full gw:mx-auto gw:px-4 gw:box-border", a ? "gw:max-w-screen" : "gw:max-w-(--gw:breakpoint-2xl)", r), [r, a]),
|
|
8
|
+
children: i
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { r as Container, r as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import { forwardRef as t, useMemo as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/components/layout/usace-box.jsx
|
|
5
|
+
var a = t(function({ children: t, className: a, title: o, customTitle: s, id: c }, l) {
|
|
6
|
+
let u = s;
|
|
7
|
+
return /* @__PURE__ */ i("div", {
|
|
8
|
+
ref: l,
|
|
9
|
+
className: n(() => e("gw:mb-10 gw:relative", "gw:before:block gw:before:bg-usace-box-light-gray gw:before:h-8 gw:before:mb-[-12px] gw:before:w-full", "gw:after:block gw:after:absolute gw:after:top-0 gw:after:left-0 gw:after:bg-usace-box-red gw:after:h-[5px] gw:after:w-[50px] gw:after:z-2", a), [a]),
|
|
10
|
+
id: c,
|
|
11
|
+
children: [/* @__PURE__ */ i("h2", {
|
|
12
|
+
className: "gw:font-bold gw:mb-5 gw:text-[1.3rem]",
|
|
13
|
+
children: [o, u && /* @__PURE__ */ r(u, {})]
|
|
14
|
+
}), t]
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { a as UsaceBox, a as default };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import t from "./link.js";
|
|
3
|
+
import { useMemo as n } from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { VscChevronRight as a } from "react-icons/vsc";
|
|
6
|
+
import { MdHome as o } from "react-icons/md";
|
|
7
|
+
//#region lib/components/navigation/breadcrumbs.jsx
|
|
8
|
+
function s({ className: o, href: s, text: c }) {
|
|
9
|
+
return /* @__PURE__ */ r("li", {
|
|
10
|
+
className: n(() => e("gw:text-gray-500 gw:hover:text-gray-700 gw:last:text-gray-900", o), [o]),
|
|
11
|
+
children: /* @__PURE__ */ i("div", {
|
|
12
|
+
className: "gw:flex gw:items-center",
|
|
13
|
+
children: [/* @__PURE__ */ r(a, {
|
|
14
|
+
size: 18,
|
|
15
|
+
"aria-hidden": "true",
|
|
16
|
+
color: "gw:text-gray-500"
|
|
17
|
+
}), /* @__PURE__ */ r(t, {
|
|
18
|
+
href: s,
|
|
19
|
+
className: "gw:ml-2 gw:text-nowrap",
|
|
20
|
+
children: c
|
|
21
|
+
})]
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function c({ className: a, children: s, baseUrl: c }) {
|
|
26
|
+
return /* @__PURE__ */ i("ol", {
|
|
27
|
+
className: n(() => e("gw:flex gw:flex-nowrap gw:items-center gw:space-x-2 gw:py-4 gw:overflow-x-auto gw:hide-scrollbar", a), [a]),
|
|
28
|
+
children: [/* @__PURE__ */ r("li", { children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ i(t, {
|
|
29
|
+
href: c,
|
|
30
|
+
className: "gw:text-gray-500 gw:hover:text-gray-700",
|
|
31
|
+
children: [/* @__PURE__ */ r(o, { size: 22 }), /* @__PURE__ */ r("span", {
|
|
32
|
+
className: "gw:sr-only",
|
|
33
|
+
children: "Home"
|
|
34
|
+
})]
|
|
35
|
+
}) }) }), s]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { s as BreadcrumbItem, c as Breadcrumbs, c as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext as e, useContext as t } from "react";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
//#region lib/components/navigation/link-provider.jsx
|
|
4
|
+
var r = e({
|
|
5
|
+
component: "a",
|
|
6
|
+
hrefMap: "href"
|
|
7
|
+
}), i = ({ component: e, hrefMap: t, children: i }) => /* @__PURE__ */ n(r.Provider, {
|
|
8
|
+
value: {
|
|
9
|
+
component: e,
|
|
10
|
+
hrefMap: t
|
|
11
|
+
},
|
|
12
|
+
children: i
|
|
13
|
+
}), a = () => t(r);
|
|
14
|
+
//#endregion
|
|
15
|
+
export { i as LinkProvider, a as useLinkComponent };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useLinkComponent as e } from "./link-provider.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/components/navigation/link.jsx
|
|
5
|
+
var r = ({ href: t, children: r, ...i }, a) => {
|
|
6
|
+
let { component: o, hrefMap: s } = e();
|
|
7
|
+
return /* @__PURE__ */ n(o || "a", {
|
|
8
|
+
[s || "href"]: t,
|
|
9
|
+
...i,
|
|
10
|
+
ref: a,
|
|
11
|
+
children: r
|
|
12
|
+
});
|
|
13
|
+
}, i = t(r), a = t(r);
|
|
14
|
+
//#endregion
|
|
15
|
+
export { i as Link, a as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import e from "../../gw-merge.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { Tab as r, TabGroup as i, TabList as a, TabPanel as o, TabPanels as s } from "@headlessui/react";
|
|
4
|
+
//#region lib/components/navigation/tabs.jsx
|
|
5
|
+
function c({ tabs: c, fill: l = !1, defaultIndex: u = 0 }) {
|
|
6
|
+
return /* @__PURE__ */ n(i, {
|
|
7
|
+
defaultIndex: u,
|
|
8
|
+
children: [/* @__PURE__ */ t(a, {
|
|
9
|
+
className: "gw:flex gw:flex-wrap gw:gap-x-1 gw:text-gray-500 gw:font-semibold gw:border-b-2 gw:border-gray-300 g",
|
|
10
|
+
children: c.map((i, a) => /* @__PURE__ */ t(r, {
|
|
11
|
+
onClick: typeof i.onClick == "function" ? i.onClick : void 0,
|
|
12
|
+
className: ({ selected: t }) => e("gw:px-4 gw:py-2 gw:shadow gw:hover:bg-gray-100", l ? "gw:flex-auto" : "", t ? "gw:bg-gray-50" : ""),
|
|
13
|
+
children: /* @__PURE__ */ n("span", {
|
|
14
|
+
className: `gw:flex ${i.justify === "space-between" ? "gw:justify-between" : "gw:justify-center"} gw:items-center gw:hover:cursor-pointer`,
|
|
15
|
+
children: [
|
|
16
|
+
i.leftSection && /* @__PURE__ */ t("span", {
|
|
17
|
+
className: "gw:mr-2",
|
|
18
|
+
children: i.leftSection
|
|
19
|
+
}),
|
|
20
|
+
i.name,
|
|
21
|
+
i.rightSection && /* @__PURE__ */ t("span", {
|
|
22
|
+
className: "gw:ml-2",
|
|
23
|
+
children: i.rightSection
|
|
24
|
+
})
|
|
25
|
+
]
|
|
26
|
+
})
|
|
27
|
+
}, a))
|
|
28
|
+
}), /* @__PURE__ */ t(s, { children: c.map((e) => /* @__PURE__ */ t(o, {
|
|
29
|
+
className: "gw:bg-white gw:p-0",
|
|
30
|
+
children: e.content
|
|
31
|
+
}, e.name)) })]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { c as Tabs, c as default };
|