@availity/mui-button 0.1.0
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/CHANGELOG.md +16 -0
- package/README.md +57 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +1327 -0
- package/dist/index.mjs +1314 -0
- package/introduction.mdx +7 -0
- package/jest.config.js +7 -0
- package/package.json +50 -0
- package/project.json +41 -0
- package/src/index.ts +1 -0
- package/src/lib/Button.tsx +23 -0
- package/tsconfig.json +5 -0
- package/tsconfig.spec.json +10 -0
package/introduction.mdx
ADDED
package/jest.config.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@availity/mui-button",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Availity MUI Button Component - part of the @availity/element design system",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"typescript",
|
|
8
|
+
"availity",
|
|
9
|
+
"button",
|
|
10
|
+
"mui"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://availity.github.io/element/?path=/docs/components-button-introduction--docs",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/Availity/element/issues"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/Availity/element.git",
|
|
19
|
+
"directory": "packages/button"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"author": "Availity Developers <AVOSS@availity.com>",
|
|
23
|
+
"browser": "./dist/index.js",
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"module": "./dist/index.mjs",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
29
|
+
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
|
|
30
|
+
"clean": "rm -rf dist",
|
|
31
|
+
"clean:nm": "rm -rf node_modules",
|
|
32
|
+
"bundlesize": "bundlesize",
|
|
33
|
+
"publish": "yarn npm publish --tolerate-republish --access public",
|
|
34
|
+
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@mui/material": "^5.11.9",
|
|
38
|
+
"react": "18.2.0",
|
|
39
|
+
"react-dom": "18.2.0",
|
|
40
|
+
"tsup": "^5.12.7",
|
|
41
|
+
"typescript": "^4.6.4"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@mui/material": "^5.11.9",
|
|
45
|
+
"react": ">=16.3.0"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
}
|
|
50
|
+
}
|
package/project.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mui-button",
|
|
3
|
+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"sourceRoot": "packages/button/src",
|
|
5
|
+
"projectType": "library",
|
|
6
|
+
"tags": [],
|
|
7
|
+
"targets": {
|
|
8
|
+
"lint": {
|
|
9
|
+
"executor": "@nrwl/linter:eslint",
|
|
10
|
+
"options": {
|
|
11
|
+
"eslintConfig": ".eslintrc.json",
|
|
12
|
+
"lintFilePatterns": ["packages/button/**/*.{js,ts}"],
|
|
13
|
+
"silent": false,
|
|
14
|
+
"fix": false,
|
|
15
|
+
"cache": true,
|
|
16
|
+
"cacheLocation": "./node_modules/.cache/button/.eslintcache",
|
|
17
|
+
"maxWarnings": -1,
|
|
18
|
+
"quiet": false,
|
|
19
|
+
"noEslintrc": false,
|
|
20
|
+
"hasTypeAwareRules": true,
|
|
21
|
+
"cacheStrategy": "metadata"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"test": {
|
|
25
|
+
"executor": "@nrwl/jest:jest",
|
|
26
|
+
"outputs": ["coverage/button"],
|
|
27
|
+
"options": {
|
|
28
|
+
"jestConfig": "packages/button/jest.config.js",
|
|
29
|
+
"passWithNoTests": true
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"version": {
|
|
33
|
+
"executor": "@jscutlery/semver:version",
|
|
34
|
+
"options": {
|
|
35
|
+
"preset": "conventional",
|
|
36
|
+
"commitMessageFormat": "chore(${projectName}): release version ${version} [skip ci]",
|
|
37
|
+
"tagPrefix": "@availity/${projectName}@"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/Button';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button as MUIButton } from '@mui/material';
|
|
3
|
+
import {LoadingButton as MUILoadingButton} from '@mui/lab'
|
|
4
|
+
import type { ButtonProps as MUIButtonProps } from '@mui/material';
|
|
5
|
+
// import Icon from '@availity/mui-icon';
|
|
6
|
+
|
|
7
|
+
export type ButtonProps = {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
} & MUIButtonProps;
|
|
10
|
+
|
|
11
|
+
export const Button = ({ children, ...rest }: ButtonProps): JSX.Element => (
|
|
12
|
+
<MUIButton {...rest}>
|
|
13
|
+
{children}
|
|
14
|
+
</MUIButton>
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
export const LoadingButton = ({ children, ...rest }: ButtonProps): JSX.Element => (
|
|
18
|
+
<MUILoadingButton {...rest}>
|
|
19
|
+
{children}
|
|
20
|
+
</MUILoadingButton>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../../dist/out-tsc",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"types": ["jest", "node", "@testing-library/jest-dom"],
|
|
7
|
+
"allowJs": true
|
|
8
|
+
},
|
|
9
|
+
"include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
|
|
10
|
+
}
|