@universal-tennis/ui-shared 0.0.3 → 0.0.5
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/README.md +13 -1
- package/dist/App.d.ts +2 -2
- package/dist/App.js +10 -12
- package/dist/App.js.map +1 -1
- package/dist/components.d.ts +0 -1
- package/dist/components.js +1 -4
- package/dist/components.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -12
- package/dist/items.d.ts +2 -2
- package/dist/items.js +1 -1
- package/dist/stories/Button.d.ts +27 -0
- package/dist/stories/Button.js +51 -0
- package/dist/stories/Button.js.map +1 -0
- package/dist/stories/Button.stories.d.ts +15 -0
- package/dist/stories/Button.stories.js +34 -0
- package/dist/stories/Button.stories.js.map +1 -0
- package/dist/stories/Header.d.ts +19 -0
- package/dist/stories/Header.js +31 -0
- package/dist/stories/Header.js.map +1 -0
- package/dist/stories/Header.stories.d.ts +11 -0
- package/dist/stories/Header.stories.js +20 -0
- package/dist/stories/Header.stories.js.map +1 -0
- package/dist/stories/Page.d.ts +1 -0
- package/dist/stories/Page.js +38 -0
- package/dist/stories/Page.js.map +1 -0
- package/dist/stories/Page.stories.d.ts +11 -0
- package/dist/stories/Page.stories.js +30 -0
- package/dist/stories/Page.stories.js.map +1 -0
- package/dist/stories/assets/comments.svg +1 -0
- package/dist/stories/assets/direction.svg +1 -0
- package/dist/stories/atoms/Button.d.ts +7 -7
- package/dist/stories/atoms/Button.js +19 -57
- package/dist/stories/atoms/Button.js.map +1 -1
- package/dist/stories/atoms/Button.stories.d.ts +13 -14
- package/dist/stories/atoms/Button.stories.js +21 -26
- package/dist/stories/atoms/Button.stories.js.map +1 -1
- package/package.json +86 -86
- package/src/custom.d.ts +13 -13
- package/src/items.jsx +1 -1
- package/tsconfig.json +24 -24
- package/workflows/package-release-1.yml +32 -31
- package/workflows/package-release.yml +0 -22
package/README.md
CHANGED
|
@@ -77,7 +77,19 @@ Buttons should be uniform across the platforms with minimal variants, not multip
|
|
|
77
77
|
[Atomic Design](https://bradfrost.com/blog/post/atomic-web-design/)
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
## Publishing the Repo
|
|
80
|
+
## Bitbucket CICD flow Publishing the Repo
|
|
81
|
+
|
|
82
|
+
1. Pull the latest from master -> make changes to a PR back into master.
|
|
83
|
+
First when creating a new component, make sure to add it to the `components.jsx` file.
|
|
84
|
+
2. In the `package.json` file, make sure to pump to the next minor version.
|
|
85
|
+
3. After merging back into master, tag the commit with the same `package.json` version number.
|
|
86
|
+
This will then trigger a NPM package build with the version listed in the `package.json`; make sure the release tags are the same for consistency.
|
|
87
|
+
|
|
88
|
+
It can now be accessed in another repo like this:
|
|
89
|
+
<br />
|
|
90
|
+
`import {Button} from "@universal-tennis/ui-shared";`
|
|
91
|
+
|
|
92
|
+
#### Manually Publishing the Repo (Should be done via CICD flow)
|
|
81
93
|
|
|
82
94
|
1. First when creating a new component, make sure to add it to the `components.jsx` file.
|
|
83
95
|
2. Then Run `yarn run publish:npm` to build a optimized build for all the components, this is configured for TS.
|
package/dist/App.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default App;
|
|
2
|
-
declare function App(): JSX.Element;
|
|
1
|
+
export default App;
|
|
2
|
+
declare function App(): JSX.Element;
|
package/dist/App.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
function App() {
|
|
2
|
-
return (React.createElement("div", { className: "App" },
|
|
3
|
-
React.createElement("header", { className: "App-header" },
|
|
4
|
-
React.createElement("p", null,
|
|
5
|
-
"Edit",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export default App;
|
|
1
|
+
function App() {
|
|
2
|
+
return (React.createElement("div", { className: "App" },
|
|
3
|
+
React.createElement("header", { className: "App-header" },
|
|
4
|
+
React.createElement("p", null,
|
|
5
|
+
"Edit ",
|
|
6
|
+
React.createElement("code", null, "src/App.js"),
|
|
7
|
+
" and save to reload."),
|
|
8
|
+
React.createElement("a", { className: "App-link", href: "https://reactjs.org", target: "_blank", rel: "noopener noreferrer" }, "Learn React"))));
|
|
9
|
+
}
|
|
10
|
+
export default App;
|
|
13
11
|
//# sourceMappingURL=App.js.map
|
package/dist/App.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.js"],"names":[],"mappings":"AACA,SAAS,GAAG;IACV,OAAO,CACL,6BAAK,SAAS,EAAC,KAAK;QAClB,gCAAQ,SAAS,EAAC,YAAY;YAC5B;;gBACO,+CAAuB;uCAC1B;YACJ,2BACE,SAAS,EAAC,UAAU,EACpB,IAAI,EAAC,qBAAqB,EAC1B,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,kBAGvB,CACG,CACL,CACP,CAAC;AACJ,CAAC;AAED,eAAe,GAAG,CAAC"}
|
package/dist/components.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/components.js
CHANGED
package/dist/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.jsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.jsx"],"names":[],"mappings":"AAAA,wBAAwB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom/client';
|
|
3
|
-
import './index.css';
|
|
4
|
-
import App from './App';
|
|
5
|
-
import reportWebVitals from './reportWebVitals';
|
|
6
|
-
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
7
|
-
root.render(React.createElement(React.StrictMode, null,
|
|
8
|
-
React.createElement(App, null)));
|
|
9
|
-
// If you want to start measuring performance in your app, pass a function
|
|
10
|
-
// to log results (for example: reportWebVitals(console.log))
|
|
11
|
-
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
12
|
-
reportWebVitals();
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
|
+
import './index.css';
|
|
4
|
+
import App from './App';
|
|
5
|
+
import reportWebVitals from './reportWebVitals';
|
|
6
|
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
7
|
+
root.render(React.createElement(React.StrictMode, null,
|
|
8
|
+
React.createElement(App, null)));
|
|
9
|
+
// If you want to start measuring performance in your app, pass a function
|
|
10
|
+
// to log results (for example: reportWebVitals(console.log))
|
|
11
|
+
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
12
|
+
reportWebVitals();
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
package/dist/items.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _exports:
|
|
2
|
-
export = _exports;
|
|
1
|
+
declare const _exports: any;
|
|
2
|
+
export = _exports;
|
package/dist/items.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
module.exports = require('./components');
|
|
1
|
+
module.exports = require('./components');
|
|
2
2
|
//# sourceMappingURL=items.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export function Button({ primary, backgroundColor, size, label, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
primary: any;
|
|
4
|
+
backgroundColor: any;
|
|
5
|
+
size: any;
|
|
6
|
+
label: any;
|
|
7
|
+
}): JSX.Element;
|
|
8
|
+
export namespace Button {
|
|
9
|
+
namespace propTypes {
|
|
10
|
+
const primary: PropTypes.Requireable<boolean>;
|
|
11
|
+
const backgroundColor: PropTypes.Requireable<string>;
|
|
12
|
+
const size: PropTypes.Requireable<string>;
|
|
13
|
+
const label: PropTypes.Validator<string>;
|
|
14
|
+
const onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
+
}
|
|
16
|
+
namespace defaultProps {
|
|
17
|
+
const backgroundColor_1: null;
|
|
18
|
+
export { backgroundColor_1 as backgroundColor };
|
|
19
|
+
const primary_1: boolean;
|
|
20
|
+
export { primary_1 as primary };
|
|
21
|
+
const size_1: string;
|
|
22
|
+
export { size_1 as size };
|
|
23
|
+
const onClick_1: undefined;
|
|
24
|
+
export { onClick_1 as onClick };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
import PropTypes from "prop-types";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import PropTypes from 'prop-types';
|
|
14
|
+
import './button.css';
|
|
15
|
+
/**
|
|
16
|
+
* Primary UI component for user interaction
|
|
17
|
+
*/
|
|
18
|
+
export const Button = (_a) => {
|
|
19
|
+
var { primary, backgroundColor, size, label } = _a, props = __rest(_a, ["primary", "backgroundColor", "size", "label"]);
|
|
20
|
+
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
|
|
21
|
+
return (React.createElement("button", Object.assign({ type: "button", className: ['storybook-button', `storybook-button--${size}`, mode].join(' '), style: backgroundColor && { backgroundColor } }, props), label));
|
|
22
|
+
};
|
|
23
|
+
Button.propTypes = {
|
|
24
|
+
/**
|
|
25
|
+
* Is this the principal call to action on the page?
|
|
26
|
+
*/
|
|
27
|
+
primary: PropTypes.bool,
|
|
28
|
+
/**
|
|
29
|
+
* What background color to use
|
|
30
|
+
*/
|
|
31
|
+
backgroundColor: PropTypes.string,
|
|
32
|
+
/**
|
|
33
|
+
* How large should the button be?
|
|
34
|
+
*/
|
|
35
|
+
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
36
|
+
/**
|
|
37
|
+
* Button contents
|
|
38
|
+
*/
|
|
39
|
+
label: PropTypes.string.isRequired,
|
|
40
|
+
/**
|
|
41
|
+
* Optional click handler
|
|
42
|
+
*/
|
|
43
|
+
onClick: PropTypes.func,
|
|
44
|
+
};
|
|
45
|
+
Button.defaultProps = {
|
|
46
|
+
backgroundColor: null,
|
|
47
|
+
primary: false,
|
|
48
|
+
size: 'medium',
|
|
49
|
+
onClick: undefined,
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/stories/Button.jsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAmD,EAAE,EAAE;QAAvD,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,OAAY,EAAP,KAAK,cAAjD,+CAAmD,CAAF;IACtE,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,6BAA6B,CAAC;IACnF,OAAO,CACL,8CACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,CAAC,kBAAkB,EAAE,qBAAqB,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC5E,KAAK,EAAE,eAAe,IAAI,EAAE,eAAe,EAAE,IACzC,KAAK,GAER,KAAK,CACC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,SAAS,GAAG;IACjB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC,IAAI;IACvB;;OAEG;IACH,eAAe,EAAE,SAAS,CAAC,MAAM;IACjC;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACnD;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IAClC;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC,IAAI;CACxB,CAAC;AAEF,MAAM,CAAC,YAAY,GAAG;IACpB,eAAe,EAAE,IAAI;IACrB,OAAO,EAAE,KAAK;IACd,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,SAAS;CACnB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { Button as component };
|
|
4
|
+
export namespace argTypes {
|
|
5
|
+
namespace backgroundColor {
|
|
6
|
+
const control: string;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export default _default;
|
|
11
|
+
export const Primary: any;
|
|
12
|
+
export const Secondary: any;
|
|
13
|
+
export const Large: any;
|
|
14
|
+
export const Small: any;
|
|
15
|
+
import { Button } from "./Button";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from './Button';
|
|
3
|
+
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Example/Button',
|
|
6
|
+
component: Button,
|
|
7
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
8
|
+
argTypes: {
|
|
9
|
+
backgroundColor: { control: 'color' },
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
|
|
13
|
+
const Template = (args) => React.createElement(Button, Object.assign({}, args));
|
|
14
|
+
export const Primary = Template.bind({});
|
|
15
|
+
// More on args: https://storybook.js.org/docs/react/writing-stories/args
|
|
16
|
+
Primary.args = {
|
|
17
|
+
primary: true,
|
|
18
|
+
label: 'Button',
|
|
19
|
+
};
|
|
20
|
+
export const Secondary = Template.bind({});
|
|
21
|
+
Secondary.args = {
|
|
22
|
+
label: 'Button',
|
|
23
|
+
};
|
|
24
|
+
export const Large = Template.bind({});
|
|
25
|
+
Large.args = {
|
|
26
|
+
size: 'large',
|
|
27
|
+
label: 'Button',
|
|
28
|
+
};
|
|
29
|
+
export const Small = Template.bind({});
|
|
30
|
+
Small.args = {
|
|
31
|
+
size: 'small',
|
|
32
|
+
label: 'Button',
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=Button.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.stories.js","sourceRoot":"","sources":["../../src/stories/Button.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,0GAA0G;AAC1G,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,MAAM;IACjB,qEAAqE;IACrE,QAAQ,EAAE;QACR,eAAe,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;KACtC;CACF,CAAC;AAEF,2GAA2G;AAC3G,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,MAAM,oBAAK,IAAI,EAAI,CAAC;AAEhD,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,yEAAyE;AACzE,OAAO,CAAC,IAAI,GAAG;IACb,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;IACf,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACX,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACX,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,QAAQ;CAChB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function Header({ user, onLogin, onLogout, onCreateAccount }: {
|
|
2
|
+
user: any;
|
|
3
|
+
onLogin: any;
|
|
4
|
+
onLogout: any;
|
|
5
|
+
onCreateAccount: any;
|
|
6
|
+
}): JSX.Element;
|
|
7
|
+
export namespace Header {
|
|
8
|
+
namespace propTypes {
|
|
9
|
+
const user: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
10
|
+
const onLogin: PropTypes.Validator<(...args: any[]) => any>;
|
|
11
|
+
const onLogout: PropTypes.Validator<(...args: any[]) => any>;
|
|
12
|
+
const onCreateAccount: PropTypes.Validator<(...args: any[]) => any>;
|
|
13
|
+
}
|
|
14
|
+
namespace defaultProps {
|
|
15
|
+
const user_1: null;
|
|
16
|
+
export { user_1 as user };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
import PropTypes from "prop-types";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { Button } from './Button';
|
|
4
|
+
import './header.css';
|
|
5
|
+
export const Header = ({ user, onLogin, onLogout, onCreateAccount }) => (React.createElement("header", null,
|
|
6
|
+
React.createElement("div", { className: "wrapper" },
|
|
7
|
+
React.createElement("div", null,
|
|
8
|
+
React.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg" },
|
|
9
|
+
React.createElement("g", { fill: "none", fillRule: "evenodd" },
|
|
10
|
+
React.createElement("path", { d: "M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z", fill: "#FFF" }),
|
|
11
|
+
React.createElement("path", { d: "M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z", fill: "#555AB9" }),
|
|
12
|
+
React.createElement("path", { d: "M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z", fill: "#91BAF8" }))),
|
|
13
|
+
React.createElement("h1", null, "Acme")),
|
|
14
|
+
React.createElement("div", null, user ? (React.createElement(React.Fragment, null,
|
|
15
|
+
React.createElement("span", { className: "welcome" },
|
|
16
|
+
"Welcome, ",
|
|
17
|
+
React.createElement("b", null, user.name),
|
|
18
|
+
"!"),
|
|
19
|
+
React.createElement(Button, { size: "small", onClick: onLogout, label: "Log out" }))) : (React.createElement(React.Fragment, null,
|
|
20
|
+
React.createElement(Button, { size: "small", onClick: onLogin, label: "Log in" }),
|
|
21
|
+
React.createElement(Button, { primary: true, size: "small", onClick: onCreateAccount, label: "Sign up" })))))));
|
|
22
|
+
Header.propTypes = {
|
|
23
|
+
user: PropTypes.shape({}),
|
|
24
|
+
onLogin: PropTypes.func.isRequired,
|
|
25
|
+
onLogout: PropTypes.func.isRequired,
|
|
26
|
+
onCreateAccount: PropTypes.func.isRequired,
|
|
27
|
+
};
|
|
28
|
+
Header.defaultProps = {
|
|
29
|
+
user: null,
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=Header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../src/stories/Header.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CACtE;IACE,6BAAK,SAAS,EAAC,SAAS;QACtB;YACE,6BAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B;gBAChF,2BAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS;oBAC/B,8BACE,CAAC,EAAC,mFAAmF,EACrF,IAAI,EAAC,MAAM,GACX;oBACF,8BACE,CAAC,EAAC,kEAAkE,EACpE,IAAI,EAAC,SAAS,GACd;oBACF,8BACE,CAAC,EAAC,gEAAgE,EAClE,IAAI,EAAC,SAAS,GACd,CACA,CACA;YACN,uCAAa,CACT;QACN,iCACG,IAAI,CAAC,CAAC,CAAC,CACN;YACE,8BAAM,SAAS,EAAC,SAAS;;gBACd,+BAAI,IAAI,CAAC,IAAI,CAAK;oBACtB;YACP,oBAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAC,SAAS,GAAG,CACzD,CACJ,CAAC,CAAC,CAAC,CACF;YACE,oBAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAC,QAAQ,GAAG;YACxD,oBAAC,MAAM,IAAC,OAAO,QAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAC,SAAS,GAAG,CACxE,CACJ,CACG,CACF,CACC,CACV,CAAC;AAEF,MAAM,CAAC,SAAS,GAAG;IACjB,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;IACzB,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IAClC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,eAAe,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CAC3C,CAAC;AAEF,MAAM,CAAC,YAAY,GAAG;IACpB,IAAI,EAAE,IAAI;CACX,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { Header as component };
|
|
4
|
+
export namespace parameters {
|
|
5
|
+
const layout: string;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export default _default;
|
|
9
|
+
export const LoggedIn: any;
|
|
10
|
+
export const LoggedOut: any;
|
|
11
|
+
import { Header } from "./Header";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Header } from './Header';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Example/Header',
|
|
5
|
+
component: Header,
|
|
6
|
+
parameters: {
|
|
7
|
+
// More on Story layout: https://storybook.js.org/docs/react/configure/story-layout
|
|
8
|
+
layout: 'fullscreen',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
const Template = (args) => React.createElement(Header, Object.assign({}, args));
|
|
12
|
+
export const LoggedIn = Template.bind({});
|
|
13
|
+
LoggedIn.args = {
|
|
14
|
+
user: {
|
|
15
|
+
name: 'Jane Doe',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export const LoggedOut = Template.bind({});
|
|
19
|
+
LoggedOut.args = {};
|
|
20
|
+
//# sourceMappingURL=Header.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.stories.js","sourceRoot":"","sources":["../../src/stories/Header.stories.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,mFAAmF;QACnF,MAAM,EAAE,YAAY;KACrB;CACF,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,MAAM,oBAAK,IAAI,EAAI,CAAC;AAEhD,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,GAAG;IACd,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;KACjB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function Page(): JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Header } from './Header';
|
|
3
|
+
import './page.css';
|
|
4
|
+
export const Page = () => {
|
|
5
|
+
const [user, setUser] = React.useState();
|
|
6
|
+
return (React.createElement("article", null,
|
|
7
|
+
React.createElement(Header, { user: user, onLogin: () => setUser({ name: 'Jane Doe' }), onLogout: () => setUser(undefined), onCreateAccount: () => setUser({ name: 'Jane Doe' }) }),
|
|
8
|
+
React.createElement("section", null,
|
|
9
|
+
React.createElement("h2", null, "Pages in Storybook"),
|
|
10
|
+
React.createElement("p", null,
|
|
11
|
+
"We recommend building UIs with a",
|
|
12
|
+
' ',
|
|
13
|
+
React.createElement("a", { href: "https://componentdriven.org", target: "_blank", rel: "noopener noreferrer" },
|
|
14
|
+
React.createElement("strong", null, "component-driven")),
|
|
15
|
+
' ',
|
|
16
|
+
"process starting with atomic components and ending with pages."),
|
|
17
|
+
React.createElement("p", null, "Render pages with mock data. This makes it easy to build and review page states without needing to navigate to them in your app. Here are some handy patterns for managing page data in Storybook:"),
|
|
18
|
+
React.createElement("ul", null,
|
|
19
|
+
React.createElement("li", null, "Use a higher-level connected component. Storybook helps you compose such data from the \"args\" of child component stories"),
|
|
20
|
+
React.createElement("li", null, "Assemble data in the page component from your services. You can mock these services out using Storybook.")),
|
|
21
|
+
React.createElement("p", null,
|
|
22
|
+
"Get a guided tutorial on component-driven development at",
|
|
23
|
+
' ',
|
|
24
|
+
React.createElement("a", { href: "https://storybook.js.org/tutorials/", target: "_blank", rel: "noopener noreferrer" }, "Storybook tutorials"),
|
|
25
|
+
". Read more in the",
|
|
26
|
+
' ',
|
|
27
|
+
React.createElement("a", { href: "https://storybook.js.org/docs", target: "_blank", rel: "noopener noreferrer" }, "docs"),
|
|
28
|
+
"."),
|
|
29
|
+
React.createElement("div", { className: "tip-wrapper" },
|
|
30
|
+
React.createElement("span", { className: "tip" }, "Tip"),
|
|
31
|
+
" Adjust the width of the canvas with the",
|
|
32
|
+
' ',
|
|
33
|
+
React.createElement("svg", { width: "10", height: "10", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" },
|
|
34
|
+
React.createElement("g", { fill: "none", fillRule: "evenodd" },
|
|
35
|
+
React.createElement("path", { d: "M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z", id: "a", fill: "#999" }))),
|
|
36
|
+
"Viewports addon in the toolbar"))));
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=Page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../src/stories/Page.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,EAAE;IACvB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IAEzC,OAAO,CACL;QACE,oBAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAC5C,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,EAClC,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,GACpD;QAEF;YACE,qDAA2B;YAC3B;;gBACmC,GAAG;gBACpC,2BAAG,IAAI,EAAC,6BAA6B,EAAC,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB;oBAC7E,uDAAiC,CAC/B;gBAAC,GAAG;iFAEN;YACJ,oOAII;YACJ;gBACE,6JAGK;gBACL,2IAGK,CACF;YACL;;gBAC2D,GAAG;gBAC5D,2BAAG,IAAI,EAAC,qCAAqC,EAAC,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,0BAEnF;;gBACe,GAAG;gBACtB,2BAAG,IAAI,EAAC,+BAA+B,EAAC,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,WAE7E;oBAEF;YACJ,6BAAK,SAAS,EAAC,aAAa;gBAC1B,8BAAM,SAAS,EAAC,KAAK,UAAW;;gBAAyC,GAAG;gBAC5E,6BAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B;oBAChF,2BAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS;wBAC/B,8BACE,CAAC,EAAC,sOAAsO,EACxO,EAAE,EAAC,GAAG,EACN,IAAI,EAAC,MAAM,GACX,CACA,CACA;iDAEF,CACE,CACF,CACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { Page as component };
|
|
4
|
+
export namespace parameters {
|
|
5
|
+
const layout: string;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export default _default;
|
|
9
|
+
export const LoggedOut: any;
|
|
10
|
+
export const LoggedIn: any;
|
|
11
|
+
import { Page } from "./Page";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { within, userEvent } from '@storybook/testing-library';
|
|
12
|
+
import { Page } from './Page';
|
|
13
|
+
export default {
|
|
14
|
+
title: 'Example/Page',
|
|
15
|
+
component: Page,
|
|
16
|
+
parameters: {
|
|
17
|
+
// More on Story layout: https://storybook.js.org/docs/react/configure/story-layout
|
|
18
|
+
layout: 'fullscreen',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const Template = (args) => React.createElement(Page, Object.assign({}, args));
|
|
22
|
+
// More on interaction testing: https://storybook.js.org/docs/react/writing-tests/interaction-testing
|
|
23
|
+
export const LoggedOut = Template.bind({});
|
|
24
|
+
export const LoggedIn = Template.bind({});
|
|
25
|
+
LoggedIn.play = ({ canvasElement }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
const canvas = within(canvasElement);
|
|
27
|
+
const loginButton = yield canvas.getByRole('button', { name: /Log in/i });
|
|
28
|
+
yield userEvent.click(loginButton);
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=Page.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.stories.js","sourceRoot":"","sources":["../../src/stories/Page.stories.jsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,mFAAmF;QACnF,MAAM,EAAE,YAAY;KACrB;CACF,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,IAAI,oBAAK,IAAI,EAAI,CAAC;AAE9C,qGAAqG;AACrG,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,GAAG,CAAO,EAAE,aAAa,EAAE,EAAE,EAAE;IAC1C,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;IACrC,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;IAC1E,MAAM,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC,CAAA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/comments</title><g id="illustration/comments" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Path" fill="#96D07C" d="M2.52730803,17.9196415 C2.44329744,17.9745167 2.36370847,18.000488 2.29303375,18.000488 C2.1197031,18.000488 2,17.8443588 2,17.5752855 L2,4 C2,1.790861 3.790861,3.23296945e-13 6,3.23296945e-13 L33.9995117,3.23296945e-13 C36.2086507,3.23296945e-13 37.9995117,1.790861 37.9995117,4 L37.9995117,9.999512 C37.9995117,12.208651 36.2086507,13.999512 33.9995117,13.999512 L8,13.999512 C7.83499225,13.999512 7.6723181,13.9895206 7.51254954,13.9701099 L2.52730803,17.9196415 Z"/><path id="Path" fill="#73E1E0" d="M7.51066,44.9703679 L2.52730803,47.9186655 C2.44329744,47.9735407 2.36370847,47.999512 2.29303375,47.999512 C2.1197031,47.999512 2,47.8433828 2,47.5743095 L2,35 C2,32.790861 3.790861,31 6,31 L26,31 C28.209139,31 30,32.790861 30,35 L30,41 C30,43.209139 28.209139,45 26,45 L8,45 C7.8343417,45 7.67103544,44.9899297 7.51066,44.9703679 Z"/><path id="Path" fill="#FFD476" d="M46,19.5 L46,33.0747975 C46,33.3438708 45.8802969,33.5 45.7069663,33.5 C45.6362915,33.5 45.5567026,33.4740287 45.472692,33.4191535 L40.4887103,29.4704446 C40.3285371,29.489956 40.1654415,29.5 40,29.5 L18,29.5 C15.790861,29.5 14,27.709139 14,25.5 L14,19.5 C14,17.290861 15.790861,15.5 18,15.5 L42,15.5 C44.209139,15.5 46,17.290861 46,19.5 Z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/direction</title><g id="illustration/direction" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Combined-Shape" fill="#FFD476" d="M23.4917015,33.6030641 L2.93840258,31.4321033 C2.38917316,31.3740904 1.99096346,30.8818233 2.04897631,30.3325939 C2.0747515,30.0885705 2.18934861,29.8625419 2.37095722,29.6975265 L34.2609105,0.721285325 C34.6696614,0.349881049 35.3021022,0.38015648 35.6735064,0.788907393 C35.9232621,1.06377731 36.0001133,1.45442096 35.8730901,1.80341447 L24.5364357,32.9506164 C24.3793473,33.3822133 23.9484565,33.6513092 23.4917015,33.6030641 L23.4917015,33.6030641 Z"/><path id="Combined-Shape-Copy" fill="#FFC445" d="M24.3163597,33.2881029 C24.0306575,33.0138462 23.9337246,32.5968232 24.069176,32.2246735 L35.091923,1.9399251 C35.2266075,1.56988243 35.5659249,1.31333613 35.9586669,1.28460955 C36.5094802,1.24432106 36.9886628,1.65818318 37.0289513,2.20899647 L40.2437557,46.1609256 C40.2644355,46.4436546 40.1641446,46.7218752 39.9678293,46.9263833 C39.5853672,47.3248067 38.9523344,47.3377458 38.5539111,46.9552837 L24.3163597,33.2881029 L24.3163597,33.2881029 Z"/></g></svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Primary UI component for user interaction
|
|
4
|
+
*/
|
|
5
|
+
export declare function Button({ label, ...props }: {
|
|
6
|
+
label: string;
|
|
7
|
+
}): JSX.Element;
|
|
@@ -1,58 +1,20 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import React from 'react';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
whiteSpace: 'nowrap',
|
|
21
|
-
lineHeight: '39px',
|
|
22
|
-
border: '1px solid transparent'
|
|
23
|
-
});
|
|
24
|
-
const PrimaryButton = styled(StyledButton)({
|
|
25
|
-
backgroundColor: 'var(--black)',
|
|
26
|
-
color: 'var(--white)',
|
|
27
|
-
'&:hover': {
|
|
28
|
-
backgroundColor: 'var(--darkest-grey)',
|
|
29
|
-
borderColor: 'var(--darkest-grey)',
|
|
30
|
-
},
|
|
31
|
-
'&:disabled': {
|
|
32
|
-
backgroundColor: 'var(--lightest-grey)',
|
|
33
|
-
borderColor: 'var(--lightest-grey)',
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
const SecondaryButton = styled(StyledButton)({
|
|
37
|
-
borderColor: 'var(--black)',
|
|
38
|
-
backgroundColor: 'transparent',
|
|
39
|
-
color: 'var(--black)',
|
|
40
|
-
'&:hover': {
|
|
41
|
-
borderColor: 'var(--darkest-grey)',
|
|
42
|
-
},
|
|
43
|
-
'&:disabled': {
|
|
44
|
-
borderColor: 'var(--disabled)'
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
export function Button(_a) {
|
|
48
|
-
var { children, category } = _a, props = __rest(_a, ["children", "category"]);
|
|
49
|
-
switch (category) {
|
|
50
|
-
case 'primary':
|
|
51
|
-
return (React.createElement(PrimaryButton, Object.assign({}, props), children));
|
|
52
|
-
case 'secondary':
|
|
53
|
-
return (React.createElement(SecondaryButton, Object.assign({}, props), children));
|
|
54
|
-
default:
|
|
55
|
-
return (React.createElement(StyledButton, Object.assign({}, props), children));
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
/**
|
|
14
|
+
* Primary UI component for user interaction
|
|
15
|
+
*/
|
|
16
|
+
export function Button(_a) {
|
|
17
|
+
var { label } = _a, props = __rest(_a, ["label"]);
|
|
18
|
+
return (React.createElement("button", Object.assign({ type: "button" }, props), label));
|
|
19
|
+
}
|
|
58
20
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/stories/atoms/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/stories/atoms/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,EAAoC;QAApC,EAAE,KAAK,OAA6B,EAAxB,KAAK,cAAjB,SAAmB,CAAF;IACtC,OAAO,CACL,8CACE,IAAI,EAAC,QAAQ,IACT,KAAK,GAER,KAAK,CACC,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { Button } from './Button';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: typeof Button;
|
|
5
|
-
argTypes: {
|
|
6
|
-
backgroundColor: {
|
|
7
|
-
control: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
12
|
-
export declare const Primary: any;
|
|
13
|
-
export declare const Secondary: any;
|
|
14
|
-
export declare const Default: any;
|
|
1
|
+
import { Button } from './Button';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: typeof Button;
|
|
5
|
+
argTypes: {
|
|
6
|
+
backgroundColor: {
|
|
7
|
+
control: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
12
|
+
export declare const Primary: any;
|
|
13
|
+
export declare const Secondary: any;
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button } from './Button';
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Atoms/Button',
|
|
5
|
-
component: Button,
|
|
6
|
-
argTypes: {
|
|
7
|
-
backgroundColor: { control: 'color' },
|
|
8
|
-
},
|
|
9
|
-
};
|
|
10
|
-
function Template(args) {
|
|
11
|
-
return React.createElement(Button, Object.assign({}, args));
|
|
12
|
-
}
|
|
13
|
-
export const Primary = Template.bind({});
|
|
14
|
-
Primary.args = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
export const Secondary = Template.bind({});
|
|
19
|
-
Secondary.args = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
export const Default = Template.bind({});
|
|
24
|
-
Default.args = {
|
|
25
|
-
children: 'Button',
|
|
26
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from './Button';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Atoms/Button',
|
|
5
|
+
component: Button,
|
|
6
|
+
argTypes: {
|
|
7
|
+
backgroundColor: { control: 'color' },
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
function Template(args) {
|
|
11
|
+
return React.createElement(Button, Object.assign({}, args));
|
|
12
|
+
}
|
|
13
|
+
export const Primary = Template.bind({});
|
|
14
|
+
Primary.args = {
|
|
15
|
+
primary: true,
|
|
16
|
+
label: 'Button',
|
|
17
|
+
};
|
|
18
|
+
export const Secondary = Template.bind({});
|
|
19
|
+
Secondary.args = {
|
|
20
|
+
label: 'Button',
|
|
21
|
+
};
|
|
27
22
|
//# sourceMappingURL=Button.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.js","sourceRoot":"","sources":["../../../src/stories/atoms/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.stories.js","sourceRoot":"","sources":["../../../src/stories/atoms/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMlC,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE;QACR,eAAe,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;KACtC;CACF,CAAC;AAEF,SAAS,QAAQ,CAAC,IAAW;IAC3B,OAAO,oBAAC,MAAM,oBAAK,IAAI,EAAI,CAAC;AAC9B,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG;IACb,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;IACf,KAAK,EAAE,QAAQ;CAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@universal-tennis/ui-shared",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"main": "dist/items.js",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"homepage": "https://universaltennis.com",
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"@emotion/react": "^11.10.5",
|
|
9
|
-
"@emotion/styled": "^11.10.5",
|
|
10
|
-
"@mui/material": "^5.10.15",
|
|
11
|
-
"copyfiles": "^2.4.1",
|
|
12
|
-
"cross-env": "^7.0.3",
|
|
13
|
-
"react": "^18.2.0",
|
|
14
|
-
"react-dom": "^18.2.0",
|
|
15
|
-
"react-scripts": "5.0.1",
|
|
16
|
-
"typescript": "^4.9.3",
|
|
17
|
-
"web-vitals": "^2.1.4"
|
|
18
|
-
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"start": "start-storybook -p 6006 -s public",
|
|
21
|
-
"build-storybook": "build-storybook -s public",
|
|
22
|
-
"publish:npm": "tsc && yarn copy-files",
|
|
23
|
-
"publish-package": "npm publish --access public",
|
|
24
|
-
"copy-files": "copyfiles -u 1 src/stories/assets/*.svg src/stories/assets/*.png src/stories/assets/*.gif src/stories/assets/css/*.css dist/",
|
|
25
|
-
"eslint": "npx eslint --ext .jsx,.js src --fix"
|
|
26
|
-
},
|
|
27
|
-
"eslintConfig": {
|
|
28
|
-
"extends": [
|
|
29
|
-
"react-app",
|
|
30
|
-
"react-app/jest"
|
|
31
|
-
],
|
|
32
|
-
"overrides": [
|
|
33
|
-
{
|
|
34
|
-
"files": [
|
|
35
|
-
"**/*.stories.*"
|
|
36
|
-
],
|
|
37
|
-
"rules": {
|
|
38
|
-
"import/no-anonymous-default-export": "off"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
},
|
|
43
|
-
"browserslist": {
|
|
44
|
-
"production": [
|
|
45
|
-
">0.2%",
|
|
46
|
-
"not dead",
|
|
47
|
-
"not op_mini all"
|
|
48
|
-
],
|
|
49
|
-
"development": [
|
|
50
|
-
"last 1 chrome version",
|
|
51
|
-
"last 1 firefox version",
|
|
52
|
-
"last 1 safari version"
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
"devDependencies": {
|
|
56
|
-
"@storybook/addon-actions": "^6.5.13",
|
|
57
|
-
"@storybook/addon-essentials": "^6.5.13",
|
|
58
|
-
"@storybook/addon-interactions": "^6.5.13",
|
|
59
|
-
"@storybook/addon-links": "^6.5.13",
|
|
60
|
-
"@storybook/builder-webpack5": "^6.5.13",
|
|
61
|
-
"@storybook/manager-webpack5": "^6.5.13",
|
|
62
|
-
"@storybook/node-logger": "^6.5.13",
|
|
63
|
-
"@storybook/preset-create-react-app": "^4.1.2",
|
|
64
|
-
"@storybook/react": "^6.5.13",
|
|
65
|
-
"@storybook/testing-library": "^0.0.13",
|
|
66
|
-
"@types/babel__core": "^7.1.20",
|
|
67
|
-
"@types/react": "^18.0.25",
|
|
68
|
-
"babel-plugin-named-exports-order": "^0.0.2",
|
|
69
|
-
"eslint": "^8.28.0",
|
|
70
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
71
|
-
"eslint-import-resolver-typescript": "^3.5.2",
|
|
72
|
-
"eslint-plugin-import": "^2.25.3",
|
|
73
|
-
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
74
|
-
"eslint-plugin-react": "^7.28.0",
|
|
75
|
-
"eslint-plugin-react-hooks": "^4.3.0",
|
|
76
|
-
"eslint-plugin-storybook": "^0.6.7",
|
|
77
|
-
"prop-types": "^15.8.1",
|
|
78
|
-
"webpack": "^5.75.0"
|
|
79
|
-
},
|
|
80
|
-
"description": "Shared UI components for UT",
|
|
81
|
-
"repository": {
|
|
82
|
-
"type": "git",
|
|
83
|
-
"url": "git+https://bitbucket.org/universaltennis/ui-shared.git"
|
|
84
|
-
},
|
|
85
|
-
"author": "universal-tennis"
|
|
86
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@universal-tennis/ui-shared",
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"main": "dist/items.js",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://universaltennis.com",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@emotion/react": "^11.10.5",
|
|
9
|
+
"@emotion/styled": "^11.10.5",
|
|
10
|
+
"@mui/material": "^5.10.15",
|
|
11
|
+
"copyfiles": "^2.4.1",
|
|
12
|
+
"cross-env": "^7.0.3",
|
|
13
|
+
"react": "^18.2.0",
|
|
14
|
+
"react-dom": "^18.2.0",
|
|
15
|
+
"react-scripts": "5.0.1",
|
|
16
|
+
"typescript": "^4.9.3",
|
|
17
|
+
"web-vitals": "^2.1.4"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"start": "start-storybook -p 6006 -s public",
|
|
21
|
+
"build-storybook": "build-storybook -s public",
|
|
22
|
+
"publish:npm": "tsc && yarn copy-files",
|
|
23
|
+
"publish-package": "npm publish --access public",
|
|
24
|
+
"copy-files": "copyfiles -u 1 src/stories/assets/*.svg src/stories/assets/*.png src/stories/assets/*.gif src/stories/assets/css/*.css dist/",
|
|
25
|
+
"eslint": "npx eslint --ext .jsx,.js src --fix"
|
|
26
|
+
},
|
|
27
|
+
"eslintConfig": {
|
|
28
|
+
"extends": [
|
|
29
|
+
"react-app",
|
|
30
|
+
"react-app/jest"
|
|
31
|
+
],
|
|
32
|
+
"overrides": [
|
|
33
|
+
{
|
|
34
|
+
"files": [
|
|
35
|
+
"**/*.stories.*"
|
|
36
|
+
],
|
|
37
|
+
"rules": {
|
|
38
|
+
"import/no-anonymous-default-export": "off"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"browserslist": {
|
|
44
|
+
"production": [
|
|
45
|
+
">0.2%",
|
|
46
|
+
"not dead",
|
|
47
|
+
"not op_mini all"
|
|
48
|
+
],
|
|
49
|
+
"development": [
|
|
50
|
+
"last 1 chrome version",
|
|
51
|
+
"last 1 firefox version",
|
|
52
|
+
"last 1 safari version"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@storybook/addon-actions": "^6.5.13",
|
|
57
|
+
"@storybook/addon-essentials": "^6.5.13",
|
|
58
|
+
"@storybook/addon-interactions": "^6.5.13",
|
|
59
|
+
"@storybook/addon-links": "^6.5.13",
|
|
60
|
+
"@storybook/builder-webpack5": "^6.5.13",
|
|
61
|
+
"@storybook/manager-webpack5": "^6.5.13",
|
|
62
|
+
"@storybook/node-logger": "^6.5.13",
|
|
63
|
+
"@storybook/preset-create-react-app": "^4.1.2",
|
|
64
|
+
"@storybook/react": "^6.5.13",
|
|
65
|
+
"@storybook/testing-library": "^0.0.13",
|
|
66
|
+
"@types/babel__core": "^7.1.20",
|
|
67
|
+
"@types/react": "^18.0.25",
|
|
68
|
+
"babel-plugin-named-exports-order": "^0.0.2",
|
|
69
|
+
"eslint": "^8.28.0",
|
|
70
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
71
|
+
"eslint-import-resolver-typescript": "^3.5.2",
|
|
72
|
+
"eslint-plugin-import": "^2.25.3",
|
|
73
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
74
|
+
"eslint-plugin-react": "^7.28.0",
|
|
75
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
76
|
+
"eslint-plugin-storybook": "^0.6.7",
|
|
77
|
+
"prop-types": "^15.8.1",
|
|
78
|
+
"webpack": "^5.75.0"
|
|
79
|
+
},
|
|
80
|
+
"description": "Shared UI components for UT",
|
|
81
|
+
"repository": {
|
|
82
|
+
"type": "git",
|
|
83
|
+
"url": "git+https://bitbucket.org/universaltennis/ui-shared.git"
|
|
84
|
+
},
|
|
85
|
+
"author": "universal-tennis"
|
|
86
|
+
}
|
package/src/custom.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare module '*.jpg';
|
|
2
|
-
declare module '*.png';
|
|
3
|
-
declare module '*.woff2';
|
|
4
|
-
declare module '*.woff';
|
|
5
|
-
declare module '*.ttf';
|
|
6
|
-
|
|
7
|
-
declare module '*.svg' {
|
|
8
|
-
import React = require('react');
|
|
9
|
-
|
|
10
|
-
export const ReactComponent: React.SFC<React.SVGProps<SVGSVGElement>>;
|
|
11
|
-
const src: string;
|
|
12
|
-
export default src;
|
|
13
|
-
}
|
|
1
|
+
declare module '*.jpg';
|
|
2
|
+
declare module '*.png';
|
|
3
|
+
declare module '*.woff2';
|
|
4
|
+
declare module '*.woff';
|
|
5
|
+
declare module '*.ttf';
|
|
6
|
+
|
|
7
|
+
declare module '*.svg' {
|
|
8
|
+
import React = require('react');
|
|
9
|
+
|
|
10
|
+
export const ReactComponent: React.SFC<React.SVGProps<SVGSVGElement>>;
|
|
11
|
+
const src: string;
|
|
12
|
+
export default src;
|
|
13
|
+
}
|
package/src/items.jsx
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('./components');
|
|
1
|
+
module.exports = require('./components');
|
package/tsconfig.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"noImplicitThis": true,
|
|
4
|
-
"preserveConstEnums": true,
|
|
5
|
-
"strictNullChecks": true,
|
|
6
|
-
"sourceMap": true,
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"outDir": "dist",
|
|
10
|
-
"target": "es6",
|
|
11
|
-
"module": "es6",
|
|
12
|
-
"allowJs": true,
|
|
13
|
-
"moduleResolution": "node",
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"jsx": "react",
|
|
16
|
-
"lib": ["ES2017", "DOM"],
|
|
17
|
-
"baseUrl": "src",
|
|
18
|
-
"allowSyntheticDefaultImports": true,
|
|
19
|
-
"noImplicitAny": true
|
|
20
|
-
},
|
|
21
|
-
"exclude": [
|
|
22
|
-
"node_modules",
|
|
23
|
-
],
|
|
24
|
-
"include": ["src", "src/custom.d.ts"]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"noImplicitThis": true,
|
|
4
|
+
"preserveConstEnums": true,
|
|
5
|
+
"strictNullChecks": true,
|
|
6
|
+
"sourceMap": true,
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"outDir": "dist",
|
|
10
|
+
"target": "es6",
|
|
11
|
+
"module": "es6",
|
|
12
|
+
"allowJs": true,
|
|
13
|
+
"moduleResolution": "node",
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"jsx": "react",
|
|
16
|
+
"lib": ["ES2017", "DOM"],
|
|
17
|
+
"baseUrl": "src",
|
|
18
|
+
"allowSyntheticDefaultImports": true,
|
|
19
|
+
"noImplicitAny": true
|
|
20
|
+
},
|
|
21
|
+
"exclude": [
|
|
22
|
+
"node_modules",
|
|
23
|
+
],
|
|
24
|
+
"include": ["src", "src/custom.d.ts"]
|
|
25
25
|
}
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
trigger:
|
|
2
|
-
|
|
3
|
-
include:
|
|
4
|
-
-
|
|
5
|
-
|
|
6
|
-
pool:
|
|
7
|
-
vmImage: ubuntu-latest
|
|
8
|
-
|
|
9
|
-
resources:
|
|
10
|
-
repositories:
|
|
11
|
-
- repository: Infrastructure
|
|
12
|
-
type: bitbucket
|
|
13
|
-
endpoint: ut-bitbucket
|
|
14
|
-
name: universaltennis/utr-infrastructure
|
|
15
|
-
ref: master
|
|
16
|
-
|
|
17
|
-
variables:
|
|
18
|
-
- template: /infrastructure/pipelines/shared-variables.yml@Infrastructure
|
|
19
|
-
|
|
20
|
-
jobs:
|
|
21
|
-
- job: PublishNpmPackage
|
|
22
|
-
steps:
|
|
23
|
-
- template: /infrastructure/components/download-key-vault-secrets.yml@Infrastructure
|
|
24
|
-
parameters:
|
|
25
|
-
keyVaultName: $(sharedKeyVaultName)
|
|
26
|
-
- script: |
|
|
27
|
-
yarn
|
|
28
|
-
yarn run publish:npm
|
|
29
|
-
npm publish
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
trigger:
|
|
2
|
+
tags:
|
|
3
|
+
include:
|
|
4
|
+
- '*'
|
|
5
|
+
|
|
6
|
+
pool:
|
|
7
|
+
vmImage: ubuntu-latest
|
|
8
|
+
|
|
9
|
+
resources:
|
|
10
|
+
repositories:
|
|
11
|
+
- repository: Infrastructure
|
|
12
|
+
type: bitbucket
|
|
13
|
+
endpoint: ut-bitbucket
|
|
14
|
+
name: universaltennis/utr-infrastructure
|
|
15
|
+
ref: master
|
|
16
|
+
|
|
17
|
+
variables:
|
|
18
|
+
- template: /infrastructure/pipelines/shared-variables.yml@Infrastructure
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
- job: PublishNpmPackage
|
|
22
|
+
steps:
|
|
23
|
+
- template: /infrastructure/components/download-key-vault-secrets.yml@Infrastructure
|
|
24
|
+
parameters:
|
|
25
|
+
keyVaultName: $(sharedKeyVaultName)
|
|
26
|
+
- script: |
|
|
27
|
+
yarn
|
|
28
|
+
yarn run publish:npm
|
|
29
|
+
npm publish
|
|
30
|
+
displayName: Publish npm package
|
|
31
|
+
env:
|
|
32
|
+
NPM_TOKEN: $(NpmPublishToken)
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
name: Publish package
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
workflow_dispatch:
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v3
|
|
14
|
-
- uses: actions/setup-node@v3
|
|
15
|
-
with:
|
|
16
|
-
node-version: 16
|
|
17
|
-
registry-url: https://npm.pkg.github.com/
|
|
18
|
-
- run: yarn
|
|
19
|
-
- run: yarn run publish:npm
|
|
20
|
-
- run: npm publish --access public
|
|
21
|
-
variables:
|
|
22
|
-
NPM_TOKEN: $NPM_TOKEN
|