playbook_ui 15.3.0.pre.alpha.play262912095 → 15.3.0.pre.rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +5 -5
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +1 -2
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +1 -3
  5. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableActions.ts +3 -18
  6. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +14 -71
  7. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +0 -3
  8. data/app/pb_kits/playbook/pb_advanced_table/Utilities/RowUtils.ts +1 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +4 -4
  10. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +3 -12
  11. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +2 -2
  12. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +5 -127
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +1 -3
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +3 -3
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +3 -3
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +2 -2
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +1 -1
  18. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +1 -1
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx +1 -3
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md +1 -3
  21. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
  22. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers_rails.html.erb +2 -2
  23. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.html.erb +2 -3
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md +1 -3
  25. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.jsx +0 -28
  26. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md +2 -11
  27. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.jsx +1 -9
  28. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md +1 -1
  29. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +1 -4
  30. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +2 -3
  31. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_rails.md +1 -1
  32. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_react.md +1 -1
  33. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.html.erb +2 -2
  34. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +1 -1
  35. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +1 -1
  36. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +1 -1
  37. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -3
  38. data/app/pb_kits/playbook/pb_advanced_table/flat_advanced_table.js +2 -2
  39. data/app/pb_kits/playbook/pb_advanced_table/index.js +8 -12
  40. data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +2 -2
  41. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +6 -6
  42. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +6 -6
  43. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +2 -3
  44. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +6 -79
  45. data/app/pb_kits/playbook/pb_background/background.html.erb +2 -10
  46. data/app/pb_kits/playbook/pb_background/docs/_background_category.md +1 -1
  47. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.html.erb +4 -4
  48. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +0 -4
  49. data/app/pb_kits/playbook/pb_card/docs/_card_background.md +1 -1
  50. data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
  51. data/app/pb_kits/playbook/pb_card/docs/_card_highlight.md +1 -1
  52. data/app/pb_kits/playbook/pb_card/docs/_card_light.md +1 -1
  53. data/app/pb_kits/playbook/pb_currency/_currency.tsx +7 -20
  54. data/app/pb_kits/playbook/pb_currency/currency.rb +8 -35
  55. data/app/pb_kits/playbook/pb_currency/currency.test.js +0 -47
  56. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +1 -1
  57. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +1 -1
  58. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +0 -2
  59. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.jsx +1 -1
  60. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_quick_pick_styles.scss +30 -11
  61. data/app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_custom_colors.md +1 -1
  62. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options_react.md +1 -1
  63. data/app/pb_kits/playbook/pb_filter/docs/_filter_max_width.md +1 -1
  64. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +1 -0
  65. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +3 -5
  66. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_description.md +0 -2
  67. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -4
  68. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +0 -10
  69. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
  70. data/app/pb_kits/playbook/pb_form/formHelper.js +1 -1
  71. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_rails.md +1 -1
  72. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_react.md +1 -1
  73. data/app/pb_kits/playbook/pb_icon/docs/_icon_color.md +1 -1
  74. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color.md +1 -1
  75. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.html.erb +14 -7
  76. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.jsx +15 -6
  77. data/app/pb_kits/playbook/pb_layout/docs/_layout_collection.md +1 -1
  78. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_item_spacing.md +1 -1
  79. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_spacing_control.md +1 -1
  80. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +1 -1
  81. data/app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.tsx +6 -8
  82. data/app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.rb +10 -7
  83. data/app/pb_kits/playbook/pb_pb_bar_graph/pbbargraph.test.jsx +1 -73
  84. data/app/pb_kits/playbook/pb_pb_circle_chart/_pb_circle_chart.tsx +1 -1
  85. data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.rb +10 -7
  86. data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.test.jsx +0 -47
  87. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +6 -25
  88. data/app/pb_kits/playbook/pb_pill/docs/_description.md +1 -1
  89. data/app/pb_kits/playbook/pb_popover/_popover.tsx +34 -69
  90. data/app/pb_kits/playbook/pb_popover/docs/example.yml +0 -1
  91. data/app/pb_kits/playbook/pb_popover/docs/index.js +0 -1
  92. data/app/pb_kits/playbook/pb_popover/popover.test.js +0 -80
  93. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +2 -41
  94. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +0 -1
  95. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +20 -60
  96. data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +0 -36
  97. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_description.md +1 -1
  98. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -8
  99. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +0 -6
  100. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.test.js +1 -127
  101. data/app/pb_kits/playbook/pb_section_separator/docs/_description.md +1 -1
  102. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +0 -29
  103. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_rails.md +1 -1
  104. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_react.md +1 -1
  105. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.md +1 -1
  106. data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.md +1 -1
  107. data/app/pb_kits/playbook/pb_table/docs/_table_sm.md +1 -1
  108. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
  109. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
  110. data/app/pb_kits/playbook/pb_text_input/text_input.rb +2 -2
  111. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +1 -76
  112. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +2 -85
  113. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md +1 -1
  114. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -4
  115. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -2
  116. data/app/pb_kits/playbook/tokens/_positioning.scss +0 -1
  117. data/app/pb_kits/playbook/utilities/_positioning.scss +1 -6
  118. data/app/pb_kits/playbook/utilities/globalProps.ts +1 -3
  119. data/dist/chunks/{_line_graph-CqE0-dq5.js → _line_graph-DY4PK6AH.js} +1 -1
  120. data/dist/chunks/_typeahead-fQDb_yVO.js +6 -0
  121. data/dist/chunks/{_weekday_stacked-W1kKx2Gl.js → _weekday_stacked-D_bGbWtk.js} +3 -3
  122. data/dist/chunks/{lib-CGxXTQ75.js → lib-QZuu1ltS.js} +1 -1
  123. data/dist/chunks/{pb_form_validation-DebqlUKZ.js → pb_form_validation-CleM960_.js} +1 -1
  124. data/dist/chunks/vendor.js +1 -1
  125. data/dist/menu.yml +0 -12
  126. data/dist/playbook-doc.js +2 -2
  127. data/dist/playbook-rails-react-bindings.js +1 -1
  128. data/dist/playbook-rails.js +1 -1
  129. data/dist/playbook.css +1 -1
  130. data/lib/playbook/pb_forms_helper.rb +6 -7
  131. data/lib/playbook/version.rb +2 -2
  132. data/lib/playbook/z_index.rb +1 -1
  133. metadata +8 -101
  134. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +0 -43
  135. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +0 -1
  136. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row_rails.html.erb +0 -51
  137. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row_rails.md +0 -1
  138. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_rails.html.erb +0 -40
  139. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_rails.md +0 -1
  140. data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading_empty_children.js +0 -42
  141. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.md +0 -1
  142. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +0 -3
  143. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +0 -3
  144. data/app/pb_kits/playbook/pb_pb_gauge_chart/_pb_gauge_chart.scss +0 -3
  145. data/app/pb_kits/playbook/pb_pb_gauge_chart/_pb_gauge_chart.tsx +0 -69
  146. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +0 -3
  147. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.html.erb +0 -12
  148. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.jsx +0 -24
  149. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.md +0 -5
  150. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.html.erb +0 -45
  151. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.jsx +0 -119
  152. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.md +0 -1
  153. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.html.erb +0 -5
  154. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.jsx +0 -17
  155. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_disable_animation.html.erb +0 -12
  156. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_disable_animation.jsx +0 -24
  157. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.html.erb +0 -23
  158. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.jsx +0 -37
  159. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.html.erb +0 -40
  160. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.jsx +0 -56
  161. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_live_data.jsx +0 -64
  162. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.html.erb +0 -27
  163. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.jsx +0 -40
  164. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.md +0 -1
  165. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_sizing.html.erb +0 -19
  166. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_sizing.jsx +0 -65
  167. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_sizing.md +0 -3
  168. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_title.html.erb +0 -14
  169. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_title.jsx +0 -27
  170. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.html.erb +0 -39
  171. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.jsx +0 -58
  172. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.md +0 -1
  173. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/example.yml +0 -29
  174. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/index.js +0 -11
  175. data/app/pb_kits/playbook/pb_pb_gauge_chart/pbGaugeGraphTheme.ts +0 -91
  176. data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.html.erb +0 -1
  177. data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.rb +0 -25
  178. data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.test.jsx +0 -80
  179. data/app/pb_kits/playbook/pb_pb_line_graph/_pb_line_graph.scss +0 -3
  180. data/app/pb_kits/playbook/pb_pb_line_graph/_pb_line_graph.tsx +0 -61
  181. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +0 -3
  182. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.html.erb +0 -34
  183. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +0 -52
  184. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.md +0 -5
  185. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.html.erb +0 -34
  186. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.jsx +0 -45
  187. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.html.erb +0 -47
  188. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.jsx +0 -64
  189. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.md +0 -3
  190. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend.html.erb +0 -24
  191. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend.jsx +0 -37
  192. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_nonclickable.html.erb +0 -39
  193. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_nonclickable.jsx +0 -45
  194. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.html.erb +0 -86
  195. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.jsx +0 -116
  196. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.md +0 -11
  197. data/app/pb_kits/playbook/pb_pb_line_graph/docs/example.yml +0 -20
  198. data/app/pb_kits/playbook/pb_pb_line_graph/docs/index.js +0 -6
  199. data/app/pb_kits/playbook/pb_pb_line_graph/pbLineGraphTheme.ts +0 -125
  200. data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.html.erb +0 -1
  201. data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.rb +0 -25
  202. data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.test.jsx +0 -110
  203. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +0 -68
  204. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to_react.md +0 -1
  205. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_attributes.jsx +0 -38
  206. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_attributes.md +0 -1
  207. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_focus.jsx +0 -34
  208. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_focus.md +0 -1
  209. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.jsx +0 -37
  210. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.md +0 -1
  211. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_simple.jsx +0 -37
  212. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_sticky.jsx +0 -38
  213. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_sticky.md +0 -1
  214. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_templates.jsx +0 -69
  215. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_templates.md +0 -1
  216. data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible.html.erb +0 -63
  217. data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible.jsx +0 -89
  218. data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_rails.md +0 -4
  219. data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_react.md +0 -3
  220. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.html.erb +0 -64
  221. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.jsx +0 -70
  222. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.md +0 -1
  223. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_options.html.erb +0 -102
  224. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_options.md +0 -1
  225. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_value.jsx +0 -103
  226. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_value.md +0 -1
  227. data/dist/chunks/_typeahead-3ZAbZUqU.js +0 -6
  228. /data/app/pb_kits/playbook/pb_popover/docs/{_popover_append_to_rails.md → _popover_append_to.md} +0 -0
@@ -11,7 +11,7 @@ import { ToolbarTypes } from "./EditorTypes";
11
11
  import ToolbarHistoryItems from "./ToolbarHistory";
12
12
  import MoreExtensionsDropdown from "./MoreExtensionsDropdown";
13
13
 
14
- const EditorToolbar = ({ editor, extensions, simple, sticky }: any): React.ReactElement => {
14
+ const EditorToolbar = ({ editor, extensions }: any): React.ReactElement => {
15
15
  const toolbaritems = [
16
16
  {
17
17
  icon: "bold",
@@ -33,50 +33,15 @@ const EditorToolbar = ({ editor, extensions, simple, sticky }: any): React.React
33
33
  },
34
34
  ]
35
35
 
36
- const simpleToolbaritems = [
37
- {
38
- icon: "bold",
39
- text: "Bold",
40
- classname:`toolbar_button ${editor.isActive('bold') ? 'is-active' : ''}`,
41
- onclick:()=>editor.chain().focus().toggleBold().run(),
42
- },
43
- {
44
- icon: "italic",
45
- text: "Italic",
46
- classname:`toolbar_button ${editor.isActive('italic') ? 'is-active' : ''}`,
47
- onclick:() => editor.chain().focus().toggleItalic().run(),
48
- },
49
- ]
50
-
51
36
  return (
52
37
  <Background backgroundColor="white"
53
- className={`toolbar ${sticky ? 'pb_rich_text_editor_tiptap_toolbar_sticky' : ''}`}
54
-
38
+ className="toolbar"
55
39
  >
56
40
  <Flex flex="0"
57
41
  justify="between"
58
42
  paddingX="sm"
59
43
  paddingY="xxs"
60
44
  >
61
- {
62
- simple ? (
63
- <>
64
- <Flex className="toolbar_block">
65
- {simpleToolbaritems && simpleToolbaritems.map(
66
- ({ icon, text, classname, onclick}: ToolbarTypes, index: number) => (
67
- <EditorButton
68
- classname={classname}
69
- icon={icon}
70
- key={index}
71
- onclick={onclick}
72
- text={text}
73
- />
74
- )
75
- )}
76
- </Flex>
77
- </>
78
- ) : (
79
- <>
80
45
  <FlexItem className="toolbar_block"
81
46
  displayFlex
82
47
  >
@@ -104,10 +69,6 @@ const EditorToolbar = ({ editor, extensions, simple, sticky }: any): React.React
104
69
  }
105
70
  </FlexItem>
106
71
  <ToolbarHistoryItems editor={editor} />
107
- </>
108
- )
109
- }
110
-
111
72
  </Flex>
112
73
  </Background>
113
74
  );
@@ -146,7 +146,6 @@ const popoverReference = (
146
146
 
147
147
  return (
148
148
  <PbReactPopover
149
- className='pb_tiptap_toolbar_dropdown_popover'
150
149
  closeOnClick='outside'
151
150
  padding='none'
152
151
  placement="bottom"
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useState, useRef } from 'react'
1
+ import React, { useEffect, useState } from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { TrixEditor } from 'react-trix'
4
4
 
@@ -77,9 +77,7 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
77
77
 
78
78
  const ariaProps = buildAriaProps(aria),
79
79
  dataProps = buildDataProps(data),
80
- [editor, setEditor] = useState<Editor>(),
81
- [showToolbarOnFocus, setShowToolbarOnFocus] = useState(false),
82
- containerRef = useRef<HTMLDivElement>(null)
80
+ [editor, setEditor] = useState<Editor>()
83
81
 
84
82
  const htmlProps = buildHtmlProps(htmlOptions)
85
83
 
@@ -130,42 +128,6 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
130
128
  document.addEventListener('trix-blur', inlineFocus)
131
129
  }
132
130
 
133
- //===========focus prop with advanced editor=================
134
- const isClickInPopover = (event: Event): boolean => {
135
- return !!(event.target as Element).closest('.pb_tiptap_toolbar_dropdown_popover')
136
- }
137
-
138
- const isClickInContainer = (event: Event): boolean => {
139
- return !!(containerRef.current && containerRef.current.contains(event.target as Node))
140
- }
141
-
142
- useEffect(() => {
143
- if (!advancedEditor || !focus) return
144
-
145
- const handleFocus = () => setShowToolbarOnFocus(true)
146
-
147
- const handleClickOutside = (event: Event) => {
148
- if (isClickInContainer(event) || isClickInPopover(event)) return
149
- setShowToolbarOnFocus(false)
150
- }
151
-
152
- const editorElement = advancedEditor?.view?.dom
153
- if (editorElement) {
154
- editorElement.addEventListener('focus', handleFocus)
155
- }
156
-
157
- document.addEventListener('mousedown', handleClickOutside)
158
-
159
- return () => {
160
- if (editorElement) {
161
- editorElement.removeEventListener('focus', handleFocus)
162
- }
163
- document.removeEventListener('mousedown', handleClickOutside)
164
- }
165
- }, [advancedEditor, focus])
166
-
167
- //============= end focus prop with advanced editor=================
168
-
169
131
  useEffect(() => {
170
132
  if (!editor || !template) return
171
133
  editor.loadHTML('')
@@ -186,43 +148,41 @@ const RichTextEditor = (props: RichTextEditorProps): React.ReactElement => {
186
148
  })
187
149
  }, [editor])
188
150
 
189
- // Generate CSS classes
190
- const css = classnames(
191
- 'pb_rich_text_editor_kit',
192
- {
193
- simple: simple,
194
- 'focus-editor-targets': focus,
195
- sticky: sticky,
196
- inline: inline,
197
- 'toolbar-bottom': toolbarBottom,
198
- },
199
- globalProps(props, { maxWidth }),
200
- className
151
+ const richTextEditorClass = 'pb_rich_text_editor_kit',
152
+ simpleClass = simple ? 'simple' : '',
153
+ focusClass = focus ? 'focus-editor-targets' : '',
154
+ stickyClass = sticky ? 'sticky' : '',
155
+ inlineClass = inline ? 'inline' : '',
156
+ toolbarBottomClass = toolbarBottom ? 'toolbar-bottom' : ''
157
+
158
+ let css = classnames(globalProps(props, { maxWidth }), className)
159
+ css = classnames(
160
+ richTextEditorClass,
161
+ simpleClass,
162
+ focusClass,
163
+ stickyClass,
164
+ inlineClass,
165
+ toolbarBottomClass,
166
+ css
201
167
  )
202
168
 
203
- // Determine if toolbar should be shown
204
- const shouldShowToolbar = focus && advancedEditor ? showToolbarOnFocus : advancedEditorToolbar
205
-
206
169
  return (
207
170
  <div
208
171
  {...ariaProps}
209
172
  {...dataProps}
210
173
  {...htmlProps}
211
174
  className={css}
212
- ref={focus ? containerRef : undefined}
213
175
  >
214
176
  {
215
177
  advancedEditor ? (
216
178
  <div
217
179
  className={classnames("pb_rich_text_editor_advanced_container", {
218
- ["toolbar-active"]: shouldShowToolbar,
180
+ ["toolbar-active"]: advancedEditorToolbar,
219
181
  })}
220
182
  >
221
- {shouldShowToolbar && (
183
+ {advancedEditorToolbar && (
222
184
  <EditorToolbar editor={advancedEditor}
223
185
  extensions={extensions}
224
- simple={simple}
225
- sticky={sticky}
226
186
  />
227
187
  )}
228
188
  { children }
@@ -9,37 +9,6 @@
9
9
  @import "previewer_mixin";
10
10
 
11
11
  [class^="pb_rich_text_editor_kit"] {
12
- &.inline {
13
- .toolbar {
14
- opacity: 0;
15
- transition: all 0.3s ease-in-out 0s;
16
- }
17
-
18
- &:focus-within .toolbar {
19
- opacity: 100;
20
- }
21
-
22
- .ProseMirror {
23
- border: 1px solid transparent;
24
- transition: all 0.3s ease-in-out 0s;
25
- }
26
-
27
- &:focus-within .ProseMirror {
28
- border: 1px solid $border_light;
29
- border-top: none;
30
- }
31
-
32
- &:hover {
33
- .toolbar {
34
- opacity: 100;
35
- }
36
-
37
- .ProseMirror {
38
- border: 1px solid $border_light;
39
- border-top: none;
40
- }
41
- }
42
- }
43
12
  .toolbar_button {
44
13
  display: flex;
45
14
  align-items: center;
@@ -73,11 +42,6 @@
73
42
  }
74
43
  }
75
44
 
76
- .pb_rich_text_editor_tiptap_toolbar_sticky {
77
- position: sticky;
78
- top: 0;
79
- z-index: 10;
80
- }
81
45
  .toolbar {
82
46
  border-radius: $border_rad_heaviest $border_rad_heaviest 0 0;
83
47
  border: 1px solid $border_light;
@@ -1 +1 @@
1
- NOTE: All editors have a default max-width of "md". Use our [Max Width global prop](https://playbook.powerapp.cloud/global_props/max_width) to override this default, as necessary.
1
+ NOTE: All editors have a default max-width of "md". Use our [Max Width global prop](https://playbook.powerapp.cloud/visual_guidelines/max_width) to override this default, as necessary.
@@ -7,7 +7,7 @@ examples:
7
7
  - rich_text_editor_focus: Focus
8
8
  - rich_text_editor_sticky: Sticky
9
9
  - rich_text_editor_templates: Templates
10
- # - rich_text_editor_toolbar_bottom: Toolbar Bottom
10
+ - rich_text_editor_toolbar_bottom: Toolbar Bottom
11
11
  - rich_text_editor_inline: Inline
12
12
  - rich_text_editor_preview: Preview
13
13
 
@@ -17,17 +17,11 @@ examples:
17
17
  - rich_text_editor_more_extensions: Advanced (Extra Extensions)
18
18
  - rich_text_editor_toolbar_disabled: Advanced (Toolbar disabled)
19
19
  - rich_text_editor_simple: Simple
20
- - rich_text_editor_advanced_simple: Advanced (Simple)
21
20
  - rich_text_editor_attributes: Attributes
22
- - rich_text_editor_advanced_attributes: Advanced (Attributes)
23
21
  - rich_text_editor_focus: Focus
24
- - rich_text_editor_advanced_focus: Advanced (Focus)
25
22
  - rich_text_editor_sticky: Sticky
26
- - rich_text_editor_advanced_sticky: Advanced (Sticky)
27
23
  - rich_text_editor_templates: Templates
28
- - rich_text_editor_advanced_templates: Advanced (Templates)
29
- # - rich_text_editor_toolbar_bottom: Toolbar Bottom
24
+ - rich_text_editor_toolbar_bottom: Toolbar Bottom
30
25
  - rich_text_editor_inline: Inline
31
- - rich_text_editor_advanced_inline: Advanced (Inline)
32
26
  - rich_text_editor_preview: Preview
33
27
  - rich_text_editor_advanced_preview: Advanced Preview
@@ -11,9 +11,3 @@ export { default as RichTextEditorAdvancedDefault } from './_rich_text_editor_ad
11
11
  export { default as RichTextEditorMoreExtensions } from './_rich_text_editor_more_extensions.jsx'
12
12
  export { default as RichTextEditorToolbarDisabled } from './_rich_text_editor_toolbar_disabled.jsx'
13
13
  export { default as RichTextEditorAdvancedPreview } from './_rich_text_editor_advanced_preview.jsx'
14
- export { default as RichTextEditorAdvancedSimple } from './_rich_text_editor_advanced_simple.jsx'
15
- export { default as RichTextEditorAdvancedFocus } from './_rich_text_editor_advanced_focus.jsx'
16
- export { default as RichTextEditorAdvancedTemplates } from './_rich_text_editor_advanced_templates.jsx'
17
- export { default as RichTextEditorAdvancedAttributes } from './_rich_text_editor_advanced_attributes.jsx'
18
- export { default as RichTextEditorAdvancedSticky } from './_rich_text_editor_advanced_sticky.jsx'
19
- export { default as RichTextEditorAdvancedInline } from './_rich_text_editor_advanced_inline.jsx'
@@ -1,7 +1,5 @@
1
1
  import React from 'react'
2
- import { render, screen, fireEvent, waitFor } from '../utilities/test-utils'
3
- import { useEditor, EditorContent } from "@tiptap/react"
4
- import StarterKit from "@tiptap/starter-kit"
2
+ import { render, screen } from '../utilities/test-utils'
5
3
 
6
4
  import RichTextEditor from './_rich_text_editor'
7
5
 
@@ -64,127 +62,3 @@ test('returns "Dark" class name', () => {
64
62
  const kit = screen.getByTestId(testId)
65
63
  expect(kit).toHaveClass(`${kitClass} dark`)
66
64
  })
67
-
68
- // TipTap testing
69
- const TestAdvancedEditor = ({ toolbarOnFocus = false, ...props }) => {
70
- const editor = useEditor({
71
- extensions: [StarterKit],
72
- content: '<p>Test content</p>',
73
- })
74
-
75
- if (!editor) return null
76
-
77
- return (
78
- <RichTextEditor
79
- advancedEditor={editor}
80
- data={{ testid: testId }}
81
- toolbarOnFocus={toolbarOnFocus}
82
- {...props}
83
- >
84
- <EditorContent editor={editor} />
85
- </RichTextEditor>
86
- )
87
- }
88
-
89
- describe('Advanced TipTap Editor works as expected', () => {
90
- test('renders advanced editor with toolbar', () => {
91
- render(<TestAdvancedEditor />)
92
-
93
- const kit = screen.getByTestId(testId)
94
- expect(kit).toHaveClass(kitClass)
95
-
96
- // Check for advanced container
97
- const advancedContainer = kit.querySelector('.pb_rich_text_editor_advanced_container')
98
- expect(advancedContainer).toBeInTheDocument()
99
-
100
- // Check for toolbar
101
- const toolbar = kit.querySelector('.toolbar')
102
- expect(toolbar).toBeInTheDocument()
103
- })
104
-
105
- test('renders advanced editor without toolbar when advancedEditorToolbar is false', () => {
106
- render(<TestAdvancedEditor advancedEditorToolbar={false} />)
107
-
108
- const kit = screen.getByTestId(testId)
109
- const toolbar = kit.querySelector('.toolbar')
110
- expect(toolbar).not.toBeInTheDocument()
111
- })
112
-
113
- test('shows/hides toolbar on focus when focus is enabled', async () => {
114
- render(<TestAdvancedEditor focus />)
115
-
116
- const kit = screen.getByTestId(testId)
117
-
118
- // Initially toolbar should be hidden
119
- let toolbar = kit.querySelector('.toolbar')
120
- expect(toolbar).not.toBeInTheDocument()
121
-
122
- const editorElement = kit.querySelector('.ProseMirror')
123
- // Focus the editor
124
- fireEvent.focus(editorElement)
125
-
126
- // Toolbar should now be visible
127
- await waitFor(() => {
128
- toolbar = kit.querySelector('.toolbar')
129
- expect(toolbar).toBeInTheDocument()
130
- })
131
- })
132
-
133
-
134
- test('supports simple prop with advanced editor', () => {
135
- render(<TestAdvancedEditor simple />)
136
-
137
- const kit = screen.getByTestId(testId)
138
- const toolbar = kit.querySelector('.toolbar')
139
- expect(toolbar).toBeInTheDocument()
140
- const toolbarDropdown = kit.querySelector('.editor_dropdown_button')
141
- expect(toolbarDropdown).not.toBeInTheDocument()
142
- expect(kit).toHaveClass(`${kitClass} simple`)
143
- })
144
-
145
- test('supports sticky prop with advanced editor', () => {
146
- render(<TestAdvancedEditor sticky />)
147
-
148
- const kit = screen.getByTestId(testId)
149
- const stickyToolbar = kit.querySelector('.pb_rich_text_editor_tiptap_toolbar_sticky')
150
- expect(stickyToolbar).toBeInTheDocument()
151
- expect(kit).toHaveClass(`${kitClass} sticky`)
152
- })
153
-
154
- test('applies aria-label when provided', () => {
155
- const ariaLabel = 'Rich Text Editor'
156
- render(<TestAdvancedEditor aria={{ label: ariaLabel }} />)
157
-
158
- const kit = screen.getByTestId(testId)
159
- expect(kit).toHaveAttribute('aria-label', ariaLabel)
160
- })
161
-
162
- test('supports inline prop with advanced editor', () => {
163
- render(<TestAdvancedEditor inline />)
164
-
165
- const kit = screen.getByTestId(testId)
166
- const toolbar = kit.querySelector('.toolbar')
167
- expect(toolbar).toBeInTheDocument()
168
- expect(kit).toHaveClass(`${kitClass} inline`)
169
- })
170
-
171
- describe('TipTap Editor Functionality', () => {
172
- test('can type and update content', async () => {
173
- render(<TestAdvancedEditor />)
174
-
175
- const kit = screen.getByTestId(testId)
176
- const editorContent = kit.querySelector('.ProseMirror')
177
-
178
- // Focus and type in the editor
179
- fireEvent.focus(editorContent)
180
- fireEvent.input(editorContent, {
181
- target: { textContent: 'New content' }
182
- })
183
-
184
- await waitFor(() => {
185
- expect(editorContent).toHaveTextContent('New content')
186
- })
187
- })
188
- })
189
- })
190
-
@@ -1,3 +1,3 @@
1
1
  Section separator is a divider line that compartmentalizes content, typically used on cards or white backgrounds.
2
2
 
3
- To ensure that the section separator is properly rendered, please be sure to use our global `width` prop to set width to 100%. [See here](https://playbook.powerapp.cloud/global_props/width) for more information on the global width prop.
3
+ To ensure that the section separator is properly rendered, please be sure to use our global `width` prop to set width to 100%. [See here](https://playbook.powerapp.cloud/visual_guidelines/width) for more information on the global width prop.
@@ -216,33 +216,4 @@ $pb_selectable_paddings: (
216
216
  background: $error;
217
217
  }
218
218
  }
219
- }
220
-
221
- .pb_selectable_card_kit_disabled,
222
- .pb_selectable_card_kit_checked_disabled {
223
- >label {
224
- cursor: not-allowed;
225
-
226
- @media (hover:hover) {
227
- &:hover {
228
- box-shadow: none !important;
229
- }
230
- }
231
- }
232
- }
233
-
234
- .pb_selectable_card_kit_disabled>label {
235
- border-color: $border_light !important;
236
-
237
- .dark & {
238
- border-color: $border_dark !important;
239
- }
240
- }
241
-
242
- .pb_selectable_card_kit_checked_disabled>label {
243
- border-color: $primary !important;
244
-
245
- .dark & {
246
- border-color: $primary_action_dark !important;
247
- }
248
219
  }
@@ -1 +1 @@
1
- The `border_radius` prop accepts all of our [BorderRadius](https://playbook.powerapp.cloud/global_props/border_radius) tokens, with `sm` as default.
1
+ The `border_radius` prop accepts all of our [BorderRadius](https://playbook.powerapp.cloud/visual_guidelines/border_radius) tokens, with `sm` as default.
@@ -1 +1 @@
1
- The `borderRadius` prop accepts all of our [BorderRadius](https://playbook.powerapp.cloud/global_props/border_radius) tokens, with `sm` as default.
1
+ The `borderRadius` prop accepts all of our [BorderRadius](https://playbook.powerapp.cloud/visual_guidelines/border_radius) tokens, with `sm` as default.
@@ -1,3 +1,3 @@
1
1
  Use the `stack` and `gap` props in conjunction to layer multiple Skeleton loading bars on top of each other.
2
2
 
3
- `stack` accepts a number that correlates to the number of rows (1 is default), and `gap` accepts a portion of our [spacing props](https://playbook.powerapp.cloud/global_props/spacing) (`xxs` as default, `xs`, `sm`, `md`, `lg`, `xl`, `xxl`) to set the pixel distance between each row. `gap` will not do anything if there is no corresponding `stack` prop set.
3
+ `stack` accepts a number that correlates to the number of rows (1 is default), and `gap` accepts a portion of our [spacing props](https://playbook.powerapp.cloud/visual_guidelines/spacing) (`xxs` as default, `xs`, `sm`, `md`, `lg`, `xl`, `xxl`) to set the pixel distance between each row. `gap` will not do anything if there is no corresponding `stack` prop set.
@@ -1,3 +1,3 @@
1
- Side highlight can take product, status, and category colors. To view full list of colors, visit <a href="https://playbook.powerapp.cloud/tokens/colors" target="_blank">token colors</a>.
1
+ Side highlight can take product, status, and category colors. To view full list of colors, visit <a href="https://playbook.powerapp.cloud/visual_guidelines" target="_blank">token colors</a>.
2
2
 
3
3
  Note: Only use category colors for categories. Do not mix it with product or status colors.
@@ -1,3 +1,3 @@
1
1
  Use table size `"sm"` when data density is a priority. Smaller row height enables the user to view more data without the need for scrolling.
2
2
 
3
- Table can leverage the max-width property. Learn more on our <a href="https://playbook.powerapp.cloud/global_props/max_width" target="_blank">Max Width Global Props page.</a>
3
+ Table can leverage the max-width property. Learn more in our <a href="https://playbook.powerapp.cloud/visual_guidelines" target="_blank">visual guidelines.</a>
@@ -31,7 +31,6 @@ examples:
31
31
  - table_with_subcomponents_as_divs: Table with Sub Components (Divs)
32
32
  - table_outer_padding: Outer Padding
33
33
  - table_with_collapsible: Table with Collapsible
34
- - table_with_dynamic_collapsible: Table with Dynamic Collapsible
35
34
  - table_with_collapsible_with_custom_click: Table with Collapsible with Custom Click
36
35
  - table_with_collapsible_with_custom_content_rails: Table with Collapsible with Custom Content
37
36
  - table_with_collapsible_with_nested_rows_rails: Table with Collapsible with Nested Rows
@@ -72,7 +71,6 @@ examples:
72
71
  - table_with_subcomponents_as_divs: Table with Sub Components (Divs)
73
72
  - table_outer_padding: Outer Padding
74
73
  - table_with_collapsible: Table with Collapsible
75
- - table_with_dynamic_collapsible: Table with Dynamic Collapsible
76
74
  - table_with_collapsible_with_custom_click: Table with Collapsible with Custom Click
77
75
  - table_with_collapsible_with_custom_content: Table with Collapsible with Custom Content
78
76
  - table_with_collapsible_with_nested_rows: Table with Collapsible with Nested Rows
@@ -29,7 +29,6 @@ export { default as TableStickyLeftColumns } from './_table_sticky_left_columns.
29
29
  export { default as TableStickyRightColumns } from './_table_sticky_right_columns.jsx'
30
30
  export { default as TableStickyColumns } from './_table_sticky_columns.jsx'
31
31
  export { default as TableWithCollapsible } from './_table_with_collapsible.jsx'
32
- export { default as TableWithDynamicCollapsible } from './_table_with_dynamic_collapsible.jsx'
33
32
  export { default as TableWithCollapsibleWithCustomContent } from './_table_with_collapsible_with_custom_content.jsx'
34
33
  export { default as TableWithCollapsibleWithNestedTable } from './_table_with_collapsible_with_nested_table.jsx'
35
34
  export { default as TableWithCollapsibleWithNestedRows } from './_table_with_collapsible_with_nested_rows.jsx'
@@ -99,8 +99,8 @@ module Playbook
99
99
  # Convert camelCase (ex. notAllowed) to kebab-case (ex. not-allowed)
100
100
  cursor.to_s.gsub(/([a-z\d])([A-Z])/, '\1-\2').downcase
101
101
  else
102
- # Default to 'text'
103
- "text"
102
+ # Default to 'pointer'
103
+ "pointer"
104
104
  end
105
105
  end
106
106
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { render, screen, fireEvent, waitFor } from '../utilities/test-utils'
2
+ import { render, screen } from '../utilities/test-utils'
3
3
  import Typeahead from './_typeahead'
4
4
 
5
5
  const options = [
@@ -137,79 +137,4 @@ test('typeahead with colored pills', () => {
137
137
  const kit = screen.getByTestId('pills-color-test')
138
138
  const pill = kit.querySelector(".pb_form_pill_kit.pb_form_pill_neutral")
139
139
  expect(pill).toBeInTheDocument()
140
- })
141
-
142
- test('typeahead with defaultValue with focus behavior', async () => {
143
- render(
144
- <Typeahead
145
- data={{ testid: 'default-value-focus-test' }}
146
- defaultValue={[options[1]]}
147
- options={options}
148
- />
149
- )
150
-
151
- const kit = screen.getByTestId('default-value-focus-test')
152
- const inputDiv = kit.querySelector(".typeahead-kit-select__single-value")
153
- expect(inputDiv).toHaveTextContent("Red")
154
-
155
- // Test that the control can receive focus
156
- const control = kit.querySelector('.typeahead-kit-select__control')
157
- expect(control).toBeInTheDocument()
158
-
159
- // Simulate opening the menu by clicking the control
160
- fireEvent.mouseDown(control)
161
-
162
- // Wait for menu to appear
163
- await waitFor(() => {
164
- const menu = kit.querySelector('.typeahead-kit-select__menu')
165
- expect(menu).toBeInTheDocument()
166
- })
167
-
168
- // Check that the correct option has the focused class
169
- await waitFor(() => {
170
- const focusedOption = kit.querySelector('.typeahead-kit-select__option--is-focused')
171
- expect(focusedOption).toBeInTheDocument()
172
- expect(focusedOption).toHaveTextContent('Red')
173
- })
174
- })
175
-
176
- test('typeahead with grouped options and defaultValue focus behavior', async () => {
177
- const groupedOptions = [
178
- {
179
- label: "Warm Colors",
180
- options: [
181
- { label: "Red", value: "#FF0000" },
182
- { label: "Orange", value: "#FFA500" },
183
- { label: "Yellow", value: "#FFFF00" }
184
- ]
185
- },
186
- {
187
- label: "Cool Colors",
188
- options: [
189
- { label: "Blue", value: "#0000FF" },
190
- { label: "Teal", value: "#008080" },
191
- { label: "Cyan", value: "#00FFFF" }
192
- ]
193
- },
194
- {
195
- label: "Fun Shades",
196
- options: [
197
- { label: "Pink", value: "#FFC0CB" },
198
- { label: "Magenta", value: "#FF00FF" },
199
- { label: "Purple", value: "#800080" }
200
- ]
201
- }
202
- ]
203
-
204
- render(
205
- <Typeahead
206
- data={{ testid: 'grouped-options-focus-test' }}
207
- defaultValue={[{ label: "Pink", value: "#FFC0CB" }]}
208
- options={groupedOptions}
209
- />
210
- )
211
-
212
- const kit = screen.getByTestId('grouped-options-focus-test')
213
- const inputDiv = kit.querySelector(".typeahead-kit-select__single-value")
214
- expect(inputDiv).toHaveTextContent("Pink")
215
140
  })