primer_view_components 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 055f773c8e99df5c9bce23d6a5199e71148d0331d6abe6c02fd1f16321a54130
4
- data.tar.gz: e5310f927e76533daa46918acb24b48ea7bdd684a8f8e4c9090e3545a2e7f3fd
3
+ metadata.gz: 9cb2ccfdc2a705a1395c0b18dd535b305cf0b00ef77f778fe6bbc9b6417c3f4a
4
+ data.tar.gz: fa2cea6523b0281502b65d654c11ab4224d345d25a3608a63e92f8680aaeb742
5
5
  SHA512:
6
- metadata.gz: e6b7159b56e4a0674a7ec68e4aa0666bb2a3e3cb5ef7b90e8c418149200af1255789adc87e4b3955a9a2d6e97afb9ebe2746928ccb32ece3395c28de315206dc
7
- data.tar.gz: cc962a06f62249016eccfd224ab3655117ac193fa7f6ebb40aff91212690464047f95e2822bf4b5c8ae83d8c82df02e955f0c8ffc350e9aed85c313623388a61
6
+ metadata.gz: c4506031b1c2e99c36aa9b868e210b15b396b8b38a8347e1b06785510e3caee7b6edb2e4fe0eafb178effa74cd2287e6e7d421d5c04394f5bead62cb0c3b9ffa
7
+ data.tar.gz: 7e3a7b3a2ca8932cbdb563738d040b5ceb1239736ecf7603a3c9cdfa3cf3bc24aa9df3faa251568b9f8020a119bb75ed439a9881342e7e307b708a742fa42897
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## main
4
4
 
5
+ ## 0.0.14
6
+
7
+ * Add functional colors to Label.
8
+
9
+ *Joel Hawksley*
10
+
5
11
  ## 0.0.13
6
12
 
7
13
  * Add support for `xl` breakpoint.
@@ -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
- SCHEME_MAPPINGS = {
7
- # gray
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::SCHEME_OPTIONS) %>
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)
@@ -5,7 +5,7 @@ module Primer
5
5
  module VERSION
6
6
  MAJOR = 0
7
7
  MINOR = 0
8
- PATCH = 13
8
+ PATCH = 14
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH].join(".")
11
11
  end
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.13
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-10 00:00:00.000000000 Z
11
+ date: 2020-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails