playbook_ui 14.6.0.pre.rc.21 → 14.6.0.pre.rc.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_card/_card.tsx +5 -1
  3. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +5 -1
  4. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +84 -3
  5. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +8 -1
  6. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb +9 -0
  7. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx +33 -0
  8. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.html.erb +10 -0
  9. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.jsx +34 -0
  10. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +1 -0
  11. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +4 -0
  12. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -0
  13. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +10 -1
  14. data/app/pb_kits/playbook/pb_filter/Filter/FilterDouble.tsx +2 -0
  15. data/app/pb_kits/playbook/pb_filter/Filter/FilterSingle.tsx +2 -0
  16. data/app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.tsx +4 -1
  17. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.html.erb +41 -0
  18. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.jsx +71 -0
  19. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_rails.md +1 -0
  20. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_react.md +1 -0
  21. data/app/pb_kits/playbook/pb_filter/docs/example.yml +3 -0
  22. data/app/pb_kits/playbook/pb_filter/docs/index.js +1 -0
  23. data/app/pb_kits/playbook/pb_filter/filter.html.erb +2 -2
  24. data/app/pb_kits/playbook/pb_filter/filter.rb +2 -0
  25. data/app/pb_kits/playbook/pb_flex/_flex.tsx +3 -1
  26. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +8 -2
  27. data/app/pb_kits/playbook/pb_flex/flex_item.html.erb +3 -6
  28. data/app/pb_kits/playbook/pb_flex/flex_item.rb +7 -2
  29. data/app/pb_kits/playbook/pb_popover/_popover.tsx +6 -2
  30. data/app/pb_kits/playbook/pb_popover/docs/_popover_default.html.erb +1 -1
  31. data/app/pb_kits/playbook/pb_popover/popover.rb +3 -1
  32. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +3 -0
  33. data/app/pb_kits/playbook/utilities/globalProps.ts +39 -2
  34. data/dist/chunks/_typeahead-BhLGfuVc.js +22 -0
  35. data/dist/chunks/_weekday_stacked-Cu6ay-kh.js +45 -0
  36. data/dist/chunks/vendor.js +1 -1
  37. data/dist/playbook-doc.js +1 -1
  38. data/dist/playbook-rails-react-bindings.js +1 -1
  39. data/dist/playbook-rails.js +1 -1
  40. data/dist/playbook.css +1 -1
  41. data/lib/playbook/kit_base.rb +21 -1
  42. data/lib/playbook/version.rb +1 -1
  43. metadata +13 -4
  44. data/dist/chunks/_typeahead-CcgTar9x.js +0 -22
  45. data/dist/chunks/_weekday_stacked-X5cprPLr.js +0 -45
@@ -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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.5.0"
5
- VERSION = "14.6.0.pre.rc.21"
5
+ VERSION = "14.6.0.pre.rc.23"
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.6.0.pre.rc.21
4
+ version: 14.6.0.pre.rc.23
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-10-21 00:00:00.000000000 Z
12
+ date: 2024-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -1137,10 +1137,15 @@ files:
1137
1137
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.jsx
1138
1138
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb
1139
1139
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx
1140
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb
1141
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx
1140
1142
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
1141
1143
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md
1142
1144
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.html.erb
1143
1145
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.md
1146
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.html.erb
1147
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.jsx
1148
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md
1144
1149
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx
1145
1150
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.md
1146
1151
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx
@@ -1237,6 +1242,10 @@ files:
1237
1242
  - app/pb_kits/playbook/pb_filter/docs/_filter_placement.html.erb
1238
1243
  - app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
1239
1244
  - app/pb_kits/playbook/pb_filter/docs/_filter_placement.md
1245
+ - app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.html.erb
1246
+ - app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.jsx
1247
+ - app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_rails.md
1248
+ - app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_react.md
1240
1249
  - app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb
1241
1250
  - app/pb_kits/playbook/pb_filter/docs/_filter_single.jsx
1242
1251
  - app/pb_kits/playbook/pb_filter/docs/_sort_only.html.erb
@@ -3090,8 +3099,8 @@ files:
3090
3099
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3091
3100
  - app/pb_kits/playbook/utilities/text.ts
3092
3101
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3093
- - dist/chunks/_typeahead-CcgTar9x.js
3094
- - dist/chunks/_weekday_stacked-X5cprPLr.js
3102
+ - dist/chunks/_typeahead-BhLGfuVc.js
3103
+ - dist/chunks/_weekday_stacked-Cu6ay-kh.js
3095
3104
  - dist/chunks/lazysizes-B7xYodB-.js
3096
3105
  - dist/chunks/lib-D-mTv-kp.js
3097
3106
  - dist/chunks/pb_form_validation-BkWGwJsl.js