playbook_ui 14.10.0.pre.rc.22 → 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/dist/playbook-doc.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +2 -2
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>.
|