playbook_ui 14.12.0.pre.alpha.play1753updatepbcontenttags5889 → 14.12.0.pre.alpha.play1790darkaudittable5802
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_avatar/_avatar.scss +0 -9
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +7 -11
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +7 -6
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +3 -9
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +2 -6
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +7 -11
- data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +2 -11
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +6 -1
- data/app/pb_kits/playbook/pb_nav/item.html.erb +21 -3
- data/app/pb_kits/playbook/pb_nav/nav.html.erb +8 -3
- data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +6 -1
- data/app/pb_kits/playbook/pb_popover/popover.html.erb +6 -1
- data/app/pb_kits/playbook/pb_user/_user.tsx +0 -3
- data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_user/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
- data/app/pb_kits/playbook/pb_user/user.rb +0 -1
- data/app/pb_kits/playbook/pb_user/user.test.js +0 -14
- data/dist/chunks/{_typeahead-W0hatdPs.js → _typeahead-BIhRQo8Q.js} +2 -2
- data/dist/chunks/{_weekday_stacked-C98LOqgG.js → _weekday_stacked-CttHBFW3.js} +2 -2
- 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 -11
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +0 -11
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +0 -22
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +0 -1
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +0 -1
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +0 -42
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +0 -59
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 136b50dee766ec4667e6d2f602d111a863ce4020dd67fe561bf2778ebd060fb1
|
4
|
+
data.tar.gz: 3ac4d8e93f62e1814d1ebe98fe4532239eb54370421b5bbad63503411d7639f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e07d993618ba3291e460247bfae535f6725c3563a10bc58e4ac90bcedb436088f73c6c979114ca381f060bc222dd640b32cd66bb0fd91d6a6a8c298f26eb3d64
|
7
|
+
data.tar.gz: 98ffa30e5b69b4759356a445a308eb9858522f206df9dff83b142e92bc75376d60235719d777702a3185ecbb2a51c2c2f7b64a7998325482f607feab9e249c61
|
@@ -27,9 +27,6 @@ $avatar-sizes: (
|
|
27
27
|
flex-basis: $size;
|
28
28
|
|
29
29
|
& > [class^=pb_flex_kit] {
|
30
|
-
[class^=pb_card_kit] {
|
31
|
-
padding: 2px;
|
32
|
-
}
|
33
30
|
[class^=pb_card_kit].overlay_bottom_center,
|
34
31
|
[class^=pb_card_kit].overlay_top_center {
|
35
32
|
left: 50%;
|
@@ -55,10 +52,6 @@ $avatar-sizes: (
|
|
55
52
|
flex-grow: 0;
|
56
53
|
flex-basis: $size;
|
57
54
|
|
58
|
-
.dark & {
|
59
|
-
background: $text_dk_light;
|
60
|
-
}
|
61
|
-
|
62
55
|
&::before {
|
63
56
|
content: attr(data-initials);
|
64
57
|
width: 100%;
|
@@ -85,11 +78,9 @@ $avatar-sizes: (
|
|
85
78
|
}
|
86
79
|
}
|
87
80
|
}
|
88
|
-
|
89
81
|
&.dark {
|
90
82
|
[class^=pb_card_kit] {
|
91
83
|
position: absolute;
|
92
|
-
padding: 2px;
|
93
84
|
}
|
94
85
|
}
|
95
86
|
}
|
@@ -23,8 +23,8 @@ export type AvatarProps = {
|
|
23
23
|
variant?: string,
|
24
24
|
icon?: string
|
25
25
|
},
|
26
|
-
dark?: boolean,
|
27
26
|
data?: {[key: string]: string},
|
27
|
+
dark?: boolean,
|
28
28
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
29
29
|
id?: string,
|
30
30
|
imageAlt?: string,
|
@@ -71,13 +71,13 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
|
|
71
71
|
|
72
72
|
const canShowImage = imageUrl && !error
|
73
73
|
|
74
|
-
const onlineStatusSize =
|
74
|
+
const onlineStatusSize =
|
75
75
|
['xxs', 'xs'].includes(size) ? 'sm' :
|
76
76
|
['sm', 'md'].includes(size) ? 'md' :
|
77
77
|
['lg', 'xl'].includes(size) ? 'lg' :
|
78
78
|
'sm';
|
79
79
|
|
80
|
-
const onlineStatusPositionProps = (["xxs", "xs", "sm"].includes(size)) ?
|
80
|
+
const onlineStatusPositionProps = (["xxs", "xs", "sm"].includes(size)) ?
|
81
81
|
{
|
82
82
|
top: { inset: true, value: "0" },
|
83
83
|
right: { inset: false, value: "xxs" }
|
@@ -96,10 +96,10 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
|
|
96
96
|
id={id}
|
97
97
|
>
|
98
98
|
{componentOverlay ? (
|
99
|
-
<Flex display="display_inline_block"
|
99
|
+
<Flex display="display_inline_block"
|
100
100
|
position="relative"
|
101
101
|
>
|
102
|
-
<div className="avatar_wrapper"
|
102
|
+
<div className="avatar_wrapper"
|
103
103
|
data-initials={initials}
|
104
104
|
>
|
105
105
|
{canShowImage && (
|
@@ -115,14 +115,12 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
|
|
115
115
|
<Card
|
116
116
|
borderNone
|
117
117
|
borderRadius="rounded"
|
118
|
-
dark={dark}
|
119
118
|
padding="none"
|
120
119
|
position="absolute"
|
121
120
|
{...getPlacementProps(componentOverlay.placement, size)}
|
122
121
|
>
|
123
|
-
|
122
|
+
|
124
123
|
<Badge
|
125
|
-
dark={dark}
|
126
124
|
rounded
|
127
125
|
text={componentOverlay.text}
|
128
126
|
variant={componentOverlay.variant as "error" | "info" | "neutral" | "primary" | "success" | "warning" | "notification"}
|
@@ -133,13 +131,11 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
|
|
133
131
|
<Card
|
134
132
|
borderNone
|
135
133
|
borderRadius="rounded"
|
136
|
-
dark={dark}
|
137
134
|
htmlOptions={{style: {padding:"2px"}}}
|
138
135
|
position="absolute"
|
139
136
|
{...getPlacementProps(componentOverlay.placement, size)}
|
140
137
|
>
|
141
138
|
<IconCircle
|
142
|
-
dark={dark}
|
143
139
|
icon={componentOverlay.icon}
|
144
140
|
size="xxs"
|
145
141
|
variant={componentOverlay.variant as "default" | "royal" | "blue" | "purple" | "teal" | "red" | "yellow" | "orange" | "green"}
|
@@ -149,7 +145,7 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
|
|
149
145
|
</Flex>
|
150
146
|
) : (
|
151
147
|
<>
|
152
|
-
<div className="avatar_wrapper"
|
148
|
+
<div className="avatar_wrapper"
|
153
149
|
data-initials={initials}
|
154
150
|
>
|
155
151
|
{canShowImage && (
|
@@ -1,22 +1,22 @@
|
|
1
1
|
|
2
2
|
<%= object.pb_content_tag(:div, data: object.data.merge(initials: object.initials)) do %>
|
3
3
|
<% if object.component_overlay && object.component_overlay[:component] == "icon_circle" %>
|
4
|
-
<%= pb_rails("flex", props: {
|
4
|
+
<%= pb_rails("flex", props: {display: "display_inline_block", position: "relative" }) do %>
|
5
5
|
<%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
|
6
6
|
<%= pb_rails("image", props: { alt: object.alt_text, url: object.image_url, on_error: object.handle_img_error }) if object.image_url.present? %>
|
7
7
|
<% end %>
|
8
|
-
<%= pb_rails("card", props: { border_none: true, border_radius: "rounded",
|
8
|
+
<%= pb_rails("card", props: { border_none: true, border_radius: "rounded", html_options: { style: "padding: 2px" }, position: "absolute" }.merge(specific_placement_style)) do %>
|
9
9
|
|
10
|
-
<%= pb_rails("icon_circle", props: {
|
10
|
+
<%= pb_rails("icon_circle", props: { size: "xxs", icon: object.component_overlay[:icon], variant: object.component_overlay[:variant] }) %>
|
11
11
|
<% end %>
|
12
12
|
<% end %>
|
13
13
|
<% elsif object.component_overlay && object.component_overlay[:component] == "badge" %>
|
14
|
-
<%= pb_rails("flex", props: {
|
14
|
+
<%= pb_rails("flex", props: {display: "display_inline_block", position: "relative" }) do %>
|
15
15
|
<%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
|
16
16
|
<%= pb_rails("image", props: { alt: object.alt_text, url: object.image_url, on_error: object.handle_img_error }) if object.image_url.present? %>
|
17
17
|
<% end %>
|
18
|
-
<%= pb_rails("card", props: { border_none: true, border_radius: "rounded",
|
19
|
-
<%= pb_rails("badge", props: {
|
18
|
+
<%= pb_rails("card", props: { border_none: true, border_radius: "rounded", padding: "none", position: "absolute" }.merge(specific_placement_style)) do %>
|
19
|
+
<%= pb_rails("badge", props: { rounded: true, text: object.component_overlay[:text], variant: object.component_overlay[:variant] }) %>
|
20
20
|
<% end %>
|
21
21
|
<% end %>
|
22
22
|
<% else %>
|
@@ -26,3 +26,4 @@
|
|
26
26
|
<%= pb_rails("online_status", props: object.online_status_props) if object.status %>
|
27
27
|
<% end %>
|
28
28
|
<% end %>
|
29
|
+
|
@@ -1,19 +1,18 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Avatar } from 'playbook-ui'
|
3
3
|
|
4
|
-
const AvatarBadgeComponentOverlay = (
|
4
|
+
const AvatarBadgeComponentOverlay = () => {
|
5
5
|
return (
|
6
6
|
<div>
|
7
7
|
<Avatar
|
8
8
|
componentOverlay={{
|
9
9
|
component: "badge",
|
10
10
|
placement: "bottom-right",
|
11
|
-
text: "12"
|
11
|
+
text: "12"
|
12
12
|
}}
|
13
13
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
14
14
|
marginBottom="sm"
|
15
15
|
size="sm"
|
16
|
-
{...props}
|
17
16
|
/>
|
18
17
|
|
19
18
|
<Avatar
|
@@ -25,8 +24,6 @@ const AvatarBadgeComponentOverlay = (props) => {
|
|
25
24
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
26
25
|
marginBottom="sm"
|
27
26
|
size="md"
|
28
|
-
{...props}
|
29
|
-
|
30
27
|
/>
|
31
28
|
|
32
29
|
<Avatar
|
@@ -39,8 +36,6 @@ const AvatarBadgeComponentOverlay = (props) => {
|
|
39
36
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
40
37
|
marginBottom="sm"
|
41
38
|
size="lg"
|
42
|
-
{...props}
|
43
|
-
|
44
39
|
/>
|
45
40
|
|
46
41
|
<Avatar
|
@@ -53,8 +48,7 @@ const AvatarBadgeComponentOverlay = (props) => {
|
|
53
48
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
54
49
|
marginBottom="sm"
|
55
50
|
size="xl"
|
56
|
-
|
57
|
-
/>
|
51
|
+
/>
|
58
52
|
</div>
|
59
53
|
)
|
60
54
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Avatar } from 'playbook-ui'
|
3
3
|
|
4
|
-
const AvatarCircleIconComponentOverlay = (
|
4
|
+
const AvatarCircleIconComponentOverlay = () => {
|
5
5
|
return (
|
6
6
|
<div>
|
7
7
|
<Avatar
|
@@ -14,7 +14,6 @@ const AvatarCircleIconComponentOverlay = (props) => {
|
|
14
14
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
15
15
|
marginBottom="sm"
|
16
16
|
size="sm"
|
17
|
-
{...props}
|
18
17
|
/>
|
19
18
|
|
20
19
|
<Avatar
|
@@ -27,7 +26,6 @@ const AvatarCircleIconComponentOverlay = (props) => {
|
|
27
26
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
28
27
|
marginBottom="sm"
|
29
28
|
size="md"
|
30
|
-
{...props}
|
31
29
|
/>
|
32
30
|
|
33
31
|
<Avatar
|
@@ -40,7 +38,6 @@ const AvatarCircleIconComponentOverlay = (props) => {
|
|
40
38
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
41
39
|
marginBottom="sm"
|
42
40
|
size="lg"
|
43
|
-
{...props}
|
44
41
|
/>
|
45
42
|
|
46
43
|
<Avatar
|
@@ -53,8 +50,7 @@ const AvatarCircleIconComponentOverlay = (props) => {
|
|
53
50
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
54
51
|
marginBottom="sm"
|
55
52
|
size="xl"
|
56
|
-
|
57
|
-
/>
|
53
|
+
/>
|
58
54
|
</div>
|
59
55
|
)
|
60
56
|
}
|
@@ -18,7 +18,6 @@ type HomeAddressStreetProps = {
|
|
18
18
|
className?: string,
|
19
19
|
data?: { [key: string]: string },
|
20
20
|
dark?: boolean,
|
21
|
-
preserveCase?: boolean,
|
22
21
|
emphasis: "street" | "city" | "none",
|
23
22
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
24
23
|
homeId: string,
|
@@ -44,7 +43,6 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
|
|
44
43
|
htmlOptions = {},
|
45
44
|
homeId,
|
46
45
|
homeUrl,
|
47
|
-
preserveCase = false,
|
48
46
|
target,
|
49
47
|
newWindow,
|
50
48
|
houseStyle,
|
@@ -79,8 +77,6 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
|
|
79
77
|
return null
|
80
78
|
}
|
81
79
|
|
82
|
-
const formatStreetAdr = (address: string): string => preserveCase ? address : titleize(address)
|
83
|
-
|
84
80
|
return (
|
85
81
|
<div
|
86
82
|
className={classes(className, dark)}
|
@@ -95,7 +91,7 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
|
|
95
91
|
dark={dark}
|
96
92
|
size={4}
|
97
93
|
>
|
98
|
-
{joinPresent([
|
94
|
+
{joinPresent([titleize(address), houseStyle], ' · ')}
|
99
95
|
</Title>
|
100
96
|
<Title
|
101
97
|
className="pb_home_address_street_address"
|
@@ -105,14 +101,14 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
|
|
105
101
|
{titleize(addressCont)}
|
106
102
|
</Title>
|
107
103
|
<Body color="light">
|
108
|
-
{`${titleize(city)}, ${state
|
104
|
+
{`${titleize(city)}, ${state} ${zipcode}`}
|
109
105
|
</Body>
|
110
106
|
</div>
|
111
107
|
}
|
112
108
|
{emphasis == 'city' &&
|
113
109
|
<div>
|
114
110
|
<Body color="light">
|
115
|
-
{joinPresent([
|
111
|
+
{joinPresent([titleize(address), houseStyle], ' · ')}
|
116
112
|
</Body>
|
117
113
|
<Body color="light">{titleize(addressCont)}</Body>
|
118
114
|
<div>
|
@@ -122,7 +118,7 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
|
|
122
118
|
size={4}
|
123
119
|
tag="span"
|
124
120
|
>
|
125
|
-
{`${titleize(city)}, ${state
|
121
|
+
{`${titleize(city)}, ${state}`}
|
126
122
|
</Title>
|
127
123
|
<Body
|
128
124
|
color="light"
|
@@ -136,15 +132,15 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
|
|
136
132
|
{emphasis == 'none' &&
|
137
133
|
<div>
|
138
134
|
<Body dark={dark}>
|
139
|
-
{joinPresent([
|
135
|
+
{joinPresent([titleize(address), houseStyle], ' · ')}
|
140
136
|
</Body>
|
141
|
-
<Body dark={dark}>{
|
137
|
+
<Body dark={dark}>{titleize(addressCont)}</Body>
|
142
138
|
<div>
|
143
139
|
<Body
|
144
140
|
color="light"
|
145
141
|
dark={dark}
|
146
142
|
>
|
147
|
-
{`${titleize(city)}, ${state
|
143
|
+
{`${titleize(city)}, ${state} ${zipcode}`}
|
148
144
|
</Body>
|
149
145
|
</div>
|
150
146
|
</div>
|
@@ -5,14 +5,12 @@ examples:
|
|
5
5
|
- home_address_street_emphasis: Emphasis
|
6
6
|
- home_address_street_modified: Modified
|
7
7
|
- home_address_street_link: Link
|
8
|
-
- home_address_street_formatting: Formatting
|
9
8
|
|
10
9
|
react:
|
11
10
|
- home_address_street_default: Default
|
12
11
|
- home_address_street_emphasis: Emphasis
|
13
12
|
- home_address_street_modified: Modified
|
14
13
|
- home_address_street_link: Link
|
15
|
-
- home_address_street_formatting: Formatting
|
16
14
|
|
17
15
|
swift:
|
18
16
|
- home_address_street_default_swift: Default
|
@@ -2,4 +2,3 @@ export { default as HomeAddressStreetDefault } from './_home_address_street_defa
|
|
2
2
|
export { default as HomeAddressStreetEmphasis } from './_home_address_street_emphasis.jsx'
|
3
3
|
export { default as HomeAddressStreetModified } from './_home_address_street_modified.jsx'
|
4
4
|
export { default as HomeAddressStreetLink } from './_home_address_street_link.jsx'
|
5
|
-
export { default as HomeAddressStreetFormatting } from './_home_address_street_formatting.jsx'
|
@@ -18,7 +18,6 @@ module Playbook
|
|
18
18
|
prop :state
|
19
19
|
prop :zipcode
|
20
20
|
prop :territory
|
21
|
-
prop :preserve_case, default: false
|
22
21
|
prop :dark, type: Playbook::Props::Boolean, default: false
|
23
22
|
|
24
23
|
def classname
|
@@ -30,7 +29,7 @@ module Playbook
|
|
30
29
|
end
|
31
30
|
|
32
31
|
def city_state
|
33
|
-
[city&.titleize, state
|
32
|
+
[city&.titleize, state].join(", ")
|
34
33
|
end
|
35
34
|
|
36
35
|
def zip
|
@@ -38,7 +37,7 @@ module Playbook
|
|
38
37
|
end
|
39
38
|
|
40
39
|
def address_house_style
|
41
|
-
[
|
40
|
+
[address&.titleize, house_style].join(separator)
|
42
41
|
end
|
43
42
|
|
44
43
|
def address_house_style2
|
@@ -49,14 +48,6 @@ module Playbook
|
|
49
48
|
house_style ? " \u00b7 " : ""
|
50
49
|
end
|
51
50
|
|
52
|
-
def format_street_address
|
53
|
-
preserve_case ? address : custom_titleize(address)
|
54
|
-
end
|
55
|
-
|
56
|
-
def custom_titleize(str)
|
57
|
-
str.split(" ").map(&:capitalize).join(" ")
|
58
|
-
end
|
59
|
-
|
60
51
|
def city_emphasis_props
|
61
52
|
{
|
62
53
|
address_house_style: address_house_style,
|
@@ -1,7 +1,16 @@
|
|
1
1
|
<% if object.collapsible %>
|
2
2
|
<%= pb_rails("collapsible", props: { name: "collapsible-nav-example", classname: object.collapsible_nav_classname }) do %>
|
3
3
|
<%= pb_rails("collapsible/collapsible_main", props: { name: "default-collapsible-nav", icon: object.collapsible_icons, size: "xs", dark: object.dark, classname:object.margin_classes }) do %>
|
4
|
-
<%=
|
4
|
+
<%= content_tag(object.tag,
|
5
|
+
aria: object.aria,
|
6
|
+
class: object.classname,
|
7
|
+
data: object.data,
|
8
|
+
dark: object.dark,
|
9
|
+
id: object.id,
|
10
|
+
href: object.link && object.link,
|
11
|
+
target: object.link && object.target,
|
12
|
+
**combined_html_options
|
13
|
+
) do %>
|
5
14
|
<% if object.image_url %>
|
6
15
|
<%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper_collapsible" }) %>
|
7
16
|
<% end %>
|
@@ -11,14 +20,23 @@
|
|
11
20
|
<span class="pb_nav_list_item_text_collapsible">
|
12
21
|
<%= object.text %>
|
13
22
|
</span>
|
14
|
-
<% end %>
|
23
|
+
<% end %>
|
15
24
|
<% end %>
|
16
25
|
<%= pb_rails("collapsible/collapsible_content", props: {collapsed: object.collapsed}) do %>
|
17
26
|
<%= content.presence %>
|
18
27
|
<% end %>
|
19
28
|
<% end %>
|
20
29
|
<% else %>
|
21
|
-
<%=
|
30
|
+
<%= content_tag(object.tag,
|
31
|
+
aria: object.aria,
|
32
|
+
class: object.classname,
|
33
|
+
**combined_html_options,
|
34
|
+
data: object.data,
|
35
|
+
dark: object.dark,
|
36
|
+
id: object.id,
|
37
|
+
href: object.link && object.link,
|
38
|
+
target: object.link && object.target
|
39
|
+
) do %>
|
22
40
|
<% if object.image_url %>
|
23
41
|
<%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper" }) %>
|
24
42
|
<% end %>
|
@@ -1,7 +1,12 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:nav,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<% if object.title %>
|
3
|
-
<%=
|
4
|
-
<%=
|
8
|
+
<%= content_tag(:div, class: "pb_nav_list_title") do %>
|
9
|
+
<%= content_tag(:a, class: "pb_nav_list_item_link_text", href: object.link) do %>
|
5
10
|
<%= pb_rails("caption", props: { text: object.title, dark: dark }) %>
|
6
11
|
<% end %>
|
7
12
|
<% end %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<div class="pb_popover_tooltip hide" id="<%= object.tooltip_id %>" role="tooltip" style="<%= object.z_index_helper %>">
|
3
8
|
<div class="pb_popover_body <%= object.width_height_class_helper %> <%= object.popover_spacing_helper %>" style="<%= object.width_height_helper %>">
|
4
9
|
<%= content.presence %>
|
@@ -13,7 +13,6 @@ type UserProps = {
|
|
13
13
|
aria?: {[key: string]: string},
|
14
14
|
avatar?: boolean,
|
15
15
|
avatarUrl?: string,
|
16
|
-
bold?: boolean,
|
17
16
|
className?: string,
|
18
17
|
dark?: boolean,
|
19
18
|
data?: {[key: string]: string},
|
@@ -33,7 +32,6 @@ const User = (props: UserProps): React.ReactElement => {
|
|
33
32
|
aria = {},
|
34
33
|
avatar = false,
|
35
34
|
avatarUrl,
|
36
|
-
bold = true,
|
37
35
|
className,
|
38
36
|
dark = false,
|
39
37
|
data = {},
|
@@ -77,7 +75,6 @@ const User = (props: UserProps): React.ReactElement => {
|
|
77
75
|
}
|
78
76
|
<div className="content_wrapper">
|
79
77
|
<Title
|
80
|
-
bold={bold}
|
81
78
|
dark={dark}
|
82
79
|
size={size == 'lg' ? 3 : 4}
|
83
80
|
text={name}
|
@@ -2,7 +2,6 @@ examples:
|
|
2
2
|
|
3
3
|
rails:
|
4
4
|
- user_default: Default
|
5
|
-
- user_light_weight: Light Weight
|
6
5
|
- user_with_territory: With Territory
|
7
6
|
- user_text_only: Text Only
|
8
7
|
- user_size: Horizontal Size
|
@@ -12,7 +11,6 @@ examples:
|
|
12
11
|
|
13
12
|
react:
|
14
13
|
- user_default: Default
|
15
|
-
- user_light_weight: Light Weight
|
16
14
|
- user_with_territory: With Territory
|
17
15
|
- user_text_only: Text Only
|
18
16
|
- user_size: Horizontal Size
|
@@ -1,5 +1,4 @@
|
|
1
1
|
export { default as UserDefault } from './_user_default.jsx'
|
2
|
-
export { default as UserLightWeight } from './_user_light_weight.jsx'
|
3
2
|
export { default as UserWithTerritory } from './_user_with_territory.jsx'
|
4
3
|
export { default as UserTextOnly } from './_user_text_only.jsx'
|
5
4
|
export { default as UserSize } from './_user_size.jsx'
|
@@ -12,7 +12,7 @@
|
|
12
12
|
}) %>
|
13
13
|
<% end %>
|
14
14
|
<%= content_tag(:div, class: "content_wrapper") do %>
|
15
|
-
<%= pb_rails("title", props: { text: object.name, size: object.title_size, dark: object.dark
|
15
|
+
<%= pb_rails("title", props: { text: object.name, size: object.title_size, dark: object.dark }) %>
|
16
16
|
<%= pb_rails("body", props: {
|
17
17
|
text: "#{object.details}",
|
18
18
|
dark: object.dark,
|
@@ -26,17 +26,3 @@ test('subtitle prop accepts a node', () => {
|
|
26
26
|
|
27
27
|
expect(screen.getByTestId('test-subtitle-block')).toHaveTextContent('test caption')
|
28
28
|
})
|
29
|
-
|
30
|
-
test('bold prop applies correct styling when false', () => {
|
31
|
-
render(
|
32
|
-
<User
|
33
|
-
bold={false}
|
34
|
-
data={{ testid: 'test-bold-false' }}
|
35
|
-
name="Anna Black"
|
36
|
-
/>
|
37
|
-
)
|
38
|
-
const titleElement = screen.getByText("Anna Black")
|
39
|
-
expect(titleElement).toBeInTheDocument()
|
40
|
-
|
41
|
-
expect(titleElement).toHaveClass('pb_title_kit_size_4_thin')
|
42
|
-
})
|