playbook_ui 15.4.0 → 15.5.0.pre.alpha.PLAY2503datepickerdefaultdateoutsideminmaxrange12814

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 (242) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +96 -6
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx +2 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +3 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_infinite_scroll.jsx +1 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_editing.jsx +3 -1
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.jsx +2 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
  10. data/app/pb_kits/playbook/pb_background/_background.tsx +6 -6
  11. data/app/pb_kits/playbook/pb_background/background.test.js +5 -1
  12. data/app/pb_kits/playbook/pb_background/docs/_background_light.html.erb +1 -1
  13. data/app/pb_kits/playbook/pb_background/docs/_background_light.jsx +0 -1
  14. data/app/pb_kits/playbook/pb_background/docs/_background_light.md +1 -0
  15. data/app/pb_kits/playbook/pb_background/docs/example.yml +2 -2
  16. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +21 -8
  17. data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +6 -2
  18. data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +3 -0
  19. data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +24 -0
  20. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.html.erb +9 -0
  21. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.jsx +24 -0
  22. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_rails.md +1 -0
  23. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_react.md +1 -0
  24. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +2 -2
  25. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +1 -2
  26. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +2 -2
  27. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +2 -0
  28. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +2 -0
  29. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -0
  30. data/app/pb_kits/playbook/pb_currency/docs/_currency_abbreviated.md +1 -0
  31. data/app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals_rails.md +1 -0
  32. data/app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals_react.md +1 -0
  33. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.html.erb +10 -0
  34. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.jsx +10 -0
  35. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.md +1 -0
  36. data/app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol_rails.md +1 -0
  37. data/app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol_react.md +1 -0
  38. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +7 -0
  39. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +7 -0
  40. data/app/pb_kits/playbook/pb_currency/docs/_description.md +2 -2
  41. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +25 -11
  42. data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +24 -0
  43. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +225 -6
  44. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_min_max.html.erb +18 -0
  45. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +20 -13
  46. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.rb +6 -4
  47. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.test.js +17 -0
  48. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.html.erb +4 -0
  49. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.jsx +43 -0
  50. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.md +1 -0
  51. data/app/pb_kits/playbook/pb_date_range_inline/docs/_description.md +1 -1
  52. data/app/pb_kits/playbook/pb_date_range_inline/docs/example.yml +3 -2
  53. data/app/pb_kits/playbook/pb_date_range_inline/docs/index.js +1 -0
  54. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +6 -4
  55. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.html.erb +2 -3
  56. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.rb +11 -5
  57. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.test.js +26 -9
  58. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_current_year.html.erb +12 -0
  59. data/app/pb_kits/playbook/pb_date_stacked/docs/{_date_stacked_not_current_year.jsx → _date_stacked_current_year.jsx} +6 -5
  60. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_current_year.md +1 -0
  61. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.html.erb +1 -1
  62. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.jsx +1 -1
  63. data/app/pb_kits/playbook/pb_date_stacked/docs/_description.md +1 -1
  64. data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +2 -2
  65. data/app/pb_kits/playbook/pb_date_stacked/docs/index.js +1 -1
  66. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +3 -0
  67. data/app/pb_kits/playbook/pb_date_time/date_time.html.erb +1 -0
  68. data/app/pb_kits/playbook/pb_date_time/date_time.rb +1 -0
  69. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year.html.erb +4 -0
  70. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year.jsx +14 -0
  71. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year_rails.md +1 -0
  72. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year_react.md +1 -0
  73. data/app/pb_kits/playbook/pb_date_time/docs/example.yml +3 -1
  74. data/app/pb_kits/playbook/pb_date_time/docs/index.js +1 -0
  75. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +3 -0
  76. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +2 -2
  77. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.rb +2 -0
  78. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.test.js +33 -0
  79. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.html.erb +4 -0
  80. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.jsx +22 -0
  81. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.md +1 -0
  82. data/app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml +3 -1
  83. data/app/pb_kits/playbook/pb_date_time_stacked/docs/index.js +1 -0
  84. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +33 -2
  85. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +156 -6
  86. data/app/pb_kits/playbook/pb_draggable/context/types.ts +8 -3
  87. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_dropzone.jsx +180 -0
  88. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_dropzone.md +22 -0
  89. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +3 -2
  90. data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
  91. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +77 -1
  92. data/app/pb_kits/playbook/pb_dropdown/index.js +32 -14
  93. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.jsx +2 -1
  94. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_default.jsx +2 -1
  95. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.jsx +2 -1
  96. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.jsx +2 -1
  97. data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +4 -4
  98. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +31 -9
  99. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +12 -5
  100. data/app/pb_kits/playbook/pb_flex/docs/_flex_item_example.jsx +1 -0
  101. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +8 -1
  102. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +11 -1
  103. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_wrapped.jsx +4 -1
  104. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +34 -22
  105. data/app/pb_kits/playbook/pb_home_address_street/city_emphasis.html.erb +16 -12
  106. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.html.erb +1 -1
  107. data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb +16 -12
  108. data/app/pb_kits/playbook/pb_home_address_street/street_emphasis.html.erb +16 -12
  109. data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.jsx +1 -1
  110. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +10 -0
  111. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +66 -15
  112. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.jsx +42 -0
  113. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.md +1 -0
  114. data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +1 -0
  115. data/app/pb_kits/playbook/pb_multiple_users/docs/index.js +1 -0
  116. data/app/pb_kits/playbook/pb_multiple_users/multiple_users.test.js +25 -0
  117. data/app/pb_kits/playbook/pb_nav/_item.tsx +18 -4
  118. data/app/pb_kits/playbook/pb_nav/_nav.scss +30 -5
  119. data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +192 -0
  120. data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +1 -1
  121. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.html.erb +21 -0
  122. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.jsx +113 -0
  123. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.md +1 -0
  124. data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.html.erb +30 -0
  125. data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.jsx +117 -0
  126. data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.md +1 -0
  127. data/app/pb_kits/playbook/pb_nav/docs/example.yml +4 -0
  128. data/app/pb_kits/playbook/pb_nav/docs/index.js +3 -1
  129. data/app/pb_kits/playbook/pb_nav/item.html.erb +6 -4
  130. data/app/pb_kits/playbook/pb_nav/item.rb +11 -2
  131. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +3 -1
  132. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.jsx +1 -1
  133. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.jsx +1 -1
  134. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.md +1 -0
  135. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.jsx +1 -1
  136. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.jsx +1 -1
  137. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.jsx +1 -1
  138. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_non_clickable.jsx +1 -2
  139. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.html.erb +1 -1
  140. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.jsx +1 -1
  141. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.md +11 -0
  142. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.jsx +1 -1
  143. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.jsx +1 -1
  144. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.jsx +1 -2
  145. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.jsx +1 -2
  146. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +3 -1
  147. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.jsx +2 -1
  148. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.jsx +2 -1
  149. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.jsx +1 -1
  150. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.md +2 -1
  151. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.jsx +2 -1
  152. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.jsx +1 -1
  153. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.jsx +1 -1
  154. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.jsx +1 -1
  155. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.md +1 -0
  156. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.jsx +1 -1
  157. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_live_data.jsx +2 -1
  158. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.jsx +1 -1
  159. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.jsx +1 -1
  160. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +3 -1
  161. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.jsx +1 -1
  162. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.md +2 -2
  163. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.jsx +2 -1
  164. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.md +1 -0
  165. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.jsx +2 -1
  166. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.jsx +2 -1
  167. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.jsx +2 -1
  168. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.jsx +2 -1
  169. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +3 -1
  170. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +1 -1
  171. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.md +1 -0
  172. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.html.erb +1 -1
  173. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +44 -10
  174. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb +34 -4
  175. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +16 -7
  176. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +4 -1
  177. data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +384 -262
  178. data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -5
  179. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.html.erb +14 -0
  180. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.jsx +29 -0
  181. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.md +3 -0
  182. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.jsx +31 -0
  183. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.md +1 -0
  184. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +4 -1
  185. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +14 -3
  186. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.md +3 -0
  187. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.md +3 -0
  188. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.html.erb +1 -7
  189. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.md +1 -0
  190. data/app/pb_kits/playbook/pb_progress_step/docs/example.yml +3 -0
  191. data/app/pb_kits/playbook/pb_progress_step/docs/index.js +2 -0
  192. data/app/pb_kits/playbook/pb_progress_step/progress_step.test.js +41 -0
  193. data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +3 -1
  194. data/app/pb_kits/playbook/pb_select/docs/_select_react_hook.jsx +3 -1
  195. data/app/pb_kits/playbook/pb_table/_table.tsx +28 -26
  196. data/app/pb_kits/playbook/pb_table/styles/_vertical_border.scss +49 -0
  197. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_sizing.jsx +4 -1
  198. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +4 -0
  199. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +15 -0
  200. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +3 -0
  201. data/app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.tsx +13 -2
  202. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +7 -1
  203. data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx +34 -7
  204. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.html.erb +30 -0
  205. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.jsx +37 -0
  206. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.md +3 -0
  207. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx +2 -1
  208. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
  209. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +2 -1
  210. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +6 -1
  211. data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +1 -1
  212. data/app/pb_kits/playbook/utilities/_truncate.scss +2 -0
  213. data/app/pb_kits/playbook/utilities/globalProps.ts +26 -8
  214. data/app/pb_kits/playbook/utilities/test/globalProps/alignContent.test.js +18 -0
  215. data/app/pb_kits/playbook/utilities/test/globalProps/alignItems.test.js +18 -0
  216. data/app/pb_kits/playbook/utilities/test/globalProps/alignSelf.test.js +18 -0
  217. data/app/pb_kits/playbook/utilities/test/globalProps/display.test.js +18 -0
  218. data/app/pb_kits/playbook/utilities/test/globalProps/flex.test.js +18 -0
  219. data/app/pb_kits/playbook/utilities/test/globalProps/flexDirection.test.js +18 -0
  220. data/app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js +18 -0
  221. data/app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js +18 -0
  222. data/app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js +18 -0
  223. data/app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js +18 -0
  224. data/app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js +18 -0
  225. data/app/pb_kits/playbook/utilities/test/globalProps/order.test.js +18 -0
  226. data/dist/chunks/_typeahead-DCwdpOmC.js +6 -0
  227. data/dist/chunks/lib-x6lM2EFN.js +29 -0
  228. data/dist/chunks/vendor.js +37 -1
  229. data/dist/playbook-rails-react-bindings.js +1 -1
  230. data/dist/playbook-rails.js +1 -1
  231. data/dist/playbook.css +1 -1
  232. data/lib/playbook/version.rb +2 -2
  233. metadata +54 -12
  234. data/app/pb_kits/playbook/pb_bar_graph/BarGraphStyles.scss +0 -58
  235. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year.html.erb +0 -5
  236. data/dist/chunks/_line_graph-r__oOO2H.js +0 -1
  237. data/dist/chunks/_typeahead-B7c52zVj.js +0 -6
  238. data/dist/chunks/_weekday_stacked-DgiIj2w3.js +0 -37
  239. data/dist/chunks/componentRegistry-DzmmLR2x.js +0 -1
  240. data/dist/chunks/lib-CRUXizZe.js +0 -29
  241. data/dist/chunks/pb_form_validation-CywJN0ej.js +0 -1
  242. data/dist/playbook-doc.js +0 -19
@@ -0,0 +1,29 @@
1
+ import React from 'react'
2
+
3
+ import ProgressStep from '../_progress_step.tsx'
4
+ import ProgressStepItem from '../_progress_step_item.tsx'
5
+ import Caption from '../../pb_caption/_caption'
6
+
7
+ const ProgressStepColor = (props) => (
8
+ <div>
9
+ <br />
10
+ <ProgressStep
11
+ color="info"
12
+ icon
13
+ variant="tracker"
14
+ {...props}
15
+ >
16
+ <ProgressStepItem status="complete">
17
+ <Caption>{'Ordered'}</Caption>
18
+ </ProgressStepItem>
19
+ <ProgressStepItem status="active">
20
+ <Caption>{'Shipped'}</Caption>
21
+ </ProgressStepItem>
22
+ <ProgressStepItem status="inactive">
23
+ <Caption>{'Delivered'}</Caption>
24
+ </ProgressStepItem>
25
+ </ProgressStep>
26
+ </div>
27
+ )
28
+
29
+ export default ProgressStepColor
@@ -0,0 +1,3 @@
1
+ The `color` prop can also be used to set color for the tracker variant. Options for color are `primary` and `info` with default being set to `primary`.
2
+
3
+ **NOTE**: The `color` prop is only available with the `tracker` variant.
@@ -0,0 +1,31 @@
1
+ import React from 'react'
2
+
3
+ import ProgressStep from '../_progress_step.tsx'
4
+ import ProgressStepItem from '../_progress_step_item.tsx'
5
+ import Caption from '../../pb_caption/_caption'
6
+
7
+ const ProgressStepCustomIcon = (props) => (
8
+ <div>
9
+ <br />
10
+ <ProgressStep
11
+ icon
12
+ variant="tracker"
13
+ {...props}
14
+ >
15
+ <ProgressStepItem status="complete">
16
+ <Caption>{'Ordered'}</Caption>
17
+ </ProgressStepItem>
18
+ <ProgressStepItem
19
+ icon="exclamation-triangle"
20
+ status="active"
21
+ >
22
+ <Caption>{'Shipped'}</Caption>
23
+ </ProgressStepItem>
24
+ <ProgressStepItem status="inactive">
25
+ <Caption>{'Delivered'}</Caption>
26
+ </ProgressStepItem>
27
+ </ProgressStep>
28
+ </div>
29
+ )
30
+
31
+ export default ProgressStepCustomIcon
@@ -0,0 +1 @@
1
+ Custom icons can also be set for individual steps. Simply use the `icon` prop for the relevant `ProgressStepItem`/`progress_step_item` as shown here.
@@ -39,7 +39,10 @@
39
39
  <%= pb_rails("progress_step/progress_step_item", props: {status: "complete"}) do %>
40
40
  step 2
41
41
  <% end %>
42
- <%= pb_rails("progress_step/progress_step_item", props: {status: "complete"}) do %>
42
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "active"}) do %>
43
43
  step 3
44
+ <% end %>
45
+ <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive"}) do %>
46
+ step 4
44
47
  <% end %>
45
48
  <% end %>
@@ -6,7 +6,6 @@ import ProgressStepItem from '../_progress_step_item.tsx'
6
6
  const ProgressStepDefault = (props) => (
7
7
  <div>
8
8
  <ProgressStep
9
- icon
10
9
  {...props}
11
10
  >
12
11
  <ProgressStepItem status="complete" />
@@ -19,12 +18,24 @@ const ProgressStepDefault = (props) => (
19
18
 
20
19
  <ProgressStep {...props}>
21
20
  <ProgressStepItem status="complete">{'Step 1'}</ProgressStepItem>
22
- <ProgressStepItem status="active">{'Step 2'}</ProgressStepItem>
23
- <ProgressStepItem status="inactive">{'Step 3'}</ProgressStepItem>
21
+ <ProgressStepItem status="complete">{'Step 2'}</ProgressStepItem>
22
+ <ProgressStepItem status="active">{'Step 3'}</ProgressStepItem>
23
+ <ProgressStepItem status="inactive">{'Step 4'}</ProgressStepItem>
24
+ <ProgressStepItem status="inactive">{'Step 5'}</ProgressStepItem>
24
25
  </ProgressStep>
25
26
 
26
27
  <br />
27
28
  <br />
29
+
30
+ <ProgressStep
31
+ icon
32
+ {...props}
33
+ >
34
+ <ProgressStepItem status="complete">{'Step 1'}</ProgressStepItem>
35
+ <ProgressStepItem status="complete">{'Step 2'}</ProgressStepItem>
36
+ <ProgressStepItem status="active">{'Step 3'}</ProgressStepItem>
37
+ <ProgressStepItem status="inactive">{'Step 4'}</ProgressStepItem>
38
+ </ProgressStep>
28
39
  </div>
29
40
  )
30
41
 
@@ -0,0 +1,3 @@
1
+ The default Progress Step kit sets orientation to horizontal and can be used with completed, active, and inactive steps as shown here.
2
+
3
+ `icon` is a boolean prop that can also be set to true to render icons within the steps indicator. `icon` is false by default.
@@ -0,0 +1,3 @@
1
+ The `variant` prop can be set to `tracker` to achieve this UI. Tracker is only available with the horizontal orientation and it is also recommended that you set the `icon` prop to true for this variant.
2
+
3
+ This variant takes children just like the default progress step, however, it is best to use the caption kit for children in this variant.
@@ -25,13 +25,7 @@
25
25
  Child
26
26
  <% end %>
27
27
  <%= pb_rails("progress_step/progress_step_item", props: {status: "active"}) do %>
28
- <%= pb_rails("card", props: {highlight: {position: "side", color:"windows"}}) do %>
29
- Card content
30
- <% end %>
31
- <br>
32
- <%= pb_rails("card", props: {highlight: {position: "side", color:"windows"}}) do %>
33
- Card content
34
- <% end %>
28
+ Child
35
29
  <% end %>
36
30
  <%= pb_rails("progress_step/progress_step_item", props: {status: "inactive"}) do %>
37
31
  Child
@@ -0,0 +1 @@
1
+ `orientation` can also be set to `vertical` as shown here. By default, this is set to `horizontal`.
@@ -3,6 +3,7 @@ examples:
3
3
  - progress_step_default: Default
4
4
  - progress_step_vertical: Vertical
5
5
  - progress_step_tracker: Tracker
6
+ - progress_step_color: Color
6
7
  - progress_step_custom_icon: Custom Icon
7
8
  - progress_step_tooltip: Tooltip
8
9
 
@@ -10,4 +11,6 @@ examples:
10
11
  - progress_step_default: Default
11
12
  - progress_step_vertical: Vertical
12
13
  - progress_step_tracker: Tracker
14
+ - progress_step_color: Color
15
+ - progress_step_custom_icon: Custom Icon
13
16
  - progress_step_tracker_click_events: Using State
@@ -2,3 +2,5 @@ export { default as ProgressStepDefault } from './_progress_step_default.jsx'
2
2
  export { default as ProgressStepVertical } from './_progress_step_vertical.jsx'
3
3
  export { default as ProgressStepTracker } from './_progress_step_tracker.jsx'
4
4
  export { default as ProgressStepTrackerClickEvents } from './_progress_step_tracker_click_events.jsx'
5
+ export { default as ProgressStepColor } from './_progress_step_color.jsx'
6
+ export { default as ProgressStepCustomIcon } from './_progress_step_custom_icon.jsx'
@@ -107,3 +107,44 @@ test('should render the children elements', () => {
107
107
  expect(step2Kit).toHaveClass('pb_progress_step_item_active')
108
108
  expect(step3Kit).toHaveClass('pb_progress_step_item_inactive')
109
109
  })
110
+
111
+ test('should render info color', () => {
112
+ render(
113
+ <ProgressStep
114
+ aria={{ label: testId }}
115
+ color="info"
116
+ data={{ testid: testId }}
117
+ variant="tracker"
118
+ >
119
+ <ProgressStepItem status="complete">{'Step 1'}</ProgressStepItem>
120
+ <ProgressStepItem status="active">{'Step 2'}</ProgressStepItem>
121
+ <ProgressStepItem status="inactive">{'Step 3'}</ProgressStepItem>
122
+ </ProgressStep>
123
+ )
124
+
125
+ const kit = screen.getByTestId(testId)
126
+ expect(kit).toHaveClass('pb_progress_step_kit_horizontal_tracker_info')
127
+ })
128
+
129
+ test('should render custom icon', () => {
130
+ render(
131
+ <ProgressStep
132
+ aria={{ label: testId }}
133
+ data={{ testid: testId }}
134
+ variant="tracker"
135
+ >
136
+ <ProgressStepItem icon="exclamation-triangle"
137
+ status="complete"
138
+ >
139
+ {'Step 1'}
140
+ </ProgressStepItem>
141
+ <ProgressStepItem status="active">{'Step 2'}</ProgressStepItem>
142
+ <ProgressStepItem status="inactive">{'Step 3'}</ProgressStepItem>
143
+ </ProgressStep>
144
+ )
145
+
146
+ const kit = screen.getByTestId(testId)
147
+ expect(kit).toHaveClass('pb_progress_step_kit_horizontal_tracker')
148
+ const icon = kit.getAttribute('aria-label', "exclamation-triangle-icon")
149
+ expect(icon).toBeDefined()
150
+ })
@@ -1,6 +1,8 @@
1
1
  import React from "react"
2
2
  import { useForm } from "react-hook-form"
3
- import { Radio, Flex, Body } from "playbook-ui"
3
+ import Radio from "../_radio"
4
+ import Body from "../../pb_body/_body"
5
+ import Flex from "../../pb_flex/_flex"
4
6
 
5
7
  const RadioReactHook = () => {
6
8
  const { register, watch } = useForm({
@@ -1,6 +1,8 @@
1
1
  import React, { useState } from "react"
2
2
  import { useForm } from "react-hook-form"
3
- import { Button, Body, Select } from "playbook-ui"
3
+ import Select from "../_select"
4
+ import Body from "../../pb_body/_body"
5
+ import Button from "../../pb_button/_button"
4
6
 
5
7
  const SelectReactHook = (props) => {
6
8
  const { register, handleSubmit, formState: { errors } } = useForm({
@@ -119,21 +119,22 @@ const Table = (props: TableProps): React.ReactElement => {
119
119
  header.classList.add('sticky-left-shadow');
120
120
  }
121
121
 
122
- accumulatedWidth += (header as HTMLElement).offsetWidth;
123
- }
122
+ const headerWidth = (header as HTMLElement).offsetWidth;
123
+ accumulatedWidth += headerWidth;
124
124
 
125
- cells.forEach((cell) => {
126
- cell.classList.add('sticky');
127
- (cell as HTMLElement).style.left = `${accumulatedWidth - (header as HTMLElement).offsetWidth}px`;
125
+ cells.forEach((cell) => {
126
+ cell.classList.add('sticky');
127
+ (cell as HTMLElement).style.left = `${accumulatedWidth - headerWidth}px`;
128
128
 
129
- if (!isLastColumn) {
130
- cell.classList.add('with-border-right');
131
- cell.classList.remove('sticky-left-shadow');
132
- } else {
133
- cell.classList.remove('with-border-right');
134
- cell.classList.add('sticky-left-shadow');
135
- }
136
- });
129
+ if (!isLastColumn) {
130
+ cell.classList.add('with-border-right');
131
+ cell.classList.remove('sticky-left-shadow');
132
+ } else {
133
+ cell.classList.remove('with-border-right');
134
+ cell.classList.add('sticky-left-shadow');
135
+ }
136
+ });
137
+ }
137
138
  });
138
139
  };
139
140
 
@@ -170,21 +171,22 @@ const Table = (props: TableProps): React.ReactElement => {
170
171
  header.classList.add('sticky-right-shadow');
171
172
  }
172
173
 
173
- accumulatedWidth += (header as HTMLElement).offsetWidth;
174
- }
174
+ const headerWidth = (header as HTMLElement).offsetWidth;
175
+ accumulatedWidth += headerWidth;
175
176
 
176
- cells.forEach((cell) => {
177
- cell.classList.add('sticky');
178
- (cell as HTMLElement).style.right = `${accumulatedWidth - (header as HTMLElement).offsetWidth}px`;
177
+ cells.forEach((cell) => {
178
+ cell.classList.add('sticky');
179
+ (cell as HTMLElement).style.right = `${accumulatedWidth - headerWidth}px`;
179
180
 
180
- if (!isLastColumn) {
181
- cell.classList.add('with-border-left');
182
- cell.classList.remove('sticky-right-shadow');
183
- } else {
184
- cell.classList.remove('with-border-left');
185
- cell.classList.add('sticky-right-shadow');
186
- }
187
- });
181
+ if (!isLastColumn) {
182
+ cell.classList.add('with-border-left');
183
+ cell.classList.remove('sticky-right-shadow');
184
+ } else {
185
+ cell.classList.remove('with-border-left');
186
+ cell.classList.add('sticky-right-shadow');
187
+ }
188
+ });
189
+ }
188
190
  });
189
191
  };
190
192
 
@@ -8,6 +8,25 @@
8
8
  border-right: 1px solid $border_light !important;
9
9
  }
10
10
 
11
+ // **Advanced Table** specific rules to eliminate double borders when vertical-border is active
12
+ .pb_advanced_table &,
13
+ &[data-vertical-border="true"] {
14
+ // Remove first column box-shadow (preserve border-right in Chrome and use CSS var to respect column group border colors)
15
+ .table-header-cells:first-child,
16
+ .table-header-cells-custom:first-child,
17
+ td:first-child,
18
+ .pb_table_td:first-child,
19
+ .checkbox-cell.checkbox-cell-header:first-child {
20
+ box-shadow: none !important;
21
+ border-right: 1px solid var(--column-border-color, #{$border_light}) !important;
22
+ }
23
+
24
+ .pb_table_td:nth-child(2) {
25
+ box-shadow: none !important;
26
+ }
27
+ }
28
+ // --- End Advanced Table First Column Code Section ---
29
+
11
30
  @media screen and (min-width: $screen-xs-min) {
12
31
  tr:hover, .pb_table_tr:hover {
13
32
  td:last-child, .pb_table_td:last-child {
@@ -63,5 +82,35 @@
63
82
  }
64
83
  }
65
84
  }
85
+
86
+ // Dark mode support for advanced tables
87
+ .pb_advanced_table.dark & {
88
+ td, th, .pb_table_td, .pb_table_th {
89
+ border-right: 1px solid $border_dark !important;
90
+ }
91
+
92
+ thead tr th {
93
+ border-right: 1px solid $border_dark !important;
94
+ }
95
+
96
+ &[data-vertical-border="true"] {
97
+ .table-header-cells:first-child,
98
+ .table-header-cells-custom:first-child,
99
+ td:first-child,
100
+ .pb_table_td:first-child,
101
+ .checkbox-cell.checkbox-cell-header:first-child {
102
+ border-right: 1px solid var(--column-border-color, #{$border_dark}) !important;
103
+ }
104
+ }
105
+
106
+ @media screen and (min-width: $screen-xs-min) {
107
+ tr:hover, .pb_table_tr:hover {
108
+ td:last-child, .pb_table_td:last-child {
109
+ border-right-color: darken($border_dark, 10%) !important;
110
+ }
111
+ }
112
+ }
113
+ }
114
+ // --- End Advanced Table Dark Mode Code Section ---
66
115
  }
67
116
  }
@@ -1,5 +1,8 @@
1
1
  import React from 'react'
2
- import { Button, Tooltip, Flex, FlexItem } from 'playbook-ui';
2
+ import Tooltip from '../_tooltip'
3
+ import Button from '../../pb_button/_button'
4
+ import Flex from '../../pb_flex/_flex'
5
+ import FlexItem from '../../pb_flex/_flex_item'
3
6
 
4
7
  const TooltipSizing = (props) => {
5
8
 
@@ -161,6 +161,10 @@
161
161
  .typeahead-plus-icon {
162
162
  color: $text_lt_lighter;
163
163
  }
164
+ .pb_badge_kit_primary {
165
+ margin-bottom: 2px;
166
+ margin-top: 2px;
167
+ }
164
168
  .pb_badge_kit_primary span {
165
169
  line-height: 16.5px;
166
170
  letter-spacing: normal;
@@ -276,3 +276,18 @@ test('multi-value badges have tabIndex and focus class when focused', () => {
276
276
  })
277
277
  })
278
278
 
279
+ test('input display none shows number of selected items', () => {
280
+ render(
281
+ <Typeahead
282
+ data={{ testid: 'input-display-none-test' }}
283
+ defaultValue={[options[0], options[1]]}
284
+ inputDisplay="none"
285
+ isMulti
286
+ options={options}
287
+ />
288
+ )
289
+
290
+ const kit = screen.getByTestId('input-display-none-test')
291
+ const inputDisplayDiv = kit.querySelector(".pb_typeahead_selection_count")
292
+ expect(inputDisplayDiv).toHaveTextContent("2 items selected")
293
+ })
@@ -43,6 +43,7 @@ type TypeaheadProps = {
43
43
  error?: string,
44
44
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
45
45
  id?: string,
46
+ inputDisplay?: "pills" | "none",
46
47
  label?: string,
47
48
  loadOptions?: string | Noop,
48
49
  getOptionLabel?: string | (() => string),
@@ -89,6 +90,7 @@ const Typeahead = forwardRef<HTMLInputElement, TypeaheadProps>(({
89
90
  getOptionValue,
90
91
  htmlOptions = {},
91
92
  id,
93
+ inputDisplay = "pills",
92
94
  name,
93
95
  loadOptions = noop,
94
96
  marginBottom = "sm",
@@ -238,6 +240,7 @@ const Typeahead = forwardRef<HTMLInputElement, TypeaheadProps>(({
238
240
  getOptionValue: isString(getOptionValue) ? get(window, getOptionValue) : getOptionValue,
239
241
  defaultOptions: true,
240
242
  id: id || uniqueId(),
243
+ inputDisplay: inputDisplay,
241
244
  inline: false,
242
245
  isClearable: true,
243
246
  isSearchable: true,
@@ -7,18 +7,29 @@ type ClearContainerProps = {
7
7
  id: string,
8
8
  },
9
9
  clearValue: () => void,
10
+ innerProps?: any,
10
11
  }
11
12
 
12
- const ClearContainer = (props: ClearContainerProps): React.ReactElement => {
13
- const { selectProps, clearValue } = props
13
+ const ClearContainer = (props: ClearContainerProps | any): React.ReactElement => {
14
+ const { selectProps, clearValue, innerProps } = props
14
15
  useEffect(() => {
15
16
  document.addEventListener(`pb-typeahead-kit-${selectProps.id}:clear`, clearValue)
16
17
  }, [clearValue, selectProps.id])
17
18
 
19
+ // To stop this from bubbling up when inside a dialog or other modal
20
+ const handleMouseDown = (event: React.MouseEvent) => {
21
+ event.stopPropagation()
22
+ innerProps?.onMouseDown?.(event)
23
+ }
24
+
18
25
  return (
19
26
  <components.ClearIndicator
20
27
  className="clear_indicator"
21
28
  {...props}
29
+ innerProps={{
30
+ ...innerProps,
31
+ onMouseDown: handleMouseDown,
32
+ }}
22
33
  />
23
34
  )
24
35
  }
@@ -19,7 +19,12 @@ type Props = {
19
19
  const MultiValue = (props: Props) => {
20
20
  const { removeProps, isFocused } = props
21
21
  const { imageUrl, label } = props.data
22
- const { dark, multiKit, pillColor, truncate, wrapped } = props.selectProps
22
+ const { dark, multiKit, pillColor, truncate, wrapped, inputDisplay } = props.selectProps
23
+
24
+ // If inputDisplay is "none", don't render the pill/badge, just return null (the count handled in ValueContainer file)
25
+ if (inputDisplay === 'none') {
26
+ return null
27
+ }
23
28
 
24
29
  const formPillProps = {
25
30
  marginRight: 'xs',
@@ -62,6 +67,7 @@ const MultiValue = (props: Props) => {
62
67
  className={pillClassName}
63
68
  closeProps={removeProps}
64
69
  htmlOptions={{onKeyDown:handleKeyDown}}
70
+ marginRight="xs"
65
71
  removeIcon
66
72
  tabIndex={0}
67
73
  text={label}
@@ -1,15 +1,42 @@
1
1
  import React from 'react'
2
2
  import { components } from 'react-select'
3
+ import Body from '../../pb_body/_body'
3
4
 
4
5
  type ValueContainerProps = {
5
- children: React.ReactNode,
6
+ children: React.ReactNode | React.ReactNode[],
7
+ selectProps?: Record<string, unknown>,
8
+ hasValue?: boolean,
6
9
  }
7
10
 
8
- const ValueContainer = (props: ValueContainerProps): React.ReactElement => (
9
- <components.ValueContainer
10
- className="text_input_value_container"
11
- {...props}
12
- />
13
- )
11
+ const ValueContainer = (props: ValueContainerProps | any): React.ReactElement => {
12
+ const { children, selectProps, hasValue } = props
13
+ const inputDisplay = (selectProps as any)?.inputDisplay
14
+ const value = (selectProps as any)?.value
15
+
16
+ // When inputDisplay is "none" and there are selected values, show count text (this is for multi-select only)
17
+ if (inputDisplay === 'none' && hasValue && value) {
18
+ const selectedCount = Array.isArray(value) ? value.length : 0
19
+
20
+ return (
21
+ <components.ValueContainer
22
+ className="text_input_value_container"
23
+ {...props}
24
+ >
25
+ <Body
26
+ className="pb_typeahead_selection_count"
27
+ text={`${selectedCount} item${selectedCount !== 1 ? 's' : ''} selected`}
28
+ />
29
+ {children}
30
+ </components.ValueContainer>
31
+ )
32
+ }
33
+
34
+ return (
35
+ <components.ValueContainer
36
+ className="text_input_value_container"
37
+ {...props}
38
+ />
39
+ )
40
+ }
14
41
 
15
42
  export default ValueContainer
@@ -0,0 +1,30 @@
1
+ <%
2
+ options = [
3
+ { label: 'Orange', value: '#FFA500' },
4
+ { label: 'Red', value: '#FF0000' },
5
+ { label: 'Green', value: '#00FF00' },
6
+ { label: 'Blue', value: '#0000FF' },
7
+ { label: 'Yellow', value: '#FFFF00' },
8
+ { label: 'Purple', value: '#800080' },
9
+ { label: 'Cyan', value: '#00FFFF' },
10
+ { label: 'Magenta', value: '#FF00FF' }
11
+ ]
12
+ %>
13
+
14
+ <%= pb_rails("typeahead", props: {
15
+ id: "typeahead-input-display-none",
16
+ label: "With Input Display None",
17
+ options: options,
18
+ name: :foo,
19
+ input_display: "none",
20
+ })
21
+ %>
22
+ <br/>
23
+ <%= pb_rails("typeahead", props: {
24
+ id: "typeahead-input-display-pills",
25
+ label: "With Input Display Pills (Default)",
26
+ options: options,
27
+ name: :foo,
28
+ pills: true,
29
+ })
30
+ %>
@@ -0,0 +1,37 @@
1
+ import React from 'react'
2
+
3
+ import Typeahead from '../_typeahead'
4
+
5
+ const options = [
6
+ { label: 'Orange', value: '#FFA500' },
7
+ { label: 'Red', value: '#FF0000' },
8
+ { label: 'Green', value: '#00FF00' },
9
+ { label: 'Blue', value: '#0000FF' },
10
+ { label: 'Yellow', value: '#FFFF00' },
11
+ { label: 'Purple', value: '#800080' },
12
+ { label: 'Cyan', value: '#00FFFF' },
13
+ { label: 'Magenta', value: '#FF00FF' }
14
+ ]
15
+
16
+ const TypeaheadInputDisplay = (props) => {
17
+ return (
18
+ <>
19
+ <Typeahead
20
+ inputDisplay="none"
21
+ isMulti
22
+ label="With Input Display None"
23
+ options={options}
24
+ {...props}
25
+ />
26
+ <br/>
27
+ <Typeahead
28
+ isMulti
29
+ label="With Input Display Pills (Default)"
30
+ options={options}
31
+ {...props}
32
+ />
33
+ </>
34
+ )
35
+ }
36
+
37
+ export default TypeaheadInputDisplay
@@ -0,0 +1,3 @@
1
+ Use the `inputDisplay`/`input_display` prop to optionally display only the count in the display as opposed to multiple pills. This prop is set to 'pills' by default.
2
+
3
+ **NOTE**: `inputDisplay`/`input_display` should only be used with typeaheads that allow multi selection.
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
2
 
3
- import { Typeahead, Title } from 'playbook-ui'
3
+ import Typeahead from '../_typeahead'
4
+ import Title from '../../pb_title/_title'
4
5
  import { useForm } from 'react-hook-form'
5
6
 
6
7
  const languages = [
@@ -5,6 +5,7 @@ examples:
5
5
  - typeahead_default_options: With Default Options
6
6
  - typeahead_with_context: With Context
7
7
  - typeahead_with_pills: With Pills
8
+ - typeahead_input_display: Input Display
8
9
  - typeahead_without_pills: Without Pills (Single Select)
9
10
  - typeahead_with_pills_async: With Pills (Async Data)
10
11
  - typeahead_with_pills_async_users: With Pills (Async Data w/ Users)
@@ -26,6 +27,7 @@ examples:
26
27
  - typeahead_react_hook: React Hook
27
28
  - typeahead_with_highlight: With Highlight
28
29
  - typeahead_with_pills: With Pills
30
+ - typeahead_input_display: Input Display
29
31
  - typeahead_with_pills_async: With Pills (Async Data)
30
32
  - typeahead_with_pills_async_users: With Pills (Async Data w/ Users)
31
33
  - typeahead_with_pills_async_custom_options: With Pills (Async Data w/ Custom Options)
@@ -17,4 +17,5 @@ export { default as TypeaheadReactHook } from './_typeahead_react_hook.jsx'
17
17
  export { default as TypeaheadDisabled } from './_typeahead_disabled.jsx'
18
18
  export { default as TypeaheadPreserveInput } from './_typeahead_preserve_input.jsx'
19
19
  export { default as TypeaheadDefaultValue } from './_typeahead_default_value.jsx'
20
- export { default as TypeaheadCustomOptions } from './_typeahead_custom_options.jsx'
20
+ export { default as TypeaheadCustomOptions } from './_typeahead_custom_options.jsx'
21
+ export { default as TypeaheadInputDisplay } from './_typeahead_input_display.jsx'