react-minolith 0.0.5 → 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.
- package/LICENSE +1 -0
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Header.css +1 -1
- package/dist/assets/Heading.css +1 -0
- package/dist/assets/Nav.css +1 -1
- package/dist/common/models/AnimationCssVariable.d.ts +10 -0
- package/dist/common/models/AnimationCssVariable.d.ts.map +1 -0
- package/dist/common/models/AnimationCssVariable.js +2 -0
- package/dist/common/models/AnimationCssVariable.js.map +1 -0
- package/dist/common/models/BorderCssVariable.d.ts +11 -0
- package/dist/common/models/BorderCssVariable.d.ts.map +1 -0
- package/dist/common/models/BorderCssVariable.js +2 -0
- package/dist/common/models/BorderCssVariable.js.map +1 -0
- package/dist/common/models/MinolithCssVariable.d.ts +6 -0
- package/dist/common/models/MinolithCssVariable.d.ts.map +1 -1
- package/dist/common/models/MiscellaneousCssVariable.d.ts +7 -0
- package/dist/common/models/MiscellaneousCssVariable.d.ts.map +1 -0
- package/dist/common/models/MiscellaneousCssVariable.js +2 -0
- package/dist/common/models/MiscellaneousCssVariable.js.map +1 -0
- package/dist/common/models/Oklch.d.ts +2 -3
- package/dist/common/models/Oklch.d.ts.map +1 -1
- package/dist/common/models/TypographyCssVariable.d.ts +6 -0
- package/dist/common/models/TypographyCssVariable.d.ts.map +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/Heading/Heading.d.ts +3 -0
- package/dist/components/Heading/Heading.d.ts.map +1 -0
- package/dist/components/Heading/Heading.js +35 -0
- package/dist/components/Heading/Heading.js.map +1 -0
- package/dist/components/Heading/Heading.stories.d.ts +17 -0
- package/dist/components/Heading/Heading.stories.d.ts.map +1 -0
- package/dist/components/Heading/HeadingProps.d.ts +6 -0
- package/dist/components/Heading/HeadingProps.d.ts.map +1 -0
- package/dist/components/Heading/HeadingProps.js +2 -0
- package/dist/components/Heading/HeadingProps.js.map +1 -0
- package/dist/components/Heading/index.d.ts +3 -0
- package/dist/components/Heading/index.d.ts.map +1 -0
- package/dist/components/Heading/index.js +5 -0
- package/dist/components/Heading/index.js.map +1 -0
- package/dist/components/Nav/Nav.js +41 -41
- package/dist/components/Nav/NavAccordion.js +41 -41
- package/dist/components/Nav/NavAccordion.js.map +1 -1
- package/dist/components/Nav/NavAccordionProps.d.ts +13 -13
- package/dist/components/Nav/NavAccordionProps.d.ts.map +1 -1
- package/dist/components/Nav/NavBrand.js +42 -42
- package/dist/components/Nav/NavBrandCenter.js +42 -42
- package/dist/components/Nav/NavBrandLeft.js +42 -42
- package/dist/components/Nav/NavBrandRight.js +42 -42
- package/dist/components/Nav/NavMenu.js +41 -41
- package/dist/components/Nav/NavMenuItem.js +40 -40
- package/dist/components/Nav/NavStatic.js +41 -41
- package/dist/components/Nav/NavStatic.js.map +1 -1
- package/dist/components/Nav/NavStaticProps.d.ts +13 -13
- package/dist/components/Nav/NavStaticProps.d.ts.map +1 -1
- package/dist/layouts/Columns/Column.js +22 -22
- package/dist/layouts/Columns/Column.js.map +1 -1
- package/dist/layouts/Columns/ColumnProps.d.ts +13 -13
- package/dist/layouts/Columns/ColumnProps.d.ts.map +1 -1
- package/dist/layouts/Columns/Columns.js +46 -46
- package/dist/layouts/Columns/Columns.js.map +1 -1
- package/dist/layouts/Columns/Columns.stories.d.ts +2 -2
- package/dist/layouts/Columns/Columns.stories.d.ts.map +1 -1
- package/dist/layouts/Columns/ColumnsProps.d.ts +52 -52
- package/dist/layouts/Columns/ColumnsProps.d.ts.map +1 -1
- package/dist/react-minolith.d.ts +1 -0
- package/dist/react-minolith.d.ts.map +1 -1
- package/dist/react-minolith.js +58 -56
- package/dist/react-minolith.js.map +1 -1
- package/dist/utilities/minolithStyleUtility/minolithStyleUtility.d.ts.map +1 -1
- package/dist/utilities/minolithStyleUtility/minolithStyleUtility.js +252 -239
- package/dist/utilities/minolithStyleUtility/minolithStyleUtility.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/Button2.css +0 -1
- package/dist/assets/Header2.css +0 -1
- package/dist/assets/Page.css +0 -1
- package/dist/index-BuUAQmqD.js +0 -21838
- package/dist/index-BuUAQmqD.js.map +0 -1
- package/dist/stories/Button.d.ts +0 -15
- package/dist/stories/Button.d.ts.map +0 -1
- package/dist/stories/Button.js +0 -24
- 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 -45
- package/dist/stories/Button.stories.js.map +0 -1
- package/dist/stories/Header.d.ts +0 -12
- package/dist/stories/Header.d.ts.map +0 -1
- package/dist/stories/Header.js +0 -45
- 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 -29
- package/dist/stories/Header.stories.js.map +0 -1
- package/dist/stories/Page.d.ts +0 -3
- package/dist/stories/Page.d.ts.map +0 -1
- package/dist/stories/Page.js +0 -59
- 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 -23
- package/dist/stories/Page.stories.js.map +0 -1
package/dist/stories/Button.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface ButtonProps {
|
|
2
|
-
/** Is this the principal call to action on the page? */
|
|
3
|
-
primary?: boolean;
|
|
4
|
-
/** What background color to use */
|
|
5
|
-
backgroundColor?: string;
|
|
6
|
-
/** How large should the button be? */
|
|
7
|
-
size?: 'small' | 'medium' | 'large';
|
|
8
|
-
/** Button contents */
|
|
9
|
-
label: string;
|
|
10
|
-
/** Optional click handler */
|
|
11
|
-
onClick?: () => void;
|
|
12
|
-
}
|
|
13
|
-
/** Primary UI component for user interaction */
|
|
14
|
-
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
//# 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;IAC1B,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mCAAmC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sCAAsC;IACtC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,gDAAgD;AAChD,eAAO,MAAM,MAAM,wDAMhB,WAAW,4CAYb,CAAC"}
|
package/dist/stories/Button.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import '../assets/Button.css';const y = ({
|
|
3
|
-
primary: o = !1,
|
|
4
|
-
size: t = "medium",
|
|
5
|
-
backgroundColor: n,
|
|
6
|
-
label: r,
|
|
7
|
-
...s
|
|
8
|
-
}) => {
|
|
9
|
-
const b = o ? "storybook-button--primary" : "storybook-button--secondary";
|
|
10
|
-
return /* @__PURE__ */ e(
|
|
11
|
-
"button",
|
|
12
|
-
{
|
|
13
|
-
type: "button",
|
|
14
|
-
className: ["storybook-button", `storybook-button--${t}`, b].join(" "),
|
|
15
|
-
style: { backgroundColor: n },
|
|
16
|
-
...s,
|
|
17
|
-
children: r
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
y as Button
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../src/stories/Button.tsx"],"sourcesContent":["import React from 'react';\n\nimport './button.css';\n\nexport interface ButtonProps {\n /** Is this the principal call to action on the page? */\n primary?: boolean;\n /** What background color to use */\n backgroundColor?: string;\n /** How large should the button be? */\n size?: 'small' | 'medium' | 'large';\n /** Button contents */\n label: string;\n /** Optional click handler */\n onClick?: () => void;\n}\n\n/** Primary UI component for user interaction */\nexport const Button = ({\n primary = false,\n size = 'medium',\n backgroundColor,\n label,\n ...props\n}: ButtonProps) => {\n const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';\n return (\n <button\n type=\"button\"\n className={['storybook-button', `storybook-button--${size}`, mode].join(' ')}\n style={{ backgroundColor }}\n {...props}\n >\n {label}\n </button>\n );\n};\n"],"names":["Button","primary","size","backgroundColor","label","props","mode","jsx"],"mappings":";AAkBO,MAAMA,IAAS,CAAC;AAAA,EACrB,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,iBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAAmB;AACX,QAAAC,IAAOL,IAAU,8BAA8B;AAEnD,SAAA,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAW,CAAC,oBAAoB,qBAAqBL,CAAI,IAAII,CAAI,EAAE,KAAK,GAAG;AAAA,MAC3E,OAAO,EAAE,iBAAAH,EAAgB;AAAA,MACxB,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EACH;AAEJ;"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { 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,45 +0,0 @@
|
|
|
1
|
-
import { f as t } from "../index-BuUAQmqD.js";
|
|
2
|
-
import { Button as o } from "./Button.js";
|
|
3
|
-
const e = {
|
|
4
|
-
title: "Example/Button",
|
|
5
|
-
component: o,
|
|
6
|
-
parameters: {
|
|
7
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
|
8
|
-
layout: "centered"
|
|
9
|
-
},
|
|
10
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
11
|
-
tags: ["autodocs"],
|
|
12
|
-
// More on argTypes: https://storybook.js.org/docs/api/argtypes
|
|
13
|
-
argTypes: {
|
|
14
|
-
backgroundColor: { control: "color" }
|
|
15
|
-
},
|
|
16
|
-
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
|
|
17
|
-
args: { onClick: t() }
|
|
18
|
-
}, l = {
|
|
19
|
-
args: {
|
|
20
|
-
primary: !0,
|
|
21
|
-
label: "Button"
|
|
22
|
-
}
|
|
23
|
-
}, n = {
|
|
24
|
-
args: {
|
|
25
|
-
label: "Button"
|
|
26
|
-
}
|
|
27
|
-
}, s = {
|
|
28
|
-
args: {
|
|
29
|
-
size: "large",
|
|
30
|
-
label: "Button"
|
|
31
|
-
}
|
|
32
|
-
}, c = {
|
|
33
|
-
args: {
|
|
34
|
-
size: "small",
|
|
35
|
-
label: "Button"
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
export {
|
|
39
|
-
s as Large,
|
|
40
|
-
l as Primary,
|
|
41
|
-
n as Secondary,
|
|
42
|
-
c as Small,
|
|
43
|
-
e as default
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=Button.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.js","sources":["../../src/stories/Button.stories.ts"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react';\nimport { fn } from '@storybook/test';\n\nimport { Button } from './Button';\n\n// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export\nconst meta = {\n title: 'Example/Button',\n component: Button,\n parameters: {\n // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout\n layout: 'centered',\n },\n // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs\n tags: ['autodocs'],\n // More on argTypes: https://storybook.js.org/docs/api/argtypes\n argTypes: {\n backgroundColor: { control: 'color' },\n },\n // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args\n args: { onClick: fn() },\n} satisfies Meta<typeof Button>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\n// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args\nexport const Primary: Story = {\n args: {\n primary: true,\n label: 'Button',\n },\n};\n\nexport const Secondary: Story = {\n args: {\n label: 'Button',\n },\n};\n\nexport const Large: Story = {\n args: {\n size: 'large',\n label: 'Button',\n },\n};\n\nexport const Small: Story = {\n args: {\n size: 'small',\n label: 'Button',\n },\n};\n"],"names":["meta","Button","fn","Primary","Secondary","Large","Small"],"mappings":";;AAMA,MAAMA,IAAO;AAAA,EACX,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA;AAAA,IAEV,QAAQ;AAAA,EACV;AAAA;AAAA,EAEA,MAAM,CAAC,UAAU;AAAA;AAAA,EAEjB,UAAU;AAAA,IACR,iBAAiB,EAAE,SAAS,QAAQ;AAAA,EACtC;AAAA;AAAA,EAEA,MAAM,EAAE,SAASC,EAAK,EAAA;AACxB,GAMaC,IAAiB;AAAA,EAC5B,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,OAAO;AAAA,EAAA;AAEX,GAEaC,IAAmB;AAAA,EAC9B,MAAM;AAAA,IACJ,OAAO;AAAA,EAAA;AAEX,GAEaC,IAAe;AAAA,EAC1B,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAEX,GAEaC,IAAe;AAAA,EAC1B,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAEX;"}
|
package/dist/stories/Header.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type User = {
|
|
2
|
-
name: string;
|
|
3
|
-
};
|
|
4
|
-
export interface HeaderProps {
|
|
5
|
-
user?: User;
|
|
6
|
-
onLogin?: () => void;
|
|
7
|
-
onLogout?: () => void;
|
|
8
|
-
onCreateAccount?: () => void;
|
|
9
|
-
}
|
|
10
|
-
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
12
|
-
//# 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,iDAAkD,WAAW,4CAuC/E,CAAC"}
|
package/dist/stories/Header.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsx as l, jsxs as e, Fragment as r } from "react/jsx-runtime";
|
|
2
|
-
import { Button as i } from "./Button.js";
|
|
3
|
-
import '../assets/Header.css';const s = ({ user: n, onLogin: d, onLogout: a, onCreateAccount: h }) => /* @__PURE__ */ l("header", { children: /* @__PURE__ */ e("div", { className: "storybook-header", children: [
|
|
4
|
-
/* @__PURE__ */ e("div", { children: [
|
|
5
|
-
/* @__PURE__ */ l("svg", { width: "32", height: "32", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("g", { fill: "none", fillRule: "evenodd", children: [
|
|
6
|
-
/* @__PURE__ */ l(
|
|
7
|
-
"path",
|
|
8
|
-
{
|
|
9
|
-
d: "M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z",
|
|
10
|
-
fill: "#FFF"
|
|
11
|
-
}
|
|
12
|
-
),
|
|
13
|
-
/* @__PURE__ */ l(
|
|
14
|
-
"path",
|
|
15
|
-
{
|
|
16
|
-
d: "M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z",
|
|
17
|
-
fill: "#555AB9"
|
|
18
|
-
}
|
|
19
|
-
),
|
|
20
|
-
/* @__PURE__ */ l(
|
|
21
|
-
"path",
|
|
22
|
-
{
|
|
23
|
-
d: "M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z",
|
|
24
|
-
fill: "#91BAF8"
|
|
25
|
-
}
|
|
26
|
-
)
|
|
27
|
-
] }) }),
|
|
28
|
-
/* @__PURE__ */ l("h1", { children: "Acme" })
|
|
29
|
-
] }),
|
|
30
|
-
/* @__PURE__ */ l("div", { children: n ? /* @__PURE__ */ e(r, { children: [
|
|
31
|
-
/* @__PURE__ */ e("span", { className: "welcome", children: [
|
|
32
|
-
"Welcome, ",
|
|
33
|
-
/* @__PURE__ */ l("b", { children: n.name }),
|
|
34
|
-
"!"
|
|
35
|
-
] }),
|
|
36
|
-
/* @__PURE__ */ l(i, { size: "small", onClick: a, label: "Log out" })
|
|
37
|
-
] }) : /* @__PURE__ */ e(r, { children: [
|
|
38
|
-
/* @__PURE__ */ l(i, { size: "small", onClick: d, label: "Log in" }),
|
|
39
|
-
/* @__PURE__ */ l(i, { primary: !0, size: "small", onClick: h, label: "Sign up" })
|
|
40
|
-
] }) })
|
|
41
|
-
] }) });
|
|
42
|
-
export {
|
|
43
|
-
s as Header
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../src/stories/Header.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Button } from './Button';\nimport './header.css';\n\ntype User = {\n name: string;\n};\n\nexport interface HeaderProps {\n user?: User;\n onLogin?: () => void;\n onLogout?: () => void;\n onCreateAccount?: () => void;\n}\n\nexport const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => (\n <header>\n <div className=\"storybook-header\">\n <div>\n <svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\">\n <g fill=\"none\" fillRule=\"evenodd\">\n <path\n d=\"M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z\"\n fill=\"#FFF\"\n />\n <path\n d=\"M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z\"\n fill=\"#555AB9\"\n />\n <path\n d=\"M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z\"\n fill=\"#91BAF8\"\n />\n </g>\n </svg>\n <h1>Acme</h1>\n </div>\n <div>\n {user ? (\n <>\n <span className=\"welcome\">\n Welcome, <b>{user.name}</b>!\n </span>\n <Button size=\"small\" onClick={onLogout} label=\"Log out\" />\n </>\n ) : (\n <>\n <Button size=\"small\" onClick={onLogin} label=\"Log in\" />\n <Button primary size=\"small\" onClick={onCreateAccount} label=\"Sign up\" />\n </>\n )}\n </div>\n </div>\n </header>\n);\n"],"names":["Header","user","onLogin","onLogout","onCreateAccount","jsx","jsxs","Fragment","Button"],"mappings":";;AAgBO,MAAMA,IAAS,CAAC,EAAE,MAAAC,GAAM,SAAAC,GAAS,UAAAC,GAAU,iBAAAC,EAAgB,MAC/D,gBAAAC,EAAA,UAAA,EACC,UAAC,gBAAAC,EAAA,OAAA,EAAI,WAAU,oBACb,UAAA;AAAA,EAAA,gBAAAA,EAAC,OACC,EAAA,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAI,EAAA,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,OAAM,8BACpD,UAAC,gBAAAC,EAAA,KAAA,EAAE,MAAK,QAAO,UAAS,WACtB,UAAA;AAAA,MAAA,gBAAAD;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA,QAAA;AAAA,MACP;AAAA,MACA,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA,QAAA;AAAA,MACP;AAAA,MACA,gBAAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA,QAAA;AAAA,MAAA;AAAA,IACP,EAAA,CACF,EACF,CAAA;AAAA,IACA,gBAAAA,EAAC,QAAG,UAAI,OAAA,CAAA;AAAA,EAAA,GACV;AAAA,EACA,gBAAAA,EAAC,OACE,EAAA,UAAAJ,IAEG,gBAAAK,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAC,gBAAAD,EAAA,QAAA,EAAK,WAAU,WAAU,UAAA;AAAA,MAAA;AAAA,MACf,gBAAAD,EAAC,KAAG,EAAA,UAAAJ,EAAK,KAAK,CAAA;AAAA,MAAI;AAAA,IAAA,GAC7B;AAAA,sBACCO,GAAO,EAAA,MAAK,SAAQ,SAASL,GAAU,OAAM,UAAU,CAAA;AAAA,EAAA,EAAA,CAC1D,IAGE,gBAAAG,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAF,EAACG,KAAO,MAAK,SAAQ,SAASN,GAAS,OAAM,UAAS;AAAA,IACtD,gBAAAG,EAACG,KAAO,SAAO,IAAC,MAAK,SAAQ,SAASJ,GAAiB,OAAM,UAAU,CAAA;AAAA,EAAA,EAAA,CACzE,EAEJ,CAAA;AAAA,EAAA,CACF,EACF,CAAA;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { 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,29 +0,0 @@
|
|
|
1
|
-
import { f as o } from "../index-BuUAQmqD.js";
|
|
2
|
-
import { Header as e } from "./Header.js";
|
|
3
|
-
const n = {
|
|
4
|
-
title: "Example/Header",
|
|
5
|
-
component: e,
|
|
6
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
7
|
-
tags: ["autodocs"],
|
|
8
|
-
parameters: {
|
|
9
|
-
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
10
|
-
layout: "fullscreen"
|
|
11
|
-
},
|
|
12
|
-
args: {
|
|
13
|
-
onLogin: o(),
|
|
14
|
-
onLogout: o(),
|
|
15
|
-
onCreateAccount: o()
|
|
16
|
-
}
|
|
17
|
-
}, r = {
|
|
18
|
-
args: {
|
|
19
|
-
user: {
|
|
20
|
-
name: "Jane Doe"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}, s = {};
|
|
24
|
-
export {
|
|
25
|
-
r as LoggedIn,
|
|
26
|
-
s as LoggedOut,
|
|
27
|
-
n as default
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=Header.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.stories.js","sources":["../../src/stories/Header.stories.ts"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react';\nimport { fn } from '@storybook/test';\n\nimport { Header } from './Header';\n\nconst meta = {\n title: 'Example/Header',\n component: Header,\n // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs\n tags: ['autodocs'],\n parameters: {\n // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout\n layout: 'fullscreen',\n },\n args: {\n onLogin: fn(),\n onLogout: fn(),\n onCreateAccount: fn(),\n },\n} satisfies Meta<typeof Header>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const LoggedIn: Story = {\n args: {\n user: {\n name: 'Jane Doe',\n },\n },\n};\n\nexport const LoggedOut: Story = {};\n"],"names":["meta","Header","fn","LoggedIn","LoggedOut"],"mappings":";;AAKA,MAAMA,IAAO;AAAA,EACX,OAAO;AAAA,EACP,WAAWC;AAAA;AAAA,EAEX,MAAM,CAAC,UAAU;AAAA,EACjB,YAAY;AAAA;AAAA,IAEV,QAAQ;AAAA,EACV;AAAA,EACA,MAAM;AAAA,IACJ,SAASC,EAAG;AAAA,IACZ,UAAUA,EAAG;AAAA,IACb,iBAAiBA,EAAG;AAAA,EAAA;AAExB,GAKaC,IAAkB;AAAA,EAC7B,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAEaC,IAAmB,CAAA;"}
|
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,59 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import n from "react";
|
|
3
|
-
import { Header as a } from "./Header.js";
|
|
4
|
-
import '../assets/Page.css';const c = () => {
|
|
5
|
-
const [r, t] = n.useState();
|
|
6
|
-
return /* @__PURE__ */ o("article", { children: [
|
|
7
|
-
/* @__PURE__ */ e(
|
|
8
|
-
a,
|
|
9
|
-
{
|
|
10
|
-
user: r,
|
|
11
|
-
onLogin: () => t({ name: "Jane Doe" }),
|
|
12
|
-
onLogout: () => t(void 0),
|
|
13
|
-
onCreateAccount: () => t({ name: "Jane Doe" })
|
|
14
|
-
}
|
|
15
|
-
),
|
|
16
|
-
/* @__PURE__ */ o("section", { className: "storybook-page", children: [
|
|
17
|
-
/* @__PURE__ */ e("h2", { children: "Pages in Storybook" }),
|
|
18
|
-
/* @__PURE__ */ o("p", { children: [
|
|
19
|
-
"We recommend building UIs with a",
|
|
20
|
-
" ",
|
|
21
|
-
/* @__PURE__ */ e("a", { href: "https://componentdriven.org", target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ e("strong", { children: "component-driven" }) }),
|
|
22
|
-
" ",
|
|
23
|
-
"process starting with atomic components and ending with pages."
|
|
24
|
-
] }),
|
|
25
|
-
/* @__PURE__ */ e("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:" }),
|
|
26
|
-
/* @__PURE__ */ o("ul", { children: [
|
|
27
|
-
/* @__PURE__ */ e("li", { children: 'Use a higher-level connected component. Storybook helps you compose such data from the "args" of child component stories' }),
|
|
28
|
-
/* @__PURE__ */ e("li", { children: "Assemble data in the page component from your services. You can mock these services out using Storybook." })
|
|
29
|
-
] }),
|
|
30
|
-
/* @__PURE__ */ o("p", { children: [
|
|
31
|
-
"Get a guided tutorial on component-driven development at",
|
|
32
|
-
" ",
|
|
33
|
-
/* @__PURE__ */ e("a", { href: "https://storybook.js.org/tutorials/", target: "_blank", rel: "noopener noreferrer", children: "Storybook tutorials" }),
|
|
34
|
-
". Read more in the",
|
|
35
|
-
" ",
|
|
36
|
-
/* @__PURE__ */ e("a", { href: "https://storybook.js.org/docs", target: "_blank", rel: "noopener noreferrer", children: "docs" }),
|
|
37
|
-
"."
|
|
38
|
-
] }),
|
|
39
|
-
/* @__PURE__ */ o("div", { className: "tip-wrapper", children: [
|
|
40
|
-
/* @__PURE__ */ e("span", { className: "tip", children: "Tip" }),
|
|
41
|
-
" Adjust the width of the canvas with the",
|
|
42
|
-
" ",
|
|
43
|
-
/* @__PURE__ */ e("svg", { width: "10", height: "10", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("g", { fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ e(
|
|
44
|
-
"path",
|
|
45
|
-
{
|
|
46
|
-
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",
|
|
47
|
-
id: "a",
|
|
48
|
-
fill: "#999"
|
|
49
|
-
}
|
|
50
|
-
) }) }),
|
|
51
|
-
"Viewports addon in the toolbar"
|
|
52
|
-
] })
|
|
53
|
-
] })
|
|
54
|
-
] });
|
|
55
|
-
};
|
|
56
|
-
export {
|
|
57
|
-
c as Page
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=Page.js.map
|
package/dist/stories/Page.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","sources":["../../src/stories/Page.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Header } from './Header';\nimport './page.css';\n\ntype User = {\n name: string;\n};\n\nexport const Page: React.FC = () => {\n const [user, setUser] = React.useState<User>();\n\n return (\n <article>\n <Header\n user={user}\n onLogin={() => setUser({ name: 'Jane Doe' })}\n onLogout={() => setUser(undefined)}\n onCreateAccount={() => setUser({ name: 'Jane Doe' })}\n />\n\n <section className=\"storybook-page\">\n <h2>Pages in Storybook</h2>\n <p>\n We recommend building UIs with a{' '}\n <a href=\"https://componentdriven.org\" target=\"_blank\" rel=\"noopener noreferrer\">\n <strong>component-driven</strong>\n </a>{' '}\n process starting with atomic components and ending with pages.\n </p>\n <p>\n Render pages with mock data. This makes it easy to build and review page states without\n needing to navigate to them in your app. Here are some handy patterns for managing page\n data in Storybook:\n </p>\n <ul>\n <li>\n Use a higher-level connected component. Storybook helps you compose such data from the\n \"args\" of child component stories\n </li>\n <li>\n Assemble data in the page component from your services. You can mock these services out\n using Storybook.\n </li>\n </ul>\n <p>\n Get a guided tutorial on component-driven development at{' '}\n <a href=\"https://storybook.js.org/tutorials/\" target=\"_blank\" rel=\"noopener noreferrer\">\n Storybook tutorials\n </a>\n . Read more in the{' '}\n <a href=\"https://storybook.js.org/docs\" target=\"_blank\" rel=\"noopener noreferrer\">\n docs\n </a>\n .\n </p>\n <div className=\"tip-wrapper\">\n <span className=\"tip\">Tip</span> Adjust the width of the canvas with the{' '}\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\">\n <g fill=\"none\" fillRule=\"evenodd\">\n <path\n 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\"\n id=\"a\"\n fill=\"#999\"\n />\n </g>\n </svg>\n Viewports addon in the toolbar\n </div>\n </section>\n </article>\n );\n};\n"],"names":["Page","user","setUser","React","jsx","Header","jsxs"],"mappings":";;;AASO,MAAMA,IAAiB,MAAM;AAClC,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAM,SAAe;AAE7C,2BACG,WACC,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAAJ;AAAA,QACA,SAAS,MAAMC,EAAQ,EAAE,MAAM,YAAY;AAAA,QAC3C,UAAU,MAAMA,EAAQ,MAAS;AAAA,QACjC,iBAAiB,MAAMA,EAAQ,EAAE,MAAM,WAAY,CAAA;AAAA,MAAA;AAAA,IACrD;AAAA,IAEA,gBAAAI,EAAC,WAAQ,EAAA,WAAU,kBACjB,UAAA;AAAA,MAAA,gBAAAF,EAAC,QAAG,UAAkB,qBAAA,CAAA;AAAA,wBACrB,KAAE,EAAA,UAAA;AAAA,QAAA;AAAA,QACgC;AAAA,QACjC,gBAAAA,EAAC,KAAE,EAAA,MAAK,+BAA8B,QAAO,UAAS,KAAI,uBACxD,UAAA,gBAAAA,EAAC,UAAO,EAAA,UAAA,mBAAgB,CAAA,GAC1B;AAAA,QAAK;AAAA,QAAI;AAAA,MAAA,GAEX;AAAA,MACA,gBAAAA,EAAC,OAAE,UAIH,qMAAA,CAAA;AAAA,wBACC,MACC,EAAA,UAAA;AAAA,QAAA,gBAAAA,EAAC,QAAG,UAGJ,2HAAA,CAAA;AAAA,QACA,gBAAAA,EAAC,QAAG,UAGJ,2GAAA,CAAA;AAAA,MAAA,GACF;AAAA,wBACC,KAAE,EAAA,UAAA;AAAA,QAAA;AAAA,QACwD;AAAA,QACzD,gBAAAA,EAAC,OAAE,MAAK,uCAAsC,QAAO,UAAS,KAAI,uBAAsB,UAExF,sBAAA,CAAA;AAAA,QAAI;AAAA,QACe;AAAA,QACnB,gBAAAA,EAAC,OAAE,MAAK,iCAAgC,QAAO,UAAS,KAAI,uBAAsB,UAElF,OAAA,CAAA;AAAA,QAAI;AAAA,MAAA,GAEN;AAAA,MACA,gBAAAE,EAAC,OAAI,EAAA,WAAU,eACb,UAAA;AAAA,QAAC,gBAAAF,EAAA,QAAA,EAAK,WAAU,OAAM,UAAG,OAAA;AAAA,QAAO;AAAA,QAAyC;AAAA,QACxE,gBAAAA,EAAA,OAAA,EAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,OAAM,8BACpD,UAAC,gBAAAA,EAAA,KAAA,EAAE,MAAK,QAAO,UAAS,WACtB,UAAA,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,GAAE;AAAA,YACF,IAAG;AAAA,YACH,MAAK;AAAA,UAAA;AAAA,WAET,EACF,CAAA;AAAA,QAAM;AAAA,MAAA,EAER,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { 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,23 +0,0 @@
|
|
|
1
|
-
import { w as c, e as o, u as s } from "../index-BuUAQmqD.js";
|
|
2
|
-
import { Page as u } from "./Page.js";
|
|
3
|
-
const g = {
|
|
4
|
-
title: "Example/Page",
|
|
5
|
-
component: u,
|
|
6
|
-
parameters: {
|
|
7
|
-
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
8
|
-
layout: "fullscreen"
|
|
9
|
-
}
|
|
10
|
-
}, l = {}, r = {
|
|
11
|
-
play: async ({ canvasElement: n }) => {
|
|
12
|
-
const e = c(n), t = e.getByRole("button", { name: /Log in/i });
|
|
13
|
-
await o(t).toBeInTheDocument(), await s.click(t), await o(t).not.toBeInTheDocument();
|
|
14
|
-
const a = e.getByRole("button", { name: /Log out/i });
|
|
15
|
-
await o(a).toBeInTheDocument();
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
r as LoggedIn,
|
|
20
|
-
l as LoggedOut,
|
|
21
|
-
g as default
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=Page.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Page.stories.js","sources":["../../src/stories/Page.stories.ts"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react';\nimport { expect, userEvent, within } from '@storybook/test';\n\nimport { Page } from './Page';\n\nconst meta = {\n title: 'Example/Page',\n component: Page,\n parameters: {\n // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout\n layout: 'fullscreen',\n },\n} satisfies Meta<typeof Page>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const LoggedOut: Story = {};\n\n// More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing\nexport const LoggedIn: Story = {\n play: async ({ canvasElement }) => {\n const canvas = within(canvasElement);\n const loginButton = canvas.getByRole('button', { name: /Log in/i });\n await expect(loginButton).toBeInTheDocument();\n await userEvent.click(loginButton);\n await expect(loginButton).not.toBeInTheDocument();\n\n const logoutButton = canvas.getByRole('button', { name: /Log out/i });\n await expect(logoutButton).toBeInTheDocument();\n },\n};\n"],"names":["meta","Page","LoggedOut","LoggedIn","canvasElement","canvas","within","loginButton","expect","userEvent","logoutButton"],"mappings":";;AAKA,MAAMA,IAAO;AAAA,EACX,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,YAAY;AAAA;AAAA,IAEV,QAAQ;AAAA,EAAA;AAEZ,GAKaC,IAAmB,CAAA,GAGnBC,IAAkB;AAAA,EAC7B,MAAM,OAAO,EAAE,eAAAC,QAAoB;AAC3B,UAAAC,IAASC,EAAOF,CAAa,GAC7BG,IAAcF,EAAO,UAAU,UAAU,EAAE,MAAM,WAAW;AAC5D,UAAAG,EAAOD,CAAW,EAAE,kBAAkB,GACtC,MAAAE,EAAU,MAAMF,CAAW,GACjC,MAAMC,EAAOD,CAAW,EAAE,IAAI,kBAAkB;AAEhD,UAAMG,IAAeL,EAAO,UAAU,UAAU,EAAE,MAAM,YAAY;AAC9D,UAAAG,EAAOE,CAAY,EAAE,kBAAkB;AAAA,EAAA;AAEjD;"}
|