playbook_ui 18.0.0.pre.alpha.PLAY3247selecterrorstylinginwrapperbug19801 → 18.0.0.pre.alpha.PLAY321919500

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 (380) 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_picker/_date_picker.tsx +0 -3
  12. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +0 -3
  13. data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +0 -14
  14. data/app/pb_kits/playbook/pb_date_picker/docs/_playground.json +0 -1
  15. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -2
  16. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +0 -1
  17. data/app/pb_kits/playbook/pb_date_picker/kit.schema.json +0 -8
  18. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +4 -10
  19. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.test.js +0 -12
  20. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.tsx +4 -9
  21. data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +0 -10
  22. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +9 -18
  23. data/app/pb_kits/playbook/pb_dropdown/docs/_playground.json +0 -2
  24. data/app/pb_kits/playbook/pb_dropdown/docs/_playground.overrides.json +1 -2
  25. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -6
  26. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +0 -2
  27. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +1 -13
  28. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +2 -205
  29. data/app/pb_kits/playbook/pb_dropdown/index.js +1 -240
  30. data/app/pb_kits/playbook/pb_dropdown/kit.schema.json +6 -40
  31. data/app/pb_kits/playbook/pb_dropdown/subcomponents/MultiSelectTriggerDisplay.tsx +2 -2
  32. data/app/pb_kits/playbook/pb_empty_state/_empty_state.tsx +1 -5
  33. data/app/pb_kits/playbook/pb_empty_state/empty_state.test.jsx +0 -11
  34. data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.tsx +2 -8
  35. data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +1 -1
  36. data/app/pb_kits/playbook/pb_filter/filter.rb +2 -2
  37. data/app/pb_kits/playbook/pb_filter/filter.test.js +0 -14
  38. data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -3
  39. data/app/pb_kits/playbook/pb_flex/kit.schema.json +0 -1
  40. data/app/pb_kits/playbook/pb_form/docs/example.yml +0 -1
  41. data/app/pb_kits/playbook/pb_multi_level_select/_helper_functions.tsx +1 -12
  42. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +3 -2
  43. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.test.jsx +0 -26
  44. data/app/pb_kits/playbook/pb_multi_level_select/tree_helpers.js +4 -10
  45. data/app/pb_kits/playbook/pb_pagination/_pagination.scss +19 -22
  46. data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +0 -4
  47. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +1 -5
  48. data/app/pb_kits/playbook/pb_passphrase/index.ts +1 -1
  49. data/app/pb_kits/playbook/pb_passphrase/passphrase.html.erb +1 -2
  50. data/app/pb_kits/playbook/pb_passphrase/passphrase.rb +0 -4
  51. data/app/pb_kits/playbook/pb_passphrase/passphrase.test.jsx +1 -28
  52. data/app/pb_kits/playbook/pb_pill/_pill.scss +4 -9
  53. data/app/pb_kits/playbook/pb_pill/_pill.test.jsx +0 -43
  54. data/app/pb_kits/playbook/pb_pill/_pill.tsx +6 -12
  55. data/app/pb_kits/playbook/pb_pill/docs/_pill_notification.jsx +0 -6
  56. data/app/pb_kits/playbook/pb_pill/docs/_playground.json +1 -14
  57. data/app/pb_kits/playbook/pb_pill/docs/_playground.overrides.json +0 -17
  58. data/app/pb_kits/playbook/pb_pill/docs/example.yml +0 -2
  59. data/app/pb_kits/playbook/pb_pill/docs/index.js +0 -1
  60. data/app/pb_kits/playbook/pb_pill/pill.html.erb +1 -5
  61. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +1 -2
  62. data/app/pb_kits/playbook/pb_progress_step/progress_step.test.js +0 -16
  63. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorButton.tsx +3 -4
  64. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/MoreExtensionsDropdown.tsx +2 -4
  65. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +82 -165
  66. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +49 -29
  67. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx +4 -1
  68. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarNodes.tsx +35 -34
  69. data/app/pb_kits/playbook/pb_rich_text_editor/_previewer_mixin.scss +37 -24
  70. data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +74 -191
  71. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.json +1 -1
  72. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.overrides.json +1 -1
  73. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +3 -7
  74. data/app/pb_kits/playbook/pb_rich_text_editor/kit.schema.json +6 -14
  75. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.html.erb +82 -153
  76. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +0 -43
  77. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor_rails.js +85 -288
  78. data/app/pb_kits/playbook/pb_select/_select.scss +2 -2
  79. data/app/pb_kits/playbook/pb_source/_source.tsx +11 -14
  80. data/app/pb_kits/playbook/pb_source/source.test.js +0 -6
  81. data/app/pb_kits/playbook/pb_table/_table.tsx +1 -1
  82. data/app/pb_kits/playbook/pb_table/docs/{_table_header_rails.md → _table_header.md} +3 -5
  83. data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table.html.erb +0 -75
  84. data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table.jsx +0 -80
  85. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -1
  86. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
  87. data/app/pb_kits/playbook/pb_table/subcomponents/_table_header.tsx +12 -143
  88. data/app/pb_kits/playbook/pb_table/table.rb +1 -1
  89. data/app/pb_kits/playbook/pb_table/table.test.js +1 -134
  90. data/app/pb_kits/playbook/pb_title/_title.tsx +1 -3
  91. data/app/pb_kits/playbook/pb_title/kit.schema.json +0 -1
  92. data/app/pb_kits/playbook/utilities/test/globalProps/globalProps.integration.test.js +5 -7
  93. data/dist/chunks/{_detail-BqqzPTNr.js → _detail-B4-co8rv.js} +2 -2
  94. data/dist/chunks/_table-BGImfpY0.js +1 -0
  95. data/dist/chunks/_typeahead-DeIqOMbJ.js +1 -0
  96. data/dist/chunks/vendor.js +3 -3
  97. data/dist/playbook-rails-react-bindings.js +1 -1
  98. data/dist/playbook-rails.js +1 -1
  99. data/dist/playbook.css +1 -1
  100. data/lib/playbook/changelog_generator.rb +3 -33
  101. data/lib/playbook/forms/builder/checkbox_field.rb +0 -2
  102. data/lib/playbook/forms/builder/collection_select_field.rb +0 -3
  103. data/lib/playbook/forms/builder/date_picker_field.rb +7 -22
  104. data/lib/playbook/forms/builder/dropdown_field.rb +0 -12
  105. data/lib/playbook/forms/builder/form_field_builder.rb +0 -4
  106. data/lib/playbook/forms/builder/intl_telephone_field.rb +0 -8
  107. data/lib/playbook/forms/builder/multi_level_select_field.rb +0 -10
  108. data/lib/playbook/forms/builder/phone_number_field.rb +0 -8
  109. data/lib/playbook/forms/builder/select_field.rb +0 -3
  110. data/lib/playbook/forms/builder/star_rating_field.rb +0 -7
  111. data/lib/playbook/forms/builder/time_picker_field.rb +0 -8
  112. data/lib/playbook/forms/builder/typeahead_field.rb +0 -15
  113. data/lib/playbook/forms/builder.rb +0 -17
  114. data/lib/playbook/pagination_renderer.rb +1 -1
  115. data/lib/playbook/version.rb +1 -1
  116. metadata +6 -268
  117. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_close_on_select.html.erb +0 -5
  118. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_close_on_select.jsx +0 -21
  119. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_close_on_select.md +0 -3
  120. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_dynamic_options.html.erb +0 -34
  121. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_dynamic_options.md +0 -4
  122. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_dynamic_options_with_autocomplete.html.erb +0 -35
  123. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_dynamic_options_with_autocomplete.md +0 -1
  124. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_dynamic_options_with_multi_select.html.erb +0 -35
  125. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_dynamic_options_with_multi_select.md +0 -1
  126. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_react_hook.jsx +0 -45
  127. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_react_hook.md +0 -1
  128. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_react_hook.jsx +0 -36
  129. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_react_hook.md +0 -1
  130. data/app/pb_kits/playbook/pb_dropdown/dropdown_index.test.js +0 -372
  131. data/app/pb_kits/playbook/pb_form/docs/_form_model_values.html.erb +0 -43
  132. data/app/pb_kits/playbook/pb_form/docs/_form_model_values.md +0 -22
  133. data/app/pb_kits/playbook/pb_pill/docs/_pill_children.html.erb +0 -9
  134. data/app/pb_kits/playbook/pb_pill/docs/_pill_children.jsx +0 -45
  135. data/app/pb_kits/playbook/pb_pill/docs/_pill_children.md +0 -1
  136. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarFormatItems.tsx +0 -68
  137. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_extensions.html.erb +0 -5
  138. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_extensions.md +0 -9
  139. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_height.html.erb +0 -12
  140. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_height.md +0 -1
  141. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_min_height.html.erb +0 -12
  142. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_min_height.md +0 -1
  143. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_text_align.html.erb +0 -5
  144. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_text_align.md +0 -3
  145. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor_rails.test.js +0 -178
  146. data/app/pb_kits/playbook/pb_table/docs/_table_header.jsx +0 -193
  147. data/app/pb_kits/playbook/pb_table/docs/_table_header_react.md +0 -15
  148. data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table_rails.md +0 -5
  149. data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table_react.md +0 -5
  150. data/app/pb_kits/playbook/pb_table/utilities/sortMenuHelpers.test.ts +0 -76
  151. data/app/pb_kits/playbook/pb_table/utilities/sortMenuHelpers.ts +0 -84
  152. data/app/pb_kits/playbook/utilities/global-event-props.schema.json +0 -22
  153. data/app/pb_kits/playbook/utilities/globalEventProps.ts +0 -13
  154. data/app/pb_kits/playbook/utilities/test/globalProps/onClick.test.js +0 -212
  155. data/dist/ai/all-schemas.json +0 -16003
  156. data/dist/ai/external-dependencies.json +0 -1
  157. data/dist/ai/forms.json +0 -1026
  158. data/dist/ai/global-event-props.schema.json +0 -22
  159. data/dist/ai/global-props.schema.json +0 -1271
  160. data/dist/ai/index.json +0 -1048
  161. data/dist/ai/kits/advanced_table.schema.json +0 -334
  162. data/dist/ai/kits/avatar.schema.json +0 -100
  163. data/dist/ai/kits/background.schema.json +0 -238
  164. data/dist/ai/kits/badge.schema.json +0 -83
  165. data/dist/ai/kits/body.schema.json +0 -112
  166. data/dist/ai/kits/bread_crumbs.schema.json +0 -32
  167. data/dist/ai/kits/button.schema.json +0 -292
  168. data/dist/ai/kits/button_toolbar.schema.json +0 -70
  169. data/dist/ai/kits/caption.schema.json +0 -95
  170. data/dist/ai/kits/card.schema.json +0 -204
  171. data/dist/ai/kits/checkbox.schema.json +0 -322
  172. data/dist/ai/kits/circle_icon_button.schema.json +0 -127
  173. data/dist/ai/kits/collapsible.schema.json +0 -109
  174. data/dist/ai/kits/contact.schema.json +0 -69
  175. data/dist/ai/kits/container.schema.json +0 -56
  176. data/dist/ai/kits/copy_button.schema.json +0 -98
  177. data/dist/ai/kits/currency.schema.json +0 -154
  178. data/dist/ai/kits/dashboard_value.schema.json +0 -60
  179. data/dist/ai/kits/date.schema.json +0 -107
  180. data/dist/ai/kits/date_picker.schema.json +0 -589
  181. data/dist/ai/kits/date_range_inline.schema.json +0 -88
  182. data/dist/ai/kits/date_range_stacked.schema.json +0 -48
  183. data/dist/ai/kits/date_stacked.schema.json +0 -90
  184. data/dist/ai/kits/date_time.schema.json +0 -107
  185. data/dist/ai/kits/date_time_stacked.schema.json +0 -74
  186. data/dist/ai/kits/date_year_stacked.schema.json +0 -54
  187. data/dist/ai/kits/detail.schema.json +0 -82
  188. data/dist/ai/kits/dialog.schema.json +0 -188
  189. data/dist/ai/kits/distribution_bar.schema.json +0 -52
  190. data/dist/ai/kits/draggable.schema.json +0 -70
  191. data/dist/ai/kits/dropdown.schema.json +0 -550
  192. data/dist/ai/kits/empty_state.schema.json +0 -121
  193. data/dist/ai/kits/file_upload.schema.json +0 -139
  194. data/dist/ai/kits/filter.schema.json +0 -173
  195. data/dist/ai/kits/fixed_confirmation_toast.schema.json +0 -128
  196. data/dist/ai/kits/flex.schema.json +0 -177
  197. data/dist/ai/kits/form.schema.json +0 -55
  198. data/dist/ai/kits/form_group.schema.json +0 -34
  199. data/dist/ai/kits/form_pill.schema.json +0 -142
  200. data/dist/ai/kits/full_screen.schema.json +0 -93
  201. data/dist/ai/kits/hashtag.schema.json +0 -81
  202. data/dist/ai/kits/highlight.schema.json +0 -39
  203. data/dist/ai/kits/home_address_street.schema.json +0 -136
  204. data/dist/ai/kits/icon.schema.json +0 -201
  205. data/dist/ai/kits/icon_circle.schema.json +0 -83
  206. data/dist/ai/kits/icon_stat_value.schema.json +0 -106
  207. data/dist/ai/kits/icon_value.schema.json +0 -59
  208. data/dist/ai/kits/image.schema.json +0 -78
  209. data/dist/ai/kits/label_pill.schema.json +0 -56
  210. data/dist/ai/kits/label_value.schema.json +0 -94
  211. data/dist/ai/kits/layout.schema.json +0 -129
  212. data/dist/ai/kits/legend.schema.json +0 -54
  213. data/dist/ai/kits/link.schema.json +0 -135
  214. data/dist/ai/kits/list.schema.json +0 -121
  215. data/dist/ai/kits/loading_inline.schema.json +0 -83
  216. data/dist/ai/kits/map.schema.json +0 -62
  217. data/dist/ai/kits/message.schema.json +0 -111
  218. data/dist/ai/kits/multi_level_select.schema.json +0 -377
  219. data/dist/ai/kits/multiple_users.schema.json +0 -77
  220. data/dist/ai/kits/multiple_users_stacked.schema.json +0 -65
  221. data/dist/ai/kits/nav.schema.json +0 -115
  222. data/dist/ai/kits/online_status.schema.json +0 -66
  223. data/dist/ai/kits/overlay.schema.json +0 -112
  224. data/dist/ai/kits/pagination.schema.json +0 -60
  225. data/dist/ai/kits/passphrase.schema.json +0 -117
  226. data/dist/ai/kits/pb_bar_graph.schema.json +0 -42
  227. data/dist/ai/kits/pb_circle_chart.schema.json +0 -42
  228. data/dist/ai/kits/pb_gauge_chart.schema.json +0 -42
  229. data/dist/ai/kits/pb_line_graph.schema.json +0 -42
  230. data/dist/ai/kits/person.schema.json +0 -40
  231. data/dist/ai/kits/person_contact.schema.json +0 -47
  232. data/dist/ai/kits/phone_number_input.schema.json +0 -387
  233. data/dist/ai/kits/pill.schema.json +0 -80
  234. data/dist/ai/kits/popover.schema.json +0 -137
  235. data/dist/ai/kits/progress_pills.schema.json +0 -70
  236. data/dist/ai/kits/progress_simple.schema.json +0 -96
  237. data/dist/ai/kits/progress_step.schema.json +0 -84
  238. data/dist/ai/kits/radio.schema.json +0 -117
  239. data/dist/ai/kits/rich_text_editor.schema.json +0 -202
  240. data/dist/ai/kits/section_separator.schema.json +0 -89
  241. data/dist/ai/kits/select.schema.json +0 -423
  242. data/dist/ai/kits/selectable_card.schema.json +0 -126
  243. data/dist/ai/kits/selectable_card_icon.schema.json +0 -129
  244. data/dist/ai/kits/selectable_icon.schema.json +0 -116
  245. data/dist/ai/kits/selectable_list.schema.json +0 -58
  246. data/dist/ai/kits/skeleton_loading.schema.json +0 -111
  247. data/dist/ai/kits/source.schema.json +0 -68
  248. data/dist/ai/kits/star_rating.schema.json +0 -329
  249. data/dist/ai/kits/stat_change.schema.json +0 -62
  250. data/dist/ai/kits/stat_value.schema.json +0 -49
  251. data/dist/ai/kits/table.schema.json +0 -262
  252. data/dist/ai/kits/text_input.schema.json +0 -667
  253. data/dist/ai/kits/textarea.schema.json +0 -364
  254. data/dist/ai/kits/time.schema.json +0 -104
  255. data/dist/ai/kits/time_picker.schema.json +0 -325
  256. data/dist/ai/kits/time_range_inline.schema.json +0 -89
  257. data/dist/ai/kits/time_stacked.schema.json +0 -70
  258. data/dist/ai/kits/timeline.schema.json +0 -64
  259. data/dist/ai/kits/timestamp.schema.json +0 -138
  260. data/dist/ai/kits/title.schema.json +0 -111
  261. data/dist/ai/kits/title_count.schema.json +0 -71
  262. data/dist/ai/kits/title_detail.schema.json +0 -53
  263. data/dist/ai/kits/toggle.schema.json +0 -80
  264. data/dist/ai/kits/tooltip.schema.json +0 -174
  265. data/dist/ai/kits/typeahead.schema.json +0 -532
  266. data/dist/ai/kits/user.schema.json +0 -157
  267. data/dist/ai/kits/user_badge.schema.json +0 -51
  268. data/dist/ai/kits/weekday_stacked.schema.json +0 -73
  269. data/dist/ai/playgrounds/advanced_table.json +0 -1
  270. data/dist/ai/playgrounds/avatar.json +0 -1
  271. data/dist/ai/playgrounds/background.json +0 -1
  272. data/dist/ai/playgrounds/badge.json +0 -1
  273. data/dist/ai/playgrounds/body.json +0 -1
  274. data/dist/ai/playgrounds/bread_crumbs.json +0 -1
  275. data/dist/ai/playgrounds/button.json +0 -1
  276. data/dist/ai/playgrounds/button_toolbar.json +0 -1
  277. data/dist/ai/playgrounds/caption.json +0 -1
  278. data/dist/ai/playgrounds/card.json +0 -1
  279. data/dist/ai/playgrounds/checkbox.json +0 -1
  280. data/dist/ai/playgrounds/circle_icon_button.json +0 -1
  281. data/dist/ai/playgrounds/collapsible.json +0 -1
  282. data/dist/ai/playgrounds/contact.json +0 -1
  283. data/dist/ai/playgrounds/container.json +0 -1
  284. data/dist/ai/playgrounds/copy_button.json +0 -1
  285. data/dist/ai/playgrounds/currency.json +0 -1
  286. data/dist/ai/playgrounds/dashboard_value.json +0 -1
  287. data/dist/ai/playgrounds/date.json +0 -1
  288. data/dist/ai/playgrounds/date_picker.json +0 -1
  289. data/dist/ai/playgrounds/date_range_inline.json +0 -1
  290. data/dist/ai/playgrounds/date_range_stacked.json +0 -1
  291. data/dist/ai/playgrounds/date_stacked.json +0 -1
  292. data/dist/ai/playgrounds/date_time.json +0 -1
  293. data/dist/ai/playgrounds/date_time_stacked.json +0 -1
  294. data/dist/ai/playgrounds/date_year_stacked.json +0 -1
  295. data/dist/ai/playgrounds/detail.json +0 -1
  296. data/dist/ai/playgrounds/dialog.json +0 -1
  297. data/dist/ai/playgrounds/distribution_bar.json +0 -1
  298. data/dist/ai/playgrounds/draggable.json +0 -1
  299. data/dist/ai/playgrounds/dropdown.json +0 -1
  300. data/dist/ai/playgrounds/empty_state.json +0 -1
  301. data/dist/ai/playgrounds/file_upload.json +0 -1
  302. data/dist/ai/playgrounds/filter.json +0 -1
  303. data/dist/ai/playgrounds/fixed_confirmation_toast.json +0 -1
  304. data/dist/ai/playgrounds/flex.json +0 -1
  305. data/dist/ai/playgrounds/form_group.json +0 -1
  306. data/dist/ai/playgrounds/form_pill.json +0 -1
  307. data/dist/ai/playgrounds/full_screen.json +0 -1
  308. data/dist/ai/playgrounds/hashtag.json +0 -1
  309. data/dist/ai/playgrounds/highlight.json +0 -1
  310. data/dist/ai/playgrounds/home_address_street.json +0 -1
  311. data/dist/ai/playgrounds/icon.json +0 -1
  312. data/dist/ai/playgrounds/icon_circle.json +0 -1
  313. data/dist/ai/playgrounds/icon_stat_value.json +0 -1
  314. data/dist/ai/playgrounds/icon_value.json +0 -1
  315. data/dist/ai/playgrounds/image.json +0 -1
  316. data/dist/ai/playgrounds/index.json +0 -1
  317. data/dist/ai/playgrounds/label_pill.json +0 -1
  318. data/dist/ai/playgrounds/label_value.json +0 -1
  319. data/dist/ai/playgrounds/layout.json +0 -1
  320. data/dist/ai/playgrounds/legend.json +0 -1
  321. data/dist/ai/playgrounds/link.json +0 -1
  322. data/dist/ai/playgrounds/list.json +0 -1
  323. data/dist/ai/playgrounds/loading_inline.json +0 -1
  324. data/dist/ai/playgrounds/map.json +0 -1
  325. data/dist/ai/playgrounds/message.json +0 -1
  326. data/dist/ai/playgrounds/multi_level_select.json +0 -1
  327. data/dist/ai/playgrounds/multiple_users.json +0 -1
  328. data/dist/ai/playgrounds/multiple_users_stacked.json +0 -1
  329. data/dist/ai/playgrounds/nav.json +0 -1
  330. data/dist/ai/playgrounds/online_status.json +0 -1
  331. data/dist/ai/playgrounds/overlay.json +0 -1
  332. data/dist/ai/playgrounds/pagination.json +0 -1
  333. data/dist/ai/playgrounds/passphrase.json +0 -1
  334. data/dist/ai/playgrounds/pb_bar_graph.json +0 -1
  335. data/dist/ai/playgrounds/pb_circle_chart.json +0 -1
  336. data/dist/ai/playgrounds/pb_gauge_chart.json +0 -1
  337. data/dist/ai/playgrounds/pb_line_graph.json +0 -1
  338. data/dist/ai/playgrounds/person.json +0 -1
  339. data/dist/ai/playgrounds/person_contact.json +0 -1
  340. data/dist/ai/playgrounds/phone_number_input.json +0 -1
  341. data/dist/ai/playgrounds/pill.json +0 -1
  342. data/dist/ai/playgrounds/popover.json +0 -1
  343. data/dist/ai/playgrounds/progress_pills.json +0 -1
  344. data/dist/ai/playgrounds/progress_simple.json +0 -1
  345. data/dist/ai/playgrounds/progress_step.json +0 -1
  346. data/dist/ai/playgrounds/radio.json +0 -1
  347. data/dist/ai/playgrounds/rich_text_editor.json +0 -1
  348. data/dist/ai/playgrounds/section_separator.json +0 -1
  349. data/dist/ai/playgrounds/select.json +0 -1
  350. data/dist/ai/playgrounds/selectable_card.json +0 -1
  351. data/dist/ai/playgrounds/selectable_card_icon.json +0 -1
  352. data/dist/ai/playgrounds/selectable_icon.json +0 -1
  353. data/dist/ai/playgrounds/selectable_list.json +0 -1
  354. data/dist/ai/playgrounds/skeleton_loading.json +0 -1
  355. data/dist/ai/playgrounds/source.json +0 -1
  356. data/dist/ai/playgrounds/star_rating.json +0 -1
  357. data/dist/ai/playgrounds/stat_change.json +0 -1
  358. data/dist/ai/playgrounds/stat_value.json +0 -1
  359. data/dist/ai/playgrounds/table.json +0 -1
  360. data/dist/ai/playgrounds/text_input.json +0 -1
  361. data/dist/ai/playgrounds/textarea.json +0 -1
  362. data/dist/ai/playgrounds/time.json +0 -1
  363. data/dist/ai/playgrounds/time_picker.json +0 -1
  364. data/dist/ai/playgrounds/time_range_inline.json +0 -1
  365. data/dist/ai/playgrounds/time_stacked.json +0 -1
  366. data/dist/ai/playgrounds/timeline.json +0 -1
  367. data/dist/ai/playgrounds/timestamp.json +0 -1
  368. data/dist/ai/playgrounds/title.json +0 -1
  369. data/dist/ai/playgrounds/title_count.json +0 -1
  370. data/dist/ai/playgrounds/title_detail.json +0 -1
  371. data/dist/ai/playgrounds/toggle.json +0 -1
  372. data/dist/ai/playgrounds/tooltip.json +0 -1
  373. data/dist/ai/playgrounds/typeahead.json +0 -1
  374. data/dist/ai/playgrounds/user.json +0 -1
  375. data/dist/ai/playgrounds/user_badge.json +0 -1
  376. data/dist/ai/playgrounds/weekday_stacked.json +0 -1
  377. data/dist/ai/visual-index.json +0 -1
  378. data/dist/chunks/_table-BrYlBrTH.js +0 -1
  379. data/dist/chunks/_typeahead-KNcX62pc.js +0 -1
  380. 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: d165f1e2cc8c5ed232d003b53fb2c7ed72a3ed74b65145bd406e4609f40368e1
4
- data.tar.gz: 91709e8cb1337728149f1101d6cfe60bdb23ba1c89d206805d54503234bc7c82
3
+ metadata.gz: f28e33d93ce8a80f3074af2db55dc4fc47854e791802d58e516ff80a3d2840ac
4
+ data.tar.gz: 5f569533053efbc0eb4e9ddbcc5457f14b5f2d133f519604019c5bfeadd4f16a
5
5
  SHA512:
6
- metadata.gz: 0b1bef5425d986a5a1ae108e532796e596a2b2bc2153ce61de68c6fc9774ec47f053971c7eecdf81b75212eeedc5c93039fc7c5226cc60b2df20c64e6d08b4fd
7
- data.tar.gz: 7fc240cb475677b6b28557f3054c261f067dd5151c04ec41979168a41ce481a4e25188ef65697efbda42e8c8edcb41f17566f2b8e48af73388842c0a92f77d22
6
+ metadata.gz: 70e609dcd1fa095a74498fb41b0932ba67b174c22b10429187fae4d704b4f9d6411d37036f9767d473bf7022addc79f0d071886653a03f1064a36e7ce660f876
7
+ data.tar.gz: ee4ac8564ecd36103032f9ee2b42c9a7c99374613073e2dd5793fa219351aad7a6c6a7e9cb67f3653672a016fe61dbd2a27d8cc53ab5661eb29b42aa5a3ec294
@@ -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
- })
@@ -52,7 +52,6 @@ type DatePickerProps = {
52
52
  allowInput?: boolean,
53
53
  aria?: { [key: string]: string },
54
54
  className?: string,
55
- closeOnSelect?: boolean,
56
55
  customQuickPickDates: { override: boolean, dates: any[] },
57
56
  dark?: boolean,
58
57
  data?: { [key: string]: string },
@@ -104,7 +103,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
104
103
  allowInput = false,
105
104
  aria = {},
106
105
  className,
107
- closeOnSelect = true,
108
106
  customQuickPickDates,
109
107
  dark = false,
110
108
  data = {},
@@ -182,7 +180,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
182
180
  useEffect(() => {
183
181
  datePickerHelper({
184
182
  allowInput,
185
- closeOnSelect,
186
183
  customQuickPickDates,
187
184
  defaultDate: normalizedDefaultDate,
188
185
  disableDate,
@@ -91,8 +91,6 @@ module Playbook
91
91
  default: "pointer"
92
92
  prop :year_ascending, type: Playbook::Props::Boolean,
93
93
  default: false
94
- prop :close_on_select, type: Playbook::Props::Boolean,
95
- default: true
96
94
 
97
95
  def classname
98
96
  default_margin_bottom = margin_bottom.present? ? "" : " mb_sm"
@@ -103,7 +101,6 @@ module Playbook
103
101
  def date_picker_config
104
102
  {
105
103
  allowInput: allow_input,
106
- closeOnSelect: close_on_select,
107
104
  customQuickPickDates: custom_quick_pick_dates,
108
105
  defaultDate: default_date,
109
106
  disableDate: disable_date,
@@ -510,18 +510,4 @@ describe('DatePicker Kit', () => {
510
510
  )
511
511
  })
512
512
  })
513
-
514
- test('passes closeOnSelect to flatpickr', async () => {
515
- render(
516
- <DatePicker
517
- closeOnSelect={false}
518
- pickerId="date-picker-close-on-select"
519
- />
520
- )
521
-
522
- await waitFor(() => {
523
- const input = document.getElementById('date-picker-close-on-select')
524
- expect(input._flatpickr.config.closeOnSelect).toBe(false)
525
- })
526
- })
527
513
  })
@@ -3,7 +3,6 @@
3
3
  "propTargets": {},
4
4
  "defaults": {
5
5
  "allowInput": false,
6
- "closeOnSelect": true,
7
6
  "dark": false,
8
7
  "defaultDate": "",
9
8
  "disableInput": false,
@@ -33,7 +33,6 @@ examples:
33
33
  - date_picker_positions: Custom Positions
34
34
  - date_picker_positions_element: Custom Position (based on element)
35
35
  - date_picker_required_indicator: Required Indicator
36
- - date_picker_close_on_select: Close on Select
37
36
  - date_picker_turbo_frames: Within Turbo Frames
38
37
 
39
38
  react:
@@ -69,5 +68,4 @@ examples:
69
68
  - date_picker_positions: Custom Positions
70
69
  - date_picker_positions_element: Custom Position (based on element)
71
70
  - date_picker_required_indicator: Required Indicator
72
- - date_picker_close_on_select: Close on Select
73
71
  - date_picker_dialog_submission: Dialog Form Submission
@@ -31,4 +31,3 @@ export { default as DatePickerAndDropdownRange } from './_date_picker_and_dropdo
31
31
  export { default as DatePickerRequiredIndicator } from "./_date_picker_required_indicator.jsx";
32
32
  export { default as DatePickerDialogSubmission } from "./_date_picker_dialog_submission.jsx";
33
33
  export { default as DatePickerYearAsc } from './_date_picker_year_asc.jsx'
34
- export { default as DatePickerCloseOnSelect } from './_date_picker_close_on_select.jsx'
@@ -15,14 +15,6 @@
15
15
  ],
16
16
  "default": false
17
17
  },
18
- "closeOnSelect": {
19
- "type": "boolean",
20
- "platforms": [
21
- "react",
22
- "rails"
23
- ],
24
- "default": true
25
- },
26
18
  "customQuickPickDates": {
27
19
  "type": "GenericObject",
28
20
  "platforms": [
@@ -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
- })
@@ -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": [
@@ -39,9 +39,6 @@ examples:
39
39
  - dropdown_disabled: Disabled Input
40
40
  - dropdown_grouped_options: Grouped Options
41
41
  - dropdown_custom_event_type: Custom Event Type
42
- - dropdown_dynamic_options: Dynamic Options
43
- - dropdown_dynamic_options_with_autocomplete: Dynamic Options with Autocomplete
44
- - dropdown_dynamic_options_with_multi_select: Dynamic Options with Multi Select
45
42
 
46
43
  react:
47
44
  - dropdown_default: Default
@@ -84,6 +81,3 @@ examples:
84
81
  - dropdown_required_indicator: Required Indicator
85
82
  - dropdown_disabled: Disabled Input
86
83
  - dropdown_grouped_options: Grouped Options
87
- - dropdown_react_hook: React Hook
88
- - dropdown_multi_select_react_hook: React Hook Multi Select
89
-
@@ -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'
@@ -59,14 +59,6 @@ module Playbook
59
59
  default: false
60
60
  prop :custom_event_type, type: Playbook::Props::String,
61
61
  default: ""
62
- prop :options_by_context, type: Playbook::Props::HashProp,
63
- default: {}
64
- prop :context_selector, type: Playbook::Props::String,
65
- default: ""
66
- prop :clear_on_context_change, type: Playbook::Props::Boolean,
67
- default: true
68
- prop :options_event_type, type: Playbook::Props::String,
69
- default: ""
70
62
 
71
63
  def data
72
64
  Hash(prop(:data)).merge(
@@ -81,11 +73,7 @@ module Playbook
81
73
  end_date_id: variant == "quickpick" ? end_date_id : nil,
82
74
  controls_start_id: variant == "quickpick" && controls_start_id.present? ? controls_start_id : nil,
83
75
  controls_end_id: variant == "quickpick" && controls_end_id.present? ? controls_end_id : nil,
84
- custom_event_type: custom_event_type.presence,
85
- pb_dropdown_options_by_context: options_by_context.present? ? options_by_context.to_json : nil,
86
- pb_dropdown_context_selector: context_selector.presence,
87
- pb_dropdown_clear_on_context_change: clear_on_context_change,
88
- options_event_type: options_event_type.presence
76
+ custom_event_type: custom_event_type.presence
89
77
  ).compact
90
78
  end
91
79