playbook_ui 15.0.0.pre.alpha.removewebpacker10589 → 15.0.0.pre.alpha.renovatenpmtrixvulnerability10692

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-DeH7NK-i.js → _line_graph-CUfJ7E4h.js} +1 -1
  64. data/dist/chunks/{_typeahead-CCGp0OQe.js → _typeahead-DCp1lVJx.js} +1 -1
  65. data/dist/chunks/{_weekday_stacked-BHLwECdV.js → _weekday_stacked-qrsOsOR9.js} +3 -3
  66. data/dist/chunks/{lib-QZuu1ltS.js → lib-BTs5acfO.js} +1 -1
  67. data/dist/chunks/{pb_form_validation-CleM960_.js → pb_form_validation-CKkaQFX3.js} +1 -1
  68. data/dist/chunks/vendor.js +1 -1
  69. data/dist/playbook-doc.js +2 -2
  70. data/dist/playbook-rails-react-bindings.js +1 -1
  71. data/dist/playbook-rails.js +1 -1
  72. data/dist/playbook.css +1 -1
  73. data/lib/playbook/engine.rb +1 -0
  74. data/lib/playbook/kit_base.rb +2 -23
  75. data/lib/playbook/version.rb +1 -1
  76. metadata +51 -14
  77. data/app/pb_kits/playbook/pb_timestamp/docs/_time_stamp_default.md +0 -1
  78. data/dist/chunks/componentRegistry-DzmmLR2x.js +0 -1
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "action_view/railtie"
4
+ require "webpacker/react"
4
5
  require "view_component"
5
6
 
6
7
  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.tr('_', '-')}: #{v}" }.join("; ")
125
+ merged[:style] = value.map { |k, v| "#{k.to_s.gsub('_', '-')}: #{v}" }.join("; ")
126
126
  else
127
127
  merged[key] = value
128
128
  end
@@ -136,27 +136,6 @@ 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
-
160
139
  def global_inline_props
161
140
  {
162
141
  height: height,
@@ -193,7 +172,7 @@ module Playbook
193
172
  end
194
173
 
195
174
  def dynamic_inline_props
196
- styles = global_inline_props.map { |key, value| "#{key.to_s.tr('_', '-')}: #{value}" if inline_validator(key, value) }.compact
175
+ styles = global_inline_props.map { |key, value| "#{key.to_s.gsub('_', '-')}: #{value}" if inline_validator(key, value) }.compact
197
176
  styles.join("; ").presence
198
177
  end
199
178
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "15.0.0"
5
- VERSION = "15.0.0.pre.alpha.removewebpacker10589"
5
+ VERSION = "15.0.0.pre.alpha.renovatenpmtrixvulnerability10692"
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.0.0.pre.alpha.removewebpacker10589
4
+ version: 15.0.0.pre.alpha.renovatenpmtrixvulnerability10692
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-18 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,6 +53,20 @@ 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
56
70
  - !ruby/object:Gem::Dependency
57
71
  name: view_component
58
72
  requirement: !ruby/object:Gem::Requirement
@@ -68,19 +82,19 @@ dependencies:
68
82
  - !ruby/object:Gem::Version
69
83
  version: 2.83.0
70
84
  - !ruby/object:Gem::Dependency
71
- name: vite_rails
85
+ name: webpacker-react
72
86
  requirement: !ruby/object:Gem::Requirement
73
87
  requirements:
74
- - - ">="
88
+ - - "~>"
75
89
  - !ruby/object:Gem::Version
76
- version: '0'
90
+ version: 0.3.2
77
91
  type: :runtime
78
92
  prerelease: false
79
93
  version_requirements: !ruby/object:Gem::Requirement
80
94
  requirements:
81
- - - ">="
95
+ - - "~>"
82
96
  - !ruby/object:Gem::Version
83
- version: '0'
97
+ version: 0.3.2
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: brakeman
86
100
  requirement: !ruby/object:Gem::Requirement
@@ -875,6 +889,7 @@ files:
875
889
  - app/pb_kits/playbook/pb_contact/contact.test.js
876
890
  - app/pb_kits/playbook/pb_contact/docs/_contact_default.html.erb
877
891
  - app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx
892
+ - app/pb_kits/playbook/pb_contact/docs/_contact_default.md
878
893
  - app/pb_kits/playbook/pb_contact/docs/_contact_default_swift.md
879
894
  - app/pb_kits/playbook/pb_contact/docs/_contact_props_swift.md
880
895
  - app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.html.erb
@@ -2756,6 +2771,7 @@ files:
2756
2771
  - app/pb_kits/playbook/pb_section_separator/docs/index.js
2757
2772
  - app/pb_kits/playbook/pb_section_separator/section_separator.html.erb
2758
2773
  - app/pb_kits/playbook/pb_section_separator/section_separator.rb
2774
+ - app/pb_kits/playbook/pb_section_separator/section_separator.test.js
2759
2775
  - app/pb_kits/playbook/pb_select/_select.scss
2760
2776
  - app/pb_kits/playbook/pb_select/_select.tsx
2761
2777
  - app/pb_kits/playbook/pb_select/docs/_description.md
@@ -3303,25 +3319,47 @@ files:
3303
3319
  - app/pb_kits/playbook/pb_timestamp/_timestamp.tsx
3304
3320
  - app/pb_kits/playbook/pb_timestamp/docs/_description.md
3305
3321
  - app/pb_kits/playbook/pb_timestamp/docs/_footer.md
3306
- - app/pb_kits/playbook/pb_timestamp/docs/_time_stamp_default.md
3307
3322
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.html.erb
3308
3323
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
3324
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.md
3309
3325
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align_swift.md
3310
3326
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.html.erb
3311
3327
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
3328
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.md
3312
3329
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default_swift.md
3313
3330
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.html.erb
3314
3331
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.jsx
3332
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.md
3315
3333
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed_swift.md
3316
3334
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_props_swift.md
3335
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.html.erb
3336
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.jsx
3337
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_current_year.md
3338
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.html.erb
3339
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.jsx
3340
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_date.md
3341
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.html.erb
3342
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.jsx
3343
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_show_time.md
3317
3344
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.html.erb
3318
3345
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
3346
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.md
3319
3347
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones_swift.md
3320
3348
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.html.erb
3321
3349
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.jsx
3322
3350
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.md
3323
3351
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.html.erb
3324
3352
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.jsx
3353
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.md
3354
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.html.erb
3355
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.jsx
3356
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_current_year.md
3357
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.html.erb
3358
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.jsx
3359
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_date.md
3360
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.html.erb
3361
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.jsx
3362
+ - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_show_time.md
3325
3363
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_swift.md
3326
3364
  - app/pb_kits/playbook/pb_timestamp/docs/example.yml
3327
3365
  - app/pb_kits/playbook/pb_timestamp/docs/index.js
@@ -3675,13 +3713,12 @@ files:
3675
3713
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3676
3714
  - app/pb_kits/playbook/utilities/text.ts
3677
3715
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3678
- - dist/chunks/_line_graph-DeH7NK-i.js
3679
- - dist/chunks/_typeahead-CCGp0OQe.js
3680
- - dist/chunks/_weekday_stacked-BHLwECdV.js
3681
- - dist/chunks/componentRegistry-DzmmLR2x.js
3716
+ - dist/chunks/_line_graph-CUfJ7E4h.js
3717
+ - dist/chunks/_typeahead-DCp1lVJx.js
3718
+ - dist/chunks/_weekday_stacked-qrsOsOR9.js
3682
3719
  - dist/chunks/lazysizes-B7xYodB-.js
3683
- - dist/chunks/lib-QZuu1ltS.js
3684
- - dist/chunks/pb_form_validation-CleM960_.js
3720
+ - dist/chunks/lib-BTs5acfO.js
3721
+ - dist/chunks/pb_form_validation-CKkaQFX3.js
3685
3722
  - dist/chunks/vendor.js
3686
3723
  - dist/menu.yml
3687
3724
  - dist/playbook-doc.js
@@ -1 +0,0 @@
1
- Use these only to display status updates in areas that has a lot of data.
@@ -1 +0,0 @@
1
- import React__default from"react";import ReactDOM__default from"react-dom";class ComponentRegistry{constructor(){this.components=new Map;this.mountedComponents=new Set;this._mountQueue=new WeakMap}register(name,component){this.components.set(name,component);const kebab=this.toKebabCase(name);if(kebab!==name)this.components.set(kebab,component)}registerComponents(components){Object.entries(components).forEach((([name,comp])=>this.register(name,comp)))}get(name){return this.components.get(name)}mountComponents(root=document){const nodes=root.querySelectorAll("[data-pb-react-component]");nodes.forEach((el=>{if(this.mountedComponents.has(el))return;const name=el.getAttribute("data-pb-react-component");if(!name)return;const Comp=this.get(name);if(!Comp)return;this._scheduleMount(el,Comp)}))}_scheduleMount(el,Comp,immediate=false){let entry=this._mountQueue.get(el);if(!entry){entry={scheduled:false,retries:0};this._mountQueue.set(el,entry)}if(entry.scheduled&&!immediate)return;const run=()=>{entry.scheduled=false;this._tryRender(el,Comp,entry)};entry.scheduled=true;if(immediate){run()}else{requestAnimationFrame(run)}}_tryRender(el,Comp,entry){if(!el.isConnected)return;try{const props=this.extractProps(el);ReactDOM__default.render(React__default.createElement(Comp,props),el);this.mountedComponents.add(el);entry.retries=0}catch(err){entry.retries=(entry.retries||0)+1;if(entry.retries<=3){this._scheduleMount(el,Comp,false)}else{console.warn("[PB] Mount failed after retries:",err)}}}unmountComponents(){this.mountedComponents.forEach((el=>{this._safeUnmount(el)}));this.mountedComponents.clear()}unmountWithin(rootEl){if(!rootEl)return;const toUnmount=[];this.mountedComponents.forEach((el=>{if(rootEl.contains(el))toUnmount.push(el)}));toUnmount.forEach((el=>this._safeUnmount(el)))}_safeUnmount(el){if(!el||!el.isConnected){this.mountedComponents.delete(el);return}try{ReactDOM__default.unmountComponentAtNode(el)}catch(err){console.warn("[PB] Unmount warning:",err)}this.mountedComponents.delete(el)}extractProps(el){const props={};const blob=el.getAttribute("data-pb-react-props");if(blob){try{Object.assign(props,JSON.parse(blob))}catch(e){console.warn("[PB] Failed to parse data-pb-react-props JSON:",e)}}Array.from(el.attributes).forEach((attr=>{const name=attr.name;if(!name.startsWith("data-pb-"))return;if(name==="data-pb-react-component"||name==="data-pb-react-props")return;const key=name.replace("data-pb-","");if(props[key]===void 0)props[key]=attr.value}));return props}toKebabCase(str){return str.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([a-zA-Z])([0-9])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").toLowerCase()}}window.ComponentRegistry=window.ComponentRegistry||new ComponentRegistry;const ComponentRegistry$1=window.ComponentRegistry;export{ComponentRegistry$1 as C};