playbook_ui 14.6.2 → 14.7.0.pre.rc.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -73,6 +73,10 @@ module Playbook
73
73
  prop :aria, type: Playbook::Props::HashProp, default: {}
74
74
  prop :html_options, type: Playbook::Props::HashProp, default: {}
75
75
  prop :children, type: Playbook::Props::Proc
76
+ prop :style, type: Playbook::Props::HashProp, default: {}
77
+ prop :height
78
+ prop :min_height
79
+ prop :max_height
76
80
 
77
81
  def object
78
82
  self
@@ -82,6 +86,14 @@ module Playbook
82
86
  default_html_options.merge(html_options.deep_merge(data_attributes))
83
87
  end
84
88
 
89
+ def global_inline_props
90
+ {
91
+ height: height,
92
+ min_height: min_height,
93
+ max_height: max_height,
94
+ }.compact
95
+ end
96
+
85
97
  # rubocop:disable Layout/CommentIndentation
86
98
  # pb_content_tag information (potentially to be abstracted into its own dev doc in the future)
87
99
  # The pb_content_tag generates HTML content tags for rails kits with flexible options.
@@ -113,12 +125,15 @@ module Playbook
113
125
  private
114
126
 
115
127
  def default_options
116
- {
128
+ options = {
117
129
  id: id,
118
130
  data: data,
119
131
  class: classname,
120
132
  aria: aria,
121
133
  }
134
+ inline_styles = dynamic_inline_props
135
+ options[:style] = inline_styles if inline_styles.present?
136
+ options
122
137
  end
123
138
 
124
139
  def default_html_options
@@ -131,5 +146,10 @@ module Playbook
131
146
  aria: aria,
132
147
  }.transform_keys { |key| key.to_s.tr("_", "-").to_sym }
133
148
  end
149
+
150
+ def dynamic_inline_props
151
+ styles = global_inline_props.map { |key, value| "#{key.to_s.gsub('_', '-')}: #{value};" if value.present? }.compact
152
+ styles.join(" ").presence
153
+ end
134
154
  end
135
155
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "14.6.1"
5
- VERSION = "14.6.2"
4
+ PREVIOUS_VERSION = "14.6.0"
5
+ VERSION = "14.7.0.pre.rc.0"
6
6
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.6.2
4
+ version: 14.7.0.pre.rc.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
8
8
  - Power Devs
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-10-24 00:00:00.000000000 Z
12
+ date: 2024-10-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -3099,9 +3099,9 @@ files:
3099
3099
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3100
3100
  - app/pb_kits/playbook/utilities/text.ts
3101
3101
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3102
- - dist/chunks/_typeahead-BV_n6U5W.js
3103
- - dist/chunks/_weekday_stacked-Cy__g00H.js
3104
- - dist/chunks/lazysizes-DHz07jlL.js
3102
+ - dist/chunks/_typeahead-BhHnXJjy.js
3103
+ - dist/chunks/_weekday_stacked-C_QAqbqJ.js
3104
+ - dist/chunks/lazysizes-B7xYodB-.js
3105
3105
  - dist/chunks/lib-D-mTv-kp.js
3106
3106
  - dist/chunks/pb_form_validation-BkWGwJsl.js
3107
3107
  - dist/chunks/vendor.js
@@ -3185,7 +3185,7 @@ homepage: https://playbook.powerapp.cloud/
3185
3185
  licenses:
3186
3186
  - ISC
3187
3187
  metadata: {}
3188
- post_install_message:
3188
+ post_install_message:
3189
3189
  rdoc_options: []
3190
3190
  require_paths:
3191
3191
  - lib
@@ -3201,7 +3201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
3201
3201
  version: '0'
3202
3202
  requirements: []
3203
3203
  rubygems_version: 3.5.3
3204
- signing_key:
3204
+ signing_key:
3205
3205
  specification_version: 4
3206
3206
  summary: Playbook Design System
3207
3207
  test_files: []