primer_view_components 0.0.66 → 0.0.67

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4a6941b7f05efc52cc514263c9d727dcccd549e0dd135ceb960c15e47aaf525
4
- data.tar.gz: fe5dfd05411605f430910fd91439282a7fa7cfb75d1044648a5ca8373f44d668
3
+ metadata.gz: 1a0eef46f7547daf7226fa12eb8e8a2eb8f8495ef12645137395d445d07be810
4
+ data.tar.gz: 56446b3333bc7cf9c57f79ca2de272b3b1b45f508aeac153e8b6fab259de88d5
5
5
  SHA512:
6
- metadata.gz: 6e439f3027b7fbc6400c10ade09932ef6b3194f6ee2d0bf85aa6f741dc099128257cde449f7e4652e76f883b5740be4ed6bdf524ca47bc891a8a3974774522b2
7
- data.tar.gz: 4d80d97768d80aeb523f25ff4403d7e4685048a537249e827941fb7e2cf503b380c7c90bccdd193e121fecef8197a2922c74c16c872bfa44f07c3d2d04cd19d4
6
+ metadata.gz: 551612b43dd1791b9859485d72ad846d9765dd11e8b1289de4bf0141b9247830318850b224d400dd5362e01013fa38caeab080be72db0b60ea3a5feafa0f176d
7
+ data.tar.gz: e7136d75e1cf6442d83a5085cf8d0b3b68b8ce0f8c88d1753b452ab5cb28bc3867c39a2a591a680a3446c825bf439c987b212856acdf65561b464a6c80d9b21a
data/CHANGELOG.md CHANGED
@@ -30,6 +30,14 @@ The category for changes related to documentation, testing and tooling. Also, fo
30
30
 
31
31
  ## main
32
32
 
33
+ ## 0.0.67
34
+
35
+ ## 0.0.67
36
+
37
+ - Updating octicons to `> 16`
38
+
39
+ _Jon Rohan_
40
+
33
41
  ## 0.0.66
34
42
 
35
43
  - Revert optimization changes to utilities.
@@ -0,0 +1 @@
1
+ import '@github/auto-complete-element';
@@ -0,0 +1 @@
1
+ import '@github/auto-complete-element';
@@ -5,9 +5,11 @@ module Primer
5
5
  # Use `Blankslate` when there is a lack of content within a page or section. Use as placeholder to tell users why something isn't there.
6
6
  #
7
7
  # @accessibility
8
- # - Set the `heading` level based on what is appropriate for your page hierarchy. <%= link_to_heading_practices %>
9
- # - `secondary_action` can be set to provide more information that is relevant in the context of the `Blankslate`.
8
+ # - The blankslate uses a semantic heading that must be set at the appropriate level based on the hierarchy of the page.
9
+ # - All blankslate visuals have been programmed as decorative images, using `aria-hidden=”true”` and `img alt=””`, which will hide the visual from screen reader users.
10
+ # - The blankslate supports a primary and secondary action. Both actions have been built as semantic links with primary and secondary styling.
10
11
  # - `secondary_action` text should be meaningful out of context and clearly describe the destination. Avoid using vague text like, "Learn more" or "Click here".
12
+ # - The blankslate can leverage the spinner component, which will communicate to screen reader users that the content is still loading.
11
13
  class Blankslate < Primer::Component
12
14
  status :beta
13
15
 
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Primer
4
+ # Use `Content` as a helper to render content passed to a slot without adding any tags.
5
+ class Content < Primer::Component
6
+ status :stable
7
+
8
+ def call
9
+ content
10
+ end
11
+ end
12
+ end
@@ -6,12 +6,12 @@ module Primer
6
6
  class Dropdown < Primer::Component
7
7
  # Required trigger for the dropdown. Has the same arguments as <%= link_to_component(Primer::ButtonComponent) %>,
8
8
  # but it is locked as a `summary` tag.
9
- renders_one :button, lambda { |**system_arguments, &block|
9
+ renders_one :button, lambda { |**system_arguments|
10
10
  @button_arguments = system_arguments
11
11
  @button_arguments[:button] = true
12
12
  @button_arguments[:dropdown] = @with_caret
13
13
 
14
- view_context.capture { block&.call }
14
+ Primer::Content.new
15
15
  }
16
16
 
17
17
  # Required context menu for the dropdown.
@@ -41,22 +41,21 @@ module Primer
41
41
  # @param caret [Symbol] <%= one_of(Primer::PopoverComponent::CARET_MAPPINGS.keys) %>
42
42
  # @param large [Boolean] Whether to use the large version of the component.
43
43
  # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
44
- renders_one :body, lambda { |caret: CARET_DEFAULT, large: false, **system_arguments, &block|
45
- system_arguments[:classes] = class_names(
46
- system_arguments[:classes],
44
+ renders_one :body, lambda { |caret: CARET_DEFAULT, large: false, **system_arguments|
45
+ @body_arguments = system_arguments
46
+ @body_arguments[:classes] = class_names(
47
+ @body_arguments[:classes],
47
48
  "Popover-message Box",
48
49
  CARET_MAPPINGS[fetch_or_fallback(CARET_MAPPINGS.keys, caret, CARET_DEFAULT)],
49
50
  "Popover-message--large" => large
50
51
  )
51
- system_arguments[:p] ||= 4
52
- system_arguments[:mt] ||= 2
53
- system_arguments[:mx] ||= :auto
54
- system_arguments[:text_align] ||= :left
55
- system_arguments[:box_shadow] ||= :large
52
+ @body_arguments[:p] ||= 4
53
+ @body_arguments[:mt] ||= 2
54
+ @body_arguments[:mx] ||= :auto
55
+ @body_arguments[:text_align] ||= :left
56
+ @body_arguments[:box_shadow] ||= :large
56
57
 
57
- # This is a hack to allow the parent to set the slot's content
58
- @body_arguments = system_arguments
59
- view_context.capture { block&.call }
58
+ Primer::Content.new
60
59
  }
61
60
 
62
61
  # @example Default
@@ -5,7 +5,7 @@ module Primer
5
5
  module VERSION
6
6
  MAJOR = 0
7
7
  MINOR = 0
8
- PATCH = 66
8
+ PATCH = 67
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH].join(".")
11
11
  end
data/lib/tasks/docs.rake CHANGED
@@ -315,7 +315,6 @@ namespace :docs do
315
315
  nav_entries = Dir[File.join(*%w[adr *.md])].sort.map do |orig_path|
316
316
  orig_file_name = File.basename(orig_path)
317
317
  url_name = orig_file_name.chomp(".md")
318
- title = ActiveSupport::Inflector.titleize(url_name.sub(/\A\d+-/, ""))
319
318
 
320
319
  file_contents = File.read(orig_path)
321
320
  file_contents = <<~CONTENTS.sub(/\n+\z/, "\n")
@@ -323,6 +322,12 @@ namespace :docs do
323
322
  #{file_contents}
324
323
  CONTENTS
325
324
 
325
+ title_match = /^# (.+)/.match(file_contents)
326
+ title = title_match[1]
327
+
328
+ # Don't include initial ADR for recording ADRs
329
+ next nil if title == "Record architecture decisions"
330
+
326
331
  File.write(File.join(adr_content_dir, orig_file_name), file_contents)
327
332
  puts "Copied #{orig_path}"
328
333
 
@@ -332,9 +337,9 @@ namespace :docs do
332
337
  nav_yaml_file = File.join(*%w[docs src @primer gatsby-theme-doctocat nav.yml])
333
338
  nav_yaml = YAML.load_file(nav_yaml_file)
334
339
  adr_entry = {
335
- "title" => "Architecture Decisions",
340
+ "title" => "Architecture decisions",
336
341
  "url" => "/adr",
337
- "children" => nav_entries
342
+ "children" => nav_entries.compact
338
343
  }
339
344
 
340
345
  existing_index = nav_yaml.index { |entry| entry["url"] == "/adr" }
@@ -360,7 +365,7 @@ namespace :docs do
360
365
  short_name = component.name.gsub(/Primer|::/, "")
361
366
  initialize_method = documentation.meths.find(&:constructor?)
362
367
 
363
- next unless initialize_method.tags(:example).any?
368
+ next unless initialize_method&.tags(:example)&.any?
364
369
 
365
370
  yard_example_tags = initialize_method.tags(:example)
366
371
 
@@ -28,6 +28,7 @@
28
28
  "Primer::ButtonGroup": "",
29
29
  "Primer::ClipboardCopy": "",
30
30
  "Primer::CloseButton": "",
31
+ "Primer::Content": "",
31
32
  "Primer::CounterComponent": "",
32
33
  "Primer::DetailsComponent": "",
33
34
  "Primer::Dropdown": "",
@@ -317,6 +317,8 @@
317
317
  "submit"
318
318
  ]
319
319
  },
320
+ "Primer::Content": {
321
+ },
320
322
  "Primer::CounterComponent": {
321
323
  "DEFAULT_SCHEME": "default",
322
324
  "DEPRECATED_SCHEME_OPTIONS": [
data/static/statuses.json CHANGED
@@ -28,6 +28,7 @@
28
28
  "Primer::ButtonGroup": "beta",
29
29
  "Primer::ClipboardCopy": "beta",
30
30
  "Primer::CloseButton": "beta",
31
+ "Primer::Content": "stable",
31
32
  "Primer::CounterComponent": "beta",
32
33
  "Primer::DetailsComponent": "beta",
33
34
  "Primer::Dropdown": "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.66
4
+ version: 0.0.67
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-12-17 00:00:00.000000000 Z
11
+ date: 2022-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '15'
47
+ version: '16'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '15'
54
+ version: '16'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: view_component
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -391,6 +391,8 @@ files:
391
391
  - app/components/primer/alpha/underline_nav.rb
392
392
  - app/components/primer/alpha/underline_panels.html.erb
393
393
  - app/components/primer/alpha/underline_panels.rb
394
+ - app/components/primer/auto_complete/auto_complete.d.ts
395
+ - app/components/primer/auto_complete/auto_complete.js
394
396
  - app/components/primer/base_button.rb
395
397
  - app/components/primer/base_component.rb
396
398
  - app/components/primer/beta/auto_complete.rb
@@ -425,6 +427,7 @@ files:
425
427
  - app/components/primer/clipboard_copy_component.ts
426
428
  - app/components/primer/close_button.rb
427
429
  - app/components/primer/component.rb
430
+ - app/components/primer/content.rb
428
431
  - app/components/primer/counter_component.rb
429
432
  - app/components/primer/details_component.html.erb
430
433
  - app/components/primer/details_component.rb
@@ -586,7 +589,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
586
589
  - !ruby/object:Gem::Version
587
590
  version: '0'
588
591
  requirements: []
589
- rubygems_version: 3.1.6
592
+ rubygems_version: 3.1.2
590
593
  signing_key:
591
594
  specification_version: 4
592
595
  summary: ViewComponents for the Primer Design System