playbook_ui 14.25.0.pre.alpha.testingcss9700 → 14.25.0.pre.alpha.testingcss9751

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 (228) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +6 -6
  4. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
  5. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +60 -65
  6. data/app/pb_kits/playbook/pb_avatar/avatar.test.js +1 -1
  7. data/app/pb_kits/playbook/pb_background/_background.scss +3 -3
  8. data/app/pb_kits/playbook/pb_badge/_badge.scss +135 -29
  9. data/app/pb_kits/playbook/pb_body/_body.scss +108 -35
  10. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +1 -1
  11. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +17 -30
  12. data/app/pb_kits/playbook/pb_button/_button.scss +39 -31
  13. data/app/pb_kits/playbook/pb_button/_button.tsx +12 -12
  14. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +1 -1
  15. data/app/pb_kits/playbook/pb_button/button.rb +11 -18
  16. data/app/pb_kits/playbook/pb_button/button.test.js +3 -3
  17. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.scss +82 -73
  18. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_dark.scss +32 -33
  19. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss +1 -1
  20. data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.test.js +2 -2
  21. data/app/pb_kits/playbook/pb_caption/_caption.scss +100 -17
  22. data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -8
  23. data/app/pb_kits/playbook/pb_card/_card.scss +79 -68
  24. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +4 -4
  25. data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +11 -2
  26. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +7 -7
  27. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.test.js +1 -1
  28. data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +1 -1
  29. data/app/pb_kits/playbook/pb_collapsible/_collapsible.scss +4 -4
  30. data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +19 -19
  31. data/app/pb_kits/playbook/pb_currency/_currency.scss +124 -39
  32. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.scss +16 -6
  33. data/app/pb_kits/playbook/pb_date/_date.scss +16 -18
  34. data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +1 -1
  35. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +19 -0
  36. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +1 -0
  37. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +12 -12
  38. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +2 -2
  39. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_time_selection_styles.scss +5 -5
  40. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +29 -23
  41. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +1 -1
  42. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.scss +1 -1
  43. data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.test.js +2 -2
  44. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.scss +66 -26
  45. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.test.js +2 -2
  46. data/app/pb_kits/playbook/pb_date_time/_date_time.scss +8 -15
  47. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +6 -7
  48. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.scss +17 -14
  49. data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js +1 -1
  50. data/app/pb_kits/playbook/pb_detail/_detail.scss +86 -21
  51. data/app/pb_kits/playbook/pb_dialog/_dialog.scss +330 -123
  52. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.html.erb +16 -2
  53. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.scss +10 -7
  54. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +1 -1
  55. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +6 -6
  56. data/app/pb_kits/playbook/pb_empty_state/_empty_state.scss +4 -4
  57. data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +20 -9
  58. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +1 -1
  59. data/app/pb_kits/playbook/pb_filter/_filter.scss +8 -8
  60. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +65 -29
  61. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +1 -2
  62. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +1 -1
  63. data/app/pb_kits/playbook/pb_flex/_flex.scss +106 -100
  64. data/app/pb_kits/playbook/pb_flex/_flex.tsx +38 -28
  65. data/app/pb_kits/playbook/pb_flex/_flex_item.scss +146 -51
  66. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +19 -8
  67. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.html.erb +12 -1
  68. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.jsx +26 -1
  69. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap_rails.md +11 -0
  70. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap_react.md +11 -0
  71. data/app/pb_kits/playbook/pb_flex/flex.rb +73 -39
  72. data/app/pb_kits/playbook/pb_flex/flex_item.rb +51 -6
  73. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +1 -1
  74. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +381 -344
  75. data/app/pb_kits/playbook/pb_form_pill/_form_pill.test.jsx +4 -4
  76. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +8 -7
  77. data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +9 -2
  78. data/app/pb_kits/playbook/pb_gauge/_gauge.scss +5 -5
  79. data/app/pb_kits/playbook/pb_hashtag/_hashtag.scss +1 -1
  80. data/app/pb_kits/playbook/pb_highlight/_highlight.scss +1 -1
  81. data/app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js +2 -2
  82. data/app/pb_kits/playbook/pb_icon/_icon.scss +4 -0
  83. data/app/pb_kits/playbook/pb_icon_button/_icon_button.scss +4 -4
  84. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +40 -39
  85. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.rb +1 -1
  86. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +1 -1
  87. data/app/pb_kits/playbook/pb_icon_value/_icon_value.scss +16 -15
  88. data/app/pb_kits/playbook/pb_image/_image.scss +41 -36
  89. data/app/pb_kits/playbook/pb_label_pill/_label_pill.scss +1 -1
  90. data/app/pb_kits/playbook/pb_label_value/_label_value.scss +3 -2
  91. data/app/pb_kits/playbook/pb_label_value/label_value.test.js +2 -2
  92. data/app/pb_kits/playbook/pb_layout/_layout.scss +330 -305
  93. data/app/pb_kits/playbook/pb_layout/_layout.tsx +14 -11
  94. data/app/pb_kits/playbook/pb_layout/body.rb +1 -1
  95. data/app/pb_kits/playbook/pb_layout/footer.rb +1 -1
  96. data/app/pb_kits/playbook/pb_layout/header.rb +1 -1
  97. data/app/pb_kits/playbook/pb_layout/item.rb +1 -7
  98. data/app/pb_kits/playbook/pb_layout/layout.rb +16 -25
  99. data/app/pb_kits/playbook/pb_layout/layout.test.js +3 -3
  100. data/app/pb_kits/playbook/pb_layout/sidebar.rb +1 -1
  101. data/app/pb_kits/playbook/pb_legend/_legend.scss +66 -16
  102. data/app/pb_kits/playbook/pb_legend/legend.test.js +1 -1
  103. data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +4 -4
  104. data/app/pb_kits/playbook/pb_lightbox/lightbox.test.jsx +1 -1
  105. data/app/pb_kits/playbook/pb_link/_link.scss +113 -19
  106. data/app/pb_kits/playbook/pb_list/_list.scss +1 -1
  107. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.scss +13 -11
  108. data/app/pb_kits/playbook/pb_map/_map.scss +1 -1
  109. data/app/pb_kits/playbook/pb_map/docs/_map_default.jsx +1 -1
  110. data/app/pb_kits/playbook/pb_map/docs/_map_with_custom_button.jsx +1 -1
  111. data/app/pb_kits/playbook/pb_map/docs/_map_with_plugin.jsx +1 -1
  112. data/app/pb_kits/playbook/pb_message/_message.scss +21 -16
  113. data/app/pb_kits/playbook/pb_message/_message.tsx +1 -0
  114. data/app/pb_kits/playbook/pb_message/_message_mixins.scss +5 -12
  115. data/app/pb_kits/playbook/pb_message/message.html.erb +1 -1
  116. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss +6 -3
  117. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +16 -15
  118. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +1 -1
  119. data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +1 -1
  120. data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +1 -1
  121. data/app/pb_kits/playbook/pb_online_status/_online_status.scss +19 -15
  122. data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -1
  123. data/app/pb_kits/playbook/pb_online_status/online_status.rb +5 -4
  124. data/app/pb_kits/playbook/pb_online_status/online_status.test.js +2 -2
  125. data/app/pb_kits/playbook/pb_overlay/_overlay.scss +1 -1
  126. data/app/pb_kits/playbook/pb_overlay/overlay.rb +1 -1
  127. data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +5 -2
  128. data/app/pb_kits/playbook/pb_person/_person.scss +1 -1
  129. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +1 -1
  130. data/app/pb_kits/playbook/pb_pill/_pill.scss +23 -21
  131. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.scss +15 -13
  132. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.scss +108 -33
  133. data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +1 -1
  134. data/app/pb_kits/playbook/pb_radio/_radio.scss +71 -52
  135. data/app/pb_kits/playbook/pb_radio/_radio.tsx +1 -1
  136. data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +0 -3
  137. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +4 -4
  138. data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +81 -70
  139. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +9 -1
  140. data/app/pb_kits/playbook/pb_section_separator/_section_separator_mixin.scss +1 -1
  141. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.jsx +3 -1
  142. data/app/pb_kits/playbook/pb_section_separator/section_separator.rb +7 -1
  143. data/app/pb_kits/playbook/pb_select/_select.scss +4 -4
  144. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +6 -2
  145. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.scss +17 -8
  146. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.scss +39 -29
  147. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +2 -0
  148. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.scss +8 -11
  149. data/app/pb_kits/playbook/pb_selectable_list/selectable_list.test.js +24 -25
  150. data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +2 -2
  151. data/app/pb_kits/playbook/pb_source/_source.scss +8 -8
  152. data/app/pb_kits/playbook/pb_star_rating/_star_rating.scss +1 -1
  153. data/app/pb_kits/playbook/pb_star_rating/star_rating.test.js +1 -1
  154. data/app/pb_kits/playbook/pb_stat_value/_stat_value.scss +2 -2
  155. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +5 -5
  156. data/app/pb_kits/playbook/pb_text_input/text_input.rb +15 -0
  157. data/app/pb_kits/playbook/pb_textarea/_textarea.scss +6 -6
  158. data/app/pb_kits/playbook/pb_time/_time.scss +44 -17
  159. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +1 -1
  160. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.scss +5 -8
  161. data/app/pb_kits/playbook/pb_title/_title.scss +42 -39
  162. data/app/pb_kits/playbook/pb_title/_title.tsx +17 -8
  163. data/app/pb_kits/playbook/pb_title/_title_mixin.scss +2 -2
  164. data/app/pb_kits/playbook/pb_title/title.rb +20 -10
  165. data/app/pb_kits/playbook/pb_title/title.test.js +4 -4
  166. data/app/pb_kits/playbook/pb_title_count/_title_count.scss +19 -8
  167. data/app/pb_kits/playbook/pb_title_detail/_title_detail.scss +10 -11
  168. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +3 -3
  169. data/app/pb_kits/playbook/pb_user/user.test.js +1 -1
  170. data/app/pb_kits/playbook/pb_user_badge/_user_badge.scss +23 -8
  171. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.scss +10 -10
  172. data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.test.jsx +3 -3
  173. data/app/pb_kits/playbook/utilities/_gap.scss +12 -24
  174. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +2 -0
  175. data/app/pb_kits/playbook/utilities/globalProps.ts +28 -4
  176. data/dist/chunks/_line_graph-Dv_ODxW3.js +1 -0
  177. data/dist/chunks/_typeahead-CD5RAaaP.js +6 -0
  178. data/dist/chunks/_weekday_stacked-Bv6tOPKC.js +37 -0
  179. data/dist/chunks/lazysizes-B7xYodB-.js +1 -0
  180. data/dist/chunks/lib-CY5ZPzic.js +29 -0
  181. data/dist/chunks/pb_form_validation-D3b0JKHH.js +1 -0
  182. data/dist/chunks/vendor.js +1 -11
  183. data/dist/menu.yml +0 -6
  184. data/dist/playbook-doc.js +3 -67243
  185. data/dist/playbook-rails-react-bindings.js +1 -112
  186. data/dist/playbook-rails.js +1 -2464
  187. data/dist/playbook.css +2 -92354
  188. data/dist/reset.css +1 -89
  189. data/lib/playbook/classnames.rb +2 -0
  190. data/lib/playbook/spacing.rb +53 -1
  191. data/lib/playbook/version.rb +1 -1
  192. metadata +10 -38
  193. data/app/pb_kits/playbook/pb_drawer/_close_icon.tsx +0 -25
  194. data/app/pb_kits/playbook/pb_drawer/_drawer.scss +0 -381
  195. data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +0 -231
  196. data/app/pb_kits/playbook/pb_drawer/_drawer_context.tsx +0 -3
  197. data/app/pb_kits/playbook/pb_drawer/context.ts +0 -11
  198. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.html.erb +0 -8
  199. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx +0 -41
  200. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.html.erb +0 -33
  201. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +0 -78
  202. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb +0 -3
  203. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +0 -26
  204. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.html.erb +0 -20
  205. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +0 -59
  206. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.html.erb +0 -24
  207. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +0 -61
  208. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +0 -24
  209. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.html.erb +0 -21
  210. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +0 -54
  211. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.md +0 -1
  212. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.html.erb +0 -49
  213. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +0 -99
  214. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +0 -20
  215. data/app/pb_kits/playbook/pb_drawer/docs/index.js +0 -7
  216. data/app/pb_kits/playbook/pb_drawer/drawer.html.erb +0 -20
  217. data/app/pb_kits/playbook/pb_drawer/drawer.rb +0 -56
  218. data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +0 -81
  219. data/app/pb_kits/playbook/pb_drawer/hooks/useBreakpoint.tsx +0 -60
  220. data/app/pb_kits/playbook/pb_drawer/hooks/useDrawerAnimation.tsx +0 -21
  221. data/app/pb_kits/playbook/pb_drawer/index.js +0 -257
  222. data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.md +0 -9
  223. data/dist/chunks/_line_graph-DPTwfQR-.js +0 -544
  224. data/dist/chunks/_typeahead-CEqlHw0H.js +0 -30978
  225. data/dist/chunks/_weekday_stacked-D3dG14OB.js +0 -20894
  226. data/dist/chunks/lazysizes-BUUj27EF.js +0 -611
  227. data/dist/chunks/lib-CIetbXpr.js +0 -9609
  228. data/dist/chunks/pb_form_validation-D_g9rOE9.js +0 -60
@@ -1,52 +1,147 @@
1
- [class^=pb_flex_item_kit] {
2
- &[class*=_fixed_size] {
3
- flex-grow: 0;
4
- flex-shrink: 0;
5
- }
6
-
7
- &[class*=_grow] {
8
- flex-grow: 1;
9
- }
10
-
11
- &[class*=_shrink] {
12
- flex-shrink: 1;
13
- }
14
-
15
- // Display Flex - Rails & React
16
- &[class*=display_flex] {
17
- display: flex;
18
- }
19
-
20
- // Alignment: Align Self - Rails & React
21
- &[class*=align_self_start] {
22
- align-self: flex-start;
23
- }
24
-
25
- &[class*=align_self_end] {
26
- align-self: flex-end;
27
- }
28
-
29
- &[class*=align_self_center] {
30
- align-self: center;
31
- }
32
-
33
- &[class*=align_self_stretch] {
34
- align-self: stretch;
35
- }
36
-
37
- //Order Items
38
- @for $i from 0 through 12 {
39
- &[class*=order_#{$i}]{
40
- order: $i;
41
- }
42
- }
43
- &[class*=order_first]{
44
- order: -1;
45
- }
46
-
47
- @for $i from 0 through 12 {
48
- &[class*=_flex_#{$i}]{
49
- flex: $i;
50
- }
51
- }
1
+ // Fixed size
2
+ .pb_flex_item_kit_fixed_size {
3
+ flex-grow: 0;
4
+ flex-shrink: 0;
52
5
  }
6
+
7
+ // Grow
8
+ .pb_flex_item_kit_grow {
9
+ flex-grow: 1;
10
+ }
11
+
12
+ // Shrink
13
+ .pb_flex_item_kit_shrink {
14
+ flex-shrink: 1;
15
+ }
16
+
17
+ // Display Flex
18
+ .pb_flex_item_kit_display_flex {
19
+ display: flex;
20
+ }
21
+
22
+ // Align Self
23
+ .pb_flex_item_kit_align_self_start {
24
+ align-self: flex-start;
25
+ }
26
+
27
+ .pb_flex_item_kit_align_self_end {
28
+ align-self: flex-end;
29
+ }
30
+
31
+ .pb_flex_item_kit_align_self_center {
32
+ align-self: center;
33
+ }
34
+
35
+ .pb_flex_item_kit_align_self_stretch {
36
+ align-self: stretch;
37
+ }
38
+
39
+ // Order classes
40
+ .pb_flex_item_kit_order_0 {
41
+ order: 0;
42
+ }
43
+
44
+ .pb_flex_item_kit_order_1 {
45
+ order: 1;
46
+ }
47
+
48
+ .pb_flex_item_kit_order_2 {
49
+ order: 2;
50
+ }
51
+
52
+ .pb_flex_item_kit_order_3 {
53
+ order: 3;
54
+ }
55
+
56
+ .pb_flex_item_kit_order_4 {
57
+ order: 4;
58
+ }
59
+
60
+ .pb_flex_item_kit_order_5 {
61
+ order: 5;
62
+ }
63
+
64
+ .pb_flex_item_kit_order_6 {
65
+ order: 6;
66
+ }
67
+
68
+ .pb_flex_item_kit_order_7 {
69
+ order: 7;
70
+ }
71
+
72
+ .pb_flex_item_kit_order_8 {
73
+ order: 8;
74
+ }
75
+
76
+ .pb_flex_item_kit_order_9 {
77
+ order: 9;
78
+ }
79
+
80
+ .pb_flex_item_kit_order_10 {
81
+ order: 10;
82
+ }
83
+
84
+ .pb_flex_item_kit_order_11 {
85
+ order: 11;
86
+ }
87
+
88
+ .pb_flex_item_kit_order_12 {
89
+ order: 12;
90
+ }
91
+
92
+ .pb_flex_item_kit_order_first {
93
+ order: -1;
94
+ }
95
+
96
+ // Flex values
97
+ .pb_flex_item_kit_flex_0 {
98
+ flex: 0;
99
+ }
100
+
101
+ .pb_flex_item_kit_flex_1 {
102
+ flex: 1;
103
+ }
104
+
105
+ .pb_flex_item_kit_flex_2 {
106
+ flex: 2;
107
+ }
108
+
109
+ .pb_flex_item_kit_flex_3 {
110
+ flex: 3;
111
+ }
112
+
113
+ .pb_flex_item_kit_flex_4 {
114
+ flex: 4;
115
+ }
116
+
117
+ .pb_flex_item_kit_flex_5 {
118
+ flex: 5;
119
+ }
120
+
121
+ .pb_flex_item_kit_flex_6 {
122
+ flex: 6;
123
+ }
124
+
125
+ .pb_flex_item_kit_flex_7 {
126
+ flex: 7;
127
+ }
128
+
129
+ .pb_flex_item_kit_flex_8 {
130
+ flex: 8;
131
+ }
132
+
133
+ .pb_flex_item_kit_flex_9 {
134
+ flex: 9;
135
+ }
136
+
137
+ .pb_flex_item_kit_flex_10 {
138
+ flex: 10;
139
+ }
140
+
141
+ .pb_flex_item_kit_flex_11 {
142
+ flex: 11;
143
+ }
144
+
145
+ .pb_flex_item_kit_flex_12 {
146
+ flex: 12;
147
+ }
@@ -9,7 +9,8 @@ type FlexItemPropTypes = {
9
9
  htmlOptions?: { [key: string]: string | number | boolean | (() => void) },
10
10
  shrink?: boolean,
11
11
  className?: string,
12
- order?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'first' | 'none',
12
+ flex?: string | number,
13
+ order?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'first' | 'none',
13
14
  alignSelf?: "start" | "end" | "center" | "stretch" | null,
14
15
  displayFlex?: boolean
15
16
  } & GlobalProps
@@ -27,14 +28,14 @@ const FlexItem = (props: FlexItemPropTypes): React.ReactElement => {
27
28
  alignSelf,
28
29
  displayFlex
29
30
  } = props
30
- const growClass = grow === true ? 'grow' : ''
31
- const displayFlexClass = displayFlex === true ? `display_flex_${displayFlex}` : ''
32
- const flexClass = flex !== 'none' ? `flex_${flex}` : ''
33
- const shrinkClass = shrink === true ? 'shrink' : ''
34
- const alignSelfClass = alignSelf ? `align_self_${alignSelf}` : ''
31
+ const growClass = grow === true ? 'pb_flex_item_kit_grow' : ''
32
+ const displayFlexClass = displayFlex === true ? 'pb_flex_item_kit_display_flex' : ''
33
+ const flexClass = flex !== 'none' ? `pb_flex_item_kit_flex_${flex}` : ''
34
+ const shrinkClass = shrink === true ? 'pb_flex_item_kit_shrink' : ''
35
+ const alignSelfClass = alignSelf ? `pb_flex_item_kit_align_self_${alignSelf}` : ''
35
36
  const fixedStyle =
36
37
  fixedSize !== undefined ? { flexBasis: `${fixedSize}` } : null
37
- const orderClass = order !== 'none' ? `order_${order}` : null
38
+ const orderClass = order !== 'none' ? `pb_flex_item_kit_order_${order}` : ''
38
39
  const dynamicInlineProps = globalInlineProps(props)
39
40
  const combinedStyles = {
40
41
  ...fixedStyle,
@@ -47,7 +48,17 @@ const FlexItem = (props: FlexItemPropTypes): React.ReactElement => {
47
48
  return (
48
49
  <div
49
50
  {...htmlProps}
50
- className={classnames(buildCss('pb_flex_item_kit', growClass, shrinkClass, flexClass, displayFlexClass), orderClass, alignSelfClass, globalProps(props), className)}
51
+ className={classnames(
52
+ 'pb_flex_item_kit',
53
+ growClass,
54
+ shrinkClass,
55
+ flexClass,
56
+ displayFlexClass,
57
+ orderClass,
58
+ alignSelfClass,
59
+ globalProps(props),
60
+ className
61
+ )}
51
62
  style={combinedStyles}
52
63
  >
53
64
  {children}
@@ -1,4 +1,4 @@
1
- <%= pb_rails("title", props: {size: 4, text: "Row"}) %>
1
+ <%= pb_rails("title", props: {size: 4, text: "Gap"}) %>
2
2
  <br/>
3
3
  <div class="flex-doc-example">
4
4
  <%= pb_rails("flex", props:{ gap: "xxs", wrap:true}) do %>
@@ -31,3 +31,14 @@
31
31
  <%= pb_rails("flex/flex_item") do %>4<% end %>
32
32
  <% end %>
33
33
  </div>
34
+
35
+ <br/><br/>
36
+ <%= pb_rails("title", props: {size: 4, text: "Responsive"}) %>
37
+ <br/>
38
+ <div class="flex-doc-example">
39
+ <%= pb_rails("flex", props: { gap: { xs: "none", sm: "sm", md: "md", lg: "lg", xl: "xl" }, wrap: true }) do %>
40
+ <% 40.times do |i| %>
41
+ <%= pb_rails("flex/flex_item") do %> <%=i%> <% end %>
42
+ <% end %>
43
+ <% end %>
44
+ </div>
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
2
  import Flex from '../../pb_flex/_flex'
3
3
  import FlexItem from '../../pb_flex/_flex_item'
4
+ import Title from '../../pb_title/_title'
4
5
 
5
6
  const FlexGap = (props) => {
6
7
  const count = () => {
@@ -13,6 +14,8 @@ const FlexGap = (props) => {
13
14
 
14
15
  return (
15
16
  <>
17
+ <Title size={4}>Gap</Title>
18
+ <br />
16
19
  <div className="flex-doc-example">
17
20
  <Flex
18
21
  gap="xxs"
@@ -27,8 +30,10 @@ const FlexGap = (props) => {
27
30
  </Flex>
28
31
  </div>
29
32
 
30
- <br />
33
+ <br /><br />
31
34
 
35
+ <Title size={4}>Column Gap</Title>
36
+ <br />
32
37
  <div className="flex-doc-example">
33
38
  <Flex
34
39
  columnGap="lg"
@@ -48,6 +53,9 @@ const FlexGap = (props) => {
48
53
  </FlexItem>
49
54
  </Flex>
50
55
  </div>
56
+ <br /><br />
57
+
58
+ <Title size={4}>Row Gap</Title>
51
59
  <br />
52
60
  <div className="flex-doc-example">
53
61
  <Flex
@@ -69,6 +77,23 @@ const FlexGap = (props) => {
69
77
  </FlexItem>
70
78
  </Flex>
71
79
  </div>
80
+
81
+ <br /><br />
82
+ <Title size={4}>Responsive</Title>
83
+ <br />
84
+ <div className="flex-doc-example">
85
+ <Flex
86
+ gap={{ xs: "none", sm: "sm", md: "md", lg: "lg", xl: "xl" }}
87
+ wrap
88
+ {...props}
89
+ >
90
+ {count().map((v, key) => (
91
+ <FlexItem key={key}>
92
+ {v}
93
+ </FlexItem>
94
+ ))}
95
+ </Flex>
96
+ </div>
72
97
  </>
73
98
  )
74
99
  }
@@ -0,0 +1,11 @@
1
+ ##### Prop
2
+
3
+ `gap` | `row_gap` | `column_gap` | **Type**: String | Hash | **Values**: xxs | xs | sm | md | lg | xl | none
4
+
5
+ Setting the gap prop sets the `row_gap` and the `column_gap` props to the same size and creates equal space within a flex container.
6
+
7
+ Setting the `row_gap` prop creates space between rows in a flex container.
8
+
9
+ Setting the `column_gap` prop creates space between columns in a flex container.
10
+
11
+ You can also set responsive values by passing a hash with device sizes and values.
@@ -0,0 +1,11 @@
1
+ ##### Prop
2
+
3
+ `gap` | `rowGap` | `columnGap` | **Type**: String | Object | **Values**: xxs | xs | sm | md | lg | xl | none
4
+
5
+ Setting the gap prop sets the `rowGap` and the `columnGap` props to the same size and creates equal space within a flex container.
6
+
7
+ Setting the `rowGap` prop creates space between rows in a flex container.
8
+
9
+ Setting the `columnGap` prop creates space between columns in a flex container.
10
+
11
+ You can also set responsive values by passing an object with device sizes and values.
@@ -24,17 +24,11 @@ module Playbook
24
24
  default: "none",
25
25
  deprecated: true
26
26
 
27
- prop :gap, type: Playbook::Props::Enum,
28
- values: %w[xxs xs sm md lg xl none],
29
- default: "none"
27
+ prop :gap
30
28
 
31
- prop :row_gap, type: Playbook::Props::Enum,
32
- values: %w[xxs xs sm md lg xl none],
33
- default: "none"
29
+ prop :row_gap
34
30
 
35
- prop :column_gap, type: Playbook::Props::Enum,
36
- values: %w[xxs xs sm md lg xl none],
37
- default: "none"
31
+ prop :column_gap
38
32
 
39
33
  prop :reverse, type: Playbook::Props::Boolean,
40
34
  default: false
@@ -56,31 +50,71 @@ module Playbook
56
50
  default: false
57
51
 
58
52
  def classname
59
- generate_classname("pb_flex_kit",
60
- orientation_class,
61
- justify_class,
62
- align_class,
63
- inline_class,
64
- reverse_class,
65
- wrap_class,
66
- spacing_class,
67
- gap_class,
68
- row_gap_class,
69
- column_gap_class,
70
- align_self_class)
53
+ [
54
+ "pb_flex_kit",
55
+ orientation_class,
56
+ justify_class,
57
+ align_class,
58
+ inline_class,
59
+ reverse_class,
60
+ wrap_class,
61
+ spacing_class,
62
+ gap_class,
63
+ row_gap_class,
64
+ column_gap_class,
65
+ align_self_class,
66
+ prop(:classname),
67
+ spacing_props,
68
+ dark_props,
69
+ width_props,
70
+ min_width_props,
71
+ max_width_props,
72
+ gap_props,
73
+ z_index_props,
74
+ number_spacing_props,
75
+ shadow_props,
76
+ line_height_props,
77
+ display_props,
78
+ cursor_props,
79
+ flex_direction_props,
80
+ flex_wrap_props,
81
+ justify_content_props,
82
+ justify_self_props,
83
+ align_items_props,
84
+ align_content_props,
85
+ align_self_props,
86
+ flex_props,
87
+ flex_grow_props,
88
+ flex_shrink_props,
89
+ order_props,
90
+ position_props,
91
+ hover_props,
92
+ border_radius_props,
93
+ text_align_props,
94
+ overflow_props,
95
+ truncate_props,
96
+ left_props,
97
+ top_props,
98
+ right_props,
99
+ bottom_props,
100
+ vertical_align_props,
101
+ height_props,
102
+ min_height_props,
103
+ max_height_props,
104
+ ].compact.flatten.join(" ")
71
105
  end
72
106
 
73
107
  private
74
108
 
75
109
  def orientation_class
76
- "orientation_#{orientation}"
110
+ "pb_flex_kit_orientation_#{orientation}"
77
111
  end
78
112
 
79
113
  def horizontal_class
80
114
  if orientation == "row"
81
- "justify_content_#{horizontal}"
115
+ "pb_flex_kit_justify_content_#{horizontal}"
82
116
  elsif align == "none"
83
- "align_items_#{horizontal}"
117
+ "pb_flex_kit_align_items_#{horizontal}"
84
118
  end
85
119
  end
86
120
 
@@ -88,27 +122,27 @@ module Playbook
88
122
  if justify == "none"
89
123
  horizontal_class
90
124
  else
91
- "justify_content_#{justify}"
125
+ "pb_flex_kit_justify_content_#{justify}"
92
126
  end
93
127
  end
94
128
 
95
129
  def inline_class
96
- inline ? "inline" : nil
130
+ inline ? "pb_flex_kit_inline" : nil
97
131
  end
98
132
 
99
133
  def spacing_class
100
- "spacing_#{spacing}"
134
+ spacing != "none" ? "pb_flex_kit_spacing_#{spacing}" : nil
101
135
  end
102
136
 
103
137
  def reverse_class
104
- reverse ? "reverse" : nil
138
+ reverse ? "pb_flex_kit_reverse" : nil
105
139
  end
106
140
 
107
141
  def vertical_class
108
142
  if orientation == "row"
109
- "align_items_#{vertical}"
143
+ "pb_flex_kit_align_items_#{vertical}"
110
144
  elsif justify == "none"
111
- "justify_content_#{vertical}"
145
+ "pb_flex_kit_justify_content_#{vertical}"
112
146
  end
113
147
  end
114
148
 
@@ -116,7 +150,7 @@ module Playbook
116
150
  if align == "none"
117
151
  vertical_class
118
152
  else
119
- "align_items_#{align}"
153
+ "pb_flex_kit_align_items_#{align}"
120
154
  end
121
155
  end
122
156
 
@@ -124,35 +158,35 @@ module Playbook
124
158
  if align_self == "none"
125
159
  nil
126
160
  else
127
- "align_self_#{align_self}"
161
+ "pb_flex_kit_align_self_#{align_self}"
128
162
  end
129
163
  end
130
164
 
131
165
  def wrap_class
132
- wrap ? "wrap" : nil
166
+ wrap ? "pb_flex_kit_wrap" : nil
133
167
  end
134
168
 
135
169
  def gap_class
136
- if gap == "none"
170
+ if gap == "none" || gap.nil? || gap.is_a?(Hash)
137
171
  nil
138
172
  else
139
- "gap_#{gap}"
173
+ "pb_flex_kit_gap_#{gap}"
140
174
  end
141
175
  end
142
176
 
143
177
  def row_gap_class
144
- if row_gap == "none"
178
+ if row_gap == "none" || row_gap.nil? || row_gap.is_a?(Hash)
145
179
  nil
146
180
  else
147
- "rowGap_#{row_gap}"
181
+ "pb_flex_kit_rowGap_#{row_gap}"
148
182
  end
149
183
  end
150
184
 
151
185
  def column_gap_class
152
- if column_gap == "none"
186
+ if column_gap == "none" || column_gap.nil? || column_gap.is_a?(Hash)
153
187
  nil
154
188
  else
155
- "columnGap_#{column_gap}"
189
+ "pb_flex_kit_columnGap_#{column_gap}"
156
190
  end
157
191
  end
158
192
  end
@@ -17,7 +17,52 @@ module Playbook
17
17
  default: false
18
18
 
19
19
  def classname
20
- generate_classname("pb_flex_item_kit", fixed_size_class, grow_class, shrink_class, display_flex_class) + align_self_class
20
+ [
21
+ "pb_flex_item_kit",
22
+ fixed_size_class,
23
+ grow_class,
24
+ shrink_class,
25
+ display_flex_class,
26
+ align_self_class,
27
+ prop(:classname),
28
+ spacing_props,
29
+ dark_props,
30
+ width_props,
31
+ min_width_props,
32
+ max_width_props,
33
+ gap_props,
34
+ z_index_props,
35
+ number_spacing_props,
36
+ shadow_props,
37
+ line_height_props,
38
+ display_props,
39
+ cursor_props,
40
+ flex_direction_props,
41
+ flex_wrap_props,
42
+ justify_content_props,
43
+ justify_self_props,
44
+ align_items_props,
45
+ align_content_props,
46
+ align_self_props,
47
+ flex_props,
48
+ flex_grow_props,
49
+ flex_shrink_props,
50
+ order_props,
51
+ position_props,
52
+ hover_props,
53
+ border_radius_props,
54
+ text_align_props,
55
+ overflow_props,
56
+ truncate_props,
57
+ left_props,
58
+ top_props,
59
+ right_props,
60
+ bottom_props,
61
+ vertical_align_props,
62
+ height_props,
63
+ min_height_props,
64
+ max_height_props,
65
+ ].compact.flatten.join(" ")
21
66
  end
22
67
 
23
68
  def inline_styles
@@ -32,23 +77,23 @@ module Playbook
32
77
  private
33
78
 
34
79
  def align_self_class
35
- align_self ? "align_self_#{align_self}" : ""
80
+ align_self ? "pb_flex_item_kit_align_self_#{align_self}" : nil
36
81
  end
37
82
 
38
83
  def display_flex_class
39
- display_flex ? "display_flex" : nil
84
+ display_flex ? "pb_flex_item_kit_display_flex" : nil
40
85
  end
41
86
 
42
87
  def fixed_size_class
43
- fixed_size.present? ? "fixed_size" : nil
88
+ fixed_size.present? ? "pb_flex_item_kit_fixed_size" : nil
44
89
  end
45
90
 
46
91
  def grow_class
47
- grow ? "grow" : nil
92
+ grow ? "pb_flex_item_kit_grow" : nil
48
93
  end
49
94
 
50
95
  def shrink_class
51
- shrink ? "shrink" : nil
96
+ shrink ? "pb_flex_item_kit_shrink" : nil
52
97
  end
53
98
  end
54
99
  end
@@ -247,4 +247,4 @@
247
247
  &:has(> [class^="pb_select"]):has(> .pb_passphrase) [class^="pb_select"] {
248
248
  align-self: baseline;
249
249
  }
250
- }
250
+ }