primer_view_components 0.0.46 → 0.0.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +144 -0
  3. data/app/components/primer/base_component.rb +2 -2
  4. data/app/components/primer/beta/auto_complete.rb +159 -0
  5. data/app/components/primer/beta/auto_complete/auto_complete.d.ts +1 -0
  6. data/app/components/primer/{auto_complete → beta/auto_complete}/auto_complete.html.erb +0 -0
  7. data/app/components/primer/beta/auto_complete/auto_complete.js +1 -0
  8. data/app/components/primer/{auto_complete → beta/auto_complete}/auto_complete.ts +0 -0
  9. data/app/components/primer/beta/auto_complete/item.rb +44 -0
  10. data/app/components/primer/beta/avatar.rb +77 -0
  11. data/app/components/primer/{avatar_stack_component.html.erb → beta/avatar_stack.html.erb} +0 -0
  12. data/app/components/primer/beta/avatar_stack.rb +92 -0
  13. data/app/components/primer/clipboard_copy.html.erb +2 -2
  14. data/app/components/primer/component.rb +5 -1
  15. data/app/components/primer/details_component.rb +7 -7
  16. data/app/components/primer/image_crop.html.erb +4 -4
  17. data/app/components/primer/label_component.rb +13 -12
  18. data/app/components/primer/markdown.rb +9 -9
  19. data/app/components/primer/navigation/tab_component.rb +30 -2
  20. data/app/components/primer/popover_component.rb +6 -3
  21. data/app/components/primer/primer.d.ts +1 -1
  22. data/app/components/primer/primer.js +1 -1
  23. data/app/components/primer/primer.ts +1 -1
  24. data/app/components/primer/tab_nav_component.rb +4 -3
  25. data/app/components/primer/timeline_item_component.rb +2 -2
  26. data/app/components/primer/truncate.rb +6 -1
  27. data/app/components/primer/underline_nav_component.rb +4 -3
  28. data/app/lib/primer/octicon/cache.rb +1 -1
  29. data/lib/primer/classify.rb +4 -18
  30. data/lib/primer/classify/cache.rb +0 -5
  31. data/lib/primer/classify/utilities.rb +54 -22
  32. data/lib/primer/classify/utilities.yml +16 -0
  33. data/lib/primer/view_components.rb +34 -6
  34. data/lib/primer/view_components/constants.rb +55 -0
  35. data/lib/primer/view_components/linters/argument_mappers/base.rb +74 -0
  36. data/lib/primer/view_components/linters/argument_mappers/button.rb +32 -44
  37. data/lib/primer/view_components/linters/argument_mappers/clipboard_copy.rb +20 -0
  38. data/lib/primer/view_components/linters/argument_mappers/helpers/erb_block.rb +24 -0
  39. data/lib/primer/view_components/linters/argument_mappers/label.rb +50 -0
  40. data/lib/primer/view_components/linters/argument_mappers/system_arguments.rb +4 -1
  41. data/lib/primer/view_components/linters/autocorrectable.rb +30 -0
  42. data/lib/primer/view_components/linters/button_component_migration_counter.rb +9 -23
  43. data/lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb +21 -0
  44. data/lib/primer/view_components/linters/close_button_component_migration_counter.rb +16 -0
  45. data/lib/primer/view_components/linters/helpers.rb +56 -38
  46. data/lib/primer/view_components/linters/label_component_migration_counter.rb +25 -0
  47. data/lib/primer/view_components/statuses.rb +14 -0
  48. data/lib/primer/view_components/version.rb +1 -1
  49. data/lib/rubocop/config/default.yml +12 -0
  50. data/lib/rubocop/cop/primer.rb +4 -0
  51. data/lib/rubocop/cop/primer/no_tag_memoize.rb +42 -0
  52. data/lib/rubocop/cop/primer/system_argument_instead_of_class.rb +75 -0
  53. data/lib/tasks/constants.rake +12 -0
  54. data/lib/tasks/docs.rake +87 -32
  55. data/lib/tasks/utilities.rake +4 -10
  56. data/lib/yard/docs_helper.rb +12 -3
  57. data/static/arguments.yml +973 -0
  58. data/static/assets/view-components.svg +18 -0
  59. data/static/classes.yml +174 -0
  60. data/static/constants.json +628 -0
  61. data/static/statuses.json +5 -5
  62. metadata +34 -13
  63. data/app/components/primer/auto_complete.rb +0 -157
  64. data/app/components/primer/auto_complete/item.rb +0 -42
  65. data/app/components/primer/avatar_component.rb +0 -75
  66. data/app/components/primer/avatar_stack_component.rb +0 -90
@@ -0,0 +1,973 @@
1
+ ---
2
+ - component: ButtonMarketing
3
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/button_marketing.rb
4
+ parameters:
5
+ - name: scheme
6
+ type: Symbol
7
+ default: "`:default`"
8
+ description: One of `:default`, `:outline`, `:primary`, or `:transparent`.
9
+ - name: variant
10
+ type: Symbol
11
+ default: "`:default`"
12
+ description: One of `:default` and `:large`.
13
+ - name: tag
14
+ type: Symbol
15
+ default: "`:button`"
16
+ description: One of `:a` and `:button`.
17
+ - name: type
18
+ type: Symbol
19
+ default: "`:button`"
20
+ description: One of `:button` and `:submit`.
21
+ - name: system_arguments
22
+ type: Hash
23
+ default: N/A
24
+ description: "[System arguments](/system-arguments)"
25
+ - component: BaseButton
26
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/base_button.rb
27
+ parameters:
28
+ - name: tag
29
+ type: Symbol
30
+ default: "`:button`"
31
+ description: One of `:a`, `:button`, or `:summary`.
32
+ - name: type
33
+ type: Symbol
34
+ default: "`:button`"
35
+ description: One of `:button`, `:reset`, or `:submit`.
36
+ - name: block
37
+ type: Boolean
38
+ default: "`false`"
39
+ description: 'Whether button is full-width with `display: block`.'
40
+ - name: system_arguments
41
+ type: Hash
42
+ default: N/A
43
+ description: "[System arguments](/system-arguments)"
44
+ - component: AutoComplete
45
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/auto_complete.rb
46
+ parameters:
47
+ - name: src
48
+ type: String
49
+ default: N/A
50
+ description: The route to query.
51
+ - name: input_id
52
+ type: String
53
+ default: N/A
54
+ description: Id of the input element.
55
+ - name: list_id
56
+ type: String
57
+ default: N/A
58
+ description: Id of the list element.
59
+ - name: system_arguments
60
+ type: Hash
61
+ default: N/A
62
+ description: "[System arguments](/system-arguments)"
63
+ - component: AutoCompleteItem
64
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/auto_complete/item.rb
65
+ parameters:
66
+ - name: value
67
+ type: String
68
+ default: N/A
69
+ description: Value of the item.
70
+ - name: selected
71
+ type: Boolean
72
+ default: "`false`"
73
+ description: Whether the item is selected.
74
+ - name: disabled
75
+ type: Boolean
76
+ default: "`false`"
77
+ description: Whether the item is disabled.
78
+ - name: system_arguments
79
+ type: Hash
80
+ default: N/A
81
+ description: "[System arguments](/system-arguments)"
82
+ - component: Avatar
83
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/avatar.rb
84
+ parameters:
85
+ - name: src
86
+ type: String
87
+ default: N/A
88
+ description: The source url of the avatar image.
89
+ - name: alt
90
+ type: String
91
+ default: N/A
92
+ description: Passed through to alt on img tag.
93
+ - name: size
94
+ type: Integer
95
+ default: "`20`"
96
+ description: Adds the avatar-small class if less than 24.
97
+ - name: square
98
+ type: Boolean
99
+ default: "`false`"
100
+ description: Used to create a square avatar.
101
+ - name: href
102
+ type: String
103
+ default: "`nil`"
104
+ description: The URL to link to. If used, component will be wrapped by an `<a>`
105
+ tag.
106
+ - name: system_arguments
107
+ type: Hash
108
+ default: N/A
109
+ description: "[System arguments](/system-arguments)"
110
+ - component: AvatarStack
111
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/avatar_stack.rb
112
+ parameters:
113
+ - name: tag
114
+ type: Symbol
115
+ default: "`:div`"
116
+ description: One of `:div` and `:span`.
117
+ - name: align
118
+ type: Symbol
119
+ default: "`:left`"
120
+ description: One of `:left` and `:right`.
121
+ - name: tooltipped
122
+ type: Boolean
123
+ default: "`false`"
124
+ description: Whether to add a tooltip to the stack or not.
125
+ - name: body_arguments
126
+ type: Hash
127
+ default: "`{}`"
128
+ description: Parameters to add to the Body. If `tooltipped` is set, has the same
129
+ arguments as [Tooltip](/components/tooltip). The default tag is `:div` but can
130
+ be changed using `tag:` to one of `:div` and `:span`.
131
+ - name: system_arguments
132
+ type: Hash
133
+ default: N/A
134
+ description: "[System arguments](/system-arguments)"
135
+ - component: Text
136
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/text.rb
137
+ parameters:
138
+ - name: tag
139
+ type: Symbol
140
+ default: "`:span`"
141
+ description: ''
142
+ - name: system_arguments
143
+ type: Hash
144
+ default: N/A
145
+ description: "[System arguments](/system-arguments)"
146
+ - component: Blankslate
147
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/blankslate_component.rb
148
+ parameters:
149
+ - name: title
150
+ type: String
151
+ default: '`""`'
152
+ description: Text that appears in a larger bold font.
153
+ - name: title_tag
154
+ type: Symbol
155
+ default: "`:h3`"
156
+ description: HTML tag to use for title.
157
+ - name: icon
158
+ type: Symbol
159
+ default: '`""`'
160
+ description: Octicon icon to use at top of component.
161
+ - name: icon_size
162
+ type: Symbol
163
+ default: "`:medium`"
164
+ description: One of `:small` (`16`) and `:medium` (`24`).
165
+ - name: image_src
166
+ type: String
167
+ default: '`""`'
168
+ description: Image to display.
169
+ - name: image_alt
170
+ type: String
171
+ default: '`" "`'
172
+ description: Alt text for image.
173
+ - name: description
174
+ type: String
175
+ default: '`""`'
176
+ description: Text that appears below the title. Typically a whole sentence.
177
+ - name: button_text
178
+ type: String
179
+ default: '`""`'
180
+ description: The text of the button.
181
+ - name: button_url
182
+ type: String
183
+ default: '`""`'
184
+ description: The URL where the user will be taken after clicking the button.
185
+ - name: button_classes
186
+ type: String
187
+ default: '`"btn-primary my-3"`'
188
+ description: Classes to apply to action button
189
+ - name: link_text
190
+ type: String
191
+ default: '`""`'
192
+ description: The text of the link.
193
+ - name: link_url
194
+ type: String
195
+ default: '`""`'
196
+ description: The URL where the user will be taken after clicking the link.
197
+ - name: narrow
198
+ type: Boolean
199
+ default: "`false`"
200
+ description: Adds a maximum width.
201
+ - name: large
202
+ type: Boolean
203
+ default: "`false`"
204
+ description: Increases the font size.
205
+ - name: spacious
206
+ type: Boolean
207
+ default: "`false`"
208
+ description: Adds extra padding.
209
+ - name: system_arguments
210
+ type: Hash
211
+ default: N/A
212
+ description: "[System arguments](/system-arguments)"
213
+ - component: BorderBox
214
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/border_box_component.rb
215
+ parameters:
216
+ - name: padding
217
+ type: Symbol
218
+ default: "`:default`"
219
+ description: One of `:condensed`, `:default`, or `:spacious`.
220
+ - name: system_arguments
221
+ type: Hash
222
+ default: N/A
223
+ description: "[System arguments](/system-arguments)"
224
+ - component: Box
225
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/box_component.rb
226
+ parameters:
227
+ - name: system_arguments
228
+ type: Hash
229
+ default: N/A
230
+ description: "[System arguments](/system-arguments)"
231
+ - component: Breadcrumb
232
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/breadcrumb_component.rb
233
+ parameters:
234
+ - name: system_arguments
235
+ type: Hash
236
+ default: N/A
237
+ description: "[System arguments](/system-arguments)"
238
+ - component: Button
239
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/button_component.rb
240
+ parameters:
241
+ - name: scheme
242
+ type: Symbol
243
+ default: "`:default`"
244
+ description: One of `:danger`, `:default`, `:invisible`, `:link`, `:outline`,
245
+ or `:primary`.
246
+ - name: variant
247
+ type: Symbol
248
+ default: "`:medium`"
249
+ description: One of `:large`, `:medium`, or `:small`.
250
+ - name: tag
251
+ type: Symbol
252
+ default: "`:button`"
253
+ description: One of `:a`, `:button`, or `:summary`.
254
+ - name: type
255
+ type: Symbol
256
+ default: "`:button`"
257
+ description: One of `:button`, `:reset`, or `:submit`.
258
+ - name: group_item
259
+ type: Boolean
260
+ default: "`false`"
261
+ description: Whether button is part of a ButtonGroup.
262
+ - name: block
263
+ type: Boolean
264
+ default: "`false`"
265
+ description: 'Whether button is full-width with `display: block`.'
266
+ - name: caret
267
+ type: Boolean
268
+ default: "`false`"
269
+ description: Whether or not to render a caret.
270
+ - name: system_arguments
271
+ type: Hash
272
+ default: N/A
273
+ description: "[System arguments](/system-arguments)"
274
+ - component: ButtonGroup
275
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/button_group.rb
276
+ parameters:
277
+ - name: variant
278
+ type: Symbol
279
+ default: "`:medium`"
280
+ description: One of `:large`, `:medium`, or `:small`.
281
+ - name: system_arguments
282
+ type: Hash
283
+ default: N/A
284
+ description: "[System arguments](/system-arguments)"
285
+ - component: ClipboardCopy
286
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/clipboard_copy.rb
287
+ parameters:
288
+ - name: aria-label
289
+ type: String
290
+ default: N/A
291
+ description: String that will be read to screenreaders when the component is focused
292
+ - name: value
293
+ type: String
294
+ default: "`nil`"
295
+ description: Text to copy into the users clipboard when they click the component.
296
+ - name: for
297
+ type: String
298
+ default: N/A
299
+ description: Element id from where to get the copied value.
300
+ - name: system_arguments
301
+ type: Hash
302
+ default: N/A
303
+ description: "[System arguments](/system-arguments)"
304
+ - component: CloseButton
305
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/close_button.rb
306
+ parameters:
307
+ - name: type
308
+ type: Symbol
309
+ default: "`:button`"
310
+ description: One of `:button` and `:submit`.
311
+ - name: system_arguments
312
+ type: Hash
313
+ default: N/A
314
+ description: "[System arguments](/system-arguments)"
315
+ - component: Counter
316
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/counter_component.rb
317
+ parameters:
318
+ - name: count
319
+ type: Integer, Float::INFINITY, nil
320
+ default: "`0`"
321
+ description: 'The number to be displayed (e.x. # of issues, pull requests)'
322
+ - name: scheme
323
+ type: Symbol
324
+ default: "`:default`"
325
+ description: Color scheme. One of `:default`, `:primary`, or `:secondary`.
326
+ - name: limit
327
+ type: Integer, nil
328
+ default: "`5_000`"
329
+ description: Maximum value to display. Pass `nil` for no limit. (e.x. if `count`
330
+ == 6,000 and `limit` == 5000, counter will display "5,000+")
331
+ - name: hide_if_zero
332
+ type: Boolean
333
+ default: "`false`"
334
+ description: If true, a `hidden` attribute is added to the counter if `count`
335
+ is zero.
336
+ - name: text
337
+ type: String
338
+ default: '`""`'
339
+ description: Text to display instead of count.
340
+ - name: round
341
+ type: Boolean
342
+ default: "`false`"
343
+ description: Whether to apply our standard rounding logic to value.
344
+ - name: system_arguments
345
+ type: Hash
346
+ default: N/A
347
+ description: "[System arguments](/system-arguments)"
348
+ - component: Details
349
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/details_component.rb
350
+ parameters:
351
+ - name: overlay
352
+ type: Symbol
353
+ default: "`:none`"
354
+ description: Dictates the type of overlay to render with. One of `:dark`, `:default`,
355
+ or `:none`.
356
+ - name: reset
357
+ type: Boolean
358
+ default: "`false`"
359
+ description: Defatuls to false. If set to true, it will remove the default caret
360
+ and remove style from the summary element
361
+ - name: system_arguments
362
+ type: Hash
363
+ default: N/A
364
+ description: "[System arguments](/system-arguments)"
365
+ - component: Dropdown
366
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/dropdown.rb
367
+ parameters:
368
+ - name: overlay
369
+ type: Symbol
370
+ default: "`:default`"
371
+ description: One of `:dark`, `:default`, or `:none`.
372
+ - name: with_caret
373
+ type: Boolean
374
+ default: "`false`"
375
+ description: Whether or not a caret should be rendered in the button.
376
+ - name: system_arguments
377
+ type: Hash
378
+ default: N/A
379
+ description: "[System arguments](/system-arguments)"
380
+ - component: DropdownMenu
381
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/dropdown_menu_component.rb
382
+ parameters:
383
+ - name: direction
384
+ type: Symbol
385
+ default: "`:se`"
386
+ description: One of `:e`, `:ne`, `:s`, `:se`, `:sw`, or `:w`.
387
+ - name: scheme
388
+ type: Symbol
389
+ default: "`:default`"
390
+ description: Pass `:dark` for dark mode theming
391
+ - name: header
392
+ type: String
393
+ default: "`nil`"
394
+ description: Optional string to display as the header
395
+ - name: system_arguments
396
+ type: Hash
397
+ default: N/A
398
+ description: "[System arguments](/system-arguments)"
399
+ - component: Flash
400
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/flash_component.rb
401
+ parameters:
402
+ - name: full
403
+ type: Boolean
404
+ default: "`false`"
405
+ description: Whether the component should take up the full width of the screen.
406
+ - name: spacious
407
+ type: Boolean
408
+ default: "`false`"
409
+ description: Whether to add margin to the bottom of the component.
410
+ - name: dismissible
411
+ type: Boolean
412
+ default: "`false`"
413
+ description: Whether the component can be dismissed with an X button.
414
+ - name: icon
415
+ type: Symbol
416
+ default: "`nil`"
417
+ description: Name of Octicon icon to use.
418
+ - name: scheme
419
+ type: Symbol
420
+ default: "`:default`"
421
+ description: One of `:danger`, `:default`, `:success`, or `:warning`.
422
+ - name: system_arguments
423
+ type: Hash
424
+ default: N/A
425
+ description: "[System arguments](/system-arguments)"
426
+ - component: Flex
427
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/flex_component.rb
428
+ parameters:
429
+ - name: justify_content
430
+ type: Symbol
431
+ default: "`JUSTIFY_CONTENT_DEFAULT`"
432
+ description: Use this param to distribute space between and around flex items
433
+ along the main axis of the container. One of `nil`, `:center`, `:flex_end`,
434
+ `:flex_start`, `:space_around`, or `:space_between`.
435
+ - name: inline
436
+ type: Boolean
437
+ default: "`false`"
438
+ description: Defaults to false.
439
+ - name: flex_wrap
440
+ type: Boolean
441
+ default: "`FLEX_WRAP_DEFAULT`"
442
+ description: Defaults to nil.
443
+ - name: align_items
444
+ type: Symbol
445
+ default: "`ALIGN_ITEMS_DEFAULT`"
446
+ description: Use this param to align items on the cross axis. One of `nil`, `:baseline`,
447
+ `:center`, `:end`, `:start`, or `:stretch`.
448
+ - name: direction
449
+ type: Symbol
450
+ default: "`nil`"
451
+ description: Use this param to define the orientation of the main axis (row or
452
+ column). By default, flex items will display in a row. One of `nil`, `:column`,
453
+ `:column_reverse`, `:row`, or `:row_reverse`.
454
+ - name: system_arguments
455
+ type: Hash
456
+ default: N/A
457
+ description: "[System arguments](/system-arguments)"
458
+ - component: FlexItem
459
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/flex_item_component.rb
460
+ parameters:
461
+ - name: flex_auto
462
+ type: Boolean
463
+ default: "`false`"
464
+ description: Fills available space and auto-sizes based on the content. Defaults
465
+ to false
466
+ - name: system_arguments
467
+ type: Hash
468
+ default: N/A
469
+ description: "[System arguments](/system-arguments)"
470
+ - component: Heading
471
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/heading_component.rb
472
+ parameters:
473
+ - name: tag
474
+ type: String
475
+ default: N/A
476
+ description: One of `:h1`, `:h2`, `:h3`, `:h4`, `:h5`, or `:h6`.
477
+ - name: system_arguments
478
+ type: Hash
479
+ default: N/A
480
+ description: "[System arguments](/system-arguments)"
481
+ - component: HiddenTextExpander
482
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/hidden_text_expander.rb
483
+ parameters:
484
+ - name: inline
485
+ type: Boolean
486
+ default: "`false`"
487
+ description: Whether or not the expander is inline.
488
+ - name: button_arguments
489
+ type: Hash
490
+ default: "`{}`"
491
+ description: "[System arguments](/system-arguments) for the button element."
492
+ - name: system_arguments
493
+ type: Hash
494
+ default: N/A
495
+ description: "[System arguments](/system-arguments)"
496
+ - component: IconButton
497
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/icon_button.rb
498
+ parameters:
499
+ - name: scheme
500
+ type: Symbol
501
+ default: "`:default`"
502
+ description: One of `:danger` and `:default`.
503
+ - name: icon
504
+ type: String
505
+ default: N/A
506
+ description: Name of [Octicon](https://primer.style/octicons/) to use.
507
+ - name: tag
508
+ type: Symbol
509
+ default: N/A
510
+ description: One of `:a`, `:button`, or `:summary`.
511
+ - name: type
512
+ type: Symbol
513
+ default: N/A
514
+ description: One of `:button`, `:reset`, or `:submit`.
515
+ - name: box
516
+ type: Boolean
517
+ default: "`false`"
518
+ description: Whether the button is in a [BorderBox](/components/borderbox). If
519
+ `true`, the button will have the `Box-btn-octicon` class.
520
+ - name: system_arguments
521
+ type: Hash
522
+ default: N/A
523
+ description: "[System arguments](/system-arguments)"
524
+ - component: Image
525
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/image.rb
526
+ parameters:
527
+ - name: src
528
+ type: String
529
+ default: N/A
530
+ description: The source url of the image.
531
+ - name: alt
532
+ type: String
533
+ default: N/A
534
+ description: Specifies an alternate text for the image.
535
+ - name: lazy
536
+ type: Boolean
537
+ default: "`false`"
538
+ description: Whether or not to lazily load the image.
539
+ - name: system_arguments
540
+ type: Hash
541
+ default: N/A
542
+ description: "[System arguments](/system-arguments)"
543
+ - component: ImageCrop
544
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/image_crop.rb
545
+ parameters:
546
+ - name: src
547
+ type: String
548
+ default: N/A
549
+ description: The path of the image to crop.
550
+ - name: rounded
551
+ type: Boolean
552
+ default: "`true`"
553
+ description: If the crop mask should be a circle. Defaults to true.
554
+ - name: system_arguments
555
+ type: Hash
556
+ default: N/A
557
+ description: "[System arguments](/system-arguments)"
558
+ - component: Label
559
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/label_component.rb
560
+ parameters:
561
+ - name: tag
562
+ type: Symbol
563
+ default: "`:span`"
564
+ description: One of `:a`, `:div`, `:span`, or `:summary`.
565
+ - name: scheme
566
+ type: Symbol
567
+ default: "`nil`"
568
+ description: One of `:danger`, `:info`, `:orange`, `:primary`, `:purple`, `:secondary`,
569
+ `:success`, or `:warning`.
570
+ - name: variant
571
+ type: Symbol
572
+ default: "`nil`"
573
+ description: One of `nil`, `:inline`, or `:large`.
574
+ - name: system_arguments
575
+ type: Hash
576
+ default: N/A
577
+ description: "[System arguments](/system-arguments)"
578
+ - component: Layout
579
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/layout_component.rb
580
+ parameters:
581
+ - name: responsive
582
+ type: Boolean
583
+ default: "`false`"
584
+ description: Whether to collapse layout to a single column at smaller widths.
585
+ - name: side
586
+ type: Symbol
587
+ default: "`:right`"
588
+ description: Which side to display the sidebar on. One of `:left` and `:right`.
589
+ - name: sidebar_col
590
+ type: Integer
591
+ default: "`3`"
592
+ description: Sidebar column width.
593
+ - name: system_arguments
594
+ type: Hash
595
+ default: N/A
596
+ description: "[System arguments](/system-arguments)"
597
+ - component: Link
598
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/link_component.rb
599
+ parameters:
600
+ - name: tag
601
+ type: String
602
+ default: "`:a`"
603
+ description: One of `:a` and `:span`.
604
+ - name: href
605
+ type: String
606
+ default: "`nil`"
607
+ description: URL to be used for the Link. Required if tag is `:a`. If the requirements
608
+ are not met an error will be raised in non production environments. In production,
609
+ an empty link element will be rendered.
610
+ - name: scheme
611
+ type: Symbol
612
+ default: "`:default`"
613
+ description: One of `:default`, `:primary`, or `:secondary`.
614
+ - name: muted
615
+ type: Boolean
616
+ default: "`false`"
617
+ description: Uses light gray for Link color, and blue on hover.
618
+ - name: underline
619
+ type: Boolean
620
+ default: "`true`"
621
+ description: Whether or not to underline the link.
622
+ - name: system_arguments
623
+ type: Hash
624
+ default: N/A
625
+ description: "[System arguments](/system-arguments)"
626
+ - component: LocalTime
627
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/local_time.rb
628
+ parameters:
629
+ - name: datetime
630
+ type: DateTime
631
+ default: N/A
632
+ description: The date to parse
633
+ - name: initial_text
634
+ type: String
635
+ default: "`nil`"
636
+ description: Text to render before component is initialized
637
+ - name: weekday
638
+ type: Symbol
639
+ default: "`:short`"
640
+ description: One of `:long` and `:short`.
641
+ - name: year
642
+ type: Symbol
643
+ default: "`:numeric`"
644
+ description: One of `:2-digit` and `:numeric`.
645
+ - name: month
646
+ type: Symbol
647
+ default: "`:short`"
648
+ description: One of `:long` and `:short`.
649
+ - name: day
650
+ type: Symbol
651
+ default: "`:numeric`"
652
+ description: One of `:2-digit` and `:numeric`.
653
+ - name: hour
654
+ type: Symbol
655
+ default: "`:numeric`"
656
+ description: One of `:2-digit` and `:numeric`.
657
+ - name: minute
658
+ type: Symbol
659
+ default: "`:numeric`"
660
+ description: One of `:2-digit` and `:numeric`.
661
+ - name: second
662
+ type: Symbol
663
+ default: "`:numeric`"
664
+ description: One of `:2-digit` and `:numeric`.
665
+ - name: time_zone_name
666
+ type: Symbol
667
+ default: "`:short`"
668
+ description: One of `:long` and `:short`.
669
+ - name: system_arguments
670
+ type: Hash
671
+ default: N/A
672
+ description: "[System arguments](/system-arguments)"
673
+ - component: Markdown
674
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/markdown.rb
675
+ parameters:
676
+ - name: tag
677
+ type: Symbol
678
+ default: "`:div`"
679
+ description: One of `:article`, `:div`, or `:td`.
680
+ - name: system_arguments
681
+ type: Hash
682
+ default: N/A
683
+ description: "[System arguments](/system-arguments)"
684
+ - component: Menu
685
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/menu_component.rb
686
+ parameters:
687
+ - name: system_arguments
688
+ type: Hash
689
+ default: N/A
690
+ description: "[System arguments](/system-arguments)"
691
+ - component: NavigationTab
692
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/navigation/tab_component.rb
693
+ parameters:
694
+ - name: list
695
+ type: Boolean
696
+ default: "`false`"
697
+ description: Whether the Tab is an item in a `<ul>` list.
698
+ - name: selected
699
+ type: Boolean
700
+ default: "`false`"
701
+ description: Whether the Tab is selected or not.
702
+ - name: with_panel
703
+ type: Boolean
704
+ default: "`false`"
705
+ description: Whether the Tab has an associated panel.
706
+ - name: panel_id
707
+ type: String
708
+ default: '`""`'
709
+ description: Only applies if `with_panel` is `true`. Unique id of panel.
710
+ - name: icon_classes
711
+ type: Boolean
712
+ default: '`""`'
713
+ description: Classes that must always be applied to icons.
714
+ - name: wrapper_arguments
715
+ type: Hash
716
+ default: "`{}`"
717
+ description: "[System arguments](/system-arguments) to be used in the `<li>` wrapper
718
+ when the tab is an item in a list."
719
+ - name: system_arguments
720
+ type: Hash
721
+ default: N/A
722
+ description: "[System arguments](/system-arguments)"
723
+ - component: Octicon
724
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/octicon_component.rb
725
+ parameters:
726
+ - name: icon_name
727
+ type: Symbol, String
728
+ default: "`nil`"
729
+ description: Name of [Octicon](https://primer.style/octicons/) to use.
730
+ - name: icon
731
+ type: Symbol, String
732
+ default: "`nil`"
733
+ description: Name of [Octicon](https://primer.style/octicons/) to use.
734
+ - name: size
735
+ type: Symbol
736
+ default: "`:small`"
737
+ description: One of `:small` (`16`) and `:medium` (`24`).
738
+ - name: use_symbol
739
+ type: Boolean
740
+ default: "`false`"
741
+ description: EXPERIMENTAL (May change or be removed) - Set to true when using
742
+ with [OcticonSymbols](/components/octiconsymbols).
743
+ - name: system_arguments
744
+ type: Hash
745
+ default: N/A
746
+ description: "[System arguments](/system-arguments)"
747
+ - component: OcticonSymbols
748
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/octicon_symbols_component.rb
749
+ parameters:
750
+ - name: icons
751
+ type: Array<Hash>
752
+ default: "`[]`"
753
+ description: 'List of icons to render, in the format { symbol: :icon_name, size:
754
+ :small }'
755
+ - component: Popover
756
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/popover_component.rb
757
+ parameters:
758
+ - name: system_arguments
759
+ type: Hash
760
+ default: N/A
761
+ description: "[System arguments](/system-arguments)"
762
+ - component: ProgressBar
763
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/progress_bar_component.rb
764
+ parameters:
765
+ - name: size
766
+ type: Symbol
767
+ default: "`:default`"
768
+ description: One of `:default`, `:large`, or `:small`. Increases height.
769
+ - name: system_arguments
770
+ type: Hash
771
+ default: N/A
772
+ description: "[System arguments](/system-arguments)"
773
+ - component: Spinner
774
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/spinner_component.rb
775
+ parameters:
776
+ - name: size
777
+ type: Symbol
778
+ default: "`:medium`"
779
+ description: One of `[:large, 64]`, `[:medium, 32]`, or `[:small, 16]`.
780
+ - name: style
781
+ type: String
782
+ default: "`box-sizing: content-box; color: var(--color-icon-primary);`"
783
+ description: Custom element styles.
784
+ - name: system_arguments
785
+ type: Hash
786
+ default: N/A
787
+ description: "[System arguments](/system-arguments)"
788
+ - component: State
789
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/state_component.rb
790
+ parameters:
791
+ - name: title
792
+ type: String
793
+ default: N/A
794
+ description: "`title` HTML attribute."
795
+ - name: scheme
796
+ type: Symbol
797
+ default: "`:default`"
798
+ description: Background color. One of `:closed`, `:default`, `:green`, `:merged`,
799
+ `:open`, `:purple`, or `:red`.
800
+ - name: tag
801
+ type: Symbol
802
+ default: "`:span`"
803
+ description: HTML tag for element. One of `:div` and `:span`.
804
+ - name: size
805
+ type: Symbol
806
+ default: "`:default`"
807
+ description: One of `:default` and `:small`.
808
+ - name: system_arguments
809
+ type: Hash
810
+ default: N/A
811
+ description: "[System arguments](/system-arguments)"
812
+ - component: Subhead
813
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/subhead_component.rb
814
+ parameters:
815
+ - name: spacious
816
+ type: Boolean
817
+ default: "`false`"
818
+ description: Whether to add spacing to the Subhead.
819
+ - name: hide_border
820
+ type: Boolean
821
+ default: "`false`"
822
+ description: Whether to hide the border under the heading.
823
+ - name: system_arguments
824
+ type: Hash
825
+ default: N/A
826
+ description: "[System arguments](/system-arguments)"
827
+ - component: TabContainer
828
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/tab_container_component.rb
829
+ parameters:
830
+ - name: system_arguments
831
+ type: Hash
832
+ default: N/A
833
+ description: "[System arguments](/system-arguments)"
834
+ - component: TabNav
835
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/tab_nav_component.rb
836
+ parameters:
837
+ - name: label
838
+ type: String
839
+ default: N/A
840
+ description: Used to set the `aria-label` on the top level `<nav>` element.
841
+ - name: with_panel
842
+ type: Boolean
843
+ default: "`false`"
844
+ description: Whether the TabNav should navigate through pages or panels. When
845
+ true, [TabContainer](/components/tabcontainer) is rendered along with JavaScript
846
+ behavior. Additionally, the `tab` slot will render as a button as opposed to
847
+ an anchor.
848
+ - name: body_arguments
849
+ type: Hash
850
+ default: "`{}`"
851
+ description: "[System arguments](/system-arguments) for the body wrapper."
852
+ - name: wrapper_arguments
853
+ type: Hash
854
+ default: "`{}`"
855
+ description: "[System arguments](/system-arguments) for the `TabContainer` wrapper.
856
+ Only applies if `with_panel` is `true`."
857
+ - name: system_arguments
858
+ type: Hash
859
+ default: N/A
860
+ description: "[System arguments](/system-arguments)"
861
+ - component: TimeAgo
862
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/time_ago_component.rb
863
+ parameters:
864
+ - name: time
865
+ type: Time
866
+ default: N/A
867
+ description: The time to be formatted
868
+ - name: micro
869
+ type: Boolean
870
+ default: "`false`"
871
+ description: If true then the text will be formatted in "micro" mode, using as
872
+ few characters as possible
873
+ - name: system_arguments
874
+ type: Hash
875
+ default: N/A
876
+ description: "[System arguments](/system-arguments)"
877
+ - component: TimelineItem
878
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/timeline_item_component.rb
879
+ parameters:
880
+ - name: condensed
881
+ type: Boolean
882
+ default: "`false`"
883
+ description: Reduce the vertical padding and remove the background from the badge
884
+ item. Most commonly used in commits.
885
+ - name: system_arguments
886
+ type: Hash
887
+ default: N/A
888
+ description: "[System arguments](/system-arguments)"
889
+ - component: Tooltip
890
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/tooltip.rb
891
+ parameters:
892
+ - name: label
893
+ type: String
894
+ default: N/A
895
+ description: the text to appear in the tooltip
896
+ - name: direction
897
+ type: String
898
+ default: "`:n`"
899
+ description: Direction of the tooltip. One of `:e`, `:n`, `:ne`, `:nw`, `:s`,
900
+ `:se`, `:sw`, or `:w`.
901
+ - name: align
902
+ type: String
903
+ default: "`:default`"
904
+ description: Align tooltips to the left or right of an element, combined with
905
+ a `direction` to specify north or south. One of `:default`, `:left_1`, `:left_2`,
906
+ `:right_1`, or `:right_2`.
907
+ - name: multiline
908
+ type: Boolean
909
+ default: "`false`"
910
+ description: Use this when you have long content
911
+ - name: no_delay
912
+ type: Boolean
913
+ default: "`false`"
914
+ description: By default the tooltips have a slight delay before appearing. Set
915
+ true to override this
916
+ - name: system_arguments
917
+ type: Hash
918
+ default: N/A
919
+ description: "[System arguments](/system-arguments)"
920
+ - component: Truncate
921
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/truncate.rb
922
+ parameters:
923
+ - name: tag
924
+ type: Symbol
925
+ default: "`:div`"
926
+ description: One of `:div`, `:p`, `:span`, or `:strong`.
927
+ - name: inline
928
+ type: Boolean
929
+ default: "`false`"
930
+ description: Whether the element is inline (or inline-block).
931
+ - name: expandable
932
+ type: Boolean
933
+ default: "`false`"
934
+ description: Whether the entire string should be revealed on hover. Can only be
935
+ used in conjunction with `inline`.
936
+ - name: max_width
937
+ type: Integer
938
+ default: "`nil`"
939
+ description: Sets the max-width of the text.
940
+ - name: system_arguments
941
+ type: Hash
942
+ default: N/A
943
+ description: "[System arguments](/system-arguments)"
944
+ - component: UnderlineNav
945
+ source: https://github.com/primer/view_components/tree/main/app/components/primer/underline_nav_component.rb
946
+ parameters:
947
+ - name: label
948
+ type: String
949
+ default: N/A
950
+ description: The `aria-label` on top level `<nav>` element.
951
+ - name: with_panel
952
+ type: Boolean
953
+ default: "`false`"
954
+ description: Whether the `UnderlineNav` should navigate through pages or panels.
955
+ When true, [TabContainer](/components/tabcontainer) is rendered along with JavaScript
956
+ behavior.
957
+ - name: align
958
+ type: Symbol
959
+ default: "`:left`"
960
+ description: One of `:left` and `:right`. - Defaults to left
961
+ - name: body_arguments
962
+ type: Hash
963
+ default: "`{ tag: BODY_TAG_DEFAULT }`"
964
+ description: "[System arguments](/system-arguments) for the body wrapper."
965
+ - name: wrapper_arguments
966
+ type: Hash
967
+ default: "`{}`"
968
+ description: "[System arguments](/system-arguments) for the `TabContainer` wrapper.
969
+ Only applies if `with_panel` is `true`."
970
+ - name: system_arguments
971
+ type: Hash
972
+ default: N/A
973
+ description: "[System arguments](/system-arguments)"