playbook_ui 13.24.0 → 13.25.0.pre.alpha.PLAY761globalpaddingpropsbuttons2713

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +2 -0
  3. data/app/pb_kits/playbook/index.js +1 -0
  4. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +1 -6
  5. data/app/pb_kits/playbook/pb_background/_background.tsx +7 -5
  6. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +41 -6
  7. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +4 -0
  8. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb +23 -0
  9. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +35 -0
  10. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +26 -0
  11. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +36 -0
  12. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +3 -0
  13. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb +22 -0
  14. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +34 -0
  15. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md +1 -0
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +6 -0
  17. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +3 -0
  18. data/app/pb_kits/playbook/pb_body/_body.scss +3 -3
  19. data/app/pb_kits/playbook/pb_button/_button.scss +1 -1
  20. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +1 -1
  21. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +98 -0
  22. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +186 -0
  23. data/app/pb_kits/playbook/pb_dropdown/context/index.tsx +5 -0
  24. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx +50 -0
  25. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +102 -0
  26. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx +66 -0
  27. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx +77 -0
  28. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +9 -0
  29. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +4 -0
  30. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +17 -0
  31. data/app/pb_kits/playbook/pb_dropdown/hooks/useDropdown.tsx +17 -0
  32. data/app/pb_kits/playbook/pb_dropdown/hooks/useHandleOnKeydown.tsx +56 -0
  33. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownContainer.tsx +95 -0
  34. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +91 -0
  35. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +128 -0
  36. data/app/pb_kits/playbook/pb_dropdown/utilities/subComponentHelper.tsx +59 -0
  37. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +1 -1
  38. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +1 -1
  39. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.rb +1 -1
  40. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.test.js +3 -3
  41. data/app/pb_kits/playbook/pb_list/_list_item.tsx +2 -2
  42. data/app/pb_kits/playbook/pb_source/source.test.js +2 -2
  43. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +27 -19
  44. data/app/pb_kits/playbook/pb_typeahead/components/MenuList.tsx +4 -2
  45. data/app/pb_kits/playbook/pb_typeahead/components/index.tsx +19 -0
  46. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +51 -0
  47. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +1 -1
  48. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +1 -0
  49. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
  50. data/app/pb_kits/playbook/playbook-doc.js +2 -0
  51. data/app/pb_kits/playbook/tokens/_colors.scss +1 -1
  52. data/dist/menu.yml +5 -1
  53. data/dist/playbook-rails.js +6 -6
  54. data/lib/playbook/kit_base.rb +21 -1
  55. data/lib/playbook/version.rb +2 -2
  56. metadata +32 -6
  57. /data/app/pb_kits/playbook/pb_dialog/docs/{_dialog_props_table.md → _dialog_props_swift.md} +0 -0
@@ -31,6 +31,8 @@ require "playbook/right"
31
31
  require "playbook/bottom"
32
32
 
33
33
  module Playbook
34
+ include ActionView::Helpers
35
+
34
36
  class KitBase < ViewComponent::Base
35
37
  include Playbook::PbKitHelper
36
38
  include Playbook::Props
@@ -78,8 +80,26 @@ module Playbook
78
80
  default_html_options.merge(html_options.deep_merge(data_attributes))
79
81
  end
80
82
 
83
+ # rubocop:disable Style/OptionalBooleanParameter
84
+ def pb_content_tag(name, content_or_options_with_block = nil, options = {}, escape = true, &block)
85
+ combined_options = options
86
+ .merge(combined_html_options)
87
+ .merge(default_options.merge(content_or_options_with_block))
88
+ content_tag(name, combined_options, options, escape, &block)
89
+ end
90
+ # rubocop:enable Style/OptionalBooleanParameter
91
+
81
92
  private
82
93
 
94
+ def default_options
95
+ {
96
+ id: id,
97
+ data: data,
98
+ class: classname,
99
+ aria: aria,
100
+ }
101
+ end
102
+
83
103
  def default_html_options
84
104
  {}
85
105
  end
@@ -88,7 +108,7 @@ module Playbook
88
108
  {
89
109
  data: data,
90
110
  aria: aria,
91
- }.transform_keys { |key| key.to_s.tr("_", "-") }
111
+ }.transform_keys { |key| key.to_s.tr("_", "-").to_sym }
92
112
  end
93
113
  end
94
114
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "13.23.0"
5
- VERSION = "13.24.0"
4
+ PREVIOUS_VERSION = "13.25.0"
5
+ VERSION = "13.25.0.pre.alpha.PLAY761globalpaddingpropsbuttons2713"
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: 13.24.0
4
+ version: 13.25.0.pre.alpha.PLAY761globalpaddingpropsbuttons2713
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-04-05 00:00:00.000000000 Z
12
+ date: 2024-04-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -406,9 +406,17 @@ files:
406
406
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb
407
407
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx
408
408
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md
409
+ - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb
410
+ - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx
411
+ - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb
412
+ - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx
413
+ - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md
409
414
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.html.erb
410
415
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx
411
416
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.md
417
+ - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb
418
+ - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx
419
+ - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md
412
420
  - app/pb_kits/playbook/pb_bar_graph/docs/_description.md
413
421
  - app/pb_kits/playbook/pb_bar_graph/docs/example.yml
414
422
  - app/pb_kits/playbook/pb_bar_graph/docs/index.js
@@ -984,7 +992,7 @@ files:
984
992
  - app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.html.erb
985
993
  - app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.jsx
986
994
  - app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.md
987
- - app/pb_kits/playbook/pb_dialog/docs/_dialog_props_table.md
995
+ - app/pb_kits/playbook/pb_dialog/docs/_dialog_props_swift.md
988
996
  - app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.html.erb
989
997
  - app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx
990
998
  - app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.md
@@ -1019,6 +1027,22 @@ files:
1019
1027
  - app/pb_kits/playbook/pb_distribution_bar/docs/index.js
1020
1028
  - app/pb_kits/playbook/pb_docs/kit_example.html.erb
1021
1029
  - app/pb_kits/playbook/pb_docs/kit_example.rb
1030
+ - app/pb_kits/playbook/pb_dropdown/_dropdown.scss
1031
+ - app/pb_kits/playbook/pb_dropdown/_dropdown.tsx
1032
+ - app/pb_kits/playbook/pb_dropdown/context/index.tsx
1033
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
1034
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx
1035
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx
1036
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx
1037
+ - app/pb_kits/playbook/pb_dropdown/docs/example.yml
1038
+ - app/pb_kits/playbook/pb_dropdown/docs/index.js
1039
+ - app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx
1040
+ - app/pb_kits/playbook/pb_dropdown/hooks/useDropdown.tsx
1041
+ - app/pb_kits/playbook/pb_dropdown/hooks/useHandleOnKeydown.tsx
1042
+ - app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownContainer.tsx
1043
+ - app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx
1044
+ - app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx
1045
+ - app/pb_kits/playbook/pb_dropdown/utilities/subComponentHelper.tsx
1022
1046
  - app/pb_kits/playbook/pb_enhanced_element/element_observer.ts
1023
1047
  - app/pb_kits/playbook/pb_enhanced_element/index.ts
1024
1048
  - app/pb_kits/playbook/pb_file_upload/_file_upload.scss
@@ -2602,10 +2626,12 @@ files:
2602
2626
  - app/pb_kits/playbook/pb_typeahead/components/Option.tsx
2603
2627
  - app/pb_kits/playbook/pb_typeahead/components/Placeholder.tsx
2604
2628
  - app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx
2629
+ - app/pb_kits/playbook/pb_typeahead/components/index.tsx
2605
2630
  - app/pb_kits/playbook/pb_typeahead/docs/_description.md
2606
2631
  - app/pb_kits/playbook/pb_typeahead/docs/_footer.md
2607
2632
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_async_createable.jsx
2608
2633
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.jsx
2634
+ - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx
2609
2635
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb
2610
2636
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx
2611
2637
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.html.erb
@@ -2861,7 +2887,7 @@ homepage: https://playbook.powerapp.cloud/
2861
2887
  licenses:
2862
2888
  - ISC
2863
2889
  metadata: {}
2864
- post_install_message:
2890
+ post_install_message:
2865
2891
  rdoc_options: []
2866
2892
  require_paths:
2867
2893
  - lib
@@ -2877,7 +2903,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2877
2903
  version: '0'
2878
2904
  requirements: []
2879
2905
  rubygems_version: 3.5.3
2880
- signing_key:
2906
+ signing_key:
2881
2907
  specification_version: 4
2882
2908
  summary: Playbook Design System
2883
2909
  test_files: []