playbook_ui 13.23.0 → 13.24.0.pre.alpha.PBNTR261NewKitDropdown2681
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +2 -0
- data/app/pb_kits/playbook/index.js +1 -0
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +1 -6
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +41 -6
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +4 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb +23 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +35 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +26 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +36 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +3 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb +22 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +34 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +6 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +3 -0
- data/app/pb_kits/playbook/pb_body/_body.scss +3 -3
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +92 -0
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +152 -0
- data/app/pb_kits/playbook/pb_dropdown/context/index.tsx +5 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx +53 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +104 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx +69 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx +78 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +9 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +4 -0
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +17 -0
- data/app/pb_kits/playbook/pb_dropdown/hooks/useDropdown.tsx +17 -0
- data/app/pb_kits/playbook/pb_dropdown/hooks/useHandleOnKeydown.tsx +53 -0
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownContainer.tsx +95 -0
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +91 -0
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +118 -0
- data/app/pb_kits/playbook/pb_list/_list_item.tsx +2 -2
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +27 -19
- data/app/pb_kits/playbook/pb_typeahead/components/MenuList.tsx +4 -2
- data/app/pb_kits/playbook/pb_typeahead/components/index.tsx +19 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +51 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/app/pb_kits/playbook/playbook-doc.js +2 -0
- data/app/pb_kits/playbook/tokens/_colors.scss +1 -1
- data/dist/menu.yml +5 -1
- data/dist/playbook-rails.js +6 -6
- data/lib/playbook/kit_base.rb +21 -1
- data/lib/playbook/version.rb +2 -2
- metadata +30 -29
data/lib/playbook/kit_base.rb
CHANGED
@@ -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
|
data/lib/playbook/version.rb
CHANGED
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.
|
4
|
+
version: 13.24.0.pre.alpha.PBNTR261NewKitDropdown2681
|
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-
|
12
|
+
date: 2024-04-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -18,9 +18,6 @@ dependencies:
|
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 5.2.4.5
|
21
|
-
- - "<="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 7.0.8.1
|
24
21
|
type: :runtime
|
25
22
|
prerelease: false
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -28,9 +25,6 @@ dependencies:
|
|
28
25
|
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: 5.2.4.5
|
31
|
-
- - "<="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 7.0.8.1
|
34
28
|
- !ruby/object:Gem::Dependency
|
35
29
|
name: actionview
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,9 +32,6 @@ dependencies:
|
|
38
32
|
- - ">="
|
39
33
|
- !ruby/object:Gem::Version
|
40
34
|
version: 5.2.4.5
|
41
|
-
- - "<="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 7.0.8.1
|
44
35
|
type: :runtime
|
45
36
|
prerelease: false
|
46
37
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -48,9 +39,6 @@ dependencies:
|
|
48
39
|
- - ">="
|
49
40
|
- !ruby/object:Gem::Version
|
50
41
|
version: 5.2.4.5
|
51
|
-
- - "<="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 7.0.8.1
|
54
42
|
- !ruby/object:Gem::Dependency
|
55
43
|
name: activesupport
|
56
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,9 +46,6 @@ dependencies:
|
|
58
46
|
- - ">="
|
59
47
|
- !ruby/object:Gem::Version
|
60
48
|
version: 5.2.4.5
|
61
|
-
- - "<="
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: 7.0.8.1
|
64
49
|
type: :runtime
|
65
50
|
prerelease: false
|
66
51
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -68,9 +53,6 @@ dependencies:
|
|
68
53
|
- - ">="
|
69
54
|
- !ruby/object:Gem::Version
|
70
55
|
version: 5.2.4.5
|
71
|
-
- - "<="
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: 7.0.8.1
|
74
56
|
- !ruby/object:Gem::Dependency
|
75
57
|
name: react-rails
|
76
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,9 +130,6 @@ dependencies:
|
|
148
130
|
- - ">="
|
149
131
|
- !ruby/object:Gem::Version
|
150
132
|
version: 5.2.4.5
|
151
|
-
- - "<="
|
152
|
-
- !ruby/object:Gem::Version
|
153
|
-
version: 7.0.8.1
|
154
133
|
type: :development
|
155
134
|
prerelease: false
|
156
135
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -158,9 +137,6 @@ dependencies:
|
|
158
137
|
- - ">="
|
159
138
|
- !ruby/object:Gem::Version
|
160
139
|
version: 5.2.4.5
|
161
|
-
- - "<="
|
162
|
-
- !ruby/object:Gem::Version
|
163
|
-
version: 7.0.8.1
|
164
140
|
- !ruby/object:Gem::Dependency
|
165
141
|
name: rspec-html-matchers
|
166
142
|
requirement: !ruby/object:Gem::Requirement
|
@@ -430,9 +406,17 @@ files:
|
|
430
406
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb
|
431
407
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx
|
432
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
|
433
414
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.html.erb
|
434
415
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx
|
435
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
|
436
420
|
- app/pb_kits/playbook/pb_bar_graph/docs/_description.md
|
437
421
|
- app/pb_kits/playbook/pb_bar_graph/docs/example.yml
|
438
422
|
- app/pb_kits/playbook/pb_bar_graph/docs/index.js
|
@@ -1043,6 +1027,21 @@ files:
|
|
1043
1027
|
- app/pb_kits/playbook/pb_distribution_bar/docs/index.js
|
1044
1028
|
- app/pb_kits/playbook/pb_docs/kit_example.html.erb
|
1045
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
|
1046
1045
|
- app/pb_kits/playbook/pb_enhanced_element/element_observer.ts
|
1047
1046
|
- app/pb_kits/playbook/pb_enhanced_element/index.ts
|
1048
1047
|
- app/pb_kits/playbook/pb_file_upload/_file_upload.scss
|
@@ -2626,10 +2625,12 @@ files:
|
|
2626
2625
|
- app/pb_kits/playbook/pb_typeahead/components/Option.tsx
|
2627
2626
|
- app/pb_kits/playbook/pb_typeahead/components/Placeholder.tsx
|
2628
2627
|
- app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx
|
2628
|
+
- app/pb_kits/playbook/pb_typeahead/components/index.tsx
|
2629
2629
|
- app/pb_kits/playbook/pb_typeahead/docs/_description.md
|
2630
2630
|
- app/pb_kits/playbook/pb_typeahead/docs/_footer.md
|
2631
2631
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_async_createable.jsx
|
2632
2632
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.jsx
|
2633
|
+
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx
|
2633
2634
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb
|
2634
2635
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx
|
2635
2636
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.html.erb
|
@@ -2885,7 +2886,7 @@ homepage: https://playbook.powerapp.cloud/
|
|
2885
2886
|
licenses:
|
2886
2887
|
- ISC
|
2887
2888
|
metadata: {}
|
2888
|
-
post_install_message:
|
2889
|
+
post_install_message:
|
2889
2890
|
rdoc_options: []
|
2890
2891
|
require_paths:
|
2891
2892
|
- lib
|
@@ -2901,7 +2902,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2901
2902
|
version: '0'
|
2902
2903
|
requirements: []
|
2903
2904
|
rubygems_version: 3.5.3
|
2904
|
-
signing_key:
|
2905
|
+
signing_key:
|
2905
2906
|
specification_version: 4
|
2906
2907
|
summary: Playbook Design System
|
2907
2908
|
test_files: []
|