@rileybathurst/paddle 1.9.46 → 1.9.48

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": "1.9.46",
4
+ "version": "1.9.48",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "tsc --noEmit && stay-gold && vite",
package/src/App.tsx CHANGED
@@ -1,10 +1,11 @@
1
1
  // * this is the opening vite page to test functions with
2
+ // TODO: faker
2
3
 
3
4
  import { useState } from 'react'
4
5
  import reactLogo from './assets/react.svg'
5
6
  import viteLogo from '/vite.svg'
6
7
  import { PaddlePricingChart } from './paddle-pricing-chart'
7
- import { PaddleCompare } from './paddle-compare'
8
+ // import { PaddleCompare } from './paddle-compare'
8
9
 
9
10
  function App() {
10
11
  const [count, setCount] = useState(0)
@@ -96,7 +97,7 @@ function App() {
96
97
  }}
97
98
  />
98
99
 
99
- <PaddleCompare
100
+ {/* <PaddleCompare
100
101
  peek_base="123"
101
102
  strapiBranchName="south-tahoe"
102
103
  tours={[
@@ -149,7 +150,7 @@ function App() {
149
150
  peek: "101112"
150
151
  }
151
152
  ]}
152
- />
153
+ /> */}
153
154
  </>
154
155
  )
155
156
  }
package/src/index.tsx CHANGED
@@ -20,6 +20,7 @@ export * from "./paddle-purchase";
20
20
  export * from "./paddle-pricing-chart";
21
21
  export * from "./paddle-texture-backgrounds";
22
22
  export * from "./paddle-compare";
23
+ export * from "./paddle-card";
23
24
 
24
25
  // Organisms
25
26
  export * from "./paddle-location-deck";
@@ -44,4 +45,5 @@ export * from "./types/paddle-purchase-image-types";
44
45
  export * from "./types/paddle-brand-list-types";
45
46
  export * from "./types/paddle-book-now-types";
46
47
  export * from "./types/paddle-testimonial-types";
47
- export * from "./types/paddle-compare-types";
48
+ export * from "./types/paddle-compare-types";
49
+ export * from "./types/paddle-card-types";
@@ -0,0 +1,30 @@
1
+ import * as React from "react"
2
+ import { Link } from 'gatsby';
3
+ import { PaddleBookNow } from "./paddle-book-now";
4
+ import { GatsbyImage } from "gatsby-plugin-image";
5
+ import type { PaddleCardTypes } from "./types/paddle-card-types";
6
+
7
+ export const PaddleCard = ({ link, image, title, excerpt, paddleBookNow }: PaddleCardTypes) => {
8
+ return (
9
+ <article className='card'>
10
+ <Link to={link} >
11
+ <GatsbyImage
12
+ image={image.localFile.childImageSharp.gatsbyImageData}
13
+ alt={image.alternativeText || title}
14
+ />
15
+ <h4>{title}</h4>
16
+ <p>{excerpt}</p>
17
+ </Link>
18
+
19
+ {paddleBookNow && (
20
+ <PaddleBookNow
21
+ peek_base={paddleBookNow.peek_base}
22
+ strapiBranchName={paddleBookNow.strapiBranchName}
23
+ specificName={paddleBookNow.specificName}
24
+ specificLink={paddleBookNow.specificLink}
25
+ />
26
+ )}
27
+ </article>
28
+
29
+ );
30
+ };
@@ -60,6 +60,10 @@ const CompareDetails = ({
60
60
  timeframe: timeframe,
61
61
  });
62
62
 
63
+ if (sport === "sup") {
64
+ sport = "Paddleboard";
65
+ }
66
+
63
67
  return (
64
68
  <section>
65
69
  <select
@@ -84,7 +88,7 @@ const CompareDetails = ({
84
88
  <GatsbyImage
85
89
  image={ogimage.localFile.childImageSharp.gatsbyImageData}
86
90
  alt={ogimage.alternativeText || name}
87
- className="comparesheet_image"
91
+ className="comparesheet_image img__wrapped"
88
92
  />
89
93
  ) : <div>&nbsp;</div>}
90
94
 
@@ -176,7 +180,7 @@ export const PaddleCompare = ({ tours, breadcrumb, strapiBranchName, peek_base }
176
180
  setMinimum1(selectedTour.minimum || 0);
177
181
  setPrice1(selectedTour.price || 0);
178
182
  setPeeks1(selectedTour.peek || "not set");
179
- setFitness1(selectedTour.fitness || "fitness");
183
+ setFitness1(selectedTour.fitness || "not set");
180
184
  };
181
185
 
182
186
  const updateTour2 = (selectedName: string) => {
@@ -196,7 +200,7 @@ export const PaddleCompare = ({ tours, breadcrumb, strapiBranchName, peek_base }
196
200
  setMinimum2(selectedTour.minimum || 0);
197
201
  setPrice2(selectedTour.price || 0);
198
202
  setPeeks2(selectedTour.peek || "not set");
199
- setFitness2(selectedTour.fitness || "fitness");
203
+ setFitness2(selectedTour.fitness || "not set");
200
204
  };
201
205
 
202
206
  return (
@@ -1,13 +1,42 @@
1
+ /*------------------------------------*/
2
+ /* #DECK */
3
+ /*------------------------------------*/
4
+
5
+ .card,
6
+ .bag,
7
+ .flight {
8
+ margin-block-end: var(--aconcagua);
9
+
10
+ display: grid;
11
+
12
+ /* * iPhone size breaks without this */
13
+ grid-template-columns: 1fr;
14
+
15
+ /* * guess and check */
16
+ @media (min-width: 29rem) {
17
+ grid-template-columns: repeat(auto-fill, minmax(var(--condor), 1fr));
18
+ }
19
+ }
20
+
21
+ .card:empty,
22
+ .bag:empty,
23
+ .flight:empty {
24
+ display: none;
25
+ }
26
+
1
27
  /*------------------*/
2
28
  /* #CARDS */
3
29
  /*------------------*/
4
30
 
31
+ .card,
5
32
  .purchase,
6
33
  .ticket {
7
34
  background-color: white;
8
35
  border: 1px solid var(--neutral-200);
9
36
  border-radius: var(--card-radius);
10
37
  padding: var(--kosciuszko);
38
+ width: calc(100% - 2 * var(--kosciuszko));
39
+ height: calc(100% - 2 * var(--kosciuszko));
11
40
 
12
41
  @media (prefers-color-scheme: light) {
13
42
  box-shadow: var(--penumbra);
@@ -19,7 +48,7 @@
19
48
  }
20
49
  }
21
50
 
22
-
51
+ .card:hover,
23
52
  .purchase:hover,
24
53
  .ticket:hover {
25
54
  p {
@@ -31,6 +60,12 @@
31
60
  }
32
61
  }
33
62
 
63
+ .card {
64
+ display: flex;
65
+ flex-direction: column;
66
+ gap: var(--kosciuszko);
67
+ }
68
+
34
69
  /*------------------*/
35
70
  /* #RETAIL LOGO */
36
71
  /*------------------*/
@@ -84,22 +84,10 @@ ol {
84
84
  ul {
85
85
  list-style: none;
86
86
  padding-inline-start: 0;
87
- display: flex;
88
- flex-flow: row wrap;
89
- gap: var(--vinson);
90
87
 
91
88
  li {
92
- height: 2lh;
93
- margin-block-end: 1lh;
94
-
95
- @supports not (margin: 1lh) {
96
- height: var(--aconcagua);
97
- margin-block-end: var(--elbrus);
98
- }
99
- }
100
-
101
- li:last-child {
102
- border-bottom: none;
89
+ line-height: 1.5lh;
90
+ margin-block-end: 0; /* reset */
103
91
  }
104
92
  }
105
93
  }
@@ -164,6 +164,12 @@ svg {
164
164
  .img__wrapped {
165
165
  border-radius: 0.25rem;
166
166
  box-shadow: var(--penumbra);
167
+
168
+ border: 1px solid white;
169
+
170
+ @media (prefers-color-scheme: dark) {
171
+ border: 1px solid black;
172
+ }
167
173
  }
168
174
 
169
175
  .crop {
@@ -2,16 +2,6 @@
2
2
  /* #PURCHASE */
3
3
  /*------------------------------------*/
4
4
 
5
- .bag {
6
- margin-block-end: var(--aconcagua);
7
-
8
- display: grid;
9
- grid-template-columns: repeat(auto-fill, minmax(var(--condor), 1fr));
10
-
11
- /* TODO: clamp */
12
- gap: var(--kosciuszko);
13
- }
14
-
15
5
  /* * specific type of a card */
16
6
  .purchase {
17
7
  padding: 0;
@@ -22,7 +12,6 @@
22
12
  /* needed to control nested elements */
23
13
  text-decoration: none;
24
14
  box-shadow: var(--penumbra);
25
- max-width: calc(100vw - 2rem);
26
15
 
27
16
  .purchase-collage {
28
17
  display: grid;
@@ -2,27 +2,7 @@
2
2
  /* #TICKET */
3
3
  /*------------------------------------*/
4
4
 
5
- .flight {
6
- margin-block-end: var(--aconcagua);
7
-
8
- display: grid;
9
-
10
- /* * iPhone size breaks without this */
11
- grid-template-columns: 1fr;
12
-
13
- /* * guess and check */
14
- @media (min-width: 29rem) {
15
- grid-template-columns: repeat(auto-fill, minmax(var(--condor), 1fr));
16
- }
17
- }
18
-
19
- .flight:empty {
20
- display: none;
21
- }
22
-
23
5
  .ticket {
24
- width: calc(100% - 2 * var(--kosciuszko));
25
- height: calc(100% - 2 * var(--kosciuszko));
26
6
 
27
7
  img {
28
8
  width: 100%;
@@ -0,0 +1,10 @@
1
+ import type { PaddleGatsbyImageType } from "./paddle-gatsby-image-type";
2
+ import type { PaddleBookNowTypes } from "./paddle-book-now-types";
3
+
4
+ export type PaddleCardTypes = {
5
+ link: string;
6
+ image: PaddleGatsbyImageType;
7
+ title: string;
8
+ excerpt: string;
9
+ paddleBookNow?: PaddleBookNowTypes;
10
+ }