sodtrack-web-ui 0.83.1 → 0.84.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-VUWZ7HQN.mjs → chunk-5MFO5X4O.mjs} +1 -1
- package/dist/chunk-EOJM3KHF.mjs +1 -0
- package/dist/{chunk-3L3S3VVC.mjs → chunk-JFVQTEOV.mjs} +1 -1
- package/dist/chunk-R3YSOGZ7.mjs +1 -0
- package/dist/chunk-S54WWBQF.mjs +1 -0
- package/dist/chunk-UAUPRGMG.mjs +1 -0
- package/dist/{chunk-IYUEIVJ7.mjs → chunk-XGWMDVKH.mjs} +1 -1
- package/dist/components/accordion-form.mjs +1 -1
- package/dist/components/accordion.mjs +1 -1
- package/dist/components/badge-category-skeleton.d.mts +42 -0
- package/dist/components/badge-category-skeleton.d.ts +42 -0
- package/dist/components/badge-category-skeleton.js +1 -0
- package/dist/components/badge-category-skeleton.mjs +1 -0
- package/dist/components/badge-category.d.mts +179 -0
- package/dist/components/badge-category.d.ts +179 -0
- package/dist/components/badge-category.js +1 -0
- package/dist/components/badge-category.mjs +1 -0
- package/dist/components/{status-badge-skeleton.d.mts → badge-status-skeleton.d.mts} +7 -7
- package/dist/components/{status-badge-skeleton.d.ts → badge-status-skeleton.d.ts} +7 -7
- package/dist/components/{status-badge-skeleton.js → badge-status-skeleton.js} +1 -1
- package/dist/components/badge-status-skeleton.mjs +1 -0
- package/dist/components/{status-badge.d.mts → badge-status.d.mts} +9 -9
- package/dist/components/{status-badge.d.ts → badge-status.d.ts} +9 -9
- package/dist/components/{status-badge.js → badge-status.js} +1 -1
- package/dist/components/badge-status.mjs +1 -0
- package/dist/components/card-expandable.d.mts +3 -1
- package/dist/components/card-expandable.d.ts +3 -1
- package/dist/components/card-expandable.js +1 -1
- package/dist/components/card-expandable.mjs +1 -1
- package/dist/components/data-table.mjs +1 -1
- package/dist/components/index.d.mts +4 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/components/list-item-arrow.mjs +1 -1
- package/dist/components/list-item-button.mjs +1 -1
- package/dist/components/list-item-checkbox-left.mjs +1 -1
- package/dist/components/list-item-checkbox.mjs +1 -1
- package/dist/components/list-item.mjs +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-7SNMNOMU.mjs +0 -1
- package/dist/components/status-badge-skeleton.mjs +0 -1
- package/dist/components/status-badge.mjs +0 -1
- /package/dist/{chunk-DFSOCE2F.mjs → chunk-WAF6FQLO.mjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {a as a$1}from'./chunk-JTO6FE4R.mjs';import {d}from'./chunk-FAMLJ6AJ.mjs';import {g}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import*as c from'react';import*as e from'@radix-ui/react-accordion';export{e as a };import {jsx,jsxs}from'react/jsx-runtime';var S=["sm","md"],k=c.forwardRef(({className:i,children:r,size:o="md",hasBorder:a$1=false,...s},m)=>jsx(e.Root,{"data-border":a$1,"data-size":o,className:a("group/root space-y-2",i),...s,ref:m,children:r})),y=c.forwardRef(({className:i,...r},o)=>jsx(e.Item,{ref:o,className:a("rounded-lg bg-neutral-50","group-data-[border=true]/root:ring-1 group-data-[border=true]/root:ring-neutral-200 group-data-[border=true]/root:ring-inset",i),...r}));y.displayName="AccordionItem";var P=c.forwardRef(({className:i,children:r,...o},a$1)=>jsx(e.Header,{className:"flex",children:jsxs(e.Trigger,{ref:a$1,className:a("group flex flex-1 items-center justify-between p-4 transition-all [&[data-state=open]>svg]:rotate-180",i),...o,children:[r,jsx(g,{className:"h-6 w-6 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]})}));P.displayName=e.Trigger.displayName;var x=c.forwardRef(({className:i,title:r,description:o,onEndButtonClick:a$2,StartIcon:s,EndIcon:m,children:N,badgeNumber:g$1,chipStatus:p,...v},A)=>jsx(e.Header,{className:"flex",children:jsxs(e.Trigger,{title:r,ref:A,className:a("group hover:not-disabled:bg-primary-100 flex flex-1 items-center justify-between gap-3 rounded-lg p-2 pl-3 transition-all [&[data-state=open]>div>.chevron-icon]:rotate-180",a(!o&&"min-h-12",o&&"group-data-[size=md]/root:min-h-15.75 group-data-[size=sm]/root:min-h-12"),i),...v,children:[jsxs("div",{className:"flex",children:[s&&jsx(s,{className:"mr-2 h-4.5 w-4.5 text-neutral-900 group-disabled:text-neutral-500 group-data-[size=md]/root:h-4.5 group-data-[size=md]/root:w-4.5 group-data-[size=sm]:h-3.5 group-data-[size=sm]/root:w-3.5"}),jsxs("div",{children:[jsx("p",{className:"text-left text-base leading-[125%]! font-semibold text-neutral-900 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-sm",children:r}),jsx("p",{className:"text-left text-sm leading-[130%] font-normal tracking-[0.28px] text-neutral-700 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-xs",children:o})]})]}),jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[p&&jsx(d,{variant:p.variant,type:p.type,size:"xs",className:"shrink-0",children:p.text}),g$1?.toString()&&jsx(a$1,{variant:"alert",size:"md",content:g$1.toString()}),m&&jsx(m,{className:"m-1.75 text-neutral-900 group-disabled:text-neutral-500",size:18,onClick:R=>{R.stopPropagation(),a$2?.();}}),jsx(g,{className:"chevron-icon h-4.5 w-4.5 shrink-0 transition-transform duration-200 group-disabled:text-neutral-500"})]})]})}));x.displayName=e.Trigger.displayName;var h=c.forwardRef(({className:i,children:r,...o},a$1)=>jsx(e.Content,{ref:a$1,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",...o,children:jsx("div",{className:a("pr-2 pl-3 group-data-[size=md]/root:py-4 group-data-[size=sm]/root:py-2",i),children:r})}));h.displayName=e.Content.displayName;export{S as b,k as c,y as d,P as e,x as f,h as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-IEJ6WWCV.mjs';import {tv}from'tailwind-variants';import {jsx}from'react/jsx-runtime';var r=tv({base:"rounded-sm",variants:{size:{sm:"h-4.5 w-21.5",md:"h-5 w-24.25",lg:"h-5.5 w-27.5"},isIconOnly:{true:{}}},compoundVariants:[{size:"sm",isIconOnly:true,class:"w-4.5"},{size:"md",isIconOnly:true,class:"w-5"},{size:"lg",isIconOnly:true,class:"w-6"}],defaultVariants:{size:"sm"}}),g=({className:o,size:t,isIconOnly:s})=>jsx(a,{className:r({size:t,isIconOnly:s,className:o})});export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {a as a$1}from'./chunk-JTO6FE4R.mjs';import {d}from'./chunk-FAMLJ6AJ.mjs';import {g}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import*as n from'react';import*as e from'@radix-ui/react-accordion';import {jsx,jsxs}from'react/jsx-runtime';var b=["sm","md"],w=n.forwardRef(({className:i,children:o,size:r="md",...a$1},d)=>jsx(e.Root,{"data-size":r,className:a("group/root space-y-2",i),...a$1,ref:d,children:o})),y=n.forwardRef(({className:i,...o},r)=>jsx(e.Item,{ref:r,className:i,...o}));y.displayName="AccordionFormItem";var R=n.forwardRef(({className:i,title:o,onEndButtonClick:r,StartIcon:a$2,children:d$1,badgeNumber:p,chipStatus:c,...g$1},u)=>jsx(e.Header,{className:"flex",children:jsxs(e.Trigger,{title:o,ref:u,className:a("group flex h-8 items-center gap-4 [&[data-state=open]>div>.chevron-icon]:rotate-180",i),...g$1,children:[jsxs("div",{className:"group flex items-center",children:[a$2&&jsx(a$2,{className:"mr-2 h-4.5 w-4.5 shrink-0 text-primary-500 transition-colors group-enabled:group-hover:text-primary-700 group-disabled:text-neutral-500 group-data-[size=sm]/root:h-3.5 group-data-[size=sm]/root:w-3.5"}),jsx("div",{children:jsx("p",{className:"line-clamp-1 text-left text-base font-semibold leading-[130%]! text-primary-500 transition-colors group-enabled:group-hover:text-primary-700 group-disabled:text-neutral-500 group-data-[size=sm]/root:text-sm",children:o})})]}),jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[c&&jsx(d,{variant:c.variant,type:c.type,size:"xs",className:"shrink-0",children:c.text}),p?.toString()&&jsx(a$1,{variant:"alert",size:"md",content:p.toString()}),jsx(g,{className:"chevron-icon h-4.5 w-4.5 shrink-0 text-primary-500 transition-transform group-enabled:group-hover:text-primary-700 group-disabled:text-neutral-500"})]})]})}));R.displayName=e.Trigger.displayName;var A=n.forwardRef(({className:i,children:o,...r},a)=>jsx(e.Content,{ref:a,className:"overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:jsx("div",{className:i,children:o})}));A.displayName=e.Content.displayName;export{b as a,w as b,y as c,R as d,A as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var v=tv({slots:{container:"font-inter flex w-fit items-center justify-center gap-2 rounded-sm font-medium",icon:"shrink-0",text:"line-clamp-1"},variants:{size:{sm:{container:"py-0.625 px-1.5",text:"text-2xs leading-[130%]",icon:"size-3"},md:{container:"px-1.5 py-0.5",text:"text-xs leading-[133%]",icon:"size-3"},lg:{container:"px-1.5 py-0.5",text:"text-sm leading-[143%]",icon:"size-3.5"}},isIconOnly:{true:{container:"aspect-square justify-center"}},variant:{light:{},outline:{container:"bg-neutral-50 ring ring-inset"},ghost:{container:"bg-neutral-50"},fill:{container:"text-neutral-50"}},color:{primary:{},jungle:{},green:{},aqua:{},sky:{},violet:{},lavender:{},orchid:{},pink:{},bubblegum:{},orange:{},neutral:{}}},compoundVariants:[{size:"sm",isIconOnly:true,class:{container:"p-0.75"}},{size:"md",isIconOnly:true,class:{container:"p-1"}},{size:"lg",isIconOnly:true,class:{container:"p-1.25"}},{variant:"light",color:"primary",class:{container:"bg-primary-300",text:"text-primary-800",icon:"text-primary-700"}},{variant:"light",color:"jungle",class:{container:"bg-jungle-100",text:"text-jungle-800",icon:"text-jungle-700"}},{variant:"light",color:"green",class:{container:"bg-green-200",text:"text-mint-800",icon:"text-mint-700"}},{variant:"light",color:"aqua",class:{container:"bg-aqua-50",text:"text-aqua-800",icon:"text-aqua-700"}},{variant:"light",color:"sky",class:{container:"bg-sky-100",text:"text-sky-800",icon:"text-sky-700"}},{variant:"light",color:"violet",class:{container:"bg-violet-50",text:"text-violet-800",icon:"text-indigo-700"}},{variant:"light",color:"lavender",class:{container:"bg-lavender-100",text:"text-lavender-800",icon:"text-violet-500"}},{variant:"light",color:"orchid",class:{container:"bg-orchid-100",text:"text-orchid-800",icon:"text-orchid-600"}},{variant:"light",color:"pink",class:{container:"bg-pink-50 text-pink-800"}},{variant:"light",color:"bubblegum",class:{container:"bg-bubblegum-50",text:"text-bubblegum-800",icon:"text-bubblegum-700"}},{variant:"light",color:"orange",class:{container:"bg-orange-100",text:"text-orange-800",icon:"text-orange-700"}},{variant:"light",color:"neutral",class:{container:"bg-neutral-300 text-neutral-800"}},{variant:"outline",color:"primary",class:{container:"ring-primary-600",text:"text-primary-700",icon:"text-primary-600"}},{variant:"outline",color:"jungle",class:{container:"ring-jungle-700",text:"text-jungle-700",icon:"text-jungle-600"}},{variant:"outline",color:"green",class:{container:"ring-green-700",text:"text-green-700",icon:"text-mint-700"}},{variant:"outline",color:"aqua",class:{container:"ring-aqua-700",text:"text-aqua-700",icon:"text-aqua-600"}},{variant:"outline",color:"sky",class:{container:"ring-sky-700",text:"text-sky-700",icon:"text-sky-600"}},{variant:"outline",color:"violet",class:{container:"ring-violet-700",text:"text-violet-700",icon:"text-indigo-600"}},{variant:"outline",color:"lavender",class:{container:"ring-lavender-700",text:"text-lavender-700",icon:"text-violet-500"}},{variant:"outline",color:"orchid",class:{container:"ring-orchid-700",text:"text-orchid-700",icon:"text-orchid-600"}},{variant:"outline",color:"pink",class:{container:"ring-pink-700",text:"text-pink-700",icon:"text-pink-700"}},{variant:"outline",color:"bubblegum",class:{container:"ring-bubblegum-700",text:"text-bubblegum-700",icon:"text-bubblegum-600"}},{variant:"outline",color:"orange",class:{container:"ring-orange-700",text:"text-orange-700",icon:"text-orange-600"}},{variant:"outline",color:"neutral",class:{container:"ring-neutral-700",text:"text-neutral-700",icon:"text-neutral-800"}},{variant:"ghost",color:"primary",class:{text:"text-primary-600",icon:"text-primary-600"}},{variant:"ghost",color:"jungle",class:{text:"text-jungle-700",icon:"text-jungle-600"}},{variant:"ghost",color:"green",class:{text:"text-green-700",icon:"text-mint-700"}},{variant:"ghost",color:"aqua",class:{text:"text-aqua-700",icon:"text-aqua-600"}},{variant:"ghost",color:"sky",class:{text:"text-sky-700",icon:"text-sky-600"}},{variant:"ghost",color:"violet",class:{text:"text-violet-700",icon:"text-indigo-600"}},{variant:"ghost",color:"lavender",class:{text:"text-lavender-700",icon:"text-violet-500"}},{variant:"ghost",color:"orchid",class:{text:"text-orchid-700",icon:"text-orchid-600"}},{variant:"ghost",color:"pink",class:{text:"text-pink-700",icon:"text-pink-700"}},{variant:"ghost",color:"bubblegum",class:{text:"text-bubblegum-700",icon:"text-bubblegum-600"}},{variant:"ghost",color:"orange",class:{text:"text-orange-700",icon:"text-orange-600"}},{variant:"ghost",color:"neutral",class:{text:"text-neutral-700",icon:"text-neutral-800"}},{variant:"fill",color:"primary",class:{container:"bg-primary-600"}},{variant:"fill",color:"jungle",class:{container:"bg-jungle-700"}},{variant:"fill",color:"green",class:{container:"bg-green-700"}},{variant:"fill",color:"aqua",class:{container:"bg-aqua-700"}},{variant:"fill",color:"sky",class:{container:"bg-sky-700"}},{variant:"fill",color:"violet",class:{container:"bg-violet-600"}},{variant:"fill",color:"lavender",class:{container:"bg-lavender-600"}},{variant:"fill",color:"orchid",class:{container:"bg-orchid-600"}},{variant:"fill",color:"pink",class:{container:"bg-pink-600"}},{variant:"fill",color:"bubblegum",class:{container:"bg-bubblegum-600"}},{variant:"fill",color:"orange",class:{container:"bg-orange-700"}},{variant:"fill",color:"neutral",class:{container:"bg-neutral-700"}}],defaultVariants:{}}),y=({text:t,icon:e,variant:a,color:o,size:r,className:i,...l})=>{let c=!!e&&!t,{container:s,icon:g,text:x}=v({variant:a,color:o,size:r,isIconOnly:c});return jsxs("div",{className:s({className:i}),...l,children:[e&&jsx(e,{className:g()}),t&&jsx("span",{className:x(),children:t})]})};export{y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c as c$3}from'./chunk-AI4D6AOK.mjs';import {c as c$1}from'./chunk-PTRXL7BY.mjs';import {c as c$2}from'./chunk-GBBE3RHT.mjs';import {d}from'./chunk-FAMLJ6AJ.mjs';import {c as c$4}from'./chunk-JWB3TN2C.mjs';import {a as a$1}from'./chunk-DHWOGUID.mjs';import {e,s,t}from'./chunk-5VHBHGBZ.mjs';import {a}from'./chunk-XJD5SYZJ.mjs';import {useCallback}from'react';import {tv}from'tailwind-variants';import {useCollapsibleContext,Collapsible}from'@ark-ui/react/collapsible';import {getDefaultOptions}from'date-fns';import {jsxs,jsx}from'react/jsx-runtime';var c=tv({slots:{root:"ring-expandable-card-border group/expandable-card flex h-fit flex-col rounded-lg ring transition-all duration-200 ease-in-out ring-inset",header:"flex pt-3 pr-1 pb-2 pl-3",headerLabel:"text-sm leading-[130%] font-semibold empty:hidden",complementaryText:"line-clamp-1 text-xs leading-[130%] text-neutral-900",subtitle:"line-clamp-1 text-xs leading-[130%] text-neutral-700",content:"data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up border-expandable-card-border overflow-hidden group-data-[state=open]/expandable-card:border-t",contentInner:"px-3 pt-4 pb-6",fixedContent:"border-expandable-card-border border-t px-3 pt-6 pb-4"},variants:{background:{white:{root:"bg-neutral-50"},gray:{root:"bg-neutral-100"}}},defaultVariants:{background:"white"}}),W=(o,e)=>e?.startsWith("es")?o?"Contraer":"Expandir":e?.startsWith("pt")?o?"Recolher":"Expandir":o?"Collapse":"Expand",it=({headerLabel:o,complementaryText:e$1,subtitle:a$2,headerTooltip:n,className:m,action:i,chipStatus:l,chipExpandable:p,Icon:f,iconButtons:H,checkbox:b,...k})=>{let{header:w,headerLabel:z,complementaryText:B,subtitle:D}=c(),h=useCollapsibleContext(),{locale:M}=getDefaultOptions(),F=W(h.open,M?.code);return jsxs("div",{...k,className:a(w(),m),children:[b&&jsx(c$1,{...b,className:a("m-1",b.className),size:"sm"}),jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&jsx(f,{className:"h-3.5 w-3.5 shrink-0"}),jsxs("div",{className:"flex items-center gap-2",children:[jsx("b",{className:z(),children:o}),e$1&&jsx("span",{className:B(),children:e$1}),n&&jsx(a$1,{content:n,contentClassName:"font-normal normal-case",children:jsx(e,{className:"h-3.5 w-3.5 shrink-0"})})]})]}),jsxs("div",{className:"flex items-center gap-2",children:[l&&jsx(d,{...l,size:"xs",type:"light"}),p&&jsx(c$2,{...p,type:"light"}),H?.map((d,x)=>{let{tooltipContent:v,...O}=d;return jsx(a$1,{content:v,disabled:!v,children:jsx(c$3,{...O,variant:"standard",size:"xs"})},x)}),i&&(()=>{let{tooltipContent:d,...x}=i;return jsx(a$1,{content:d,disabled:!d,children:jsx(c$4,{...x,size:"xs",variant:"standard"})})})(),jsx(a$1,{content:F,asChild:true,children:jsx(Collapsible.Trigger,{asChild:true,children:jsx(c$3,{Icon:h.open?s:t,variant:"standard",size:"xs"})})})]})]}),a$2&&jsx("p",{className:D(),children:a$2})]})]})},lt=({className:o,...e})=>{let{contentInner:a,content:n}=c();return jsx(Collapsible.Content,{className:n(),children:jsx("div",{...e,className:a({className:o})})})},pt=({className:o,...e})=>{let{fixedContent:a}=c();return jsx("div",{...e,className:a({className:o})})},dt=({className:o,onOpenChange:e,children:a,background:n="white",...m})=>{let{root:i}=c({background:n}),l=useCallback(p=>{e?.(p);},[e]);return jsx(Collapsible.Root,{onOpenChange:l,className:i({className:o}),...m,children:a})};export{it as a,lt as b,pt as c,dt as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-IEJ6WWCV.mjs';import {tv}from'tailwind-variants';import {jsx}from'react/jsx-runtime';var i=tv({variants:{size:{sm:"h-4.5 w-16.5",md:"h-5 w-17.75",lg:"h-5 w-19",xl:"h-15 w-30"},isIconOnly:{true:{}}},compoundVariants:[{size:"sm",isIconOnly:true,class:"size-4.5"},{size:"md",isIconOnly:true,class:"size-5"},{size:"lg",isIconOnly:true,class:"size-6"},{size:"xl",isIconOnly:true,class:"size-8"}]}),c=({className:e,size:t,isIconOnly:o})=>jsx(a,{className:i({size:t,isIconOnly:o,className:e})});export{c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-4MO4OFLX.mjs';import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-GTPSQXE3.mjs';import {c as c$3}from'./chunk-AI4D6AOK.mjs';import {c as c$2}from'./chunk-PTRXL7BY.mjs';import {c as c$4}from'./chunk-GBBE3RHT.mjs';import {d as d$1}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {a}from'./chunk-SVAYP3BB.mjs';import {a as a$3}from'./chunk-JTO6FE4R.mjs';import {c}from'./chunk-JWB3TN2C.mjs';import {c as c$1,h}from'./chunk-5VHBHGBZ.mjs';import {a as a$2}from'./chunk-XJD5SYZJ.mjs';import be,{createContext,useMemo,useCallback,useContext,useRef,useEffect,useState,useId}from'react';import*as Ie from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Qe=be.memo(({handleSelect:e,NoResultsIcon:i,noResultsLabel:t,noResultsDescription:o,noResultsDescriptionLines:s,noResultsAsColumn:p,noResultsButtonOnClick:n,optionDescriptionLines:r,noResultsButtonLabel:l,filteredOptions:u,inputRect:c$1,inputRef:f,popoverPosition:C,optionsListRef:v,selectedOption:b,options:g,setFilteredOptions:R})=>jsx(Ie.Root,{asChild:true,children:jsxs("div",{ref:v,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:c$1?{width:`${c$1.width}px`,left:c$1.left,top:C==="bottom"?`${c$1.bottom}px`:void 0,bottom:C==="top"?`${window.innerHeight-c$1.top}px`:void 0}:void 0,children:[u.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:t,description:o,Icon:i,iconAsColumn:p,descriptionLines:s}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:a=>{v.current.style.display="none",f.current.value="",R(g),n();},children:l})]})]}),u.map(a=>jsx(ke,{title:a.label,disabled:a.disabled,description:a.description,descriptionLines:r,onClick:()=>e(a),className:a$2(b?.value===a.value&&"bg-primary-200")},a.key??a.value))]})})),Pe=Qe;var Ze=336,eo=({options:e,defaultSelectedOption:i,onSelect:t,onClick:o,onInputChange:s,error:p,helperText:n,label:r,placeholder:l,value:u,size:c="md",optionDescriptionLines:f=1,noResultsLabel:C,noResultsIcon:v,noResultsDescription:b,noResultsDescriptionLines:g,noResultsAsColumn:R,noResultsButtonOnClick:a,noResultsButtonLabel:N,className:L,disabled:P})=>{let[m,M]=useState(i??null),O=useRef(null),d=useRef(null),[pe,ue]=useState(),[ce,z]=useState([]),[me,W]=useState("bottom"),[U,ee]=useState(),q=Ze,V=useCallback(x=>{O.current.style.display="none",d.current.value=x.label,M(x),t?.(x);},[t]),w=useCallback(()=>{if(!d?.current)return;let x=d.current.getBoundingClientRect();ue(x);let k=U?U.height:q,I=window.innerHeight-x.bottom>k,te=x.top>k;W(I?"bottom":te?"top":"bottom");},[U?.height]),J=useCallback(()=>{let x=e.filter(k=>k.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(z(x),O?.current){let k=O.current.getBoundingClientRect();ee(k);}},[e]);return useEffect(()=>{z(e);},[e]),useEffect(()=>{if(!u){M(null),d.current&&(d.current.value="");return}(!d.current?.value||m?.value!==u.value)&&(M(u),d.current.value=u.label);},[u]),a$5(O,()=>{O.current.style.display="none",m&&d.current&&(d.current.value=m.label);}),useEffect(()=>{if(d?.current)return w(),d.current.addEventListener("mousedown",w),d.current.addEventListener("input",J),window.addEventListener("scroll",w,true),window.addEventListener("resize",w),()=>{d.current?.removeEventListener("mousedown",w),d.current?.removeEventListener("input",J),window.removeEventListener("scroll",w,true),window.removeEventListener("resize",w);}},[w,J]),jsxs("div",{className:a$2("relative",L),children:[jsx(a$4,{ref:d,autoComplete:"off",list:"",selectMode:true,onChange:x=>{x.target.value||(M(null),t?.(null)),s?.(x);},onClean:()=>{M(null),z(e),t?.(null);},onClick:x=>{O.current.style.display="flex",o?.(x);},onBlur:()=>{m&&d.current&&(d.current.value=m.label);},label:r,helperText:n,placeholder:l,size:c,error:p,disabled:P}),jsx(Pe,{handleSelect:V,noResultsLabel:C,NoResultsIcon:v,optionDescriptionLines:f,noResultsAsColumn:R,noResultsButtonLabel:N,noResultsButtonOnClick:a,noResultsDescription:b,noResultsDescriptionLines:g,filteredOptions:ce,inputRect:pe,inputRef:d,popoverPosition:me,optionsListRef:O,selectedOption:m,options:e,setFilteredOptions:z})]})};var et=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,disabled:p=false,className:n,...r})=>jsxs("div",{className:"flex w-full flex-col gap-1",...r,children:[jsx("p",{className:a$2("break-all text-sm leading-[130%]",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:i}),o&&jsx("p",{className:a$2("text-xs leading-[130%]",p?"text-neutral-400":"text-neutral-700"),style:s?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:s}:void 0,children:o})]}),H=et;var ao=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,badgeContent:n,hasDivider:r=false,disabled:l=false,onSelect:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,onClick:u,hasDivider:r,className:a$2(!l&&"cursor-pointer",c),...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),jsxs("div",{className:"ml-4 flex gap-2",children:[n&&jsx(a$3,{content:n,size:"lg",variant:"alert",className:a$2("self-center",l&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var He=({children:e,title:i,titleLines:t=1,description:o="",descriptionLines:s,startIcon:p,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,...f,className:a$2("pr-6",c),children:[p&&be.cloneElement(p,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),jsx(c$2,{size:"sm",checked:l,onCheckedChange:u,className:"ml-4 self-center",disabled:r})]});var F=336,Se=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:F,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),D=()=>{let e=useContext(Se);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},Be=({children:e})=>{let i=useRef(null),t=useRef(null),o=useId(),[s,p]=useState(),[n,r]=useState(true),[l,u]=useState([]),[c,f]=useState(-1),[C,v]=useState("bottom"),[b,g]=useState(),[R,a]=useState(F);return jsx(Se.Provider,{value:{optionsListRef:i,inputRef:t,autocompleteId:o,inputRect:s,showChips:n,filteredOptions:l,currentFocus:c,popoverPosition:C,setFilteredOptions:u,setCurrentFocus:f,setShowChips:r,setPopoverPosition:v,setInputRect:p,optionsListHeight:R,optionsListRect:b,setOptionsListRect:g,setOptionsListHeight:a},children:e})};var mt=({option:e,onMountWidth:i,size:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&i?.(o.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:o,className:"shrink-0",size:t==="md"?"xs":"sm",hasCloseIcon:false,children:e.label})},ze=mt;var ht=150,bt=be.memo(({selectedOptions:e,error:i,onCleanSelectedOptions:t,disabled:o,size:s})=>{let{autocompleteId:p,inputRect:n,inputRef:r,optionsListRef:l}=D(),u=be.useRef(null),[c,f]=be.useState(new Map),C=useMemo(()=>{if(!n?.width)return [];let b=0,g=n.width-ht,R=0;for(let a=0;a<e.length&&(R+=c.get(a)??0,!(R>g));a++)b++;return e.slice(0,b)},[n?.width,e,c]),v=useCallback(()=>{o||(r?.current?.focus(),l.current.style.display="flex");},[o]);return jsxs("div",{onClick:v,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",o&&"cursor-not-allowed"),style:{maxWidth:n?.width?n?.width:void 0,height:n?.height?n?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:u,children:C.map((b,g)=>jsx(ze,{option:b,onMountWidth:R=>f(a=>new Map(a).set(g,R)),size:s},`chip-input-${p}-${b.value}`))}),e.length>C.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!i&&jsx(a$3,{content:String(e.length),size:s}),i&&e.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:b=>{b.stopPropagation(),t();}})]})}),We=bt;var xt=be.memo(({option:e,index:i,onPressOption:t,isSelected:o,optionDescriptionLines:s})=>{let{currentFocus:p,inputRef:n}=D();return jsx(He,{title:e.label,checked:o,disabled:e.disabled,className:p===i?"bg-primary-200":void 0,onMouseDown:r=>{e.disabled||(n?.current?.value&&r.preventDefault(),t?.(e,r));},description:e.description,descriptionLines:s})}),Le=xt;var Mt=be.memo(({selectedOptions:e,handleSelect:i,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:s,noResultsDescriptionLines:p,noResultsAsColumn:n,noResultsButtonOnClick:r,optionDescriptionLines:l,noResultsButtonLabel:u})=>{let{popoverPosition:c$1,optionsListRef:f,filteredOptions:C,inputRect:v,autocompleteId:b,inputRef:g,optionsListHeight:R}=D(),a$2=useCallback(L=>e.some(P=>P.value===L.value),[e]),N=useMemo(()=>e.filter(L=>L.label.toLowerCase().includes(g?.current?.value.toLowerCase()??"")),[e,g?.current?.value]);return jsx(Ie.Root,{asChild:true,children:jsxs("div",{ref:f,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:v?{width:`${v.width}px`,left:v.left,top:c$1==="bottom"?`${v.bottom}px`:void 0,bottom:c$1==="top"?`${window.innerHeight-v.top}px`:void 0,maxHeight:R+"px"}:void 0,children:[C.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:o,description:s,Icon:t,iconAsColumn:n,descriptionLines:p}),r&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:L=>{f.current.style.display="none",g.current.value="",r();},children:u})]})]}),N.map((L,P)=>jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`)),C.map((L,P)=>!e.some(m=>m.value===L.value)&&jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`))]})})}),$e=Mt;var It=be.memo(({selectedOptions:e,onSelect:i,error:t,helperText:o,label:s,placeholder:p,options:n,onInputChange:r,size:l,disabled:u})=>{let{setCurrentFocus:c,setFilteredOptions:f,optionsListRef:C,inputRef:v}=D();return jsx(a$4,{ref:v,autoComplete:"off",list:"",disabled:u,selectMode:true,onChange:b=>{c(-1),r?.(b.target.value);},onClean:()=>{c(-1),f(n),i?.(null,e);},onClick:()=>{u||(C.current.style.display="flex");},error:t,helperText:o,label:s,placeholder:p,fixedTopLabel:e.length>0,size:l})}),Ge=It;var _e=({options:e,defaultSelectedOptions:i,onSelect:t,error:o,helperText:s,label:p,placeholder:n,noResultsLabel:r,noResultsIcon:l,noResultsDescription:u,noResultsDescriptionLines:c,noResultsAsColumn:f,noResultsButtonOnClick:C,noResultsButtonLabel:v,className:b,onInputChange:g,value:R,loading:a,size:N="md",optionDescriptionLines:L=1,disabled:P})=>{let{inputRef:m,optionsListRef:M,setFilteredOptions:O,setShowChips:d,setInputRect:pe,setPopoverPosition:ue,setCurrentFocus:ce,showChips:z,setOptionsListRect:me,optionsListRect:W,setOptionsListHeight:U}=D(),ee=useRef(false),[q,V]=useState(i??[]),w=useCallback(A=>{V(E=>{let T,K=E.findIndex(Je=>Je.value===A.value);return K===-1?(T=E.concat(A),t?.(A,T),T):(T=E.toSpliced(K,1),t?.(A,T),T)});},[t]),J=useCallback(()=>{V([]),O(e),t?.(null,[]);},[]),x=useCallback(()=>{d(false);},[]),k=useCallback(()=>{d(true);},[]),I=useCallback(()=>{if(!m?.current)return;let A=m.current.getBoundingClientRect();pe(A);let E=W?W.height>F?F:W.height:F,T=window.innerHeight-A.bottom>E,K=A.top>E;ue(T?"bottom":K?"top":"bottom"),U(K?F:window.innerHeight-A.bottom>F?F:window.innerHeight-A.bottom);},[W?.height]),te=useCallback(()=>{let A=e.filter(E=>E.label.toLowerCase().includes(m?.current?.value.toLowerCase()??""));if(O(A),M?.current){let E=M.current.getBoundingClientRect();me(E);}},[e,M?.current]);return useEffect(()=>{O(e);},[e]),a$5(M,()=>{M.current.style.display="none",ce(-1);}),useEffect(()=>{if(m?.current)return I(),m.current.addEventListener("mousedown",I),m.current.addEventListener("input",te),m.current.addEventListener("focusin",x),m.current.addEventListener("focusout",k),window.addEventListener("scroll",I,true),window.addEventListener("resize",I),()=>{m.current?.removeEventListener("mousedown",I),m.current?.removeEventListener("input",I),m.current?.removeEventListener("focusout",k),m.current?.removeEventListener("focusin",x),window.removeEventListener("scroll",I,true),window.removeEventListener("resize",I);}},[I,k,x,te]),useEffect(()=>{R&&(V(R),d(true));},[R]),useEffect(()=>{a||i&&i.length&&!ee.current&&(V(i),ee.current=true,d(true));},[i,a]),jsxs("div",{className:a$2("relative",b),children:[jsx(Ge,{selectedOptions:q,onSelect:t,error:o,helperText:s,label:p,placeholder:n,handleSelect:w,options:e,onInputChange:g,size:N,disabled:P}),z&&jsx(We,{selectedOptions:q,disabled:P,error:o,onCleanSelectedOptions:J,size:N}),jsx($e,{handleSelect:w,selectedOptions:q,noResultsLabel:r,NoResultsIcon:l,optionDescriptionLines:L,noResultsAsColumn:f,noResultsButtonLabel:v,noResultsButtonOnClick:C,noResultsDescription:u,noResultsDescriptionLines:c})]})};var Ii=e=>jsx(Be,{children:jsx(_e,{...e})});var Ni=({children:e,title:i,titleLines:t=1,description:o,descriptionLines:s=1,StartIcon:p,hasDivider:n=false,disabled:r=false,actionButton:l,isSelected:u=false,className:c$1,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,isSelected:u,...f,className:c$1,children:[p&&jsx(p,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),l&&jsx(Fragment,{children:l.isIcon?jsx(c$3,{...l,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:r??l.disabled}):jsx(c,{...l,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:r??l.disabled})})]});var qi=({title:e,description:i="",descriptionLines:t,hasDivider:o=false,disabled:s=false,checked:p,onCheckedChange:n,className:r,chipStatus:l,chipExpandable:u,...c})=>jsxs(y,{hasDescription:!!i,disabled:s,hasDivider:o,...c,className:a$2("pr-6",r),children:[jsx(c$2,{size:"sm",checked:p,onCheckedChange:n,className:"mr-4 self-center",disabled:s}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$2("line-clamp-1 text-sm leading-[130%] break-all",!!i&&"font-medium"),children:e}),u&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$4,{...u})}),l&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$1,{...l,size:"xs",className:"shrink-0"})})]}),i&&jsx("p",{className:a$2("text-xs leading-[130%]",s?"text-neutral-400":"text-neutral-700",{"line-clamp-1":t===1,"line-clamp-2":t===2,"line-clamp-3":t===3,"line-clamp-4":t===4}),children:i})]})]});var Tt=({children:e,hasDescription:i=false,disabled:t=false,hasDivider:o=false,className:s,isSelected:p,onClick:n,...r})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("flex flex-row px-3 py-4 text-neutral-900 transition-colors",i?"py-3":"py-3.5",t?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",p&&"bg-primary-200",s),onClick:l=>{t||n?.(l);},...r,children:e}),o&&jsx(a$1,{})]}),y=Tt;var ke=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,endIcon:n,hasDivider:r=false,disabled:l=false,isSelected:u=false,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,hasDivider:r,className:c,isSelected:u,...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),n&&be.cloneElement(n,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{eo as a,ke as b,ao as c,He as d,Ii as e,Ni as f,qi as g};
|
|
1
|
+
import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-GTPSQXE3.mjs';import {d}from'./chunk-4MO4OFLX.mjs';import {c as c$3}from'./chunk-AI4D6AOK.mjs';import {c as c$2}from'./chunk-PTRXL7BY.mjs';import {c as c$4}from'./chunk-GBBE3RHT.mjs';import {a as a$3}from'./chunk-JTO6FE4R.mjs';import {d as d$1}from'./chunk-FAMLJ6AJ.mjs';import {a as a$1}from'./chunk-OG3OUJ6C.mjs';import {c}from'./chunk-JWB3TN2C.mjs';import {a}from'./chunk-SVAYP3BB.mjs';import {c as c$1,h}from'./chunk-5VHBHGBZ.mjs';import {a as a$2}from'./chunk-XJD5SYZJ.mjs';import be,{createContext,useMemo,useCallback,useContext,useRef,useEffect,useState,useId}from'react';import*as Ie from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Qe=be.memo(({handleSelect:e,NoResultsIcon:i,noResultsLabel:t,noResultsDescription:o,noResultsDescriptionLines:s,noResultsAsColumn:p,noResultsButtonOnClick:n,optionDescriptionLines:r,noResultsButtonLabel:l,filteredOptions:u,inputRect:c$1,inputRef:f,popoverPosition:C,optionsListRef:x,selectedOption:b,options:g,setFilteredOptions:R})=>jsx(Ie.Root,{asChild:true,children:jsxs("div",{ref:x,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:c$1?{width:`${c$1.width}px`,left:c$1.left,top:C==="bottom"?`${c$1.bottom}px`:void 0,bottom:C==="top"?`${window.innerHeight-c$1.top}px`:void 0}:void 0,children:[u.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:t,description:o,Icon:i,iconAsColumn:p,descriptionLines:s}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:a=>{x.current.style.display="none",f.current.value="",R(g),n();},children:l})]})]}),u.map(a=>jsx(ke,{title:a.label,disabled:a.disabled,description:a.description,descriptionLines:r,onClick:()=>e(a),className:a$2(b?.value===a.value&&"bg-primary-200")},a.key??a.value))]})})),Pe=Qe;var Ze=336,eo=({options:e,defaultSelectedOption:i,onSelect:t,onClick:o,onInputChange:s,error:p,helperText:n,label:r,placeholder:l,value:u,size:c="md",optionDescriptionLines:f=1,noResultsLabel:C,noResultsIcon:x,noResultsDescription:b,noResultsDescriptionLines:g,noResultsAsColumn:R,noResultsButtonOnClick:a,noResultsButtonLabel:N,className:L,disabled:P})=>{let[m,M]=useState(i??null),O=useRef(null),d=useRef(null),[pe,ue]=useState(),[ce,z]=useState([]),[me,W]=useState("bottom"),[U,ee]=useState(),q=Ze,V=useCallback(v=>{O.current.style.display="none",d.current.value=v.label,M(v),t?.(v);},[t]),w=useCallback(()=>{if(!d?.current)return;let v=d.current.getBoundingClientRect();ue(v);let k=U?U.height:q,I=window.innerHeight-v.bottom>k,te=v.top>k;W(I?"bottom":te?"top":"bottom");},[U?.height]),J=useCallback(()=>{let v=e.filter(k=>k.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(z(v),O?.current){let k=O.current.getBoundingClientRect();ee(k);}},[e]);return useEffect(()=>{z(e);},[e]),useEffect(()=>{if(!u){M(null),d.current&&(d.current.value="");return}(!d.current?.value||m?.value!==u.value)&&(M(u),d.current.value=u.label);},[u]),a$5(O,()=>{O.current.style.display="none",m&&d.current&&(d.current.value=m.label);}),useEffect(()=>{if(d?.current)return w(),d.current.addEventListener("mousedown",w),d.current.addEventListener("input",J),window.addEventListener("scroll",w,true),window.addEventListener("resize",w),()=>{d.current?.removeEventListener("mousedown",w),d.current?.removeEventListener("input",J),window.removeEventListener("scroll",w,true),window.removeEventListener("resize",w);}},[w,J]),jsxs("div",{className:a$2("relative",L),children:[jsx(a$4,{ref:d,autoComplete:"off",list:"",selectMode:true,onChange:v=>{v.target.value||(M(null),t?.(null)),s?.(v);},onClean:()=>{M(null),z(e),t?.(null);},onClick:v=>{O.current.style.display="flex",o?.(v);},onBlur:()=>{m&&d.current&&(d.current.value=m.label);},label:r,helperText:n,placeholder:l,size:c,error:p,disabled:P}),jsx(Pe,{handleSelect:V,noResultsLabel:C,NoResultsIcon:x,optionDescriptionLines:f,noResultsAsColumn:R,noResultsButtonLabel:N,noResultsButtonOnClick:a,noResultsDescription:b,noResultsDescriptionLines:g,filteredOptions:ce,inputRect:pe,inputRef:d,popoverPosition:me,optionsListRef:O,selectedOption:m,options:e,setFilteredOptions:z})]})};var et=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,disabled:p=false,className:n,...r})=>jsxs("div",{className:"flex w-full flex-col gap-1",...r,children:[jsx("p",{className:a$2("break-all text-sm leading-[130%]",!!o&&"font-medium"),style:t?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:t}:void 0,children:i}),o&&jsx("p",{className:a$2("text-xs leading-[130%]",p?"text-neutral-400":"text-neutral-700"),style:s?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:s}:void 0,children:o})]}),H=et;var ao=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,badgeContent:n,hasDivider:r=false,disabled:l=false,onSelect:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,onClick:u,hasDivider:r,className:a$2(!l&&"cursor-pointer",c),...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),jsxs("div",{className:"ml-4 flex gap-2",children:[n&&jsx(a$3,{content:n,size:"lg",variant:"alert",className:a$2("self-center",l&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var He=({children:e,title:i,titleLines:t=1,description:o="",descriptionLines:s,startIcon:p,hasDivider:n=false,disabled:r=false,checked:l,onCheckedChange:u,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,...f,className:a$2("pr-6",c),children:[p&&be.cloneElement(p,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),jsx(c$2,{size:"sm",checked:l,onCheckedChange:u,className:"ml-4 self-center",disabled:r})]});var F=336,Se=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:F,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),D=()=>{let e=useContext(Se);if(e===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return e},Be=({children:e})=>{let i=useRef(null),t=useRef(null),o=useId(),[s,p]=useState(),[n,r]=useState(true),[l,u]=useState([]),[c,f]=useState(-1),[C,x]=useState("bottom"),[b,g]=useState(),[R,a]=useState(F);return jsx(Se.Provider,{value:{optionsListRef:i,inputRef:t,autocompleteId:o,inputRect:s,showChips:n,filteredOptions:l,currentFocus:c,popoverPosition:C,setFilteredOptions:u,setCurrentFocus:f,setShowChips:r,setPopoverPosition:x,setInputRect:p,optionsListHeight:R,optionsListRect:b,setOptionsListRect:g,setOptionsListHeight:a},children:e})};var mt=({option:e,onMountWidth:i,size:t})=>{let o=useRef(null);return useEffect(()=>{o.current&&i?.(o.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:o,className:"shrink-0",size:t==="md"?"xs":"sm",hasCloseIcon:false,children:e.label})},ze=mt;var ht=150,bt=be.memo(({selectedOptions:e,error:i,onCleanSelectedOptions:t,disabled:o,size:s})=>{let{autocompleteId:p,inputRect:n,inputRef:r,optionsListRef:l}=D(),u=be.useRef(null),[c,f]=be.useState(new Map),C=useMemo(()=>{if(!n?.width)return [];let b=0,g=n.width-ht,R=0;for(let a=0;a<e.length&&(R+=c.get(a)??0,!(R>g));a++)b++;return e.slice(0,b)},[n?.width,e,c]),x=useCallback(()=>{o||(r?.current?.focus(),l.current.style.display="flex");},[o]);return jsxs("div",{onClick:x,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",o&&"cursor-not-allowed"),style:{maxWidth:n?.width?n?.width:void 0,height:n?.height?n?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:u,children:C.map((b,g)=>jsx(ze,{option:b,onMountWidth:R=>f(a=>new Map(a).set(g,R)),size:s},`chip-input-${p}-${b.value}`))}),e.length>C.length&&jsx("span",{className:"text-base",children:"..."}),e.length>0&&!i&&jsx(a$3,{content:String(e.length),size:s}),i&&e.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:b=>{b.stopPropagation(),t();}})]})}),We=bt;var vt=be.memo(({option:e,index:i,onPressOption:t,isSelected:o,optionDescriptionLines:s})=>{let{currentFocus:p,inputRef:n}=D();return jsx(He,{title:e.label,checked:o,disabled:e.disabled,className:p===i?"bg-primary-200":void 0,onMouseDown:r=>{e.disabled||(n?.current?.value&&r.preventDefault(),t?.(e,r));},description:e.description,descriptionLines:s})}),Le=vt;var Mt=be.memo(({selectedOptions:e,handleSelect:i,NoResultsIcon:t,noResultsLabel:o,noResultsDescription:s,noResultsDescriptionLines:p,noResultsAsColumn:n,noResultsButtonOnClick:r,optionDescriptionLines:l,noResultsButtonLabel:u})=>{let{popoverPosition:c$1,optionsListRef:f,filteredOptions:C,inputRect:x,autocompleteId:b,inputRef:g,optionsListHeight:R}=D(),a$2=useCallback(L=>e.some(P=>P.value===L.value),[e]),N=useMemo(()=>e.filter(L=>L.label.toLowerCase().includes(g?.current?.value.toLowerCase()??"")),[e,g?.current?.value]);return jsx(Ie.Root,{asChild:true,children:jsxs("div",{ref:f,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:x?{width:`${x.width}px`,left:x.left,top:c$1==="bottom"?`${x.bottom}px`:void 0,bottom:c$1==="top"?`${window.innerHeight-x.top}px`:void 0,maxHeight:R+"px"}:void 0,children:[C.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(a,{title:o,description:s,Icon:t,iconAsColumn:n,descriptionLines:p}),r&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:L=>{f.current.style.display="none",g.current.value="",r();},children:u})]})]}),N.map((L,P)=>jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`)),C.map((L,P)=>!e.some(m=>m.value===L.value)&&jsx(Le,{option:L,index:P,onPressOption:m=>i(m),isSelected:a$2(L),optionDescriptionLines:l},`autocomplete-option-${b}-${L.key??L.value}`))]})})}),$e=Mt;var It=be.memo(({selectedOptions:e,onSelect:i,error:t,helperText:o,label:s,placeholder:p,options:n,onInputChange:r,size:l,disabled:u})=>{let{setCurrentFocus:c,setFilteredOptions:f,optionsListRef:C,inputRef:x}=D();return jsx(a$4,{ref:x,autoComplete:"off",list:"",disabled:u,selectMode:true,onChange:b=>{c(-1),r?.(b.target.value);},onClean:()=>{c(-1),f(n),i?.(null,e);},onClick:()=>{u||(C.current.style.display="flex");},error:t,helperText:o,label:s,placeholder:p,fixedTopLabel:e.length>0,size:l})}),Ge=It;var _e=({options:e,defaultSelectedOptions:i,onSelect:t,error:o,helperText:s,label:p,placeholder:n,noResultsLabel:r,noResultsIcon:l,noResultsDescription:u,noResultsDescriptionLines:c,noResultsAsColumn:f,noResultsButtonOnClick:C,noResultsButtonLabel:x,className:b,onInputChange:g,value:R,loading:a,size:N="md",optionDescriptionLines:L=1,disabled:P})=>{let{inputRef:m,optionsListRef:M,setFilteredOptions:O,setShowChips:d,setInputRect:pe,setPopoverPosition:ue,setCurrentFocus:ce,showChips:z,setOptionsListRect:me,optionsListRect:W,setOptionsListHeight:U}=D(),ee=useRef(false),[q,V]=useState(i??[]),w=useCallback(A=>{V(E=>{let T,K=E.findIndex(Je=>Je.value===A.value);return K===-1?(T=E.concat(A),t?.(A,T),T):(T=E.toSpliced(K,1),t?.(A,T),T)});},[t]),J=useCallback(()=>{V([]),O(e),t?.(null,[]);},[]),v=useCallback(()=>{d(false);},[]),k=useCallback(()=>{d(true);},[]),I=useCallback(()=>{if(!m?.current)return;let A=m.current.getBoundingClientRect();pe(A);let E=W?W.height>F?F:W.height:F,T=window.innerHeight-A.bottom>E,K=A.top>E;ue(T?"bottom":K?"top":"bottom"),U(K?F:window.innerHeight-A.bottom>F?F:window.innerHeight-A.bottom);},[W?.height]),te=useCallback(()=>{let A=e.filter(E=>E.label.toLowerCase().includes(m?.current?.value.toLowerCase()??""));if(O(A),M?.current){let E=M.current.getBoundingClientRect();me(E);}},[e,M?.current]);return useEffect(()=>{O(e);},[e]),a$5(M,()=>{M.current.style.display="none",ce(-1);}),useEffect(()=>{if(m?.current)return I(),m.current.addEventListener("mousedown",I),m.current.addEventListener("input",te),m.current.addEventListener("focusin",v),m.current.addEventListener("focusout",k),window.addEventListener("scroll",I,true),window.addEventListener("resize",I),()=>{m.current?.removeEventListener("mousedown",I),m.current?.removeEventListener("input",I),m.current?.removeEventListener("focusout",k),m.current?.removeEventListener("focusin",v),window.removeEventListener("scroll",I,true),window.removeEventListener("resize",I);}},[I,k,v,te]),useEffect(()=>{R&&(V(R),d(true));},[R]),useEffect(()=>{a||i&&i.length&&!ee.current&&(V(i),ee.current=true,d(true));},[i,a]),jsxs("div",{className:a$2("relative",b),children:[jsx(Ge,{selectedOptions:q,onSelect:t,error:o,helperText:s,label:p,placeholder:n,handleSelect:w,options:e,onInputChange:g,size:N,disabled:P}),z&&jsx(We,{selectedOptions:q,disabled:P,error:o,onCleanSelectedOptions:J,size:N}),jsx($e,{handleSelect:w,selectedOptions:q,noResultsLabel:r,NoResultsIcon:l,optionDescriptionLines:L,noResultsAsColumn:f,noResultsButtonLabel:x,noResultsButtonOnClick:C,noResultsDescription:u,noResultsDescriptionLines:c})]})};var Ii=e=>jsx(Be,{children:jsx(_e,{...e})});var Ni=({children:e,title:i,titleLines:t=1,description:o,descriptionLines:s=1,StartIcon:p,hasDivider:n=false,disabled:r=false,actionButton:l,isSelected:u=false,className:c$1,...f})=>jsxs(y,{hasDescription:!!o,disabled:r,hasDivider:n,isSelected:u,...f,className:c$1,children:[p&&jsx(p,{className:"mr-2 h-4.5 w-4.5 shrink-0 grow-0"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:r}),l&&jsx(Fragment,{children:l.isIcon?jsx(c$3,{...l,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:r??l.disabled}):jsx(c,{...l,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:r??l.disabled})})]});var qi=({title:e,description:i="",descriptionLines:t,hasDivider:o=false,disabled:s=false,checked:p,onCheckedChange:n,className:r,chipStatus:l,chipExpandable:u,...c})=>jsxs(y,{hasDescription:!!i,disabled:s,hasDivider:o,...c,className:a$2("pr-6",r),children:[jsx(c$2,{size:"sm",checked:p,onCheckedChange:n,className:"mr-4 self-center",disabled:s}),jsxs("div",{className:"flex-1",children:[jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsx("p",{className:a$2("line-clamp-1 text-sm leading-[130%] break-all",!!i&&"font-medium"),children:e}),u&&jsx("div",{className:"ml-auto flex min-w-0 flex-shrink-0 items-center justify-end",children:jsx(c$4,{...u})}),l&&jsx("div",{className:"ml-4 flex shrink-0 items-center gap-1",children:jsx(d$1,{...l,size:"xs",className:"shrink-0"})})]}),i&&jsx("p",{className:a$2("text-xs leading-[130%]",s?"text-neutral-400":"text-neutral-700",{"line-clamp-1":t===1,"line-clamp-2":t===2,"line-clamp-3":t===3,"line-clamp-4":t===4}),children:i})]})]});var Tt=({children:e,hasDescription:i=false,disabled:t=false,hasDivider:o=false,className:s,isSelected:p,onClick:n,...r})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("flex flex-row px-3 py-4 text-neutral-900 transition-colors",i?"py-3":"py-3.5",t?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",p&&"bg-primary-200",s),onClick:l=>{t||n?.(l);},...r,children:e}),o&&jsx(a$1,{})]}),y=Tt;var ke=({children:e,title:i,titleLines:t,description:o="",descriptionLines:s,startIcon:p,endIcon:n,hasDivider:r=false,disabled:l=false,isSelected:u=false,className:c,...f})=>jsxs(y,{hasDescription:!!o,disabled:l,hasDivider:r,className:c,isSelected:u,...f,children:[p&&be.cloneElement(p,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(H,{title:i,titleLines:t,description:o,descriptionLines:s,disabled:l}),n&&be.cloneElement(n,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{eo as a,ke as b,ao as c,He as d,Ii as e,Ni as f,qi as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as AccordionForm,e as AccordionFormContent,c as AccordionFormItem,a as AccordionFormSizes,d as AccordionFormTrigger}from'../chunk-
|
|
1
|
+
export{b as AccordionForm,e as AccordionFormContent,c as AccordionFormItem,a as AccordionFormSizes,d as AccordionFormTrigger}from'../chunk-JFVQTEOV.mjs';import'../chunk-JTO6FE4R.mjs';import'../chunk-FAMLJ6AJ.mjs';import'../chunk-5VHBHGBZ.mjs';import'../chunk-XJD5SYZJ.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as Accordion,g as AccordionContent,d as AccordionItem,a as AccordionPrimitive,b as AccordionSizes,f as AccordionTrigger,e as AccordionTriggerEmpty}from'../chunk-
|
|
1
|
+
export{c as Accordion,g as AccordionContent,d as AccordionItem,a as AccordionPrimitive,b as AccordionSizes,f as AccordionTrigger,e as AccordionTriggerEmpty}from'../chunk-5MFO5X4O.mjs';import'../chunk-JTO6FE4R.mjs';import'../chunk-FAMLJ6AJ.mjs';import'../chunk-5VHBHGBZ.mjs';import'../chunk-XJD5SYZJ.mjs';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { HTMLAttributes, FC } from 'react';
|
|
4
|
+
import { BadgeCategorySize } from './badge-category.mjs';
|
|
5
|
+
import 'lucide-react';
|
|
6
|
+
|
|
7
|
+
declare const badgeCategorySkeleton: tailwind_variants.TVReturnType<{
|
|
8
|
+
size: {
|
|
9
|
+
sm: string;
|
|
10
|
+
md: string;
|
|
11
|
+
lg: string;
|
|
12
|
+
};
|
|
13
|
+
isIconOnly: {
|
|
14
|
+
true: {};
|
|
15
|
+
};
|
|
16
|
+
}, undefined, "rounded-sm", {
|
|
17
|
+
size: {
|
|
18
|
+
sm: string;
|
|
19
|
+
md: string;
|
|
20
|
+
lg: string;
|
|
21
|
+
};
|
|
22
|
+
isIconOnly: {
|
|
23
|
+
true: {};
|
|
24
|
+
};
|
|
25
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
26
|
+
size: {
|
|
27
|
+
sm: string;
|
|
28
|
+
md: string;
|
|
29
|
+
lg: string;
|
|
30
|
+
};
|
|
31
|
+
isIconOnly: {
|
|
32
|
+
true: {};
|
|
33
|
+
};
|
|
34
|
+
}, undefined, "rounded-sm", unknown, unknown, undefined>>;
|
|
35
|
+
type BadgeCategorySkeletonProps = {
|
|
36
|
+
className?: HTMLAttributes<HTMLDivElement>["className"];
|
|
37
|
+
size?: BadgeCategorySize;
|
|
38
|
+
isIconOnly?: boolean;
|
|
39
|
+
} & VariantProps<typeof badgeCategorySkeleton>;
|
|
40
|
+
declare const BadgeCategorySkeleton: FC<BadgeCategorySkeletonProps>;
|
|
41
|
+
|
|
42
|
+
export { BadgeCategorySkeleton, type BadgeCategorySkeletonProps };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { HTMLAttributes, FC } from 'react';
|
|
4
|
+
import { BadgeCategorySize } from './badge-category.js';
|
|
5
|
+
import 'lucide-react';
|
|
6
|
+
|
|
7
|
+
declare const badgeCategorySkeleton: tailwind_variants.TVReturnType<{
|
|
8
|
+
size: {
|
|
9
|
+
sm: string;
|
|
10
|
+
md: string;
|
|
11
|
+
lg: string;
|
|
12
|
+
};
|
|
13
|
+
isIconOnly: {
|
|
14
|
+
true: {};
|
|
15
|
+
};
|
|
16
|
+
}, undefined, "rounded-sm", {
|
|
17
|
+
size: {
|
|
18
|
+
sm: string;
|
|
19
|
+
md: string;
|
|
20
|
+
lg: string;
|
|
21
|
+
};
|
|
22
|
+
isIconOnly: {
|
|
23
|
+
true: {};
|
|
24
|
+
};
|
|
25
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
26
|
+
size: {
|
|
27
|
+
sm: string;
|
|
28
|
+
md: string;
|
|
29
|
+
lg: string;
|
|
30
|
+
};
|
|
31
|
+
isIconOnly: {
|
|
32
|
+
true: {};
|
|
33
|
+
};
|
|
34
|
+
}, undefined, "rounded-sm", unknown, unknown, undefined>>;
|
|
35
|
+
type BadgeCategorySkeletonProps = {
|
|
36
|
+
className?: HTMLAttributes<HTMLDivElement>["className"];
|
|
37
|
+
size?: BadgeCategorySize;
|
|
38
|
+
isIconOnly?: boolean;
|
|
39
|
+
} & VariantProps<typeof badgeCategorySkeleton>;
|
|
40
|
+
declare const BadgeCategorySkeleton: FC<BadgeCategorySkeletonProps>;
|
|
41
|
+
|
|
42
|
+
export { BadgeCategorySkeleton, type BadgeCategorySkeletonProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var tailwindVariants=require('tailwind-variants'),react=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');function s(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var r=react.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx("div",{ref:o,className:s("shrink-0 animate-pulse rounded-sm bg-neutral-200",e),...t}));r.displayName="Skeleton";var p=tailwindVariants.tv({base:"rounded-sm",variants:{size:{sm:"h-4.5 w-21.5",md:"h-5 w-24.25",lg:"h-5.5 w-27.5"},isIconOnly:{true:{}}},compoundVariants:[{size:"sm",isIconOnly:true,class:"w-4.5"},{size:"md",isIconOnly:true,class:"w-5"},{size:"lg",isIconOnly:true,class:"w-6"}],defaultVariants:{size:"sm"}}),H=({className:e,size:t,isIconOnly:o})=>jsxRuntime.jsx(r,{className:p({size:t,isIconOnly:o,className:e})});exports.BadgeCategorySkeleton=H;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as BadgeCategorySkeleton}from'../chunk-EOJM3KHF.mjs';import'../chunk-IEJ6WWCV.mjs';import'../chunk-XJD5SYZJ.mjs';
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { LucideIcon } from 'lucide-react';
|
|
4
|
+
import { FC, HTMLAttributes } from 'react';
|
|
5
|
+
|
|
6
|
+
type BadgeCategoryVariant = "light" | "outline" | "ghost" | "fill";
|
|
7
|
+
type BadgeCategoryColor = "primary" | "jungle" | "green" | "aqua" | "sky" | "violet" | "lavender" | "orchid" | "pink" | "bubblegum" | "orange" | "neutral";
|
|
8
|
+
type BadgeCategorySize = "sm" | "md" | "lg";
|
|
9
|
+
declare const badgeCategory: tailwind_variants.TVReturnType<{
|
|
10
|
+
size: {
|
|
11
|
+
sm: {
|
|
12
|
+
container: string;
|
|
13
|
+
text: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
};
|
|
16
|
+
md: {
|
|
17
|
+
container: string;
|
|
18
|
+
text: string;
|
|
19
|
+
icon: string;
|
|
20
|
+
};
|
|
21
|
+
lg: {
|
|
22
|
+
container: string;
|
|
23
|
+
text: string;
|
|
24
|
+
icon: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
isIconOnly: {
|
|
28
|
+
true: {
|
|
29
|
+
container: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
variant: {
|
|
33
|
+
light: {};
|
|
34
|
+
outline: {
|
|
35
|
+
container: string;
|
|
36
|
+
};
|
|
37
|
+
ghost: {
|
|
38
|
+
container: string;
|
|
39
|
+
};
|
|
40
|
+
fill: {
|
|
41
|
+
container: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
color: {
|
|
45
|
+
primary: {};
|
|
46
|
+
jungle: {};
|
|
47
|
+
green: {};
|
|
48
|
+
aqua: {};
|
|
49
|
+
sky: {};
|
|
50
|
+
violet: {};
|
|
51
|
+
lavender: {};
|
|
52
|
+
orchid: {};
|
|
53
|
+
pink: {};
|
|
54
|
+
bubblegum: {};
|
|
55
|
+
orange: {};
|
|
56
|
+
neutral: {};
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
container: string;
|
|
60
|
+
icon: string;
|
|
61
|
+
text: string;
|
|
62
|
+
}, undefined, {
|
|
63
|
+
size: {
|
|
64
|
+
sm: {
|
|
65
|
+
container: string;
|
|
66
|
+
text: string;
|
|
67
|
+
icon: string;
|
|
68
|
+
};
|
|
69
|
+
md: {
|
|
70
|
+
container: string;
|
|
71
|
+
text: string;
|
|
72
|
+
icon: string;
|
|
73
|
+
};
|
|
74
|
+
lg: {
|
|
75
|
+
container: string;
|
|
76
|
+
text: string;
|
|
77
|
+
icon: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
isIconOnly: {
|
|
81
|
+
true: {
|
|
82
|
+
container: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
variant: {
|
|
86
|
+
light: {};
|
|
87
|
+
outline: {
|
|
88
|
+
container: string;
|
|
89
|
+
};
|
|
90
|
+
ghost: {
|
|
91
|
+
container: string;
|
|
92
|
+
};
|
|
93
|
+
fill: {
|
|
94
|
+
container: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
color: {
|
|
98
|
+
primary: {};
|
|
99
|
+
jungle: {};
|
|
100
|
+
green: {};
|
|
101
|
+
aqua: {};
|
|
102
|
+
sky: {};
|
|
103
|
+
violet: {};
|
|
104
|
+
lavender: {};
|
|
105
|
+
orchid: {};
|
|
106
|
+
pink: {};
|
|
107
|
+
bubblegum: {};
|
|
108
|
+
orange: {};
|
|
109
|
+
neutral: {};
|
|
110
|
+
};
|
|
111
|
+
}, {
|
|
112
|
+
container: string;
|
|
113
|
+
icon: string;
|
|
114
|
+
text: string;
|
|
115
|
+
}, tailwind_variants.TVReturnType<{
|
|
116
|
+
size: {
|
|
117
|
+
sm: {
|
|
118
|
+
container: string;
|
|
119
|
+
text: string;
|
|
120
|
+
icon: string;
|
|
121
|
+
};
|
|
122
|
+
md: {
|
|
123
|
+
container: string;
|
|
124
|
+
text: string;
|
|
125
|
+
icon: string;
|
|
126
|
+
};
|
|
127
|
+
lg: {
|
|
128
|
+
container: string;
|
|
129
|
+
text: string;
|
|
130
|
+
icon: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
isIconOnly: {
|
|
134
|
+
true: {
|
|
135
|
+
container: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
variant: {
|
|
139
|
+
light: {};
|
|
140
|
+
outline: {
|
|
141
|
+
container: string;
|
|
142
|
+
};
|
|
143
|
+
ghost: {
|
|
144
|
+
container: string;
|
|
145
|
+
};
|
|
146
|
+
fill: {
|
|
147
|
+
container: string;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
color: {
|
|
151
|
+
primary: {};
|
|
152
|
+
jungle: {};
|
|
153
|
+
green: {};
|
|
154
|
+
aqua: {};
|
|
155
|
+
sky: {};
|
|
156
|
+
violet: {};
|
|
157
|
+
lavender: {};
|
|
158
|
+
orchid: {};
|
|
159
|
+
pink: {};
|
|
160
|
+
bubblegum: {};
|
|
161
|
+
orange: {};
|
|
162
|
+
neutral: {};
|
|
163
|
+
};
|
|
164
|
+
}, {
|
|
165
|
+
container: string;
|
|
166
|
+
icon: string;
|
|
167
|
+
text: string;
|
|
168
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
169
|
+
type BadgeCategoryProps = {
|
|
170
|
+
text?: string;
|
|
171
|
+
icon?: LucideIcon;
|
|
172
|
+
className?: HTMLAttributes<HTMLDivElement>["className"];
|
|
173
|
+
size: BadgeCategorySize;
|
|
174
|
+
variant: BadgeCategoryVariant;
|
|
175
|
+
color: BadgeCategoryColor;
|
|
176
|
+
} & Omit<VariantProps<typeof badgeCategory>, "size" | "variant" | "color">;
|
|
177
|
+
declare const BadgeCategory: FC<BadgeCategoryProps>;
|
|
178
|
+
|
|
179
|
+
export { BadgeCategory, type BadgeCategoryColor, type BadgeCategoryProps, type BadgeCategorySize, type BadgeCategoryVariant };
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { LucideIcon } from 'lucide-react';
|
|
4
|
+
import { FC, HTMLAttributes } from 'react';
|
|
5
|
+
|
|
6
|
+
type BadgeCategoryVariant = "light" | "outline" | "ghost" | "fill";
|
|
7
|
+
type BadgeCategoryColor = "primary" | "jungle" | "green" | "aqua" | "sky" | "violet" | "lavender" | "orchid" | "pink" | "bubblegum" | "orange" | "neutral";
|
|
8
|
+
type BadgeCategorySize = "sm" | "md" | "lg";
|
|
9
|
+
declare const badgeCategory: tailwind_variants.TVReturnType<{
|
|
10
|
+
size: {
|
|
11
|
+
sm: {
|
|
12
|
+
container: string;
|
|
13
|
+
text: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
};
|
|
16
|
+
md: {
|
|
17
|
+
container: string;
|
|
18
|
+
text: string;
|
|
19
|
+
icon: string;
|
|
20
|
+
};
|
|
21
|
+
lg: {
|
|
22
|
+
container: string;
|
|
23
|
+
text: string;
|
|
24
|
+
icon: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
isIconOnly: {
|
|
28
|
+
true: {
|
|
29
|
+
container: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
variant: {
|
|
33
|
+
light: {};
|
|
34
|
+
outline: {
|
|
35
|
+
container: string;
|
|
36
|
+
};
|
|
37
|
+
ghost: {
|
|
38
|
+
container: string;
|
|
39
|
+
};
|
|
40
|
+
fill: {
|
|
41
|
+
container: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
color: {
|
|
45
|
+
primary: {};
|
|
46
|
+
jungle: {};
|
|
47
|
+
green: {};
|
|
48
|
+
aqua: {};
|
|
49
|
+
sky: {};
|
|
50
|
+
violet: {};
|
|
51
|
+
lavender: {};
|
|
52
|
+
orchid: {};
|
|
53
|
+
pink: {};
|
|
54
|
+
bubblegum: {};
|
|
55
|
+
orange: {};
|
|
56
|
+
neutral: {};
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
container: string;
|
|
60
|
+
icon: string;
|
|
61
|
+
text: string;
|
|
62
|
+
}, undefined, {
|
|
63
|
+
size: {
|
|
64
|
+
sm: {
|
|
65
|
+
container: string;
|
|
66
|
+
text: string;
|
|
67
|
+
icon: string;
|
|
68
|
+
};
|
|
69
|
+
md: {
|
|
70
|
+
container: string;
|
|
71
|
+
text: string;
|
|
72
|
+
icon: string;
|
|
73
|
+
};
|
|
74
|
+
lg: {
|
|
75
|
+
container: string;
|
|
76
|
+
text: string;
|
|
77
|
+
icon: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
isIconOnly: {
|
|
81
|
+
true: {
|
|
82
|
+
container: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
variant: {
|
|
86
|
+
light: {};
|
|
87
|
+
outline: {
|
|
88
|
+
container: string;
|
|
89
|
+
};
|
|
90
|
+
ghost: {
|
|
91
|
+
container: string;
|
|
92
|
+
};
|
|
93
|
+
fill: {
|
|
94
|
+
container: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
color: {
|
|
98
|
+
primary: {};
|
|
99
|
+
jungle: {};
|
|
100
|
+
green: {};
|
|
101
|
+
aqua: {};
|
|
102
|
+
sky: {};
|
|
103
|
+
violet: {};
|
|
104
|
+
lavender: {};
|
|
105
|
+
orchid: {};
|
|
106
|
+
pink: {};
|
|
107
|
+
bubblegum: {};
|
|
108
|
+
orange: {};
|
|
109
|
+
neutral: {};
|
|
110
|
+
};
|
|
111
|
+
}, {
|
|
112
|
+
container: string;
|
|
113
|
+
icon: string;
|
|
114
|
+
text: string;
|
|
115
|
+
}, tailwind_variants.TVReturnType<{
|
|
116
|
+
size: {
|
|
117
|
+
sm: {
|
|
118
|
+
container: string;
|
|
119
|
+
text: string;
|
|
120
|
+
icon: string;
|
|
121
|
+
};
|
|
122
|
+
md: {
|
|
123
|
+
container: string;
|
|
124
|
+
text: string;
|
|
125
|
+
icon: string;
|
|
126
|
+
};
|
|
127
|
+
lg: {
|
|
128
|
+
container: string;
|
|
129
|
+
text: string;
|
|
130
|
+
icon: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
isIconOnly: {
|
|
134
|
+
true: {
|
|
135
|
+
container: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
variant: {
|
|
139
|
+
light: {};
|
|
140
|
+
outline: {
|
|
141
|
+
container: string;
|
|
142
|
+
};
|
|
143
|
+
ghost: {
|
|
144
|
+
container: string;
|
|
145
|
+
};
|
|
146
|
+
fill: {
|
|
147
|
+
container: string;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
color: {
|
|
151
|
+
primary: {};
|
|
152
|
+
jungle: {};
|
|
153
|
+
green: {};
|
|
154
|
+
aqua: {};
|
|
155
|
+
sky: {};
|
|
156
|
+
violet: {};
|
|
157
|
+
lavender: {};
|
|
158
|
+
orchid: {};
|
|
159
|
+
pink: {};
|
|
160
|
+
bubblegum: {};
|
|
161
|
+
orange: {};
|
|
162
|
+
neutral: {};
|
|
163
|
+
};
|
|
164
|
+
}, {
|
|
165
|
+
container: string;
|
|
166
|
+
icon: string;
|
|
167
|
+
text: string;
|
|
168
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
169
|
+
type BadgeCategoryProps = {
|
|
170
|
+
text?: string;
|
|
171
|
+
icon?: LucideIcon;
|
|
172
|
+
className?: HTMLAttributes<HTMLDivElement>["className"];
|
|
173
|
+
size: BadgeCategorySize;
|
|
174
|
+
variant: BadgeCategoryVariant;
|
|
175
|
+
color: BadgeCategoryColor;
|
|
176
|
+
} & Omit<VariantProps<typeof badgeCategory>, "size" | "variant" | "color">;
|
|
177
|
+
declare const BadgeCategory: FC<BadgeCategoryProps>;
|
|
178
|
+
|
|
179
|
+
export { BadgeCategory, type BadgeCategoryColor, type BadgeCategoryProps, type BadgeCategorySize, type BadgeCategoryVariant };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var tailwindVariants=require('tailwind-variants'),jsxRuntime=require('react/jsx-runtime');var v=tailwindVariants.tv({slots:{container:"font-inter flex w-fit items-center justify-center gap-2 rounded-sm font-medium",icon:"shrink-0",text:"line-clamp-1"},variants:{size:{sm:{container:"py-0.625 px-1.5",text:"text-2xs leading-[130%]",icon:"size-3"},md:{container:"px-1.5 py-0.5",text:"text-xs leading-[133%]",icon:"size-3"},lg:{container:"px-1.5 py-0.5",text:"text-sm leading-[143%]",icon:"size-3.5"}},isIconOnly:{true:{container:"aspect-square justify-center"}},variant:{light:{},outline:{container:"bg-neutral-50 ring ring-inset"},ghost:{container:"bg-neutral-50"},fill:{container:"text-neutral-50"}},color:{primary:{},jungle:{},green:{},aqua:{},sky:{},violet:{},lavender:{},orchid:{},pink:{},bubblegum:{},orange:{},neutral:{}}},compoundVariants:[{size:"sm",isIconOnly:true,class:{container:"p-0.75"}},{size:"md",isIconOnly:true,class:{container:"p-1"}},{size:"lg",isIconOnly:true,class:{container:"p-1.25"}},{variant:"light",color:"primary",class:{container:"bg-primary-300",text:"text-primary-800",icon:"text-primary-700"}},{variant:"light",color:"jungle",class:{container:"bg-jungle-100",text:"text-jungle-800",icon:"text-jungle-700"}},{variant:"light",color:"green",class:{container:"bg-green-200",text:"text-mint-800",icon:"text-mint-700"}},{variant:"light",color:"aqua",class:{container:"bg-aqua-50",text:"text-aqua-800",icon:"text-aqua-700"}},{variant:"light",color:"sky",class:{container:"bg-sky-100",text:"text-sky-800",icon:"text-sky-700"}},{variant:"light",color:"violet",class:{container:"bg-violet-50",text:"text-violet-800",icon:"text-indigo-700"}},{variant:"light",color:"lavender",class:{container:"bg-lavender-100",text:"text-lavender-800",icon:"text-violet-500"}},{variant:"light",color:"orchid",class:{container:"bg-orchid-100",text:"text-orchid-800",icon:"text-orchid-600"}},{variant:"light",color:"pink",class:{container:"bg-pink-50 text-pink-800"}},{variant:"light",color:"bubblegum",class:{container:"bg-bubblegum-50",text:"text-bubblegum-800",icon:"text-bubblegum-700"}},{variant:"light",color:"orange",class:{container:"bg-orange-100",text:"text-orange-800",icon:"text-orange-700"}},{variant:"light",color:"neutral",class:{container:"bg-neutral-300 text-neutral-800"}},{variant:"outline",color:"primary",class:{container:"ring-primary-600",text:"text-primary-700",icon:"text-primary-600"}},{variant:"outline",color:"jungle",class:{container:"ring-jungle-700",text:"text-jungle-700",icon:"text-jungle-600"}},{variant:"outline",color:"green",class:{container:"ring-green-700",text:"text-green-700",icon:"text-mint-700"}},{variant:"outline",color:"aqua",class:{container:"ring-aqua-700",text:"text-aqua-700",icon:"text-aqua-600"}},{variant:"outline",color:"sky",class:{container:"ring-sky-700",text:"text-sky-700",icon:"text-sky-600"}},{variant:"outline",color:"violet",class:{container:"ring-violet-700",text:"text-violet-700",icon:"text-indigo-600"}},{variant:"outline",color:"lavender",class:{container:"ring-lavender-700",text:"text-lavender-700",icon:"text-violet-500"}},{variant:"outline",color:"orchid",class:{container:"ring-orchid-700",text:"text-orchid-700",icon:"text-orchid-600"}},{variant:"outline",color:"pink",class:{container:"ring-pink-700",text:"text-pink-700",icon:"text-pink-700"}},{variant:"outline",color:"bubblegum",class:{container:"ring-bubblegum-700",text:"text-bubblegum-700",icon:"text-bubblegum-600"}},{variant:"outline",color:"orange",class:{container:"ring-orange-700",text:"text-orange-700",icon:"text-orange-600"}},{variant:"outline",color:"neutral",class:{container:"ring-neutral-700",text:"text-neutral-700",icon:"text-neutral-800"}},{variant:"ghost",color:"primary",class:{text:"text-primary-600",icon:"text-primary-600"}},{variant:"ghost",color:"jungle",class:{text:"text-jungle-700",icon:"text-jungle-600"}},{variant:"ghost",color:"green",class:{text:"text-green-700",icon:"text-mint-700"}},{variant:"ghost",color:"aqua",class:{text:"text-aqua-700",icon:"text-aqua-600"}},{variant:"ghost",color:"sky",class:{text:"text-sky-700",icon:"text-sky-600"}},{variant:"ghost",color:"violet",class:{text:"text-violet-700",icon:"text-indigo-600"}},{variant:"ghost",color:"lavender",class:{text:"text-lavender-700",icon:"text-violet-500"}},{variant:"ghost",color:"orchid",class:{text:"text-orchid-700",icon:"text-orchid-600"}},{variant:"ghost",color:"pink",class:{text:"text-pink-700",icon:"text-pink-700"}},{variant:"ghost",color:"bubblegum",class:{text:"text-bubblegum-700",icon:"text-bubblegum-600"}},{variant:"ghost",color:"orange",class:{text:"text-orange-700",icon:"text-orange-600"}},{variant:"ghost",color:"neutral",class:{text:"text-neutral-700",icon:"text-neutral-800"}},{variant:"fill",color:"primary",class:{container:"bg-primary-600"}},{variant:"fill",color:"jungle",class:{container:"bg-jungle-700"}},{variant:"fill",color:"green",class:{container:"bg-green-700"}},{variant:"fill",color:"aqua",class:{container:"bg-aqua-700"}},{variant:"fill",color:"sky",class:{container:"bg-sky-700"}},{variant:"fill",color:"violet",class:{container:"bg-violet-600"}},{variant:"fill",color:"lavender",class:{container:"bg-lavender-600"}},{variant:"fill",color:"orchid",class:{container:"bg-orchid-600"}},{variant:"fill",color:"pink",class:{container:"bg-pink-600"}},{variant:"fill",color:"bubblegum",class:{container:"bg-bubblegum-600"}},{variant:"fill",color:"orange",class:{container:"bg-orange-700"}},{variant:"fill",color:"neutral",class:{container:"bg-neutral-700"}}],defaultVariants:{}}),y=({text:t,icon:e,variant:a,color:o,size:r,className:i,...l})=>{let c=!!e&&!t,{container:s,icon:g,text:x}=v({variant:a,color:o,size:r,isIconOnly:c});return jsxRuntime.jsxs("div",{className:s({className:i}),...l,children:[e&&jsxRuntime.jsx(e,{className:g()}),t&&jsxRuntime.jsx("span",{className:x(),children:t})]})};exports.BadgeCategory=y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as BadgeCategory}from'../chunk-R3YSOGZ7.mjs';
|