primer_view_components 0.0.115 → 0.0.117

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +50 -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 +0 -2
  8. data/app/components/primer/alpha/action_list/heading.rb +0 -2
  9. data/app/components/primer/alpha/action_list/item.rb +0 -2
  10. data/app/components/primer/alpha/action_list.css +1 -1
  11. data/app/components/primer/alpha/action_list.css.json +1 -1
  12. data/app/components/primer/alpha/action_list.css.map +1 -1
  13. data/app/components/primer/alpha/action_list.rb +0 -1
  14. data/app/components/primer/alpha/auto_complete/item.rb +4 -5
  15. data/app/components/primer/alpha/auto_complete.rb +12 -13
  16. data/app/components/primer/alpha/banner.rb +0 -1
  17. data/app/components/primer/alpha/button_marketing.rb +0 -2
  18. data/app/components/primer/alpha/dialog.rb +0 -3
  19. data/app/components/primer/alpha/dropdown/menu.rb +2 -0
  20. data/app/components/primer/alpha/dropdown.html.erb +3 -3
  21. data/app/components/primer/alpha/dropdown.rb +53 -53
  22. data/app/components/primer/alpha/hellip_button.rb +41 -0
  23. data/app/components/primer/alpha/hidden_text_expander.rb +1 -1
  24. data/app/components/primer/alpha/image.rb +0 -1
  25. data/app/components/primer/alpha/layout.rb +49 -49
  26. data/app/components/primer/alpha/menu.css +1 -1
  27. data/app/components/primer/alpha/menu.css.json +1 -1
  28. data/app/components/primer/alpha/menu.css.map +1 -1
  29. data/app/components/primer/alpha/menu.rb +5 -5
  30. data/app/components/primer/alpha/octicon_symbols.rb +0 -2
  31. data/app/components/primer/alpha/segmented_control.css +1 -1
  32. data/app/components/primer/alpha/segmented_control.css.json +1 -1
  33. data/app/components/primer/alpha/segmented_control.css.map +1 -1
  34. data/app/components/primer/alpha/segmented_control.pcss +12 -0
  35. data/app/components/primer/alpha/segmented_control.rb +20 -20
  36. data/app/components/primer/{tab_container_component.d.ts → alpha/tab_container.d.ts} +0 -0
  37. data/app/components/primer/{tab_container_component.js → alpha/tab_container.js} +0 -0
  38. data/app/components/primer/alpha/tab_container.rb +43 -0
  39. data/app/components/primer/{tab_container_component.ts → alpha/tab_container.ts} +0 -0
  40. data/app/components/primer/alpha/tab_nav.css +1 -1
  41. data/app/components/primer/alpha/tab_nav.css.json +1 -1
  42. data/app/components/primer/alpha/tab_nav.css.map +1 -1
  43. data/app/components/primer/alpha/tab_nav.rb +32 -32
  44. data/app/components/primer/alpha/tab_panels.rb +6 -6
  45. data/app/components/primer/alpha/text_field.rb +0 -1
  46. data/app/components/primer/alpha/toggle_switch.rb +6 -8
  47. data/app/components/primer/alpha/tool_tip.js +3 -7
  48. data/app/components/primer/alpha/tool_tip.ts +3 -7
  49. data/app/components/primer/alpha/tooltip.rb +18 -20
  50. data/app/components/primer/alpha/underline_nav.css +1 -1
  51. data/app/components/primer/alpha/underline_nav.css.json +1 -1
  52. data/app/components/primer/alpha/underline_nav.css.map +1 -1
  53. data/app/components/primer/alpha/underline_nav.rb +18 -18
  54. data/app/components/primer/alpha/underline_panels.rb +6 -6
  55. data/app/components/primer/beta/auto_complete/item.rb +2 -2
  56. data/app/components/primer/beta/auto_complete.rb +17 -17
  57. data/app/components/primer/beta/avatar.rb +0 -1
  58. data/app/components/primer/beta/avatar_stack.rb +12 -12
  59. data/app/components/primer/beta/base_button.rb +0 -1
  60. data/app/components/primer/beta/blankslate.rb +42 -42
  61. data/app/components/primer/beta/breadcrumbs.css +1 -1
  62. data/app/components/primer/beta/breadcrumbs.css.json +1 -1
  63. data/app/components/primer/beta/breadcrumbs.css.map +1 -1
  64. data/app/components/primer/beta/button.css +1 -1
  65. data/app/components/primer/beta/button.css.json +1 -1
  66. data/app/components/primer/beta/button.css.map +1 -1
  67. data/app/components/primer/beta/button.pcss +5 -0
  68. data/app/components/primer/beta/button.rb +9 -9
  69. data/app/components/primer/beta/button_group.rb +2 -0
  70. data/app/components/primer/beta/clipboard_copy.rb +0 -1
  71. data/app/components/primer/beta/close_button.rb +0 -1
  72. data/app/components/primer/beta/counter.rb +0 -1
  73. data/app/components/primer/beta/details.rb +5 -3
  74. data/app/components/primer/beta/heading.rb +0 -1
  75. data/app/components/primer/beta/icon_button.rb +0 -1
  76. data/app/components/primer/beta/label.rb +0 -1
  77. data/app/components/primer/beta/link.rb +2 -2
  78. data/app/components/primer/beta/markdown.rb +0 -1
  79. data/app/components/primer/beta/progress_bar.rb +7 -7
  80. data/app/components/primer/beta/relative_time.rb +0 -1
  81. data/app/components/primer/beta/spinner.rb +0 -1
  82. data/app/components/primer/{state_component.css → beta/state.css} +0 -0
  83. data/app/components/primer/beta/state.css.json +1 -0
  84. data/app/components/primer/beta/state.css.map +1 -0
  85. data/app/components/primer/{state_component.pcss → beta/state.pcss} +0 -0
  86. data/app/components/primer/beta/state.rb +76 -0
  87. data/app/components/primer/{subhead_component.css → beta/subhead.css} +0 -0
  88. data/app/components/primer/beta/subhead.css.json +1 -0
  89. data/app/components/primer/beta/subhead.css.map +1 -0
  90. data/app/components/primer/{subhead_component.html.erb → beta/subhead.html.erb} +0 -0
  91. data/app/components/primer/{subhead_component.pcss → beta/subhead.pcss} +0 -0
  92. data/app/components/primer/beta/subhead.rb +135 -0
  93. data/app/components/primer/beta/text.rb +0 -1
  94. data/app/components/primer/{timeline_item_component.css → beta/timeline_item.css} +0 -0
  95. data/app/components/primer/beta/timeline_item.css.json +1 -0
  96. data/app/components/primer/beta/timeline_item.css.map +1 -0
  97. data/app/components/primer/{timeline_item_component.html.erb → beta/timeline_item.html.erb} +0 -0
  98. data/app/components/primer/{timeline_item_component.pcss → beta/timeline_item.pcss} +0 -0
  99. data/app/components/primer/beta/timeline_item.rb +90 -0
  100. data/app/components/primer/beta/truncate.css +1 -1
  101. data/app/components/primer/beta/truncate.css.json +1 -1
  102. data/app/components/primer/beta/truncate.css.map +1 -1
  103. data/app/components/primer/beta/truncate.rb +2 -2
  104. data/app/components/primer/box.rb +0 -1
  105. data/app/components/primer/button_component.rb +11 -11
  106. data/app/components/primer/conditional_wrapper.rb +0 -2
  107. data/app/components/primer/dropdown_menu_component.rb +3 -3
  108. data/app/components/primer/hellip_button.rb +2 -36
  109. data/app/components/primer/icon_button.rb +0 -1
  110. data/app/components/primer/layout_component.rb +0 -2
  111. data/app/components/primer/local_time.rb +0 -1
  112. data/app/components/primer/navigation/tab_component.rb +16 -16
  113. data/app/components/primer/octicon_component.rb +0 -1
  114. data/app/components/primer/primer.d.ts +1 -1
  115. data/app/components/primer/primer.js +1 -1
  116. data/app/components/primer/primer.pcss +3 -3
  117. data/app/components/primer/primer.ts +1 -1
  118. data/app/components/primer/state_component.rb +2 -70
  119. data/app/components/primer/subhead_component.rb +2 -130
  120. data/app/components/primer/tab_container_component.rb +2 -38
  121. data/app/components/primer/time_ago_component.rb +0 -1
  122. data/app/components/primer/timeline_item_component.rb +5 -79
  123. data/app/components/primer/tooltip.rb +0 -1
  124. data/app/components/primer/truncate.rb +0 -2
  125. data/app/forms/example_toggle_switch_form/example_field_caption.html.erb +1 -0
  126. data/app/forms/example_toggle_switch_form.rb +8 -0
  127. data/app/forms/submit_button_form.rb +4 -4
  128. data/app/lib/primer/tabbed_component_helper.rb +1 -1
  129. data/lib/primer/deprecations.rb +7 -13
  130. data/lib/primer/deprecations.yml +24 -0
  131. data/lib/primer/forms/builder.rb +2 -3
  132. data/lib/primer/forms/button.html.erb +2 -2
  133. data/lib/primer/forms/dsl/form_reference_input.rb +25 -2
  134. data/lib/primer/forms/dsl/input.rb +27 -0
  135. data/lib/primer/forms/dsl/toggle_switch_input.rb +35 -0
  136. data/lib/primer/forms/form_reference.html.erb +1 -1
  137. data/lib/primer/forms/form_reference.rb +4 -0
  138. data/lib/primer/forms/toggle_switch.html.erb +17 -0
  139. data/lib/primer/forms/toggle_switch.rb +19 -0
  140. data/lib/primer/forms/toggle_switch_form.rb +74 -0
  141. data/lib/primer/view_components/linters/subhead_component_migration_counter.rb +1 -1
  142. data/lib/primer/view_components/version.rb +1 -1
  143. data/lib/rubocop/cop/primer/component_name_migration.rb +2 -1
  144. data/lib/tasks/docs.rake +6 -6
  145. data/previews/primer/alpha/action_list_preview.rb +44 -44
  146. data/previews/primer/alpha/dropdown_preview.rb +97 -97
  147. data/previews/primer/alpha/hellip_button_preview.rb +24 -0
  148. data/previews/primer/alpha/layout_preview.rb +63 -63
  149. data/previews/primer/alpha/menu_preview/default.html.erb +5 -5
  150. data/previews/primer/alpha/menu_preview/playground.html.erb +5 -5
  151. data/previews/primer/alpha/segmented_control_preview.rb +60 -60
  152. data/previews/primer/alpha/tab_nav_preview.rb +22 -22
  153. data/previews/primer/alpha/tab_panels_preview.rb +8 -8
  154. data/previews/primer/alpha/tooltip_preview/with_multiple_on_a_page.html.erb +6 -6
  155. data/previews/primer/alpha/tooltip_preview.rb +12 -12
  156. data/previews/primer/alpha/underline_nav_preview.rb +4 -4
  157. data/previews/primer/alpha/underline_panels_preview.rb +8 -8
  158. data/previews/primer/beta/auto_complete_item_preview/default.html.erb +2 -2
  159. data/previews/primer/beta/auto_complete_item_preview/playground.html.erb +2 -2
  160. data/previews/primer/beta/auto_complete_item_preview/with_description.html.erb +3 -3
  161. data/previews/primer/beta/auto_complete_preview/with_submit_button.html.erb +2 -2
  162. data/previews/primer/beta/auto_complete_preview.rb +18 -18
  163. data/previews/primer/beta/avatar_stack_preview.rb +32 -32
  164. data/previews/primer/beta/blankslate_preview.rb +40 -40
  165. data/previews/primer/beta/border_box_preview.rb +38 -38
  166. data/previews/primer/beta/breadcrumbs_preview.rb +2 -2
  167. data/previews/primer/beta/button_group_preview.rb +10 -10
  168. data/previews/primer/beta/button_preview/all_schemes.html.erb +4 -4
  169. data/previews/primer/beta/button_preview/invisible_all_visuals.html.erb +16 -16
  170. data/previews/primer/beta/button_preview/leading_visual.html.erb +2 -2
  171. data/previews/primer/beta/button_preview/trailing_action.html.erb +2 -2
  172. data/previews/primer/beta/button_preview/trailing_visual.html.erb +2 -2
  173. data/previews/primer/beta/button_preview/with_tooltip.html.erb +2 -2
  174. data/previews/primer/beta/details_preview.rb +12 -12
  175. data/previews/primer/beta/state_preview.rb +66 -0
  176. data/previews/primer/beta/subhead_preview/actions.html.erb +14 -0
  177. data/previews/primer/beta/subhead_preview.rb +99 -0
  178. data/previews/primer/beta/timeline_item_preview.rb +30 -0
  179. data/previews/primer/forms/forms_preview/example_toggle_switch_form.html.erb +1 -0
  180. data/previews/primer/forms/forms_preview.rb +2 -0
  181. data/previews/primer/local_time_component_preview.rb +3 -0
  182. data/previews/primer/time_ago_component_preview.rb +3 -0
  183. data/previews/primer/url_helpers.rb +2 -2
  184. data/static/arguments.json +118 -118
  185. data/static/audited_at.json +6 -0
  186. data/static/constants.json +67 -54
  187. data/static/statuses.json +12 -6
  188. metadata +36 -23
  189. data/app/components/primer/state_component.css.json +0 -1
  190. data/app/components/primer/state_component.css.map +0 -1
  191. data/app/components/primer/subhead_component.css.json +0 -1
  192. data/app/components/primer/subhead_component.css.map +0 -1
  193. data/app/components/primer/timeline_item_component.css.json +0 -1
  194. data/app/components/primer/timeline_item_component.css.map +0 -1
  195. data/previews/primer/hellip_button_preview.rb +0 -22
  196. data/previews/primer/state_component_preview.rb +0 -26
  197. data/previews/primer/subhead_component_preview.rb +0 -40
  198. data/previews/primer/timeline_item_component_preview.rb +0 -28
@@ -381,6 +381,26 @@
381
381
  }
382
382
  ]
383
383
  },
384
+ {
385
+ "component": "HellipButton",
386
+ "status": "alpha",
387
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/hellip_button.rb",
388
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/hellip_button_preview/default/",
389
+ "parameters": [
390
+ {
391
+ "name": "inline",
392
+ "type": "Boolean",
393
+ "default": "`false`",
394
+ "description": "Whether or not the button is inline."
395
+ },
396
+ {
397
+ "name": "system_arguments",
398
+ "type": "Hash",
399
+ "default": "N/A",
400
+ "description": "[System arguments](/system-arguments)"
401
+ }
402
+ ]
403
+ },
384
404
  {
385
405
  "component": "HiddenTextExpander",
386
406
  "status": "alpha",
@@ -635,6 +655,20 @@
635
655
  }
636
656
  ]
637
657
  },
658
+ {
659
+ "component": "TabContainer",
660
+ "status": "alpha",
661
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/tab_container.rb",
662
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/tab_container_preview/default/",
663
+ "parameters": [
664
+ {
665
+ "name": "system_arguments",
666
+ "type": "Hash",
667
+ "default": "N/A",
668
+ "description": "[System arguments](/system-arguments)"
669
+ }
670
+ ]
671
+ },
638
672
  {
639
673
  "component": "TabNav",
640
674
  "status": "alpha",
@@ -1997,6 +2031,70 @@
1997
2031
  }
1998
2032
  ]
1999
2033
  },
2034
+ {
2035
+ "component": "State",
2036
+ "status": "beta",
2037
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/state.rb",
2038
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/state_preview/default/",
2039
+ "parameters": [
2040
+ {
2041
+ "name": "title",
2042
+ "type": "String",
2043
+ "default": "N/A",
2044
+ "description": "`title` HTML attribute."
2045
+ },
2046
+ {
2047
+ "name": "scheme",
2048
+ "type": "Symbol",
2049
+ "default": "`:default`",
2050
+ "description": "Background color. One of `:closed`, `:default`, `:green`, `:merged`, `:open`, `:purple`, or `:red`."
2051
+ },
2052
+ {
2053
+ "name": "tag",
2054
+ "type": "Symbol",
2055
+ "default": "`:span`",
2056
+ "description": "HTML tag for element. One of `:div` or `:span`."
2057
+ },
2058
+ {
2059
+ "name": "size",
2060
+ "type": "Symbol",
2061
+ "default": "`:default`",
2062
+ "description": "One of `:default` or `:small`."
2063
+ },
2064
+ {
2065
+ "name": "system_arguments",
2066
+ "type": "Hash",
2067
+ "default": "N/A",
2068
+ "description": "[System arguments](/system-arguments)"
2069
+ }
2070
+ ]
2071
+ },
2072
+ {
2073
+ "component": "Subhead",
2074
+ "status": "beta",
2075
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/subhead.rb",
2076
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/subhead_preview/default/",
2077
+ "parameters": [
2078
+ {
2079
+ "name": "spacious",
2080
+ "type": "Boolean",
2081
+ "default": "`false`",
2082
+ "description": "Whether to add spacing to the Subhead."
2083
+ },
2084
+ {
2085
+ "name": "hide_border",
2086
+ "type": "Boolean",
2087
+ "default": "`false`",
2088
+ "description": "Whether to hide the border under the heading."
2089
+ },
2090
+ {
2091
+ "name": "system_arguments",
2092
+ "type": "Hash",
2093
+ "default": "N/A",
2094
+ "description": "[System arguments](/system-arguments)"
2095
+ }
2096
+ ]
2097
+ },
2000
2098
  {
2001
2099
  "component": "Text",
2002
2100
  "status": "beta",
@@ -2017,6 +2115,26 @@
2017
2115
  }
2018
2116
  ]
2019
2117
  },
2118
+ {
2119
+ "component": "TimelineItem",
2120
+ "status": "beta",
2121
+ "source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/timeline_item.rb",
2122
+ "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/timeline_item_preview/default/",
2123
+ "parameters": [
2124
+ {
2125
+ "name": "condensed",
2126
+ "type": "Boolean",
2127
+ "default": "`false`",
2128
+ "description": "Reduce the vertical padding and remove the background from the badge item. Most commonly used in commits."
2129
+ },
2130
+ {
2131
+ "name": "system_arguments",
2132
+ "type": "Hash",
2133
+ "default": "N/A",
2134
+ "description": "[System arguments](/system-arguments)"
2135
+ }
2136
+ ]
2137
+ },
2020
2138
  {
2021
2139
  "component": "Truncate",
2022
2140
  "status": "beta",
@@ -2139,26 +2257,6 @@
2139
2257
  }
2140
2258
  ]
2141
2259
  },
2142
- {
2143
- "component": "HellipButton",
2144
- "status": "alpha",
2145
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/hellip_button.rb",
2146
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/hellip_button_preview/default/",
2147
- "parameters": [
2148
- {
2149
- "name": "inline",
2150
- "type": "Boolean",
2151
- "default": "`false`",
2152
- "description": "Whether or not the button is inline."
2153
- },
2154
- {
2155
- "name": "system_arguments",
2156
- "type": "Hash",
2157
- "default": "N/A",
2158
- "description": "[System arguments](/system-arguments)"
2159
- }
2160
- ]
2161
- },
2162
2260
  {
2163
2261
  "component": "IconButton",
2164
2262
  "status": "deprecated",
@@ -2377,84 +2475,6 @@
2377
2475
  }
2378
2476
  ]
2379
2477
  },
2380
- {
2381
- "component": "State",
2382
- "status": "beta",
2383
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/state_component.rb",
2384
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/state_preview/default/",
2385
- "parameters": [
2386
- {
2387
- "name": "title",
2388
- "type": "String",
2389
- "default": "N/A",
2390
- "description": "`title` HTML attribute."
2391
- },
2392
- {
2393
- "name": "scheme",
2394
- "type": "Symbol",
2395
- "default": "`:default`",
2396
- "description": "Background color. One of `:closed`, `:default`, `:green`, `:merged`, `:open`, `:purple`, or `:red`."
2397
- },
2398
- {
2399
- "name": "tag",
2400
- "type": "Symbol",
2401
- "default": "`:span`",
2402
- "description": "HTML tag for element. One of `:div` or `:span`."
2403
- },
2404
- {
2405
- "name": "size",
2406
- "type": "Symbol",
2407
- "default": "`:default`",
2408
- "description": "One of `:default` or `:small`."
2409
- },
2410
- {
2411
- "name": "system_arguments",
2412
- "type": "Hash",
2413
- "default": "N/A",
2414
- "description": "[System arguments](/system-arguments)"
2415
- }
2416
- ]
2417
- },
2418
- {
2419
- "component": "Subhead",
2420
- "status": "beta",
2421
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/subhead_component.rb",
2422
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/subhead_preview/default/",
2423
- "parameters": [
2424
- {
2425
- "name": "spacious",
2426
- "type": "Boolean",
2427
- "default": "`false`",
2428
- "description": "Whether to add spacing to the Subhead."
2429
- },
2430
- {
2431
- "name": "hide_border",
2432
- "type": "Boolean",
2433
- "default": "`false`",
2434
- "description": "Whether to hide the border under the heading."
2435
- },
2436
- {
2437
- "name": "system_arguments",
2438
- "type": "Hash",
2439
- "default": "N/A",
2440
- "description": "[System arguments](/system-arguments)"
2441
- }
2442
- ]
2443
- },
2444
- {
2445
- "component": "TabContainer",
2446
- "status": "alpha",
2447
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/tab_container_component.rb",
2448
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/tab_container_preview/default/",
2449
- "parameters": [
2450
- {
2451
- "name": "system_arguments",
2452
- "type": "Hash",
2453
- "default": "N/A",
2454
- "description": "[System arguments](/system-arguments)"
2455
- }
2456
- ]
2457
- },
2458
2478
  {
2459
2479
  "component": "TimeAgo",
2460
2480
  "status": "deprecated",
@@ -2481,26 +2501,6 @@
2481
2501
  }
2482
2502
  ]
2483
2503
  },
2484
- {
2485
- "component": "TimelineItem",
2486
- "status": "beta",
2487
- "source": "https://github.com/primer/view_components/tree/main/app/components/primer/timeline_item_component.rb",
2488
- "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/timeline_item_preview/default/",
2489
- "parameters": [
2490
- {
2491
- "name": "condensed",
2492
- "type": "Boolean",
2493
- "default": "`false`",
2494
- "description": "Reduce the vertical padding and remove the background from the badge item. Most commonly used in commits."
2495
- },
2496
- {
2497
- "name": "system_arguments",
2498
- "type": "Hash",
2499
- "default": "N/A",
2500
- "description": "[System arguments](/system-arguments)"
2501
- }
2502
- ]
2503
- },
2504
2504
  {
2505
2505
  "component": "Tooltip",
2506
2506
  "status": "deprecated",
@@ -14,6 +14,7 @@
14
14
  "Primer::Alpha::Dropdown": "",
15
15
  "Primer::Alpha::Dropdown::Menu": "",
16
16
  "Primer::Alpha::Dropdown::Menu::Item": "",
17
+ "Primer::Alpha::HellipButton": "",
17
18
  "Primer::Alpha::HiddenTextExpander": "",
18
19
  "Primer::Alpha::Image": "",
19
20
  "Primer::Alpha::ImageCrop": "",
@@ -27,6 +28,7 @@
27
28
  "Primer::Alpha::OcticonSymbols": "",
28
29
  "Primer::Alpha::SegmentedControl": "",
29
30
  "Primer::Alpha::SegmentedControl::Item": "",
31
+ "Primer::Alpha::TabContainer": "",
30
32
  "Primer::Alpha::TabNav": "",
31
33
  "Primer::Alpha::TabPanels": "",
32
34
  "Primer::Alpha::TextField": "",
@@ -62,7 +64,11 @@
62
64
  "Primer::Beta::ProgressBar": "",
63
65
  "Primer::Beta::RelativeTime": "",
64
66
  "Primer::Beta::Spinner": "",
67
+ "Primer::Beta::State": "",
68
+ "Primer::Beta::Subhead": "",
65
69
  "Primer::Beta::Text": "",
70
+ "Primer::Beta::TimelineItem": "",
71
+ "Primer::Beta::TimelineItem::Badge": "",
66
72
  "Primer::Beta::Truncate": "",
67
73
  "Primer::Beta::Truncate::TruncateText": "",
68
74
  "Primer::BlankslateComponent": "",
@@ -216,6 +216,8 @@
216
216
  "summary"
217
217
  ]
218
218
  },
219
+ "Primer::Alpha::HellipButton": {
220
+ },
219
221
  "Primer::Alpha::HiddenTextExpander": {
220
222
  },
221
223
  "Primer::Alpha::Image": {
@@ -328,6 +330,8 @@
328
330
  },
329
331
  "Primer::Alpha::SegmentedControl::Item": {
330
332
  },
333
+ "Primer::Alpha::TabContainer": {
334
+ },
331
335
  "Primer::Alpha::TabNav": {
332
336
  "BODY_TAG_DEFAULT": "ul",
333
337
  "TAG_DEFAULT": "nav",
@@ -912,9 +916,72 @@
912
916
  "large"
913
917
  ]
914
918
  },
919
+ "Primer::Beta::State": {
920
+ "DEPRECATED_SCHEME_MAPPINGS": {
921
+ "default": "",
922
+ "green": "State--open",
923
+ "red": "State--closed",
924
+ "purple": "State--merged"
925
+ },
926
+ "NEW_SCHEME_MAPPINGS": {
927
+ "open": "State--open",
928
+ "closed": "State--closed",
929
+ "merged": "State--merged"
930
+ },
931
+ "SCHEME_DEFAULT": "default",
932
+ "SCHEME_MAPPINGS": {
933
+ "open": "State--open",
934
+ "closed": "State--closed",
935
+ "merged": "State--merged",
936
+ "default": "",
937
+ "green": "State--open",
938
+ "red": "State--closed",
939
+ "purple": "State--merged"
940
+ },
941
+ "SCHEME_OPTIONS": [
942
+ "open",
943
+ "closed",
944
+ "merged",
945
+ "default",
946
+ "green",
947
+ "red",
948
+ "purple"
949
+ ],
950
+ "SIZE_DEFAULT": "default",
951
+ "SIZE_MAPPINGS": {
952
+ "default": "",
953
+ "small": "State--small"
954
+ },
955
+ "SIZE_OPTIONS": [
956
+ "default",
957
+ "small"
958
+ ],
959
+ "TAG_DEFAULT": "span",
960
+ "TAG_OPTIONS": [
961
+ "span",
962
+ "div"
963
+ ]
964
+ },
965
+ "Primer::Beta::Subhead": {
966
+ "DEFAULT_HEADING_TAG": "div",
967
+ "HEADING_TAG_OPTIONS": [
968
+ "div",
969
+ "h1",
970
+ "h2",
971
+ "h3",
972
+ "h4",
973
+ "h5",
974
+ "h6"
975
+ ]
976
+ },
915
977
  "Primer::Beta::Text": {
916
978
  "DEFAULT_TAG": "span"
917
979
  },
980
+ "Primer::Beta::TimelineItem": {
981
+ "Badge": "Primer::Beta::TimelineItem::Badge"
982
+ },
983
+ "Primer::Beta::TimelineItem::Badge": {
984
+ },
918
985
  "Primer::Beta::Truncate": {
919
986
  "TruncateText": "Primer::Beta::Truncate::TruncateText"
920
987
  },
@@ -1056,62 +1123,8 @@
1056
1123
  "Primer::SpinnerComponent": {
1057
1124
  },
1058
1125
  "Primer::StateComponent": {
1059
- "DEPRECATED_SCHEME_MAPPINGS": {
1060
- "default": "",
1061
- "green": "State--open",
1062
- "red": "State--closed",
1063
- "purple": "State--merged"
1064
- },
1065
- "NEW_SCHEME_MAPPINGS": {
1066
- "open": "State--open",
1067
- "closed": "State--closed",
1068
- "merged": "State--merged"
1069
- },
1070
- "SCHEME_DEFAULT": "default",
1071
- "SCHEME_MAPPINGS": {
1072
- "open": "State--open",
1073
- "closed": "State--closed",
1074
- "merged": "State--merged",
1075
- "default": "",
1076
- "green": "State--open",
1077
- "red": "State--closed",
1078
- "purple": "State--merged"
1079
- },
1080
- "SCHEME_OPTIONS": [
1081
- "open",
1082
- "closed",
1083
- "merged",
1084
- "default",
1085
- "green",
1086
- "red",
1087
- "purple"
1088
- ],
1089
- "SIZE_DEFAULT": "default",
1090
- "SIZE_MAPPINGS": {
1091
- "default": "",
1092
- "small": "State--small"
1093
- },
1094
- "SIZE_OPTIONS": [
1095
- "default",
1096
- "small"
1097
- ],
1098
- "TAG_DEFAULT": "span",
1099
- "TAG_OPTIONS": [
1100
- "span",
1101
- "div"
1102
- ]
1103
1126
  },
1104
1127
  "Primer::SubheadComponent": {
1105
- "DEFAULT_HEADING_TAG": "div",
1106
- "HEADING_TAG_OPTIONS": [
1107
- "div",
1108
- "h1",
1109
- "h2",
1110
- "h3",
1111
- "h4",
1112
- "h5",
1113
- "h6"
1114
- ]
1115
1128
  },
1116
1129
  "Primer::TabContainerComponent": {
1117
1130
  },
data/static/statuses.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "Primer::Alpha::Dropdown": "alpha",
15
15
  "Primer::Alpha::Dropdown::Menu": "alpha",
16
16
  "Primer::Alpha::Dropdown::Menu::Item": "alpha",
17
+ "Primer::Alpha::HellipButton": "alpha",
17
18
  "Primer::Alpha::HiddenTextExpander": "alpha",
18
19
  "Primer::Alpha::Image": "alpha",
19
20
  "Primer::Alpha::ImageCrop": "alpha",
@@ -27,6 +28,7 @@
27
28
  "Primer::Alpha::OcticonSymbols": "alpha",
28
29
  "Primer::Alpha::SegmentedControl": "alpha",
29
30
  "Primer::Alpha::SegmentedControl::Item": "alpha",
31
+ "Primer::Alpha::TabContainer": "alpha",
30
32
  "Primer::Alpha::TabNav": "alpha",
31
33
  "Primer::Alpha::TabPanels": "alpha",
32
34
  "Primer::Alpha::TextField": "alpha",
@@ -62,7 +64,11 @@
62
64
  "Primer::Beta::ProgressBar": "beta",
63
65
  "Primer::Beta::RelativeTime": "beta",
64
66
  "Primer::Beta::Spinner": "beta",
67
+ "Primer::Beta::State": "beta",
68
+ "Primer::Beta::Subhead": "beta",
65
69
  "Primer::Beta::Text": "beta",
70
+ "Primer::Beta::TimelineItem": "beta",
71
+ "Primer::Beta::TimelineItem::Badge": "beta",
66
72
  "Primer::Beta::Truncate": "beta",
67
73
  "Primer::Beta::Truncate::TruncateText": "alpha",
68
74
  "Primer::BlankslateComponent": "deprecated",
@@ -76,7 +82,7 @@
76
82
  "Primer::Dropdown::Menu": "deprecated",
77
83
  "Primer::Dropdown::Menu::Item": "deprecated",
78
84
  "Primer::DropdownMenuComponent": "deprecated",
79
- "Primer::HellipButton": "alpha",
85
+ "Primer::HellipButton": "deprecated",
80
86
  "Primer::IconButton": "deprecated",
81
87
  "Primer::LabelComponent": "deprecated",
82
88
  "Primer::LayoutComponent": "alpha",
@@ -89,12 +95,12 @@
89
95
  "Primer::OcticonSymbolsComponent": "deprecated",
90
96
  "Primer::PopoverComponent": "deprecated",
91
97
  "Primer::SpinnerComponent": "deprecated",
92
- "Primer::StateComponent": "beta",
93
- "Primer::SubheadComponent": "beta",
94
- "Primer::TabContainerComponent": "alpha",
98
+ "Primer::StateComponent": "deprecated",
99
+ "Primer::SubheadComponent": "deprecated",
100
+ "Primer::TabContainerComponent": "deprecated",
95
101
  "Primer::TimeAgoComponent": "deprecated",
96
- "Primer::TimelineItemComponent": "beta",
97
- "Primer::TimelineItemComponent::BadgeComponent": "alpha",
102
+ "Primer::TimelineItemComponent": "deprecated",
103
+ "Primer::TimelineItemComponent::BadgeComponent": "deprecated",
98
104
  "Primer::Tooltip": "deprecated",
99
105
  "Primer::Truncate": "beta"
100
106
  }
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.115
4
+ version: 0.0.117
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-13 00:00:00.000000000 Z
11
+ date: 2022-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -461,6 +461,7 @@ files:
461
461
  - app/components/primer/alpha/dropdown/menu.js
462
462
  - app/components/primer/alpha/dropdown/menu.rb
463
463
  - app/components/primer/alpha/dropdown/menu.ts
464
+ - app/components/primer/alpha/hellip_button.rb
464
465
  - app/components/primer/alpha/hidden_text_expander.rb
465
466
  - app/components/primer/alpha/image.rb
466
467
  - app/components/primer/alpha/image_crop.d.ts
@@ -505,6 +506,10 @@ files:
505
506
  - app/components/primer/alpha/segmented_control.ts
506
507
  - app/components/primer/alpha/segmented_control/item.html.erb
507
508
  - app/components/primer/alpha/segmented_control/item.rb
509
+ - app/components/primer/alpha/tab_container.d.ts
510
+ - app/components/primer/alpha/tab_container.js
511
+ - app/components/primer/alpha/tab_container.rb
512
+ - app/components/primer/alpha/tab_container.ts
508
513
  - app/components/primer/alpha/tab_nav.css
509
514
  - app/components/primer/alpha/tab_nav.css.json
510
515
  - app/components/primer/alpha/tab_nav.css.map
@@ -640,7 +645,24 @@ files:
640
645
  - app/components/primer/beta/relative_time.rb
641
646
  - app/components/primer/beta/spinner.html.erb
642
647
  - app/components/primer/beta/spinner.rb
648
+ - app/components/primer/beta/state.css
649
+ - app/components/primer/beta/state.css.json
650
+ - app/components/primer/beta/state.css.map
651
+ - app/components/primer/beta/state.pcss
652
+ - app/components/primer/beta/state.rb
653
+ - app/components/primer/beta/subhead.css
654
+ - app/components/primer/beta/subhead.css.json
655
+ - app/components/primer/beta/subhead.css.map
656
+ - app/components/primer/beta/subhead.html.erb
657
+ - app/components/primer/beta/subhead.pcss
658
+ - app/components/primer/beta/subhead.rb
643
659
  - app/components/primer/beta/text.rb
660
+ - app/components/primer/beta/timeline_item.css
661
+ - app/components/primer/beta/timeline_item.css.json
662
+ - app/components/primer/beta/timeline_item.css.map
663
+ - app/components/primer/beta/timeline_item.html.erb
664
+ - app/components/primer/beta/timeline_item.pcss
665
+ - app/components/primer/beta/timeline_item.rb
644
666
  - app/components/primer/beta/truncate.css
645
667
  - app/components/primer/beta/truncate.css.json
646
668
  - app/components/primer/beta/truncate.css.map
@@ -684,30 +706,13 @@ files:
684
706
  - app/components/primer/primer.pcss
685
707
  - app/components/primer/primer.ts
686
708
  - app/components/primer/spinner_component.rb
687
- - app/components/primer/state_component.css
688
- - app/components/primer/state_component.css.json
689
- - app/components/primer/state_component.css.map
690
- - app/components/primer/state_component.pcss
691
709
  - app/components/primer/state_component.rb
692
- - app/components/primer/subhead_component.css
693
- - app/components/primer/subhead_component.css.json
694
- - app/components/primer/subhead_component.css.map
695
- - app/components/primer/subhead_component.html.erb
696
- - app/components/primer/subhead_component.pcss
697
710
  - app/components/primer/subhead_component.rb
698
- - app/components/primer/tab_container_component.d.ts
699
- - app/components/primer/tab_container_component.js
700
711
  - app/components/primer/tab_container_component.rb
701
- - app/components/primer/tab_container_component.ts
702
712
  - app/components/primer/time_ago_component.d.ts
703
713
  - app/components/primer/time_ago_component.js
704
714
  - app/components/primer/time_ago_component.rb
705
715
  - app/components/primer/time_ago_component.ts
706
- - app/components/primer/timeline_item_component.css
707
- - app/components/primer/timeline_item_component.css.json
708
- - app/components/primer/timeline_item_component.css.map
709
- - app/components/primer/timeline_item_component.html.erb
710
- - app/components/primer/timeline_item_component.pcss
711
716
  - app/components/primer/timeline_item_component.rb
712
717
  - app/components/primer/tooltip.rb
713
718
  - app/components/primer/truncate.css
@@ -730,6 +735,8 @@ files:
730
735
  - app/forms/check_box_group_form.rb
731
736
  - app/forms/check_box_with_nested_form.rb
732
737
  - app/forms/composed_form.rb
738
+ - app/forms/example_toggle_switch_form.rb
739
+ - app/forms/example_toggle_switch_form/example_field_caption.html.erb
733
740
  - app/forms/first_name_form.rb
734
741
  - app/forms/horizontal_form.rb
735
742
  - app/forms/immediate_validation_form.rb
@@ -806,6 +813,7 @@ files:
806
813
  - lib/primer/forms/dsl/submit_button_input.rb
807
814
  - lib/primer/forms/dsl/text_area_input.rb
808
815
  - lib/primer/forms/dsl/text_field_input.rb
816
+ - lib/primer/forms/dsl/toggle_switch_input.rb
809
817
  - lib/primer/forms/form_control.html.erb
810
818
  - lib/primer/forms/form_control.rb
811
819
  - lib/primer/forms/form_list.html.erb
@@ -840,6 +848,9 @@ files:
840
848
  - lib/primer/forms/text_area.rb
841
849
  - lib/primer/forms/text_field.html.erb
842
850
  - lib/primer/forms/text_field.rb
851
+ - lib/primer/forms/toggle_switch.html.erb
852
+ - lib/primer/forms/toggle_switch.rb
853
+ - lib/primer/forms/toggle_switch_form.rb
843
854
  - lib/primer/forms/utils.rb
844
855
  - lib/primer/view_components.rb
845
856
  - lib/primer/view_components/audited.rb
@@ -915,6 +926,7 @@ files:
915
926
  - previews/primer/alpha/dialog_preview/with_footer.html.erb
916
927
  - previews/primer/alpha/dialog_preview/with_form.html.erb
917
928
  - previews/primer/alpha/dropdown_preview.rb
929
+ - previews/primer/alpha/hellip_button_preview.rb
918
930
  - previews/primer/alpha/hidden_text_expander_preview.rb
919
931
  - previews/primer/alpha/image_crop_preview.rb
920
932
  - previews/primer/alpha/layout_preview.rb
@@ -970,7 +982,11 @@ files:
970
982
  - previews/primer/beta/progress_bar_preview.rb
971
983
  - previews/primer/beta/relative_time_preview.rb
972
984
  - previews/primer/beta/spinner_preview.rb
985
+ - previews/primer/beta/state_preview.rb
986
+ - previews/primer/beta/subhead_preview.rb
987
+ - previews/primer/beta/subhead_preview/actions.html.erb
973
988
  - previews/primer/beta/text_preview.rb
989
+ - previews/primer/beta/timeline_item_preview.rb
974
990
  - previews/primer/beta/truncate_preview.rb
975
991
  - previews/primer/forms/forms_preview.rb
976
992
  - previews/primer/forms/forms_preview/after_content_form.html.erb
@@ -979,6 +995,7 @@ files:
979
995
  - previews/primer/forms/forms_preview/check_box_group_form.html.erb
980
996
  - previews/primer/forms/forms_preview/check_box_with_nested_form.html.erb
981
997
  - previews/primer/forms/forms_preview/composed_form.html.erb
998
+ - previews/primer/forms/forms_preview/example_toggle_switch_form.html.erb
982
999
  - previews/primer/forms/forms_preview/horizontal_form.html.erb
983
1000
  - previews/primer/forms/forms_preview/immediate_validation_form.html.erb
984
1001
  - previews/primer/forms/forms_preview/invalid_form.html.erb
@@ -991,13 +1008,9 @@ files:
991
1008
  - previews/primer/forms/forms_preview/single_text_field_form.html.erb
992
1009
  - previews/primer/forms/forms_preview/submit_button_form.html.erb
993
1010
  - previews/primer/forms/forms_preview/text_field_and_checkbox_form.html.erb
994
- - previews/primer/hellip_button_preview.rb
995
1011
  - previews/primer/layout_component_preview.rb
996
1012
  - previews/primer/local_time_component_preview.rb
997
- - previews/primer/state_component_preview.rb
998
- - previews/primer/subhead_component_preview.rb
999
1013
  - previews/primer/time_ago_component_preview.rb
1000
- - previews/primer/timeline_item_component_preview.rb
1001
1014
  - previews/primer/url_helpers.rb
1002
1015
  - static/arguments.json
1003
1016
  - static/assets/view-components.svg
@@ -1 +0,0 @@
1
- {"name":"state_component","selectors":[".State",".state",".State--draft",".State--open",".State--merged",".State--closed",".State--small",".State--small .octicon"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["state_component.pcss"],"names":[],"mappings":"AAIA,cASE,iBAAkB,CAPlB,oBAAqB,CAErB,kDAAoD,CACpD,8CAAgD,CAChD,2DAA6D,CAH7D,kEAAoE,CAIpE,iBAAkB,CAClB,kBAEF,CAEA,4BAIE,8CAA+C,CAC/C,qDAA6D,CAF7D,iCAGF,CAEA,aAEE,2CACF,CAEA,4BAJE,iCAOF,CAHA,eAEE,2CACF,CAEA,eAEE,6CAA8C,CAD9C,iCAEF,CAIA,cAEE,iDAAmD,CACnD,oCAAsC,CAFtC,cAOF,CAHE,uBACE,SACF","file":"state_component.css","sourcesContent":["/* State */\n\n/* Default 32px */\n\n.state, /* TODO: Deprecate */\n.State {\n display: inline-block;\n padding: 5px var(--primer-control-medium-paddingInline-normal, 12px);\n font-size: var(--primer-text-body-size-medium, 14px);\n font-weight: var(--base-text-weight-medium, 500);\n line-height: var(--primer-control-medium-lineBoxHeight, 20px);\n text-align: center;\n white-space: nowrap;\n border-radius: 2em;\n}\n\n.state, /* TODO: Deprecate */\n.State,\n.State--draft {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-neutral-emphasis);\n border: var(--primer-borderWidth-thin, 1px) solid transparent;\n}\n\n.State--open {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-open-emphasis);\n}\n\n.State--merged {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-done-emphasis);\n}\n\n.State--closed {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-closed-emphasis);\n}\n\n/* Small 24px */\n\n.State--small {\n padding: 0 10px;\n font-size: var(--primer-text-body-size-small, 12px);\n line-height: var(--base-size-24, 24px);\n\n & .octicon {\n width: 1em; /* Ensures different icons don't change State indicator width */\n }\n}\n"]}