openproject-primer_view_components 0.86.2 → 0.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/components/primer/alpha/action_menu/action_menu_element.js +14 -5
- data/app/components/primer/alpha/action_menu/action_menu_element.ts +14 -4
- data/app/components/primer/alpha/select_panel_element.js +11 -1
- data/app/components/primer/alpha/select_panel_element.ts +11 -2
- data/app/components/primer/alpha/tree_view/tree_view.js +27 -11
- data/app/components/primer/alpha/tree_view/tree_view.ts +24 -9
- data/app/components/primer/open_project/avatar_fallback.js +1 -1
- data/app/components/primer/open_project/avatar_fallback.ts +1 -1
- data/app/components/primer/open_project/border_box/collapsible_header.js +1 -1
- data/app/components/primer/open_project/border_box/collapsible_header.ts +1 -1
- data/app/components/primer/open_project/collapsible_section.js +1 -1
- data/app/components/primer/open_project/collapsible_section.ts +1 -1
- data/app/components/primer/open_project/danger_dialog_form_helper.js +1 -1
- data/app/components/primer/open_project/danger_dialog_form_helper.ts +1 -1
- data/app/components/primer/open_project/fieldset.rb +2 -2
- data/app/components/primer/open_project/filterable_tree_view.js +2 -1
- data/app/components/primer/open_project/filterable_tree_view.rb +6 -5
- data/app/components/primer/open_project/filterable_tree_view.ts +3 -2
- data/app/components/primer/open_project/flex_layout.rb +2 -2
- data/app/components/primer/open_project/inline_message.rb +1 -1
- data/app/components/primer/open_project/input_group.html.erb +9 -0
- data/app/components/primer/open_project/input_group.rb +13 -0
- data/app/components/primer/open_project/page_header.rb +1 -1
- data/app/components/primer/open_project/page_header_element.js +1 -1
- data/app/components/primer/open_project/page_header_element.ts +1 -1
- data/app/components/primer/open_project/pagination.rb +1 -3
- data/app/components/primer/open_project/sub_header/{quick_filter.rb → quick_action_component.rb} +7 -1
- data/app/components/primer/open_project/sub_header.html.erb +2 -0
- data/app/components/primer/open_project/sub_header.rb +38 -24
- data/app/components/primer/open_project/sub_header_element.js +4 -3
- data/app/components/primer/open_project/sub_header_element.ts +4 -3
- data/app/components/primer/open_project/zen_mode_button.js +1 -1
- data/app/components/primer/open_project/zen_mode_button.ts +1 -1
- data/lib/primer/view_components/version.rb +2 -2
- data/previews/primer/alpha/select_panel_preview/with_dynamic_label.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/with_dynamic_label_and_aria_prefix.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview.rb +14 -4
- data/previews/primer/alpha/tree_view_preview/doubled_path.html.erb +12 -0
- data/previews/primer/alpha/tree_view_preview/form_input.html.erb +7 -7
- data/previews/primer/alpha/tree_view_preview.rb +6 -0
- data/previews/primer/open_project/filterable_tree_view_preview/custom_no_results_text.html.erb +1 -1
- data/previews/primer/open_project/input_group_preview.rb +9 -0
- data/previews/primer/open_project/sub_header_preview/quick_filters.html.erb +8 -0
- data/static/arguments.json +8 -8
- data/static/audited_at.json +1 -1
- data/static/constants.json +3 -3
- data/static/info_arch.json +33 -10
- data/static/previews.json +23 -10
- data/static/statuses.json +1 -1
- metadata +3 -2
|
@@ -40,7 +40,7 @@ module Primer
|
|
|
40
40
|
@mobile_actions ||= []
|
|
41
41
|
mobile_component = Primer::Beta::IconButton.new(display: MOBILE_ACTIONS_DISPLAY,
|
|
42
42
|
**icon_args)
|
|
43
|
-
@mobile_actions.push({ component: mobile_component, block: block})
|
|
43
|
+
@mobile_actions.push({ component: mobile_component, block: block })
|
|
44
44
|
|
|
45
45
|
Primer::OpenProject::SubHeader::Button.new(display: DESKTOP_ACTIONS_DISPLAY, **kwargs)
|
|
46
46
|
end
|
|
@@ -65,9 +65,9 @@ module Primer
|
|
|
65
65
|
mobile_component = Primer::OpenProject::SubHeader::Menu.new(icon_only: true,
|
|
66
66
|
display: MOBILE_ACTIONS_DISPLAY,
|
|
67
67
|
**kwargs)
|
|
68
|
-
@mobile_actions.push({ component: mobile_component, block: block})
|
|
68
|
+
@mobile_actions.push({ component: mobile_component, block: block })
|
|
69
69
|
|
|
70
|
-
Primer::OpenProject::SubHeader::Menu.new(icon_only: icon_only,display: DESKTOP_ACTIONS_DISPLAY, **kwargs)
|
|
70
|
+
Primer::OpenProject::SubHeader::Menu.new(icon_only: icon_only, display: DESKTOP_ACTIONS_DISPLAY, **kwargs)
|
|
71
71
|
},
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -101,7 +101,7 @@ module Primer
|
|
|
101
101
|
system_arguments[:data][:action] += " input:sub-header#toggleFilterInputClearButton focus:sub-header#toggleFilterInputClearButton"
|
|
102
102
|
end
|
|
103
103
|
|
|
104
|
-
trigger_display = @collapsed_search ? :inline_flex : [:inline_flex, :none]
|
|
104
|
+
trigger_display = @collapsed_search ? :inline_flex : [:inline_flex, :inline_flex, :none]
|
|
105
105
|
|
|
106
106
|
@collapsed_filter_trigger = Primer::Beta::IconButton.new(icon: system_arguments[:leading_visual][:icon],
|
|
107
107
|
display: trigger_display,
|
|
@@ -146,7 +146,7 @@ module Primer
|
|
|
146
146
|
if icon_only
|
|
147
147
|
Primer::Beta::IconButton.new(**icon_args)
|
|
148
148
|
else
|
|
149
|
-
@mobile_filter_button =
|
|
149
|
+
@mobile_filter_button = Primer::Beta::IconButton.new(display: MOBILE_ACTIONS_DISPLAY,
|
|
150
150
|
**icon_args)
|
|
151
151
|
|
|
152
152
|
Primer::OpenProject::SubHeader::Button.new(display: DESKTOP_ACTIONS_DISPLAY, **kwargs)
|
|
@@ -170,30 +170,42 @@ module Primer
|
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
#
|
|
174
|
-
|
|
173
|
+
# A slot for a generic sorting component. Will be rendered next to the search input
|
|
174
|
+
renders_one :quick_sort, lambda { |**kwargs|
|
|
175
|
+
deny_tag_argument(**kwargs)
|
|
176
|
+
|
|
177
|
+
QuickActionComponent.new(**kwargs)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
# A slot for a generic sorting component. Will be rendered next to the sorting button
|
|
181
|
+
renders_one :quick_group, lambda { |**kwargs|
|
|
182
|
+
deny_tag_argument(**kwargs)
|
|
183
|
+
|
|
184
|
+
QuickActionComponent.new(**kwargs)
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
# Quick filters shown in the left pane next to the search bar (0–5 items total across all types).
|
|
188
|
+
# Hidden on smaller screens when more than one `quick_filter` is provided. Requires `filter_button` when using more than one `quick_filter`.
|
|
175
189
|
# Supports ActionMenus, Buttons, IconButtons, SelectPanels, and SegmentedControls inside the block.
|
|
176
190
|
renders_many :quick_filters, lambda { |**kwargs|
|
|
177
191
|
deny_tag_argument(**kwargs)
|
|
178
|
-
kwargs[:tag] = :div
|
|
179
|
-
kwargs[:mr] ||= 2
|
|
180
192
|
|
|
181
|
-
|
|
193
|
+
QuickActionComponent.new(**kwargs)
|
|
182
194
|
}
|
|
183
195
|
|
|
184
196
|
renders_one :segmented_control, lambda { |**system_arguments, &block|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
deny_tag_argument(**system_arguments)
|
|
198
|
+
system_arguments[:mr] ||= 2
|
|
199
|
+
system_arguments = set_as_hidden_filter_target(system_arguments)
|
|
200
|
+
|
|
201
|
+
@segmented_control_block = block
|
|
202
|
+
@mobile_segmented_control = Primer::OpenProject::SubHeader::SegmentedControl.new(
|
|
203
|
+
hide_labels: true,
|
|
204
|
+
display: MOBILE_ACTIONS_DISPLAY,
|
|
205
|
+
**system_arguments
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
Primer::OpenProject::SubHeader::SegmentedControl.new(display: DESKTOP_ACTIONS_DISPLAY, **system_arguments)
|
|
197
209
|
}
|
|
198
210
|
|
|
199
211
|
renders_one :text, lambda { |**system_arguments|
|
|
@@ -234,12 +246,14 @@ module Primer
|
|
|
234
246
|
end
|
|
235
247
|
|
|
236
248
|
def before_render
|
|
249
|
+
all_quick_actions = [quick_sort, quick_group].compact + quick_filters
|
|
250
|
+
|
|
237
251
|
if quick_filters.size > 1 && filter_button.nil?
|
|
238
252
|
raise ArgumentError, "You must provide a filter_button when using quick_filters."
|
|
239
253
|
end
|
|
240
254
|
|
|
241
255
|
if quick_filters.size > 5
|
|
242
|
-
raise ArgumentError, "SubHeader supports a maximum of 5 quick_filters, got #{
|
|
256
|
+
raise ArgumentError, "SubHeader supports a maximum of 5 quick_filters, got #{all_quick_actions.size}."
|
|
243
257
|
end
|
|
244
258
|
|
|
245
259
|
if quick_filters.size > 1
|
|
@@ -250,7 +264,7 @@ module Primer
|
|
|
250
264
|
|
|
251
265
|
@system_arguments[:classes] = class_names(
|
|
252
266
|
@system_arguments[:classes],
|
|
253
|
-
"SubHeader--emptyLeftPane" => !segmented_control? && !filter_button && !filter_input &&
|
|
267
|
+
"SubHeader--emptyLeftPane" => !segmented_control? && !filter_button && !filter_input && all_quick_actions.empty?
|
|
254
268
|
)
|
|
255
269
|
end
|
|
256
270
|
|
|
@@ -24,9 +24,10 @@ let SubHeaderElement = class SubHeaderElement extends HTMLElement {
|
|
|
24
24
|
}
|
|
25
25
|
expandFilterInput() {
|
|
26
26
|
for (const item of this.shownItemsOnExpandedFilter) {
|
|
27
|
-
item.classList.remove('d-none');
|
|
27
|
+
item.classList.remove('d-none', 'd-sm-none');
|
|
28
28
|
}
|
|
29
29
|
for (const item of this.filterExpandButton) {
|
|
30
|
+
item.classList.remove('d-inline-flex', 'd-sm-inline-flex');
|
|
30
31
|
item.classList.add('d-none');
|
|
31
32
|
}
|
|
32
33
|
this.classList.add('SubHeader--expandedSearch');
|
|
@@ -37,7 +38,7 @@ let SubHeaderElement = class SubHeaderElement extends HTMLElement {
|
|
|
37
38
|
item.classList.remove('d-none');
|
|
38
39
|
}
|
|
39
40
|
for (const item of this.shownItemsOnExpandedFilter) {
|
|
40
|
-
item.classList.add('d-none');
|
|
41
|
+
item.classList.add('d-none', 'd-sm-none');
|
|
41
42
|
}
|
|
42
43
|
this.classList.remove('SubHeader--expandedSearch');
|
|
43
44
|
}
|
|
@@ -68,7 +69,7 @@ __decorate([
|
|
|
68
69
|
targets
|
|
69
70
|
], SubHeaderElement.prototype, "filterExpandButton", void 0);
|
|
70
71
|
SubHeaderElement = __decorate([
|
|
71
|
-
controller
|
|
72
|
+
controller('sub-header')
|
|
72
73
|
], SubHeaderElement);
|
|
73
74
|
if (!window.customElements.get('sub-header')) {
|
|
74
75
|
window.SubHeaderElement = SubHeaderElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {controller, target, targets} from '@github/catalyst'
|
|
2
2
|
|
|
3
|
-
@controller
|
|
3
|
+
@controller('sub-header')
|
|
4
4
|
class SubHeaderElement extends HTMLElement {
|
|
5
5
|
@target filterInput: HTMLInputElement
|
|
6
6
|
@targets shownItemsOnExpandedFilter: HTMLElement[]
|
|
@@ -29,9 +29,10 @@ class SubHeaderElement extends HTMLElement {
|
|
|
29
29
|
|
|
30
30
|
expandFilterInput() {
|
|
31
31
|
for (const item of this.shownItemsOnExpandedFilter) {
|
|
32
|
-
item.classList.remove('d-none')
|
|
32
|
+
item.classList.remove('d-none', 'd-sm-none')
|
|
33
33
|
}
|
|
34
34
|
for (const item of this.filterExpandButton) {
|
|
35
|
+
item.classList.remove('d-inline-flex', 'd-sm-inline-flex')
|
|
35
36
|
item.classList.add('d-none')
|
|
36
37
|
}
|
|
37
38
|
this.classList.add('SubHeader--expandedSearch')
|
|
@@ -43,7 +44,7 @@ class SubHeaderElement extends HTMLElement {
|
|
|
43
44
|
item.classList.remove('d-none')
|
|
44
45
|
}
|
|
45
46
|
for (const item of this.shownItemsOnExpandedFilter) {
|
|
46
|
-
item.classList.add('d-none')
|
|
47
|
+
item.classList.add('d-none', 'd-sm-none')
|
|
47
48
|
}
|
|
48
49
|
this.classList.remove('SubHeader--expandedSearch')
|
|
49
50
|
}
|
|
@@ -56,7 +56,7 @@ __decorate([
|
|
|
56
56
|
target
|
|
57
57
|
], ZenModeButtonElement.prototype, "button", void 0);
|
|
58
58
|
ZenModeButtonElement = __decorate([
|
|
59
|
-
controller
|
|
59
|
+
controller('zen-mode-button')
|
|
60
60
|
], ZenModeButtonElement);
|
|
61
61
|
if (!window.customElements.get('zen-mode-button')) {
|
|
62
62
|
window.ZenModeButtonElement = ZenModeButtonElement;
|
|
@@ -144,15 +144,25 @@ module Primer
|
|
|
144
144
|
# @label With dynamic label
|
|
145
145
|
#
|
|
146
146
|
# @param open_on_load toggle
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
# @param select_variant [Symbol] select [single, multiple]
|
|
148
|
+
def with_dynamic_label(open_on_load: false, select_variant: :single)
|
|
149
|
+
render_with_template(locals: {
|
|
150
|
+
open_on_load: open_on_load,
|
|
151
|
+
# .to_sym workaround for https://github.com/lookbook-hq/lookbook/issues/640
|
|
152
|
+
select_variant: select_variant.to_sym
|
|
153
|
+
})
|
|
149
154
|
end
|
|
150
155
|
|
|
151
156
|
# @label With dynamic label and aria prefix
|
|
152
157
|
#
|
|
153
158
|
# @param open_on_load toggle
|
|
154
|
-
|
|
155
|
-
|
|
159
|
+
# @param select_variant [Symbol] select [single, multiple]
|
|
160
|
+
def with_dynamic_label_and_aria_prefix(open_on_load: false, select_variant: :single)
|
|
161
|
+
render_with_template(locals: {
|
|
162
|
+
open_on_load: open_on_load,
|
|
163
|
+
# .to_sym workaround for https://github.com/lookbook-hq/lookbook/issues/640
|
|
164
|
+
select_variant: select_variant.to_sym
|
|
165
|
+
})
|
|
156
166
|
end
|
|
157
167
|
|
|
158
168
|
# @!endgroup
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<div style="max-width: 400px">
|
|
2
|
+
<%= render(Primer::Alpha::TreeView.new) do |tree_view| %>
|
|
3
|
+
<% tree_view.with_sub_tree(label: "src", expanded: true, select_variant: :single) do |sub_tree| %>
|
|
4
|
+
<% sub_tree.with_leaf(label: "button.rb", select_variant: :single) %>
|
|
5
|
+
<% sub_tree.with_leaf(label: "icon_button.rb", current: true, select_variant: :single) %>
|
|
6
|
+
<% end %>
|
|
7
|
+
|
|
8
|
+
<% tree_view.with_leaf(label: "action_menu.rb", select_variant: :single) %>
|
|
9
|
+
<% tree_view.with_leaf(label: "action_menu.rb", select_variant: :single) %>
|
|
10
|
+
<% tree_view.with_leaf(label: "action_menu.rb", select_variant: :single) %>
|
|
11
|
+
<% end %>
|
|
12
|
+
</div>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<%= form_with(url: primer_view_components.generic_form_submission_path(format: :json)) do |f| %>
|
|
2
2
|
<%= render(Primer::Alpha::Stack.new) do %>
|
|
3
3
|
<%= render(Primer::Alpha::TreeView.new(form_arguments: { builder: f, name: "folder_structure" })) do |tree| %>
|
|
4
|
-
<% tree.with_sub_tree(label: "src", expanded: expanded, select_variant: select_variant, value: 0) do |sub_tree| %>
|
|
5
|
-
<% sub_tree.with_leaf(label: "button.rb", select_variant: select_variant, value: 1, checked: true) %>
|
|
6
|
-
<% sub_tree.with_leaf(label: "icon_button.rb", current: true, select_variant: select_variant, value: 2) %>
|
|
4
|
+
<% tree.with_sub_tree(label: "src", expanded: expanded, select_variant: select_variant, value: 0, data: { node_id: "src" }) do |sub_tree| %>
|
|
5
|
+
<% sub_tree.with_leaf(label: "button.rb", select_variant: select_variant, value: 1, checked: true, data: { node_id: "src-button-rb" }) %>
|
|
6
|
+
<% sub_tree.with_leaf(label: "icon_button.rb", current: true, select_variant: select_variant, value: 2, data: { node_id: "src-icon-button-rb" }) %>
|
|
7
7
|
<% end %>
|
|
8
8
|
|
|
9
|
-
<% tree.with_leaf(label: "action_menu.rb", select_variant: select_variant, value: 3) %>
|
|
10
|
-
<% tree.with_sub_tree(label: "Docs & legal requirements", select_variant: select_variant, value: 4) do |sub_tree| %>
|
|
11
|
-
<% sub_tree.with_leaf(label: "Readme.md", select_variant: select_variant, value: 5) %>
|
|
12
|
-
<% sub_tree.with_leaf(label: "Copyright.md", select_variant: select_variant, value: 6) %>
|
|
9
|
+
<% tree.with_leaf(label: "action_menu.rb", select_variant: select_variant, value: 3, data: { node_id: "action-menu-rb" }) %>
|
|
10
|
+
<% tree.with_sub_tree(label: "Docs & legal requirements", select_variant: select_variant, value: 4, data: { node_id: "docs" }) do |sub_tree| %>
|
|
11
|
+
<% sub_tree.with_leaf(label: "Readme.md", select_variant: select_variant, value: 5, data: { node_id: "docs-readme-md" }) %>
|
|
12
|
+
<% sub_tree.with_leaf(label: "Copyright.md", select_variant: select_variant, value: 6, data: { node_id: "docs-copyright-md" }) %>
|
|
13
13
|
<% end %>
|
|
14
14
|
<% end %>
|
|
15
15
|
|
data/previews/primer/open_project/filterable_tree_view_preview/custom_no_results_text.html.erb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%= render(Primer::OpenProject::FilterableTreeView.new(
|
|
2
|
-
filter_input_arguments: {placeholder: "Search me!",
|
|
2
|
+
filter_input_arguments: {placeholder: "Search me!", visually_hide_label: true},
|
|
3
3
|
no_results_node_arguments: { label: "All wizards and witches have left the building" })) do |tree| %>
|
|
4
4
|
<% tree.with_sub_tree(label: "Students", expanded: expanded) do |hogwarts| %>
|
|
5
5
|
<% hogwarts.with_sub_tree(label: "Ravenclaw", expanded: expanded) do |ravenclaw| %>
|
|
@@ -71,6 +71,15 @@ module Primer
|
|
|
71
71
|
menu.with_caption { "Some caption" }
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
|
+
|
|
75
|
+
# @label With error message
|
|
76
|
+
# @snapshot
|
|
77
|
+
def with_error_message
|
|
78
|
+
render(Primer::OpenProject::InputGroup.new) do |menu|
|
|
79
|
+
menu.with_text_input(name: "a name", label: "My input group", validation_message: "Custom validation message", value: "Copyable value")
|
|
80
|
+
menu.with_trailing_action_clipboard_copy_button(id: "button", value: "Copyable value", aria: { label: "Copy some text" })
|
|
81
|
+
end
|
|
82
|
+
end
|
|
74
83
|
end
|
|
75
84
|
end
|
|
76
85
|
end
|
|
@@ -5,6 +5,14 @@
|
|
|
5
5
|
"All filters"
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
+
component.with_quick_sort do
|
|
9
|
+
render(Primer::Beta::IconButton.new(icon: :"sort-desc", "aria-label": "Sort"))
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
component.with_quick_group do
|
|
13
|
+
render(Primer::Beta::IconButton.new(icon: :rows, "aria-label": "Group"))
|
|
14
|
+
end
|
|
15
|
+
|
|
8
16
|
component.with_quick_filter do
|
|
9
17
|
render(Primer::Alpha::SegmentedControl.new("aria-label": "File view")) do |component|
|
|
10
18
|
component.with_item(label: "Monthly", selected: true)
|
data/static/arguments.json
CHANGED
|
@@ -6188,25 +6188,25 @@
|
|
|
6188
6188
|
{
|
|
6189
6189
|
"name": "filter_input_arguments",
|
|
6190
6190
|
"type": "Hash",
|
|
6191
|
-
"default": "`
|
|
6191
|
+
"default": "`{}`",
|
|
6192
6192
|
"description": "Arguments that will be passed to the [TextField](/components/alpha/textfield) component."
|
|
6193
6193
|
},
|
|
6194
6194
|
{
|
|
6195
6195
|
"name": "filter_mode_control_arguments",
|
|
6196
6196
|
"type": "Hash",
|
|
6197
|
-
"default": "`
|
|
6197
|
+
"default": "`{}`",
|
|
6198
6198
|
"description": "Arguments that will be passed to the [SegmentedControl](/components/alpha/segmentedcontrol) component."
|
|
6199
6199
|
},
|
|
6200
6200
|
{
|
|
6201
6201
|
"name": "include_sub_items_check_box_arguments",
|
|
6202
6202
|
"type": "Hash",
|
|
6203
|
-
"default": "`
|
|
6203
|
+
"default": "`{}`",
|
|
6204
6204
|
"description": "Arguments that will be passed to the [CheckBox](/components/alpha/checkbox) component."
|
|
6205
6205
|
},
|
|
6206
6206
|
{
|
|
6207
6207
|
"name": "no_results_node_arguments",
|
|
6208
6208
|
"type": "Hash",
|
|
6209
|
-
"default": "`
|
|
6209
|
+
"default": "`{}`",
|
|
6210
6210
|
"description": "Arguments that will be passed to a [TreeView::LeafNode](/components/alpha/treeviewleafnode) component that appears when no items match the filter criteria."
|
|
6211
6211
|
}
|
|
6212
6212
|
]
|
|
@@ -6600,12 +6600,12 @@
|
|
|
6600
6600
|
]
|
|
6601
6601
|
},
|
|
6602
6602
|
{
|
|
6603
|
-
"component": "OpenProject::SubHeader::
|
|
6603
|
+
"component": "OpenProject::SubHeader::QuickAction",
|
|
6604
6604
|
"status": "open_project",
|
|
6605
6605
|
"a11y_reviewed": false,
|
|
6606
|
-
"short_name": "
|
|
6607
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/sub_header/
|
|
6608
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/sub_header/
|
|
6606
|
+
"short_name": "OpenProjectSubHeaderQuickAction",
|
|
6607
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/sub_header/quick_action_component.rb",
|
|
6608
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/sub_header/quick_action/default/",
|
|
6609
6609
|
"parameters": []
|
|
6610
6610
|
},
|
|
6611
6611
|
{
|
data/static/audited_at.json
CHANGED
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"Primer::OpenProject::SubHeader::Button": "",
|
|
174
174
|
"Primer::OpenProject::SubHeader::ButtonGroup": "",
|
|
175
175
|
"Primer::OpenProject::SubHeader::Menu": "",
|
|
176
|
-
"Primer::OpenProject::SubHeader::
|
|
176
|
+
"Primer::OpenProject::SubHeader::QuickActionComponent": "",
|
|
177
177
|
"Primer::OpenProject::SubHeader::SegmentedControl": "2023-02-01",
|
|
178
178
|
"Primer::OpenProject::ZenModeButton": "",
|
|
179
179
|
"Primer::Tooltip": "",
|
data/static/constants.json
CHANGED
|
@@ -1996,7 +1996,7 @@
|
|
|
1996
1996
|
"none"
|
|
1997
1997
|
],
|
|
1998
1998
|
"Menu": "Primer::OpenProject::SubHeader::Menu",
|
|
1999
|
-
"
|
|
1999
|
+
"QuickActionComponent": "Primer::OpenProject::SubHeader::QuickActionComponent",
|
|
2000
2000
|
"SHOWN_FILTER_TARGET_SELECTOR": "sub-header.shownItemsOnExpandedFilter",
|
|
2001
2001
|
"SegmentedControl": "Primer::OpenProject::SubHeader::SegmentedControl"
|
|
2002
2002
|
},
|
|
@@ -2009,8 +2009,8 @@
|
|
|
2009
2009
|
"Primer::OpenProject::SubHeader::Menu": {
|
|
2010
2010
|
"GeneratedSlotMethods": "Primer::OpenProject::SubHeader::Menu::GeneratedSlotMethods"
|
|
2011
2011
|
},
|
|
2012
|
-
"Primer::OpenProject::SubHeader::
|
|
2013
|
-
"GeneratedSlotMethods": "Primer::OpenProject::SubHeader::
|
|
2012
|
+
"Primer::OpenProject::SubHeader::QuickActionComponent": {
|
|
2013
|
+
"GeneratedSlotMethods": "Primer::OpenProject::SubHeader::QuickActionComponent::GeneratedSlotMethods"
|
|
2014
2014
|
},
|
|
2015
2015
|
"Primer::OpenProject::SubHeader::SegmentedControl": {
|
|
2016
2016
|
"GeneratedSlotMethods": "Primer::OpenProject::SubHeader::SegmentedControl::GeneratedSlotMethods"
|
data/static/info_arch.json
CHANGED
|
@@ -20383,25 +20383,25 @@
|
|
|
20383
20383
|
{
|
|
20384
20384
|
"name": "filter_input_arguments",
|
|
20385
20385
|
"type": "Hash",
|
|
20386
|
-
"default": "`
|
|
20386
|
+
"default": "`{}`",
|
|
20387
20387
|
"description": "Arguments that will be passed to the {{#link_to_component}}Primer::Alpha::TextField{{/link_to_component}} component."
|
|
20388
20388
|
},
|
|
20389
20389
|
{
|
|
20390
20390
|
"name": "filter_mode_control_arguments",
|
|
20391
20391
|
"type": "Hash",
|
|
20392
|
-
"default": "`
|
|
20392
|
+
"default": "`{}`",
|
|
20393
20393
|
"description": "Arguments that will be passed to the {{#link_to_component}}Primer::Alpha::SegmentedControl{{/link_to_component}} component."
|
|
20394
20394
|
},
|
|
20395
20395
|
{
|
|
20396
20396
|
"name": "include_sub_items_check_box_arguments",
|
|
20397
20397
|
"type": "Hash",
|
|
20398
|
-
"default": "`
|
|
20398
|
+
"default": "`{}`",
|
|
20399
20399
|
"description": "Arguments that will be passed to the {{#link_to_component}}Primer::Alpha::CheckBox{{/link_to_component}} component."
|
|
20400
20400
|
},
|
|
20401
20401
|
{
|
|
20402
20402
|
"name": "no_results_node_arguments",
|
|
20403
20403
|
"type": "Hash",
|
|
20404
|
-
"default": "`
|
|
20404
|
+
"default": "`{}`",
|
|
20405
20405
|
"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."
|
|
20406
20406
|
}
|
|
20407
20407
|
],
|
|
@@ -21067,6 +21067,19 @@
|
|
|
21067
21067
|
"color-contrast"
|
|
21068
21068
|
]
|
|
21069
21069
|
}
|
|
21070
|
+
},
|
|
21071
|
+
{
|
|
21072
|
+
"preview_path": "primer/open_project/input_group/with_error_message",
|
|
21073
|
+
"name": "with_error_message",
|
|
21074
|
+
"snapshot": "true",
|
|
21075
|
+
"skip_rules": {
|
|
21076
|
+
"wont_fix": [
|
|
21077
|
+
"region"
|
|
21078
|
+
],
|
|
21079
|
+
"will_fix": [
|
|
21080
|
+
"color-contrast"
|
|
21081
|
+
]
|
|
21082
|
+
}
|
|
21070
21083
|
}
|
|
21071
21084
|
],
|
|
21072
21085
|
"subcomponents": []
|
|
@@ -21800,9 +21813,19 @@
|
|
|
21800
21813
|
"description": "A button or custom content that will render on the left-hand side of the component, next to the filter input.\n\nTo render a button, call the `with_filter_button` method, which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Button{{/link_to_component}}.\n\nTo render custom content, call the `with_filter_component` method and pass a block that returns HTML.",
|
|
21801
21814
|
"parameters": []
|
|
21802
21815
|
},
|
|
21816
|
+
{
|
|
21817
|
+
"name": "quick_sort",
|
|
21818
|
+
"description": "A slot for a generic sorting component. Will be rendered next to the search input",
|
|
21819
|
+
"parameters": []
|
|
21820
|
+
},
|
|
21821
|
+
{
|
|
21822
|
+
"name": "quick_group",
|
|
21823
|
+
"description": "A slot for a generic sorting component. Will be rendered next to the sorting button",
|
|
21824
|
+
"parameters": []
|
|
21825
|
+
},
|
|
21803
21826
|
{
|
|
21804
21827
|
"name": "quick_filters",
|
|
21805
|
-
"description": "Quick filters shown in the left pane next to the search bar (0–5 items).\nHidden on
|
|
21828
|
+
"description": "Quick filters shown in the left pane next to the search bar (0–5 items total across all types).\nHidden on smaller screens when more than one `quick_filter` is provided. Requires `filter_button` when using more than one `quick_filter`.\nSupports ActionMenus, Buttons, IconButtons, SelectPanels, and SegmentedControls inside the block.",
|
|
21806
21829
|
"parameters": []
|
|
21807
21830
|
},
|
|
21808
21831
|
{
|
|
@@ -22108,18 +22131,18 @@
|
|
|
22108
22131
|
"subcomponents": []
|
|
22109
22132
|
},
|
|
22110
22133
|
{
|
|
22111
|
-
"fully_qualified_name": "Primer::OpenProject::SubHeader::
|
|
22134
|
+
"fully_qualified_name": "Primer::OpenProject::SubHeader::QuickActionComponent",
|
|
22112
22135
|
"description": "Thin wrapper for quick filter slots that defers BaseComponent construction to render time,\nallowing system arguments (e.g. display) to be mutated in before_render.\nDo not use standalone",
|
|
22113
22136
|
"accessibility_docs": null,
|
|
22114
22137
|
"is_form_component": false,
|
|
22115
22138
|
"is_published": true,
|
|
22116
22139
|
"requires_js": false,
|
|
22117
|
-
"component": "OpenProject::SubHeader::
|
|
22140
|
+
"component": "OpenProject::SubHeader::QuickAction",
|
|
22118
22141
|
"status": "open_project",
|
|
22119
22142
|
"a11y_reviewed": false,
|
|
22120
|
-
"short_name": "
|
|
22121
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/sub_header/
|
|
22122
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/sub_header/
|
|
22143
|
+
"short_name": "OpenProjectSubHeaderQuickAction",
|
|
22144
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/sub_header/quick_action_component.rb",
|
|
22145
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/sub_header/quick_action/default/",
|
|
22123
22146
|
"parameters": [],
|
|
22124
22147
|
"slots": [],
|
|
22125
22148
|
"methods": [],
|
data/static/previews.json
CHANGED
|
@@ -4889,12 +4889,12 @@
|
|
|
4889
4889
|
},
|
|
4890
4890
|
{
|
|
4891
4891
|
"name": "heading",
|
|
4892
|
-
"component": "Heading",
|
|
4893
|
-
"status": "
|
|
4894
|
-
"lookup_path": "primer/
|
|
4892
|
+
"component": "OpenProject::Heading",
|
|
4893
|
+
"status": "open_project",
|
|
4894
|
+
"lookup_path": "primer/open_project/heading",
|
|
4895
4895
|
"examples": [
|
|
4896
4896
|
{
|
|
4897
|
-
"preview_path": "primer/
|
|
4897
|
+
"preview_path": "primer/open_project/heading/playground",
|
|
4898
4898
|
"name": "playground",
|
|
4899
4899
|
"snapshot": "false",
|
|
4900
4900
|
"skip_rules": {
|
|
@@ -4907,7 +4907,7 @@
|
|
|
4907
4907
|
}
|
|
4908
4908
|
},
|
|
4909
4909
|
{
|
|
4910
|
-
"preview_path": "primer/
|
|
4910
|
+
"preview_path": "primer/open_project/heading/default",
|
|
4911
4911
|
"name": "default",
|
|
4912
4912
|
"snapshot": "true",
|
|
4913
4913
|
"skip_rules": {
|
|
@@ -4923,12 +4923,12 @@
|
|
|
4923
4923
|
},
|
|
4924
4924
|
{
|
|
4925
4925
|
"name": "heading",
|
|
4926
|
-
"component": "
|
|
4927
|
-
"status": "
|
|
4928
|
-
"lookup_path": "primer/
|
|
4926
|
+
"component": "Heading",
|
|
4927
|
+
"status": "beta",
|
|
4928
|
+
"lookup_path": "primer/beta/heading",
|
|
4929
4929
|
"examples": [
|
|
4930
4930
|
{
|
|
4931
|
-
"preview_path": "primer/
|
|
4931
|
+
"preview_path": "primer/beta/heading/playground",
|
|
4932
4932
|
"name": "playground",
|
|
4933
4933
|
"snapshot": "false",
|
|
4934
4934
|
"skip_rules": {
|
|
@@ -4941,7 +4941,7 @@
|
|
|
4941
4941
|
}
|
|
4942
4942
|
},
|
|
4943
4943
|
{
|
|
4944
|
-
"preview_path": "primer/
|
|
4944
|
+
"preview_path": "primer/beta/heading/default",
|
|
4945
4945
|
"name": "default",
|
|
4946
4946
|
"snapshot": "true",
|
|
4947
4947
|
"skip_rules": {
|
|
@@ -5260,6 +5260,19 @@
|
|
|
5260
5260
|
"color-contrast"
|
|
5261
5261
|
]
|
|
5262
5262
|
}
|
|
5263
|
+
},
|
|
5264
|
+
{
|
|
5265
|
+
"preview_path": "primer/open_project/input_group/with_error_message",
|
|
5266
|
+
"name": "with_error_message",
|
|
5267
|
+
"snapshot": "true",
|
|
5268
|
+
"skip_rules": {
|
|
5269
|
+
"wont_fix": [
|
|
5270
|
+
"region"
|
|
5271
|
+
],
|
|
5272
|
+
"will_fix": [
|
|
5273
|
+
"color-contrast"
|
|
5274
|
+
]
|
|
5275
|
+
}
|
|
5263
5276
|
}
|
|
5264
5277
|
]
|
|
5265
5278
|
},
|
data/static/statuses.json
CHANGED
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"Primer::OpenProject::SubHeader::Button": "open_project",
|
|
174
174
|
"Primer::OpenProject::SubHeader::ButtonGroup": "open_project",
|
|
175
175
|
"Primer::OpenProject::SubHeader::Menu": "open_project",
|
|
176
|
-
"Primer::OpenProject::SubHeader::
|
|
176
|
+
"Primer::OpenProject::SubHeader::QuickActionComponent": "open_project",
|
|
177
177
|
"Primer::OpenProject::SubHeader::SegmentedControl": "open_project",
|
|
178
178
|
"Primer::OpenProject::ZenModeButton": "open_project",
|
|
179
179
|
"Primer::Tooltip": "deprecated",
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openproject-primer_view_components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.88.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitHub Open Source
|
|
@@ -689,7 +689,7 @@ files:
|
|
|
689
689
|
- app/components/primer/open_project/sub_header/button.rb
|
|
690
690
|
- app/components/primer/open_project/sub_header/button_group.rb
|
|
691
691
|
- app/components/primer/open_project/sub_header/menu.rb
|
|
692
|
-
- app/components/primer/open_project/sub_header/
|
|
692
|
+
- app/components/primer/open_project/sub_header/quick_action_component.rb
|
|
693
693
|
- app/components/primer/open_project/sub_header/segmented_control.rb
|
|
694
694
|
- app/components/primer/open_project/sub_header_element.d.ts
|
|
695
695
|
- app/components/primer/open_project/sub_header_element.js
|
|
@@ -1143,6 +1143,7 @@ files:
|
|
|
1143
1143
|
- previews/primer/alpha/tree_view_preview/async_alpha.html.erb
|
|
1144
1144
|
- previews/primer/alpha/tree_view_preview/buttons.html.erb
|
|
1145
1145
|
- previews/primer/alpha/tree_view_preview/default.html.erb
|
|
1146
|
+
- previews/primer/alpha/tree_view_preview/doubled_path.html.erb
|
|
1146
1147
|
- previews/primer/alpha/tree_view_preview/empty.html.erb
|
|
1147
1148
|
- previews/primer/alpha/tree_view_preview/form_input.html.erb
|
|
1148
1149
|
- previews/primer/alpha/tree_view_preview/leaf_node_playground.html.erb
|