primer_view_components 0.0.33 → 0.0.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +102 -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/components/primer/{auto_complete_component.rb → auto_complete.rb} +13 -11
  6. data/app/components/primer/{auto_complete_component.d.ts → auto_complete/auto_complete.d.ts} +0 -0
  7. data/app/components/primer/{auto_complete_component.html.erb → auto_complete/auto_complete.html.erb} +0 -0
  8. data/app/components/primer/{auto_complete_component.js → auto_complete/auto_complete.js} +0 -0
  9. data/app/components/primer/{auto_complete_component.ts → auto_complete/auto_complete.ts} +0 -0
  10. data/app/components/primer/auto_complete/auto_component.d.ts +1 -0
  11. data/app/components/primer/auto_complete/auto_component.js +1 -0
  12. data/app/components/primer/auto_complete/item.rb +42 -0
  13. data/app/components/primer/avatar_stack_component.rb +2 -0
  14. data/app/components/primer/base_button.rb +47 -0
  15. data/app/components/primer/base_component.rb +115 -85
  16. data/app/components/primer/button_component.rb +37 -32
  17. data/app/components/primer/button_component.rb.orig +138 -0
  18. data/app/components/primer/{button_group_component.html.erb → button_group.html.erb} +0 -0
  19. data/app/components/primer/button_group.rb +61 -0
  20. data/app/components/primer/button_marketing_component.rb +15 -20
  21. data/app/components/primer/clipboard_copy.html.erb +8 -0
  22. data/app/components/primer/clipboard_copy.rb +26 -0
  23. data/app/components/primer/clipboard_copy_component.d.ts +1 -0
  24. data/app/components/primer/clipboard_copy_component.js +25 -0
  25. data/app/components/primer/clipboard_copy_component.ts +28 -0
  26. data/app/components/primer/close_button.rb +37 -0
  27. data/app/components/primer/component.rb +1 -0
  28. data/app/components/primer/dropdown_component.rb +1 -1
  29. data/app/components/primer/dropdown_menu_component.rb +1 -1
  30. data/app/components/primer/flash_component.rb +10 -10
  31. data/app/components/primer/foo_bar.d.ts +1 -0
  32. data/app/components/primer/foo_bar.js +1 -0
  33. data/app/components/primer/heading_component.rb +32 -4
  34. data/app/components/primer/hidden_text_expander.rb +41 -0
  35. data/app/components/primer/link_component.rb +9 -9
  36. data/app/components/primer/navigation/tab_component.html.erb +9 -7
  37. data/app/components/primer/navigation/tab_component.rb +27 -3
  38. data/app/components/primer/octicon_component.rb +0 -4
  39. data/app/components/primer/primer.d.ts +2 -1
  40. data/app/components/primer/primer.js +2 -1
  41. data/app/components/primer/primer.ts +2 -1
  42. data/app/components/primer/state_component.rb +14 -14
  43. data/app/components/primer/subhead_component.rb +1 -1
  44. data/app/components/primer/tab_nav_component.html.erb +2 -2
  45. data/app/components/primer/tab_nav_component.rb +22 -8
  46. data/app/components/primer/{truncate_component.rb → truncate.rb} +8 -6
  47. data/app/components/primer/underline_nav_component.rb +46 -14
  48. data/app/lib/primer/classify.rb +4 -13
  49. data/app/lib/primer/classify/cache.rb +14 -4
  50. data/app/lib/primer/classify/spacing.rb +63 -0
  51. data/app/lib/primer/tabbed_component_helper.rb +4 -0
  52. data/lib/primer/view_components/version.rb +1 -1
  53. data/static/statuses.json +1 -1
  54. metadata +116 -32
  55. data/app/assets/javascripts/primer_view_components.js.map.orig +0 -5
  56. data/app/assets/javascripts/primer_view_components.js.orig +0 -6
  57. data/app/components/primer/auto_complete_item_component.rb +0 -38
  58. data/app/components/primer/button_group_component.rb +0 -35
@@ -71,7 +71,7 @@ module Primer
71
71
  # <% component.actions do %>
72
72
  # <%= render(
73
73
  # Primer::ButtonComponent.new(
74
- # tag: :a, href: "http://www.google.com", button_type: :danger
74
+ # tag: :a, href: "http://www.google.com", scheme: :danger
75
75
  # )
76
76
  # ) { "Action" } %>
77
77
  # <% end %>
@@ -1,10 +1,10 @@
1
1
  <%= wrapper do %>
2
2
  <%= render Primer::BaseComponent.new(**@system_arguments) do %>
3
- <nav role="tablist" aria-label="<%= @aria_label %>" class="tabnav-tabs">
3
+ <%= render Primer::BaseComponent.new(**@body_arguments) do %>
4
4
  <% tabs.each do |tab| %>
5
5
  <%= tab %>
6
6
  <% end %>
7
- </nav>
7
+ <% end %>
8
8
  <% end %>
9
9
 
10
10
  <% if @with_panel %>
@@ -14,18 +14,23 @@ module Primer
14
14
  "tabnav-tab",
15
15
  system_arguments[:classes]
16
16
  )
17
- Primer::Navigation::TabComponent.new(selected: selected, with_panel: @with_panel, **system_arguments)
17
+
18
+ Primer::Navigation::TabComponent.new(
19
+ selected: selected,
20
+ with_panel: @with_panel,
21
+ **system_arguments
22
+ )
18
23
  }
19
24
 
20
25
  # @example Default
21
- # <%= render(Primer::TabNavComponent.new) do |c| %>
26
+ # <%= render(Primer::TabNavComponent.new(label: "Default")) do |c| %>
22
27
  # <% c.tab(selected: true, href: "#") { "Tab 1" }%>
23
28
  # <% c.tab(href: "#") { "Tab 2" } %>
24
29
  # <% c.tab(href: "#") { "Tab 3" } %>
25
30
  # <% end %>
26
31
  #
27
32
  # @example With icons and counters
28
- # <%= render(Primer::TabNavComponent.new) do |component| %>
33
+ # <%= render(Primer::TabNavComponent.new(label: "With icons and counters")) do |component| %>
29
34
  # <% component.tab(href: "#", selected: true) do |t| %>
30
35
  # <% t.icon(icon: :star) %>
31
36
  # <% t.text { "Item 1" } %>
@@ -42,7 +47,7 @@ module Primer
42
47
  # <% end %>
43
48
  #
44
49
  # @example With panels
45
- # <%= render(Primer::TabNavComponent.new(with_panel: true)) do |c| %>
50
+ # <%= render(Primer::TabNavComponent.new(label: "With panels", with_panel: true)) do |c| %>
46
51
  # <% c.tab(selected: true) do |t| %>
47
52
  # <% t.text { "Tab 1" } %>
48
53
  # <% t.panel do %>
@@ -63,19 +68,28 @@ module Primer
63
68
  # <% end %>
64
69
  # <% end %>
65
70
  #
66
- # @param aria_label [String] Used to set the `aria-label` on the top level `<nav>` element.
71
+ # @param label [String] Used to set the `aria-label` on the top level `<nav>` element.
67
72
  # @param with_panel [Boolean] Whether the TabNav should navigate through pages or panels.
68
73
  # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
69
- def initialize(aria_label: nil, with_panel: false, **system_arguments)
70
- @aria_label = aria_label
74
+ def initialize(label:, with_panel: false, **system_arguments)
71
75
  @with_panel = with_panel
72
76
  @system_arguments = system_arguments
73
- @system_arguments[:tag] ||= :div
74
77
 
78
+ @system_arguments[:tag] ||= :div
75
79
  @system_arguments[:classes] = class_names(
76
80
  "tabnav",
77
81
  system_arguments[:classes]
78
82
  )
83
+
84
+ @body_arguments = {
85
+ tag: navigation_tag(with_panel),
86
+ classes: "tabnav-tabs",
87
+ aria: {
88
+ label: label
89
+ }
90
+ }
91
+
92
+ @body_arguments[:role] = :tablist if @with_panel
79
93
  end
80
94
  end
81
95
  end
@@ -1,21 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Primer
4
- # Use TruncateComponent to shorten overflowing text with an ellipsis.
5
- class TruncateComponent < Primer::Component
4
+ # Use Truncate to shorten overflowing text with an ellipsis.
5
+ class Truncate < Primer::Component
6
+ status :beta
7
+
6
8
  # @example Default
7
9
  # <div class="col-2">
8
- # <%= render(Primer::TruncateComponent.new(tag: :p)) { "branch-name-that-is-really-long" } %>
10
+ # <%= render(Primer::Truncate.new(tag: :p)) { "branch-name-that-is-really-long" } %>
9
11
  # </div>
10
12
  #
11
13
  # @example Inline
12
- # <%= render(Primer::TruncateComponent.new(tag: :span, inline: true)) { "branch-name-that-is-really-long" } %>
14
+ # <%= render(Primer::Truncate.new(tag: :span, inline: true)) { "branch-name-that-is-really-long" } %>
13
15
  #
14
16
  # @example Expandable
15
- # <%= render(Primer::TruncateComponent.new(tag: :span, inline: true, expandable: true)) { "branch-name-that-is-really-long" } %>
17
+ # <%= render(Primer::Truncate.new(tag: :span, inline: true, expandable: true)) { "branch-name-that-is-really-long" } %>
16
18
  #
17
19
  # @example Custom size
18
- # <%= render(Primer::TruncateComponent.new(tag: :span, inline: true, expandable: true, max_width: 100)) { "branch-name-that-is-really-long" } %>
20
+ # <%= render(Primer::Truncate.new(tag: :span, inline: true, expandable: true, max_width: 100)) { "branch-name-that-is-really-long" } %>
19
21
  #
20
22
  # @param inline [Boolean] Whether the element is inline (or inline-block).
21
23
  # @param expandable [Boolean] Whether the entire string should be revealed on hover. Can only be used in conjunction with `inline`.
@@ -10,6 +10,9 @@ module Primer
10
10
  ALIGN_DEFAULT = :left
11
11
  ALIGN_OPTIONS = [ALIGN_DEFAULT, :right].freeze
12
12
 
13
+ BODY_TAG_DEFAULT = :div
14
+ BODY_TAG_OPTIONS = [BODY_TAG_DEFAULT, :ul].freeze
15
+
13
16
  # Use the tabs to list navigation items. For more information, refer to <%= link_to_component(Primer::Navigation::TabComponent) %>.
14
17
  #
15
18
  # @param selected [Boolean] Whether the tab is selected.
@@ -19,7 +22,9 @@ module Primer
19
22
  "UnderlineNav-item",
20
23
  system_arguments[:classes]
21
24
  )
25
+
22
26
  Primer::Navigation::TabComponent.new(
27
+ list: list?,
23
28
  selected: selected,
24
29
  with_panel: @with_panel,
25
30
  icon_classes: "UnderlineNav-octicon",
@@ -38,7 +43,7 @@ module Primer
38
43
  }
39
44
 
40
45
  # @example Default
41
- # <%= render(Primer::UnderlineNavComponent.new) do |component| %>
46
+ # <%= render(Primer::UnderlineNavComponent.new(label: "Default")) do |component| %>
42
47
  # <% component.tab(href: "#", selected: true) { "Item 1" } %>
43
48
  # <% component.tab(href: "#") { "Item 2" } %>
44
49
  # <% component.actions do %>
@@ -47,7 +52,7 @@ module Primer
47
52
  # <% end %>
48
53
  #
49
54
  # @example With icons and counters
50
- # <%= render(Primer::UnderlineNavComponent.new) do |component| %>
55
+ # <%= render(Primer::UnderlineNavComponent.new(label: "With icons and counters")) do |component| %>
51
56
  # <% component.tab(href: "#", selected: true) do |t| %>
52
57
  # <% t.icon(icon: :star) %>
53
58
  # <% t.text { "Item 1" } %>
@@ -67,7 +72,20 @@ module Primer
67
72
  # <% end %>
68
73
  #
69
74
  # @example Align right
70
- # <%= render(Primer::UnderlineNavComponent.new(align: :right)) do |component| %>
75
+ # <%= render(Primer::UnderlineNavComponent.new(label: "Align right", align: :right)) do |component| %>
76
+ # <% component.tab(href: "#", selected: true) do |t| %>
77
+ # <% t.text { "Item 1" } %>
78
+ # <% end %>
79
+ # <% component.tab(href: "#") do |t| %>
80
+ # <% t.text { "Item 2" } %>
81
+ # <% end %>
82
+ # <% component.actions do %>
83
+ # <%= render(Primer::ButtonComponent.new) { "Button!" } %>
84
+ # <% end %>
85
+ # <% end %>
86
+ #
87
+ # @example As a list
88
+ # <%= render(Primer::UnderlineNavComponent.new(label: "As a list", body_arguments: { tag: :ul })) do |component| %>
71
89
  # <% component.tab(href: "#", selected: true) do |t| %>
72
90
  # <% t.text { "Item 1" } %>
73
91
  # <% end %>
@@ -80,7 +98,7 @@ module Primer
80
98
  # <% end %>
81
99
  #
82
100
  # @example With panels
83
- # <%= render(Primer::UnderlineNavComponent.new(with_panel: true)) do |component| %>
101
+ # <%= render(Primer::UnderlineNavComponent.new(label: "With panels", with_panel: true)) do |component| %>
84
102
  # <% component.tab(selected: true) do |t| %>
85
103
  # <% t.text { "Item 1" } %>
86
104
  # <% t.panel do %>
@@ -98,33 +116,47 @@ module Primer
98
116
  # <% end %>
99
117
  # <% end %>
100
118
  #
119
+ # @param label [String] The `aria-label` on top level `<nav>` element.
101
120
  # @param with_panel [Boolean] Whether the TabNav should navigate through pages or panels.
102
121
  # @param align [Symbol] <%= one_of(Primer::UnderlineNavComponent::ALIGN_OPTIONS) %> - Defaults to <%= Primer::UnderlineNavComponent::ALIGN_DEFAULT %>
122
+ # @param body_arguments [Hash] <%= link_to_system_arguments_docs %> for the body wrapper.
103
123
  # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
104
- def initialize(with_panel: false, align: ALIGN_DEFAULT, body_classes: "", **system_arguments)
124
+ def initialize(label:, with_panel: false, align: ALIGN_DEFAULT, body_arguments: { tag: BODY_TAG_DEFAULT }, **system_arguments)
105
125
  @with_panel = with_panel
106
126
  @align = fetch_or_fallback(ALIGN_OPTIONS, align, ALIGN_DEFAULT)
107
127
 
108
128
  @system_arguments = system_arguments
109
- @system_arguments[:tag] = :nav
110
- @system_arguments[:role] = :tablist
129
+ @system_arguments[:tag] = navigation_tag(with_panel)
111
130
  @system_arguments[:classes] = class_names(
112
131
  @system_arguments[:classes],
113
132
  "UnderlineNav",
114
133
  "UnderlineNav--right" => @align == :right
115
134
  )
116
135
 
117
- @body_arguments = {
118
- tag: :div,
119
- classes: class_names(
120
- "UnderlineNav-body",
121
- body_classes
122
- )
123
- }
136
+ @body_arguments = body_arguments
137
+ @body_tag = fetch_or_fallback(BODY_TAG_OPTIONS, body_arguments[:tag]&.to_sym, BODY_TAG_DEFAULT)
138
+
139
+ @body_arguments[:tag] = @body_tag
140
+ @body_arguments[:classes] = class_names(
141
+ "UnderlineNav-body",
142
+ @body_arguments[:classes],
143
+ "list-style-none" => list?
144
+ )
145
+
146
+ if with_panel
147
+ @body_arguments[:role] = :tablist
148
+ @body_arguments[:"aria-label"] = label
149
+ else
150
+ @system_arguments[:"aria-label"] = label
151
+ end
124
152
  end
125
153
 
126
154
  private
127
155
 
156
+ def list?
157
+ @body_tag == :ul
158
+ end
159
+
128
160
  def body
129
161
  Primer::BaseComponent.new(**@body_arguments)
130
162
  end
@@ -3,12 +3,11 @@
3
3
  module Primer
4
4
  # :nodoc:
5
5
  class Classify
6
- MARGIN_DIRECTION_KEYS = %i[mt ml mb mr].freeze
7
- SPACING_KEYS = (%i[m my mx p py px pt pl pb pr] + MARGIN_DIRECTION_KEYS).freeze
8
6
  DIRECTION_KEY = :direction
9
7
  JUSTIFY_CONTENT_KEY = :justify_content
10
8
  ALIGN_ITEMS_KEY = :align_items
11
9
  DISPLAY_KEY = :display
10
+ SPACING_KEYS = Primer::Classify::Spacing::KEYS
12
11
  RESPONSIVE_KEYS = ([DISPLAY_KEY, DIRECTION_KEY, JUSTIFY_CONTENT_KEY, ALIGN_ITEMS_KEY, :col, :float] + SPACING_KEYS).freeze
13
12
  BREAKPOINTS = ["", "-sm", "-md", "-lg", "-xl"].freeze
14
13
 
@@ -16,7 +15,7 @@ module Primer
16
15
  CONCAT_KEYS = SPACING_KEYS + %i[hide position v float col text box_shadow].freeze
17
16
 
18
17
  INVALID_CLASS_NAME_PREFIXES =
19
- (["bg-", "color-", "text-", "d-", "v-align-", "wb-", "text-", "box-shadow-"] + CONCAT_KEYS.map { |k| "#{k}-" }).freeze
18
+ (["bg-", "color-", "text-", "d-", "v-align-", "wb-", "box-shadow-"] + CONCAT_KEYS.map { |k| "#{k}-" }).freeze
20
19
 
21
20
  COLOR_KEY = :color
22
21
  BG_KEY = :bg
@@ -184,14 +183,8 @@ module Primer
184
183
  return if val.nil? || val == ""
185
184
 
186
185
  if SPACING_KEYS.include?(key)
187
- if MARGIN_DIRECTION_KEYS.include?(key)
188
- raise ArgumentError, "value of #{key} must be between -6 and 6" if val < -6 || val > 6
189
- elsif !((key == :mx || key == :my) && val == :auto)
190
- raise ArgumentError, "value of #{key} must be between 0 and 6" if val.negative? || val > 6
191
- end
192
- end
193
-
194
- if BOOLEAN_MAPPINGS.key?(key)
186
+ memo[:classes] << Primer::Classify::Spacing.spacing(key, val, breakpoint)
187
+ elsif BOOLEAN_MAPPINGS.key?(key)
195
188
  BOOLEAN_MAPPINGS[key][:mappings].each do |m|
196
189
  memo[:classes] << m[:css_class] if m[:value] == val && m[:css_class].present?
197
190
  end
@@ -248,8 +241,6 @@ module Primer
248
241
  memo[:classes] << "text-#{val.to_s.dasherize}"
249
242
  elsif TYPOGRAPHY_KEYS.include?(key)
250
243
  memo[:classes] << "f#{val.to_s.dasherize}"
251
- elsif MARGIN_DIRECTION_KEYS.include?(key) && val.negative?
252
- memo[:classes] << "#{key.to_s.dasherize}#{breakpoint}-n#{val.abs}"
253
244
  elsif key == BOX_SHADOW_KEY
254
245
  memo[:classes] << if val == true
255
246
  "color-shadow-small"
@@ -20,13 +20,23 @@ module Primer
20
20
 
21
21
  def preload!
22
22
  preload(
23
- keys: Primer::Classify::MARGIN_DIRECTION_KEYS,
24
- values: [-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6]
23
+ keys: Primer::Classify::Spacing::MARGIN_DIRECTION_MAPPINGS.keys,
24
+ values: Primer::Classify::Spacing::MARGIN_DIRECTION_OPTIONS
25
25
  )
26
26
 
27
27
  preload(
28
- keys: (Primer::Classify::SPACING_KEYS - Primer::Classify::MARGIN_DIRECTION_KEYS),
29
- values: [0, 1, 2, 3, 4, 5, 6]
28
+ keys: Primer::Classify::Spacing::BASE_MAPPINGS.keys,
29
+ values: Primer::Classify::Spacing::BASE_OPTIONS
30
+ )
31
+
32
+ preload(
33
+ keys: Primer::Classify::Spacing::AUTO_MAPPINGS.keys,
34
+ values: Primer::Classify::Spacing::AUTO_OPTIONS
35
+ )
36
+
37
+ preload(
38
+ keys: Primer::Classify::Spacing::RESPONSIVE_MAPPINGS.keys,
39
+ values: Primer::Classify::Spacing::RESPONSIVE_OPTIONS
30
40
  )
31
41
 
32
42
  preload(
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Primer
4
+ class Classify
5
+ # Handler for PrimerCSS spacing classes.
6
+ class Spacing
7
+ BASE_OPTIONS = (0..6).to_a.freeze
8
+ BASE_MAPPINGS = {
9
+ my: BASE_OPTIONS,
10
+ pb: BASE_OPTIONS,
11
+ pl: BASE_OPTIONS,
12
+ pr: BASE_OPTIONS,
13
+ pt: BASE_OPTIONS,
14
+ px: BASE_OPTIONS,
15
+ py: BASE_OPTIONS
16
+ }.freeze
17
+
18
+ MARGIN_DIRECTION_OPTIONS = [*(-6..-1), *BASE_OPTIONS].freeze
19
+ MARGIN_DIRECTION_MAPPINGS = {
20
+ mb: MARGIN_DIRECTION_OPTIONS,
21
+ ml: MARGIN_DIRECTION_OPTIONS,
22
+ mr: MARGIN_DIRECTION_OPTIONS,
23
+ mt: MARGIN_DIRECTION_OPTIONS
24
+ }.freeze
25
+
26
+ AUTO_OPTIONS = [*BASE_OPTIONS, :auto].freeze
27
+ AUTO_MAPPINGS = {
28
+ m: AUTO_OPTIONS,
29
+ mx: AUTO_OPTIONS
30
+ }.freeze
31
+
32
+ RESPONSIVE_OPTIONS = [*BASE_OPTIONS, :responsive].freeze
33
+ RESPONSIVE_MAPPINGS = {
34
+ p: RESPONSIVE_OPTIONS
35
+ }.freeze
36
+
37
+ MAPPINGS = {
38
+ **BASE_MAPPINGS,
39
+ **MARGIN_DIRECTION_MAPPINGS,
40
+ **AUTO_MAPPINGS,
41
+ **RESPONSIVE_MAPPINGS
42
+ }.freeze
43
+ KEYS = MAPPINGS.keys.freeze
44
+
45
+ class << self
46
+ def spacing(key, val, breakpoint)
47
+ validate(key, val) unless Rails.env.production?
48
+
49
+ return "#{key.to_s.dasherize}#{breakpoint}-n#{val.abs}" if val.is_a?(Numeric) && val.negative?
50
+
51
+ "#{key.to_s.dasherize}#{breakpoint}-#{val.to_s.dasherize}"
52
+ end
53
+
54
+ private
55
+
56
+ def validate(key, val)
57
+ raise ArgumentError, "#{key} is not a spacing key" unless KEYS.include?(key)
58
+ raise ArgumentError, "#{val} is not a valid value for :#{key}. Use one of #{MAPPINGS[key]}" unless MAPPINGS[key].include?(val)
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -16,6 +16,10 @@ module Primer
16
16
 
17
17
  private
18
18
 
19
+ def navigation_tag(with_panel)
20
+ with_panel ? :div : :nav
21
+ end
22
+
19
23
  def wrapper
20
24
  return yield unless @with_panel
21
25
 
@@ -5,7 +5,7 @@ module Primer
5
5
  module VERSION
6
6
  MAJOR = 0
7
7
  MINOR = 0
8
- PATCH = 33
8
+ PATCH = 38
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH].join(".")
11
11
  end
data/static/statuses.json CHANGED
@@ -1 +1 @@
1
- {"Primer::AutoCompleteComponent":"alpha","Primer::AutoCompleteItemComponent":"alpha","Primer::AvatarComponent":"beta","Primer::AvatarStackComponent":"alpha","Primer::BaseComponent":"beta","Primer::BlankslateComponent":"beta","Primer::BorderBoxComponent":"beta","Primer::BoxComponent":"stable","Primer::BreadcrumbComponent":"beta","Primer::BreadcrumbComponent::ItemComponent":"alpha","Primer::ButtonComponent":"alpha","Primer::ButtonGroupComponent":"alpha","Primer::ButtonMarketingComponent":"alpha","Primer::CounterComponent":"beta","Primer::DetailsComponent":"beta","Primer::Dropdown::MenuComponent":"alpha","Primer::DropdownComponent":"alpha","Primer::DropdownMenuComponent":"deprecated","Primer::FlashComponent":"beta","Primer::FlexComponent":"alpha","Primer::FlexItemComponent":"alpha","Primer::HeadingComponent":"beta","Primer::LabelComponent":"beta","Primer::LayoutComponent":"alpha","Primer::LinkComponent":"beta","Primer::MarkdownComponent":"alpha","Primer::MenuComponent":"alpha","Primer::Navigation::TabComponent":"alpha","Primer::OcticonComponent":"beta","Primer::PopoverComponent":"beta","Primer::ProgressBarComponent":"beta","Primer::SpinnerComponent":"beta","Primer::StateComponent":"beta","Primer::SubheadComponent":"beta","Primer::TabContainerComponent":"alpha","Primer::TabNavComponent":"alpha","Primer::TextComponent":"beta","Primer::TimeAgoComponent":"beta","Primer::TimelineItemComponent":"beta","Primer::TimelineItemComponent::BadgeComponent":"alpha","Primer::TooltipComponent":"alpha","Primer::TruncateComponent":"alpha","Primer::UnderlineNavComponent":"alpha"}
1
+ {"Primer::AutoComplete":"beta","Primer::AutoComplete::Item":"beta","Primer::AvatarComponent":"beta","Primer::AvatarStackComponent":"beta","Primer::BaseButton":"beta","Primer::BaseComponent":"beta","Primer::BlankslateComponent":"beta","Primer::BorderBoxComponent":"beta","Primer::BoxComponent":"stable","Primer::BreadcrumbComponent":"beta","Primer::BreadcrumbComponent::ItemComponent":"alpha","Primer::ButtonComponent":"beta","Primer::ButtonGroup":"beta","Primer::ButtonMarketingComponent":"alpha","Primer::ClipboardCopy":"alpha","Primer::CloseButton":"alpha","Primer::CounterComponent":"beta","Primer::DetailsComponent":"beta","Primer::Dropdown::MenuComponent":"alpha","Primer::DropdownComponent":"alpha","Primer::DropdownMenuComponent":"deprecated","Primer::FlashComponent":"beta","Primer::FlexComponent":"alpha","Primer::FlexItemComponent":"alpha","Primer::HeadingComponent":"beta","Primer::HiddenTextExpander":"alpha","Primer::LabelComponent":"beta","Primer::LayoutComponent":"alpha","Primer::LinkComponent":"beta","Primer::MarkdownComponent":"alpha","Primer::MenuComponent":"alpha","Primer::Navigation::TabComponent":"alpha","Primer::OcticonComponent":"beta","Primer::PopoverComponent":"beta","Primer::ProgressBarComponent":"beta","Primer::SpinnerComponent":"beta","Primer::StateComponent":"beta","Primer::SubheadComponent":"beta","Primer::TabContainerComponent":"alpha","Primer::TabNavComponent":"alpha","Primer::TextComponent":"beta","Primer::TimeAgoComponent":"beta","Primer::TimelineItemComponent":"beta","Primer::TimelineItemComponent::BadgeComponent":"alpha","Primer::TooltipComponent":"alpha","Primer::Truncate":"beta","Primer::UnderlineNavComponent":"alpha"}
metadata CHANGED
@@ -1,45 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: primer_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33
4
+ version: 0.0.38
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-03-26 00:00:00.000000000 Z
11
+ date: 2021-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: octicons_helper
14
+ name: actionview
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 9.0.0
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: 13.0.0
19
+ version: 5.0.0
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: 9.0.0
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: 13.0.0
26
+ version: 5.0.0
33
27
  - !ruby/object:Gem::Dependency
34
- name: rails
28
+ name: activesupport
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - ">="
38
32
  - !ruby/object:Gem::Version
39
33
  version: 5.0.0
40
- - - "<"
41
- - !ruby/object:Gem::Version
42
- version: '7.0'
43
34
  type: :runtime
44
35
  prerelease: false
45
36
  version_requirements: !ruby/object:Gem::Requirement
@@ -47,9 +38,20 @@ dependencies:
47
38
  - - ">="
48
39
  - !ruby/object:Gem::Version
49
40
  version: 5.0.0
50
- - - "<"
41
+ - !ruby/object:Gem::Dependency
42
+ name: octicons_helper
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
51
46
  - !ruby/object:Gem::Version
52
- version: '7.0'
47
+ version: 13.0.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 13.0.0
53
55
  - !ruby/object:Gem::Dependency
54
56
  name: view_component
55
57
  requirement: !ruby/object:Gem::Requirement
@@ -98,6 +100,34 @@ dependencies:
98
100
  - - "~>"
99
101
  - !ruby/object:Gem::Version
100
102
  version: 2.8.4
103
+ - !ruby/object:Gem::Dependency
104
+ name: capybara
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '3'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '3'
117
+ - !ruby/object:Gem::Dependency
118
+ name: cuprite
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - '='
122
+ - !ruby/object:Gem::Version
123
+ version: '0.11'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - '='
129
+ - !ruby/object:Gem::Version
130
+ version: '0.11'
101
131
  - !ruby/object:Gem::Dependency
102
132
  name: listen
103
133
  requirement: !ruby/object:Gem::Requirement
@@ -116,16 +146,16 @@ dependencies:
116
146
  name: minitest
117
147
  requirement: !ruby/object:Gem::Requirement
118
148
  requirements:
119
- - - '='
149
+ - - "~>"
120
150
  - !ruby/object:Gem::Version
121
- version: 5.6.0
151
+ version: '5.0'
122
152
  type: :development
123
153
  prerelease: false
124
154
  version_requirements: !ruby/object:Gem::Requirement
125
155
  requirements:
126
- - - '='
156
+ - - "~>"
127
157
  - !ruby/object:Gem::Version
128
- version: 5.6.0
158
+ version: '5.0'
129
159
  - !ruby/object:Gem::Dependency
130
160
  name: mocha
131
161
  requirement: !ruby/object:Gem::Requirement
@@ -224,6 +254,48 @@ dependencies:
224
254
  - - "~>"
225
255
  - !ruby/object:Gem::Version
226
256
  version: 0.7.2
257
+ - !ruby/object:Gem::Dependency
258
+ name: sprockets
259
+ requirement: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - ">="
262
+ - !ruby/object:Gem::Version
263
+ version: '0'
264
+ type: :development
265
+ prerelease: false
266
+ version_requirements: !ruby/object:Gem::Requirement
267
+ requirements:
268
+ - - ">="
269
+ - !ruby/object:Gem::Version
270
+ version: '0'
271
+ - !ruby/object:Gem::Dependency
272
+ name: sprockets-rails
273
+ requirement: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - ">="
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :development
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ requirements:
282
+ - - ">="
283
+ - !ruby/object:Gem::Version
284
+ version: '0'
285
+ - !ruby/object:Gem::Dependency
286
+ name: thor
287
+ requirement: !ruby/object:Gem::Requirement
288
+ requirements:
289
+ - - ">="
290
+ - !ruby/object:Gem::Version
291
+ version: '0'
292
+ type: :development
293
+ prerelease: false
294
+ version_requirements: !ruby/object:Gem::Requirement
295
+ requirements:
296
+ - - ">="
297
+ - !ruby/object:Gem::Version
298
+ version: '0'
227
299
  - !ruby/object:Gem::Dependency
228
300
  name: yard
229
301
  requirement: !ruby/object:Gem::Requirement
@@ -250,17 +322,18 @@ files:
250
322
  - README.md
251
323
  - app/assets/javascripts/primer_view_components.js
252
324
  - app/assets/javascripts/primer_view_components.js.map
253
- - app/assets/javascripts/primer_view_components.js.map.orig
254
- - app/assets/javascripts/primer_view_components.js.orig
255
- - app/components/primer/auto_complete_component.d.ts
256
- - app/components/primer/auto_complete_component.html.erb
257
- - app/components/primer/auto_complete_component.js
258
- - app/components/primer/auto_complete_component.rb
259
- - app/components/primer/auto_complete_component.ts
260
- - app/components/primer/auto_complete_item_component.rb
325
+ - app/components/primer/auto_complete.rb
326
+ - app/components/primer/auto_complete/auto_complete.d.ts
327
+ - app/components/primer/auto_complete/auto_complete.html.erb
328
+ - app/components/primer/auto_complete/auto_complete.js
329
+ - app/components/primer/auto_complete/auto_complete.ts
330
+ - app/components/primer/auto_complete/auto_component.d.ts
331
+ - app/components/primer/auto_complete/auto_component.js
332
+ - app/components/primer/auto_complete/item.rb
261
333
  - app/components/primer/avatar_component.rb
262
334
  - app/components/primer/avatar_stack_component.html.erb
263
335
  - app/components/primer/avatar_stack_component.rb
336
+ - app/components/primer/base_button.rb
264
337
  - app/components/primer/base_component.rb
265
338
  - app/components/primer/blankslate_component.html.erb
266
339
  - app/components/primer/blankslate_component.rb
@@ -270,9 +343,16 @@ files:
270
343
  - app/components/primer/breadcrumb_component.html.erb
271
344
  - app/components/primer/breadcrumb_component.rb
272
345
  - app/components/primer/button_component.rb
273
- - app/components/primer/button_group_component.html.erb
274
- - app/components/primer/button_group_component.rb
346
+ - app/components/primer/button_component.rb.orig
347
+ - app/components/primer/button_group.html.erb
348
+ - app/components/primer/button_group.rb
275
349
  - app/components/primer/button_marketing_component.rb
350
+ - app/components/primer/clipboard_copy.html.erb
351
+ - app/components/primer/clipboard_copy.rb
352
+ - app/components/primer/clipboard_copy_component.d.ts
353
+ - app/components/primer/clipboard_copy_component.js
354
+ - app/components/primer/clipboard_copy_component.ts
355
+ - app/components/primer/close_button.rb
276
356
  - app/components/primer/component.rb
277
357
  - app/components/primer/counter_component.rb
278
358
  - app/components/primer/details_component.html.erb
@@ -287,7 +367,10 @@ files:
287
367
  - app/components/primer/flash_component.rb
288
368
  - app/components/primer/flex_component.rb
289
369
  - app/components/primer/flex_item_component.rb
370
+ - app/components/primer/foo_bar.d.ts
371
+ - app/components/primer/foo_bar.js
290
372
  - app/components/primer/heading_component.rb
373
+ - app/components/primer/hidden_text_expander.rb
291
374
  - app/components/primer/label_component.rb
292
375
  - app/components/primer/layout_component.html.erb
293
376
  - app/components/primer/layout_component.rb
@@ -324,7 +407,7 @@ files:
324
407
  - app/components/primer/timeline_item_component.html.erb
325
408
  - app/components/primer/timeline_item_component.rb
326
409
  - app/components/primer/tooltip_component.rb
327
- - app/components/primer/truncate_component.rb
410
+ - app/components/primer/truncate.rb
328
411
  - app/components/primer/underline_nav_component.html.erb
329
412
  - app/components/primer/underline_nav_component.rb
330
413
  - app/lib/primer/class_name_helper.rb
@@ -334,6 +417,7 @@ files:
334
417
  - app/lib/primer/classify/functional_border_colors.rb
335
418
  - app/lib/primer/classify/functional_colors.rb
336
419
  - app/lib/primer/classify/functional_text_colors.rb
420
+ - app/lib/primer/classify/spacing.rb
337
421
  - app/lib/primer/fetch_or_fallback_helper.rb
338
422
  - app/lib/primer/join_style_arguments_helper.rb
339
423
  - app/lib/primer/status/dsl.rb