playbook_ui 14.8.0.pre.alpha.PLAY16254545 → 14.8.0.pre.alpha.play1648heightglobalprops4559
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_selectable_card/docs/_selectable_card_default.html.erb +2 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +0 -3
- data/app/pb_kits/playbook/tokens/_height.scss +19 -0
- data/app/pb_kits/playbook/tokens/exports/_height.module.scss +37 -0
- data/app/pb_kits/playbook/utilities/_height.scss +29 -0
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -1
- data/app/pb_kits/playbook/utilities/globalProps.ts +15 -0
- data/dist/chunks/{_typeahead-D0PihN_3.js → _typeahead-ZkBp8QRa.js} +1 -1
- data/dist/chunks/{_weekday_stacked-uMIX8f-A.js → _weekday_stacked-BmqMRu1B.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +321 -0
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/classnames.rb +3 -0
- data/lib/playbook/height.rb +29 -0
- data/lib/playbook/kit_base.rb +6 -0
- data/lib/playbook/max_height.rb +29 -0
- data/lib/playbook/min_height.rb +29 -0
- data/lib/playbook/version.rb +1 -1
- metadata +9 -3
data/lib/playbook/classnames.rb
CHANGED
@@ -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
|
data/lib/playbook/kit_base.rb
CHANGED
@@ -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
|
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: 14.8.0.pre.alpha.
|
4
|
+
version: 14.8.0.pre.alpha.play1648heightglobalprops4559
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -3087,6 +3087,7 @@ files:
|
|
3087
3087
|
- app/pb_kits/playbook/tokens/_colors.scss
|
3088
3088
|
- app/pb_kits/playbook/tokens/_container.scss
|
3089
3089
|
- app/pb_kits/playbook/tokens/_display.scss
|
3090
|
+
- app/pb_kits/playbook/tokens/_height.scss
|
3090
3091
|
- app/pb_kits/playbook/tokens/_line_height.scss
|
3091
3092
|
- app/pb_kits/playbook/tokens/_opacity.scss
|
3092
3093
|
- app/pb_kits/playbook/tokens/_overflow.scss
|
@@ -3102,6 +3103,7 @@ files:
|
|
3102
3103
|
- app/pb_kits/playbook/tokens/_vertical_align.scss
|
3103
3104
|
- app/pb_kits/playbook/tokens/exports/_border_radius.module.scss
|
3104
3105
|
- app/pb_kits/playbook/tokens/exports/_colors.module.scss
|
3106
|
+
- app/pb_kits/playbook/tokens/exports/_height.module.scss
|
3105
3107
|
- app/pb_kits/playbook/tokens/exports/_line_height.module.scss
|
3106
3108
|
- app/pb_kits/playbook/tokens/exports/_opacity.module.scss
|
3107
3109
|
- app/pb_kits/playbook/tokens/exports/_positioning.module.scss
|
@@ -3119,6 +3121,7 @@ files:
|
|
3119
3121
|
- app/pb_kits/playbook/utilities/_display.scss
|
3120
3122
|
- app/pb_kits/playbook/utilities/_flexbox.scss
|
3121
3123
|
- app/pb_kits/playbook/utilities/_focus.scss
|
3124
|
+
- app/pb_kits/playbook/utilities/_height.scss
|
3122
3125
|
- app/pb_kits/playbook/utilities/_hover.scss
|
3123
3126
|
- app/pb_kits/playbook/utilities/_line_height.scss
|
3124
3127
|
- app/pb_kits/playbook/utilities/_max_width.scss
|
@@ -3170,8 +3173,8 @@ files:
|
|
3170
3173
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3171
3174
|
- app/pb_kits/playbook/utilities/text.ts
|
3172
3175
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3173
|
-
- dist/chunks/_typeahead-
|
3174
|
-
- dist/chunks/_weekday_stacked-
|
3176
|
+
- dist/chunks/_typeahead-ZkBp8QRa.js
|
3177
|
+
- dist/chunks/_weekday_stacked-BmqMRu1B.js
|
3175
3178
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3176
3179
|
- dist/chunks/lib-BC6ESsxG.js
|
3177
3180
|
- dist/chunks/pb_form_validation-B_Z9rEbg.js
|
@@ -3211,6 +3214,7 @@ files:
|
|
3211
3214
|
- lib/playbook/forms/builder/select_field.rb
|
3212
3215
|
- lib/playbook/forms/builder/star_rating_field.rb
|
3213
3216
|
- lib/playbook/forms/builder/typeahead_field.rb
|
3217
|
+
- lib/playbook/height.rb
|
3214
3218
|
- lib/playbook/hover.rb
|
3215
3219
|
- lib/playbook/justify_content.rb
|
3216
3220
|
- lib/playbook/justify_self.rb
|
@@ -3218,6 +3222,8 @@ files:
|
|
3218
3222
|
- lib/playbook/kit_resolver.rb
|
3219
3223
|
- lib/playbook/left.rb
|
3220
3224
|
- lib/playbook/line_height.rb
|
3225
|
+
- lib/playbook/max_height.rb
|
3226
|
+
- lib/playbook/min_height.rb
|
3221
3227
|
- lib/playbook/number_spacing.rb
|
3222
3228
|
- lib/playbook/order.rb
|
3223
3229
|
- lib/playbook/overflow.rb
|