@nationaldesignstudio/react 0.0.19 → 0.2.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/component-registry.md +46 -19
- package/dist/components/atoms/accordion/accordion.d.ts +9 -9
- package/dist/components/atoms/background/background.d.ts +23 -0
- package/dist/components/atoms/button/icon-button.d.ts +44 -16
- package/dist/components/sections/banner/banner.d.ts +9 -9
- package/dist/components/sections/faq-section/faq-section.d.ts +1 -1
- package/dist/components/sections/hero/hero.d.ts +115 -18
- package/dist/components/sections/tout/tout.d.ts +8 -8
- package/dist/components/sections/two-column-section/two-column-section.d.ts +7 -21
- package/dist/index.js +2177 -2027
- package/dist/index.js.map +1 -1
- package/dist/tokens.css +16 -16
- package/package.json +1 -1
- package/src/components/atoms/accordion/accordion.test.tsx +231 -0
- package/src/components/atoms/accordion/accordion.tsx +21 -19
- package/src/components/atoms/background/background.test.tsx +213 -0
- package/src/components/atoms/background/background.tsx +104 -27
- package/src/components/atoms/button/button.tsx +11 -1
- package/src/components/atoms/button/icon-button.test.tsx +254 -0
- package/src/components/atoms/button/icon-button.tsx +108 -16
- package/src/components/atoms/pager-control/pager-control.tsx +32 -3
- package/src/components/dev-tools/dev-toolbar/dev-toolbar.tsx +2 -0
- package/src/components/organisms/card/card.test.tsx +4 -2
- package/src/components/organisms/navbar/navbar.tsx +2 -0
- package/src/components/sections/banner/banner.stories.tsx +5 -1
- package/src/components/sections/banner/banner.tsx +10 -10
- package/src/components/sections/faq-section/faq-section.stories.tsx +7 -7
- package/src/components/sections/faq-section/faq-section.tsx +3 -3
- package/src/components/sections/hero/hero.tsx +33 -51
- package/src/components/sections/tout/tout.stories.tsx +31 -7
- package/src/components/sections/tout/tout.tsx +6 -8
- package/src/components/sections/two-column-section/two-column-section.stories.tsx +11 -11
- package/src/components/sections/two-column-section/two-column-section.tsx +16 -10
- package/src/stories/ThemeProvider.stories.tsx +9 -3
|
@@ -2,19 +2,7 @@ import { VariantProps } from 'tailwind-variants';
|
|
|
2
2
|
import { ComponentTheme } from '../../../lib/theme';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
export { Background as HeroBackground, BackgroundGradient as HeroGradient, type BackgroundGradientProps as HeroGradientProps, BackgroundImage as HeroBackgroundImage, type BackgroundImageProps as HeroBackgroundImageProps, BackgroundOverlay as HeroOverlay, type BackgroundOverlayProps as HeroOverlayProps, BackgroundStream as HeroBackgroundStream, type BackgroundStreamProps as HeroBackgroundStreamProps, BackgroundVideo as HeroBackgroundVideo, type BackgroundVideoProps as HeroBackgroundVideoProps, } from '../../atoms/background';
|
|
5
|
-
|
|
6
|
-
* Hero variants based on Figma BaseKit / Heros
|
|
7
|
-
*
|
|
8
|
-
* Slots:
|
|
9
|
-
* - root: The outer container
|
|
10
|
-
* - top: Full-width slot at top for banners/nav (no padding)
|
|
11
|
-
* - content: Padded content area with alignment
|
|
12
|
-
*
|
|
13
|
-
* Variants:
|
|
14
|
-
* - A1: Content aligned at bottom (default)
|
|
15
|
-
* - A2: Content aligned at top
|
|
16
|
-
* - A3: Content centered
|
|
17
|
-
*/
|
|
5
|
+
declare const DEFAULT_TITLE_TYPOGRAPHY = "text-64 leading-64 tracking-64 md:text-128 md:leading-128 md:tracking-128 lg:text-192 lg:leading-192 lg:tracking-192 font-medium";
|
|
18
6
|
declare const heroVariants: import('tailwind-variants').TVReturnType<{
|
|
19
7
|
variant: {
|
|
20
8
|
A1: {
|
|
@@ -30,10 +18,26 @@ declare const heroVariants: import('tailwind-variants').TVReturnType<{
|
|
|
30
18
|
content: string[];
|
|
31
19
|
};
|
|
32
20
|
};
|
|
21
|
+
colorScheme: {
|
|
22
|
+
dark: {
|
|
23
|
+
root: string;
|
|
24
|
+
title: string;
|
|
25
|
+
};
|
|
26
|
+
light: {
|
|
27
|
+
root: string;
|
|
28
|
+
title: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
hasBackground: {
|
|
32
|
+
true: {
|
|
33
|
+
root: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
33
36
|
}, {
|
|
34
37
|
root: string;
|
|
35
38
|
top: string;
|
|
36
39
|
content: string[];
|
|
40
|
+
title: string;
|
|
37
41
|
}, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
|
|
38
42
|
variant: {
|
|
39
43
|
A1: {
|
|
@@ -49,6 +53,21 @@ declare const heroVariants: import('tailwind-variants').TVReturnType<{
|
|
|
49
53
|
content: string[];
|
|
50
54
|
};
|
|
51
55
|
};
|
|
56
|
+
colorScheme: {
|
|
57
|
+
dark: {
|
|
58
|
+
root: string;
|
|
59
|
+
title: string;
|
|
60
|
+
};
|
|
61
|
+
light: {
|
|
62
|
+
root: string;
|
|
63
|
+
title: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
hasBackground: {
|
|
67
|
+
true: {
|
|
68
|
+
root: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
52
71
|
}, {
|
|
53
72
|
variant: {
|
|
54
73
|
A1: {
|
|
@@ -64,6 +83,21 @@ declare const heroVariants: import('tailwind-variants').TVReturnType<{
|
|
|
64
83
|
content: string[];
|
|
65
84
|
};
|
|
66
85
|
};
|
|
86
|
+
colorScheme: {
|
|
87
|
+
dark: {
|
|
88
|
+
root: string;
|
|
89
|
+
title: string;
|
|
90
|
+
};
|
|
91
|
+
light: {
|
|
92
|
+
root: string;
|
|
93
|
+
title: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
hasBackground: {
|
|
97
|
+
true: {
|
|
98
|
+
root: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
67
101
|
}>, {
|
|
68
102
|
variant: {
|
|
69
103
|
A1: {
|
|
@@ -79,10 +113,26 @@ declare const heroVariants: import('tailwind-variants').TVReturnType<{
|
|
|
79
113
|
content: string[];
|
|
80
114
|
};
|
|
81
115
|
};
|
|
116
|
+
colorScheme: {
|
|
117
|
+
dark: {
|
|
118
|
+
root: string;
|
|
119
|
+
title: string;
|
|
120
|
+
};
|
|
121
|
+
light: {
|
|
122
|
+
root: string;
|
|
123
|
+
title: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
hasBackground: {
|
|
127
|
+
true: {
|
|
128
|
+
root: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
82
131
|
}, {
|
|
83
132
|
root: string;
|
|
84
133
|
top: string;
|
|
85
134
|
content: string[];
|
|
135
|
+
title: string;
|
|
86
136
|
}, import('tailwind-variants').TVReturnType<{
|
|
87
137
|
variant: {
|
|
88
138
|
A1: {
|
|
@@ -98,10 +148,26 @@ declare const heroVariants: import('tailwind-variants').TVReturnType<{
|
|
|
98
148
|
content: string[];
|
|
99
149
|
};
|
|
100
150
|
};
|
|
151
|
+
colorScheme: {
|
|
152
|
+
dark: {
|
|
153
|
+
root: string;
|
|
154
|
+
title: string;
|
|
155
|
+
};
|
|
156
|
+
light: {
|
|
157
|
+
root: string;
|
|
158
|
+
title: string;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
hasBackground: {
|
|
162
|
+
true: {
|
|
163
|
+
root: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
101
166
|
}, {
|
|
102
167
|
root: string;
|
|
103
168
|
top: string;
|
|
104
169
|
content: string[];
|
|
170
|
+
title: string;
|
|
105
171
|
}, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
|
|
106
172
|
variant: {
|
|
107
173
|
A1: {
|
|
@@ -117,6 +183,21 @@ declare const heroVariants: import('tailwind-variants').TVReturnType<{
|
|
|
117
183
|
content: string[];
|
|
118
184
|
};
|
|
119
185
|
};
|
|
186
|
+
colorScheme: {
|
|
187
|
+
dark: {
|
|
188
|
+
root: string;
|
|
189
|
+
title: string;
|
|
190
|
+
};
|
|
191
|
+
light: {
|
|
192
|
+
root: string;
|
|
193
|
+
title: string;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
hasBackground: {
|
|
197
|
+
true: {
|
|
198
|
+
root: string;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
120
201
|
}, {
|
|
121
202
|
variant: {
|
|
122
203
|
A1: {
|
|
@@ -132,6 +213,21 @@ declare const heroVariants: import('tailwind-variants').TVReturnType<{
|
|
|
132
213
|
content: string[];
|
|
133
214
|
};
|
|
134
215
|
};
|
|
216
|
+
colorScheme: {
|
|
217
|
+
dark: {
|
|
218
|
+
root: string;
|
|
219
|
+
title: string;
|
|
220
|
+
};
|
|
221
|
+
light: {
|
|
222
|
+
root: string;
|
|
223
|
+
title: string;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
hasBackground: {
|
|
227
|
+
true: {
|
|
228
|
+
root: string;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
135
231
|
}>, unknown, unknown, undefined>>;
|
|
136
232
|
declare const heroHeaderVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "relative z-10 w-full", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "relative z-10 w-full", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
137
233
|
declare const heroContentVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
@@ -161,6 +257,12 @@ export interface HeroProps extends Omit<React.HTMLAttributes<HTMLElement>, "titl
|
|
|
161
257
|
* Default: "text-64 leading-64 tracking-64 md:text-128 md:leading-128 md:tracking-128 lg:text-192 lg:leading-192 lg:tracking-192"
|
|
162
258
|
*/
|
|
163
259
|
titleClassName?: string;
|
|
260
|
+
/**
|
|
261
|
+
* Color scheme for text content.
|
|
262
|
+
* - dark: Dark text for use on light backgrounds (default)
|
|
263
|
+
* - light: Light text for use on dark backgrounds
|
|
264
|
+
*/
|
|
265
|
+
colorScheme?: "dark" | "light";
|
|
164
266
|
/**
|
|
165
267
|
* Content for the top slot (full-width, no padding).
|
|
166
268
|
* Use for USGovBanner, Navigation, etc.
|
|
@@ -191,11 +293,6 @@ export interface HeroProps extends Omit<React.HTMLAttributes<HTMLElement>, "titl
|
|
|
191
293
|
*/
|
|
192
294
|
theme?: ComponentTheme;
|
|
193
295
|
}
|
|
194
|
-
/**
|
|
195
|
-
* Default responsive typography for hero title using primitive tokens
|
|
196
|
-
* Mobile: 64px, Tablet: 128px, Desktop: 192px
|
|
197
|
-
*/
|
|
198
|
-
declare const DEFAULT_TITLE_TYPOGRAPHY = "text-64 leading-64 tracking-64 md:text-128 md:leading-128 md:tracking-128 lg:text-192 lg:leading-192 lg:tracking-192 font-medium";
|
|
199
296
|
/**
|
|
200
297
|
* Hero component for page headers with large display typography.
|
|
201
298
|
*
|
|
@@ -5,7 +5,7 @@ import * as React from "react";
|
|
|
5
5
|
* Tout variants for background and content styling
|
|
6
6
|
*/
|
|
7
7
|
declare const toutVariants: import('tailwind-variants').TVReturnType<{
|
|
8
|
-
|
|
8
|
+
colorScheme: {
|
|
9
9
|
light: string;
|
|
10
10
|
dark: string;
|
|
11
11
|
};
|
|
@@ -14,7 +14,7 @@ declare const toutVariants: import('tailwind-variants').TVReturnType<{
|
|
|
14
14
|
center: string;
|
|
15
15
|
};
|
|
16
16
|
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
17
|
-
|
|
17
|
+
colorScheme: {
|
|
18
18
|
light: string;
|
|
19
19
|
dark: string;
|
|
20
20
|
};
|
|
@@ -23,7 +23,7 @@ declare const toutVariants: import('tailwind-variants').TVReturnType<{
|
|
|
23
23
|
center: string;
|
|
24
24
|
};
|
|
25
25
|
}, {
|
|
26
|
-
|
|
26
|
+
colorScheme: {
|
|
27
27
|
light: string;
|
|
28
28
|
dark: string;
|
|
29
29
|
};
|
|
@@ -32,7 +32,7 @@ declare const toutVariants: import('tailwind-variants').TVReturnType<{
|
|
|
32
32
|
center: string;
|
|
33
33
|
};
|
|
34
34
|
}>, {
|
|
35
|
-
|
|
35
|
+
colorScheme: {
|
|
36
36
|
light: string;
|
|
37
37
|
dark: string;
|
|
38
38
|
};
|
|
@@ -41,7 +41,7 @@ declare const toutVariants: import('tailwind-variants').TVReturnType<{
|
|
|
41
41
|
center: string;
|
|
42
42
|
};
|
|
43
43
|
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
44
|
-
|
|
44
|
+
colorScheme: {
|
|
45
45
|
light: string;
|
|
46
46
|
dark: string;
|
|
47
47
|
};
|
|
@@ -50,7 +50,7 @@ declare const toutVariants: import('tailwind-variants').TVReturnType<{
|
|
|
50
50
|
center: string;
|
|
51
51
|
};
|
|
52
52
|
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
53
|
-
|
|
53
|
+
colorScheme: {
|
|
54
54
|
light: string;
|
|
55
55
|
dark: string;
|
|
56
56
|
};
|
|
@@ -59,7 +59,7 @@ declare const toutVariants: import('tailwind-variants').TVReturnType<{
|
|
|
59
59
|
center: string;
|
|
60
60
|
};
|
|
61
61
|
}, {
|
|
62
|
-
|
|
62
|
+
colorScheme: {
|
|
63
63
|
light: string;
|
|
64
64
|
dark: string;
|
|
65
65
|
};
|
|
@@ -74,7 +74,7 @@ declare const toutVariants: import('tailwind-variants').TVReturnType<{
|
|
|
74
74
|
* A full-bleed section with a background image and overlaid content.
|
|
75
75
|
* Content can be positioned on the left side or centered.
|
|
76
76
|
*
|
|
77
|
-
*
|
|
77
|
+
* Color schemes:
|
|
78
78
|
* - light: Light text styling (default)
|
|
79
79
|
* - dark: Dark text styling
|
|
80
80
|
*
|
|
@@ -10,80 +10,66 @@ import * as React from "react";
|
|
|
10
10
|
* Uses the 24-column grid system.
|
|
11
11
|
*/
|
|
12
12
|
declare const twoColumnSectionVariants: import('tailwind-variants').TVReturnType<{
|
|
13
|
-
|
|
13
|
+
colorScheme: {
|
|
14
14
|
dark: string;
|
|
15
15
|
light: string;
|
|
16
16
|
};
|
|
17
17
|
layout: {
|
|
18
|
-
/** Default 24-column grid with asymmetric split (title: 9, content: 15) */
|
|
19
18
|
asymmetric: string;
|
|
20
|
-
/** Equal 2-column layout at md+ breakpoints */
|
|
21
19
|
equal: string;
|
|
22
20
|
};
|
|
23
21
|
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
24
|
-
|
|
22
|
+
colorScheme: {
|
|
25
23
|
dark: string;
|
|
26
24
|
light: string;
|
|
27
25
|
};
|
|
28
26
|
layout: {
|
|
29
|
-
/** Default 24-column grid with asymmetric split (title: 9, content: 15) */
|
|
30
27
|
asymmetric: string;
|
|
31
|
-
/** Equal 2-column layout at md+ breakpoints */
|
|
32
28
|
equal: string;
|
|
33
29
|
};
|
|
34
30
|
}, {
|
|
35
|
-
|
|
31
|
+
colorScheme: {
|
|
36
32
|
dark: string;
|
|
37
33
|
light: string;
|
|
38
34
|
};
|
|
39
35
|
layout: {
|
|
40
|
-
/** Default 24-column grid with asymmetric split (title: 9, content: 15) */
|
|
41
36
|
asymmetric: string;
|
|
42
|
-
/** Equal 2-column layout at md+ breakpoints */
|
|
43
37
|
equal: string;
|
|
44
38
|
};
|
|
45
39
|
}>, {
|
|
46
|
-
|
|
40
|
+
colorScheme: {
|
|
47
41
|
dark: string;
|
|
48
42
|
light: string;
|
|
49
43
|
};
|
|
50
44
|
layout: {
|
|
51
|
-
/** Default 24-column grid with asymmetric split (title: 9, content: 15) */
|
|
52
45
|
asymmetric: string;
|
|
53
|
-
/** Equal 2-column layout at md+ breakpoints */
|
|
54
46
|
equal: string;
|
|
55
47
|
};
|
|
56
48
|
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
57
|
-
|
|
49
|
+
colorScheme: {
|
|
58
50
|
dark: string;
|
|
59
51
|
light: string;
|
|
60
52
|
};
|
|
61
53
|
layout: {
|
|
62
|
-
/** Default 24-column grid with asymmetric split (title: 9, content: 15) */
|
|
63
54
|
asymmetric: string;
|
|
64
|
-
/** Equal 2-column layout at md+ breakpoints */
|
|
65
55
|
equal: string;
|
|
66
56
|
};
|
|
67
57
|
}, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
|
|
68
|
-
|
|
58
|
+
colorScheme: {
|
|
69
59
|
dark: string;
|
|
70
60
|
light: string;
|
|
71
61
|
};
|
|
72
62
|
layout: {
|
|
73
|
-
/** Default 24-column grid with asymmetric split (title: 9, content: 15) */
|
|
74
63
|
asymmetric: string;
|
|
75
|
-
/** Equal 2-column layout at md+ breakpoints */
|
|
76
64
|
equal: string;
|
|
77
65
|
};
|
|
78
66
|
}, {
|
|
79
|
-
|
|
67
|
+
colorScheme: {
|
|
80
68
|
dark: string;
|
|
81
69
|
light: string;
|
|
82
70
|
};
|
|
83
71
|
layout: {
|
|
84
|
-
/** Default 24-column grid with asymmetric split (title: 9, content: 15) */
|
|
85
72
|
asymmetric: string;
|
|
86
|
-
/** Equal 2-column layout at md+ breakpoints */
|
|
87
73
|
equal: string;
|
|
88
74
|
};
|
|
89
75
|
}>, unknown, unknown, undefined>>;
|