@primer/view-components 0.43.6-rc.c45c1634 → 0.44.0-rc.2b4579f7
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.
- package/app/assets/javascripts/components/primer/alpha/action_menu/action_menu_element.d.ts +5 -0
- package/app/assets/javascripts/components/primer/alpha/action_menu/action_menu_focus_zone_stack.d.ts +17 -0
- package/app/assets/javascripts/components/primer/alpha/tree_view/tree_view.d.ts +39 -0
- package/app/assets/javascripts/components/primer/alpha/tree_view/tree_view_icon_pair_element.d.ts +15 -0
- package/app/assets/javascripts/components/primer/alpha/tree_view/tree_view_include_fragment_element.d.ts +9 -0
- package/app/assets/javascripts/components/primer/alpha/tree_view/tree_view_roving_tab_index.d.ts +3 -0
- package/app/assets/javascripts/components/primer/alpha/tree_view/tree_view_sub_tree_node_element.d.ts +42 -0
- package/app/assets/javascripts/components/primer/primer.d.ts +4 -0
- package/app/assets/javascripts/components/primer/shared_events.d.ts +15 -0
- package/app/assets/javascripts/primer_view_components.js +1 -1
- package/app/assets/javascripts/primer_view_components.js.map +1 -1
- package/app/assets/styles/primer_view_components.css +1 -1
- package/app/assets/styles/primer_view_components.css.map +1 -1
- package/app/components/primer/alpha/action_menu/action_menu_element.d.ts +5 -0
- package/app/components/primer/alpha/action_menu/action_menu_element.js +113 -16
- package/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.d.ts +17 -0
- package/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.js +62 -0
- package/app/components/primer/alpha/skeleton_box.css +1 -0
- package/app/components/primer/alpha/skeleton_box.css.json +6 -0
- package/app/components/primer/alpha/tree_view/tree_view.d.ts +39 -0
- package/app/components/primer/alpha/tree_view/tree_view.js +363 -0
- package/app/components/primer/alpha/tree_view/tree_view_icon_pair_element.d.ts +15 -0
- package/app/components/primer/alpha/tree_view/tree_view_icon_pair_element.js +62 -0
- package/app/components/primer/alpha/tree_view/tree_view_include_fragment_element.d.ts +9 -0
- package/app/components/primer/alpha/tree_view/tree_view_include_fragment_element.js +28 -0
- package/app/components/primer/alpha/tree_view/tree_view_roving_tab_index.d.ts +3 -0
- package/app/components/primer/alpha/tree_view/tree_view_roving_tab_index.js +130 -0
- package/app/components/primer/alpha/tree_view/tree_view_sub_tree_node_element.d.ts +42 -0
- package/app/components/primer/alpha/tree_view/tree_view_sub_tree_node_element.js +418 -0
- package/app/components/primer/alpha/tree_view.css +1 -0
- package/app/components/primer/alpha/tree_view.css.json +52 -0
- package/app/components/primer/beta/breadcrumbs.css +1 -1
- package/app/components/primer/beta/breadcrumbs.css.json +0 -1
- package/app/components/primer/beta/progress_bar.css +1 -1
- package/app/components/primer/primer.d.ts +4 -0
- package/app/components/primer/primer.js +4 -0
- package/app/components/primer/shared_events.d.ts +15 -0
- package/package.json +2 -2
- package/static/arguments.json +632 -83
- package/static/audited_at.json +21 -0
- package/static/classes.json +15 -0
- package/static/constants.json +128 -7
- package/static/info_arch.json +2602 -764
- package/static/previews.json +245 -0
- package/static/statuses.json +21 -0
package/static/arguments.json
CHANGED
@@ -325,77 +325,11 @@
|
|
325
325
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu.rb",
|
326
326
|
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/default/",
|
327
327
|
"parameters": [
|
328
|
-
{
|
329
|
-
"name": "menu_id",
|
330
|
-
"type": "String",
|
331
|
-
"default": "`self.class.generate_id`",
|
332
|
-
"description": "Id of the menu."
|
333
|
-
},
|
334
|
-
{
|
335
|
-
"name": "anchor_align",
|
336
|
-
"type": "Symbol",
|
337
|
-
"default": "`:start`",
|
338
|
-
"description": "One of `:center`, `:end`, or `:start`.."
|
339
|
-
},
|
340
|
-
{
|
341
|
-
"name": "anchor_side",
|
342
|
-
"type": "Symbol",
|
343
|
-
"default": "`:outside_bottom`",
|
344
|
-
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`.."
|
345
|
-
},
|
346
|
-
{
|
347
|
-
"name": "size",
|
348
|
-
"type": "Symbol",
|
349
|
-
"default": "`:auto`",
|
350
|
-
"description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`.."
|
351
|
-
},
|
352
|
-
{
|
353
|
-
"name": "src",
|
354
|
-
"type": "String",
|
355
|
-
"default": "`nil`",
|
356
|
-
"description": "Used with an `include-fragment` element to load menu content from the given source URL."
|
357
|
-
},
|
358
|
-
{
|
359
|
-
"name": "preload",
|
360
|
-
"type": "Boolean",
|
361
|
-
"default": "`false`",
|
362
|
-
"description": "When true, and src is present, loads the `include-fragment` on trigger hover."
|
363
|
-
},
|
364
|
-
{
|
365
|
-
"name": "dynamic_label",
|
366
|
-
"type": "Boolean",
|
367
|
-
"default": "`false`",
|
368
|
-
"description": "Whether or not to display the text of the currently selected item in the show button."
|
369
|
-
},
|
370
|
-
{
|
371
|
-
"name": "dynamic_label_prefix",
|
372
|
-
"type": "String",
|
373
|
-
"default": "`nil`",
|
374
|
-
"description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
|
375
|
-
},
|
376
|
-
{
|
377
|
-
"name": "select_variant",
|
378
|
-
"type": "Symbol",
|
379
|
-
"default": "`:none`",
|
380
|
-
"description": "One of `:multiple`, `:none`, or `:single`."
|
381
|
-
},
|
382
|
-
{
|
383
|
-
"name": "form_arguments",
|
384
|
-
"type": "Hash",
|
385
|
-
"default": "`{}`",
|
386
|
-
"description": "Allows an `ActionMenu` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission."
|
387
|
-
},
|
388
|
-
{
|
389
|
-
"name": "overlay_arguments",
|
390
|
-
"type": "Hash",
|
391
|
-
"default": "`{}`",
|
392
|
-
"description": "Arguments to pass to the underlying [Overlay](/components/alpha/overlay)"
|
393
|
-
},
|
394
328
|
{
|
395
329
|
"name": "system_arguments",
|
396
330
|
"type": "Hash",
|
397
331
|
"default": "N/A",
|
398
|
-
"description": "
|
332
|
+
"description": "The arguments accepted by [ActionMenu::PrimaryMenu](/components/alpha/actionmenuprimarymenu)."
|
399
333
|
}
|
400
334
|
]
|
401
335
|
},
|
@@ -484,7 +418,7 @@
|
|
484
418
|
"name": "system_arguments",
|
485
419
|
"type": "Hash",
|
486
420
|
"default": "N/A",
|
487
|
-
"description": "The arguments accepted by [
|
421
|
+
"description": "The arguments accepted by [ActionMenu::ListWrapper](/components/alpha/actionmenulistwrapper)"
|
488
422
|
}
|
489
423
|
]
|
490
424
|
},
|
@@ -510,6 +444,171 @@
|
|
510
444
|
}
|
511
445
|
]
|
512
446
|
},
|
447
|
+
{
|
448
|
+
"component": "ActionMenu::Menu",
|
449
|
+
"status": "alpha",
|
450
|
+
"a11y_reviewed": false,
|
451
|
+
"short_name": "ActionMenuMenu",
|
452
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/menu.rb",
|
453
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/menu/default/",
|
454
|
+
"parameters": [
|
455
|
+
{
|
456
|
+
"name": "anchor_align",
|
457
|
+
"type": "Symbol",
|
458
|
+
"default": "N/A",
|
459
|
+
"description": "One of `:center`, `:end`, or `:start`."
|
460
|
+
},
|
461
|
+
{
|
462
|
+
"name": "anchor_side",
|
463
|
+
"type": "Symbol",
|
464
|
+
"default": "N/A",
|
465
|
+
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
|
466
|
+
},
|
467
|
+
{
|
468
|
+
"name": "menu_id",
|
469
|
+
"type": "String",
|
470
|
+
"default": "`self.class.generate_id`",
|
471
|
+
"description": "Id of the menu."
|
472
|
+
},
|
473
|
+
{
|
474
|
+
"name": "size",
|
475
|
+
"type": "Symbol",
|
476
|
+
"default": "`:auto`",
|
477
|
+
"description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`."
|
478
|
+
},
|
479
|
+
{
|
480
|
+
"name": "src",
|
481
|
+
"type": "String",
|
482
|
+
"default": "`nil`",
|
483
|
+
"description": "Used with an `include-fragment` element to load menu content from the given source URL."
|
484
|
+
},
|
485
|
+
{
|
486
|
+
"name": "preload",
|
487
|
+
"type": "Boolean",
|
488
|
+
"default": "`false`",
|
489
|
+
"description": "When true, and src is present, loads the `include-fragment` on trigger hover."
|
490
|
+
},
|
491
|
+
{
|
492
|
+
"name": "select_variant",
|
493
|
+
"type": "Symbol",
|
494
|
+
"default": "`:none`",
|
495
|
+
"description": "One of `:multiple`, `:none`, or `:single`."
|
496
|
+
},
|
497
|
+
{
|
498
|
+
"name": "form_arguments",
|
499
|
+
"type": "Hash",
|
500
|
+
"default": "`{}`",
|
501
|
+
"description": "Allows an `ActionMenu` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission."
|
502
|
+
},
|
503
|
+
{
|
504
|
+
"name": "overlay_arguments",
|
505
|
+
"type": "Hash",
|
506
|
+
"default": "`{}`",
|
507
|
+
"description": "Arguments to pass to the underlying [Overlay](/components/alpha/overlay)"
|
508
|
+
},
|
509
|
+
{
|
510
|
+
"name": "list_arguments",
|
511
|
+
"type": "Hash",
|
512
|
+
"default": "`{}`",
|
513
|
+
"description": "Arguments to pass to the underlying [ActionMenu::List](/components/alpha/actionmenulist)"
|
514
|
+
},
|
515
|
+
{
|
516
|
+
"name": "system_arguments",
|
517
|
+
"type": "Hash",
|
518
|
+
"default": "N/A",
|
519
|
+
"description": "[System arguments](/system-arguments)."
|
520
|
+
}
|
521
|
+
]
|
522
|
+
},
|
523
|
+
{
|
524
|
+
"component": "ActionMenu::PrimaryMenu",
|
525
|
+
"status": "alpha",
|
526
|
+
"a11y_reviewed": false,
|
527
|
+
"short_name": "ActionMenuPrimaryMenu",
|
528
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/primary_menu.rb",
|
529
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/primary_menu/default/",
|
530
|
+
"parameters": [
|
531
|
+
{
|
532
|
+
"name": "anchor_align",
|
533
|
+
"type": "Symbol",
|
534
|
+
"default": "`:start`",
|
535
|
+
"description": "One of `:center`, `:end`, or `:start`."
|
536
|
+
},
|
537
|
+
{
|
538
|
+
"name": "anchor_side",
|
539
|
+
"type": "Symbol",
|
540
|
+
"default": "`:outside_bottom`",
|
541
|
+
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
|
542
|
+
},
|
543
|
+
{
|
544
|
+
"name": "dynamic_label",
|
545
|
+
"type": "Boolean",
|
546
|
+
"default": "`false`",
|
547
|
+
"description": "Whether or not to display the text of the currently selected item in the show button."
|
548
|
+
},
|
549
|
+
{
|
550
|
+
"name": "dynamic_label_prefix",
|
551
|
+
"type": "String",
|
552
|
+
"default": "`nil`",
|
553
|
+
"description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
|
554
|
+
},
|
555
|
+
{
|
556
|
+
"name": "system_arguments",
|
557
|
+
"type": "Hash",
|
558
|
+
"default": "N/A",
|
559
|
+
"description": "[System arguments](/system-arguments)."
|
560
|
+
}
|
561
|
+
]
|
562
|
+
},
|
563
|
+
{
|
564
|
+
"component": "ActionMenu::SubMenu",
|
565
|
+
"status": "alpha",
|
566
|
+
"a11y_reviewed": false,
|
567
|
+
"short_name": "ActionMenuSubMenu",
|
568
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/sub_menu.rb",
|
569
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/sub_menu/default/",
|
570
|
+
"parameters": [
|
571
|
+
{
|
572
|
+
"name": "menu_id",
|
573
|
+
"type": "String",
|
574
|
+
"default": "`self.class.generate_id`",
|
575
|
+
"description": "Id of the menu."
|
576
|
+
},
|
577
|
+
{
|
578
|
+
"name": "anchor_align",
|
579
|
+
"type": "Symbol",
|
580
|
+
"default": "`:start`",
|
581
|
+
"description": "One of `:center`, `:end`, or `:start`."
|
582
|
+
},
|
583
|
+
{
|
584
|
+
"name": "anchor_side",
|
585
|
+
"type": "Symbol",
|
586
|
+
"default": "`:outside_right`",
|
587
|
+
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`."
|
588
|
+
},
|
589
|
+
{
|
590
|
+
"name": "overlay_arguments",
|
591
|
+
"type": "Hash",
|
592
|
+
"default": "`{}`",
|
593
|
+
"description": "Arguments to pass to the underlying [Overlay](/components/alpha/overlay)"
|
594
|
+
},
|
595
|
+
{
|
596
|
+
"name": "system_arguments",
|
597
|
+
"type": "Hash",
|
598
|
+
"default": "N/A",
|
599
|
+
"description": "[System arguments](/system-arguments)."
|
600
|
+
}
|
601
|
+
]
|
602
|
+
},
|
603
|
+
{
|
604
|
+
"component": "ActionMenu::SubMenuItem",
|
605
|
+
"status": "alpha",
|
606
|
+
"a11y_reviewed": false,
|
607
|
+
"short_name": "ActionMenuSubMenuItem",
|
608
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_menu/sub_menu_item.rb",
|
609
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_menu/sub_menu_item/default/",
|
610
|
+
"parameters": []
|
611
|
+
},
|
513
612
|
{
|
514
613
|
"component": "AutoComplete",
|
515
614
|
"status": "deprecated",
|
@@ -1149,6 +1248,52 @@
|
|
1149
1248
|
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/dropdown/menu/item/default/",
|
1150
1249
|
"parameters": []
|
1151
1250
|
},
|
1251
|
+
{
|
1252
|
+
"component": "FileTreeView",
|
1253
|
+
"status": "alpha",
|
1254
|
+
"a11y_reviewed": false,
|
1255
|
+
"short_name": "FileTreeView",
|
1256
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/file_tree_view.rb",
|
1257
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/file_tree_view/default/",
|
1258
|
+
"parameters": [
|
1259
|
+
{
|
1260
|
+
"name": "node_variant",
|
1261
|
+
"type": "Symbol",
|
1262
|
+
"default": "`:div`",
|
1263
|
+
"description": "The variant to use for this node. One of `:anchor`, `:button`, or `:div`."
|
1264
|
+
},
|
1265
|
+
{
|
1266
|
+
"name": "form_arguments",
|
1267
|
+
"type": "Hash",
|
1268
|
+
"default": "`{}`",
|
1269
|
+
"description": "These arguments allow the selections made within a `TreeView` to be submitted to the server as part of a Rails form. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission."
|
1270
|
+
},
|
1271
|
+
{
|
1272
|
+
"name": "system_arguments",
|
1273
|
+
"type": "Hash",
|
1274
|
+
"default": "N/A",
|
1275
|
+
"description": "[System arguments](/system-arguments)."
|
1276
|
+
}
|
1277
|
+
]
|
1278
|
+
},
|
1279
|
+
{
|
1280
|
+
"component": "FileTreeView::DirectoryNode",
|
1281
|
+
"status": "alpha",
|
1282
|
+
"a11y_reviewed": false,
|
1283
|
+
"short_name": "FileTreeViewDirectoryNode",
|
1284
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/file_tree_view/directory_node.rb",
|
1285
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/file_tree_view/directory_node/default/",
|
1286
|
+
"parameters": []
|
1287
|
+
},
|
1288
|
+
{
|
1289
|
+
"component": "FileTreeView::FileNode",
|
1290
|
+
"status": "alpha",
|
1291
|
+
"a11y_reviewed": false,
|
1292
|
+
"short_name": "FileTreeViewFileNode",
|
1293
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/file_tree_view/file_node.rb",
|
1294
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/file_tree_view/file_node/default/",
|
1295
|
+
"parameters": []
|
1296
|
+
},
|
1152
1297
|
{
|
1153
1298
|
"component": "FormButton",
|
1154
1299
|
"status": "alpha",
|
@@ -2531,29 +2676,57 @@
|
|
2531
2676
|
]
|
2532
2677
|
},
|
2533
2678
|
{
|
2534
|
-
"component": "
|
2679
|
+
"component": "SkeletonBox",
|
2535
2680
|
"status": "alpha",
|
2536
2681
|
"a11y_reviewed": false,
|
2537
|
-
"short_name": "
|
2538
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/
|
2539
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/
|
2682
|
+
"short_name": "SkeletonBox",
|
2683
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/skeleton_box.rb",
|
2684
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/skeleton_box/default/",
|
2540
2685
|
"parameters": [
|
2541
2686
|
{
|
2542
|
-
"name": "
|
2543
|
-
"type": "
|
2544
|
-
"default": "
|
2545
|
-
"description": "
|
2687
|
+
"name": "height",
|
2688
|
+
"type": "String",
|
2689
|
+
"default": "`nil`",
|
2690
|
+
"description": "Any valid CSS height."
|
2546
2691
|
},
|
2547
2692
|
{
|
2548
|
-
"name": "
|
2549
|
-
"type": "
|
2550
|
-
"default": "`
|
2551
|
-
"description": "
|
2693
|
+
"name": "width",
|
2694
|
+
"type": "String",
|
2695
|
+
"default": "`nil`",
|
2696
|
+
"description": "Any valid CSS width."
|
2552
2697
|
},
|
2553
2698
|
{
|
2554
|
-
"name": "
|
2555
|
-
"type": "
|
2556
|
-
"default": "
|
2699
|
+
"name": "system_arguments",
|
2700
|
+
"type": "Hash",
|
2701
|
+
"default": "N/A",
|
2702
|
+
"description": "[System arguments](/system-arguments)"
|
2703
|
+
}
|
2704
|
+
]
|
2705
|
+
},
|
2706
|
+
{
|
2707
|
+
"component": "Stack",
|
2708
|
+
"status": "alpha",
|
2709
|
+
"a11y_reviewed": false,
|
2710
|
+
"short_name": "Stack",
|
2711
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/stack.rb",
|
2712
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/stack/default/",
|
2713
|
+
"parameters": [
|
2714
|
+
{
|
2715
|
+
"name": "tag",
|
2716
|
+
"type": "Symbol",
|
2717
|
+
"default": "`:div`",
|
2718
|
+
"description": "Customize the element type of the rendered container."
|
2719
|
+
},
|
2720
|
+
{
|
2721
|
+
"name": "gap",
|
2722
|
+
"type": "Symbol",
|
2723
|
+
"default": "`GapArg::DEFAULT`",
|
2724
|
+
"description": "Specify the gap between children elements in the stack. One of `nil`, `:condensed`, `:normal`, or `:spacious`."
|
2725
|
+
},
|
2726
|
+
{
|
2727
|
+
"name": "direction",
|
2728
|
+
"type": "Symbol",
|
2729
|
+
"default": "`:vertical`",
|
2557
2730
|
"description": "Specify the direction for the stack container. One of `nil`, `:horizontal`, or `:vertical`."
|
2558
2731
|
},
|
2559
2732
|
{
|
@@ -3170,6 +3343,382 @@
|
|
3170
3343
|
}
|
3171
3344
|
]
|
3172
3345
|
},
|
3346
|
+
{
|
3347
|
+
"component": "TreeView",
|
3348
|
+
"status": "alpha",
|
3349
|
+
"a11y_reviewed": false,
|
3350
|
+
"short_name": "TreeView",
|
3351
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view.rb",
|
3352
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/default/",
|
3353
|
+
"parameters": [
|
3354
|
+
{
|
3355
|
+
"name": "node_variant",
|
3356
|
+
"type": "Symbol",
|
3357
|
+
"default": "`:div`",
|
3358
|
+
"description": "The variant to use for this node. One of `:anchor`, `:button`, or `:div`."
|
3359
|
+
},
|
3360
|
+
{
|
3361
|
+
"name": "form_arguments",
|
3362
|
+
"type": "Hash",
|
3363
|
+
"default": "`{}`",
|
3364
|
+
"description": "These arguments allow the selections made within a `TreeView` to be submitted to the server as part of a Rails form. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission."
|
3365
|
+
},
|
3366
|
+
{
|
3367
|
+
"name": "system_arguments",
|
3368
|
+
"type": "Hash",
|
3369
|
+
"default": "N/A",
|
3370
|
+
"description": "[System arguments](/system-arguments)."
|
3371
|
+
}
|
3372
|
+
]
|
3373
|
+
},
|
3374
|
+
{
|
3375
|
+
"component": "TreeView::Icon",
|
3376
|
+
"status": "alpha",
|
3377
|
+
"a11y_reviewed": false,
|
3378
|
+
"short_name": "TreeViewIcon",
|
3379
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view/icon.rb",
|
3380
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/icon/default/",
|
3381
|
+
"parameters": [
|
3382
|
+
{
|
3383
|
+
"name": "system_arguments",
|
3384
|
+
"type": "Hash",
|
3385
|
+
"default": "N/A",
|
3386
|
+
"description": "The arguments accepted by [Octicon](/components/beta/octicon)."
|
3387
|
+
}
|
3388
|
+
]
|
3389
|
+
},
|
3390
|
+
{
|
3391
|
+
"component": "TreeView::IconPair",
|
3392
|
+
"status": "alpha",
|
3393
|
+
"a11y_reviewed": false,
|
3394
|
+
"short_name": "TreeViewIconPair",
|
3395
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view/icon_pair.rb",
|
3396
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/icon_pair/default/",
|
3397
|
+
"parameters": [
|
3398
|
+
{
|
3399
|
+
"name": "expanded",
|
3400
|
+
"type": "Boolean",
|
3401
|
+
"default": "`false`",
|
3402
|
+
"description": "If true, the expanded icon is shown and the collapsed icon is hidden, etc."
|
3403
|
+
},
|
3404
|
+
{
|
3405
|
+
"name": "system_arguments",
|
3406
|
+
"type": "Hash",
|
3407
|
+
"default": "N/A",
|
3408
|
+
"description": "[System arguments](/system-arguments)"
|
3409
|
+
}
|
3410
|
+
]
|
3411
|
+
},
|
3412
|
+
{
|
3413
|
+
"component": "TreeView::LeadingAction",
|
3414
|
+
"status": "alpha",
|
3415
|
+
"a11y_reviewed": false,
|
3416
|
+
"short_name": "TreeViewLeadingAction",
|
3417
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view/leading_action.rb",
|
3418
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/leading_action/default/",
|
3419
|
+
"parameters": [
|
3420
|
+
{
|
3421
|
+
"name": "action",
|
3422
|
+
"type": "ViewComponent::Base",
|
3423
|
+
"default": "N/A",
|
3424
|
+
"description": "A component or other renderable to use as the action button etc."
|
3425
|
+
}
|
3426
|
+
]
|
3427
|
+
},
|
3428
|
+
{
|
3429
|
+
"component": "TreeView::LeafNode",
|
3430
|
+
"status": "alpha",
|
3431
|
+
"a11y_reviewed": false,
|
3432
|
+
"short_name": "TreeViewLeafNode",
|
3433
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view/leaf_node.rb",
|
3434
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/leaf_node/default/",
|
3435
|
+
"parameters": [
|
3436
|
+
{
|
3437
|
+
"name": "label",
|
3438
|
+
"type": "String",
|
3439
|
+
"default": "N/A",
|
3440
|
+
"description": "The node's label, i.e. it's textual content."
|
3441
|
+
},
|
3442
|
+
{
|
3443
|
+
"name": "system_arguments",
|
3444
|
+
"type": "Hash",
|
3445
|
+
"default": "N/A",
|
3446
|
+
"description": "The arguments accepted by [TreeView::Node](/components/alpha/treeviewnode)."
|
3447
|
+
}
|
3448
|
+
]
|
3449
|
+
},
|
3450
|
+
{
|
3451
|
+
"component": "TreeView::LoadingFailureMessage",
|
3452
|
+
"status": "alpha",
|
3453
|
+
"a11y_reviewed": false,
|
3454
|
+
"short_name": "TreeViewLoadingFailureMessage",
|
3455
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view/loading_failure_message.rb",
|
3456
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/loading_failure_message/default/",
|
3457
|
+
"parameters": [
|
3458
|
+
{
|
3459
|
+
"name": "text",
|
3460
|
+
"type": "String",
|
3461
|
+
"default": "`Something went wrong`",
|
3462
|
+
"description": "The failure message to display."
|
3463
|
+
},
|
3464
|
+
{
|
3465
|
+
"name": "retry_button_label",
|
3466
|
+
"type": "String",
|
3467
|
+
"default": "`Retry`",
|
3468
|
+
"description": "The text shown on the retry button."
|
3469
|
+
},
|
3470
|
+
{
|
3471
|
+
"name": "system_arguments",
|
3472
|
+
"type": "Hash",
|
3473
|
+
"default": "N/A",
|
3474
|
+
"description": "[System arguments](/system-arguments)"
|
3475
|
+
}
|
3476
|
+
]
|
3477
|
+
},
|
3478
|
+
{
|
3479
|
+
"component": "TreeView::Node",
|
3480
|
+
"status": "alpha",
|
3481
|
+
"a11y_reviewed": false,
|
3482
|
+
"short_name": "TreeViewNode",
|
3483
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view/node.rb",
|
3484
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/node/default/",
|
3485
|
+
"parameters": [
|
3486
|
+
{
|
3487
|
+
"name": "path",
|
3488
|
+
"type": "Array<String>",
|
3489
|
+
"default": "N/A",
|
3490
|
+
"description": "The node's \"path,\" i.e. this node's label and the labels of all its ancestors. This node should be reachable by traversing the tree following this path."
|
3491
|
+
},
|
3492
|
+
{
|
3493
|
+
"name": "node_variant",
|
3494
|
+
"type": "Symbol",
|
3495
|
+
"default": "N/A",
|
3496
|
+
"description": "The node variant to use for the node's content, i.e. the `:button` or `:div`. One of `:anchor`, `:button`, or `:div`."
|
3497
|
+
},
|
3498
|
+
{
|
3499
|
+
"name": "href",
|
3500
|
+
"type": "String",
|
3501
|
+
"default": "`nil`",
|
3502
|
+
"description": "The URL to use as the `href` attribute for this node. If set to a truthy value, the `tag:` parameter is ignored and assumed to be `:a`."
|
3503
|
+
},
|
3504
|
+
{
|
3505
|
+
"name": "current",
|
3506
|
+
"type": "Boolean",
|
3507
|
+
"default": "`false`",
|
3508
|
+
"description": "Whether or not this node is the current node. The current node is styled differently than regular nodes and is the first element that receives focus when tabbing to the `TreeView` component."
|
3509
|
+
},
|
3510
|
+
{
|
3511
|
+
"name": "select_variant",
|
3512
|
+
"type": "Symbol",
|
3513
|
+
"default": "`:none`",
|
3514
|
+
"description": "Controls the type of checkbox that appears. One of `:multiple` or `:none`."
|
3515
|
+
},
|
3516
|
+
{
|
3517
|
+
"name": "checked",
|
3518
|
+
"type": "Boolean | String",
|
3519
|
+
"default": "`false`",
|
3520
|
+
"description": "The checked state of the node's checkbox. One of `false`, `mixed`, or `true`."
|
3521
|
+
},
|
3522
|
+
{
|
3523
|
+
"name": "disabled",
|
3524
|
+
"type": "Boolean",
|
3525
|
+
"default": "`false`",
|
3526
|
+
"description": "Whether or not the node can be activated. Passing `false` here will cause the node to appear visually disabled but it is still keyboard-focusable."
|
3527
|
+
},
|
3528
|
+
{
|
3529
|
+
"name": "value",
|
3530
|
+
"type": "String",
|
3531
|
+
"default": "`nil`",
|
3532
|
+
"description": "If this node is checked, this value will be sent to the server on form submission."
|
3533
|
+
},
|
3534
|
+
{
|
3535
|
+
"name": "content_arguments",
|
3536
|
+
"type": "Hash",
|
3537
|
+
"default": "N/A",
|
3538
|
+
"description": "Arguments attached to the node's content, i.e the `<button>` or `<a>` element. [System arguments](/system-arguments)"
|
3539
|
+
}
|
3540
|
+
]
|
3541
|
+
},
|
3542
|
+
{
|
3543
|
+
"component": "TreeView::SkeletonLoader",
|
3544
|
+
"status": "alpha",
|
3545
|
+
"a11y_reviewed": false,
|
3546
|
+
"short_name": "TreeViewSkeletonLoader",
|
3547
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view/skeleton_loader.rb",
|
3548
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/skeleton_loader/default/",
|
3549
|
+
"parameters": [
|
3550
|
+
{
|
3551
|
+
"name": "src",
|
3552
|
+
"type": "String",
|
3553
|
+
"default": "N/A",
|
3554
|
+
"description": "The URL to fetch nodes from."
|
3555
|
+
},
|
3556
|
+
{
|
3557
|
+
"name": "count",
|
3558
|
+
"type": "Integer",
|
3559
|
+
"default": "`3`",
|
3560
|
+
"description": "The number of skeleton nodes to render."
|
3561
|
+
},
|
3562
|
+
{
|
3563
|
+
"name": "system_arguments",
|
3564
|
+
"type": "Hash",
|
3565
|
+
"default": "N/A",
|
3566
|
+
"description": "The arguments accepted by [TreeView::SubTreeContainer](/components/alpha/treeviewsubtreecontainer)."
|
3567
|
+
}
|
3568
|
+
]
|
3569
|
+
},
|
3570
|
+
{
|
3571
|
+
"component": "TreeView::SpinnerLoader",
|
3572
|
+
"status": "alpha",
|
3573
|
+
"a11y_reviewed": false,
|
3574
|
+
"short_name": "TreeViewSpinnerLoader",
|
3575
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view/spinner_loader.rb",
|
3576
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/spinner_loader/default/",
|
3577
|
+
"parameters": [
|
3578
|
+
{
|
3579
|
+
"name": "src",
|
3580
|
+
"type": "String",
|
3581
|
+
"default": "N/A",
|
3582
|
+
"description": "The URL to fetch nodes from."
|
3583
|
+
},
|
3584
|
+
{
|
3585
|
+
"name": "system_arguments",
|
3586
|
+
"type": "Hash",
|
3587
|
+
"default": "N/A",
|
3588
|
+
"description": "The arguments accepted by [TreeView::SubTreeContainer](/components/alpha/treeviewsubtreecontainer)."
|
3589
|
+
}
|
3590
|
+
]
|
3591
|
+
},
|
3592
|
+
{
|
3593
|
+
"component": "TreeView::SubTree",
|
3594
|
+
"status": "alpha",
|
3595
|
+
"a11y_reviewed": false,
|
3596
|
+
"short_name": "TreeViewSubTree",
|
3597
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view/sub_tree.rb",
|
3598
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/sub_tree/default/",
|
3599
|
+
"parameters": [
|
3600
|
+
{
|
3601
|
+
"name": "node_variant",
|
3602
|
+
"type": "Symbol",
|
3603
|
+
"default": "N/A",
|
3604
|
+
"description": "The variant to use for this node. One of `:anchor`, `:button`, or `:div`."
|
3605
|
+
},
|
3606
|
+
{
|
3607
|
+
"name": "system_arguments",
|
3608
|
+
"type": "Hash",
|
3609
|
+
"default": "N/A",
|
3610
|
+
"description": "The arguments accepted by [TreeView::SubTreeContainer](/components/alpha/treeviewsubtreecontainer)."
|
3611
|
+
}
|
3612
|
+
]
|
3613
|
+
},
|
3614
|
+
{
|
3615
|
+
"component": "TreeView::SubTreeContainer",
|
3616
|
+
"status": "alpha",
|
3617
|
+
"a11y_reviewed": false,
|
3618
|
+
"short_name": "TreeViewSubTreeContainer",
|
3619
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view/sub_tree_container.rb",
|
3620
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/sub_tree_container/default/",
|
3621
|
+
"parameters": [
|
3622
|
+
{
|
3623
|
+
"name": "path",
|
3624
|
+
"type": "Array<String>",
|
3625
|
+
"default": "N/A",
|
3626
|
+
"description": "The path to this node."
|
3627
|
+
},
|
3628
|
+
{
|
3629
|
+
"name": "expanded",
|
3630
|
+
"type": "Boolean",
|
3631
|
+
"default": "`false`",
|
3632
|
+
"description": "Whether or not this sub-tree node renders expanded."
|
3633
|
+
},
|
3634
|
+
{
|
3635
|
+
"name": "system_arguments",
|
3636
|
+
"type": "Hash",
|
3637
|
+
"default": "N/A",
|
3638
|
+
"description": "[System arguments](/system-arguments)"
|
3639
|
+
}
|
3640
|
+
]
|
3641
|
+
},
|
3642
|
+
{
|
3643
|
+
"component": "TreeView::SubTreeNode",
|
3644
|
+
"status": "alpha",
|
3645
|
+
"a11y_reviewed": false,
|
3646
|
+
"short_name": "TreeViewSubTreeNode",
|
3647
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view/sub_tree_node.rb",
|
3648
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/sub_tree_node/default/",
|
3649
|
+
"parameters": [
|
3650
|
+
{
|
3651
|
+
"name": "label",
|
3652
|
+
"type": "String",
|
3653
|
+
"default": "N/A",
|
3654
|
+
"description": "The node's label, i.e. it's textual content."
|
3655
|
+
},
|
3656
|
+
{
|
3657
|
+
"name": "path",
|
3658
|
+
"type": "Array<String>",
|
3659
|
+
"default": "N/A",
|
3660
|
+
"description": "The node's \"path,\" i.e. this node's label and the labels of all its ancestors. This node should be reachable by traversing the tree following this path."
|
3661
|
+
},
|
3662
|
+
{
|
3663
|
+
"name": "node_variant",
|
3664
|
+
"type": "Symbol",
|
3665
|
+
"default": "N/A",
|
3666
|
+
"description": "The variant to use for this node. One of `:anchor`, `:button`, or `:div`."
|
3667
|
+
},
|
3668
|
+
{
|
3669
|
+
"name": "sub_tree_component_klass",
|
3670
|
+
"type": "Class",
|
3671
|
+
"default": "`SubTree`",
|
3672
|
+
"description": "The class to use for the sub-tree instead of the default [TreeView::SubTree](/components/alpha/treeviewsubtree)"
|
3673
|
+
},
|
3674
|
+
{
|
3675
|
+
"name": "expanded",
|
3676
|
+
"type": "Boolean",
|
3677
|
+
"default": "`false`",
|
3678
|
+
"description": "Whether or not this sub-tree should be rendered expanded."
|
3679
|
+
},
|
3680
|
+
{
|
3681
|
+
"name": "select_strategy",
|
3682
|
+
"type": "Symbol",
|
3683
|
+
"default": "`:mixed_descendants`",
|
3684
|
+
"description": "What should happen when this sub-tree node is checked. One of `:descendants`, `:mixed_descendants`, or `:self`."
|
3685
|
+
},
|
3686
|
+
{
|
3687
|
+
"name": "system_arguments",
|
3688
|
+
"type": "Hash",
|
3689
|
+
"default": "N/A",
|
3690
|
+
"description": "The arguments accepted by [TreeView::Node](/components/alpha/treeviewnode)."
|
3691
|
+
}
|
3692
|
+
]
|
3693
|
+
},
|
3694
|
+
{
|
3695
|
+
"component": "TreeView::Visual",
|
3696
|
+
"status": "alpha",
|
3697
|
+
"a11y_reviewed": false,
|
3698
|
+
"short_name": "TreeViewVisual",
|
3699
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tree_view/visual.rb",
|
3700
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tree_view/visual/default/",
|
3701
|
+
"parameters": [
|
3702
|
+
{
|
3703
|
+
"name": "id",
|
3704
|
+
"type": "String",
|
3705
|
+
"default": "N/A",
|
3706
|
+
"description": "This visual's HTML ID."
|
3707
|
+
},
|
3708
|
+
{
|
3709
|
+
"name": "visual",
|
3710
|
+
"type": "ViewComponent::Base",
|
3711
|
+
"default": "N/A",
|
3712
|
+
"description": "A renderable component like an instance of [Octicon](/components/beta/octicon) to render as the visual."
|
3713
|
+
},
|
3714
|
+
{
|
3715
|
+
"name": "label",
|
3716
|
+
"type": "String",
|
3717
|
+
"default": "`nil`",
|
3718
|
+
"description": "Text describing this visual that will be visible only to screen readers."
|
3719
|
+
}
|
3720
|
+
]
|
3721
|
+
},
|
3173
3722
|
{
|
3174
3723
|
"component": "UnderlineNav",
|
3175
3724
|
"status": "alpha",
|