playbook_ui 15.4.0 → 15.5.0.pre.alpha.PLAY2581aggressivevalidation12651

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 (207) 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_copy_button/_copy_button.tsx +21 -8
  11. data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +6 -2
  12. data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +3 -0
  13. data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +24 -0
  14. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.html.erb +9 -0
  15. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.jsx +24 -0
  16. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_rails.md +1 -0
  17. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_react.md +1 -0
  18. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +2 -2
  19. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +1 -2
  20. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +2 -2
  21. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +2 -0
  22. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +2 -0
  23. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -0
  24. data/app/pb_kits/playbook/pb_currency/docs/_currency_abbreviated.md +1 -0
  25. data/app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals_rails.md +1 -0
  26. data/app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals_react.md +1 -0
  27. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.html.erb +10 -0
  28. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.jsx +10 -0
  29. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.md +1 -0
  30. data/app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol_rails.md +1 -0
  31. data/app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol_react.md +1 -0
  32. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +7 -0
  33. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +7 -0
  34. data/app/pb_kits/playbook/pb_currency/docs/_description.md +2 -2
  35. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +25 -11
  36. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +44 -3
  37. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +20 -13
  38. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.rb +6 -4
  39. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.test.js +17 -0
  40. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.html.erb +4 -0
  41. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.jsx +43 -0
  42. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.md +1 -0
  43. data/app/pb_kits/playbook/pb_date_range_inline/docs/_description.md +1 -1
  44. data/app/pb_kits/playbook/pb_date_range_inline/docs/example.yml +3 -2
  45. data/app/pb_kits/playbook/pb_date_range_inline/docs/index.js +1 -0
  46. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +6 -4
  47. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.html.erb +2 -3
  48. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.rb +11 -5
  49. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.test.js +26 -9
  50. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_current_year.html.erb +12 -0
  51. data/app/pb_kits/playbook/pb_date_stacked/docs/{_date_stacked_not_current_year.jsx → _date_stacked_current_year.jsx} +6 -5
  52. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_current_year.md +1 -0
  53. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.html.erb +1 -1
  54. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.jsx +1 -1
  55. data/app/pb_kits/playbook/pb_date_stacked/docs/_description.md +1 -1
  56. data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +2 -2
  57. data/app/pb_kits/playbook/pb_date_stacked/docs/index.js +1 -1
  58. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +3 -0
  59. data/app/pb_kits/playbook/pb_date_time/date_time.html.erb +1 -0
  60. data/app/pb_kits/playbook/pb_date_time/date_time.rb +1 -0
  61. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year.html.erb +4 -0
  62. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year.jsx +14 -0
  63. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year_rails.md +1 -0
  64. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year_react.md +1 -0
  65. data/app/pb_kits/playbook/pb_date_time/docs/example.yml +3 -1
  66. data/app/pb_kits/playbook/pb_date_time/docs/index.js +1 -0
  67. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +3 -0
  68. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +2 -2
  69. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.rb +2 -0
  70. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.test.js +33 -0
  71. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.html.erb +4 -0
  72. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.jsx +22 -0
  73. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.md +1 -0
  74. data/app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml +3 -1
  75. data/app/pb_kits/playbook/pb_date_time_stacked/docs/index.js +1 -0
  76. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +2 -2
  77. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +156 -6
  78. data/app/pb_kits/playbook/pb_draggable/context/types.ts +8 -3
  79. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_dropzone.jsx +180 -0
  80. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_dropzone.md +22 -0
  81. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +3 -2
  82. data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
  83. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +77 -1
  84. data/app/pb_kits/playbook/pb_dropdown/index.js +32 -14
  85. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.jsx +2 -1
  86. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_default.jsx +2 -1
  87. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.jsx +2 -1
  88. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.jsx +2 -1
  89. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +31 -9
  90. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +12 -5
  91. data/app/pb_kits/playbook/pb_flex/docs/_flex_item_example.jsx +1 -0
  92. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_wrapped.jsx +4 -1
  93. data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.jsx +1 -1
  94. data/app/pb_kits/playbook/pb_nav/_item.tsx +18 -4
  95. data/app/pb_kits/playbook/pb_nav/_nav.scss +30 -5
  96. data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +192 -0
  97. data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +1 -1
  98. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.html.erb +21 -0
  99. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.jsx +113 -0
  100. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.md +1 -0
  101. data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.html.erb +30 -0
  102. data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.jsx +117 -0
  103. data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.md +1 -0
  104. data/app/pb_kits/playbook/pb_nav/docs/example.yml +4 -0
  105. data/app/pb_kits/playbook/pb_nav/docs/index.js +3 -1
  106. data/app/pb_kits/playbook/pb_nav/item.html.erb +6 -4
  107. data/app/pb_kits/playbook/pb_nav/item.rb +11 -2
  108. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +3 -1
  109. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.jsx +1 -1
  110. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.jsx +1 -1
  111. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.md +1 -0
  112. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.jsx +1 -1
  113. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.jsx +1 -1
  114. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.jsx +1 -1
  115. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_non_clickable.jsx +1 -2
  116. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.html.erb +1 -1
  117. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.jsx +1 -1
  118. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.md +11 -0
  119. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.jsx +1 -1
  120. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.jsx +1 -1
  121. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.jsx +1 -2
  122. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.jsx +1 -2
  123. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +3 -1
  124. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.jsx +2 -1
  125. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.jsx +2 -1
  126. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.jsx +1 -1
  127. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.md +2 -1
  128. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.jsx +2 -1
  129. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.jsx +1 -1
  130. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.jsx +1 -1
  131. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.jsx +1 -1
  132. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.md +1 -0
  133. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.jsx +1 -1
  134. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_live_data.jsx +2 -1
  135. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.jsx +1 -1
  136. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.jsx +1 -1
  137. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +3 -1
  138. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.jsx +1 -1
  139. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.md +2 -2
  140. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.jsx +2 -1
  141. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.md +1 -0
  142. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.jsx +2 -1
  143. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.jsx +2 -1
  144. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.jsx +2 -1
  145. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.jsx +2 -1
  146. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +3 -1
  147. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +1 -1
  148. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.md +1 -0
  149. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.html.erb +1 -1
  150. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +32 -9
  151. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +4 -1
  152. data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +384 -262
  153. data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -5
  154. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.html.erb +14 -0
  155. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.jsx +29 -0
  156. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.md +3 -0
  157. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.jsx +31 -0
  158. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.md +1 -0
  159. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +4 -1
  160. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +14 -3
  161. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.md +3 -0
  162. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.md +3 -0
  163. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.html.erb +1 -7
  164. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.md +1 -0
  165. data/app/pb_kits/playbook/pb_progress_step/docs/example.yml +3 -0
  166. data/app/pb_kits/playbook/pb_progress_step/docs/index.js +2 -0
  167. data/app/pb_kits/playbook/pb_progress_step/progress_step.test.js +41 -0
  168. data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +3 -1
  169. data/app/pb_kits/playbook/pb_select/docs/_select_react_hook.jsx +3 -1
  170. data/app/pb_kits/playbook/pb_table/_table.tsx +28 -26
  171. data/app/pb_kits/playbook/pb_table/styles/_vertical_border.scss +49 -0
  172. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_sizing.jsx +4 -1
  173. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +4 -0
  174. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -0
  175. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx +2 -1
  176. data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +1 -1
  177. data/app/pb_kits/playbook/utilities/_truncate.scss +2 -0
  178. data/app/pb_kits/playbook/utilities/globalProps.ts +26 -8
  179. data/app/pb_kits/playbook/utilities/test/globalProps/alignContent.test.js +18 -0
  180. data/app/pb_kits/playbook/utilities/test/globalProps/alignItems.test.js +18 -0
  181. data/app/pb_kits/playbook/utilities/test/globalProps/alignSelf.test.js +18 -0
  182. data/app/pb_kits/playbook/utilities/test/globalProps/display.test.js +18 -0
  183. data/app/pb_kits/playbook/utilities/test/globalProps/flex.test.js +18 -0
  184. data/app/pb_kits/playbook/utilities/test/globalProps/flexDirection.test.js +18 -0
  185. data/app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js +18 -0
  186. data/app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js +18 -0
  187. data/app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js +18 -0
  188. data/app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js +18 -0
  189. data/app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js +18 -0
  190. data/app/pb_kits/playbook/utilities/test/globalProps/order.test.js +18 -0
  191. data/dist/chunks/_typeahead-DrZthFaf.js +6 -0
  192. data/dist/chunks/lib-CgpqUb6l.js +29 -0
  193. data/dist/chunks/vendor.js +37 -1
  194. data/dist/playbook-rails-react-bindings.js +1 -1
  195. data/dist/playbook-rails.js +1 -1
  196. data/dist/playbook.css +1 -1
  197. data/lib/playbook/version.rb +2 -2
  198. metadata +48 -12
  199. data/app/pb_kits/playbook/pb_bar_graph/BarGraphStyles.scss +0 -58
  200. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year.html.erb +0 -5
  201. data/dist/chunks/_line_graph-r__oOO2H.js +0 -1
  202. data/dist/chunks/_typeahead-B7c52zVj.js +0 -6
  203. data/dist/chunks/_weekday_stacked-DgiIj2w3.js +0 -37
  204. data/dist/chunks/componentRegistry-DzmmLR2x.js +0 -1
  205. data/dist/chunks/lib-CRUXizZe.js +0 -29
  206. data/dist/chunks/pb_form_validation-CywJN0ej.js +0 -1
  207. data/dist/playbook-doc.js +0 -19
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import PbGaugeChart from '../../pb_pb_gauge_chart/_pb_gauge_chart'
3
- import { colors } from 'playbook-ui'
3
+ import colors from '../../tokens/exports/_colors.module.scss'
4
4
 
5
5
  const data = [{ name: "Name", y: 67 }]
6
6
 
@@ -1,5 +1,5 @@
1
1
  Highcharts allows for any custom colors to be used. Custom data colors allow for color customization to match the needs of business requirements.
2
2
 
3
- For React, pass the prop `plotOptions.solidgauge.borderColor` with a Playbook token like `colors.` + `data_1 | data_2 | data_3 | data_4 | data_5 | data_6 | data_7 | data_8`. HEX colors are also available `eg: #CA0095`
3
+ For React, pass the option `plotOptions.solidgauge.borderColor` with a Playbook token like `colors.` + `data_1 | data_2 | data_3 | data_4 | data_5 | data_6 | data_7 | data_8`. HEX colors are also available `eg: #CA0095`
4
4
 
5
- For Rails, the prop `plotOptions.solidgauge.borderColor` can only be used with HEX values as shown.
5
+ For Rails, the option `plotOptions.solidgauge.borderColor` can only be used with HEX values as shown.
@@ -7,7 +7,8 @@ import Caption from '../../pb_caption/_caption'
7
7
  import Body from '../../pb_body/_body'
8
8
  import SectionSeparator from '../../pb_section_separator/_section_separator'
9
9
  import Title from '../../pb_title/_title'
10
- import { colors, typography } from 'playbook-ui'
10
+ import colors from '../../tokens/exports/_colors.module.scss'
11
+ import typography from '../../tokens/exports/_typography.module.scss'
11
12
 
12
13
  const data = [{ name: "Name", y: 10 }];
13
14
 
@@ -0,0 +1 @@
1
+ In order to use this kit, 'highcharts' and 'highcharts-react-official' must be installed in your repo.
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
2
  import PbGaugeChart from '../../pb_pb_gauge_chart/_pb_gauge_chart'
3
- import { colors, typography } from 'playbook-ui'
3
+ import colors from '../../tokens/exports/_colors.module.scss'
4
+ import typography from '../../tokens/exports/_typography.module.scss'
4
5
 
5
6
  const data = [{ name: "Capacity", y: 75 }]
6
7
 
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
2
  import PbGaugeChart from '../../pb_pb_gauge_chart/_pb_gauge_chart'
3
- import { colors, typography } from 'playbook-ui'
3
+ import colors from '../../tokens/exports/_colors.module.scss'
4
+ import typography from '../../tokens/exports/_typography.module.scss'
4
5
 
5
6
  const chartOptions = {
6
7
  title: {
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
2
  import PbGaugeChart from '../../pb_pb_gauge_chart/_pb_gauge_chart'
3
- import { colors, typography } from 'playbook-ui'
3
+ import colors from '../../tokens/exports/_colors.module.scss'
4
+ import typography from '../../tokens/exports/_typography.module.scss'
4
5
 
5
6
  const data = [{ name: "Rating", y: 4.5 }]
6
7
 
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
2
  import PbGaugeChart from '../../pb_pb_gauge_chart/_pb_gauge_chart'
3
- import { colors, typography } from 'playbook-ui'
3
+ import colors from '../../tokens/exports/_colors.module.scss'
4
+ import typography from '../../tokens/exports/_typography.module.scss'
4
5
 
5
6
 
6
7
  const data1 = [
@@ -1,3 +1,5 @@
1
- This kit is a wrapper around the Highcharts library. It applies styling and default settings but does NOT ship Highcharts. In order to use this kit, 'highcharts' and 'highcharts-react-official' must be installed in your repo. Once done, any prop or functionality provided by Highcharts can be used with this kit without requiring specific props from Playbook. The doc examples below showcase a few common usecases but are not a comprehensive list of all the functionalities possible.
1
+ **In order to use this kit, 'highcharts' and 'highcharts-react-official' must be installed in your repo.**
2
+
3
+ This kit is a wrapper around the Highcharts library. It applies styling and default settings but does NOT ship Highcharts. Once 'highcharts' and 'highcharts-react-official are installed into your repo, any prop or functionality provided by Highcharts can be used with this kit without requiring specific props from Playbook. The doc examples below showcase a few common usecases but are not a comprehensive list of all the functionalities possible.
2
4
 
3
5
  See the [highcharts API docs](https://api.highcharts.com/highcharts/) for a comprehensive look at what is possible.
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import PbLineGraph from '../../pb_pb_line_graph/_pb_line_graph'
3
- import { colors } from 'playbook-ui'
3
+ import colors from '../../tokens/exports/_colors.module.scss'
4
4
 
5
5
  const data = [{
6
6
  name: 'Installation',
@@ -0,0 +1 @@
1
+ In order to use this kit, 'highcharts' and 'highcharts-react-official' must be installed in your repo.
@@ -37,7 +37,7 @@
37
37
  },
38
38
  } %>
39
39
 
40
- <%= pb_rails("title", props: {size: 4, text: "align | vertical_align", padding_top: "sm", padding_bottom: "sm"})%>
40
+ <%= pb_rails("title", props: {size: 4, text: "align | verticalAlign", padding_top: "sm", padding_bottom: "sm"})%>
41
41
  <%= pb_rails("pb_line_graph", props: {options: chartOptionsFirst}) %>
42
42
 
43
43
  <% chartOptionsSecond = {
@@ -110,14 +110,30 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
110
110
  const inputRef = useRef<HTMLInputElement | null>(null)
111
111
  const itiRef = useRef<any>(null);
112
112
  const wrapperRef = useRef<HTMLDivElement | null>(null);
113
- const [inputValue, setInputValue] = useState(value)
113
+ // Handle value prop - it might be a string or an object with number property (from react-hook-form)
114
+ const getValueString = (val: any): string => {
115
+ if (typeof val === 'string') return val
116
+ if (val?.number) return val.number
117
+ return ""
118
+ }
119
+ const [inputValue, setInputValue] = useState(getValueString(value))
114
120
  const [error, setError] = useState(props.error || "")
115
121
  const [dropDownIsOpen, setDropDownIsOpen] = useState(false)
116
122
  const [selectedData, setSelectedData] = useState()
117
123
  const [hasTyped, setHasTyped] = useState(false)
124
+ const [hasBlurred, setHasBlurred] = useState(false)
118
125
  const [formSubmitted, setFormSubmitted] = useState(false)
119
126
  const [hasStartedValidating, setHasStartedValidating] = useState(false)
120
127
 
128
+ // Sync value prop when it changes (e.g., from react-hook-form)
129
+ useEffect(() => {
130
+ const newValue = getValueString(props.value)
131
+ if (newValue !== inputValue) {
132
+ setInputValue(newValue)
133
+ }
134
+ // eslint-disable-next-line react-hooks/exhaustive-deps
135
+ }, [props.value])
136
+
121
137
  // Only sync initial error from props, not continuous updates
122
138
  // Once validation starts, internal validation takes over
123
139
  useEffect(() => {
@@ -143,9 +159,13 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
143
159
  }
144
160
 
145
161
  // Determine which error to display
146
- // Show internal errors on blur (hasTyped) or on form submission (formSubmitted)
147
- const shouldShowInternalError = (hasTyped || formSubmitted) && required && error
162
+ // Show internal errors only after blur (hasBlurred) or on form submission (formSubmitted)
163
+ const shouldShowInternalError = (hasBlurred || formSubmitted) && error
148
164
  const displayError = shouldShowInternalError ? error : ""
165
+
166
+ // Only show error prop after blur (to prevent showing react-hook-form errors while typing)
167
+ const shouldShowPropError = hasBlurred || formSubmitted
168
+ const propError = shouldShowPropError ? (props.error || "") : ""
149
169
 
150
170
  useEffect(() => {
151
171
  const hasError = (error ?? '').length > 0
@@ -259,7 +279,8 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
259
279
  return
260
280
  }
261
281
 
262
- if (!hasTyped && !error) return
282
+ // Only validate if field has been blurred or form has been submitted
283
+ if (!hasBlurred && !formSubmitted && !error) return
263
284
 
264
285
  // Run validation checks
265
286
  if (itiRef.current) isValid(itiRef.current.isValidNumber())
@@ -305,6 +326,7 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
305
326
  setInputValue("")
306
327
  setError("")
307
328
  setHasTyped(false)
329
+ setHasBlurred(false)
308
330
  setFormSubmitted(false)
309
331
  setHasStartedValidating(false)
310
332
  // Only clear validation state if field was required
@@ -418,9 +440,7 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
418
440
  onChange(phoneNumberData)
419
441
  isValid(itiRef.current.isValidNumber())
420
442
 
421
- // Trigger validation after onChange for React Hook Form
422
- // This ensures validation state is up-to-date
423
- setTimeout(() => validateErrors(), 0)
443
+ // Don't validate on change - only validate on blur or form submission
424
444
  }
425
445
 
426
446
  // Separating Concerns as React Docs Recommend
@@ -492,12 +512,15 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
492
512
  dark,
493
513
  "data-phone-number": JSON.stringify(selectedData),
494
514
  disabled,
495
- error: hasTyped ? error : props.error || displayError,
515
+ error: displayError || propError,
496
516
  type: 'tel',
497
517
  id,
498
518
  label,
499
519
  name,
500
- onBlur: validateErrors,
520
+ onBlur: () => {
521
+ setHasBlurred(true)
522
+ validateErrors()
523
+ },
501
524
  onChange: formatAsYouType ? undefined : handleOnChange,
502
525
  value: inputValue
503
526
  }
@@ -1,5 +1,8 @@
1
1
  import React, { useState } from "react";
2
- import { PbReactPopover, CircleIconButton, Body, Flex } from "playbook-ui";
2
+ import PbReactPopover from "../_popover";
3
+ import Body from "../../pb_body/_body";
4
+ import Flex from "../../pb_flex/_flex";
5
+ import CircleIconButton from "../../pb_circle_icon_button/_circle_icon_button";
3
6
 
4
7
  const PopoverAppendTo = (props) => {
5
8
  const [showParentPopover, setShowParentPopover] = useState(false);