primer_view_components 0.0.94 → 0.0.96
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -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 +1 -1
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/dialog.rb +3 -3
- data/app/components/primer/alpha/toggle_switch.js +3 -0
- data/app/components/primer/alpha/toggle_switch.ts +3 -0
- data/app/components/primer/alpha/tool_tip.js +17 -2
- data/app/components/primer/alpha/tool_tip.ts +14 -2
- data/app/components/primer/beta/button.pcss +27 -15
- data/app/components/primer/beta/button.rb +11 -16
- data/app/components/primer/beta/icon_button.html.erb +1 -1
- data/app/components/primer/beta/icon_button.rb +5 -3
- data/app/components/primer/button_component.rb +1 -1
- data/app/components/primer/experimental/action_bar.d.ts +14 -0
- data/app/components/primer/experimental/action_bar.js +141 -0
- data/app/components/primer/icon_button.rb +1 -1
- data/app/components/primer/octicon_component.rb +0 -4
- data/app/components/primer/octicon_symbols_component.rb +0 -4
- data/app/lib/primer/fetch_or_fallback_helper.rb +1 -1
- data/lib/primer/deprecations.rb +2 -2
- data/lib/primer/forms/builder.rb +2 -2
- data/lib/primer/forms/check_box.html.erb +5 -1
- data/lib/primer/forms/check_box.rb +11 -0
- data/lib/primer/forms/dsl/check_box_group_input.rb +17 -4
- data/lib/primer/forms/dsl/check_box_input.rb +21 -2
- data/lib/primer/view_components/engine.rb +2 -1
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/tasks/coverage.rake +1 -1
- data/lib/tasks/docs.rake +19 -15
- data/lib/tasks/static.rake +1 -1
- data/lib/tasks/test.rake +54 -0
- data/lib/tasks/utilities.rake +1 -0
- data/static/arguments.json +2042 -0
- data/static/audited_at.json +0 -2
- data/static/constants.json +1 -8
- data/static/statuses.json +2 -4
- metadata +6 -6
- data/app/components/primer/base_button.rb +0 -7
- data/app/components/primer/button_group.rb +0 -7
- data/lib/tasks/deprecated.rake +0 -27
- data/static/arguments.yml +0 -1358
@@ -0,0 +1,2042 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"component": "ButtonMarketing",
|
4
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/button_marketing.rb",
|
5
|
+
"parameters": [
|
6
|
+
{
|
7
|
+
"name": "scheme",
|
8
|
+
"type": "Symbol",
|
9
|
+
"default": "`:default`",
|
10
|
+
"description": "One of `:default`, `:outline`, `:primary`, or `:transparent`."
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"name": "variant",
|
14
|
+
"type": "Symbol",
|
15
|
+
"default": "`:default`",
|
16
|
+
"description": "One of `:default` or `:large`."
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"name": "tag",
|
20
|
+
"type": "Symbol",
|
21
|
+
"default": "`:button`",
|
22
|
+
"description": "One of `:a` or `:button`."
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"name": "type",
|
26
|
+
"type": "Symbol",
|
27
|
+
"default": "`:button`",
|
28
|
+
"description": "One of `:button` or `:submit`."
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"name": "system_arguments",
|
32
|
+
"type": "Hash",
|
33
|
+
"default": "N/A",
|
34
|
+
"description": "[System arguments](/system-arguments)"
|
35
|
+
}
|
36
|
+
]
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"component": "Dialog",
|
40
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog.rb",
|
41
|
+
"parameters": [
|
42
|
+
{
|
43
|
+
"name": "id",
|
44
|
+
"type": "String",
|
45
|
+
"default": "`\"dialog-#{(36**3 + rand(36**4)).to_s(36)}\"`",
|
46
|
+
"description": "The id of the dialog."
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"name": "title",
|
50
|
+
"type": "String",
|
51
|
+
"default": "N/A",
|
52
|
+
"description": "Describes the content of the dialog."
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"name": "subtitle",
|
56
|
+
"type": "String",
|
57
|
+
"default": "`nil`",
|
58
|
+
"description": "Provides additional context for the dialog, also setting the `aria-describedby` attribute."
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"name": "size",
|
62
|
+
"type": "Symbol",
|
63
|
+
"default": "`:medium`",
|
64
|
+
"description": "The size of the dialog. One of `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`."
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"name": "position",
|
68
|
+
"type": "Symbol",
|
69
|
+
"default": "`:center`",
|
70
|
+
"description": "The position of the dialog. One of `:center`, `:left`, or `:right`."
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"name": "position_narrow",
|
74
|
+
"type": "Symbol",
|
75
|
+
"default": "`:inherit`",
|
76
|
+
"description": "The position of the dialog when narrow. One of `:bottom`, `:fullscreen`, `:inherit`, `:left`, or `:right`."
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"name": "visually_hide_title",
|
80
|
+
"type": "Boolean",
|
81
|
+
"default": "`false`",
|
82
|
+
"description": "If true will hide the heading title, while still making it available to Screen Readers."
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"name": "system_arguments",
|
86
|
+
"type": "Hash",
|
87
|
+
"default": "N/A",
|
88
|
+
"description": "[System arguments](/system-arguments)"
|
89
|
+
}
|
90
|
+
]
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"component": "HiddenTextExpander",
|
94
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/hidden_text_expander.rb",
|
95
|
+
"parameters": [
|
96
|
+
{
|
97
|
+
"name": "inline",
|
98
|
+
"type": "Boolean",
|
99
|
+
"default": "`false`",
|
100
|
+
"description": "Whether or not the expander is inline."
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"name": "button_arguments",
|
104
|
+
"type": "Hash",
|
105
|
+
"default": "`{}`",
|
106
|
+
"description": "[System arguments](/system-arguments) for the button element."
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"name": "system_arguments",
|
110
|
+
"type": "Hash",
|
111
|
+
"default": "N/A",
|
112
|
+
"description": "[System arguments](/system-arguments)"
|
113
|
+
}
|
114
|
+
]
|
115
|
+
},
|
116
|
+
{
|
117
|
+
"component": "Layout",
|
118
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/layout.rb",
|
119
|
+
"parameters": [
|
120
|
+
{
|
121
|
+
"name": "stacking_breakpoint",
|
122
|
+
"type": "Symbol",
|
123
|
+
"default": "`:md`",
|
124
|
+
"description": "When the `Layout` should change from rows into columns. One of `:lg`, `:md`, or `:sm`."
|
125
|
+
},
|
126
|
+
{
|
127
|
+
"name": "first_in_source",
|
128
|
+
"type": "Symbol",
|
129
|
+
"default": "`:sidebar`",
|
130
|
+
"description": "Which element to render first in the HTML. This will change the keyboard navigation order. One of `:main` or `:sidebar`."
|
131
|
+
},
|
132
|
+
{
|
133
|
+
"name": "gutter",
|
134
|
+
"type": "Symbol",
|
135
|
+
"default": "`:default`",
|
136
|
+
"description": "The amount of space between the main section and the sidebar. One of `:condensed`, `:default`, `:none`, or `:spacious`."
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"name": "system_arguments",
|
140
|
+
"type": "Hash",
|
141
|
+
"default": "N/A",
|
142
|
+
"description": "[System arguments](/system-arguments)"
|
143
|
+
}
|
144
|
+
]
|
145
|
+
},
|
146
|
+
{
|
147
|
+
"component": "TabNav",
|
148
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tab_nav.rb",
|
149
|
+
"parameters": [
|
150
|
+
{
|
151
|
+
"name": "tag",
|
152
|
+
"type": "Symbol",
|
153
|
+
"default": "`:nav`",
|
154
|
+
"description": "One of `:div` or `:nav`."
|
155
|
+
},
|
156
|
+
{
|
157
|
+
"name": "label",
|
158
|
+
"type": "String",
|
159
|
+
"default": "N/A",
|
160
|
+
"description": "Sets an `aria-label` that helps assistive technology users understand the purpose of the links, and distinguish it from similar elements."
|
161
|
+
},
|
162
|
+
{
|
163
|
+
"name": "body_arguments",
|
164
|
+
"type": "Hash",
|
165
|
+
"default": "`{}`",
|
166
|
+
"description": "[System arguments](/system-arguments) for the body wrapper."
|
167
|
+
},
|
168
|
+
{
|
169
|
+
"name": "system_arguments",
|
170
|
+
"type": "Hash",
|
171
|
+
"default": "N/A",
|
172
|
+
"description": "[System arguments](/system-arguments)"
|
173
|
+
}
|
174
|
+
]
|
175
|
+
},
|
176
|
+
{
|
177
|
+
"component": "TabPanels",
|
178
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tab_panels.rb",
|
179
|
+
"parameters": [
|
180
|
+
{
|
181
|
+
"name": "label",
|
182
|
+
"type": "String",
|
183
|
+
"default": "N/A",
|
184
|
+
"description": "Sets an `aria-label` that helps assistive technology users understand the purpose of the tabs."
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"name": "align",
|
188
|
+
"type": "Symbol",
|
189
|
+
"default": "N/A",
|
190
|
+
"description": "One of `:left` or `:right`. - Defaults to left"
|
191
|
+
},
|
192
|
+
{
|
193
|
+
"name": "body_arguments",
|
194
|
+
"type": "Hash",
|
195
|
+
"default": "`{}`",
|
196
|
+
"description": "[System arguments](/system-arguments) for the body wrapper."
|
197
|
+
},
|
198
|
+
{
|
199
|
+
"name": "wrapper_arguments",
|
200
|
+
"type": "Hash",
|
201
|
+
"default": "`{}`",
|
202
|
+
"description": "[System arguments](/system-arguments) for the `TabContainer` wrapper."
|
203
|
+
},
|
204
|
+
{
|
205
|
+
"name": "system_arguments",
|
206
|
+
"type": "Hash",
|
207
|
+
"default": "N/A",
|
208
|
+
"description": "[System arguments](/system-arguments)"
|
209
|
+
}
|
210
|
+
]
|
211
|
+
},
|
212
|
+
{
|
213
|
+
"component": "TextField",
|
214
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/text_field.rb",
|
215
|
+
"parameters": [
|
216
|
+
{
|
217
|
+
"name": "name",
|
218
|
+
"type": "String",
|
219
|
+
"default": "N/A",
|
220
|
+
"description": "Value for the HTML name attribute."
|
221
|
+
},
|
222
|
+
{
|
223
|
+
"name": "id",
|
224
|
+
"type": "String",
|
225
|
+
"default": "N/A",
|
226
|
+
"description": "Value for the HTML id attribute."
|
227
|
+
},
|
228
|
+
{
|
229
|
+
"name": "class",
|
230
|
+
"type": "String",
|
231
|
+
"default": "N/A",
|
232
|
+
"description": "A list of CSS classes to add to the input. Exists for compatibility with Rails form builders."
|
233
|
+
},
|
234
|
+
{
|
235
|
+
"name": "classes",
|
236
|
+
"type": "String",
|
237
|
+
"default": "N/A",
|
238
|
+
"description": "A list of CSS classes to add to the input. Combined with the `:class` argument."
|
239
|
+
},
|
240
|
+
{
|
241
|
+
"name": "caption",
|
242
|
+
"type": "String",
|
243
|
+
"default": "N/A",
|
244
|
+
"description": "Caption text to render below the input."
|
245
|
+
},
|
246
|
+
{
|
247
|
+
"name": "label",
|
248
|
+
"type": "String",
|
249
|
+
"default": "N/A",
|
250
|
+
"description": "Label text displayed above the input."
|
251
|
+
},
|
252
|
+
{
|
253
|
+
"name": "visually_hide_label",
|
254
|
+
"type": "Boolean",
|
255
|
+
"default": "N/A",
|
256
|
+
"description": "Whether or not to visually hide the label. If `true` the label will be hidden visually but still available to screen readers."
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"name": "size",
|
260
|
+
"type": "Symbol",
|
261
|
+
"default": "N/A",
|
262
|
+
"description": "The size of the field. One of `:large`, `:medium`, or `:small`."
|
263
|
+
},
|
264
|
+
{
|
265
|
+
"name": "show_clear_button",
|
266
|
+
"type": "Boolean",
|
267
|
+
"default": "N/A",
|
268
|
+
"description": "Whether or not to include a clear button inside the input that clears the input's contents when clicked."
|
269
|
+
},
|
270
|
+
{
|
271
|
+
"name": "clear_button_id",
|
272
|
+
"type": "String",
|
273
|
+
"default": "N/A",
|
274
|
+
"description": "The HTML id attribute of the clear button."
|
275
|
+
},
|
276
|
+
{
|
277
|
+
"name": "full_width",
|
278
|
+
"type": "Boolean",
|
279
|
+
"default": "N/A",
|
280
|
+
"description": "Controls whether or not the input takes the full width of its container."
|
281
|
+
},
|
282
|
+
{
|
283
|
+
"name": "disabled",
|
284
|
+
"type": "Boolean",
|
285
|
+
"default": "N/A",
|
286
|
+
"description": "Whether or not the input should accept keyboard and mouse input."
|
287
|
+
},
|
288
|
+
{
|
289
|
+
"name": "invalid",
|
290
|
+
"type": "Boolean",
|
291
|
+
"default": "N/A",
|
292
|
+
"description": "If `true`, renders the input in a visually invalid state."
|
293
|
+
},
|
294
|
+
{
|
295
|
+
"name": "placeholder",
|
296
|
+
"type": "String",
|
297
|
+
"default": "N/A",
|
298
|
+
"description": "Placeholder text."
|
299
|
+
},
|
300
|
+
{
|
301
|
+
"name": "inset",
|
302
|
+
"type": "Boolean",
|
303
|
+
"default": "N/A",
|
304
|
+
"description": "If `true`, renders the input in a visually inset state."
|
305
|
+
},
|
306
|
+
{
|
307
|
+
"name": "monospace",
|
308
|
+
"type": "Boolean",
|
309
|
+
"default": "N/A",
|
310
|
+
"description": "If `true`, uses a monospace font for the input field."
|
311
|
+
},
|
312
|
+
{
|
313
|
+
"name": "leading_visual",
|
314
|
+
"type": "Hash",
|
315
|
+
"default": "N/A",
|
316
|
+
"description": "Renders a leading visual icon before the text field's cursor. The hash will be passed to Primer's [Octicon component](https://primer.style/view-components/components/octicon)."
|
317
|
+
},
|
318
|
+
{
|
319
|
+
"name": "validation_message",
|
320
|
+
"type": "String",
|
321
|
+
"default": "N/A",
|
322
|
+
"description": "A validation message to display beneath the input. Implicitly sets `invalid` to `true`."
|
323
|
+
},
|
324
|
+
{
|
325
|
+
"name": "label_arguments",
|
326
|
+
"type": "Hash",
|
327
|
+
"default": "N/A",
|
328
|
+
"description": "System arugments passed to the Rails builder's `#label` method. These arguments will appear as HTML attributes on the `<label>` tag."
|
329
|
+
},
|
330
|
+
{
|
331
|
+
"name": "system_arguments",
|
332
|
+
"type": "Hash",
|
333
|
+
"default": "N/A",
|
334
|
+
"description": "[System arguments](/system-arguments)"
|
335
|
+
},
|
336
|
+
{
|
337
|
+
"name": "block",
|
338
|
+
"type": "Proc",
|
339
|
+
"default": "N/A",
|
340
|
+
"description": "Unused."
|
341
|
+
}
|
342
|
+
]
|
343
|
+
},
|
344
|
+
{
|
345
|
+
"component": "ToggleSwitch",
|
346
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/toggle_switch.rb",
|
347
|
+
"parameters": [
|
348
|
+
{
|
349
|
+
"name": "src",
|
350
|
+
"type": "String",
|
351
|
+
"default": "`nil`",
|
352
|
+
"description": "The URL to POST to when the toggle switch is toggled. If `nil`, the toggle switch will not make any requests."
|
353
|
+
},
|
354
|
+
{
|
355
|
+
"name": "csrf_token",
|
356
|
+
"type": "String",
|
357
|
+
"default": "`nil`",
|
358
|
+
"description": "A CSRF token that will be sent to the server as \"authenticity_token\" when the toggle switch is toggled. Unused if `src` is `nil`."
|
359
|
+
},
|
360
|
+
{
|
361
|
+
"name": "checked",
|
362
|
+
"type": "Boolean",
|
363
|
+
"default": "`false`",
|
364
|
+
"description": "Whether the toggle switch is on or off."
|
365
|
+
},
|
366
|
+
{
|
367
|
+
"name": "enabled",
|
368
|
+
"type": "Boolean",
|
369
|
+
"default": "`true`",
|
370
|
+
"description": "Whether or not the toggle switch responds to user input."
|
371
|
+
},
|
372
|
+
{
|
373
|
+
"name": "size",
|
374
|
+
"type": "Symbol",
|
375
|
+
"default": "`:medium`",
|
376
|
+
"description": "What size toggle switch to render. One of `:end` or `:start`."
|
377
|
+
},
|
378
|
+
{
|
379
|
+
"name": "status_label_position",
|
380
|
+
"type": "Symbol",
|
381
|
+
"default": "`:start`",
|
382
|
+
"description": "Which side of the toggle switch to render the status label. One of `:medium` or `:small`."
|
383
|
+
},
|
384
|
+
{
|
385
|
+
"name": "system_arguments",
|
386
|
+
"type": "Hash",
|
387
|
+
"default": "N/A",
|
388
|
+
"description": "[System arguments](/system-arguments)"
|
389
|
+
}
|
390
|
+
]
|
391
|
+
},
|
392
|
+
{
|
393
|
+
"component": "Tooltip",
|
394
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tooltip.rb",
|
395
|
+
"parameters": [
|
396
|
+
{
|
397
|
+
"name": "for_id",
|
398
|
+
"type": "String",
|
399
|
+
"default": "N/A",
|
400
|
+
"description": "The ID of the element that the tooltip should be attached to."
|
401
|
+
},
|
402
|
+
{
|
403
|
+
"name": "type",
|
404
|
+
"type": "Symbol",
|
405
|
+
"default": "N/A",
|
406
|
+
"description": "One of `:description` or `:label`."
|
407
|
+
},
|
408
|
+
{
|
409
|
+
"name": "direction",
|
410
|
+
"type": "Symbol",
|
411
|
+
"default": "`:s`",
|
412
|
+
"description": "One of `:e`, `:n`, `:ne`, `:nw`, `:s`, `:se`, `:sw`, or `:w`."
|
413
|
+
},
|
414
|
+
{
|
415
|
+
"name": "text",
|
416
|
+
"type": "String",
|
417
|
+
"default": "N/A",
|
418
|
+
"description": "The text content of the tooltip. This should be brief and no longer than a sentence."
|
419
|
+
},
|
420
|
+
{
|
421
|
+
"name": "system_arguments",
|
422
|
+
"type": "Hash",
|
423
|
+
"default": "N/A",
|
424
|
+
"description": "[System arguments](/system-arguments)"
|
425
|
+
}
|
426
|
+
]
|
427
|
+
},
|
428
|
+
{
|
429
|
+
"component": "UnderlineNav",
|
430
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/underline_nav.rb",
|
431
|
+
"parameters": [
|
432
|
+
{
|
433
|
+
"name": "tag",
|
434
|
+
"type": "Symbol",
|
435
|
+
"default": "`:nav`",
|
436
|
+
"description": "One of `:div` or `:nav`."
|
437
|
+
},
|
438
|
+
{
|
439
|
+
"name": "label",
|
440
|
+
"type": "String",
|
441
|
+
"default": "N/A",
|
442
|
+
"description": "Sets an `aria-label` that helps assistive technology users understand the purpose of the links, and distinguish it from similar elements."
|
443
|
+
},
|
444
|
+
{
|
445
|
+
"name": "align",
|
446
|
+
"type": "Symbol",
|
447
|
+
"default": "`:left`",
|
448
|
+
"description": "One of `:left` or `:right`. - Defaults to left"
|
449
|
+
},
|
450
|
+
{
|
451
|
+
"name": "body_arguments",
|
452
|
+
"type": "Hash",
|
453
|
+
"default": "`{}`",
|
454
|
+
"description": "[System arguments](/system-arguments) for the body wrapper."
|
455
|
+
},
|
456
|
+
{
|
457
|
+
"name": "system_arguments",
|
458
|
+
"type": "Hash",
|
459
|
+
"default": "N/A",
|
460
|
+
"description": "[System arguments](/system-arguments)"
|
461
|
+
}
|
462
|
+
]
|
463
|
+
},
|
464
|
+
{
|
465
|
+
"component": "UnderlinePanels",
|
466
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/underline_panels.rb",
|
467
|
+
"parameters": [
|
468
|
+
{
|
469
|
+
"name": "label",
|
470
|
+
"type": "String",
|
471
|
+
"default": "N/A",
|
472
|
+
"description": "Sets an `aria-label` that helps assistive technology users understand the purpose of the tabs."
|
473
|
+
},
|
474
|
+
{
|
475
|
+
"name": "align",
|
476
|
+
"type": "Symbol",
|
477
|
+
"default": "`:left`",
|
478
|
+
"description": "One of `:left` or `:right`. - Defaults to left"
|
479
|
+
},
|
480
|
+
{
|
481
|
+
"name": "body_arguments",
|
482
|
+
"type": "Hash",
|
483
|
+
"default": "`{}`",
|
484
|
+
"description": "[System arguments](/system-arguments) for the body wrapper."
|
485
|
+
},
|
486
|
+
{
|
487
|
+
"name": "wrapper_arguments",
|
488
|
+
"type": "Hash",
|
489
|
+
"default": "`{}`",
|
490
|
+
"description": "[System arguments](/system-arguments) for the `TabContainer` wrapper."
|
491
|
+
},
|
492
|
+
{
|
493
|
+
"name": "system_arguments",
|
494
|
+
"type": "Hash",
|
495
|
+
"default": "N/A",
|
496
|
+
"description": "[System arguments](/system-arguments)"
|
497
|
+
}
|
498
|
+
]
|
499
|
+
},
|
500
|
+
{
|
501
|
+
"component": "AutoComplete",
|
502
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/auto_complete.rb",
|
503
|
+
"parameters": [
|
504
|
+
{
|
505
|
+
"name": "label_text",
|
506
|
+
"type": "String",
|
507
|
+
"default": "N/A",
|
508
|
+
"description": "The label of the input."
|
509
|
+
},
|
510
|
+
{
|
511
|
+
"name": "src",
|
512
|
+
"type": "String",
|
513
|
+
"default": "N/A",
|
514
|
+
"description": "The route to query."
|
515
|
+
},
|
516
|
+
{
|
517
|
+
"name": "input_id",
|
518
|
+
"type": "String",
|
519
|
+
"default": "N/A",
|
520
|
+
"description": "Id of the input element."
|
521
|
+
},
|
522
|
+
{
|
523
|
+
"name": "input_name",
|
524
|
+
"type": "String",
|
525
|
+
"default": "`nil`",
|
526
|
+
"description": "Optional name of the input element, defaults to `input_id` when not set."
|
527
|
+
},
|
528
|
+
{
|
529
|
+
"name": "list_id",
|
530
|
+
"type": "String",
|
531
|
+
"default": "N/A",
|
532
|
+
"description": "Id of the list element."
|
533
|
+
},
|
534
|
+
{
|
535
|
+
"name": "visually_hide_label",
|
536
|
+
"type": "Boolean",
|
537
|
+
"default": "`false`",
|
538
|
+
"description": "Controls if the label is visible. If `true`, screen reader only text will be added."
|
539
|
+
},
|
540
|
+
{
|
541
|
+
"name": "show_clear_button",
|
542
|
+
"type": "Boolean",
|
543
|
+
"default": "`false`",
|
544
|
+
"description": "Adds optional clear button."
|
545
|
+
},
|
546
|
+
{
|
547
|
+
"name": "system_arguments",
|
548
|
+
"type": "Hash",
|
549
|
+
"default": "N/A",
|
550
|
+
"description": "[System arguments](/system-arguments)"
|
551
|
+
},
|
552
|
+
{
|
553
|
+
"name": "size",
|
554
|
+
"type": "Hash",
|
555
|
+
"default": "`:medium`",
|
556
|
+
"description": "Input size can be small, medium (default), or large"
|
557
|
+
},
|
558
|
+
{
|
559
|
+
"name": "full_width",
|
560
|
+
"type": "Boolean",
|
561
|
+
"default": "`false`",
|
562
|
+
"description": "Input can be full-width or fit to content"
|
563
|
+
},
|
564
|
+
{
|
565
|
+
"name": "disabled",
|
566
|
+
"type": "Boolean",
|
567
|
+
"default": "`false`",
|
568
|
+
"description": "Disabled input"
|
569
|
+
},
|
570
|
+
{
|
571
|
+
"name": "invalid",
|
572
|
+
"type": "Boolean",
|
573
|
+
"default": "`false`",
|
574
|
+
"description": "Invalid input"
|
575
|
+
},
|
576
|
+
{
|
577
|
+
"name": "placeholder",
|
578
|
+
"type": "String",
|
579
|
+
"default": "`nil`",
|
580
|
+
"description": "The placeholder text displayed within the input"
|
581
|
+
},
|
582
|
+
{
|
583
|
+
"name": "inset",
|
584
|
+
"type": "Boolean",
|
585
|
+
"default": "`false`",
|
586
|
+
"description": "subtle input background color"
|
587
|
+
},
|
588
|
+
{
|
589
|
+
"name": "monospace",
|
590
|
+
"type": "Boolean",
|
591
|
+
"default": "`false`",
|
592
|
+
"description": "monospace input font family"
|
593
|
+
}
|
594
|
+
]
|
595
|
+
},
|
596
|
+
{
|
597
|
+
"component": "AutoCompleteItem",
|
598
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/auto_complete/item.rb",
|
599
|
+
"parameters": [
|
600
|
+
{
|
601
|
+
"name": "value",
|
602
|
+
"type": "String",
|
603
|
+
"default": "N/A",
|
604
|
+
"description": "Value of the item."
|
605
|
+
},
|
606
|
+
{
|
607
|
+
"name": "selected",
|
608
|
+
"type": "Boolean",
|
609
|
+
"default": "`false`",
|
610
|
+
"description": "Whether the item is selected."
|
611
|
+
},
|
612
|
+
{
|
613
|
+
"name": "disabled",
|
614
|
+
"type": "Boolean",
|
615
|
+
"default": "`false`",
|
616
|
+
"description": "Whether the item is disabled."
|
617
|
+
},
|
618
|
+
{
|
619
|
+
"name": "description_variant",
|
620
|
+
"type": "Hash",
|
621
|
+
"default": "`:block`",
|
622
|
+
"description": "Changes the description style. Allowed values are :inline, :block"
|
623
|
+
},
|
624
|
+
{
|
625
|
+
"name": "description",
|
626
|
+
"type": "String",
|
627
|
+
"default": "N/A",
|
628
|
+
"description": "Display description text below label"
|
629
|
+
},
|
630
|
+
{
|
631
|
+
"name": "system_arguments",
|
632
|
+
"type": "Hash",
|
633
|
+
"default": "N/A",
|
634
|
+
"description": "[System arguments](/system-arguments)"
|
635
|
+
}
|
636
|
+
]
|
637
|
+
},
|
638
|
+
{
|
639
|
+
"component": "Avatar",
|
640
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/avatar.rb",
|
641
|
+
"parameters": [
|
642
|
+
{
|
643
|
+
"name": "src",
|
644
|
+
"type": "String",
|
645
|
+
"default": "N/A",
|
646
|
+
"description": "The source url of the avatar image."
|
647
|
+
},
|
648
|
+
{
|
649
|
+
"name": "alt",
|
650
|
+
"type": "String",
|
651
|
+
"default": "N/A",
|
652
|
+
"description": "Passed through to alt on img tag."
|
653
|
+
},
|
654
|
+
{
|
655
|
+
"name": "size",
|
656
|
+
"type": "Integer",
|
657
|
+
"default": "`20`",
|
658
|
+
"description": "One of `16`, `20`, `24`, `32`, `40`, `48`, or `80`."
|
659
|
+
},
|
660
|
+
{
|
661
|
+
"name": "shape",
|
662
|
+
"type": "Symbol",
|
663
|
+
"default": "`:circle`",
|
664
|
+
"description": "Shape of the avatar. One of `:circle` or `:square`."
|
665
|
+
},
|
666
|
+
{
|
667
|
+
"name": "href",
|
668
|
+
"type": "String",
|
669
|
+
"default": "`nil`",
|
670
|
+
"description": "The URL to link to. If used, component will be wrapped by an `<a>` tag."
|
671
|
+
},
|
672
|
+
{
|
673
|
+
"name": "system_arguments",
|
674
|
+
"type": "Hash",
|
675
|
+
"default": "N/A",
|
676
|
+
"description": "[System arguments](/system-arguments)"
|
677
|
+
}
|
678
|
+
]
|
679
|
+
},
|
680
|
+
{
|
681
|
+
"component": "AvatarStack",
|
682
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/avatar_stack.rb",
|
683
|
+
"parameters": [
|
684
|
+
{
|
685
|
+
"name": "tag",
|
686
|
+
"type": "Symbol",
|
687
|
+
"default": "`:div`",
|
688
|
+
"description": "One of `:div` or `:span`."
|
689
|
+
},
|
690
|
+
{
|
691
|
+
"name": "align",
|
692
|
+
"type": "Symbol",
|
693
|
+
"default": "`:left`",
|
694
|
+
"description": "One of `:left` or `:right`."
|
695
|
+
},
|
696
|
+
{
|
697
|
+
"name": "tooltipped",
|
698
|
+
"type": "Boolean",
|
699
|
+
"default": "`false`",
|
700
|
+
"description": "Whether to add a tooltip to the stack or not."
|
701
|
+
},
|
702
|
+
{
|
703
|
+
"name": "body_arguments",
|
704
|
+
"type": "Hash",
|
705
|
+
"default": "`{}`",
|
706
|
+
"description": "Parameters to add to the Body. If `tooltipped` is set, has the same arguments as [Tooltip](/components/tooltip). The default tag is `:div` but can be changed using `tag:` to one of `:div` or `:span`."
|
707
|
+
},
|
708
|
+
{
|
709
|
+
"name": "system_arguments",
|
710
|
+
"type": "Hash",
|
711
|
+
"default": "N/A",
|
712
|
+
"description": "[System arguments](/system-arguments)"
|
713
|
+
}
|
714
|
+
]
|
715
|
+
},
|
716
|
+
{
|
717
|
+
"component": "BaseButton",
|
718
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/base_button.rb",
|
719
|
+
"parameters": [
|
720
|
+
{
|
721
|
+
"name": "tag",
|
722
|
+
"type": "Symbol",
|
723
|
+
"default": "`:button`",
|
724
|
+
"description": "One of `:a`, `:button`, or `:summary`."
|
725
|
+
},
|
726
|
+
{
|
727
|
+
"name": "type",
|
728
|
+
"type": "Symbol",
|
729
|
+
"default": "`:button`",
|
730
|
+
"description": "One of `:button`, `:reset`, or `:submit`."
|
731
|
+
},
|
732
|
+
{
|
733
|
+
"name": "block",
|
734
|
+
"type": "Boolean",
|
735
|
+
"default": "`false`",
|
736
|
+
"description": "Whether button is full-width with `display: block`."
|
737
|
+
},
|
738
|
+
{
|
739
|
+
"name": "system_arguments",
|
740
|
+
"type": "Hash",
|
741
|
+
"default": "N/A",
|
742
|
+
"description": "[System arguments](/system-arguments)"
|
743
|
+
}
|
744
|
+
]
|
745
|
+
},
|
746
|
+
{
|
747
|
+
"component": "Blankslate",
|
748
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/blankslate.rb",
|
749
|
+
"parameters": [
|
750
|
+
{
|
751
|
+
"name": "narrow",
|
752
|
+
"type": "Boolean",
|
753
|
+
"default": "`false`",
|
754
|
+
"description": "Adds a maximum width of `485px` to the Blankslate."
|
755
|
+
},
|
756
|
+
{
|
757
|
+
"name": "spacious",
|
758
|
+
"type": "Boolean",
|
759
|
+
"default": "`false`",
|
760
|
+
"description": "Increases the padding from `32px` to `80px 40px`."
|
761
|
+
},
|
762
|
+
{
|
763
|
+
"name": "border",
|
764
|
+
"type": "Boolean",
|
765
|
+
"default": "`false`",
|
766
|
+
"description": "Adds a border around the Blankslate."
|
767
|
+
},
|
768
|
+
{
|
769
|
+
"name": "system_arguments",
|
770
|
+
"type": "Hash",
|
771
|
+
"default": "N/A",
|
772
|
+
"description": "[System arguments](/system-arguments)"
|
773
|
+
}
|
774
|
+
]
|
775
|
+
},
|
776
|
+
{
|
777
|
+
"component": "BorderBox",
|
778
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/border_box.rb",
|
779
|
+
"parameters": [
|
780
|
+
{
|
781
|
+
"name": "padding",
|
782
|
+
"type": "Symbol",
|
783
|
+
"default": "`:default`",
|
784
|
+
"description": "One of `:condensed`, `:default`, or `:spacious`."
|
785
|
+
},
|
786
|
+
{
|
787
|
+
"name": "system_arguments",
|
788
|
+
"type": "Hash",
|
789
|
+
"default": "N/A",
|
790
|
+
"description": "[System arguments](/system-arguments)"
|
791
|
+
}
|
792
|
+
]
|
793
|
+
},
|
794
|
+
{
|
795
|
+
"component": "BorderBoxHeader",
|
796
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/border_box/header.rb",
|
797
|
+
"parameters": [
|
798
|
+
{
|
799
|
+
"name": "system_arguments",
|
800
|
+
"type": "Hash",
|
801
|
+
"default": "N/A",
|
802
|
+
"description": "[System arguments](/system-arguments)"
|
803
|
+
}
|
804
|
+
]
|
805
|
+
},
|
806
|
+
{
|
807
|
+
"component": "Breadcrumbs",
|
808
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/breadcrumbs.rb",
|
809
|
+
"parameters": [
|
810
|
+
{
|
811
|
+
"name": "system_arguments",
|
812
|
+
"type": "Hash",
|
813
|
+
"default": "N/A",
|
814
|
+
"description": "[System arguments](/system-arguments)"
|
815
|
+
}
|
816
|
+
]
|
817
|
+
},
|
818
|
+
{
|
819
|
+
"component": "Button",
|
820
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/button.rb",
|
821
|
+
"parameters": [
|
822
|
+
{
|
823
|
+
"name": "scheme",
|
824
|
+
"type": "Symbol",
|
825
|
+
"default": "`:default`",
|
826
|
+
"description": "One of `:danger`, `:default`, `:invisible`, `:link`, `:primary`, or `:secondary`."
|
827
|
+
},
|
828
|
+
{
|
829
|
+
"name": "size",
|
830
|
+
"type": "Symbol",
|
831
|
+
"default": "`:medium`",
|
832
|
+
"description": "One of `:large`, `:medium`, or `:small`."
|
833
|
+
},
|
834
|
+
{
|
835
|
+
"name": "block",
|
836
|
+
"type": "Boolean",
|
837
|
+
"default": "`false`",
|
838
|
+
"description": "Whether button is full-width with `display: block`."
|
839
|
+
},
|
840
|
+
{
|
841
|
+
"name": "align_content",
|
842
|
+
"type": "Symbol",
|
843
|
+
"default": "`:center`",
|
844
|
+
"description": "One of `:center` or `:start`."
|
845
|
+
},
|
846
|
+
{
|
847
|
+
"name": "tag",
|
848
|
+
"type": "Symbol",
|
849
|
+
"default": "`:button`",
|
850
|
+
"description": "One of `:a`, `:button`, or `:summary`."
|
851
|
+
},
|
852
|
+
{
|
853
|
+
"name": "type",
|
854
|
+
"type": "Symbol",
|
855
|
+
"default": "`:button`",
|
856
|
+
"description": "One of `:button`, `:reset`, or `:submit`."
|
857
|
+
},
|
858
|
+
{
|
859
|
+
"name": "system_arguments",
|
860
|
+
"type": "Hash",
|
861
|
+
"default": "N/A",
|
862
|
+
"description": "[System arguments](/system-arguments)"
|
863
|
+
}
|
864
|
+
]
|
865
|
+
},
|
866
|
+
{
|
867
|
+
"component": "ButtonGroup",
|
868
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/button_group.rb",
|
869
|
+
"parameters": [
|
870
|
+
{
|
871
|
+
"name": "variant",
|
872
|
+
"type": "Symbol",
|
873
|
+
"default": "`nil`",
|
874
|
+
"description": "DEPRECATED. One of `:medium` or `:small`."
|
875
|
+
},
|
876
|
+
{
|
877
|
+
"name": "size",
|
878
|
+
"type": "Symbol",
|
879
|
+
"default": "`:medium`",
|
880
|
+
"description": "One of `:medium` or `:small`."
|
881
|
+
},
|
882
|
+
{
|
883
|
+
"name": "system_arguments",
|
884
|
+
"type": "Hash",
|
885
|
+
"default": "N/A",
|
886
|
+
"description": "[System arguments](/system-arguments)"
|
887
|
+
}
|
888
|
+
]
|
889
|
+
},
|
890
|
+
{
|
891
|
+
"component": "CloseButton",
|
892
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/close_button.rb",
|
893
|
+
"parameters": [
|
894
|
+
{
|
895
|
+
"name": "type",
|
896
|
+
"type": "Symbol",
|
897
|
+
"default": "`:button`",
|
898
|
+
"description": "One of `:button` or `:submit`."
|
899
|
+
},
|
900
|
+
{
|
901
|
+
"name": "system_arguments",
|
902
|
+
"type": "Hash",
|
903
|
+
"default": "N/A",
|
904
|
+
"description": "[System arguments](/system-arguments)"
|
905
|
+
}
|
906
|
+
]
|
907
|
+
},
|
908
|
+
{
|
909
|
+
"component": "Counter",
|
910
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/counter.rb",
|
911
|
+
"parameters": [
|
912
|
+
{
|
913
|
+
"name": "count",
|
914
|
+
"type": "Integer, Float::INFINITY, nil",
|
915
|
+
"default": "`0`",
|
916
|
+
"description": "The number to be displayed (e.x. # of issues, pull requests)"
|
917
|
+
},
|
918
|
+
{
|
919
|
+
"name": "scheme",
|
920
|
+
"type": "Symbol",
|
921
|
+
"default": "`:default`",
|
922
|
+
"description": "Color scheme. One of `:default`, `:primary`, or `:secondary`."
|
923
|
+
},
|
924
|
+
{
|
925
|
+
"name": "limit",
|
926
|
+
"type": "Integer, nil",
|
927
|
+
"default": "`5_000`",
|
928
|
+
"description": "Maximum value to display. Pass `nil` for no limit. (e.x. if `count` == 6,000 and `limit` == 5000, counter will display \"5,000+\")"
|
929
|
+
},
|
930
|
+
{
|
931
|
+
"name": "hide_if_zero",
|
932
|
+
"type": "Boolean",
|
933
|
+
"default": "`false`",
|
934
|
+
"description": "If true, a `hidden` attribute is added to the counter if `count` is zero."
|
935
|
+
},
|
936
|
+
{
|
937
|
+
"name": "text",
|
938
|
+
"type": "String",
|
939
|
+
"default": "`\"\"`",
|
940
|
+
"description": "Text to display instead of count."
|
941
|
+
},
|
942
|
+
{
|
943
|
+
"name": "round",
|
944
|
+
"type": "Boolean",
|
945
|
+
"default": "`false`",
|
946
|
+
"description": "Whether to apply our standard rounding logic to value."
|
947
|
+
},
|
948
|
+
{
|
949
|
+
"name": "system_arguments",
|
950
|
+
"type": "Hash",
|
951
|
+
"default": "N/A",
|
952
|
+
"description": "[System arguments](/system-arguments)"
|
953
|
+
}
|
954
|
+
]
|
955
|
+
},
|
956
|
+
{
|
957
|
+
"component": "Details",
|
958
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/details.rb",
|
959
|
+
"parameters": [
|
960
|
+
{
|
961
|
+
"name": "overlay",
|
962
|
+
"type": "Symbol",
|
963
|
+
"default": "`:none`",
|
964
|
+
"description": "Dictates the type of overlay to render with. One of `:dark`, `:default`, or `:none`."
|
965
|
+
},
|
966
|
+
{
|
967
|
+
"name": "reset",
|
968
|
+
"type": "Boolean",
|
969
|
+
"default": "`false`",
|
970
|
+
"description": "Defaults to false. If set to true, it will remove the default caret and remove style from the summary element"
|
971
|
+
},
|
972
|
+
{
|
973
|
+
"name": "system_arguments",
|
974
|
+
"type": "Hash",
|
975
|
+
"default": "N/A",
|
976
|
+
"description": "[System arguments](/system-arguments)"
|
977
|
+
}
|
978
|
+
]
|
979
|
+
},
|
980
|
+
{
|
981
|
+
"component": "Flash",
|
982
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/flash.rb",
|
983
|
+
"parameters": [
|
984
|
+
{
|
985
|
+
"name": "full",
|
986
|
+
"type": "Boolean",
|
987
|
+
"default": "`false`",
|
988
|
+
"description": "Whether the component should take up the full width of the screen."
|
989
|
+
},
|
990
|
+
{
|
991
|
+
"name": "spacious",
|
992
|
+
"type": "Boolean",
|
993
|
+
"default": "`false`",
|
994
|
+
"description": "Whether to add margin to the bottom of the component."
|
995
|
+
},
|
996
|
+
{
|
997
|
+
"name": "dismissible",
|
998
|
+
"type": "Boolean",
|
999
|
+
"default": "`false`",
|
1000
|
+
"description": "Whether the component can be dismissed with an X button."
|
1001
|
+
},
|
1002
|
+
{
|
1003
|
+
"name": "icon",
|
1004
|
+
"type": "Symbol",
|
1005
|
+
"default": "`nil`",
|
1006
|
+
"description": "Name of Octicon icon to use."
|
1007
|
+
},
|
1008
|
+
{
|
1009
|
+
"name": "scheme",
|
1010
|
+
"type": "Symbol",
|
1011
|
+
"default": "`:default`",
|
1012
|
+
"description": "One of `:danger`, `:default`, `:success`, or `:warning`."
|
1013
|
+
},
|
1014
|
+
{
|
1015
|
+
"name": "system_arguments",
|
1016
|
+
"type": "Hash",
|
1017
|
+
"default": "N/A",
|
1018
|
+
"description": "[System arguments](/system-arguments)"
|
1019
|
+
}
|
1020
|
+
]
|
1021
|
+
},
|
1022
|
+
{
|
1023
|
+
"component": "Heading",
|
1024
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/heading.rb",
|
1025
|
+
"parameters": [
|
1026
|
+
{
|
1027
|
+
"name": "tag",
|
1028
|
+
"type": "String",
|
1029
|
+
"default": "N/A",
|
1030
|
+
"description": "One of `:h1`, `:h2`, `:h3`, `:h4`, `:h5`, or `:h6`."
|
1031
|
+
},
|
1032
|
+
{
|
1033
|
+
"name": "system_arguments",
|
1034
|
+
"type": "Hash",
|
1035
|
+
"default": "N/A",
|
1036
|
+
"description": "[System arguments](/system-arguments)"
|
1037
|
+
}
|
1038
|
+
]
|
1039
|
+
},
|
1040
|
+
{
|
1041
|
+
"component": "IconButton",
|
1042
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/icon_button.rb",
|
1043
|
+
"parameters": [
|
1044
|
+
{
|
1045
|
+
"name": "icon",
|
1046
|
+
"type": "String",
|
1047
|
+
"default": "N/A",
|
1048
|
+
"description": "Name of [Octicon](https://primer.style/octicons/) to use."
|
1049
|
+
},
|
1050
|
+
{
|
1051
|
+
"name": "wrapper_arguments",
|
1052
|
+
"type": "Hash",
|
1053
|
+
"default": "`{}`",
|
1054
|
+
"description": "Optional keyword arguments to be passed to the wrapper `<div>` tag."
|
1055
|
+
},
|
1056
|
+
{
|
1057
|
+
"name": "scheme",
|
1058
|
+
"type": "Symbol",
|
1059
|
+
"default": "`:default`",
|
1060
|
+
"description": "One of `:danger`, `:default`, or `:invisible`."
|
1061
|
+
},
|
1062
|
+
{
|
1063
|
+
"name": "size",
|
1064
|
+
"type": "Symbol",
|
1065
|
+
"default": "`:medium`",
|
1066
|
+
"description": "One of `:large`, `:medium`, or `:small`."
|
1067
|
+
},
|
1068
|
+
{
|
1069
|
+
"name": "tag",
|
1070
|
+
"type": "Symbol",
|
1071
|
+
"default": "N/A",
|
1072
|
+
"description": "One of `:a`, `:button`, or `:summary`."
|
1073
|
+
},
|
1074
|
+
{
|
1075
|
+
"name": "type",
|
1076
|
+
"type": "Symbol",
|
1077
|
+
"default": "N/A",
|
1078
|
+
"description": "One of `:button`, `:reset`, or `:submit`."
|
1079
|
+
},
|
1080
|
+
{
|
1081
|
+
"name": "aria-label",
|
1082
|
+
"type": "String",
|
1083
|
+
"default": "N/A",
|
1084
|
+
"description": "String that can be read by assistive technology. A label should be short and concise. See the accessibility section for more information."
|
1085
|
+
},
|
1086
|
+
{
|
1087
|
+
"name": "aria-description",
|
1088
|
+
"type": "String",
|
1089
|
+
"default": "N/A",
|
1090
|
+
"description": "String that can be read by assistive technology. A description can be longer as it is intended to provide more context and information. See the accessibility section for more information."
|
1091
|
+
},
|
1092
|
+
{
|
1093
|
+
"name": "tooltip_direction",
|
1094
|
+
"type": "Symbol",
|
1095
|
+
"default": "`:s`",
|
1096
|
+
"description": "One of `:e`, `:n`, `:ne`, `:nw`, `:s`, `:se`, `:sw`, or `:w`."
|
1097
|
+
},
|
1098
|
+
{
|
1099
|
+
"name": "system_arguments",
|
1100
|
+
"type": "Hash",
|
1101
|
+
"default": "N/A",
|
1102
|
+
"description": "[System arguments](/system-arguments)"
|
1103
|
+
}
|
1104
|
+
]
|
1105
|
+
},
|
1106
|
+
{
|
1107
|
+
"component": "Text",
|
1108
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/text.rb",
|
1109
|
+
"parameters": [
|
1110
|
+
{
|
1111
|
+
"name": "tag",
|
1112
|
+
"type": "Symbol",
|
1113
|
+
"default": "`:span`",
|
1114
|
+
"description": ""
|
1115
|
+
},
|
1116
|
+
{
|
1117
|
+
"name": "system_arguments",
|
1118
|
+
"type": "Hash",
|
1119
|
+
"default": "N/A",
|
1120
|
+
"description": "[System arguments](/system-arguments)"
|
1121
|
+
}
|
1122
|
+
]
|
1123
|
+
},
|
1124
|
+
{
|
1125
|
+
"component": "Truncate",
|
1126
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/truncate.rb",
|
1127
|
+
"parameters": [
|
1128
|
+
{
|
1129
|
+
"name": "system_arguments",
|
1130
|
+
"type": "Hash",
|
1131
|
+
"default": "N/A",
|
1132
|
+
"description": "[System arguments](/system-arguments)"
|
1133
|
+
}
|
1134
|
+
]
|
1135
|
+
},
|
1136
|
+
{
|
1137
|
+
"component": "Box",
|
1138
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/box.rb",
|
1139
|
+
"parameters": [
|
1140
|
+
{
|
1141
|
+
"name": "system_arguments",
|
1142
|
+
"type": "Hash",
|
1143
|
+
"default": "N/A",
|
1144
|
+
"description": "[System arguments](/system-arguments)"
|
1145
|
+
}
|
1146
|
+
]
|
1147
|
+
},
|
1148
|
+
{
|
1149
|
+
"component": "Button",
|
1150
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/button_component.rb",
|
1151
|
+
"parameters": [
|
1152
|
+
{
|
1153
|
+
"name": "scheme",
|
1154
|
+
"type": "Symbol",
|
1155
|
+
"default": "`:default`",
|
1156
|
+
"description": "One of `:danger`, `:default`, `:invisible`, `:link`, `:outline`, or `:primary`."
|
1157
|
+
},
|
1158
|
+
{
|
1159
|
+
"name": "variant",
|
1160
|
+
"type": "Symbol",
|
1161
|
+
"default": "`nil`",
|
1162
|
+
"description": "DEPRECATED. One of `:medium` or `:small`."
|
1163
|
+
},
|
1164
|
+
{
|
1165
|
+
"name": "size",
|
1166
|
+
"type": "Symbol",
|
1167
|
+
"default": "`:medium`",
|
1168
|
+
"description": "One of `:medium` or `:small`."
|
1169
|
+
},
|
1170
|
+
{
|
1171
|
+
"name": "tag",
|
1172
|
+
"type": "Symbol",
|
1173
|
+
"default": "`:button`",
|
1174
|
+
"description": "One of `:a`, `:button`, or `:summary`."
|
1175
|
+
},
|
1176
|
+
{
|
1177
|
+
"name": "type",
|
1178
|
+
"type": "Symbol",
|
1179
|
+
"default": "`:button`",
|
1180
|
+
"description": "One of `:button`, `:reset`, or `:submit`."
|
1181
|
+
},
|
1182
|
+
{
|
1183
|
+
"name": "group_item",
|
1184
|
+
"type": "Boolean",
|
1185
|
+
"default": "`false`",
|
1186
|
+
"description": "Whether button is part of a ButtonGroup."
|
1187
|
+
},
|
1188
|
+
{
|
1189
|
+
"name": "block",
|
1190
|
+
"type": "Boolean",
|
1191
|
+
"default": "`false`",
|
1192
|
+
"description": "Whether button is full-width with `display: block`."
|
1193
|
+
},
|
1194
|
+
{
|
1195
|
+
"name": "dropdown",
|
1196
|
+
"type": "Boolean",
|
1197
|
+
"default": "`false`",
|
1198
|
+
"description": "Whether or not to render a dropdown caret."
|
1199
|
+
},
|
1200
|
+
{
|
1201
|
+
"name": "system_arguments",
|
1202
|
+
"type": "Hash",
|
1203
|
+
"default": "N/A",
|
1204
|
+
"description": "[System arguments](/system-arguments)"
|
1205
|
+
}
|
1206
|
+
]
|
1207
|
+
},
|
1208
|
+
{
|
1209
|
+
"component": "ClipboardCopy",
|
1210
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/clipboard_copy.rb",
|
1211
|
+
"parameters": [
|
1212
|
+
{
|
1213
|
+
"name": "aria-label",
|
1214
|
+
"type": "String",
|
1215
|
+
"default": "N/A",
|
1216
|
+
"description": "String that will be read to screenreaders when the component is focused"
|
1217
|
+
},
|
1218
|
+
{
|
1219
|
+
"name": "value",
|
1220
|
+
"type": "String",
|
1221
|
+
"default": "`nil`",
|
1222
|
+
"description": "Text to copy into the users clipboard when they click the component."
|
1223
|
+
},
|
1224
|
+
{
|
1225
|
+
"name": "for",
|
1226
|
+
"type": "String",
|
1227
|
+
"default": "N/A",
|
1228
|
+
"description": "Element id from where to get the copied value."
|
1229
|
+
},
|
1230
|
+
{
|
1231
|
+
"name": "system_arguments",
|
1232
|
+
"type": "Hash",
|
1233
|
+
"default": "N/A",
|
1234
|
+
"description": "[System arguments](/system-arguments)"
|
1235
|
+
}
|
1236
|
+
]
|
1237
|
+
},
|
1238
|
+
{
|
1239
|
+
"component": "Dropdown",
|
1240
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/dropdown.rb",
|
1241
|
+
"parameters": [
|
1242
|
+
{
|
1243
|
+
"name": "overlay",
|
1244
|
+
"type": "Symbol",
|
1245
|
+
"default": "`:default`",
|
1246
|
+
"description": "One of `:dark`, `:default`, or `:none`."
|
1247
|
+
},
|
1248
|
+
{
|
1249
|
+
"name": "with_caret",
|
1250
|
+
"type": "Boolean",
|
1251
|
+
"default": "`false`",
|
1252
|
+
"description": "Whether or not a caret should be rendered in the button."
|
1253
|
+
},
|
1254
|
+
{
|
1255
|
+
"name": "system_arguments",
|
1256
|
+
"type": "Hash",
|
1257
|
+
"default": "N/A",
|
1258
|
+
"description": "[System arguments](/system-arguments)"
|
1259
|
+
}
|
1260
|
+
]
|
1261
|
+
},
|
1262
|
+
{
|
1263
|
+
"component": "DropdownMenu",
|
1264
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/dropdown_menu_component.rb",
|
1265
|
+
"parameters": [
|
1266
|
+
{
|
1267
|
+
"name": "direction",
|
1268
|
+
"type": "Symbol",
|
1269
|
+
"default": "`:se`",
|
1270
|
+
"description": "One of `:e`, `:ne`, `:s`, `:se`, `:sw`, or `:w`."
|
1271
|
+
},
|
1272
|
+
{
|
1273
|
+
"name": "scheme",
|
1274
|
+
"type": "Symbol",
|
1275
|
+
"default": "`:default`",
|
1276
|
+
"description": "Pass `:dark` for dark mode theming"
|
1277
|
+
},
|
1278
|
+
{
|
1279
|
+
"name": "header",
|
1280
|
+
"type": "String",
|
1281
|
+
"default": "`nil`",
|
1282
|
+
"description": "Optional string to display as the header"
|
1283
|
+
},
|
1284
|
+
{
|
1285
|
+
"name": "system_arguments",
|
1286
|
+
"type": "Hash",
|
1287
|
+
"default": "N/A",
|
1288
|
+
"description": "[System arguments](/system-arguments)"
|
1289
|
+
}
|
1290
|
+
]
|
1291
|
+
},
|
1292
|
+
{
|
1293
|
+
"component": "Flex",
|
1294
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/flex_component.rb",
|
1295
|
+
"parameters": [
|
1296
|
+
{
|
1297
|
+
"name": "justify_content",
|
1298
|
+
"type": "Symbol",
|
1299
|
+
"default": "`JUSTIFY_CONTENT_DEFAULT`",
|
1300
|
+
"description": "Use this param to distribute space between and around flex items along the main axis of the container. One of `nil`, `:center`, `:flex_end`, `:flex_start`, `:space_around`, or `:space_between`."
|
1301
|
+
},
|
1302
|
+
{
|
1303
|
+
"name": "inline",
|
1304
|
+
"type": "Boolean",
|
1305
|
+
"default": "`false`",
|
1306
|
+
"description": "Defaults to false."
|
1307
|
+
},
|
1308
|
+
{
|
1309
|
+
"name": "flex_wrap",
|
1310
|
+
"type": "Boolean",
|
1311
|
+
"default": "`FLEX_WRAP_DEFAULT`",
|
1312
|
+
"description": "Defaults to nil."
|
1313
|
+
},
|
1314
|
+
{
|
1315
|
+
"name": "align_items",
|
1316
|
+
"type": "Symbol",
|
1317
|
+
"default": "`ALIGN_ITEMS_DEFAULT`",
|
1318
|
+
"description": "Use this param to align items on the cross axis. One of `nil`, `:baseline`, `:center`, `:end`, `:start`, or `:stretch`."
|
1319
|
+
},
|
1320
|
+
{
|
1321
|
+
"name": "direction",
|
1322
|
+
"type": "Symbol",
|
1323
|
+
"default": "`nil`",
|
1324
|
+
"description": "Use this param to define the orientation of the main axis (row or column). By default, flex items will display in a row. One of `nil`, `:column`, `:column_reverse`, `:row`, or `:row_reverse`."
|
1325
|
+
},
|
1326
|
+
{
|
1327
|
+
"name": "system_arguments",
|
1328
|
+
"type": "Hash",
|
1329
|
+
"default": "N/A",
|
1330
|
+
"description": "[System arguments](/system-arguments)"
|
1331
|
+
}
|
1332
|
+
]
|
1333
|
+
},
|
1334
|
+
{
|
1335
|
+
"component": "FlexItem",
|
1336
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/flex_item_component.rb",
|
1337
|
+
"parameters": [
|
1338
|
+
{
|
1339
|
+
"name": "flex_auto",
|
1340
|
+
"type": "Boolean",
|
1341
|
+
"default": "`false`",
|
1342
|
+
"description": "Fills available space and auto-sizes based on the content. Defaults to false"
|
1343
|
+
},
|
1344
|
+
{
|
1345
|
+
"name": "system_arguments",
|
1346
|
+
"type": "Hash",
|
1347
|
+
"default": "N/A",
|
1348
|
+
"description": "[System arguments](/system-arguments)"
|
1349
|
+
}
|
1350
|
+
]
|
1351
|
+
},
|
1352
|
+
{
|
1353
|
+
"component": "HellipButton",
|
1354
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/hellip_button.rb",
|
1355
|
+
"parameters": [
|
1356
|
+
{
|
1357
|
+
"name": "inline",
|
1358
|
+
"type": "Boolean",
|
1359
|
+
"default": "`false`",
|
1360
|
+
"description": "Whether or not the button is inline."
|
1361
|
+
},
|
1362
|
+
{
|
1363
|
+
"name": "system_arguments",
|
1364
|
+
"type": "Hash",
|
1365
|
+
"default": "N/A",
|
1366
|
+
"description": "[System arguments](/system-arguments)"
|
1367
|
+
}
|
1368
|
+
]
|
1369
|
+
},
|
1370
|
+
{
|
1371
|
+
"component": "IconButton",
|
1372
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/icon_button.rb",
|
1373
|
+
"parameters": [
|
1374
|
+
{
|
1375
|
+
"name": "scheme",
|
1376
|
+
"type": "Symbol",
|
1377
|
+
"default": "`:default`",
|
1378
|
+
"description": "One of `:danger` or `:default`."
|
1379
|
+
},
|
1380
|
+
{
|
1381
|
+
"name": "icon",
|
1382
|
+
"type": "String",
|
1383
|
+
"default": "N/A",
|
1384
|
+
"description": "Name of [Octicon](https://primer.style/octicons/) to use."
|
1385
|
+
},
|
1386
|
+
{
|
1387
|
+
"name": "tag",
|
1388
|
+
"type": "Symbol",
|
1389
|
+
"default": "N/A",
|
1390
|
+
"description": "One of `:a`, `:button`, or `:summary`."
|
1391
|
+
},
|
1392
|
+
{
|
1393
|
+
"name": "type",
|
1394
|
+
"type": "Symbol",
|
1395
|
+
"default": "N/A",
|
1396
|
+
"description": "One of `:button`, `:reset`, or `:submit`."
|
1397
|
+
},
|
1398
|
+
{
|
1399
|
+
"name": "aria-label",
|
1400
|
+
"type": "String",
|
1401
|
+
"default": "N/A",
|
1402
|
+
"description": "String that can be read by assistive technology. A label should be short and concise. See the accessibility section for more information."
|
1403
|
+
},
|
1404
|
+
{
|
1405
|
+
"name": "aria-description",
|
1406
|
+
"type": "String",
|
1407
|
+
"default": "N/A",
|
1408
|
+
"description": "String that can be read by assistive technology. A description can be longer as it is intended to provide more context and information. See the accessibility section for more information."
|
1409
|
+
},
|
1410
|
+
{
|
1411
|
+
"name": "tooltip_direction",
|
1412
|
+
"type": "Symbol",
|
1413
|
+
"default": "`:s`",
|
1414
|
+
"description": "One of `:e`, `:n`, `:ne`, `:nw`, `:s`, `:se`, `:sw`, or `:w`."
|
1415
|
+
},
|
1416
|
+
{
|
1417
|
+
"name": "box",
|
1418
|
+
"type": "Boolean",
|
1419
|
+
"default": "`false`",
|
1420
|
+
"description": "Whether the button is in a [BorderBox](/components/beta/borderbox). If `true`, the button will have the `Box-btn-octicon` class."
|
1421
|
+
},
|
1422
|
+
{
|
1423
|
+
"name": "system_arguments",
|
1424
|
+
"type": "Hash",
|
1425
|
+
"default": "N/A",
|
1426
|
+
"description": "[System arguments](/system-arguments)"
|
1427
|
+
}
|
1428
|
+
]
|
1429
|
+
},
|
1430
|
+
{
|
1431
|
+
"component": "Image",
|
1432
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/image.rb",
|
1433
|
+
"parameters": [
|
1434
|
+
{
|
1435
|
+
"name": "src",
|
1436
|
+
"type": "String",
|
1437
|
+
"default": "N/A",
|
1438
|
+
"description": "The source url of the image."
|
1439
|
+
},
|
1440
|
+
{
|
1441
|
+
"name": "alt",
|
1442
|
+
"type": "String",
|
1443
|
+
"default": "N/A",
|
1444
|
+
"description": "Specifies an alternate text for the image."
|
1445
|
+
},
|
1446
|
+
{
|
1447
|
+
"name": "lazy",
|
1448
|
+
"type": "Boolean",
|
1449
|
+
"default": "`false`",
|
1450
|
+
"description": "Whether or not to lazily load the image."
|
1451
|
+
},
|
1452
|
+
{
|
1453
|
+
"name": "system_arguments",
|
1454
|
+
"type": "Hash",
|
1455
|
+
"default": "N/A",
|
1456
|
+
"description": "[System arguments](/system-arguments)"
|
1457
|
+
}
|
1458
|
+
]
|
1459
|
+
},
|
1460
|
+
{
|
1461
|
+
"component": "ImageCrop",
|
1462
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/image_crop.rb",
|
1463
|
+
"parameters": [
|
1464
|
+
{
|
1465
|
+
"name": "src",
|
1466
|
+
"type": "String",
|
1467
|
+
"default": "N/A",
|
1468
|
+
"description": "The path of the image to crop."
|
1469
|
+
},
|
1470
|
+
{
|
1471
|
+
"name": "rounded",
|
1472
|
+
"type": "Boolean",
|
1473
|
+
"default": "`true`",
|
1474
|
+
"description": "If the crop mask should be a circle. Defaults to true."
|
1475
|
+
},
|
1476
|
+
{
|
1477
|
+
"name": "system_arguments",
|
1478
|
+
"type": "Hash",
|
1479
|
+
"default": "N/A",
|
1480
|
+
"description": "[System arguments](/system-arguments)"
|
1481
|
+
}
|
1482
|
+
]
|
1483
|
+
},
|
1484
|
+
{
|
1485
|
+
"component": "Label",
|
1486
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/label_component.rb",
|
1487
|
+
"parameters": [
|
1488
|
+
{
|
1489
|
+
"name": "tag",
|
1490
|
+
"type": "Symbol",
|
1491
|
+
"default": "`:span`",
|
1492
|
+
"description": "One of `:a`, `:div`, `:span`, or `:summary`."
|
1493
|
+
},
|
1494
|
+
{
|
1495
|
+
"name": "scheme",
|
1496
|
+
"type": "Symbol",
|
1497
|
+
"default": "`:default`",
|
1498
|
+
"description": "One of `:accent`, `:attention`, `:danger`, `:default`, `:done`, `:info`, `:orange`, `:primary`, `:purple`, `:secondary`, `:severe`, `:sponsors`, `:success`, or `:warning`."
|
1499
|
+
},
|
1500
|
+
{
|
1501
|
+
"name": "size",
|
1502
|
+
"type": "Symbol",
|
1503
|
+
"default": "`:medium`",
|
1504
|
+
"description": "One of `:large` or `:medium`."
|
1505
|
+
},
|
1506
|
+
{
|
1507
|
+
"name": "inline",
|
1508
|
+
"type": "Boolean",
|
1509
|
+
"default": "`false`",
|
1510
|
+
"description": "Whether or not to render this label inline."
|
1511
|
+
},
|
1512
|
+
{
|
1513
|
+
"name": "variant",
|
1514
|
+
"type": "Symbol",
|
1515
|
+
"default": "`:none`",
|
1516
|
+
"description": "One of `:inline`, `:large`, or `:none`."
|
1517
|
+
},
|
1518
|
+
{
|
1519
|
+
"name": "system_arguments",
|
1520
|
+
"type": "Hash",
|
1521
|
+
"default": "N/A",
|
1522
|
+
"description": "[System arguments](/system-arguments)"
|
1523
|
+
}
|
1524
|
+
]
|
1525
|
+
},
|
1526
|
+
{
|
1527
|
+
"component": "Layout",
|
1528
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/layout_component.rb",
|
1529
|
+
"parameters": [
|
1530
|
+
{
|
1531
|
+
"name": "responsive",
|
1532
|
+
"type": "Boolean",
|
1533
|
+
"default": "`false`",
|
1534
|
+
"description": "Whether to collapse layout to a single column at smaller widths."
|
1535
|
+
},
|
1536
|
+
{
|
1537
|
+
"name": "side",
|
1538
|
+
"type": "Symbol",
|
1539
|
+
"default": "`:right`",
|
1540
|
+
"description": "Which side to display the sidebar on. One of `:left` or `:right`."
|
1541
|
+
},
|
1542
|
+
{
|
1543
|
+
"name": "sidebar_col",
|
1544
|
+
"type": "Integer",
|
1545
|
+
"default": "`3`",
|
1546
|
+
"description": "Sidebar column width."
|
1547
|
+
},
|
1548
|
+
{
|
1549
|
+
"name": "system_arguments",
|
1550
|
+
"type": "Hash",
|
1551
|
+
"default": "N/A",
|
1552
|
+
"description": "[System arguments](/system-arguments)"
|
1553
|
+
}
|
1554
|
+
]
|
1555
|
+
},
|
1556
|
+
{
|
1557
|
+
"component": "Link",
|
1558
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/link_component.rb",
|
1559
|
+
"parameters": [
|
1560
|
+
{
|
1561
|
+
"name": "tag",
|
1562
|
+
"type": "String",
|
1563
|
+
"default": "`:a`",
|
1564
|
+
"description": "One of `:a` or `:span`."
|
1565
|
+
},
|
1566
|
+
{
|
1567
|
+
"name": "href",
|
1568
|
+
"type": "String",
|
1569
|
+
"default": "`nil`",
|
1570
|
+
"description": "URL to be used for the Link. Required if tag is `:a`. If the requirements are not met an error will be raised in non production environments. In production, an empty link element will be rendered."
|
1571
|
+
},
|
1572
|
+
{
|
1573
|
+
"name": "scheme",
|
1574
|
+
"type": "Symbol",
|
1575
|
+
"default": "`:default`",
|
1576
|
+
"description": "One of `:default`, `:primary`, or `:secondary`."
|
1577
|
+
},
|
1578
|
+
{
|
1579
|
+
"name": "muted",
|
1580
|
+
"type": "Boolean",
|
1581
|
+
"default": "`false`",
|
1582
|
+
"description": "Uses light gray for Link color, and blue on hover."
|
1583
|
+
},
|
1584
|
+
{
|
1585
|
+
"name": "underline",
|
1586
|
+
"type": "Boolean",
|
1587
|
+
"default": "`true`",
|
1588
|
+
"description": "Whether or not to underline the link."
|
1589
|
+
},
|
1590
|
+
{
|
1591
|
+
"name": "system_arguments",
|
1592
|
+
"type": "Hash",
|
1593
|
+
"default": "N/A",
|
1594
|
+
"description": "[System arguments](/system-arguments)"
|
1595
|
+
}
|
1596
|
+
]
|
1597
|
+
},
|
1598
|
+
{
|
1599
|
+
"component": "LocalTime",
|
1600
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/local_time.rb",
|
1601
|
+
"parameters": [
|
1602
|
+
{
|
1603
|
+
"name": "datetime",
|
1604
|
+
"type": "DateTime",
|
1605
|
+
"default": "N/A",
|
1606
|
+
"description": "The date to parse"
|
1607
|
+
},
|
1608
|
+
{
|
1609
|
+
"name": "initial_text",
|
1610
|
+
"type": "String",
|
1611
|
+
"default": "`nil`",
|
1612
|
+
"description": "Text to render before component is initialized"
|
1613
|
+
},
|
1614
|
+
{
|
1615
|
+
"name": "weekday",
|
1616
|
+
"type": "Symbol",
|
1617
|
+
"default": "`:short`",
|
1618
|
+
"description": "One of `:long` or `:short`."
|
1619
|
+
},
|
1620
|
+
{
|
1621
|
+
"name": "year",
|
1622
|
+
"type": "Symbol",
|
1623
|
+
"default": "`:numeric`",
|
1624
|
+
"description": "One of `:2-digit` or `:numeric`."
|
1625
|
+
},
|
1626
|
+
{
|
1627
|
+
"name": "month",
|
1628
|
+
"type": "Symbol",
|
1629
|
+
"default": "`:short`",
|
1630
|
+
"description": "One of `:long` or `:short`."
|
1631
|
+
},
|
1632
|
+
{
|
1633
|
+
"name": "day",
|
1634
|
+
"type": "Symbol",
|
1635
|
+
"default": "`:numeric`",
|
1636
|
+
"description": "One of `:2-digit` or `:numeric`."
|
1637
|
+
},
|
1638
|
+
{
|
1639
|
+
"name": "hour",
|
1640
|
+
"type": "Symbol",
|
1641
|
+
"default": "`:numeric`",
|
1642
|
+
"description": "One of `:2-digit` or `:numeric`."
|
1643
|
+
},
|
1644
|
+
{
|
1645
|
+
"name": "minute",
|
1646
|
+
"type": "Symbol",
|
1647
|
+
"default": "`:numeric`",
|
1648
|
+
"description": "One of `:2-digit` or `:numeric`."
|
1649
|
+
},
|
1650
|
+
{
|
1651
|
+
"name": "second",
|
1652
|
+
"type": "Symbol",
|
1653
|
+
"default": "`:numeric`",
|
1654
|
+
"description": "One of `:2-digit` or `:numeric`."
|
1655
|
+
},
|
1656
|
+
{
|
1657
|
+
"name": "time_zone_name",
|
1658
|
+
"type": "Symbol",
|
1659
|
+
"default": "`:short`",
|
1660
|
+
"description": "One of `:long` or `:short`."
|
1661
|
+
},
|
1662
|
+
{
|
1663
|
+
"name": "system_arguments",
|
1664
|
+
"type": "Hash",
|
1665
|
+
"default": "N/A",
|
1666
|
+
"description": "[System arguments](/system-arguments)"
|
1667
|
+
}
|
1668
|
+
]
|
1669
|
+
},
|
1670
|
+
{
|
1671
|
+
"component": "Markdown",
|
1672
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/markdown.rb",
|
1673
|
+
"parameters": [
|
1674
|
+
{
|
1675
|
+
"name": "tag",
|
1676
|
+
"type": "Symbol",
|
1677
|
+
"default": "`:div`",
|
1678
|
+
"description": "One of `:article`, `:div`, or `:td`."
|
1679
|
+
},
|
1680
|
+
{
|
1681
|
+
"name": "system_arguments",
|
1682
|
+
"type": "Hash",
|
1683
|
+
"default": "N/A",
|
1684
|
+
"description": "[System arguments](/system-arguments)"
|
1685
|
+
}
|
1686
|
+
]
|
1687
|
+
},
|
1688
|
+
{
|
1689
|
+
"component": "Menu",
|
1690
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/menu_component.rb",
|
1691
|
+
"parameters": [
|
1692
|
+
{
|
1693
|
+
"name": "system_arguments",
|
1694
|
+
"type": "Hash",
|
1695
|
+
"default": "N/A",
|
1696
|
+
"description": "[System arguments](/system-arguments)"
|
1697
|
+
}
|
1698
|
+
]
|
1699
|
+
},
|
1700
|
+
{
|
1701
|
+
"component": "NavigationTab",
|
1702
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/navigation/tab_component.rb",
|
1703
|
+
"parameters": [
|
1704
|
+
{
|
1705
|
+
"name": "list",
|
1706
|
+
"type": "Boolean",
|
1707
|
+
"default": "`false`",
|
1708
|
+
"description": "Whether the Tab is an item in a `<ul>` list."
|
1709
|
+
},
|
1710
|
+
{
|
1711
|
+
"name": "selected",
|
1712
|
+
"type": "Boolean",
|
1713
|
+
"default": "`false`",
|
1714
|
+
"description": "Whether the Tab is selected or not."
|
1715
|
+
},
|
1716
|
+
{
|
1717
|
+
"name": "with_panel",
|
1718
|
+
"type": "Boolean",
|
1719
|
+
"default": "`false`",
|
1720
|
+
"description": "Whether the Tab has an associated panel."
|
1721
|
+
},
|
1722
|
+
{
|
1723
|
+
"name": "panel_id",
|
1724
|
+
"type": "String",
|
1725
|
+
"default": "`\"\"`",
|
1726
|
+
"description": "Only applies if `with_panel` is `true`. Unique id of panel."
|
1727
|
+
},
|
1728
|
+
{
|
1729
|
+
"name": "icon_classes",
|
1730
|
+
"type": "Boolean",
|
1731
|
+
"default": "`\"\"`",
|
1732
|
+
"description": "Classes that must always be applied to icons."
|
1733
|
+
},
|
1734
|
+
{
|
1735
|
+
"name": "wrapper_arguments",
|
1736
|
+
"type": "Hash",
|
1737
|
+
"default": "`{}`",
|
1738
|
+
"description": "[System arguments](/system-arguments) to be used in the `<li>` wrapper when the tab is an item in a list."
|
1739
|
+
},
|
1740
|
+
{
|
1741
|
+
"name": "system_arguments",
|
1742
|
+
"type": "Hash",
|
1743
|
+
"default": "N/A",
|
1744
|
+
"description": "[System arguments](/system-arguments)"
|
1745
|
+
}
|
1746
|
+
]
|
1747
|
+
},
|
1748
|
+
{
|
1749
|
+
"component": "Octicon",
|
1750
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/octicon_component.rb",
|
1751
|
+
"parameters": [
|
1752
|
+
{
|
1753
|
+
"name": "icon_name",
|
1754
|
+
"type": "Symbol, String",
|
1755
|
+
"default": "`nil`",
|
1756
|
+
"description": "Name of [Octicon](https://primer.style/octicons/) to use."
|
1757
|
+
},
|
1758
|
+
{
|
1759
|
+
"name": "icon",
|
1760
|
+
"type": "Symbol, String",
|
1761
|
+
"default": "`nil`",
|
1762
|
+
"description": "Name of [Octicon](https://primer.style/octicons/) to use."
|
1763
|
+
},
|
1764
|
+
{
|
1765
|
+
"name": "size",
|
1766
|
+
"type": "Symbol",
|
1767
|
+
"default": "`:small`",
|
1768
|
+
"description": "One of `:xsmall` (`12`), `:small` (`16`), or `:medium` (`24`)."
|
1769
|
+
},
|
1770
|
+
{
|
1771
|
+
"name": "use_symbol",
|
1772
|
+
"type": "Boolean",
|
1773
|
+
"default": "`false`",
|
1774
|
+
"description": "EXPERIMENTAL (May change or be removed) - Set to true when using with [OcticonSymbols](/components/octiconsymbols)."
|
1775
|
+
},
|
1776
|
+
{
|
1777
|
+
"name": "system_arguments",
|
1778
|
+
"type": "Hash",
|
1779
|
+
"default": "N/A",
|
1780
|
+
"description": "[System arguments](/system-arguments)"
|
1781
|
+
}
|
1782
|
+
]
|
1783
|
+
},
|
1784
|
+
{
|
1785
|
+
"component": "OcticonSymbols",
|
1786
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/octicon_symbols_component.rb",
|
1787
|
+
"parameters": [
|
1788
|
+
{
|
1789
|
+
"name": "icons",
|
1790
|
+
"type": "Array<Hash>",
|
1791
|
+
"default": "`[]`",
|
1792
|
+
"description": "List of icons to render, in the format { symbol: :icon_name, size: :small }"
|
1793
|
+
}
|
1794
|
+
]
|
1795
|
+
},
|
1796
|
+
{
|
1797
|
+
"component": "Popover",
|
1798
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/popover_component.rb",
|
1799
|
+
"parameters": [
|
1800
|
+
{
|
1801
|
+
"name": "system_arguments",
|
1802
|
+
"type": "Hash",
|
1803
|
+
"default": "N/A",
|
1804
|
+
"description": "[System arguments](/system-arguments)"
|
1805
|
+
}
|
1806
|
+
]
|
1807
|
+
},
|
1808
|
+
{
|
1809
|
+
"component": "ProgressBar",
|
1810
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/progress_bar_component.rb",
|
1811
|
+
"parameters": [
|
1812
|
+
{
|
1813
|
+
"name": "size",
|
1814
|
+
"type": "Symbol",
|
1815
|
+
"default": "`:default`",
|
1816
|
+
"description": "One of `:default`, `:large`, or `:small`. Increases height."
|
1817
|
+
},
|
1818
|
+
{
|
1819
|
+
"name": "system_arguments",
|
1820
|
+
"type": "Hash",
|
1821
|
+
"default": "N/A",
|
1822
|
+
"description": "[System arguments](/system-arguments)"
|
1823
|
+
}
|
1824
|
+
]
|
1825
|
+
},
|
1826
|
+
{
|
1827
|
+
"component": "Spinner",
|
1828
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/spinner_component.rb",
|
1829
|
+
"parameters": [
|
1830
|
+
{
|
1831
|
+
"name": "size",
|
1832
|
+
"type": "Symbol",
|
1833
|
+
"default": "`:medium`",
|
1834
|
+
"description": "One of `[:large, 64]`, `[:medium, 32]`, or `[:small, 16]`."
|
1835
|
+
},
|
1836
|
+
{
|
1837
|
+
"name": "style",
|
1838
|
+
"type": "String",
|
1839
|
+
"default": "`box-sizing: content-box; color: var(--color-icon-primary);`",
|
1840
|
+
"description": "Custom element styles."
|
1841
|
+
},
|
1842
|
+
{
|
1843
|
+
"name": "system_arguments",
|
1844
|
+
"type": "Hash",
|
1845
|
+
"default": "N/A",
|
1846
|
+
"description": "[System arguments](/system-arguments)"
|
1847
|
+
}
|
1848
|
+
]
|
1849
|
+
},
|
1850
|
+
{
|
1851
|
+
"component": "State",
|
1852
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/state_component.rb",
|
1853
|
+
"parameters": [
|
1854
|
+
{
|
1855
|
+
"name": "title",
|
1856
|
+
"type": "String",
|
1857
|
+
"default": "N/A",
|
1858
|
+
"description": "`title` HTML attribute."
|
1859
|
+
},
|
1860
|
+
{
|
1861
|
+
"name": "scheme",
|
1862
|
+
"type": "Symbol",
|
1863
|
+
"default": "`:default`",
|
1864
|
+
"description": "Background color. One of `:closed`, `:default`, `:green`, `:merged`, `:open`, `:purple`, or `:red`."
|
1865
|
+
},
|
1866
|
+
{
|
1867
|
+
"name": "tag",
|
1868
|
+
"type": "Symbol",
|
1869
|
+
"default": "`:span`",
|
1870
|
+
"description": "HTML tag for element. One of `:div` or `:span`."
|
1871
|
+
},
|
1872
|
+
{
|
1873
|
+
"name": "size",
|
1874
|
+
"type": "Symbol",
|
1875
|
+
"default": "`:default`",
|
1876
|
+
"description": "One of `:default` or `:small`."
|
1877
|
+
},
|
1878
|
+
{
|
1879
|
+
"name": "system_arguments",
|
1880
|
+
"type": "Hash",
|
1881
|
+
"default": "N/A",
|
1882
|
+
"description": "[System arguments](/system-arguments)"
|
1883
|
+
}
|
1884
|
+
]
|
1885
|
+
},
|
1886
|
+
{
|
1887
|
+
"component": "Subhead",
|
1888
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/subhead_component.rb",
|
1889
|
+
"parameters": [
|
1890
|
+
{
|
1891
|
+
"name": "spacious",
|
1892
|
+
"type": "Boolean",
|
1893
|
+
"default": "`false`",
|
1894
|
+
"description": "Whether to add spacing to the Subhead."
|
1895
|
+
},
|
1896
|
+
{
|
1897
|
+
"name": "hide_border",
|
1898
|
+
"type": "Boolean",
|
1899
|
+
"default": "`false`",
|
1900
|
+
"description": "Whether to hide the border under the heading."
|
1901
|
+
},
|
1902
|
+
{
|
1903
|
+
"name": "system_arguments",
|
1904
|
+
"type": "Hash",
|
1905
|
+
"default": "N/A",
|
1906
|
+
"description": "[System arguments](/system-arguments)"
|
1907
|
+
}
|
1908
|
+
]
|
1909
|
+
},
|
1910
|
+
{
|
1911
|
+
"component": "TabContainer",
|
1912
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/tab_container_component.rb",
|
1913
|
+
"parameters": [
|
1914
|
+
{
|
1915
|
+
"name": "system_arguments",
|
1916
|
+
"type": "Hash",
|
1917
|
+
"default": "N/A",
|
1918
|
+
"description": "[System arguments](/system-arguments)"
|
1919
|
+
}
|
1920
|
+
]
|
1921
|
+
},
|
1922
|
+
{
|
1923
|
+
"component": "TimeAgo",
|
1924
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/time_ago_component.rb",
|
1925
|
+
"parameters": [
|
1926
|
+
{
|
1927
|
+
"name": "time",
|
1928
|
+
"type": "Time",
|
1929
|
+
"default": "N/A",
|
1930
|
+
"description": "The time to be formatted"
|
1931
|
+
},
|
1932
|
+
{
|
1933
|
+
"name": "micro",
|
1934
|
+
"type": "Boolean",
|
1935
|
+
"default": "`false`",
|
1936
|
+
"description": "If true then the text will be formatted in \"micro\" mode, using as few characters as possible"
|
1937
|
+
},
|
1938
|
+
{
|
1939
|
+
"name": "system_arguments",
|
1940
|
+
"type": "Hash",
|
1941
|
+
"default": "N/A",
|
1942
|
+
"description": "[System arguments](/system-arguments)"
|
1943
|
+
}
|
1944
|
+
]
|
1945
|
+
},
|
1946
|
+
{
|
1947
|
+
"component": "TimelineItem",
|
1948
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/timeline_item_component.rb",
|
1949
|
+
"parameters": [
|
1950
|
+
{
|
1951
|
+
"name": "condensed",
|
1952
|
+
"type": "Boolean",
|
1953
|
+
"default": "`false`",
|
1954
|
+
"description": "Reduce the vertical padding and remove the background from the badge item. Most commonly used in commits."
|
1955
|
+
},
|
1956
|
+
{
|
1957
|
+
"name": "system_arguments",
|
1958
|
+
"type": "Hash",
|
1959
|
+
"default": "N/A",
|
1960
|
+
"description": "[System arguments](/system-arguments)"
|
1961
|
+
}
|
1962
|
+
]
|
1963
|
+
},
|
1964
|
+
{
|
1965
|
+
"component": "Tooltip",
|
1966
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/tooltip.rb",
|
1967
|
+
"parameters": [
|
1968
|
+
{
|
1969
|
+
"name": "label",
|
1970
|
+
"type": "String",
|
1971
|
+
"default": "N/A",
|
1972
|
+
"description": "the text to appear in the tooltip"
|
1973
|
+
},
|
1974
|
+
{
|
1975
|
+
"name": "direction",
|
1976
|
+
"type": "String",
|
1977
|
+
"default": "`:n`",
|
1978
|
+
"description": "Direction of the tooltip. One of `:e`, `:n`, `:ne`, `:nw`, `:s`, `:se`, `:sw`, or `:w`."
|
1979
|
+
},
|
1980
|
+
{
|
1981
|
+
"name": "align",
|
1982
|
+
"type": "String",
|
1983
|
+
"default": "`:default`",
|
1984
|
+
"description": "Align tooltips to the left or right of an element, combined with a `direction` to specify north or south. One of `:default`, `:left_1`, `:left_2`, `:right_1`, or `:right_2`."
|
1985
|
+
},
|
1986
|
+
{
|
1987
|
+
"name": "multiline",
|
1988
|
+
"type": "Boolean",
|
1989
|
+
"default": "`false`",
|
1990
|
+
"description": "Use this when you have long content"
|
1991
|
+
},
|
1992
|
+
{
|
1993
|
+
"name": "no_delay",
|
1994
|
+
"type": "Boolean",
|
1995
|
+
"default": "`false`",
|
1996
|
+
"description": "By default the tooltips have a slight delay before appearing. Set true to override this"
|
1997
|
+
},
|
1998
|
+
{
|
1999
|
+
"name": "system_arguments",
|
2000
|
+
"type": "Hash",
|
2001
|
+
"default": "N/A",
|
2002
|
+
"description": "[System arguments](/system-arguments)"
|
2003
|
+
}
|
2004
|
+
]
|
2005
|
+
},
|
2006
|
+
{
|
2007
|
+
"component": "Truncate",
|
2008
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/truncate.rb",
|
2009
|
+
"parameters": [
|
2010
|
+
{
|
2011
|
+
"name": "tag",
|
2012
|
+
"type": "Symbol",
|
2013
|
+
"default": "`:div`",
|
2014
|
+
"description": "One of `:div`, `:p`, `:span`, or `:strong`."
|
2015
|
+
},
|
2016
|
+
{
|
2017
|
+
"name": "inline",
|
2018
|
+
"type": "Boolean",
|
2019
|
+
"default": "`false`",
|
2020
|
+
"description": "Whether the element is inline (or inline-block)."
|
2021
|
+
},
|
2022
|
+
{
|
2023
|
+
"name": "expandable",
|
2024
|
+
"type": "Boolean",
|
2025
|
+
"default": "`false`",
|
2026
|
+
"description": "Whether the entire string should be revealed on hover. Can only be used in conjunction with `inline`."
|
2027
|
+
},
|
2028
|
+
{
|
2029
|
+
"name": "max_width",
|
2030
|
+
"type": "Integer",
|
2031
|
+
"default": "`nil`",
|
2032
|
+
"description": "Sets the max-width of the text."
|
2033
|
+
},
|
2034
|
+
{
|
2035
|
+
"name": "system_arguments",
|
2036
|
+
"type": "Hash",
|
2037
|
+
"default": "N/A",
|
2038
|
+
"description": "[System arguments](/system-arguments)"
|
2039
|
+
}
|
2040
|
+
]
|
2041
|
+
}
|
2042
|
+
]
|