@nationaldesignstudio/react 0.5.0 → 0.5.2

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.
Files changed (41) hide show
  1. package/dist/index.d.ts +3617 -51
  2. package/dist/index.js +3368 -14973
  3. package/dist/index.js.map +1 -1
  4. package/dist/tailwind.css +0 -10
  5. package/package.json +3 -2
  6. package/src/components/atoms/popover/popover.tsx +1 -1
  7. package/src/components/atoms/tooltip/tooltip.tsx +1 -1
  8. package/dist/assets/fonts/PPNeueMontreal-Variable.woff2 +0 -0
  9. package/dist/assets/react.svg +0 -1
  10. package/dist/components/atoms/accordion/accordion.d.ts +0 -91
  11. package/dist/components/atoms/background/background.d.ts +0 -144
  12. package/dist/components/atoms/button/button.d.ts +0 -148
  13. package/dist/components/atoms/button/button.figma.d.ts +0 -1
  14. package/dist/components/atoms/button/icon-button.d.ts +0 -172
  15. package/dist/components/atoms/input/input-group.d.ts +0 -278
  16. package/dist/components/atoms/input/input.d.ts +0 -121
  17. package/dist/components/atoms/ndstudio-footer/ndstudio-footer.d.ts +0 -30
  18. package/dist/components/atoms/pager-control/pager-control.d.ts +0 -169
  19. package/dist/components/atoms/popover/popover.d.ts +0 -195
  20. package/dist/components/atoms/select/select.d.ts +0 -131
  21. package/dist/components/atoms/tooltip/tooltip.d.ts +0 -161
  22. package/dist/components/dev-tools/dev-toolbar/dev-toolbar.d.ts +0 -4
  23. package/dist/components/dev-tools/grid-overlay/grid-overlay.d.ts +0 -6
  24. package/dist/components/organisms/card/card.d.ts +0 -235
  25. package/dist/components/organisms/navbar/navbar.d.ts +0 -66
  26. package/dist/components/organisms/us-gov-banner/us-gov-banner.d.ts +0 -137
  27. package/dist/components/sections/banner/banner.d.ts +0 -97
  28. package/dist/components/sections/card-grid/card-grid.d.ts +0 -86
  29. package/dist/components/sections/faq-section/faq-section.d.ts +0 -44
  30. package/dist/components/sections/hero/hero.d.ts +0 -337
  31. package/dist/components/sections/prose/prose.d.ts +0 -37
  32. package/dist/components/sections/quote-block/quote-block.d.ts +0 -152
  33. package/dist/components/sections/river/river.d.ts +0 -96
  34. package/dist/components/sections/tout/tout.d.ts +0 -153
  35. package/dist/components/sections/two-column-section/two-column-section.d.ts +0 -118
  36. package/dist/components/shared/floating-arrow.d.ts +0 -34
  37. package/dist/hooks/index.d.ts +0 -1
  38. package/dist/hooks/use-event-listener.d.ts +0 -24
  39. package/dist/lib/form-control.d.ts +0 -106
  40. package/dist/lib/theme.d.ts +0 -330
  41. package/dist/lib/utils.d.ts +0 -1
@@ -1,337 +0,0 @@
1
- import { VariantProps } from 'tailwind-variants';
2
- import { ComponentTheme } from '../../../lib/theme';
3
- import * as React from "react";
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
- declare const DEFAULT_TITLE_TYPOGRAPHY = "typography-h1-display";
6
- declare const heroVariants: import('tailwind-variants').TVReturnType<{
7
- variant: {
8
- A1: {
9
- root: string;
10
- content: string[];
11
- };
12
- A2: {
13
- root: string;
14
- content: string[];
15
- };
16
- A3: {
17
- root: string;
18
- content: string[];
19
- };
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
- };
36
- }, {
37
- root: string;
38
- top: string;
39
- content: string[];
40
- title: string;
41
- }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
42
- variant: {
43
- A1: {
44
- root: string;
45
- content: string[];
46
- };
47
- A2: {
48
- root: string;
49
- content: string[];
50
- };
51
- A3: {
52
- root: string;
53
- content: string[];
54
- };
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
- };
71
- }, {
72
- variant: {
73
- A1: {
74
- root: string;
75
- content: string[];
76
- };
77
- A2: {
78
- root: string;
79
- content: string[];
80
- };
81
- A3: {
82
- root: string;
83
- content: string[];
84
- };
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
- };
101
- }>, {
102
- variant: {
103
- A1: {
104
- root: string;
105
- content: string[];
106
- };
107
- A2: {
108
- root: string;
109
- content: string[];
110
- };
111
- A3: {
112
- root: string;
113
- content: string[];
114
- };
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
- };
131
- }, {
132
- root: string;
133
- top: string;
134
- content: string[];
135
- title: string;
136
- }, import('tailwind-variants').TVReturnType<{
137
- variant: {
138
- A1: {
139
- root: string;
140
- content: string[];
141
- };
142
- A2: {
143
- root: string;
144
- content: string[];
145
- };
146
- A3: {
147
- root: string;
148
- content: string[];
149
- };
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
- };
166
- }, {
167
- root: string;
168
- top: string;
169
- content: string[];
170
- title: string;
171
- }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
172
- variant: {
173
- A1: {
174
- root: string;
175
- content: string[];
176
- };
177
- A2: {
178
- root: string;
179
- content: string[];
180
- };
181
- A3: {
182
- root: string;
183
- content: string[];
184
- };
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
- };
201
- }, {
202
- variant: {
203
- A1: {
204
- root: string;
205
- content: string[];
206
- };
207
- A2: {
208
- root: string;
209
- content: string[];
210
- };
211
- A3: {
212
- root: string;
213
- content: string[];
214
- };
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
- };
231
- }>, unknown, unknown, undefined>>;
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>>;
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>>;
234
- export interface HeroHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
235
- }
236
- /**
237
- * Header slot for Hero - used for navigation, gov banners, etc.
238
- * Full-width with no padding, sits at the top of the hero.
239
- */
240
- declare const HeroHeader: React.ForwardRefExoticComponent<HeroHeaderProps & React.RefAttributes<HTMLDivElement>>;
241
- export interface HeroContentProps extends React.HTMLAttributes<HTMLDivElement> {
242
- }
243
- /**
244
- * Content container for Hero - use for main content.
245
- * Has padding and sits above backgrounds with z-10.
246
- */
247
- declare const HeroContent: React.ForwardRefExoticComponent<HeroContentProps & React.RefAttributes<HTMLDivElement>>;
248
- export interface HeroProps extends Omit<React.HTMLAttributes<HTMLElement>, "title">, VariantProps<typeof heroVariants> {
249
- /**
250
- * The title text displayed in the hero.
251
- * If provided, renders an h1 with default typography.
252
- * Omit to use children for custom content composition.
253
- */
254
- title?: string;
255
- /**
256
- * Custom typography class for the title using primitive tokens.
257
- * Default: "typography-h1-display"
258
- */
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";
266
- /**
267
- * Content for the top slot (full-width, no padding).
268
- * Use for USGovBanner, Navigation, etc.
269
- */
270
- top?: React.ReactNode;
271
- /**
272
- * Background for the hero. Can be:
273
- * - A color string (hex, rgb, etc.) for solid backgrounds
274
- * - A ReactNode (use HeroBackground.Image, HeroBackground.Video, or HeroBackground.Stream)
275
- */
276
- background?: React.ReactNode | string;
277
- /**
278
- * Opacity of the overlay (0-1, default: 0)
279
- * Only applies when using a background slot
280
- */
281
- overlayOpacity?: number;
282
- /**
283
- * Color of the overlay (default: "black")
284
- */
285
- overlayColor?: string;
286
- /**
287
- * Border radius for the hero container
288
- * Useful for designs with rounded bottom corners
289
- */
290
- borderRadius?: string;
291
- /**
292
- * Theme overrides for component styling via CSS custom properties
293
- */
294
- theme?: ComponentTheme;
295
- }
296
- /**
297
- * Hero component for page headers with large display typography.
298
- *
299
- * Slots:
300
- * - `top`: Full-width slot at top for USGovBanner, Navigation (no padding)
301
- * - `children`: Main content slot with padding and alignment
302
- *
303
- * The `title` prop is a convenience for simple heroes - it renders an h1 with
304
- * responsive typography. Children are always rendered, so you can use both
305
- * or just children for full control.
306
- *
307
- * Variants:
308
- * - A1: Content at bottom (default)
309
- * - A2: Content at top
310
- * - A3: Content centered
311
- *
312
- * @example
313
- * ```tsx
314
- * // Simple - just title and background
315
- * <Hero title="Welcome" background="#1a1a1a" />
316
- *
317
- * // With top slot for banner/nav
318
- * <Hero
319
- * variant="A1"
320
- * background={<HeroBackground.Image src="/hero.jpg" />}
321
- * top={
322
- * <>
323
- * <USGovBanner variant="inverted" />
324
- * <Navigation />
325
- * </>
326
- * }
327
- * >
328
- * <h1>Board of Peace</h1>
329
- * <p>Subtitle goes here</p>
330
- * </Hero>
331
- * ```
332
- */
333
- declare const Hero: React.ForwardRefExoticComponent<HeroProps & React.RefAttributes<HTMLElement>> & {
334
- Header: typeof HeroHeader;
335
- Content: typeof HeroContent;
336
- };
337
- export { Hero, heroVariants, heroContentVariants, heroHeaderVariants, DEFAULT_TITLE_TYPOGRAPHY, HeroHeader, HeroContent, };
@@ -1,37 +0,0 @@
1
- import * as React from "react";
2
- export interface ProseProps extends React.HTMLAttributes<HTMLDivElement> {
3
- children: React.ReactNode;
4
- }
5
- /**
6
- * Prose container for long-form content with proper typography and spacing.
7
- *
8
- * Provides responsive spacing between content blocks:
9
- * - Desktop (1440px+): 96px gap
10
- * - Tablet (768px+): 72px gap
11
- * - Mobile: 56px gap
12
- *
13
- * Use with ProseSection components for proper content structure.
14
- */
15
- declare const Prose: React.ForwardRefExoticComponent<ProseProps & React.RefAttributes<HTMLDivElement>>;
16
- export interface ProseSectionProps extends React.HTMLAttributes<HTMLElement> {
17
- /**
18
- * The heading text for this section
19
- */
20
- heading: string;
21
- /**
22
- * The heading level to render (h2 or h3)
23
- * @default "h2"
24
- */
25
- as?: "h2" | "h3";
26
- children: React.ReactNode;
27
- }
28
- /**
29
- * A section within Prose content, containing a heading and body text.
30
- *
31
- * Responsive typography:
32
- * - h2: Uses typography-h3
33
- * - h3: Uses typography-h4
34
- * - Body: Uses typography-body-medium
35
- */
36
- declare const ProseSection: React.ForwardRefExoticComponent<ProseSectionProps & React.RefAttributes<HTMLElement>>;
37
- export { Prose, ProseSection };
@@ -1,152 +0,0 @@
1
- import { VariantProps } from 'tailwind-variants';
2
- import * as React from "react";
3
- declare const quoteBlockVariants: import('tailwind-variants').TVReturnType<{
4
- size: {
5
- default: {
6
- root: string;
7
- };
8
- compact: {
9
- root: string;
10
- };
11
- };
12
- }, {
13
- root: string;
14
- content: string[];
15
- quoteWrapper: string;
16
- quote: string[];
17
- openQuote: string[];
18
- attribution: string;
19
- signature: string;
20
- byline: string;
21
- bylineName: string;
22
- bylineTitle: string;
23
- }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
24
- size: {
25
- default: {
26
- root: string;
27
- };
28
- compact: {
29
- root: string;
30
- };
31
- };
32
- }, {
33
- size: {
34
- default: {
35
- root: string;
36
- };
37
- compact: {
38
- root: string;
39
- };
40
- };
41
- }>, {
42
- size: {
43
- default: {
44
- root: string;
45
- };
46
- compact: {
47
- root: string;
48
- };
49
- };
50
- }, {
51
- root: string;
52
- content: string[];
53
- quoteWrapper: string;
54
- quote: string[];
55
- openQuote: string[];
56
- attribution: string;
57
- signature: string;
58
- byline: string;
59
- bylineName: string;
60
- bylineTitle: string;
61
- }, import('tailwind-variants').TVReturnType<{
62
- size: {
63
- default: {
64
- root: string;
65
- };
66
- compact: {
67
- root: string;
68
- };
69
- };
70
- }, {
71
- root: string;
72
- content: string[];
73
- quoteWrapper: string;
74
- quote: string[];
75
- openQuote: string[];
76
- attribution: string;
77
- signature: string;
78
- byline: string;
79
- bylineName: string;
80
- bylineTitle: string;
81
- }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
82
- size: {
83
- default: {
84
- root: string;
85
- };
86
- compact: {
87
- root: string;
88
- };
89
- };
90
- }, {
91
- size: {
92
- default: {
93
- root: string;
94
- };
95
- compact: {
96
- root: string;
97
- };
98
- };
99
- }>, unknown, unknown, undefined>>;
100
- export interface QuoteBlockProps extends Omit<React.HTMLAttributes<HTMLElement>, "children">, VariantProps<typeof quoteBlockVariants> {
101
- /**
102
- * The quote text to display
103
- */
104
- quote: string;
105
- /**
106
- * Whether to show decorative quote marks
107
- * @default true
108
- */
109
- showQuoteMarks?: boolean;
110
- /**
111
- * Signature image URL (optional)
112
- */
113
- signatureImage?: string;
114
- /**
115
- * Alt text for signature image
116
- */
117
- signatureAlt?: string;
118
- /**
119
- * Attribution name (e.g., "Donald J. Trump")
120
- */
121
- attributionName?: string;
122
- /**
123
- * Attribution title (e.g., "45 & 47 President of the United States")
124
- */
125
- attributionTitle?: string;
126
- /**
127
- * Background element - use BackgroundImage or similar
128
- */
129
- background?: React.ReactNode;
130
- /**
131
- * Overlay opacity (0-1)
132
- */
133
- overlayOpacity?: number;
134
- /**
135
- * Overlay color
136
- */
137
- overlayColor?: string;
138
- /**
139
- * Custom class for the quote text
140
- */
141
- quoteClassName?: string;
142
- /**
143
- * Custom class for the byline name
144
- */
145
- bylineNameClassName?: string;
146
- /**
147
- * Custom class for the byline title
148
- */
149
- bylineTitleClassName?: string;
150
- }
151
- declare const QuoteBlock: React.ForwardRefExoticComponent<QuoteBlockProps & React.RefAttributes<HTMLElement>>;
152
- export { QuoteBlock, quoteBlockVariants };
@@ -1,96 +0,0 @@
1
- import { VariantProps } from 'tailwind-variants';
2
- import * as React from "react";
3
- /**
4
- * River component for content sections with text and media
5
- *
6
- * Variants:
7
- * - A: Text on left (9 cols), media on right (15 cols) on desktop
8
- * - B: Media on left (15 cols), text on right (9 cols) on desktop
9
- *
10
- * Uses the 24-column grid system. Must be placed inside a `grid-container`.
11
- */
12
- declare const riverVariants: import('tailwind-variants').TVReturnType<{
13
- variant: {
14
- A: string;
15
- B: string;
16
- };
17
- }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
18
- variant: {
19
- A: string;
20
- B: string;
21
- };
22
- }, {
23
- variant: {
24
- A: string;
25
- B: string;
26
- };
27
- }>, {
28
- variant: {
29
- A: string;
30
- B: string;
31
- };
32
- }, undefined, import('tailwind-variants').TVReturnType<{
33
- variant: {
34
- A: string;
35
- B: string;
36
- };
37
- }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
38
- variant: {
39
- A: string;
40
- B: string;
41
- };
42
- }, {
43
- variant: {
44
- A: string;
45
- B: string;
46
- };
47
- }>, unknown, unknown, undefined>>;
48
- export interface RiverProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof riverVariants> {
49
- /**
50
- * The headline text
51
- */
52
- headline: string;
53
- /**
54
- * The body text
55
- */
56
- body: string;
57
- /**
58
- * Primary action button (required)
59
- */
60
- primaryAction: React.ReactNode;
61
- /**
62
- * Secondary action button (optional)
63
- */
64
- secondaryAction?: React.ReactNode;
65
- /**
66
- * Media content (image, video, etc.)
67
- */
68
- media: React.ReactNode;
69
- }
70
- /**
71
- * River component for content sections with text and media.
72
- *
73
- * Uses the 24-column grid system - must be placed inside a `grid-container`.
74
- *
75
- * Layout:
76
- * - Mobile/Tablet: Stacked (text above media)
77
- * - Desktop (lg+):
78
- * - Variant A: Text (9 cols) | Media (15 cols)
79
- * - Variant B: Media (15 cols) | Text (9 cols)
80
- *
81
- * @example
82
- * ```tsx
83
- * <div className="grid-container">
84
- * <River
85
- * variant="A"
86
- * headline="Feature Headline"
87
- * body="Description of the feature..."
88
- * primaryAction={<Button>Primary</Button>}
89
- * secondaryAction={<Button variant="outline">Secondary</Button>}
90
- * media={<img src="..." alt="Feature" />}
91
- * />
92
- * </div>
93
- * ```
94
- */
95
- declare const River: React.ForwardRefExoticComponent<RiverProps & React.RefAttributes<HTMLElement>>;
96
- export { River, riverVariants };