@rileybathurst/paddle 0.0.24 → 0.0.25

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rileybathurst/paddle",
3
3
  "private": false,
4
- "version": "0.0.24",
4
+ "version": "0.0.25",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -16,7 +16,8 @@
16
16
  "gatsby": "^5.13.6",
17
17
  "react": "^18.2.0",
18
18
  "react-aria-components": "^1.2.1",
19
- "react-dom": "^18.2.0"
19
+ "react-dom": "^18.2.0",
20
+ "react-markdown": "^9.0.1"
20
21
  },
21
22
  "devDependencies": {
22
23
  "@chromatic-com/storybook": "^1.3.4",
@@ -0,0 +1,149 @@
1
+ // TODO: Season is super broken
2
+
3
+ import * as React from "react"
4
+ import { Link } from 'gatsby';
5
+ import Markdown from "react-markdown";
6
+ import type { LocationCardTypes } from "./types/location-card-types";
7
+
8
+ interface SeasonTypes {
9
+ season_start: string;
10
+ season_end: string;
11
+ opening_time: string;
12
+ closing_time: string;
13
+ name: string;
14
+ }
15
+ function Season({ season_start, season_end, opening_time, closing_time, name }: SeasonTypes) {
16
+
17
+ // TODO: these need a query but thats not the most important first step
18
+ if (name === "Free Parking Lot" || name === "Parking" || name === "Delivery") {
19
+ return null;
20
+ }
21
+
22
+ // console.log(opening_time);
23
+
24
+ /* if (new Date(season_start) < new Date()) {
25
+ return (
26
+ <p>
27
+ {opening_time ? "Open Daily: " : null}
28
+ <HourMin time={opening_time} />
29
+ {opening_time ? " - : " : null}
30
+ <HourMin time={closing_time} />
31
+ </p>
32
+ )
33
+ } */
34
+
35
+ /* return (
36
+ <p>
37
+ We&apos;re closed for the season:<br />
38
+ We will reopen<br />
39
+ {season_start} - {season_end}<br />
40
+ Weather Permitting
41
+ </p>
42
+ ) */
43
+ return (
44
+ <p>
45
+ {/* {opening_time ? "Open Daily: " : null} */}
46
+ Open Daily 9:30am - 5:30pm<br />
47
+ Weather Permitting
48
+ {/* <HourMin time={opening_time} /> */}
49
+ {/* {opening_time ? " - : " : null} */}
50
+ {/* <HourMin time={closing_time} /> */}
51
+ </p>
52
+ )
53
+ }
54
+
55
+ interface ContentTypes {
56
+ svg: string;
57
+ name: string;
58
+ address: {
59
+ data: {
60
+ address: string;
61
+ }
62
+ };
63
+ description: {
64
+ data: {
65
+ description: string;
66
+ }
67
+ };
68
+ opening_time: string;
69
+ closing_time: string;
70
+
71
+ locale: {
72
+ season_start: string;
73
+ season_end: string;
74
+ };
75
+ }
76
+ function Content({ svg, name, address, description, opening_time, closing_time, locale }: ContentTypes) {
77
+ return (
78
+ <>
79
+ <div
80
+ className="svg"
81
+ dangerouslySetInnerHTML={{ __html: svg }}
82
+ />
83
+
84
+ <div>
85
+ <h3 className="elbrus">{name}</h3>
86
+ <Markdown className="react-markdown">
87
+ {address.data.address}
88
+ </Markdown>
89
+ </div>
90
+
91
+ <div>
92
+ <Season
93
+ season_start={locale.season_start}
94
+ season_end={locale.season_end}
95
+ opening_time={opening_time}
96
+ closing_time={closing_time}
97
+ name={name}
98
+ />
99
+ <br />
100
+ <Markdown className="react-markdown" >
101
+ {description.data.description}
102
+ </Markdown>
103
+ {/* // TODO: add phone but dont break the link on link rule {name === "On Water Rental" ? <Phone /> : null} */}
104
+ </div>
105
+ </>
106
+ )
107
+ }
108
+
109
+ function LocationCard({ svg, name, link, address, description, opening_time, closing_time, locale, background }: LocationCardTypes) {
110
+
111
+ if (link.includes('http')) {
112
+ return (
113
+ <a
114
+ href={link}
115
+ className={`location ${background}`}
116
+ title={name}
117
+ >
118
+ <Content
119
+ svg={svg}
120
+ name={name}
121
+ address={address}
122
+ description={description}
123
+ opening_time={opening_time}
124
+ closing_time={closing_time}
125
+ locale={locale}
126
+ />
127
+ </a>
128
+ )
129
+ }
130
+
131
+ return (
132
+ <Link
133
+ to={`/${link}`}
134
+ className={`location ${background}`}
135
+ >
136
+ <Content
137
+ svg={svg}
138
+ name={name}
139
+ address={address}
140
+ description={description}
141
+ opening_time={opening_time}
142
+ closing_time={closing_time}
143
+ locale={locale}
144
+ />
145
+ </Link>
146
+ )
147
+ }
148
+
149
+ export default LocationCard
package/src/index.tsx CHANGED
@@ -12,4 +12,5 @@ export * from "./PaddleComposition";
12
12
  export * from "./PaddleSocials";
13
13
 
14
14
  // Organisms
15
- export * from "./PaddleTestimonials";
15
+ export * from "./PaddleTestimonials";
16
+ export * from "./PaddleLocationCard";
@@ -0,0 +1,71 @@
1
+ import { Meta, ColorPalette, ColorItem } from "@storybook/blocks";
2
+
3
+ <Meta title="Colors" />
4
+
5
+ <ColorPalette>
6
+ <ColorItem
7
+ title="Mullen"
8
+ subtitle="base 100 - Tahoe City"
9
+ colors={{
10
+ mullen100: "hsl(0, 50%, 50%)",
11
+ mullen200: "hsl(0, 50%, 37.5%)",
12
+ mullen300: "hsl(0, 50%, 25%)",
13
+ }}
14
+ />
15
+ <ColorItem
16
+ title="Sand"
17
+ subtitle="base 100 - Tahoe City"
18
+ colors={{
19
+ sand100: "hsl(25, 37%, 95%)",
20
+ sand150: "hsl(25, 37%, 92.5%)",
21
+ sand200: "hsl(25, 37%, 87.5%)",
22
+ sand300: "hsl(25, 37%, 75%)",
23
+ }}
24
+ />
25
+
26
+ <ColorItem
27
+ title="Ink"
28
+ subtitle="base 100 - Tahoe City"
29
+ colors={{
30
+ ink100: "hsl(210, 50%, 12.5%)",
31
+ ink200: "hsl(210, 50%, 7.5%)",
32
+ ink300: "hsl(210, 50%, 5%)",
33
+ }}
34
+ />
35
+ <ColorItem
36
+ title="Navy"
37
+ subtitle="base 400 - South Lake"
38
+ colors={{
39
+ navy200: "oklch(75% 0.12 230)",
40
+ navy300: "oklch(62.5% 0.14 230)",
41
+ navy400: "oklch(50% 0.14 230)",
42
+ navy500: "oklch(37.5% 0.14 230)",
43
+ navy600: "oklch(25% 0.12 230)"
44
+ }}
45
+ />
46
+ <ColorItem
47
+ title="Sunshine"
48
+ subtitle="base 500 - South Lake"
49
+ colors={{
50
+ navy100: "oklch(97.5% 0.025 95)",
51
+ navy200: "oklch(95% 0.05 95)",
52
+ navy300: "oklch(92.5% 0.1 95)",
53
+ navy400: "oklch(90% 0.15 95)",
54
+ navy500: "oklch(87.5% 0.2 95)"
55
+ }}
56
+ />
57
+ <ColorItem
58
+ title="Neutrals"
59
+ colors={{
60
+ blackmetal: "hsl(210, 25%, 2.5%)",
61
+ blackout: "hsl(210, 25%, 12.5%)",
62
+ raven: "hsl(210, 25%, 25%)",
63
+ industrial: "hsl(210, 7.5%, 37.5%)",
64
+ grey: "hsl(210, 7.5%, 50%)",
65
+ cold: "hsl(210, 7.5%, 62.5%)",
66
+ tin: "hsl(210, 12.5%, 75%)",
67
+ cloud: "hsl(210, 18.75%, 87.5%)",
68
+ brilliance: "hsl(210, 25%, 97.5%)",
69
+ }}
70
+ />
71
+ </ColorPalette>
@@ -1,4 +1,5 @@
1
1
  // this is the Name.tsx file
2
+ // TODO: these are way to similar for the reality of the design
2
3
  import React from 'react';
3
4
  import { faker } from '@faker-js/faker';
4
5
 
@@ -28,7 +29,7 @@ export const Location = ({
28
29
  <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
30
  </svg>
30
31
  <div>
31
- <h3 className="vinson">On Water Rental</h3>
32
+ <h3 className="elbrus">{faker.helpers.arrayElement(['On Water Rental', 'Retail Location', 'Parking', 'Free Parking Lot', 'Delivery'])}</h3>
32
33
  <p>
33
34
  {faker.location.secondaryAddress()}
34
35
  <br />
@@ -1,13 +1,13 @@
1
1
  // this is the Name.stories.tsx file
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
3
  import { fn } from '@storybook/test';
4
- import { Colors } from './Colors';
4
+ import { Spec } from './Spec';
5
5
 
6
6
  const meta = {
7
- component: Colors,
8
- title: 'Atoms/Colors',
7
+ component: Spec,
8
+ title: 'Molecules/Spec',
9
9
  args: { onClick: fn() },
10
- } satisfies Meta<typeof Colors>;
10
+ } satisfies Meta<typeof Spec>;
11
11
 
12
12
  export default meta;
13
13
  type Story = StoryObj<typeof meta>;
@@ -0,0 +1,99 @@
1
+ // this is the Name.tsx file
2
+ import React from 'react';
3
+ import { faker } from '@faker-js/faker';
4
+
5
+ interface Spec3Types {
6
+ crew: string;
7
+ capacity: {
8
+ data: number;
9
+ unit: string;
10
+ };
11
+ test: {
12
+ data: string;
13
+ unit: string;
14
+ };
15
+ length: {
16
+ data: number;
17
+ unit: string;
18
+ };
19
+ }
20
+ function Spec3({ crew, capacity, test, length }: Spec3Types) {
21
+
22
+ console.log(crew);
23
+ console.log(capacity);
24
+
25
+ return (
26
+ Object.entries({ crew, capacity, test, length }).map(([key, value]) => {
27
+
28
+ // console.log(value);
29
+ // this is maybe where you can use generics to get around this check
30
+
31
+ // or if the next capacity data is a string
32
+ // so you create a string here from the object
33
+
34
+ if (typeof value !== 'string' && key && value) {
35
+
36
+ // console.log('🦖');
37
+
38
+ // * works but cant be type safe
39
+ // ? i guess you could wrap it in a typeof check
40
+ // so this is getting kinda ugly
41
+ if (key === 'length' && typeof value.data === 'number') {
42
+ return (
43
+ <section key={key}>
44
+ <h3>{key} - <Remainder inches={value.data} /></h3>
45
+ </section>
46
+ )
47
+ }
48
+
49
+ const combinedDataUnit = `${value.data} ${value.unit}`;
50
+ return (
51
+ <section key={key}>
52
+ <h3>{key} - {combinedDataUnit}</h3>
53
+ </section>
54
+ )
55
+ }
56
+
57
+ if (key && value) {
58
+
59
+ // console.log('🦄');
60
+
61
+ return (
62
+ <section key={key}>
63
+ <h3>{key} - {value}</h3>
64
+ </section>
65
+ )
66
+ }
67
+
68
+ return (
69
+ <section key={key}>
70
+ <h3>{key}</h3>
71
+ </section>
72
+ );
73
+ })
74
+ );
75
+ }
76
+
77
+
78
+
79
+ interface SpecProps {
80
+ primary?: boolean;
81
+ onClick?: () => void;
82
+ }
83
+
84
+ export const Spec = ({
85
+ primary = false,
86
+ ...props
87
+ }: SpecProps) => {
88
+
89
+ return (
90
+ <main
91
+ {...props}
92
+ >
93
+ <Spec3
94
+ crew={faker.helpers.arrayElement(['single', 'double'])}
95
+ capacity={{ data: faker.number.int(100), unit: "lbs" }}
96
+ />
97
+ </main>
98
+ );
99
+ };
@@ -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 { Svg } from './Svg';
5
+
6
+ const meta = {
7
+ component: Svg,
8
+ title: 'Atoms/Svg',
9
+ args: { onClick: fn() },
10
+ } satisfies Meta<typeof Svg>;
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,23 @@
1
+ // this is the Name.tsx file
2
+ import React from 'react';
3
+
4
+ import FacebookIcon from '../assets/facebook-icon';
5
+
6
+ interface SvgProps {
7
+ primary?: boolean;
8
+ onClick?: () => void;
9
+ }
10
+
11
+ export const Svg = ({
12
+ primary = false,
13
+ ...props
14
+ }: SvgProps) => {
15
+
16
+ return (
17
+ <main
18
+ {...props}
19
+ >
20
+ <FacebookIcon />
21
+ </main>
22
+ );
23
+ };
@@ -0,0 +1,51 @@
1
+ // Setting in px is dumb and not getting the name
2
+
3
+ import { Meta, Typeset } from "@storybook/blocks";
4
+
5
+ <Meta title="Typography" />
6
+
7
+ export const typography = {
8
+ type: {
9
+ primary: '"Barlow", Arial, sans-serif',
10
+ },
11
+ weight: {
12
+ regular: "400",
13
+ bold: "700",
14
+ extrabold: "800",
15
+ black: "900",
16
+ },
17
+ // Font sizes in pixels
18
+ size: {
19
+ everest: 3 * 16,
20
+ aconcagua: 2.5 * 16,
21
+ denali: 2 * 16,
22
+ kilimanjaro: 1.5 * 16,
23
+ elbrus: 1.25 * 16,
24
+ vinson: 16,
25
+ kosciuszko: 0.75 * 16,
26
+ },
27
+ };
28
+
29
+ export const SampleText =
30
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
31
+
32
+ # Typography
33
+
34
+ **Font:** Nunito Sans
35
+
36
+ **Weights:** 400(regular), 700(bold), 800(extrabold), 900(black)
37
+
38
+ <Typeset
39
+ fontSizes={[
40
+ Number(typography.size.kosciuszko),
41
+ Number(typography.size.vinson),
42
+ Number(typography.size.elbrus),
43
+ Number(typography.size.kilimanjaro),
44
+ Number(typography.size.denali),
45
+ Number(typography.size.aconcagua),
46
+ Number(typography.size.everest),
47
+ ]}
48
+ fontWeight={typography.weight.black}
49
+ sampleText={SampleText}
50
+ fontFamily={typography.type.primary}
51
+ />
@@ -35,12 +35,12 @@ export const Widths = ({
35
35
  return (
36
36
  <>
37
37
  <h1>Widths</h1>
38
- <WidthCard widths={['swan', 'vulture', 'stork', 'condor', 'pelican', 'albatross']} />
38
+ <WidthCard widths={['vulture', 'stork', 'condor', 'pelican', 'albatross']} />
39
39
  <hr />
40
40
  <h2>split</h2>
41
- <p>pelican hydra</p>
41
+ <p>pelican wrap</p>
42
42
  <div
43
- className='pelican hydra'
43
+ className='pelican wrap'
44
44
  style={{
45
45
  height: '100px',
46
46
  marginBlockEnd: '1rem',
@@ -52,14 +52,14 @@ export const Widths = ({
52
52
  backgroundColor: 'var(--mullen-300)',
53
53
  }}
54
54
  >
55
- hydra?
55
+ wrap
56
56
  </div>
57
57
  <div
58
58
  style={{
59
59
  backgroundColor: 'var(--mullen-300)',
60
60
  }}
61
61
  >
62
- hydra?
62
+ wrap
63
63
  </div>
64
64
  </div>
65
65
  </>
@@ -22,7 +22,8 @@ body {
22
22
  width: calc(100% - var(--kosciuszko) * 2);
23
23
  }
24
24
 
25
- .condor {
25
+ .condor,
26
+ .location {
26
27
  max-width: var(--condor);
27
28
  flex-basis: var(--condor);
28
29
  margin-inline: auto;
@@ -55,6 +56,7 @@ body {
55
56
  > * {
56
57
  flex: 1 1;
57
58
  width: 100%;
59
+ height: fit-content;
58
60
  }
59
61
  }
60
62
 
@@ -111,3 +113,34 @@ footer {
111
113
  gap: var(--kilimanjaro);
112
114
  margin-block-end: clamp(var(--kilimanjaro), 1.667vw, var(--aconcagua));
113
115
  }
116
+
117
+ /*------------------*/
118
+ /* #LOCATION */
119
+ /*------------------*/
120
+
121
+ .location-deck {
122
+ margin-block-end: var(--kilimanjaro);
123
+ }
124
+
125
+ .location {
126
+ display: flex;
127
+ flex-flow: row;
128
+ align-items: center;
129
+ gap: var(--elbrus);
130
+ padding: var(--elbrus);
131
+ border-radius: var(--card-radius);
132
+
133
+ > * {
134
+ flex: 7.5 1; /* guess and check to get the parking on one row in the footer */
135
+ }
136
+
137
+ > svg,
138
+ .svg {
139
+ flex: 1 1 max-content;
140
+ }
141
+ }
142
+
143
+ .location.false:not(:last-child) {
144
+ border-block-end: 1px solid;
145
+ border-radius: 0;
146
+ }
@@ -2,11 +2,12 @@
2
2
  /* #LINKS */
3
3
  /*------------------------------------*/
4
4
 
5
- a:where(:hover, :focus),
6
- a.hover {
5
+ a:where(:hover, :focus) {
7
6
  text-decoration: none;
8
7
  }
9
8
 
9
+ /*------------------------------------*/
10
+
10
11
  .link__subtle {
11
12
  text-decoration: none;
12
13
  }
@@ -14,3 +15,9 @@ a.hover {
14
15
  .link__subtle:where(:hover, :focus) {
15
16
  text-decoration: underline;
16
17
  }
18
+
19
+ /*------------------------------------*/
20
+
21
+ a svg {
22
+ transition: var(--fade);
23
+ }
@@ -93,7 +93,7 @@ svg {
93
93
  /* https://about.meta.com/brand/resources/instagram/instagram-brand/ */
94
94
 
95
95
  .instagram {
96
- filter: grayscale(100%);
96
+ filter: grayscale(100%) brightness(0%);
97
97
  mix-blend-mode: multiply;
98
98
 
99
99
  @media (prefers-color-scheme: dark) {
@@ -103,7 +103,7 @@ svg {
103
103
  }
104
104
 
105
105
  .instagram:hover {
106
- filter: grayscale(0%);
106
+ filter: grayscale(0%) brightness(100%);
107
107
  fill: revert-layer;
108
108
  mix-blend-mode: normal;
109
109
 
@@ -0,0 +1,24 @@
1
+ export interface LocationCardTypes {
2
+ id: React.Key;
3
+ svg: string;
4
+ name: string;
5
+ link: string;
6
+ address: {
7
+ data: {
8
+ address: string;
9
+ };
10
+ };
11
+ description: {
12
+ data: {
13
+ description: string;
14
+ };
15
+ };
16
+ opening_time: string;
17
+ closing_time: string;
18
+
19
+ locale: {
20
+ season_start: string;
21
+ season_end: string;
22
+ };
23
+ background?: string;
24
+ }
@@ -1,48 +0,0 @@
1
- // this is the Name.tsx file
2
- import React from 'react';
3
-
4
- function ColorCards({ color, variables }) {
5
- return (
6
- <div>
7
- <h2>{color}</h2>
8
- {variables.map((variable) => (
9
- <div
10
- key={variable}
11
- style={{
12
- backgroundColor: `var(--${color}-${variable})`,
13
- padding: '1rem',
14
- margin: '1rem',
15
- borderRadius: '0.5rem',
16
- color: 'white',
17
- textAlign: 'center',
18
- }}
19
- >
20
- {`--${color}-${variable}`}
21
- </div>
22
- ))}
23
- </div>
24
- );
25
- }
26
-
27
- interface ColorsProps {
28
- primary?: boolean;
29
- onClick?: () => void;
30
- }
31
-
32
- export const Colors = ({
33
- primary = false,
34
- ...props
35
- }: ColorsProps) => {
36
-
37
- return (
38
- <main
39
- {...props}
40
- >
41
- {primary ? 'primary' : 'secondary'}
42
- <ColorCards
43
- color="navy"
44
- variables={[100, 200]}
45
- />
46
- </main>
47
- );
48
- };