playbook_ui 14.11.1 → 14.12.0.pre.alpha.PBNTR456fixedconftoastrailsautoclose5728
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 +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +18 -2
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +27 -5
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +17 -2
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +23 -1
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +29 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +61 -4
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +3 -3
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +5 -1
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_loading.md → _advanced_table_loading_react.md} +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.jsx +50 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb +38 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx +60 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.md +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx +78 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.jsx +53 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.jsx +52 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.md +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json +42 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_with_id.json +299 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +8 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +6 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +17 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +15 -11
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +14 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +9 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +9 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +5 -0
- data/app/pb_kits/playbook/pb_button/button.html.erb +2 -3
- data/app/pb_kits/playbook/pb_card/card.html.erb +21 -2
- data/app/pb_kits/playbook/pb_card/card.rb +7 -0
- data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +1 -6
- data/app/pb_kits/playbook/pb_collapsible/collapsible.html.erb +3 -1
- data/app/pb_kits/playbook/pb_collapsible/collapsible.rb +3 -0
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +3 -0
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +92 -0
- data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +64 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +21 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +45 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +1 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +8 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +24 -16
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +2 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames.html.erb +13 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames_rails.md +3 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md +7 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb +3 -9
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb +38 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md +3 -0
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_drawer/_drawer.scss +145 -183
- data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +158 -268
- data/app/pb_kits/playbook/pb_drawer/context.ts +11 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx +38 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +3 -45
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +0 -1
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +9 -16
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +44 -19
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +21 -3
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +16 -21
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +2 -19
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_drawer/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +5 -5
- data/app/pb_kits/playbook/pb_drawer/hooks/useBreakpoint.tsx +60 -0
- data/app/pb_kits/playbook/pb_drawer/hooks/useDrawerAnimation.tsx +21 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +7 -12
- data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +9 -14
- data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +6 -11
- data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb +8 -14
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +74 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +3 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +24 -13
- data/app/pb_kits/playbook/pb_icon_button/_icon_button.scss +78 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +3 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +16 -0
- data/app/pb_kits/playbook/pb_icon_button/icon_button.rb +22 -0
- data/app/pb_kits/playbook/pb_list/item.html.erb +30 -8
- data/app/pb_kits/playbook/pb_list/item.rb +7 -0
- data/app/pb_kits/playbook/pb_list/list.html.erb +31 -11
- data/app/pb_kits/playbook/pb_list/list.rb +4 -0
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +6 -1
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +4 -0
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +1 -0
- data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +30 -12
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.html.erb +15 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx +24 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.md +1 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +3 -0
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +20 -1
- data/app/pb_kits/playbook/pb_radio/_radio.scss +12 -8
- data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.jsx +8 -3
- data/app/pb_kits/playbook/pb_select/_select.scss +3 -5
- data/app/pb_kits/playbook/pb_select/_select.tsx +5 -1
- data/app/pb_kits/playbook/pb_select/select.html.erb +2 -2
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +9 -1
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx +4 -1
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx +4 -1
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list.html.erb +17 -3
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list.rb +3 -0
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +11 -4
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.rb +3 -0
- data/app/pb_kits/playbook/pb_table/_table.tsx +2 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.html.erb +74 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_rails.md +3 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +2 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.html.erb +74 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_rails.md +3 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.html.erb +47 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_rails.md +2 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +12 -8
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.md +0 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +3 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.html.erb +80 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +6 -0
- data/app/pb_kits/playbook/pb_table/index.ts +187 -88
- data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +12 -0
- data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +6 -5
- data/app/pb_kits/playbook/pb_table/table.html.erb +1 -1
- data/app/pb_kits/playbook/pb_table/table.rb +17 -2
- data/app/pb_kits/playbook/pb_table/table_row.html.erb +20 -1
- data/app/pb_kits/playbook/pb_table/table_row.rb +5 -0
- data/app/pb_kits/playbook/pb_table/utilities/addDataTitle.ts +22 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +46 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask_rails.md +3 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_text_input/index.js +103 -0
- data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +4 -0
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +33 -3
- data/app/pb_kits/playbook/pb_timeline/_timeline.scss +30 -30
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +3 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +3 -2
- data/app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.tsx +12 -4
- data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +5 -1
- data/app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.tsx +8 -3
- data/app/pb_kits/playbook/pb_typeahead/components/MenuList.tsx +6 -1
- data/app/pb_kits/playbook/pb_typeahead/components/Option.tsx +21 -6
- data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.tsx +13 -6
- data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx +7 -3
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb +19 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.jsx +27 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +4 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_custom_options.jsx +5 -5
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/dist/chunks/_typeahead-BIhRQo8Q.js +36 -0
- data/dist/chunks/_weekday_stacked-VKMYuo6-.js +45 -0
- data/dist/chunks/lazysizes-B7xYodB-.js +1 -0
- data/dist/chunks/{lib-B7sgJtGS.js → lib-kMuhBuU7.js} +2 -2
- data/dist/chunks/{pb_form_validation-C5Cc0-1v.js → pb_form_validation-DBJ0wZuS.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +12 -0
- 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/pb_forms_global_props_helper.rb +136 -0
- data/lib/playbook/pb_forms_helper.rb +13 -4
- data/lib/playbook/version.rb +2 -2
- metadata +88 -11
- data/dist/chunks/_typeahead-C2iCBqxQ.js +0 -36
- data/dist/chunks/_weekday_stacked-E-5KcEkc.js +0 -45
- data/dist/chunks/lazysizes-DHz07jlL.js +0 -1
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_table_props.md → _advanced_table_table_props_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/{_fixed_confirmation_toast_auto_close.md → _fixed_confirmation_toast_auto_close_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible.md → _table_with_collapsible_react.md} +0 -0
@@ -7,8 +7,7 @@
|
|
7
7
|
<%= pb_rails("draggable", props: {initial_items: initial_items}) do %>
|
8
8
|
<%= pb_rails("draggable/draggable_container") do %>
|
9
9
|
<% initial_items.each do |item| %>
|
10
|
-
|
11
|
-
<%= pb_rails("card", props: {highlight: {position: "side", color:"primary"}, margin_bottom: "xs", padding: "xs"}) do %>
|
10
|
+
<%= pb_rails("card", props: {highlight: {position: "side", color:"primary"}, margin_bottom: "xs", padding: "xs", drag_id: item[:id], draggable_item: true }) do %>
|
12
11
|
<%= pb_rails("flex", props:{align_items: "stretch", flex_direction:"column"}) do %>
|
13
12
|
<%= pb_rails("flex", props:{gap: "xs"}) do %>
|
14
13
|
<%= pb_rails("title", props: { text: item[:name], tag: "h4", size: 4 }) %>
|
@@ -32,7 +31,6 @@
|
|
32
31
|
<% end %>
|
33
32
|
<% end %>
|
34
33
|
<% end %>
|
35
|
-
<% end %>
|
36
34
|
<% end %>
|
37
35
|
<% end %>
|
38
36
|
<% end %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
For a simplified version of the Draggable API for the Card kit, you can do the following:
|
2
|
+
|
3
|
+
Use the `draggable` kit and manage state as shown.
|
4
|
+
|
5
|
+
`draggable/draggable_container` kit creates the container within which the cards can be dragged and dropped.
|
6
|
+
|
7
|
+
The Card kit is optimized to work with the draggable kit. To enable drag, use the `draggable_item` and `drag_id` props on the Card kit as shown. An additional optional boolean prop (set to true by default) of `drag_handle` is also available to show the drag handle icon.
|
@@ -6,14 +6,8 @@
|
|
6
6
|
|
7
7
|
] %>
|
8
8
|
|
9
|
-
<%= pb_rails("
|
10
|
-
|
11
|
-
<%= pb_rails("list", props:
|
12
|
-
<% initial_items.each do |item| %>
|
13
|
-
<%= pb_rails("draggable/draggable_item", props:{drag_id: item[:id]}) do %>
|
14
|
-
<%= pb_rails("list/item") do %><%= item[:name] %><% end %>
|
15
|
-
<% end %>
|
16
|
-
<% end %>
|
17
|
-
<% end %>
|
9
|
+
<%= pb_rails("list", props: { enable_drag: true, items: initial_items }) do %>
|
10
|
+
<% initial_items.each do |item| %>
|
11
|
+
<%= pb_rails("list/item", props:{drag_id: item[:id]}) do %><%= item[:name] %><% end %>
|
18
12
|
<% end %>
|
19
13
|
<% end %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
For a simplified version of the Draggable API for the List kit, you can do the following:
|
2
|
+
|
3
|
+
The List kit is optimized to work with the draggable kit. To enable drag, use the `enable_drag` prop on List kit with an array of the included items AND `drag_id` prop on ListItems. You will also need to include the `items` prop containing your array of listed items for the Draggable API.
|
4
|
+
|
5
|
+
An additional optional boolean prop (set to true by default) of `drag_handle` is also available on ListItem kit to show the drag handle icon.
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<%= pb_rails("selectable_list",
|
2
|
+
props: {
|
3
|
+
enable_drag: true,
|
4
|
+
variant: "radio",
|
5
|
+
items: [
|
6
|
+
{ drag_id: "41",
|
7
|
+
text: "Task 1",
|
8
|
+
input_options: {
|
9
|
+
value: "1",
|
10
|
+
name: "radio-name",
|
11
|
+
}
|
12
|
+
},
|
13
|
+
{ drag_id: "42",
|
14
|
+
text: "Task 2",
|
15
|
+
checked: true,
|
16
|
+
input_options: {
|
17
|
+
value: "2",
|
18
|
+
name: "radio-name",
|
19
|
+
}
|
20
|
+
},
|
21
|
+
{ drag_id: "43",
|
22
|
+
text: "Task 3",
|
23
|
+
input_options: {
|
24
|
+
value: "3",
|
25
|
+
name: "radio-name",
|
26
|
+
}
|
27
|
+
},
|
28
|
+
{ drag_id: "44",
|
29
|
+
text: "Task 4",
|
30
|
+
input_options: {
|
31
|
+
value: "4",
|
32
|
+
name: "radio-name",
|
33
|
+
}
|
34
|
+
}
|
35
|
+
]
|
36
|
+
}
|
37
|
+
)
|
38
|
+
%>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
For a simplified version of the Draggable API for the SelectableList kit, you can do the following:
|
2
|
+
|
3
|
+
The SelectableList kit is optimized to work with the draggable kit. To enable drag, use the `enable_drag` prop on SelectableList kit AND `drag_id` prop within the SelectableList kit prop. An additional optional boolean prop (set to true by default) of `drag_handle` is also available on SelectableList kit to show the drag handle icon.
|
@@ -13,10 +13,9 @@ $small: 200px;
|
|
13
13
|
$medium: 250px;
|
14
14
|
$large: 300px;
|
15
15
|
$xlarge: 365px;
|
16
|
-
$animation-duration:
|
16
|
+
$animation-duration: .25s;
|
17
17
|
$z-index: $z_7;
|
18
18
|
|
19
|
-
// Drawer animations
|
20
19
|
@keyframes modalFadeInLeft {
|
21
20
|
from {
|
22
21
|
transform: translateX(-100%);
|
@@ -71,6 +70,62 @@ $z-index: $z_7;
|
|
71
70
|
}
|
72
71
|
}
|
73
72
|
|
73
|
+
@keyframes overlayFade {
|
74
|
+
from {
|
75
|
+
opacity: 0;
|
76
|
+
transform: translateY(0);
|
77
|
+
}
|
78
|
+
to {
|
79
|
+
opacity: 1;
|
80
|
+
transform: translateY(0);
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
@keyframes overlayFadeOut {
|
85
|
+
from {
|
86
|
+
opacity: 1;
|
87
|
+
}
|
88
|
+
to {
|
89
|
+
opacity: 0;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
@keyframes modalFadeDownIn {
|
94
|
+
from {
|
95
|
+
transform: translateY(-100%);
|
96
|
+
}
|
97
|
+
to {
|
98
|
+
transform: translateY(0);
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
@keyframes modalFadeDownOut {
|
103
|
+
from {
|
104
|
+
transform: translateY(0);
|
105
|
+
}
|
106
|
+
to {
|
107
|
+
transform: translateY(-100%);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
@keyframes modalFadeUpIn {
|
112
|
+
from {
|
113
|
+
transform: translateY(100%);
|
114
|
+
}
|
115
|
+
to {
|
116
|
+
transform: translateY(0);
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
@keyframes modalFadeUpOut {
|
121
|
+
from {
|
122
|
+
transform: translateY(0);
|
123
|
+
}
|
124
|
+
to {
|
125
|
+
transform: translateY(100%);
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
74
129
|
body.PBDrawer__Body--open {
|
75
130
|
transition: margin-left $animation-duration ease-in, margin-right $animation-duration ease-in;
|
76
131
|
}
|
@@ -94,34 +149,53 @@ body.PBDrawer__Body--close {
|
|
94
149
|
|
95
150
|
// Drawer Styles
|
96
151
|
.pb_drawer {
|
97
|
-
|
98
|
-
|
152
|
+
background-color: $white;
|
153
|
+
z-index: $z-index;
|
154
|
+
border: 0;
|
155
|
+
height: 100%;
|
156
|
+
overflow: auto;
|
157
|
+
animation-duration: $animation-duration;
|
158
|
+
outline: none;
|
159
|
+
|
160
|
+
&.pb_drawer_within_element {
|
161
|
+
position: relative;
|
162
|
+
width: 100%;
|
163
|
+
display: block;
|
164
|
+
background-color: $white;
|
165
|
+
overflow: hidden;
|
166
|
+
transition: height $animation-duration ease-in-out;
|
167
|
+
height: var(--drawer-height);
|
168
|
+
z-index: 1;
|
169
|
+
|
170
|
+
&.pb_drawer_before_close {
|
171
|
+
height: 0;
|
172
|
+
}
|
173
|
+
|
174
|
+
&::before {
|
175
|
+
content: '';
|
176
|
+
position: absolute;
|
177
|
+
top: 0;
|
178
|
+
left: 0;
|
179
|
+
right: 0;
|
180
|
+
bottom: 0;
|
181
|
+
background-color: inherit;
|
182
|
+
z-index: -1;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
.toggle-content.is-visible {
|
187
|
+
display: block;
|
188
|
+
height: auto;
|
189
|
+
}
|
99
190
|
|
100
191
|
.drawer {
|
101
192
|
position: sticky;
|
102
193
|
will-change: transform;
|
103
|
-
backface-visibility: hidden;
|
104
194
|
top: 0;
|
105
195
|
background-color: $white;
|
106
196
|
z-index: $z_9;
|
107
197
|
}
|
108
198
|
|
109
|
-
// @include pb_card;
|
110
|
-
background-color: $white;
|
111
|
-
border: 0;
|
112
|
-
box-shadow: $shadow_deepest; // border class here
|
113
|
-
max-height: calc(100vh - #{$gutter * 2});
|
114
|
-
max-width: calc(100vw - #{$gutter * 2});
|
115
|
-
overflow: auto;
|
116
|
-
animation-duration: $animation-duration;
|
117
|
-
outline: none;
|
118
|
-
|
119
|
-
// General _before_close styles
|
120
|
-
&[class*="_before_close"] {
|
121
|
-
animation-name: modalFadeOut;
|
122
|
-
animation-duration: $animation-duration;
|
123
|
-
}
|
124
|
-
|
125
199
|
&[class*="_left"] {
|
126
200
|
animation-name: modalFadeInLeft;
|
127
201
|
}
|
@@ -129,17 +203,40 @@ body.PBDrawer__Body--close {
|
|
129
203
|
&[class*="_left"][class*="_before_close"] {
|
130
204
|
animation-name: modalFadeOutLeft;
|
131
205
|
animation-duration: $animation-duration;
|
206
|
+
transform: translateX(-100%);
|
132
207
|
}
|
133
208
|
|
134
209
|
&[class*="_right"] {
|
135
210
|
animation-name: modalFadeInRight;
|
211
|
+
justify-content: flex-end;
|
136
212
|
}
|
137
213
|
|
138
214
|
&[class*="_right"][class*="_before_close"] {
|
139
215
|
animation-name: modalFadeOutRight;
|
140
216
|
animation-duration: $animation-duration;
|
217
|
+
transform: translateX(100%);
|
218
|
+
}
|
219
|
+
|
220
|
+
&[class*="_bottom"] {
|
221
|
+
animation: none;
|
222
|
+
transform: none;
|
223
|
+
}
|
224
|
+
|
225
|
+
&[class*="_bottom"][class*="_before_close"] {
|
226
|
+
animation: none;
|
227
|
+
transform: none;
|
141
228
|
}
|
142
229
|
|
230
|
+
&[class*="_top"] {
|
231
|
+
animation-name: modalFadeUpIn;
|
232
|
+
}
|
233
|
+
|
234
|
+
&[class*="_top"][class*="_before_close"] {
|
235
|
+
animation-name: modalFadeUpOut;
|
236
|
+
animation-duration: $animation-duration;
|
237
|
+
}
|
238
|
+
|
239
|
+
|
143
240
|
&[class*="_xs_"] {
|
144
241
|
width: $xsmall;
|
145
242
|
max-width: $xsmall;
|
@@ -165,23 +262,21 @@ body.PBDrawer__Body--close {
|
|
165
262
|
max-width: $xlarge;
|
166
263
|
}
|
167
264
|
|
168
|
-
&
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
&_after_open {
|
265
|
+
&[class*="_full_"] {
|
266
|
+
width: 100%;
|
267
|
+
max-width: 100%;
|
173
268
|
}
|
174
269
|
|
175
|
-
&.
|
270
|
+
&.drawer_border-full {
|
176
271
|
box-shadow: none;
|
177
272
|
border: 2px solid #f3f7fb;
|
178
273
|
}
|
179
274
|
|
180
|
-
&.
|
275
|
+
&.drawer_border-right {
|
181
276
|
border-right: 2px solid #f3f7fb;
|
182
277
|
}
|
183
278
|
|
184
|
-
&.
|
279
|
+
&.drawer_border-left {
|
185
280
|
border-left: 2px solid #f3f7fb;
|
186
281
|
}
|
187
282
|
|
@@ -200,78 +295,27 @@ body.PBDrawer__Body--close {
|
|
200
295
|
right: 0;
|
201
296
|
bottom: 0;
|
202
297
|
display: flex;
|
203
|
-
align-items: center;
|
204
|
-
justify-content: center;
|
205
298
|
background-color: rgba($bg_dark, $opacity_4);
|
206
299
|
z-index: $z-index;
|
207
|
-
|
208
|
-
animation
|
300
|
+
opacity: 0;
|
301
|
+
animation: overlayFade $animation-duration ease-in-out forwards;
|
302
|
+
|
303
|
+
&[class*="_left"]{
|
304
|
+
justify-content: flex-start;
|
305
|
+
}
|
209
306
|
|
210
|
-
&
|
307
|
+
&[class*="_center"]{
|
308
|
+
justify-content: center;
|
211
309
|
}
|
212
|
-
|
213
|
-
|
214
|
-
|
310
|
+
|
311
|
+
&[class*="_right"]{
|
312
|
+
justify-content: flex-end;
|
215
313
|
}
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
&[class*="_center"]{
|
222
|
-
justify-content: center;
|
223
|
-
}
|
224
|
-
|
225
|
-
&[class*="_right"]{
|
226
|
-
justify-content: flex-end;
|
227
|
-
}
|
228
|
-
|
229
|
-
.pb_drawer {
|
230
|
-
height: 100%;
|
231
|
-
max-height: 100%;
|
232
|
-
max-width: none;
|
233
|
-
// This empty div only has height when drawer is full height
|
234
|
-
// Fix for drawer body content disappearing behind sticky footer
|
235
|
-
.drawer-pseudo-footer {
|
236
|
-
height: $space_xl * 2;
|
237
|
-
}
|
238
|
-
.drawer_footer {
|
239
|
-
position: fixed;
|
240
|
-
bottom: 0;
|
241
|
-
background-color: $white;
|
242
|
-
max-width: 100%;
|
243
|
-
}
|
244
|
-
&[class*="_xs_"] {
|
245
|
-
width: $xsmall;
|
246
|
-
.dialog_footer {
|
247
|
-
width: $xsmall;
|
248
|
-
}
|
249
|
-
}
|
250
|
-
&[class*="_sm_"] {
|
251
|
-
width: $small;
|
252
|
-
.dialog_footer {
|
253
|
-
width: $small;
|
254
|
-
}
|
255
|
-
}
|
256
|
-
&[class*="_md_"] {
|
257
|
-
width: $medium;
|
258
|
-
.dialog_footer {
|
259
|
-
width: $medium;
|
260
|
-
}
|
261
|
-
}
|
262
|
-
&[class*="_lg_"] {
|
263
|
-
width: $large;
|
264
|
-
.dialog_footer {
|
265
|
-
width: $large;
|
266
|
-
}
|
267
|
-
}
|
268
|
-
&[class*="_xl_"] {
|
269
|
-
width: $xlarge;
|
270
|
-
.dialog_footer {
|
271
|
-
width: $xlarge;
|
272
|
-
}
|
273
|
-
}
|
274
|
-
}
|
314
|
+
|
315
|
+
&_before_close {
|
316
|
+
animation: overlayFadeOut $animation-duration ease-in-out forwards;
|
317
|
+
opacity: 0;
|
318
|
+
// height: 0;
|
275
319
|
}
|
276
320
|
}
|
277
321
|
|
@@ -281,99 +325,17 @@ body.PBDrawer__Body--close {
|
|
281
325
|
left: 0;
|
282
326
|
right: 0;
|
283
327
|
bottom: 0;
|
284
|
-
display: flex;
|
285
|
-
align-items: center;
|
286
|
-
justify-content: center;
|
287
328
|
z-index: $z-index;
|
288
|
-
|
289
|
-
|
290
|
-
overflow: none; /* Ensure body remains scrollable */
|
291
|
-
pointer-events: none; /* Allow interaction inside the drawer itself */
|
292
|
-
|
293
|
-
body.PBDrawer--open {
|
294
|
-
overflow: none; /* Ensure body remains scrollable */
|
295
|
-
pointer-events: none; /* Allow interaction inside the drawer itself */
|
296
|
-
}
|
329
|
+
opacity: 1;
|
330
|
+
pointer-events: none;
|
297
331
|
|
298
|
-
&_after_open {
|
299
|
-
overflow: none; /* Ensure body remains scrollable */
|
300
|
-
pointer-events: none; /* Allow interaction inside the drawer itself */
|
301
|
-
}
|
302
332
|
&_before_close {
|
303
|
-
|
304
|
-
animation-duration: $animation-duration;
|
305
|
-
}
|
306
|
-
&[class*="full_height"] {
|
307
|
-
&[class*="_left"]{
|
308
|
-
justify-content: flex-start;
|
309
|
-
}
|
310
|
-
|
311
|
-
&[class*="_center"]{
|
312
|
-
justify-content: center;
|
313
|
-
}
|
314
|
-
|
315
|
-
&[class*="_right"]{
|
316
|
-
justify-content: flex-end;
|
317
|
-
}
|
318
|
-
|
319
|
-
.pb_drawer {
|
320
|
-
height: 100%;
|
321
|
-
max-height: 100%;
|
322
|
-
max-width: none;
|
323
|
-
// This empty div only has height when drawer is full height
|
324
|
-
// Fix for drawer body content disappearing behind sticky footer
|
325
|
-
.drawer-pseudo-footer {
|
326
|
-
height: $space_xl * 2;
|
327
|
-
}
|
328
|
-
.drawer_footer {
|
329
|
-
position: fixed;
|
330
|
-
bottom: 0;
|
331
|
-
background-color: $white;
|
332
|
-
max-width: 100%;
|
333
|
-
}
|
334
|
-
&[class*="_xs_"] {
|
335
|
-
width: $xsmall;
|
336
|
-
.dialog_footer {
|
337
|
-
width: $xsmall;
|
338
|
-
}
|
339
|
-
}
|
340
|
-
&[class*="_sm_"] {
|
341
|
-
width: $small;
|
342
|
-
.dialog_footer {
|
343
|
-
width: $small;
|
344
|
-
}
|
345
|
-
}
|
346
|
-
&[class*="_md_"] {
|
347
|
-
width: $medium;
|
348
|
-
.dialog_footer {
|
349
|
-
width: $medium;
|
350
|
-
}
|
351
|
-
}
|
352
|
-
&[class*="_lg_"] {
|
353
|
-
width: $large;
|
354
|
-
.dialog_footer {
|
355
|
-
width: $large;
|
356
|
-
}
|
357
|
-
}
|
358
|
-
&[class*="_xl_"] {
|
359
|
-
width: $xlarge;
|
360
|
-
.dialog_footer {
|
361
|
-
width: $xlarge;
|
362
|
-
}
|
363
|
-
}
|
364
|
-
}
|
333
|
+
height: 0;
|
365
334
|
}
|
366
335
|
}
|
367
336
|
|
368
|
-
[class*="drawer_body"] {
|
369
|
-
padding: $space_sm;
|
370
|
-
}
|
371
|
-
|
372
|
-
[class*="drawer_header"] {
|
373
|
-
padding: $space_sm;
|
374
|
-
}
|
375
337
|
|
376
|
-
|
377
|
-
|
338
|
+
&.pb_drawer_before_close {
|
339
|
+
transform: translateX(-100%);
|
378
340
|
}
|
379
341
|
}
|