playbook_ui 15.1.0.pre.rc.4 → 15.1.0.pre.rc.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +12 -11
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/VirtualizedTableView.tsx +7 -7
  4. data/app/pb_kits/playbook/pb_advanced_table/Utilities/RowUtils.ts +7 -2
  5. data/app/pb_kits/playbook/pb_contact/_contact.tsx +5 -0
  6. data/app/pb_kits/playbook/pb_contact/contact.rb +4 -0
  7. data/app/pb_kits/playbook/pb_contact/contact.test.js +21 -1
  8. data/app/pb_kits/playbook/pb_contact/docs/_contact_default.html.erb +16 -1
  9. data/app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx +15 -0
  10. data/app/pb_kits/playbook/pb_contact/docs/_contact_default.md +5 -0
  11. data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.html.erb +6 -0
  12. data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.jsx +6 -0
  13. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_breached.html.erb +3 -3
  14. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.html.erb +3 -3
  15. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.html.erb +3 -3
  16. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_meter_settings.html.erb +3 -3
  17. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.html.erb +3 -3
  18. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb +2 -2
  19. data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +13 -5
  20. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children.html.erb +23 -0
  21. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children.jsx +45 -7
  22. data/app/pb_kits/playbook/pb_section_separator/section_separator.html.erb +4 -1
  23. data/app/pb_kits/playbook/pb_section_separator/section_separator.test.js +165 -0
  24. data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +24 -8
  25. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.html.erb +0 -10
  26. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx +0 -9
  27. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.md +1 -0
  28. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.html.erb +3 -17
  29. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx +0 -15
  30. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.md +1 -0
  31. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.html.erb +0 -2
  32. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.jsx +0 -2
  33. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.md +5 -0
  34. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.html.erb +12 -0
  35. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.jsx +25 -0
  36. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.md +1 -0
  37. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.html.erb +4 -0
  38. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.jsx +17 -0
  39. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.md +1 -0
  40. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.html.erb +18 -0
  41. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.jsx +44 -0
  42. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.md +1 -0
  43. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.html.erb +0 -14
  44. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx +0 -14
  45. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.md +1 -0
  46. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.html.erb +0 -4
  47. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.jsx +0 -4
  48. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.jsx +0 -1
  49. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.md +5 -0
  50. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.html.erb +16 -0
  51. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.jsx +30 -0
  52. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.md +1 -0
  53. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.html.erb +16 -0
  54. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.jsx +30 -0
  55. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.md +1 -0
  56. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.html.erb +26 -0
  57. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.jsx +41 -0
  58. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.md +1 -0
  59. data/app/pb_kits/playbook/pb_timestamp/docs/example.yml +18 -6
  60. data/app/pb_kits/playbook/pb_timestamp/docs/index.js +6 -0
  61. data/app/pb_kits/playbook/pb_timestamp/timestamp.rb +29 -7
  62. data/app/pb_kits/playbook/pb_timestamp/timestamp.test.js +69 -4
  63. data/dist/chunks/{_line_graph-CUfJ7E4h.js → _line_graph-DeH7NK-i.js} +1 -1
  64. data/dist/chunks/{_typeahead-DCp1lVJx.js → _typeahead-CCGp0OQe.js} +1 -1
  65. data/dist/chunks/{_weekday_stacked-YwRTPuBs.js → _weekday_stacked-DhJzB115.js} +3 -3
  66. data/dist/chunks/componentRegistry-DzmmLR2x.js +1 -0
  67. data/dist/chunks/{lib-BTs5acfO.js → lib-QZuu1ltS.js} +1 -1
  68. data/dist/chunks/{pb_form_validation-CKkaQFX3.js → pb_form_validation-CleM960_.js} +1 -1
  69. data/dist/chunks/vendor.js +1 -1
  70. data/dist/playbook-doc.js +2 -2
  71. data/dist/playbook-rails-react-bindings.js +1 -1
  72. data/dist/playbook-rails.js +1 -1
  73. data/dist/playbook.css +1 -1
  74. data/lib/playbook/engine.rb +0 -1
  75. data/lib/playbook/kit_base.rb +23 -2
  76. data/lib/playbook/version.rb +1 -1
  77. metadata +38 -27
  78. data/app/pb_kits/playbook/pb_timestamp/docs/_time_stamp_default.md +0 -1
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "action_view/railtie"
4
- require "webpacker/react"
5
4
  require "view_component"
6
5
 
7
6
  module Playbook
@@ -122,7 +122,7 @@ module Playbook
122
122
  html_options.each do |key, value|
123
123
  if key == :style && value.is_a?(Hash)
124
124
  # Convert style hash to CSS string
125
- merged[:style] = value.map { |k, v| "#{k.to_s.gsub('_', '-')}: #{v}" }.join("; ")
125
+ merged[:style] = value.map { |k, v| "#{k.to_s.tr('_', '-')}: #{v}" }.join("; ")
126
126
  else
127
127
  merged[key] = value
128
128
  end
@@ -136,6 +136,27 @@ module Playbook
136
136
  merged.deep_merge(data_attributes)
137
137
  end
138
138
 
139
+ # Custom react_component helper to replace Webpacker React
140
+ # This will render a div with data attributes for the component name and props
141
+ # The mounting script will look for these divs and mount the appropriate React components
142
+ # Sister def in app/helpers/react_helper in playbook-website. Any changes here should be reflected there.
143
+ def react_component(component_name, props = {}, html_options = {})
144
+ # Convert props to JSON for the data attribute
145
+ props_json = props.to_json
146
+
147
+ # Build the HTML attributes
148
+ html_attrs = {
149
+ "data-pb-react-component" => component_name,
150
+ "data-pb-react-props" => props_json,
151
+ }
152
+
153
+ # Merge with any additional HTML options
154
+ html_attrs.merge!(html_options)
155
+
156
+ # Return the div element
157
+ content_tag(:div, "", html_attrs)
158
+ end
159
+
139
160
  def global_inline_props
140
161
  {
141
162
  height: height,
@@ -172,7 +193,7 @@ module Playbook
172
193
  end
173
194
 
174
195
  def dynamic_inline_props
175
- styles = global_inline_props.map { |key, value| "#{key.to_s.gsub('_', '-')}: #{value}" if inline_validator(key, value) }.compact
196
+ styles = global_inline_props.map { |key, value| "#{key.to_s.tr('_', '-')}: #{value}" if inline_validator(key, value) }.compact
176
197
  styles.join("; ").presence
177
198
  end
178
199
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "15.0.0"
5
- VERSION = "15.1.0.pre.rc.4"
5
+ VERSION = "15.1.0.pre.rc.6"
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: 15.1.0.pre.rc.4
4
+ version: 15.1.0.pre.rc.6
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: 2025-09-17 00:00:00.000000000 Z
12
+ date: 2025-09-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -53,20 +53,6 @@ dependencies:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: 5.2.4.5
56
- - !ruby/object:Gem::Dependency
57
- name: react-rails
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - '='
61
- - !ruby/object:Gem::Version
62
- version: 2.6.1
63
- type: :runtime
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - '='
68
- - !ruby/object:Gem::Version
69
- version: 2.6.1
70
56
  - !ruby/object:Gem::Dependency
71
57
  name: view_component
72
58
  requirement: !ruby/object:Gem::Requirement
@@ -82,19 +68,19 @@ dependencies:
82
68
  - !ruby/object:Gem::Version
83
69
  version: 2.83.0
84
70
  - !ruby/object:Gem::Dependency
85
- name: webpacker-react
71
+ name: vite_rails
86
72
  requirement: !ruby/object:Gem::Requirement
87
73
  requirements:
88
- - - "~>"
74
+ - - ">="
89
75
  - !ruby/object:Gem::Version
90
- version: 0.3.2
76
+ version: '0'
91
77
  type: :runtime
92
78
  prerelease: false
93
79
  version_requirements: !ruby/object:Gem::Requirement
94
80
  requirements:
95
- - - "~>"
81
+ - - ">="
96
82
  - !ruby/object:Gem::Version
97
- version: 0.3.2
83
+ version: '0'
98
84
  - !ruby/object:Gem::Dependency
99
85
  name: brakeman
100
86
  requirement: !ruby/object:Gem::Requirement
@@ -889,6 +875,7 @@ files:
889
875
  - app/pb_kits/playbook/pb_contact/contact.test.js
890
876
  - app/pb_kits/playbook/pb_contact/docs/_contact_default.html.erb
891
877
  - app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx
878
+ - app/pb_kits/playbook/pb_contact/docs/_contact_default.md
892
879
  - app/pb_kits/playbook/pb_contact/docs/_contact_default_swift.md
893
880
  - app/pb_kits/playbook/pb_contact/docs/_contact_props_swift.md
894
881
  - app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.html.erb
@@ -2770,6 +2757,7 @@ files:
2770
2757
  - app/pb_kits/playbook/pb_section_separator/docs/index.js
2771
2758
  - app/pb_kits/playbook/pb_section_separator/section_separator.html.erb
2772
2759
  - app/pb_kits/playbook/pb_section_separator/section_separator.rb
2760
+ - app/pb_kits/playbook/pb_section_separator/section_separator.test.js
2773
2761
  - app/pb_kits/playbook/pb_select/_select.scss
2774
2762
  - app/pb_kits/playbook/pb_select/_select.tsx
2775
2763
  - app/pb_kits/playbook/pb_select/docs/_description.md
@@ -3317,25 +3305,47 @@ files:
3317
3305
  - app/pb_kits/playbook/pb_timestamp/_timestamp.tsx
3318
3306
  - app/pb_kits/playbook/pb_timestamp/docs/_description.md
3319
3307
  - app/pb_kits/playbook/pb_timestamp/docs/_footer.md
3320
- - app/pb_kits/playbook/pb_timestamp/docs/_time_stamp_default.md
3321
3308
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.html.erb
3322
3309
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
3310
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.md
3323
3311
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align_swift.md
3324
3312
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.html.erb
3325
3313
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
3314
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.md
3326
3315
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default_swift.md
3327
3316
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.html.erb
3328
3317
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.jsx
3318
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.md
3329
3319
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed_swift.md
3330
3320
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_props_swift.md
3321
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.html.erb
3322
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.jsx
3323
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.md
3324
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.html.erb
3325
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.jsx
3326
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.md
3327
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.html.erb
3328
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.jsx
3329
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.md
3331
3330
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.html.erb
3332
3331
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
3332
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.md
3333
3333
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones_swift.md
3334
3334
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.html.erb
3335
3335
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.jsx
3336
3336
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.md
3337
3337
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.html.erb
3338
3338
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.jsx
3339
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.md
3340
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.html.erb
3341
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.jsx
3342
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.md
3343
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.html.erb
3344
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.jsx
3345
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.md
3346
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.html.erb
3347
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.jsx
3348
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.md
3339
3349
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_swift.md
3340
3350
  - app/pb_kits/playbook/pb_timestamp/docs/example.yml
3341
3351
  - app/pb_kits/playbook/pb_timestamp/docs/index.js
@@ -3689,12 +3699,13 @@ files:
3689
3699
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3690
3700
  - app/pb_kits/playbook/utilities/text.ts
3691
3701
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3692
- - dist/chunks/_line_graph-CUfJ7E4h.js
3693
- - dist/chunks/_typeahead-DCp1lVJx.js
3694
- - dist/chunks/_weekday_stacked-YwRTPuBs.js
3702
+ - dist/chunks/_line_graph-DeH7NK-i.js
3703
+ - dist/chunks/_typeahead-CCGp0OQe.js
3704
+ - dist/chunks/_weekday_stacked-DhJzB115.js
3705
+ - dist/chunks/componentRegistry-DzmmLR2x.js
3695
3706
  - dist/chunks/lazysizes-B7xYodB-.js
3696
- - dist/chunks/lib-BTs5acfO.js
3697
- - dist/chunks/pb_form_validation-CKkaQFX3.js
3707
+ - dist/chunks/lib-QZuu1ltS.js
3708
+ - dist/chunks/pb_form_validation-CleM960_.js
3698
3709
  - dist/chunks/vendor.js
3699
3710
  - dist/menu.yml
3700
3711
  - dist/playbook-doc.js
@@ -1 +0,0 @@
1
- Use these only to display status updates in areas that has a lot of data.