playbook_ui 7.0.1.pre.alpha15 → 7.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/data/menu.yml +3 -4
  3. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +1 -0
  4. data/app/pb_kits/playbook/pb_body/body.rb +1 -1
  5. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +0 -1
  6. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +3 -3
  7. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.scss +90 -82
  8. data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.rb +2 -4
  9. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.html.erb +7 -17
  10. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.jsx +9 -32
  11. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.html.erb +7 -18
  12. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.jsx +9 -37
  13. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.html.erb +11 -0
  14. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.jsx +29 -0
  15. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.html.erb +11 -0
  16. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.jsx +34 -0
  17. data/app/pb_kits/playbook/pb_button_toolbar/docs/example.yml +7 -3
  18. data/app/pb_kits/playbook/pb_button_toolbar/docs/index.js +2 -0
  19. data/app/pb_kits/playbook/pb_caption/_caption.html.erb +5 -7
  20. data/app/pb_kits/playbook/pb_caption/docs/example.yml +0 -2
  21. data/app/pb_kits/playbook/pb_caption/docs/index.js +0 -1
  22. data/app/pb_kits/playbook/pb_date_picker/_date_picker.html.erb +2 -1
  23. data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +3 -1
  24. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +2 -3
  25. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +32 -34
  26. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.html.erb +4 -0
  27. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.jsx +13 -0
  28. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.md +1 -0
  29. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dark.html.erb +4 -0
  30. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dark.jsx +13 -0
  31. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.html.erb +2 -1
  32. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.jsx +2 -1
  33. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.html.erb +0 -4
  34. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.jsx +0 -4
  35. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.html.erb +9 -9
  36. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.jsx +8 -8
  37. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.md +1 -3
  38. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb +0 -1
  39. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx +0 -1
  40. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +4 -0
  41. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -0
  42. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.html.erb +14 -8
  43. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +39 -122
  44. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +2 -33
  45. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.rb +9 -44
  46. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.html.erb +1 -14
  47. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.jsx +1 -45
  48. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.html.erb +2 -3
  49. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +15 -29
  50. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +0 -10
  51. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.html.erb +1 -2
  52. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.jsx +2 -1
  53. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +1 -1
  54. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx +1 -1
  55. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.html.erb +1 -1
  56. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.jsx +1 -1
  57. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -2
  58. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +0 -1
  59. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -7
  60. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -1
  61. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
  62. data/app/pb_kits/playbook/pb_form/docs/_form_simple_form.html.erb +3 -3
  63. data/app/pb_kits/playbook/pb_form/docs/_form_simple_form_validate.html.erb +3 -3
  64. data/app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb +0 -1
  65. data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +1 -0
  66. data/app/pb_kits/playbook/pb_popover/_popover.scss +4 -6
  67. data/app/pb_kits/playbook/pb_popover/index.js +1 -3
  68. data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +0 -3
  69. data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +33 -168
  70. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.html.erb +1 -3
  71. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.jsx +8 -10
  72. data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -1
  73. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +16 -14
  74. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +3 -6
  75. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.html.erb +1 -17
  76. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.jsx +1 -17
  77. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.jsx +3 -10
  78. data/app/pb_kits/playbook/pb_progress_step/progress_step.rb +1 -11
  79. data/app/pb_kits/playbook/pb_progress_step/progress_step_item.rb +1 -1
  80. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -12
  81. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -6
  82. data/app/pb_kits/playbook/pb_time/_time.html.erb +20 -17
  83. data/app/pb_kits/playbook/pb_time/_time.jsx +27 -40
  84. data/app/pb_kits/playbook/pb_time/_time.scss +24 -4
  85. data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +1 -4
  86. data/app/pb_kits/playbook/pb_time/docs/_time_default.html.erb +11 -11
  87. data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +1 -13
  88. data/app/pb_kits/playbook/pb_time/docs/_time_sizes.jsx +1 -4
  89. data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +1 -3
  90. data/app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx +2 -7
  91. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +5 -5
  92. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +0 -1
  93. data/app/pb_kits/playbook/pb_toggle/toggle.rb +1 -4
  94. data/app/pb_kits/playbook/pb_typeahead/_typeahead.html.erb +20 -24
  95. data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +1 -19
  96. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +1 -8
  97. data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +13 -21
  98. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb +1 -1
  99. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_context_dark.html.erb +1 -1
  100. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +3 -0
  101. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_summary.jsx +45 -0
  102. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +3 -0
  103. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_summary.jsx +27 -0
  104. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -3
  105. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -24
  106. data/app/pb_kits/playbook/react_rails_kits.js +0 -1
  107. data/app/pb_kits/playbook/vendor.js +0 -3
  108. data/lib/playbook/version.rb +1 -1
  109. metadata +15 -35
  110. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_dark.scss +0 -57
  111. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss +0 -27
  112. data/app/pb_kits/playbook/pb_caption/docs/_caption_block.html.erb +0 -11
  113. data/app/pb_kits/playbook/pb_caption/docs/_caption_block.jsx +0 -28
  114. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +0 -1
  115. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.html.erb +0 -21
  116. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.jsx +0 -38
  117. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +0 -18
  118. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.html.erb +0 -34
  119. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.jsx +0 -68
  120. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.md +0 -2
  121. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.html.erb +0 -61
  122. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.jsx +0 -89
  123. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.md +0 -1
  124. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.html.erb +0 -34
  125. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.jsx +0 -68
  126. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.md +0 -2
  127. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.html.erb +0 -43
  128. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.jsx +0 -80
  129. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.md +0 -1
  130. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.html.erb +0 -34
  131. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.jsx +0 -63
  132. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.md +0 -1
  133. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_options.html.erb +0 -10
  134. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb +0 -25
  135. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.md +0 -8
  136. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.html.erb +0 -30
  137. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md +0 -11
  138. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.html.erb +0 -25
  139. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.md +0 -1
  140. data/lib/tasks/changelog.rake +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56a4cb93a8661659aaab85d401b6bc2dc35fd48c4f79fdff2be38b38a1da8a49
4
- data.tar.gz: d7e29af88a980f946845c64c6585bf1c81bd4a96d8bd8cf3a7c77666b5c1ea1e
3
+ metadata.gz: a2be1d3b6342ecceb4793c54fc1a73599d4fd10654f050dfb03f3add4bc47cfe
4
+ data.tar.gz: a7e28a3f8f6f51d3ad4eb4b317f25934de789758b69a8cae3487e9588ba2f477
5
5
  SHA512:
6
- metadata.gz: 6f3f323a335d3f1a6c440fd791854ddc6ff245d143c836d4d166fa512ca92bec43a02a01c7fbdd77a20059167bce1585300963df94b433d4f0e551530afe31b5
7
- data.tar.gz: c3dace91cad070dccb45fe050e51769b9c20510302dd694d88b0b74ffa8a183ca6065b226711086df0de26a9cef72bb3c5fd3ae3e8fe9948a27a24f2d8ebe98c
6
+ metadata.gz: 5500e6d44e9b25328ea8083f76bade518d1fdef2ea08719b8d4294976a6abaaba54fa70f2979aa475efbd852cd17c32b29343b64d5c31de498072cc5975add16
7
+ data.tar.gz: ab284d720b728e47237108a52044786a161b1963d59b969ff5e4b0b1eeb419480ac86414b165bc9dea4afdae42d7e2414821cfcbba8366290ef3a4f04493f8cf
@@ -55,10 +55,9 @@ kits:
55
55
  - hashtag
56
56
  - pill
57
57
  - popover
58
- - progress:
59
- - progress_pills
60
- - progress_simple
61
- - progress_step
58
+ - progress_pills
59
+ - progress_simple
60
+ - progress_step
62
61
  - section_separator
63
62
  - source
64
63
  - star_rating
@@ -32,6 +32,7 @@ module Playbook
32
32
  def chart_options
33
33
  {
34
34
  id: id,
35
+ className: classname,
35
36
  chartData: chart_data,
36
37
  type: chart_type,
37
38
  title: title,
@@ -5,7 +5,7 @@ module Playbook
5
5
  class Body
6
6
  include Playbook::Props
7
7
  include ActionView::Helpers
8
-
8
+
9
9
  partial "pb_body/body"
10
10
 
11
11
  prop :color, type: Playbook::Props::Enum,
@@ -39,7 +39,6 @@ $pb_button_border_width: 0px;
39
39
  flex-basis: auto;
40
40
  width: fit-content;
41
41
  font-family: $font_family_base;
42
- white-space: nowrap;
43
42
 
44
43
  .loading-icon {
45
44
  position: absolute;
@@ -17,7 +17,7 @@ type ButtonToolbarProps = {
17
17
  onClick?: EventHandler,
18
18
  orientation?: "horizontal" | "vertical",
19
19
  text?: string,
20
- variant?: "primary" | "secondary",
20
+ variant?: string,
21
21
  }
22
22
 
23
23
  const ButtonToolbar = (props: ButtonToolbarProps) => {
@@ -25,18 +25,18 @@ const ButtonToolbar = (props: ButtonToolbarProps) => {
25
25
  aria = {},
26
26
  children,
27
27
  className,
28
+ connected = false,
28
29
  data = {},
29
30
  id,
30
31
  orientation = 'horizontal',
31
32
  text,
32
- variant = 'primary',
33
33
  } = props
34
34
 
35
35
  const ariaProps = buildAriaProps(aria)
36
36
  const dataProps = buildDataProps(data)
37
37
 
38
38
  const classes = classnames(
39
- buildCss('pb_button_toolbar_kit', orientation, variant),
39
+ buildCss('pb_button_toolbar_kit', orientation, { connected }),
40
40
  globalProps(props),
41
41
  className
42
42
  )
@@ -1,101 +1,109 @@
1
1
  @import "../pb_button/button";
2
2
  @import "../pb_button/button_mixins";
3
- @import "./button_toolbar_mixins";
4
- @import "./button_toolbar_dark";
5
3
  @import "../tokens/colors";
6
- @import "../tokens/opacity";
7
4
 
8
5
  [class^=pb_button_toolbar]{
6
+ // Orientation =========
7
+ &[class*=_horizontal] {
8
+ display: inline-flex;
9
+ flex-direction: row;
10
+ align-items: center;
11
+ justify-content: flex-start;
12
+
13
+ & > [class^=pb_button] {
14
+ margin-right: $space-xs;
9
15
 
10
- // Horizontal =============
16
+ @media (hover:hover) {
17
+ &:hover {
18
+ background-color:darken($royal, 20%);
19
+ }
20
+ }
11
21
 
12
- &[class*=_horizontal] {
13
- display: inline-flex;
14
- flex-direction: row;
15
- align-items: center;
16
- justify-content: flex-start;
17
- & > [class^=pb_button] {
18
- &:not(:last-child){
19
- border-bottom-right-radius: 0;
20
- border-top-right-radius: 0;
21
- border-right-width: 0;
22
- }
23
- &:not(:first-child){
24
- border-bottom-left-radius: 0;
25
- border-top-left-radius: 0;
26
- border-left-width: 0;
27
- }
28
- }
29
- &[class*=_primary] {
30
- & > [class^=pb_button]:not(:first-child)::before {
31
- @include toolbar_border(false, $primary_border)
32
- }
33
- }
34
- &[class*=_secondary] {
35
- & > [class^=pb_button]:not(:first-child)::before {
36
- @include toolbar_border(false, $secondary_border)
22
+ &[class*=secondary] {
23
+ @media (hover:hover) {
24
+ &:hover {
25
+ background-color:rgba($primary_action, $opacity_3)
26
+ }
27
+ }
28
+ }
29
+
30
+ &:last-child {
31
+ margin-right: 0;
32
+ }
37
33
  }
38
34
  }
39
- & > [class^=pb_button]:not(:first-child):hover::before,
40
- [class^=pb_button]:hover + [class^=pb_button]::before {
41
- opacity: 0
42
- }
43
- }
35
+ &[class*=_vertical] {
36
+ display: inline-flex;
37
+ flex-direction: column;
38
+ align-items: flex-start;
39
+ justify-content: center;
40
+
41
+ & > [class^=pb_button] {
42
+ display: block;
43
+ flex-grow: 1;
44
+ flex-shrink: 1;
45
+ flex-basis: auto;
46
+ width: 100%;
47
+ margin-bottom: $space-xs;
44
48
 
45
- // Vertical =============
49
+ @media (hover:hover) {
50
+ &:hover {
51
+ background-color:darken($royal, 20%);
52
+ }
53
+ }
46
54
 
47
- &[class*=_vertical] {
48
- display: inline-flex;
49
- flex-direction: column;
50
- align-items: flex-start;
51
- justify-content: center;
52
- & > [class^=pb_button] {
53
- display: block;
54
- flex-grow: 1;
55
- flex-shrink: 1;
56
- flex-basis: auto;
57
- width: 100%;
58
- &:not(:last-child){
59
- border-bottom-right-radius: 0;
60
- border-bottom-left-radius: 0;
61
- border-bottom-width: 0;
62
- }
63
- &:not(:first-child){
64
- border-top-right-radius: 0;
65
- border-top-left-radius: 0;
66
- border-top-width: 0;
67
- }
68
- }
69
- &[class*=_primary] {
70
- & > [class^=pb_button]:not(:first-child)::before {
71
- @include toolbar_border(true, $primary_border)
72
- }
73
- }
74
- &[class*=_secondary] {
75
- & > [class^=pb_button]:not(:first-child)::before {
76
- @include toolbar_border(true, $secondary_border)
55
+ &[class*=secondary] {
56
+ @media (hover:hover) {
57
+ &:hover {
58
+ background-color:rgba($primary_action, $opacity_3)
59
+ }
60
+ }
61
+ }
62
+
63
+ &:last-child {
64
+ margin-bottom: 0;
65
+ }
77
66
  }
78
67
  }
79
- & > [class^=pb_button]:not(:first-child):hover::before,
80
- [class^=pb_button]:hover + [class^=pb_button]::before {
81
- opacity: 0
82
- }
83
- }
84
68
 
85
- // Hover =============
69
+ // Connect =============
70
+ &[class*=_connected] {
71
+ & > [class^=pb_button] {
72
+ margin: 0;
73
+ }
86
74
 
87
- & > [class^=pb_button] {
88
- @media (hover:hover) {
89
- &:hover {
90
- background-color:darken($royal, 20%);
75
+ &[class*=_horizontal] {
76
+ & > [class^=pb_button] {
77
+ &:not(:last-child){
78
+ border-bottom-right-radius: 0;
79
+ border-top-right-radius: 0;
80
+ border-right-width: 0;
81
+ border: 1px solid #e1e4e8;
82
+ }
83
+ &:not(:first-child){
84
+ border-bottom-left-radius: 0;
85
+ border-top-left-radius: 0;
86
+ border-left-width: 0;
87
+ border: 1px solid #e1e4e8;
88
+ }
89
+ }
91
90
  }
92
- }
93
- &[class*=secondary] {
94
- @media (hover:hover) {
95
- &:hover {
96
- background-color:rgba($primary_action, $opacity_3)
91
+
92
+ &[class*=_vertical] {
93
+ & > [class^=pb_button] {
94
+ &:not(:last-child){
95
+ border-bottom-right-radius: 0;
96
+ border-bottom-left-radius: 0;
97
+ border-bottom-width: 0;
98
+ border: 1px solid #e1e4e8;
99
+ }
100
+ &:not(:first-child){
101
+ border-top-right-radius: 0;
102
+ border-top-left-radius: 0;
103
+ border-top-width: 0;
104
+ border: 1px solid #e1e4e8;
105
+ }
97
106
  }
98
107
  }
99
108
  }
100
- }
101
- }
109
+ }
@@ -12,13 +12,11 @@ module Playbook
12
12
  prop :orientation, type: Playbook::Props::Enum,
13
13
  values: %w[horizontal vertical],
14
14
  default: "horizontal"
15
- prop :variant, type: Playbook::Props::Enum,
16
- values: %w[primary secondary],
17
- default: "primary"
15
+
18
16
  prop :text
19
17
 
20
18
  def classname
21
- generate_classname("pb_button_toolbar_kit", orientation, variant)
19
+ generate_classname("pb_button_toolbar_kit", orientation, connected_class)
22
20
  end
23
21
 
24
22
  private
@@ -1,17 +1,7 @@
1
- <div class="pb--doc-demo-row">
2
-
3
- <%= pb_rails("button_toolbar", props: { orientation: "vertical" }) do %>
4
- <%= pb_rails("button", props: { text: "Create" }) %>
5
- <%= pb_rails("button", props: { text: "Edit"}) %>
6
- <%= pb_rails("button", props: { text: "Copy"}) %>
7
- <%= pb_rails("button", props: { text: "Cut"}) %>
8
- <% end %>
9
-
10
- <%= pb_rails("button_toolbar", props: { orientation: "horizontal" }) do %>
11
- <%= pb_rails("button", props: { text: "Create" }) %>
12
- <%= pb_rails("button", props: { text: "Edit" }) %>
13
- <%= pb_rails("button", props: { text: "Copy" }) %>
14
- <%= pb_rails("button", props: { text: "Cut" }) %>
15
- <% end %>
16
-
17
- </div>
1
+ <%= pb_rails("button_toolbar", props: { orientation: "horizontal", connected: true }) do %>
2
+ <%= pb_rails("button", props: { text: "Field" }) %>
3
+ <%= pb_rails("button", props: { text: "Retail"}) %>
4
+ <%= pb_rails("button", props: { text: "Event"}) %>
5
+ <%= pb_rails("button", props: { text: "Training"}) %>
6
+ <%= pb_rails("button", props: { text: "Not Working"}) %>
7
+ <% end %>
@@ -1,49 +1,26 @@
1
1
  import React from 'react'
2
2
  import { Button, ButtonToolbar } from '../..'
3
3
 
4
- const ButtonToolbarDefault = (props) => (
5
- <div className="pb--doc-demo-row">
4
+ const ButtonToolbarDefault = () => (
5
+ <div>
6
6
  <ButtonToolbar
7
- {...props}
8
- orientation="vertical"
7
+ connected
8
+ orientation="horizontal"
9
9
  >
10
10
  <Button
11
- {...props}
12
- text="Create"
13
- />
14
- <Button
15
- {...props}
16
- text="Edit"
17
- />
18
- <Button
19
- {...props}
20
- text="Copy"
21
- />
22
- <Button
23
- {...props}
24
- text="Cut"
11
+ text="Field"
25
12
  />
26
- </ButtonToolbar>
27
-
28
- <ButtonToolbar
29
- {...props}
30
- orientation="horizontal"
31
- >
32
13
  <Button
33
- {...props}
34
- text="Create"
14
+ text="Retail"
35
15
  />
36
16
  <Button
37
- {...props}
38
- text="Edit"
17
+ text="Event"
39
18
  />
40
19
  <Button
41
- {...props}
42
- text="Copy"
20
+ text="Training"
43
21
  />
44
22
  <Button
45
- {...props}
46
- text="Cut"
23
+ text="Not Working"
47
24
  />
48
25
  </ButtonToolbar>
49
26
  </div>
@@ -1,18 +1,7 @@
1
-
2
- <div class="pb--doc-demo-row">
3
-
4
- <%= pb_rails("button_toolbar", props: { orientation: "vertical", variant: "secondary" }) do %>
5
- <%= pb_rails("button", props: { text: "Create", variant: "secondary" }) %>
6
- <%= pb_rails("button", props: { text: "Edit", variant: "secondary" }) %>
7
- <%= pb_rails("button", props: { text: "Copy", variant: "secondary" }) %>
8
- <%= pb_rails("button", props: { text: "Cut", variant: "secondary" }) %>
9
- <% end %>
10
-
11
- <%= pb_rails("button_toolbar", props: { orientation: "horizontal", variant: "secondary" }) do %>
12
- <%= pb_rails("button", props: { text: "Create", variant: "secondary" }) %>
13
- <%= pb_rails("button", props: { text: "Edit", variant: "secondary" }) %>
14
- <%= pb_rails("button", props: { text: "Copy", variant: "secondary" }) %>
15
- <%= pb_rails("button", props: { text: "Cut", variant: "secondary" }) %>
16
- <% end %>
17
-
18
- </div>
1
+ <%= pb_rails("button_toolbar", props: { orientation: "horizontal", connected: true }) do %>
2
+ <%= pb_rails("button", props: { text: "Field", variant: "secondary" }) %>
3
+ <%= pb_rails("button", props: { text: "Retail", variant: "secondary"}) %>
4
+ <%= pb_rails("button", props: { text: "Event", variant: "secondary"}) %>
5
+ <%= pb_rails("button", props: { text: "Training", variant: "secondary"}) %>
6
+ <%= pb_rails("button", props: { text: "Not Working", variant: "secondary"}) %>
7
+ <% end %>
@@ -1,58 +1,30 @@
1
1
  import React from 'react'
2
2
  import { Button, ButtonToolbar } from '../..'
3
3
 
4
- const ButtonToolbarSecondary = (props) => (
5
- <div className="pb--doc-demo-row">
4
+ const ButtonToolbarSecondary = () => (
5
+ <div>
6
6
  <ButtonToolbar
7
- {...props}
8
- orientation="vertical"
9
- variant="secondary"
7
+ connected
8
+ orientation="horizontal"
10
9
  >
11
10
  <Button
12
- {...props}
13
- text="Create"
14
- variant="secondary"
15
- />
16
- <Button
17
- {...props}
18
- text="Edit"
11
+ text="Field"
19
12
  variant="secondary"
20
13
  />
21
14
  <Button
22
- {...props}
23
- text="Copy"
24
- variant="secondary"
25
- />
26
- <Button
27
- {...props}
28
- text="Cut"
29
- variant="secondary"
30
- />
31
- </ButtonToolbar>
32
-
33
- <ButtonToolbar
34
- {...props}
35
- orientation="horizontal"
36
- variant="secondary"
37
- >
38
- <Button
39
- {...props}
40
- text="Create"
15
+ text="Retail"
41
16
  variant="secondary"
42
17
  />
43
18
  <Button
44
- {...props}
45
- text="Edit"
19
+ text="Event"
46
20
  variant="secondary"
47
21
  />
48
22
  <Button
49
- {...props}
50
- text="Copy"
23
+ text="Training"
51
24
  variant="secondary"
52
25
  />
53
26
  <Button
54
- {...props}
55
- text="Cut"
27
+ text="Not Working"
56
28
  variant="secondary"
57
29
  />
58
30
  </ButtonToolbar>