@usace/groundwork 1.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/.eslintrc.cjs +18 -0
- package/.github/workflows/deploy-docs.yml +59 -0
- package/.github/workflows/publish.yml +19 -0
- package/README.md +5 -0
- package/index.html +13 -0
- package/lib/catalyst/alert.jsx +110 -0
- package/lib/catalyst/avatar.jsx +64 -0
- package/lib/catalyst/badge.jsx +72 -0
- package/lib/catalyst/checkbox.jsx +160 -0
- package/lib/catalyst/dialog.jsx +101 -0
- package/lib/catalyst/dropdown.jsx +202 -0
- package/lib/catalyst/fieldset.jsx +87 -0
- package/lib/catalyst/input.jsx +78 -0
- package/lib/catalyst/listbox.jsx +195 -0
- package/lib/catalyst/pagination.jsx +75 -0
- package/lib/catalyst/radio.jsx +144 -0
- package/lib/catalyst/select.jsx +78 -0
- package/lib/catalyst/switch.jsx +203 -0
- package/lib/catalyst/textarea.jsx +59 -0
- package/lib/components/breadcrumbs.jsx +46 -0
- package/lib/components/button.jsx +219 -0
- package/lib/components/display/headings.jsx +39 -0
- package/lib/components/display/text.jsx +48 -0
- package/lib/components/hero.jsx +51 -0
- package/lib/components/layout/container.jsx +13 -0
- package/lib/components/layout/usace-box.jsx +26 -0
- package/lib/components/link.jsx +18 -0
- package/lib/components/table.jsx +146 -0
- package/lib/composite/footer/essayons.jsx +12 -0
- package/lib/composite/footer/footer-links.jsx +33 -0
- package/lib/composite/footer/index.jsx +148 -0
- package/lib/composite/footer/logo-banner.jsx +55 -0
- package/lib/composite/footer/social-links.jsx +60 -0
- package/lib/composite/header/index.jsx +83 -0
- package/lib/composite/header/navbar-links.jsx +113 -0
- package/lib/composite/header/usa-banner/USABanner.jsx +114 -0
- package/lib/composite/header/usa-banner/usa-banner.css +220 -0
- package/lib/composite/site-wrapper/index.jsx +52 -0
- package/lib/index.jsx +19 -0
- package/package.json +39 -0
- package/postcss.config.js +6 -0
- package/public/Magnifying_glass_icon.svg +5 -0
- package/public/armystar-logo-rb.svg +4 -0
- package/public/cwbi-logo.png +0 -0
- package/public/essayonscrest.png +0 -0
- package/public/icon-dot-gov.svg +1 -0
- package/public/icon-https.svg +1 -0
- package/public/nww-lucky-peak-dam.jpg +0 -0
- package/public/rsgis-logo.png +0 -0
- package/public/us_flag_small.png +0 -0
- package/public/usace-logo-color.svg +1 -0
- package/src/App.jsx +38 -0
- package/src/app-bundles/index.js +4 -0
- package/src/app-bundles/route-bundle.js +36 -0
- package/src/app-components/code-example.jsx +17 -0
- package/src/app-components/copy-button.jsx +32 -0
- package/src/app-components/props-table.jsx +43 -0
- package/src/app-components/sub-site-banner.jsx +15 -0
- package/src/app-pages/documentation/_docs-page.jsx +31 -0
- package/src/app-pages/documentation/_docs-sidebar.jsx +111 -0
- package/src/app-pages/documentation/_template.jsx +55 -0
- package/src/app-pages/documentation/app-shell/index.jsx +39 -0
- package/src/app-pages/documentation/app-shell/site-wrapper.jsx +190 -0
- package/src/app-pages/documentation/buttons/index.jsx +170 -0
- package/src/app-pages/documentation/index.jsx +57 -0
- package/src/app-pages/documentation/layout/container.jsx +68 -0
- package/src/app-pages/documentation/layout/index.jsx +52 -0
- package/src/app-pages/documentation/layout/usace-box.jsx +76 -0
- package/src/app-pages/documentation/navigation/breadcrumbs.jsx +119 -0
- package/src/app-pages/documentation/navigation/index.jsx +31 -0
- package/src/app-pages/documentation/types/index.jsx +31 -0
- package/src/app-pages/documentation/types/link.jsx +72 -0
- package/src/app-pages/home.jsx +71 -0
- package/src/index.css +3 -0
- package/src/main.jsx +18 -0
- package/tailwind.config.js +31 -0
- package/vite.config.js +46 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { UsaceBox } from "../../../../lib";
|
|
2
|
+
import DocsPage from "../_docs-page";
|
|
3
|
+
|
|
4
|
+
const pageBreadcrumbs = [
|
|
5
|
+
{
|
|
6
|
+
text: "Documentation",
|
|
7
|
+
href: "/docs",
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
text: "Layout",
|
|
11
|
+
href: "/docs/layout",
|
|
12
|
+
},
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
function Layout() {
|
|
16
|
+
return (
|
|
17
|
+
<DocsPage breadcrumbs={pageBreadcrumbs}>
|
|
18
|
+
<UsaceBox title="Layout">
|
|
19
|
+
<div>
|
|
20
|
+
<p>
|
|
21
|
+
Layout components are used to structure your content on the page.
|
|
22
|
+
They include simple wrappers for using{" "}
|
|
23
|
+
<a href="https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox">
|
|
24
|
+
Flexbox layouts
|
|
25
|
+
</a>{" "}
|
|
26
|
+
and styled containers for displaying content using the standard
|
|
27
|
+
flourish (see the top of this section.)
|
|
28
|
+
</p>
|
|
29
|
+
<p className="mt-3">
|
|
30
|
+
<ul>
|
|
31
|
+
<a className="hover:underline" href="/docs/layout/container">
|
|
32
|
+
<li>Container - a simple wrapper to manage margins.</li>
|
|
33
|
+
</a>
|
|
34
|
+
<a className="hover:underline" href="/docs/layout/flex">
|
|
35
|
+
<li>Flex - easy to use flexbox layouts</li>
|
|
36
|
+
</a>
|
|
37
|
+
<a className="hover:underline" href="/docs/layout/usace-box">
|
|
38
|
+
<li>
|
|
39
|
+
USACE Box - A container with a header and the red and gray
|
|
40
|
+
flourish on top.
|
|
41
|
+
</li>
|
|
42
|
+
</a>
|
|
43
|
+
</ul>
|
|
44
|
+
</p>
|
|
45
|
+
</div>
|
|
46
|
+
</UsaceBox>
|
|
47
|
+
</DocsPage>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default Layout;
|
|
52
|
+
export { Layout };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { UsaceBox, Code } from "../../../../lib";
|
|
2
|
+
import { CodeExample } from "../../../app-components/code-example";
|
|
3
|
+
import PropsTable from "../../../app-components/props-table";
|
|
4
|
+
import DocsPage from "../_docs-page";
|
|
5
|
+
|
|
6
|
+
const pageBreadcrumbs = [
|
|
7
|
+
{
|
|
8
|
+
text: "Documentation",
|
|
9
|
+
href: "/docs",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
text: "Layout",
|
|
13
|
+
href: "/docs/layout",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
text: "USACE Box",
|
|
17
|
+
href: "/docs/layout/usace-box",
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
const componentProps = [
|
|
22
|
+
{
|
|
23
|
+
name: "title",
|
|
24
|
+
type: "string",
|
|
25
|
+
default: "''",
|
|
26
|
+
desc: "The title to display at the top of the box.",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "customTitle",
|
|
30
|
+
type: "component",
|
|
31
|
+
default: "undefined",
|
|
32
|
+
desc: "Custom component to use as the title portion of the box.",
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
function UsaceBoxDocs() {
|
|
37
|
+
return (
|
|
38
|
+
<DocsPage breadcrumbs={pageBreadcrumbs}>
|
|
39
|
+
<UsaceBox title="USACE Box">
|
|
40
|
+
{/* Description of the component and what problem it solves */}
|
|
41
|
+
<div className="pb-6">
|
|
42
|
+
<p>
|
|
43
|
+
Simple wrapper that adds the theme header with the gray box and red
|
|
44
|
+
highlight.
|
|
45
|
+
</p>
|
|
46
|
+
</div>
|
|
47
|
+
{/* Example usage */}
|
|
48
|
+
<div className="rounded-md border border-dashed px-6 py-3 mb-3">
|
|
49
|
+
<UsaceBox title="Example">Some sample content here</UsaceBox>
|
|
50
|
+
</div>
|
|
51
|
+
<CodeExample
|
|
52
|
+
code={`import { UsaceBox } from "@usace/groundwork";
|
|
53
|
+
|
|
54
|
+
function Component() {
|
|
55
|
+
return (
|
|
56
|
+
<UsaceBox title="Example">
|
|
57
|
+
Some sample content here
|
|
58
|
+
</UsaceBox>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default Component;
|
|
63
|
+
`}
|
|
64
|
+
/>
|
|
65
|
+
{/* Component props documentation */}
|
|
66
|
+
<div className="font-bold text-lg pt-6">
|
|
67
|
+
Component API - <Code className="p-2">{`<SiteWrapper />`}</Code>
|
|
68
|
+
</div>
|
|
69
|
+
<PropsTable propsList={componentProps} />
|
|
70
|
+
</UsaceBox>
|
|
71
|
+
</DocsPage>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export default UsaceBoxDocs;
|
|
76
|
+
export { UsaceBoxDocs };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Breadcrumbs as BC,
|
|
3
|
+
BreadcrumbItem,
|
|
4
|
+
UsaceBox,
|
|
5
|
+
Table,
|
|
6
|
+
TableBody,
|
|
7
|
+
TableRow,
|
|
8
|
+
TableHead,
|
|
9
|
+
TableHeader,
|
|
10
|
+
TableCell,
|
|
11
|
+
Code,
|
|
12
|
+
} from "../../../../lib";
|
|
13
|
+
import CopyButton from "../../../app-components/copy-button";
|
|
14
|
+
import { CodeExample } from "../../../app-components/code-example";
|
|
15
|
+
import PropsTable from "../../../app-components/props-table";
|
|
16
|
+
import DocsPage from "../_docs-page";
|
|
17
|
+
|
|
18
|
+
const breadcrumbsPropsData = [
|
|
19
|
+
{
|
|
20
|
+
name: "className",
|
|
21
|
+
type: "string",
|
|
22
|
+
default: "''",
|
|
23
|
+
desc: "Additional css classes to add to the breadcrumbs.",
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const breadcrumbItemPropsData = [
|
|
28
|
+
{
|
|
29
|
+
name: "className",
|
|
30
|
+
type: "string",
|
|
31
|
+
default: "''",
|
|
32
|
+
desc: "Additional css classes to add to the breadcrumb item.",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "href",
|
|
36
|
+
type: "string",
|
|
37
|
+
default: "''",
|
|
38
|
+
desc: "The URL of the breadcrumb item.",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "text",
|
|
42
|
+
type: "string",
|
|
43
|
+
default: "''",
|
|
44
|
+
desc: "The text of the breadcrumb item.",
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
const pageBreadcrumbs = [
|
|
49
|
+
{
|
|
50
|
+
text: "Documentation",
|
|
51
|
+
href: "/docs",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
text: "Navigation",
|
|
55
|
+
href: "/docs/navigation",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
text: "Breadcrumbs",
|
|
59
|
+
href: "/docs/navigation/breadcrumbs",
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
function Breadcrumbs() {
|
|
64
|
+
return (
|
|
65
|
+
<DocsPage breadcrumbs={pageBreadcrumbs}>
|
|
66
|
+
<UsaceBox title="Breadcrumbs">
|
|
67
|
+
<div className="pb-6">
|
|
68
|
+
Use breadcrumbs to indicate the current page’s location within a
|
|
69
|
+
hierarchy. Breadcrumbs are typically placed at the top of a page. They
|
|
70
|
+
are links and should be used to help users navigate through the site.
|
|
71
|
+
Breadcrumbs are not a replacement for the browser’s back button. They
|
|
72
|
+
are a supplemental navigation aid.
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div className="flex justify-start content-center gap-4">
|
|
76
|
+
<Code className="p-1 px-2">{`import { Breadcrumbs, BreadcrumbItem } from @usace/groundwork;`}</Code>
|
|
77
|
+
<CopyButton
|
|
78
|
+
text={`import { Breadcrumbs, BreadcrumbItem } from @usace/groundwork;`}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div className="font-bold text-lg pt-6 pb-3">Basic Usage</div>
|
|
83
|
+
<div className="rounded-md border border-dashed px-6 py-3 mb-3">
|
|
84
|
+
<BC>
|
|
85
|
+
<BreadcrumbItem href="/docs" text="Documentation" />
|
|
86
|
+
<BreadcrumbItem href="/docs/navigation" text="Navigation" />
|
|
87
|
+
<BreadcrumbItem
|
|
88
|
+
href="/docs/navigation/breadcrumbs"
|
|
89
|
+
text="Breadcrumbs"
|
|
90
|
+
/>
|
|
91
|
+
</BC>
|
|
92
|
+
</div>
|
|
93
|
+
<div>
|
|
94
|
+
<CodeExample
|
|
95
|
+
code={`<Breadcrumbs>
|
|
96
|
+
<BreadcrumbItem href="/docs" text="Documentation" />
|
|
97
|
+
<BreadcrumbItem href="/docs/navigation" text="Navigation" />
|
|
98
|
+
<BreadcrumbItem href="/docs/navigation/breadcrumbs" text="Breadcrumbs" />
|
|
99
|
+
</Breadcrumbs>
|
|
100
|
+
`}
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div className="font-bold text-lg pt-6">
|
|
105
|
+
Component API - <Code className="p-2">{`<Breadcrumbs />`}</Code>
|
|
106
|
+
</div>
|
|
107
|
+
<PropsTable propsList={breadcrumbsPropsData} />
|
|
108
|
+
|
|
109
|
+
<div className="font-bold text-lg pt-6">
|
|
110
|
+
Component API - <Code className="p-2">{`<BreadcrumbItem />`}</Code>
|
|
111
|
+
</div>
|
|
112
|
+
<PropsTable propsList={breadcrumbItemPropsData} />
|
|
113
|
+
</UsaceBox>
|
|
114
|
+
</DocsPage>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export default Breadcrumbs;
|
|
119
|
+
export { Breadcrumbs };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { UsaceBox } from "../../../../lib";
|
|
2
|
+
import DocsPage from "../_docs-page";
|
|
3
|
+
|
|
4
|
+
const pageBreadcrumbs = [
|
|
5
|
+
{
|
|
6
|
+
text: "Documentation",
|
|
7
|
+
href: "/docs",
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
text: "Navigation",
|
|
11
|
+
href: "/docs/navigation",
|
|
12
|
+
},
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
function Navigation() {
|
|
16
|
+
return (
|
|
17
|
+
<DocsPage breadcrumbs={pageBreadcrumbs}>
|
|
18
|
+
<UsaceBox title="Navigation">
|
|
19
|
+
<div>
|
|
20
|
+
<p>
|
|
21
|
+
These are docs docs go to{" "}
|
|
22
|
+
<a href="/docs/navigation/breadcrumbs">Breadcrumbs</a>
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
</UsaceBox>
|
|
26
|
+
</DocsPage>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default Navigation;
|
|
31
|
+
export { Navigation };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { UsaceBox } from "../../../../lib";
|
|
2
|
+
import DocsPage from "../_docs-page";
|
|
3
|
+
|
|
4
|
+
const pageBreadcrumbs = [
|
|
5
|
+
{
|
|
6
|
+
text: "Documentation",
|
|
7
|
+
href: "/docs",
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
text: "Types",
|
|
11
|
+
href: "/docs/types",
|
|
12
|
+
},
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
function Types() {
|
|
16
|
+
return (
|
|
17
|
+
<DocsPage breadcrumbs={pageBreadcrumbs}>
|
|
18
|
+
<UsaceBox title="Types (sort of)">
|
|
19
|
+
<div>
|
|
20
|
+
While Groundwork is not a typescript library, we define some types to
|
|
21
|
+
help with development, mainly to help with consistency throughout the
|
|
22
|
+
library. Types defined here describe object types that are commonly
|
|
23
|
+
used throughout the library.
|
|
24
|
+
</div>
|
|
25
|
+
</UsaceBox>
|
|
26
|
+
</DocsPage>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default Types;
|
|
31
|
+
export { Types };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Breadcrumbs as BC,
|
|
3
|
+
BreadcrumbItem,
|
|
4
|
+
UsaceBox,
|
|
5
|
+
Table,
|
|
6
|
+
TableBody,
|
|
7
|
+
TableRow,
|
|
8
|
+
TableHead,
|
|
9
|
+
TableHeader,
|
|
10
|
+
TableCell,
|
|
11
|
+
Code,
|
|
12
|
+
} from "../../../../lib";
|
|
13
|
+
import PropsTable from "../../../app-components/props-table";
|
|
14
|
+
import DocsPage from "../_docs-page";
|
|
15
|
+
|
|
16
|
+
const linkProps = [
|
|
17
|
+
{
|
|
18
|
+
name: "id",
|
|
19
|
+
type: "string",
|
|
20
|
+
default: "''",
|
|
21
|
+
desc: "Used as the key attribute when rendering a list of links, so needs to be unique within the list.",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "href",
|
|
25
|
+
type: "string",
|
|
26
|
+
default: "''",
|
|
27
|
+
desc: "The URL of the link.",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "text",
|
|
31
|
+
type: "string",
|
|
32
|
+
default: "''",
|
|
33
|
+
desc: "The text of the link.",
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const pageBreadcrumbs = [
|
|
38
|
+
{
|
|
39
|
+
text: "Documentation",
|
|
40
|
+
href: "/docs",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
text: "Types",
|
|
44
|
+
href: "/docs/types",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
text: "Link",
|
|
48
|
+
href: "/docs/types/link",
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
function LinkDocs() {
|
|
53
|
+
return (
|
|
54
|
+
<DocsPage breadcrumbs={pageBreadcrumbs}>
|
|
55
|
+
<UsaceBox title="Link">
|
|
56
|
+
<div className="pb-6">
|
|
57
|
+
The Link type is used to create a link to another page or resource. We
|
|
58
|
+
use it to provide a consistent way of representing links, useful where
|
|
59
|
+
links are configurable or dynamic.
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div className="font-bold text-lg pt-6">
|
|
63
|
+
Object - <Code className="p-2">{`link`}</Code>
|
|
64
|
+
</div>
|
|
65
|
+
<PropsTable propsList={linkProps} />
|
|
66
|
+
</UsaceBox>
|
|
67
|
+
</DocsPage>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default LinkDocs;
|
|
72
|
+
export { LinkDocs };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Container, Text, Code, UsaceBox, TextLink, Hero } from "../../lib";
|
|
2
|
+
import CopyButton from "../app-components/copy-button";
|
|
3
|
+
|
|
4
|
+
const base = import.meta.env.BASE_URL;
|
|
5
|
+
|
|
6
|
+
function Home() {
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
<Hero
|
|
10
|
+
image={`${base}nww-lucky-peak-dam.jpg`}
|
|
11
|
+
title="Groundwork"
|
|
12
|
+
subtitle="React Component Library"
|
|
13
|
+
/>
|
|
14
|
+
|
|
15
|
+
<Container>
|
|
16
|
+
<div className="mt-6">
|
|
17
|
+
<UsaceBox title="Welcome">
|
|
18
|
+
<Text>
|
|
19
|
+
Welcome to the homepage for the Groundwork React Components,
|
|
20
|
+
building blocks for webpages using the USACE enterprise theme.
|
|
21
|
+
These components are designed to be used by USACE Developers
|
|
22
|
+
building internal and externally facing web pages and web apps. We
|
|
23
|
+
are continuously adding better accessability, and contributions
|
|
24
|
+
are welcome to extend the library, contribution guidelines are
|
|
25
|
+
available in the GitHub Repo.
|
|
26
|
+
</Text>
|
|
27
|
+
</UsaceBox>
|
|
28
|
+
<div className="grid grid-cols-1 gap-6 mt-6 sm:grid-cols-2">
|
|
29
|
+
<UsaceBox title="Getting Started">
|
|
30
|
+
<div className="flex flex-row justify-start space-between items-center gap-2 mb-3">
|
|
31
|
+
<Code className="block w-full p-1 px-2">
|
|
32
|
+
npm install @usace/groundwork
|
|
33
|
+
</Code>
|
|
34
|
+
<CopyButton text="npm install @usace/groundwork" />
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<Text>
|
|
38
|
+
Then, import the components you need, and start building your
|
|
39
|
+
application
|
|
40
|
+
</Text>
|
|
41
|
+
<div className="mt-3">
|
|
42
|
+
<TextLink href="/docs" className="text-lg font-bold">
|
|
43
|
+
Check out the docs
|
|
44
|
+
</TextLink>
|
|
45
|
+
</div>
|
|
46
|
+
</UsaceBox>
|
|
47
|
+
<UsaceBox
|
|
48
|
+
customTitle={() => {
|
|
49
|
+
return (
|
|
50
|
+
<span>
|
|
51
|
+
<span className="inline-block">Contributing</span>
|
|
52
|
+
</span>
|
|
53
|
+
);
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
<Text>
|
|
57
|
+
Contributions are welcome! Please see the{" "}
|
|
58
|
+
<TextLink href="https://github.com/USACE/groundwork">
|
|
59
|
+
GitHub Repository
|
|
60
|
+
</TextLink>{" "}
|
|
61
|
+
for more information.
|
|
62
|
+
</Text>
|
|
63
|
+
</UsaceBox>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</Container>
|
|
67
|
+
</>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default Home;
|
package/src/index.css
ADDED
package/src/main.jsx
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ReactDOM from "react-dom/client";
|
|
3
|
+
import { ReduxBundlerProvider } from "redux-bundler-hook";
|
|
4
|
+
import getStore from "./app-bundles";
|
|
5
|
+
import App from "./App.jsx";
|
|
6
|
+
import "./index.css";
|
|
7
|
+
|
|
8
|
+
const store = getStore();
|
|
9
|
+
|
|
10
|
+
if (process.env.NODE_ENV === "development") window.store = store;
|
|
11
|
+
|
|
12
|
+
ReactDOM.createRoot(document.getElementById("root")).render(
|
|
13
|
+
<React.StrictMode>
|
|
14
|
+
<ReduxBundlerProvider store={store}>
|
|
15
|
+
<App />
|
|
16
|
+
</ReduxBundlerProvider>
|
|
17
|
+
</React.StrictMode>
|
|
18
|
+
);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
content: [
|
|
4
|
+
"./index.html",
|
|
5
|
+
"./lib/**/*.{js,ts,jsx,tsx}",
|
|
6
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
7
|
+
],
|
|
8
|
+
theme: {
|
|
9
|
+
extend: {
|
|
10
|
+
gridTemplateRows: {
|
|
11
|
+
"1fr-auto": "1fr auto",
|
|
12
|
+
},
|
|
13
|
+
fontFamily: {
|
|
14
|
+
usace: ["Roboto", "Arial", "Helvetica", "sans-serif"],
|
|
15
|
+
},
|
|
16
|
+
colors: {
|
|
17
|
+
"nav-light-gray": "#d0d0d0",
|
|
18
|
+
"nav-gray": "hsla(0, 0%, 80%, 0.9)",
|
|
19
|
+
"nav-translucent-gray": "hsla(0, 0%, 100%, 0.2)",
|
|
20
|
+
"nav-dark-gray": "rgba(85, 85, 85, 0.98)",
|
|
21
|
+
"nav-black": "#18181b",
|
|
22
|
+
"usace-box-light-gray": "#ededed",
|
|
23
|
+
"usace-box-red": "#de1e2e",
|
|
24
|
+
"footer-black": "#1b1b1b",
|
|
25
|
+
"footer-gray": "#333",
|
|
26
|
+
"footer-light-gray": "#ccc",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
plugins: [],
|
|
31
|
+
};
|
package/vite.config.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
|
|
4
|
+
// // https://vitejs.dev/config/
|
|
5
|
+
// export default defineConfig({
|
|
6
|
+
// plugins: [react()],
|
|
7
|
+
// })
|
|
8
|
+
|
|
9
|
+
export default defineConfig(({ mode }) => {
|
|
10
|
+
if (mode === "lib") {
|
|
11
|
+
console.log("Building library");
|
|
12
|
+
return {
|
|
13
|
+
plugins: [react()],
|
|
14
|
+
publicDir: false,
|
|
15
|
+
build: {
|
|
16
|
+
lib: {
|
|
17
|
+
name: "Groundwork",
|
|
18
|
+
fileName: (format) => `groundwork.${format}.js`,
|
|
19
|
+
entry: "lib/index.jsx",
|
|
20
|
+
},
|
|
21
|
+
rollupOptions: {
|
|
22
|
+
external: ["react", "react-dom"],
|
|
23
|
+
output: {
|
|
24
|
+
globals: {
|
|
25
|
+
react: "React",
|
|
26
|
+
"react-dom": "ReactDOM",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
} else {
|
|
33
|
+
console.log("Building preview app", mode);
|
|
34
|
+
const base =
|
|
35
|
+
mode === "production"
|
|
36
|
+
? "https://usace.github.io/groundwork/"
|
|
37
|
+
: "http://localhost:5173/";
|
|
38
|
+
return {
|
|
39
|
+
plugins: [react()],
|
|
40
|
+
base: base,
|
|
41
|
+
build: {
|
|
42
|
+
outDir: "docs",
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|