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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +4 -1
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +175 -26
- data/app/pb_kits/playbook/pb_bar_graph/barGraph.test.js +2 -1
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.html.erb +1 -1
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +78 -12
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb +9 -21
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +10 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +2 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.html.erb +24 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.md +3 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_dropdown/index.js +3 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +2 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.html.erb +22 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.jsx +43 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.md +1 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +2 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +6 -0
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +11 -1
- data/dist/chunks/_line_graph-C17mbReK.js +1 -0
- data/dist/chunks/{_typeahead-CKvqSXWH.js → _typeahead-S1QZZ4ft.js} +2 -2
- data/dist/chunks/{_weekday_stacked-tedYzlIq.js → _weekday_stacked-CbCxfysG.js} +3 -3
- data/dist/chunks/componentRegistry-B0YbRR45.js +1 -0
- data/dist/chunks/lib-7ookneKo.js +34 -0
- data/dist/chunks/{pb_form_validation-CA_noofR.js → pb_form_validation-B-5l-l7v.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +2 -2
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/engine.rb +0 -1
- data/lib/playbook/kit_base.rb +20 -2
- data/lib/playbook/version.rb +1 -1
- metadata +18 -26
- data/dist/chunks/_line_graph-BsZ3DcJo.js +0 -1
- 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};
|