playbook_ui 14.8.0.pre.alpha.pbntr661createstickyleftprop4612 → 14.8.0.pre.alpha.play1648heightglobalprops4559

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +1 -0
  3. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +2 -2
  4. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +4 -0
  5. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +7 -84
  6. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -1
  7. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +1 -0
  8. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +4 -0
  9. data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.html.erb +2 -1
  10. data/app/pb_kits/playbook/pb_table/_table.tsx +24 -103
  11. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -1
  12. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
  13. data/app/pb_kits/playbook/pb_table/styles/_all.scss +0 -2
  14. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +0 -3
  15. data/app/pb_kits/playbook/tokens/_height.scss +19 -0
  16. data/app/pb_kits/playbook/tokens/exports/_height.module.scss +37 -0
  17. data/app/pb_kits/playbook/utilities/_height.scss +29 -0
  18. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -1
  19. data/app/pb_kits/playbook/utilities/globalProps.ts +15 -0
  20. data/dist/chunks/{_typeahead-D0PihN_3.js → _typeahead-ZkBp8QRa.js} +1 -1
  21. data/dist/chunks/_weekday_stacked-BmqMRu1B.js +45 -0
  22. data/dist/chunks/vendor.js +1 -1
  23. data/dist/playbook-doc.js +1 -1
  24. data/dist/playbook-rails-react-bindings.js +1 -1
  25. data/dist/playbook-rails.js +1 -1
  26. data/dist/playbook.css +1 -1
  27. data/lib/playbook/classnames.rb +3 -0
  28. data/lib/playbook/height.rb +29 -0
  29. data/lib/playbook/kit_base.rb +6 -0
  30. data/lib/playbook/max_height.rb +29 -0
  31. data/lib/playbook/min_height.rb +29 -0
  32. data/lib/playbook/version.rb +1 -1
  33. metadata +10 -8
  34. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +0 -87
  35. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +0 -2
  36. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +0 -4
  37. data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +0 -18
  38. data/dist/chunks/_weekday_stacked-CuBVpyZq.js +0 -45
@@ -43,6 +43,9 @@ module Playbook
43
43
  right_props,
44
44
  bottom_props,
45
45
  vertical_align_props,
46
+ height_props,
47
+ min_height_props,
48
+ max_height_props,
46
49
  ].compact.join(" ")
47
50
  end
48
51
 
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Playbook
4
+ module Height
5
+ def self.included(base)
6
+ base.prop :height
7
+ end
8
+
9
+ def height_props
10
+ selected_props = height_options.keys.select { |sk| try(sk) }
11
+ return nil unless selected_props.present?
12
+
13
+ selected_props.map do |k|
14
+ height_value = send(k)
15
+ "height_#{height_value}" if height_values.include? height_value.to_s
16
+ end.compact.join(" ")
17
+ end
18
+
19
+ def height_options
20
+ {
21
+ height: "height",
22
+ }
23
+ end
24
+
25
+ def height_values
26
+ %w[auto xs sm md lg xl xxl xxxl]
27
+ end
28
+ end
29
+ end
@@ -30,6 +30,9 @@ 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"
33
36
 
34
37
  module Playbook
35
38
  include ActionView::Helpers
@@ -67,6 +70,9 @@ module Playbook
67
70
  include Playbook::Right
68
71
  include Playbook::Bottom
69
72
  include Playbook::VerticalAlign
73
+ include Playbook::Height
74
+ include Playbook::MinHeight
75
+ include Playbook::MaxHeight
70
76
 
71
77
  prop :id
72
78
  prop :data, type: Playbook::Props::HashProp, default: {}
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Playbook
4
+ module MaxHeight
5
+ def self.included(base)
6
+ base.prop :max_height
7
+ end
8
+
9
+ def max_height_props
10
+ selected_props = max_height_options.keys.select { |sk| try(sk) }
11
+ return nil unless selected_props.present?
12
+
13
+ selected_props.map do |k|
14
+ max_height_value = send(k)
15
+ "max_height_#{max_height_value}" if max_height_values.include? max_height_value.to_s
16
+ end.compact.join(" ")
17
+ end
18
+
19
+ def max_height_options
20
+ {
21
+ max_height: "max_height",
22
+ }
23
+ end
24
+
25
+ def max_height_values
26
+ %w[auto xs sm md lg xl xxl xxxl]
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Playbook
4
+ module MinHeight
5
+ def self.included(base)
6
+ base.prop :min_height
7
+ end
8
+
9
+ def min_height_props
10
+ selected_props = min_height_options.keys.select { |sk| try(sk) }
11
+ return nil unless selected_props.present?
12
+
13
+ selected_props.map do |k|
14
+ min_height_value = send(k)
15
+ "min_height_#{min_height_value}" if min_height_values.include? min_height_value.to_s
16
+ end.compact.join(" ")
17
+ end
18
+
19
+ def min_height_options
20
+ {
21
+ min_height: "min_height",
22
+ }
23
+ end
24
+
25
+ def min_height_values
26
+ %w[auto xs sm md lg xl xxl xxxl]
27
+ end
28
+ end
29
+ end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.8.0"
5
- VERSION = "14.8.0.pre.alpha.pbntr661createstickyleftprop4612"
5
+ VERSION = "14.8.0.pre.alpha.play1648heightglobalprops4559"
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.8.0.pre.alpha.pbntr661createstickyleftprop4612
4
+ version: 14.8.0.pre.alpha.play1648heightglobalprops4559
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-11-21 00:00:00.000000000 Z
12
+ date: 2024-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -2606,8 +2606,6 @@ files:
2606
2606
  - app/pb_kits/playbook/pb_table/docs/_table_sticky.html.erb
2607
2607
  - app/pb_kits/playbook/pb_table/docs/_table_sticky.jsx
2608
2608
  - app/pb_kits/playbook/pb_table/docs/_table_sticky.md
2609
- - app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx
2610
- - app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md
2611
2609
  - app/pb_kits/playbook/pb_table/docs/_table_striped.html.erb
2612
2610
  - app/pb_kits/playbook/pb_table/docs/_table_striped.jsx
2613
2611
  - app/pb_kits/playbook/pb_table/docs/_table_striped.md
@@ -2641,10 +2639,8 @@ files:
2641
2639
  - app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss
2642
2640
  - app/pb_kits/playbook/pb_table/styles/_outer_padding.scss
2643
2641
  - app/pb_kits/playbook/pb_table/styles/_reset.scss
2644
- - app/pb_kits/playbook/pb_table/styles/_scroll.scss
2645
2642
  - app/pb_kits/playbook/pb_table/styles/_side_highlight.scss
2646
2643
  - app/pb_kits/playbook/pb_table/styles/_single-line.scss
2647
- - app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss
2648
2644
  - app/pb_kits/playbook/pb_table/styles/_sticky_header.scss
2649
2645
  - app/pb_kits/playbook/pb_table/styles/_striped.scss
2650
2646
  - app/pb_kits/playbook/pb_table/styles/_structure.scss
@@ -3091,6 +3087,7 @@ files:
3091
3087
  - app/pb_kits/playbook/tokens/_colors.scss
3092
3088
  - app/pb_kits/playbook/tokens/_container.scss
3093
3089
  - app/pb_kits/playbook/tokens/_display.scss
3090
+ - app/pb_kits/playbook/tokens/_height.scss
3094
3091
  - app/pb_kits/playbook/tokens/_line_height.scss
3095
3092
  - app/pb_kits/playbook/tokens/_opacity.scss
3096
3093
  - app/pb_kits/playbook/tokens/_overflow.scss
@@ -3106,6 +3103,7 @@ files:
3106
3103
  - app/pb_kits/playbook/tokens/_vertical_align.scss
3107
3104
  - app/pb_kits/playbook/tokens/exports/_border_radius.module.scss
3108
3105
  - app/pb_kits/playbook/tokens/exports/_colors.module.scss
3106
+ - app/pb_kits/playbook/tokens/exports/_height.module.scss
3109
3107
  - app/pb_kits/playbook/tokens/exports/_line_height.module.scss
3110
3108
  - app/pb_kits/playbook/tokens/exports/_opacity.module.scss
3111
3109
  - app/pb_kits/playbook/tokens/exports/_positioning.module.scss
@@ -3123,6 +3121,7 @@ files:
3123
3121
  - app/pb_kits/playbook/utilities/_display.scss
3124
3122
  - app/pb_kits/playbook/utilities/_flexbox.scss
3125
3123
  - app/pb_kits/playbook/utilities/_focus.scss
3124
+ - app/pb_kits/playbook/utilities/_height.scss
3126
3125
  - app/pb_kits/playbook/utilities/_hover.scss
3127
3126
  - app/pb_kits/playbook/utilities/_line_height.scss
3128
3127
  - app/pb_kits/playbook/utilities/_max_width.scss
@@ -3174,8 +3173,8 @@ files:
3174
3173
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3175
3174
  - app/pb_kits/playbook/utilities/text.ts
3176
3175
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3177
- - dist/chunks/_typeahead-D0PihN_3.js
3178
- - dist/chunks/_weekday_stacked-CuBVpyZq.js
3176
+ - dist/chunks/_typeahead-ZkBp8QRa.js
3177
+ - dist/chunks/_weekday_stacked-BmqMRu1B.js
3179
3178
  - dist/chunks/lazysizes-B7xYodB-.js
3180
3179
  - dist/chunks/lib-BC6ESsxG.js
3181
3180
  - dist/chunks/pb_form_validation-B_Z9rEbg.js
@@ -3215,6 +3214,7 @@ files:
3215
3214
  - lib/playbook/forms/builder/select_field.rb
3216
3215
  - lib/playbook/forms/builder/star_rating_field.rb
3217
3216
  - lib/playbook/forms/builder/typeahead_field.rb
3217
+ - lib/playbook/height.rb
3218
3218
  - lib/playbook/hover.rb
3219
3219
  - lib/playbook/justify_content.rb
3220
3220
  - lib/playbook/justify_self.rb
@@ -3222,6 +3222,8 @@ files:
3222
3222
  - lib/playbook/kit_resolver.rb
3223
3223
  - lib/playbook/left.rb
3224
3224
  - lib/playbook/line_height.rb
3225
+ - lib/playbook/max_height.rb
3226
+ - lib/playbook/min_height.rb
3225
3227
  - lib/playbook/number_spacing.rb
3226
3228
  - lib/playbook/order.rb
3227
3229
  - lib/playbook/overflow.rb
@@ -1,87 +0,0 @@
1
- import React from 'react'
2
- import Table from '../_table'
3
-
4
- const TableStickyLeftColumns = () => {
5
- return (
6
- <Table
7
- responsive="scroll"
8
- size="md"
9
- stickyLeftcolumn={["1", "2", "3"]}
10
- >
11
- <thead>
12
- <tr>
13
- <th id="1">{'Column 1'}</th>
14
- <th id="2">{'Column 2'}</th>
15
- <th id="3">{'Column 3'}</th>
16
- <th>{'Column 4'}</th>
17
- <th>{'Column 5'}</th>
18
- <th>{'Column 6'}</th>
19
- <th>{'Column 7'}</th>
20
- <th>{'Column 8'}</th>
21
- <th>{'Column 9'}</th>
22
- <th>{'Column 10'}</th>
23
- <th>{'Column 11'}</th>
24
- <th>{'Column 12'}</th>
25
- <th>{'Column 13'}</th>
26
- <th>{'Column 14'}</th>
27
- <th>{'Column 15'}</th>
28
- </tr>
29
- </thead>
30
- <tbody>
31
- <tr>
32
- <td id="1">{'Value 1'}</td>
33
- <td id="2">{'Value 2'}</td>
34
- <td id="3">{'Value 3'}</td>
35
- <td>{'Value 4'}</td>
36
- <td>{'Value 5'}</td>
37
- <td>{'Value 6'}</td>
38
- <td>{'Value 7'}</td>
39
- <td>{'Value 8'}</td>
40
- <td>{'Value 9'}</td>
41
- <td>{'Value 10'}</td>
42
- <td>{'Value 11'}</td>
43
- <td>{'Value 12'}</td>
44
- <td>{'Value 13'}</td>
45
- <td>{'Value 14'}</td>
46
- <td>{'Value 15'}</td>
47
- </tr>
48
- <tr>
49
- <td id="1">{'Value 1'}</td>
50
- <td id="2">{'Value 2'}</td>
51
- <td id="3">{'Value 3'}</td>
52
- <td>{'Value 4'}</td>
53
- <td>{'Value 5'}</td>
54
- <td>{'Value 6'}</td>
55
- <td>{'Value 7'}</td>
56
- <td>{'Value 8'}</td>
57
- <td>{'Value 9'}</td>
58
- <td>{'Value 10'}</td>
59
- <td>{'Value 11'}</td>
60
- <td>{'Value 12'}</td>
61
- <td>{'Value 13'}</td>
62
- <td>{'Value 14'}</td>
63
- <td>{'Value 15'}</td>
64
- </tr>
65
- <tr>
66
- <td id="1">{'Value 1'}</td>
67
- <td id="2">{'Value 2'}</td>
68
- <td id="3">{'Value 3'}</td>
69
- <td>{'Value 4'}</td>
70
- <td>{'Value 5'}</td>
71
- <td>{'Value 6'}</td>
72
- <td>{'Value 7'}</td>
73
- <td>{'Value 8'}</td>
74
- <td>{'Value 9'}</td>
75
- <td>{'Value 10'}</td>
76
- <td>{'Value 11'}</td>
77
- <td>{'Value 12'}</td>
78
- <td>{'Value 13'}</td>
79
- <td>{'Value 14'}</td>
80
- <td>{'Value 15'}</td>
81
- </tr>
82
- </tbody>
83
- </Table>
84
- )
85
- }
86
-
87
- export default TableStickyLeftColumns
@@ -1,2 +0,0 @@
1
- The `stickyLeftColumn` prop expects an array of the column ids you want to be sticky. Make sure to add the corresponding id to the `<th>` and `<td>`.
2
- If you are using the sub-component variant, then you will pass the id to `<Table.Header>` and `<Table.Cell>`
@@ -1,4 +0,0 @@
1
- .table-responsive-scroll {
2
- display: block;
3
- overflow-x: auto;
4
- }
@@ -1,18 +0,0 @@
1
- @import "../../tokens/colors";
2
-
3
- [class^="pb_table"] {
4
- .sticky {
5
- position: sticky !important;
6
- left: 0;
7
- z-index: 1;
8
- background-color: white;
9
- }
10
-
11
- .with-border {
12
- border-right: 1px solid $border_light !important;
13
- }
14
-
15
- .sticky-shadow {
16
- box-shadow: 4px 0 10px rgba(60, 106, 172, 0.16) !important;
17
- }
18
- }