@usace/groundwork 1.0.2 → 1.0.4

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.
Files changed (79) hide show
  1. package/dist/groundwork.es.js +5131 -0
  2. package/dist/groundwork.umd.js +30 -0
  3. package/dist/style.css +1 -0
  4. package/package.json +11 -3
  5. package/.eslintrc.cjs +0 -18
  6. package/.github/workflows/deploy-docs.yml +0 -59
  7. package/.github/workflows/publish.yml +0 -19
  8. package/index.html +0 -13
  9. package/lib/catalyst/alert.jsx +0 -110
  10. package/lib/catalyst/avatar.jsx +0 -64
  11. package/lib/catalyst/badge.jsx +0 -72
  12. package/lib/catalyst/checkbox.jsx +0 -160
  13. package/lib/catalyst/dialog.jsx +0 -101
  14. package/lib/catalyst/dropdown.jsx +0 -202
  15. package/lib/catalyst/fieldset.jsx +0 -87
  16. package/lib/catalyst/input.jsx +0 -78
  17. package/lib/catalyst/listbox.jsx +0 -195
  18. package/lib/catalyst/pagination.jsx +0 -75
  19. package/lib/catalyst/radio.jsx +0 -144
  20. package/lib/catalyst/select.jsx +0 -78
  21. package/lib/catalyst/switch.jsx +0 -203
  22. package/lib/catalyst/textarea.jsx +0 -59
  23. package/lib/components/breadcrumbs.jsx +0 -46
  24. package/lib/components/button.jsx +0 -219
  25. package/lib/components/display/headings.jsx +0 -39
  26. package/lib/components/display/text.jsx +0 -48
  27. package/lib/components/hero.jsx +0 -51
  28. package/lib/components/layout/container.jsx +0 -13
  29. package/lib/components/layout/usace-box.jsx +0 -26
  30. package/lib/components/link.jsx +0 -18
  31. package/lib/components/table.jsx +0 -146
  32. package/lib/composite/footer/essayons.jsx +0 -12
  33. package/lib/composite/footer/footer-links.jsx +0 -33
  34. package/lib/composite/footer/index.jsx +0 -148
  35. package/lib/composite/footer/logo-banner.jsx +0 -55
  36. package/lib/composite/footer/social-links.jsx +0 -60
  37. package/lib/composite/header/index.jsx +0 -83
  38. package/lib/composite/header/navbar-links.jsx +0 -113
  39. package/lib/composite/header/usa-banner/USABanner.jsx +0 -114
  40. package/lib/composite/header/usa-banner/usa-banner.css +0 -220
  41. package/lib/composite/site-wrapper/index.jsx +0 -52
  42. package/lib/index.jsx +0 -19
  43. package/postcss.config.js +0 -6
  44. package/public/Magnifying_glass_icon.svg +0 -5
  45. package/public/armystar-logo-rb.svg +0 -4
  46. package/public/cwbi-logo.png +0 -0
  47. package/public/essayonscrest.png +0 -0
  48. package/public/icon-dot-gov.svg +0 -1
  49. package/public/icon-https.svg +0 -1
  50. package/public/nww-lucky-peak-dam.jpg +0 -0
  51. package/public/rsgis-logo.png +0 -0
  52. package/public/us_flag_small.png +0 -0
  53. package/public/usace-logo-color.svg +0 -1
  54. package/src/App.jsx +0 -38
  55. package/src/app-bundles/index.js +0 -4
  56. package/src/app-bundles/route-bundle.js +0 -36
  57. package/src/app-components/code-example.jsx +0 -17
  58. package/src/app-components/copy-button.jsx +0 -32
  59. package/src/app-components/props-table.jsx +0 -43
  60. package/src/app-components/sub-site-banner.jsx +0 -15
  61. package/src/app-pages/documentation/_docs-page.jsx +0 -31
  62. package/src/app-pages/documentation/_docs-sidebar.jsx +0 -111
  63. package/src/app-pages/documentation/_template.jsx +0 -55
  64. package/src/app-pages/documentation/app-shell/index.jsx +0 -39
  65. package/src/app-pages/documentation/app-shell/site-wrapper.jsx +0 -190
  66. package/src/app-pages/documentation/buttons/index.jsx +0 -170
  67. package/src/app-pages/documentation/index.jsx +0 -57
  68. package/src/app-pages/documentation/layout/container.jsx +0 -68
  69. package/src/app-pages/documentation/layout/index.jsx +0 -52
  70. package/src/app-pages/documentation/layout/usace-box.jsx +0 -76
  71. package/src/app-pages/documentation/navigation/breadcrumbs.jsx +0 -119
  72. package/src/app-pages/documentation/navigation/index.jsx +0 -31
  73. package/src/app-pages/documentation/types/index.jsx +0 -31
  74. package/src/app-pages/documentation/types/link.jsx +0 -72
  75. package/src/app-pages/home.jsx +0 -71
  76. package/src/index.css +0 -3
  77. package/src/main.jsx +0 -18
  78. package/tailwind.config.js +0 -31
  79. package/vite.config.js +0 -46
@@ -1,57 +0,0 @@
1
- import { UsaceBox, Code, H4 } from "../../../lib";
2
- import CopyButton from "../../app-components/copy-button";
3
- import DocsPage from "./_docs-page";
4
-
5
- const pageBreadcrumbs = [
6
- {
7
- text: "Documentation",
8
- href: "/docs",
9
- },
10
- ];
11
-
12
- function Docs() {
13
- return (
14
- <DocsPage breadcrumbs={pageBreadcrumbs}>
15
- <UsaceBox title="Getting Started">
16
- <H4>Project Setup</H4>
17
- <div className="mt-3 mb-3">
18
- <p>
19
- Groundwork is a set of React components that are designed to be used
20
- by USACE Developers building internal and externally facing web
21
- pages and web apps. The library should be compatible with any React
22
- project using a build step. We test the framework and only support
23
- using the Vite build tool. See the{" "}
24
- <a
25
- className="underline"
26
- href="https://vitejs.dev/guide/"
27
- target="_blank"
28
- referrer="no-referrer"
29
- >
30
- Vite documentation
31
- </a>{" "}
32
- for more details on getting started.{" "}
33
- </p>
34
- <p className="mt-3">
35
- Set up a new project with Vite using the following command:
36
- <div className="flex flex-row justify-start space-between items-center gap-2 mt-3 mb-3">
37
- <Code className="block p-1 px-2">
38
- npm create vite@latest {`<app-name>`} --template react
39
- </Code>
40
- <CopyButton text="npm create vite@latest <app-name> --template react" />
41
- </div>
42
- </p>
43
- </div>
44
-
45
- <H4>Installation</H4>
46
- <div className="flex flex-row justify-start space-between items-center gap-2 mt-3 mb-3">
47
- <Code className="block p-1 px-2">npm install @usace/groundwork</Code>
48
- <CopyButton text="npm install @usace/groundwork" />
49
- </div>
50
- <div>Then go build stuff with the components</div>
51
- </UsaceBox>
52
- </DocsPage>
53
- );
54
- }
55
-
56
- export default Docs;
57
- export { Docs };
@@ -1,68 +0,0 @@
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: "Container",
17
- href: "/docs/layout/container",
18
- },
19
- ];
20
-
21
- const componentProps = [
22
- {
23
- name: "fluid",
24
- type: "boolean",
25
- default: "false",
26
- desc: "If true, the container will be full width. If false, the container will have a max width of 1140px.",
27
- },
28
- ];
29
-
30
- function ContainerDocs() {
31
- return (
32
- <DocsPage breadcrumbs={pageBreadcrumbs}>
33
- <UsaceBox title="Container">
34
- {/* Description of the component and what problem it solves */}
35
- <div className="pb-6">
36
- <p>
37
- Use Container to add a section to your page with padding and a max
38
- with that keeps content within a readable width on users screens, or
39
- if you want full width all the time, you can set fluid == true.
40
- </p>
41
- </div>
42
- {/* Example usage */}
43
- <CodeExample
44
- code={`import { Container } from "@usace/groundwork";
45
-
46
- function MyComponent() {
47
- return (
48
- <Container>
49
- <div>{content}</div>
50
- </Container>
51
- )
52
- }
53
-
54
- export default MyComponent;
55
- `}
56
- />
57
- {/* Component props documentation */}
58
- <div className="font-bold text-lg pt-6">
59
- Component API - <Code className="p-2">{`<SiteWrapper />`}</Code>
60
- </div>
61
- <PropsTable propsList={componentProps} />
62
- </UsaceBox>
63
- </DocsPage>
64
- );
65
- }
66
-
67
- export default ContainerDocs;
68
- export { ContainerDocs };
@@ -1,52 +0,0 @@
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 };
@@ -1,76 +0,0 @@
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 };
@@ -1,119 +0,0 @@
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 };
@@ -1,31 +0,0 @@
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 };
@@ -1,31 +0,0 @@
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 };
@@ -1,72 +0,0 @@
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 };
@@ -1,71 +0,0 @@
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 DELETED
@@ -1,3 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
package/src/main.jsx DELETED
@@ -1,18 +0,0 @@
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
- );
@@ -1,31 +0,0 @@
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 DELETED
@@ -1,46 +0,0 @@
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
- });