playbook_ui 14.7.0.pre.alpha.spacingquickchange4482 → 14.7.0.pre.rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +2 -3
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +1 -8
  4. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +28 -21
  5. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -37
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx +2 -13
  7. data/app/pb_kits/playbook/pb_card/_card.tsx +5 -8
  8. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +2 -1
  9. data/app/pb_kits/playbook/pb_card/docs/_card_light.md +1 -1
  10. data/app/pb_kits/playbook/pb_currency/_currency.tsx +6 -16
  11. data/app/pb_kits/playbook/pb_currency/currency.rb +11 -38
  12. data/app/pb_kits/playbook/pb_currency/currency.test.js +0 -35
  13. data/app/pb_kits/playbook/pb_currency/docs/example.yml +1 -3
  14. data/app/pb_kits/playbook/pb_currency/docs/index.js +0 -1
  15. data/app/pb_kits/playbook/pb_date/_date.scss +0 -3
  16. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -6
  17. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +4 -4
  18. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +10 -9
  19. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +2 -2
  20. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +1 -1
  21. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +2 -6
  22. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +26 -30
  23. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +1 -24
  24. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +2 -25
  25. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md +1 -0
  26. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +8 -46
  27. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +1 -67
  28. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +0 -1
  29. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -1
  30. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.rb +1 -5
  31. data/app/pb_kits/playbook/pb_timeline/_item.tsx +23 -59
  32. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +0 -8
  33. data/app/pb_kits/playbook/pb_timeline/docs/example.yml +1 -2
  34. data/app/pb_kits/playbook/pb_timeline/docs/index.js +0 -1
  35. data/app/pb_kits/playbook/pb_timeline/item.html.erb +21 -17
  36. data/app/pb_kits/playbook/pb_timeline/item.rb +0 -4
  37. data/app/pb_kits/playbook/pb_timeline/timeline.test.js +0 -84
  38. data/app/pb_kits/playbook/tokens/_typography.scss +0 -35
  39. data/app/pb_kits/playbook/utilities/_hover.scss +43 -46
  40. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -1
  41. data/app/pb_kits/playbook/utilities/globalProps.ts +0 -5
  42. data/dist/chunks/_typeahead-BhHnXJjy.js +22 -0
  43. data/dist/chunks/_weekday_stacked-C_QAqbqJ.js +45 -0
  44. data/dist/chunks/vendor.js +1 -1
  45. data/dist/menu.yml +2 -8
  46. data/dist/playbook-doc.js +1 -1
  47. data/dist/playbook-rails-react-bindings.js +1 -1
  48. data/dist/playbook-rails.js +1 -1
  49. data/dist/playbook.css +1 -1
  50. data/lib/playbook/hover.rb +1 -4
  51. data/lib/playbook/kit_base.rb +15 -33
  52. data/lib/playbook/version.rb +2 -2
  53. metadata +5 -69
  54. data/app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.html.erb +0 -7
  55. data/app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.jsx +0 -18
  56. data/app/pb_kits/playbook/pb_currency/docs/_currency_comma_separator.md +0 -3
  57. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.html.erb +0 -26
  58. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.md +0 -7
  59. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb +0 -38
  60. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md +0 -0
  61. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb +0 -19
  62. data/app/pb_kits/playbook/pb_draggable/draggable.html.erb +0 -3
  63. data/app/pb_kits/playbook/pb_draggable/draggable.rb +0 -18
  64. data/app/pb_kits/playbook/pb_draggable/draggable_container.html.erb +0 -3
  65. data/app/pb_kits/playbook/pb_draggable/draggable_container.rb +0 -15
  66. data/app/pb_kits/playbook/pb_draggable/draggable_item.html.erb +0 -7
  67. data/app/pb_kits/playbook/pb_draggable/draggable_item.rb +0 -18
  68. data/app/pb_kits/playbook/pb_draggable/index.js +0 -125
  69. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_rails.md +0 -3
  70. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_react.md +0 -1
  71. data/app/pb_kits/playbook/pb_link/_link.scss +0 -66
  72. data/app/pb_kits/playbook/pb_link/_link.tsx +0 -107
  73. data/app/pb_kits/playbook/pb_link/docs/_link_color.html.erb +0 -30
  74. data/app/pb_kits/playbook/pb_link/docs/_link_color.jsx +0 -40
  75. data/app/pb_kits/playbook/pb_link/docs/_link_disabled.html.erb +0 -5
  76. data/app/pb_kits/playbook/pb_link/docs/_link_disabled.jsx +0 -15
  77. data/app/pb_kits/playbook/pb_link/docs/_link_icon.html.erb +0 -15
  78. data/app/pb_kits/playbook/pb_link/docs/_link_icon.jsx +0 -25
  79. data/app/pb_kits/playbook/pb_link/docs/_link_tag.html.erb +0 -35
  80. data/app/pb_kits/playbook/pb_link/docs/_link_tag.jsx +0 -45
  81. data/app/pb_kits/playbook/pb_link/docs/_link_underline.html.erb +0 -5
  82. data/app/pb_kits/playbook/pb_link/docs/_link_underline.jsx +0 -15
  83. data/app/pb_kits/playbook/pb_link/docs/example.yml +0 -16
  84. data/app/pb_kits/playbook/pb_link/docs/index.js +0 -5
  85. data/app/pb_kits/playbook/pb_link/link.html.erb +0 -21
  86. data/app/pb_kits/playbook/pb_link/link.rb +0 -44
  87. data/app/pb_kits/playbook/pb_link/link.test.jsx +0 -92
  88. data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.scss +0 -37
  89. data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.tsx +0 -67
  90. data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading_mixins.scss +0 -40
  91. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.jsx +0 -51
  92. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.md +0 -1
  93. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.jsx +0 -26
  94. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.md +0 -1
  95. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.html.erb +0 -1
  96. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.jsx +0 -11
  97. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +0 -59
  98. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.md +0 -3
  99. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.jsx +0 -20
  100. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.md +0 -3
  101. data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +0 -13
  102. data/app/pb_kits/playbook/pb_skeleton_loading/docs/index.js +0 -5
  103. data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.html.erb +0 -12
  104. data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.rb +0 -8
  105. data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.test.jsx +0 -81
  106. data/app/pb_kits/playbook/pb_timeline/detail.html.erb +0 -3
  107. data/app/pb_kits/playbook/pb_timeline/detail.rb +0 -11
  108. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +0 -43
  109. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx +0 -68
  110. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md +0 -2
  111. data/app/pb_kits/playbook/pb_timeline/label.html.erb +0 -12
  112. data/app/pb_kits/playbook/pb_timeline/label.rb +0 -13
  113. data/app/pb_kits/playbook/pb_timeline/step.html.erb +0 -14
  114. data/app/pb_kits/playbook/pb_timeline/step.rb +0 -16
  115. data/app/pb_kits/playbook/pb_timeline/subcomponents/Detail.tsx +0 -29
  116. data/app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx +0 -38
  117. data/app/pb_kits/playbook/pb_timeline/subcomponents/Step.tsx +0 -42
  118. data/app/pb_kits/playbook/pb_timeline/subcomponents/index.tsx +0 -3
  119. data/dist/chunks/_typeahead-DhLic2Fe.js +0 -22
  120. data/dist/chunks/_weekday_stacked-Mx8TYP5I.js +0 -45
@@ -4,7 +4,6 @@ module Playbook
4
4
  module Hover
5
5
  def self.included(base)
6
6
  base.prop :hover
7
- base.prop :group_hover, type: Playbook::Props::Boolean, default: false
8
7
  end
9
8
 
10
9
  def hover_options
@@ -39,8 +38,7 @@ module Playbook
39
38
 
40
39
  def hover_props
41
40
  selected_props = hover_options.keys.select { |sk| try(sk) }
42
-
43
- return nil if selected_props.nil? && group_hover.nil?
41
+ return nil unless selected_props.present?
44
42
 
45
43
  responsive = selected_props.present? && try(selected_props.first).is_a?(::Hash)
46
44
  css = ""
@@ -60,7 +58,6 @@ module Playbook
60
58
  end
61
59
  end
62
60
 
63
- css += "group_hover " if group_hover
64
61
  css.strip unless css.blank?
65
62
  end
66
63
  end
@@ -82,6 +82,18 @@ 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
+
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.
@@ -110,34 +122,6 @@ module Playbook
110
122
  end
111
123
  # rubocop:enable Style/OptionalBooleanParameter
112
124
 
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
-
141
125
  private
142
126
 
143
127
  def default_options
@@ -147,10 +131,8 @@ module Playbook
147
131
  class: classname,
148
132
  aria: aria,
149
133
  }
150
-
151
134
  inline_styles = dynamic_inline_props
152
- options[:style] = inline_styles if inline_styles.present? && !html_options.key?(:style)
153
-
135
+ options[:style] = inline_styles if inline_styles.present?
154
136
  options
155
137
  end
156
138
 
@@ -166,8 +148,8 @@ module Playbook
166
148
  end
167
149
 
168
150
  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
151
+ styles = global_inline_props.map { |key, value| "#{key.to_s.gsub('_', '-')}: #{value};" if value.present? }.compact
152
+ styles.join(" ").presence
171
153
  end
172
154
  end
173
155
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "14.7.0"
5
- VERSION = "14.7.0.pre.alpha.spacingquickchange4482"
4
+ PREVIOUS_VERSION = "14.6.0"
5
+ VERSION = "14.7.0.pre.rc.0"
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.7.0.pre.alpha.spacingquickchange4482
4
+ version: 14.7.0.pre.rc.0
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-14 00:00:00.000000000 Z
12
+ date: 2024-10-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -762,9 +762,6 @@ 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
768
765
  - app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals.html.erb
769
766
  - app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals.jsx
770
767
  - app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol.html.erb
@@ -1098,29 +1095,17 @@ files:
1098
1095
  - app/pb_kits/playbook/pb_draggable/context/types.ts
1099
1096
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx
1100
1097
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md
1101
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.html.erb
1102
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.md
1103
1098
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx
1104
1099
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.md
1105
1100
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx
1106
1101
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md
1107
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb
1108
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md
1109
1102
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx
1110
1103
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md
1111
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb
1112
1104
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx
1113
1105
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md
1114
1106
  - app/pb_kits/playbook/pb_draggable/docs/example.yml
1115
1107
  - app/pb_kits/playbook/pb_draggable/docs/index.js
1116
- - app/pb_kits/playbook/pb_draggable/draggable.html.erb
1117
- - app/pb_kits/playbook/pb_draggable/draggable.rb
1118
1108
  - app/pb_kits/playbook/pb_draggable/draggable.test.jsx
1119
- - app/pb_kits/playbook/pb_draggable/draggable_container.html.erb
1120
- - app/pb_kits/playbook/pb_draggable/draggable_container.rb
1121
- - app/pb_kits/playbook/pb_draggable/draggable_item.html.erb
1122
- - app/pb_kits/playbook/pb_draggable/draggable_item.rb
1123
- - app/pb_kits/playbook/pb_draggable/index.js
1124
1109
  - app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx
1125
1110
  - app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx
1126
1111
  - app/pb_kits/playbook/pb_drawer/_close_icon.tsx
@@ -1397,8 +1382,7 @@ files:
1397
1382
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_tag.jsx
1398
1383
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb
1399
1384
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx
1400
- - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_rails.md
1401
- - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_react.md
1385
+ - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md
1402
1386
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.html.erb
1403
1387
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.jsx
1404
1388
  - app/pb_kits/playbook/pb_form_pill/docs/example.yml
@@ -1748,23 +1732,6 @@ files:
1748
1732
  - app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js
1749
1733
  - app/pb_kits/playbook/pb_line_graph/line_graph.html.erb
1750
1734
  - app/pb_kits/playbook/pb_line_graph/line_graph.rb
1751
- - app/pb_kits/playbook/pb_link/_link.scss
1752
- - app/pb_kits/playbook/pb_link/_link.tsx
1753
- - app/pb_kits/playbook/pb_link/docs/_link_color.html.erb
1754
- - app/pb_kits/playbook/pb_link/docs/_link_color.jsx
1755
- - app/pb_kits/playbook/pb_link/docs/_link_disabled.html.erb
1756
- - app/pb_kits/playbook/pb_link/docs/_link_disabled.jsx
1757
- - app/pb_kits/playbook/pb_link/docs/_link_icon.html.erb
1758
- - app/pb_kits/playbook/pb_link/docs/_link_icon.jsx
1759
- - app/pb_kits/playbook/pb_link/docs/_link_tag.html.erb
1760
- - app/pb_kits/playbook/pb_link/docs/_link_tag.jsx
1761
- - app/pb_kits/playbook/pb_link/docs/_link_underline.html.erb
1762
- - app/pb_kits/playbook/pb_link/docs/_link_underline.jsx
1763
- - app/pb_kits/playbook/pb_link/docs/example.yml
1764
- - app/pb_kits/playbook/pb_link/docs/index.js
1765
- - app/pb_kits/playbook/pb_link/link.html.erb
1766
- - app/pb_kits/playbook/pb_link/link.rb
1767
- - app/pb_kits/playbook/pb_link/link.test.jsx
1768
1735
  - app/pb_kits/playbook/pb_list/_list.scss
1769
1736
  - app/pb_kits/playbook/pb_list/_list.tsx
1770
1737
  - app/pb_kits/playbook/pb_list/_list_item.tsx
@@ -2445,24 +2412,6 @@ files:
2445
2412
  - app/pb_kits/playbook/pb_selectable_list/selectable_list.test.js
2446
2413
  - app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb
2447
2414
  - app/pb_kits/playbook/pb_selectable_list/selectable_list_item.rb
2448
- - app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.scss
2449
- - app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.tsx
2450
- - app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading_mixins.scss
2451
- - app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.jsx
2452
- - app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.md
2453
- - app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.jsx
2454
- - app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.md
2455
- - app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.html.erb
2456
- - app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.jsx
2457
- - app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx
2458
- - app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.md
2459
- - app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.jsx
2460
- - app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.md
2461
- - app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml
2462
- - app/pb_kits/playbook/pb_skeleton_loading/docs/index.js
2463
- - app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.html.erb
2464
- - app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.rb
2465
- - app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.test.jsx
2466
2415
  - app/pb_kits/playbook/pb_source/_source.scss
2467
2416
  - app/pb_kits/playbook/pb_source/_source.tsx
2468
2417
  - app/pb_kits/playbook/pb_source/docs/_description.md
@@ -2769,16 +2718,11 @@ files:
2769
2718
  - app/pb_kits/playbook/pb_timeline/_item.tsx
2770
2719
  - app/pb_kits/playbook/pb_timeline/_timeline.scss
2771
2720
  - app/pb_kits/playbook/pb_timeline/_timeline.tsx
2772
- - app/pb_kits/playbook/pb_timeline/detail.html.erb
2773
- - app/pb_kits/playbook/pb_timeline/detail.rb
2774
2721
  - app/pb_kits/playbook/pb_timeline/docs/_description.md
2775
2722
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_default.html.erb
2776
2723
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_default.jsx
2777
2724
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_vertical.html.erb
2778
2725
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_vertical.jsx
2779
- - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb
2780
- - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.jsx
2781
- - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md
2782
2726
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.html.erb
2783
2727
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.jsx
2784
2728
  - app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.md
@@ -2786,14 +2730,6 @@ files:
2786
2730
  - app/pb_kits/playbook/pb_timeline/docs/index.js
2787
2731
  - app/pb_kits/playbook/pb_timeline/item.html.erb
2788
2732
  - app/pb_kits/playbook/pb_timeline/item.rb
2789
- - app/pb_kits/playbook/pb_timeline/label.html.erb
2790
- - app/pb_kits/playbook/pb_timeline/label.rb
2791
- - app/pb_kits/playbook/pb_timeline/step.html.erb
2792
- - app/pb_kits/playbook/pb_timeline/step.rb
2793
- - app/pb_kits/playbook/pb_timeline/subcomponents/Detail.tsx
2794
- - app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx
2795
- - app/pb_kits/playbook/pb_timeline/subcomponents/Step.tsx
2796
- - app/pb_kits/playbook/pb_timeline/subcomponents/index.tsx
2797
2733
  - app/pb_kits/playbook/pb_timeline/timeline.html.erb
2798
2734
  - app/pb_kits/playbook/pb_timeline/timeline.rb
2799
2735
  - app/pb_kits/playbook/pb_timeline/timeline.test.js
@@ -3163,8 +3099,8 @@ files:
3163
3099
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3164
3100
  - app/pb_kits/playbook/utilities/text.ts
3165
3101
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3166
- - dist/chunks/_typeahead-DhLic2Fe.js
3167
- - dist/chunks/_weekday_stacked-Mx8TYP5I.js
3102
+ - dist/chunks/_typeahead-BhHnXJjy.js
3103
+ - dist/chunks/_weekday_stacked-C_QAqbqJ.js
3168
3104
  - dist/chunks/lazysizes-B7xYodB-.js
3169
3105
  - dist/chunks/lib-D-mTv-kp.js
3170
3106
  - dist/chunks/pb_form_validation-BkWGwJsl.js
@@ -1,7 +0,0 @@
1
- <%= pb_rails("currency", props: {
2
- amount: '1234567.89',
3
- comma_separator: true,
4
- size: 'lg',
5
- emphasized: false,
6
- decimals: 'matching',
7
- }) %>
@@ -1,18 +0,0 @@
1
- import React from "react"
2
-
3
- import Currency from "../_currency"
4
-
5
- const CurrencyCommaSeparator = (props) => {
6
- return (
7
- <Currency
8
- amount='1234567.89'
9
- commaSeparator
10
- decimals="matching"
11
- emphasized={false}
12
- size="lg"
13
- {...props}
14
- />
15
- )
16
- }
17
-
18
- export default CurrencyCommaSeparator
@@ -1,3 +0,0 @@
1
- The optional `commaSeparator` can be used to auto-format the use of commas as a thousands separator.
2
-
3
- **NOTE:** If the value passed into the `amount` prop is already comma-dilineated, it will not add additional commas.
@@ -1,26 +0,0 @@
1
- <% initial_items = [
2
- {
3
- id: "1",
4
- url: "https://unsplash.it/500/400/?image=633",
5
- },
6
- {
7
- id: "2",
8
- url: "https://unsplash.it/500/400/?image=634",
9
- },
10
- {
11
- id: "3",
12
- url: "https://unsplash.it/500/400/?image=637",
13
- },
14
- ] %>
15
-
16
- <%= pb_rails("draggable", props: {initial_items: initial_items}) do %>
17
- <%= pb_rails("draggable/draggable_container") do %>
18
- <%= pb_rails("flex") do %>
19
- <% initial_items.each do |item| %>
20
- <%= pb_rails("draggable/draggable_item", props:{drag_id: item[:id]}) do %>
21
- <%= pb_rails("image", props: { alt: item[:id], size: "md", url: item[:url], margin: "xs" }) %>
22
- <% end %>
23
- <% end %>
24
- <% end %>
25
- <% end %>
26
- <% end %>
@@ -1,7 +0,0 @@
1
- The `draggable` kit gives you a full subcomponent structure that allows it to be used with almost any kit.
2
-
3
- `initial_items` is a REQUIRED prop, which is the array of objects that contains data for the the draggable items.
4
-
5
- `draggable/draggable_container` = This specifies the container within which items can be dropped.
6
-
7
- `draggable/draggable_item` = This specifies the items that can be dragged and dropped. `drag_id` is a REQUIRED prop for draggable_item and must match the id on the items within `initial_items`.
@@ -1,38 +0,0 @@
1
- <% initial_items = [
2
- { id: "21", name: "Joe Black" },
3
- { id: "22", name: "Nancy White" },
4
- { id: "23", name: "Bill Green" },
5
- ] %>
6
-
7
- <%= pb_rails("draggable", props: {initial_items: initial_items}) do %>
8
- <%= pb_rails("draggable/draggable_container") do %>
9
- <% initial_items.each do |item| %>
10
- <%= pb_rails("draggable/draggable_item", props:{drag_id: item[:id]}) do %>
11
- <%= pb_rails("card", props: {highlight: {position: "side", color:"primary"}, margin_bottom: "xs", padding: "xs"}) do %>
12
- <%= pb_rails("flex", props:{align_items: "stretch", flex_direction:"column"}) do %>
13
- <%= pb_rails("flex", props:{gap: "xs"}) do %>
14
- <%= pb_rails("title", props: { text: item[:name], tag: "h4", size: 4 }) %>
15
- <%= pb_rails("badge", props: {text:"35-12345" ,variant: "primary"}) %>
16
- <% end %>
17
- <%= pb_rails("caption", props: { size: "xs", text: "8:00A • Township Name • 90210" }) %>
18
- <%= pb_rails("flex", props:{gap: "xxs", spacing:"between"}) do %>
19
- <%= pb_rails("flex", props:{gap: "xxs"}) do %>
20
- <%= pb_rails("caption", props: { size: "xs" , color: "error" }) do %>
21
- <%= pb_rails("icon", props: { icon: "house-circle-exclamation", fixed_width: true }) %>
22
- <% end %>
23
- <%= pb_rails("caption", props: { size: "xs" , color: "success" }) do %>
24
- <%= pb_rails("icon", props: { icon: "file-circle-check", fixed_width: true }) %>
25
- <% end %>
26
- <% end %>
27
- <%= pb_rails("flex") do %>
28
- <%= pb_rails("badge", props: {text:"Schedule QA" ,variant: "warning", rounded: true}) %>
29
- <%= pb_rails("badge", props: {text:"Flex" ,variant: "primary", rounded: true}) %>
30
- <%= pb_rails("badge", props: {text:"R99" ,variant: "primary", rounded: true}) %>
31
- <% end %>
32
- <% end %>
33
- <% end %>
34
- <% end %>
35
- <% end %>
36
- <% end %>
37
- <% end %>
38
- <% end %>
@@ -1,19 +0,0 @@
1
- <% initial_items = [
2
- { id: "31", name: "Philadelphia" },
3
- { id: "32", name: "New Jersey" },
4
- { id: "33", name: "Maryland" },
5
- { id: "34", name: "Connecticut" },
6
-
7
- ] %>
8
-
9
- <%= pb_rails("draggable", props: {initial_items: initial_items}) do %>
10
- <%= pb_rails("draggable/draggable_container") do %>
11
- <%= pb_rails("list", props: {ordered: false}) do %>
12
- <% initial_items.each do |item| %>
13
- <%= pb_rails("draggable/draggable_item", props:{drag_id: item[:id]}) do %>
14
- <%= pb_rails("list/item") do %><%= item[:name] %><% end %>
15
- <% end %>
16
- <% end %>
17
- <% end %>
18
- <% end %>
19
- <% end %>
@@ -1,3 +0,0 @@
1
- <%= pb_content_tag do %>
2
- <%= content.presence %>
3
- <% end %>
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Playbook
4
- module PbDraggable
5
- class Draggable < ::Playbook::KitBase
6
- prop :initial_items, type: Playbook::Props::Array,
7
- default: []
8
-
9
- def data
10
- Hash(prop(:data)).merge(pb_draggable: true)
11
- end
12
-
13
- def classname
14
- generate_classname("pb_draggable")
15
- end
16
- end
17
- end
18
- end
@@ -1,3 +0,0 @@
1
- <%= pb_content_tag do %>
2
- <%= content.presence %>
3
- <% end %>
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Playbook
4
- module PbDraggable
5
- class DraggableContainer < ::Playbook::KitBase
6
- def data
7
- Hash(prop(:data)).merge(pb_draggable_container: true)
8
- end
9
-
10
- def classname
11
- generate_classname("pb_draggable_container")
12
- end
13
- end
14
- end
15
- end
@@ -1,7 +0,0 @@
1
- <%= pb_content_tag(:div, {
2
- id: "item_#{object.drag_id}",
3
- draggable: true
4
- }) do %>
5
- <%= content.presence %>
6
- <% end %>
7
-
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Playbook
4
- module PbDraggable
5
- class DraggableItem < ::Playbook::KitBase
6
- prop :drag_id, type: Playbook::Props::String,
7
- default: ""
8
-
9
- def data
10
- Hash(prop(:data)).merge(pb_draggable_item: true)
11
- end
12
-
13
- def classname
14
- generate_classname("pb_draggable_item")
15
- end
16
- end
17
- end
18
- end
@@ -1,125 +0,0 @@
1
- import PbEnhancedElement from "../pb_enhanced_element";
2
-
3
- const DRAGGABLE_SELECTOR = "[data-pb-draggable]";
4
- const DRAGGABLE_CONTAINER = ".pb_draggable_container";
5
-
6
- export default class PbDraggable extends PbEnhancedElement {
7
- static get selector() {
8
- return DRAGGABLE_SELECTOR;
9
- }
10
-
11
- connect() {
12
- this.draggedItem = null;
13
- this.draggedItemId = null;
14
- document.addEventListener("DOMContentLoaded", () => this.bindEventListeners());
15
- }
16
-
17
- bindEventListeners() {
18
- // Needed to prevent images within draggable items from being independently draggable
19
- // Needed if using Image kit in draggable items
20
- this.element.querySelectorAll(".pb_draggable_item img").forEach(img => {
21
- img.setAttribute("draggable", "false");
22
- });
23
-
24
- this.element.querySelectorAll(".pb_draggable_item").forEach(item => {
25
- item.addEventListener("dragstart", this.handleDragStart.bind(this));
26
- item.addEventListener("dragend", this.handleDragEnd.bind(this));
27
- item.addEventListener("dragenter", this.handleDragEnter.bind(this));
28
- });
29
-
30
- const container = this.element.querySelector(DRAGGABLE_CONTAINER);
31
- if (container) {
32
- container.addEventListener("dragover", this.handleDragOver.bind(this));
33
- container.addEventListener("drop", this.handleDrop.bind(this));
34
- }
35
- }
36
-
37
- handleDragStart(event) {
38
- // Needed to prevent images within draggable items from being independently draggable
39
- // Needed if using Image kit in draggable items
40
- if (event.target.tagName.toLowerCase() === 'img') {
41
- event.preventDefault();
42
- return;
43
- }
44
-
45
- this.draggedItem = event.target;
46
- this.draggedItemId = event.target.id;
47
- event.target.classList.add("is_dragging");
48
-
49
- if (event.dataTransfer) {
50
- event.dataTransfer.effectAllowed = 'move';
51
- event.dataTransfer.setData('text/plain', this.draggedItemId);
52
- }
53
-
54
- setTimeout(() => {
55
- event.target.style.opacity = '0.5';
56
- }, 0);
57
- }
58
-
59
- handleDragEnter(event) {
60
- if (!this.draggedItem || event.target === this.draggedItem) return;
61
-
62
- const targetItem = event.target.closest('.pb_draggable_item');
63
- if (!targetItem) return;
64
-
65
- const container = targetItem.parentNode;
66
- const items = Array.from(container.children);
67
- const draggedIndex = items.indexOf(this.draggedItem);
68
- const targetIndex = items.indexOf(targetItem);
69
-
70
- if (draggedIndex > targetIndex) {
71
- container.insertBefore(this.draggedItem, targetItem);
72
- } else {
73
- container.insertBefore(this.draggedItem, targetItem.nextSibling);
74
- }
75
- }
76
-
77
- handleDragOver(event) {
78
- event.preventDefault();
79
- const container = event.target.closest(DRAGGABLE_CONTAINER);
80
-
81
- if (container) {
82
- container.classList.add("active_container");
83
- }
84
- }
85
-
86
- handleDrop(event) {
87
- event.preventDefault();
88
- const container = event.target.closest(DRAGGABLE_CONTAINER);
89
- if (!container || !this.draggedItem) return;
90
-
91
- container.classList.remove("active_container");
92
- this.draggedItem.style.opacity = '1';
93
-
94
- // Updated order of items as an array of item IDs
95
- const reorderedItems = Array.from(container.children)
96
- .filter(item => item.classList.contains("pb_draggable_item"))
97
- .map(item => item.id.replace("item_", ""));
98
-
99
- // Store reordered items in a data attribute on the container
100
- container.setAttribute("data-reordered-items", JSON.stringify(reorderedItems));
101
-
102
- const customEvent = new CustomEvent('pb-draggable-reorder', {
103
- detail: {
104
- reorderedItems,
105
- containerId: container.id,
106
- }
107
- });
108
- this.element.dispatchEvent(customEvent);
109
-
110
- this.draggedItem = null;
111
- this.draggedItemId = null;
112
- }
113
-
114
-
115
- handleDragEnd(event) {
116
- event.target.classList.remove("is_dragging");
117
- event.target.style.opacity = '1';
118
- this.draggedItem = null;
119
- this.draggedItemId = null;
120
-
121
- this.element.querySelectorAll(DRAGGABLE_CONTAINER).forEach(container => {
122
- container.classList.remove("active_container");
123
- });
124
- }
125
- }
@@ -1,3 +0,0 @@
1
- For Form 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.
2
-
3
- __NOTE__: For Rails Form Pills (not ones embedded within a React-rendered Typeahead or MultiLevelSelect), a unique `id` is required to enable the Tooltip functionality displaying the text or tag section of the Form Pill.
@@ -1 +0,0 @@
1
- For Form Pills with longer text, the `truncate` global prop can be used to truncate the label within each Form Pill. Hover over the truncated Form Pill and a Tooltip containing the text or tag section of the Form Pill will appear. See [here](https://playbook.powerapp.cloud/visual_guidelines/truncate) for more information on the truncate global prop.