playbook_ui 14.12.0.pre.rc.12 → 14.13.0.pre.alpha.PBNTR457formtimezoneselect6219
Sign up to get free protection for your applications and to get access to all the features.
- 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 +11 -4
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/ActionBarAnimationHelper.ts +26 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +74 -10
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +43 -26
- 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 +11 -2
- 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_column_headers_custom_cell.jsx +75 -0
- 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_responsive.html.erb +38 -0
- 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 +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx +55 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/index.js +9 -6
- 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 +10 -7
- 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 +14 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +11 -7
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +6 -7
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +9 -3
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +6 -2
- data/app/pb_kits/playbook/pb_bar_graph/BarGraphStyles.scss +58 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +64 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_button/button.rb +1 -1
- 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.tsx +17 -8
- data/app/pb_kits/playbook/pb_checkbox/checkbox.test.js +16 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.jsx +69 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.md +1 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +4 -0
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +92 -0
- data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +15 -0
- data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +28 -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.html.erb +2 -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.html.erb +5 -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_copy_button/index.js +47 -0
- data/app/pb_kits/playbook/pb_date/_date.tsx +14 -4
- data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +2 -1
- data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +13 -5
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +3 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb +99 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md +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_table.html.erb +61 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +4 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx +90 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +4 -5
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_draggable/draggable_container.html.erb +2 -2
- data/app/pb_kits/playbook/pb_draggable/draggable_container.rb +5 -0
- data/app/pb_kits/playbook/pb_draggable/draggable_item.html.erb +1 -1
- data/app/pb_kits/playbook/pb_draggable/draggable_item.rb +4 -0
- data/app/pb_kits/playbook/pb_draggable/index.js +151 -15
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +7 -4
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +6 -3
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +1 -6
- data/app/pb_kits/playbook/pb_filter/filter.html.erb +1 -5
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +58 -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 +7 -5
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -0
- data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +1 -6
- 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 +11 -7
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +11 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +22 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +13 -2
- data/app/pb_kits/playbook/pb_icon/icon.html.erb +2 -6
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +1 -2
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb +27 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -3
- 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 +3 -0
- data/app/pb_kits/playbook/pb_layout/body.html.erb +1 -5
- data/app/pb_kits/playbook/pb_layout/footer.html.erb +1 -5
- data/app/pb_kits/playbook/pb_layout/header.html.erb +1 -5
- data/app/pb_kits/playbook/pb_layout/item.html.erb +1 -5
- data/app/pb_kits/playbook/pb_layout/layout.html.erb +1 -5
- data/app/pb_kits/playbook/pb_layout/sidebar.html.erb +1 -5
- data/app/pb_kits/playbook/pb_legend/legend.html.erb +1 -6
- data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +7 -6
- data/app/pb_kits/playbook/pb_link/_link.tsx +18 -0
- data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +15 -0
- data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +29 -0
- data/app/pb_kits/playbook/pb_link/docs/example.yml +5 -3
- data/app/pb_kits/playbook/pb_link/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_link/link.html.erb +1 -1
- data/app/pb_kits/playbook/pb_link/link.rb +6 -0
- data/app/pb_kits/playbook/pb_link/link.test.jsx +30 -0
- data/app/pb_kits/playbook/pb_message/message.html.erb +1 -6
- data/app/pb_kits/playbook/pb_message/message_mention.html.erb +1 -6
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +1 -6
- data/app/pb_kits/playbook/pb_nav/item.html.erb +7 -19
- data/app/pb_kits/playbook/pb_nav/nav.html.erb +3 -8
- data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +1 -6
- data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +4 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.jsx +37 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional_react.md +1 -0
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_token.tsx +48 -10
- data/app/pb_kits/playbook/pb_popover/popover.html.erb +1 -6
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.scss +6 -1
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +7 -5
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.html.erb +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.jsx +7 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.md +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.html.erb +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.jsx +18 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_rails.md +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_react.md +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.html.erb +2 -7
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.rb +6 -0
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.test.js +26 -1
- data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +1 -5
- 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 +1 -5
- data/app/pb_kits/playbook/pb_progress_step/progress_step_item.html.erb +1 -5
- data/app/pb_kits/playbook/pb_radio/radio.html.erb +6 -11
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +6 -9
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +6 -9
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb +47 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx +88 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.html.erb +51 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_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/_table_with_selectable_rows.html.erb +96 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx +101 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +8 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_table/index.ts +41 -9
- data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +4 -0
- data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +26 -0
- data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +0 -1
- data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +25 -0
- data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +25 -0
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_body.tsx +29 -2
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +31 -3
- data/app/pb_kits/playbook/pb_table/table_body.html.erb +13 -7
- data/app/pb_kits/playbook/pb_table/table_body.rb +2 -0
- data/app/pb_kits/playbook/pb_table/table_row.html.erb +14 -7
- data/app/pb_kits/playbook/pb_table/table_row.rb +15 -2
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +15 -1
- data/app/pb_kits/playbook/pb_text_input/index.js +60 -82
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +5 -2
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +3 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_tooltip/index.js +45 -27
- data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +5 -1
- data/app/pb_kits/playbook/pb_user/_user.tsx +3 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +42 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +59 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +2 -0
- data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
- data/app/pb_kits/playbook/pb_user/user.rb +1 -0
- data/app/pb_kits/playbook/pb_user/user.test.js +14 -0
- data/dist/chunks/_typeahead-PqkcDf1H.js +36 -0
- data/dist/chunks/_weekday_stacked-C7J0S4f7.js +45 -0
- data/dist/chunks/{lib-kMuhBuU7.js → lib-D3us1bGD.js} +2 -2
- data/dist/chunks/{pb_form_validation-DBJ0wZuS.js → pb_form_validation-BpihMSOQ.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +6 -7
- 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/forms/builder/time_zone_select_field.rb +19 -0
- data/lib/playbook/forms/builder.rb +1 -0
- 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 +77 -25
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +0 -66
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +0 -98
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +0 -28
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.rb +0 -42
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +0 -19
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +0 -26
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +0 -10
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +0 -17
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +0 -19
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +0 -16
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +0 -35
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +0 -42
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +0 -13
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml +0 -15
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/index.js +0 -4
- data/app/pb_kits/playbook/pb_avatar_action_button/pb_avatar_action_button.test.js +0 -31
- data/dist/chunks/_typeahead-BWwaAo_0.js +0 -36
- data/dist/chunks/_weekday_stacked-zyBCd1s8.js +0 -45
- /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_with_custom_click.md → _table_with_collapsible_with_custom_click_react.md} +0 -0
@@ -74,6 +74,31 @@
|
|
74
74
|
&.table-card {
|
75
75
|
background: none !important;
|
76
76
|
|
77
|
+
&.dark {
|
78
|
+
tbody, .pb_table_tbody {
|
79
|
+
tr, .pb_table_tr {
|
80
|
+
td, .pb_table_td {
|
81
|
+
background: $bg_dark_card !important;
|
82
|
+
border-color: $border_dark !important;
|
83
|
+
&:before {
|
84
|
+
color: $text_dk_light !important;
|
85
|
+
}
|
86
|
+
&:after {
|
87
|
+
height: 0;
|
88
|
+
background-color: transparent;
|
89
|
+
}
|
90
|
+
|
91
|
+
&:first-child {
|
92
|
+
border-radius: $border_rad_light $border_rad_light 0 0 !important;
|
93
|
+
}
|
94
|
+
&:last-child {
|
95
|
+
border-radius: 0 0 $border_rad_light $border_rad_light !important;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
77
102
|
tbody, .pb_table_tbody {
|
78
103
|
tr, .pb_table_tr {
|
79
104
|
td, .pb_table_td {
|
@@ -81,6 +106,7 @@
|
|
81
106
|
border-left-width: 1px !important;
|
82
107
|
border-right-width: 1px !important;
|
83
108
|
border-top-width: 1px !important;
|
109
|
+
|
84
110
|
&:after {
|
85
111
|
height: 0;
|
86
112
|
background-color: transparent;
|
@@ -74,6 +74,31 @@
|
|
74
74
|
&.table-card {
|
75
75
|
background: none !important;
|
76
76
|
|
77
|
+
&.dark {
|
78
|
+
tbody, .pb_table_tbody {
|
79
|
+
tr, .pb_table_tr {
|
80
|
+
td, .pb_table_td {
|
81
|
+
background: $bg_dark_card !important;
|
82
|
+
border-color: $border_dark !important;
|
83
|
+
&:before {
|
84
|
+
color: $text_dk_light !important;
|
85
|
+
}
|
86
|
+
&:after {
|
87
|
+
height: 0;
|
88
|
+
background-color: transparent;
|
89
|
+
}
|
90
|
+
|
91
|
+
&:first-child {
|
92
|
+
border-radius: $border_rad_light $border_rad_light 0 0 !important;
|
93
|
+
}
|
94
|
+
&:last-child {
|
95
|
+
border-radius: 0 0 $border_rad_light $border_rad_light !important;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
77
102
|
tbody, .pb_table_tbody {
|
78
103
|
tr, .pb_table_tr {
|
79
104
|
td, .pb_table_td {
|
@@ -74,6 +74,31 @@
|
|
74
74
|
&.table-card {
|
75
75
|
background: none !important;
|
76
76
|
|
77
|
+
&.dark {
|
78
|
+
tbody, .pb_table_tbody {
|
79
|
+
tr, .pb_table_tr {
|
80
|
+
td, .pb_table_td {
|
81
|
+
background: $bg_dark_card !important;
|
82
|
+
border-color: $border_dark !important;
|
83
|
+
&:before {
|
84
|
+
color: $text_dk_light !important;
|
85
|
+
}
|
86
|
+
&:after {
|
87
|
+
height: 0;
|
88
|
+
background-color: transparent;
|
89
|
+
}
|
90
|
+
|
91
|
+
&:first-child {
|
92
|
+
border-radius: $border_rad_light $border_rad_light 0 0 !important;
|
93
|
+
}
|
94
|
+
&:last-child {
|
95
|
+
border-radius: 0 0 $border_rad_light $border_rad_light !important;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
77
102
|
tbody, .pb_table_tbody {
|
78
103
|
tr, .pb_table_tr {
|
79
104
|
td, .pb_table_td {
|
@@ -7,11 +7,14 @@ import {
|
|
7
7
|
} from "../../utilities/props";
|
8
8
|
import { globalProps } from "../../utilities/globalProps";
|
9
9
|
|
10
|
+
import Draggable from "../../pb_draggable/_draggable"
|
11
|
+
|
10
12
|
type TableBodyPropTypes = {
|
11
13
|
aria?: { [key: string]: string };
|
12
14
|
children: React.ReactNode[] | React.ReactNode;
|
13
15
|
className: string;
|
14
16
|
data?: { [key: string]: string };
|
17
|
+
draggableContainer?: boolean;
|
15
18
|
htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
|
16
19
|
id?: string;
|
17
20
|
tag?: "table" | "div";
|
@@ -23,6 +26,7 @@ const TableBody = (props: TableBodyPropTypes): React.ReactElement => {
|
|
23
26
|
children,
|
24
27
|
className,
|
25
28
|
data = {},
|
29
|
+
draggableContainer = false,
|
26
30
|
htmlOptions = {},
|
27
31
|
id,
|
28
32
|
tag = "table",
|
@@ -37,7 +41,30 @@ const TableBody = (props: TableBodyPropTypes): React.ReactElement => {
|
|
37
41
|
return (
|
38
42
|
<>
|
39
43
|
{isTableTag ? (
|
40
|
-
|
44
|
+
draggableContainer ? (
|
45
|
+
<Draggable.Container
|
46
|
+
{...ariaProps}
|
47
|
+
{...dataProps}
|
48
|
+
{...htmlProps}
|
49
|
+
className={classes}
|
50
|
+
id={id}
|
51
|
+
tag="tbody"
|
52
|
+
>
|
53
|
+
{children}
|
54
|
+
</Draggable.Container>
|
55
|
+
) : (
|
56
|
+
<tbody
|
57
|
+
{...ariaProps}
|
58
|
+
{...dataProps}
|
59
|
+
{...htmlProps}
|
60
|
+
className={classes}
|
61
|
+
id={id}
|
62
|
+
>
|
63
|
+
{children}
|
64
|
+
</tbody>
|
65
|
+
)
|
66
|
+
) : draggableContainer ? (
|
67
|
+
<Draggable.Container
|
41
68
|
{...ariaProps}
|
42
69
|
{...dataProps}
|
43
70
|
{...htmlProps}
|
@@ -45,7 +72,7 @@ const TableBody = (props: TableBodyPropTypes): React.ReactElement => {
|
|
45
72
|
id={id}
|
46
73
|
>
|
47
74
|
{children}
|
48
|
-
</
|
75
|
+
</Draggable.Container>
|
49
76
|
) : (
|
50
77
|
<div
|
51
78
|
{...ariaProps}
|
@@ -9,6 +9,7 @@ import {
|
|
9
9
|
import { globalProps } from "../../utilities/globalProps";
|
10
10
|
import Collapsible from "../../pb_collapsible/_collapsible";
|
11
11
|
import useCollapsible from "../../pb_collapsible/useCollapsible";
|
12
|
+
import Draggable from "../../pb_draggable/_draggable";
|
12
13
|
|
13
14
|
type TableRowPropTypes = {
|
14
15
|
aria?: { [key: string]: string };
|
@@ -19,6 +20,8 @@ type TableRowPropTypes = {
|
|
19
20
|
collapsibleSideHighlight?: boolean;
|
20
21
|
data?: { [key: string]: string };
|
21
22
|
dark?: boolean;
|
23
|
+
dragId?: string;
|
24
|
+
draggableItem?: boolean;
|
22
25
|
htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
|
23
26
|
id?: string;
|
24
27
|
toggleCellId?: string;
|
@@ -36,6 +39,8 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
|
|
36
39
|
className,
|
37
40
|
data = {},
|
38
41
|
dark = false,
|
42
|
+
dragId,
|
43
|
+
draggableItem = false,
|
39
44
|
htmlOptions = {},
|
40
45
|
id,
|
41
46
|
toggleCellId,
|
@@ -152,15 +157,38 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
|
|
152
157
|
</>
|
153
158
|
)
|
154
159
|
) : isTableTag ? (
|
155
|
-
|
160
|
+
draggableItem ? (
|
161
|
+
<Draggable.Item
|
162
|
+
{...ariaProps}
|
163
|
+
{...dataProps}
|
164
|
+
{...htmlProps}
|
165
|
+
className={classes}
|
166
|
+
dragId={dragId}
|
167
|
+
tag="tr"
|
168
|
+
>
|
169
|
+
{children}
|
170
|
+
</Draggable.Item>
|
171
|
+
) : (
|
172
|
+
<tr
|
173
|
+
{...ariaProps}
|
174
|
+
{...dataProps}
|
175
|
+
{...htmlProps}
|
176
|
+
className={classes}
|
177
|
+
id={id}
|
178
|
+
>
|
179
|
+
{children}
|
180
|
+
</tr>
|
181
|
+
)
|
182
|
+
) : draggableItem ? (
|
183
|
+
<Draggable.Item
|
156
184
|
{...ariaProps}
|
157
185
|
{...dataProps}
|
158
186
|
{...htmlProps}
|
159
187
|
className={classes}
|
160
|
-
|
188
|
+
dragId={dragId}
|
161
189
|
>
|
162
190
|
{children}
|
163
|
-
</
|
191
|
+
</Draggable.Item>
|
164
192
|
) : (
|
165
193
|
<div
|
166
194
|
{...ariaProps}
|
@@ -1,11 +1,17 @@
|
|
1
1
|
<% if object.tag == "table" %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
<% if object.draggable_container %>
|
3
|
+
<%= pb_rails("draggable/draggable_container", props: { tag: "tbody", classname: object.classname, data: object.data }) do %>
|
4
|
+
<%= content.presence %>
|
5
|
+
<% end %>
|
6
|
+
<% else %>
|
7
|
+
<%= content_tag(:tbody,
|
8
|
+
aria: object.aria,
|
9
|
+
class: object.classname,
|
10
|
+
data: object.data,
|
11
|
+
id: object.id,
|
12
|
+
**combined_html_options) do %>
|
13
|
+
<%= content.presence %>
|
14
|
+
<% end %>
|
9
15
|
<% end %>
|
10
16
|
<% else %>
|
11
17
|
<%= content_tag(:div,
|
@@ -5,6 +5,7 @@
|
|
5
5
|
data: object.data.merge(id: object.id),
|
6
6
|
id: object.id,
|
7
7
|
'data-pb-table-collapsible-wrapper' => true,
|
8
|
+
'data-pb-table-collapsible-cell-id' => object.toggle_cell_id,
|
8
9
|
**combined_html_options) do %>
|
9
10
|
<%= content.presence %>
|
10
11
|
<% end %>
|
@@ -18,13 +19,19 @@
|
|
18
19
|
<% end %>
|
19
20
|
</tr>
|
20
21
|
<% elsif object.tag == "table" %>
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
22
|
+
<% if object.draggable_item %>
|
23
|
+
<%= pb_rails("draggable/draggable_item", props:{ drag_id: object.drag_id, tag: "tr", classname: object.classname, data: object.data }) do %>
|
24
|
+
<%= content.presence %>
|
25
|
+
<% end %>
|
26
|
+
<% else %>
|
27
|
+
<%= content_tag(:tr,
|
28
|
+
aria: object.aria,
|
29
|
+
class: object.classname,
|
30
|
+
data: object.data,
|
31
|
+
id: object.id,
|
32
|
+
**combined_html_options) do %>
|
33
|
+
<%= content.presence %>
|
34
|
+
<% end %>
|
28
35
|
<% end %>
|
29
36
|
<% else %>
|
30
37
|
<%= content_tag(:div,
|
@@ -12,10 +12,15 @@ module Playbook
|
|
12
12
|
default: false
|
13
13
|
prop :collapsible_content
|
14
14
|
prop :collapsible_side_highlight, type: Playbook::Props::Boolean,
|
15
|
-
default:
|
15
|
+
default: true
|
16
|
+
prop :toggle_cell_id, type: Playbook::Props::String
|
17
|
+
prop :draggable_item, type: Playbook::Props::Boolean,
|
18
|
+
default: false
|
19
|
+
prop :drag_id, type: Playbook::Props::String,
|
20
|
+
default: nil
|
16
21
|
|
17
22
|
def classname
|
18
|
-
generate_classname("pb_table_row_kit", side_highlight_class) + tag_class
|
23
|
+
generate_classname("pb_table_row_kit", side_highlight_class) + tag_class + collapsible_cell_class
|
19
24
|
end
|
20
25
|
|
21
26
|
def side_highlight_class
|
@@ -25,6 +30,14 @@ module Playbook
|
|
25
30
|
def tag_class
|
26
31
|
" pb_table_tr"
|
27
32
|
end
|
33
|
+
|
34
|
+
def collapsible_cell_class
|
35
|
+
if toggle_cell_id
|
36
|
+
" collapsible_cell"
|
37
|
+
else
|
38
|
+
""
|
39
|
+
end
|
40
|
+
end
|
28
41
|
end
|
29
42
|
end
|
30
43
|
end
|
@@ -27,6 +27,20 @@
|
|
27
27
|
placeholder: "123-45-6789"
|
28
28
|
}) %>
|
29
29
|
|
30
|
+
<%= pb_rails("text_input", props: {
|
31
|
+
label: "Credit Card",
|
32
|
+
mask: "credit_card",
|
33
|
+
margin_bottom: "md",
|
34
|
+
placeholder: "1234 5678 9012 3456"
|
35
|
+
}) %>
|
36
|
+
|
37
|
+
<%= pb_rails("text_input", props: {
|
38
|
+
label: "CVV",
|
39
|
+
mask: "cvv",
|
40
|
+
margin_bottom: "md",
|
41
|
+
placeholder: "123"
|
42
|
+
}) %>
|
43
|
+
|
30
44
|
<%= pb_rails("title" , props: {
|
31
45
|
text: "Hidden Input Under The Hood",
|
32
46
|
padding_bottom: "sm"
|
@@ -38,7 +52,7 @@
|
|
38
52
|
margin_bottom: "md",
|
39
53
|
name: "currency_name",
|
40
54
|
id: "example-currency",
|
41
|
-
|
55
|
+
value: "$99.99",
|
42
56
|
}) %>
|
43
57
|
|
44
58
|
<style>
|
@@ -1,102 +1,80 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const inputElements = document.querySelectorAll('[data-pb-input-mask="true"]');
|
4
|
-
|
5
|
-
inputElements.forEach((inputElement) => {
|
6
|
-
inputElement.addEventListener("input", (event) => {
|
7
|
-
const maskType = inputElement.getAttribute("mask");
|
8
|
-
const cursorPosition = inputElement.selectionStart;
|
9
|
-
|
10
|
-
let rawValue = event.target.value;
|
11
|
-
let formattedValue = rawValue;
|
12
|
-
|
13
|
-
// Apply formatting based on the mask type
|
14
|
-
switch (maskType) {
|
15
|
-
case "currency":
|
16
|
-
formattedValue = formatCurrency(rawValue);
|
17
|
-
break;
|
18
|
-
case "ssn":
|
19
|
-
formattedValue = formatSSN(rawValue);
|
20
|
-
break;
|
21
|
-
case "postal_code":
|
22
|
-
formattedValue = formatPostalCode(rawValue);
|
23
|
-
break;
|
24
|
-
case "zip_code":
|
25
|
-
formattedValue = formatZipCode(rawValue);
|
26
|
-
break;
|
27
|
-
}
|
28
|
-
|
29
|
-
// Update the sanitized input field in the same wrapper
|
30
|
-
const sanitizedInput = inputElement
|
31
|
-
.closest(".text_input_wrapper")
|
32
|
-
?.querySelector('[data="sanitized-pb-input"]');
|
33
|
-
|
34
|
-
if (sanitizedInput) {
|
35
|
-
switch (maskType) {
|
36
|
-
case "ssn":
|
37
|
-
sanitizedInput.value = sanitizeSSN(formattedValue);
|
38
|
-
break;
|
39
|
-
case "currency":
|
40
|
-
sanitizedInput.value = sanitizeCurrency(formattedValue);
|
41
|
-
break;
|
42
|
-
default:
|
43
|
-
sanitizedInput.value = formattedValue;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
inputElement.value = formattedValue;
|
48
|
-
setCursorPosition(inputElement, cursorPosition, rawValue, formattedValue);
|
49
|
-
});
|
50
|
-
});
|
1
|
+
import PbEnhancedElement from "../pb_enhanced_element"
|
2
|
+
import { INPUTMASKS } from "./inputMask"
|
51
3
|
|
4
|
+
export default class PbTextInput extends PbEnhancedElement {
|
5
|
+
static get selector() {
|
6
|
+
return '[data-pb-input-mask="true"]';
|
52
7
|
}
|
53
|
-
}
|
54
|
-
|
55
|
-
function formatCurrency(value) {
|
56
|
-
const numericValue = value.replace(/[^0-9]/g, "").slice(0, 15);
|
57
|
-
|
58
|
-
if (!numericValue) return "";
|
59
8
|
|
60
|
-
|
61
|
-
|
9
|
+
connect() {
|
10
|
+
this.handleInput = this.handleInput.bind(this);
|
11
|
+
this.element.addEventListener("input", this.handleInput);
|
12
|
+
this.handleInput();
|
13
|
+
}
|
62
14
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
maximumFractionDigits: 2,
|
67
|
-
}).format(dollars);
|
68
|
-
}
|
15
|
+
disconnect() {
|
16
|
+
this.element.removeEventListener("input", this.handleInput);
|
17
|
+
}
|
69
18
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
.
|
74
|
-
|
19
|
+
handleInput() {
|
20
|
+
const maskType = this.element.getAttribute("mask");
|
21
|
+
const cursorPosition = this.element.selectionStart;
|
22
|
+
const rawValue = this.element.value;
|
23
|
+
let formattedValue = rawValue;
|
24
|
+
|
25
|
+
const maskKey = {
|
26
|
+
currency: 'currency',
|
27
|
+
ssn: 'ssn',
|
28
|
+
postal_code: 'postalCode',
|
29
|
+
zip_code: 'zipCode',
|
30
|
+
credit_card: 'creditCard',
|
31
|
+
cvv: 'cvv',
|
32
|
+
}[maskType];
|
33
|
+
|
34
|
+
if (maskKey && INPUTMASKS[maskKey]) {
|
35
|
+
formattedValue = INPUTMASKS[maskKey].format(rawValue);
|
36
|
+
}
|
37
|
+
|
38
|
+
const sanitizedInput = this.element
|
39
|
+
.closest(".text_input_wrapper")
|
40
|
+
?.querySelector('[data="sanitized-pb-input"]');
|
41
|
+
|
42
|
+
if (sanitizedInput) {
|
43
|
+
switch (maskType) {
|
44
|
+
case "ssn":
|
45
|
+
sanitizedInput.value = sanitizeSSN(formattedValue);
|
46
|
+
break;
|
47
|
+
case "currency":
|
48
|
+
sanitizedInput.value = sanitizeCurrency(formattedValue);
|
49
|
+
break;
|
50
|
+
case "credit_card":
|
51
|
+
sanitizedInput.value = sanitizeCreditCard(formattedValue);
|
52
|
+
break;
|
53
|
+
default:
|
54
|
+
sanitizedInput.value = formattedValue;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
this.element.value = formattedValue;
|
59
|
+
setCursorPosition(this.element, cursorPosition, rawValue, formattedValue);
|
60
|
+
}
|
75
61
|
}
|
76
62
|
|
77
|
-
function
|
78
|
-
return
|
63
|
+
function sanitizeSSN(input) {
|
64
|
+
return input.replace(/\D/g, "");
|
79
65
|
}
|
80
66
|
|
81
|
-
function
|
82
|
-
|
83
|
-
return cleaned.replace(/(\d{5})(?=\d)/, "$1-");
|
67
|
+
function sanitizeCurrency(input) {
|
68
|
+
return input.replace(/[$,]/g, "");
|
84
69
|
}
|
85
70
|
|
86
|
-
function
|
71
|
+
function sanitizeCreditCard(input) {
|
87
72
|
return input.replace(/\D/g, "");
|
88
73
|
}
|
89
74
|
|
90
|
-
function sanitizeCurrency(input) {
|
91
|
-
return input.replace(/[$,]/g, "");
|
92
|
-
}
|
93
|
-
|
94
|
-
// function to set cursor position
|
95
75
|
function setCursorPosition(inputElement, cursorPosition, rawValue, formattedValue) {
|
96
76
|
const difference = formattedValue.length - rawValue.length;
|
97
|
-
|
98
77
|
const newPosition = Math.max(0, cursorPosition + difference);
|
99
|
-
|
100
78
|
requestAnimationFrame(() => {
|
101
79
|
inputElement.setSelectionRange(newPosition, newPosition);
|
102
80
|
});
|
@@ -4,13 +4,15 @@
|
|
4
4
|
module Playbook
|
5
5
|
module PbTextInput
|
6
6
|
class TextInput < Playbook::KitBase
|
7
|
-
VALID_MASKS = %w[currency
|
7
|
+
VALID_MASKS = %w[currency zip_code postal_code ssn credit_card cvv].freeze
|
8
8
|
|
9
9
|
MASK_PATTERNS = {
|
10
10
|
"currency" => '^\$\d{1,3}(?:,\d{3})*(?:\.\d{2})?$',
|
11
11
|
"zip_code" => '\d{5}',
|
12
12
|
"postal_code" => '\d{5}-\d{4}',
|
13
13
|
"ssn" => '\d{3}-\d{2}-\d{4}',
|
14
|
+
"credit_card" => '\d{4} \d{4} \d{4} \d{4}',
|
15
|
+
"cvv" => '\d{3,4}',
|
14
16
|
}.freeze
|
15
17
|
|
16
18
|
prop :autocomplete, type: Playbook::Props::Boolean,
|
@@ -34,7 +36,8 @@ module Playbook
|
|
34
36
|
prop :add_on, type: Playbook::Props::NestedProps,
|
35
37
|
nested_kit: Playbook::PbTextInput::AddOn
|
36
38
|
|
37
|
-
prop :mask, type: Playbook::Props::
|
39
|
+
prop :mask, type: Playbook::Props::Enum,
|
40
|
+
values: ["currency", "zip_code", "postal_code", "ssn", "credit_card", "cvv", nil],
|
38
41
|
default: nil
|
39
42
|
|
40
43
|
def classname
|
@@ -32,6 +32,7 @@ type TooltipProps = {
|
|
32
32
|
position?: "absolute" | "fixed";
|
33
33
|
text: string,
|
34
34
|
showTooltip?: boolean,
|
35
|
+
forceOpenTooltip?: boolean,
|
35
36
|
} & GlobalProps
|
36
37
|
|
37
38
|
const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): React.ReactElement => {
|
@@ -49,6 +50,7 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
|
|
49
50
|
text,
|
50
51
|
showTooltip = true,
|
51
52
|
zIndex,
|
53
|
+
forceOpenTooltip = false,
|
52
54
|
...rest
|
53
55
|
} = props
|
54
56
|
|
@@ -135,7 +137,7 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
|
|
135
137
|
>
|
136
138
|
{children}
|
137
139
|
</div>
|
138
|
-
{open && (
|
140
|
+
{(open || forceOpenTooltip) && (
|
139
141
|
<div
|
140
142
|
{...getFloatingProps({
|
141
143
|
className: `tooltip_tooltip ${placement} visible`,
|