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 +4 -4
- data/CHANGELOG.md +8 -0
- data/app/components/primer/auto_complete/auto_complete.d.ts +1 -0
- data/app/components/primer/auto_complete/auto_complete.js +1 -0
- data/app/components/primer/beta/blankslate.rb +4 -2
- data/app/components/primer/content.rb +12 -0
- data/app/components/primer/dropdown.rb +2 -2
- data/app/components/primer/popover_component.rb +10 -11
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/tasks/docs.rake +9 -4
- data/static/audited_at.json +1 -0
- data/static/constants.json +2 -0
- data/static/statuses.json +1 -0
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a0eef46f7547daf7226fa12eb8e8a2eb8f8495ef12645137395d445d07be810
|
4
|
+
data.tar.gz: 56446b3333bc7cf9c57f79ca2de272b3b1b45f508aeac153e8b6fab259de88d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 551612b43dd1791b9859485d72ad846d9765dd11e8b1289de4bf0141b9247830318850b224d400dd5362e01013fa38caeab080be72db0b60ea3a5feafa0f176d
|
7
|
+
data.tar.gz: e7136d75e1cf6442d83a5085cf8d0b3b68b8ce0f8c88d1753b452ab5cb28bc3867c39a2a591a680a3446c825bf439c987b212856acdf65561b464a6c80d9b21a
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
# -
|
9
|
-
# -
|
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
|
|
@@ -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
|
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
|
-
|
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
|
45
|
-
|
46
|
-
|
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
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
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
|
-
|
58
|
-
@body_arguments = system_arguments
|
59
|
-
view_context.capture { block&.call }
|
58
|
+
Primer::Content.new
|
60
59
|
}
|
61
60
|
|
62
61
|
# @example Default
|
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
|
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
|
368
|
+
next unless initialize_method&.tags(:example)&.any?
|
364
369
|
|
365
370
|
yard_example_tags = initialize_method.tags(:example)
|
366
371
|
|
data/static/audited_at.json
CHANGED
data/static/constants.json
CHANGED
data/static/statuses.json
CHANGED
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.
|
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:
|
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: '
|
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: '
|
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.
|
592
|
+
rubygems_version: 3.1.2
|
590
593
|
signing_key:
|
591
594
|
specification_version: 4
|
592
595
|
summary: ViewComponents for the Primer Design System
|