@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,330 +0,0 @@
1
- /**
2
- * Component-level theming interface
3
- *
4
- * This interface defines all the customizable design tokens that can be
5
- * overridden at the component level. Components accepting a `theme` prop
6
- * will apply these values as CSS custom properties, allowing fine-grained
7
- * control over appearance without creating new variants.
8
- *
9
- * All values use primitive token names (e.g., "gray-100", "spacing-40")
10
- * which are converted to CSS variable references internally.
11
- */
12
- /**
13
- * Color token names - maps to `--color-{name}` CSS variables
14
- * @example "gray-100", "ember-v300", "alpha-black-10"
15
- */
16
- export type ColorToken = "gray-50" | "gray-100" | "gray-200" | "gray-300" | "gray-400" | "gray-500" | "gray-600" | "gray-700" | "gray-800" | "gray-900" | "gray-1000" | "gray-1100" | "gray-1200" | "steel-50" | "steel-100" | "steel-200" | "steel-300" | "steel-400" | "steel-500" | "steel-600" | "steel-700" | "steel-800" | "steel-900" | "steel-1000" | "steel-1100" | "steel-1200" | "brown-50" | "brown-100" | "brown-200" | "brown-300" | "brown-400" | "brown-500" | "brown-600" | "brown-700" | "brown-800" | "brown-900" | "brown-1000" | "brown-1100" | "brown-1200" | "ember-50" | "ember-100" | "ember-200" | "ember-300" | "ember-400" | "ember-500" | "ember-600" | "ember-700" | "ember-800" | "ember-900" | "ember-v100" | "ember-v200" | "ember-v300" | "ember-v400" | "orange-50" | "orange-100" | "orange-200" | "orange-300" | "orange-400" | "orange-500" | "orange-600" | "orange-700" | "orange-800" | "orange-900" | "orange-v100" | "orange-v200" | "orange-v300" | "orange-v400" | "amber-50" | "amber-100" | "amber-200" | "amber-300" | "amber-400" | "amber-500" | "amber-600" | "amber-700" | "amber-800" | "amber-900" | "amber-v100" | "amber-v200" | "amber-v300" | "amber-v400" | "yellow-50" | "yellow-100" | "yellow-200" | "yellow-300" | "yellow-400" | "yellow-500" | "yellow-600" | "yellow-700" | "yellow-800" | "yellow-900" | "yellow-v100" | "yellow-v200" | "yellow-v300" | "yellow-v400" | "lime-50" | "lime-100" | "lime-200" | "lime-300" | "lime-400" | "lime-500" | "lime-600" | "lime-700" | "lime-800" | "lime-900" | "lime-v100" | "lime-v200" | "lime-v300" | "lime-v400" | "green-50" | "green-100" | "green-200" | "green-300" | "green-400" | "green-500" | "green-600" | "green-700" | "green-800" | "green-900" | "green-v100" | "green-v200" | "green-v300" | "green-v400" | "sage-50" | "sage-100" | "sage-200" | "sage-300" | "sage-400" | "sage-500" | "sage-600" | "sage-700" | "sage-800" | "sage-900" | "sage-v100" | "sage-v200" | "sage-v300" | "sage-v400" | "teal-50" | "teal-100" | "teal-200" | "teal-300" | "teal-400" | "teal-500" | "teal-600" | "teal-700" | "teal-800" | "teal-900" | "teal-v100" | "teal-v200" | "teal-v300" | "teal-v400" | "cyan-50" | "cyan-100" | "cyan-200" | "cyan-300" | "cyan-400" | "cyan-500" | "cyan-600" | "cyan-700" | "cyan-800" | "cyan-900" | "cyan-v100" | "cyan-v200" | "cyan-v300" | "cyan-v400" | "ice-50" | "ice-100" | "ice-200" | "ice-300" | "ice-400" | "ice-500" | "ice-600" | "ice-700" | "ice-800" | "ice-900" | "ice-v100" | "ice-v200" | "ice-v300" | "ice-v400" | "blue-50" | "blue-100" | "blue-200" | "blue-300" | "blue-400" | "blue-500" | "blue-600" | "blue-700" | "blue-800" | "blue-900" | "blue-v100" | "blue-v200" | "blue-v300" | "blue-v400" | "indigo-50" | "indigo-100" | "indigo-200" | "indigo-300" | "indigo-400" | "indigo-500" | "indigo-600" | "indigo-700" | "indigo-800" | "indigo-900" | "indigo-v100" | "indigo-v200" | "indigo-v300" | "indigo-v400" | "iris-50" | "iris-100" | "iris-200" | "iris-300" | "iris-400" | "iris-500" | "iris-600" | "iris-700" | "iris-800" | "iris-900" | "iris-v100" | "iris-v200" | "iris-v300" | "iris-v400" | "purple-50" | "purple-100" | "purple-200" | "purple-300" | "purple-400" | "purple-500" | "purple-600" | "purple-700" | "purple-800" | "purple-900" | "purple-v100" | "purple-v200" | "purple-v300" | "purple-v400" | "pink-50" | "pink-100" | "pink-200" | "pink-300" | "pink-400" | "pink-500" | "pink-600" | "pink-700" | "pink-800" | "pink-900" | "pink-v100" | "pink-v200" | "pink-v300" | "pink-v400" | "red-50" | "red-100" | "red-200" | "red-300" | "red-400" | "red-500" | "red-600" | "red-700" | "red-800" | "red-900" | "red-v100" | "red-v200" | "red-v300" | "red-v400" | "alpha-black-5" | "alpha-black-10" | "alpha-black-20" | "alpha-black-30" | "alpha-black-40" | "alpha-black-50" | "alpha-black-60" | "alpha-black-70" | "alpha-black-80" | "alpha-black-90" | "alpha-black-95" | "alpha-white-5" | "alpha-white-10" | "alpha-white-20" | "alpha-white-30" | "alpha-white-40" | "alpha-white-50" | "alpha-white-60" | "alpha-white-70" | "alpha-white-80" | "alpha-white-90" | "alpha-white-95" | "white" | "black";
17
- /**
18
- * Spacing token names - maps to `--spacing-{name}` CSS variables
19
- * @example "spacing-40", "spacing-72"
20
- */
21
- export type SpacingToken = "spacing-0" | "spacing-2" | "spacing-4" | "spacing-6" | "spacing-8" | "spacing-10" | "spacing-11" | "spacing-12" | "spacing-16" | "spacing-20" | "spacing-24" | "spacing-28" | "spacing-32" | "spacing-36" | "spacing-40" | "spacing-48" | "spacing-56" | "spacing-64" | "spacing-72" | "spacing-80" | "spacing-96" | "spacing-112" | "spacing-128" | "spacing-144" | "spacing-160" | "spacing-176" | "spacing-192" | "spacing-208" | "spacing-224" | "spacing-240" | "spacing-256" | "spacing-288" | "spacing-320" | "spacing-352" | "spacing-384" | "spacing-400";
22
- /**
23
- * Radius token names - maps to `--radii-{name}` CSS variables
24
- * @example "radii-4", "radii-6"
25
- */
26
- export type RadiusToken = "radii-0" | "radii-2" | "radii-4" | "radii-6" | "radii-8" | "radii-10" | "radii-11" | "radii-12" | "radii-16" | "radii-20" | "radii-24" | "radii-28" | "radii-32" | "radii-36" | "radii-40" | "radii-48" | "radii-56" | "radii-64" | "radii-72" | "radii-80" | "radii-96" | "radii-112" | "radii-128" | "radii-144" | "radii-160" | "radii-176" | "radii-192" | "radii-208" | "radii-224" | "radii-240" | "radii-256" | "radii-288" | "radii-320" | "radii-352" | "radii-384" | "radii-400";
27
- /**
28
- * Font size token values - primitive font sizes available in the design system
29
- * These correspond to Tailwind classes like `text-64`, `text-128`, etc.
30
- * @example 64, 128, 192
31
- */
32
- export type FontSizeToken = 9 | 11 | 12 | 14 | 16 | 18 | 21 | 24 | 28 | 32 | 36 | 42 | 48 | 56 | 64 | 72 | 84 | 88 | 96 | 112 | 128 | 148 | 168 | 192 | 224 | 256 | 280;
33
- /**
34
- * Array of all available font sizes for use in UI selectors/dropdowns
35
- */
36
- export declare const FONT_SIZES: FontSizeToken[];
37
- /**
38
- * Helper to generate typography class string from font size
39
- * @example fontSizeToClass(128) => "text-128 leading-128 tracking-128"
40
- */
41
- export declare function fontSizeToClass(size: FontSizeToken): string;
42
- /**
43
- * Helper to generate responsive typography class string
44
- * @example responsiveTypographyClass(64, 128, 192) => "text-64 leading-64 tracking-64 md:text-128 md:leading-128 md:tracking-128 xl:text-192 xl:leading-192 xl:tracking-192"
45
- */
46
- export declare function responsiveTypographyClass(mobile: FontSizeToken, tablet: FontSizeToken, desktop: FontSizeToken): string;
47
- export interface ComponentThemeColors {
48
- /**
49
- * Background color for sections
50
- * @example "gray-100"
51
- */
52
- bgSection?: ColorToken;
53
- /**
54
- * Background color for cards
55
- * @example "white"
56
- */
57
- cardBackground?: ColorToken;
58
- /**
59
- * Muted background color
60
- * @example "gray-50"
61
- */
62
- bgMuted?: ColorToken;
63
- /**
64
- * Primary text color
65
- * @example "gray-1100"
66
- */
67
- textPrimary?: ColorToken;
68
- /**
69
- * Secondary text color
70
- * @example "gray-800"
71
- */
72
- textSecondary?: ColorToken;
73
- /**
74
- * Muted text color
75
- * @example "gray-600"
76
- */
77
- textMuted?: ColorToken;
78
- /**
79
- * Inverted text color (for dark backgrounds)
80
- * @example "gray-100"
81
- */
82
- textInverted?: ColorToken;
83
- /**
84
- * Link text color
85
- * @example "gray-1100"
86
- */
87
- textLink?: ColorToken;
88
- /**
89
- * Link hover text color
90
- * @example "gray-700"
91
- */
92
- textLinkHover?: ColorToken;
93
- /**
94
- * Brand accent color
95
- * @example "ember-v300"
96
- */
97
- accentBrand?: ColorToken;
98
- /**
99
- * Soft brand accent color
100
- * @example "ember-100"
101
- */
102
- accentBrandSoft?: ColorToken;
103
- /**
104
- * Subtle border color
105
- * @example "alpha-black-10"
106
- */
107
- borderSubtle?: ColorToken;
108
- /**
109
- * Strong border color
110
- * @example "alpha-black-20"
111
- */
112
- borderStrong?: ColorToken;
113
- /**
114
- * Focus border color (uses accentBrand by default)
115
- * @example "ember-v300"
116
- */
117
- borderFocus?: ColorToken;
118
- /**
119
- * Divider border color
120
- * @example "alpha-black-10"
121
- */
122
- borderDivider?: ColorToken;
123
- /**
124
- * Primary button background color
125
- * @example "gray-1100"
126
- */
127
- buttonPrimaryBg?: ColorToken;
128
- /**
129
- * Primary button hover background color
130
- * @example "gray-600"
131
- */
132
- buttonPrimaryBgHover?: ColorToken;
133
- /**
134
- * Secondary button background color
135
- * @example "white"
136
- */
137
- buttonSecondaryBg?: ColorToken;
138
- /**
139
- * Secondary button hover background color
140
- * @example "gray-100"
141
- */
142
- buttonSecondaryBgHover?: ColorToken;
143
- }
144
- export interface ComponentThemeSpatial {
145
- /**
146
- * Grid margin for large breakpoint
147
- * @example "spacing-72"
148
- */
149
- gridLargeMargin?: SpacingToken;
150
- /**
151
- * Grid gutter for large breakpoint
152
- * @example "spacing-24"
153
- */
154
- gridLargeGutter?: SpacingToken;
155
- /**
156
- * Number of grid columns for large breakpoint
157
- */
158
- gridLargeColumns?: number;
159
- /**
160
- * Grid margin for medium breakpoint
161
- * @example "spacing-56"
162
- */
163
- gridMediumMargin?: SpacingToken;
164
- /**
165
- * Grid gutter for medium breakpoint
166
- * @example "spacing-20"
167
- */
168
- gridMediumGutter?: SpacingToken;
169
- /**
170
- * Number of grid columns for medium breakpoint
171
- */
172
- gridMediumColumns?: number;
173
- /**
174
- * Grid margin for small breakpoint
175
- * @example "spacing-24"
176
- */
177
- gridSmallMargin?: SpacingToken;
178
- /**
179
- * Grid gutter for small breakpoint
180
- * @example "spacing-12"
181
- */
182
- gridSmallGutter?: SpacingToken;
183
- /**
184
- * Number of grid columns for small breakpoint
185
- */
186
- gridSmallColumns?: number;
187
- /**
188
- * Section gap for large breakpoint
189
- * @example "spacing-64"
190
- */
191
- sectionLargeGap?: SpacingToken;
192
- /**
193
- * Section padding for large breakpoint
194
- * @example "spacing-128"
195
- */
196
- sectionLargePadding?: SpacingToken;
197
- /**
198
- * Section gap for medium breakpoint
199
- * @example "spacing-56"
200
- */
201
- sectionMediumGap?: SpacingToken;
202
- /**
203
- * Section padding for medium breakpoint
204
- * @example "spacing-96"
205
- */
206
- sectionMediumPadding?: SpacingToken;
207
- /**
208
- * Section gap for small breakpoint
209
- * @example "spacing-32"
210
- */
211
- sectionSmallGap?: SpacingToken;
212
- /**
213
- * Section padding for small breakpoint
214
- * @example "spacing-64"
215
- */
216
- sectionSmallPadding?: SpacingToken;
217
- /**
218
- * Card gap for large size
219
- * @example "spacing-10"
220
- */
221
- cardLargeGap?: SpacingToken;
222
- /**
223
- * Card padding for large size
224
- * @example "spacing-24"
225
- */
226
- cardLargePadding?: SpacingToken;
227
- /**
228
- * Card gap for small size
229
- * @example "spacing-12"
230
- */
231
- cardSmallGap?: SpacingToken;
232
- /**
233
- * Card padding for small size
234
- * @example "spacing-16"
235
- */
236
- cardSmallPadding?: SpacingToken;
237
- }
238
- export interface ComponentThemeSurface {
239
- /**
240
- * Card border radius
241
- * @example "radii-4"
242
- */
243
- cardRadius?: RadiusToken;
244
- /**
245
- * Card stroke/border width in pixels
246
- * @example 1
247
- */
248
- cardStroke?: number;
249
- /**
250
- * Button border radius
251
- * @example "radii-6"
252
- */
253
- buttonRadius?: RadiusToken;
254
- /**
255
- * Button stroke/border weight in pixels
256
- * @example 1
257
- */
258
- buttonStrokeWeight?: number;
259
- }
260
- /**
261
- * Complete component theme interface combining colors, spatial, and surface tokens.
262
- *
263
- * @example
264
- * ```tsx
265
- * const customTheme: ComponentTheme = {
266
- * colors: {
267
- * textPrimary: "gray-100",
268
- * accentBrand: "ember-500",
269
- * },
270
- * spatial: {
271
- * sectionLargePadding: "spacing-96",
272
- * },
273
- * surface: {
274
- * cardRadius: "radii-8",
275
- * },
276
- * };
277
- *
278
- * <Tout theme={customTheme} ... />
279
- * ```
280
- */
281
- export interface ComponentTheme {
282
- colors?: ComponentThemeColors;
283
- spatial?: ComponentThemeSpatial;
284
- surface?: ComponentThemeSurface;
285
- }
286
- /**
287
- * Button-specific theme interface for customizing individual button appearance.
288
- *
289
- * @example
290
- * ```tsx
291
- * const buttonTheme: ButtonTheme = {
292
- * bg: "ember-500",
293
- * bgHover: "ember-600",
294
- * text: "white",
295
- * radius: "radii-8",
296
- * };
297
- *
298
- * <Button theme={buttonTheme}>Themed Button</Button>
299
- * ```
300
- */
301
- export interface ButtonTheme {
302
- /** Background color */
303
- bg?: ColorToken;
304
- /** Background color on hover */
305
- bgHover?: ColorToken;
306
- /** Background color on active/press */
307
- bgActive?: ColorToken;
308
- /** Text color */
309
- text?: ColorToken;
310
- /** Border color (if using border) */
311
- borderColor?: ColorToken;
312
- /** Border width in pixels (0 for no border) */
313
- borderWidth?: number;
314
- /** Border radius */
315
- radius?: RadiusToken;
316
- }
317
- /**
318
- * Converts a ComponentTheme object to CSS custom properties (inline style object)
319
- *
320
- * @param theme - The theme object to convert
321
- * @returns An object suitable for use as React inline styles
322
- */
323
- export declare function themeToStyleVars(theme: ComponentTheme | undefined): React.CSSProperties;
324
- /**
325
- * Converts a ButtonTheme object to CSS custom properties (inline style object)
326
- *
327
- * @param theme - The button theme object to convert
328
- * @returns An object suitable for use as React inline styles
329
- */
330
- export declare function buttonThemeToStyleVars(theme: ButtonTheme | undefined): React.CSSProperties;
@@ -1 +0,0 @@
1
- export { cnBase as cn } from 'tailwind-variants';