@nationaldesignstudio/react 0.0.9 → 0.0.11

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 (170) hide show
  1. package/dist/component-registry.md +2405 -0
  2. package/dist/components/atoms/accordion/accordion.d.ts +44 -3
  3. package/dist/components/atoms/button/button.d.ts +155 -11
  4. package/dist/components/atoms/button/icon-button.d.ts +114 -5
  5. package/dist/components/atoms/ndstudio-footer/ndstudio-footer.d.ts +30 -0
  6. package/dist/components/atoms/pager-control/pager-control.d.ts +116 -9
  7. package/dist/components/dev-tools/dev-toolbar/dev-toolbar.d.ts +4 -0
  8. package/dist/components/dev-tools/grid-overlay/grid-overlay.d.ts +6 -0
  9. package/dist/components/organisms/card/card.d.ts +40 -4
  10. package/dist/components/sections/banner/banner.d.ts +39 -6
  11. package/dist/components/sections/card-grid/card-grid.d.ts +37 -4
  12. package/dist/components/sections/faq-section/faq-section.d.ts +2 -2
  13. package/dist/components/sections/hero/hero.d.ts +167 -16
  14. package/dist/components/sections/river/river.d.ts +37 -4
  15. package/dist/components/sections/tout/tout.d.ts +86 -6
  16. package/dist/components/sections/two-column-section/two-column-section.d.ts +80 -6
  17. package/dist/hooks/index.d.ts +1 -0
  18. package/dist/hooks/use-event-listener.d.ts +24 -0
  19. package/dist/index.d.ts +9 -2
  20. package/dist/index.js +12034 -5934
  21. package/dist/index.js.map +1 -1
  22. package/dist/lib/theme.d.ts +330 -0
  23. package/dist/tailwind.css +1 -15
  24. package/dist/tokens.css +13057 -6852
  25. package/package.json +12 -23
  26. package/src/App.css +0 -0
  27. package/src/App.tsx +0 -7
  28. package/src/assets/fonts/PPNeueMontreal-Variable.woff2 +0 -0
  29. package/src/assets/react.svg +0 -1
  30. package/src/components/atoms/accordion/accordion.stories.tsx +0 -228
  31. package/src/components/atoms/accordion/accordion.tsx +0 -137
  32. package/src/components/atoms/accordion/index.ts +0 -6
  33. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-chromium-darwin.png +0 -0
  34. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-chromium-linux.png +0 -0
  35. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-outline-chromium-darwin.png +0 -0
  36. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-outline-chromium-linux.png +0 -0
  37. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-outline-quiet-chromium-darwin.png +0 -0
  38. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-outline-quiet-chromium-linux.png +0 -0
  39. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-disabled-chromium-darwin.png +0 -0
  40. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-disabled-chromium-linux.png +0 -0
  41. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-chromium-darwin.png +0 -0
  42. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-chromium-linux.png +0 -0
  43. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-outline-chromium-darwin.png +0 -0
  44. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-outline-chromium-linux.png +0 -0
  45. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-outline-quiet-chromium-darwin.png +0 -0
  46. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-outline-quiet-chromium-linux.png +0 -0
  47. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-large-chromium-darwin.png +0 -0
  48. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-large-chromium-linux.png +0 -0
  49. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-medium-chromium-darwin.png +0 -0
  50. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-medium-chromium-linux.png +0 -0
  51. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-small-chromium-darwin.png +0 -0
  52. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-small-chromium-linux.png +0 -0
  53. package/src/components/atoms/button/button.stories.tsx +0 -84
  54. package/src/components/atoms/button/button.test.tsx +0 -141
  55. package/src/components/atoms/button/button.tsx +0 -95
  56. package/src/components/atoms/button/button.visual.test.tsx +0 -102
  57. package/src/components/atoms/button/icon-button.stories.tsx +0 -166
  58. package/src/components/atoms/button/icon-button.tsx +0 -125
  59. package/src/components/atoms/button/index.ts +0 -6
  60. package/src/components/atoms/pager-control/index.ts +0 -5
  61. package/src/components/atoms/pager-control/pager-control.stories.tsx +0 -209
  62. package/src/components/atoms/pager-control/pager-control.test.tsx +0 -149
  63. package/src/components/atoms/pager-control/pager-control.tsx +0 -328
  64. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-default-vertical-chromium-darwin.png +0 -0
  65. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-default-vertical-chromium-linux.png +0 -0
  66. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-horizontal-chromium-darwin.png +0 -0
  67. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-horizontal-chromium-linux.png +0 -0
  68. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-minimal-chromium-darwin.png +0 -0
  69. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-minimal-chromium-linux.png +0 -0
  70. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-actions-chromium-darwin.png +0 -0
  71. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-actions-chromium-linux.png +0 -0
  72. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-eyebrow-chromium-darwin.png +0 -0
  73. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-eyebrow-chromium-linux.png +0 -0
  74. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-image-chromium-darwin.png +0 -0
  75. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-image-chromium-linux.png +0 -0
  76. package/src/components/organisms/card/card.stories.tsx +0 -293
  77. package/src/components/organisms/card/card.test.tsx +0 -245
  78. package/src/components/organisms/card/card.tsx +0 -227
  79. package/src/components/organisms/card/card.visual.test.tsx +0 -197
  80. package/src/components/organisms/card/index.ts +0 -19
  81. package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-active-link-chromium-darwin.png +0 -0
  82. package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-active-link-chromium-linux.png +0 -0
  83. package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-brand-only-chromium-darwin.png +0 -0
  84. package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-brand-only-chromium-linux.png +0 -0
  85. package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-default-chromium-darwin.png +0 -0
  86. package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-default-chromium-linux.png +0 -0
  87. package/src/components/organisms/navbar/index.ts +0 -18
  88. package/src/components/organisms/navbar/navbar.stories.tsx +0 -313
  89. package/src/components/organisms/navbar/navbar.test.tsx +0 -190
  90. package/src/components/organisms/navbar/navbar.tsx +0 -317
  91. package/src/components/organisms/navbar/navbar.visual.test.tsx +0 -85
  92. package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-custom-icon-chromium-darwin.png +0 -0
  93. package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-custom-icon-chromium-linux.png +0 -0
  94. package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-custom-text-chromium-darwin.png +0 -0
  95. package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-custom-text-chromium-linux.png +0 -0
  96. package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-default-chromium-darwin.png +0 -0
  97. package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-default-chromium-linux.png +0 -0
  98. package/src/components/organisms/us-gov-banner/index.ts +0 -1
  99. package/src/components/organisms/us-gov-banner/us-gov-banner.stories.tsx +0 -35
  100. package/src/components/organisms/us-gov-banner/us-gov-banner.test.tsx +0 -107
  101. package/src/components/organisms/us-gov-banner/us-gov-banner.tsx +0 -73
  102. package/src/components/organisms/us-gov-banner/us-gov-banner.visual.test.tsx +0 -46
  103. package/src/components/sections/banner/banner.stories.tsx +0 -150
  104. package/src/components/sections/banner/banner.test.tsx +0 -185
  105. package/src/components/sections/banner/banner.tsx +0 -130
  106. package/src/components/sections/banner/index.ts +0 -2
  107. package/src/components/sections/card-grid/card-grid.stories.tsx +0 -351
  108. package/src/components/sections/card-grid/card-grid.tsx +0 -118
  109. package/src/components/sections/card-grid/index.ts +0 -1
  110. package/src/components/sections/faq-section/faq-section.tsx +0 -77
  111. package/src/components/sections/faq-section/index.ts +0 -2
  112. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-desktop-chromium-darwin.png +0 -0
  113. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-desktop-chromium-linux.png +0 -0
  114. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-mobile-chromium-darwin.png +0 -0
  115. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-mobile-chromium-linux.png +0 -0
  116. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-tablet-chromium-darwin.png +0 -0
  117. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-tablet-chromium-linux.png +0 -0
  118. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-desktop-chromium-darwin.png +0 -0
  119. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-desktop-chromium-linux.png +0 -0
  120. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-mobile-chromium-darwin.png +0 -0
  121. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-mobile-chromium-linux.png +0 -0
  122. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-tablet-chromium-darwin.png +0 -0
  123. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-tablet-chromium-linux.png +0 -0
  124. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-desktop-chromium-darwin.png +0 -0
  125. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-desktop-chromium-linux.png +0 -0
  126. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-mobile-chromium-darwin.png +0 -0
  127. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-mobile-chromium-linux.png +0 -0
  128. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-tablet-chromium-darwin.png +0 -0
  129. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-tablet-chromium-linux.png +0 -0
  130. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-custom-class-chromium-darwin.png +0 -0
  131. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-custom-class-chromium-linux.png +0 -0
  132. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-default-chromium-linux.png +0 -0
  133. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-long-title-chromium-darwin.png +0 -0
  134. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-long-title-chromium-linux.png +0 -0
  135. package/src/components/sections/hero/hero.stories.tsx +0 -145
  136. package/src/components/sections/hero/hero.test.tsx +0 -135
  137. package/src/components/sections/hero/hero.tsx +0 -191
  138. package/src/components/sections/hero/hero.visual.test.tsx +0 -140
  139. package/src/components/sections/hero/index.ts +0 -1
  140. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-h3-heading-chromium-darwin.png +0 -0
  141. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-h3-heading-chromium-linux.png +0 -0
  142. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-multiple-paragraphs-chromium-darwin.png +0 -0
  143. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-multiple-paragraphs-chromium-linux.png +0 -0
  144. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-multiple-sections-chromium-darwin.png +0 -0
  145. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-multiple-sections-chromium-linux.png +0 -0
  146. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-single-section-chromium-darwin.png +0 -0
  147. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-single-section-chromium-linux.png +0 -0
  148. package/src/components/sections/prose/index.ts +0 -6
  149. package/src/components/sections/prose/prose.stories.tsx +0 -144
  150. package/src/components/sections/prose/prose.test.tsx +0 -178
  151. package/src/components/sections/prose/prose.tsx +0 -88
  152. package/src/components/sections/prose/prose.visual.test.tsx +0 -105
  153. package/src/components/sections/river/index.ts +0 -1
  154. package/src/components/sections/river/river.stories.tsx +0 -237
  155. package/src/components/sections/river/river.test.tsx +0 -268
  156. package/src/components/sections/river/river.tsx +0 -175
  157. package/src/components/sections/tout/index.ts +0 -1
  158. package/src/components/sections/tout/tout.stories.tsx +0 -154
  159. package/src/components/sections/tout/tout.test.tsx +0 -242
  160. package/src/components/sections/tout/tout.tsx +0 -206
  161. package/src/components/sections/two-column-section/index.ts +0 -5
  162. package/src/components/sections/two-column-section/two-column-section.stories.tsx +0 -285
  163. package/src/components/sections/two-column-section/two-column-section.tsx +0 -152
  164. package/src/index.ts +0 -98
  165. package/src/lib/utils.ts +0 -6
  166. package/src/main.tsx +0 -13
  167. package/src/stories/Introduction.mdx +0 -114
  168. package/src/stories/TokenShowcase.stories.tsx +0 -92
  169. package/src/stories/TokenShowcase.tsx +0 -1352
  170. package/src/styles.css +0 -11
@@ -1,4 +1,4 @@
1
- import { VariantProps } from 'class-variance-authority';
1
+ import { VariantProps } from 'tailwind-variants';
2
2
  import * as React from "react";
3
3
  /**
4
4
  * CardGrid component for displaying cards in a responsive grid layout
@@ -9,9 +9,42 @@ import * as React from "react";
9
9
  *
10
10
  * Uses the 24-column grid system with grid-container as root.
11
11
  */
12
- declare const cardGridVariants: (props?: ({
13
- variant?: "A" | "B" | null | undefined;
14
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
12
+ declare const cardGridVariants: 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>>;
15
48
  export interface CardGridProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof cardGridVariants> {
16
49
  /**
17
50
  * The title text displayed above the cards
@@ -1,4 +1,4 @@
1
- import { VariantProps } from 'class-variance-authority';
1
+ import { VariantProps } from 'tailwind-variants';
2
2
  import { twoColumnSectionVariants } from '../two-column-section/two-column-section';
3
3
  import * as React from "react";
4
4
  export interface FaqSectionProps extends Omit<React.HTMLAttributes<HTMLElement>, "title">, VariantProps<typeof twoColumnSectionVariants> {
@@ -35,7 +35,7 @@ export interface FaqSectionProps extends Omit<React.HTMLAttributes<HTMLElement>,
35
35
  * </FaqSection>
36
36
  *
37
37
  * // With custom title
38
- * <FaqSection title="Common Questions" theme="light">
38
+ * <FaqSection title="Common Questions" variant="light">
39
39
  * ...
40
40
  * </FaqSection>
41
41
  * ```
@@ -1,4 +1,5 @@
1
- import { VariantProps } from 'class-variance-authority';
1
+ import { VariantProps } from 'tailwind-variants';
2
+ import { ComponentTheme } from '../../../lib/theme';
2
3
  import * as React from "react";
3
4
  /**
4
5
  * Hero variants based on Figma BaseKit / Heros
@@ -13,24 +14,161 @@ import * as React from "react";
13
14
  * - md (Tablet): 650px height, 56px padding
14
15
  * - lg (Desktop): 700-850px height, 64-72px padding
15
16
  */
16
- declare const heroVariants: (props?: ({
17
- variant?: "A1" | "A2" | "A3" | null | undefined;
18
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
17
+ declare const heroVariants: import('tailwind-variants').TVReturnType<{
18
+ variant: {
19
+ A1: string[];
20
+ A2: string[];
21
+ A3: string[];
22
+ };
23
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
24
+ variant: {
25
+ A1: string[];
26
+ A2: string[];
27
+ A3: string[];
28
+ };
29
+ }, {
30
+ variant: {
31
+ A1: string[];
32
+ A2: string[];
33
+ A3: string[];
34
+ };
35
+ }>, {
36
+ variant: {
37
+ A1: string[];
38
+ A2: string[];
39
+ A3: string[];
40
+ };
41
+ }, undefined, import('tailwind-variants').TVReturnType<{
42
+ variant: {
43
+ A1: string[];
44
+ A2: string[];
45
+ A3: string[];
46
+ };
47
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
48
+ variant: {
49
+ A1: string[];
50
+ A2: string[];
51
+ A3: string[];
52
+ };
53
+ }, {
54
+ variant: {
55
+ A1: string[];
56
+ A2: string[];
57
+ A3: string[];
58
+ };
59
+ }>, unknown, unknown, undefined>>;
60
+ export interface HeroBackgroundImageProps extends React.HTMLAttributes<HTMLDivElement> {
61
+ /**
62
+ * URL for the background image
63
+ */
64
+ src: string;
65
+ /**
66
+ * CSS background-position value (default: "center")
67
+ */
68
+ position?: string;
69
+ /**
70
+ * Alt text for accessibility (used in aria-label)
71
+ */
72
+ alt?: string;
73
+ }
74
+ export interface HeroBackgroundVideoProps extends Omit<React.VideoHTMLAttributes<HTMLVideoElement>, "children"> {
75
+ /**
76
+ * URL for the video source
77
+ */
78
+ src: string;
79
+ /**
80
+ * Video MIME type (default: auto-detected from src)
81
+ */
82
+ type?: string;
83
+ /**
84
+ * Poster image URL shown before video loads
85
+ */
86
+ poster?: string;
87
+ }
88
+ export interface HeroBackgroundStreamProps extends React.IframeHTMLAttributes<HTMLIFrameElement> {
89
+ /**
90
+ * Cloudflare Stream video ID
91
+ */
92
+ videoId: string;
93
+ /**
94
+ * Poster image URL (Cloudflare Stream thumbnail or custom)
95
+ */
96
+ poster?: string;
97
+ /**
98
+ * Whether the video should autoplay (default: true)
99
+ */
100
+ autoplay?: boolean;
101
+ /**
102
+ * Whether the video should loop (default: true)
103
+ */
104
+ loop?: boolean;
105
+ /**
106
+ * Whether the video should be muted (default: true)
107
+ */
108
+ muted?: boolean;
109
+ /**
110
+ * Whether to show playback controls (default: false)
111
+ */
112
+ controls?: boolean;
113
+ /**
114
+ * Custom Cloudflare customer subdomain (if using custom domains)
115
+ */
116
+ customerSubdomain?: string;
117
+ }
118
+ /**
119
+ * Compound component for Hero backgrounds
120
+ *
121
+ * Provides sub-components for different background types:
122
+ * - `HeroBackground.Image` - Static image backgrounds
123
+ * - `HeroBackground.Video` - HTML5 video backgrounds
124
+ * - `HeroBackground.Stream` - Cloudflare Stream video backgrounds
125
+ *
126
+ * @example
127
+ * ```tsx
128
+ * // Image background
129
+ * <Hero
130
+ * title="Welcome"
131
+ * background={<HeroBackground.Image src="/hero.jpg" />}
132
+ * />
133
+ *
134
+ * // Video background
135
+ * <Hero
136
+ * title="Welcome"
137
+ * background={<HeroBackground.Video src="/hero.mp4" />}
138
+ * />
139
+ *
140
+ * // Cloudflare Stream background
141
+ * <Hero
142
+ * title="Welcome"
143
+ * background={<HeroBackground.Stream videoId="abc123" />}
144
+ * />
145
+ * ```
146
+ */
147
+ declare const HeroBackground: {
148
+ Image: React.ForwardRefExoticComponent<HeroBackgroundImageProps & React.RefAttributes<HTMLDivElement>>;
149
+ Video: React.ForwardRefExoticComponent<HeroBackgroundVideoProps & React.RefAttributes<HTMLVideoElement>>;
150
+ Stream: React.ForwardRefExoticComponent<HeroBackgroundStreamProps & React.RefAttributes<HTMLIFrameElement>>;
151
+ };
19
152
  export interface HeroProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof heroVariants> {
20
153
  /**
21
154
  * The title text displayed in the hero
22
155
  */
23
156
  title: string;
24
157
  /**
25
- * URL for the background image
158
+ * Custom typography class for the title using primitive tokens.
159
+ * Use primitive typography classes like "text-128 leading-128 tracking-128"
160
+ * Default: "text-64 leading-64 tracking-64 md:text-128 md:leading-128 md:tracking-128 xl:text-192 xl:leading-192 xl:tracking-192"
26
161
  */
27
- backgroundImage?: string;
162
+ titleClassName?: string;
28
163
  /**
29
- * URL for a background video (takes precedence over backgroundImage)
164
+ * Background for the hero. Can be:
165
+ * - A color string (hex, rgb, etc.) for solid backgrounds
166
+ * - A ReactNode (use HeroBackground.Image, HeroBackground.Video, or HeroBackground.Stream)
30
167
  */
31
- backgroundVideo?: string;
168
+ background?: React.ReactNode | string;
32
169
  /**
33
- * Opacity of the dark overlay (0-1, default: 0)
170
+ * Opacity of the overlay (0-1, default: 0)
171
+ * Only applies when using a background slot
34
172
  */
35
173
  overlayOpacity?: number;
36
174
  /**
@@ -38,9 +176,9 @@ export interface HeroProps extends React.HTMLAttributes<HTMLElement>, VariantPro
38
176
  */
39
177
  overlayColor?: string;
40
178
  /**
41
- * CSS background-position value (default: "center")
179
+ * Theme overrides for component styling via CSS custom properties
42
180
  */
43
- backgroundPosition?: string;
181
+ theme?: ComponentTheme;
44
182
  }
45
183
  /**
46
184
  * Hero component for page headers with large display typography.
@@ -57,17 +195,30 @@ export interface HeroProps extends React.HTMLAttributes<HTMLElement>, VariantPro
57
195
  *
58
196
  * @example
59
197
  * ```tsx
60
- * // Simple hero
61
- * <Hero title="Welcome" variant="A1" />
198
+ * // Simple hero with solid color
199
+ * <Hero title="Welcome" variant="A1" background="#1a1a1a" />
62
200
  *
63
- * // With background image and overlay
201
+ * // With background image
64
202
  * <Hero
65
203
  * title="Welcome"
66
204
  * variant="A1"
67
- * backgroundImage="/hero.jpg"
205
+ * background={<HeroBackground.Image src="/hero.jpg" />}
68
206
  * overlayOpacity={0.4}
69
207
  * />
208
+ *
209
+ * // With Cloudflare Stream video
210
+ * <Hero
211
+ * title="Welcome"
212
+ * variant="A1"
213
+ * background={<HeroBackground.Stream videoId="abc123" />}
214
+ * overlayOpacity={0.3}
215
+ * />
70
216
  * ```
71
217
  */
218
+ /**
219
+ * Default responsive typography for hero title using primitive tokens
220
+ * Mobile: 64px, Tablet: 128px, Desktop: 192px
221
+ */
222
+ declare const DEFAULT_TITLE_TYPOGRAPHY = "text-64 leading-64 tracking-64 md:text-128 md:leading-128 md:tracking-128 xl:text-192 xl:leading-192 xl:tracking-192 font-medium";
72
223
  declare const Hero: React.ForwardRefExoticComponent<HeroProps & React.RefAttributes<HTMLElement>>;
73
- export { Hero, heroVariants };
224
+ export { Hero, HeroBackground, heroVariants, DEFAULT_TITLE_TYPOGRAPHY };
@@ -1,4 +1,4 @@
1
- import { VariantProps } from 'class-variance-authority';
1
+ import { VariantProps } from 'tailwind-variants';
2
2
  import * as React from "react";
3
3
  /**
4
4
  * River component for content sections with text and media
@@ -9,9 +9,42 @@ import * as React from "react";
9
9
  *
10
10
  * Uses the 24-column grid system. Must be placed inside a `grid-container`.
11
11
  */
12
- declare const riverVariants: (props?: ({
13
- variant?: "A" | "B" | null | undefined;
14
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
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>>;
15
48
  export interface RiverProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof riverVariants> {
16
49
  /**
17
50
  * The headline text
@@ -1,10 +1,87 @@
1
+ import { VariantProps } from 'tailwind-variants';
2
+ import { ComponentTheme } from '../../../lib/theme';
1
3
  import * as React from "react";
4
+ /**
5
+ * Tout variants for background and content styling
6
+ */
7
+ declare const toutVariants: import('tailwind-variants').TVReturnType<{
8
+ variant: {
9
+ light: string;
10
+ dark: string;
11
+ };
12
+ align: {
13
+ left: string;
14
+ center: string;
15
+ };
16
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
17
+ variant: {
18
+ light: string;
19
+ dark: string;
20
+ };
21
+ align: {
22
+ left: string;
23
+ center: string;
24
+ };
25
+ }, {
26
+ variant: {
27
+ light: string;
28
+ dark: string;
29
+ };
30
+ align: {
31
+ left: string;
32
+ center: string;
33
+ };
34
+ }>, {
35
+ variant: {
36
+ light: string;
37
+ dark: string;
38
+ };
39
+ align: {
40
+ left: string;
41
+ center: string;
42
+ };
43
+ }, undefined, import('tailwind-variants').TVReturnType<{
44
+ variant: {
45
+ light: string;
46
+ dark: string;
47
+ };
48
+ align: {
49
+ left: string;
50
+ center: string;
51
+ };
52
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
53
+ variant: {
54
+ light: string;
55
+ dark: string;
56
+ };
57
+ align: {
58
+ left: string;
59
+ center: string;
60
+ };
61
+ }, {
62
+ variant: {
63
+ light: string;
64
+ dark: string;
65
+ };
66
+ align: {
67
+ left: string;
68
+ center: string;
69
+ };
70
+ }>, unknown, unknown, undefined>>;
2
71
  /**
3
72
  * Tout component based on Figma BaseKit / Touts
4
73
  *
5
74
  * A full-bleed section with a background image and overlaid content.
6
75
  * Content can be positioned on the left side or centered.
7
76
  *
77
+ * Variants:
78
+ * - light: Light text styling (default)
79
+ * - dark: Dark text styling
80
+ *
81
+ * Alignment:
82
+ * - left: Content aligned to the left (default)
83
+ * - center: Content centered
84
+ *
8
85
  * Responsive behavior:
9
86
  * - Mobile (sm): 600px height, 4 columns with gap-20, content spans all 4 cols
10
87
  * - Tablet (md): 750px height, 12 columns with gap-20, content spans 9 cols (left) or centered
@@ -12,7 +89,7 @@ import * as React from "react";
12
89
  *
13
90
  * This component is self-contained - do NOT wrap in a grid-container.
14
91
  */
15
- export interface ToutProps extends React.HTMLAttributes<HTMLElement> {
92
+ export interface ToutProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof toutVariants> {
16
93
  /**
17
94
  * The headline displayed in the tout
18
95
  */
@@ -35,13 +112,15 @@ export interface ToutProps extends React.HTMLAttributes<HTMLElement> {
35
112
  */
36
113
  backgroundMedia: React.ReactNode;
37
114
  /**
38
- * Content alignment: left (default) or center
115
+ * Optional footer content to display at the bottom of the section.
116
+ * Use with NdstudioFooter component for the branded footer.
39
117
  */
40
- align?: "left" | "center";
118
+ footer?: React.ReactNode;
41
119
  /**
42
- * Show National Design Studio footer link at the bottom of the section
120
+ * Component-level theme overrides.
121
+ * Allows customization of colors, spacing, and surface properties.
43
122
  */
44
- ndstudioFooter?: boolean;
123
+ theme?: ComponentTheme;
45
124
  }
46
125
  /**
47
126
  * Tout component for hero-like sections with background media and overlaid content.
@@ -66,8 +145,9 @@ export interface ToutProps extends React.HTMLAttributes<HTMLElement> {
66
145
  * className="absolute inset-0 w-full h-full object-cover"
67
146
  * />
68
147
  * }
148
+ * footer={<NdstudioFooter />}
69
149
  * />
70
150
  * ```
71
151
  */
72
152
  declare const Tout: React.ForwardRefExoticComponent<ToutProps & React.RefAttributes<HTMLElement>>;
73
- export { Tout };
153
+ export { Tout, toutVariants };
@@ -1,4 +1,4 @@
1
- import { VariantProps } from 'class-variance-authority';
1
+ import { VariantProps } from 'tailwind-variants';
2
2
  import * as React from "react";
3
3
  /**
4
4
  * TwoColumnSection component for text-heavy content sections
@@ -9,10 +9,84 @@ import * as React from "react";
9
9
  *
10
10
  * Uses the 24-column grid system.
11
11
  */
12
- declare const twoColumnSectionVariants: (props?: ({
13
- theme?: "light" | "dark" | null | undefined;
14
- layout?: "asymmetric" | "equal" | null | undefined;
15
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
12
+ declare const twoColumnSectionVariants: import('tailwind-variants').TVReturnType<{
13
+ variant: {
14
+ dark: string;
15
+ light: string;
16
+ };
17
+ layout: {
18
+ /** Default 24-column grid with asymmetric split (title: 9, content: 15) */
19
+ asymmetric: string;
20
+ /** Equal 2-column layout at md+ breakpoints */
21
+ equal: string;
22
+ };
23
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
24
+ variant: {
25
+ dark: string;
26
+ light: string;
27
+ };
28
+ layout: {
29
+ /** Default 24-column grid with asymmetric split (title: 9, content: 15) */
30
+ asymmetric: string;
31
+ /** Equal 2-column layout at md+ breakpoints */
32
+ equal: string;
33
+ };
34
+ }, {
35
+ variant: {
36
+ dark: string;
37
+ light: string;
38
+ };
39
+ layout: {
40
+ /** Default 24-column grid with asymmetric split (title: 9, content: 15) */
41
+ asymmetric: string;
42
+ /** Equal 2-column layout at md+ breakpoints */
43
+ equal: string;
44
+ };
45
+ }>, {
46
+ variant: {
47
+ dark: string;
48
+ light: string;
49
+ };
50
+ layout: {
51
+ /** Default 24-column grid with asymmetric split (title: 9, content: 15) */
52
+ asymmetric: string;
53
+ /** Equal 2-column layout at md+ breakpoints */
54
+ equal: string;
55
+ };
56
+ }, undefined, import('tailwind-variants').TVReturnType<{
57
+ variant: {
58
+ dark: string;
59
+ light: string;
60
+ };
61
+ layout: {
62
+ /** Default 24-column grid with asymmetric split (title: 9, content: 15) */
63
+ asymmetric: string;
64
+ /** Equal 2-column layout at md+ breakpoints */
65
+ equal: string;
66
+ };
67
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
68
+ variant: {
69
+ dark: string;
70
+ light: string;
71
+ };
72
+ layout: {
73
+ /** Default 24-column grid with asymmetric split (title: 9, content: 15) */
74
+ asymmetric: string;
75
+ /** Equal 2-column layout at md+ breakpoints */
76
+ equal: string;
77
+ };
78
+ }, {
79
+ variant: {
80
+ dark: string;
81
+ light: string;
82
+ };
83
+ layout: {
84
+ /** Default 24-column grid with asymmetric split (title: 9, content: 15) */
85
+ asymmetric: string;
86
+ /** Equal 2-column layout at md+ breakpoints */
87
+ equal: string;
88
+ };
89
+ }>, unknown, unknown, undefined>>;
16
90
  export interface TwoColumnSectionProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof twoColumnSectionVariants> {
17
91
  /**
18
92
  * The title text displayed in the left column
@@ -47,7 +121,7 @@ export interface TwoColumnSectionProps extends React.HTMLAttributes<HTMLElement>
47
121
  * <TwoColumnSection
48
122
  * title="US Tech Force"
49
123
  * lead="The US Tech Force is recruiting an elite corps of engineers..."
50
- * theme="dark"
124
+ * variant="dark"
51
125
  * >
52
126
  * <p>Through a two-year program, participants will work...</p>
53
127
  * <p>Upon completing the program, engineers can seek...</p>
@@ -0,0 +1 @@
1
+ export { useEventListener } from './use-event-listener';
@@ -0,0 +1,24 @@
1
+ type EventMap<T> = T extends Window ? WindowEventMap : T extends Document ? DocumentEventMap : T extends HTMLElement ? HTMLElementEventMap : never;
2
+ /**
3
+ * Custom hook that attaches an event listener to a specified element.
4
+ * Automatically handles cleanup on unmount and when dependencies change.
5
+ *
6
+ * @param eventName - The name of the event to listen for
7
+ * @param handler - The callback function to execute when the event fires
8
+ * @param element - The element to attach the listener to (defaults to window)
9
+ * @param options - Optional event listener options
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * // Listen to window resize
14
+ * useEventListener('resize', handleResize);
15
+ *
16
+ * // Listen to element scroll
17
+ * useEventListener('scroll', handleScroll, containerRef.current);
18
+ *
19
+ * // With options
20
+ * useEventListener('scroll', handleScroll, window, { passive: true });
21
+ * ```
22
+ */
23
+ export declare function useEventListener<T extends Window | Document | HTMLElement, K extends keyof EventMap<T>>(eventName: K, handler: (event: EventMap<T>[K]) => void, element?: T | null, options?: boolean | AddEventListenerOptions): void;
24
+ export {};
package/dist/index.d.ts CHANGED
@@ -2,8 +2,12 @@ export type { AccordionItemProps, AccordionProps, } from './components/atoms/acc
2
2
  export { Accordion, AccordionItem } from './components/atoms/accordion';
3
3
  export type { ButtonProps, IconButtonProps } from './components/atoms/button';
4
4
  export { Button, buttonVariants, IconButton, iconButtonVariants, } from './components/atoms/button';
5
+ export type { NdstudioFooterProps } from './components/atoms/ndstudio-footer';
6
+ export { NdstudioFooter } from './components/atoms/ndstudio-footer';
5
7
  export type { PagerControlProps } from './components/atoms/pager-control';
6
8
  export { PagerControl, pagerControlVariants, } from './components/atoms/pager-control';
9
+ export type { DevToolbarProps, GridOverlayProps } from './components/dev-tools';
10
+ export { DevToolbar, GridOverlay } from './components/dev-tools';
7
11
  export type { CardActionsProps, CardBodyProps, CardContentProps, CardDescriptionProps, CardEyebrowProps, CardImageProps, CardProps, CardTitleProps, } from './components/organisms/card';
8
12
  export { Card, CardActions, CardBody, CardContent, CardDescription, CardEyebrow, CardImage, CardTitle, cardVariants, } from './components/organisms/card';
9
13
  export type { NavbarActionsProps, NavbarBrandProps, NavbarLinkProps, NavbarLinksProps, NavbarMobileMenuButtonProps, NavbarMobileMenuLinkProps, NavbarMobileMenuProps, NavbarProps, } from './components/organisms/navbar';
@@ -16,8 +20,8 @@ export type { CardGridProps } from './components/sections/card-grid';
16
20
  export { CardGrid, cardGridVariants } from './components/sections/card-grid';
17
21
  export type { FaqSectionProps } from './components/sections/faq-section';
18
22
  export { FaqSection } from './components/sections/faq-section';
19
- export type { HeroProps } from './components/sections/hero';
20
- export { Hero } from './components/sections/hero';
23
+ export type { HeroBackgroundImageProps, HeroBackgroundStreamProps, HeroBackgroundVideoProps, HeroProps, } from './components/sections/hero';
24
+ export { DEFAULT_TITLE_TYPOGRAPHY, Hero, HeroBackground, heroVariants, } from './components/sections/hero';
21
25
  export type { ProseProps, ProseSectionProps, } from './components/sections/prose';
22
26
  export { Prose, ProseSection } from './components/sections/prose';
23
27
  export type { RiverProps } from './components/sections/river';
@@ -26,4 +30,7 @@ export type { ToutProps } from './components/sections/tout';
26
30
  export { Tout } from './components/sections/tout';
27
31
  export type { TwoColumnSectionProps } from './components/sections/two-column-section';
28
32
  export { TwoColumnSection, twoColumnSectionVariants, } from './components/sections/two-column-section';
33
+ export type { ButtonTheme, ColorToken, ComponentTheme, ComponentThemeColors, ComponentThemeSpatial, ComponentThemeSurface, FontSizeToken, RadiusToken, SpacingToken, } from './lib/theme';
34
+ export { buttonThemeToStyleVars, FONT_SIZES, fontSizeToClass, responsiveTypographyClass, themeToStyleVars, } from './lib/theme';
29
35
  export { cn } from './lib/utils';
36
+ export { applyTheme, createThemeStyle, filterCSSVars, getToken, mergeCSSVars, removeTheme, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, toCSSVars, useCSSVars, useTheme, useThemeTokens, } from './theme';