@gild-ui/core 0.0.0 → 0.1.0-alpha.1

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,4914 @@
1
+ // src/catalog/defineCatalogEntry.ts
2
+ /** Checks an entry against the shape of an entry and keeps its own, narrower type. */
3
+ const defineCatalogEntry = (entry) => entry;
4
+ /** A nested node, for brevity: `node('MenuItem', { value: 'web' }, ['Web'])`. */
5
+ const node = (component, props = {}, children = []) => ({
6
+ component,
7
+ props,
8
+ children
9
+ });
10
+ // src/catalog/entries/Accordion.ts
11
+ const accordionCatalog = defineCatalogEntry({
12
+ summary: "A heading that opens and closes a region of content.",
13
+ isPlaceable: true,
14
+ example: {
15
+ component: "Accordion",
16
+ props: {},
17
+ children: [node("AccordionSummary", {}, ["Title"]), node("AccordionDetails", {}, ["Content that opens and closes."])]
18
+ },
19
+ variants: [],
20
+ options: {
21
+ defaultExpanded: {
22
+ values: [true, false],
23
+ default: false
24
+ },
25
+ disabled: {
26
+ values: [true, false],
27
+ default: false
28
+ },
29
+ hasGutters: {
30
+ values: [true, false],
31
+ default: true
32
+ },
33
+ borderRadius: { scale: "radii" },
34
+ bg: {
35
+ scale: "background",
36
+ default: "paper"
37
+ },
38
+ textColor: {
39
+ scale: "text",
40
+ default: "initial"
41
+ }
42
+ },
43
+ content: { children: "children" },
44
+ twoWay: {
45
+ prop: "isExpanded",
46
+ event: "onChange",
47
+ read: "argument"
48
+ }
49
+ });
50
+ // src/catalog/entries/AccordionActions.ts
51
+ const accordionActionsCatalog = defineCatalogEntry({
52
+ summary: "The foot of an accordion's region: its buttons, at the end of a row.",
53
+ isPlaceable: false,
54
+ example: {
55
+ component: "AccordionActions",
56
+ props: {},
57
+ children: [node("Button", { variant: "text" }, ["Save"])]
58
+ },
59
+ variants: [],
60
+ options: {},
61
+ content: { children: "children" }
62
+ });
63
+ // src/catalog/entries/AccordionDetails.ts
64
+ const accordionDetailsCatalog = defineCatalogEntry({
65
+ summary: "What an accordion opens: the padded body of its region.",
66
+ isPlaceable: false,
67
+ example: {
68
+ component: "AccordionDetails",
69
+ props: {},
70
+ children: ["Content that opens and closes."]
71
+ },
72
+ variants: [],
73
+ options: {},
74
+ content: { children: "children" }
75
+ });
76
+ // src/catalog/entries/AccordionGroup.ts
77
+ const accordionGroupCatalog = defineCatalogEntry({
78
+ summary: "A column of accordions that move by the keys, and may keep one open at a time.",
79
+ isPlaceable: true,
80
+ example: {
81
+ component: "AccordionGroup",
82
+ props: {},
83
+ children: [node("Accordion", {}, [node("AccordionSummary", {}, ["First"]), node("AccordionDetails", {}, ["The first content."])]), node("Accordion", {}, [node("AccordionSummary", {}, ["Second"]), node("AccordionDetails", {}, ["The second content."])])]
84
+ },
85
+ variants: [],
86
+ options: {
87
+ isExclusive: {
88
+ values: [true, false],
89
+ default: false
90
+ },
91
+ variant: {
92
+ values: ["separated", "attached"],
93
+ default: "separated"
94
+ }
95
+ },
96
+ content: { children: "children" }
97
+ });
98
+ // src/catalog/entries/AccordionSummary.ts
99
+ const accordionSummaryHeadingLevelValues = [
100
+ 1,
101
+ 2,
102
+ 3,
103
+ 4,
104
+ 5,
105
+ 6
106
+ ];
107
+ const accordionSummaryCatalog = defineCatalogEntry({
108
+ summary: "The header of an accordion: a button in a heading that opens and closes it.",
109
+ isPlaceable: false,
110
+ example: {
111
+ component: "AccordionSummary",
112
+ props: {},
113
+ children: ["Title"]
114
+ },
115
+ variants: [],
116
+ options: { headingLevel: {
117
+ values: accordionSummaryHeadingLevelValues,
118
+ default: 3
119
+ } },
120
+ content: {
121
+ children: "children",
122
+ expandIcon: "child"
123
+ }
124
+ });
125
+ // src/catalog/entries/Chip.ts
126
+ const chipVariantValues = [
127
+ "contained",
128
+ "outlined",
129
+ "text"
130
+ ];
131
+ const variantLabels$18 = {
132
+ contained: "Filled",
133
+ outlined: "Outlined",
134
+ text: "Text"
135
+ };
136
+ const chipCatalog = defineCatalogEntry({
137
+ summary: "A compact tag: a label, an icon or an avatar, and optionally a click and a delete.",
138
+ isPlaceable: true,
139
+ example: {
140
+ component: "Chip",
141
+ props: { label: "Tag" },
142
+ children: []
143
+ },
144
+ variants: chipVariantValues.map((variant) => ({
145
+ name: variant,
146
+ label: variantLabels$18[variant],
147
+ example: {
148
+ component: "Chip",
149
+ props: {
150
+ label: "Tag",
151
+ variant
152
+ },
153
+ children: []
154
+ }
155
+ })),
156
+ options: {
157
+ variant: {
158
+ values: chipVariantValues,
159
+ default: "contained"
160
+ },
161
+ color: {
162
+ scale: "palette",
163
+ default: "default"
164
+ },
165
+ size: {
166
+ scale: "sizes",
167
+ default: "md"
168
+ },
169
+ shape: {
170
+ values: [
171
+ "square",
172
+ "rounded",
173
+ "pill"
174
+ ],
175
+ default: "pill"
176
+ },
177
+ borderRadius: { scale: "radii" },
178
+ disabled: {
179
+ values: [true, false],
180
+ default: false
181
+ }
182
+ },
183
+ content: {
184
+ label: "text",
185
+ icon: "child",
186
+ avatar: "child"
187
+ }
188
+ });
189
+ // src/catalog/entries/Badge.ts
190
+ const badgeVariantValues = ["standard", "dot"];
191
+ const badgeOverlapValues = ["rectangular", "circular"];
192
+ const badgeCatalog = defineCatalogEntry({
193
+ summary: "A count or a dot anchored over another element.",
194
+ isPlaceable: true,
195
+ example: {
196
+ component: "Badge",
197
+ props: { badgeContent: 4 },
198
+ children: [node("Icon", { name: "star" })]
199
+ },
200
+ variants: [{
201
+ name: "dot",
202
+ label: "Dot",
203
+ example: {
204
+ component: "Badge",
205
+ props: { variant: "dot" },
206
+ children: [node("Icon", { name: "star" })]
207
+ }
208
+ }],
209
+ options: {
210
+ max: {
211
+ values: [
212
+ 9,
213
+ 99,
214
+ 999
215
+ ],
216
+ default: 99
217
+ },
218
+ variant: {
219
+ values: badgeVariantValues,
220
+ default: "standard"
221
+ },
222
+ color: {
223
+ scale: "palette",
224
+ default: "error"
225
+ },
226
+ isHidden: {
227
+ values: [true, false],
228
+ default: false
229
+ },
230
+ shouldShowZero: {
231
+ values: [true, false],
232
+ default: false
233
+ },
234
+ overlap: {
235
+ values: badgeOverlapValues,
236
+ default: "rectangular"
237
+ }
238
+ },
239
+ content: {
240
+ children: "children",
241
+ badgeContent: "text"
242
+ }
243
+ });
244
+ // src/catalog/entries/Alert.ts
245
+ const alertSeverityValues = [
246
+ "success",
247
+ "info",
248
+ "warning",
249
+ "error"
250
+ ];
251
+ const alertVariantValues = [
252
+ "standard",
253
+ "contained",
254
+ "outlined"
255
+ ];
256
+ const alertCatalog = defineCatalogEntry({
257
+ summary: "An inline message with a severity, an icon, a title and an action.",
258
+ isPlaceable: true,
259
+ example: {
260
+ component: "Alert",
261
+ props: { severity: "info" },
262
+ children: [node("AlertTitle", {}, ["Heads up"]), "Your changes were saved."]
263
+ },
264
+ variants: alertSeverityValues.map((severity) => ({
265
+ name: severity,
266
+ label: severity[0].toUpperCase() + severity.slice(1),
267
+ example: {
268
+ component: "Alert",
269
+ props: { severity },
270
+ children: ["Your changes were saved."]
271
+ }
272
+ })),
273
+ options: {
274
+ severity: {
275
+ values: alertSeverityValues,
276
+ default: "info"
277
+ },
278
+ variant: {
279
+ values: alertVariantValues,
280
+ default: "standard"
281
+ },
282
+ role: {
283
+ values: ["alert", "status"],
284
+ default: "alert"
285
+ },
286
+ borderRadius: { scale: "radii" }
287
+ },
288
+ content: {
289
+ children: "children",
290
+ icon: "child",
291
+ action: "child"
292
+ }
293
+ });
294
+ // src/catalog/entries/AlertTitle.ts
295
+ const alertTitleCatalog = defineCatalogEntry({
296
+ summary: "The title of an alert: its first line, in a heavier weight.",
297
+ isPlaceable: false,
298
+ example: {
299
+ component: "AlertTitle",
300
+ props: {},
301
+ children: ["Heads up"]
302
+ },
303
+ variants: [],
304
+ options: {},
305
+ content: { children: "children" }
306
+ });
307
+ // src/catalog/entries/Fab.ts
308
+ const fabVariantValues = ["circular", "extended"];
309
+ const fabCatalog = defineCatalogEntry({
310
+ summary: "A floating action button: the one main action of a page, circular or extended.",
311
+ isPlaceable: true,
312
+ example: {
313
+ component: "Fab",
314
+ props: { "aria-label": "Add" },
315
+ children: [node("Icon", { name: "add" })]
316
+ },
317
+ variants: [{
318
+ name: "extended",
319
+ label: "Extended",
320
+ example: {
321
+ component: "Fab",
322
+ props: { variant: "extended" },
323
+ children: ["Create"]
324
+ }
325
+ }],
326
+ options: {
327
+ variant: {
328
+ values: fabVariantValues,
329
+ default: "circular"
330
+ },
331
+ color: {
332
+ scale: "palette",
333
+ default: "primary"
334
+ },
335
+ size: {
336
+ scale: "sizes",
337
+ default: "md"
338
+ },
339
+ isCollapsed: {
340
+ values: [true, false],
341
+ default: false
342
+ },
343
+ disabled: {
344
+ values: [true, false],
345
+ default: false
346
+ }
347
+ },
348
+ content: {
349
+ children: "children",
350
+ startIcon: "child"
351
+ }
352
+ });
353
+ // src/catalog/entries/Snackbar.ts
354
+ const snackbarHorizontalValues = [
355
+ "start",
356
+ "center",
357
+ "end"
358
+ ];
359
+ const snackbarVerticalValues = ["top", "bottom"];
360
+ const snackbarCatalog = defineCatalogEntry({
361
+ summary: "A transient message in a corner of the window, with auto-hide and an action.",
362
+ isPlaceable: true,
363
+ example: {
364
+ component: "Snackbar",
365
+ props: {
366
+ isOpen: true,
367
+ message: "Saved",
368
+ autoHideDuration: 4e3
369
+ },
370
+ children: []
371
+ },
372
+ variants: [],
373
+ options: {
374
+ isOpen: {
375
+ values: [true, false],
376
+ default: false
377
+ },
378
+ autoHideDuration: { values: [
379
+ 2e3,
380
+ 4e3,
381
+ 8e3
382
+ ] },
383
+ layer: {
384
+ scale: "zOrder",
385
+ default: "snackbar"
386
+ },
387
+ shape: {
388
+ values: [
389
+ "square",
390
+ "rounded",
391
+ "pill"
392
+ ],
393
+ default: "rounded"
394
+ },
395
+ borderRadius: { scale: "radii" },
396
+ bg: {
397
+ scale: "background",
398
+ default: "modal"
399
+ },
400
+ textColor: {
401
+ scale: "text",
402
+ default: "initial"
403
+ }
404
+ },
405
+ content: {
406
+ message: "text",
407
+ action: "child",
408
+ children: "children"
409
+ }
410
+ });
411
+ // src/catalog/entries/Tooltip.ts
412
+ const tooltipPlacementValues = [
413
+ "top",
414
+ "top-start",
415
+ "top-end",
416
+ "bottom",
417
+ "bottom-start",
418
+ "bottom-end",
419
+ "left",
420
+ "left-start",
421
+ "left-end",
422
+ "right",
423
+ "right-start",
424
+ "right-end",
425
+ "auto",
426
+ "auto-start",
427
+ "auto-end"
428
+ ];
429
+ const tooltipCatalog = defineCatalogEntry({
430
+ summary: "A short description of one element, shown on hover, keyboard focus and a long touch.",
431
+ isPlaceable: true,
432
+ example: {
433
+ component: "Tooltip",
434
+ props: { title: "Save the page" },
435
+ children: [node("Button", { variant: "outlined" }, ["Save"])]
436
+ },
437
+ variants: [],
438
+ options: {
439
+ placement: {
440
+ values: tooltipPlacementValues,
441
+ default: "top"
442
+ },
443
+ hasArrow: {
444
+ values: [true, false],
445
+ default: false
446
+ },
447
+ enterDelay: {
448
+ values: [
449
+ 0,
450
+ 100,
451
+ 500
452
+ ],
453
+ default: 100
454
+ },
455
+ leaveDelay: {
456
+ values: [
457
+ 0,
458
+ 200,
459
+ 500
460
+ ],
461
+ default: 0
462
+ },
463
+ shouldDescribeChild: {
464
+ values: [true, false],
465
+ default: false
466
+ },
467
+ isInteractive: {
468
+ values: [true, false],
469
+ default: true
470
+ },
471
+ shouldWrapDisabledChild: {
472
+ values: [true, false],
473
+ default: true
474
+ },
475
+ isDescriptionPersistent: {
476
+ values: [true, false],
477
+ default: false
478
+ },
479
+ shouldOpenOnHover: {
480
+ values: [true, false],
481
+ default: true
482
+ },
483
+ shouldOpenOnFocus: {
484
+ values: [true, false],
485
+ default: true
486
+ },
487
+ shouldOpenOnTouch: {
488
+ values: [true, false],
489
+ default: true
490
+ },
491
+ layer: {
492
+ scale: "zOrder",
493
+ default: "tooltip"
494
+ },
495
+ borderRadius: { scale: "radii" },
496
+ bg: {
497
+ scale: "background",
498
+ default: "modal"
499
+ },
500
+ textColor: {
501
+ scale: "text",
502
+ default: "initial"
503
+ }
504
+ },
505
+ content: {
506
+ title: "text",
507
+ children: "child"
508
+ }
509
+ });
510
+ // src/catalog/entries/Autocomplete.ts
511
+ const autocompleteVariantValues = [
512
+ "default",
513
+ "outlined",
514
+ "underline",
515
+ "text"
516
+ ];
517
+ const autocompleteCatalog = defineCatalogEntry({
518
+ summary: "A field whose text finds an option in a list - one choice, several as chips, or free text.",
519
+ isPlaceable: true,
520
+ example: {
521
+ component: "Autocomplete",
522
+ props: {
523
+ options: [
524
+ "Berlin",
525
+ "Lisbon",
526
+ "Oslo",
527
+ "Rome"
528
+ ],
529
+ variant: "outlined",
530
+ "aria-label": "City",
531
+ noOptionsText: "No city matches"
532
+ },
533
+ children: []
534
+ },
535
+ variants: [],
536
+ options: {
537
+ multiple: {
538
+ values: [true, false],
539
+ default: false
540
+ },
541
+ shouldAllowFreeText: {
542
+ values: [true, false],
543
+ default: false
544
+ },
545
+ isLoading: {
546
+ values: [true, false],
547
+ default: false
548
+ },
549
+ variant: {
550
+ values: autocompleteVariantValues,
551
+ default: "default"
552
+ },
553
+ size: {
554
+ scale: "sizes",
555
+ default: "md"
556
+ },
557
+ color: {
558
+ scale: "palette",
559
+ default: "primary"
560
+ },
561
+ error: {
562
+ values: [true, false],
563
+ default: false
564
+ },
565
+ disabled: {
566
+ values: [true, false],
567
+ default: false
568
+ },
569
+ required: {
570
+ values: [true, false],
571
+ default: false
572
+ },
573
+ fullWidth: {
574
+ values: [true, false],
575
+ default: false
576
+ },
577
+ layer: {
578
+ scale: "zOrder",
579
+ default: "modal"
580
+ },
581
+ borderRadius: { scale: "radii" },
582
+ bg: {
583
+ scale: "background",
584
+ default: "modal"
585
+ },
586
+ textColor: {
587
+ scale: "text",
588
+ default: "primary"
589
+ }
590
+ },
591
+ content: {}
592
+ });
593
+ // src/catalog/entries/ScrollArea.ts
594
+ const scrollAreaAxesValues = [
595
+ "y",
596
+ "x",
597
+ "both"
598
+ ];
599
+ const scrollAreaCatalog = defineCatalogEntry({
600
+ summary: "A scrolling area whose scrollbars are drawn over its content, and show while it is hovered.",
601
+ isPlaceable: true,
602
+ example: {
603
+ component: "ScrollArea",
604
+ props: {
605
+ maxHeight: 120,
606
+ "aria-label": "Notes",
607
+ tabIndex: 0
608
+ },
609
+ children: ["A long list of notes, taller than the area that holds it, so the thumb shows on hover."]
610
+ },
611
+ variants: [],
612
+ options: {
613
+ axes: {
614
+ values: scrollAreaAxesValues,
615
+ default: "y"
616
+ },
617
+ maxHeight: { values: [120, 240] }
618
+ },
619
+ content: { children: "children" }
620
+ });
621
+ // src/catalog/entries/FabMenu.ts
622
+ const fabMenuDirectionValues = [
623
+ "up",
624
+ "down",
625
+ "left",
626
+ "right"
627
+ ];
628
+ const fabMenuAlignValues = ["end", "start"];
629
+ const fabMenuCatalog = defineCatalogEntry({
630
+ summary: "A fab that opens a stack of actions - extended pills - from the corner of a page.",
631
+ isPlaceable: true,
632
+ example: {
633
+ component: "FabMenu",
634
+ props: { "aria-label": "Create" },
635
+ children: [node("FabMenuItem", {}, [node("Icon", { name: "add" }), "Document"]), node("FabMenuItem", {}, ["Folder"])]
636
+ },
637
+ variants: [],
638
+ options: {
639
+ direction: {
640
+ values: fabMenuDirectionValues,
641
+ default: "up"
642
+ },
643
+ align: {
644
+ values: fabMenuAlignValues,
645
+ default: "end"
646
+ },
647
+ color: {
648
+ scale: "palette",
649
+ default: "primary"
650
+ },
651
+ size: {
652
+ scale: "sizes",
653
+ default: "md"
654
+ },
655
+ isOpen: {
656
+ values: [true, false],
657
+ default: false
658
+ }
659
+ },
660
+ content: { children: "children" }
661
+ });
662
+ // src/catalog/entries/FabMenuItem.ts
663
+ const fabMenuItemCatalog = defineCatalogEntry({
664
+ summary: "One action of a FabMenu: an extended fab with an icon and a label.",
665
+ isPlaceable: false,
666
+ example: {
667
+ component: "FabMenuItem",
668
+ props: {},
669
+ children: ["Document"]
670
+ },
671
+ variants: [],
672
+ options: {
673
+ color: {
674
+ scale: "palette",
675
+ default: "secondary"
676
+ },
677
+ disabled: {
678
+ values: [true, false],
679
+ default: false
680
+ }
681
+ },
682
+ content: {
683
+ children: "text",
684
+ icon: "child"
685
+ }
686
+ });
687
+ // src/catalog/entries/NavTree.ts
688
+ const navTreeCatalog = defineCatalogEntry({
689
+ summary: "A tree of links to the pages of a site - groups of links, and links of its own.",
690
+ isPlaceable: true,
691
+ example: {
692
+ component: "NavTree",
693
+ props: {},
694
+ children: [node("NavGroup", { label: "Components" }, [node("NavLink", {
695
+ href: "/components/button/",
696
+ isCurrent: true
697
+ }, ["Button"]), node("NavLink", { href: "/components/tabs/" }, ["Tabs"])]), node("NavGroup", {
698
+ label: "Guides",
699
+ isCollapsible: true,
700
+ isOpen: true
701
+ }, [node("NavLink", { href: "/guides/theming/" }, ["Theming"])])]
702
+ },
703
+ variants: [],
704
+ options: { color: {
705
+ scale: "palette",
706
+ default: "primary"
707
+ } },
708
+ content: { children: "children" }
709
+ });
710
+ // src/catalog/entries/NavGroup.ts
711
+ const navGroupCatalog = defineCatalogEntry({
712
+ summary: "A group of a `NavTree`: a name over a list of links, which can fold under its name.",
713
+ isPlaceable: false,
714
+ example: {
715
+ component: "NavGroup",
716
+ props: { label: "Components" },
717
+ children: []
718
+ },
719
+ variants: [],
720
+ options: {
721
+ isCollapsible: {
722
+ values: [true, false],
723
+ default: false
724
+ },
725
+ isOpen: {
726
+ values: [true, false],
727
+ default: false
728
+ }
729
+ },
730
+ content: {
731
+ children: "children",
732
+ label: "text"
733
+ }
734
+ });
735
+ // src/catalog/entries/NavLink.ts
736
+ const navLinkCatalog = defineCatalogEntry({
737
+ summary: "A link to a page of a site, a row of a `NavTree` - filled when it is the current page.",
738
+ isPlaceable: false,
739
+ example: {
740
+ component: "NavLink",
741
+ props: { href: "/components/button/" },
742
+ children: ["Button"]
743
+ },
744
+ variants: [],
745
+ options: {
746
+ color: { scale: "palette" },
747
+ isCurrent: {
748
+ values: [true, false],
749
+ default: false
750
+ },
751
+ isExternal: {
752
+ values: [true, false],
753
+ default: false
754
+ }
755
+ },
756
+ content: {
757
+ children: "children",
758
+ href: "text",
759
+ note: "text"
760
+ }
761
+ });
762
+ // src/catalog/entries/AppBar.ts
763
+ const appBarPositionValues = [
764
+ "static",
765
+ "relative",
766
+ "absolute",
767
+ "fixed",
768
+ "sticky"
769
+ ];
770
+ const pictured$2 = [
771
+ "paper",
772
+ "primary",
773
+ "secondary",
774
+ "modal"
775
+ ];
776
+ const colorLabels$5 = {
777
+ paper: "Paper",
778
+ primary: "Primary",
779
+ secondary: "Secondary",
780
+ modal: "Modal"
781
+ };
782
+ const appBarCatalog = defineCatalogEntry({
783
+ summary: "A full-width header bar for an app title, navigation and actions.",
784
+ isPlaceable: true,
785
+ example: {
786
+ component: "AppBar",
787
+ props: { color: "paper" },
788
+ children: ["Application Header"]
789
+ },
790
+ variants: pictured$2.map((color) => ({
791
+ name: color,
792
+ label: colorLabels$5[color],
793
+ example: {
794
+ component: "AppBar",
795
+ props: { color },
796
+ children: ["Application Header"]
797
+ }
798
+ })),
799
+ options: {
800
+ color: { scale: "background" },
801
+ size: {
802
+ scale: "sizes",
803
+ default: "md"
804
+ },
805
+ elevation: {
806
+ values: [
807
+ 0,
808
+ 4,
809
+ 8,
810
+ 12,
811
+ 16,
812
+ 24
813
+ ],
814
+ default: 4
815
+ },
816
+ position: {
817
+ values: appBarPositionValues,
818
+ default: "static"
819
+ },
820
+ blur: {
821
+ values: [true, false],
822
+ default: false
823
+ }
824
+ },
825
+ content: { children: "children" },
826
+ preview: { width: 480 }
827
+ });
828
+ // src/catalog/entries/Avatar.ts
829
+ const avatarVariantValues = [
830
+ "circular",
831
+ "rounded",
832
+ "square"
833
+ ];
834
+ const variantLabels$17 = {
835
+ circular: "Circular",
836
+ rounded: "Rounded",
837
+ square: "Square"
838
+ };
839
+ const initials = {
840
+ size: "md",
841
+ bg: "secondary"
842
+ };
843
+ const avatarCatalog = defineCatalogEntry({
844
+ summary: "A person or entity shown as an image, or as initials when there is no image.",
845
+ isPlaceable: true,
846
+ example: {
847
+ component: "Avatar",
848
+ props: {
849
+ ...initials,
850
+ variant: "circular"
851
+ },
852
+ children: ["MS"]
853
+ },
854
+ variants: avatarVariantValues.map((variant) => ({
855
+ name: variant,
856
+ label: variantLabels$17[variant],
857
+ example: {
858
+ component: "Avatar",
859
+ props: {
860
+ ...initials,
861
+ variant
862
+ },
863
+ children: ["MS"]
864
+ }
865
+ })),
866
+ options: {
867
+ variant: {
868
+ values: avatarVariantValues,
869
+ default: "circular"
870
+ },
871
+ size: {
872
+ scale: "avatar",
873
+ default: "md"
874
+ },
875
+ bg: { scale: "background" },
876
+ ring: {
877
+ values: [true, false],
878
+ default: false
879
+ },
880
+ ringColor: {
881
+ scale: "border",
882
+ default: "primary"
883
+ },
884
+ ringWidth: {
885
+ scale: "borderWidths",
886
+ default: "thin"
887
+ }
888
+ },
889
+ content: { children: "children" }
890
+ });
891
+ // src/catalog/entries/Backdrop.ts
892
+ const backdropCatalog = defineCatalogEntry({
893
+ summary: "The dimmed full-viewport scrim a modal draws behind its content.",
894
+ isPlaceable: false,
895
+ example: {
896
+ component: "Backdrop",
897
+ props: {},
898
+ children: []
899
+ },
900
+ variants: [],
901
+ options: { bg: {
902
+ scale: "background",
903
+ default: "backdrop"
904
+ } },
905
+ content: {},
906
+ preview: {
907
+ width: 320,
908
+ height: 200
909
+ }
910
+ });
911
+ // src/catalog/entries/Breadcrumbs.ts
912
+ const breadcrumbsSeparatorValues = [
913
+ "/",
914
+ "›",
915
+ "-",
916
+ "·"
917
+ ];
918
+ const crumbs = [
919
+ node("Link", {
920
+ href: "#",
921
+ underline: "hover",
922
+ color: "inherit"
923
+ }, ["Home"]),
924
+ node("Link", {
925
+ href: "#",
926
+ underline: "hover",
927
+ color: "inherit"
928
+ }, ["Catalog"]),
929
+ node("Typography", {
930
+ color: "primary",
931
+ "aria-current": "page"
932
+ }, ["Accessories"])
933
+ ];
934
+ const breadcrumbsCatalog = defineCatalogEntry({
935
+ summary: "The trail of links from a site's root to the current page.",
936
+ isPlaceable: true,
937
+ example: {
938
+ component: "Breadcrumbs",
939
+ props: {
940
+ "aria-label": "Breadcrumb",
941
+ expandLabel: "Show path"
942
+ },
943
+ children: crumbs
944
+ },
945
+ variants: breadcrumbsSeparatorValues.map((separator) => ({
946
+ name: separator,
947
+ label: `Separated by ${separator}`,
948
+ example: {
949
+ component: "Breadcrumbs",
950
+ props: {
951
+ "aria-label": "Breadcrumb",
952
+ separator
953
+ },
954
+ children: crumbs
955
+ }
956
+ })),
957
+ options: {
958
+ separator: {
959
+ values: breadcrumbsSeparatorValues,
960
+ default: "/"
961
+ },
962
+ maxItems: {
963
+ values: [
964
+ 2,
965
+ 3,
966
+ 4,
967
+ 8
968
+ ],
969
+ default: 8
970
+ },
971
+ itemsBeforeCollapse: {
972
+ values: [
973
+ 0,
974
+ 1,
975
+ 2
976
+ ],
977
+ default: 1
978
+ },
979
+ itemsAfterCollapse: {
980
+ values: [1, 2],
981
+ default: 1
982
+ },
983
+ color: {
984
+ scale: "text",
985
+ default: "secondary"
986
+ },
987
+ typography: {
988
+ scale: "typography",
989
+ default: "body1"
990
+ }
991
+ },
992
+ content: { children: "children" }
993
+ });
994
+ // src/catalog/entries/Button.ts
995
+ const buttonVariantValues = [
996
+ "contained",
997
+ "outlined",
998
+ "text"
999
+ ];
1000
+ const buttonShapeValues = [
1001
+ "square",
1002
+ "rounded",
1003
+ "pill"
1004
+ ];
1005
+ const buttonLoadingPositionValues = [
1006
+ "start",
1007
+ "end",
1008
+ "center"
1009
+ ];
1010
+ const variantLabels$16 = {
1011
+ contained: "Contained",
1012
+ outlined: "Outlined",
1013
+ text: "Text"
1014
+ };
1015
+ const buttonCatalog = defineCatalogEntry({
1016
+ summary: "An action - filled, stroked or plain, in any palette color, or a link with `href`.",
1017
+ isPlaceable: true,
1018
+ example: {
1019
+ component: "Button",
1020
+ props: { variant: "contained" },
1021
+ children: ["Button"]
1022
+ },
1023
+ variants: buttonVariantValues.map((variant) => ({
1024
+ name: variant,
1025
+ label: variantLabels$16[variant],
1026
+ example: {
1027
+ component: "Button",
1028
+ props: { variant },
1029
+ children: ["Button"]
1030
+ }
1031
+ })),
1032
+ options: {
1033
+ variant: {
1034
+ values: buttonVariantValues,
1035
+ default: "contained"
1036
+ },
1037
+ color: {
1038
+ scale: "palette",
1039
+ default: "primary"
1040
+ },
1041
+ size: {
1042
+ scale: "sizes",
1043
+ default: "md"
1044
+ },
1045
+ shape: {
1046
+ values: buttonShapeValues,
1047
+ default: "square"
1048
+ },
1049
+ fullWidth: {
1050
+ values: [true, false],
1051
+ default: false
1052
+ },
1053
+ disabled: {
1054
+ values: [true, false],
1055
+ default: false
1056
+ },
1057
+ loading: {
1058
+ values: [true, false],
1059
+ default: false
1060
+ },
1061
+ loadingPosition: {
1062
+ values: buttonLoadingPositionValues,
1063
+ default: "center"
1064
+ }
1065
+ },
1066
+ content: {
1067
+ children: "children",
1068
+ startIcon: "child",
1069
+ endIcon: "child",
1070
+ loadingIndicator: "child"
1071
+ },
1072
+ domEvents: ["onClick"]
1073
+ });
1074
+ // src/catalog/entries/ButtonGroup.ts
1075
+ const buttonGroupVariantValues = [
1076
+ "contained",
1077
+ "outlined",
1078
+ "text"
1079
+ ];
1080
+ const buttonGroupOrientationValues = ["horizontal", "vertical"];
1081
+ const variantLabels$15 = {
1082
+ contained: "Contained",
1083
+ outlined: "Outlined",
1084
+ text: "Text"
1085
+ };
1086
+ const buttons = [
1087
+ node("Button", {}, ["One"]),
1088
+ node("Button", {}, ["Two"]),
1089
+ node("Button", {}, ["Three"])
1090
+ ];
1091
+ const buttonGroupCatalog = defineCatalogEntry({
1092
+ summary: "A row or column of related buttons joined into one cluster that share a style.",
1093
+ isPlaceable: true,
1094
+ example: {
1095
+ component: "ButtonGroup",
1096
+ props: { "aria-label": "Basic button group" },
1097
+ children: buttons
1098
+ },
1099
+ variants: buttonGroupVariantValues.map((variant) => ({
1100
+ name: variant,
1101
+ label: variantLabels$15[variant],
1102
+ example: {
1103
+ component: "ButtonGroup",
1104
+ props: {
1105
+ variant,
1106
+ "aria-label": "Basic button group"
1107
+ },
1108
+ children: buttons
1109
+ }
1110
+ })),
1111
+ options: {
1112
+ variant: {
1113
+ values: buttonGroupVariantValues,
1114
+ default: "outlined"
1115
+ },
1116
+ color: {
1117
+ scale: "palette",
1118
+ default: "primary"
1119
+ },
1120
+ size: {
1121
+ scale: "sizes",
1122
+ default: "md"
1123
+ },
1124
+ orientation: {
1125
+ values: buttonGroupOrientationValues,
1126
+ default: "horizontal"
1127
+ },
1128
+ borderRadius: {
1129
+ scale: "radii",
1130
+ default: "md"
1131
+ },
1132
+ disabled: {
1133
+ values: [true, false],
1134
+ default: false
1135
+ },
1136
+ fullWidth: {
1137
+ values: [true, false],
1138
+ default: false
1139
+ }
1140
+ },
1141
+ content: { children: "children" }
1142
+ });
1143
+ // src/catalog/entries/Card.ts
1144
+ const cardVariantValues = [
1145
+ "paper",
1146
+ "bracketBox",
1147
+ "interactive"
1148
+ ];
1149
+ const variantLabels$14 = {
1150
+ paper: "Paper",
1151
+ bracketBox: "Bracket box",
1152
+ interactive: "Interactive"
1153
+ };
1154
+ const content$2 = {
1155
+ title: "Component",
1156
+ caption: "A flexible card surface with paper and bracketBox variants.",
1157
+ p: 3
1158
+ };
1159
+ const cardCatalog = defineCatalogEntry({
1160
+ summary: "A surface with an optional icon, title and caption over its own content.",
1161
+ isPlaceable: true,
1162
+ example: {
1163
+ component: "Card",
1164
+ props: content$2,
1165
+ children: []
1166
+ },
1167
+ variants: cardVariantValues.map((variant) => ({
1168
+ name: variant,
1169
+ label: variantLabels$14[variant],
1170
+ example: {
1171
+ component: "Card",
1172
+ props: {
1173
+ ...content$2,
1174
+ variant
1175
+ },
1176
+ children: []
1177
+ }
1178
+ })),
1179
+ options: {
1180
+ variant: {
1181
+ values: cardVariantValues,
1182
+ default: "paper"
1183
+ },
1184
+ elevation: {
1185
+ values: [
1186
+ 0,
1187
+ 1,
1188
+ 2,
1189
+ 4,
1190
+ 8,
1191
+ 16,
1192
+ 24
1193
+ ],
1194
+ default: 1
1195
+ }
1196
+ },
1197
+ content: {
1198
+ children: "children",
1199
+ title: "text",
1200
+ caption: "text"
1201
+ },
1202
+ preview: { width: 280 }
1203
+ });
1204
+ // src/catalog/entries/Checkbox.ts
1205
+ const colorLabels$4 = {
1206
+ default: "Default",
1207
+ primary: "Primary",
1208
+ secondary: "Secondary",
1209
+ success: "Success",
1210
+ error: "Error",
1211
+ info: "Info",
1212
+ warning: "Warning"
1213
+ };
1214
+ const checkboxCatalog = defineCatalogEntry({
1215
+ summary: "A box that is checked or not, with an optional label and an indeterminate state.",
1216
+ isPlaceable: true,
1217
+ example: {
1218
+ component: "Checkbox",
1219
+ props: {},
1220
+ children: ["Accept terms and conditions"]
1221
+ },
1222
+ variants: Object.keys(colorLabels$4).map((color) => ({
1223
+ name: color,
1224
+ label: colorLabels$4[color],
1225
+ example: {
1226
+ component: "Checkbox",
1227
+ props: {
1228
+ color,
1229
+ checked: true
1230
+ },
1231
+ children: ["Accept terms and conditions"]
1232
+ }
1233
+ })),
1234
+ options: {
1235
+ color: {
1236
+ scale: "palette",
1237
+ default: "default"
1238
+ },
1239
+ size: {
1240
+ scale: "sizes",
1241
+ default: "md"
1242
+ },
1243
+ indeterminate: {
1244
+ values: [true, false],
1245
+ default: false
1246
+ },
1247
+ disabled: {
1248
+ values: [true, false],
1249
+ default: false
1250
+ },
1251
+ required: {
1252
+ values: [true, false],
1253
+ default: false
1254
+ },
1255
+ fullWidth: {
1256
+ values: [true, false],
1257
+ default: false
1258
+ }
1259
+ },
1260
+ content: {
1261
+ children: "children",
1262
+ icon: "child",
1263
+ checkedIcon: "child"
1264
+ },
1265
+ twoWay: {
1266
+ prop: "checked",
1267
+ event: "onChange",
1268
+ read: "target.checked"
1269
+ }
1270
+ });
1271
+ // src/catalog/entries/transition.ts
1272
+ /** The easings a transition names - the keys of `theme.transitions.easing`. */
1273
+ const transitionEasingValues = [
1274
+ "standard",
1275
+ "enter",
1276
+ "exit"
1277
+ ];
1278
+ /** What every transition around one child offers a picker. */
1279
+ const transitionOptions = {
1280
+ isShown: {
1281
+ values: [true, false],
1282
+ default: false
1283
+ },
1284
+ shouldAppear: {
1285
+ values: [true, false],
1286
+ default: true
1287
+ },
1288
+ shouldMountOnEnter: {
1289
+ values: [true, false],
1290
+ default: false
1291
+ },
1292
+ shouldUnmountOnExit: {
1293
+ values: [true, false],
1294
+ default: false
1295
+ },
1296
+ timeout: {
1297
+ values: [
1298
+ 150,
1299
+ 250,
1300
+ 375
1301
+ ],
1302
+ default: 250
1303
+ },
1304
+ easing: {
1305
+ values: transitionEasingValues,
1306
+ default: "standard"
1307
+ }
1308
+ };
1309
+ /** The child a freshly placed transition holds. */
1310
+ const transitionExampleChild = {
1311
+ component: "Paper",
1312
+ props: {
1313
+ p: 3,
1314
+ width: "12rem"
1315
+ },
1316
+ children: ["Content that moves"]
1317
+ };
1318
+ // src/catalog/entries/Collapse.ts
1319
+ const collapseOrientationValues = ["vertical", "horizontal"];
1320
+ const collapseCatalog = defineCatalogEntry({
1321
+ summary: "Opens and closes its content by its height, or its width.",
1322
+ isPlaceable: true,
1323
+ example: {
1324
+ component: "Collapse",
1325
+ props: { isShown: true },
1326
+ children: ["Content that opens and closes"]
1327
+ },
1328
+ variants: [],
1329
+ options: {
1330
+ ...transitionOptions,
1331
+ orientation: {
1332
+ values: collapseOrientationValues,
1333
+ default: "vertical"
1334
+ },
1335
+ collapsedSize: {
1336
+ values: [
1337
+ 0,
1338
+ 24,
1339
+ 48
1340
+ ],
1341
+ default: 0
1342
+ }
1343
+ },
1344
+ content: { children: "children" }
1345
+ });
1346
+ // src/catalog/entries/Fade.ts
1347
+ const fadeCatalog = defineCatalogEntry({
1348
+ summary: "Fades one child in and out by its opacity.",
1349
+ isPlaceable: true,
1350
+ example: {
1351
+ component: "Fade",
1352
+ props: { isShown: true },
1353
+ children: [transitionExampleChild]
1354
+ },
1355
+ variants: [],
1356
+ options: { ...transitionOptions },
1357
+ content: { children: "child" }
1358
+ });
1359
+ // src/catalog/entries/Grow.ts
1360
+ const growCatalog = defineCatalogEntry({
1361
+ summary: "Grows one child in from a little smaller, fading as it does, and shrinks it out.",
1362
+ isPlaceable: true,
1363
+ example: {
1364
+ component: "Grow",
1365
+ props: { isShown: true },
1366
+ children: [transitionExampleChild]
1367
+ },
1368
+ variants: [],
1369
+ options: { ...transitionOptions },
1370
+ content: { children: "child" }
1371
+ });
1372
+ // src/catalog/entries/Slide.ts
1373
+ const slideDirectionValues = [
1374
+ "up",
1375
+ "down",
1376
+ "left",
1377
+ "right"
1378
+ ];
1379
+ const slideCatalog = defineCatalogEntry({
1380
+ summary: "Slides one child in from an edge of the window and back out.",
1381
+ isPlaceable: true,
1382
+ example: {
1383
+ component: "Slide",
1384
+ props: { isShown: true },
1385
+ children: [transitionExampleChild]
1386
+ },
1387
+ variants: [],
1388
+ options: {
1389
+ ...transitionOptions,
1390
+ direction: {
1391
+ values: slideDirectionValues,
1392
+ default: "down"
1393
+ }
1394
+ },
1395
+ content: { children: "child" }
1396
+ });
1397
+ // src/catalog/entries/Zoom.ts
1398
+ const zoomCatalog = defineCatalogEntry({
1399
+ summary: "Zooms one child in from nothing and out to nothing.",
1400
+ isPlaceable: true,
1401
+ example: {
1402
+ component: "Zoom",
1403
+ props: { isShown: true },
1404
+ children: [transitionExampleChild]
1405
+ },
1406
+ variants: [],
1407
+ options: { ...transitionOptions },
1408
+ content: { children: "child" }
1409
+ });
1410
+ // src/catalog/entries/ContextMenu.ts
1411
+ const contextMenuCatalog = defineCatalogEntry({
1412
+ summary: "A `MenuList` opened by a right-click over its `target`, at the pointer.",
1413
+ isPlaceable: false,
1414
+ example: {
1415
+ component: "ContextMenu",
1416
+ props: { "aria-label": "Canvas" },
1417
+ children: [
1418
+ node("MenuItem", {
1419
+ value: "cut",
1420
+ shortcut: "Control+X"
1421
+ }, ["Cut"]),
1422
+ node("MenuItem", {
1423
+ value: "copy",
1424
+ shortcut: "Control+C"
1425
+ }, ["Copy"]),
1426
+ node("MenuItem", {
1427
+ value: "paste",
1428
+ shortcut: "Control+V",
1429
+ disabled: true,
1430
+ note: "The clipboard is empty"
1431
+ }, ["Paste"])
1432
+ ]
1433
+ },
1434
+ variants: [],
1435
+ options: {
1436
+ color: {
1437
+ scale: "palette",
1438
+ default: "primary"
1439
+ },
1440
+ textColor: { scale: "text" },
1441
+ size: {
1442
+ scale: "sizes",
1443
+ default: "md"
1444
+ },
1445
+ dense: {
1446
+ values: [true, false],
1447
+ default: false
1448
+ },
1449
+ elevation: {
1450
+ values: [
1451
+ 0,
1452
+ 1,
1453
+ 2,
1454
+ 4,
1455
+ 8,
1456
+ 16,
1457
+ 24
1458
+ ],
1459
+ default: 8
1460
+ },
1461
+ borderRadius: { scale: "radii" },
1462
+ layer: { scale: "zOrder" },
1463
+ marginThreshold: { scale: "space" }
1464
+ },
1465
+ content: {
1466
+ children: "children",
1467
+ target: "child",
1468
+ emptyLabel: "text",
1469
+ items: "none"
1470
+ },
1471
+ domEvents: [
1472
+ "onSelect",
1473
+ "onClose",
1474
+ "onKeyDown"
1475
+ ]
1476
+ });
1477
+ // src/catalog/entries/CircularProgress.ts
1478
+ const circularProgressVariantValues = ["indeterminate", "determinate"];
1479
+ const circularProgressEasingValues = [
1480
+ "linear",
1481
+ "ease",
1482
+ "ease-in",
1483
+ "ease-out",
1484
+ "ease-in-out"
1485
+ ];
1486
+ const variantLabels$13 = {
1487
+ indeterminate: "Indeterminate",
1488
+ determinate: "Determinate"
1489
+ };
1490
+ const variantProps$2 = {
1491
+ indeterminate: { variant: "indeterminate" },
1492
+ determinate: {
1493
+ variant: "determinate",
1494
+ value: 70
1495
+ }
1496
+ };
1497
+ const circularProgressCatalog = defineCatalogEntry({
1498
+ summary: "A circular loading indicator - a looping spinner, or an arc that shows a `value`.",
1499
+ isPlaceable: true,
1500
+ example: {
1501
+ component: "CircularProgress",
1502
+ props: {
1503
+ variant: "indeterminate",
1504
+ color: "primary",
1505
+ size: 40
1506
+ },
1507
+ children: []
1508
+ },
1509
+ variants: circularProgressVariantValues.map((variant) => ({
1510
+ name: variant,
1511
+ label: variantLabels$13[variant],
1512
+ example: {
1513
+ component: "CircularProgress",
1514
+ props: {
1515
+ ...variantProps$2[variant],
1516
+ color: "primary",
1517
+ size: 40
1518
+ },
1519
+ children: []
1520
+ }
1521
+ })),
1522
+ options: {
1523
+ variant: {
1524
+ values: circularProgressVariantValues,
1525
+ default: "indeterminate"
1526
+ },
1527
+ color: {
1528
+ scale: "palette",
1529
+ default: "primary"
1530
+ },
1531
+ size: { default: 40 },
1532
+ thickness: { default: 3.6 },
1533
+ min: { default: 0 },
1534
+ max: { default: 100 },
1535
+ disableShrink: {
1536
+ values: [true, false],
1537
+ default: false
1538
+ },
1539
+ spinning: {
1540
+ values: [true, false],
1541
+ default: false
1542
+ },
1543
+ easing: {
1544
+ values: circularProgressEasingValues,
1545
+ default: "linear"
1546
+ },
1547
+ showTrack: {
1548
+ values: [true, false],
1549
+ default: false
1550
+ }
1551
+ },
1552
+ content: {}
1553
+ });
1554
+ // src/catalog/entries/Drawer.ts
1555
+ const drawerAnchorValues = [
1556
+ "left",
1557
+ "right",
1558
+ "top",
1559
+ "bottom"
1560
+ ];
1561
+ const anchorLabels = {
1562
+ left: "Left",
1563
+ right: "Right",
1564
+ top: "Top",
1565
+ bottom: "Bottom"
1566
+ };
1567
+ const body = (anchor) => [node("Flex", {
1568
+ flexDirection: "column",
1569
+ gap: 3,
1570
+ p: 4,
1571
+ width: anchor === "top" || anchor === "bottom" ? "100%" : "260px"
1572
+ }, [node("Typography", {
1573
+ variant: "h6",
1574
+ m: 0
1575
+ }, ["Drawer"]), node("Typography", {
1576
+ variant: "body2",
1577
+ color: "secondary",
1578
+ m: 0
1579
+ }, ["Press Escape or click outside to close."])])];
1580
+ const drawerCatalog = defineCatalogEntry({
1581
+ summary: "A panel that slides in from a screen edge, opened by a `DrawerToggle` with the same `id`.",
1582
+ isPlaceable: true,
1583
+ example: {
1584
+ component: "Drawer",
1585
+ props: {
1586
+ id: "drawer",
1587
+ isOpen: true,
1588
+ anchor: "left"
1589
+ },
1590
+ children: body("left")
1591
+ },
1592
+ variants: drawerAnchorValues.map((anchor) => ({
1593
+ name: anchor,
1594
+ label: anchorLabels[anchor],
1595
+ example: {
1596
+ component: "Drawer",
1597
+ props: {
1598
+ id: "drawer",
1599
+ isOpen: true,
1600
+ anchor
1601
+ },
1602
+ children: body(anchor)
1603
+ }
1604
+ })),
1605
+ options: {
1606
+ anchor: {
1607
+ values: drawerAnchorValues,
1608
+ default: "left"
1609
+ },
1610
+ elevation: {
1611
+ values: [
1612
+ 0,
1613
+ 1,
1614
+ 2,
1615
+ 4,
1616
+ 8,
1617
+ 16,
1618
+ 24
1619
+ ],
1620
+ default: 16
1621
+ },
1622
+ transitionDuration: { default: 225 },
1623
+ hasBackdrop: {
1624
+ values: [true, false],
1625
+ default: true
1626
+ },
1627
+ shouldLockScroll: {
1628
+ values: [true, false],
1629
+ default: true
1630
+ },
1631
+ shouldAutoFocus: {
1632
+ values: [true, false],
1633
+ default: true
1634
+ },
1635
+ shouldTrapFocus: {
1636
+ values: [true, false],
1637
+ default: true
1638
+ },
1639
+ shouldRestoreFocus: {
1640
+ values: [true, false],
1641
+ default: true
1642
+ }
1643
+ },
1644
+ content: { children: "children" },
1645
+ domEvents: ["onClose"],
1646
+ preview: {
1647
+ width: 480,
1648
+ height: 320
1649
+ }
1650
+ });
1651
+ // src/catalog/entries/DrawerToggle.ts
1652
+ const drawerToggleActionValues = [
1653
+ "toggle",
1654
+ "show",
1655
+ "hide"
1656
+ ];
1657
+ const drawerToggleCatalog = defineCatalogEntry({
1658
+ summary: "The button that opens, closes or toggles the `Drawer` whose `id` it names in `drawer`.",
1659
+ isPlaceable: false,
1660
+ example: {
1661
+ component: "DrawerToggle",
1662
+ props: {
1663
+ drawer: "drawer",
1664
+ action: "toggle"
1665
+ },
1666
+ children: ["Open drawer"]
1667
+ },
1668
+ variants: [],
1669
+ options: {
1670
+ action: {
1671
+ values: drawerToggleActionValues,
1672
+ default: "toggle"
1673
+ },
1674
+ variant: {
1675
+ values: [
1676
+ "contained",
1677
+ "outlined",
1678
+ "text"
1679
+ ],
1680
+ default: "contained"
1681
+ },
1682
+ color: {
1683
+ scale: "palette",
1684
+ default: "primary"
1685
+ },
1686
+ size: {
1687
+ scale: "sizes",
1688
+ default: "md"
1689
+ },
1690
+ disabled: {
1691
+ values: [true, false],
1692
+ default: false
1693
+ }
1694
+ },
1695
+ content: {
1696
+ children: "children",
1697
+ startIcon: "child",
1698
+ endIcon: "child",
1699
+ loadingIndicator: "child"
1700
+ },
1701
+ domEvents: ["onClick"]
1702
+ });
1703
+ // src/catalog/entries/Flex.ts
1704
+ const flexDirectionValues = [
1705
+ "row",
1706
+ "row-reverse",
1707
+ "column",
1708
+ "column-reverse"
1709
+ ];
1710
+ const flexJustifyContentValues = [
1711
+ "flex-start",
1712
+ "flex-end",
1713
+ "center",
1714
+ "space-between",
1715
+ "space-around",
1716
+ "space-evenly"
1717
+ ];
1718
+ const flexAlignItemsValues = [
1719
+ "stretch",
1720
+ "flex-start",
1721
+ "flex-end",
1722
+ "center",
1723
+ "baseline"
1724
+ ];
1725
+ const flexAlignContentValues = [
1726
+ "normal",
1727
+ "flex-start",
1728
+ "flex-end",
1729
+ "center",
1730
+ "stretch",
1731
+ "space-between",
1732
+ "space-around",
1733
+ "space-evenly"
1734
+ ];
1735
+ const flexWrapValues = [
1736
+ "nowrap",
1737
+ "wrap",
1738
+ "wrap-reverse"
1739
+ ];
1740
+ const box = {
1741
+ gap: 2,
1742
+ p: 2,
1743
+ width: "360px",
1744
+ height: "280px",
1745
+ bg: "secondary",
1746
+ borderRadius: "sm"
1747
+ };
1748
+ const items$2 = [
1749
+ "A",
1750
+ "B",
1751
+ "C"
1752
+ ].map((label) => node("View", {
1753
+ p: 2,
1754
+ bg: "primary",
1755
+ borderRadius: "sm"
1756
+ }, [label]));
1757
+ const directions = {
1758
+ column: "Column",
1759
+ row: "Row"
1760
+ };
1761
+ const flexCatalog = defineCatalogEntry({
1762
+ summary: "A flexbox container that lays its children out in a column or a row.",
1763
+ isPlaceable: true,
1764
+ example: {
1765
+ component: "Flex",
1766
+ props: {
1767
+ ...box,
1768
+ flexDirection: "column"
1769
+ },
1770
+ children: items$2
1771
+ },
1772
+ variants: ["column", "row"].map((flexDirection) => ({
1773
+ name: flexDirection,
1774
+ label: directions[flexDirection],
1775
+ example: {
1776
+ component: "Flex",
1777
+ props: {
1778
+ ...box,
1779
+ flexDirection
1780
+ },
1781
+ children: items$2
1782
+ }
1783
+ })),
1784
+ options: {
1785
+ flexDirection: {
1786
+ values: flexDirectionValues,
1787
+ default: "column"
1788
+ },
1789
+ justifyContent: { values: flexJustifyContentValues },
1790
+ alignItems: { values: flexAlignItemsValues },
1791
+ alignContent: { values: flexAlignContentValues },
1792
+ flexWrap: {
1793
+ values: flexWrapValues,
1794
+ default: "nowrap"
1795
+ },
1796
+ gap: { scale: "space" },
1797
+ bg: { scale: "background" }
1798
+ },
1799
+ content: { children: "children" }
1800
+ });
1801
+ // src/catalog/entries/FocusTrap.ts
1802
+ const focusTrapCatalog = defineCatalogEntry({
1803
+ summary: "Keeps keyboard focus within its children while it is enabled.",
1804
+ isPlaceable: false,
1805
+ example: {
1806
+ component: "FocusTrap",
1807
+ props: { isEnabled: true },
1808
+ children: [node("View", { p: 3 }, ["Trapped content"])]
1809
+ },
1810
+ variants: [],
1811
+ options: {
1812
+ isEnabled: {
1813
+ values: [true, false],
1814
+ default: true
1815
+ },
1816
+ shouldAutoFocus: {
1817
+ values: [true, false],
1818
+ default: true
1819
+ },
1820
+ shouldTrapFocus: {
1821
+ values: [true, false],
1822
+ default: true
1823
+ },
1824
+ shouldEnforceFocus: {
1825
+ values: [true, false],
1826
+ default: true
1827
+ },
1828
+ shouldRestoreFocus: {
1829
+ values: [true, false],
1830
+ default: true
1831
+ }
1832
+ },
1833
+ content: { children: "children" }
1834
+ });
1835
+ const formCatalog = defineCatalogEntry({
1836
+ summary: "A `<form>` that gives every field inside it a default size, color and state.",
1837
+ isPlaceable: false,
1838
+ example: {
1839
+ component: "Form",
1840
+ props: { fullWidth: true },
1841
+ children: [node("Flex", {
1842
+ flexDirection: "column",
1843
+ gap: 4,
1844
+ alignItems: "flex-start"
1845
+ }, [node("FormControl", {}, [node("Flex", {
1846
+ flexDirection: "column",
1847
+ gap: 1,
1848
+ alignItems: "flex-start"
1849
+ }, [node("FormLabel", {}, ["Name"]), node("TextInput", {
1850
+ variant: "outlined",
1851
+ placeholder: "John Smith"
1852
+ })])]), node("Button", { type: "submit" }, ["Submit"])])]
1853
+ },
1854
+ variants: [],
1855
+ options: {
1856
+ size: {
1857
+ scale: "sizes",
1858
+ default: "md"
1859
+ },
1860
+ color: {
1861
+ scale: "palette",
1862
+ default: "primary"
1863
+ },
1864
+ textColor: { scale: "text" },
1865
+ disabled: {
1866
+ values: [true, false],
1867
+ default: false
1868
+ },
1869
+ fullWidth: {
1870
+ values: [true, false],
1871
+ default: false
1872
+ },
1873
+ noValidate: {
1874
+ values: [true, false],
1875
+ default: false
1876
+ }
1877
+ },
1878
+ content: { children: "children" },
1879
+ domEvents: ["onSubmit"],
1880
+ preview: { width: 360 }
1881
+ });
1882
+ // src/catalog/entries/FormControl.ts
1883
+ const formControlCatalog = defineCatalogEntry({
1884
+ summary: "One form field - a label, a control and helper text, wired together by a shared id.",
1885
+ isPlaceable: true,
1886
+ example: {
1887
+ component: "FormControl",
1888
+ props: {
1889
+ required: true,
1890
+ fullWidth: true
1891
+ },
1892
+ children: [node("Flex", {
1893
+ flexDirection: "column",
1894
+ gap: 1,
1895
+ alignItems: "flex-start"
1896
+ }, [
1897
+ node("FormLabel", {}, ["Email"]),
1898
+ node("TextInput", {
1899
+ variant: "outlined",
1900
+ placeholder: "me@example.com"
1901
+ }),
1902
+ node("FormHelperText", {}, ["We'll never share it."])
1903
+ ])]
1904
+ },
1905
+ variants: [],
1906
+ options: {
1907
+ error: {
1908
+ values: [true, false],
1909
+ default: false
1910
+ },
1911
+ disabled: {
1912
+ values: [true, false],
1913
+ default: false
1914
+ },
1915
+ required: {
1916
+ values: [true, false],
1917
+ default: false
1918
+ },
1919
+ fullWidth: {
1920
+ values: [true, false],
1921
+ default: false
1922
+ },
1923
+ size: {
1924
+ scale: "sizes",
1925
+ default: "md"
1926
+ },
1927
+ color: {
1928
+ scale: "palette",
1929
+ default: "primary"
1930
+ },
1931
+ textColor: { scale: "text" }
1932
+ },
1933
+ content: { children: "children" },
1934
+ preview: { width: 320 }
1935
+ });
1936
+ // src/catalog/entries/FormHelperText.ts
1937
+ const formHelperTextCatalog = defineCatalogEntry({
1938
+ summary: "Hint or error text under a field, read by assistive tech as the control's description.",
1939
+ isPlaceable: false,
1940
+ example: {
1941
+ component: "FormHelperText",
1942
+ props: {},
1943
+ children: ["We'll never share it."]
1944
+ },
1945
+ variants: [],
1946
+ options: {
1947
+ error: {
1948
+ values: [true, false],
1949
+ default: false
1950
+ },
1951
+ color: {
1952
+ scale: "text",
1953
+ default: "secondary"
1954
+ }
1955
+ },
1956
+ content: { children: "children" }
1957
+ });
1958
+ // src/catalog/entries/FormLabel.ts
1959
+ const formLabelCatalog = defineCatalogEntry({
1960
+ summary: "A field's label, linked to its control - and marked required - through `FormControl`.",
1961
+ isPlaceable: false,
1962
+ example: {
1963
+ component: "FormLabel",
1964
+ props: {},
1965
+ children: ["Email"]
1966
+ },
1967
+ variants: [],
1968
+ options: {
1969
+ required: {
1970
+ values: [true, false],
1971
+ default: false
1972
+ },
1973
+ color: { scale: "text" }
1974
+ },
1975
+ content: { children: "children" }
1976
+ });
1977
+ // src/catalog/entries/Grid.ts
1978
+ const gridAutoFlowValues = [
1979
+ "row",
1980
+ "column",
1981
+ "dense",
1982
+ "row dense",
1983
+ "column dense"
1984
+ ];
1985
+ const gridJustifyContentValues = [
1986
+ "normal",
1987
+ "start",
1988
+ "end",
1989
+ "center",
1990
+ "stretch",
1991
+ "space-between",
1992
+ "space-around",
1993
+ "space-evenly"
1994
+ ];
1995
+ const gridAlignItemsValues = [
1996
+ "normal",
1997
+ "start",
1998
+ "end",
1999
+ "center",
2000
+ "stretch",
2001
+ "baseline"
2002
+ ];
2003
+ const gridAlignContentValues = [
2004
+ "normal",
2005
+ "start",
2006
+ "end",
2007
+ "center",
2008
+ "stretch",
2009
+ "space-between",
2010
+ "space-around",
2011
+ "space-evenly"
2012
+ ];
2013
+ const gridJustifyItemsValues = [
2014
+ "normal",
2015
+ "start",
2016
+ "end",
2017
+ "center",
2018
+ "stretch"
2019
+ ];
2020
+ const gridCatalog = defineCatalogEntry({
2021
+ summary: "A CSS grid container - columns and rows from raw track strings, gaps from the theme.",
2022
+ isPlaceable: true,
2023
+ example: {
2024
+ component: "Grid",
2025
+ props: {
2026
+ gridTemplateColumns: "1fr 1fr",
2027
+ gap: 2
2028
+ },
2029
+ children: [
2030
+ "A",
2031
+ "B",
2032
+ "C",
2033
+ "D"
2034
+ ].map((label) => node("Flex", {
2035
+ p: 2,
2036
+ bg: "secondary",
2037
+ borderRadius: "sm",
2038
+ alignItems: "center",
2039
+ justifyContent: "center"
2040
+ }, [label]))
2041
+ },
2042
+ variants: [],
2043
+ options: {
2044
+ gridAutoFlow: {
2045
+ values: gridAutoFlowValues,
2046
+ default: "row"
2047
+ },
2048
+ justifyContent: { values: gridJustifyContentValues },
2049
+ alignItems: { values: gridAlignItemsValues },
2050
+ alignContent: { values: gridAlignContentValues },
2051
+ justifyItems: { values: gridJustifyItemsValues },
2052
+ gap: { scale: "space" },
2053
+ columnGap: { scale: "space" },
2054
+ rowGap: { scale: "space" }
2055
+ },
2056
+ content: { children: "children" },
2057
+ preview: { width: 320 }
2058
+ });
2059
+ // src/catalog/entries/Icon.ts
2060
+ const iconNameValues = [
2061
+ "hub",
2062
+ "code",
2063
+ "terminal",
2064
+ "database",
2065
+ "psychology",
2066
+ "smart_toy",
2067
+ "account_tree",
2068
+ "analytics",
2069
+ "check",
2070
+ "close",
2071
+ "menu",
2072
+ "warning"
2073
+ ];
2074
+ const pictured$1 = [
2075
+ "primary",
2076
+ "secondary",
2077
+ "initial"
2078
+ ];
2079
+ const colorLabels$3 = {
2080
+ primary: "Primary",
2081
+ secondary: "Secondary",
2082
+ initial: "Initial"
2083
+ };
2084
+ const iconCatalog = defineCatalogEntry({
2085
+ summary: "A square SVG icon from the registry, colored from the theme text tokens.",
2086
+ isPlaceable: true,
2087
+ example: {
2088
+ component: "Icon",
2089
+ props: {
2090
+ name: "hub",
2091
+ color: "primary",
2092
+ size: "3rem"
2093
+ },
2094
+ children: []
2095
+ },
2096
+ variants: pictured$1.map((color) => ({
2097
+ name: color,
2098
+ label: colorLabels$3[color],
2099
+ example: {
2100
+ component: "Icon",
2101
+ props: {
2102
+ name: "hub",
2103
+ color,
2104
+ size: "3rem"
2105
+ },
2106
+ children: []
2107
+ }
2108
+ })),
2109
+ options: {
2110
+ name: { values: iconNameValues },
2111
+ color: {
2112
+ scale: "text",
2113
+ default: "primary"
2114
+ },
2115
+ size: { default: "1.5rem" }
2116
+ },
2117
+ content: {}
2118
+ });
2119
+ // src/catalog/entries/Image.ts
2120
+ const imageObjectFitValues = [
2121
+ "cover",
2122
+ "contain",
2123
+ "fill",
2124
+ "none",
2125
+ "scale-down"
2126
+ ];
2127
+ const fitLabels = {
2128
+ cover: "Cover",
2129
+ contain: "Contain",
2130
+ fill: "Fill",
2131
+ none: "None",
2132
+ "scale-down": "Scale down"
2133
+ };
2134
+ const picture = {
2135
+ src: "/soroush.svg",
2136
+ alt: "Logo",
2137
+ width: "200px",
2138
+ height: "200px"
2139
+ };
2140
+ const imageCatalog = defineCatalogEntry({
2141
+ summary: "An image with an optional fallback source, sized and fitted through props.",
2142
+ isPlaceable: true,
2143
+ example: {
2144
+ component: "Image",
2145
+ props: {
2146
+ ...picture,
2147
+ objectFit: "contain"
2148
+ },
2149
+ children: []
2150
+ },
2151
+ variants: imageObjectFitValues.map((objectFit) => ({
2152
+ name: objectFit,
2153
+ label: fitLabels[objectFit],
2154
+ example: {
2155
+ component: "Image",
2156
+ props: {
2157
+ ...picture,
2158
+ objectFit
2159
+ },
2160
+ children: []
2161
+ }
2162
+ })),
2163
+ options: {
2164
+ objectFit: { values: imageObjectFitValues },
2165
+ borderRadius: { scale: "radii" }
2166
+ },
2167
+ content: {}
2168
+ });
2169
+ // src/catalog/entries/RangeInput.ts
2170
+ const rangeInputTrackValues = ["normal", "inverted"];
2171
+ const rangeInputValueLabelValues = [
2172
+ "off",
2173
+ "auto",
2174
+ "on"
2175
+ ];
2176
+ const rangeInputOrientationValues = ["horizontal", "vertical"];
2177
+ const variantProps$1 = {
2178
+ single: {
2179
+ defaultValue: 40,
2180
+ "aria-label": "Value"
2181
+ },
2182
+ range: { defaultValue: [20, 70] },
2183
+ marks: {
2184
+ defaultValue: 30,
2185
+ step: 10,
2186
+ marks: true,
2187
+ "aria-label": "Value"
2188
+ }
2189
+ };
2190
+ const variantLabels$12 = {
2191
+ single: "One thumb",
2192
+ range: "A range",
2193
+ marks: "With marks"
2194
+ };
2195
+ const rangeInputCatalog = defineCatalogEntry({
2196
+ summary: "A slider: one value on a range, or two or more thumbs for a range of values.",
2197
+ isPlaceable: true,
2198
+ example: {
2199
+ component: "RangeInput",
2200
+ props: {
2201
+ defaultValue: 40,
2202
+ "aria-label": "Value"
2203
+ },
2204
+ children: []
2205
+ },
2206
+ variants: Object.keys(variantProps$1).map((name) => ({
2207
+ name,
2208
+ label: variantLabels$12[name],
2209
+ example: {
2210
+ component: "RangeInput",
2211
+ props: variantProps$1[name],
2212
+ children: []
2213
+ }
2214
+ })),
2215
+ options: {
2216
+ min: { values: [
2217
+ 0,
2218
+ 10,
2219
+ -50
2220
+ ] },
2221
+ max: { values: [
2222
+ 10,
2223
+ 100,
2224
+ 1e3
2225
+ ] },
2226
+ step: {
2227
+ values: [
2228
+ 1,
2229
+ 5,
2230
+ 10,
2231
+ .1
2232
+ ],
2233
+ default: 1
2234
+ },
2235
+ shiftStep: {
2236
+ values: [10, 20],
2237
+ default: 10
2238
+ },
2239
+ marks: {
2240
+ values: [true, false],
2241
+ default: false
2242
+ },
2243
+ orientation: {
2244
+ values: rangeInputOrientationValues,
2245
+ default: "horizontal"
2246
+ },
2247
+ track: {
2248
+ values: rangeInputTrackValues,
2249
+ default: "normal"
2250
+ },
2251
+ valueLabel: {
2252
+ values: rangeInputValueLabelValues,
2253
+ default: "off"
2254
+ },
2255
+ shouldSwapThumbs: {
2256
+ values: [true, false],
2257
+ default: true
2258
+ },
2259
+ size: {
2260
+ scale: "sizes",
2261
+ default: "md"
2262
+ },
2263
+ color: {
2264
+ scale: "palette",
2265
+ default: "primary"
2266
+ },
2267
+ error: {
2268
+ values: [true, false],
2269
+ default: false
2270
+ },
2271
+ disabled: {
2272
+ values: [true, false],
2273
+ default: false
2274
+ }
2275
+ },
2276
+ content: {},
2277
+ twoWay: {
2278
+ prop: "value",
2279
+ event: "onChange",
2280
+ read: "argument"
2281
+ },
2282
+ domEvents: ["onChangeCommitted"]
2283
+ });
2284
+ // src/catalog/entries/LinearProgress.ts
2285
+ const linearProgressVariantValues = [
2286
+ "indeterminate",
2287
+ "determinate",
2288
+ "query"
2289
+ ];
2290
+ const linearProgressEasingValues = [
2291
+ "linear",
2292
+ "ease",
2293
+ "ease-in",
2294
+ "ease-out",
2295
+ "ease-in-out"
2296
+ ];
2297
+ const variantLabels$11 = {
2298
+ indeterminate: "Indeterminate",
2299
+ determinate: "Determinate",
2300
+ query: "Query"
2301
+ };
2302
+ const variantProps = {
2303
+ indeterminate: { variant: "indeterminate" },
2304
+ determinate: {
2305
+ variant: "determinate",
2306
+ value: 70
2307
+ },
2308
+ query: { variant: "query" }
2309
+ };
2310
+ const linearProgressCatalog = defineCatalogEntry({
2311
+ summary: "A horizontal loading bar - looping, driven by a `value`, or with a buffer behind it.",
2312
+ isPlaceable: true,
2313
+ example: {
2314
+ component: "LinearProgress",
2315
+ props: {
2316
+ variant: "indeterminate",
2317
+ color: "primary"
2318
+ },
2319
+ children: []
2320
+ },
2321
+ variants: linearProgressVariantValues.map((variant) => ({
2322
+ name: variant,
2323
+ label: variantLabels$11[variant],
2324
+ example: {
2325
+ component: "LinearProgress",
2326
+ props: {
2327
+ ...variantProps[variant],
2328
+ color: "primary"
2329
+ },
2330
+ children: []
2331
+ }
2332
+ })),
2333
+ options: {
2334
+ variant: {
2335
+ values: linearProgressVariantValues,
2336
+ default: "indeterminate"
2337
+ },
2338
+ color: {
2339
+ scale: "palette",
2340
+ default: "primary"
2341
+ },
2342
+ thickness: { default: 4 },
2343
+ buffer: {
2344
+ values: [true, false],
2345
+ default: false
2346
+ },
2347
+ min: { default: 0 },
2348
+ max: { default: 100 },
2349
+ spinning: {
2350
+ values: [true, false],
2351
+ default: false
2352
+ },
2353
+ easing: {
2354
+ values: linearProgressEasingValues,
2355
+ default: "linear"
2356
+ },
2357
+ showTrack: {
2358
+ values: [true, false],
2359
+ default: true
2360
+ },
2361
+ round: {
2362
+ values: [true, false],
2363
+ default: false
2364
+ }
2365
+ },
2366
+ content: {},
2367
+ preview: { width: 240 }
2368
+ });
2369
+ // src/catalog/entries/Link.ts
2370
+ const linkUnderlineValues = [
2371
+ "always",
2372
+ "hover",
2373
+ "none"
2374
+ ];
2375
+ const linkTargetValues = [
2376
+ "_self",
2377
+ "_blank",
2378
+ "_parent",
2379
+ "_top",
2380
+ "_unfencedTop"
2381
+ ];
2382
+ const underlineLabels = {
2383
+ always: "Underlined",
2384
+ hover: "Underline on hover",
2385
+ none: "No underline"
2386
+ };
2387
+ const label = "Visit the design system docs";
2388
+ const linkCatalog = defineCatalogEntry({
2389
+ summary: "A text link to a URL, underlined always, on hover or never.",
2390
+ isPlaceable: true,
2391
+ example: {
2392
+ component: "Link",
2393
+ props: { href: "#" },
2394
+ children: [label]
2395
+ },
2396
+ variants: linkUnderlineValues.map((underline) => ({
2397
+ name: underline,
2398
+ label: underlineLabels[underline],
2399
+ example: {
2400
+ component: "Link",
2401
+ props: {
2402
+ href: "#",
2403
+ underline
2404
+ },
2405
+ children: [label]
2406
+ }
2407
+ })),
2408
+ options: {
2409
+ underline: {
2410
+ values: linkUnderlineValues,
2411
+ default: "always"
2412
+ },
2413
+ color: {
2414
+ scale: "text",
2415
+ default: "primary"
2416
+ },
2417
+ variant: {
2418
+ scale: "typography",
2419
+ default: "inherit"
2420
+ },
2421
+ target: {
2422
+ values: linkTargetValues,
2423
+ default: "_self"
2424
+ }
2425
+ },
2426
+ content: { children: "children" },
2427
+ domEvents: ["onClick"]
2428
+ });
2429
+ // src/catalog/entries/Menu.ts
2430
+ const menuAlignValues = ["start", "end"];
2431
+ const menuCatalog = defineCatalogEntry({
2432
+ summary: "A trigger and the `MenuList` of commands it opens - not modal, placed by the trigger.",
2433
+ isPlaceable: false,
2434
+ example: {
2435
+ component: "Menu",
2436
+ props: {},
2437
+ children: [
2438
+ node("MenuItem", { value: "new" }, ["New branch..."]),
2439
+ node("MenuItem", {
2440
+ value: "checkout",
2441
+ disabled: true,
2442
+ note: "Coming later"
2443
+ }, ["Checkout tag or revision..."]),
2444
+ node("MenuDivider"),
2445
+ node("MenuItem", { value: "rename" }, ["Rename..."]),
2446
+ node("MenuItem", { value: "delete" }, ["Delete"])
2447
+ ]
2448
+ },
2449
+ variants: [],
2450
+ options: {
2451
+ align: {
2452
+ values: menuAlignValues,
2453
+ default: "start"
2454
+ },
2455
+ color: {
2456
+ scale: "palette",
2457
+ default: "primary"
2458
+ },
2459
+ textColor: { scale: "text" },
2460
+ size: {
2461
+ scale: "sizes",
2462
+ default: "md"
2463
+ },
2464
+ dense: {
2465
+ values: [true, false],
2466
+ default: false
2467
+ },
2468
+ elevation: {
2469
+ values: [
2470
+ 0,
2471
+ 1,
2472
+ 2,
2473
+ 4,
2474
+ 8,
2475
+ 16,
2476
+ 24
2477
+ ],
2478
+ default: 8
2479
+ },
2480
+ borderRadius: { scale: "radii" },
2481
+ layer: { scale: "zOrder" },
2482
+ marginThreshold: { scale: "space" },
2483
+ defaultOpen: {
2484
+ values: [true, false],
2485
+ default: false
2486
+ }
2487
+ },
2488
+ content: {
2489
+ children: "children",
2490
+ trigger: "child",
2491
+ emptyLabel: "text",
2492
+ items: "none"
2493
+ },
2494
+ domEvents: [
2495
+ "onSelect",
2496
+ "onClose",
2497
+ "onKeyDown"
2498
+ ]
2499
+ });
2500
+ // src/catalog/entries/MenuDivider.ts
2501
+ const menuDividerCatalog = defineCatalogEntry({
2502
+ summary: "A line between groups of rows in a `MenuList`.",
2503
+ isPlaceable: false,
2504
+ example: {
2505
+ component: "MenuDivider",
2506
+ props: {},
2507
+ children: []
2508
+ },
2509
+ variants: [],
2510
+ options: {},
2511
+ content: {}
2512
+ });
2513
+ // src/catalog/entries/MenuItem.ts
2514
+ const menuItemRoleValues = [
2515
+ "menuitem",
2516
+ "menuitemradio",
2517
+ "menuitemcheckbox"
2518
+ ];
2519
+ const menuItemCatalog = defineCatalogEntry({
2520
+ summary: "One row - an option of a `Select`'s list, or a command of a `MenuList` with an icon, a shortcut and a submenu.",
2521
+ isPlaceable: false,
2522
+ example: {
2523
+ component: "MenuItem",
2524
+ props: { value: "web" },
2525
+ children: ["Web"]
2526
+ },
2527
+ variants: [],
2528
+ options: {
2529
+ role: {
2530
+ values: menuItemRoleValues,
2531
+ default: "menuitem"
2532
+ },
2533
+ color: {
2534
+ scale: "palette",
2535
+ default: "primary"
2536
+ },
2537
+ textColor: { scale: "text" },
2538
+ size: {
2539
+ scale: "sizes",
2540
+ default: "md"
2541
+ },
2542
+ disabled: {
2543
+ values: [true, false],
2544
+ default: false
2545
+ },
2546
+ selected: {
2547
+ values: [true, false],
2548
+ default: false
2549
+ },
2550
+ highlighted: {
2551
+ values: [true, false],
2552
+ default: false
2553
+ },
2554
+ multiple: {
2555
+ values: [true, false],
2556
+ default: false
2557
+ },
2558
+ dense: {
2559
+ values: [true, false],
2560
+ default: false
2561
+ },
2562
+ disableGutters: {
2563
+ values: [true, false],
2564
+ default: false
2565
+ },
2566
+ divider: {
2567
+ values: [true, false],
2568
+ default: false
2569
+ }
2570
+ },
2571
+ content: {
2572
+ children: "children",
2573
+ startIcon: "child",
2574
+ shortcut: "text",
2575
+ note: "text",
2576
+ submenu: "children"
2577
+ },
2578
+ domEvents: ["onClick"]
2579
+ });
2580
+ // src/catalog/entries/MenuItems.ts
2581
+ const menuItemsCatalog = defineCatalogEntry({
2582
+ summary: "A `MenuList`'s rows from data - rows, dividers and submenus as entries.",
2583
+ isPlaceable: false,
2584
+ example: {
2585
+ component: "MenuItems",
2586
+ props: {},
2587
+ children: []
2588
+ },
2589
+ variants: [],
2590
+ options: {},
2591
+ content: {}
2592
+ });
2593
+ // src/catalog/entries/MenuList.ts
2594
+ const menuListCatalog = defineCatalogEntry({
2595
+ summary: "A `role=\"menu\"` list of `MenuItem` commands that owns the keyboard.",
2596
+ isPlaceable: true,
2597
+ example: {
2598
+ component: "MenuList",
2599
+ props: { "aria-label": "Branch" },
2600
+ children: [
2601
+ node("MenuItem", { value: "new" }, ["New branch..."]),
2602
+ node("MenuItem", {
2603
+ value: "checkout",
2604
+ disabled: true,
2605
+ note: "Coming later"
2606
+ }, ["Checkout tag or revision..."]),
2607
+ node("MenuDivider"),
2608
+ node("MenuItem", { value: "rename" }, ["Rename..."]),
2609
+ node("MenuItem", { value: "delete" }, ["Delete"])
2610
+ ]
2611
+ },
2612
+ variants: [],
2613
+ options: {
2614
+ color: {
2615
+ scale: "palette",
2616
+ default: "primary"
2617
+ },
2618
+ textColor: { scale: "text" },
2619
+ size: {
2620
+ scale: "sizes",
2621
+ default: "md"
2622
+ },
2623
+ dense: {
2624
+ values: [true, false],
2625
+ default: false
2626
+ },
2627
+ shouldWrap: {
2628
+ values: [true, false],
2629
+ default: true
2630
+ },
2631
+ shouldAutoFocus: {
2632
+ values: [true, false],
2633
+ default: false
2634
+ }
2635
+ },
2636
+ content: { children: "children" },
2637
+ domEvents: ["onSelect"],
2638
+ preview: { width: 220 }
2639
+ });
2640
+ // src/catalog/entries/Modal.ts
2641
+ const modalScrollValues = ["paper", "body"];
2642
+ const modalCatalog = defineCatalogEntry({
2643
+ summary: "An overlay that dims the page, holds focus inside its content and closes on Escape or a backdrop click.",
2644
+ isPlaceable: true,
2645
+ example: {
2646
+ component: "Modal",
2647
+ props: { isOpen: true },
2648
+ children: [node("Paper", {
2649
+ role: "dialog",
2650
+ "aria-modal": "true",
2651
+ "aria-label": "Example dialog",
2652
+ p: 4,
2653
+ width: "320px"
2654
+ }, [node("Flex", {
2655
+ flexDirection: "column",
2656
+ gap: 3
2657
+ }, [node("Typography", {
2658
+ variant: "h5",
2659
+ m: 0
2660
+ }, ["Modal title"]), node("Typography", {
2661
+ variant: "body2",
2662
+ color: "secondary",
2663
+ m: 0
2664
+ }, ["Press Escape or click the backdrop to close."])])])]
2665
+ },
2666
+ variants: [],
2667
+ options: {
2668
+ isOpen: { values: [true, false] },
2669
+ scroll: {
2670
+ values: modalScrollValues,
2671
+ default: "paper"
2672
+ },
2673
+ layer: {
2674
+ scale: "zOrder",
2675
+ default: "modal"
2676
+ },
2677
+ hasBackdrop: {
2678
+ values: [true, false],
2679
+ default: true
2680
+ },
2681
+ shouldKeepMounted: {
2682
+ values: [true, false],
2683
+ default: false
2684
+ },
2685
+ shouldUsePortal: {
2686
+ values: [true, false],
2687
+ default: true
2688
+ },
2689
+ shouldLockScroll: {
2690
+ values: [true, false],
2691
+ default: true
2692
+ },
2693
+ disableAriaHidden: {
2694
+ values: [true, false],
2695
+ default: false
2696
+ },
2697
+ shouldAutoFocus: {
2698
+ values: [true, false],
2699
+ default: true
2700
+ },
2701
+ shouldTrapFocus: {
2702
+ values: [true, false],
2703
+ default: true
2704
+ },
2705
+ shouldEnforceFocus: {
2706
+ values: [true, false],
2707
+ default: true
2708
+ },
2709
+ shouldRestoreFocus: {
2710
+ values: [true, false],
2711
+ default: true
2712
+ }
2713
+ },
2714
+ content: { children: "children" },
2715
+ domEvents: ["onClose"],
2716
+ preview: {
2717
+ width: 480,
2718
+ height: 320
2719
+ }
2720
+ });
2721
+ // src/catalog/entries/NativeSelect.ts
2722
+ const nativeSelectVariantValues = [
2723
+ "default",
2724
+ "outlined",
2725
+ "text",
2726
+ "underline"
2727
+ ];
2728
+ const variantLabels$10 = {
2729
+ default: "Filled",
2730
+ outlined: "Outlined",
2731
+ text: "Text",
2732
+ underline: "Underline"
2733
+ };
2734
+ const platforms$2 = [
2735
+ {
2736
+ label: "Web",
2737
+ value: "web"
2738
+ },
2739
+ {
2740
+ label: "Android",
2741
+ value: "android"
2742
+ },
2743
+ {
2744
+ label: "iOS",
2745
+ value: "ios"
2746
+ }
2747
+ ];
2748
+ const nativeSelectCatalog = defineCatalogEntry({
2749
+ summary: "The platform select picker, its choices given as an `options` list of labels and values.",
2750
+ isPlaceable: true,
2751
+ example: {
2752
+ component: "NativeSelect",
2753
+ props: {
2754
+ options: platforms$2,
2755
+ placeholder: "Pick a platform",
2756
+ variant: "outlined"
2757
+ },
2758
+ children: []
2759
+ },
2760
+ variants: nativeSelectVariantValues.map((variant) => ({
2761
+ name: variant,
2762
+ label: variantLabels$10[variant],
2763
+ example: {
2764
+ component: "NativeSelect",
2765
+ props: {
2766
+ options: platforms$2,
2767
+ placeholder: "Pick a platform",
2768
+ variant
2769
+ },
2770
+ children: []
2771
+ }
2772
+ })),
2773
+ options: {
2774
+ variant: {
2775
+ values: nativeSelectVariantValues,
2776
+ default: "default"
2777
+ },
2778
+ color: {
2779
+ scale: "palette",
2780
+ default: "primary"
2781
+ },
2782
+ textColor: {
2783
+ scale: "text",
2784
+ default: "primary"
2785
+ },
2786
+ bg: {
2787
+ scale: "background",
2788
+ default: "terminal"
2789
+ },
2790
+ size: {
2791
+ scale: "sizes",
2792
+ default: "md"
2793
+ },
2794
+ borderRadius: { scale: "radii" },
2795
+ disabled: {
2796
+ values: [true, false],
2797
+ default: false
2798
+ },
2799
+ error: {
2800
+ values: [true, false],
2801
+ default: false
2802
+ },
2803
+ required: {
2804
+ values: [true, false],
2805
+ default: false
2806
+ },
2807
+ fullWidth: {
2808
+ values: [true, false],
2809
+ default: false
2810
+ }
2811
+ },
2812
+ content: { placeholder: "text" },
2813
+ twoWay: {
2814
+ prop: "value",
2815
+ event: "onChange",
2816
+ read: "argument"
2817
+ },
2818
+ preview: { width: 220 }
2819
+ });
2820
+ // src/catalog/entries/NumberInput.ts
2821
+ const numberInputSpinButtonsValues = [
2822
+ "stacked",
2823
+ "sides",
2824
+ "none"
2825
+ ];
2826
+ const numberInputVariantValues = [
2827
+ "default",
2828
+ "outlined",
2829
+ "underline",
2830
+ "text"
2831
+ ];
2832
+ const spinLabels = {
2833
+ stacked: "Stacked",
2834
+ sides: "Either side",
2835
+ none: "No buttons"
2836
+ };
2837
+ const example = {
2838
+ defaultValue: 5,
2839
+ min: 0,
2840
+ max: 10,
2841
+ incrementLabel: "Increase",
2842
+ decrementLabel: "Decrease",
2843
+ "aria-label": "Quantity"
2844
+ };
2845
+ const numberInputCatalog = defineCatalogEntry({
2846
+ summary: "A field for a number, read in its locale and clamped to a range, stepped by keys or buttons.",
2847
+ isPlaceable: true,
2848
+ example: {
2849
+ component: "NumberInput",
2850
+ props: {
2851
+ ...example,
2852
+ variant: "outlined"
2853
+ },
2854
+ children: []
2855
+ },
2856
+ variants: numberInputSpinButtonsValues.map((spinButtons) => ({
2857
+ name: spinButtons,
2858
+ label: spinLabels[spinButtons],
2859
+ example: {
2860
+ component: "NumberInput",
2861
+ props: {
2862
+ ...example,
2863
+ variant: "outlined",
2864
+ spinButtons
2865
+ },
2866
+ children: []
2867
+ }
2868
+ })),
2869
+ options: {
2870
+ min: { values: [
2871
+ 0,
2872
+ 1,
2873
+ -10
2874
+ ] },
2875
+ max: { values: [10, 100] },
2876
+ step: {
2877
+ values: [
2878
+ 1,
2879
+ .5,
2880
+ 5
2881
+ ],
2882
+ default: 1
2883
+ },
2884
+ spinButtons: {
2885
+ values: numberInputSpinButtonsValues,
2886
+ default: "stacked"
2887
+ },
2888
+ variant: {
2889
+ values: numberInputVariantValues,
2890
+ default: "default"
2891
+ },
2892
+ size: {
2893
+ scale: "sizes",
2894
+ default: "md"
2895
+ },
2896
+ color: {
2897
+ scale: "palette",
2898
+ default: "primary"
2899
+ },
2900
+ textColor: {
2901
+ scale: "text",
2902
+ default: "primary"
2903
+ },
2904
+ shouldSnapOnStep: {
2905
+ values: [true, false],
2906
+ default: false
2907
+ },
2908
+ shouldScrubOnWheel: {
2909
+ values: [true, false],
2910
+ default: false
2911
+ },
2912
+ error: {
2913
+ values: [true, false],
2914
+ default: false
2915
+ },
2916
+ disabled: {
2917
+ values: [true, false],
2918
+ default: false
2919
+ },
2920
+ readOnly: {
2921
+ values: [true, false],
2922
+ default: false
2923
+ },
2924
+ required: {
2925
+ values: [true, false],
2926
+ default: false
2927
+ },
2928
+ fullWidth: {
2929
+ values: [true, false],
2930
+ default: false
2931
+ }
2932
+ },
2933
+ content: {
2934
+ startContent: "child",
2935
+ endContent: "child"
2936
+ },
2937
+ twoWay: {
2938
+ prop: "value",
2939
+ event: "onChange",
2940
+ read: "argument"
2941
+ },
2942
+ domEvents: ["onChangeCommitted"]
2943
+ });
2944
+ // src/catalog/entries/Pagination.ts
2945
+ const paginationVariantValues = ["text", "outlined"];
2946
+ const paginationShapeValues = ["circular", "rounded"];
2947
+ const variantLabels$9 = {
2948
+ text: "Text",
2949
+ outlined: "Outlined"
2950
+ };
2951
+ const paginationCatalog = defineCatalogEntry({
2952
+ summary: "Page numbers with previous and next controls, for moving through paged content.",
2953
+ isPlaceable: true,
2954
+ example: {
2955
+ component: "Pagination",
2956
+ props: { count: 10 },
2957
+ children: []
2958
+ },
2959
+ variants: paginationVariantValues.map((variant) => ({
2960
+ name: variant,
2961
+ label: variantLabels$9[variant],
2962
+ example: {
2963
+ component: "Pagination",
2964
+ props: {
2965
+ count: 10,
2966
+ variant
2967
+ },
2968
+ children: []
2969
+ }
2970
+ })),
2971
+ options: {
2972
+ variant: {
2973
+ values: paginationVariantValues,
2974
+ default: "text"
2975
+ },
2976
+ shape: {
2977
+ values: paginationShapeValues,
2978
+ default: "circular"
2979
+ },
2980
+ color: {
2981
+ scale: "palette",
2982
+ default: "primary"
2983
+ },
2984
+ size: {
2985
+ scale: "sizes",
2986
+ default: "md"
2987
+ },
2988
+ disabled: {
2989
+ values: [true, false],
2990
+ default: false
2991
+ },
2992
+ shouldShowFirstButton: {
2993
+ values: [true, false],
2994
+ default: false
2995
+ },
2996
+ shouldShowLastButton: {
2997
+ values: [true, false],
2998
+ default: false
2999
+ },
3000
+ shouldHidePrevButton: {
3001
+ values: [true, false],
3002
+ default: false
3003
+ },
3004
+ shouldHideNextButton: {
3005
+ values: [true, false],
3006
+ default: false
3007
+ }
3008
+ },
3009
+ content: { getItemAriaLabel: "none" },
3010
+ twoWay: {
3011
+ prop: "page",
3012
+ event: "onChange",
3013
+ read: "argument"
3014
+ }
3015
+ });
3016
+ // src/catalog/entries/PaginationItem.ts
3017
+ const paginationItemTypeValues = [
3018
+ "page",
3019
+ "first",
3020
+ "previous",
3021
+ "next",
3022
+ "last",
3023
+ "start-ellipsis",
3024
+ "end-ellipsis"
3025
+ ];
3026
+ const paginationItemVariantValues = ["text", "outlined"];
3027
+ const paginationItemShapeValues = ["circular", "rounded"];
3028
+ const paginationItemCatalog = defineCatalogEntry({
3029
+ summary: "One item of a `Pagination` - a page number, a previous/next/first/last control or an ellipsis.",
3030
+ isPlaceable: false,
3031
+ example: {
3032
+ component: "PaginationItem",
3033
+ props: {
3034
+ type: "page",
3035
+ page: 1
3036
+ },
3037
+ children: []
3038
+ },
3039
+ variants: [],
3040
+ options: {
3041
+ type: {
3042
+ values: paginationItemTypeValues,
3043
+ default: "page"
3044
+ },
3045
+ isSelected: {
3046
+ values: [true, false],
3047
+ default: false
3048
+ },
3049
+ variant: {
3050
+ values: paginationItemVariantValues,
3051
+ default: "text"
3052
+ },
3053
+ shape: {
3054
+ values: paginationItemShapeValues,
3055
+ default: "circular"
3056
+ },
3057
+ color: {
3058
+ scale: "palette",
3059
+ default: "primary"
3060
+ },
3061
+ size: {
3062
+ scale: "sizes",
3063
+ default: "md"
3064
+ },
3065
+ disabled: {
3066
+ values: [true, false],
3067
+ default: false
3068
+ }
3069
+ },
3070
+ content: { page: "text" },
3071
+ domEvents: ["onClick"]
3072
+ });
3073
+ // src/catalog/entries/Paper.ts
3074
+ const paperCatalog = defineCatalogEntry({
3075
+ summary: "A plain raised surface with a theme shadow, background and radius.",
3076
+ isPlaceable: true,
3077
+ example: {
3078
+ component: "Paper",
3079
+ props: {
3080
+ elevation: 1,
3081
+ p: 3,
3082
+ width: "320px"
3083
+ },
3084
+ children: ["A surface with default elevation, background, and border radius."]
3085
+ },
3086
+ variants: [],
3087
+ options: {
3088
+ elevation: {
3089
+ values: [
3090
+ 0,
3091
+ 1,
3092
+ 2,
3093
+ 4,
3094
+ 8,
3095
+ 16,
3096
+ 24
3097
+ ],
3098
+ default: 1
3099
+ },
3100
+ bg: {
3101
+ scale: "background",
3102
+ default: "paper"
3103
+ },
3104
+ borderRadius: {
3105
+ scale: "radii",
3106
+ default: "sq"
3107
+ },
3108
+ borderColor: { scale: "border" },
3109
+ borderWidth: { scale: "borderWidths" },
3110
+ p: {
3111
+ scale: "space",
3112
+ default: 2
3113
+ }
3114
+ },
3115
+ content: { children: "children" }
3116
+ });
3117
+ // src/catalog/entries/Popover.ts
3118
+ const popoverAnchorReferenceValues = [
3119
+ "anchorEl",
3120
+ "anchorPosition",
3121
+ "none"
3122
+ ];
3123
+ const popoverCatalog = defineCatalogEntry({
3124
+ summary: "A surface shown next to an anchor element, closed on Escape or a click outside.",
3125
+ isPlaceable: false,
3126
+ example: {
3127
+ component: "Popover",
3128
+ props: { open: false },
3129
+ children: [node("View", { p: 3 }, [node("Typography", { variant: "body2" }, ["Popover content"])])]
3130
+ },
3131
+ variants: [],
3132
+ options: {
3133
+ open: { values: [true, false] },
3134
+ anchorReference: {
3135
+ values: popoverAnchorReferenceValues,
3136
+ default: "anchorEl"
3137
+ },
3138
+ elevation: {
3139
+ values: [
3140
+ 0,
3141
+ 1,
3142
+ 2,
3143
+ 4,
3144
+ 8,
3145
+ 16,
3146
+ 24
3147
+ ],
3148
+ default: 8
3149
+ },
3150
+ marginThreshold: {
3151
+ scale: "space",
3152
+ default: 2
3153
+ },
3154
+ layer: {
3155
+ scale: "zOrder",
3156
+ default: "modal"
3157
+ },
3158
+ hasBackdrop: {
3159
+ values: [true, false],
3160
+ default: false
3161
+ },
3162
+ disableScrollLock: {
3163
+ values: [true, false],
3164
+ default: false
3165
+ },
3166
+ disableAriaHidden: {
3167
+ values: [true, false],
3168
+ default: false
3169
+ },
3170
+ shouldAutoFocus: {
3171
+ values: [true, false],
3172
+ default: true
3173
+ },
3174
+ shouldTrapFocus: {
3175
+ values: [true, false],
3176
+ default: true
3177
+ },
3178
+ shouldEnforceFocus: {
3179
+ values: [true, false],
3180
+ default: true
3181
+ },
3182
+ shouldRestoreFocus: {
3183
+ values: [true, false],
3184
+ default: true
3185
+ },
3186
+ shouldKeepMounted: {
3187
+ values: [true, false],
3188
+ default: false
3189
+ }
3190
+ },
3191
+ content: { children: "children" },
3192
+ domEvents: ["onClose"]
3193
+ });
3194
+ // src/catalog/entries/Portal.ts
3195
+ const portalCatalog = defineCatalogEntry({
3196
+ summary: "Renders its children into another DOM node - the document body by default.",
3197
+ isPlaceable: false,
3198
+ example: {
3199
+ component: "Portal",
3200
+ props: {},
3201
+ children: [node("View", { p: 3 }, ["Portaled content"])]
3202
+ },
3203
+ variants: [],
3204
+ options: {},
3205
+ content: { children: "children" }
3206
+ });
3207
+ // src/catalog/entries/Pressable.ts
3208
+ const pressableFeedbackValues = [
3209
+ "none",
3210
+ "opacity",
3211
+ "highlight"
3212
+ ];
3213
+ const pressableAsValues = [
3214
+ "div",
3215
+ "button",
3216
+ "span"
3217
+ ];
3218
+ const pressableCatalog = defineCatalogEntry({
3219
+ summary: "An unstyled clickable surface - button semantics around any content, with no looks of its own.",
3220
+ isPlaceable: true,
3221
+ example: {
3222
+ component: "Pressable",
3223
+ props: {},
3224
+ children: ["Press me"]
3225
+ },
3226
+ variants: [],
3227
+ options: {
3228
+ as: {
3229
+ values: pressableAsValues,
3230
+ default: "div"
3231
+ },
3232
+ feedback: {
3233
+ values: pressableFeedbackValues,
3234
+ default: "none"
3235
+ },
3236
+ color: {
3237
+ scale: "palette",
3238
+ default: "primary"
3239
+ },
3240
+ activeOpacity: { default: .7 },
3241
+ disabled: {
3242
+ values: [true, false],
3243
+ default: false
3244
+ },
3245
+ borderRadius: { scale: "radii" }
3246
+ },
3247
+ content: { children: "children" },
3248
+ domEvents: ["onClick"]
3249
+ });
3250
+ // src/catalog/entries/Quote.ts
3251
+ const quoteCatalog = defineCatalogEntry({
3252
+ summary: "A block set off by a primary left border, for quotes and terminal readouts.",
3253
+ isPlaceable: true,
3254
+ example: {
3255
+ component: "Quote",
3256
+ props: {
3257
+ bg: "terminal",
3258
+ p: 3
3259
+ },
3260
+ children: [node("Typography", {
3261
+ variant: "body1",
3262
+ color: "secondary",
3263
+ m: 0
3264
+ }, ["A View with a 2px primary left border - for terminal readouts and markdown blockquotes."])]
3265
+ },
3266
+ variants: [],
3267
+ options: {
3268
+ bg: { scale: "background" },
3269
+ borderRadius: { scale: "radii" }
3270
+ },
3271
+ content: { children: "children" },
3272
+ preview: { width: 360 }
3273
+ });
3274
+ // src/catalog/entries/Radio.ts
3275
+ const colorLabels$2 = {
3276
+ default: "Default",
3277
+ primary: "Primary",
3278
+ secondary: "Secondary",
3279
+ success: "Success",
3280
+ error: "Error",
3281
+ info: "Info",
3282
+ warning: "Warning"
3283
+ };
3284
+ const radioCatalog = defineCatalogEntry({
3285
+ summary: "One choice of a set - radios that share a `name` allow only one to be selected.",
3286
+ isPlaceable: true,
3287
+ example: {
3288
+ component: "Radio",
3289
+ props: {
3290
+ name: "option",
3291
+ value: "a"
3292
+ },
3293
+ children: ["Option A"]
3294
+ },
3295
+ variants: Object.keys(colorLabels$2).map((color) => ({
3296
+ name: color,
3297
+ label: colorLabels$2[color],
3298
+ example: {
3299
+ component: "Radio",
3300
+ props: {
3301
+ name: "option",
3302
+ value: "a",
3303
+ color,
3304
+ checked: true
3305
+ },
3306
+ children: ["Option A"]
3307
+ }
3308
+ })),
3309
+ options: {
3310
+ color: {
3311
+ scale: "palette",
3312
+ default: "default"
3313
+ },
3314
+ size: {
3315
+ scale: "sizes",
3316
+ default: "md"
3317
+ },
3318
+ disabled: {
3319
+ values: [true, false],
3320
+ default: false
3321
+ },
3322
+ required: {
3323
+ values: [true, false],
3324
+ default: false
3325
+ }
3326
+ },
3327
+ content: {
3328
+ children: "children",
3329
+ icon: "child",
3330
+ checkedIcon: "child"
3331
+ },
3332
+ twoWay: {
3333
+ prop: "checked",
3334
+ event: "onChange",
3335
+ read: "target.checked"
3336
+ }
3337
+ });
3338
+ // src/catalog/entries/Rating.ts
3339
+ const ratingPrecisionValues = [1, .5];
3340
+ const sizes = {
3341
+ sm: "Small",
3342
+ md: "Medium",
3343
+ lg: "Large"
3344
+ };
3345
+ const ratingCatalog = defineCatalogEntry({
3346
+ summary: "A row of icons the user sets as a rating, or a read-only display of one.",
3347
+ isPlaceable: true,
3348
+ example: {
3349
+ component: "Rating",
3350
+ props: {
3351
+ defaultValue: 3,
3352
+ "aria-label": "Rating",
3353
+ emptyLabelText: "No rating"
3354
+ },
3355
+ children: []
3356
+ },
3357
+ variants: Object.keys(sizes).map((size) => ({
3358
+ name: size,
3359
+ label: sizes[size],
3360
+ example: {
3361
+ component: "Rating",
3362
+ props: {
3363
+ defaultValue: 3,
3364
+ size,
3365
+ "aria-label": "Rating"
3366
+ },
3367
+ children: []
3368
+ }
3369
+ })),
3370
+ options: {
3371
+ max: {
3372
+ values: [
3373
+ 3,
3374
+ 5,
3375
+ 10
3376
+ ],
3377
+ default: 5
3378
+ },
3379
+ precision: {
3380
+ values: ratingPrecisionValues,
3381
+ default: 1
3382
+ },
3383
+ highlightSelectedOnly: {
3384
+ values: [true, false],
3385
+ default: false
3386
+ },
3387
+ readOnly: {
3388
+ values: [true, false],
3389
+ default: false
3390
+ },
3391
+ disabled: {
3392
+ values: [true, false],
3393
+ default: false
3394
+ },
3395
+ required: {
3396
+ values: [true, false],
3397
+ default: false
3398
+ },
3399
+ error: {
3400
+ values: [true, false],
3401
+ default: false
3402
+ },
3403
+ size: {
3404
+ scale: "sizes",
3405
+ default: "md"
3406
+ },
3407
+ color: {
3408
+ scale: "palette",
3409
+ default: "warning"
3410
+ }
3411
+ },
3412
+ content: {
3413
+ icon: "child",
3414
+ emptyIcon: "child"
3415
+ },
3416
+ twoWay: {
3417
+ prop: "value",
3418
+ event: "onChange",
3419
+ read: "argument"
3420
+ },
3421
+ domEvents: ["onChangeActive"]
3422
+ });
3423
+ // src/catalog/entries/Select.ts
3424
+ const selectVariantValues = [
3425
+ "default",
3426
+ "outlined",
3427
+ "text",
3428
+ "underline"
3429
+ ];
3430
+ const variantLabels$8 = {
3431
+ default: "Filled",
3432
+ outlined: "Outlined",
3433
+ text: "Text",
3434
+ underline: "Underline"
3435
+ };
3436
+ const platforms$1 = [
3437
+ node("MenuItem", { value: "web" }, ["Web"]),
3438
+ node("MenuItem", { value: "android" }, ["Android"]),
3439
+ node("MenuItem", { value: "ios" }, ["iOS"])
3440
+ ];
3441
+ const selectCatalog = defineCatalogEntry({
3442
+ summary: "The select to use - a custom listbox of `MenuItem` options, or `native` for the platform picker.",
3443
+ isPlaceable: true,
3444
+ example: {
3445
+ component: "Select",
3446
+ props: {
3447
+ placeholder: "Pick a platform",
3448
+ variant: "outlined"
3449
+ },
3450
+ children: platforms$1
3451
+ },
3452
+ variants: selectVariantValues.map((variant) => ({
3453
+ name: variant,
3454
+ label: variantLabels$8[variant],
3455
+ example: {
3456
+ component: "Select",
3457
+ props: {
3458
+ placeholder: "Pick a platform",
3459
+ variant
3460
+ },
3461
+ children: platforms$1
3462
+ }
3463
+ })),
3464
+ options: {
3465
+ variant: {
3466
+ values: selectVariantValues,
3467
+ default: "default"
3468
+ },
3469
+ color: {
3470
+ scale: "palette",
3471
+ default: "primary"
3472
+ },
3473
+ textColor: { scale: "text" },
3474
+ bg: { scale: "background" },
3475
+ size: {
3476
+ scale: "sizes",
3477
+ default: "md"
3478
+ },
3479
+ borderRadius: { scale: "radii" },
3480
+ native: {
3481
+ values: [true, false],
3482
+ default: false
3483
+ },
3484
+ multiple: {
3485
+ values: [true, false],
3486
+ default: false
3487
+ },
3488
+ disabled: {
3489
+ values: [true, false],
3490
+ default: false
3491
+ },
3492
+ error: {
3493
+ values: [true, false],
3494
+ default: false
3495
+ },
3496
+ required: {
3497
+ values: [true, false],
3498
+ default: false
3499
+ },
3500
+ fullWidth: {
3501
+ values: [true, false],
3502
+ default: false
3503
+ }
3504
+ },
3505
+ content: {
3506
+ children: "children",
3507
+ placeholder: "text",
3508
+ renderValue: "none"
3509
+ },
3510
+ twoWay: {
3511
+ prop: "value",
3512
+ event: "onChange",
3513
+ read: "argument"
3514
+ },
3515
+ preview: { width: 220 }
3516
+ });
3517
+ // src/catalog/entries/Sidebar.ts
3518
+ const sidebarAnchorValues = ["left", "right"];
3519
+ const sidebarLayoutValues = ["inline", "stacked"];
3520
+ const sidebarVariantValues = [
3521
+ "text",
3522
+ "outlined",
3523
+ "plain"
3524
+ ];
3525
+ const variantLabels$7 = {
3526
+ text: "Text",
3527
+ outlined: "Outlined",
3528
+ plain: "Plain"
3529
+ };
3530
+ const items$1 = [
3531
+ node("SidebarItem", {
3532
+ icon: "folder",
3533
+ label: "Directory",
3534
+ isSelected: true
3535
+ }),
3536
+ node("SidebarItem", {
3537
+ icon: "history",
3538
+ label: "Gist history"
3539
+ }),
3540
+ node("SidebarItem", {
3541
+ icon: "edit_note",
3542
+ label: "Drafts"
3543
+ }),
3544
+ node("SidebarItem", {
3545
+ icon: "terminal",
3546
+ label: "Terminal console"
3547
+ })
3548
+ ];
3549
+ const content$1 = {
3550
+ isOpen: false,
3551
+ anchor: "left",
3552
+ "aria-label": "Editor panels"
3553
+ };
3554
+ const sidebarCatalog = defineCatalogEntry({
3555
+ summary: "A collapsible navigation rail of `SidebarItem`s - icons only when closed, icons and labels when open.",
3556
+ isPlaceable: true,
3557
+ example: {
3558
+ component: "Sidebar",
3559
+ props: content$1,
3560
+ children: items$1
3561
+ },
3562
+ variants: sidebarVariantValues.map((variant) => ({
3563
+ name: variant,
3564
+ label: variantLabels$7[variant],
3565
+ example: {
3566
+ component: "Sidebar",
3567
+ props: {
3568
+ ...content$1,
3569
+ variant
3570
+ },
3571
+ children: items$1
3572
+ }
3573
+ })),
3574
+ options: {
3575
+ isOpen: { values: [true, false] },
3576
+ anchor: {
3577
+ values: sidebarAnchorValues,
3578
+ default: "left"
3579
+ },
3580
+ variant: {
3581
+ values: sidebarVariantValues,
3582
+ default: "text"
3583
+ },
3584
+ layout: {
3585
+ values: sidebarLayoutValues,
3586
+ default: "inline"
3587
+ },
3588
+ expandedWidth: { default: "14rem" },
3589
+ collapsedWidth: { default: "3.5rem" },
3590
+ stackedWidth: { default: "5.5rem" },
3591
+ hasPanel: {
3592
+ values: [true, false],
3593
+ default: false
3594
+ },
3595
+ panelWidth: { default: "18rem" },
3596
+ bg: { scale: "background" }
3597
+ },
3598
+ content: { children: "children" }
3599
+ });
3600
+ // src/catalog/entries/SidebarItem.ts
3601
+ const sidebarItemVariantValues = [
3602
+ "text",
3603
+ "outlined",
3604
+ "plain"
3605
+ ];
3606
+ const variantLabels$6 = {
3607
+ text: "Text",
3608
+ outlined: "Outlined",
3609
+ plain: "Plain"
3610
+ };
3611
+ const content = {
3612
+ icon: "folder",
3613
+ label: "Directory"
3614
+ };
3615
+ const sidebarItemCatalog = defineCatalogEntry({
3616
+ summary: "One entry of a `Sidebar` - an icon, with its label shown while the rail is open.",
3617
+ isPlaceable: false,
3618
+ example: {
3619
+ component: "SidebarItem",
3620
+ props: {
3621
+ ...content,
3622
+ variant: "text"
3623
+ },
3624
+ children: []
3625
+ },
3626
+ variants: sidebarItemVariantValues.map((variant) => ({
3627
+ name: variant,
3628
+ label: variantLabels$6[variant],
3629
+ example: {
3630
+ component: "SidebarItem",
3631
+ props: {
3632
+ ...content,
3633
+ variant
3634
+ },
3635
+ children: []
3636
+ }
3637
+ })),
3638
+ options: {
3639
+ variant: {
3640
+ values: sidebarItemVariantValues,
3641
+ default: "text"
3642
+ },
3643
+ size: {
3644
+ scale: "sizes",
3645
+ default: "sm"
3646
+ },
3647
+ color: {
3648
+ scale: "palette",
3649
+ default: "primary"
3650
+ },
3651
+ isSelected: {
3652
+ values: [true, false],
3653
+ default: false
3654
+ },
3655
+ disabled: {
3656
+ values: [true, false],
3657
+ default: false
3658
+ }
3659
+ },
3660
+ content: {
3661
+ children: "children",
3662
+ label: "text"
3663
+ },
3664
+ domEvents: ["onSelect", "onClick"]
3665
+ });
3666
+ // src/catalog/entries/Skeleton.ts
3667
+ const skeletonVariantValues = [
3668
+ "text",
3669
+ "circular",
3670
+ "rectangular"
3671
+ ];
3672
+ const skeletonAnimationValues = [
3673
+ "pulse",
3674
+ "wave",
3675
+ false
3676
+ ];
3677
+ const variantLabels$5 = {
3678
+ text: "Text",
3679
+ circular: "Circular",
3680
+ rectangular: "Rectangular"
3681
+ };
3682
+ const shapes = {
3683
+ text: { width: 240 },
3684
+ circular: {
3685
+ width: 64,
3686
+ height: 64
3687
+ },
3688
+ rectangular: {
3689
+ width: 240,
3690
+ height: 64
3691
+ }
3692
+ };
3693
+ const skeletonCatalog = defineCatalogEntry({
3694
+ summary: "A placeholder shape shown while content loads - a text line, a circle or a block.",
3695
+ isPlaceable: true,
3696
+ example: {
3697
+ component: "Skeleton",
3698
+ props: {
3699
+ variant: "text",
3700
+ animation: "pulse",
3701
+ width: 240
3702
+ },
3703
+ children: []
3704
+ },
3705
+ variants: skeletonVariantValues.map((variant) => ({
3706
+ name: variant,
3707
+ label: variantLabels$5[variant],
3708
+ example: {
3709
+ component: "Skeleton",
3710
+ props: {
3711
+ variant,
3712
+ ...shapes[variant]
3713
+ },
3714
+ children: []
3715
+ }
3716
+ })),
3717
+ options: {
3718
+ variant: {
3719
+ values: skeletonVariantValues,
3720
+ default: "text"
3721
+ },
3722
+ animation: {
3723
+ values: skeletonAnimationValues,
3724
+ default: "pulse"
3725
+ },
3726
+ borderRadius: { scale: "radii" }
3727
+ },
3728
+ content: { children: "children" },
3729
+ preview: {
3730
+ width: 280,
3731
+ height: 80
3732
+ }
3733
+ });
3734
+ // src/catalog/entries/Switch.ts
3735
+ const switchVariantValues = ["outside", "inside"];
3736
+ const switchEdgeValues = [
3737
+ "start",
3738
+ "end",
3739
+ false
3740
+ ];
3741
+ const variantLabels$4 = {
3742
+ outside: "Outside thumb",
3743
+ inside: "Inside thumb"
3744
+ };
3745
+ const switchCatalog = defineCatalogEntry({
3746
+ summary: "An on/off toggle with an optional label, its thumb over or inside the track.",
3747
+ isPlaceable: true,
3748
+ example: {
3749
+ component: "Switch",
3750
+ props: {},
3751
+ children: ["Enable dark mode"]
3752
+ },
3753
+ variants: switchVariantValues.map((variant) => ({
3754
+ name: variant,
3755
+ label: variantLabels$4[variant],
3756
+ example: {
3757
+ component: "Switch",
3758
+ props: { variant },
3759
+ children: ["Enable dark mode"]
3760
+ }
3761
+ })),
3762
+ options: {
3763
+ variant: {
3764
+ values: switchVariantValues,
3765
+ default: "outside"
3766
+ },
3767
+ color: {
3768
+ scale: "palette",
3769
+ default: "default"
3770
+ },
3771
+ bg: {
3772
+ scale: "background",
3773
+ default: "default"
3774
+ },
3775
+ size: {
3776
+ scale: "sizes",
3777
+ default: "md"
3778
+ },
3779
+ marked: {
3780
+ values: [true, false],
3781
+ default: false
3782
+ },
3783
+ edge: {
3784
+ values: switchEdgeValues,
3785
+ default: false
3786
+ },
3787
+ disabled: {
3788
+ values: [true, false],
3789
+ default: false
3790
+ },
3791
+ required: {
3792
+ values: [true, false],
3793
+ default: false
3794
+ }
3795
+ },
3796
+ content: {
3797
+ children: "children",
3798
+ icon: "child",
3799
+ checkedIcon: "child"
3800
+ },
3801
+ twoWay: {
3802
+ prop: "checked",
3803
+ event: "onChange",
3804
+ read: "target.checked"
3805
+ }
3806
+ });
3807
+ // src/catalog/entries/Tab.ts
3808
+ const tabIconPositionValues = [
3809
+ "top",
3810
+ "start",
3811
+ "end",
3812
+ "bottom"
3813
+ ];
3814
+ const tabCatalog = defineCatalogEntry({
3815
+ summary: "One tab of a `Tabs` row - a label, an icon on any side, and an optional close button.",
3816
+ isPlaceable: false,
3817
+ example: {
3818
+ component: "Tab",
3819
+ props: {
3820
+ value: "canvas",
3821
+ label: "Canvas"
3822
+ },
3823
+ children: []
3824
+ },
3825
+ variants: [],
3826
+ options: {
3827
+ disabled: {
3828
+ values: [true, false],
3829
+ default: false
3830
+ },
3831
+ isWrapped: {
3832
+ values: [true, false],
3833
+ default: false
3834
+ },
3835
+ iconPosition: {
3836
+ values: tabIconPositionValues,
3837
+ default: "top"
3838
+ },
3839
+ color: { scale: "palette" },
3840
+ textColor: { scale: "text" },
3841
+ size: { scale: "sizes" },
3842
+ bg: { scale: "background" },
3843
+ selectedBg: { scale: "background" },
3844
+ borderRadius: { scale: "radii" }
3845
+ },
3846
+ content: {
3847
+ label: "text",
3848
+ icon: "child",
3849
+ secondaryAction: "child"
3850
+ },
3851
+ domEvents: ["onClick"]
3852
+ });
3853
+ // src/catalog/entries/TabPanel.ts
3854
+ const tabPanelCatalog = defineCatalogEntry({
3855
+ summary: "The content a tab shows - inside a `TabContext`, shown while its tab is selected.",
3856
+ isPlaceable: false,
3857
+ example: {
3858
+ component: "TabPanel",
3859
+ props: { value: "layers" },
3860
+ children: [node("Typography", {}, ["Layers of the page."])]
3861
+ },
3862
+ variants: [],
3863
+ options: {
3864
+ shouldKeepMounted: {
3865
+ values: [true, false],
3866
+ default: false
3867
+ },
3868
+ bg: { scale: "background" },
3869
+ borderRadius: { scale: "radii" }
3870
+ },
3871
+ content: { children: "children" }
3872
+ });
3873
+ // src/catalog/entries/Tabs.ts
3874
+ const tabsVariantValues = [
3875
+ "underline",
3876
+ "boxed",
3877
+ "enclosed",
3878
+ "tonal"
3879
+ ];
3880
+ const tabsOrientationValues = ["horizontal", "vertical"];
3881
+ const tabsOverflowBehaviorValues = [
3882
+ "scroll",
3883
+ "menu",
3884
+ "none"
3885
+ ];
3886
+ const tabsScrollButtonsValues = [
3887
+ "auto",
3888
+ "always",
3889
+ "never"
3890
+ ];
3891
+ const variantLabels$3 = {
3892
+ underline: "Underline",
3893
+ boxed: "Boxed",
3894
+ enclosed: "Enclosed",
3895
+ tonal: "Tonal"
3896
+ };
3897
+ const views = [
3898
+ node("Tab", {
3899
+ value: "canvas",
3900
+ label: "Canvas"
3901
+ }),
3902
+ node("Tab", {
3903
+ value: "system",
3904
+ label: "Design system"
3905
+ }),
3906
+ node("Tab", {
3907
+ value: "common",
3908
+ label: "Common components"
3909
+ })
3910
+ ];
3911
+ const tabsCatalog = defineCatalogEntry({
3912
+ summary: "A row of `Tab`s - a tablist, or with `as=\"nav\"` a navigation.",
3913
+ isPlaceable: true,
3914
+ example: {
3915
+ component: "Tabs",
3916
+ props: {
3917
+ defaultValue: "canvas",
3918
+ "aria-label": "Views"
3919
+ },
3920
+ children: views
3921
+ },
3922
+ variants: tabsVariantValues.map((variant) => ({
3923
+ name: variant,
3924
+ label: variantLabels$3[variant],
3925
+ example: {
3926
+ component: "Tabs",
3927
+ props: {
3928
+ defaultValue: "canvas",
3929
+ variant,
3930
+ "aria-label": "Views"
3931
+ },
3932
+ children: views
3933
+ }
3934
+ })),
3935
+ options: {
3936
+ variant: {
3937
+ values: tabsVariantValues,
3938
+ default: "underline"
3939
+ },
3940
+ orientation: {
3941
+ values: tabsOrientationValues,
3942
+ default: "horizontal"
3943
+ },
3944
+ as: {
3945
+ values: ["div", "nav"],
3946
+ default: "div"
3947
+ },
3948
+ color: {
3949
+ scale: "palette",
3950
+ default: "primary"
3951
+ },
3952
+ textColor: { scale: "text" },
3953
+ size: {
3954
+ scale: "sizes",
3955
+ default: "md"
3956
+ },
3957
+ fullWidth: {
3958
+ values: [true, false],
3959
+ default: false
3960
+ },
3961
+ isCentered: {
3962
+ values: [true, false],
3963
+ default: false
3964
+ },
3965
+ shouldSelectOnFocus: {
3966
+ values: [true, false],
3967
+ default: false
3968
+ },
3969
+ overflowBehavior: {
3970
+ values: tabsOverflowBehaviorValues,
3971
+ default: "none"
3972
+ },
3973
+ scrollButtons: {
3974
+ values: tabsScrollButtonsValues,
3975
+ default: "auto"
3976
+ },
3977
+ shouldShowScrollButtonsOnMobile: {
3978
+ values: [true, false],
3979
+ default: false
3980
+ },
3981
+ hasVisibleScrollbar: {
3982
+ values: [true, false],
3983
+ default: false
3984
+ },
3985
+ hasDivider: { values: [true, false] },
3986
+ bg: { scale: "background" },
3987
+ selectedBg: { scale: "background" }
3988
+ },
3989
+ content: {
3990
+ children: "children",
3991
+ startContent: "children",
3992
+ endContent: "children",
3993
+ slots: "none"
3994
+ },
3995
+ twoWay: {
3996
+ prop: "value",
3997
+ event: "onChange",
3998
+ read: "argument"
3999
+ },
4000
+ domEvents: ["onTabClose"],
4001
+ preview: { width: 360 }
4002
+ });
4003
+ // src/catalog/entries/TabContext.ts
4004
+ const tabContextCatalog = defineCatalogEntry({
4005
+ summary: "Holds the selected value for a `TabList` and the `TabPanel`s beside it, wherever they sit.",
4006
+ isPlaceable: false,
4007
+ example: {
4008
+ component: "TabContext",
4009
+ props: { defaultValue: "layers" },
4010
+ children: [
4011
+ node("TabList", { "aria-label": "Left panel" }, [node("Tab", {
4012
+ value: "layers",
4013
+ label: "Layers"
4014
+ }), node("Tab", {
4015
+ value: "assets",
4016
+ label: "Assets"
4017
+ })]),
4018
+ node("TabPanel", {
4019
+ value: "layers",
4020
+ p: 2
4021
+ }, [node("Typography", {}, ["Layers of the page."])]),
4022
+ node("TabPanel", {
4023
+ value: "assets",
4024
+ p: 2
4025
+ }, [node("Typography", {}, ["The page's assets."])])
4026
+ ]
4027
+ },
4028
+ variants: [],
4029
+ options: {},
4030
+ content: { children: "children" },
4031
+ twoWay: {
4032
+ prop: "value",
4033
+ event: "onChange",
4034
+ read: "argument"
4035
+ }
4036
+ });
4037
+ // src/catalog/entries/TabList.ts
4038
+ const tabListCatalog = defineCatalogEntry({
4039
+ summary: "The `Tabs` of a `TabContext` - it shows the context's value and links each tab to its panel.",
4040
+ isPlaceable: false,
4041
+ example: {
4042
+ component: "TabList",
4043
+ props: { "aria-label": "Left panel" },
4044
+ children: [node("Tab", {
4045
+ value: "layers",
4046
+ label: "Layers"
4047
+ }), node("Tab", {
4048
+ value: "assets",
4049
+ label: "Assets"
4050
+ })]
4051
+ },
4052
+ variants: [],
4053
+ options: {},
4054
+ content: {
4055
+ children: "children",
4056
+ startContent: "children",
4057
+ endContent: "children"
4058
+ },
4059
+ domEvents: ["onChange", "onTabClose"]
4060
+ });
4061
+ // src/catalog/entries/TabScrollButton.ts
4062
+ const tabScrollDirectionValues = ["start", "end"];
4063
+ const tabScrollButtonCatalog = defineCatalogEntry({
4064
+ summary: "The button that scrolls a row of tabs - a `Tabs` shows one at each end while they overflow.",
4065
+ isPlaceable: false,
4066
+ example: {
4067
+ component: "TabScrollButton",
4068
+ props: { direction: "end" },
4069
+ children: []
4070
+ },
4071
+ variants: [],
4072
+ options: {
4073
+ direction: { values: tabScrollDirectionValues },
4074
+ orientation: {
4075
+ values: ["horizontal", "vertical"],
4076
+ default: "horizontal"
4077
+ },
4078
+ disabled: {
4079
+ values: [true, false],
4080
+ default: false
4081
+ },
4082
+ isHidden: {
4083
+ values: [true, false],
4084
+ default: false
4085
+ },
4086
+ color: { scale: "palette" },
4087
+ textColor: { scale: "text" }
4088
+ },
4089
+ content: { children: "children" },
4090
+ domEvents: ["onClick"]
4091
+ });
4092
+ // src/catalog/entries/Table.ts
4093
+ const tableSizeValues = [
4094
+ "sm",
4095
+ "md",
4096
+ "lg"
4097
+ ];
4098
+ const tableCellPaddingValues = ["normal", "none"];
4099
+ const tableAlignValues = [
4100
+ "left",
4101
+ "right",
4102
+ "center",
4103
+ "justify"
4104
+ ];
4105
+ const sizeLabels = {
4106
+ sm: "Dense",
4107
+ md: "Default",
4108
+ lg: "Roomy"
4109
+ };
4110
+ const deployments = [node("TableHead", {}, [node("TableRow", {}, [
4111
+ node("TableCell", {}, ["Service"]),
4112
+ node("TableCell", {}, ["Region"]),
4113
+ node("TableCell", { align: "right" }, ["Latency (ms)"])
4114
+ ])]), node("TableBody", {}, [node("TableRow", { isHoverable: true }, [
4115
+ node("TableCell", {}, ["web"]),
4116
+ node("TableCell", {}, ["fra1"]),
4117
+ node("TableCell", { align: "right" }, ["42"])
4118
+ ]), node("TableRow", { isHoverable: true }, [
4119
+ node("TableCell", {}, ["api"]),
4120
+ node("TableCell", {}, ["fra1"]),
4121
+ node("TableCell", { align: "right" }, ["87"])
4122
+ ])])];
4123
+ const tableCatalog = defineCatalogEntry({
4124
+ summary: "A data table - `TableHead`, `TableBody` and `TableFooter` sections of `TableRow`s and `TableCell`s, with density and padding set once for every cell.",
4125
+ isPlaceable: true,
4126
+ example: {
4127
+ component: "Table",
4128
+ props: {},
4129
+ children: deployments
4130
+ },
4131
+ variants: tableSizeValues.map((size) => ({
4132
+ name: size,
4133
+ label: sizeLabels[size],
4134
+ example: {
4135
+ component: "Table",
4136
+ props: { size },
4137
+ children: deployments
4138
+ }
4139
+ })),
4140
+ options: {
4141
+ size: {
4142
+ scale: "sizes",
4143
+ default: "md"
4144
+ },
4145
+ cellPadding: {
4146
+ values: tableCellPaddingValues,
4147
+ default: "normal"
4148
+ },
4149
+ align: { values: tableAlignValues },
4150
+ color: { scale: "palette" },
4151
+ bg: { scale: "background" },
4152
+ borderColor: {
4153
+ scale: "border",
4154
+ default: "light"
4155
+ },
4156
+ borderRadius: { scale: "radii" },
4157
+ hasStickyHeader: {
4158
+ values: [true, false],
4159
+ default: false
4160
+ },
4161
+ shouldHideSortIcon: {
4162
+ values: [true, false],
4163
+ default: true
4164
+ },
4165
+ hasEllipsis: {
4166
+ values: [true, false],
4167
+ default: false
4168
+ }
4169
+ },
4170
+ content: { children: "children" },
4171
+ preview: { width: 360 }
4172
+ });
4173
+ // src/catalog/entries/TableBody.ts
4174
+ const tableBodyCatalog = defineCatalogEntry({
4175
+ summary: "The body section of a `Table` - its data rows, with cells rendered as `<td>`.",
4176
+ isPlaceable: false,
4177
+ example: {
4178
+ component: "TableBody",
4179
+ props: {},
4180
+ children: [node("TableRow", { isHoverable: true }, [
4181
+ node("TableCell", {}, ["web"]),
4182
+ node("TableCell", {}, ["fra1"]),
4183
+ node("TableCell", { align: "right" }, ["42"])
4184
+ ]), node("TableRow", { isHoverable: true }, [
4185
+ node("TableCell", {}, ["api"]),
4186
+ node("TableCell", {}, ["fra1"]),
4187
+ node("TableCell", { align: "right" }, ["87"])
4188
+ ])]
4189
+ },
4190
+ variants: [],
4191
+ options: {
4192
+ color: { scale: "text" },
4193
+ bg: { scale: "background" },
4194
+ borderColor: { scale: "border" }
4195
+ },
4196
+ content: { children: "children" }
4197
+ });
4198
+ // src/catalog/entries/TableCell.ts
4199
+ const tableCellVariantValues = [
4200
+ "head",
4201
+ "body",
4202
+ "footer"
4203
+ ];
4204
+ const tableCellAlignValues = [
4205
+ "inherit",
4206
+ "left",
4207
+ "right",
4208
+ "center",
4209
+ "justify"
4210
+ ];
4211
+ const tableCellSortDirectionValues = ["asc", "desc"];
4212
+ const cellPaddingValues$1 = ["normal", "none"];
4213
+ const variantLabels$2 = {
4214
+ head: "Head",
4215
+ body: "Body",
4216
+ footer: "Footer"
4217
+ };
4218
+ const tableCellCatalog = defineCatalogEntry({
4219
+ summary: "One cell of a `TableRow` - a header `<th>` or a data `<td>`, taken from its section unless `variant` says otherwise.",
4220
+ isPlaceable: false,
4221
+ example: {
4222
+ component: "TableCell",
4223
+ props: {},
4224
+ children: ["web"]
4225
+ },
4226
+ variants: tableCellVariantValues.map((variant) => ({
4227
+ name: variant,
4228
+ label: variantLabels$2[variant],
4229
+ example: {
4230
+ component: "TableCell",
4231
+ props: { variant },
4232
+ children: ["web"]
4233
+ }
4234
+ })),
4235
+ options: {
4236
+ variant: { values: tableCellVariantValues },
4237
+ align: {
4238
+ values: tableCellAlignValues,
4239
+ default: "inherit"
4240
+ },
4241
+ size: { scale: "sizes" },
4242
+ cellPadding: { values: cellPaddingValues$1 },
4243
+ sortDirection: { values: tableCellSortDirectionValues },
4244
+ hasEllipsis: { values: [true, false] },
4245
+ color: { scale: "text" },
4246
+ bg: { scale: "background" },
4247
+ borderColor: { scale: "border" }
4248
+ },
4249
+ content: { children: "children" }
4250
+ });
4251
+ // src/catalog/entries/TableContainer.ts
4252
+ const tableContainerCatalog = defineCatalogEntry({
4253
+ summary: "A scroll wrapper for a `Table` - a wide table scrolls sideways inside it, and a bounded height lets `hasStickyHeader` stick.",
4254
+ isPlaceable: false,
4255
+ example: {
4256
+ component: "TableContainer",
4257
+ props: {},
4258
+ children: [node("Table", {}, [node("TableHead", {}, [node("TableRow", {}, [
4259
+ node("TableCell", {}, ["Service"]),
4260
+ node("TableCell", {}, ["Region"]),
4261
+ node("TableCell", { align: "right" }, ["Latency (ms)"])
4262
+ ])]), node("TableBody", {}, [node("TableRow", {}, [
4263
+ node("TableCell", {}, ["web"]),
4264
+ node("TableCell", {}, ["fra1"]),
4265
+ node("TableCell", { align: "right" }, ["42"])
4266
+ ]), node("TableRow", {}, [
4267
+ node("TableCell", {}, ["api"]),
4268
+ node("TableCell", {}, ["fra1"]),
4269
+ node("TableCell", { align: "right" }, ["87"])
4270
+ ])])])]
4271
+ },
4272
+ variants: [],
4273
+ options: {
4274
+ bg: { scale: "background" },
4275
+ borderColor: { scale: "border" },
4276
+ borderWidth: { scale: "borderWidths" },
4277
+ borderRadius: { scale: "radii" }
4278
+ },
4279
+ content: { children: "children" },
4280
+ preview: { width: 360 }
4281
+ });
4282
+ // src/catalog/entries/TableControl.ts
4283
+ const tableControlCatalog = defineCatalogEntry({
4284
+ summary: "Renders the visible rows of a dataset inside `TableBody` - sorted by `useTableSort` and sliced by `useTablePagination`, through a row render function.",
4285
+ isPlaceable: false,
4286
+ example: {
4287
+ component: "TableControl",
4288
+ props: {},
4289
+ children: []
4290
+ },
4291
+ variants: [],
4292
+ options: {},
4293
+ content: { children: "none" }
4294
+ });
4295
+ // src/catalog/entries/TableFooter.ts
4296
+ const tableFooterCatalog = defineCatalogEntry({
4297
+ summary: "The footer section of a `Table` - totals or a `TablePagination` row below the body.",
4298
+ isPlaceable: false,
4299
+ example: {
4300
+ component: "TableFooter",
4301
+ props: {},
4302
+ children: [node("TableRow", {}, [node("TableCell", { colSpan: 2 }, ["Total services"]), node("TableCell", { align: "right" }, ["3"])])]
4303
+ },
4304
+ variants: [],
4305
+ options: {
4306
+ color: { scale: "text" },
4307
+ bg: { scale: "background" },
4308
+ borderColor: { scale: "border" }
4309
+ },
4310
+ content: { children: "children" }
4311
+ });
4312
+ // src/catalog/entries/TableHead.ts
4313
+ const tableHeadCatalog = defineCatalogEntry({
4314
+ summary: "The header section of a `Table` - its column-title row, with cells rendered as `<th scope=\"col\">`.",
4315
+ isPlaceable: false,
4316
+ example: {
4317
+ component: "TableHead",
4318
+ props: {},
4319
+ children: [node("TableRow", {}, [
4320
+ node("TableCell", {}, ["Service"]),
4321
+ node("TableCell", {}, ["Region"]),
4322
+ node("TableCell", { align: "right" }, ["Latency (ms)"])
4323
+ ])]
4324
+ },
4325
+ variants: [],
4326
+ options: {
4327
+ color: { scale: "text" },
4328
+ bg: { scale: "background" },
4329
+ borderColor: { scale: "border" }
4330
+ },
4331
+ content: { children: "children" }
4332
+ });
4333
+ const tablePaginationCatalog = defineCatalogEntry({
4334
+ summary: "A pagination cell for `TableFooter > TableRow` - a rows-per-page picker, the shown range and previous/next buttons for a controlled page.",
4335
+ isPlaceable: false,
4336
+ example: {
4337
+ component: "TablePagination",
4338
+ props: {
4339
+ count: 100,
4340
+ page: 2,
4341
+ rowsPerPage: 10
4342
+ },
4343
+ children: []
4344
+ },
4345
+ variants: [],
4346
+ options: {
4347
+ disabled: {
4348
+ values: [true, false],
4349
+ default: false
4350
+ },
4351
+ shouldShowFirstButton: {
4352
+ values: [true, false],
4353
+ default: false
4354
+ },
4355
+ shouldShowLastButton: {
4356
+ values: [true, false],
4357
+ default: false
4358
+ },
4359
+ size: { scale: "sizes" },
4360
+ cellPadding: { values: ["normal", "none"] },
4361
+ color: { scale: "text" },
4362
+ bg: { scale: "background" }
4363
+ },
4364
+ content: {
4365
+ rowsPerPageLabel: "text",
4366
+ displayedRowsLabel: "none"
4367
+ },
4368
+ twoWay: {
4369
+ prop: "page",
4370
+ event: "onPageChange",
4371
+ read: "argument"
4372
+ },
4373
+ preview: { width: 480 }
4374
+ });
4375
+ // src/catalog/entries/TablePaginationActions.ts
4376
+ const tablePaginationActionsCatalog = defineCatalogEntry({
4377
+ summary: "The first, previous, next and last page buttons inside `TablePagination`, disabled at the bounds of `count`.",
4378
+ isPlaceable: false,
4379
+ example: {
4380
+ component: "TablePaginationActions",
4381
+ props: {
4382
+ count: 100,
4383
+ page: 2,
4384
+ rowsPerPage: 10
4385
+ },
4386
+ children: []
4387
+ },
4388
+ variants: [],
4389
+ options: {
4390
+ size: {
4391
+ scale: "sizes",
4392
+ default: "sm"
4393
+ },
4394
+ disabled: {
4395
+ values: [true, false],
4396
+ default: false
4397
+ },
4398
+ shouldShowFirstButton: {
4399
+ values: [true, false],
4400
+ default: false
4401
+ },
4402
+ shouldShowLastButton: {
4403
+ values: [true, false],
4404
+ default: false
4405
+ }
4406
+ },
4407
+ content: {},
4408
+ twoWay: {
4409
+ prop: "page",
4410
+ event: "onPageChange",
4411
+ read: "argument"
4412
+ }
4413
+ });
4414
+ // src/catalog/entries/TableRow.ts
4415
+ const tableRowCatalog = defineCatalogEntry({
4416
+ summary: "One row of a `Table` section - its `TableCell`s, optionally shaded on hover or when selected.",
4417
+ isPlaceable: false,
4418
+ example: {
4419
+ component: "TableRow",
4420
+ props: { isHoverable: true },
4421
+ children: [
4422
+ node("TableCell", {}, ["web"]),
4423
+ node("TableCell", {}, ["fra1"]),
4424
+ node("TableCell", { align: "right" }, ["42"])
4425
+ ]
4426
+ },
4427
+ variants: [],
4428
+ options: {
4429
+ color: {
4430
+ scale: "palette",
4431
+ default: "primary"
4432
+ },
4433
+ bg: { scale: "background" },
4434
+ borderColor: { scale: "border" },
4435
+ isHoverable: {
4436
+ values: [true, false],
4437
+ default: false
4438
+ },
4439
+ isSelected: {
4440
+ values: [true, false],
4441
+ default: false
4442
+ }
4443
+ },
4444
+ content: { children: "children" },
4445
+ domEvents: ["onClick"]
4446
+ });
4447
+ // src/catalog/entries/TableSortLabel.ts
4448
+ const tableSortLabelDirectionValues = ["asc", "desc"];
4449
+ const tableSortLabelCatalog = defineCatalogEntry({
4450
+ summary: "A sortable column title for a header `TableCell` - a button with an arrow showing the sort direction.",
4451
+ isPlaceable: false,
4452
+ example: {
4453
+ component: "TableSortLabel",
4454
+ props: {
4455
+ isActive: true,
4456
+ direction: "asc"
4457
+ },
4458
+ children: ["Name"]
4459
+ },
4460
+ variants: [],
4461
+ options: {
4462
+ isActive: {
4463
+ values: [true, false],
4464
+ default: false
4465
+ },
4466
+ direction: {
4467
+ values: tableSortLabelDirectionValues,
4468
+ default: "asc"
4469
+ },
4470
+ shouldHideSortIcon: {
4471
+ values: [true, false],
4472
+ default: true
4473
+ }
4474
+ },
4475
+ content: { children: "children" },
4476
+ domEvents: ["onClick"]
4477
+ });
4478
+ // src/catalog/entries/TextInput.ts
4479
+ const textInputVariantValues = [
4480
+ "default",
4481
+ "outlined",
4482
+ "text",
4483
+ "underline"
4484
+ ];
4485
+ const variantLabels$1 = {
4486
+ default: "Filled",
4487
+ outlined: "Outlined",
4488
+ text: "Text",
4489
+ underline: "Underline"
4490
+ };
4491
+ const textInputCatalog = defineCatalogEntry({
4492
+ summary: "A text field - one line, or a `multiline` textarea that can grow with its content.",
4493
+ isPlaceable: true,
4494
+ example: {
4495
+ component: "TextInput",
4496
+ props: { placeholder: "Enter a value..." },
4497
+ children: []
4498
+ },
4499
+ variants: textInputVariantValues.map((variant) => ({
4500
+ name: variant,
4501
+ label: variantLabels$1[variant],
4502
+ example: {
4503
+ component: "TextInput",
4504
+ props: {
4505
+ placeholder: "Enter a value...",
4506
+ variant
4507
+ },
4508
+ children: []
4509
+ }
4510
+ })),
4511
+ options: {
4512
+ variant: {
4513
+ values: textInputVariantValues,
4514
+ default: "default"
4515
+ },
4516
+ color: {
4517
+ scale: "palette",
4518
+ default: "primary"
4519
+ },
4520
+ textColor: {
4521
+ scale: "text",
4522
+ default: "primary"
4523
+ },
4524
+ size: {
4525
+ scale: "sizes",
4526
+ default: "md"
4527
+ },
4528
+ borderRadius: { scale: "radii" },
4529
+ disabled: {
4530
+ values: [true, false],
4531
+ default: false
4532
+ },
4533
+ error: {
4534
+ values: [true, false],
4535
+ default: false
4536
+ },
4537
+ readOnly: {
4538
+ values: [true, false],
4539
+ default: false
4540
+ },
4541
+ required: {
4542
+ values: [true, false],
4543
+ default: false
4544
+ },
4545
+ fullWidth: {
4546
+ values: [true, false],
4547
+ default: false
4548
+ },
4549
+ multiline: {
4550
+ values: [true, false],
4551
+ default: false
4552
+ },
4553
+ resize: {
4554
+ values: [true, false],
4555
+ default: false
4556
+ }
4557
+ },
4558
+ content: { placeholder: "text" },
4559
+ twoWay: {
4560
+ prop: "value",
4561
+ event: "onChange",
4562
+ read: "target.value"
4563
+ }
4564
+ });
4565
+ // src/catalog/entries/ToggleButton.ts
4566
+ const colorLabels$1 = {
4567
+ default: "Default",
4568
+ primary: "Primary",
4569
+ secondary: "Secondary",
4570
+ success: "Success",
4571
+ error: "Error",
4572
+ info: "Info",
4573
+ warning: "Warning"
4574
+ };
4575
+ const toggleButtonCatalog = defineCatalogEntry({
4576
+ summary: "A button that stays pressed or not - on its own, or one choice of a `ToggleButtonGroup`.",
4577
+ isPlaceable: true,
4578
+ example: {
4579
+ component: "ToggleButton",
4580
+ props: { value: "check" },
4581
+ children: ["Check"]
4582
+ },
4583
+ variants: Object.keys(colorLabels$1).map((color) => ({
4584
+ name: color,
4585
+ label: colorLabels$1[color],
4586
+ example: {
4587
+ component: "ToggleButton",
4588
+ props: {
4589
+ value: "check",
4590
+ color,
4591
+ isSelected: true
4592
+ },
4593
+ children: ["Check"]
4594
+ }
4595
+ })),
4596
+ options: {
4597
+ color: {
4598
+ scale: "palette",
4599
+ default: "default"
4600
+ },
4601
+ size: {
4602
+ scale: "sizes",
4603
+ default: "md"
4604
+ },
4605
+ isSelected: { values: [true, false] },
4606
+ fullWidth: {
4607
+ values: [true, false],
4608
+ default: false
4609
+ },
4610
+ disabled: {
4611
+ values: [true, false],
4612
+ default: false
4613
+ },
4614
+ loading: {
4615
+ values: [true, false],
4616
+ default: false
4617
+ }
4618
+ },
4619
+ content: {
4620
+ children: "children",
4621
+ startIcon: "child",
4622
+ endIcon: "child",
4623
+ loadingIndicator: "child"
4624
+ },
4625
+ domEvents: ["onClick", "onChange"]
4626
+ });
4627
+ // src/catalog/entries/ToggleButtonGroup.ts
4628
+ const toggleButtonGroupOrientationValues = ["horizontal", "vertical"];
4629
+ const colorLabels = {
4630
+ default: "Default",
4631
+ primary: "Primary",
4632
+ secondary: "Secondary",
4633
+ success: "Success",
4634
+ error: "Error",
4635
+ info: "Info",
4636
+ warning: "Warning"
4637
+ };
4638
+ const colors = Object.keys(colorLabels);
4639
+ const platforms = [
4640
+ node("ToggleButton", { value: "web" }, ["Web"]),
4641
+ node("ToggleButton", { value: "android" }, ["Android"]),
4642
+ node("ToggleButton", { value: "ios" }, ["iOS"])
4643
+ ];
4644
+ const props = {
4645
+ isExclusive: true,
4646
+ value: "web",
4647
+ "aria-label": "Platform"
4648
+ };
4649
+ const toggleButtonGroupCatalog = defineCatalogEntry({
4650
+ summary: "A joined row of `ToggleButton`s where one (`isExclusive`) or several values can be selected.",
4651
+ isPlaceable: true,
4652
+ example: {
4653
+ component: "ToggleButtonGroup",
4654
+ props: {
4655
+ ...props,
4656
+ color: "primary"
4657
+ },
4658
+ children: platforms
4659
+ },
4660
+ variants: colors.map((color) => ({
4661
+ name: color,
4662
+ label: colorLabels[color],
4663
+ example: {
4664
+ component: "ToggleButtonGroup",
4665
+ props: {
4666
+ ...props,
4667
+ color
4668
+ },
4669
+ children: platforms
4670
+ }
4671
+ })),
4672
+ options: {
4673
+ isExclusive: {
4674
+ values: [true, false],
4675
+ default: false
4676
+ },
4677
+ color: {
4678
+ scale: "palette",
4679
+ default: "default"
4680
+ },
4681
+ size: {
4682
+ scale: "sizes",
4683
+ default: "md"
4684
+ },
4685
+ orientation: {
4686
+ values: toggleButtonGroupOrientationValues,
4687
+ default: "horizontal"
4688
+ },
4689
+ borderRadius: {
4690
+ scale: "radii",
4691
+ default: "md"
4692
+ },
4693
+ disabled: {
4694
+ values: [true, false],
4695
+ default: false
4696
+ },
4697
+ fullWidth: {
4698
+ values: [true, false],
4699
+ default: false
4700
+ }
4701
+ },
4702
+ content: { children: "children" },
4703
+ twoWay: {
4704
+ prop: "value",
4705
+ event: "onChange",
4706
+ read: "argument"
4707
+ }
4708
+ });
4709
+ // src/catalog/entries/TransferList.ts
4710
+ const items = [
4711
+ {
4712
+ value: "apple",
4713
+ label: "Apple"
4714
+ },
4715
+ {
4716
+ value: "banana",
4717
+ label: "Banana"
4718
+ },
4719
+ {
4720
+ value: "cherry",
4721
+ label: "Cherry"
4722
+ },
4723
+ {
4724
+ value: "date",
4725
+ label: "Date",
4726
+ disabled: true
4727
+ }
4728
+ ];
4729
+ const names = {
4730
+ leftLabel: "Choices",
4731
+ rightLabel: "Chosen",
4732
+ moveRightLabel: "Move right",
4733
+ moveLeftLabel: "Move left"
4734
+ };
4735
+ const moveAllNames = {
4736
+ moveAllRightLabel: "Move all right",
4737
+ moveAllLeftLabel: "Move all left"
4738
+ };
4739
+ const transferListCatalog = defineCatalogEntry({
4740
+ summary: "Two lists and the buttons that move the checked items from one to the other.",
4741
+ isPlaceable: true,
4742
+ example: {
4743
+ component: "TransferList",
4744
+ props: {
4745
+ items,
4746
+ defaultValue: ["cherry"],
4747
+ ...names
4748
+ },
4749
+ children: []
4750
+ },
4751
+ variants: [
4752
+ {
4753
+ name: "basic",
4754
+ label: "Basic",
4755
+ example: {
4756
+ component: "TransferList",
4757
+ props: {
4758
+ items,
4759
+ ...names
4760
+ },
4761
+ children: []
4762
+ }
4763
+ },
4764
+ {
4765
+ name: "move-all",
4766
+ label: "With move all",
4767
+ example: {
4768
+ component: "TransferList",
4769
+ props: {
4770
+ items,
4771
+ shouldShowMoveAll: true,
4772
+ ...names,
4773
+ ...moveAllNames
4774
+ },
4775
+ children: []
4776
+ }
4777
+ },
4778
+ {
4779
+ name: "select-all",
4780
+ label: "With select all",
4781
+ example: {
4782
+ component: "TransferList",
4783
+ props: {
4784
+ items,
4785
+ hasSelectAll: true,
4786
+ ...names
4787
+ },
4788
+ children: []
4789
+ }
4790
+ }
4791
+ ],
4792
+ options: {
4793
+ shouldShowMoveAll: {
4794
+ values: [true, false],
4795
+ default: false
4796
+ },
4797
+ hasSelectAll: {
4798
+ values: [true, false],
4799
+ default: false
4800
+ },
4801
+ disabled: {
4802
+ values: [true, false],
4803
+ default: false
4804
+ },
4805
+ error: {
4806
+ values: [true, false],
4807
+ default: false
4808
+ },
4809
+ size: {
4810
+ scale: "sizes",
4811
+ default: "md"
4812
+ },
4813
+ color: { scale: "palette" }
4814
+ },
4815
+ content: {},
4816
+ twoWay: {
4817
+ prop: "value",
4818
+ event: "onChange",
4819
+ read: "argument"
4820
+ }
4821
+ });
4822
+ // src/catalog/entries/Typography.ts
4823
+ const typographyAlignValues = [
4824
+ "left",
4825
+ "center",
4826
+ "right",
4827
+ "justify",
4828
+ "inherit"
4829
+ ];
4830
+ const pictured = [
4831
+ "h1",
4832
+ "h2",
4833
+ "h3",
4834
+ "h4",
4835
+ "h5",
4836
+ "h6",
4837
+ "subtitle1",
4838
+ "subtitle2",
4839
+ "body1",
4840
+ "body2",
4841
+ "caption",
4842
+ "overline",
4843
+ "button"
4844
+ ];
4845
+ const variantLabels = {
4846
+ h1: "Heading 1",
4847
+ h2: "Heading 2",
4848
+ h3: "Heading 3",
4849
+ h4: "Heading 4",
4850
+ h5: "Heading 5",
4851
+ h6: "Heading 6",
4852
+ subtitle1: "Subtitle 1",
4853
+ subtitle2: "Subtitle 2",
4854
+ body1: "Body 1",
4855
+ body2: "Body 2",
4856
+ caption: "Caption",
4857
+ overline: "Overline",
4858
+ button: "Button"
4859
+ };
4860
+ const typographyCatalog = defineCatalogEntry({
4861
+ summary: "Text in one of the theme typography variants, rendered as its semantic element.",
4862
+ isPlaceable: true,
4863
+ example: {
4864
+ component: "Typography",
4865
+ props: { variant: "body1" },
4866
+ children: ["Great products are built through clarity, consistency, and attention to detail."]
4867
+ },
4868
+ variants: pictured.map((variant) => ({
4869
+ name: variant,
4870
+ label: variantLabels[variant],
4871
+ example: {
4872
+ component: "Typography",
4873
+ props: { variant },
4874
+ children: ["The quick brown fox"]
4875
+ }
4876
+ })),
4877
+ options: {
4878
+ variant: {
4879
+ scale: "typography",
4880
+ default: "body1"
4881
+ },
4882
+ color: { scale: "text" },
4883
+ bg: { scale: "background" },
4884
+ align: { values: typographyAlignValues },
4885
+ gutterBottom: {
4886
+ values: [true, false],
4887
+ default: false
4888
+ },
4889
+ noWrap: {
4890
+ values: [true, false],
4891
+ default: false
4892
+ }
4893
+ },
4894
+ content: { children: "children" }
4895
+ });
4896
+ // src/catalog/entries/View.ts
4897
+ const viewCatalog = defineCatalogEntry({
4898
+ summary: "The base box - a div styled through theme tokens for space, color, borders and position.",
4899
+ isPlaceable: true,
4900
+ example: {
4901
+ component: "View",
4902
+ props: {},
4903
+ children: ["View content"]
4904
+ },
4905
+ variants: [],
4906
+ options: {
4907
+ bg: { scale: "background" },
4908
+ borderColor: { scale: "border" },
4909
+ borderWidth: { scale: "borderWidths" },
4910
+ borderRadius: { scale: "radii" }
4911
+ },
4912
+ content: { children: "children" }
4913
+ });
4914
+ export { selectVariantValues as $, autocompleteCatalog as $n, formHelperTextCatalog as $t, tabListCatalog as A, buttonGroupCatalog as An, menuAlignValues as At, switchCatalog as B, avatarCatalog as Bn, rangeInputTrackValues as Bt, tableBodyCatalog as C, collapseOrientationValues as Cn, modalCatalog as Ct, tableSizeValues as D, checkboxCatalog as Dn, menuItemCatalog as Dt, tableCellPaddingValues as E, transitionOptions as En, menuItemsCatalog as Et, tabsScrollButtonsValues as F, buttonShapeValues as Fn, linearProgressCatalog as Ft, skeletonVariantValues as G, navGroupCatalog as Gn, iconNameValues as Gt, switchVariantValues as H, appBarCatalog as Hn, imageCatalog as Ht, tabsVariantValues as I, buttonVariantValues as In, linearProgressEasingValues as It, sidebarAnchorValues as J, fabMenuAlignValues as Jn, gridAutoFlowValues as Jt, sidebarItemCatalog as K, navTreeCatalog as Kn, gridAlignContentValues as Kt, tabPanelCatalog as L, breadcrumbsCatalog as Ln, linearProgressVariantValues as Lt, tabsCatalog as M, buttonGroupVariantValues as Mn, linkCatalog as Mt, tabsOrientationValues as N, buttonCatalog as Nn, linkTargetValues as Nt, tabScrollButtonCatalog as O, cardCatalog as On, menuItemRoleValues as Ot, tabsOverflowBehaviorValues as P, buttonLoadingPositionValues as Pn, linkUnderlineValues as Pt, selectCatalog as Q, scrollAreaCatalog as Qn, formLabelCatalog as Qt, tabCatalog as R, breadcrumbsSeparatorValues as Rn, rangeInputCatalog as Rt, tableCellVariantValues as S, collapseCatalog as Sn, accordionCatalog as Sr, nativeSelectVariantValues as St, tableCatalog as T, transitionExampleChild as Tn, menuListCatalog as Tt, skeletonAnimationValues as U, appBarPositionValues as Un, imageObjectFitValues as Ut, switchEdgeValues as V, avatarVariantValues as Vn, rangeInputValueLabelValues as Vt, skeletonCatalog as W, navLinkCatalog as Wn, iconCatalog as Wt, sidebarLayoutValues as X, fabMenuDirectionValues as Xn, gridJustifyContentValues as Xt, sidebarCatalog as Y, fabMenuCatalog as Yn, gridCatalog as Yt, sidebarVariantValues as Z, scrollAreaAxesValues as Zn, gridJustifyItemsValues as Zt, tableControlCatalog as _, zoomCatalog as _n, accordionSummaryCatalog as _r, paginationVariantValues as _t, toggleButtonGroupCatalog as a, flexCatalog as an, snackbarVerticalValues as ar, pressableCatalog as at, tableCellCatalog as b, growCatalog as bn, accordionDetailsCatalog as br, numberInputVariantValues as bt, textInputCatalog as c, flexWrapValues as cn, alertTitleCatalog as cr, popoverAnchorReferenceValues as ct, tableSortLabelDirectionValues as d, drawerAnchorValues as dn, alertVariantValues as dr, paginationItemCatalog as dt, formControlCatalog as en, autocompleteVariantValues as er, ratingCatalog as et, tableRowCatalog as f, drawerCatalog as fn, badgeCatalog as fr, paginationItemShapeValues as ft, tableFooterCatalog as g, contextMenuCatalog as gn, chipVariantValues as gr, paginationShapeValues as gt, tableHeadCatalog as h, circularProgressVariantValues as hn, chipCatalog as hr, paginationCatalog as ht, transferListCatalog as i, flexAlignItemsValues as in, snackbarHorizontalValues as ir, pressableAsValues as it, tabContextCatalog as j, buttonGroupOrientationValues as jn, menuCatalog as jt, tabScrollDirectionValues as k, cardVariantValues as kn, menuDividerCatalog as kt, textInputVariantValues as l, drawerToggleActionValues as ln, alertCatalog as lr, popoverCatalog as lt, tablePaginationCatalog as m, circularProgressEasingValues as mn, badgeVariantValues as mr, paginationItemVariantValues as mt, typographyAlignValues as n, focusTrapCatalog as nn, tooltipPlacementValues as nr, radioCatalog as nt, toggleButtonGroupOrientationValues as o, flexDirectionValues as on, fabCatalog as or, pressableFeedbackValues as ot, tablePaginationActionsCatalog as p, circularProgressCatalog as pn, badgeOverlapValues as pr, paginationItemTypeValues as pt, sidebarItemVariantValues as q, fabMenuItemCatalog as qn, gridAlignItemsValues as qt, typographyCatalog as r, flexAlignContentValues as rn, snackbarCatalog as rr, quoteCatalog as rt, toggleButtonCatalog as s, flexJustifyContentValues as sn, fabVariantValues as sr, portalCatalog as st, viewCatalog as t, formCatalog as tn, tooltipCatalog as tr, ratingPrecisionValues as tt, tableSortLabelCatalog as u, drawerToggleCatalog as un, alertSeverityValues as ur, paperCatalog as ut, tableContainerCatalog as v, slideCatalog as vn, accordionSummaryHeadingLevelValues as vr, numberInputCatalog as vt, tableAlignValues as w, transitionEasingValues as wn, modalScrollValues as wt, tableCellSortDirectionValues as x, fadeCatalog as xn, accordionActionsCatalog as xr, nativeSelectCatalog as xt, tableCellAlignValues as y, slideDirectionValues as yn, accordionGroupCatalog as yr, numberInputSpinButtonsValues as yt, tabIconPositionValues as z, backdropCatalog as zn, rangeInputOrientationValues as zt };