playbook_ui 15.1.0.pre.alpha.iconstatvaluescss10956 → 15.1.0.pre.alpha.multipleusersstackedscss11047
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +0 -2
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +4 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_stacked_alert.html.erb +16 -16
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_stacked_alert.jsx +2 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.html.erb +31 -31
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +4 -3
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +2 -2
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.scss +21 -15
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +5 -6
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +0 -2
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb +3 -11
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +8 -9
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +36 -9
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +14 -6
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.html.erb +8 -4
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx +5 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.md +1 -0
- data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +3 -1
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +6 -0
- data/dist/chunks/{_line_graph-C9stNsP3.js → _line_graph-BnK1i7QI.js} +1 -1
- data/dist/chunks/{_typeahead-D3MtsWXG.js → _typeahead-pbS3fEzb.js} +1 -1
- data/dist/chunks/{_weekday_stacked-BkTDqn-r.js → _weekday_stacked-OOFiMFSs.js} +3 -3
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +2 -2
- 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 +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3357be552d2d97d78a0b5c06c4b55134e7aa060b8a73a4cfa77f7685b3c3535d
|
|
4
|
+
data.tar.gz: c193db4e1166324aed46b3aa82207d0c72c6de47a100940a176a2743bbcc40a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c522b63ef909ec5d224f123873ada1d90595a1437774f5bf5fc26e71181853d4022143062c706b87dfba324f59c554203d5987efa90c5319cf9c8890ad9cab52
|
|
7
|
+
data.tar.gz: 1ca144b57c65625a162efa758cfc43605aaa5eeee75fa44ab1f346b46805383636c1307a83269c45a0701955e9dbae1da6f6d109d974f4823d2eb90873fd63e6
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
<%= pb_rails("button", props: { text: "Delete Status", data: {"open-dialog": "dialog-stacked-delete"}, margin_right: "md" }) %>
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
<%= pb_rails("dialog", props: {
|
|
7
|
-
id:"dialog-stacked-default",
|
|
6
|
+
<%= pb_rails("dialog", props: {
|
|
7
|
+
id:"dialog-stacked-default",
|
|
8
8
|
status: "default",
|
|
9
|
-
size: "sm",
|
|
10
|
-
title: "Are you sure?",
|
|
11
|
-
text: "Text explaining why there is an alert",
|
|
9
|
+
size: "sm",
|
|
10
|
+
title: "Are you sure?",
|
|
11
|
+
text: "Text explaining why there is an alert",
|
|
12
12
|
}) do %>
|
|
13
13
|
<%= pb_rails("dialog/dialog_footer") do %>
|
|
14
14
|
<%= pb_rails("flex", props: { orientation: "column", padding_x:"md", padding: "sm" }) do %>
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
<% end %>
|
|
19
19
|
<% end %>
|
|
20
20
|
|
|
21
|
-
<%= pb_rails("dialog", props: {
|
|
22
|
-
id:"dialog-stacked-caution",
|
|
21
|
+
<%= pb_rails("dialog", props: {
|
|
22
|
+
id:"dialog-stacked-caution",
|
|
23
23
|
status: "caution",
|
|
24
|
-
size: "sm",
|
|
25
|
-
title: "Are you sure?",
|
|
26
|
-
text: "This is the action you will be taking",
|
|
24
|
+
size: "sm",
|
|
25
|
+
title: "Are you sure?",
|
|
26
|
+
text: "This is the action you will be taking",
|
|
27
27
|
}) do %>
|
|
28
28
|
<%= pb_rails("dialog/dialog_footer") do %>
|
|
29
29
|
<%= pb_rails("flex", props: { orientation: "column", padding_x:"md", padding: "sm" }) do %>
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
<% end %>
|
|
34
34
|
<% end %>
|
|
35
35
|
|
|
36
|
-
<%= pb_rails("dialog", props: {
|
|
37
|
-
id:"dialog-stacked-delete",
|
|
36
|
+
<%= pb_rails("dialog", props: {
|
|
37
|
+
id:"dialog-stacked-delete",
|
|
38
38
|
status: "delete",
|
|
39
|
-
size: "sm",
|
|
40
|
-
title: "Delete",
|
|
41
|
-
text: "You are about to delete ...",
|
|
39
|
+
size: "sm",
|
|
40
|
+
title: "Delete",
|
|
41
|
+
text: "You are about to delete ...",
|
|
42
42
|
}) do %>
|
|
43
43
|
<%= pb_rails("dialog/dialog_footer") do %>
|
|
44
44
|
<%= pb_rails("flex", props: { orientation: "column", padding_x:"md", padding: "sm" }) do %>
|
|
45
|
-
<%= pb_rails("button", props: { text: "Yes, Action", full_width: true }) %>
|
|
45
|
+
<%= pb_rails("button", props: { text: "Yes, Action", variant: "danger", full_width: true }) %>
|
|
46
46
|
<%= pb_rails("button", props: { text: "No, Cancel", variant: "secondary", full_width: true, margin_top: "sm", data: {"close-dialog": "dialog-stacked-delete" } }) %>
|
|
47
47
|
<% end %>
|
|
48
48
|
<% end %>
|
|
@@ -51,7 +51,7 @@ const DialogStackedAlert = () => {
|
|
|
51
51
|
return (
|
|
52
52
|
<div>
|
|
53
53
|
<Flex
|
|
54
|
-
rowGap="xs"
|
|
54
|
+
rowGap="xs"
|
|
55
55
|
wrap
|
|
56
56
|
>
|
|
57
57
|
<Button
|
|
@@ -93,6 +93,7 @@ const DialogStackedAlert = () => {
|
|
|
93
93
|
<Button
|
|
94
94
|
fullWidth
|
|
95
95
|
onClick={dialog.toggle}
|
|
96
|
+
variant= {dialog.status == "delete" ? "danger" : "primary"}
|
|
96
97
|
>
|
|
97
98
|
{dialog.buttonOneText}
|
|
98
99
|
</Button>
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
<%= pb_rails("button", props: { text: "Success Status", data: {"open-dialog": "dialog-status-success"}, margin_right: "md" }) %>
|
|
9
9
|
<% end %>
|
|
10
10
|
|
|
11
|
-
<%= pb_rails("dialog", props: {
|
|
12
|
-
id:"dialog-status-default",
|
|
11
|
+
<%= pb_rails("dialog", props: {
|
|
12
|
+
id:"dialog-status-default",
|
|
13
13
|
status: "default",
|
|
14
|
-
size: "status_size",
|
|
15
|
-
title: "Are you sure?",
|
|
16
|
-
text: "Text explaining why there is an alert",
|
|
14
|
+
size: "status_size",
|
|
15
|
+
title: "Are you sure?",
|
|
16
|
+
text: "Text explaining why there is an alert",
|
|
17
17
|
}) do %>
|
|
18
18
|
<%= pb_rails("dialog/dialog_footer") do %>
|
|
19
19
|
<%= pb_rails("flex", props: { spacing:"between", padding_x:"md", padding_bottom:"md", padding: "sm" }) do %>
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
<% end %>
|
|
24
24
|
<% end %>
|
|
25
25
|
|
|
26
|
-
<%= pb_rails("dialog", props: {
|
|
27
|
-
id:"dialog-status-info",
|
|
26
|
+
<%= pb_rails("dialog", props: {
|
|
27
|
+
id:"dialog-status-info",
|
|
28
28
|
status: "info",
|
|
29
|
-
size: "status_size",
|
|
30
|
-
title: "Information",
|
|
31
|
-
text: "Text explaining why there is an alert",
|
|
29
|
+
size: "status_size",
|
|
30
|
+
title: "Information",
|
|
31
|
+
text: "Text explaining why there is an alert",
|
|
32
32
|
}) do %>
|
|
33
33
|
<%= pb_rails("dialog/dialog_footer") do %>
|
|
34
34
|
<%= pb_rails("flex", props: { spacing:"between", padding_x:"md", padding_bottom:"md", padding: "sm" }) do %>
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
<% end %>
|
|
38
38
|
<% end %>
|
|
39
39
|
|
|
40
|
-
<%= pb_rails("dialog", props: {
|
|
41
|
-
id:"dialog-status-caution",
|
|
40
|
+
<%= pb_rails("dialog", props: {
|
|
41
|
+
id:"dialog-status-caution",
|
|
42
42
|
status: "caution",
|
|
43
|
-
size: "status_size",
|
|
44
|
-
title: "Are you Sure?",
|
|
45
|
-
text: "This is the action you will be taking",
|
|
43
|
+
size: "status_size",
|
|
44
|
+
title: "Are you Sure?",
|
|
45
|
+
text: "This is the action you will be taking",
|
|
46
46
|
}) do %>
|
|
47
47
|
<%= pb_rails("dialog/dialog_footer") do %>
|
|
48
48
|
<%= pb_rails("flex", props: { spacing:"between", padding_x:"md", padding_bottom:"md", padding: "sm" }) do %>
|
|
@@ -52,27 +52,27 @@
|
|
|
52
52
|
<% end %>
|
|
53
53
|
<% end %>
|
|
54
54
|
|
|
55
|
-
<%= pb_rails("dialog", props: {
|
|
56
|
-
id:"dialog-status-delete",
|
|
55
|
+
<%= pb_rails("dialog", props: {
|
|
56
|
+
id:"dialog-status-delete",
|
|
57
57
|
status: "delete",
|
|
58
|
-
size: "status_size",
|
|
59
|
-
title: "Delete",
|
|
60
|
-
text: "You are about to delete ...",
|
|
58
|
+
size: "status_size",
|
|
59
|
+
title: "Delete",
|
|
60
|
+
text: "You are about to delete ...",
|
|
61
61
|
}) do %>
|
|
62
62
|
<%= pb_rails("dialog/dialog_footer") do %>
|
|
63
63
|
<%= pb_rails("flex", props: { spacing:"between", padding_x:"md", padding_bottom:"md", padding: "sm" }) do %>
|
|
64
|
-
<%= pb_rails("button", props: { text: "Yes, Delete" }) %>
|
|
64
|
+
<%= pb_rails("button", props: { text: "Yes, Delete", variant: "danger" }) %>
|
|
65
65
|
<%= pb_rails("button", props: { text: "No, Cancel", variant: "secondary", data: {"close-dialog": "dialog-status-delete" } }) %>
|
|
66
66
|
<% end %>
|
|
67
67
|
<% end %>
|
|
68
68
|
<% end %>
|
|
69
69
|
|
|
70
|
-
<%= pb_rails("dialog", props: {
|
|
71
|
-
id:"dialog-status-error",
|
|
70
|
+
<%= pb_rails("dialog", props: {
|
|
71
|
+
id:"dialog-status-error",
|
|
72
72
|
status: "error",
|
|
73
|
-
size: "status_size",
|
|
74
|
-
title: "Error Message",
|
|
75
|
-
text: "Text explaining the error",
|
|
73
|
+
size: "status_size",
|
|
74
|
+
title: "Error Message",
|
|
75
|
+
text: "Text explaining the error",
|
|
76
76
|
}) do %>
|
|
77
77
|
<%= pb_rails("dialog/dialog_footer") do %>
|
|
78
78
|
<%= pb_rails("flex", props: { spacing:"between", padding_x:"md", padding_bottom:"md", padding: "sm" }) do %>
|
|
@@ -81,12 +81,12 @@
|
|
|
81
81
|
<% end %>
|
|
82
82
|
<% end %>
|
|
83
83
|
|
|
84
|
-
<%= pb_rails("dialog", props: {
|
|
85
|
-
id:"dialog-status-success",
|
|
84
|
+
<%= pb_rails("dialog", props: {
|
|
85
|
+
id:"dialog-status-success",
|
|
86
86
|
status: "success",
|
|
87
|
-
size: "status_size",
|
|
88
|
-
title: "Success!",
|
|
89
|
-
text: "Text explaining what is successful",
|
|
87
|
+
size: "status_size",
|
|
88
|
+
title: "Success!",
|
|
89
|
+
text: "Text explaining what is successful",
|
|
90
90
|
}) do %>
|
|
91
91
|
<%= pb_rails("dialog/dialog_footer") do %>
|
|
92
92
|
<%= pb_rails("flex", props: { spacing:"between", padding_x:"md", padding_bottom:"md", padding: "sm" }) do %>
|
|
@@ -83,8 +83,8 @@ const DialogStatus = () => {
|
|
|
83
83
|
|
|
84
84
|
return (
|
|
85
85
|
<div>
|
|
86
|
-
<Flex
|
|
87
|
-
rowGap="xs"
|
|
86
|
+
<Flex
|
|
87
|
+
rowGap="xs"
|
|
88
88
|
wrap
|
|
89
89
|
>
|
|
90
90
|
<Button
|
|
@@ -117,7 +117,7 @@ const DialogStatus = () => {
|
|
|
117
117
|
>
|
|
118
118
|
{"Success Status"}
|
|
119
119
|
</Button>
|
|
120
|
-
<Button
|
|
120
|
+
<Button
|
|
121
121
|
marginRight="md"
|
|
122
122
|
onClick={toggleErrorAlert}
|
|
123
123
|
>
|
|
@@ -152,6 +152,7 @@ const DialogStatus = () => {
|
|
|
152
152
|
<Button
|
|
153
153
|
onClick={dialog.toggle}
|
|
154
154
|
paddingRight="xl"
|
|
155
|
+
variant={dialog.status == "delete" ? "danger" : "primary"}
|
|
155
156
|
>
|
|
156
157
|
{dialog.buttonOneText}
|
|
157
158
|
</Button>
|
|
@@ -3,7 +3,7 @@ import React from 'react'
|
|
|
3
3
|
import classnames from 'classnames'
|
|
4
4
|
|
|
5
5
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
6
|
-
import { globalProps
|
|
6
|
+
import { globalProps } from '../utilities/globalProps'
|
|
7
7
|
|
|
8
8
|
import Icon from '../pb_icon/_icon'
|
|
9
9
|
|
|
@@ -26,7 +26,7 @@ type IconCircleProps = {
|
|
|
26
26
|
| "orange"
|
|
27
27
|
| "green"
|
|
28
28
|
| "lighter",
|
|
29
|
-
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
31
|
const IconCircle = (props: IconCircleProps) => {
|
|
32
32
|
const {
|
|
@@ -3,45 +3,51 @@
|
|
|
3
3
|
@import "../tokens/spacing";
|
|
4
4
|
@import "../pb_icon_circle/icon_circle";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
.pb_icon_stat_value_kit_vertical
|
|
8
|
-
{
|
|
6
|
+
[class^=pb_icon_stat_value_kit]{
|
|
9
7
|
display: flex;
|
|
10
8
|
align-items: baseline;
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
&[class*=_vertical] {
|
|
13
11
|
flex-direction: column;
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
&[class*=_center] {
|
|
16
14
|
align-items: center;
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
[class^=pb_title],
|
|
17
|
+
[class^=pb_body],
|
|
18
|
+
[class^=pb_caption] {
|
|
21
19
|
text-align: center;
|
|
22
20
|
}
|
|
23
21
|
}
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
&[class*=_right] {
|
|
26
24
|
align-items: flex-end;
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
[class^=pb_title],
|
|
27
|
+
[class^=pb_body],
|
|
28
|
+
[class^=pb_caption] {
|
|
31
29
|
text-align: right;
|
|
32
30
|
}
|
|
33
31
|
}
|
|
32
|
+
|
|
33
|
+
[class^=pb_icon_circle] {
|
|
34
|
+
margin-bottom: $space-xs;
|
|
35
|
+
}
|
|
34
36
|
}
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
&[class*=_horizontal] {
|
|
37
39
|
align-items: center;
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
&[class*=_center] {
|
|
40
42
|
justify-content: center;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
&[class*=_right] {
|
|
44
46
|
justify-content: flex-end;
|
|
45
47
|
}
|
|
48
|
+
|
|
49
|
+
[class^=pb_icon_circle] {
|
|
50
|
+
margin-right: $space-sm;
|
|
51
|
+
}
|
|
46
52
|
}
|
|
47
53
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
import classnames from 'classnames'
|
|
3
3
|
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
5
|
-
import { globalProps
|
|
5
|
+
import { globalProps } from '../utilities/globalProps'
|
|
6
6
|
|
|
7
7
|
import Body from '../pb_body/_body'
|
|
8
8
|
import Caption from '../pb_caption/_caption'
|
|
@@ -33,7 +33,8 @@ type IconStatValueProps = {
|
|
|
33
33
|
| "yellow"
|
|
34
34
|
| "orange"
|
|
35
35
|
| "green"
|
|
36
|
-
|
|
36
|
+
| "lighter",
|
|
37
|
+
}
|
|
37
38
|
|
|
38
39
|
const IconStatValue = (props: IconStatValueProps): React.ReactElement => {
|
|
39
40
|
const {
|
|
@@ -49,13 +50,13 @@ const IconStatValue = (props: IconStatValueProps): React.ReactElement => {
|
|
|
49
50
|
text = '',
|
|
50
51
|
unit = '',
|
|
51
52
|
value = 0,
|
|
52
|
-
variant = '
|
|
53
|
+
variant = 'lighter',
|
|
53
54
|
} = props
|
|
54
55
|
const ariaProps = buildAriaProps(aria)
|
|
55
56
|
const dataProps = buildDataProps(data)
|
|
56
57
|
const htmlProps = buildHtmlProps(htmlOptions)
|
|
57
58
|
const classes = classnames(
|
|
58
|
-
buildCss('pb_icon_stat_value_kit', orientation), globalProps(props),
|
|
59
|
+
buildCss('pb_icon_stat_value_kit', orientation, size, variant), globalProps(props),
|
|
59
60
|
className
|
|
60
61
|
)
|
|
61
62
|
const titleSize = function(size: "sm" | "md" | "lg") {
|
|
@@ -100,8 +101,6 @@ const IconStatValue = (props: IconStatValueProps): React.ReactElement => {
|
|
|
100
101
|
<IconCircle
|
|
101
102
|
dark={dark}
|
|
102
103
|
icon={icon}
|
|
103
|
-
marginBottom={orientation == 'vertical' ? 'xs' : undefined}
|
|
104
|
-
marginRight={orientation == 'horizontal' ? 'sm' : undefined}
|
|
105
104
|
size={size}
|
|
106
105
|
variant={variant}
|
|
107
106
|
/>
|
|
@@ -9,8 +9,8 @@ module Playbook
|
|
|
9
9
|
values: %w[sm md lg],
|
|
10
10
|
default: "sm"
|
|
11
11
|
prop :variant, type: Playbook::Props::Enum,
|
|
12
|
-
values: %w[default royal blue purple teal red yellow green orange],
|
|
13
|
-
default: "
|
|
12
|
+
values: %w[default royal blue purple teal red yellow green orange lighter],
|
|
13
|
+
default: "lighter"
|
|
14
14
|
|
|
15
15
|
prop :orientation, type: Playbook::Props::Enum,
|
|
16
16
|
values: %w[vertical horizontal],
|
|
@@ -25,7 +25,7 @@ module Playbook
|
|
|
25
25
|
prop :value
|
|
26
26
|
|
|
27
27
|
def classname
|
|
28
|
-
generate_classname("pb_icon_stat_value_kit", orientation)
|
|
28
|
+
generate_classname("pb_icon_stat_value_kit", orientation, size, variant)
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def value_string
|
|
@@ -41,14 +41,6 @@ module Playbook
|
|
|
41
41
|
3
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
|
-
|
|
45
|
-
def icon_margin_right
|
|
46
|
-
orientation === "horizontal" && "sm"
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
def icon_margin_bottom
|
|
50
|
-
orientation === "vertical" && "xs"
|
|
51
|
-
end
|
|
52
44
|
end
|
|
53
45
|
end
|
|
54
46
|
end
|
|
@@ -18,7 +18,7 @@ describe("IconStatValue Kit", () => {
|
|
|
18
18
|
)
|
|
19
19
|
|
|
20
20
|
const kit = screen.getByTestId(testId)
|
|
21
|
-
expect(kit).toHaveClass("
|
|
21
|
+
expect(kit).toHaveClass("pb_icon_stat_value_kit_horizontal_sm_lighter")
|
|
22
22
|
})
|
|
23
23
|
|
|
24
24
|
test("renders icon", () => {
|
|
@@ -99,10 +99,9 @@ describe("IconStatValue Kit", () => {
|
|
|
99
99
|
value={64.18}
|
|
100
100
|
/>
|
|
101
101
|
)
|
|
102
|
-
|
|
102
|
+
|
|
103
103
|
const kit = screen.getByTestId(testId)
|
|
104
|
-
|
|
105
|
-
expect(title).toHaveClass(`pb_title_${size}`)
|
|
104
|
+
expect(kit).toHaveClass(`pb_icon_stat_value_kit_horizontal_${sizeProp}_lighter`)
|
|
106
105
|
|
|
107
106
|
cleanup()
|
|
108
107
|
})
|
|
@@ -116,7 +115,8 @@ describe("IconStatValue Kit", () => {
|
|
|
116
115
|
"teal",
|
|
117
116
|
"red",
|
|
118
117
|
"yellow",
|
|
119
|
-
"green"
|
|
118
|
+
"green",
|
|
119
|
+
"lighter"].forEach(
|
|
120
120
|
(colorProp) => {
|
|
121
121
|
render(
|
|
122
122
|
<IconStatValue
|
|
@@ -128,10 +128,9 @@ describe("IconStatValue Kit", () => {
|
|
|
128
128
|
variant={colorProp}
|
|
129
129
|
/>
|
|
130
130
|
)
|
|
131
|
-
|
|
131
|
+
|
|
132
132
|
const kit = screen.getByTestId(testId)
|
|
133
|
-
|
|
134
|
-
expect(iconCircle).toBeInTheDocument()
|
|
133
|
+
expect(kit).toHaveClass(`pb_icon_stat_value_kit_horizontal_sm_${colorProp}`)
|
|
135
134
|
|
|
136
135
|
cleanup()
|
|
137
136
|
})
|
|
@@ -150,7 +149,7 @@ describe("IconStatValue Kit", () => {
|
|
|
150
149
|
)
|
|
151
150
|
|
|
152
151
|
const kit = screen.getByTestId(testId)
|
|
153
|
-
expect(kit).toHaveClass("
|
|
152
|
+
expect(kit).toHaveClass("pb_icon_stat_value_kit_vertical_sm_lighter")
|
|
154
153
|
})
|
|
155
154
|
|
|
156
155
|
})
|
|
@@ -89,7 +89,18 @@ $positions: (
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
.pb_multiple_users_stacked_kit,
|
|
93
|
+
.pb_multiple_users_stacked_kit_single,
|
|
94
|
+
.pb_multiple_users_stacked_kit_bubble,
|
|
95
|
+
.pb_multiple_users_stacked_kit_single_bubble,
|
|
96
|
+
.pb_multiple_users_stacked_kit_bubble_size_sm,
|
|
97
|
+
.pb_multiple_users_stacked_kit_bubble_size_md,
|
|
98
|
+
.pb_multiple_users_stacked_kit_bubble_size_lg,
|
|
99
|
+
.pb_multiple_users_stacked_kit_bubble_size_xl,
|
|
100
|
+
.pb_multiple_users_stacked_kit_single_bubble_size_sm,
|
|
101
|
+
.pb_multiple_users_stacked_kit_single_bubble_size_md,
|
|
102
|
+
.pb_multiple_users_stacked_kit_single_bubble_size_lg,
|
|
103
|
+
.pb_multiple_users_stacked_kit_single_bubble_size_xl {
|
|
93
104
|
$container_size: map-get($avatar-sizes, "xs");
|
|
94
105
|
$bubble_container_size: map-get($avatar-sizes, "sm");
|
|
95
106
|
$overlap: -15px;
|
|
@@ -103,7 +114,8 @@ $positions: (
|
|
|
103
114
|
position: relative;
|
|
104
115
|
flex-shrink: 0;
|
|
105
116
|
flex-grow: 0;
|
|
106
|
-
|
|
117
|
+
.pb_avatar_kit_size_xs.pb_multiple_users_stacked_item,
|
|
118
|
+
.pb_avatar_kit_size_md.pb_multiple_users_stacked_item {
|
|
107
119
|
@include avatar-size($stacked_size);
|
|
108
120
|
&.dark {
|
|
109
121
|
.avatar_wrapper {
|
|
@@ -117,10 +129,17 @@ $positions: (
|
|
|
117
129
|
}
|
|
118
130
|
}
|
|
119
131
|
}
|
|
120
|
-
|
|
132
|
+
&.pb_multiple_users_stacked_kit_single .pb_multiple_users_stacked_item,
|
|
133
|
+
&.pb_multiple_users_stacked_kit_single_bubble .pb_multiple_users_stacked_item,
|
|
134
|
+
&.pb_multiple_users_stacked_kit_single_bubble_size_sm .pb_multiple_users_stacked_item,
|
|
135
|
+
&.pb_multiple_users_stacked_kit_single_bubble_size_md .pb_multiple_users_stacked_item,
|
|
136
|
+
&.pb_multiple_users_stacked_kit_single_bubble_size_lg .pb_multiple_users_stacked_item,
|
|
137
|
+
&.pb_multiple_users_stacked_kit_single_bubble_size_xl .pb_multiple_users_stacked_item {
|
|
121
138
|
@include avatar-size(28px);
|
|
122
139
|
}
|
|
123
|
-
|
|
140
|
+
.pb_avatar_kit_size_xs.second_item,
|
|
141
|
+
.pb_avatar_kit_size_md.second_item,
|
|
142
|
+
.pb_badge_kit_primary_rounded.second_item {
|
|
124
143
|
@include position((bottom: 0, right: 0));
|
|
125
144
|
z-index: 2;
|
|
126
145
|
background: tint($primary, 90%);
|
|
@@ -143,7 +162,8 @@ $positions: (
|
|
|
143
162
|
|
|
144
163
|
// Iterate over each size to adjust the bubble container only when class contains "_bubble_"
|
|
145
164
|
@each $size_name, $size_value in $avatar-sizes {
|
|
146
|
-
|
|
165
|
+
&.pb_multiple_users_stacked_kit_bubble_size_#{$size_name},
|
|
166
|
+
&.pb_multiple_users_stacked_kit_single_bubble_size_#{$size_name} {
|
|
147
167
|
// Set bubble container size based on the class
|
|
148
168
|
$bubble_container_size: $size_value;
|
|
149
169
|
$container_size: $size_value;
|
|
@@ -161,7 +181,8 @@ $positions: (
|
|
|
161
181
|
background-color: $card_dark;
|
|
162
182
|
}
|
|
163
183
|
|
|
164
|
-
|
|
184
|
+
.pb_avatar_kit_size_xs.pb_multiple_users_stacked_item,
|
|
185
|
+
.pb_avatar_kit_size_md.pb_multiple_users_stacked_item {
|
|
165
186
|
@include avatar-size($bubble_container_size * 0.45); // Adjust the size of stacked avatars
|
|
166
187
|
|
|
167
188
|
&.dark {
|
|
@@ -175,7 +196,8 @@ $positions: (
|
|
|
175
196
|
}
|
|
176
197
|
}
|
|
177
198
|
|
|
178
|
-
|
|
199
|
+
.pb_avatar_kit_size_xs,
|
|
200
|
+
.pb_avatar_kit_size_md {
|
|
179
201
|
// First Item
|
|
180
202
|
&.first_item {
|
|
181
203
|
@include position(map-get(map-get($positions, 'first-item-double'), $size_name));
|
|
@@ -235,8 +257,13 @@ $positions: (
|
|
|
235
257
|
}
|
|
236
258
|
}
|
|
237
259
|
|
|
238
|
-
|
|
239
|
-
|
|
260
|
+
&.pb_multiple_users_stacked_kit_single_bubble,
|
|
261
|
+
&.pb_multiple_users_stacked_kit_single_bubble_size_sm,
|
|
262
|
+
&.pb_multiple_users_stacked_kit_single_bubble_size_md,
|
|
263
|
+
&.pb_multiple_users_stacked_kit_single_bubble_size_lg,
|
|
264
|
+
&.pb_multiple_users_stacked_kit_single_bubble_size_xl {
|
|
265
|
+
.pb_avatar_kit_size_xs.first_item,
|
|
266
|
+
.pb_avatar_kit_size_md.first_item {
|
|
240
267
|
@include position((top: 0, left: 0));
|
|
241
268
|
@include avatar-size($bubble_container_size);
|
|
242
269
|
}
|
|
@@ -140,10 +140,14 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
|
140
140
|
formattedValue = value
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
const errorId = error ? `${id}-error` : undefined
|
|
144
|
+
|
|
143
145
|
const textInput = (
|
|
144
146
|
childInput ? React.cloneElement(children, { className: "text_input" }) :
|
|
145
147
|
(<input
|
|
146
148
|
{...domSafeProps(props)}
|
|
149
|
+
aria-describedby={errorId}
|
|
150
|
+
aria-invalid={!!error}
|
|
147
151
|
autoComplete={typeof autoComplete === "string" ? autoComplete : ( autoComplete ? undefined : "off" )}
|
|
148
152
|
className="text_input"
|
|
149
153
|
disabled={disabled}
|
|
@@ -202,16 +206,20 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
|
202
206
|
{...htmlProps}
|
|
203
207
|
className={css}
|
|
204
208
|
>
|
|
205
|
-
{label &&
|
|
206
|
-
<
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
{label && (
|
|
210
|
+
<label htmlFor={id}>
|
|
211
|
+
<Caption className="pb_text_input_kit_label"
|
|
212
|
+
text={label}
|
|
213
|
+
/>
|
|
214
|
+
</label>
|
|
215
|
+
)}
|
|
211
216
|
<div className={`${addOnCss} text_input_wrapper`}>
|
|
212
217
|
{render}
|
|
213
218
|
|
|
214
219
|
{error && <Body
|
|
220
|
+
aria={{ atomic: "true", live: "polite" }}
|
|
221
|
+
htmlOptions={{ role: "alert" }}
|
|
222
|
+
id={errorId}
|
|
215
223
|
status="negative"
|
|
216
224
|
text={error}
|
|
217
225
|
variant={null}
|
|
@@ -9,23 +9,27 @@
|
|
|
9
9
|
|
|
10
10
|
<%= pb_rails("text_input", props: {
|
|
11
11
|
label: "Last Name",
|
|
12
|
-
placeholder: "Enter last name"
|
|
12
|
+
placeholder: "Enter last name",
|
|
13
|
+
id: "last-name"
|
|
13
14
|
}) %>
|
|
14
15
|
|
|
15
16
|
<%= pb_rails("text_input", props: {
|
|
16
17
|
label: "Phone Number",
|
|
17
18
|
type: "phone",
|
|
18
|
-
placeholder: "Enter phone number"
|
|
19
|
+
placeholder: "Enter phone number",
|
|
20
|
+
id: "phone"
|
|
19
21
|
}) %>
|
|
20
22
|
|
|
21
23
|
<%= pb_rails("text_input", props: {
|
|
22
24
|
label: "Email Address",
|
|
23
25
|
type: "email",
|
|
24
|
-
placeholder: "Enter email address"
|
|
26
|
+
placeholder: "Enter email address",
|
|
27
|
+
id: "email"
|
|
25
28
|
}) %>
|
|
26
29
|
|
|
27
30
|
<%= pb_rails("text_input", props: {
|
|
28
31
|
label: "Zip Code",
|
|
29
32
|
type: "number",
|
|
30
|
-
placeholder: "Enter zip code"
|
|
33
|
+
placeholder: "Enter zip code",
|
|
34
|
+
id: "zip"
|
|
31
35
|
}) %>
|