playbook_ui 14.7.0 → 14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +1 -0
  3. data/app/pb_kits/playbook/pb_card/docs/_card_light.md +1 -1
  4. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +2 -2
  5. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +0 -4
  6. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +84 -7
  7. data/app/pb_kits/playbook/pb_date/_date.scss +3 -0
  8. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +1 -1
  9. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_default_date.html.erb +42 -0
  10. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_default_date.jsx +44 -0
  11. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_default_date.md +1 -0
  12. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -0
  13. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -0
  14. data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +17 -1
  15. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.html.erb +26 -0
  16. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.md +7 -0
  17. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb +38 -0
  18. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md +0 -0
  19. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb +19 -0
  20. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +6 -0
  21. data/app/pb_kits/playbook/pb_draggable/draggable.html.erb +3 -0
  22. data/app/pb_kits/playbook/pb_draggable/draggable.rb +18 -0
  23. data/app/pb_kits/playbook/pb_draggable/draggable_container.html.erb +3 -0
  24. data/app/pb_kits/playbook/pb_draggable/draggable_container.rb +15 -0
  25. data/app/pb_kits/playbook/pb_draggable/draggable_item.html.erb +7 -0
  26. data/app/pb_kits/playbook/pb_draggable/draggable_item.rb +18 -0
  27. data/app/pb_kits/playbook/pb_draggable/index.js +125 -0
  28. data/app/pb_kits/playbook/pb_drawer/_drawer.scss +88 -175
  29. data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +79 -47
  30. data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +20 -16
  31. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +1 -0
  32. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +0 -1
  33. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +0 -4
  34. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -2
  35. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
  36. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +63 -12
  37. data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.html.erb +2 -1
  38. data/app/pb_kits/playbook/pb_timeline/_timeline.scss +43 -1
  39. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +6 -2
  40. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +47 -0
  41. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +59 -0
  42. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.html.erb +94 -0
  43. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.jsx +180 -0
  44. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.md +1 -0
  45. data/app/pb_kits/playbook/pb_timeline/docs/example.yml +5 -3
  46. data/app/pb_kits/playbook/pb_timeline/docs/index.js +2 -0
  47. data/app/pb_kits/playbook/pb_timeline/timeline.rb +11 -1
  48. data/app/pb_kits/playbook/pb_timeline/timeline.test.js +4 -4
  49. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +3 -0
  50. data/app/pb_kits/playbook/pb_typeahead/index.ts +29 -3
  51. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +5 -2
  52. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +4 -0
  53. data/app/pb_kits/playbook/tokens/_height.scss +19 -0
  54. data/app/pb_kits/playbook/tokens/exports/_height.module.scss +37 -0
  55. data/app/pb_kits/playbook/utilities/_height.scss +33 -0
  56. data/app/pb_kits/playbook/utilities/_hover.scss +40 -27
  57. data/app/pb_kits/playbook/utilities/_max_width.scss +4 -0
  58. data/app/pb_kits/playbook/utilities/_min_width.scss +1 -1
  59. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -1
  60. data/app/pb_kits/playbook/utilities/globalProps.ts +29 -3
  61. data/app/pb_kits/playbook/utilities/test/globalProps/hover.test.js +79 -0
  62. data/dist/chunks/_typeahead-q6dSnFmE.js +22 -0
  63. data/dist/chunks/_weekday_stacked-BF7UZO3j.js +45 -0
  64. data/dist/chunks/lazysizes-B7xYodB-.js +1 -0
  65. data/dist/chunks/{lib-D-mTv-kp.js → lib-SyD3buPZ.js} +1 -1
  66. data/dist/chunks/{pb_form_validation-BkWGwJsl.js → pb_form_validation-Dt8UJgrJ.js} +1 -1
  67. data/dist/chunks/vendor.js +1 -1
  68. data/dist/menu.yml +322 -1
  69. data/dist/playbook-doc.js +1 -1
  70. data/dist/playbook-rails-react-bindings.js +1 -1
  71. data/dist/playbook-rails.js +1 -1
  72. data/dist/playbook.css +1 -1
  73. data/lib/playbook/classnames.rb +3 -0
  74. data/lib/playbook/forms/builder/typeahead_field.rb +13 -0
  75. data/lib/playbook/height.rb +29 -0
  76. data/lib/playbook/hover.rb +1 -1
  77. data/lib/playbook/kit_base.rb +16 -1
  78. data/lib/playbook/max_height.rb +29 -0
  79. data/lib/playbook/min_height.rb +29 -0
  80. data/lib/playbook/version.rb +2 -2
  81. metadata +35 -10
  82. data/dist/chunks/_typeahead-DhLic2Fe.js +0 -22
  83. data/dist/chunks/_weekday_stacked-CHPFjl8J.js +0 -45
  84. data/dist/chunks/lazysizes-DHz07jlL.js +0 -1
@@ -43,6 +43,9 @@ module Playbook
43
43
  right_props,
44
44
  bottom_props,
45
45
  vertical_align_props,
46
+ height_props,
47
+ min_height_props,
48
+ max_height_props,
46
49
  ].compact.join(" ")
47
50
  end
48
51
 
@@ -5,6 +5,19 @@ module Playbook
5
5
  class Builder
6
6
  def typeahead(name, _options = {}, _html_options = {}, props: {})
7
7
  props[:name] = name
8
+
9
+ input_id = "#{name}_input"
10
+ props[:input_options] ||= {}
11
+ props[:input_options][:id] ||= input_id
12
+
13
+ props[:label] = @template.label(@object_name, name, for: props[:input_options][:id]) if props[:label] == true
14
+
15
+ if props[:validation]
16
+ validation_message = props[:validation][:message]
17
+ props[:input_options][:data] ||= {}
18
+ props[:input_options][:data][:validation_message] = validation_message
19
+ end
20
+
8
21
  @template.pb_rails("typeahead", props: props)
9
22
  end
10
23
  end
@@ -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
@@ -50,7 +50,7 @@ module Playbook
50
50
  if responsive
51
51
  value.each do |key, val|
52
52
  if %i[background color].include?(key)
53
- css += "#{prefix}_#{key}_#{val} " if hover_attributes.include?(key.to_s)
53
+ css += "#{prefix}_#{key}-#{val} " if hover_attributes.include?(key.to_s)
54
54
  elsif hover_attributes.include?(key.to_s) && send("hover_#{key}_values").include?(val.to_s)
55
55
  css += "#{prefix}_#{key}_#{val} "
56
56
  end
@@ -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: {}
@@ -166,8 +172,17 @@ module Playbook
166
172
  end
167
173
 
168
174
  def dynamic_inline_props
169
- styles = global_inline_props.map { |key, value| "#{key.to_s.gsub('_', '-')}: #{value}" if value.present? }.compact
175
+ styles = global_inline_props.map { |key, value| "#{key.to_s.gsub('_', '-')}: #{value}" if inline_validator(key, value) }.compact
170
176
  styles.join("; ").presence
171
177
  end
178
+
179
+ def inline_validator(key, value)
180
+ return false if value.nil?
181
+ return false if height_values.include?(value) && key == :height
182
+ return false if min_height_values.include?(value) && key == :min_height
183
+ return false if max_height_values.include?(value) && key == :max_height
184
+
185
+ true
186
+ end
172
187
  end
173
188
  end
@@ -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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "14.6.2"
5
- VERSION = "14.7.0"
4
+ PREVIOUS_VERSION = "14.8.0"
5
+ VERSION = "14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617"
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.7.0
4
+ version: 14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617
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-11-08 00:00:00.000000000 Z
12
+ date: 2024-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -881,6 +881,9 @@ files:
881
881
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.html.erb
882
882
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.jsx
883
883
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.md
884
+ - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_default_date.html.erb
885
+ - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_default_date.jsx
886
+ - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_default_date.md
884
887
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_rails.html.erb
885
888
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_rails.md
886
889
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_range_limit.html.erb
@@ -1098,17 +1101,29 @@ files:
1098
1101
  - app/pb_kits/playbook/pb_draggable/context/types.ts
1099
1102
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx
1100
1103
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md
1104
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.html.erb
1105
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.md
1101
1106
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx
1102
1107
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.md
1103
1108
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx
1104
1109
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md
1110
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb
1111
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md
1105
1112
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx
1106
1113
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md
1114
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb
1107
1115
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx
1108
1116
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md
1109
1117
  - app/pb_kits/playbook/pb_draggable/docs/example.yml
1110
1118
  - app/pb_kits/playbook/pb_draggable/docs/index.js
1119
+ - app/pb_kits/playbook/pb_draggable/draggable.html.erb
1120
+ - app/pb_kits/playbook/pb_draggable/draggable.rb
1111
1121
  - app/pb_kits/playbook/pb_draggable/draggable.test.jsx
1122
+ - app/pb_kits/playbook/pb_draggable/draggable_container.html.erb
1123
+ - app/pb_kits/playbook/pb_draggable/draggable_container.rb
1124
+ - app/pb_kits/playbook/pb_draggable/draggable_item.html.erb
1125
+ - app/pb_kits/playbook/pb_draggable/draggable_item.rb
1126
+ - app/pb_kits/playbook/pb_draggable/index.js
1112
1127
  - app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx
1113
1128
  - app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx
1114
1129
  - app/pb_kits/playbook/pb_drawer/_close_icon.tsx
@@ -2770,6 +2785,9 @@ files:
2770
2785
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.html.erb
2771
2786
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.jsx
2772
2787
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.md
2788
+ - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.html.erb
2789
+ - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.jsx
2790
+ - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.md
2773
2791
  - app/pb_kits/playbook/pb_timeline/docs/example.yml
2774
2792
  - app/pb_kits/playbook/pb_timeline/docs/index.js
2775
2793
  - app/pb_kits/playbook/pb_timeline/item.html.erb
@@ -3069,6 +3087,7 @@ files:
3069
3087
  - app/pb_kits/playbook/tokens/_colors.scss
3070
3088
  - app/pb_kits/playbook/tokens/_container.scss
3071
3089
  - app/pb_kits/playbook/tokens/_display.scss
3090
+ - app/pb_kits/playbook/tokens/_height.scss
3072
3091
  - app/pb_kits/playbook/tokens/_line_height.scss
3073
3092
  - app/pb_kits/playbook/tokens/_opacity.scss
3074
3093
  - app/pb_kits/playbook/tokens/_overflow.scss
@@ -3084,6 +3103,7 @@ files:
3084
3103
  - app/pb_kits/playbook/tokens/_vertical_align.scss
3085
3104
  - app/pb_kits/playbook/tokens/exports/_border_radius.module.scss
3086
3105
  - app/pb_kits/playbook/tokens/exports/_colors.module.scss
3106
+ - app/pb_kits/playbook/tokens/exports/_height.module.scss
3087
3107
  - app/pb_kits/playbook/tokens/exports/_line_height.module.scss
3088
3108
  - app/pb_kits/playbook/tokens/exports/_opacity.module.scss
3089
3109
  - app/pb_kits/playbook/tokens/exports/_positioning.module.scss
@@ -3101,6 +3121,7 @@ files:
3101
3121
  - app/pb_kits/playbook/utilities/_display.scss
3102
3122
  - app/pb_kits/playbook/utilities/_flexbox.scss
3103
3123
  - app/pb_kits/playbook/utilities/_focus.scss
3124
+ - app/pb_kits/playbook/utilities/_height.scss
3104
3125
  - app/pb_kits/playbook/utilities/_hover.scss
3105
3126
  - app/pb_kits/playbook/utilities/_line_height.scss
3106
3127
  - app/pb_kits/playbook/utilities/_max_width.scss
@@ -3145,17 +3166,18 @@ files:
3145
3166
  - app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js
3146
3167
  - app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js
3147
3168
  - app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js
3169
+ - app/pb_kits/playbook/utilities/test/globalProps/hover.test.js
3148
3170
  - app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js
3149
3171
  - app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js
3150
3172
  - app/pb_kits/playbook/utilities/test/globalProps/order.test.js
3151
3173
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3152
3174
  - app/pb_kits/playbook/utilities/text.ts
3153
3175
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3154
- - dist/chunks/_typeahead-DhLic2Fe.js
3155
- - dist/chunks/_weekday_stacked-CHPFjl8J.js
3156
- - dist/chunks/lazysizes-DHz07jlL.js
3157
- - dist/chunks/lib-D-mTv-kp.js
3158
- - dist/chunks/pb_form_validation-BkWGwJsl.js
3176
+ - dist/chunks/_typeahead-q6dSnFmE.js
3177
+ - dist/chunks/_weekday_stacked-BF7UZO3j.js
3178
+ - dist/chunks/lazysizes-B7xYodB-.js
3179
+ - dist/chunks/lib-SyD3buPZ.js
3180
+ - dist/chunks/pb_form_validation-Dt8UJgrJ.js
3159
3181
  - dist/chunks/vendor.js
3160
3182
  - dist/menu.yml
3161
3183
  - dist/playbook-doc.js
@@ -3192,6 +3214,7 @@ files:
3192
3214
  - lib/playbook/forms/builder/select_field.rb
3193
3215
  - lib/playbook/forms/builder/star_rating_field.rb
3194
3216
  - lib/playbook/forms/builder/typeahead_field.rb
3217
+ - lib/playbook/height.rb
3195
3218
  - lib/playbook/hover.rb
3196
3219
  - lib/playbook/justify_content.rb
3197
3220
  - lib/playbook/justify_self.rb
@@ -3199,6 +3222,8 @@ files:
3199
3222
  - lib/playbook/kit_resolver.rb
3200
3223
  - lib/playbook/left.rb
3201
3224
  - lib/playbook/line_height.rb
3225
+ - lib/playbook/max_height.rb
3226
+ - lib/playbook/min_height.rb
3202
3227
  - lib/playbook/number_spacing.rb
3203
3228
  - lib/playbook/order.rb
3204
3229
  - lib/playbook/overflow.rb
@@ -3237,7 +3262,7 @@ homepage: https://playbook.powerapp.cloud/
3237
3262
  licenses:
3238
3263
  - ISC
3239
3264
  metadata: {}
3240
- post_install_message:
3265
+ post_install_message:
3241
3266
  rdoc_options: []
3242
3267
  require_paths:
3243
3268
  - lib
@@ -3253,7 +3278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
3253
3278
  version: '0'
3254
3279
  requirements: []
3255
3280
  rubygems_version: 3.5.3
3256
- signing_key:
3281
+ signing_key:
3257
3282
  specification_version: 4
3258
3283
  summary: Playbook Design System
3259
3284
  test_files: []