playbook_ui 14.6.2.pre.alpha.PLAY1607dependencydisplayymlupdate4271 → 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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +2 -1
  3. data/app/pb_kits/playbook/pb_card/_card.tsx +11 -4
  4. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +1 -2
  5. data/app/pb_kits/playbook/pb_currency/_currency.tsx +16 -6
  6. data/app/pb_kits/playbook/pb_currency/currency.rb +38 -11
  7. data/app/pb_kits/playbook/pb_currency/currency.test.js +35 -0
  8. data/app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.html.erb +7 -0
  9. data/app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.jsx +18 -0
  10. data/app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.md +3 -0
  11. data/app/pb_kits/playbook/pb_currency/docs/example.yml +3 -1
  12. data/app/pb_kits/playbook/pb_currency/docs/index.js +1 -0
  13. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +5 -1
  14. data/app/pb_kits/playbook/pb_flex/_flex.tsx +3 -1
  15. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +8 -2
  16. data/app/pb_kits/playbook/pb_flex/flex_item.html.erb +3 -6
  17. data/app/pb_kits/playbook/pb_flex/flex_item.rb +7 -2
  18. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +6 -2
  19. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +30 -26
  20. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +24 -1
  21. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +25 -2
  22. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_rails.md +3 -0
  23. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_react.md +1 -0
  24. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +46 -8
  25. data/app/pb_kits/playbook/pb_link/_link.scss +66 -0
  26. data/app/pb_kits/playbook/pb_link/_link.tsx +107 -0
  27. data/app/pb_kits/playbook/pb_link/docs/_link_color.html.erb +30 -0
  28. data/app/pb_kits/playbook/pb_link/docs/_link_color.jsx +40 -0
  29. data/app/pb_kits/playbook/pb_link/docs/_link_disabled.html.erb +5 -0
  30. data/app/pb_kits/playbook/pb_link/docs/_link_disabled.jsx +15 -0
  31. data/app/pb_kits/playbook/pb_link/docs/_link_icon.html.erb +15 -0
  32. data/app/pb_kits/playbook/pb_link/docs/_link_icon.jsx +25 -0
  33. data/app/pb_kits/playbook/pb_link/docs/_link_tag.html.erb +35 -0
  34. data/app/pb_kits/playbook/pb_link/docs/_link_tag.jsx +45 -0
  35. data/app/pb_kits/playbook/pb_link/docs/_link_underline.html.erb +5 -0
  36. data/app/pb_kits/playbook/pb_link/docs/_link_underline.jsx +15 -0
  37. data/app/pb_kits/playbook/pb_link/docs/example.yml +16 -0
  38. data/app/pb_kits/playbook/pb_link/docs/index.js +5 -0
  39. data/app/pb_kits/playbook/pb_link/link.html.erb +21 -0
  40. data/app/pb_kits/playbook/pb_link/link.rb +44 -0
  41. data/app/pb_kits/playbook/pb_link/link.test.jsx +92 -0
  42. data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -1
  43. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +67 -1
  44. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +1 -0
  45. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -1
  46. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.rb +5 -1
  47. data/app/pb_kits/playbook/pb_timeline/_item.tsx +59 -23
  48. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +8 -0
  49. data/app/pb_kits/playbook/pb_timeline/detail.html.erb +3 -0
  50. data/app/pb_kits/playbook/pb_timeline/detail.rb +11 -0
  51. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +43 -0
  52. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +68 -0
  53. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md +2 -0
  54. data/app/pb_kits/playbook/pb_timeline/docs/example.yml +2 -1
  55. data/app/pb_kits/playbook/pb_timeline/docs/index.js +1 -0
  56. data/app/pb_kits/playbook/pb_timeline/item.html.erb +17 -21
  57. data/app/pb_kits/playbook/pb_timeline/item.rb +4 -0
  58. data/app/pb_kits/playbook/pb_timeline/label.html.erb +12 -0
  59. data/app/pb_kits/playbook/pb_timeline/label.rb +13 -0
  60. data/app/pb_kits/playbook/pb_timeline/step.html.erb +14 -0
  61. data/app/pb_kits/playbook/pb_timeline/step.rb +16 -0
  62. data/app/pb_kits/playbook/pb_timeline/subcomponents/Detail.tsx +29 -0
  63. data/app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx +38 -0
  64. data/app/pb_kits/playbook/pb_timeline/subcomponents/Step.tsx +42 -0
  65. data/app/pb_kits/playbook/pb_timeline/subcomponents/index.tsx +3 -0
  66. data/app/pb_kits/playbook/pb_timeline/timeline.test.js +84 -0
  67. data/app/pb_kits/playbook/tokens/_typography.scss +35 -0
  68. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +3 -0
  69. data/app/pb_kits/playbook/utilities/globalProps.ts +39 -2
  70. data/dist/chunks/_typeahead-C-6MLSyC.js +22 -0
  71. data/dist/chunks/_weekday_stacked-CFhGhr9V.js +45 -0
  72. data/dist/chunks/vendor.js +1 -1
  73. data/dist/menu.yml +4 -316
  74. data/dist/playbook-doc.js +1 -1
  75. data/dist/playbook-rails-react-bindings.js +1 -1
  76. data/dist/playbook-rails.js +1 -1
  77. data/dist/playbook.css +1 -1
  78. data/lib/playbook/kit_base.rb +43 -5
  79. data/lib/playbook/version.rb +1 -1
  80. metadata +39 -5
  81. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md +0 -1
  82. data/dist/chunks/_typeahead-BV_n6U5W.js +0 -22
  83. data/dist/chunks/_weekday_stacked-Dh3OU4s8.js +0 -45
@@ -73,15 +73,15 @@ 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
79
83
  end
80
84
 
81
- def combined_html_options
82
- default_html_options.merge(html_options.deep_merge(data_attributes))
83
- end
84
-
85
85
  # rubocop:disable Layout/CommentIndentation
86
86
  # pb_content_tag information (potentially to be abstracted into its own dev doc in the future)
87
87
  # The pb_content_tag generates HTML content tags for rails kits with flexible options.
@@ -110,15 +110,48 @@ module Playbook
110
110
  end
111
111
  # rubocop:enable Style/OptionalBooleanParameter
112
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
+
113
141
  private
114
142
 
115
143
  def default_options
116
- {
144
+ options = {
117
145
  id: id,
118
146
  data: data,
119
147
  class: classname,
120
148
  aria: aria,
121
149
  }
150
+
151
+ inline_styles = dynamic_inline_props
152
+ options[:style] = inline_styles if inline_styles.present? && !html_options.key?(:style)
153
+
154
+ options
122
155
  end
123
156
 
124
157
  def default_html_options
@@ -131,5 +164,10 @@ module Playbook
131
164
  aria: aria,
132
165
  }.transform_keys { |key| key.to_s.tr("_", "-").to_sym }
133
166
  end
167
+
168
+ def dynamic_inline_props
169
+ styles = global_inline_props.map { |key, value| "#{key.to_s.gsub('_', '-')}: #{value}" if value.present? }.compact
170
+ styles.join("; ").presence
171
+ end
134
172
  end
135
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.PLAY1607dependencydisplayymlupdate4271"
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.PLAY1607dependencydisplayymlupdate4271
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-10-29 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
@@ -762,6 +762,9 @@ files:
762
762
  - app/pb_kits/playbook/pb_currency/docs/_currency_alignment.html.erb
763
763
  - app/pb_kits/playbook/pb_currency/docs/_currency_alignment.jsx
764
764
  - app/pb_kits/playbook/pb_currency/docs/_currency_alignment_swift.md
765
+ - app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.html.erb
766
+ - app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.jsx
767
+ - app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.md
765
768
  - app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals.html.erb
766
769
  - app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals.jsx
767
770
  - app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol.html.erb
@@ -1382,7 +1385,8 @@ files:
1382
1385
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_tag.jsx
1383
1386
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb
1384
1387
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx
1385
- - 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
1386
1390
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.html.erb
1387
1391
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.jsx
1388
1392
  - app/pb_kits/playbook/pb_form_pill/docs/example.yml
@@ -1732,6 +1736,23 @@ files:
1732
1736
  - app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
1733
1737
  - app/pb_kits/playbook/pb_line_graph/line_graph.html.erb
1734
1738
  - app/pb_kits/playbook/pb_line_graph/line_graph.rb
1739
+ - app/pb_kits/playbook/pb_link/_link.scss
1740
+ - app/pb_kits/playbook/pb_link/_link.tsx
1741
+ - app/pb_kits/playbook/pb_link/docs/_link_color.html.erb
1742
+ - app/pb_kits/playbook/pb_link/docs/_link_color.jsx
1743
+ - app/pb_kits/playbook/pb_link/docs/_link_disabled.html.erb
1744
+ - app/pb_kits/playbook/pb_link/docs/_link_disabled.jsx
1745
+ - app/pb_kits/playbook/pb_link/docs/_link_icon.html.erb
1746
+ - app/pb_kits/playbook/pb_link/docs/_link_icon.jsx
1747
+ - app/pb_kits/playbook/pb_link/docs/_link_tag.html.erb
1748
+ - app/pb_kits/playbook/pb_link/docs/_link_tag.jsx
1749
+ - app/pb_kits/playbook/pb_link/docs/_link_underline.html.erb
1750
+ - app/pb_kits/playbook/pb_link/docs/_link_underline.jsx
1751
+ - app/pb_kits/playbook/pb_link/docs/example.yml
1752
+ - app/pb_kits/playbook/pb_link/docs/index.js
1753
+ - app/pb_kits/playbook/pb_link/link.html.erb
1754
+ - app/pb_kits/playbook/pb_link/link.rb
1755
+ - app/pb_kits/playbook/pb_link/link.test.jsx
1735
1756
  - app/pb_kits/playbook/pb_list/_list.scss
1736
1757
  - app/pb_kits/playbook/pb_list/_list.tsx
1737
1758
  - app/pb_kits/playbook/pb_list/_list_item.tsx
@@ -2718,11 +2739,16 @@ files:
2718
2739
  - app/pb_kits/playbook/pb_timeline/_item.tsx
2719
2740
  - app/pb_kits/playbook/pb_timeline/_timeline.scss
2720
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
2721
2744
  - app/pb_kits/playbook/pb_timeline/docs/_description.md
2722
2745
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_default.html.erb
2723
2746
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_default.jsx
2724
2747
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_vertical.html.erb
2725
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
2726
2752
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.html.erb
2727
2753
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.jsx
2728
2754
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.md
@@ -2730,6 +2756,14 @@ files:
2730
2756
  - app/pb_kits/playbook/pb_timeline/docs/index.js
2731
2757
  - app/pb_kits/playbook/pb_timeline/item.html.erb
2732
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
2733
2767
  - app/pb_kits/playbook/pb_timeline/timeline.html.erb
2734
2768
  - app/pb_kits/playbook/pb_timeline/timeline.rb
2735
2769
  - app/pb_kits/playbook/pb_timeline/timeline.test.js
@@ -3099,8 +3133,8 @@ files:
3099
3133
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3100
3134
  - app/pb_kits/playbook/utilities/text.ts
3101
3135
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3102
- - dist/chunks/_typeahead-BV_n6U5W.js
3103
- - dist/chunks/_weekday_stacked-Dh3OU4s8.js
3136
+ - dist/chunks/_typeahead-C-6MLSyC.js
3137
+ - dist/chunks/_weekday_stacked-CFhGhr9V.js
3104
3138
  - dist/chunks/lazysizes-B7xYodB-.js
3105
3139
  - dist/chunks/lib-D-mTv-kp.js
3106
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.