primer_view_components 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +3 -3
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_list/form_wrapper.html.erb +10 -0
- data/app/components/primer/alpha/action_list/form_wrapper.rb +61 -0
- data/app/components/primer/alpha/action_list/item.html.erb +41 -36
- data/app/components/primer/alpha/action_list/item.rb +16 -2
- data/app/components/primer/alpha/action_list.css +1 -1
- data/app/components/primer/alpha/action_list.css.map +1 -1
- data/app/components/primer/alpha/action_list.html.erb +5 -0
- data/app/components/primer/alpha/action_list.pcss +37 -37
- data/app/components/primer/alpha/action_list.rb +17 -0
- data/app/components/primer/alpha/action_menu/action_menu_element.d.ts +7 -1
- data/app/components/primer/alpha/action_menu/action_menu_element.js +55 -3
- data/app/components/primer/alpha/action_menu/action_menu_element.ts +70 -2
- data/app/components/primer/alpha/action_menu/list.rb +9 -11
- data/app/components/primer/alpha/action_menu.rb +50 -12
- data/app/components/primer/alpha/auto_complete.css +1 -1
- data/app/components/primer/alpha/auto_complete.css.map +1 -1
- data/app/components/primer/alpha/auto_complete.pcss +2 -2
- data/app/components/primer/alpha/banner.css +1 -1
- data/app/components/primer/alpha/banner.css.map +1 -1
- data/app/components/primer/alpha/banner.pcss +7 -7
- data/app/components/primer/alpha/dialog.css +1 -1
- data/app/components/primer/alpha/dialog.css.map +1 -1
- data/app/components/primer/alpha/dialog.pcss +33 -32
- data/app/components/primer/alpha/dropdown.css +1 -1
- data/app/components/primer/alpha/dropdown.css.map +1 -1
- data/app/components/primer/alpha/dropdown.pcss +12 -11
- data/app/components/primer/alpha/layout.css +1 -1
- data/app/components/primer/alpha/layout.css.map +1 -1
- data/app/components/primer/alpha/layout.pcss +4 -4
- data/app/components/primer/alpha/menu.css +1 -1
- data/app/components/primer/alpha/menu.css.map +1 -1
- data/app/components/primer/alpha/menu.pcss +20 -20
- 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/alpha/segmented_control.pcss +27 -38
- data/app/components/primer/alpha/tab_nav.css +1 -1
- data/app/components/primer/alpha/tab_nav.css.map +1 -1
- data/app/components/primer/alpha/tab_nav.pcss +12 -12
- data/app/components/primer/alpha/text_field.css +3 -3
- data/app/components/primer/alpha/text_field.css.map +1 -1
- data/app/components/primer/alpha/text_field.pcss +74 -88
- data/app/components/primer/alpha/toggle_switch.css +1 -1
- data/app/components/primer/alpha/toggle_switch.css.map +1 -1
- data/app/components/primer/alpha/toggle_switch.pcss +9 -9
- data/app/components/primer/alpha/underline_nav.css +1 -1
- data/app/components/primer/alpha/underline_nav.css.map +1 -1
- data/app/components/primer/alpha/underline_nav.pcss +7 -7
- data/app/components/primer/beta/auto_complete/item.html.erb +9 -9
- data/app/components/primer/beta/auto_complete/item.rb +17 -13
- data/app/components/primer/beta/auto_complete.rb +1 -1
- data/app/components/primer/beta/avatar.css +1 -1
- data/app/components/primer/beta/avatar.css.map +1 -1
- data/app/components/primer/beta/avatar.pcss +2 -2
- data/app/components/primer/beta/avatar_stack.css +1 -1
- data/app/components/primer/beta/avatar_stack.css.map +1 -1
- data/app/components/primer/beta/avatar_stack.pcss +5 -5
- data/app/components/primer/beta/blankslate.css +1 -1
- data/app/components/primer/beta/blankslate.css.map +1 -1
- data/app/components/primer/beta/blankslate.pcss +13 -13
- data/app/components/primer/beta/border_box.css +1 -1
- data/app/components/primer/beta/border_box.css.json +1 -1
- data/app/components/primer/beta/border_box.css.map +1 -1
- data/app/components/primer/beta/border_box.pcss +41 -39
- data/app/components/primer/beta/button.css +1 -1
- data/app/components/primer/beta/button.css.map +1 -1
- data/app/components/primer/beta/button.pcss +25 -25
- data/app/components/primer/beta/counter.css +1 -1
- data/app/components/primer/beta/counter.css.map +1 -1
- data/app/components/primer/beta/counter.pcss +3 -3
- data/app/components/primer/beta/flash.css +1 -1
- data/app/components/primer/beta/flash.css.map +1 -1
- data/app/components/primer/beta/flash.pcss +10 -11
- data/app/components/primer/beta/label.css +1 -1
- data/app/components/primer/beta/label.css.map +1 -1
- data/app/components/primer/beta/label.pcss +2 -2
- data/app/components/primer/beta/popover.css +1 -1
- data/app/components/primer/beta/popover.css.map +1 -1
- data/app/components/primer/beta/popover.pcss +4 -4
- data/app/components/primer/beta/state.css +1 -1
- data/app/components/primer/beta/state.css.map +1 -1
- data/app/components/primer/beta/state.pcss +5 -5
- data/app/components/primer/beta/subhead.css +1 -1
- data/app/components/primer/beta/subhead.css.map +1 -1
- data/app/components/primer/beta/subhead.pcss +4 -4
- data/app/components/primer/beta/timeline_item.css +1 -1
- data/app/components/primer/beta/timeline_item.css.map +1 -1
- data/app/components/primer/beta/timeline_item.pcss +13 -13
- data/app/components/primer/beta/truncate.css +1 -1
- data/app/components/primer/beta/truncate.css.map +1 -1
- data/app/components/primer/beta/truncate.pcss +1 -1
- data/lib/postcss_mixins/activeIndicatorLine.pcss +1 -1
- data/lib/primer/view_components/linters/disallow_component_css_counter.rb +1 -1
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/primer/yard/component_manifest.rb +1 -0
- data/previews/primer/alpha/action_menu_preview/multiple_select_form.html.erb +13 -0
- data/previews/primer/alpha/action_menu_preview/single_select_form.html.erb +13 -0
- data/previews/primer/alpha/action_menu_preview/submitting_forms.html.erb +15 -0
- data/previews/primer/alpha/action_menu_preview.rb +46 -2
- data/static/arguments.json +37 -2
- data/static/audited_at.json +1 -0
- data/static/constants.json +18 -1
- data/static/info_arch.json +102 -17
- data/static/previews.json +20 -0
- data/static/statuses.json +1 -0
- metadata +7 -2
data/static/info_arch.json
CHANGED
@@ -45,6 +45,12 @@
|
|
45
45
|
"default": "`:none`",
|
46
46
|
"description": "How items may be selected in the list. One of `:multiple`, `:multiple_checkbox`, `:none`, or `:single`."
|
47
47
|
},
|
48
|
+
{
|
49
|
+
"name": "form_arguments",
|
50
|
+
"type": "Hash",
|
51
|
+
"default": "`{}`",
|
52
|
+
"description": "Allows an `ActionList` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission. *NOTE*: Consider using an {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} instead of using this feature directly."
|
53
|
+
},
|
48
54
|
{
|
49
55
|
"name": "system_arguments",
|
50
56
|
"type": "Hash",
|
@@ -260,6 +266,12 @@
|
|
260
266
|
"default": "`{}`",
|
261
267
|
"description": "{{link_to_system_arguments_docs}} used to construct the item's anchor or button tag."
|
262
268
|
},
|
269
|
+
{
|
270
|
+
"name": "form_arguments",
|
271
|
+
"type": "Hash",
|
272
|
+
"default": "`{}`",
|
273
|
+
"description": "Allows the item to submit a form on click. The URL passed in the `href:` option will be used as the form action. Pass the `method:` option to this hash to control what kind of request is made, One of `:delete`, `:get`, `:head`, `:patch`, `:post`, or `:put`. The `name:` option is required and specifies the desired name of the field that will be included in the params sent to the server on form submission. Specify the `value:` option to send a custom value to the server; otherwise the value of `name:` is sent."
|
274
|
+
},
|
263
275
|
{
|
264
276
|
"name": "truncate_label",
|
265
277
|
"type": "Boolean",
|
@@ -517,6 +529,31 @@
|
|
517
529
|
|
518
530
|
]
|
519
531
|
},
|
532
|
+
{
|
533
|
+
"fully_qualified_name": "Primer::Alpha::ActionList::FormWrapper",
|
534
|
+
"description": "Utility component for wrapping ActionLists or individual ActionList::Items in forms.",
|
535
|
+
"component": "ActionList::FormWrapper",
|
536
|
+
"status": "alpha",
|
537
|
+
"a11y_reviewed": false,
|
538
|
+
"short_name": "ActionListFormWrapper",
|
539
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/action_list/form_wrapper.rb",
|
540
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/action_list/form_wrapper/default/",
|
541
|
+
"parameters": [
|
542
|
+
|
543
|
+
],
|
544
|
+
"slots": [
|
545
|
+
|
546
|
+
],
|
547
|
+
"methods": [
|
548
|
+
|
549
|
+
],
|
550
|
+
"previews": [
|
551
|
+
|
552
|
+
],
|
553
|
+
"subcomponents": [
|
554
|
+
|
555
|
+
]
|
556
|
+
},
|
520
557
|
{
|
521
558
|
"fully_qualified_name": "Primer::Alpha::ActionList::Divider",
|
522
559
|
"description": "Group heading rendered above the group contents.",
|
@@ -557,7 +594,7 @@
|
|
557
594
|
},
|
558
595
|
{
|
559
596
|
"fully_qualified_name": "Primer::Alpha::ActionMenu",
|
560
|
-
"description": "
|
597
|
+
"description": "ActionMenu is used for actions, navigation, to display secondary options, or single/multi select lists. They appear when users interact with buttons, actions, or other controls.\n\nThe only allowed elements for the `Item` components are: `:a`, `:button`, and `:clipboard-copy`. The default is `:button`.",
|
561
598
|
"component": "ActionMenu",
|
562
599
|
"status": "alpha",
|
563
600
|
"a11y_reviewed": false,
|
@@ -583,6 +620,12 @@
|
|
583
620
|
"default": "`:outside_bottom`",
|
584
621
|
"description": "One of `:inside_bottom`, `:inside_center`, `:inside_left`, `:inside_right`, `:inside_top`, `:outside_bottom`, `:outside_left`, `:outside_right`, or `:outside_top`.."
|
585
622
|
},
|
623
|
+
{
|
624
|
+
"name": "size",
|
625
|
+
"type": "Symbol",
|
626
|
+
"default": "`:auto`",
|
627
|
+
"description": "One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`.."
|
628
|
+
},
|
586
629
|
{
|
587
630
|
"name": "src",
|
588
631
|
"type": "String",
|
@@ -611,7 +654,13 @@
|
|
611
654
|
"name": "select_variant",
|
612
655
|
"type": "Symbol",
|
613
656
|
"default": "`:none`",
|
614
|
-
"description": "
|
657
|
+
"description": "One of `:multiple`, `:none`, or `:single`."
|
658
|
+
},
|
659
|
+
{
|
660
|
+
"name": "form_arguments",
|
661
|
+
"type": "Hash",
|
662
|
+
"default": "`{}`",
|
663
|
+
"description": "Allows an `ActionMenu` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission."
|
615
664
|
},
|
616
665
|
{
|
617
666
|
"name": "system_arguments",
|
@@ -621,7 +670,30 @@
|
|
621
670
|
}
|
622
671
|
],
|
623
672
|
"slots": [
|
624
|
-
|
673
|
+
{
|
674
|
+
"name": "show_button",
|
675
|
+
"description": "Button to activate the menu.",
|
676
|
+
"parameters": [
|
677
|
+
{
|
678
|
+
"name": "system_arguments",
|
679
|
+
"type": "Hash",
|
680
|
+
"default": "N/A",
|
681
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::Overlay{{/link_to_component}}'s `show_button` slot."
|
682
|
+
}
|
683
|
+
]
|
684
|
+
},
|
685
|
+
{
|
686
|
+
"name": "items",
|
687
|
+
"description": "Adds a new item to the list.",
|
688
|
+
"parameters": [
|
689
|
+
{
|
690
|
+
"name": "system_arguments",
|
691
|
+
"type": "Hash",
|
692
|
+
"default": "N/A",
|
693
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
|
694
|
+
}
|
695
|
+
]
|
696
|
+
}
|
625
697
|
],
|
626
698
|
"methods": [
|
627
699
|
{
|
@@ -669,13 +741,6 @@
|
|
669
741
|
}
|
670
742
|
]
|
671
743
|
},
|
672
|
-
{
|
673
|
-
"name": "items",
|
674
|
-
"description": "Retrieves the list of items.",
|
675
|
-
"parameters": [
|
676
|
-
|
677
|
-
]
|
678
|
-
},
|
679
744
|
{
|
680
745
|
"name": "with_divider",
|
681
746
|
"description": "Adds a divider to the list.",
|
@@ -705,6 +770,11 @@
|
|
705
770
|
"preview_path": "/lookbook/preview/primer/alpha/action_menu/default",
|
706
771
|
"name": "default"
|
707
772
|
},
|
773
|
+
{
|
774
|
+
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/wide",
|
775
|
+
"preview_path": "/lookbook/preview/primer/alpha/action_menu/wide",
|
776
|
+
"name": "wide"
|
777
|
+
},
|
708
778
|
{
|
709
779
|
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/with_icon_button",
|
710
780
|
"preview_path": "/lookbook/preview/primer/alpha/action_menu/with_icon_button",
|
@@ -755,6 +825,16 @@
|
|
755
825
|
"preview_path": "/lookbook/preview/primer/alpha/action_menu/with_actions",
|
756
826
|
"name": "with_actions"
|
757
827
|
},
|
828
|
+
{
|
829
|
+
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/single_select_form",
|
830
|
+
"preview_path": "/lookbook/preview/primer/alpha/action_menu/single_select_form",
|
831
|
+
"name": "single_select_form"
|
832
|
+
},
|
833
|
+
{
|
834
|
+
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/multiple_select_form",
|
835
|
+
"preview_path": "/lookbook/preview/primer/alpha/action_menu/multiple_select_form",
|
836
|
+
"name": "multiple_select_form"
|
837
|
+
},
|
758
838
|
{
|
759
839
|
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/with_disabled_items",
|
760
840
|
"preview_path": "/lookbook/preview/primer/alpha/action_menu/with_disabled_items",
|
@@ -775,6 +855,11 @@
|
|
775
855
|
"preview_path": "/lookbook/preview/primer/alpha/action_menu/block_description",
|
776
856
|
"name": "block_description"
|
777
857
|
},
|
858
|
+
{
|
859
|
+
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/submitting_forms",
|
860
|
+
"preview_path": "/lookbook/preview/primer/alpha/action_menu/submitting_forms",
|
861
|
+
"name": "submitting_forms"
|
862
|
+
},
|
778
863
|
{
|
779
864
|
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/inline_description",
|
780
865
|
"preview_path": "/lookbook/preview/primer/alpha/action_menu/inline_description",
|
@@ -812,7 +897,7 @@
|
|
812
897
|
"name": "system_arguments",
|
813
898
|
"type": "Hash",
|
814
899
|
"default": "N/A",
|
815
|
-
"description": "{{
|
900
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}"
|
816
901
|
}
|
817
902
|
],
|
818
903
|
"slots": [
|
@@ -846,6 +931,12 @@
|
|
846
931
|
"name": "with_item",
|
847
932
|
"description": "Adds a new item to the list.",
|
848
933
|
"parameters": [
|
934
|
+
{
|
935
|
+
"name": "data",
|
936
|
+
"type": "Hash",
|
937
|
+
"default": "`{}`",
|
938
|
+
"description": "When the menu is used as a form input (see the {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} docs), the label is submitted to the server by default. However, if the `data: { value: }` or `\"data-value\":` attribute is provided, it will be sent to the server instead."
|
939
|
+
},
|
849
940
|
{
|
850
941
|
"name": "system_arguments",
|
851
942
|
"type": "Hash",
|
@@ -5556,13 +5647,7 @@
|
|
5556
5647
|
}
|
5557
5648
|
],
|
5558
5649
|
"methods": [
|
5559
|
-
{
|
5560
|
-
"name": "description_variant_class",
|
5561
|
-
"description": "Description variant class.",
|
5562
|
-
"parameters": [
|
5563
5650
|
|
5564
|
-
]
|
5565
|
-
}
|
5566
5651
|
],
|
5567
5652
|
"previews": [
|
5568
5653
|
{
|
data/static/previews.json
CHANGED
@@ -133,6 +133,11 @@
|
|
133
133
|
"preview_path": "/lookbook/preview/primer/alpha/action_menu/default",
|
134
134
|
"name": "default"
|
135
135
|
},
|
136
|
+
{
|
137
|
+
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/wide",
|
138
|
+
"preview_path": "/lookbook/preview/primer/alpha/action_menu/wide",
|
139
|
+
"name": "wide"
|
140
|
+
},
|
136
141
|
{
|
137
142
|
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/with_icon_button",
|
138
143
|
"preview_path": "/lookbook/preview/primer/alpha/action_menu/with_icon_button",
|
@@ -183,6 +188,16 @@
|
|
183
188
|
"preview_path": "/lookbook/preview/primer/alpha/action_menu/with_actions",
|
184
189
|
"name": "with_actions"
|
185
190
|
},
|
191
|
+
{
|
192
|
+
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/single_select_form",
|
193
|
+
"preview_path": "/lookbook/preview/primer/alpha/action_menu/single_select_form",
|
194
|
+
"name": "single_select_form"
|
195
|
+
},
|
196
|
+
{
|
197
|
+
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/multiple_select_form",
|
198
|
+
"preview_path": "/lookbook/preview/primer/alpha/action_menu/multiple_select_form",
|
199
|
+
"name": "multiple_select_form"
|
200
|
+
},
|
186
201
|
{
|
187
202
|
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/with_disabled_items",
|
188
203
|
"preview_path": "/lookbook/preview/primer/alpha/action_menu/with_disabled_items",
|
@@ -203,6 +218,11 @@
|
|
203
218
|
"preview_path": "/lookbook/preview/primer/alpha/action_menu/block_description",
|
204
219
|
"name": "block_description"
|
205
220
|
},
|
221
|
+
{
|
222
|
+
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/submitting_forms",
|
223
|
+
"preview_path": "/lookbook/preview/primer/alpha/action_menu/submitting_forms",
|
224
|
+
"name": "submitting_forms"
|
225
|
+
},
|
206
226
|
{
|
207
227
|
"inspect_path": "/lookbook/inspect/primer/alpha/action_menu/inline_description",
|
208
228
|
"preview_path": "/lookbook/preview/primer/alpha/action_menu/inline_description",
|
data/static/statuses.json
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"Primer::Alpha::ActionList": "alpha",
|
3
3
|
"Primer::Alpha::ActionList::Divider": "alpha",
|
4
|
+
"Primer::Alpha::ActionList::FormWrapper": "alpha",
|
4
5
|
"Primer::Alpha::ActionList::Heading": "alpha",
|
5
6
|
"Primer::Alpha::ActionList::Item": "alpha",
|
6
7
|
"Primer::Alpha::ActionMenu": "alpha",
|
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.1.
|
4
|
+
version: 0.1.7
|
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: 2023-04-
|
11
|
+
date: 2023-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -401,6 +401,8 @@ files:
|
|
401
401
|
- app/components/primer/alpha/action_list.pcss
|
402
402
|
- app/components/primer/alpha/action_list.rb
|
403
403
|
- app/components/primer/alpha/action_list/divider.rb
|
404
|
+
- app/components/primer/alpha/action_list/form_wrapper.html.erb
|
405
|
+
- app/components/primer/alpha/action_list/form_wrapper.rb
|
404
406
|
- app/components/primer/alpha/action_list/heading.html.erb
|
405
407
|
- app/components/primer/alpha/action_list/heading.rb
|
406
408
|
- app/components/primer/alpha/action_list/item.html.erb
|
@@ -941,7 +943,10 @@ files:
|
|
941
943
|
- previews/primer/alpha/action_menu_preview.rb
|
942
944
|
- previews/primer/alpha/action_menu_preview/align_end.html.erb
|
943
945
|
- previews/primer/alpha/action_menu_preview/content_labels.html.erb
|
946
|
+
- previews/primer/alpha/action_menu_preview/multiple_select_form.html.erb
|
944
947
|
- previews/primer/alpha/action_menu_preview/opens_dialog.html.erb
|
948
|
+
- previews/primer/alpha/action_menu_preview/single_select_form.html.erb
|
949
|
+
- previews/primer/alpha/action_menu_preview/submitting_forms.html.erb
|
945
950
|
- previews/primer/alpha/auto_complete_preview.rb
|
946
951
|
- previews/primer/alpha/banner_preview.rb
|
947
952
|
- previews/primer/alpha/banner_preview/with_action_button.html.erb
|