playbook_ui 13.26.0.pre.alpha.jasoncypretpatch12820 → 13.26.0
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/_advanced_table.scss +0 -14
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.md +0 -5
- data/app/pb_kits/playbook/pb_advanced_table/docs/_description.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +2 -4
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +2 -3
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +21 -86
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +3 -26
- data/app/pb_kits/playbook/pb_avatar/avatar.rb +0 -41
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_default.jsx +0 -20
- data/app/pb_kits/playbook/pb_avatar/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_avatar/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_button/_button_mixins.scss +0 -1
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md +3 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +2 -9
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -3
- data/app/pb_kits/playbook/pb_loading_inline/docs/{_loading_inline_default.html.erb → _loading_inline_light.html.erb} +2 -2
- data/app/pb_kits/playbook/pb_loading_inline/docs/{_loading_inline_default.jsx → _loading_inline_light.jsx} +2 -2
- data/app/pb_kits/playbook/pb_loading_inline/docs/example.yml +2 -4
- data/app/pb_kits/playbook/pb_loading_inline/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +1 -1
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.rb +0 -1
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.test.js +0 -14
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -1
- data/app/pb_kits/playbook/playbook-rails.js +0 -6
- data/dist/menu.yml +1 -1
- data/dist/playbook-rails.js +6 -6
- data/lib/playbook/version.rb +2 -2
- metadata +8 -34
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.html.erb +0 -33
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +0 -24
- data/app/pb_kits/playbook/pb_advanced_table/index.js +0 -78
- data/app/pb_kits/playbook/pb_avatar/Utilities/GetPlacementPropsHelper.tsx +0 -44
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.html.erb +0 -71
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +0 -77
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.html.erb +0 -71
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +0 -77
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb +0 -10
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.html.erb +0 -17
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.html.erb +0 -60
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.html.erb +0 -45
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.html.erb +0 -17
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.html.erb +0 -47
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb +0 -10
- data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +0 -20
- data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +0 -19
- data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +0 -15
- data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +0 -19
- data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +0 -22
- data/app/pb_kits/playbook/pb_dropdown/dropdown_option.rb +0 -22
- data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb +0 -38
- data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.rb +0 -30
- data/app/pb_kits/playbook/pb_dropdown/index.js +0 -152
- data/app/pb_kits/playbook/pb_dropdown/keyboard_accessibility.js +0 -77
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_custom.html.erb +0 -13
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_custom.jsx +0 -26
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 513dedb641f87bf07610bf4bd6234671546cd7dad41022efad3019d85934b45c
|
|
4
|
+
data.tar.gz: 2ef935c0bfaba7bd80dc47bbaa1b8b4e89aac61c731ec8fbd88440e2557d57fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d0e17718945981e3002ebc05b9e9490be10884531df9e1f8ee65515e60d76a6edea5c27e68c50d205c5963047c74786f8d6e3e584b8bc0a76a8373636cb4049
|
|
7
|
+
data.tar.gz: 1ea1ae2275760805735801a334037a13dc60527fd431a4b985bca64cf85cf1f55ca95f89432c79a5f5593cad4ceed3967d5d1615d71f35daf6dc7d59f79ef991
|
|
@@ -94,20 +94,6 @@
|
|
|
94
94
|
position: relative;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.toggle-content {
|
|
98
|
-
display: none;
|
|
99
|
-
height: 0;
|
|
100
|
-
padding-bottom: 0 !important;
|
|
101
|
-
padding-top: 0 !important;
|
|
102
|
-
overflow: hidden;
|
|
103
|
-
transition: height 300ms, padding 300ms ease-in-out;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.toggle-content.is-visible {
|
|
107
|
-
display: contents;
|
|
108
|
-
height: auto;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
97
|
&.dark {
|
|
112
98
|
.bg-white {
|
|
113
99
|
background: $bg_dark_card;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
**NOTE:** The Advanced Table kit uses the [Tanstack Table v8](https://tanstack.com/table/v8/docs/introduction) under the hood to render advanced tables that allow for complex, nested data structures with expansion and sort options.
|
|
2
|
-
<br />
|
|
3
|
-
<br />
|
|
4
|
-
<br />
|
|
5
|
-
|
|
6
1
|
The AdvancedTable kit accepts tree data and automatically renders expansion controls for nested subrows, to any depth, based on the data it is given. In it's simplest form, __the kit has two required props__:
|
|
7
2
|
|
|
8
3
|
### tableData
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The AdvancedTable kit uses the [Tanstack Table v8](https://tanstack.com/table/v8/docs/introduction) under the hood to render advanced tables that allow for complex, nested data structures with expansion and sort options.
|
|
@@ -14,10 +14,8 @@ module Playbook
|
|
|
14
14
|
output << pb_rails("advanced_table/table_row", props: { row: row, column_definitions: column_definitions, depth: current_depth })
|
|
15
15
|
|
|
16
16
|
if row[:children].present?
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
render_row_and_children(child_row, column_definitions, current_depth + 1)
|
|
20
|
-
end.join.html_safe
|
|
17
|
+
row[:children].each do |child_row|
|
|
18
|
+
output << render_row_and_children(child_row, column_definitions, current_depth + 1)
|
|
21
19
|
end
|
|
22
20
|
end
|
|
23
21
|
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
<div style="padding-left: <%= depth * 1.25 %>em">
|
|
6
6
|
<%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
|
|
7
7
|
<% if index.zero? && object.row[:children].present? %>
|
|
8
|
-
<button
|
|
9
|
-
<%= pb_rails("icon", props: {
|
|
10
|
-
<%= pb_rails("icon", props: { id: "advanced-table_close_icon", display: "none", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
|
|
8
|
+
<button class="gray-icon expand-toggle-icon">
|
|
9
|
+
<%= pb_rails("icon", props: { icon: "circle-play", cursor: "pointer" }) %>
|
|
11
10
|
</button>
|
|
12
11
|
<% end %>
|
|
13
12
|
<%= pb_rails("flex/flex_item", props:{padding_left: index.zero? && object.row[:children].present? ? "none" : "xs"}) do %>
|
|
@@ -3,26 +3,13 @@ import classnames from 'classnames'
|
|
|
3
3
|
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
5
5
|
import { globalProps, GlobalProps } from '../utilities/globalProps'
|
|
6
|
-
import { getPlacementProps } from './Utilities/GetPlacementPropsHelper'
|
|
7
6
|
|
|
8
|
-
import Image from
|
|
9
|
-
import OnlineStatus from
|
|
10
|
-
import Flex from "../pb_flex/_flex";
|
|
11
|
-
import Badge from "../pb_badge/_badge";
|
|
12
|
-
import IconCircle from "../pb_icon_circle/_icon_circle";
|
|
13
|
-
import Card from "../pb_card/_card";
|
|
7
|
+
import Image from '../pb_image/_image'
|
|
8
|
+
import OnlineStatus from '../pb_online_status/_online_status'
|
|
14
9
|
|
|
15
10
|
export type AvatarProps = {
|
|
16
11
|
aria?: {[key: string]: string},
|
|
17
12
|
className?: string,
|
|
18
|
-
componentOverlay?: {
|
|
19
|
-
component: "badge" | "iconCircle",
|
|
20
|
-
placement: string,
|
|
21
|
-
size?: "md" | "lg" | "sm" | "xl" | "xs" | "xxs",
|
|
22
|
-
text?: string,
|
|
23
|
-
variant?: string,
|
|
24
|
-
icon?: string
|
|
25
|
-
},
|
|
26
13
|
data?: {[key: string]: string},
|
|
27
14
|
dark?: boolean,
|
|
28
15
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
|
@@ -32,7 +19,7 @@ export type AvatarProps = {
|
|
|
32
19
|
name?: string,
|
|
33
20
|
size?: "md" | "lg" | "sm" | "xl" | "xs" | "xxs",
|
|
34
21
|
status?: "away" | "offline" | "online",
|
|
35
|
-
|
|
22
|
+
} & GlobalProps
|
|
36
23
|
|
|
37
24
|
const firstTwoInitials = (name: string) =>
|
|
38
25
|
name.split(/\s/).map((name) => name[0])
|
|
@@ -46,7 +33,6 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
|
|
|
46
33
|
data = {},
|
|
47
34
|
htmlOptions = {},
|
|
48
35
|
name = undefined,
|
|
49
|
-
componentOverlay,
|
|
50
36
|
id = '',
|
|
51
37
|
imageAlt = '',
|
|
52
38
|
imageUrl,
|
|
@@ -79,75 +65,24 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
|
|
|
79
65
|
className={classes}
|
|
80
66
|
id={id}
|
|
81
67
|
>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
borderNone
|
|
101
|
-
borderRadius="rounded"
|
|
102
|
-
padding="none"
|
|
103
|
-
position="absolute"
|
|
104
|
-
{...getPlacementProps(componentOverlay.placement, size)}
|
|
105
|
-
>
|
|
106
|
-
|
|
107
|
-
<Badge
|
|
108
|
-
rounded
|
|
109
|
-
text={componentOverlay.text}
|
|
110
|
-
variant={componentOverlay.variant as "error" | "info" | "neutral" | "primary" | "success" | "warning" | "notification"}
|
|
111
|
-
/>
|
|
112
|
-
</Card>
|
|
113
|
-
)}
|
|
114
|
-
{componentOverlay.component === "iconCircle" && (
|
|
115
|
-
<Card
|
|
116
|
-
borderNone
|
|
117
|
-
borderRadius="rounded"
|
|
118
|
-
htmlOptions={{style: {padding:"2px"}}}
|
|
119
|
-
position="absolute"
|
|
120
|
-
{...getPlacementProps(componentOverlay.placement, size)}
|
|
121
|
-
>
|
|
122
|
-
<IconCircle
|
|
123
|
-
icon={componentOverlay.icon}
|
|
124
|
-
size="xxs"
|
|
125
|
-
variant={componentOverlay.variant as "default" | "royal" | "blue" | "purple" | "teal" | "red" | "yellow" | "orange" | "green"}
|
|
126
|
-
/>
|
|
127
|
-
</Card>
|
|
128
|
-
)}
|
|
129
|
-
</Flex>
|
|
130
|
-
) : (
|
|
131
|
-
<>
|
|
132
|
-
<div className="avatar_wrapper"
|
|
133
|
-
data-initials={initials}
|
|
134
|
-
>
|
|
135
|
-
{canShowImage && (
|
|
136
|
-
<Image
|
|
137
|
-
alt={imageAlt ? imageAlt : name}
|
|
138
|
-
onError={handleError}
|
|
139
|
-
url={imageUrl}
|
|
140
|
-
/>
|
|
141
|
-
)}
|
|
142
|
-
</div>
|
|
143
|
-
{status && (
|
|
144
|
-
<OnlineStatus
|
|
145
|
-
className={`size_${size}`}
|
|
146
|
-
dark={dark}
|
|
147
|
-
status={status}
|
|
148
|
-
/>
|
|
149
|
-
)}
|
|
150
|
-
</>
|
|
68
|
+
<div
|
|
69
|
+
className="avatar_wrapper"
|
|
70
|
+
data-initials={initials}
|
|
71
|
+
>
|
|
72
|
+
{ canShowImage && (
|
|
73
|
+
<Image
|
|
74
|
+
alt={imageAlt ? imageAlt : name}
|
|
75
|
+
onError={handleError}
|
|
76
|
+
url={imageUrl}
|
|
77
|
+
/>
|
|
78
|
+
)}
|
|
79
|
+
</div>
|
|
80
|
+
{status && (
|
|
81
|
+
<OnlineStatus
|
|
82
|
+
className={`size_${size}`}
|
|
83
|
+
dark={dark}
|
|
84
|
+
status={status}
|
|
85
|
+
/>
|
|
151
86
|
)}
|
|
152
87
|
</div>
|
|
153
88
|
)
|
|
@@ -1,29 +1,6 @@
|
|
|
1
|
-
|
|
2
1
|
<%= object.pb_content_tag(:div, data: object.data.merge(initials: object.initials)) do %>
|
|
3
|
-
|
|
4
|
-
<%= pb_rails("
|
|
5
|
-
<%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
|
|
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
|
-
<% end %>
|
|
8
|
-
<%= pb_rails("card", props: { border_none: true, border_radius: "rounded", html_options: { style: "padding: 2px" }, position: "absolute" }.merge(specific_placement_style)) do %>
|
|
9
|
-
|
|
10
|
-
<%= pb_rails("icon_circle", props: { size: "xxs", icon: object.component_overlay[:icon] }) %>
|
|
11
|
-
<% end %>
|
|
12
|
-
<% end %>
|
|
13
|
-
<% elsif object.component_overlay && object.component_overlay[:component] == "badge" %>
|
|
14
|
-
<%= pb_rails("flex", props: {display: "display_inline_block", position: "relative" }) do %>
|
|
15
|
-
<%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
|
|
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
|
-
<% end %>
|
|
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
|
-
<% end %>
|
|
21
|
-
<% end %>
|
|
22
|
-
<% else %>
|
|
23
|
-
<%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
|
|
24
|
-
<%= pb_rails("image", props: { alt: object.alt_text, url: object.image_url, on_error: object.handle_img_error }) if object.image_url.present? %>
|
|
25
|
-
<% end %>
|
|
26
|
-
<%= pb_rails("online_status", props: object.online_status_props) if object.status %>
|
|
2
|
+
<%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
|
|
3
|
+
<%= pb_rails("image", props: { alt: object.alt_text, url: object.image_url, on_error: object.handle_img_error }) if object.image_url.present? %>
|
|
27
4
|
<% end %>
|
|
5
|
+
<%= pb_rails("online_status", props: object.online_status_props) if object.status %>
|
|
28
6
|
<% end %>
|
|
29
|
-
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Playbook
|
|
4
4
|
module PbAvatar
|
|
5
5
|
class Avatar < Playbook::KitBase
|
|
6
|
-
prop :component_overlay
|
|
7
6
|
prop :image_url, type: Playbook::Props::String
|
|
8
7
|
prop :image_alt, type: Playbook::Props::String,
|
|
9
8
|
default: ""
|
|
@@ -33,46 +32,6 @@ module Playbook
|
|
|
33
32
|
def handle_img_error
|
|
34
33
|
"this.style.display = 'none'"
|
|
35
34
|
end
|
|
36
|
-
|
|
37
|
-
def overlay_component
|
|
38
|
-
component_overlay && component_overlay[:component]
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def specific_placement_style
|
|
42
|
-
placement = component_overlay[:placement] if component_overlay
|
|
43
|
-
placement_mapping[size][placement]
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
private
|
|
47
|
-
|
|
48
|
-
def placement_mapping
|
|
49
|
-
xs_styles = placement_styles("xs")
|
|
50
|
-
{
|
|
51
|
-
"xxs" => xs_styles,
|
|
52
|
-
"xs" => xs_styles,
|
|
53
|
-
"sm" => placement_styles("xs"),
|
|
54
|
-
"md" => placement_styles("0"),
|
|
55
|
-
"lg" => placement_styles("0"),
|
|
56
|
-
"xl" => placement_styles({ value: "xxs", inset: true }),
|
|
57
|
-
}
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
def placement_styles(offset)
|
|
61
|
-
top_bottom_offset = if offset == "xs"
|
|
62
|
-
"xs"
|
|
63
|
-
elsif offset == { value: "xxs", inset: true }
|
|
64
|
-
{ value: "xxs", inset: true }
|
|
65
|
-
else
|
|
66
|
-
"0"
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
{
|
|
70
|
-
"top-right" => { top: top_bottom_offset, right: offset },
|
|
71
|
-
"bottom-left" => { bottom: top_bottom_offset, left: offset },
|
|
72
|
-
"top-left" => { top: top_bottom_offset, left: offset },
|
|
73
|
-
"bottom-right" => { bottom: top_bottom_offset, right: offset },
|
|
74
|
-
}
|
|
75
|
-
end
|
|
76
35
|
end
|
|
77
36
|
end
|
|
78
37
|
end
|
|
@@ -57,26 +57,6 @@ const AvatarDefault = (props) => {
|
|
|
57
57
|
status="offline"
|
|
58
58
|
{...props}
|
|
59
59
|
/>
|
|
60
|
-
<br/>
|
|
61
|
-
<Avatar
|
|
62
|
-
imageAlt="Terry Johnson Standing"
|
|
63
|
-
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
|
64
|
-
name="Terry Johnson"
|
|
65
|
-
overlay={{component:"badge", text: "6", variant: "notification", placement:"top-right"}}
|
|
66
|
-
size="lg"
|
|
67
|
-
status="offline"
|
|
68
|
-
{...props}
|
|
69
|
-
/>
|
|
70
|
-
<br/>
|
|
71
|
-
<Avatar
|
|
72
|
-
imageAlt="Terry Johnson Standing"
|
|
73
|
-
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
|
74
|
-
name="Terry Johnson"
|
|
75
|
-
overlay={{component:"icon", icon:"plus", variant:"royal", placement:"bottom-left"}}
|
|
76
|
-
size="xl"
|
|
77
|
-
status="offline"
|
|
78
|
-
{...props}
|
|
79
|
-
/>
|
|
80
60
|
</div>
|
|
81
61
|
)
|
|
82
62
|
}
|
|
@@ -4,15 +4,11 @@ examples:
|
|
|
4
4
|
- avatar_monogram: Monogram
|
|
5
5
|
- avatar_no_image: "Bad Image Link"
|
|
6
6
|
- avatar_status: Status
|
|
7
|
-
- avatar_circle_icon_component_overlay: Circle Icon Component Overlay
|
|
8
|
-
- avatar_badge_component_overlay: Badge Component Overlay
|
|
9
7
|
react:
|
|
10
8
|
- avatar_default: Default
|
|
11
9
|
- avatar_monogram: Monogram
|
|
12
10
|
- avatar_no_image: "Bad Image Link"
|
|
13
11
|
- avatar_status: Status
|
|
14
|
-
- avatar_circle_icon_component_overlay: Circle Icon Component Overlay
|
|
15
|
-
- avatar_badge_component_overlay: Badge Component Overlay
|
|
16
12
|
swift:
|
|
17
13
|
- avatar_default_swift: Default
|
|
18
14
|
- avatar_monogram_swift: Monogram
|
|
@@ -2,5 +2,3 @@ export { default as AvatarDefault } from './_avatar_default.jsx'
|
|
|
2
2
|
export { default as AvatarMonogram } from './_avatar_monogram.jsx'
|
|
3
3
|
export { default as AvatarStatus } from './_avatar_status.jsx'
|
|
4
4
|
export { default as AvatarNoImage } from './_avatar_no_image.jsx'
|
|
5
|
-
export { default as AvatarCircleIconComponentOverlay } from './_avatar_circle_icon_component_overlay.jsx'
|
|
6
|
-
export { default as AvatarBadgeComponentOverlay } from './_avatar_badge_component_overlay.jsx'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
The dropdown comes with the following subcomponents that can be used to achieve various levels of customization:
|
|
2
2
|
|
|
3
|
-
`Dropdown. Trigger`
|
|
4
|
-
`Dropdown.Container
|
|
5
|
-
`Dropdown.Option`
|
|
3
|
+
`Dropdown. Trigger`
|
|
4
|
+
`Dropdown.Container`
|
|
5
|
+
`Dropdown.Option`
|
|
6
6
|
|
|
7
7
|
See the code snippet below for a visual on how to use the kit with subcomponents. Each subcomponent allows for GlobalProps in addition to any subcomponent specfic props.
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
examples:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
- dropdown_subcomponent_structure: Subcomponent Structure
|
|
5
|
-
- dropdown_with_label: With Label
|
|
6
|
-
- dropdown_with_custom_options: Custom Options
|
|
7
|
-
- dropdown_with_custom_display: Custom Display
|
|
8
|
-
- dropdown_with_custom_trigger: Custom Trigger
|
|
9
|
-
- dropdown_with_custom_padding: Custom Padding for Dropdown Options
|
|
10
|
-
|
|
2
|
+
|
|
3
|
+
|
|
11
4
|
react:
|
|
12
5
|
- dropdown_default: Default
|
|
13
6
|
- dropdown_subcomponent_structure: Subcomponent Structure
|
|
@@ -14,7 +14,6 @@ type LoadingInlineProps = {
|
|
|
14
14
|
data?: { [key: string]: string },
|
|
15
15
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
|
16
16
|
id?: string,
|
|
17
|
-
text?: string,
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
const LoadingInline = (props: LoadingInlineProps) => {
|
|
@@ -25,7 +24,6 @@ const LoadingInline = (props: LoadingInlineProps) => {
|
|
|
25
24
|
data = {},
|
|
26
25
|
htmlOptions = {},
|
|
27
26
|
id,
|
|
28
|
-
text = ' Loading',
|
|
29
27
|
} = props
|
|
30
28
|
|
|
31
29
|
const ariaProps = buildAriaProps(aria)
|
|
@@ -52,7 +50,7 @@ const LoadingInline = (props: LoadingInlineProps) => {
|
|
|
52
50
|
icon="spinner"
|
|
53
51
|
pulse
|
|
54
52
|
/>
|
|
55
|
-
{
|
|
53
|
+
{' Loading'}
|
|
56
54
|
</Body>
|
|
57
55
|
</div>
|
|
58
56
|
)
|
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
|
2
2
|
|
|
3
3
|
import LoadingInline from '../_loading_inline'
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const LoadingInlineLight = (props) => {
|
|
6
6
|
return (
|
|
7
7
|
<div>
|
|
8
8
|
<LoadingInline
|
|
@@ -20,4 +20,4 @@ const LoadingInlineDefault = (props) => {
|
|
|
20
20
|
)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export default
|
|
23
|
+
export default LoadingInlineLight
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export { default as LoadingInlineCustom } from './_loading_inline_custom.jsx'
|
|
1
|
+
export { default as LoadingInlineLight } from './_loading_inline_light.jsx'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%= pb_content_tag do %>
|
|
2
2
|
<%= pb_rails("body", props: { color: "light", dark: object.dark }) do %>
|
|
3
|
-
<%= pb_rails("icon", props: { aria: { label: "loading icon" }, fixed_width: true, icon: "spinner", pulse: true }) %>
|
|
3
|
+
<%= pb_rails("icon", props: { aria: { label: "loading icon" }, fixed_width: true, icon: "spinner", pulse: true }) %> Loading
|
|
4
4
|
<% end %>
|
|
5
5
|
<% end %>
|
|
@@ -39,17 +39,3 @@ test('should render aria-label', () => {
|
|
|
39
39
|
const kit = screen.getByTestId(testId)
|
|
40
40
|
expect(kit).toHaveAttribute('aria-label', testId)
|
|
41
41
|
})
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
test('displays custom text content', () => {
|
|
45
|
-
render(
|
|
46
|
-
<LoadingInline
|
|
47
|
-
aria={{ label: testId }}
|
|
48
|
-
data={{ testid: testId }}
|
|
49
|
-
text=' Saving'
|
|
50
|
-
/>
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
const kit = screen.getByTestId(testId)
|
|
54
|
-
expect(kit).toHaveTextContent('Saving')
|
|
55
|
-
})
|
|
@@ -127,7 +127,7 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
|
|
|
127
127
|
}
|
|
128
128
|
}}
|
|
129
129
|
role="tooltip_trigger"
|
|
130
|
-
style={{ display: "inline-
|
|
130
|
+
style={{ display: "inline-flex" }}
|
|
131
131
|
{...ariaProps}
|
|
132
132
|
{...dataProps}
|
|
133
133
|
{...htmlProps}
|
|
@@ -33,12 +33,6 @@ PbTable.start()
|
|
|
33
33
|
import PbTextarea from './pb_textarea'
|
|
34
34
|
PbTextarea.start()
|
|
35
35
|
|
|
36
|
-
import PbDropdown from './pb_dropdown'
|
|
37
|
-
PbDropdown.start()
|
|
38
|
-
|
|
39
|
-
import PbAdvancedTable from './pb_advanced_table'
|
|
40
|
-
PbAdvancedTable.start()
|
|
41
|
-
|
|
42
36
|
import 'flatpickr'
|
|
43
37
|
|
|
44
38
|
// React-Rendered Rails Kits =====
|
data/dist/menu.yml
CHANGED
|
@@ -53,7 +53,7 @@ kits:
|
|
|
53
53
|
description: Tables display a collection of structured data and typically have the ability to sort, filter, and paginate data.
|
|
54
54
|
status: "stable"
|
|
55
55
|
- name: "advanced_table"
|
|
56
|
-
platforms: *
|
|
56
|
+
platforms: *react_only
|
|
57
57
|
description: The Advanced Table can be used to display complex, nested data in a way that allows for expansion and/or sorting.
|
|
58
58
|
status: "stable"
|
|
59
59
|
- name: "list"
|