@nationaldesignstudio/react 0.0.7 → 0.0.9

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/README.md +0 -4
  2. package/dist/assets/fonts/PPNeueMontreal-Variable.woff2 +0 -0
  3. package/dist/assets/react.svg +1 -0
  4. package/dist/components/atoms/accordion/accordion.d.ts +50 -0
  5. package/dist/components/{button → atoms/button}/button.d.ts +5 -4
  6. package/dist/components/{button → atoms/button}/icon-button.d.ts +20 -0
  7. package/dist/components/atoms/pager-control/pager-control.d.ts +62 -0
  8. package/dist/components/{card → organisms/card}/card.d.ts +6 -2
  9. package/dist/components/{navbar → organisms/navbar}/navbar.d.ts +28 -1
  10. package/dist/components/sections/banner/banner.d.ts +64 -0
  11. package/dist/components/sections/card-grid/card-grid.d.ts +53 -0
  12. package/dist/components/sections/faq-section/faq-section.d.ts +44 -0
  13. package/dist/components/sections/hero/hero.d.ts +73 -0
  14. package/dist/components/sections/river/river.d.ts +63 -0
  15. package/dist/components/sections/tout/tout.d.ts +73 -0
  16. package/dist/components/sections/two-column-section/two-column-section.d.ts +58 -0
  17. package/dist/index.d.ts +28 -12
  18. package/dist/index.js +6108 -953
  19. package/dist/index.js.map +1 -1
  20. package/dist/tailwind.css +23 -0
  21. package/dist/tokens.css +2009 -103
  22. package/package.json +23 -5
  23. package/src/App.css +0 -0
  24. package/src/App.tsx +7 -0
  25. package/src/assets/fonts/PPNeueMontreal-Variable.woff2 +0 -0
  26. package/src/assets/react.svg +1 -0
  27. package/src/components/atoms/accordion/accordion.stories.tsx +228 -0
  28. package/src/components/atoms/accordion/accordion.tsx +137 -0
  29. package/src/components/atoms/accordion/index.ts +6 -0
  30. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-chromium-darwin.png +0 -0
  31. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-chromium-linux.png +0 -0
  32. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-outline-chromium-darwin.png +0 -0
  33. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-outline-chromium-linux.png +0 -0
  34. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-outline-quiet-chromium-darwin.png +0 -0
  35. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-charcoal-outline-quiet-chromium-linux.png +0 -0
  36. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-disabled-chromium-darwin.png +0 -0
  37. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-disabled-chromium-linux.png +0 -0
  38. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-chromium-darwin.png +0 -0
  39. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-chromium-linux.png +0 -0
  40. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-outline-chromium-darwin.png +0 -0
  41. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-outline-chromium-linux.png +0 -0
  42. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-outline-quiet-chromium-darwin.png +0 -0
  43. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-ivory-outline-quiet-chromium-linux.png +0 -0
  44. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-large-chromium-darwin.png +0 -0
  45. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-large-chromium-linux.png +0 -0
  46. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-medium-chromium-darwin.png +0 -0
  47. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-medium-chromium-linux.png +0 -0
  48. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-small-chromium-darwin.png +0 -0
  49. package/src/components/atoms/button/__screenshots__/button.visual.test.tsx/button-size-small-chromium-linux.png +0 -0
  50. package/src/components/atoms/button/button.stories.tsx +84 -0
  51. package/src/components/atoms/button/button.test.tsx +141 -0
  52. package/src/components/atoms/button/button.tsx +95 -0
  53. package/src/components/atoms/button/button.visual.test.tsx +102 -0
  54. package/src/components/atoms/button/icon-button.stories.tsx +166 -0
  55. package/src/components/atoms/button/icon-button.tsx +125 -0
  56. package/src/components/atoms/button/index.ts +6 -0
  57. package/src/components/atoms/pager-control/index.ts +5 -0
  58. package/src/components/atoms/pager-control/pager-control.stories.tsx +209 -0
  59. package/src/components/atoms/pager-control/pager-control.test.tsx +149 -0
  60. package/src/components/atoms/pager-control/pager-control.tsx +328 -0
  61. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-default-vertical-chromium-darwin.png +0 -0
  62. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-default-vertical-chromium-linux.png +0 -0
  63. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-horizontal-chromium-darwin.png +0 -0
  64. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-horizontal-chromium-linux.png +0 -0
  65. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-minimal-chromium-darwin.png +0 -0
  66. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-minimal-chromium-linux.png +0 -0
  67. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-actions-chromium-darwin.png +0 -0
  68. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-actions-chromium-linux.png +0 -0
  69. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-eyebrow-chromium-darwin.png +0 -0
  70. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-eyebrow-chromium-linux.png +0 -0
  71. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-image-chromium-darwin.png +0 -0
  72. package/src/components/organisms/card/__screenshots__/card.visual.test.tsx/card-without-image-chromium-linux.png +0 -0
  73. package/src/components/organisms/card/card.stories.tsx +293 -0
  74. package/src/components/organisms/card/card.test.tsx +245 -0
  75. package/src/components/organisms/card/card.tsx +227 -0
  76. package/src/components/organisms/card/card.visual.test.tsx +197 -0
  77. package/src/components/organisms/card/index.ts +19 -0
  78. package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-active-link-chromium-darwin.png +0 -0
  79. package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-active-link-chromium-linux.png +0 -0
  80. package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-brand-only-chromium-darwin.png +0 -0
  81. package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-brand-only-chromium-linux.png +0 -0
  82. package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-default-chromium-darwin.png +0 -0
  83. package/src/components/organisms/navbar/__screenshots__/navbar.visual.test.tsx/navbar-default-chromium-linux.png +0 -0
  84. package/src/components/organisms/navbar/index.ts +18 -0
  85. package/src/components/organisms/navbar/navbar.stories.tsx +313 -0
  86. package/src/components/organisms/navbar/navbar.test.tsx +190 -0
  87. package/src/components/organisms/navbar/navbar.tsx +317 -0
  88. package/src/components/organisms/navbar/navbar.visual.test.tsx +85 -0
  89. package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-custom-icon-chromium-darwin.png +0 -0
  90. package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-custom-icon-chromium-linux.png +0 -0
  91. package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-custom-text-chromium-darwin.png +0 -0
  92. package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-custom-text-chromium-linux.png +0 -0
  93. package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-default-chromium-darwin.png +0 -0
  94. package/src/components/organisms/us-gov-banner/__screenshots__/us-gov-banner.visual.test.tsx/us-gov-banner-default-chromium-linux.png +0 -0
  95. package/src/components/organisms/us-gov-banner/index.ts +1 -0
  96. package/src/components/organisms/us-gov-banner/us-gov-banner.stories.tsx +35 -0
  97. package/src/components/organisms/us-gov-banner/us-gov-banner.test.tsx +107 -0
  98. package/src/components/organisms/us-gov-banner/us-gov-banner.tsx +73 -0
  99. package/src/components/organisms/us-gov-banner/us-gov-banner.visual.test.tsx +46 -0
  100. package/src/components/sections/banner/banner.stories.tsx +150 -0
  101. package/src/components/sections/banner/banner.test.tsx +185 -0
  102. package/src/components/sections/banner/banner.tsx +130 -0
  103. package/src/components/sections/banner/index.ts +2 -0
  104. package/src/components/sections/card-grid/card-grid.stories.tsx +351 -0
  105. package/src/components/sections/card-grid/card-grid.tsx +118 -0
  106. package/src/components/sections/card-grid/index.ts +1 -0
  107. package/src/components/sections/faq-section/faq-section.tsx +77 -0
  108. package/src/components/sections/faq-section/index.ts +2 -0
  109. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-desktop-chromium-darwin.png +0 -0
  110. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-desktop-chromium-linux.png +0 -0
  111. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-mobile-chromium-darwin.png +0 -0
  112. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-mobile-chromium-linux.png +0 -0
  113. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-tablet-chromium-darwin.png +0 -0
  114. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a1-tablet-chromium-linux.png +0 -0
  115. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-desktop-chromium-darwin.png +0 -0
  116. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-desktop-chromium-linux.png +0 -0
  117. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-mobile-chromium-darwin.png +0 -0
  118. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-mobile-chromium-linux.png +0 -0
  119. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-tablet-chromium-darwin.png +0 -0
  120. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a2-tablet-chromium-linux.png +0 -0
  121. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-desktop-chromium-darwin.png +0 -0
  122. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-desktop-chromium-linux.png +0 -0
  123. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-mobile-chromium-darwin.png +0 -0
  124. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-mobile-chromium-linux.png +0 -0
  125. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-tablet-chromium-darwin.png +0 -0
  126. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-a3-tablet-chromium-linux.png +0 -0
  127. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-custom-class-chromium-darwin.png +0 -0
  128. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-custom-class-chromium-linux.png +0 -0
  129. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-default-chromium-linux.png +0 -0
  130. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-long-title-chromium-darwin.png +0 -0
  131. package/src/components/sections/hero/__screenshots__/hero.visual.test.tsx/hero-long-title-chromium-linux.png +0 -0
  132. package/src/components/sections/hero/hero.stories.tsx +145 -0
  133. package/src/components/sections/hero/hero.test.tsx +135 -0
  134. package/src/components/sections/hero/hero.tsx +191 -0
  135. package/src/components/sections/hero/hero.visual.test.tsx +140 -0
  136. package/src/components/sections/hero/index.ts +1 -0
  137. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-h3-heading-chromium-darwin.png +0 -0
  138. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-h3-heading-chromium-linux.png +0 -0
  139. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-multiple-paragraphs-chromium-darwin.png +0 -0
  140. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-multiple-paragraphs-chromium-linux.png +0 -0
  141. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-multiple-sections-chromium-darwin.png +0 -0
  142. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-multiple-sections-chromium-linux.png +0 -0
  143. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-single-section-chromium-darwin.png +0 -0
  144. package/src/components/sections/prose/__screenshots__/prose.visual.test.tsx/prose-single-section-chromium-linux.png +0 -0
  145. package/src/components/sections/prose/index.ts +6 -0
  146. package/src/components/sections/prose/prose.stories.tsx +144 -0
  147. package/src/components/sections/prose/prose.test.tsx +178 -0
  148. package/src/components/sections/prose/prose.tsx +88 -0
  149. package/src/components/sections/prose/prose.visual.test.tsx +105 -0
  150. package/src/components/sections/river/index.ts +1 -0
  151. package/src/components/sections/river/river.stories.tsx +237 -0
  152. package/src/components/sections/river/river.test.tsx +268 -0
  153. package/src/components/sections/river/river.tsx +175 -0
  154. package/src/components/sections/tout/index.ts +1 -0
  155. package/src/components/sections/tout/tout.stories.tsx +154 -0
  156. package/src/components/sections/tout/tout.test.tsx +242 -0
  157. package/src/components/sections/tout/tout.tsx +206 -0
  158. package/src/components/sections/two-column-section/index.ts +5 -0
  159. package/src/components/sections/two-column-section/two-column-section.stories.tsx +285 -0
  160. package/src/components/sections/two-column-section/two-column-section.tsx +152 -0
  161. package/src/index.ts +98 -0
  162. package/src/lib/utils.ts +6 -0
  163. package/src/main.tsx +13 -0
  164. package/src/stories/Introduction.mdx +114 -0
  165. package/src/stories/TokenShowcase.stories.tsx +92 -0
  166. package/src/stories/TokenShowcase.tsx +1352 -0
  167. package/src/styles.css +11 -0
  168. package/dist/components/hero/hero.d.ts +0 -17
  169. /package/dist/components/{us-gov-banner → organisms/us-gov-banner}/us-gov-banner.d.ts +0 -0
  170. /package/dist/components/{prose → sections/prose}/prose.d.ts +0 -0
@@ -0,0 +1,285 @@
1
+ import type { Meta, StoryObj } from "@storybook/react-vite";
2
+ import { TwoColumnSection } from ".";
3
+
4
+ const meta: Meta<typeof TwoColumnSection> = {
5
+ title: "Sections/TwoColumnSection",
6
+ component: TwoColumnSection,
7
+ parameters: {
8
+ layout: "fullscreen",
9
+ },
10
+ argTypes: {
11
+ theme: {
12
+ control: "select",
13
+ options: ["dark", "light"],
14
+ description: "Color theme",
15
+ },
16
+ title: {
17
+ control: "text",
18
+ description: "The title text",
19
+ },
20
+ lead: {
21
+ control: "text",
22
+ description: "Lead content (prominent)",
23
+ },
24
+ },
25
+ } as Meta<typeof TwoColumnSection>;
26
+
27
+ export default meta;
28
+ type Story = StoryObj<typeof TwoColumnSection>;
29
+
30
+ // =============================================================================
31
+ // Playground
32
+ // =============================================================================
33
+
34
+ export const Playground: Story = {
35
+ render: (args) => <TwoColumnSection {...args} />,
36
+ };
37
+ Playground.args = {
38
+ theme: "dark",
39
+ title: "US Tech Force",
40
+ lead: "The US Tech Force is recruiting an elite corps of engineers to build the next generation of government technology. Backed by the White House, Tech Force will tackle the most complex and large-scale civic and defense challenges of our era – from administering critical financial infrastructure at the Treasury Department to advancing cutting-edge programs at the Department of War – and everything in between.",
41
+ children: (
42
+ <>
43
+ <p>
44
+ Through a two-year program, participants will work in teams reporting
45
+ directly to agency leadership. In collaboration with leading technology
46
+ companies, participants will receive technical training, engage with
47
+ industry leaders, and work closely with senior managers from companies
48
+ partnering with the Tech Force.
49
+ </p>
50
+ <p>
51
+ Upon completing the program, engineers can seek employment with the
52
+ partnering private-sector companies for potential full-time roles –
53
+ demonstrating the value of combining civil service with technical
54
+ expertise.
55
+ </p>
56
+ <p>
57
+ If you are highly skilled in the areas of software engineering,
58
+ artificial intelligence, cybersecurity, data analytics, or technical
59
+ project management and want to build the future of American government
60
+ technology, join the Tech Force today.
61
+ </p>
62
+ </>
63
+ ),
64
+ };
65
+
66
+ // =============================================================================
67
+ // Theme Variants
68
+ // =============================================================================
69
+
70
+ /**
71
+ * Dark theme (default) - dark background with light text
72
+ */
73
+ export const DarkTheme: Story = {
74
+ render: () => (
75
+ <TwoColumnSection
76
+ theme="dark"
77
+ title="US Tech Force"
78
+ lead="The US Tech Force is recruiting an elite corps of engineers to build the next generation of government technology."
79
+ >
80
+ <p>
81
+ Through a two-year program, participants will work in teams reporting
82
+ directly to agency leadership.
83
+ </p>
84
+ <p>
85
+ Upon completing the program, engineers can seek employment with the
86
+ partnering private-sector companies for potential full-time roles.
87
+ </p>
88
+ </TwoColumnSection>
89
+ ),
90
+ };
91
+
92
+ /**
93
+ * Light theme - light background with dark text
94
+ */
95
+ export const LightTheme: Story = {
96
+ render: () => (
97
+ <TwoColumnSection
98
+ theme="light"
99
+ title="US Tech Force"
100
+ lead="The US Tech Force is recruiting an elite corps of engineers to build the next generation of government technology."
101
+ >
102
+ <p>
103
+ Through a two-year program, participants will work in teams reporting
104
+ directly to agency leadership.
105
+ </p>
106
+ <p>
107
+ Upon completing the program, engineers can seek employment with the
108
+ partnering private-sector companies for potential full-time roles.
109
+ </p>
110
+ </TwoColumnSection>
111
+ ),
112
+ };
113
+
114
+ // =============================================================================
115
+ // Responsive Variants
116
+ // =============================================================================
117
+
118
+ export const Desktop: Story = {
119
+ render: () => (
120
+ <TwoColumnSection
121
+ theme="dark"
122
+ title="US Tech Force"
123
+ lead="The US Tech Force is recruiting an elite corps of engineers to build the next generation of government technology. Backed by the White House, Tech Force will tackle the most complex and large-scale civic and defense challenges of our era."
124
+ >
125
+ <p>
126
+ Through a two-year program, participants will work in teams reporting
127
+ directly to agency leadership. In collaboration with leading technology
128
+ companies, participants will receive technical training, engage with
129
+ industry leaders, and work closely with senior managers from companies
130
+ partnering with the Tech Force.
131
+ </p>
132
+ <p>
133
+ Upon completing the program, engineers can seek employment with the
134
+ partnering private-sector companies for potential full-time roles –
135
+ demonstrating the value of combining civil service with technical
136
+ expertise.
137
+ </p>
138
+ <p>
139
+ If you are highly skilled in the areas of software engineering,
140
+ artificial intelligence, cybersecurity, data analytics, or technical
141
+ project management and want to build the future of American government
142
+ technology, join the Tech Force today.
143
+ </p>
144
+ </TwoColumnSection>
145
+ ),
146
+ globals: {
147
+ viewport: { value: "lg", isRotated: false },
148
+ },
149
+ };
150
+
151
+ export const Tablet: Story = {
152
+ render: () => (
153
+ <TwoColumnSection
154
+ theme="dark"
155
+ title="US Tech Force"
156
+ lead="The US Tech Force is recruiting an elite corps of engineers to build the next generation of government technology. Backed by the White House, Tech Force will tackle the most complex and large-scale civic and defense challenges of our era."
157
+ >
158
+ <p>
159
+ Through a two-year program, participants will work in teams reporting
160
+ directly to agency leadership. In collaboration with leading technology
161
+ companies, participants will receive technical training, engage with
162
+ industry leaders, and work closely with senior managers from companies
163
+ partnering with the Tech Force.
164
+ </p>
165
+ <p>
166
+ Upon completing the program, engineers can seek employment with the
167
+ partnering private-sector companies for potential full-time roles –
168
+ demonstrating the value of combining civil service with technical
169
+ expertise.
170
+ </p>
171
+ <p>
172
+ If you are highly skilled in the areas of software engineering,
173
+ artificial intelligence, cybersecurity, data analytics, or technical
174
+ project management and want to build the future of American government
175
+ technology, join the Tech Force today.
176
+ </p>
177
+ </TwoColumnSection>
178
+ ),
179
+ globals: {
180
+ viewport: { value: "md", isRotated: false },
181
+ },
182
+ };
183
+
184
+ export const Mobile: Story = {
185
+ render: () => (
186
+ <TwoColumnSection
187
+ theme="dark"
188
+ title="US Tech Force"
189
+ lead="The US Tech Force is recruiting an elite corps of engineers to build the next generation of government technology. Backed by the White House, Tech Force will tackle the most complex and large-scale civic and defense challenges of our era."
190
+ >
191
+ <p>
192
+ Through a two-year program, participants will work in teams reporting
193
+ directly to agency leadership. In collaboration with leading technology
194
+ companies, participants will receive technical training, engage with
195
+ industry leaders, and work closely with senior managers from companies
196
+ partnering with the Tech Force.
197
+ </p>
198
+ <p>
199
+ Upon completing the program, engineers can seek employment with the
200
+ partnering private-sector companies for potential full-time roles –
201
+ demonstrating the value of combining civil service with technical
202
+ expertise.
203
+ </p>
204
+ <p>
205
+ If you are highly skilled in the areas of software engineering,
206
+ artificial intelligence, cybersecurity, data analytics, or technical
207
+ project management and want to build the future of American government
208
+ technology, join the Tech Force today.
209
+ </p>
210
+ </TwoColumnSection>
211
+ ),
212
+ globals: {
213
+ viewport: { value: "sm", isRotated: false },
214
+ },
215
+ };
216
+
217
+ // =============================================================================
218
+ // Content Variations
219
+ // =============================================================================
220
+
221
+ /**
222
+ * Without lead content - just title and body
223
+ */
224
+ export const WithoutLead: Story = {
225
+ render: () => (
226
+ <TwoColumnSection theme="dark" title="About the Program">
227
+ <p>
228
+ Through a two-year program, participants will work in teams reporting
229
+ directly to agency leadership. In collaboration with leading technology
230
+ companies, participants will receive technical training, engage with
231
+ industry leaders, and work closely with senior managers from companies
232
+ partnering with the Tech Force.
233
+ </p>
234
+ <p>
235
+ Upon completing the program, engineers can seek employment with the
236
+ partnering private-sector companies for potential full-time roles.
237
+ </p>
238
+ </TwoColumnSection>
239
+ ),
240
+ };
241
+
242
+ /**
243
+ * With rich lead content (ReactNode)
244
+ */
245
+ export const RichLeadContent: Story = {
246
+ render: () => (
247
+ <TwoColumnSection
248
+ theme="dark"
249
+ title="Our Mission"
250
+ lead={
251
+ <>
252
+ <p>
253
+ The US Tech Force is recruiting an elite corps of engineers to build
254
+ the next generation of government technology.
255
+ </p>
256
+ <p>
257
+ Backed by the White House, Tech Force will tackle the most complex
258
+ and large-scale civic and defense challenges of our era.
259
+ </p>
260
+ </>
261
+ }
262
+ >
263
+ <p>
264
+ From administering critical financial infrastructure at the Treasury
265
+ Department to advancing cutting-edge programs at the Department of War –
266
+ and everything in between.
267
+ </p>
268
+ </TwoColumnSection>
269
+ ),
270
+ };
271
+
272
+ /**
273
+ * Short content example
274
+ */
275
+ export const ShortContent: Story = {
276
+ render: () => (
277
+ <TwoColumnSection
278
+ theme="dark"
279
+ title="Join Us"
280
+ lead="Build the future of American government technology."
281
+ >
282
+ <p>Applications are now open for qualified engineers.</p>
283
+ </TwoColumnSection>
284
+ ),
285
+ };
@@ -0,0 +1,152 @@
1
+ import { cva, type VariantProps } from "class-variance-authority";
2
+ import * as React from "react";
3
+ import { cn } from "@/lib/utils";
4
+
5
+ /**
6
+ * TwoColumnSection component for text-heavy content sections
7
+ *
8
+ * Layout:
9
+ * - Desktop (lg+): Title left, content right with border-top divider
10
+ * - Mobile/Tablet: Stacked vertically
11
+ *
12
+ * Uses the 24-column grid system.
13
+ */
14
+ const twoColumnSectionVariants = cva(
15
+ // Base styles - responsive padding
16
+ [
17
+ "w-full",
18
+ // Small (mobile): 20px x, 56px top, 20px bottom
19
+ "px-spacing-20 pt-spacing-56 pb-spacing-20",
20
+ // Medium (tablet): 56px x, 56px y
21
+ "md:px-spacing-56 md:py-spacing-56",
22
+ // Large (desktop): 72px x, 72px top, 112px bottom
23
+ "lg:px-spacing-72 lg:pt-spacing-72 lg:pb-spacing-112",
24
+ ],
25
+ {
26
+ variants: {
27
+ theme: {
28
+ dark: "bg-gray-1200",
29
+ light: "bg-white",
30
+ },
31
+ layout: {
32
+ /** Default 24-column grid with asymmetric split (title: 9, content: 15) */
33
+ asymmetric: "",
34
+ /** Equal 2-column layout at md+ breakpoints */
35
+ equal: "",
36
+ },
37
+ },
38
+ defaultVariants: {
39
+ theme: "dark",
40
+ layout: "asymmetric",
41
+ },
42
+ },
43
+ );
44
+
45
+ export interface TwoColumnSectionProps
46
+ extends React.HTMLAttributes<HTMLElement>,
47
+ VariantProps<typeof twoColumnSectionVariants> {
48
+ /**
49
+ * The title text displayed in the left column
50
+ */
51
+ title: string;
52
+ /**
53
+ * Lead content - prominently styled (brighter text)
54
+ * Can be a string or ReactNode for rich content
55
+ */
56
+ lead?: React.ReactNode;
57
+ /**
58
+ * Body content - secondary styled (muted text)
59
+ * Can be a string or ReactNode for rich content
60
+ */
61
+ children: React.ReactNode;
62
+ /**
63
+ * Layout style for the columns
64
+ * - "asymmetric" (default): Uses 24-column grid with ~40/60 split (title: 9, content: 15)
65
+ * - "equal": Simple 2-column equal-width layout at md+ breakpoints
66
+ */
67
+ layout?: "asymmetric" | "equal";
68
+ }
69
+
70
+ /**
71
+ * TwoColumnSection component for text-heavy content with title/content split.
72
+ *
73
+ * Layout:
74
+ * - Mobile/Tablet: Stacked (title above content)
75
+ * - Desktop (lg+): Title left (~40%), Content right (~60%)
76
+ *
77
+ * @example
78
+ * ```tsx
79
+ * <TwoColumnSection
80
+ * title="US Tech Force"
81
+ * lead="The US Tech Force is recruiting an elite corps of engineers..."
82
+ * theme="dark"
83
+ * >
84
+ * <p>Through a two-year program, participants will work...</p>
85
+ * <p>Upon completing the program, engineers can seek...</p>
86
+ * </TwoColumnSection>
87
+ * ```
88
+ */
89
+ const TwoColumnSection = React.forwardRef<HTMLElement, TwoColumnSectionProps>(
90
+ ({ className, theme = "dark", layout, title, lead, children, ...props }, ref) => {
91
+ return (
92
+ <section
93
+ ref={ref}
94
+ className={cn(twoColumnSectionVariants({ theme, layout }), className)}
95
+ {...props}
96
+ >
97
+ {/* Inner container with border-top */}
98
+ <div
99
+ className={cn(
100
+ "border-t pt-spacing-36",
101
+ theme === "dark" ? "border-gray-700" : "border-gray-300",
102
+ // Grid layout
103
+ "grid grid-cols-1 gap-spacing-56",
104
+ layout === "equal"
105
+ ? "md:grid-cols-2"
106
+ : "lg:grid-cols-24 lg:gap-spacing-56",
107
+ )}
108
+ >
109
+ {/* Title column */}
110
+ <h2
111
+ className={cn(
112
+ "typography-subheading-medium",
113
+ theme === "dark" ? "text-gray-100" : "text-gray-900",
114
+ // Column span based on layout
115
+ layout !== "equal" && "lg:col-span-9",
116
+ )}
117
+ >
118
+ {title}
119
+ </h2>
120
+
121
+ {/* Content column */}
122
+ <div className={cn("flex flex-col gap-spacing-56", layout !== "equal" && "lg:col-span-15")}>
123
+ {/* Lead content - brighter/prominent */}
124
+ {lead && (
125
+ <div
126
+ className={cn(
127
+ "typography-body-large",
128
+ theme === "dark" ? "text-gray-100" : "text-gray-900",
129
+ )}
130
+ >
131
+ {typeof lead === "string" ? <p>{lead}</p> : lead}
132
+ </div>
133
+ )}
134
+
135
+ {/* Body content - muted */}
136
+ <div
137
+ className={cn(
138
+ "typography-body-medium flex flex-col gap-[1em]",
139
+ theme === "dark" ? "text-gray-400" : "text-gray-600",
140
+ )}
141
+ >
142
+ {children}
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </section>
147
+ );
148
+ },
149
+ );
150
+ TwoColumnSection.displayName = "TwoColumnSection";
151
+
152
+ export { TwoColumnSection, twoColumnSectionVariants };
package/src/index.ts ADDED
@@ -0,0 +1,98 @@
1
+ // =============================================================================
2
+ // Atoms
3
+ // =============================================================================
4
+ export type {
5
+ AccordionItemProps,
6
+ AccordionProps,
7
+ } from "./components/atoms/accordion";
8
+ export { Accordion, AccordionItem } from "./components/atoms/accordion";
9
+ export type { ButtonProps, IconButtonProps } from "./components/atoms/button";
10
+ export {
11
+ Button,
12
+ buttonVariants,
13
+ IconButton,
14
+ iconButtonVariants,
15
+ } from "./components/atoms/button";
16
+ export type { PagerControlProps } from "./components/atoms/pager-control";
17
+ export {
18
+ PagerControl,
19
+ pagerControlVariants,
20
+ } from "./components/atoms/pager-control";
21
+
22
+ // =============================================================================
23
+ // Organisms
24
+ // =============================================================================
25
+ export type {
26
+ CardActionsProps,
27
+ CardBodyProps,
28
+ CardContentProps,
29
+ CardDescriptionProps,
30
+ CardEyebrowProps,
31
+ CardImageProps,
32
+ CardProps,
33
+ CardTitleProps,
34
+ } from "./components/organisms/card";
35
+ export {
36
+ Card,
37
+ CardActions,
38
+ CardBody,
39
+ CardContent,
40
+ CardDescription,
41
+ CardEyebrow,
42
+ CardImage,
43
+ CardTitle,
44
+ cardVariants,
45
+ } from "./components/organisms/card";
46
+ export type {
47
+ NavbarActionsProps,
48
+ NavbarBrandProps,
49
+ NavbarLinkProps,
50
+ NavbarLinksProps,
51
+ NavbarMobileMenuButtonProps,
52
+ NavbarMobileMenuLinkProps,
53
+ NavbarMobileMenuProps,
54
+ NavbarProps,
55
+ } from "./components/organisms/navbar";
56
+ export {
57
+ Navbar,
58
+ NavbarActions,
59
+ NavbarBrand,
60
+ NavbarLink,
61
+ NavbarLinks,
62
+ NavbarMobileMenu,
63
+ NavbarMobileMenuButton,
64
+ NavbarMobileMenuLink,
65
+ } from "./components/organisms/navbar";
66
+ export type { USGovBannerProps } from "./components/organisms/us-gov-banner";
67
+ export { USGovBanner } from "./components/organisms/us-gov-banner";
68
+
69
+ // =============================================================================
70
+ // Sections
71
+ // =============================================================================
72
+ export type { BannerProps } from "./components/sections/banner";
73
+ export { Banner, bannerVariants } from "./components/sections/banner";
74
+ export type { CardGridProps } from "./components/sections/card-grid";
75
+ export { CardGrid, cardGridVariants } from "./components/sections/card-grid";
76
+ export type { FaqSectionProps } from "./components/sections/faq-section";
77
+ export { FaqSection } from "./components/sections/faq-section";
78
+ export type { HeroProps } from "./components/sections/hero";
79
+ export { Hero } from "./components/sections/hero";
80
+ export type {
81
+ ProseProps,
82
+ ProseSectionProps,
83
+ } from "./components/sections/prose";
84
+ export { Prose, ProseSection } from "./components/sections/prose";
85
+ export type { RiverProps } from "./components/sections/river";
86
+ export { River, riverVariants } from "./components/sections/river";
87
+ export type { ToutProps } from "./components/sections/tout";
88
+ export { Tout } from "./components/sections/tout";
89
+ export type { TwoColumnSectionProps } from "./components/sections/two-column-section";
90
+ export {
91
+ TwoColumnSection,
92
+ twoColumnSectionVariants,
93
+ } from "./components/sections/two-column-section";
94
+
95
+ // =============================================================================
96
+ // Utilities
97
+ // =============================================================================
98
+ export { cn } from "./lib/utils";
@@ -0,0 +1,6 @@
1
+ import { type ClassValue, clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs));
6
+ }
package/src/main.tsx ADDED
@@ -0,0 +1,13 @@
1
+ import { StrictMode } from "react";
2
+ import { createRoot } from "react-dom/client";
3
+ import "./styles.css";
4
+ import App from "./App.tsx";
5
+
6
+ const rootElement = document.getElementById("root");
7
+ if (rootElement) {
8
+ createRoot(rootElement).render(
9
+ <StrictMode>
10
+ <App />
11
+ </StrictMode>,
12
+ );
13
+ }
@@ -0,0 +1,114 @@
1
+ import { Meta } from "@storybook/addon-docs/blocks";
2
+
3
+ <Meta title="Introduction" />
4
+
5
+ # NDS Design System
6
+
7
+ Welcome to the **NDS Design System** component library. This Storybook documents all available components, their variants, and design tokens.
8
+
9
+ ## Getting Started
10
+
11
+ ### Installation
12
+
13
+ ```bash
14
+ bun add @nationaldesignstudio/react
15
+ ```
16
+
17
+ ### Setup Tailwind CSS v4
18
+
19
+ Import the generated tokens CSS in your main CSS file:
20
+
21
+ ```css
22
+ /* app.css or globals.css */
23
+ @import "tailwindcss";
24
+ @import "@nationaldesignstudio/react/tokens.css";
25
+ ```
26
+
27
+ This gives you access to all design tokens as CSS variables and Tailwind utilities.
28
+
29
+ ### Using Components
30
+
31
+ ```tsx
32
+ import { Button } from "@nationaldesignstudio/react";
33
+
34
+ function App() {
35
+ return <Button variant="primary">Click me</Button>;
36
+ }
37
+ ```
38
+
39
+ ## Typography Styles
40
+
41
+ The design system provides pre-built typography classes for consistent text styling. Typography utilities use the `typography-` prefix to avoid conflicts with Tailwind's `text-*` color utilities.
42
+
43
+ ### Product Typography
44
+
45
+ For app UIs, dashboards, and interfaces:
46
+
47
+ ```html
48
+ <h1 class="typography-product-title-large">Page Title</h1>
49
+ <h2 class="typography-product-headline-medium">Section Header</h2>
50
+ <p class="typography-product-body-medium">Body text content...</p>
51
+ <span class="typography-product-caption-small">Caption text</span>
52
+ <button class="typography-product-button-medium">Click me</button>
53
+ ```
54
+
55
+ Available styles: `typography-product-{category}-{size}` where category is: `title`, `headline`, `body`, `label`, `caption`, `button`, `input`, `link`, `navigation`, `overline`, `tabbar`
56
+
57
+ ### Brand Typography
58
+
59
+ For landing pages and promotional content:
60
+
61
+ ```html
62
+ <h1 class="typography-brand-medium-display-hero">Hero</h1>
63
+ <h2 class="typography-brand-medium-headline-large">Big Headline</h2>
64
+ <p class="typography-brand-medium-body-large">Marketing copy...</p>
65
+ ```
66
+
67
+ Available namespaces: `brand-large` (desktop), `brand-medium` (tablet), `brand-small` (mobile)
68
+
69
+ Available styles: `typography-brand-{breakpoint}-{category}-{size}` where category is: `display`, `headline`, `subheading`, `body`, `label`, `caption`, `button`, `link`
70
+
71
+ ## Color Tokens
72
+
73
+ All colors are available as Tailwind utilities:
74
+
75
+ ```html
76
+ <div class="bg-blue-500 text-gray-900">...</div>
77
+ <div class="bg-alpha-black-50">Semi-transparent overlay</div>
78
+ ```
79
+
80
+ See **Design System > Tokens > Colors** for the full palette.
81
+
82
+ ## Spacing Tokens
83
+
84
+ Consistent spacing values:
85
+
86
+ ```html
87
+ <div class="p-spacing-16 m-spacing-24 gap-spacing-8">...</div>
88
+ ```
89
+
90
+ ## Features
91
+
92
+ - **Design Tokens** - Comprehensive token system for colors, spacing, and typography
93
+ - **Accessibility** - Components tested for WCAG compliance
94
+ - **TypeScript** - Full type safety with detailed prop documentation
95
+ - **Tailwind CSS v4** - Built on modern Tailwind with CSS variables
96
+
97
+ ## Structure
98
+
99
+ - **Components** - Reusable UI components (Button, etc.)
100
+ - **Design System > Tokens** - Visual token documentation
101
+
102
+ ## Development
103
+
104
+ ```bash
105
+ # Run Storybook locally
106
+ cd packages/react
107
+ bun run storybook
108
+
109
+ # Build tokens after changes
110
+ bun run build
111
+
112
+ # Run tests
113
+ bun run test
114
+ ```