@repobit/dex-system-design 0.21.1 → 0.22.0
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/CHANGELOG.md +20 -0
- package/package.json +4 -2
- package/src/components/Button/Button.js +7 -2
- package/src/components/Button/button.css.js +30 -0
- package/src/components/accordion/accordion-bg.stories.js +341 -171
- package/src/components/accordion/accordion.stories.js +345 -0
- package/src/components/anchor/anchor-nav.js +1 -0
- package/src/components/anchor/anchor.stories.js +134 -76
- package/src/components/back/back.css.js +1 -1
- package/src/components/back/back.stories.js +301 -63
- package/src/components/badge/badge.js +4 -7
- package/src/components/badge/badge.stories.js +89 -96
- package/src/components/breadcrumb/breadcrumb.stories.js +167 -3
- package/src/components/cards/card.stories.js +153 -3
- package/src/components/display/display.css.js +7 -10
- package/src/components/display/display.js +14 -2
- package/src/components/display/display.stories.js +213 -219
- package/src/components/divider/divider.stories.js +337 -30
- package/src/components/footer/footer-lp.stories.js +346 -3
- package/src/components/footer/footer.js +0 -3
- package/src/components/footer/footer.stories.js +267 -4
- package/src/components/header/header.css.js +1 -1
- package/src/components/header/header.js +81 -56
- package/src/components/header/header.stories.js +298 -22
- package/src/components/heading/heading.css.js +1 -1
- package/src/components/heading/heading.stories.js +355 -113
- package/src/components/image/image.css.js +146 -98
- package/src/components/image/image.js +13 -2
- package/src/components/image/image.stories.js +546 -160
- package/src/components/input/custom-form.stories.js +209 -12
- package/src/components/link/link.css.js +2 -2
- package/src/components/link/link.stories.js +383 -53
- package/src/components/paragraph/paragraph.css.js +1 -1
- package/src/components/paragraph/paragraph.stories.js +365 -157
- package/src/components/picture/picture.css.js +209 -0
- package/src/components/picture/picture.js +16 -2
- package/src/components/picture/picture.stories.js +525 -180
- package/src/components/pricing-cards/new-pricing-card.js +19 -4
- package/src/components/pricing-cards/new-pricing-card.stories.js +422 -0
- package/src/components/pricing-cards/new-pricing.css.js +8 -0
- package/src/components/pricing-cards/pricing-card-actions.js +50 -9
- package/src/components/pricing-cards/pricing-card-container.css.js +1 -1
- package/src/components/pricing-cards/pricing-card-header.css.js +73 -63
- package/src/components/pricing-cards/pricing-card-header.js +44 -10
- package/src/components/pricing-cards/pricing-card-pricing.js +63 -64
- package/src/components/pricing-cards/pricing-card.css.js +7 -15
- package/src/components/pricing-cards/pricing-card.js +354 -271
- package/src/components/pricing-cards/pricing-card.stories.js +3 -3
- package/src/tokens/fonts.stories.js +335 -8
- package/src/tokens/spacing.stories.js +701 -34
- package/src/tokens/tokens-grid.stories.js +897 -48
- package/src/tokens/typography.stories.js +980 -38
- package/src/components/accordion/accordion-light.stories.js +0 -241
|
@@ -2,68 +2,1010 @@ import { html } from 'lit';
|
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Design Tokens/Typography',
|
|
5
|
+
tags : ['autodocs'],
|
|
6
|
+
|
|
7
|
+
argTypes: {
|
|
8
|
+
sampleText: {
|
|
9
|
+
control : 'text',
|
|
10
|
+
description: 'Sample text to display typography examples',
|
|
11
|
+
table : {
|
|
12
|
+
type : { summary: 'string' },
|
|
13
|
+
defaultValue: { summary: 'The quick brown fox jumps over the lazy dog.' }
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
showLineHeight: {
|
|
17
|
+
control : 'boolean',
|
|
18
|
+
description: 'Show line height visualization',
|
|
19
|
+
table : {
|
|
20
|
+
type : { summary: 'boolean' },
|
|
21
|
+
defaultValue: { summary: 'true' }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
showLetterSpacing: {
|
|
25
|
+
control : 'boolean',
|
|
26
|
+
description: 'Show letter spacing visualization',
|
|
27
|
+
table : {
|
|
28
|
+
type : { summary: 'boolean' },
|
|
29
|
+
defaultValue: { summary: 'false' }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
parameters: {
|
|
35
|
+
docs: {
|
|
36
|
+
description: {
|
|
37
|
+
component: `
|
|
38
|
+
# Typography System
|
|
39
|
+
|
|
40
|
+
Complete typography system with font families, sizes, weights, and spacing tokens for consistent text styling across the application.
|
|
41
|
+
|
|
42
|
+
## Overview
|
|
43
|
+
|
|
44
|
+
The typography system uses CSS custom properties to ensure consistency in font styling. It includes comprehensive scales for font sizes, weights, line heights, and letter spacing.
|
|
45
|
+
|
|
46
|
+
## Design Tokens
|
|
47
|
+
|
|
48
|
+
### Font Families
|
|
49
|
+
| Token | Value | Use Case |
|
|
50
|
+
|-------|-------|----------|
|
|
51
|
+
| \`--font-family-sans\` | 'IBM Plex Sans', Arial, sans-serif | Primary UI font |
|
|
52
|
+
| \`--font-family-mono\` | 'IBM Plex Mono', monospace | Code, technical content |
|
|
53
|
+
|
|
54
|
+
### Font Sizes (Modular Scale)
|
|
55
|
+
| Token | Value (rem) | Value (px) | Use Case |
|
|
56
|
+
|-------|-------------|------------|----------|
|
|
57
|
+
| \`--font-size-xs\` | 0.75rem | 12px | Labels, captions |
|
|
58
|
+
| \`--font-size-sm\` | 0.875rem | 14px | Small body text |
|
|
59
|
+
| \`--font-size-md\` | 1rem | 16px | Base body text |
|
|
60
|
+
| \`--font-size-lg\` | 1.25rem | 20px | Subheadings |
|
|
61
|
+
| \`--font-size-xl\` | 1.5rem | 24px | Headings |
|
|
62
|
+
| \`--font-size-2xl\` | 2rem | 32px | Large headings |
|
|
63
|
+
| \`--font-size-3xl\` | 2.5rem | 40px | Page titles |
|
|
64
|
+
| \`--font-size-4xl\` | 3rem | 48px | Hero text |
|
|
65
|
+
|
|
66
|
+
### Font Weights
|
|
67
|
+
| Token | Value | Use Case |
|
|
68
|
+
|-------|-------|----------|
|
|
69
|
+
| \`--font-weight-light\` | 300 | Light text, subtle emphasis |
|
|
70
|
+
| \`--font-weight-regular\` | 400 | Normal body text |
|
|
71
|
+
| \`--font-weight-medium\` | 500 | Medium emphasis |
|
|
72
|
+
| \`--font-weight-semibold\` | 600 | Strong emphasis, subheadings |
|
|
73
|
+
| \`--font-weight-bold\` | 700 | Bold text, headings |
|
|
74
|
+
| \`--font-weight-extrabold\` | 800 | Heavy emphasis, display text |
|
|
75
|
+
|
|
76
|
+
### Line Heights
|
|
77
|
+
| Token | Value | Use Case |
|
|
78
|
+
|-------|-------|----------|
|
|
79
|
+
| \`--line-height-tight\` | 1.2 | Headings, single lines |
|
|
80
|
+
| \`--line-height-normal\` | 1.5 | Body text, paragraphs |
|
|
81
|
+
| \`--line-height-relaxed\` | 1.75 | Long-form content |
|
|
82
|
+
| \`--line-height-loose\` | 2 | Poetry, special layouts |
|
|
83
|
+
|
|
84
|
+
### Letter Spacing
|
|
85
|
+
| Token | Value | Use Case |
|
|
86
|
+
|-------|-------|----------|
|
|
87
|
+
| \`--letter-spacing-tighter\` | -0.05em | Condensed text |
|
|
88
|
+
| \`--letter-spacing-tight\` | -0.025em | Slightly condensed |
|
|
89
|
+
| \`--letter-spacing-normal\` | 0 | Normal text |
|
|
90
|
+
| \`--letter-spacing-wide\` | 0.025em | Slightly expanded |
|
|
91
|
+
| \`--letter-spacing-wider\` | 0.05em | Expanded text |
|
|
92
|
+
| \`--letter-spacing-widest\` | 0.1em | Display text, headers |
|
|
93
|
+
|
|
94
|
+
## Usage
|
|
95
|
+
|
|
96
|
+
### Basic Typography
|
|
97
|
+
\`\`\`css
|
|
98
|
+
/* Using CSS custom properties */
|
|
99
|
+
body {
|
|
100
|
+
font-family: var(--font-family-sans);
|
|
101
|
+
font-size: var(--font-size-md);
|
|
102
|
+
line-height: var(--line-height-normal);
|
|
103
|
+
font-weight: var(--font-weight-regular);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
h1 {
|
|
107
|
+
font-size: var(--font-size-3xl);
|
|
108
|
+
font-weight: var(--font-weight-bold);
|
|
109
|
+
line-height: var(--line-height-tight);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
code {
|
|
113
|
+
font-family: var(--font-family-mono);
|
|
114
|
+
font-size: var(--font-size-sm);
|
|
115
|
+
}
|
|
116
|
+
\`\`\`
|
|
117
|
+
|
|
118
|
+
### Semantic CSS Classes
|
|
119
|
+
\`\`\`html
|
|
120
|
+
<p class="text-sm">Small text</p>
|
|
121
|
+
<p class="text-lg font-semibold">Large semi-bold text</p>
|
|
122
|
+
<p class="text-xl font-bold leading-tight">Extra large bold text with tight leading</p>
|
|
123
|
+
<div class="font-mono text-sm">Monospace code text</div>
|
|
124
|
+
\`\`\`
|
|
125
|
+
|
|
126
|
+
### Responsive Typography
|
|
127
|
+
\`\`\`css
|
|
128
|
+
.heading {
|
|
129
|
+
font-size: var(--font-size-lg);
|
|
130
|
+
|
|
131
|
+
@media (min-width: 768px) {
|
|
132
|
+
font-size: var(--font-size-xl);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@media (min-width: 1024px) {
|
|
136
|
+
font-size: var(--font-size-2xl);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
\`\`\`
|
|
140
|
+
|
|
141
|
+
## Complete CSS Custom Properties
|
|
142
|
+
|
|
143
|
+
\`\`\`css
|
|
144
|
+
:root {
|
|
145
|
+
/* Font Families */
|
|
146
|
+
--font-family-sans: 'IBM Plex Sans', Arial, sans-serif;
|
|
147
|
+
--font-family-mono: 'IBM Plex Mono', monospace;
|
|
148
|
+
|
|
149
|
+
/* Font Sizes */
|
|
150
|
+
--font-size-xs: 0.75rem;
|
|
151
|
+
--font-size-sm: 0.875rem;
|
|
152
|
+
--font-size-md: 1rem;
|
|
153
|
+
--font-size-lg: 1.25rem;
|
|
154
|
+
--font-size-xl: 1.5rem;
|
|
155
|
+
--font-size-2xl: 2rem;
|
|
156
|
+
--font-size-3xl: 2.5rem;
|
|
157
|
+
--font-size-4xl: 3rem;
|
|
158
|
+
|
|
159
|
+
/* Font Weights */
|
|
160
|
+
--font-weight-light: 300;
|
|
161
|
+
--font-weight-regular: 400;
|
|
162
|
+
--font-weight-medium: 500;
|
|
163
|
+
--font-weight-semibold: 600;
|
|
164
|
+
--font-weight-bold: 700;
|
|
165
|
+
--font-weight-extrabold: 800;
|
|
166
|
+
|
|
167
|
+
/* Line Heights */
|
|
168
|
+
--line-height-tight: 1.2;
|
|
169
|
+
--line-height-normal: 1.5;
|
|
170
|
+
--line-height-relaxed: 1.75;
|
|
171
|
+
--line-height-loose: 2;
|
|
172
|
+
|
|
173
|
+
/* Letter Spacing */
|
|
174
|
+
--letter-spacing-tighter: -0.05em;
|
|
175
|
+
--letter-spacing-tight: -0.025em;
|
|
176
|
+
--letter-spacing-normal: 0;
|
|
177
|
+
--letter-spacing-wide: 0.025em;
|
|
178
|
+
--letter-spacing-wider: 0.05em;
|
|
179
|
+
--letter-spacing-widest: 0.1em;
|
|
180
|
+
|
|
181
|
+
/* Text Colors */
|
|
182
|
+
--text-color-primary: #212529;
|
|
183
|
+
--text-color-secondary: #6c757d;
|
|
184
|
+
--text-color-muted: #adb5bd;
|
|
185
|
+
--text-color-on-dark: #ffffff;
|
|
186
|
+
}
|
|
187
|
+
\`\`\`
|
|
188
|
+
|
|
189
|
+
## Best Practices
|
|
190
|
+
|
|
191
|
+
### 1. Use Relative Units
|
|
192
|
+
\`\`\`css
|
|
193
|
+
/* Good ✅ - Uses rem for accessibility */
|
|
194
|
+
font-size: var(--font-size-md);
|
|
195
|
+
|
|
196
|
+
/* Bad ❌ - Fixed pixels ignore user preferences */
|
|
197
|
+
font-size: 16px;
|
|
198
|
+
\`\`\`
|
|
199
|
+
|
|
200
|
+
### 2. Maintain Hierarchy
|
|
201
|
+
\`\`\`css
|
|
202
|
+
h1 { font-size: var(--font-size-3xl); }
|
|
203
|
+
h2 { font-size: var(--font-size-2xl); }
|
|
204
|
+
h3 { font-size: var(--font-size-xl); }
|
|
205
|
+
h4 { font-size: var(--font-size-lg); }
|
|
206
|
+
h5 { font-size: var(--font-size-md); }
|
|
207
|
+
h6 { font-size: var(--font-size-sm); }
|
|
208
|
+
\`\`\`
|
|
209
|
+
|
|
210
|
+
### 3. Ensure Readability
|
|
211
|
+
- Minimum 16px (1rem) for body text
|
|
212
|
+
- Line length between 45-75 characters
|
|
213
|
+
- Contrast ratio of at least 4.5:1 for normal text
|
|
214
|
+
- Adequate line spacing (1.5× for body text)
|
|
215
|
+
|
|
216
|
+
### 4. Responsive Considerations
|
|
217
|
+
- Increase font sizes on larger screens
|
|
218
|
+
- Adjust line heights for different viewports
|
|
219
|
+
- Consider touch targets for interactive text
|
|
220
|
+
|
|
221
|
+
## Accessibility
|
|
222
|
+
|
|
223
|
+
### Text Scaling
|
|
224
|
+
All typography tokens use \`rem\` units, which respect the user's browser font size settings.
|
|
225
|
+
|
|
226
|
+
### Color Contrast
|
|
227
|
+
Ensure text meets WCAG 2.1 contrast requirements:
|
|
228
|
+
- Normal text: 4.5:1 minimum
|
|
229
|
+
- Large text (18px+): 3:1 minimum
|
|
230
|
+
|
|
231
|
+
### Screen Readers
|
|
232
|
+
- Use semantic HTML headings (h1-h6)
|
|
233
|
+
- Provide alternative text for images
|
|
234
|
+
- Ensure proper reading order
|
|
235
|
+
- Test with screen readers
|
|
236
|
+
|
|
237
|
+
## Browser Support
|
|
238
|
+
|
|
239
|
+
All typography features are supported in modern browsers:
|
|
240
|
+
- Chrome 60+
|
|
241
|
+
- Firefox 55+
|
|
242
|
+
- Safari 11+
|
|
243
|
+
- Edge 79+
|
|
244
|
+
|
|
245
|
+
For variable fonts support (if using IBM Plex Variable):
|
|
246
|
+
- Chrome 60+
|
|
247
|
+
- Firefox 62+
|
|
248
|
+
- Safari 11+
|
|
249
|
+
- Edge 17+
|
|
250
|
+
|
|
251
|
+
## Performance
|
|
252
|
+
|
|
253
|
+
- Use \`font-display: swap\` for web fonts
|
|
254
|
+
- Subset fonts when possible
|
|
255
|
+
- Consider system fonts as fallbacks
|
|
256
|
+
- Implement font loading strategies
|
|
257
|
+
|
|
258
|
+
## Testing
|
|
259
|
+
|
|
260
|
+
Test typography with:
|
|
261
|
+
- Different screen sizes and resolutions
|
|
262
|
+
- High contrast modes
|
|
263
|
+
- Screen magnifiers
|
|
264
|
+
- Various browser zoom levels
|
|
265
|
+
- Different operating systems
|
|
266
|
+
`
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
5
270
|
};
|
|
6
271
|
|
|
7
272
|
const typographyTokens = {
|
|
8
273
|
families: {
|
|
9
274
|
'Sans': 'var(--font-family-sans, "IBM Plex Sans", Arial, sans-serif)',
|
|
10
|
-
'Mono': 'var(--font-family-mono, "IBM Plex Mono", monospace)'
|
|
275
|
+
'Mono': 'var(--font-family-mono, "IBM Plex Mono", monospace)'
|
|
11
276
|
},
|
|
12
277
|
sizes: {
|
|
13
|
-
xs: 'var(--font-size-xs, 0.75rem)',
|
|
14
|
-
sm: 'var(--font-size-sm, 0.875rem)',
|
|
15
|
-
md: 'var(--font-size-md, 1rem)',
|
|
16
|
-
lg: 'var(--font-size-lg, 1.25rem)',
|
|
17
|
-
xl: 'var(--font-size-xl, 1.5rem)',
|
|
278
|
+
'xs' : 'var(--font-size-xs, 0.75rem)',
|
|
279
|
+
'sm' : 'var(--font-size-sm, 0.875rem)',
|
|
280
|
+
'md' : 'var(--font-size-md, 1rem)',
|
|
281
|
+
'lg' : 'var(--font-size-lg, 1.25rem)',
|
|
282
|
+
'xl' : 'var(--font-size-xl, 1.5rem)',
|
|
283
|
+
'2xl': 'var(--font-size-2xl, 2rem)',
|
|
284
|
+
'3xl': 'var(--font-size-3xl, 2.5rem)',
|
|
285
|
+
'4xl': 'var(--font-size-4xl, 3rem)'
|
|
18
286
|
},
|
|
19
287
|
weights: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
288
|
+
'light' : 'var(--font-weight-light, 300)',
|
|
289
|
+
'regular' : 'var(--font-weight-regular, 400)',
|
|
290
|
+
'medium' : 'var(--font-weight-medium, 500)',
|
|
291
|
+
'semibold' : 'var(--font-weight-semibold, 600)',
|
|
292
|
+
'bold' : 'var(--font-weight-bold, 700)',
|
|
293
|
+
'extrabold': 'var(--font-weight-extrabold, 800)'
|
|
23
294
|
},
|
|
295
|
+
lineHeights: {
|
|
296
|
+
'tight' : 'var(--line-height-tight, 1.2)',
|
|
297
|
+
'normal' : 'var(--line-height-normal, 1.5)',
|
|
298
|
+
'relaxed': 'var(--line-height-relaxed, 1.75)',
|
|
299
|
+
'loose' : 'var(--line-height-loose, 2)'
|
|
300
|
+
},
|
|
301
|
+
letterSpacing: {
|
|
302
|
+
'tighter': 'var(--letter-spacing-tighter, -0.05em)',
|
|
303
|
+
'tight' : 'var(--letter-spacing-tight, -0.025em)',
|
|
304
|
+
'normal' : 'var(--letter-spacing-normal, 0)',
|
|
305
|
+
'wide' : 'var(--letter-spacing-wide, 0.025em)',
|
|
306
|
+
'wider' : 'var(--letter-spacing-wider, 0.05em)',
|
|
307
|
+
'widest' : 'var(--letter-spacing-widest, 0.1em)'
|
|
308
|
+
}
|
|
24
309
|
};
|
|
25
310
|
|
|
26
|
-
|
|
311
|
+
const Template = (args) => html`
|
|
27
312
|
<style>
|
|
28
|
-
|
|
313
|
+
.typography-container {
|
|
314
|
+
max-width: 800px;
|
|
315
|
+
margin: 0 auto;
|
|
316
|
+
padding: var(--space-lg);
|
|
317
|
+
background: white;
|
|
318
|
+
border-radius: 8px;
|
|
319
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.section {
|
|
323
|
+
margin-bottom: var(--space-2xl);
|
|
324
|
+
padding-bottom: var(--space-lg);
|
|
325
|
+
border-bottom: 2px solid #f0f0f0;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.section-title {
|
|
29
329
|
font-family: var(--font-family-sans);
|
|
30
|
-
font-
|
|
31
|
-
font-
|
|
32
|
-
margin
|
|
33
|
-
|
|
330
|
+
font-size: var(--font-size-xl);
|
|
331
|
+
font-weight: var(--font-weight-bold);
|
|
332
|
+
margin: 0 0 var(--space-lg) 0;
|
|
333
|
+
color: #212529;
|
|
334
|
+
display: flex;
|
|
335
|
+
align-items: center;
|
|
336
|
+
gap: var(--space-sm);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.section-title::before {
|
|
340
|
+
content: '';
|
|
341
|
+
width: 4px;
|
|
342
|
+
height: 24px;
|
|
343
|
+
background: #007bff;
|
|
344
|
+
border-radius: 2px;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.token-grid {
|
|
348
|
+
display: grid;
|
|
349
|
+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
350
|
+
gap: var(--space-md);
|
|
34
351
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
352
|
+
|
|
353
|
+
.token-card {
|
|
354
|
+
padding: var(--space-md);
|
|
355
|
+
background: #f8f9fa;
|
|
356
|
+
border-radius: 6px;
|
|
357
|
+
border: 1px solid #e9ecef;
|
|
358
|
+
transition: all 0.2s ease;
|
|
38
359
|
}
|
|
39
|
-
|
|
40
|
-
|
|
360
|
+
|
|
361
|
+
.token-card:hover {
|
|
362
|
+
transform: translateY(-2px);
|
|
363
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
|
364
|
+
border-color: #007bff;
|
|
41
365
|
}
|
|
42
|
-
|
|
43
|
-
|
|
366
|
+
|
|
367
|
+
.token-header {
|
|
368
|
+
display: flex;
|
|
369
|
+
justify-content: space-between;
|
|
370
|
+
align-items: flex-start;
|
|
371
|
+
margin-bottom: var(--space-sm);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.token-name {
|
|
375
|
+
font-family: var(--font-family-mono);
|
|
376
|
+
font-size: var(--font-size-sm);
|
|
377
|
+
color: #007bff;
|
|
378
|
+
font-weight: var(--font-weight-semibold);
|
|
379
|
+
background: white;
|
|
380
|
+
padding: 2px 8px;
|
|
381
|
+
border-radius: 4px;
|
|
382
|
+
border: 1px solid #dee2e6;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.token-value {
|
|
386
|
+
font-family: var(--font-family-mono);
|
|
387
|
+
font-size: var(--font-size-xs);
|
|
388
|
+
color: #6c757d;
|
|
389
|
+
background: white;
|
|
390
|
+
padding: 2px 6px;
|
|
391
|
+
border-radius: 3px;
|
|
392
|
+
border: 1px solid #dee2e6;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.token-preview {
|
|
396
|
+
font-family: inherit;
|
|
397
|
+
font-size: inherit;
|
|
398
|
+
font-weight: inherit;
|
|
399
|
+
line-height: inherit;
|
|
400
|
+
letter-spacing: inherit;
|
|
401
|
+
margin: var(--space-sm) 0;
|
|
402
|
+
padding: var(--space-sm);
|
|
403
|
+
background: white;
|
|
404
|
+
border-radius: 4px;
|
|
405
|
+
border: 1px solid #dee2e6;
|
|
406
|
+
min-height: 60px;
|
|
407
|
+
display: flex;
|
|
408
|
+
align-items: center;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.line-height-visual {
|
|
412
|
+
height: 40px;
|
|
413
|
+
background: linear-gradient(to bottom,
|
|
414
|
+
transparent 0%,
|
|
415
|
+
transparent calc(50% - 0.6px),
|
|
416
|
+
#007bff calc(50% - 0.6px),
|
|
417
|
+
#007bff calc(50% + 0.6px),
|
|
418
|
+
transparent calc(50% + 0.6px),
|
|
419
|
+
transparent 100%
|
|
420
|
+
);
|
|
421
|
+
margin-top: var(--space-xs);
|
|
422
|
+
position: relative;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.line-height-label {
|
|
426
|
+
position: absolute;
|
|
427
|
+
right: 0;
|
|
428
|
+
top: 50%;
|
|
429
|
+
transform: translateY(-50%);
|
|
430
|
+
font-family: var(--font-family-mono);
|
|
431
|
+
font-size: var(--font-size-xs);
|
|
432
|
+
color: #6c757d;
|
|
433
|
+
background: white;
|
|
434
|
+
padding: 2px 6px;
|
|
435
|
+
border-radius: 3px;
|
|
436
|
+
border: 1px solid #dee2e6;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.letter-spacing-visual {
|
|
440
|
+
display: flex;
|
|
441
|
+
align-items: center;
|
|
442
|
+
gap: 2px;
|
|
443
|
+
margin-top: var(--space-xs);
|
|
444
|
+
padding: var(--space-xs);
|
|
445
|
+
background: white;
|
|
446
|
+
border-radius: 4px;
|
|
447
|
+
border: 1px solid #dee2e6;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.letter-box {
|
|
451
|
+
width: 12px;
|
|
452
|
+
height: 20px;
|
|
453
|
+
background: #007bff;
|
|
454
|
+
border-radius: 2px;
|
|
455
|
+
opacity: 0.7;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.info-panel {
|
|
459
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
460
|
+
color: white;
|
|
461
|
+
padding: var(--space-lg);
|
|
462
|
+
border-radius: 8px;
|
|
463
|
+
margin-bottom: var(--space-xl);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.info-title {
|
|
467
|
+
font-family: var(--font-family-sans);
|
|
468
|
+
font-size: var(--font-size-lg);
|
|
469
|
+
font-weight: var(--font-weight-bold);
|
|
470
|
+
margin: 0 0 var(--space-sm) 0;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.info-text {
|
|
474
|
+
font-family: var(--font-family-sans);
|
|
475
|
+
font-size: var(--font-size-sm);
|
|
476
|
+
opacity: 0.9;
|
|
477
|
+
margin: 0;
|
|
44
478
|
}
|
|
45
479
|
</style>
|
|
46
480
|
|
|
47
|
-
<
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
|
|
481
|
+
<div class="typography-container">
|
|
482
|
+
<div class="info-panel">
|
|
483
|
+
<h3 class="info-title">Typography System</h3>
|
|
484
|
+
<p class="info-text">${args.sampleText}</p>
|
|
485
|
+
</div>
|
|
486
|
+
|
|
487
|
+
<!-- Font Families -->
|
|
488
|
+
<div class="section">
|
|
489
|
+
<h3 class="section-title">Font Families</h3>
|
|
490
|
+
<div class="token-grid">
|
|
491
|
+
${Object.entries(typographyTokens.families).map(([name, family]) => html`
|
|
492
|
+
<div class="token-card">
|
|
493
|
+
<div class="token-header">
|
|
494
|
+
<span class="token-name">--font-family-${name.toLowerCase()}</span>
|
|
495
|
+
<span class="token-value">${family}</span>
|
|
496
|
+
</div>
|
|
497
|
+
<div class="token-preview" style="font-family: ${family};">
|
|
498
|
+
${args.sampleText}
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
`)}
|
|
52
502
|
</div>
|
|
53
|
-
|
|
503
|
+
</div>
|
|
54
504
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<
|
|
58
|
-
|
|
505
|
+
<!-- Font Sizes -->
|
|
506
|
+
<div class="section">
|
|
507
|
+
<h3 class="section-title">Font Sizes</h3>
|
|
508
|
+
<div class="token-grid">
|
|
509
|
+
${Object.entries(typographyTokens.sizes).map(([name, size]) => html`
|
|
510
|
+
<div class="token-card">
|
|
511
|
+
<div class="token-header">
|
|
512
|
+
<span class="token-name">--font-size-${name}</span>
|
|
513
|
+
<span class="token-value">${size}</span>
|
|
514
|
+
</div>
|
|
515
|
+
<div class="token-preview" style="font-size: ${size};">
|
|
516
|
+
${args.sampleText}
|
|
517
|
+
</div>
|
|
518
|
+
${args.showLineHeight
|
|
519
|
+
? html`
|
|
520
|
+
<div class="line-height-visual" style="height: calc(${size} * var(--line-height-normal));">
|
|
521
|
+
<span class="line-height-label">Line height: ${size}</span>
|
|
522
|
+
</div>
|
|
523
|
+
`
|
|
524
|
+
: ''}
|
|
525
|
+
</div>
|
|
526
|
+
`)}
|
|
59
527
|
</div>
|
|
60
|
-
|
|
528
|
+
</div>
|
|
529
|
+
|
|
530
|
+
<!-- Font Weights -->
|
|
531
|
+
<div class="section">
|
|
532
|
+
<h3 class="section-title">Font Weights</h3>
|
|
533
|
+
<div class="token-grid">
|
|
534
|
+
${Object.entries(typographyTokens.weights).map(([name, weight]) => html`
|
|
535
|
+
<div class="token-card">
|
|
536
|
+
<div class="token-header">
|
|
537
|
+
<span class="token-name">--font-weight-${name}</span>
|
|
538
|
+
<span class="token-value">${weight}</span>
|
|
539
|
+
</div>
|
|
540
|
+
<div class="token-preview" style="font-weight: ${weight};">
|
|
541
|
+
${args.sampleText}
|
|
542
|
+
</div>
|
|
543
|
+
</div>
|
|
544
|
+
`)}
|
|
545
|
+
</div>
|
|
546
|
+
</div>
|
|
547
|
+
|
|
548
|
+
<!-- Line Heights -->
|
|
549
|
+
${args.showLineHeight
|
|
550
|
+
? html`
|
|
551
|
+
<div class="section">
|
|
552
|
+
<h3 class="section-title">Line Heights</h3>
|
|
553
|
+
<div class="token-grid">
|
|
554
|
+
${Object.entries(typographyTokens.lineHeights).map(([name, lineHeight]) => html`
|
|
555
|
+
<div class="token-card">
|
|
556
|
+
<div class="token-header">
|
|
557
|
+
<span class="token-name">--line-height-${name}</span>
|
|
558
|
+
<span class="token-value">${lineHeight}</span>
|
|
559
|
+
</div>
|
|
560
|
+
<div class="token-preview" style="line-height: ${lineHeight};">
|
|
561
|
+
${args.sampleText}<br>
|
|
562
|
+
${args.sampleText}
|
|
563
|
+
</div>
|
|
564
|
+
<div class="line-height-visual" style="height: calc(1rem * ${lineHeight});">
|
|
565
|
+
<span class="line-height-label">${lineHeight}</span>
|
|
566
|
+
</div>
|
|
567
|
+
</div>
|
|
568
|
+
`)}
|
|
569
|
+
</div>
|
|
570
|
+
</div>
|
|
571
|
+
`
|
|
572
|
+
: ''}
|
|
573
|
+
|
|
574
|
+
<!-- Letter Spacing -->
|
|
575
|
+
${args.showLetterSpacing
|
|
576
|
+
? html`
|
|
577
|
+
<div class="section">
|
|
578
|
+
<h3 class="section-title">Letter Spacing</h3>
|
|
579
|
+
<div class="token-grid">
|
|
580
|
+
${Object.entries(typographyTokens.letterSpacing).map(([name, spacing]) => html`
|
|
581
|
+
<div class="token-card">
|
|
582
|
+
<div class="token-header">
|
|
583
|
+
<span class="token-name">--letter-spacing-${name}</span>
|
|
584
|
+
<span class="token-value">${spacing}</span>
|
|
585
|
+
</div>
|
|
586
|
+
<div class="token-preview" style="letter-spacing: ${spacing};">
|
|
587
|
+
${args.sampleText}
|
|
588
|
+
</div>
|
|
589
|
+
<div class="letter-spacing-visual">
|
|
590
|
+
${'abcdef'.split('').map(letter => html`
|
|
591
|
+
<div class="letter-box" style="margin-right: ${spacing};"></div>
|
|
592
|
+
`)}
|
|
593
|
+
</div>
|
|
594
|
+
</div>
|
|
595
|
+
`)}
|
|
596
|
+
</div>
|
|
597
|
+
</div>
|
|
598
|
+
`
|
|
599
|
+
: ''}
|
|
600
|
+
</div>
|
|
601
|
+
`;
|
|
602
|
+
|
|
603
|
+
export const Typography = Template.bind({});
|
|
604
|
+
Typography.args = {
|
|
605
|
+
sampleText : 'The quick brown fox jumps over the lazy dog.',
|
|
606
|
+
showLineHeight : true,
|
|
607
|
+
showLetterSpacing: false
|
|
608
|
+
};
|
|
609
|
+
Typography.parameters = {
|
|
610
|
+
docs: {
|
|
611
|
+
description: {
|
|
612
|
+
story: 'Complete typography token system showing font families, sizes, weights, line heights, and letter spacing with visual examples.'
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
export const TypographyScale = () => html`
|
|
618
|
+
<style>
|
|
619
|
+
.scale-container {
|
|
620
|
+
max-width: 800px;
|
|
621
|
+
margin: 0 auto;
|
|
622
|
+
padding: var(--space-xl);
|
|
623
|
+
background: white;
|
|
624
|
+
border-radius: 8px;
|
|
625
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.scale-title {
|
|
629
|
+
font-family: var(--font-family-sans);
|
|
630
|
+
font-size: var(--font-size-2xl);
|
|
631
|
+
font-weight: var(--font-weight-bold);
|
|
632
|
+
margin: 0 0 var(--space-xl) 0;
|
|
633
|
+
color: #212529;
|
|
634
|
+
text-align: center;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
.scale-item {
|
|
638
|
+
display: flex;
|
|
639
|
+
align-items: center;
|
|
640
|
+
margin-bottom: var(--space-md);
|
|
641
|
+
padding: var(--space-sm);
|
|
642
|
+
border-radius: 6px;
|
|
643
|
+
background: #f8f9fa;
|
|
644
|
+
border-left: 4px solid #007bff;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.scale-size {
|
|
648
|
+
font-family: var(--font-family-mono);
|
|
649
|
+
font-size: var(--font-size-sm);
|
|
650
|
+
color: #007bff;
|
|
651
|
+
font-weight: var(--font-weight-semibold);
|
|
652
|
+
min-width: 120px;
|
|
653
|
+
padding-right: var(--space-md);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.scale-preview {
|
|
657
|
+
flex: 1;
|
|
658
|
+
font-family: var(--font-family-sans);
|
|
659
|
+
line-height: var(--line-height-normal);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.scale-label {
|
|
663
|
+
font-family: var(--font-family-mono);
|
|
664
|
+
font-size: var(--font-size-xs);
|
|
665
|
+
color: #6c757d;
|
|
666
|
+
background: white;
|
|
667
|
+
padding: 2px 6px;
|
|
668
|
+
border-radius: 3px;
|
|
669
|
+
border: 1px solid #dee2e6;
|
|
670
|
+
margin-left: var(--space-sm);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.heading-hierarchy {
|
|
674
|
+
margin-top: var(--space-2xl);
|
|
675
|
+
padding-top: var(--space-xl);
|
|
676
|
+
border-top: 2px solid #f0f0f0;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.hierarchy-title {
|
|
680
|
+
font-family: var(--font-family-sans);
|
|
681
|
+
font-size: var(--font-size-xl);
|
|
682
|
+
font-weight: var(--font-weight-bold);
|
|
683
|
+
margin: 0 0 var(--space-lg) 0;
|
|
684
|
+
color: #212529;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.heading-sample {
|
|
688
|
+
margin-bottom: var(--space-lg);
|
|
689
|
+
padding: var(--space-md);
|
|
690
|
+
background: white;
|
|
691
|
+
border-radius: 6px;
|
|
692
|
+
border: 1px solid #e9ecef;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.heading-info {
|
|
696
|
+
display: flex;
|
|
697
|
+
align-items: center;
|
|
698
|
+
gap: var(--space-md);
|
|
699
|
+
margin-top: var(--space-sm);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.heading-token {
|
|
703
|
+
font-family: var(--font-family-mono);
|
|
704
|
+
font-size: var(--font-size-xs);
|
|
705
|
+
color: #6c757d;
|
|
706
|
+
}
|
|
707
|
+
</style>
|
|
61
708
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
709
|
+
<div class="scale-container">
|
|
710
|
+
<h2 class="scale-title">Typography Scale</h2>
|
|
711
|
+
|
|
712
|
+
${Object.entries(typographyTokens.sizes).map(([name, size]) => html`
|
|
713
|
+
<div class="scale-item">
|
|
714
|
+
<div class="scale-size">--font-size-${name}</div>
|
|
715
|
+
<div class="scale-preview" style="font-size: ${size};">
|
|
716
|
+
The quick brown fox jumps over the lazy dog.
|
|
717
|
+
</div>
|
|
718
|
+
<span class="scale-label">${size}</span>
|
|
66
719
|
</div>
|
|
67
720
|
`)}
|
|
68
|
-
|
|
721
|
+
|
|
722
|
+
<div class="heading-hierarchy">
|
|
723
|
+
<h3 class="hierarchy-title">Heading Hierarchy</h3>
|
|
724
|
+
|
|
725
|
+
<div class="heading-sample">
|
|
726
|
+
<h1 style="font-size: var(--font-size-4xl); font-weight: var(--font-weight-bold); margin: 0 0 var(--space-sm) 0;">
|
|
727
|
+
Heading 1 (h1)
|
|
728
|
+
</h1>
|
|
729
|
+
<div class="heading-info">
|
|
730
|
+
<span class="heading-token">--font-size-4xl</span>
|
|
731
|
+
<span class="heading-token">--font-weight-bold</span>
|
|
732
|
+
<span class="heading-token">--line-height-tight</span>
|
|
733
|
+
</div>
|
|
734
|
+
</div>
|
|
735
|
+
|
|
736
|
+
<div class="heading-sample">
|
|
737
|
+
<h2 style="font-size: var(--font-size-3xl); font-weight: var(--font-weight-bold); margin: 0 0 var(--space-sm) 0;">
|
|
738
|
+
Heading 2 (h2)
|
|
739
|
+
</h2>
|
|
740
|
+
<div class="heading-info">
|
|
741
|
+
<span class="heading-token">--font-size-3xl</span>
|
|
742
|
+
<span class="heading-token">--font-weight-bold</span>
|
|
743
|
+
<span class="heading-token">--line-height-tight</span>
|
|
744
|
+
</div>
|
|
745
|
+
</div>
|
|
746
|
+
|
|
747
|
+
<div class="heading-sample">
|
|
748
|
+
<h3 style="font-size: var(--font-size-2xl); font-weight: var(--font-weight-semibold); margin: 0 0 var(--space-sm) 0;">
|
|
749
|
+
Heading 3 (h3)
|
|
750
|
+
</h3>
|
|
751
|
+
<div class="heading-info">
|
|
752
|
+
<span class="heading-token">--font-size-2xl</span>
|
|
753
|
+
<span class="heading-token">--font-weight-semibold</span>
|
|
754
|
+
<span class="heading-token">--line-height-tight</span>
|
|
755
|
+
</div>
|
|
756
|
+
</div>
|
|
757
|
+
|
|
758
|
+
<div class="heading-sample">
|
|
759
|
+
<h4 style="font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); margin: 0 0 var(--space-sm) 0;">
|
|
760
|
+
Heading 4 (h4)
|
|
761
|
+
</h4>
|
|
762
|
+
<div class="heading-info">
|
|
763
|
+
<span class="heading-token">--font-size-xl</span>
|
|
764
|
+
<span class="heading-token">--font-weight-semibold</span>
|
|
765
|
+
<span class="heading-token">--line-height-normal</span>
|
|
766
|
+
</div>
|
|
767
|
+
</div>
|
|
768
|
+
|
|
769
|
+
<div class="heading-sample">
|
|
770
|
+
<h5 style="font-size: var(--font-size-lg); font-weight: var(--font-weight-medium); margin: 0 0 var(--space-sm) 0;">
|
|
771
|
+
Heading 5 (h5)
|
|
772
|
+
</h5>
|
|
773
|
+
<div class="heading-info">
|
|
774
|
+
<span class="heading-token">--font-size-lg</span>
|
|
775
|
+
<span class="heading-token">--font-weight-medium</span>
|
|
776
|
+
<span class="heading-token">--line-height-normal</span>
|
|
777
|
+
</div>
|
|
778
|
+
</div>
|
|
779
|
+
|
|
780
|
+
<div class="heading-sample">
|
|
781
|
+
<h6 style="font-size: var(--font-size-md); font-weight: var(--font-weight-medium); margin: 0 0 var(--space-sm) 0;">
|
|
782
|
+
Heading 6 (h6)
|
|
783
|
+
</h6>
|
|
784
|
+
<div class="heading-info">
|
|
785
|
+
<span class="heading-token">--font-size-md</span>
|
|
786
|
+
<span class="heading-token">--font-weight-medium</span>
|
|
787
|
+
<span class="heading-token">--line-height-normal</span>
|
|
788
|
+
</div>
|
|
789
|
+
</div>
|
|
790
|
+
</div>
|
|
791
|
+
</div>
|
|
792
|
+
`;
|
|
793
|
+
TypographyScale.storyName = 'Typography Scale';
|
|
794
|
+
TypographyScale.parameters = {
|
|
795
|
+
docs: {
|
|
796
|
+
description: {
|
|
797
|
+
story: 'Complete typography scale showing all font sizes with visual hierarchy and proper heading structure examples.'
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
export const TypographyCombinations = () => html`
|
|
803
|
+
<style>
|
|
804
|
+
.combinations-container {
|
|
805
|
+
max-width: 800px;
|
|
806
|
+
margin: 0 auto;
|
|
807
|
+
padding: var(--space-xl);
|
|
808
|
+
background: white;
|
|
809
|
+
border-radius: 8px;
|
|
810
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.combinations-grid {
|
|
814
|
+
display: grid;
|
|
815
|
+
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
|
|
816
|
+
gap: var(--space-lg);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
.combination-card {
|
|
820
|
+
padding: var(--space-lg);
|
|
821
|
+
border-radius: 8px;
|
|
822
|
+
border: 1px solid #e9ecef;
|
|
823
|
+
background: #f8f9fa;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.combination-title {
|
|
827
|
+
font-family: var(--font-family-sans);
|
|
828
|
+
font-size: var(--font-size-lg);
|
|
829
|
+
font-weight: var(--font-weight-semibold);
|
|
830
|
+
margin: 0 0 var(--space-md) 0;
|
|
831
|
+
color: #212529;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
.combination-preview {
|
|
835
|
+
font-family: inherit;
|
|
836
|
+
font-size: inherit;
|
|
837
|
+
font-weight: inherit;
|
|
838
|
+
line-height: inherit;
|
|
839
|
+
letter-spacing: inherit;
|
|
840
|
+
margin: var(--space-md) 0;
|
|
841
|
+
padding: var(--space-md);
|
|
842
|
+
background: white;
|
|
843
|
+
border-radius: 6px;
|
|
844
|
+
border: 1px solid #dee2e6;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
.combination-tokens {
|
|
848
|
+
display: flex;
|
|
849
|
+
flex-wrap: wrap;
|
|
850
|
+
gap: var(--space-xs);
|
|
851
|
+
margin-top: var(--space-sm);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
.token-tag {
|
|
855
|
+
font-family: var(--font-family-mono);
|
|
856
|
+
font-size: var(--font-size-xs);
|
|
857
|
+
color: #6c757d;
|
|
858
|
+
background: white;
|
|
859
|
+
padding: 2px 6px;
|
|
860
|
+
border-radius: 3px;
|
|
861
|
+
border: 1px solid #dee2e6;
|
|
862
|
+
}
|
|
863
|
+
</style>
|
|
864
|
+
|
|
865
|
+
<div class="combinations-container">
|
|
866
|
+
<h2 style="font-family: var(--font-family-sans); font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); margin: 0 0 var(--space-xl) 0; text-align: center;">
|
|
867
|
+
Common Typography Combinations
|
|
868
|
+
</h2>
|
|
869
|
+
|
|
870
|
+
<div class="combinations-grid">
|
|
871
|
+
<!-- Body Text -->
|
|
872
|
+
<div class="combination-card">
|
|
873
|
+
<h3 class="combination-title">Body Text</h3>
|
|
874
|
+
<div class="combination-preview" style="
|
|
875
|
+
font-family: var(--font-family-sans);
|
|
876
|
+
font-size: var(--font-size-md);
|
|
877
|
+
font-weight: var(--font-weight-regular);
|
|
878
|
+
line-height: var(--line-height-normal);
|
|
879
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
880
|
+
">
|
|
881
|
+
The quick brown fox jumps over the lazy dog. This is standard body text used for paragraphs and general content.
|
|
882
|
+
</div>
|
|
883
|
+
<div class="combination-tokens">
|
|
884
|
+
<span class="token-tag">--font-family-sans</span>
|
|
885
|
+
<span class="token-tag">--font-size-md</span>
|
|
886
|
+
<span class="token-tag">--font-weight-regular</span>
|
|
887
|
+
<span class="token-tag">--line-height-normal</span>
|
|
888
|
+
</div>
|
|
889
|
+
</div>
|
|
890
|
+
|
|
891
|
+
<!-- Heading -->
|
|
892
|
+
<div class="combination-card">
|
|
893
|
+
<h3 class="combination-title">Page Heading</h3>
|
|
894
|
+
<div class="combination-preview" style="
|
|
895
|
+
font-family: var(--font-family-sans);
|
|
896
|
+
font-size: var(--font-size-3xl);
|
|
897
|
+
font-weight: var(--font-weight-bold);
|
|
898
|
+
line-height: var(--line-height-tight);
|
|
899
|
+
letter-spacing: var(--letter-spacing-tight);
|
|
900
|
+
">
|
|
901
|
+
Main Page Title
|
|
902
|
+
</div>
|
|
903
|
+
<div class="combination-tokens">
|
|
904
|
+
<span class="token-tag">--font-family-sans</span>
|
|
905
|
+
<span class="token-tag">--font-size-3xl</span>
|
|
906
|
+
<span class="token-tag">--font-weight-bold</span>
|
|
907
|
+
<span class="token-tag">--line-height-tight</span>
|
|
908
|
+
</div>
|
|
909
|
+
</div>
|
|
910
|
+
|
|
911
|
+
<!-- Code Block -->
|
|
912
|
+
<div class="combination-card">
|
|
913
|
+
<h3 class="combination-title">Code Snippet</h3>
|
|
914
|
+
<div class="combination-preview" style="
|
|
915
|
+
font-family: var(--font-family-mono);
|
|
916
|
+
font-size: var(--font-size-sm);
|
|
917
|
+
font-weight: var(--font-weight-regular);
|
|
918
|
+
line-height: var(--line-height-normal);
|
|
919
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
920
|
+
background: #1a1a1a;
|
|
921
|
+
color: #f8f8f2;
|
|
922
|
+
">
|
|
923
|
+
const greeting = "Hello, World!";<br>
|
|
924
|
+
console.log(greeting);
|
|
925
|
+
</div>
|
|
926
|
+
<div class="combination-tokens">
|
|
927
|
+
<span class="token-tag">--font-family-mono</span>
|
|
928
|
+
<span class="token-tag">--font-size-sm</span>
|
|
929
|
+
<span class="token-tag">--font-weight-regular</span>
|
|
930
|
+
</div>
|
|
931
|
+
</div>
|
|
932
|
+
|
|
933
|
+
<!-- Label -->
|
|
934
|
+
<div class="combination-card">
|
|
935
|
+
<h3 class="combination-title">Form Label</h3>
|
|
936
|
+
<div class="combination-preview" style="
|
|
937
|
+
font-family: var(--font-family-sans);
|
|
938
|
+
font-size: var(--font-size-sm);
|
|
939
|
+
font-weight: var(--font-weight-semibold);
|
|
940
|
+
line-height: var(--line-height-tight);
|
|
941
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
942
|
+
text-transform: uppercase;
|
|
943
|
+
">
|
|
944
|
+
Email Address
|
|
945
|
+
</div>
|
|
946
|
+
<div class="combination-tokens">
|
|
947
|
+
<span class="token-tag">--font-family-sans</span>
|
|
948
|
+
<span class="token-tag">--font-size-sm</span>
|
|
949
|
+
<span class="token-tag">--font-weight-semibold</span>
|
|
950
|
+
<span class="token-tag">--letter-spacing-wide</span>
|
|
951
|
+
</div>
|
|
952
|
+
</div>
|
|
953
|
+
|
|
954
|
+
<!-- Quote -->
|
|
955
|
+
<div class="combination-card">
|
|
956
|
+
<h3 class="combination-title">Block Quote</h3>
|
|
957
|
+
<div class="combination-preview" style="
|
|
958
|
+
font-family: var(--font-family-sans);
|
|
959
|
+
font-size: var(--font-size-lg);
|
|
960
|
+
font-weight: var(--font-weight-light);
|
|
961
|
+
line-height: var(--line-height-relaxed);
|
|
962
|
+
letter-spacing: var(--letter-spacing-normal);
|
|
963
|
+
font-style: italic;
|
|
964
|
+
border-left: 4px solid #007bff;
|
|
965
|
+
padding-left: var(--space-md);
|
|
966
|
+
">
|
|
967
|
+
The only way to do great work is to love what you do.
|
|
968
|
+
</div>
|
|
969
|
+
<div class="combination-tokens">
|
|
970
|
+
<span class="token-tag">--font-family-sans</span>
|
|
971
|
+
<span class="token-tag">--font-size-lg</span>
|
|
972
|
+
<span class="token-tag">--font-weight-light</span>
|
|
973
|
+
<span class="token-tag">--line-height-relaxed</span>
|
|
974
|
+
</div>
|
|
975
|
+
</div>
|
|
976
|
+
|
|
977
|
+
<!-- Button Text -->
|
|
978
|
+
<div class="combination-card">
|
|
979
|
+
<h3 class="combination-title">Button Text</h3>
|
|
980
|
+
<div class="combination-preview" style="
|
|
981
|
+
font-family: var(--font-family-sans);
|
|
982
|
+
font-size: var(--font-size-md);
|
|
983
|
+
font-weight: var(--font-weight-semibold);
|
|
984
|
+
line-height: var(--line-height-tight);
|
|
985
|
+
letter-spacing: var(--letter-spacing-wide);
|
|
986
|
+
text-align: center;
|
|
987
|
+
background: #007bff;
|
|
988
|
+
color: white;
|
|
989
|
+
padding: var(--space-sm) var(--space-lg);
|
|
990
|
+
border-radius: 4px;
|
|
991
|
+
">
|
|
992
|
+
Submit Form
|
|
993
|
+
</div>
|
|
994
|
+
<div class="combination-tokens">
|
|
995
|
+
<span class="token-tag">--font-family-sans</span>
|
|
996
|
+
<span class="token-tag">--font-size-md</span>
|
|
997
|
+
<span class="token-tag">--font-weight-semibold</span>
|
|
998
|
+
<span class="token-tag">--letter-spacing-wide</span>
|
|
999
|
+
</div>
|
|
1000
|
+
</div>
|
|
1001
|
+
</div>
|
|
1002
|
+
</div>
|
|
69
1003
|
`;
|
|
1004
|
+
TypographyCombinations.storyName = 'Common Combinations';
|
|
1005
|
+
TypographyCombinations.parameters = {
|
|
1006
|
+
docs: {
|
|
1007
|
+
description: {
|
|
1008
|
+
story: 'Practical typography combinations for common UI elements like headings, body text, code blocks, labels, quotes, and buttons.'
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
};
|