@thru/design-system 0.1.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/README.md +199 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +155 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -0
- package/src/tailwind.css +483 -0
package/README.md
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# @thru/design-system
|
|
2
|
+
|
|
3
|
+
Thru Design System - Complete design tokens, components, and utilities for building Thru-branded applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @thru/design-system
|
|
9
|
+
# or
|
|
10
|
+
pnpm add @thru/design-system
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
### 1. Configure Tailwind CSS v4
|
|
16
|
+
|
|
17
|
+
The design system uses Tailwind CSS v4 with CSS-first configuration. Import the theme CSS in your main stylesheet:
|
|
18
|
+
|
|
19
|
+
**In your `globals.css` or main CSS file:**
|
|
20
|
+
|
|
21
|
+
```css
|
|
22
|
+
@import "tailwindcss";
|
|
23
|
+
@import "@thru/design-system/tailwind.css";
|
|
24
|
+
|
|
25
|
+
/* Use @source to scan the design system package for class usage */
|
|
26
|
+
@source "../node_modules/@thru/design-system/src";
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Important notes:**
|
|
30
|
+
- Import `tailwindcss` **first**, then the design system CSS
|
|
31
|
+
- The `@source` directive tells Tailwind v4 to scan the design system's source files for class names
|
|
32
|
+
- Tailwind v4 automatically detects your app files (`app/`, `src/`, etc.), so you don't need `@source` for those
|
|
33
|
+
- The `@source` path should point to the `src` folder (not `dist`), so Tailwind can scan the original TypeScript/JSX files
|
|
34
|
+
|
|
35
|
+
**Optional: `tailwind.config.js`**
|
|
36
|
+
|
|
37
|
+
You typically don't need a `tailwind.config.js` file with Tailwind v4. If you do need one for other reasons, keep it minimal:
|
|
38
|
+
|
|
39
|
+
```javascript
|
|
40
|
+
/** @type {import('tailwindcss').Config} */
|
|
41
|
+
module.exports = {
|
|
42
|
+
// Content paths are defined in CSS via @source directive
|
|
43
|
+
// This file is only needed for other Tailwind plugins or custom config
|
|
44
|
+
};
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 2. Use Components
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
import { Button, Input, Card } from '@thru/design-system';
|
|
51
|
+
|
|
52
|
+
export default function MyPage() {
|
|
53
|
+
return (
|
|
54
|
+
<Card>
|
|
55
|
+
<Input label="Email" placeholder="> Email" />
|
|
56
|
+
<Button variant="primary" className="mt-4">
|
|
57
|
+
JOIN THE FLOCK
|
|
58
|
+
</Button>
|
|
59
|
+
</Card>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Color Usage
|
|
65
|
+
|
|
66
|
+
### Stone Scale (Neutrals)
|
|
67
|
+
```tsx
|
|
68
|
+
// Background
|
|
69
|
+
<div className="bg-stone-0">Light background</div>
|
|
70
|
+
<div className="bg-stone-100">Light gray background</div>
|
|
71
|
+
|
|
72
|
+
// Text
|
|
73
|
+
<p className="text-stone-700">Dark text</p>
|
|
74
|
+
<p className="text-stone-600">Medium-dark text</p>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Brick (Primary Brand Color)
|
|
78
|
+
```tsx
|
|
79
|
+
<button className="bg-thru-brick text-white">
|
|
80
|
+
Primary Action
|
|
81
|
+
</button>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Secondary Colors
|
|
85
|
+
```tsx
|
|
86
|
+
<div className="bg-thru-saffron-400">Saffron accent</div>
|
|
87
|
+
<div className="bg-thru-ocean-400">Ocean accent</div>
|
|
88
|
+
<div className="bg-thru-forest-400">Forest accent</div>
|
|
89
|
+
<div className="bg-thru-sand-400">Sand accent</div>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Typography
|
|
93
|
+
|
|
94
|
+
The design system uses Inter Tight as the primary font and JetBrains Mono for code.
|
|
95
|
+
|
|
96
|
+
### Font Sizes
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
<h1 className="text-headline-2xl font-extrabold">Headline 2XL</h1>
|
|
100
|
+
<h2 className="text-headline-xl font-semibold">Headline XL</h2>
|
|
101
|
+
<h3 className="text-headline-l font-semibold">Headline L</h3>
|
|
102
|
+
<p className="text-body-m">Body text</p>
|
|
103
|
+
<code className="font-mono text-body-s">Code snippet</code>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Components
|
|
107
|
+
|
|
108
|
+
### Button
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
import { Button } from '@thru/design-system';
|
|
112
|
+
|
|
113
|
+
// Primary (default)
|
|
114
|
+
<Button variant="primary">Action</Button>
|
|
115
|
+
|
|
116
|
+
// Secondary (Brick color)
|
|
117
|
+
<Button variant="secondary">Action</Button>
|
|
118
|
+
|
|
119
|
+
// Outline
|
|
120
|
+
<Button variant="outline">Action</Button>
|
|
121
|
+
|
|
122
|
+
// Ghost
|
|
123
|
+
<Button variant="ghost">Action</Button>
|
|
124
|
+
|
|
125
|
+
// Sizes
|
|
126
|
+
<Button size="sm">Small</Button>
|
|
127
|
+
<Button size="md">Medium</Button>
|
|
128
|
+
<Button size="lg">Large</Button>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Input
|
|
132
|
+
|
|
133
|
+
```tsx
|
|
134
|
+
import { Input } from '@thru/design-system';
|
|
135
|
+
|
|
136
|
+
// With label
|
|
137
|
+
<Input label="Email" type="email" placeholder="Enter email" />
|
|
138
|
+
|
|
139
|
+
// Without label
|
|
140
|
+
<Input placeholder="> Email" />
|
|
141
|
+
|
|
142
|
+
// Error state
|
|
143
|
+
<Input error placeholder="Invalid input" />
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Card
|
|
147
|
+
|
|
148
|
+
```tsx
|
|
149
|
+
import { Card } from '@thru/design-system';
|
|
150
|
+
|
|
151
|
+
// Default (with border)
|
|
152
|
+
<Card variant="default">Content</Card>
|
|
153
|
+
|
|
154
|
+
// Elevated (with shadow)
|
|
155
|
+
<Card variant="elevated">Content</Card>
|
|
156
|
+
|
|
157
|
+
// Outlined (thicker border)
|
|
158
|
+
<Card variant="outlined">Content</Card>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Design Tokens
|
|
162
|
+
|
|
163
|
+
See [resources/design.md](../../resources/design.md) for complete design specifications including:
|
|
164
|
+
- Color palette with hex values
|
|
165
|
+
- Typography scale
|
|
166
|
+
- Spacing system
|
|
167
|
+
- Component guidelines
|
|
168
|
+
- Brand usage rules
|
|
169
|
+
|
|
170
|
+
## Fonts
|
|
171
|
+
|
|
172
|
+
The design system uses **Inter Tight** as the primary font and **JetBrains Mono** for code/monospace text.
|
|
173
|
+
|
|
174
|
+
Font files are not included in this package. Font files are stored in the `resources/Fonts/` directory at the repository root. Each Next.js application should:
|
|
175
|
+
1. Copy font files from `resources/Fonts/` to a static directory in the app
|
|
176
|
+
2. Set up font loaders in the app using `next/font/local`
|
|
177
|
+
|
|
178
|
+
See the wallet app implementation (`wallet/src/lib/fonts.ts`) for an example setup.
|
|
179
|
+
|
|
180
|
+
## Troubleshooting
|
|
181
|
+
|
|
182
|
+
### Classes from design system components not appearing
|
|
183
|
+
|
|
184
|
+
If you see unstyled components (e.g., buttons without background colors), Tailwind may not be detecting classes from the design system package.
|
|
185
|
+
|
|
186
|
+
**Solution:** Ensure the `@source` directive in your CSS file points to the correct path. The path is relative to your CSS file location:
|
|
187
|
+
|
|
188
|
+
- If your CSS is in `app/globals.css`, use: `@source "../node_modules/@thru/design-system/src"`
|
|
189
|
+
- If your CSS is in `src/styles/globals.css`, use: `@source "../../node_modules/@thru/design-system/src"`
|
|
190
|
+
|
|
191
|
+
**Important:**
|
|
192
|
+
- The path should point to the `src` folder (not `dist`)
|
|
193
|
+
- Tailwind v4 auto-detects your app files, so you only need `@source` for external packages
|
|
194
|
+
- Make sure the import order is correct: `@import "tailwindcss"` first, then the design system CSS
|
|
195
|
+
|
|
196
|
+
## License
|
|
197
|
+
|
|
198
|
+
See package.json for license information.
|
|
199
|
+
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
|
|
5
|
+
size?: 'sm' | 'md' | 'lg';
|
|
6
|
+
}
|
|
7
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
|
|
9
|
+
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
10
|
+
error?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
wrapperClassName?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
15
|
+
|
|
16
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
variant?: 'default' | 'elevated' | 'outlined';
|
|
18
|
+
}
|
|
19
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
|
|
21
|
+
type TextProps = {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
className?: string;
|
|
24
|
+
as?: React.ElementType;
|
|
25
|
+
bold?: boolean;
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
};
|
|
28
|
+
type TextComponent = React.FC<TextProps>;
|
|
29
|
+
declare const Heading1: TextComponent;
|
|
30
|
+
declare const Heading2: TextComponent;
|
|
31
|
+
declare const Heading3: TextComponent;
|
|
32
|
+
declare const Heading4: TextComponent;
|
|
33
|
+
declare const Heading5: TextComponent;
|
|
34
|
+
declare const Body1: TextComponent;
|
|
35
|
+
declare const Body3: TextComponent;
|
|
36
|
+
declare const Body4: TextComponent;
|
|
37
|
+
declare const Body5: TextComponent;
|
|
38
|
+
declare const Ui1: TextComponent;
|
|
39
|
+
declare const Ui2: TextComponent;
|
|
40
|
+
declare const Ui3: TextComponent;
|
|
41
|
+
declare const Ui4: TextComponent;
|
|
42
|
+
declare const Ui5: TextComponent;
|
|
43
|
+
declare const Button1: TextComponent;
|
|
44
|
+
|
|
45
|
+
export { Body1, Body3, Body4, Body5, Button, Button1, type ButtonProps, Card, type CardProps, Heading1, Heading2, Heading3, Heading4, Heading5, Input, type InputProps, Ui1, Ui2, Ui3, Ui4, Ui5 };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import React2 from 'react';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/components/Button.tsx
|
|
5
|
+
|
|
6
|
+
// src/utils.ts
|
|
7
|
+
function cn(...classes) {
|
|
8
|
+
return classes.filter(Boolean).join(" ");
|
|
9
|
+
}
|
|
10
|
+
var Button = React2.forwardRef(
|
|
11
|
+
({ className, variant = "primary", size = "md", children, disabled, ...props }, ref) => {
|
|
12
|
+
const baseStyles = "font-semibold transition-colors focus:outline-none cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed";
|
|
13
|
+
const variants = {
|
|
14
|
+
primary: "bg-surface-lower-inverse text-text-primary-inverse hover:bg-surface-higher-inverse",
|
|
15
|
+
secondary: "bg-surface-brick text-text-primary-inverse hover:opacity-90",
|
|
16
|
+
outline: "border border-border-primary text-text-primary hover:bg-surface-lower",
|
|
17
|
+
ghost: "text-text-primary hover:bg-surface-lower"
|
|
18
|
+
};
|
|
19
|
+
const sizes = {
|
|
20
|
+
sm: "px-3 py-1.5 text-sm",
|
|
21
|
+
md: "px-6 py-3 text-base",
|
|
22
|
+
lg: "px-8 py-4 text-lg"
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
"button",
|
|
26
|
+
{
|
|
27
|
+
ref,
|
|
28
|
+
className: cn(baseStyles, variants[variant], sizes[size], className),
|
|
29
|
+
disabled,
|
|
30
|
+
...props,
|
|
31
|
+
children
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
Button.displayName = "Button";
|
|
37
|
+
var Input = React2.forwardRef(
|
|
38
|
+
({ className, error, label, id, wrapperClassName, ...props }, ref) => {
|
|
39
|
+
const inputId = id || label?.toLowerCase().replace(/\s+/g, "-");
|
|
40
|
+
const inputRef = React2.useRef(null);
|
|
41
|
+
React2.useImperativeHandle(ref, () => inputRef.current, []);
|
|
42
|
+
const handleWrapperClick = () => {
|
|
43
|
+
inputRef.current?.focus();
|
|
44
|
+
};
|
|
45
|
+
const inputWrapper = /* @__PURE__ */ jsx(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
className: cn(
|
|
49
|
+
"border bg-surface-higher p-4 transition-colors cursor-text flex items-center",
|
|
50
|
+
"focus-within:border-border-primary focus-within:bg-golden",
|
|
51
|
+
error ? "border-border-brand bg-surface-brick focus-within:bg-surface-brick" : "border-border-secondary",
|
|
52
|
+
"disabled:bg-surface-disabled disabled:cursor-not-allowed",
|
|
53
|
+
wrapperClassName
|
|
54
|
+
),
|
|
55
|
+
onClick: handleWrapperClick,
|
|
56
|
+
children: /* @__PURE__ */ jsx(
|
|
57
|
+
"input",
|
|
58
|
+
{
|
|
59
|
+
ref: inputRef,
|
|
60
|
+
id: inputId,
|
|
61
|
+
className: cn(
|
|
62
|
+
"w-full bg-transparent outline-none font-sans text-base",
|
|
63
|
+
"text-text-primary placeholder:text-text-tertiary",
|
|
64
|
+
"placeholder:font-mono",
|
|
65
|
+
"disabled:cursor-not-allowed",
|
|
66
|
+
className
|
|
67
|
+
),
|
|
68
|
+
...props
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
if (label) {
|
|
74
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
75
|
+
/* @__PURE__ */ jsx(
|
|
76
|
+
"label",
|
|
77
|
+
{
|
|
78
|
+
htmlFor: inputId,
|
|
79
|
+
className: "block text-sm font-medium text-text-primary",
|
|
80
|
+
children: label
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
inputWrapper
|
|
84
|
+
] });
|
|
85
|
+
}
|
|
86
|
+
return inputWrapper;
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
Input.displayName = "Input";
|
|
90
|
+
var Card = React2.forwardRef(
|
|
91
|
+
({ className, variant = "default", children, ...props }, ref) => {
|
|
92
|
+
const variants = {
|
|
93
|
+
default: "bg-white border border-stone-300",
|
|
94
|
+
elevated: "bg-white shadow-lg border border-stone-300",
|
|
95
|
+
outlined: "bg-white border border-stone-800"
|
|
96
|
+
};
|
|
97
|
+
return /* @__PURE__ */ jsx(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
ref,
|
|
101
|
+
className: cn("p-6", variants[variant], className),
|
|
102
|
+
...props,
|
|
103
|
+
children
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
Card.displayName = "Card";
|
|
109
|
+
var baseClasses = "text-current";
|
|
110
|
+
var Base = ({
|
|
111
|
+
as = "p",
|
|
112
|
+
children,
|
|
113
|
+
className,
|
|
114
|
+
defaultClasses,
|
|
115
|
+
...props
|
|
116
|
+
}) => {
|
|
117
|
+
const { bold, ...propsWithoutBold } = props;
|
|
118
|
+
return React2.createElement(
|
|
119
|
+
as,
|
|
120
|
+
{
|
|
121
|
+
className: cn(baseClasses, defaultClasses, className),
|
|
122
|
+
...propsWithoutBold
|
|
123
|
+
},
|
|
124
|
+
children
|
|
125
|
+
);
|
|
126
|
+
};
|
|
127
|
+
var TextStyle = (className, props) => {
|
|
128
|
+
const boldClass = props.bold ? className.bold : void 0;
|
|
129
|
+
return /* @__PURE__ */ jsx(
|
|
130
|
+
Base,
|
|
131
|
+
{
|
|
132
|
+
defaultClasses: cn(className.normal, boldClass),
|
|
133
|
+
...props
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
var Heading1 = (props) => TextStyle({ normal: "type-heading-1", bold: "type-heading-1-bold" }, props);
|
|
138
|
+
var Heading2 = (props) => TextStyle({ normal: "type-heading-2", bold: "type-heading-2-bold" }, props);
|
|
139
|
+
var Heading3 = (props) => TextStyle({ normal: "type-heading-3", bold: "type-heading-3-bold" }, props);
|
|
140
|
+
var Heading4 = (props) => TextStyle({ normal: "type-heading-4", bold: "type-heading-4-bold" }, props);
|
|
141
|
+
var Heading5 = (props) => TextStyle({ normal: "type-heading-5", bold: "type-heading-5-bold" }, props);
|
|
142
|
+
var Body1 = (props) => TextStyle({ normal: "type-body-1", bold: "type-body-1-bold" }, props);
|
|
143
|
+
var Body3 = (props) => TextStyle({ normal: "type-body-3", bold: "type-body-3-bold" }, props);
|
|
144
|
+
var Body4 = (props) => TextStyle({ normal: "type-body-4", bold: "type-body-4-bold" }, props);
|
|
145
|
+
var Body5 = (props) => TextStyle({ normal: "type-body-5", bold: "type-body-5-bold" }, props);
|
|
146
|
+
var Ui1 = (props) => TextStyle({ normal: "type-ui-1", bold: "type-ui-1-bold" }, props);
|
|
147
|
+
var Ui2 = (props) => TextStyle({ normal: "type-ui-2", bold: "type-ui-2-bold" }, props);
|
|
148
|
+
var Ui3 = (props) => TextStyle({ normal: "type-ui-3", bold: "type-ui-3-bold" }, props);
|
|
149
|
+
var Ui4 = (props) => TextStyle({ normal: "type-ui-4", bold: "type-ui-4-bold" }, props);
|
|
150
|
+
var Ui5 = (props) => TextStyle({ normal: "type-ui-5", bold: "type-ui-5-bold" }, props);
|
|
151
|
+
var Button1 = (props) => TextStyle({ normal: "type-button-1", bold: "type-button-1-bold" }, props);
|
|
152
|
+
|
|
153
|
+
export { Body1, Body3, Body4, Body5, Button, Button1, Card, Heading1, Heading2, Heading3, Heading4, Heading5, Input, Ui1, Ui2, Ui3, Ui4, Ui5 };
|
|
154
|
+
//# sourceMappingURL=index.js.map
|
|
155
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils.ts","../src/components/Button.tsx","../src/components/Input.tsx","../src/components/Card.tsx","../src/components/Text.tsx"],"names":["React","jsx"],"mappings":";;;;;;AAOO,SAAS,MAAM,OAAA,EAAwD;AAC5E,EAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACzC;ACDO,IAAM,SAASA,MAAA,CAAM,UAAA;AAAA,EAC1B,CAAC,EAAE,SAAA,EAAW,OAAA,GAAU,SAAA,EAAW,IAAA,GAAO,IAAA,EAAM,QAAA,EAAU,QAAA,EAAU,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AACtF,IAAA,MAAM,UAAA,GAAa,mHAAA;AAEnB,IAAA,MAAM,QAAA,GAAW;AAAA,MACf,OAAA,EAAS,oFAAA;AAAA,MACT,SAAA,EAAW,6DAAA;AAAA,MACX,OAAA,EAAS,uEAAA;AAAA,MACT,KAAA,EAAO;AAAA,KACT;AAEA,IAAA,MAAM,KAAA,GAAQ;AAAA,MACZ,EAAA,EAAI,qBAAA;AAAA,MACJ,EAAA,EAAI,qBAAA;AAAA,MACJ,EAAA,EAAI;AAAA,KACN;AAEA,IAAA,uBACE,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,GAAG,UAAA,EAAY,QAAA,CAAS,OAAO,CAAA,EAAG,KAAA,CAAM,IAAI,CAAA,EAAG,SAAS,CAAA;AAAA,QACnE,QAAA;AAAA,QACC,GAAG,KAAA;AAAA,QAEH;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,Q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A,GAAuB,CAAC,KAAA,KACnC,SAAA,CAAU,EAAE,QAAQ,aAAA,EAAe,IAAA,EAAM,kBAAA,EAAmB,EAAG,KAAK;AAE/D,IAAM,GAAA,GAAqB,CAAC,KAAA,KACjC,SAAA,CAAU,EAAE,QAAQ,WAAA,EAAa,IAAA,EAAM,gBAAA,EAAiB,EAAG,KAAK;AAE3D,IAAM,GAAA,GAAqB,CAAC,KAAA,KACjC,SAAA,CAAU,EAAE,QAAQ,WAAA,EAAa,IAAA,EAAM,gBAAA,EAAiB,EAAG,KAAK;AAE3D,IAAM,GAAA,GAAqB,CAAC,KAAA,KACjC,SAAA,CAAU,EAAE,QAAQ,WAAA,EAAa,IAAA,EAAM,gBAAA,EAAiB,EAAG,KAAK;AAE3D,IAAM,GAAA,GAAqB,CAAC,KAAA,KACjC,SAAA,CAAU,EAAE,QAAQ,WAAA,EAAa,IAAA,EAAM,gBAAA,EAAiB,EAAG,KAAK;AAE3D,IAAM,GAAA,GAAqB,CAAC,KAAA,KACjC,SAAA,CAAU,EAAE,QAAQ,WAAA,EAAa,IAAA,EAAM,gBAAA,EAAiB,EAAG,KAAK;AAE3D,IAAM,OAAA,GAAyB,CAAC,KAAA,KACrC,SAAA,CAAU,EAAE,QAAQ,eAAA,EAAiB,IAAA,EAAM,oBAAA,EAAqB,EAAG,KAAK","file":"index.js","sourcesContent":["/**\n * Utility functions for the design system\n */\n\n/**\n * Combines class names, handling undefined/null values\n */\nexport function cn(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\n","import React from 'react';\nimport { cn } from '../utils';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'primary' | 'secondary' | 'outline' | 'ghost';\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant = 'primary', size = 'md', children, disabled, ...props }, ref) => {\n const baseStyles = 'font-semibold transition-colors focus:outline-none cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed';\n \n const variants = {\n primary: 'bg-surface-lower-inverse text-text-primary-inverse hover:bg-surface-higher-inverse',\n secondary: 'bg-surface-brick text-text-primary-inverse hover:opacity-90',\n outline: 'border border-border-primary text-text-primary hover:bg-surface-lower',\n ghost: 'text-text-primary hover:bg-surface-lower',\n };\n\n const sizes = {\n sm: 'px-3 py-1.5 text-sm',\n md: 'px-6 py-3 text-base',\n lg: 'px-8 py-4 text-lg',\n };\n\n return (\n <button\n ref={ref}\n className={cn(baseStyles, variants[variant], sizes[size], className)}\n disabled={disabled}\n {...props}\n >\n {children}\n </button>\n );\n }\n);\n\nButton.displayName = 'Button';\n\n","import React from 'react';\nimport { cn } from '../utils';\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n error?: boolean;\n label?: string;\n wrapperClassName?: string;\n}\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, error, label, id, wrapperClassName, ...props }, ref) => {\n const inputId = id || label?.toLowerCase().replace(/\\s+/g, '-');\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n // Merge refs - support both forwarded ref and internal ref\n React.useImperativeHandle(ref, () => inputRef.current as HTMLInputElement, []);\n\n const handleWrapperClick = () => {\n inputRef.current?.focus();\n };\n\n const inputWrapper = (\n <div\n className={cn(\n 'border bg-surface-higher p-4 transition-colors cursor-text flex items-center',\n 'focus-within:border-border-primary focus-within:bg-golden',\n error\n ? 'border-border-brand bg-surface-brick focus-within:bg-surface-brick'\n : 'border-border-secondary',\n 'disabled:bg-surface-disabled disabled:cursor-not-allowed',\n wrapperClassName,\n )}\n onClick={handleWrapperClick}\n >\n <input\n ref={inputRef}\n id={inputId}\n className={cn(\n 'w-full bg-transparent outline-none font-sans text-base',\n 'text-text-primary placeholder:text-text-tertiary',\n 'placeholder:font-mono',\n 'disabled:cursor-not-allowed',\n className\n )}\n {...props}\n />\n </div>\n );\n\n if (label) {\n return (\n <div className=\"space-y-2\">\n <label\n htmlFor={inputId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n {label}\n </label>\n {inputWrapper}\n </div>\n );\n }\n\n return inputWrapper;\n }\n);\n\nInput.displayName = 'Input';\n\n","import React from 'react';\nimport { cn } from '../utils';\n\nexport interface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: 'default' | 'elevated' | 'outlined';\n}\n\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, variant = 'default', children, ...props }, ref) => {\n const variants = {\n default: 'bg-white border border-stone-300',\n elevated: 'bg-white shadow-lg border border-stone-300',\n outlined: 'bg-white border border-stone-800',\n };\n\n return (\n <div\n ref={ref}\n className={cn('p-6', variants[variant], className)}\n {...props}\n >\n {children}\n </div>\n );\n }\n);\n\nCard.displayName = 'Card';\n\n","import React from 'react';\nimport { cn } from '../utils';\n\ntype TextProps = {\n [x: string]: unknown;\n className?: string;\n as?: React.ElementType;\n bold?: boolean;\n children?: React.ReactNode;\n};\n\ntype TextComponent = React.FC<TextProps>;\n\nconst baseClasses = 'text-current';\n\nconst Base: React.FC<TextProps & { defaultClasses: string }> = ({\n as = 'p',\n children,\n className,\n defaultClasses,\n ...props\n}) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { bold, ...propsWithoutBold } = props;\n\n return React.createElement(\n as,\n {\n className: cn(baseClasses, defaultClasses, className),\n ...propsWithoutBold,\n },\n children\n );\n};\n\nconst TextStyle = (className: { normal: string; bold: string }, props: TextProps) => {\n const boldClass = props.bold ? className.bold : undefined;\n return (\n <Base\n defaultClasses={cn(className.normal, boldClass)}\n {...props}\n />\n );\n};\n\nexport const Heading1: TextComponent = (props) =>\n TextStyle({ normal: 'type-heading-1', bold: 'type-heading-1-bold' }, props);\n\nexport const Heading2: TextComponent = (props) =>\n TextStyle({ normal: 'type-heading-2', bold: 'type-heading-2-bold' }, props);\n\nexport const Heading3: TextComponent = (props) =>\n TextStyle({ normal: 'type-heading-3', bold: 'type-heading-3-bold' }, props);\n\nexport const Heading4: TextComponent = (props) =>\n TextStyle({ normal: 'type-heading-4', bold: 'type-heading-4-bold' }, props);\n\nexport const Heading5: TextComponent = (props) =>\n TextStyle({ normal: 'type-heading-5', bold: 'type-heading-5-bold' }, props);\n\nexport const Body1: TextComponent = (props) =>\n TextStyle({ normal: 'type-body-1', bold: 'type-body-1-bold' }, props);\n\nexport const Body3: TextComponent = (props) =>\n TextStyle({ normal: 'type-body-3', bold: 'type-body-3-bold' }, props);\n\nexport const Body4: TextComponent = (props) =>\n TextStyle({ normal: 'type-body-4', bold: 'type-body-4-bold' }, props);\n\nexport const Body5: TextComponent = (props) =>\n TextStyle({ normal: 'type-body-5', bold: 'type-body-5-bold' }, props);\n\nexport const Ui1: TextComponent = (props) =>\n TextStyle({ normal: 'type-ui-1', bold: 'type-ui-1-bold' }, props);\n\nexport const Ui2: TextComponent = (props) =>\n TextStyle({ normal: 'type-ui-2', bold: 'type-ui-2-bold' }, props);\n\nexport const Ui3: TextComponent = (props) =>\n TextStyle({ normal: 'type-ui-3', bold: 'type-ui-3-bold' }, props);\n\nexport const Ui4: TextComponent = (props) =>\n TextStyle({ normal: 'type-ui-4', bold: 'type-ui-4-bold' }, props);\n\nexport const Ui5: TextComponent = (props) =>\n TextStyle({ normal: 'type-ui-5', bold: 'type-ui-5-bold' }, props);\n\nexport const Button1: TextComponent = (props) =>\n TextStyle({ normal: 'type-button-1', bold: 'type-button-1-bold' }, props);\n\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@thru/design-system",
|
|
3
|
+
"version": "0.1.19",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts"
|
|
11
|
+
},
|
|
12
|
+
"./tailwind.css": "./src/tailwind.css"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"src/tailwind.css",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
21
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/react": "^19.0.0",
|
|
25
|
+
"@types/react-dom": "^19.0.0",
|
|
26
|
+
"tailwindcss": "^4.1.14",
|
|
27
|
+
"typescript": "^5.0.0"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsup",
|
|
31
|
+
"dev": "tsup --watch",
|
|
32
|
+
"lint": "eslint src/",
|
|
33
|
+
"clean": "rm -rf dist"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/src/tailwind.css
ADDED
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
@theme {
|
|
2
|
+
/* ========================================
|
|
3
|
+
BREAKPOINTS
|
|
4
|
+
======================================== */
|
|
5
|
+
--breakpoint-sm: 600px;
|
|
6
|
+
--breakpoint-md: 840px;
|
|
7
|
+
--breakpoint-lg: 1200px;
|
|
8
|
+
--breakpoint-xl: 1600px;
|
|
9
|
+
|
|
10
|
+
/* ========================================
|
|
11
|
+
COLOR SCALES
|
|
12
|
+
======================================== */
|
|
13
|
+
|
|
14
|
+
/* Steel (Neutral - Cool Gray) */
|
|
15
|
+
--color-steel-0: #f7f8f8;
|
|
16
|
+
--color-steel-100: #eaeef0;
|
|
17
|
+
--color-steel-200: #cdd5db;
|
|
18
|
+
--color-steel-300: #a4b3bc;
|
|
19
|
+
--color-steel-400: #7e93a0;
|
|
20
|
+
--color-steel-500: #5b6f7b;
|
|
21
|
+
--color-steel-600: #43515b;
|
|
22
|
+
--color-steel-700: #2b353b;
|
|
23
|
+
--color-steel-800: #151b1e;
|
|
24
|
+
|
|
25
|
+
/* Teal (Neutral - Warm Teal) */
|
|
26
|
+
--color-teal-0: #f9fbfb;
|
|
27
|
+
--color-teal-100: #eaf2f2;
|
|
28
|
+
--color-teal-200: #d1e1e1;
|
|
29
|
+
--color-teal-300: #a9c3c5;
|
|
30
|
+
--color-teal-400: #81a7a7;
|
|
31
|
+
--color-teal-500: #5e8787;
|
|
32
|
+
--color-teal-600: #456063;
|
|
33
|
+
--color-teal-700: #2d3e3e;
|
|
34
|
+
--color-teal-800: #151e1e;
|
|
35
|
+
|
|
36
|
+
/* Stone (Neutral - Alias to Teal for compatibility) */
|
|
37
|
+
--color-stone-0: var(--color-teal-0);
|
|
38
|
+
--color-stone-100: var(--color-teal-100);
|
|
39
|
+
--color-stone-200: var(--color-teal-200);
|
|
40
|
+
--color-stone-300: var(--color-teal-300);
|
|
41
|
+
--color-stone-400: var(--color-teal-400);
|
|
42
|
+
--color-stone-600: var(--color-teal-600);
|
|
43
|
+
--color-stone-700: var(--color-teal-700);
|
|
44
|
+
--color-stone-800: var(--color-teal-800);
|
|
45
|
+
|
|
46
|
+
/* Brick (Primary Brand Color) */
|
|
47
|
+
--color-brick-100: #fbdadc;
|
|
48
|
+
--color-brick-200: #f6acb0;
|
|
49
|
+
--color-brick-300: #ed787e;
|
|
50
|
+
--color-brick-400: #d33c43;
|
|
51
|
+
|
|
52
|
+
/* Thru Brick (Legacy naming) */
|
|
53
|
+
--color-thru-brick: var(--color-brick-200);
|
|
54
|
+
--color-thru-brick-alt: var(--color-brick-100);
|
|
55
|
+
--color-brick: var(--color-brick-200);
|
|
56
|
+
|
|
57
|
+
/* Sky (Blue) */
|
|
58
|
+
--color-sky-100: #cfeffc;
|
|
59
|
+
--color-sky-200: #8cd4f2;
|
|
60
|
+
--color-sky-300: #28a3d7;
|
|
61
|
+
--color-sky-400: #0279b1;
|
|
62
|
+
|
|
63
|
+
/* Grass (Green) */
|
|
64
|
+
--color-grass-100: #c2ebe8;
|
|
65
|
+
--color-grass-200: #75d1cc;
|
|
66
|
+
--color-grass-300: #239f97;
|
|
67
|
+
--color-grass-400: #0a766f;
|
|
68
|
+
|
|
69
|
+
/* Yellow (Saffron) */
|
|
70
|
+
--color-yellow-100: #fdefdd;
|
|
71
|
+
--color-yellow-200: #fde0ba;
|
|
72
|
+
--color-yellow-300: #fbc784;
|
|
73
|
+
--color-yellow-400: #ffad42;
|
|
74
|
+
|
|
75
|
+
/* Tan */
|
|
76
|
+
--color-tan-100: #f6ebe5;
|
|
77
|
+
--color-tan-200: #ebd5c7;
|
|
78
|
+
--color-tan-300: #ddb8a0;
|
|
79
|
+
--color-tan-400: #c98f69;
|
|
80
|
+
|
|
81
|
+
/* Sand */
|
|
82
|
+
--color-sand-100: #f6ebe5;
|
|
83
|
+
--color-sand-200: #ebd5c7;
|
|
84
|
+
--color-sand-300: #ddb8a0;
|
|
85
|
+
--color-sand-400: #c98f69;
|
|
86
|
+
|
|
87
|
+
/* Golden */
|
|
88
|
+
--color-golden: #ffffbd;
|
|
89
|
+
|
|
90
|
+
/* ========================================
|
|
91
|
+
SEMANTIC COLOR TOKENS
|
|
92
|
+
======================================== */
|
|
93
|
+
|
|
94
|
+
/* Text Colors */
|
|
95
|
+
--color-text-primary: var(--color-steel-800);
|
|
96
|
+
--color-text-secondary: var(--color-teal-600);
|
|
97
|
+
--color-text-tertiary: var(--color-steel-400);
|
|
98
|
+
--color-text-brand: var(--color-brick-400);
|
|
99
|
+
--color-text-disabled: var(--color-steel-300);
|
|
100
|
+
--color-text-primary-inverse: var(--color-teal-0);
|
|
101
|
+
--color-text-secondary-inverse: var(--color-teal-200);
|
|
102
|
+
--color-text-tertiary-inverse: var(--color-teal-400);
|
|
103
|
+
--color-text-disabled-inverse: var(--color-steel-600);
|
|
104
|
+
|
|
105
|
+
/* Border Colors */
|
|
106
|
+
--color-border-primary: var(--color-teal-800);
|
|
107
|
+
--color-border-secondary: var(--color-teal-400);
|
|
108
|
+
--color-border-tertiary: var(--color-teal-200);
|
|
109
|
+
--color-border-brand: var(--color-brick-400);
|
|
110
|
+
--color-border-disabled: var(--color-steel-300);
|
|
111
|
+
|
|
112
|
+
/* Surface Colors */
|
|
113
|
+
--color-surface-higher: var(--color-teal-0);
|
|
114
|
+
--color-surface-primary: var(--color-teal-100);
|
|
115
|
+
--color-surface-lower: var(--color-teal-200);
|
|
116
|
+
--color-surface-disabled: var(--color-steel-100);
|
|
117
|
+
--color-surface-higher-inverse: var(--color-teal-600);
|
|
118
|
+
--color-surface-primary-inverse: var(--color-teal-700);
|
|
119
|
+
--color-surface-lower-inverse: var(--color-steel-800);
|
|
120
|
+
|
|
121
|
+
/* Surface Brand Colors */
|
|
122
|
+
--color-surface-brick: var(--color-brick-400);
|
|
123
|
+
--color-surface-sky: var(--color-sky-400);
|
|
124
|
+
--color-surface-grass: var(--color-grass-400);
|
|
125
|
+
--color-surface-yellow: var(--color-yellow-400);
|
|
126
|
+
--color-surface-tan: var(--color-tan-400);
|
|
127
|
+
--color-surface-sand: var(--color-sand-400);
|
|
128
|
+
|
|
129
|
+
/* ========================================
|
|
130
|
+
FONT FAMILIES
|
|
131
|
+
======================================== */
|
|
132
|
+
--font-sans: var(--font-inter-tight);
|
|
133
|
+
--font-mono: var(--font-jetbrains-mono);
|
|
134
|
+
|
|
135
|
+
/* ========================================
|
|
136
|
+
FONT SIZES (for text-* utilities)
|
|
137
|
+
======================================== */
|
|
138
|
+
--text-headline-2xl: 5rem;
|
|
139
|
+
--text-headline-xl: 4rem;
|
|
140
|
+
--text-headline-l: 3rem;
|
|
141
|
+
--text-headline-m: 2.5rem;
|
|
142
|
+
--text-headline-s: 2rem;
|
|
143
|
+
--text-headline-xs: 1.5rem;
|
|
144
|
+
--text-body-xl: 1.25rem;
|
|
145
|
+
--text-body-l: 1.125rem;
|
|
146
|
+
--text-body-m: 1rem;
|
|
147
|
+
--text-body-s: 0.875rem;
|
|
148
|
+
--text-body-xs: 0.75rem;
|
|
149
|
+
|
|
150
|
+
/* ========================================
|
|
151
|
+
BORDER WIDTH
|
|
152
|
+
======================================== */
|
|
153
|
+
--border-width: 1px;
|
|
154
|
+
--border-width-2: 2px;
|
|
155
|
+
--border-width-4: 4px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* ========================================
|
|
159
|
+
TYPOGRAPHY CSS CLASSES
|
|
160
|
+
======================================== */
|
|
161
|
+
|
|
162
|
+
.type-heading-1 {
|
|
163
|
+
font-family: var(--font-sans);
|
|
164
|
+
font-size: 2.5rem;
|
|
165
|
+
line-height: 2.5rem;
|
|
166
|
+
letter-spacing: -0.03125rem;
|
|
167
|
+
font-weight: 400;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
@media (min-width: 600px) {
|
|
171
|
+
.type-heading-1 {
|
|
172
|
+
font-size: 3rem;
|
|
173
|
+
line-height: 3rem;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@media (min-width: 840px) {
|
|
178
|
+
.type-heading-1 {
|
|
179
|
+
font-size: 4rem;
|
|
180
|
+
line-height: 4rem;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.type-heading-1-bold {
|
|
185
|
+
font-weight: 600;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.type-heading-2 {
|
|
189
|
+
font-family: var(--font-sans);
|
|
190
|
+
font-size: 2.5rem;
|
|
191
|
+
line-height: 2.5rem;
|
|
192
|
+
font-weight: 400;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@media (min-width: 600px) {
|
|
196
|
+
.type-heading-2 {
|
|
197
|
+
font-size: 2.75rem;
|
|
198
|
+
line-height: 2.75rem;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@media (min-width: 840px) {
|
|
203
|
+
.type-heading-2 {
|
|
204
|
+
font-size: 3rem;
|
|
205
|
+
line-height: 3rem;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.type-heading-2-bold {
|
|
210
|
+
font-weight: 600;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.type-heading-3 {
|
|
214
|
+
font-family: var(--font-sans);
|
|
215
|
+
font-size: 2rem;
|
|
216
|
+
line-height: 2rem;
|
|
217
|
+
font-weight: 400;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@media (min-width: 600px) {
|
|
221
|
+
.type-heading-3 {
|
|
222
|
+
font-size: 2.25rem;
|
|
223
|
+
line-height: 2.25rem;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@media (min-width: 840px) {
|
|
228
|
+
.type-heading-3 {
|
|
229
|
+
font-size: 2.5rem;
|
|
230
|
+
line-height: 2.5rem;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.type-heading-3-bold {
|
|
235
|
+
font-weight: 600;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.type-heading-4 {
|
|
239
|
+
font-family: var(--font-sans);
|
|
240
|
+
font-size: 1.75rem;
|
|
241
|
+
line-height: 2rem;
|
|
242
|
+
font-weight: 400;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@media (min-width: 840px) {
|
|
246
|
+
.type-heading-4 {
|
|
247
|
+
font-size: 2rem;
|
|
248
|
+
line-height: 2.25rem;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.type-heading-4-bold {
|
|
253
|
+
font-weight: 600;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.type-heading-5 {
|
|
257
|
+
font-family: var(--font-sans);
|
|
258
|
+
font-size: 1.5rem;
|
|
259
|
+
line-height: 2rem;
|
|
260
|
+
font-weight: 400;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.type-heading-5-bold {
|
|
264
|
+
font-weight: 600;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.type-body-1 {
|
|
268
|
+
font-family: var(--font-sans);
|
|
269
|
+
font-size: 1.25rem;
|
|
270
|
+
line-height: 1.75rem;
|
|
271
|
+
font-weight: 400;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.type-body-1-bold {
|
|
275
|
+
font-weight: 600;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.type-body-3 {
|
|
279
|
+
font-family: var(--font-sans);
|
|
280
|
+
font-size: 1rem;
|
|
281
|
+
line-height: 1.5rem;
|
|
282
|
+
font-weight: 400;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@media (min-width: 1600px) {
|
|
286
|
+
.type-body-3 {
|
|
287
|
+
font-size: 1.125rem;
|
|
288
|
+
line-height: 1.75rem;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.type-body-3-bold {
|
|
293
|
+
font-weight: 600;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.type-body-4 {
|
|
297
|
+
font-family: var(--font-sans);
|
|
298
|
+
font-size: 0.875rem;
|
|
299
|
+
line-height: 1.25rem;
|
|
300
|
+
font-weight: 400;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@media (min-width: 1600px) {
|
|
304
|
+
.type-body-4 {
|
|
305
|
+
font-size: 1rem;
|
|
306
|
+
line-height: 1.5rem;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.type-body-4-bold {
|
|
311
|
+
font-weight: 600;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.type-body-5 {
|
|
315
|
+
font-family: var(--font-sans);
|
|
316
|
+
font-size: 0.75rem;
|
|
317
|
+
line-height: 1rem;
|
|
318
|
+
font-weight: 400;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
@media (min-width: 1600px) {
|
|
322
|
+
.type-body-5 {
|
|
323
|
+
font-size: 0.875rem;
|
|
324
|
+
line-height: 1.25rem;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.type-body-5-bold {
|
|
329
|
+
font-weight: 600;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.type-ui-1 {
|
|
333
|
+
font-family: var(--font-mono);
|
|
334
|
+
font-size: 1.25rem;
|
|
335
|
+
line-height: 1.75rem;
|
|
336
|
+
font-weight: 400;
|
|
337
|
+
letter-spacing: -0.03125rem;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.type-ui-1-bold {
|
|
341
|
+
font-weight: 700;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.type-ui-2 {
|
|
345
|
+
font-family: var(--font-mono);
|
|
346
|
+
font-size: 1.125rem;
|
|
347
|
+
line-height: 1.75rem;
|
|
348
|
+
font-weight: 400;
|
|
349
|
+
letter-spacing: -0.015625rem;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.type-ui-2-bold {
|
|
353
|
+
font-weight: 700;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.type-ui-3 {
|
|
357
|
+
font-family: var(--font-mono);
|
|
358
|
+
font-size: 1rem;
|
|
359
|
+
line-height: 1.5rem;
|
|
360
|
+
font-weight: 400;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.type-ui-3-bold {
|
|
364
|
+
font-weight: 700;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.type-ui-4 {
|
|
368
|
+
font-family: var(--font-mono);
|
|
369
|
+
font-size: 0.875rem;
|
|
370
|
+
line-height: 1.25rem;
|
|
371
|
+
font-weight: 400;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.type-ui-4-bold {
|
|
375
|
+
font-weight: 700;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.type-ui-5 {
|
|
379
|
+
font-family: var(--font-mono);
|
|
380
|
+
font-size: 0.75rem;
|
|
381
|
+
line-height: 1rem;
|
|
382
|
+
font-weight: 400;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
@media (min-width: 1600px) {
|
|
386
|
+
.type-ui-5 {
|
|
387
|
+
font-size: 0.875rem;
|
|
388
|
+
line-height: 1.25rem;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.type-ui-5-bold {
|
|
393
|
+
font-weight: 700;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.type-button-1 {
|
|
397
|
+
font-family: var(--font-sans);
|
|
398
|
+
font-size: 0.875rem;
|
|
399
|
+
line-height: 1.25rem;
|
|
400
|
+
font-weight: 400;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.type-button-1-bold {
|
|
404
|
+
font-weight: 600;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/* ========================================
|
|
408
|
+
UTILITY CLASSES
|
|
409
|
+
======================================== */
|
|
410
|
+
|
|
411
|
+
.scrollbar-hide {
|
|
412
|
+
-ms-overflow-style: none; /* Internet Explorer 10+ */
|
|
413
|
+
scrollbar-width: none; /* Firefox */
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.scrollbar-hide::-webkit-scrollbar {
|
|
417
|
+
display: none; /* Safari and Chrome */
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/* ========================================
|
|
421
|
+
ANIMATIONS
|
|
422
|
+
======================================== */
|
|
423
|
+
|
|
424
|
+
.pressure-gauge {
|
|
425
|
+
animation: pressure-rise 2s ease-in-out 0.25s forwards;
|
|
426
|
+
transform-origin: 12.5px 43px;
|
|
427
|
+
transform: rotate(44deg);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
@keyframes pressure-rise {
|
|
431
|
+
0% {
|
|
432
|
+
transform: rotate(44deg); /* 0 PSI */
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/* Overshoot to near max */
|
|
436
|
+
40% {
|
|
437
|
+
transform: rotate(315deg); /* ~100 PSI */
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/* First slight drop back */
|
|
441
|
+
60% {
|
|
442
|
+
transform: rotate(308deg); /* ~88 PSI */
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* Final settle at 80 PSI */
|
|
446
|
+
100% {
|
|
447
|
+
transform: rotate(312deg); /* ~90 PSI */
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
@keyframes slide-left-right {
|
|
452
|
+
0% {
|
|
453
|
+
transform: translateX(0);
|
|
454
|
+
}
|
|
455
|
+
50% {
|
|
456
|
+
transform: translateX(4px);
|
|
457
|
+
}
|
|
458
|
+
100% {
|
|
459
|
+
transform: translateX(0);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
@keyframes bounce-slow {
|
|
464
|
+
0%,
|
|
465
|
+
100% {
|
|
466
|
+
transform: translateY(0);
|
|
467
|
+
}
|
|
468
|
+
50% {
|
|
469
|
+
transform: translateY(-4px);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.animate-slide {
|
|
474
|
+
animation: slide-left-right 1.5s ease-in-out infinite;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.group:hover .group-hover\:animate-slide {
|
|
478
|
+
animation: slide-left-right 1.5s ease-in-out infinite;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.animate-bounce-slow {
|
|
482
|
+
animation: bounce-slow 3s ease-in-out infinite;
|
|
483
|
+
}
|