pcm-shared-components 0.0.3 β 0.0.6
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.
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.Primary = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
/* π The title prop is optional.
|
|
16
|
+
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
|
|
17
|
+
* to learn how to generate automatic titles
|
|
18
|
+
*/
|
|
19
|
+
title: 'Button',
|
|
20
|
+
component: _index["default"]
|
|
21
|
+
}; //π We create a βtemplateβ of how args map to rendering
|
|
22
|
+
|
|
23
|
+
exports["default"] = _default;
|
|
24
|
+
|
|
25
|
+
var Template = function Template(args) {
|
|
26
|
+
return /*#__PURE__*/_react["default"].createElement(_index["default"], args);
|
|
27
|
+
}; // π Each story then reuses that template
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
var Primary = Template.bind({});
|
|
31
|
+
exports.Primary = Primary;
|
|
32
|
+
Primary.args = {
|
|
33
|
+
background: '#ff0',
|
|
34
|
+
label: 'Button'
|
|
35
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export interface ButtonProps {}
|
|
3
|
-
import "../../styles/tailwind.css";
|
|
4
2
|
|
|
5
|
-
export const Button = (
|
|
3
|
+
export const Button = () => {
|
|
6
4
|
return (
|
|
7
5
|
<button
|
|
8
6
|
type="button"
|
|
@@ -12,3 +10,5 @@ export const Button = (props: ButtonProps) => {
|
|
|
12
10
|
</button>
|
|
13
11
|
);
|
|
14
12
|
};
|
|
13
|
+
|
|
14
|
+
export default Button;
|
package/dist/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tailwindcss v3.0.23 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #eee}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Muli,Roboto,-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#bdbdbd}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#bdbdbd}input::placeholder,textarea::placeholder{opacity:1;color:#bdbdbd}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2196f380;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.relative{position:relative!important}.inline-flex{display:inline-flex!important}.items-center{align-items:center!important}.rounded-md{border-radius:.6rem!important}.border{border-width:1px!important}.border-transparent{border-color:#0000!important}.bg-green-600{--tw-bg-opacity:1!important;background-color:rgb(67 160 71/var(--tw-bg-opacity))!important}.px-4{padding-left:.4rem!important;padding-right:.4rem!important}.py-2{padding-top:.2rem!important;padding-bottom:.2rem!important}.text-sm{font-size:1.4rem!important;line-height:2rem!important}.font-medium{font-weight:500!important}.text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d!important;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.hover\:bg-green-700:hover{--tw-bg-opacity:1!important;background-color:rgb(56 142 60/var(--tw-bg-opacity))!important}.focus\:outline-none:focus{outline:2px solid #0000!important;outline-offset:2px!important}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus\:ring-green-500:focus{--tw-ring-opacity:1!important;--tw-ring-color:rgb(76 175 80/var(--tw-ring-opacity))!important}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px!important}
|
package/package.json
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pcm-shared-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"private": false,
|
|
5
|
-
"main": "dist/index.
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"require": "./dist/index.cjs.js",
|
|
11
|
-
"import": "./dist/index.es.js"
|
|
12
|
-
},
|
|
13
|
-
"./dist/style.css": "./dist/style.css"
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"babel": {
|
|
7
|
+
"presets": [
|
|
8
|
+
"@babel/preset-react"
|
|
9
|
+
]
|
|
14
10
|
},
|
|
15
|
-
"sideEffects": false,
|
|
16
11
|
"files": [
|
|
17
12
|
"dist"
|
|
18
13
|
],
|
|
@@ -21,7 +16,8 @@
|
|
|
21
16
|
"storybook": "start-storybook -p 6006",
|
|
22
17
|
"build-storybook": "build-storybook",
|
|
23
18
|
"clean": "rm -Rf dist",
|
|
24
|
-
"
|
|
19
|
+
"build-tailwind": "NODE_ENV=production npx tailwindcss -o ./dist/styles/tailwind.css --minify",
|
|
20
|
+
"build": "npm run clean && NODE_ENV=production npx babel src/ --out-dir -d dist --copy-files && npm run build-tailwind"
|
|
25
21
|
},
|
|
26
22
|
"peerDependencies": {
|
|
27
23
|
"react": "^17.0.2",
|
|
@@ -41,16 +37,17 @@
|
|
|
41
37
|
"@storybook/react": "^6.4.9",
|
|
42
38
|
"autoprefixer": "^10.4.0",
|
|
43
39
|
"babel-loader": "^8.2.3",
|
|
40
|
+
"cross-env": "^7.0.3",
|
|
44
41
|
"postcss": "^8.4.4",
|
|
45
42
|
"postcss-import": "^14.0.2",
|
|
46
43
|
"react": "^17.0.2",
|
|
47
44
|
"react-dom": "^17.0.2",
|
|
48
45
|
"sass": "^1.32.6",
|
|
49
46
|
"tailwindcss": "^3.0.1",
|
|
50
|
-
"cross-env": "^7.0.3",
|
|
51
47
|
"tailwindcss-dir": "^4.0.0"
|
|
52
48
|
},
|
|
53
49
|
"dependencies": {
|
|
50
|
+
"@babel/polyfill": "^7.12.1",
|
|
54
51
|
"@mdi/js": "^6.5.95",
|
|
55
52
|
"@mdi/react": "^1.5.0",
|
|
56
53
|
"@mdx-js/loader": "^2.0.0",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
-
import '../../styles/tailwind.css';
|
|
4
|
-
|
|
5
|
-
import { Button } from './index';
|
|
6
|
-
|
|
7
|
-
const Component: ComponentMeta<typeof Button> = {
|
|
8
|
-
title: 'Example/Button',
|
|
9
|
-
component: Button,
|
|
10
|
-
argTypes: {
|
|
11
|
-
backgroundColor: { control: 'color' },
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default Component;
|
|
16
|
-
|
|
17
|
-
const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />;
|
|
18
|
-
|
|
19
|
-
export const Primary = Template.bind({});
|
|
20
|
-
Primary.args = {};
|