playbook_ui 14.10.0.pre.rc.5 → 14.10.0.pre.rc.6
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_body/_body.scss +14 -13
- data/app/pb_kits/playbook/pb_body/_body_mixins.scss +22 -16
- data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +2 -1
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +44 -36
- data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +4 -4
- data/app/pb_kits/playbook/pb_title/_title.scss +6 -5
- data/app/pb_kits/playbook/pb_title/_title_mixin.scss +13 -0
- data/app/pb_kits/playbook/tokens/_titles.scss +0 -8
- data/dist/chunks/_weekday_stacked-B6zpg7_x.js +45 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +2 -2
- data/dist/chunks/_weekday_stacked-8qdvRbtq.js +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82790dcaee27051f2c5369f2cbe759f3cf6f9a1ea6157a25d7be9fb5d1d4ecee
|
4
|
+
data.tar.gz: eb7adf43940561d8fed09bc4fd4248e754346aad3e7e2b7f76d960e9272345fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 184cc2fa69f77949717a88bec5cd749dfb40d55536aa0075f2d464141031be32c80240d8231299bafabefc2d4cf1848fe262571a6f60519ce56f76767c8c8d60
|
7
|
+
data.tar.gz: aae779651f3ad34e2eb0380bf3e3e920b1af503673e1275c38f55651aeace6c0d539b8b0e5ece9c87cf59f655655d69dc42fbfc0b667395234997e07fadb134f
|
@@ -1,24 +1,25 @@
|
|
1
1
|
@import "./body_mixins";
|
2
2
|
@import "../tokens/titles";
|
3
3
|
|
4
|
-
[class^=pb_body_kit]{
|
4
|
+
[class^="pb_body_kit"] {
|
5
5
|
@include pb_body($text_lt_default);
|
6
6
|
@each $color_name, $color_value in $pb_body_colors {
|
7
7
|
&[class*=_#{"" + $color_name}] {
|
8
8
|
@include pb_body($color_value);
|
9
9
|
}
|
10
10
|
@each $status_name, $status_value in $pb_body_status {
|
11
|
-
&[class*=_default_#{$status_name}] {
|
11
|
+
&[class*="_default_#{$status_name}"] {
|
12
12
|
@include pb_body($status_value);
|
13
13
|
}
|
14
14
|
}
|
15
15
|
}
|
16
|
-
@each $dark_color_name, $dark_color_value in $pb_dark_body_colors{
|
17
|
-
&[class*=_#{$dark_color_name}][class*=dark]{
|
16
|
+
@each $dark_color_name, $dark_color_value in $pb_dark_body_colors {
|
17
|
+
&[class*="_#{$dark_color_name}"][class*="dark"] {
|
18
18
|
@include pb_body($dark_color_value);
|
19
19
|
}
|
20
20
|
}
|
21
|
-
b,
|
21
|
+
b,
|
22
|
+
strong {
|
22
23
|
font-weight: $bold;
|
23
24
|
}
|
24
25
|
|
@@ -29,7 +30,8 @@
|
|
29
30
|
}
|
30
31
|
}
|
31
32
|
|
32
|
-
em,
|
33
|
+
em,
|
34
|
+
i {
|
33
35
|
font-style: italic;
|
34
36
|
}
|
35
37
|
|
@@ -39,26 +41,25 @@
|
|
39
41
|
}
|
40
42
|
|
41
43
|
@each $status_name, $status_value in $pb_body_status {
|
42
|
-
&[class
|
44
|
+
&[class*="#{$status_name}"] {
|
43
45
|
@include pb_body($status_value);
|
44
46
|
}
|
45
47
|
}
|
46
48
|
|
47
|
-
&[class*=dark] {
|
49
|
+
&[class*="dark"] {
|
48
50
|
a {
|
49
51
|
color: $active_dark;
|
50
52
|
}
|
51
53
|
@include pb_body_dark();
|
52
|
-
@each $dark_color_name, $dark_color_value in $pb_dark_body_colors{
|
53
|
-
&[class*=_#{$dark_color_name}][class*=dark]{
|
54
|
+
@each $dark_color_name, $dark_color_value in $pb_dark_body_colors {
|
55
|
+
&[class*="_#{$dark_color_name}"][class*="dark"] {
|
54
56
|
@include pb_body($dark_color_value);
|
55
57
|
}
|
56
58
|
}
|
57
|
-
@each $status_name, $status_value in $
|
58
|
-
&[class*=_#{$status_name}] {
|
59
|
+
@each $status_name, $status_value in $pb_dark_body_status {
|
60
|
+
&[class*="_#{$status_name}"] {
|
59
61
|
@include pb_body($status_value);
|
60
62
|
}
|
61
63
|
}
|
62
64
|
}
|
63
|
-
|
64
65
|
}
|
@@ -3,29 +3,35 @@
|
|
3
3
|
@import "../tokens/typography";
|
4
4
|
|
5
5
|
$pb_body_colors: (
|
6
|
-
default:
|
7
|
-
light:
|
8
|
-
lighter:
|
9
|
-
link:
|
10
|
-
error:
|
11
|
-
success:
|
6
|
+
default: $text_lt_default,
|
7
|
+
light: $text_lt_light,
|
8
|
+
lighter: $text_lt_lighter,
|
9
|
+
link: $primary,
|
10
|
+
error: $error,
|
11
|
+
success: $text_lt_success_sm,
|
12
12
|
);
|
13
13
|
|
14
14
|
$pb_dark_body_colors: (
|
15
|
-
default:
|
16
|
-
light:
|
17
|
-
lighter:
|
18
|
-
link:
|
19
|
-
error:
|
20
|
-
success:
|
15
|
+
default: $text_dk_default,
|
16
|
+
light: $text_dk_light,
|
17
|
+
lighter: $text_dk_lighter,
|
18
|
+
link: $active_dark,
|
19
|
+
error: $error,
|
20
|
+
success: $text_dk_success_sm,
|
21
21
|
);
|
22
22
|
|
23
23
|
// Order is important here!
|
24
24
|
$pb_body_status: (
|
25
|
-
default:
|
26
|
-
negative:
|
27
|
-
dark_error:
|
28
|
-
positive:
|
25
|
+
default: $text_lt_default,
|
26
|
+
negative: $error,
|
27
|
+
dark_error: $error_dark_body,
|
28
|
+
positive: $text_lt_success_sm,
|
29
|
+
);
|
30
|
+
|
31
|
+
$pb_dark_body_status: (
|
32
|
+
default: $text_dk_default,
|
33
|
+
negative: $error_dark,
|
34
|
+
positive: $text_dk_success_sm,
|
29
35
|
);
|
30
36
|
|
31
37
|
@mixin pb_body($color: $text_lt_default) {
|
@@ -1,40 +1,46 @@
|
|
1
|
-
import React from
|
2
|
-
import classnames from
|
1
|
+
import React from "react"
|
2
|
+
import classnames from "classnames"
|
3
3
|
|
4
|
-
import { buildCss, buildHtmlProps } from
|
5
|
-
import { globalProps } from
|
4
|
+
import { buildCss, buildHtmlProps } from "../utilities/props"
|
5
|
+
import { globalProps } from "../utilities/globalProps"
|
6
6
|
|
7
|
-
import Body from
|
8
|
-
import Icon from
|
7
|
+
import Body from "../pb_body/_body"
|
8
|
+
import Icon from "../pb_icon/_icon"
|
9
9
|
|
10
|
-
const statusMap: {
|
11
|
-
|
12
|
-
decrease:
|
13
|
-
|
10
|
+
const statusMap: {
|
11
|
+
neutral: "neutral"
|
12
|
+
decrease: "negative"
|
13
|
+
increase: "positive"
|
14
|
+
} = {
|
15
|
+
increase: "positive",
|
16
|
+
decrease: "negative",
|
17
|
+
neutral: "neutral",
|
14
18
|
}
|
15
19
|
|
16
20
|
const iconMap = {
|
17
|
-
increase:
|
18
|
-
decrease:
|
21
|
+
increase: "arrow-up",
|
22
|
+
decrease: "arrow-down",
|
19
23
|
}
|
20
24
|
|
21
25
|
type StatChangeProps = {
|
22
|
-
change?:
|
23
|
-
className?: string
|
24
|
-
|
25
|
-
|
26
|
-
id?: string
|
27
|
-
|
26
|
+
change?: "increase" | "decrease" | "neutral"
|
27
|
+
className?: string
|
28
|
+
dark?: boolean
|
29
|
+
icon?: string
|
30
|
+
id?: string
|
31
|
+
htmlOptions?: { [key: string]: string | number | boolean | (() => void) }
|
32
|
+
value?: string | number
|
28
33
|
}
|
29
34
|
|
30
35
|
const StatChange = (props: StatChangeProps): React.ReactElement => {
|
31
|
-
const {
|
32
|
-
change =
|
33
|
-
className,
|
36
|
+
const {
|
37
|
+
change = "neutral",
|
38
|
+
className,
|
39
|
+
dark = false,
|
34
40
|
htmlOptions = {},
|
35
|
-
icon,
|
36
|
-
id,
|
37
|
-
value
|
41
|
+
icon,
|
42
|
+
id,
|
43
|
+
value,
|
38
44
|
} = props
|
39
45
|
|
40
46
|
const status = statusMap[change as keyof typeof statusMap]
|
@@ -47,30 +53,32 @@ const StatChange = (props: StatChangeProps): React.ReactElement => {
|
|
47
53
|
|
48
54
|
return (
|
49
55
|
<>
|
50
|
-
{value &&
|
56
|
+
{value && (
|
51
57
|
<div
|
52
58
|
className={classnames(
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
59
|
+
buildCss("pb_stat_change_kit", status),
|
60
|
+
globalProps(props),
|
61
|
+
className
|
62
|
+
)}
|
57
63
|
id={id}
|
58
64
|
{...htmlProps}
|
59
65
|
>
|
60
|
-
<Body
|
61
|
-
|
66
|
+
<Body dark={dark}
|
67
|
+
status={status}
|
68
|
+
>
|
69
|
+
{" "}
|
70
|
+
{returnedIcon && (
|
62
71
|
<>
|
63
|
-
<Icon
|
72
|
+
<Icon dark={dark}
|
64
73
|
fixed_width
|
65
74
|
icon={returnedIcon}
|
66
|
-
/>
|
67
|
-
{' '}
|
75
|
+
/>{" "}
|
68
76
|
</>
|
69
|
-
}
|
77
|
+
)}
|
70
78
|
{`${value}%`}
|
71
79
|
</Body>
|
72
80
|
</div>
|
73
|
-
}
|
81
|
+
)}
|
74
82
|
</>
|
75
83
|
)
|
76
84
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= pb_content_tag do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
<%= pb_rails("body", props: { status: object.status, dark: object.dark }) do %>
|
3
|
+
<%= pb_rails("icon", props: { fixed_width: true, icon: object.returned_icon, dark: object.dark }) if object.returned_icon %>
|
4
|
+
<%= "#{object.value}%" if object.value %>
|
5
|
+
<% end %>
|
6
6
|
<% end %>
|
@@ -49,10 +49,11 @@
|
|
49
49
|
}
|
50
50
|
|
51
51
|
&.dark {
|
52
|
-
@include
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
52
|
+
@include title_dark;
|
53
|
+
@each $name, $color in $pb_dark_title_colors {
|
54
|
+
&[class*="_#{$name}"] {
|
55
|
+
color: $color;
|
56
|
+
}
|
57
|
+
}
|
57
58
|
}
|
58
59
|
}
|
@@ -9,6 +9,15 @@ $pb_title_colors: (
|
|
9
9
|
link: $primary
|
10
10
|
);
|
11
11
|
|
12
|
+
$pb_dark_title_colors: (
|
13
|
+
default: $text_dk_default,
|
14
|
+
light: $text_dk_light,
|
15
|
+
lighter: $text_dk_lighter,
|
16
|
+
success: $success,
|
17
|
+
error: $error_dark,
|
18
|
+
link: $active_dark
|
19
|
+
);
|
20
|
+
|
12
21
|
@mixin title_colors {
|
13
22
|
@each $name, $color in $pb_title_colors {
|
14
23
|
&[class*=_#{$name}] {
|
@@ -16,3 +25,7 @@ $pb_title_colors: (
|
|
16
25
|
}
|
17
26
|
}
|
18
27
|
}
|
28
|
+
|
29
|
+
@mixin title_dark {
|
30
|
+
color: $text_dk_default;
|
31
|
+
}
|
@@ -33,14 +33,6 @@
|
|
33
33
|
@include pb_title($heading_4, $bolder, $letterSpacing: $lspace_normal);
|
34
34
|
}
|
35
35
|
|
36
|
-
@mixin pb_title_dark {
|
37
|
-
color: $text_dk_default;
|
38
|
-
}
|
39
|
-
|
40
|
-
@mixin pb_title_dark_link {
|
41
|
-
color: $active_dark;
|
42
|
-
}
|
43
|
-
|
44
36
|
@mixin pb_title_bold {
|
45
37
|
font-weight: $bolder;
|
46
38
|
}
|