@next-degree/pickle-shared-js 0.3.16 → 0.3.18

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.
@@ -1,2 +1,2 @@
1
- import{useState as ye}from"react";import{forwardRef as $e,useEffect as qe,useState as he}from"react";import{ChevronDownIcon as Qe,CircleX as Ze,icons as je}from"lucide-react";import{cva as et}from"cva";import{clsx as De}from"clsx";import{twMerge as Se}from"tailwind-merge";function a(...e){return Se(De(e))}import{Command as p}from"cmdk";import{Search as ze}from"lucide-react";import*as b from"react";import*as r from"@radix-ui/react-dialog";import{X as Ie}from"lucide-react";import*as D from"react";import{jsx as y,jsxs as H}from"react/jsx-runtime";var Ee=r.Portal;var ee=D.forwardRef(({className:e,...t},o)=>y(r.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ee.displayName=r.Overlay.displayName;var te=D.forwardRef(({className:e,children:t,...o},n)=>H(Ee,{children:[y(ee,{}),H(r.Content,{ref:n,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...o,children:[t,H(r.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[y(Ie,{className:"h-4 w-4"}),y("span",{className:"sr-only",children:"Close"})]})]})]}));te.displayName=r.Content.displayName;var Te=({className:e,...t})=>y("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Te.displayName="DialogHeader";var Le=({className:e,...t})=>y("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Le.displayName="DialogFooter";var We=D.forwardRef(({className:e,...t},o)=>y(r.Title,{ref:o,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));We.displayName=r.Title.displayName;var Ve=D.forwardRef(({className:e,...t},o)=>y(r.Description,{ref:o,className:a("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));Ve.displayName=r.Description.displayName;import{jsx as v,jsxs as Be}from"react/jsx-runtime";var A=b.forwardRef(({className:e,...t},o)=>v(p,{ref:o,className:a("flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950",e),...t}));A.displayName=p.displayName;var O=b.forwardRef(({className:e,...t},o)=>Be("div",{className:"m-1 flex items-center rounded-xl border px-3","cmdk-input-wrapper":"",children:[v(ze,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),v(p.Input,{ref:o,className:a("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));O.displayName=p.Input.displayName;var G=b.forwardRef(({className:e,...t},o)=>v(p.List,{ref:o,className:a("overflow-y-auto overflow-x-hidden",e),...t}));G.displayName=p.List.displayName;var F=b.forwardRef((e,t)=>v(p.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));F.displayName=p.Empty.displayName;var Y=b.forwardRef(({className:e,...t},o)=>v(p.Group,{ref:o,className:a("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500",e),...t}));Y.displayName=p.Group.displayName;var _e=b.forwardRef(({className:e,...t},o)=>v(p.Separator,{ref:o,className:a("-mx-1 h-px bg-neutral-200",e),...t}));_e.displayName=p.Separator.displayName;var J=b.forwardRef(({className:e,...t},o)=>v(p.Item,{ref:o,className:a("relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50",e),...t}));J.displayName=p.Item.displayName;var Me=({className:e,...t})=>v("span",{className:a("ml-auto text-xs tracking-widest text-neutral-500",e),...t});Me.displayName="CommandShortcut";import*as ae from"react";import*as h from"@radix-ui/react-popover";import{jsx as oe}from"react/jsx-runtime";var ie=h.Root,re=h.Trigger,K=ae.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},i)=>oe(h.Portal,{children:oe(h.Content,{ref:i,align:t,sideOffset:o,className:a("z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));K.displayName=h.Content.displayName;import*as U from"@radix-ui/react-separator";import*as ne from"react";import{jsx as He}from"react/jsx-runtime";var X=ne.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...n},i)=>He(U.Root,{ref:i,decorative:o,orientation:t,className:a("shrink-0 bg-grey-10",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));X.displayName=U.Root.displayName;import{CheckIcon as Ge}from"lucide-react";import*as I from"@radix-ui/react-checkbox";import{Check as Ae,Minus as Oe}from"lucide-react";import{forwardRef as le}from"react";import{jsx as S,jsxs as de}from"react/jsx-runtime";var se=le(({className:e,...t},o)=>S(I.Root,{ref:o,className:a("group","peer","h-5","w-5","shrink-0","rounded-md","border","border-grey-10","outline","outline-1","outline-offset-2","outline-transparent","hover:border-grey-20","focus:outline-purple-100","active:border-green-80","disabled:cursor-not-allowed","disabled:opacity-50","data-[state=checked]:bg-green-80","data-[state=indeterminate]:bg-green-80","data-[state=checked]:text-white","data-[state=indeterminate]:text-primary-foreground",t.disabled&&"data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20",e),...t,children:de(I.Indicator,{className:"flex items-center justify-center text-current",children:[S(Ae,{className:"hidden h-4 w-4 group-data-[state=checked]:block"}),S(Oe,{className:"hidden h-4 w-4 group-data-[state=indeterminate]:block"})]})}));se.displayName=I.Root.displayName;var me=le(({classNames:e,children:t,...o},n)=>{let{disabled:i}=o,d=o.id??`${o.name??o.value?.toString()}-checkbox`,m=i?"text-grey-40 pointer-events-none":"";return de("div",{className:a("flex space-x-2",e?.wrapper),children:[S(se,{id:d,disabled:i,ref:n,...o}),S("label",{htmlFor:d,className:a(m,e?.label),children:t})]})});me.displayName="Checkbox";var pe=me;import{icons as ce}from"lucide-react";import{jsx as R,jsxs as fe}from"react/jsx-runtime";function Fe({icon:e,hasCheckbox:t,isSelected:o,className:n,title:i,value:d,description:m,..._}){let L=e?(x=>{if(x in ce){let M=ce[x];return R(M,{size:14})}return null})(e):void 0;return fe("li",{className:a("group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm",n),..._,"data-state":o?"checked":"unchecked",children:[L&&R("span",{className:"mr-2",children:L}),t&&R(pe,{id:d,checked:o,onClick:x=>x.preventDefault()}),fe("div",{children:[R("p",{children:i}),R("p",{className:"text-xs text-grey-80",children:m})]}),R(Ge,{className:"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",size:16})]})}var ue=Fe;import{cva as Ye}from"cva";import{jsx as Ke}from"react/jsx-runtime";var Je=Ye("rounded-full px-2 py-0.5 text-xs font-semibold",{variants:{variant:{green:"bg-green-90 text-white",pickle:"bg-pickle-100 text-black",purple:"bg-purple-100 text-white"}},defaultVariants:{variant:"green"}});function ge({className:e,variant:t,...o}){return Ke("div",{className:a(Je({variant:t}),e),...o})}import{jsx as Xe}from"react/jsx-runtime";function Ue({text:e,className:t,...o}){return e?Xe("label",{className:a("text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...o,children:e}):null}var ve=Ue;import{jsx as s,jsxs as N}from"react/jsx-runtime";var E=$e((e,t)=>{let{value:o,label:n,options:i,classNames:d,multiselect:m,placeholder:_,variant:T="default",size:L,icon:x,className:M,onChange:W,children:B}=e,[u,V]=he([]),[$,q]=he(!1),Q=x&&je[x],Pe=i?.length<=5,k=T==="default",Re=T==="chip",Z=()=>q(!1);qe(()=>{V((m?o??[]:o?[o]:[]).map(l=>i.find(g=>g.value===l)).filter(l=>l!==void 0))},[o]);let Ne=C=>{let l=i.find(g=>g.value===C);if(l){if(m)return V(g=>{let j=g.some(w=>w.value===C)?g.filter(w=>w!==l):[...g,l];return W?.(j.map(w=>w.value)),j});V([l]),W?.(l.value),Z()}},ke=()=>{V([]),W?.(m?[]:"")},we=()=>{let C=u.length>0?u.map(l=>l.title).join(", "):_;return k?C:n};return N("div",{className:a("flex flex-col gap-2",M),children:[k&&n&&s(ve,{text:n,className:d?.label}),N("div",{className:"relative flex",children:[N(ie,{open:$,onOpenChange:q,children:[s(re,{asChild:!0,disabled:i.length===0,children:N("div",{ref:t,className:a(tt({variant:T,size:L}),u.length>0&&"pr-10",d?.trigger),"aria-expanded":$,children:[k&&Q&&s(Q,{className:"h-4 w-4 shrink-0"}),Re&&u.length>0&&s(ge,{variant:"purple",children:u.length}),s("span",{className:a("w-full truncate leading-normal",k&&u.length==0&&"text-grey-40"),children:we()}),u.length==0&&s(Qe,{className:"shrink-0 transform group-data-[state=open]:rotate-180",size:"16"})]})}),s(A,{children:N(K,{className:a("flex w-full max-w-xs flex-col overflow-hidden p-0","max-h-[--radix-popover-content-available-height]",d?.content),collisionPadding:8,sideOffset:4,align:"start",children:[!Pe&&s(O,{placeholder:"Search..."}),N(G,{children:[s(F,{children:"No results"}),s(Y,{children:i.map(({id:C,...l})=>s(J,{value:l.value,onSelect:Ne,children:s(ue,{className:a(d?.items,"truncate py-1"),isSelected:u.some(g=>g.value===l.value),hasCheckbox:m,...l})},C))})]}),!!B&&s(X,{}),B&&B({close:Z})]})})]}),k&&u.length>0&&s("button",{type:"button",className:"absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",onClick:ke,children:s(Ze,{className:"h-4 w-4 text-green-100"})})]})]})});E.displayName="Combobox";var tt=et("group relative cursor-pointer text-green-100 flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5",{variants:{variant:{default:["w-full","max-w-80","rounded-lg"],chip:["font-bold","rounded-3xl","data-[state=open]:bg-black","data-[state=open]:text-white"]},size:{small:["h-8","p-1","pl-2","text-xs"],normal:["h-9","p-2","pl-3","text-sm"],large:["h-10","p-3","pl-4","text-base"]}},defaultVariants:{variant:"default",size:"normal"}});import{Slot as ot}from"@radix-ui/react-slot";import{cva as at}from"cva";import{forwardRef as it}from"react";import{jsx as nt}from"react/jsx-runtime";var z=it(({className:e,variant:t,size:o,asChild:n=!1,...i},d)=>nt(n?ot:"button",{className:a(rt({variant:t,size:o,className:e})),ref:d,...i}));z.displayName="Button";var rt=at(["flex","items-center","justify-center","gap-2","rounded-full","font-bold","outline-2","outline-offset-2","outline-dashed","outline-transparent"],{variants:{variant:{neutral:["bg-black","text-white","hover:bg-grey-90","active:bg-grey-80","focus:outline-purple-100","disabled:text-grey-40","disabled:bg-grey-10"],primary:["bg-pickle-100","text-black","hover:bg-pickle-80","active:bg-pickle-60","focus:outline-purple-100","disabled:text-grey-40","disabled:bg-grey-10"],secondary:["bg-green-80","text-white","hover:bg-green-90","active:bg-green-100","focus:outline-pickle-100","disabled:text-grey-40","disabled:bg-grey-10"],transparent:["text-white","hover:bg-green-80","active:bg-green-100","focus:outline-pickle-100","disabled:text-grey-40"],link:["leading-tight","text-black","underline","hover:text-purple-100","focus:text-black","focus:outline-purple-100","active:text-purple-80"]},size:{small:["h-10","text-sm","px-4","py-2"],medium:["h-12","text-base","px-6","py-3"],large:["h-14","text-lg","px-8","py-4"]}},defaultVariants:{variant:"neutral",size:"medium"},compoundVariants:[{variant:"link",size:"small",class:["h-3","text-xs","p-0"]},{variant:"link",size:"medium",class:["h-4","text-sm","p-0"]},{variant:"link",size:"large",class:["h-6","text-base","p-0"]}]});import{jsx as P,jsxs as be}from"react/jsx-runtime";function lt(){let[e,t]=ye([]),[o,n]=ye(""),i=[{title:"Nirvana",value:"Nirvana",description:"Come As You Are",id:1},{title:"Pearl Jam",value:"Pearl Jam",description:"Jeremy",id:2},{title:"Soundgarden",value:"Soundgarden",description:"Rusty Cage",id:3},{title:"Alice in Chains",value:"Alice in Chains",description:"Would?",id:4},{title:"Stone Temple Pilots",value:"Stone Temple Pilots",id:5},{title:"Hole",value:"Hole",id:6},{title:"Mudhoney",value:"Mudhoney",id:7},{title:"Screaming Trees",value:"Screaming Trees",id:8},{title:"L7",value:"L7",id:9},{title:"Sonic Youth",value:"Sonic Youth",id:10},{title:"And You Will Know Us by the Trail of Dead",value:"And You Will Know Us by the Trail of Dead",id:11}];return be("div",{className:"flex flex-row flex-wrap items-center gap-4 p-4",children:[P(E,{label:"US bands from the 90's",placeholder:"Select a band",icon:"Music",options:i,multiselect:!0,onChange:t,value:e}),P(E,{label:"US bands from the 90's",options:i,variant:"chip",multiselect:!0,onChange:t,value:e}),P(E,{label:"Fruit label",variant:"chip",options:[{title:"Cherry",value:"Cherry",id:1,icon:"Cherry"},{title:"Grape",value:"Grape",id:2,icon:"Grape"}],value:o,onChange:n,children:({close:m})=>be("div",{className:"flex flex-row items-center justify-between bg-white p-2 pl-4",children:[P(z,{variant:"link",tabIndex:-1,onClick:m,children:"Clear"}),P(z,{variant:"primary",size:"small",tabIndex:-1,children:"Apply"})]})}),e.map(m=>P("span",{className:"text-green-80",children:m},m)),P("span",{className:"text-purple-100",children:o})]})}var xe=lt;import{jsx as Ce}from"react/jsx-runtime";function st(){return Ce("div",{children:Ce(xe,{})})}var Lo=st;export{Lo as default};
1
+ import{useState as ye}from"react";import{forwardRef as $e,useEffect as qe,useState as he}from"react";import{ChevronDownIcon as Qe,CircleX as Ze,icons as je}from"lucide-react";import{cva as et}from"cva";import{clsx as De}from"clsx";import{twMerge as Se}from"tailwind-merge";function a(...e){return Se(De(e))}import{Command as p}from"cmdk";import{Search as ze}from"lucide-react";import*as x from"react";import*as r from"@radix-ui/react-dialog";import{X as Ie}from"lucide-react";import*as D from"react";import{jsx as y,jsxs as H}from"react/jsx-runtime";var Ee=r.Portal;var ee=D.forwardRef(({className:e,...t},o)=>y(r.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ee.displayName=r.Overlay.displayName;var te=D.forwardRef(({className:e,children:t,...o},n)=>H(Ee,{children:[y(ee,{}),H(r.Content,{ref:n,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...o,children:[t,H(r.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[y(Ie,{className:"h-4 w-4"}),y("span",{className:"sr-only",children:"Close"})]})]})]}));te.displayName=r.Content.displayName;var Te=({className:e,...t})=>y("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Te.displayName="DialogHeader";var Le=({className:e,...t})=>y("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Le.displayName="DialogFooter";var We=D.forwardRef(({className:e,...t},o)=>y(r.Title,{ref:o,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));We.displayName=r.Title.displayName;var Ve=D.forwardRef(({className:e,...t},o)=>y(r.Description,{ref:o,className:a("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));Ve.displayName=r.Description.displayName;import{jsx as v,jsxs as Be}from"react/jsx-runtime";var A=x.forwardRef(({className:e,...t},o)=>v(p,{ref:o,className:a("flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950",e),...t}));A.displayName=p.displayName;var O=x.forwardRef(({className:e,...t},o)=>Be("div",{className:"m-1 flex items-center rounded-xl border px-3","cmdk-input-wrapper":"",children:[v(ze,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),v(p.Input,{ref:o,className:a("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));O.displayName=p.Input.displayName;var G=x.forwardRef(({className:e,...t},o)=>v(p.List,{ref:o,className:a("overflow-y-auto overflow-x-hidden",e),...t}));G.displayName=p.List.displayName;var F=x.forwardRef((e,t)=>v(p.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));F.displayName=p.Empty.displayName;var Y=x.forwardRef(({className:e,...t},o)=>v(p.Group,{ref:o,className:a("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500",e),...t}));Y.displayName=p.Group.displayName;var _e=x.forwardRef(({className:e,...t},o)=>v(p.Separator,{ref:o,className:a("-mx-1 h-px bg-neutral-200",e),...t}));_e.displayName=p.Separator.displayName;var J=x.forwardRef(({className:e,...t},o)=>v(p.Item,{ref:o,className:a("relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50",e),...t}));J.displayName=p.Item.displayName;var Me=({className:e,...t})=>v("span",{className:a("ml-auto text-xs tracking-widest text-neutral-500",e),...t});Me.displayName="CommandShortcut";import*as ae from"react";import*as h from"@radix-ui/react-popover";import{jsx as oe}from"react/jsx-runtime";var ie=h.Root,re=h.Trigger,K=ae.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},i)=>oe(h.Portal,{children:oe(h.Content,{ref:i,align:t,sideOffset:o,className:a("z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));K.displayName=h.Content.displayName;import*as U from"@radix-ui/react-separator";import*as ne from"react";import{jsx as He}from"react/jsx-runtime";var X=ne.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...n},i)=>He(U.Root,{ref:i,decorative:o,orientation:t,className:a("shrink-0 bg-grey-10",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));X.displayName=U.Root.displayName;import{CheckIcon as Ge}from"lucide-react";import*as I from"@radix-ui/react-checkbox";import{Check as Ae,Minus as Oe}from"lucide-react";import{forwardRef as le}from"react";import{jsx as S,jsxs as de}from"react/jsx-runtime";var se=le(({className:e,...t},o)=>S(I.Root,{ref:o,className:a("group","peer","h-5","w-5","shrink-0","rounded-md","border","border-grey-10","outline","outline-1","outline-offset-2","outline-transparent","hover:border-grey-20","focus:outline-purple-100","active:border-green-80","disabled:cursor-not-allowed","disabled:opacity-50","data-[state=checked]:bg-green-80","data-[state=indeterminate]:bg-green-80","data-[state=checked]:text-white","data-[state=indeterminate]:text-primary-foreground",t.disabled&&"data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20",e),...t,children:de(I.Indicator,{className:"flex items-center justify-center text-current",children:[S(Ae,{className:"hidden h-4 w-4 group-data-[state=checked]:block"}),S(Oe,{className:"hidden h-4 w-4 group-data-[state=indeterminate]:block"})]})}));se.displayName=I.Root.displayName;var me=le(({classNames:e,children:t,...o},n)=>{let{disabled:i}=o,d=o.id??`${o.name??o.value?.toString()}-checkbox`,m=i?"text-grey-40 pointer-events-none":"";return de("div",{className:a("flex space-x-2",e?.wrapper),children:[S(se,{id:d,disabled:i,ref:n,...o}),S("label",{htmlFor:d,className:a(m,e?.label),children:t})]})});me.displayName="Checkbox";var pe=me;import{icons as ce}from"lucide-react";import{jsx as R,jsxs as fe}from"react/jsx-runtime";function Fe({icon:e,hasCheckbox:t,isSelected:o,className:n,title:i,value:d,description:m,..._}){let L=e?(b=>{if(b in ce){let M=ce[b];return R(M,{size:14})}return null})(e):void 0;return fe("li",{className:a("group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm",n),..._,"data-state":o?"checked":"unchecked",children:[L&&R("span",{className:"mr-2",children:L}),t&&R(pe,{id:d,checked:o,onClick:b=>b.preventDefault()}),fe("div",{children:[R("p",{children:i}),R("p",{className:"text-xs text-grey-80",children:m})]}),R(Ge,{className:"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",size:16})]})}var ue=Fe;import{cva as Ye}from"cva";import{jsx as Ke}from"react/jsx-runtime";var Je=Ye("rounded-full px-2 py-0.5 text-xs font-semibold",{variants:{variant:{green:"bg-green-90 text-white",pickle:"bg-pickle-100 text-black",purple:"bg-purple-100 text-white"}},defaultVariants:{variant:"green"}});function ge({className:e,variant:t,...o}){return Ke("div",{className:a(Je({variant:t}),e),...o})}import{jsx as Xe}from"react/jsx-runtime";function Ue({text:e,className:t,...o}){return e?Xe("label",{className:a("text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...o,children:e}):null}var ve=Ue;import{jsx as s,jsxs as N}from"react/jsx-runtime";var E=$e((e,t)=>{let{value:o,label:n,options:i,classNames:d,multiselect:m,placeholder:_,variant:T="default",size:L,icon:b,className:M,onChange:W,children:B}=e,[u,V]=he([]),[$,q]=he(!1),Q=b&&je[b],Pe=i?.length<=5,k=T==="default",Re=T==="chip",Z=()=>q(!1);qe(()=>{V((m?o??[]:o?[o]:[]).map(l=>i.find(g=>g.value===l)).filter(l=>l!==void 0))},[o]);let Ne=C=>{let l=i.find(g=>g.value===C);if(l){if(m)return V(g=>{let j=g.some(w=>w.value===C)?g.filter(w=>w!==l):[...g,l];return W?.(j.map(w=>w.value)),j});V([l]),W?.(l.value),Z()}},ke=()=>{V([]),W?.(m?[]:"")},we=()=>{let C=u.length>0?u.map(l=>l.title).join(", "):_;return k?C:n};return N("div",{className:a("flex flex-col gap-2",M),children:[k&&n&&s(ve,{text:n,className:d?.label}),N("div",{className:"relative flex",children:[N(ie,{open:$,onOpenChange:q,children:[s(re,{asChild:!0,disabled:i.length===0,children:N("div",{ref:t,className:a(tt({variant:T,size:L}),u.length>0&&"pr-10",d?.trigger),"aria-expanded":$,children:[k&&Q&&s(Q,{className:"h-4 w-4 shrink-0"}),Re&&u.length>0&&s(ge,{variant:"purple",children:u.length}),s("span",{className:a("w-full truncate leading-normal",k&&u.length==0&&"text-grey-40"),children:we()}),u.length==0&&s(Qe,{className:"shrink-0 transform group-data-[state=open]:rotate-180",size:"16"})]})}),s(A,{children:N(K,{className:a("flex w-full max-w-xs flex-col overflow-hidden p-0","max-h-[--radix-popover-content-available-height]",d?.content),collisionPadding:8,sideOffset:4,align:"start",children:[!Pe&&s(O,{placeholder:"Search..."}),N(G,{children:[s(F,{children:"No results"}),s(Y,{children:i.map(({id:C,...l})=>s(J,{value:l.value,onSelect:Ne,children:s(ue,{className:a(d?.items,"truncate py-1"),isSelected:u.some(g=>g.value===l.value),hasCheckbox:m,...l})},C))})]}),!!B&&s(X,{}),B&&B({close:Z})]})})]}),k&&u.length>0&&s("button",{type:"button",className:"absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",onClick:ke,children:s(Ze,{className:"h-4 w-4 text-green-100"})})]})]})});E.displayName="Combobox";var tt=et("group relative cursor-pointer text-green-100 flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5",{variants:{variant:{default:["w-full","max-w-80","rounded-lg"],chip:["font-bold","rounded-3xl","data-[state=open]:bg-black","data-[state=open]:text-white"]},size:{small:["h-8","py-1","px-2","text-xs"],normal:["h-9","py-2","px-3","text-sm"],large:["h-10","py-3","px-4","text-base"]}},defaultVariants:{variant:"default",size:"normal"}});import{Slot as ot}from"@radix-ui/react-slot";import{cva as at}from"cva";import{forwardRef as it}from"react";import{jsx as nt}from"react/jsx-runtime";var z=it(({className:e,variant:t,size:o,asChild:n=!1,...i},d)=>nt(n?ot:"button",{className:a(rt({variant:t,size:o,className:e})),ref:d,...i}));z.displayName="Button";var rt=at(["flex","items-center","justify-center","gap-2","rounded-full","font-bold","outline-2","outline-offset-2","outline-dashed","outline-transparent"],{variants:{variant:{neutral:["bg-black","text-white","hover:bg-grey-90","active:bg-grey-80","focus:outline-purple-100","disabled:text-grey-40","disabled:bg-grey-10"],primary:["bg-pickle-100","text-black","hover:bg-pickle-80","active:bg-pickle-60","focus:outline-purple-100","disabled:text-grey-40","disabled:bg-grey-10"],secondary:["bg-green-80","text-white","hover:bg-green-90","active:bg-green-100","focus:outline-pickle-100","disabled:text-grey-40","disabled:bg-grey-10"],transparent:["text-white","hover:bg-green-80","active:bg-green-100","focus:outline-pickle-100","disabled:text-grey-40"],link:["leading-tight","text-black","underline","hover:text-purple-100","focus:text-black","focus:outline-purple-100","active:text-purple-80"]},size:{small:["h-10","text-sm","px-4","py-2"],medium:["h-12","text-base","px-6","py-3"],large:["h-14","text-lg","px-8","py-4"]}},defaultVariants:{variant:"neutral",size:"medium"},compoundVariants:[{variant:"link",size:"small",class:["h-3","text-xs","p-0"]},{variant:"link",size:"medium",class:["h-4","text-sm","p-0"]},{variant:"link",size:"large",class:["h-6","text-base","p-0"]}]});import{jsx as P,jsxs as xe}from"react/jsx-runtime";function lt(){let[e,t]=ye([]),[o,n]=ye(""),i=[{title:"Nirvana",value:"Nirvana",description:"Come As You Are",id:"1"},{title:"Pearl Jam",value:"Pearl Jam",description:"Jeremy",id:"2"},{title:"Soundgarden",value:"Soundgarden",description:"Rusty Cage",id:"3"},{title:"Alice in Chains",value:"Alice in Chains",description:"Would?",id:"4"},{title:"Stone Temple Pilots",value:"Stone Temple Pilots",id:"5"},{title:"Hole",value:"Hole",id:"6"},{title:"Mudhoney",value:"Mudhoney",id:"7"},{title:"Screaming Trees",value:"Screaming Trees",id:"8"},{title:"L7",value:"L7",id:"9"},{title:"Sonic Youth",value:"Sonic Youth",id:"10"},{title:"And You Will Know Us by the Trail of Dead",value:"And You Will Know Us by the Trail of Dead",id:"11"}];return xe("div",{className:"flex flex-row flex-wrap items-center gap-4 p-4",children:[P(E,{label:"US bands from the 90's",placeholder:"Select a band",icon:"Music",options:i,multiselect:!0,onChange:t,value:e}),P(E,{label:"US bands from the 90's",options:i,variant:"chip",multiselect:!0,onChange:t,value:e}),P(E,{label:"Fruit label",variant:"chip",options:[{title:"Cherry",value:"Cherry",id:"1",icon:"Cherry"},{title:"Grape",value:"Grape",id:"2",icon:"Grape"}],value:o,onChange:n,children:({close:m})=>xe("div",{className:"flex flex-row items-center justify-between bg-white p-2 pl-4",children:[P(z,{variant:"link",tabIndex:-1,onClick:m,children:"Clear"}),P(z,{variant:"primary",size:"small",tabIndex:-1,children:"Apply"})]})}),e.map(m=>P("span",{className:"text-green-80",children:m},m)),P("span",{className:"text-purple-100",children:o})]})}var be=lt;import{jsx as Ce}from"react/jsx-runtime";function st(){return Ce("div",{children:Ce(be,{})})}var Lo=st;export{Lo as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/demos/ComboboxDemo.tsx","../../../src/components/ui/Combobox.tsx","../../../src/lib/utils.ts","../../../src/components/primitives/command.tsx","../../../src/components/primitives/dialog.tsx","../../../src/components/primitives/popover.tsx","../../../src/components/primitives/separator.tsx","../../../src/components/ui/ListItem.tsx","../../../src/components/ui/Checkbox.tsx","../../../src/components/ui/Badge.tsx","../../../src/components/ui/Label.tsx","../../../src/components/ui/Button.tsx","../../../src/components/demos/index.tsx"],"sourcesContent":["'use client'\n\nimport { useState } from 'react'\nimport { Combobox } from '@/components/ui/Combobox'\nimport { Button } from '@/components/ui/Button'\n\nfunction ComboboxDemo() {\n const [selectedBands, setSelectedBands] = useState<string[]>([])\n const [selectedFruit, setSelectedFruit] = useState<string>('')\n\n const bands = [\n {\n title: 'Nirvana',\n value: 'Nirvana',\n description: 'Come As You Are',\n id: 1,\n },\n { title: 'Pearl Jam', value: 'Pearl Jam', description: 'Jeremy', id: 2 },\n {\n title: 'Soundgarden',\n value: 'Soundgarden',\n description: 'Rusty Cage',\n id: 3,\n },\n {\n title: 'Alice in Chains',\n value: 'Alice in Chains',\n description: 'Would?',\n id: 4,\n },\n { title: 'Stone Temple Pilots', value: 'Stone Temple Pilots', id: 5 },\n { title: 'Hole', value: 'Hole', id: 6 },\n { title: 'Mudhoney', value: 'Mudhoney', id: 7 },\n { title: 'Screaming Trees', value: 'Screaming Trees', id: 8 },\n { title: 'L7', value: 'L7', id: 9 },\n { title: 'Sonic Youth', value: 'Sonic Youth', id: 10 },\n {\n title: 'And You Will Know Us by the Trail of Dead',\n value: 'And You Will Know Us by the Trail of Dead',\n id: 11,\n },\n ]\n\n const fruits = [\n { title: 'Cherry', value: 'Cherry', id: 1, icon: 'Cherry' },\n { title: 'Grape', value: 'Grape', id: 2, icon: 'Grape' },\n ]\n\n return (\n <div className=\"flex flex-row flex-wrap items-center gap-4 p-4\">\n <Combobox\n label=\"US bands from the 90's\"\n placeholder=\"Select a band\"\n icon=\"Music\"\n options={bands}\n multiselect\n onChange={setSelectedBands}\n value={selectedBands}\n />\n <Combobox\n label=\"US bands from the 90's\"\n options={bands}\n variant=\"chip\"\n multiselect\n onChange={setSelectedBands}\n value={selectedBands}\n />\n <Combobox\n label=\"Fruit label\"\n variant=\"chip\"\n options={fruits}\n value={selectedFruit}\n onChange={setSelectedFruit}\n >\n {({ close }) => (\n <div className=\"flex flex-row items-center justify-between bg-white p-2 pl-4\">\n <Button variant=\"link\" tabIndex={-1} onClick={close}>\n Clear\n </Button>\n <Button variant=\"primary\" size=\"small\" tabIndex={-1}>\n Apply\n </Button>\n </div>\n )}\n </Combobox>\n {selectedBands.map((band) => (\n <span key={band} className=\"text-green-80\">\n {band}\n </span>\n ))}\n <span className=\"text-purple-100\">{selectedFruit}</span>\n </div>\n )\n}\n\nexport default ComboboxDemo\n","'use client'\n\nimport { ComponentProps, forwardRef, useEffect, useState } from 'react'\nimport { ChevronDownIcon, CircleX, icons } from 'lucide-react'\nimport { cva, type VariantProps } from 'cva'\nimport { cn } from '@/lib/utils'\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/primitives/command'\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/primitives/popover'\nimport { Separator } from '@/components/primitives/separator'\n\nimport ListItem from '@/components/ui/ListItem'\nimport { Badge } from '@/components/ui/Badge'\nimport Label from '@/components/ui/Label'\n\ntype Icon = { icon?: keyof typeof icons }\ntype Children = { children?: (props: { close: () => void }) => JSX.Element }\ntype Option = { id: number; value: string; title: string; description?: string; icon?: string }\ntype ClassNames = { label?: string; trigger?: string; items?: string; content?: string }\ntype Shared = { label?: string; options: Option[]; classNames?: ClassNames; placeholder?: string }\ntype MultiSelect = { multiselect: true; value?: string[]; onChange?: (v: string[]) => void }\ntype SingleSelect = { multiselect?: false; value?: string; onChange?: (v: string) => void }\ntype TriggerVariants = VariantProps<typeof triggerVariants>\ntype SelectProps = Omit<ComponentProps<'select'>, 'value' | 'onChange' | 'size' | 'children'>\ntype Props = TriggerVariants & SelectProps & Children & Shared & Icon\ntype MultiSelectProps = Props & MultiSelect\ntype SingleSelectProps = Props & SingleSelect\ntype ComboboxProps = MultiSelectProps | SingleSelectProps\n\nexport const Combobox = forwardRef<HTMLDivElement, ComboboxProps>((props, ref) => {\n const {\n value,\n label,\n options,\n classNames,\n multiselect,\n placeholder,\n variant = 'default',\n size,\n icon,\n className,\n onChange: handleChange,\n children: footer,\n } = props\n const [selected, setSelected] = useState<Option[]>([])\n const [open, setOpen] = useState(false)\n const IconComponent = icon && icons[icon]\n const hideSearchBox = options?.length <= 5\n const isDefault = variant === 'default'\n const isChip = variant === 'chip'\n const close = () => setOpen(false)\n\n useEffect(() => {\n const valueArray = multiselect ? (value ?? []) : value ? [value] : []\n setSelected(\n valueArray.map((v) => options.find((o) => o.value === v)).filter((v) => v !== undefined)\n )\n }, [value])\n\n const handleSelect = (value: string) => {\n const option = options.find((o) => o.value === value)\n if (!option) return\n if (multiselect) {\n return setSelected((prev) => {\n const newSelected = prev.some((o) => o.value === value)\n ? prev.filter((v) => v !== option)\n : [...prev, option]\n handleChange?.(newSelected.map((o) => o.value))\n return newSelected\n })\n }\n setSelected([option])\n handleChange?.(option.value)\n close()\n }\n\n const handleClear = () => {\n setSelected([])\n multiselect ? handleChange?.([]) : handleChange?.('')\n }\n\n const handleDisplayValue = () => {\n const defaultLabel = selected.length > 0 ? selected.map((s) => s.title).join(', ') : placeholder\n return isDefault ? defaultLabel : label\n }\n\n return (\n <div className={cn('flex flex-col gap-2', className)}>\n {isDefault && label && <Label text={label} className={classNames?.label} />}\n\n <div className=\"relative flex\">\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild disabled={options.length === 0}>\n <div\n ref={ref}\n className={cn(\n triggerVariants({ variant, size }),\n selected.length > 0 && 'pr-10',\n classNames?.trigger\n )}\n aria-expanded={open}\n >\n {isDefault && IconComponent && <IconComponent className=\"h-4 w-4 shrink-0\" />}\n {isChip && selected.length > 0 && <Badge variant=\"purple\">{selected.length}</Badge>}\n\n <span\n className={cn(\n 'w-full truncate leading-normal',\n isDefault && selected.length == 0 && 'text-grey-40'\n )}\n >\n {handleDisplayValue()}\n </span>\n\n {selected.length == 0 && (\n <ChevronDownIcon\n className=\"shrink-0 transform group-data-[state=open]:rotate-180\"\n size=\"16\"\n />\n )}\n </div>\n </PopoverTrigger>\n\n <Command>\n <PopoverContent\n className={cn(\n 'flex w-full max-w-xs flex-col overflow-hidden p-0',\n 'max-h-[--radix-popover-content-available-height]',\n classNames?.content\n )}\n collisionPadding={8}\n sideOffset={4}\n align=\"start\"\n >\n {!hideSearchBox && <CommandInput placeholder=\"Search...\" />}\n\n <CommandList>\n <CommandEmpty>No results</CommandEmpty>\n <CommandGroup>\n {options.map(({ id, ...option }) => (\n <CommandItem key={id} value={option.value} onSelect={handleSelect}>\n <ListItem\n className={cn(classNames?.items, 'truncate py-1')}\n isSelected={selected.some((s) => s.value === option.value)}\n hasCheckbox={multiselect}\n {...option}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n\n {!!footer && <Separator />}\n {footer && footer({ close })}\n </PopoverContent>\n </Command>\n </Popover>\n\n {isDefault && selected.length > 0 && (\n <button\n type=\"button\"\n className=\"absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20\"\n onClick={handleClear}\n >\n <CircleX className=\"h-4 w-4 text-green-100\" />\n </button>\n )}\n </div>\n </div>\n )\n})\nCombobox.displayName = 'Combobox'\n\nconst triggerVariants = cva(\n 'group relative cursor-pointer text-green-100 flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5',\n {\n variants: {\n variant: {\n default: ['w-full', 'max-w-80', 'rounded-lg'],\n chip: [\n 'font-bold',\n 'rounded-3xl',\n 'data-[state=open]:bg-black',\n 'data-[state=open]:text-white',\n ],\n },\n size: {\n small: ['h-8', 'p-1', 'pl-2', 'text-xs'],\n normal: ['h-9', 'p-2', 'pl-3', 'text-sm'],\n large: ['h-10', 'p-3', 'pl-4', 'text-base'],\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'normal',\n },\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use client'\n\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport * as React from 'react'\n\nimport { Dialog, DialogContent } from '@/components/primitives/dialog'\n\nimport { cn } from '@/lib/utils'\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950',\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ntype CommandDialogProps = DialogProps\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"m-1 flex items-center rounded-xl border px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500',\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 h-px bg-neutral-200', className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-neutral-500', className)}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n","'use client'\n\nimport { cn } from '@/lib/utils'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport * as React from 'react'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-neutral-500 dark:text-neutral-400', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","'use client'\n\nimport * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\n\nimport { cn } from '@/lib/utils'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n","'use client'\r\n\r\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '@/lib/utils'\r\n\r\nconst Separator = React.forwardRef<\r\n React.ElementRef<typeof SeparatorPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\r\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\r\n <SeparatorPrimitive.Root\r\n ref={ref}\r\n decorative={decorative}\r\n orientation={orientation}\r\n className={cn(\r\n 'shrink-0 bg-grey-10',\r\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nSeparator.displayName = SeparatorPrimitive.Root.displayName\r\n\r\nexport { Separator }\r\n","import { cn } from '@/lib/utils'\nimport { CheckIcon } from 'lucide-react'\nimport { ComponentPropsWithoutRef, ReactNode } from 'react'\nimport Checkbox from '@/components/ui/Checkbox'\nimport { icons } from 'lucide-react'\n\ntype IconKey = keyof typeof icons\n\ninterface ListItemProps extends ComponentPropsWithoutRef<'li'> {\n icon?: string\n hasCheckbox?: boolean\n isSelected?: boolean\n title: string\n value: string\n description?: string\n}\n\nfunction ListItem({\n icon,\n hasCheckbox,\n isSelected,\n className,\n title,\n value,\n description,\n ...props\n}: ListItemProps) {\n const getIconIfValid = (icon: string): ReactNode => {\n if (icon in icons) {\n const IconComponent = icons[icon as IconKey]\n return <IconComponent size={14} />\n }\n return null\n }\n\n const optionIcon = icon ? getIconIfValid(icon) : undefined\n\n return (\n <li\n className={cn(\n 'group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm',\n className\n )}\n {...props}\n data-state={isSelected ? 'checked' : 'unchecked'}\n >\n {optionIcon && <span className=\"mr-2\">{optionIcon}</span>}\n {hasCheckbox && (\n <Checkbox id={value} checked={isSelected} onClick={(e) => e.preventDefault()} />\n )}\n <div>\n <p>{title}</p>\n <p className=\"text-xs text-grey-80\">{description}</p>\n </div>\n\n <CheckIcon\n className=\"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block\"\n size={16}\n />\n </li>\n )\n}\n\nexport default ListItem\n","'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nconst Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ classNames, children, ...props }, ref) => {\n const { disabled } = props\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n const labelClassName = disabled ? 'text-grey-40 pointer-events-none' : ''\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} disabled={disabled} ref={ref} {...props} />\n <label htmlFor={id} className={cn(labelClassName, classNames?.label)}>\n {children}\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\n\nexport default Checkbox\n","import { cva, type VariantProps } from 'cva'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst badgeVariants = cva('rounded-full px-2 py-0.5 text-xs font-semibold', {\n variants: {\n variant: {\n green: 'bg-green-90 text-white',\n pickle: 'bg-pickle-100 text-black',\n purple: 'bg-purple-100 text-white',\n },\n },\n defaultVariants: {\n variant: 'green',\n },\n})\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />\n}\n\nexport { Badge, badgeVariants }\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n}\n\nfunction Label({ text, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n </label>\n )\n}\n\nexport default Label\n","import { cn } from '@/lib/utils'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'cva'\nimport React, { forwardRef } from 'react'\n\ninterface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Component = asChild ? Slot : 'button'\n\n return (\n <Component\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n )\n }\n)\nButton.displayName = 'Button'\n\nconst buttonVariants = cva(\n [\n 'flex',\n 'items-center',\n 'justify-center',\n 'gap-2',\n 'rounded-full',\n 'font-bold',\n 'outline-2',\n 'outline-offset-2',\n 'outline-dashed',\n 'outline-transparent',\n ],\n {\n variants: {\n variant: {\n neutral: [\n 'bg-black',\n 'text-white',\n 'hover:bg-grey-90',\n 'active:bg-grey-80',\n 'focus:outline-purple-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n primary: [\n 'bg-pickle-100',\n 'text-black',\n 'hover:bg-pickle-80',\n 'active:bg-pickle-60',\n 'focus:outline-purple-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n secondary: [\n 'bg-green-80',\n 'text-white',\n 'hover:bg-green-90',\n 'active:bg-green-100',\n 'focus:outline-pickle-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n transparent: [\n 'text-white',\n 'hover:bg-green-80',\n 'active:bg-green-100',\n 'focus:outline-pickle-100',\n 'disabled:text-grey-40',\n ],\n link: [\n 'leading-tight',\n 'text-black',\n 'underline',\n 'hover:text-purple-100',\n 'focus:text-black',\n 'focus:outline-purple-100',\n 'active:text-purple-80',\n ],\n },\n size: {\n small: ['h-10', 'text-sm', 'px-4', 'py-2'],\n medium: ['h-12', 'text-base', 'px-6', 'py-3'],\n large: ['h-14', 'text-lg', 'px-8', 'py-4'],\n },\n },\n defaultVariants: {\n variant: 'neutral',\n size: 'medium',\n },\n compoundVariants: [\n {\n variant: 'link',\n size: 'small',\n class: ['h-3', 'text-xs', 'p-0'],\n },\n {\n variant: 'link',\n size: 'medium',\n class: ['h-4', 'text-sm', 'p-0'],\n },\n {\n variant: 'link',\n size: 'large',\n class: ['h-6', 'text-base', 'p-0'],\n },\n ],\n }\n)\n","import ComboboxDemo from '@/components/demos/ComboboxDemo'\n\nfunction Demos() {\n return (\n <div>\n <ComboboxDemo />\n </div>\n )\n}\n\nexport default Demos\n"],"mappings":"AAEA,OAAS,YAAAA,OAAgB,QCAzB,OAAyB,cAAAC,GAAY,aAAAC,GAAW,YAAAC,OAAgB,QAChE,OAAS,mBAAAC,GAAiB,WAAAC,GAAS,SAAAC,OAAa,eAChD,OAAS,OAAAC,OAA8B,MCJvC,OAA0B,QAAAC,OAAY,OACtC,OAAS,WAAAC,OAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,GAAQD,GAAKG,CAAM,CAAC,CAC7B,CCFA,OAAS,WAAWC,MAAwB,OAC5C,OAAS,UAAAC,OAAc,eACvB,UAAYC,MAAW,QCFvB,UAAYC,MAAqB,yBACjC,OAAS,KAAAC,OAAS,eAClB,UAAYC,MAAW,QAcrB,cAAAC,EA0BI,QAAAC,MA1BJ,oBARF,IAAMC,GAA+B,SAIrC,IAAMC,GAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1BC,EAAiB,UAAhB,CACC,IAAKD,EACL,UAAWE,EACT,yJACAJ,CACF,EACC,GAAGC,EACN,CACD,EACDF,GAAc,YAA8B,UAAQ,YAEpD,IAAMM,GAAsB,aAG1B,CAAC,CAAE,UAAAL,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AI,CAAE,EAC9C,CAAE,MAAO,kBAAmB,MAAO,kBAAmB,GAAI,CAAE,EAC5D,CAAE,MAAO,KAAM,MAAO,KAAM,GAAI,CAAE,EAClC,CAAE,MAAO,cAAe,MAAO,cAAe,GAAI,EAAG,EACrD,CACE,MAAO,4CACP,MAAO,4CACP,GAAI,EACN,CACF,EAOA,OACEP,GAAC,OAAI,UAAU,iDACb,UAAAD,EAACS,EAAA,CACC,MAAM,yBACN,YAAY,gBACZ,KAAK,QACL,QAASD,EACT,YAAW,GACX,SAAUJ,EACV,MAAOD,EACT,EACAH,EAACS,EAAA,CACC,MAAM,yBACN,QAASD,EACT,QAAQ,OACR,YAAW,GACX,SAAUJ,EACV,MAAOD,EACT,EACAH,EAACS,EAAA,CACC,MAAM,cACN,QAAQ,OACR,QA3BS,CACb,CAAE,MAAO,SAAU,MAAO,SAAU,GAAI,EAAG,KAAM,QAAS,EAC1D,CAAE,MAAO,QAAS,MAAO,QAAS,GAAI,EAAG,KAAM,OAAQ,CACzD,EAyBM,MAAOH,EACP,SAAUC,EAET,UAAC,CAAE,MAAAG,CAAM,IACRT,GAAC,OAAI,UAAU,+DACb,UAAAD,EAACW,EAAA,CAAO,QAAQ,OAAO,SAAU,GAAI,QAASD,EAAO,iBAErD,EACAV,EAACW,EAAA,CAAO,QAAQ,UAAU,KAAK,QAAQ,SAAU,GAAI,iBAErD,GACF,EAEJ,EACCR,EAAc,IAAKS,GAClBZ,EAAC,QAAgB,UAAU,gBACxB,SAAAY,GADQA,CAEX,CACD,EACDZ,EAAC,QAAK,UAAU,kBAAmB,SAAAM,EAAc,GACnD,CAEJ,CAEA,IAAOO,GAAQX,GY1FT,cAAAY,OAAA,oBAHN,SAASC,IAAQ,CACf,OACED,GAAC,OACC,SAAAA,GAACE,GAAA,EAAa,EAChB,CAEJ,CAEA,IAAOC,GAAQF","names":["useState","forwardRef","useEffect","useState","ChevronDownIcon","CircleX","icons","cva","clsx","twMerge","cn","inputs","CommandPrimitive","Search","React","DialogPrimitive","X","React","jsx","jsxs","DialogPortal","DialogOverlay","className","props","ref","jsx","cn","DialogContent","children","jsxs","DialogPortal","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription","jsx","jsxs","Command","className","props","ref","CommandPrimitive","cn","CommandInput","className","props","ref","jsxs","jsx","Search","CommandPrimitive","cn","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut","React","PopoverPrimitive","jsx","Popover","PopoverTrigger","PopoverContent","className","align","sideOffset","props","ref","cn","SeparatorPrimitive","React","jsx","Separator","className","orientation","decorative","props","ref","cn","CheckIcon","CheckboxPrimitive","Check","Minus","forwardRef","jsx","jsxs","CheckboxToggle","forwardRef","className","props","ref","cn","Check","Minus","Checkbox","classNames","children","disabled","id","labelClassName","Checkbox_default","icons","jsx","jsxs","ListItem","icon","hasCheckbox","isSelected","className","title","value","description","props","optionIcon","IconComponent","cn","Checkbox_default","e","CheckIcon","ListItem_default","cva","jsx","badgeVariants","cva","Badge","className","variant","props","cn","jsx","Label","text","className","props","cn","Label_default","jsx","jsxs","Combobox","forwardRef","props","ref","value","label","options","classNames","multiselect","placeholder","variant","size","icon","className","handleChange","footer","selected","setSelected","useState","open","setOpen","IconComponent","icons","hideSearchBox","isDefault","isChip","close","useEffect","v","o","handleSelect","option","prev","newSelected","handleClear","handleDisplayValue","defaultLabel","s","cn","Label_default","Popover","PopoverTrigger","triggerVariants","Badge","ChevronDownIcon","Command","PopoverContent","CommandInput","CommandList","CommandEmpty","CommandGroup","id","CommandItem","ListItem_default","Separator","CircleX","cva","Slot","cva","forwardRef","jsx","Button","className","variant","size","asChild","props","ref","cn","buttonVariants","jsx","jsxs","ComboboxDemo","selectedBands","setSelectedBands","useState","selectedFruit","setSelectedFruit","bands","Combobox","close","Button","band","ComboboxDemo_default","jsx","Demos","ComboboxDemo_default","demos_default"]}
1
+ {"version":3,"sources":["../../../src/components/demos/ComboboxDemo.tsx","../../../src/components/ui/Combobox.tsx","../../../src/lib/utils.ts","../../../src/components/primitives/command.tsx","../../../src/components/primitives/dialog.tsx","../../../src/components/primitives/popover.tsx","../../../src/components/primitives/separator.tsx","../../../src/components/ui/ListItem.tsx","../../../src/components/ui/Checkbox.tsx","../../../src/components/ui/Badge.tsx","../../../src/components/ui/Label.tsx","../../../src/components/ui/Button.tsx","../../../src/components/demos/index.tsx"],"sourcesContent":["'use client'\n\nimport { useState } from 'react'\nimport { Combobox } from '@/components/ui/Combobox'\nimport { Button } from '@/components/ui/Button'\n\nfunction ComboboxDemo() {\n const [selectedBands, setSelectedBands] = useState<string[]>([])\n const [selectedFruit, setSelectedFruit] = useState<string>('')\n\n const bands = [\n {\n title: 'Nirvana',\n value: 'Nirvana',\n description: 'Come As You Are',\n id: '1',\n },\n { title: 'Pearl Jam', value: 'Pearl Jam', description: 'Jeremy', id: '2' },\n {\n title: 'Soundgarden',\n value: 'Soundgarden',\n description: 'Rusty Cage',\n id: '3',\n },\n {\n title: 'Alice in Chains',\n value: 'Alice in Chains',\n description: 'Would?',\n id: '4',\n },\n { title: 'Stone Temple Pilots', value: 'Stone Temple Pilots', id: '5' },\n { title: 'Hole', value: 'Hole', id: '6' },\n { title: 'Mudhoney', value: 'Mudhoney', id: '7' },\n { title: 'Screaming Trees', value: 'Screaming Trees', id: '8' },\n { title: 'L7', value: 'L7', id: '9' },\n { title: 'Sonic Youth', value: 'Sonic Youth', id: '10' },\n {\n title: 'And You Will Know Us by the Trail of Dead',\n value: 'And You Will Know Us by the Trail of Dead',\n id: '11',\n },\n ]\n\n const fruits = [\n { title: 'Cherry', value: 'Cherry', id: '1', icon: 'Cherry' },\n { title: 'Grape', value: 'Grape', id: '2', icon: 'Grape' },\n ]\n\n return (\n <div className=\"flex flex-row flex-wrap items-center gap-4 p-4\">\n <Combobox\n label=\"US bands from the 90's\"\n placeholder=\"Select a band\"\n icon=\"Music\"\n options={bands}\n multiselect\n onChange={setSelectedBands}\n value={selectedBands}\n />\n <Combobox\n label=\"US bands from the 90's\"\n options={bands}\n variant=\"chip\"\n multiselect\n onChange={setSelectedBands}\n value={selectedBands}\n />\n <Combobox\n label=\"Fruit label\"\n variant=\"chip\"\n options={fruits}\n value={selectedFruit}\n onChange={setSelectedFruit}\n >\n {({ close }) => (\n <div className=\"flex flex-row items-center justify-between bg-white p-2 pl-4\">\n <Button variant=\"link\" tabIndex={-1} onClick={close}>\n Clear\n </Button>\n <Button variant=\"primary\" size=\"small\" tabIndex={-1}>\n Apply\n </Button>\n </div>\n )}\n </Combobox>\n {selectedBands.map((band) => (\n <span key={band} className=\"text-green-80\">\n {band}\n </span>\n ))}\n <span className=\"text-purple-100\">{selectedFruit}</span>\n </div>\n )\n}\n\nexport default ComboboxDemo\n","'use client'\n\nimport { ComponentProps, forwardRef, useEffect, useState } from 'react'\nimport { ChevronDownIcon, CircleX, icons } from 'lucide-react'\nimport { cva, type VariantProps } from 'cva'\nimport { cn } from '@/lib/utils'\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/primitives/command'\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/primitives/popover'\nimport { Separator } from '@/components/primitives/separator'\n\nimport ListItem from '@/components/ui/ListItem'\nimport { Badge } from '@/components/ui/Badge'\nimport Label from '@/components/ui/Label'\n\ntype Icon = { icon?: keyof typeof icons }\ntype Children = { children?: (props: { close: () => void }) => JSX.Element }\ntype Option = { id: string; value: string; title: string; description?: string; icon?: string }\ntype ClassNames = { label?: string; trigger?: string; items?: string; content?: string }\ntype Shared = { label?: string; options: Option[]; classNames?: ClassNames; placeholder?: string }\ntype MultiSelect = { multiselect: true; value?: string[]; onChange?: (v: string[]) => void }\ntype SingleSelect = { multiselect?: false; value?: string; onChange?: (v: string) => void }\ntype TriggerVariants = VariantProps<typeof triggerVariants>\ntype SelectProps = Omit<ComponentProps<'select'>, 'value' | 'onChange' | 'size' | 'children'>\ntype Props = TriggerVariants & SelectProps & Children & Shared & Icon\ntype MultiSelectProps = Props & MultiSelect\ntype SingleSelectProps = Props & SingleSelect\ntype ComboboxProps = MultiSelectProps | SingleSelectProps\n\nexport const Combobox = forwardRef<HTMLDivElement, ComboboxProps>((props, ref) => {\n const {\n value,\n label,\n options,\n classNames,\n multiselect,\n placeholder,\n variant = 'default',\n size,\n icon,\n className,\n onChange: handleChange,\n children: footer,\n } = props\n const [selected, setSelected] = useState<Option[]>([])\n const [open, setOpen] = useState(false)\n const IconComponent = icon && icons[icon]\n const hideSearchBox = options?.length <= 5\n const isDefault = variant === 'default'\n const isChip = variant === 'chip'\n const close = () => setOpen(false)\n\n useEffect(() => {\n const valueArray = multiselect ? (value ?? []) : value ? [value] : []\n setSelected(\n valueArray.map((v) => options.find((o) => o.value === v)).filter((v) => v !== undefined)\n )\n }, [value])\n\n const handleSelect = (value: string) => {\n const option = options.find((o) => o.value === value)\n if (!option) return\n if (multiselect) {\n return setSelected((prev) => {\n const newSelected = prev.some((o) => o.value === value)\n ? prev.filter((v) => v !== option)\n : [...prev, option]\n handleChange?.(newSelected.map((o) => o.value))\n return newSelected\n })\n }\n setSelected([option])\n handleChange?.(option.value)\n close()\n }\n\n const handleClear = () => {\n setSelected([])\n multiselect ? handleChange?.([]) : handleChange?.('')\n }\n\n const handleDisplayValue = () => {\n const defaultLabel = selected.length > 0 ? selected.map((s) => s.title).join(', ') : placeholder\n return isDefault ? defaultLabel : label\n }\n\n return (\n <div className={cn('flex flex-col gap-2', className)}>\n {isDefault && label && <Label text={label} className={classNames?.label} />}\n\n <div className=\"relative flex\">\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild disabled={options.length === 0}>\n <div\n ref={ref}\n className={cn(\n triggerVariants({ variant, size }),\n selected.length > 0 && 'pr-10',\n classNames?.trigger\n )}\n aria-expanded={open}\n >\n {isDefault && IconComponent && <IconComponent className=\"h-4 w-4 shrink-0\" />}\n {isChip && selected.length > 0 && <Badge variant=\"purple\">{selected.length}</Badge>}\n\n <span\n className={cn(\n 'w-full truncate leading-normal',\n isDefault && selected.length == 0 && 'text-grey-40'\n )}\n >\n {handleDisplayValue()}\n </span>\n\n {selected.length == 0 && (\n <ChevronDownIcon\n className=\"shrink-0 transform group-data-[state=open]:rotate-180\"\n size=\"16\"\n />\n )}\n </div>\n </PopoverTrigger>\n\n <Command>\n <PopoverContent\n className={cn(\n 'flex w-full max-w-xs flex-col overflow-hidden p-0',\n 'max-h-[--radix-popover-content-available-height]',\n classNames?.content\n )}\n collisionPadding={8}\n sideOffset={4}\n align=\"start\"\n >\n {!hideSearchBox && <CommandInput placeholder=\"Search...\" />}\n\n <CommandList>\n <CommandEmpty>No results</CommandEmpty>\n <CommandGroup>\n {options.map(({ id, ...option }) => (\n <CommandItem key={id} value={option.value} onSelect={handleSelect}>\n <ListItem\n className={cn(classNames?.items, 'truncate py-1')}\n isSelected={selected.some((s) => s.value === option.value)}\n hasCheckbox={multiselect}\n {...option}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n\n {!!footer && <Separator />}\n {footer && footer({ close })}\n </PopoverContent>\n </Command>\n </Popover>\n\n {isDefault && selected.length > 0 && (\n <button\n type=\"button\"\n className=\"absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20\"\n onClick={handleClear}\n >\n <CircleX className=\"h-4 w-4 text-green-100\" />\n </button>\n )}\n </div>\n </div>\n )\n})\nCombobox.displayName = 'Combobox'\n\nconst triggerVariants = cva(\n 'group relative cursor-pointer text-green-100 flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5',\n {\n variants: {\n variant: {\n default: ['w-full', 'max-w-80', 'rounded-lg'],\n chip: [\n 'font-bold',\n 'rounded-3xl',\n 'data-[state=open]:bg-black',\n 'data-[state=open]:text-white',\n ],\n },\n size: {\n small: ['h-8', 'py-1', 'px-2', 'text-xs'],\n normal: ['h-9', 'py-2', 'px-3', 'text-sm'],\n large: ['h-10', 'py-3', 'px-4', 'text-base'],\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'normal',\n },\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use client'\n\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport * as React from 'react'\n\nimport { Dialog, DialogContent } from '@/components/primitives/dialog'\n\nimport { cn } from '@/lib/utils'\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950',\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ntype CommandDialogProps = DialogProps\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"m-1 flex items-center rounded-xl border px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500',\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 h-px bg-neutral-200', className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-neutral-500', className)}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n","'use client'\n\nimport { cn } from '@/lib/utils'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport * as React from 'react'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-neutral-500 dark:text-neutral-400', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","'use client'\n\nimport * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\n\nimport { cn } from '@/lib/utils'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n","'use client'\r\n\r\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '@/lib/utils'\r\n\r\nconst Separator = React.forwardRef<\r\n React.ElementRef<typeof SeparatorPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\r\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\r\n <SeparatorPrimitive.Root\r\n ref={ref}\r\n decorative={decorative}\r\n orientation={orientation}\r\n className={cn(\r\n 'shrink-0 bg-grey-10',\r\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nSeparator.displayName = SeparatorPrimitive.Root.displayName\r\n\r\nexport { Separator }\r\n","import { cn } from '@/lib/utils'\nimport { CheckIcon } from 'lucide-react'\nimport { ComponentPropsWithoutRef, ReactNode } from 'react'\nimport Checkbox from '@/components/ui/Checkbox'\nimport { icons } from 'lucide-react'\n\ntype IconKey = keyof typeof icons\n\ninterface ListItemProps extends ComponentPropsWithoutRef<'li'> {\n icon?: string\n hasCheckbox?: boolean\n isSelected?: boolean\n title: string\n value: string\n description?: string\n}\n\nfunction ListItem({\n icon,\n hasCheckbox,\n isSelected,\n className,\n title,\n value,\n description,\n ...props\n}: ListItemProps) {\n const getIconIfValid = (icon: string): ReactNode => {\n if (icon in icons) {\n const IconComponent = icons[icon as IconKey]\n return <IconComponent size={14} />\n }\n return null\n }\n\n const optionIcon = icon ? getIconIfValid(icon) : undefined\n\n return (\n <li\n className={cn(\n 'group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm',\n className\n )}\n {...props}\n data-state={isSelected ? 'checked' : 'unchecked'}\n >\n {optionIcon && <span className=\"mr-2\">{optionIcon}</span>}\n {hasCheckbox && (\n <Checkbox id={value} checked={isSelected} onClick={(e) => e.preventDefault()} />\n )}\n <div>\n <p>{title}</p>\n <p className=\"text-xs text-grey-80\">{description}</p>\n </div>\n\n <CheckIcon\n className=\"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block\"\n size={16}\n />\n </li>\n )\n}\n\nexport default ListItem\n","'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nconst Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ classNames, children, ...props }, ref) => {\n const { disabled } = props\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n const labelClassName = disabled ? 'text-grey-40 pointer-events-none' : ''\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} disabled={disabled} ref={ref} {...props} />\n <label htmlFor={id} className={cn(labelClassName, classNames?.label)}>\n {children}\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\n\nexport default Checkbox\n","import { cva, type VariantProps } from 'cva'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst badgeVariants = cva('rounded-full px-2 py-0.5 text-xs font-semibold', {\n variants: {\n variant: {\n green: 'bg-green-90 text-white',\n pickle: 'bg-pickle-100 text-black',\n purple: 'bg-purple-100 text-white',\n },\n },\n defaultVariants: {\n variant: 'green',\n },\n})\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />\n}\n\nexport { Badge, badgeVariants }\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n}\n\nfunction Label({ text, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n </label>\n )\n}\n\nexport default Label\n","import { cn } from '@/lib/utils'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'cva'\nimport React, { forwardRef } from 'react'\n\ninterface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Component = asChild ? Slot : 'button'\n\n return (\n <Component\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n )\n }\n)\nButton.displayName = 'Button'\n\nconst buttonVariants = cva(\n [\n 'flex',\n 'items-center',\n 'justify-center',\n 'gap-2',\n 'rounded-full',\n 'font-bold',\n 'outline-2',\n 'outline-offset-2',\n 'outline-dashed',\n 'outline-transparent',\n ],\n {\n variants: {\n variant: {\n neutral: [\n 'bg-black',\n 'text-white',\n 'hover:bg-grey-90',\n 'active:bg-grey-80',\n 'focus:outline-purple-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n primary: [\n 'bg-pickle-100',\n 'text-black',\n 'hover:bg-pickle-80',\n 'active:bg-pickle-60',\n 'focus:outline-purple-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n secondary: [\n 'bg-green-80',\n 'text-white',\n 'hover:bg-green-90',\n 'active:bg-green-100',\n 'focus:outline-pickle-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n transparent: [\n 'text-white',\n 'hover:bg-green-80',\n 'active:bg-green-100',\n 'focus:outline-pickle-100',\n 'disabled:text-grey-40',\n ],\n link: [\n 'leading-tight',\n 'text-black',\n 'underline',\n 'hover:text-purple-100',\n 'focus:text-black',\n 'focus:outline-purple-100',\n 'active:text-purple-80',\n ],\n },\n size: {\n small: ['h-10', 'text-sm', 'px-4', 'py-2'],\n medium: ['h-12', 'text-base', 'px-6', 'py-3'],\n large: ['h-14', 'text-lg', 'px-8', 'py-4'],\n },\n },\n defaultVariants: {\n variant: 'neutral',\n size: 'medium',\n },\n compoundVariants: [\n {\n variant: 'link',\n size: 'small',\n class: ['h-3', 'text-xs', 'p-0'],\n },\n {\n variant: 'link',\n size: 'medium',\n class: ['h-4', 'text-sm', 'p-0'],\n },\n {\n variant: 'link',\n size: 'large',\n class: ['h-6', 'text-base', 'p-0'],\n },\n ],\n }\n)\n","import ComboboxDemo from '@/components/demos/ComboboxDemo'\n\nfunction Demos() {\n return (\n <div>\n <ComboboxDemo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,CACC,MAAM,cACN,QAAQ,OACR,QA3BS,CACb,CAAE,MAAO,SAAU,MAAO,SAAU,GAAI,IAAK,KAAM,QAAS,EAC5D,CAAE,MAAO,QAAS,MAAO,QAAS,GAAI,IAAK,KAAM,OAAQ,CAC3D,EAyBM,MAAOH,EACP,SAAUC,EAET,UAAC,CAAE,MAAAG,CAAM,IACRT,GAAC,OAAI,UAAU,+DACb,UAAAD,EAACW,EAAA,CAAO,QAAQ,OAAO,SAAU,GAAI,QAASD,EAAO,iBAErD,EACAV,EAACW,EAAA,CAAO,QAAQ,UAAU,KAAK,QAAQ,SAAU,GAAI,iBAErD,GACF,EAEJ,EACCR,EAAc,IAAKS,GAClBZ,EAAC,QAAgB,UAAU,gBACxB,SAAAY,GADQA,CAEX,CACD,EACDZ,EAAC,QAAK,UAAU,kBAAmB,SAAAM,EAAc,GACnD,CAEJ,CAEA,IAAOO,GAAQX,GY1FT,cAAAY,OAAA,oBAHN,SAASC,IAAQ,CACf,OACED,GAAC,OACC,SAAAA,GAACE,GAAA,EAAa,EAChB,CAEJ,CAEA,IAAOC,GAAQF","names":["useState","forwardRef","useEffect","useState","ChevronDownIcon","CircleX","icons","cva","clsx","twMerge","cn","inputs","CommandPrimitive","Search","React","DialogPrimitive","X","React","jsx","jsxs","DialogPortal","DialogOverlay","className","props","ref","jsx","cn","DialogContent","children","jsxs","DialogPortal","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription","jsx","jsxs","Command","className","props","ref","CommandPrimitive","cn","CommandInput","className","props","ref","jsxs","jsx","Search","CommandPrimitive","cn","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut","React","PopoverPrimitive","jsx","Popover","PopoverTrigger","PopoverContent","className","align","sideOffset","props","ref","cn","SeparatorPrimitive","React","jsx","Separator","className","orientation","decorative","props","ref","cn","CheckIcon","CheckboxPrimitive","Check","Minus","forwardRef","jsx","jsxs","CheckboxToggle","forwardRef","className","props","ref","cn","Check","Minus","Checkbox","classNames","children","disabled","id","labelClassName","Checkbox_default","icons","jsx","jsxs","ListItem","icon","hasCheckbox","isSelected","className","title","value","description","props","optionIcon","IconComponent","cn","Checkbox_default","e","CheckIcon","ListItem_default","cva","jsx","badgeVariants","cva","Badge","className","variant","props","cn","jsx","Label","text","className","props","cn","Label_default","jsx","jsxs","Combobox","forwardRef","props","ref","value","label","options","classNames","multiselect","placeholder","variant","size","icon","className","handleChange","footer","selected","setSelected","useState","open","setOpen","IconComponent","icons","hideSearchBox","isDefault","isChip","close","useEffect","v","o","handleSelect","option","prev","newSelected","handleClear","handleDisplayValue","defaultLabel","s","cn","Label_default","Popover","PopoverTrigger","triggerVariants","Badge","ChevronDownIcon","Command","PopoverContent","CommandInput","CommandList","CommandEmpty","CommandGroup","id","CommandItem","ListItem_default","Separator","CircleX","cva","Slot","cva","forwardRef","jsx","Button","className","variant","size","asChild","props","ref","cn","buttonVariants","jsx","jsxs","ComboboxDemo","selectedBands","setSelectedBands","useState","selectedFruit","setSelectedFruit","bands","Combobox","close","Button","band","ComboboxDemo_default","jsx","Demos","ComboboxDemo_default","demos_default"]}
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var Le=Object.create;var W=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,Ve=Object.prototype.hasOwnProperty;var ze=(e,t)=>{for(var o in t)W(e,o,{get:t[o],enumerable:!0})},oe=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of _e(t))!Ve.call(e,r)&&r!==o&&W(e,r,{get:()=>t[r],enumerable:!(s=Te(t,r))||s.enumerable});return e};var x=(e,t,o)=>(o=e!=null?Le(We(e)):{},oe(t||!e||!e.__esModule?W(o,"default",{value:e,enumerable:!0}):o,e)),Me=e=>oe(W({},"__esModule",{value:!0}),e);var Qe={};ze(Qe,{Combobox:()=>ke});module.exports=Me(Qe);var N=require("react"),k=require("lucide-react"),Ne=require("cva");var ae=require("clsx"),ie=require("tailwind-merge");function a(...e){return(0,ie.twMerge)((0,ae.clsx)(e))}var m=require("cmdk"),le=require("lucide-react"),C=x(require("react"),1);var n=x(require("@radix-ui/react-dialog"),1),re=require("lucide-react"),S=x(require("react"),1),p=require("react/jsx-runtime");var Oe=n.Portal;var ne=S.forwardRef(({className:e,...t},o)=>(0,p.jsx)(n.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ne.displayName=n.Overlay.displayName;var se=S.forwardRef(({className:e,children:t,...o},s)=>(0,p.jsxs)(Oe,{children:[(0,p.jsx)(ne,{}),(0,p.jsxs)(n.Content,{ref:s,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...o,children:[t,(0,p.jsxs)(n.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[(0,p.jsx)(re.X,{className:"h-4 w-4"}),(0,p.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));se.displayName=n.Content.displayName;var He=({className:e,...t})=>(0,p.jsx)("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});He.displayName="DialogHeader";var Ge=({className:e,...t})=>(0,p.jsx)("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ge.displayName="DialogFooter";var Ae=S.forwardRef(({className:e,...t},o)=>(0,p.jsx)(n.Title,{ref:o,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));Ae.displayName=n.Title.displayName;var Be=S.forwardRef(({className:e,...t},o)=>(0,p.jsx)(n.Description,{ref:o,className:a("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));Be.displayName=n.Description.displayName;var d=require("react/jsx-runtime"),H=C.forwardRef(({className:e,...t},o)=>(0,d.jsx)(m.Command,{ref:o,className:a("flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950",e),...t}));H.displayName=m.Command.displayName;var G=C.forwardRef(({className:e,...t},o)=>(0,d.jsxs)("div",{className:"m-1 flex items-center rounded-xl border px-3","cmdk-input-wrapper":"",children:[(0,d.jsx)(le.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,d.jsx)(m.Command.Input,{ref:o,className:a("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));G.displayName=m.Command.Input.displayName;var A=C.forwardRef(({className:e,...t},o)=>(0,d.jsx)(m.Command.List,{ref:o,className:a("overflow-y-auto overflow-x-hidden",e),...t}));A.displayName=m.Command.List.displayName;var B=C.forwardRef((e,t)=>(0,d.jsx)(m.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));B.displayName=m.Command.Empty.displayName;var F=C.forwardRef(({className:e,...t},o)=>(0,d.jsx)(m.Command.Group,{ref:o,className:a("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500",e),...t}));F.displayName=m.Command.Group.displayName;var Fe=C.forwardRef(({className:e,...t},o)=>(0,d.jsx)(m.Command.Separator,{ref:o,className:a("-mx-1 h-px bg-neutral-200",e),...t}));Fe.displayName=m.Command.Separator.displayName;var X=C.forwardRef(({className:e,...t},o)=>(0,d.jsx)(m.Command.Item,{ref:o,className:a("relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50",e),...t}));X.displayName=m.Command.Item.displayName;var Xe=({className:e,...t})=>(0,d.jsx)("span",{className:a("ml-auto text-xs tracking-widest text-neutral-500",e),...t});Xe.displayName="CommandShortcut";var me=x(require("react"),1),v=x(require("@radix-ui/react-popover"),1);var K=require("react/jsx-runtime"),pe=v.Root,de=v.Trigger,J=me.forwardRef(({className:e,align:t="center",sideOffset:o=4,...s},r)=>(0,K.jsx)(v.Portal,{children:(0,K.jsx)(v.Content,{ref:r,align:t,sideOffset:o,className:a("z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));J.displayName=v.Content.displayName;var $=x(require("@radix-ui/react-separator"),1),ce=x(require("react"),1);var fe=require("react/jsx-runtime"),q=ce.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...s},r)=>(0,fe.jsx)($.Root,{ref:r,decorative:o,orientation:t,className:a("shrink-0 bg-grey-10",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...s}));q.displayName=$.Root.displayName;var ve=require("lucide-react");var I=x(require("@radix-ui/react-checkbox"),1),V=require("lucide-react"),Q=require("react");var y=require("react/jsx-runtime"),ue=(0,Q.forwardRef)(({className:e,...t},o)=>(0,y.jsx)(I.Root,{ref:o,className:a("group","peer","h-5","w-5","shrink-0","rounded-md","border","border-grey-10","outline","outline-1","outline-offset-2","outline-transparent","hover:border-grey-20","focus:outline-purple-100","active:border-green-80","disabled:cursor-not-allowed","disabled:opacity-50","data-[state=checked]:bg-green-80","data-[state=indeterminate]:bg-green-80","data-[state=checked]:text-white","data-[state=indeterminate]:text-primary-foreground",t.disabled&&"data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20",e),...t,children:(0,y.jsxs)(I.Indicator,{className:"flex items-center justify-center text-current",children:[(0,y.jsx)(V.Check,{className:"hidden h-4 w-4 group-data-[state=checked]:block"}),(0,y.jsx)(V.Minus,{className:"hidden h-4 w-4 group-data-[state=indeterminate]:block"})]})}));ue.displayName=I.Root.displayName;var ge=(0,Q.forwardRef)(({classNames:e,children:t,...o},s)=>{let{disabled:r}=o,f=o.id??`${o.name??o.value?.toString()}-checkbox`,P=r?"text-grey-40 pointer-events-none":"";return(0,y.jsxs)("div",{className:a("flex space-x-2",e?.wrapper),children:[(0,y.jsx)(ue,{id:f,disabled:r,ref:s,...o}),(0,y.jsx)("label",{htmlFor:f,className:a(P,e?.label),children:t})]})});ge.displayName="Checkbox";var he=ge;var U=require("lucide-react"),c=require("react/jsx-runtime");function Ke({icon:e,hasCheckbox:t,isSelected:o,className:s,title:r,value:f,description:P,...z}){let L=e?(b=>{if(b in U.icons){let M=U.icons[b];return(0,c.jsx)(M,{size:14})}return null})(e):void 0;return(0,c.jsxs)("li",{className:a("group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm",s),...z,"data-state":o?"checked":"unchecked",children:[L&&(0,c.jsx)("span",{className:"mr-2",children:L}),t&&(0,c.jsx)(he,{id:f,checked:o,onClick:b=>b.preventDefault()}),(0,c.jsxs)("div",{children:[(0,c.jsx)("p",{children:r}),(0,c.jsx)("p",{className:"text-xs text-grey-80",children:P})]}),(0,c.jsx)(ve.CheckIcon,{className:"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",size:16})]})}var ye=Ke;var Pe=require("cva");var Ce=require("react/jsx-runtime"),Je=(0,Pe.cva)("rounded-full px-2 py-0.5 text-xs font-semibold",{variants:{variant:{green:"bg-green-90 text-white",pickle:"bg-pickle-100 text-black",purple:"bg-purple-100 text-white"}},defaultVariants:{variant:"green"}});function xe({className:e,variant:t,...o}){return(0,Ce.jsx)("div",{className:a(Je({variant:t}),e),...o})}var Re=require("react/jsx-runtime");function $e({text:e,className:t,...o}){return e?(0,Re.jsx)("label",{className:a("text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...o,children:e}):null}var be=$e;var i=require("react/jsx-runtime"),ke=(0,N.forwardRef)((e,t)=>{let{value:o,label:s,options:r,classNames:f,multiselect:P,placeholder:z,variant:E="default",size:L,icon:b,className:M,onChange:T,children:O}=e,[u,_]=(0,N.useState)([]),[Y,Z]=(0,N.useState)(!1),j=b&&k.icons[b],we=r?.length<=5,w=E==="default",De=E==="chip",ee=()=>Z(!1);(0,N.useEffect)(()=>{_((P?o??[]:o?[o]:[]).map(l=>r.find(g=>g.value===l)).filter(l=>l!==void 0))},[o]);let Se=R=>{let l=r.find(g=>g.value===R);if(l){if(P)return _(g=>{let te=g.some(D=>D.value===R)?g.filter(D=>D!==l):[...g,l];return T?.(te.map(D=>D.value)),te});_([l]),T?.(l.value),ee()}},Ie=()=>{_([]),T?.(P?[]:"")},Ee=()=>{let R=u.length>0?u.map(l=>l.title).join(", "):z;return w?R:s};return(0,i.jsxs)("div",{className:a("flex flex-col gap-2",M),children:[w&&s&&(0,i.jsx)(be,{text:s,className:f?.label}),(0,i.jsxs)("div",{className:"relative flex",children:[(0,i.jsxs)(pe,{open:Y,onOpenChange:Z,children:[(0,i.jsx)(de,{asChild:!0,disabled:r.length===0,children:(0,i.jsxs)("div",{ref:t,className:a(qe({variant:E,size:L}),u.length>0&&"pr-10",f?.trigger),"aria-expanded":Y,children:[w&&j&&(0,i.jsx)(j,{className:"h-4 w-4 shrink-0"}),De&&u.length>0&&(0,i.jsx)(xe,{variant:"purple",children:u.length}),(0,i.jsx)("span",{className:a("w-full truncate leading-normal",w&&u.length==0&&"text-grey-40"),children:Ee()}),u.length==0&&(0,i.jsx)(k.ChevronDownIcon,{className:"shrink-0 transform group-data-[state=open]:rotate-180",size:"16"})]})}),(0,i.jsx)(H,{children:(0,i.jsxs)(J,{className:a("flex w-full max-w-xs flex-col overflow-hidden p-0","max-h-[--radix-popover-content-available-height]",f?.content),collisionPadding:8,sideOffset:4,align:"start",children:[!we&&(0,i.jsx)(G,{placeholder:"Search..."}),(0,i.jsxs)(A,{children:[(0,i.jsx)(B,{children:"No results"}),(0,i.jsx)(F,{children:r.map(({id:R,...l})=>(0,i.jsx)(X,{value:l.value,onSelect:Se,children:(0,i.jsx)(ye,{className:a(f?.items,"truncate py-1"),isSelected:u.some(g=>g.value===l.value),hasCheckbox:P,...l})},R))})]}),!!O&&(0,i.jsx)(q,{}),O&&O({close:ee})]})})]}),w&&u.length>0&&(0,i.jsx)("button",{type:"button",className:"absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",onClick:Ie,children:(0,i.jsx)(k.CircleX,{className:"h-4 w-4 text-green-100"})})]})]})});ke.displayName="Combobox";var qe=(0,Ne.cva)("group relative cursor-pointer text-green-100 flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5",{variants:{variant:{default:["w-full","max-w-80","rounded-lg"],chip:["font-bold","rounded-3xl","data-[state=open]:bg-black","data-[state=open]:text-white"]},size:{small:["h-8","p-1","pl-2","text-xs"],normal:["h-9","p-2","pl-3","text-sm"],large:["h-10","p-3","pl-4","text-base"]}},defaultVariants:{variant:"default",size:"normal"}});0&&(module.exports={Combobox});
1
+ "use strict";"use client";var Le=Object.create;var W=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,Ve=Object.prototype.hasOwnProperty;var ze=(e,t)=>{for(var o in t)W(e,o,{get:t[o],enumerable:!0})},oe=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of _e(t))!Ve.call(e,r)&&r!==o&&W(e,r,{get:()=>t[r],enumerable:!(s=Te(t,r))||s.enumerable});return e};var x=(e,t,o)=>(o=e!=null?Le(We(e)):{},oe(t||!e||!e.__esModule?W(o,"default",{value:e,enumerable:!0}):o,e)),Me=e=>oe(W({},"__esModule",{value:!0}),e);var Qe={};ze(Qe,{Combobox:()=>ke});module.exports=Me(Qe);var N=require("react"),k=require("lucide-react"),Ne=require("cva");var ae=require("clsx"),ie=require("tailwind-merge");function a(...e){return(0,ie.twMerge)((0,ae.clsx)(e))}var m=require("cmdk"),le=require("lucide-react"),C=x(require("react"),1);var n=x(require("@radix-ui/react-dialog"),1),re=require("lucide-react"),S=x(require("react"),1),p=require("react/jsx-runtime");var Oe=n.Portal;var ne=S.forwardRef(({className:e,...t},o)=>(0,p.jsx)(n.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ne.displayName=n.Overlay.displayName;var se=S.forwardRef(({className:e,children:t,...o},s)=>(0,p.jsxs)(Oe,{children:[(0,p.jsx)(ne,{}),(0,p.jsxs)(n.Content,{ref:s,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...o,children:[t,(0,p.jsxs)(n.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[(0,p.jsx)(re.X,{className:"h-4 w-4"}),(0,p.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));se.displayName=n.Content.displayName;var He=({className:e,...t})=>(0,p.jsx)("div",{className:a("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});He.displayName="DialogHeader";var Ge=({className:e,...t})=>(0,p.jsx)("div",{className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ge.displayName="DialogFooter";var Ae=S.forwardRef(({className:e,...t},o)=>(0,p.jsx)(n.Title,{ref:o,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));Ae.displayName=n.Title.displayName;var Be=S.forwardRef(({className:e,...t},o)=>(0,p.jsx)(n.Description,{ref:o,className:a("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));Be.displayName=n.Description.displayName;var d=require("react/jsx-runtime"),H=C.forwardRef(({className:e,...t},o)=>(0,d.jsx)(m.Command,{ref:o,className:a("flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950",e),...t}));H.displayName=m.Command.displayName;var G=C.forwardRef(({className:e,...t},o)=>(0,d.jsxs)("div",{className:"m-1 flex items-center rounded-xl border px-3","cmdk-input-wrapper":"",children:[(0,d.jsx)(le.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,d.jsx)(m.Command.Input,{ref:o,className:a("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));G.displayName=m.Command.Input.displayName;var A=C.forwardRef(({className:e,...t},o)=>(0,d.jsx)(m.Command.List,{ref:o,className:a("overflow-y-auto overflow-x-hidden",e),...t}));A.displayName=m.Command.List.displayName;var B=C.forwardRef((e,t)=>(0,d.jsx)(m.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));B.displayName=m.Command.Empty.displayName;var F=C.forwardRef(({className:e,...t},o)=>(0,d.jsx)(m.Command.Group,{ref:o,className:a("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500",e),...t}));F.displayName=m.Command.Group.displayName;var Fe=C.forwardRef(({className:e,...t},o)=>(0,d.jsx)(m.Command.Separator,{ref:o,className:a("-mx-1 h-px bg-neutral-200",e),...t}));Fe.displayName=m.Command.Separator.displayName;var X=C.forwardRef(({className:e,...t},o)=>(0,d.jsx)(m.Command.Item,{ref:o,className:a("relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50",e),...t}));X.displayName=m.Command.Item.displayName;var Xe=({className:e,...t})=>(0,d.jsx)("span",{className:a("ml-auto text-xs tracking-widest text-neutral-500",e),...t});Xe.displayName="CommandShortcut";var me=x(require("react"),1),v=x(require("@radix-ui/react-popover"),1);var K=require("react/jsx-runtime"),pe=v.Root,de=v.Trigger,J=me.forwardRef(({className:e,align:t="center",sideOffset:o=4,...s},r)=>(0,K.jsx)(v.Portal,{children:(0,K.jsx)(v.Content,{ref:r,align:t,sideOffset:o,className:a("z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));J.displayName=v.Content.displayName;var $=x(require("@radix-ui/react-separator"),1),ce=x(require("react"),1);var fe=require("react/jsx-runtime"),q=ce.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...s},r)=>(0,fe.jsx)($.Root,{ref:r,decorative:o,orientation:t,className:a("shrink-0 bg-grey-10",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...s}));q.displayName=$.Root.displayName;var ve=require("lucide-react");var I=x(require("@radix-ui/react-checkbox"),1),V=require("lucide-react"),Q=require("react");var y=require("react/jsx-runtime"),ue=(0,Q.forwardRef)(({className:e,...t},o)=>(0,y.jsx)(I.Root,{ref:o,className:a("group","peer","h-5","w-5","shrink-0","rounded-md","border","border-grey-10","outline","outline-1","outline-offset-2","outline-transparent","hover:border-grey-20","focus:outline-purple-100","active:border-green-80","disabled:cursor-not-allowed","disabled:opacity-50","data-[state=checked]:bg-green-80","data-[state=indeterminate]:bg-green-80","data-[state=checked]:text-white","data-[state=indeterminate]:text-primary-foreground",t.disabled&&"data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20",e),...t,children:(0,y.jsxs)(I.Indicator,{className:"flex items-center justify-center text-current",children:[(0,y.jsx)(V.Check,{className:"hidden h-4 w-4 group-data-[state=checked]:block"}),(0,y.jsx)(V.Minus,{className:"hidden h-4 w-4 group-data-[state=indeterminate]:block"})]})}));ue.displayName=I.Root.displayName;var ge=(0,Q.forwardRef)(({classNames:e,children:t,...o},s)=>{let{disabled:r}=o,f=o.id??`${o.name??o.value?.toString()}-checkbox`,P=r?"text-grey-40 pointer-events-none":"";return(0,y.jsxs)("div",{className:a("flex space-x-2",e?.wrapper),children:[(0,y.jsx)(ue,{id:f,disabled:r,ref:s,...o}),(0,y.jsx)("label",{htmlFor:f,className:a(P,e?.label),children:t})]})});ge.displayName="Checkbox";var he=ge;var U=require("lucide-react"),c=require("react/jsx-runtime");function Ke({icon:e,hasCheckbox:t,isSelected:o,className:s,title:r,value:f,description:P,...z}){let L=e?(b=>{if(b in U.icons){let M=U.icons[b];return(0,c.jsx)(M,{size:14})}return null})(e):void 0;return(0,c.jsxs)("li",{className:a("group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm",s),...z,"data-state":o?"checked":"unchecked",children:[L&&(0,c.jsx)("span",{className:"mr-2",children:L}),t&&(0,c.jsx)(he,{id:f,checked:o,onClick:b=>b.preventDefault()}),(0,c.jsxs)("div",{children:[(0,c.jsx)("p",{children:r}),(0,c.jsx)("p",{className:"text-xs text-grey-80",children:P})]}),(0,c.jsx)(ve.CheckIcon,{className:"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",size:16})]})}var ye=Ke;var Pe=require("cva");var Ce=require("react/jsx-runtime"),Je=(0,Pe.cva)("rounded-full px-2 py-0.5 text-xs font-semibold",{variants:{variant:{green:"bg-green-90 text-white",pickle:"bg-pickle-100 text-black",purple:"bg-purple-100 text-white"}},defaultVariants:{variant:"green"}});function xe({className:e,variant:t,...o}){return(0,Ce.jsx)("div",{className:a(Je({variant:t}),e),...o})}var Re=require("react/jsx-runtime");function $e({text:e,className:t,...o}){return e?(0,Re.jsx)("label",{className:a("text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...o,children:e}):null}var be=$e;var i=require("react/jsx-runtime"),ke=(0,N.forwardRef)((e,t)=>{let{value:o,label:s,options:r,classNames:f,multiselect:P,placeholder:z,variant:E="default",size:L,icon:b,className:M,onChange:T,children:O}=e,[u,_]=(0,N.useState)([]),[Y,Z]=(0,N.useState)(!1),j=b&&k.icons[b],we=r?.length<=5,w=E==="default",De=E==="chip",ee=()=>Z(!1);(0,N.useEffect)(()=>{_((P?o??[]:o?[o]:[]).map(l=>r.find(g=>g.value===l)).filter(l=>l!==void 0))},[o]);let Se=R=>{let l=r.find(g=>g.value===R);if(l){if(P)return _(g=>{let te=g.some(D=>D.value===R)?g.filter(D=>D!==l):[...g,l];return T?.(te.map(D=>D.value)),te});_([l]),T?.(l.value),ee()}},Ie=()=>{_([]),T?.(P?[]:"")},Ee=()=>{let R=u.length>0?u.map(l=>l.title).join(", "):z;return w?R:s};return(0,i.jsxs)("div",{className:a("flex flex-col gap-2",M),children:[w&&s&&(0,i.jsx)(be,{text:s,className:f?.label}),(0,i.jsxs)("div",{className:"relative flex",children:[(0,i.jsxs)(pe,{open:Y,onOpenChange:Z,children:[(0,i.jsx)(de,{asChild:!0,disabled:r.length===0,children:(0,i.jsxs)("div",{ref:t,className:a(qe({variant:E,size:L}),u.length>0&&"pr-10",f?.trigger),"aria-expanded":Y,children:[w&&j&&(0,i.jsx)(j,{className:"h-4 w-4 shrink-0"}),De&&u.length>0&&(0,i.jsx)(xe,{variant:"purple",children:u.length}),(0,i.jsx)("span",{className:a("w-full truncate leading-normal",w&&u.length==0&&"text-grey-40"),children:Ee()}),u.length==0&&(0,i.jsx)(k.ChevronDownIcon,{className:"shrink-0 transform group-data-[state=open]:rotate-180",size:"16"})]})}),(0,i.jsx)(H,{children:(0,i.jsxs)(J,{className:a("flex w-full max-w-xs flex-col overflow-hidden p-0","max-h-[--radix-popover-content-available-height]",f?.content),collisionPadding:8,sideOffset:4,align:"start",children:[!we&&(0,i.jsx)(G,{placeholder:"Search..."}),(0,i.jsxs)(A,{children:[(0,i.jsx)(B,{children:"No results"}),(0,i.jsx)(F,{children:r.map(({id:R,...l})=>(0,i.jsx)(X,{value:l.value,onSelect:Se,children:(0,i.jsx)(ye,{className:a(f?.items,"truncate py-1"),isSelected:u.some(g=>g.value===l.value),hasCheckbox:P,...l})},R))})]}),!!O&&(0,i.jsx)(q,{}),O&&O({close:ee})]})})]}),w&&u.length>0&&(0,i.jsx)("button",{type:"button",className:"absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",onClick:Ie,children:(0,i.jsx)(k.CircleX,{className:"h-4 w-4 text-green-100"})})]})]})});ke.displayName="Combobox";var qe=(0,Ne.cva)("group relative cursor-pointer text-green-100 flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5",{variants:{variant:{default:["w-full","max-w-80","rounded-lg"],chip:["font-bold","rounded-3xl","data-[state=open]:bg-black","data-[state=open]:text-white"]},size:{small:["h-8","py-1","px-2","text-xs"],normal:["h-9","py-2","px-3","text-sm"],large:["h-10","py-3","px-4","text-base"]}},defaultVariants:{variant:"default",size:"normal"}});0&&(module.exports={Combobox});
2
2
  //# sourceMappingURL=Combobox.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/Combobox.tsx","../../../src/lib/utils.ts","../../../src/components/primitives/command.tsx","../../../src/components/primitives/dialog.tsx","../../../src/components/primitives/popover.tsx","../../../src/components/primitives/separator.tsx","../../../src/components/ui/ListItem.tsx","../../../src/components/ui/Checkbox.tsx","../../../src/components/ui/Badge.tsx","../../../src/components/ui/Label.tsx"],"sourcesContent":["'use client'\n\nimport { ComponentProps, forwardRef, useEffect, useState } from 'react'\nimport { ChevronDownIcon, CircleX, icons } from 'lucide-react'\nimport { cva, type VariantProps } from 'cva'\nimport { cn } from '@/lib/utils'\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/primitives/command'\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/primitives/popover'\nimport { Separator } from '@/components/primitives/separator'\n\nimport ListItem from '@/components/ui/ListItem'\nimport { Badge } from '@/components/ui/Badge'\nimport Label from '@/components/ui/Label'\n\ntype Icon = { icon?: keyof typeof icons }\ntype Children = { children?: (props: { close: () => void }) => JSX.Element }\ntype Option = { id: number; value: string; title: string; description?: string; icon?: string }\ntype ClassNames = { label?: string; trigger?: string; items?: string; content?: string }\ntype Shared = { label?: string; options: Option[]; classNames?: ClassNames; placeholder?: string }\ntype MultiSelect = { multiselect: true; value?: string[]; onChange?: (v: string[]) => void }\ntype SingleSelect = { multiselect?: false; value?: string; onChange?: (v: string) => void }\ntype TriggerVariants = VariantProps<typeof triggerVariants>\ntype SelectProps = Omit<ComponentProps<'select'>, 'value' | 'onChange' | 'size' | 'children'>\ntype Props = TriggerVariants & SelectProps & Children & Shared & Icon\ntype MultiSelectProps = Props & MultiSelect\ntype SingleSelectProps = Props & SingleSelect\ntype ComboboxProps = MultiSelectProps | SingleSelectProps\n\nexport const Combobox = forwardRef<HTMLDivElement, ComboboxProps>((props, ref) => {\n const {\n value,\n label,\n options,\n classNames,\n multiselect,\n placeholder,\n variant = 'default',\n size,\n icon,\n className,\n onChange: handleChange,\n children: footer,\n } = props\n const [selected, setSelected] = useState<Option[]>([])\n const [open, setOpen] = useState(false)\n const IconComponent = icon && icons[icon]\n const hideSearchBox = options?.length <= 5\n const isDefault = variant === 'default'\n const isChip = variant === 'chip'\n const close = () => setOpen(false)\n\n useEffect(() => {\n const valueArray = multiselect ? (value ?? []) : value ? [value] : []\n setSelected(\n valueArray.map((v) => options.find((o) => o.value === v)).filter((v) => v !== undefined)\n )\n }, [value])\n\n const handleSelect = (value: string) => {\n const option = options.find((o) => o.value === value)\n if (!option) return\n if (multiselect) {\n return setSelected((prev) => {\n const newSelected = prev.some((o) => o.value === value)\n ? prev.filter((v) => v !== option)\n : [...prev, option]\n handleChange?.(newSelected.map((o) => o.value))\n return newSelected\n })\n }\n setSelected([option])\n handleChange?.(option.value)\n close()\n }\n\n const handleClear = () => {\n setSelected([])\n multiselect ? handleChange?.([]) : handleChange?.('')\n }\n\n const handleDisplayValue = () => {\n const defaultLabel = selected.length > 0 ? selected.map((s) => s.title).join(', ') : placeholder\n return isDefault ? defaultLabel : label\n }\n\n return (\n <div className={cn('flex flex-col gap-2', className)}>\n {isDefault && label && <Label text={label} className={classNames?.label} />}\n\n <div className=\"relative flex\">\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild disabled={options.length === 0}>\n <div\n ref={ref}\n className={cn(\n triggerVariants({ variant, size }),\n selected.length > 0 && 'pr-10',\n classNames?.trigger\n )}\n aria-expanded={open}\n >\n {isDefault && IconComponent && <IconComponent className=\"h-4 w-4 shrink-0\" />}\n {isChip && selected.length > 0 && <Badge variant=\"purple\">{selected.length}</Badge>}\n\n <span\n className={cn(\n 'w-full truncate leading-normal',\n isDefault && selected.length == 0 && 'text-grey-40'\n )}\n >\n {handleDisplayValue()}\n </span>\n\n {selected.length == 0 && (\n <ChevronDownIcon\n className=\"shrink-0 transform group-data-[state=open]:rotate-180\"\n size=\"16\"\n />\n )}\n </div>\n </PopoverTrigger>\n\n <Command>\n <PopoverContent\n className={cn(\n 'flex w-full max-w-xs flex-col overflow-hidden p-0',\n 'max-h-[--radix-popover-content-available-height]',\n classNames?.content\n )}\n collisionPadding={8}\n sideOffset={4}\n align=\"start\"\n >\n {!hideSearchBox && <CommandInput placeholder=\"Search...\" />}\n\n <CommandList>\n <CommandEmpty>No results</CommandEmpty>\n <CommandGroup>\n {options.map(({ id, ...option }) => (\n <CommandItem key={id} value={option.value} onSelect={handleSelect}>\n <ListItem\n className={cn(classNames?.items, 'truncate py-1')}\n isSelected={selected.some((s) => s.value === option.value)}\n hasCheckbox={multiselect}\n {...option}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n\n {!!footer && <Separator />}\n {footer && footer({ close })}\n </PopoverContent>\n </Command>\n </Popover>\n\n {isDefault && selected.length > 0 && (\n <button\n type=\"button\"\n className=\"absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20\"\n onClick={handleClear}\n >\n <CircleX className=\"h-4 w-4 text-green-100\" />\n </button>\n )}\n </div>\n </div>\n )\n})\nCombobox.displayName = 'Combobox'\n\nconst triggerVariants = cva(\n 'group relative cursor-pointer text-green-100 flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5',\n {\n variants: {\n variant: {\n default: ['w-full', 'max-w-80', 'rounded-lg'],\n chip: [\n 'font-bold',\n 'rounded-3xl',\n 'data-[state=open]:bg-black',\n 'data-[state=open]:text-white',\n ],\n },\n size: {\n small: ['h-8', 'p-1', 'pl-2', 'text-xs'],\n normal: ['h-9', 'p-2', 'pl-3', 'text-sm'],\n large: ['h-10', 'p-3', 'pl-4', 'text-base'],\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'normal',\n },\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use client'\n\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport * as React from 'react'\n\nimport { Dialog, DialogContent } from '@/components/primitives/dialog'\n\nimport { cn } from '@/lib/utils'\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950',\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ntype CommandDialogProps = DialogProps\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"m-1 flex items-center rounded-xl border px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500',\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 h-px bg-neutral-200', className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-neutral-500', className)}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n","'use client'\n\nimport { cn } from '@/lib/utils'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport * as React from 'react'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-neutral-500 dark:text-neutral-400', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","'use client'\n\nimport * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\n\nimport { cn } from '@/lib/utils'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n","'use client'\r\n\r\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '@/lib/utils'\r\n\r\nconst Separator = React.forwardRef<\r\n React.ElementRef<typeof SeparatorPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\r\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\r\n <SeparatorPrimitive.Root\r\n ref={ref}\r\n decorative={decorative}\r\n orientation={orientation}\r\n className={cn(\r\n 'shrink-0 bg-grey-10',\r\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nSeparator.displayName = SeparatorPrimitive.Root.displayName\r\n\r\nexport { Separator }\r\n","import { cn } from '@/lib/utils'\nimport { CheckIcon } from 'lucide-react'\nimport { ComponentPropsWithoutRef, ReactNode } from 'react'\nimport Checkbox from '@/components/ui/Checkbox'\nimport { icons } from 'lucide-react'\n\ntype IconKey = keyof typeof icons\n\ninterface ListItemProps extends ComponentPropsWithoutRef<'li'> {\n icon?: string\n hasCheckbox?: boolean\n isSelected?: boolean\n title: string\n value: string\n description?: string\n}\n\nfunction ListItem({\n icon,\n hasCheckbox,\n isSelected,\n className,\n title,\n value,\n description,\n ...props\n}: ListItemProps) {\n const getIconIfValid = (icon: string): ReactNode => {\n if (icon in icons) {\n const IconComponent = icons[icon as IconKey]\n return <IconComponent size={14} />\n }\n return null\n }\n\n const optionIcon = icon ? getIconIfValid(icon) : undefined\n\n return (\n <li\n className={cn(\n 'group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm',\n className\n )}\n {...props}\n data-state={isSelected ? 'checked' : 'unchecked'}\n >\n {optionIcon && <span className=\"mr-2\">{optionIcon}</span>}\n {hasCheckbox && (\n <Checkbox id={value} checked={isSelected} onClick={(e) => e.preventDefault()} />\n )}\n <div>\n <p>{title}</p>\n <p className=\"text-xs text-grey-80\">{description}</p>\n </div>\n\n <CheckIcon\n className=\"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block\"\n size={16}\n />\n </li>\n )\n}\n\nexport default ListItem\n","'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nconst Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ classNames, children, ...props }, ref) => {\n const { disabled } = props\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n const labelClassName = disabled ? 'text-grey-40 pointer-events-none' : ''\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} disabled={disabled} ref={ref} {...props} />\n <label htmlFor={id} className={cn(labelClassName, classNames?.label)}>\n {children}\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\n\nexport default Checkbox\n","import { cva, type VariantProps } from 'cva'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst badgeVariants = cva('rounded-full px-2 py-0.5 text-xs font-semibold', {\n variants: {\n variant: {\n green: 'bg-green-90 text-white',\n pickle: 'bg-pickle-100 text-black',\n purple: 'bg-purple-100 text-white',\n },\n },\n defaultVariants: {\n variant: 'green',\n },\n})\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />\n}\n\nexport { Badge, badgeVariants }\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n}\n\nfunction Label({ text, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n </label>\n )\n}\n\nexport default Label\n"],"mappings":"slBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,cAAAE,KAAA,eAAAC,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sBAAU,KACxB,OAACC,EAAA,CACE,SAAAxC,EAAQ,IAAI,CAAC,CAAE,GAAAyC,EAAI,GAAGnB,CAAO,OAC5B,OAACoB,EAAA,CAAqB,MAAOpB,EAAO,MAAO,SAAUD,GACnD,mBAACsB,GAAA,CACC,UAAWd,EAAG5B,GAAY,MAAO,eAAe,EAChD,WAAYS,EAAS,KAAMkB,GAAMA,EAAE,QAAUN,EAAO,KAAK,EACzD,YAAapB,EACZ,GAAGoB,EACN,GANgBmB,CAOlB,CACD,EACH,GACF,EAEC,CAAC,CAAChC,MAAU,OAACmC,EAAA,EAAU,EACvBnC,GAAUA,EAAO,CAAE,MAAAS,EAAM,CAAC,GAC7B,EACF,GACF,EAECF,GAAaN,EAAS,OAAS,MAC9B,OAAC,UACC,KAAK,SACL,UAAU,6HACV,QAASe,GAET,mBAAC,WAAQ,UAAU,yBAAyB,EAC9C,GAEJ,GACF,CAEJ,CAAC,EACD9B,GAAS,YAAc,WAEvB,IAAMsC,MAAkB,QACtB,gKACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,CAAC,SAAU,WAAY,YAAY,EAC5C,KAAM,CACJ,YACA,cACA,6BACA,8BACF,CACF,EACA,KAAM,CACJ,MAAO,CAAC,MAAO,MAAO,OAAQ,SAAS,EACvC,OAAQ,CAAC,MAAO,MAAO,OAAQ,SAAS,EACxC,MAAO,CAAC,OAAQ,MAAO,OAAQ,WAAW,CAC5C,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,QACR,CACF,CACF","names":["Combobox_exports","__export","Combobox","__toCommonJS","import_react","import_lucide_react","import_cva","import_clsx","import_tailwind_merge","cn","inputs","import_cmdk","import_lucide_react","React","DialogPrimitive","import_lucide_react","React","import_jsx_runtime","DialogPortal","DialogOverlay","className","props","ref","cn","DialogContent","children","DialogPortal","DialogHeader","DialogFooter","DialogTitle","DialogDescription","import_jsx_runtime","Command","className","props","ref","CommandPrimitive","cn","CommandInput","className","props","ref","CommandPrimitive","cn","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut","React","PopoverPrimitive","import_jsx_runtime","Popover","PopoverTrigger","PopoverContent","className","align","sideOffset","props","ref","cn","SeparatorPrimitive","React","import_jsx_runtime","Separator","className","orientation","decorative","props","ref","cn","import_lucide_react","CheckboxPrimitive","import_lucide_react","import_react","import_jsx_runtime","CheckboxToggle","className","props","ref","cn","Checkbox","classNames","children","disabled","id","labelClassName","Checkbox_default","import_lucide_react","import_jsx_runtime","ListItem","icon","hasCheckbox","isSelected","className","title","value","description","props","optionIcon","IconComponent","cn","Checkbox_default","e","ListItem_default","import_cva","import_jsx_runtime","badgeVariants","Badge","className","variant","props","cn","import_jsx_runtime","Label","text","className","props","cn","Label_default","import_jsx_runtime","Combobox","props","ref","value","label","options","classNames","multiselect","placeholder","variant","size","icon","className","handleChange","footer","selected","setSelected","open","setOpen","IconComponent","hideSearchBox","isDefault","isChip","close","v","o","handleSelect","option","prev","newSelected","handleClear","handleDisplayValue","defaultLabel","s","cn","Label_default","Popover","PopoverTrigger","triggerVariants","Badge","Command","PopoverContent","CommandInput","CommandList","CommandEmpty","CommandGroup","id","CommandItem","ListItem_default","Separator"]}
1
+ {"version":3,"sources":["../../../src/components/ui/Combobox.tsx","../../../src/lib/utils.ts","../../../src/components/primitives/command.tsx","../../../src/components/primitives/dialog.tsx","../../../src/components/primitives/popover.tsx","../../../src/components/primitives/separator.tsx","../../../src/components/ui/ListItem.tsx","../../../src/components/ui/Checkbox.tsx","../../../src/components/ui/Badge.tsx","../../../src/components/ui/Label.tsx"],"sourcesContent":["'use client'\n\nimport { ComponentProps, forwardRef, useEffect, useState } from 'react'\nimport { ChevronDownIcon, CircleX, icons } from 'lucide-react'\nimport { cva, type VariantProps } from 'cva'\nimport { cn } from '@/lib/utils'\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/primitives/command'\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/primitives/popover'\nimport { Separator } from '@/components/primitives/separator'\n\nimport ListItem from '@/components/ui/ListItem'\nimport { Badge } from '@/components/ui/Badge'\nimport Label from '@/components/ui/Label'\n\ntype Icon = { icon?: keyof typeof icons }\ntype Children = { children?: (props: { close: () => void }) => JSX.Element }\ntype Option = { id: string; value: string; title: string; description?: string; icon?: string }\ntype ClassNames = { label?: string; trigger?: string; items?: string; content?: string }\ntype Shared = { label?: string; options: Option[]; classNames?: ClassNames; placeholder?: string }\ntype MultiSelect = { multiselect: true; value?: string[]; onChange?: (v: string[]) => void }\ntype SingleSelect = { multiselect?: false; value?: string; onChange?: (v: string) => void }\ntype TriggerVariants = VariantProps<typeof triggerVariants>\ntype SelectProps = Omit<ComponentProps<'select'>, 'value' | 'onChange' | 'size' | 'children'>\ntype Props = TriggerVariants & SelectProps & Children & Shared & Icon\ntype MultiSelectProps = Props & MultiSelect\ntype SingleSelectProps = Props & SingleSelect\ntype ComboboxProps = MultiSelectProps | SingleSelectProps\n\nexport const Combobox = forwardRef<HTMLDivElement, ComboboxProps>((props, ref) => {\n const {\n value,\n label,\n options,\n classNames,\n multiselect,\n placeholder,\n variant = 'default',\n size,\n icon,\n className,\n onChange: handleChange,\n children: footer,\n } = props\n const [selected, setSelected] = useState<Option[]>([])\n const [open, setOpen] = useState(false)\n const IconComponent = icon && icons[icon]\n const hideSearchBox = options?.length <= 5\n const isDefault = variant === 'default'\n const isChip = variant === 'chip'\n const close = () => setOpen(false)\n\n useEffect(() => {\n const valueArray = multiselect ? (value ?? []) : value ? [value] : []\n setSelected(\n valueArray.map((v) => options.find((o) => o.value === v)).filter((v) => v !== undefined)\n )\n }, [value])\n\n const handleSelect = (value: string) => {\n const option = options.find((o) => o.value === value)\n if (!option) return\n if (multiselect) {\n return setSelected((prev) => {\n const newSelected = prev.some((o) => o.value === value)\n ? prev.filter((v) => v !== option)\n : [...prev, option]\n handleChange?.(newSelected.map((o) => o.value))\n return newSelected\n })\n }\n setSelected([option])\n handleChange?.(option.value)\n close()\n }\n\n const handleClear = () => {\n setSelected([])\n multiselect ? handleChange?.([]) : handleChange?.('')\n }\n\n const handleDisplayValue = () => {\n const defaultLabel = selected.length > 0 ? selected.map((s) => s.title).join(', ') : placeholder\n return isDefault ? defaultLabel : label\n }\n\n return (\n <div className={cn('flex flex-col gap-2', className)}>\n {isDefault && label && <Label text={label} className={classNames?.label} />}\n\n <div className=\"relative flex\">\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild disabled={options.length === 0}>\n <div\n ref={ref}\n className={cn(\n triggerVariants({ variant, size }),\n selected.length > 0 && 'pr-10',\n classNames?.trigger\n )}\n aria-expanded={open}\n >\n {isDefault && IconComponent && <IconComponent className=\"h-4 w-4 shrink-0\" />}\n {isChip && selected.length > 0 && <Badge variant=\"purple\">{selected.length}</Badge>}\n\n <span\n className={cn(\n 'w-full truncate leading-normal',\n isDefault && selected.length == 0 && 'text-grey-40'\n )}\n >\n {handleDisplayValue()}\n </span>\n\n {selected.length == 0 && (\n <ChevronDownIcon\n className=\"shrink-0 transform group-data-[state=open]:rotate-180\"\n size=\"16\"\n />\n )}\n </div>\n </PopoverTrigger>\n\n <Command>\n <PopoverContent\n className={cn(\n 'flex w-full max-w-xs flex-col overflow-hidden p-0',\n 'max-h-[--radix-popover-content-available-height]',\n classNames?.content\n )}\n collisionPadding={8}\n sideOffset={4}\n align=\"start\"\n >\n {!hideSearchBox && <CommandInput placeholder=\"Search...\" />}\n\n <CommandList>\n <CommandEmpty>No results</CommandEmpty>\n <CommandGroup>\n {options.map(({ id, ...option }) => (\n <CommandItem key={id} value={option.value} onSelect={handleSelect}>\n <ListItem\n className={cn(classNames?.items, 'truncate py-1')}\n isSelected={selected.some((s) => s.value === option.value)}\n hasCheckbox={multiselect}\n {...option}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n\n {!!footer && <Separator />}\n {footer && footer({ close })}\n </PopoverContent>\n </Command>\n </Popover>\n\n {isDefault && selected.length > 0 && (\n <button\n type=\"button\"\n className=\"absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20\"\n onClick={handleClear}\n >\n <CircleX className=\"h-4 w-4 text-green-100\" />\n </button>\n )}\n </div>\n </div>\n )\n})\nCombobox.displayName = 'Combobox'\n\nconst triggerVariants = cva(\n 'group relative cursor-pointer text-green-100 flex flex-row items-center justify-between gap-2 border border-grey-20 focus:outline-green-80 disabled:bg-grey-5',\n {\n variants: {\n variant: {\n default: ['w-full', 'max-w-80', 'rounded-lg'],\n chip: [\n 'font-bold',\n 'rounded-3xl',\n 'data-[state=open]:bg-black',\n 'data-[state=open]:text-white',\n ],\n },\n size: {\n small: ['h-8', 'py-1', 'px-2', 'text-xs'],\n normal: ['h-9', 'py-2', 'px-3', 'text-sm'],\n large: ['h-10', 'py-3', 'px-4', 'text-base'],\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'normal',\n },\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use client'\n\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport * as React from 'react'\n\nimport { Dialog, DialogContent } from '@/components/primitives/dialog'\n\nimport { cn } from '@/lib/utils'\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950',\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ntype CommandDialogProps = DialogProps\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"m-1 flex items-center rounded-xl border px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500',\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 h-px bg-neutral-200', className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-neutral-500', className)}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n","'use client'\n\nimport { cn } from '@/lib/utils'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport * as React from 'react'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-neutral-500 dark:text-neutral-400', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","'use client'\n\nimport * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\n\nimport { cn } from '@/lib/utils'\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 rounded-2xl border bg-white p-4 text-black shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent }\n","'use client'\r\n\r\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\r\nimport * as React from 'react'\r\n\r\nimport { cn } from '@/lib/utils'\r\n\r\nconst Separator = React.forwardRef<\r\n React.ElementRef<typeof SeparatorPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\r\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\r\n <SeparatorPrimitive.Root\r\n ref={ref}\r\n decorative={decorative}\r\n orientation={orientation}\r\n className={cn(\r\n 'shrink-0 bg-grey-10',\r\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nSeparator.displayName = SeparatorPrimitive.Root.displayName\r\n\r\nexport { Separator }\r\n","import { cn } from '@/lib/utils'\nimport { CheckIcon } from 'lucide-react'\nimport { ComponentPropsWithoutRef, ReactNode } from 'react'\nimport Checkbox from '@/components/ui/Checkbox'\nimport { icons } from 'lucide-react'\n\ntype IconKey = keyof typeof icons\n\ninterface ListItemProps extends ComponentPropsWithoutRef<'li'> {\n icon?: string\n hasCheckbox?: boolean\n isSelected?: boolean\n title: string\n value: string\n description?: string\n}\n\nfunction ListItem({\n icon,\n hasCheckbox,\n isSelected,\n className,\n title,\n value,\n description,\n ...props\n}: ListItemProps) {\n const getIconIfValid = (icon: string): ReactNode => {\n if (icon in icons) {\n const IconComponent = icons[icon as IconKey]\n return <IconComponent size={14} />\n }\n return null\n }\n\n const optionIcon = icon ? getIconIfValid(icon) : undefined\n\n return (\n <li\n className={cn(\n 'group relative flex w-72 cursor-pointer flex-row items-center text-left text-sm',\n className\n )}\n {...props}\n data-state={isSelected ? 'checked' : 'unchecked'}\n >\n {optionIcon && <span className=\"mr-2\">{optionIcon}</span>}\n {hasCheckbox && (\n <Checkbox id={value} checked={isSelected} onClick={(e) => e.preventDefault()} />\n )}\n <div>\n <p>{title}</p>\n <p className=\"text-xs text-grey-80\">{description}</p>\n </div>\n\n <CheckIcon\n className=\"absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block\"\n size={16}\n />\n </li>\n )\n}\n\nexport default ListItem\n","'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nconst Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ classNames, children, ...props }, ref) => {\n const { disabled } = props\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n const labelClassName = disabled ? 'text-grey-40 pointer-events-none' : ''\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} disabled={disabled} ref={ref} {...props} />\n <label htmlFor={id} className={cn(labelClassName, classNames?.label)}>\n {children}\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\n\nexport default Checkbox\n","import { cva, type VariantProps } from 'cva'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst badgeVariants = cva('rounded-full px-2 py-0.5 text-xs font-semibold', {\n variants: {\n variant: {\n green: 'bg-green-90 text-white',\n pickle: 'bg-pickle-100 text-black',\n purple: 'bg-purple-100 text-white',\n },\n },\n defaultVariants: {\n variant: 'green',\n },\n})\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />\n}\n\nexport { Badge, badgeVariants }\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n}\n\nfunction Label({ text, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n </label>\n )\n}\n\nexport default Label\n"],"mappings":"slBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,cAAAE,KAAA,eAAAC,GAAAH,IAEA,IAAAI,EAAgE,iBAChEC,EAAgD,wBAChDC,GAAuC,eCJvC,IAAAC,GAAsC,gBACtCC,GAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,eAAQ,SAAKA,CAAM,CAAC,CAC7B,CCFA,IAAAC,EAA4C,gBAC5CC,GAAuB,wBACvBC,EAAuB,sBCFvB,IAAAC,EAAiC,uCACjCC,GAAkB,wBAClBC,EAAuB,sBAcrBC,EAAA,6BARF,IAAMC,GAA+B,SAIrC,IAAMC,GAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,OAC1B,OAAiB,UAAhB,CACC,IAAKA,EACL,UAAWC,EACT,yJACAH,CACF,EACC,GAAGC,EACN,CACD,EACDF,GAAc,YAA8B,UAAQ,YAEpD,IAAMK,GAAsB,aAG1B,CAAC,CAAE,UAAAJ,EAAW,SAAAK,EAAU,GAAGJ,CAAM,EAAGC,OACpC,QAACI,GAAA,CACC,oBAACP,GAAA,EAAc,KACf,QAAiB,UAAhB,CACC,IAAKG,EACL,UAAWC,EACT,wjBACAH,CACF,EACC,GAAGC,EAEH,UAAAI,KACD,QAAiB,QAAhB,CAAsB,UAAU,yZAC/B,oBAAC,MAAE,UAAU,UAAU,KACvB,OAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GACF,GACF,CACD,EACDD,GAAc,YAA8B,UAAQ,YAEpD,IAAMG,GAAe,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,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R,CACF,CACF","names":["Combobox_exports","__export","Combobox","__toCommonJS","import_react","import_lucide_react","import_cva","import_clsx","import_tailwind_merge","cn","inputs","import_cmdk","import_lucide_react","React","DialogPrimitive","import_lucide_react","React","import_jsx_runtime","DialogPortal","DialogOverlay","className","props","ref","cn","DialogContent","children","DialogPortal","DialogHeader","DialogFooter","DialogTitle","DialogDescription","import_jsx_runtime","Command","className","props","ref","CommandPrimitive","cn","CommandInput","className","props","ref","CommandPrimitive","cn","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut","React","PopoverPrimitive","import_jsx_runtime","Popover","PopoverTrigger","PopoverContent","className","align","sideOffset","props","ref","cn","SeparatorPrimitive","React","import_jsx_runtime","Separator","className","orientation","decorative","props","ref","cn","import_lucide_react","CheckboxPrimitive","import_lucide_react","import_react","import_jsx_runtime","CheckboxToggle","className","props","ref","cn","Checkbox","classNames","children","disabled","id","labelClassName","Checkbox_default","import_lucide_react","import_jsx_runtime","ListItem","icon","hasCheckbox","isSelected","className","title","value","description","props","optionIcon","IconComponent","cn","Checkbox_default","e","ListItem_default","import_cva","import_jsx_runtime","badgeVariants","Badge","className","variant","props","cn","import_jsx_runtime","Label","text","className","props","cn","Label_default","import_jsx_runtime","Combobox","props","ref","value","label","options","classNames","multiselect","placeholder","variant","size","icon","className","handleChange","footer","selected","setSelected","open","setOpen","IconComponent","hideSearchBox","isDefault","isChip","close","v","o","handleSelect","option","prev","newSelected","handleClear","handleDisplayValue","defaultLabel","s","cn","Label_default","Popover","PopoverTrigger","triggerVariants","Badge","Command","PopoverContent","CommandInput","CommandList","CommandEmpty","CommandGroup","id","CommandItem","ListItem_default","Separator"]}