@rileybathurst/paddle 0.0.35 → 0.0.37
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 +2 -1
- package/src/PaddleTicket.tsx +53 -0
- package/src/index.tsx +10 -0
- package/src/stories/Page.tsx +8 -6
- package/src/stories/Widths.tsx +101 -17
- package/src/styles/layout.css +28 -18
- package/src/styles/typography.css +8 -0
- package/src/types/ticket-types.ts +19 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rileybathurst/paddle",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.37",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"color-cards": "^1.0.14",
|
|
16
16
|
"gatsby": "^5.13.6",
|
|
17
|
+
"gatsby-plugin-image": "^3.13.1",
|
|
17
18
|
"react": "^18.2.0",
|
|
18
19
|
"react-aria-components": "^1.2.1",
|
|
19
20
|
"react-dom": "^18.2.0",
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Link } from "gatsby"
|
|
3
|
+
import { GatsbyImage } from "gatsby-plugin-image"
|
|
4
|
+
import type { TicketTypes } from "./types/ticket-types"
|
|
5
|
+
import { PaddleTime } from "./PaddleTime"
|
|
6
|
+
|
|
7
|
+
export function PaddleTicket({ ogimage, slug, name, start, finish, duration, timeframe, fitness, excerpt, price, peek }: TicketTypes) {
|
|
8
|
+
|
|
9
|
+
const time = PaddleTime({
|
|
10
|
+
start: start,
|
|
11
|
+
finish: finish,
|
|
12
|
+
duration: duration,
|
|
13
|
+
timeframe: timeframe,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<section className="ticket">
|
|
18
|
+
<Link to={`/tours/${slug}`}>
|
|
19
|
+
<GatsbyImage
|
|
20
|
+
image={ogimage?.localFile?.childImageSharp?.gatsbyImageData}
|
|
21
|
+
alt={`${ogimage?.alternativeText || name} image`}
|
|
22
|
+
objectFit="cover"
|
|
23
|
+
className="card__image"
|
|
24
|
+
/>
|
|
25
|
+
</Link>
|
|
26
|
+
<h4 className="card__title">
|
|
27
|
+
<Link to={`/tours/${slug}`}>
|
|
28
|
+
{name}
|
|
29
|
+
</Link>
|
|
30
|
+
</h4>
|
|
31
|
+
<div className="card__specs">
|
|
32
|
+
<h4>{time.entry}</h4>
|
|
33
|
+
{/* // TODO: I'd like a spec backup here */}
|
|
34
|
+
{fitness ? <h4 className="capitalize">{fitness} <span>Fitness</span></h4> : null}
|
|
35
|
+
</div>
|
|
36
|
+
<hr />
|
|
37
|
+
<p>{excerpt}</p>
|
|
38
|
+
<hr />
|
|
39
|
+
<div className="card__details">
|
|
40
|
+
<h5>${price}</h5>
|
|
41
|
+
<a
|
|
42
|
+
href={peek}
|
|
43
|
+
target="_blank"
|
|
44
|
+
rel="noopener noreferrer"
|
|
45
|
+
className="book-now"
|
|
46
|
+
>
|
|
47
|
+
BOOK NOW
|
|
48
|
+
</a>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
</section>
|
|
52
|
+
)
|
|
53
|
+
}
|
package/src/index.tsx
CHANGED
|
@@ -13,9 +13,19 @@ export * from "./PaddleComposition";
|
|
|
13
13
|
export * from "./PaddleSocials";
|
|
14
14
|
export * from "./PaddleLocationCard";
|
|
15
15
|
export * from "./PaddleTestimonials";
|
|
16
|
+
export * from "./PaddleTicket";
|
|
16
17
|
|
|
17
18
|
// Organisms
|
|
18
19
|
export * from "./PaddleLocationDeck";
|
|
19
20
|
|
|
20
21
|
// Test a function
|
|
21
22
|
export * from "./PaddleTestimonials";
|
|
23
|
+
|
|
24
|
+
// Templates
|
|
25
|
+
|
|
26
|
+
// Pages
|
|
27
|
+
|
|
28
|
+
// TODO: test
|
|
29
|
+
// Types
|
|
30
|
+
export * from "./types/ticket-types";
|
|
31
|
+
export * from "./types/location-card-types";
|
package/src/stories/Page.tsx
CHANGED
|
@@ -11,13 +11,15 @@ export const Page = () => {
|
|
|
11
11
|
return (
|
|
12
12
|
<>
|
|
13
13
|
<Header />
|
|
14
|
-
<main className="
|
|
14
|
+
<main className="albatross wrap">
|
|
15
15
|
<section>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<
|
|
16
|
+
<div className='pelican'>
|
|
17
|
+
<h2 className="page-title">
|
|
18
|
+
{faker.company.catchPhrase()}
|
|
19
|
+
</h2>
|
|
20
|
+
<div className="margin-block-end-aconcagua">
|
|
21
|
+
<p>{faker.lorem.sentences(5)}</p>
|
|
22
|
+
</div>
|
|
21
23
|
</div>
|
|
22
24
|
|
|
23
25
|
<LocationDeck
|
package/src/stories/Widths.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// this is the Name.tsx file
|
|
2
|
+
import { faker } from '@faker-js/faker';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
|
|
4
5
|
function WidthCard({ widths }) {
|
|
@@ -6,22 +7,92 @@ function WidthCard({ widths }) {
|
|
|
6
7
|
<>
|
|
7
8
|
{widths.map((width) => (
|
|
8
9
|
<div
|
|
10
|
+
className={width}
|
|
9
11
|
style={{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
backgroundColor: 'var(--mullen-300)',
|
|
12
|
+
minHeight: '8rem',
|
|
13
|
+
backgroundColor: 'var(--kingly-cloud)',
|
|
13
14
|
marginInline: 'auto',
|
|
14
|
-
marginBlockEnd: '
|
|
15
|
-
|
|
15
|
+
marginBlockEnd: 'var(--vinson)',
|
|
16
|
+
paddingBlock: 'var(--vinson)',
|
|
17
|
+
color: 'var(--black-out)',
|
|
16
18
|
}}
|
|
17
19
|
>
|
|
18
|
-
{width}
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
{width}<br />
|
|
21
|
+
{/* {faker.string.fromCharacters('abc', { min: 45, max: 90 })} */}
|
|
22
|
+
<p
|
|
23
|
+
className='white-space'
|
|
24
|
+
style={{
|
|
25
|
+
color: 'var(--navy-400)'
|
|
26
|
+
}}>
|
|
27
|
+
{faker.string.fromCharacters('abcdefghijklmnopqrstuvwxyz', { min: 45, max: 45 })}
|
|
28
|
+
</p>
|
|
29
|
+
<p
|
|
30
|
+
className='white-space'
|
|
31
|
+
style={{
|
|
32
|
+
color: 'var(--mullen-100)'
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
{faker.string.fromCharacters('abcdefghijklmnopqrstuvwxyz', { min: 90, max: 90 })}
|
|
36
|
+
</p>
|
|
37
|
+
</div >
|
|
38
|
+
))
|
|
39
|
+
}
|
|
21
40
|
</>
|
|
22
41
|
);
|
|
23
42
|
}
|
|
24
43
|
|
|
44
|
+
function WarpCards({ widths }) {
|
|
45
|
+
return (
|
|
46
|
+
<>
|
|
47
|
+
{widths.map((width) => (
|
|
48
|
+
<div
|
|
49
|
+
key={width}
|
|
50
|
+
className={`${width} wrap`}
|
|
51
|
+
style={{
|
|
52
|
+
minHeight: '8rem',
|
|
53
|
+
marginBlockEnd: 'var(--vinson)',
|
|
54
|
+
paddingBlock: 'var(--vinson)',
|
|
55
|
+
backgroundColor: 'var(--kingly-cloud)',
|
|
56
|
+
color: 'grey',
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
<div
|
|
60
|
+
// className='white-space'
|
|
61
|
+
style={{
|
|
62
|
+
paddingBlock: 'var(--vinson)',
|
|
63
|
+
backgroundColor: 'var(--tin-soldier)',
|
|
64
|
+
color: 'var(--navy-400)'
|
|
65
|
+
}}
|
|
66
|
+
>
|
|
67
|
+
{width} wrap
|
|
68
|
+
{/* 45 char min */}
|
|
69
|
+
<br />
|
|
70
|
+
{/* {faker.string.fromCharacters('abc', { min: 45, max: 90 })} */}
|
|
71
|
+
{/* // * adding the string breaks the wraps */}
|
|
72
|
+
{/* // ? maybe I do this with a ref and give it colors based on sizing */}
|
|
73
|
+
{/* {faker.string.fromCharacters('abcdefghijklmnopqrstuvwxyz', { min: 45, max: 45 })} */}
|
|
74
|
+
{faker.lorem.sentence()}
|
|
75
|
+
</div>
|
|
76
|
+
<div
|
|
77
|
+
// className='white-space'
|
|
78
|
+
style={{
|
|
79
|
+
paddingBlock: 'var(--vinson)',
|
|
80
|
+
backgroundColor: 'var(--tin-soldier)',
|
|
81
|
+
color: 'var(--mullen-100)'
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
{width} wrap
|
|
85
|
+
{/* 90 char max */}
|
|
86
|
+
<br />
|
|
87
|
+
{/* {faker.string.fromCharacters('abcdefghijklmnopqrstuvwxyz', { min: 90, max: 90 })} */}
|
|
88
|
+
{faker.lorem.sentence()}
|
|
89
|
+
</div>
|
|
90
|
+
</div >
|
|
91
|
+
))}
|
|
92
|
+
</>
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
|
|
25
96
|
interface WidthsProps {
|
|
26
97
|
primary?: boolean;
|
|
27
98
|
onClick?: () => void;
|
|
@@ -36,32 +107,45 @@ export const Widths = ({
|
|
|
36
107
|
<>
|
|
37
108
|
<h1>Widths</h1>
|
|
38
109
|
<WidthCard widths={['vulture', 'stork', 'condor', 'pelican', 'albatross']} />
|
|
110
|
+
<p>condor is good for measure</p>
|
|
39
111
|
<hr />
|
|
40
112
|
<h2>split</h2>
|
|
41
|
-
<
|
|
113
|
+
<WarpCards widths={['condor', 'pelican', 'albatross']} />
|
|
114
|
+
<p>pelican split is good for measure</p>
|
|
115
|
+
<h3>Nested Wraps</h3>
|
|
42
116
|
<div
|
|
43
|
-
className='
|
|
117
|
+
className='albatross wrap'
|
|
44
118
|
style={{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
color: 'white',
|
|
119
|
+
paddingBlock: 'var(--vinson)',
|
|
120
|
+
backgroundColor: 'var(--kingly-cloud)',
|
|
48
121
|
}}
|
|
49
122
|
>
|
|
123
|
+
{/* // TODO: doesnt work yet still controlled by the star, might just be ordering */}
|
|
50
124
|
<div
|
|
51
125
|
style={{
|
|
52
|
-
backgroundColor: 'var(--
|
|
126
|
+
backgroundColor: 'var(--tin-soldier)',
|
|
53
127
|
}}
|
|
54
128
|
>
|
|
55
|
-
|
|
129
|
+
{/* {faker.string.fromCharacters('abcdefghijklmnopqrstuvwxyz', { min: 45, max: 45 })} */}
|
|
130
|
+
{/* <p className='text-center'>{faker.lorem.sentence()}</p> */}
|
|
131
|
+
|
|
132
|
+
<section className='pelican'>
|
|
133
|
+
Double nested with the pelican inside the next layer down also stops the problems
|
|
134
|
+
<p>{faker.lorem.paragraphs()}</p>
|
|
135
|
+
</section>
|
|
56
136
|
</div>
|
|
57
137
|
<div
|
|
58
138
|
style={{
|
|
59
|
-
backgroundColor: 'var(--
|
|
139
|
+
backgroundColor: 'var(--tin-soldier)',
|
|
60
140
|
}}
|
|
61
141
|
>
|
|
62
|
-
|
|
142
|
+
{/* {faker.string.fromCharacters('abcdefghijklmnopqrstuvwxyz', { min: 90, max: 90 })} */}
|
|
143
|
+
<section className='pelican'>
|
|
144
|
+
<p>{faker.lorem.paragraphs()}</p>
|
|
145
|
+
</section>
|
|
63
146
|
</div>
|
|
64
147
|
</div>
|
|
148
|
+
<p>Albatross is too wide to run text on a traditional wrap, pelican is wide on this but fits better than condor</p>
|
|
65
149
|
</>
|
|
66
150
|
);
|
|
67
151
|
};
|
package/src/styles/layout.css
CHANGED
|
@@ -6,44 +6,41 @@ body {
|
|
|
6
6
|
margin: 0; /* reset */
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.vulture
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
.vulture,
|
|
10
|
+
.stork,
|
|
11
|
+
.condor,
|
|
12
|
+
.pelican,
|
|
13
|
+
.albatross,
|
|
14
|
+
.location {
|
|
12
15
|
margin-inline: auto;
|
|
13
16
|
padding-inline: var(--kosciuszko);
|
|
14
17
|
width: calc(100% - var(--kosciuszko) * 2);
|
|
15
18
|
}
|
|
16
19
|
|
|
20
|
+
.vulture {
|
|
21
|
+
max-width: var(--vulture);
|
|
22
|
+
flex-basis: var(--vulture);
|
|
23
|
+
}
|
|
24
|
+
|
|
17
25
|
.stork {
|
|
18
26
|
max-width: var(--stork);
|
|
19
27
|
flex-basis: var(--stork);
|
|
20
|
-
margin-inline: auto;
|
|
21
|
-
padding-inline: var(--kosciuszko);
|
|
22
|
-
width: calc(100% - var(--kosciuszko) * 2);
|
|
23
28
|
}
|
|
24
29
|
|
|
25
30
|
.condor,
|
|
26
31
|
.location {
|
|
27
32
|
max-width: var(--condor);
|
|
28
33
|
flex-basis: var(--condor);
|
|
29
|
-
margin-inline: auto;
|
|
30
|
-
padding-inline: var(--kosciuszko);
|
|
31
|
-
width: calc(100% - var(--kosciuszko) * 2);
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
.pelican {
|
|
35
37
|
max-width: var(--pelican);
|
|
36
38
|
flex-basis: var(--pelican);
|
|
37
|
-
margin-inline: auto;
|
|
38
|
-
padding-inline: var(--kosciuszko);
|
|
39
|
-
width: calc(100% - var(--kosciuszko) * 2);
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
.albatross {
|
|
43
42
|
max-width: var(--albatross);
|
|
44
43
|
flex-basis: var(--albatross);
|
|
45
|
-
margin-inline: auto;
|
|
46
|
-
width: calc(100% - var(--kosciuszko) * 2);
|
|
47
44
|
}
|
|
48
45
|
|
|
49
46
|
/*------------------------------------*/
|
|
@@ -52,6 +49,7 @@ body {
|
|
|
52
49
|
display: flex;
|
|
53
50
|
flex-flow: row wrap;
|
|
54
51
|
gap: clamp(var(--kosciuszko), 1.667vw, var(--denali));
|
|
52
|
+
padding-inline: var(--kosciuszko);
|
|
55
53
|
|
|
56
54
|
> * {
|
|
57
55
|
flex: 1 1;
|
|
@@ -60,17 +58,29 @@ body {
|
|
|
60
58
|
}
|
|
61
59
|
}
|
|
62
60
|
|
|
63
|
-
.pelican.wrap >
|
|
64
|
-
|
|
61
|
+
.pelican.wrap > *,
|
|
62
|
+
.albatross.wrap > * {
|
|
65
63
|
max-width: none;
|
|
66
64
|
margin-inline: 0;
|
|
67
65
|
padding-inline: 0;
|
|
68
66
|
}
|
|
69
67
|
|
|
68
|
+
.pelican.wrap > * {
|
|
69
|
+
flex: 1 1 calc(var(--pelican) / 2 - 1rem);
|
|
70
|
+
}
|
|
71
|
+
|
|
70
72
|
.albatross.wrap > * {
|
|
71
73
|
flex: 1 1 calc(var(--albatross) / 2 - 1rem);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/*------------------------------------*/
|
|
77
|
+
/* #NESTED */
|
|
78
|
+
/*------------------------------------*/
|
|
79
|
+
|
|
80
|
+
/* this isnt a direct nested its always down another layer */
|
|
81
|
+
.albatross .pelican {
|
|
82
|
+
/* ? margin-inline: 0; ? should this be centered */
|
|
83
|
+
width: 100%; /* resets the padding */
|
|
74
84
|
padding-inline: 0;
|
|
75
85
|
}
|
|
76
86
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IGatsbyImageData } from "gatsby-plugin-image";
|
|
2
|
+
|
|
3
|
+
export interface TicketTypes {
|
|
4
|
+
id: React.Key;
|
|
5
|
+
ogimage: {
|
|
6
|
+
localFile: { childImageSharp: { gatsbyImageData: IGatsbyImageData } };
|
|
7
|
+
alternativeText?: string;
|
|
8
|
+
};
|
|
9
|
+
slug: string;
|
|
10
|
+
name: string;
|
|
11
|
+
start?: string | null;
|
|
12
|
+
finish?: string | null;
|
|
13
|
+
duration?: number | null;
|
|
14
|
+
timeframe?: string | null;
|
|
15
|
+
fitness?: string | null;
|
|
16
|
+
excerpt: string;
|
|
17
|
+
price: string;
|
|
18
|
+
peek: string;
|
|
19
|
+
}
|