playbook_ui 14.0.0.pre.alpha.PLAY14113475 → 14.0.0.pre.alpha.dependabotnpmandyarnreactjoyride2823478
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_badge/_badge.scss +0 -6
- data/app/pb_kits/playbook/pb_badge/_badge.tsx +2 -4
- data/app/pb_kits/playbook/pb_badge/badge.rb +1 -1
- data/app/pb_kits/playbook/pb_badge/badge.test.js +11 -17
- data/app/pb_kits/playbook/pb_badge/docs/_badge_notification.html.erb +0 -13
- data/app/pb_kits/playbook/pb_badge/docs/_badge_notification.jsx +12 -31
- data/dist/chunks/_typeahead-D-4y9pbv.js +22 -0
- data/dist/chunks/_weekday_stacked-D5SswkOC.js +45 -0
- 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 +3 -3
- data/dist/chunks/_typeahead-eBLGedV-.js +0 -22
- data/dist/chunks/_weekday_stacked-Bw_5qEUW.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: f7e7c54e10045c7e3563e367835f5073dc45ef32097165fac863e8b92f389825
|
4
|
+
data.tar.gz: 945ee697a49cf8f1b964ba1e9c2ab2fa22f3900e63fe85d269dbf555b3892fcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a21abe1d8d767ecdd71c67a72c48dcfb37ff1203909b80fc65a29d0e9c3d5a7bdb02a622f5b64536244d0f4b073347151df0e388fdab94e321824c6fd199b2f3
|
7
|
+
data.tar.gz: e4b5207258a6cdef2c54b6da1f373d2da39afda325aa4b5b10ae5d59b0a671cdfc015354fd81b47bf219e8473bd8c7007d501f67ce6b24810ba1af1382d85f3c
|
@@ -25,7 +25,7 @@ type BadgeProps = {
|
|
25
25
|
removeOnClick?: React.MouseEventHandler<HTMLSpanElement>,
|
26
26
|
rounded?: boolean,
|
27
27
|
text?: string,
|
28
|
-
variant?: "error" | "info" | "neutral" | "notification" | "
|
28
|
+
variant?: "error" | "info" | "neutral" | "notification" | "primary" | "success" | "warning",
|
29
29
|
} & GlobalProps
|
30
30
|
const Badge = (props: BadgeProps): React.ReactElement => {
|
31
31
|
const {
|
@@ -45,9 +45,7 @@ const Badge = (props: BadgeProps): React.ReactElement => {
|
|
45
45
|
const dataProps = buildDataProps(data)
|
46
46
|
const htmlProps = buildHtmlProps(htmlOptions)
|
47
47
|
const css = classnames(
|
48
|
-
buildCss('pb_badge_kit',
|
49
|
-
variant === "success" ? "success_sm" : variant === "notificationError" ? "notification_error" : variant,
|
50
|
-
rounded ? 'rounded' : ''),
|
48
|
+
buildCss('pb_badge_kit', variant === "success" ? "success_sm" : variant, rounded ? 'rounded' : null),
|
51
49
|
globalProps(props),
|
52
50
|
className
|
53
51
|
)
|
@@ -6,7 +6,7 @@ module Playbook
|
|
6
6
|
prop :rounded, type: Playbook::Props::Boolean, default: false
|
7
7
|
prop :text
|
8
8
|
prop :variant, type: Playbook::Props::Enum,
|
9
|
-
values: %w[success warning error info neutral notification
|
9
|
+
values: %w[success warning error info neutral notification primary],
|
10
10
|
default: "neutral"
|
11
11
|
|
12
12
|
def classname
|
@@ -94,21 +94,15 @@ test('displays success variant', () => {
|
|
94
94
|
|
95
95
|
})
|
96
96
|
|
97
|
-
test('displays notification
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
)
|
109
|
-
const kit = screen.getByTestId(testId)
|
110
|
-
expect(kit).toHaveClass(`pb_badge_kit_${colorVariant === "notificationError" ? "notification_error" : "notification"}`)
|
111
|
-
|
112
|
-
cleanup()
|
113
|
-
})
|
97
|
+
test('displays notification variant', () => {
|
98
|
+
render(
|
99
|
+
<Badge
|
100
|
+
data={{ testid: testId }}
|
101
|
+
text="1"
|
102
|
+
variant="notification"
|
103
|
+
/>
|
104
|
+
)
|
105
|
+
const kit = screen.getByTestId(testId)
|
106
|
+
expect(kit).toHaveClass(`pb_badge_kit_notification`)
|
107
|
+
cleanup()
|
114
108
|
})
|
@@ -10,16 +10,3 @@
|
|
10
10
|
variant: "notification"
|
11
11
|
}) %>
|
12
12
|
</div>
|
13
|
-
|
14
|
-
<div>
|
15
|
-
<%= pb_rails("badge", props: {
|
16
|
-
text: "1",
|
17
|
-
variant: "notification_error",
|
18
|
-
rounded: true
|
19
|
-
}) %>
|
20
|
-
|
21
|
-
<%= pb_rails("badge", props: {
|
22
|
-
text: "4",
|
23
|
-
variant: "notification_error"
|
24
|
-
}) %>
|
25
|
-
</div>
|
@@ -4,39 +4,20 @@ import Badge from '../_badge'
|
|
4
4
|
const BadgeNotification = (props) => {
|
5
5
|
return (
|
6
6
|
<>
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
/>
|
7
|
+
<Badge
|
8
|
+
rounded
|
9
|
+
text="1"
|
10
|
+
variant="notification"
|
11
|
+
{...props}
|
12
|
+
/>
|
14
13
|
|
15
|
-
|
14
|
+
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<div>
|
25
|
-
<Badge
|
26
|
-
rounded
|
27
|
-
text="1"
|
28
|
-
variant="notificationError"
|
29
|
-
{...props}
|
30
|
-
/>
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<Badge
|
35
|
-
text="4"
|
36
|
-
variant="notificationError"
|
37
|
-
{...props}
|
38
|
-
/>
|
39
|
-
</div>
|
16
|
+
<Badge
|
17
|
+
text="4"
|
18
|
+
variant="notification"
|
19
|
+
{...props}
|
20
|
+
/>
|
40
21
|
</>
|
41
22
|
)
|
42
23
|
}
|