playbook_ui 14.6.2.pre.alpha.PLAY15814348 → 14.6.2.pre.alpha.PLAY15814384

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_card/_card.tsx +2 -3
  3. data/app/pb_kits/playbook/pb_card/docs/_card_light.jsx +3 -17
  4. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +6 -2
  5. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +30 -26
  6. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +24 -1
  7. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +25 -2
  8. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_rails.md +3 -0
  9. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_react.md +1 -0
  10. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +46 -8
  11. data/app/pb_kits/playbook/pb_timeline/_item.tsx +59 -23
  12. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +8 -0
  13. data/app/pb_kits/playbook/pb_timeline/detail.html.erb +3 -0
  14. data/app/pb_kits/playbook/pb_timeline/detail.rb +11 -0
  15. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +43 -0
  16. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +68 -0
  17. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md +2 -0
  18. data/app/pb_kits/playbook/pb_timeline/docs/example.yml +2 -1
  19. data/app/pb_kits/playbook/pb_timeline/docs/index.js +1 -0
  20. data/app/pb_kits/playbook/pb_timeline/item.html.erb +17 -21
  21. data/app/pb_kits/playbook/pb_timeline/item.rb +4 -0
  22. data/app/pb_kits/playbook/pb_timeline/label.html.erb +12 -0
  23. data/app/pb_kits/playbook/pb_timeline/label.rb +13 -0
  24. data/app/pb_kits/playbook/pb_timeline/step.html.erb +14 -0
  25. data/app/pb_kits/playbook/pb_timeline/step.rb +16 -0
  26. data/app/pb_kits/playbook/pb_timeline/subcomponents/Detail.tsx +29 -0
  27. data/app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx +38 -0
  28. data/app/pb_kits/playbook/pb_timeline/subcomponents/Step.tsx +42 -0
  29. data/app/pb_kits/playbook/pb_timeline/subcomponents/index.tsx +3 -0
  30. data/app/pb_kits/playbook/pb_timeline/timeline.test.js +84 -0
  31. data/dist/chunks/_typeahead-C-6MLSyC.js +22 -0
  32. data/dist/chunks/{_weekday_stacked-D1RoR5CN.js → _weekday_stacked-CFhGhr9V.js} +2 -2
  33. data/dist/chunks/vendor.js +1 -1
  34. data/dist/playbook-doc.js +1 -1
  35. data/dist/playbook-rails-react-bindings.js +1 -1
  36. data/dist/playbook-rails.js +1 -1
  37. data/dist/playbook.css +1 -1
  38. data/lib/playbook/kit_base.rb +33 -15
  39. data/lib/playbook/version.rb +1 -1
  40. metadata +19 -5
  41. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md +0 -1
  42. data/dist/chunks/_typeahead-BtdghxJo.js +0 -22
@@ -82,18 +82,6 @@ module Playbook
82
82
  self
83
83
  end
84
84
 
85
- def combined_html_options
86
- default_html_options.merge(html_options.deep_merge(data_attributes))
87
- end
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
-
97
85
  # rubocop:disable Layout/CommentIndentation
98
86
  # pb_content_tag information (potentially to be abstracted into its own dev doc in the future)
99
87
  # The pb_content_tag generates HTML content tags for rails kits with flexible options.
@@ -122,6 +110,34 @@ module Playbook
122
110
  end
123
111
  # rubocop:enable Style/OptionalBooleanParameter
124
112
 
113
+ def combined_html_options
114
+ merged = default_html_options.dup
115
+
116
+ html_options.each do |key, value|
117
+ if key == :style && value.is_a?(Hash)
118
+ # Convert style hash to CSS string
119
+ merged[:style] = value.map { |k, v| "#{k.to_s.gsub('_', '-')}: #{v}" }.join("; ")
120
+ else
121
+ merged[key] = value
122
+ end
123
+ end
124
+
125
+ inline_styles = dynamic_inline_props
126
+ merged[:style] = if inline_styles.present?
127
+ merged[:style].present? ? "#{merged[:style]}; #{inline_styles}" : inline_styles
128
+ end
129
+
130
+ merged.deep_merge(data_attributes)
131
+ end
132
+
133
+ def global_inline_props
134
+ {
135
+ height: height,
136
+ min_height: min_height,
137
+ max_height: max_height,
138
+ }.compact
139
+ end
140
+
125
141
  private
126
142
 
127
143
  def default_options
@@ -131,8 +147,10 @@ module Playbook
131
147
  class: classname,
132
148
  aria: aria,
133
149
  }
150
+
134
151
  inline_styles = dynamic_inline_props
135
- options[:style] = inline_styles if inline_styles.present?
152
+ options[:style] = inline_styles if inline_styles.present? && !html_options.key?(:style)
153
+
136
154
  options
137
155
  end
138
156
 
@@ -148,8 +166,8 @@ module Playbook
148
166
  end
149
167
 
150
168
  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
169
+ styles = global_inline_props.map { |key, value| "#{key.to_s.gsub('_', '-')}: #{value}" if value.present? }.compact
170
+ styles.join("; ").presence
153
171
  end
154
172
  end
155
173
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.6.2"
5
- VERSION = "14.6.2.pre.alpha.PLAY15814348"
5
+ VERSION = "14.6.2.pre.alpha.PLAY15814384"
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.6.2.pre.alpha.PLAY15814348
4
+ version: 14.6.2.pre.alpha.PLAY15814384
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-11-04 00:00:00.000000000 Z
12
+ date: 2024-11-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -1385,7 +1385,8 @@ files:
1385
1385
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_tag.jsx
1386
1386
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb
1387
1387
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx
1388
- - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md
1388
+ - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_rails.md
1389
+ - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_react.md
1389
1390
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.html.erb
1390
1391
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.jsx
1391
1392
  - app/pb_kits/playbook/pb_form_pill/docs/example.yml
@@ -2738,11 +2739,16 @@ files:
2738
2739
  - app/pb_kits/playbook/pb_timeline/_item.tsx
2739
2740
  - app/pb_kits/playbook/pb_timeline/_timeline.scss
2740
2741
  - app/pb_kits/playbook/pb_timeline/_timeline.tsx
2742
+ - app/pb_kits/playbook/pb_timeline/detail.html.erb
2743
+ - app/pb_kits/playbook/pb_timeline/detail.rb
2741
2744
  - app/pb_kits/playbook/pb_timeline/docs/_description.md
2742
2745
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_default.html.erb
2743
2746
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_default.jsx
2744
2747
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_vertical.html.erb
2745
2748
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_vertical.jsx
2749
+ - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb
2750
+ - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx
2751
+ - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md
2746
2752
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.html.erb
2747
2753
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.jsx
2748
2754
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.md
@@ -2750,6 +2756,14 @@ files:
2750
2756
  - app/pb_kits/playbook/pb_timeline/docs/index.js
2751
2757
  - app/pb_kits/playbook/pb_timeline/item.html.erb
2752
2758
  - app/pb_kits/playbook/pb_timeline/item.rb
2759
+ - app/pb_kits/playbook/pb_timeline/label.html.erb
2760
+ - app/pb_kits/playbook/pb_timeline/label.rb
2761
+ - app/pb_kits/playbook/pb_timeline/step.html.erb
2762
+ - app/pb_kits/playbook/pb_timeline/step.rb
2763
+ - app/pb_kits/playbook/pb_timeline/subcomponents/Detail.tsx
2764
+ - app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx
2765
+ - app/pb_kits/playbook/pb_timeline/subcomponents/Step.tsx
2766
+ - app/pb_kits/playbook/pb_timeline/subcomponents/index.tsx
2753
2767
  - app/pb_kits/playbook/pb_timeline/timeline.html.erb
2754
2768
  - app/pb_kits/playbook/pb_timeline/timeline.rb
2755
2769
  - app/pb_kits/playbook/pb_timeline/timeline.test.js
@@ -3119,8 +3133,8 @@ files:
3119
3133
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3120
3134
  - app/pb_kits/playbook/utilities/text.ts
3121
3135
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3122
- - dist/chunks/_typeahead-BtdghxJo.js
3123
- - dist/chunks/_weekday_stacked-D1RoR5CN.js
3136
+ - dist/chunks/_typeahead-C-6MLSyC.js
3137
+ - dist/chunks/_weekday_stacked-CFhGhr9V.js
3124
3138
  - dist/chunks/lazysizes-B7xYodB-.js
3125
3139
  - dist/chunks/lib-D-mTv-kp.js
3126
3140
  - dist/chunks/pb_form_validation-BkWGwJsl.js
@@ -1 +0,0 @@
1
- For pills with longer text, the `truncate` global prop can be used to truncate the label within each Form Pill. See [here](https://playbook.powerapp.cloud/visual_guidelines/truncate) for more information on the truncate global prop.