primer_view_components 0.0.123 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +36 -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 +2 -2
  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 +10 -4
  10. data/app/components/primer/alpha/action_list/item.rb +7 -3
  11. data/app/components/primer/alpha/action_list.css.json +41 -0
  12. data/app/components/primer/alpha/action_list.html.erb +6 -8
  13. data/app/components/primer/alpha/action_list.rb +5 -10
  14. data/app/components/primer/alpha/auto_complete.css.json +11 -0
  15. data/app/components/primer/alpha/banner.css.json +14 -0
  16. data/app/components/primer/alpha/button_marketing.css.json +10 -0
  17. data/app/components/primer/alpha/dialog.css.json +63 -0
  18. data/app/components/primer/alpha/dropdown.css.json +21 -0
  19. data/app/components/primer/alpha/layout.css.json +27 -0
  20. data/app/components/primer/alpha/menu.css.json +11 -0
  21. data/app/components/primer/alpha/nav_list/{section.rb → group.rb} +9 -9
  22. data/app/components/primer/alpha/nav_list/item.html.erb +1 -1
  23. data/app/components/primer/alpha/nav_list/item.rb +18 -2
  24. data/app/components/primer/alpha/nav_list.d.ts +1 -0
  25. data/app/components/primer/alpha/nav_list.html.erb +8 -8
  26. data/app/components/primer/alpha/nav_list.js +24 -0
  27. data/app/components/primer/alpha/nav_list.rb +28 -32
  28. data/app/components/primer/alpha/nav_list.ts +27 -0
  29. data/app/components/primer/alpha/navigation/tab.rb +168 -0
  30. data/app/components/primer/alpha/overlay/body.rb +26 -0
  31. data/app/components/primer/alpha/overlay/footer.rb +41 -0
  32. data/app/components/primer/alpha/overlay/header.html.erb +15 -0
  33. data/app/components/primer/alpha/overlay/header.rb +47 -0
  34. data/app/components/primer/alpha/overlay.css +1 -0
  35. data/app/components/primer/alpha/overlay.css.json +11 -0
  36. data/app/components/primer/alpha/overlay.css.map +1 -0
  37. data/app/components/primer/alpha/overlay.html.erb +11 -0
  38. data/app/components/primer/alpha/overlay.pcss +14 -0
  39. data/app/components/primer/alpha/overlay.rb +207 -0
  40. data/app/components/primer/alpha/segmented_control.css.json +15 -0
  41. data/app/components/primer/alpha/tab_nav.css.json +10 -0
  42. data/app/components/primer/alpha/tab_nav.rb +10 -3
  43. data/app/components/primer/alpha/tab_panels.rb +2 -2
  44. data/app/components/primer/alpha/text_field.css.json +38 -0
  45. data/app/components/primer/alpha/toggle_switch.css.json +16 -0
  46. data/app/components/primer/alpha/underline_nav.css +1 -1
  47. data/app/components/primer/alpha/underline_nav.css.json +13 -0
  48. data/app/components/primer/alpha/underline_nav.css.map +1 -1
  49. data/app/components/primer/alpha/underline_nav.pcss +1 -0
  50. data/app/components/primer/alpha/underline_nav.rb +2 -2
  51. data/app/components/primer/alpha/underline_panels.rb +2 -2
  52. data/app/components/primer/anchored_position.d.ts +27 -0
  53. data/app/components/primer/anchored_position.js +149 -0
  54. data/app/components/primer/anchored_position.ts +167 -0
  55. data/app/components/primer/beta/avatar.css.json +14 -0
  56. data/app/components/primer/beta/avatar_stack.css.json +9 -0
  57. data/app/components/primer/beta/blankslate.css.json +12 -0
  58. data/app/components/primer/beta/border_box.css.json +32 -0
  59. data/app/components/primer/beta/breadcrumbs.css.json +4 -0
  60. data/app/components/primer/beta/button.css.json +22 -0
  61. data/app/components/primer/beta/button.html.erb +1 -1
  62. data/app/components/primer/beta/button.rb +2 -1
  63. data/app/components/primer/beta/counter.css.json +6 -0
  64. data/app/components/primer/beta/flash.css.json +15 -0
  65. data/app/components/primer/beta/flash.html.erb +1 -2
  66. data/app/components/primer/beta/label.css.json +20 -0
  67. data/app/components/primer/beta/link.css.json +8 -0
  68. data/app/components/primer/beta/popover.css.json +18 -0
  69. data/app/components/primer/beta/progress_bar.css.json +6 -0
  70. data/app/components/primer/beta/state.css.json +10 -0
  71. data/app/components/primer/beta/subhead.css.json +8 -0
  72. data/app/components/primer/beta/timeline_item.css.json +9 -0
  73. data/app/components/primer/beta/truncate.css.json +6 -0
  74. data/app/components/primer/component.rb +34 -0
  75. data/app/components/primer/navigation/tab_component.rb +3 -157
  76. data/app/components/primer/primer.d.ts +2 -0
  77. data/app/components/primer/primer.js +2 -0
  78. data/app/components/primer/primer.pcss +3 -0
  79. data/app/components/primer/primer.ts +2 -0
  80. data/app/components/primer/truncate.css.json +7 -0
  81. data/app/lib/primer/css/layout.css.json +263 -0
  82. data/app/lib/primer/css/utilities.css.json +1636 -0
  83. data/lib/primer/deprecations.yml +4 -0
  84. data/lib/primer/view_components/linters/base_linter.rb +1 -1
  85. data/lib/primer/view_components/linters/disallow_component_css_counter.rb +30 -0
  86. data/lib/primer/view_components/version.rb +2 -2
  87. data/lib/primer/yard/component_manifest.rb +3 -1
  88. data/lib/tasks/docs.rake +1 -1
  89. data/previews/primer/alpha/action_list_preview.rb +6 -14
  90. data/previews/primer/alpha/nav_list_preview/trailing_action.html.erb +19 -0
  91. data/previews/primer/alpha/nav_list_preview.rb +19 -30
  92. data/previews/primer/alpha/overlay_preview/middle_of_page.html.erb +17 -0
  93. data/previews/primer/alpha/overlay_preview.rb +112 -0
  94. data/previews/primer/alpha/tab_nav_preview/with_extra.html.erb +8 -0
  95. data/previews/primer/alpha/tab_nav_preview.rb +5 -0
  96. data/previews/primer/alpha/tab_panels_preview/with_extra.html.erb +17 -0
  97. data/previews/primer/alpha/tab_panels_preview.rb +5 -0
  98. data/static/arguments.json +167 -7
  99. data/static/audited_at.json +6 -1
  100. data/static/classes.json +311 -0
  101. data/static/constants.json +122 -8
  102. data/static/previews.json +31 -0
  103. data/static/statuses.json +7 -2
  104. metadata +25 -6
  105. data/app/components/primer/alpha/nav_list/section.html.erb +0 -3
  106. data/previews/primer/alpha/action_list_preview/heading.html.erb +0 -4
  107. /data/app/components/primer/{navigation/tab_component.html.erb → alpha/navigation/tab.html.erb} +0 -0
@@ -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,15 +336,124 @@
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
  },
355
+ "Primer::Alpha::Overlay": {
356
+ "ALIGN_CONTENT_MAPPINGS": {
357
+ "start": "Overlay-footer--alignStart",
358
+ "center": "Overlay-footer--alignCenter",
359
+ "end": "Overlay-footer--alignEnd"
360
+ },
361
+ "ALIGN_CONTENT_OPTIONS": [
362
+ "start",
363
+ "center",
364
+ "end"
365
+ ],
366
+ "ANCHOR_ALIGN_OPTIONS": [
367
+ "start",
368
+ "center",
369
+ "end"
370
+ ],
371
+ "ANCHOR_OFFSET_OPTIONS": [
372
+ "normal",
373
+ "spacious"
374
+ ],
375
+ "ANCHOR_SIDE_MAPPINGS": {
376
+ "inside_top": "inside-top",
377
+ "inside_bottom": "inside-bottom",
378
+ "inside_left": "inside-left",
379
+ "inside_right": "inside-right",
380
+ "inside_center": "inside-center",
381
+ "outside_top": "outside-top",
382
+ "outside_bottom": "outside-bottom",
383
+ "outside_left": "outside-left",
384
+ "outside_right": "outside-right"
385
+ },
386
+ "ANCHOR_SIDE_OPTIONS": [
387
+ "inside_top",
388
+ "inside_bottom",
389
+ "inside_left",
390
+ "inside_right",
391
+ "inside_center",
392
+ "outside_top",
393
+ "outside_bottom",
394
+ "outside_left",
395
+ "outside_right"
396
+ ],
397
+ "Body": "Primer::Alpha::Overlay::Body",
398
+ "DEFAULT_ALIGN_CONTENT": "end",
399
+ "DEFAULT_ANCHOR_ALIGN": "start",
400
+ "DEFAULT_ANCHOR_OFFSET": "normal",
401
+ "DEFAULT_ANCHOR_SIDE": "outside_bottom",
402
+ "DEFAULT_PADDING": "normal",
403
+ "DEFAULT_POPOVER": "auto",
404
+ "DEFAULT_SIZE": "auto",
405
+ "Footer": "Primer::Alpha::Overlay::Footer",
406
+ "Header": "Primer::Alpha::Overlay::Header",
407
+ "PADDING_MAPPINGS": {
408
+ "normal": null,
409
+ "condensed": "Overlay-body--paddingCondensed",
410
+ "none": "Overlay-body--paddingNone"
411
+ },
412
+ "PADDING_OPTIONS": [
413
+ "normal",
414
+ "condensed",
415
+ "none"
416
+ ],
417
+ "POPOVER_OPTIONS": [
418
+ "auto",
419
+ "manual"
420
+ ],
421
+ "ROLE_OPTIONS": [
422
+ "dialog",
423
+ "menu"
424
+ ],
425
+ "SIZE_MAPPINGS": {
426
+ "auto": "Overlay--size-auto",
427
+ "small": "Overlay--size-small",
428
+ "medium": "Overlay--size-medium",
429
+ "medium_portrait": "Overlay--size-medium-portrait",
430
+ "large": "Overlay--size-large",
431
+ "xlarge": "Overlay--size-xlarge"
432
+ },
433
+ "SIZE_OPTIONS": [
434
+ "auto",
435
+ "small",
436
+ "medium",
437
+ "medium_portrait",
438
+ "large",
439
+ "xlarge"
440
+ ]
441
+ },
442
+ "Primer::Alpha::Overlay::Body": {
443
+ },
444
+ "Primer::Alpha::Overlay::Footer": {
445
+ },
446
+ "Primer::Alpha::Overlay::Header": {
447
+ "DEFAULT_SIZE": "medium",
448
+ "SIZE_MAPPINGS": {
449
+ "medium": null,
450
+ "large": "Overlay-header--large"
451
+ },
452
+ "SIZE_OPTIONS": [
453
+ "medium",
454
+ "large"
455
+ ]
456
+ },
338
457
  "Primer::Alpha::RadioButton": {
339
458
  },
340
459
  "Primer::Alpha::RadioButtonGroup": {
@@ -1087,11 +1206,6 @@
1087
1206
  "MAX_COL": 12
1088
1207
  },
1089
1208
  "Primer::Navigation::TabComponent": {
1090
- "ARIA_CURRENT_OPTIONS_FOR_ANCHOR": [
1091
- true,
1092
- "page"
1093
- ],
1094
- "DEFAULT_ARIA_CURRENT_FOR_ANCHOR": "page"
1095
1209
  },
1096
1210
  "Primer::Tooltip": {
1097
1211
  "ALIGN_DEFAULT": "default",
data/static/previews.json CHANGED
@@ -1263,6 +1263,27 @@
1263
1263
  }
1264
1264
  ]
1265
1265
  },
1266
+ {
1267
+ "name": "overlay",
1268
+ "lookup_path": "primer/alpha/overlay",
1269
+ "examples": [
1270
+ {
1271
+ "inspect_path": "/lookbook/inspect/primer/alpha/overlay/playground",
1272
+ "preview_path": "/lookbook/preview/primer/alpha/overlay/playground",
1273
+ "name": "playground"
1274
+ },
1275
+ {
1276
+ "inspect_path": "/lookbook/inspect/primer/alpha/overlay/default",
1277
+ "preview_path": "/lookbook/preview/primer/alpha/overlay/default",
1278
+ "name": "default"
1279
+ },
1280
+ {
1281
+ "inspect_path": "/lookbook/inspect/primer/alpha/overlay/middle_of_page",
1282
+ "preview_path": "/lookbook/preview/primer/alpha/overlay/middle_of_page",
1283
+ "name": "middle_of_page"
1284
+ }
1285
+ ]
1286
+ },
1266
1287
  {
1267
1288
  "name": "popover",
1268
1289
  "lookup_path": "primer/beta/popover",
@@ -1536,6 +1557,11 @@
1536
1557
  "inspect_path": "/lookbook/inspect/primer/alpha/tab_nav/with_icons_and_counters",
1537
1558
  "preview_path": "/lookbook/preview/primer/alpha/tab_nav/with_icons_and_counters",
1538
1559
  "name": "with_icons_and_counters"
1560
+ },
1561
+ {
1562
+ "inspect_path": "/lookbook/inspect/primer/alpha/tab_nav/with_extra",
1563
+ "preview_path": "/lookbook/preview/primer/alpha/tab_nav/with_extra",
1564
+ "name": "with_extra"
1539
1565
  }
1540
1566
  ]
1541
1567
  },
@@ -1552,6 +1578,11 @@
1552
1578
  "inspect_path": "/lookbook/inspect/primer/alpha/tab_panels/default",
1553
1579
  "preview_path": "/lookbook/preview/primer/alpha/tab_panels/default",
1554
1580
  "name": "default"
1581
+ },
1582
+ {
1583
+ "inspect_path": "/lookbook/inspect/primer/alpha/tab_panels/with_extra",
1584
+ "preview_path": "/lookbook/preview/primer/alpha/tab_panels/with_extra",
1585
+ "name": "with_extra"
1555
1586
  }
1556
1587
  ]
1557
1588
  },
data/static/statuses.json CHANGED
@@ -28,9 +28,14 @@
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",
35
+ "Primer::Alpha::Overlay": "alpha",
36
+ "Primer::Alpha::Overlay::Body": "alpha",
37
+ "Primer::Alpha::Overlay::Footer": "alpha",
38
+ "Primer::Alpha::Overlay::Header": "alpha",
34
39
  "Primer::Alpha::RadioButton": "alpha",
35
40
  "Primer::Alpha::RadioButtonGroup": "alpha",
36
41
  "Primer::Alpha::SegmentedControl": "alpha",
@@ -88,7 +93,7 @@
88
93
  "Primer::Content": "stable",
89
94
  "Primer::IconButton": "deprecated",
90
95
  "Primer::LayoutComponent": "alpha",
91
- "Primer::Navigation::TabComponent": "alpha",
96
+ "Primer::Navigation::TabComponent": "deprecated",
92
97
  "Primer::Tooltip": "deprecated",
93
98
  "Primer::Truncate": "beta"
94
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.0.123
4
+ version: 0.1.1
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-21 00:00:00.000000000 Z
11
+ date: 2023-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -481,12 +481,23 @@ 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
491
+ - app/components/primer/alpha/overlay.css
492
+ - app/components/primer/alpha/overlay.css.json
493
+ - app/components/primer/alpha/overlay.css.map
494
+ - app/components/primer/alpha/overlay.html.erb
495
+ - app/components/primer/alpha/overlay.pcss
496
+ - app/components/primer/alpha/overlay.rb
497
+ - app/components/primer/alpha/overlay/body.rb
498
+ - app/components/primer/alpha/overlay/footer.rb
499
+ - app/components/primer/alpha/overlay/header.html.erb
500
+ - app/components/primer/alpha/overlay/header.rb
490
501
  - app/components/primer/alpha/radio_button.rb
491
502
  - app/components/primer/alpha/radio_button_group.rb
492
503
  - app/components/primer/alpha/segmented_control.css
@@ -544,6 +555,9 @@ files:
544
555
  - app/components/primer/alpha/x_banner.d.ts
545
556
  - app/components/primer/alpha/x_banner.js
546
557
  - app/components/primer/alpha/x_banner.ts
558
+ - app/components/primer/anchored_position.d.ts
559
+ - app/components/primer/anchored_position.js
560
+ - app/components/primer/anchored_position.ts
547
561
  - app/components/primer/base_component.rb
548
562
  - app/components/primer/beta/auto_complete.rb
549
563
  - app/components/primer/beta/auto_complete/auto_complete.d.ts
@@ -681,7 +695,6 @@ files:
681
695
  - app/components/primer/icon_button.rb
682
696
  - app/components/primer/layout_component.html.erb
683
697
  - app/components/primer/layout_component.rb
684
- - app/components/primer/navigation/tab_component.html.erb
685
698
  - app/components/primer/navigation/tab_component.rb
686
699
  - app/components/primer/primer.d.ts
687
700
  - app/components/primer/primer.js
@@ -852,6 +865,7 @@ files:
852
865
  - lib/primer/view_components/linters/close_button_component_migration_counter.rb
853
866
  - lib/primer/view_components/linters/deprecated_components_counter.rb
854
867
  - lib/primer/view_components/linters/disallow_action_list.rb
868
+ - lib/primer/view_components/linters/disallow_component_css_counter.rb
855
869
  - lib/primer/view_components/linters/flash_migration_counter.rb
856
870
  - lib/primer/view_components/linters/helpers/deprecated_components_helpers.rb
857
871
  - lib/primer/view_components/linters/helpers/rubocop_helpers.rb
@@ -907,7 +921,6 @@ files:
907
921
  - previews/pages/forms/08_validations.md.erb
908
922
  - previews/pages/forms/09_compound_forms.md.erb
909
923
  - previews/primer/alpha/action_list_preview.rb
910
- - previews/primer/alpha/action_list_preview/heading.html.erb
911
924
  - previews/primer/alpha/auto_complete_preview.rb
912
925
  - previews/primer/alpha/banner_preview.rb
913
926
  - previews/primer/alpha/banner_preview/with_action_button.html.erb
@@ -936,6 +949,9 @@ files:
936
949
  - previews/primer/alpha/multi_input_preview.rb
937
950
  - previews/primer/alpha/multi_input_preview/playground.html.erb
938
951
  - previews/primer/alpha/nav_list_preview.rb
952
+ - previews/primer/alpha/nav_list_preview/trailing_action.html.erb
953
+ - previews/primer/alpha/overlay_preview.rb
954
+ - previews/primer/alpha/overlay_preview/middle_of_page.html.erb
939
955
  - previews/primer/alpha/radio_button_group_preview.rb
940
956
  - previews/primer/alpha/radio_button_preview.rb
941
957
  - previews/primer/alpha/segmented_control_preview.rb
@@ -943,7 +959,9 @@ files:
943
959
  - previews/primer/alpha/segmented_control_preview/with_subhead_actions.html.erb
944
960
  - previews/primer/alpha/select_preview.rb
945
961
  - previews/primer/alpha/tab_nav_preview.rb
962
+ - previews/primer/alpha/tab_nav_preview/with_extra.html.erb
946
963
  - previews/primer/alpha/tab_panels_preview.rb
964
+ - previews/primer/alpha/tab_panels_preview/with_extra.html.erb
947
965
  - previews/primer/alpha/text_area_preview.rb
948
966
  - previews/primer/alpha/text_field_preview.rb
949
967
  - previews/primer/alpha/toggle_switch_preview.rb
@@ -1021,6 +1039,7 @@ files:
1021
1039
  - static/arguments.json
1022
1040
  - static/assets/view-components.svg
1023
1041
  - static/audited_at.json
1042
+ - static/classes.json
1024
1043
  - static/constants.json
1025
1044
  - static/previews.json
1026
1045
  - static/statuses.json
@@ -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>