@rileybathurst/paddle 0.0.17 → 0.0.19
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 +1 -1
- package/src/PaddleTestimonials.tsx +24 -0
- package/src/PaddleTime.tsx +0 -2
- package/src/index.tsx +8 -1
- package/src/stories/Testimonial.stories.tsx +19 -0
- package/src/stories/Testimonial.tsx +24 -0
- package/src/stories/Testimonials.stories.tsx +19 -0
- package/src/stories/Testimonials.tsx +42 -0
- package/src/styles/app.css +1 -0
- package/src/styles/body.css +0 -7
- package/src/styles/buttons.css +3 -46
- package/src/styles/color.css +0 -7
- package/src/styles/links.css +0 -17
- package/src/styles/lists.css +17 -0
- package/src/styles/media.css +0 -13
- package/src/styles/typography.css +26 -43
- package/src/styles/variables.css +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
interface TestimonialsTypes {
|
|
4
|
+
testimonials: TestimonialTypes[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface TestimonialTypes {
|
|
8
|
+
id: React.Key;
|
|
9
|
+
testimonial: string;
|
|
10
|
+
sign: string;
|
|
11
|
+
customer: string;
|
|
12
|
+
location: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const PaddleTestimonials = ({ testimonials }: TestimonialsTypes) =>
|
|
16
|
+
<ul className='testimonials vulture'>
|
|
17
|
+
{testimonials.map((testimonial: TestimonialTypes) => (
|
|
18
|
+
<li key={testimonial.id}>
|
|
19
|
+
<p className='elbrus'><span className='denali font-serif'>“</span>{testimonial.testimonial}<span className='denali font-serif'>”</span></p>
|
|
20
|
+
<p>{testimonial.sign} {testimonial.customer}</p>
|
|
21
|
+
<p className='kosciuszko'>{testimonial.location}</p>
|
|
22
|
+
</li>
|
|
23
|
+
))}
|
|
24
|
+
</ul>
|
package/src/PaddleTime.tsx
CHANGED
|
@@ -35,8 +35,6 @@ export const PaddleTime = ({ start, finish, duration, timeframe }: TimeTypes) =>
|
|
|
35
35
|
startHoursInt = startHoursInt - 12;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
console.log(startMinsInt);
|
|
39
|
-
|
|
40
38
|
const finishHours = finish.split(':')[0];
|
|
41
39
|
let finishHoursInt: number = Number.parseInt(finishHours);
|
|
42
40
|
const finishMins = finish.split(':')[1];
|
package/src/index.tsx
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
// eslint-disable-next-line react-refresh/only-export-components
|
|
2
|
+
|
|
3
|
+
// Atoms
|
|
2
4
|
export * from "./PaddleBookNow";
|
|
5
|
+
export * from "./PaddleTime";
|
|
6
|
+
|
|
7
|
+
// Molecules
|
|
3
8
|
export * from "./PaddleComposition";
|
|
4
|
-
|
|
9
|
+
|
|
10
|
+
// Organisms
|
|
11
|
+
export * from "./PaddleTestimonials";
|
|
@@ -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 { Testimonial } from './Testimonial';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Testimonial,
|
|
8
|
+
title: 'Molecules/Testimonial',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Testimonial>;
|
|
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,24 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { faker } from '@faker-js/faker';
|
|
4
|
+
|
|
5
|
+
interface TestimonialProps {
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Testimonial = ({
|
|
11
|
+
primary = false,
|
|
12
|
+
...props
|
|
13
|
+
}: TestimonialProps) => {
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<li
|
|
17
|
+
key={faker.string.alphanumeric()}
|
|
18
|
+
>
|
|
19
|
+
<p className='elbrus'><span className='denali font-serif'>“</span>{faker.lorem.sentence()}<span className='denali font-serif'>”</span></p>
|
|
20
|
+
<p>{faker.helpers.arrayElement(['Thank You,', 'Sincerely,', null])} {faker.person.firstName()}</p>
|
|
21
|
+
<p className='kosciuszko'>{faker.location.city()}</p>
|
|
22
|
+
</li>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -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 { Testimonials } from './Testimonials';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Testimonials,
|
|
8
|
+
title: 'Organisms/Testimonials',
|
|
9
|
+
args: { onClick: fn() },
|
|
10
|
+
} satisfies Meta<typeof Testimonials>;
|
|
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,42 @@
|
|
|
1
|
+
// this is the Name.tsx file
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { faker } from '@faker-js/faker';
|
|
4
|
+
import { Testimonial } from './Testimonial';
|
|
5
|
+
|
|
6
|
+
function Deal() {
|
|
7
|
+
|
|
8
|
+
const hand = faker.number.int(10);
|
|
9
|
+
console.log(hand);
|
|
10
|
+
|
|
11
|
+
if (hand < 1) {
|
|
12
|
+
return (
|
|
13
|
+
<h1>There are no cards available</h1>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const content = [];
|
|
18
|
+
for (let i = 0; i < hand; i++) {
|
|
19
|
+
content.push(
|
|
20
|
+
<Testimonial />
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return (<>{content}</>);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface TestimonialsProps {
|
|
28
|
+
primary?: boolean;
|
|
29
|
+
onClick?: () => void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const Testimonials = ({
|
|
33
|
+
primary = false,
|
|
34
|
+
...props
|
|
35
|
+
}: TestimonialsProps) => {
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<ul className='testimonials vulture'>
|
|
39
|
+
<Deal />
|
|
40
|
+
</ul>
|
|
41
|
+
);
|
|
42
|
+
};
|
package/src/styles/app.css
CHANGED
package/src/styles/body.css
CHANGED
package/src/styles/buttons.css
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
button,
|
|
6
6
|
.button,
|
|
7
|
-
.button__mullen,
|
|
8
7
|
.book-now {
|
|
9
8
|
background: none;
|
|
10
9
|
border-radius: 0.25rem;
|
|
@@ -17,62 +16,20 @@ button,
|
|
|
17
16
|
line-height: 1.5rem;
|
|
18
17
|
text-decoration: none;
|
|
19
18
|
width: max-content;
|
|
20
|
-
|
|
21
|
-
color: var(--mullen);
|
|
22
|
-
border: 1px solid var(--mullen);
|
|
19
|
+
border: 1px solid;
|
|
23
20
|
box-shadow: var(--penumbra);
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
button:hover,
|
|
27
24
|
.button:hover,
|
|
28
25
|
/* below is for the storyboard showcase */
|
|
29
|
-
.button__hover
|
|
30
|
-
.button__mullen:hover,
|
|
31
|
-
.button__mullen--hover,
|
|
32
|
-
/* this is a weird thing you maybe need */
|
|
33
|
-
.button__mullen--hover:hover {
|
|
34
|
-
color: var(--mullen-200);
|
|
35
|
-
border-color: var(--mullen-200);
|
|
26
|
+
.button__hover {
|
|
36
27
|
box-shadow: var(--antumbra);
|
|
37
|
-
|
|
38
|
-
/* TODO this doesnt do enough in dark to see the change */
|
|
39
|
-
@media (prefers-color-scheme: dark) {
|
|
40
|
-
color: var(--mullen);
|
|
41
|
-
}
|
|
42
28
|
}
|
|
43
29
|
|
|
44
30
|
.button__active,
|
|
45
|
-
button:active
|
|
46
|
-
.button__mullen:active,
|
|
47
|
-
.button__mullen--active {
|
|
48
|
-
border-color: var(--mullen-300);
|
|
49
|
-
color: var(--mullen-300);
|
|
50
|
-
box-shadow: var(--antumbra);
|
|
31
|
+
button:active {
|
|
51
32
|
box-shadow: var(--umbra);
|
|
52
|
-
|
|
53
|
-
@media (prefers-color-scheme: dark) {
|
|
54
|
-
background-color: var(--mullen-300);
|
|
55
|
-
color: var(--black-metal);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.button__mullen {
|
|
60
|
-
background-color: var(--mullen);
|
|
61
|
-
color: var(--brilliance);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.button__mullen:hover,
|
|
65
|
-
.button__mullen--hover,
|
|
66
|
-
/* this is a weird thing you maybe need */
|
|
67
|
-
.button__mullen--hover:hover {
|
|
68
|
-
background-color: var(--mullen-300);
|
|
69
|
-
color: var(--tin-soldier);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.button__mullen:active,
|
|
73
|
-
.button__mullen--active {
|
|
74
|
-
background-color: var(----black-out);
|
|
75
|
-
color: var(--industrial-revolution);
|
|
76
33
|
}
|
|
77
34
|
|
|
78
35
|
/*------------------*/
|
package/src/styles/color.css
CHANGED
|
@@ -7,12 +7,5 @@
|
|
|
7
7
|
/*------------------------------------*/
|
|
8
8
|
|
|
9
9
|
.top-bar {
|
|
10
|
-
background: var(--brilliance);
|
|
11
|
-
box-shadow: 0 0 0 100vmax var(--brilliance);
|
|
12
10
|
clip-path: inset(0 -100vmax);
|
|
13
|
-
|
|
14
|
-
@media (prefers-color-scheme: dark) {
|
|
15
|
-
background-color: var(--navy-600);
|
|
16
|
-
box-shadow: 0 0 0 100vmax var(--navy-600);
|
|
17
|
-
}
|
|
18
11
|
}
|
package/src/styles/links.css
CHANGED
|
@@ -2,17 +2,8 @@
|
|
|
2
2
|
/* #LINKS */
|
|
3
3
|
/*------------------------------------*/
|
|
4
4
|
|
|
5
|
-
a {
|
|
6
|
-
color: var(--navy);
|
|
7
|
-
|
|
8
|
-
@media (prefers-color-scheme: dark) {
|
|
9
|
-
color: var(--navy-200);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
5
|
a:where(:hover, :focus),
|
|
14
6
|
a.hover {
|
|
15
|
-
color: var(--navy-300);
|
|
16
7
|
text-decoration: none;
|
|
17
8
|
}
|
|
18
9
|
|
|
@@ -23,11 +14,3 @@ a.hover {
|
|
|
23
14
|
.link__subtle:where(:hover, :focus) {
|
|
24
15
|
text-decoration: underline;
|
|
25
16
|
}
|
|
26
|
-
|
|
27
|
-
.link__subtle-svg svg {
|
|
28
|
-
fill: var(--black-out);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.link__subtle-svg svg:where(:hover, :focus) {
|
|
32
|
-
fill: var(--navy);
|
|
33
|
-
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*------------------*/
|
|
2
|
+
/* #TESTIMONIALS */
|
|
3
|
+
/*------------------*/
|
|
4
|
+
|
|
5
|
+
.testimonials {
|
|
6
|
+
list-style: none;
|
|
7
|
+
padding-inline-start: 0; /* reset */
|
|
8
|
+
|
|
9
|
+
li:not(:last-child) {
|
|
10
|
+
border-block-end: 1px solid;
|
|
11
|
+
margin-block-end: var(--vinson);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.content::before {
|
|
15
|
+
content: "“";
|
|
16
|
+
}
|
|
17
|
+
}
|
package/src/styles/media.css
CHANGED
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
display: flex;
|
|
8
8
|
/* gap: 1rem; // dont run a gap as the sr-only h1 uses it */
|
|
9
9
|
justify-content: center;
|
|
10
|
-
background-color: whitesmoke;
|
|
11
|
-
box-shadow: 0 0 0 100vmax whitesmoke;
|
|
12
10
|
clip-path: inset(0 -100vmax);
|
|
13
11
|
z-index: var(--understory);
|
|
14
12
|
position: relative;
|
|
@@ -19,15 +17,6 @@
|
|
|
19
17
|
margin-inline: auto;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
|
-
/* @media (min-width: 30rem) {
|
|
23
|
-
max-width: 32rem; // guess and check
|
|
24
|
-
} */
|
|
25
|
-
|
|
26
|
-
@media (prefers-color-scheme: dark) {
|
|
27
|
-
background-color: var(--ink);
|
|
28
|
-
box-shadow: 0 0 0 100vmax var(--ink);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
20
|
a {
|
|
32
21
|
width: max-content;
|
|
33
22
|
display: flex;
|
|
@@ -47,7 +36,5 @@
|
|
|
47
36
|
svg {
|
|
48
37
|
width: 100%;
|
|
49
38
|
max-height: 10rem;
|
|
50
|
-
/* the logo isnt symetrical */
|
|
51
|
-
padding-inline-start: 2rem; /* guess and check number */
|
|
52
39
|
}
|
|
53
40
|
}
|
|
@@ -8,12 +8,6 @@ body {
|
|
|
8
8
|
line-height: 1.25rem; /* 20px */
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
p {
|
|
12
|
-
margin-block-start: 0;
|
|
13
|
-
margin-block-end: var(--baseline);
|
|
14
|
-
font-family: var(--body_font);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
11
|
h1,
|
|
18
12
|
h2,
|
|
19
13
|
h3 {
|
|
@@ -29,6 +23,13 @@ h6 {
|
|
|
29
23
|
margin-block-start: 0; /* reset */
|
|
30
24
|
}
|
|
31
25
|
|
|
26
|
+
h3,
|
|
27
|
+
h4,
|
|
28
|
+
h5,
|
|
29
|
+
h6 {
|
|
30
|
+
font-weight: 400;
|
|
31
|
+
}
|
|
32
|
+
|
|
32
33
|
h1 {
|
|
33
34
|
margin-top: 0; /* browser reset */
|
|
34
35
|
font-size: 3rem; /* 48px */
|
|
@@ -54,8 +55,7 @@ h2,
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
h3,
|
|
57
|
-
|
|
58
|
-
.h3 {
|
|
58
|
+
.denali {
|
|
59
59
|
font-size: 2rem; /* 32px */
|
|
60
60
|
line-height: 2.5rem; /* 40px */
|
|
61
61
|
margin-bottom: 1.875rem; /* 30px */
|
|
@@ -66,9 +66,9 @@ h3,
|
|
|
66
66
|
|
|
67
67
|
h4,
|
|
68
68
|
.kilimanjaro,
|
|
69
|
-
.h4,
|
|
70
69
|
.brow,
|
|
71
70
|
.page-title,
|
|
71
|
+
/* .spec h2 put this inline */
|
|
72
72
|
.spec h2 {
|
|
73
73
|
font-size: 1.5rem; /* 24px */
|
|
74
74
|
line-height: 2rem; /* 32px */
|
|
@@ -78,7 +78,8 @@ h4,
|
|
|
78
78
|
/* multi lines + 32px🚨 each */
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
h5
|
|
81
|
+
h5,
|
|
82
|
+
.elbrus {
|
|
82
83
|
font-size: 1.25rem; /* 20px */
|
|
83
84
|
line-height: 1.875rem; /* 30px */
|
|
84
85
|
margin-bottom: 0.625rem; /* 10px */
|
|
@@ -100,6 +101,7 @@ h6,
|
|
|
100
101
|
|
|
101
102
|
/* start the multi line problem here as itll be worst */
|
|
102
103
|
small,
|
|
104
|
+
.kosciuszko,
|
|
103
105
|
.two-small-lines,
|
|
104
106
|
.multiple-small-lines {
|
|
105
107
|
font-size: 0.75rem; /* 12px */
|
|
@@ -119,6 +121,18 @@ address {
|
|
|
119
121
|
font-style: normal;
|
|
120
122
|
}
|
|
121
123
|
|
|
124
|
+
p {
|
|
125
|
+
margin-block-start: 0;
|
|
126
|
+
margin-block-end: var(--baseline);
|
|
127
|
+
font-family: var(--body_font);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/*------------------*/
|
|
131
|
+
|
|
132
|
+
.font-serif {
|
|
133
|
+
font-family: var(--font-serif);
|
|
134
|
+
}
|
|
135
|
+
|
|
122
136
|
.two-small-lines {
|
|
123
137
|
margin-bottom: 0.5rem; /* 8px */
|
|
124
138
|
/* two lines 40px */
|
|
@@ -131,26 +145,10 @@ address {
|
|
|
131
145
|
/* default use on whitesmoke background */
|
|
132
146
|
hr {
|
|
133
147
|
border: none; /* reset */
|
|
134
|
-
border-bottom: 1px solid
|
|
135
|
-
|
|
136
|
-
/* default useage on hsl(var(--ink__h), 50%, 5%); */
|
|
137
|
-
@media (prefers-color-scheme: dark) {
|
|
138
|
-
border-bottom: 1px solid var(--black-out);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/* for use on a sand background */
|
|
143
|
-
/* name is hard */
|
|
144
|
-
/* its only on sand on light */
|
|
145
|
-
/* its darker on light only */
|
|
146
|
-
/* maybe step 2 */
|
|
147
|
-
/* rename it if I get a better idea */
|
|
148
|
-
/* only use the class when needed try put it on the class with the background */
|
|
149
|
-
.hr-step2 {
|
|
150
|
-
border-color: var(--tin-soldier);
|
|
148
|
+
border-bottom: 1px solid;
|
|
151
149
|
|
|
152
150
|
@media (prefers-color-scheme: dark) {
|
|
153
|
-
border-
|
|
151
|
+
border-bottom: 1px solid;
|
|
154
152
|
}
|
|
155
153
|
}
|
|
156
154
|
|
|
@@ -175,10 +173,6 @@ hr.no {
|
|
|
175
173
|
font-family: var(--heading_font);
|
|
176
174
|
}
|
|
177
175
|
|
|
178
|
-
.mullen {
|
|
179
|
-
color: var(--navy);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
176
|
/*------------------*/
|
|
183
177
|
/* #HEADINGS */
|
|
184
178
|
/*------------------*/
|
|
@@ -190,17 +184,6 @@ hgroup {
|
|
|
190
184
|
align-items: baseline;
|
|
191
185
|
}
|
|
192
186
|
|
|
193
|
-
/*------------------*/
|
|
194
|
-
/* #DEL */
|
|
195
|
-
/*------------------*/
|
|
196
|
-
|
|
197
|
-
del {
|
|
198
|
-
color: hsl(var(--sand__base), var(--dim));
|
|
199
|
-
@media (prefers-color-scheme: dark) {
|
|
200
|
-
color: hsl(var(--sand__base), var(--dark));
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
187
|
/*------------------*/
|
|
205
188
|
/* #CREST */
|
|
206
189
|
/*------------------*/
|
package/src/styles/variables.css
CHANGED
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
--sand-200: hsl(25, 37%, 87.5%);
|
|
21
21
|
--sand-300: hsl(25, 37%, 75%);
|
|
22
22
|
|
|
23
|
-
/* TODO */
|
|
24
23
|
--ink: hsl(210, 50%, 12.5%); /* base */
|
|
25
24
|
--ink-100: hsl(210, 50%, 12.5%);
|
|
26
25
|
--ink-200: hsl(210, 50%, 7.5%);
|
|
@@ -81,6 +80,7 @@
|
|
|
81
80
|
|
|
82
81
|
--body_font: "Barlow", Arial, sans-serif;
|
|
83
82
|
--heading_font: "Barlow Condensed", Arial, sans-serif;
|
|
83
|
+
--font-serif: Georgia, serif; /* TODO: add serif font that matches nicely */
|
|
84
84
|
|
|
85
85
|
--baseline: 1.25rem; /* 20px */
|
|
86
86
|
|