@npm_leadtech/legal-lib-components 0.3.39 → 0.3.41
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/.babelrc +12 -0
- package/.eslintignore +1 -0
- package/.eslintrc +31 -0
- package/.huskyrc +5 -0
- package/.prettierignore +1 -0
- package/.prettierrc +19 -0
- package/.storybook/main.js +15 -0
- package/.storybook/preview.js +3 -0
- package/build/index.js +3524 -1
- package/build/index.js.map +1 -1
- package/package.json +9 -11
- package/rollup.config.js +30 -0
- package/src/components/atoms/Button/Button.js +9 -0
- package/src/components/atoms/Button/Button.scss +4 -0
- package/src/components/atoms/Button/__stories__/Button.stories.js +20 -0
- package/src/components/atoms/Button/__tests__/Button.test.js +10 -0
- package/src/index.js +3 -0
- package/build/index.es.js +0 -4
- package/build/index.es.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npm_leadtech/legal-lib-components",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.41",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"react": "^17.0.1",
|
|
6
6
|
"react-dom": "^17.0.1"
|
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@babel/cli": "^7.12.16",
|
|
23
|
-
"@babel/core": "^7.12.
|
|
24
|
-
"@babel/preset-env": "^7.12.
|
|
25
|
-
"@babel/preset-react": "^7.12.
|
|
23
|
+
"@babel/core": "^7.12.16",
|
|
24
|
+
"@babel/preset-env": "^7.12.16",
|
|
25
|
+
"@babel/preset-react": "^7.12.13",
|
|
26
|
+
"@rollup/plugin-babel": "^5.2.3",
|
|
26
27
|
"@rollup/plugin-commonjs": "^17.1.0",
|
|
27
28
|
"@rollup/plugin-node-resolve": "^11.1.1",
|
|
28
29
|
"@rollup/plugin-url": "^6.0.0",
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
"@storybook/addon-links": "^6.1.17",
|
|
32
33
|
"@storybook/react": "^6.1.17",
|
|
33
34
|
"@testing-library/react": "^11.2.5",
|
|
35
|
+
"autoprefixer": "^10.2.4",
|
|
34
36
|
"babel-eslint": "^10.1.0",
|
|
35
37
|
"babel-loader": "^8.2.2",
|
|
36
38
|
"babel-preset-react-app": "^10.0.0",
|
|
@@ -52,7 +54,7 @@
|
|
|
52
54
|
"prettier": "^2.2.1",
|
|
53
55
|
"prop-types": "^15.7.2",
|
|
54
56
|
"react-test-renderer": "^17.0.1",
|
|
55
|
-
"rollup": "^2.
|
|
57
|
+
"rollup": "^2.39.0",
|
|
56
58
|
"rollup-plugin-babel": "^4.4.0",
|
|
57
59
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
58
60
|
"rollup-plugin-postcss": "^4.0.0",
|
|
@@ -61,7 +63,7 @@
|
|
|
61
63
|
},
|
|
62
64
|
"scripts": {
|
|
63
65
|
"start": "start-storybook -p 6006",
|
|
64
|
-
"build": "
|
|
66
|
+
"build": "rm -rf build && rollup -c",
|
|
65
67
|
"reinstall-force": "rm -f yarn.lock && rm -Rf node_modules && yarn",
|
|
66
68
|
"upgrade-patch": "yarn build && yarn reinstall-force && git add . && git commit -m \"$MSG\" && npm config set tag-version-prefix '' && npm version patch -m \"$MSG\" && git push && git push --tags",
|
|
67
69
|
"upgrade-minor": "yarn build && yarn reinstall-force && git add . && git commit -m \"$MSG\" && npm config set tag-version-prefix '' && npm version minor -m \"$MSG\" && git push && git push --tags",
|
|
@@ -74,9 +76,5 @@
|
|
|
74
76
|
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "identity-obj-proxy"
|
|
75
77
|
}
|
|
76
78
|
},
|
|
77
|
-
"main": "build/index.js"
|
|
78
|
-
"module": "build/index.es.js",
|
|
79
|
-
"files": [
|
|
80
|
-
"build"
|
|
81
|
-
]
|
|
79
|
+
"main": "build/index.js"
|
|
82
80
|
}
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
+
import babel from '@rollup/plugin-babel';
|
|
3
|
+
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
|
|
4
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
5
|
+
import postcss from 'rollup-plugin-postcss';
|
|
6
|
+
import packageJson from './package.json';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
input: 'src/index.js', // All of your library files will be named exports from here
|
|
10
|
+
output: [
|
|
11
|
+
{
|
|
12
|
+
// This is an easy way to keep your `main` in sync between rollup & the package
|
|
13
|
+
file: packageJson.main,
|
|
14
|
+
format: 'cjs',
|
|
15
|
+
sourcemap: true,
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
plugins: [
|
|
19
|
+
peerDepsExternal(),
|
|
20
|
+
commonjs({
|
|
21
|
+
include: 'node_modules/**',
|
|
22
|
+
}),
|
|
23
|
+
resolve(),
|
|
24
|
+
babel({
|
|
25
|
+
exclude: 'node_modules/**',
|
|
26
|
+
babelHelpers: 'bundled',
|
|
27
|
+
}),
|
|
28
|
+
postcss(),
|
|
29
|
+
],
|
|
30
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { Button } from '../Button';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
component: Button,
|
|
7
|
+
title: 'Atoms/Button',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const Template = (args) => <Button {...args} />;
|
|
11
|
+
|
|
12
|
+
export const Default = Template.bind({});
|
|
13
|
+
Default.args = {
|
|
14
|
+
message: 'Default',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const Secondary = Template.bind({});
|
|
18
|
+
Secondary.args = {
|
|
19
|
+
message: 'Secondary',
|
|
20
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { cleanup, render } from '@testing-library/react';
|
|
3
|
+
import { Button } from '../Button';
|
|
4
|
+
|
|
5
|
+
afterEach(cleanup);
|
|
6
|
+
|
|
7
|
+
it('render component Button with label', () => {
|
|
8
|
+
const { getByText } = render(<Button message='Kappa' />);
|
|
9
|
+
expect(getByText('Kappa')).toBeTruthy();
|
|
10
|
+
});
|
package/src/index.js
ADDED
package/build/index.es.js
DELETED
package/build/index.es.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/index.js"],"sourcesContent":["const { Button } = './components/atoms/Button';\nexport { Button };\n"],"names":[],"mappings":"AAAK,MAAC,EAAE,MAAM,EAAE,GAAG;;;;"}
|