playbook_ui 14.25.0.pre.alpha.PLAY2419dialogaccessibility9839 → 14.25.0.pre.alpha.PLAY2419dialogaccessibility10271
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/_advanced_table.scss +6 -6
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +60 -65
- data/app/pb_kits/playbook/pb_avatar/avatar.test.js +1 -1
- data/app/pb_kits/playbook/pb_background/_background.scss +3 -3
- data/app/pb_kits/playbook/pb_badge/_badge.scss +135 -29
- data/app/pb_kits/playbook/pb_body/_body.scss +108 -35
- data/app/pb_kits/playbook/pb_body/_body_mixins.scss +1 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +17 -30
- data/app/pb_kits/playbook/pb_button/_button.scss +39 -31
- data/app/pb_kits/playbook/pb_button/_button.tsx +12 -12
- data/app/pb_kits/playbook/pb_button/_button_mixins.scss +1 -1
- data/app/pb_kits/playbook/pb_button/button.rb +11 -18
- data/app/pb_kits/playbook/pb_button/button.test.js +3 -3
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.scss +82 -73
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_dark.scss +32 -33
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss +1 -1
- data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.test.js +2 -2
- data/app/pb_kits/playbook/pb_caption/_caption.scss +100 -17
- data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -8
- data/app/pb_kits/playbook/pb_card/_card.scss +116 -79
- data/app/pb_kits/playbook/pb_card/_card.tsx +26 -11
- data/app/pb_kits/playbook/pb_card/_card_mixin.scss +1 -1
- data/app/pb_kits/playbook/pb_card/card.rb +8 -7
- data/app/pb_kits/playbook/pb_card/card_header.rb +6 -2
- data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +1 -1
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +11 -2
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +7 -7
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.test.js +1 -1
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +1 -1
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.scss +4 -4
- data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_currency/_currency.scss +124 -39
- data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.scss +16 -6
- data/app/pb_kits/playbook/pb_date/_date.scss +16 -18
- data/app/pb_kits/playbook/pb_date/date.test.js +506 -0
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +1 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +12 -12
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +2 -2
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_time_selection_styles.scss +6 -5
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +29 -23
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +1 -1
- data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.scss +1 -1
- data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.test.js +2 -2
- data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.scss +66 -26
- data/app/pb_kits/playbook/pb_date_stacked/date_stacked.rb +1 -1
- data/app/pb_kits/playbook/pb_date_stacked/date_stacked.test.js +2 -2
- data/app/pb_kits/playbook/pb_date_time/_date_time.scss +8 -15
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +6 -7
- data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.scss +17 -14
- data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js +1 -1
- data/app/pb_kits/playbook/pb_detail/_detail.scss +86 -21
- data/app/pb_kits/playbook/pb_dialog/_dialog.scss +330 -123
- data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.html.erb +16 -2
- data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.scss +10 -7
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +1 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/index.js +3 -3
- data/app/pb_kits/playbook/pb_empty_state/_empty_state.scss +4 -4
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +20 -9
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +1 -1
- data/app/pb_kits/playbook/pb_filter/_filter.scss +8 -8
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +65 -29
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +1 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_props_swift.md +3 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +1 -1
- data/app/pb_kits/playbook/pb_flex/_flex.scss +106 -100
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +32 -25
- data/app/pb_kits/playbook/pb_flex/_flex_item.scss +146 -51
- data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +19 -8
- data/app/pb_kits/playbook/pb_flex/flex.rb +16 -16
- data/app/pb_kits/playbook/pb_flex/flex_item.rb +6 -6
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +1 -1
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +381 -344
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.test.jsx +4 -4
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +8 -7
- data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +9 -2
- data/app/pb_kits/playbook/pb_gauge/_gauge.scss +5 -5
- data/app/pb_kits/playbook/pb_hashtag/_hashtag.scss +1 -1
- data/app/pb_kits/playbook/pb_highlight/_highlight.scss +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js +2 -2
- data/app/pb_kits/playbook/pb_icon_button/_icon_button.scss +4 -4
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +40 -39
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.rb +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_icon_value/_icon_value.scss +16 -15
- data/app/pb_kits/playbook/pb_image/_image.scss +41 -36
- data/app/pb_kits/playbook/pb_label_pill/_label_pill.scss +1 -1
- data/app/pb_kits/playbook/pb_label_value/_label_value.scss +3 -2
- data/app/pb_kits/playbook/pb_label_value/label_value.test.js +2 -2
- data/app/pb_kits/playbook/pb_layout/_layout.scss +336 -305
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +14 -11
- data/app/pb_kits/playbook/pb_layout/item.rb +1 -7
- data/app/pb_kits/playbook/pb_layout/layout.rb +16 -25
- data/app/pb_kits/playbook/pb_layout/layout.test.js +3 -3
- data/app/pb_kits/playbook/pb_legend/_legend.scss +66 -16
- data/app/pb_kits/playbook/pb_legend/legend.test.js +1 -1
- data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +4 -4
- data/app/pb_kits/playbook/pb_lightbox/lightbox.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_link/_link.scss +113 -19
- data/app/pb_kits/playbook/pb_list/_list.scss +1 -1
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.scss +13 -11
- data/app/pb_kits/playbook/pb_map/_map.scss +1 -1
- data/app/pb_kits/playbook/pb_map/docs/_map_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_map/docs/_map_with_custom_button.jsx +1 -1
- data/app/pb_kits/playbook/pb_map/docs/_map_with_plugin.jsx +1 -1
- data/app/pb_kits/playbook/pb_message/_message.scss +21 -16
- data/app/pb_kits/playbook/pb_message/_message.tsx +1 -0
- data/app/pb_kits/playbook/pb_message/_message_mixins.scss +5 -12
- data/app/pb_kits/playbook/pb_message/message.html.erb +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss +6 -3
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +16 -15
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +1 -1
- data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +1 -1
- data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +1 -1
- data/app/pb_kits/playbook/pb_online_status/_online_status.scss +19 -15
- data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -1
- data/app/pb_kits/playbook/pb_online_status/online_status.rb +5 -4
- data/app/pb_kits/playbook/pb_online_status/online_status.test.js +2 -2
- data/app/pb_kits/playbook/pb_overlay/_overlay.scss +1 -1
- data/app/pb_kits/playbook/pb_overlay/overlay.rb +1 -1
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +5 -2
- data/app/pb_kits/playbook/pb_person/_person.scss +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +1 -1
- data/app/pb_kits/playbook/pb_pill/_pill.scss +23 -21
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.scss +15 -13
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.scss +108 -33
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +1 -1
- data/app/pb_kits/playbook/pb_radio/_radio.scss +71 -52
- data/app/pb_kits/playbook/pb_radio/_radio.tsx +1 -1
- data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +0 -3
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +4 -4
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +81 -70
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +9 -1
- data/app/pb_kits/playbook/pb_section_separator/_section_separator_mixin.scss +1 -1
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.jsx +3 -1
- data/app/pb_kits/playbook/pb_section_separator/section_separator.rb +7 -1
- data/app/pb_kits/playbook/pb_select/_select.scss +4 -4
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +6 -2
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.scss +17 -8
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.scss +39 -29
- data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +2 -0
- data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.scss +8 -11
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list.test.js +2 -3
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +2 -2
- data/app/pb_kits/playbook/pb_source/_source.scss +8 -8
- data/app/pb_kits/playbook/pb_star_rating/_star_rating.scss +1 -1
- data/app/pb_kits/playbook/pb_star_rating/star_rating.test.js +1 -1
- data/app/pb_kits/playbook/pb_stat_value/_stat_value.scss +2 -2
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +5 -5
- data/app/pb_kits/playbook/pb_textarea/_textarea.scss +6 -6
- data/app/pb_kits/playbook/pb_time/_time.scss +44 -17
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +44 -23
- data/app/pb_kits/playbook/pb_time_range_inline/time_range_inline.rb +1 -1
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.scss +5 -8
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.scss +16 -10
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +1 -4
- data/app/pb_kits/playbook/pb_timestamp/timestamp.rb +1 -1
- data/app/pb_kits/playbook/pb_timestamp/timestamp.test.js +2 -2
- data/app/pb_kits/playbook/pb_title/_title.scss +44 -39
- data/app/pb_kits/playbook/pb_title/_title.tsx +17 -8
- data/app/pb_kits/playbook/pb_title/_title_mixin.scss +2 -2
- data/app/pb_kits/playbook/pb_title/title.rb +20 -10
- data/app/pb_kits/playbook/pb_title/title.test.js +4 -4
- data/app/pb_kits/playbook/pb_title_count/_title_count.scss +19 -8
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.scss +10 -11
- data/app/pb_kits/playbook/pb_toggle/_toggle.scss +4 -1
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.scss +3 -4
- data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +3 -3
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.html.erb +1 -22
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb +2 -2
- data/app/pb_kits/playbook/pb_user/_user.scss +83 -33
- data/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +14 -7
- data/app/pb_kits/playbook/pb_user/user.test.js +1 -1
- data/app/pb_kits/playbook/pb_user_badge/_user_badge.scss +23 -8
- data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.scss +10 -10
- data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.test.jsx +3 -3
- data/dist/chunks/{_line_graph-CSl21lBH.js → _line_graph-pjRvO-Xb.js} +1 -1
- data/dist/chunks/{_typeahead-FgFzDIIE.js → _typeahead-CZo22jaG.js} +1 -1
- data/dist/chunks/{_weekday_stacked-BEF1onVQ.js → _weekday_stacked-CXuGHKcc.js} +2 -2
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +0 -6
- 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 +1 -1
- metadata +6 -34
- data/app/pb_kits/playbook/pb_drawer/_close_icon.tsx +0 -25
- data/app/pb_kits/playbook/pb_drawer/_drawer.scss +0 -381
- data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +0 -231
- data/app/pb_kits/playbook/pb_drawer/_drawer_context.tsx +0 -3
- data/app/pb_kits/playbook/pb_drawer/context.ts +0 -11
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.html.erb +0 -8
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx +0 -41
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.html.erb +0 -33
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +0 -78
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb +0 -3
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +0 -26
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.html.erb +0 -20
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +0 -59
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.html.erb +0 -24
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +0 -61
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +0 -24
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.html.erb +0 -21
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +0 -54
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.md +0 -1
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.html.erb +0 -49
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +0 -99
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +0 -20
- data/app/pb_kits/playbook/pb_drawer/docs/index.js +0 -7
- data/app/pb_kits/playbook/pb_drawer/drawer.html.erb +0 -20
- data/app/pb_kits/playbook/pb_drawer/drawer.rb +0 -56
- data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +0 -81
- data/app/pb_kits/playbook/pb_drawer/hooks/useBreakpoint.tsx +0 -60
- data/app/pb_kits/playbook/pb_drawer/hooks/useDrawerAnimation.tsx +0 -21
- data/app/pb_kits/playbook/pb_drawer/index.js +0 -257
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.25.0.pre.alpha.
|
4
|
+
version: 14.25.0.pre.alpha.PLAY2419dialogaccessibility10271
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-08
|
12
|
+
date: 2025-09-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -972,6 +972,7 @@ files:
|
|
972
972
|
- app/pb_kits/playbook/pb_date/_date.tsx
|
973
973
|
- app/pb_kits/playbook/pb_date/date.html.erb
|
974
974
|
- app/pb_kits/playbook/pb_date/date.rb
|
975
|
+
- app/pb_kits/playbook/pb_date/date.test.js
|
975
976
|
- app/pb_kits/playbook/pb_date/docs/_date_alignment.html.erb
|
976
977
|
- app/pb_kits/playbook/pb_date/docs/_date_alignment.jsx
|
977
978
|
- app/pb_kits/playbook/pb_date/docs/_date_alignment_swift.md
|
@@ -1336,35 +1337,6 @@ files:
|
|
1336
1337
|
- app/pb_kits/playbook/pb_draggable/index.js
|
1337
1338
|
- app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx
|
1338
1339
|
- app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx
|
1339
|
-
- app/pb_kits/playbook/pb_drawer/_close_icon.tsx
|
1340
|
-
- app/pb_kits/playbook/pb_drawer/_drawer.scss
|
1341
|
-
- app/pb_kits/playbook/pb_drawer/_drawer.tsx
|
1342
|
-
- app/pb_kits/playbook/pb_drawer/_drawer_context.tsx
|
1343
|
-
- app/pb_kits/playbook/pb_drawer/context.ts
|
1344
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.html.erb
|
1345
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx
|
1346
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.html.erb
|
1347
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx
|
1348
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb
|
1349
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx
|
1350
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_default.html.erb
|
1351
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx
|
1352
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.html.erb
|
1353
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx
|
1354
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md
|
1355
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.html.erb
|
1356
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx
|
1357
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.md
|
1358
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.html.erb
|
1359
|
-
- app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx
|
1360
|
-
- app/pb_kits/playbook/pb_drawer/docs/example.yml
|
1361
|
-
- app/pb_kits/playbook/pb_drawer/docs/index.js
|
1362
|
-
- app/pb_kits/playbook/pb_drawer/drawer.html.erb
|
1363
|
-
- app/pb_kits/playbook/pb_drawer/drawer.rb
|
1364
|
-
- app/pb_kits/playbook/pb_drawer/drawer.test.jsx
|
1365
|
-
- app/pb_kits/playbook/pb_drawer/hooks/useBreakpoint.tsx
|
1366
|
-
- app/pb_kits/playbook/pb_drawer/hooks/useDrawerAnimation.tsx
|
1367
|
-
- app/pb_kits/playbook/pb_drawer/index.js
|
1368
1340
|
- app/pb_kits/playbook/pb_dropdown/_dropdown.scss
|
1369
1341
|
- app/pb_kits/playbook/pb_dropdown/_dropdown.tsx
|
1370
1342
|
- app/pb_kits/playbook/pb_dropdown/_dropdown_mixin.scss
|
@@ -3648,9 +3620,9 @@ files:
|
|
3648
3620
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3649
3621
|
- app/pb_kits/playbook/utilities/text.ts
|
3650
3622
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3651
|
-
- dist/chunks/_line_graph-
|
3652
|
-
- dist/chunks/_typeahead-
|
3653
|
-
- dist/chunks/_weekday_stacked-
|
3623
|
+
- dist/chunks/_line_graph-pjRvO-Xb.js
|
3624
|
+
- dist/chunks/_typeahead-CZo22jaG.js
|
3625
|
+
- dist/chunks/_weekday_stacked-CXuGHKcc.js
|
3654
3626
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3655
3627
|
- dist/chunks/lib-CY5ZPzic.js
|
3656
3628
|
- dist/chunks/pb_form_validation-D3b0JKHH.js
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import Icon from '../pb_icon/_icon'
|
3
|
-
|
4
|
-
import { getAllIcons } from "../utilities/icons/allicons"
|
5
|
-
|
6
|
-
type CloseIconProps = {
|
7
|
-
onClose: () => void,
|
8
|
-
}
|
9
|
-
|
10
|
-
export const CloseIcon = (props: CloseIconProps): React.ReactElement => {
|
11
|
-
const { onClose } = props
|
12
|
-
const timesIcon = getAllIcons()["times"]
|
13
|
-
return (
|
14
|
-
<div
|
15
|
-
className="pb_dialog_close_icon"
|
16
|
-
onClick={onClose}
|
17
|
-
>
|
18
|
-
<Icon
|
19
|
-
className="svg-inline--fa"
|
20
|
-
customIcon={timesIcon.icon as unknown as { [key: string]: SVGElement }}
|
21
|
-
fixedWidth
|
22
|
-
/>
|
23
|
-
</div>
|
24
|
-
)
|
25
|
-
}
|
@@ -1,381 +0,0 @@
|
|
1
|
-
@import "../tokens/positioning";
|
2
|
-
@import "../tokens/colors";
|
3
|
-
@import "../pb_card/card_mixin";
|
4
|
-
@import "../tokens/shadows";
|
5
|
-
@import "../tokens/border_radius";
|
6
|
-
@import "../tokens/spacing";
|
7
|
-
@import "../tokens/animation-curves";
|
8
|
-
@import "../tokens/positioning";
|
9
|
-
|
10
|
-
$gutter: $space_lg;
|
11
|
-
$xsmall: 64px;
|
12
|
-
$small: 200px;
|
13
|
-
$medium: 250px;
|
14
|
-
$large: 300px;
|
15
|
-
$xlarge: 365px;
|
16
|
-
$animation-duration: .25s;
|
17
|
-
$z-index: $z_7;
|
18
|
-
|
19
|
-
@keyframes modalFadeInLeft {
|
20
|
-
from {
|
21
|
-
transform: translateX(-100%);
|
22
|
-
}
|
23
|
-
to {
|
24
|
-
transform: translateX(0);
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
@keyframes modalFadeOutLeft {
|
29
|
-
from {
|
30
|
-
transform: translateX(0);
|
31
|
-
}
|
32
|
-
to {
|
33
|
-
transform: translateX(-100%);
|
34
|
-
}
|
35
|
-
}
|
36
|
-
|
37
|
-
@keyframes modalFadeInRight {
|
38
|
-
from {
|
39
|
-
transform: translateX(100%);
|
40
|
-
}
|
41
|
-
to {
|
42
|
-
transform: translateX(0);
|
43
|
-
}
|
44
|
-
}
|
45
|
-
|
46
|
-
@keyframes modalFadeOutRight {
|
47
|
-
from {
|
48
|
-
transform: translateX(0);
|
49
|
-
}
|
50
|
-
to {
|
51
|
-
transform: translateX(100%);
|
52
|
-
}
|
53
|
-
}
|
54
|
-
|
55
|
-
@keyframes modalFadeIn {
|
56
|
-
from {
|
57
|
-
transform: translateY(-100%);
|
58
|
-
}
|
59
|
-
to {
|
60
|
-
transform: translateY(0);
|
61
|
-
}
|
62
|
-
}
|
63
|
-
|
64
|
-
@keyframes modalFadeOut {
|
65
|
-
from {
|
66
|
-
transform: translateY(0);
|
67
|
-
}
|
68
|
-
to {
|
69
|
-
transform: translateY(-100%);
|
70
|
-
}
|
71
|
-
}
|
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
|
-
|
129
|
-
body.PBDrawer__Body--open {
|
130
|
-
transition: margin-left $animation-duration ease-in, margin-right $animation-duration ease-in;
|
131
|
-
}
|
132
|
-
|
133
|
-
body.PBDrawer__Body--close {
|
134
|
-
transition: margin-left $animation-duration ease-out, margin-right $animation-duration ease-out;
|
135
|
-
}
|
136
|
-
|
137
|
-
.pb_drawer_lg_left .pb_drawer {
|
138
|
-
transform: translateX(-100%);
|
139
|
-
}
|
140
|
-
|
141
|
-
.pb_drawer_lg_right .pb_drawer {
|
142
|
-
transform: translateX(100%);
|
143
|
-
}
|
144
|
-
|
145
|
-
.pb_drawer.pb_drawer_after_open {
|
146
|
-
pointer-events: auto;
|
147
|
-
transform: translate3d(0, 0, 0);
|
148
|
-
}
|
149
|
-
|
150
|
-
// Drawer Styles
|
151
|
-
.pb_drawer {
|
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_rails {
|
161
|
-
position: relative;
|
162
|
-
width: 100%;
|
163
|
-
display: block;
|
164
|
-
background-color: $white;
|
165
|
-
overflow: hidden;
|
166
|
-
|
167
|
-
// Use max-height for a smooth accordion-like animation
|
168
|
-
max-height: 0;
|
169
|
-
transition: max-height $animation-duration ease-in-out;
|
170
|
-
z-index: 1;
|
171
|
-
|
172
|
-
&.open {
|
173
|
-
max-height: 1000px;
|
174
|
-
}
|
175
|
-
|
176
|
-
&::before {
|
177
|
-
content: '';
|
178
|
-
position: absolute;
|
179
|
-
top: 0;
|
180
|
-
left: 0;
|
181
|
-
right: 0;
|
182
|
-
bottom: 0;
|
183
|
-
background-color: inherit;
|
184
|
-
z-index: -1;
|
185
|
-
}
|
186
|
-
}
|
187
|
-
|
188
|
-
&.pb_drawer_within_element {
|
189
|
-
position: relative;
|
190
|
-
width: 100%;
|
191
|
-
display: block;
|
192
|
-
background-color: $white;
|
193
|
-
overflow: hidden;
|
194
|
-
transition: height $animation-duration ease-in-out;
|
195
|
-
height: var(--drawer-height);
|
196
|
-
z-index: 1;
|
197
|
-
|
198
|
-
&.pb_drawer_before_close {
|
199
|
-
height: 0;
|
200
|
-
}
|
201
|
-
|
202
|
-
&::before {
|
203
|
-
content: '';
|
204
|
-
position: absolute;
|
205
|
-
top: 0;
|
206
|
-
left: 0;
|
207
|
-
right: 0;
|
208
|
-
bottom: 0;
|
209
|
-
background-color: inherit;
|
210
|
-
z-index: -1;
|
211
|
-
}
|
212
|
-
}
|
213
|
-
|
214
|
-
.toggle-content.is-visible {
|
215
|
-
display: block;
|
216
|
-
height: auto;
|
217
|
-
}
|
218
|
-
|
219
|
-
.drawer {
|
220
|
-
position: sticky;
|
221
|
-
will-change: transform;
|
222
|
-
top: 0;
|
223
|
-
background-color: $white;
|
224
|
-
z-index: $z_9;
|
225
|
-
}
|
226
|
-
|
227
|
-
&[class*="_left"] {
|
228
|
-
animation-name: modalFadeInLeft;
|
229
|
-
}
|
230
|
-
|
231
|
-
&[class*="_left"][class*="_before_close"] {
|
232
|
-
animation-name: modalFadeOutLeft;
|
233
|
-
animation-duration: $animation-duration;
|
234
|
-
transform: translateX(-100%);
|
235
|
-
}
|
236
|
-
|
237
|
-
&[class*="_right"] {
|
238
|
-
animation-name: modalFadeInRight;
|
239
|
-
justify-content: flex-end;
|
240
|
-
}
|
241
|
-
|
242
|
-
&[class*="_right"][class*="_before_close"] {
|
243
|
-
animation-name: modalFadeOutRight;
|
244
|
-
animation-duration: $animation-duration;
|
245
|
-
transform: translateX(100%);
|
246
|
-
}
|
247
|
-
|
248
|
-
&[class*="_bottom"] {
|
249
|
-
animation: none;
|
250
|
-
transform: none;
|
251
|
-
}
|
252
|
-
|
253
|
-
&[class*="_bottom"][class*="_before_close"] {
|
254
|
-
animation: none;
|
255
|
-
transform: none;
|
256
|
-
}
|
257
|
-
|
258
|
-
&[class*="_top"] {
|
259
|
-
animation-name: modalFadeUpIn;
|
260
|
-
}
|
261
|
-
|
262
|
-
&[class*="_top"][class*="_before_close"] {
|
263
|
-
animation-name: modalFadeUpOut;
|
264
|
-
animation-duration: $animation-duration;
|
265
|
-
}
|
266
|
-
|
267
|
-
|
268
|
-
&[class*="_xs_"] {
|
269
|
-
width: $xsmall;
|
270
|
-
max-width: $xsmall;
|
271
|
-
}
|
272
|
-
|
273
|
-
&[class*="_sm_"] {
|
274
|
-
width: $small;
|
275
|
-
max-width: $small;
|
276
|
-
}
|
277
|
-
|
278
|
-
&[class*="_md_"] {
|
279
|
-
width: $medium;
|
280
|
-
max-width: $medium;
|
281
|
-
}
|
282
|
-
|
283
|
-
&[class*="_lg_"] {
|
284
|
-
width: $large;
|
285
|
-
max-width: $large;
|
286
|
-
}
|
287
|
-
|
288
|
-
&[class*="_xl_"] {
|
289
|
-
width: $xlarge;
|
290
|
-
max-width: $xlarge;
|
291
|
-
}
|
292
|
-
|
293
|
-
&[class*="_full_"] {
|
294
|
-
width: 100%;
|
295
|
-
max-width: 100%;
|
296
|
-
}
|
297
|
-
|
298
|
-
&.drawer_border-full {
|
299
|
-
box-shadow: none;
|
300
|
-
border: 2px solid #f3f7fb;
|
301
|
-
}
|
302
|
-
|
303
|
-
&.drawer_border-right {
|
304
|
-
border-right: 2px solid #f3f7fb;
|
305
|
-
}
|
306
|
-
|
307
|
-
&.drawer_border-left {
|
308
|
-
border-left: 2px solid #f3f7fb;
|
309
|
-
}
|
310
|
-
|
311
|
-
&.no-background {
|
312
|
-
background-color: transparent;
|
313
|
-
}
|
314
|
-
|
315
|
-
&_close_icon {
|
316
|
-
cursor: pointer;
|
317
|
-
}
|
318
|
-
|
319
|
-
&_overlay {
|
320
|
-
position: fixed;
|
321
|
-
top: 0;
|
322
|
-
left: 0;
|
323
|
-
right: 0;
|
324
|
-
bottom: 0;
|
325
|
-
display: flex;
|
326
|
-
background-color: rgba($bg_dark, $opacity_4);
|
327
|
-
z-index: $z-index;
|
328
|
-
animation: overlayFade $animation-duration ease-in-out forwards;
|
329
|
-
|
330
|
-
&[class*="_left"]{
|
331
|
-
justify-content: flex-start;
|
332
|
-
}
|
333
|
-
|
334
|
-
&[class*="_center"]{
|
335
|
-
justify-content: center;
|
336
|
-
}
|
337
|
-
|
338
|
-
&[class*="_right"]{
|
339
|
-
justify-content: flex-end;
|
340
|
-
}
|
341
|
-
|
342
|
-
&_before_close {
|
343
|
-
animation: overlayFadeOut $animation-duration ease-in-out forwards;
|
344
|
-
opacity: 0;
|
345
|
-
// height: 0;
|
346
|
-
}
|
347
|
-
}
|
348
|
-
|
349
|
-
&_no_overlay {
|
350
|
-
position: fixed;
|
351
|
-
top: 0;
|
352
|
-
left: 0;
|
353
|
-
right: 0;
|
354
|
-
bottom: 0;
|
355
|
-
display: flex;
|
356
|
-
z-index: $z-index;
|
357
|
-
opacity: 1;
|
358
|
-
pointer-events: none;
|
359
|
-
|
360
|
-
&[class*="_right"]{
|
361
|
-
justify-content: flex-end;
|
362
|
-
}
|
363
|
-
|
364
|
-
&[class*="_left"]{
|
365
|
-
justify-content: flex-start;
|
366
|
-
}
|
367
|
-
|
368
|
-
&[class*="_center"]{
|
369
|
-
justify-content: center;
|
370
|
-
}
|
371
|
-
|
372
|
-
&_before_close {
|
373
|
-
height: 0;
|
374
|
-
}
|
375
|
-
}
|
376
|
-
|
377
|
-
|
378
|
-
&.pb_drawer_before_close {
|
379
|
-
transform: translateX(-100%);
|
380
|
-
}
|
381
|
-
}
|
@@ -1,231 +0,0 @@
|
|
1
|
-
import React, { useState, useEffect, useRef } from "react"
|
2
|
-
import classnames from "classnames"
|
3
|
-
|
4
|
-
import {
|
5
|
-
buildAriaProps,
|
6
|
-
buildCss,
|
7
|
-
buildDataProps,
|
8
|
-
buildHtmlProps,
|
9
|
-
} from "../utilities/props"
|
10
|
-
import { globalProps, globalInlineProps } from "../utilities/globalProps"
|
11
|
-
import { DrawerContext } from "./context"
|
12
|
-
import { useBreakpoint } from "./hooks/useBreakpoint"
|
13
|
-
|
14
|
-
type DrawerProps = {
|
15
|
-
aria?: { [key: string]: string }
|
16
|
-
behavior?: "floating" | "push"
|
17
|
-
border?: "full" | "none" | "right" | "left"
|
18
|
-
breakpoint?: "none" | "xs" | "sm" | "md" | "lg" | "xl"
|
19
|
-
children: React.ReactNode | React.ReactNode[] | string
|
20
|
-
className?: string
|
21
|
-
data?: { [key: string]: string }
|
22
|
-
htmlOptions?: { [key: string]: string | number | boolean | (() => void) }
|
23
|
-
id?: string
|
24
|
-
triggerId?: string
|
25
|
-
onClose?: () => void
|
26
|
-
opened: boolean
|
27
|
-
overlay: boolean
|
28
|
-
placement?: "left" | "right" | "top" | "bottom"
|
29
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | "full"
|
30
|
-
text?: string
|
31
|
-
withinElement?: boolean
|
32
|
-
}
|
33
|
-
|
34
|
-
const Drawer = (props: DrawerProps): React.ReactElement | null => {
|
35
|
-
const {
|
36
|
-
aria = {},
|
37
|
-
behavior = "floating",
|
38
|
-
border = "none",
|
39
|
-
breakpoint = "none",
|
40
|
-
className,
|
41
|
-
data = {},
|
42
|
-
htmlOptions = {},
|
43
|
-
id,
|
44
|
-
size = "md",
|
45
|
-
children,
|
46
|
-
triggerId,
|
47
|
-
opened,
|
48
|
-
onClose,
|
49
|
-
overlay = true,
|
50
|
-
placement = "left",
|
51
|
-
withinElement = false,
|
52
|
-
} = props
|
53
|
-
|
54
|
-
const drawerRef = useRef<HTMLDivElement>(null)
|
55
|
-
const [menuButtonOpened, setMenuButtonOpened] = useState(false)
|
56
|
-
const [shouldRender, setShouldRender] = useState(false)
|
57
|
-
const [isAnimating, setIsAnimating] = useState(false)
|
58
|
-
|
59
|
-
const { isOpenBreakpointOpen, isUserClosed, setIsUserClosed } = useBreakpoint(
|
60
|
-
{
|
61
|
-
breakpoint: breakpoint,
|
62
|
-
triggerId,
|
63
|
-
}
|
64
|
-
)
|
65
|
-
|
66
|
-
const modalIsOpened =
|
67
|
-
(isOpenBreakpointOpen && !isUserClosed) || menuButtonOpened || opened
|
68
|
-
|
69
|
-
useEffect(() => {
|
70
|
-
if (withinElement) return;
|
71
|
-
|
72
|
-
const sizeMap: { [key: string]: string } = {
|
73
|
-
xl: "365px",
|
74
|
-
lg: "300px",
|
75
|
-
md: "250px",
|
76
|
-
sm: "200px",
|
77
|
-
xs: "64px",
|
78
|
-
full: "100%",
|
79
|
-
};
|
80
|
-
const body = document.querySelector("body");
|
81
|
-
if (modalIsOpened && behavior === "push" && body) {
|
82
|
-
if (placement === "left") {
|
83
|
-
body.style.cssText = `margin-left: ${sizeMap[size]} !important; margin-right: '' !important;`;
|
84
|
-
} else if (placement === "right") {
|
85
|
-
body.style.cssText = `margin-right: ${sizeMap[size]} !important; margin-left: '' !important;`;
|
86
|
-
}
|
87
|
-
|
88
|
-
body.classList.add("PBDrawer__Body--open");
|
89
|
-
} else if (body) {
|
90
|
-
if (body.classList.contains("PBDrawer__Body--open")) {
|
91
|
-
body.classList.add("PBDrawer__Body--close");
|
92
|
-
}
|
93
|
-
body.style.cssText = "";
|
94
|
-
body.classList.remove("PBDrawer__Body--open");
|
95
|
-
}
|
96
|
-
}, [modalIsOpened]);
|
97
|
-
|
98
|
-
// Helper functions
|
99
|
-
const updateDrawerHeight = () => {
|
100
|
-
if (drawerRef.current) {
|
101
|
-
const height = drawerRef.current.scrollHeight;
|
102
|
-
drawerRef.current.style.setProperty('--drawer-height', `${height}px`);
|
103
|
-
}
|
104
|
-
}
|
105
|
-
|
106
|
-
useEffect(() => {
|
107
|
-
if (modalIsOpened) {
|
108
|
-
setShouldRender(true)
|
109
|
-
if (withinElement) {
|
110
|
-
const timer = setTimeout(() => {
|
111
|
-
updateDrawerHeight()
|
112
|
-
setIsAnimating(true)
|
113
|
-
}, 10)
|
114
|
-
return () => clearTimeout(timer)
|
115
|
-
} else {
|
116
|
-
setIsAnimating(true)
|
117
|
-
}
|
118
|
-
} else {
|
119
|
-
setIsAnimating(false)
|
120
|
-
const timer = setTimeout(() => {
|
121
|
-
setShouldRender(false)
|
122
|
-
}, 250)
|
123
|
-
return () => clearTimeout(timer)
|
124
|
-
}
|
125
|
-
}, [modalIsOpened])
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
const handleMenuButtonClick = () => {
|
130
|
-
if (modalIsOpened) {
|
131
|
-
setMenuButtonOpened(false)
|
132
|
-
setIsUserClosed(true)
|
133
|
-
} else {
|
134
|
-
setMenuButtonOpened(true)
|
135
|
-
setIsUserClosed(false)
|
136
|
-
}
|
137
|
-
}
|
138
|
-
|
139
|
-
// Setup menu button click handler
|
140
|
-
useEffect(() => {
|
141
|
-
if (!triggerId) return;
|
142
|
-
|
143
|
-
const menuButton = document.getElementById(triggerId)
|
144
|
-
if (menuButton) {
|
145
|
-
menuButton.addEventListener("click", handleMenuButtonClick)
|
146
|
-
return () => menuButton.removeEventListener("click", handleMenuButtonClick)
|
147
|
-
}
|
148
|
-
}, [modalIsOpened])
|
149
|
-
|
150
|
-
const ariaProps = buildAriaProps(aria)
|
151
|
-
const dataProps = buildDataProps(data)
|
152
|
-
const htmlProps = buildHtmlProps(htmlOptions)
|
153
|
-
const dynamicInlineProps = globalInlineProps(props)
|
154
|
-
|
155
|
-
const drawerClasses = classnames(
|
156
|
-
"pb_drawer",
|
157
|
-
buildCss("pb_drawer", size as string, placement as string),
|
158
|
-
{
|
159
|
-
"drawer_border-full": border === "full",
|
160
|
-
"drawer_border-right": border === "right",
|
161
|
-
"drawer_border-left": border === "left",
|
162
|
-
pb_drawer_within_element: withinElement,
|
163
|
-
pb_drawer_after_open: isAnimating,
|
164
|
-
pb_drawer_before_close: !isAnimating && shouldRender,
|
165
|
-
},
|
166
|
-
withinElement ? "shadow_none" : "shadow_deepest",
|
167
|
-
globalProps(props),
|
168
|
-
className
|
169
|
-
)
|
170
|
-
|
171
|
-
const overlayClasses = classnames(
|
172
|
-
`pb_drawer${overlay ? "_overlay" : "_no_overlay"}`,
|
173
|
-
`drawer_content_${placement}`,
|
174
|
-
!overlay && "no-background",
|
175
|
-
{
|
176
|
-
pb_drawer_overlay_after_open: isAnimating,
|
177
|
-
pb_drawer_overlay_before_close: !isAnimating && shouldRender,
|
178
|
-
}
|
179
|
-
)
|
180
|
-
|
181
|
-
const api = {
|
182
|
-
onClose: () => {
|
183
|
-
if (triggerId) {
|
184
|
-
setMenuButtonOpened(false)
|
185
|
-
}
|
186
|
-
setIsUserClosed(true)
|
187
|
-
if (onClose) {
|
188
|
-
onClose()
|
189
|
-
}
|
190
|
-
},
|
191
|
-
}
|
192
|
-
|
193
|
-
const drawerContent = (
|
194
|
-
<div
|
195
|
-
className={drawerClasses}
|
196
|
-
onClick={(e) => e.stopPropagation()}
|
197
|
-
ref={drawerRef}
|
198
|
-
>
|
199
|
-
{children}
|
200
|
-
</div>
|
201
|
-
)
|
202
|
-
|
203
|
-
// Step 5: Only render when shouldRender is true
|
204
|
-
if (!shouldRender) return null
|
205
|
-
|
206
|
-
return (
|
207
|
-
<DrawerContext.Provider value={api}>
|
208
|
-
{withinElement ? (
|
209
|
-
drawerContent
|
210
|
-
) : (
|
211
|
-
<div
|
212
|
-
{...ariaProps}
|
213
|
-
{...dataProps}
|
214
|
-
{...htmlProps}
|
215
|
-
className={classnames(buildCss("pb_drawer_wrapper"), className)}
|
216
|
-
style={dynamicInlineProps}
|
217
|
-
>
|
218
|
-
<div
|
219
|
-
className={overlayClasses}
|
220
|
-
id={id}
|
221
|
-
onClick={overlay ? api.onClose : undefined}
|
222
|
-
>
|
223
|
-
{drawerContent}
|
224
|
-
</div>
|
225
|
-
</div>
|
226
|
-
)}
|
227
|
-
</DrawerContext.Provider>
|
228
|
-
)
|
229
|
-
}
|
230
|
-
|
231
|
-
export default Drawer
|