primer_view_components 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -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/action_list/divider.rb +2 -2
  8. data/app/components/primer/alpha/action_list/heading.html.erb +1 -1
  9. data/app/components/primer/alpha/action_list/heading.rb +11 -5
  10. data/app/components/primer/alpha/action_list/item.rb +19 -15
  11. data/app/components/primer/alpha/action_list.html.erb +7 -8
  12. data/app/components/primer/alpha/action_list.rb +16 -11
  13. data/app/components/primer/alpha/nav_list/{section.rb → group.rb} +5 -5
  14. data/app/components/primer/alpha/nav_list/item.html.erb +1 -1
  15. data/app/components/primer/alpha/nav_list/item.rb +15 -1
  16. data/app/components/primer/alpha/nav_list.d.ts +1 -0
  17. data/app/components/primer/alpha/nav_list.html.erb +8 -8
  18. data/app/components/primer/alpha/nav_list.js +21 -0
  19. data/app/components/primer/alpha/nav_list.rb +30 -34
  20. data/app/components/primer/alpha/nav_list.ts +23 -0
  21. data/app/components/primer/alpha/navigation/tab.rb +168 -0
  22. data/app/components/primer/alpha/overlay/header.html.erb +2 -2
  23. data/app/components/primer/alpha/overlay.rb +29 -9
  24. data/app/components/primer/alpha/tab_nav.rb +10 -3
  25. data/app/components/primer/alpha/tab_panels.rb +2 -2
  26. data/app/components/primer/alpha/underline_nav.css +1 -1
  27. data/app/components/primer/alpha/underline_nav.css.map +1 -1
  28. data/app/components/primer/alpha/underline_nav.pcss +1 -0
  29. data/app/components/primer/alpha/underline_nav.rb +2 -2
  30. data/app/components/primer/alpha/underline_panels.rb +2 -2
  31. data/app/components/primer/beta/button.html.erb +1 -1
  32. data/app/components/primer/beta/button.rb +2 -1
  33. data/app/components/primer/component.rb +34 -0
  34. data/app/components/primer/navigation/tab_component.rb +3 -157
  35. data/app/components/primer/truncate.rb +1 -1
  36. data/lib/primer/deprecations.yml +9 -0
  37. data/lib/primer/forms/dsl/text_field_input.rb +1 -1
  38. data/lib/primer/forms/primer_text_field.js +17 -6
  39. data/lib/primer/forms/primer_text_field.ts +15 -7
  40. data/lib/primer/forms/text_field.html.erb +3 -3
  41. data/lib/primer/view_components/version.rb +1 -1
  42. data/lib/primer/yard/component_manifest.rb +2 -1
  43. data/lib/tasks/docs.rake +1 -1
  44. data/previews/primer/alpha/action_list_preview.rb +41 -29
  45. data/previews/primer/alpha/nav_list_preview/trailing_action.html.erb +19 -0
  46. data/previews/primer/alpha/nav_list_preview.rb +19 -30
  47. data/previews/primer/alpha/overlay_preview.rb +34 -4
  48. data/previews/primer/alpha/tab_nav_preview/with_extra.html.erb +8 -0
  49. data/previews/primer/alpha/tab_nav_preview.rb +5 -0
  50. data/previews/primer/alpha/tab_panels_preview/with_extra.html.erb +17 -0
  51. data/previews/primer/alpha/tab_panels_preview.rb +5 -0
  52. data/static/arguments.json +64 -8
  53. data/static/audited_at.json +2 -1
  54. data/static/constants.json +20 -8
  55. data/static/previews.json +20 -5
  56. data/static/statuses.json +4 -3
  57. metadata +10 -8
  58. data/app/components/primer/alpha/nav_list/section.html.erb +0 -3
  59. data/previews/primer/alpha/action_list_preview/heading.html.erb +0 -4
  60. /data/app/components/primer/{navigation/tab_component.html.erb → alpha/navigation/tab.html.erb} +0 -0
@@ -28,8 +28,9 @@
28
28
  "Primer::Alpha::Menu": "",
29
29
  "Primer::Alpha::MultiInput": "",
30
30
  "Primer::Alpha::NavList": "",
31
+ "Primer::Alpha::NavList::Group": "",
31
32
  "Primer::Alpha::NavList::Item": "",
32
- "Primer::Alpha::NavList::Section": "",
33
+ "Primer::Alpha::Navigation::Tab": "",
33
34
  "Primer::Alpha::OcticonSymbols": "",
34
35
  "Primer::Alpha::Overlay": "",
35
36
  "Primer::Alpha::Overlay::Body": "",
@@ -27,6 +27,16 @@
27
27
  },
28
28
  "Primer::Alpha::ActionList::Heading": {
29
29
  "DEFAULT_SCHEME": "subtle",
30
+ "HEADING_LEVELS": [
31
+ 1,
32
+ 2,
33
+ 3,
34
+ 4,
35
+ 5,
36
+ 6
37
+ ],
38
+ "HEADING_MAX": 6,
39
+ "HEADING_MIN": 1,
30
40
  "SCHEME_MAPPINGS": {
31
41
  "subtle": null,
32
42
  "filled": "ActionList-sectionDivider--filled"
@@ -326,12 +336,19 @@
326
336
  "Primer::Alpha::MultiInput": {
327
337
  },
328
338
  "Primer::Alpha::NavList": {
329
- "Item": "Primer::Alpha::NavList::Item",
330
- "Section": "Primer::Alpha::NavList::Section"
339
+ "Group": "Primer::Alpha::NavList::Group",
340
+ "Item": "Primer::Alpha::NavList::Item"
341
+ },
342
+ "Primer::Alpha::NavList::Group": {
331
343
  },
332
344
  "Primer::Alpha::NavList::Item": {
333
345
  },
334
- "Primer::Alpha::NavList::Section": {
346
+ "Primer::Alpha::Navigation::Tab": {
347
+ "ARIA_CURRENT_OPTIONS_FOR_ANCHOR": [
348
+ true,
349
+ "page"
350
+ ],
351
+ "DEFAULT_ARIA_CURRENT_FOR_ANCHOR": "page"
335
352
  },
336
353
  "Primer::Alpha::OcticonSymbols": {
337
354
  },
@@ -1189,11 +1206,6 @@
1189
1206
  "MAX_COL": 12
1190
1207
  },
1191
1208
  "Primer::Navigation::TabComponent": {
1192
- "ARIA_CURRENT_OPTIONS_FOR_ANCHOR": [
1193
- true,
1194
- "page"
1195
- ],
1196
- "DEFAULT_ARIA_CURRENT_FOR_ANCHOR": "page"
1197
1209
  },
1198
1210
  "Primer::Tooltip": {
1199
1211
  "ALIGN_DEFAULT": "default",
data/static/previews.json CHANGED
@@ -18,6 +18,11 @@
18
18
  "preview_path": "/lookbook/preview/primer/alpha/action_list/leading_visuals",
19
19
  "name": "leading_visuals"
20
20
  },
21
+ {
22
+ "inspect_path": "/lookbook/inspect/primer/alpha/action_list/with_manual_dividers",
23
+ "preview_path": "/lookbook/preview/primer/alpha/action_list/with_manual_dividers",
24
+ "name": "with_manual_dividers"
25
+ },
21
26
  {
22
27
  "inspect_path": "/lookbook/inspect/primer/alpha/action_list/divider",
23
28
  "preview_path": "/lookbook/preview/primer/alpha/action_list/divider",
@@ -78,11 +83,6 @@
78
83
  "preview_path": "/lookbook/preview/primer/alpha/action_list/item_trailing_action",
79
84
  "name": "item_trailing_action"
80
85
  },
81
- {
82
- "inspect_path": "/lookbook/inspect/primer/alpha/action_list/item_trailing_action_hover",
83
- "preview_path": "/lookbook/preview/primer/alpha/action_list/item_trailing_action_hover",
84
- "name": "item_trailing_action_hover"
85
- },
86
86
  {
87
87
  "inspect_path": "/lookbook/inspect/primer/alpha/action_list/item_danger",
88
88
  "preview_path": "/lookbook/preview/primer/alpha/action_list/item_danger",
@@ -1277,6 +1277,11 @@
1277
1277
  "preview_path": "/lookbook/preview/primer/alpha/overlay/default",
1278
1278
  "name": "default"
1279
1279
  },
1280
+ {
1281
+ "inspect_path": "/lookbook/inspect/primer/alpha/overlay/menu_no_header",
1282
+ "preview_path": "/lookbook/preview/primer/alpha/overlay/menu_no_header",
1283
+ "name": "menu_no_header"
1284
+ },
1280
1285
  {
1281
1286
  "inspect_path": "/lookbook/inspect/primer/alpha/overlay/middle_of_page",
1282
1287
  "preview_path": "/lookbook/preview/primer/alpha/overlay/middle_of_page",
@@ -1557,6 +1562,11 @@
1557
1562
  "inspect_path": "/lookbook/inspect/primer/alpha/tab_nav/with_icons_and_counters",
1558
1563
  "preview_path": "/lookbook/preview/primer/alpha/tab_nav/with_icons_and_counters",
1559
1564
  "name": "with_icons_and_counters"
1565
+ },
1566
+ {
1567
+ "inspect_path": "/lookbook/inspect/primer/alpha/tab_nav/with_extra",
1568
+ "preview_path": "/lookbook/preview/primer/alpha/tab_nav/with_extra",
1569
+ "name": "with_extra"
1560
1570
  }
1561
1571
  ]
1562
1572
  },
@@ -1573,6 +1583,11 @@
1573
1583
  "inspect_path": "/lookbook/inspect/primer/alpha/tab_panels/default",
1574
1584
  "preview_path": "/lookbook/preview/primer/alpha/tab_panels/default",
1575
1585
  "name": "default"
1586
+ },
1587
+ {
1588
+ "inspect_path": "/lookbook/inspect/primer/alpha/tab_panels/with_extra",
1589
+ "preview_path": "/lookbook/preview/primer/alpha/tab_panels/with_extra",
1590
+ "name": "with_extra"
1576
1591
  }
1577
1592
  ]
1578
1593
  },
data/static/statuses.json CHANGED
@@ -28,8 +28,9 @@
28
28
  "Primer::Alpha::Menu": "alpha",
29
29
  "Primer::Alpha::MultiInput": "alpha",
30
30
  "Primer::Alpha::NavList": "alpha",
31
+ "Primer::Alpha::NavList::Group": "alpha",
31
32
  "Primer::Alpha::NavList::Item": "alpha",
32
- "Primer::Alpha::NavList::Section": "alpha",
33
+ "Primer::Alpha::Navigation::Tab": "alpha",
33
34
  "Primer::Alpha::OcticonSymbols": "alpha",
34
35
  "Primer::Alpha::Overlay": "alpha",
35
36
  "Primer::Alpha::Overlay::Body": "alpha",
@@ -92,7 +93,7 @@
92
93
  "Primer::Content": "stable",
93
94
  "Primer::IconButton": "deprecated",
94
95
  "Primer::LayoutComponent": "alpha",
95
- "Primer::Navigation::TabComponent": "alpha",
96
+ "Primer::Navigation::TabComponent": "deprecated",
96
97
  "Primer::Tooltip": "deprecated",
97
- "Primer::Truncate": "beta"
98
+ "Primer::Truncate": "deprecated"
98
99
  }
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.1.0
4
+ version: 0.1.2
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-02-28 00:00:00.000000000 Z
11
+ date: 2023-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 17.0.0
47
+ version: 18.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 17.0.0
54
+ version: 18.0.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: view_component
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -481,10 +481,11 @@ files:
481
481
  - app/components/primer/alpha/nav_list.js
482
482
  - app/components/primer/alpha/nav_list.rb
483
483
  - app/components/primer/alpha/nav_list.ts
484
+ - app/components/primer/alpha/nav_list/group.rb
484
485
  - app/components/primer/alpha/nav_list/item.html.erb
485
486
  - app/components/primer/alpha/nav_list/item.rb
486
- - app/components/primer/alpha/nav_list/section.html.erb
487
- - app/components/primer/alpha/nav_list/section.rb
487
+ - app/components/primer/alpha/navigation/tab.html.erb
488
+ - app/components/primer/alpha/navigation/tab.rb
488
489
  - app/components/primer/alpha/octicon_symbols.html.erb
489
490
  - app/components/primer/alpha/octicon_symbols.rb
490
491
  - app/components/primer/alpha/overlay.css
@@ -694,7 +695,6 @@ files:
694
695
  - app/components/primer/icon_button.rb
695
696
  - app/components/primer/layout_component.html.erb
696
697
  - app/components/primer/layout_component.rb
697
- - app/components/primer/navigation/tab_component.html.erb
698
698
  - app/components/primer/navigation/tab_component.rb
699
699
  - app/components/primer/primer.d.ts
700
700
  - app/components/primer/primer.js
@@ -921,7 +921,6 @@ files:
921
921
  - previews/pages/forms/08_validations.md.erb
922
922
  - previews/pages/forms/09_compound_forms.md.erb
923
923
  - previews/primer/alpha/action_list_preview.rb
924
- - previews/primer/alpha/action_list_preview/heading.html.erb
925
924
  - previews/primer/alpha/auto_complete_preview.rb
926
925
  - previews/primer/alpha/banner_preview.rb
927
926
  - previews/primer/alpha/banner_preview/with_action_button.html.erb
@@ -950,6 +949,7 @@ files:
950
949
  - previews/primer/alpha/multi_input_preview.rb
951
950
  - previews/primer/alpha/multi_input_preview/playground.html.erb
952
951
  - previews/primer/alpha/nav_list_preview.rb
952
+ - previews/primer/alpha/nav_list_preview/trailing_action.html.erb
953
953
  - previews/primer/alpha/overlay_preview.rb
954
954
  - previews/primer/alpha/overlay_preview/middle_of_page.html.erb
955
955
  - previews/primer/alpha/radio_button_group_preview.rb
@@ -959,7 +959,9 @@ files:
959
959
  - previews/primer/alpha/segmented_control_preview/with_subhead_actions.html.erb
960
960
  - previews/primer/alpha/select_preview.rb
961
961
  - previews/primer/alpha/tab_nav_preview.rb
962
+ - previews/primer/alpha/tab_nav_preview/with_extra.html.erb
962
963
  - previews/primer/alpha/tab_panels_preview.rb
964
+ - previews/primer/alpha/tab_panels_preview/with_extra.html.erb
963
965
  - previews/primer/alpha/text_area_preview.rb
964
966
  - previews/primer/alpha/text_field_preview.rb
965
967
  - previews/primer/alpha/toggle_switch_preview.rb
@@ -1,3 +0,0 @@
1
- <nav-list>
2
- <%= render_parent %>
3
- </nav-list>
@@ -1,4 +0,0 @@
1
- <%# this <ul> is necessary here to make axe happy %>
2
- <ul>
3
- <%= render(Primer::Alpha::ActionList::Heading.new(scheme: scheme, list_id: list_id, title: title, subtitle: subtitle)) %>
4
- </ul>