primer_view_components 0.25.1 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/app/assets/javascripts/lib/primer/forms/primer_text_field.d.ts +27 -0
  4. data/app/assets/javascripts/primer_view_components.js +1 -1
  5. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  6. data/app/assets/styles/primer_view_components.css +1 -1
  7. data/app/assets/styles/primer_view_components.css.map +1 -1
  8. data/app/components/primer/alpha/action_menu/action_menu_element.js +13 -43
  9. data/app/components/primer/alpha/action_menu/action_menu_element.ts +13 -51
  10. data/app/components/primer/alpha/tab_nav.css +1 -1
  11. data/app/components/primer/alpha/tab_nav.css.json +2 -0
  12. data/app/components/primer/alpha/tab_nav.css.map +1 -1
  13. data/app/components/primer/alpha/tab_nav.pcss +11 -1
  14. data/app/components/primer/alpha/tab_panels.html.erb +5 -9
  15. data/app/components/primer/alpha/tab_panels.rb +4 -13
  16. data/app/components/primer/alpha/text_field.rb +1 -0
  17. data/app/components/primer/alpha/underline_nav.css +1 -1
  18. data/app/components/primer/alpha/underline_nav.css.json +2 -0
  19. data/app/components/primer/alpha/underline_nav.css.map +1 -1
  20. data/app/components/primer/alpha/underline_nav.pcss +7 -1
  21. data/app/components/primer/alpha/underline_panels.css +1 -0
  22. data/app/components/primer/alpha/underline_panels.css.json +6 -0
  23. data/app/components/primer/alpha/underline_panels.css.map +1 -0
  24. data/app/components/primer/alpha/underline_panels.html.erb +6 -8
  25. data/app/components/primer/alpha/underline_panels.pcss +4 -0
  26. data/app/components/primer/alpha/underline_panels.rb +6 -14
  27. data/app/components/primer/beta/breadcrumbs.rb +3 -2
  28. data/app/components/primer/beta/icon_button.rb +5 -0
  29. data/app/components/primer/beta/relative_time.rb +3 -0
  30. data/app/components/primer/beta/spinner.html.erb +3 -0
  31. data/app/components/primer/beta/spinner.rb +15 -1
  32. data/app/components/primer/primer.pcss +1 -0
  33. data/lib/primer/forms/dsl/text_field_input.rb +8 -1
  34. data/lib/primer/forms/primer_text_field.d.ts +27 -0
  35. data/lib/primer/forms/primer_text_field.js +17 -5
  36. data/lib/primer/forms/primer_text_field.ts +24 -5
  37. data/lib/primer/forms/text_field.html.erb +6 -2
  38. data/lib/primer/view_components/version.rb +2 -2
  39. data/previews/primer/alpha/text_field_preview.rb +13 -2
  40. data/previews/primer/beta/breadcrumbs_preview.rb +9 -0
  41. data/previews/primer/beta/icon_button_preview/summary_as_button.html.erb +12 -0
  42. data/previews/primer/beta/icon_button_preview.rb +95 -14
  43. data/previews/primer/beta/relative_time_preview/link_with_tooltip.html.erb +13 -0
  44. data/previews/primer/beta/relative_time_preview.rb +12 -0
  45. data/previews/primer/beta/spinner_preview.rb +2 -2
  46. data/static/arguments.json +12 -12
  47. data/static/constants.json +1 -0
  48. data/static/info_arch.json +78 -13
  49. data/static/previews.json +65 -0
  50. metadata +9 -3
@@ -7628,18 +7628,6 @@
7628
7628
  "default": "N/A",
7629
7629
  "description": "One of `:left` or `:right`. - Defaults to left"
7630
7630
  },
7631
- {
7632
- "name": "body_arguments",
7633
- "type": "Hash",
7634
- "default": "`{}`",
7635
- "description": "{{link_to_system_arguments_docs}} for the body wrapper."
7636
- },
7637
- {
7638
- "name": "wrapper_arguments",
7639
- "type": "Hash",
7640
- "default": "`{}`",
7641
- "description": "{{link_to_system_arguments_docs}} for the `TabContainer` wrapper."
7642
- },
7643
7631
  {
7644
7632
  "name": "system_arguments",
7645
7633
  "type": "Hash",
@@ -8155,6 +8143,12 @@
8155
8143
  "default": "N/A",
8156
8144
  "description": "Renders a leading visual icon before the text field's cursor. The hash will be passed to Primer's {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}} component."
8157
8145
  },
8146
+ {
8147
+ "name": "leading_spinner",
8148
+ "type": "Boolean",
8149
+ "default": "N/A",
8150
+ "description": "If `true`, a leading spinner will be included in the markup. The spinner can be shown via the `showLeadingSpinner()` JavaScript method, and hidden via `hideLeadingSpinner()`. If this argument is `true`, a leading visual must also be provided."
8151
+ },
8158
8152
  {
8159
8153
  "name": "show_clear_button",
8160
8154
  "type": "Boolean",
@@ -10947,6 +10941,19 @@
10947
10941
  "color-contrast"
10948
10942
  ]
10949
10943
  }
10944
+ },
10945
+ {
10946
+ "preview_path": "primer/beta/breadcrumbs/with_link_target",
10947
+ "name": "with_link_target",
10948
+ "snapshot": "false",
10949
+ "skip_rules": {
10950
+ "wont_fix": [
10951
+ "region"
10952
+ ],
10953
+ "will_fix": [
10954
+ "color-contrast"
10955
+ ]
10956
+ }
10950
10957
  }
10951
10958
  ],
10952
10959
  "subcomponents": [
@@ -12640,7 +12647,7 @@
12640
12647
  {
12641
12648
  "fully_qualified_name": "Primer::Beta::IconButton",
12642
12649
  "description": "Use `IconButton` to render Icon-only buttons without the default button styles.\n\n`IconButton` will always render with a tooltip unless the tag is `:summary`.",
12643
- "accessibility_docs": "`IconButton` requires an `aria-label`, which will provide assistive technologies with an accessible label.\nThe `aria-label` should describe the action to be invoked rather than the icon itself. For instance,\nif your `IconButton` renders a magnifying glass icon and invokes a search action, the `aria-label` should be\n`\"Search\"` instead of `\"Magnifying glass\"`.\nEither `aria-label` or `aria-description` will be used for the `Tooltip` text, depending on which one is present.\nEither `aria-label` or `aria-description` will be used for the `Tooltip` text, depending on which one is present.\n[Learn more about best functional image practices (WAI Images)](https://www.w3.org/WAI/tutorials/images/functional)",
12650
+ "accessibility_docs": "`IconButton` requires an `aria-label`, which will provide assistive technologies with an accessible label.\nThe `aria-label` should describe the action to be invoked rather than the icon itself. For instance,\nif your `IconButton` renders a magnifying glass icon and invokes a search action, the `aria-label` should be\n`\"Search\"` instead of `\"Magnifying glass\"`.\nEither `aria-label` or `aria-description` will be used for the `Tooltip` text, depending on which one is present.\nEither `aria-label` or `aria-description` will be used for the `Tooltip` text, depending on which one is present.\n[Learn more about best functional image practices (WAI Images)](https://www.w3.org/WAI/tutorials/images/functional)\n\nAdditional markup is required if setting the `tag` argument to either `:a` or `:summary`.\n\n* `:a` requires you to pass in an `href` attribute\n* `:summary` requires you to wrap the component in a `<details>` element",
12644
12651
  "is_form_component": false,
12645
12652
  "is_published": true,
12646
12653
  "requires_js": false,
@@ -12789,6 +12796,32 @@
12789
12796
  "color-contrast"
12790
12797
  ]
12791
12798
  }
12799
+ },
12800
+ {
12801
+ "preview_path": "primer/beta/icon_button/link_as_button",
12802
+ "name": "link_as_button",
12803
+ "snapshot": "true",
12804
+ "skip_rules": {
12805
+ "wont_fix": [
12806
+ "region"
12807
+ ],
12808
+ "will_fix": [
12809
+ "color-contrast"
12810
+ ]
12811
+ }
12812
+ },
12813
+ {
12814
+ "preview_path": "primer/beta/icon_button/summary_as_button",
12815
+ "name": "summary_as_button",
12816
+ "snapshot": "true",
12817
+ "skip_rules": {
12818
+ "wont_fix": [
12819
+ "region"
12820
+ ],
12821
+ "will_fix": [
12822
+ "color-contrast"
12823
+ ]
12824
+ }
12792
12825
  }
12793
12826
  ],
12794
12827
  "subcomponents": [
@@ -14496,6 +14529,12 @@
14496
14529
  "default": "`nil`",
14497
14530
  "description": "Provide a custom title to the element."
14498
14531
  },
14532
+ {
14533
+ "name": "no_title",
14534
+ "type": "Boolean",
14535
+ "default": "`false`",
14536
+ "description": "Removes the `title` attribute provided on the element by default."
14537
+ },
14499
14538
  {
14500
14539
  "name": "system_arguments",
14501
14540
  "type": "Hash",
@@ -14574,6 +14613,32 @@
14574
14613
  "color-contrast"
14575
14614
  ]
14576
14615
  }
14616
+ },
14617
+ {
14618
+ "preview_path": "primer/beta/relative_time/no_title_attribute",
14619
+ "name": "no_title_attribute",
14620
+ "snapshot": "true",
14621
+ "skip_rules": {
14622
+ "wont_fix": [
14623
+ "region"
14624
+ ],
14625
+ "will_fix": [
14626
+ "color-contrast"
14627
+ ]
14628
+ }
14629
+ },
14630
+ {
14631
+ "preview_path": "primer/beta/relative_time/link_with_tooltip",
14632
+ "name": "link_with_tooltip",
14633
+ "snapshot": "true",
14634
+ "skip_rules": {
14635
+ "wont_fix": [
14636
+ "region"
14637
+ ],
14638
+ "will_fix": [
14639
+ "color-contrast"
14640
+ ]
14641
+ }
14577
14642
  }
14578
14643
  ],
14579
14644
  "subcomponents": [
data/static/previews.json CHANGED
@@ -2037,6 +2037,19 @@
2037
2037
  "color-contrast"
2038
2038
  ]
2039
2039
  }
2040
+ },
2041
+ {
2042
+ "preview_path": "primer/beta/breadcrumbs/with_link_target",
2043
+ "name": "with_link_target",
2044
+ "snapshot": "false",
2045
+ "skip_rules": {
2046
+ "wont_fix": [
2047
+ "region"
2048
+ ],
2049
+ "will_fix": [
2050
+ "color-contrast"
2051
+ ]
2052
+ }
2040
2053
  }
2041
2054
  ]
2042
2055
  },
@@ -3923,6 +3936,32 @@
3923
3936
  "color-contrast"
3924
3937
  ]
3925
3938
  }
3939
+ },
3940
+ {
3941
+ "preview_path": "primer/beta/icon_button/link_as_button",
3942
+ "name": "link_as_button",
3943
+ "snapshot": "true",
3944
+ "skip_rules": {
3945
+ "wont_fix": [
3946
+ "region"
3947
+ ],
3948
+ "will_fix": [
3949
+ "color-contrast"
3950
+ ]
3951
+ }
3952
+ },
3953
+ {
3954
+ "preview_path": "primer/beta/icon_button/summary_as_button",
3955
+ "name": "summary_as_button",
3956
+ "snapshot": "true",
3957
+ "skip_rules": {
3958
+ "wont_fix": [
3959
+ "region"
3960
+ ],
3961
+ "will_fix": [
3962
+ "color-contrast"
3963
+ ]
3964
+ }
3926
3965
  }
3927
3966
  ]
3928
3967
  },
@@ -5460,6 +5499,32 @@
5460
5499
  "color-contrast"
5461
5500
  ]
5462
5501
  }
5502
+ },
5503
+ {
5504
+ "preview_path": "primer/beta/relative_time/no_title_attribute",
5505
+ "name": "no_title_attribute",
5506
+ "snapshot": "true",
5507
+ "skip_rules": {
5508
+ "wont_fix": [
5509
+ "region"
5510
+ ],
5511
+ "will_fix": [
5512
+ "color-contrast"
5513
+ ]
5514
+ }
5515
+ },
5516
+ {
5517
+ "preview_path": "primer/beta/relative_time/link_with_tooltip",
5518
+ "name": "link_with_tooltip",
5519
+ "snapshot": "true",
5520
+ "skip_rules": {
5521
+ "wont_fix": [
5522
+ "region"
5523
+ ],
5524
+ "will_fix": [
5525
+ "color-contrast"
5526
+ ]
5527
+ }
5463
5528
  }
5464
5529
  ]
5465
5530
  },
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.25.1
4
+ version: 0.26.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: 2024-05-31 00:00:00.000000000 Z
11
+ date: 2024-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -290,7 +290,11 @@ files:
290
290
  - app/components/primer/alpha/underline_nav.html.erb
291
291
  - app/components/primer/alpha/underline_nav.pcss
292
292
  - app/components/primer/alpha/underline_nav.rb
293
+ - app/components/primer/alpha/underline_panels.css
294
+ - app/components/primer/alpha/underline_panels.css.json
295
+ - app/components/primer/alpha/underline_panels.css.map
293
296
  - app/components/primer/alpha/underline_panels.html.erb
297
+ - app/components/primer/alpha/underline_panels.pcss
294
298
  - app/components/primer/alpha/underline_panels.rb
295
299
  - app/components/primer/alpha/x_banner.d.ts
296
300
  - app/components/primer/alpha/x_banner.js
@@ -839,6 +843,7 @@ files:
839
843
  - previews/primer/beta/flash_preview.rb
840
844
  - previews/primer/beta/heading_preview.rb
841
845
  - previews/primer/beta/icon_button_preview.rb
846
+ - previews/primer/beta/icon_button_preview/summary_as_button.html.erb
842
847
  - previews/primer/beta/label_preview.rb
843
848
  - previews/primer/beta/link_preview.rb
844
849
  - previews/primer/beta/markdown_preview.rb
@@ -848,6 +853,7 @@ files:
848
853
  - previews/primer/beta/popover_preview.rb
849
854
  - previews/primer/beta/progress_bar_preview.rb
850
855
  - previews/primer/beta/relative_time_preview.rb
856
+ - previews/primer/beta/relative_time_preview/link_with_tooltip.html.erb
851
857
  - previews/primer/beta/spinner_preview.rb
852
858
  - previews/primer/beta/state_preview.rb
853
859
  - previews/primer/beta/subhead_preview.rb
@@ -907,7 +913,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
907
913
  - !ruby/object:Gem::Version
908
914
  version: '0'
909
915
  requirements: []
910
- rubygems_version: 3.4.19
916
+ rubygems_version: 3.5.11
911
917
  signing_key:
912
918
  specification_version: 4
913
919
  summary: ViewComponents for the Primer Design System