@nationaldesignstudio/react 0.2.0 → 0.3.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/dist/components/atoms/background/background.d.ts +13 -27
- package/dist/components/atoms/button/button.d.ts +55 -71
- package/dist/components/atoms/button/icon-button.d.ts +62 -110
- package/dist/components/atoms/input/input-group.d.ts +278 -0
- package/dist/components/atoms/input/input.d.ts +121 -0
- package/dist/components/atoms/select/select.d.ts +131 -0
- package/dist/components/organisms/card/card.d.ts +2 -2
- package/dist/components/sections/prose/prose.d.ts +3 -3
- package/dist/components/sections/river/river.d.ts +1 -1
- package/dist/components/sections/tout/tout.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +11034 -7824
- package/dist/index.js.map +1 -1
- package/dist/lib/form-control.d.ts +105 -0
- package/dist/tokens.css +2132 -17329
- package/package.json +1 -1
- package/src/components/atoms/background/background.tsx +71 -109
- package/src/components/atoms/button/button.stories.tsx +42 -0
- package/src/components/atoms/button/button.test.tsx +1 -1
- package/src/components/atoms/button/button.tsx +38 -103
- package/src/components/atoms/button/button.visual.test.tsx +70 -24
- package/src/components/atoms/button/icon-button.tsx +81 -224
- package/src/components/atoms/input/index.ts +17 -0
- package/src/components/atoms/input/input-group.stories.tsx +650 -0
- package/src/components/atoms/input/input-group.test.tsx +376 -0
- package/src/components/atoms/input/input-group.tsx +384 -0
- package/src/components/atoms/input/input.stories.tsx +232 -0
- package/src/components/atoms/input/input.test.tsx +183 -0
- package/src/components/atoms/input/input.tsx +97 -0
- package/src/components/atoms/select/index.ts +18 -0
- package/src/components/atoms/select/select.stories.tsx +455 -0
- package/src/components/atoms/select/select.tsx +320 -0
- package/src/components/dev-tools/dev-toolbar/dev-toolbar.stories.tsx +2 -6
- package/src/components/foundation/typography/typography.stories.tsx +401 -0
- package/src/components/organisms/card/card.stories.tsx +11 -11
- package/src/components/organisms/card/card.test.tsx +1 -1
- package/src/components/organisms/card/card.tsx +2 -2
- package/src/components/organisms/card/card.visual.test.tsx +6 -6
- package/src/components/organisms/navbar/navbar.tsx +2 -2
- package/src/components/organisms/navbar/navbar.visual.test.tsx +2 -2
- package/src/components/sections/card-grid/card-grid.tsx +1 -1
- package/src/components/sections/faq-section/faq-section.tsx +2 -2
- package/src/components/sections/hero/hero.test.tsx +5 -5
- package/src/components/sections/prose/prose.test.tsx +2 -2
- package/src/components/sections/prose/prose.tsx +4 -5
- package/src/components/sections/river/river.stories.tsx +8 -8
- package/src/components/sections/river/river.test.tsx +1 -1
- package/src/components/sections/river/river.tsx +2 -4
- package/src/components/sections/tout/tout.test.tsx +1 -1
- package/src/components/sections/tout/tout.tsx +2 -2
- package/src/index.ts +41 -0
- package/src/lib/form-control.ts +69 -0
- package/src/stories/Introduction.mdx +29 -15
- package/src/stories/ThemeProvider.stories.tsx +1 -3
- package/src/stories/TokenShowcase.stories.tsx +0 -19
- package/src/stories/TokenShowcase.tsx +714 -1366
- package/src/styles.css +3 -0
- package/src/tests/token-resolution.test.tsx +301 -0
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
const meta: Meta = {
|
|
4
|
+
title: "Foundation/Typography",
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: "padded",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Typography Scale showcases all typography styles in the design system.
|
|
14
|
+
* Each style is shown with its class name and a sample text.
|
|
15
|
+
*/
|
|
16
|
+
export const TypeScale: StoryObj = {
|
|
17
|
+
render: () => (
|
|
18
|
+
<div className="space-y-48 p-24">
|
|
19
|
+
{/* Headings */}
|
|
20
|
+
<section>
|
|
21
|
+
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
22
|
+
Headings
|
|
23
|
+
</h2>
|
|
24
|
+
<div className="space-y-24">
|
|
25
|
+
<div>
|
|
26
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
27
|
+
typography-h1-display
|
|
28
|
+
</code>
|
|
29
|
+
<p className="typography-h1-display text-gray-900">
|
|
30
|
+
Display Heading
|
|
31
|
+
</p>
|
|
32
|
+
</div>
|
|
33
|
+
<div>
|
|
34
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
35
|
+
typography-h1
|
|
36
|
+
</code>
|
|
37
|
+
<p className="typography-h1 text-gray-900">Heading 1</p>
|
|
38
|
+
</div>
|
|
39
|
+
<div>
|
|
40
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
41
|
+
typography-h2
|
|
42
|
+
</code>
|
|
43
|
+
<p className="typography-h2 text-gray-900">Heading 2</p>
|
|
44
|
+
</div>
|
|
45
|
+
<div>
|
|
46
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
47
|
+
typography-h3
|
|
48
|
+
</code>
|
|
49
|
+
<p className="typography-h3 text-gray-900">Heading 3</p>
|
|
50
|
+
</div>
|
|
51
|
+
<div>
|
|
52
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
53
|
+
typography-h4
|
|
54
|
+
</code>
|
|
55
|
+
<p className="typography-h4 text-gray-900">Heading 4</p>
|
|
56
|
+
</div>
|
|
57
|
+
<div>
|
|
58
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
59
|
+
typography-h5
|
|
60
|
+
</code>
|
|
61
|
+
<p className="typography-h5 text-gray-900">Heading 5</p>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</section>
|
|
65
|
+
|
|
66
|
+
{/* Body Text */}
|
|
67
|
+
<section>
|
|
68
|
+
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
69
|
+
Body Text
|
|
70
|
+
</h2>
|
|
71
|
+
<div className="space-y-24">
|
|
72
|
+
<div>
|
|
73
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
74
|
+
typography-body-large
|
|
75
|
+
</code>
|
|
76
|
+
<p className="typography-body-large text-gray-900 max-w-640">
|
|
77
|
+
Body large is used for important introductory text. The quick
|
|
78
|
+
brown fox jumps over the lazy dog.
|
|
79
|
+
</p>
|
|
80
|
+
</div>
|
|
81
|
+
<div>
|
|
82
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
83
|
+
typography-body-medium
|
|
84
|
+
</code>
|
|
85
|
+
<p className="typography-body-medium text-gray-900 max-w-640">
|
|
86
|
+
Body medium is the default body text size for most content. The
|
|
87
|
+
quick brown fox jumps over the lazy dog.
|
|
88
|
+
</p>
|
|
89
|
+
</div>
|
|
90
|
+
<div>
|
|
91
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
92
|
+
typography-body-small
|
|
93
|
+
</code>
|
|
94
|
+
<p className="typography-body-small text-gray-900 max-w-640">
|
|
95
|
+
Body small is used for secondary text and compact layouts. The
|
|
96
|
+
quick brown fox jumps over the lazy dog.
|
|
97
|
+
</p>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</section>
|
|
101
|
+
|
|
102
|
+
{/* Supporting Text */}
|
|
103
|
+
<section>
|
|
104
|
+
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
105
|
+
Supporting Text
|
|
106
|
+
</h2>
|
|
107
|
+
<div className="space-y-24">
|
|
108
|
+
<div>
|
|
109
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
110
|
+
typography-overline
|
|
111
|
+
</code>
|
|
112
|
+
<p className="typography-overline text-gray-700 uppercase tracking-wide">
|
|
113
|
+
Overline Text
|
|
114
|
+
</p>
|
|
115
|
+
</div>
|
|
116
|
+
<div>
|
|
117
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
118
|
+
typography-caption
|
|
119
|
+
</code>
|
|
120
|
+
<p className="typography-caption text-gray-600">
|
|
121
|
+
Caption text for supplementary information
|
|
122
|
+
</p>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</section>
|
|
126
|
+
|
|
127
|
+
{/* UI Typography */}
|
|
128
|
+
<section>
|
|
129
|
+
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
130
|
+
UI Typography
|
|
131
|
+
</h2>
|
|
132
|
+
<div className="space-y-24">
|
|
133
|
+
<div>
|
|
134
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
135
|
+
typography-ui-button-large
|
|
136
|
+
</code>
|
|
137
|
+
<p className="typography-ui-button-large text-gray-900">
|
|
138
|
+
Large Button Text
|
|
139
|
+
</p>
|
|
140
|
+
</div>
|
|
141
|
+
<div>
|
|
142
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
143
|
+
typography-ui-button-medium
|
|
144
|
+
</code>
|
|
145
|
+
<p className="typography-ui-button-medium text-gray-900">
|
|
146
|
+
Medium Button Text
|
|
147
|
+
</p>
|
|
148
|
+
</div>
|
|
149
|
+
<div>
|
|
150
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
151
|
+
typography-ui-button-small
|
|
152
|
+
</code>
|
|
153
|
+
<p className="typography-ui-button-small text-gray-900">
|
|
154
|
+
Small Button Text
|
|
155
|
+
</p>
|
|
156
|
+
</div>
|
|
157
|
+
<div>
|
|
158
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
159
|
+
typography-ui-label
|
|
160
|
+
</code>
|
|
161
|
+
<p className="typography-ui-label text-gray-900">Form Label</p>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</section>
|
|
165
|
+
</div>
|
|
166
|
+
),
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Responsive Typography demonstrates how typography scales across breakpoints.
|
|
171
|
+
* Resize the viewport to see the typography adapt.
|
|
172
|
+
*/
|
|
173
|
+
export const ResponsiveTypography: StoryObj = {
|
|
174
|
+
render: () => (
|
|
175
|
+
<div className="space-y-32 p-24">
|
|
176
|
+
<div className="bg-gray-100 p-16 rounded-8">
|
|
177
|
+
<p className="typography-body-small text-gray-700 mb-8">
|
|
178
|
+
Resize the viewport to see responsive typography in action
|
|
179
|
+
</p>
|
|
180
|
+
<p className="typography-caption text-gray-500">
|
|
181
|
+
Mobile (<768px) | Tablet (768px-1440px) | Desktop (>1440px)
|
|
182
|
+
</p>
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
<section>
|
|
186
|
+
<h3 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
187
|
+
Responsive Headings
|
|
188
|
+
</h3>
|
|
189
|
+
<div className="space-y-24">
|
|
190
|
+
<div className="border-l-4 border-indigo-500 pl-16">
|
|
191
|
+
<code className="text-12 text-gray-500 block mb-4">
|
|
192
|
+
typography-h1 (responsive)
|
|
193
|
+
</code>
|
|
194
|
+
<p className="typography-h1 text-gray-900">Responsive H1</p>
|
|
195
|
+
<p className="typography-caption text-gray-500 mt-4">
|
|
196
|
+
48px (sm) → 72px (md) → 96px (lg)
|
|
197
|
+
</p>
|
|
198
|
+
</div>
|
|
199
|
+
<div className="border-l-4 border-indigo-500 pl-16">
|
|
200
|
+
<code className="text-12 text-gray-500 block mb-4">
|
|
201
|
+
typography-h2 (responsive)
|
|
202
|
+
</code>
|
|
203
|
+
<p className="typography-h2 text-gray-900">Responsive H2</p>
|
|
204
|
+
<p className="typography-caption text-gray-500 mt-4">
|
|
205
|
+
48px (sm) → 64px (md) → 72px (lg)
|
|
206
|
+
</p>
|
|
207
|
+
</div>
|
|
208
|
+
<div className="border-l-4 border-indigo-500 pl-16">
|
|
209
|
+
<code className="text-12 text-gray-500 block mb-4">
|
|
210
|
+
typography-h3 (responsive)
|
|
211
|
+
</code>
|
|
212
|
+
<p className="typography-h3 text-gray-900">Responsive H3</p>
|
|
213
|
+
<p className="typography-caption text-gray-500 mt-4">
|
|
214
|
+
32px (sm) → 48px (md) → 64px (lg)
|
|
215
|
+
</p>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
</section>
|
|
219
|
+
|
|
220
|
+
<section>
|
|
221
|
+
<h3 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
222
|
+
Breakpoint-Specific Utilities
|
|
223
|
+
</h3>
|
|
224
|
+
<div className="space-y-16">
|
|
225
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-16">
|
|
226
|
+
<div className="bg-gray-50 p-16 rounded-8">
|
|
227
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
228
|
+
typography-h4-small
|
|
229
|
+
</code>
|
|
230
|
+
<p className="typography-h4-small text-gray-900">H4 Small</p>
|
|
231
|
+
</div>
|
|
232
|
+
<div className="bg-gray-50 p-16 rounded-8">
|
|
233
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
234
|
+
typography-h4-medium
|
|
235
|
+
</code>
|
|
236
|
+
<p className="typography-h4-medium text-gray-900">H4 Medium</p>
|
|
237
|
+
</div>
|
|
238
|
+
<div className="bg-gray-50 p-16 rounded-8">
|
|
239
|
+
<code className="text-12 text-gray-500 block mb-8">
|
|
240
|
+
typography-h4-large
|
|
241
|
+
</code>
|
|
242
|
+
<p className="typography-h4-large text-gray-900">H4 Large</p>
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
</section>
|
|
247
|
+
</div>
|
|
248
|
+
),
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Typography specimen shows a sample page layout using the typography system.
|
|
253
|
+
*/
|
|
254
|
+
export const Specimen: StoryObj = {
|
|
255
|
+
render: () => (
|
|
256
|
+
<article className="max-w-800 mx-auto p-32">
|
|
257
|
+
<header className="mb-48">
|
|
258
|
+
<p className="typography-overline text-indigo-600 uppercase tracking-wide mb-8">
|
|
259
|
+
Design System
|
|
260
|
+
</p>
|
|
261
|
+
<h1 className="typography-h1 text-gray-900 mb-16">
|
|
262
|
+
Typography Specimen
|
|
263
|
+
</h1>
|
|
264
|
+
<p className="typography-body-large text-gray-700">
|
|
265
|
+
A demonstration of the typography system in a realistic content
|
|
266
|
+
layout, showing how different styles work together.
|
|
267
|
+
</p>
|
|
268
|
+
</header>
|
|
269
|
+
|
|
270
|
+
<section className="mb-48">
|
|
271
|
+
<h2 className="typography-h3 text-gray-900 mb-16">
|
|
272
|
+
The Foundation of Good Design
|
|
273
|
+
</h2>
|
|
274
|
+
<p className="typography-body-medium text-gray-800 mb-16">
|
|
275
|
+
Typography is the art and technique of arranging type to make written
|
|
276
|
+
language legible, readable, and appealing when displayed. The
|
|
277
|
+
arrangement of type involves selecting typefaces, point sizes, line
|
|
278
|
+
lengths, line-spacing, and letter-spacing.
|
|
279
|
+
</p>
|
|
280
|
+
<p className="typography-body-medium text-gray-800 mb-16">
|
|
281
|
+
The term typography is also applied to the style, arrangement, and
|
|
282
|
+
appearance of the letters, numbers, and symbols created by the
|
|
283
|
+
process. Type design is a closely related craft, sometimes considered
|
|
284
|
+
part of typography.
|
|
285
|
+
</p>
|
|
286
|
+
</section>
|
|
287
|
+
|
|
288
|
+
<section className="mb-48">
|
|
289
|
+
<h3 className="typography-h4 text-gray-900 mb-16">Key Principles</h3>
|
|
290
|
+
<p className="typography-body-medium text-gray-800 mb-16">
|
|
291
|
+
Most typefaces can be classified into one of four basic groups: those
|
|
292
|
+
with serifs, those without serifs, scripts and decorative styles.
|
|
293
|
+
</p>
|
|
294
|
+
|
|
295
|
+
<div className="bg-gray-50 p-24 rounded-8 mb-16">
|
|
296
|
+
<h4 className="typography-h5 text-gray-900 mb-8">
|
|
297
|
+
Hierarchy Matters
|
|
298
|
+
</h4>
|
|
299
|
+
<p className="typography-body-small text-gray-700">
|
|
300
|
+
Visual hierarchy guides readers through content by creating clear
|
|
301
|
+
distinctions between headings, body text, and supporting elements.
|
|
302
|
+
</p>
|
|
303
|
+
</div>
|
|
304
|
+
|
|
305
|
+
<p className="typography-body-medium text-gray-800">
|
|
306
|
+
Good typography requires attention to detail and an understanding of
|
|
307
|
+
how type creates meaning and emotion.
|
|
308
|
+
</p>
|
|
309
|
+
</section>
|
|
310
|
+
|
|
311
|
+
<footer className="border-t border-gray-200 pt-24">
|
|
312
|
+
<p className="typography-caption text-gray-500">
|
|
313
|
+
Typography specimen created for the NDS Design System
|
|
314
|
+
</p>
|
|
315
|
+
</footer>
|
|
316
|
+
</article>
|
|
317
|
+
),
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Font comparison shows the different font families in the design system.
|
|
322
|
+
*/
|
|
323
|
+
export const FontFamilies: StoryObj = {
|
|
324
|
+
render: () => (
|
|
325
|
+
<div className="space-y-48 p-24">
|
|
326
|
+
<section>
|
|
327
|
+
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
328
|
+
Heading Font: Inter Tight
|
|
329
|
+
</h2>
|
|
330
|
+
<div className="space-y-16">
|
|
331
|
+
<p className="typography-h2 text-gray-900">
|
|
332
|
+
The quick brown fox jumps over the lazy dog
|
|
333
|
+
</p>
|
|
334
|
+
<p className="typography-h4 text-gray-800">
|
|
335
|
+
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
336
|
+
</p>
|
|
337
|
+
<p className="typography-h4 text-gray-700">
|
|
338
|
+
abcdefghijklmnopqrstuvwxyz
|
|
339
|
+
</p>
|
|
340
|
+
<p className="typography-h4 text-gray-600">0123456789</p>
|
|
341
|
+
</div>
|
|
342
|
+
</section>
|
|
343
|
+
|
|
344
|
+
<section>
|
|
345
|
+
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
346
|
+
Body Font: Inter
|
|
347
|
+
</h2>
|
|
348
|
+
<div className="space-y-16">
|
|
349
|
+
<p className="typography-body-large text-gray-900">
|
|
350
|
+
The quick brown fox jumps over the lazy dog
|
|
351
|
+
</p>
|
|
352
|
+
<p className="typography-body-medium text-gray-800">
|
|
353
|
+
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
354
|
+
</p>
|
|
355
|
+
<p className="typography-body-medium text-gray-700">
|
|
356
|
+
abcdefghijklmnopqrstuvwxyz
|
|
357
|
+
</p>
|
|
358
|
+
<p className="typography-body-medium text-gray-600">0123456789</p>
|
|
359
|
+
</div>
|
|
360
|
+
</section>
|
|
361
|
+
|
|
362
|
+
<section>
|
|
363
|
+
<h2 className="typography-h5 text-gray-500 mb-24 uppercase tracking-wide">
|
|
364
|
+
Font Weights
|
|
365
|
+
</h2>
|
|
366
|
+
<div className="grid grid-cols-2 gap-24">
|
|
367
|
+
<div>
|
|
368
|
+
<p className="typography-caption text-gray-500 mb-4">
|
|
369
|
+
Regular (400)
|
|
370
|
+
</p>
|
|
371
|
+
<p className="typography-body-medium font-normal text-gray-900">
|
|
372
|
+
The quick brown fox
|
|
373
|
+
</p>
|
|
374
|
+
</div>
|
|
375
|
+
<div>
|
|
376
|
+
<p className="typography-caption text-gray-500 mb-4">
|
|
377
|
+
Medium (500)
|
|
378
|
+
</p>
|
|
379
|
+
<p className="typography-body-medium font-medium text-gray-900">
|
|
380
|
+
The quick brown fox
|
|
381
|
+
</p>
|
|
382
|
+
</div>
|
|
383
|
+
<div>
|
|
384
|
+
<p className="typography-caption text-gray-500 mb-4">
|
|
385
|
+
Semibold (600)
|
|
386
|
+
</p>
|
|
387
|
+
<p className="typography-body-medium font-semibold text-gray-900">
|
|
388
|
+
The quick brown fox
|
|
389
|
+
</p>
|
|
390
|
+
</div>
|
|
391
|
+
<div>
|
|
392
|
+
<p className="typography-caption text-gray-500 mb-4">Bold (700)</p>
|
|
393
|
+
<p className="typography-body-medium font-bold text-gray-900">
|
|
394
|
+
The quick brown fox
|
|
395
|
+
</p>
|
|
396
|
+
</div>
|
|
397
|
+
</div>
|
|
398
|
+
</section>
|
|
399
|
+
</div>
|
|
400
|
+
),
|
|
401
|
+
};
|
|
@@ -43,10 +43,10 @@ export const Default: Story = {
|
|
|
43
43
|
</div>
|
|
44
44
|
</CardBody>
|
|
45
45
|
<CardActions>
|
|
46
|
-
<Button size="default" variant="
|
|
46
|
+
<Button size="default" variant="solid">
|
|
47
47
|
Primary
|
|
48
48
|
</Button>
|
|
49
|
-
<Button size="default" variant="
|
|
49
|
+
<Button size="default" variant="outline">
|
|
50
50
|
Secondary
|
|
51
51
|
</Button>
|
|
52
52
|
</CardActions>
|
|
@@ -77,10 +77,10 @@ export const Vertical: Story = {
|
|
|
77
77
|
</div>
|
|
78
78
|
</CardBody>
|
|
79
79
|
<CardActions>
|
|
80
|
-
<Button size="default" variant="
|
|
80
|
+
<Button size="default" variant="solid">
|
|
81
81
|
Primary
|
|
82
82
|
</Button>
|
|
83
|
-
<Button size="default" variant="
|
|
83
|
+
<Button size="default" variant="outline">
|
|
84
84
|
Secondary
|
|
85
85
|
</Button>
|
|
86
86
|
</CardActions>
|
|
@@ -109,10 +109,10 @@ export const Horizontal: Story = {
|
|
|
109
109
|
</div>
|
|
110
110
|
</CardBody>
|
|
111
111
|
<CardActions>
|
|
112
|
-
<Button size="sm" variant="
|
|
112
|
+
<Button size="sm" variant="solid">
|
|
113
113
|
Primary
|
|
114
114
|
</Button>
|
|
115
|
-
<Button size="sm" variant="
|
|
115
|
+
<Button size="sm" variant="outline">
|
|
116
116
|
Secondary
|
|
117
117
|
</Button>
|
|
118
118
|
</CardActions>
|
|
@@ -141,7 +141,7 @@ export const WithoutImage: Story = {
|
|
|
141
141
|
</div>
|
|
142
142
|
</CardBody>
|
|
143
143
|
<CardActions>
|
|
144
|
-
<Button size="default" variant="
|
|
144
|
+
<Button size="default" variant="solid">
|
|
145
145
|
Learn More
|
|
146
146
|
</Button>
|
|
147
147
|
</CardActions>
|
|
@@ -166,7 +166,7 @@ export const WithoutEyebrow: Story = {
|
|
|
166
166
|
</div>
|
|
167
167
|
</CardBody>
|
|
168
168
|
<CardActions>
|
|
169
|
-
<Button size="default" variant="
|
|
169
|
+
<Button size="default" variant="solid">
|
|
170
170
|
Primary
|
|
171
171
|
</Button>
|
|
172
172
|
</CardActions>
|
|
@@ -236,7 +236,7 @@ export const CardGrid: Story = {
|
|
|
236
236
|
</div>
|
|
237
237
|
</CardBody>
|
|
238
238
|
<CardActions>
|
|
239
|
-
<Button size="sm" variant="
|
|
239
|
+
<Button size="sm" variant="solid">
|
|
240
240
|
Action
|
|
241
241
|
</Button>
|
|
242
242
|
</CardActions>
|
|
@@ -270,10 +270,10 @@ export const Playground: Story = {
|
|
|
270
270
|
</div>
|
|
271
271
|
</CardBody>
|
|
272
272
|
<CardActions>
|
|
273
|
-
<Button size="default" variant="
|
|
273
|
+
<Button size="default" variant="solid">
|
|
274
274
|
Primary
|
|
275
275
|
</Button>
|
|
276
|
-
<Button size="default" variant="
|
|
276
|
+
<Button size="default" variant="outline">
|
|
277
277
|
Secondary
|
|
278
278
|
</Button>
|
|
279
279
|
</CardActions>
|
|
@@ -142,7 +142,7 @@ const CardContent = React.forwardRef<HTMLDivElement, CardContentProps>(
|
|
|
142
142
|
CardContent.displayName = "CardContent";
|
|
143
143
|
|
|
144
144
|
const cardEyebrowVariants = tv({
|
|
145
|
-
base: "typography-
|
|
145
|
+
base: "typography-overline text-text-muted uppercase tracking-wider",
|
|
146
146
|
});
|
|
147
147
|
|
|
148
148
|
export interface CardEyebrowProps
|
|
@@ -165,7 +165,7 @@ const CardEyebrow = React.forwardRef<HTMLParagraphElement, CardEyebrowProps>(
|
|
|
165
165
|
CardEyebrow.displayName = "CardEyebrow";
|
|
166
166
|
|
|
167
167
|
const cardTitleVariants = tv({
|
|
168
|
-
base: "typography-
|
|
168
|
+
base: "typography-h5 text-text-primary",
|
|
169
169
|
});
|
|
170
170
|
|
|
171
171
|
export interface CardTitleProps
|
|
@@ -32,10 +32,10 @@ describe("Card Visual Regression", () => {
|
|
|
32
32
|
</div>
|
|
33
33
|
</CardBody>
|
|
34
34
|
<CardActions>
|
|
35
|
-
<Button size="default" variant="
|
|
35
|
+
<Button size="default" variant="solid">
|
|
36
36
|
Primary
|
|
37
37
|
</Button>
|
|
38
|
-
<Button size="default" variant="
|
|
38
|
+
<Button size="default" variant="outline">
|
|
39
39
|
Secondary
|
|
40
40
|
</Button>
|
|
41
41
|
</CardActions>
|
|
@@ -69,10 +69,10 @@ describe("Card Visual Regression", () => {
|
|
|
69
69
|
</div>
|
|
70
70
|
</CardBody>
|
|
71
71
|
<CardActions>
|
|
72
|
-
<Button size="sm" variant="
|
|
72
|
+
<Button size="sm" variant="solid">
|
|
73
73
|
Primary
|
|
74
74
|
</Button>
|
|
75
|
-
<Button size="sm" variant="
|
|
75
|
+
<Button size="sm" variant="outline">
|
|
76
76
|
Secondary
|
|
77
77
|
</Button>
|
|
78
78
|
</CardActions>
|
|
@@ -101,7 +101,7 @@ describe("Card Visual Regression", () => {
|
|
|
101
101
|
</div>
|
|
102
102
|
</CardBody>
|
|
103
103
|
<CardActions>
|
|
104
|
-
<Button size="default" variant="
|
|
104
|
+
<Button size="default" variant="solid">
|
|
105
105
|
Learn More
|
|
106
106
|
</Button>
|
|
107
107
|
</CardActions>
|
|
@@ -132,7 +132,7 @@ describe("Card Visual Regression", () => {
|
|
|
132
132
|
</div>
|
|
133
133
|
</CardBody>
|
|
134
134
|
<CardActions>
|
|
135
|
-
<Button size="default" variant="
|
|
135
|
+
<Button size="default" variant="solid">
|
|
136
136
|
Primary
|
|
137
137
|
</Button>
|
|
138
138
|
</CardActions>
|
|
@@ -138,7 +138,7 @@ const NavbarLink = React.forwardRef<HTMLAnchorElement, NavbarLinkProps>(
|
|
|
138
138
|
<Comp
|
|
139
139
|
ref={ref}
|
|
140
140
|
className={cn(
|
|
141
|
-
"typography-
|
|
141
|
+
"typography-body-small font-medium text-gray-900 transition-colors hover:text-gray-700",
|
|
142
142
|
active && "text-gray-1100",
|
|
143
143
|
className,
|
|
144
144
|
)}
|
|
@@ -301,7 +301,7 @@ const NavbarMobileMenuLink = React.forwardRef<
|
|
|
301
301
|
<Comp
|
|
302
302
|
ref={ref}
|
|
303
303
|
className={cn(
|
|
304
|
-
"typography-
|
|
304
|
+
"typography-body-medium font-medium text-gray-900 transition-colors hover:text-gray-700",
|
|
305
305
|
"py-spacing-component-navbar-padding-y-mobile",
|
|
306
306
|
active && "text-gray-1100",
|
|
307
307
|
className,
|
|
@@ -26,7 +26,7 @@ describe("Navbar Visual Regression", () => {
|
|
|
26
26
|
<NavbarLink href="#">Contact</NavbarLink>
|
|
27
27
|
</NavbarLinks>
|
|
28
28
|
<NavbarActions>
|
|
29
|
-
<Button size="sm" variant="
|
|
29
|
+
<Button size="sm" variant="solid">
|
|
30
30
|
Sign In
|
|
31
31
|
</Button>
|
|
32
32
|
</NavbarActions>
|
|
@@ -55,7 +55,7 @@ describe("Navbar Visual Regression", () => {
|
|
|
55
55
|
<NavbarLink href="#">Contact</NavbarLink>
|
|
56
56
|
</NavbarLinks>
|
|
57
57
|
<NavbarActions>
|
|
58
|
-
<Button size="sm" variant="
|
|
58
|
+
<Button size="sm" variant="solid">
|
|
59
59
|
Sign In
|
|
60
60
|
</Button>
|
|
61
61
|
</NavbarActions>
|
|
@@ -83,7 +83,7 @@ const CardGrid = React.forwardRef<HTMLElement, CardGridProps>(
|
|
|
83
83
|
<h2
|
|
84
84
|
className={cn(
|
|
85
85
|
"col-full",
|
|
86
|
-
"typography-
|
|
86
|
+
"typography-h4 text-gray-900",
|
|
87
87
|
// Gap after title: mobile default, md: 56px, lg: 64px
|
|
88
88
|
"mb-spacing-36 md:mb-spacing-56 lg:mb-spacing-64",
|
|
89
89
|
)}
|
|
@@ -66,9 +66,9 @@ const FaqSection = React.forwardRef<HTMLElement, FaqSectionProps>(
|
|
|
66
66
|
title={title}
|
|
67
67
|
className={cn(
|
|
68
68
|
// Override title typography to be larger
|
|
69
|
-
"[&_h2]:typography-
|
|
69
|
+
"[&_h2]:typography-h4",
|
|
70
70
|
// Accordion typography overrides
|
|
71
|
-
"[&_button]:typography-body-large [&_button]:md:typography-
|
|
71
|
+
"[&_button]:typography-body-large [&_button]:md:typography-h5",
|
|
72
72
|
"[&_[data-accordion-panel]]:typography-body-medium [&_[data-accordion-panel]]:md:typography-body-large",
|
|
73
73
|
className,
|
|
74
74
|
)}
|
|
@@ -67,8 +67,8 @@ describe("Hero", () => {
|
|
|
67
67
|
render(<Hero title="Default" data-testid="hero" />);
|
|
68
68
|
|
|
69
69
|
const hero = page.getByTestId("hero");
|
|
70
|
-
// Uses semantic token bg-bg-
|
|
71
|
-
await expect.element(hero).toHaveClass(/bg-bg-
|
|
70
|
+
// Uses semantic token bg-bg-page for default dark colorScheme
|
|
71
|
+
await expect.element(hero).toHaveClass(/bg-bg-page/);
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
test("applies minimum height for viewport coverage", async () => {
|
|
@@ -115,7 +115,7 @@ describe("Hero", () => {
|
|
|
115
115
|
render(<Hero title="A1 Hero" variant="A1" data-testid="hero" />);
|
|
116
116
|
|
|
117
117
|
const hero = page.getByTestId("hero");
|
|
118
|
-
await expect.element(hero).toHaveClass(/bg-bg-
|
|
118
|
+
await expect.element(hero).toHaveClass(/bg-bg-page/);
|
|
119
119
|
await expect.element(hero).toHaveClass(/min-h-\[80vh\]/);
|
|
120
120
|
});
|
|
121
121
|
|
|
@@ -123,7 +123,7 @@ describe("Hero", () => {
|
|
|
123
123
|
render(<Hero title="A2 Hero" variant="A2" data-testid="hero" />);
|
|
124
124
|
|
|
125
125
|
const hero = page.getByTestId("hero");
|
|
126
|
-
await expect.element(hero).toHaveClass(/bg-bg-
|
|
126
|
+
await expect.element(hero).toHaveClass(/bg-bg-page/);
|
|
127
127
|
await expect.element(hero).toHaveClass(/min-h-\[80vh\]/);
|
|
128
128
|
});
|
|
129
129
|
|
|
@@ -131,7 +131,7 @@ describe("Hero", () => {
|
|
|
131
131
|
render(<Hero title="A3 Hero" variant="A3" data-testid="hero" />);
|
|
132
132
|
|
|
133
133
|
const hero = page.getByTestId("hero");
|
|
134
|
-
await expect.element(hero).toHaveClass(/bg-bg-
|
|
134
|
+
await expect.element(hero).toHaveClass(/bg-bg-page/);
|
|
135
135
|
await expect.element(hero).toHaveClass(/min-h-\[80vh\]/);
|
|
136
136
|
});
|
|
137
137
|
});
|
|
@@ -131,7 +131,7 @@ describe("Prose", () => {
|
|
|
131
131
|
);
|
|
132
132
|
|
|
133
133
|
const heading = page.getByRole("heading", { name: "H2 Test" });
|
|
134
|
-
await expect.element(heading).toHaveClass(/typography-
|
|
134
|
+
await expect.element(heading).toHaveClass(/typography-h3/);
|
|
135
135
|
});
|
|
136
136
|
|
|
137
137
|
test("h3 heading has correct typography class", async () => {
|
|
@@ -144,7 +144,7 @@ describe("Prose", () => {
|
|
|
144
144
|
);
|
|
145
145
|
|
|
146
146
|
const heading = page.getByRole("heading", { name: "H3 Test" });
|
|
147
|
-
await expect.element(heading).toHaveClass(/typography-
|
|
147
|
+
await expect.element(heading).toHaveClass(/typography-h4/);
|
|
148
148
|
});
|
|
149
149
|
});
|
|
150
150
|
|