@openproject/primer-view-components 0.0.0-20260120081613 → 0.0.0-20260120094029
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 +0 -37
- package/static/audited_at.json +0 -2
- package/static/constants.json +1 -7
- package/static/info_arch.json +0 -104
- package/static/previews.json +0 -34
- package/static/statuses.json +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openproject/primer-view-components",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20260120094029",
|
|
4
4
|
"description": "ViewComponents of the Primer Design System for OpenProject",
|
|
5
5
|
"main": "app/assets/javascripts/primer_view_components.js",
|
|
6
6
|
"module": "app/components/primer/primer.js",
|
package/static/arguments.json
CHANGED
|
@@ -6058,43 +6058,6 @@
|
|
|
6058
6058
|
}
|
|
6059
6059
|
]
|
|
6060
6060
|
},
|
|
6061
|
-
{
|
|
6062
|
-
"component": "OpenProject::Fieldset",
|
|
6063
|
-
"status": "alpha",
|
|
6064
|
-
"a11y_reviewed": false,
|
|
6065
|
-
"short_name": "OpenProjectFieldset",
|
|
6066
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/fieldset.rb",
|
|
6067
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/fieldset/default/",
|
|
6068
|
-
"parameters": [
|
|
6069
|
-
{
|
|
6070
|
-
"name": "legend_text",
|
|
6071
|
-
"type": "String",
|
|
6072
|
-
"default": "`nil`",
|
|
6073
|
-
"description": "A legend should be short and concise. The String will also be read by assistive technology."
|
|
6074
|
-
},
|
|
6075
|
-
{
|
|
6076
|
-
"name": "visually_hide_legend",
|
|
6077
|
-
"type": "Boolean",
|
|
6078
|
-
"default": "`false`",
|
|
6079
|
-
"description": "Controls if the legend is visible. If `true`, screen reader only text will be added."
|
|
6080
|
-
},
|
|
6081
|
-
{
|
|
6082
|
-
"name": "system_arguments",
|
|
6083
|
-
"type": "Hash",
|
|
6084
|
-
"default": "N/A",
|
|
6085
|
-
"description": "[System arguments](/system-arguments)"
|
|
6086
|
-
}
|
|
6087
|
-
]
|
|
6088
|
-
},
|
|
6089
|
-
{
|
|
6090
|
-
"component": "OpenProject::Fieldset::Legend",
|
|
6091
|
-
"status": "alpha",
|
|
6092
|
-
"a11y_reviewed": false,
|
|
6093
|
-
"short_name": "OpenProjectFieldsetLegend",
|
|
6094
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/fieldset/legend_component.rb",
|
|
6095
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/fieldset/legend/default/",
|
|
6096
|
-
"parameters": []
|
|
6097
|
-
},
|
|
6098
6061
|
{
|
|
6099
6062
|
"component": "OpenProject::FilterableTreeView",
|
|
6100
6063
|
"status": "alpha",
|
package/static/audited_at.json
CHANGED
|
@@ -151,8 +151,6 @@
|
|
|
151
151
|
"Primer::OpenProject::DragHandle": "",
|
|
152
152
|
"Primer::OpenProject::FeedbackDialog": "",
|
|
153
153
|
"Primer::OpenProject::FeedbackMessage": "",
|
|
154
|
-
"Primer::OpenProject::Fieldset": "",
|
|
155
|
-
"Primer::OpenProject::Fieldset::LegendComponent": "",
|
|
156
154
|
"Primer::OpenProject::FilterableTreeView": "",
|
|
157
155
|
"Primer::OpenProject::FilterableTreeView::SubTree": "",
|
|
158
156
|
"Primer::OpenProject::FlexLayout": "",
|
package/static/constants.json
CHANGED
|
@@ -1751,13 +1751,6 @@
|
|
|
1751
1751
|
"Primer::OpenProject::FeedbackMessage": {
|
|
1752
1752
|
"GeneratedSlotMethods": "Primer::OpenProject::FeedbackMessage::GeneratedSlotMethods"
|
|
1753
1753
|
},
|
|
1754
|
-
"Primer::OpenProject::Fieldset": {
|
|
1755
|
-
"GeneratedSlotMethods": "Primer::OpenProject::Fieldset::GeneratedSlotMethods",
|
|
1756
|
-
"LegendComponent": "Primer::OpenProject::Fieldset::LegendComponent"
|
|
1757
|
-
},
|
|
1758
|
-
"Primer::OpenProject::Fieldset::LegendComponent": {
|
|
1759
|
-
"GeneratedSlotMethods": "Primer::OpenProject::Fieldset::LegendComponent::GeneratedSlotMethods"
|
|
1760
|
-
},
|
|
1761
1754
|
"Primer::OpenProject::FilterableTreeView": {
|
|
1762
1755
|
"DEFAULT_FILTER_INPUT_ARGUMENTS": {
|
|
1763
1756
|
"name": "filter",
|
|
@@ -1852,6 +1845,7 @@
|
|
|
1852
1845
|
"none",
|
|
1853
1846
|
"flex"
|
|
1854
1847
|
],
|
|
1848
|
+
"DEFAULT_BUTTON_ACTION_SIZE": "medium",
|
|
1855
1849
|
"DEFAULT_HEADER_VARIANT": "medium",
|
|
1856
1850
|
"DEFAULT_LEADING_ACTION_DISPLAY": [
|
|
1857
1851
|
"none",
|
package/static/info_arch.json
CHANGED
|
@@ -20079,110 +20079,6 @@
|
|
|
20079
20079
|
],
|
|
20080
20080
|
"subcomponents": []
|
|
20081
20081
|
},
|
|
20082
|
-
{
|
|
20083
|
-
"fully_qualified_name": "Primer::OpenProject::Fieldset",
|
|
20084
|
-
"description": "",
|
|
20085
|
-
"accessibility_docs": null,
|
|
20086
|
-
"is_form_component": false,
|
|
20087
|
-
"is_published": true,
|
|
20088
|
-
"requires_js": false,
|
|
20089
|
-
"component": "OpenProject::Fieldset",
|
|
20090
|
-
"status": "alpha",
|
|
20091
|
-
"a11y_reviewed": false,
|
|
20092
|
-
"short_name": "OpenProjectFieldset",
|
|
20093
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/fieldset.rb",
|
|
20094
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/fieldset/default/",
|
|
20095
|
-
"parameters": [
|
|
20096
|
-
{
|
|
20097
|
-
"name": "legend_text",
|
|
20098
|
-
"type": "String",
|
|
20099
|
-
"default": "`nil`",
|
|
20100
|
-
"description": "A legend should be short and concise. The String will also be read by assistive technology."
|
|
20101
|
-
},
|
|
20102
|
-
{
|
|
20103
|
-
"name": "visually_hide_legend",
|
|
20104
|
-
"type": "Boolean",
|
|
20105
|
-
"default": "`false`",
|
|
20106
|
-
"description": "Controls if the legend is visible. If `true`, screen reader only text will be added."
|
|
20107
|
-
},
|
|
20108
|
-
{
|
|
20109
|
-
"name": "system_arguments",
|
|
20110
|
-
"type": "Hash",
|
|
20111
|
-
"default": "N/A",
|
|
20112
|
-
"description": "{{link_to_system_arguments_docs}}"
|
|
20113
|
-
}
|
|
20114
|
-
],
|
|
20115
|
-
"slots": [
|
|
20116
|
-
{
|
|
20117
|
-
"name": "legend",
|
|
20118
|
-
"description": null,
|
|
20119
|
-
"parameters": []
|
|
20120
|
-
}
|
|
20121
|
-
],
|
|
20122
|
-
"methods": [
|
|
20123
|
-
{
|
|
20124
|
-
"name": "legend_text",
|
|
20125
|
-
"description": "Returns the value of attribute legend_text.",
|
|
20126
|
-
"parameters": [],
|
|
20127
|
-
"return_types": []
|
|
20128
|
-
}
|
|
20129
|
-
],
|
|
20130
|
-
"previews": [
|
|
20131
|
-
{
|
|
20132
|
-
"preview_path": "primer/open_project/fieldset/default",
|
|
20133
|
-
"name": "default",
|
|
20134
|
-
"snapshot": "true",
|
|
20135
|
-
"skip_rules": {
|
|
20136
|
-
"wont_fix": [
|
|
20137
|
-
"region"
|
|
20138
|
-
],
|
|
20139
|
-
"will_fix": [
|
|
20140
|
-
"color-contrast"
|
|
20141
|
-
]
|
|
20142
|
-
}
|
|
20143
|
-
},
|
|
20144
|
-
{
|
|
20145
|
-
"preview_path": "primer/open_project/fieldset/with_legend_text",
|
|
20146
|
-
"name": "with_legend_text",
|
|
20147
|
-
"snapshot": "false",
|
|
20148
|
-
"skip_rules": {
|
|
20149
|
-
"wont_fix": [
|
|
20150
|
-
"region"
|
|
20151
|
-
],
|
|
20152
|
-
"will_fix": [
|
|
20153
|
-
"color-contrast"
|
|
20154
|
-
]
|
|
20155
|
-
}
|
|
20156
|
-
}
|
|
20157
|
-
],
|
|
20158
|
-
"subcomponents": []
|
|
20159
|
-
},
|
|
20160
|
-
{
|
|
20161
|
-
"fully_qualified_name": "Primer::OpenProject::Fieldset::LegendComponent",
|
|
20162
|
-
"description": "",
|
|
20163
|
-
"accessibility_docs": null,
|
|
20164
|
-
"is_form_component": false,
|
|
20165
|
-
"is_published": true,
|
|
20166
|
-
"requires_js": false,
|
|
20167
|
-
"component": "OpenProject::Fieldset::Legend",
|
|
20168
|
-
"status": "alpha",
|
|
20169
|
-
"a11y_reviewed": false,
|
|
20170
|
-
"short_name": "OpenProjectFieldsetLegend",
|
|
20171
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/fieldset/legend_component.rb",
|
|
20172
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/fieldset/legend/default/",
|
|
20173
|
-
"parameters": [],
|
|
20174
|
-
"slots": [],
|
|
20175
|
-
"methods": [
|
|
20176
|
-
{
|
|
20177
|
-
"name": "text",
|
|
20178
|
-
"description": "Returns the value of attribute text.",
|
|
20179
|
-
"parameters": [],
|
|
20180
|
-
"return_types": []
|
|
20181
|
-
}
|
|
20182
|
-
],
|
|
20183
|
-
"previews": [],
|
|
20184
|
-
"subcomponents": []
|
|
20185
|
-
},
|
|
20186
20082
|
{
|
|
20187
20083
|
"fully_qualified_name": "Primer::OpenProject::FilterableTreeView",
|
|
20188
20084
|
"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.",
|
package/static/previews.json
CHANGED
|
@@ -4371,40 +4371,6 @@
|
|
|
4371
4371
|
}
|
|
4372
4372
|
]
|
|
4373
4373
|
},
|
|
4374
|
-
{
|
|
4375
|
-
"name": "fieldset",
|
|
4376
|
-
"component": "OpenProject::Fieldset",
|
|
4377
|
-
"status": "alpha",
|
|
4378
|
-
"lookup_path": "primer/open_project/fieldset",
|
|
4379
|
-
"examples": [
|
|
4380
|
-
{
|
|
4381
|
-
"preview_path": "primer/open_project/fieldset/default",
|
|
4382
|
-
"name": "default",
|
|
4383
|
-
"snapshot": "true",
|
|
4384
|
-
"skip_rules": {
|
|
4385
|
-
"wont_fix": [
|
|
4386
|
-
"region"
|
|
4387
|
-
],
|
|
4388
|
-
"will_fix": [
|
|
4389
|
-
"color-contrast"
|
|
4390
|
-
]
|
|
4391
|
-
}
|
|
4392
|
-
},
|
|
4393
|
-
{
|
|
4394
|
-
"preview_path": "primer/open_project/fieldset/with_legend_text",
|
|
4395
|
-
"name": "with_legend_text",
|
|
4396
|
-
"snapshot": "false",
|
|
4397
|
-
"skip_rules": {
|
|
4398
|
-
"wont_fix": [
|
|
4399
|
-
"region"
|
|
4400
|
-
],
|
|
4401
|
-
"will_fix": [
|
|
4402
|
-
"color-contrast"
|
|
4403
|
-
]
|
|
4404
|
-
}
|
|
4405
|
-
}
|
|
4406
|
-
]
|
|
4407
|
-
},
|
|
4408
4374
|
{
|
|
4409
4375
|
"name": "file_tree_view",
|
|
4410
4376
|
"component": "FileTreeView",
|
package/static/statuses.json
CHANGED
|
@@ -151,8 +151,6 @@
|
|
|
151
151
|
"Primer::OpenProject::DragHandle": "open_project",
|
|
152
152
|
"Primer::OpenProject::FeedbackDialog": "open_project",
|
|
153
153
|
"Primer::OpenProject::FeedbackMessage": "open_project",
|
|
154
|
-
"Primer::OpenProject::Fieldset": "alpha",
|
|
155
|
-
"Primer::OpenProject::Fieldset::LegendComponent": "alpha",
|
|
156
154
|
"Primer::OpenProject::FilterableTreeView": "alpha",
|
|
157
155
|
"Primer::OpenProject::FilterableTreeView::SubTree": "alpha",
|
|
158
156
|
"Primer::OpenProject::FlexLayout": "open_project",
|