playbook_ui 7.1.1 → 7.3.0.pre.alpha3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +1 -0
- data/app/pb_kits/playbook/data/menu.yml +1 -0
- data/app/pb_kits/playbook/index.js +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +2 -1
- data/app/pb_kits/playbook/pb_body/body.rb +1 -1
- data/app/pb_kits/playbook/pb_caption/_caption.html.erb +7 -5
- data/app/pb_kits/playbook/pb_caption/docs/_caption_block.html.erb +11 -0
- data/app/pb_kits/playbook/pb_caption/docs/_caption_block.jsx +28 -0
- data/app/pb_kits/playbook/pb_caption/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_caption/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.jsx +1 -1
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.html.erb +9 -0
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.jsx +142 -0
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.scss +17 -0
- data/app/pb_kits/playbook/pb_collapsible/child_kits/_collapsible_content.html.erb +7 -0
- data/app/pb_kits/playbook/pb_collapsible/child_kits/_collapsible_main.html.erb +16 -0
- data/app/pb_kits/playbook/pb_collapsible/collapsible.rb +15 -0
- data/app/pb_kits/playbook/pb_collapsible/collapsible_content.rb +21 -0
- data/app/pb_kits/playbook/pb_collapsible/collapsible_main.rb +24 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_dark.html.erb +10 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_dark.jsx +17 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default.html.erb +10 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default.jsx +17 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +9 -0
- data/app/pb_kits/playbook/pb_collapsible/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_collapsible/index.js +82 -0
- data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +1 -1
- data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +2 -1
- data/app/pb_kits/playbook/pb_nav/_item.html.erb +3 -0
- data/app/pb_kits/playbook/pb_nav/_item.jsx +14 -1
- data/app/pb_kits/playbook/pb_nav/_nav.jsx +3 -0
- data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +22 -3
- data/app/pb_kits/playbook/pb_nav/docs/_borderless_nav.html.erb +6 -0
- data/app/pb_kits/playbook/pb_nav/docs/_borderless_nav.jsx +29 -0
- data/app/pb_kits/playbook/pb_nav/docs/_with_img_nav.html.erb +7 -0
- data/app/pb_kits/playbook/pb_nav/docs/_with_img_nav.jsx +42 -0
- data/app/pb_kits/playbook/pb_nav/docs/_with_img_nav.md +1 -0
- data/app/pb_kits/playbook/pb_nav/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_nav/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_nav/item.rb +1 -0
- data/app/pb_kits/playbook/pb_nav/nav.rb +6 -1
- data/app/pb_kits/playbook/pb_pill/_pill.scss +1 -0
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +1 -3
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +26 -47
- data/app/pb_kits/playbook/pb_section_separator/_section_separator_mixin.scss +32 -0
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_line.jsx +6 -2
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_text.jsx +2 -1
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_text_background.jsx +2 -1
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical.jsx +9 -3
- data/app/pb_kits/playbook/pb_section_separator/section_separator.rb +1 -1
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.html.erb +4 -4
- data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_options.html.erb +16 -0
- data/app/pb_kits/playbook/pb_selectable_card/docs/example.yml +3 -2
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.rb +16 -9
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.html.erb +3 -2
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_options.html.erb +16 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/example.yml +4 -3
- data/app/pb_kits/playbook/pb_selectable_card_icon/selectable_card_icon.rb +3 -0
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.html.erb +3 -3
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_options.html.erb +15 -0
- data/app/pb_kits/playbook/pb_selectable_icon/docs/example.yml +3 -2
- data/app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb +10 -0
- data/app/pb_kits/playbook/pb_time/_time.html.erb +17 -20
- data/app/pb_kits/playbook/pb_time/_time.jsx +40 -27
- data/app/pb_kits/playbook/pb_time/_time.scss +4 -24
- data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +4 -1
- data/app/pb_kits/playbook/pb_time/docs/_time_default.html.erb +11 -11
- data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +13 -1
- data/app/pb_kits/playbook/pb_time/docs/_time_sizes.jsx +4 -1
- data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +3 -1
- data/app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx +7 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb +3 -2
- data/app/pb_kits/playbook/props.rb +1 -1
- data/app/pb_kits/playbook/props/base.rb +6 -4
- data/app/pb_kits/playbook/vendor.js +3 -0
- data/lib/playbook/version.rb +1 -1
- metadata +30 -4
@@ -1,10 +1,16 @@
|
|
1
1
|
@import "../tokens/colors";
|
2
2
|
@import "../tokens/spacing";
|
3
|
-
@import "../
|
3
|
+
@import "../tokens/opacity";
|
4
|
+
@import "./section_separator_mixin";
|
4
5
|
|
5
|
-
$
|
6
|
+
$section_colors_light: (
|
6
7
|
background: $bg_light,
|
7
|
-
card:
|
8
|
+
card: $card_light,
|
9
|
+
);
|
10
|
+
|
11
|
+
$section_colors_dark: (
|
12
|
+
background: $bg_dark,
|
13
|
+
card: tint($bg_dark,10),
|
8
14
|
);
|
9
15
|
|
10
16
|
[class^=pb_section_separator_kit] {
|
@@ -12,8 +18,7 @@ $section_colors: (
|
|
12
18
|
justify-content: center;
|
13
19
|
align-items: center;
|
14
20
|
position: relative;
|
15
|
-
|
16
|
-
@each $color_name, $color_value in $section_colors {
|
21
|
+
@each $color_name, $color_value in $section_colors_light {
|
17
22
|
&[class*=_#{$color_name}] {
|
18
23
|
span {
|
19
24
|
display: inline-block;
|
@@ -24,64 +29,38 @@ $section_colors: (
|
|
24
29
|
}
|
25
30
|
}
|
26
31
|
}
|
27
|
-
|
28
32
|
&::after {
|
29
|
-
|
30
|
-
height: 1px;
|
31
|
-
width: 100%;
|
32
|
-
background: $border_light;
|
33
|
-
position: absolute;
|
34
|
-
top: 50%;
|
35
|
-
left: 0;
|
36
|
-
z-index: 0;
|
33
|
+
@include section_separator_horizontal(false);
|
37
34
|
}
|
38
|
-
|
39
35
|
&[class*=_horizontal] {
|
40
36
|
justify-content: center;
|
41
37
|
}
|
42
38
|
&[class*=_vertical] {
|
43
39
|
&::after {
|
44
|
-
|
45
|
-
height: 100%;
|
46
|
-
width: 1px;
|
47
|
-
margin-left: $space_xs;
|
48
|
-
margin-right: $space_xs;
|
49
|
-
background: $border_light;
|
50
|
-
position: initial;
|
51
|
-
z-index: 0;
|
40
|
+
@include section_separator_vertical(false);
|
52
41
|
}
|
53
42
|
}
|
54
43
|
|
55
|
-
|
44
|
+
// Dark =========================
|
45
|
+
|
46
|
+
&.dark {
|
56
47
|
&::after {
|
57
|
-
|
58
|
-
height: 1px;
|
59
|
-
width: 100%;
|
60
|
-
background: $border_dark;
|
61
|
-
position: absolute;
|
62
|
-
top: 50%;
|
63
|
-
left: 0;
|
64
|
-
z-index: 0;
|
48
|
+
@include section_separator_horizontal(true);
|
65
49
|
}
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
50
|
+
@each $color_name, $color_value in $section_colors_dark {
|
51
|
+
&[class*=_#{$color_name}] {
|
52
|
+
span {
|
53
|
+
display: inline-block;
|
54
|
+
padding: 0 $space_xs;
|
55
|
+
background: #{$color_value};
|
56
|
+
position: relative;
|
57
|
+
z-index: 1;
|
58
|
+
}
|
73
59
|
}
|
74
60
|
}
|
75
61
|
&[class*=_vertical] {
|
76
62
|
&::after {
|
77
|
-
|
78
|
-
height: 100%;
|
79
|
-
width: 1px;
|
80
|
-
margin-left: $space_xs;
|
81
|
-
margin-right: $space_xs;
|
82
|
-
background: $border_dark;
|
83
|
-
position: initial;
|
84
|
-
z-index: 0;
|
63
|
+
@include section_separator_vertical(true);
|
85
64
|
}
|
86
65
|
}
|
87
66
|
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
@import "../tokens/colors";
|
2
|
+
@import "../tokens/spacing";
|
3
|
+
|
4
|
+
@mixin section_separator_vertical($dark: false) {
|
5
|
+
@if $dark == false {
|
6
|
+
background: $border_light;
|
7
|
+
} @else {
|
8
|
+
background: $border_dark;
|
9
|
+
}
|
10
|
+
content: "";
|
11
|
+
height: 100%;
|
12
|
+
width: 1px;
|
13
|
+
margin-left: $space_xs;
|
14
|
+
margin-right: $space_xs;
|
15
|
+
position: initial;
|
16
|
+
z-index: 0;
|
17
|
+
}
|
18
|
+
|
19
|
+
@mixin section_separator_horizontal($dark: false) {
|
20
|
+
@if $dark == false {
|
21
|
+
background: $border_light;
|
22
|
+
} @else {
|
23
|
+
background: $border_dark;
|
24
|
+
}
|
25
|
+
content: "";
|
26
|
+
height: 1px;
|
27
|
+
width: 100%;
|
28
|
+
position: absolute;
|
29
|
+
top: 50%;
|
30
|
+
left: 0;
|
31
|
+
z-index: 0;
|
32
|
+
}
|
@@ -1,9 +1,13 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import { SectionSeparator } from '../../'
|
3
3
|
|
4
|
-
const SectionSeparatorLine = () => {
|
4
|
+
const SectionSeparatorLine = (props) => {
|
5
5
|
return (
|
6
|
-
<
|
6
|
+
<div>
|
7
|
+
<SectionSeparator
|
8
|
+
{...props}
|
9
|
+
/>
|
10
|
+
</div>
|
7
11
|
)
|
8
12
|
}
|
9
13
|
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import { SectionSeparator } from '../../'
|
3
3
|
|
4
|
-
const SectionSeparatorTextBackground = () => {
|
4
|
+
const SectionSeparatorTextBackground = (props) => {
|
5
5
|
return (
|
6
6
|
<SectionSeparator
|
7
|
+
{...props}
|
7
8
|
text="Title Separator"
|
8
9
|
variant="background"
|
9
10
|
/>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import { Flex, FlexItem, SectionSeparator } from '../../'
|
3
3
|
|
4
|
-
const SectionSeparatorVertical = () => {
|
4
|
+
const SectionSeparatorVertical = (props) => {
|
5
5
|
return (
|
6
6
|
<Flex
|
7
7
|
inline="flex-container"
|
@@ -10,11 +10,17 @@ const SectionSeparatorVertical = () => {
|
|
10
10
|
<FlexItem>
|
11
11
|
{'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua'}
|
12
12
|
</FlexItem>
|
13
|
-
<SectionSeparator
|
13
|
+
<SectionSeparator
|
14
|
+
{...props}
|
15
|
+
orientation="vertical"
|
16
|
+
/>
|
14
17
|
<FlexItem>
|
15
18
|
{'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua'}
|
16
19
|
</FlexItem>
|
17
|
-
<SectionSeparator
|
20
|
+
<SectionSeparator
|
21
|
+
{...props}
|
22
|
+
orientation="vertical"
|
23
|
+
/>
|
18
24
|
<FlexItem>
|
19
25
|
{'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua'}
|
20
26
|
</FlexItem>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
class: object.classname) do %>
|
5
5
|
|
6
6
|
<% if object.multi %>
|
7
|
-
<%= check_box_tag
|
7
|
+
<%= check_box_tag(object.name, object.value, object.checked, object.additional_input_options) %>
|
8
8
|
<% else %>
|
9
|
-
<%= radio_button_tag
|
9
|
+
<%= radio_button_tag(object.name, object.value, object.checked, object.additional_input_options) %>
|
10
10
|
<% end %>
|
11
11
|
|
12
12
|
<label for="<%= object.input_id_present %>">
|
@@ -17,9 +17,9 @@
|
|
17
17
|
<% end %>
|
18
18
|
<% if object.icon %>
|
19
19
|
<div class="pb_selectable_card_circle">
|
20
|
-
<%= pb_rails("icon", props: { icon: "check", fixed_width: true}) %>
|
20
|
+
<%= pb_rails("icon", props: { icon: "check", fixed_width: true }) %>
|
21
21
|
</div>
|
22
22
|
<% end %>
|
23
23
|
</label>
|
24
24
|
|
25
|
-
<% end %>
|
25
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="pb--doc-demo-row">
|
2
|
+
|
3
|
+
<%= pb_rails("selectable_card", props: {
|
4
|
+
text: "Selected With Options",
|
5
|
+
input_id: "selected_with options",
|
6
|
+
name: "selected_with options",
|
7
|
+
value: "selected_with options",
|
8
|
+
checked: true,
|
9
|
+
input_options: {
|
10
|
+
class: "input-class",
|
11
|
+
name: "overwriting-name",
|
12
|
+
value: "overwriting-value",
|
13
|
+
}
|
14
|
+
}) %>
|
15
|
+
|
16
|
+
</div>
|
@@ -1,11 +1,12 @@
|
|
1
1
|
examples:
|
2
|
-
|
2
|
+
|
3
3
|
rails:
|
4
4
|
- selectable_card_default: Default
|
5
5
|
- selectable_card_single_select: Single Select
|
6
6
|
- selectable_card_block: Block
|
7
|
+
- selectable_card_options: With Options
|
8
|
+
|
7
9
|
|
8
|
-
|
9
10
|
react:
|
10
11
|
- selectable_card_default: Default
|
11
12
|
- selectable_card_single_select: Single Select
|
@@ -8,21 +8,21 @@ module Playbook
|
|
8
8
|
partial "pb_selectable_card/selectable_card"
|
9
9
|
|
10
10
|
prop :checked, type: Playbook::Props::Boolean,
|
11
|
-
|
11
|
+
default: false
|
12
12
|
prop :disabled, type: Playbook::Props::Boolean,
|
13
|
-
|
13
|
+
default: false
|
14
14
|
prop :icon, type: Playbook::Props::Boolean,
|
15
15
|
default: false
|
16
16
|
prop :multi, type: Playbook::Props::Boolean,
|
17
|
-
|
17
|
+
default: true
|
18
18
|
prop :input_id, type: Playbook::Props::String
|
19
|
+
|
20
|
+
prop :input_options, type: Playbook::Props::Hash,
|
21
|
+
default: {}
|
19
22
|
prop :name
|
20
23
|
prop :text
|
21
24
|
prop :value
|
22
25
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
26
|
def classname
|
27
27
|
generate_classname("pb_selectable_card_kit", checked_class, enable_disabled_class)
|
28
28
|
end
|
@@ -31,10 +31,17 @@ module Playbook
|
|
31
31
|
input_id.present? ? input_id : name
|
32
32
|
end
|
33
33
|
|
34
|
+
def additional_input_options
|
35
|
+
input_options.merge(
|
36
|
+
id: input_id_present,
|
37
|
+
disabled: disabled
|
38
|
+
)
|
39
|
+
end
|
40
|
+
|
34
41
|
private
|
35
|
-
|
42
|
+
|
36
43
|
def checked_class
|
37
|
-
checked ? "checked" : nil
|
44
|
+
checked ? "checked" : nil
|
38
45
|
end
|
39
46
|
|
40
47
|
def enable_disabled_class
|
@@ -42,4 +49,4 @@ module Playbook
|
|
42
49
|
end
|
43
50
|
end
|
44
51
|
end
|
45
|
-
end
|
52
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= content_tag(:div,
|
2
2
|
data: object.data,
|
3
3
|
class: object.classname) do %>
|
4
|
-
|
4
|
+
|
5
5
|
<%= pb_rails("selectable_card", props: {
|
6
6
|
input_id: object.input_id,
|
7
7
|
name: object.name,
|
@@ -10,7 +10,8 @@
|
|
10
10
|
disabled: object.disabled,
|
11
11
|
icon: object.checkmark,
|
12
12
|
multi: object.multi,
|
13
|
-
dark: object.dark
|
13
|
+
dark: object.dark,
|
14
|
+
input_options: object.input_options
|
14
15
|
}) do %>
|
15
16
|
|
16
17
|
<%= pb_rails("selectable_icon", props: {
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="pb--doc-demo-row">
|
2
|
+
|
3
|
+
<%= pb_rails("selectable_card_icon", props: {
|
4
|
+
icon: "chart-line",
|
5
|
+
title_text: "Quarterly Report",
|
6
|
+
body_text: "Export",
|
7
|
+
input_id: "card-icon-id",
|
8
|
+
checked: true,
|
9
|
+
input_options: {
|
10
|
+
class: "input-class",
|
11
|
+
name: "overwriting-name",
|
12
|
+
value: "overwriting-value",
|
13
|
+
}
|
14
|
+
}) %>
|
15
|
+
|
16
|
+
</div>
|
@@ -1,12 +1,13 @@
|
|
1
1
|
examples:
|
2
|
-
|
2
|
+
|
3
3
|
rails:
|
4
4
|
- selectable_card_icon_default: Default
|
5
5
|
- selectable_card_icon_checkmark: Checkmark
|
6
6
|
- selectable_card_icon_single_select: Single Select
|
7
|
+
- selectable_card_icon_options: With Options
|
8
|
+
|
9
|
+
|
7
10
|
|
8
|
-
|
9
|
-
|
10
11
|
react:
|
11
12
|
- selectable_card_icon_default: Default
|
12
13
|
- selectable_card_icon_checkmark: Checkmark
|
@@ -4,15 +4,15 @@
|
|
4
4
|
class: object.classname) do %>
|
5
5
|
|
6
6
|
<% if object.inputs == "disabled" %>
|
7
|
-
|
7
|
+
|
8
8
|
<%= pb_rails("icon", props: { icon: object.icon, size: "2x" }) %>
|
9
9
|
<%= pb_rails("title", props: { text: object.text, tag: "h4", size: 4 }) %>
|
10
10
|
|
11
11
|
<% else %>
|
12
12
|
<% if object.multi %>
|
13
|
-
<%= check_box_tag
|
13
|
+
<%= check_box_tag(object.name, object.value, object.checked, object.additional_input_options) %>
|
14
14
|
<% else %>
|
15
|
-
<%= radio_button_tag
|
15
|
+
<%= radio_button_tag(object.name, object.value, object.checked, object.additional_input_options) %>
|
16
16
|
<% end %>
|
17
17
|
|
18
18
|
<label for="<%= object.input_id_present %>">
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="pb--doc-demo-row">
|
2
|
+
|
3
|
+
<%= pb_rails("selectable_icon", props: {
|
4
|
+
icon: "dollar-sign",
|
5
|
+
input_id: "options-id",
|
6
|
+
checked: true,
|
7
|
+
text: "US Dollar",
|
8
|
+
input_options: {
|
9
|
+
class: "input-class",
|
10
|
+
name: "overwriting-name",
|
11
|
+
value: "overwriting-value",
|
12
|
+
}
|
13
|
+
}) %>
|
14
|
+
|
15
|
+
</div>
|
@@ -1,10 +1,11 @@
|
|
1
1
|
examples:
|
2
|
-
|
2
|
+
|
3
3
|
rails:
|
4
4
|
- selectable_icon_default: Default
|
5
5
|
- selectable_icon_single_select: Single Select
|
6
|
+
- selectable_icon_options: With Options
|
7
|
+
|
6
8
|
|
7
|
-
|
8
9
|
react:
|
9
10
|
- selectable_icon_default: Default
|
10
11
|
- selectable_icon_single_select: Single Select
|