primer_view_components 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/components/primer/label_component.rb +13 -7
- data/lib/primer/view_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cb2ccfdc2a705a1395c0b18dd535b305cf0b00ef77f778fe6bbc9b6417c3f4a
|
4
|
+
data.tar.gz: fa2cea6523b0281502b65d654c11ab4224d345d25a3608a63e92f8680aaeb742
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4506031b1c2e99c36aa9b868e210b15b396b8b38a8347e1b06785510e3caee7b6edb2e4fe0eafb178effa74cd2287e6e7d421d5c04394f5bead62cb0c3b9ffa
|
7
|
+
data.tar.gz: 7e3a7b3a2ca8932cbdb563738d040b5ceb1239736ecf7603a3c9cdfa3cf3bc24aa9df3faa251568b9f8020a119bb75ed439a9881342e7e307b708a742fa42897
|
data/CHANGELOG.md
CHANGED
@@ -3,12 +3,18 @@
|
|
3
3
|
module Primer
|
4
4
|
# Use labels to add contextual metadata to a design.
|
5
5
|
class LabelComponent < Primer::Component
|
6
|
-
|
7
|
-
|
6
|
+
NEW_SCHEME_MAPPINGS = {
|
7
|
+
primary: "Label--primary",
|
8
|
+
secondary: "Label--secondary",
|
9
|
+
info: "Label--info",
|
10
|
+
success: "Label--success",
|
11
|
+
warning: "Label--warning",
|
12
|
+
danger: "Label--danger",
|
13
|
+
}
|
14
|
+
|
15
|
+
DEPRECATED_SCHEME_MAPPINGS = {
|
8
16
|
gray: "Label--gray",
|
9
17
|
dark_gray: "Label--gray-darker",
|
10
|
-
|
11
|
-
# colored
|
12
18
|
yellow: "Label--yellow",
|
13
19
|
orange: "Label--orange",
|
14
20
|
red: "Label--red",
|
@@ -16,11 +22,11 @@ module Primer
|
|
16
22
|
blue: "Label--blue",
|
17
23
|
purple: "Label--purple",
|
18
24
|
pink: "Label--pink",
|
19
|
-
|
20
|
-
# Deprecated
|
21
25
|
outline: "Label--outline",
|
22
26
|
green_outline: "Label--outline-green",
|
23
27
|
}.freeze
|
28
|
+
|
29
|
+
SCHEME_MAPPINGS = NEW_SCHEME_MAPPINGS.merge(DEPRECATED_SCHEME_MAPPINGS)
|
24
30
|
SCHEME_OPTIONS = SCHEME_MAPPINGS.keys << nil
|
25
31
|
|
26
32
|
VARIANT_MAPPINGS = {
|
@@ -42,7 +48,7 @@ module Primer
|
|
42
48
|
# <%= render(Primer::LabelComponent.new(title: "Label: Label", variant: :large)) { "Large" } %>
|
43
49
|
#
|
44
50
|
# @param title [String] `title` attribute for the component element.
|
45
|
-
# @param scheme [Symbol] <%= one_of(Primer::LabelComponent::
|
51
|
+
# @param scheme [Symbol] <%= one_of(Primer::LabelComponent::DEPRECATED_SCHEME_MAPPINGS.keys) %>
|
46
52
|
# @param variant [Symbol] <%= one_of(Primer::LabelComponent::VARIANT_OPTIONS) %>
|
47
53
|
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
|
48
54
|
def initialize(title:, scheme: nil, variant: nil, **system_arguments)
|
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.14
|
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: 2020-11-
|
11
|
+
date: 2020-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|