playbook-ui 15.0.0-alpha.PLAY2468phonenuminputvalidation10790 → 15.0.0-alpha.PLAY2473rowhighlightfix10512
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.
- package/dist/.vite/manifest.json +31 -38
- package/dist/chunks/{_line_graph-CspDMr9b.js → _line_graph-BBny-YYZ.js} +1 -1
- package/dist/chunks/{_typeahead-B_wpgm_J.js → _typeahead-CeyJ6-GF.js} +2 -2
- package/dist/chunks/{_weekday_stacked-CXzARuTy.js → _weekday_stacked-BZw0f9oB.js} +3 -3
- package/dist/chunks/{lib-QZuu1ltS.js → lib-BTs5acfO.js} +1 -1
- package/dist/chunks/pb_form_validation-CKkaQFX3.js +1 -0
- package/dist/chunks/vendor.js +1 -1
- package/dist/playbook-doc.js +2 -2
- package/dist/playbook-rails-react-bindings.js +1 -1
- package/dist/playbook-rails.js +1 -1
- package/dist/playbook.css +1 -1
- package/dist/playbook.js +1 -1
- package/package.json +5 -3
- package/dist/chunks/componentRegistry-DzmmLR2x.js +0 -1
- package/dist/chunks/pb_form_validation-W63gNcnu.js +0 -1
package/dist/playbook.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A,a,B,b,C,e,g,D,h,i,k,l,m,n,o,p,q,s,E,F,t,u,v,H,y,I,z,G,J,j,K,O,Q,L,d,R,U,V,W,N,X,Y,Z,$,a0,P,a1,_,a2,a3,S,w,x,a4,r,aj,a5,a6,a7,a8,a9,T,ak,f,aa,ab,ac,ad,M,af,ae,ag,ah,ai}from"./chunks/_weekday_stacked-
|
|
1
|
+
import{A,a,B,b,C,e,g,D,h,i,k,l,m,n,o,p,q,s,E,F,t,u,v,H,y,I,z,G,J,j,K,O,Q,L,d,R,U,V,W,N,X,Y,Z,$,a0,P,a1,_,a2,a3,S,w,x,a4,r,aj,a5,a6,a7,a8,a9,T,ak,f,aa,ab,ac,ad,M,af,ae,ag,ah,ai}from"./chunks/_weekday_stacked-BZw0f9oB.js";import"./chunks/lazysizes-B7xYodB-.js";import{W as W2,V as V2,O as O2,B as B2,w as w2,q as q2,s as s2,n as n2,N as N2,C as C2,r as r2,D as D2,k as k2,Y as Y2,F as F2,t as t2,G as G2,_ as _2,m as m2,A as A2,J as J2,L as L2,M as M2,$ as $2,a0 as a02,a1 as a12,b as b2,P as P2,o as o2,a as a10,X as X2,R as R2,p as p2,E as E2,x as x2,u as u2,T as T2,Z as Z2}from"./chunks/_typeahead-CeyJ6-GF.js";import{B as B3,C as C3,G as G3,L as L3}from"./chunks/_line_graph-BBny-YYZ.js";import{e as e2,k as k3,l as l2,i as i2,j as j2,T as T3,U as U2,c,b as b3,f as f2,V as V3,a as a11,h as h2,W as W3,X as X3,t as t3,u as u3,M as M3,J as J3}from"./chunks/lib-BTs5acfO.js";import"react/jsx-runtime";import"react";import"react-dom";import"react-trix";import"trix";import"react-is";export{A as AdvancedTable,W2 as Avatar,V2 as Background,O2 as Badge,B3 as BarGraph,B2 as Body,a as BreadCrumbItem,B as BreadCrumbs,w2 as Button,b as ButtonToolbar,q2 as Caption,s2 as Card,n2 as Checkbox,C3 as CircleChart,N2 as CircleIconButton,C2 as Collapsible,C as Contact,e as CopyButton,g as Currency,D as DashboardValue,h as Date,i as DatePicker,k as DateRangeInline,l as DateRangeStacked,m as DateStacked,n as DateTime,o as DateTimeStacked,p as DateYearStacked,r2 as Detail,q as Dialog,D2 as DistributionBar,k2 as Draggable,Y2 as DraggableProvider,s as Dropdown,E as EmptyState,F as FileUpload,t as Filter,u as FixedConfirmationToast,F2 as Flex,t2 as FlexItem,v as FormGroup,G2 as FormPill,G3 as Gauge,H as Hashtag,_2 as Highlight,y as HomeAddressStreet,m2 as Icon,I as IconButton,A2 as IconCircle,z as IconStatValue,G as IconValue,J2 as Image,J as LabelPill,j as LabelValue,K as Layout,L2 as Legend,O as Lightbox,L3 as LineGraph,Q as Link,L as List,d as ListItem,R as LoadingInline,U as Map,V as MapCustomButton,W as Message,M2 as MultiLevelSelect,N as MultipleUsers,X as MultipleUsersStacked,$2 as Nav,a02 as NavItem,a12 as OnlineStatus,Y as Overlay,Z as Pagination,b2 as Passphrase,P2 as PbBarGraph,e2 as PbPopover,o2 as PbReactPopover,k3 as PbTable,l2 as PbTextarea,i2 as PbTooltip,j2 as PbTypeahead,$ as Person,a0 as PersonContact,a10 as PhoneNumberInput,P as Pill,a1 as ProgressPills,_ as ProgressSimple,a2 as ProgressStep,a3 as ProgressStepItem,X2 as Radio,R2 as RichTextEditor,p2 as SectionSeparator,S as Select,w as SelectableCard,x as SelectableCardIcon,a4 as SelectableIcon,r as SelectableList,aj as SelectableListItem,a5 as SkeletonLoading,a6 as Source,a7 as StarRating,a8 as StatChange,a9 as StatValue,T as Table,ak as TableRow,E2 as TextInput,f as Textarea,aa as Time,ab as TimeRangeInline,ac as TimeStacked,ad as Timeline,M as Timestamp,x2 as Title,af as TitleCount,ae as TitleDetail,ag as Toggle,u2 as Tooltip,T2 as Typeahead,Z2 as User,ah as UserBadge,ai as WeekdayStacked,T3 as barGraphTheme,U2 as circleChartTheme,c as colors,b3 as datePickerHelper,f2 as formHelper,V3 as gaugeTheme,a11 as highchartsDarkTheme,h2 as highchartsTheme,W3 as lineGraphTheme,X3 as mapTheme,t3 as typography,u3 as useCollapsible,M3 as useDropdown,J3 as usePBCopy};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playbook-ui",
|
|
3
|
-
"version": "15.0.0-alpha.
|
|
3
|
+
"version": "15.0.0-alpha.PLAY2473rowhighlightfix10512",
|
|
4
4
|
"description": "Nitro's Design System",
|
|
5
5
|
"main": "./dist/playbook.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -91,14 +91,16 @@
|
|
|
91
91
|
"typescript": "4.3.5",
|
|
92
92
|
"vite": "6.3.5",
|
|
93
93
|
"vite-bundle-visualizer": "^1.2.1",
|
|
94
|
-
"vite-plugin-ruby": "^5.0.0"
|
|
94
|
+
"vite-plugin-ruby": "^5.0.0",
|
|
95
|
+
"webpacker-react": "^0.3.2"
|
|
95
96
|
},
|
|
96
97
|
"peerDependencies": {
|
|
97
98
|
"react": "^17.0.2",
|
|
98
99
|
"react-dom": "^17.0.2",
|
|
99
100
|
"react-is": "^17.0.2",
|
|
100
101
|
"react-trix": "0.10.1",
|
|
101
|
-
"trix": "1.3.5"
|
|
102
|
+
"trix": "1.3.5",
|
|
103
|
+
"webpacker-react": "^0.3.2"
|
|
102
104
|
},
|
|
103
105
|
"resolutions": {
|
|
104
106
|
"react": "^17.0.2",
|
|
@@ -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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as PbEnhancedElement,d as debounce}from"./lib-QZuu1ltS.js";const KIT_SELECTOR='[class^="pb_"][class*="_kit"]';const ERROR_MESSAGE_SELECTOR=".pb_body_kit_negative";const FORM_SELECTOR='form[data-pb-form-validation="true"]';const REQUIRED_FIELDS_SELECTOR="input[required],textarea[required],select[required]";const PHONE_NUMBER_VALIDATION_ERROR_SELECTOR='[data-pb-phone-validation-error="true"]';const FIELD_EVENTS=["change","valid","invalid"];class PbFormValidation extends PbEnhancedElement{static get selector(){return FORM_SELECTOR}connect(){this.formValidationFields.forEach((field=>{FIELD_EVENTS.forEach((e=>{field.addEventListener(e,debounce((event=>{this.validateFormField(event)}),250),false)}))}));this.element.addEventListener("submit",(event=>{if(this.hasPhoneNumberValidationErrors()){event.preventDefault();return false}}))}validateFormField(event){event.preventDefault();const{target:target}=event;target.setCustomValidity("");const isValid=event.target.validity.valid;if(isValid){this.clearError(target)}else{this.showValidationMessage(target)}}showValidationMessage(target){const{parentElement:parentElement}=target;this.clearError(target);parentElement.closest(KIT_SELECTOR).classList.add("error");const errorMessageContainer=this.errorMessageContainer;if(target.dataset.message)target.setCustomValidity(target.dataset.message);errorMessageContainer.innerHTML=target.validationMessage;parentElement.appendChild(errorMessageContainer)}clearError(target){const{parentElement:parentElement}=target;parentElement.closest(KIT_SELECTOR).classList.remove("error");const errorMessageContainer=parentElement.querySelector(ERROR_MESSAGE_SELECTOR);if(errorMessageContainer)errorMessageContainer.remove()}hasPhoneNumberValidationErrors(){const phoneNumberErrors=this.element.querySelectorAll(PHONE_NUMBER_VALIDATION_ERROR_SELECTOR);return phoneNumberErrors.length>0}get errorMessageContainer(){const errorContainer=document.createElement("div");const kitClassName=ERROR_MESSAGE_SELECTOR.replace(/\./,"");errorContainer.classList.add(kitClassName);return errorContainer}get formValidationFields(){return this._formValidationFields=this._formValidationFields||this.element.querySelectorAll(REQUIRED_FIELDS_SELECTOR)}}window.PbFormValidation=PbFormValidation;
|