-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e079638
commit cf55db5
Showing
21 changed files
with
13,568 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": ["@commitlint/config-conventional"], | ||
"rules": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.yarn | ||
!.storybook/ | ||
|
||
docs/ | ||
storybook-docs/ | ||
coverage/ | ||
static/ | ||
|
||
/**/.docusaurus | ||
/**/build | ||
/**/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["**/*"], | ||
"plugins": ["@nrwl/nx"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@nrwl/nx/enforce-module-boundaries": [ | ||
"error", | ||
{ | ||
"enforceBuildableLibDependency": true, | ||
"allow": [], | ||
"depConstraints": [ | ||
{ | ||
"sourceTag": "*", | ||
"onlyDependOnLibsWithTags": ["*"] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"extends": ["plugin:@nrwl/nx/typescript"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"extends": ["plugin:@nrwl/nx/javascript"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"], | ||
"env": { | ||
"vite": true | ||
}, | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Add files here to ignore them from prettier formatting | ||
|
||
/dist | ||
/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"printWidth": 120, | ||
"tabWidth": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"nrwl.angular-console", | ||
"esbenp.prettier-vscode", | ||
"dbaeumer.vscode-eslint", | ||
"firsttris.vscode-jest-runner" | ||
] | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs | ||
spec: '@yarnpkg/plugin-interactive-tools' | ||
|
||
yarnPath: .yarn/releases/yarn-3.3.1.cjs | ||
|
||
npmPublishRegistry: 'https://registry.npmjs.org/' | ||
|
||
npmRegistryServer: 'https://registry.npmjs.org/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
# element | ||
React components for the Availity design system Element | ||
# availity-element | ||
|
||
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a> | ||
|
||
✨ **This workspace has been generated by [Nx, a Smart, fast and extensible build system.](https://nx.dev)** ✨ | ||
|
||
## Understand this workspace | ||
|
||
Run `nx graph` to see a diagram of the dependencies of the projects. | ||
|
||
## Remote caching | ||
|
||
Run `npx nx connect-to-nx-cloud` to enable [remote caching](https://nx.app) and make CI faster. | ||
|
||
## Further help | ||
|
||
Visit the [Nx Documentation](https://nx.dev) to learn more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"$schema": "./node_modules/nx/schemas/nx-schema.json", | ||
"npmScope": "availity", | ||
"tasksRunnerOptions": { | ||
"default": { | ||
"runner": "nx/tasks-runners/default", | ||
"options": { | ||
"cacheableOperations": ["build", "lint", "test", "e2e"] | ||
} | ||
} | ||
}, | ||
"targetDefaults": { | ||
"build": { | ||
"dependsOn": ["^build"], | ||
"inputs": ["production", "^production"] | ||
}, | ||
"lint": { | ||
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"] | ||
}, | ||
"test": { | ||
"inputs": ["default", "^production"] | ||
} | ||
}, | ||
"namedInputs": { | ||
"default": ["{projectRoot}/**/*", "sharedGlobals"], | ||
"production": [ | ||
"default", | ||
"!{projectRoot}/.eslintrc.json", | ||
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", | ||
"!{projectRoot}/tsconfig.spec.json", | ||
"!{projectRoot}/vite.config.[jt]s" | ||
], | ||
"sharedGlobals": [] | ||
}, | ||
"workspaceLayout": { | ||
"appsDir": "apps", | ||
"libsDir": "packages" | ||
}, | ||
"generators": { | ||
"@nrwl/react": { | ||
"application": { | ||
"babel": true | ||
}, | ||
"library": { | ||
"unitTestRunner": "vite" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"name": "availity-element-monorepo", | ||
"version": "0.0.0", | ||
"description": "React component library for the Availity design system", | ||
"repository": "https://github.com/Availity/element.git", | ||
"author": "Jordan Young <[email protected]>", | ||
"license": "MIT", | ||
"private": true, | ||
"workspaces": [ | ||
"packages/*" | ||
], | ||
"packageManager": "[email protected]", | ||
"devDependencies": { | ||
"@babel/preset-react": "^7.18.6", | ||
"@commitlint/cli": "^17.0.0", | ||
"@commitlint/config-conventional": "^17.0.0", | ||
"@emotion/babel-plugin": "11.10.5", | ||
"@jscutlery/semver": "^2.29.3", | ||
"@nrwl/eslint-plugin-nx": "15.6.2", | ||
"@nrwl/jest": "15.6.2", | ||
"@nrwl/js": "15.6.2", | ||
"@nrwl/linter": "15.6.2", | ||
"@nrwl/react": "15.6.2", | ||
"@nrwl/vite": "15.6.2", | ||
"@nrwl/workspace": "15.6.2", | ||
"@testing-library/jest-dom": "^5.16.5", | ||
"@testing-library/react": "13.4.0", | ||
"@types/jest": "28.1.1", | ||
"@types/node": "18.11.9", | ||
"@types/react": "18.0.25", | ||
"@types/react-dom": "18.0.9", | ||
"@typescript-eslint/eslint-plugin": "^5.36.1", | ||
"@typescript-eslint/parser": "^5.36.1", | ||
"@vitejs/plugin-react": "^3.0.0", | ||
"@vitest/ui": "^0.25.8", | ||
"babel-jest": "28.1.1", | ||
"eslint": "~8.15.0", | ||
"eslint-config-prettier": "8.1.0", | ||
"eslint-plugin-import": "2.26.0", | ||
"eslint-plugin-jsx-a11y": "6.6.1", | ||
"eslint-plugin-react": "7.31.11", | ||
"eslint-plugin-react-hooks": "4.6.0", | ||
"husky": "^8.0.0", | ||
"jest": "28.1.1", | ||
"jest-environment-jsdom": "28.1.1", | ||
"jsdom": "~20.0.3", | ||
"nx": "15.6.2", | ||
"prettier": "^2.6.2", | ||
"react-test-renderer": "18.2.0", | ||
"ts-jest": "28.0.5", | ||
"ts-node": "10.9.1", | ||
"typescript": "~4.8.2", | ||
"vite": "^4.0.1", | ||
"vite-plugin-dts": "~1.7.1", | ||
"vite-plugin-eslint": "^1.8.1", | ||
"vite-tsconfig-paths": "^4.0.2", | ||
"vitest": "^0.25.8" | ||
}, | ||
"dependencies": { | ||
"@availity/design-tokens": "0.5.0-alpha.0", | ||
"@mui/material": "^5.11.6", | ||
"@mui/x-date-pickers": "^5.0.15", | ||
"date-fns": "^2.29.3", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"tslib": "^2.3.0" | ||
}, | ||
"scripts": { | ||
"prepare": "husky install" | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** | ||
* This is a minimal script to publish your package to "npm". | ||
* This is meant to be used as-is or customize as you see fit. | ||
* | ||
* This script is executed on "dist/path/to/library" as "cwd" by default. | ||
* | ||
* You might need to authenticate with NPM before running this script. | ||
*/ | ||
|
||
import { readCachedProjectGraph } from '@nrwl/devkit'; | ||
import { execSync } from 'child_process'; | ||
import { readFileSync, writeFileSync } from 'fs'; | ||
import chalk from 'chalk'; | ||
|
||
function invariant(condition, message) { | ||
if (!condition) { | ||
console.error(chalk.bold.red(message)); | ||
process.exit(1); | ||
} | ||
} | ||
|
||
// Executing publish script: node path/to/publish.mjs {name} --version {version} --tag {tag} | ||
// Default "tag" to "next" so we won't publish the "latest" tag by accident. | ||
const [, , name, version, tag = 'next'] = process.argv; | ||
|
||
// A simple SemVer validation to validate the version | ||
const validVersion = /^\d+\.\d+\.\d+(-\w+\.\d+)?/; | ||
invariant( | ||
version && validVersion.test(version), | ||
`No version provided or version did not match Semantic Versioning, expected: #.#.#-tag.# or #.#.#, got ${version}.` | ||
); | ||
|
||
const graph = readCachedProjectGraph(); | ||
const project = graph.nodes[name]; | ||
|
||
invariant( | ||
project, | ||
`Could not find project "${name}" in the workspace. Is the project.json configured correctly?` | ||
); | ||
|
||
const outputPath = project.data?.targets?.build?.options?.outputPath; | ||
invariant( | ||
outputPath, | ||
`Could not find "build.options.outputPath" of project "${name}". Is project.json configured correctly?` | ||
); | ||
|
||
process.chdir(outputPath); | ||
|
||
// Updating the version in "package.json" before publishing | ||
try { | ||
const json = JSON.parse(readFileSync(`package.json`).toString()); | ||
json.version = version; | ||
writeFileSync(`package.json`, JSON.stringify(json, null, 2)); | ||
} catch (e) { | ||
console.error( | ||
chalk.bold.red(`Error reading package.json file from library build output.`) | ||
); | ||
} | ||
|
||
// Execute "npm publish" to publish | ||
execSync(`npm publish --access public --tag ${tag}`); |
Oops, something went wrong.