playbook_ui 13.11.1 → 13.12.0.pre.alpha.PLAY1081exporttypes1608

Sign up to get free protection for your applications and to get access to all the features.
Files changed (264) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_avatar/_avatar.d.ts +20 -0
  3. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.d.ts +21 -0
  4. data/app/pb_kits/playbook/pb_background/_background.d.ts +33 -0
  5. data/app/pb_kits/playbook/pb_badge/_badge.d.ts +24 -0
  6. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.d.ts +35 -0
  7. data/app/pb_kits/playbook/pb_body/_body.d.ts +24 -0
  8. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.d.ts +12 -0
  9. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.d.ts +13 -0
  10. data/app/pb_kits/playbook/pb_button/_button.d.ts +37 -0
  11. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.d.ts +17 -0
  12. data/app/pb_kits/playbook/pb_caption/_caption.d.ts +20 -0
  13. data/app/pb_kits/playbook/pb_card/_card.d.ts +42 -0
  14. data/app/pb_kits/playbook/pb_checkbox/_checkbox.d.ts +24 -0
  15. data/app/pb_kits/playbook/pb_circle_chart/ChartsTypes.d.ts +2 -0
  16. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.d.ts +35 -0
  17. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.d.ts +21 -0
  18. data/app/pb_kits/playbook/pb_collapsible/_collapsible.d.ts +29 -0
  19. data/app/pb_kits/playbook/pb_collapsible/_helper_functions.d.ts +2 -0
  20. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.d.ts +7 -0
  21. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.d.ts +10 -0
  22. data/app/pb_kits/playbook/pb_collapsible/collapsible_content.rb +3 -1
  23. data/app/pb_kits/playbook/pb_collapsible/context.d.ts +3 -0
  24. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_external_controls.html.erb +22 -0
  25. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_external_controls.md +3 -0
  26. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_external_controls_multiple.html.erb +40 -0
  27. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_external_controls_multiple.md +1 -0
  28. data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +2 -0
  29. data/app/pb_kits/playbook/pb_collapsible/index.js +4 -0
  30. data/app/pb_kits/playbook/pb_collapsible/useCollapsible.d.ts +2 -0
  31. data/app/pb_kits/playbook/pb_contact/_contact.d.ts +13 -0
  32. data/app/pb_kits/playbook/pb_currency/_currency.d.ts +24 -0
  33. data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.d.ts +2 -0
  34. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.d.ts +3 -0
  35. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.d.ts +3 -0
  36. data/app/pb_kits/playbook/pb_dashboard/themeTypes.d.ts +40 -0
  37. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.d.ts +23 -0
  38. data/app/pb_kits/playbook/pb_dashboard_value/dashboardValueSettings.d.ts +43 -0
  39. data/app/pb_kits/playbook/pb_date/_date.d.ts +18 -0
  40. data/app/pb_kits/playbook/pb_date_picker/_date_picker.d.ts +50 -0
  41. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.d.ts +23 -0
  42. data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.d.ts +18 -0
  43. data/app/pb_kits/playbook/pb_date_picker/plugins/timeSelect.d.ts +44 -0
  44. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.d.ts +13 -0
  45. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.d.ts +10 -0
  46. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.d.ts +13 -0
  47. data/app/pb_kits/playbook/pb_date_time/_date_time.d.ts +18 -0
  48. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.d.ts +10 -0
  49. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.d.ts +10 -0
  50. data/app/pb_kits/playbook/pb_detail/_detail.d.ts +20 -0
  51. data/app/pb_kits/playbook/pb_dialog/_close_icon.d.ts +5 -0
  52. data/app/pb_kits/playbook/pb_dialog/_dialog.d.ts +68 -0
  53. data/app/pb_kits/playbook/pb_dialog/_dialog_context.d.ts +2 -0
  54. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.d.ts +8 -0
  55. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.d.ts +20 -0
  56. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.d.ts +19 -0
  57. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.d.ts +10 -0
  58. data/app/pb_kits/playbook/pb_enhanced_element/element_observer.d.ts +17 -0
  59. data/app/pb_kits/playbook/pb_enhanced_element/index.d.ts +17 -0
  60. data/app/pb_kits/playbook/pb_file_upload/_file_upload.d.ts +16 -0
  61. data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.d.ts +10 -0
  62. data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.d.ts +10 -0
  63. data/app/pb_kits/playbook/pb_filter/Filter/FilterDouble.d.ts +14 -0
  64. data/app/pb_kits/playbook/pb_filter/Filter/FilterSingle.d.ts +14 -0
  65. data/app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.d.ts +11 -0
  66. data/app/pb_kits/playbook/pb_filter/Filter/ResultsCount.d.ts +8 -0
  67. data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.d.ts +18 -0
  68. data/app/pb_kits/playbook/pb_filter/Filter/index.d.ts +8 -0
  69. data/app/pb_kits/playbook/pb_filter/_filter.d.ts +1 -0
  70. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.d.ts +18 -0
  71. data/app/pb_kits/playbook/pb_flex/_flex.d.ts +24 -0
  72. data/app/pb_kits/playbook/pb_flex/_flex_item.d.ts +14 -0
  73. data/app/pb_kits/playbook/pb_form_group/_form_group.d.ts +12 -0
  74. data/app/pb_kits/playbook/pb_form_pill/_form_pill.d.ts +20 -0
  75. data/app/pb_kits/playbook/pb_gauge/_gauge.d.ts +31 -0
  76. data/app/pb_kits/playbook/pb_hashtag/_hashtag.d.ts +17 -0
  77. data/app/pb_kits/playbook/pb_highlight/_highlight.d.ts +14 -0
  78. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.d.ts +23 -0
  79. data/app/pb_kits/playbook/pb_icon/_icon.d.ts +29 -0
  80. data/app/pb_kits/playbook/pb_icon/docs/_icon_border_swift.md +7 -0
  81. data/app/pb_kits/playbook/pb_icon/docs/_icon_default_swift.md +7 -0
  82. data/app/pb_kits/playbook/pb_icon/docs/_icon_flip_swift.md +11 -0
  83. data/app/pb_kits/playbook/pb_icon/docs/_icon_props_swift.md +8 -0
  84. data/app/pb_kits/playbook/pb_icon/docs/_icon_rotate_swift.md +11 -0
  85. data/app/pb_kits/playbook/pb_icon/docs/_icon_sizes_swift.md +46 -0
  86. data/app/pb_kits/playbook/pb_icon/docs/example.yml +8 -0
  87. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.d.ts +16 -0
  88. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.d.ts +18 -0
  89. data/app/pb_kits/playbook/pb_icon_value/_icon_value.d.ts +14 -0
  90. data/app/pb_kits/playbook/pb_image/_image.d.ts +20 -0
  91. data/app/pb_kits/playbook/pb_image/docs/_image_props_swift.md +7 -0
  92. data/app/pb_kits/playbook/pb_image/docs/_rounded_image_swift.md +47 -0
  93. data/app/pb_kits/playbook/pb_image/docs/_size_image_swift.md +47 -0
  94. data/app/pb_kits/playbook/pb_image/docs/_size_none_image_swift.md +15 -0
  95. data/app/pb_kits/playbook/pb_image/docs/example.yml +5 -0
  96. data/app/pb_kits/playbook/pb_kit/dateTime.d.ts +67 -0
  97. data/app/pb_kits/playbook/pb_label_pill/_label_pill.d.ts +15 -0
  98. data/app/pb_kits/playbook/pb_label_value/_label_value.d.ts +19 -0
  99. data/app/pb_kits/playbook/pb_label_value/docs/_label_value_default_swift.md +11 -0
  100. data/app/pb_kits/playbook/pb_label_value/docs/_label_value_details_examples_swift.md +72 -0
  101. data/app/pb_kits/playbook/pb_label_value/docs/_label_value_details_swift.md +41 -0
  102. data/app/pb_kits/playbook/pb_label_value/docs/_label_value_props_swift.md +11 -0
  103. data/app/pb_kits/playbook/pb_label_value/docs/example.yml +6 -0
  104. data/app/pb_kits/playbook/pb_layout/_layout.d.ts +48 -0
  105. data/app/pb_kits/playbook/pb_legend/_legend.d.ts +14 -0
  106. data/app/pb_kits/playbook/pb_lightbox/Carousel/Slide.d.ts +12 -0
  107. data/app/pb_kits/playbook/pb_lightbox/Carousel/Slides.d.ts +10 -0
  108. data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnail.d.ts +11 -0
  109. data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnails.d.ts +9 -0
  110. data/app/pb_kits/playbook/pb_lightbox/Carousel/index.d.ts +16 -0
  111. data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.d.ts +22 -0
  112. data/app/pb_kits/playbook/pb_lightbox/_lightbox.d.ts +45 -0
  113. data/app/pb_kits/playbook/pb_lightbox/_lightbox_context.d.ts +2 -0
  114. data/app/pb_kits/playbook/pb_lightbox/hooks/useKbdControls.d.ts +3 -0
  115. data/app/pb_kits/playbook/pb_lightbox/hooks/useWindowSize.d.ts +6 -0
  116. data/app/pb_kits/playbook/pb_line_graph/_line_graph.d.ts +35 -0
  117. data/app/pb_kits/playbook/pb_list/_list.d.ts +22 -0
  118. data/app/pb_kits/playbook/pb_list/_list_item.d.ts +13 -0
  119. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.d.ts +13 -0
  120. data/app/pb_kits/playbook/pb_map/_map.d.ts +30 -0
  121. data/app/pb_kits/playbook/pb_map/_map_controls.d.ts +11 -0
  122. data/app/pb_kits/playbook/pb_map/_map_custom_button.d.ts +6 -0
  123. data/app/pb_kits/playbook/pb_map/pbMapTheme.d.ts +20 -0
  124. data/app/pb_kits/playbook/pb_message/_message.d.ts +33 -0
  125. data/app/pb_kits/playbook/pb_message/_message_mention.d.ts +13 -0
  126. data/app/pb_kits/playbook/pb_message/docs/_message_default_swift.md +57 -0
  127. data/app/pb_kits/playbook/pb_message/docs/_message_props_swift.md +12 -0
  128. data/app/pb_kits/playbook/pb_message/docs/example.yml +4 -0
  129. data/app/pb_kits/playbook/pb_multi_level_select/_helper_functions.d.ts +33 -0
  130. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.d.ts +25 -0
  131. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.d.ts +20 -0
  132. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_default_swift.md +11 -0
  133. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_props_swift.md +7 -0
  134. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_reverse_swift.md +13 -0
  135. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_size_swift.md +11 -0
  136. data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +6 -0
  137. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.d.ts +16 -0
  138. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default_swift.md +15 -0
  139. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_props_swift.md +5 -0
  140. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_small_swift.md +15 -0
  141. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_xsmall_swift.md +15 -0
  142. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +6 -0
  143. data/app/pb_kits/playbook/pb_nav/_item.d.ts +40 -0
  144. data/app/pb_kits/playbook/pb_nav/_nav.d.ts +23 -0
  145. data/app/pb_kits/playbook/pb_nav/navTypes.d.ts +22 -0
  146. data/app/pb_kits/playbook/pb_online_status/_online_status.d.ts +14 -0
  147. data/app/pb_kits/playbook/pb_passphrase/_passphrase.d.ts +19 -0
  148. data/app/pb_kits/playbook/pb_person/_person.d.ts +15 -0
  149. data/app/pb_kits/playbook/pb_person_contact/_person_contact.d.ts +18 -0
  150. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.d.ts +34 -0
  151. data/app/pb_kits/playbook/pb_pill/_pill.d.ts +16 -0
  152. data/app/pb_kits/playbook/pb_popover/_popover.d.ts +22 -0
  153. data/app/pb_kits/playbook/pb_popover/index.d.ts +21 -0
  154. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.d.ts +17 -0
  155. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.d.ts +15 -0
  156. data/app/pb_kits/playbook/pb_progress_step/_progress_step.d.ts +19 -0
  157. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.d.ts +12 -0
  158. data/app/pb_kits/playbook/pb_radio/_radio.d.ts +355 -0
  159. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorButton.d.ts +9 -0
  160. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorTypes.d.ts +9 -0
  161. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/MoreExtensionsDropdown.d.ts +2 -0
  162. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.d.ts +2 -0
  163. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.d.ts +2 -0
  164. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.d.ts +2 -0
  165. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarNodes.d.ts +2 -0
  166. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.d.ts +31 -0
  167. data/app/pb_kits/playbook/pb_rich_text_editor/inlineFocus.d.ts +2 -0
  168. data/app/pb_kits/playbook/pb_rich_text_editor/useFocus.d.ts +2 -0
  169. data/app/pb_kits/playbook/pb_section_separator/_section_separator.d.ts +19 -0
  170. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children_swift.md +14 -0
  171. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_dashed_swift.md +7 -0
  172. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_line_swift.md +8 -0
  173. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_props_swift.md +8 -0
  174. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_text_swift.md +7 -0
  175. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical_swift.md +18 -0
  176. data/app/pb_kits/playbook/pb_section_separator/docs/example.yml +8 -0
  177. data/app/pb_kits/playbook/pb_select/_select.d.ts +385 -0
  178. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.d.ts +30 -0
  179. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.d.ts +27 -0
  180. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.d.ts +21 -0
  181. data/app/pb_kits/playbook/pb_selectable_list/_item.d.ts +20 -0
  182. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.d.ts +17 -0
  183. data/app/pb_kits/playbook/pb_source/_source.d.ts +17 -0
  184. data/app/pb_kits/playbook/pb_star_rating/_star_rating.d.ts +14 -0
  185. data/app/pb_kits/playbook/pb_stat_change/_stat_change.d.ts +10 -0
  186. data/app/pb_kits/playbook/pb_stat_value/_stat_value.d.ts +9 -0
  187. data/app/pb_kits/playbook/pb_table/_table.d.ts +24 -0
  188. data/app/pb_kits/playbook/pb_table/_table_row.d.ts +15 -0
  189. data/app/pb_kits/playbook/pb_table/docs/_table_header.html.erb +4 -4
  190. data/app/pb_kits/playbook/pb_table/index.d.ts +5 -0
  191. data/app/pb_kits/playbook/pb_table/styles/_hover.scss +26 -2
  192. data/app/pb_kits/playbook/pb_table/styles/_table-dark.scss +1 -17
  193. data/app/pb_kits/playbook/pb_table/table_header.html.erb +4 -3
  194. data/app/pb_kits/playbook/pb_table/table_header.rb +28 -5
  195. data/app/pb_kits/playbook/pb_text_input/_text_input.d.ts +383 -0
  196. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on_swift.md +35 -0
  197. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default_swift.md +29 -0
  198. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled_swift.md +13 -0
  199. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error_swift.md +24 -0
  200. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_props_swift.md +13 -0
  201. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +7 -0
  202. data/app/pb_kits/playbook/pb_textarea/_textarea.d.ts +380 -0
  203. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default_swift.md +27 -0
  204. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error_swift.md +11 -0
  205. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_props_swift.md +9 -0
  206. data/app/pb_kits/playbook/pb_textarea/docs/example.yml +5 -0
  207. data/app/pb_kits/playbook/pb_textarea/index.d.ts +10 -0
  208. data/app/pb_kits/playbook/pb_time/_time.d.ts +16 -0
  209. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.d.ts +20 -0
  210. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.d.ts +15 -0
  211. data/app/pb_kits/playbook/pb_timeline/_item.d.ts +11 -0
  212. data/app/pb_kits/playbook/pb_timeline/_timeline.d.ts +26 -0
  213. data/app/pb_kits/playbook/pb_timestamp/_timestamp.d.ts +22 -0
  214. data/app/pb_kits/playbook/pb_title/_title.d.ts +26 -0
  215. data/app/pb_kits/playbook/pb_title_count/_title_count.d.ts +18 -0
  216. data/app/pb_kits/playbook/pb_title_detail/_title_detail.d.ts +16 -0
  217. data/app/pb_kits/playbook/pb_toggle/_toggle.d.ts +21 -0
  218. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default_swift.md +11 -0
  219. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_name_swift.md +10 -0
  220. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_props_swift.md +6 -0
  221. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +4 -0
  222. data/app/pb_kits/playbook/pb_tooltip/_tooltip.d.ts +356 -0
  223. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +25 -9
  224. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
  225. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default_react.jsx +0 -2
  226. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_delay.jsx +0 -1
  227. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_interaction.jsx +0 -1
  228. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_margin.jsx +0 -1
  229. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_selectors.html.erb +1 -1
  230. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_show_tooltip.html.erb +39 -0
  231. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_show_tooltip.md +5 -0
  232. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_show_tooltip_react.jsx +45 -0
  233. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_show_tooltip_react.md +3 -0
  234. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +3 -0
  235. data/app/pb_kits/playbook/pb_tooltip/docs/index.js +1 -0
  236. data/app/pb_kits/playbook/pb_tooltip/index.js +6 -0
  237. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +2 -1
  238. data/app/pb_kits/playbook/pb_tooltip/tooltip.test.jsx +34 -0
  239. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.d.ts +27 -0
  240. data/app/pb_kits/playbook/pb_typeahead/_typeahead.d.ts +35 -0
  241. data/app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.d.ts +2 -0
  242. data/app/pb_kits/playbook/pb_typeahead/components/Control.d.ts +5 -0
  243. data/app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.d.ts +2 -0
  244. data/app/pb_kits/playbook/pb_typeahead/components/MenuList.d.ts +2 -0
  245. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.d.ts +9 -0
  246. data/app/pb_kits/playbook/pb_typeahead/components/Option.d.ts +2 -0
  247. data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.d.ts +2 -0
  248. data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.d.ts +2 -0
  249. data/app/pb_kits/playbook/pb_typeahead/index.d.ts +39 -0
  250. data/app/pb_kits/playbook/pb_user/_user.d.ts +23 -0
  251. data/app/pb_kits/playbook/pb_user_badge/_user_badge.d.ts +14 -0
  252. data/app/pb_kits/playbook/pb_user_badge/badges/million-dollar.d.ts +2 -0
  253. data/app/pb_kits/playbook/pb_user_badge/badges/veteran.d.ts +2 -0
  254. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.d.ts +41 -0
  255. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.d.ts +15 -0
  256. data/app/pb_kits/playbook/playbook-doc.js +1 -1
  257. data/app/pb_kits/playbook/utilities/globalProps.d.ts +113 -0
  258. data/app/pb_kits/playbook/utilities/object.d.ts +1 -0
  259. data/app/pb_kits/playbook/utilities/props.d.ts +38 -0
  260. data/app/pb_kits/playbook/utilities/text.d.ts +3 -0
  261. data/app/pb_kits/playbook/utilities/validEmojiChecker.d.ts +1 -0
  262. data/dist/playbook-rails.js +3 -3
  263. data/lib/playbook/version.rb +2 -2
  264. metadata +236 -7
@@ -0,0 +1,11 @@
1
+ ![toggle-default](https://github.com/powerhome/playbook/assets/92755007/bd99bd01-d577-4455-b1f9-a88b637e8a60)
2
+
3
+
4
+ ```swift
5
+
6
+ VStack(spacing: Spacing.small) {
7
+ PBToggle(checked: true)
8
+ PBToggle(checked: false)
9
+ }
10
+
11
+ ```
@@ -0,0 +1,10 @@
1
+ ![toggle-name](https://github.com/powerhome/playbook/assets/92755007/e45a575c-ab14-4181-a5e8-eb8d1f57ab4d)
2
+
3
+ ```swift
4
+
5
+ VStack(spacing: Spacing.small) {
6
+ PBToggle(label: "car", checked: false)
7
+ PBToggle(label: "bike", checked: false)
8
+ }
9
+
10
+ ```
@@ -0,0 +1,6 @@
1
+ ### Props
2
+ | Name | Type | Description | Default | Values |
3
+ | --- | ----------- | --------- | --------- | --------- |
4
+ | **isHovering** | `Bool` | Changes the style of the Toggle | `false` | `true` `false` |
5
+ | **label** | `String` | Adds a label to the Toggle | `nil` | |
6
+ | **checked** | `Bool` | Changes the style of the Toggle | | `true` `false` |
@@ -13,3 +13,7 @@ examples:
13
13
  - toggle_custom: Custom checkbox input
14
14
  - toggle_custom_radio: Custom radio inputs
15
15
 
16
+ swift:
17
+ - toggle_default_swift: Default State
18
+ - toggle_name_swift: Name and Value
19
+ - toggle_props_swift: ""
@@ -0,0 +1,356 @@
1
+ import React from "react";
2
+ import { Placement } from "@floating-ui/react";
3
+ declare const Tooltip: React.ForwardRefExoticComponent<(Pick<{
4
+ aria?: {
5
+ [key: string]: string;
6
+ };
7
+ className?: string | string[];
8
+ children: JSX.Element;
9
+ data?: {
10
+ [key: string]: string;
11
+ };
12
+ delay?: number | Partial<{
13
+ open: number;
14
+ close: number;
15
+ }>;
16
+ icon?: string;
17
+ interaction?: boolean;
18
+ placement?: Placement;
19
+ position?: "absolute" | "fixed";
20
+ text: string;
21
+ showTooltip?: boolean;
22
+ } & {
23
+ alignContent?: never;
24
+ } & {
25
+ alignItems?: never;
26
+ } & {
27
+ alignSelf?: never;
28
+ } & {
29
+ borderRadius?: "md" | "lg" | "sm" | "xl" | "xs" | "none" | "rounded";
30
+ } & {
31
+ cursor?: "none" | "progress" | "text" | "auto" | "default" | "pointer" | "alias" | "cell" | "copy" | "crosshair" | "grab" | "grabbing" | "help" | "move" | "wait" | "contextMenu" | "verticalText" | "noDrop" | "notAllowed" | "eResize" | "nResize" | "neResize" | "nwResize" | "sResize" | "seResize" | "swResize" | "wResize" | "ewResize" | "nsResize" | "neswResize" | "nwseResize" | "colResize" | "rowResize" | "allScroll" | "zoomIn" | "zoomOut";
32
+ } & {
33
+ dark?: boolean;
34
+ } & {
35
+ display?: import("../types").DisplayType;
36
+ } & import("../types").DisplaySizes & {
37
+ flex?: "none" | "auto" | "initial" | "1" | "2" | "3" | "4" | "5" | "0" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
38
+ } & {
39
+ flexDirection?: "column" | "row" | "rowReverse" | "columnReverse";
40
+ } & {
41
+ flexGrow?: 0 | 1;
42
+ } & {
43
+ flexShrink?: 0 | 1;
44
+ } & {
45
+ flexWrap?: "wrap" | "nowrap" | "wrapReverse";
46
+ } & {
47
+ justifyContent?: never;
48
+ } & {
49
+ justifySelf?: never;
50
+ } & {
51
+ lineHeight?: "loosest" | "looser" | "loose" | "normal" | "tight" | "tighter" | "tightest";
52
+ } & {
53
+ marginRight?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
54
+ marginLeft?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
55
+ marginTop?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
56
+ marginBottom?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
57
+ marginX?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
58
+ marginY?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
59
+ margin?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
60
+ break?: string;
61
+ default?: string;
62
+ } & {
63
+ maxWidth?: import("../types").Sizes;
64
+ } & {
65
+ numberSpacing?: "tabular";
66
+ } & {
67
+ order?: 2 | "none" | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | "first" | 11 | 12;
68
+ } & {
69
+ overflowX?: "auto" | "scroll" | "hidden" | "visible";
70
+ overflowY?: "auto" | "scroll" | "hidden" | "visible";
71
+ overflow?: "auto" | "scroll" | "hidden" | "visible";
72
+ } & {
73
+ paddingRight?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
74
+ paddingLeft?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
75
+ paddingTop?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
76
+ paddingBottom?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
77
+ paddingX?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
78
+ paddingY?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
79
+ padding?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
80
+ break?: string;
81
+ default?: string;
82
+ } & {
83
+ position?: "fixed" | "relative" | "absolute" | "sticky" | "static";
84
+ } & {
85
+ shadow?: "none" | "deep" | "deeper" | "deepest";
86
+ } & {
87
+ textAlign?: "center" | "left" | "right" | "start" | "end" | "justify" | "justifyAll" | "matchParent";
88
+ } & {
89
+ zIndex?: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
90
+ } & {
91
+ hover?: string;
92
+ }, string | number> | Pick<{
93
+ aria?: {
94
+ [key: string]: string;
95
+ };
96
+ className?: string | string[];
97
+ children: JSX.Element;
98
+ data?: {
99
+ [key: string]: string;
100
+ };
101
+ delay?: number | Partial<{
102
+ open: number;
103
+ close: number;
104
+ }>;
105
+ icon?: string;
106
+ interaction?: boolean;
107
+ placement?: Placement;
108
+ position?: "absolute" | "fixed";
109
+ text: string;
110
+ showTooltip?: boolean;
111
+ } & {
112
+ alignContent?: never;
113
+ } & {
114
+ alignItems?: never;
115
+ } & {
116
+ alignSelf?: never;
117
+ } & {
118
+ borderRadius?: "md" | "lg" | "sm" | "xl" | "xs" | "none" | "rounded";
119
+ } & {
120
+ cursor?: "none" | "progress" | "text" | "auto" | "default" | "pointer" | "alias" | "cell" | "copy" | "crosshair" | "grab" | "grabbing" | "help" | "move" | "wait" | "contextMenu" | "verticalText" | "noDrop" | "notAllowed" | "eResize" | "nResize" | "neResize" | "nwResize" | "sResize" | "seResize" | "swResize" | "wResize" | "ewResize" | "nsResize" | "neswResize" | "nwseResize" | "colResize" | "rowResize" | "allScroll" | "zoomIn" | "zoomOut";
121
+ } & {
122
+ dark?: boolean;
123
+ } & {
124
+ display?: import("../types").DisplayType;
125
+ } & import("../types").DisplaySizes & {
126
+ flex?: "none" | "auto" | "initial" | "1" | "2" | "3" | "4" | "5" | "0" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
127
+ } & {
128
+ flexDirection?: "column" | "row" | "rowReverse" | "columnReverse";
129
+ } & {
130
+ flexGrow?: 0 | 1;
131
+ } & {
132
+ flexShrink?: 0 | 1;
133
+ } & {
134
+ flexWrap?: "wrap" | "nowrap" | "wrapReverse";
135
+ } & {
136
+ justifyContent?: never;
137
+ } & {
138
+ justifySelf?: never;
139
+ } & {
140
+ lineHeight?: "loosest" | "looser" | "loose" | "normal" | "tight" | "tighter" | "tightest";
141
+ } & {
142
+ marginRight?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
143
+ marginLeft?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
144
+ marginTop?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
145
+ marginBottom?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
146
+ marginX?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
147
+ marginY?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
148
+ margin?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
149
+ break?: string;
150
+ default?: string;
151
+ } & {
152
+ maxWidth?: import("../types").Sizes;
153
+ } & {
154
+ numberSpacing?: "tabular";
155
+ } & {
156
+ order?: 2 | "none" | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | "first" | 11 | 12;
157
+ } & {
158
+ overflowX?: "auto" | "scroll" | "hidden" | "visible";
159
+ overflowY?: "auto" | "scroll" | "hidden" | "visible";
160
+ overflow?: "auto" | "scroll" | "hidden" | "visible";
161
+ } & {
162
+ paddingRight?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
163
+ paddingLeft?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
164
+ paddingTop?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
165
+ paddingBottom?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
166
+ paddingX?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
167
+ paddingY?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
168
+ padding?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
169
+ break?: string;
170
+ default?: string;
171
+ } & {
172
+ position?: "fixed" | "relative" | "absolute" | "sticky" | "static";
173
+ } & {
174
+ shadow?: "none" | "deep" | "deeper" | "deepest";
175
+ } & {
176
+ textAlign?: "center" | "left" | "right" | "start" | "end" | "justify" | "justifyAll" | "matchParent";
177
+ } & {
178
+ [key: string]: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
179
+ } & {
180
+ hover?: string;
181
+ }, string | number> | Pick<{
182
+ aria?: {
183
+ [key: string]: string;
184
+ };
185
+ className?: string | string[];
186
+ children: JSX.Element;
187
+ data?: {
188
+ [key: string]: string;
189
+ };
190
+ delay?: number | Partial<{
191
+ open: number;
192
+ close: number;
193
+ }>;
194
+ icon?: string;
195
+ interaction?: boolean;
196
+ placement?: Placement;
197
+ position?: "absolute" | "fixed";
198
+ text: string;
199
+ showTooltip?: boolean;
200
+ } & {
201
+ alignContent?: never;
202
+ } & {
203
+ alignItems?: never;
204
+ } & {
205
+ alignSelf?: never;
206
+ } & {
207
+ borderRadius?: "md" | "lg" | "sm" | "xl" | "xs" | "none" | "rounded";
208
+ } & {
209
+ cursor?: "none" | "progress" | "text" | "auto" | "default" | "pointer" | "alias" | "cell" | "copy" | "crosshair" | "grab" | "grabbing" | "help" | "move" | "wait" | "contextMenu" | "verticalText" | "noDrop" | "notAllowed" | "eResize" | "nResize" | "neResize" | "nwResize" | "sResize" | "seResize" | "swResize" | "wResize" | "ewResize" | "nsResize" | "neswResize" | "nwseResize" | "colResize" | "rowResize" | "allScroll" | "zoomIn" | "zoomOut";
210
+ } & {
211
+ dark?: boolean;
212
+ } & import("../types").DisplaySizes & {
213
+ flex?: "none" | "auto" | "initial" | "1" | "2" | "3" | "4" | "5" | "0" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
214
+ } & {
215
+ flexDirection?: "column" | "row" | "rowReverse" | "columnReverse";
216
+ } & {
217
+ flexGrow?: 0 | 1;
218
+ } & {
219
+ flexShrink?: 0 | 1;
220
+ } & {
221
+ flexWrap?: "wrap" | "nowrap" | "wrapReverse";
222
+ } & {
223
+ justifyContent?: never;
224
+ } & {
225
+ justifySelf?: never;
226
+ } & {
227
+ lineHeight?: "loosest" | "looser" | "loose" | "normal" | "tight" | "tighter" | "tightest";
228
+ } & {
229
+ marginRight?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
230
+ marginLeft?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
231
+ marginTop?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
232
+ marginBottom?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
233
+ marginX?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
234
+ marginY?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
235
+ margin?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
236
+ break?: string;
237
+ default?: string;
238
+ } & {
239
+ maxWidth?: import("../types").Sizes;
240
+ } & {
241
+ numberSpacing?: "tabular";
242
+ } & {
243
+ order?: 2 | "none" | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | "first" | 11 | 12;
244
+ } & {
245
+ overflowX?: "auto" | "scroll" | "hidden" | "visible";
246
+ overflowY?: "auto" | "scroll" | "hidden" | "visible";
247
+ overflow?: "auto" | "scroll" | "hidden" | "visible";
248
+ } & {
249
+ paddingRight?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
250
+ paddingLeft?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
251
+ paddingTop?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
252
+ paddingBottom?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
253
+ paddingX?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
254
+ paddingY?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
255
+ padding?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
256
+ break?: string;
257
+ default?: string;
258
+ } & {
259
+ position?: "fixed" | "relative" | "absolute" | "sticky" | "static";
260
+ } & {
261
+ shadow?: "none" | "deep" | "deeper" | "deepest";
262
+ } & {
263
+ textAlign?: "center" | "left" | "right" | "start" | "end" | "justify" | "justifyAll" | "matchParent";
264
+ } & {
265
+ zIndex?: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
266
+ } & {
267
+ hover?: string;
268
+ }, string | number> | Pick<{
269
+ aria?: {
270
+ [key: string]: string;
271
+ };
272
+ className?: string | string[];
273
+ children: JSX.Element;
274
+ data?: {
275
+ [key: string]: string;
276
+ };
277
+ delay?: number | Partial<{
278
+ open: number;
279
+ close: number;
280
+ }>;
281
+ icon?: string;
282
+ interaction?: boolean;
283
+ placement?: Placement;
284
+ position?: "absolute" | "fixed";
285
+ text: string;
286
+ showTooltip?: boolean;
287
+ } & {
288
+ alignContent?: never;
289
+ } & {
290
+ alignItems?: never;
291
+ } & {
292
+ alignSelf?: never;
293
+ } & {
294
+ borderRadius?: "md" | "lg" | "sm" | "xl" | "xs" | "none" | "rounded";
295
+ } & {
296
+ cursor?: "none" | "progress" | "text" | "auto" | "default" | "pointer" | "alias" | "cell" | "copy" | "crosshair" | "grab" | "grabbing" | "help" | "move" | "wait" | "contextMenu" | "verticalText" | "noDrop" | "notAllowed" | "eResize" | "nResize" | "neResize" | "nwResize" | "sResize" | "seResize" | "swResize" | "wResize" | "ewResize" | "nsResize" | "neswResize" | "nwseResize" | "colResize" | "rowResize" | "allScroll" | "zoomIn" | "zoomOut";
297
+ } & {
298
+ dark?: boolean;
299
+ } & import("../types").DisplaySizes & {
300
+ flex?: "none" | "auto" | "initial" | "1" | "2" | "3" | "4" | "5" | "0" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
301
+ } & {
302
+ flexDirection?: "column" | "row" | "rowReverse" | "columnReverse";
303
+ } & {
304
+ flexGrow?: 0 | 1;
305
+ } & {
306
+ flexShrink?: 0 | 1;
307
+ } & {
308
+ flexWrap?: "wrap" | "nowrap" | "wrapReverse";
309
+ } & {
310
+ justifyContent?: never;
311
+ } & {
312
+ justifySelf?: never;
313
+ } & {
314
+ lineHeight?: "loosest" | "looser" | "loose" | "normal" | "tight" | "tighter" | "tightest";
315
+ } & {
316
+ marginRight?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
317
+ marginLeft?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
318
+ marginTop?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
319
+ marginBottom?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
320
+ marginX?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
321
+ marginY?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
322
+ margin?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
323
+ break?: string;
324
+ default?: string;
325
+ } & {
326
+ maxWidth?: import("../types").Sizes;
327
+ } & {
328
+ numberSpacing?: "tabular";
329
+ } & {
330
+ order?: 2 | "none" | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | "first" | 11 | 12;
331
+ } & {
332
+ overflowX?: "auto" | "scroll" | "hidden" | "visible";
333
+ overflowY?: "auto" | "scroll" | "hidden" | "visible";
334
+ overflow?: "auto" | "scroll" | "hidden" | "visible";
335
+ } & {
336
+ paddingRight?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
337
+ paddingLeft?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
338
+ paddingTop?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
339
+ paddingBottom?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
340
+ paddingX?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
341
+ paddingY?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
342
+ padding?: "none" | "auto" | "initial" | "inherit" | import("../types").Sizes;
343
+ break?: string;
344
+ default?: string;
345
+ } & {
346
+ position?: "fixed" | "relative" | "absolute" | "sticky" | "static";
347
+ } & {
348
+ shadow?: "none" | "deep" | "deeper" | "deepest";
349
+ } & {
350
+ textAlign?: "center" | "left" | "right" | "start" | "end" | "justify" | "justifyAll" | "matchParent";
351
+ } & {
352
+ [key: string]: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
353
+ } & {
354
+ hover?: string;
355
+ }, string | number>) & React.RefAttributes<unknown>>;
356
+ export default Tooltip;
@@ -1,4 +1,4 @@
1
- import React, { useRef, useState } from "react"
1
+ import React, { useRef, useState, forwardRef, ForwardedRef } from "react"
2
2
 
3
3
  import {
4
4
  arrow,
@@ -28,9 +28,10 @@ type TooltipProps = {
28
28
  placement?: Placement,
29
29
  position?: "absolute" | "fixed";
30
30
  text: string,
31
+ showTooltip?: boolean,
31
32
  } & GlobalProps
32
33
 
33
- const Tooltip = (props: TooltipProps): React.ReactElement => {
34
+ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): React.ReactElement => {
34
35
  const {
35
36
  aria = {},
36
37
  className,
@@ -42,6 +43,7 @@ const Tooltip = (props: TooltipProps): React.ReactElement => {
42
43
  placement: preferredPlacement = "top",
43
44
  position = "absolute",
44
45
  text,
46
+ showTooltip = true,
45
47
  zIndex,
46
48
  ...rest
47
49
  } = props
@@ -59,10 +61,9 @@ const Tooltip = (props: TooltipProps): React.ReactElement => {
59
61
 
60
62
  const {
61
63
  context,
62
- floating,
63
64
  middlewareData: { arrow: { x: arrowX, y: arrowY } = {}, },
64
65
  placement,
65
- reference,
66
+ refs,
66
67
  strategy,
67
68
  x,
68
69
  y,
@@ -82,12 +83,16 @@ const Tooltip = (props: TooltipProps): React.ReactElement => {
82
83
  ],
83
84
  open,
84
85
  onOpenChange(open) {
85
- setOpen(open)
86
+ if(!showTooltip) {
87
+ return
88
+ } else {
89
+ setOpen(open)
90
+ }
86
91
  },
87
92
  placement: preferredPlacement
88
93
  })
89
94
 
90
-
95
+
91
96
  const { getFloatingProps } = useInteractions([
92
97
  useHover(context, {
93
98
  delay,
@@ -108,7 +113,16 @@ const Tooltip = (props: TooltipProps): React.ReactElement => {
108
113
  <>
109
114
  <div
110
115
  className={`pb_tooltip_kit ${css}`}
111
- ref={reference}
116
+ ref={(element) => {
117
+ refs.setReference(element);
118
+ if (ref) {
119
+ if (typeof ref === "function") {
120
+ ref(element);
121
+ } else if (typeof ref === "object") {
122
+ ref.current = element;
123
+ }
124
+ }
125
+ }}
112
126
  role="tooltip_trigger"
113
127
  style={{ display: "inline-flex" }}
114
128
  {...ariaProps}
@@ -120,7 +134,7 @@ const Tooltip = (props: TooltipProps): React.ReactElement => {
120
134
  <div
121
135
  {...getFloatingProps({
122
136
  className: `tooltip_tooltip ${placement} visible`,
123
- ref: floating,
137
+ ref: refs.setFloating,
124
138
  role: "tooltip",
125
139
  style: {
126
140
  position: strategy,
@@ -153,6 +167,8 @@ const Tooltip = (props: TooltipProps): React.ReactElement => {
153
167
  )}
154
168
  </>
155
169
  )
156
- }
170
+ })
171
+
172
+ Tooltip.displayName = "Tooltip"
157
173
 
158
174
  export default Tooltip
@@ -1,4 +1,4 @@
1
- <%= pb_rails("flex", props: { gap: "md", justify: "center", wrap: true }) do %>
1
+ <%= pb_rails("flex", props: { gap: "md", wrap: true }) do %>
2
2
  <%= pb_rails("flex/flex_item") do %>
3
3
  <span id='regular-tooltip-1'>Hover here (Top)</span>
4
4
 
@@ -9,12 +9,10 @@ const TooltipDefaultReact = (props) => {
9
9
  <Flex
10
10
  flexDirection='row'
11
11
  gap='md'
12
- justifyContent='center'
13
12
  wrap
14
13
  >
15
14
  <FlexItem>
16
15
  <Tooltip
17
- className={"customClassNameHere"}
18
16
  placement='top'
19
17
  text="Whoa. I'm a Tooltip"
20
18
  zIndex={10}
@@ -9,7 +9,6 @@ const TooltipDelay = (props) => {
9
9
  <Flex
10
10
  flexDirection='row'
11
11
  gap='md'
12
- justifyContent='center'
13
12
  wrap
14
13
  >
15
14
  <FlexItem>
@@ -9,7 +9,6 @@ const TooltipInteraction = (props) => {
9
9
  <Flex
10
10
  flexDirection='row'
11
11
  gap='md'
12
- justifyContent='center'
13
12
  wrap
14
13
  >
15
14
  <FlexItem>
@@ -7,7 +7,6 @@ const TooltipMargin = (props) => {
7
7
  return (
8
8
  <Flex
9
9
  flexDirection='row'
10
- justifyContent='center'
11
10
  wrap
12
11
  >
13
12
  <Tooltip
@@ -1,4 +1,4 @@
1
- <%= pb_rails("flex", props: { horizontal: "center", orientation: "column" }) do %>
1
+ <%= pb_rails("flex", props: { orientation: "column" }) do %>
2
2
  <%= pb_rails("flex/flex_item", props: {margin_top: "md"}) do %>
3
3
  <%= pb_rails("button", props: {classname: "tooltip-example-trigger", text: "Example 1"}) %>
4
4
  <% end %>
@@ -0,0 +1,39 @@
1
+
2
+ <%= pb_rails("flex", props: { orientation: "column", gap: "md" }) do %>
3
+ <%= pb_rails("button", props: {text: "Toggle state", id: "toggle-tooltip-button"}) %>
4
+ <%= pb_rails("body") do %>
5
+ Tooltip is: <code id="show-tooltip-state">enabled</code>
6
+ <% end %>
7
+ <%= pb_rails("flex/flex_item") do %>
8
+ <span id="truncated-tooltip-1">Hover me</span>
9
+ <%= pb_rails("tooltip", props: {
10
+ trigger_element_selector: "#truncated-tooltip-1",
11
+ tooltip_id: "truncated-1",
12
+ position: "right",
13
+ }) do %>
14
+ Tooltip is enabled
15
+ <% end %>
16
+ <% end %>
17
+ <% end %>
18
+
19
+
20
+ <script>
21
+ const toggleTooltipButton = document.getElementById("toggle-tooltip-button");
22
+ const showTooltipStateText = document.getElementById("show-tooltip-state");
23
+
24
+ function hideTooltipIfNotTruncated(tooltipId) {
25
+ const tooltipElement = document.querySelector(
26
+ `[data-pb-tooltip-tooltip-id="${tooltipId}"]`
27
+ );
28
+
29
+ tooltipElement.dataset.pbTooltipShowTooltip =
30
+ tooltipElement.dataset.pbTooltipShowTooltip == "false" ? "true" : "false";
31
+
32
+ showTooltipStateText.innerText =
33
+ tooltipElement.dataset.pbTooltipShowTooltip == "false" ? "disabled" : "enabled";
34
+ }
35
+
36
+ toggleTooltipButton.addEventListener("click", () => {
37
+ hideTooltipIfNotTruncated("truncated-1");
38
+ });
39
+ </script>
@@ -0,0 +1,5 @@
1
+ You can build your own logic to control whether to show or hide the tooltip.
2
+
3
+ Click on the `Toggle state` button to change the state of the component and hover over the 'hover me' text to see it in action.
4
+
5
+ Each Tooltip has a `dataset` with the `pbTooltipShowTooltip` property set to true by default. To update it, access the `pbTooltipShowTooltip` in the dataset of your tooltip element: `yourTooltip.dataset.pbTooltipShowTooltip = 'false'`
@@ -0,0 +1,45 @@
1
+ // @flow
2
+
3
+ import React, { useState } from 'react'
4
+ import { Button, Body, Flex, FlexItem, Tooltip } from '../..'
5
+
6
+ const TooltipShowTooltipReact = (props) => {
7
+ const [showTooltip, setShowTooltip] = useState(true);
8
+
9
+ return (
10
+ <Flex
11
+ flexDirection='column'
12
+ gap='md'
13
+ wrap
14
+ >
15
+ <FlexItem>
16
+ <Button
17
+ onClick={()=> setShowTooltip(!showTooltip)}
18
+ text="Toggle state"
19
+ />
20
+ </FlexItem>
21
+ <FlexItem>
22
+ <Body >
23
+ <p>
24
+ {'Tooltip is: '}
25
+ <code>{showTooltip ? "enabled" : "disabled"}</code>
26
+ </p>
27
+ </Body>
28
+ </FlexItem>
29
+ <FlexItem>
30
+ <Tooltip
31
+ placement='right'
32
+ showTooltip={showTooltip}
33
+ text='Tooltip is enabled'
34
+ zIndex={10}
35
+ {...props}
36
+ >
37
+ {'Hover me.'}
38
+ </Tooltip>
39
+ </FlexItem>
40
+
41
+ </Flex>
42
+ )
43
+ }
44
+
45
+ export default TooltipShowTooltipReact
@@ -0,0 +1,3 @@
1
+ You can build your own logic to control whether to show the tooltip using the `showTooltip` prop. Its default value is `true`.
2
+
3
+ Click on the `Toggle state` button to change the state of the component and hover over the 'hover me' text to see it in action.
@@ -4,6 +4,7 @@ examples:
4
4
  - tooltip_default: Default
5
5
  - tooltip_selectors: Using Common Selectors
6
6
  - tooltip_with_icon_circle: Icon Circle Tooltip
7
+ - tooltip_show_tooltip: Show Tooltip
7
8
 
8
9
  react:
9
10
  - tooltip_default_react: Default
@@ -11,3 +12,5 @@ examples:
11
12
  - tooltip_margin: Margin
12
13
  - tooltip_icon: Tooltip with Icon
13
14
  - tooltip_delay: Delay
15
+ - tooltip_show_tooltip_react: Show Tooltip
16
+
@@ -3,3 +3,4 @@ export { default as TooltipInteraction } from './_tooltip_interaction'
3
3
  export { default as TooltipMargin } from './_tooltip_margin'
4
4
  export { default as TooltipIcon } from './_tooltip_icon'
5
5
  export { default as TooltipDelay } from './_tooltip_delay'
6
+ export { default as TooltipShowTooltipReact } from './_tooltip_show_tooltip_react'