@primer/view-components 0.14.0-rc.2a361c96 → 0.14.0-rc.938f99f3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/view-components",
3
- "version": "0.14.0-rc.2a361c96",
3
+ "version": "0.14.0-rc.938f99f3",
4
4
  "description": "ViewComponents for the Primer Design System",
5
5
  "main": "app/assets/javascripts/primer_view_components.js",
6
6
  "module": "app/components/primer/primer.js",
@@ -3108,7 +3108,7 @@
3108
3108
  "name": "tag",
3109
3109
  "type": "Symbol",
3110
3110
  "default": "`:button`",
3111
- "description": "One of `:a`, `:button`, or `:summary`."
3111
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
3112
3112
  },
3113
3113
  {
3114
3114
  "name": "type",
@@ -3249,6 +3249,12 @@
3249
3249
  "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/button.rb",
3250
3250
  "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/button/default/",
3251
3251
  "parameters": [
3252
+ {
3253
+ "name": "base_button_class",
3254
+ "type": "Class",
3255
+ "default": "`Primer::Beta::BaseButton`",
3256
+ "description": "The button class to render."
3257
+ },
3252
3258
  {
3253
3259
  "name": "scheme",
3254
3260
  "type": "Symbol",
@@ -3277,7 +3283,7 @@
3277
3283
  "name": "tag",
3278
3284
  "type": "Symbol",
3279
3285
  "default": "`:button`",
3280
- "description": "One of `:a`, `:button`, or `:summary`."
3286
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
3281
3287
  },
3282
3288
  {
3283
3289
  "name": "type",
@@ -3361,6 +3367,68 @@
3361
3367
  }
3362
3368
  ]
3363
3369
  },
3370
+ {
3371
+ "component": "ClipboardCopyBaseButton",
3372
+ "status": "beta",
3373
+ "a11y_reviewed": false,
3374
+ "short_name": "ClipboardCopyBaseButton",
3375
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/clipboard_copy_base_button.rb",
3376
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/clipboard_copy_base_button/default/",
3377
+ "parameters": [
3378
+ {
3379
+ "name": "tag",
3380
+ "type": "Symbol",
3381
+ "default": "`:button`",
3382
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
3383
+ },
3384
+ {
3385
+ "name": "type",
3386
+ "type": "Symbol",
3387
+ "default": "`:button`",
3388
+ "description": "One of `:button`, `:reset`, or `:submit`."
3389
+ },
3390
+ {
3391
+ "name": "block",
3392
+ "type": "Boolean",
3393
+ "default": "`false`",
3394
+ "description": "Whether button is full-width with `display: block`."
3395
+ },
3396
+ {
3397
+ "name": "disabled",
3398
+ "type": "Boolean",
3399
+ "default": "`false`",
3400
+ "description": "Whether or not the button is disabled. If true, this option forces `tag:` to `:button`."
3401
+ },
3402
+ {
3403
+ "name": "inactive",
3404
+ "type": "Boolean",
3405
+ "default": "`false`",
3406
+ "description": "Whether the button looks visually disabled, but can still accept all the same interactions as an enabled button."
3407
+ },
3408
+ {
3409
+ "name": "system_arguments",
3410
+ "type": "Hash",
3411
+ "default": "N/A",
3412
+ "description": "[System arguments](/system-arguments)"
3413
+ }
3414
+ ]
3415
+ },
3416
+ {
3417
+ "component": "ClipboardCopyButton",
3418
+ "status": "beta",
3419
+ "a11y_reviewed": false,
3420
+ "short_name": "ClipboardCopyButton",
3421
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/clipboard_copy_button.rb",
3422
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/clipboard_copy_button/default/",
3423
+ "parameters": [
3424
+ {
3425
+ "name": "system_arguments",
3426
+ "type": "Hash",
3427
+ "default": "N/A",
3428
+ "description": "The arguments accepted by [Button](/components/beta/button) and [ClipboardCopy](/components/beta/clipboardcopy)."
3429
+ }
3430
+ ]
3431
+ },
3364
3432
  {
3365
3433
  "component": "CloseButton",
3366
3434
  "status": "beta",
@@ -3561,7 +3629,7 @@
3561
3629
  "name": "tag",
3562
3630
  "type": "Symbol",
3563
3631
  "default": "N/A",
3564
- "description": "One of `:a`, `:button`, or `:summary`."
3632
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
3565
3633
  },
3566
3634
  {
3567
3635
  "name": "wrapper_arguments",
@@ -4399,7 +4467,7 @@
4399
4467
  "name": "tag",
4400
4468
  "type": "Symbol",
4401
4469
  "default": "`:button`",
4402
- "description": "One of `:a`, `:button`, or `:summary`."
4470
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
4403
4471
  },
4404
4472
  {
4405
4473
  "name": "type",
@@ -4490,7 +4558,7 @@
4490
4558
  "name": "tag",
4491
4559
  "type": "Symbol",
4492
4560
  "default": "N/A",
4493
- "description": "One of `:a`, `:button`, or `:summary`."
4561
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
4494
4562
  },
4495
4563
  {
4496
4564
  "name": "type",
@@ -73,6 +73,8 @@
73
73
  "Primer::Beta::Button": "",
74
74
  "Primer::Beta::ButtonGroup": "",
75
75
  "Primer::Beta::ClipboardCopy": "",
76
+ "Primer::Beta::ClipboardCopyBaseButton": "",
77
+ "Primer::Beta::ClipboardCopyButton": "",
76
78
  "Primer::Beta::CloseButton": "",
77
79
  "Primer::Beta::Counter": "",
78
80
  "Primer::Beta::Details": "",
@@ -736,7 +736,8 @@
736
736
  "TAG_OPTIONS": [
737
737
  "button",
738
738
  "a",
739
- "summary"
739
+ "summary",
740
+ "clipboard-copy"
740
741
  ],
741
742
  "TYPE_OPTIONS": [
742
743
  "button",
@@ -836,6 +837,10 @@
836
837
  },
837
838
  "Primer::Beta::ClipboardCopy": {
838
839
  },
840
+ "Primer::Beta::ClipboardCopyBaseButton": {
841
+ },
842
+ "Primer::Beta::ClipboardCopyButton": {
843
+ },
839
844
  "Primer::Beta::CloseButton": {
840
845
  "DEFAULT_TYPE": "button",
841
846
  "TYPE_OPTIONS": [
@@ -9625,7 +9625,7 @@
9625
9625
  "name": "tag",
9626
9626
  "type": "Symbol",
9627
9627
  "default": "`:button`",
9628
- "description": "One of `:a`, `:button`, or `:summary`."
9628
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
9629
9629
  },
9630
9630
  {
9631
9631
  "name": "type",
@@ -10400,6 +10400,12 @@
10400
10400
  "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/button.rb",
10401
10401
  "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/button/default/",
10402
10402
  "parameters": [
10403
+ {
10404
+ "name": "base_button_class",
10405
+ "type": "Class",
10406
+ "default": "`Primer::Beta::BaseButton`",
10407
+ "description": "The button class to render."
10408
+ },
10403
10409
  {
10404
10410
  "name": "scheme",
10405
10411
  "type": "Symbol",
@@ -10428,7 +10434,7 @@
10428
10434
  "name": "tag",
10429
10435
  "type": "Symbol",
10430
10436
  "default": "`:button`",
10431
- "description": "One of `:a`, `:button`, or `:summary`."
10437
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
10432
10438
  },
10433
10439
  {
10434
10440
  "name": "type",
@@ -10771,19 +10777,43 @@
10771
10777
  "slots": [
10772
10778
  {
10773
10779
  "name": "buttons",
10774
- "description": "Required list of buttons to be rendered.",
10780
+ "description": "List of buttons to be rendered. Add buttons via the `#with_button` and `#with_clipboard_copy_button` methods (see below).",
10781
+ "parameters": [
10782
+
10783
+ ]
10784
+ }
10785
+ ],
10786
+ "methods": [
10787
+ {
10788
+ "name": "with_button",
10789
+ "description": "Adds a button.",
10775
10790
  "parameters": [
10776
10791
  {
10777
- "name": "kwargs",
10792
+ "name": "icon",
10793
+ "type": "Symbol",
10794
+ "default": "`nil`",
10795
+ "description": "If included, adds a {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}} with the given {{link_to_octicons}}. Otherwise, a {{#link_to_component}}Primer::Beta::Button{{/link_to_component}} is added instead."
10796
+ },
10797
+ {
10798
+ "name": "system_arguments",
10778
10799
  "type": "Hash",
10779
10800
  "default": "N/A",
10780
- "description": "The same arguments as {{#link_to_component}}Primer::Beta::Button{{/link_to_component}}"
10801
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Beta::Button{{/link_to_component}} or {{#link_to_component}}Primer::Beta::IconButton{{/link_to_component}}, depending on the value of the `icon:` argument."
10802
+ }
10803
+ ]
10804
+ },
10805
+ {
10806
+ "name": "with_clipboard_copy_button",
10807
+ "description": "Adds a {{#link_to_component}}Primer::Beta::ClipboardCopyButton{{/link_to_component}}.",
10808
+ "parameters": [
10809
+ {
10810
+ "name": "system_arguments",
10811
+ "type": "Hash",
10812
+ "default": "N/A",
10813
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Beta::ClipboardCopyButton{{/link_to_component}}."
10781
10814
  }
10782
10815
  ]
10783
10816
  }
10784
- ],
10785
- "methods": [
10786
-
10787
10817
  ],
10788
10818
  "previews": [
10789
10819
  {
@@ -10850,6 +10880,19 @@
10850
10880
  "color-contrast"
10851
10881
  ]
10852
10882
  }
10883
+ },
10884
+ {
10885
+ "preview_path": "primer/beta/button_group/with_clipboard_copy_button",
10886
+ "name": "with_clipboard_copy_button",
10887
+ "snapshot": "true",
10888
+ "skip_rules": {
10889
+ "wont_fix": [
10890
+ "region"
10891
+ ],
10892
+ "will_fix": [
10893
+ "color-contrast"
10894
+ ]
10895
+ }
10853
10896
  }
10854
10897
  ],
10855
10898
  "subcomponents": [
@@ -10858,7 +10901,7 @@
10858
10901
  },
10859
10902
  {
10860
10903
  "fully_qualified_name": "Primer::Beta::ClipboardCopy",
10861
- "description": "Use `ClipboardCopy` to copy element text content or input values to the clipboard.",
10904
+ "description": "Use `ClipboardCopy` to copy element text content or input values to the clipboard.\n\nThis component by itself is not styled as a button, and can therefore only be used in limited circumstances.\nIf you're looking for a button, consider using {{#link_to_component}}Primer::Beta::ClipboardCopyButton{{/link_to_component}}\ninstead.",
10862
10905
  "accessibility_docs": "Always set an accessible label to help the user interact with the component.",
10863
10906
  "is_form_component": false,
10864
10907
  "is_published": true,
@@ -10959,6 +11002,195 @@
10959
11002
 
10960
11003
  ]
10961
11004
  },
11005
+ {
11006
+ "fully_qualified_name": "Primer::Beta::ClipboardCopyBaseButton",
11007
+ "description": "Internal\n\n:nodoc:",
11008
+ "accessibility_docs": null,
11009
+ "is_form_component": false,
11010
+ "is_published": true,
11011
+ "requires_js": false,
11012
+ "component": "ClipboardCopyBaseButton",
11013
+ "status": "beta",
11014
+ "a11y_reviewed": false,
11015
+ "short_name": "ClipboardCopyBaseButton",
11016
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/clipboard_copy_base_button.rb",
11017
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/clipboard_copy_base_button/default/",
11018
+ "parameters": [
11019
+ {
11020
+ "name": "tag",
11021
+ "type": "Symbol",
11022
+ "default": "`:button`",
11023
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
11024
+ },
11025
+ {
11026
+ "name": "type",
11027
+ "type": "Symbol",
11028
+ "default": "`:button`",
11029
+ "description": "One of `:button`, `:reset`, or `:submit`."
11030
+ },
11031
+ {
11032
+ "name": "block",
11033
+ "type": "Boolean",
11034
+ "default": "`false`",
11035
+ "description": "Whether button is full-width with `display: block`."
11036
+ },
11037
+ {
11038
+ "name": "disabled",
11039
+ "type": "Boolean",
11040
+ "default": "`false`",
11041
+ "description": "Whether or not the button is disabled. If true, this option forces `tag:` to `:button`."
11042
+ },
11043
+ {
11044
+ "name": "inactive",
11045
+ "type": "Boolean",
11046
+ "default": "`false`",
11047
+ "description": "Whether the button looks visually disabled, but can still accept all the same interactions as an enabled button."
11048
+ },
11049
+ {
11050
+ "name": "system_arguments",
11051
+ "type": "Hash",
11052
+ "default": "N/A",
11053
+ "description": "{{link_to_system_arguments_docs}}"
11054
+ }
11055
+ ],
11056
+ "slots": [
11057
+
11058
+ ],
11059
+ "methods": [
11060
+
11061
+ ],
11062
+ "previews": [
11063
+
11064
+ ],
11065
+ "subcomponents": [
11066
+
11067
+ ]
11068
+ },
11069
+ {
11070
+ "fully_qualified_name": "Primer::Beta::ClipboardCopyButton",
11071
+ "description": "`ClipboardCopyButton` uses the `ClipboardCopy` component to copy text to the clipboard,\nstyled as a Primer button. It can be used wherever a button is desired, and works well\nwith components like `ButtonGroup`.",
11072
+ "accessibility_docs": null,
11073
+ "is_form_component": false,
11074
+ "is_published": true,
11075
+ "requires_js": false,
11076
+ "component": "ClipboardCopyButton",
11077
+ "status": "beta",
11078
+ "a11y_reviewed": false,
11079
+ "short_name": "ClipboardCopyButton",
11080
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/clipboard_copy_button.rb",
11081
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/clipboard_copy_button/default/",
11082
+ "parameters": [
11083
+ {
11084
+ "name": "system_arguments",
11085
+ "type": "Hash",
11086
+ "default": "N/A",
11087
+ "description": "The arguments accepted by {{#link_to_component}}Primer::Beta::Button{{/link_to_component}} and {{#link_to_component}}Primer::Beta::ClipboardCopy{{/link_to_component}}."
11088
+ }
11089
+ ],
11090
+ "slots": [
11091
+ {
11092
+ "name": "leading_visual",
11093
+ "description": "Leading visuals appear to the left of the button text.\n\nUse:\n\n- `leading_visual_icon` for a {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}.\n\n- `leading_visual_svg` to render a SVG.",
11094
+ "parameters": [
11095
+ {
11096
+ "name": "system_arguments",
11097
+ "type": "Hash",
11098
+ "default": "N/A",
11099
+ "description": "Same arguments as {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}."
11100
+ }
11101
+ ]
11102
+ },
11103
+ {
11104
+ "name": "trailing_visual",
11105
+ "description": "Trailing visuals appear to the right of the button text.\n\nUse:\n\n- `trailing_visual_counter` for a {{#link_to_component}}Primer::Beta::Counter{{/link_to_component}}.",
11106
+ "parameters": [
11107
+ {
11108
+ "name": "system_arguments",
11109
+ "type": "Hash",
11110
+ "default": "N/A",
11111
+ "description": "Same arguments as {{#link_to_component}}Primer::Beta::Counter{{/link_to_component}}."
11112
+ }
11113
+ ]
11114
+ },
11115
+ {
11116
+ "name": "trailing_action",
11117
+ "description": "Trailing action appears to the right of the trailing visual.\n\nUse:\n\n- `trailing_action_icon` for a {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}.",
11118
+ "parameters": [
11119
+ {
11120
+ "name": "system_arguments",
11121
+ "type": "Hash",
11122
+ "default": "N/A",
11123
+ "description": "Same arguments as {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}."
11124
+ }
11125
+ ]
11126
+ },
11127
+ {
11128
+ "name": "tooltip",
11129
+ "description": "`Tooltip` that appears on mouse hover or keyboard focus over the button. Use tooltips sparingly and as a last resort.\n**Important:** This tooltip defaults to `type: :description`. In a few scenarios, `type: :label` may be more appropriate.\nConsult the {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}} documentation for more information.",
11130
+ "parameters": [
11131
+ {
11132
+ "name": "type",
11133
+ "type": "Symbol",
11134
+ "default": "`:description`",
11135
+ "description": "One of `:description` or `:label`."
11136
+ },
11137
+ {
11138
+ "name": "system_arguments",
11139
+ "type": "Hash",
11140
+ "default": "N/A",
11141
+ "description": "Same arguments as {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}."
11142
+ }
11143
+ ]
11144
+ }
11145
+ ],
11146
+ "methods": [
11147
+
11148
+ ],
11149
+ "previews": [
11150
+ {
11151
+ "preview_path": "primer/beta/clipboard_copy_button/playground",
11152
+ "name": "playground",
11153
+ "snapshot": "false",
11154
+ "skip_rules": {
11155
+ "wont_fix": [
11156
+ "region"
11157
+ ],
11158
+ "will_fix": [
11159
+ "color-contrast"
11160
+ ]
11161
+ }
11162
+ },
11163
+ {
11164
+ "preview_path": "primer/beta/clipboard_copy_button/default",
11165
+ "name": "default",
11166
+ "snapshot": "true",
11167
+ "skip_rules": {
11168
+ "wont_fix": [
11169
+ "region"
11170
+ ],
11171
+ "will_fix": [
11172
+ "color-contrast"
11173
+ ]
11174
+ }
11175
+ },
11176
+ {
11177
+ "preview_path": "primer/beta/clipboard_copy_button/with_tooltip",
11178
+ "name": "with_tooltip",
11179
+ "snapshot": "true",
11180
+ "skip_rules": {
11181
+ "wont_fix": [
11182
+ "region"
11183
+ ],
11184
+ "will_fix": [
11185
+ "color-contrast"
11186
+ ]
11187
+ }
11188
+ }
11189
+ ],
11190
+ "subcomponents": [
11191
+
11192
+ ]
11193
+ },
10962
11194
  {
10963
11195
  "fully_qualified_name": "Primer::Beta::CloseButton",
10964
11196
  "description": "Use `CloseButton` to render an `×` without default button styles.\n\n[0]: https://primer.style/view-components/system-arguments#html-attributes",
@@ -11675,7 +11907,7 @@
11675
11907
  "name": "tag",
11676
11908
  "type": "Symbol",
11677
11909
  "default": "N/A",
11678
- "description": "One of `:a`, `:button`, or `:summary`."
11910
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
11679
11911
  },
11680
11912
  {
11681
11913
  "name": "wrapper_arguments",
@@ -14541,7 +14773,7 @@
14541
14773
  "name": "tag",
14542
14774
  "type": "Symbol",
14543
14775
  "default": "`:button`",
14544
- "description": "One of `:a`, `:button`, or `:summary`."
14776
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
14545
14777
  },
14546
14778
  {
14547
14779
  "name": "type",
@@ -14740,7 +14972,7 @@
14740
14972
  "name": "tag",
14741
14973
  "type": "Symbol",
14742
14974
  "default": "N/A",
14743
- "description": "One of `:a`, `:button`, or `:summary`."
14975
+ "description": "One of `:a`, `:button`, `:clipboard-copy`, or `:summary`."
14744
14976
  },
14745
14977
  {
14746
14978
  "name": "type",
@@ -2196,6 +2196,19 @@
2196
2196
  "color-contrast"
2197
2197
  ]
2198
2198
  }
2199
+ },
2200
+ {
2201
+ "preview_path": "primer/beta/button_group/with_clipboard_copy_button",
2202
+ "name": "with_clipboard_copy_button",
2203
+ "snapshot": "true",
2204
+ "skip_rules": {
2205
+ "wont_fix": [
2206
+ "region"
2207
+ ],
2208
+ "will_fix": [
2209
+ "color-contrast"
2210
+ ]
2211
+ }
2199
2212
  }
2200
2213
  ]
2201
2214
  },
@@ -2556,6 +2569,53 @@
2556
2569
  }
2557
2570
  ]
2558
2571
  },
2572
+ {
2573
+ "name": "clipboard_copy_button",
2574
+ "component": "ClipboardCopyButton",
2575
+ "status": "beta",
2576
+ "lookup_path": "primer/beta/clipboard_copy_button",
2577
+ "examples": [
2578
+ {
2579
+ "preview_path": "primer/beta/clipboard_copy_button/playground",
2580
+ "name": "playground",
2581
+ "snapshot": "false",
2582
+ "skip_rules": {
2583
+ "wont_fix": [
2584
+ "region"
2585
+ ],
2586
+ "will_fix": [
2587
+ "color-contrast"
2588
+ ]
2589
+ }
2590
+ },
2591
+ {
2592
+ "preview_path": "primer/beta/clipboard_copy_button/default",
2593
+ "name": "default",
2594
+ "snapshot": "true",
2595
+ "skip_rules": {
2596
+ "wont_fix": [
2597
+ "region"
2598
+ ],
2599
+ "will_fix": [
2600
+ "color-contrast"
2601
+ ]
2602
+ }
2603
+ },
2604
+ {
2605
+ "preview_path": "primer/beta/clipboard_copy_button/with_tooltip",
2606
+ "name": "with_tooltip",
2607
+ "snapshot": "true",
2608
+ "skip_rules": {
2609
+ "wont_fix": [
2610
+ "region"
2611
+ ],
2612
+ "will_fix": [
2613
+ "color-contrast"
2614
+ ]
2615
+ }
2616
+ }
2617
+ ]
2618
+ },
2559
2619
  {
2560
2620
  "name": "close_button",
2561
2621
  "component": "CloseButton",
@@ -73,6 +73,8 @@
73
73
  "Primer::Beta::Button": "beta",
74
74
  "Primer::Beta::ButtonGroup": "beta",
75
75
  "Primer::Beta::ClipboardCopy": "beta",
76
+ "Primer::Beta::ClipboardCopyBaseButton": "beta",
77
+ "Primer::Beta::ClipboardCopyButton": "beta",
76
78
  "Primer::Beta::CloseButton": "beta",
77
79
  "Primer::Beta::Counter": "beta",
78
80
  "Primer::Beta::Details": "beta",