primer_view_components 0.43.1 → 0.43.2
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 +10 -0
- data/app/assets/styles/primer_view_components.css +1 -1
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/segmented_control.css +1 -1
- data/app/components/primer/alpha/segmented_control.css.map +1 -1
- data/app/components/primer/beta/button.css +1 -1
- data/app/components/primer/beta/button.css.map +1 -1
- data/app/components/primer/beta/truncate.css +1 -1
- data/app/components/primer/beta/truncate.css.map +1 -1
- data/app/controllers/primer/view_components/action_menu_controller.rb +52 -0
- data/app/controllers/primer/view_components/application_controller.rb +10 -0
- data/app/controllers/primer/view_components/auto_check_controller.rb +41 -0
- data/app/controllers/primer/view_components/auto_complete_test_controller.rb +55 -0
- data/app/controllers/primer/view_components/form_handler_controller.rb +31 -0
- data/app/controllers/primer/view_components/include_fragment_controller.rb +17 -0
- data/app/controllers/primer/view_components/multi_controller.rb +15 -0
- data/app/controllers/primer/view_components/nav_list_items_controller.rb +28 -0
- data/app/controllers/primer/view_components/select_panel_items_controller.rb +122 -0
- data/app/controllers/primer/view_components/toggle_switch_controller.rb +48 -0
- data/app/forms/auto_complete_form.rb +1 -1
- data/app/forms/immediate_validation_form.rb +3 -3
- data/app/lib/primer/forms/dsl/text_field_input.rb +1 -1
- data/app/views/primer/view_components/action_menu/deferred.html.erb +22 -0
- data/app/views/primer/view_components/action_menu/deferred_preload.html.erb +5 -0
- data/app/views/primer/view_components/action_menu/form_action.html.erb +2 -0
- data/app/views/primer/view_components/action_menu/landing.html.erb +3 -0
- data/app/views/primer/view_components/auto_check/_error_message.html.erb +1 -0
- data/app/views/primer/view_components/auto_check/_success_message.html.erb +1 -0
- data/app/views/primer/view_components/auto_check/_warning_message.html.erb +4 -0
- data/app/views/primer/view_components/auto_complete_test/index.html.erb +15 -0
- data/app/views/primer/view_components/auto_complete_test/no_results.html.erb +16 -0
- data/app/views/primer/view_components/form_handler/form_action.html.erb +1 -0
- data/app/views/primer/view_components/include_fragment/deferred.html.erb +3 -0
- data/app/views/primer/view_components/nav_list_items/index.html.erb +3 -0
- data/app/views/primer/view_components/select_panel_items/index.html.erb +15 -0
- data/lib/primer/view_components/engine.rb +4 -0
- data/lib/primer/view_components/version.rb +1 -1
- data/previews/primer/alpha/action_menu_preview/multiple_select_form.html.erb +1 -1
- data/previews/primer/alpha/action_menu_preview/single_select_form.html.erb +1 -1
- data/previews/primer/alpha/action_menu_preview/single_select_form_items.html.erb +2 -2
- data/previews/primer/alpha/action_menu_preview/with_actions.html.erb +2 -2
- data/previews/primer/alpha/action_menu_preview.rb +2 -2
- data/previews/primer/alpha/auto_complete_preview.rb +6 -6
- data/previews/primer/alpha/dialog_preview.rb +1 -1
- data/previews/primer/alpha/include_fragment_preview.rb +2 -2
- data/previews/primer/alpha/select_panel_preview/custom_loading_description.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/custom_loading_label.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/eventually_local_fetch.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/eventually_local_fetch_initial_failure.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/eventually_local_fetch_no_results.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/multiselect_form.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/playground.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/remote_fetch.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/remote_fetch_filter_failure.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/remote_fetch_form.html.erb +2 -2
- data/previews/primer/alpha/select_panel_preview/remote_fetch_initial_failure.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/remote_fetch_no_results.html.erb +1 -1
- data/previews/primer/alpha/select_panel_preview/single_select_form.html.erb +1 -1
- data/previews/primer/alpha/text_field_preview/input_group_leading_action_menu.html.erb +1 -1
- data/previews/primer/alpha/text_field_preview.rb +3 -3
- data/previews/primer/alpha/toggle_switch_preview.rb +11 -11
- data/previews/primer/beta/auto_complete_preview/with_submit_button.html.erb +1 -1
- data/previews/primer/beta/auto_complete_preview.rb +18 -18
- data/previews/primer/beta/nav_list_preview.rb +2 -2
- data/previews/primer/forms_preview/action_menu_form.html.erb +1 -1
- data/previews/primer/forms_preview/auto_complete_form.html.erb +1 -1
- data/previews/primer/forms_preview/example_toggle_switch_form.html.erb +2 -2
- data/previews/primer/forms_preview/multi_input_form.html.erb +1 -1
- data/previews/primer/forms_preview/select_form.html.erb +1 -1
- data/previews/primer/url_helpers.rb +1 -0
- metadata +25 -2
@@ -22,7 +22,7 @@ module Primer
|
|
22
22
|
# @param inset toggle
|
23
23
|
# @param monospace toggle
|
24
24
|
def playground(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, width: :auto, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id", inset: false, monospace: false)
|
25
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name, inset: inset, monospace: monospace)) do |component|
|
25
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name, inset: inset, monospace: monospace)) do |component|
|
26
26
|
component.with_leading_visual_icon(icon: :search)
|
27
27
|
end
|
28
28
|
end
|
@@ -43,7 +43,7 @@ module Primer
|
|
43
43
|
# @param inset toggle
|
44
44
|
# @param monospace toggle
|
45
45
|
def default(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, width: :auto, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id", inset: false, monospace: false)
|
46
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name, inset: inset, monospace: monospace)) do |component|
|
46
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name, inset: inset, monospace: monospace)) do |component|
|
47
47
|
component.with_leading_visual_icon(icon: :search)
|
48
48
|
end
|
49
49
|
end
|
@@ -93,7 +93,7 @@ module Primer
|
|
93
93
|
# @param list_id text
|
94
94
|
# @param input_name text
|
95
95
|
def leading_visual(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, width: :auto, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id")
|
96
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
96
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
97
97
|
component.with_leading_visual_icon(icon: :search)
|
98
98
|
end
|
99
99
|
end
|
@@ -113,7 +113,7 @@ module Primer
|
|
113
113
|
# @param list_id text
|
114
114
|
# @param input_name text
|
115
115
|
def trailing_action(label_text: "Select a fruit", show_clear_button: true, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, width: :auto, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id")
|
116
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name))
|
116
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name))
|
117
117
|
end
|
118
118
|
|
119
119
|
# @label Full width
|
@@ -131,7 +131,7 @@ module Primer
|
|
131
131
|
# @param list_id text
|
132
132
|
# @param input_name text
|
133
133
|
def full_width(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: true, width: :auto, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id")
|
134
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
134
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
135
135
|
component.with_leading_visual_icon(icon: :search)
|
136
136
|
end
|
137
137
|
end
|
@@ -151,7 +151,7 @@ module Primer
|
|
151
151
|
# @param list_id text
|
152
152
|
# @param input_name text
|
153
153
|
def visually_hide_label(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: true, placeholder: "Placeholder text", size: :medium, full_width: false, width: :auto, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id")
|
154
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
154
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
155
155
|
component.with_leading_visual_icon(icon: :search)
|
156
156
|
end
|
157
157
|
end
|
@@ -172,7 +172,7 @@ module Primer
|
|
172
172
|
# @param input_name text
|
173
173
|
# @snapshot
|
174
174
|
def small(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :small, full_width: false, width: :auto, disabled: false, invalid: false, input_id: "input-id-1", list_id: "list-id-1", input_name: "input-id-1")
|
175
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
175
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
176
176
|
component.with_leading_visual_icon(icon: :search)
|
177
177
|
end
|
178
178
|
end
|
@@ -191,7 +191,7 @@ module Primer
|
|
191
191
|
# @param input_name text
|
192
192
|
# @snapshot
|
193
193
|
def medium(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, width: :auto, disabled: false, invalid: false, input_id: "input-id-2", list_id: "list-id-2", input_name: "input-id-2")
|
194
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
194
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
195
195
|
component.with_leading_visual_icon(icon: :search)
|
196
196
|
end
|
197
197
|
end
|
@@ -210,7 +210,7 @@ module Primer
|
|
210
210
|
# @param input_name text
|
211
211
|
# @snapshot
|
212
212
|
def large(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :large, full_width: false, width: :auto, disabled: false, invalid: false, input_id: "input-id-3", list_id: "list-id-3", input_name: "input-id-3")
|
213
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
213
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
214
214
|
component.with_leading_visual_icon(icon: :search)
|
215
215
|
end
|
216
216
|
end
|
@@ -231,7 +231,7 @@ module Primer
|
|
231
231
|
# @param list_id text
|
232
232
|
# @param input_name text
|
233
233
|
def leading_visual_in_results(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, width: :auto, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id")
|
234
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path(visual: "leading"), show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name))
|
234
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.primer_view_components.autocomplete_index_path(visual: "leading"), show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name))
|
235
235
|
end
|
236
236
|
|
237
237
|
# @label Trailing visual in results
|
@@ -248,44 +248,44 @@ module Primer
|
|
248
248
|
# @param list_id text
|
249
249
|
# @param input_name text
|
250
250
|
def trailing_visual_in_results(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, width: :auto, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id")
|
251
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path(visual: "trailing"), show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name))
|
251
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.primer_view_components.autocomplete_index_path(visual: "trailing"), show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, width: width, disabled: disabled, invalid: invalid, input_name: input_name))
|
252
252
|
end
|
253
253
|
|
254
254
|
# @hidden
|
255
255
|
def with_non_visible_label
|
256
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.autocomplete_index_path, visually_hide_label: true))
|
256
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.primer_view_components.autocomplete_index_path, visually_hide_label: true))
|
257
257
|
end
|
258
258
|
|
259
259
|
# @hidden
|
260
260
|
def with_icon
|
261
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.autocomplete_index_path)) do |component|
|
261
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.primer_view_components.autocomplete_index_path)) do |component|
|
262
262
|
component.with_leading_visual_icon(icon: :search)
|
263
263
|
end
|
264
264
|
end
|
265
265
|
|
266
266
|
# @hidden
|
267
267
|
def show_clear_button
|
268
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.autocomplete_index_path, show_clear_button: true))
|
268
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: true))
|
269
269
|
end
|
270
270
|
|
271
271
|
# @hidden
|
272
272
|
def size_small
|
273
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.autocomplete_index_path, show_clear_button: false, size: :small))
|
273
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: false, size: :small))
|
274
274
|
end
|
275
275
|
|
276
276
|
# @hidden
|
277
277
|
def monospace
|
278
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.autocomplete_index_path, show_clear_button: false, monospace: true))
|
278
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: false, monospace: true))
|
279
279
|
end
|
280
280
|
|
281
281
|
# @hidden
|
282
282
|
def inset
|
283
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.autocomplete_index_path, show_clear_button: false, inset: true))
|
283
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.primer_view_components.autocomplete_index_path, show_clear_button: false, inset: true))
|
284
284
|
end
|
285
285
|
|
286
286
|
|
287
287
|
def no_results
|
288
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, width: :auto, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id", inset: false, monospace: false, src: UrlHelpers.autocomplete_no_results_path))
|
288
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, width: :auto, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id", inset: false, monospace: false, src: UrlHelpers.primer_view_components.autocomplete_no_results_path))
|
289
289
|
end
|
290
290
|
|
291
291
|
end
|
@@ -110,7 +110,7 @@ module Primer
|
|
110
110
|
group.with_heading(title: "My favorite foods")
|
111
111
|
group.with_item(label: "Popplers", href: "/foods/popplers")
|
112
112
|
group.with_item(label: "Slurm", href: "/foods/slurm")
|
113
|
-
group.with_show_more_item(label: "Show more foods", src: UrlHelpers.nav_list_items_path, pages: 2) do |item|
|
113
|
+
group.with_show_more_item(label: "Show more foods", src: UrlHelpers.primer_view_components.nav_list_items_path, pages: 2) do |item|
|
114
114
|
item.with_trailing_visual_icon(icon: :plus)
|
115
115
|
end
|
116
116
|
end
|
@@ -119,7 +119,7 @@ module Primer
|
|
119
119
|
group.with_heading(title: "My favorite snacks")
|
120
120
|
group.with_item(label: "Popplers", href: "/foods/popplers")
|
121
121
|
group.with_item(label: "Slurm", href: "/foods/slurm")
|
122
|
-
group.with_show_more_item(label: "Show more snacks", src: UrlHelpers.nav_list_items_path, pages: 4) do |item|
|
122
|
+
group.with_show_more_item(label: "Show more snacks", src: UrlHelpers.primer_view_components.nav_list_items_path, pages: 4) do |item|
|
123
123
|
item.with_trailing_visual_icon(icon: :plus)
|
124
124
|
end
|
125
125
|
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<%= render(ExampleToggleSwitchForm.new(label: "Good example", src: toggle_switch_index_path, id: "success-toggle")) %>
|
1
|
+
<%= render(ExampleToggleSwitchForm.new(label: "Good example", src: primer_view_components.toggle_switch_index_path, id: "success-toggle")) %>
|
2
2
|
<hr>
|
3
|
-
<%= render(ExampleToggleSwitchForm.new(label: "Bad example", src: toggle_switch_index_path(fail: true), id: "error-toggle")) %>
|
3
|
+
<%= render(ExampleToggleSwitchForm.new(label: "Bad example", src: primer_view_components.toggle_switch_index_path(fail: true), id: "error-toggle")) %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: primer_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.43.
|
4
|
+
version: 0.43.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub Open Source
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -506,6 +506,16 @@ files:
|
|
506
506
|
- app/components/primer/utils.d.ts
|
507
507
|
- app/components/primer/utils.js
|
508
508
|
- app/components/primer/utils.ts
|
509
|
+
- app/controllers/primer/view_components/action_menu_controller.rb
|
510
|
+
- app/controllers/primer/view_components/application_controller.rb
|
511
|
+
- app/controllers/primer/view_components/auto_check_controller.rb
|
512
|
+
- app/controllers/primer/view_components/auto_complete_test_controller.rb
|
513
|
+
- app/controllers/primer/view_components/form_handler_controller.rb
|
514
|
+
- app/controllers/primer/view_components/include_fragment_controller.rb
|
515
|
+
- app/controllers/primer/view_components/multi_controller.rb
|
516
|
+
- app/controllers/primer/view_components/nav_list_items_controller.rb
|
517
|
+
- app/controllers/primer/view_components/select_panel_items_controller.rb
|
518
|
+
- app/controllers/primer/view_components/toggle_switch_controller.rb
|
509
519
|
- app/forms/action_menu_form.rb
|
510
520
|
- app/forms/after_content_form.rb
|
511
521
|
- app/forms/after_content_form/after_content.html.erb
|
@@ -646,6 +656,19 @@ files:
|
|
646
656
|
- app/lib/primer/test_selector_helper.rb
|
647
657
|
- app/lib/primer/underline_nav_helper.rb
|
648
658
|
- app/lib/primer/view_helper.rb
|
659
|
+
- app/views/primer/view_components/action_menu/deferred.html.erb
|
660
|
+
- app/views/primer/view_components/action_menu/deferred_preload.html.erb
|
661
|
+
- app/views/primer/view_components/action_menu/form_action.html.erb
|
662
|
+
- app/views/primer/view_components/action_menu/landing.html.erb
|
663
|
+
- app/views/primer/view_components/auto_check/_error_message.html.erb
|
664
|
+
- app/views/primer/view_components/auto_check/_success_message.html.erb
|
665
|
+
- app/views/primer/view_components/auto_check/_warning_message.html.erb
|
666
|
+
- app/views/primer/view_components/auto_complete_test/index.html.erb
|
667
|
+
- app/views/primer/view_components/auto_complete_test/no_results.html.erb
|
668
|
+
- app/views/primer/view_components/form_handler/form_action.html.erb
|
669
|
+
- app/views/primer/view_components/include_fragment/deferred.html.erb
|
670
|
+
- app/views/primer/view_components/nav_list_items/index.html.erb
|
671
|
+
- app/views/primer/view_components/select_panel_items/index.html.erb
|
649
672
|
- lib/postcss_mixins/activeIndicatorLine.pcss
|
650
673
|
- lib/postcss_mixins/clearfix.pcss
|
651
674
|
- lib/postcss_mixins/focusBoxShadowInset.pcss
|