@rileybathurst/paddle 0.0.4 → 0.0.6

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.4",
4
+ "version": "0.0.6",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
package/src/App.css CHANGED
@@ -1,42 +0,0 @@
1
- #root {
2
- max-width: 1280px;
3
- margin: 0 auto;
4
- padding: 2rem;
5
- text-align: center;
6
- }
7
-
8
- .logo {
9
- height: 6em;
10
- padding: 1.5em;
11
- will-change: filter;
12
- transition: filter 300ms;
13
- }
14
- .logo:hover {
15
- filter: drop-shadow(0 0 2em #646cffaa);
16
- }
17
- .logo.react:hover {
18
- filter: drop-shadow(0 0 2em #61dafbaa);
19
- }
20
-
21
- @keyframes logo-spin {
22
- from {
23
- transform: rotate(0deg);
24
- }
25
- to {
26
- transform: rotate(360deg);
27
- }
28
- }
29
-
30
- @media (prefers-reduced-motion: no-preference) {
31
- a:nth-of-type(2) .logo {
32
- animation: logo-spin infinite 20s linear;
33
- }
34
- }
35
-
36
- .card {
37
- padding: 2em;
38
- }
39
-
40
- .read-the-docs {
41
- color: #888;
42
- }
package/src/Button.tsx ADDED
@@ -0,0 +1,15 @@
1
+ import * as React from "react"
2
+
3
+ interface ButtonTypes {
4
+ peek_base: string
5
+ strapiLocaleName: string
6
+ }
7
+ export const Button = ({ peek_base, strapiLocaleName }: ButtonTypes) =>
8
+ <a
9
+ href={peek_base}
10
+ rel="noopener noreferrer"
11
+ className="book-now"
12
+ title={`Book now with ${strapiLocaleName} kayak and paddleboard`}
13
+ >
14
+ BOOK NOW
15
+ </a>
package/src/index.tsx CHANGED
@@ -1 +1,2 @@
1
- export * from "./Test";
1
+ import * as React from "react";
2
+ export * from "./Button";
@@ -0,0 +1,18 @@
1
+ // this is the Name.stories.tsx file
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import { fn } from '@storybook/test';
4
+ import { Button } from './Button';
5
+
6
+ const meta = {
7
+ component: Button,
8
+ args: { onClick: fn() },
9
+ } satisfies Meta<typeof Button>;
10
+
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+
14
+ export const Primary: Story = {
15
+ args: {
16
+ primary: true,
17
+ },
18
+ };
@@ -1,49 +1,29 @@
1
- // import React from 'react';
2
-
3
- import './button.css';
1
+ // this is the Name.tsx file
2
+ import React from 'react';
4
3
 
5
4
  interface ButtonProps {
6
- /**
7
- * Is this the principal call to action on the page?
8
- */
9
5
  primary?: boolean;
10
- /**
11
- * What background color to use
12
- */
13
- backgroundColor?: string;
14
- /**
15
- * How large should the button be?
16
- */
17
- size?: 'small' | 'medium' | 'large';
18
- /**
19
- * Button contents
20
- */
21
- label: string;
22
- /**
23
- * Optional click handler
24
- */
25
6
  onClick?: () => void;
26
7
  }
27
8
 
28
- /**
29
- * Primary UI component for user interaction
30
- */
31
9
  export const Button = ({
32
10
  primary = false,
33
- size = 'medium',
34
- backgroundColor,
35
- label,
36
11
  ...props
37
12
  }: ButtonProps) => {
38
- const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
13
+
39
14
  return (
40
- <button
41
- type="button"
42
- className={['storybook-button', `storybook-button--${size}`, mode].join(' ')}
43
- style={{ backgroundColor }}
15
+ <main
44
16
  {...props}
45
17
  >
46
- {label}
47
- </button>
18
+ {primary ? 'primary' : 'secondary'}
19
+ <button type='button'>Button</button>
20
+ <button className='button__hover' type='button'>Hover</button>
21
+ <button className='button__active' type='button'>Active</button>
22
+ <hr />
23
+ <button className='button__mullen' type='button'>Button Mullen</button>
24
+ <button className='button__mullen--hover' type='button'>Mullen Hover</button>
25
+ <button className='button__mullen--active' type='button'>Mullen Active</button>
26
+ <p>// TODO: I have some problems with this I dont like the pink</p>
27
+ </main>
48
28
  );
49
- };
29
+ };
@@ -1,7 +1,8 @@
1
1
  // import React from 'react';
2
2
 
3
- import { Button } from './Button';
3
+ // import { Button } from './Button';
4
4
  import './header.css';
5
+ import { Button } from '@rileybathurst/puddle';
5
6
 
6
7
  type User = {
7
8
  name: string;
@@ -50,6 +51,9 @@ export const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps
50
51
  <Button primary size="small" onClick={onCreateAccount} label="Sign up" />
51
52
  </>
52
53
  )}
54
+
55
+ <hr />
56
+ <Button />
53
57
  </div>
54
58
  </div>
55
59
  </header>
@@ -2,5 +2,6 @@
2
2
  /* #PADDLE */
3
3
  /*------------------------------------*/
4
4
 
5
- /* @import "variables"; */
5
+ @import "variables";
6
6
  @import "body";
7
+ @import "buttons";
@@ -2,8 +2,6 @@ body {
2
2
  margin: 0; /* reset */
3
3
  font-size: 16px;
4
4
  background-color: whitesmoke;
5
- /* ! testing */
6
- background-color: hotpink;
7
5
  color: var(--black-metal);
8
6
 
9
7
  /* @media (prefers-color-scheme: dark) { */
@@ -0,0 +1,84 @@
1
+ /*------------------------------------*/
2
+ /* #BUTTONS */
3
+ /*------------------------------------*/
4
+
5
+ button,
6
+ .button,
7
+ .button__mullen,
8
+ .book-now {
9
+ background: none;
10
+ border-radius: 0.25rem;
11
+ padding: 0.5rem 1rem;
12
+ font-size: 1rem;
13
+ cursor: pointer;
14
+ margin-block-end: var(--baseline);
15
+ transition: 0.5s ease;
16
+ display: block;
17
+ line-height: 1.5rem;
18
+ text-decoration: none;
19
+ width: max-content;
20
+
21
+ color: var(--mullen);
22
+ border: 1px solid var(--mullen);
23
+ box-shadow: var(--penumbra);
24
+ }
25
+
26
+ button:hover,
27
+ .button:hover,
28
+ /* 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);
36
+ 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
+ }
43
+
44
+ .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);
51
+ 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
+ }
77
+
78
+ /*------------------*/
79
+ /* #MENU */
80
+ /*------------------*/
81
+
82
+ menu button {
83
+ margin: 0;
84
+ }
@@ -0,0 +1,140 @@
1
+ :root {
2
+ /*------------------*/
3
+ /* #PADDLE STYLES */
4
+ /*------------------*/
5
+
6
+ /*------------------------------------*/
7
+ /* #COLOR */
8
+ /*------------------------------------*/
9
+
10
+ /* TAHOE CITY KAYAK */
11
+
12
+ --mullen: hsl(0, 50%, 50%); /* #bf4040 */
13
+ --mullen-100: hsl(0, 50%, 50%); /* base */
14
+ --mullen-200: hsl(0, 50%, 37.5%);
15
+ --mullen-300: hsl(0, 50%, 25%);
16
+
17
+ --sand: hsl(25, 37%, 95%);
18
+ --sand-100: hsl(25, 37%, 95%); /* base */
19
+ --sand-150: hsl(25, 37%, 92.5%);
20
+ --sand-200: hsl(25, 37%, 87.5%);
21
+ --sand-300: hsl(25, 37%, 75%);
22
+
23
+ /* TODO */
24
+ --ink: hsl(210, 50%, 12.5%); /* base */
25
+ --ink-100: hsl(210, 50%, 12.5%);
26
+ --ink-200: hsl(210, 50%, 7.5%);
27
+ --ink-300: hsl(210, 50%, 5%);
28
+
29
+ /*------------------------------------*/
30
+ /* #SOUTH TAHOE KAYAK */
31
+ /*------------------------------------*/
32
+ /* needed for storybook */
33
+
34
+ --navy-200: oklch(75% 0.12 230);
35
+ --navy-300: oklch(62.5% 0.14 230);
36
+ --navy-400: oklch(50% 0.14 230); /* base */
37
+ --navy: oklch(50% 0.14 230);
38
+ --navy-500: oklch(37.5% 0.14 230);
39
+ --navy-600: oklch(25% 0.12 230);
40
+
41
+ --sunshine-100: oklch(97.5% 0.025 95);
42
+ --sunshine-200: oklch(95% 0.05 95);
43
+ --sunshine-300: oklch(92.5% 0.1 95);
44
+ --sunshine-400: oklch(90% 0.15 95);
45
+ --sunshine-500: oklch(87.5% 0.2 95); /* base */
46
+ --sunshine: oklch(87.5% 0.2 95);
47
+
48
+ /*------------------------------------*/
49
+
50
+ --card-radius: 0.25rem;
51
+
52
+ /*------------------*/
53
+ /* #NEUTRALS */
54
+ /*------------------*/
55
+
56
+ /* louie variables */
57
+ --pitch: 2.5%;
58
+ --dark: 12.5%;
59
+ --dull: 25%;
60
+ --dim: 37.5%;
61
+ --mid: 50%;
62
+ --glow: 62.5%;
63
+ --light: 75%;
64
+ --bright: 87.5%;
65
+ --brilliant: 97.5%;
66
+
67
+ /* louie neutrals */
68
+ --black-metal: hsl(210, 25%, 2.5%);
69
+ --black-out: hsl(210, 25%, 12.5%);
70
+ --raven-black: hsl(210, 12.5%, 25%);
71
+ --industrial-revolution: hsl(210, 7.5%, 37.5%);
72
+ --grey: hsl(210, 7.5%, 50%);
73
+ --cold-grey: hsl(210, 7.5%, 62.5%);
74
+ --tin-soldier: hsl(210, 12.5%, 75%);
75
+ --kingly-cloud: hsl(210, 18.75%, 87.5%);
76
+ --brilliance: hsl(210, 25%, 97.5%);
77
+
78
+ /*------------------*/
79
+ /* #TYPOGRAPHY */
80
+ /*------------------*/
81
+
82
+ --body_font: "Barlow", Arial, sans-serif;
83
+ --heading_font: "Barlow Condensed", Arial, sans-serif;
84
+
85
+ --baseline: 1.25rem; /* 20px */
86
+
87
+ /* 🏔 7 Summits */
88
+ --everest: 3rem; /* 29,035ft Asia */
89
+ --aconcagua: 2.5rem; /* 22,840ft South America */
90
+ --denali: 2rem; /* 20,320ft North America */
91
+ --kilimanjaro: 1.5rem; /* 19,340ft Africa */
92
+ --elbrus: 1.25rem; /* 18,510ft Europe / Russia */ /* * baseline */
93
+ --vinson: 1rem; /* 16,050ft Antartica */
94
+ --kosciuszko: 0.75rem; /* 7,310ft Australia */
95
+
96
+ /*------------------*/
97
+ /* #SHADOWS */
98
+ /*------------------*/
99
+
100
+ /* Umbra is direct light - dark - for active down clicks */
101
+ /* Antumbra is eclipsed - medium - for hover */
102
+ /* Penumbra is obscured - light - for layering but waiting */
103
+
104
+ --penumbra: 0 3px 6px hsla(0, 0%, 0%, 0.12), 0 2px 4px hsla(0, 0%, 0%, 0.1);
105
+ --antumbra: 0 14px 24px hsla(0, 0%, 0%, 0.16),
106
+ 0 4px 12px hsla(0, 0%, 0%, 0.12);
107
+ --umbra: 0 5px 12px hsla(0, 0%, 0%, 0.4) /* Ambient light shadow */,
108
+ 0 18px 32px hsla(0, 0%, 0%, 0.16) /* Direct light shadow */;
109
+
110
+ /* shadows on dark backgrounds */
111
+ --penumbra--dark: 0 3px 6px hsla(0, 0%, 100%, 0.12),
112
+ 0 2px 4px hsla(0, 0%, 100%, 0.1);
113
+
114
+ /*------------------*/
115
+ /* #WIDTHS */
116
+ /* https://en.wikipedia.org/wiki/Largest_living_flying_birds_by_wingspan */
117
+ /*------------------*/
118
+ --swan: 20rem;
119
+ --vulture: 30rem;
120
+ --stork: 40rem;
121
+ --condor: 50rem;
122
+ --pelican: 60rem;
123
+ --albatross: 80rem;
124
+
125
+ /*------------------*/
126
+ /* #Z INDEX */
127
+ /* https://en.wikipedia.org/wiki/Forest */
128
+ /*------------------*/
129
+
130
+ --floor: 1;
131
+ --understory: 2;
132
+ --canopy: 3;
133
+ --emergent: 4;
134
+
135
+ /*------------------*/
136
+ /* #TRANSITIONS */
137
+ /*------------------*/
138
+ --easing: cubic-bezier(0.5, 0, 0.5, 1);
139
+ --fade: 0.2s var(--easing);
140
+ }
@@ -1,52 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { fn } from '@storybook/test';
3
- import { Button } from './Button';
4
-
5
- // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
6
- const meta = {
7
- title: 'Example/Button',
8
- component: Button,
9
- parameters: {
10
- // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
11
- layout: 'centered',
12
- },
13
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
14
- tags: ['autodocs'],
15
- // More on argTypes: https://storybook.js.org/docs/api/argtypes
16
- argTypes: {
17
- backgroundColor: { control: 'color' },
18
- },
19
- // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
20
- args: { onClick: fn() },
21
- } satisfies Meta<typeof Button>;
22
-
23
- export default meta;
24
- type Story = StoryObj<typeof meta>;
25
-
26
- // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
27
- export const Primary: Story = {
28
- args: {
29
- primary: true,
30
- label: 'Button',
31
- },
32
- };
33
-
34
- export const Secondary: Story = {
35
- args: {
36
- label: 'Button',
37
- },
38
- };
39
-
40
- export const Large: Story = {
41
- args: {
42
- size: 'large',
43
- label: 'Button',
44
- },
45
- };
46
-
47
- export const Small: Story = {
48
- args: {
49
- size: 'small',
50
- label: 'Button',
51
- },
52
- };
@@ -1,30 +0,0 @@
1
- .storybook-button {
2
- font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
- font-weight: 700;
4
- border: 0;
5
- border-radius: 3em;
6
- cursor: pointer;
7
- display: inline-block;
8
- line-height: 1;
9
- }
10
- .storybook-button--primary {
11
- color: white;
12
- background-color: #1ea7fd;
13
- }
14
- .storybook-button--secondary {
15
- color: #333;
16
- background-color: transparent;
17
- box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
18
- }
19
- .storybook-button--small {
20
- font-size: 12px;
21
- padding: 10px 16px;
22
- }
23
- .storybook-button--medium {
24
- font-size: 14px;
25
- padding: 11px 20px;
26
- }
27
- .storybook-button--large {
28
- font-size: 16px;
29
- padding: 12px 24px;
30
- }