Skip to content

Commit 0aaebdd

Browse files
Merge pull request #8 from Availity/docs/element
refactor: add element and restyle
2 parents 08e8f44 + bde4b46 commit 0aaebdd

File tree

8 files changed

+8629
-10587
lines changed

8 files changed

+8629
-10587
lines changed

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
commitlint -e $HUSKY_GIT_PARAMS

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lint-staged

docusaurus.config.js

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = {
1111
themeConfig: {
1212
colorMode: {
1313
defaultMode: 'light',
14+
disableSwitch: true,
1415
// Should we use the prefers-color-scheme media-query,
1516
// using user system preferences, instead of the hardcoded defaultMode
1617
respectPrefersColorScheme: true,
@@ -25,9 +26,9 @@ module.exports = {
2526
},
2627
items: [
2728
{
28-
href: 'https://availity.github.io/availity-react',
29+
href: 'https://availity.github.io/element',
2930
target: '_self',
30-
label: 'React',
31+
label: 'Element',
3132
position: 'right',
3233
},
3334
{
@@ -54,16 +55,16 @@ module.exports = {
5455
style: 'dark',
5556
links: [
5657
{
57-
title: 'Availity React',
58+
title: 'Element Design System',
5859
items: [
5960
{
6061
label: 'Documentation',
61-
href: 'https://availity.github.io/availity-react',
62+
href: 'https://availity.github.io/element',
6263
target: '_self',
6364
},
6465
{
6566
label: 'GitHub Repository',
66-
href: 'https://github.com/availity/availity-react',
67+
href: 'https://github.com/Availity/element',
6768
},
6869
],
6970
},
@@ -95,6 +96,33 @@ module.exports = {
9596
},
9697
],
9798
},
99+
{
100+
title: 'Availity React',
101+
items: [
102+
{
103+
label: 'Documentation',
104+
href: 'https://availity.github.io/availity-react',
105+
target: '_self',
106+
},
107+
{
108+
label: 'GitHub Repository',
109+
href: 'https://github.com/availity/availity-react',
110+
},
111+
],
112+
},
113+
{
114+
title: 'Legacy Availity UIKit',
115+
items: [
116+
{
117+
label: 'Documentation',
118+
href: 'https://availity.github.io/availity-uikit',
119+
},
120+
{
121+
label: 'GitHub Repository',
122+
href: 'https://github.com/Availity/availity-uikit',
123+
},
124+
],
125+
},
98126
],
99127
copyright: `Copyright © ${new Date().getFullYear()} Made with ❤️ by Availity`,
100128
},

package.json

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,32 @@
99
"Brandon Robinson <[email protected]>"
1010
],
1111
"dependencies": {
12-
"@docusaurus/core": "2.0.0-alpha.70",
13-
"@docusaurus/preset-classic": "2.0.0-alpha.70",
14-
"@mdx-js/react": "^1.6.21",
15-
"clsx": "^1.1.1",
16-
"react": "^16.8.4",
17-
"react-dom": "^16.8.4",
18-
"react-icons": "^4.1.0"
12+
"@availity/mui-alert": "^0.5.16",
13+
"@availity/mui-card": "^0.2.17",
14+
"@availity/mui-layout": "^0.1.6",
15+
"@availity/mui-typography": "^0.2.0",
16+
"@availity/theme-provider": "^0.4.80",
17+
"@docusaurus/core": "3.5.2",
18+
"@docusaurus/preset-classic": "3.5.2",
19+
"@mdx-js/react": "^3.0.1",
20+
"@mui/material": "^5.15.0",
21+
"axios": "^1.7.7",
22+
"clsx": "^2.1.1",
23+
"react": "^18.3.1",
24+
"react-dom": "^18.3.1",
25+
"react-icons": "^5.3.0"
1926
},
2027
"devDependencies": {
21-
"@commitlint/cli": "^11.0.0",
22-
"@commitlint/config-conventional": "^11.0.0",
23-
"@typescript-eslint/eslint-plugin": "^4.12.0",
24-
"@typescript-eslint/parser": "^4.12.0",
25-
"eslint-config-availity": "^7.0.250",
26-
"gh-pages": "^3.1.0",
27-
"husky": "^4.3.7",
28-
"jest": "^26.6.3",
29-
"lint-staged": "^10.5.3",
30-
"prettier": "^2.2.1",
31-
"typescript": "^4.1.3"
28+
"@commitlint/cli": "^18.0.0",
29+
"@commitlint/config-conventional": "^18.0.0",
30+
"eslint-config-availity": "^10.0.3",
31+
"gh-pages": "^6.1.1",
32+
"husky": "^9.1.6",
33+
"is-ci": "^3.0.1",
34+
"jest": "^29.7.0",
35+
"lint-staged": "^15.2.10",
36+
"prettier": "^3.3.3",
37+
"typescript": "^5.6.2"
3238
},
3339
"keywords": [
3440
"docusaurus",
@@ -45,7 +51,8 @@
4551
"clear": "docusaurus clear",
4652
"deploy:pages": "yarn build && gh-pages -d public -b master",
4753
"format": "prettier --write src/**/*.{js,jsx}",
48-
"lint": "eslint ."
54+
"lint": "eslint .",
55+
"postinstall": "is-ci || husky"
4956
},
5057
"repository": {
5158
"type": "git",
@@ -59,12 +66,6 @@
5966
"@commitlint/config-conventional"
6067
]
6168
},
62-
"husky": {
63-
"hooks": {
64-
"commit-msg": "commitlint -e $HUSKY_GIT_PARAMS",
65-
"pre-commit": "lint-staged"
66-
}
67-
},
6869
"lint-staged": {
6970
"*.js": [
7071
"eslint --fix",
@@ -87,5 +88,7 @@
8788
"last 1 firefox version",
8889
"last 1 safari version"
8990
]
90-
}
91+
},
92+
"packageManager": "[email protected]+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"
9193
}
94+

src/css/custom.css

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,36 @@
1717
--ifm-color-primary-lightest: rgb(146, 224, 208);
1818

1919
/* Potential Availity Theme */
20-
/*
21-
--ifm-color-primary: #d93d11;
22-
--ifm-color-primary-dark: #c3370f;
20+
21+
--ifm-color-primary: #1552BC;
22+
--ifm-color-primary-dark: #103E8E;
2323
--ifm-color-primary-darker: #b8340e;
2424
--ifm-color-primary-darkest: #982b0c;
2525
--ifm-color-primary-light: #ed4415;
2626
--ifm-color-primary-lighter: #ed4d20;
2727
--ifm-color-primary-lightest: #f06740;
28-
*/
28+
29+
--ifm-h3-font-size: 28px;
30+
31+
--ifm-button-background-color: var(--ifm-color-primary);
32+
--ifm-button-border-radius: 4px;
33+
2934
--ifm-code-font-size: 95%;
35+
--ifm-navbar-background-color: #292B32;
36+
--ifm-navbar-link-color: #ffffff;
37+
--ifm-color-content: #292B32 --ifm-heading-color: var(--ifm-color-content);
38+
--ifm-hero-text-color: var(--ifm-color-content);
39+
--ifm-navbar-link-hover-color: #ffffff84;
40+
--ifm-footer-link-hover-color: var(--ifm-navbar-link-hover-color);
41+
--ifm-footer-background-color: #393B46;
42+
}
43+
44+
a.MuiButton-root:hover {
45+
color: unset
46+
}
47+
48+
a:hover {
49+
text-decoration: unset;
3050
}
3151

3252
.docusaurus-highlight-code-line {
@@ -45,10 +65,9 @@
4565
width: 24px;
4666
height: 24px;
4767
display: flex;
48-
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
49-
no-repeat;
68+
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;
5069
}
70+
5171
html[data-theme='dark'] .header-github-link:before {
52-
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")
53-
no-repeat;
54-
}
72+
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;
73+
}

src/pages/index.js

Lines changed: 58 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import React from 'react';
2-
import { FaReact, FaPlayCircle, FaCss3, FaJs } from 'react-icons/fa';
3-
import clsx from 'clsx';
2+
import { FaReact, FaPlayCircle, FaJs, FaCss3 } from 'react-icons/fa';
43
import Layout from '@theme/Layout';
5-
import Link from '@docusaurus/Link';
64
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
5+
import { ThemeProvider } from '@availity/theme-provider';
6+
import { Card, CardActionArea, CardHeader, CardContent } from '@availity/mui-card';
7+
import { Grid, Container } from '@availity/mui-layout';
8+
import { Typography } from '@availity/mui-typography';
9+
import { Alert } from '@availity/mui-alert';
710
import styles from './styles.module.css';
811

912
const features = [
@@ -16,11 +19,11 @@ const features = [
1619
target: '_self',
1720
},
1821
{
19-
title: 'React Components',
22+
title: 'Element',
2023
icon: FaReact,
2124
// linkStyle: 'reactIcon',
22-
description: <>React components built with the Availity UI Kit and Reactstrap</>,
23-
href: 'https://availity.github.io/availity-react',
25+
description: <>React components built with Material UI using Availity&apos;s Element Design System.</>,
26+
href: 'https://availity.github.io/element',
2427
target: '_self',
2528
},
2629
{
@@ -32,68 +35,74 @@ const features = [
3235
target: '_self',
3336
},
3437
{
35-
title: 'Availity UI Kit',
38+
title: 'Availity React',
39+
icon: FaReact,
40+
// linkStyle: 'reactIcon',
41+
description: <>React components and hooks. React components are built with the Availity UI Kit and Reactstrap 8.</>,
42+
href: 'https://availity.github.io/availity-react',
43+
target: '_self',
44+
},
45+
{
46+
title: 'Legacy Availity UI Kit',
3647
icon: FaCss3,
3748
// linkStyle: 'reactIcon', styles[linkStyle] || styles.featureLink for <a />
38-
description: <>Our custom CSS kit that is built on top of Bootstrap 4</>,
49+
description: (
50+
<>
51+
Our custom CSS kit that is built on top of Bootstrap 4.{' '}
52+
<Alert severity="error">This library will be retired 01/01/26</Alert>
53+
</>
54+
),
3955
href: 'https://availity.github.io/availity-uikit',
4056
target: '_blank', // uikit does not link back to docs
4157
},
4258
];
4359

4460
function Feature({ title, description, icon: Icon, href, target }) {
4561
return (
46-
<div className={clsx('col col--6', styles.feature)}>
47-
{Icon && (
48-
<Link href={href} target={target} aria-label={title}>
49-
<div className="text--center">
50-
<Icon className={styles.featureImage} alt={title} />
51-
</div>
52-
</Link>
53-
)}
54-
<h3>{title}</h3>
55-
<p>{description}</p>
56-
</div>
62+
<Card sx={{ marginBottom: 2, marginRight: 2 }}>
63+
<CardActionArea href={href} target={target} sx={{ height: '100%' }}>
64+
<CardHeader
65+
title={
66+
<Grid container alignItems="center">
67+
<Icon className={styles.featureImage} alt={title} />
68+
<span>{title}</span>
69+
</Grid>
70+
}
71+
/>
72+
{Icon && <CardContent>{description}</CardContent>}
73+
</CardActionArea>
74+
</Card>
5775
);
5876
}
5977

6078
function Home() {
6179
const context = useDocusaurusContext();
6280
const { siteConfig = {} } = context;
6381
return (
64-
<Layout
65-
title={`${siteConfig.title}`}
66-
description="Homepage for Availity's Workflow, React, SDK-JS, and UI Kit documentation"
67-
>
68-
<header className={clsx('hero hero--primary', styles.heroBanner)}>
69-
<div className="container">
70-
<h1 className="hero__title">{siteConfig.title}</h1>
71-
<p className="hero__subtitle">{siteConfig.tagline}</p>
72-
<div className={styles.buttons}>
73-
<Link
74-
className={clsx('button button--outline button--secondary button--lg', styles.getStarted)}
75-
href="https://availity.github.io/availity-workflow"
76-
target="_self"
77-
>
78-
Get Started
79-
</Link>
80-
</div>
81-
</div>
82-
</header>
83-
<main>
84-
{features?.length > 0 && (
85-
<section className={styles.features}>
86-
<div className="container">
87-
<div className="row">
82+
<ThemeProvider>
83+
<Layout
84+
title={`${siteConfig.title}`}
85+
description="Homepage for Availity's Workflow, React, SDK-JS, and UI Kit documentation"
86+
>
87+
<Container>
88+
<header>
89+
<Typography variant="h1" marginTop={2}>
90+
{siteConfig.title}
91+
</Typography>
92+
<Typography variant="subtitle1">{siteConfig.tagline}</Typography>
93+
</header>
94+
<main>
95+
{features?.length > 0 && (
96+
<Grid margin={2} container marginTop={4}>
8897
{features.map((props, idx) => (
8998
<Feature key={idx} {...props} />
9099
))}
91-
</div>
92-
</div>
93-
</section>
94-
)}
95-
</main>
96-
</Layout>
100+
</Grid>
101+
)}
102+
</main>
103+
</Container>
104+
</Layout>
105+
</ThemeProvider>
97106
);
98107
}
99108

src/pages/styles.module.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,16 @@
3535
}
3636

3737
.featureImage {
38-
height: 200px;
39-
width: 200px;
38+
height: 36px;
39+
width: 36px;
40+
margin-right: 8px;
4041
}
4142

4243
/* Overrides for default <a /> styles */
4344
.featureLink {
44-
color:var(--ifm-color-primary-light)
45+
color: var(--ifm-color-primary-light)
4546
}
4647

4748
.reactIcon {
4849
color: rgb(97, 219, 251)
49-
}
50+
}

0 commit comments

Comments
 (0)