pne-ui 1.0.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/LICENSE +19 -0
- package/README.md +28 -0
- package/cjs/component/PneButton.d.ts +6 -0
- package/cjs/component/PneButton.js +22 -0
- package/cjs/component/PneButton.js.map +1 -0
- package/cjs/index.d.ts +2 -0
- package/cjs/index.js +7 -0
- package/cjs/index.js.map +1 -0
- package/esm/component/PneButton.d.ts +6 -0
- package/esm/component/PneButton.js +19 -0
- package/esm/component/PneButton.js.map +1 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.js +3 -0
- package/esm/index.js.map +1 -0
- package/package.json +62 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2023 Payneteasy
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# pne-ui
|
|
2
|
+
|
|
3
|
+
[![NPM version][npm-image]][npm-url]
|
|
4
|
+
[![Build][github-build]][github-build-url]
|
|
5
|
+
![npm-typescript]
|
|
6
|
+
[![License][github-license]][github-license-url]
|
|
7
|
+
|
|
8
|
+
Our wrapper over mui
|
|
9
|
+
|
|
10
|
+
## Installation:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
yarn add pne-ui
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
[npm-url]: https://www.npmjs.com/package/pne-ui
|
|
17
|
+
|
|
18
|
+
[npm-image]: https://img.shields.io/npm/v/pne-ui
|
|
19
|
+
|
|
20
|
+
[github-license]: https://img.shields.io/github/license/alcovp/pne-ui
|
|
21
|
+
|
|
22
|
+
[github-license-url]: https://github.com/alcovp/pne-ui/blob/master/LICENSE
|
|
23
|
+
|
|
24
|
+
[github-build]: https://github.com/alcovp/pne-ui/actions/workflows/publish.yml/badge.svg
|
|
25
|
+
|
|
26
|
+
[github-build-url]: https://github.com/alcovp/pne-ui/actions/workflows/publish.yml
|
|
27
|
+
|
|
28
|
+
[npm-typescript]: https://img.shields.io/npm/types/pne-ui
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
// https://mui.com/material-ui/guides/typescript/#complications-with-the-component-prop
|
|
7
|
+
const PneButton = (props) => {
|
|
8
|
+
const { sx, children, variant = 'contained', ...rest } = props;
|
|
9
|
+
const _sx = [
|
|
10
|
+
{
|
|
11
|
+
height: '40px',
|
|
12
|
+
fontSize: '12px',
|
|
13
|
+
lineHeight: '12px',
|
|
14
|
+
fontWeight: '700',
|
|
15
|
+
textTransform: 'initial'
|
|
16
|
+
},
|
|
17
|
+
...(Array.isArray(sx) ? sx : [sx])
|
|
18
|
+
];
|
|
19
|
+
return react_1.default.createElement(material_1.Button, { sx: _sx, variant: variant, ...rest }, children);
|
|
20
|
+
};
|
|
21
|
+
exports.default = PneButton;
|
|
22
|
+
//# sourceMappingURL=PneButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PneButton.js","sourceRoot":"","sources":["../../src/component/PneButton.tsx"],"names":[],"mappings":";;;AAAA,4CAA2D;AAC3D,0DAA0B;AAE1B,uFAAuF;AACvF,MAAM,SAAS,GAAG,CACd,KAAwC,EAC1C,EAAE;IACA,MAAM,EACF,EAAE,EACF,QAAQ,EACR,OAAO,GAAG,WAAW,EACrB,GAAG,IAAI,EACV,GAAG,KAAK,CAAC;IAEV,MAAM,GAAG,GAAY;QACjB;YACI,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,MAAM;YAChB,UAAU,EAAE,MAAM;YAClB,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,SAAS;SAC3B;QACD,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;KACrC,CAAA;IAED,OAAO,8BAAC,iBAAM,IAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,KAAM,IAAI,IAAG,QAAQ,CAAU,CAAA;AAC3E,CAAC,CAAA;AAED,kBAAe,SAAS,CAAC"}
|
package/cjs/index.d.ts
ADDED
package/cjs/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PneButton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const PneButton_1 = tslib_1.__importDefault(require("./component/PneButton"));
|
|
6
|
+
exports.PneButton = PneButton_1.default;
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,8EAA8C;AAEtC,oBAFD,mBAAS,CAEC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Button } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
// https://mui.com/material-ui/guides/typescript/#complications-with-the-component-prop
|
|
4
|
+
const PneButton = (props) => {
|
|
5
|
+
const { sx, children, variant = 'contained', ...rest } = props;
|
|
6
|
+
const _sx = [
|
|
7
|
+
{
|
|
8
|
+
height: '40px',
|
|
9
|
+
fontSize: '12px',
|
|
10
|
+
lineHeight: '12px',
|
|
11
|
+
fontWeight: '700',
|
|
12
|
+
textTransform: 'initial'
|
|
13
|
+
},
|
|
14
|
+
...(Array.isArray(sx) ? sx : [sx])
|
|
15
|
+
];
|
|
16
|
+
return React.createElement(Button, { sx: _sx, variant: variant, ...rest }, children);
|
|
17
|
+
};
|
|
18
|
+
export default PneButton;
|
|
19
|
+
//# sourceMappingURL=PneButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PneButton.js","sourceRoot":"","sources":["../../src/component/PneButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAuB,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,uFAAuF;AACvF,MAAM,SAAS,GAAG,CACd,KAAwC,EAC1C,EAAE;IACA,MAAM,EACF,EAAE,EACF,QAAQ,EACR,OAAO,GAAG,WAAW,EACrB,GAAG,IAAI,EACV,GAAG,KAAK,CAAC;IAEV,MAAM,GAAG,GAAY;QACjB;YACI,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,MAAM;YAChB,UAAU,EAAE,MAAM;YAClB,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,SAAS;SAC3B;QACD,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;KACrC,CAAA;IAED,OAAO,oBAAC,MAAM,IAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,KAAM,IAAI,IAAG,QAAQ,CAAU,CAAA;AAC3E,CAAC,CAAA;AAED,eAAe,SAAS,CAAC"}
|
package/esm/index.d.ts
ADDED
package/esm/index.js
ADDED
package/esm/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAAC,SAAS,EAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pne-ui",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/alcovp/pne-ui.git"
|
|
8
|
+
},
|
|
9
|
+
"main": "cjs/index.js",
|
|
10
|
+
"module": "esm/index.js",
|
|
11
|
+
"types": "./esm/index.d.ts",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "yarn build:esm && yarn build:cjs",
|
|
14
|
+
"build:esm": "tsc",
|
|
15
|
+
"build:cjs": "tsc --module commonjs --outDir cjs",
|
|
16
|
+
"lint": "eslint \"{**/*,*}.{js,ts,jsx,tsx}\"",
|
|
17
|
+
"test": "jest --config jestconfig.json",
|
|
18
|
+
"prepare": "npm run build",
|
|
19
|
+
"prepublishOnly": "npm test && npm run lint",
|
|
20
|
+
"start": "webpack && webpack-dev-server --mode development"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"react",
|
|
24
|
+
"typescript",
|
|
25
|
+
"ui",
|
|
26
|
+
"mui",
|
|
27
|
+
"keepaway"
|
|
28
|
+
],
|
|
29
|
+
"files": [
|
|
30
|
+
"cjs",
|
|
31
|
+
"esm",
|
|
32
|
+
"README.md",
|
|
33
|
+
"LICENSE"
|
|
34
|
+
],
|
|
35
|
+
"author": "Payneteasy",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"react": ">=18"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@emotion/react": "^11.11.1",
|
|
42
|
+
"@emotion/styled": "^11.11.0",
|
|
43
|
+
"@testing-library/react": "^14.0.0",
|
|
44
|
+
"@types/jest": "^29.5.2",
|
|
45
|
+
"@types/react": "18.2.13",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
|
47
|
+
"@typescript-eslint/parser": "^5.60.0",
|
|
48
|
+
"eslint": "^8.43.0",
|
|
49
|
+
"eslint-plugin-react": "^7.32.2",
|
|
50
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
51
|
+
"jest": "^29.5.0",
|
|
52
|
+
"jest-canvas-mock": "^2.5.1",
|
|
53
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
54
|
+
"react": "18.2.0",
|
|
55
|
+
"react-dom": "18.2.0",
|
|
56
|
+
"ts-jest": "^29.1.0",
|
|
57
|
+
"typescript": "5.1.3"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@mui/material": "5.13.5"
|
|
61
|
+
}
|
|
62
|
+
}
|