playbook_ui 14.6.0.pre.alpha.dropdownclassfix4224 → 14.6.0.pre.alpha.play1586datearea4218
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/pb_card/_card.tsx +5 -1
- data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +5 -1
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +4 -4
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +3 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +2 -2
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +3 -1
- data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +8 -2
- data/app/pb_kits/playbook/pb_flex/flex_item.html.erb +3 -6
- data/app/pb_kits/playbook/pb_flex/flex_item.rb +7 -2
- data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -1
- data/app/pb_kits/playbook/pb_timeline/_item.tsx +59 -23
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +8 -0
- data/app/pb_kits/playbook/pb_timeline/date_area.html.erb +12 -0
- data/app/pb_kits/playbook/pb_timeline/date_area.rb +13 -0
- data/app/pb_kits/playbook/pb_timeline/detail_area.html.erb +3 -0
- data/app/pb_kits/playbook/pb_timeline/detail_area.rb +11 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +43 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +68 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md +4 -0
- data/app/pb_kits/playbook/pb_timeline/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_timeline/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_timeline/item.html.erb +17 -21
- data/app/pb_kits/playbook/pb_timeline/item.rb +4 -0
- data/app/pb_kits/playbook/pb_timeline/node_area.html.erb +14 -0
- data/app/pb_kits/playbook/pb_timeline/node_area.rb +16 -0
- data/app/pb_kits/playbook/pb_timeline/subcomponents/Detail.tsx +29 -0
- data/app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx +38 -0
- data/app/pb_kits/playbook/pb_timeline/subcomponents/Step.tsx +42 -0
- data/app/pb_kits/playbook/pb_timeline/subcomponents/index.tsx +3 -0
- data/app/pb_kits/playbook/pb_timeline/timeline.test.js +84 -0
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +3 -0
- data/app/pb_kits/playbook/utilities/globalProps.ts +39 -2
- data/dist/chunks/_typeahead-BhHnXJjy.js +22 -0
- data/dist/chunks/{_weekday_stacked-Dh3OU4s8.js → _weekday_stacked-C-VEa5Ar.js} +2 -2
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/kit_base.rb +21 -1
- data/lib/playbook/version.rb +1 -1
- metadata +17 -4
- data/dist/chunks/_typeahead-BV_n6U5W.js +0 -22
data/lib/playbook/kit_base.rb
CHANGED
@@ -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
|
data/lib/playbook/version.rb
CHANGED
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.alpha.
|
4
|
+
version: 14.6.0.pre.alpha.play1586datearea4218
|
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-
|
12
|
+
date: 2024-10-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -2718,11 +2718,18 @@ files:
|
|
2718
2718
|
- app/pb_kits/playbook/pb_timeline/_item.tsx
|
2719
2719
|
- app/pb_kits/playbook/pb_timeline/_timeline.scss
|
2720
2720
|
- app/pb_kits/playbook/pb_timeline/_timeline.tsx
|
2721
|
+
- app/pb_kits/playbook/pb_timeline/date_area.html.erb
|
2722
|
+
- app/pb_kits/playbook/pb_timeline/date_area.rb
|
2723
|
+
- app/pb_kits/playbook/pb_timeline/detail_area.html.erb
|
2724
|
+
- app/pb_kits/playbook/pb_timeline/detail_area.rb
|
2721
2725
|
- app/pb_kits/playbook/pb_timeline/docs/_description.md
|
2722
2726
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_default.html.erb
|
2723
2727
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_default.jsx
|
2724
2728
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_vertical.html.erb
|
2725
2729
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_vertical.jsx
|
2730
|
+
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb
|
2731
|
+
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx
|
2732
|
+
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md
|
2726
2733
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.html.erb
|
2727
2734
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.jsx
|
2728
2735
|
- app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.md
|
@@ -2730,6 +2737,12 @@ files:
|
|
2730
2737
|
- app/pb_kits/playbook/pb_timeline/docs/index.js
|
2731
2738
|
- app/pb_kits/playbook/pb_timeline/item.html.erb
|
2732
2739
|
- app/pb_kits/playbook/pb_timeline/item.rb
|
2740
|
+
- app/pb_kits/playbook/pb_timeline/node_area.html.erb
|
2741
|
+
- app/pb_kits/playbook/pb_timeline/node_area.rb
|
2742
|
+
- app/pb_kits/playbook/pb_timeline/subcomponents/Detail.tsx
|
2743
|
+
- app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx
|
2744
|
+
- app/pb_kits/playbook/pb_timeline/subcomponents/Step.tsx
|
2745
|
+
- app/pb_kits/playbook/pb_timeline/subcomponents/index.tsx
|
2733
2746
|
- app/pb_kits/playbook/pb_timeline/timeline.html.erb
|
2734
2747
|
- app/pb_kits/playbook/pb_timeline/timeline.rb
|
2735
2748
|
- app/pb_kits/playbook/pb_timeline/timeline.test.js
|
@@ -3099,8 +3112,8 @@ files:
|
|
3099
3112
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3100
3113
|
- app/pb_kits/playbook/utilities/text.ts
|
3101
3114
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3102
|
-
- dist/chunks/_typeahead-
|
3103
|
-
- dist/chunks/_weekday_stacked-
|
3115
|
+
- dist/chunks/_typeahead-BhHnXJjy.js
|
3116
|
+
- dist/chunks/_weekday_stacked-C-VEa5Ar.js
|
3104
3117
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3105
3118
|
- dist/chunks/lib-D-mTv-kp.js
|
3106
3119
|
- dist/chunks/pb_form_validation-BkWGwJsl.js
|