@cdt5058/json-render-uswds 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1325 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * U.S. Web Design System (USWDS) component definitions for json-render catalogs.
5
+ *
6
+ * These components follow USWDS design guidelines and use official `usa-*` CSS
7
+ * class names. Users must include the USWDS CSS in their project:
8
+ *
9
+ * ```ts
10
+ * import "@uswds/uswds/css/uswds.css";
11
+ * // or via CDN: https://designsystem.digital.gov/how-to-use-uswds/
12
+ * ```
13
+ *
14
+ * All components are built with accessibility in mind and follow WCAG 2.1 AA.
15
+ */
16
+ declare const uswdsComponentDefinitions: {
17
+ Grid: {
18
+ props: z.ZodObject<{
19
+ columns: z.ZodNullable<z.ZodNumber>;
20
+ gap: z.ZodNullable<z.ZodEnum<{
21
+ sm: "sm";
22
+ md: "md";
23
+ lg: "lg";
24
+ }>>;
25
+ }, z.core.$strip>;
26
+ slots: string[];
27
+ description: string;
28
+ example: {
29
+ columns: number;
30
+ gap: string;
31
+ };
32
+ };
33
+ CardGroup: {
34
+ props: z.ZodObject<{
35
+ cards: z.ZodArray<z.ZodObject<{
36
+ title: z.ZodNullable<z.ZodString>;
37
+ description: z.ZodNullable<z.ZodString>;
38
+ mediaUrl: z.ZodNullable<z.ZodString>;
39
+ mediaAlt: z.ZodNullable<z.ZodString>;
40
+ footer: z.ZodNullable<z.ZodString>;
41
+ }, z.core.$strip>>;
42
+ flag: z.ZodNullable<z.ZodBoolean>;
43
+ }, z.core.$strip>;
44
+ description: string;
45
+ example: {
46
+ cards: {
47
+ title: string;
48
+ description: string;
49
+ mediaUrl: null;
50
+ mediaAlt: null;
51
+ footer: null;
52
+ }[];
53
+ };
54
+ };
55
+ Card: {
56
+ props: z.ZodObject<{
57
+ title: z.ZodNullable<z.ZodString>;
58
+ description: z.ZodNullable<z.ZodString>;
59
+ headerFirst: z.ZodNullable<z.ZodBoolean>;
60
+ mediaUrl: z.ZodNullable<z.ZodString>;
61
+ mediaAlt: z.ZodNullable<z.ZodString>;
62
+ flag: z.ZodNullable<z.ZodBoolean>;
63
+ }, z.core.$strip>;
64
+ slots: string[];
65
+ description: string;
66
+ example: {
67
+ title: string;
68
+ description: string;
69
+ };
70
+ };
71
+ Divider: {
72
+ props: z.ZodObject<{}, z.core.$strip>;
73
+ description: string;
74
+ };
75
+ Footer: {
76
+ props: z.ZodObject<{
77
+ variant: z.ZodNullable<z.ZodEnum<{
78
+ slim: "slim";
79
+ medium: "medium";
80
+ big: "big";
81
+ }>>;
82
+ agencyName: z.ZodString;
83
+ agencyUrl: z.ZodNullable<z.ZodString>;
84
+ logoUrl: z.ZodNullable<z.ZodString>;
85
+ logoAlt: z.ZodNullable<z.ZodString>;
86
+ navGroups: z.ZodNullable<z.ZodArray<z.ZodObject<{
87
+ heading: z.ZodNullable<z.ZodString>;
88
+ links: z.ZodArray<z.ZodObject<{
89
+ label: z.ZodString;
90
+ href: z.ZodString;
91
+ }, z.core.$strip>>;
92
+ }, z.core.$strip>>>;
93
+ contactHeading: z.ZodNullable<z.ZodString>;
94
+ contactInfo: z.ZodNullable<z.ZodArray<z.ZodObject<{
95
+ type: z.ZodEnum<{
96
+ address: "address";
97
+ phone: "phone";
98
+ email: "email";
99
+ }>;
100
+ value: z.ZodString;
101
+ }, z.core.$strip>>>;
102
+ socialLinks: z.ZodNullable<z.ZodArray<z.ZodObject<{
103
+ platform: z.ZodEnum<{
104
+ facebook: "facebook";
105
+ twitter: "twitter";
106
+ youtube: "youtube";
107
+ instagram: "instagram";
108
+ rss: "rss";
109
+ linkedin: "linkedin";
110
+ github: "github";
111
+ }>;
112
+ href: z.ZodString;
113
+ label: z.ZodString;
114
+ }, z.core.$strip>>>;
115
+ returnToTop: z.ZodNullable<z.ZodBoolean>;
116
+ }, z.core.$strip>;
117
+ description: string;
118
+ example: {
119
+ variant: string;
120
+ agencyName: string;
121
+ agencyUrl: string;
122
+ logoUrl: null;
123
+ logoAlt: null;
124
+ navGroups: {
125
+ heading: null;
126
+ links: {
127
+ label: string;
128
+ href: string;
129
+ }[];
130
+ }[];
131
+ contactHeading: string;
132
+ contactInfo: {
133
+ type: string;
134
+ value: string;
135
+ }[];
136
+ socialLinks: null;
137
+ returnToTop: boolean;
138
+ };
139
+ };
140
+ Accordion: {
141
+ props: z.ZodObject<{
142
+ items: z.ZodArray<z.ZodObject<{
143
+ title: z.ZodString;
144
+ content: z.ZodString;
145
+ expanded: z.ZodNullable<z.ZodBoolean>;
146
+ }, z.core.$strip>>;
147
+ bordered: z.ZodNullable<z.ZodBoolean>;
148
+ multiselectable: z.ZodNullable<z.ZodBoolean>;
149
+ }, z.core.$strip>;
150
+ description: string;
151
+ example: {
152
+ items: {
153
+ title: string;
154
+ content: string;
155
+ }[];
156
+ };
157
+ };
158
+ Pagination: {
159
+ props: z.ZodObject<{
160
+ totalPages: z.ZodNumber;
161
+ page: z.ZodNullable<z.ZodNumber>;
162
+ ariaLabel: z.ZodNullable<z.ZodString>;
163
+ }, z.core.$strip>;
164
+ events: string[];
165
+ description: string;
166
+ example: {
167
+ totalPages: number;
168
+ page: number;
169
+ };
170
+ };
171
+ StepIndicator: {
172
+ props: z.ZodObject<{
173
+ steps: z.ZodArray<z.ZodString>;
174
+ currentStep: z.ZodNumber;
175
+ counters: z.ZodNullable<z.ZodEnum<{
176
+ default: "default";
177
+ small: "small";
178
+ }>>;
179
+ centered: z.ZodNullable<z.ZodBoolean>;
180
+ noLabels: z.ZodNullable<z.ZodBoolean>;
181
+ }, z.core.$strip>;
182
+ description: string;
183
+ example: {
184
+ steps: string[];
185
+ currentStep: number;
186
+ };
187
+ };
188
+ Header: {
189
+ props: z.ZodObject<{
190
+ variant: z.ZodNullable<z.ZodEnum<{
191
+ basic: "basic";
192
+ extended: "extended";
193
+ }>>;
194
+ siteName: z.ZodString;
195
+ siteUrl: z.ZodNullable<z.ZodString>;
196
+ logoUrl: z.ZodNullable<z.ZodString>;
197
+ logoAlt: z.ZodNullable<z.ZodString>;
198
+ navItems: z.ZodNullable<z.ZodArray<z.ZodObject<{
199
+ label: z.ZodString;
200
+ href: z.ZodString;
201
+ current: z.ZodNullable<z.ZodBoolean>;
202
+ items: z.ZodNullable<z.ZodArray<z.ZodObject<{
203
+ label: z.ZodString;
204
+ href: z.ZodString;
205
+ }, z.core.$strip>>>;
206
+ }, z.core.$strip>>>;
207
+ showSearch: z.ZodNullable<z.ZodBoolean>;
208
+ }, z.core.$strip>;
209
+ description: string;
210
+ example: {
211
+ variant: string;
212
+ siteName: string;
213
+ siteUrl: string;
214
+ logoUrl: null;
215
+ logoAlt: null;
216
+ navItems: ({
217
+ label: string;
218
+ href: string;
219
+ current: boolean;
220
+ items: null;
221
+ } | {
222
+ label: string;
223
+ href: string;
224
+ current: boolean;
225
+ items: {
226
+ label: string;
227
+ href: string;
228
+ }[];
229
+ })[];
230
+ showSearch: boolean;
231
+ };
232
+ };
233
+ SkipNav: {
234
+ props: z.ZodObject<{
235
+ href: z.ZodNullable<z.ZodString>;
236
+ label: z.ZodNullable<z.ZodString>;
237
+ }, z.core.$strip>;
238
+ description: string;
239
+ example: {
240
+ href: string;
241
+ label: string;
242
+ };
243
+ };
244
+ SideNav: {
245
+ props: z.ZodObject<{
246
+ items: z.ZodArray<z.ZodObject<{
247
+ label: z.ZodString;
248
+ href: z.ZodString;
249
+ current: z.ZodNullable<z.ZodBoolean>;
250
+ children: z.ZodNullable<z.ZodArray<z.ZodObject<{
251
+ label: z.ZodString;
252
+ href: z.ZodString;
253
+ current: z.ZodNullable<z.ZodBoolean>;
254
+ }, z.core.$strip>>>;
255
+ }, z.core.$strip>>;
256
+ ariaLabel: z.ZodNullable<z.ZodString>;
257
+ }, z.core.$strip>;
258
+ description: string;
259
+ example: {
260
+ ariaLabel: string;
261
+ items: ({
262
+ label: string;
263
+ href: string;
264
+ current: boolean;
265
+ children: null;
266
+ } | {
267
+ label: string;
268
+ href: string;
269
+ current: boolean;
270
+ children: {
271
+ label: string;
272
+ href: string;
273
+ current: boolean;
274
+ }[];
275
+ })[];
276
+ };
277
+ };
278
+ LanguageSelector: {
279
+ props: z.ZodObject<{
280
+ languages: z.ZodArray<z.ZodObject<{
281
+ label: z.ZodString;
282
+ href: z.ZodString;
283
+ lang: z.ZodString;
284
+ localLabel: z.ZodNullable<z.ZodString>;
285
+ }, z.core.$strip>>;
286
+ currentLang: z.ZodNullable<z.ZodString>;
287
+ }, z.core.$strip>;
288
+ description: string;
289
+ example: {
290
+ currentLang: string;
291
+ languages: ({
292
+ label: string;
293
+ href: string;
294
+ lang: string;
295
+ localLabel: null;
296
+ } | {
297
+ label: string;
298
+ href: string;
299
+ lang: string;
300
+ localLabel: string;
301
+ })[];
302
+ };
303
+ };
304
+ Link: {
305
+ props: z.ZodObject<{
306
+ label: z.ZodString;
307
+ href: z.ZodString;
308
+ external: z.ZodNullable<z.ZodBoolean>;
309
+ variant: z.ZodNullable<z.ZodEnum<{
310
+ default: "default";
311
+ nav: "nav";
312
+ }>>;
313
+ }, z.core.$strip>;
314
+ events: string[];
315
+ description: string;
316
+ example: {
317
+ label: string;
318
+ href: string;
319
+ };
320
+ };
321
+ InPageNavigation: {
322
+ props: z.ZodObject<{
323
+ items: z.ZodArray<z.ZodObject<{
324
+ label: z.ZodString;
325
+ href: z.ZodString;
326
+ }, z.core.$strip>>;
327
+ heading: z.ZodNullable<z.ZodString>;
328
+ }, z.core.$strip>;
329
+ description: string;
330
+ example: {
331
+ heading: string;
332
+ items: {
333
+ label: string;
334
+ href: string;
335
+ }[];
336
+ };
337
+ };
338
+ Breadcrumb: {
339
+ props: z.ZodObject<{
340
+ items: z.ZodArray<z.ZodObject<{
341
+ label: z.ZodString;
342
+ href: z.ZodNullable<z.ZodString>;
343
+ }, z.core.$strip>>;
344
+ }, z.core.$strip>;
345
+ description: string;
346
+ example: {
347
+ items: ({
348
+ label: string;
349
+ href: string;
350
+ } | {
351
+ label: string;
352
+ href: null;
353
+ })[];
354
+ };
355
+ };
356
+ Identifier: {
357
+ props: z.ZodObject<{
358
+ domain: z.ZodString;
359
+ agencyName: z.ZodString;
360
+ agencyUrl: z.ZodNullable<z.ZodString>;
361
+ logoUrl: z.ZodNullable<z.ZodString>;
362
+ logoAlt: z.ZodNullable<z.ZodString>;
363
+ disclaimer: z.ZodNullable<z.ZodString>;
364
+ links: z.ZodNullable<z.ZodArray<z.ZodObject<{
365
+ label: z.ZodString;
366
+ href: z.ZodString;
367
+ }, z.core.$strip>>>;
368
+ showUsagov: z.ZodNullable<z.ZodBoolean>;
369
+ }, z.core.$strip>;
370
+ description: string;
371
+ example: {
372
+ domain: string;
373
+ agencyName: string;
374
+ agencyUrl: string;
375
+ logoUrl: null;
376
+ logoAlt: null;
377
+ disclaimer: null;
378
+ links: {
379
+ label: string;
380
+ href: string;
381
+ }[];
382
+ showUsagov: boolean;
383
+ };
384
+ };
385
+ GovBanner: {
386
+ props: z.ZodObject<{
387
+ tld: z.ZodNullable<z.ZodEnum<{
388
+ ".gov": ".gov";
389
+ ".mil": ".mil";
390
+ }>>;
391
+ expanded: z.ZodNullable<z.ZodBoolean>;
392
+ }, z.core.$strip>;
393
+ description: string;
394
+ example: {
395
+ tld: string;
396
+ };
397
+ };
398
+ Collection: {
399
+ props: z.ZodObject<{
400
+ items: z.ZodArray<z.ZodObject<{
401
+ heading: z.ZodString;
402
+ href: z.ZodNullable<z.ZodString>;
403
+ description: z.ZodNullable<z.ZodString>;
404
+ date: z.ZodNullable<z.ZodString>;
405
+ dateLabel: z.ZodNullable<z.ZodString>;
406
+ tags: z.ZodNullable<z.ZodArray<z.ZodString>>;
407
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
408
+ thumbnailAlt: z.ZodNullable<z.ZodString>;
409
+ }, z.core.$strip>>;
410
+ }, z.core.$strip>;
411
+ description: string;
412
+ example: {
413
+ items: {
414
+ heading: string;
415
+ href: string;
416
+ description: string;
417
+ date: string;
418
+ dateLabel: string;
419
+ tags: string[];
420
+ thumbnailUrl: null;
421
+ thumbnailAlt: null;
422
+ }[];
423
+ };
424
+ };
425
+ IconList: {
426
+ props: z.ZodObject<{
427
+ items: z.ZodArray<z.ZodObject<{
428
+ icon: z.ZodString;
429
+ content: z.ZodString;
430
+ color: z.ZodNullable<z.ZodEnum<{
431
+ success: "success";
432
+ default: "default";
433
+ warning: "warning";
434
+ error: "error";
435
+ info: "info";
436
+ }>>;
437
+ }, z.core.$strip>>;
438
+ title: z.ZodNullable<z.ZodString>;
439
+ size: z.ZodNullable<z.ZodEnum<{
440
+ sm: "sm";
441
+ lg: "lg";
442
+ xl: "xl";
443
+ "2xl": "2xl";
444
+ "3xl": "3xl";
445
+ }>>;
446
+ }, z.core.$strip>;
447
+ description: string;
448
+ example: {
449
+ title: string;
450
+ items: {
451
+ icon: string;
452
+ content: string;
453
+ color: string;
454
+ }[];
455
+ };
456
+ };
457
+ Tooltip: {
458
+ props: z.ZodObject<{
459
+ label: z.ZodString;
460
+ content: z.ZodString;
461
+ position: z.ZodNullable<z.ZodEnum<{
462
+ top: "top";
463
+ bottom: "bottom";
464
+ left: "left";
465
+ right: "right";
466
+ }>>;
467
+ }, z.core.$strip>;
468
+ description: string;
469
+ example: {
470
+ label: string;
471
+ content: string;
472
+ position: string;
473
+ };
474
+ };
475
+ Table: {
476
+ props: z.ZodObject<{
477
+ columns: z.ZodArray<z.ZodString>;
478
+ rows: z.ZodArray<z.ZodArray<z.ZodString>>;
479
+ caption: z.ZodNullable<z.ZodString>;
480
+ borderless: z.ZodNullable<z.ZodBoolean>;
481
+ striped: z.ZodNullable<z.ZodBoolean>;
482
+ compact: z.ZodNullable<z.ZodBoolean>;
483
+ scrollable: z.ZodNullable<z.ZodBoolean>;
484
+ }, z.core.$strip>;
485
+ description: string;
486
+ example: {
487
+ columns: string[];
488
+ rows: string[][];
489
+ };
490
+ };
491
+ Heading: {
492
+ props: z.ZodObject<{
493
+ text: z.ZodString;
494
+ level: z.ZodNullable<z.ZodEnum<{
495
+ h1: "h1";
496
+ h2: "h2";
497
+ h3: "h3";
498
+ h4: "h4";
499
+ h5: "h5";
500
+ h6: "h6";
501
+ }>>;
502
+ }, z.core.$strip>;
503
+ description: string;
504
+ example: {
505
+ text: string;
506
+ level: string;
507
+ };
508
+ };
509
+ Text: {
510
+ props: z.ZodObject<{
511
+ text: z.ZodString;
512
+ variant: z.ZodNullable<z.ZodEnum<{
513
+ small: "small";
514
+ body: "body";
515
+ lead: "lead";
516
+ code: "code";
517
+ }>>;
518
+ }, z.core.$strip>;
519
+ description: string;
520
+ example: {
521
+ text: string;
522
+ };
523
+ };
524
+ Alert: {
525
+ props: z.ZodObject<{
526
+ heading: z.ZodNullable<z.ZodString>;
527
+ message: z.ZodString;
528
+ type: z.ZodNullable<z.ZodEnum<{
529
+ success: "success";
530
+ warning: "warning";
531
+ error: "error";
532
+ info: "info";
533
+ emergency: "emergency";
534
+ }>>;
535
+ slim: z.ZodNullable<z.ZodBoolean>;
536
+ noIcon: z.ZodNullable<z.ZodBoolean>;
537
+ }, z.core.$strip>;
538
+ description: string;
539
+ example: {
540
+ heading: string;
541
+ message: string;
542
+ type: string;
543
+ };
544
+ };
545
+ SiteAlert: {
546
+ props: z.ZodObject<{
547
+ heading: z.ZodNullable<z.ZodString>;
548
+ message: z.ZodString;
549
+ type: z.ZodNullable<z.ZodEnum<{
550
+ info: "info";
551
+ emergency: "emergency";
552
+ }>>;
553
+ slim: z.ZodNullable<z.ZodBoolean>;
554
+ }, z.core.$strip>;
555
+ description: string;
556
+ example: {
557
+ heading: string;
558
+ message: string;
559
+ type: string;
560
+ };
561
+ };
562
+ Tag: {
563
+ props: z.ZodObject<{
564
+ text: z.ZodString;
565
+ big: z.ZodNullable<z.ZodBoolean>;
566
+ }, z.core.$strip>;
567
+ description: string;
568
+ example: {
569
+ text: string;
570
+ };
571
+ };
572
+ SummaryBox: {
573
+ props: z.ZodObject<{
574
+ heading: z.ZodString;
575
+ items: z.ZodArray<z.ZodString>;
576
+ }, z.core.$strip>;
577
+ description: string;
578
+ example: {
579
+ heading: string;
580
+ items: string[];
581
+ };
582
+ };
583
+ ProcessList: {
584
+ props: z.ZodObject<{
585
+ items: z.ZodArray<z.ZodObject<{
586
+ heading: z.ZodString;
587
+ content: z.ZodString;
588
+ }, z.core.$strip>>;
589
+ }, z.core.$strip>;
590
+ description: string;
591
+ example: {
592
+ items: {
593
+ heading: string;
594
+ content: string;
595
+ }[];
596
+ };
597
+ };
598
+ Button: {
599
+ props: z.ZodObject<{
600
+ label: z.ZodString;
601
+ variant: z.ZodNullable<z.ZodEnum<{
602
+ default: "default";
603
+ big: "big";
604
+ secondary: "secondary";
605
+ "accent-cool": "accent-cool";
606
+ "accent-warm": "accent-warm";
607
+ base: "base";
608
+ outline: "outline";
609
+ "outline-inverse": "outline-inverse";
610
+ unstyled: "unstyled";
611
+ }>>;
612
+ disabled: z.ZodNullable<z.ZodBoolean>;
613
+ type: z.ZodNullable<z.ZodEnum<{
614
+ submit: "submit";
615
+ button: "button";
616
+ reset: "reset";
617
+ }>>;
618
+ }, z.core.$strip>;
619
+ events: string[];
620
+ description: string;
621
+ example: {
622
+ label: string;
623
+ variant: string;
624
+ };
625
+ };
626
+ ButtonGroup: {
627
+ props: z.ZodObject<{
628
+ buttons: z.ZodArray<z.ZodObject<{
629
+ label: z.ZodString;
630
+ value: z.ZodString;
631
+ variant: z.ZodNullable<z.ZodEnum<{
632
+ default: "default";
633
+ secondary: "secondary";
634
+ outline: "outline";
635
+ }>>;
636
+ }, z.core.$strip>>;
637
+ segmented: z.ZodNullable<z.ZodBoolean>;
638
+ }, z.core.$strip>;
639
+ events: string[];
640
+ description: string;
641
+ example: {
642
+ buttons: {
643
+ label: string;
644
+ value: string;
645
+ variant: string;
646
+ }[];
647
+ };
648
+ };
649
+ Input: {
650
+ props: z.ZodObject<{
651
+ label: z.ZodString;
652
+ name: z.ZodString;
653
+ type: z.ZodNullable<z.ZodEnum<{
654
+ number: "number";
655
+ email: "email";
656
+ text: "text";
657
+ password: "password";
658
+ search: "search";
659
+ tel: "tel";
660
+ url: "url";
661
+ }>>;
662
+ placeholder: z.ZodNullable<z.ZodString>;
663
+ hint: z.ZodNullable<z.ZodString>;
664
+ value: z.ZodNullable<z.ZodString>;
665
+ required: z.ZodNullable<z.ZodBoolean>;
666
+ disabled: z.ZodNullable<z.ZodBoolean>;
667
+ checks: z.ZodNullable<z.ZodArray<z.ZodObject<{
668
+ type: z.ZodString;
669
+ message: z.ZodString;
670
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
671
+ }, z.core.$strip>>>;
672
+ validateOn: z.ZodNullable<z.ZodEnum<{
673
+ change: "change";
674
+ blur: "blur";
675
+ submit: "submit";
676
+ }>>;
677
+ }, z.core.$strip>;
678
+ events: string[];
679
+ description: string;
680
+ example: {
681
+ label: string;
682
+ name: string;
683
+ type: string;
684
+ hint: string;
685
+ };
686
+ };
687
+ Textarea: {
688
+ props: z.ZodObject<{
689
+ label: z.ZodString;
690
+ name: z.ZodString;
691
+ placeholder: z.ZodNullable<z.ZodString>;
692
+ hint: z.ZodNullable<z.ZodString>;
693
+ rows: z.ZodNullable<z.ZodNumber>;
694
+ value: z.ZodNullable<z.ZodString>;
695
+ required: z.ZodNullable<z.ZodBoolean>;
696
+ checks: z.ZodNullable<z.ZodArray<z.ZodObject<{
697
+ type: z.ZodString;
698
+ message: z.ZodString;
699
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
700
+ }, z.core.$strip>>>;
701
+ validateOn: z.ZodNullable<z.ZodEnum<{
702
+ change: "change";
703
+ blur: "blur";
704
+ submit: "submit";
705
+ }>>;
706
+ }, z.core.$strip>;
707
+ description: string;
708
+ example: {
709
+ label: string;
710
+ name: string;
711
+ rows: number;
712
+ };
713
+ };
714
+ Select: {
715
+ props: z.ZodObject<{
716
+ label: z.ZodString;
717
+ name: z.ZodString;
718
+ options: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
719
+ label: z.ZodString;
720
+ value: z.ZodString;
721
+ }, z.core.$strip>]>>;
722
+ placeholder: z.ZodNullable<z.ZodString>;
723
+ hint: z.ZodNullable<z.ZodString>;
724
+ value: z.ZodNullable<z.ZodString>;
725
+ required: z.ZodNullable<z.ZodBoolean>;
726
+ checks: z.ZodNullable<z.ZodArray<z.ZodObject<{
727
+ type: z.ZodString;
728
+ message: z.ZodString;
729
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
730
+ }, z.core.$strip>>>;
731
+ validateOn: z.ZodNullable<z.ZodEnum<{
732
+ change: "change";
733
+ blur: "blur";
734
+ submit: "submit";
735
+ }>>;
736
+ }, z.core.$strip>;
737
+ events: string[];
738
+ description: string;
739
+ example: {
740
+ label: string;
741
+ name: string;
742
+ options: string[];
743
+ };
744
+ };
745
+ Checkbox: {
746
+ props: z.ZodObject<{
747
+ label: z.ZodString;
748
+ name: z.ZodString;
749
+ hint: z.ZodNullable<z.ZodString>;
750
+ checked: z.ZodNullable<z.ZodBoolean>;
751
+ tile: z.ZodNullable<z.ZodBoolean>;
752
+ checks: z.ZodNullable<z.ZodArray<z.ZodObject<{
753
+ type: z.ZodString;
754
+ message: z.ZodString;
755
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
756
+ }, z.core.$strip>>>;
757
+ validateOn: z.ZodNullable<z.ZodEnum<{
758
+ change: "change";
759
+ blur: "blur";
760
+ submit: "submit";
761
+ }>>;
762
+ }, z.core.$strip>;
763
+ events: string[];
764
+ description: string;
765
+ example: {
766
+ label: string;
767
+ name: string;
768
+ };
769
+ };
770
+ CheckboxGroup: {
771
+ props: z.ZodObject<{
772
+ legend: z.ZodString;
773
+ name: z.ZodString;
774
+ options: z.ZodArray<z.ZodObject<{
775
+ label: z.ZodString;
776
+ value: z.ZodString;
777
+ hint: z.ZodNullable<z.ZodString>;
778
+ }, z.core.$strip>>;
779
+ tile: z.ZodNullable<z.ZodBoolean>;
780
+ values: z.ZodNullable<z.ZodArray<z.ZodString>>;
781
+ }, z.core.$strip>;
782
+ events: string[];
783
+ description: string;
784
+ example: {
785
+ legend: string;
786
+ name: string;
787
+ options: {
788
+ label: string;
789
+ value: string;
790
+ hint: null;
791
+ }[];
792
+ };
793
+ };
794
+ Radio: {
795
+ props: z.ZodObject<{
796
+ legend: z.ZodString;
797
+ name: z.ZodString;
798
+ options: z.ZodArray<z.ZodObject<{
799
+ label: z.ZodString;
800
+ value: z.ZodString;
801
+ hint: z.ZodNullable<z.ZodString>;
802
+ }, z.core.$strip>>;
803
+ tile: z.ZodNullable<z.ZodBoolean>;
804
+ value: z.ZodNullable<z.ZodString>;
805
+ checks: z.ZodNullable<z.ZodArray<z.ZodObject<{
806
+ type: z.ZodString;
807
+ message: z.ZodString;
808
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
809
+ }, z.core.$strip>>>;
810
+ validateOn: z.ZodNullable<z.ZodEnum<{
811
+ change: "change";
812
+ blur: "blur";
813
+ submit: "submit";
814
+ }>>;
815
+ }, z.core.$strip>;
816
+ events: string[];
817
+ description: string;
818
+ example: {
819
+ legend: string;
820
+ name: string;
821
+ options: {
822
+ label: string;
823
+ value: string;
824
+ hint: null;
825
+ }[];
826
+ };
827
+ };
828
+ FileInput: {
829
+ props: z.ZodObject<{
830
+ label: z.ZodString;
831
+ name: z.ZodString;
832
+ hint: z.ZodNullable<z.ZodString>;
833
+ accept: z.ZodNullable<z.ZodString>;
834
+ multiple: z.ZodNullable<z.ZodBoolean>;
835
+ required: z.ZodNullable<z.ZodBoolean>;
836
+ }, z.core.$strip>;
837
+ events: string[];
838
+ description: string;
839
+ example: {
840
+ label: string;
841
+ name: string;
842
+ hint: string;
843
+ accept: string;
844
+ };
845
+ };
846
+ Search: {
847
+ props: z.ZodObject<{
848
+ label: z.ZodNullable<z.ZodString>;
849
+ placeholder: z.ZodNullable<z.ZodString>;
850
+ value: z.ZodNullable<z.ZodString>;
851
+ size: z.ZodNullable<z.ZodEnum<{
852
+ medium: "medium";
853
+ big: "big";
854
+ small: "small";
855
+ }>>;
856
+ }, z.core.$strip>;
857
+ events: string[];
858
+ description: string;
859
+ example: {
860
+ placeholder: string;
861
+ size: string;
862
+ };
863
+ };
864
+ RangeInput: {
865
+ props: z.ZodObject<{
866
+ label: z.ZodNullable<z.ZodString>;
867
+ name: z.ZodString;
868
+ min: z.ZodNullable<z.ZodNumber>;
869
+ max: z.ZodNullable<z.ZodNumber>;
870
+ step: z.ZodNullable<z.ZodNumber>;
871
+ value: z.ZodNullable<z.ZodNumber>;
872
+ }, z.core.$strip>;
873
+ events: string[];
874
+ description: string;
875
+ example: {
876
+ label: string;
877
+ name: string;
878
+ min: number;
879
+ max: number;
880
+ };
881
+ };
882
+ DateInputGroup: {
883
+ props: z.ZodObject<{
884
+ label: z.ZodString;
885
+ name: z.ZodString;
886
+ hint: z.ZodNullable<z.ZodString>;
887
+ required: z.ZodNullable<z.ZodBoolean>;
888
+ monthValue: z.ZodNullable<z.ZodString>;
889
+ dayValue: z.ZodNullable<z.ZodString>;
890
+ yearValue: z.ZodNullable<z.ZodString>;
891
+ }, z.core.$strip>;
892
+ events: string[];
893
+ description: string;
894
+ example: {
895
+ label: string;
896
+ name: string;
897
+ hint: string;
898
+ };
899
+ };
900
+ DateRangePicker: {
901
+ props: z.ZodObject<{
902
+ startLabel: z.ZodString;
903
+ endLabel: z.ZodString;
904
+ startName: z.ZodString;
905
+ endName: z.ZodString;
906
+ hint: z.ZodNullable<z.ZodString>;
907
+ startValue: z.ZodNullable<z.ZodString>;
908
+ endValue: z.ZodNullable<z.ZodString>;
909
+ minDate: z.ZodNullable<z.ZodString>;
910
+ maxDate: z.ZodNullable<z.ZodString>;
911
+ required: z.ZodNullable<z.ZodBoolean>;
912
+ }, z.core.$strip>;
913
+ events: string[];
914
+ description: string;
915
+ example: {
916
+ startLabel: string;
917
+ endLabel: string;
918
+ startName: string;
919
+ endName: string;
920
+ hint: string;
921
+ };
922
+ };
923
+ InputMask: {
924
+ props: z.ZodObject<{
925
+ label: z.ZodString;
926
+ name: z.ZodString;
927
+ preset: z.ZodNullable<z.ZodEnum<{
928
+ custom: "custom";
929
+ phone: "phone";
930
+ zip: "zip";
931
+ "zip+4": "zip+4";
932
+ ssn: "ssn";
933
+ }>>;
934
+ pattern: z.ZodNullable<z.ZodString>;
935
+ hint: z.ZodNullable<z.ZodString>;
936
+ value: z.ZodNullable<z.ZodString>;
937
+ required: z.ZodNullable<z.ZodBoolean>;
938
+ checks: z.ZodNullable<z.ZodArray<z.ZodObject<{
939
+ type: z.ZodString;
940
+ message: z.ZodString;
941
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
942
+ }, z.core.$strip>>>;
943
+ validateOn: z.ZodNullable<z.ZodEnum<{
944
+ change: "change";
945
+ blur: "blur";
946
+ submit: "submit";
947
+ }>>;
948
+ }, z.core.$strip>;
949
+ events: string[];
950
+ description: string;
951
+ example: {
952
+ label: string;
953
+ name: string;
954
+ preset: string;
955
+ hint: string;
956
+ };
957
+ };
958
+ Password: {
959
+ props: z.ZodObject<{
960
+ label: z.ZodString;
961
+ name: z.ZodString;
962
+ hint: z.ZodNullable<z.ZodString>;
963
+ value: z.ZodNullable<z.ZodString>;
964
+ required: z.ZodNullable<z.ZodBoolean>;
965
+ checks: z.ZodNullable<z.ZodArray<z.ZodObject<{
966
+ type: z.ZodString;
967
+ message: z.ZodString;
968
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
969
+ }, z.core.$strip>>>;
970
+ validateOn: z.ZodNullable<z.ZodEnum<{
971
+ change: "change";
972
+ blur: "blur";
973
+ submit: "submit";
974
+ }>>;
975
+ }, z.core.$strip>;
976
+ events: string[];
977
+ description: string;
978
+ example: {
979
+ label: string;
980
+ name: string;
981
+ hint: string;
982
+ };
983
+ };
984
+ ComboBox: {
985
+ props: z.ZodObject<{
986
+ label: z.ZodString;
987
+ name: z.ZodString;
988
+ options: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
989
+ label: z.ZodString;
990
+ value: z.ZodString;
991
+ }, z.core.$strip>]>>;
992
+ placeholder: z.ZodNullable<z.ZodString>;
993
+ hint: z.ZodNullable<z.ZodString>;
994
+ value: z.ZodNullable<z.ZodString>;
995
+ required: z.ZodNullable<z.ZodBoolean>;
996
+ checks: z.ZodNullable<z.ZodArray<z.ZodObject<{
997
+ type: z.ZodString;
998
+ message: z.ZodString;
999
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1000
+ }, z.core.$strip>>>;
1001
+ validateOn: z.ZodNullable<z.ZodEnum<{
1002
+ change: "change";
1003
+ blur: "blur";
1004
+ submit: "submit";
1005
+ }>>;
1006
+ }, z.core.$strip>;
1007
+ events: string[];
1008
+ description: string;
1009
+ example: {
1010
+ label: string;
1011
+ name: string;
1012
+ options: string[];
1013
+ placeholder: string;
1014
+ };
1015
+ };
1016
+ DatePicker: {
1017
+ props: z.ZodObject<{
1018
+ label: z.ZodString;
1019
+ name: z.ZodString;
1020
+ hint: z.ZodNullable<z.ZodString>;
1021
+ value: z.ZodNullable<z.ZodString>;
1022
+ minDate: z.ZodNullable<z.ZodString>;
1023
+ maxDate: z.ZodNullable<z.ZodString>;
1024
+ required: z.ZodNullable<z.ZodBoolean>;
1025
+ checks: z.ZodNullable<z.ZodArray<z.ZodObject<{
1026
+ type: z.ZodString;
1027
+ message: z.ZodString;
1028
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1029
+ }, z.core.$strip>>>;
1030
+ validateOn: z.ZodNullable<z.ZodEnum<{
1031
+ change: "change";
1032
+ blur: "blur";
1033
+ submit: "submit";
1034
+ }>>;
1035
+ }, z.core.$strip>;
1036
+ events: string[];
1037
+ description: string;
1038
+ example: {
1039
+ label: string;
1040
+ name: string;
1041
+ hint: string;
1042
+ };
1043
+ };
1044
+ TimePicker: {
1045
+ props: z.ZodObject<{
1046
+ label: z.ZodString;
1047
+ name: z.ZodString;
1048
+ hint: z.ZodNullable<z.ZodString>;
1049
+ value: z.ZodNullable<z.ZodString>;
1050
+ minTime: z.ZodNullable<z.ZodString>;
1051
+ maxTime: z.ZodNullable<z.ZodString>;
1052
+ step: z.ZodNullable<z.ZodNumber>;
1053
+ required: z.ZodNullable<z.ZodBoolean>;
1054
+ }, z.core.$strip>;
1055
+ events: string[];
1056
+ description: string;
1057
+ example: {
1058
+ label: string;
1059
+ name: string;
1060
+ hint: string;
1061
+ step: number;
1062
+ };
1063
+ };
1064
+ CharacterCount: {
1065
+ props: z.ZodObject<{
1066
+ label: z.ZodString;
1067
+ name: z.ZodString;
1068
+ maxLength: z.ZodNumber;
1069
+ hint: z.ZodNullable<z.ZodString>;
1070
+ value: z.ZodNullable<z.ZodString>;
1071
+ multiline: z.ZodNullable<z.ZodBoolean>;
1072
+ rows: z.ZodNullable<z.ZodNumber>;
1073
+ required: z.ZodNullable<z.ZodBoolean>;
1074
+ checks: z.ZodNullable<z.ZodArray<z.ZodObject<{
1075
+ type: z.ZodString;
1076
+ message: z.ZodString;
1077
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1078
+ }, z.core.$strip>>>;
1079
+ validateOn: z.ZodNullable<z.ZodEnum<{
1080
+ change: "change";
1081
+ blur: "blur";
1082
+ submit: "submit";
1083
+ }>>;
1084
+ }, z.core.$strip>;
1085
+ events: string[];
1086
+ description: string;
1087
+ example: {
1088
+ label: string;
1089
+ name: string;
1090
+ maxLength: number;
1091
+ hint: string;
1092
+ multiline: boolean;
1093
+ };
1094
+ };
1095
+ Modal: {
1096
+ props: z.ZodObject<{
1097
+ heading: z.ZodString;
1098
+ description: z.ZodNullable<z.ZodString>;
1099
+ openPath: z.ZodString;
1100
+ large: z.ZodNullable<z.ZodBoolean>;
1101
+ }, z.core.$strip>;
1102
+ slots: string[];
1103
+ description: string;
1104
+ example: {
1105
+ heading: string;
1106
+ description: string;
1107
+ openPath: string;
1108
+ };
1109
+ };
1110
+ Icon: {
1111
+ props: z.ZodObject<{
1112
+ name: z.ZodString;
1113
+ size: z.ZodNullable<z.ZodEnum<{
1114
+ sm: "sm";
1115
+ md: "md";
1116
+ lg: "lg";
1117
+ xl: "xl";
1118
+ "2xl": "2xl";
1119
+ "3xl": "3xl";
1120
+ }>>;
1121
+ color: z.ZodNullable<z.ZodString>;
1122
+ ariaLabel: z.ZodNullable<z.ZodString>;
1123
+ }, z.core.$strip>;
1124
+ description: string;
1125
+ example: {
1126
+ name: string;
1127
+ size: string;
1128
+ color: string;
1129
+ };
1130
+ };
1131
+ InputGroup: {
1132
+ props: z.ZodObject<{
1133
+ label: z.ZodString;
1134
+ name: z.ZodString;
1135
+ type: z.ZodNullable<z.ZodEnum<{
1136
+ number: "number";
1137
+ email: "email";
1138
+ text: "text";
1139
+ password: "password";
1140
+ search: "search";
1141
+ tel: "tel";
1142
+ url: "url";
1143
+ }>>;
1144
+ prefix: z.ZodNullable<z.ZodString>;
1145
+ suffix: z.ZodNullable<z.ZodString>;
1146
+ placeholder: z.ZodNullable<z.ZodString>;
1147
+ hint: z.ZodNullable<z.ZodString>;
1148
+ value: z.ZodNullable<z.ZodString>;
1149
+ required: z.ZodNullable<z.ZodBoolean>;
1150
+ disabled: z.ZodNullable<z.ZodBoolean>;
1151
+ checks: z.ZodNullable<z.ZodArray<z.ZodObject<{
1152
+ type: z.ZodString;
1153
+ message: z.ZodString;
1154
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1155
+ }, z.core.$strip>>>;
1156
+ validateOn: z.ZodNullable<z.ZodEnum<{
1157
+ change: "change";
1158
+ blur: "blur";
1159
+ submit: "submit";
1160
+ }>>;
1161
+ }, z.core.$strip>;
1162
+ events: string[];
1163
+ description: string;
1164
+ example: {
1165
+ label: string;
1166
+ name: string;
1167
+ prefix: string;
1168
+ suffix: string;
1169
+ type: string;
1170
+ placeholder: string;
1171
+ };
1172
+ };
1173
+ List: {
1174
+ props: z.ZodObject<{
1175
+ items: z.ZodArray<z.ZodString>;
1176
+ variant: z.ZodNullable<z.ZodEnum<{
1177
+ unstyled: "unstyled";
1178
+ unordered: "unordered";
1179
+ ordered: "ordered";
1180
+ }>>;
1181
+ }, z.core.$strip>;
1182
+ description: string;
1183
+ example: {
1184
+ variant: string;
1185
+ items: string[];
1186
+ };
1187
+ };
1188
+ ValidationChecklist: {
1189
+ props: z.ZodObject<{
1190
+ items: z.ZodArray<z.ZodObject<{
1191
+ label: z.ZodString;
1192
+ checked: z.ZodNullable<z.ZodBoolean>;
1193
+ }, z.core.$strip>>;
1194
+ heading: z.ZodNullable<z.ZodString>;
1195
+ }, z.core.$strip>;
1196
+ description: string;
1197
+ example: {
1198
+ heading: string;
1199
+ items: {
1200
+ label: string;
1201
+ checked: boolean;
1202
+ }[];
1203
+ };
1204
+ };
1205
+ Prose: {
1206
+ props: z.ZodObject<{
1207
+ element: z.ZodNullable<z.ZodEnum<{
1208
+ div: "div";
1209
+ article: "article";
1210
+ section: "section";
1211
+ main: "main";
1212
+ }>>;
1213
+ }, z.core.$strip>;
1214
+ slots: string[];
1215
+ description: string;
1216
+ example: {
1217
+ element: string;
1218
+ };
1219
+ };
1220
+ Hero: {
1221
+ props: z.ZodObject<{
1222
+ heading: z.ZodString;
1223
+ eyebrow: z.ZodNullable<z.ZodString>;
1224
+ body: z.ZodNullable<z.ZodString>;
1225
+ backgroundUrl: z.ZodNullable<z.ZodString>;
1226
+ ariaLabel: z.ZodNullable<z.ZodString>;
1227
+ }, z.core.$strip>;
1228
+ description: string;
1229
+ example: {
1230
+ heading: string;
1231
+ eyebrow: null;
1232
+ body: string;
1233
+ backgroundUrl: null;
1234
+ ariaLabel: string;
1235
+ };
1236
+ };
1237
+ GraphicList: {
1238
+ props: z.ZodObject<{
1239
+ heading: z.ZodNullable<z.ZodString>;
1240
+ items: z.ZodArray<z.ZodObject<{
1241
+ imageUrl: z.ZodNullable<z.ZodString>;
1242
+ imageAlt: z.ZodNullable<z.ZodString>;
1243
+ heading: z.ZodString;
1244
+ content: z.ZodString;
1245
+ }, z.core.$strip>>;
1246
+ }, z.core.$strip>;
1247
+ description: string;
1248
+ example: {
1249
+ heading: null;
1250
+ items: {
1251
+ imageUrl: null;
1252
+ imageAlt: null;
1253
+ heading: string;
1254
+ content: string;
1255
+ }[];
1256
+ };
1257
+ };
1258
+ EmbedContainer: {
1259
+ props: z.ZodObject<{
1260
+ src: z.ZodString;
1261
+ title: z.ZodString;
1262
+ ratio: z.ZodNullable<z.ZodEnum<{
1263
+ "16x9": "16x9";
1264
+ "4x3": "4x3";
1265
+ }>>;
1266
+ }, z.core.$strip>;
1267
+ description: string;
1268
+ example: {
1269
+ src: string;
1270
+ title: string;
1271
+ ratio: string;
1272
+ };
1273
+ };
1274
+ Form: {
1275
+ props: z.ZodObject<{
1276
+ large: z.ZodNullable<z.ZodBoolean>;
1277
+ }, z.core.$strip>;
1278
+ slots: string[];
1279
+ events: string[];
1280
+ description: string;
1281
+ example: {
1282
+ large: boolean;
1283
+ };
1284
+ };
1285
+ Section: {
1286
+ props: z.ZodObject<{
1287
+ title: z.ZodNullable<z.ZodString>;
1288
+ text: z.ZodNullable<z.ZodString>;
1289
+ variant: z.ZodNullable<z.ZodEnum<{
1290
+ default: "default";
1291
+ light: "light";
1292
+ dark: "dark";
1293
+ }>>;
1294
+ }, z.core.$strip>;
1295
+ slots: string[];
1296
+ description: string;
1297
+ example: {
1298
+ title: string;
1299
+ text: string;
1300
+ variant: null;
1301
+ };
1302
+ };
1303
+ };
1304
+ /**
1305
+ * Type for a USWDS component definition
1306
+ */
1307
+ type UswdsComponentDefinition = {
1308
+ props: z.ZodType;
1309
+ slots?: string[];
1310
+ events?: string[];
1311
+ description: string;
1312
+ example?: Record<string, unknown>;
1313
+ };
1314
+ /**
1315
+ * Infer the props type for a USWDS component by name.
1316
+ *
1317
+ * @example
1318
+ * ```ts
1319
+ * type ButtonProps = UswdsProps<"Button">;
1320
+ * // { label: string; variant: string | null; disabled: boolean | null; ... }
1321
+ * ```
1322
+ */
1323
+ type UswdsProps<K extends keyof typeof uswdsComponentDefinitions> = z.output<(typeof uswdsComponentDefinitions)[K]["props"]>;
1324
+
1325
+ export { type UswdsComponentDefinition, type UswdsProps, uswdsComponentDefinitions };