playbook_ui 4.7.1 → 4.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +9 -0
  3. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +8 -0
  4. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb +7 -6
  5. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +7 -6
  6. data/app/pb_kits/playbook/pb_currency/_currency.html.erb +2 -1
  7. data/app/pb_kits/playbook/pb_currency/_currency.jsx +11 -3
  8. data/app/pb_kits/playbook/pb_currency/_currency.scss +26 -12
  9. data/app/pb_kits/playbook/pb_currency/currency.rb +22 -6
  10. data/app/pb_kits/playbook/pb_currency/docs/_currency_dark.html.erb +23 -0
  11. data/app/pb_kits/playbook/pb_currency/docs/_currency_dark.jsx +33 -0
  12. data/app/pb_kits/playbook/pb_currency/docs/_currency_large.jsx +2 -2
  13. data/app/pb_kits/playbook/pb_currency/docs/_currency_medium.html.erb +21 -0
  14. data/app/pb_kits/playbook/pb_currency/docs/_currency_medium.jsx +30 -0
  15. data/app/pb_kits/playbook/pb_currency/docs/_currency_small.html.erb +1 -1
  16. data/app/pb_kits/playbook/pb_currency/docs/{_currency_default.jsx → _currency_small.jsx} +2 -2
  17. data/app/pb_kits/playbook/pb_currency/docs/example.yml +5 -1
  18. data/app/pb_kits/playbook/pb_currency/docs/index.js +3 -1
  19. data/app/pb_kits/playbook/pb_filter/_filter.html.erb +1 -1
  20. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +1 -1
  21. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb +88 -0
  22. data/app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb +1 -1
  23. data/app/pb_kits/playbook/pb_filter/docs/example.yml +1 -0
  24. data/app/pb_kits/playbook/pb_filter/filter.rb +2 -2
  25. data/app/pb_kits/playbook/pb_filter/templates/_core.html.erb +45 -0
  26. data/app/pb_kits/playbook/pb_filter/templates/_default.html.erb +13 -37
  27. data/app/pb_kits/playbook/pb_form/form_builder/form_field_builder.rb +1 -0
  28. data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +9 -0
  29. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.html.erb +9 -1
  30. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +3 -2
  31. data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +8 -2
  32. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +55 -13
  33. data/app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_align.jsx +28 -0
  34. data/app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_default.jsx +4 -1
  35. data/app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_muted.jsx +15 -0
  36. data/app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_value.jsx +20 -0
  37. data/app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_width.jsx +15 -0
  38. data/app/pb_kits/playbook/pb_progress_simple/docs/example.yml +6 -0
  39. data/app/pb_kits/playbook/pb_progress_simple/docs/index.js +4 -0
  40. data/app/pb_kits/playbook/pb_select/_select.html.erb +1 -1
  41. data/app/pb_kits/playbook/pb_select/_select.scss +5 -1
  42. data/app/pb_kits/playbook/pb_table/styles/_reset.scss +1 -1
  43. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +4 -1
  44. data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +4 -1
  45. data/app/pb_kits/playbook/pb_textarea/_textarea.scss +15 -0
  46. data/app/pb_kits/playbook/pb_textarea/_textarea_mixin.scss +4 -4
  47. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_resize.html.erb +13 -0
  48. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_resize.jsx +33 -0
  49. data/app/pb_kits/playbook/pb_textarea/docs/example.yml +5 -5
  50. data/app/pb_kits/playbook/pb_textarea/docs/index.js +1 -0
  51. data/app/pb_kits/playbook/pb_textarea/textarea.rb +9 -1
  52. data/app/pb_kits/playbook/plugins/pb_chart.js +5 -0
  53. data/lib/playbook/version.rb +1 -1
  54. metadata +15 -4
  55. data/app/pb_kits/playbook/pb_filter/templates/_single.html.erb +0 -42
@@ -0,0 +1,28 @@
1
+ import React from 'react'
2
+ import { ProgressSimple } from '../..'
3
+
4
+ const ProgressSimpleAlign = () => {
5
+ return (
6
+ <div>
7
+ <ProgressSimple
8
+ align="left"
9
+ percent={45}
10
+ width="100px"
11
+ />
12
+ <br />
13
+ <ProgressSimple
14
+ align="center"
15
+ percent={45}
16
+ width="100px"
17
+ />
18
+ <br />
19
+ <ProgressSimple
20
+ align="right"
21
+ percent={45}
22
+ width="100px"
23
+ />
24
+ </div>
25
+ )
26
+ }
27
+
28
+ export default ProgressSimpleAlign
@@ -1,8 +1,11 @@
1
1
  import React from 'react'
2
+ import { ProgressSimple } from '../..'
2
3
 
3
4
  const ProgressSimpleDefault = () => {
4
5
  return (
5
- <h1>{'Coming Soon...'}</h1>
6
+ <div>
7
+ <ProgressSimple percent={45} />
8
+ </div>
6
9
  )
7
10
  }
8
11
 
@@ -0,0 +1,15 @@
1
+ import React from 'react'
2
+ import { ProgressSimple } from '../..'
3
+
4
+ const ProgressSimpleMuted = () => {
5
+ return (
6
+ <div>
7
+ <ProgressSimple
8
+ muted
9
+ percent={68}
10
+ />
11
+ </div>
12
+ )
13
+ }
14
+
15
+ export default ProgressSimpleMuted
@@ -0,0 +1,20 @@
1
+ import React from 'react'
2
+ import { ProgressSimple } from '../..'
3
+
4
+ const ProgressSimpleValue = () => {
5
+ return (
6
+ <div>
7
+ <ProgressSimple
8
+ align="left"
9
+ percent={68}
10
+ />
11
+ <br />
12
+ <ProgressSimple
13
+ max="10"
14
+ value="2"
15
+ />
16
+ </div>
17
+ )
18
+ }
19
+
20
+ export default ProgressSimpleValue
@@ -0,0 +1,15 @@
1
+ import React from 'react'
2
+ import { ProgressSimple } from '../..'
3
+
4
+ const ProgressSimpleValue = () => {
5
+ return (
6
+ <div>
7
+ <ProgressSimple
8
+ percent={40}
9
+ width="100px"
10
+ />
11
+ </div>
12
+ )
13
+ }
14
+
15
+ export default ProgressSimpleValue
@@ -10,3 +10,9 @@ examples:
10
10
 
11
11
  react:
12
12
  - progress_simple_default: Default
13
+ - progress_simple_value: Setting Values
14
+ - progress_simple_width: Progress Bar Width
15
+ - progress_simple_muted: Muted
16
+ - progress_simple_align: Align
17
+
18
+
@@ -1 +1,5 @@
1
+ export { default as ProgressSimpleAlign } from './_progress_simple_align.jsx'
1
2
  export { default as ProgressSimpleDefault } from './_progress_simple_default.jsx'
3
+ export { default as ProgressSimpleMuted } from './_progress_simple_muted.jsx'
4
+ export { default as ProgressSimpleValue } from './_progress_simple_value.jsx'
5
+ export { default as ProgressSimpleWidth } from './_progress_simple_width.jsx'
@@ -1,5 +1,4 @@
1
1
  <%= content_tag(:div,
2
- id: object.id,
3
2
  data: object.data,
4
3
  aria: object.aria,
5
4
  class: object.classname) do %>
@@ -20,6 +19,7 @@
20
19
  selected: object.selected,
21
20
  disabled: object.disabled_options,
22
21
  ),
22
+ id: object.id,
23
23
  prompt: object.blank_selection,
24
24
  disabled: object.disabled,
25
25
  required: object.required,
@@ -1,11 +1,13 @@
1
1
  @import "../pb_body/body_mixins";
2
2
  @import "../pb_textarea/textarea_mixin";
3
+ @import "../pb_title/title_mixin";
3
4
  @import "../tokens/colors";
4
5
 
5
6
  [class^=pb_select] {
6
7
  margin-bottom: $space_sm;
7
8
  select {
8
9
  @include pb_textarea_light;
10
+ @include pb_title_4;
9
11
  appearance: none;
10
12
  cursor: pointer;
11
13
  box-shadow: inset 0 -11px 20px rgba($primary, 0.05);
@@ -54,6 +56,8 @@
54
56
  &[class*=_dark] {
55
57
  select {
56
58
  @include pb_textarea_dark;
59
+ @include pb_title_4;
60
+ @include pb_title_dark;
57
61
  background: $focus_input_dark;
58
62
  box-shadow: inset 0 -11px 20px rgba($white, 0.05);
59
63
  &:hover, &:active, &:focus {
@@ -74,5 +78,5 @@
74
78
  }
75
79
  }
76
80
  }
77
-
81
+
78
82
  }
@@ -9,7 +9,7 @@
9
9
  thead {
10
10
  tr {
11
11
  th {
12
- text-align: inherit;
12
+ text-align: left;
13
13
  }
14
14
  }
15
15
  }
@@ -1,5 +1,5 @@
1
1
  @import "../pb_textarea/textarea_mixin";
2
- @import "../pb_body/body_mixins";
2
+ @import "../pb_title/title_mixin";
3
3
 
4
4
  [class^=pb_text_input_kit] {
5
5
  .pb_text_input_kit_label {
@@ -17,6 +17,7 @@
17
17
 
18
18
  > input:first-child {
19
19
  @include pb_textarea_light;
20
+ @include pb_title_4;
20
21
  overflow: hidden;
21
22
  }
22
23
 
@@ -35,6 +36,8 @@
35
36
 
36
37
  > input:first-child {
37
38
  @include pb_textarea_dark;
39
+ @include pb_title_4;
40
+ @include pb_title_dark;
38
41
  overflow: hidden;
39
42
  }
40
43
 
@@ -19,6 +19,7 @@ type TextareaProps = {
19
19
  name?: String,
20
20
  rows?: Number,
21
21
  dark?: Boolean,
22
+ resize: 'none' | 'both' | 'horizontal' | 'vertical',
22
23
  onChange?: InputCallback<HTMLTextAreaElement>,
23
24
  }
24
25
 
@@ -26,6 +27,7 @@ const Textarea = ({
26
27
  className,
27
28
  children,
28
29
  dark = false,
30
+ resize = 'none',
29
31
  error,
30
32
  label,
31
33
  name,
@@ -36,9 +38,10 @@ const Textarea = ({
36
38
  }: TextareaProps) => {
37
39
  const textareaClass = `pb_textarea_kit${dark ? '_dark' : ''}`
38
40
  const errorClass = error ? 'error' : null
41
+ const resizeClass = ` resize_${resize}`
39
42
 
40
43
  return (
41
- <div className={classnames(textareaClass, className, errorClass)}>
44
+ <div className={classnames(textareaClass, className, errorClass, resizeClass)}>
42
45
  <Caption
43
46
  dark={dark}
44
47
  text={label}
@@ -1,5 +1,6 @@
1
1
  @import "../pb_body/body_mixins";
2
2
  @import "./textarea_mixin";
3
+ @import "../pb_title/title_mixin";
3
4
 
4
5
  [class^=pb_textarea_kit] {
5
6
  margin-bottom: $space_sm;
@@ -25,6 +26,20 @@
25
26
  border-color: $error;
26
27
  }
27
28
  }
29
+ &.resize_both > textarea {
30
+ resize: both;
31
+ overflow: auto;
32
+ }
33
+ &.resize_horizontal > textarea {
34
+ resize: horizontal;
35
+ overflow: auto;
36
+ }
37
+ &.resize_vertical > textarea {
38
+ resize: vertical;
39
+ overflow: auto;
40
+ }
41
+
42
+
28
43
 
29
44
  &[class*=_dark] {
30
45
  textarea::placeholder {
@@ -2,10 +2,10 @@
2
2
  @import "../tokens/border_radius";
3
3
  @import "../tokens/spacing";
4
4
  @import "../tokens/animation-curves";
5
- @import "../pb_title/title_mixin";
5
+ @import "../pb_body/body_mixins";
6
6
 
7
7
  @mixin pb_textarea($border_color, $background_color, $text_color) {
8
- @include pb_title_4;
8
+ @include pb_body_dark;
9
9
  border: 1px solid $border_color;
10
10
  border-radius: $border_rad_heavier;
11
11
  display: block;
@@ -28,8 +28,8 @@
28
28
  -moz-appearance:textfield;
29
29
  &::-webkit-inner-spin-button,
30
30
  &::-webkit-outer-spin-button {
31
- -webkit-appearance: none;
32
- margin: 0;
31
+ -webkit-appearance: none;
32
+ margin: 0;
33
33
  }
34
34
  }
35
35
  &:disabled, &:disabled:hover, &:disabled:focus, &:disabled:active {
@@ -0,0 +1,13 @@
1
+
2
+
3
+
4
+
5
+ <%= pb_rails("textarea", props: { label: "vertical", placeholder: "Resize Vertical", resize: "vertical" }) %>
6
+
7
+ <br/>
8
+
9
+ <%= pb_rails("textarea", props: { label: "both", placeholder: "Resize Both", resize: "both" }) %>
10
+
11
+ <br/>
12
+
13
+ <%= pb_rails("textarea", props: { label: "horizontal", placeholder: "Resize Horizontal", resize: "horizontal" }) %>
@@ -0,0 +1,33 @@
1
+ import React from 'react'
2
+ import { Textarea } from '../../'
3
+
4
+ const TextareaResize = () => {
5
+ return (
6
+ <div>
7
+ <Textarea
8
+ label="vertical"
9
+ placeholder="Resize Vertical"
10
+ resize="vertical"
11
+ />
12
+
13
+ <br />
14
+
15
+ <Textarea
16
+ label="both"
17
+ placeholder="Resize Both"
18
+ resize="both"
19
+ />
20
+
21
+ <br />
22
+
23
+ <Textarea
24
+ label="horizontal"
25
+ placeholder="Resize Horizontal"
26
+ resize="horizontal"
27
+ />
28
+
29
+ </div>
30
+ )
31
+ }
32
+
33
+ export default TextareaResize
@@ -1,19 +1,19 @@
1
1
  examples:
2
-
2
+
3
3
  rails:
4
4
  - textarea_default: Default
5
5
  - textarea_custom: Custom Textarea Input
6
6
  - textarea_dark: Dark
7
+ - textarea_resize: Resize
7
8
  - textarea_error: Textarea w/ Error
8
9
  - textarea_dark_error: Textarea w/ Error
9
10
 
10
-
11
-
11
+
12
+
12
13
  react:
13
14
  - textarea_default: Default
14
15
  - textarea_custom: Custom Textarea Input
15
16
  - textarea_dark: Dark
17
+ - textarea_resize: Resize
16
18
  - textarea_error: Textarea w/ Error
17
19
  - textarea_dark_error: Textarea w/ Error
18
-
19
-
@@ -1,4 +1,5 @@
1
1
  export { default as TextareaDefault } from './_textarea_default.jsx'
2
+ export { default as TextareaResize } from './_textarea_resize.jsx'
2
3
  export { default as TextareaCustom } from './_textarea_custom.jsx'
3
4
  export { default as TextareaDark } from './_textarea_dark.jsx'
4
5
  export { default as TextareaError } from './_textarea_error.jsx'
@@ -15,12 +15,15 @@ module Playbook
15
15
  prop :method
16
16
  prop :name
17
17
  prop :placeholder
18
+ prop :resize, type: Playbook::Props::Enum,
19
+ values: %w[none both horizontal vertical],
20
+ default: "none"
18
21
  prop :rows, type: Playbook::Props::Number,
19
22
  default: 4
20
23
  prop :value
21
24
 
22
25
  def classname
23
- generate_classname("pb_textarea_kit", dark_class) + error_class
26
+ generate_classname("pb_textarea_kit", dark_class) + error_class + resize_class
24
27
  end
25
28
 
26
29
  private
@@ -32,6 +35,11 @@ module Playbook
32
35
  def error_class
33
36
  error ? " error" : ""
34
37
  end
38
+
39
+ def resize_class
40
+ " resize_#{resize}"
41
+ end
42
+
35
43
  end
36
44
  end
37
45
  end
@@ -43,10 +43,15 @@ class pbChart {
43
43
  text: this.defaults.subtitle,
44
44
  },
45
45
  yAxis: {
46
+ min: this.defaults.yAxisMin,
47
+ max: this.defaults.yAxisMax,
46
48
  title: {
47
49
  text: this.defaults.axisTitle,
48
50
  },
49
51
  },
52
+ xAxis: {
53
+ categories: this.defaults.xAxisCategories,
54
+ },
50
55
  plotOptions: {
51
56
  series: {
52
57
  pointStart: this.defaults.pointStart,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- VERSION = "4.7.1"
4
+ VERSION = "4.8.1"
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: 4.7.1
4
+ version: 4.8.1
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-03-13 00:00:00.000000000 Z
12
+ date: 2020-03-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -659,10 +659,14 @@ files:
659
659
  - app/pb_kits/playbook/pb_currency/_currency.jsx
660
660
  - app/pb_kits/playbook/pb_currency/_currency.scss
661
661
  - app/pb_kits/playbook/pb_currency/currency.rb
662
- - app/pb_kits/playbook/pb_currency/docs/_currency_default.jsx
662
+ - app/pb_kits/playbook/pb_currency/docs/_currency_dark.html.erb
663
+ - app/pb_kits/playbook/pb_currency/docs/_currency_dark.jsx
663
664
  - app/pb_kits/playbook/pb_currency/docs/_currency_large.html.erb
664
665
  - app/pb_kits/playbook/pb_currency/docs/_currency_large.jsx
666
+ - app/pb_kits/playbook/pb_currency/docs/_currency_medium.html.erb
667
+ - app/pb_kits/playbook/pb_currency/docs/_currency_medium.jsx
665
668
  - app/pb_kits/playbook/pb_currency/docs/_currency_small.html.erb
669
+ - app/pb_kits/playbook/pb_currency/docs/_currency_small.jsx
666
670
  - app/pb_kits/playbook/pb_currency/docs/_description.md
667
671
  - app/pb_kits/playbook/pb_currency/docs/example.yml
668
672
  - app/pb_kits/playbook/pb_currency/docs/index.js
@@ -758,12 +762,13 @@ files:
758
762
  - app/pb_kits/playbook/pb_filter/_filter.scss
759
763
  - app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb
760
764
  - app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx
765
+ - app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb
761
766
  - app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb
762
767
  - app/pb_kits/playbook/pb_filter/docs/example.yml
763
768
  - app/pb_kits/playbook/pb_filter/docs/index.js
764
769
  - app/pb_kits/playbook/pb_filter/filter.rb
770
+ - app/pb_kits/playbook/pb_filter/templates/_core.html.erb
765
771
  - app/pb_kits/playbook/pb_filter/templates/_default.html.erb
766
- - app/pb_kits/playbook/pb_filter/templates/_single.html.erb
767
772
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.html.erb
768
773
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx
769
774
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss
@@ -1191,11 +1196,15 @@ files:
1191
1196
  - app/pb_kits/playbook/pb_progress_simple/docs/_description.md
1192
1197
  - app/pb_kits/playbook/pb_progress_simple/docs/_footer.md
1193
1198
  - app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_align.html.erb
1199
+ - app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_align.jsx
1194
1200
  - app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_default.html.erb
1195
1201
  - app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_default.jsx
1196
1202
  - app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_muted.html.erb
1203
+ - app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_muted.jsx
1197
1204
  - app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_value.html.erb
1205
+ - app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_value.jsx
1198
1206
  - app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_width.html.erb
1207
+ - app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_width.jsx
1199
1208
  - app/pb_kits/playbook/pb_progress_simple/docs/example.yml
1200
1209
  - app/pb_kits/playbook/pb_progress_simple/docs/index.js
1201
1210
  - app/pb_kits/playbook/pb_progress_simple/progress_simple.rb
@@ -1402,6 +1411,8 @@ files:
1402
1411
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_error.html.erb
1403
1412
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_error.jsx
1404
1413
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_error.md
1414
+ - app/pb_kits/playbook/pb_textarea/docs/_textarea_resize.html.erb
1415
+ - app/pb_kits/playbook/pb_textarea/docs/_textarea_resize.jsx
1405
1416
  - app/pb_kits/playbook/pb_textarea/docs/example.yml
1406
1417
  - app/pb_kits/playbook/pb_textarea/docs/index.js
1407
1418
  - app/pb_kits/playbook/pb_textarea/textarea.rb