@nationaldesignstudio/react 0.0.17 → 0.1.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 +181 -29
- package/dist/components/atoms/accordion/accordion.d.ts +2 -2
- package/dist/components/atoms/background/background.d.ts +158 -0
- package/dist/components/atoms/button/button.d.ts +64 -82
- package/dist/components/atoms/button/icon-button.d.ts +128 -66
- package/dist/components/organisms/card/card.d.ts +130 -4
- package/dist/components/organisms/us-gov-banner/us-gov-banner.d.ts +120 -2
- package/dist/components/sections/hero/hero.d.ts +166 -150
- package/dist/components/sections/quote-block/quote-block.d.ts +152 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +4068 -6052
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +1 -2
- package/dist/tokens.css +207 -16
- package/package.json +2 -4
- package/src/components/atoms/accordion/accordion.test.tsx +233 -0
- package/src/components/atoms/accordion/accordion.tsx +8 -8
- package/src/components/atoms/background/background.test.tsx +213 -0
- package/src/components/atoms/background/background.tsx +435 -0
- package/src/components/atoms/background/index.ts +22 -0
- package/src/components/atoms/button/button.stories.tsx +81 -32
- package/src/components/atoms/button/button.tsx +101 -49
- package/src/components/atoms/button/icon-button.stories.tsx +179 -28
- package/src/components/atoms/button/icon-button.test.tsx +254 -0
- package/src/components/atoms/button/icon-button.tsx +178 -59
- 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.tsx +82 -24
- package/src/components/organisms/card/index.ts +7 -0
- package/src/components/organisms/navbar/navbar.tsx +2 -0
- package/src/components/organisms/us-gov-banner/index.ts +5 -1
- package/src/components/organisms/us-gov-banner/us-gov-banner.tsx +72 -16
- package/src/components/sections/hero/hero.stories.tsx +124 -1
- package/src/components/sections/hero/hero.test.tsx +21 -18
- package/src/components/sections/hero/hero.tsx +188 -301
- package/src/components/sections/hero/index.ts +13 -0
- package/src/components/sections/quote-block/index.ts +5 -0
- package/src/components/sections/quote-block/quote-block.tsx +216 -0
- package/src/index.ts +40 -0
- package/src/lib/utils.ts +1 -6
- package/src/stories/ThemeProvider.stories.tsx +11 -5
|
@@ -4,36 +4,71 @@ declare const cardVariants: import('tailwind-variants').TVReturnType<{
|
|
|
4
4
|
layout: {
|
|
5
5
|
vertical: string;
|
|
6
6
|
horizontal: string;
|
|
7
|
+
/**
|
|
8
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
9
|
+
* Use with Background components for images/gradients.
|
|
10
|
+
*/
|
|
11
|
+
overlay: string;
|
|
7
12
|
};
|
|
8
|
-
}, undefined, "flex overflow-hidden rounded-surface-card bg-card-background stroke-surface-card border-border-subtle border-solid", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
13
|
+
}, undefined, "relative flex overflow-hidden rounded-surface-card bg-card-background stroke-surface-card border-border-subtle border-solid", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
9
14
|
layout: {
|
|
10
15
|
vertical: string;
|
|
11
16
|
horizontal: string;
|
|
17
|
+
/**
|
|
18
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
19
|
+
* Use with Background components for images/gradients.
|
|
20
|
+
*/
|
|
21
|
+
overlay: string;
|
|
12
22
|
};
|
|
13
23
|
}, {
|
|
14
24
|
layout: {
|
|
15
25
|
vertical: string;
|
|
16
26
|
horizontal: string;
|
|
27
|
+
/**
|
|
28
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
29
|
+
* Use with Background components for images/gradients.
|
|
30
|
+
*/
|
|
31
|
+
overlay: string;
|
|
17
32
|
};
|
|
18
33
|
}>, {
|
|
19
34
|
layout: {
|
|
20
35
|
vertical: string;
|
|
21
36
|
horizontal: string;
|
|
37
|
+
/**
|
|
38
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
39
|
+
* Use with Background components for images/gradients.
|
|
40
|
+
*/
|
|
41
|
+
overlay: string;
|
|
22
42
|
};
|
|
23
43
|
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
24
44
|
layout: {
|
|
25
45
|
vertical: string;
|
|
26
46
|
horizontal: string;
|
|
47
|
+
/**
|
|
48
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
49
|
+
* Use with Background components for images/gradients.
|
|
50
|
+
*/
|
|
51
|
+
overlay: string;
|
|
27
52
|
};
|
|
28
|
-
}, undefined, "flex overflow-hidden rounded-surface-card bg-card-background stroke-surface-card border-border-subtle border-solid", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
53
|
+
}, undefined, "relative flex overflow-hidden rounded-surface-card bg-card-background stroke-surface-card border-border-subtle border-solid", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
29
54
|
layout: {
|
|
30
55
|
vertical: string;
|
|
31
56
|
horizontal: string;
|
|
57
|
+
/**
|
|
58
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
59
|
+
* Use with Background components for images/gradients.
|
|
60
|
+
*/
|
|
61
|
+
overlay: string;
|
|
32
62
|
};
|
|
33
63
|
}, {
|
|
34
64
|
layout: {
|
|
35
65
|
vertical: string;
|
|
36
66
|
horizontal: string;
|
|
67
|
+
/**
|
|
68
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
69
|
+
* Use with Background components for images/gradients.
|
|
70
|
+
*/
|
|
71
|
+
overlay: string;
|
|
37
72
|
};
|
|
38
73
|
}>, unknown, unknown, undefined>>;
|
|
39
74
|
export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
@@ -44,10 +79,13 @@ export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, Variant
|
|
|
44
79
|
* Layouts:
|
|
45
80
|
* - vertical: Image on top, content below (default)
|
|
46
81
|
* - horizontal: Image on left, content on right
|
|
82
|
+
* - overlay: Full-bleed background with content on top
|
|
47
83
|
*
|
|
48
84
|
* Use with CardImage, CardContent, CardEyebrow, CardTitle, CardDescription, and CardActions.
|
|
85
|
+
* For overlay layout, use Background components for full-bleed backgrounds.
|
|
49
86
|
*/
|
|
50
87
|
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
88
|
+
declare const cardImageVariants: 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>>;
|
|
51
89
|
export interface CardImageProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
52
90
|
/**
|
|
53
91
|
* The image source URL
|
|
@@ -63,19 +101,104 @@ export interface CardImageProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
63
101
|
* For horizontal layout, takes up ~40% width and stretches to content height.
|
|
64
102
|
*/
|
|
65
103
|
declare const CardImage: React.ForwardRefExoticComponent<CardImageProps & React.RefAttributes<HTMLDivElement>>;
|
|
66
|
-
|
|
104
|
+
declare const cardContentVariants: import('tailwind-variants').TVReturnType<{
|
|
105
|
+
/**
|
|
106
|
+
* Vertical alignment of content within the card.
|
|
107
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
108
|
+
*/
|
|
109
|
+
justify: {
|
|
110
|
+
start: string;
|
|
111
|
+
center: string;
|
|
112
|
+
end: string;
|
|
113
|
+
};
|
|
114
|
+
}, undefined, "flex w-full flex-1 flex-col gap-spatial-card-large-gap p-spatial-card-large-padding", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
115
|
+
/**
|
|
116
|
+
* Vertical alignment of content within the card.
|
|
117
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
118
|
+
*/
|
|
119
|
+
justify: {
|
|
120
|
+
start: string;
|
|
121
|
+
center: string;
|
|
122
|
+
end: string;
|
|
123
|
+
};
|
|
124
|
+
}, {
|
|
125
|
+
/**
|
|
126
|
+
* Vertical alignment of content within the card.
|
|
127
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
128
|
+
*/
|
|
129
|
+
justify: {
|
|
130
|
+
start: string;
|
|
131
|
+
center: string;
|
|
132
|
+
end: string;
|
|
133
|
+
};
|
|
134
|
+
}>, {
|
|
135
|
+
/**
|
|
136
|
+
* Vertical alignment of content within the card.
|
|
137
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
138
|
+
*/
|
|
139
|
+
justify: {
|
|
140
|
+
start: string;
|
|
141
|
+
center: string;
|
|
142
|
+
end: string;
|
|
143
|
+
};
|
|
144
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
145
|
+
/**
|
|
146
|
+
* Vertical alignment of content within the card.
|
|
147
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
148
|
+
*/
|
|
149
|
+
justify: {
|
|
150
|
+
start: string;
|
|
151
|
+
center: string;
|
|
152
|
+
end: string;
|
|
153
|
+
};
|
|
154
|
+
}, undefined, "flex w-full flex-1 flex-col gap-spatial-card-large-gap p-spatial-card-large-padding", import('tailwind-variants/dist/config.js').TVConfig<{
|
|
155
|
+
/**
|
|
156
|
+
* Vertical alignment of content within the card.
|
|
157
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
158
|
+
*/
|
|
159
|
+
justify: {
|
|
160
|
+
start: string;
|
|
161
|
+
center: string;
|
|
162
|
+
end: string;
|
|
163
|
+
};
|
|
164
|
+
}, {
|
|
165
|
+
/**
|
|
166
|
+
* Vertical alignment of content within the card.
|
|
167
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
168
|
+
*/
|
|
169
|
+
justify: {
|
|
170
|
+
start: string;
|
|
171
|
+
center: string;
|
|
172
|
+
end: string;
|
|
173
|
+
};
|
|
174
|
+
}>, unknown, unknown, undefined>>;
|
|
175
|
+
export interface CardContentProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardContentVariants> {
|
|
67
176
|
}
|
|
68
177
|
/**
|
|
69
178
|
* Card content container with proper padding and spacing.
|
|
70
179
|
* Uses spatial card tokens for consistent sizing.
|
|
180
|
+
* For overlay layout, add `relative z-10` to ensure content sits above background.
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```tsx
|
|
184
|
+
* // Content at bottom of overlay card
|
|
185
|
+
* <Card layout="overlay">
|
|
186
|
+
* <Background.Image src="/hero.jpg" />
|
|
187
|
+
* <CardContent justify="end" className="relative z-10">
|
|
188
|
+
* <CardTitle>Title</CardTitle>
|
|
189
|
+
* </CardContent>
|
|
190
|
+
* </Card>
|
|
191
|
+
* ```
|
|
71
192
|
*/
|
|
72
193
|
declare const CardContent: React.ForwardRefExoticComponent<CardContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
194
|
+
declare const cardEyebrowVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "typography-caption-large text-text-muted", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "typography-caption-large text-text-muted", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
73
195
|
export interface CardEyebrowProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
74
196
|
}
|
|
75
197
|
/**
|
|
76
198
|
* Optional eyebrow text above the card title.
|
|
77
199
|
*/
|
|
78
200
|
declare const CardEyebrow: React.ForwardRefExoticComponent<CardEyebrowProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
201
|
+
declare const cardTitleVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "typography-subheading-small text-text-primary", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "typography-subheading-small text-text-primary", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
79
202
|
export interface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
80
203
|
/**
|
|
81
204
|
* The heading level to render (h1-h6). Defaults to h3.
|
|
@@ -86,12 +209,14 @@ export interface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement>
|
|
|
86
209
|
* Card title/heading. Use the `as` prop to change the heading level.
|
|
87
210
|
*/
|
|
88
211
|
declare const CardTitle: React.ForwardRefExoticComponent<CardTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
212
|
+
declare const cardDescriptionVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "typography-body-small text-text-secondary", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "typography-body-small text-text-secondary", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
89
213
|
export interface CardDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
90
214
|
}
|
|
91
215
|
/**
|
|
92
216
|
* Card body/description text.
|
|
93
217
|
*/
|
|
94
218
|
declare const CardDescription: React.ForwardRefExoticComponent<CardDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
219
|
+
declare const cardBodyVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "flex w-full flex-col gap-spatial-card-small-gap", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "flex w-full flex-col gap-spatial-card-small-gap", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
95
220
|
export interface CardBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
96
221
|
}
|
|
97
222
|
/**
|
|
@@ -99,6 +224,7 @@ export interface CardBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
99
224
|
* Uses spatial card tokens for consistent sizing.
|
|
100
225
|
*/
|
|
101
226
|
declare const CardBody: React.ForwardRefExoticComponent<CardBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
227
|
+
declare const cardActionsVariants: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "flex gap-spacing-12", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "flex gap-spacing-12", import('tailwind-variants/dist/config.js').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
102
228
|
export interface CardActionsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
103
229
|
}
|
|
104
230
|
/**
|
|
@@ -106,4 +232,4 @@ export interface CardActionsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
106
232
|
* Uses primitive spacing tokens.
|
|
107
233
|
*/
|
|
108
234
|
declare const CardActions: React.ForwardRefExoticComponent<CardActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
109
|
-
export { Card, cardVariants, CardImage, CardContent, CardEyebrow, CardTitle, CardDescription, CardBody, CardActions, };
|
|
235
|
+
export { Card, cardVariants, CardImage, cardImageVariants, CardContent, cardContentVariants, CardEyebrow, cardEyebrowVariants, CardTitle, cardTitleVariants, CardDescription, cardDescriptionVariants, CardBody, cardBodyVariants, CardActions, cardActionsVariants, };
|
|
@@ -1,5 +1,110 @@
|
|
|
1
|
+
import { VariantProps } from 'tailwind-variants';
|
|
1
2
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
+
declare const usGovBannerVariants: import('tailwind-variants').TVReturnType<{
|
|
4
|
+
variant: {
|
|
5
|
+
default: {
|
|
6
|
+
root: string;
|
|
7
|
+
content: string;
|
|
8
|
+
text: string;
|
|
9
|
+
};
|
|
10
|
+
inverted: {
|
|
11
|
+
root: string;
|
|
12
|
+
content: string;
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
root: string;
|
|
18
|
+
content: string;
|
|
19
|
+
text: string;
|
|
20
|
+
}, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
|
|
21
|
+
variant: {
|
|
22
|
+
default: {
|
|
23
|
+
root: string;
|
|
24
|
+
content: string;
|
|
25
|
+
text: string;
|
|
26
|
+
};
|
|
27
|
+
inverted: {
|
|
28
|
+
root: string;
|
|
29
|
+
content: string;
|
|
30
|
+
text: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
}, {
|
|
34
|
+
variant: {
|
|
35
|
+
default: {
|
|
36
|
+
root: string;
|
|
37
|
+
content: string;
|
|
38
|
+
text: string;
|
|
39
|
+
};
|
|
40
|
+
inverted: {
|
|
41
|
+
root: string;
|
|
42
|
+
content: string;
|
|
43
|
+
text: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
}>, {
|
|
47
|
+
variant: {
|
|
48
|
+
default: {
|
|
49
|
+
root: string;
|
|
50
|
+
content: string;
|
|
51
|
+
text: string;
|
|
52
|
+
};
|
|
53
|
+
inverted: {
|
|
54
|
+
root: string;
|
|
55
|
+
content: string;
|
|
56
|
+
text: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
}, {
|
|
60
|
+
root: string;
|
|
61
|
+
content: string;
|
|
62
|
+
text: string;
|
|
63
|
+
}, import('tailwind-variants').TVReturnType<{
|
|
64
|
+
variant: {
|
|
65
|
+
default: {
|
|
66
|
+
root: string;
|
|
67
|
+
content: string;
|
|
68
|
+
text: string;
|
|
69
|
+
};
|
|
70
|
+
inverted: {
|
|
71
|
+
root: string;
|
|
72
|
+
content: string;
|
|
73
|
+
text: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
}, {
|
|
77
|
+
root: string;
|
|
78
|
+
content: string;
|
|
79
|
+
text: string;
|
|
80
|
+
}, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
|
|
81
|
+
variant: {
|
|
82
|
+
default: {
|
|
83
|
+
root: string;
|
|
84
|
+
content: string;
|
|
85
|
+
text: string;
|
|
86
|
+
};
|
|
87
|
+
inverted: {
|
|
88
|
+
root: string;
|
|
89
|
+
content: string;
|
|
90
|
+
text: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
}, {
|
|
94
|
+
variant: {
|
|
95
|
+
default: {
|
|
96
|
+
root: string;
|
|
97
|
+
content: string;
|
|
98
|
+
text: string;
|
|
99
|
+
};
|
|
100
|
+
inverted: {
|
|
101
|
+
root: string;
|
|
102
|
+
content: string;
|
|
103
|
+
text: string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
}>, unknown, unknown, undefined>>;
|
|
107
|
+
export interface USGovBannerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof usGovBannerVariants> {
|
|
3
108
|
/**
|
|
4
109
|
* Custom flag icon element. Defaults to a US flag SVG.
|
|
5
110
|
*/
|
|
@@ -14,6 +119,19 @@ export interface USGovBannerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
14
119
|
* US Government official website banner.
|
|
15
120
|
* Displays the official government website notice with flag icon.
|
|
16
121
|
* Commonly placed at the very top of government websites.
|
|
122
|
+
*
|
|
123
|
+
* Variants:
|
|
124
|
+
* - default: Light background with dark text (for light pages)
|
|
125
|
+
* - inverted: Transparent background with white text/flag (for dark backgrounds/heroes)
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```tsx
|
|
129
|
+
* // Default (light)
|
|
130
|
+
* <USGovBanner />
|
|
131
|
+
*
|
|
132
|
+
* // Inverted (for dark backgrounds)
|
|
133
|
+
* <USGovBanner variant="inverted" />
|
|
134
|
+
* ```
|
|
17
135
|
*/
|
|
18
136
|
declare const USGovBanner: React.ForwardRefExoticComponent<USGovBannerProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
export { USGovBanner };
|
|
137
|
+
export { USGovBanner, usGovBannerVariants };
|