primer_view_components 0.0.84 → 0.0.87

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +50 -0
  3. data/app/assets/javascripts/primer_view_components.js +1 -1
  4. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  5. data/app/components/primer/alpha/auto_complete/item.rb +1 -1
  6. data/app/components/primer/alpha/auto_complete.rb +1 -1
  7. data/app/components/primer/alpha/button_marketing.rb +1 -1
  8. data/app/components/primer/alpha/text_field.rb +105 -0
  9. data/app/components/primer/alpha/tool-tip-element.d.ts +3 -1
  10. data/app/components/primer/alpha/tool-tip-element.js +20 -13
  11. data/app/components/primer/alpha/tool-tip-element.ts +23 -14
  12. data/app/components/primer/alpha/tooltip.rb +1 -1
  13. data/app/components/primer/beta/base_button.rb +47 -0
  14. data/app/components/primer/{alpha → beta}/border_box/header.html.erb +0 -0
  15. data/app/components/primer/{alpha → beta}/border_box/header.rb +6 -6
  16. data/app/components/primer/{border_box_component.html.erb → beta/border_box.html.erb} +0 -0
  17. data/app/components/primer/beta/border_box.rb +147 -0
  18. data/app/components/primer/blankslate_component.html.erb +0 -5
  19. data/app/components/primer/border_box_component.rb +2 -140
  20. data/app/components/primer/button_component.html.erb +12 -4
  21. data/app/components/primer/button_component.rb +2 -2
  22. data/app/components/primer/clipboard_copy.rb +6 -2
  23. data/app/components/primer/close_button.rb +1 -1
  24. data/app/components/primer/hellip_button.rb +1 -1
  25. data/app/components/primer/icon_button.html.erb +6 -0
  26. data/app/components/primer/icon_button.rb +46 -10
  27. data/app/components/primer/link_component.rb +12 -5
  28. data/app/helpers/primer/form_helper.rb +10 -0
  29. data/app/lib/primer/join_style_arguments_helper.rb +1 -1
  30. data/lib/primer/classify/utilities.rb +3 -6
  31. data/lib/primer/form_components.rb +36 -0
  32. data/lib/primer/forms/acts_as_component.rb +118 -0
  33. data/lib/primer/forms/base.html.erb +8 -0
  34. data/lib/primer/forms/base.rb +142 -0
  35. data/lib/primer/forms/base_component.rb +62 -0
  36. data/lib/primer/forms/buffer_rewriter.rb +51 -0
  37. data/lib/primer/forms/builder.rb +48 -0
  38. data/lib/primer/forms/caption.html.erb +10 -0
  39. data/lib/primer/forms/caption.rb +29 -0
  40. data/lib/primer/forms/check_box.html.erb +9 -0
  41. data/lib/primer/forms/check_box.rb +16 -0
  42. data/lib/primer/forms/check_box_group.html.erb +12 -0
  43. data/lib/primer/forms/check_box_group.rb +14 -0
  44. data/lib/primer/forms/dsl/check_box_group_input.rb +41 -0
  45. data/lib/primer/forms/dsl/check_box_input.rb +27 -0
  46. data/lib/primer/forms/dsl/form_object.rb +25 -0
  47. data/lib/primer/forms/dsl/form_reference_input.rb +36 -0
  48. data/lib/primer/forms/dsl/hidden_input.rb +29 -0
  49. data/lib/primer/forms/dsl/input.rb +237 -0
  50. data/lib/primer/forms/dsl/input_group.rb +34 -0
  51. data/lib/primer/forms/dsl/input_methods.rb +86 -0
  52. data/lib/primer/forms/dsl/multi_input.rb +58 -0
  53. data/lib/primer/forms/dsl/radio_button_group_input.rb +38 -0
  54. data/lib/primer/forms/dsl/radio_button_input.rb +37 -0
  55. data/lib/primer/forms/dsl/select_list_input.rb +53 -0
  56. data/lib/primer/forms/dsl/submit_button_input.rb +28 -0
  57. data/lib/primer/forms/dsl/text_area_input.rb +33 -0
  58. data/lib/primer/forms/dsl/text_field_input.rb +65 -0
  59. data/lib/primer/forms/form_control.html.erb +18 -0
  60. data/lib/primer/forms/form_control.rb +23 -0
  61. data/lib/primer/forms/form_list.html.erb +5 -0
  62. data/lib/primer/forms/form_list.rb +21 -0
  63. data/lib/primer/forms/form_reference.html.erb +3 -0
  64. data/lib/primer/forms/form_reference.rb +14 -0
  65. data/lib/primer/forms/group.html.erb +5 -0
  66. data/lib/primer/forms/group.rb +27 -0
  67. data/lib/primer/forms/hidden_field.html.erb +1 -0
  68. data/lib/primer/forms/hidden_field.rb +15 -0
  69. data/lib/primer/forms/multi.html.erb +3 -0
  70. data/lib/primer/forms/multi.rb +14 -0
  71. data/lib/primer/forms/radio_button.html.erb +14 -0
  72. data/lib/primer/forms/radio_button.rb +29 -0
  73. data/lib/primer/forms/radio_button_group.html.erb +12 -0
  74. data/lib/primer/forms/radio_button_group.rb +14 -0
  75. data/lib/primer/forms/select_list.html.erb +5 -0
  76. data/lib/primer/forms/select_list.rb +26 -0
  77. data/lib/primer/forms/separator.html.erb +1 -0
  78. data/lib/primer/forms/separator.rb +8 -0
  79. data/lib/primer/forms/spacing_wrapper.html.erb +3 -0
  80. data/lib/primer/forms/spacing_wrapper.rb +8 -0
  81. data/lib/primer/forms/submit_button.html.erb +4 -0
  82. data/lib/primer/forms/submit_button.rb +50 -0
  83. data/lib/primer/forms/text_area.html.erb +5 -0
  84. data/lib/primer/forms/text_area.rb +16 -0
  85. data/lib/primer/forms/text_field.html.erb +19 -0
  86. data/lib/primer/forms/text_field.rb +14 -0
  87. data/lib/primer/view_components/engine.rb +34 -0
  88. data/lib/primer/view_components/linters/argument_mappers/button.rb +2 -2
  89. data/lib/primer/view_components/linters/button_component_migration_counter.rb +1 -1
  90. data/lib/primer/view_components/linters/helpers/deprecated_components_helpers.rb +2 -8
  91. data/lib/primer/view_components/version.rb +1 -1
  92. data/lib/rubocop/cop/primer/component_name_migration.rb +3 -0
  93. data/lib/rubocop/cop/primer/deprecated_arguments.rb +0 -10
  94. data/lib/tasks/deprecated.rake +22 -0
  95. data/lib/tasks/docs.rake +5 -3
  96. data/static/arguments.yml +148 -39
  97. data/static/audited_at.json +4 -2
  98. data/static/classes.yml +2 -1
  99. data/static/constants.json +44 -39
  100. data/static/statuses.json +7 -5
  101. metadata +69 -8
  102. data/app/components/primer/base_button.rb +0 -43
data/static/arguments.yml CHANGED
@@ -1,11 +1,4 @@
1
1
  ---
2
- - component: BorderBoxHeader
3
- source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/border_box/header.rb
4
- parameters:
5
- - name: system_arguments
6
- type: Hash
7
- default: N/A
8
- description: "[System arguments](/system-arguments)"
9
2
  - component: ButtonMarketing
10
3
  source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/button_marketing.rb
11
4
  parameters:
@@ -95,6 +88,100 @@
95
88
  type: Hash
96
89
  default: N/A
97
90
  description: "[System arguments](/system-arguments)"
91
+ - component: TextField
92
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/text_field.rb
93
+ parameters:
94
+ - name: name
95
+ type: String
96
+ default: N/A
97
+ description: Value for the HTML name attribute.
98
+ - name: id
99
+ type: String
100
+ default: N/A
101
+ description: Value for the HTML id attribute.
102
+ - name: class
103
+ type: String
104
+ default: N/A
105
+ description: A list of CSS classes to add to the input. Exists for compatibility
106
+ with Rails form builders.
107
+ - name: classes
108
+ type: String
109
+ default: N/A
110
+ description: A list of CSS classes to add to the input. Combined with the `:class`
111
+ argument.
112
+ - name: caption
113
+ type: String
114
+ default: N/A
115
+ description: Caption text to render below the input.
116
+ - name: label
117
+ type: String
118
+ default: N/A
119
+ description: Label text displayed above the input.
120
+ - name: visually_hide_label
121
+ type: Boolean
122
+ default: N/A
123
+ description: Whether or not to visually hide the label. If `true` the label will
124
+ be hidden visually but still available to screen readers.
125
+ - name: size
126
+ type: Symbol
127
+ default: N/A
128
+ description: The size of the field. One of `:large`, `:medium`, or `:small`.
129
+ - name: show_clear_button
130
+ type: Boolean
131
+ default: N/A
132
+ description: Whether or not to include a clear button inside the input that clears
133
+ the input's contents when clicked.
134
+ - name: clear_button_id
135
+ type: String
136
+ default: N/A
137
+ description: The HTML id attribute of the clear button.
138
+ - name: full_width
139
+ type: Boolean
140
+ default: N/A
141
+ description: Controls whether or not the input takes the full width of its container.
142
+ - name: disabled
143
+ type: Boolean
144
+ default: N/A
145
+ description: Whether or not the input should accept keyboard and mouse input.
146
+ - name: invalid
147
+ type: Boolean
148
+ default: N/A
149
+ description: If `true`, renders the input in a visually invalid state.
150
+ - name: placeholder
151
+ type: String
152
+ default: N/A
153
+ description: Placeholder text.
154
+ - name: inset
155
+ type: Boolean
156
+ default: N/A
157
+ description: If `true`, renders the input in a visually inset state.
158
+ - name: monospace
159
+ type: Boolean
160
+ default: N/A
161
+ description: If `true`, uses a monospace font for the input field.
162
+ - name: leading_visual
163
+ type: Hash
164
+ default: N/A
165
+ description: Renders a leading visual icon before the text field's cursor. The
166
+ hash will be passed to Primer's [Octicon component](https://primer.style/view-components/components/octicon).
167
+ - name: validation_message
168
+ type: String
169
+ default: N/A
170
+ description: A validation message to display beneath the input. Implicitly sets
171
+ `invalid` to `true`.
172
+ - name: label_arguments
173
+ type: Hash
174
+ default: N/A
175
+ description: System arugments passed to the Rails builder's `#label` method. These
176
+ arguments will appear as HTML attributes on the `<label>` tag.
177
+ - name: system_arguments
178
+ type: Hash
179
+ default: N/A
180
+ description: "[System arguments](/system-arguments)"
181
+ - name: block
182
+ type: Proc
183
+ default: N/A
184
+ description: Unused.
98
185
  - component: Tooltip
99
186
  source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tooltip.rb
100
187
  parameters:
@@ -167,25 +254,6 @@
167
254
  type: Hash
168
255
  default: N/A
169
256
  description: "[System arguments](/system-arguments)"
170
- - component: BaseButton
171
- source: https://github.com/primer/view_components/tree/main/app/components/primer/base_button.rb
172
- parameters:
173
- - name: tag
174
- type: Symbol
175
- default: "`:button`"
176
- description: One of `:a`, `:button`, or `:summary`.
177
- - name: type
178
- type: Symbol
179
- default: "`:button`"
180
- description: One of `:button`, `:reset`, or `:submit`.
181
- - name: block
182
- type: Boolean
183
- default: "`false`"
184
- description: 'Whether button is full-width with `display: block`.'
185
- - name: system_arguments
186
- type: Hash
187
- default: N/A
188
- description: "[System arguments](/system-arguments)"
189
257
  - component: AutoComplete
190
258
  source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/auto_complete.rb
191
259
  parameters:
@@ -331,6 +399,25 @@
331
399
  type: Hash
332
400
  default: N/A
333
401
  description: "[System arguments](/system-arguments)"
402
+ - component: BaseButton
403
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/base_button.rb
404
+ parameters:
405
+ - name: tag
406
+ type: Symbol
407
+ default: "`:button`"
408
+ description: One of `:a`, `:button`, or `:summary`.
409
+ - name: type
410
+ type: Symbol
411
+ default: "`:button`"
412
+ description: One of `:button`, `:reset`, or `:submit`.
413
+ - name: block
414
+ type: Boolean
415
+ default: "`false`"
416
+ description: 'Whether button is full-width with `display: block`.'
417
+ - name: system_arguments
418
+ type: Hash
419
+ default: N/A
420
+ description: "[System arguments](/system-arguments)"
334
421
  - component: Blankslate
335
422
  source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/blankslate.rb
336
423
  parameters:
@@ -350,6 +437,24 @@
350
437
  type: Hash
351
438
  default: N/A
352
439
  description: "[System arguments](/system-arguments)"
440
+ - component: BorderBox
441
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/border_box.rb
442
+ parameters:
443
+ - name: padding
444
+ type: Symbol
445
+ default: "`:default`"
446
+ description: One of `:condensed`, `:default`, or `:spacious`.
447
+ - name: system_arguments
448
+ type: Hash
449
+ default: N/A
450
+ description: "[System arguments](/system-arguments)"
451
+ - component: BorderBoxHeader
452
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/border_box/header.rb
453
+ parameters:
454
+ - name: system_arguments
455
+ type: Hash
456
+ default: N/A
457
+ description: "[System arguments](/system-arguments)"
353
458
  - component: Breadcrumbs
354
459
  source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/breadcrumbs.rb
355
460
  parameters:
@@ -402,17 +507,6 @@
402
507
  type: Hash
403
508
  default: N/A
404
509
  description: "[System arguments](/system-arguments)"
405
- - component: BorderBox
406
- source: https://github.com/primer/view_components/tree/main/app/components/primer/border_box_component.rb
407
- parameters:
408
- - name: padding
409
- type: Symbol
410
- default: "`:default`"
411
- description: One of `:condensed`, `:default`, or `:spacious`.
412
- - name: system_arguments
413
- type: Hash
414
- default: N/A
415
- description: "[System arguments](/system-arguments)"
416
510
  - component: Box
417
511
  source: https://github.com/primer/view_components/tree/main/app/components/primer/box_component.rb
418
512
  parameters:
@@ -689,11 +783,26 @@
689
783
  type: Symbol
690
784
  default: N/A
691
785
  description: One of `:button`, `:reset`, or `:submit`.
786
+ - name: aria-label
787
+ type: String
788
+ default: N/A
789
+ description: String that can be read by assistive technology. A label should be
790
+ short and concise. See the accessibility section for more information.
791
+ - name: aria-description
792
+ type: String
793
+ default: N/A
794
+ description: String that can be read by assistive technology. A description can
795
+ be longer as it is intended to provide more context and information. See the
796
+ accessibility section for more information.
797
+ - name: tooltip_direction
798
+ type: Symbol
799
+ default: "`:s`"
800
+ description: One of `:e`, `:n`, `:ne`, `:nw`, `:s`, `:se`, `:sw`, or `:w`.
692
801
  - name: box
693
802
  type: Boolean
694
803
  default: "`false`"
695
- description: Whether the button is in a [BorderBox](/components/borderbox). If
696
- `true`, the button will have the `Box-btn-octicon` class.
804
+ description: Whether the button is in a [BorderBox](/components/beta/borderbox).
805
+ If `true`, the button will have the `Box-btn-octicon` class.
697
806
  - name: system_arguments
698
807
  type: Hash
699
808
  default: N/A
@@ -1,23 +1,25 @@
1
1
  {
2
2
  "Primer::Alpha::AutoComplete": "",
3
3
  "Primer::Alpha::AutoComplete::Item": "",
4
- "Primer::Alpha::BorderBox::Header": "",
5
4
  "Primer::Alpha::ButtonMarketing": "",
6
5
  "Primer::Alpha::Layout": "",
7
6
  "Primer::Alpha::Layout::Main": "",
8
7
  "Primer::Alpha::Layout::Sidebar": "",
9
8
  "Primer::Alpha::TabNav": "",
10
9
  "Primer::Alpha::TabPanels": "",
10
+ "Primer::Alpha::TextField": "",
11
11
  "Primer::Alpha::Tooltip": "",
12
12
  "Primer::Alpha::UnderlineNav": "",
13
13
  "Primer::Alpha::UnderlinePanels": "",
14
- "Primer::BaseButton": "",
15
14
  "Primer::BaseComponent": "",
16
15
  "Primer::Beta::AutoComplete": "",
17
16
  "Primer::Beta::AutoComplete::Item": "",
18
17
  "Primer::Beta::Avatar": "",
19
18
  "Primer::Beta::AvatarStack": "",
19
+ "Primer::Beta::BaseButton": "",
20
20
  "Primer::Beta::Blankslate": "",
21
+ "Primer::Beta::BorderBox": "",
22
+ "Primer::Beta::BorderBox::Header": "",
21
23
  "Primer::Beta::Breadcrumbs": "",
22
24
  "Primer::Beta::Breadcrumbs::Item": "",
23
25
  "Primer::Beta::Flash": "",
data/static/classes.yml CHANGED
@@ -25,6 +25,8 @@
25
25
  - ".Counter--secondary"
26
26
  - ".FormControl"
27
27
  - ".FormControl--fullWidth"
28
+ - ".FormControl-caption"
29
+ - ".FormControl-inlineValidation"
28
30
  - ".FormControl-input"
29
31
  - ".FormControl-input-leadingVisual"
30
32
  - ".FormControl-input-leadingVisualWrap"
@@ -62,7 +64,6 @@
62
64
  - ".Layout-main-centered-md"
63
65
  - ".Layout-main-centered-xl"
64
66
  - ".Layout-sidebar"
65
- - ".Link"
66
67
  - ".Link--muted"
67
68
  - ".Link--primary"
68
69
  - ".Link--secondary"
@@ -4,17 +4,6 @@
4
4
  },
5
5
  "Primer::Alpha::AutoComplete::Item": {
6
6
  },
7
- "Primer::Alpha::BorderBox::Header": {
8
- "TITLE_TAG_FALLBACK": "h2",
9
- "TITLE_TAG_OPTIONS": [
10
- "h1",
11
- "h2",
12
- "h3",
13
- "h4",
14
- "h5",
15
- "h6"
16
- ]
17
- },
18
7
  "Primer::Alpha::ButtonMarketing": {
19
8
  "DEFAULT_SCHEME": "default",
20
9
  "DEFAULT_TAG": "button",
@@ -143,6 +132,8 @@
143
132
  "div"
144
133
  ]
145
134
  },
135
+ "Primer::Alpha::TextField": {
136
+ },
146
137
  "Primer::Alpha::Tooltip": {
147
138
  "DIRECTION_DEFAULT": "s",
148
139
  "DIRECTION_OPTIONS": [
@@ -171,20 +162,6 @@
171
162
  },
172
163
  "Primer::Alpha::UnderlinePanels": {
173
164
  },
174
- "Primer::BaseButton": {
175
- "DEFAULT_TAG": "button",
176
- "DEFAULT_TYPE": "button",
177
- "TAG_OPTIONS": [
178
- "button",
179
- "a",
180
- "summary"
181
- ],
182
- "TYPE_OPTIONS": [
183
- "button",
184
- "reset",
185
- "submit"
186
- ]
187
- },
188
165
  "Primer::BaseComponent": {
189
166
  "SELF_CLOSING_TAGS": [
190
167
  "area",
@@ -258,6 +235,20 @@
258
235
  "span"
259
236
  ]
260
237
  },
238
+ "Primer::Beta::BaseButton": {
239
+ "DEFAULT_TAG": "button",
240
+ "DEFAULT_TYPE": "button",
241
+ "TAG_OPTIONS": [
242
+ "button",
243
+ "a",
244
+ "summary"
245
+ ],
246
+ "TYPE_OPTIONS": [
247
+ "button",
248
+ "reset",
249
+ "submit"
250
+ ]
251
+ },
261
252
  "Primer::Beta::Blankslate": {
262
253
  "VISUAL_OPTIONS": [
263
254
  "icon",
@@ -265,6 +256,34 @@
265
256
  "image"
266
257
  ]
267
258
  },
259
+ "Primer::Beta::BorderBox": {
260
+ "DEFAULT_PADDING": "default",
261
+ "DEFAULT_ROW_SCHEME": "default",
262
+ "Header": "Primer::Beta::BorderBox::Header",
263
+ "PADDING_MAPPINGS": {
264
+ "default": "",
265
+ "condensed": "Box--condensed",
266
+ "spacious": "Box--spacious"
267
+ },
268
+ "PADDING_SUGGESTION": "Perhaps you could consider using :padding options of default, condensed, and spacious?",
269
+ "ROW_SCHEME_MAPPINGS": {
270
+ "default": "",
271
+ "neutral": "Box-row--gray",
272
+ "info": "Box-row--blue",
273
+ "warning": "Box-row--yellow"
274
+ }
275
+ },
276
+ "Primer::Beta::BorderBox::Header": {
277
+ "TITLE_TAG_FALLBACK": "h2",
278
+ "TITLE_TAG_OPTIONS": [
279
+ "h1",
280
+ "h2",
281
+ "h3",
282
+ "h4",
283
+ "h5",
284
+ "h6"
285
+ ]
286
+ },
268
287
  "Primer::Beta::Breadcrumbs": {
269
288
  "ARGS_DENYLIST": {
270
289
  "[:p, :pt, :pb, :pr, :pl, :px, :py]": "Padding system arguments are not allowed on Breadcrumbs. Consider using margins instead.",
@@ -299,20 +318,6 @@
299
318
  "Primer::BlankslateComponent": {
300
319
  },
301
320
  "Primer::BorderBoxComponent": {
302
- "DEFAULT_PADDING": "default",
303
- "DEFAULT_ROW_SCHEME": "default",
304
- "PADDING_MAPPINGS": {
305
- "default": "",
306
- "condensed": "Box--condensed",
307
- "spacious": "Box--spacious"
308
- },
309
- "PADDING_SUGGESTION": "Perhaps you could consider using :padding options of default, condensed, and spacious?",
310
- "ROW_SCHEME_MAPPINGS": {
311
- "default": "",
312
- "neutral": "Box-row--gray",
313
- "info": "Box-row--blue",
314
- "warning": "Box-row--yellow"
315
- }
316
321
  },
317
322
  "Primer::BoxComponent": {
318
323
  },
data/static/statuses.json CHANGED
@@ -1,23 +1,25 @@
1
1
  {
2
- "Primer::Alpha::AutoComplete": "alpha",
3
- "Primer::Alpha::AutoComplete::Item": "alpha",
4
- "Primer::Alpha::BorderBox::Header": "alpha",
2
+ "Primer::Alpha::AutoComplete": "deprecated",
3
+ "Primer::Alpha::AutoComplete::Item": "deprecated",
5
4
  "Primer::Alpha::ButtonMarketing": "alpha",
6
5
  "Primer::Alpha::Layout": "alpha",
7
6
  "Primer::Alpha::Layout::Main": "alpha",
8
7
  "Primer::Alpha::Layout::Sidebar": "alpha",
9
8
  "Primer::Alpha::TabNav": "alpha",
10
9
  "Primer::Alpha::TabPanels": "alpha",
10
+ "Primer::Alpha::TextField": "alpha",
11
11
  "Primer::Alpha::Tooltip": "alpha",
12
12
  "Primer::Alpha::UnderlineNav": "alpha",
13
13
  "Primer::Alpha::UnderlinePanels": "alpha",
14
- "Primer::BaseButton": "beta",
15
14
  "Primer::BaseComponent": "beta",
16
15
  "Primer::Beta::AutoComplete": "beta",
17
16
  "Primer::Beta::AutoComplete::Item": "beta",
18
17
  "Primer::Beta::Avatar": "beta",
19
18
  "Primer::Beta::AvatarStack": "beta",
19
+ "Primer::Beta::BaseButton": "beta",
20
20
  "Primer::Beta::Blankslate": "beta",
21
+ "Primer::Beta::BorderBox": "beta",
22
+ "Primer::Beta::BorderBox::Header": "alpha",
21
23
  "Primer::Beta::Breadcrumbs": "beta",
22
24
  "Primer::Beta::Breadcrumbs::Item": "alpha",
23
25
  "Primer::Beta::Flash": "beta",
@@ -25,7 +27,7 @@
25
27
  "Primer::Beta::Truncate": "beta",
26
28
  "Primer::Beta::Truncate::TruncateText": "alpha",
27
29
  "Primer::BlankslateComponent": "deprecated",
28
- "Primer::BorderBoxComponent": "beta",
30
+ "Primer::BorderBoxComponent": "deprecated",
29
31
  "Primer::BoxComponent": "stable",
30
32
  "Primer::ButtonComponent": "beta",
31
33
  "Primer::ButtonGroup": "beta",
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.0.84
4
+ version: 0.0.87
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: 2022-07-28 00:00:00.000000000 Z
11
+ date: 2022-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 2.0.0
61
+ version: 2.57.0
62
62
  - - "<"
63
63
  - !ruby/object:Gem::Version
64
64
  version: '3.0'
@@ -68,7 +68,7 @@ dependencies:
68
68
  requirements:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
- version: 2.0.0
71
+ version: 2.57.0
72
72
  - - "<"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '3.0'
@@ -409,8 +409,6 @@ files:
409
409
  - app/components/primer/alpha/auto_complete.rb
410
410
  - app/components/primer/alpha/auto_complete/auto_complete.html.erb
411
411
  - app/components/primer/alpha/auto_complete/item.rb
412
- - app/components/primer/alpha/border_box/header.html.erb
413
- - app/components/primer/alpha/border_box/header.rb
414
412
  - app/components/primer/alpha/button_marketing.rb
415
413
  - app/components/primer/alpha/layout.html.erb
416
414
  - app/components/primer/alpha/layout.rb
@@ -418,6 +416,7 @@ files:
418
416
  - app/components/primer/alpha/tab_nav.rb
419
417
  - app/components/primer/alpha/tab_panels.html.erb
420
418
  - app/components/primer/alpha/tab_panels.rb
419
+ - app/components/primer/alpha/text_field.rb
421
420
  - app/components/primer/alpha/tool-tip-element.d.ts
422
421
  - app/components/primer/alpha/tool-tip-element.js
423
422
  - app/components/primer/alpha/tool-tip-element.ts
@@ -426,7 +425,6 @@ files:
426
425
  - app/components/primer/alpha/underline_nav.rb
427
426
  - app/components/primer/alpha/underline_panels.html.erb
428
427
  - app/components/primer/alpha/underline_panels.rb
429
- - app/components/primer/base_button.rb
430
428
  - app/components/primer/base_component.rb
431
429
  - app/components/primer/beta/auto_complete.rb
432
430
  - app/components/primer/beta/auto_complete/auto_complete.d.ts
@@ -438,8 +436,13 @@ files:
438
436
  - app/components/primer/beta/avatar.rb
439
437
  - app/components/primer/beta/avatar_stack.html.erb
440
438
  - app/components/primer/beta/avatar_stack.rb
439
+ - app/components/primer/beta/base_button.rb
441
440
  - app/components/primer/beta/blankslate.html.erb
442
441
  - app/components/primer/beta/blankslate.rb
442
+ - app/components/primer/beta/border_box.html.erb
443
+ - app/components/primer/beta/border_box.rb
444
+ - app/components/primer/beta/border_box/header.html.erb
445
+ - app/components/primer/beta/border_box/header.rb
443
446
  - app/components/primer/beta/breadcrumbs.html.erb
444
447
  - app/components/primer/beta/breadcrumbs.rb
445
448
  - app/components/primer/beta/flash.html.erb
@@ -449,7 +452,6 @@ files:
449
452
  - app/components/primer/beta/truncate.rb
450
453
  - app/components/primer/blankslate_component.html.erb
451
454
  - app/components/primer/blankslate_component.rb
452
- - app/components/primer/border_box_component.html.erb
453
455
  - app/components/primer/border_box_component.rb
454
456
  - app/components/primer/box_component.rb
455
457
  - app/components/primer/button_component.html.erb
@@ -485,6 +487,7 @@ files:
485
487
  - app/components/primer/heading_component.rb
486
488
  - app/components/primer/hellip_button.rb
487
489
  - app/components/primer/hidden_text_expander.rb
490
+ - app/components/primer/icon_button.html.erb
488
491
  - app/components/primer/icon_button.rb
489
492
  - app/components/primer/image.rb
490
493
  - app/components/primer/image_crop.d.ts
@@ -533,6 +536,7 @@ files:
533
536
  - app/components/primer/timeline_item_component.rb
534
537
  - app/components/primer/tooltip.rb
535
538
  - app/components/primer/truncate.rb
539
+ - app/helpers/primer/form_helper.rb
536
540
  - app/lib/primer/audited/dsl.rb
537
541
  - app/lib/primer/class_name_helper.rb
538
542
  - app/lib/primer/fetch_or_fallback_helper.rb
@@ -548,6 +552,62 @@ files:
548
552
  - lib/primer/classify/utilities.rb
549
553
  - lib/primer/classify/utilities.yml
550
554
  - lib/primer/classify/validation.rb
555
+ - lib/primer/form_components.rb
556
+ - lib/primer/forms/acts_as_component.rb
557
+ - lib/primer/forms/base.html.erb
558
+ - lib/primer/forms/base.rb
559
+ - lib/primer/forms/base_component.rb
560
+ - lib/primer/forms/buffer_rewriter.rb
561
+ - lib/primer/forms/builder.rb
562
+ - lib/primer/forms/caption.html.erb
563
+ - lib/primer/forms/caption.rb
564
+ - lib/primer/forms/check_box.html.erb
565
+ - lib/primer/forms/check_box.rb
566
+ - lib/primer/forms/check_box_group.html.erb
567
+ - lib/primer/forms/check_box_group.rb
568
+ - lib/primer/forms/dsl/check_box_group_input.rb
569
+ - lib/primer/forms/dsl/check_box_input.rb
570
+ - lib/primer/forms/dsl/form_object.rb
571
+ - lib/primer/forms/dsl/form_reference_input.rb
572
+ - lib/primer/forms/dsl/hidden_input.rb
573
+ - lib/primer/forms/dsl/input.rb
574
+ - lib/primer/forms/dsl/input_group.rb
575
+ - lib/primer/forms/dsl/input_methods.rb
576
+ - lib/primer/forms/dsl/multi_input.rb
577
+ - lib/primer/forms/dsl/radio_button_group_input.rb
578
+ - lib/primer/forms/dsl/radio_button_input.rb
579
+ - lib/primer/forms/dsl/select_list_input.rb
580
+ - lib/primer/forms/dsl/submit_button_input.rb
581
+ - lib/primer/forms/dsl/text_area_input.rb
582
+ - lib/primer/forms/dsl/text_field_input.rb
583
+ - lib/primer/forms/form_control.html.erb
584
+ - lib/primer/forms/form_control.rb
585
+ - lib/primer/forms/form_list.html.erb
586
+ - lib/primer/forms/form_list.rb
587
+ - lib/primer/forms/form_reference.html.erb
588
+ - lib/primer/forms/form_reference.rb
589
+ - lib/primer/forms/group.html.erb
590
+ - lib/primer/forms/group.rb
591
+ - lib/primer/forms/hidden_field.html.erb
592
+ - lib/primer/forms/hidden_field.rb
593
+ - lib/primer/forms/multi.html.erb
594
+ - lib/primer/forms/multi.rb
595
+ - lib/primer/forms/radio_button.html.erb
596
+ - lib/primer/forms/radio_button.rb
597
+ - lib/primer/forms/radio_button_group.html.erb
598
+ - lib/primer/forms/radio_button_group.rb
599
+ - lib/primer/forms/select_list.html.erb
600
+ - lib/primer/forms/select_list.rb
601
+ - lib/primer/forms/separator.html.erb
602
+ - lib/primer/forms/separator.rb
603
+ - lib/primer/forms/spacing_wrapper.html.erb
604
+ - lib/primer/forms/spacing_wrapper.rb
605
+ - lib/primer/forms/submit_button.html.erb
606
+ - lib/primer/forms/submit_button.rb
607
+ - lib/primer/forms/text_area.html.erb
608
+ - lib/primer/forms/text_area.rb
609
+ - lib/primer/forms/text_field.html.erb
610
+ - lib/primer/forms/text_field.rb
551
611
  - lib/primer/view_components.rb
552
612
  - lib/primer/view_components/constants.rb
553
613
  - lib/primer/view_components/engine.rb
@@ -595,6 +655,7 @@ files:
595
655
  - lib/rubocop/cop/primer/system_argument_instead_of_class.rb
596
656
  - lib/tasks/coverage.rake
597
657
  - lib/tasks/custom_utilities.yml
658
+ - lib/tasks/deprecated.rake
598
659
  - lib/tasks/docs.rake
599
660
  - lib/tasks/helpers/ast_processor.rb
600
661
  - lib/tasks/helpers/ast_traverser.rb
@@ -1,43 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Primer
4
- # Use `BaseButton` to render an unstyled `<button>` tag that can be customized.
5
- class BaseButton < Primer::Component
6
- status :beta
7
-
8
- DEFAULT_TAG = :button
9
- TAG_OPTIONS = [DEFAULT_TAG, :a, :summary].freeze
10
-
11
- DEFAULT_TYPE = :button
12
- TYPE_OPTIONS = [DEFAULT_TYPE, :reset, :submit].freeze
13
-
14
- # @example Block
15
- # <%= render(Primer::BaseButton.new(block: :true)) { "Block" } %>
16
- # <%= render(Primer::BaseButton.new(block: :true, scheme: :primary)) { "Primary block" } %>
17
- #
18
- # @param tag [Symbol] <%= one_of(Primer::BaseButton::TAG_OPTIONS) %>
19
- # @param type [Symbol] <%= one_of(Primer::BaseButton::TYPE_OPTIONS) %>
20
- # @param block [Boolean] Whether button is full-width with `display: block`.
21
- # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
22
- def initialize(
23
- tag: DEFAULT_TAG,
24
- type: DEFAULT_TYPE,
25
- block: false,
26
- **system_arguments
27
- )
28
- @system_arguments = system_arguments
29
- @system_arguments[:tag] = fetch_or_fallback(TAG_OPTIONS, tag, DEFAULT_TAG)
30
-
31
- @system_arguments[:type] = fetch_or_fallback(TYPE_OPTIONS, type, DEFAULT_TYPE) if @system_arguments[:tag] == :button
32
-
33
- @system_arguments[:classes] = class_names(
34
- system_arguments[:classes],
35
- "btn-block" => block
36
- )
37
- end
38
-
39
- def call
40
- render(Primer::BaseComponent.new(**@system_arguments)) { content }
41
- end
42
- end
43
- end