droplinked-editor-configs 1.9.8 → 1.9.9
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.
|
@@ -64021,7 +64021,10 @@ const II = (e) => {
|
|
|
64021
64021
|
stagedProductQuery: { ...n.stagedProductQuery, [t]: r }
|
|
64022
64022
|
})),
|
|
64023
64023
|
applyStagedFilters: () => e((t) => ({
|
|
64024
|
-
appliedProductQuery: {
|
|
64024
|
+
appliedProductQuery: {
|
|
64025
|
+
...t.stagedProductQuery,
|
|
64026
|
+
search: t?.stagedProductQuery?.search?.trim()
|
|
64027
|
+
}
|
|
64025
64028
|
})),
|
|
64026
64029
|
resetProductQuery: () => e(() => ({
|
|
64027
64030
|
stagedProductQuery: dg,
|
|
@@ -546,7 +546,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
546
546
|
*
|
|
547
547
|
* This source code is licensed under the MIT license found in the
|
|
548
548
|
* LICENSE file in the root directory of this source tree.
|
|
549
|
-
*/var KY;function FLe(){return KY||(KY=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=g,t=YY();function r(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,m){var v=s(null),y;v.current===null?(y={hasValue:!1,value:null},v.current=y):y=v.current;var b=a(function(){var _=!1,E,T,C=function(O){if(!_){_=!0,E=O;var R=h(O);if(m!==void 0&&y.hasValue){var $=y.value;if(m($,R))return T=$,$}return T=R,R}var W=E,L=T;if(n(W,O))return L;var F=h(O);return m!==void 0&&m(L,F)?L:(E=O,T=F,F)},P=f===void 0?null:f,S=function(){return C(d())},M=P===null?void 0:function(){return C(P())};return[S,M]},[d,f,h,m]),x=b[0],w=b[1],k=o(u,x,w);return i(function(){y.hasValue=!0,y.value=k},[k]),l(k),k}Q4.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Q4}var QY;function NLe(){return QY||(QY=1,process.env.NODE_ENV==="production"?I1.exports=LLe():I1.exports=FLe()),I1.exports}var RLe=NLe();const BLe=Po(RLe),VLe={},{useSyncExternalStoreWithSelector:zLe}=BLe;function HLe(e,t=e.getState,r){const n=zLe(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return g.useDebugValue(n),n}const ZY=e=>{(VLe&&"production")!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?jLe(e):e,r=(n,o)=>HLe(t,n,o);return Object.assign(r,t),r},Z4=e=>e?ZY(e):ZY,L1={search:"",sortBy:"",productTypes:[],collectionId:[]},Or=Z4(e=>({stagedProductQuery:L1,appliedProductQuery:L1,viewMode:"grid",setStagedProductQuery:(t,r)=>e(n=>({stagedProductQuery:{...n.stagedProductQuery,[t]:r}})),applyStagedFilters:()=>e(t=>({appliedProductQuery:{...t.stagedProductQuery}})),resetProductQuery:()=>e(()=>({stagedProductQuery:L1,appliedProductQuery:L1})),setViewMode:t=>e(()=>({viewMode:t}))}));function X4(e){const t=e+"CollectionProvider",[r,n]=wi(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:y,children:b}=v,x=g.useRef(null),w=g.useRef(new Map).current;return p.jsx(o,{scope:y,itemMap:w,collectionRef:x,children:b})};i.displayName=t;const a=e+"CollectionSlot",l=rd(a),c=g.forwardRef((v,y)=>{const{scope:b,children:x}=v,w=s(a,b),k=fr(y,w.collectionRef);return p.jsx(l,{ref:k,children:x})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=rd(u),h=g.forwardRef((v,y)=>{const{scope:b,children:x,...w}=v,k=g.useRef(null),_=fr(y,k),E=s(u,b);return g.useEffect(()=>(E.itemMap.set(k,{ref:k,...w}),()=>void E.itemMap.delete(k))),p.jsx(f,{[d]:"",ref:_,children:x})});h.displayName=u;function m(v){const y=s(e+"CollectionConsumer",v);return g.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((E,T)=>w.indexOf(E.ref.current)-w.indexOf(T.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:c,ItemSlot:h},m,n]}var F1="Collapsible",[WLe,XY]=wi(F1),[ULe,J4]=WLe(F1),JY=D.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:s,onOpenChange:i,...a}=e,[l,c]=_l({prop:n,defaultProp:o??!1,onChange:i,caller:F1});return p.jsx(ULe,{scope:r,disabled:s,contentId:ma(),open:l,onOpenToggle:D.useCallback(()=>c(u=>!u),[c]),children:p.jsx(Ot.div,{"data-state":t7(l),"data-disabled":s?"":void 0,...a,ref:t})})});JY.displayName=F1;var eG="CollapsibleTrigger",tG=D.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=J4(eG,r);return p.jsx(Ot.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":t7(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:Ve(e.onClick,o.onOpenToggle)})});tG.displayName=eG;var e7="CollapsibleContent",rG=D.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=J4(e7,e.__scopeCollapsible);return p.jsx(Vs,{present:r||o.open,children:({present:s})=>p.jsx(qLe,{...n,ref:t,present:s})})});rG.displayName=e7;var qLe=D.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...s}=e,i=J4(e7,r),[a,l]=D.useState(n),c=D.useRef(null),u=fr(t,c),d=D.useRef(0),f=d.current,h=D.useRef(0),m=h.current,v=i.open||a,y=D.useRef(v),b=D.useRef(void 0);return D.useEffect(()=>{const x=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(x)},[]),Ci(()=>{const x=c.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();d.current=w.height,h.current=w.width,y.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),l(n)}},[i.open,n]),p.jsx(Ot.div,{"data-state":t7(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...s,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:v&&o})});function t7(e){return e?"open":"closed"}var YLe=JY,GLe=tG,KLe=rG,QLe=D.createContext(void 0);function r7(e){const t=D.useContext(QLe);return e||t||"ltr"}var Jo="Accordion",ZLe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[n7,XLe,JLe]=X4(Jo),[N1,oWe]=wi(Jo,[JLe,XY]),o7=XY(),nG=g.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,s=n;return p.jsx(n7.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?p.jsx(nFe,{...s,ref:t}):p.jsx(rFe,{...o,ref:t})})});nG.displayName=Jo;var[oG,eFe]=N1(Jo),[sG,tFe]=N1(Jo,{collapsible:!1}),rFe=g.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:s=!1,...i}=e,[a,l]=_l({prop:r,defaultProp:n??"",onChange:o,caller:Jo});return p.jsx(oG,{scope:e.__scopeAccordion,value:g.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:g.useCallback(()=>s&&l(""),[s,l]),children:p.jsx(sG,{scope:e.__scopeAccordion,collapsible:s,children:p.jsx(iG,{...i,ref:t})})})}),nFe=g.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[i,a]=_l({prop:r,defaultProp:n??[],onChange:o,caller:Jo}),l=g.useCallback(u=>a((d=[])=>[...d,u]),[a]),c=g.useCallback(u=>a((d=[])=>d.filter(f=>f!==u)),[a]);return p.jsx(oG,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:p.jsx(sG,{scope:e.__scopeAccordion,collapsible:!0,children:p.jsx(iG,{...s,ref:t})})})}),[oFe,R1]=N1(Jo),iG=g.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:s="vertical",...i}=e,a=g.useRef(null),l=fr(a,t),c=XLe(r),d=r7(o)==="ltr",f=Ve(e.onKeyDown,h=>{if(!ZLe.includes(h.key))return;const m=h.target,v=c().filter(C=>!C.ref.current?.disabled),y=v.findIndex(C=>C.ref.current===m),b=v.length;if(y===-1)return;h.preventDefault();let x=y;const w=0,k=b-1,_=()=>{x=y+1,x>k&&(x=w)},E=()=>{x=y-1,x<w&&(x=k)};switch(h.key){case"Home":x=w;break;case"End":x=k;break;case"ArrowRight":s==="horizontal"&&(d?_():E());break;case"ArrowDown":s==="vertical"&&_();break;case"ArrowLeft":s==="horizontal"&&(d?E():_());break;case"ArrowUp":s==="vertical"&&E();break}const T=x%b;v[T].ref.current?.focus()});return p.jsx(oFe,{scope:r,disabled:n,direction:o,orientation:s,children:p.jsx(n7.Slot,{scope:r,children:p.jsx(Ot.div,{...i,"data-orientation":s,ref:l,onKeyDown:n?void 0:f})})})}),B1="AccordionItem",[sFe,s7]=N1(B1),aG=g.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,s=R1(B1,r),i=eFe(B1,r),a=o7(r),l=ma(),c=n&&i.value.includes(n)||!1,u=s.disabled||e.disabled;return p.jsx(sFe,{scope:r,open:c,disabled:u,triggerId:l,children:p.jsx(YLe,{"data-orientation":s.orientation,"data-state":pG(c),...a,...o,ref:t,disabled:u,open:c,onOpenChange:d=>{d?i.onItemOpen(n):i.onItemClose(n)}})})});aG.displayName=B1;var lG="AccordionHeader",cG=g.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=R1(Jo,r),s=s7(lG,r);return p.jsx(Ot.h3,{"data-orientation":o.orientation,"data-state":pG(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});cG.displayName=lG;var i7="AccordionTrigger",uG=g.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=R1(Jo,r),s=s7(i7,r),i=tFe(i7,r),a=o7(r);return p.jsx(n7.ItemSlot,{scope:r,children:p.jsx(GLe,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...a,...n,ref:t})})});uG.displayName=i7;var dG="AccordionContent",fG=g.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=R1(Jo,r),s=s7(dG,r),i=o7(r);return p.jsx(KLe,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});fG.displayName=dG;function pG(e){return e?"open":"closed"}var iFe=nG,aFe=aG,lFe=cG,hG=uG,mG=fG;const cFe=iFe,gG=D.forwardRef(({className:e,...t},r)=>p.jsx(aFe,{ref:r,className:Ye("border-b",e),...t}));gG.displayName="AccordionItem";const vG=D.forwardRef(({className:e,children:t,chevronClassName:r,...n},o)=>p.jsx(lFe,{className:"flex",children:p.jsxs(hG,{ref:o,className:Ye("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,p.jsx(It.BlackChevronDown,{className:Ye("shrink-0 transition-transform duration-200",r)})]})}));vG.displayName=hG.displayName;const yG=D.forwardRef(({className:e,children:t,...r},n)=>p.jsx(mG,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:p.jsx("div",{className:Ye("pb-4 pt-0",e),children:t})}));yG.displayName=mG.displayName;function uFe(e){const t=D.useRef({value:e,previous:e});return D.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function bG(e){const[t,r]=D.useState(void 0);return Ci(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var V1="Checkbox",[dFe,sWe]=wi(V1),[fFe,a7]=dFe(V1);function pFe(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,h]=_l({prop:r,defaultProp:o??!1,onChange:l,caller:V1}),[m,v]=D.useState(null),[y,b]=D.useState(null),x=D.useRef(!1),w=m?!!i||!!m.closest("form"):!0,k={checked:f,disabled:s,setChecked:h,control:m,setControl:v,name:a,form:i,value:u,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:va(o)?!1:o,isFormControl:w,bubbleInput:y,setBubbleInput:b};return p.jsx(fFe,{scope:t,...k,children:hFe(d)?d(k):n})}var xG="CheckboxTrigger",wG=D.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:s,value:i,disabled:a,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:h,bubbleInput:m}=a7(xG,e),v=fr(o,u),y=D.useRef(l);return D.useEffect(()=>{const b=s?.form;if(b){const x=()=>d(y.current);return b.addEventListener("reset",x),()=>b.removeEventListener("reset",x)}},[s,d]),p.jsx(Ot.button,{type:"button",role:"checkbox","aria-checked":va(l)?"mixed":l,"aria-required":c,"data-state":EG(l),"data-disabled":a?"":void 0,disabled:a,value:i,...n,ref:v,onKeyDown:Ve(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:Ve(r,b=>{d(x=>va(x)?!0:!x),m&&h&&(f.current=b.isPropagationStopped(),f.current||b.stopPropagation())})})});wG.displayName=xG;var l7=D.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:s,required:i,disabled:a,value:l,onCheckedChange:c,form:u,...d}=e;return p.jsx(pFe,{__scopeCheckbox:r,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>p.jsxs(p.Fragment,{children:[p.jsx(wG,{...d,ref:t,__scopeCheckbox:r}),f&&p.jsx(_G,{__scopeCheckbox:r})]})})});l7.displayName=V1;var CG="CheckboxIndicator",kG=D.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,s=a7(CG,r);return p.jsx(Vs,{present:n||va(s.checked)||s.checked===!0,children:p.jsx(Ot.span,{"data-state":EG(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});kG.displayName=CG;var SG="CheckboxBubbleInput",_G=D.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:h}=a7(SG,e),m=fr(r,h),v=uFe(s),y=bG(n);D.useEffect(()=>{const x=f;if(!x)return;const w=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(w,"checked").set,E=!o.current;if(v!==s&&_){const T=new Event("click",{bubbles:E});x.indeterminate=va(s),_.call(x,va(s)?!1:s),x.dispatchEvent(T)}},[f,v,s,o]);const b=D.useRef(va(s)?!1:s);return p.jsx(Ot.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??b.current,required:a,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});_G.displayName=SG;function hFe(e){return typeof e=="function"}function va(e){return e==="indeterminate"}function EG(e){return va(e)?"indeterminate":e?"checked":"unchecked"}/**
|
|
549
|
+
*/var KY;function FLe(){return KY||(KY=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=g,t=YY();function r(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,m){var v=s(null),y;v.current===null?(y={hasValue:!1,value:null},v.current=y):y=v.current;var b=a(function(){var _=!1,E,T,C=function(O){if(!_){_=!0,E=O;var R=h(O);if(m!==void 0&&y.hasValue){var $=y.value;if(m($,R))return T=$,$}return T=R,R}var W=E,L=T;if(n(W,O))return L;var F=h(O);return m!==void 0&&m(L,F)?L:(E=O,T=F,F)},P=f===void 0?null:f,S=function(){return C(d())},M=P===null?void 0:function(){return C(P())};return[S,M]},[d,f,h,m]),x=b[0],w=b[1],k=o(u,x,w);return i(function(){y.hasValue=!0,y.value=k},[k]),l(k),k}Q4.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Q4}var QY;function NLe(){return QY||(QY=1,process.env.NODE_ENV==="production"?I1.exports=LLe():I1.exports=FLe()),I1.exports}var RLe=NLe();const BLe=Po(RLe),VLe={},{useSyncExternalStoreWithSelector:zLe}=BLe;function HLe(e,t=e.getState,r){const n=zLe(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return g.useDebugValue(n),n}const ZY=e=>{(VLe&&"production")!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?jLe(e):e,r=(n,o)=>HLe(t,n,o);return Object.assign(r,t),r},Z4=e=>e?ZY(e):ZY,L1={search:"",sortBy:"",productTypes:[],collectionId:[]},Or=Z4(e=>({stagedProductQuery:L1,appliedProductQuery:L1,viewMode:"grid",setStagedProductQuery:(t,r)=>e(n=>({stagedProductQuery:{...n.stagedProductQuery,[t]:r}})),applyStagedFilters:()=>e(t=>({appliedProductQuery:{...t.stagedProductQuery,search:t?.stagedProductQuery?.search?.trim()}})),resetProductQuery:()=>e(()=>({stagedProductQuery:L1,appliedProductQuery:L1})),setViewMode:t=>e(()=>({viewMode:t}))}));function X4(e){const t=e+"CollectionProvider",[r,n]=wi(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:y,children:b}=v,x=g.useRef(null),w=g.useRef(new Map).current;return p.jsx(o,{scope:y,itemMap:w,collectionRef:x,children:b})};i.displayName=t;const a=e+"CollectionSlot",l=rd(a),c=g.forwardRef((v,y)=>{const{scope:b,children:x}=v,w=s(a,b),k=fr(y,w.collectionRef);return p.jsx(l,{ref:k,children:x})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=rd(u),h=g.forwardRef((v,y)=>{const{scope:b,children:x,...w}=v,k=g.useRef(null),_=fr(y,k),E=s(u,b);return g.useEffect(()=>(E.itemMap.set(k,{ref:k,...w}),()=>void E.itemMap.delete(k))),p.jsx(f,{[d]:"",ref:_,children:x})});h.displayName=u;function m(v){const y=s(e+"CollectionConsumer",v);return g.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((E,T)=>w.indexOf(E.ref.current)-w.indexOf(T.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:c,ItemSlot:h},m,n]}var F1="Collapsible",[WLe,XY]=wi(F1),[ULe,J4]=WLe(F1),JY=D.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:s,onOpenChange:i,...a}=e,[l,c]=_l({prop:n,defaultProp:o??!1,onChange:i,caller:F1});return p.jsx(ULe,{scope:r,disabled:s,contentId:ma(),open:l,onOpenToggle:D.useCallback(()=>c(u=>!u),[c]),children:p.jsx(Ot.div,{"data-state":t7(l),"data-disabled":s?"":void 0,...a,ref:t})})});JY.displayName=F1;var eG="CollapsibleTrigger",tG=D.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=J4(eG,r);return p.jsx(Ot.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":t7(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:Ve(e.onClick,o.onOpenToggle)})});tG.displayName=eG;var e7="CollapsibleContent",rG=D.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=J4(e7,e.__scopeCollapsible);return p.jsx(Vs,{present:r||o.open,children:({present:s})=>p.jsx(qLe,{...n,ref:t,present:s})})});rG.displayName=e7;var qLe=D.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...s}=e,i=J4(e7,r),[a,l]=D.useState(n),c=D.useRef(null),u=fr(t,c),d=D.useRef(0),f=d.current,h=D.useRef(0),m=h.current,v=i.open||a,y=D.useRef(v),b=D.useRef(void 0);return D.useEffect(()=>{const x=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(x)},[]),Ci(()=>{const x=c.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();d.current=w.height,h.current=w.width,y.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),l(n)}},[i.open,n]),p.jsx(Ot.div,{"data-state":t7(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...s,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:v&&o})});function t7(e){return e?"open":"closed"}var YLe=JY,GLe=tG,KLe=rG,QLe=D.createContext(void 0);function r7(e){const t=D.useContext(QLe);return e||t||"ltr"}var Jo="Accordion",ZLe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[n7,XLe,JLe]=X4(Jo),[N1,oWe]=wi(Jo,[JLe,XY]),o7=XY(),nG=g.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,s=n;return p.jsx(n7.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?p.jsx(nFe,{...s,ref:t}):p.jsx(rFe,{...o,ref:t})})});nG.displayName=Jo;var[oG,eFe]=N1(Jo),[sG,tFe]=N1(Jo,{collapsible:!1}),rFe=g.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:s=!1,...i}=e,[a,l]=_l({prop:r,defaultProp:n??"",onChange:o,caller:Jo});return p.jsx(oG,{scope:e.__scopeAccordion,value:g.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:g.useCallback(()=>s&&l(""),[s,l]),children:p.jsx(sG,{scope:e.__scopeAccordion,collapsible:s,children:p.jsx(iG,{...i,ref:t})})})}),nFe=g.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...s}=e,[i,a]=_l({prop:r,defaultProp:n??[],onChange:o,caller:Jo}),l=g.useCallback(u=>a((d=[])=>[...d,u]),[a]),c=g.useCallback(u=>a((d=[])=>d.filter(f=>f!==u)),[a]);return p.jsx(oG,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:p.jsx(sG,{scope:e.__scopeAccordion,collapsible:!0,children:p.jsx(iG,{...s,ref:t})})})}),[oFe,R1]=N1(Jo),iG=g.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:s="vertical",...i}=e,a=g.useRef(null),l=fr(a,t),c=XLe(r),d=r7(o)==="ltr",f=Ve(e.onKeyDown,h=>{if(!ZLe.includes(h.key))return;const m=h.target,v=c().filter(C=>!C.ref.current?.disabled),y=v.findIndex(C=>C.ref.current===m),b=v.length;if(y===-1)return;h.preventDefault();let x=y;const w=0,k=b-1,_=()=>{x=y+1,x>k&&(x=w)},E=()=>{x=y-1,x<w&&(x=k)};switch(h.key){case"Home":x=w;break;case"End":x=k;break;case"ArrowRight":s==="horizontal"&&(d?_():E());break;case"ArrowDown":s==="vertical"&&_();break;case"ArrowLeft":s==="horizontal"&&(d?E():_());break;case"ArrowUp":s==="vertical"&&E();break}const T=x%b;v[T].ref.current?.focus()});return p.jsx(oFe,{scope:r,disabled:n,direction:o,orientation:s,children:p.jsx(n7.Slot,{scope:r,children:p.jsx(Ot.div,{...i,"data-orientation":s,ref:l,onKeyDown:n?void 0:f})})})}),B1="AccordionItem",[sFe,s7]=N1(B1),aG=g.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,s=R1(B1,r),i=eFe(B1,r),a=o7(r),l=ma(),c=n&&i.value.includes(n)||!1,u=s.disabled||e.disabled;return p.jsx(sFe,{scope:r,open:c,disabled:u,triggerId:l,children:p.jsx(YLe,{"data-orientation":s.orientation,"data-state":pG(c),...a,...o,ref:t,disabled:u,open:c,onOpenChange:d=>{d?i.onItemOpen(n):i.onItemClose(n)}})})});aG.displayName=B1;var lG="AccordionHeader",cG=g.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=R1(Jo,r),s=s7(lG,r);return p.jsx(Ot.h3,{"data-orientation":o.orientation,"data-state":pG(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});cG.displayName=lG;var i7="AccordionTrigger",uG=g.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=R1(Jo,r),s=s7(i7,r),i=tFe(i7,r),a=o7(r);return p.jsx(n7.ItemSlot,{scope:r,children:p.jsx(GLe,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...a,...n,ref:t})})});uG.displayName=i7;var dG="AccordionContent",fG=g.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=R1(Jo,r),s=s7(dG,r),i=o7(r);return p.jsx(KLe,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});fG.displayName=dG;function pG(e){return e?"open":"closed"}var iFe=nG,aFe=aG,lFe=cG,hG=uG,mG=fG;const cFe=iFe,gG=D.forwardRef(({className:e,...t},r)=>p.jsx(aFe,{ref:r,className:Ye("border-b",e),...t}));gG.displayName="AccordionItem";const vG=D.forwardRef(({className:e,children:t,chevronClassName:r,...n},o)=>p.jsx(lFe,{className:"flex",children:p.jsxs(hG,{ref:o,className:Ye("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,p.jsx(It.BlackChevronDown,{className:Ye("shrink-0 transition-transform duration-200",r)})]})}));vG.displayName=hG.displayName;const yG=D.forwardRef(({className:e,children:t,...r},n)=>p.jsx(mG,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:p.jsx("div",{className:Ye("pb-4 pt-0",e),children:t})}));yG.displayName=mG.displayName;function uFe(e){const t=D.useRef({value:e,previous:e});return D.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function bG(e){const[t,r]=D.useState(void 0);return Ci(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var V1="Checkbox",[dFe,sWe]=wi(V1),[fFe,a7]=dFe(V1);function pFe(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,h]=_l({prop:r,defaultProp:o??!1,onChange:l,caller:V1}),[m,v]=D.useState(null),[y,b]=D.useState(null),x=D.useRef(!1),w=m?!!i||!!m.closest("form"):!0,k={checked:f,disabled:s,setChecked:h,control:m,setControl:v,name:a,form:i,value:u,hasConsumerStoppedPropagationRef:x,required:c,defaultChecked:va(o)?!1:o,isFormControl:w,bubbleInput:y,setBubbleInput:b};return p.jsx(fFe,{scope:t,...k,children:hFe(d)?d(k):n})}var xG="CheckboxTrigger",wG=D.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:s,value:i,disabled:a,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:h,bubbleInput:m}=a7(xG,e),v=fr(o,u),y=D.useRef(l);return D.useEffect(()=>{const b=s?.form;if(b){const x=()=>d(y.current);return b.addEventListener("reset",x),()=>b.removeEventListener("reset",x)}},[s,d]),p.jsx(Ot.button,{type:"button",role:"checkbox","aria-checked":va(l)?"mixed":l,"aria-required":c,"data-state":EG(l),"data-disabled":a?"":void 0,disabled:a,value:i,...n,ref:v,onKeyDown:Ve(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:Ve(r,b=>{d(x=>va(x)?!0:!x),m&&h&&(f.current=b.isPropagationStopped(),f.current||b.stopPropagation())})})});wG.displayName=xG;var l7=D.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:s,required:i,disabled:a,value:l,onCheckedChange:c,form:u,...d}=e;return p.jsx(pFe,{__scopeCheckbox:r,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>p.jsxs(p.Fragment,{children:[p.jsx(wG,{...d,ref:t,__scopeCheckbox:r}),f&&p.jsx(_G,{__scopeCheckbox:r})]})})});l7.displayName=V1;var CG="CheckboxIndicator",kG=D.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,s=a7(CG,r);return p.jsx(Vs,{present:n||va(s.checked)||s.checked===!0,children:p.jsx(Ot.span,{"data-state":EG(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});kG.displayName=CG;var SG="CheckboxBubbleInput",_G=D.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:h}=a7(SG,e),m=fr(r,h),v=uFe(s),y=bG(n);D.useEffect(()=>{const x=f;if(!x)return;const w=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(w,"checked").set,E=!o.current;if(v!==s&&_){const T=new Event("click",{bubbles:E});x.indeterminate=va(s),_.call(x,va(s)?!1:s),x.dispatchEvent(T)}},[f,v,s,o]);const b=D.useRef(va(s)?!1:s);return p.jsx(Ot.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??b.current,required:a,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});_G.displayName=SG;function hFe(e){return typeof e=="function"}function va(e){return e==="indeterminate"}function EG(e){return va(e)?"indeterminate":e?"checked":"unchecked"}/**
|
|
550
550
|
* @license lucide-react v0.525.0 - ISC
|
|
551
551
|
*
|
|
552
552
|
* This source code is licensed under the ISC license.
|
package/package.json
CHANGED
|
@@ -38,7 +38,10 @@ const useProductQueryStore = create<ProductQueryStore>((set) => ({
|
|
|
38
38
|
})),
|
|
39
39
|
|
|
40
40
|
applyStagedFilters: () => set((state) => ({
|
|
41
|
-
appliedProductQuery: {
|
|
41
|
+
appliedProductQuery: {
|
|
42
|
+
...state.stagedProductQuery,
|
|
43
|
+
search: state?.stagedProductQuery?.search?.trim()
|
|
44
|
+
}
|
|
42
45
|
})),
|
|
43
46
|
|
|
44
47
|
resetProductQuery: () => set(() => ({
|