playbook_ui 14.5.0.pre.alpha.PLAY1485selectablecardoverflowoutlinebug4097 → 14.5.0.pre.alpha.PLAY1485selectablecardoverflowoutlinebug4216

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +25 -7
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx +72 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.md +5 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -0
  7. data/app/pb_kits/playbook/pb_card/_card.tsx +5 -1
  8. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +5 -1
  9. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.html.erb +30 -7
  10. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.md +0 -2
  11. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +84 -3
  12. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +28 -5
  13. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx +45 -0
  14. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md +1 -0
  15. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb +9 -0
  16. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx +33 -0
  17. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.html.erb +10 -0
  18. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.jsx +34 -0
  19. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +1 -0
  20. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +5 -0
  21. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +3 -0
  22. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +10 -1
  23. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +1 -1
  24. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +2 -2
  25. data/app/pb_kits/playbook/pb_filter/Filter/FilterDouble.tsx +2 -0
  26. data/app/pb_kits/playbook/pb_filter/Filter/FilterSingle.tsx +2 -0
  27. data/app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.tsx +4 -1
  28. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.html.erb +41 -0
  29. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.jsx +71 -0
  30. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_rails.md +1 -0
  31. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_react.md +1 -0
  32. data/app/pb_kits/playbook/pb_filter/docs/example.yml +3 -0
  33. data/app/pb_kits/playbook/pb_filter/docs/index.js +1 -0
  34. data/app/pb_kits/playbook/pb_filter/filter.html.erb +2 -2
  35. data/app/pb_kits/playbook/pb_filter/filter.rb +2 -0
  36. data/app/pb_kits/playbook/pb_flex/_flex.tsx +3 -1
  37. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +8 -2
  38. data/app/pb_kits/playbook/pb_flex/flex_item.html.erb +3 -6
  39. data/app/pb_kits/playbook/pb_flex/flex_item.rb +7 -2
  40. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +39 -0
  41. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.md +1 -0
  42. data/app/pb_kits/playbook/pb_form/docs/example.yml +1 -0
  43. data/app/pb_kits/playbook/pb_form/form.rb +2 -0
  44. data/app/pb_kits/playbook/pb_form/formHelper.js +27 -0
  45. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +169 -65
  46. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.test.js +5 -5
  47. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +15 -9
  48. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.html.erb +336 -0
  49. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.jsx +97 -0
  50. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +2 -0
  51. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/index.js +1 -0
  52. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +28 -6
  53. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.rb +31 -1
  54. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +86 -18
  55. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +15 -6
  56. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.md +1 -1
  57. data/app/pb_kits/playbook/pb_phone_number_input/intlTelInput.scss +849 -931
  58. data/app/pb_kits/playbook/pb_phone_number_input/types.d.ts +4 -1
  59. data/app/pb_kits/playbook/pb_popover/_popover.tsx +6 -2
  60. data/app/pb_kits/playbook/pb_popover/docs/_popover_default.html.erb +1 -1
  61. data/app/pb_kits/playbook/pb_popover/popover.rb +3 -1
  62. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +66 -2
  63. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +1 -0
  64. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -1
  65. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.rb +5 -1
  66. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +3 -0
  67. data/app/pb_kits/playbook/utilities/globalProps.ts +39 -2
  68. data/dist/chunks/_typeahead-BhHnXJjy.js +22 -0
  69. data/dist/chunks/_weekday_stacked-B9Sy5PN8.js +45 -0
  70. data/dist/chunks/{lib-CEpcaI8y.js → lib-D-mTv-kp.js} +1 -1
  71. data/dist/chunks/{pb_form_validation-D9zkwt2b.js → pb_form_validation-BkWGwJsl.js} +1 -1
  72. data/dist/chunks/vendor.js +1 -1
  73. data/dist/playbook-doc.js +1 -1
  74. data/dist/playbook-rails-react-bindings.js +1 -1
  75. data/dist/playbook-rails.js +1 -1
  76. data/dist/playbook.css +1 -1
  77. data/lib/playbook/kit_base.rb +21 -1
  78. data/lib/playbook/pb_forms_helper.rb +3 -1
  79. data/lib/playbook/version.rb +1 -1
  80. metadata +24 -6
  81. data/dist/chunks/_typeahead-C9g4qCcE.js +0 -22
  82. data/dist/chunks/_weekday_stacked-B0Zid7Rv.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
@@ -22,9 +22,10 @@ module Playbook
22
22
  # @param data [Hash] hash of data attributes
23
23
  # @param validate [Boolean] whether validation should be triggered or not
24
24
  # @see [#form_with] for other options
25
- def pb_form_with(data: {}, validate: false, **kwargs, &block)
25
+ def pb_form_with(data: {}, validate: false, loading: false, **kwargs, &block)
26
26
  data = data.merge("pb-form-validation" => validate)
27
27
  classname = ["pb-form", kwargs[:class]].join(" ")
28
+ classname += " pb_form_loading" if loading
28
29
  options = kwargs.merge(
29
30
  class: classname,
30
31
  data: data,
@@ -33,6 +34,7 @@ module Playbook
33
34
 
34
35
  content_for(:pb_js, javascript_tag(<<~JS))
35
36
  window.addEventListener("DOMContentLoaded", function() { PbFormValidation.start() })
37
+ window.addEventListener("DOMContentLoaded", () => formHelper())
36
38
  JS
37
39
 
38
40
  form_with(**options, &block)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.5.0"
5
- VERSION = "14.5.0.pre.alpha.PLAY1485selectablecardoverflowoutlinebug4097"
5
+ VERSION = "14.5.0.pre.alpha.PLAY1485selectablecardoverflowoutlinebug4216"
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.5.0.pre.alpha.PLAY1485selectablecardoverflowoutlinebug4097
4
+ version: 14.5.0.pre.alpha.PLAY1485selectablecardoverflowoutlinebug4216
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-16 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
@@ -268,6 +268,8 @@ files:
268
268
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md
269
269
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx
270
270
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.md
271
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx
272
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.md
271
273
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx
272
274
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.md
273
275
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx
@@ -1126,6 +1128,8 @@ files:
1126
1128
  - app/pb_kits/playbook/pb_dropdown/context/index.tsx
1127
1129
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.html.erb
1128
1130
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.jsx
1131
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx
1132
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md
1129
1133
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb
1130
1134
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
1131
1135
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
@@ -1133,10 +1137,15 @@ files:
1133
1137
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.jsx
1134
1138
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb
1135
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
1136
1142
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
1137
1143
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md
1138
1144
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.html.erb
1139
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
1140
1149
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx
1141
1150
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.md
1142
1151
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx
@@ -1233,6 +1242,10 @@ files:
1233
1242
  - app/pb_kits/playbook/pb_filter/docs/_filter_placement.html.erb
1234
1243
  - app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
1235
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
1236
1249
  - app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb
1237
1250
  - app/pb_kits/playbook/pb_filter/docs/_filter_single.jsx
1238
1251
  - app/pb_kits/playbook/pb_filter/docs/_sort_only.html.erb
@@ -1320,10 +1333,13 @@ files:
1320
1333
  - app/pb_kits/playbook/pb_form/docs/_description.md
1321
1334
  - app/pb_kits/playbook/pb_form/docs/_footer.md
1322
1335
  - app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb
1336
+ - app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb
1337
+ - app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.md
1323
1338
  - app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb
1324
1339
  - app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.md
1325
1340
  - app/pb_kits/playbook/pb_form/docs/example.yml
1326
1341
  - app/pb_kits/playbook/pb_form/form.rb
1342
+ - app/pb_kits/playbook/pb_form/formHelper.js
1327
1343
  - app/pb_kits/playbook/pb_form/pb_form_validation.js
1328
1344
  - app/pb_kits/playbook/pb_form_group/_form_group.scss
1329
1345
  - app/pb_kits/playbook/pb_form_group/_form_group.tsx
@@ -1859,6 +1875,8 @@ files:
1859
1875
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default.jsx
1860
1876
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default_swift.md
1861
1877
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_props_swift.md
1878
+ - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.html.erb
1879
+ - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.jsx
1862
1880
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_small_swift.md
1863
1881
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_xsmall_swift.md
1864
1882
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml
@@ -3081,11 +3099,11 @@ files:
3081
3099
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3082
3100
  - app/pb_kits/playbook/utilities/text.ts
3083
3101
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3084
- - dist/chunks/_typeahead-C9g4qCcE.js
3085
- - dist/chunks/_weekday_stacked-B0Zid7Rv.js
3102
+ - dist/chunks/_typeahead-BhHnXJjy.js
3103
+ - dist/chunks/_weekday_stacked-B9Sy5PN8.js
3086
3104
  - dist/chunks/lazysizes-B7xYodB-.js
3087
- - dist/chunks/lib-CEpcaI8y.js
3088
- - dist/chunks/pb_form_validation-D9zkwt2b.js
3105
+ - dist/chunks/lib-D-mTv-kp.js
3106
+ - dist/chunks/pb_form_validation-BkWGwJsl.js
3089
3107
  - dist/chunks/vendor.js
3090
3108
  - dist/menu.yml
3091
3109
  - dist/playbook-doc.js