@rileybathurst/paddle 0.0.125 → 1.0.1

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.125",
4
+ "version": "1.0.1",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -13,36 +13,34 @@
13
13
  "build-storybook": "storybook build"
14
14
  },
15
15
  "dependencies": {
16
- "color-cards": "^1.0.15",
17
- "gatsby": "^5.13.6",
18
- "gatsby-plugin-image": "^3.13.1",
19
- "react": "^18.2.0",
20
- "react-aria-components": "^1.2.1",
21
- "react-dom": "^18.2.0",
22
- "react-markdown": "^9.0.1"
16
+ "color-cards": "^1.0.18",
17
+ "gatsby": "^5.14.3",
18
+ "gatsby-plugin-image": "^3.14.0",
19
+ "postcss-dark-theme-class": "^1.3.0",
20
+ "react": "^18.3.1",
21
+ "react-aria-components": "^1.10.0",
22
+ "react-dom": "^18.3.1",
23
+ "react-markdown": "^10.1.0"
23
24
  },
24
25
  "devDependencies": {
25
- "@chromatic-com/storybook": "^1.3.4",
26
- "@faker-js/faker": "^8.4.1",
27
- "@storybook/addon-essentials": "^8.0.10",
28
- "@storybook/addon-interactions": "^8.0.10",
29
- "@storybook/addon-links": "^8.0.10",
30
- "@storybook/blocks": "^8.0.10",
31
- "@storybook/react": "^8.0.10",
32
- "@storybook/react-vite": "^8.0.10",
33
- "@storybook/test": "^8.0.10",
34
- "@types/react": "^18.2.66",
35
- "@types/react-dom": "^18.2.22",
36
- "@typescript-eslint/eslint-plugin": "^7.2.0",
37
- "@typescript-eslint/parser": "^7.2.0",
38
- "@vitejs/plugin-react": "^4.2.1",
39
- "eslint": "^8.57.0",
40
- "eslint-plugin-react-hooks": "^4.6.0",
41
- "eslint-plugin-react-refresh": "^0.4.6",
42
- "eslint-plugin-storybook": "^0.8.0",
43
- "storybook": "^8.0.10",
44
- "typescript": "^5.2.2",
45
- "vite": "^5.2.0"
26
+ "@chromatic-com/storybook": "^4.0.0",
27
+ "@faker-js/faker": "^9.8.0",
28
+ "@storybook/addon-docs": "^9.0.11",
29
+ "@storybook/addon-links": "^9.0.11",
30
+ "@storybook/addon-themes": "^9.0.11",
31
+ "@storybook/react-vite": "^9.0.11",
32
+ "@types/react": "^19.1.6",
33
+ "@types/react-dom": "^19.1.6",
34
+ "@typescript-eslint/eslint-plugin": "^8.33.1",
35
+ "@typescript-eslint/parser": "^8.33.1",
36
+ "@vitejs/plugin-react": "^4.5.1",
37
+ "eslint": "^9.28.0",
38
+ "eslint-plugin-react-hooks": "^5.2.0",
39
+ "eslint-plugin-react-refresh": "^0.4.20",
40
+ "eslint-plugin-storybook": "^9.0.11",
41
+ "storybook": "^9.0.11",
42
+ "typescript": "^5.8.3",
43
+ "vite": "^6.3.5"
46
44
  },
47
45
  "description": "building blocks",
48
46
  "main": "src/index.tsx",
@@ -52,5 +50,8 @@
52
50
  "files": [
53
51
  "src/*",
54
52
  "!src/stories"
55
- ]
53
+ ],
54
+ "overrides": {
55
+ "storybook": "$storybook"
56
+ }
56
57
  }
@@ -1,8 +1,7 @@
1
+ // TODO: this isnt finished but hasnt been implemented yet
1
2
  import * as React from "react"
2
- // ! this isnt finished it wont have faker when its done
3
3
  import { faker } from '@faker-js/faker';
4
4
 
5
-
6
5
  interface CompositionTypes {
7
6
  sport?: string;
8
7
  }
@@ -39,6 +39,7 @@ function Season({ name, season_start, season_end, opening_time, closing_time, of
39
39
  )
40
40
  }
41
41
 
42
+ // outside of season
42
43
  return (
43
44
  <div>
44
45
  <p>We&apos;re closed for the season</p>
@@ -52,19 +53,17 @@ function Season({ name, season_start, season_end, opening_time, closing_time, of
52
53
  ) : null}
53
54
 
54
55
  {offSeasonDetails ? (
55
- <p>
56
- {offSeasonDetails}
57
- </p>
56
+ <p>{offSeasonDetails}</p>
58
57
  ) : null}
59
58
  </div>
60
59
  )
61
60
  }
62
61
 
62
+ // no season defaults to off season
63
+ // TODO: add some enum error messages here for if this is allowed to not have a season
63
64
  return (
64
65
  <div>
65
- <p>
66
- We&apos;re closed for the season
67
- </p>
66
+ <p>We&apos;re closed for the season</p>
68
67
  {offSeasonDetails ? (
69
68
  <p>{offSeasonDetails}</p>
70
69
  ) : null}
@@ -126,7 +125,16 @@ function Content({ svg, name, address, description, opening_time, closing_time,
126
125
 
127
126
  (<>
128
127
  <h3 className="elbrus">{name}</h3>
129
- <Markdown className="react-markdown">
128
+
129
+ <Markdown
130
+ components={{
131
+ div: ({ children, ...props }) => (
132
+ <div className="react-markdown" {...props}>
133
+ {children}
134
+ </div>
135
+ )
136
+ }}
137
+ >
130
138
  {address.data.address}
131
139
  </Markdown>
132
140
  </>)}
@@ -134,7 +142,6 @@ function Content({ svg, name, address, description, opening_time, closing_time,
134
142
  </div>
135
143
 
136
144
  <div>
137
-
138
145
  {opening_time && closing_time ? (
139
146
  <Season
140
147
  season_start={season_start}
@@ -145,9 +152,11 @@ function Content({ svg, name, address, description, opening_time, closing_time,
145
152
  offSeasonDetails={offSeasonDetails}
146
153
  />
147
154
  ) : (
148
- <Markdown className="react-markdown" >
155
+ <div className="react-markdown">
156
+ <Markdown>
149
157
  {description.data.description}
150
158
  </Markdown>
159
+ </div>
151
160
  )}
152
161
  </div>
153
162
  </>
@@ -156,6 +165,8 @@ function Content({ svg, name, address, description, opening_time, closing_time,
156
165
 
157
166
  export function PaddleLocationCard({ svg, name, link, address, description, opening_time, closing_time, background, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end, phone, offSeasonDetails }: LocationCardTypes) {
158
167
 
168
+ const phoneNumber = Number(phone);
169
+
159
170
  if (link.includes('http')) {
160
171
  return (
161
172
  <div className="location-wrapper">
@@ -186,7 +197,7 @@ export function PaddleLocationCard({ svg, name, link, address, description, open
186
197
 
187
198
  />
188
199
  </a>
189
- {name === "On Water Rental" && phone ? <Phone phone={phone} /> : null}
200
+ {name === "On Water Rental" && phone ? <Phone phone={phoneNumber} /> : null}
190
201
  </div>
191
202
  )
192
203
  }
@@ -217,7 +228,7 @@ export function PaddleLocationCard({ svg, name, link, address, description, open
217
228
 
218
229
  />
219
230
  </Link>
220
- {name === "On Water Rental" && phone ? <Phone phone={phone} /> : null}
231
+ {name === "On Water Rental" && phone ? <Phone phone={phoneNumber} /> : null}
221
232
  </div>
222
233
  )
223
234
  }
@@ -4,7 +4,7 @@ import type { LocationCardTypes } from "./types/location-card-types";
4
4
 
5
5
  interface LocationDeckTypes {
6
6
  background?: string;
7
- season_start?: string;
7
+ season_start?: string; // ? should this be optional? it created a problem with tours
8
8
  season_end?: string;
9
9
  phone?: string;
10
10
  nodes: LocationCardTypes[];
package/src/PaddleSEO.tsx CHANGED
@@ -54,7 +54,9 @@ type SEOtypes = {
54
54
  strapiLocale: {
55
55
  name: string;
56
56
  topbar: {
57
- topbar: string;
57
+ data: {
58
+ topbar: string;
59
+ };
58
60
  };
59
61
  url: string;
60
62
  themeColor: string;
@@ -12,6 +12,7 @@ export function PaddleTicket({ ogimage, slug, name, start, finish, duration, tim
12
12
  duration: duration,
13
13
  timeframe: timeframe,
14
14
  allStrapiSunsetTourTime: allStrapiSunsetTourTime,
15
+ allStrapiMoonlightTourDateTime: { nodes: [] }, // Provide an empty nodes array or the correct data as needed
15
16
  slug: slug
16
17
  });
17
18
 
@@ -57,7 +57,24 @@ export const PaddleTime = ({ start, finish, duration, timeframe, slug, allStrapi
57
57
  }
58
58
  }
59
59
 
60
+ if (duration) {
61
+ if (duration > 90) {
62
+ const hours = Math.floor(duration / 60);
63
+ const mins = duration % 60;
60
64
 
65
+ return {
66
+ entry: `${hours}${hairSpace}hrs ${mins > 0 ? `${mins}${hairSpace}mins` : ''} `,
67
+ value: "duration"
68
+ }
69
+ }
70
+
71
+ return {
72
+ entry: `${duration}${hairSpace} mins`,
73
+ value: "duration"
74
+ }
75
+ }
76
+
77
+ // this must be last as it has no way to be removed in strapi
61
78
  if (start && finish) {
62
79
  const startHours = sunsetStartTime ? sunsetStartTime.split(':')[0] : start.split(':')[0];
63
80
  let startHoursInt: number = Number.parseInt(startHours);
@@ -87,23 +104,6 @@ export const PaddleTime = ({ start, finish, duration, timeframe, slug, allStrapi
87
104
  }
88
105
  }
89
106
 
90
- if (duration) {
91
- if (duration > 90) {
92
- const hours = Math.floor(duration / 60);
93
- const mins = duration % 60;
94
-
95
- return {
96
- entry: `${hours}${hairSpace}hrs ${mins > 0 ? `${mins}${hairSpace}mins` : ''} `,
97
- value: "duration"
98
- }
99
- }
100
-
101
- return {
102
- entry: `${duration}${hairSpace} mins`,
103
- value: "duration"
104
- }
105
- }
106
-
107
107
  return {
108
108
  entry: null,
109
109
  value: null
package/src/index.tsx CHANGED
@@ -1,9 +1,3 @@
1
- // eslint-disable-next-line react-refresh/only-export-components
2
-
3
- // TODO: these dont work
4
- // Fragments
5
- // export * from "./testimonial-fragment";
6
-
7
1
  // Atoms
8
2
  export * from "./PaddleBookNow";
9
3
  export * from "./PaddleTime";
@@ -29,10 +23,10 @@ export * from "./PaddleTestimonials";
29
23
 
30
24
  // Pages
31
25
 
32
- //
26
+ // SEO
33
27
  export * from "./PaddleSEO";
34
28
 
35
- // TODO: test
29
+ // TODO: test v.1.1
36
30
  // Types
37
31
  export * from "./types/ticket-types";
38
32
  export * from "./types/location-card-types";
package/src/phone.tsx CHANGED
@@ -4,7 +4,8 @@ interface FormatPhoneNumberTypes {
4
4
  phoneNumberString: number;
5
5
  }
6
6
  function FormatPhoneNumber({ phoneNumberString }: FormatPhoneNumberTypes) {
7
- const cleaned = `${phoneNumberString}`.replace(/\D/g, '');
7
+ const phoneNumber = String(phoneNumberString);
8
+ const cleaned = `${phoneNumber}`.replace(/\D/g, '');
8
9
  const match = cleaned.match(/^(\d{3})(\d{3})(\d{4})$/);
9
10
  if (match) {
10
11
  return `(${match[1]}) ${match[2]}-${match[3]}`;
@@ -4,14 +4,20 @@
4
4
 
5
5
  @import "variables";
6
6
  @import "body";
7
+ @import "typography";
8
+ @import "nav";
7
9
  @import "layout";
8
10
  @import "cards";
9
11
  @import "media";
10
12
  @import "color";
11
- @import "typography";
13
+ @import "panels";
12
14
  @import "links";
13
15
  @import "buttons";
14
16
  @import "lists";
15
17
  @import "tables";
16
18
  @import "visibility";
17
19
  @import "a11y";
20
+
21
+ /* TODO: v1.2 safari is showing some unuised css results lets stay away from that for a minute and try a little chrome maybe theres a bug */
22
+
23
+ @import "astro";
@@ -0,0 +1,30 @@
1
+ /* straight pull for menu so its going to take a bunch of work but this keeps everything sperate */
2
+
3
+ .menu-button {
4
+ background-color: hotpink !important;
5
+
6
+ /* ? I might do this in js as well as a secondary so I can use */
7
+ @media (min-width: 20rem) {
8
+ background-color: blue !important;
9
+ display: none;
10
+ }
11
+ }
12
+
13
+ #menu-content {
14
+ /* background-color: hotpink; */
15
+ @media (min-width: 20rem) {
16
+ background-color: lime;
17
+ }
18
+
19
+ .nav-items {
20
+ display: flex;
21
+ flex-direction: column;
22
+ align-items: center;
23
+ justify-content: center;
24
+ width: 100%;
25
+
26
+ /* @media (min-width: 20rem) {
27
+ flex-direction: row;
28
+ } */
29
+ }
30
+ }
@@ -2,23 +2,30 @@
2
2
  /* #BUTTONS */
3
3
  /*------------------------------------*/
4
4
 
5
- /* TODO: variables */
6
5
  button,
7
6
  .button,
8
7
  .book-now {
9
- background: none;
10
8
  border-radius: var(--card-radius);
11
9
  padding: var(--kosciuszko) var(--vinson);
12
10
  font-size: var(--vinson);
13
11
  cursor: pointer;
14
12
  margin-block-end: var(--elbrus);
15
13
  transition: var(--slow);
16
- display: block;
14
+ display: inline-block;
17
15
  line-height: var(--kilimanjaro);
18
16
  text-decoration: none;
19
17
  width: max-content;
20
- border: 1px solid;
18
+ text-align: center;
21
19
  box-shadow: var(--penumbra);
20
+ background-color: var(--neutral-200);
21
+ border: 1px solid var(--neutral-100);
22
+
23
+ @media (prefers-color-scheme: dark) {
24
+ /* background-color: var(--neutral-600); not enough*/
25
+ background-color: var(--neutral-600);
26
+ border-color: var(--neutral-500);
27
+ color: var(--neutral-100);
28
+ }
22
29
  }
23
30
 
24
31
  button:hover,
@@ -26,17 +33,184 @@ button:hover,
26
33
  /* below is for the storyboard showcase */
27
34
  .button__hover {
28
35
  box-shadow: var(--antumbra);
36
+
37
+ @media (prefers-color-scheme: dark) {
38
+ background-color: var(--neutral-500);
39
+ border-color: var(--neutral-500);
40
+ color: var(--neutral-200);
41
+ }
29
42
  }
30
43
 
31
44
  .button__active,
45
+ .button:active,
32
46
  button:active {
33
47
  box-shadow: var(--umbra);
48
+
49
+ @media (prefers-color-scheme: dark) {
50
+ background-color: var(--neutral-400);
51
+ border-color: var(--neutral-200);
52
+ color: var(--neutral-500);
53
+ }
34
54
  }
35
55
 
36
56
  .book-now {
37
- margin-block-start: var(--kosciuszko);
38
- text-align: center;
39
- display: inline-block; /* same as a button */
57
+ margin-block-start: var(
58
+ --kosciuszko
59
+ ); /* why is this different than a regular button */
60
+ background-color: var(--neutral-800);
61
+ border-color: var(--neutral-700);
62
+ color: var(--neutral-300);
63
+
64
+ @media (prefers-color-scheme: dark) {
65
+ background-color: var(--neutral-200);
66
+ border-color: var(--neutral-100);
67
+ color: var(--neutral-800);
68
+ }
69
+ }
70
+
71
+ .book-now:hover,
72
+ .book-now__hover {
73
+ background-color: var(--neutral-500);
74
+ border-color: var(--neutral-600);
75
+ color: var(--neutral-200);
76
+
77
+ @media (prefers-color-scheme: dark) {
78
+ background-color: var(--neutral-300);
79
+ border-color: var(--neutral-200);
80
+ color: var(--neutral-700);
81
+ }
82
+ }
83
+
84
+ .book-now:active,
85
+ .book-now__active {
86
+ background-color: var(--neutral-400);
87
+ border-color: var(--neutral-400);
88
+ color: var(--neutral-100);
89
+
90
+ @media (prefers-color-scheme: dark) {
91
+ background-color: var(--neutral-300);
92
+ border-color: var(--neutral-300);
93
+ color: var(--neutral-600);
94
+ }
95
+ }
96
+
97
+ /*------------------------------------*/
98
+ /* #TAHOE CITY */
99
+ /*------------------------------------*/
100
+
101
+ .tahoe-city {
102
+ button,
103
+ .button {
104
+ /* * reverts to clean dark scheme */
105
+ @media (prefers-color-scheme: light) {
106
+ background-color: var(--sand-200);
107
+ border-color: var(--sand-100);
108
+ color: var(--neutral-600);
109
+ }
110
+ }
111
+
112
+ button:hover,
113
+ .button:hover,
114
+ .button__hover {
115
+ @media (prefers-color-scheme: light) {
116
+ background-color: var(--sand-300);
117
+ border-color: var(--sand-200);
118
+ color: var(--neutral-700);
119
+ }
120
+ }
121
+
122
+ button:active,
123
+ .button:active,
124
+ .button__active {
125
+ @media (prefers-color-scheme: light) {
126
+ background-color: var(--sand-400);
127
+ border-color: var(--sand-300);
128
+ color: var(--neutral-800);
129
+ }
130
+ }
131
+
132
+ /* BOOK NOW */
133
+ .book-now {
134
+ background-color: var(--tanager-200);
135
+ border-color: var(--tanager-100);
136
+ color: var(--neutral-100);
137
+ }
138
+
139
+ @media (prefers-color-scheme: dark) {
140
+ }
141
+
142
+ .book-now:hover,
143
+ .book-now__hover {
144
+ background-color: var(--tanager-300);
145
+ border-color: var(--tanager-200);
146
+ color: var(--neutral-200);
147
+ }
148
+
149
+ .book-now:active,
150
+ .book-now__active,
151
+ button:active {
152
+ background-color: var(--tanager-400);
153
+ border-color: var(--tanager-300);
154
+ color: var(--neutral-300);
155
+ }
156
+ }
157
+
158
+ /*------------------------------------*/
159
+ /* #SOUTH TAHOE */
160
+ /*------------------------------------*/
161
+
162
+ .south-tahoe {
163
+ button,
164
+ .button {
165
+ background-color: var(--lake-200);
166
+ border-color: var(--lake-100);
167
+ color: var(--cloud-color);
168
+ }
169
+
170
+ @media (prefers-color-scheme: dark) {
171
+ button,
172
+ .button {
173
+ background-color: var(--lake-600);
174
+ border-color: var(--lake-700);
175
+ color: var(--lake-100);
176
+ }
177
+ }
178
+
179
+ button:hover,
180
+ .button__hover,
181
+ .button:hover {
182
+ background-color: var(--lake-400);
183
+ border-color: var(--lake-400);
184
+ color: var(--lake-700);
185
+ }
186
+
187
+ .button__active {
188
+ background-color: var(--lake-400);
189
+ border-color: var(--lake-500);
190
+ /* this goes passed the 400 / 500 dark light split Im not sure if I want to change it */
191
+ /* maybe it needs a very occasional 450 */
192
+ color: var(--lake-800);
193
+ }
194
+
195
+ .book-now {
196
+ background-color: var(--lake-200);
197
+ border-color: var(--lake-100);
198
+ color: var(--lake-600);
199
+ }
200
+
201
+ .book-now:hover,
202
+ .book-now__hover {
203
+ background-color: var(--lake-300);
204
+ border-color: var(--lake-200);
205
+ color: var(--lake-700);
206
+ }
207
+
208
+ .book-now:active,
209
+ .book-now__active {
210
+ background-color: var(--lake-400);
211
+ border-color: var(--lake-300);
212
+ color: var(--lake-800);
213
+ }
40
214
  }
41
215
 
42
216
  /*------------------*/
@@ -49,17 +223,14 @@ menu button {
49
223
 
50
224
  /*------------------------------------*/
51
225
 
52
- .button__double {
226
+ .multi_button {
53
227
  display: flex;
54
228
  align-items: center;
55
229
  gap: var(--denali);
56
230
  }
57
231
 
58
- .buttonGroup {
59
- display: flex;
60
- flex-flow: row wrap;
61
- gap: var(--vinson);
62
- margin-block-end: var(--baseline);
232
+ .multi_button-center {
233
+ justify-content: center;
63
234
  }
64
235
 
65
236
  /*------------------------------------*/