playbook_ui 5.2.0 → 5.3.0
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/packs/site_styles/docs/_all.scss +1 -0
- data/app/pb_kits/playbook/packs/site_styles/docs/_bg_light_doc_example.scss +7 -0
- data/app/pb_kits/playbook/pb_badge/_badge.html.erb +1 -0
- data/app/pb_kits/playbook/pb_badge/_badge.jsx +17 -4
- data/app/pb_kits/playbook/pb_card/_card.jsx +4 -1
- data/app/pb_kits/playbook/pb_card/_card.scss +4 -0
- data/app/pb_kits/playbook/pb_card/card.rb +8 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_border_none.html.erb +7 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_border_none.jsx +14 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_border_none.md +1 -0
- data/app/pb_kits/playbook/pb_card/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_card/docs/index.js +1 -0
- data/lib/playbook/version.rb +1 -1
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd87d19dffeb68dba4372b1282cf12fcb1cace3acda84f7119a902fc205e7e1f
|
4
|
+
data.tar.gz: e5f41cf298f15483eb5299b27837c83cac6e74e265b446fe6ff819742ff18b48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7a8e97e476695635a7ca42bbbd831a20b9ff5e48665a7246b723ef2eacdd418864ba2dcec08b602e7fa35362fccf15685e56d91371442a3149ae2eef6d30615
|
7
|
+
data.tar.gz: 6d58ee0d87a24bdf4912e774c4f0ea33480be6007ba5ffd8cd6f2145bd4b27bbbf233a5288f691a3635f445944eccd0f4196c098cfd6e24e7396ed0580999ecc
|
@@ -2,26 +2,37 @@
|
|
2
2
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
|
-
import { buildCss } from '../utilities/props'
|
6
5
|
import { spacing } from '../utilities/spacing.js'
|
7
6
|
|
7
|
+
import {
|
8
|
+
buildAriaProps,
|
9
|
+
buildCss,
|
10
|
+
buildDataProps,
|
11
|
+
} from '../utilities/props'
|
12
|
+
|
8
13
|
type BadgeProps = {
|
14
|
+
aria?: object,
|
9
15
|
className?: String,
|
10
16
|
dark?: Boolean,
|
17
|
+
data?: object,
|
11
18
|
id?: String,
|
12
|
-
text?: String,
|
13
|
-
variant?: "success" | "warning" | "error" | "info" | "neutral",
|
14
19
|
rounded?: Boolean,
|
20
|
+
text?: String,
|
21
|
+
variant?: "error" | "info" | "neutral" | "primary" | "success" | "warning",
|
15
22
|
}
|
16
23
|
const Badge = (props: BadgeProps) => {
|
17
24
|
const {
|
25
|
+
aria = {},
|
18
26
|
className,
|
19
27
|
dark = false,
|
28
|
+
data = {},
|
20
29
|
id,
|
30
|
+
rounded = false,
|
21
31
|
text,
|
22
32
|
variant = 'neutral',
|
23
|
-
rounded = false,
|
24
33
|
} = props
|
34
|
+
const ariaProps = buildAriaProps(aria)
|
35
|
+
const dataProps = buildDataProps(data)
|
25
36
|
const css = classnames(
|
26
37
|
className,
|
27
38
|
buildCss('pb_badge_kit', variant, {
|
@@ -33,6 +44,8 @@ const Badge = (props: BadgeProps) => {
|
|
33
44
|
|
34
45
|
return (
|
35
46
|
<div
|
47
|
+
{...ariaProps}
|
48
|
+
{...dataProps}
|
36
49
|
className={css}
|
37
50
|
id={id}
|
38
51
|
>
|
@@ -16,6 +16,7 @@ type CardPropTypes = {
|
|
16
16
|
selected?: Boolean,
|
17
17
|
shadow?: "none" | "deep" | "deeper" | "deepest",
|
18
18
|
dark?: Boolean,
|
19
|
+
borderNone?: Boolean,
|
19
20
|
}
|
20
21
|
|
21
22
|
type CardHeaderProps = {
|
@@ -62,9 +63,11 @@ const Card = (props: CardPropTypes) => {
|
|
62
63
|
highlight = {},
|
63
64
|
selected = false,
|
64
65
|
shadow = 'none',
|
66
|
+
borderNone = false,
|
65
67
|
} = props
|
66
68
|
const bodyCSS = buildCss('pb_card_body_kit')
|
67
|
-
const
|
69
|
+
const borderCSS = borderNone == true ? 'border_none' : ''
|
70
|
+
const cardCss = buildCss('pb_card_kit', `shadow_${shadow}`, `${borderCSS}`, {
|
68
71
|
dark: dark,
|
69
72
|
selected,
|
70
73
|
deselected: !selected,
|
@@ -15,6 +15,8 @@ module Playbook
|
|
15
15
|
default: {}
|
16
16
|
prop :dark, type: Playbook::Props::Boolean,
|
17
17
|
default: false
|
18
|
+
prop :border_none, type: Playbook::Props::Boolean,
|
19
|
+
default: false
|
18
20
|
|
19
21
|
def classname
|
20
22
|
generate_classname("pb_card_kit",
|
@@ -22,7 +24,8 @@ module Playbook
|
|
22
24
|
shadow_class,
|
23
25
|
highlight_position_class,
|
24
26
|
highlight_color_class,
|
25
|
-
dark_class
|
27
|
+
dark_class,
|
28
|
+
border_class)
|
26
29
|
end
|
27
30
|
|
28
31
|
def body_padding
|
@@ -55,6 +58,10 @@ module Playbook
|
|
55
58
|
def dark_class
|
56
59
|
dark ? "dark" : nil
|
57
60
|
end
|
61
|
+
|
62
|
+
def border_class
|
63
|
+
border_none == true ? "border_none" : nil
|
64
|
+
end
|
58
65
|
end
|
59
66
|
end
|
60
67
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Remove card border <b>only</b> for dashboard cards.
|
@@ -9,6 +9,7 @@ examples:
|
|
9
9
|
- card_shadow: Shadow Size
|
10
10
|
- card_content: Content Size
|
11
11
|
- card_separator: Separator Card
|
12
|
+
- card_border_none: No Border
|
12
13
|
react:
|
13
14
|
- card_light: Default
|
14
15
|
- card_dark: Dark Cards
|
@@ -19,3 +20,4 @@ examples:
|
|
19
20
|
- card_shadow: Shadow Size
|
20
21
|
- card_content: Content Size
|
21
22
|
- card_separator: Separator Card
|
23
|
+
- card_border_none: No Border
|
@@ -7,3 +7,4 @@ export { default as CardShadow } from './_card_shadow.jsx'
|
|
7
7
|
export { default as CardContent } from './_card_content.jsx'
|
8
8
|
export { default as CardSeparator } from './_card_separator.jsx'
|
9
9
|
export { default as CardDark } from './_card_dark.jsx'
|
10
|
+
export { default as CardBorderNone } from './_card_border_none.jsx'
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-07-
|
12
|
+
date: 2020-07-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -411,6 +411,7 @@ files:
|
|
411
411
|
- app/pb_kits/playbook/packs/site_styles/_scaffold.scss
|
412
412
|
- app/pb_kits/playbook/packs/site_styles/_site-style.scss
|
413
413
|
- app/pb_kits/playbook/packs/site_styles/docs/_all.scss
|
414
|
+
- app/pb_kits/playbook/packs/site_styles/docs/_bg_light_doc_example.scss
|
414
415
|
- app/pb_kits/playbook/packs/site_styles/docs/_code_snippet.scss
|
415
416
|
- app/pb_kits/playbook/packs/site_styles/docs/_color_utilities.scss
|
416
417
|
- app/pb_kits/playbook/packs/site_styles/docs/_flex_examples.scss
|
@@ -543,6 +544,9 @@ files:
|
|
543
544
|
- app/pb_kits/playbook/pb_card/card_header.rb
|
544
545
|
- app/pb_kits/playbook/pb_card/child_kits/_card_body.html.erb
|
545
546
|
- app/pb_kits/playbook/pb_card/child_kits/_card_header.html.erb
|
547
|
+
- app/pb_kits/playbook/pb_card/docs/_card_border_none.html.erb
|
548
|
+
- app/pb_kits/playbook/pb_card/docs/_card_border_none.jsx
|
549
|
+
- app/pb_kits/playbook/pb_card/docs/_card_border_none.md
|
546
550
|
- app/pb_kits/playbook/pb_card/docs/_card_content.html.erb
|
547
551
|
- app/pb_kits/playbook/pb_card/docs/_card_content.jsx
|
548
552
|
- app/pb_kits/playbook/pb_card/docs/_card_dark.html.erb
|
@@ -1813,7 +1817,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1813
1817
|
- !ruby/object:Gem::Version
|
1814
1818
|
version: '0'
|
1815
1819
|
requirements: []
|
1816
|
-
|
1820
|
+
rubyforge_project:
|
1821
|
+
rubygems_version: 2.7.3
|
1817
1822
|
signing_key:
|
1818
1823
|
specification_version: 4
|
1819
1824
|
summary: Playbook Design System
|