playbook_ui 14.10.0.pre.alpha.play1465attempt25272 → 14.10.0.pre.alpha.play1662cssbargraph5193
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/pb_advanced_table/_advanced_table.scss +16 -11
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +1 -8
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -4
- data/app/pb_kits/playbook/pb_advanced_table/index.js +95 -143
- data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +8 -50
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +14 -17
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -78
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +3 -4
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +2 -7
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +6 -2
- data/app/pb_kits/playbook/pb_card/_card.scss +3 -21
- data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +0 -18
- data/app/pb_kits/playbook/pb_card/docs/_card_header.jsx +0 -40
- data/app/pb_kits/playbook/pb_dashboard/BarGraphStyles.scss +53 -0
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +13 -1
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +1 -64
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -3
- data/app/pb_kits/playbook/pb_section_separator/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_section_separator/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_section_separator/section_separator.rb +1 -4
- data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.scss +2 -2
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.jsx +2 -10
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +2 -6
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.jsx +3 -11
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +2 -7
- data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.html.erb +12 -8
- data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.rb +1 -48
- data/app/pb_kits/playbook/pb_table/_table.tsx +18 -67
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +1 -4
- data/app/pb_kits/playbook/pb_table/index.ts +17 -17
- data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +2 -38
- data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +3 -17
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +2 -3
- data/app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.tsx +4 -12
- data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +1 -5
- data/app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.tsx +3 -8
- data/app/pb_kits/playbook/pb_typeahead/components/MenuList.tsx +1 -6
- data/app/pb_kits/playbook/pb_typeahead/components/Option.tsx +6 -21
- data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.tsx +6 -13
- data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx +3 -7
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +0 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +2 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_custom_options.jsx +5 -5
- data/dist/chunks/{_typeahead-BhT5aXCY.js → _typeahead-BXXEtXbz.js} +3 -3
- data/dist/chunks/_weekday_stacked-D0yBvHBb.js +45 -0
- data/dist/chunks/{lib-B7sgJtGS.js → lib-sMFo2JZy.js} +1 -1
- data/dist/chunks/{pb_form_validation-C5Cc0-1v.js → pb_form_validation-CgvjWbOK.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +9 -26
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.html.erb +0 -43
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.html.erb +0 -58
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.html.erb +0 -10
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.jsx +0 -42
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.md +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.html.erb +0 -9
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_rails.md +0 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.html.erb +0 -7
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.html.erb +0 -119
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.html.erb +0 -15
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width_rails.md +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.html.erb +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.html.erb +0 -63
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx +0 -88
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx +0 -87
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md +0 -5
- data/dist/chunks/_weekday_stacked-DJOTNDSY.js +0 -45
- /data/app/pb_kits/playbook/pb_skeleton_loading/docs/{_skeleton_loading_border_radius_react.md → _skeleton_loading_border_radius.md} +0 -0
- /data/app/pb_kits/playbook/pb_skeleton_loading/docs/{_skeleton_loading_height_width_react.md → _skeleton_loading_height_width.md} +0 -0
@@ -16,10 +16,8 @@ module Playbook
|
|
16
16
|
generate_classname("pb_table_tr", "bg-white", subrow_depth_classname, separator: " ")
|
17
17
|
end
|
18
18
|
|
19
|
-
def td_classname
|
20
|
-
|
21
|
-
classes << "last-cell" if column[:is_last_in_group]
|
22
|
-
classes.join(" ")
|
19
|
+
def td_classname
|
20
|
+
generate_classname("id-cell", "chrome-styles", separator: " ")
|
23
21
|
end
|
24
22
|
|
25
23
|
def depth_accessors
|
@@ -31,8 +29,6 @@ module Playbook
|
|
31
29
|
private
|
32
30
|
|
33
31
|
def custom_renderer_value(column, index)
|
34
|
-
return nil unless column[:accessor].present?
|
35
|
-
|
36
32
|
if index.zero?
|
37
33
|
if depth.zero?
|
38
34
|
row[column[:accessor].to_sym]
|
@@ -41,7 +37,6 @@ module Playbook
|
|
41
37
|
key = item.to_sym
|
42
38
|
return row[key] if depth - 1 == accessor_index
|
43
39
|
end
|
44
|
-
nil
|
45
40
|
end
|
46
41
|
else
|
47
42
|
row[column[:accessor].to_sym]
|
@@ -1,6 +1,10 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id) do %>
|
2
6
|
<% object.column_definitions.each_with_index do |column, index| %>
|
3
|
-
<%= pb_rails("table/table_cell", props: { classname: object.td_classname}) do %>
|
7
|
+
<%= pb_rails("table/table_cell", props: { tag: "div", classname: object.td_classname}) do %>
|
4
8
|
<%= pb_rails("flex", props:{ align: "center", justify: "start" }) do %>
|
5
9
|
<% if collapsible_trail && index.zero? %>
|
6
10
|
<% (1..depth).each do |i| %>
|
@@ -21,14 +21,6 @@
|
|
21
21
|
border-width: 0px;
|
22
22
|
}
|
23
23
|
|
24
|
-
@function ends-with($string, $suffix) {
|
25
|
-
$suffix-length: str-length($suffix);
|
26
|
-
@if $suffix-length == 0 {
|
27
|
-
@return true;
|
28
|
-
}
|
29
|
-
@return str-slice($string, -$suffix-length) == $suffix;
|
30
|
-
}
|
31
|
-
|
32
24
|
[class^=pb_card_header_kit] {
|
33
25
|
flex-grow: 0;
|
34
26
|
flex-shrink: 0;
|
@@ -38,19 +30,9 @@
|
|
38
30
|
border: 0;
|
39
31
|
border-radius: $pb_card_header_border_radius $pb_card_header_border_radius 0px 0px;
|
40
32
|
@each $color_name, $color_value in $pb_card_header_colors {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
color: lightenText($color_value);
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
@each $color_name, $color_value in $pb_card_header_colors {
|
49
|
-
@if ends-with($color_name, '_subtle') {
|
50
|
-
&[class*="_#{$color_name}"] {
|
51
|
-
@include pb_card_header_color($color_value);
|
52
|
-
color: lightenText($color_value);
|
53
|
-
}
|
33
|
+
&[class*=_#{"" + $color_name}] {
|
34
|
+
@include pb_card_header_color($color_value);
|
35
|
+
color: lightenText($color_value);
|
54
36
|
}
|
55
37
|
}
|
56
38
|
@each $color_name, $color_value in $pb_card_header_colors {
|
@@ -88,21 +88,3 @@
|
|
88
88
|
Body
|
89
89
|
<% end %>
|
90
90
|
<% end %>
|
91
|
-
|
92
|
-
<%= pb_rails("card", props: { padding: "none", header: true, margin_bottom: "sm"}) do %>
|
93
|
-
<%= pb_rails("card/card_header", props: { padding: "sm", header_color: "success_subtle" }) do %>
|
94
|
-
<%= pb_rails("body", props: { text: "Success Subtle" }) %>
|
95
|
-
<% end %>
|
96
|
-
<%= pb_rails("card/card_body", props: { padding: "md" }) do %>
|
97
|
-
Body
|
98
|
-
<% end %>
|
99
|
-
<% end %>
|
100
|
-
|
101
|
-
<%= pb_rails("card", props: { padding: "none", header: true, margin_bottom: "sm"}) do %>
|
102
|
-
<%= pb_rails("card/card_header", props: { padding: "sm", header_color: "error_subtle" }) do %>
|
103
|
-
<%= pb_rails("body", props: { text: "Error Subtle"}) %>
|
104
|
-
<% end %>
|
105
|
-
<%= pb_rails("card/card_body", props: { padding: "md" }) do %>
|
106
|
-
Body
|
107
|
-
<% end %>
|
108
|
-
<% end %>
|
@@ -231,46 +231,6 @@ const CardHeader = (props) => {
|
|
231
231
|
/>
|
232
232
|
</Card.Body>
|
233
233
|
</Card>
|
234
|
-
|
235
|
-
<Card
|
236
|
-
{...props}
|
237
|
-
marginBottom='sm'
|
238
|
-
padding="none"
|
239
|
-
>
|
240
|
-
<Card.Header
|
241
|
-
headerColor="success_subtle"
|
242
|
-
>
|
243
|
-
<Body
|
244
|
-
text="Success Subtle"
|
245
|
-
/>
|
246
|
-
</Card.Header>
|
247
|
-
<Card.Body>
|
248
|
-
<Body
|
249
|
-
{...props}
|
250
|
-
text="Body"
|
251
|
-
/>
|
252
|
-
</Card.Body>
|
253
|
-
</Card>
|
254
|
-
|
255
|
-
<Card
|
256
|
-
{...props}
|
257
|
-
marginBottom='sm'
|
258
|
-
padding="none"
|
259
|
-
>
|
260
|
-
<Card.Header
|
261
|
-
headerColor="error_subtle"
|
262
|
-
>
|
263
|
-
<Body
|
264
|
-
text="Error Subtle"
|
265
|
-
/>
|
266
|
-
</Card.Header>
|
267
|
-
<Card.Body>
|
268
|
-
<Body
|
269
|
-
{...props}
|
270
|
-
text="Body"
|
271
|
-
/>
|
272
|
-
</Card.Body>
|
273
|
-
</Card>
|
274
234
|
</>
|
275
235
|
)
|
276
236
|
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
@import "../tokens/colors";
|
2
|
+
@import "../tokens/typography";
|
3
|
+
@import url("https://code.highcharts.com/css/highcharts.css");
|
4
|
+
// @import "highcharts/css/highcharts";
|
5
|
+
// @import "highcharts/highcharts.css";
|
6
|
+
|
7
|
+
:root {
|
8
|
+
--highcharts-color-0: #{$data_1};
|
9
|
+
--highcharts-color-1: #{$data_2};
|
10
|
+
--highcharts-color-2: #{$data_3};
|
11
|
+
--highcharts-color-3: #{$data_4};
|
12
|
+
--highcharts-color-4: #{$data_5};
|
13
|
+
--highcharts-color-5: #{$data_6};
|
14
|
+
--highcharts-color-6: #{$data_7};
|
15
|
+
--highcharts-color-7: #{$data_8};
|
16
|
+
}
|
17
|
+
|
18
|
+
.highcharts-title {
|
19
|
+
font-family: $font_family_base;
|
20
|
+
font-weight: $bold;
|
21
|
+
font-size: $heading_3;
|
22
|
+
color: $text_lt_default;
|
23
|
+
fill: $text_lt_default;
|
24
|
+
}
|
25
|
+
|
26
|
+
.highcharts-subtitle {
|
27
|
+
font-family: $font_family_base;
|
28
|
+
color: $text_lt_light;
|
29
|
+
fill: $text_lt_light;
|
30
|
+
font-weight: $regular;
|
31
|
+
font-size: $text_base;
|
32
|
+
}
|
33
|
+
|
34
|
+
.highcharts-yaxis > .highcharts-axis-title {
|
35
|
+
color: $text_lt_lighter;
|
36
|
+
fill: $text_lt_lighter;
|
37
|
+
font-family: $font_family_base;
|
38
|
+
font-weight: $bold;
|
39
|
+
font-size: $text_smaller;
|
40
|
+
}
|
41
|
+
|
42
|
+
.highcharts-axis-labels {
|
43
|
+
font-family: $font_family_base;
|
44
|
+
color: $text_lt_lighter;
|
45
|
+
fill: $text_lt_lighter;
|
46
|
+
font-weight: $bold;
|
47
|
+
font-size: $text_smaller;
|
48
|
+
}
|
49
|
+
|
50
|
+
.highcharts-grid-line {
|
51
|
+
stroke: $border_light;
|
52
|
+
}
|
53
|
+
|
@@ -14,6 +14,16 @@ $pb_icon_circle_sizes: (
|
|
14
14
|
"xl": 100px,
|
15
15
|
);
|
16
16
|
|
17
|
+
@mixin svg_size($name, $match, $adjust) {
|
18
|
+
@if $name == $match {
|
19
|
+
$svg_xy: $adjust;
|
20
|
+
& > svg {
|
21
|
+
width: #{$svg_xy};
|
22
|
+
height: #{$svg_xy};
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
17
27
|
[class^=pb_icon_circle_kit] {
|
18
28
|
display: flex;
|
19
29
|
justify-content: center;
|
@@ -47,11 +57,13 @@ $pb_icon_circle_sizes: (
|
|
47
57
|
border-radius: $size/2;
|
48
58
|
background: $silver;
|
49
59
|
color: $text_lt_light;
|
50
|
-
font-size:
|
60
|
+
font-size: $size * 0.38;
|
51
61
|
line-height: $size;
|
52
62
|
flex-shrink: 0;
|
53
63
|
flex-grow: 0;
|
54
64
|
flex-basis: $size;
|
65
|
+
|
66
|
+
@include svg_size($name, "xxs", $size - 6px);
|
55
67
|
}
|
56
68
|
}
|
57
69
|
|
@@ -3,11 +3,6 @@
|
|
3
3
|
@import "../tokens/opacity";
|
4
4
|
@import "./section_separator_mixin";
|
5
5
|
|
6
|
-
$merge_kits1: map-merge($status_colors, $category_colors);
|
7
|
-
$merge_kits2: map-merge($merge_kits1, $product_colors);
|
8
|
-
$merge_kits3: map-merge($merge_kits2, $text_colors);
|
9
|
-
$section_selector_colors: map-merge($merge_kits3, $data_colors);
|
10
|
-
|
11
6
|
$section_colors_light: (
|
12
7
|
background: $bg_light,
|
13
8
|
card: $card_light,
|
@@ -24,11 +19,8 @@ $section_colors_dark: (
|
|
24
19
|
align-items: center;
|
25
20
|
position: relative;
|
26
21
|
span {
|
27
|
-
padding: 0;
|
22
|
+
padding: 0 $space_xs;
|
28
23
|
display: flex;
|
29
|
-
[class*="pb_caption_kit"] {
|
30
|
-
padding: 0 $space_xs;
|
31
|
-
}
|
32
24
|
}
|
33
25
|
&::before {
|
34
26
|
content: "";
|
@@ -42,40 +34,12 @@ $section_colors_dark: (
|
|
42
34
|
flex: 1;
|
43
35
|
@include section_separator_horizontal;
|
44
36
|
}
|
45
|
-
@each $color_name, $color_value in $section_selector_colors {
|
46
|
-
&[class*="color_#{$color_name}"] {
|
47
|
-
&::before, &::after {
|
48
|
-
background: $color_value;
|
49
|
-
}
|
50
|
-
|
51
|
-
&[class*=_vertical] {
|
52
|
-
&::after {
|
53
|
-
background: $color_value;
|
54
|
-
}
|
55
|
-
}
|
56
|
-
&[class*=_dashed] {
|
57
|
-
&::before, &::after {
|
58
|
-
border: 1px dashed $color_value;
|
59
|
-
}
|
60
|
-
&[class*=_vertical] {
|
61
|
-
&::after {
|
62
|
-
border: 1px dashed $color_value;
|
63
|
-
background: none;
|
64
|
-
}
|
65
|
-
}
|
66
|
-
}
|
67
|
-
}
|
68
|
-
}
|
69
|
-
|
70
37
|
&[class*=_horizontal] {
|
71
38
|
justify-content: center;
|
72
39
|
}
|
73
40
|
&[class*=_vertical] {
|
74
41
|
margin-left: $space_xs;
|
75
42
|
margin-right: $space_xs;
|
76
|
-
&::before {
|
77
|
-
display: none;
|
78
|
-
}
|
79
43
|
&::after {
|
80
44
|
@include section_separator_vertical(false);
|
81
45
|
}
|
@@ -90,33 +54,6 @@ $section_colors_dark: (
|
|
90
54
|
// Dark =========================
|
91
55
|
|
92
56
|
&.dark {
|
93
|
-
@each $color_name, $color_value in $section_selector_colors {
|
94
|
-
&[class*="color_#{$color_name}"] {
|
95
|
-
&::before, &::after {
|
96
|
-
background: $color_value;
|
97
|
-
}
|
98
|
-
|
99
|
-
&[class*=_vertical] {
|
100
|
-
&::after {
|
101
|
-
@include section_separator_vertical(false);
|
102
|
-
background: $color_value;
|
103
|
-
}
|
104
|
-
}
|
105
|
-
|
106
|
-
&[class*=_dashed] {
|
107
|
-
&::before, &::after {
|
108
|
-
border: 1px dashed $color_value;
|
109
|
-
background: none;
|
110
|
-
}
|
111
|
-
&[class*=_vertical] {
|
112
|
-
&::after {
|
113
|
-
border: 1px dashed $color_value;
|
114
|
-
background: none;
|
115
|
-
}
|
116
|
-
}
|
117
|
-
}
|
118
|
-
}
|
119
|
-
}
|
120
57
|
&::before {
|
121
58
|
@include section_separator_horizontal(true);
|
122
59
|
}
|
@@ -10,7 +10,6 @@ type SectionSeparatorProps = {
|
|
10
10
|
aria?: { [key: string]: string; },
|
11
11
|
children?: React.ReactChild[] | React.ReactChild,
|
12
12
|
className?: string,
|
13
|
-
color?: "default" | "primary",
|
14
13
|
dark?: boolean,
|
15
14
|
data?: { [key: string]: string; },
|
16
15
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
@@ -26,7 +25,6 @@ const SectionSeparator = (props: SectionSeparatorProps): React.ReactElement => {
|
|
26
25
|
aria = {},
|
27
26
|
children,
|
28
27
|
className,
|
29
|
-
color ="default",
|
30
28
|
data = {},
|
31
29
|
htmlOptions = {},
|
32
30
|
id,
|
@@ -39,7 +37,7 @@ const SectionSeparator = (props: SectionSeparatorProps): React.ReactElement => {
|
|
39
37
|
const ariaProps = buildAriaProps(aria)
|
40
38
|
const dataProps = buildDataProps(data)
|
41
39
|
const htmlProps = buildHtmlProps(htmlOptions)
|
42
|
-
const classes = classnames(buildCss('pb_section_separator_kit', variant, orientation, lineStyle === "dashed" ? lineStyle : ""
|
40
|
+
const classes = classnames(buildCss('pb_section_separator_kit', variant, orientation, lineStyle === "dashed" ? lineStyle : ""), globalProps(props), className)
|
43
41
|
const dynamicInlineProps = globalInlineProps(props)
|
44
42
|
|
45
43
|
return (
|
@@ -6,7 +6,6 @@ examples:
|
|
6
6
|
- section_separator_text: Text Separator
|
7
7
|
- section_separator_vertical: Vertical
|
8
8
|
- section_separator_children: Children
|
9
|
-
- section_separator_color: Color
|
10
9
|
|
11
10
|
react:
|
12
11
|
- section_separator_line: Line Separator
|
@@ -14,7 +13,6 @@ examples:
|
|
14
13
|
- section_separator_text: Text Separator
|
15
14
|
- section_separator_vertical: Vertical
|
16
15
|
- section_separator_children: Children
|
17
|
-
- section_separator_color: Color
|
18
16
|
|
19
17
|
swift:
|
20
18
|
- section_separator_line_swift: Line Separator
|
@@ -3,4 +3,3 @@ export { default as SectionSeparatorText } from './_section_separator_text.jsx'
|
|
3
3
|
export { default as SectionSeparatorVertical } from './_section_separator_vertical.jsx'
|
4
4
|
export { default as SectionSeparatorDashed } from './_section_separator_dashed.jsx'
|
5
5
|
export { default as SectionSeparatorChildren } from './_section_separator_children.jsx'
|
6
|
-
export { default as SectionSeparatorColor } from './_section_separator_color.jsx'
|
@@ -3,9 +3,6 @@
|
|
3
3
|
module Playbook
|
4
4
|
module PbSectionSeparator
|
5
5
|
class SectionSeparator < Playbook::KitBase
|
6
|
-
prop :color, type: Playbook::Props::Enum,
|
7
|
-
values: %w[default primary],
|
8
|
-
default: "default"
|
9
6
|
prop :text
|
10
7
|
prop :variant, type: Playbook::Props::Enum,
|
11
8
|
values: %w[card background],
|
@@ -20,7 +17,7 @@ module Playbook
|
|
20
17
|
default: "solid"
|
21
18
|
|
22
19
|
def classname
|
23
|
-
generate_classname("pb_section_separator_kit", variant, orientation, line_style == "dashed" ? "dashed" : nil
|
20
|
+
generate_classname("pb_section_separator_kit", variant, orientation, line_style == "dashed" ? "dashed" : nil)
|
24
21
|
end
|
25
22
|
|
26
23
|
private
|
@@ -1 +1 @@
|
|
1
|
-
<%= pb_rails("skeleton_loading") %>
|
1
|
+
<%= pb_rails("skeleton_loading") %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import { Button, Card, Filter, Flex, Select, SkeletonLoading, TextInput } from "playbook-ui";
|
3
3
|
|
4
4
|
const SortingChangeCallback = (sortOptions) => {
|
@@ -6,8 +6,7 @@ const SortingChangeCallback = (sortOptions) => {
|
|
6
6
|
}
|
7
7
|
|
8
8
|
const SkeletonLoadingFilter = (props) => {
|
9
|
-
const
|
10
|
-
const toggleLoading = () => setIsLoading((prev) => !prev)
|
9
|
+
const isLoading = true
|
11
10
|
|
12
11
|
const options = [
|
13
12
|
{ value: 'USA' },
|
@@ -19,13 +18,6 @@ const SkeletonLoadingFilter = (props) => {
|
|
19
18
|
|
20
19
|
return (
|
21
20
|
<div>
|
22
|
-
<Button
|
23
|
-
marginBottom="md"
|
24
|
-
onClick={toggleLoading}
|
25
|
-
variant="secondary"
|
26
|
-
>
|
27
|
-
{isLoading ? "Show Filter" : "Show Skeleton Loading"}
|
28
|
-
</Button>
|
29
21
|
<div>
|
30
22
|
{isLoading ? (
|
31
23
|
<Card
|
@@ -17,11 +17,9 @@ const SkeletonLoadingHeightWidth = (props) => (
|
|
17
17
|
width="50px"
|
18
18
|
{...props}
|
19
19
|
/>
|
20
|
-
<Card
|
21
|
-
height='200px'
|
20
|
+
<Card htmlOptions={{ style: { height: '200px', width: '100%' }}}
|
22
21
|
marginBottom="md"
|
23
22
|
padding="none"
|
24
|
-
width='100%'
|
25
23
|
{...props}
|
26
24
|
>
|
27
25
|
<SkeletonLoading
|
@@ -32,10 +30,8 @@ const SkeletonLoadingHeightWidth = (props) => (
|
|
32
30
|
{...props}
|
33
31
|
/>
|
34
32
|
</Card>
|
35
|
-
<Card
|
36
|
-
height='200px'
|
33
|
+
<Card htmlOptions={{ style: { height: '200px', width: '100%' }}}
|
37
34
|
padding="none"
|
38
|
-
width='100%'
|
39
35
|
{...props}
|
40
36
|
>
|
41
37
|
<SkeletonLoading
|
@@ -1,19 +1,11 @@
|
|
1
|
-
import React
|
2
|
-
import {
|
1
|
+
import React from 'react';
|
2
|
+
import { Flex, SkeletonLoading, User } from "playbook-ui";
|
3
3
|
|
4
4
|
const SkeletonLoadingUser = (props) => {
|
5
|
-
const
|
6
|
-
const toggleLoading = () => setIsLoading((prev) => !prev)
|
5
|
+
const isLoading = true
|
7
6
|
|
8
7
|
return (
|
9
8
|
<div>
|
10
|
-
<Button
|
11
|
-
marginBottom="md"
|
12
|
-
onClick={toggleLoading}
|
13
|
-
variant="secondary"
|
14
|
-
>
|
15
|
-
{isLoading ? "Show User" : "Show Skeleton Loading"}
|
16
|
-
</Button>
|
17
9
|
<div>
|
18
10
|
{isLoading ? (
|
19
11
|
<Flex alignItems="center">
|
@@ -1,13 +1,8 @@
|
|
1
1
|
examples:
|
2
2
|
|
3
3
|
rails:
|
4
|
-
- skeleton_loading_default: Default
|
5
|
-
|
6
|
-
- skeleton_loading_layout: Layout
|
7
|
-
- skeleton_loading_border_radius: Border Radius
|
8
|
-
- skeleton_loading_height_width: Height & Width
|
9
|
-
- skeleton_loading_user: User Component Example
|
10
|
-
- skeleton_loading_filter: Filter Component Example
|
4
|
+
# - skeleton_loading_default: Default
|
5
|
+
|
11
6
|
|
12
7
|
react:
|
13
8
|
- skeleton_loading_default: Default
|
@@ -1,8 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
<!-- Go to pb_content_tag definition in kit_base.rb for usage information. Commented out options are default (showing the default shape), and each can be deleted if not customizing that param. -->
|
2
|
+
<!-- If using nonstandard params please un-comment out and replace with your custom params. -->
|
3
|
+
<%= pb_content_tag(
|
4
|
+
# :div,
|
5
|
+
# aria: object.aria,
|
6
|
+
# class: object.classname,
|
7
|
+
# data: object.data,
|
8
|
+
# id: object.id,
|
9
|
+
# **combined_html_options
|
10
|
+
) do %>
|
11
|
+
<span>SKELETON_LOADING CONTENT</span>
|
12
|
+
<% end %>
|
@@ -2,54 +2,7 @@
|
|
2
2
|
|
3
3
|
module Playbook
|
4
4
|
module PbSkeletonLoading
|
5
|
-
class SkeletonLoading < Playbook::KitBase
|
6
|
-
prop :height, type: Playbook::Props::String,
|
7
|
-
default: "16px"
|
8
|
-
prop :width, type: Playbook::Props::String,
|
9
|
-
default: "100%"
|
10
|
-
prop :border_radius, type: Playbook::Props::Enum,
|
11
|
-
values: %w[none xs sm md lg xl rounded],
|
12
|
-
default: "sm"
|
13
|
-
prop :gap, type: Playbook::Props::Enum,
|
14
|
-
values: %w[none xxs xs sm md lg xl xxl],
|
15
|
-
default: "xxs"
|
16
|
-
prop :stack, type: Playbook::Props::Number,
|
17
|
-
default: 1
|
18
|
-
prop :color, type: Playbook::Props::Enum,
|
19
|
-
values: %w[default white],
|
20
|
-
default: "default"
|
21
|
-
prop :dark, type: Playbook::Props::Boolean,
|
22
|
-
default: false
|
23
|
-
|
24
|
-
def classname
|
25
|
-
generate_classname("pb_skeleton_loading")
|
26
|
-
end
|
27
|
-
|
28
|
-
def global_inline_props
|
29
|
-
{}
|
30
|
-
end
|
31
|
-
|
32
|
-
def item_classname(index = nil)
|
33
|
-
classes = [
|
34
|
-
"pb_skeleton_loading_item",
|
35
|
-
"border_radius_#{border_radius}",
|
36
|
-
"color_#{color}",
|
37
|
-
("dark" if dark),
|
38
|
-
gap_class(index),
|
39
|
-
]
|
40
|
-
classes.compact.join(" ")
|
41
|
-
end
|
42
|
-
|
43
|
-
def item_inline_styles
|
44
|
-
styles = []
|
45
|
-
styles << "height: #{height}"
|
46
|
-
styles << "width: #{width}"
|
47
|
-
styles.join("; ")
|
48
|
-
end
|
49
|
-
|
50
|
-
def gap_class(index = nil)
|
51
|
-
stack > 1 && index.to_i.positive? && gap != "none" ? "gap_#{gap}" : nil
|
52
|
-
end
|
5
|
+
class SkeletonLoading < ::Playbook::KitBase
|
53
6
|
end
|
54
7
|
end
|
55
8
|
end
|