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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +37 -0
  3. data/app/assets/javascripts/primer_view_components.js +1 -1
  4. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  5. data/app/assets/styles/primer_view_components.css +1 -1
  6. data/app/assets/styles/primer_view_components.css.map +1 -1
  7. data/app/components/primer/alpha/dialog.rb +3 -3
  8. data/app/components/primer/alpha/toggle_switch.js +3 -0
  9. data/app/components/primer/alpha/toggle_switch.ts +3 -0
  10. data/app/components/primer/alpha/tool_tip.js +17 -2
  11. data/app/components/primer/alpha/tool_tip.ts +14 -2
  12. data/app/components/primer/beta/button.pcss +27 -15
  13. data/app/components/primer/beta/button.rb +11 -16
  14. data/app/components/primer/beta/icon_button.html.erb +1 -1
  15. data/app/components/primer/beta/icon_button.rb +5 -3
  16. data/app/components/primer/button_component.rb +1 -1
  17. data/app/components/primer/experimental/action_bar.d.ts +14 -0
  18. data/app/components/primer/experimental/action_bar.js +141 -0
  19. data/app/components/primer/icon_button.rb +1 -1
  20. data/app/components/primer/octicon_component.rb +0 -4
  21. data/app/components/primer/octicon_symbols_component.rb +0 -4
  22. data/app/lib/primer/fetch_or_fallback_helper.rb +1 -1
  23. data/lib/primer/deprecations.rb +2 -2
  24. data/lib/primer/forms/builder.rb +2 -2
  25. data/lib/primer/forms/check_box.html.erb +5 -1
  26. data/lib/primer/forms/check_box.rb +11 -0
  27. data/lib/primer/forms/dsl/check_box_group_input.rb +17 -4
  28. data/lib/primer/forms/dsl/check_box_input.rb +21 -2
  29. data/lib/primer/view_components/engine.rb +2 -1
  30. data/lib/primer/view_components/version.rb +1 -1
  31. data/lib/tasks/coverage.rake +1 -1
  32. data/lib/tasks/docs.rake +19 -15
  33. data/lib/tasks/static.rake +1 -1
  34. data/lib/tasks/test.rake +54 -0
  35. data/lib/tasks/utilities.rake +1 -0
  36. data/static/arguments.json +2042 -0
  37. data/static/audited_at.json +0 -2
  38. data/static/constants.json +1 -8
  39. data/static/statuses.json +2 -4
  40. metadata +6 -6
  41. data/app/components/primer/base_button.rb +0 -7
  42. data/app/components/primer/button_group.rb +0 -7
  43. data/lib/tasks/deprecated.rake +0 -27
  44. data/static/arguments.yml +0 -1358
data/static/arguments.yml DELETED
@@ -1,1358 +0,0 @@
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` or `:large`.
13
- - name: tag
14
- type: Symbol
15
- default: "`:button`"
16
- description: One of `:a` or `:button`.
17
- - name: type
18
- type: Symbol
19
- default: "`:button`"
20
- description: One of `:button` or `:submit`.
21
- - name: system_arguments
22
- type: Hash
23
- default: N/A
24
- description: "[System arguments](/system-arguments)"
25
- - component: Dialog
26
- source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/dialog.rb
27
- parameters:
28
- - name: id
29
- type: String
30
- default: '`"dialog-#{(36**3 + rand(36**4)).to_s(36)}"`'
31
- description: The id of the dialog.
32
- - name: title
33
- type: String
34
- default: N/A
35
- description: Describes the content of the dialog.
36
- - name: subtitle
37
- type: String
38
- default: "`nil`"
39
- description: Provides dditional context for the dialog, also setting the `aria-describedby`
40
- attribute.
41
- - name: size
42
- type: Symbol
43
- default: "`:medium`"
44
- description: The size of the dialog. One of `:large`, `:medium`, `:medium_portrait`,
45
- `:small`, or `:xlarge`.
46
- - name: position
47
- type: Symbol
48
- default: "`:center`"
49
- description: The size of the dialog. One of `:center`, `:left`, or `:right`.
50
- - name: position_narrow
51
- type: Symbol
52
- default: "`:inherit`"
53
- description: The size of the dialog. One of `:bottom`, `:fullscreen`, `:inherit`,
54
- `:left`, or `:right`.
55
- - name: visually_hide_title
56
- type: Boolean
57
- default: "`false`"
58
- description: If true will hide the heading title, while still making it available
59
- to Screen Readers.
60
- - name: system_arguments
61
- type: Hash
62
- default: N/A
63
- description: "[System arguments](/system-arguments)"
64
- - component: HiddenTextExpander
65
- source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/hidden_text_expander.rb
66
- parameters:
67
- - name: inline
68
- type: Boolean
69
- default: "`false`"
70
- description: Whether or not the expander is inline.
71
- - name: button_arguments
72
- type: Hash
73
- default: "`{}`"
74
- description: "[System arguments](/system-arguments) for the button element."
75
- - name: system_arguments
76
- type: Hash
77
- default: N/A
78
- description: "[System arguments](/system-arguments)"
79
- - component: Layout
80
- source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/layout.rb
81
- parameters:
82
- - name: stacking_breakpoint
83
- type: Symbol
84
- default: "`:md`"
85
- description: When the `Layout` should change from rows into columns. One of `:lg`,
86
- `:md`, or `:sm`.
87
- - name: first_in_source
88
- type: Symbol
89
- default: "`:sidebar`"
90
- description: Which element to render first in the HTML. This will change the keyboard
91
- navigation order. One of `:main` or `:sidebar`.
92
- - name: gutter
93
- type: Symbol
94
- default: "`:default`"
95
- description: The amount of space between the main section and the sidebar. One
96
- of `:condensed`, `:default`, `:none`, or `:spacious`.
97
- - name: system_arguments
98
- type: Hash
99
- default: N/A
100
- description: "[System arguments](/system-arguments)"
101
- - component: TabNav
102
- source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tab_nav.rb
103
- parameters:
104
- - name: tag
105
- type: Symbol
106
- default: "`:nav`"
107
- description: One of `:div` or `:nav`.
108
- - name: label
109
- type: String
110
- default: N/A
111
- description: Sets an `aria-label` that helps assistive technology users understand
112
- the purpose of the links, and distinguish it from similar elements.
113
- - name: body_arguments
114
- type: Hash
115
- default: "`{}`"
116
- description: "[System arguments](/system-arguments) for the body wrapper."
117
- - name: system_arguments
118
- type: Hash
119
- default: N/A
120
- description: "[System arguments](/system-arguments)"
121
- - component: TabPanels
122
- source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tab_panels.rb
123
- parameters:
124
- - name: label
125
- type: String
126
- default: N/A
127
- description: Sets an `aria-label` that helps assistive technology users understand
128
- the purpose of the tabs.
129
- - name: align
130
- type: Symbol
131
- default: N/A
132
- description: One of `:left` or `:right`. - Defaults to left
133
- - name: body_arguments
134
- type: Hash
135
- default: "`{}`"
136
- description: "[System arguments](/system-arguments) for the body wrapper."
137
- - name: wrapper_arguments
138
- type: Hash
139
- default: "`{}`"
140
- description: "[System arguments](/system-arguments) for the `TabContainer` wrapper."
141
- - name: system_arguments
142
- type: Hash
143
- default: N/A
144
- description: "[System arguments](/system-arguments)"
145
- - component: TextField
146
- source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/text_field.rb
147
- parameters:
148
- - name: name
149
- type: String
150
- default: N/A
151
- description: Value for the HTML name attribute.
152
- - name: id
153
- type: String
154
- default: N/A
155
- description: Value for the HTML id attribute.
156
- - name: class
157
- type: String
158
- default: N/A
159
- description: A list of CSS classes to add to the input. Exists for compatibility
160
- with Rails form builders.
161
- - name: classes
162
- type: String
163
- default: N/A
164
- description: A list of CSS classes to add to the input. Combined with the `:class`
165
- argument.
166
- - name: caption
167
- type: String
168
- default: N/A
169
- description: Caption text to render below the input.
170
- - name: label
171
- type: String
172
- default: N/A
173
- description: Label text displayed above the input.
174
- - name: visually_hide_label
175
- type: Boolean
176
- default: N/A
177
- description: Whether or not to visually hide the label. If `true` the label will
178
- be hidden visually but still available to screen readers.
179
- - name: size
180
- type: Symbol
181
- default: N/A
182
- description: The size of the field. One of `:large`, `:medium`, or `:small`.
183
- - name: show_clear_button
184
- type: Boolean
185
- default: N/A
186
- description: Whether or not to include a clear button inside the input that clears
187
- the input's contents when clicked.
188
- - name: clear_button_id
189
- type: String
190
- default: N/A
191
- description: The HTML id attribute of the clear button.
192
- - name: full_width
193
- type: Boolean
194
- default: N/A
195
- description: Controls whether or not the input takes the full width of its container.
196
- - name: disabled
197
- type: Boolean
198
- default: N/A
199
- description: Whether or not the input should accept keyboard and mouse input.
200
- - name: invalid
201
- type: Boolean
202
- default: N/A
203
- description: If `true`, renders the input in a visually invalid state.
204
- - name: placeholder
205
- type: String
206
- default: N/A
207
- description: Placeholder text.
208
- - name: inset
209
- type: Boolean
210
- default: N/A
211
- description: If `true`, renders the input in a visually inset state.
212
- - name: monospace
213
- type: Boolean
214
- default: N/A
215
- description: If `true`, uses a monospace font for the input field.
216
- - name: leading_visual
217
- type: Hash
218
- default: N/A
219
- description: Renders a leading visual icon before the text field's cursor. The
220
- hash will be passed to Primer's [Octicon component](https://primer.style/view-components/components/octicon).
221
- - name: validation_message
222
- type: String
223
- default: N/A
224
- description: A validation message to display beneath the input. Implicitly sets
225
- `invalid` to `true`.
226
- - name: label_arguments
227
- type: Hash
228
- default: N/A
229
- description: System arugments passed to the Rails builder's `#label` method. These
230
- arguments will appear as HTML attributes on the `<label>` tag.
231
- - name: system_arguments
232
- type: Hash
233
- default: N/A
234
- description: "[System arguments](/system-arguments)"
235
- - name: block
236
- type: Proc
237
- default: N/A
238
- description: Unused.
239
- - component: ToggleSwitch
240
- source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/toggle_switch.rb
241
- parameters:
242
- - name: src
243
- type: String
244
- default: "`nil`"
245
- description: The URL to POST to when the toggle switch is toggled. If `nil`, the
246
- toggle switch will not make any requests.
247
- - name: csrf_token
248
- type: String
249
- default: "`nil`"
250
- description: A CSRF token that will be sent to the server as "authenticity_token"
251
- when the toggle switch is toggled. Unused if `src` is `nil`.
252
- - name: checked
253
- type: Boolean
254
- default: "`false`"
255
- description: Whether the toggle switch is on or off.
256
- - name: enabled
257
- type: Boolean
258
- default: "`true`"
259
- description: Whether or not the toggle switch responds to user input.
260
- - name: size
261
- type: Symbol
262
- default: "`:medium`"
263
- description: What size toggle switch to render. One of `:end` or `:start`.
264
- - name: status_label_position
265
- type: Symbol
266
- default: "`:start`"
267
- description: Which side of the toggle switch to render the status label. One of
268
- `:medium` or `:small`.
269
- - name: system_arguments
270
- type: Hash
271
- default: N/A
272
- description: "[System arguments](/system-arguments)"
273
- - component: Tooltip
274
- source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tooltip.rb
275
- parameters:
276
- - name: for_id
277
- type: String
278
- default: N/A
279
- description: The ID of the element that the tooltip should be attached to.
280
- - name: type
281
- type: Symbol
282
- default: N/A
283
- description: One of `:description` or `:label`.
284
- - name: direction
285
- type: Symbol
286
- default: "`:s`"
287
- description: One of `:e`, `:n`, `:ne`, `:nw`, `:s`, `:se`, `:sw`, or `:w`.
288
- - name: text
289
- type: String
290
- default: N/A
291
- description: The text content of the tooltip. This should be brief and no longer
292
- than a sentence.
293
- - name: system_arguments
294
- type: Hash
295
- default: N/A
296
- description: "[System arguments](/system-arguments)"
297
- - component: UnderlineNav
298
- source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/underline_nav.rb
299
- parameters:
300
- - name: tag
301
- type: Symbol
302
- default: "`:nav`"
303
- description: One of `:div` or `:nav`.
304
- - name: label
305
- type: String
306
- default: N/A
307
- description: Sets an `aria-label` that helps assistive technology users understand
308
- the purpose of the links, and distinguish it from similar elements.
309
- - name: align
310
- type: Symbol
311
- default: "`:left`"
312
- description: One of `:left` or `:right`. - Defaults to left
313
- - name: body_arguments
314
- type: Hash
315
- default: "`{}`"
316
- description: "[System arguments](/system-arguments) for the body wrapper."
317
- - name: system_arguments
318
- type: Hash
319
- default: N/A
320
- description: "[System arguments](/system-arguments)"
321
- - component: UnderlinePanels
322
- source: https://github.com/primer/view_components/tree/main/app/components/primer/alpha/underline_panels.rb
323
- parameters:
324
- - name: label
325
- type: String
326
- default: N/A
327
- description: Sets an `aria-label` that helps assistive technology users understand
328
- the purpose of the tabs.
329
- - name: align
330
- type: Symbol
331
- default: "`:left`"
332
- description: One of `:left` or `:right`. - Defaults to left
333
- - name: body_arguments
334
- type: Hash
335
- default: "`{}`"
336
- description: "[System arguments](/system-arguments) for the body wrapper."
337
- - name: wrapper_arguments
338
- type: Hash
339
- default: "`{}`"
340
- description: "[System arguments](/system-arguments) for the `TabContainer` wrapper."
341
- - name: system_arguments
342
- type: Hash
343
- default: N/A
344
- description: "[System arguments](/system-arguments)"
345
- - component: AutoComplete
346
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/auto_complete.rb
347
- parameters:
348
- - name: label_text
349
- type: String
350
- default: N/A
351
- description: The label of the input.
352
- - name: src
353
- type: String
354
- default: N/A
355
- description: The route to query.
356
- - name: input_id
357
- type: String
358
- default: N/A
359
- description: Id of the input element.
360
- - name: input_name
361
- type: String
362
- default: "`nil`"
363
- description: Optional name of the input element, defaults to `input_id` when not
364
- set.
365
- - name: list_id
366
- type: String
367
- default: N/A
368
- description: Id of the list element.
369
- - name: visually_hide_label
370
- type: Boolean
371
- default: "`false`"
372
- description: Controls if the label is visible. If `true`, screen reader only text
373
- will be added.
374
- - name: show_clear_button
375
- type: Boolean
376
- default: "`false`"
377
- description: Adds optional clear button.
378
- - name: system_arguments
379
- type: Hash
380
- default: N/A
381
- description: "[System arguments](/system-arguments)"
382
- - name: size
383
- type: Hash
384
- default: "`:medium`"
385
- description: Input size can be small, medium (default), or large
386
- - name: full_width
387
- type: Boolean
388
- default: "`false`"
389
- description: Input can be full-width or fit to content
390
- - name: disabled
391
- type: Boolean
392
- default: "`false`"
393
- description: Disabled input
394
- - name: invalid
395
- type: Boolean
396
- default: "`false`"
397
- description: Invalid input
398
- - name: placeholder
399
- type: String
400
- default: "`nil`"
401
- description: The placeholder text displayed within the input
402
- - name: inset
403
- type: Boolean
404
- default: "`false`"
405
- description: subtle input background color
406
- - name: monospace
407
- type: Boolean
408
- default: "`false`"
409
- description: monospace input font family
410
- - component: AutoCompleteItem
411
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/auto_complete/item.rb
412
- parameters:
413
- - name: value
414
- type: String
415
- default: N/A
416
- description: Value of the item.
417
- - name: selected
418
- type: Boolean
419
- default: "`false`"
420
- description: Whether the item is selected.
421
- - name: disabled
422
- type: Boolean
423
- default: "`false`"
424
- description: Whether the item is disabled.
425
- - name: description_variant
426
- type: Hash
427
- default: "`:block`"
428
- description: Changes the description style. Allowed values are :inline, :block
429
- - name: description
430
- type: String
431
- default: N/A
432
- description: Display description text below label
433
- - name: system_arguments
434
- type: Hash
435
- default: N/A
436
- description: "[System arguments](/system-arguments)"
437
- - component: Avatar
438
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/avatar.rb
439
- parameters:
440
- - name: src
441
- type: String
442
- default: N/A
443
- description: The source url of the avatar image.
444
- - name: alt
445
- type: String
446
- default: N/A
447
- description: Passed through to alt on img tag.
448
- - name: size
449
- type: Integer
450
- default: "`20`"
451
- description: One of `16`, `20`, `24`, `32`, `40`, `48`, or `80`.
452
- - name: shape
453
- type: Symbol
454
- default: "`:circle`"
455
- description: Shape of the avatar. One of `:circle` or `:square`.
456
- - name: href
457
- type: String
458
- default: "`nil`"
459
- description: The URL to link to. If used, component will be wrapped by an `<a>`
460
- tag.
461
- - name: system_arguments
462
- type: Hash
463
- default: N/A
464
- description: "[System arguments](/system-arguments)"
465
- - component: AvatarStack
466
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/avatar_stack.rb
467
- parameters:
468
- - name: tag
469
- type: Symbol
470
- default: "`:div`"
471
- description: One of `:div` or `:span`.
472
- - name: align
473
- type: Symbol
474
- default: "`:left`"
475
- description: One of `:left` or `:right`.
476
- - name: tooltipped
477
- type: Boolean
478
- default: "`false`"
479
- description: Whether to add a tooltip to the stack or not.
480
- - name: body_arguments
481
- type: Hash
482
- default: "`{}`"
483
- description: Parameters to add to the Body. If `tooltipped` is set, has the same
484
- arguments as [Tooltip](/components/tooltip). The default tag is `:div` but can
485
- be changed using `tag:` to one of `:div` or `:span`.
486
- - name: system_arguments
487
- type: Hash
488
- default: N/A
489
- description: "[System arguments](/system-arguments)"
490
- - component: BaseButton
491
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/base_button.rb
492
- parameters:
493
- - name: tag
494
- type: Symbol
495
- default: "`:button`"
496
- description: One of `:a`, `:button`, or `:summary`.
497
- - name: type
498
- type: Symbol
499
- default: "`:button`"
500
- description: One of `:button`, `:reset`, or `:submit`.
501
- - name: block
502
- type: Boolean
503
- default: "`false`"
504
- description: 'Whether button is full-width with `display: block`.'
505
- - name: system_arguments
506
- type: Hash
507
- default: N/A
508
- description: "[System arguments](/system-arguments)"
509
- - component: Blankslate
510
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/blankslate.rb
511
- parameters:
512
- - name: narrow
513
- type: Boolean
514
- default: "`false`"
515
- description: Adds a maximum width of `485px` to the Blankslate.
516
- - name: spacious
517
- type: Boolean
518
- default: "`false`"
519
- description: Increases the padding from `32px` to `80px 40px`.
520
- - name: border
521
- type: Boolean
522
- default: "`false`"
523
- description: Adds a border around the Blankslate.
524
- - name: system_arguments
525
- type: Hash
526
- default: N/A
527
- description: "[System arguments](/system-arguments)"
528
- - component: BorderBox
529
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/border_box.rb
530
- parameters:
531
- - name: padding
532
- type: Symbol
533
- default: "`:default`"
534
- description: One of `:condensed`, `:default`, or `:spacious`.
535
- - name: system_arguments
536
- type: Hash
537
- default: N/A
538
- description: "[System arguments](/system-arguments)"
539
- - component: BorderBoxHeader
540
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/border_box/header.rb
541
- parameters:
542
- - name: system_arguments
543
- type: Hash
544
- default: N/A
545
- description: "[System arguments](/system-arguments)"
546
- - component: Breadcrumbs
547
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/breadcrumbs.rb
548
- parameters:
549
- - name: system_arguments
550
- type: Hash
551
- default: N/A
552
- description: "[System arguments](/system-arguments)"
553
- - component: Button
554
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/button.rb
555
- parameters:
556
- - name: scheme
557
- type: Symbol
558
- default: "`:default`"
559
- description: One of `:danger`, `:default`, `:invisible`, `:link`, `:outline`,
560
- `:primary`, or `:secondary`.
561
- - name: size
562
- type: Symbol
563
- default: "`:medium`"
564
- description: One of `:large`, `:medium`, or `:small`.
565
- - name: full_width
566
- type: Boolean
567
- default: "`false`"
568
- description: 'Whether button is full-width with `display: block`.'
569
- - name: align_content
570
- type: Symbol
571
- default: "`:center`"
572
- description: One of `:center` or `:start`.
573
- - name: tag
574
- type: Symbol
575
- default: "`:button`"
576
- description: One of `:a`, `:button`, or `:summary`.
577
- - name: type
578
- type: Symbol
579
- default: "`:button`"
580
- description: One of `:button`, `:reset`, or `:submit`.
581
- - name: system_arguments
582
- type: Hash
583
- default: N/A
584
- description: "[System arguments](/system-arguments)"
585
- - component: ButtonGroup
586
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/button_group.rb
587
- parameters:
588
- - name: variant
589
- type: Symbol
590
- default: "`nil`"
591
- description: DEPRECATED. One of `:medium` or `:small`.
592
- - name: size
593
- type: Symbol
594
- default: "`:medium`"
595
- description: One of `:medium` or `:small`.
596
- - name: system_arguments
597
- type: Hash
598
- default: N/A
599
- description: "[System arguments](/system-arguments)"
600
- - component: CloseButton
601
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/close_button.rb
602
- parameters:
603
- - name: type
604
- type: Symbol
605
- default: "`:button`"
606
- description: One of `:button` or `:submit`.
607
- - name: system_arguments
608
- type: Hash
609
- default: N/A
610
- description: "[System arguments](/system-arguments)"
611
- - component: Counter
612
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/counter.rb
613
- parameters:
614
- - name: count
615
- type: Integer, Float::INFINITY, nil
616
- default: "`0`"
617
- description: 'The number to be displayed (e.x. # of issues, pull requests)'
618
- - name: scheme
619
- type: Symbol
620
- default: "`:default`"
621
- description: Color scheme. One of `:default`, `:primary`, or `:secondary`.
622
- - name: limit
623
- type: Integer, nil
624
- default: "`5_000`"
625
- description: Maximum value to display. Pass `nil` for no limit. (e.x. if `count`
626
- == 6,000 and `limit` == 5000, counter will display "5,000+")
627
- - name: hide_if_zero
628
- type: Boolean
629
- default: "`false`"
630
- description: If true, a `hidden` attribute is added to the counter if `count`
631
- is zero.
632
- - name: text
633
- type: String
634
- default: '`""`'
635
- description: Text to display instead of count.
636
- - name: round
637
- type: Boolean
638
- default: "`false`"
639
- description: Whether to apply our standard rounding logic to value.
640
- - name: system_arguments
641
- type: Hash
642
- default: N/A
643
- description: "[System arguments](/system-arguments)"
644
- - component: Details
645
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/details.rb
646
- parameters:
647
- - name: overlay
648
- type: Symbol
649
- default: "`:none`"
650
- description: Dictates the type of overlay to render with. One of `:dark`, `:default`,
651
- or `:none`.
652
- - name: reset
653
- type: Boolean
654
- default: "`false`"
655
- description: Defaults to false. If set to true, it will remove the default caret
656
- and remove style from the summary element
657
- - name: system_arguments
658
- type: Hash
659
- default: N/A
660
- description: "[System arguments](/system-arguments)"
661
- - component: Flash
662
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/flash.rb
663
- parameters:
664
- - name: full
665
- type: Boolean
666
- default: "`false`"
667
- description: Whether the component should take up the full width of the screen.
668
- - name: spacious
669
- type: Boolean
670
- default: "`false`"
671
- description: Whether to add margin to the bottom of the component.
672
- - name: dismissible
673
- type: Boolean
674
- default: "`false`"
675
- description: Whether the component can be dismissed with an X button.
676
- - name: icon
677
- type: Symbol
678
- default: "`nil`"
679
- description: Name of Octicon icon to use.
680
- - name: scheme
681
- type: Symbol
682
- default: "`:default`"
683
- description: One of `:danger`, `:default`, `:success`, or `:warning`.
684
- - name: system_arguments
685
- type: Hash
686
- default: N/A
687
- description: "[System arguments](/system-arguments)"
688
- - component: Heading
689
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/heading.rb
690
- parameters:
691
- - name: tag
692
- type: String
693
- default: N/A
694
- description: One of `:h1`, `:h2`, `:h3`, `:h4`, `:h5`, or `:h6`.
695
- - name: system_arguments
696
- type: Hash
697
- default: N/A
698
- description: "[System arguments](/system-arguments)"
699
- - component: IconButton
700
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/icon_button.rb
701
- parameters:
702
- - name: icon
703
- type: String
704
- default: N/A
705
- description: Name of [Octicon](https://primer.style/octicons/) to use.
706
- - name: scheme
707
- type: Symbol
708
- default: "`:default`"
709
- description: One of `:danger`, `:default`, or `:invisible`.
710
- - name: size
711
- type: Symbol
712
- default: "`:medium`"
713
- description: One of `:large`, `:medium`, or `:small`.
714
- - name: tag
715
- type: Symbol
716
- default: N/A
717
- description: One of `:a`, `:button`, or `:summary`.
718
- - name: type
719
- type: Symbol
720
- default: N/A
721
- description: One of `:button`, `:reset`, or `:submit`.
722
- - name: aria-label
723
- type: String
724
- default: N/A
725
- description: String that can be read by assistive technology. A label should be
726
- short and concise. See the accessibility section for more information.
727
- - name: aria-description
728
- type: String
729
- default: N/A
730
- description: String that can be read by assistive technology. A description can
731
- be longer as it is intended to provide more context and information. See the
732
- accessibility section for more information.
733
- - name: tooltip_direction
734
- type: Symbol
735
- default: "`:s`"
736
- description: One of `:e`, `:n`, `:ne`, `:nw`, `:s`, `:se`, `:sw`, or `:w`.
737
- - name: system_arguments
738
- type: Hash
739
- default: N/A
740
- description: "[System arguments](/system-arguments)"
741
- - component: Text
742
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/text.rb
743
- parameters:
744
- - name: tag
745
- type: Symbol
746
- default: "`:span`"
747
- description: ''
748
- - name: system_arguments
749
- type: Hash
750
- default: N/A
751
- description: "[System arguments](/system-arguments)"
752
- - component: Truncate
753
- source: https://github.com/primer/view_components/tree/main/app/components/primer/beta/truncate.rb
754
- parameters:
755
- - name: system_arguments
756
- type: Hash
757
- default: N/A
758
- description: "[System arguments](/system-arguments)"
759
- - component: Box
760
- source: https://github.com/primer/view_components/tree/main/app/components/primer/box.rb
761
- parameters:
762
- - name: system_arguments
763
- type: Hash
764
- default: N/A
765
- description: "[System arguments](/system-arguments)"
766
- - component: Button
767
- source: https://github.com/primer/view_components/tree/main/app/components/primer/button_component.rb
768
- parameters:
769
- - name: scheme
770
- type: Symbol
771
- default: "`:default`"
772
- description: One of `:danger`, `:default`, `:invisible`, `:link`, `:outline`,
773
- or `:primary`.
774
- - name: variant
775
- type: Symbol
776
- default: "`nil`"
777
- description: DEPRECATED. One of `:medium` or `:small`.
778
- - name: size
779
- type: Symbol
780
- default: "`:medium`"
781
- description: One of `:medium` or `:small`.
782
- - name: tag
783
- type: Symbol
784
- default: "`:button`"
785
- description: One of `:a`, `:button`, or `:summary`.
786
- - name: type
787
- type: Symbol
788
- default: "`:button`"
789
- description: One of `:button`, `:reset`, or `:submit`.
790
- - name: group_item
791
- type: Boolean
792
- default: "`false`"
793
- description: Whether button is part of a ButtonGroup.
794
- - name: block
795
- type: Boolean
796
- default: "`false`"
797
- description: 'Whether button is full-width with `display: block`.'
798
- - name: dropdown
799
- type: Boolean
800
- default: "`false`"
801
- description: Whether or not to render a dropdown caret.
802
- - name: system_arguments
803
- type: Hash
804
- default: N/A
805
- description: "[System arguments](/system-arguments)"
806
- - component: ClipboardCopy
807
- source: https://github.com/primer/view_components/tree/main/app/components/primer/clipboard_copy.rb
808
- parameters:
809
- - name: aria-label
810
- type: String
811
- default: N/A
812
- description: String that will be read to screenreaders when the component is focused
813
- - name: value
814
- type: String
815
- default: "`nil`"
816
- description: Text to copy into the users clipboard when they click the component.
817
- - name: for
818
- type: String
819
- default: N/A
820
- description: Element id from where to get the copied value.
821
- - name: system_arguments
822
- type: Hash
823
- default: N/A
824
- description: "[System arguments](/system-arguments)"
825
- - component: Dropdown
826
- source: https://github.com/primer/view_components/tree/main/app/components/primer/dropdown.rb
827
- parameters:
828
- - name: overlay
829
- type: Symbol
830
- default: "`:default`"
831
- description: One of `:dark`, `:default`, or `:none`.
832
- - name: with_caret
833
- type: Boolean
834
- default: "`false`"
835
- description: Whether or not a caret should be rendered in the button.
836
- - name: system_arguments
837
- type: Hash
838
- default: N/A
839
- description: "[System arguments](/system-arguments)"
840
- - component: DropdownMenu
841
- source: https://github.com/primer/view_components/tree/main/app/components/primer/dropdown_menu_component.rb
842
- parameters:
843
- - name: direction
844
- type: Symbol
845
- default: "`:se`"
846
- description: One of `:e`, `:ne`, `:s`, `:se`, `:sw`, or `:w`.
847
- - name: scheme
848
- type: Symbol
849
- default: "`:default`"
850
- description: Pass `:dark` for dark mode theming
851
- - name: header
852
- type: String
853
- default: "`nil`"
854
- description: Optional string to display as the header
855
- - name: system_arguments
856
- type: Hash
857
- default: N/A
858
- description: "[System arguments](/system-arguments)"
859
- - component: Flex
860
- source: https://github.com/primer/view_components/tree/main/app/components/primer/flex_component.rb
861
- parameters:
862
- - name: justify_content
863
- type: Symbol
864
- default: "`JUSTIFY_CONTENT_DEFAULT`"
865
- description: Use this param to distribute space between and around flex items
866
- along the main axis of the container. One of `nil`, `:center`, `:flex_end`,
867
- `:flex_start`, `:space_around`, or `:space_between`.
868
- - name: inline
869
- type: Boolean
870
- default: "`false`"
871
- description: Defaults to false.
872
- - name: flex_wrap
873
- type: Boolean
874
- default: "`FLEX_WRAP_DEFAULT`"
875
- description: Defaults to nil.
876
- - name: align_items
877
- type: Symbol
878
- default: "`ALIGN_ITEMS_DEFAULT`"
879
- description: Use this param to align items on the cross axis. One of `nil`, `:baseline`,
880
- `:center`, `:end`, `:start`, or `:stretch`.
881
- - name: direction
882
- type: Symbol
883
- default: "`nil`"
884
- description: Use this param to define the orientation of the main axis (row or
885
- column). By default, flex items will display in a row. One of `nil`, `:column`,
886
- `:column_reverse`, `:row`, or `:row_reverse`.
887
- - name: system_arguments
888
- type: Hash
889
- default: N/A
890
- description: "[System arguments](/system-arguments)"
891
- - component: FlexItem
892
- source: https://github.com/primer/view_components/tree/main/app/components/primer/flex_item_component.rb
893
- parameters:
894
- - name: flex_auto
895
- type: Boolean
896
- default: "`false`"
897
- description: Fills available space and auto-sizes based on the content. Defaults
898
- to false
899
- - name: system_arguments
900
- type: Hash
901
- default: N/A
902
- description: "[System arguments](/system-arguments)"
903
- - component: HellipButton
904
- source: https://github.com/primer/view_components/tree/main/app/components/primer/hellip_button.rb
905
- parameters:
906
- - name: inline
907
- type: Boolean
908
- default: "`false`"
909
- description: Whether or not the button is inline.
910
- - name: system_arguments
911
- type: Hash
912
- default: N/A
913
- description: "[System arguments](/system-arguments)"
914
- - component: IconButton
915
- source: https://github.com/primer/view_components/tree/main/app/components/primer/icon_button.rb
916
- parameters:
917
- - name: scheme
918
- type: Symbol
919
- default: "`:default`"
920
- description: One of `:danger` or `:default`.
921
- - name: icon
922
- type: String
923
- default: N/A
924
- description: Name of [Octicon](https://primer.style/octicons/) to use.
925
- - name: tag
926
- type: Symbol
927
- default: N/A
928
- description: One of `:a`, `:button`, or `:summary`.
929
- - name: type
930
- type: Symbol
931
- default: N/A
932
- description: One of `:button`, `:reset`, or `:submit`.
933
- - name: aria-label
934
- type: String
935
- default: N/A
936
- description: String that can be read by assistive technology. A label should be
937
- short and concise. See the accessibility section for more information.
938
- - name: aria-description
939
- type: String
940
- default: N/A
941
- description: String that can be read by assistive technology. A description can
942
- be longer as it is intended to provide more context and information. See the
943
- accessibility section for more information.
944
- - name: tooltip_direction
945
- type: Symbol
946
- default: "`:s`"
947
- description: One of `:e`, `:n`, `:ne`, `:nw`, `:s`, `:se`, `:sw`, or `:w`.
948
- - name: box
949
- type: Boolean
950
- default: "`false`"
951
- description: Whether the button is in a [BorderBox](/components/beta/borderbox).
952
- If `true`, the button will have the `Box-btn-octicon` class.
953
- - name: system_arguments
954
- type: Hash
955
- default: N/A
956
- description: "[System arguments](/system-arguments)"
957
- - component: Image
958
- source: https://github.com/primer/view_components/tree/main/app/components/primer/image.rb
959
- parameters:
960
- - name: src
961
- type: String
962
- default: N/A
963
- description: The source url of the image.
964
- - name: alt
965
- type: String
966
- default: N/A
967
- description: Specifies an alternate text for the image.
968
- - name: lazy
969
- type: Boolean
970
- default: "`false`"
971
- description: Whether or not to lazily load the image.
972
- - name: system_arguments
973
- type: Hash
974
- default: N/A
975
- description: "[System arguments](/system-arguments)"
976
- - component: ImageCrop
977
- source: https://github.com/primer/view_components/tree/main/app/components/primer/image_crop.rb
978
- parameters:
979
- - name: src
980
- type: String
981
- default: N/A
982
- description: The path of the image to crop.
983
- - name: rounded
984
- type: Boolean
985
- default: "`true`"
986
- description: If the crop mask should be a circle. Defaults to true.
987
- - name: system_arguments
988
- type: Hash
989
- default: N/A
990
- description: "[System arguments](/system-arguments)"
991
- - component: Label
992
- source: https://github.com/primer/view_components/tree/main/app/components/primer/label_component.rb
993
- parameters:
994
- - name: tag
995
- type: Symbol
996
- default: "`:span`"
997
- description: One of `:a`, `:div`, `:span`, or `:summary`.
998
- - name: scheme
999
- type: Symbol
1000
- default: "`:default`"
1001
- description: One of `:accent`, `:attention`, `:danger`, `:default`, `:done`, `:info`,
1002
- `:orange`, `:primary`, `:purple`, `:secondary`, `:severe`, `:sponsors`, `:success`,
1003
- or `:warning`.
1004
- - name: size
1005
- type: Symbol
1006
- default: "`:medium`"
1007
- description: One of `:large` or `:medium`.
1008
- - name: inline
1009
- type: Boolean
1010
- default: "`false`"
1011
- description: Whether or not to render this label inline.
1012
- - name: variant
1013
- type: Symbol
1014
- default: "`:none`"
1015
- description: One of `:inline`, `:large`, or `:none`.
1016
- - name: system_arguments
1017
- type: Hash
1018
- default: N/A
1019
- description: "[System arguments](/system-arguments)"
1020
- - component: Layout
1021
- source: https://github.com/primer/view_components/tree/main/app/components/primer/layout_component.rb
1022
- parameters:
1023
- - name: responsive
1024
- type: Boolean
1025
- default: "`false`"
1026
- description: Whether to collapse layout to a single column at smaller widths.
1027
- - name: side
1028
- type: Symbol
1029
- default: "`:right`"
1030
- description: Which side to display the sidebar on. One of `:left` or `:right`.
1031
- - name: sidebar_col
1032
- type: Integer
1033
- default: "`3`"
1034
- description: Sidebar column width.
1035
- - name: system_arguments
1036
- type: Hash
1037
- default: N/A
1038
- description: "[System arguments](/system-arguments)"
1039
- - component: Link
1040
- source: https://github.com/primer/view_components/tree/main/app/components/primer/link_component.rb
1041
- parameters:
1042
- - name: tag
1043
- type: String
1044
- default: "`:a`"
1045
- description: One of `:a` or `:span`.
1046
- - name: href
1047
- type: String
1048
- default: "`nil`"
1049
- description: URL to be used for the Link. Required if tag is `:a`. If the requirements
1050
- are not met an error will be raised in non production environments. In production,
1051
- an empty link element will be rendered.
1052
- - name: scheme
1053
- type: Symbol
1054
- default: "`:default`"
1055
- description: One of `:default`, `:primary`, or `:secondary`.
1056
- - name: muted
1057
- type: Boolean
1058
- default: "`false`"
1059
- description: Uses light gray for Link color, and blue on hover.
1060
- - name: underline
1061
- type: Boolean
1062
- default: "`true`"
1063
- description: Whether or not to underline the link.
1064
- - name: system_arguments
1065
- type: Hash
1066
- default: N/A
1067
- description: "[System arguments](/system-arguments)"
1068
- - component: LocalTime
1069
- source: https://github.com/primer/view_components/tree/main/app/components/primer/local_time.rb
1070
- parameters:
1071
- - name: datetime
1072
- type: DateTime
1073
- default: N/A
1074
- description: The date to parse
1075
- - name: initial_text
1076
- type: String
1077
- default: "`nil`"
1078
- description: Text to render before component is initialized
1079
- - name: weekday
1080
- type: Symbol
1081
- default: "`:short`"
1082
- description: One of `:long` or `:short`.
1083
- - name: year
1084
- type: Symbol
1085
- default: "`:numeric`"
1086
- description: One of `:2-digit` or `:numeric`.
1087
- - name: month
1088
- type: Symbol
1089
- default: "`:short`"
1090
- description: One of `:long` or `:short`.
1091
- - name: day
1092
- type: Symbol
1093
- default: "`:numeric`"
1094
- description: One of `:2-digit` or `:numeric`.
1095
- - name: hour
1096
- type: Symbol
1097
- default: "`:numeric`"
1098
- description: One of `:2-digit` or `:numeric`.
1099
- - name: minute
1100
- type: Symbol
1101
- default: "`:numeric`"
1102
- description: One of `:2-digit` or `:numeric`.
1103
- - name: second
1104
- type: Symbol
1105
- default: "`:numeric`"
1106
- description: One of `:2-digit` or `:numeric`.
1107
- - name: time_zone_name
1108
- type: Symbol
1109
- default: "`:short`"
1110
- description: One of `:long` or `:short`.
1111
- - name: system_arguments
1112
- type: Hash
1113
- default: N/A
1114
- description: "[System arguments](/system-arguments)"
1115
- - component: Markdown
1116
- source: https://github.com/primer/view_components/tree/main/app/components/primer/markdown.rb
1117
- parameters:
1118
- - name: tag
1119
- type: Symbol
1120
- default: "`:div`"
1121
- description: One of `:article`, `:div`, or `:td`.
1122
- - name: system_arguments
1123
- type: Hash
1124
- default: N/A
1125
- description: "[System arguments](/system-arguments)"
1126
- - component: Menu
1127
- source: https://github.com/primer/view_components/tree/main/app/components/primer/menu_component.rb
1128
- parameters:
1129
- - name: system_arguments
1130
- type: Hash
1131
- default: N/A
1132
- description: "[System arguments](/system-arguments)"
1133
- - component: NavigationTab
1134
- source: https://github.com/primer/view_components/tree/main/app/components/primer/navigation/tab_component.rb
1135
- parameters:
1136
- - name: list
1137
- type: Boolean
1138
- default: "`false`"
1139
- description: Whether the Tab is an item in a `<ul>` list.
1140
- - name: selected
1141
- type: Boolean
1142
- default: "`false`"
1143
- description: Whether the Tab is selected or not.
1144
- - name: with_panel
1145
- type: Boolean
1146
- default: "`false`"
1147
- description: Whether the Tab has an associated panel.
1148
- - name: panel_id
1149
- type: String
1150
- default: '`""`'
1151
- description: Only applies if `with_panel` is `true`. Unique id of panel.
1152
- - name: icon_classes
1153
- type: Boolean
1154
- default: '`""`'
1155
- description: Classes that must always be applied to icons.
1156
- - name: wrapper_arguments
1157
- type: Hash
1158
- default: "`{}`"
1159
- description: "[System arguments](/system-arguments) to be used in the `<li>` wrapper
1160
- when the tab is an item in a list."
1161
- - name: system_arguments
1162
- type: Hash
1163
- default: N/A
1164
- description: "[System arguments](/system-arguments)"
1165
- - component: Octicon
1166
- source: https://github.com/primer/view_components/tree/main/app/components/primer/octicon_component.rb
1167
- parameters:
1168
- - name: icon_name
1169
- type: Symbol, String
1170
- default: "`nil`"
1171
- description: Name of [Octicon](https://primer.style/octicons/) to use.
1172
- - name: icon
1173
- type: Symbol, String
1174
- default: "`nil`"
1175
- description: Name of [Octicon](https://primer.style/octicons/) to use.
1176
- - name: size
1177
- type: Symbol
1178
- default: "`:small`"
1179
- description: One of `:xsmall` (`12`), `:small` (`16`), or `:medium` (`24`).
1180
- - name: use_symbol
1181
- type: Boolean
1182
- default: "`false`"
1183
- description: EXPERIMENTAL (May change or be removed) - Set to true when using
1184
- with [OcticonSymbols](/components/octiconsymbols).
1185
- - name: system_arguments
1186
- type: Hash
1187
- default: N/A
1188
- description: "[System arguments](/system-arguments)"
1189
- - component: OcticonSymbols
1190
- source: https://github.com/primer/view_components/tree/main/app/components/primer/octicon_symbols_component.rb
1191
- parameters:
1192
- - name: icons
1193
- type: Array<Hash>
1194
- default: "`[]`"
1195
- description: 'List of icons to render, in the format { symbol: :icon_name, size:
1196
- :small }'
1197
- - component: Popover
1198
- source: https://github.com/primer/view_components/tree/main/app/components/primer/popover_component.rb
1199
- parameters:
1200
- - name: system_arguments
1201
- type: Hash
1202
- default: N/A
1203
- description: "[System arguments](/system-arguments)"
1204
- - component: ProgressBar
1205
- source: https://github.com/primer/view_components/tree/main/app/components/primer/progress_bar_component.rb
1206
- parameters:
1207
- - name: size
1208
- type: Symbol
1209
- default: "`:default`"
1210
- description: One of `:default`, `:large`, or `:small`. Increases height.
1211
- - name: system_arguments
1212
- type: Hash
1213
- default: N/A
1214
- description: "[System arguments](/system-arguments)"
1215
- - component: Spinner
1216
- source: https://github.com/primer/view_components/tree/main/app/components/primer/spinner_component.rb
1217
- parameters:
1218
- - name: size
1219
- type: Symbol
1220
- default: "`:medium`"
1221
- description: One of `[:large, 64]`, `[:medium, 32]`, or `[:small, 16]`.
1222
- - name: style
1223
- type: String
1224
- default: "`box-sizing: content-box; color: var(--color-icon-primary);`"
1225
- description: Custom element styles.
1226
- - name: system_arguments
1227
- type: Hash
1228
- default: N/A
1229
- description: "[System arguments](/system-arguments)"
1230
- - component: State
1231
- source: https://github.com/primer/view_components/tree/main/app/components/primer/state_component.rb
1232
- parameters:
1233
- - name: title
1234
- type: String
1235
- default: N/A
1236
- description: "`title` HTML attribute."
1237
- - name: scheme
1238
- type: Symbol
1239
- default: "`:default`"
1240
- description: Background color. One of `:closed`, `:default`, `:green`, `:merged`,
1241
- `:open`, `:purple`, or `:red`.
1242
- - name: tag
1243
- type: Symbol
1244
- default: "`:span`"
1245
- description: HTML tag for element. One of `:div` or `:span`.
1246
- - name: size
1247
- type: Symbol
1248
- default: "`:default`"
1249
- description: One of `:default` or `:small`.
1250
- - name: system_arguments
1251
- type: Hash
1252
- default: N/A
1253
- description: "[System arguments](/system-arguments)"
1254
- - component: Subhead
1255
- source: https://github.com/primer/view_components/tree/main/app/components/primer/subhead_component.rb
1256
- parameters:
1257
- - name: spacious
1258
- type: Boolean
1259
- default: "`false`"
1260
- description: Whether to add spacing to the Subhead.
1261
- - name: hide_border
1262
- type: Boolean
1263
- default: "`false`"
1264
- description: Whether to hide the border under the heading.
1265
- - name: system_arguments
1266
- type: Hash
1267
- default: N/A
1268
- description: "[System arguments](/system-arguments)"
1269
- - component: TabContainer
1270
- source: https://github.com/primer/view_components/tree/main/app/components/primer/tab_container_component.rb
1271
- parameters:
1272
- - name: system_arguments
1273
- type: Hash
1274
- default: N/A
1275
- description: "[System arguments](/system-arguments)"
1276
- - component: TimeAgo
1277
- source: https://github.com/primer/view_components/tree/main/app/components/primer/time_ago_component.rb
1278
- parameters:
1279
- - name: time
1280
- type: Time
1281
- default: N/A
1282
- description: The time to be formatted
1283
- - name: micro
1284
- type: Boolean
1285
- default: "`false`"
1286
- description: If true then the text will be formatted in "micro" mode, using as
1287
- few characters as possible
1288
- - name: system_arguments
1289
- type: Hash
1290
- default: N/A
1291
- description: "[System arguments](/system-arguments)"
1292
- - component: TimelineItem
1293
- source: https://github.com/primer/view_components/tree/main/app/components/primer/timeline_item_component.rb
1294
- parameters:
1295
- - name: condensed
1296
- type: Boolean
1297
- default: "`false`"
1298
- description: Reduce the vertical padding and remove the background from the badge
1299
- item. Most commonly used in commits.
1300
- - name: system_arguments
1301
- type: Hash
1302
- default: N/A
1303
- description: "[System arguments](/system-arguments)"
1304
- - component: Tooltip
1305
- source: https://github.com/primer/view_components/tree/main/app/components/primer/tooltip.rb
1306
- parameters:
1307
- - name: label
1308
- type: String
1309
- default: N/A
1310
- description: the text to appear in the tooltip
1311
- - name: direction
1312
- type: String
1313
- default: "`:n`"
1314
- description: Direction of the tooltip. One of `:e`, `:n`, `:ne`, `:nw`, `:s`,
1315
- `:se`, `:sw`, or `:w`.
1316
- - name: align
1317
- type: String
1318
- default: "`:default`"
1319
- description: Align tooltips to the left or right of an element, combined with
1320
- a `direction` to specify north or south. One of `:default`, `:left_1`, `:left_2`,
1321
- `:right_1`, or `:right_2`.
1322
- - name: multiline
1323
- type: Boolean
1324
- default: "`false`"
1325
- description: Use this when you have long content
1326
- - name: no_delay
1327
- type: Boolean
1328
- default: "`false`"
1329
- description: By default the tooltips have a slight delay before appearing. Set
1330
- true to override this
1331
- - name: system_arguments
1332
- type: Hash
1333
- default: N/A
1334
- description: "[System arguments](/system-arguments)"
1335
- - component: Truncate
1336
- source: https://github.com/primer/view_components/tree/main/app/components/primer/truncate.rb
1337
- parameters:
1338
- - name: tag
1339
- type: Symbol
1340
- default: "`:div`"
1341
- description: One of `:div`, `:p`, `:span`, or `:strong`.
1342
- - name: inline
1343
- type: Boolean
1344
- default: "`false`"
1345
- description: Whether the element is inline (or inline-block).
1346
- - name: expandable
1347
- type: Boolean
1348
- default: "`false`"
1349
- description: Whether the entire string should be revealed on hover. Can only be
1350
- used in conjunction with `inline`.
1351
- - name: max_width
1352
- type: Integer
1353
- default: "`nil`"
1354
- description: Sets the max-width of the text.
1355
- - name: system_arguments
1356
- type: Hash
1357
- default: N/A
1358
- description: "[System arguments](/system-arguments)"