primer_view_components 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +50 -0
- data/app/assets/javascripts/app/components/primer/alpha/action_menu/action_menu_element.d.ts +3 -2
- data/app/assets/javascripts/app/components/primer/alpha/x_banner.d.ts +3 -1
- 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/action_list/item.rb +17 -6
- data/app/components/primer/alpha/action_list.css +1 -1
- data/app/components/primer/alpha/action_list.css.json +2 -0
- data/app/components/primer/alpha/action_list.css.map +1 -1
- data/app/components/primer/alpha/action_list.pcss +4 -2
- data/app/components/primer/alpha/action_list.rb +61 -6
- data/app/components/primer/alpha/action_menu/action_menu_element.d.ts +3 -2
- data/app/components/primer/alpha/action_menu/action_menu_element.js +9 -2
- data/app/components/primer/alpha/action_menu/action_menu_element.ts +10 -5
- data/app/components/primer/alpha/action_menu/list.rb +63 -34
- data/app/components/primer/alpha/action_menu.rb +12 -0
- data/app/components/primer/alpha/banner.html.erb +1 -1
- data/app/components/primer/alpha/banner.rb +13 -9
- data/app/components/primer/alpha/dialog.css +1 -1
- data/app/components/primer/alpha/dialog.css.map +1 -1
- data/app/components/primer/alpha/dialog.pcss +1 -1
- data/app/components/primer/alpha/nav_list/group.rb +12 -3
- data/app/components/primer/alpha/nav_list.rb +80 -16
- data/app/components/primer/alpha/tool_tip.js +3 -3
- data/app/components/primer/alpha/tool_tip.ts +3 -3
- data/app/components/primer/alpha/x_banner.d.ts +3 -1
- data/app/components/primer/alpha/x_banner.js +24 -10
- data/app/components/primer/alpha/x_banner.ts +14 -12
- data/app/components/primer/base_component.rb +1 -1
- data/app/components/primer/beta/avatar.rb +1 -1
- data/app/components/primer/beta/button.css +1 -1
- data/app/components/primer/beta/button.css.map +1 -1
- data/app/components/primer/beta/button.pcss +1 -1
- data/app/forms/submit_button_form.rb +1 -1
- data/lib/primer/classify/utilities.yml +2 -0
- data/lib/primer/forms/button.rb +0 -5
- data/lib/primer/forms/dsl/input.rb +2 -0
- data/lib/primer/view_components/version.rb +2 -2
- data/lib/primer/yard/lookbook_pages_backend.rb +31 -0
- data/lib/tasks/custom_utilities.yml +2 -0
- data/previews/primer/alpha/action_list_preview.rb +89 -17
- data/previews/primer/alpha/action_menu_preview.rb +79 -37
- data/previews/primer/alpha/banner_preview/with_action_button.html.erb +1 -1
- data/previews/primer/alpha/banner_preview/with_action_content.html.erb +1 -1
- data/previews/primer/alpha/banner_preview.rb +11 -14
- data/previews/primer/alpha/nav_list_preview.rb +17 -0
- data/static/arguments.json +6 -12
- data/static/constants.json +6 -0
- data/static/info_arch.json +371 -22
- data/static/previews.json +15 -2
- metadata +2 -2
data/static/arguments.json
CHANGED
@@ -270,7 +270,7 @@
|
|
270
270
|
"name": "description_scheme",
|
271
271
|
"type": "Symbol",
|
272
272
|
"default": "`:block`",
|
273
|
-
"description": "Display description inline with label, or block on the next line."
|
273
|
+
"description": "Display description inline with label, or block on the next line. One of `:block` or `:inline`."
|
274
274
|
},
|
275
275
|
{
|
276
276
|
"name": "active",
|
@@ -521,10 +521,10 @@
|
|
521
521
|
"description": "Whether the component should take up the full width of the screen when rendered inside smaller viewports."
|
522
522
|
},
|
523
523
|
{
|
524
|
-
"name": "
|
525
|
-
"type": "
|
526
|
-
"default": "`
|
527
|
-
"description": "Whether the component can be dismissed with an \"x\" button."
|
524
|
+
"name": "dismiss_scheme",
|
525
|
+
"type": "Symbol",
|
526
|
+
"default": "`:none`",
|
527
|
+
"description": "Whether the component can be dismissed with an \"x\" button. One of `:hide`, `:none`, or `:remove`."
|
528
528
|
},
|
529
529
|
{
|
530
530
|
"name": "description",
|
@@ -544,12 +544,6 @@
|
|
544
544
|
"default": "`:default`",
|
545
545
|
"description": "One of `:danger`, `:default`, `:success`, or `:warning`."
|
546
546
|
},
|
547
|
-
{
|
548
|
-
"name": "reappear",
|
549
|
-
"type": "Boolean",
|
550
|
-
"default": "`false`",
|
551
|
-
"description": "Whether or not the flash banner should reappear after being dismissed. Only for use in test and preview environments."
|
552
|
-
},
|
553
547
|
{
|
554
548
|
"name": "system_arguments",
|
555
549
|
"type": "Hash",
|
@@ -2986,7 +2980,7 @@
|
|
2986
2980
|
{
|
2987
2981
|
"name": "alt",
|
2988
2982
|
"type": "String",
|
2989
|
-
"default": "
|
2983
|
+
"default": "`nil`",
|
2990
2984
|
"description": "Passed through to alt on img tag."
|
2991
2985
|
},
|
2992
2986
|
{
|
data/static/constants.json
CHANGED
@@ -146,6 +146,7 @@
|
|
146
146
|
"Primer::Alpha::AutoComplete::Item": {
|
147
147
|
},
|
148
148
|
"Primer::Alpha::Banner": {
|
149
|
+
"DEFAULT_DISMISS_SCHEME": "none",
|
149
150
|
"DEFAULT_ICONS": {
|
150
151
|
"default": "bell",
|
151
152
|
"warning": "alert",
|
@@ -153,6 +154,11 @@
|
|
153
154
|
"success": "check-circle"
|
154
155
|
},
|
155
156
|
"DEFAULT_SCHEME": "default",
|
157
|
+
"DISMISS_SCHEMES": [
|
158
|
+
"none",
|
159
|
+
"remove",
|
160
|
+
"hide"
|
161
|
+
],
|
156
162
|
"LEGACY_SCHEME_MAPPINGS": {
|
157
163
|
"default": "",
|
158
164
|
"warning": "flash-warn",
|
data/static/info_arch.json
CHANGED
@@ -259,7 +259,7 @@
|
|
259
259
|
},
|
260
260
|
{
|
261
261
|
"name": "items",
|
262
|
-
"description": "Items. Items can be individual items or dividers. See the documentation for `#with_item
|
262
|
+
"description": "Items. Items can be individual items, avatar items, or dividers. See the documentation for `#with_item`, `#with_divider`, and `#with_avatar_item` respectively for more information.",
|
263
263
|
"parameters": [
|
264
264
|
|
265
265
|
]
|
@@ -270,11 +270,17 @@
|
|
270
270
|
"name": "with_item",
|
271
271
|
"description": "Adds an item to the list.",
|
272
272
|
"parameters": [
|
273
|
+
{
|
274
|
+
"name": "component_klass",
|
275
|
+
"type": "Class",
|
276
|
+
"default": "N/A",
|
277
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}"
|
278
|
+
},
|
273
279
|
{
|
274
280
|
"name": "system_arguments",
|
275
281
|
"type": "Hash",
|
276
282
|
"default": "N/A",
|
277
|
-
"description": "
|
283
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
278
284
|
}
|
279
285
|
]
|
280
286
|
},
|
@@ -290,6 +296,54 @@
|
|
290
296
|
}
|
291
297
|
]
|
292
298
|
},
|
299
|
+
{
|
300
|
+
"name": "with_avatar_item",
|
301
|
+
"description": "Adds an avatar item to the list. Avatar items are a convenient way to accessibly add an item with a leading avatar image.",
|
302
|
+
"parameters": [
|
303
|
+
{
|
304
|
+
"name": "src",
|
305
|
+
"type": "String",
|
306
|
+
"default": "N/A",
|
307
|
+
"description": "The source url of the avatar image."
|
308
|
+
},
|
309
|
+
{
|
310
|
+
"name": "username",
|
311
|
+
"type": "String",
|
312
|
+
"default": "N/A",
|
313
|
+
"description": "The username associated with the avatar."
|
314
|
+
},
|
315
|
+
{
|
316
|
+
"name": "full_name",
|
317
|
+
"type": "String",
|
318
|
+
"default": "`nil`",
|
319
|
+
"description": "Optional. The user's full name."
|
320
|
+
},
|
321
|
+
{
|
322
|
+
"name": "full_name_scheme",
|
323
|
+
"type": "Symbol",
|
324
|
+
"default": "`:block`",
|
325
|
+
"description": "Optional. How to display the user's full name. One of `:block` or `:inline`."
|
326
|
+
},
|
327
|
+
{
|
328
|
+
"name": "component_klass",
|
329
|
+
"type": "Class",
|
330
|
+
"default": "`ActionList::Item`",
|
331
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}"
|
332
|
+
},
|
333
|
+
{
|
334
|
+
"name": "avatar_arguments",
|
335
|
+
"type": "Hash",
|
336
|
+
"default": "`{}`",
|
337
|
+
"description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}"
|
338
|
+
},
|
339
|
+
{
|
340
|
+
"name": "system_arguments",
|
341
|
+
"type": "Hash",
|
342
|
+
"default": "N/A",
|
343
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
344
|
+
}
|
345
|
+
]
|
346
|
+
},
|
293
347
|
{
|
294
348
|
"name": "id",
|
295
349
|
"description": "Returns the value of attribute id.",
|
@@ -311,6 +365,72 @@
|
|
311
365
|
|
312
366
|
]
|
313
367
|
},
|
368
|
+
{
|
369
|
+
"name": "build_item",
|
370
|
+
"description": "Builds a new item but does not add it to the list. Use this method\ninstead of the `#with_item` slot if you need to render an item outside\nthe context of a list, eg. if rendering additional items to append to\nan existing list, perhaps via a separate HTTP request.",
|
371
|
+
"parameters": [
|
372
|
+
{
|
373
|
+
"name": "component_klass",
|
374
|
+
"type": "Class",
|
375
|
+
"default": "`ActionList::Item`",
|
376
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}"
|
377
|
+
},
|
378
|
+
{
|
379
|
+
"name": "system_arguments",
|
380
|
+
"type": "Hash",
|
381
|
+
"default": "N/A",
|
382
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
383
|
+
}
|
384
|
+
]
|
385
|
+
},
|
386
|
+
{
|
387
|
+
"name": "build_avatar_item",
|
388
|
+
"description": "Builds a new avatar item but does not add it to the list. Avatar items\nare a convenient way to accessibly add an item with a leading avatar\nimage. Use this method instead of the `#with_avatar_item` slot if you\nneed to render an avatar item outside the context of a list, eg. if\nrendering additional items to append to an existing list, perhaps via\na separate HTTP request.",
|
389
|
+
"parameters": [
|
390
|
+
{
|
391
|
+
"name": "src",
|
392
|
+
"type": "String",
|
393
|
+
"default": "N/A",
|
394
|
+
"description": "The source url of the avatar image."
|
395
|
+
},
|
396
|
+
{
|
397
|
+
"name": "username",
|
398
|
+
"type": "String",
|
399
|
+
"default": "N/A",
|
400
|
+
"description": "The username associated with the avatar."
|
401
|
+
},
|
402
|
+
{
|
403
|
+
"name": "full_name",
|
404
|
+
"type": "String",
|
405
|
+
"default": "`nil`",
|
406
|
+
"description": "Optional. The user's full name."
|
407
|
+
},
|
408
|
+
{
|
409
|
+
"name": "full_name_scheme",
|
410
|
+
"type": "Symbol",
|
411
|
+
"default": "`:block`",
|
412
|
+
"description": "Optional. How to display the user's full name. One of `:block` or `:inline`."
|
413
|
+
},
|
414
|
+
{
|
415
|
+
"name": "component_klass",
|
416
|
+
"type": "Class",
|
417
|
+
"default": "`ActionList::Item`",
|
418
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}"
|
419
|
+
},
|
420
|
+
{
|
421
|
+
"name": "avatar_arguments",
|
422
|
+
"type": "Hash",
|
423
|
+
"default": "`{}`",
|
424
|
+
"description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}"
|
425
|
+
},
|
426
|
+
{
|
427
|
+
"name": "system_arguments",
|
428
|
+
"type": "Hash",
|
429
|
+
"default": "N/A",
|
430
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
431
|
+
}
|
432
|
+
]
|
433
|
+
},
|
314
434
|
{
|
315
435
|
"name": "post_list_content_block",
|
316
436
|
"description": "Returns the value of attribute post_list_content_block.",
|
@@ -411,6 +531,19 @@
|
|
411
531
|
]
|
412
532
|
}
|
413
533
|
},
|
534
|
+
{
|
535
|
+
"preview_path": "primer/alpha/action_list/avatar_item",
|
536
|
+
"name": "avatar_item",
|
537
|
+
"snapshot": "false",
|
538
|
+
"skip_rules": {
|
539
|
+
"wont_fix": [
|
540
|
+
"region"
|
541
|
+
],
|
542
|
+
"will_fix": [
|
543
|
+
"color-contrast"
|
544
|
+
]
|
545
|
+
}
|
546
|
+
},
|
414
547
|
{
|
415
548
|
"preview_path": "primer/alpha/action_list/item_default",
|
416
549
|
"name": "item_default",
|
@@ -690,7 +823,7 @@
|
|
690
823
|
"name": "description_scheme",
|
691
824
|
"type": "Symbol",
|
692
825
|
"default": "`:block`",
|
693
|
-
"description": "Display description inline with label, or block on the next line."
|
826
|
+
"description": "Display description inline with label, or block on the next line. One of `:block` or `:inline`."
|
694
827
|
},
|
695
828
|
{
|
696
829
|
"name": "active",
|
@@ -727,7 +860,7 @@
|
|
727
860
|
},
|
728
861
|
{
|
729
862
|
"name": "leading_visual",
|
730
|
-
"description": "An icon, avatar, SVG, or custom content that will render to the left of the label.\n\nTo render an icon, call the `with_leading_visual_icon` method, which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}.\n\nTo render an
|
863
|
+
"description": "An icon, avatar, SVG, or custom content that will render to the left of the label.\n\nTo render an icon, call the `with_leading_visual_icon` method, which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}.\n\nTo render an SVG, call the `with_leading_visual_svg` method.\n\nTo render custom content, call the `with_leading_visual_content` method and pass a block that returns a string.",
|
731
864
|
"parameters": [
|
732
865
|
|
733
866
|
]
|
@@ -1137,6 +1270,48 @@
|
|
1137
1270
|
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}}'s `divider` slot."
|
1138
1271
|
}
|
1139
1272
|
]
|
1273
|
+
},
|
1274
|
+
{
|
1275
|
+
"name": "with_avatar_item",
|
1276
|
+
"description": "Adds an avatar item to the list. Avatar items are a convenient way to accessibly add an item with a leading avatar image.",
|
1277
|
+
"parameters": [
|
1278
|
+
{
|
1279
|
+
"name": "src",
|
1280
|
+
"type": "String",
|
1281
|
+
"default": "N/A",
|
1282
|
+
"description": "The source url of the avatar image."
|
1283
|
+
},
|
1284
|
+
{
|
1285
|
+
"name": "username",
|
1286
|
+
"type": "String",
|
1287
|
+
"default": "N/A",
|
1288
|
+
"description": "The username associated with the avatar."
|
1289
|
+
},
|
1290
|
+
{
|
1291
|
+
"name": "full_name",
|
1292
|
+
"type": "String",
|
1293
|
+
"default": "N/A",
|
1294
|
+
"description": "Optional. The user's full name."
|
1295
|
+
},
|
1296
|
+
{
|
1297
|
+
"name": "full_name_scheme",
|
1298
|
+
"type": "Symbol",
|
1299
|
+
"default": "N/A",
|
1300
|
+
"description": "Optional. How to display the user's full name."
|
1301
|
+
},
|
1302
|
+
{
|
1303
|
+
"name": "avatar_arguments",
|
1304
|
+
"type": "Hash",
|
1305
|
+
"default": "N/A",
|
1306
|
+
"description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}."
|
1307
|
+
},
|
1308
|
+
{
|
1309
|
+
"name": "system_arguments",
|
1310
|
+
"type": "Hash",
|
1311
|
+
"default": "N/A",
|
1312
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}."
|
1313
|
+
}
|
1314
|
+
]
|
1140
1315
|
}
|
1141
1316
|
],
|
1142
1317
|
"previews": [
|
@@ -1508,7 +1683,7 @@
|
|
1508
1683
|
},
|
1509
1684
|
{
|
1510
1685
|
"name": "items",
|
1511
|
-
"description": "Items. Items can be individual items or dividers. See the documentation for `#with_item
|
1686
|
+
"description": "Items. Items can be individual items, avatar items, or dividers. See the documentation for `#with_item`, `#with_divider`, and `#with_avatar_item` respectively for more information.",
|
1512
1687
|
"parameters": [
|
1513
1688
|
|
1514
1689
|
]
|
@@ -1529,7 +1704,55 @@
|
|
1529
1704
|
"name": "system_arguments",
|
1530
1705
|
"type": "Hash",
|
1531
1706
|
"default": "N/A",
|
1532
|
-
"description": "
|
1707
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
1708
|
+
}
|
1709
|
+
]
|
1710
|
+
},
|
1711
|
+
{
|
1712
|
+
"name": "with_avatar_item",
|
1713
|
+
"description": "Adds an avatar item to the list. Avatar items are a convenient way to accessibly add an item with a leading avatar image.",
|
1714
|
+
"parameters": [
|
1715
|
+
{
|
1716
|
+
"name": "src",
|
1717
|
+
"type": "String",
|
1718
|
+
"default": "N/A",
|
1719
|
+
"description": "The source url of the avatar image."
|
1720
|
+
},
|
1721
|
+
{
|
1722
|
+
"name": "username",
|
1723
|
+
"type": "String",
|
1724
|
+
"default": "N/A",
|
1725
|
+
"description": "The username associated with the avatar."
|
1726
|
+
},
|
1727
|
+
{
|
1728
|
+
"name": "full_name",
|
1729
|
+
"type": "String",
|
1730
|
+
"default": "`nil`",
|
1731
|
+
"description": "Optional. The user's full name."
|
1732
|
+
},
|
1733
|
+
{
|
1734
|
+
"name": "full_name_scheme",
|
1735
|
+
"type": "Symbol",
|
1736
|
+
"default": "`:block`",
|
1737
|
+
"description": "Optional. How to display the user's full name. One of `:block` or `:inline`."
|
1738
|
+
},
|
1739
|
+
{
|
1740
|
+
"name": "data",
|
1741
|
+
"type": "Hash",
|
1742
|
+
"default": "`{}`",
|
1743
|
+
"description": "When the menu is used as a form input (see the {{#link_to_component}}Primer::Alpha::ActionMenu{{/link_to_component}} docs), the label is submitted to the server by default. However, if the `data: { value: }` or `\"data-value\":` attribute is provided, it will be sent to the server instead."
|
1744
|
+
},
|
1745
|
+
{
|
1746
|
+
"name": "avatar_arguments",
|
1747
|
+
"type": "Hash",
|
1748
|
+
"default": "`{}`",
|
1749
|
+
"description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}."
|
1750
|
+
},
|
1751
|
+
{
|
1752
|
+
"name": "system_arguments",
|
1753
|
+
"type": "Hash",
|
1754
|
+
"default": "N/A",
|
1755
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::ActionList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
1533
1756
|
}
|
1534
1757
|
]
|
1535
1758
|
}
|
@@ -1817,10 +2040,10 @@
|
|
1817
2040
|
"description": "Whether the component should take up the full width of the screen when rendered inside smaller viewports."
|
1818
2041
|
},
|
1819
2042
|
{
|
1820
|
-
"name": "
|
1821
|
-
"type": "
|
1822
|
-
"default": "`
|
1823
|
-
"description": "Whether the component can be dismissed with an \"x\" button."
|
2043
|
+
"name": "dismiss_scheme",
|
2044
|
+
"type": "Symbol",
|
2045
|
+
"default": "`:none`",
|
2046
|
+
"description": "Whether the component can be dismissed with an \"x\" button. One of `:hide`, `:none`, or `:remove`."
|
1824
2047
|
},
|
1825
2048
|
{
|
1826
2049
|
"name": "description",
|
@@ -1840,12 +2063,6 @@
|
|
1840
2063
|
"default": "`:default`",
|
1841
2064
|
"description": "One of `:danger`, `:default`, `:success`, or `:warning`."
|
1842
2065
|
},
|
1843
|
-
{
|
1844
|
-
"name": "reappear",
|
1845
|
-
"type": "Boolean",
|
1846
|
-
"default": "`false`",
|
1847
|
-
"description": "Whether or not the flash banner should reappear after being dismissed. Only for use in test and preview environments."
|
1848
|
-
},
|
1849
2066
|
{
|
1850
2067
|
"name": "system_arguments",
|
1851
2068
|
"type": "Hash",
|
@@ -1945,8 +2162,8 @@
|
|
1945
2162
|
}
|
1946
2163
|
},
|
1947
2164
|
{
|
1948
|
-
"preview_path": "primer/alpha/banner/
|
1949
|
-
"name": "
|
2165
|
+
"preview_path": "primer/alpha/banner/dismissible",
|
2166
|
+
"name": "dismissible",
|
1950
2167
|
"snapshot": "true",
|
1951
2168
|
"skip_rules": {
|
1952
2169
|
"wont_fix": [
|
@@ -4635,6 +4852,72 @@
|
|
4635
4852
|
}
|
4636
4853
|
],
|
4637
4854
|
"methods": [
|
4855
|
+
{
|
4856
|
+
"name": "with_item",
|
4857
|
+
"description": "Adds an item to the list.",
|
4858
|
+
"parameters": [
|
4859
|
+
{
|
4860
|
+
"name": "component_klass",
|
4861
|
+
"type": "Class",
|
4862
|
+
"default": "`Primer::Alpha::NavList::Item`",
|
4863
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}"
|
4864
|
+
},
|
4865
|
+
{
|
4866
|
+
"name": "system_arguments",
|
4867
|
+
"type": "Hash",
|
4868
|
+
"default": "N/A",
|
4869
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
4870
|
+
}
|
4871
|
+
]
|
4872
|
+
},
|
4873
|
+
{
|
4874
|
+
"name": "with_avatar_item",
|
4875
|
+
"description": "Adds an avatar item to the list. Avatar items are a convenient way to accessibly add an item with a leading avatar image.",
|
4876
|
+
"parameters": [
|
4877
|
+
{
|
4878
|
+
"name": "src",
|
4879
|
+
"type": "String",
|
4880
|
+
"default": "N/A",
|
4881
|
+
"description": "The source url of the avatar image."
|
4882
|
+
},
|
4883
|
+
{
|
4884
|
+
"name": "username",
|
4885
|
+
"type": "String",
|
4886
|
+
"default": "N/A",
|
4887
|
+
"description": "The username associated with the avatar."
|
4888
|
+
},
|
4889
|
+
{
|
4890
|
+
"name": "full_name",
|
4891
|
+
"type": "String",
|
4892
|
+
"default": "`nil`",
|
4893
|
+
"description": "Optional. The user's full name."
|
4894
|
+
},
|
4895
|
+
{
|
4896
|
+
"name": "full_name_scheme",
|
4897
|
+
"type": "Symbol",
|
4898
|
+
"default": "`:block`",
|
4899
|
+
"description": "Optional. How to display the user's full name. One of `:block` or `:inline`."
|
4900
|
+
},
|
4901
|
+
{
|
4902
|
+
"name": "component_klass",
|
4903
|
+
"type": "Class",
|
4904
|
+
"default": "`Primer::Alpha::NavList::Item`",
|
4905
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}"
|
4906
|
+
},
|
4907
|
+
{
|
4908
|
+
"name": "avatar_arguments",
|
4909
|
+
"type": "Hash",
|
4910
|
+
"default": "`{}`",
|
4911
|
+
"description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}"
|
4912
|
+
},
|
4913
|
+
{
|
4914
|
+
"name": "system_arguments",
|
4915
|
+
"type": "Hash",
|
4916
|
+
"default": "N/A",
|
4917
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
4918
|
+
}
|
4919
|
+
]
|
4920
|
+
},
|
4638
4921
|
{
|
4639
4922
|
"name": "with_group",
|
4640
4923
|
"description": "Adds a group to the list. A group is a list of links and a (required) heading.",
|
@@ -4655,7 +4938,73 @@
|
|
4655
4938
|
"name": "system_arguments",
|
4656
4939
|
"type": "Hash",
|
4657
4940
|
"default": "N/A",
|
4658
|
-
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::
|
4941
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Alpha::NavList::Divider{{/link_to_component}}."
|
4942
|
+
}
|
4943
|
+
]
|
4944
|
+
},
|
4945
|
+
{
|
4946
|
+
"name": "build_item",
|
4947
|
+
"description": "Builds a new item but does not add it to the list. Use this method\ninstead of the `#with_item` slot if you need to render an item outside\nthe context of a list, eg. if rendering additional items to append to\nan existing list, perhaps via a separate HTTP request.",
|
4948
|
+
"parameters": [
|
4949
|
+
{
|
4950
|
+
"name": "component_klass",
|
4951
|
+
"type": "Class",
|
4952
|
+
"default": "`Primer::Alpha::NavList::Item`",
|
4953
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}"
|
4954
|
+
},
|
4955
|
+
{
|
4956
|
+
"name": "system_arguments",
|
4957
|
+
"type": "Hash",
|
4958
|
+
"default": "N/A",
|
4959
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
4960
|
+
}
|
4961
|
+
]
|
4962
|
+
},
|
4963
|
+
{
|
4964
|
+
"name": "build_avatar_item",
|
4965
|
+
"description": "Builds a new avatar item but does not add it to the list. Avatar items\nare a convenient way to accessibly add an item with a leading avatar\nimage. Use this method instead of the `#with_avatar_item` slot if you\nneed to render an avatar item outside the context of a list, eg. if\nrendering additional items to append to an existing list, perhaps via\na separate HTTP request.",
|
4966
|
+
"parameters": [
|
4967
|
+
{
|
4968
|
+
"name": "src",
|
4969
|
+
"type": "String",
|
4970
|
+
"default": "N/A",
|
4971
|
+
"description": "The source url of the avatar image."
|
4972
|
+
},
|
4973
|
+
{
|
4974
|
+
"name": "username",
|
4975
|
+
"type": "String",
|
4976
|
+
"default": "N/A",
|
4977
|
+
"description": "The username associated with the avatar."
|
4978
|
+
},
|
4979
|
+
{
|
4980
|
+
"name": "full_name",
|
4981
|
+
"type": "String",
|
4982
|
+
"default": "`nil`",
|
4983
|
+
"description": "Optional. The user's full name."
|
4984
|
+
},
|
4985
|
+
{
|
4986
|
+
"name": "full_name_scheme",
|
4987
|
+
"type": "Symbol",
|
4988
|
+
"default": "`:block`",
|
4989
|
+
"description": "Optional. How to display the user's full name. One of `:block` or `:inline`."
|
4990
|
+
},
|
4991
|
+
{
|
4992
|
+
"name": "component_klass",
|
4993
|
+
"type": "Class",
|
4994
|
+
"default": "`Primer::Alpha::NavList::Item`",
|
4995
|
+
"description": "The class to use instead of the default {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}"
|
4996
|
+
},
|
4997
|
+
{
|
4998
|
+
"name": "avatar_arguments",
|
4999
|
+
"type": "Hash",
|
5000
|
+
"default": "`{}`",
|
5001
|
+
"description": "Optional. The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}}"
|
5002
|
+
},
|
5003
|
+
{
|
5004
|
+
"name": "system_arguments",
|
5005
|
+
"type": "Hash",
|
5006
|
+
"default": "N/A",
|
5007
|
+
"description": "These arguments are forwarded to {{#link_to_component}}Primer::Alpha::NavList::Item{{/link_to_component}}, or whatever class is passed as the `component_klass` argument."
|
4659
5008
|
}
|
4660
5009
|
]
|
4661
5010
|
},
|
@@ -4879,7 +5228,7 @@
|
|
4879
5228
|
},
|
4880
5229
|
{
|
4881
5230
|
"name": "leading_visual",
|
4882
|
-
"description": "An icon, avatar, SVG, or custom content that will render to the left of the label.\n\nTo render an icon, call the `with_leading_visual_icon` method, which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}.\n\nTo render an
|
5231
|
+
"description": "An icon, avatar, SVG, or custom content that will render to the left of the label.\n\nTo render an icon, call the `with_leading_visual_icon` method, which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}.\n\nTo render an SVG, call the `with_leading_visual_svg` method.\n\nTo render custom content, call the `with_leading_visual_content` method and pass a block that returns a string.",
|
4883
5232
|
"parameters": [
|
4884
5233
|
|
4885
5234
|
]
|
@@ -8876,7 +9225,7 @@
|
|
8876
9225
|
{
|
8877
9226
|
"name": "alt",
|
8878
9227
|
"type": "String",
|
8879
|
-
"default": "
|
9228
|
+
"default": "`nil`",
|
8880
9229
|
"description": "Passed through to alt on img tag."
|
8881
9230
|
},
|
8882
9231
|
{
|
@@ -14020,6 +14369,6 @@
|
|
14020
14369
|
"component": "BaseComponent",
|
14021
14370
|
"fully_qualified_name": "Primer::BaseComponent",
|
14022
14371
|
"description_md": "All Primer ViewComponents accept a standard set of options called system arguments, mimicking the [styled-system API](https://styled-system.com/table) used by [Primer React](https://primer.style/components/system-props).\n\nUnder the hood, system arguments are [mapped](https://github.com/primer/view_components/blob/main/lib/primer/classify.rb) to Primer CSS classes, with any remaining options passed to Rails' [`content_tag`](https://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-content_tag).\n\n## Responsive values\n\nTo apply different values across responsive breakpoints, pass an array with up to five values in the order `[default, small, medium, large, xlarge]`. To skip a breakpoint, pass `nil`.\n\nFor example:\n\n```erb\n<%= render Primer::Beta::Heading.new(mt: [0, nil, nil, 4, 2]) do %>\n Hello world\n<% end %>\n```\n\nRenders:\n\n```html\n<h1 class=\"mt-0 mt-lg-4 mt-xl-2\">Hello world</h1>\n```",
|
14023
|
-
"args_md": "## HTML attributes\n\nSystem arguments include most HTML attributes. For example:\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `aria` | `Hash` | Aria attributes: `aria: { label: \"foo\" }` renders `aria-label='foo'`. |\n| `data` | `Hash` | Data attributes: `data: { foo: :bar }` renders `data-foo='bar'`. |\n| `height` | `Integer` | Height. |\n| `hidden` | `Boolean` | Whether to assign the `hidden` attribute. |\n| `style` | `String` | Inline styles. |\n| `title` | `String` | The `title` attribute. |\n| `width` | `Integer` | Width. |\n\n## Animation\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `animation` | Symbol | One of `:fade_down`, `:fade_in`, `:fade_out`, `:fade_up`, `:grow_x`, `:hover_grow`, `:pulse`, `:pulse_in`, `:rotate`, `:scale_in`, or `:shrink_x`. |\n\n## Border\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `border_bottom` | Integer | Set to `0` to remove the bottom border. |\n| `border_left` | Integer | Set to `0` to remove the left border. |\n| `border_radius` | Integer | One of `0`, `1`, `2`, or `3`. |\n| `border_right` | Integer | Set to `0` to remove the right border. |\n| `border_top` | Integer | Set to `0` to remove the top border. |\n| `border` | Symbol | One of `:bottom`, `:left`, `:right`, `:top`, `:x`, `:y`, or `true`. |\n| `box_shadow` | Boolean, Symbol | Box shadow. One of `:extra_large`, `:large`, `:medium`, `:none`, or `true`. |\n\n## Color\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `bg` | Symbol | Background color. One of `:accent`, `:accent_emphasis`, `:attention`, `:attention_emphasis`, `:closed`, `:closed_emphasis`, `:danger`, `:danger_emphasis`, `:default`, `:done`, `:done_emphasis`, `:emphasis`, `:inset`, `:open`, `:open_emphasis`, `:overlay`, `:severe`, `:severe_emphasis`, `:sponsors`, `:sponsors_emphasis`, `:subtle`, `:success`, `:success_emphasis`, or `:transparent`. |\n| `border_color` | Symbol | Border color. One of `:accent`, `:accent_emphasis`, `:attention`, `:attention_emphasis`, `:closed`, `:closed_emphasis`, `:danger`, `:danger_emphasis`, `:default`, `:done`, `:done_emphasis`, `:muted`, `:open`, `:open_emphasis`, `:severe`, `:severe_emphasis`, `:sponsors`, `:sponsors_emphasis`, `:subtle`, `:success`, or `:success_emphasis`. |\n| `color` | Symbol | Text color. One of `:accent`, `:attention`, `:closed`, `:danger`, `:default`, `:done`, `:inherit`, `:muted`, `:on_emphasis`, `:open`, `:severe`, `:sponsors`, `:subtle`, or `:success`. |\n\n## Flex\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `align_items` | Symbol | One of `:baseline`, `:center`, `:flex_end`, `:flex_start`, or `:stretch`. |\n| `align_self` | Symbol | One of `:auto`, `:baseline`, `:center`, `:end`, `:start`, or `:stretch`. |\n| `direction` | Symbol | One of `:column`, `:column_reverse`, `:row`, or `:row_reverse`. |\n| `flex` | Integer, Symbol | One of `1` or `:auto`. |\n| `flex_grow` | Integer | To enable, set to `0`. |\n| `flex_shrink` | Integer | To enable, set to `0`. |\n| `flex_wrap` | Symbol | One of `:nowrap`, `:reverse`, or `:wrap`. |\n| `justify_content` | Symbol | One of `:center`, `:flex_end`, `:flex_start`, `:space_around`, or `:space_between`. |\n\n## Grid\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `clearfix` | Boolean | Whether to assign the `clearfix` class. |\n| `col` | Integer | Number of columns. One of `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `container` | Symbol | Size of the container. One of `:lg`, `:md`, `:sm`, or `:xl`. |\n\n## Layout\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `display` | Symbol | One of `:block`, `:flex`, `:inline`, `:inline_block`, `:inline_flex`, `:none`, `:table`, or `:table_cell`. |\n| `w` | Symbol | One of `:auto`, `:fit`, or `:full`. |\n| `h` | Symbol | One of `:fit` or `:full`. |\n| `hide` | Symbol | Hide the element at a specific breakpoint. One of `:lg`, `:md`, `:sm`, `:whenNarrow`, `:whenRegular`, `:whenWide`, or `:xl`. |\n| `visibility` | Symbol | Visibility. One of `:hidden` or `:visible`. |\n| `vertical_align` | Symbol | One of `:baseline`, `:bottom`, `:middle`, `:text_bottom`, `:text_top`, or `:top`. |\n\n## Position\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `bottom` | Boolean | If `false`, sets `bottom: 0`. |\n| `float` | Symbol | One of `:left`, `:none`, or `:right`. |\n| `left` | Boolean | If `false`, sets `left: 0`. |\n| `position` | Symbol | One of `:absolute`, `:fixed`, `:relative`, `:static`, or `:sticky`. |\n| `right` | Boolean | If `false`, sets `right: 0`. |\n| `top` | Boolean | If `false`, sets `top: 0`. |\n\n## Spacing\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `m` | Integer | Margin. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mb` | Integer | Margin bottom. One of `-12`, `-11`, `-10`, `-9`, `-8`, `-7`, `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, or `:auto`. |\n| `ml` | Integer | Margin left. One of `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mr` | Integer | Margin right. One of `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mt` | Integer | Margin top. One of `-12`, `-11`, `-10`, `-9`, `-8`, `-7`, `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, or `:auto`. |\n| `mx` | Integer | Horizontal margins. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `my` | Integer | Vertical margins. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `p` | Integer | Padding. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:responsive`. |\n| `pb` | Integer | Padding bottom. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pl` | Integer | Padding left. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pr` | Integer | Padding right. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pt` | Integer | Padding left. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `px` | Integer | Horizontal padding. One of `0`, `1`, `2`, `3`, `4`, `5`, or `6`. |\n| `py` | Integer | Vertical padding. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n\n## Typography\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `font_family` | Symbol | Font family. One of `:mono`. |\n| `font_size` | String, Integer, Symbol | One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `00`, `:normal`, or `:small`. |\n| `font_style` | Symbol | Font style. One of `:italic`. |\n| `font_weight` | Symbol | Font weight. One of `:bold`, `:emphasized`, `:light`, or `:normal`. |\n| `text_align` | Symbol | Text alignment. One of `:center`, `:left`, or `:right`. |\n| `text_transform` | Symbol | Text transformation. One of `:uppercase`. |\n| `underline` | Boolean | Whether text should be underlined. |\n| `word_break` | Symbol | Whether to break words on line breaks. One of `:break_all` or `:break_word`. |\n\n## Other\n\n| Name | Type | Description |\n| :- | :- | :- |\n| classes | String | CSS class name value to be concatenated with generated Primer CSS classes. |\n| test_selector | String | Adds `data-test-selector='given value'` in non-Production environments for testing purposes. |"
|
14372
|
+
"args_md": "## HTML attributes\n\nSystem arguments include most HTML attributes. For example:\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `aria` | `Hash` | Aria attributes: `aria: { label: \"foo\" }` renders `aria-label='foo'`. |\n| `data` | `Hash` | Data attributes: `data: { foo: :bar }` renders `data-foo='bar'`. |\n| `height` | `Integer` | Height. |\n| `hidden` | `Boolean` | Whether to assign the `hidden` attribute. |\n| `style` | `String` | Inline styles. |\n| `title` | `String` | The `title` attribute. |\n| `width` | `Integer` | Width. |\n\n## Animation\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `animation` | Symbol | One of `:fade_down`, `:fade_in`, `:fade_out`, `:fade_up`, `:grow_x`, `:hover_grow`, `:pulse`, `:pulse_in`, `:rotate`, `:scale_in`, or `:shrink_x`. |\n\n## Border\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `border_bottom` | Integer | Set to `0` to remove the bottom border. |\n| `border_left` | Integer | Set to `0` to remove the left border. |\n| `border_radius` | Integer | One of `0`, `1`, `2`, or `3`. |\n| `border_right` | Integer | Set to `0` to remove the right border. |\n| `border_top` | Integer | Set to `0` to remove the top border. |\n| `border` | Symbol | One of `:bottom`, `:left`, `:right`, `:top`, `:x`, `:y`, or `true`. |\n| `box_shadow` | Boolean, Symbol | Box shadow. One of `:extra_large`, `:large`, `:medium`, `:none`, or `true`. |\n\n## Color\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `bg` | Symbol | Background color. One of `:accent`, `:accent_emphasis`, `:attention`, `:attention_emphasis`, `:closed`, `:closed_emphasis`, `:danger`, `:danger_emphasis`, `:default`, `:done`, `:done_emphasis`, `:emphasis`, `:inset`, `:open`, `:open_emphasis`, `:overlay`, `:severe`, `:severe_emphasis`, `:sponsors`, `:sponsors_emphasis`, `:subtle`, `:success`, `:success_emphasis`, or `:transparent`. |\n| `border_color` | Symbol | Border color. One of `:accent`, `:accent_emphasis`, `:attention`, `:attention_emphasis`, `:closed`, `:closed_emphasis`, `:danger`, `:danger_emphasis`, `:default`, `:done`, `:done_emphasis`, `:muted`, `:open`, `:open_emphasis`, `:severe`, `:severe_emphasis`, `:sponsors`, `:sponsors_emphasis`, `:subtle`, `:success`, or `:success_emphasis`. |\n| `color` | Symbol | Text color. One of `:accent`, `:attention`, `:closed`, `:danger`, `:default`, `:done`, `:inherit`, `:muted`, `:on_emphasis`, `:open`, `:severe`, `:sponsors`, `:subtle`, or `:success`. |\n\n## Flex\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `align_items` | Symbol | One of `:baseline`, `:center`, `:flex_end`, `:flex_start`, or `:stretch`. |\n| `align_self` | Symbol | One of `:auto`, `:baseline`, `:center`, `:end`, `:start`, or `:stretch`. |\n| `direction` | Symbol | One of `:column`, `:column_reverse`, `:row`, or `:row_reverse`. |\n| `flex` | Integer, Symbol | One of `1` or `:auto`. |\n| `flex_grow` | Integer | To enable, set to `0`. |\n| `flex_shrink` | Integer | To enable, set to `0`. |\n| `flex_wrap` | Symbol | One of `:nowrap`, `:reverse`, or `:wrap`. |\n| `justify_content` | Symbol | One of `:center`, `:flex_end`, `:flex_start`, `:space_around`, or `:space_between`. |\n\n## Grid\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `clearfix` | Boolean | Whether to assign the `clearfix` class. |\n| `col` | Integer | Number of columns. One of `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `container` | Symbol | Size of the container. One of `:lg`, `:md`, `:sm`, or `:xl`. |\n\n## Layout\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `display` | Symbol | One of `:block`, `:flex`, `:inline`, `:inline_block`, `:inline_flex`, `:none`, `:table`, or `:table_cell`. |\n| `w` | Symbol | One of `:auto`, `:fit`, or `:full`. |\n| `h` | Symbol | One of `:fit` or `:full`. |\n| `hide` | Symbol | Hide the element at a specific breakpoint. One of `:lg`, `:md`, `:sm`, `:whenNarrow`, `:whenRegular`, `:whenWide`, or `:xl`. |\n| `visibility` | Symbol | Visibility. One of `:hidden` or `:visible`. |\n| `vertical_align` | Symbol | One of `:baseline`, `:bottom`, `:middle`, `:text_bottom`, `:text_top`, or `:top`. |\n\n## Position\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `bottom` | Boolean | If `false`, sets `bottom: 0`. |\n| `float` | Symbol | One of `:left`, `:none`, or `:right`. |\n| `left` | Boolean | If `false`, sets `left: 0`. |\n| `position` | Symbol | One of `:absolute`, `:fixed`, `:relative`, `:static`, or `:sticky`. |\n| `right` | Boolean | If `false`, sets `right: 0`. |\n| `top` | Boolean | If `false`, sets `top: 0`. |\n\n## Spacing\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `m` | Integer | Margin. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mb` | Integer | Margin bottom. One of `-12`, `-11`, `-10`, `-9`, `-8`, `-7`, `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, or `:auto`. |\n| `ml` | Integer | Margin left. One of `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mr` | Integer | Margin right. One of `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mt` | Integer | Margin top. One of `-12`, `-11`, `-10`, `-9`, `-8`, `-7`, `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, or `:auto`. |\n| `mx` | Integer | Horizontal margins. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `my` | Integer | Vertical margins. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `p` | Integer | Padding. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:responsive`. |\n| `pb` | Integer | Padding bottom. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pl` | Integer | Padding left. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pr` | Integer | Padding right. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pt` | Integer | Padding left. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `px` | Integer | Horizontal padding. One of `0`, `1`, `2`, `3`, `4`, `5`, or `6`. |\n| `py` | Integer | Vertical padding. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n\n## Typography\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `font_family` | Symbol | Font family. One of `:mono`. |\n| `font_size` | String, Integer, Symbol | One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `00`, `:normal`, or `:small`. |\n| `font_style` | Symbol | Font style. One of `:italic`. |\n| `font_weight` | Symbol | Font weight. One of `:bold`, `:emphasized`, `:light`, or `:normal`. |\n| `text_align` | Symbol | Text alignment. One of `:center`, `:left`, or `:right`. |\n| `text_transform` | Symbol | Text transformation. One of `:capitalize` or `:uppercase`. |\n| `underline` | Boolean | Whether text should be underlined. |\n| `word_break` | Symbol | Whether to break words on line breaks. One of `:break_all` or `:break_word`. |\n\n## Other\n\n| Name | Type | Description |\n| :- | :- | :- |\n| classes | String | CSS class name value to be concatenated with generated Primer CSS classes. |\n| test_selector | String | Adds `data-test-selector='given value'` in non-Production environments for testing purposes. |"
|
14024
14373
|
}
|
14025
14374
|
]
|
data/static/previews.json
CHANGED
@@ -182,6 +182,19 @@
|
|
182
182
|
]
|
183
183
|
}
|
184
184
|
},
|
185
|
+
{
|
186
|
+
"preview_path": "primer/alpha/action_list/avatar_item",
|
187
|
+
"name": "avatar_item",
|
188
|
+
"snapshot": "false",
|
189
|
+
"skip_rules": {
|
190
|
+
"wont_fix": [
|
191
|
+
"region"
|
192
|
+
],
|
193
|
+
"will_fix": [
|
194
|
+
"color-contrast"
|
195
|
+
]
|
196
|
+
}
|
197
|
+
},
|
185
198
|
{
|
186
199
|
"preview_path": "primer/alpha/action_list/item_default",
|
187
200
|
"name": "item_default",
|
@@ -1401,8 +1414,8 @@
|
|
1401
1414
|
}
|
1402
1415
|
},
|
1403
1416
|
{
|
1404
|
-
"preview_path": "primer/alpha/banner/
|
1405
|
-
"name": "
|
1417
|
+
"preview_path": "primer/alpha/banner/dismissible",
|
1418
|
+
"name": "dismissible",
|
1406
1419
|
"snapshot": "true",
|
1407
1420
|
"skip_rules": {
|
1408
1421
|
"wont_fix": [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: primer_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub Open Source
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|