playbook_ui 14.9.0.pre.alpha.play1742globalheightfixes4766 → 14.9.0.pre.rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -2
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +17 -61
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.html.erb +1 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +1 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -3
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -2
  8. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -3
  9. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -15
  10. data/app/pb_kits/playbook/pb_background/_background.tsx +2 -8
  11. data/app/pb_kits/playbook/pb_button/_button.scss +0 -6
  12. data/app/pb_kits/playbook/pb_button/_button.tsx +3 -1
  13. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +0 -15
  14. data/app/pb_kits/playbook/pb_button/button.rb +1 -1
  15. data/app/pb_kits/playbook/pb_button/docs/_button_default.html.erb +0 -1
  16. data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +0 -8
  17. data/app/pb_kits/playbook/pb_button/docs/_button_default.md +1 -1
  18. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +2 -2
  19. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +4 -0
  20. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +7 -84
  21. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +1 -3
  22. data/app/pb_kits/playbook/pb_currency/_currency.tsx +3 -7
  23. data/app/pb_kits/playbook/pb_currency/currency.html.erb +2 -2
  24. data/app/pb_kits/playbook/pb_currency/currency.rb +1 -17
  25. data/app/pb_kits/playbook/pb_currency/currency.test.js +3 -40
  26. data/app/pb_kits/playbook/pb_currency/docs/example.yml +0 -2
  27. data/app/pb_kits/playbook/pb_currency/docs/index.js +0 -1
  28. data/app/pb_kits/playbook/pb_drawer/_drawer.scss +0 -1
  29. data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +45 -159
  30. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -1
  31. data/app/pb_kits/playbook/pb_drawer/docs/index.js +0 -1
  32. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -1
  33. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +1 -0
  34. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +4 -0
  35. data/app/pb_kits/playbook/pb_dropdown/utilities/subComponentHelper.tsx +2 -13
  36. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -2
  37. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
  38. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +12 -63
  39. data/app/pb_kits/playbook/pb_image/_image.tsx +1 -3
  40. data/app/pb_kits/playbook/pb_layout/_layout.tsx +14 -36
  41. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +1 -3
  42. data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +2 -2
  43. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +3 -5
  44. data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +2 -3
  45. data/app/pb_kits/playbook/pb_progress_simple/progress_simple.rb +0 -5
  46. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -3
  47. data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.html.erb +1 -2
  48. data/app/pb_kits/playbook/pb_table/_table.tsx +25 -109
  49. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
  50. data/app/pb_kits/playbook/pb_table/styles/_all.scss +0 -2
  51. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +0 -47
  52. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +0 -59
  53. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +0 -3
  54. data/app/pb_kits/playbook/pb_typeahead/index.ts +3 -29
  55. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -5
  56. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +0 -4
  57. data/app/pb_kits/playbook/utilities/_max_width.scss +9 -29
  58. data/app/pb_kits/playbook/utilities/_min_width.scss +2 -6
  59. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +1 -1
  60. data/app/pb_kits/playbook/utilities/globalProps.ts +4 -37
  61. data/dist/chunks/_typeahead-D0PihN_3.js +22 -0
  62. data/dist/chunks/_weekday_stacked-uMIX8f-A.js +45 -0
  63. data/dist/chunks/{lib-SyD3buPZ.js → lib-BC6ESsxG.js} +1 -1
  64. data/dist/chunks/{pb_form_validation-Dt8UJgrJ.js → pb_form_validation-B_Z9rEbg.js} +1 -1
  65. data/dist/chunks/vendor.js +1 -1
  66. data/dist/menu.yml +0 -321
  67. data/dist/playbook-doc.js +1 -1
  68. data/dist/playbook-rails-react-bindings.js +1 -1
  69. data/dist/playbook-rails.js +1 -1
  70. data/dist/playbook.css +1 -1
  71. data/lib/playbook/classnames.rb +0 -4
  72. data/lib/playbook/forms/builder/typeahead_field.rb +0 -13
  73. data/lib/playbook/kit_base.rb +1 -16
  74. data/lib/playbook/spacing.rb +0 -21
  75. data/lib/playbook/version.rb +2 -2
  76. metadata +6 -28
  77. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.html.erb +0 -53
  78. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.md +0 -5
  79. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -50
  80. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md +0 -1
  81. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +0 -57
  82. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +0 -5
  83. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json +0 -5600
  84. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.html.erb +0 -4
  85. data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.jsx +0 -16
  86. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +0 -31
  87. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +0 -6
  88. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +0 -87
  89. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +0 -2
  90. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +0 -4
  91. data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +0 -18
  92. data/app/pb_kits/playbook/tokens/_height.scss +0 -19
  93. data/app/pb_kits/playbook/tokens/exports/_height.module.scss +0 -37
  94. data/app/pb_kits/playbook/utilities/_height.scss +0 -33
  95. data/app/pb_kits/playbook/utilities/_width.scss +0 -45
  96. data/dist/chunks/_typeahead-B8fkIeXA.js +0 -22
  97. data/dist/chunks/_weekday_stacked-DjRTXEi-.js +0 -45
  98. data/lib/playbook/height.rb +0 -29
  99. data/lib/playbook/max_height.rb +0 -29
  100. data/lib/playbook/min_height.rb +0 -29
@@ -13,7 +13,6 @@ module Playbook
13
13
  prop(:classname),
14
14
  spacing_props,
15
15
  dark_props,
16
- width_props,
17
16
  min_width_props,
18
17
  max_width_props,
19
18
  z_index_props,
@@ -44,9 +43,6 @@ module Playbook
44
43
  right_props,
45
44
  bottom_props,
46
45
  vertical_align_props,
47
- height_props,
48
- min_height_props,
49
- max_height_props,
50
46
  ].compact.join(" ")
51
47
  end
52
48
 
@@ -5,19 +5,6 @@ module Playbook
5
5
  class Builder
6
6
  def typeahead(name, _options = {}, _html_options = {}, props: {})
7
7
  props[:name] = name
8
-
9
- input_id = "#{name}_input"
10
- props[:input_options] ||= {}
11
- props[:input_options][:id] ||= input_id
12
-
13
- props[:label] = @template.label(@object_name, name, for: props[:input_options][:id]) if props[:label] == true
14
-
15
- if props[:validation]
16
- validation_message = props[:validation][:message]
17
- props[:input_options][:data] ||= {}
18
- props[:input_options][:data][:validation_message] = validation_message
19
- end
20
-
21
8
  @template.pb_rails("typeahead", props: props)
22
9
  end
23
10
  end
@@ -30,9 +30,6 @@ require "playbook/top"
30
30
  require "playbook/right"
31
31
  require "playbook/bottom"
32
32
  require "playbook/vertical_align"
33
- require "playbook/height"
34
- require "playbook/min_height"
35
- require "playbook/max_height"
36
33
 
37
34
  module Playbook
38
35
  include ActionView::Helpers
@@ -70,9 +67,6 @@ module Playbook
70
67
  include Playbook::Right
71
68
  include Playbook::Bottom
72
69
  include Playbook::VerticalAlign
73
- include Playbook::Height
74
- include Playbook::MinHeight
75
- include Playbook::MaxHeight
76
70
 
77
71
  prop :id
78
72
  prop :data, type: Playbook::Props::HashProp, default: {}
@@ -172,17 +166,8 @@ module Playbook
172
166
  end
173
167
 
174
168
  def dynamic_inline_props
175
- styles = global_inline_props.map { |key, value| "#{key.to_s.gsub('_', '-')}: #{value}" if inline_validator(key, value) }.compact
169
+ styles = global_inline_props.map { |key, value| "#{key.to_s.gsub('_', '-')}: #{value}" if value.present? }.compact
176
170
  styles.join("; ").presence
177
171
  end
178
-
179
- def inline_validator(key, value)
180
- return false if value.nil?
181
- return false if height_values.include?(value) && key == :height
182
- return false if min_height_values.include?(value) && key == :min_height
183
- return false if max_height_values.include?(value) && key == :max_height
184
-
185
- true
186
- end
187
172
  end
188
173
  end
@@ -12,7 +12,6 @@ module Playbook
12
12
  base.prop :margin_y
13
13
  base.prop :max_width
14
14
  base.prop :min_width
15
- base.prop :width
16
15
  base.prop :padding
17
16
  base.prop :padding_bottom
18
17
  base.prop :padding_left
@@ -34,12 +33,6 @@ module Playbook
34
33
  }
35
34
  end
36
35
 
37
- def width_options
38
- {
39
- width: "w",
40
- }
41
- end
42
-
43
36
  def max_width_values
44
37
  %w[0% xs sm md lg xl xxl 0 none 100%]
45
38
  end
@@ -48,10 +41,6 @@ module Playbook
48
41
  %w[0% xs sm md lg xl xxl 0 none 100%]
49
42
  end
50
43
 
51
- def width_values
52
- %w[0% xs sm md lg xl xxl 0 none 100%]
53
- end
54
-
55
44
  def spacing_options
56
45
  {
57
46
  margin: "m",
@@ -136,15 +125,5 @@ module Playbook
136
125
  "max_width_#{filter_classname(width_value)}" if max_width_values.include? width_value
137
126
  end.compact.join(" ")
138
127
  end
139
-
140
- def width_props
141
- selected_w_props = width_options.keys.select { |sk| try(sk) }
142
- return nil unless selected_w_props.present?
143
-
144
- selected_w_props.map do |k|
145
- width_value = send(k)
146
- "width_#{filter_classname(width_value)}" if width_values.include? width_value
147
- end.compact.join(" ")
148
- end
149
128
  end
150
129
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "14.9.0"
5
- VERSION = "14.9.0.pre.alpha.play1742globalheightfixes4766"
4
+ PREVIOUS_VERSION = "14.8.0"
5
+ VERSION = "14.9.0.pre.rc.0"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.9.0.pre.alpha.play1742globalheightfixes4766
4
+ version: 14.9.0.pre.rc.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-12-04 00:00:00.000000000 Z
12
+ date: 2024-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -270,8 +270,6 @@ files:
270
270
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.md
271
271
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx
272
272
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.md
273
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.html.erb
274
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.md
275
273
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx
276
274
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.md
277
275
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx
@@ -280,10 +278,6 @@ files:
280
278
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md
281
279
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.jsx
282
280
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.md
283
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx
284
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md
285
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx
286
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md
287
281
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.jsx
288
282
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.md
289
283
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
@@ -298,7 +292,6 @@ files:
298
292
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.md
299
293
  - app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js
300
294
  - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data.json
301
- - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json
302
295
  - app/pb_kits/playbook/pb_advanced_table/docs/example.yml
303
296
  - app/pb_kits/playbook/pb_advanced_table/docs/index.js
304
297
  - app/pb_kits/playbook/pb_advanced_table/index.js
@@ -774,8 +767,6 @@ files:
774
767
  - app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.md
775
768
  - app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals.html.erb
776
769
  - app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals.jsx
777
- - app/pb_kits/playbook/pb_currency/docs/_currency_negative.html.erb
778
- - app/pb_kits/playbook/pb_currency/docs/_currency_negative.jsx
779
770
  - app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol.html.erb
780
771
  - app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol.jsx
781
772
  - app/pb_kits/playbook/pb_currency/docs/_currency_props_swift.md
@@ -1143,8 +1134,6 @@ files:
1143
1134
  - app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx
1144
1135
  - app/pb_kits/playbook/pb_drawer/docs/_drawer_default.html.erb
1145
1136
  - app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx
1146
- - app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx
1147
- - app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md
1148
1137
  - app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx
1149
1138
  - app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx
1150
1139
  - app/pb_kits/playbook/pb_drawer/docs/example.yml
@@ -2617,8 +2606,6 @@ files:
2617
2606
  - app/pb_kits/playbook/pb_table/docs/_table_sticky.html.erb
2618
2607
  - app/pb_kits/playbook/pb_table/docs/_table_sticky.jsx
2619
2608
  - app/pb_kits/playbook/pb_table/docs/_table_sticky.md
2620
- - app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx
2621
- - app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md
2622
2609
  - app/pb_kits/playbook/pb_table/docs/_table_striped.html.erb
2623
2610
  - app/pb_kits/playbook/pb_table/docs/_table_striped.jsx
2624
2611
  - app/pb_kits/playbook/pb_table/docs/_table_striped.md
@@ -2652,10 +2639,8 @@ files:
2652
2639
  - app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss
2653
2640
  - app/pb_kits/playbook/pb_table/styles/_outer_padding.scss
2654
2641
  - app/pb_kits/playbook/pb_table/styles/_reset.scss
2655
- - app/pb_kits/playbook/pb_table/styles/_scroll.scss
2656
2642
  - app/pb_kits/playbook/pb_table/styles/_side_highlight.scss
2657
2643
  - app/pb_kits/playbook/pb_table/styles/_single-line.scss
2658
- - app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss
2659
2644
  - app/pb_kits/playbook/pb_table/styles/_sticky_header.scss
2660
2645
  - app/pb_kits/playbook/pb_table/styles/_striped.scss
2661
2646
  - app/pb_kits/playbook/pb_table/styles/_structure.scss
@@ -3102,7 +3087,6 @@ files:
3102
3087
  - app/pb_kits/playbook/tokens/_colors.scss
3103
3088
  - app/pb_kits/playbook/tokens/_container.scss
3104
3089
  - app/pb_kits/playbook/tokens/_display.scss
3105
- - app/pb_kits/playbook/tokens/_height.scss
3106
3090
  - app/pb_kits/playbook/tokens/_line_height.scss
3107
3091
  - app/pb_kits/playbook/tokens/_opacity.scss
3108
3092
  - app/pb_kits/playbook/tokens/_overflow.scss
@@ -3118,7 +3102,6 @@ files:
3118
3102
  - app/pb_kits/playbook/tokens/_vertical_align.scss
3119
3103
  - app/pb_kits/playbook/tokens/exports/_border_radius.module.scss
3120
3104
  - app/pb_kits/playbook/tokens/exports/_colors.module.scss
3121
- - app/pb_kits/playbook/tokens/exports/_height.module.scss
3122
3105
  - app/pb_kits/playbook/tokens/exports/_line_height.module.scss
3123
3106
  - app/pb_kits/playbook/tokens/exports/_opacity.module.scss
3124
3107
  - app/pb_kits/playbook/tokens/exports/_positioning.module.scss
@@ -3136,7 +3119,6 @@ files:
3136
3119
  - app/pb_kits/playbook/utilities/_display.scss
3137
3120
  - app/pb_kits/playbook/utilities/_flexbox.scss
3138
3121
  - app/pb_kits/playbook/utilities/_focus.scss
3139
- - app/pb_kits/playbook/utilities/_height.scss
3140
3122
  - app/pb_kits/playbook/utilities/_hover.scss
3141
3123
  - app/pb_kits/playbook/utilities/_line_height.scss
3142
3124
  - app/pb_kits/playbook/utilities/_max_width.scss
@@ -3150,7 +3132,6 @@ files:
3150
3132
  - app/pb_kits/playbook/utilities/_text_align.scss
3151
3133
  - app/pb_kits/playbook/utilities/_truncate.scss
3152
3134
  - app/pb_kits/playbook/utilities/_vertical_align.scss
3153
- - app/pb_kits/playbook/utilities/_width.scss
3154
3135
  - app/pb_kits/playbook/utilities/flexbox_global_props/_align_content.scss
3155
3136
  - app/pb_kits/playbook/utilities/flexbox_global_props/_align_items.scss
3156
3137
  - app/pb_kits/playbook/utilities/flexbox_global_props/_align_self.scss
@@ -3189,11 +3170,11 @@ files:
3189
3170
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3190
3171
  - app/pb_kits/playbook/utilities/text.ts
3191
3172
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3192
- - dist/chunks/_typeahead-B8fkIeXA.js
3193
- - dist/chunks/_weekday_stacked-DjRTXEi-.js
3173
+ - dist/chunks/_typeahead-D0PihN_3.js
3174
+ - dist/chunks/_weekday_stacked-uMIX8f-A.js
3194
3175
  - dist/chunks/lazysizes-B7xYodB-.js
3195
- - dist/chunks/lib-SyD3buPZ.js
3196
- - dist/chunks/pb_form_validation-Dt8UJgrJ.js
3176
+ - dist/chunks/lib-BC6ESsxG.js
3177
+ - dist/chunks/pb_form_validation-B_Z9rEbg.js
3197
3178
  - dist/chunks/vendor.js
3198
3179
  - dist/menu.yml
3199
3180
  - dist/playbook-doc.js
@@ -3230,7 +3211,6 @@ files:
3230
3211
  - lib/playbook/forms/builder/select_field.rb
3231
3212
  - lib/playbook/forms/builder/star_rating_field.rb
3232
3213
  - lib/playbook/forms/builder/typeahead_field.rb
3233
- - lib/playbook/height.rb
3234
3214
  - lib/playbook/hover.rb
3235
3215
  - lib/playbook/justify_content.rb
3236
3216
  - lib/playbook/justify_self.rb
@@ -3238,8 +3218,6 @@ files:
3238
3218
  - lib/playbook/kit_resolver.rb
3239
3219
  - lib/playbook/left.rb
3240
3220
  - lib/playbook/line_height.rb
3241
- - lib/playbook/max_height.rb
3242
- - lib/playbook/min_height.rb
3243
3221
  - lib/playbook/number_spacing.rb
3244
3222
  - lib/playbook/order.rb
3245
3223
  - lib/playbook/overflow.rb
@@ -1,53 +0,0 @@
1
- <%
2
- column_definitions = [
3
- {
4
- accessor: "year",
5
- label: "Year",
6
- cellAccessors: ["quarter", "month", "day"],
7
- custom_renderer: ->(row, value) {
8
- capture do
9
- pb_rails("flex") do
10
- pb_rails("title", props: { text: value, size: 4 }) +
11
- pb_rails("badge", props: { dark: true, margin_left: "xxs", text: row[:newEnrollments].to_i > 20 ? "High" : "Low", variant: "neutral" })
12
- end
13
- end
14
- }
15
- },
16
- {
17
- accessor: "newEnrollments",
18
- label: "New Enrollments",
19
- custom_renderer: ->(row, value) { pb_rails("pill", props: { text: value, variant: "success" }) }
20
- },
21
- {
22
- accessor: "scheduledMeetings",
23
- label: "Scheduled Meetings",
24
- custom_renderer: ->(row, value) { content_tag(:a, value, href: "#") }
25
- },
26
- {
27
- accessor: "attendanceRate",
28
- label: "Attendance Rate",
29
- custom_renderer: ->(row, value) {
30
- capture do
31
- pb_rails("flex", props: { align_items: "end", orientation: "column" }) do
32
- pb_rails("detail", props: { bold: true, color: "default", text: value }) +
33
- pb_rails("caption", props: { size: "xs", text: row[:graduatedStudents] })
34
- end
35
- end
36
- }
37
- },
38
- {
39
- accessor: "completedClasses",
40
- label: "Completed Classes",
41
- },
42
- {
43
- accessor: "classCompletionRate",
44
- label: "Class Completion Rate",
45
- },
46
- {
47
- accessor: "graduatedStudents",
48
- label: "Graduated Students",
49
- }
50
- ]
51
- %>
52
-
53
- <%= pb_rails("advanced_table", props: { id: "custom_cell", table_data: @table_data, column_definitions: column_definitions }) %>
@@ -1,5 +0,0 @@
1
- The Advanced Table also allows for rendering custom components within individual Cells. To achieve this, you can make use of the optional `custom_renderer` item within each column_definitions. This function gives you access to the current Cell's value if you just want to use that with a custom Kit, but it also gives you access to the entire `row` object. The row object provides all data for the current row.
2
-
3
- See [here](https://playbook.powerapp.cloud/kits/advanced_table/rails#column_definitions) for more indepth information on column_definitions are how to use them.
4
-
5
- See [here](https://github.com/powerhome/playbook/tree/master/playbook/app/pb_kits/playbook/pb_advanced_table#readme) for the structure of the table_data used.
@@ -1,50 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable } from "playbook-ui"
3
- import PAGINATION_MOCK_DATA from "./advanced_table_pagination_mock_data.json"
4
-
5
- const AdvancedTablePagination = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- },
12
- {
13
- accessor: "newEnrollments",
14
- label: "New Enrollments",
15
- },
16
- {
17
- accessor: "scheduledMeetings",
18
- label: "Scheduled Meetings",
19
- },
20
- {
21
- accessor: "attendanceRate",
22
- label: "Attendance Rate",
23
- },
24
- {
25
- accessor: "completedClasses",
26
- label: "Completed Classes",
27
- },
28
- {
29
- accessor: "classCompletionRate",
30
- label: "Class Completion Rate",
31
- },
32
- {
33
- accessor: "graduatedStudents",
34
- label: "Graduated Students",
35
- },
36
- ]
37
-
38
- return (
39
- <>
40
- <AdvancedTable
41
- columnDefinitions={columnDefinitions}
42
- pagination
43
- tableData={PAGINATION_MOCK_DATA}
44
- {...props}
45
- />
46
- </>
47
- )
48
- }
49
-
50
- export default AdvancedTablePagination
@@ -1 +0,0 @@
1
- `pagination` is an optional prop that can be used to add pagination to the AdvancedTable. If present, it will add pagination with default values for pageSize, etc. To customize pagination, you can also use `paginationProps` shown in the next example.
@@ -1,57 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable } from "playbook-ui"
3
- import PAGINATION_MOCK_DATA from "./advanced_table_pagination_mock_data.json"
4
-
5
- const AdvancedTablePaginationWithProps = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- },
12
- {
13
- accessor: "newEnrollments",
14
- label: "New Enrollments",
15
- },
16
- {
17
- accessor: "scheduledMeetings",
18
- label: "Scheduled Meetings",
19
- },
20
- {
21
- accessor: "attendanceRate",
22
- label: "Attendance Rate",
23
- },
24
- {
25
- accessor: "completedClasses",
26
- label: "Completed Classes",
27
- },
28
- {
29
- accessor: "classCompletionRate",
30
- label: "Class Completion Rate",
31
- },
32
- {
33
- accessor: "graduatedStudents",
34
- label: "Graduated Students",
35
- },
36
- ]
37
-
38
- const paginationProps = {
39
- pageIndex: 1,
40
- pageSize: 10,
41
- range: 2
42
- }
43
-
44
- return (
45
- <>
46
- <AdvancedTable
47
- columnDefinitions={columnDefinitions}
48
- pagination
49
- paginationProps={paginationProps}
50
- tableData={PAGINATION_MOCK_DATA}
51
- {...props}
52
- />
53
- </>
54
- )
55
- }
56
-
57
- export default AdvancedTablePaginationWithProps
@@ -1,5 +0,0 @@
1
- `paginationProps` is an optional prop that can be used to further customize pagination for the AdvancedTable. This prop is an object with 2 optional items:
2
-
3
- - `pageIndex`: An optional prop to set which page is set to open on initial load. Default is '0'
4
- - `pageSize`: An optional prop to set total number of rows for each page before the Table paginates. Default is '20'
5
- - `range`: The range prop determines how many pages to display in the Pagination component. Regardless of this value, the first two and last two pages are always visible to facilitate navigation to the beginning and end of the pagination. If these always-visible pages fall within the specified range, they are included in the display. If they fall outside the range, the pagination will show additional pages up to the number defined by the range prop. See [here for more details](https://playbook.powerapp.cloud/kits/pagination/react#default). Default is set to '5'