@rileybathurst/paddle 1.9.47 → 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.47",
4
+ "version": "1.9.48",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "tsc --noEmit && stay-gold && vite",
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
+ };
@@ -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
  /*------------------*/
@@ -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
+ }