primer_view_components 0.0.114 → 0.0.115

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) 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 -0
  8. data/app/components/primer/alpha/action_list/heading.rb +2 -0
  9. data/app/components/primer/alpha/action_list/item.rb +8 -6
  10. data/app/components/primer/alpha/action_list.rb +1 -0
  11. data/app/components/primer/alpha/auto_complete/auto_complete.html.erb +1 -1
  12. data/app/components/primer/alpha/auto_complete/item.rb +1 -0
  13. data/app/components/primer/alpha/auto_complete.rb +3 -2
  14. data/app/components/primer/alpha/banner.html.erb +1 -1
  15. data/app/components/primer/alpha/banner.rb +1 -0
  16. data/app/components/primer/alpha/button_marketing.rb +2 -0
  17. data/app/components/primer/alpha/dialog.rb +3 -0
  18. data/app/components/primer/alpha/image.rb +1 -0
  19. data/app/components/primer/alpha/image_crop.html.erb +1 -1
  20. data/app/components/primer/alpha/layout.css +1 -0
  21. data/app/components/primer/alpha/layout.css.json +1 -0
  22. data/app/components/primer/alpha/layout.css.map +1 -0
  23. data/app/components/primer/alpha/layout.pcss +268 -0
  24. data/app/components/primer/{menu_component.css → alpha/menu.css} +0 -0
  25. data/app/components/primer/alpha/menu.css.json +1 -0
  26. data/app/components/primer/alpha/menu.css.map +1 -0
  27. data/app/components/primer/{menu_component.html.erb → alpha/menu.html.erb} +0 -0
  28. data/app/components/primer/{menu_component.pcss → alpha/menu.pcss} +0 -0
  29. data/app/components/primer/alpha/menu.rb +76 -0
  30. data/app/components/primer/{octicon_symbols_component.html.erb → alpha/octicon_symbols.html.erb} +0 -0
  31. data/app/components/primer/alpha/octicon_symbols.rb +61 -0
  32. data/app/components/primer/alpha/text_field.rb +1 -0
  33. data/app/components/primer/alpha/toggle_switch.html.erb +2 -2
  34. data/app/components/primer/alpha/toggle_switch.rb +2 -0
  35. data/app/components/primer/alpha/tool_tip.js +77 -69
  36. data/app/components/primer/alpha/tool_tip.ts +63 -51
  37. data/app/components/primer/alpha/tooltip.rb +2 -0
  38. data/app/components/primer/beta/auto_complete/item.rb +4 -4
  39. data/app/components/primer/beta/auto_complete.rb +3 -3
  40. data/app/components/primer/beta/avatar.rb +1 -0
  41. data/app/components/primer/beta/base_button.rb +1 -0
  42. data/app/components/primer/beta/blankslate.rb +5 -5
  43. data/app/components/primer/beta/button.rb +7 -7
  44. data/app/components/primer/beta/clipboard_copy.html.erb +2 -2
  45. data/app/components/primer/beta/clipboard_copy.rb +1 -0
  46. data/app/components/primer/beta/close_button.rb +2 -1
  47. data/app/components/primer/beta/counter.rb +1 -0
  48. data/app/components/primer/beta/heading.rb +1 -0
  49. data/app/components/primer/beta/icon_button.html.erb +1 -1
  50. data/app/components/primer/beta/icon_button.rb +1 -0
  51. data/app/components/primer/beta/label.rb +1 -0
  52. data/app/components/primer/beta/markdown.rb +1 -0
  53. data/app/components/primer/{octicon_component.html.erb → beta/octicon.html.erb} +0 -0
  54. data/app/components/primer/beta/octicon.rb +88 -0
  55. data/app/components/primer/beta/relative_time.rb +2 -1
  56. data/app/components/primer/{spinner_component.html.erb → beta/spinner.html.erb} +0 -0
  57. data/app/components/primer/beta/spinner.rb +46 -0
  58. data/app/components/primer/beta/text.rb +1 -0
  59. data/app/components/primer/blankslate_component.rb +3 -3
  60. data/app/components/primer/box.rb +1 -0
  61. data/app/components/primer/button_component.rb +3 -3
  62. data/app/components/primer/conditional_wrapper.rb +2 -0
  63. data/app/components/primer/hellip_button.rb +2 -0
  64. data/app/components/primer/icon_button.html.erb +2 -2
  65. data/app/components/primer/icon_button.rb +1 -0
  66. data/app/components/primer/layout_component.rb +2 -0
  67. data/app/components/primer/local_time.rb +3 -0
  68. data/app/components/primer/menu_component.rb +2 -69
  69. data/app/components/primer/navigation/tab_component.rb +2 -2
  70. data/app/components/primer/octicon_component.rb +3 -81
  71. data/app/components/primer/octicon_symbols_component.rb +2 -52
  72. data/app/components/primer/primer.d.ts +2 -0
  73. data/app/components/primer/primer.js +2 -0
  74. data/app/components/primer/primer.pcss +2 -1
  75. data/app/components/primer/primer.ts +2 -0
  76. data/app/components/primer/spinner_component.rb +2 -38
  77. data/app/components/primer/state_component.rb +1 -0
  78. data/app/components/primer/subhead_component.rb +2 -0
  79. data/app/components/primer/tab_container_component.rb +2 -0
  80. data/app/components/primer/time_ago_component.rb +2 -1
  81. data/app/components/primer/timeline_item_component.rb +3 -2
  82. data/app/components/primer/tooltip.rb +1 -0
  83. data/app/components/primer/truncate.rb +2 -0
  84. data/app/forms/immediate_validation_form.rb +29 -0
  85. data/app/forms/multi_input_form.rb +4 -2
  86. data/app/lib/primer/css/layout.css +1 -378
  87. data/app/lib/primer/css/layout.css.json +1 -1
  88. data/app/lib/primer/octicon/cache.rb +1 -1
  89. data/app/lib/primer/view_helper.rb +1 -1
  90. data/lib/primer/deprecations.yml +26 -0
  91. data/lib/primer/forms/builder.rb +48 -8
  92. data/lib/primer/forms/check_box.html.erb +3 -1
  93. data/lib/primer/forms/dsl/input.rb +23 -1
  94. data/lib/primer/forms/dsl/multi_input.rb +6 -9
  95. data/lib/primer/forms/dsl/select_list_input.rb +1 -1
  96. data/lib/primer/forms/dsl/text_field_input.rb +31 -1
  97. data/lib/primer/forms/form_control.html.erb +17 -13
  98. data/lib/primer/forms/form_control.rb +2 -0
  99. data/lib/primer/forms/multi.html.erb +6 -2
  100. data/lib/primer/forms/primer_multi_input.d.ts +10 -0
  101. data/lib/primer/forms/primer_multi_input.js +45 -0
  102. data/lib/primer/forms/primer_multi_input.ts +46 -0
  103. data/lib/primer/forms/primer_text_field.d.ts +1 -0
  104. data/lib/primer/forms/primer_text_field.js +62 -0
  105. data/lib/primer/forms/primer_text_field.ts +48 -0
  106. data/lib/primer/forms/radio_button.html.erb +3 -1
  107. data/lib/primer/forms/text_field.html.erb +8 -8
  108. data/lib/primer/forms/text_field.rb +11 -0
  109. data/lib/primer/view_components/linters/close_button_component_migration_counter.rb +1 -1
  110. data/lib/primer/view_components/version.rb +1 -1
  111. data/lib/tasks/docs.rake +5 -5
  112. data/lib/tasks/helpers/ast_traverser.rb +1 -1
  113. data/previews/primer/alpha/action_list_preview.rb +1 -1
  114. data/previews/primer/alpha/auto_complete_preview.rb +62 -6
  115. data/previews/primer/alpha/layout_preview.rb +179 -6
  116. data/previews/primer/{menu_component_preview → alpha/menu_preview}/default.html.erb +3 -3
  117. data/previews/primer/{menu_component_preview → alpha/menu_preview}/playground.html.erb +3 -3
  118. data/previews/primer/alpha/menu_preview.rb +14 -0
  119. data/previews/primer/alpha/toggle_switch_preview.rb +11 -9
  120. data/previews/primer/beta/auto_complete_preview/with_submit_button.html.erb +1 -1
  121. data/previews/primer/beta/auto_complete_preview.rb +19 -17
  122. data/previews/primer/beta/octicon_preview.rb +24 -0
  123. data/previews/primer/beta/spinner_preview.rb +22 -0
  124. data/previews/primer/forms/forms_preview/immediate_validation_form.html.erb +3 -0
  125. data/previews/primer/forms/forms_preview/multi_input_form.html.erb +12 -1
  126. data/previews/primer/forms/forms_preview.rb +2 -0
  127. data/previews/primer/url_helpers.rb +15 -0
  128. data/static/arguments.json +159 -159
  129. data/static/audited_at.json +4 -0
  130. data/static/constants.json +42 -34
  131. data/static/statuses.json +10 -6
  132. metadata +32 -15
  133. data/app/components/primer/menu_component.css.json +0 -1
  134. data/app/components/primer/menu_component.css.map +0 -1
  135. data/previews/primer/menu_component_preview.rb +0 -12
  136. data/previews/primer/octicon_component_preview.rb +0 -22
  137. data/previews/primer/spinner_component_preview.rb +0 -20
@@ -20,9 +20,11 @@
20
20
  "Primer::Alpha::Layout": "",
21
21
  "Primer::Alpha::Layout::Main": "",
22
22
  "Primer::Alpha::Layout::Sidebar": "",
23
+ "Primer::Alpha::Menu": "",
23
24
  "Primer::Alpha::NavList": "",
24
25
  "Primer::Alpha::NavList::Item": "",
25
26
  "Primer::Alpha::NavList::Section": "",
27
+ "Primer::Alpha::OcticonSymbols": "",
26
28
  "Primer::Alpha::SegmentedControl": "",
27
29
  "Primer::Alpha::SegmentedControl::Item": "",
28
30
  "Primer::Alpha::TabNav": "",
@@ -55,9 +57,11 @@
55
57
  "Primer::Beta::Label": "",
56
58
  "Primer::Beta::Link": "",
57
59
  "Primer::Beta::Markdown": "",
60
+ "Primer::Beta::Octicon": "",
58
61
  "Primer::Beta::Popover": "",
59
62
  "Primer::Beta::ProgressBar": "",
60
63
  "Primer::Beta::RelativeTime": "",
64
+ "Primer::Beta::Spinner": "",
61
65
  "Primer::Beta::Text": "",
62
66
  "Primer::Beta::Truncate": "",
63
67
  "Primer::Beta::Truncate::TruncateText": "",
@@ -300,6 +300,17 @@
300
300
  "section"
301
301
  ]
302
302
  },
303
+ "Primer::Alpha::Menu": {
304
+ "HEADING_TAG_FALLBACK": "h2",
305
+ "HEADING_TAG_OPTIONS": [
306
+ "h1",
307
+ "h2",
308
+ "h3",
309
+ "h4",
310
+ "h5",
311
+ "h6"
312
+ ]
313
+ },
303
314
  "Primer::Alpha::NavList": {
304
315
  "Item": "Primer::Alpha::NavList::Item",
305
316
  "Section": "Primer::Alpha::NavList::Section"
@@ -308,6 +319,8 @@
308
319
  },
309
320
  "Primer::Alpha::NavList::Section": {
310
321
  },
322
+ "Primer::Alpha::OcticonSymbols": {
323
+ },
311
324
  "Primer::Alpha::SegmentedControl": {
312
325
  "FULL_WIDTH_DEFAULT": false,
313
326
  "HIDE_LABELS_DEFAULT": false,
@@ -717,6 +730,21 @@
717
730
  "td"
718
731
  ]
719
732
  },
733
+ "Primer::Beta::Octicon": {
734
+ "SIZE_DEFAULT": "small",
735
+ "SIZE_MAPPINGS": {
736
+ "xsmall": 12,
737
+ "small": 16,
738
+ "medium": 24
739
+ },
740
+ "SIZE_MEDIUM": "medium",
741
+ "SIZE_OPTIONS": [
742
+ "xsmall",
743
+ "small",
744
+ "medium"
745
+ ],
746
+ "SIZE_XSMALL": "xsmall"
747
+ },
720
748
  "Primer::Beta::Popover": {
721
749
  "CARET_DEFAULT": "top",
722
750
  "CARET_MAPPINGS": {
@@ -870,6 +898,20 @@
870
898
  "two_digit"
871
899
  ]
872
900
  },
901
+ "Primer::Beta::Spinner": {
902
+ "DEFAULT_SIZE": "medium",
903
+ "DEFAULT_STYLE": "box-sizing: content-box; color: var(--color-icon-primary);",
904
+ "SIZE_MAPPINGS": {
905
+ "small": 16,
906
+ "medium": 32,
907
+ "large": 64
908
+ },
909
+ "SIZE_OPTIONS": [
910
+ "small",
911
+ "medium",
912
+ "large"
913
+ ]
914
+ },
873
915
  "Primer::Beta::Text": {
874
916
  "DEFAULT_TAG": "span"
875
917
  },
@@ -997,15 +1039,6 @@
997
1039
  "Primer::Markdown": {
998
1040
  },
999
1041
  "Primer::MenuComponent": {
1000
- "HEADING_TAG_FALLBACK": "h2",
1001
- "HEADING_TAG_OPTIONS": [
1002
- "h1",
1003
- "h2",
1004
- "h3",
1005
- "h4",
1006
- "h5",
1007
- "h6"
1008
- ]
1009
1042
  },
1010
1043
  "Primer::Navigation::TabComponent": {
1011
1044
  "ARIA_CURRENT_OPTIONS_FOR_ANCHOR": [
@@ -1015,37 +1048,12 @@
1015
1048
  "DEFAULT_ARIA_CURRENT_FOR_ANCHOR": "page"
1016
1049
  },
1017
1050
  "Primer::OcticonComponent": {
1018
- "SIZE_DEFAULT": "small",
1019
- "SIZE_MAPPINGS": {
1020
- "xsmall": 12,
1021
- "small": 16,
1022
- "medium": 24
1023
- },
1024
- "SIZE_MEDIUM": "medium",
1025
- "SIZE_OPTIONS": [
1026
- "xsmall",
1027
- "small",
1028
- "medium"
1029
- ],
1030
- "SIZE_XSMALL": "xsmall"
1031
1051
  },
1032
1052
  "Primer::OcticonSymbolsComponent": {
1033
1053
  },
1034
1054
  "Primer::PopoverComponent": {
1035
1055
  },
1036
1056
  "Primer::SpinnerComponent": {
1037
- "DEFAULT_SIZE": "medium",
1038
- "DEFAULT_STYLE": "box-sizing: content-box; color: var(--color-icon-primary);",
1039
- "SIZE_MAPPINGS": {
1040
- "small": 16,
1041
- "medium": 32,
1042
- "large": 64
1043
- },
1044
- "SIZE_OPTIONS": [
1045
- "small",
1046
- "medium",
1047
- "large"
1048
- ]
1049
1057
  },
1050
1058
  "Primer::StateComponent": {
1051
1059
  "DEPRECATED_SCHEME_MAPPINGS": {
data/static/statuses.json CHANGED
@@ -20,9 +20,11 @@
20
20
  "Primer::Alpha::Layout": "alpha",
21
21
  "Primer::Alpha::Layout::Main": "alpha",
22
22
  "Primer::Alpha::Layout::Sidebar": "alpha",
23
+ "Primer::Alpha::Menu": "alpha",
23
24
  "Primer::Alpha::NavList": "alpha",
24
25
  "Primer::Alpha::NavList::Item": "alpha",
25
26
  "Primer::Alpha::NavList::Section": "alpha",
27
+ "Primer::Alpha::OcticonSymbols": "alpha",
26
28
  "Primer::Alpha::SegmentedControl": "alpha",
27
29
  "Primer::Alpha::SegmentedControl::Item": "alpha",
28
30
  "Primer::Alpha::TabNav": "alpha",
@@ -55,9 +57,11 @@
55
57
  "Primer::Beta::Label": "beta",
56
58
  "Primer::Beta::Link": "beta",
57
59
  "Primer::Beta::Markdown": "beta",
60
+ "Primer::Beta::Octicon": "beta",
58
61
  "Primer::Beta::Popover": "beta",
59
62
  "Primer::Beta::ProgressBar": "beta",
60
63
  "Primer::Beta::RelativeTime": "beta",
64
+ "Primer::Beta::Spinner": "beta",
61
65
  "Primer::Beta::Text": "beta",
62
66
  "Primer::Beta::Truncate": "beta",
63
67
  "Primer::Beta::Truncate::TruncateText": "alpha",
@@ -77,18 +81,18 @@
77
81
  "Primer::LabelComponent": "deprecated",
78
82
  "Primer::LayoutComponent": "alpha",
79
83
  "Primer::LinkComponent": "deprecated",
80
- "Primer::LocalTime": "alpha",
84
+ "Primer::LocalTime": "deprecated",
81
85
  "Primer::Markdown": "deprecated",
82
- "Primer::MenuComponent": "alpha",
86
+ "Primer::MenuComponent": "deprecated",
83
87
  "Primer::Navigation::TabComponent": "alpha",
84
- "Primer::OcticonComponent": "beta",
85
- "Primer::OcticonSymbolsComponent": "alpha",
88
+ "Primer::OcticonComponent": "deprecated",
89
+ "Primer::OcticonSymbolsComponent": "deprecated",
86
90
  "Primer::PopoverComponent": "deprecated",
87
- "Primer::SpinnerComponent": "beta",
91
+ "Primer::SpinnerComponent": "deprecated",
88
92
  "Primer::StateComponent": "beta",
89
93
  "Primer::SubheadComponent": "beta",
90
94
  "Primer::TabContainerComponent": "alpha",
91
- "Primer::TimeAgoComponent": "beta",
95
+ "Primer::TimeAgoComponent": "deprecated",
92
96
  "Primer::TimelineItemComponent": "beta",
93
97
  "Primer::TimelineItemComponent::BadgeComponent": "alpha",
94
98
  "Primer::Tooltip": "deprecated",
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.114
4
+ version: 0.0.115
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: 2022-12-07 00:00:00.000000000 Z
11
+ date: 2022-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -468,8 +468,18 @@ files:
468
468
  - app/components/primer/alpha/image_crop.js
469
469
  - app/components/primer/alpha/image_crop.rb
470
470
  - app/components/primer/alpha/image_crop.ts
471
+ - app/components/primer/alpha/layout.css
472
+ - app/components/primer/alpha/layout.css.json
473
+ - app/components/primer/alpha/layout.css.map
471
474
  - app/components/primer/alpha/layout.html.erb
475
+ - app/components/primer/alpha/layout.pcss
472
476
  - app/components/primer/alpha/layout.rb
477
+ - app/components/primer/alpha/menu.css
478
+ - app/components/primer/alpha/menu.css.json
479
+ - app/components/primer/alpha/menu.css.map
480
+ - app/components/primer/alpha/menu.html.erb
481
+ - app/components/primer/alpha/menu.pcss
482
+ - app/components/primer/alpha/menu.rb
473
483
  - app/components/primer/alpha/modal_dialog.d.ts
474
484
  - app/components/primer/alpha/modal_dialog.js
475
485
  - app/components/primer/alpha/modal_dialog.ts
@@ -482,6 +492,8 @@ files:
482
492
  - app/components/primer/alpha/nav_list/item.rb
483
493
  - app/components/primer/alpha/nav_list/section.html.erb
484
494
  - app/components/primer/alpha/nav_list/section.rb
495
+ - app/components/primer/alpha/octicon_symbols.html.erb
496
+ - app/components/primer/alpha/octicon_symbols.rb
485
497
  - app/components/primer/alpha/segmented_control.css
486
498
  - app/components/primer/alpha/segmented_control.css.json
487
499
  - app/components/primer/alpha/segmented_control.css.map
@@ -611,6 +623,8 @@ files:
611
623
  - app/components/primer/beta/link.pcss
612
624
  - app/components/primer/beta/link.rb
613
625
  - app/components/primer/beta/markdown.rb
626
+ - app/components/primer/beta/octicon.html.erb
627
+ - app/components/primer/beta/octicon.rb
614
628
  - app/components/primer/beta/popover.css
615
629
  - app/components/primer/beta/popover.css.json
616
630
  - app/components/primer/beta/popover.css.map
@@ -624,6 +638,8 @@ files:
624
638
  - app/components/primer/beta/progress_bar.pcss
625
639
  - app/components/primer/beta/progress_bar.rb
626
640
  - app/components/primer/beta/relative_time.rb
641
+ - app/components/primer/beta/spinner.html.erb
642
+ - app/components/primer/beta/spinner.rb
627
643
  - app/components/primer/beta/text.rb
628
644
  - app/components/primer/beta/truncate.css
629
645
  - app/components/primer/beta/truncate.css.json
@@ -657,24 +673,16 @@ files:
657
673
  - app/components/primer/local_time.rb
658
674
  - app/components/primer/local_time.ts
659
675
  - app/components/primer/markdown.rb
660
- - app/components/primer/menu_component.css
661
- - app/components/primer/menu_component.css.json
662
- - app/components/primer/menu_component.css.map
663
- - app/components/primer/menu_component.html.erb
664
- - app/components/primer/menu_component.pcss
665
676
  - app/components/primer/menu_component.rb
666
677
  - app/components/primer/navigation/tab_component.html.erb
667
678
  - app/components/primer/navigation/tab_component.rb
668
- - app/components/primer/octicon_component.html.erb
669
679
  - app/components/primer/octicon_component.rb
670
- - app/components/primer/octicon_symbols_component.html.erb
671
680
  - app/components/primer/octicon_symbols_component.rb
672
681
  - app/components/primer/popover_component.rb
673
682
  - app/components/primer/primer.d.ts
674
683
  - app/components/primer/primer.js
675
684
  - app/components/primer/primer.pcss
676
685
  - app/components/primer/primer.ts
677
- - app/components/primer/spinner_component.html.erb
678
686
  - app/components/primer/spinner_component.rb
679
687
  - app/components/primer/state_component.css
680
688
  - app/components/primer/state_component.css.json
@@ -724,6 +732,7 @@ files:
724
732
  - app/forms/composed_form.rb
725
733
  - app/forms/first_name_form.rb
726
734
  - app/forms/horizontal_form.rb
735
+ - app/forms/immediate_validation_form.rb
727
736
  - app/forms/invalid_form.rb
728
737
  - app/forms/last_name_form.rb
729
738
  - app/forms/multi_input_form.rb
@@ -809,6 +818,12 @@ files:
809
818
  - lib/primer/forms/hidden_field.rb
810
819
  - lib/primer/forms/multi.html.erb
811
820
  - lib/primer/forms/multi.rb
821
+ - lib/primer/forms/primer_multi_input.d.ts
822
+ - lib/primer/forms/primer_multi_input.js
823
+ - lib/primer/forms/primer_multi_input.ts
824
+ - lib/primer/forms/primer_text_field.d.ts
825
+ - lib/primer/forms/primer_text_field.js
826
+ - lib/primer/forms/primer_text_field.ts
812
827
  - lib/primer/forms/radio_button.html.erb
813
828
  - lib/primer/forms/radio_button.rb
814
829
  - lib/primer/forms/radio_button_group.html.erb
@@ -903,6 +918,9 @@ files:
903
918
  - previews/primer/alpha/hidden_text_expander_preview.rb
904
919
  - previews/primer/alpha/image_crop_preview.rb
905
920
  - previews/primer/alpha/layout_preview.rb
921
+ - previews/primer/alpha/menu_preview.rb
922
+ - previews/primer/alpha/menu_preview/default.html.erb
923
+ - previews/primer/alpha/menu_preview/playground.html.erb
906
924
  - previews/primer/alpha/nav_list_preview.rb
907
925
  - previews/primer/alpha/segmented_control_preview.rb
908
926
  - previews/primer/alpha/tab_nav_preview.rb
@@ -947,9 +965,11 @@ files:
947
965
  - previews/primer/beta/label_preview.rb
948
966
  - previews/primer/beta/link_preview.rb
949
967
  - previews/primer/beta/markdown_preview.rb
968
+ - previews/primer/beta/octicon_preview.rb
950
969
  - previews/primer/beta/popover_preview.rb
951
970
  - previews/primer/beta/progress_bar_preview.rb
952
971
  - previews/primer/beta/relative_time_preview.rb
972
+ - previews/primer/beta/spinner_preview.rb
953
973
  - previews/primer/beta/text_preview.rb
954
974
  - previews/primer/beta/truncate_preview.rb
955
975
  - previews/primer/forms/forms_preview.rb
@@ -960,6 +980,7 @@ files:
960
980
  - previews/primer/forms/forms_preview/check_box_with_nested_form.html.erb
961
981
  - previews/primer/forms/forms_preview/composed_form.html.erb
962
982
  - previews/primer/forms/forms_preview/horizontal_form.html.erb
983
+ - previews/primer/forms/forms_preview/immediate_validation_form.html.erb
963
984
  - previews/primer/forms/forms_preview/invalid_form.html.erb
964
985
  - previews/primer/forms/forms_preview/multi_input_form.html.erb
965
986
  - previews/primer/forms/forms_preview/multi_text_field_form.html.erb
@@ -973,15 +994,11 @@ files:
973
994
  - previews/primer/hellip_button_preview.rb
974
995
  - previews/primer/layout_component_preview.rb
975
996
  - previews/primer/local_time_component_preview.rb
976
- - previews/primer/menu_component_preview.rb
977
- - previews/primer/menu_component_preview/default.html.erb
978
- - previews/primer/menu_component_preview/playground.html.erb
979
- - previews/primer/octicon_component_preview.rb
980
- - previews/primer/spinner_component_preview.rb
981
997
  - previews/primer/state_component_preview.rb
982
998
  - previews/primer/subhead_component_preview.rb
983
999
  - previews/primer/time_ago_component_preview.rb
984
1000
  - previews/primer/timeline_item_component_preview.rb
1001
+ - previews/primer/url_helpers.rb
985
1002
  - static/arguments.json
986
1003
  - static/assets/view-components.svg
987
1004
  - static/audited_at.json
@@ -1 +0,0 @@
1
- {"name":"menu_component","selectors":[".menu",".menu-item",".menu-item:first-child",".menu-item:first-child:before",".menu-item:last-child",".menu-item:last-child:before",".menu-item:hover",".menu-item:active",".menu-item.selected",".menu-item[aria-current]:not([aria-current=false])",".menu-item[aria-selected=true]",":is(.menu-item.selected",".menu-item[aria-current]:not([aria-current=false])):before",".menu-item .octicon",".menu-item .Counter",".menu-item .menu-warning",".menu-item .avatar",".menu-item.alert .Counter",".menu-heading",".menu-heading:hover",".menu-heading:first-child",".menu-heading:last-child"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["menu_component.pcss"],"names":[],"mappings":"AAIA,MAGE,4CAA6C,CAC7C,2EAA6E,CAC7E,mDAAqD,CAHrD,eAAgB,CADhB,iDAKF,CAEA,WAKE,gFAAkF,CADlF,6BAA8B,CAF9B,aAAc,CACd,yHAA4H,CAF5H,iBA+EF,CAzEE,uBACE,YAAa,CAEb,6DAKF,CAHE,qDAHA,4DAKA,CAGF,sBACE,eAAgB,CAChB,gEAMF,CAHE,mDAFA,+DAIA,CAGF,iBAEE,4CAA6C,CAD7C,oBAEF,CAEA,kBACE,2CACF,CAEA,sGAIE,4CAA6C,CAD7C,cAYF,CATE,kHAOE,kDAAmD,CAJnD,QAAS,CAGT,UAAW,CAFX,MAAO,CAHP,iBAAkB,CAClB,KAAM,CAGN,SAGF,CAGF,oBAGE,2BAA4B,CAD5B,iDAAmD,CAEnD,iBAAkB,CAHlB,UAIF,CAEA,oBACE,WAAY,CACZ,+CACF,CAEA,yBAEE,+BAAgC,CADhC,WAEF,CAEA,mBACE,UAAW,CACX,gDACF,CAGE,0BACE,4BACF,CAIJ,cAQE,gFAAkF,CADlF,6BAA8B,CAN9B,aAAc,CAId,iBAAkB,CAClB,gDAAkD,CAFlD,eAAgB,CADhB,YAAa,CADb,yHAsBF,CAdE,oBACE,oBACF,CAEA,0BACE,4DAA8D,CAC9D,6DACF,CAEA,yBACE,eAAgB,CAEhB,+DAAiE,CADjE,gEAEF","file":"menu_component.css","sourcesContent":["/* menu */\n\n/* A menu on the side of a page, defaults to left side. e.g. github.com/about */\n\n.menu {\n margin-bottom: var(--primer-stack-gap-normal, 16px);\n list-style: none;\n background-color: var(--color-canvas-default);\n border: var(--primer-borderWidth-thin, 1px) solid var(--color-border-default);\n border-radius: var(--primer-borderRadius-medium, 6px);\n}\n\n.menu-item {\n position: relative;\n display: block;\n padding: var(--primer-control-medium-paddingInline-condensed, 8px) var(--primer-control-medium-paddingInline-spacious, 16px);\n color: var(--color-fg-default);\n border-bottom: var(--primer-borderWidth-thin, 1px) solid var(--color-border-muted);\n\n &:first-child {\n border-top: 0;\n border-top-left-radius: var(--primer-borderRadius-medium, 6px);\n border-top-right-radius: var(--primer-borderRadius-medium, 6px);\n\n &::before {\n border-top-left-radius: var(--primer-borderRadius-medium, 6px);\n }\n }\n\n &:last-child {\n border-bottom: 0;\n border-bottom-right-radius: var(--primer-borderRadius-medium, 6px);\n border-bottom-left-radius: var(--primer-borderRadius-medium, 6px);\n\n &::before {\n border-bottom-left-radius: var(--primer-borderRadius-medium, 6px);\n }\n }\n\n &:hover {\n text-decoration: none;\n background-color: var(--color-neutral-subtle);\n }\n\n &:active {\n background-color: var(--color-canvas-subtle);\n }\n\n &.selected,\n &[aria-selected='true'],\n &[aria-current]:not([aria-current='false']) {\n cursor: default;\n background-color: var(--color-menu-bg-active);\n\n &::before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 2px;\n content: '';\n background-color: var(--color-primer-border-active);\n }\n }\n\n & .octicon {\n width: 16px;\n margin-right: var(--primer-control-medium-gap, 8px);\n color: var(--color-fg-muted);\n text-align: center;\n }\n\n & .Counter {\n float: right;\n margin-left: var(--primer-control-small-gap, 4px);\n }\n\n & .menu-warning {\n float: right;\n color: var(--color-attention-fg);\n }\n\n & .avatar {\n float: left;\n margin-right: var(--primer-control-small-gap, 4px);\n }\n\n &.alert {\n & .Counter {\n color: var(--color-danger-fg);\n }\n }\n}\n\n.menu-heading {\n display: block;\n padding: var(--primer-control-medium-paddingInline-condensed, 8px) var(--primer-control-medium-paddingInline-spacious, 16px);\n margin-top: 0;\n margin-bottom: 0;\n font-size: inherit;\n font-weight: var(--base-text-weight-semibold, 600);\n color: var(--color-fg-default);\n border-bottom: var(--primer-borderWidth-thin, 1px) solid var(--color-border-muted);\n\n &:hover {\n text-decoration: none;\n }\n\n &:first-child {\n border-top-left-radius: var(--primer-borderRadius-medium, 6px);\n border-top-right-radius: var(--primer-borderRadius-medium, 6px);\n }\n\n &:last-child {\n border-bottom: 0;\n border-bottom-right-radius: var(--primer-borderRadius-medium, 6px);\n border-bottom-left-radius: var(--primer-borderRadius-medium, 6px);\n }\n}\n"]}
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Primer
4
- # @label MenuComponent
5
- class MenuComponentPreview < ViewComponent::Preview
6
- # @label Playground
7
- def playground; end
8
-
9
- # @label Default
10
- def default; end
11
- end
12
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Primer
4
- # @label OcticonComponent
5
- class OcticonComponentPreview < ViewComponent::Preview
6
- # @label Playground
7
- #
8
- # @param aria_label [String]
9
- # @param size [Symbol] select [xsmall, small, medium]
10
- def playground(size: :small, aria_label: nil)
11
- render(Primer::OcticonComponent.new(icon: :people, size: size, "aria-label": aria_label))
12
- end
13
-
14
- # @label Default Options
15
- #
16
- # @param aria_label [String]
17
- # @param size [Symbol] select [xsmall, small, medium]
18
- def default(size: :small, aria_label: nil)
19
- render(Primer::OcticonComponent.new(icon: :people, size: size, "aria-label": aria_label))
20
- end
21
- end
22
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Primer
4
- # @label SpinnerComponent
5
- class SpinnerComponentPreview < ViewComponent::Preview
6
- # @label Playground
7
- #
8
- # @param size [Symbol] select [small, medium, large]
9
- def playground(size: :medium)
10
- render(Primer::SpinnerComponent.new(size: size))
11
- end
12
-
13
- # @label Default Options
14
- #
15
- # @param size [Symbol] select [small, medium, large]
16
- def default(size: :medium)
17
- render(Primer::SpinnerComponent.new(size: size))
18
- end
19
- end
20
- end