playbook_ui 13.4.0.pre.alpha.play961turnoffdeprecationwarnings1171 → 13.5.0.pre.alpha.PLAY823globalpropoverflow1188

Sign up to get free protection for your applications and to get access to all the features.
@@ -35,6 +35,7 @@ module Playbook
35
35
  hover_props,
36
36
  border_radius_props,
37
37
  text_align_props,
38
+ overflow_props,
38
39
  ].compact.join(" ")
39
40
  end
40
41
 
@@ -23,6 +23,7 @@ require "playbook/position"
23
23
  require "playbook/hover"
24
24
  require "playbook/border_radius"
25
25
  require "playbook/text_align"
26
+ require "playbook/overflow"
26
27
 
27
28
  module Playbook
28
29
  class KitBase < ViewComponent::Base
@@ -51,6 +52,7 @@ module Playbook
51
52
  include Playbook::Hover
52
53
  include Playbook::BorderRadius
53
54
  include Playbook::TextAlign
55
+ include Playbook::Overflow
54
56
 
55
57
  prop :id
56
58
  prop :data, type: Playbook::Props::Hash, default: {}
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Playbook
4
+ module Overflow
5
+ def self.included(base)
6
+ base.prop :overflow
7
+ base.prop :overflow_x
8
+ base.prop :overflow_y
9
+ end
10
+
11
+ def overflow_values
12
+ %w[visible hidden scroll auto]
13
+ end
14
+
15
+ def overflow_options
16
+ {
17
+ overflow: "overflow",
18
+ overflow_x: "overflow_x",
19
+ overflow_y: "overflow_y",
20
+ }
21
+ end
22
+
23
+ def overflow_props
24
+ selected_props = overflow_options.keys.select { |sk| try(sk) }
25
+ return nil unless selected_props.present?
26
+
27
+ selected_props.map do |k|
28
+ overflow_value = send(k)
29
+ "#{overflow_options[k]}_#{overflow_value}" if overflow_values.include? overflow_value
30
+ end.compact.join(" ")
31
+ end
32
+ end
33
+ end
@@ -20,7 +20,7 @@ module Playbook
20
20
  end
21
21
 
22
22
  def validate!(input_value)
23
- # warn("#{kit} Kit: The prop '#{name}' is deprecated and will be removed in a future release!") if deprecated && input_value # TODO: add some color for pop
23
+ warn("#{kit} Kit: The prop '#{name}' is deprecated and will be removed in a future release!") if deprecated && input_value # TODO: add some color for pop
24
24
 
25
25
  raise(Playbook::Props::Error, "#{kit} prop '#{name}' of type #{inspect.class} is required and needs a value") if required && input_value.nil?
26
26
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "13.4.0"
5
- VERSION = "13.4.0.pre.alpha.play961turnoffdeprecationwarnings1171"
4
+ PREVIOUS_VERSION = "13.5.0"
5
+ VERSION = "13.5.0.pre.alpha.PLAY823globalpropoverflow1188"
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: 13.4.0.pre.alpha.play961turnoffdeprecationwarnings1171
4
+ version: 13.5.0.pre.alpha.PLAY823globalpropoverflow1188
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: 2023-09-13 00:00:00.000000000 Z
12
+ date: 2023-09-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -2496,6 +2496,7 @@ files:
2496
2496
  - app/pb_kits/playbook/tokens/_display.scss
2497
2497
  - app/pb_kits/playbook/tokens/_line_height.scss
2498
2498
  - app/pb_kits/playbook/tokens/_opacity.scss
2499
+ - app/pb_kits/playbook/tokens/_overflow.scss
2499
2500
  - app/pb_kits/playbook/tokens/_positioning.scss
2500
2501
  - app/pb_kits/playbook/tokens/_scale.scss
2501
2502
  - app/pb_kits/playbook/tokens/_screen_sizes.scss
@@ -2528,6 +2529,7 @@ files:
2528
2529
  - app/pb_kits/playbook/utilities/_max_width.scss
2529
2530
  - app/pb_kits/playbook/utilities/_mixins.scss
2530
2531
  - app/pb_kits/playbook/utilities/_number_spacing.scss
2532
+ - app/pb_kits/playbook/utilities/_overflow.scss
2531
2533
  - app/pb_kits/playbook/utilities/_positioning.scss
2532
2534
  - app/pb_kits/playbook/utilities/_shadow.scss
2533
2535
  - app/pb_kits/playbook/utilities/_spacing.scss
@@ -2596,6 +2598,7 @@ files:
2596
2598
  - lib/playbook/line_height.rb
2597
2599
  - lib/playbook/number_spacing.rb
2598
2600
  - lib/playbook/order.rb
2601
+ - lib/playbook/overflow.rb
2599
2602
  - lib/playbook/pagination_renderer.rb
2600
2603
  - lib/playbook/pb_doc_helper.rb
2601
2604
  - lib/playbook/pb_forms_helper.rb