@rileybathurst/paddle 0.0.13 → 0.0.16
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 +4 -2
- package/src/App.tsx +0 -1
- package/src/PaddleComposition.tsx +54 -0
- package/src/PaddleTime.tsx +77 -0
- package/src/index.tsx +3 -1
- package/src/stories/BookNow.stories.tsx +19 -0
- package/src/stories/BookNow.tsx +29 -0
- package/src/stories/BrandList.stories.tsx +19 -0
- package/src/stories/BrandList.tsx +19 -0
- package/src/stories/Button.stories.tsx +1 -0
- package/src/stories/Card.stories.tsx +19 -0
- package/src/stories/Card.tsx +43 -0
- package/src/stories/Colors.stories.tsx +1 -0
- package/src/stories/Colors.tsx +24 -2
- package/src/stories/Composition.stories.tsx +19 -0
- package/src/stories/Composition.tsx +21 -0
- package/src/stories/Deal.tsx +31 -0
- package/src/stories/Deck.stories.tsx +19 -0
- package/src/stories/Deck.tsx +22 -0
- package/src/stories/Eyebrow.stories.tsx +19 -0
- package/src/stories/Eyebrow.tsx +21 -0
- package/src/stories/Footer.stories.tsx +19 -0
- package/src/stories/Footer.tsx +112 -0
- package/src/stories/Header.stories.ts +7 -7
- package/src/stories/Header.tsx +23 -54
- package/src/stories/Language.stories.tsx +19 -0
- package/src/stories/Language.tsx +22 -0
- package/src/stories/Links.stories.tsx +19 -0
- package/src/stories/Links.tsx +25 -0
- package/src/stories/Location.stories.tsx +19 -0
- package/src/stories/Location.tsx +54 -0
- package/src/stories/LocationDeck.stories.tsx +19 -0
- package/src/stories/LocationDeck.tsx +42 -0
- package/src/stories/Logo.stories.tsx +19 -0
- package/src/stories/Logo.tsx +60 -0
- package/src/stories/Page.stories.ts +6 -15
- package/src/stories/Page.tsx +114 -63
- package/src/stories/Pricing.stories.tsx +19 -0
- package/src/stories/Pricing.tsx +74 -0
- package/src/stories/Ticket.stories.tsx +19 -0
- package/src/stories/Ticket.tsx +54 -0
- package/src/stories/TopBar.stories.tsx +19 -0
- package/src/stories/TopBar.tsx +19 -0
- package/src/stories/Typography.stories.tsx +19 -0
- package/src/stories/Typography.tsx +39 -0
- package/src/stories/Widths.stories.tsx +19 -0
- package/src/stories/Widths.tsx +67 -0
- package/src/styles/a11y.css +10 -0
- package/src/styles/app.css +6 -0
- package/src/styles/color.css +18 -0
- package/src/styles/layout.css +99 -0
- package/src/styles/links.css +33 -0
- package/src/styles/media.css +53 -0
- package/src/styles/typography.css +238 -0
- package/src/App.css +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import { fn } from
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { fn } from "@storybook/test";
|
|
3
3
|
|
|
4
|
-
import { Header } from
|
|
4
|
+
import { Header } from "./Header";
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
-
title:
|
|
7
|
+
title: "Organisms/Header",
|
|
8
8
|
component: Header,
|
|
9
9
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
10
|
-
tags: [
|
|
10
|
+
tags: ["autodocs"],
|
|
11
11
|
parameters: {
|
|
12
12
|
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
13
|
-
layout:
|
|
13
|
+
layout: "fullscreen",
|
|
14
14
|
},
|
|
15
15
|
args: {
|
|
16
16
|
onLogin: fn(),
|
|
@@ -25,7 +25,7 @@ type Story = StoryObj<typeof meta>;
|
|
|
25
25
|
export const LoggedIn: Story = {
|
|
26
26
|
args: {
|
|
27
27
|
user: {
|
|
28
|
-
name:
|
|
28
|
+
name: "Jane Doe",
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
31
|
};
|
package/src/stories/Header.tsx
CHANGED
|
@@ -1,59 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { faker } from '@faker-js/faker';
|
|
3
|
+
import { Link } from 'react-aria-components';
|
|
4
|
+
import { TopBar } from './TopBar';
|
|
5
|
+
import { Logo } from './Logo';
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
import './header.css';
|
|
5
|
-
|
|
6
|
-
type User = {
|
|
7
|
-
name: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
interface HeaderProps {
|
|
11
|
-
user?: User;
|
|
12
|
-
onLogin?: () => void;
|
|
13
|
-
onLogout?: () => void;
|
|
14
|
-
onCreateAccount?: () => void;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => (
|
|
7
|
+
export const Header = () => (
|
|
18
8
|
<header>
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</g>
|
|
36
|
-
</svg>
|
|
37
|
-
<h1>Acme</h1>
|
|
38
|
-
</div>
|
|
39
|
-
<div>
|
|
40
|
-
{user ? (
|
|
41
|
-
<>
|
|
42
|
-
<span className="welcome">
|
|
43
|
-
Welcome, <b>{user.name}</b>!
|
|
44
|
-
</span>
|
|
45
|
-
<Button size="small" onClick={onLogout} label="Log out" />
|
|
46
|
-
</>
|
|
47
|
-
) : (
|
|
48
|
-
<>
|
|
49
|
-
<Button size="small" onClick={onLogin} label="Log in" />
|
|
50
|
-
<Button primary size="small" onClick={onCreateAccount} label="Sign up" />
|
|
51
|
-
</>
|
|
52
|
-
)}
|
|
53
|
-
|
|
54
|
-
<hr />
|
|
55
|
-
<Button />
|
|
56
|
-
</div>
|
|
9
|
+
<TopBar />
|
|
10
|
+
<div className="logo-container" >
|
|
11
|
+
<Link
|
|
12
|
+
href="/"
|
|
13
|
+
className="link__subtle"
|
|
14
|
+
>
|
|
15
|
+
<Logo />
|
|
16
|
+
</Link>
|
|
17
|
+
<h1 className='sr-only'>
|
|
18
|
+
<Link
|
|
19
|
+
href="/"
|
|
20
|
+
className="link__subtle"
|
|
21
|
+
>
|
|
22
|
+
{faker.location.city()} kayak & Paddleboard
|
|
23
|
+
</Link>
|
|
24
|
+
</h1>
|
|
57
25
|
</div>
|
|
26
|
+
{/* // TODO: <p>small nav is going to be a pain to build here I bet</p> */}
|
|
58
27
|
</header>
|
|
59
28
|
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { Language } from './Language';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Atoms/Language',
|
|
8
|
+
component: Language,
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Language>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
interface LanguageProps {
|
|
5
|
+
primary?: boolean;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const Language = ({
|
|
10
|
+
primary = false,
|
|
11
|
+
...props
|
|
12
|
+
}: LanguageProps) => {
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<main
|
|
16
|
+
{...props}
|
|
17
|
+
>
|
|
18
|
+
"Paddleboard is supposed to be one word" - Andy<br />
|
|
19
|
+
"Double Kayak" - always used instead of Tandem<br />
|
|
20
|
+
</main>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { Links } from './Links';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Links,
|
|
8
|
+
title: 'Atoms/Links',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Links>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { faker } from '@faker-js/faker';
|
|
4
|
+
import { Link } from 'react-aria-components';
|
|
5
|
+
|
|
6
|
+
interface LinksProps {
|
|
7
|
+
primary?: boolean;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const Links = ({
|
|
12
|
+
primary = false,
|
|
13
|
+
...props
|
|
14
|
+
}: LinksProps) => {
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<main
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
20
|
+
<Link href={faker.location.city()}>{faker.location.city()}</Link><br />
|
|
21
|
+
<Link href={faker.location.city()} className={`link__backed ${primary ?? 'hover'}`}>{faker.location.city()} Backed</Link>
|
|
22
|
+
{/* {primary ? 'primary' : 'secondary'} */}
|
|
23
|
+
</main>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { Location } from './Location';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Location,
|
|
8
|
+
title: 'Molecules/Location',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Location>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { faker } from '@faker-js/faker';
|
|
4
|
+
|
|
5
|
+
interface LocationProps {
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Location = ({
|
|
11
|
+
primary = false,
|
|
12
|
+
...props
|
|
13
|
+
}: LocationProps) => {
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<a
|
|
17
|
+
className={`location ${primary ?? 'backed'}`}
|
|
18
|
+
href="https://goo.gl/maps/atoK4oyJRbV3EKuK9"
|
|
19
|
+
rel="noopener noreferrer"
|
|
20
|
+
>
|
|
21
|
+
<svg
|
|
22
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
+
height="48"
|
|
24
|
+
width="48"
|
|
25
|
+
className=""
|
|
26
|
+
>
|
|
27
|
+
<title>{faker.location.city()}</title>
|
|
28
|
+
<path d="M4 46v-3h2q1.55 0 3.075-.525Q10.6 41.95 12 40.55q1.4 1.4 2.925 1.925Q16.45 43 18 43q1.5 0 3.075-.55 1.575-.55 2.925-1.9 1.45 1.4 2.95 1.925Q28.45 43 30 43q1.5 0 3.075-.55 1.575-.55 2.925-1.9 1.35 1.35 2.925 1.9Q40.5 43 42 43h2v3h-2q-1.45 0-2.975-.425Q37.5 45.15 36 44q-1.5 1.15-3.025 1.575Q31.45 46 30 46q-1.45 0-2.975-.425Q25.5 45.15 24 44q-1.5 1.15-3.025 1.575Q19.45 46 18 46q-1.45 0-2.975-.425Q13.5 45.15 12 44q-1.5 1.15-3.025 1.575Q7.45 46 6 46Zm20-27.7q-1.5 0-2.575-1.075-1.075-1.075-1.075-2.575 0-1.5 1.075-2.575Q22.5 11 24 11q1.5 0 2.575 1.075 1.075 1.075 1.075 2.575 0 1.5-1.075 2.575Q25.5 18.3 24 18.3Zm-6 19.9q-1.65 0-3.25-.9T12 34.95q-.65.7-1.55 1.375T8.7 37.55q-1.95-.4-4.225-1.075Q2.2 35.8 0 35q2.65-1.05 6.875-2.1t7.775-1.65l2.8-8.95q.4-1.4 1.7-1.95 1.3-.55 2.55.1l5.3 2.8 6.05-3.2 3.5-8.1-1-2.65 2.4-5.25L43.4 6.5l-2.35 5.25-2.65 1-7.8 18.15q4.55.55 9.55 1.75 5 1.2 7.85 2.35-2.2.8-4.475 1.475-2.275.675-4.225 1.075-.85-.55-1.75-1.225T36 34.95q-1.15 1.45-2.75 2.35-1.6.9-3.25.9t-3.25-.9q-1.6-.9-2.75-2.35-1.15 1.45-2.75 2.35-1.6.9-3.25.9Zm10.45-7.55 2.6-6.2-4.05 2.1-3.8-1.9-1.8 5.85H24q1.15 0 2.225.025 1.075.025 2.225.125Z" />
|
|
29
|
+
</svg>
|
|
30
|
+
<div>
|
|
31
|
+
<h3 className="vinson">On Water Rental</h3>
|
|
32
|
+
<p>
|
|
33
|
+
{faker.location.secondaryAddress()}
|
|
34
|
+
<br />
|
|
35
|
+
{faker.location.streetAddress()},
|
|
36
|
+
<br />
|
|
37
|
+
{faker.location.city()}, {faker.location.zipCode()}
|
|
38
|
+
<br />
|
|
39
|
+
</p>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<p>
|
|
43
|
+
May – October
|
|
44
|
+
<br />
|
|
45
|
+
Open Daily
|
|
46
|
+
<br />
|
|
47
|
+
9:30am – 5:30pm
|
|
48
|
+
<br />
|
|
49
|
+
Weather Permitting
|
|
50
|
+
<br />
|
|
51
|
+
</p>
|
|
52
|
+
</a>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { LocationDeck } from './LocationDeck';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: LocationDeck,
|
|
8
|
+
title: 'Organisms/LocationDeck',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof LocationDeck>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Location } from './Location';
|
|
4
|
+
import { faker } from '@faker-js/faker';
|
|
5
|
+
|
|
6
|
+
function Deal() {
|
|
7
|
+
|
|
8
|
+
const roll = faker.number.int(10);
|
|
9
|
+
|
|
10
|
+
if (roll < 1) {
|
|
11
|
+
return (
|
|
12
|
+
<h1>double zero</h1>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const content = [];
|
|
17
|
+
for (let i = 0; i < roll; i++) {
|
|
18
|
+
content.push(
|
|
19
|
+
<Location key={i} />
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return content;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
interface LocationDeckProps {
|
|
28
|
+
primary?: boolean;
|
|
29
|
+
onClick?: () => void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const LocationDeck = ({
|
|
33
|
+
primary = false,
|
|
34
|
+
...props
|
|
35
|
+
}: LocationDeckProps) => {
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div className='location-deck'>
|
|
39
|
+
<Deal />
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// this is the Name.stories.tsx file
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { fn } from '@storybook/test';
|
|
4
|
+
import { Logo } from './Logo';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Logo,
|
|
8
|
+
title: 'Atoms/Logo',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Logo>;
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
|
|
15
|
+
export const Primary: Story = {
|
|
16
|
+
args: {
|
|
17
|
+
primary: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { faker } from '@faker-js/faker';
|
|
4
|
+
|
|
5
|
+
interface LogoProps {
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Logo = ({
|
|
11
|
+
primary = false,
|
|
12
|
+
...props
|
|
13
|
+
}: LogoProps) => {
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<svg
|
|
17
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
18
|
+
viewBox="0 0 1057.1 687.4"
|
|
19
|
+
>
|
|
20
|
+
<title>{faker.location.city()} kayak and paddleboard logo</title>
|
|
21
|
+
<g>
|
|
22
|
+
<path d="M92.5,234.3c-2.1.4-4.5.6-7.1.4-7.2-.4-14.5-2.9-20-5.8v16.4c5.8,2.5,14.6,4.5,23.7,4.5,18.8,0,29.7-8.6,29.7-23s-8.6-19.3-22.6-24.7c-10.8-4.1-15.2-7.3-15.2-12s5.3-8.3,13.5-8.3,14.8,2.1,19.5,4.9v-15.7c-5-2.2-12.8-4-20.8-4-17.2,0-28.9,9.1-28.9,23.2s8.2,19.7,22.1,24.8c11,4,15.7,6.8,15.7,12.1s-3.5,6.2-9.6,7.1Z" />
|
|
23
|
+
<path d="M171.4,249.9c24.1,0,41.7-18.1,41.7-41.4s-17.7-41.4-41.7-41.4-41.7,18.5-41.7,41.4,17.6,41.4,41.7,41.4ZM171.4,182.7c14.4,0,24.6,11.6,24.6,25.8s-10.2,25.8-24.6,25.8-24.6-11.5-24.6-25.8,10.2-25.8,24.6-25.8Z" />
|
|
24
|
+
<path d="M262.1,249.9c21,0,33.3-12,33.3-30.5v-50.7h-17v49c0,10.4-5.8,16.6-16.3,16.6s-16.3-6.2-16.3-16.6v-49h-17v50.7c0,18.6,12.4,30.5,33.3,30.5Z" />
|
|
25
|
+
<polygon points="330.7 248.3 347.8 248.3 347.8 182.9 370.1 182.9 370.1 168.6 308.5 168.6 308.5 182.9 330.7 182.9 330.7 248.3" />
|
|
26
|
+
<polygon points="401.3 215 434.2 215 434.2 248.3 451.3 248.3 451.3 168.6 434.2 168.6 434.2 200.8 401.3 200.8 401.3 168.6 384.3 168.6 384.3 248.3 401.3 248.3 401.3 215" />
|
|
27
|
+
<polygon points="552.7 248.3 569.7 248.3 569.7 182.9 592.1 182.9 592.1 168.6 530.4 168.6 530.4 182.9 552.7 182.9 552.7 248.3" />
|
|
28
|
+
<path d="M609.1,248.3l6.2-14.1h29.8l6.4,14.1h17.8l-38.7-80.9h-.7l-38.6,80.9h17.8ZM630.4,198.6c2.4,7,6,15.4,9.6,23.7h-19.5c3.3-7.5,7.5-18.1,9.9-23.7Z" />
|
|
29
|
+
<polygon points="698.9 215 731.8 215 731.8 248.3 748.8 248.3 748.8 168.6 731.8 168.6 731.8 200.8 698.9 200.8 698.9 168.6 681.9 168.6 681.9 248.3 698.9 248.3 698.9 215" />
|
|
30
|
+
<path d="M807.2,249.9c24.1,0,41.7-18.1,41.7-41.4s-17.7-41.4-41.7-41.4-41.7,18.5-41.7,41.4,17.6,41.4,41.7,41.4ZM807.2,182.7c14.4,0,24.6,11.6,24.6,25.8s-10.2,25.8-24.6,25.8-24.6-11.5-24.6-25.8,10.2-25.8,24.6-25.8Z" />
|
|
31
|
+
<polygon points="918.5 234 882.7 234 882.7 214.8 911.7 214.8 911.7 201.1 882.7 201.1 882.7 182.9 916.9 182.9 916.9 168.6 865.6 168.6 865.6 248.3 918.5 248.3 918.5 234" />
|
|
32
|
+
</g>
|
|
33
|
+
<g>
|
|
34
|
+
<path d="M118.2,528.6h-26v79.9h17.1v-27.3h8.9c18.4,0,30.7-9.1,30.7-26.3s-12.3-26.3-30.7-26.3ZM119,566.8h-9.8v-23.8h9.3c7.7,0,13,4,13,12s-5.1,11.9-12.5,11.9Z" />
|
|
35
|
+
<path d="M185.8,527.4l-38.7,81.1h17.9l6.2-14.1h29.8l6.4,14.1h17.9l-38.8-81.1h-.7ZM176.4,582.4c3.3-7.5,7.5-18.2,9.9-23.7,2.4,7,6,15.4,9.6,23.7h-19.5Z" />
|
|
36
|
+
<path d="M263.3,528.6h-25.5v79.9h25.7c27.1,0,44.2-16.5,44.2-39.9s-17.2-39.9-44.4-39.9ZM263.3,594.2h-8.4v-51.2h8.2c17.3,0,27.4,11.2,27.4,25.6s-10.1,25.6-27.2,25.6Z" />
|
|
37
|
+
<path d="M351,528.6h-25.5v79.9h25.7c27.1,0,44.2-16.5,44.2-39.9s-17.2-39.9-44.4-39.9ZM351,594.2h-8.4v-51.2h8.2c17.3,0,27.4,11.2,27.4,25.6s-10.1,25.6-27.2,25.6Z" />
|
|
38
|
+
<polygon points="428.3 528.6 411.2 528.6 411.2 608.5 459 608.5 459 594.2 428.3 594.2 428.3 528.6" />
|
|
39
|
+
<polygon points="491.2 574.9 520.2 574.9 520.2 561.1 491.2 561.1 491.2 543 525.4 543 525.4 528.6 474.1 528.6 474.1 608.5 527.1 608.5 527.1 594.2 491.2 594.2 491.2 574.9" />
|
|
40
|
+
<path d="M595.6,566.6c5.7-2.4,10.2-8,10.2-15.5,0-15-12.8-22.4-29.7-22.4h-25.8v79.9h28.2c18,0,30.4-8,30.4-23.3s-6.1-16.3-13.2-18.6ZM566.5,542.3h10.6c6.8,0,11.3,3.5,11.3,10.2s-2.1,7.5-5.3,8.8c-2,.6-4.1.7-6.4.7h-10.2v-19.6ZM579.2,594.9h-12.6v-21.4h13.8c6.1,0,11,3.7,11,10.6s-5.3,10.8-12.1,10.8Z" />
|
|
41
|
+
<path d="M744.7,527.4l-38.7,81.1h17.9l6.2-14.1h29.8l6.4,14.1h17.9l-38.8-81.1h-.7ZM735.2,582.4c3.3-7.5,7.5-18.2,9.9-23.7,2.4,7,6,15.4,9.6,23.7h-19.5Z" />
|
|
42
|
+
<path d="M851.8,554.9c0-17.1-12.3-26.3-30.8-26.3h-28.1v79.9h16.7v-28h11.5l14.1,28h18.1l-16.7-30.8c8.7-3.4,15.2-11.1,15.2-22.7ZM821.9,566.8h-12.2v-23.8h11.8c7.8,0,13.2,4,13.2,12s-5.2,11.9-12.8,11.9Z" />
|
|
43
|
+
<path d="M895.3,528.6h-25.5v79.9h25.7c27.1,0,44.2-16.5,44.2-39.9s-17.2-39.9-44.4-39.9ZM895.3,594.2h-8.4v-51.2h8.2c17.3,0,27.4,11.2,27.4,25.6s-10.1,25.6-27.2,25.6Z" />
|
|
44
|
+
</g>
|
|
45
|
+
<g>
|
|
46
|
+
<path d="M942.7,490v-36.7c-5.6,1.1-10.6,1.4-15.6.6-13.9-1.4-20-13.6-29.7-32.2l-26.1-50.6,70-82.5h-50.6l-77.8,94.5v-94.5h-42.8v200h42.8v-56.4l28.3-32.5,25.8,48.1c16.7,32.5,30.8,44.7,55.8,44.7s15-1.1,19.7-2.5Z" />
|
|
47
|
+
<path d="M40.1,288.6v200h42.8v-56.4l28.3-32.5,25.8,48.1c16.7,32.5,30.8,44.7,55.8,44.7s15-1.1,19.7-2.5v-36.7c-5.6,1.1-10.6,1.4-15.6.6-13.9-1.4-20-13.6-29.7-32.2l-26.1-50.6,70-82.5h-50.6l-77.8,94.5v-94.5h-42.8Z" />
|
|
48
|
+
<path d="M494.4,412.6v76h42.8v-75.6c6-9.3,12.6-20.8,19.1-34.1,11.9-24.4,23.3-54.9,29.2-90.3,0-.2,0-.4.1-.6h-48.9c-6.9,50.2-21,65.8-21,65.8,0,0-13.8-15.6-20.5-65.8h-48.8c0,.2,0,.4.1.6,6.1,36.4,17.9,67.7,30.2,92.4,6.1,12.2,12.2,22.9,17.8,31.6Z" />
|
|
49
|
+
<path d="M342.7,275.9l-101.5,212.7h46.8l16.3-37h78.3l16.9,37h46.8l-101.8-212.7h-1.7ZM318,420.3c8.7-19.8,19.8-47.7,25.9-62.3,6.4,18.3,15.7,40.4,25.3,62.3h-51.2Z" />
|
|
50
|
+
</g>
|
|
51
|
+
<path d="M1003.4,394.2c5-7.7,6.4-16.5,5.7-26h-14.2c.3,5-.3,10.1-2.2,14.6l-13.5-14c6.2-3,16-9.5,16-22.2s-10.2-19.7-22.5-19.7-22.6,9.7-22.6,20.3,3.3,13.8,8.3,19.2c-7.9,4.3-15.5,11-15.5,21.2s10,22.3,29.9,22.3,15.6-2.3,21.3-6.7l4.9,5.1h18.2l-13.6-14.2ZM972.5,340.1c4.7,0,8.3,3.5,8.3,8.1s-6,9.5-10.4,11.9c-3.9-4.2-6.3-7.2-6.3-11.9s3.8-8.1,8.4-8.1ZM972.8,396.9c-9,0-14.5-4.5-14.5-10.6s4.1-8.8,8.3-11.1l17.4,18c-3.1,2.4-7.1,3.8-11.2,3.8Z" />
|
|
52
|
+
<path d="M712,464c0-.7,0-1.4,0-2.1,0-.7,0-1.4,0-2.1h-.1c-.2-14.1-1.1-27.6-2.5-40.4,15.6.3,19.3,14.3,28.4,14.3h16.7c6.3,0,4.4-10.9,1.9-18.9s-2.6-14.4-10.7-14.4h-15.4c-6,0-8,11.7-14.8,11.7s-3,0-4.6,0h-2.4c-11-83.1-44.6-136.3-44.6-136.3,0,0-33.6,53.2-44.6,136.3h-2.7c-19.3,0-20-14-29.2-14h-16.7c-6.3,0-4.4,10.9-1.9,18.9,2.5,8,2.6,14.4,10.7,14.4h15.4c6,0,8-11.7,14.8-11.7s5.2,0,8.6-.1c-1.4,12.8-2.4,26.2-2.5,40.2h-.1c0,.7,0,1.4,0,2.1,0,.7,0,1.4,0,2.1h.1c1.2,110,48.1,183.9,48.1,183.9,0,0,46.9-73.9,48.1-183.9h.1ZM663.8,351c10.2,0,19.1,24.9,23.5,61.2h-47.1c4.4-36.3,13.3-61.2,23.5-61.2ZM663.8,577.1c-14.6,0-26.5-50.6-26.5-113.1s.8-31,2.2-44.8h48.7c1.4,13.7,2.2,28.8,2.2,44.8,0,62.4-11.9,113.1-26.5,113.1Z" />
|
|
53
|
+
<g>
|
|
54
|
+
<polygon points="683.4 62.3 381.6 128.3 912 128.3 912 112.3 683.4 62.3" />
|
|
55
|
+
<polygon points="255.6 84.2 70.8 122.4 70.8 128.4 209.9 128.4 241 115.5 296.5 92.7 255.6 84.2" />
|
|
56
|
+
<polygon points="378.7 115.7 551.6 77.8 460.2 40.1 246.3 128.4 320.7 128.4 378.7 115.7" />
|
|
57
|
+
</g>
|
|
58
|
+
</svg>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import { within, userEvent, expect } from
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { within, userEvent, expect } from "@storybook/test";
|
|
3
3
|
|
|
4
|
-
import { Page } from
|
|
4
|
+
import { Page } from "./Page";
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
-
title: 'Example/Page',
|
|
8
7
|
component: Page,
|
|
8
|
+
title: "Templates/Page",
|
|
9
9
|
parameters: {
|
|
10
10
|
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
11
|
-
layout:
|
|
11
|
+
layout: "fullscreen",
|
|
12
12
|
},
|
|
13
13
|
} satisfies Meta<typeof Page>;
|
|
14
14
|
|
|
@@ -19,14 +19,5 @@ export const LoggedOut: Story = {};
|
|
|
19
19
|
|
|
20
20
|
// More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing
|
|
21
21
|
export const LoggedIn: Story = {
|
|
22
|
-
play: async (
|
|
23
|
-
const canvas = within(canvasElement);
|
|
24
|
-
const loginButton = canvas.getByRole('button', { name: /Log in/i });
|
|
25
|
-
await expect(loginButton).toBeInTheDocument();
|
|
26
|
-
await userEvent.click(loginButton);
|
|
27
|
-
await expect(loginButton).not.toBeInTheDocument();
|
|
28
|
-
|
|
29
|
-
const logoutButton = canvas.getByRole('button', { name: /Log out/i });
|
|
30
|
-
await expect(logoutButton).toBeInTheDocument();
|
|
31
|
-
},
|
|
22
|
+
play: async () => {},
|
|
32
23
|
};
|
package/src/stories/Page.tsx
CHANGED
|
@@ -1,73 +1,124 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { faker } from '@faker-js/faker';
|
|
3
|
+
import { Link } from 'react-aria-components';
|
|
3
4
|
import { Header } from './Header';
|
|
4
|
-
import './
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
name: string;
|
|
8
|
-
};
|
|
5
|
+
import { Footer } from './Footer';
|
|
6
|
+
import { LocationDeck } from './LocationDeck';
|
|
7
|
+
import { Pricing } from './Pricing';
|
|
9
8
|
|
|
10
|
-
export const Page
|
|
11
|
-
const [user, setUser] = React.useState<User>();
|
|
9
|
+
export const Page = () => {
|
|
12
10
|
|
|
13
11
|
return (
|
|
14
|
-
|
|
15
|
-
<Header
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
<>
|
|
13
|
+
<Header />
|
|
14
|
+
<main className="pelican wrap">
|
|
15
|
+
<section>
|
|
16
|
+
<h2 className="page-title">
|
|
17
|
+
{faker.company.catchPhrase()}
|
|
18
|
+
</h2>
|
|
19
|
+
<div className="margin-block-end-aconcagua">
|
|
20
|
+
<p>{faker.lorem.sentences(5)}</p>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<LocationDeck
|
|
24
|
+
background={false}
|
|
25
|
+
/>
|
|
26
|
+
|
|
27
|
+
<div className="button__double">
|
|
28
|
+
<a
|
|
29
|
+
href={faker.commerce.isbn()}
|
|
30
|
+
target="_blank"
|
|
31
|
+
rel="noopener noreferrer"
|
|
32
|
+
className="book-now"
|
|
33
|
+
title={`book rental kayaks and paddleboards with ${faker.location.city()}`}
|
|
34
|
+
>
|
|
35
|
+
RENTALS<br />
|
|
36
|
+
BOOK NOW
|
|
37
|
+
</a>
|
|
38
|
+
|
|
39
|
+
<a
|
|
40
|
+
href={faker.commerce.isbn()}
|
|
41
|
+
target="_blank"
|
|
42
|
+
rel="noopener noreferrer"
|
|
43
|
+
className="book-now"
|
|
44
|
+
title={`book rental kayaks and paddleboards with ${faker.location.city()}`}
|
|
45
|
+
>
|
|
46
|
+
TOURS<br />
|
|
47
|
+
BOOK NOW
|
|
48
|
+
</a>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
</section>
|
|
52
|
+
|
|
53
|
+
<div>
|
|
54
|
+
{/* <div className="home__photo-grid"> */}
|
|
55
|
+
{/* <GatsbyImage
|
|
56
|
+
image={data.southlakefriends.image.localFile.childImageSharp.gatsbyImageData}
|
|
57
|
+
alt={data.southlakefriends.title}
|
|
58
|
+
className='img__wrapped hero'
|
|
59
|
+
/> */}
|
|
60
|
+
{/* // ? this seems like every time it would have that classname */}
|
|
61
|
+
{/* <WaterTexture className="texture" /> */}
|
|
62
|
+
{/* <GatsbyImage
|
|
63
|
+
image={data.goldshed.image.localFile.childImageSharp.gatsbyImageData}
|
|
64
|
+
alt={data.southlakefriends.title}
|
|
65
|
+
className='img__wrapped inset'
|
|
66
|
+
/> */}
|
|
67
|
+
{/* </div> */}
|
|
68
|
+
|
|
69
|
+
<Pricing book={true} />
|
|
70
|
+
</div>
|
|
71
|
+
</main>
|
|
72
|
+
|
|
73
|
+
<section id="tours" className="pelican water">
|
|
74
|
+
<div>
|
|
75
|
+
{/* // TODO: only one h and then p */}
|
|
76
|
+
<hgroup className="crest">
|
|
77
|
+
<h3 className="brow"><Link href="/tours">Tours</Link></h3>
|
|
78
|
+
{/* think about capitalization here */}
|
|
79
|
+
<h4 className="supra">Enjoy The Majesty Of Lake Tahoe</h4>
|
|
80
|
+
</hgroup>
|
|
81
|
+
|
|
82
|
+
<p>{faker.lorem.sentences(2)}</p>
|
|
83
|
+
|
|
84
|
+
<h4>
|
|
85
|
+
<Link href="/tours/compare">Compare Tours</Link>
|
|
86
|
+
</h4>
|
|
87
|
+
</div>
|
|
88
|
+
<div>{/* stay gold */}</div>
|
|
89
|
+
</section>
|
|
90
|
+
|
|
91
|
+
{/* <div className="deck">
|
|
92
|
+
{data.allStrapiTour.nodes.map((tour) => (
|
|
93
|
+
<div key={tour.id}>
|
|
94
|
+
<Ticket tour={tour} />
|
|
95
|
+
</div>
|
|
96
|
+
))}
|
|
97
|
+
</div> */}
|
|
98
|
+
|
|
99
|
+
<section id="retail" className="pelican water">
|
|
100
|
+
<article>
|
|
101
|
+
{/* // TODO: only one h and then p */}
|
|
102
|
+
<hgroup className="crest">
|
|
103
|
+
<h3 className="brow">
|
|
104
|
+
<a
|
|
105
|
+
href={faker.internet.domainName()}
|
|
106
|
+
target="_blank"
|
|
107
|
+
rel='noopener noreferrer'
|
|
108
|
+
>
|
|
109
|
+
Retail Store
|
|
110
|
+
</a>
|
|
111
|
+
</h3>
|
|
112
|
+
<h4 className="supra">Kayaks and Paddleboards</h4>
|
|
113
|
+
</hgroup>
|
|
21
114
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
<a href="https://componentdriven.org" target="_blank" rel="noopener noreferrer">
|
|
27
|
-
<strong>component-driven</strong>
|
|
28
|
-
</a>{' '}
|
|
29
|
-
process starting with atomic components and ending with pages.
|
|
30
|
-
</p>
|
|
31
|
-
<p>
|
|
32
|
-
Render pages with mock data. This makes it easy to build and review page states without
|
|
33
|
-
needing to navigate to them in your app. Here are some handy patterns for managing page
|
|
34
|
-
data in Storybook:
|
|
35
|
-
</p>
|
|
36
|
-
<ul>
|
|
37
|
-
<li>
|
|
38
|
-
Use a higher-level connected component. Storybook helps you compose such data from the
|
|
39
|
-
"args" of child component stories
|
|
40
|
-
</li>
|
|
41
|
-
<li>
|
|
42
|
-
Assemble data in the page component from your services. You can mock these services out
|
|
43
|
-
using Storybook.
|
|
44
|
-
</li>
|
|
45
|
-
</ul>
|
|
46
|
-
<p>
|
|
47
|
-
Get a guided tutorial on component-driven development at{' '}
|
|
48
|
-
<a href="https://storybook.js.org/tutorials/" target="_blank" rel="noopener noreferrer">
|
|
49
|
-
Storybook tutorials
|
|
50
|
-
</a>
|
|
51
|
-
. Read more in the{' '}
|
|
52
|
-
<a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer">
|
|
53
|
-
docs
|
|
54
|
-
</a>
|
|
55
|
-
.
|
|
56
|
-
</p>
|
|
57
|
-
<div className="tip-wrapper">
|
|
58
|
-
<span className="tip">Tip</span> Adjust the width of the canvas with the{' '}
|
|
59
|
-
<svg width="10" height="10" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
|
|
60
|
-
<g fill="none" fillRule="evenodd">
|
|
61
|
-
<path
|
|
62
|
-
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"
|
|
63
|
-
id="a"
|
|
64
|
-
fill="#999"
|
|
65
|
-
/>
|
|
66
|
-
</g>
|
|
67
|
-
</svg>
|
|
68
|
-
Viewports addon in the toolbar
|
|
115
|
+
<p>{faker.lorem.sentences(2)}</p>
|
|
116
|
+
</article>
|
|
117
|
+
<div>
|
|
118
|
+
{/* stay gold */}
|
|
69
119
|
</div>
|
|
70
120
|
</section>
|
|
71
|
-
|
|
121
|
+
<Footer />
|
|
122
|
+
</>
|
|
72
123
|
);
|
|
73
124
|
};
|