playbook_ui 14.10.0.pre.rc.21 → 14.10.0.pre.rc.23
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_card/_card.tsx +7 -7
- data/app/pb_kits/playbook/pb_card/_card_mixin.scss +1 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +21 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_header.jsx +50 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
- data/app/pb_kits/playbook/pb_gauge/_gauge.scss +31 -1
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +3 -3
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +25 -5
- data/dist/chunks/{_typeahead-BvYY2O9n.js → _typeahead-C63YYbKQ.js} +1 -1
- data/dist/chunks/{_weekday_stacked-3oymMUFt.js → _weekday_stacked-Df46UIol.js} +1 -1
- data/dist/chunks/vendor.js +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 +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1d73e15bf41e2c7f0c5695db86c3af7e516c9483349001c97c3f2ceec20253b
|
4
|
+
data.tar.gz: b92a027af7c61274e867114228607f0b8e9e4f3fbf4dbc9e0ccb7aabae34c2bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eb5845b95d23bf1490ec7a9ff5b11531aa74879a3d13d61693dcc9b23edcb8d9bdb65a4369ae7e711ad1d43be46375a7faf79c101f6e3b59a1fcfd08fded7c7
|
7
|
+
data.tar.gz: 7986936bc3d85c3fd1649d883527940aa61c9d4e429acb10eae6e2ba36db6f5ef53fd575aa6179bf786711c5694ba26d7a0caa465ebb3c06baeb91f76f61a66c
|
@@ -6,7 +6,7 @@ import classnames from 'classnames'
|
|
6
6
|
|
7
7
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
8
8
|
import { GlobalProps, globalProps, globalInlineProps } from '../utilities/globalProps'
|
9
|
-
import type { ProductColors, CategoryColors, BackgroundColors } from '../types/colors'
|
9
|
+
import type { ProductColors, CategoryColors, BackgroundColors, StatusColors } from '../types/colors'
|
10
10
|
|
11
11
|
import Icon from '../pb_icon/_icon'
|
12
12
|
import Flex from '../pb_flex/_flex'
|
@@ -36,7 +36,7 @@ type CardPropTypes = {
|
|
36
36
|
} & GlobalProps
|
37
37
|
|
38
38
|
type CardHeaderProps = {
|
39
|
-
headerColor?: BackgroundColors | ProductColors | CategoryColors | "none",
|
39
|
+
headerColor?: BackgroundColors | ProductColors | CategoryColors | StatusColors | "none",
|
40
40
|
headerColorStriped?: boolean,
|
41
41
|
children: React.ReactChild[] | React.ReactChild,
|
42
42
|
className?: string,
|
@@ -127,12 +127,12 @@ const Card = (props: CardPropTypes): React.ReactElement => {
|
|
127
127
|
|
128
128
|
const tagOptions = ['div', 'section', 'footer', 'header', 'article', 'aside', 'main', 'nav']
|
129
129
|
const Tag = tagOptions.includes(tag) ? tag : 'div'
|
130
|
-
|
130
|
+
|
131
131
|
return (
|
132
132
|
<>
|
133
133
|
{
|
134
134
|
draggableItem ? (
|
135
|
-
<Draggable.Item dragId={dragId}
|
135
|
+
<Draggable.Item dragId={dragId}
|
136
136
|
key={dragId}
|
137
137
|
>
|
138
138
|
<Tag
|
@@ -140,14 +140,14 @@ const Card = (props: CardPropTypes): React.ReactElement => {
|
|
140
140
|
{...dataProps}
|
141
141
|
className={classnames(cardCss, globalProps(props), className)}
|
142
142
|
{...restHtmlProps}
|
143
|
-
style={mergedStyles}
|
143
|
+
style={mergedStyles}
|
144
144
|
>
|
145
145
|
{subComponentTags('Header')}
|
146
146
|
{
|
147
147
|
dragHandle ? (
|
148
148
|
<Flex>
|
149
149
|
<span className="card_draggable_handle">
|
150
|
-
<Icon
|
150
|
+
<Icon
|
151
151
|
icon="grip-dots-vertical"
|
152
152
|
paddingRight="xs"
|
153
153
|
verticalAlign="middle"
|
@@ -169,7 +169,7 @@ const Card = (props: CardPropTypes): React.ReactElement => {
|
|
169
169
|
{...dataProps}
|
170
170
|
className={classnames(cardCss, globalProps(props), className)}
|
171
171
|
{...restHtmlProps}
|
172
|
-
style={mergedStyles}
|
172
|
+
style={mergedStyles}
|
173
173
|
>
|
174
174
|
{subComponentTags('Header')}
|
175
175
|
{nonHeaderChildren}
|
@@ -24,7 +24,7 @@ $additional_colors: (
|
|
24
24
|
"neutral_subtle": $neutral_subtle,
|
25
25
|
);
|
26
26
|
$background_colors: map-merge($product_colors, $additional_colors);
|
27
|
-
$pb_card_header_colors: map-merge(map-merge($product_colors, $additional_colors), $category_colors);
|
27
|
+
$pb_card_header_colors: map-merge(map-merge(map-merge($product_colors, $additional_colors), $category_colors), $status_colors);
|
28
28
|
|
29
29
|
@mixin pb_card_selected($border_color: $primary) {
|
30
30
|
border-color: $border_color;
|
@@ -67,4 +67,24 @@
|
|
67
67
|
<%= pb_rails("card/card_body", props: { padding: "md", }) do %>
|
68
68
|
Body
|
69
69
|
<% end %>
|
70
|
-
<% end %>
|
70
|
+
<% end %>
|
71
|
+
|
72
|
+
<%= pb_rails("title", props: { text: "Status Colors", tag: "h4", size: 4, margin_bottom: "sm" }) %>
|
73
|
+
|
74
|
+
<%= pb_rails("card", props: { padding: "none", header: true, margin_bottom: "sm"}) do %>
|
75
|
+
<%= pb_rails("card/card_header", props: { padding: "sm", header_color: "success" }) do %>
|
76
|
+
<%= pb_rails("body", props: { text: "Success", dark: true }) %>
|
77
|
+
<% end %>
|
78
|
+
<%= pb_rails("card/card_body", props: { padding: "md" }) do %>
|
79
|
+
Body
|
80
|
+
<% end %>
|
81
|
+
<% end %>
|
82
|
+
|
83
|
+
<%= pb_rails("card", props: { padding: "none", header: true, margin_bottom: "sm"}) do %>
|
84
|
+
<%= pb_rails("card/card_header", props: { padding: "sm", header_color: "error" }) do %>
|
85
|
+
<%= pb_rails("body", props: { text: "Error", dark: true }) %>
|
86
|
+
<% end %>
|
87
|
+
<%= pb_rails("card/card_body", props: { padding: "md" }) do %>
|
88
|
+
Body
|
89
|
+
<% end %>
|
90
|
+
<% end %>
|
@@ -181,6 +181,56 @@ const CardHeader = (props) => {
|
|
181
181
|
/>
|
182
182
|
</Card.Body>
|
183
183
|
</Card>
|
184
|
+
|
185
|
+
<Title
|
186
|
+
{...props}
|
187
|
+
marginBottom='sm'
|
188
|
+
size={4}
|
189
|
+
tag="h4"
|
190
|
+
text="Status Colors"
|
191
|
+
/>
|
192
|
+
|
193
|
+
<Card
|
194
|
+
{...props}
|
195
|
+
marginBottom='sm'
|
196
|
+
padding="none"
|
197
|
+
>
|
198
|
+
<Card.Header
|
199
|
+
headerColor="success"
|
200
|
+
>
|
201
|
+
<Body
|
202
|
+
dark
|
203
|
+
text="Success"
|
204
|
+
/>
|
205
|
+
</Card.Header>
|
206
|
+
<Card.Body>
|
207
|
+
<Body
|
208
|
+
{...props}
|
209
|
+
text="Body"
|
210
|
+
/>
|
211
|
+
</Card.Body>
|
212
|
+
</Card>
|
213
|
+
|
214
|
+
<Card
|
215
|
+
{...props}
|
216
|
+
marginBottom='sm'
|
217
|
+
padding="none"
|
218
|
+
>
|
219
|
+
<Card.Header
|
220
|
+
headerColor="error"
|
221
|
+
>
|
222
|
+
<Body
|
223
|
+
dark
|
224
|
+
text="Error"
|
225
|
+
/>
|
226
|
+
</Card.Header>
|
227
|
+
<Card.Body>
|
228
|
+
<Body
|
229
|
+
{...props}
|
230
|
+
text="Body"
|
231
|
+
/>
|
232
|
+
</Card.Body>
|
233
|
+
</Card>
|
184
234
|
</>
|
185
235
|
)
|
186
236
|
}
|
@@ -1 +1 @@
|
|
1
|
-
Card headers pass category, product, and background colors only. List of all category, product, and background colors can be viewed <a href="https://playbook.powerapp.cloud/visual_guidelines/colors" target="_blank">here</a>.
|
1
|
+
Card headers pass category, product, status and background colors only. List of all category, product, status and background colors can be viewed <a href="https://playbook.powerapp.cloud/visual_guidelines/colors" target="_blank">here</a>.
|
@@ -1,12 +1,33 @@
|
|
1
|
+
@import "../tokens/colors";
|
2
|
+
|
1
3
|
[class^=pb_gauge_kit] {
|
2
4
|
|
5
|
+
.fix {
|
6
|
+
fill: $text_lt_default;
|
7
|
+
stroke: none;
|
8
|
+
|
9
|
+
&[class*=dark] {
|
10
|
+
fill: $text_dk_default;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
3
14
|
.suffix {
|
4
15
|
fill: $text_lt_light;
|
16
|
+
stroke: none;
|
5
17
|
font: $regular $font_larger $font_family_base;
|
18
|
+
|
19
|
+
&[class*=dark] {
|
20
|
+
fill: $text_dk_light;
|
21
|
+
}
|
6
22
|
}
|
7
23
|
.prefix {
|
8
24
|
fill: $text_lt_light;
|
25
|
+
stroke: none;
|
9
26
|
font: $regular $font_base $font_family_base;
|
27
|
+
|
28
|
+
&[class*=dark] {
|
29
|
+
fill: $text_dk_light;
|
30
|
+
}
|
10
31
|
}
|
11
32
|
|
12
33
|
rect.highcharts-background {
|
@@ -16,4 +37,13 @@
|
|
16
37
|
.gauge-pane {
|
17
38
|
stroke-linejoin: round;
|
18
39
|
}
|
19
|
-
|
40
|
+
|
41
|
+
&[class*=dark] {
|
42
|
+
color: $text_dk_default;
|
43
|
+
|
44
|
+
.pb_title_kit_size_1,
|
45
|
+
.pb_caption_kit_xs {
|
46
|
+
color: $text_dk_light;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
@@ -164,9 +164,9 @@ const Gauge = ({
|
|
164
164
|
color: defaultColors.text_lt_default,
|
165
165
|
enabled: true,
|
166
166
|
format:
|
167
|
-
`<span class="prefix">${prefix}</span>` +
|
168
|
-
|
169
|
-
`<span class="suffix">${suffix}</span>`,
|
167
|
+
`<span class="prefix${dark ? " dark" : ""}">${prefix}</span>` +
|
168
|
+
`<span class="fix${dark ? " dark" : ""}">{y:,f}</span>` +
|
169
|
+
`<span class="suffix${dark ? " dark" : ""}">${suffix}</span>`,
|
170
170
|
style: {
|
171
171
|
fontFamily: typography.font_family_base,
|
172
172
|
fontWeight: typography.regular,
|
@@ -17,47 +17,60 @@ const GaugeComplex = (props) => (
|
|
17
17
|
gap="sm"
|
18
18
|
padding="xl"
|
19
19
|
wrap
|
20
|
+
{...props}
|
20
21
|
>
|
21
22
|
<FlexItem
|
22
23
|
flex={1}
|
23
24
|
grow
|
25
|
+
{...props}
|
24
26
|
>
|
25
27
|
<Card
|
26
28
|
maxWidth="xs"
|
27
29
|
padding="md"
|
30
|
+
{...props}
|
28
31
|
>
|
29
32
|
<Title
|
30
33
|
paddingBottom="sm"
|
31
34
|
size={4}
|
32
35
|
text="Abandoned Calls"
|
36
|
+
{...props}
|
33
37
|
/>
|
34
|
-
<Flex
|
38
|
+
<Flex
|
39
|
+
align="stretch"
|
40
|
+
{...props}
|
41
|
+
>
|
35
42
|
<Flex
|
36
43
|
marginRight="sm"
|
37
44
|
orientation="column"
|
45
|
+
{...props}
|
38
46
|
>
|
39
47
|
<Body
|
40
48
|
color="light"
|
41
49
|
paddingBottom="sm"
|
42
50
|
text="Total Abandoned"
|
51
|
+
{...props}
|
43
52
|
/>
|
44
53
|
<Flex
|
45
54
|
align="baseline"
|
46
55
|
paddingBottom="xs"
|
56
|
+
{...props}
|
47
57
|
>
|
48
58
|
<Title
|
49
59
|
size={1}
|
50
60
|
text="39"
|
61
|
+
{...props}
|
51
62
|
/>
|
52
63
|
<Title
|
53
64
|
color="light"
|
54
65
|
size={3}
|
55
66
|
text="calls"
|
67
|
+
{...props}
|
56
68
|
/>
|
57
69
|
</Flex>
|
58
70
|
<Caption
|
59
71
|
size="xs"
|
60
72
|
text="of 390"
|
73
|
+
{...props}
|
61
74
|
/>
|
62
75
|
</Flex>
|
63
76
|
|
@@ -65,22 +78,29 @@ const GaugeComplex = (props) => (
|
|
65
78
|
alignSelf="stretch"
|
66
79
|
marginRight="sm"
|
67
80
|
orientation="vertical"
|
81
|
+
{...props}
|
68
82
|
/>
|
69
83
|
|
70
84
|
<Flex
|
71
85
|
orientation="column"
|
72
86
|
wrap
|
87
|
+
{...props}
|
73
88
|
>
|
74
89
|
<Body
|
75
90
|
color="light"
|
76
91
|
text="% Abandoned"
|
77
|
-
|
78
|
-
|
92
|
+
{...props}
|
93
|
+
/>
|
94
|
+
<Flex
|
95
|
+
wrap
|
96
|
+
{...props}
|
97
|
+
>
|
79
98
|
<FlexItem
|
80
99
|
fixedSize="150px"
|
81
100
|
overflow="hidden"
|
82
101
|
shrink
|
83
|
-
|
102
|
+
{...props}
|
103
|
+
>
|
84
104
|
<Gauge
|
85
105
|
chartData={data}
|
86
106
|
disableAnimation
|
@@ -90,7 +110,7 @@ const GaugeComplex = (props) => (
|
|
90
110
|
{...props}
|
91
111
|
/>
|
92
112
|
</FlexItem>
|
93
|
-
</Flex>
|
113
|
+
</Flex>
|
94
114
|
</Flex>
|
95
115
|
</Flex>
|
96
116
|
</Card>
|