primer_view_components 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/app/assets/javascripts/primer_view_components.js +2 -0
  4. data/app/assets/javascripts/primer_view_components.js.map +1 -0
  5. data/app/components/primer/avatar_component.rb +3 -3
  6. data/app/components/primer/avatar_stack_component.rb +3 -3
  7. data/app/components/primer/base_component.rb +1 -1
  8. data/app/components/primer/blankslate_component.html.erb +2 -2
  9. data/app/components/primer/blankslate_component.rb +7 -7
  10. data/app/components/primer/border_box_component.html.erb +4 -18
  11. data/app/components/primer/border_box_component.rb +58 -67
  12. data/app/components/primer/box_component.rb +2 -2
  13. data/app/components/primer/breadcrumb_component.rb +1 -1
  14. data/app/components/primer/button_component.rb +2 -2
  15. data/app/components/primer/button_group_component.rb +1 -1
  16. data/app/components/primer/button_marketing_component.rb +2 -2
  17. data/app/components/primer/component.rb +4 -0
  18. data/app/components/primer/counter_component.rb +1 -1
  19. data/app/components/primer/details_component.html.erb +2 -6
  20. data/app/components/primer/details_component.rb +22 -35
  21. data/app/components/primer/dropdown_component.html.erb +2 -2
  22. data/app/components/primer/dropdown_component.rb +4 -6
  23. data/app/components/primer/dropdown_menu_component.rb +4 -4
  24. data/app/components/primer/flash_component.html.erb +2 -2
  25. data/app/components/primer/flash_component.rb +5 -5
  26. data/app/components/primer/flex_component.rb +4 -4
  27. data/app/components/primer/flex_item_component.rb +1 -1
  28. data/app/components/primer/heading_component.rb +3 -1
  29. data/app/components/primer/label_component.rb +2 -2
  30. data/app/components/primer/layout_component.rb +2 -2
  31. data/app/components/primer/link_component.rb +2 -2
  32. data/app/components/primer/markdown_component.rb +8 -8
  33. data/app/components/primer/menu_component.rb +1 -1
  34. data/app/components/primer/octicon_component.rb +5 -3
  35. data/app/components/primer/popover_component.rb +3 -3
  36. data/app/components/primer/primer.js +1 -0
  37. data/app/components/primer/primer.ts +1 -0
  38. data/app/components/primer/progress_bar_component.rb +4 -4
  39. data/app/components/primer/spinner_component.rb +3 -3
  40. data/app/components/primer/state_component.rb +21 -10
  41. data/app/components/primer/subhead_component.rb +3 -3
  42. data/app/components/primer/tab_container_component.js +1 -0
  43. data/app/components/primer/tab_container_component.rb +41 -0
  44. data/app/components/primer/tab_container_component.ts +1 -0
  45. data/app/components/primer/tab_nav_component.html.erb +17 -0
  46. data/app/components/primer/tab_nav_component.rb +108 -0
  47. data/app/components/primer/text_component.rb +1 -1
  48. data/app/components/primer/timeline_item_component.rb +1 -1
  49. data/app/components/primer/tooltip_component.rb +5 -5
  50. data/app/components/primer/truncate_component.rb +4 -4
  51. data/app/components/primer/underline_nav_component.rb +2 -2
  52. data/{lib → app/lib}/primer/class_name_helper.rb +0 -0
  53. data/{lib → app/lib}/primer/classify.rb +0 -2
  54. data/{lib → app/lib}/primer/classify/cache.rb +0 -0
  55. data/{lib → app/lib}/primer/fetch_or_fallback_helper.rb +0 -0
  56. data/{lib → app/lib}/primer/join_style_arguments_helper.rb +0 -0
  57. data/app/lib/primer/view_helper.rb +22 -0
  58. data/app/lib/primer/view_helper/dsl.rb +34 -0
  59. data/lib/primer/view_components/engine.rb +10 -2
  60. data/lib/primer/view_components/version.rb +5 -1
  61. data/static/statuses.json +1 -1
  62. metadata +18 -8
  63. data/app/components/primer/view_components.rb +0 -60
@@ -1,12 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "rails/engine"
4
+
3
5
  module Primer
4
6
  module ViewComponents
5
7
  # :nodoc:
6
8
  class Engine < ::Rails::Engine
7
9
  isolate_namespace Primer::ViewComponents
10
+ config.autoload_once_paths = %W[
11
+ #{root}/app/components
12
+ #{root}/app/lib
13
+ ]
14
+
15
+ initializer "primer_view_components.assets" do |app|
16
+ app.config.assets.precompile += %w[primer_view_components] if app.config.respond_to?(:assets)
17
+ end
8
18
  end
9
19
  end
10
20
  end
11
-
12
- require "#{Primer::ViewComponents::Engine.root}/app/components/primer/view_components.rb"
@@ -5,9 +5,13 @@ module Primer
5
5
  module VERSION
6
6
  MAJOR = 0
7
7
  MINOR = 0
8
- PATCH = 21
8
+ PATCH = 22
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH].join(".")
11
11
  end
12
12
  end
13
13
  end
14
+
15
+ # rubocop:disable Rails/Output
16
+ puts Primer::ViewComponents::VERSION::STRING if __FILE__ == $PROGRAM_NAME
17
+ # rubocop:enable Rails/Output
data/static/statuses.json CHANGED
@@ -1 +1 @@
1
- {"Primer::AvatarComponent":"beta","Primer::AvatarStackComponent":"alpha","Primer::BaseComponent":"alpha","Primer::BlankslateComponent":"alpha","Primer::BorderBoxComponent":"beta","Primer::BoxComponent":"stable","Primer::BreadcrumbComponent":"alpha","Primer::ButtonComponent":"alpha","Primer::ButtonGroupComponent":"alpha","Primer::ButtonMarketingComponent":"alpha","Primer::CounterComponent":"beta","Primer::DetailsComponent":"alpha","Primer::Dropdown::MenuComponent":"alpha","Primer::DropdownComponent":"alpha","Primer::DropdownMenuComponent":"deprecated","Primer::FlashComponent":"beta","Primer::FlexComponent":"alpha","Primer::FlexItemComponent":"alpha","Primer::HeadingComponent":"alpha","Primer::LabelComponent":"alpha","Primer::LayoutComponent":"alpha","Primer::LinkComponent":"beta","Primer::MarkdownComponent":"alpha","Primer::MenuComponent":"alpha","Primer::OcticonComponent":"beta","Primer::PopoverComponent":"alpha","Primer::ProgressBarComponent":"alpha","Primer::SpinnerComponent":"beta","Primer::StateComponent":"alpha","Primer::SubheadComponent":"alpha","Primer::TextComponent":"alpha","Primer::TimelineItemComponent":"alpha","Primer::TimelineItemComponent::BadgeComponent":"alpha","Primer::TooltipComponent":"alpha","Primer::TruncateComponent":"alpha","Primer::UnderlineNavComponent":"alpha"}
1
+ {"Primer::AvatarComponent":"beta","Primer::AvatarStackComponent":"alpha","Primer::BaseComponent":"alpha","Primer::BlankslateComponent":"alpha","Primer::BorderBoxComponent":"beta","Primer::BoxComponent":"stable","Primer::BreadcrumbComponent":"alpha","Primer::ButtonComponent":"alpha","Primer::ButtonGroupComponent":"alpha","Primer::ButtonMarketingComponent":"alpha","Primer::CounterComponent":"beta","Primer::DetailsComponent":"alpha","Primer::Dropdown::MenuComponent":"alpha","Primer::DropdownComponent":"alpha","Primer::DropdownMenuComponent":"deprecated","Primer::FlashComponent":"beta","Primer::FlexComponent":"alpha","Primer::FlexItemComponent":"alpha","Primer::HeadingComponent":"alpha","Primer::LabelComponent":"alpha","Primer::LayoutComponent":"alpha","Primer::LinkComponent":"beta","Primer::MarkdownComponent":"alpha","Primer::MenuComponent":"alpha","Primer::OcticonComponent":"beta","Primer::PopoverComponent":"alpha","Primer::ProgressBarComponent":"alpha","Primer::SpinnerComponent":"beta","Primer::StateComponent":"beta","Primer::SubheadComponent":"alpha","Primer::TabContainerComponent":"alpha","Primer::TabNavComponent":"alpha","Primer::TabNavComponent::TabComponent":"alpha","Primer::TextComponent":"alpha","Primer::TimelineItemComponent":"alpha","Primer::TimelineItemComponent::BadgeComponent":"alpha","Primer::TooltipComponent":"alpha","Primer::TruncateComponent":"alpha","Primer::UnderlineNavComponent":"alpha"}
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.21
4
+ version: 0.0.22
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: 2021-02-23 00:00:00.000000000 Z
11
+ date: 2021-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octicons_helper
@@ -234,6 +234,8 @@ files:
234
234
  - CHANGELOG.md
235
235
  - LICENSE.txt
236
236
  - README.md
237
+ - app/assets/javascripts/primer_view_components.js
238
+ - app/assets/javascripts/primer_view_components.js.map
237
239
  - app/components/primer/avatar_component.rb
238
240
  - app/components/primer/avatar_stack_component.html.erb
239
241
  - app/components/primer/avatar_stack_component.rb
@@ -274,6 +276,8 @@ files:
274
276
  - app/components/primer/octicon_component.rb
275
277
  - app/components/primer/popover_component.html.erb
276
278
  - app/components/primer/popover_component.rb
279
+ - app/components/primer/primer.js
280
+ - app/components/primer/primer.ts
277
281
  - app/components/primer/progress_bar_component.html.erb
278
282
  - app/components/primer/progress_bar_component.rb
279
283
  - app/components/primer/slot.rb
@@ -282,6 +286,11 @@ files:
282
286
  - app/components/primer/state_component.rb
283
287
  - app/components/primer/subhead_component.html.erb
284
288
  - app/components/primer/subhead_component.rb
289
+ - app/components/primer/tab_container_component.js
290
+ - app/components/primer/tab_container_component.rb
291
+ - app/components/primer/tab_container_component.ts
292
+ - app/components/primer/tab_nav_component.html.erb
293
+ - app/components/primer/tab_nav_component.rb
285
294
  - app/components/primer/text_component.rb
286
295
  - app/components/primer/timeline_item_component.html.erb
287
296
  - app/components/primer/timeline_item_component.rb
@@ -289,12 +298,13 @@ files:
289
298
  - app/components/primer/truncate_component.rb
290
299
  - app/components/primer/underline_nav_component.html.erb
291
300
  - app/components/primer/underline_nav_component.rb
292
- - app/components/primer/view_components.rb
293
- - lib/primer/class_name_helper.rb
294
- - lib/primer/classify.rb
295
- - lib/primer/classify/cache.rb
296
- - lib/primer/fetch_or_fallback_helper.rb
297
- - lib/primer/join_style_arguments_helper.rb
301
+ - app/lib/primer/class_name_helper.rb
302
+ - app/lib/primer/classify.rb
303
+ - app/lib/primer/classify/cache.rb
304
+ - app/lib/primer/fetch_or_fallback_helper.rb
305
+ - app/lib/primer/join_style_arguments_helper.rb
306
+ - app/lib/primer/view_helper.rb
307
+ - app/lib/primer/view_helper/dsl.rb
298
308
  - lib/primer/view_components.rb
299
309
  - lib/primer/view_components/engine.rb
300
310
  - lib/primer/view_components/version.rb
@@ -1,60 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "active_support/core_ext"
4
-
5
- # ViewComponent
6
-
7
- require "view_component/engine"
8
-
9
- # Octicons
10
-
11
- require "octicons_helper/helper"
12
-
13
- # Helpers
14
-
15
- require "primer/class_name_helper"
16
- require "primer/classify"
17
- require "primer/fetch_or_fallback_helper"
18
- require "primer/join_style_arguments_helper"
19
-
20
- # Base configurations
21
-
22
- require_relative "component"
23
- require_relative "base_component"
24
- require_relative "slot"
25
-
26
- # Components
27
-
28
- require_relative "avatar_component"
29
- require_relative "avatar_stack_component"
30
- require_relative "blankslate_component"
31
- require_relative "border_box_component"
32
- require_relative "box_component"
33
- require_relative "breadcrumb_component"
34
- require_relative "button_component"
35
- require_relative "button_group_component"
36
- require_relative "button_marketing_component"
37
- require_relative "counter_component"
38
- require_relative "details_component"
39
- require_relative "dropdown_component"
40
- require_relative "dropdown_menu_component"
41
- require_relative "flash_component"
42
- require_relative "flex_component"
43
- require_relative "flex_item_component"
44
- require_relative "heading_component"
45
- require_relative "label_component"
46
- require_relative "layout_component"
47
- require_relative "link_component"
48
- require_relative "markdown_component"
49
- require_relative "menu_component"
50
- require_relative "octicon_component"
51
- require_relative "popover_component"
52
- require_relative "progress_bar_component"
53
- require_relative "spinner_component"
54
- require_relative "state_component"
55
- require_relative "subhead_component"
56
- require_relative "text_component"
57
- require_relative "timeline_item_component"
58
- require_relative "tooltip_component"
59
- require_relative "truncate_component"
60
- require_relative "underline_nav_component"