playbook_ui 14.24.0.pre.alpha.play23649503 → 14.24.0.pre.alpha.reactupgradetest9656

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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +4 -1
  3. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +175 -26
  4. data/app/pb_kits/playbook/pb_bar_graph/barGraph.test.js +2 -1
  5. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.html.erb +1 -1
  6. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +78 -12
  7. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb +9 -21
  8. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +10 -1
  9. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +2 -0
  10. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.html.erb +24 -0
  11. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.md +3 -0
  12. data/app/pb_kits/playbook/pb_circle_icon_button/docs/example.yml +1 -0
  13. data/app/pb_kits/playbook/pb_dropdown/index.js +3 -0
  14. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +2 -2
  15. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.html.erb +22 -0
  16. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.jsx +43 -0
  17. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.md +1 -0
  18. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +2 -0
  19. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +1 -0
  20. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +2 -1
  21. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -1
  22. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +6 -0
  23. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +11 -1
  24. data/dist/chunks/_line_graph-C17mbReK.js +1 -0
  25. data/dist/chunks/{_typeahead-CKvqSXWH.js → _typeahead-S1QZZ4ft.js} +2 -2
  26. data/dist/chunks/{_weekday_stacked-tedYzlIq.js → _weekday_stacked-CbCxfysG.js} +3 -3
  27. data/dist/chunks/componentRegistry-B0YbRR45.js +1 -0
  28. data/dist/chunks/lib-7ookneKo.js +34 -0
  29. data/dist/chunks/{pb_form_validation-CA_noofR.js → pb_form_validation-B-5l-l7v.js} +1 -1
  30. data/dist/chunks/vendor.js +1 -1
  31. data/dist/playbook-doc.js +2 -2
  32. data/dist/playbook-rails-react-bindings.js +1 -1
  33. data/dist/playbook-rails.js +1 -1
  34. data/lib/playbook/engine.rb +0 -1
  35. data/lib/playbook/kit_base.rb +20 -2
  36. data/lib/playbook/version.rb +1 -1
  37. metadata +18 -26
  38. data/dist/chunks/_line_graph-BsZ3DcJo.js +0 -1
  39. data/dist/chunks/lib-BplzvaaY.js +0 -29
@@ -0,0 +1 @@
1
+ import React__default from"react";import{g as getDefaultExportFromCjs}from"./lib-7ookneKo.js";import ReactDOM__default from"react-dom";var client={};var hasRequiredClient;function requireClient(){if(hasRequiredClient)return client;hasRequiredClient=1;var m=ReactDOM__default;{client.createRoot=m.createRoot;client.hydrateRoot=m.hydrateRoot}return client}var clientExports=requireClient();const ReactDOM=getDefaultExportFromCjs(clientExports);class ComponentRegistry{constructor(){this.components=new Map;this.mountedComponents=new Set}register(name,component){this.components.set(name,component);const kebabName=this.toKebabCase(name);if(kebabName!==name){this.components.set(kebabName,component)}}registerComponents(components){Object.entries(components).forEach((([name,component])=>{this.register(name,component)}))}get(name){return this.components.get(name)}mountComponents(){document.querySelectorAll("[data-react-component]").forEach((element=>{const componentName=element.getAttribute("data-react-component");const component=this.get(componentName);if(component&&!this.mountedComponents.has(element)){this.mountComponent(element,component)}}))}mountComponent(element,component){if(this.mountedComponents.has(element)){return}try{const props=this.extractProps(element);const root=ReactDOM.createRoot(element);root.render(React__default.createElement(component,props));this.mountedComponents.add(element)}catch(error){console.error("Failed to mount component:",error)}}unmountComponents(){this.mountedComponents.forEach((element=>{if(element._reactRoot){element._reactRoot.unmount()}}));this.mountedComponents.clear()}extractProps(element){const props={};const propsData=element.getAttribute("data-react-props");if(propsData){try{Object.assign(props,JSON.parse(propsData))}catch(e){console.warn("Failed to parse react props:",e)}}Array.from(element.attributes).forEach((attr=>{if(attr.name.startsWith("data-")&&attr.name!=="data-react-component"){const key=attr.name.replace("data-","");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=new ComponentRegistry;const ComponentRegistry$1=window.ComponentRegistry;export{ComponentRegistry$1 as C};