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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +1 -0
- data/app/pb_kits/playbook/pb_background/_background.tsx +1 -1
- data/app/pb_kits/playbook/pb_background/background.rb +1 -1
- data/app/pb_kits/playbook/pb_body/_body.tsx +1 -1
- data/app/pb_kits/playbook/pb_caption/_caption.tsx +1 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +1 -1
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +1 -1
- data/app/pb_kits/playbook/pb_flex/_flex_item.scss +0 -8
- data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +2 -4
- data/app/pb_kits/playbook/pb_flex/flex_item.rb +1 -9
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +38 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +112 -47
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +1 -1
- data/app/pb_kits/playbook/pb_title/_title.tsx +1 -1
- data/app/pb_kits/playbook/tokens/_overflow.scss +10 -0
- data/app/pb_kits/playbook/utilities/_overflow.scss +22 -0
- data/app/pb_kits/playbook/utilities/globalProps.ts +23 -8
- data/dist/playbook-rails.js +5 -5
- data/lib/playbook/classnames.rb +1 -0
- data/lib/playbook/kit_base.rb +2 -0
- data/lib/playbook/overflow.rb +33 -0
- data/lib/playbook/props/base.rb +1 -1
- data/lib/playbook/version.rb +2 -2
- metadata +5 -2
data/lib/playbook/classnames.rb
CHANGED
data/lib/playbook/kit_base.rb
CHANGED
@@ -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
|
data/lib/playbook/props/base.rb
CHANGED
@@ -20,7 +20,7 @@ module Playbook
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def validate!(input_value)
|
23
|
-
|
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
|
|
data/lib/playbook/version.rb
CHANGED
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
|
+
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-
|
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
|