playbook-ui 17.2.0-rc.2 → 17.2.0-rc.3
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 +4 -4
- package/dist/advanced-table.js +1 -1
- package/dist/ai/all-schemas.json +23 -1
- package/dist/ai/external-dependencies.json +1 -1
- package/dist/ai/index.json +5 -3
- package/dist/ai/kits/multi_level_select.schema.json +6 -0
- package/dist/ai/kits/rich_text_editor.schema.json +11 -1
- package/dist/ai/kits/table.schema.json +6 -0
- package/dist/ai/playgrounds/index.json +1 -1
- package/dist/ai/playgrounds/multi_level_select.json +1 -1
- package/dist/ai/playgrounds/rich_text_editor.json +1 -1
- package/dist/ai/playgrounds/table.json +1 -1
- package/dist/chunks/{_table-SGw4kUye.js → _table-CUU7TisO.js} +1 -1
- package/dist/chunks/vendor.js +2 -2
- package/dist/playbook-advanced-table.js +1 -1
- package/dist/playbook.js +1 -1
- package/package.json +4 -2
package/dist/.vite/manifest.json
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"_lib-7vm9BMqp.js"
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
|
-
"__table-
|
|
23
|
-
"file": "chunks/_table-
|
|
22
|
+
"__table-CUU7TisO.js": {
|
|
23
|
+
"file": "chunks/_table-CUU7TisO.js",
|
|
24
24
|
"name": "_table",
|
|
25
25
|
"imports": [
|
|
26
26
|
"__detail-B4-co8rv.js",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"entrypoints/playbook-advanced-table.js",
|
|
76
76
|
"_globalProps-K1DCn3il.js",
|
|
77
77
|
"_lib-7vm9BMqp.js",
|
|
78
|
-
"__table-
|
|
78
|
+
"__table-CUU7TisO.js",
|
|
79
79
|
"__detail-B4-co8rv.js",
|
|
80
80
|
"_StickyLayoutHelper-DCzCcWUN.js"
|
|
81
81
|
]
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"__detail-B4-co8rv.js",
|
|
142
142
|
"__typeahead-DeIqOMbJ.js",
|
|
143
143
|
"entrypoints/playbook.js",
|
|
144
|
-
"__table-
|
|
144
|
+
"__table-CUU7TisO.js",
|
|
145
145
|
"_lib-7vm9BMqp.js",
|
|
146
146
|
"_globalProps-K1DCn3il.js",
|
|
147
147
|
"_time_picker_helper-BZutIzB3.js"
|
package/dist/advanced-table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx,jsxs,Fragment}from"react/jsx-runtime";import*as React from"react";import React__default,{createContext,useRef,useState,useCallback,useEffect,useMemo,useContext,useLayoutEffect}from"react";import{d as classnames,e as buildCss,g as globalProps,b as buildAriaProps,a as buildDataProps,c as buildHtmlProps}from"./chunks/globalProps-K1DCn3il.js";import{C as Checkbox,P as PbReactPopover,S as SectionSeparator,L as LoadingInline,a as Pagination,F as FlexItem,T as Table}from"./chunks/_table-SGw4kUye.js";import{flushSync}from"react-dom";import{m as measureElementHeight,s as scheduleStickyActionBarHeightUpdate,b as updateStickyLayoutHeights}from"./chunks/StickyLayoutHelper-DCzCcWUN.js";import{I as Icon,F as Flex,C as Caption,D as Detail,a as Card,T as Tooltip}from"./chunks/_detail-B4-co8rv.js";import"./chunks/lib-7vm9BMqp.js";function memo$1(getDeps,fn,opts){let deps=opts.initialDeps??[];let result;return()=>{var _a,_b,_c,_d;let depTime;if(opts.key&&((_a=opts.debug)==null?void 0:_a.call(opts)))depTime=Date.now();const newDeps=getDeps();const depsChanged=newDeps.length!==deps.length||newDeps.some(((dep,index)=>deps[index]!==dep));if(!depsChanged){return result}deps=newDeps;let resultTime;if(opts.key&&((_b=opts.debug)==null?void 0:_b.call(opts)))resultTime=Date.now();result=fn(...newDeps);if(opts.key&&((_c=opts.debug)==null?void 0:_c.call(opts))){const depEndTime=Math.round((Date.now()-depTime)*100)/100;const resultEndTime=Math.round((Date.now()-resultTime)*100)/100;const resultFpsPercentage=resultEndTime/16;const pad=(str,num)=>{str=String(str);while(str.length<num){str=" "+str}return str};console.info(`%c⏱ ${pad(resultEndTime,5)} /${pad(depEndTime,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*resultFpsPercentage,120))}deg 100% 31%);`,opts==null?void 0:opts.key)}(_d=opts==null?void 0:opts.onChange)==null?void 0:_d.call(opts,result);return result}}function notUndefined(value,msg){if(value===void 0){throw new Error(`Unexpected undefined${""}`)}else{return value}}const approxEqual=(a,b)=>Math.abs(a-b)<1;const debounce=(targetWindow,fn,ms)=>{let timeoutId;return function(...args){targetWindow.clearTimeout(timeoutId);timeoutId=targetWindow.setTimeout((()=>fn.apply(this,args)),ms)}};const defaultKeyExtractor=index=>index;const defaultRangeExtractor=range=>{const start=Math.max(range.startIndex-range.overscan,0);const end=Math.min(range.endIndex+range.overscan,range.count-1);const arr=[];for(let i=start;i<=end;i++){arr.push(i)}return arr};const observeElementRect=(instance,cb)=>{const element=instance.scrollElement;if(!element){return}const targetWindow=instance.targetWindow;if(!targetWindow){return}const handler=rect=>{const{width:width,height:height}=rect;cb({width:Math.round(width),height:Math.round(height)})};handler(element.getBoundingClientRect());if(!targetWindow.ResizeObserver){return()=>{}}const observer=new targetWindow.ResizeObserver((entries=>{const run=()=>{const entry=entries[0];if(entry==null?void 0:entry.borderBoxSize){const box=entry.borderBoxSize[0];if(box){handler({width:box.inlineSize,height:box.blockSize});return}}handler(element.getBoundingClientRect())};instance.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()}));observer.observe(element,{box:"border-box"});return()=>{observer.unobserve(element)}};const addEventListenerOptions={passive:true};const supportsScrollend=typeof window=="undefined"?true:"onscrollend"in window;const observeElementOffset=(instance,cb)=>{const element=instance.scrollElement;if(!element){return}const targetWindow=instance.targetWindow;if(!targetWindow){return}let offset=0;const fallback=instance.options.useScrollendEvent&&supportsScrollend?()=>void 0:debounce(targetWindow,(()=>{cb(offset,false)}),instance.options.isScrollingResetDelay);const createHandler=isScrolling=>()=>{const{horizontal:horizontal,isRtl:isRtl}=instance.options;offset=horizontal?element["scrollLeft"]*(isRtl&&-1||1):element["scrollTop"];fallback();cb(offset,isScrolling)};const handler=createHandler(true);const endHandler=createHandler(false);endHandler();element.addEventListener("scroll",handler,addEventListenerOptions);const registerScrollendEvent=instance.options.useScrollendEvent&&supportsScrollend;if(registerScrollendEvent){element.addEventListener("scrollend",endHandler,addEventListenerOptions)}return()=>{element.removeEventListener("scroll",handler);if(registerScrollendEvent){element.removeEventListener("scrollend",endHandler)}}};const measureElement=(element,entry,instance)=>{if(entry==null?void 0:entry.borderBoxSize){const box=entry.borderBoxSize[0];if(box){const size=Math.round(box[instance.options.horizontal?"inlineSize":"blockSize"]);return size}}return Math.round(element.getBoundingClientRect()[instance.options.horizontal?"width":"height"])};const elementScroll=(offset,{adjustments:adjustments=0,behavior:behavior},instance)=>{var _a,_b;const toOffset=offset+adjustments;(_b=(_a=instance.scrollElement)==null?void 0:_a.scrollTo)==null?void 0:_b.call(_a,{[instance.options.horizontal?"left":"top"]:toOffset,behavior:behavior})};class Virtualizer{constructor(opts){this.unsubs=[];this.scrollElement=null;this.targetWindow=null;this.isScrolling=false;this.scrollToIndexTimeoutId=null;this.measurementsCache=[];this.itemSizeCache=new Map;this.pendingMeasuredCacheIndexes=[];this.scrollRect=null;this.scrollOffset=null;this.scrollDirection=null;this.scrollAdjustments=0;this.elementsCache=new Map;this.observer=(()=>{let _ro=null;const get=()=>{if(_ro){return _ro}if(!this.targetWindow||!this.targetWindow.ResizeObserver){return null}return _ro=new this.targetWindow.ResizeObserver((entries=>{entries.forEach((entry=>{const run=()=>{this._measureElement(entry.target,entry)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()}))}))};return{disconnect:()=>{var _a;(_a=get())==null?void 0:_a.disconnect();_ro=null},observe:target=>{var _a;return(_a=get())==null?void 0:_a.observe(target,{box:"border-box"})},unobserve:target=>{var _a;return(_a=get())==null?void 0:_a.unobserve(target)}}})();this.range=null;this.setOptions=opts2=>{Object.entries(opts2).forEach((([key,value])=>{if(typeof value==="undefined")delete opts2[key]}));this.options={debug:false,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:false,getItemKey:defaultKeyExtractor,rangeExtractor:defaultRangeExtractor,onChange:()=>{},measureElement:measureElement,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:true,isRtl:false,useScrollendEvent:true,useAnimationFrameWithResizeObserver:false,...opts2}};this.notify=sync=>{var _a,_b;(_b=(_a=this.options).onChange)==null?void 0:_b.call(_a,this,sync)};this.maybeNotify=memo$1((()=>{this.calculateRange();return[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),(isScrolling=>{this.notify(isScrolling)}),{key:false,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]});this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((d=>d()));this.unsubs=[];this.observer.disconnect();this.scrollElement=null;this.targetWindow=null};this._didMount=()=>()=>{this.cleanup()};this._willUpdate=()=>{var _a;const scrollElement=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==scrollElement){this.cleanup();if(!scrollElement){this.maybeNotify();return}this.scrollElement=scrollElement;if(this.scrollElement&&"ownerDocument"in this.scrollElement){this.targetWindow=this.scrollElement.ownerDocument.defaultView}else{this.targetWindow=((_a=this.scrollElement)==null?void 0:_a.window)??null}this.elementsCache.forEach((cached=>{this.observer.observe(cached)}));this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0});this.unsubs.push(this.options.observeElementRect(this,(rect=>{this.scrollRect=rect;this.maybeNotify()})));this.unsubs.push(this.options.observeElementOffset(this,((offset,isScrolling)=>{this.scrollAdjustments=0;this.scrollDirection=isScrolling?this.getScrollOffset()<offset?"forward":"backward":null;this.scrollOffset=offset;this.isScrolling=isScrolling;this.maybeNotify()})))}};this.getSize=()=>{if(!this.options.enabled){this.scrollRect=null;return 0}this.scrollRect=this.scrollRect??this.options.initialRect;return this.scrollRect[this.options.horizontal?"width":"height"]};this.getScrollOffset=()=>{if(!this.options.enabled){this.scrollOffset=null;return 0}this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==="function"?this.options.initialOffset():this.options.initialOffset);return this.scrollOffset};this.getFurthestMeasurement=(measurements,index)=>{const furthestMeasurementsFound=new Map;const furthestMeasurements=new Map;for(let m=index-1;m>=0;m--){const measurement=measurements[m];if(furthestMeasurementsFound.has(measurement.lane)){continue}const previousFurthestMeasurement=furthestMeasurements.get(measurement.lane);if(previousFurthestMeasurement==null||measurement.end>previousFurthestMeasurement.end){furthestMeasurements.set(measurement.lane,measurement)}else if(measurement.end<previousFurthestMeasurement.end){furthestMeasurementsFound.set(measurement.lane,true)}if(furthestMeasurementsFound.size===this.options.lanes){break}}return furthestMeasurements.size===this.options.lanes?Array.from(furthestMeasurements.values()).sort(((a,b)=>{if(a.end===b.end){return a.index-b.index}return a.end-b.end}))[0]:void 0};this.getMeasurementOptions=memo$1((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((count2,paddingStart,scrollMargin,getItemKey,enabled)=>{this.pendingMeasuredCacheIndexes=[];return{count:count2,paddingStart:paddingStart,scrollMargin:scrollMargin,getItemKey:getItemKey,enabled:enabled}}),{key:false});this.getMeasurements=memo$1((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:count2,paddingStart:paddingStart,scrollMargin:scrollMargin,getItemKey:getItemKey,enabled:enabled},itemSizeCache)=>{if(!enabled){this.measurementsCache=[];this.itemSizeCache.clear();return[]}if(this.measurementsCache.length===0){this.measurementsCache=this.options.initialMeasurementsCache;this.measurementsCache.forEach((item=>{this.itemSizeCache.set(item.key,item.size)}))}const min2=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const measurements=this.measurementsCache.slice(0,min2);for(let i=min2;i<count2;i++){const key=getItemKey(i);const furthestMeasurement=this.options.lanes===1?measurements[i-1]:this.getFurthestMeasurement(measurements,i);const start=furthestMeasurement?furthestMeasurement.end+this.options.gap:paddingStart+scrollMargin;const measuredSize=itemSizeCache.get(key);const size=typeof measuredSize==="number"?measuredSize:this.options.estimateSize(i);const end=start+size;const lane=furthestMeasurement?furthestMeasurement.lane:i%this.options.lanes;measurements[i]={index:i,start:start,size:size,end:end,key:key,lane:lane}}this.measurementsCache=measurements;return measurements}),{key:false,debug:()=>this.options.debug});this.calculateRange=memo$1((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((measurements,outerSize,scrollOffset)=>this.range=measurements.length>0&&outerSize>0?calculateRange({measurements:measurements,outerSize:outerSize,scrollOffset:scrollOffset}):null),{key:false,debug:()=>this.options.debug});this.getVirtualIndexes=memo$1((()=>{let startIndex=null;let endIndex=null;const range=this.calculateRange();if(range){startIndex=range.startIndex;endIndex=range.endIndex}return[this.options.rangeExtractor,this.options.overscan,this.options.count,startIndex,endIndex]}),((rangeExtractor,overscan,count2,startIndex,endIndex)=>startIndex===null||endIndex===null?[]:rangeExtractor({startIndex:startIndex,endIndex:endIndex,overscan:overscan,count:count2})),{key:false,debug:()=>this.options.debug});this.indexFromElement=node=>{const attributeName=this.options.indexAttribute;const indexStr=node.getAttribute(attributeName);if(!indexStr){console.warn(`Missing attribute name '${attributeName}={index}' on measured element.`);return-1}return parseInt(indexStr,10)};this._measureElement=(node,entry)=>{const index=this.indexFromElement(node);const item=this.measurementsCache[index];if(!item){return}const key=item.key;const prevNode=this.elementsCache.get(key);if(prevNode!==node){if(prevNode){this.observer.unobserve(prevNode)}this.observer.observe(node);this.elementsCache.set(key,node)}if(node.isConnected){this.resizeItem(index,this.options.measureElement(node,entry,this))}};this.resizeItem=(index,size)=>{const item=this.measurementsCache[index];if(!item){return}const itemSize=this.itemSizeCache.get(item.key)??item.size;const delta=size-itemSize;if(delta!==0){if(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(item,delta,this):item.start<this.getScrollOffset()+this.scrollAdjustments){this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=delta,behavior:void 0})}this.pendingMeasuredCacheIndexes.push(item.index);this.itemSizeCache=new Map(this.itemSizeCache.set(item.key,size));this.notify(false)}};this.measureElement=node=>{if(!node){this.elementsCache.forEach(((cached,key)=>{if(!cached.isConnected){this.observer.unobserve(cached);this.elementsCache.delete(key)}}));return}this._measureElement(node,void 0)};this.getVirtualItems=memo$1((()=>[this.getVirtualIndexes(),this.getMeasurements()]),((indexes,measurements)=>{const virtualItems=[];for(let k=0,len=indexes.length;k<len;k++){const i=indexes[k];const measurement=measurements[i];virtualItems.push(measurement)}return virtualItems}),{key:false,debug:()=>this.options.debug});this.getVirtualItemForOffset=offset=>{const measurements=this.getMeasurements();if(measurements.length===0){return void 0}return notUndefined(measurements[findNearestBinarySearch(0,measurements.length-1,(index=>notUndefined(measurements[index]).start),offset)])};this.getOffsetForAlignment=(toOffset,align)=>{const size=this.getSize();const scrollOffset=this.getScrollOffset();if(align==="auto"){if(toOffset>=scrollOffset+size){align="end"}}if(align==="end"){toOffset-=size}const scrollSizeProp=this.options.horizontal?"scrollWidth":"scrollHeight";const scrollSize=this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[scrollSizeProp]:this.scrollElement[scrollSizeProp]:0;const maxOffset=scrollSize-size;return Math.max(Math.min(maxOffset,toOffset),0)};this.getOffsetForIndex=(index,align="auto")=>{index=Math.max(0,Math.min(index,this.options.count-1));const item=this.measurementsCache[index];if(!item){return void 0}const size=this.getSize();const scrollOffset=this.getScrollOffset();if(align==="auto"){if(item.end>=scrollOffset+size-this.options.scrollPaddingEnd){align="end"}else if(item.start<=scrollOffset+this.options.scrollPaddingStart){align="start"}else{return[scrollOffset,align]}}const centerOffset=item.start-this.options.scrollPaddingStart+(item.size-size)/2;switch(align){case"center":return[this.getOffsetForAlignment(centerOffset,align),align];case"end":return[this.getOffsetForAlignment(item.end+this.options.scrollPaddingEnd,align),align];default:return[this.getOffsetForAlignment(item.start-this.options.scrollPaddingStart,align),align]}};this.isDynamicMode=()=>this.elementsCache.size>0;this.cancelScrollToIndex=()=>{if(this.scrollToIndexTimeoutId!==null&&this.targetWindow){this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId);this.scrollToIndexTimeoutId=null}};this.scrollToOffset=(toOffset,{align:align="start",behavior:behavior}={})=>{this.cancelScrollToIndex();if(behavior==="smooth"&&this.isDynamicMode()){console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.")}this._scrollToOffset(this.getOffsetForAlignment(toOffset,align),{adjustments:void 0,behavior:behavior})};this.scrollToIndex=(index,{align:initialAlign="auto",behavior:behavior}={})=>{index=Math.max(0,Math.min(index,this.options.count-1));this.cancelScrollToIndex();if(behavior==="smooth"&&this.isDynamicMode()){console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.")}const offsetAndAlign=this.getOffsetForIndex(index,initialAlign);if(!offsetAndAlign)return;const[offset,align]=offsetAndAlign;this._scrollToOffset(offset,{adjustments:void 0,behavior:behavior});if(behavior!=="smooth"&&this.isDynamicMode()&&this.targetWindow){this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{this.scrollToIndexTimeoutId=null;const elementInDOM=this.elementsCache.has(this.options.getItemKey(index));if(elementInDOM){const[latestOffset]=notUndefined(this.getOffsetForIndex(index,align));if(!approxEqual(latestOffset,this.getScrollOffset())){this.scrollToIndex(index,{align:align,behavior:behavior})}}else{this.scrollToIndex(index,{align:align,behavior:behavior})}}))}};this.scrollBy=(delta,{behavior:behavior}={})=>{this.cancelScrollToIndex();if(behavior==="smooth"&&this.isDynamicMode()){console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.")}this._scrollToOffset(this.getScrollOffset()+delta,{adjustments:void 0,behavior:behavior})};this.getTotalSize=()=>{var _a;const measurements=this.getMeasurements();let end;if(measurements.length===0){end=this.options.paddingStart}else{end=this.options.lanes===1?((_a=measurements[measurements.length-1])==null?void 0:_a.end)??0:Math.max(...measurements.slice(-this.options.lanes).map((m=>m.end)))}return Math.max(end-this.options.scrollMargin+this.options.paddingEnd,0)};this._scrollToOffset=(offset,{adjustments:adjustments,behavior:behavior})=>{this.options.scrollToFn(offset,{behavior:behavior,adjustments:adjustments},this)};this.measure=()=>{this.itemSizeCache=new Map;this.notify(false)};this.setOptions(opts)}}const findNearestBinarySearch=(low,high,getCurrentValue,value)=>{while(low<=high){const middle=(low+high)/2|0;const currentValue=getCurrentValue(middle);if(currentValue<value){low=middle+1}else if(currentValue>value){high=middle-1}else{return middle}}if(low>0){return low-1}else{return 0}};function calculateRange({measurements:measurements,outerSize:outerSize,scrollOffset:scrollOffset}){const count2=measurements.length-1;const getOffset=index=>measurements[index].start;const startIndex=findNearestBinarySearch(0,count2,getOffset,scrollOffset);let endIndex=startIndex;while(endIndex<count2&&measurements[endIndex].end<scrollOffset+outerSize){endIndex++}return{startIndex:startIndex,endIndex:endIndex}}const useIsomorphicLayoutEffect=typeof document!=="undefined"?React.useLayoutEffect:React.useEffect;function useVirtualizerBase(options){const rerender=React.useReducer((()=>({})),{})[1];const resolvedOptions={...options,onChange:(instance2,sync)=>{var _a;if(sync){flushSync(rerender)}else{rerender()}(_a=options.onChange)==null?void 0:_a.call(options,instance2,sync)}};const[instance]=React.useState((()=>new Virtualizer(resolvedOptions)));instance.setOptions(resolvedOptions);useIsomorphicLayoutEffect((()=>instance._didMount()),[]);useIsomorphicLayoutEffect((()=>instance._willUpdate()));return instance}function useVirtualizer(options){return useVirtualizerBase({observeElementRect:observeElementRect,observeElementOffset:observeElementOffset,scrollToFn:elementScroll,...options})}const getVirtualizedContainerStyles=maxHeight=>{let heightValue="600px";if(maxHeight){switch(maxHeight){case"xs":heightValue="200px";break;case"sm":heightValue="300px";break;case"md":heightValue="400px";break;case"lg":heightValue="500px";break;case"xl":heightValue="600px";break;case"xxl":heightValue="700px";break;case"xxxl":heightValue="800px";break;default:if(maxHeight!=="auto"){heightValue=maxHeight}}}return{overflow:"auto",position:"relative",height:heightValue,width:"100%"}};const getVirtualizedRowStyle=startPosition=>({position:"absolute",top:0,left:0,height:"40px",transform:`translateY(${startPosition}px)`,tableLayout:"fixed"});const getRowHeightEstimate=rowType=>{switch(rowType){case"header":return 40;case"loading":return 30;case"footer":return 40;case"row":default:return 40}};const AdvancedTableContext=createContext({});const AdvancedTableProvider=({children:children,...props})=>{var _a;const tableContainerRef=useRef(null);const containerRef=props.tableContainerRef||tableContainerRef;const table=props.table;const isVirtualized=props.virtualizedRows||props.enableVirtualization;const headerRef=useRef(null);const sampleRowRef=useRef(null);const[headerHeight,setHeaderHeight]=useState(44);const[rowHeight,setRowHeight]=useState(38);const[actionBarHeight,setActionBarHeight]=useState(0);const measureHeights=useCallback((()=>{var _a2;const wrapper=((_a2=props.tableContainerRef)==null?void 0:_a2.current)||tableContainerRef.current;if(headerRef.current){const headerElement=headerRef.current;const headerRect=headerElement.getBoundingClientRect();if(headerRect.height>0){setHeaderHeight(headerRect.height)}}if(sampleRowRef.current){const rowRect=sampleRowRef.current.getBoundingClientRect();if(rowRect.height>0){setRowHeight(rowRect.height)}}if(wrapper){const actionBar=wrapper.querySelector(".row-selection-actions-card.is-visible, .row-selection-actions-card.show-action-card");const measuredActionBarHeight=actionBar?measureElementHeight(actionBar):0;setActionBarHeight(measuredActionBarHeight);wrapper.style.setProperty("--advanced-table-action-bar-height",`${measuredActionBarHeight}px`)}}),[props.tableContainerRef]);useEffect((()=>{var _a2;const resizeObserver=new ResizeObserver((()=>{measureHeights()}));if(headerRef.current){resizeObserver.observe(headerRef.current)}const wrapper=((_a2=props.tableContainerRef)==null?void 0:_a2.current)||tableContainerRef.current;const actionBar=wrapper==null?void 0:wrapper.querySelector(".row-selection-actions-card");if(actionBar){resizeObserver.observe(actionBar)}if(sampleRowRef.current){resizeObserver.observe(sampleRowRef.current)}const timeoutId=setTimeout(measureHeights,100);return()=>{resizeObserver.disconnect();clearTimeout(timeoutId)}}),[measureHeights]);const headerGroupCount=((_a=table==null?void 0:table.getHeaderGroups())==null?void 0:_a.length)??0;useEffect((()=>{measureHeights()}),[table==null?void 0:table.getRowModel().rows.length,headerGroupCount,props.isActionBarVisible,measureHeights]);const flattenedItems=useMemo((()=>{if(!isVirtualized||!table){return[]}const tableRows=table.getRowModel().rows;const items=[];const subRowHeaders=props.subRowHeaders;const inlineRowLoading=props.inlineRowLoading;const columnDefinitions=props.columnDefinitions;tableRows.forEach(((row,index)=>{var _a2,_b,_c;const isFirstChildofSubrow=row.depth>0&&row.index===0;if(isFirstChildofSubrow&&subRowHeaders){items.push({type:"header",row:row,id:`header-${row.id}-${index}`})}items.push({type:"row",row:row,id:`row-${row.id}-${index}`});const isExpandable=row.getIsExpanded();const rowHasNoChildren=((_a2=row.original)==null?void 0:_a2.children)&&!row.original.children.length?true:false;const isDataLoading=isExpandable&&(inlineRowLoading&&rowHasNoChildren)&&row.depth<(((_c=(_b=columnDefinitions[0])==null?void 0:_b.cellAccessors)==null?void 0:_c.length)||0);if(isDataLoading){items.push({type:"loading",row:row,id:`loading-${row.id}-${index}`})}}));const isFetching=props.isFetching||false;const shouldAddFooter=table&&!isFetching&&tableRows.length>0;if(shouldAddFooter){items.push({type:"footer",row:{},id:`footer-row`})}return items}),[isVirtualized,table,props.subRowHeaders,props.inlineRowLoading,props.columnDefinitions,table==null?void 0:table.getRowModel().rows.length,JSON.stringify((table==null?void 0:table.getState().sorting)||[]),JSON.stringify((table==null?void 0:table.getState().expanded)||{})]);const virtualizer=useVirtualizer({count:isVirtualized&&flattenedItems.length>0?flattenedItems.length:0,getScrollElement:()=>containerRef.current,estimateSize:index=>{if(!isVirtualized||flattenedItems.length===0)return 0;const item=flattenedItems[index];if(!item)return getRowHeightEstimate("row");return getRowHeightEstimate(item.type)},overscan:10,getItemKey:index=>{var _a2;if(!isVirtualized||flattenedItems.length===0||index>=flattenedItems.length){return`item-${index}`}return((_a2=flattenedItems[index])==null?void 0:_a2.id)||`item-${index}`}});useEffect((()=>{if(isVirtualized&&virtualizer&&table&&containerRef.current){virtualizer.setOptions({...virtualizer.options,count:flattenedItems.length});virtualizer.measure()}}),[isVirtualized,virtualizer,table,containerRef,JSON.stringify((table==null?void 0:table.getState().sorting)||[]),JSON.stringify((table==null?void 0:table.getState().expanded)||{}),flattenedItems.length]);const contextValue={...props,table:table,tableContainerRef:containerRef,virtualizer:isVirtualized?virtualizer:null,flattenedItems:flattenedItems,virtualizedRows:isVirtualized,enableVirtualization:isVirtualized,rowPinning:props.rowPinning,setRowPinning:props.setRowPinning,keepPinnedRows:props.keepPinnedRows,headerHeight:headerHeight,rowHeight:rowHeight,actionBarHeight:actionBarHeight,headerRef:headerRef,sampleRowRef:sampleRowRef,measureHeights:measureHeights};return jsx(AdvancedTableContext.Provider,{value:contextValue,children:children})};
|
|
1
|
+
import{jsx,jsxs,Fragment}from"react/jsx-runtime";import*as React from"react";import React__default,{createContext,useRef,useState,useCallback,useEffect,useMemo,useContext,useLayoutEffect}from"react";import{d as classnames,e as buildCss,g as globalProps,b as buildAriaProps,a as buildDataProps,c as buildHtmlProps}from"./chunks/globalProps-K1DCn3il.js";import{C as Checkbox,P as PbReactPopover,S as SectionSeparator,L as LoadingInline,a as Pagination,F as FlexItem,T as Table}from"./chunks/_table-CUU7TisO.js";import{flushSync}from"react-dom";import{m as measureElementHeight,s as scheduleStickyActionBarHeightUpdate,b as updateStickyLayoutHeights}from"./chunks/StickyLayoutHelper-DCzCcWUN.js";import{I as Icon,F as Flex,C as Caption,D as Detail,a as Card,T as Tooltip}from"./chunks/_detail-B4-co8rv.js";import"./chunks/lib-7vm9BMqp.js";function memo$1(getDeps,fn,opts){let deps=opts.initialDeps??[];let result;return()=>{var _a,_b,_c,_d;let depTime;if(opts.key&&((_a=opts.debug)==null?void 0:_a.call(opts)))depTime=Date.now();const newDeps=getDeps();const depsChanged=newDeps.length!==deps.length||newDeps.some(((dep,index)=>deps[index]!==dep));if(!depsChanged){return result}deps=newDeps;let resultTime;if(opts.key&&((_b=opts.debug)==null?void 0:_b.call(opts)))resultTime=Date.now();result=fn(...newDeps);if(opts.key&&((_c=opts.debug)==null?void 0:_c.call(opts))){const depEndTime=Math.round((Date.now()-depTime)*100)/100;const resultEndTime=Math.round((Date.now()-resultTime)*100)/100;const resultFpsPercentage=resultEndTime/16;const pad=(str,num)=>{str=String(str);while(str.length<num){str=" "+str}return str};console.info(`%c⏱ ${pad(resultEndTime,5)} /${pad(depEndTime,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*resultFpsPercentage,120))}deg 100% 31%);`,opts==null?void 0:opts.key)}(_d=opts==null?void 0:opts.onChange)==null?void 0:_d.call(opts,result);return result}}function notUndefined(value,msg){if(value===void 0){throw new Error(`Unexpected undefined${""}`)}else{return value}}const approxEqual=(a,b)=>Math.abs(a-b)<1;const debounce=(targetWindow,fn,ms)=>{let timeoutId;return function(...args){targetWindow.clearTimeout(timeoutId);timeoutId=targetWindow.setTimeout((()=>fn.apply(this,args)),ms)}};const defaultKeyExtractor=index=>index;const defaultRangeExtractor=range=>{const start=Math.max(range.startIndex-range.overscan,0);const end=Math.min(range.endIndex+range.overscan,range.count-1);const arr=[];for(let i=start;i<=end;i++){arr.push(i)}return arr};const observeElementRect=(instance,cb)=>{const element=instance.scrollElement;if(!element){return}const targetWindow=instance.targetWindow;if(!targetWindow){return}const handler=rect=>{const{width:width,height:height}=rect;cb({width:Math.round(width),height:Math.round(height)})};handler(element.getBoundingClientRect());if(!targetWindow.ResizeObserver){return()=>{}}const observer=new targetWindow.ResizeObserver((entries=>{const run=()=>{const entry=entries[0];if(entry==null?void 0:entry.borderBoxSize){const box=entry.borderBoxSize[0];if(box){handler({width:box.inlineSize,height:box.blockSize});return}}handler(element.getBoundingClientRect())};instance.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()}));observer.observe(element,{box:"border-box"});return()=>{observer.unobserve(element)}};const addEventListenerOptions={passive:true};const supportsScrollend=typeof window=="undefined"?true:"onscrollend"in window;const observeElementOffset=(instance,cb)=>{const element=instance.scrollElement;if(!element){return}const targetWindow=instance.targetWindow;if(!targetWindow){return}let offset=0;const fallback=instance.options.useScrollendEvent&&supportsScrollend?()=>void 0:debounce(targetWindow,(()=>{cb(offset,false)}),instance.options.isScrollingResetDelay);const createHandler=isScrolling=>()=>{const{horizontal:horizontal,isRtl:isRtl}=instance.options;offset=horizontal?element["scrollLeft"]*(isRtl&&-1||1):element["scrollTop"];fallback();cb(offset,isScrolling)};const handler=createHandler(true);const endHandler=createHandler(false);endHandler();element.addEventListener("scroll",handler,addEventListenerOptions);const registerScrollendEvent=instance.options.useScrollendEvent&&supportsScrollend;if(registerScrollendEvent){element.addEventListener("scrollend",endHandler,addEventListenerOptions)}return()=>{element.removeEventListener("scroll",handler);if(registerScrollendEvent){element.removeEventListener("scrollend",endHandler)}}};const measureElement=(element,entry,instance)=>{if(entry==null?void 0:entry.borderBoxSize){const box=entry.borderBoxSize[0];if(box){const size=Math.round(box[instance.options.horizontal?"inlineSize":"blockSize"]);return size}}return Math.round(element.getBoundingClientRect()[instance.options.horizontal?"width":"height"])};const elementScroll=(offset,{adjustments:adjustments=0,behavior:behavior},instance)=>{var _a,_b;const toOffset=offset+adjustments;(_b=(_a=instance.scrollElement)==null?void 0:_a.scrollTo)==null?void 0:_b.call(_a,{[instance.options.horizontal?"left":"top"]:toOffset,behavior:behavior})};class Virtualizer{constructor(opts){this.unsubs=[];this.scrollElement=null;this.targetWindow=null;this.isScrolling=false;this.scrollToIndexTimeoutId=null;this.measurementsCache=[];this.itemSizeCache=new Map;this.pendingMeasuredCacheIndexes=[];this.scrollRect=null;this.scrollOffset=null;this.scrollDirection=null;this.scrollAdjustments=0;this.elementsCache=new Map;this.observer=(()=>{let _ro=null;const get=()=>{if(_ro){return _ro}if(!this.targetWindow||!this.targetWindow.ResizeObserver){return null}return _ro=new this.targetWindow.ResizeObserver((entries=>{entries.forEach((entry=>{const run=()=>{this._measureElement(entry.target,entry)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()}))}))};return{disconnect:()=>{var _a;(_a=get())==null?void 0:_a.disconnect();_ro=null},observe:target=>{var _a;return(_a=get())==null?void 0:_a.observe(target,{box:"border-box"})},unobserve:target=>{var _a;return(_a=get())==null?void 0:_a.unobserve(target)}}})();this.range=null;this.setOptions=opts2=>{Object.entries(opts2).forEach((([key,value])=>{if(typeof value==="undefined")delete opts2[key]}));this.options={debug:false,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:false,getItemKey:defaultKeyExtractor,rangeExtractor:defaultRangeExtractor,onChange:()=>{},measureElement:measureElement,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:true,isRtl:false,useScrollendEvent:true,useAnimationFrameWithResizeObserver:false,...opts2}};this.notify=sync=>{var _a,_b;(_b=(_a=this.options).onChange)==null?void 0:_b.call(_a,this,sync)};this.maybeNotify=memo$1((()=>{this.calculateRange();return[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),(isScrolling=>{this.notify(isScrolling)}),{key:false,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]});this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((d=>d()));this.unsubs=[];this.observer.disconnect();this.scrollElement=null;this.targetWindow=null};this._didMount=()=>()=>{this.cleanup()};this._willUpdate=()=>{var _a;const scrollElement=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==scrollElement){this.cleanup();if(!scrollElement){this.maybeNotify();return}this.scrollElement=scrollElement;if(this.scrollElement&&"ownerDocument"in this.scrollElement){this.targetWindow=this.scrollElement.ownerDocument.defaultView}else{this.targetWindow=((_a=this.scrollElement)==null?void 0:_a.window)??null}this.elementsCache.forEach((cached=>{this.observer.observe(cached)}));this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0});this.unsubs.push(this.options.observeElementRect(this,(rect=>{this.scrollRect=rect;this.maybeNotify()})));this.unsubs.push(this.options.observeElementOffset(this,((offset,isScrolling)=>{this.scrollAdjustments=0;this.scrollDirection=isScrolling?this.getScrollOffset()<offset?"forward":"backward":null;this.scrollOffset=offset;this.isScrolling=isScrolling;this.maybeNotify()})))}};this.getSize=()=>{if(!this.options.enabled){this.scrollRect=null;return 0}this.scrollRect=this.scrollRect??this.options.initialRect;return this.scrollRect[this.options.horizontal?"width":"height"]};this.getScrollOffset=()=>{if(!this.options.enabled){this.scrollOffset=null;return 0}this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==="function"?this.options.initialOffset():this.options.initialOffset);return this.scrollOffset};this.getFurthestMeasurement=(measurements,index)=>{const furthestMeasurementsFound=new Map;const furthestMeasurements=new Map;for(let m=index-1;m>=0;m--){const measurement=measurements[m];if(furthestMeasurementsFound.has(measurement.lane)){continue}const previousFurthestMeasurement=furthestMeasurements.get(measurement.lane);if(previousFurthestMeasurement==null||measurement.end>previousFurthestMeasurement.end){furthestMeasurements.set(measurement.lane,measurement)}else if(measurement.end<previousFurthestMeasurement.end){furthestMeasurementsFound.set(measurement.lane,true)}if(furthestMeasurementsFound.size===this.options.lanes){break}}return furthestMeasurements.size===this.options.lanes?Array.from(furthestMeasurements.values()).sort(((a,b)=>{if(a.end===b.end){return a.index-b.index}return a.end-b.end}))[0]:void 0};this.getMeasurementOptions=memo$1((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled]),((count2,paddingStart,scrollMargin,getItemKey,enabled)=>{this.pendingMeasuredCacheIndexes=[];return{count:count2,paddingStart:paddingStart,scrollMargin:scrollMargin,getItemKey:getItemKey,enabled:enabled}}),{key:false});this.getMeasurements=memo$1((()=>[this.getMeasurementOptions(),this.itemSizeCache]),(({count:count2,paddingStart:paddingStart,scrollMargin:scrollMargin,getItemKey:getItemKey,enabled:enabled},itemSizeCache)=>{if(!enabled){this.measurementsCache=[];this.itemSizeCache.clear();return[]}if(this.measurementsCache.length===0){this.measurementsCache=this.options.initialMeasurementsCache;this.measurementsCache.forEach((item=>{this.itemSizeCache.set(item.key,item.size)}))}const min2=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const measurements=this.measurementsCache.slice(0,min2);for(let i=min2;i<count2;i++){const key=getItemKey(i);const furthestMeasurement=this.options.lanes===1?measurements[i-1]:this.getFurthestMeasurement(measurements,i);const start=furthestMeasurement?furthestMeasurement.end+this.options.gap:paddingStart+scrollMargin;const measuredSize=itemSizeCache.get(key);const size=typeof measuredSize==="number"?measuredSize:this.options.estimateSize(i);const end=start+size;const lane=furthestMeasurement?furthestMeasurement.lane:i%this.options.lanes;measurements[i]={index:i,start:start,size:size,end:end,key:key,lane:lane}}this.measurementsCache=measurements;return measurements}),{key:false,debug:()=>this.options.debug});this.calculateRange=memo$1((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((measurements,outerSize,scrollOffset)=>this.range=measurements.length>0&&outerSize>0?calculateRange({measurements:measurements,outerSize:outerSize,scrollOffset:scrollOffset}):null),{key:false,debug:()=>this.options.debug});this.getVirtualIndexes=memo$1((()=>{let startIndex=null;let endIndex=null;const range=this.calculateRange();if(range){startIndex=range.startIndex;endIndex=range.endIndex}return[this.options.rangeExtractor,this.options.overscan,this.options.count,startIndex,endIndex]}),((rangeExtractor,overscan,count2,startIndex,endIndex)=>startIndex===null||endIndex===null?[]:rangeExtractor({startIndex:startIndex,endIndex:endIndex,overscan:overscan,count:count2})),{key:false,debug:()=>this.options.debug});this.indexFromElement=node=>{const attributeName=this.options.indexAttribute;const indexStr=node.getAttribute(attributeName);if(!indexStr){console.warn(`Missing attribute name '${attributeName}={index}' on measured element.`);return-1}return parseInt(indexStr,10)};this._measureElement=(node,entry)=>{const index=this.indexFromElement(node);const item=this.measurementsCache[index];if(!item){return}const key=item.key;const prevNode=this.elementsCache.get(key);if(prevNode!==node){if(prevNode){this.observer.unobserve(prevNode)}this.observer.observe(node);this.elementsCache.set(key,node)}if(node.isConnected){this.resizeItem(index,this.options.measureElement(node,entry,this))}};this.resizeItem=(index,size)=>{const item=this.measurementsCache[index];if(!item){return}const itemSize=this.itemSizeCache.get(item.key)??item.size;const delta=size-itemSize;if(delta!==0){if(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(item,delta,this):item.start<this.getScrollOffset()+this.scrollAdjustments){this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=delta,behavior:void 0})}this.pendingMeasuredCacheIndexes.push(item.index);this.itemSizeCache=new Map(this.itemSizeCache.set(item.key,size));this.notify(false)}};this.measureElement=node=>{if(!node){this.elementsCache.forEach(((cached,key)=>{if(!cached.isConnected){this.observer.unobserve(cached);this.elementsCache.delete(key)}}));return}this._measureElement(node,void 0)};this.getVirtualItems=memo$1((()=>[this.getVirtualIndexes(),this.getMeasurements()]),((indexes,measurements)=>{const virtualItems=[];for(let k=0,len=indexes.length;k<len;k++){const i=indexes[k];const measurement=measurements[i];virtualItems.push(measurement)}return virtualItems}),{key:false,debug:()=>this.options.debug});this.getVirtualItemForOffset=offset=>{const measurements=this.getMeasurements();if(measurements.length===0){return void 0}return notUndefined(measurements[findNearestBinarySearch(0,measurements.length-1,(index=>notUndefined(measurements[index]).start),offset)])};this.getOffsetForAlignment=(toOffset,align)=>{const size=this.getSize();const scrollOffset=this.getScrollOffset();if(align==="auto"){if(toOffset>=scrollOffset+size){align="end"}}if(align==="end"){toOffset-=size}const scrollSizeProp=this.options.horizontal?"scrollWidth":"scrollHeight";const scrollSize=this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[scrollSizeProp]:this.scrollElement[scrollSizeProp]:0;const maxOffset=scrollSize-size;return Math.max(Math.min(maxOffset,toOffset),0)};this.getOffsetForIndex=(index,align="auto")=>{index=Math.max(0,Math.min(index,this.options.count-1));const item=this.measurementsCache[index];if(!item){return void 0}const size=this.getSize();const scrollOffset=this.getScrollOffset();if(align==="auto"){if(item.end>=scrollOffset+size-this.options.scrollPaddingEnd){align="end"}else if(item.start<=scrollOffset+this.options.scrollPaddingStart){align="start"}else{return[scrollOffset,align]}}const centerOffset=item.start-this.options.scrollPaddingStart+(item.size-size)/2;switch(align){case"center":return[this.getOffsetForAlignment(centerOffset,align),align];case"end":return[this.getOffsetForAlignment(item.end+this.options.scrollPaddingEnd,align),align];default:return[this.getOffsetForAlignment(item.start-this.options.scrollPaddingStart,align),align]}};this.isDynamicMode=()=>this.elementsCache.size>0;this.cancelScrollToIndex=()=>{if(this.scrollToIndexTimeoutId!==null&&this.targetWindow){this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId);this.scrollToIndexTimeoutId=null}};this.scrollToOffset=(toOffset,{align:align="start",behavior:behavior}={})=>{this.cancelScrollToIndex();if(behavior==="smooth"&&this.isDynamicMode()){console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.")}this._scrollToOffset(this.getOffsetForAlignment(toOffset,align),{adjustments:void 0,behavior:behavior})};this.scrollToIndex=(index,{align:initialAlign="auto",behavior:behavior}={})=>{index=Math.max(0,Math.min(index,this.options.count-1));this.cancelScrollToIndex();if(behavior==="smooth"&&this.isDynamicMode()){console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.")}const offsetAndAlign=this.getOffsetForIndex(index,initialAlign);if(!offsetAndAlign)return;const[offset,align]=offsetAndAlign;this._scrollToOffset(offset,{adjustments:void 0,behavior:behavior});if(behavior!=="smooth"&&this.isDynamicMode()&&this.targetWindow){this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{this.scrollToIndexTimeoutId=null;const elementInDOM=this.elementsCache.has(this.options.getItemKey(index));if(elementInDOM){const[latestOffset]=notUndefined(this.getOffsetForIndex(index,align));if(!approxEqual(latestOffset,this.getScrollOffset())){this.scrollToIndex(index,{align:align,behavior:behavior})}}else{this.scrollToIndex(index,{align:align,behavior:behavior})}}))}};this.scrollBy=(delta,{behavior:behavior}={})=>{this.cancelScrollToIndex();if(behavior==="smooth"&&this.isDynamicMode()){console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.")}this._scrollToOffset(this.getScrollOffset()+delta,{adjustments:void 0,behavior:behavior})};this.getTotalSize=()=>{var _a;const measurements=this.getMeasurements();let end;if(measurements.length===0){end=this.options.paddingStart}else{end=this.options.lanes===1?((_a=measurements[measurements.length-1])==null?void 0:_a.end)??0:Math.max(...measurements.slice(-this.options.lanes).map((m=>m.end)))}return Math.max(end-this.options.scrollMargin+this.options.paddingEnd,0)};this._scrollToOffset=(offset,{adjustments:adjustments,behavior:behavior})=>{this.options.scrollToFn(offset,{behavior:behavior,adjustments:adjustments},this)};this.measure=()=>{this.itemSizeCache=new Map;this.notify(false)};this.setOptions(opts)}}const findNearestBinarySearch=(low,high,getCurrentValue,value)=>{while(low<=high){const middle=(low+high)/2|0;const currentValue=getCurrentValue(middle);if(currentValue<value){low=middle+1}else if(currentValue>value){high=middle-1}else{return middle}}if(low>0){return low-1}else{return 0}};function calculateRange({measurements:measurements,outerSize:outerSize,scrollOffset:scrollOffset}){const count2=measurements.length-1;const getOffset=index=>measurements[index].start;const startIndex=findNearestBinarySearch(0,count2,getOffset,scrollOffset);let endIndex=startIndex;while(endIndex<count2&&measurements[endIndex].end<scrollOffset+outerSize){endIndex++}return{startIndex:startIndex,endIndex:endIndex}}const useIsomorphicLayoutEffect=typeof document!=="undefined"?React.useLayoutEffect:React.useEffect;function useVirtualizerBase(options){const rerender=React.useReducer((()=>({})),{})[1];const resolvedOptions={...options,onChange:(instance2,sync)=>{var _a;if(sync){flushSync(rerender)}else{rerender()}(_a=options.onChange)==null?void 0:_a.call(options,instance2,sync)}};const[instance]=React.useState((()=>new Virtualizer(resolvedOptions)));instance.setOptions(resolvedOptions);useIsomorphicLayoutEffect((()=>instance._didMount()),[]);useIsomorphicLayoutEffect((()=>instance._willUpdate()));return instance}function useVirtualizer(options){return useVirtualizerBase({observeElementRect:observeElementRect,observeElementOffset:observeElementOffset,scrollToFn:elementScroll,...options})}const getVirtualizedContainerStyles=maxHeight=>{let heightValue="600px";if(maxHeight){switch(maxHeight){case"xs":heightValue="200px";break;case"sm":heightValue="300px";break;case"md":heightValue="400px";break;case"lg":heightValue="500px";break;case"xl":heightValue="600px";break;case"xxl":heightValue="700px";break;case"xxxl":heightValue="800px";break;default:if(maxHeight!=="auto"){heightValue=maxHeight}}}return{overflow:"auto",position:"relative",height:heightValue,width:"100%"}};const getVirtualizedRowStyle=startPosition=>({position:"absolute",top:0,left:0,height:"40px",transform:`translateY(${startPosition}px)`,tableLayout:"fixed"});const getRowHeightEstimate=rowType=>{switch(rowType){case"header":return 40;case"loading":return 30;case"footer":return 40;case"row":default:return 40}};const AdvancedTableContext=createContext({});const AdvancedTableProvider=({children:children,...props})=>{var _a;const tableContainerRef=useRef(null);const containerRef=props.tableContainerRef||tableContainerRef;const table=props.table;const isVirtualized=props.virtualizedRows||props.enableVirtualization;const headerRef=useRef(null);const sampleRowRef=useRef(null);const[headerHeight,setHeaderHeight]=useState(44);const[rowHeight,setRowHeight]=useState(38);const[actionBarHeight,setActionBarHeight]=useState(0);const measureHeights=useCallback((()=>{var _a2;const wrapper=((_a2=props.tableContainerRef)==null?void 0:_a2.current)||tableContainerRef.current;if(headerRef.current){const headerElement=headerRef.current;const headerRect=headerElement.getBoundingClientRect();if(headerRect.height>0){setHeaderHeight(headerRect.height)}}if(sampleRowRef.current){const rowRect=sampleRowRef.current.getBoundingClientRect();if(rowRect.height>0){setRowHeight(rowRect.height)}}if(wrapper){const actionBar=wrapper.querySelector(".row-selection-actions-card.is-visible, .row-selection-actions-card.show-action-card");const measuredActionBarHeight=actionBar?measureElementHeight(actionBar):0;setActionBarHeight(measuredActionBarHeight);wrapper.style.setProperty("--advanced-table-action-bar-height",`${measuredActionBarHeight}px`)}}),[props.tableContainerRef]);useEffect((()=>{var _a2;const resizeObserver=new ResizeObserver((()=>{measureHeights()}));if(headerRef.current){resizeObserver.observe(headerRef.current)}const wrapper=((_a2=props.tableContainerRef)==null?void 0:_a2.current)||tableContainerRef.current;const actionBar=wrapper==null?void 0:wrapper.querySelector(".row-selection-actions-card");if(actionBar){resizeObserver.observe(actionBar)}if(sampleRowRef.current){resizeObserver.observe(sampleRowRef.current)}const timeoutId=setTimeout(measureHeights,100);return()=>{resizeObserver.disconnect();clearTimeout(timeoutId)}}),[measureHeights]);const headerGroupCount=((_a=table==null?void 0:table.getHeaderGroups())==null?void 0:_a.length)??0;useEffect((()=>{measureHeights()}),[table==null?void 0:table.getRowModel().rows.length,headerGroupCount,props.isActionBarVisible,measureHeights]);const flattenedItems=useMemo((()=>{if(!isVirtualized||!table){return[]}const tableRows=table.getRowModel().rows;const items=[];const subRowHeaders=props.subRowHeaders;const inlineRowLoading=props.inlineRowLoading;const columnDefinitions=props.columnDefinitions;tableRows.forEach(((row,index)=>{var _a2,_b,_c;const isFirstChildofSubrow=row.depth>0&&row.index===0;if(isFirstChildofSubrow&&subRowHeaders){items.push({type:"header",row:row,id:`header-${row.id}-${index}`})}items.push({type:"row",row:row,id:`row-${row.id}-${index}`});const isExpandable=row.getIsExpanded();const rowHasNoChildren=((_a2=row.original)==null?void 0:_a2.children)&&!row.original.children.length?true:false;const isDataLoading=isExpandable&&(inlineRowLoading&&rowHasNoChildren)&&row.depth<(((_c=(_b=columnDefinitions[0])==null?void 0:_b.cellAccessors)==null?void 0:_c.length)||0);if(isDataLoading){items.push({type:"loading",row:row,id:`loading-${row.id}-${index}`})}}));const isFetching=props.isFetching||false;const shouldAddFooter=table&&!isFetching&&tableRows.length>0;if(shouldAddFooter){items.push({type:"footer",row:{},id:`footer-row`})}return items}),[isVirtualized,table,props.subRowHeaders,props.inlineRowLoading,props.columnDefinitions,table==null?void 0:table.getRowModel().rows.length,JSON.stringify((table==null?void 0:table.getState().sorting)||[]),JSON.stringify((table==null?void 0:table.getState().expanded)||{})]);const virtualizer=useVirtualizer({count:isVirtualized&&flattenedItems.length>0?flattenedItems.length:0,getScrollElement:()=>containerRef.current,estimateSize:index=>{if(!isVirtualized||flattenedItems.length===0)return 0;const item=flattenedItems[index];if(!item)return getRowHeightEstimate("row");return getRowHeightEstimate(item.type)},overscan:10,getItemKey:index=>{var _a2;if(!isVirtualized||flattenedItems.length===0||index>=flattenedItems.length){return`item-${index}`}return((_a2=flattenedItems[index])==null?void 0:_a2.id)||`item-${index}`}});useEffect((()=>{if(isVirtualized&&virtualizer&&table&&containerRef.current){virtualizer.setOptions({...virtualizer.options,count:flattenedItems.length});virtualizer.measure()}}),[isVirtualized,virtualizer,table,containerRef,JSON.stringify((table==null?void 0:table.getState().sorting)||[]),JSON.stringify((table==null?void 0:table.getState().expanded)||{}),flattenedItems.length]);const contextValue={...props,table:table,tableContainerRef:containerRef,virtualizer:isVirtualized?virtualizer:null,flattenedItems:flattenedItems,virtualizedRows:isVirtualized,enableVirtualization:isVirtualized,rowPinning:props.rowPinning,setRowPinning:props.setRowPinning,keepPinnedRows:props.keepPinnedRows,headerHeight:headerHeight,rowHeight:rowHeight,actionBarHeight:actionBarHeight,headerRef:headerRef,sampleRowRef:sampleRowRef,measureHeights:measureHeights};return jsx(AdvancedTableContext.Provider,{value:contextValue,children:children})};
|
|
2
2
|
/**
|
|
3
3
|
* table-core
|
|
4
4
|
*
|
package/dist/ai/all-schemas.json
CHANGED
|
@@ -7875,6 +7875,12 @@
|
|
|
7875
7875
|
],
|
|
7876
7876
|
"default": ""
|
|
7877
7877
|
},
|
|
7878
|
+
"formatSelectedDisplay": {
|
|
7879
|
+
"type": "function",
|
|
7880
|
+
"platforms": [
|
|
7881
|
+
"react"
|
|
7882
|
+
]
|
|
7883
|
+
},
|
|
7878
7884
|
"inputDisplay": {
|
|
7879
7885
|
"type": "enum",
|
|
7880
7886
|
"platforms": [
|
|
@@ -9714,6 +9720,14 @@
|
|
|
9714
9720
|
"rails"
|
|
9715
9721
|
]
|
|
9716
9722
|
},
|
|
9723
|
+
"markdownSupport": {
|
|
9724
|
+
"type": "MarkdownDependencies",
|
|
9725
|
+
"platforms": [
|
|
9726
|
+
"react",
|
|
9727
|
+
"rails"
|
|
9728
|
+
],
|
|
9729
|
+
"default": false
|
|
9730
|
+
},
|
|
9717
9731
|
"extensions": {
|
|
9718
9732
|
"type": "GenericObject",
|
|
9719
9733
|
"platforms": [
|
|
@@ -9836,7 +9850,9 @@
|
|
|
9836
9850
|
"trix",
|
|
9837
9851
|
"@tiptap/react",
|
|
9838
9852
|
"@tiptap/starter-kit",
|
|
9839
|
-
"@tiptap/extension-link"
|
|
9853
|
+
"@tiptap/extension-link",
|
|
9854
|
+
"prosemirror-markdown",
|
|
9855
|
+
"prosemirror-model"
|
|
9840
9856
|
],
|
|
9841
9857
|
"optional": true,
|
|
9842
9858
|
"note": "Default React editor uses Trix (pass TrixEditor from react-trix). Advanced editor uses TipTap. The host app must already have the needed packages installed. Agents must not install packages — tell the user if they are missing. Rails advanced TipTap may load via the kit’s esm.sh script."
|
|
@@ -11193,6 +11209,12 @@
|
|
|
11193
11209
|
],
|
|
11194
11210
|
"default": false
|
|
11195
11211
|
},
|
|
11212
|
+
"colSpan": {
|
|
11213
|
+
"type": "number",
|
|
11214
|
+
"platforms": [
|
|
11215
|
+
"react"
|
|
11216
|
+
]
|
|
11217
|
+
},
|
|
11196
11218
|
"text": {
|
|
11197
11219
|
"platforms": [
|
|
11198
11220
|
"rails"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"description":"Kits that need host-app packages (from each kit’s docs/_playground.overrides.json → externalDependencies). Agents must NOT install packages — tell the user if they are missing.","bundledWithPlaybookUi":["flatpickr","intl-tel-input","@floating-ui/dom","@popperjs/core"],"kits":{"map":{"packages":["maplibre-gl"],"optional":true,"note":"Map wraps MapLibre. The host app must already have maplibre-gl (and any required CSS) installed. Agents must not install packages — tell the user if they are missing."},"pb_bar_graph":{"packages":["highcharts","highcharts-react-official"],"optional":true,"note":"This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.","docs":"https://api.highcharts.com/highcharts/"},"pb_circle_chart":{"packages":["highcharts","highcharts-react-official"],"optional":true,"note":"This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.","docs":"https://api.highcharts.com/highcharts/"},"pb_gauge_chart":{"packages":["highcharts","highcharts-react-official"],"optional":true,"note":"This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.","docs":"https://api.highcharts.com/highcharts/"},"pb_line_graph":{"packages":["highcharts","highcharts-react-official"],"optional":true,"note":"This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.","docs":"https://api.highcharts.com/highcharts/"},"rich_text_editor":{"packages":["react-trix","trix","@tiptap/react","@tiptap/starter-kit","@tiptap/extension-link"],"optional":true,"note":"Default React editor uses Trix (pass TrixEditor from react-trix). Advanced editor uses TipTap. The host app must already have the needed packages installed. Agents must not install packages — tell the user if they are missing. Rails advanced TipTap may load via the kit’s esm.sh script."}}}
|
|
1
|
+
{"description":"Kits that need host-app packages (from each kit’s docs/_playground.overrides.json → externalDependencies). Agents must NOT install packages — tell the user if they are missing.","bundledWithPlaybookUi":["flatpickr","intl-tel-input","@floating-ui/dom","@popperjs/core"],"kits":{"map":{"packages":["maplibre-gl"],"optional":true,"note":"Map wraps MapLibre. The host app must already have maplibre-gl (and any required CSS) installed. Agents must not install packages — tell the user if they are missing."},"pb_bar_graph":{"packages":["highcharts","highcharts-react-official"],"optional":true,"note":"This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.","docs":"https://api.highcharts.com/highcharts/"},"pb_circle_chart":{"packages":["highcharts","highcharts-react-official"],"optional":true,"note":"This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.","docs":"https://api.highcharts.com/highcharts/"},"pb_gauge_chart":{"packages":["highcharts","highcharts-react-official"],"optional":true,"note":"This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.","docs":"https://api.highcharts.com/highcharts/"},"pb_line_graph":{"packages":["highcharts","highcharts-react-official"],"optional":true,"note":"This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.","docs":"https://api.highcharts.com/highcharts/"},"rich_text_editor":{"packages":["react-trix","trix","@tiptap/react","@tiptap/starter-kit","@tiptap/extension-link","prosemirror-markdown","prosemirror-model"],"optional":true,"note":"Default React editor uses Trix (pass TrixEditor from react-trix). Advanced editor uses TipTap. The host app must already have the needed packages installed. Agents must not install packages — tell the user if they are missing. Rails advanced TipTap may load via the kit’s esm.sh script."}}}
|
package/dist/ai/index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "17.2.0-rc.
|
|
3
|
-
"generated": "2026-09-
|
|
2
|
+
"version": "17.2.0-rc.3",
|
|
3
|
+
"generated": "2026-09-04T13:19:16.430Z",
|
|
4
4
|
"schemas": {
|
|
5
5
|
"globalProps": "global-props.schema.json",
|
|
6
6
|
"kits": {
|
|
@@ -830,7 +830,9 @@
|
|
|
830
830
|
"trix",
|
|
831
831
|
"@tiptap/react",
|
|
832
832
|
"@tiptap/starter-kit",
|
|
833
|
-
"@tiptap/extension-link"
|
|
833
|
+
"@tiptap/extension-link",
|
|
834
|
+
"prosemirror-markdown",
|
|
835
|
+
"prosemirror-model"
|
|
834
836
|
],
|
|
835
837
|
"optional": true,
|
|
836
838
|
"note": "Default React editor uses Trix (pass TrixEditor from react-trix). Advanced editor uses TipTap. The host app must already have the needed packages installed. Agents must not install packages — tell the user if they are missing. Rails advanced TipTap may load via the kit’s esm.sh script."
|
|
@@ -51,6 +51,14 @@
|
|
|
51
51
|
"rails"
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
|
+
"markdownSupport": {
|
|
55
|
+
"type": "MarkdownDependencies",
|
|
56
|
+
"platforms": [
|
|
57
|
+
"react",
|
|
58
|
+
"rails"
|
|
59
|
+
],
|
|
60
|
+
"default": false
|
|
61
|
+
},
|
|
54
62
|
"extensions": {
|
|
55
63
|
"type": "GenericObject",
|
|
56
64
|
"platforms": [
|
|
@@ -173,7 +181,9 @@
|
|
|
173
181
|
"trix",
|
|
174
182
|
"@tiptap/react",
|
|
175
183
|
"@tiptap/starter-kit",
|
|
176
|
-
"@tiptap/extension-link"
|
|
184
|
+
"@tiptap/extension-link",
|
|
185
|
+
"prosemirror-markdown",
|
|
186
|
+
"prosemirror-model"
|
|
177
187
|
],
|
|
178
188
|
"optional": true,
|
|
179
189
|
"note": "Default React editor uses Trix (pass TrixEditor from react-trix). Advanced editor uses TipTap. The host app must already have the needed packages installed. Agents must not install packages — tell the user if they are missing. Rails advanced TipTap may load via the kit’s esm.sh script."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"description":"Slim playground patterns for AI code generation in consuming apps. Full website playground configs are not shipped here.","fields":["presets","hints","conditionals","structureModes","template","children","customProps","wrapper","statefulProps","requiredCodeProps","propTargets","propAliases","codegenDefaultProps","externalImports","imports","externalDependencies"],"kits":{"advanced_table":{"path":"playgrounds/advanced_table.json","presetCount":7,"hintCount":9,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":true},"avatar":{"path":"playgrounds/avatar.json","presetCount":8,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"background":{"path":"playgrounds/background.json","presetCount":4,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"badge":{"path":"playgrounds/badge.json","presetCount":7,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"body":{"path":"playgrounds/body.json","presetCount":4,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"bread_crumbs":{"path":"playgrounds/bread_crumbs.json","presetCount":4,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"button":{"path":"playgrounds/button.json","presetCount":7,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"button_toolbar":{"path":"playgrounds/button_toolbar.json","presetCount":4,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"caption":{"path":"playgrounds/caption.json","presetCount":4,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"card":{"path":"playgrounds/card.json","presetCount":6,"hintCount":1,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"checkbox":{"path":"playgrounds/checkbox.json","presetCount":4,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"circle_icon_button":{"path":"playgrounds/circle_icon_button.json","presetCount":6,"hintCount":2,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"collapsible":{"path":"playgrounds/collapsible.json","presetCount":3,"hintCount":1,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"contact":{"path":"playgrounds/contact.json","presetCount":5,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"container":{"path":"playgrounds/container.json","presetCount":3,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"copy_button":{"path":"playgrounds/copy_button.json","presetCount":4,"hintCount":3,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"currency":{"path":"playgrounds/currency.json","presetCount":6,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"dashboard_value":{"path":"playgrounds/dashboard_value.json","presetCount":4,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date":{"path":"playgrounds/date.json","presetCount":4,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date_picker":{"path":"playgrounds/date_picker.json","presetCount":11,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"date_range_inline":{"path":"playgrounds/date_range_inline.json","presetCount":5,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date_range_stacked":{"path":"playgrounds/date_range_stacked.json","presetCount":3,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date_stacked":{"path":"playgrounds/date_stacked.json","presetCount":5,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date_time":{"path":"playgrounds/date_time.json","presetCount":7,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date_time_stacked":{"path":"playgrounds/date_time_stacked.json","presetCount":3,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date_year_stacked":{"path":"playgrounds/date_year_stacked.json","presetCount":3,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"detail":{"path":"playgrounds/detail.json","presetCount":4,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"dialog":{"path":"playgrounds/dialog.json","presetCount":6,"hintCount":3,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"distribution_bar":{"path":"playgrounds/distribution_bar.json","presetCount":3,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"draggable":{"path":"playgrounds/draggable.json","presetCount":8,"hintCount":8,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"dropdown":{"path":"playgrounds/dropdown.json","presetCount":12,"hintCount":8,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"empty_state":{"path":"playgrounds/empty_state.json","presetCount":5,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"file_upload":{"path":"playgrounds/file_upload.json","presetCount":6,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"filter":{"path":"playgrounds/filter.json","presetCount":7,"hintCount":7,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"fixed_confirmation_toast":{"path":"playgrounds/fixed_confirmation_toast.json","presetCount":9,"hintCount":9,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"flex":{"path":"playgrounds/flex.json","presetCount":12,"hintCount":12,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"form_group":{"path":"playgrounds/form_group.json","presetCount":7,"hintCount":7,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"form_pill":{"path":"playgrounds/form_pill.json","presetCount":9,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"full_screen":{"path":"playgrounds/full_screen.json","presetCount":6,"hintCount":3,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"hashtag":{"path":"playgrounds/hashtag.json","presetCount":5,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"highlight":{"path":"playgrounds/highlight.json","presetCount":5,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"home_address_street":{"path":"playgrounds/home_address_street.json","presetCount":6,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"icon":{"path":"playgrounds/icon.json","presetCount":7,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"icon_circle":{"path":"playgrounds/icon_circle.json","presetCount":5,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"icon_stat_value":{"path":"playgrounds/icon_stat_value.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"icon_value":{"path":"playgrounds/icon_value.json","presetCount":3,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"image":{"path":"playgrounds/image.json","presetCount":6,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"label_pill":{"path":"playgrounds/label_pill.json","presetCount":6,"hintCount":2,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"label_value":{"path":"playgrounds/label_value.json","presetCount":6,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"layout":{"path":"playgrounds/layout.json","presetCount":8,"hintCount":8,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"legend":{"path":"playgrounds/legend.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"link":{"path":"playgrounds/link.json","presetCount":10,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"list":{"path":"playgrounds/list.json","presetCount":8,"hintCount":8,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"loading_inline":{"path":"playgrounds/loading_inline.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"map":{"path":"playgrounds/map.json","presetCount":4,"hintCount":5,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"message":{"path":"playgrounds/message.json","presetCount":6,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"multi_level_select":{"path":"playgrounds/multi_level_select.json","presetCount":9,"hintCount":10,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"multiple_users":{"path":"playgrounds/multiple_users.json","presetCount":6,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"multiple_users_stacked":{"path":"playgrounds/multiple_users_stacked.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"nav":{"path":"playgrounds/nav.json","presetCount":12,"hintCount":12,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"online_status":{"path":"playgrounds/online_status.json","presetCount":3,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"overlay":{"path":"playgrounds/overlay.json","presetCount":6,"hintCount":4,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"pagination":{"path":"playgrounds/pagination.json","presetCount":4,"hintCount":2,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"passphrase":{"path":"playgrounds/passphrase.json","presetCount":7,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"pb_bar_graph":{"path":"playgrounds/pb_bar_graph.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"pb_circle_chart":{"path":"playgrounds/pb_circle_chart.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"pb_gauge_chart":{"path":"playgrounds/pb_gauge_chart.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"pb_line_graph":{"path":"playgrounds/pb_line_graph.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"person":{"path":"playgrounds/person.json","presetCount":3,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"person_contact":{"path":"playgrounds/person_contact.json","presetCount":5,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"phone_number_input":{"path":"playgrounds/phone_number_input.json","presetCount":8,"hintCount":7,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"pill":{"path":"playgrounds/pill.json","presetCount":6,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"popover":{"path":"playgrounds/popover.json","presetCount":9,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"progress_pills":{"path":"playgrounds/progress_pills.json","presetCount":5,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"progress_simple":{"path":"playgrounds/progress_simple.json","presetCount":8,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"progress_step":{"path":"playgrounds/progress_step.json","presetCount":8,"hintCount":4,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"radio":{"path":"playgrounds/radio.json","presetCount":6,"hintCount":2,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"rich_text_editor":{"path":"playgrounds/rich_text_editor.json","presetCount":6,"hintCount":2,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"section_separator":{"path":"playgrounds/section_separator.json","presetCount":8,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"select":{"path":"playgrounds/select.json","presetCount":4,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"selectable_card":{"path":"playgrounds/selectable_card.json","presetCount":3,"hintCount":4,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"selectable_card_icon":{"path":"playgrounds/selectable_card_icon.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"selectable_icon":{"path":"playgrounds/selectable_icon.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"selectable_list":{"path":"playgrounds/selectable_list.json","presetCount":3,"hintCount":3,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"skeleton_loading":{"path":"playgrounds/skeleton_loading.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"source":{"path":"playgrounds/source.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"star_rating":{"path":"playgrounds/star_rating.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"stat_change":{"path":"playgrounds/stat_change.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"stat_value":{"path":"playgrounds/stat_value.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"table":{"path":"playgrounds/table.json","presetCount":7,"hintCount":7,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"text_input":{"path":"playgrounds/text_input.json","presetCount":4,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"textarea":{"path":"playgrounds/textarea.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"time":{"path":"playgrounds/time.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"time_picker":{"path":"playgrounds/time_picker.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"time_range_inline":{"path":"playgrounds/time_range_inline.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"time_stacked":{"path":"playgrounds/time_stacked.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"timeline":{"path":"playgrounds/timeline.json","presetCount":5,"hintCount":5,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"timestamp":{"path":"playgrounds/timestamp.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"title":{"path":"playgrounds/title.json","presetCount":8,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"title_count":{"path":"playgrounds/title_count.json","presetCount":4,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"title_detail":{"path":"playgrounds/title_detail.json","presetCount":4,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"toggle":{"path":"playgrounds/toggle.json","presetCount":3,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"tooltip":{"path":"playgrounds/tooltip.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"typeahead":{"path":"playgrounds/typeahead.json","presetCount":7,"hintCount":7,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"user":{"path":"playgrounds/user.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"user_badge":{"path":"playgrounds/user_badge.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"weekday_stacked":{"path":"playgrounds/weekday_stacked.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false}}}
|
|
1
|
+
{"description":"Slim playground patterns for AI code generation in consuming apps. Full website playground configs are not shipped here.","fields":["presets","hints","conditionals","structureModes","template","children","customProps","wrapper","statefulProps","requiredCodeProps","propTargets","propAliases","codegenDefaultProps","externalImports","imports","externalDependencies"],"kits":{"advanced_table":{"path":"playgrounds/advanced_table.json","presetCount":7,"hintCount":9,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":true},"avatar":{"path":"playgrounds/avatar.json","presetCount":8,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"background":{"path":"playgrounds/background.json","presetCount":4,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"badge":{"path":"playgrounds/badge.json","presetCount":7,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"body":{"path":"playgrounds/body.json","presetCount":4,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"bread_crumbs":{"path":"playgrounds/bread_crumbs.json","presetCount":4,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"button":{"path":"playgrounds/button.json","presetCount":7,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"button_toolbar":{"path":"playgrounds/button_toolbar.json","presetCount":4,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"caption":{"path":"playgrounds/caption.json","presetCount":4,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"card":{"path":"playgrounds/card.json","presetCount":6,"hintCount":1,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"checkbox":{"path":"playgrounds/checkbox.json","presetCount":4,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"circle_icon_button":{"path":"playgrounds/circle_icon_button.json","presetCount":6,"hintCount":2,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"collapsible":{"path":"playgrounds/collapsible.json","presetCount":3,"hintCount":1,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"contact":{"path":"playgrounds/contact.json","presetCount":5,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"container":{"path":"playgrounds/container.json","presetCount":3,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"copy_button":{"path":"playgrounds/copy_button.json","presetCount":4,"hintCount":3,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"currency":{"path":"playgrounds/currency.json","presetCount":6,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"dashboard_value":{"path":"playgrounds/dashboard_value.json","presetCount":4,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date":{"path":"playgrounds/date.json","presetCount":4,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date_picker":{"path":"playgrounds/date_picker.json","presetCount":11,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"date_range_inline":{"path":"playgrounds/date_range_inline.json","presetCount":5,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date_range_stacked":{"path":"playgrounds/date_range_stacked.json","presetCount":3,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date_stacked":{"path":"playgrounds/date_stacked.json","presetCount":5,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date_time":{"path":"playgrounds/date_time.json","presetCount":7,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date_time_stacked":{"path":"playgrounds/date_time_stacked.json","presetCount":3,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"date_year_stacked":{"path":"playgrounds/date_year_stacked.json","presetCount":3,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"detail":{"path":"playgrounds/detail.json","presetCount":4,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"dialog":{"path":"playgrounds/dialog.json","presetCount":6,"hintCount":3,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"distribution_bar":{"path":"playgrounds/distribution_bar.json","presetCount":3,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"draggable":{"path":"playgrounds/draggable.json","presetCount":8,"hintCount":8,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"dropdown":{"path":"playgrounds/dropdown.json","presetCount":12,"hintCount":8,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"empty_state":{"path":"playgrounds/empty_state.json","presetCount":5,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"file_upload":{"path":"playgrounds/file_upload.json","presetCount":6,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"filter":{"path":"playgrounds/filter.json","presetCount":7,"hintCount":7,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"fixed_confirmation_toast":{"path":"playgrounds/fixed_confirmation_toast.json","presetCount":9,"hintCount":9,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"flex":{"path":"playgrounds/flex.json","presetCount":12,"hintCount":12,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"form_group":{"path":"playgrounds/form_group.json","presetCount":7,"hintCount":7,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"form_pill":{"path":"playgrounds/form_pill.json","presetCount":9,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"full_screen":{"path":"playgrounds/full_screen.json","presetCount":6,"hintCount":3,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"hashtag":{"path":"playgrounds/hashtag.json","presetCount":5,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"highlight":{"path":"playgrounds/highlight.json","presetCount":5,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"home_address_street":{"path":"playgrounds/home_address_street.json","presetCount":6,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"icon":{"path":"playgrounds/icon.json","presetCount":7,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"icon_circle":{"path":"playgrounds/icon_circle.json","presetCount":5,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"icon_stat_value":{"path":"playgrounds/icon_stat_value.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"icon_value":{"path":"playgrounds/icon_value.json","presetCount":3,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"image":{"path":"playgrounds/image.json","presetCount":6,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"label_pill":{"path":"playgrounds/label_pill.json","presetCount":6,"hintCount":2,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"label_value":{"path":"playgrounds/label_value.json","presetCount":6,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"layout":{"path":"playgrounds/layout.json","presetCount":8,"hintCount":8,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"legend":{"path":"playgrounds/legend.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"link":{"path":"playgrounds/link.json","presetCount":10,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"list":{"path":"playgrounds/list.json","presetCount":8,"hintCount":8,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"loading_inline":{"path":"playgrounds/loading_inline.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"map":{"path":"playgrounds/map.json","presetCount":4,"hintCount":5,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"message":{"path":"playgrounds/message.json","presetCount":6,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"multi_level_select":{"path":"playgrounds/multi_level_select.json","presetCount":10,"hintCount":11,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"multiple_users":{"path":"playgrounds/multiple_users.json","presetCount":6,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"multiple_users_stacked":{"path":"playgrounds/multiple_users_stacked.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"nav":{"path":"playgrounds/nav.json","presetCount":12,"hintCount":12,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"online_status":{"path":"playgrounds/online_status.json","presetCount":3,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"overlay":{"path":"playgrounds/overlay.json","presetCount":6,"hintCount":4,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"pagination":{"path":"playgrounds/pagination.json","presetCount":4,"hintCount":2,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"passphrase":{"path":"playgrounds/passphrase.json","presetCount":7,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"pb_bar_graph":{"path":"playgrounds/pb_bar_graph.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"pb_circle_chart":{"path":"playgrounds/pb_circle_chart.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"pb_gauge_chart":{"path":"playgrounds/pb_gauge_chart.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"pb_line_graph":{"path":"playgrounds/pb_line_graph.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"person":{"path":"playgrounds/person.json","presetCount":3,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"person_contact":{"path":"playgrounds/person_contact.json","presetCount":5,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"phone_number_input":{"path":"playgrounds/phone_number_input.json","presetCount":8,"hintCount":7,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"pill":{"path":"playgrounds/pill.json","presetCount":6,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"popover":{"path":"playgrounds/popover.json","presetCount":9,"hintCount":6,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"progress_pills":{"path":"playgrounds/progress_pills.json","presetCount":5,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"progress_simple":{"path":"playgrounds/progress_simple.json","presetCount":8,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"progress_step":{"path":"playgrounds/progress_step.json","presetCount":8,"hintCount":4,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"radio":{"path":"playgrounds/radio.json","presetCount":6,"hintCount":2,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"rich_text_editor":{"path":"playgrounds/rich_text_editor.json","presetCount":6,"hintCount":2,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"section_separator":{"path":"playgrounds/section_separator.json","presetCount":8,"hintCount":1,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"select":{"path":"playgrounds/select.json","presetCount":4,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"selectable_card":{"path":"playgrounds/selectable_card.json","presetCount":3,"hintCount":4,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"selectable_card_icon":{"path":"playgrounds/selectable_card_icon.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"selectable_icon":{"path":"playgrounds/selectable_icon.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"selectable_list":{"path":"playgrounds/selectable_list.json","presetCount":3,"hintCount":3,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"skeleton_loading":{"path":"playgrounds/skeleton_loading.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"source":{"path":"playgrounds/source.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"star_rating":{"path":"playgrounds/star_rating.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"stat_change":{"path":"playgrounds/stat_change.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"stat_value":{"path":"playgrounds/stat_value.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"table":{"path":"playgrounds/table.json","presetCount":7,"hintCount":8,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"text_input":{"path":"playgrounds/text_input.json","presetCount":4,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"textarea":{"path":"playgrounds/textarea.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"time":{"path":"playgrounds/time.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"time_picker":{"path":"playgrounds/time_picker.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"time_range_inline":{"path":"playgrounds/time_range_inline.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"time_stacked":{"path":"playgrounds/time_stacked.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"timeline":{"path":"playgrounds/timeline.json","presetCount":5,"hintCount":5,"hasStructureModes":true,"hasHints":true,"hasConditionals":false,"hasCustomProps":true,"hasSamples":false},"timestamp":{"path":"playgrounds/timestamp.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":true,"hasCustomProps":false,"hasSamples":false},"title":{"path":"playgrounds/title.json","presetCount":8,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"title_count":{"path":"playgrounds/title_count.json","presetCount":4,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"title_detail":{"path":"playgrounds/title_detail.json","presetCount":4,"hintCount":0,"hasStructureModes":false,"hasHints":false,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"toggle":{"path":"playgrounds/toggle.json","presetCount":3,"hintCount":3,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"tooltip":{"path":"playgrounds/tooltip.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"typeahead":{"path":"playgrounds/typeahead.json","presetCount":7,"hintCount":7,"hasStructureModes":true,"hasHints":true,"hasConditionals":true,"hasCustomProps":true,"hasSamples":false},"user":{"path":"playgrounds/user.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"user_badge":{"path":"playgrounds/user_badge.json","presetCount":4,"hintCount":4,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false},"weekday_stacked":{"path":"playgrounds/weekday_stacked.json","presetCount":5,"hintCount":5,"hasStructureModes":false,"hasHints":true,"hasConditionals":false,"hasCustomProps":false,"hasSamples":false}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"presets":[{"name":"Multi","structureMode":"standard","props":{"variant":"multi","label":"Departments","placeholder":"Search teams...","inputDisplay":"pills","onSelect":"(selectedNodes) => console.log('Selected Items', selectedNodes)"}},{"name":"Single Select","structureMode":"standard","props":{"variant":"single","label":"Pick one team","placeholder":"Choose...","inputDisplay":"pills","selectedIds":["talent1"],"onSelect":"(selectedNode) => console.log('Selected Node', selectedNode)"}},{"name":"Selected IDs","structureMode":"standard","props":{"variant":"multi","label":"Preselected teams","selectedIds":["talent1","initiative1","customer1"],"onSelect":"(selectedNodes) => console.log('Selected Items', selectedNodes)"}},{"name":"Input Display None","structureMode":"standard","props":{"variant":"multi","label":"Teams","inputDisplay":"none","placeholder":"Search without pills..."}},{"name":"Return All Selected","structureMode":"standard","props":{"variant":"multi","label":"Include ancestors","returnAllSelected":true,"selectedIds":["people1"],"onSelect":"(selectedNodes) => console.log('Selected Items with parent data', selectedNodes)"}},{"name":"Hide Checked Children","structureMode":"standard","props":{"variant":"multi","label":"Compact selected list","showCheckedChildren":false,"selectedIds":["talent1","initiative1","customer1"]}},{"name":"With Option Children","structureMode":"with_children","props":{"variant":"multi","label":"Teams with status","selectedIds":["talent1"],"onSelect":"(selectedNodes) => console.log('Selected Items', selectedNodes)"}},{"name":"Disabled Options","structureMode":"standard","props":{"variant":"multi","label":"Departments with disabled options","returnAllSelected":true,"onSelect":"(selectedNodes) => console.log('Selected Items', selectedNodes)","treeData":[{"label":"Power Home Remodeling","value":"powerHomeRemodeling","id":"powerhome1","expanded":true,"children":[{"label":"People","value":"people","id":"people1","expanded":true,"children":[{"label":"Talent Acquisition","value":"talentAcquisition","id":"talent1","disabled":true},{"label":"Business Affairs","value":"businessAffairs","id":"business1","children":[{"label":"Initiatives","value":"initiatives","id":"initiative1","disabled":true},{"label":"Learning & Development","value":"learningAndDevelopment","id":"development1"}]},{"label":"People Experience","value":"peopleExperience","id":"experience1"}]},{"label":"Contact Center","value":"contactCenter","id":"contact1","children":[{"label":"Appointment Management","value":"appointmentManagement","id":"appointment1"},{"label":"Customer Service","value":"customerService","id":"customer1","disabled":true},{"label":"Energy","value":"energy","id":"energy1"}]}]}]}},{"name":"Disabled Input","structureMode":"standard","props":{"variant":"multi","label":"Locked departments","disabled":true}}],"hints":{"tree_data":{"when":{},"message":"treeData is required. Each option needs an id, label, value, and can include children, expanded, disabled, or custom metadata for option children.","type":"info"},"multi":{"presetName":"Multi","message":"Multi uses checkboxes and returns the selected nodes through onSelect. inputDisplay=\"pills\" shows selected items as pills in the input.","type":"info"},"single_select":{"presetName":"Single Select","message":"Single Select uses radios and should receive at most one selectedIds value because only one node can be selected.","type":"info"},"selected_ids":{"presetName":"Selected IDs","message":"selectedIds checks matching treeData node ids on load. In multi mode, multiple ids can be passed.","type":"info"},"input_display_none":{"presetName":"Input Display None","message":"inputDisplay=\"none\" keeps selected pills out of the input while preserving filtering and selection behavior.","type":"info"},"return_all_selected":{"presetName":"Return All Selected","message":"returnAllSelected changes the selected payload so parent and child selections can be returned together.","type":"info"},"hide_checked_children":{"presetName":"Hide Checked Children","message":"showCheckedChildren={false} keeps checked child rows hidden under selected parents, which is useful for compact trees.","type":"info"},"with_option_children":{"presetName":"With Option Children","message":"MultiLevelSelect.Options receives each item, so child content can use custom fields from treeData like status.","type":"info"},"disabled_options":{"presetName":"Disabled Options","message":"Disabled options come from treeData nodes with disabled: true; those rows remain visible but cannot be selected.","type":"info"},"disabled_input":{"presetName":"Disabled Input","message":"disabled locks the input and prevents opening or changing selections.","type":"info"}},"conditionals":{"requiredIndicator":{"requires":"label"}},"structureModes":{"default":"standard","modes":{"standard":{"label":"Standard","template":"<MultiLevelSelect\n id=\"multi-level-select-playground\"\n treeData={treeData}{{props}}\n/>"},"with_children":{"label":"With Options Children","template":"<MultiLevelSelect\n id=\"multi-level-select-with-children-playground\"\n treeData={treeData}{{props}}\n>\n <MultiLevelSelect.Options>\n {(item) => (\n <Badge\n marginLeft=\"sm\"\n text={item.status || 'available'}\n variant={item.status === 'active' ? 'success' : 'warning'}\n />\n )}\n </MultiLevelSelect.Options>\n</MultiLevelSelect>"}}},"template":"<MultiLevelSelect{{props}} />","children":{"editable":false,"default":""},"customProps":{"treeData":{"type":"array","platforms":["react","rails"],"description":"Nested option data with id, label, value, and optional children."}},"propTargets":{}}
|
|
1
|
+
{"presets":[{"name":"Multi","structureMode":"standard","props":{"variant":"multi","label":"Departments","placeholder":"Search teams...","inputDisplay":"pills","onSelect":"(selectedNodes) => console.log('Selected Items', selectedNodes)"}},{"name":"Single Select","structureMode":"standard","props":{"variant":"single","label":"Pick one team","placeholder":"Choose...","inputDisplay":"pills","selectedIds":["talent1"],"onSelect":"(selectedNode) => console.log('Selected Node', selectedNode)"}},{"name":"Custom Single Select Display","structureMode":"standard","props":{"variant":"single","label":"Pick one team","placeholder":"Choose...","selectedIds":["initiative1"],"formatSelectedDisplay":"(_, { path }) => path.map(({ label }) => label).join(' / ')","onSelect":"(selectedNode) => console.log('Selected Node', selectedNode)"}},{"name":"Selected IDs","structureMode":"standard","props":{"variant":"multi","label":"Preselected teams","selectedIds":["talent1","initiative1","customer1"],"onSelect":"(selectedNodes) => console.log('Selected Items', selectedNodes)"}},{"name":"Input Display None","structureMode":"standard","props":{"variant":"multi","label":"Teams","inputDisplay":"none","placeholder":"Search without pills..."}},{"name":"Return All Selected","structureMode":"standard","props":{"variant":"multi","label":"Include ancestors","returnAllSelected":true,"selectedIds":["people1"],"onSelect":"(selectedNodes) => console.log('Selected Items with parent data', selectedNodes)"}},{"name":"Hide Checked Children","structureMode":"standard","props":{"variant":"multi","label":"Compact selected list","showCheckedChildren":false,"selectedIds":["talent1","initiative1","customer1"]}},{"name":"With Option Children","structureMode":"with_children","props":{"variant":"multi","label":"Teams with status","selectedIds":["talent1"],"onSelect":"(selectedNodes) => console.log('Selected Items', selectedNodes)"}},{"name":"Disabled Options","structureMode":"standard","props":{"variant":"multi","label":"Departments with disabled options","returnAllSelected":true,"onSelect":"(selectedNodes) => console.log('Selected Items', selectedNodes)","treeData":[{"label":"Power Home Remodeling","value":"powerHomeRemodeling","id":"powerhome1","expanded":true,"children":[{"label":"People","value":"people","id":"people1","expanded":true,"children":[{"label":"Talent Acquisition","value":"talentAcquisition","id":"talent1","disabled":true},{"label":"Business Affairs","value":"businessAffairs","id":"business1","children":[{"label":"Initiatives","value":"initiatives","id":"initiative1","disabled":true},{"label":"Learning & Development","value":"learningAndDevelopment","id":"development1"}]},{"label":"People Experience","value":"peopleExperience","id":"experience1"}]},{"label":"Contact Center","value":"contactCenter","id":"contact1","children":[{"label":"Appointment Management","value":"appointmentManagement","id":"appointment1"},{"label":"Customer Service","value":"customerService","id":"customer1","disabled":true},{"label":"Energy","value":"energy","id":"energy1"}]}]}]}},{"name":"Disabled Input","structureMode":"standard","props":{"variant":"multi","label":"Locked departments","disabled":true}}],"hints":{"tree_data":{"when":{},"message":"treeData is required. Each option needs an id, label, value, and can include children, expanded, disabled, or custom metadata for option children.","type":"info"},"multi":{"presetName":"Multi","message":"Multi uses checkboxes and returns the selected nodes through onSelect. inputDisplay=\"pills\" shows selected items as pills in the input.","type":"info"},"single_select":{"presetName":"Single Select","message":"Single Select uses radios and should receive at most one selectedIds value because only one node can be selected.","type":"info"},"custom_single_select_display":{"presetName":"Custom Single Select Display","message":"formatSelectedDisplay receives the selected item plus ancestors and path context, and must return the string shown in the single-select input. Edit the function in Content to choose which hierarchy details to display.","type":"info"},"selected_ids":{"presetName":"Selected IDs","message":"selectedIds checks matching treeData node ids on load. In multi mode, multiple ids can be passed.","type":"info"},"input_display_none":{"presetName":"Input Display None","message":"inputDisplay=\"none\" keeps selected pills out of the input while preserving filtering and selection behavior.","type":"info"},"return_all_selected":{"presetName":"Return All Selected","message":"returnAllSelected changes the selected payload so parent and child selections can be returned together.","type":"info"},"hide_checked_children":{"presetName":"Hide Checked Children","message":"showCheckedChildren={false} keeps checked child rows hidden under selected parents, which is useful for compact trees.","type":"info"},"with_option_children":{"presetName":"With Option Children","message":"MultiLevelSelect.Options receives each item, so child content can use custom fields from treeData like status.","type":"info"},"disabled_options":{"presetName":"Disabled Options","message":"Disabled options come from treeData nodes with disabled: true; those rows remain visible but cannot be selected.","type":"info"},"disabled_input":{"presetName":"Disabled Input","message":"disabled locks the input and prevents opening or changing selections.","type":"info"}},"conditionals":{"formatSelectedDisplay":{"requires":{"variant":"single"}},"requiredIndicator":{"requires":"label"}},"structureModes":{"default":"standard","modes":{"standard":{"label":"Standard","template":"<MultiLevelSelect\n id=\"multi-level-select-playground\"\n treeData={treeData}{{props}}\n/>"},"with_children":{"label":"With Options Children","template":"<MultiLevelSelect\n id=\"multi-level-select-with-children-playground\"\n treeData={treeData}{{props}}\n>\n <MultiLevelSelect.Options>\n {(item) => (\n <Badge\n marginLeft=\"sm\"\n text={item.status || 'available'}\n variant={item.status === 'active' ? 'success' : 'warning'}\n />\n )}\n </MultiLevelSelect.Options>\n</MultiLevelSelect>"}}},"template":"<MultiLevelSelect{{props}} />","children":{"editable":false,"default":""},"customProps":{"treeData":{"type":"array","platforms":["react","rails"],"description":"Nested option data with id, label, value, and optional children."}},"propTargets":{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"presets":[{"name":"Default","structureMode":"advanced","props":{"advancedEditorToolbar":true,"label":"Description","name":"description"}},{"name":"Simple","structureMode":"advanced","props":{"advancedEditorToolbar":true,"label":"Notes","name":"notes","simple":true}},{"name":"Focus Toolbar","structureMode":"advanced","props":{"advancedEditorToolbar":false,"focus":true,"label":"Focus editor"}},{"name":"Tall Editor","structureMode":"advanced","props":{"inputHeight":"lg","inputMinHeight":"md","label":"Tall editor"}},{"name":"Required","structureMode":"advanced","props":{"label":"Description","name":"description","requiredIndicator":true}},{"name":"Sticky","structureMode":"advanced","props":{"label":"Sticky editor","sticky":true}}],"hints":{"advanced":{"presetName":"Default","message":"The Advanced structure wraps RichTextEditor with TipTap useEditor and EditorContent.","type":"info"},"focus":{"when":{"focus":true},"message":"Focus Toolbar shows the toolbar when the advanced editor receives focus.","type":"info"}},"conditionals":{"advancedEditorToolbar":{"structureMode":"advanced"},"inputHeight":{"structureMode":"advanced"},"inputMinHeight":{"structureMode":"advanced"},"sticky":{"structureMode":"advanced"}},"structureModes":{"default":"advanced","modes":{"advanced":{"label":"Advanced","template":"<RichTextEditor\n advancedEditor={editor}{{props}}\n>\n <EditorContent editor={editor} />\n</RichTextEditor>","children":"","wrapper":"const RichTextEditorPlayground = () => {\n const editor = useEditor({\n extensions: [StarterKit, TipTapLink],\n content: 'Add your text here. You can format your text, add links, quotes, and bullets.',\n })\n\n if (!editor) return null\n\n return {{component}}\n}\n\n<RichTextEditorPlayground />","externalImports":["import { useEditor, EditorContent } from '@tiptap/react'","import StarterKit from '@tiptap/starter-kit'","import TipTapLink from '@tiptap/extension-link'"]}}},"template":"<RichTextEditor{{props}} />","propTargets":{},"externalDependencies":{"packages":["react-trix","trix","@tiptap/react","@tiptap/starter-kit","@tiptap/extension-link"],"optional":true,"note":"Default React editor uses Trix (pass TrixEditor from react-trix). Advanced editor uses TipTap. The host app must already have the needed packages installed. Agents must not install packages — tell the user if they are missing. Rails advanced TipTap may load via the kit’s esm.sh script."}}
|
|
1
|
+
{"presets":[{"name":"Default","structureMode":"advanced","props":{"advancedEditorToolbar":true,"label":"Description","name":"description"}},{"name":"Simple","structureMode":"advanced","props":{"advancedEditorToolbar":true,"label":"Notes","name":"notes","simple":true}},{"name":"Focus Toolbar","structureMode":"advanced","props":{"advancedEditorToolbar":false,"focus":true,"label":"Focus editor"}},{"name":"Tall Editor","structureMode":"advanced","props":{"inputHeight":"lg","inputMinHeight":"md","label":"Tall editor"}},{"name":"Required","structureMode":"advanced","props":{"label":"Description","name":"description","requiredIndicator":true}},{"name":"Sticky","structureMode":"advanced","props":{"label":"Sticky editor","sticky":true}}],"hints":{"advanced":{"presetName":"Default","message":"The Advanced structure wraps RichTextEditor with TipTap useEditor and EditorContent.","type":"info"},"focus":{"when":{"focus":true},"message":"Focus Toolbar shows the toolbar when the advanced editor receives focus.","type":"info"}},"conditionals":{"advancedEditorToolbar":{"structureMode":"advanced"},"inputHeight":{"structureMode":"advanced"},"inputMinHeight":{"structureMode":"advanced"},"sticky":{"structureMode":"advanced"}},"structureModes":{"default":"advanced","modes":{"advanced":{"label":"Advanced","template":"<RichTextEditor\n advancedEditor={editor}{{props}}\n>\n <EditorContent editor={editor} />\n</RichTextEditor>","children":"","wrapper":"const RichTextEditorPlayground = () => {\n const editor = useEditor({\n extensions: [StarterKit, TipTapLink],\n content: 'Add your text here. You can format your text, add links, quotes, and bullets.',\n })\n\n if (!editor) return null\n\n return {{component}}\n}\n\n<RichTextEditorPlayground />","externalImports":["import { useEditor, EditorContent } from '@tiptap/react'","import StarterKit from '@tiptap/starter-kit'","import TipTapLink from '@tiptap/extension-link'"]}}},"template":"<RichTextEditor{{props}} />","propTargets":{},"externalDependencies":{"packages":["react-trix","trix","@tiptap/react","@tiptap/starter-kit","@tiptap/extension-link","prosemirror-markdown","prosemirror-model"],"optional":true,"note":"Default React editor uses Trix (pass TrixEditor from react-trix). Advanced editor uses TipTap. The host app must already have the needed packages installed. Agents must not install packages — tell the user if they are missing. Rails advanced TipTap may load via the kit’s esm.sh script."}}
|