playbook_ui 14.18.1.pre.rc.0 → 14.19.0.pre.alpha.PLAY2033atactionbarrails7730
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/_playbook.scss +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +11 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableActionBar.tsx +148 -15
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +20 -3
- data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +23 -13
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/VisibilityTree.ts +47 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +313 -21
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +12 -3
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +19 -8
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +15 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +0 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.jsx +80 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb +58 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.jsx +57 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.md +4 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.jsx +62 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi.jsx +82 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.jsx +65 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions_rails.html.erb +56 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +5 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows.jsx → _advanced_table_selectable_rows_no_subrows_react.jsx} +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +3 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +11 -5
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +7 -2
- data/app/pb_kits/playbook/pb_advanced_table/flat_advanced_table.js +106 -0
- data/app/pb_kits/playbook/pb_advanced_table/index.js +529 -31
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/table_action_bar.html.erb +23 -0
- data/app/pb_kits/playbook/pb_advanced_table/table_action_bar.rb +19 -0
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +9 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +1 -2
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +4 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +3 -0
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +3 -3
- data/app/pb_kits/playbook/pb_avatar/avatar.rb +2 -0
- data/app/pb_kits/playbook/pb_avatar/avatar.test.js +18 -0
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_grayscale.html.erb +5 -0
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_grayscale.jsx +16 -0
- data/app/pb_kits/playbook/pb_avatar/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_avatar/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_card/card.html.erb +1 -1
- data/app/pb_kits/playbook/pb_card/card.rb +12 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.html.erb +2 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb +22 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.html.erb +55 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line_rails.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_rails.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.jsx +59 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners_react.md +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_draggable/draggable_container.rb +11 -1
- data/app/pb_kits/playbook/pb_draggable/draggable_item.rb +11 -1
- data/app/pb_kits/playbook/pb_draggable/index.js +4 -2
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +33 -5
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +5 -0
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +5 -16
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +5 -2
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.html.erb +28 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +17 -64
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.html.erb +58 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_autocomplete_and_custom_display.jsx → _dropdown_with_autocomplete_with_subcomponents.jsx} +11 -25
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_external_control.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search.jsx +61 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search.md +2 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search_rails.html.erb +52 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search_rails.md +2 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +7 -4
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -2
- data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +2 -2
- data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +4 -0
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +45 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +10 -0
- data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +3 -0
- data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb +12 -2
- data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.rb +3 -1
- data/app/pb_kits/playbook/pb_dropdown/index.js +57 -0
- data/app/pb_kits/playbook/pb_dropdown/keyboard_accessibility.js +26 -0
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownContainer.tsx +3 -4
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +4 -4
- data/app/pb_kits/playbook/pb_empty_state/_empty_state.scss +8 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.html.erb +27 -0
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_default.html.erb +7 -0
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.html.erb +12 -0
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.html.erb +23 -0
- data/app/pb_kits/playbook/pb_empty_state/docs/example.yml +5 -1
- data/app/pb_kits/playbook/pb_empty_state/empty_state.html.erb +19 -0
- data/app/pb_kits/playbook/pb_empty_state/empty_state.rb +123 -0
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +13 -0
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +11 -1
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_error.html.erb +1 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_error.jsx +41 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +1 -0
- data/app/pb_kits/playbook/pb_file_upload/file_upload.rb +7 -1
- data/app/pb_kits/playbook/pb_file_upload/fileupload.test.js +18 -0
- data/app/pb_kits/playbook/pb_message/_message.tsx +3 -0
- data/app/pb_kits/playbook/pb_message/docs/_message_grayscale.html.erb +9 -0
- data/app/pb_kits/playbook/pb_message/docs/_message_grayscale.jsx +21 -0
- data/app/pb_kits/playbook/pb_message/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_message/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_message/message.html.erb +2 -1
- data/app/pb_kits/playbook/pb_message/message.rb +1 -0
- data/app/pb_kits/playbook/pb_overlay/_overlay.scss +2 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.jsx +1 -1
- data/app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_token.tsx +5 -4
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +9 -9
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +2 -2
- data/app/pb_kits/playbook/pb_select/_select.scss +10 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_error.html.erb +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.jsx +7 -7
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +5 -5
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +4 -2
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.html.erb +1 -1
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.html.erb +5 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.html.erb +8 -1
- data/app/pb_kits/playbook/pb_user/_user.tsx +3 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_grayscale.html.erb +6 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_grayscale.jsx +16 -0
- data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_user/user.html.erb +2 -1
- data/app/pb_kits/playbook/pb_user/user.rb +1 -0
- data/dist/chunks/{_typeahead-D8CsVBZO.js → _typeahead-BPSIWtFT.js} +3 -3
- data/dist/chunks/_weekday_stacked-PfWrqC3z.js +45 -0
- data/dist/chunks/{lib-BmTAc7Nc.js → lib-B20MXZcW.js} +2 -2
- data/dist/chunks/{pb_form_validation-BWjy4bFn.js → pb_form_validation-WWvUXPKD.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +6 -14
- 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 +2 -2
- metadata +57 -21
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.md +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_hook.jsx +0 -79
- data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.scss +0 -3
- data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.tsx +0 -72
- data/app/pb_kits/playbook/pb_gantt_chart/docs/_gantt_chart_default.jsx +0 -53
- data/app/pb_kits/playbook/pb_gantt_chart/docs/example.yml +0 -7
- data/app/pb_kits/playbook/pb_gantt_chart/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_gantt_chart/gantt_chart.test.jsx +0 -19
- data/dist/chunks/_weekday_stacked-CHQsoCdP.js +0 -45
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_react.md → _advanced_table_selectable_rows.md} +0 -0
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows.html.erb → _advanced_table_selectable_rows_no_subrows_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows.html.erb → _advanced_table_selectable_rows_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_line.md → _draggable_drop_zones_line_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_event_listeners.md → _draggable_event_listeners_rails.md} +0 -0
|
@@ -50,3 +50,21 @@ test('displays custom message', () => {
|
|
|
50
50
|
const kit = screen.getByTestId(testid)
|
|
51
51
|
expect(kit).toHaveTextContent('Hello world!')
|
|
52
52
|
})
|
|
53
|
+
|
|
54
|
+
test('handles error state with error prop', () => {
|
|
55
|
+
const errorText = "Test error message"
|
|
56
|
+
render(
|
|
57
|
+
<FileUpload
|
|
58
|
+
data={{ testid: testid }}
|
|
59
|
+
error={errorText}
|
|
60
|
+
/>
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
const kit = screen.getByTestId(testid)
|
|
64
|
+
|
|
65
|
+
expect(kit).toHaveClass('pb_file_upload_kit')
|
|
66
|
+
expect(kit).toHaveClass('error')
|
|
67
|
+
|
|
68
|
+
const errorElement = screen.getByText(errorText)
|
|
69
|
+
expect(errorElement).toBeInTheDocument()
|
|
70
|
+
})
|
|
@@ -13,6 +13,7 @@ import MessageMention from './_message_mention'
|
|
|
13
13
|
|
|
14
14
|
type MessageProps = {
|
|
15
15
|
aria: { [key: string]: string },
|
|
16
|
+
avatarGrayscale?: boolean,
|
|
16
17
|
avatarName?: string,
|
|
17
18
|
avatarStatus?: "away" | "offline" | "online",
|
|
18
19
|
avatarUrl?: string,
|
|
@@ -32,6 +33,7 @@ type MessageProps = {
|
|
|
32
33
|
const Message = (props: MessageProps) => {
|
|
33
34
|
const {
|
|
34
35
|
aria = {},
|
|
36
|
+
avatarGrayscale = false,
|
|
35
37
|
avatarName,
|
|
36
38
|
avatarStatus = null,
|
|
37
39
|
avatarUrl,
|
|
@@ -71,6 +73,7 @@ const Message = (props: MessageProps) => {
|
|
|
71
73
|
>
|
|
72
74
|
{shouldDisplayAvatar &&
|
|
73
75
|
<Avatar
|
|
76
|
+
grayscale={avatarGrayscale}
|
|
74
77
|
imageUrl={avatarUrl}
|
|
75
78
|
name={avatarName}
|
|
76
79
|
size="xs"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%= pb_rails("message", props: {
|
|
2
|
+
label: "Mike Bishop",
|
|
3
|
+
message: "So long, and thanks for all the fish!",
|
|
4
|
+
timestamp: "3 months ago",
|
|
5
|
+
avatar_name: "Mike Bishop",
|
|
6
|
+
avatar_url: "https://randomuser.me/api/portraits/men/50.jpg",
|
|
7
|
+
avatar_status: "offline",
|
|
8
|
+
avatar_grayscale: true,
|
|
9
|
+
}) %>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
|
|
3
|
+
import Message from "../_message"
|
|
4
|
+
|
|
5
|
+
const MessageGrayscale = (props) => {
|
|
6
|
+
return (
|
|
7
|
+
<Message
|
|
8
|
+
avatarGrayscale
|
|
9
|
+
avatarName='Mike Bishop'
|
|
10
|
+
avatarStatus='offline'
|
|
11
|
+
avatarUrl='https://randomuser.me/api/portraits/men/50.jpg'
|
|
12
|
+
borderRadius='rounded'
|
|
13
|
+
label='Mike Bishop'
|
|
14
|
+
message='So long, and thanks for all the fish!'
|
|
15
|
+
timestamp='3 months ago'
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default MessageGrayscale
|
|
@@ -5,12 +5,14 @@ examples:
|
|
|
5
5
|
- message_timestamp: With Timestamp Hover
|
|
6
6
|
- message_hover: Hover
|
|
7
7
|
- message_mentions: Mentions
|
|
8
|
+
- message_grayscale: Grayscale Avatar
|
|
8
9
|
|
|
9
10
|
react:
|
|
10
11
|
- message_default: Default
|
|
11
12
|
- message_timestamp: With Timestamp Hover
|
|
12
13
|
- message_hover: Hover
|
|
13
14
|
- message_mentions: Mentions
|
|
15
|
+
- message_grayscale: Grayscale Avatar
|
|
14
16
|
|
|
15
17
|
swift:
|
|
16
18
|
- message_default_swift: Default
|
|
@@ -2,3 +2,4 @@ export { default as MessageDefault } from './_message_default.jsx'
|
|
|
2
2
|
export { default as MessageTimestamp } from './_message_timestamp.jsx'
|
|
3
3
|
export { default as MessageHover } from './_message_hover.jsx'
|
|
4
4
|
export { default as MessageMentions } from './_message_mentions.jsx'
|
|
5
|
+
export { default as MessageGrayscale } from './_message_grayscale.jsx'
|
|
@@ -78,7 +78,8 @@ $overlay_colors: (
|
|
|
78
78
|
&.overlay-hide-scrollbar {
|
|
79
79
|
& [class*="overflow_x_auto"],
|
|
80
80
|
& [class*="overflow_y_auto"],
|
|
81
|
-
& [class*="overflow_auto"]
|
|
81
|
+
& [class*="overflow_auto"],
|
|
82
|
+
.overlay_token_container {
|
|
82
83
|
&::-webkit-scrollbar {
|
|
83
84
|
display: none !important;
|
|
84
85
|
}
|
|
@@ -30,7 +30,7 @@ const OverlayToken = (props: OverlayChildrenProps) => {
|
|
|
30
30
|
if (container) {
|
|
31
31
|
const { scrollLeft, scrollWidth, clientWidth } = container;
|
|
32
32
|
const atStart = scrollLeft === 0;
|
|
33
|
-
const atEnd = scrollLeft + clientWidth >= scrollWidth - 1;
|
|
33
|
+
const atEnd = scrollLeft + clientWidth >= scrollWidth - 1;
|
|
34
34
|
|
|
35
35
|
setIsAtStart(atStart);
|
|
36
36
|
setIsAtEnd(atEnd);
|
|
@@ -64,16 +64,17 @@ const OverlayToken = (props: OverlayChildrenProps) => {
|
|
|
64
64
|
return (
|
|
65
65
|
<>
|
|
66
66
|
<div className={dynamic ? isAtStart ? '' : previousOverlayClassName : previousOverlayClassName} />
|
|
67
|
-
{dynamic ?
|
|
67
|
+
{dynamic ?
|
|
68
68
|
<div
|
|
69
|
+
className="overlay_token_container"
|
|
69
70
|
ref={scrollContainerRef}
|
|
70
71
|
style={{
|
|
71
|
-
overflowX: 'auto',
|
|
72
|
+
overflowX: 'auto',
|
|
72
73
|
}}
|
|
73
74
|
>
|
|
74
75
|
{children}
|
|
75
76
|
</div>
|
|
76
|
-
:
|
|
77
|
+
:
|
|
77
78
|
children
|
|
78
79
|
}
|
|
79
80
|
{hasSubsequentOverlay &&
|
|
@@ -42,7 +42,7 @@ $flag-min-resolution: 192dpi;
|
|
|
42
42
|
.iti__country-list {
|
|
43
43
|
min-width: $dropdown-min-width;
|
|
44
44
|
}
|
|
45
|
-
// iti-spacer-horizontal's default is 8px, or $space_xs
|
|
45
|
+
// iti-spacer-horizontal's default is 8px, or $space_xs
|
|
46
46
|
.iti__country-list .iti__flag, .iti__country-name {
|
|
47
47
|
margin-right: $space_xs;
|
|
48
48
|
}
|
|
@@ -60,7 +60,7 @@ $flag-min-resolution: 192dpi;
|
|
|
60
60
|
color: $focus_input_light;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.dropdown_open {
|
|
63
|
+
.dropdown_open:not(.error) {
|
|
64
64
|
.text_input {
|
|
65
65
|
border-color: $primary !important;
|
|
66
66
|
}
|
|
@@ -76,7 +76,7 @@ $flag-min-resolution: 192dpi;
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.iti__divider {
|
|
79
|
-
border-bottom: 1px solid $border_light !important;
|
|
79
|
+
border-bottom: 1px solid $border_light !important;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.iti__selected-country-primary {
|
|
@@ -96,7 +96,7 @@ $flag-min-resolution: 192dpi;
|
|
|
96
96
|
justify-content: center;
|
|
97
97
|
align-items: center;
|
|
98
98
|
border-width: 0;
|
|
99
|
-
border-radius: $space_xxs;
|
|
99
|
+
border-radius: $space_xxs;
|
|
100
100
|
|
|
101
101
|
&[aria-expanded="true"] {
|
|
102
102
|
color: $primary_action;
|
|
@@ -199,7 +199,7 @@ $flag-min-resolution: 192dpi;
|
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
.iti__dropdown-content {
|
|
202
|
-
border-radius: $space_xs;
|
|
202
|
+
border-radius: $space_xs;
|
|
203
203
|
border: 1px solid $border_light !important;
|
|
204
204
|
position: absolute;
|
|
205
205
|
top: 100%;
|
|
@@ -228,13 +228,13 @@ $flag-min-resolution: 192dpi;
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
.iti__dropdown-content {
|
|
231
|
-
border-radius: $space_xs;
|
|
231
|
+
border-radius: $space_xs;
|
|
232
232
|
border: 1px solid $border_dark !important;
|
|
233
233
|
.iti__search-input {
|
|
234
234
|
background-color: $bg_dark_card;
|
|
235
235
|
&:hover {
|
|
236
236
|
background-color: $bg_dark_card;
|
|
237
|
-
}
|
|
237
|
+
}
|
|
238
238
|
&:active,
|
|
239
239
|
&:focus {
|
|
240
240
|
background-color: $card_dark;
|
|
@@ -243,7 +243,7 @@ $flag-min-resolution: 192dpi;
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
.iti__divider {
|
|
246
|
-
border-bottom: 1px solid $border_dark !important;
|
|
246
|
+
border-bottom: 1px solid $border_dark !important;
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
.iti__country-list {
|
|
@@ -278,7 +278,7 @@ $flag-min-resolution: 192dpi;
|
|
|
278
278
|
color: $white;
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
|
|
281
|
+
|
|
282
282
|
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: $flag-min-resolution) {
|
|
283
283
|
.iti__flag {
|
|
284
284
|
background-image: url("https://unpkg.com/intl-tel-input@24.6.0/build/img/flags@2x.png");
|
|
@@ -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, globalInlineProps } from '../utilities/globalProps'
|
|
5
|
+
import { globalProps, globalInlineProps, GlobalProps } from '../utilities/globalProps'
|
|
6
6
|
|
|
7
7
|
import Caption from '../pb_caption/_caption'
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ type SectionSeparatorProps = {
|
|
|
19
19
|
orientation?: "horizontal" | "vertical",
|
|
20
20
|
text?: string,
|
|
21
21
|
variant?: "card" | "background",
|
|
22
|
-
}
|
|
22
|
+
} & GlobalProps
|
|
23
23
|
|
|
24
24
|
const SectionSeparator = (props: SectionSeparatorProps): React.ReactElement => {
|
|
25
25
|
const {
|
|
@@ -143,6 +143,16 @@
|
|
|
143
143
|
select {
|
|
144
144
|
font-size: 12px;
|
|
145
145
|
}
|
|
146
|
+
.pb_select_kit_wrapper.error {
|
|
147
|
+
.pb_select_kit_caret {
|
|
148
|
+
top: 13.7px;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
.pb_select_kit_wrapper.error {
|
|
153
|
+
.pb_select_kit_caret {
|
|
154
|
+
top: 16.2px;
|
|
155
|
+
}
|
|
146
156
|
}
|
|
147
157
|
}
|
|
148
158
|
}
|
|
@@ -8,7 +8,7 @@ const TableWithCollapsibleWithCustomClick = (props) => {
|
|
|
8
8
|
|
|
9
9
|
const Content = () => {
|
|
10
10
|
return (
|
|
11
|
-
<Card
|
|
11
|
+
<Card
|
|
12
12
|
borderNone
|
|
13
13
|
borderRadius="none"
|
|
14
14
|
padding="md"
|
|
@@ -37,7 +37,7 @@ return (
|
|
|
37
37
|
|
|
38
38
|
</Table.Head>
|
|
39
39
|
<Table.Body>
|
|
40
|
-
<Table.Row collapsible
|
|
40
|
+
<Table.Row collapsible
|
|
41
41
|
collapsibleContent={<Content/>}
|
|
42
42
|
toggleCellId="cell-1"
|
|
43
43
|
{...props}
|
|
@@ -47,7 +47,7 @@ return (
|
|
|
47
47
|
<Table.Cell>{'Value 3'}</Table.Cell>
|
|
48
48
|
<Table.Cell>{'Value 4'}</Table.Cell>
|
|
49
49
|
<Table.Cell>{'Value 5'}</Table.Cell>
|
|
50
|
-
<Table.Cell cursor="pointer"
|
|
50
|
+
<Table.Cell cursor="pointer"
|
|
51
51
|
id="cell-1"
|
|
52
52
|
textAlign="right"
|
|
53
53
|
>
|
|
@@ -59,7 +59,7 @@ return (
|
|
|
59
59
|
</Table.Cell>
|
|
60
60
|
|
|
61
61
|
</Table.Row>
|
|
62
|
-
<Table.Row collapsible
|
|
62
|
+
<Table.Row collapsible
|
|
63
63
|
collapsibleContent={<Content/>}
|
|
64
64
|
toggleCellId="cell-2"
|
|
65
65
|
{...props}
|
|
@@ -69,7 +69,7 @@ return (
|
|
|
69
69
|
<Table.Cell>{'Value 3'}</Table.Cell>
|
|
70
70
|
<Table.Cell>{'Value 4'}</Table.Cell>
|
|
71
71
|
<Table.Cell>{'Value 5'}</Table.Cell>
|
|
72
|
-
<Table.Cell cursor="pointer"
|
|
72
|
+
<Table.Cell cursor="pointer"
|
|
73
73
|
id="cell-2"
|
|
74
74
|
textAlign="right"
|
|
75
75
|
>
|
|
@@ -81,7 +81,7 @@ return (
|
|
|
81
81
|
</Table.Cell>
|
|
82
82
|
|
|
83
83
|
</Table.Row>
|
|
84
|
-
<Table.Row collapsible
|
|
84
|
+
<Table.Row collapsible
|
|
85
85
|
collapsibleContent={<Content/>}
|
|
86
86
|
toggleCellId="cell-3"
|
|
87
87
|
{...props}
|
|
@@ -91,7 +91,7 @@ return (
|
|
|
91
91
|
<Table.Cell>{'Value 3'}</Table.Cell>
|
|
92
92
|
<Table.Cell>{'Value 4'}</Table.Cell>
|
|
93
93
|
<Table.Cell>{'Value 5'}</Table.Cell>
|
|
94
|
-
<Table.Cell cursor="pointer"
|
|
94
|
+
<Table.Cell cursor="pointer"
|
|
95
95
|
id="cell-3"
|
|
96
96
|
textAlign="right"
|
|
97
97
|
>
|
|
@@ -55,7 +55,7 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
|
|
|
55
55
|
const htmlProps = buildHtmlProps(htmlOptions);
|
|
56
56
|
const sideHighlightClass =
|
|
57
57
|
sideHighlightColor != "" ? `side_highlight_${sideHighlightColor}` : null;
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
const [isCollapsed, setIsCollapsed] = useCollapsible(true);
|
|
60
60
|
|
|
61
61
|
const collapsibleRow = collapsible && isCollapsed === true ? "collapsible_table_row" : null;
|
|
@@ -83,14 +83,14 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
|
|
|
83
83
|
target instanceof SVGElement &&
|
|
84
84
|
(target.matches("svg.pb_custom_icon") || target.closest("svg.pb_custom_icon"));
|
|
85
85
|
|
|
86
|
-
if (clickedCell || isIconClick) {
|
|
86
|
+
if (clickedCell || (clickedCell && isIconClick)) {
|
|
87
87
|
setIsCollapsed(!isCollapsed);
|
|
88
88
|
}
|
|
89
89
|
} else {
|
|
90
90
|
setIsCollapsed(!isCollapsed);
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
|
-
|
|
93
|
+
|
|
94
94
|
return (
|
|
95
95
|
<>
|
|
96
96
|
{collapsible ? (
|
|
@@ -116,7 +116,7 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
|
|
|
116
116
|
tag="td"
|
|
117
117
|
>
|
|
118
118
|
<tr/>
|
|
119
|
-
<Collapsible.Content
|
|
119
|
+
<Collapsible.Content
|
|
120
120
|
className={collapsibleSideHighlight ? `table_collapsible_side_highlight` : ''}
|
|
121
121
|
dark={dark}
|
|
122
122
|
margin="none"
|
|
@@ -149,7 +149,7 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
|
|
|
149
149
|
tag="td"
|
|
150
150
|
>
|
|
151
151
|
<tr/>
|
|
152
|
-
<Collapsible.Content
|
|
152
|
+
<Collapsible.Content
|
|
153
153
|
className={collapsibleSideHighlight ? `table_collapsible_side_highlight` : ''}
|
|
154
154
|
dark={dark}
|
|
155
155
|
margin="none"
|
|
@@ -71,7 +71,8 @@
|
|
|
71
71
|
}
|
|
72
72
|
&.error {
|
|
73
73
|
.text_input_wrapper {
|
|
74
|
-
input
|
|
74
|
+
// The `:not` here prevents error styling from affecting the country search input in the Phone Number Input Kit.
|
|
75
|
+
input:not(.iti__search-input),
|
|
75
76
|
.text_input {
|
|
76
77
|
border-color: $error_dark;
|
|
77
78
|
}
|
|
@@ -102,7 +103,8 @@
|
|
|
102
103
|
[class*="pb_body_kit"] {
|
|
103
104
|
margin-top: $space_xs / 2;
|
|
104
105
|
}
|
|
105
|
-
input
|
|
106
|
+
// The `:not` here prevents error styling from affecting the country search input in the Phone Number Input Kit.
|
|
107
|
+
input:not(.iti__search-input),
|
|
106
108
|
.text_input {
|
|
107
109
|
border-color: $error;
|
|
108
110
|
}
|
|
@@ -8,7 +8,14 @@
|
|
|
8
8
|
|
|
9
9
|
%>
|
|
10
10
|
|
|
11
|
-
<%= pb_rails("typeahead", props: {
|
|
11
|
+
<%= pb_rails("typeahead", props: {
|
|
12
|
+
id: "typeahead-error-example",
|
|
13
|
+
options: options,
|
|
14
|
+
error: "Please make a valid selection",
|
|
15
|
+
label: "Products",
|
|
16
|
+
name: :foo,
|
|
17
|
+
is_multi: false
|
|
18
|
+
}) %>
|
|
12
19
|
|
|
13
20
|
<!-- This section is an example of the available JavaScript event hooks -->
|
|
14
21
|
<%= javascript_tag defer: "defer" do %>
|
|
@@ -19,6 +19,7 @@ type UserProps = {
|
|
|
19
19
|
className?: string,
|
|
20
20
|
dark?: boolean,
|
|
21
21
|
data?: {[key: string]: string},
|
|
22
|
+
avatarGrayscale?: boolean,
|
|
22
23
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
|
23
24
|
id?: string,
|
|
24
25
|
name?: string,
|
|
@@ -41,6 +42,7 @@ const User = (props: UserProps): React.ReactElement => {
|
|
|
41
42
|
className,
|
|
42
43
|
dark = false,
|
|
43
44
|
data = {},
|
|
45
|
+
avatarGrayscale = false,
|
|
44
46
|
htmlOptions = {},
|
|
45
47
|
id,
|
|
46
48
|
name,
|
|
@@ -145,6 +147,7 @@ const User = (props: UserProps): React.ReactElement => {
|
|
|
145
147
|
>
|
|
146
148
|
{ avatarPresent &&
|
|
147
149
|
<Avatar
|
|
150
|
+
grayscale={avatarGrayscale}
|
|
148
151
|
imageUrl={avatarUrl}
|
|
149
152
|
name={name}
|
|
150
153
|
size={size}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import User from '../../pb_user/_user'
|
|
3
|
+
|
|
4
|
+
const UserGrayscale = (props) => {
|
|
5
|
+
return (
|
|
6
|
+
<User
|
|
7
|
+
avatarGrayscale
|
|
8
|
+
avatarUrl="https://randomuser.me/api/portraits/women/44.jpg"
|
|
9
|
+
name="Anna Black"
|
|
10
|
+
title="Remodeling Consultant"
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default UserGrayscale
|
|
@@ -10,6 +10,7 @@ examples:
|
|
|
10
10
|
- user_subtitle: Subtitle
|
|
11
11
|
- user_block_content_subtitle_rails: Block Content Subtitle
|
|
12
12
|
- user_font_options: Font Options
|
|
13
|
+
- user_grayscale: Grayscale Avatar
|
|
13
14
|
|
|
14
15
|
react:
|
|
15
16
|
- user_default: Default
|
|
@@ -21,6 +22,7 @@ examples:
|
|
|
21
22
|
- user_subtitle: Subtitle
|
|
22
23
|
- user_block_content_subtitle_react: Block Content Subtitle
|
|
23
24
|
- user_font_options: Font Options
|
|
25
|
+
- user_grayscale: Grayscale Avatar
|
|
24
26
|
|
|
25
27
|
swift:
|
|
26
28
|
- user_horizontal_swift: Horizontal
|
|
@@ -7,3 +7,4 @@ export { default as UserVerticalSize } from './_user_vertical_size.jsx'
|
|
|
7
7
|
export { default as UserSubtitle } from './_user_subtitle.jsx'
|
|
8
8
|
export { default as UserBlockContentSubtitleReact } from './_user_block_content_subtitle_react.jsx'
|
|
9
9
|
export { default as UserFontOptions } from './_user_font_options.jsx'
|
|
10
|
+
export { default as UserGrayscale } from './_user_grayscale.jsx'
|
|
@@ -8,6 +8,7 @@ module Playbook
|
|
|
8
8
|
default: "left"
|
|
9
9
|
prop :avatar, type: Playbook::Props::Boolean,
|
|
10
10
|
default: false
|
|
11
|
+
prop :avatar_grayscale, type: Playbook::Props::Boolean, default: false
|
|
11
12
|
prop :avatar_url
|
|
12
13
|
prop :bold, type: Playbook::Props::Boolean, default: true
|
|
13
14
|
prop :name
|