playbook_ui 15.8.0.pre.rc.1 → 16.0.0.pre.alpha.PLAY2684iconbuttonvariant13518

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 (200) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -4
  3. data/app/pb_kits/playbook/pb_button/_button.scss +41 -0
  4. data/app/pb_kits/playbook/pb_button/_button.tsx +5 -0
  5. data/app/pb_kits/playbook/pb_button/button.html.erb +12 -8
  6. data/app/pb_kits/playbook/pb_button/button.rb +5 -0
  7. data/app/pb_kits/playbook/pb_button/docs/_button_icon_variant.html.erb +21 -0
  8. data/app/pb_kits/playbook/pb_button/docs/_button_icon_variant.jsx +180 -0
  9. data/app/pb_kits/playbook/pb_button/docs/_button_icon_variant_rails.md +1 -0
  10. data/app/pb_kits/playbook/pb_button/docs/_button_icon_variant_react.md +1 -0
  11. data/app/pb_kits/playbook/pb_button/docs/example.yml +2 -0
  12. data/app/pb_kits/playbook/pb_button/docs/index.js +1 -0
  13. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +7 -0
  14. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.md +1 -1
  15. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.html.erb +135 -0
  16. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.jsx +147 -0
  17. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.md +1 -0
  18. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
  19. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
  20. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.test.jsx +402 -27
  21. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select_options.tsx +1 -0
  22. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +6 -1
  23. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +6 -1
  24. data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.test.jsx +1 -1
  25. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +6 -1
  26. data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.test.jsx +1 -1
  27. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +6 -1
  28. data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.test.jsx +1 -1
  29. data/app/pb_kits/playbook/pb_radio/_radio.scss +8 -0
  30. data/app/pb_kits/playbook/utilities/test/globalProps/alignContent.test.js +37 -50
  31. data/app/pb_kits/playbook/utilities/test/globalProps/alignItems.test.js +38 -50
  32. data/app/pb_kits/playbook/utilities/test/globalProps/alignSelf.test.js +37 -50
  33. data/app/pb_kits/playbook/utilities/test/globalProps/display.test.js +37 -51
  34. data/app/pb_kits/playbook/utilities/test/globalProps/flex.test.js +44 -76
  35. data/app/pb_kits/playbook/utilities/test/globalProps/flexDirection.test.js +37 -50
  36. data/app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js +35 -48
  37. data/app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js +35 -48
  38. data/app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js +37 -50
  39. data/app/pb_kits/playbook/utilities/test/globalProps/globalPropsTestHelper.js +373 -0
  40. data/app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js +37 -50
  41. data/app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js +37 -50
  42. data/app/pb_kits/playbook/utilities/test/globalProps/order.test.js +36 -48
  43. data/app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js +30 -18
  44. data/dist/chunks/_pb_line_graph-hxi01lk7.js +1 -0
  45. data/dist/chunks/_typeahead-xUYeaVxp.js +1 -0
  46. data/dist/chunks/componentRegistry-DzmmLR2x.js +1 -0
  47. data/dist/chunks/globalProps-DgYwLYNx.js +6 -0
  48. data/dist/chunks/lib-NLxTo8OB.js +29 -0
  49. data/dist/chunks/vendor.js +4 -4
  50. data/dist/menu.yml +1 -30
  51. data/dist/playbook-rails-react-bindings.js +1 -1
  52. data/dist/playbook-rails.js +1 -1
  53. data/dist/playbook.css +1 -1
  54. data/lib/playbook/version.rb +2 -2
  55. metadata +15 -147
  56. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.scss +0 -6
  57. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +0 -196
  58. data/app/pb_kits/playbook/pb_bar_graph/barGraph.test.js +0 -31
  59. data/app/pb_kits/playbook/pb_bar_graph/barGraphSettings.js +0 -32
  60. data/app/pb_kits/playbook/pb_bar_graph/barGraphTheme.ts +0 -106
  61. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.html.erb +0 -1
  62. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +0 -98
  63. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.html.erb +0 -26
  64. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +0 -55
  65. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.md +0 -2
  66. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +0 -42
  67. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +0 -2
  68. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb +0 -26
  69. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +0 -55
  70. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.html.erb +0 -26
  71. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +0 -69
  72. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +0 -3
  73. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.html.erb +0 -58
  74. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +0 -64
  75. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.html.erb +0 -14
  76. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +0 -40
  77. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.html.erb +0 -15
  78. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +0 -48
  79. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb +0 -62
  80. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +0 -136
  81. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +0 -17
  82. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb +0 -23
  83. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +0 -52
  84. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +0 -26
  85. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +0 -86
  86. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +0 -3
  87. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.html.erb +0 -20
  88. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +0 -46
  89. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.md +0 -2
  90. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb +0 -22
  91. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +0 -55
  92. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md +0 -1
  93. data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +0 -1
  94. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -28
  95. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -11
  96. data/app/pb_kits/playbook/pb_circle_chart/ChartsTypes.ts +0 -2
  97. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.scss +0 -16
  98. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +0 -228
  99. data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +0 -45
  100. data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +0 -88
  101. data/app/pb_kits/playbook/pb_circle_chart/circle_chart.html.erb +0 -10
  102. data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +0 -99
  103. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +0 -26
  104. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +0 -88
  105. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +0 -20
  106. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +0 -44
  107. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_rails.md +0 -2
  108. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +0 -2
  109. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +0 -20
  110. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +0 -43
  111. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +0 -5
  112. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +0 -19
  113. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +0 -38
  114. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.html.erb +0 -136
  115. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +0 -152
  116. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +0 -86
  117. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +0 -142
  118. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +0 -14
  119. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +0 -63
  120. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +0 -22
  121. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +0 -45
  122. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.html.erb +0 -37
  123. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +0 -61
  124. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.html.erb +0 -22
  125. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +0 -41
  126. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.html.erb +0 -38
  127. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +0 -55
  128. data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +0 -1
  129. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +0 -26
  130. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +0 -11
  131. data/app/pb_kits/playbook/pb_dashboard/commonSettings.js +0 -104
  132. data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +0 -16
  133. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +0 -174
  134. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +0 -173
  135. data/app/pb_kits/playbook/pb_dashboard/themeTypes.ts +0 -20
  136. data/app/pb_kits/playbook/pb_gauge/_gauge.scss +0 -49
  137. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +0 -215
  138. data/app/pb_kits/playbook/pb_gauge/docs/_description.md +0 -1
  139. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.html.erb +0 -12
  140. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.jsx +0 -36
  141. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_rails.md +0 -2
  142. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_react.md +0 -2
  143. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.html.erb +0 -32
  144. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +0 -146
  145. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_rails.md +0 -1
  146. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_react.md +0 -1
  147. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.html.erb +0 -11
  148. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +0 -30
  149. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.html.erb +0 -12
  150. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +0 -36
  151. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.html.erb +0 -14
  152. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +0 -49
  153. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.html.erb +0 -15
  154. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +0 -62
  155. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +0 -76
  156. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.html.erb +0 -15
  157. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +0 -54
  158. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.md +0 -1
  159. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.html.erb +0 -27
  160. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +0 -80
  161. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.md +0 -2
  162. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.html.erb +0 -14
  163. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +0 -38
  164. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.html.erb +0 -29
  165. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +0 -72
  166. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units_react.md +0 -1
  167. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +0 -27
  168. data/app/pb_kits/playbook/pb_gauge/docs/index.js +0 -11
  169. data/app/pb_kits/playbook/pb_gauge/gauge.html.erb +0 -2
  170. data/app/pb_kits/playbook/pb_gauge/gauge.rb +0 -56
  171. data/app/pb_kits/playbook/pb_gauge/gauge.test.js +0 -35
  172. data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +0 -91
  173. data/app/pb_kits/playbook/pb_line_graph/_line_graph.scss +0 -3
  174. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +0 -166
  175. data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +0 -1
  176. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.html.erb +0 -26
  177. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx +0 -56
  178. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_rails.md +0 -2
  179. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_react.md +0 -3
  180. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.html.erb +0 -26
  181. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +0 -52
  182. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.html.erb +0 -26
  183. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +0 -70
  184. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md +0 -3
  185. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.html.erb +0 -15
  186. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +0 -43
  187. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.html.erb +0 -16
  188. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +0 -49
  189. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.html.erb +0 -62
  190. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +0 -129
  191. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +0 -14
  192. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +0 -18
  193. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +0 -6
  194. data/app/pb_kits/playbook/pb_line_graph/lineGraph.test.js +0 -52
  195. data/app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js +0 -30
  196. data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +0 -125
  197. data/app/pb_kits/playbook/pb_line_graph/line_graph.html.erb +0 -1
  198. data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +0 -93
  199. data/dist/chunks/_typeahead-D0GNUBXn.js +0 -6
  200. data/dist/chunks/lib-DxCgrqqG.js +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0177497af81bb89af7b26046f27197942cb10b7a6640df32234376c1f7cedcb
4
- data.tar.gz: 164f59f14bfffc0a889b4859363c311d09dafddf5c1fce518000a42c4e647623
3
+ metadata.gz: c9d0f9943190ec65f7767c1f1131909858fe408507a1d372dc27035b69847e76
4
+ data.tar.gz: 692a5f395f2c164a70e82e763d565ba9165a618de92d36f2b251cec4be8d1a43
5
5
  SHA512:
6
- metadata.gz: 6c3ead358396ac6c1adf2c5a2a5af3409513bfc0a944fa7298d74135b66ea59f865e30a51167b6f81247967b5ac2be7326aa5717d5b3d0c2993a2a2a96831d48
7
- data.tar.gz: 4a5d41bdcc5e01b9dc0a3ffbaba5292702873902e5325dfeba5759e54049e03c95ce6ba760a0c0e8b1c9bd35c0ca6958bbec137fe7a33da7d978148cc6bc5b2f
6
+ metadata.gz: 23c40516ab6c6326addb1518871fd50284ab753a827eed90b552f1520fdf6cf1e675f7b7429b28ce5c8d88315a260cfd174c8a586e404d3a21f2aedcf6825340
7
+ data.tar.gz: 3fa52f22147c20d6c8bcae9c7cbfe258f5cb7fe76fc983b8ae8d4dcd1b804e2277aee4987ec06ce4d45bada533c11ca552eef8dd56b8792c56f6755b0dc4cb6d
@@ -2,7 +2,6 @@
2
2
  @import 'pb_avatar/avatar';
3
3
  @import 'pb_background/background';
4
4
  @import 'pb_badge/badge';
5
- @import 'pb_bar_graph/bar_graph';
6
5
  @import 'pb_body/body';
7
6
  @import 'pb_bread_crumbs/bread_crumbs';
8
7
  @import 'pb_button/button';
@@ -10,7 +9,6 @@
10
9
  @import 'pb_caption/caption';
11
10
  @import 'pb_card/card';
12
11
  @import 'pb_checkbox/checkbox';
13
- @import 'pb_circle_chart/circle_chart';
14
12
  @import 'pb_circle_icon_button/circle_icon_button';
15
13
  @import 'pb_collapsible/collapsible';
16
14
  @import 'pb_contact/contact';
@@ -38,7 +36,6 @@
38
36
  @import 'pb_form/form';
39
37
  @import 'pb_form_group/form_group';
40
38
  @import 'pb_form_pill/form_pill';
41
- @import 'pb_gauge/gauge';
42
39
  @import 'pb_hashtag/hashtag';
43
40
  @import 'pb_highlight/highlight';
44
41
  @import 'pb_home_address_street/home_address_street';
@@ -53,7 +50,6 @@
53
50
  @import 'pb_layout/layout';
54
51
  @import 'pb_legend/legend';
55
52
  @import 'pb_lightbox/lightbox';
56
- @import 'pb_line_graph/line_graph';
57
53
  @import 'pb_link/link';
58
54
  @import 'pb_list/list';
59
55
  @import 'pb_loading_inline/loading_inline';
@@ -112,4 +112,45 @@ $pb_button_sizes: (
112
112
  @include pb_button_disabled_dark;
113
113
  }
114
114
  }
115
+
116
+ // Icon-only button (icon prop set, no text) - square with equal padding
117
+ // Rails: uses .pb_button_icon_only class
118
+ // React: detects when pb_button_content has an empty text span
119
+ &.pb_button_icon_only,
120
+ &:has(.pb_button_content > span:empty) {
121
+ aspect-ratio: 1;
122
+ min-width: auto;
123
+ width: auto;
124
+ height: auto;
125
+ padding: $pb_button_v_padding !important;
126
+ min-height: ($pb_button_v_padding * 2) + $font_small;
127
+
128
+ &.pb_button_size_sm {
129
+ padding: $font_smaller !important;
130
+ min-height: ($font_smaller * 2) + $font_smaller;
131
+ }
132
+
133
+ &.pb_button_size_md {
134
+ padding: $font_small !important;
135
+ min-height: ($font_small * 2) + $font_small;
136
+ }
137
+
138
+ &.pb_button_size_lg {
139
+ padding: ($font_large - 2px) !important;
140
+ min-height: (($font_large - 2px) * 2) + ($font_large - 2px);
141
+ }
142
+
143
+ // Remove margins from icons
144
+ .button_with_icon,
145
+ .button_with_icon_right {
146
+ margin-right: 0;
147
+ margin-left: 0;
148
+ }
149
+
150
+ // Remove margins from Rails icon wrapper spans
151
+ > span {
152
+ margin-right: 0 !important;
153
+ margin-left: 0 !important;
154
+ }
155
+ }
115
156
  }
@@ -51,9 +51,13 @@ const buttonClassName = (props: ButtonPropTypes) => {
51
51
  type = 'inline',
52
52
  variant = 'primary',
53
53
  size = null,
54
+ text,
55
+ children,
54
56
  } = props
55
57
 
56
58
  const classNames = ['pb_button_kit']
59
+ // Icon-only: has icon, no text/children, and not a reaction button (reaction buttons have count)
60
+ const isIconOnly = icon && !text && !children && variant !== 'reaction'
57
61
 
58
62
  if (variant) classNames.push(`pb_button_${variant}`)
59
63
  if (type) classNames.push(`pb_button_${type}`)
@@ -63,6 +67,7 @@ const buttonClassName = (props: ButtonPropTypes) => {
63
67
  if (size) classNames.push(`pb_button_size_${size}`)
64
68
  if (variant === 'reaction' && icon && !isValidEmoji(icon)) classNames.push('pb_button_reaction_default')
65
69
  if (variant === 'reaction' && highlight) classNames.push('pb_button_active')
70
+ if (isIconOnly) classNames.push('pb_button_icon_only')
66
71
 
67
72
  return classNames.join(' ')
68
73
  }
@@ -16,17 +16,21 @@
16
16
  <% end %>
17
17
  <% end %>
18
18
  <% else %>
19
- <% if object.icon && !object.icon_right %>
20
- <span>
21
- <%= pb_rails("icon", props: { icon: "#{icon}", fixed_width: true, margin_right: "xs", font_style: object.icon_font_family }) %>
22
- </span>
19
+ <% if !object.loading %>
20
+ <% if object.icon && !object.icon_right %>
21
+ <span>
22
+ <%= pb_rails("icon", props: { icon: "#{icon}", fixed_width: true, font_style: object.icon_font_family }.merge((object.icon_only? && content.blank?) ? {} : { margin_right: "xs" })) %>
23
+ </span>
24
+ <% end %>
23
25
  <% end %>
24
26
  <%= pb_rails("icon", props: { custom_icon: Playbook::Engine::root.join(spinner_path), pulse: true, fixed_width: true, classname: "loading-icon" }) %>
25
27
  <span class="pb_button_content"><%= content.presence || object.text %></span>
26
- <% if object.icon && object.icon_right %>
27
- <span>
28
- <%= pb_rails("icon", props: { icon: "#{icon}", fixed_width: true, margin_left: "xs", font_style: object.icon_font_family }) %>
29
- </span>
28
+ <% if !object.loading %>
29
+ <% if object.icon && object.icon_right %>
30
+ <span>
31
+ <%= pb_rails("icon", props: { icon: "#{icon}", fixed_width: true, font_style: object.icon_font_family }.merge((object.icon_only? && content.blank?) ? {} : { margin_left: "xs" })) %>
32
+ </span>
33
+ <% end %>
30
34
  <% end %>
31
35
  <% end %>
32
36
 
@@ -73,6 +73,10 @@ module Playbook
73
73
  emoji_regex.match?(icon)
74
74
  end
75
75
 
76
+ def icon_only?
77
+ icon.present? && text.blank? && variant != "reaction"
78
+ end
79
+
76
80
  def classname
77
81
  class_names = ["pb_button_kit"]
78
82
  class_names << "pb_button_#{variant}" if variant
@@ -82,6 +86,7 @@ module Playbook
82
86
  class_names << "pb_button_size_#{size}" if size
83
87
  class_names << "pb_button_reaction_default" if variant === "reaction" && icon && !valid_emoji(icon)
84
88
  class_names << "pb_button_active" if variant === "reaction" && highlight
89
+ class_names << "pb_button_icon_only" if icon_only?
85
90
 
86
91
  class_names.join(" ")
87
92
  generate_classname(class_names.compact.join(" "), separator: " ")
@@ -0,0 +1,21 @@
1
+ <%= pb_rails("caption", props: { margin_y: "md", text: "Small Size (sm)" }) %>
2
+ <%= pb_rails("button", props: { icon: "plus", size: "sm", margin_right: "lg" }) %>
3
+ <%= pb_rails("button", props: { icon: "plus", size: "sm", variant: "secondary", margin_right: "lg" }) %>
4
+ <%= pb_rails("button", props: { icon: "plus", size: "sm", variant: "link", margin_right: "lg" }) %>
5
+ <%= pb_rails("button", props: { icon: "plus", size: "sm", variant: "danger", margin_right: "lg" }) %>
6
+ <%= pb_rails("button", props: { icon: "plus", size: "sm", disabled: true, margin_right: "lg" }) %>
7
+ <%= pb_rails("button", props: { icon: "plus", size: "sm", loading: true, margin_right: "lg" }) %>
8
+ <%= pb_rails("caption", props: { margin_y: "md", text: "Medium Size (md)" }) %>
9
+ <%= pb_rails("button", props: { icon: "plus", size: "md", margin_right: "lg" }) %>
10
+ <%= pb_rails("button", props: { icon: "plus", size: "md", variant: "secondary", margin_right: "lg" }) %>
11
+ <%= pb_rails("button", props: { icon: "plus", size: "md", variant: "link", margin_right: "lg" }) %>
12
+ <%= pb_rails("button", props: { icon: "plus", size: "md", variant: "danger", margin_right: "lg" }) %>
13
+ <%= pb_rails("button", props: { icon: "plus", size: "md", disabled: true, margin_right: "lg" }) %>
14
+ <%= pb_rails("button", props: { icon: "plus", size: "md", loading: true, margin_right: "lg" }) %>
15
+ <%= pb_rails("caption", props: { margin_y: "md", text: "Large Size (lg)" }) %>
16
+ <%= pb_rails("button", props: { icon: "plus", size: "lg", margin_right: "lg" }) %>
17
+ <%= pb_rails("button", props: { icon: "plus", size: "lg", variant: "secondary", margin_right: "lg" }) %>
18
+ <%= pb_rails("button", props: { icon: "plus", size: "lg", variant: "link", margin_right: "lg" }) %>
19
+ <%= pb_rails("button", props: { icon: "plus", size: "lg", variant: "danger", margin_right: "lg" }) %>
20
+ <%= pb_rails("button", props: { icon: "plus", size: "lg", disabled: true, margin_right: "lg" }) %>
21
+ <%= pb_rails("button", props: { icon: "plus", size: "lg", loading: true, margin_right: "lg" }) %>
@@ -0,0 +1,180 @@
1
+ import React from 'react'
2
+ import Button from "../../pb_button/_button"
3
+ import Caption from "../../pb_caption/_caption"
4
+
5
+ const ButtonIconVariant = (props) => (
6
+ <div>
7
+ <Caption
8
+ marginY="md"
9
+ text="Small Size (sm)"
10
+ />
11
+ <Button
12
+ icon="plus"
13
+ marginRight='lg'
14
+ size="sm"
15
+ tabIndex={0}
16
+ {...props}
17
+ />
18
+ {' '}
19
+ <Button
20
+ icon="plus"
21
+ marginRight='lg'
22
+ size="sm"
23
+ tabIndex={0}
24
+ variant="secondary"
25
+ {...props}
26
+ />
27
+ {' '}
28
+ <Button
29
+ icon="plus"
30
+ marginRight='lg'
31
+ size="sm"
32
+ tabIndex={0}
33
+ variant="link"
34
+ {...props}
35
+ />
36
+ {' '}
37
+ <Button
38
+ icon="plus"
39
+ marginRight='lg'
40
+ size="sm"
41
+ tabIndex={0}
42
+ variant="danger"
43
+ {...props}
44
+ />
45
+ {' '}
46
+ <Button
47
+ disabled
48
+ icon="plus"
49
+ marginRight='lg'
50
+ size="sm"
51
+ tabIndex={0}
52
+ {...props}
53
+ />
54
+ {' '}
55
+ <Button
56
+ icon="plus"
57
+ loading
58
+ marginRight='lg'
59
+ size="sm"
60
+ tabIndex={0}
61
+ {...props}
62
+ />
63
+ <br/>
64
+ <Caption
65
+ marginY="md"
66
+ text="Medium Size (md)"
67
+ />
68
+ <Button
69
+ icon="plus"
70
+ marginRight='lg'
71
+ size="md"
72
+ tabIndex={0}
73
+ {...props}
74
+ />
75
+ {' '}
76
+ <Button
77
+ icon="plus"
78
+ marginRight='lg'
79
+ size="md"
80
+ tabIndex={0}
81
+ variant="secondary"
82
+ {...props}
83
+ />
84
+ {' '}
85
+ <Button
86
+ icon="plus"
87
+ marginRight='lg'
88
+ size="md"
89
+ tabIndex={0}
90
+ variant="link"
91
+ {...props}
92
+ />
93
+ {' '}
94
+ <Button
95
+ icon="plus"
96
+ marginRight='lg'
97
+ size="md"
98
+ tabIndex={0}
99
+ variant="danger"
100
+ {...props}
101
+ />
102
+ {' '}
103
+ <Button
104
+ disabled
105
+ icon="plus"
106
+ marginRight='lg'
107
+ size="md"
108
+ tabIndex={0}
109
+ {...props}
110
+ />
111
+ {' '}
112
+ <Button
113
+ icon="plus"
114
+ loading
115
+ marginRight='lg'
116
+ size="md"
117
+ tabIndex={0}
118
+ {...props}
119
+ />
120
+ <br/>
121
+ <Caption
122
+ marginY="md"
123
+ text="Large Size (lg)"
124
+ />
125
+ <Button
126
+ icon="plus"
127
+ marginRight='lg'
128
+ size="lg"
129
+ tabIndex={0}
130
+ {...props}
131
+ />
132
+ {' '}
133
+ <Button
134
+ icon="plus"
135
+ marginRight='lg'
136
+ size="lg"
137
+ tabIndex={0}
138
+ variant="secondary"
139
+ {...props}
140
+ />
141
+ {' '}
142
+ <Button
143
+ icon="plus"
144
+ marginRight='lg'
145
+ size="lg"
146
+ tabIndex={0}
147
+ variant="link"
148
+ {...props}
149
+ />
150
+ {' '}
151
+ <Button
152
+ icon="plus"
153
+ marginRight='lg'
154
+ size="lg"
155
+ tabIndex={0}
156
+ variant="danger"
157
+ {...props}
158
+ />
159
+ {' '}
160
+ <Button
161
+ disabled
162
+ icon="plus"
163
+ marginRight='lg'
164
+ size="lg"
165
+ tabIndex={0}
166
+ {...props}
167
+ />
168
+ {' '}
169
+ <Button
170
+ icon="plus"
171
+ loading
172
+ marginRight='lg'
173
+ size="lg"
174
+ tabIndex={0}
175
+ {...props}
176
+ />
177
+ </div>
178
+ )
179
+
180
+ export default ButtonIconVariant
@@ -0,0 +1 @@
1
+ The icon button variant automatically renders when you provide an `icon` prop without a corresponding `text` prop. The button will only display an icon (no text) and will be wrapped with the icon button styling. This works with all button variants including "link", "primary", "secondary", etc. Simply use `<%= pb_rails("button", props: { icon: "plus", variant: "secondary" }) %>` to get an icon button.
@@ -0,0 +1 @@
1
+ The icon button variant automatically renders when you provide an `icon` prop without a corresponding `text` prop. The button will only display an icon (no text) and will be wrapped with the icon button styling. This works with all button variants including "link", "primary", "secondary", etc. Simply use `<Button icon="rocket" variant="primary" />` to get an icon button.
@@ -13,6 +13,7 @@ examples:
13
13
  - button_form: Button Form Attribute
14
14
  - button_managed_disabled: Button Toggle Disabled State
15
15
  - button_managed_disabled_helper: Button Toggle Disabled State Helper
16
+ - button_icon_variant: Icon Button Variant
16
17
 
17
18
  react:
18
19
  - button_default: Button Variants
@@ -27,6 +28,7 @@ examples:
27
28
  - button_size: Button Size
28
29
  - button_form: Button Form Attribute
29
30
  - button_hover: Button Hover
31
+ - button_icon_variant: Icon Button Variant
30
32
 
31
33
  swift:
32
34
  - button_default_swift: Button Variants
@@ -4,6 +4,7 @@ export { default as ButtonLink } from './_button_link.jsx'
4
4
  export { default as ButtonLoading } from './_button_loading.jsx'
5
5
  export { default as ButtonBlockContent } from './_button_block_content.jsx'
6
6
  export { default as ButtonIconOptions } from './_button_icon_options.jsx'
7
+ export { default as ButtonIconVariant } from './_button_icon_variant.jsx'
7
8
  export { default as ButtonAccessibility } from './_button_accessibility.jsx'
8
9
  export { default as ButtonOptions } from './_button_options.jsx'
9
10
  export { default as ButtonSize } from './_button_size.jsx'
@@ -358,6 +358,13 @@ const MultiLevelSelect = forwardRef<HTMLInputElement, MultiLevelSelectProps>((pr
358
358
  const { id, value: inputText } = e.target;
359
359
  // The radio button needs a unique ID, this grabs the ID before the hyphen
360
360
  const selectedItemID = id.match(/^[^-]*/)[0];
361
+
362
+ // Check if the item is disabled - if so, don't allow selection (safety check in addition to native disabled attribute)
363
+ const clickedItem = filterFormattedDataById(formattedData, selectedItemID);
364
+ if (clickedItem.length > 0 && clickedItem[0].disabled) {
365
+ return;
366
+ }
367
+
361
368
  // Reset tree checked state, triggering useEffect
362
369
  const treeWithNoSelections = modifyRecursive(formattedData, false);
363
370
  // Update tree with single selection
@@ -1 +1 @@
1
- individual items can also be disabled by including the `disabled:true` within the object on the treeData for the `returnAllSelected`/`return_all_selected` variant. As noted above, this variant will return data on all checked nodes from the dropdown, irrespective of whether it is a parent or child node.
1
+ Individual items can also be disabled by including the `disabled:true` within the object on the treeData for the `returnAllSelected`/`return_all_selected` variant. As noted above, this variant will return data on all checked nodes from the dropdown, irrespective of whether it is a parent or child node.
@@ -0,0 +1,135 @@
1
+ <% treeData = [
2
+ {
3
+ label: "HQ",
4
+ value: "hQ",
5
+ id: "hq2",
6
+ },
7
+ {
8
+ label: "Philadelphia",
9
+ value: "philadelphia",
10
+ id: "phl2",
11
+ disabled: true,
12
+ children: [
13
+ {
14
+ label: "Marketing & Sales PHL",
15
+ value: "marketingAndSalesPhl",
16
+ id: "marketingPHL2",
17
+ },
18
+ {
19
+ label: "Installation Office PHL",
20
+ value: "installationOfficePhl",
21
+ id: "installationPHL2",
22
+ },
23
+ {
24
+ label: "Warehouse PHL",
25
+ value: "warehousePhl",
26
+ id: "warehousePHL2",
27
+ },
28
+ ]
29
+ },
30
+ {
31
+ label: "New Jersey",
32
+ value: "newJersey",
33
+ id: "nj2",
34
+ children: [
35
+ {
36
+ label: "New Jersey",
37
+ value: "newJersey",
38
+ id: "nj12",
39
+ children: [
40
+ {
41
+ label: "Marketing & Sales NJ",
42
+ value: "marketingAndSalesNj",
43
+ id: "marketingNJ2",
44
+ disabled: true,
45
+ },
46
+ {
47
+ label: "Installation Office NJ",
48
+ value: "installationOfficeNj",
49
+ id: "installationNJ2",
50
+ },
51
+ {
52
+ label: "Warehouse NJ",
53
+ value: "warehouseNj",
54
+ id: "warehouseNJ2",
55
+ },
56
+ ],
57
+ },
58
+ {
59
+ label: "Princeton",
60
+ value: "princeton",
61
+ id: "princeton2",
62
+ children: [
63
+ {
64
+ label: "Marketing & Sales Princeton",
65
+ value: "marketingAndSalesPrinceton",
66
+ id: "marketingPR2",
67
+ },
68
+ {
69
+ label: "Installation Office Princeton",
70
+ value: "installationOfficePrinceton",
71
+ id: "installationPR2",
72
+ disabled: true,
73
+ },
74
+ {
75
+ label: "Warehouse Princeton",
76
+ value: "warehousePrinceton",
77
+ id: "warehousePR2",
78
+ },
79
+ ]
80
+ },
81
+ ]
82
+ },
83
+ {
84
+ label: "Maryland",
85
+ value: "maryland",
86
+ id: "MD2",
87
+ children: [
88
+ {
89
+ label: "Marketing & Sales MD",
90
+ value: "marketingAndSalesMd",
91
+ id: "marketingMD2",
92
+ },
93
+ {
94
+ label: "Installation Office MD",
95
+ value: "installationOfficeMd",
96
+ id: "installationMD2",
97
+ },
98
+ {
99
+ label: "Warehouse MD",
100
+ value: "warehouseMd",
101
+ id: "warehouseMD2",
102
+ },
103
+ ]
104
+ },
105
+ {
106
+ label: "Connecticut",
107
+ value: "connecticut",
108
+ id: "CT2",
109
+ children: [
110
+ {
111
+ label: "Marketing & Sales CT",
112
+ value: "marketingAndSalesCt",
113
+ id: "marketingCT2",
114
+ },
115
+ {
116
+ label: "Installation Office CT",
117
+ value: "installationOfficeCt",
118
+ id: "installationCT2",
119
+ },
120
+ {
121
+ label: "Warehouse CT",
122
+ value: "warehouseCt",
123
+ id: "warehouseCT2",
124
+ },
125
+ ]
126
+ },
127
+ ] %>
128
+
129
+ <%= pb_rails("multi_level_select", props: {
130
+ id: "multi-level-select-single-disabled-rails",
131
+ name: "single_disabled",
132
+ tree_data: treeData,
133
+ input_name: "Power",
134
+ variant: "single"
135
+ }) %>