@openproject/primer-view-components 0.72.0-rc.ce1a1c88d → 0.72.0-rc.fc664ecfc
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/package.json +1 -1
- package/static/arguments.json +4 -442
- package/static/constants.json +0 -101
- package/static/info_arch.json +4 -1325
- package/static/previews.json +4 -72
- package/static/statuses.json +0 -17
package/static/info_arch.json
CHANGED
|
@@ -19629,141 +19629,6 @@
|
|
|
19629
19629
|
],
|
|
19630
19630
|
"subcomponents": []
|
|
19631
19631
|
},
|
|
19632
|
-
{
|
|
19633
|
-
"fully_qualified_name": "Primer::OpenProject::FileTreeView",
|
|
19634
|
-
"description": "",
|
|
19635
|
-
"accessibility_docs": null,
|
|
19636
|
-
"is_form_component": false,
|
|
19637
|
-
"is_published": true,
|
|
19638
|
-
"requires_js": false,
|
|
19639
|
-
"component": "OpenProject::FileTreeView",
|
|
19640
|
-
"status": "alpha",
|
|
19641
|
-
"a11y_reviewed": false,
|
|
19642
|
-
"short_name": "OpenProjectFileTreeView",
|
|
19643
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/file_tree_view.rb",
|
|
19644
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/file_tree_view/default/",
|
|
19645
|
-
"parameters": [
|
|
19646
|
-
{
|
|
19647
|
-
"name": "node_variant",
|
|
19648
|
-
"type": "Symbol",
|
|
19649
|
-
"default": "`:div`",
|
|
19650
|
-
"description": "The variant to use for this node. One of `:anchor`, `:button`, or `:div`."
|
|
19651
|
-
},
|
|
19652
|
-
{
|
|
19653
|
-
"name": "system_arguments",
|
|
19654
|
-
"type": "Hash",
|
|
19655
|
-
"default": "N/A",
|
|
19656
|
-
"description": "{{link_to_system_arguments_docs}}."
|
|
19657
|
-
}
|
|
19658
|
-
],
|
|
19659
|
-
"slots": [
|
|
19660
|
-
{
|
|
19661
|
-
"name": "nodes",
|
|
19662
|
-
"description": null,
|
|
19663
|
-
"parameters": []
|
|
19664
|
-
}
|
|
19665
|
-
],
|
|
19666
|
-
"methods": [],
|
|
19667
|
-
"previews": [
|
|
19668
|
-
{
|
|
19669
|
-
"preview_path": "primer/open_project/file_tree_view/default",
|
|
19670
|
-
"name": "default",
|
|
19671
|
-
"snapshot": "interactive",
|
|
19672
|
-
"skip_rules": {
|
|
19673
|
-
"wont_fix": [
|
|
19674
|
-
"region"
|
|
19675
|
-
],
|
|
19676
|
-
"will_fix": [
|
|
19677
|
-
"color-contrast"
|
|
19678
|
-
]
|
|
19679
|
-
}
|
|
19680
|
-
},
|
|
19681
|
-
{
|
|
19682
|
-
"preview_path": "primer/open_project/file_tree_view/playground",
|
|
19683
|
-
"name": "playground",
|
|
19684
|
-
"snapshot": "false",
|
|
19685
|
-
"skip_rules": {
|
|
19686
|
-
"wont_fix": [
|
|
19687
|
-
"region"
|
|
19688
|
-
],
|
|
19689
|
-
"will_fix": [
|
|
19690
|
-
"color-contrast"
|
|
19691
|
-
]
|
|
19692
|
-
}
|
|
19693
|
-
}
|
|
19694
|
-
],
|
|
19695
|
-
"subcomponents": []
|
|
19696
|
-
},
|
|
19697
|
-
{
|
|
19698
|
-
"fully_qualified_name": "Primer::OpenProject::FileTreeView::DirectoryNode",
|
|
19699
|
-
"description": "",
|
|
19700
|
-
"accessibility_docs": null,
|
|
19701
|
-
"is_form_component": false,
|
|
19702
|
-
"is_published": true,
|
|
19703
|
-
"requires_js": false,
|
|
19704
|
-
"component": "OpenProject::FileTreeView::DirectoryNode",
|
|
19705
|
-
"status": "alpha",
|
|
19706
|
-
"a11y_reviewed": false,
|
|
19707
|
-
"short_name": "OpenProjectFileTreeViewDirectoryNode",
|
|
19708
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/file_tree_view/directory_node.rb",
|
|
19709
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/file_tree_view/directory_node/default/",
|
|
19710
|
-
"parameters": [],
|
|
19711
|
-
"slots": [
|
|
19712
|
-
{
|
|
19713
|
-
"name": "leading_visual",
|
|
19714
|
-
"description": null,
|
|
19715
|
-
"parameters": []
|
|
19716
|
-
},
|
|
19717
|
-
{
|
|
19718
|
-
"name": "leading_action",
|
|
19719
|
-
"description": null,
|
|
19720
|
-
"parameters": []
|
|
19721
|
-
},
|
|
19722
|
-
{
|
|
19723
|
-
"name": "trailing_visual",
|
|
19724
|
-
"description": null,
|
|
19725
|
-
"parameters": []
|
|
19726
|
-
}
|
|
19727
|
-
],
|
|
19728
|
-
"methods": [],
|
|
19729
|
-
"previews": [],
|
|
19730
|
-
"subcomponents": []
|
|
19731
|
-
},
|
|
19732
|
-
{
|
|
19733
|
-
"fully_qualified_name": "Primer::OpenProject::FileTreeView::FileNode",
|
|
19734
|
-
"description": "",
|
|
19735
|
-
"accessibility_docs": null,
|
|
19736
|
-
"is_form_component": false,
|
|
19737
|
-
"is_published": true,
|
|
19738
|
-
"requires_js": false,
|
|
19739
|
-
"component": "OpenProject::FileTreeView::FileNode",
|
|
19740
|
-
"status": "alpha",
|
|
19741
|
-
"a11y_reviewed": false,
|
|
19742
|
-
"short_name": "OpenProjectFileTreeViewFileNode",
|
|
19743
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/file_tree_view/file_node.rb",
|
|
19744
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/file_tree_view/file_node/default/",
|
|
19745
|
-
"parameters": [],
|
|
19746
|
-
"slots": [
|
|
19747
|
-
{
|
|
19748
|
-
"name": "leading_visual",
|
|
19749
|
-
"description": null,
|
|
19750
|
-
"parameters": []
|
|
19751
|
-
},
|
|
19752
|
-
{
|
|
19753
|
-
"name": "leading_action",
|
|
19754
|
-
"description": null,
|
|
19755
|
-
"parameters": []
|
|
19756
|
-
},
|
|
19757
|
-
{
|
|
19758
|
-
"name": "trailing_visual",
|
|
19759
|
-
"description": null,
|
|
19760
|
-
"parameters": []
|
|
19761
|
-
}
|
|
19762
|
-
],
|
|
19763
|
-
"methods": [],
|
|
19764
|
-
"previews": [],
|
|
19765
|
-
"subcomponents": []
|
|
19766
|
-
},
|
|
19767
19632
|
{
|
|
19768
19633
|
"fully_qualified_name": "Primer::OpenProject::FilterableTreeView",
|
|
19769
19634
|
"description": "A TreeView and associated filter controls for searching nested hierarchies.\n\n## Filter controls\n\n`FilterableTreeView`s can be filtered using two controls, both present in the toolbar above the tree:\n\n1. A free-form query string from a text input field.\n2. A `SegmentedControl` with two options (by default):\n 1. The \"Selected\" option causes the component to only show checked nodes, provided they also satisfy the other\n filter criteria described here.\n 2. The \"All\" option causes the component to show all nodes, provided they also satisfy the other filter\n criteria described here.\n\n## Custom filter modes\n\nIn addition to the default filter modes of `'all'` and `'selected'` described above, `FilterableTreeView` supports\nadding custom filter modes. Adding a filter mode will cause its label to appear in the `SegmentedControl` in the\ntoolbar, and will be passed as the third argument to the filter function (see below).\n\nHere's how to add a custom filter mode in addition to the default ones:\n\n```erb\n<%= render(Primer::OpenProject::FilterableTreeView.new) do |tree_view| %>\n <%# remove this line to prevent adding the default modes %>\n <% tree_view.with_default_filter_modes %>\n <% tree_view.with_filter_mode(name: \"Custom\", system_arguments)\n<% end %>\n```\n\n## Filter behavior\n\nBy default, matching node text is identified by looking for an exact substring match, operating on a lowercased\nversion of both the query string and the node text. For more information, and to provide a customized filter\nfunction, please see the section titled \"Customizing the filter function\" below.\n\nNodes that match the filter appear as normal; nodes that do not match are presented as follows:\n\n1. Leaf nodes are hidden.\n2. Sub-tree nodes with no matching children are hidden.\n3. Sub-tree nodes with at least one matching child are disabled but still visible.\n\n## Checking behavior\n\nBy default, checking a node in a `FilterableTreeView` checks only that node (i.e. no child nodes are checked).\nTo aide in checking children in deeply nested or highly populated hierarchies, a third control exists in the\ntoolbar: the \"Include sub-items\" check box. If this feature is turned on, checking sub-tree nodes causes all\nchildren, both leaf and sub-tree nodes, to also be checked recursively. Moreover, turning this feature on will\ncause the children of any previously checked nodes to be checked recursively. Unchecking a node while in\n\"Include sub-items\" mode will restore that sub-tree and all its children to their previously checked state, so as\nnot to permanently override a user's selections. Unchecking the \"Include sub-items\" check box has a similar effect,\ni.e. restores all previous user selections under currently checked sub-trees.\n\n## JavaScript API\n\n`FilterableTreeView` does not yet have an extensive JavaScript API, but this may change in the future as the\ncomponent is further developed to fit additional use-cases.\n\n### Customizing the filter function\n\nThe filter function can be customized by setting the value of the `filterFn` property to a function with the\nfollowing signature:\n\n```typescript\nexport type FilterFn = (node: HTMLElement, query: string, filterMode?: string) => Range[] | null\n```\n\nThis function will be called once for each node in the tree every time filter controls change (i.e. when the\nfilter mode or query string are altered). The function is called with the following arguments:\n\n|Argument |Description |\n|:-----------|:----------------------------------------------------------------|\n|`node` |The HTML node element, i.e. the element with `role=treeitem` set.|\n|`query` |The query string. |\n|`filterMode`|The filter mode, either `'all'` or `'selected'`. |\n\nThe component expects the filter function to return specific values depending on the type of match:\n\n1. No match - return `null`\n2. Match but no highlights (eg. when the query string is empty) - return an empty array\n3. Match with highlights - return a non-empty array of `Range` objects\n\nExample:\n\n```javascript\nconst filterableTreeView = document.querySelector('filterable-tree-view')\nfilterableTreeView.filterFn = (node, query, filterMode) => {\n // custom filter implementation here\n}\n```\n\nYou can read about `Range` objects here: https://developer.mozilla.org/en-US/docs/Web/API/Range.\n\nFor a complete example demonstrating how to implement a working filter function complete with range highlighting,\nsee the default filter function available in the `FilterableTreeViewElement` JavaScript class, which is part of\nthe Primer source code.\n\n### Events\n\nCurrently `FilterableTreeView` does not emit any events aside from the events already emitted by the `TreeView`\ncomponent.",
|
|
@@ -19782,13 +19647,13 @@
|
|
|
19782
19647
|
"name": "tree_view_arguments",
|
|
19783
19648
|
"type": "Hash",
|
|
19784
19649
|
"default": "`{}`",
|
|
19785
|
-
"description": "Arguments that will be passed to the underlying {{#link_to_component}}Primer::
|
|
19650
|
+
"description": "Arguments that will be passed to the underlying {{#link_to_component}}Primer::Alpha::TreeView{{/link_to_component}} component."
|
|
19786
19651
|
},
|
|
19787
19652
|
{
|
|
19788
19653
|
"name": "form_arguments",
|
|
19789
19654
|
"type": "Hash",
|
|
19790
19655
|
"default": "`{}`",
|
|
19791
|
-
"description": "Form arguments that will be passed to the underlying {{#link_to_component}}Primer::
|
|
19656
|
+
"description": "Form arguments that will be passed to the underlying {{#link_to_component}}Primer::Alpha::TreeView{{/link_to_component}} component. These arguments allow the selections made within a `FilterableTreeView` 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."
|
|
19792
19657
|
},
|
|
19793
19658
|
{
|
|
19794
19659
|
"name": "filter_input_arguments",
|
|
@@ -19812,7 +19677,7 @@
|
|
|
19812
19677
|
"name": "no_results_node_arguments",
|
|
19813
19678
|
"type": "Hash",
|
|
19814
19679
|
"default": "`DEFAULT_NO_RESULTS_NODE_ARGUMENTS.dup`",
|
|
19815
|
-
"description": "Arguments that will be passed to a {{#link_to_component}}Primer::
|
|
19680
|
+
"description": "Arguments that will be passed to a {{#link_to_component}}Primer::Alpha::TreeView::LeafNode{{/link_to_component}} component that appears when no items match the filter criteria."
|
|
19816
19681
|
}
|
|
19817
19682
|
],
|
|
19818
19683
|
"slots": [],
|
|
@@ -19923,7 +19788,7 @@
|
|
|
19923
19788
|
"name": "system_arguments",
|
|
19924
19789
|
"type": "Hash",
|
|
19925
19790
|
"default": "N/A",
|
|
19926
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::
|
|
19791
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::TreeView::SubTreeContainer{{/link_to_component}}."
|
|
19927
19792
|
}
|
|
19928
19793
|
],
|
|
19929
19794
|
"slots": [
|
|
@@ -20928,71 +20793,6 @@
|
|
|
20928
20793
|
"previews": [],
|
|
20929
20794
|
"subcomponents": []
|
|
20930
20795
|
},
|
|
20931
|
-
{
|
|
20932
|
-
"fully_qualified_name": "Primer::OpenProject::SkeletonBox",
|
|
20933
|
-
"description": "A SkeletonBox provides a placeholder for non-text, non-Avatar elements (e.g., hero images)\nthat are still loading. You can adjust width and height to match the content's dimensions.",
|
|
20934
|
-
"accessibility_docs": null,
|
|
20935
|
-
"is_form_component": false,
|
|
20936
|
-
"is_published": true,
|
|
20937
|
-
"requires_js": false,
|
|
20938
|
-
"component": "OpenProject::SkeletonBox",
|
|
20939
|
-
"status": "alpha",
|
|
20940
|
-
"a11y_reviewed": false,
|
|
20941
|
-
"short_name": "OpenProjectSkeletonBox",
|
|
20942
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/skeleton_box.rb",
|
|
20943
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/skeleton_box/default/",
|
|
20944
|
-
"parameters": [
|
|
20945
|
-
{
|
|
20946
|
-
"name": "height",
|
|
20947
|
-
"type": "String",
|
|
20948
|
-
"default": "`nil`",
|
|
20949
|
-
"description": "Any valid CSS height."
|
|
20950
|
-
},
|
|
20951
|
-
{
|
|
20952
|
-
"name": "width",
|
|
20953
|
-
"type": "String",
|
|
20954
|
-
"default": "`nil`",
|
|
20955
|
-
"description": "Any valid CSS width."
|
|
20956
|
-
},
|
|
20957
|
-
{
|
|
20958
|
-
"name": "system_arguments",
|
|
20959
|
-
"type": "Hash",
|
|
20960
|
-
"default": "N/A",
|
|
20961
|
-
"description": "{{link_to_system_arguments_docs}}"
|
|
20962
|
-
}
|
|
20963
|
-
],
|
|
20964
|
-
"slots": [],
|
|
20965
|
-
"methods": [],
|
|
20966
|
-
"previews": [
|
|
20967
|
-
{
|
|
20968
|
-
"preview_path": "primer/open_project/skeleton_box/default",
|
|
20969
|
-
"name": "default",
|
|
20970
|
-
"snapshot": "false",
|
|
20971
|
-
"skip_rules": {
|
|
20972
|
-
"wont_fix": [
|
|
20973
|
-
"region"
|
|
20974
|
-
],
|
|
20975
|
-
"will_fix": [
|
|
20976
|
-
"color-contrast"
|
|
20977
|
-
]
|
|
20978
|
-
}
|
|
20979
|
-
},
|
|
20980
|
-
{
|
|
20981
|
-
"preview_path": "primer/open_project/skeleton_box/playground",
|
|
20982
|
-
"name": "playground",
|
|
20983
|
-
"snapshot": "false",
|
|
20984
|
-
"skip_rules": {
|
|
20985
|
-
"wont_fix": [
|
|
20986
|
-
"region"
|
|
20987
|
-
],
|
|
20988
|
-
"will_fix": [
|
|
20989
|
-
"color-contrast"
|
|
20990
|
-
]
|
|
20991
|
-
}
|
|
20992
|
-
}
|
|
20993
|
-
],
|
|
20994
|
-
"subcomponents": []
|
|
20995
|
-
},
|
|
20996
20796
|
{
|
|
20997
20797
|
"fully_qualified_name": "Primer::OpenProject::SubHeader",
|
|
20998
20798
|
"description": "The SubHeader contains specific actions to modify the page content below, e.g a filter button or a create button\nIt should not be used stand alone, but in combination with a PageHeader, either as a direct sibling or as part of a tab content",
|
|
@@ -21363,1127 +21163,6 @@
|
|
|
21363
21163
|
"previews": [],
|
|
21364
21164
|
"subcomponents": []
|
|
21365
21165
|
},
|
|
21366
|
-
{
|
|
21367
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView",
|
|
21368
|
-
"description": "TreeView is a hierarchical list of items that may have a parent-child relationship where children\ncan be toggled into view by expanding or collapsing their parent item.\n\n## Terminology\n\nConsider the following tree structure:\n\nsrc\n├ button.rb\n└ action_list\n ├ item.rb\n └ header.rb\n\n1. **Node**. A node is an item in the tree. Nodes can either be \"leaf\" nodes (i.e. have no children), or \"sub-tree\"\nnodes, which do have children. In the example above, button.rb, item.rb, and header.rb are all leaf nodes, while\naction_list is a sub-tree node.\n2. **Path**. A node's path is like its ID. It's an array of strings containing the current node's label and all the\nlabels of its ancestors, in order. In the example above, header.rb's path is [\"src\", \"action_list\", \"header.rb\"].\n\n## Static nodes\n\nThe `TreeView` component allows items to be provided statically or loaded dynamically from the server.\nProviding items statically is done using the `leaf` and `sub_tree` slots:\n\n```erb\n<%= render(Primer::OpenProject::TreeView.new) do |tree| %>\n <% tree.with_sub_tree(label: \"Directory\") do |sub_tree| %>\n <% sub_tree.with_leaf(label: \"File 1\")\n <% end %>\n <% tree.with_leaf(label: \"File 2\") %>\n<% end %>\n```\n\n## Dynamic nodes\n\nTree nodes can also be fetched dynamically from the server and will require creating a Rails controller action\nto respond with the list of nodes. Unlike other Primer components, `TreeView` allows the programmer to specify\nloading behavior on a per-sub-tree basis, i.e. each sub-tree must specify how its nodes are loaded. To load nodes\ndynamically for a given sub-tree, configure it with either a loading spinner or a loading skeleton, and provide\nthe URL to fetch nodes from:\n\n```erb\n<%= render(Primer::OpenProject::TreeView.new) do |tree| %>\n <% tree.with_sub_tree(label: \"Directory\") do |sub_tree| %>\n <% sub_tree.with_loading_spinner(src: primer_view_components.tree_view_items_path) %>\n <% end %>\n<% end %>\n```\n\nDefine a controller action to serve the list of nodes. The `TreeView` component automatically includes the\nsub-tree's path as a GET parameter, encoded as a JSON array.\n\n```ruby\nclass TreeViewItemsController < ApplicationController\n def show\n @path = JSON.parse(params[:path])\n @results = get_tree_items(starting_at: path)\n end\nend\n```\n\nResponses must be HTML fragments, eg. have a content type of `text/html+fragment`. This content type isn't\navailable by default in Rails, so you may have to register it eg. in an initializer:\n\n```ruby\nMime::Type.register(\"text/fragment+html\", :html_fragment)\n```\n\nRender a `Primer::OpenProject::TreeView::SubTree` in the action's template, tree_view_items/show.html_fragment.erb:\n\n```erb\n<%= render(Primer::OpenProject::TreeView::SubTree.new(path: @path, node_variant: :div)) do |tree| %>\n <% tree.with_leaf(...) %>\n <% tree.with_sub_tree(...) do |sub_tree| %>\n ...\n <% end %>\n<% end %>\n```\n\n## Multi-select mode\n\nPassing `select_variant: :multiple` to both sub-tree and leaf nodes will add a check box to the left of the node's\nlabel. These check boxes behave according to the value of a second argument, `select_strategy:`.\n\nThe default select strategy, `:descendants`, will cause all child nodes to be checked when the node is checked.\nThis includes both sub-tree and leaf nodes. When the node is unchecked, all child nodes will also be unchecked.\nUnchecking a child node of a checked parent will cause the parent to enter a mixed or indeterminate state, which\nis represented by a horizontal line icon instead of a check mark. This icon indicates that some children are\nchecked, but not all.\n\nA secondary select strategy, `:self`, is provided to allow disabling the automatic checking of child nodes. When\n`select_strategy: :self` is specified, checking sub-tree nodes does not check child nodes, and sub-tree nodes\ncannot enter a mixed or indeterminate state.\n\nNodes can be checked via the keyboard by pressing the space key.\n\n## Node tags\n\n`TreeView`s support three different node variants, `:anchor`, `:button`, and `:div` (the default), which controls\nwhich HTML tag is used to construct the nodes. The `:anchor` and `:button` variants correspond to `<a>` and\n`<button>` tags respectively, which are browser-native elements. Anchors and buttons can be activated (i.e.\n\"clicked\") using the mouse or keyboard via the enter or space keys. The node variant must be the same for all\nnodes in the tree, and is therefore specified at the root level, eg. `TreeView.new(node_variant: :anchor)`.\n\nTrees with node variants other than `:div` cannot have check boxes, i.e. cannot be put into multi-select mode.\n\nTrees with node variants other than `:div` do not emit the `treeViewNodeActivated` or `treeViewBeforeNodeActivated`\nevents, since it is assumed any behavior associated with these variants is user- or browser-defined.\n\n## Interaction behavior matrix\n\n|Interaction |Select variant|Tag |Result |\n|:---------------|:-------------|:------------|:--------------------------|\n|Enter/space |none |div |Expands/collapses |\n|Enter/space |none |anchor/button|Activates anchor/button |\n|Enter/space |multiple |div |Checks or unchecks |\n|Enter/space |multiple |anchor/button|N/A (not allowed) |\n|Left/right arrow|none |div |Expands/collapses |\n|Left/right arrow|none |anchor/button|Expands/collapses |\n|Left/right arrow|multiple |div |Expands/collapses |\n|Left/right arrow|multiple |anchor/button|N/A (not allowed) |\n|Click |none |div |Expands/collapses |\n|Click |multiple |div |Checks or unchecks |\n|Click |multiple |anchor/button|N/A (not allowed) |\n\n## JavaScript API\n\n`TreeView`s render a `<tree-view>` custom element that exposes behavior to the client.\n\n|Name |Notes |\n|:-----------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|\n|`getNodePath(node: Element): string[]` |Returns the path to the given node. |\n|`getNodeType(node: Element): TreeViewNodeType | null` |Returns either `\"leaf\"` or `\"sub-tree\"`. |\n|`markCurrentAtPath(path: string[])` |Marks the node as the \"current\" node, which appears visually distinct from other nodes. |\n|`get currentNode(): HTMLLIElement | null` |Returns the current node. |\n|`expandAtPath(path: string[])` |Expands the sub-tree at `path`. |\n|`collapseAtPath(path: string[])` |Collapses the sub-tree at `path`. |\n|`toggleAtPath(path: string[])` |If the sub-tree at `path` is collapsed, this function expands it, and vice-versa. |\n|`checkAtPath(path: string[])` |If the node at `path` has a checkbox, this function checks it. |\n|`uncheckAtPath(path: string[])` |If the node at `path` has a checkbox, this function unchecks it. |\n|`toggleCheckedAtPath(path: string[])` |If the sub-tree at `path` is checked, this function unchecks it, and vice-versa. |\n|`checkedValueAtPath(path: string[]): TreeViewCheckedValue` |Returns `\"true\"` (all child nodes are checked), `\"false\"` (no child nodes are checked), or `\"mixed\"` (some child nodes are checked, some are not).|\n|`nodeAtPath(path: string[], selector?: string): Element | null` |Returns the node for the given `path`, either a leaf node or sub-tree node. |\n|`subTreeAtPath(path: string[]): TreeViewSubTreeNodeElement | null`|Returns the sub-tree at the given `path`, if it exists. |\n|`leafAtPath(path: string[]): HTMLLIElement | null` |Returns the leaf node at the given `path`, if it exists. |\n|`getNodeCheckedValue(node: Element): TreeViewCheckedValue` |The same as `checkedValueAtPath`, but accepts a node instead of a path. |\n\n### Events\n\nThe events enumerated below include node information by way of the `TreeViewNodeInfo` object, which has the\nfollowing signature:\n\n```typescript\ntype TreeViewNodeType = 'leaf' | 'sub-tree'\ntype TreeViewCheckedValue = 'true' | 'false' | 'mixed'\n\ntype TreeViewNodeInfo = {\n node: Element\n type: TreeViewNodeType\n path: string[]\n checkedValue: TreeViewCheckedValue\n previousCheckedValue: TreeViewCheckedValue\n}\n```\n\n|Name |Type |Bubbles |Cancelable |\n|:----------------------------|:------------------------------------------|:-------|:----------|\n|`treeViewNodeActivated` |`CustomEvent<TreeViewNodeInfo>` |Yes |No |\n|`treeViewBeforeNodeActivated`|`CustomEvent<TreeViewNodeInfo>` |Yes |Yes |\n|`treeViewNodeExpanded` |`CustomEvent<TreeViewNodeInfo>>` |Yes |No |\n|`treeViewNodeCollapsed` |`CustomEvent<TreeViewNodeInfo>>` |Yes |No |\n|`treeViewNodeChecked` |`CustomEvent<TreeViewNodeInfo[]>` |Yes |Yes |\n|`treeViewBeforeNodeChecked` |`CustomEvent<TreeViewNodeInfo[]>` |Yes |No |\n\n_Item activation_\n\nThe `<tree-view>` element fires an `treeViewNodeActivated` event whenever a node is activated (eg. clicked)\nvia the mouse or keyboard.\n\nThe `treeViewBeforeNodeActivated` event fires before a node is activated. Canceling this event will prevent the\nnode from being activated.\n\n```typescript\ndocument.querySelector(\"select-panel\").addEventListener(\n \"treeViewBeforeNodeActivated\",\n (event: CustomEvent<TreeViewNodeInfo>) => {\n event.preventDefault() // Cancel the event to prevent activation (eg. expanding/collapsing)\n }\n)\n```\n\n_Item checking/unchecking_\n\nThe `tree-view` element fires a `treeViewNodeChecked` event whenever a node is checked or unchecked.\n\nThe `treeViewBeforeNodeChecked` event fires before a node is checked or unchecked. Canceling this event will\nprevent the check/uncheck operation.\n\n```typescript\ndocument.querySelector(\"select-panel\").addEventListener(\n \"treeViewBeforeNodeChecked\",\n (event: CustomEvent<TreeViewNodeInfo[]>) => {\n event.preventDefault() // Cancel the event to prevent activation (eg. expanding/collapsing)\n }\n)\n```\n\nBecause checking or unchecking a sub-tree results in the checking or unchecking of all its children recursively,\nboth the `treeViewNodeChecked` and `treeViewBeforeNodeChecked` events provide an array of `TreeViewNodeInfo`\nobjects, which contain entries for every modified node in the tree.",
|
|
21369
|
-
"accessibility_docs": null,
|
|
21370
|
-
"is_form_component": false,
|
|
21371
|
-
"is_published": true,
|
|
21372
|
-
"requires_js": false,
|
|
21373
|
-
"component": "OpenProject::TreeView",
|
|
21374
|
-
"status": "alpha",
|
|
21375
|
-
"a11y_reviewed": false,
|
|
21376
|
-
"short_name": "OpenProjectTreeView",
|
|
21377
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view.rb",
|
|
21378
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/default/",
|
|
21379
|
-
"parameters": [
|
|
21380
|
-
{
|
|
21381
|
-
"name": "node_variant",
|
|
21382
|
-
"type": "Symbol",
|
|
21383
|
-
"default": "`:div`",
|
|
21384
|
-
"description": "The variant to use for this node. One of `:anchor`, `:button`, or `:div`."
|
|
21385
|
-
},
|
|
21386
|
-
{
|
|
21387
|
-
"name": "system_arguments",
|
|
21388
|
-
"type": "Hash",
|
|
21389
|
-
"default": "N/A",
|
|
21390
|
-
"description": "{{link_to_system_arguments_docs}}."
|
|
21391
|
-
}
|
|
21392
|
-
],
|
|
21393
|
-
"slots": [
|
|
21394
|
-
{
|
|
21395
|
-
"name": "nodes",
|
|
21396
|
-
"description": null,
|
|
21397
|
-
"parameters": []
|
|
21398
|
-
}
|
|
21399
|
-
],
|
|
21400
|
-
"methods": [
|
|
21401
|
-
{
|
|
21402
|
-
"name": "with_leaf",
|
|
21403
|
-
"description": "Adds an leaf node to the tree. Leaf nodes are nodes that do not have children.",
|
|
21404
|
-
"parameters": [
|
|
21405
|
-
{
|
|
21406
|
-
"name": "component_klass",
|
|
21407
|
-
"type": "Class",
|
|
21408
|
-
"default": "N/A",
|
|
21409
|
-
"description": "The class to use instead of the default {{#link_to_component}}Primer::OpenProject::TreeView::LeafNode{{/link_to_component}}"
|
|
21410
|
-
},
|
|
21411
|
-
{
|
|
21412
|
-
"name": "system_arguments",
|
|
21413
|
-
"type": "Hash",
|
|
21414
|
-
"default": "N/A",
|
|
21415
|
-
"description": "These arguments are forwarded to {{#link_to_component}}Primer::OpenProject::TreeView::LeafNode{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
|
21416
|
-
}
|
|
21417
|
-
],
|
|
21418
|
-
"return_types": []
|
|
21419
|
-
},
|
|
21420
|
-
{
|
|
21421
|
-
"name": "with_sub_tree",
|
|
21422
|
-
"description": "Adds a sub-tree node to the tree. Sub-trees are nodes that have children, which can be both leaf nodes and other sub-trees.",
|
|
21423
|
-
"parameters": [
|
|
21424
|
-
{
|
|
21425
|
-
"name": "component_klass",
|
|
21426
|
-
"type": "Class",
|
|
21427
|
-
"default": "N/A",
|
|
21428
|
-
"description": "The class to use instead of the default {{#link_to_component}}Primer::OpenProject::TreeView::SubTreeNode{{/link_to_component}}"
|
|
21429
|
-
},
|
|
21430
|
-
{
|
|
21431
|
-
"name": "system_arguments",
|
|
21432
|
-
"type": "Hash",
|
|
21433
|
-
"default": "N/A",
|
|
21434
|
-
"description": "These arguments are forwarded to {{#link_to_component}}Primer::OpenProject::TreeView::SubTreeNode{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
|
21435
|
-
}
|
|
21436
|
-
],
|
|
21437
|
-
"return_types": []
|
|
21438
|
-
},
|
|
21439
|
-
{
|
|
21440
|
-
"name": "node_variant",
|
|
21441
|
-
"description": "Returns the value of attribute node_variant.",
|
|
21442
|
-
"parameters": [],
|
|
21443
|
-
"return_types": []
|
|
21444
|
-
}
|
|
21445
|
-
],
|
|
21446
|
-
"previews": [
|
|
21447
|
-
{
|
|
21448
|
-
"preview_path": "primer/open_project/tree_view/default",
|
|
21449
|
-
"name": "default",
|
|
21450
|
-
"snapshot": "interactive",
|
|
21451
|
-
"skip_rules": {
|
|
21452
|
-
"wont_fix": [
|
|
21453
|
-
"region"
|
|
21454
|
-
],
|
|
21455
|
-
"will_fix": [
|
|
21456
|
-
"color-contrast"
|
|
21457
|
-
]
|
|
21458
|
-
}
|
|
21459
|
-
},
|
|
21460
|
-
{
|
|
21461
|
-
"preview_path": "primer/open_project/tree_view/playground",
|
|
21462
|
-
"name": "playground",
|
|
21463
|
-
"snapshot": "false",
|
|
21464
|
-
"skip_rules": {
|
|
21465
|
-
"wont_fix": [
|
|
21466
|
-
"region"
|
|
21467
|
-
],
|
|
21468
|
-
"will_fix": [
|
|
21469
|
-
"color-contrast"
|
|
21470
|
-
]
|
|
21471
|
-
}
|
|
21472
|
-
},
|
|
21473
|
-
{
|
|
21474
|
-
"preview_path": "primer/open_project/tree_view/empty",
|
|
21475
|
-
"name": "empty",
|
|
21476
|
-
"snapshot": "interactive",
|
|
21477
|
-
"skip_rules": {
|
|
21478
|
-
"wont_fix": [
|
|
21479
|
-
"region"
|
|
21480
|
-
],
|
|
21481
|
-
"will_fix": [
|
|
21482
|
-
"color-contrast"
|
|
21483
|
-
]
|
|
21484
|
-
}
|
|
21485
|
-
},
|
|
21486
|
-
{
|
|
21487
|
-
"preview_path": "primer/open_project/tree_view/loading_failure",
|
|
21488
|
-
"name": "loading_failure",
|
|
21489
|
-
"snapshot": "interactive",
|
|
21490
|
-
"skip_rules": {
|
|
21491
|
-
"wont_fix": [
|
|
21492
|
-
"region"
|
|
21493
|
-
],
|
|
21494
|
-
"will_fix": [
|
|
21495
|
-
"color-contrast"
|
|
21496
|
-
]
|
|
21497
|
-
}
|
|
21498
|
-
},
|
|
21499
|
-
{
|
|
21500
|
-
"preview_path": "primer/open_project/tree_view/loading_spinner",
|
|
21501
|
-
"name": "loading_spinner",
|
|
21502
|
-
"snapshot": "interactive",
|
|
21503
|
-
"skip_rules": {
|
|
21504
|
-
"wont_fix": [
|
|
21505
|
-
"region"
|
|
21506
|
-
],
|
|
21507
|
-
"will_fix": [
|
|
21508
|
-
"color-contrast"
|
|
21509
|
-
]
|
|
21510
|
-
}
|
|
21511
|
-
},
|
|
21512
|
-
{
|
|
21513
|
-
"preview_path": "primer/open_project/tree_view/loading_skeleton",
|
|
21514
|
-
"name": "loading_skeleton",
|
|
21515
|
-
"snapshot": "interactive",
|
|
21516
|
-
"skip_rules": {
|
|
21517
|
-
"wont_fix": [
|
|
21518
|
-
"region"
|
|
21519
|
-
],
|
|
21520
|
-
"will_fix": [
|
|
21521
|
-
"color-contrast"
|
|
21522
|
-
]
|
|
21523
|
-
}
|
|
21524
|
-
},
|
|
21525
|
-
{
|
|
21526
|
-
"preview_path": "primer/open_project/tree_view/async_alpha",
|
|
21527
|
-
"name": "async_alpha",
|
|
21528
|
-
"snapshot": "false",
|
|
21529
|
-
"skip_rules": {
|
|
21530
|
-
"wont_fix": [
|
|
21531
|
-
"region"
|
|
21532
|
-
],
|
|
21533
|
-
"will_fix": [
|
|
21534
|
-
"color-contrast"
|
|
21535
|
-
]
|
|
21536
|
-
}
|
|
21537
|
-
},
|
|
21538
|
-
{
|
|
21539
|
-
"preview_path": "primer/open_project/tree_view/leaf_node_playground",
|
|
21540
|
-
"name": "leaf_node_playground",
|
|
21541
|
-
"snapshot": "false",
|
|
21542
|
-
"skip_rules": {
|
|
21543
|
-
"wont_fix": [
|
|
21544
|
-
"region"
|
|
21545
|
-
],
|
|
21546
|
-
"will_fix": [
|
|
21547
|
-
"color-contrast"
|
|
21548
|
-
]
|
|
21549
|
-
}
|
|
21550
|
-
},
|
|
21551
|
-
{
|
|
21552
|
-
"preview_path": "primer/open_project/tree_view/links",
|
|
21553
|
-
"name": "links",
|
|
21554
|
-
"snapshot": "false",
|
|
21555
|
-
"skip_rules": {
|
|
21556
|
-
"wont_fix": [
|
|
21557
|
-
"region"
|
|
21558
|
-
],
|
|
21559
|
-
"will_fix": [
|
|
21560
|
-
"color-contrast"
|
|
21561
|
-
]
|
|
21562
|
-
}
|
|
21563
|
-
},
|
|
21564
|
-
{
|
|
21565
|
-
"preview_path": "primer/open_project/tree_view/buttons",
|
|
21566
|
-
"name": "buttons",
|
|
21567
|
-
"snapshot": "false",
|
|
21568
|
-
"skip_rules": {
|
|
21569
|
-
"wont_fix": [
|
|
21570
|
-
"region"
|
|
21571
|
-
],
|
|
21572
|
-
"will_fix": [
|
|
21573
|
-
"color-contrast"
|
|
21574
|
-
]
|
|
21575
|
-
}
|
|
21576
|
-
},
|
|
21577
|
-
{
|
|
21578
|
-
"preview_path": "primer/open_project/tree_view/auto_expansion",
|
|
21579
|
-
"name": "auto_expansion",
|
|
21580
|
-
"snapshot": "false",
|
|
21581
|
-
"skip_rules": {
|
|
21582
|
-
"wont_fix": [
|
|
21583
|
-
"region"
|
|
21584
|
-
],
|
|
21585
|
-
"will_fix": [
|
|
21586
|
-
"color-contrast"
|
|
21587
|
-
]
|
|
21588
|
-
}
|
|
21589
|
-
}
|
|
21590
|
-
],
|
|
21591
|
-
"subcomponents": []
|
|
21592
|
-
},
|
|
21593
|
-
{
|
|
21594
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView::Icon",
|
|
21595
|
-
"description": "An icon for a `TreeView` node.\n\nThis component is part of the {{#link_to_component}}Primer::OpenProject::TreeView{{/link_to_component}} component and should\nnot be used directly.",
|
|
21596
|
-
"accessibility_docs": null,
|
|
21597
|
-
"is_form_component": false,
|
|
21598
|
-
"is_published": true,
|
|
21599
|
-
"requires_js": false,
|
|
21600
|
-
"component": "OpenProject::TreeView::Icon",
|
|
21601
|
-
"status": "alpha",
|
|
21602
|
-
"a11y_reviewed": false,
|
|
21603
|
-
"short_name": "OpenProjectTreeViewIcon",
|
|
21604
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view/icon.rb",
|
|
21605
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/icon/default/",
|
|
21606
|
-
"parameters": [
|
|
21607
|
-
{
|
|
21608
|
-
"name": "system_arguments",
|
|
21609
|
-
"type": "Hash",
|
|
21610
|
-
"default": "N/A",
|
|
21611
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}."
|
|
21612
|
-
}
|
|
21613
|
-
],
|
|
21614
|
-
"slots": [],
|
|
21615
|
-
"methods": [],
|
|
21616
|
-
"previews": [],
|
|
21617
|
-
"subcomponents": []
|
|
21618
|
-
},
|
|
21619
|
-
{
|
|
21620
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView::IconPair",
|
|
21621
|
-
"description": "A pair of icons for a `TreeView` sub-tree that displays distinct icons when the sub-tree is\nexpanded and collapsed.\n\nThis component is part of the {{#link_to_component}}Primer::OpenProject::TreeView{{/link_to_component}} component and should\nnot be used directly.",
|
|
21622
|
-
"accessibility_docs": null,
|
|
21623
|
-
"is_form_component": false,
|
|
21624
|
-
"is_published": true,
|
|
21625
|
-
"requires_js": false,
|
|
21626
|
-
"component": "OpenProject::TreeView::IconPair",
|
|
21627
|
-
"status": "alpha",
|
|
21628
|
-
"a11y_reviewed": false,
|
|
21629
|
-
"short_name": "OpenProjectTreeViewIconPair",
|
|
21630
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view/icon_pair.rb",
|
|
21631
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/icon_pair/default/",
|
|
21632
|
-
"parameters": [
|
|
21633
|
-
{
|
|
21634
|
-
"name": "expanded",
|
|
21635
|
-
"type": "Boolean",
|
|
21636
|
-
"default": "`false`",
|
|
21637
|
-
"description": "If true, the expanded icon is shown and the collapsed icon is hidden, etc."
|
|
21638
|
-
},
|
|
21639
|
-
{
|
|
21640
|
-
"name": "system_arguments",
|
|
21641
|
-
"type": "Hash",
|
|
21642
|
-
"default": "N/A",
|
|
21643
|
-
"description": "{{link_to_system_arguments_docs}}"
|
|
21644
|
-
}
|
|
21645
|
-
],
|
|
21646
|
-
"slots": [
|
|
21647
|
-
{
|
|
21648
|
-
"name": "expanded_icon",
|
|
21649
|
-
"description": "The expanded icon.",
|
|
21650
|
-
"parameters": [
|
|
21651
|
-
{
|
|
21652
|
-
"name": "system_arguments",
|
|
21653
|
-
"type": "Hash",
|
|
21654
|
-
"default": "N/A",
|
|
21655
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::Icon{{/link_to_component}}."
|
|
21656
|
-
}
|
|
21657
|
-
]
|
|
21658
|
-
},
|
|
21659
|
-
{
|
|
21660
|
-
"name": "collapsed_icon",
|
|
21661
|
-
"description": "The collapsed icon.",
|
|
21662
|
-
"parameters": [
|
|
21663
|
-
{
|
|
21664
|
-
"name": "system_arguments",
|
|
21665
|
-
"type": "Hash",
|
|
21666
|
-
"default": "N/A",
|
|
21667
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::Icon{{/link_to_component}}."
|
|
21668
|
-
}
|
|
21669
|
-
]
|
|
21670
|
-
}
|
|
21671
|
-
],
|
|
21672
|
-
"methods": [
|
|
21673
|
-
{
|
|
21674
|
-
"name": "expanded",
|
|
21675
|
-
"description": "Whether or not this icon is expanded.",
|
|
21676
|
-
"parameters": [],
|
|
21677
|
-
"return_types": [
|
|
21678
|
-
"Boolean"
|
|
21679
|
-
]
|
|
21680
|
-
},
|
|
21681
|
-
{
|
|
21682
|
-
"name": "expanded?",
|
|
21683
|
-
"description": "Whether or not this icon is expanded.",
|
|
21684
|
-
"parameters": [],
|
|
21685
|
-
"return_types": [
|
|
21686
|
-
"Boolean"
|
|
21687
|
-
]
|
|
21688
|
-
}
|
|
21689
|
-
],
|
|
21690
|
-
"previews": [],
|
|
21691
|
-
"subcomponents": []
|
|
21692
|
-
},
|
|
21693
|
-
{
|
|
21694
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView::LeadingAction",
|
|
21695
|
-
"description": "The leading action for `TreeView` nodes.\n\nThis component is part of the {{#link_to_component}}Primer::OpenProject::TreeView{{/link_to_component}} component and should\nnot be used directly.",
|
|
21696
|
-
"accessibility_docs": null,
|
|
21697
|
-
"is_form_component": false,
|
|
21698
|
-
"is_published": true,
|
|
21699
|
-
"requires_js": false,
|
|
21700
|
-
"component": "OpenProject::TreeView::LeadingAction",
|
|
21701
|
-
"status": "alpha",
|
|
21702
|
-
"a11y_reviewed": false,
|
|
21703
|
-
"short_name": "OpenProjectTreeViewLeadingAction",
|
|
21704
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view/leading_action.rb",
|
|
21705
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/leading_action/default/",
|
|
21706
|
-
"parameters": [
|
|
21707
|
-
{
|
|
21708
|
-
"name": "action",
|
|
21709
|
-
"type": "ViewComponent::Base",
|
|
21710
|
-
"default": "N/A",
|
|
21711
|
-
"description": "A component or other renderable to use as the action button etc."
|
|
21712
|
-
}
|
|
21713
|
-
],
|
|
21714
|
-
"slots": [],
|
|
21715
|
-
"methods": [],
|
|
21716
|
-
"previews": [],
|
|
21717
|
-
"subcomponents": []
|
|
21718
|
-
},
|
|
21719
|
-
{
|
|
21720
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView::LeafNode",
|
|
21721
|
-
"description": "A `TreeView` leaf node.\n\nThis component is part of the {{#link_to_component}}Primer::OpenProject::TreeView{{/link_to_component}} component and should\nnot be used directly.",
|
|
21722
|
-
"accessibility_docs": null,
|
|
21723
|
-
"is_form_component": false,
|
|
21724
|
-
"is_published": true,
|
|
21725
|
-
"requires_js": false,
|
|
21726
|
-
"component": "OpenProject::TreeView::LeafNode",
|
|
21727
|
-
"status": "alpha",
|
|
21728
|
-
"a11y_reviewed": false,
|
|
21729
|
-
"short_name": "OpenProjectTreeViewLeafNode",
|
|
21730
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view/leaf_node.rb",
|
|
21731
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/leaf_node/default/",
|
|
21732
|
-
"parameters": [
|
|
21733
|
-
{
|
|
21734
|
-
"name": "label",
|
|
21735
|
-
"type": "String",
|
|
21736
|
-
"default": "N/A",
|
|
21737
|
-
"description": "The node's label, i.e. it's textual content."
|
|
21738
|
-
},
|
|
21739
|
-
{
|
|
21740
|
-
"name": "system_arguments",
|
|
21741
|
-
"type": "Hash",
|
|
21742
|
-
"default": "N/A",
|
|
21743
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::Node{{/link_to_component}}."
|
|
21744
|
-
}
|
|
21745
|
-
],
|
|
21746
|
-
"slots": [
|
|
21747
|
-
{
|
|
21748
|
-
"name": "leading_visual",
|
|
21749
|
-
"description": null,
|
|
21750
|
-
"parameters": []
|
|
21751
|
-
},
|
|
21752
|
-
{
|
|
21753
|
-
"name": "leading_action",
|
|
21754
|
-
"description": null,
|
|
21755
|
-
"parameters": []
|
|
21756
|
-
},
|
|
21757
|
-
{
|
|
21758
|
-
"name": "trailing_visual",
|
|
21759
|
-
"description": null,
|
|
21760
|
-
"parameters": []
|
|
21761
|
-
}
|
|
21762
|
-
],
|
|
21763
|
-
"methods": [
|
|
21764
|
-
{
|
|
21765
|
-
"name": "with_leading_visual_icon",
|
|
21766
|
-
"description": "Adds a leading visual icon rendered to the left of the node's label.",
|
|
21767
|
-
"parameters": [
|
|
21768
|
-
{
|
|
21769
|
-
"name": "label",
|
|
21770
|
-
"type": "String",
|
|
21771
|
-
"default": "`nil`",
|
|
21772
|
-
"description": "A label describing the visual, displayed only to screen readers."
|
|
21773
|
-
},
|
|
21774
|
-
{
|
|
21775
|
-
"name": "system_arguments",
|
|
21776
|
-
"type": "Hash",
|
|
21777
|
-
"default": "N/A",
|
|
21778
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::Icon{{/link_to_component}}."
|
|
21779
|
-
}
|
|
21780
|
-
],
|
|
21781
|
-
"return_types": []
|
|
21782
|
-
},
|
|
21783
|
-
{
|
|
21784
|
-
"name": "with_leading_action_button",
|
|
21785
|
-
"description": "Adds a leading action rendered to the left of the node's label and any leading visuals or checkboxes.",
|
|
21786
|
-
"parameters": [
|
|
21787
|
-
{
|
|
21788
|
-
"name": "system_arguments",
|
|
21789
|
-
"type": "Hash",
|
|
21790
|
-
"default": "N/A",
|
|
21791
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}."
|
|
21792
|
-
}
|
|
21793
|
-
],
|
|
21794
|
-
"return_types": []
|
|
21795
|
-
},
|
|
21796
|
-
{
|
|
21797
|
-
"name": "with_trailing_visual_icon",
|
|
21798
|
-
"description": "Adds a trailing visual icon rendered to the right of the node's label.",
|
|
21799
|
-
"parameters": [
|
|
21800
|
-
{
|
|
21801
|
-
"name": "label",
|
|
21802
|
-
"type": "String",
|
|
21803
|
-
"default": "`nil`",
|
|
21804
|
-
"description": "A label describing the visual, displayed only to screen readers."
|
|
21805
|
-
},
|
|
21806
|
-
{
|
|
21807
|
-
"name": "system_arguments",
|
|
21808
|
-
"type": "Hash",
|
|
21809
|
-
"default": "N/A",
|
|
21810
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::Icon{{/link_to_component}}."
|
|
21811
|
-
}
|
|
21812
|
-
],
|
|
21813
|
-
"return_types": []
|
|
21814
|
-
}
|
|
21815
|
-
],
|
|
21816
|
-
"previews": [],
|
|
21817
|
-
"subcomponents": []
|
|
21818
|
-
},
|
|
21819
|
-
{
|
|
21820
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView::LoadingFailureMessage",
|
|
21821
|
-
"description": "A `TreeView` loading failure message.\n\nThis component is part of the {{#link_to_component}}Primer::OpenProject::TreeView{{/link_to_component}} component and should\nnot be used directly.",
|
|
21822
|
-
"accessibility_docs": null,
|
|
21823
|
-
"is_form_component": false,
|
|
21824
|
-
"is_published": true,
|
|
21825
|
-
"requires_js": false,
|
|
21826
|
-
"component": "OpenProject::TreeView::LoadingFailureMessage",
|
|
21827
|
-
"status": "alpha",
|
|
21828
|
-
"a11y_reviewed": false,
|
|
21829
|
-
"short_name": "OpenProjectTreeViewLoadingFailureMessage",
|
|
21830
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view/loading_failure_message.rb",
|
|
21831
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/loading_failure_message/default/",
|
|
21832
|
-
"parameters": [
|
|
21833
|
-
{
|
|
21834
|
-
"name": "text",
|
|
21835
|
-
"type": "String",
|
|
21836
|
-
"default": "`Something went wrong`",
|
|
21837
|
-
"description": "The failure message to display."
|
|
21838
|
-
},
|
|
21839
|
-
{
|
|
21840
|
-
"name": "retry_button_label",
|
|
21841
|
-
"type": "String",
|
|
21842
|
-
"default": "`Retry`",
|
|
21843
|
-
"description": "The text shown on the retry button."
|
|
21844
|
-
},
|
|
21845
|
-
{
|
|
21846
|
-
"name": "system_arguments",
|
|
21847
|
-
"type": "Hash",
|
|
21848
|
-
"default": "N/A",
|
|
21849
|
-
"description": "{{link_to_system_arguments_docs}}"
|
|
21850
|
-
}
|
|
21851
|
-
],
|
|
21852
|
-
"slots": [],
|
|
21853
|
-
"methods": [],
|
|
21854
|
-
"previews": [],
|
|
21855
|
-
"subcomponents": []
|
|
21856
|
-
},
|
|
21857
|
-
{
|
|
21858
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView::Node",
|
|
21859
|
-
"description": "A generic `TreeView` node.\n\nThis component is part of the {{#link_to_component}}Primer::OpenProject::TreeView{{/link_to_component}} component and should\nnot be used directly.",
|
|
21860
|
-
"accessibility_docs": null,
|
|
21861
|
-
"is_form_component": false,
|
|
21862
|
-
"is_published": true,
|
|
21863
|
-
"requires_js": false,
|
|
21864
|
-
"component": "OpenProject::TreeView::Node",
|
|
21865
|
-
"status": "alpha",
|
|
21866
|
-
"a11y_reviewed": false,
|
|
21867
|
-
"short_name": "OpenProjectTreeViewNode",
|
|
21868
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view/node.rb",
|
|
21869
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/node/default/",
|
|
21870
|
-
"parameters": [
|
|
21871
|
-
{
|
|
21872
|
-
"name": "path",
|
|
21873
|
-
"type": "Array<String>",
|
|
21874
|
-
"default": "N/A",
|
|
21875
|
-
"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."
|
|
21876
|
-
},
|
|
21877
|
-
{
|
|
21878
|
-
"name": "node_variant",
|
|
21879
|
-
"type": "Symbol",
|
|
21880
|
-
"default": "N/A",
|
|
21881
|
-
"description": "The node variant to use for the node's content, i.e. the `:button` or `:div`. One of `:anchor`, `:button`, or `:div`."
|
|
21882
|
-
},
|
|
21883
|
-
{
|
|
21884
|
-
"name": "href",
|
|
21885
|
-
"type": "String",
|
|
21886
|
-
"default": "`nil`",
|
|
21887
|
-
"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`."
|
|
21888
|
-
},
|
|
21889
|
-
{
|
|
21890
|
-
"name": "current",
|
|
21891
|
-
"type": "Boolean",
|
|
21892
|
-
"default": "`false`",
|
|
21893
|
-
"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."
|
|
21894
|
-
},
|
|
21895
|
-
{
|
|
21896
|
-
"name": "select_variant",
|
|
21897
|
-
"type": "Symbol",
|
|
21898
|
-
"default": "`:none`",
|
|
21899
|
-
"description": "Controls the type of checkbox that appears. One of `:multiple` or `:none`."
|
|
21900
|
-
},
|
|
21901
|
-
{
|
|
21902
|
-
"name": "checked",
|
|
21903
|
-
"type": "Boolean | String",
|
|
21904
|
-
"default": "`false`",
|
|
21905
|
-
"description": "The checked state of the node's checkbox. One of `false`, `mixed`, or `true`."
|
|
21906
|
-
},
|
|
21907
|
-
{
|
|
21908
|
-
"name": "disabled",
|
|
21909
|
-
"type": "Boolean",
|
|
21910
|
-
"default": "`false`",
|
|
21911
|
-
"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."
|
|
21912
|
-
},
|
|
21913
|
-
{
|
|
21914
|
-
"name": "value",
|
|
21915
|
-
"type": "String",
|
|
21916
|
-
"default": "`nil`",
|
|
21917
|
-
"description": "If this node is checked, this value will be sent to the server on form submission."
|
|
21918
|
-
},
|
|
21919
|
-
{
|
|
21920
|
-
"name": "content_arguments",
|
|
21921
|
-
"type": "Hash",
|
|
21922
|
-
"default": "N/A",
|
|
21923
|
-
"description": "Arguments attached to the node's content, i.e the `<button>` or `<a>` element. {{link_to_system_arguments_docs}}"
|
|
21924
|
-
}
|
|
21925
|
-
],
|
|
21926
|
-
"slots": [
|
|
21927
|
-
{
|
|
21928
|
-
"name": "leading_action",
|
|
21929
|
-
"description": "Generic leading action slot",
|
|
21930
|
-
"parameters": []
|
|
21931
|
-
},
|
|
21932
|
-
{
|
|
21933
|
-
"name": "leading_visual",
|
|
21934
|
-
"description": "Generic leading visual slot",
|
|
21935
|
-
"parameters": []
|
|
21936
|
-
},
|
|
21937
|
-
{
|
|
21938
|
-
"name": "trailing_visual",
|
|
21939
|
-
"description": "Generic trailing visual slot",
|
|
21940
|
-
"parameters": []
|
|
21941
|
-
},
|
|
21942
|
-
{
|
|
21943
|
-
"name": "toggle",
|
|
21944
|
-
"description": "Generic toggle button slot",
|
|
21945
|
-
"parameters": []
|
|
21946
|
-
},
|
|
21947
|
-
{
|
|
21948
|
-
"name": "text_content",
|
|
21949
|
-
"description": "Generic text content slot (for node's label)",
|
|
21950
|
-
"parameters": []
|
|
21951
|
-
}
|
|
21952
|
-
],
|
|
21953
|
-
"methods": [
|
|
21954
|
-
{
|
|
21955
|
-
"name": "current",
|
|
21956
|
-
"description": "Wether or not this node is the current node.",
|
|
21957
|
-
"parameters": [],
|
|
21958
|
-
"return_types": [
|
|
21959
|
-
"Boolean"
|
|
21960
|
-
]
|
|
21961
|
-
},
|
|
21962
|
-
{
|
|
21963
|
-
"name": "current?",
|
|
21964
|
-
"description": "Wether or not this node is the current node.",
|
|
21965
|
-
"parameters": [],
|
|
21966
|
-
"return_types": [
|
|
21967
|
-
"Boolean"
|
|
21968
|
-
]
|
|
21969
|
-
},
|
|
21970
|
-
{
|
|
21971
|
-
"name": "checked",
|
|
21972
|
-
"description": "This node's checked state.",
|
|
21973
|
-
"parameters": [],
|
|
21974
|
-
"return_types": [
|
|
21975
|
-
"String"
|
|
21976
|
-
]
|
|
21977
|
-
},
|
|
21978
|
-
{
|
|
21979
|
-
"name": "select_variant",
|
|
21980
|
-
"description": "This node's select variant (i.e. check box variant).",
|
|
21981
|
-
"parameters": [],
|
|
21982
|
-
"return_types": [
|
|
21983
|
-
"Symbol"
|
|
21984
|
-
]
|
|
21985
|
-
},
|
|
21986
|
-
{
|
|
21987
|
-
"name": "node_variant",
|
|
21988
|
-
"description": "This node's variant, eg. `:button`, `:div`, etc.",
|
|
21989
|
-
"parameters": [],
|
|
21990
|
-
"return_types": [
|
|
21991
|
-
"Symbol"
|
|
21992
|
-
]
|
|
21993
|
-
},
|
|
21994
|
-
{
|
|
21995
|
-
"name": "disabled",
|
|
21996
|
-
"description": "Whether or not this node is disabled, i.e. cannot be activated.",
|
|
21997
|
-
"parameters": [],
|
|
21998
|
-
"return_types": [
|
|
21999
|
-
"Boolean"
|
|
22000
|
-
]
|
|
22001
|
-
},
|
|
22002
|
-
{
|
|
22003
|
-
"name": "disabled?",
|
|
22004
|
-
"description": "Whether or not this node is disabled, i.e. cannot be activated.",
|
|
22005
|
-
"parameters": [],
|
|
22006
|
-
"return_types": [
|
|
22007
|
-
"Boolean"
|
|
22008
|
-
]
|
|
22009
|
-
},
|
|
22010
|
-
{
|
|
22011
|
-
"name": "level",
|
|
22012
|
-
"description": "The numeric depth of this node.",
|
|
22013
|
-
"parameters": [],
|
|
22014
|
-
"return_types": [
|
|
22015
|
-
"Integer"
|
|
22016
|
-
]
|
|
22017
|
-
},
|
|
22018
|
-
{
|
|
22019
|
-
"name": "merge_system_arguments!",
|
|
22020
|
-
"description": "Merges the given arguments into the current hash of system arguments provided when the component was\ninitially constructed. This method can be used to add additional arguments just before rendering.",
|
|
22021
|
-
"parameters": [
|
|
22022
|
-
{
|
|
22023
|
-
"name": "other_arguments",
|
|
22024
|
-
"type": "Hash",
|
|
22025
|
-
"default": "N/A",
|
|
22026
|
-
"description": "The other hash of system arguments to merge into the current one."
|
|
22027
|
-
}
|
|
22028
|
-
],
|
|
22029
|
-
"return_types": []
|
|
22030
|
-
}
|
|
22031
|
-
],
|
|
22032
|
-
"previews": [],
|
|
22033
|
-
"subcomponents": []
|
|
22034
|
-
},
|
|
22035
|
-
{
|
|
22036
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView::SkeletonLoader",
|
|
22037
|
-
"description": "Renders a loading skeleton for a `TreeView` sub-tree node.\n\nThis component is part of the {{#link_to_component}}Primer::OpenProject::TreeView{{/link_to_component}} component and should\nnot be used directly.",
|
|
22038
|
-
"accessibility_docs": null,
|
|
22039
|
-
"is_form_component": false,
|
|
22040
|
-
"is_published": true,
|
|
22041
|
-
"requires_js": false,
|
|
22042
|
-
"component": "OpenProject::TreeView::SkeletonLoader",
|
|
22043
|
-
"status": "alpha",
|
|
22044
|
-
"a11y_reviewed": false,
|
|
22045
|
-
"short_name": "OpenProjectTreeViewSkeletonLoader",
|
|
22046
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view/skeleton_loader.rb",
|
|
22047
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/skeleton_loader/default/",
|
|
22048
|
-
"parameters": [
|
|
22049
|
-
{
|
|
22050
|
-
"name": "src",
|
|
22051
|
-
"type": "String",
|
|
22052
|
-
"default": "N/A",
|
|
22053
|
-
"description": "The URL to fetch nodes from."
|
|
22054
|
-
},
|
|
22055
|
-
{
|
|
22056
|
-
"name": "count",
|
|
22057
|
-
"type": "Integer",
|
|
22058
|
-
"default": "`3`",
|
|
22059
|
-
"description": "The number of skeleton nodes to render."
|
|
22060
|
-
},
|
|
22061
|
-
{
|
|
22062
|
-
"name": "system_arguments",
|
|
22063
|
-
"type": "Hash",
|
|
22064
|
-
"default": "N/A",
|
|
22065
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::SubTreeContainer{{/link_to_component}}."
|
|
22066
|
-
}
|
|
22067
|
-
],
|
|
22068
|
-
"slots": [
|
|
22069
|
-
{
|
|
22070
|
-
"name": "loading_failure_message",
|
|
22071
|
-
"description": "The failure message that appears if loading nodes from the server fails.",
|
|
22072
|
-
"parameters": [
|
|
22073
|
-
{
|
|
22074
|
-
"name": "system_arguments",
|
|
22075
|
-
"type": "Hash",
|
|
22076
|
-
"default": "N/A",
|
|
22077
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::LoadingFailureMessage{{/link_to_component}}."
|
|
22078
|
-
}
|
|
22079
|
-
]
|
|
22080
|
-
}
|
|
22081
|
-
],
|
|
22082
|
-
"methods": [],
|
|
22083
|
-
"previews": [],
|
|
22084
|
-
"subcomponents": []
|
|
22085
|
-
},
|
|
22086
|
-
{
|
|
22087
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView::SpinnerLoader",
|
|
22088
|
-
"description": "Renders a loading spinner for a `TreeView` sub-tree node.\n\nThis component is part of the {{#link_to_component}}Primer::OpenProject::TreeView{{/link_to_component}} component and should\nnot be used directly.",
|
|
22089
|
-
"accessibility_docs": null,
|
|
22090
|
-
"is_form_component": false,
|
|
22091
|
-
"is_published": true,
|
|
22092
|
-
"requires_js": false,
|
|
22093
|
-
"component": "OpenProject::TreeView::SpinnerLoader",
|
|
22094
|
-
"status": "alpha",
|
|
22095
|
-
"a11y_reviewed": false,
|
|
22096
|
-
"short_name": "OpenProjectTreeViewSpinnerLoader",
|
|
22097
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view/spinner_loader.rb",
|
|
22098
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/spinner_loader/default/",
|
|
22099
|
-
"parameters": [
|
|
22100
|
-
{
|
|
22101
|
-
"name": "src",
|
|
22102
|
-
"type": "String",
|
|
22103
|
-
"default": "N/A",
|
|
22104
|
-
"description": "The URL to fetch nodes from."
|
|
22105
|
-
},
|
|
22106
|
-
{
|
|
22107
|
-
"name": "system_arguments",
|
|
22108
|
-
"type": "Hash",
|
|
22109
|
-
"default": "N/A",
|
|
22110
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::SubTreeContainer{{/link_to_component}}."
|
|
22111
|
-
}
|
|
22112
|
-
],
|
|
22113
|
-
"slots": [
|
|
22114
|
-
{
|
|
22115
|
-
"name": "loading_failure_message",
|
|
22116
|
-
"description": "The failure message that appears if loading nodes from the server fails.",
|
|
22117
|
-
"parameters": [
|
|
22118
|
-
{
|
|
22119
|
-
"name": "system_arguments",
|
|
22120
|
-
"type": "Hash",
|
|
22121
|
-
"default": "N/A",
|
|
22122
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::LoadingFailureMessage{{/link_to_component}}."
|
|
22123
|
-
}
|
|
22124
|
-
]
|
|
22125
|
-
}
|
|
22126
|
-
],
|
|
22127
|
-
"methods": [],
|
|
22128
|
-
"previews": [],
|
|
22129
|
-
"subcomponents": []
|
|
22130
|
-
},
|
|
22131
|
-
{
|
|
22132
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView::SubTree",
|
|
22133
|
-
"description": "A `TreeView` sub-tree.\n\nThis component is part of the {{#link_to_component}}Primer::OpenProject::TreeView{{/link_to_component}} component and should\nnot be used directly.",
|
|
22134
|
-
"accessibility_docs": null,
|
|
22135
|
-
"is_form_component": false,
|
|
22136
|
-
"is_published": true,
|
|
22137
|
-
"requires_js": false,
|
|
22138
|
-
"component": "OpenProject::TreeView::SubTree",
|
|
22139
|
-
"status": "alpha",
|
|
22140
|
-
"a11y_reviewed": false,
|
|
22141
|
-
"short_name": "OpenProjectTreeViewSubTree",
|
|
22142
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view/sub_tree.rb",
|
|
22143
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/sub_tree/default/",
|
|
22144
|
-
"parameters": [
|
|
22145
|
-
{
|
|
22146
|
-
"name": "node_variant",
|
|
22147
|
-
"type": "Symbol",
|
|
22148
|
-
"default": "N/A",
|
|
22149
|
-
"description": "The variant to use for this node. One of `:anchor`, `:button`, or `:div`."
|
|
22150
|
-
},
|
|
22151
|
-
{
|
|
22152
|
-
"name": "system_arguments",
|
|
22153
|
-
"type": "Hash",
|
|
22154
|
-
"default": "N/A",
|
|
22155
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::SubTreeContainer{{/link_to_component}}."
|
|
22156
|
-
}
|
|
22157
|
-
],
|
|
22158
|
-
"slots": [
|
|
22159
|
-
{
|
|
22160
|
-
"name": "nodes",
|
|
22161
|
-
"description": null,
|
|
22162
|
-
"parameters": []
|
|
22163
|
-
},
|
|
22164
|
-
{
|
|
22165
|
-
"name": "loader",
|
|
22166
|
-
"description": null,
|
|
22167
|
-
"parameters": []
|
|
22168
|
-
},
|
|
22169
|
-
{
|
|
22170
|
-
"name": "no_items_message",
|
|
22171
|
-
"description": "The message to display if this sub-tree contains no children.",
|
|
22172
|
-
"parameters": []
|
|
22173
|
-
}
|
|
22174
|
-
],
|
|
22175
|
-
"methods": [
|
|
22176
|
-
{
|
|
22177
|
-
"name": "with_leaf",
|
|
22178
|
-
"description": "Adds an leaf node to the tree. Leaf nodes are nodes that do not have children.",
|
|
22179
|
-
"parameters": [
|
|
22180
|
-
{
|
|
22181
|
-
"name": "component_klass",
|
|
22182
|
-
"type": "Class",
|
|
22183
|
-
"default": "N/A",
|
|
22184
|
-
"description": "The class to use instead of the default {{#link_to_component}}Primer::OpenProject::TreeView::LeafNode{{/link_to_component}}"
|
|
22185
|
-
},
|
|
22186
|
-
{
|
|
22187
|
-
"name": "system_arguments",
|
|
22188
|
-
"type": "Hash",
|
|
22189
|
-
"default": "N/A",
|
|
22190
|
-
"description": "These arguments are forwarded to {{#link_to_component}}Primer::OpenProject::TreeView::LeafNode{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
|
22191
|
-
}
|
|
22192
|
-
],
|
|
22193
|
-
"return_types": []
|
|
22194
|
-
},
|
|
22195
|
-
{
|
|
22196
|
-
"name": "with_sub_tree",
|
|
22197
|
-
"description": "Adds a sub-tree node to the tree. Sub-trees are nodes that have children, which can be both leaf nodes and other sub-trees.",
|
|
22198
|
-
"parameters": [
|
|
22199
|
-
{
|
|
22200
|
-
"name": "component_klass",
|
|
22201
|
-
"type": "Class",
|
|
22202
|
-
"default": "N/A",
|
|
22203
|
-
"description": "The class to use instead of the default {{#link_to_component}}Primer::OpenProject::TreeView::SubTreeNode{{/link_to_component}}"
|
|
22204
|
-
},
|
|
22205
|
-
{
|
|
22206
|
-
"name": "system_arguments",
|
|
22207
|
-
"type": "Hash",
|
|
22208
|
-
"default": "N/A",
|
|
22209
|
-
"description": "These arguments are forwarded to {{#link_to_component}}Primer::OpenProject::TreeView::SubTreeNode{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
|
22210
|
-
}
|
|
22211
|
-
],
|
|
22212
|
-
"return_types": []
|
|
22213
|
-
},
|
|
22214
|
-
{
|
|
22215
|
-
"name": "with_loading_spinner",
|
|
22216
|
-
"description": "Adds a loader to this sub-tree that displays a skeleton animation while nodes are fetched from the server.",
|
|
22217
|
-
"parameters": [
|
|
22218
|
-
{
|
|
22219
|
-
"name": "system_arguments",
|
|
22220
|
-
"type": "Hash",
|
|
22221
|
-
"default": "N/A",
|
|
22222
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::SkeletonLoader{{/link_to_component}}."
|
|
22223
|
-
}
|
|
22224
|
-
],
|
|
22225
|
-
"return_types": []
|
|
22226
|
-
},
|
|
22227
|
-
{
|
|
22228
|
-
"name": "node_variant",
|
|
22229
|
-
"description": "Returns the value of attribute node_variant.",
|
|
22230
|
-
"parameters": [],
|
|
22231
|
-
"return_types": []
|
|
22232
|
-
}
|
|
22233
|
-
],
|
|
22234
|
-
"previews": [],
|
|
22235
|
-
"subcomponents": []
|
|
22236
|
-
},
|
|
22237
|
-
{
|
|
22238
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView::SubTreeContainer",
|
|
22239
|
-
"description": "This component is part of the {{#link_to_component}}Primer::OpenProject::TreeView{{/link_to_component}} component and should\nnot be used directly.",
|
|
22240
|
-
"accessibility_docs": null,
|
|
22241
|
-
"is_form_component": false,
|
|
22242
|
-
"is_published": true,
|
|
22243
|
-
"requires_js": false,
|
|
22244
|
-
"component": "OpenProject::TreeView::SubTreeContainer",
|
|
22245
|
-
"status": "alpha",
|
|
22246
|
-
"a11y_reviewed": false,
|
|
22247
|
-
"short_name": "OpenProjectTreeViewSubTreeContainer",
|
|
22248
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view/sub_tree_container.rb",
|
|
22249
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/sub_tree_container/default/",
|
|
22250
|
-
"parameters": [
|
|
22251
|
-
{
|
|
22252
|
-
"name": "path",
|
|
22253
|
-
"type": "Array<String>",
|
|
22254
|
-
"default": "N/A",
|
|
22255
|
-
"description": "The path to this node."
|
|
22256
|
-
},
|
|
22257
|
-
{
|
|
22258
|
-
"name": "expanded",
|
|
22259
|
-
"type": "Boolean",
|
|
22260
|
-
"default": "`false`",
|
|
22261
|
-
"description": "Whether or not this sub-tree node renders expanded."
|
|
22262
|
-
},
|
|
22263
|
-
{
|
|
22264
|
-
"name": "system_arguments",
|
|
22265
|
-
"type": "Hash",
|
|
22266
|
-
"default": "N/A",
|
|
22267
|
-
"description": "{{link_to_system_arguments_docs}}"
|
|
22268
|
-
}
|
|
22269
|
-
],
|
|
22270
|
-
"slots": [],
|
|
22271
|
-
"methods": [
|
|
22272
|
-
{
|
|
22273
|
-
"name": "path",
|
|
22274
|
-
"description": "The path to this node",
|
|
22275
|
-
"parameters": [],
|
|
22276
|
-
"return_types": [
|
|
22277
|
-
"Array<String>"
|
|
22278
|
-
]
|
|
22279
|
-
},
|
|
22280
|
-
{
|
|
22281
|
-
"name": "expanded",
|
|
22282
|
-
"description": "Whether or not this sub-tree node renders expanded.",
|
|
22283
|
-
"parameters": [],
|
|
22284
|
-
"return_types": [
|
|
22285
|
-
"Boolean"
|
|
22286
|
-
]
|
|
22287
|
-
},
|
|
22288
|
-
{
|
|
22289
|
-
"name": "expanded?",
|
|
22290
|
-
"description": "Whether or not this sub-tree node renders expanded.",
|
|
22291
|
-
"parameters": [],
|
|
22292
|
-
"return_types": [
|
|
22293
|
-
"Boolean"
|
|
22294
|
-
]
|
|
22295
|
-
}
|
|
22296
|
-
],
|
|
22297
|
-
"previews": [],
|
|
22298
|
-
"subcomponents": []
|
|
22299
|
-
},
|
|
22300
|
-
{
|
|
22301
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView::SubTreeNode",
|
|
22302
|
-
"description": "A `TreeView` sub-tree node.\n\nThis component is part of the {{#link_to_component}}Primer::OpenProject::TreeView{{/link_to_component}} component and should\nnot be used directly.",
|
|
22303
|
-
"accessibility_docs": null,
|
|
22304
|
-
"is_form_component": false,
|
|
22305
|
-
"is_published": true,
|
|
22306
|
-
"requires_js": false,
|
|
22307
|
-
"component": "OpenProject::TreeView::SubTreeNode",
|
|
22308
|
-
"status": "alpha",
|
|
22309
|
-
"a11y_reviewed": false,
|
|
22310
|
-
"short_name": "OpenProjectTreeViewSubTreeNode",
|
|
22311
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view/sub_tree_node.rb",
|
|
22312
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/sub_tree_node/default/",
|
|
22313
|
-
"parameters": [
|
|
22314
|
-
{
|
|
22315
|
-
"name": "label",
|
|
22316
|
-
"type": "String",
|
|
22317
|
-
"default": "N/A",
|
|
22318
|
-
"description": "The node's label, i.e. it's textual content."
|
|
22319
|
-
},
|
|
22320
|
-
{
|
|
22321
|
-
"name": "path",
|
|
22322
|
-
"type": "Array<String>",
|
|
22323
|
-
"default": "N/A",
|
|
22324
|
-
"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."
|
|
22325
|
-
},
|
|
22326
|
-
{
|
|
22327
|
-
"name": "node_variant",
|
|
22328
|
-
"type": "Symbol",
|
|
22329
|
-
"default": "N/A",
|
|
22330
|
-
"description": "The variant to use for this node. One of `:anchor`, `:button`, or `:div`."
|
|
22331
|
-
},
|
|
22332
|
-
{
|
|
22333
|
-
"name": "sub_tree_component_klass",
|
|
22334
|
-
"type": "Class",
|
|
22335
|
-
"default": "`SubTree`",
|
|
22336
|
-
"description": "The class to use for the sub-tree instead of the default {{#link_to_component}}Primer::OpenProject::TreeView::SubTree{{/link_to_component}}"
|
|
22337
|
-
},
|
|
22338
|
-
{
|
|
22339
|
-
"name": "expanded",
|
|
22340
|
-
"type": "Boolean",
|
|
22341
|
-
"default": "`false`",
|
|
22342
|
-
"description": "Whether or not this sub-tree should be rendered expanded."
|
|
22343
|
-
},
|
|
22344
|
-
{
|
|
22345
|
-
"name": "select_strategy",
|
|
22346
|
-
"type": "Symbol",
|
|
22347
|
-
"default": "`:mixed_descendants`",
|
|
22348
|
-
"description": "What should happen when this sub-tree node is checked. One of `:descendants`, `:mixed_descendants`, or `:self`."
|
|
22349
|
-
},
|
|
22350
|
-
{
|
|
22351
|
-
"name": "system_arguments",
|
|
22352
|
-
"type": "Hash",
|
|
22353
|
-
"default": "N/A",
|
|
22354
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::Node{{/link_to_component}}."
|
|
22355
|
-
}
|
|
22356
|
-
],
|
|
22357
|
-
"slots": [
|
|
22358
|
-
{
|
|
22359
|
-
"name": "leading_visual",
|
|
22360
|
-
"description": null,
|
|
22361
|
-
"parameters": []
|
|
22362
|
-
},
|
|
22363
|
-
{
|
|
22364
|
-
"name": "leading_action",
|
|
22365
|
-
"description": null,
|
|
22366
|
-
"parameters": []
|
|
22367
|
-
},
|
|
22368
|
-
{
|
|
22369
|
-
"name": "trailing_visual",
|
|
22370
|
-
"description": null,
|
|
22371
|
-
"parameters": []
|
|
22372
|
-
}
|
|
22373
|
-
],
|
|
22374
|
-
"methods": [
|
|
22375
|
-
{
|
|
22376
|
-
"name": "with_leading_visual_icon",
|
|
22377
|
-
"description": "Adds a leading visual icon rendered to the left of the node's label.",
|
|
22378
|
-
"parameters": [
|
|
22379
|
-
{
|
|
22380
|
-
"name": "label",
|
|
22381
|
-
"type": "String",
|
|
22382
|
-
"default": "`nil`",
|
|
22383
|
-
"description": "A label describing the visual, displayed only to screen readers."
|
|
22384
|
-
},
|
|
22385
|
-
{
|
|
22386
|
-
"name": "system_arguments",
|
|
22387
|
-
"type": "Hash",
|
|
22388
|
-
"default": "N/A",
|
|
22389
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::Icon{{/link_to_component}}."
|
|
22390
|
-
}
|
|
22391
|
-
],
|
|
22392
|
-
"return_types": []
|
|
22393
|
-
},
|
|
22394
|
-
{
|
|
22395
|
-
"name": "with_leading_visual_icons",
|
|
22396
|
-
"description": "Adds a pair of leading visual icon rendered to the left of the node's label.",
|
|
22397
|
-
"parameters": [
|
|
22398
|
-
{
|
|
22399
|
-
"name": "label",
|
|
22400
|
-
"type": "String",
|
|
22401
|
-
"default": "`nil`",
|
|
22402
|
-
"description": "A label describing the visual, displayed only to screen readers."
|
|
22403
|
-
},
|
|
22404
|
-
{
|
|
22405
|
-
"name": "system_arguments",
|
|
22406
|
-
"type": "Hash",
|
|
22407
|
-
"default": "N/A",
|
|
22408
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::IconPair{{/link_to_component}}."
|
|
22409
|
-
}
|
|
22410
|
-
],
|
|
22411
|
-
"return_types": []
|
|
22412
|
-
},
|
|
22413
|
-
{
|
|
22414
|
-
"name": "with_leading_action_button",
|
|
22415
|
-
"description": "Adds a leading action rendered to the left of the node's label and any leading visuals or checkboxes.",
|
|
22416
|
-
"parameters": [
|
|
22417
|
-
{
|
|
22418
|
-
"name": "system_arguments",
|
|
22419
|
-
"type": "Hash",
|
|
22420
|
-
"default": "N/A",
|
|
22421
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}."
|
|
22422
|
-
}
|
|
22423
|
-
],
|
|
22424
|
-
"return_types": []
|
|
22425
|
-
},
|
|
22426
|
-
{
|
|
22427
|
-
"name": "with_trailing_visual_icon",
|
|
22428
|
-
"description": "Adds a trailing visual icon rendered to the right of the node's label.",
|
|
22429
|
-
"parameters": [
|
|
22430
|
-
{
|
|
22431
|
-
"name": "label",
|
|
22432
|
-
"type": "String",
|
|
22433
|
-
"default": "`nil`",
|
|
22434
|
-
"description": "A label describing the visual, displayed only to screen readers."
|
|
22435
|
-
},
|
|
22436
|
-
{
|
|
22437
|
-
"name": "system_arguments",
|
|
22438
|
-
"type": "Hash",
|
|
22439
|
-
"default": "N/A",
|
|
22440
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::OpenProject::TreeView::Icon{{/link_to_component}}."
|
|
22441
|
-
}
|
|
22442
|
-
],
|
|
22443
|
-
"return_types": []
|
|
22444
|
-
}
|
|
22445
|
-
],
|
|
22446
|
-
"previews": [],
|
|
22447
|
-
"subcomponents": []
|
|
22448
|
-
},
|
|
22449
|
-
{
|
|
22450
|
-
"fully_qualified_name": "Primer::OpenProject::TreeView::Visual",
|
|
22451
|
-
"description": "A `TreeView` visual, either leading or trailing.\n\nThis component is part of the {{#link_to_component}}Primer::OpenProject::TreeView{{/link_to_component}} component and should\nnot be used directly.",
|
|
22452
|
-
"accessibility_docs": null,
|
|
22453
|
-
"is_form_component": false,
|
|
22454
|
-
"is_published": true,
|
|
22455
|
-
"requires_js": false,
|
|
22456
|
-
"component": "OpenProject::TreeView::Visual",
|
|
22457
|
-
"status": "alpha",
|
|
22458
|
-
"a11y_reviewed": false,
|
|
22459
|
-
"short_name": "OpenProjectTreeViewVisual",
|
|
22460
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/tree_view/visual.rb",
|
|
22461
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/tree_view/visual/default/",
|
|
22462
|
-
"parameters": [
|
|
22463
|
-
{
|
|
22464
|
-
"name": "id",
|
|
22465
|
-
"type": "String",
|
|
22466
|
-
"default": "N/A",
|
|
22467
|
-
"description": "This visual's HTML ID."
|
|
22468
|
-
},
|
|
22469
|
-
{
|
|
22470
|
-
"name": "visual",
|
|
22471
|
-
"type": "ViewComponent::Base",
|
|
22472
|
-
"default": "N/A",
|
|
22473
|
-
"description": "A renderable component like an instance of {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}} to render as the visual."
|
|
22474
|
-
},
|
|
22475
|
-
{
|
|
22476
|
-
"name": "label",
|
|
22477
|
-
"type": "String",
|
|
22478
|
-
"default": "`nil`",
|
|
22479
|
-
"description": "Text describing this visual that will be visible only to screen readers."
|
|
22480
|
-
}
|
|
22481
|
-
],
|
|
22482
|
-
"slots": [],
|
|
22483
|
-
"methods": [],
|
|
22484
|
-
"previews": [],
|
|
22485
|
-
"subcomponents": []
|
|
22486
|
-
},
|
|
22487
21166
|
{
|
|
22488
21167
|
"fully_qualified_name": "Primer::OpenProject::ZenModeButton",
|
|
22489
21168
|
"description": "Add a general description of component here\nAdd additional usage considerations or best practices that may aid the user to use the component correctly.",
|