@eleventheye/asui 1.1.1 → 1.1.2
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/package.json +1 -1
- package/src/stories/Icons.tsx +1 -0
- package/dist/stories/Button.d.ts +0 -10
- package/dist/stories/Button.d.ts.map +0 -1
- package/dist/stories/Button.js +0 -19
- package/dist/stories/Button.js.map +0 -1
- package/dist/stories/Button.stories.d.ts +0 -24
- package/dist/stories/Button.stories.d.ts.map +0 -1
- package/dist/stories/Button.stories.js +0 -39
- package/dist/stories/Button.stories.js.map +0 -1
- package/dist/stories/Header.d.ts +0 -13
- package/dist/stories/Header.d.ts.map +0 -1
- package/dist/stories/Header.js +0 -5
- package/dist/stories/Header.js.map +0 -1
- package/dist/stories/Header.stories.d.ts +0 -19
- package/dist/stories/Header.stories.d.ts.map +0 -1
- package/dist/stories/Header.stories.js +0 -25
- package/dist/stories/Header.stories.js.map +0 -1
- package/dist/stories/Icons.d.ts +0 -10
- package/dist/stories/Icons.d.ts.map +0 -1
- package/dist/stories/Icons.js +0 -7
- package/dist/stories/Icons.js.map +0 -1
- package/dist/stories/Icons.stories.d.ts +0 -21
- package/dist/stories/Icons.stories.d.ts.map +0 -1
- package/dist/stories/Icons.stories.js +0 -42
- package/dist/stories/Icons.stories.js.map +0 -1
- package/dist/stories/Page.d.ts +0 -4
- package/dist/stories/Page.d.ts.map +0 -1
- package/dist/stories/Page.js +0 -9
- package/dist/stories/Page.js.map +0 -1
- package/dist/stories/Page.stories.d.ts +0 -13
- package/dist/stories/Page.stories.d.ts.map +0 -1
- package/dist/stories/Page.stories.js +0 -32
- package/dist/stories/Page.stories.js.map +0 -1
package/package.json
CHANGED
package/src/stories/Icons.tsx
CHANGED
package/dist/stories/Button.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import './button.css';
|
|
2
|
-
export interface ButtonProps {
|
|
3
|
-
primary?: boolean;
|
|
4
|
-
backgroundColor?: string;
|
|
5
|
-
size?: 'small' | 'medium' | 'large';
|
|
6
|
-
label: string;
|
|
7
|
-
onClick?: () => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/stories/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,WAAW;IAE1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAEpC,KAAK,EAAE,MAAM,CAAC;IAEd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAGD,eAAO,MAAM,MAAM,GAAI,qDAMpB,WAAW,4CAYb,CAAC"}
|
package/dist/stories/Button.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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 { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import './button.css';
|
|
14
|
-
export const Button = (_a) => {
|
|
15
|
-
var { primary = false, size = 'medium', backgroundColor, label } = _a, props = __rest(_a, ["primary", "size", "backgroundColor", "label"]);
|
|
16
|
-
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
|
|
17
|
-
return (_jsx("button", Object.assign({ type: "button", className: ['storybook-button', `storybook-button--${size}`, mode].join(' '), style: { backgroundColor } }, props, { children: label })));
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/stories/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAEA,OAAO,cAAc,CAAC;AAgBtB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAMT,EAAE,EAAE;QANK,EACrB,OAAO,GAAG,KAAK,EACf,IAAI,GAAG,QAAQ,EACf,eAAe,EACf,KAAK,OAEO,EADT,KAAK,cALa,+CAMtB,CADS;IAER,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,6BAA6B,CAAC;IACnF,OAAO,CACL,+BACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,CAAC,kBAAkB,EAAE,qBAAqB,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC5E,KAAK,EAAE,EAAE,eAAe,EAAE,IACtB,KAAK,cAER,KAAK,IACC,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
parameters: {
|
|
6
|
-
layout: string;
|
|
7
|
-
};
|
|
8
|
-
tags: string[];
|
|
9
|
-
argTypes: {
|
|
10
|
-
backgroundColor: {
|
|
11
|
-
control: "color";
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
args: {
|
|
15
|
-
onClick: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export default meta;
|
|
19
|
-
type Story = StoryObj<typeof meta>;
|
|
20
|
-
export declare const Primary: Story;
|
|
21
|
-
export declare const Secondary: Story;
|
|
22
|
-
export declare const Large: Story;
|
|
23
|
-
export declare const Small: Story;
|
|
24
|
-
//# sourceMappingURL=Button.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Button.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;CAeqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { fn } from '@storybook/test';
|
|
2
|
-
import { Button } from './Button';
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'Example/Button',
|
|
5
|
-
component: Button,
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: 'centered',
|
|
8
|
-
},
|
|
9
|
-
tags: ['autodocs'],
|
|
10
|
-
argTypes: {
|
|
11
|
-
backgroundColor: { control: 'color' },
|
|
12
|
-
},
|
|
13
|
-
args: { onClick: fn() },
|
|
14
|
-
};
|
|
15
|
-
export default meta;
|
|
16
|
-
export const Primary = {
|
|
17
|
-
args: {
|
|
18
|
-
primary: true,
|
|
19
|
-
label: 'Button',
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
export const Secondary = {
|
|
23
|
-
args: {
|
|
24
|
-
label: 'Button',
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
export const Large = {
|
|
28
|
-
args: {
|
|
29
|
-
size: 'large',
|
|
30
|
-
label: 'Button',
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
export const Small = {
|
|
34
|
-
args: {
|
|
35
|
-
size: 'small',
|
|
36
|
-
label: 'Button',
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=Button.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.js","sourceRoot":"","sources":["../../src/stories/Button.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QAEV,MAAM,EAAE,UAAU;KACnB;IAED,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,QAAQ,EAAE;QACR,eAAe,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;KACtC;IAED,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE;CACM,CAAC;AAEhC,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,QAAQ;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,QAAQ;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,QAAQ;KAChB;CACF,CAAC"}
|
package/dist/stories/Header.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import './header.css';
|
|
2
|
-
type User = {
|
|
3
|
-
name: string;
|
|
4
|
-
};
|
|
5
|
-
export interface HeaderProps {
|
|
6
|
-
user?: User;
|
|
7
|
-
onLogin?: () => void;
|
|
8
|
-
onLogout?: () => void;
|
|
9
|
-
onCreateAccount?: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../src/stories/Header.tsx"],"names":[],"mappings":"AAGA,OAAO,cAAc,CAAC;AAEtB,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,MAAM,GAAI,8CAA8C,WAAW,4CAuC/E,CAAC"}
|
package/dist/stories/Header.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Button } from './Button';
|
|
3
|
-
import './header.css';
|
|
4
|
-
export const Header = ({ user, onLogin, onLogout, onCreateAccount }) => (_jsx("header", { children: _jsxs("div", { className: "storybook-header", children: [_jsxs("div", { children: [_jsx("svg", { width: "32", height: "32", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", children: _jsxs("g", { fill: "none", fillRule: "evenodd", children: [_jsx("path", { d: "M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z", fill: "#FFF" }), _jsx("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" }), _jsx("path", { d: "M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z", fill: "#91BAF8" })] }) }), _jsx("h1", { children: "Acme" })] }), _jsx("div", { children: user ? (_jsxs(_Fragment, { children: [_jsxs("span", { className: "welcome", children: ["Welcome, ", _jsx("b", { children: user.name }), "!"] }), _jsx(Button, { size: "small", onClick: onLogout, label: "Log out" })] })) : (_jsxs(_Fragment, { children: [_jsx(Button, { size: "small", onClick: onLogin, label: "Log in" }), _jsx(Button, { primary: true, size: "small", onClick: onCreateAccount, label: "Sign up" })] })) })] }) }));
|
|
5
|
-
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../src/stories/Header.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,cAAc,CAAC;AAatB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAe,EAAE,EAAE,CAAC,CACnF,2BACE,eAAK,SAAS,EAAC,kBAAkB,aAC/B,0BACE,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,YAChF,aAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS,aAC/B,eACE,CAAC,EAAC,mFAAmF,EACrF,IAAI,EAAC,MAAM,GACX,EACF,eACE,CAAC,EAAC,kEAAkE,EACpE,IAAI,EAAC,SAAS,GACd,EACF,eACE,CAAC,EAAC,gEAAgE,EAClE,IAAI,EAAC,SAAS,GACd,IACA,GACA,EACN,gCAAa,IACT,EACN,wBACG,IAAI,CAAC,CAAC,CAAC,CACN,8BACE,gBAAM,SAAS,EAAC,SAAS,0BACd,sBAAI,IAAI,CAAC,IAAI,GAAK,SACtB,EACP,KAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAC,SAAS,GAAG,IACzD,CACJ,CAAC,CAAC,CAAC,CACF,8BACE,KAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAC,QAAQ,GAAG,EACxD,KAAC,MAAM,IAAC,OAAO,QAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAC,SAAS,GAAG,IACxE,CACJ,GACG,IACF,GACC,CACV,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ user, onLogin, onLogout, onCreateAccount }: import("./Header").HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
tags: string[];
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
args: {
|
|
10
|
-
onLogin: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
11
|
-
onLogout: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
12
|
-
onCreateAccount: import("@vitest/spy").Mock<(...args: any[]) => any>;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof meta>;
|
|
17
|
-
export declare const LoggedIn: Story;
|
|
18
|
-
export declare const LoggedOut: Story;
|
|
19
|
-
//# sourceMappingURL=Header.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Header.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,QAAA,MAAM,IAAI;;;;;;;;;;;;CAcqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAAU,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { fn } from '@storybook/test';
|
|
2
|
-
import { Header } from './Header';
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'Example/Header',
|
|
5
|
-
component: Header,
|
|
6
|
-
tags: ['autodocs'],
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'fullscreen',
|
|
9
|
-
},
|
|
10
|
-
args: {
|
|
11
|
-
onLogin: fn(),
|
|
12
|
-
onLogout: fn(),
|
|
13
|
-
onCreateAccount: fn(),
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
export default meta;
|
|
17
|
-
export const LoggedIn = {
|
|
18
|
-
args: {
|
|
19
|
-
user: {
|
|
20
|
-
name: 'Jane Doe',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
export const LoggedOut = {};
|
|
25
|
-
//# sourceMappingURL=Header.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.stories.js","sourceRoot":"","sources":["../../src/stories/Header.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,MAAM;IAEjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QAEV,MAAM,EAAE,YAAY;KACrB;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,EAAE,EAAE;QACb,QAAQ,EAAE,EAAE,EAAE;QACd,eAAe,EAAE,EAAE,EAAE;KACtB;CAC4B,CAAC;AAEhC,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,IAAI,EAAE,UAAU;SACjB;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU,EAAE,CAAC"}
|
package/dist/stories/Icons.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import './icons.css';
|
|
2
|
-
export interface IconsProps {
|
|
3
|
-
color?: string;
|
|
4
|
-
size?: number;
|
|
5
|
-
fillColor?: string;
|
|
6
|
-
fillOpacity: number;
|
|
7
|
-
circleStrokeColor?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const Icons: ({ color, size, fillColor, fillOpacity, circleStrokeColor, }: IconsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
//# sourceMappingURL=Icons.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.d.ts","sourceRoot":"","sources":["../../src/stories/Icons.tsx"],"names":[],"mappings":"AAmBA,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,UAAU;IAEzB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,WAAW,EAAE,MAAM,CAAC;IAEpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAGD,eAAO,MAAM,KAAK,GAAI,6DAMnB,UAAU,4CA4HZ,CAAC"}
|
package/dist/stories/Icons.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { AddItemIcon, AddUserIcon, CheckIcon, DeleteIcon, EyeIcon, EyeSlashIcon, GamesIcon, GearUserIcon, HexagonIcon, HomeIcon, LockIcon, PenIcon, RulerIcon, SaveIcon, TimeLapseIcon, UnlockIcon, UserSettingsIcon, } from '../icons';
|
|
3
|
-
import './icons.css';
|
|
4
|
-
export const Icons = ({ color = '#000000', size = 24, fillColor = 'transparent', fillOpacity = 1, circleStrokeColor = 'transparent', }) => {
|
|
5
|
-
return (_jsxs("div", { className: "storybook-icon-wrapper", children: [_jsx(AddItemIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(AddUserIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(CheckIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(DeleteIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(EyeIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(EyeSlashIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(GamesIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(GearUserIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(HexagonIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(HomeIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(LockIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(PenIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(RulerIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(SaveIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(TimeLapseIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(UnlockIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor }), _jsx(UserSettingsIcon, { size: size, color: color, fillColor: fillColor, fillOpacity: fillOpacity, circleStrokeColor: circleStrokeColor })] }));
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=Icons.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.js","sourceRoot":"","sources":["../../src/stories/Icons.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,EACT,UAAU,EACV,OAAO,EACP,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,EACT,QAAQ,EACR,aAAa,EACb,UAAU,EACV,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,aAAa,CAAC;AAgBrB,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EACpB,KAAK,GAAG,SAAS,EACjB,IAAI,GAAG,EAAE,EACT,SAAS,GAAG,aAAa,EACzB,WAAW,GAAG,CAAC,EACf,iBAAiB,GAAG,aAAa,GACtB,EAAE,EAAE;IACf,OAAO,CACL,eAAK,SAAS,EAAC,wBAAwB,aACrC,KAAC,WAAW,IACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,WAAW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oryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ color, size, fillColor, fillOpacity, circleStrokeColor, }: import("./Icons").IconsProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
parameters: {
|
|
6
|
-
layout: string;
|
|
7
|
-
};
|
|
8
|
-
tags: string[];
|
|
9
|
-
argTypes: {
|
|
10
|
-
color: {
|
|
11
|
-
control: "color";
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
args: {};
|
|
15
|
-
};
|
|
16
|
-
export default meta;
|
|
17
|
-
type Story = StoryObj<typeof meta>;
|
|
18
|
-
export declare const Default: Story;
|
|
19
|
-
export declare const Medium: Story;
|
|
20
|
-
export declare const Large: Story;
|
|
21
|
-
//# sourceMappingURL=Icons.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Icons.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,QAAA,MAAM,IAAI;;;;;;;;;;;;;CAeoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAQpB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAQnB,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Icons } from './Icons';
|
|
2
|
-
const meta = {
|
|
3
|
-
title: 'Icons',
|
|
4
|
-
component: Icons,
|
|
5
|
-
parameters: {
|
|
6
|
-
layout: 'centered',
|
|
7
|
-
},
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
argTypes: {
|
|
10
|
-
color: { control: 'color' },
|
|
11
|
-
},
|
|
12
|
-
args: {},
|
|
13
|
-
};
|
|
14
|
-
export default meta;
|
|
15
|
-
export const Default = {
|
|
16
|
-
args: {
|
|
17
|
-
color: `#000000`,
|
|
18
|
-
size: 24,
|
|
19
|
-
fillColor: 'transparent',
|
|
20
|
-
fillOpacity: 1,
|
|
21
|
-
circleStrokeColor: 'transparent',
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
export const Medium = {
|
|
25
|
-
args: {
|
|
26
|
-
color: `#000000`,
|
|
27
|
-
size: 32,
|
|
28
|
-
fillColor: 'transparent',
|
|
29
|
-
fillOpacity: 1,
|
|
30
|
-
circleStrokeColor: 'transparent',
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
export const Large = {
|
|
34
|
-
args: {
|
|
35
|
-
color: `#000000`,
|
|
36
|
-
size: 48,
|
|
37
|
-
fillColor: 'transparent',
|
|
38
|
-
fillOpacity: 1,
|
|
39
|
-
circleStrokeColor: 'transparent',
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=Icons.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.stories.js","sourceRoot":"","sources":["../../src/stories/Icons.stories.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE;QAEV,MAAM,EAAE,UAAU;KACnB;IAED,IAAI,EAAE,CAAC,UAAU,CAAC;IAElB,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;KAC5B;IAED,IAAI,EAAE,EAAE;CACoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,CAAC;QACd,iBAAiB,EAAE,aAAa;KACjC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAU;IAC3B,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,CAAC;QACd,iBAAiB,EAAE,aAAa;KACjC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,CAAC;QACd,iBAAiB,EAAE,aAAa;KACjC;CACF,CAAC"}
|
package/dist/stories/Page.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../src/stories/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,YAAY,CAAC;AAMpB,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EA+DxB,CAAC"}
|
package/dist/stories/Page.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Header } from './Header';
|
|
4
|
-
import './page.css';
|
|
5
|
-
export const Page = () => {
|
|
6
|
-
const [user, setUser] = React.useState();
|
|
7
|
-
return (_jsxs("article", { children: [_jsx(Header, { user: user, onLogin: () => setUser({ name: 'Jane Doe' }), onLogout: () => setUser(undefined), onCreateAccount: () => setUser({ name: 'Jane Doe' }) }), _jsxs("section", { className: "storybook-page", children: [_jsx("h2", { children: "Pages in Storybook" }), _jsxs("p", { children: ["We recommend building UIs with a", ' ', _jsx("a", { href: "https://componentdriven.org", target: "_blank", rel: "noopener noreferrer", children: _jsx("strong", { children: "component-driven" }) }), ' ', "process starting with atomic components and ending with pages."] }), _jsx("p", { children: "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:" }), _jsxs("ul", { children: [_jsx("li", { children: "Use a higher-level connected component. Storybook helps you compose such data from the \"args\" of child component stories" }), _jsx("li", { children: "Assemble data in the page component from your services. You can mock these services out using Storybook." })] }), _jsxs("p", { children: ["Get a guided tutorial on component-driven development at", ' ', _jsx("a", { href: "https://storybook.js.org/tutorials/", target: "_blank", rel: "noopener noreferrer", children: "Storybook tutorials" }), ". Read more in the", ' ', _jsx("a", { href: "https://storybook.js.org/docs", target: "_blank", rel: "noopener noreferrer", children: "docs" }), "."] }), _jsxs("div", { className: "tip-wrapper", children: [_jsx("span", { className: "tip", children: "Tip" }), " Adjust the width of the canvas with the", ' ', _jsx("svg", { width: "10", height: "10", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg", children: _jsx("g", { fill: "none", fillRule: "evenodd", children: _jsx("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" }) }) }), "Viewports addon in the toolbar"] })] })] }));
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=Page.js.map
|
package/dist/stories/Page.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../src/stories/Page.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,YAAY,CAAC;AAMpB,MAAM,CAAC,MAAM,IAAI,GAA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C,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: import("react").FC<{}>;
|
|
5
|
-
parameters: {
|
|
6
|
-
layout: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export default meta;
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
export declare const LoggedOut: Story;
|
|
12
|
-
export declare const LoggedIn: Story;
|
|
13
|
-
//# sourceMappingURL=Page.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Page.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Page.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,QAAA,MAAM,IAAI;;;;;;CAOmB,CAAC;AAE9B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,SAAS,EAAE,KAAU,CAAC;AAGnC,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
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 { expect, userEvent, within } from '@storybook/test';
|
|
11
|
-
import { Page } from './Page';
|
|
12
|
-
const meta = {
|
|
13
|
-
title: 'Example/Page',
|
|
14
|
-
component: Page,
|
|
15
|
-
parameters: {
|
|
16
|
-
layout: 'fullscreen',
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
export default meta;
|
|
20
|
-
export const LoggedOut = {};
|
|
21
|
-
export const LoggedIn = {
|
|
22
|
-
play: (_a) => __awaiter(void 0, [_a], void 0, function* ({ canvasElement }) {
|
|
23
|
-
const canvas = within(canvasElement);
|
|
24
|
-
const loginButton = canvas.getByRole('button', { name: /Log in/i });
|
|
25
|
-
yield expect(loginButton).toBeInTheDocument();
|
|
26
|
-
yield userEvent.click(loginButton);
|
|
27
|
-
yield expect(loginButton).not.toBeInTheDocument();
|
|
28
|
-
const logoutButton = canvas.getByRole('button', { name: /Log out/i });
|
|
29
|
-
yield expect(logoutButton).toBeInTheDocument();
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=Page.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Page.stories.js","sourceRoot":"","sources":["../../src/stories/Page.stories.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QAEV,MAAM,EAAE,YAAY;KACrB;CAC0B,CAAC;AAE9B,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,SAAS,GAAU,EAAE,CAAC;AAGnC,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,KAA0B,EAAE,4CAArB,EAAE,aAAa,EAAE;QAC5B,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;QACrC,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;QACpE,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC,iBAAiB,EAAE,CAAC;QAC9C,MAAM,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACnC,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;QAElD,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;QACtE,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACjD,CAAC,CAAA;CACF,CAAC"}
|