playbook_ui 5.2.0.pre.alpha9 → 5.2.0.pre.alpha10

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: 4ea97b34f1fb0fc9597b9685eb1d5ddeb5b1afb2c8bb388a06ab85ea1cdcc5e3
4
- data.tar.gz: 373b2ca6743d1d71af1292826f14256d9e64ae7c068eec4b8879983bab13a086
3
+ metadata.gz: b1225ea47f826453974d3809f9a5d07ff1632d203265d1d0711ece149ac486a5
4
+ data.tar.gz: fb3c33eb6f8aaa8412f6287b65506773791018ff09311b63c563879e47a8fdce
5
5
  SHA512:
6
- metadata.gz: c86b011f92776f39f70231d1cff7616987d4c40ba2e00a6a1d0b84beb2f8910299350b0ea1e19333e3618aced5fbd2c26d11f4313a71156f5ef831950657da7d
7
- data.tar.gz: 792035eff97feebff53f780d1f075701c0dadc281e59196bb24ad0079f88e4e29b4b1db2e270a55bacf9cb54426e25720e2c16d0824d014d13ba887bb9677166
6
+ metadata.gz: f71982e1200edb2d19bc8ba1a9669dfdef2b426f0259e488c7342ede1d0c2c2eba173855be8f513928bd5955424d5c35c12c35b5efde14e484d7e49799672c86
7
+ data.tar.gz: 9c5e7464414de0e5b39a14d6d4f9f993b689b00456e11124d71931587a1b3d52153a724dc56bb8e4b3c3e914511a26ebea8d390bfedf0c3f0e6bcd14c0aaabed
@@ -1,12 +1 @@
1
- <%= content_tag(:div, "",
2
- aria: object.aria,
3
- id: object.id,
4
- data: object.data,
5
- class: object.classname) %>
6
- <% content_for :pb_js do %>
7
- <%= javascript_tag do %>
8
- window.addEventListener('DOMContentLoaded', function() {
9
- new pbChart('.selector', <%= object.chart_options %>)
10
- })
11
- <% end %>
12
- <% end %>
1
+ <%= react_component('BarGraph', object.chart_options) %>
@@ -44,7 +44,7 @@ module Playbook
44
44
  legend: legend,
45
45
  toggleLegendClick: toggle_legend_click,
46
46
  height: height,
47
- }.to_json.html_safe
47
+ }
48
48
  end
49
49
 
50
50
  def classname
@@ -1,8 +1 @@
1
- <%= content_tag(:figure,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname) do %>
5
- <% object.widths_to_percentages.each do |percentage| %>
6
- <div class="pb_distribution_width" style="width:<%= percentage %>%"></div>
7
- <% end %>
8
- <% end %>
1
+ <%= react_component('DistributionBar', object.chart_options) %>
@@ -13,14 +13,11 @@ module Playbook
13
13
  prop :widths, type: Playbook::Props::NumberArray,
14
14
  default: [1]
15
15
 
16
- def classname
17
- generate_classname("pb_distribution_bar", size)
18
- end
19
-
20
- def widths_to_percentages
21
- widths.map do |width|
22
- (width.to_f * 100 / widths.sum).round(2)
23
- end
16
+ def chart_options
17
+ {
18
+ size: size,
19
+ widths: widths
20
+ }
24
21
  end
25
22
  end
26
23
  end
@@ -1,10 +1 @@
1
- <%= content_tag(:div, object.text,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname) do %>
5
- <%= pb_rails("body", props: {color: object.body_color}) do %>
6
- <span class="pb_legend_indicator_circle"></span>
7
- <%= pb_rails("title", props: { dark: object.dark, text: object.prefix_text, tag: "span", size: 4 }) %>
8
- <%= object.text %>
9
- <% end %>
10
- <% end %>
1
+ <%= react_component('Legend', object.chart_options) %>
@@ -25,6 +25,13 @@ module Playbook
25
25
  def classname
26
26
  generate_classname("pb_legend_kit", color, dark ? "dark" : "light")
27
27
  end
28
+
29
+ def chart_options
30
+ {
31
+ color: color,
32
+ text: text
33
+ }
34
+ end
28
35
  end
29
36
  end
30
37
  end
@@ -1,13 +1 @@
1
- <%= content_tag(:div, "",
2
- aria: object.aria,
3
- id: object.id,
4
- data: object.data,
5
- class: object.classname
6
- ) %>
7
- <% content_for :pb_js do %>
8
- <%= javascript_tag do %>
9
- window.addEventListener('DOMContentLoaded', function() {
10
- new pbChart('.selector', <%= object.chart_options %>)
11
- })
12
- <% end %>
13
- <% end %>
1
+ <%= react_component('LineGraph', object.chart_options) %>
@@ -44,7 +44,7 @@ module Playbook
44
44
  legend: legend,
45
45
  toggleLegendClick: toggle_legend_click,
46
46
  height: height,
47
- }.to_json.html_safe
47
+ }
48
48
  end
49
49
 
50
50
  def classname
@@ -1,10 +1,10 @@
1
1
  @import "./opacity";
2
2
 
3
- //=====================================
4
- // Base colors should not be documented.
5
- // Only document color use.
3
+ /*=====================================
4
+ Base colors should not be documented.
5
+ Only document color use.
6
6
 
7
- // Colors -----------------------------
7
+ Colors -----------------------------*/
8
8
  $royal: #0056CF;
9
9
  $purple: #9E64E9;
10
10
  $teal: #00C4D7;
@@ -22,11 +22,11 @@ $colors: (
22
22
  orange: $orange
23
23
  );
24
24
 
25
- // Specialty Gradient -----------------
25
+ /* Specialty Gradient -----------------*/
26
26
  $gradient_start: #1C75F2;
27
27
  $gradient_end: $royal;
28
28
 
29
- // Interface colors -------------------
29
+ /* Interface colors -------------------*/
30
30
  $white: #FFFFFF;
31
31
  $silver: #F3F7FB;
32
32
  $slate: #C1CDD6;
@@ -42,7 +42,7 @@ $interface_colors: (
42
42
 
43
43
  );
44
44
 
45
- // Main colors ------------------------
45
+ /* Main colors ------------------------*/
46
46
  $primary: $royal;
47
47
  $secondary: $yellow;
48
48
  $tertiary: $purple;
@@ -51,9 +51,9 @@ $main_colors: (
51
51
  secondary: $secondary,
52
52
  tertiary: $tertiary
53
53
  );
54
- //=====================================
54
+ /*=====================================
55
55
 
56
- // Background colors ------------------
56
+ Background colors ------------------*/
57
57
  $bg_light: $silver;
58
58
  $bg_dark: #172257;
59
59
  $background_colors: (
@@ -61,7 +61,7 @@ $background_colors: (
61
61
  bg_dark: $bg_dark
62
62
  );
63
63
 
64
- // Card colors ------------------
64
+ /* Card colors ------------------*/
65
65
  $card_light: $white;
66
66
  $card_dark: rgba($white, $opacity_1);
67
67
  $card_colors: (
@@ -74,15 +74,15 @@ $action_colors: (
74
74
  primary_action: $primary-action
75
75
  );
76
76
 
77
- // Active colors ----------------------
77
+ /* Active colors ----------------------*/
78
78
  $active_light: lighten(#E5F2FF, 3.5%);
79
- $active_dark: #0082ff;
79
+ $active_dark: #0082ff;
80
80
  $active_colors: (
81
81
  active_light: $active_light,
82
82
  active_dark: $active_dark
83
83
  );
84
84
 
85
- // Hover colors -----------------------
85
+ /* Hover colors -----------------------*/
86
86
  $hover_light: darken($silver, 5%);
87
87
  $hover_dark: rgba($white, $opacity_2);
88
88
  $hover_colors: (
@@ -90,7 +90,7 @@ $hover_colors: (
90
90
  hover_dark: $hover_dark
91
91
  );
92
92
 
93
- // Focus colors -----------------------
93
+ /* Focus colors -----------------------*/
94
94
  $focus_input_light: rgba($active_light, $opacity_5);
95
95
  $focus_input_dark: rgba(#144075, $opacity_5);
96
96
  $focus_input_colors: (
@@ -98,7 +98,7 @@ $focus_input_colors: (
98
98
  focus_input_dark: $focus_input_dark
99
99
  );
100
100
 
101
- // Border colors ----------------------
101
+ /* Border colors ----------------------*/
102
102
  $border_light: #E4E8F0;
103
103
  $border_dark: rgba($white, $opacity_1);
104
104
  $border_colors: (
@@ -106,13 +106,13 @@ $border_colors: (
106
106
  border_dark: $border_dark
107
107
  );
108
108
 
109
- // Shadow colors ----------------------
109
+ /* Shadow colors ----------------------*/
110
110
  $shadow: rgba(#3C6AAC, $opacity_2);
111
111
  $shadow_colors: (
112
112
  shadow: $shadow,
113
113
  );
114
114
 
115
- // Text colors ------------------------
115
+ /* Text colors ------------------------*/
116
116
  $text_lt_default: $charcoal;
117
117
  $text_lt_light: #919EAB;
118
118
  $text_lt_lighter: $slate;
@@ -128,7 +128,7 @@ $text_colors: (
128
128
  text_dk_lighter: $text_dk_lighter
129
129
  );
130
130
 
131
- // Data colors ------------------------
131
+ /* Data colors ------------------------*/
132
132
  $data_1: $royal;
133
133
  $data_2: $yellow;
134
134
  $data_3: $purple;
@@ -148,7 +148,7 @@ $data_colors: (
148
148
  data_8: $data_8
149
149
  );
150
150
 
151
- // Status colors ----------------------
151
+ /* Status colors ----------------------*/
152
152
  $success: $green;
153
153
  $warning: $yellow;
154
154
  $error: $red;
@@ -174,10 +174,10 @@ $status_color_text: (
174
174
  primary: $primary
175
175
  );
176
176
 
177
- // Link colors ------------------------
177
+ /* Link colors ------------------------*/
178
178
  $primary_action: $primary;
179
179
 
180
- // Product colors ---------------------
180
+ /* Product colors ---------------------*/
181
181
  $windows: $royal;
182
182
  $siding: $yellow;
183
183
  $doors: $teal;
@@ -195,7 +195,7 @@ $product_colors: (
195
195
  insulation: $insulation
196
196
  );
197
197
 
198
- // Category colors ---------------------
198
+ /* Category colors ---------------------*/
199
199
  $category_1: $royal;
200
200
  $category_2: #0CD2E5;
201
201
  $category_3: $yellow;
@@ -252,7 +252,6 @@ $transparent: transparent;
252
252
  }
253
253
 
254
254
  :export {
255
-
256
255
  @mixin export-colors($colors-list) {
257
256
  @each $name, $color in $colors-list {
258
257
  #{$name}: $color;
@@ -2,7 +2,7 @@
2
2
  $font_family_base: "Proxima Nova", "Helvetica Neue", Helvetica, Arial, sans_serif;
3
3
 
4
4
 
5
- // CLEAN UP AND REMOVE
5
+ /* CLEAN UP AND REMOVE */
6
6
  $font_jumbo: 36px;
7
7
  $font_largest: 32px;
8
8
  $font_larger: 28px;
@@ -29,7 +29,7 @@ $text_smaller: $font_smaller;
29
29
  $text_smallest: $font_smallest;
30
30
 
31
31
 
32
- // Headings
32
+ /* Headings */
33
33
  $heading_1: 48px;
34
34
  $heading_2: 34px;
35
35
  $heading_3: $font_larger;
@@ -38,7 +38,7 @@ $heading_4: $font_base;
38
38
 
39
39
 
40
40
 
41
- // Letter Spacing
41
+ /* Letter Spacing */
42
42
  $lspace_tightest: _.1em;
43
43
  $lspace_tighter: _.07em;
44
44
  $lspace_tight: _.03em;
@@ -52,11 +52,11 @@ $lspace_super_loosest: .2em;
52
52
 
53
53
 
54
54
 
55
- // Standard Font Weights
55
+ /* Standard Font Weights */
56
56
  $bold: 600;
57
57
  $regular: 400;
58
58
 
59
- // Non_Standard Font Weights
59
+ /* Non_Standard Font Weights */
60
60
  $extrabold: 900;
61
61
  $boldest: 800;
62
62
  $bolder: 700;
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- VERSION = "5.2.0.pre.alpha9"
4
+ VERSION = "5.2.0.pre.alpha10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0.pre.alpha9
4
+ version: 5.2.0.pre.alpha10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-07-23 00:00:00.000000000 Z
12
+ date: 2020-07-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack