@hlf-fe/pulmo-ui 1.0.0

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.
Files changed (44) hide show
  1. package/README.md +54 -0
  2. package/dist/App.d.ts +3 -0
  3. package/dist/App.js +10 -0
  4. package/dist/components/buttons/button/button.d.ts +25 -0
  5. package/dist/components/buttons/button/button.js +80 -0
  6. package/dist/components/buttons/button/button.stories.d.ts +9 -0
  7. package/dist/components/buttons/button/button.stories.js +30 -0
  8. package/dist/hoc/withDefaultTheme.d.ts +1 -0
  9. package/dist/hoc/withDefaultTheme.js +12 -0
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.js +3 -0
  12. package/dist/main.d.ts +1 -0
  13. package/dist/main.js +6 -0
  14. package/dist/stories/Button.d.ts +14 -0
  15. package/dist/stories/Button.js +20 -0
  16. package/dist/stories/Button.stories.d.ts +23 -0
  17. package/dist/stories/Button.stories.js +44 -0
  18. package/dist/stories/Header.d.ts +12 -0
  19. package/dist/stories/Header.js +4 -0
  20. package/dist/stories/Header.stories.d.ts +18 -0
  21. package/dist/stories/Header.stories.js +26 -0
  22. package/dist/stories/Page.d.ts +3 -0
  23. package/dist/stories/Page.js +7 -0
  24. package/dist/stories/Page.stories.d.ts +12 -0
  25. package/dist/stories/Page.stories.js +24 -0
  26. package/dist/styles/mixins.d.ts +50 -0
  27. package/dist/styles/mixins.js +353 -0
  28. package/dist/styles/styles/mixins/theme-mixins.d.ts +5 -0
  29. package/dist/styles/styles/mixins/theme-mixins.js +37 -0
  30. package/dist/styles/styles/mixins/units.d.ts +3 -0
  31. package/dist/styles/styles/mixins/units.js +3 -0
  32. package/dist/styles/styles/mixins.d.ts +48 -0
  33. package/dist/styles/styles/mixins.js +336 -0
  34. package/dist/styles/styles/theme.d.ts +135 -0
  35. package/dist/styles/styles/theme.js +77 -0
  36. package/dist/styles/theme.d.ts +135 -0
  37. package/dist/styles/theme.js +84 -0
  38. package/dist/styles/types.d.ts +3 -0
  39. package/dist/styles/types.js +1 -0
  40. package/dist/styles/units.d.ts +3 -0
  41. package/dist/styles/units.js +3 -0
  42. package/dist/styles/withDefaultTheme.d.ts +1 -0
  43. package/dist/styles/withDefaultTheme.js +12 -0
  44. package/package.json +67 -0
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## Expanding the ESLint configuration
11
+
12
+ If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13
+
14
+ ```js
15
+ export default tseslint.config({
16
+ extends: [
17
+ // Remove ...tseslint.configs.recommended and replace with this
18
+ ...tseslint.configs.recommendedTypeChecked,
19
+ // Alternatively, use this for stricter rules
20
+ ...tseslint.configs.strictTypeChecked,
21
+ // Optionally, add this for stylistic rules
22
+ ...tseslint.configs.stylisticTypeChecked,
23
+ ],
24
+ languageOptions: {
25
+ // other options...
26
+ parserOptions: {
27
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
28
+ tsconfigRootDir: import.meta.dirname,
29
+ },
30
+ },
31
+ })
32
+ ```
33
+
34
+ You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
35
+
36
+ ```js
37
+ // eslint.config.js
38
+ import reactX from 'eslint-plugin-react-x'
39
+ import reactDom from 'eslint-plugin-react-dom'
40
+
41
+ export default tseslint.config({
42
+ plugins: {
43
+ // Add the react-x and react-dom plugins
44
+ 'react-x': reactX,
45
+ 'react-dom': reactDom,
46
+ },
47
+ rules: {
48
+ // other rules...
49
+ // Enable its recommended typescript rules
50
+ ...reactX.configs['recommended-typescript'].rules,
51
+ ...reactDom.configs.recommended.rules,
52
+ },
53
+ })
54
+ ```
package/dist/App.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import './App.css';
2
+ declare function App(): import("react/jsx-runtime").JSX.Element;
3
+ export default App;
package/dist/App.js ADDED
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import reactLogo from './assets/react.svg';
4
+ import viteLogo from '/vite.svg';
5
+ import './App.css';
6
+ function App() {
7
+ const [count, setCount] = useState(0);
8
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("a", { href: "https://vite.dev", target: "_blank", children: _jsx("img", { src: viteLogo, className: "logo", alt: "Vite logo" }) }), _jsx("a", { href: "https://react.dev", target: "_blank", children: _jsx("img", { src: reactLogo, className: "logo react", alt: "React logo" }) })] }), _jsx("h1", { children: "Vite + React" }), _jsxs("div", { className: "card", children: [_jsxs("button", { onClick: () => setCount((count) => count + 1), children: ["count is ", count] }), _jsxs("p", { children: ["Edit ", _jsx("code", { children: "src/App.tsx" }), " and save to test HMR"] })] }), _jsx("p", { className: "read-the-docs", children: "Click on the Vite and React logos to learn more" })] }));
9
+ }
10
+ export default App;
@@ -0,0 +1,25 @@
1
+ import { ReactNode } from "react";
2
+ export type ButtonProps = {
3
+ type?: "button" | "reset" | "submit";
4
+ icon?: ReactNode;
5
+ className?: string;
6
+ inverted?: boolean;
7
+ disabled?: boolean;
8
+ onClick?: () => void;
9
+ btnSize?: "s" | "m" | "l";
10
+ fullWidth?: boolean;
11
+ fullWidthMobile?: boolean;
12
+ dataTest?: string;
13
+ tabIndex?: number;
14
+ to?: string;
15
+ href?: string;
16
+ target?: "_blank" | "_self" | "_parent" | "_top";
17
+ children: ReactNode;
18
+ };
19
+ export type StyledButtonProps = {
20
+ inverted?: boolean;
21
+ btnSize?: "s" | "m" | "l";
22
+ fullWidthMobile?: boolean;
23
+ fullWidth?: boolean;
24
+ };
25
+ export declare const Button: ({ type, onClick, className, inverted, disabled, btnSize, fullWidth, fullWidthMobile, dataTest, tabIndex, children, to, href, target, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,80 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import styled, { css } from "styled-components";
3
+ import { media, buttonSize } from "../../../styles/mixins";
4
+ import { rem } from "../../../styles/units";
5
+ import { Link } from "gatsby";
6
+ export const Button = ({ type = "submit", onClick, className = "", inverted = false, disabled = false, btnSize = "m", fullWidth, fullWidthMobile, dataTest, tabIndex, children, to, href, target, }) => {
7
+ const commonProps = {
8
+ className,
9
+ onClick,
10
+ inverted,
11
+ btnSize,
12
+ fullWidth,
13
+ fullWidthMobile,
14
+ "data-test": dataTest,
15
+ tabIndex,
16
+ };
17
+ const asElement = to ? Link : href ? "a" : "button";
18
+ return (_jsx(StyledButton, { as: asElement, ...commonProps, ...(to ? { to } : {}), ...(href
19
+ ? {
20
+ href,
21
+ target,
22
+ rel: target === "_blank" ? "noopener noreferrer" : undefined,
23
+ }
24
+ : {}), ...(!to && !href ? { type, disabled } : {}), children: children }));
25
+ };
26
+ const StyledButton = styled.button `
27
+ display: flex;
28
+ justify-content: center;
29
+ align-items: center;
30
+ gap: ${rem(10)};
31
+ font-family: ${({ theme }) => theme.valueBold};
32
+ font-weight: 400;
33
+ text-decoration: none;
34
+ color: ${({ theme, inverted }) => (inverted ? theme.red : theme.white)};
35
+ width: ${({ fullWidthMobile }) => (fullWidthMobile ? "100%" : "fit-content")};
36
+ background-color: ${({ theme, inverted }) => inverted ? theme.white : theme.red};
37
+ line-height: 2.5;
38
+ border-radius: ${rem(5)};
39
+ border-color: ${({ theme, inverted }) => inverted ? theme.red : "transparent"};
40
+ transition: background-color 0.3s ease-out;
41
+ border-style: solid;
42
+
43
+ &:disabled {
44
+ cursor: default;
45
+ opacity: 0.6;
46
+ }
47
+
48
+ ${({ btnSize }) => {
49
+ switch (btnSize) {
50
+ case "s":
51
+ return buttonSize.S;
52
+ case "m":
53
+ return buttonSize.M;
54
+ case "l":
55
+ return buttonSize.L;
56
+ default:
57
+ return buttonSize.M;
58
+ }
59
+ }}
60
+
61
+ ${({ theme, inverted, fullWidth }) => css `
62
+ ${media.M `
63
+ width: ${fullWidth ? "100%" : "fit-content"};
64
+ `}
65
+
66
+ &:not(:disabled) {
67
+ ${media.L `
68
+ &:hover, :active, :focus-visible {
69
+ background-color: ${inverted ? theme.red : theme.redHover};
70
+ color: ${theme.white};
71
+ }
72
+
73
+ &:focus-visible {
74
+ outline: ${rem(2)} solid ${theme.blackLight};
75
+ outline-offset: ${rem(2)};
76
+ }
77
+ `};
78
+ }
79
+ `};
80
+ `;
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Button } from "./button";
3
+ declare const meta: Meta<typeof Button>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Button>;
6
+ export declare const Default: Story;
7
+ export declare const Small: Story;
8
+ export declare const Medium: Story;
9
+ export declare const Large: Story;
@@ -0,0 +1,30 @@
1
+ import { Button } from "./button";
2
+ const meta = {
3
+ title: "Components/Button",
4
+ component: Button,
5
+ };
6
+ export default meta;
7
+ export const Default = {
8
+ args: {
9
+ inverted: false,
10
+ children: "Button Text",
11
+ },
12
+ };
13
+ export const Small = {
14
+ args: {
15
+ btnSize: "s",
16
+ children: "Button Text",
17
+ },
18
+ };
19
+ export const Medium = {
20
+ args: {
21
+ btnSize: "m",
22
+ children: "Button Text",
23
+ },
24
+ };
25
+ export const Large = {
26
+ args: {
27
+ btnSize: "l",
28
+ children: "Button Text",
29
+ },
30
+ };
@@ -0,0 +1 @@
1
+ export declare function withDefaultTheme<T extends object>(Component: React.ComponentType<T>): React.FC<T>;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContext } from "react";
3
+ import { THEME_SETTINGS } from "../styles/theme";
4
+ import { ThemeContext, ThemeProvider } from "styled-components";
5
+ export function withDefaultTheme(Component) {
6
+ return function Wrapped(props) {
7
+ const theme = useContext(ThemeContext);
8
+ if (theme)
9
+ return _jsx(Component, { ...props });
10
+ return (_jsx(ThemeProvider, { theme: THEME_SETTINGS, children: _jsx(Component, { ...props }) }));
11
+ };
12
+ }
@@ -0,0 +1,3 @@
1
+ import { ButtonProps } from "./components/buttons/button/button";
2
+ export type { ButtonProps } from "./components/buttons/button/button";
3
+ export declare const Button: import("react").FC<ButtonProps>;
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import { withDefaultTheme } from "./hoc/withDefaultTheme";
2
+ import { Button as RawButton, } from "./components/buttons/button/button";
3
+ export const Button = withDefaultTheme(RawButton);
package/dist/main.d.ts ADDED
@@ -0,0 +1 @@
1
+ import "./index.css";
package/dist/main.js ADDED
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { StrictMode } from "react";
3
+ import { createRoot } from "react-dom/client";
4
+ import "./index.css";
5
+ import App from "./App";
6
+ createRoot(document.getElementById("root")).render(_jsx(StrictMode, { children: _jsx(App, {}) }));
@@ -0,0 +1,14 @@
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;
@@ -0,0 +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 { jsx as _jsx } from "react/jsx-runtime";
13
+ /** Primary UI component for user interaction */
14
+ export const Button = (_a) => {
15
+ var { primary = false, size = "medium", backgroundColor = "purple", label } = _a, props = __rest(_a, ["primary", "size", "backgroundColor", "label"]);
16
+ const mode = primary
17
+ ? "storybook-button--primary"
18
+ : "storybook-button--secondary";
19
+ return (_jsx("button", Object.assign({ type: "button", className: ["storybook-button", `storybook-button--${size}`, mode].join(" "), style: { backgroundColor } }, props, { children: label })));
20
+ };
@@ -0,0 +1,23 @@
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;
@@ -0,0 +1,44 @@
1
+ import { fn } from '@storybook/test';
2
+ import { Button } from './Button';
3
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
4
+ const meta = {
5
+ title: 'Example/Button',
6
+ component: Button,
7
+ parameters: {
8
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
9
+ layout: 'centered',
10
+ },
11
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
12
+ tags: ['autodocs'],
13
+ // More on argTypes: https://storybook.js.org/docs/api/argtypes
14
+ argTypes: {
15
+ backgroundColor: { control: 'color' },
16
+ },
17
+ // 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
18
+ args: { onClick: fn() },
19
+ };
20
+ export default meta;
21
+ // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
22
+ export const Primary = {
23
+ args: {
24
+ primary: true,
25
+ label: 'Button',
26
+ },
27
+ };
28
+ export const Secondary = {
29
+ args: {
30
+ label: 'Button',
31
+ },
32
+ };
33
+ export const Large = {
34
+ args: {
35
+ size: 'large',
36
+ label: 'Button',
37
+ },
38
+ };
39
+ export const Small = {
40
+ args: {
41
+ size: 'small',
42
+ label: 'Button',
43
+ },
44
+ };
@@ -0,0 +1,12 @@
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 {};
@@ -0,0 +1,4 @@
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" })] })) })] }) }));
@@ -0,0 +1,18 @@
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;
@@ -0,0 +1,26 @@
1
+ import { fn } from '@storybook/test';
2
+ import { Header } from './Header';
3
+ const meta = {
4
+ title: 'Example/Header',
5
+ component: Header,
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: fn(),
14
+ onLogout: fn(),
15
+ onCreateAccount: fn(),
16
+ },
17
+ };
18
+ export default meta;
19
+ export const LoggedIn = {
20
+ args: {
21
+ user: {
22
+ name: 'Jane Doe',
23
+ },
24
+ },
25
+ };
26
+ export const LoggedOut = {};
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import "./page.css";
3
+ export declare const Page: React.FC;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import "./page.css";
4
+ export const Page = () => {
5
+ const [user, setUser] = React.useState();
6
+ 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"] })] })] }));
7
+ };
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1,24 @@
1
+ import { expect, userEvent, within } from '@storybook/test';
2
+ import { Page } from './Page';
3
+ const meta = {
4
+ title: 'Example/Page',
5
+ component: Page,
6
+ parameters: {
7
+ // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
8
+ layout: 'fullscreen',
9
+ },
10
+ };
11
+ export default meta;
12
+ export const LoggedOut = {};
13
+ // More on component testing: https://storybook.js.org/docs/writing-tests/component-testing
14
+ export const LoggedIn = {
15
+ play: async ({ canvasElement }) => {
16
+ const canvas = within(canvasElement);
17
+ const loginButton = canvas.getByRole('button', { name: /Log in/i });
18
+ await expect(loginButton).toBeInTheDocument();
19
+ await userEvent.click(loginButton);
20
+ await expect(loginButton).not.toBeInTheDocument();
21
+ const logoutButton = canvas.getByRole('button', { name: /Log out/i });
22
+ await expect(logoutButton).toBeInTheDocument();
23
+ },
24
+ };
@@ -0,0 +1,50 @@
1
+ import { css } from "styled-components";
2
+ export type Arrow = {
3
+ color?: string;
4
+ };
5
+ export declare const media: {
6
+ XS: (styles: import("styled-components/dist/types").Styles<object>, ...interpolations: import("styled-components").Interpolation<object>[]) => import("styled-components").RuleSet<object>;
7
+ S: (styles: import("styled-components/dist/types").Styles<object>, ...interpolations: import("styled-components").Interpolation<object>[]) => import("styled-components").RuleSet<object>;
8
+ S_ALT: (styles: import("styled-components/dist/types").Styles<object>, ...interpolations: import("styled-components").Interpolation<object>[]) => import("styled-components").RuleSet<object>;
9
+ M: (styles: import("styled-components/dist/types").Styles<object>, ...interpolations: import("styled-components").Interpolation<object>[]) => import("styled-components").RuleSet<object>;
10
+ L: (styles: import("styled-components/dist/types").Styles<object>, ...interpolations: import("styled-components").Interpolation<object>[]) => import("styled-components").RuleSet<object>;
11
+ XL: (styles: import("styled-components/dist/types").Styles<object>, ...interpolations: import("styled-components").Interpolation<object>[]) => import("styled-components").RuleSet<object>;
12
+ XXL: (styles: import("styled-components/dist/types").Styles<object>, ...interpolations: import("styled-components").Interpolation<object>[]) => import("styled-components").RuleSet<object>;
13
+ IOS: (styles: import("styled-components/dist/types").Styles<object>, ...interpolations: import("styled-components").Interpolation<object>[]) => import("styled-components").RuleSet<object>;
14
+ };
15
+ export declare const dynamicFontSize: (minFontSize: number, maxFontSize: number, minScreenWidth?: number, maxScreenWidth?: number) => string;
16
+ export declare const siteWidthRowS: () => import("styled-components").RuleSet<object>;
17
+ export declare const siteWidthRow: () => import("styled-components").RuleSet<object>;
18
+ export declare const siteWidthRowXL: () => import("styled-components").RuleSet<object>;
19
+ export declare const fullWidthRow: () => import("styled-components").RuleSet<object>;
20
+ export declare const fontSize: {
21
+ XS: () => import("styled-components").RuleSet<object>;
22
+ S: () => import("styled-components").RuleSet<object>;
23
+ M: () => import("styled-components").RuleSet<object>;
24
+ L: () => import("styled-components").RuleSet<object>;
25
+ XL: () => import("styled-components").RuleSet<object>;
26
+ XXL: () => import("styled-components").RuleSet<object>;
27
+ };
28
+ export declare const arrow: ({ color }: Arrow) => import("styled-components").RuleSet<object>;
29
+ export declare const buttonSize: {
30
+ S: () => import("styled-components").RuleSet<object>;
31
+ M: () => import("styled-components").RuleSet<object>;
32
+ L: () => import("styled-components").RuleSet<object>;
33
+ };
34
+ export declare const alertTheme: {
35
+ error: () => import("styled-components").RuleSet<object>;
36
+ warning: () => import("styled-components").RuleSet<object>;
37
+ info: () => import("styled-components").RuleSet<object>;
38
+ success: () => import("styled-components").RuleSet<object>;
39
+ default: () => import("styled-components").RuleSet<object>;
40
+ };
41
+ export declare const boxShadow: {
42
+ default: () => import("styled-components").RuleSet<object>;
43
+ };
44
+ export declare const buttonLinkStyling: {
45
+ inverted: () => import("styled-components").RuleSet<object>;
46
+ text: () => import("styled-components").RuleSet<object>;
47
+ };
48
+ export declare const linkStyling: ({ fontSize }: {
49
+ fontSize?: number;
50
+ }) => import("styled-components").RuleSet<object>;