@rileybathurst/paddle 0.0.12 → 0.0.15

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 (55) hide show
  1. package/package.json +4 -2
  2. package/src/App.tsx +0 -1
  3. package/src/PaddleComposition.tsx +54 -0
  4. package/src/PaddleTime.tsx +73 -0
  5. package/src/index.tsx +4 -2
  6. package/src/stories/BookNow.stories.tsx +19 -0
  7. package/src/stories/BookNow.tsx +29 -0
  8. package/src/stories/BrandList.stories.tsx +19 -0
  9. package/src/stories/BrandList.tsx +19 -0
  10. package/src/stories/Button.stories.tsx +1 -0
  11. package/src/stories/Card.stories.tsx +19 -0
  12. package/src/stories/Card.tsx +43 -0
  13. package/src/stories/Colors.stories.tsx +1 -0
  14. package/src/stories/Colors.tsx +24 -2
  15. package/src/stories/Composition.stories.tsx +19 -0
  16. package/src/stories/Composition.tsx +21 -0
  17. package/src/stories/Deal.tsx +31 -0
  18. package/src/stories/Deck.stories.tsx +19 -0
  19. package/src/stories/Deck.tsx +22 -0
  20. package/src/stories/Eyebrow.stories.tsx +19 -0
  21. package/src/stories/Eyebrow.tsx +21 -0
  22. package/src/stories/Footer.stories.tsx +19 -0
  23. package/src/stories/Footer.tsx +112 -0
  24. package/src/stories/Header.stories.ts +7 -7
  25. package/src/stories/Header.tsx +23 -54
  26. package/src/stories/Language.stories.tsx +19 -0
  27. package/src/stories/Language.tsx +22 -0
  28. package/src/stories/Links.stories.tsx +19 -0
  29. package/src/stories/Links.tsx +25 -0
  30. package/src/stories/Location.stories.tsx +19 -0
  31. package/src/stories/Location.tsx +54 -0
  32. package/src/stories/LocationDeck.stories.tsx +19 -0
  33. package/src/stories/LocationDeck.tsx +42 -0
  34. package/src/stories/Logo.stories.tsx +19 -0
  35. package/src/stories/Logo.tsx +60 -0
  36. package/src/stories/Page.stories.ts +6 -15
  37. package/src/stories/Page.tsx +114 -63
  38. package/src/stories/Pricing.stories.tsx +19 -0
  39. package/src/stories/Pricing.tsx +74 -0
  40. package/src/stories/Ticket.stories.tsx +19 -0
  41. package/src/stories/Ticket.tsx +55 -0
  42. package/src/stories/TopBar.stories.tsx +19 -0
  43. package/src/stories/TopBar.tsx +19 -0
  44. package/src/stories/Typography.stories.tsx +19 -0
  45. package/src/stories/Typography.tsx +39 -0
  46. package/src/stories/Widths.stories.tsx +19 -0
  47. package/src/stories/Widths.tsx +67 -0
  48. package/src/styles/a11y.css +10 -0
  49. package/src/styles/app.css +6 -0
  50. package/src/styles/color.css +18 -0
  51. package/src/styles/layout.css +99 -0
  52. package/src/styles/links.css +33 -0
  53. package/src/styles/media.css +53 -0
  54. package/src/styles/typography.css +238 -0
  55. package/src/App.css +0 -0
@@ -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 { Pricing } from './Pricing';
5
+
6
+ const meta = {
7
+ component: Pricing,
8
+ title: 'Molecules/Pricing',
9
+ args: { onClick: fn() },
10
+ } satisfies Meta<typeof Pricing>;
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,74 @@
1
+ // this is the Name.tsx file
2
+ import React from 'react';
3
+ import { BookNow } from './BookNow';
4
+
5
+ interface PricingProps {
6
+ primary?: boolean;
7
+ onClick?: () => void;
8
+ }
9
+
10
+ export const Pricing = ({
11
+ primary = false,
12
+ ...props
13
+ }: PricingProps) => {
14
+
15
+ return (
16
+ <>
17
+ <section className="charts">
18
+ <div className="pricing-chart">
19
+ <div className="column">
20
+ <h4>
21
+ Rental
22
+ <br />
23
+ Rates
24
+ </h4>
25
+ <p>1 Hour</p>
26
+ <p>3 Hours</p>
27
+ <p>Full Day</p>
28
+ </div>
29
+ <div className="column">
30
+ <h4>
31
+ Single
32
+ <br />
33
+ Kayak
34
+ </h4>
35
+ <p>$30</p>
36
+ <p>$60</p>
37
+ <p>$90</p>
38
+ </div>
39
+ <div className="column">
40
+ <h4>
41
+ Double
42
+ <br />
43
+ Kayak
44
+ </h4>
45
+ <p>$45</p>
46
+ <p>$90</p>
47
+ <p>$110</p>
48
+ </div>
49
+ <div className="column">
50
+ <h4>
51
+ Paddle
52
+ <br />
53
+ Board
54
+ </h4>
55
+ <p>$30</p>
56
+ <p>$60</p>
57
+ <p>$90</p>
58
+ </div>
59
+ </div>
60
+
61
+ <div className="pricing-chart">
62
+ <>
63
+ <p className="test">Pedal Drive</p>
64
+ <p className="test">+10</p>
65
+ <p className="test">+20</p>
66
+ <p className="">+10</p>
67
+ </>
68
+ </div>
69
+ </section>
70
+
71
+ <BookNow />
72
+ </>
73
+ );
74
+ };
@@ -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 { Ticket } from './Ticket';
5
+
6
+ const meta = {
7
+ component: Ticket,
8
+ title: 'Molecules/Ticket',
9
+ args: { onClick: fn() },
10
+ } satisfies Meta<typeof Ticket>;
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,55 @@
1
+ // TODO: when I have an internet connection
2
+ // this is the Name.tsx file
3
+ import React from 'react';
4
+ import { Link } from 'react-aria-components';
5
+ import { faker } from '@faker-js/faker';
6
+ import { PaddleTime } from '../PaddleTime';
7
+
8
+ interface TicketProps {
9
+ primary?: boolean;
10
+ onClick?: () => void;
11
+ }
12
+
13
+ export const Ticket = ({
14
+ primary = false,
15
+ ...props
16
+ }: TicketProps) => {
17
+
18
+ const time = PaddleTime({
19
+ timeframe: faker.datatype.boolean() ? faker.helpers.arrayElement(['sunset', 'overnight']) : null,
20
+ // ? faker boolean covering both start and finish
21
+ start: faker.datatype.boolean() ? `${faker.number.int({ min: 1, max: 24 })}:${faker.number.int(60)}:00.000` : null,
22
+ finish: faker.datatype.boolean() ? `${faker.number.int({ min: 1, max: 24 })}:${faker.number.int(60)}:00.000` : null,
23
+ duration: faker.datatype.boolean() ? faker.number.int(200) : null
24
+ });
25
+
26
+ return (
27
+ <section className="ticket">
28
+ <Link href={`/tours/${faker.location.city()}`}>
29
+ <img src={faker.image.url()} alt={faker.lorem.words(2)} />
30
+ </Link>
31
+ <h4 className="card__title">
32
+ <Link href={`/tours/${faker.location.city()}`}>
33
+ {faker.location.city()}
34
+ </Link>
35
+ </h4>
36
+ <div className="card__specs">
37
+ <h4>{time.key}</h4>
38
+ {faker.datatype.boolean() ? <h4 className="capitalize">{faker.helpers.arrayElement(['easy', 'medium', 'hard'])} <span>Fitness</span></h4> : null}
39
+ </div>
40
+ <hr />
41
+ <p>{faker.lorem.sentences(2)}</p>
42
+ <hr />
43
+ <div className="card__details">
44
+ <h5>{faker.datatype.boolean() ? `$${faker.number.int(200)}` : null}</h5>
45
+ <a
46
+ href={faker.location.city()}
47
+ className="book-now"
48
+ >
49
+ BOOK NOW
50
+ </a>
51
+ </div>
52
+
53
+ </section>
54
+ );
55
+ };
@@ -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 { TopBar } from './TopBar';
5
+
6
+ const meta = {
7
+ component: TopBar,
8
+ title: 'Atoms/TopBar',
9
+ args: { onClick: fn() },
10
+ } satisfies Meta<typeof TopBar>;
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,19 @@
1
+ // this is the Name.tsx file
2
+ import React from 'react';
3
+
4
+ interface TopBarProps {
5
+ primary?: boolean;
6
+ onClick?: () => void;
7
+ }
8
+
9
+ export const TopBar = ({
10
+ primary = false,
11
+ ...props
12
+ }: TopBarProps) => {
13
+
14
+ return (
15
+ <div className="top-bar" >
16
+ <p>We&apos;re Open for the 2024 Summer</p>
17
+ </div>
18
+ );
19
+ };
@@ -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 { Typography } from './Typography';
5
+
6
+ const meta = {
7
+ component: Typography,
8
+ title: 'Atoms/Typography',
9
+ args: { onClick: fn() },
10
+ } satisfies Meta<typeof Typography>;
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,39 @@
1
+ // this is the Name.tsx file
2
+ import React from 'react';
3
+ import { Eyebrow } from './Eyebrow';
4
+
5
+ interface TypographyProps {
6
+ primary?: boolean;
7
+ onClick?: () => void;
8
+ }
9
+
10
+ export const Typography = ({
11
+ primary = false,
12
+ ...props
13
+ }: TypographyProps) => {
14
+
15
+ return (
16
+ <>
17
+ <h1>everest</h1>
18
+ <h2>aconcagua</h2>
19
+ <h3>denali</h3>
20
+ <h4>kilimanjaro</h4>
21
+ <h5>elbrus</h5>
22
+ <h6>vinson</h6>
23
+ <p>kosciuszko</p>
24
+
25
+ <hr />
26
+
27
+ {/* // TODO: fix this naming */}
28
+ <p className="typography__secondary">typography__secondary</p>
29
+
30
+ <hr />
31
+
32
+ <Eyebrow />
33
+ <p>
34
+ These can be any version of h to be a well styled html doc as long as
35
+ they have the hgroup wrapper with a class of crest
36
+ </p>
37
+ </ >
38
+ );
39
+ };
@@ -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 { Widths } from './Widths';
5
+
6
+ const meta = {
7
+ component: Widths,
8
+ title: 'Atoms/Widths',
9
+ args: { onClick: fn() },
10
+ } satisfies Meta<typeof Widths>;
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,67 @@
1
+ // this is the Name.tsx file
2
+ import React from 'react';
3
+
4
+ function WidthCard({ widths }) {
5
+ return (
6
+ <>
7
+ {widths.map((width) => (
8
+ <div
9
+ style={{
10
+ height: '100px',
11
+ width: `var(--${width})`,
12
+ backgroundColor: 'var(--mullen-300)',
13
+ marginInline: 'auto',
14
+ marginBlockEnd: '1rem',
15
+ color: 'white',
16
+ }}
17
+ >
18
+ {width}
19
+ </div>
20
+ ))}
21
+ </>
22
+ );
23
+ }
24
+
25
+ interface WidthsProps {
26
+ primary?: boolean;
27
+ onClick?: () => void;
28
+ }
29
+
30
+ export const Widths = ({
31
+ primary = false,
32
+ ...props
33
+ }: WidthsProps) => {
34
+
35
+ return (
36
+ <>
37
+ <h1>Widths</h1>
38
+ <WidthCard widths={['swan', 'vulture', 'stork', 'condor', 'pelican', 'albatross']} />
39
+ <hr />
40
+ <h2>split</h2>
41
+ <p>pelican hydra</p>
42
+ <div
43
+ className='pelican hydra'
44
+ style={{
45
+ height: '100px',
46
+ marginBlockEnd: '1rem',
47
+ color: 'white',
48
+ }}
49
+ >
50
+ <div
51
+ style={{
52
+ backgroundColor: 'var(--mullen-300)',
53
+ }}
54
+ >
55
+ hydra?
56
+ </div>
57
+ <div
58
+ style={{
59
+ backgroundColor: 'var(--mullen-300)',
60
+ }}
61
+ >
62
+ hydra?
63
+ </div>
64
+ </div>
65
+ </>
66
+ );
67
+ };
@@ -0,0 +1,10 @@
1
+ /*------------------*/
2
+ /* #A11y */
3
+ /*------------------*/
4
+
5
+ .sr-only {
6
+ width: 0;
7
+ height: 0;
8
+ overflow: hidden;
9
+ display: block;
10
+ }
@@ -4,4 +4,10 @@
4
4
 
5
5
  @import "variables";
6
6
  @import "body";
7
+ @import "layout";
8
+ @import "media";
9
+ /* @import "color"; */
10
+ @import "typography";
11
+ @import "links";
7
12
  @import "buttons";
13
+ @import "a11y";
@@ -0,0 +1,18 @@
1
+ /*------------------------------------*/
2
+ /* #COLOR */
3
+ /*------------------------------------*/
4
+
5
+ /*------------------------------------*/
6
+ /* #TOP-BAR */
7
+ /*------------------------------------*/
8
+
9
+ .top-bar {
10
+ background: var(--brilliance);
11
+ box-shadow: 0 0 0 100vmax var(--brilliance);
12
+ clip-path: inset(0 -100vmax);
13
+
14
+ @media (prefers-color-scheme: dark) {
15
+ background-color: var(--navy-600);
16
+ box-shadow: 0 0 0 100vmax var(--navy-600);
17
+ }
18
+ }
@@ -0,0 +1,99 @@
1
+ /*------------------*/
2
+ /* #LAYOUT */
3
+ /*------------------*/
4
+
5
+ .vulture {
6
+ max-width: var(--vulture);
7
+ flex-basis: var(--vulture);
8
+ margin-inline: auto;
9
+ padding-inline: var(--kosciuszko);
10
+ width: calc(100% - var(--kosciuszko) * 2);
11
+ }
12
+
13
+ .stork {
14
+ max-width: var(--stork);
15
+ flex-basis: var(--stork);
16
+ margin-inline: auto;
17
+ padding-inline: var(--kosciuszko);
18
+ width: calc(100% - var(--kosciuszko) * 2);
19
+ }
20
+
21
+ .condor {
22
+ max-width: var(--condor);
23
+ flex-basis: var(--condor);
24
+ margin-inline: auto;
25
+ padding-inline: var(--kosciuszko);
26
+ width: calc(100% - var(--kosciuszko) * 2);
27
+ }
28
+
29
+ .pelican {
30
+ max-width: var(--pelican);
31
+ flex-basis: var(--pelican);
32
+ margin-inline: auto;
33
+ padding-inline: var(--kosciuszko);
34
+ width: calc(100% - var(--kosciuszko) * 2);
35
+ }
36
+
37
+ .albatross {
38
+ max-width: var(--albatross);
39
+ flex-basis: var(--albatross);
40
+ margin-inline: auto;
41
+ width: calc(100% - var(--kosciuszko) * 2);
42
+ }
43
+
44
+ /*------------------------------------*/
45
+
46
+ .wrap {
47
+ display: flex;
48
+ flex-flow: row wrap;
49
+ gap: clamp(var(--kosciuszko), 1.667vw, var(--denali));
50
+
51
+ > * {
52
+ flex: 1 1;
53
+ width: 100%;
54
+ }
55
+ }
56
+
57
+ .pelican.wrap > * {
58
+ flex: 1 1 calc(var(--pelican) / 2 - 1rem);
59
+ max-width: none;
60
+ margin-inline: 0;
61
+ padding-inline: 0;
62
+ }
63
+
64
+ .albatross.wrap > * {
65
+ flex: 1 1 calc(var(--albatross) / 2 - 1rem);
66
+ max-width: none;
67
+ margin-inline: 0;
68
+ padding-inline: 0;
69
+ }
70
+
71
+ /*------------------*/
72
+ /* #MAIN */
73
+ /*------------------*/
74
+
75
+ header,
76
+ main,
77
+ footer {
78
+ max-width: var(--stork);
79
+ margin-inline: auto;
80
+ /* TODO: clamp this */
81
+ padding-inline: var(--kosciuszko);
82
+ margin-block-end: var(--everest);
83
+ }
84
+
85
+ /*------------------*/
86
+ /* #TOP BAR */
87
+ /*------------------*/
88
+
89
+ .top-bar {
90
+ display: flex;
91
+ justify-content: center;
92
+ padding-block-start: 0.25rem;
93
+ z-index: var(--emergent); /* over the small menu when it slides up */
94
+ position: relative;
95
+
96
+ p {
97
+ margin-block-end: 0.25rem;
98
+ }
99
+ }
@@ -0,0 +1,33 @@
1
+ /*------------------------------------*/
2
+ /* #LINKS */
3
+ /*------------------------------------*/
4
+
5
+ a {
6
+ color: var(--navy);
7
+
8
+ @media (prefers-color-scheme: dark) {
9
+ color: var(--navy-200);
10
+ }
11
+ }
12
+
13
+ a:where(:hover, :focus),
14
+ a.hover {
15
+ color: var(--navy-300);
16
+ text-decoration: none;
17
+ }
18
+
19
+ .link__subtle {
20
+ text-decoration: none;
21
+ }
22
+
23
+ .link__subtle:where(:hover, :focus) {
24
+ text-decoration: underline;
25
+ }
26
+
27
+ .link__subtle-svg svg {
28
+ fill: var(--black-out);
29
+ }
30
+
31
+ .link__subtle-svg svg:where(:hover, :focus) {
32
+ fill: var(--navy);
33
+ }
@@ -0,0 +1,53 @@
1
+ /*------------------*/
2
+ /* #LOGO */
3
+ /*------------------*/
4
+
5
+ .logo-container {
6
+ margin: 0 auto;
7
+ display: flex;
8
+ /* gap: 1rem; // dont run a gap as the sr-only h1 uses it */
9
+ justify-content: center;
10
+ background-color: whitesmoke;
11
+ box-shadow: 0 0 0 100vmax whitesmoke;
12
+ clip-path: inset(0 -100vmax);
13
+ z-index: var(--understory);
14
+ position: relative;
15
+ max-width: calc(100% - 2rem); /* guess and check */
16
+ padding-block: var(--baseline);
17
+
18
+ @supports not (margin-inline: auto) {
19
+ margin-inline: auto;
20
+ }
21
+
22
+ /* @media (min-width: 30rem) {
23
+ max-width: 32rem; // guess and check
24
+ } */
25
+
26
+ @media (prefers-color-scheme: dark) {
27
+ background-color: var(--ink);
28
+ box-shadow: 0 0 0 100vmax var(--ink);
29
+ }
30
+
31
+ a {
32
+ width: max-content;
33
+ display: flex;
34
+ justify-content: center;
35
+ transition: var(--fade);
36
+ }
37
+
38
+ .gatsby-image-wrapper,
39
+ svg {
40
+ transition: var(--fade);
41
+ }
42
+
43
+ .gatsby-image-wrapper:where(:hover, :focus) {
44
+ filter: brightness(0.5);
45
+ }
46
+
47
+ svg {
48
+ width: 100%;
49
+ max-height: 10rem;
50
+ /* the logo isnt symetrical */
51
+ padding-inline-start: 2rem; /* guess and check number */
52
+ }
53
+ }