playbook_ui 18.0.0.pre.alpha.play316819718 → 18.0.0.pre.alpha.play320919498

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 (376) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_background/_background.tsx +1 -4
  3. data/app/pb_kits/playbook/pb_background/background.test.js +1 -23
  4. data/app/pb_kits/playbook/pb_body/_body.tsx +1 -3
  5. data/app/pb_kits/playbook/pb_body/kit.schema.json +0 -1
  6. data/app/pb_kits/playbook/pb_card/_card.tsx +1 -4
  7. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +2 -12
  8. data/app/pb_kits/playbook/pb_card/kit.schema.json +0 -1
  9. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +1 -5
  10. data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +0 -12
  11. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +4 -10
  12. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.test.js +0 -12
  13. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.tsx +4 -9
  14. data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +0 -10
  15. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -16
  16. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +9 -18
  17. data/app/pb_kits/playbook/pb_dropdown/docs/_playground.json +0 -2
  18. data/app/pb_kits/playbook/pb_dropdown/docs/_playground.overrides.json +1 -2
  19. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -8
  20. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +0 -2
  21. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +1 -20
  22. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +2 -205
  23. data/app/pb_kits/playbook/pb_dropdown/index.js +44 -466
  24. data/app/pb_kits/playbook/pb_dropdown/keyboard_accessibility.js +3 -5
  25. data/app/pb_kits/playbook/pb_dropdown/kit.schema.json +3 -56
  26. data/app/pb_kits/playbook/pb_dropdown/subcomponents/MultiSelectTriggerDisplay.tsx +2 -2
  27. data/app/pb_kits/playbook/pb_empty_state/_empty_state.tsx +1 -5
  28. data/app/pb_kits/playbook/pb_empty_state/empty_state.test.jsx +0 -11
  29. data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.tsx +2 -8
  30. data/app/pb_kits/playbook/pb_filter/Filter/index.tsx +6 -48
  31. data/app/pb_kits/playbook/pb_filter/_filter.scss +0 -127
  32. data/app/pb_kits/playbook/pb_filter/_filter.tsx +0 -1
  33. data/app/pb_kits/playbook/pb_filter/docs/_playground.json +0 -2
  34. data/app/pb_kits/playbook/pb_filter/docs/_playground.overrides.json +0 -2
  35. data/app/pb_kits/playbook/pb_filter/docs/example.yml +0 -2
  36. data/app/pb_kits/playbook/pb_filter/docs/index.js +0 -1
  37. data/app/pb_kits/playbook/pb_filter/filter.html.erb +97 -139
  38. data/app/pb_kits/playbook/pb_filter/filter.rb +1 -21
  39. data/app/pb_kits/playbook/pb_filter/filter.test.js +0 -78
  40. data/app/pb_kits/playbook/pb_filter/kit.schema.json +2 -13
  41. data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -3
  42. data/app/pb_kits/playbook/pb_flex/kit.schema.json +0 -1
  43. data/app/pb_kits/playbook/pb_form/docs/example.yml +0 -1
  44. data/app/pb_kits/playbook/pb_multi_level_select/_helper_functions.tsx +1 -12
  45. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +3 -2
  46. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.test.jsx +0 -26
  47. data/app/pb_kits/playbook/pb_multi_level_select/tree_helpers.js +4 -10
  48. data/app/pb_kits/playbook/pb_pagination/_pagination.scss +19 -22
  49. data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +0 -4
  50. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +1 -5
  51. data/app/pb_kits/playbook/pb_passphrase/index.ts +1 -1
  52. data/app/pb_kits/playbook/pb_passphrase/passphrase.html.erb +1 -2
  53. data/app/pb_kits/playbook/pb_passphrase/passphrase.rb +0 -4
  54. data/app/pb_kits/playbook/pb_passphrase/passphrase.test.jsx +1 -28
  55. data/app/pb_kits/playbook/pb_pill/_pill.scss +4 -9
  56. data/app/pb_kits/playbook/pb_pill/_pill.test.jsx +0 -43
  57. data/app/pb_kits/playbook/pb_pill/_pill.tsx +6 -12
  58. data/app/pb_kits/playbook/pb_pill/docs/_pill_notification.jsx +0 -6
  59. data/app/pb_kits/playbook/pb_pill/docs/_playground.json +1 -14
  60. data/app/pb_kits/playbook/pb_pill/docs/_playground.overrides.json +0 -17
  61. data/app/pb_kits/playbook/pb_pill/docs/example.yml +0 -2
  62. data/app/pb_kits/playbook/pb_pill/docs/index.js +0 -1
  63. data/app/pb_kits/playbook/pb_pill/pill.html.erb +1 -5
  64. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +1 -2
  65. data/app/pb_kits/playbook/pb_progress_step/progress_step.test.js +0 -16
  66. data/app/pb_kits/playbook/pb_rich_text_editor/_previewer_mixin.scss +6 -0
  67. data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +6 -0
  68. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.json +1 -1
  69. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.overrides.json +1 -1
  70. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_extensions.html.erb +5 -0
  71. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_extensions.md +7 -0
  72. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_text_align.html.erb +5 -0
  73. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_text_align.md +3 -0
  74. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -0
  75. data/app/pb_kits/playbook/pb_rich_text_editor/kit.schema.json +6 -2
  76. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.html.erb +44 -1
  77. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +28 -0
  78. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor_rails.js +135 -43
  79. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor_rails.test.js +159 -0
  80. data/app/pb_kits/playbook/pb_source/_source.tsx +11 -14
  81. data/app/pb_kits/playbook/pb_source/source.test.js +0 -6
  82. data/app/pb_kits/playbook/pb_table/_table.tsx +1 -1
  83. data/app/pb_kits/playbook/pb_table/docs/{_table_header_rails.md → _table_header.md} +3 -5
  84. data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table.html.erb +0 -75
  85. data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table.jsx +0 -80
  86. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -1
  87. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
  88. data/app/pb_kits/playbook/pb_table/subcomponents/_table_header.tsx +12 -143
  89. data/app/pb_kits/playbook/pb_table/table.rb +1 -1
  90. data/app/pb_kits/playbook/pb_table/table.test.js +1 -134
  91. data/app/pb_kits/playbook/pb_title/_title.tsx +1 -3
  92. data/app/pb_kits/playbook/pb_title/kit.schema.json +0 -1
  93. data/app/pb_kits/playbook/utilities/test/globalProps/globalProps.integration.test.js +5 -7
  94. data/dist/chunks/{_detail-BqqzPTNr.js → _detail-B4-co8rv.js} +2 -2
  95. data/dist/chunks/_table-CUU7TisO.js +1 -0
  96. data/dist/chunks/_typeahead-DeIqOMbJ.js +1 -0
  97. data/dist/chunks/vendor.js +3 -3
  98. data/dist/playbook-rails-react-bindings.js +1 -1
  99. data/dist/playbook-rails.js +1 -1
  100. data/dist/playbook.css +1 -1
  101. data/lib/playbook/changelog_generator.rb +3 -33
  102. data/lib/playbook/forms/builder/checkbox_field.rb +0 -2
  103. data/lib/playbook/forms/builder/collection_select_field.rb +0 -3
  104. data/lib/playbook/forms/builder/date_picker_field.rb +7 -22
  105. data/lib/playbook/forms/builder/dropdown_field.rb +0 -12
  106. data/lib/playbook/forms/builder/form_field_builder.rb +0 -4
  107. data/lib/playbook/forms/builder/intl_telephone_field.rb +0 -8
  108. data/lib/playbook/forms/builder/multi_level_select_field.rb +0 -10
  109. data/lib/playbook/forms/builder/phone_number_field.rb +0 -8
  110. data/lib/playbook/forms/builder/select_field.rb +0 -3
  111. data/lib/playbook/forms/builder/star_rating_field.rb +0 -7
  112. data/lib/playbook/forms/builder/time_picker_field.rb +0 -8
  113. data/lib/playbook/forms/builder/typeahead_field.rb +0 -15
  114. data/lib/playbook/forms/builder.rb +0 -17
  115. data/lib/playbook/pagination_renderer.rb +1 -1
  116. data/lib/playbook/version.rb +1 -1
  117. metadata +11 -263
  118. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_async_custom_content.html.erb +0 -57
  119. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_async_custom_content.md +0 -10
  120. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_async_search.html.erb +0 -42
  121. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_async_search.md +0 -55
  122. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_dynamic_options.html.erb +0 -34
  123. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_dynamic_options.md +0 -4
  124. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_dynamic_options_with_autocomplete.html.erb +0 -35
  125. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_dynamic_options_with_autocomplete.md +0 -1
  126. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_dynamic_options_with_multi_select.html.erb +0 -35
  127. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_dynamic_options_with_multi_select.md +0 -1
  128. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_react_hook.jsx +0 -45
  129. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_react_hook.md +0 -1
  130. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_react_hook.jsx +0 -36
  131. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_react_hook.md +0 -1
  132. data/app/pb_kits/playbook/pb_dropdown/dropdown_index.test.js +0 -1145
  133. data/app/pb_kits/playbook/pb_filter/Filter/FilterResponsive.tsx +0 -116
  134. data/app/pb_kits/playbook/pb_filter/docs/_filter_responsive.html.erb +0 -42
  135. data/app/pb_kits/playbook/pb_filter/docs/_filter_responsive.jsx +0 -76
  136. data/app/pb_kits/playbook/pb_filter/docs/_filter_responsive.md +0 -3
  137. data/app/pb_kits/playbook/pb_form/docs/_form_model_values.html.erb +0 -43
  138. data/app/pb_kits/playbook/pb_form/docs/_form_model_values.md +0 -22
  139. data/app/pb_kits/playbook/pb_pill/docs/_pill_children.html.erb +0 -9
  140. data/app/pb_kits/playbook/pb_pill/docs/_pill_children.jsx +0 -45
  141. data/app/pb_kits/playbook/pb_pill/docs/_pill_children.md +0 -1
  142. data/app/pb_kits/playbook/pb_table/docs/_table_header.jsx +0 -193
  143. data/app/pb_kits/playbook/pb_table/docs/_table_header_react.md +0 -15
  144. data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table_rails.md +0 -5
  145. data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table_react.md +0 -5
  146. data/app/pb_kits/playbook/pb_table/utilities/sortMenuHelpers.test.ts +0 -76
  147. data/app/pb_kits/playbook/pb_table/utilities/sortMenuHelpers.ts +0 -84
  148. data/app/pb_kits/playbook/utilities/global-event-props.schema.json +0 -22
  149. data/app/pb_kits/playbook/utilities/globalEventProps.ts +0 -13
  150. data/app/pb_kits/playbook/utilities/test/globalProps/onClick.test.js +0 -212
  151. data/dist/ai/all-schemas.json +0 -16054
  152. data/dist/ai/external-dependencies.json +0 -1
  153. data/dist/ai/forms.json +0 -1026
  154. data/dist/ai/global-event-props.schema.json +0 -22
  155. data/dist/ai/global-props.schema.json +0 -1271
  156. data/dist/ai/index.json +0 -1048
  157. data/dist/ai/kits/advanced_table.schema.json +0 -334
  158. data/dist/ai/kits/avatar.schema.json +0 -100
  159. data/dist/ai/kits/background.schema.json +0 -238
  160. data/dist/ai/kits/badge.schema.json +0 -83
  161. data/dist/ai/kits/body.schema.json +0 -112
  162. data/dist/ai/kits/bread_crumbs.schema.json +0 -32
  163. data/dist/ai/kits/button.schema.json +0 -292
  164. data/dist/ai/kits/button_toolbar.schema.json +0 -70
  165. data/dist/ai/kits/caption.schema.json +0 -95
  166. data/dist/ai/kits/card.schema.json +0 -204
  167. data/dist/ai/kits/checkbox.schema.json +0 -322
  168. data/dist/ai/kits/circle_icon_button.schema.json +0 -127
  169. data/dist/ai/kits/collapsible.schema.json +0 -109
  170. data/dist/ai/kits/contact.schema.json +0 -69
  171. data/dist/ai/kits/container.schema.json +0 -56
  172. data/dist/ai/kits/copy_button.schema.json +0 -98
  173. data/dist/ai/kits/currency.schema.json +0 -154
  174. data/dist/ai/kits/dashboard_value.schema.json +0 -60
  175. data/dist/ai/kits/date.schema.json +0 -107
  176. data/dist/ai/kits/date_picker.schema.json +0 -581
  177. data/dist/ai/kits/date_range_inline.schema.json +0 -88
  178. data/dist/ai/kits/date_range_stacked.schema.json +0 -48
  179. data/dist/ai/kits/date_stacked.schema.json +0 -90
  180. data/dist/ai/kits/date_time.schema.json +0 -107
  181. data/dist/ai/kits/date_time_stacked.schema.json +0 -74
  182. data/dist/ai/kits/date_year_stacked.schema.json +0 -54
  183. data/dist/ai/kits/detail.schema.json +0 -82
  184. data/dist/ai/kits/dialog.schema.json +0 -188
  185. data/dist/ai/kits/distribution_bar.schema.json +0 -52
  186. data/dist/ai/kits/draggable.schema.json +0 -70
  187. data/dist/ai/kits/dropdown.schema.json +0 -617
  188. data/dist/ai/kits/empty_state.schema.json +0 -121
  189. data/dist/ai/kits/file_upload.schema.json +0 -139
  190. data/dist/ai/kits/filter.schema.json +0 -173
  191. data/dist/ai/kits/fixed_confirmation_toast.schema.json +0 -128
  192. data/dist/ai/kits/flex.schema.json +0 -177
  193. data/dist/ai/kits/form.schema.json +0 -55
  194. data/dist/ai/kits/form_group.schema.json +0 -34
  195. data/dist/ai/kits/form_pill.schema.json +0 -142
  196. data/dist/ai/kits/full_screen.schema.json +0 -93
  197. data/dist/ai/kits/hashtag.schema.json +0 -81
  198. data/dist/ai/kits/highlight.schema.json +0 -39
  199. data/dist/ai/kits/home_address_street.schema.json +0 -136
  200. data/dist/ai/kits/icon.schema.json +0 -201
  201. data/dist/ai/kits/icon_circle.schema.json +0 -83
  202. data/dist/ai/kits/icon_stat_value.schema.json +0 -106
  203. data/dist/ai/kits/icon_value.schema.json +0 -59
  204. data/dist/ai/kits/image.schema.json +0 -78
  205. data/dist/ai/kits/label_pill.schema.json +0 -56
  206. data/dist/ai/kits/label_value.schema.json +0 -94
  207. data/dist/ai/kits/layout.schema.json +0 -129
  208. data/dist/ai/kits/legend.schema.json +0 -54
  209. data/dist/ai/kits/link.schema.json +0 -135
  210. data/dist/ai/kits/list.schema.json +0 -121
  211. data/dist/ai/kits/loading_inline.schema.json +0 -83
  212. data/dist/ai/kits/map.schema.json +0 -62
  213. data/dist/ai/kits/message.schema.json +0 -111
  214. data/dist/ai/kits/multi_level_select.schema.json +0 -377
  215. data/dist/ai/kits/multiple_users.schema.json +0 -77
  216. data/dist/ai/kits/multiple_users_stacked.schema.json +0 -65
  217. data/dist/ai/kits/nav.schema.json +0 -115
  218. data/dist/ai/kits/online_status.schema.json +0 -66
  219. data/dist/ai/kits/overlay.schema.json +0 -112
  220. data/dist/ai/kits/pagination.schema.json +0 -60
  221. data/dist/ai/kits/passphrase.schema.json +0 -117
  222. data/dist/ai/kits/pb_bar_graph.schema.json +0 -42
  223. data/dist/ai/kits/pb_circle_chart.schema.json +0 -42
  224. data/dist/ai/kits/pb_gauge_chart.schema.json +0 -42
  225. data/dist/ai/kits/pb_line_graph.schema.json +0 -42
  226. data/dist/ai/kits/person.schema.json +0 -40
  227. data/dist/ai/kits/person_contact.schema.json +0 -47
  228. data/dist/ai/kits/phone_number_input.schema.json +0 -387
  229. data/dist/ai/kits/pill.schema.json +0 -80
  230. data/dist/ai/kits/popover.schema.json +0 -137
  231. data/dist/ai/kits/progress_pills.schema.json +0 -70
  232. data/dist/ai/kits/progress_simple.schema.json +0 -96
  233. data/dist/ai/kits/progress_step.schema.json +0 -84
  234. data/dist/ai/kits/radio.schema.json +0 -117
  235. data/dist/ai/kits/rich_text_editor.schema.json +0 -194
  236. data/dist/ai/kits/section_separator.schema.json +0 -89
  237. data/dist/ai/kits/select.schema.json +0 -423
  238. data/dist/ai/kits/selectable_card.schema.json +0 -126
  239. data/dist/ai/kits/selectable_card_icon.schema.json +0 -129
  240. data/dist/ai/kits/selectable_icon.schema.json +0 -116
  241. data/dist/ai/kits/selectable_list.schema.json +0 -58
  242. data/dist/ai/kits/skeleton_loading.schema.json +0 -111
  243. data/dist/ai/kits/source.schema.json +0 -68
  244. data/dist/ai/kits/star_rating.schema.json +0 -329
  245. data/dist/ai/kits/stat_change.schema.json +0 -62
  246. data/dist/ai/kits/stat_value.schema.json +0 -49
  247. data/dist/ai/kits/table.schema.json +0 -262
  248. data/dist/ai/kits/text_input.schema.json +0 -667
  249. data/dist/ai/kits/textarea.schema.json +0 -364
  250. data/dist/ai/kits/time.schema.json +0 -104
  251. data/dist/ai/kits/time_picker.schema.json +0 -325
  252. data/dist/ai/kits/time_range_inline.schema.json +0 -89
  253. data/dist/ai/kits/time_stacked.schema.json +0 -70
  254. data/dist/ai/kits/timeline.schema.json +0 -64
  255. data/dist/ai/kits/timestamp.schema.json +0 -138
  256. data/dist/ai/kits/title.schema.json +0 -111
  257. data/dist/ai/kits/title_count.schema.json +0 -71
  258. data/dist/ai/kits/title_detail.schema.json +0 -53
  259. data/dist/ai/kits/toggle.schema.json +0 -80
  260. data/dist/ai/kits/tooltip.schema.json +0 -174
  261. data/dist/ai/kits/typeahead.schema.json +0 -532
  262. data/dist/ai/kits/user.schema.json +0 -157
  263. data/dist/ai/kits/user_badge.schema.json +0 -51
  264. data/dist/ai/kits/weekday_stacked.schema.json +0 -73
  265. data/dist/ai/playgrounds/advanced_table.json +0 -1
  266. data/dist/ai/playgrounds/avatar.json +0 -1
  267. data/dist/ai/playgrounds/background.json +0 -1
  268. data/dist/ai/playgrounds/badge.json +0 -1
  269. data/dist/ai/playgrounds/body.json +0 -1
  270. data/dist/ai/playgrounds/bread_crumbs.json +0 -1
  271. data/dist/ai/playgrounds/button.json +0 -1
  272. data/dist/ai/playgrounds/button_toolbar.json +0 -1
  273. data/dist/ai/playgrounds/caption.json +0 -1
  274. data/dist/ai/playgrounds/card.json +0 -1
  275. data/dist/ai/playgrounds/checkbox.json +0 -1
  276. data/dist/ai/playgrounds/circle_icon_button.json +0 -1
  277. data/dist/ai/playgrounds/collapsible.json +0 -1
  278. data/dist/ai/playgrounds/contact.json +0 -1
  279. data/dist/ai/playgrounds/container.json +0 -1
  280. data/dist/ai/playgrounds/copy_button.json +0 -1
  281. data/dist/ai/playgrounds/currency.json +0 -1
  282. data/dist/ai/playgrounds/dashboard_value.json +0 -1
  283. data/dist/ai/playgrounds/date.json +0 -1
  284. data/dist/ai/playgrounds/date_picker.json +0 -1
  285. data/dist/ai/playgrounds/date_range_inline.json +0 -1
  286. data/dist/ai/playgrounds/date_range_stacked.json +0 -1
  287. data/dist/ai/playgrounds/date_stacked.json +0 -1
  288. data/dist/ai/playgrounds/date_time.json +0 -1
  289. data/dist/ai/playgrounds/date_time_stacked.json +0 -1
  290. data/dist/ai/playgrounds/date_year_stacked.json +0 -1
  291. data/dist/ai/playgrounds/detail.json +0 -1
  292. data/dist/ai/playgrounds/dialog.json +0 -1
  293. data/dist/ai/playgrounds/distribution_bar.json +0 -1
  294. data/dist/ai/playgrounds/draggable.json +0 -1
  295. data/dist/ai/playgrounds/dropdown.json +0 -1
  296. data/dist/ai/playgrounds/empty_state.json +0 -1
  297. data/dist/ai/playgrounds/file_upload.json +0 -1
  298. data/dist/ai/playgrounds/filter.json +0 -1
  299. data/dist/ai/playgrounds/fixed_confirmation_toast.json +0 -1
  300. data/dist/ai/playgrounds/flex.json +0 -1
  301. data/dist/ai/playgrounds/form_group.json +0 -1
  302. data/dist/ai/playgrounds/form_pill.json +0 -1
  303. data/dist/ai/playgrounds/full_screen.json +0 -1
  304. data/dist/ai/playgrounds/hashtag.json +0 -1
  305. data/dist/ai/playgrounds/highlight.json +0 -1
  306. data/dist/ai/playgrounds/home_address_street.json +0 -1
  307. data/dist/ai/playgrounds/icon.json +0 -1
  308. data/dist/ai/playgrounds/icon_circle.json +0 -1
  309. data/dist/ai/playgrounds/icon_stat_value.json +0 -1
  310. data/dist/ai/playgrounds/icon_value.json +0 -1
  311. data/dist/ai/playgrounds/image.json +0 -1
  312. data/dist/ai/playgrounds/index.json +0 -1
  313. data/dist/ai/playgrounds/label_pill.json +0 -1
  314. data/dist/ai/playgrounds/label_value.json +0 -1
  315. data/dist/ai/playgrounds/layout.json +0 -1
  316. data/dist/ai/playgrounds/legend.json +0 -1
  317. data/dist/ai/playgrounds/link.json +0 -1
  318. data/dist/ai/playgrounds/list.json +0 -1
  319. data/dist/ai/playgrounds/loading_inline.json +0 -1
  320. data/dist/ai/playgrounds/map.json +0 -1
  321. data/dist/ai/playgrounds/message.json +0 -1
  322. data/dist/ai/playgrounds/multi_level_select.json +0 -1
  323. data/dist/ai/playgrounds/multiple_users.json +0 -1
  324. data/dist/ai/playgrounds/multiple_users_stacked.json +0 -1
  325. data/dist/ai/playgrounds/nav.json +0 -1
  326. data/dist/ai/playgrounds/online_status.json +0 -1
  327. data/dist/ai/playgrounds/overlay.json +0 -1
  328. data/dist/ai/playgrounds/pagination.json +0 -1
  329. data/dist/ai/playgrounds/passphrase.json +0 -1
  330. data/dist/ai/playgrounds/pb_bar_graph.json +0 -1
  331. data/dist/ai/playgrounds/pb_circle_chart.json +0 -1
  332. data/dist/ai/playgrounds/pb_gauge_chart.json +0 -1
  333. data/dist/ai/playgrounds/pb_line_graph.json +0 -1
  334. data/dist/ai/playgrounds/person.json +0 -1
  335. data/dist/ai/playgrounds/person_contact.json +0 -1
  336. data/dist/ai/playgrounds/phone_number_input.json +0 -1
  337. data/dist/ai/playgrounds/pill.json +0 -1
  338. data/dist/ai/playgrounds/popover.json +0 -1
  339. data/dist/ai/playgrounds/progress_pills.json +0 -1
  340. data/dist/ai/playgrounds/progress_simple.json +0 -1
  341. data/dist/ai/playgrounds/progress_step.json +0 -1
  342. data/dist/ai/playgrounds/radio.json +0 -1
  343. data/dist/ai/playgrounds/rich_text_editor.json +0 -1
  344. data/dist/ai/playgrounds/section_separator.json +0 -1
  345. data/dist/ai/playgrounds/select.json +0 -1
  346. data/dist/ai/playgrounds/selectable_card.json +0 -1
  347. data/dist/ai/playgrounds/selectable_card_icon.json +0 -1
  348. data/dist/ai/playgrounds/selectable_icon.json +0 -1
  349. data/dist/ai/playgrounds/selectable_list.json +0 -1
  350. data/dist/ai/playgrounds/skeleton_loading.json +0 -1
  351. data/dist/ai/playgrounds/source.json +0 -1
  352. data/dist/ai/playgrounds/star_rating.json +0 -1
  353. data/dist/ai/playgrounds/stat_change.json +0 -1
  354. data/dist/ai/playgrounds/stat_value.json +0 -1
  355. data/dist/ai/playgrounds/table.json +0 -1
  356. data/dist/ai/playgrounds/text_input.json +0 -1
  357. data/dist/ai/playgrounds/textarea.json +0 -1
  358. data/dist/ai/playgrounds/time.json +0 -1
  359. data/dist/ai/playgrounds/time_picker.json +0 -1
  360. data/dist/ai/playgrounds/time_range_inline.json +0 -1
  361. data/dist/ai/playgrounds/time_stacked.json +0 -1
  362. data/dist/ai/playgrounds/timeline.json +0 -1
  363. data/dist/ai/playgrounds/timestamp.json +0 -1
  364. data/dist/ai/playgrounds/title.json +0 -1
  365. data/dist/ai/playgrounds/title_count.json +0 -1
  366. data/dist/ai/playgrounds/title_detail.json +0 -1
  367. data/dist/ai/playgrounds/toggle.json +0 -1
  368. data/dist/ai/playgrounds/tooltip.json +0 -1
  369. data/dist/ai/playgrounds/typeahead.json +0 -1
  370. data/dist/ai/playgrounds/user.json +0 -1
  371. data/dist/ai/playgrounds/user_badge.json +0 -1
  372. data/dist/ai/playgrounds/weekday_stacked.json +0 -1
  373. data/dist/ai/visual-index.json +0 -1
  374. data/dist/chunks/_table-D7wuBFbb.js +0 -1
  375. data/dist/chunks/_typeahead-KNcX62pc.js +0 -1
  376. data/lib/playbook/forms/builder/attribute_defaults.rb +0 -118
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebef29a822dd3e6eb0e454d6afec3b2b907604218c919f19d121458ae9003185
4
- data.tar.gz: 7f7afd7e578aaa05b0ae0785430c0d2d70f982330840e7308e72bac0bca89065
3
+ metadata.gz: 3af0b188f87053d463603829df3767654f8de44a60f29eac5461b101a9c151d5
4
+ data.tar.gz: d541b26c3db0e6318e9b16e40507a4258b428bf4a9e549211a5a9f3b64426594
5
5
  SHA512:
6
- metadata.gz: 45c9ad187bc22ea466a8c1301cb0dafedfb0571bd251ba44a1c3b6cc3c6a968b06157229004195f5dfb1bc1fc07a7dd1ab750a27cfb2b3828b28b5f8ce2377c5
7
- data.tar.gz: 1bcc20a346eead634ac46acf75b65da3d4cba3a4df31f674a3184b205ba5b00d3fd281c674fea766dd399c73e12f0a7a40c8f06faa6a23a939fdf37af9161742
6
+ metadata.gz: 775749829145497000f59badfacaaad4ba79a49e14833c893f42a6bb42bda54c839affd668e2664bdd27641b251919ffc7257272cb5107b432abef03d03cefe1
7
+ data.tar.gz: 31a4797e342999ca8dbd9cad3197b28e9864de04527aa0e52ee5c841e0152ddd11bdf98f4ed7eb35b895ff3b4f0dc7f2778b83d179d916cda062a6900a36ca51
@@ -98,7 +98,7 @@ const Background = (props: BackgroundProps): React.ReactElement => {
98
98
  imageUrl: getResponsiveValue(imageUrl),
99
99
  });
100
100
 
101
- // Keep responsive values in sync when props change, and on window resize.
101
+ // Update responsive values on window resize.
102
102
  useEffect(() => {
103
103
  const updateResponsiveProps = () => {
104
104
  setResponsiveProps({
@@ -109,7 +109,6 @@ const Background = (props: BackgroundProps): React.ReactElement => {
109
109
  imageUrl: getResponsiveValue(imageUrl),
110
110
  });
111
111
  };
112
- updateResponsiveProps();
113
112
  window.addEventListener('resize', updateResponsiveProps);
114
113
  return () => window.removeEventListener('resize', updateResponsiveProps);
115
114
  }, [backgroundSize, backgroundPosition, backgroundRepeat, backgroundColor, imageUrl]);
@@ -154,8 +153,6 @@ const Background = (props: BackgroundProps): React.ReactElement => {
154
153
  ...dynamicInlineProps
155
154
  };
156
155
 
157
- // Dynamic HTML tag from props; matches other kits (Title, Collapsible, etc.).
158
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
159
156
  const Tag: React.ReactElement | any = `${tag}`;
160
157
  const ariaProps = buildAriaProps(aria);
161
158
  const dataProps = buildDataProps(data);
@@ -1,5 +1,4 @@
1
- import React from 'react'
2
- import { ensureAccessible, render, renderKit } from '../utilities/test-utils'
1
+ import { ensureAccessible, renderKit } from '../utilities/test-utils'
3
2
 
4
3
  import Background from './_background'
5
4
 
@@ -21,27 +20,6 @@ test('backgroundColor = category_1', () => {
21
20
  expect(kit).toHaveClass('pb_background_kit pb_background_color_category_1')
22
21
  })
23
22
 
24
- test('updates backgroundColor class when the prop changes', () => {
25
- const { getByTestId, rerender } = render(
26
- <Background
27
- backgroundColor="info_subtle"
28
- data={{ testid: 'background' }}
29
- />
30
- )
31
-
32
- expect(getByTestId('background')).toHaveClass('pb_background_color_info_subtle')
33
-
34
- rerender(
35
- <Background
36
- backgroundColor="card_light"
37
- data={{ testid: 'background' }}
38
- />
39
- )
40
-
41
- expect(getByTestId('background')).toHaveClass('pb_background_color_card_light')
42
- expect(getByTestId('background')).not.toHaveClass('pb_background_color_info_subtle')
43
- })
44
-
45
23
  test('customColor prop styles background color with a hex value', () => {
46
24
  const kit = renderKit(Background, props, { customColor: '#1d99a8' })
47
25
 
@@ -3,7 +3,6 @@ import classnames from 'classnames'
3
3
 
4
4
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
5
  import { deprecatedProps, globalProps, GlobalProps } from '../utilities/globalProps'
6
- import { globalEventProps, GlobalEventProps } from '../utilities/globalEventProps'
7
6
 
8
7
  import Highlight from '../pb_highlight/_highlight'
9
8
 
@@ -22,7 +21,7 @@ type BodyProps = {
22
21
  tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div',
23
22
  text?: string,
24
23
  variant?: null | 'link',
25
- } & GlobalProps & GlobalEventProps
24
+ } & GlobalProps
26
25
 
27
26
  const Body = (props: BodyProps): React.ReactElement => {
28
27
  if (props.variant) deprecatedProps() //status prop is deprecated, use color instead please
@@ -57,7 +56,6 @@ const Body = (props: BodyProps): React.ReactElement => {
57
56
  {...ariaProps}
58
57
  {...dataProps}
59
58
  {...htmlProps}
60
- {...globalEventProps(props)}
61
59
  className={classes}
62
60
  id={id}
63
61
  >
@@ -94,7 +94,6 @@
94
94
  }
95
95
  },
96
96
  "globalProps": true,
97
- "globalEventProps": true,
98
97
  "usage": {
99
98
  "react": {
100
99
  "import": "import { Body } from 'playbook-ui'",
@@ -7,7 +7,6 @@ import classnames from 'classnames'
7
7
 
8
8
  import { buildAriaProps, buildDataProps, buildHtmlProps } from '../utilities/props'
9
9
  import { GlobalProps, globalProps, globalInlineProps } from '../utilities/globalProps'
10
- import { GlobalEventProps, globalEventProps } from '../utilities/globalEventProps'
11
10
  import type { ProductColors, CategoryColors, BackgroundColors, StatusColors } from '../types/colors'
12
11
 
13
12
  import Icon from '../pb_icon/_icon'
@@ -35,7 +34,7 @@ type CardPropTypes = {
35
34
  padding?: string,
36
35
  selected?: boolean,
37
36
  tag?: "div" | "section" | "footer" | "header" | "article" | "aside" | "main" | "nav",
38
- } & GlobalProps & GlobalEventProps
37
+ } & GlobalProps
39
38
 
40
39
  type CardHeaderProps = {
41
40
  headerColor?: BackgroundColors | ProductColors | CategoryColors | StatusColors | "none",
@@ -157,7 +156,6 @@ const Card = (props: CardPropTypes): React.ReactElement => {
157
156
  {...dataProps}
158
157
  className={classnames(cardCss, globalProps(props), className)}
159
158
  {...restHtmlProps}
160
- {...globalEventProps(props)}
161
159
  style={mergedStyles}
162
160
  >
163
161
  {subComponentTags('Header')}
@@ -187,7 +185,6 @@ const Card = (props: CardPropTypes): React.ReactElement => {
187
185
  {...dataProps}
188
186
  className={classnames(cardCss, globalProps(props), className)}
189
187
  {...restHtmlProps}
190
- {...globalEventProps(props)}
191
188
  style={mergedStyles}
192
189
  >
193
190
  {subComponentTags('Header')}
@@ -25,16 +25,6 @@ $additional_colors: (
25
25
  );
26
26
  $background_colors: map-merge($product_colors, $additional_colors);
27
27
  $pb_card_header_colors: map-merge(map-merge(map-merge($product_colors, $additional_colors), $category_colors), $status_colors);
28
- // Prop sizes only — legacy $border_radius keys like "light" collide with background_light.
29
- $pb_card_border_radius_values: (
30
- xs: $border_radius_xs,
31
- sm: $border_radius_sm,
32
- md: $border_radius_md,
33
- lg: $border_radius_lg,
34
- xl: $border_radius_xl,
35
- none: $border_radius_none,
36
- rounded: $border_radius_rounded,
37
- );
38
28
 
39
29
  @mixin pb_card_selected($border_color: $primary) {
40
30
  border-color: $border_color;
@@ -73,8 +63,8 @@ $pb_card_border_radius_values: (
73
63
  }
74
64
  }
75
65
 
76
- @each $name, $radius in $pb_card_border_radius_values {
77
- &.pb_card_kit_border_radius_#{$name} {
66
+ @each $name, $radius in $border_radius {
67
+ &[class*=_#{$name}] {
78
68
  border-radius: $radius;
79
69
  }
80
70
  }
@@ -186,7 +186,6 @@
186
186
  }
187
187
  },
188
188
  "globalProps": true,
189
- "globalEventProps": true,
190
189
  "usage": {
191
190
  "react": {
192
191
  "import": "import { Card } from 'playbook-ui'",
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
- import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
3
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
4
4
  import { globalProps } from '../utilities/globalProps'
5
5
 
6
6
  import Button from '../pb_button/_button'
@@ -13,7 +13,6 @@ type CopyButtonProps = {
13
13
  aria?: { [key: string]: string }
14
14
  className?: string
15
15
  data?: { [key: string]: string }
16
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)}
17
16
  id?: string
18
17
  from?: string
19
18
  text?: string
@@ -30,7 +29,6 @@ const CopyButton = (props: CopyButtonProps) => {
30
29
  className,
31
30
  data = {},
32
31
  from = '',
33
- htmlOptions = {},
34
32
  id,
35
33
  text = 'Copy',
36
34
  timeout = 1000,
@@ -44,14 +42,12 @@ const CopyButton = (props: CopyButtonProps) => {
44
42
 
45
43
  const ariaProps = buildAriaProps(aria)
46
44
  const dataProps = buildDataProps(data)
47
- const htmlProps = buildHtmlProps(htmlOptions)
48
45
  const classes = classnames(buildCss('pb_copy_button_kit'), globalProps(props), className)
49
46
 
50
47
  return (
51
48
  <div
52
49
  {...ariaProps}
53
50
  {...dataProps}
54
- {...htmlProps}
55
51
  className={classes}
56
52
  id={id}
57
53
  >
@@ -86,15 +86,3 @@ test('passes text and tooltip props to button', () => {
86
86
  const tooltip = kit.querySelector('.pb_tooltip_kit')
87
87
  expect(tooltip).toBeInTheDocument()
88
88
  })
89
-
90
- test('applies htmlOptions to the root element', () => {
91
- render(
92
- <CopyButton
93
- data={{ testid: 'html-options-test' }}
94
- htmlOptions={{ title: 'copy title' }}
95
- value="copy"
96
- />
97
- )
98
-
99
- expect(screen.getByTestId('html-options-test')).toHaveAttribute('title', 'copy title')
100
- })
@@ -1,6 +1,5 @@
1
1
 
2
2
  import React from 'react'
3
- import classnames from 'classnames'
4
3
 
5
4
  import { buildCss, buildHtmlProps } from '../utilities/props'
6
5
  import { deprecatedProps, globalProps } from '../utilities/globalProps'
@@ -12,7 +11,6 @@ import TimeStacked from '../pb_time_stacked/_time_stacked'
12
11
  import DateStacked from '../pb_date_stacked/_date_stacked'
13
12
 
14
13
  type DateTimeStackedProps = {
15
- className?: string,
16
14
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
17
15
  id?: string,
18
16
  date: Date,
@@ -29,25 +27,20 @@ const DateTimeStacked = (props: DateTimeStackedProps): React.ReactElement => {
29
27
  date,
30
28
  datetime,
31
29
  dark,
32
- className,
33
30
  htmlOptions = {},
34
31
  timeZone = 'America/New_York',
35
32
  showCurrentYear = false,
36
33
  } = props
37
34
 
38
- const classes = classnames(
39
- buildCss('pb_date_time_stacked_kit'),
40
- globalProps(props),
41
- className
42
- )
35
+ const classes = buildCss('pb_date_time_stacked_kit', globalProps(props))
36
+ const htmlProps = buildHtmlProps(htmlOptions)
43
37
 
44
38
  return (
45
39
  <Flex
46
- htmlOptions={htmlOptions}
47
40
  inline={false}
48
41
  vertical="stretch"
42
+ {...htmlProps}
49
43
  {...props}
50
- className={classes}
51
44
  >
52
45
  <FlexItem>
53
46
  <DateStacked
@@ -65,6 +58,7 @@ const DateTimeStacked = (props: DateTimeStackedProps): React.ReactElement => {
65
58
  />
66
59
  <FlexItem>
67
60
  <TimeStacked
61
+ className={classes}
68
62
  dark={dark}
69
63
  date={date || datetime}
70
64
  timeZone={timeZone}
@@ -74,15 +74,3 @@ test('hides current year by default', () => {
74
74
  expect(yearElement).toBeNull()
75
75
  }
76
76
  })
77
-
78
- test('applies kit class and global props to the root', () => {
79
- const kit = renderKit(DateTimeStacked, {
80
- data: { testid: 'datetimestacked-root' },
81
- datetime,
82
- dark: false,
83
- margin: 'md',
84
- })
85
-
86
- expect(kit).toHaveClass('pb_date_time_stacked_kit')
87
- expect(kit).toHaveClass('m_md')
88
- })
@@ -1,27 +1,22 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
- import { buildCss, buildHtmlProps } from '../../utilities/props'
3
+ import { buildCss } from '../../utilities/props'
4
4
  import { globalProps } from '../../utilities/globalProps'
5
5
 
6
6
  type DialogBodyProps = {
7
7
  children: React.ReactNode | React.ReactNode[] | string,
8
8
  padding?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl",
9
- className?: string,
10
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
9
+ className?: string
11
10
  }
12
11
 
13
12
  // Body component
14
13
  const DialogBody = (props: DialogBodyProps): React.ReactElement => {
15
- const { children, className, htmlOptions = {} } = props
14
+ const { children, className } = props
16
15
  const bodyCSS = buildCss("dialog_body")
17
16
  const bodySpacing = globalProps(props)
18
- const htmlProps = buildHtmlProps(htmlOptions)
19
17
 
20
18
  return (
21
- <div
22
- {...htmlProps}
23
- className={classnames(bodyCSS, bodySpacing, className)}
24
- >
19
+ <div className={classnames(bodyCSS, bodySpacing, className)}>
25
20
  {children}
26
21
  </div>
27
22
  )
@@ -268,13 +268,3 @@ describe('isNativeSelectMenuInteraction', () => {
268
268
  expect(isNativeSelectMenuInteraction(dialog, select)).toBe(false)
269
269
  })
270
270
  })
271
-
272
- test("applies htmlOptions to Dialog.Body", () => {
273
- render(
274
- <Dialog.Body htmlOptions={{ title: "body title" }}>
275
- {"Body content"}
276
- </Dialog.Body>
277
- )
278
-
279
- expect(document.querySelector(".dialog_body")).toHaveAttribute("title", "body title")
280
- })
@@ -106,22 +106,6 @@
106
106
  }
107
107
  }
108
108
 
109
- // Let Rails autocomplete use the trigger space left by its action icons.
110
- > :has([data-dropdown-autocomplete]) {
111
- flex: 1;
112
- min-width: 0;
113
-
114
- .pb_flex_kit:has([data-dropdown-autocomplete]) {
115
- min-width: 0;
116
- width: 100%;
117
- }
118
-
119
- [data-dropdown-autocomplete] {
120
- min-width: 0;
121
- width: 100%;
122
- }
123
- }
124
-
125
109
  .dropdown_input:disabled {
126
110
  background-color: $input_background_disabled;
127
111
  color: $input_text_disabled;
@@ -112,8 +112,6 @@ type DropdownProps = {
112
112
  isClosed?: boolean;
113
113
  label?: string;
114
114
  multiSelect?: boolean;
115
- name?: string;
116
- onChange?: (event: { target: { name?: string; value: any } }) => void;
117
115
  onSelect?: (arg: GenericObject) => null;
118
116
  options?: GenericObject;
119
117
  placeholder?: string;
@@ -158,8 +156,6 @@ let Dropdown = (props: DropdownProps, ref: any): React.ReactElement | null => {
158
156
  label,
159
157
  multiSelect = false,
160
158
  formPillProps,
161
- name,
162
- onChange,
163
159
  onSelect,
164
160
  options,
165
161
  placeholder,
@@ -418,10 +414,6 @@ let Dropdown = (props: DropdownProps, ref: any): React.ReactElement | null => {
418
414
  setIsDropDownClosed(false);
419
415
  };
420
416
 
421
- const handleSelectionChange = (value: any) => {
422
- onSelect && onSelect(value);
423
- onChange && onChange({ target: { name, value } });
424
- };
425
417
 
426
418
  const handleOptionClick = (clickedItem: GenericObject) => {
427
419
  if (disabled) return;
@@ -434,7 +426,7 @@ let Dropdown = (props: DropdownProps, ref: any): React.ReactElement | null => {
434
426
  const next = exists
435
427
  ? list.filter((option) => option.value !== clickedItem.value)
436
428
  : [...list, clickedItem];
437
- handleSelectionChange(next);
429
+ onSelect && onSelect(next);
438
430
  return next;
439
431
  });
440
432
  setFilterItem("");
@@ -447,7 +439,7 @@ let Dropdown = (props: DropdownProps, ref: any): React.ReactElement | null => {
447
439
  if (shouldCloseOnClick) {
448
440
  setIsDropDownClosed(true);
449
441
  }
450
- handleSelectionChange(clickedItem);
442
+ onSelect && onSelect(clickedItem);
451
443
 
452
444
  // Sync with DatePickers if this is a quickpick variant
453
445
  if (variant === "quickpick" && Array.isArray(clickedItem.value)) {
@@ -476,10 +468,10 @@ let Dropdown = (props: DropdownProps, ref: any): React.ReactElement | null => {
476
468
  if (disabled) return;
477
469
  if (multiSelect) {
478
470
  setSelected([]);
479
- handleSelectionChange([]);
471
+ onSelect && onSelect([]);
480
472
  } else {
481
473
  setSelected({});
482
- handleSelectionChange(null);
474
+ onSelect && onSelect(null);
483
475
  setFocusedOptionIndex(-1);
484
476
  setFilterItem("");
485
477
 
@@ -513,10 +505,10 @@ let Dropdown = (props: DropdownProps, ref: any): React.ReactElement | null => {
513
505
  clearSelected: () => {
514
506
  if (multiSelect) {
515
507
  setSelected([]);
516
- handleSelectionChange([]);
508
+ onSelect && onSelect([]);
517
509
  } else {
518
510
  setSelected({});
519
- handleSelectionChange(null);
511
+ onSelect && onSelect(null);
520
512
  }
521
513
  setFilterItem("");
522
514
  setIsDropDownClosed(true);
@@ -530,16 +522,16 @@ let Dropdown = (props: DropdownProps, ref: any): React.ReactElement | null => {
530
522
  clearSelected: () => {
531
523
  if (multiSelect) {
532
524
  setSelected([]);
533
- handleSelectionChange([]);
525
+ onSelect && onSelect([]);
534
526
  } else {
535
527
  setSelected({});
536
- handleSelectionChange(null);
528
+ onSelect && onSelect(null);
537
529
  }
538
530
  setFilterItem("");
539
531
  setIsDropDownClosed(true);
540
532
  },
541
533
  };
542
- }, [multiSelect, handleSelectionChange, setSelected, setFilterItem, setIsDropDownClosed]);
534
+ }, [multiSelect, onSelect, setSelected, setFilterItem, setIsDropDownClosed]);
543
535
 
544
536
  useImperativeHandle(ref, () => imperativeRef.current);
545
537
 
@@ -602,7 +594,6 @@ let Dropdown = (props: DropdownProps, ref: any): React.ReactElement | null => {
602
594
  handleBackspace,
603
595
  handleChange,
604
596
  handleOptionClick,
605
- handleSelectionChange,
606
597
  handleWrapperClick,
607
598
  inputRef,
608
599
  inputWrapperRef,
@@ -88,7 +88,6 @@
88
88
  "name": "Content",
89
89
  "props": [
90
90
  "label",
91
- "name",
92
91
  "placeholder",
93
92
  "options",
94
93
  "defaultValue",
@@ -131,7 +130,6 @@
131
130
  {
132
131
  "name": "Events",
133
132
  "props": [
134
- "onChange",
135
133
  "onSelect"
136
134
  ]
137
135
  }
@@ -70,7 +70,6 @@
70
70
  "name": "Content",
71
71
  "props": [
72
72
  "label",
73
- "name",
74
73
  "placeholder",
75
74
  "options",
76
75
  "defaultValue",
@@ -112,7 +111,7 @@
112
111
  },
113
112
  {
114
113
  "name": "Events",
115
- "props": ["onChange", "onSelect"]
114
+ "props": ["onSelect"]
116
115
  }
117
116
  ],
118
117
  "presets": [
@@ -2,8 +2,6 @@ examples:
2
2
  rails:
3
3
  - dropdown_default_rails: Default
4
4
  - dropdown_with_autocomplete: Autocomplete
5
- - dropdown_async_search: Async Search
6
- - dropdown_async_custom_content: Async Search with Custom Content
7
5
  - dropdown_multi_select_rails: Multi Select
8
6
  - dropdown_multi_select_with_autocomplete: Multi Select with Autocomplete
9
7
  - dropdown_multi_select_display_rails: Multi Select with Form Pill Props
@@ -41,9 +39,6 @@ examples:
41
39
  - dropdown_disabled: Disabled Input
42
40
  - dropdown_grouped_options: Grouped Options
43
41
  - dropdown_custom_event_type: Custom Event Type
44
- - dropdown_dynamic_options: Dynamic Options
45
- - dropdown_dynamic_options_with_autocomplete: Dynamic Options with Autocomplete
46
- - dropdown_dynamic_options_with_multi_select: Dynamic Options with Multi Select
47
42
 
48
43
  react:
49
44
  - dropdown_default: Default
@@ -86,6 +81,3 @@ examples:
86
81
  - dropdown_required_indicator: Required Indicator
87
82
  - dropdown_disabled: Disabled Input
88
83
  - dropdown_grouped_options: Grouped Options
89
- - dropdown_react_hook: React Hook
90
- - dropdown_multi_select_react_hook: React Hook Multi Select
91
-
@@ -1,6 +1,4 @@
1
1
  export { default as DropdownDefault } from './_dropdown_default.jsx'
2
- export { default as DropdownReactHook } from './_dropdown_react_hook.jsx'
3
- export { default as DropdownMultiSelectReactHook } from './_dropdown_multi_select_react_hook.jsx'
4
2
  export { default as DropdownWithCustomDisplay } from './_dropdown_with_custom_display.jsx'
5
3
  export { default as DropdownWithCustomOptions } from './_dropdown_with_custom_options.jsx'
6
4
  export { default as DropdownWithCustomTrigger } from './_dropdown_with_custom_trigger.jsx'
@@ -27,9 +27,6 @@ module Playbook
27
27
  default: true
28
28
  prop :autocomplete, type: Playbook::Props::Boolean,
29
29
  default: false
30
- prop :async, type: Playbook::Props::Boolean, default: false
31
- prop :search_term_minimum_length, default: 3
32
- prop :search_debounce_timeout, default: 250
33
30
  prop :searchbar, type: Playbook::Props::Boolean,
34
31
  default: false
35
32
  prop :multi_select, type: Playbook::Props::Boolean,
@@ -62,22 +59,10 @@ module Playbook
62
59
  default: false
63
60
  prop :custom_event_type, type: Playbook::Props::String,
64
61
  default: ""
65
- prop :options_by_context, type: Playbook::Props::HashProp,
66
- default: {}
67
- prop :context_selector, type: Playbook::Props::String,
68
- default: ""
69
- prop :clear_on_context_change, type: Playbook::Props::Boolean,
70
- default: true
71
- prop :options_event_type, type: Playbook::Props::String,
72
- default: ""
73
62
 
74
63
  def data
75
64
  Hash(prop(:data)).merge(
76
65
  pb_dropdown: true,
77
- pb_dropdown_async: async ? true : nil,
78
- pb_dropdown_default_value: async && default_value.present? ? default_value.to_json : nil,
79
- pb_dropdown_search_term_minimum_length: async ? search_term_minimum_length : nil,
80
- pb_dropdown_search_debounce_timeout: async ? search_debounce_timeout : nil,
81
66
  pb_dropdown_multi_select: multi_select,
82
67
  pb_dropdown_disabled: disabled,
83
68
  pb_dropdown_variant: variant,
@@ -88,11 +73,7 @@ module Playbook
88
73
  end_date_id: variant == "quickpick" ? end_date_id : nil,
89
74
  controls_start_id: variant == "quickpick" && controls_start_id.present? ? controls_start_id : nil,
90
75
  controls_end_id: variant == "quickpick" && controls_end_id.present? ? controls_end_id : nil,
91
- custom_event_type: custom_event_type.presence,
92
- pb_dropdown_options_by_context: options_by_context.present? ? options_by_context.to_json : nil,
93
- pb_dropdown_context_selector: context_selector.presence,
94
- pb_dropdown_clear_on_context_change: clear_on_context_change,
95
- options_event_type: options_event_type.presence
76
+ custom_event_type: custom_event_type.presence
96
77
  ).compact
97
78
  end
98
79