playbook_ui 14.13.0.pre.alpha.rails8compatible6232 → 14.13.0.pre.rc.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/_playbook.scss +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +4 -11
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +10 -74
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +26 -43
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +1 -8
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/index.js +6 -9
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +5 -8
- 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_avatar_action_button/_avatar_action_button.scss +66 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +98 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +28 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.rb +42 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +19 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +26 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +10 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +17 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +19 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +16 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +35 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +42 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +13 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml +15 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/index.js +4 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/pb_avatar_action_button.test.js +31 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_button/button.rb +1 -1
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +8 -17
- data/app/pb_kits/playbook/pb_checkbox/checkbox.test.js +0 -16
- data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +1 -2
- data/app/pb_kits/playbook/pb_checkbox/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_date/_date.tsx +4 -14
- data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +1 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +5 -13
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +5 -4
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_draggable/draggable_container.html.erb +2 -2
- data/app/pb_kits/playbook/pb_draggable/draggable_container.rb +0 -5
- data/app/pb_kits/playbook/pb_draggable/draggable_item.html.erb +1 -1
- data/app/pb_kits/playbook/pb_draggable/draggable_item.rb +0 -4
- data/app/pb_kits/playbook/pb_draggable/index.js +15 -151
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +4 -7
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +3 -6
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +6 -1
- data/app/pb_kits/playbook/pb_filter/filter.html.erb +5 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +5 -7
- data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +6 -1
- data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
- 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 -13
- data/app/pb_kits/playbook/pb_icon/icon.html.erb +6 -2
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +2 -1
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +1 -1
- data/app/pb_kits/playbook/pb_icon_button/icon_button.rb +0 -3
- data/app/pb_kits/playbook/pb_layout/body.html.erb +5 -1
- data/app/pb_kits/playbook/pb_layout/footer.html.erb +5 -1
- data/app/pb_kits/playbook/pb_layout/header.html.erb +5 -1
- data/app/pb_kits/playbook/pb_layout/item.html.erb +5 -1
- data/app/pb_kits/playbook/pb_layout/layout.html.erb +5 -1
- data/app/pb_kits/playbook/pb_layout/sidebar.html.erb +5 -1
- data/app/pb_kits/playbook/pb_legend/legend.html.erb +6 -1
- data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +6 -7
- data/app/pb_kits/playbook/pb_link/_link.tsx +0 -18
- data/app/pb_kits/playbook/pb_link/docs/example.yml +3 -5
- data/app/pb_kits/playbook/pb_link/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_link/link.html.erb +1 -1
- data/app/pb_kits/playbook/pb_link/link.rb +0 -6
- data/app/pb_kits/playbook/pb_link/link.test.jsx +0 -30
- data/app/pb_kits/playbook/pb_message/message.html.erb +6 -1
- data/app/pb_kits/playbook/pb_message/message_mention.html.erb +6 -1
- 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 +19 -7
- 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_overlay/_overlay.tsx +0 -4
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_token.tsx +10 -48
- data/app/pb_kits/playbook/pb_popover/popover.html.erb +6 -1
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.scss +1 -6
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +5 -7
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.html.erb +0 -1
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.jsx +0 -7
- data/app/pb_kits/playbook/pb_progress_pills/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_progress_pills/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.html.erb +7 -2
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.rb +0 -6
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.test.js +1 -26
- data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +5 -1
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
- data/app/pb_kits/playbook/pb_progress_step/progress_step.html.erb +5 -1
- data/app/pb_kits/playbook/pb_progress_step/progress_step_item.html.erb +5 -1
- data/app/pb_kits/playbook/pb_radio/radio.html.erb +11 -6
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +9 -6
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +9 -6
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +1 -1
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_table/docs/index.js +1 -3
- data/app/pb_kits/playbook/pb_table/index.ts +9 -41
- data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +0 -4
- data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +0 -26
- data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +1 -0
- data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +0 -25
- data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +0 -25
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_body.tsx +2 -29
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +3 -31
- data/app/pb_kits/playbook/pb_table/table_body.html.erb +7 -13
- data/app/pb_kits/playbook/pb_table/table_body.rb +0 -2
- data/app/pb_kits/playbook/pb_table/table_row.html.erb +7 -14
- data/app/pb_kits/playbook/pb_table/table_row.rb +1 -14
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +1 -15
- data/app/pb_kits/playbook/pb_text_input/index.js +82 -60
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +2 -5
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -3
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_tooltip/index.js +27 -45
- data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -5
- 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-BWwaAo_0.js +36 -0
- data/dist/chunks/_weekday_stacked-zyBCd1s8.js +45 -0
- data/dist/chunks/{lib-D3us1bGD.js → lib-kMuhBuU7.js} +2 -2
- data/dist/chunks/{pb_form_validation-BpihMSOQ.js → pb_form_validation-DBJ0wZuS.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +7 -6
- 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 +2 -2
- metadata +38 -79
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/ActionBarAnimationHelper.ts +0 -26
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_custom_cell.jsx +0 -75
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb +0 -33
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx +0 -55
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +0 -3
- data/app/pb_kits/playbook/pb_bar_graph/BarGraphStyles.scss +0 -58
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +0 -64
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +0 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.jsx +0 -69
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.md +0 -1
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +0 -4
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +0 -92
- data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +0 -15
- data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +0 -28
- data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +0 -64
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +0 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +0 -21
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +0 -5
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +0 -45
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +0 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -8
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_copy_button/index.js +0 -47
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb +0 -99
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md +0 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +0 -61
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +0 -4
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx +0 -90
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +0 -5
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +0 -58
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +0 -3
- 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_icon_button/docs/_icon_button_sizes.html.erb +0 -27
- data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +0 -15
- data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +0 -29
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.jsx +0 -37
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional_react.md +0 -1
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.md +0 -1
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.html.erb +0 -1
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.jsx +0 -18
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_rails.md +0 -1
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_react.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb +0 -47
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx +0 -88
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.html.erb +0 -51
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_rails.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +0 -96
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx +0 -101
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.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
- data/dist/chunks/_typeahead-PqkcDf1H.js +0 -36
- data/dist/chunks/_weekday_stacked-C7J0S4f7.js +0 -45
- /data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/{_fixed_confirmation_toast_auto_close_react.md → _fixed_confirmation_toast_auto_close.md} +0 -0
- /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible_with_custom_click_react.md → _table_with_collapsible_with_custom_click.md} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcf251161270426f1872fe6a3344fa2b30027ebf0e8de2438a1425b76227a846
|
4
|
+
data.tar.gz: 7c0f7ef946114d87099cdf24562e8731f1686498dcef593092d0fd8a7c9f4091
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1d66fe512c67ece02687f200a99c4daf2fd581b83e45857bac0214a6ea62160eee6f9152833b35ee6a9b618a212f360e721604ebfc913fdfb5871c4464e24ae
|
7
|
+
data.tar.gz: fd937db687917267ff67e23f04344d63dda613ee7c56c17870892c8a2894f2a9d5c2c06916a607711c9d70dbd028acad003480d9585c4ab05f6481b7b96b1ff6
|
@@ -1,6 +1,7 @@
|
|
1
1
|
|
2
2
|
@import 'pb_advanced_table/advanced_table';
|
3
3
|
@import 'pb_avatar/avatar';
|
4
|
+
@import 'pb_avatar_action_button/avatar_action_button';
|
4
5
|
@import 'pb_background/background';
|
5
6
|
@import 'pb_badge/badge';
|
6
7
|
@import 'pb_bar_graph/bar_graph';
|
@@ -14,7 +15,6 @@
|
|
14
15
|
@import 'pb_circle_chart/circle_chart';
|
15
16
|
@import 'pb_circle_icon_button/circle_icon_button';
|
16
17
|
@import 'pb_collapsible/collapsible';
|
17
|
-
@import 'pb_copy_button/copy_button';
|
18
18
|
@import 'pb_contact/contact';
|
19
19
|
@import 'pb_currency/currency';
|
20
20
|
@import 'pb_dashboard_value/dashboard_value';
|
@@ -39,15 +39,8 @@ export const TableHeaderCell = ({
|
|
39
39
|
sortIcon,
|
40
40
|
table
|
41
41
|
}: TableHeaderCellProps) => {
|
42
|
-
const {
|
43
|
-
|
44
|
-
responsive,
|
45
|
-
selectableRows,
|
46
|
-
hasAnySubRows,
|
47
|
-
showActionsBar,
|
48
|
-
inlineRowLoading,
|
49
|
-
isActionBarVisible,
|
50
|
-
} = useContext(AdvancedTableContext);
|
42
|
+
const { sortControl, responsive, selectableRows, hasAnySubRows, showActionsBar } =
|
43
|
+
useContext(AdvancedTableContext);
|
51
44
|
|
52
45
|
type justifyTypes = "none" | "center" | "start" | "end" | "between" | "around" | "evenly"
|
53
46
|
|
@@ -72,7 +65,7 @@ export const TableHeaderCell = ({
|
|
72
65
|
|
73
66
|
const cellClassName = classnames(
|
74
67
|
"table-header-cells",
|
75
|
-
`${showActionsBar &&
|
68
|
+
`${showActionsBar && "header-cells-with-actions"}`,
|
76
69
|
`${isChrome() ? "chrome-styles" : ""}`,
|
77
70
|
`${enableSorting ? "table-header-cells-active" : ""}`,
|
78
71
|
{ "pinned-left": responsive === "scroll" && isPinnedLeft },
|
@@ -98,7 +91,7 @@ const isToggleExpansionEnabled =
|
|
98
91
|
|
99
92
|
let justifyHeader:justifyTypes;
|
100
93
|
|
101
|
-
if (header?.index === 0 && hasAnySubRows
|
94
|
+
if (header?.index === 0 && hasAnySubRows) {
|
102
95
|
justifyHeader = enableSorting ? "between" : "start";
|
103
96
|
} else {
|
104
97
|
justifyHeader = isLeafColumn ? "end" : "center";
|
@@ -31,12 +31,12 @@
|
|
31
31
|
width: 100%;
|
32
32
|
}
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
34
|
+
.row-selection-actions-card {
|
35
|
+
border-bottom-right-radius: 0px !important;
|
36
|
+
border-bottom-left-radius: 0px !important;
|
37
|
+
border-bottom-color: transparent;
|
38
|
+
}
|
39
|
+
|
40
40
|
.table-header-cells:first-child {
|
41
41
|
min-width: 180px;
|
42
42
|
}
|
@@ -89,47 +89,11 @@
|
|
89
89
|
}
|
90
90
|
}
|
91
91
|
|
92
|
+
|
92
93
|
.table-header-cells-active:first-child {
|
93
94
|
color: $primary !important;
|
94
95
|
}
|
95
96
|
|
96
|
-
// Sticky Header
|
97
|
-
.sticky-header {
|
98
|
-
thead {
|
99
|
-
z-index: 3 !important;
|
100
|
-
}
|
101
|
-
}
|
102
|
-
|
103
|
-
// Max height overflow - the below prevents expansion from overflowing container at full screen for responsive and nonresponsive tables
|
104
|
-
&.advanced-table-max-height-xs {
|
105
|
-
max-height: 320px;
|
106
|
-
overflow-y: auto;
|
107
|
-
}
|
108
|
-
&.advanced-table-max-height-sm {
|
109
|
-
max-height: 480px;
|
110
|
-
overflow-y: auto;
|
111
|
-
}
|
112
|
-
&.advanced-table-max-height-md {
|
113
|
-
max-height: 768px;
|
114
|
-
overflow-y: auto;
|
115
|
-
}
|
116
|
-
&.advanced-table-max-height-lg {
|
117
|
-
max-height: 1024px;
|
118
|
-
overflow-y: auto;
|
119
|
-
}
|
120
|
-
&.advanced-table-max-height-xl {
|
121
|
-
max-height: 1280px;
|
122
|
-
overflow-y: auto;
|
123
|
-
}
|
124
|
-
&.advanced-table-max-height-xxl {
|
125
|
-
max-height: 1440px;
|
126
|
-
overflow-y: auto;
|
127
|
-
}
|
128
|
-
&.advanced-table-max-height-xxxl {
|
129
|
-
max-height: 1920px;
|
130
|
-
overflow-y: auto;
|
131
|
-
}
|
132
|
-
|
133
97
|
// Icons
|
134
98
|
.button-icon {
|
135
99
|
display: flex;
|
@@ -215,7 +179,7 @@
|
|
215
179
|
}
|
216
180
|
|
217
181
|
// Responsive Styles
|
218
|
-
@media only screen and (max-width: $screen-xl-min) {
|
182
|
+
@media only screen and (max-width: $screen-xl-min) {
|
219
183
|
&[class*="advanced-table-responsive-scroll"] {
|
220
184
|
border-radius: 4px;
|
221
185
|
box-shadow: 1px 0 0 0px $border_light,
|
@@ -251,27 +215,7 @@
|
|
251
215
|
.bg-white td:first-child {
|
252
216
|
background-color: $white;
|
253
217
|
}
|
254
|
-
|
255
|
-
border-right-width: 0px;
|
256
|
-
border-left-width: 0px;
|
257
|
-
position: sticky;
|
258
|
-
top: 0;
|
259
|
-
left: 0;
|
260
|
-
border-radius: unset;
|
261
|
-
}
|
262
|
-
.checkbox-cell {
|
263
|
-
display: table-cell !important;
|
264
|
-
}
|
265
|
-
.sticky-header {
|
266
|
-
thead {
|
267
|
-
th:first-child {
|
268
|
-
box-shadow: 1px 0 10px -2px $border_light !important;
|
269
|
-
}
|
270
|
-
}
|
271
|
-
.pb_advanced_table_header {
|
272
|
-
box-shadow: none !important;
|
273
|
-
}
|
274
|
-
}
|
218
|
+
|
275
219
|
}
|
276
220
|
}
|
277
221
|
@media only screen and (min-width: $screen-xl-min) {
|
@@ -359,15 +303,7 @@
|
|
359
303
|
.bg-white td:first-child {
|
360
304
|
background-color: $bg_dark_card;
|
361
305
|
}
|
362
|
-
.sticky-header {
|
363
|
-
thead {
|
364
|
-
th:first-child {
|
365
|
-
background: $bg_dark;
|
366
|
-
box-shadow: 1px 0 10px -2px $border_dark !important;
|
367
|
-
}
|
368
|
-
}
|
369
|
-
}
|
370
306
|
}
|
371
307
|
}
|
372
308
|
}
|
373
|
-
}
|
309
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { useState, useEffect, useCallback
|
1
|
+
import React, { useState, useEffect, useCallback } from "react"
|
2
2
|
import classnames from "classnames"
|
3
3
|
|
4
4
|
import { GenericObject } from "../types"
|
@@ -27,7 +27,6 @@ import FlexItem from "../pb_flex/_flex_item"
|
|
27
27
|
import AdvancedTableContext from "./Context/AdvancedTableContext"
|
28
28
|
|
29
29
|
import { updateExpandAndCollapseState } from "./Utilities/ExpansionControlHelpers"
|
30
|
-
import { showActionBar, hideActionBar } from "./Utilities/ActionBarAnimationHelper"
|
31
30
|
|
32
31
|
import { CustomCell } from "./Components/CustomCell"
|
33
32
|
import { TableHeader } from "./SubKits/TableHeader"
|
@@ -49,7 +48,6 @@ type AdvancedTableProps = {
|
|
49
48
|
initialLoadingRowsCount?: number
|
50
49
|
inlineRowLoading?: boolean
|
51
50
|
loading?: boolean | string
|
52
|
-
maxHeight?: "auto" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl"
|
53
51
|
onRowToggleClick?: (arg: Row<GenericObject>) => void
|
54
52
|
onToggleExpansionClick?: (arg: Row<GenericObject>) => void
|
55
53
|
pagination?: boolean,
|
@@ -81,7 +79,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
81
79
|
initialLoadingRowsCount = 10,
|
82
80
|
inlineRowLoading = false,
|
83
81
|
loading,
|
84
|
-
maxHeight,
|
85
82
|
onRowToggleClick,
|
86
83
|
onToggleExpansionClick,
|
87
84
|
pagination = false,
|
@@ -116,7 +113,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
116
113
|
const [rowSelection, setRowSelection] = useState<RowSelectionState>({})
|
117
114
|
|
118
115
|
//Create cells for columns, with customization for first column
|
119
|
-
const createCellFunction = (cellAccessors: string[], customRenderer?: (row: Row<GenericObject>, value: any) => JSX.Element,
|
116
|
+
const createCellFunction = (cellAccessors: string[], customRenderer?: (row: Row<GenericObject>, value: any) => JSX.Element, index?: number) => {
|
120
117
|
const columnCells = ({
|
121
118
|
row,
|
122
119
|
getValue,
|
@@ -126,7 +123,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
126
123
|
}) => {
|
127
124
|
const rowData = row.original
|
128
125
|
|
129
|
-
if (
|
126
|
+
if (index === 0) {
|
130
127
|
switch (row.depth) {
|
131
128
|
case 0: {
|
132
129
|
return (
|
@@ -164,16 +161,15 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
164
161
|
return columnCells
|
165
162
|
}
|
166
163
|
|
167
|
-
const buildColumns = (columnDefinitions: GenericObject[]
|
164
|
+
const buildColumns = (columnDefinitions: GenericObject[]): any => {
|
168
165
|
return (
|
169
166
|
columnDefinitions &&
|
170
167
|
columnDefinitions.map((column, index) => {
|
171
|
-
const isFirstColumn = isRoot && index === 0;
|
172
168
|
//Checking to see if grouped column or not
|
173
169
|
if (column.columns && column.columns.length > 0) {
|
174
170
|
return {
|
175
171
|
header: column.label || "",
|
176
|
-
columns: buildColumns(column.columns
|
172
|
+
columns: buildColumns(column.columns),
|
177
173
|
};
|
178
174
|
} else {
|
179
175
|
// Define the base column structure
|
@@ -187,7 +183,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
187
183
|
columnStructure.cell = createCellFunction(
|
188
184
|
column.cellAccessors,
|
189
185
|
column.customRenderer,
|
190
|
-
|
186
|
+
index
|
191
187
|
);
|
192
188
|
}
|
193
189
|
|
@@ -292,7 +288,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
292
288
|
const classes = classnames(
|
293
289
|
buildCss("pb_advanced_table"),
|
294
290
|
`advanced-table-responsive-${responsive}`,
|
295
|
-
maxHeight ? `advanced-table-max-height-${maxHeight}` : '', // max height as kit prop not global prop to control overflow-y
|
296
291
|
globalProps(props),
|
297
292
|
className
|
298
293
|
)
|
@@ -300,20 +295,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
300
295
|
const onPageChange = (page: number) => {
|
301
296
|
table.setPageIndex(page - 1)
|
302
297
|
}
|
303
|
-
//When to show the actions bar as a whole
|
304
|
-
const isActionBarVisible = selectableRows && showActionsBar && selectedRowsLength > 0
|
305
|
-
|
306
|
-
//Ref and useEffect for animating the actions bar
|
307
|
-
const cardRef = useRef(null);
|
308
|
-
useEffect(() => {
|
309
|
-
if (cardRef.current) {
|
310
|
-
if (isActionBarVisible) {
|
311
|
-
showActionBar(cardRef.current);
|
312
|
-
} else {
|
313
|
-
hideActionBar(cardRef.current);
|
314
|
-
}
|
315
|
-
}
|
316
|
-
}, [isActionBarVisible]);
|
317
298
|
|
318
299
|
return (
|
319
300
|
<div {...ariaProps}
|
@@ -330,7 +311,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
330
311
|
expandedControl,
|
331
312
|
handleExpandOrCollapse,
|
332
313
|
inlineRowLoading,
|
333
|
-
isActionBarVisible,
|
334
314
|
loading,
|
335
315
|
responsive,
|
336
316
|
setExpanded,
|
@@ -353,24 +333,27 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
353
333
|
total={table.getPageCount()}
|
354
334
|
/>
|
355
335
|
}
|
356
|
-
|
357
|
-
|
358
|
-
className=
|
359
|
-
|
360
|
-
padding={`${isActionBarVisible ? "xs" : "none"}`}
|
361
|
-
>
|
362
|
-
<Flex alignItems="center"
|
363
|
-
justify="between"
|
364
|
-
>
|
365
|
-
<Caption color="light"
|
366
|
-
paddingLeft="xs"
|
367
|
-
size="xs"
|
336
|
+
{
|
337
|
+
selectableRows && showActionsBar && (
|
338
|
+
<Card className="row-selection-actions-card"
|
339
|
+
padding="xs"
|
368
340
|
>
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
341
|
+
<Flex alignItems="center"
|
342
|
+
justify="between"
|
343
|
+
>
|
344
|
+
<Caption color="light"
|
345
|
+
paddingLeft="xs"
|
346
|
+
size="xs"
|
347
|
+
>
|
348
|
+
{selectedRowsLength} Selected
|
349
|
+
</Caption>
|
350
|
+
<FlexItem>
|
351
|
+
{actions}
|
352
|
+
</FlexItem>
|
353
|
+
</Flex>
|
354
|
+
</Card>
|
355
|
+
)
|
356
|
+
}
|
374
357
|
<Table
|
375
358
|
className={`${loading ? "content-loading" : ""}`}
|
376
359
|
dark={dark}
|
@@ -17,21 +17,14 @@ module Playbook
|
|
17
17
|
default: "scroll"
|
18
18
|
prop :table_props, type: Playbook::Props::HashProp,
|
19
19
|
default: {}
|
20
|
-
prop :max_height, type: Playbook::Props::Enum,
|
21
|
-
values: %w[auto xs sm md lg xl xxl xxxl],
|
22
|
-
default: "auto"
|
23
20
|
|
24
21
|
def classname
|
25
|
-
generate_classname("pb_advanced_table", responsive_classname,
|
22
|
+
generate_classname("pb_advanced_table", responsive_classname, separator: " ")
|
26
23
|
end
|
27
24
|
|
28
25
|
def responsive_classname
|
29
26
|
responsive == "scroll" ? "advanced-table-responsive-scroll" : "advanced-table-responsive-none"
|
30
27
|
end
|
31
|
-
|
32
|
-
def max_height_classname
|
33
|
-
max_height.present? ? "advanced-table-max-height-#{max_height}" : ""
|
34
|
-
end
|
35
28
|
end
|
36
29
|
end
|
37
30
|
end
|
@@ -30,4 +30,4 @@
|
|
30
30
|
}
|
31
31
|
] %>
|
32
32
|
|
33
|
-
<%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions,
|
33
|
+
<%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, table_props: { container: false, sticky: true }}) %>
|
@@ -1,3 +1 @@
|
|
1
|
-
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) under the hood which comes with
|
2
|
-
|
3
|
-
This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table#table-props-sticky-header) doc example below.
|
1
|
+
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) under the hood which comes with it's own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `table_props` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table).
|
@@ -1,3 +1 @@
|
|
1
|
-
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with
|
2
|
-
|
3
|
-
This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props-sticky-header) doc example below.
|
1
|
+
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with it's own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `tableProps` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table/react).
|
@@ -5,7 +5,6 @@ examples:
|
|
5
5
|
- advanced_table_beta_subrow_headers: SubRow Headers
|
6
6
|
- advanced_table_collapsible_trail_rails: Collapsible Trail
|
7
7
|
- advanced_table_table_props: Table Props
|
8
|
-
- advanced_table_table_props_sticky_header: Table Props Sticky Header
|
9
8
|
- advanced_table_beta_sort: Enable Sorting
|
10
9
|
- advanced_table_responsive: Responsive Tables
|
11
10
|
- advanced_table_custom_cell_rails: Custom Components for Cells
|
@@ -23,7 +22,6 @@ examples:
|
|
23
22
|
- advanced_table_collapsible_trail: Collapsible Trail
|
24
23
|
- advanced_table_table_options: Table Options
|
25
24
|
- advanced_table_table_props: Table Props
|
26
|
-
- advanced_table_table_props_sticky_header: Table Props Sticky Header
|
27
25
|
- advanced_table_inline_row_loading: Inline Row Loading
|
28
26
|
- advanced_table_responsive: Responsive Tables
|
29
27
|
- advanced_table_custom_cell: Custom Components for Cells
|
@@ -31,7 +29,6 @@ examples:
|
|
31
29
|
- advanced_table_pagination_with_props: Pagination Props
|
32
30
|
- advanced_table_column_headers: Multi-Header Columns
|
33
31
|
- advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
|
34
|
-
- advanced_table_column_headers_custom_cell: Multi-Header Columns with Custom Cells
|
35
32
|
# - advanced_table_no_subrows: Table with No Subrows
|
36
33
|
- advanced_table_selectable_rows: Selectable Rows
|
37
34
|
- advanced_table_selectable_rows_no_subrows: Selectable Rows (No Subrows)
|
@@ -18,6 +18,4 @@ export { default as AdvancedTableSelectableRows } from './_advanced_table_select
|
|
18
18
|
export { default as AdvancedTableSelectableRowsNoSubrows } from './_advanced_table_selectable_rows_no_subrows.jsx'
|
19
19
|
export { default as AdvancedTableNoSubrows } from './_advanced_table_no_subrows.jsx'
|
20
20
|
export { default as AdvancedTableSelectableRowsHeader } from './_advanced_table_selectable_rows_header.jsx'
|
21
|
-
export { default as AdvancedTableSelectableRowsActions } from './_advanced_table_selectable_rows_actions.jsx'
|
22
|
-
export { default as AdvancedTableTablePropsStickyHeader } from './_advanced_table_table_props_sticky_header.jsx'
|
23
|
-
export { default as AdvancedTableColumnHeadersCustomCell } from './_advanced_table_column_headers_custom_cell.jsx'
|
21
|
+
export { default as AdvancedTableSelectableRowsActions } from './_advanced_table_selectable_rows_actions.jsx'
|
@@ -133,18 +133,15 @@ export default class PbAdvancedTable extends PbEnhancedElement {
|
|
133
133
|
if (!elements.length) return;
|
134
134
|
|
135
135
|
const isVisible = elements[0].classList.contains("is-visible");
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
row.classList.toggle("bg-silver", !isVisible);
|
143
|
-
row.classList.toggle("bg-white", isVisible);
|
136
|
+
if (isVisible) {
|
137
|
+
this.hideElement(elements);
|
138
|
+
this.displayDownArrow();
|
139
|
+
} else {
|
140
|
+
this.showElement(elements);
|
141
|
+
this.displayUpArrow();
|
144
142
|
}
|
145
143
|
}
|
146
144
|
|
147
|
-
|
148
145
|
displayDownArrow() {
|
149
146
|
this.element.querySelector(DOWN_ARROW_SELECTOR).style.display =
|
150
147
|
"inline-block";
|
@@ -14,13 +14,10 @@
|
|
14
14
|
<div style="padding-left: <%= depth * 1.25 %>em">
|
15
15
|
<%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
|
16
16
|
<% if index.zero? && object.row[:children].present? %>
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<%= pb_rails("icon", props: { id: "advanced-table_open_icon", icon: "circle-play", cursor: "pointer" }) %>
|
22
|
-
<%= pb_rails("icon", props: { id: "advanced-table_close_icon", display: "none", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
|
23
|
-
</button>
|
17
|
+
<button id="<%= "#{object.id}_#{object.row.object_id}" %>" class="gray-icon expand-toggle-icon" data-advanced-table="true" >
|
18
|
+
<%= pb_rails("icon", props: { id: "advanced-table_open_icon", icon: "circle-play", cursor: "pointer" }) %>
|
19
|
+
<%= pb_rails("icon", props: { id: "advanced-table_close_icon", display: "none", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
|
20
|
+
</button>
|
24
21
|
<% end %>
|
25
22
|
<%= pb_rails("flex/flex_item", props:{padding_left: index.zero? && object.row[:children].present? ? "none" : "xs"}) do %>
|
26
23
|
<% if column[:custom_renderer].present? %>
|
@@ -45,4 +42,4 @@
|
|
45
42
|
<% end %>
|
46
43
|
<% end %>
|
47
44
|
<% end %>
|
48
|
-
<% end %>
|
45
|
+
<% end %>
|
@@ -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
|
+
|