cekat-ui 1.2.2 → 1.2.4
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/components/TabBrowser/TabBrowser.d.ts +4 -0
- package/dist/components/TabBrowser/TabBrowserBar.d.ts +17 -0
- package/dist/components/TabBrowser/index.d.ts +4 -0
- package/dist/components/TabBrowser/tabbrowser.styles.d.ts +53 -0
- package/dist/components/TabBrowser/tabbrowser.types.d.ts +35 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +915 -831
- package/dist/index.umd.js +1 -1
- package/dist/style.css +103 -0
- package/package.json +1 -1
- package/tailwind.preset.cjs +238 -0
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(C,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],n):(C=typeof globalThis<"u"?globalThis:C||self,n(C.CekatUI={},C.React$1,C.reactDom))})(this,(function(C,n,Te){"use strict";function Be(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(a,r,s.get?s:{enumerable:!0,get:()=>t[r]})}}return a.default=t,Object.freeze(a)}const e=Be(n);function Z(t){var a,r,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(a=0;a<i;a++)t[a]&&(r=Z(t[a]))&&(s&&(s+=" "),s+=r)}else for(r in t)t[r]&&(s&&(s+=" "),s+=r);return s}function f(){for(var t,a,r=0,s="",i=arguments.length;r<i;r++)(t=arguments[r])&&(a=Z(t))&&(s&&(s+=" "),s+=a);return s}const X=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Q=f,p=(t,a)=>r=>{var s;if(a?.variants==null)return Q(t,r?.class,r?.className);const{variants:i,defaultVariants:l}=a,d=Object.keys(i).map(c=>{const m=r?.[c],g=l?.[c];if(m===null)return null;const b=X(m)||X(g);return i[c][b]}),o=r&&Object.entries(r).reduce((c,m)=>{let[g,b]=m;return b===void 0||(c[g]=b),c},{}),u=a==null||(s=a.compoundVariants)===null||s===void 0?void 0:s.reduce((c,m)=>{let{class:g,className:b,...h}=m;return Object.entries(h).every(N=>{let[k,S]=N;return Array.isArray(S)?S.includes({...l,...o}[k]):{...l,...o}[k]===S})?[...c,g,b]:c},[]);return Q(t,d,u,r?.class,r?.className)},Ie=p(["inline-flex items-center justify-center font-bold","transition-colors duration-150","focus-visible:outline-none","disabled:cursor-not-allowed"],{variants:{size:{xs:"py-1 px-2 gap-1 rounded-md text-caption-sm",sm:"h-[36px] px-4 gap-1 rounded-lg text-caption-sm",md:"h-[44px] px-4 gap-2 rounded-lg text-sm",lg:"h-[52px] px-5 gap-2 rounded-[10px] text-body-sm",xl:"h-[60px] px-6 gap-2 rounded-[10px] text-body-lg","2xl":"h-[68px] px-6 gap-2 rounded-[10px] text-body-lg"},tone:{primary:"",destructive:""},iconOnly:{true:"!p-0",false:""},variant:{solid:["text-white","disabled:bg-light-100 disabled:text-light-400"],outline:["bg-white border","disabled:bg-white disabled:text-light-400 disabled:border-light-200"],ghost:["bg-transparent","disabled:text-light-400"],"outline-primary":["bg-white border border-primary-500 text-primary-500","hover:bg-primary-100 hover:border-primary-300 hover:text-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-white disabled:text-light-400 disabled:border-light-200"],"ghost-primary":["bg-transparent text-primary-500","hover:bg-primary-50 hover:text-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:text-light-400"],plain:["bg-transparent !rounded-md","disabled:text-light-400 h-auto !px-2"],"plain-black":["bg-transparent !rounded-md","disabled:text-light-400 h-auto !px-2 "]}},compoundVariants:[{tone:"primary",variant:"solid",class:["bg-primary-500","hover:bg-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"outline",class:["border-light-200 text-light-900","hover:bg-light-50","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"ghost",class:["text-light-800","hover:bg-light-50 hover:text-light-900","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"plain",class:["text-primary-500","hover:text-primary-800 hover:bg-transparent","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"].join(" ")},{tone:"primary",variant:"plain-black",class:["text-light-800","hover:text-light-900 hover:bg-transparent","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"].join(" ")},{tone:"destructive",variant:"solid",class:["bg-error-500 text-white","hover:bg-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-light-100"].join(" ")},{tone:"destructive",variant:"outline",class:["border-error-500 text-error-500","hover:border-error-300 hover:bg-error-100 hover:text-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"destructive",variant:"ghost",class:["text-error-500","hover:bg-error-50 hover:text-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-white disabled:text-light-400"].join(" ")},{tone:"destructive",variant:"plain",class:["text-error-500","hover:text-error-800 hover:bg-transparent","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2"].join(" ")},{size:"xs",iconOnly:!0,class:"!w-[26px] !h-[26px]"},{size:"sm",iconOnly:!0,class:"!w-[36px] !h-[36px]"},{size:"md",iconOnly:!0,class:"!w-[44px] !h-[44px]"},{size:"lg",iconOnly:!0,class:"!w-[52px] !h-[52px]"},{size:"xl",iconOnly:!0,class:"!w-[60px] !h-[60px]"},{size:"2xl",iconOnly:!0,class:"!w-[68px] !h-[68px]"}],defaultVariants:{size:"md",tone:"primary",variant:"solid",iconOnly:!1}}),J=n.forwardRef(({children:t,className:a,tone:r,variant:s,size:i,iconOnly:l,...d},o)=>n.createElement("button",{ref:o,className:f(Ie({tone:r,variant:s,size:i,iconOnly:l}),a),...d},t));J.displayName="Button";const _e=({children:t})=>n.createElement("span",{className:"flex items-center"},t),Ve=({children:t})=>n.createElement("span",{className:"whitespace-nowrap"},t),D=J;D.Icon=_e,D.Text=Ve;const Oe=p(["inline-flex items-center justify-center","border transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-4 w-4 rounded-[4px]",md:"h-5 w-5 rounded-[6px]",lg:"h-5 w-5 rounded-[6px]"},checked:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{checked:!1,disabled:!1,className:"bg-white border-light-200 hover:border-light-400"},{checked:!0,disabled:!1,className:"bg-primary-500 border-primary-500 text-white hover:bg-primary-800 hover:border-primary-800"},{disabled:!0,className:"bg-light-100 border-light-200 text-white"}],defaultVariants:{size:"md",checked:!1,disabled:!1}}),je={sm:{width:12,height:9},md:{width:14,height:10},lg:{width:14,height:10}},Y=e.forwardRef(({id:t,checked:a,indeterminate:r=!1,disabled:s,size:i="md",onCheckedChange:l,className:d},o)=>{const u=()=>{s||l?.(!a)},c=je[i],m=s?"text-white/80":"text-current";return e.createElement("button",{id:t,ref:o,type:"button",role:"checkbox","aria-checked":r?"mixed":a,disabled:s,onClick:u,className:f(Oe({size:i,checked:a,disabled:s}),d)},a&&!r&&e.createElement("svg",{width:c.width,height:c.height,viewBox:"0 0 14 10",fill:"none",className:m},e.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),r&&e.createElement("span",{className:f(m,"bg-current rounded-sm",i==="sm"&&"h-0.5 w-3",(i==="md"||i==="lg")&&"h-0.5 w-4")}))});Y.displayName="Checkbox";const $=e.createContext(null),Me=({value:t,defaultValue:a,onValueChange:r,children:s,className:i})=>{const[l,d]=e.useState(a),o=t??l,u=c=>{d(c),r?.(c)};return e.createElement($.Provider,{value:{value:o,onValueChange:u}},e.createElement("div",{role:"radiogroup",className:i},s))},We=()=>{const t=e.useContext($);if(!t)throw new Error("RadioGroupItem must be used within RadioGroup");return t},Ae=p(["relative inline-flex items-center justify-center","border rounded-full transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-5 w-5"},checked:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{checked:!1,disabled:!1,className:"border-light-200 bg-white hover:border-light-400"},{checked:!0,disabled:!1,className:"border-primary-500 bg-primary-500 hover:bg-primary-800 hover:border-primary-800"},{disabled:!0,className:"border-light-200 bg-light-100"}],defaultVariants:{size:"md",checked:!1,disabled:!1}}),Pe=p(["rounded-full bg-white transition-all"],{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2 w-2"},checked:{true:"scale-100",false:"scale-0"}},defaultVariants:{size:"md",checked:!1}}),R=e.forwardRef(({id:t,value:a,disabled:r,size:s="md",className:i},l)=>{const{value:d,onValueChange:o}=We(),u=d===a;return e.createElement("button",{ref:l,id:t,type:"button",role:"radio","aria-checked":u,disabled:r,onClick:()=>{r||o?.(a)},className:f(Ae({size:s,checked:u,disabled:r}),i)},e.createElement("span",{className:Pe({size:s,checked:u})}))});R.displayName="RadioGroupItem";const De=p(["inline-flex items-center shrink-0 rounded-full p-[2px]","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-5 w-9",md:"h-6 w-11",lg:"h-6 w-11"},checked:{true:"justify-end",false:"justify-start"},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"},variant:{default:"",success:""}},compoundVariants:[{checked:!1,disabled:!1,className:"bg-light-200"},{checked:!0,disabled:!1,variant:"default",className:"bg-primary-500 hover:bg-primary-800"},{checked:!0,disabled:!1,variant:"success",className:"bg-success-500 hover:bg-success-800"},{disabled:!0,className:"bg-light-100"},{variant:"default",className:"focus-visible:ring-primary-400"},{variant:"success",className:"focus-visible:ring-success-500"}],defaultVariants:{size:"md",checked:!1,disabled:!1,variant:"default"}}),Ge=p("rounded-full shrink-0 shadow-[0_1px_3px_0_rgba(16,24,40,0.10),0_1px_2px_0_rgba(16,24,40,0.06)]",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-5 w-5"},disabled:{true:"bg-light-50",false:"bg-white"}},defaultVariants:{size:"md",disabled:!1}}),ee=e.forwardRef(({checked:t=!1,size:a="md",variant:r="default",disabled:s,onCheckedChange:i,className:l},d)=>e.createElement("button",{ref:d,type:"button",role:"switch","aria-checked":t,disabled:s,onClick:()=>{s||i?.(!t)},className:f(De({size:a,checked:t,disabled:s,variant:r}),l)},e.createElement("span",{className:Ge({size:a,disabled:s})})));ee.displayName="Toggle";const Fe=p(["relative rounded-lg text-caption-sm font-semibold text-white","bg-primary-900","shadow-lg","pointer-events-none","select-none"],{variants:{side:{top:"",bottom:"",left:"",right:""},hasSupportingText:{true:"p-3",false:"px-3 py-2"}},defaultVariants:{side:"top",hasSupportingText:!1}}),He="mt-1 font-medium text-light-100",Ke=p(["absolute"],{variants:{side:{top:["bottom-[-6px] left-1/2 -translate-x-1/2","border-x-8 border-x-transparent border-t-[6px] border-t-primary-900"],bottom:["top-[-6px] left-1/2 -translate-x-1/2","border-x-8 border-x-transparent border-b-[6px] border-b-primary-900"],left:["right-[-6px] top-1/2 -translate-y-1/2","border-y-8 border-y-transparent border-l-[6px] border-l-primary-900"],right:["left-[-6px] top-1/2 -translate-y-1/2","border-y-8 border-y-transparent border-r-[6px] border-r-primary-900"]}},defaultVariants:{side:"top"}}),G=12,te=({content:t,supportingText:a,side:r="top",open:s,defaultOpen:i=!1,disabled:l=!1,delay:d=0,className:o,children:u})=>{const[c,m]=e.useState(i),[g,b]=e.useState(null),h=s??c,N=e.useRef(null),k=e.useRef(null),S=e.useCallback(()=>{const y=N.current;if(!y)return null;const E=y.getBoundingClientRect();switch(r){case"top":return{top:E.top-G,left:E.left+E.width/2};case"bottom":return{top:E.bottom+G,left:E.left+E.width/2};case"left":return{top:E.top+E.height/2,left:E.left-G};default:return{top:E.top+E.height/2,left:E.right+G}}},[r]),w=()=>{if(l||!N.current)return;const y=()=>{b(S()),m(!0)};d>0?k.current=window.setTimeout(y,d):y()};e.useEffect(()=>{if(!h||!N.current)return;const y=()=>b(S());y();const E=new ResizeObserver(y);return E.observe(N.current),window.addEventListener("scroll",y,!0),window.addEventListener("resize",y),()=>{E.disconnect(),window.removeEventListener("scroll",y,!0),window.removeEventListener("resize",y)}},[h,S]);const v=()=>{k.current&&(clearTimeout(k.current),k.current=null),m(!1)};return e.createElement(e.Fragment,null,e.createElement("span",{ref:N,className:"inline-flex",onMouseEnter:w,onMouseLeave:v,onFocus:w,onBlur:v,tabIndex:0},u),h&&g&&Te.createPortal(e.createElement("div",{role:"tooltip",className:"fixed z-[9999] pointer-events-none",style:{top:g.top,left:g.left,transform:r==="top"?"translate(-50%, -100%)":r==="bottom"?"translate(-50%, 0)":r==="left"?"translate(-100%, -50%)":"translate(0, -50%)"}},e.createElement("div",{className:f(Fe({side:r,hasSupportingText:!!a}),o)},t,a&&e.createElement("p",{className:He},a),e.createElement("span",{className:Ke({side:r})}))),document.body))};te.displayName="Tooltip";const qe={brand:{bg:"bg-primary-50",border:"border-primary-300",text:"text-primary-700"},gray:{bg:"bg-white",border:"border-light-200",text:"text-light-800"},error:{bg:"bg-error-50",border:"border-error-200",text:"text-error-700"},warning:{bg:"bg-warning-50",border:"border-warning-200",text:"text-warning-700"},success:{bg:"bg-success-50",border:"border-success-200",text:"text-success-700"},"blue-gray":{bg:"bg-blue-gray-50",border:"border-blue-gray-200",text:"text-blue-gray-700"},"blue-light":{bg:"bg-blue-light-50",border:"border-blue-light-200",text:"text-blue-light-700"},indigo:{bg:"bg-indigo-50",border:"border-indigo-200",text:"text-indigo-700"},purple:{bg:"bg-purple-50",border:"border-purple-200",text:"text-purple-700"},blue:{bg:"bg-blue-50",border:"border-blue-200",text:"text-blue-700"},pink:{bg:"bg-pink-50",border:"border-pink-200",text:"text-pink-700"},orange:{bg:"bg-orange-50",border:"border-orange-200",text:"text-orange-700"}},Ue=p(["inline-flex items-center gap-1 border","font-medium transition-colors duration-150","select-none"],{variants:{size:{sm:"text-caption-sm py-[3px]",md:"text-caption-lg py-[2px]",lg:"text-caption-lg py-1"},shape:{rounded:"rounded-md",pill:"rounded-full"},hasLeading:{true:"",false:""},hasTrailing:{true:"",false:""},interactive:{true:"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",false:""},disabled:{true:"cursor-not-allowed opacity-60",false:""}},compoundVariants:[{size:"sm",hasLeading:!1,className:"pl-2"},{size:"sm",hasLeading:!0,className:"pl-1"},{size:"sm",hasTrailing:!1,className:"pr-2"},{size:"sm",hasTrailing:!0,className:"pr-1"},{size:"md",hasLeading:!1,className:"pl-[9px]"},{size:"md",hasLeading:!0,className:"pl-1"},{size:"md",hasTrailing:!1,className:"pr-[9px]"},{size:"md",hasTrailing:!0,className:"pr-1"},{size:"lg",hasLeading:!1,className:"pl-2.5"},{size:"lg",hasLeading:!0,className:"pl-1.5"},{size:"lg",hasTrailing:!1,className:"pr-2.5"},{size:"lg",hasTrailing:!0,className:"pr-1.5"}],defaultVariants:{size:"sm",shape:"rounded",hasLeading:!1,hasTrailing:!1,interactive:!1,disabled:!1}}),Ze=p(["shrink-0 rounded border bg-white transition-colors duration-150 size-3.5"],{variants:{checked:{true:"bg-primary-500 border-primary-500",false:""}},defaultVariants:{checked:!1}}),Xe="shrink-0 rounded-[3px] bg-light-100 px-1 text-light-800",Qe="shrink-0 rounded-[3px] p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",re=/^#([0-9a-f]{6})$/i,se=t=>re.test(t.trim()),ae=(t,a)=>{const r=re.exec(t.trim());if(!r)return;const s=parseInt(r[1],16),i=s>>16&255,l=s>>8&255,d=s&255;return`rgba(${i}, ${l}, ${d}, ${a})`},F=({children:t,size:a="sm",shape:r="rounded",icon:s,checked:i,onCheckedChange:l,onClose:d,count:o,disabled:u=!1,className:c,color:m="gray",customColor:g})=>{const b=l!==void 0,h=i!==void 0||!!s,N=!!d||o!==void 0,k=qe[m],S=!!(g&&se(g)),w=S?{borderColor:g,backgroundColor:ae(g,.12),color:g}:void 0,v=()=>{u||l?.(!i)},y=E=>{!b||u||(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),v())};return e.createElement("div",{role:b?"checkbox":void 0,"aria-checked":b?!!i:void 0,"aria-disabled":u||void 0,tabIndex:b&&!u?0:void 0,onClick:b?v:void 0,onKeyDown:y,style:w,className:f(Ue({size:a,shape:r,hasLeading:h,hasTrailing:N,interactive:b,disabled:u}),!S&&k.bg,!S&&k.border,!S&&k.text,c)},i!==void 0&&e.createElement("span",{className:f(Ze({checked:i}),!i&&!S&&k.border),style:!i&&S?{borderColor:g}:void 0},i&&e.createElement("svg",{viewBox:"0 0 14 10",fill:"none",className:"size-full text-white"},e.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),s,e.createElement("span",{className:"whitespace-nowrap"},t),o!==void 0&&e.createElement("span",{className:Xe},o),d&&e.createElement("button",{type:"button","aria-label":"Remove",disabled:u,onClick:E=>{E.stopPropagation(),d()},className:Qe},e.createElement("svg",{viewBox:"0 0 10 10",fill:"none",className:"size-2.5"},e.createElement("path",{d:"M1 1L9 9M9 1L1 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))};F.displayName="Tag";const Je={brand:{solidBg:"bg-primary-50",solidBorder:"border-primary-300",solidText:"text-primary-500",outlineBorder:"border-primary-500",outlineText:"text-primary-700"},gray:{solidBg:"bg-light-50",solidBorder:"border-light-200",solidText:"text-light-700",outlineBorder:"border-light-600",outlineText:"text-light-700"},error:{solidBg:"bg-error-50",solidBorder:"border-error-200",solidText:"text-error-700",outlineBorder:"border-error-600",outlineText:"text-error-700"},warning:{solidBg:"bg-warning-50",solidBorder:"border-warning-200",solidText:"text-warning-700",outlineBorder:"border-warning-600",outlineText:"text-warning-700"},success:{solidBg:"bg-success-50",solidBorder:"border-success-200",solidText:"text-success-700",outlineBorder:"border-success-600",outlineText:"text-success-700"},"blue-gray":{solidBg:"bg-blue-gray-50",solidBorder:"border-blue-gray-200",solidText:"text-blue-gray-700",outlineBorder:"border-blue-gray-600",outlineText:"text-blue-gray-700"},"blue-light":{solidBg:"bg-blue-light-50",solidBorder:"border-blue-light-200",solidText:"text-blue-light-700",outlineBorder:"border-blue-light-600",outlineText:"text-blue-light-700"},indigo:{solidBg:"bg-indigo-50",solidBorder:"border-indigo-200",solidText:"text-indigo-700",outlineBorder:"border-indigo-600",outlineText:"text-indigo-700"},purple:{solidBg:"bg-purple-50",solidBorder:"border-purple-200",solidText:"text-purple-700",outlineBorder:"border-purple-600",outlineText:"text-purple-700"},blue:{solidBg:"bg-blue-50",solidBorder:"border-blue-200",solidText:"text-blue-700",outlineBorder:"border-blue-600",outlineText:"text-blue-700"},pink:{solidBg:"bg-pink-50",solidBorder:"border-pink-200",solidText:"text-pink-700",outlineBorder:"border-pink-600",outlineText:"text-pink-700"},orange:{solidBg:"bg-orange-50",solidBorder:"border-orange-200",solidText:"text-orange-700",outlineBorder:"border-orange-600",outlineText:"text-orange-700"}},Ye=p(["inline-flex items-center gap-1 border font-medium","transition-colors duration-150"],{variants:{size:{sm:"text-caption-sm py-0.5",md:"text-caption-lg py-0.5",lg:"text-caption-lg py-1"},shape:{pill:"rounded-full",badge:""},modern:{true:"rounded-md shadow-xs",false:""},hasLeading:{true:"",false:""},hasTrailing:{true:"",false:""},iconOnly:{true:"p-[5px]",false:""},interactive:{true:"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",false:""},disabled:{true:"cursor-not-allowed opacity-60",false:""}},compoundVariants:[{shape:"badge",size:"sm",modern:!1,className:"rounded-md"},{shape:"badge",size:"md",modern:!1,className:"rounded-md"},{shape:"badge",size:"lg",modern:!1,className:"rounded-lg"},{size:"sm",shape:"pill",iconOnly:!1,hasLeading:!1,className:"pl-2"},{size:"sm",shape:"badge",iconOnly:!1,hasLeading:!1,className:"pl-1.5"},{size:"sm",iconOnly:!1,hasLeading:!0,className:"pl-1"},{size:"sm",iconOnly:!1,hasTrailing:!1,className:"pr-2"},{size:"sm",iconOnly:!1,hasTrailing:!0,className:"pr-1"},{size:"md",iconOnly:!1,hasLeading:!1,className:"pl-2.5"},{size:"md",iconOnly:!1,hasLeading:!0,className:"pl-1"},{size:"md",iconOnly:!1,hasTrailing:!1,className:"pr-2.5"},{size:"md",iconOnly:!1,hasTrailing:!0,className:"pr-1"},{size:"lg",shape:"pill",iconOnly:!1,hasLeading:!1,className:"pl-3"},{size:"lg",shape:"badge",iconOnly:!1,hasLeading:!1,className:"pl-2.5"},{size:"lg",iconOnly:!1,hasLeading:!0,className:"pl-1.5"},{size:"lg",shape:"pill",iconOnly:!1,hasTrailing:!1,className:"pr-3"},{size:"lg",shape:"badge",iconOnly:!1,hasTrailing:!1,className:"pr-2.5"},{size:"lg",iconOnly:!1,hasTrailing:!0,className:"pr-1.5"}],defaultVariants:{size:"sm",shape:"pill",modern:!1,hasLeading:!1,hasTrailing:!1,iconOnly:!1,interactive:!1,disabled:!1}}),$e="size-4 shrink-0 rounded border bg-white",Re="shrink-0 rounded p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",le=({children:t,size:a="sm",shape:r="pill",variant:s="solid",color:i="brand",customColor:l,modern:d=!1,icon:o,trailingIcon:u,checked:c,onCheckedChange:m,onClose:g,iconOnly:b=!1,disabled:h=!1,className:N})=>{const k=m!==void 0,S=c!==void 0||!!o,w=!!g||!!u,v=Je[i],y=!!(l&&se(l)),E=y?{borderColor:l,color:l,backgroundColor:s==="outline"?"transparent":ae(l,.1)}:void 0,B=()=>{h||m?.(!c)},z=L=>{!k||h||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),B())};return e.createElement("div",{role:k?"checkbox":void 0,"aria-checked":k?!!c:void 0,"aria-disabled":h||void 0,tabIndex:k&&!h?0:void 0,onClick:k?B:void 0,onKeyDown:z,style:E,className:f(Ye({size:a,shape:r,modern:d,hasLeading:S,hasTrailing:w,iconOnly:b,interactive:k,disabled:h}),!y&&(s==="outline"?f("bg-transparent",v.outlineBorder,v.outlineText):f(v.solidBg,v.solidBorder,v.solidText)),N)},c!==void 0&&e.createElement("span",{className:f($e,c?"bg-primary-500 border-primary-500":!y&&v.solidBorder),style:!c&&y?{borderColor:l}:void 0},c&&e.createElement("svg",{viewBox:"0 0 14 10",fill:"none",className:"size-full text-white"},e.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),o,!b&&e.createElement("span",{className:"whitespace-nowrap"},t),u,g&&e.createElement("button",{type:"button","aria-label":"Remove",disabled:h,onClick:L=>{L.stopPropagation(),g()},className:Re},e.createElement("svg",{viewBox:"0 0 10 10",fill:"none",className:"size-2.5"},e.createElement("path",{d:"M1 1L9 9M9 1L1 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))};le.displayName="Badge";const et={brand:{bg50:"bg-primary-50",hoverBg100:"hover:bg-primary-100",border200:"border-primary-200",border500:"border-primary-500",text500:"text-primary-500"},gray:{bg50:"bg-light-50",hoverBg100:"hover:bg-light-100",border200:"border-light-200",border500:"border-light-500",text500:"text-light-500"},error:{bg50:"bg-error-50",hoverBg100:"hover:bg-error-100",border200:"border-error-200",border500:"border-error-500",text500:"text-error-500"},warning:{bg50:"bg-warning-50",hoverBg100:"hover:bg-warning-100",border200:"border-warning-200",border500:"border-warning-500",text500:"text-warning-500"},success:{bg50:"bg-success-50",hoverBg100:"hover:bg-success-100",border200:"border-success-200",border500:"border-success-500",text500:"text-success-500"}},tt={md:{outerPad:{leading:"pl-1 pr-2.5 py-1",trailing:"pl-3 pr-1 py-1"},gap:"gap-2",chipPad:"px-2 py-0.5",text:"text-caption-lg"},lg:{outerPad:{leading:"pl-1.5 pr-3 py-1.5",trailing:"pl-3 pr-1.5 py-1.5"},gap:"gap-2",chipPad:"px-2.5 py-[3px]",text:"text-body-sm"}},ne=({badgeLabel:t,children:a,size:r="md",theme:s="light",color:i="brand",badgePosition:l="leading",icon:d,onClick:o,className:u})=>{const c=et[i],m=tt[r],g=s==="modern",b=s==="outline",h=f("inline-flex items-center border transition-colors duration-150",m.gap,m.outerPad[l],g?"rounded-lg bg-light-50 border-light-200 shadow-xs":b?f("rounded-full bg-white border-[1.5px]",c.border500):f("rounded-full",c.bg50,c.border200,c.hoverBg100),o&&"cursor-pointer",u),N=f("inline-flex shrink-0 items-center gap-1 border font-medium whitespace-nowrap",m.chipPad,m.text,g?"rounded-md bg-white border-light-200 text-light-800":b?f("rounded-full bg-white border-[1.5px]",c.border500,c.text500):f("rounded-full bg-white",c.border200,c.text500)),k=f("inline-flex items-center gap-1 font-medium",m.text,g?"text-light-800":c.text500),S=e.createElement("span",{className:N},g&&e.createElement("span",{className:"size-2 shrink-0 rounded-full bg-light-400"}),t);return e.createElement("div",{role:o?"button":void 0,tabIndex:o?0:void 0,onClick:o,className:h},l==="leading"&&S,e.createElement("span",{className:k},a,d),l==="trailing"&&S)};ne.displayName="BadgeGroup";const rt=({size:t})=>{const a=t*.09,r=(t-a)/2,s=2*Math.PI*r;return e.createElement("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",className:"animate-spin"},e.createElement("circle",{cx:t/2,cy:t/2,r,strokeWidth:a,className:"stroke-light-100"}),e.createElement("circle",{cx:t/2,cy:t/2,r,strokeWidth:a,strokeLinecap:"round",strokeDasharray:`${s*.25} ${s}`,className:"stroke-primary-600"}))},st=({size:t})=>{const a=e.useId(),r=t*.125,s=(t-r)/2,i=2*Math.PI*s;return e.createElement("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",className:"animate-spin text-primary-600"},e.createElement("defs",null,e.createElement("linearGradient",{id:a,x1:"100%",y1:"0%",x2:"0%",y2:"100%"},e.createElement("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"1"}),e.createElement("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"}))),e.createElement("circle",{cx:t/2,cy:t/2,r:s,strokeWidth:r,className:"stroke-light-100"}),e.createElement("circle",{cx:t/2,cy:t/2,r:s,strokeWidth:r,strokeLinecap:"round",stroke:`url(#${a})`,strokeDasharray:`${i*.75} ${i}`}))},at=({size:t})=>{const r=Math.max(t*.1,3),s=(t-r)/2;return e.createElement("div",{className:"relative animate-spin",style:{width:t,height:t}},Array.from({length:12}).map((i,l)=>{const d=30*l,o=.15+.85*l/11;return e.createElement("span",{key:l,className:"absolute rounded-full bg-primary-600 top-1/2 left-1/2",style:{width:r,height:r,opacity:o,marginTop:-r/2,marginLeft:-r/2,transform:`rotate(${d}deg) translate(${s}px) rotate(${-d}deg)`}})}))},lt={sm:{box:32,gapClass:"gap-4",textClass:"text-caption-lg"},md:{box:48,gapClass:"gap-4",textClass:"text-caption-lg"},lg:{box:56,gapClass:"gap-4",textClass:"text-body-lg"},xl:{box:64,gapClass:"gap-5",textClass:"text-body-lg"}},ie=({size:t="sm",style:a="line-simple",supportingText:r=!0,label:s="Loading...",className:i})=>{const{box:l,gapClass:d,textClass:o}=lt[t];return e.createElement("div",{role:"status","aria-label":typeof s=="string"?s:"Loading",className:f("inline-flex flex-col items-center",d,i)},a==="line-simple"&&e.createElement(rt,{size:l}),a==="line-spinner"&&e.createElement(st,{size:l}),a==="dot-circle"&&e.createElement(at,{size:l}),r&&e.createElement("p",{className:f("font-medium text-light-700 whitespace-nowrap",o)},s))};ie.displayName="Loading";const oe=({className:t,style:a})=>e.createElement("svg",{viewBox:"0 0 24 24",fill:"none",className:t,style:a},e.createElement("path",{d:"M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z",stroke:"currentColor",strokeWidth:"1.75"}),e.createElement("path",{d:"M3.75 20.25a8.25 8.25 0 0 1 16.5 0",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})),ce=({className:t})=>e.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},e.createElement("circle",{cx:"10",cy:"10",r:"9",className:"fill-primary-500 stroke-white",strokeWidth:"1.5"}),e.createElement("path",{d:"M6 10.2 8.6 12.8 14 7",stroke:"white",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})),nt={xs:{box:24,borderWidth:"0.5px",statusSize:6,badgeSize:10,textClass:"text-caption-sm"},sm:{box:32,borderWidth:"0.5px",statusSize:8,badgeSize:12,textClass:"text-caption-lg"},md:{box:40,borderWidth:"0.75px",statusSize:10,badgeSize:14,textClass:"text-body-sm"},lg:{box:48,borderWidth:"0.75px",statusSize:12,badgeSize:16,textClass:"text-body-lg"},xl:{box:56,borderWidth:"0.75px",statusSize:14,badgeSize:18,textClass:"text-h6"},"2xl":{box:64,borderWidth:"0.75px",statusSize:16,badgeSize:20,textClass:"text-h5 leading-7"}},it="#17B26A",M=({src:t,alt:a,initials:r,size:s="md",status:i="none",statusIcon:l,contrastBorder:d=!0,className:o})=>{const{box:u,borderWidth:c,statusSize:m,badgeSize:g,textClass:b}=nt[s],h=t?"image":r!==void 0?"initials":"placeholder";return e.createElement("div",{className:f("relative inline-block shrink-0 rounded-full",o),style:{width:u,height:u}},h==="image"&&e.createElement("img",{src:t,alt:a??"",className:"absolute inset-0 size-full rounded-full object-cover"}),h==="placeholder"&&e.createElement("div",{className:"absolute inset-0 flex items-center justify-center rounded-full bg-light-50"},e.createElement(oe,{className:"text-light-300",style:{width:u*.55,height:u*.55}})),h==="initials"&&e.createElement("div",{className:f("absolute inset-0 flex items-center justify-center rounded-full bg-light-50 font-semibold text-light-500",b)},r),d&&e.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:c,borderStyle:"solid"}}),i==="online"&&e.createElement("span",{className:"absolute bottom-0 right-0 rounded-full border-[1.5px] border-white",style:{width:m,height:m,backgroundColor:it}}),i==="company"&&e.createElement("div",{className:"absolute bottom-0 right-0 flex items-center justify-center overflow-hidden rounded-full border-[1.5px] border-white bg-white",style:{width:g,height:g}},l),i==="verified"&&e.createElement("div",{className:"absolute bottom-0 right-0",style:{width:g,height:g}},e.createElement(ce,{className:"size-full"})))};M.displayName="Avatar";const ot={xs:{box:24,overlap:-4,contrastBorderWidth:"0.5px",plusIconSize:16,textClass:"text-caption-sm"},sm:{box:32,overlap:-8,contrastBorderWidth:"0.5px",plusIconSize:16,textClass:"text-caption-lg"},md:{box:40,overlap:-12,contrastBorderWidth:"0.75px",plusIconSize:20,textClass:"text-body-sm"}},de=({avatars:t,max:a,size:r="xs",onAdd:s,className:i})=>{const{box:l,overlap:d,contrastBorderWidth:o,textClass:u}=ot[r],c=a?t.slice(0,a):t,m=a&&t.length>a?t.length-a:0;return e.createElement("div",{className:f("inline-flex items-start gap-2",i)},e.createElement("div",{className:"flex items-start"},c.map((g,b)=>e.createElement("div",{key:b,className:"relative shrink-0 overflow-hidden rounded-full border-[1.5px] border-white",style:{width:l,height:l,marginRight:d}},g.src?e.createElement("img",{src:g.src,alt:g.alt??"",className:"size-full object-cover"}):e.createElement("div",{className:"flex size-full items-center justify-center bg-light-50 font-semibold text-light-500"},g.initials),e.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:o,borderStyle:"solid"}}))),m>0&&e.createElement("div",{className:"relative flex shrink-0 items-center justify-center rounded-full border-2 border-white bg-light-100",style:{width:l,height:l}},e.createElement("span",{className:f("font-semibold text-light-600",u)},"+",m))),s&&e.createElement("button",{type:"button",onClick:s,"aria-label":"Add",className:"flex shrink-0 items-center justify-center rounded-full border border-dashed border-light-300 bg-white text-light-500 hover:bg-light-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2",style:{width:l,height:l}},e.createElement("svg",{width:l*.4,height:l*.4,viewBox:"0 0 20 20",fill:"none"},e.createElement("path",{d:"M10 4v12M4 10h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}))))};de.displayName="AvatarGroup";const ct={xs:{nameClass:"text-caption-sm",subtitleClass:"text-caption-sm"},sm:{nameClass:"text-caption-lg",subtitleClass:"text-caption-sm"},md:{nameClass:"text-caption-lg",subtitleClass:"text-caption-lg"},lg:{nameClass:"text-body-sm",subtitleClass:"text-body-sm"},xl:{nameClass:"text-body-lg",subtitleClass:"text-body-sm"}},ue=({name:t,subtitle:a,src:r,initials:s,size:i="xs",status:l="none",statusIcon:d,className:o})=>{const{nameClass:u,subtitleClass:c}=ct[i];return e.createElement("div",{className:f("inline-flex items-center gap-2",o)},e.createElement(M,{src:r,initials:s,size:i,status:l,statusIcon:d}),e.createElement("div",{className:"flex flex-col items-start whitespace-nowrap"},e.createElement("span",{className:f("font-bold text-light-800",u)},t),a&&e.createElement("span",{className:f("font-normal text-light-700",c)},a)))};ue.displayName="AvatarLabelGroup";const dt={sm:{box:72,ringWidth:3,shadowClass:"shadow-md",iconSize:36,textClass:"text-h4",verifiedSize:20,verifiedOffset:0},md:{box:96,ringWidth:4,shadowClass:"shadow-lg",iconSize:48,textClass:"text-h3",verifiedSize:24,verifiedOffset:0},lg:{box:160,ringWidth:4,shadowClass:"shadow-lg",iconSize:80,textClass:"text-h1",verifiedSize:32,verifiedOffset:4}},me=({src:t,alt:a,initials:r,size:s="sm",verified:i=!0,contrastBorder:l=!0,className:d})=>{const{box:o,ringWidth:u,shadowClass:c,iconSize:m,textClass:g,verifiedSize:b,verifiedOffset:h}=dt[s],N=t?"image":r!==void 0?"initials":"placeholder";return e.createElement("div",{className:f("relative rounded-full",d),style:{width:o,height:o}},e.createElement("div",{className:f("absolute inset-0 overflow-hidden rounded-full border-white",c,N!=="image"&&"bg-light-100"),style:{borderWidth:u,borderStyle:"solid"}},N==="image"&&e.createElement("img",{src:t,alt:a??"",className:"absolute inset-0 size-full rounded-full object-cover"}),l&&e.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border border-black/[0.08]"}),N==="placeholder"&&e.createElement("div",{className:"absolute inset-0 flex items-center justify-center"},e.createElement(oe,{className:"text-light-300",style:{width:m,height:m}})),N==="initials"&&e.createElement("div",{className:f("absolute inset-0 flex items-center justify-center font-semibold text-light-500",g)},r)),i&&e.createElement("div",{className:"absolute",style:{width:b,height:b,bottom:h,right:h}},e.createElement(ce,{className:"size-full"})))};me.displayName="AvatarProfilePhoto";const ut={"button-gray":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},"button-white":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},"button-primary":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},underline:{sm:"h-8 px-1 pb-3 text-sm gap-2",md:"h-9 px-1 pb-3 text-base gap-2"},"underline-filled":{sm:"h-11 p-3 text-sm gap-2",md:"h-12 p-3 text-base gap-2"},line:{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3.5 py-2.5 text-base gap-2"}},mt={"button-gray":"rounded-md","button-white":"rounded-md","button-primary":"rounded-md",underline:"rounded-none","underline-filled":"rounded-none",line:"rounded-none"},gt={"button-gray":{active:"bg-light-50 text-light-700",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-light-50 hover:text-light-700",hasFocusRing:!0},"button-white":{active:"bg-white text-light-700 shadow-sm",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-white hover:text-light-700 hover:shadow-sm",hasFocusRing:!0},"button-primary":{active:"bg-primary-50 text-primary-700",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-primary-50 hover:text-primary-700",hasFocusRing:!0},underline:{active:"border-b-2 border-primary-500 text-primary-700",inactive:"border-b-2 border-transparent text-light-500",hoverInactive:"hover:border-primary-500 hover:text-primary-700",hasFocusRing:!1},"underline-filled":{active:"bg-primary-50 border-b-2 border-primary-500 text-primary-700",inactive:"bg-transparent border-b-2 border-transparent text-light-500",hoverInactive:"hover:bg-primary-50 hover:border-primary-500 hover:text-primary-700",hasFocusRing:!1},line:{active:"bg-transparent border-l-2 border-primary-500 text-primary-700",inactive:"bg-transparent border-l-2 border-transparent text-light-500",hoverInactive:"hover:border-primary-500 hover:text-primary-700",hasFocusRing:!0}},pt="inline-flex items-center justify-center rounded-full border border-light-200 bg-light-50 px-2 py-0.5 text-caption-sm font-medium text-light-700",ft={"button-gray":{gapClass:"gap-1",hasHairline:!1},"button-white":{gapClass:"gap-1",hasHairline:!1},"button-primary":{gapClass:"gap-1",hasHairline:!1},underline:{gapClass:"gap-3",hasHairline:!0},"underline-filled":{gapClass:"gap-3",hasHairline:!0},line:{gapClass:"gap-1",hasHairline:!1}},ge=({children:t,variant:a="button-primary",size:r="sm",active:s=!1,fullWidth:i=!1,count:l,disabled:d=!1,onClick:o,className:u})=>{const c=gt[a];return e.createElement("button",{type:"button",role:"tab","aria-selected":s,disabled:d,onClick:o,className:f("inline-flex items-center justify-center font-semibold transition-colors duration-150",ut[a][r],mt[a],s?c.active:c.inactive,!s&&!d&&c.hoverInactive,c.hasFocusRing&&"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",i&&"w-full",d?"cursor-not-allowed opacity-60":"cursor-pointer",u)},e.createElement("span",{className:"whitespace-nowrap"},t),l!==void 0&&e.createElement("span",{className:pt},l))};ge.displayName="Tab";const pe=({children:t,variant:a="button-primary",orientation:r="horizontal",boxed:s=!1,className:i})=>{const{gapClass:l,hasHairline:d}=ft[a];return e.createElement("div",{role:"tablist","aria-orientation":r,className:f("inline-flex",r==="vertical"?"flex-col items-stretch":"flex-row items-center",l,s&&"rounded-lg border border-light-200 bg-light-50 p-1",d&&r==="horizontal"&&!s&&"border-b border-light-200",i)},t)};pe.displayName="TabList";const bt=p("flex flex-col gap-1 w-full",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-sm"}},defaultVariants:{size:"md"}}),ht=p("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),xt=p(["flex items-center w-full border","bg-white transition-[border-color,border-width]"],{variants:{size:{xs:"h-7 px-2 gap-1 rounded text-caption-sm",sm:"h-9 px-3 gap-2 rounded-lg",md:"h-11 px-3 gap-2 rounded-lg"},error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100 text-light-400 cursor-not-allowed",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),vt=p(["flex-1 bg-transparent outline-none text-light-900","placeholder:text-light-500","disabled:text-light-400 disabled:cursor-not-allowed"],{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},error:{true:"",false:"text-light-900"}},defaultVariants:{size:"md",error:!1}}),yt=p("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}}}),wt=p("flex items-stretch w-full bg-white border overflow-hidden transition-[border-color,border-width]",{variants:{size:{xs:"rounded",sm:"rounded-lg",md:"rounded-lg"},error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),Et=p("flex flex-1 items-center min-w-0",{variants:{size:{xs:"gap-1 px-2 py-1",sm:"gap-2 px-3 py-2",md:"gap-2 px-3 py-2"},disabled:{true:"text-light-400 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),Nt=p("flex items-center text-light-700 whitespace-nowrap border-r border-light-200",{variants:{size:{xs:"px-2 text-caption-sm",sm:"px-3 text-caption-lg",md:"px-3 text-body-sm"}},defaultVariants:{size:"md"}}),fe=p(["flex items-center gap-1 shrink-0 bg-transparent p-0 text-light-800 cursor-pointer","hover:bg-transparent hover:text-light-900","disabled:cursor-not-allowed disabled:text-light-400"],{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"}},defaultVariants:{size:"md"}}),kt=p("flex shrink-0 items-center justify-center gap-1 w-[92px] border-l border-light-200 bg-white font-semibold text-light-800 hover:bg-light-50 disabled:cursor-not-allowed disabled:text-light-400",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"}},defaultVariants:{size:"md"}}),be=({className:t})=>n.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},n.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),St={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},Ct=({size:t,error:a,disabled:r})=>f("flex items-center w-full gap-2 rounded-lg border bg-white px-2 transition-[border-color,border-width]",St[t],a?"border-error-200 focus-within:border-2 focus-within:border-error-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",r&&"bg-light-100 text-light-400 cursor-not-allowed"),zt=({error:t})=>f("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),Lt="flex flex-col w-full max-w-[320px]",W=n.forwardRef(function({label:a,required:r,hint:s,rightIcon:i,size:l="md",error:d=!1,disabled:o=!1,compact:u=!1,hideCalendarIcon:c=!1,type:m,prefix:g,suffix:b,leadingAddon:h,leadingDropdown:N,trailingDropdown:k,trailingButton:S,maxLength:w,value:v,className:y,wrapperClassName:E,...B},z){const L=!!(h||S),T=n.createElement(n.Fragment,null,N&&n.createElement("button",{type:"button",onClick:N.onClick,disabled:N.disabled||o,className:fe({size:l})},n.createElement("span",null,N.value),n.createElement(be,{className:"size-5 text-light-500"})),g&&n.createElement("div",{className:"flex items-center"},g),n.createElement("input",{...B,ref:z,type:m,disabled:o,maxLength:w,value:v,className:f(vt({size:l,error:d}),"h-full",c&&"[&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-clear-button]:hidden",m==="date"&&"[&::-webkit-datetime-edit]:p-0 [&::-webkit-datetime-edit-fields-wrapper]:p-0",y)}),(i||b)&&n.createElement("div",{className:"flex h-full items-center gap-2"},i&&n.createElement("div",{className:"flex h-full items-center pb-0.5 text-light-400 hover:text-light-600"},i),b&&n.createElement("div",{className:"flex h-full items-center gap-1 leading-none text-light-700"},b)),k&&n.createElement("button",{type:"button",onClick:k.onClick,disabled:k.disabled||o,className:fe({size:l})},n.createElement("span",null,k.value),n.createElement(be,{className:"size-5 text-light-500"})));return n.createElement("div",{className:f(u?Lt:bt({size:l}),E)},a&&n.createElement("label",{className:u?zt({error:d}):ht({error:d})},a,r&&n.createElement("span",{className:"text-error-400"},"*")),L?n.createElement("div",{className:wt({size:l,error:d,disabled:o})},h&&n.createElement("div",{className:Nt({size:l})},h),n.createElement("div",{className:Et({size:l,disabled:o})},T),S&&n.createElement("button",{type:"button",onClick:S.onClick,disabled:S.disabled||o,className:kt({size:l})},S.icon,n.createElement("span",null,S.label))):n.createElement("div",{className:u?Ct({size:l,error:d,disabled:o}):xt({size:l,error:d,disabled:o})},T),w&&typeof v=="string"&&n.createElement("div",{className:"text-right text-xs text-light-400"},v.length,"/",w),s&&n.createElement("p",{className:yt({error:d})},s))});function Tt({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}function Bt({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}var It={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const A=(t,a,r,s)=>{const i=n.forwardRef(({color:l="currentColor",size:d=24,stroke:o=2,title:u,className:c,children:m,...g},b)=>n.createElement("svg",{ref:b,...It[t],width:d,height:d,className:["tabler-icon",`tabler-icon-${a}`,c].join(" "),strokeWidth:o,stroke:l,...g},[u&&n.createElement("title",{key:"svg-title"},u),...s.map(([h,N])=>n.createElement(h,N)),...Array.isArray(m)?m:[m]]));return i.displayName=`${r}`,i};const he=A("outline","alert-circle","AlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]);const xe=A("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);const _t=A("outline","circle-check","CircleCheck",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]);const H=A("outline","info-circle","InfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);const Vt=A("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function Ot({size:t="md",label:a,required:r,hint:s,error:i,disabled:l,placeholder:d="+1 (555) 000-0000",rightIcon:o,value:u,onChange:c,className:m,wrapperClassName:g}){return n.createElement(W,{size:t,label:a,required:r,hint:s,error:i,disabled:l,placeholder:d,rightIcon:o,value:u,onChange:c,className:m,wrapperClassName:g,prefix:n.createElement("div",{className:"flex items-center gap-1 pr-2 text-sm text-light-700"},n.createElement("span",null,"US"),n.createElement(xe,{size:14}))})}function jt({size:t="md",label:a,required:r,hint:s,error:i,disabled:l,value:d,placeholder:o="1,000.00",currency:u="USD",onCurrencyChange:c,rightIcon:m,onChange:g,className:b,wrapperClassName:h}){return n.createElement(W,{size:t,label:a,required:r,hint:s,error:i,disabled:l,value:d,placeholder:o,rightIcon:m,onChange:g,className:b,wrapperClassName:h,prefix:n.createElement("span",{className:"select-none text-sm text-light-700"},"$"),suffix:n.createElement("button",{type:"button",disabled:l,onClick:c,className:"flex items-center gap-1 text-sm text-light-700 hover:text-light-900 disabled:cursor-not-allowed"},u,n.createElement(xe,{size:14}))})}function Mt({size:t="md",label:a,required:r,hint:s,disabled:i,error:l,className:d,wrapperClassName:o,value:u,maxLength:c,placeholder:m,onChange:g}){const b=u.length>c,h=l||b;return n.createElement(W,{size:t,label:a,required:r,disabled:i,error:h,value:u,placeholder:m,onChange:g,className:d,wrapperClassName:o,hint:s,suffix:n.createElement("span",{className:f("text-caption-lg",b?"text-error-600":"text-light-400")},u.length,"/",c)})}function Wt({size:t="md",label:a="Card number",required:r,hint:s,error:i,disabled:l,placeholder:d="Card number",value:o,onChange:u,rightIcon:c,prefix:m,className:g,wrapperClassName:b}){return n.createElement(W,{size:t,label:a,required:r,hint:s,error:i,disabled:l,placeholder:d,value:o,onChange:u,rightIcon:c,className:g,wrapperClassName:b,prefix:m??n.createElement("img",{src:"/stories/assets/mastercard.png",alt:"mastercard",className:"h-4 w-6 object-contain"}),inputMode:"numeric",autoComplete:"cc-number"})}const K=W;K.Prefix=Tt,K.Suffix=Bt;const At="flex flex-col gap-1 w-full",Pt=p("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),Dt=p(["flex w-full gap-2 border rounded-lg p-3 bg-white","transition-[border-color,border-width]"],{variants:{error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100 cursor-not-allowed",false:""}},defaultVariants:{error:!1,disabled:!1}}),Gt=p(["flex-1 min-h-[132px] bg-transparent outline-none text-caption-lg text-light-900","placeholder:text-light-500","disabled:text-light-400 disabled:cursor-not-allowed disabled:resize-none"],{variants:{resizable:{true:"resize-y",false:"resize-none"}},defaultVariants:{resizable:!0}}),Ft=p("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}},defaultVariants:{error:!1}}),Ht=({error:t,disabled:a})=>f("flex w-full gap-2 rounded-lg border bg-white p-2 transition-[border-color,border-width]",t?"border-error-200 focus-within:border-2 focus-within:border-error-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",a&&"bg-light-100 cursor-not-allowed"),Kt=({error:t})=>f("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),qt=t=>f("flex-1 min-h-[64px] bg-transparent outline-none text-sm text-light-900","placeholder:text-light-500",t?"resize-y":"resize-none"),Ut="flex flex-col w-full max-w-[320px]",ve=e.forwardRef(({label:t,required:a,hint:r,helpIcon:s,error:i=!1,disabled:l=!1,resizable:d=!0,compact:o=!1,rows:u,style:c,className:m,wrapperClassName:g,...b},h)=>{const N=u?{minHeight:`${u*20}px`}:void 0;return e.createElement("div",{className:f(o?Ut:At,g)},t&&e.createElement("label",{className:o?Kt({error:i}):Pt({error:i})},t,a&&e.createElement("span",{className:"text-error-400"},"*"),s),e.createElement("div",{className:o?Ht({error:i,disabled:l}):Dt({error:i,disabled:l})},e.createElement("textarea",{ref:h,disabled:l,rows:u,style:{...N,...c},className:f(o?qt(d&&!l):Gt({resizable:d&&!l}),m),...b})),r&&e.createElement("p",{className:Ft({error:i})},r))});ve.displayName="Textarea";const Zt=p("flex w-[320px] flex-col gap-1"),Xt=p("flex items-center gap-1 text-sm font-bold",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),Qt=p(["flex items-center","rounded-lg border bg-white","overflow-hidden","transition-colors"],{variants:{size:{sm:"h-9 px-2",md:"h-11 px-3"},error:{true:"border-error-300 focus-within:ring-2 focus-within:ring-error-500",false:"border-light-200 focus-within:ring-2 focus-within:ring-primary-500"},disabled:{true:"bg-light-100 cursor-not-allowed",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),Jt=p(["flex items-center gap-1","overflow-x-auto overflow-y-hidden","whitespace-nowrap","scrollbar-hide","flex-1"]),Yt=p("flex shrink-0 items-center gap-1 rounded-md bg-white border border-light-200 px-2 py-1 text-caption-lg text-light-800"),$t=p(["min-w-[120px]","bg-transparent outline-none","text-light-900 placeholder:text-light-500"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:""}}}),Rt=p("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function er({size:t="md",label:a,required:r,hint:s,error:i=!1,disabled:l=!1,placeholder:d="Add items",rightIcon:o,className:u,wrapperClassName:c,options:m,value:g=[],onChange:b}){const h=n.useId(),[N,k]=n.useState(""),S=v=>{const y=m.find(E=>E.label===v);y&&(g.some(E=>E.id===y.id)||(b?.([...g,y]),k("")))},w=v=>{b?.(g.filter(y=>y.id!==v))};return n.createElement("div",{className:f(Zt(),c)},a&&n.createElement("label",{className:Xt({error:i})},a,r&&n.createElement("span",{className:"text-error-400"},"*")),n.createElement("div",{className:Qt({size:t,error:i,disabled:l})},n.createElement("div",{className:Jt()},g.map(v=>n.createElement("span",{key:v.id,className:Yt()},v.avatar&&n.createElement("img",{src:v.avatar,alt:v.label,className:"h-4 w-4 rounded-full"}),v.label,!l&&n.createElement("button",{type:"button",onClick:()=>w(v.id),className:"ml-1 text-light-500 hover:text-light-700"},"×"))),n.createElement("input",{list:h,value:N,onChange:v=>{k(v.target.value),S(v.target.value)},placeholder:g.length===0?d:"",disabled:l,className:f($t({disabled:l}),u)}),n.createElement("datalist",{id:h},m.map(v=>n.createElement("option",{key:v.id,value:v.label})))),o&&n.createElement("div",{className:"ml-2 flex shrink-0 items-center text-light-400"},o)),s&&n.createElement("p",{className:Rt({error:i})},s))}const tr=p("flex w-[320px] flex-col gap-1"),rr=p("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}}}),sr=p("flex items-stretch rounded-lg border bg-white transition-colors",{variants:{error:{true:"",false:"border-light-200"},disabled:{true:"bg-light-100",false:""}}}),ar=p("flex items-center px-3 text-sm text-light-500 rounded-l-lg select-none",{variants:{size:{sm:"h-9",md:"h-11"},disabled:{true:"bg-light-100",false:"bg-white"}}}),lr="w-px bg-light-200",nr=p(["flex flex-1 items-center gap-2 px-3 rounded-r-lg","transition-shadow","focus-within:ring-2 focus-within:ring-offset-0"],{variants:{size:{sm:"h-9",md:"h-11"},error:{true:"border border-error-200 focus-within:ring-error-500",false:"focus-within:ring-primary-500"},disabled:{true:"cursor-not-allowed",false:""}}}),ir=p("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),or=p("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function cr({size:t="md",label:a,required:r,hint:s,error:i=!1,disabled:l=!1,placeholder:d="www.cekat.ai",value:o,rightIcon:u,onChange:c,className:m,wrapperClassName:g}){return n.createElement("div",{className:f(tr(),g)},a&&n.createElement("label",{className:rr({error:i})},a,r&&n.createElement("span",{className:"text-error-400"},"*")),n.createElement("div",{className:sr({error:i,disabled:l})},n.createElement("div",{className:ar({size:t})},"http://"),n.createElement("div",{className:lr}),n.createElement("div",{className:nr({size:t,error:i,disabled:l})},n.createElement("input",{value:o,onChange:c,placeholder:d,disabled:l,className:f(ir({disabled:l}),m)}),u&&n.createElement("div",{className:"flex items-center text-light-400"},u))),s&&n.createElement("p",{className:or({error:i})},s))}const dr=p("flex w-[320px] flex-col gap-1"),ur=p("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),mr=p("flex items-stretch rounded-lg border border-light-200 bg-white transition-colors",{variants:{disabled:{true:"bg-light-100",false:""}}}),gr=p(["flex flex-1 items-center gap-2 px-3 rounded-l-lg","transition-shadow","focus-within:ring-2 focus-within:ring-offset-0"],{variants:{size:{sm:"h-9",md:"h-11"},error:{true:"border border-error-200 focus-within:ring-error-500",false:"focus-within:ring-primary-500"},disabled:{true:"cursor-not-allowed",false:""}}}),pr=p("w-px transition-colors",{variants:{error:{true:"focus:bg-error-200 group-focus-within:bg-error-500",false:"focus:bg-light-200 group-focus-within:bg-primary-500"}}}),fr=p("flex items-center gap-1 px-3 text-sm text-light-700 rounded-r-lg select-none",{variants:{size:{sm:"h-9",md:"h-11"},disabled:{true:"bg-white",false:"bg-white"}}}),br=p("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),hr=p("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function xr({size:t="md",label:a,required:r,hint:s,error:i=!1,disabled:l=!1,placeholder:d="www.cekat.ai",value:o,rightIcon:u,suffix:c,onChange:m,className:g,wrapperClassName:b}){return n.createElement("div",{className:f(dr(),b)},a&&n.createElement("label",{className:ur({error:i})},a,r&&n.createElement("span",{className:"text-error-400"},"*")),n.createElement("div",{className:mr({disabled:l})},n.createElement("div",{className:gr({size:t,error:i,disabled:l})},n.createElement("input",{value:o,onChange:m,placeholder:d,disabled:l,className:f(br({disabled:l}),g)}),u&&n.createElement("div",{className:"text-light-400"},u)),n.createElement("div",{className:pr({error:i})}),n.createElement("div",{className:fr({size:t,disabled:l})},c)),s&&n.createElement("p",{className:hr({error:i})},s))}const vr=p("flex w-full flex-col gap-1"),yr=p("flex items-center gap-1 text-sm font-bold text-light-800"),ye=p(["flex w-full items-center border bg-white text-left","transition-[border-color,border-width]"],{variants:{size:{xs:"h-7 gap-1 rounded px-2 text-caption-sm",sm:"h-9 gap-2 rounded-lg px-3 text-caption-lg",md:"h-11 gap-2 rounded-lg px-3 text-body-sm"},open:{true:"border-2 border-primary-500",false:"border-light-200 focus-within:border-2 focus-within:border-primary-500"},disabled:{true:"cursor-not-allowed bg-light-100",false:"cursor-pointer"}},defaultVariants:{size:"md",open:!1,disabled:!1}}),wr=p(["absolute left-0 top-full z-10 mt-2 w-full overflow-y-auto","rounded-lg border border-light-200 bg-white py-1","shadow-[0_12px_16px_-4px_rgba(16,24,40,0.08),0_4px_6px_-2px_rgba(16,24,40,0.03)]"],{variants:{size:{xs:"max-h-52",sm:"max-h-64",md:"max-h-80"}},defaultVariants:{size:"md"}}),we=p("flex w-full items-center rounded-md text-left",{variants:{size:{xs:"gap-1 px-2 py-1 text-caption-sm",sm:"gap-2 px-3 py-1.5 text-caption-lg",md:"gap-2 py-2.5 pl-4 pr-2.5 text-body-sm"},disabled:{true:"cursor-not-allowed text-light-400",false:"cursor-pointer hover:bg-light-50"}},defaultVariants:{size:"md",disabled:!1}}),Er=p("text-caption-lg text-light-700"),Nr=({className:t})=>e.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},e.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),kr=({className:t})=>e.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},e.createElement("path",{d:"M17.5 17.5L14.1 14.1M16 9.25C16 12.98 12.98 16 9.25 16C5.52 16 2.5 12.98 2.5 9.25C2.5 5.52 5.52 2.5 9.25 2.5C12.98 2.5 16 5.52 16 9.25Z",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Sr=({className:t})=>e.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},e.createElement("path",{d:"M16.67 5L7.5 14.17L3.33 10",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),q={xs:"size-4",sm:"size-5",md:"size-6"},Ee={xs:"size-4",sm:"size-5",md:"size-5"},Cr={xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},zr={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},Ne=({size:t,open:a,disabled:r})=>f("flex w-full items-center gap-2 rounded-lg border bg-white px-2 text-left transition-[border-color,border-width]",Cr[t],zr[t],a?"border-2 border-primary-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",r?"cursor-not-allowed bg-light-100":"cursor-pointer"),Lr=()=>"flex items-center gap-1 text-caption-sm font-semibold text-light-800",Tr="flex w-full max-w-[320px] flex-col";function Br({size:t="md",type:a="default",label:r,required:s,helpIcon:i,hint:l,placeholder:d="Select option",disabled:o=!1,compact:u=!1,leadingIcon:c,options:m,value:g=null,onChange:b,values:h=[],onValuesChange:N,className:k,wrapperClassName:S}){const[w,v]=e.useState(!1),[y,E]=e.useState(""),B=e.useRef(null),z=e.useRef(null),L=a==="tags",T=a==="search"||L,I=m.find(x=>x.id===g)??null,O=m.filter(x=>h.includes(x.id)),j=y?m.filter(x=>`${x.label} ${x.supportingText??""}`.toLowerCase().includes(y.toLowerCase())):m,_=()=>{v(!1),E("")};e.useEffect(()=>{if(!w)return;const x=V=>{B.current?.contains(V.target)||_()};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[w]),e.useEffect(()=>{w&&T&&z.current?.focus()},[w,T]);const P=()=>{o||(w?_():v(!0))},U=x=>{x.disabled||(L?(N?.(h.includes(x.id)?h.filter(V=>V!==x.id):[...h,x.id]),E(""),z.current?.focus()):(b?.(x),_()))},ts=x=>{if(x.key==="Enter"){x.preventDefault();const V=j.find(as=>!as.disabled);w&&V&&U(V)}else x.key==="Backspace"&&L&&!y&&h.length?N?.(h.slice(0,-1)):w||v(!0)},ze=x=>x.avatar?e.createElement("img",{src:x.avatar,alt:"",className:f(q[t],"shrink-0 rounded-full object-cover")}):x.icon?e.createElement("span",{className:f(q[t],"flex shrink-0 items-center justify-center",o?"text-light-400":"text-light-500")},x.icon):x.dot?e.createElement("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:o?"#d0d5dd":x.dot}}):null,rs=I?ze(I):c?e.createElement("span",{className:f(q[t],"flex shrink-0 items-center justify-center",o?"text-light-400":"text-light-500")},c):null,Le=I?e.createElement("span",{className:"flex min-w-0 items-center gap-2 whitespace-nowrap"},e.createElement("span",{className:f("truncate font-medium",o?"text-light-400":"text-light-800")},I.label),I.supportingText&&e.createElement("span",{className:o?"text-light-400":"text-light-700"},I.supportingText)):e.createElement("span",{className:o?"text-light-400":"text-light-500"},d),ss=w&&e.createElement("div",{role:"listbox",className:wr({size:t})},j.length===0&&e.createElement("div",{className:f(we({size:t}),"mx-1 w-auto text-light-500 hover:bg-transparent")},"No options found"),j.map(x=>{const V=L?h.includes(x.id):x.id===g;return e.createElement("div",{key:x.id,className:"px-1 py-0.5"},e.createElement("button",{type:"button",role:"option","aria-selected":V,disabled:x.disabled,onClick:()=>U(x),className:we({size:t,disabled:x.disabled})},ze(x),e.createElement("span",{className:"flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap"},e.createElement("span",{className:f("truncate font-medium",x.disabled?"text-light-400":"text-light-900")},x.label),x.supportingText&&e.createElement("span",{className:x.disabled?"text-light-400":"text-light-700"},x.supportingText)),V&&e.createElement(Sr,{className:"ml-auto size-5 shrink-0 text-primary-500"})))}));return e.createElement("div",{ref:B,className:f(u?Tr:vr(),S)},r&&e.createElement("label",{className:u?Lr():yr()},r,s&&e.createElement("span",{className:"text-error-400"},"*"),i),e.createElement("div",{className:"relative",onKeyDown:x=>{x.key==="Escape"&&_()}},a==="default"?e.createElement("button",{type:"button","aria-haspopup":"listbox","aria-expanded":w,disabled:o,onClick:P,className:f(u?Ne({size:t,open:w,disabled:o}):ye({size:t,open:w,disabled:o}),k)},rs,e.createElement("span",{className:"flex min-w-0 flex-1 items-center"},Le),e.createElement(Nr,{className:f(Ee[t],"shrink-0 text-light-500")})):e.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-expanded":w,onClick:P,className:f(u?Ne({size:t,open:w,disabled:o}):ye({size:t,open:w,disabled:o}),k)},e.createElement(kr,{className:f(Ee[t],"shrink-0",o?"text-light-400":"text-light-500")}),L&&O.length>0&&e.createElement("div",{className:"flex shrink items-center gap-1 overflow-x-auto whitespace-nowrap scrollbar-hide"},O.map(x=>e.createElement(F,{key:x.id,size:"sm",disabled:o,icon:x.avatar?e.createElement("img",{src:x.avatar,alt:"",className:"size-4 shrink-0 rounded-full object-cover"}):void 0,onClose:()=>U(x)},x.label))),!L&&!w&&I?e.createElement("span",{className:"flex min-w-0 flex-1 items-center"},Le):e.createElement("input",{ref:z,value:y,disabled:o,placeholder:L&&O.length>0?"":d,onChange:x=>{E(x.target.value),w||v(!0)},onKeyDown:ts,className:"min-w-8 flex-1 bg-transparent text-light-900 outline-none placeholder:text-light-500 disabled:cursor-not-allowed disabled:placeholder:text-light-400"})),ss),l&&e.createElement("p",{className:Er()},l))}const Ir=p(["inline-flex items-center justify-center gap-1 shrink-0","rounded-md border border-light-200 bg-white px-2 py-1","font-bold text-caption-sm text-light-900","transition-shadow"],{variants:{open:{true:"shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{open:!1,disabled:!1}}),_r=p("flex size-5 shrink-0 items-center justify-center text-light-500",{variants:{disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer hover:text-light-700"}},defaultVariants:{disabled:!1}}),Vr=p("rounded-full transition-shadow",{variants:{open:{true:"shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{open:!1,disabled:!1}}),Or=p(["absolute top-full z-10 mt-2 flex w-60 flex-col overflow-clip","rounded-lg border border-light-200 bg-white","shadow-[0px_12px_16px_-4px_rgba(16,24,40,0.08),0px_4px_6px_-2px_rgba(16,24,40,0.03)]"]),jr=p("flex w-full flex-col items-start border-b border-light-200 px-4 py-3"),Mr=p("flex w-full flex-col items-start overflow-y-auto py-1"),Wr=p(["mx-1 flex w-[calc(100%-8px)] items-center gap-3 rounded-md px-4 py-2.5","text-left font-bold text-caption-lg"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:"cursor-pointer text-light-800 hover:bg-light-50"}},defaultVariants:{disabled:!1}}),Ar=p("ml-auto shrink-0 font-normal text-caption-sm text-light-500"),Pr=p("my-1 h-px w-full bg-light-200"),Dr=({className:t})=>e.createElement("svg",{viewBox:"0 0 18 18",fill:"none",className:t},e.createElement("path",{d:"M4.5 6.75L9 11.25L13.5 6.75",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Gr=({className:t})=>e.createElement("svg",{viewBox:"0 0 18 18",fill:"none",className:t},e.createElement("path",{d:"M13.5 11.25L9 6.75L4.5 11.25",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Fr=({className:t})=>e.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},e.createElement("path",{d:"M10 10.83a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67ZM10 5a.83.83 0 1 0 0-1.67A.83.83 0 0 0 10 5ZM10 16.67a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67Z",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"}));function Hr({trigger:t="button",label:a="Account",icon:r,avatarSrc:s,avatarInitials:i,header:l,items:d,open:o,defaultOpen:u=!1,onOpenChange:c,disabled:m=!1,align:g="end",className:b,menuClassName:h}){const[N,k]=e.useState(u),S=o!==void 0,w=S?o:N,v=e.useRef(null),y=z=>{S||k(z),c?.(z)};e.useEffect(()=>{if(!w)return;const z=T=>{v.current?.contains(T.target)||y(!1)},L=T=>{T.key==="Escape"&&y(!1)};return document.addEventListener("mousedown",z),document.addEventListener("keydown",L),()=>{document.removeEventListener("mousedown",z),document.removeEventListener("keydown",L)}},[w]);const E=()=>{m||y(!w)},B=z=>{z.disabled||(z.onClick?.(),y(!1))};return e.createElement("div",{ref:v,className:f("relative inline-block",b)},t==="button"&&e.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":w,disabled:m,onClick:E,className:Ir({open:w,disabled:m})},e.createElement("span",null,a),w?e.createElement(Gr,{className:"size-[18px]"}):e.createElement(Dr,{className:"size-[18px]"})),t==="icon"&&e.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":w,"aria-label":a,disabled:m,onClick:E,className:_r({disabled:m})},r??e.createElement(Fr,{className:"size-5"})),t==="avatar"&&e.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":w,"aria-label":a,disabled:m,onClick:E,className:Vr({open:w,disabled:m})},e.createElement(M,{src:s,initials:i,size:"md",status:"online"})),w&&e.createElement("div",{role:"menu",className:f(Or(),g==="end"?"right-0":"left-0",h)},l&&e.createElement("div",{className:jr()},e.createElement("div",{className:"flex w-full items-center gap-3"},e.createElement(M,{src:l.avatarSrc,initials:l.avatarInitials,size:"md",status:l.status??"online"}),e.createElement("div",{className:"flex min-w-0 flex-1 flex-col items-start text-left"},e.createElement("span",{className:"w-full truncate text-sm font-bold text-light-800"},l.name),l.subtitle&&e.createElement("span",{className:"w-full truncate text-caption-lg font-normal text-light-700"},l.subtitle)))),e.createElement("div",{className:Mr()},d.map(z=>z.divider?e.createElement("div",{key:z.id,role:"separator",className:Pr()}):e.createElement("button",{key:z.id,type:"button",role:"menuitem",disabled:z.disabled,onClick:()=>B(z),className:Wr({disabled:z.disabled})},z.icon&&e.createElement("span",{className:"flex size-4 shrink-0 items-center justify-center"},z.icon),e.createElement("span",{className:"flex-1 truncate"},z.label),z.shortcut&&e.createElement("span",{className:Ar()},z.shortcut))))))}const ke=p("relative",{variants:{layout:{floating:["flex w-full flex-col gap-4 p-4","rounded-xl border shadow-xs","sm:flex-row sm:items-start"],"full-width":"w-full border-b"}},defaultVariants:{layout:"floating"}}),Kr={default:{surface:"bg-light-50",border:"border-light-300",iconSurface:"border border-light-200 bg-white shadow-xs",iconSurfaceOnLight:"border border-light-200 bg-white shadow-xs",iconText:"text-light-800"},brand:{surface:"bg-primary-50",border:"border-primary-300",iconSurface:"bg-primary-100",iconSurfaceOnLight:"bg-white",iconText:"text-primary-500"},gray:{surface:"bg-light-50",border:"border-light-300",iconSurface:"bg-light-100",iconSurfaceOnLight:"bg-white",iconText:"text-light-800"},error:{surface:"bg-error-50",border:"border-error-300",iconSurface:"bg-error-50",iconSurfaceOnLight:"bg-white",iconText:"text-error-500"},warning:{surface:"bg-warning-50",border:"border-warning-300",iconSurface:"bg-warning-100",iconSurfaceOnLight:"bg-white",iconText:"text-warning-500"},success:{surface:"bg-success-50",border:"border-success-300",iconSurface:"bg-success-50",iconSurfaceOnLight:"bg-white",iconText:"text-success-500"}},qr="bg-white border-light-200",Ur="relative mx-auto flex w-full max-w-[1280px] flex-col gap-4 px-4 py-4 sm:flex-row sm:items-center sm:gap-3 sm:px-8 sm:py-3",Zr=p("flex shrink-0 items-center justify-center",{variants:{layout:{floating:"","full-width":"hidden sm:flex"},shape:{square:"",circle:""},variant:{featured:"",plain:""}},compoundVariants:[{variant:"featured",layout:"floating",class:"size-8"},{variant:"featured",layout:"full-width",class:"size-10"},{variant:"featured",shape:"circle",class:"rounded-full"},{variant:"featured",shape:"square",layout:"floating",class:"rounded-md"},{variant:"featured",shape:"square",layout:"full-width",class:"rounded-lg"}],defaultVariants:{layout:"floating",shape:"square",variant:"featured"}}),Se=p("flex min-w-0 flex-1",{variants:{layout:{floating:"flex-col gap-3","full-width":"items-center gap-4"}},defaultVariants:{layout:"floating"}}),Xr=p("flex min-w-0",{variants:{layout:{floating:"flex-col gap-1","full-width":"flex-col gap-0.5 sm:flex-row sm:flex-wrap sm:gap-x-1.5"},closable:{true:"",false:""}},compoundVariants:[{layout:"floating",closable:!0,class:"pr-8"},{layout:"full-width",closable:!0,class:"pr-8 sm:pr-0"}],defaultVariants:{layout:"floating",closable:!1}}),Qr="text-caption-lg font-bold text-light-800",Jr="text-caption-lg text-light-600",Yr=p("flex gap-3",{variants:{layout:{floating:"flex-wrap items-center","full-width":""},actionVariant:{link:"flex-wrap items-center",button:""}},compoundVariants:[{layout:"full-width",actionVariant:"button",class:"flex-col-reverse sm:flex-row sm:items-center"}],defaultVariants:{layout:"floating",actionVariant:"link"}}),$r=p(["inline-flex items-center justify-center gap-1 bg-transparent p-0","text-caption-lg font-bold transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"],{variants:{emphasis:{primary:"text-primary-500 hover:text-primary-800",secondary:"text-light-800 hover:text-light-900"}},defaultVariants:{emphasis:"secondary"}}),Rr=p(["flex size-9 shrink-0 items-center justify-center rounded-lg","bg-transparent text-light-500 transition-colors","hover:bg-light-50 hover:text-light-700","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"],{variants:{layout:{floating:"absolute right-[7px] top-[7px]","full-width":"absolute right-2 top-2 sm:static"}},defaultVariants:{layout:"floating"}}),es={default:H,brand:H,gray:H,error:he,warning:he,success:_t},Ce=({title:t,description:a,color:r="default",layout:s="floating",background:i="white",icon:l,iconVariant:d="featured",showIcon:o=!0,primaryAction:u,secondaryAction:c,actionVariant:m,actions:g,onClose:b,closeLabel:h="Close",className:N,...k})=>{const S=es[r],w=s==="floating"?16:20,v=m??(s==="floating"?"link":"button"),y=Kr[r],E=i==="light",B=E?f(y.surface,y.border):qr,z=(_,P)=>_?v==="link"?n.createElement("button",{type:"button",onClick:_.onClick,className:$r({emphasis:P})},_.label):n.createElement(D,{size:"sm",variant:P==="primary"?"solid":"outline",onClick:_.onClick,className:s==="full-width"?"w-full sm:w-auto":void 0},_.label):null,T=!!(g||u||c)?n.createElement("div",{className:Yr({layout:s,actionVariant:v})},g??n.createElement(n.Fragment,null,z(c,"secondary"),z(u,"primary"))):null,I=o&&(l||S)?n.createElement("div",{className:f(Zr({layout:s,variant:d,shape:r==="default"?"square":"circle"}),y.iconText,d==="featured"&&(E?y.iconSurfaceOnLight:y.iconSurface))},l??n.createElement(S,{size:w,stroke:2})):null,O=b?n.createElement("button",{type:"button","aria-label":h,onClick:b,className:Rr({layout:s})},n.createElement(Vt,{size:16,stroke:2})):null,j=n.createElement("div",{className:Xr({layout:s,closable:!!b})},n.createElement("p",{className:Qr},t),a&&n.createElement("p",{className:Jr},a));return s==="full-width"?n.createElement("div",{role:"alert",className:f(ke({layout:s}),B,N),...k},n.createElement("div",{className:Ur},n.createElement("div",{className:Se({layout:s})},I,j),(T||O)&&n.createElement("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-2"},T,O))):n.createElement("div",{role:"alert",className:f(ke({layout:s}),B,N),...k},I,n.createElement("div",{className:Se({layout:s})},j,T),O)};Ce.displayName="Alert",C.Alert=Ce,C.Avatar=M,C.AvatarGroup=de,C.AvatarLabelGroup=ue,C.AvatarProfilePhoto=me,C.Badge=le,C.BadgeGroup=ne,C.Button=D,C.CardNumberInput=Wt,C.Checkbox=Y,C.Dropdown=Hr,C.Input=K,C.InputCounter=Mt,C.InputDropdown=Br,C.Loading=ie,C.MultiSelectInput=er,C.PhoneInput=Ot,C.RadioGroup=Me,C.RadioGroupItem=R,C.SaleAmountInput=jt,C.Tab=ge,C.TabList=pe,C.Tag=F,C.Textarea=ve,C.Toggle=ee,C.Tooltip=te,C.WebsiteCopyInput=xr,C.WebsiteInput=cr,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(k,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],i):(k=typeof globalThis<"u"?globalThis:k||self,i(k.CekatUI={},k.React$1,k.reactDom))})(this,(function(k,i,Oe){"use strict";function je(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(s,r,a.get?a:{enumerable:!0,get:()=>t[r]})}}return s.default=t,Object.freeze(s)}const e=je(i);function Z(t){var s,r,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(s=0;s<n;s++)t[s]&&(r=Z(t[s]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}function p(){for(var t,s,r=0,a="",n=arguments.length;r<n;r++)(t=arguments[r])&&(s=Z(t))&&(a&&(a+=" "),a+=s);return a}const Q=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,J=p,f=(t,s)=>r=>{var a;if(s?.variants==null)return J(t,r?.class,r?.className);const{variants:n,defaultVariants:l}=s,c=Object.keys(n).map(d=>{const g=r?.[d],m=l?.[d];if(g===null)return null;const b=Q(g)||Q(m);return n[d][b]}),o=r&&Object.entries(r).reduce((d,g)=>{let[m,b]=g;return b===void 0||(d[m]=b),d},{}),u=s==null||(a=s.compoundVariants)===null||a===void 0?void 0:a.reduce((d,g)=>{let{class:m,className:b,...h}=g;return Object.entries(h).every(N=>{let[S,C]=N;return Array.isArray(C)?C.includes({...l,...o}[S]):{...l,...o}[S]===C})?[...d,m,b]:d},[]);return J(t,c,u,r?.class,r?.className)},Me=f(["inline-flex items-center justify-center font-bold","transition-colors duration-150","focus-visible:outline-none","disabled:cursor-not-allowed"],{variants:{size:{xs:"py-1 px-2 gap-1 rounded-md text-caption-sm",sm:"h-[36px] px-4 gap-1 rounded-lg text-caption-sm",md:"h-[44px] px-4 gap-2 rounded-lg text-sm",lg:"h-[52px] px-5 gap-2 rounded-[10px] text-body-sm",xl:"h-[60px] px-6 gap-2 rounded-[10px] text-body-lg","2xl":"h-[68px] px-6 gap-2 rounded-[10px] text-body-lg"},tone:{primary:"",destructive:""},iconOnly:{true:"!p-0",false:""},variant:{solid:["text-white","disabled:bg-light-100 disabled:text-light-400"],outline:["bg-white border","disabled:bg-white disabled:text-light-400 disabled:border-light-200"],ghost:["bg-transparent","disabled:text-light-400"],"outline-primary":["bg-white border border-primary-500 text-primary-500","hover:bg-primary-100 hover:border-primary-300 hover:text-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-white disabled:text-light-400 disabled:border-light-200"],"ghost-primary":["bg-transparent text-primary-500","hover:bg-primary-50 hover:text-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:text-light-400"],plain:["bg-transparent !rounded-md","disabled:text-light-400 h-auto !px-2"],"plain-black":["bg-transparent !rounded-md","disabled:text-light-400 h-auto !px-2 "]}},compoundVariants:[{tone:"primary",variant:"solid",class:["bg-primary-500","hover:bg-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"outline",class:["border-light-200 text-light-900","hover:bg-light-50","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"ghost",class:["text-light-800","hover:bg-light-50 hover:text-light-900","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"plain",class:["text-primary-500","hover:text-primary-800 hover:bg-transparent","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"].join(" ")},{tone:"primary",variant:"plain-black",class:["text-light-800","hover:text-light-900 hover:bg-transparent","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"].join(" ")},{tone:"destructive",variant:"solid",class:["bg-error-500 text-white","hover:bg-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-light-100"].join(" ")},{tone:"destructive",variant:"outline",class:["border-error-500 text-error-500","hover:border-error-300 hover:bg-error-100 hover:text-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"destructive",variant:"ghost",class:["text-error-500","hover:bg-error-50 hover:text-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-white disabled:text-light-400"].join(" ")},{tone:"destructive",variant:"plain",class:["text-error-500","hover:text-error-800 hover:bg-transparent","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2"].join(" ")},{size:"xs",iconOnly:!0,class:"!w-[26px] !h-[26px]"},{size:"sm",iconOnly:!0,class:"!w-[36px] !h-[36px]"},{size:"md",iconOnly:!0,class:"!w-[44px] !h-[44px]"},{size:"lg",iconOnly:!0,class:"!w-[52px] !h-[52px]"},{size:"xl",iconOnly:!0,class:"!w-[60px] !h-[60px]"},{size:"2xl",iconOnly:!0,class:"!w-[68px] !h-[68px]"}],defaultVariants:{size:"md",tone:"primary",variant:"solid",iconOnly:!1}}),Y=i.forwardRef(({children:t,className:s,tone:r,variant:a,size:n,iconOnly:l,...c},o)=>i.createElement("button",{ref:o,className:p(Me({tone:r,variant:a,size:n,iconOnly:l}),s),...c},t));Y.displayName="Button";const Ae=({children:t})=>i.createElement("span",{className:"flex items-center"},t),We=({children:t})=>i.createElement("span",{className:"whitespace-nowrap"},t),G=Y;G.Icon=Ae,G.Text=We;const Pe=f(["inline-flex items-center justify-center","border transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-4 w-4 rounded-[4px]",md:"h-5 w-5 rounded-[6px]",lg:"h-5 w-5 rounded-[6px]"},checked:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{checked:!1,disabled:!1,className:"bg-white border-light-200 hover:border-light-400"},{checked:!0,disabled:!1,className:"bg-primary-500 border-primary-500 text-white hover:bg-primary-800 hover:border-primary-800"},{disabled:!0,className:"bg-light-100 border-light-200 text-white"}],defaultVariants:{size:"md",checked:!1,disabled:!1}}),De={sm:{width:12,height:9},md:{width:14,height:10},lg:{width:14,height:10}},$=e.forwardRef(({id:t,checked:s,indeterminate:r=!1,disabled:a,size:n="md",onCheckedChange:l,className:c},o)=>{const u=()=>{a||l?.(!s)},d=De[n],g=a?"text-white/80":"text-current";return e.createElement("button",{id:t,ref:o,type:"button",role:"checkbox","aria-checked":r?"mixed":s,disabled:a,onClick:u,className:p(Pe({size:n,checked:s,disabled:a}),c)},s&&!r&&e.createElement("svg",{width:d.width,height:d.height,viewBox:"0 0 14 10",fill:"none",className:g},e.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),r&&e.createElement("span",{className:p(g,"bg-current rounded-sm",n==="sm"&&"h-0.5 w-3",(n==="md"||n==="lg")&&"h-0.5 w-4")}))});$.displayName="Checkbox";const R=e.createContext(null),Ge=({value:t,defaultValue:s,onValueChange:r,children:a,className:n})=>{const[l,c]=e.useState(s),o=t??l,u=d=>{c(d),r?.(d)};return e.createElement(R.Provider,{value:{value:o,onValueChange:u}},e.createElement("div",{role:"radiogroup",className:n},a))},He=()=>{const t=e.useContext(R);if(!t)throw new Error("RadioGroupItem must be used within RadioGroup");return t},Fe=f(["relative inline-flex items-center justify-center","border rounded-full transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-5 w-5"},checked:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{checked:!1,disabled:!1,className:"border-light-200 bg-white hover:border-light-400"},{checked:!0,disabled:!1,className:"border-primary-500 bg-primary-500 hover:bg-primary-800 hover:border-primary-800"},{disabled:!0,className:"border-light-200 bg-light-100"}],defaultVariants:{size:"md",checked:!1,disabled:!1}}),Ke=f(["rounded-full bg-white transition-all"],{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2 w-2"},checked:{true:"scale-100",false:"scale-0"}},defaultVariants:{size:"md",checked:!1}}),ee=e.forwardRef(({id:t,value:s,disabled:r,size:a="md",className:n},l)=>{const{value:c,onValueChange:o}=He(),u=c===s;return e.createElement("button",{ref:l,id:t,type:"button",role:"radio","aria-checked":u,disabled:r,onClick:()=>{r||o?.(s)},className:p(Fe({size:a,checked:u,disabled:r}),n)},e.createElement("span",{className:Ke({size:a,checked:u})}))});ee.displayName="RadioGroupItem";const Xe=f(["inline-flex items-center shrink-0 rounded-full p-[2px]","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-5 w-9",md:"h-6 w-11",lg:"h-6 w-11"},checked:{true:"justify-end",false:"justify-start"},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"},variant:{default:"",success:""}},compoundVariants:[{checked:!1,disabled:!1,className:"bg-light-200"},{checked:!0,disabled:!1,variant:"default",className:"bg-primary-500 hover:bg-primary-800"},{checked:!0,disabled:!1,variant:"success",className:"bg-success-500 hover:bg-success-800"},{disabled:!0,className:"bg-light-100"},{variant:"default",className:"focus-visible:ring-primary-400"},{variant:"success",className:"focus-visible:ring-success-500"}],defaultVariants:{size:"md",checked:!1,disabled:!1,variant:"default"}}),qe=f("rounded-full shrink-0 shadow-[0_1px_3px_0_rgba(16,24,40,0.10),0_1px_2px_0_rgba(16,24,40,0.06)]",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-5 w-5"},disabled:{true:"bg-light-50",false:"bg-white"}},defaultVariants:{size:"md",disabled:!1}}),te=e.forwardRef(({checked:t=!1,size:s="md",variant:r="default",disabled:a,onCheckedChange:n,className:l},c)=>e.createElement("button",{ref:c,type:"button",role:"switch","aria-checked":t,disabled:a,onClick:()=>{a||n?.(!t)},className:p(Xe({size:s,checked:t,disabled:a,variant:r}),l)},e.createElement("span",{className:qe({size:s,disabled:a})})));te.displayName="Toggle";const Ue=f(["relative rounded-lg text-caption-sm font-semibold text-white","bg-primary-900","shadow-lg","pointer-events-none","select-none"],{variants:{side:{top:"",bottom:"",left:"",right:""},hasSupportingText:{true:"p-3",false:"px-3 py-2"}},defaultVariants:{side:"top",hasSupportingText:!1}}),Ze="mt-1 font-medium text-light-100",Qe=f(["absolute"],{variants:{side:{top:["bottom-[-6px] left-1/2 -translate-x-1/2","border-x-8 border-x-transparent border-t-[6px] border-t-primary-900"],bottom:["top-[-6px] left-1/2 -translate-x-1/2","border-x-8 border-x-transparent border-b-[6px] border-b-primary-900"],left:["right-[-6px] top-1/2 -translate-y-1/2","border-y-8 border-y-transparent border-l-[6px] border-l-primary-900"],right:["left-[-6px] top-1/2 -translate-y-1/2","border-y-8 border-y-transparent border-r-[6px] border-r-primary-900"]}},defaultVariants:{side:"top"}}),H=12,re=({content:t,supportingText:s,side:r="top",open:a,defaultOpen:n=!1,disabled:l=!1,delay:c=0,className:o,children:u})=>{const[d,g]=e.useState(n),[m,b]=e.useState(null),h=a??d,N=e.useRef(null),S=e.useRef(null),C=e.useCallback(()=>{const y=N.current;if(!y)return null;const E=y.getBoundingClientRect();switch(r){case"top":return{top:E.top-H,left:E.left+E.width/2};case"bottom":return{top:E.bottom+H,left:E.left+E.width/2};case"left":return{top:E.top+E.height/2,left:E.left-H};default:return{top:E.top+E.height/2,left:E.right+H}}},[r]),w=()=>{if(l||!N.current)return;const y=()=>{b(C()),g(!0)};c>0?S.current=window.setTimeout(y,c):y()};e.useEffect(()=>{if(!h||!N.current)return;const y=()=>b(C());y();const E=new ResizeObserver(y);return E.observe(N.current),window.addEventListener("scroll",y,!0),window.addEventListener("resize",y),()=>{E.disconnect(),window.removeEventListener("scroll",y,!0),window.removeEventListener("resize",y)}},[h,C]);const v=()=>{S.current&&(clearTimeout(S.current),S.current=null),g(!1)};return e.createElement(e.Fragment,null,e.createElement("span",{ref:N,className:"inline-flex",onMouseEnter:w,onMouseLeave:v,onFocus:w,onBlur:v,tabIndex:0},u),h&&m&&Oe.createPortal(e.createElement("div",{role:"tooltip",className:"fixed z-[9999] pointer-events-none",style:{top:m.top,left:m.left,transform:r==="top"?"translate(-50%, -100%)":r==="bottom"?"translate(-50%, 0)":r==="left"?"translate(-100%, -50%)":"translate(0, -50%)"}},e.createElement("div",{className:p(Ue({side:r,hasSupportingText:!!s}),o)},t,s&&e.createElement("p",{className:Ze},s),e.createElement("span",{className:Qe({side:r})}))),document.body))};re.displayName="Tooltip";const Je={brand:{bg:"bg-primary-50",border:"border-primary-300",text:"text-primary-700"},gray:{bg:"bg-white",border:"border-light-200",text:"text-light-800"},error:{bg:"bg-error-50",border:"border-error-200",text:"text-error-700"},warning:{bg:"bg-warning-50",border:"border-warning-200",text:"text-warning-700"},success:{bg:"bg-success-50",border:"border-success-200",text:"text-success-700"},"blue-gray":{bg:"bg-blue-gray-50",border:"border-blue-gray-200",text:"text-blue-gray-700"},"blue-light":{bg:"bg-blue-light-50",border:"border-blue-light-200",text:"text-blue-light-700"},indigo:{bg:"bg-indigo-50",border:"border-indigo-200",text:"text-indigo-700"},purple:{bg:"bg-purple-50",border:"border-purple-200",text:"text-purple-700"},blue:{bg:"bg-blue-50",border:"border-blue-200",text:"text-blue-700"},pink:{bg:"bg-pink-50",border:"border-pink-200",text:"text-pink-700"},orange:{bg:"bg-orange-50",border:"border-orange-200",text:"text-orange-700"}},Ye=f(["inline-flex items-center gap-1 border","font-medium transition-colors duration-150","select-none"],{variants:{size:{sm:"text-caption-sm py-[3px]",md:"text-caption-lg py-[2px]",lg:"text-caption-lg py-1"},shape:{rounded:"rounded-md",pill:"rounded-full"},hasLeading:{true:"",false:""},hasTrailing:{true:"",false:""},interactive:{true:"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",false:""},disabled:{true:"cursor-not-allowed opacity-60",false:""}},compoundVariants:[{size:"sm",hasLeading:!1,className:"pl-2"},{size:"sm",hasLeading:!0,className:"pl-1"},{size:"sm",hasTrailing:!1,className:"pr-2"},{size:"sm",hasTrailing:!0,className:"pr-1"},{size:"md",hasLeading:!1,className:"pl-[9px]"},{size:"md",hasLeading:!0,className:"pl-1"},{size:"md",hasTrailing:!1,className:"pr-[9px]"},{size:"md",hasTrailing:!0,className:"pr-1"},{size:"lg",hasLeading:!1,className:"pl-2.5"},{size:"lg",hasLeading:!0,className:"pl-1.5"},{size:"lg",hasTrailing:!1,className:"pr-2.5"},{size:"lg",hasTrailing:!0,className:"pr-1.5"}],defaultVariants:{size:"sm",shape:"rounded",hasLeading:!1,hasTrailing:!1,interactive:!1,disabled:!1}}),$e=f(["shrink-0 rounded border bg-white transition-colors duration-150 size-3.5"],{variants:{checked:{true:"bg-primary-500 border-primary-500",false:""}},defaultVariants:{checked:!1}}),Re="shrink-0 rounded-[3px] bg-light-100 px-1 text-light-800",et="shrink-0 rounded-[3px] p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",se=/^#([0-9a-f]{6})$/i,ae=t=>se.test(t.trim()),le=(t,s)=>{const r=se.exec(t.trim());if(!r)return;const a=parseInt(r[1],16),n=a>>16&255,l=a>>8&255,c=a&255;return`rgba(${n}, ${l}, ${c}, ${s})`},F=({children:t,size:s="sm",shape:r="rounded",icon:a,checked:n,onCheckedChange:l,onClose:c,count:o,disabled:u=!1,className:d,color:g="gray",customColor:m})=>{const b=l!==void 0,h=n!==void 0||!!a,N=!!c||o!==void 0,S=Je[g],C=!!(m&&ae(m)),w=C?{borderColor:m,backgroundColor:le(m,.12),color:m}:void 0,v=()=>{u||l?.(!n)},y=E=>{!b||u||(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),v())};return e.createElement("div",{role:b?"checkbox":void 0,"aria-checked":b?!!n:void 0,"aria-disabled":u||void 0,tabIndex:b&&!u?0:void 0,onClick:b?v:void 0,onKeyDown:y,style:w,className:p(Ye({size:s,shape:r,hasLeading:h,hasTrailing:N,interactive:b,disabled:u}),!C&&S.bg,!C&&S.border,!C&&S.text,d)},n!==void 0&&e.createElement("span",{className:p($e({checked:n}),!n&&!C&&S.border),style:!n&&C?{borderColor:m}:void 0},n&&e.createElement("svg",{viewBox:"0 0 14 10",fill:"none",className:"size-full text-white"},e.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),a,e.createElement("span",{className:"whitespace-nowrap"},t),o!==void 0&&e.createElement("span",{className:Re},o),c&&e.createElement("button",{type:"button","aria-label":"Remove",disabled:u,onClick:E=>{E.stopPropagation(),c()},className:et},e.createElement("svg",{viewBox:"0 0 10 10",fill:"none",className:"size-2.5"},e.createElement("path",{d:"M1 1L9 9M9 1L1 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))};F.displayName="Tag";const tt={brand:{solidBg:"bg-primary-50",solidBorder:"border-primary-300",solidText:"text-primary-500",outlineBorder:"border-primary-500",outlineText:"text-primary-700"},gray:{solidBg:"bg-light-50",solidBorder:"border-light-200",solidText:"text-light-700",outlineBorder:"border-light-600",outlineText:"text-light-700"},error:{solidBg:"bg-error-50",solidBorder:"border-error-200",solidText:"text-error-700",outlineBorder:"border-error-600",outlineText:"text-error-700"},warning:{solidBg:"bg-warning-50",solidBorder:"border-warning-200",solidText:"text-warning-700",outlineBorder:"border-warning-600",outlineText:"text-warning-700"},success:{solidBg:"bg-success-50",solidBorder:"border-success-200",solidText:"text-success-700",outlineBorder:"border-success-600",outlineText:"text-success-700"},"blue-gray":{solidBg:"bg-blue-gray-50",solidBorder:"border-blue-gray-200",solidText:"text-blue-gray-700",outlineBorder:"border-blue-gray-600",outlineText:"text-blue-gray-700"},"blue-light":{solidBg:"bg-blue-light-50",solidBorder:"border-blue-light-200",solidText:"text-blue-light-700",outlineBorder:"border-blue-light-600",outlineText:"text-blue-light-700"},indigo:{solidBg:"bg-indigo-50",solidBorder:"border-indigo-200",solidText:"text-indigo-700",outlineBorder:"border-indigo-600",outlineText:"text-indigo-700"},purple:{solidBg:"bg-purple-50",solidBorder:"border-purple-200",solidText:"text-purple-700",outlineBorder:"border-purple-600",outlineText:"text-purple-700"},blue:{solidBg:"bg-blue-50",solidBorder:"border-blue-200",solidText:"text-blue-700",outlineBorder:"border-blue-600",outlineText:"text-blue-700"},pink:{solidBg:"bg-pink-50",solidBorder:"border-pink-200",solidText:"text-pink-700",outlineBorder:"border-pink-600",outlineText:"text-pink-700"},orange:{solidBg:"bg-orange-50",solidBorder:"border-orange-200",solidText:"text-orange-700",outlineBorder:"border-orange-600",outlineText:"text-orange-700"}},rt=f(["inline-flex items-center gap-1 border font-medium","transition-colors duration-150"],{variants:{size:{sm:"text-caption-sm py-0.5",md:"text-caption-lg py-0.5",lg:"text-caption-lg py-1"},shape:{pill:"rounded-full",badge:""},modern:{true:"rounded-md shadow-xs",false:""},hasLeading:{true:"",false:""},hasTrailing:{true:"",false:""},iconOnly:{true:"p-[5px]",false:""},interactive:{true:"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",false:""},disabled:{true:"cursor-not-allowed opacity-60",false:""}},compoundVariants:[{shape:"badge",size:"sm",modern:!1,className:"rounded-md"},{shape:"badge",size:"md",modern:!1,className:"rounded-md"},{shape:"badge",size:"lg",modern:!1,className:"rounded-lg"},{size:"sm",shape:"pill",iconOnly:!1,hasLeading:!1,className:"pl-2"},{size:"sm",shape:"badge",iconOnly:!1,hasLeading:!1,className:"pl-1.5"},{size:"sm",iconOnly:!1,hasLeading:!0,className:"pl-1"},{size:"sm",iconOnly:!1,hasTrailing:!1,className:"pr-2"},{size:"sm",iconOnly:!1,hasTrailing:!0,className:"pr-1"},{size:"md",iconOnly:!1,hasLeading:!1,className:"pl-2.5"},{size:"md",iconOnly:!1,hasLeading:!0,className:"pl-1"},{size:"md",iconOnly:!1,hasTrailing:!1,className:"pr-2.5"},{size:"md",iconOnly:!1,hasTrailing:!0,className:"pr-1"},{size:"lg",shape:"pill",iconOnly:!1,hasLeading:!1,className:"pl-3"},{size:"lg",shape:"badge",iconOnly:!1,hasLeading:!1,className:"pl-2.5"},{size:"lg",iconOnly:!1,hasLeading:!0,className:"pl-1.5"},{size:"lg",shape:"pill",iconOnly:!1,hasTrailing:!1,className:"pr-3"},{size:"lg",shape:"badge",iconOnly:!1,hasTrailing:!1,className:"pr-2.5"},{size:"lg",iconOnly:!1,hasTrailing:!0,className:"pr-1.5"}],defaultVariants:{size:"sm",shape:"pill",modern:!1,hasLeading:!1,hasTrailing:!1,iconOnly:!1,interactive:!1,disabled:!1}}),st="size-4 shrink-0 rounded border bg-white",at="shrink-0 rounded p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",ne=({children:t,size:s="sm",shape:r="pill",variant:a="solid",color:n="brand",customColor:l,modern:c=!1,icon:o,trailingIcon:u,checked:d,onCheckedChange:g,onClose:m,iconOnly:b=!1,disabled:h=!1,className:N})=>{const S=g!==void 0,C=d!==void 0||!!o,w=!!m||!!u,v=tt[n],y=!!(l&&ae(l)),E=y?{borderColor:l,color:l,backgroundColor:a==="outline"?"transparent":le(l,.1)}:void 0,L=()=>{h||g?.(!d)},z=T=>{!S||h||(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),L())};return e.createElement("div",{role:S?"checkbox":void 0,"aria-checked":S?!!d:void 0,"aria-disabled":h||void 0,tabIndex:S&&!h?0:void 0,onClick:S?L:void 0,onKeyDown:z,style:E,className:p(rt({size:s,shape:r,modern:c,hasLeading:C,hasTrailing:w,iconOnly:b,interactive:S,disabled:h}),!y&&(a==="outline"?p("bg-transparent",v.outlineBorder,v.outlineText):p(v.solidBg,v.solidBorder,v.solidText)),N)},d!==void 0&&e.createElement("span",{className:p(st,d?"bg-primary-500 border-primary-500":!y&&v.solidBorder),style:!d&&y?{borderColor:l}:void 0},d&&e.createElement("svg",{viewBox:"0 0 14 10",fill:"none",className:"size-full text-white"},e.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),o,!b&&e.createElement("span",{className:"whitespace-nowrap"},t),u,m&&e.createElement("button",{type:"button","aria-label":"Remove",disabled:h,onClick:T=>{T.stopPropagation(),m()},className:at},e.createElement("svg",{viewBox:"0 0 10 10",fill:"none",className:"size-2.5"},e.createElement("path",{d:"M1 1L9 9M9 1L1 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))};ne.displayName="Badge";const lt={brand:{bg50:"bg-primary-50",hoverBg100:"hover:bg-primary-100",border200:"border-primary-200",border500:"border-primary-500",text500:"text-primary-500"},gray:{bg50:"bg-light-50",hoverBg100:"hover:bg-light-100",border200:"border-light-200",border500:"border-light-500",text500:"text-light-500"},error:{bg50:"bg-error-50",hoverBg100:"hover:bg-error-100",border200:"border-error-200",border500:"border-error-500",text500:"text-error-500"},warning:{bg50:"bg-warning-50",hoverBg100:"hover:bg-warning-100",border200:"border-warning-200",border500:"border-warning-500",text500:"text-warning-500"},success:{bg50:"bg-success-50",hoverBg100:"hover:bg-success-100",border200:"border-success-200",border500:"border-success-500",text500:"text-success-500"}},nt={md:{outerPad:{leading:"pl-1 pr-2.5 py-1",trailing:"pl-3 pr-1 py-1"},gap:"gap-2",chipPad:"px-2 py-0.5",text:"text-caption-lg"},lg:{outerPad:{leading:"pl-1.5 pr-3 py-1.5",trailing:"pl-3 pr-1.5 py-1.5"},gap:"gap-2",chipPad:"px-2.5 py-[3px]",text:"text-body-sm"}},ie=({badgeLabel:t,children:s,size:r="md",theme:a="light",color:n="brand",badgePosition:l="leading",icon:c,onClick:o,className:u})=>{const d=lt[n],g=nt[r],m=a==="modern",b=a==="outline",h=p("inline-flex items-center border transition-colors duration-150",g.gap,g.outerPad[l],m?"rounded-lg bg-light-50 border-light-200 shadow-xs":b?p("rounded-full bg-white border-[1.5px]",d.border500):p("rounded-full",d.bg50,d.border200,d.hoverBg100),o&&"cursor-pointer",u),N=p("inline-flex shrink-0 items-center gap-1 border font-medium whitespace-nowrap",g.chipPad,g.text,m?"rounded-md bg-white border-light-200 text-light-800":b?p("rounded-full bg-white border-[1.5px]",d.border500,d.text500):p("rounded-full bg-white",d.border200,d.text500)),S=p("inline-flex items-center gap-1 font-medium",g.text,m?"text-light-800":d.text500),C=e.createElement("span",{className:N},m&&e.createElement("span",{className:"size-2 shrink-0 rounded-full bg-light-400"}),t);return e.createElement("div",{role:o?"button":void 0,tabIndex:o?0:void 0,onClick:o,className:h},l==="leading"&&C,e.createElement("span",{className:S},s,c),l==="trailing"&&C)};ie.displayName="BadgeGroup";const it=({size:t})=>{const s=t*.09,r=(t-s)/2,a=2*Math.PI*r;return e.createElement("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",className:"animate-spin"},e.createElement("circle",{cx:t/2,cy:t/2,r,strokeWidth:s,className:"stroke-light-100"}),e.createElement("circle",{cx:t/2,cy:t/2,r,strokeWidth:s,strokeLinecap:"round",strokeDasharray:`${a*.25} ${a}`,className:"stroke-primary-600"}))},ot=({size:t})=>{const s=e.useId(),r=t*.125,a=(t-r)/2,n=2*Math.PI*a;return e.createElement("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",className:"animate-spin text-primary-600"},e.createElement("defs",null,e.createElement("linearGradient",{id:s,x1:"100%",y1:"0%",x2:"0%",y2:"100%"},e.createElement("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"1"}),e.createElement("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"}))),e.createElement("circle",{cx:t/2,cy:t/2,r:a,strokeWidth:r,className:"stroke-light-100"}),e.createElement("circle",{cx:t/2,cy:t/2,r:a,strokeWidth:r,strokeLinecap:"round",stroke:`url(#${s})`,strokeDasharray:`${n*.75} ${n}`}))},ct=({size:t})=>{const r=Math.max(t*.1,3),a=(t-r)/2;return e.createElement("div",{className:"relative animate-spin",style:{width:t,height:t}},Array.from({length:12}).map((n,l)=>{const c=30*l,o=.15+.85*l/11;return e.createElement("span",{key:l,className:"absolute rounded-full bg-primary-600 top-1/2 left-1/2",style:{width:r,height:r,opacity:o,marginTop:-r/2,marginLeft:-r/2,transform:`rotate(${c}deg) translate(${a}px) rotate(${-c}deg)`}})}))},dt={sm:{box:32,gapClass:"gap-4",textClass:"text-caption-lg"},md:{box:48,gapClass:"gap-4",textClass:"text-caption-lg"},lg:{box:56,gapClass:"gap-4",textClass:"text-body-lg"},xl:{box:64,gapClass:"gap-5",textClass:"text-body-lg"}},oe=({size:t="sm",style:s="line-simple",supportingText:r=!0,label:a="Loading...",className:n})=>{const{box:l,gapClass:c,textClass:o}=dt[t];return e.createElement("div",{role:"status","aria-label":typeof a=="string"?a:"Loading",className:p("inline-flex flex-col items-center",c,n)},s==="line-simple"&&e.createElement(it,{size:l}),s==="line-spinner"&&e.createElement(ot,{size:l}),s==="dot-circle"&&e.createElement(ct,{size:l}),r&&e.createElement("p",{className:p("font-medium text-light-700 whitespace-nowrap",o)},a))};oe.displayName="Loading";const ce=({className:t,style:s})=>e.createElement("svg",{viewBox:"0 0 24 24",fill:"none",className:t,style:s},e.createElement("path",{d:"M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z",stroke:"currentColor",strokeWidth:"1.75"}),e.createElement("path",{d:"M3.75 20.25a8.25 8.25 0 0 1 16.5 0",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})),de=({className:t})=>e.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},e.createElement("circle",{cx:"10",cy:"10",r:"9",className:"fill-primary-500 stroke-white",strokeWidth:"1.5"}),e.createElement("path",{d:"M6 10.2 8.6 12.8 14 7",stroke:"white",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})),ut={xs:{box:24,borderWidth:"0.5px",statusSize:6,badgeSize:10,textClass:"text-caption-sm"},sm:{box:32,borderWidth:"0.5px",statusSize:8,badgeSize:12,textClass:"text-caption-lg"},md:{box:40,borderWidth:"0.75px",statusSize:10,badgeSize:14,textClass:"text-body-sm"},lg:{box:48,borderWidth:"0.75px",statusSize:12,badgeSize:16,textClass:"text-body-lg"},xl:{box:56,borderWidth:"0.75px",statusSize:14,badgeSize:18,textClass:"text-h6"},"2xl":{box:64,borderWidth:"0.75px",statusSize:16,badgeSize:20,textClass:"text-h5 leading-7"}},mt="#17B26A",A=({src:t,alt:s,initials:r,size:a="md",status:n="none",statusIcon:l,contrastBorder:c=!0,className:o})=>{const{box:u,borderWidth:d,statusSize:g,badgeSize:m,textClass:b}=ut[a],h=t?"image":r!==void 0?"initials":"placeholder";return e.createElement("div",{className:p("relative inline-block shrink-0 rounded-full",o),style:{width:u,height:u}},h==="image"&&e.createElement("img",{src:t,alt:s??"",className:"absolute inset-0 size-full rounded-full object-cover"}),h==="placeholder"&&e.createElement("div",{className:"absolute inset-0 flex items-center justify-center rounded-full bg-light-50"},e.createElement(ce,{className:"text-light-300",style:{width:u*.55,height:u*.55}})),h==="initials"&&e.createElement("div",{className:p("absolute inset-0 flex items-center justify-center rounded-full bg-light-50 font-semibold text-light-500",b)},r),c&&e.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:d,borderStyle:"solid"}}),n==="online"&&e.createElement("span",{className:"absolute bottom-0 right-0 rounded-full border-[1.5px] border-white",style:{width:g,height:g,backgroundColor:mt}}),n==="company"&&e.createElement("div",{className:"absolute bottom-0 right-0 flex items-center justify-center overflow-hidden rounded-full border-[1.5px] border-white bg-white",style:{width:m,height:m}},l),n==="verified"&&e.createElement("div",{className:"absolute bottom-0 right-0",style:{width:m,height:m}},e.createElement(de,{className:"size-full"})))};A.displayName="Avatar";const gt={xs:{box:24,overlap:-4,contrastBorderWidth:"0.5px",plusIconSize:16,textClass:"text-caption-sm"},sm:{box:32,overlap:-8,contrastBorderWidth:"0.5px",plusIconSize:16,textClass:"text-caption-lg"},md:{box:40,overlap:-12,contrastBorderWidth:"0.75px",plusIconSize:20,textClass:"text-body-sm"}},ue=({avatars:t,max:s,size:r="xs",onAdd:a,className:n})=>{const{box:l,overlap:c,contrastBorderWidth:o,textClass:u}=gt[r],d=s?t.slice(0,s):t,g=s&&t.length>s?t.length-s:0;return e.createElement("div",{className:p("inline-flex items-start gap-2",n)},e.createElement("div",{className:"flex items-start"},d.map((m,b)=>e.createElement("div",{key:b,className:"relative shrink-0 overflow-hidden rounded-full border-[1.5px] border-white",style:{width:l,height:l,marginRight:c}},m.src?e.createElement("img",{src:m.src,alt:m.alt??"",className:"size-full object-cover"}):e.createElement("div",{className:"flex size-full items-center justify-center bg-light-50 font-semibold text-light-500"},m.initials),e.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:o,borderStyle:"solid"}}))),g>0&&e.createElement("div",{className:"relative flex shrink-0 items-center justify-center rounded-full border-2 border-white bg-light-100",style:{width:l,height:l}},e.createElement("span",{className:p("font-semibold text-light-600",u)},"+",g))),a&&e.createElement("button",{type:"button",onClick:a,"aria-label":"Add",className:"flex shrink-0 items-center justify-center rounded-full border border-dashed border-light-300 bg-white text-light-500 hover:bg-light-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2",style:{width:l,height:l}},e.createElement("svg",{width:l*.4,height:l*.4,viewBox:"0 0 20 20",fill:"none"},e.createElement("path",{d:"M10 4v12M4 10h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}))))};ue.displayName="AvatarGroup";const pt={xs:{nameClass:"text-caption-sm",subtitleClass:"text-caption-sm"},sm:{nameClass:"text-caption-lg",subtitleClass:"text-caption-sm"},md:{nameClass:"text-caption-lg",subtitleClass:"text-caption-lg"},lg:{nameClass:"text-body-sm",subtitleClass:"text-body-sm"},xl:{nameClass:"text-body-lg",subtitleClass:"text-body-sm"}},me=({name:t,subtitle:s,src:r,initials:a,size:n="xs",status:l="none",statusIcon:c,className:o})=>{const{nameClass:u,subtitleClass:d}=pt[n];return e.createElement("div",{className:p("inline-flex items-center gap-2",o)},e.createElement(A,{src:r,initials:a,size:n,status:l,statusIcon:c}),e.createElement("div",{className:"flex flex-col items-start whitespace-nowrap"},e.createElement("span",{className:p("font-bold text-light-800",u)},t),s&&e.createElement("span",{className:p("font-normal text-light-700",d)},s)))};me.displayName="AvatarLabelGroup";const ft={sm:{box:72,ringWidth:3,shadowClass:"shadow-md",iconSize:36,textClass:"text-h4",verifiedSize:20,verifiedOffset:0},md:{box:96,ringWidth:4,shadowClass:"shadow-lg",iconSize:48,textClass:"text-h3",verifiedSize:24,verifiedOffset:0},lg:{box:160,ringWidth:4,shadowClass:"shadow-lg",iconSize:80,textClass:"text-h1",verifiedSize:32,verifiedOffset:4}},ge=({src:t,alt:s,initials:r,size:a="sm",verified:n=!0,contrastBorder:l=!0,className:c})=>{const{box:o,ringWidth:u,shadowClass:d,iconSize:g,textClass:m,verifiedSize:b,verifiedOffset:h}=ft[a],N=t?"image":r!==void 0?"initials":"placeholder";return e.createElement("div",{className:p("relative rounded-full",c),style:{width:o,height:o}},e.createElement("div",{className:p("absolute inset-0 overflow-hidden rounded-full border-white",d,N!=="image"&&"bg-light-100"),style:{borderWidth:u,borderStyle:"solid"}},N==="image"&&e.createElement("img",{src:t,alt:s??"",className:"absolute inset-0 size-full rounded-full object-cover"}),l&&e.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border border-black/[0.08]"}),N==="placeholder"&&e.createElement("div",{className:"absolute inset-0 flex items-center justify-center"},e.createElement(ce,{className:"text-light-300",style:{width:g,height:g}})),N==="initials"&&e.createElement("div",{className:p("absolute inset-0 flex items-center justify-center font-semibold text-light-500",m)},r)),n&&e.createElement("div",{className:"absolute",style:{width:b,height:b,bottom:h,right:h}},e.createElement(de,{className:"size-full"})))};ge.displayName="AvatarProfilePhoto";const bt={"button-gray":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},"button-white":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},"button-primary":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},underline:{sm:"h-8 px-1 pb-3 text-sm gap-2",md:"h-9 px-1 pb-3 text-base gap-2"},"underline-filled":{sm:"h-11 p-3 text-sm gap-2",md:"h-12 p-3 text-base gap-2"},line:{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3.5 py-2.5 text-base gap-2"}},ht={"button-gray":"rounded-md","button-white":"rounded-md","button-primary":"rounded-md",underline:"rounded-none","underline-filled":"rounded-none",line:"rounded-none"},xt={"button-gray":{active:"bg-light-50 text-light-700",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-light-50 hover:text-light-700",hasFocusRing:!0},"button-white":{active:"bg-white text-light-700 shadow-sm",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-white hover:text-light-700 hover:shadow-sm",hasFocusRing:!0},"button-primary":{active:"bg-primary-50 text-primary-700",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-primary-50 hover:text-primary-700",hasFocusRing:!0},underline:{active:"border-b-2 border-primary-500 text-primary-700",inactive:"border-b-2 border-transparent text-light-500",hoverInactive:"hover:border-primary-500 hover:text-primary-700",hasFocusRing:!1},"underline-filled":{active:"bg-primary-50 border-b-2 border-primary-500 text-primary-700",inactive:"bg-transparent border-b-2 border-transparent text-light-500",hoverInactive:"hover:bg-primary-50 hover:border-primary-500 hover:text-primary-700",hasFocusRing:!1},line:{active:"bg-transparent border-l-2 border-primary-500 text-primary-700",inactive:"bg-transparent border-l-2 border-transparent text-light-500",hoverInactive:"hover:border-primary-500 hover:text-primary-700",hasFocusRing:!0}},vt="inline-flex items-center justify-center rounded-full border border-light-200 bg-light-50 px-2 py-0.5 text-caption-sm font-medium text-light-700",yt={"button-gray":{gapClass:"gap-1",hasHairline:!1},"button-white":{gapClass:"gap-1",hasHairline:!1},"button-primary":{gapClass:"gap-1",hasHairline:!1},underline:{gapClass:"gap-3",hasHairline:!0},"underline-filled":{gapClass:"gap-3",hasHairline:!0},line:{gapClass:"gap-1",hasHairline:!1}},pe=({children:t,variant:s="button-primary",size:r="sm",active:a=!1,fullWidth:n=!1,count:l,disabled:c=!1,onClick:o,className:u})=>{const d=xt[s];return e.createElement("button",{type:"button",role:"tab","aria-selected":a,disabled:c,onClick:o,className:p("inline-flex items-center justify-center font-semibold transition-colors duration-150",bt[s][r],ht[s],a?d.active:d.inactive,!a&&!c&&d.hoverInactive,d.hasFocusRing&&"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",n&&"w-full",c?"cursor-not-allowed opacity-60":"cursor-pointer",u)},e.createElement("span",{className:"whitespace-nowrap"},t),l!==void 0&&e.createElement("span",{className:vt},l))};pe.displayName="Tab";const fe=({children:t,variant:s="button-primary",orientation:r="horizontal",boxed:a=!1,className:n})=>{const{gapClass:l,hasHairline:c}=yt[s];return e.createElement("div",{role:"tablist","aria-orientation":r,className:p("inline-flex",r==="vertical"?"flex-col items-stretch":"flex-row items-center",l,a&&"rounded-lg border border-light-200 bg-light-50 p-1",c&&r==="horizontal"&&!a&&"border-b border-light-200",n)},t)};fe.displayName="TabList";const be=9,j=1,wt=30;function he(t){const s=be,r=j-t,a=r?`calc(100% - ${r}px)`:"100%",n=`calc(100% - ${s+1}px)`,l=`calc(100% - ${s}px)`;return`shape(${[`from ${-t}px 100%`,...r?[`vline to ${a}`]:[],`curve to ${s}px ${n} with ${s}px ${a}`,`vline to ${s-t}px`,`curve to ${2*s-t}px 0 with ${s}px 0`,`hline to calc(100% - ${2*s-t}px)`,`curve to ${l} ${s-t}px with ${l} 0`,`vline to ${n}`,`curve to ${t?`calc(100% + ${t}px)`:"100%"} ${a} with ${l} ${a}`,...r?["vline to 100%"]:[]].join(", ")})`}const Et=he(0),Nt=he(j),kt={default:{box:"h-12 shrink-0",padX:wt},"max-width":{box:"h-9 min-w-px flex-1",padX:be}},St={clipPath:Et,paddingInline:`${j}px`},Ct={paddingInline:`${j}px`},xe=e.forwardRef(({active:t=!1,type:s="default",disabled:r=!1,iconLeft:a,trailing:n,tooltip:l,children:c,className:o,style:u,...d},g)=>{const m=!r&&!t,{box:b,padX:h}=kt[s],N=t?{clipPath:Nt,paddingInline:`${h-j}px`}:{paddingInline:`${h-j}px`};return e.createElement("button",{ref:g,title:l,...d,type:"button",role:"tab","aria-selected":t,disabled:r,className:p("group relative flex rounded-t-lg pt-px transition-colors duration-150 focus-visible:outline-none",b,r&&"cursor-not-allowed opacity-60",m&&"cursor-pointer",t&&"-mb-px cursor-default bg-light-200 focus-visible:bg-primary-400",o),style:{...t?St:Ct,...u}},e.createElement("span",{className:p("flex h-full w-full items-center justify-center gap-1 whitespace-nowrap rounded-t-lg text-caption-sm",t?"bg-white font-bold text-light-800":"font-medium leading-4 text-light-600",m&&"group-hover:bg-light-100 group-hover:text-light-800",m&&"group-focus-visible:rounded-b-lg group-focus-visible:ring-2 group-focus-visible:ring-primary-400 group-focus-visible:ring-offset-2"),style:N},a&&e.createElement("span",{className:"shrink-0"},a),e.createElement("span",{className:"overflow-hidden text-ellipsis"},c),n))});xe.displayName="TabBrowser";const ve=({children:t,separators:s=!1,trailingSlot:r,className:a})=>{const n=e.Children.toArray(t);return e.createElement("div",{className:p("flex items-end",a)},e.createElement("div",{role:"tablist",className:"flex min-w-0 flex-1 items-end"},n.map((l,c)=>e.createElement(e.Fragment,{key:c},l,s&&c<n.length-1&&e.createElement("span",{"aria-hidden":!0,className:"mb-3 h-5 w-px shrink-0 self-end bg-light-200"})))),r)};ve.displayName="TabBrowserBar";const zt=f("flex flex-col gap-1 w-full",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-sm"}},defaultVariants:{size:"md"}}),Tt=f("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),Bt=f(["flex items-center w-full border","bg-white transition-[border-color,border-width]"],{variants:{size:{xs:"h-7 px-2 gap-1 rounded text-caption-sm",sm:"h-9 px-3 gap-2 rounded-lg",md:"h-11 px-3 gap-2 rounded-lg"},error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100 text-light-400 cursor-not-allowed",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),Lt=f(["flex-1 bg-transparent outline-none text-light-900","placeholder:text-light-500","disabled:text-light-400 disabled:cursor-not-allowed"],{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},error:{true:"",false:"text-light-900"}},defaultVariants:{size:"md",error:!1}}),It=f("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}}}),_t=f("flex items-stretch w-full bg-white border overflow-hidden transition-[border-color,border-width]",{variants:{size:{xs:"rounded",sm:"rounded-lg",md:"rounded-lg"},error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),Vt=f("flex flex-1 items-center min-w-0",{variants:{size:{xs:"gap-1 px-2 py-1",sm:"gap-2 px-3 py-2",md:"gap-2 px-3 py-2"},disabled:{true:"text-light-400 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),Ot=f("flex items-center text-light-700 whitespace-nowrap border-r border-light-200",{variants:{size:{xs:"px-2 text-caption-sm",sm:"px-3 text-caption-lg",md:"px-3 text-body-sm"}},defaultVariants:{size:"md"}}),ye=f(["flex items-center gap-1 shrink-0 bg-transparent p-0 text-light-800 cursor-pointer","hover:bg-transparent hover:text-light-900","disabled:cursor-not-allowed disabled:text-light-400"],{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"}},defaultVariants:{size:"md"}}),jt=f("flex shrink-0 items-center justify-center gap-1 w-[92px] border-l border-light-200 bg-white font-semibold text-light-800 hover:bg-light-50 disabled:cursor-not-allowed disabled:text-light-400",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"}},defaultVariants:{size:"md"}}),we=({className:t})=>i.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},i.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Mt={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},At=({size:t,error:s,disabled:r})=>p("flex items-center w-full gap-2 rounded-lg border bg-white px-2 transition-[border-color,border-width]",Mt[t],s?"border-error-200 focus-within:border-2 focus-within:border-error-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",r&&"bg-light-100 text-light-400 cursor-not-allowed"),Wt=({error:t})=>p("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),Pt="flex flex-col w-full max-w-[320px]",W=i.forwardRef(function({label:s,required:r,hint:a,rightIcon:n,size:l="md",error:c=!1,disabled:o=!1,compact:u=!1,hideCalendarIcon:d=!1,type:g,prefix:m,suffix:b,leadingAddon:h,leadingDropdown:N,trailingDropdown:S,trailingButton:C,maxLength:w,value:v,className:y,wrapperClassName:E,...L},z){const T=!!(h||C),B=i.createElement(i.Fragment,null,N&&i.createElement("button",{type:"button",onClick:N.onClick,disabled:N.disabled||o,className:ye({size:l})},i.createElement("span",null,N.value),i.createElement(we,{className:"size-5 text-light-500"})),m&&i.createElement("div",{className:"flex items-center"},m),i.createElement("input",{...L,ref:z,type:g,disabled:o,maxLength:w,value:v,className:p(Lt({size:l,error:c}),"h-full",d&&"[&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-clear-button]:hidden",g==="date"&&"[&::-webkit-datetime-edit]:p-0 [&::-webkit-datetime-edit-fields-wrapper]:p-0",y)}),(n||b)&&i.createElement("div",{className:"flex h-full items-center gap-2"},n&&i.createElement("div",{className:"flex h-full items-center pb-0.5 text-light-400 hover:text-light-600"},n),b&&i.createElement("div",{className:"flex h-full items-center gap-1 leading-none text-light-700"},b)),S&&i.createElement("button",{type:"button",onClick:S.onClick,disabled:S.disabled||o,className:ye({size:l})},i.createElement("span",null,S.value),i.createElement(we,{className:"size-5 text-light-500"})));return i.createElement("div",{className:p(u?Pt:zt({size:l}),E)},s&&i.createElement("label",{className:u?Wt({error:c}):Tt({error:c})},s,r&&i.createElement("span",{className:"text-error-400"},"*")),T?i.createElement("div",{className:_t({size:l,error:c,disabled:o})},h&&i.createElement("div",{className:Ot({size:l})},h),i.createElement("div",{className:Vt({size:l,disabled:o})},B),C&&i.createElement("button",{type:"button",onClick:C.onClick,disabled:C.disabled||o,className:jt({size:l})},C.icon,i.createElement("span",null,C.label))):i.createElement("div",{className:u?At({size:l,error:c,disabled:o}):Bt({size:l,error:c,disabled:o})},B),w&&typeof v=="string"&&i.createElement("div",{className:"text-right text-xs text-light-400"},v.length,"/",w),a&&i.createElement("p",{className:It({error:c})},a))});function Dt({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}function Gt({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}var Ht={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const P=(t,s,r,a)=>{const n=i.forwardRef(({color:l="currentColor",size:c=24,stroke:o=2,title:u,className:d,children:g,...m},b)=>i.createElement("svg",{ref:b,...Ht[t],width:c,height:c,className:["tabler-icon",`tabler-icon-${s}`,d].join(" "),strokeWidth:o,stroke:l,...m},[u&&i.createElement("title",{key:"svg-title"},u),...a.map(([h,N])=>i.createElement(h,N)),...Array.isArray(g)?g:[g]]));return n.displayName=`${r}`,n};const Ee=P("outline","alert-circle","AlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]);const Ne=P("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);const Ft=P("outline","circle-check","CircleCheck",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]);const K=P("outline","info-circle","InfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);const Kt=P("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function Xt({size:t="md",label:s,required:r,hint:a,error:n,disabled:l,placeholder:c="+1 (555) 000-0000",rightIcon:o,value:u,onChange:d,className:g,wrapperClassName:m}){return i.createElement(W,{size:t,label:s,required:r,hint:a,error:n,disabled:l,placeholder:c,rightIcon:o,value:u,onChange:d,className:g,wrapperClassName:m,prefix:i.createElement("div",{className:"flex items-center gap-1 pr-2 text-sm text-light-700"},i.createElement("span",null,"US"),i.createElement(Ne,{size:14}))})}function qt({size:t="md",label:s,required:r,hint:a,error:n,disabled:l,value:c,placeholder:o="1,000.00",currency:u="USD",onCurrencyChange:d,rightIcon:g,onChange:m,className:b,wrapperClassName:h}){return i.createElement(W,{size:t,label:s,required:r,hint:a,error:n,disabled:l,value:c,placeholder:o,rightIcon:g,onChange:m,className:b,wrapperClassName:h,prefix:i.createElement("span",{className:"select-none text-sm text-light-700"},"$"),suffix:i.createElement("button",{type:"button",disabled:l,onClick:d,className:"flex items-center gap-1 text-sm text-light-700 hover:text-light-900 disabled:cursor-not-allowed"},u,i.createElement(Ne,{size:14}))})}function Ut({size:t="md",label:s,required:r,hint:a,disabled:n,error:l,className:c,wrapperClassName:o,value:u,maxLength:d,placeholder:g,onChange:m}){const b=u.length>d,h=l||b;return i.createElement(W,{size:t,label:s,required:r,disabled:n,error:h,value:u,placeholder:g,onChange:m,className:c,wrapperClassName:o,hint:a,suffix:i.createElement("span",{className:p("text-caption-lg",b?"text-error-600":"text-light-400")},u.length,"/",d)})}function Zt({size:t="md",label:s="Card number",required:r,hint:a,error:n,disabled:l,placeholder:c="Card number",value:o,onChange:u,rightIcon:d,prefix:g,className:m,wrapperClassName:b}){return i.createElement(W,{size:t,label:s,required:r,hint:a,error:n,disabled:l,placeholder:c,value:o,onChange:u,rightIcon:d,className:m,wrapperClassName:b,prefix:g??i.createElement("img",{src:"/stories/assets/mastercard.png",alt:"mastercard",className:"h-4 w-6 object-contain"}),inputMode:"numeric",autoComplete:"cc-number"})}const X=W;X.Prefix=Dt,X.Suffix=Gt;const Qt="flex flex-col gap-1 w-full",Jt=f("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),Yt=f(["flex w-full gap-2 border rounded-lg p-3 bg-white","transition-[border-color,border-width]"],{variants:{error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100 cursor-not-allowed",false:""}},defaultVariants:{error:!1,disabled:!1}}),$t=f(["flex-1 min-h-[132px] bg-transparent outline-none text-caption-lg text-light-900","placeholder:text-light-500","disabled:text-light-400 disabled:cursor-not-allowed disabled:resize-none"],{variants:{resizable:{true:"resize-y",false:"resize-none"}},defaultVariants:{resizable:!0}}),Rt=f("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}},defaultVariants:{error:!1}}),er=({error:t,disabled:s})=>p("flex w-full gap-2 rounded-lg border bg-white p-2 transition-[border-color,border-width]",t?"border-error-200 focus-within:border-2 focus-within:border-error-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",s&&"bg-light-100 cursor-not-allowed"),tr=({error:t})=>p("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),rr=t=>p("flex-1 min-h-[64px] bg-transparent outline-none text-sm text-light-900","placeholder:text-light-500",t?"resize-y":"resize-none"),sr="flex flex-col w-full max-w-[320px]",ke=e.forwardRef(({label:t,required:s,hint:r,helpIcon:a,error:n=!1,disabled:l=!1,resizable:c=!0,compact:o=!1,rows:u,style:d,className:g,wrapperClassName:m,...b},h)=>{const N=u?{minHeight:`${u*20}px`}:void 0;return e.createElement("div",{className:p(o?sr:Qt,m)},t&&e.createElement("label",{className:o?tr({error:n}):Jt({error:n})},t,s&&e.createElement("span",{className:"text-error-400"},"*"),a),e.createElement("div",{className:o?er({error:n,disabled:l}):Yt({error:n,disabled:l})},e.createElement("textarea",{ref:h,disabled:l,rows:u,style:{...N,...d},className:p(o?rr(c&&!l):$t({resizable:c&&!l}),g),...b})),r&&e.createElement("p",{className:Rt({error:n})},r))});ke.displayName="Textarea";const ar=f("flex w-[320px] flex-col gap-1"),lr=f("flex items-center gap-1 text-sm font-bold",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),nr=f(["flex items-center","rounded-lg border bg-white","overflow-hidden","transition-colors"],{variants:{size:{sm:"h-9 px-2",md:"h-11 px-3"},error:{true:"border-error-300 focus-within:ring-2 focus-within:ring-error-500",false:"border-light-200 focus-within:ring-2 focus-within:ring-primary-500"},disabled:{true:"bg-light-100 cursor-not-allowed",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),ir=f(["flex items-center gap-1","overflow-x-auto overflow-y-hidden","whitespace-nowrap","scrollbar-hide","flex-1"]),or=f("flex shrink-0 items-center gap-1 rounded-md bg-white border border-light-200 px-2 py-1 text-caption-lg text-light-800"),cr=f(["min-w-[120px]","bg-transparent outline-none","text-light-900 placeholder:text-light-500"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:""}}}),dr=f("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function ur({size:t="md",label:s,required:r,hint:a,error:n=!1,disabled:l=!1,placeholder:c="Add items",rightIcon:o,className:u,wrapperClassName:d,options:g,value:m=[],onChange:b}){const h=i.useId(),[N,S]=i.useState(""),C=v=>{const y=g.find(E=>E.label===v);y&&(m.some(E=>E.id===y.id)||(b?.([...m,y]),S("")))},w=v=>{b?.(m.filter(y=>y.id!==v))};return i.createElement("div",{className:p(ar(),d)},s&&i.createElement("label",{className:lr({error:n})},s,r&&i.createElement("span",{className:"text-error-400"},"*")),i.createElement("div",{className:nr({size:t,error:n,disabled:l})},i.createElement("div",{className:ir()},m.map(v=>i.createElement("span",{key:v.id,className:or()},v.avatar&&i.createElement("img",{src:v.avatar,alt:v.label,className:"h-4 w-4 rounded-full"}),v.label,!l&&i.createElement("button",{type:"button",onClick:()=>w(v.id),className:"ml-1 text-light-500 hover:text-light-700"},"×"))),i.createElement("input",{list:h,value:N,onChange:v=>{S(v.target.value),C(v.target.value)},placeholder:m.length===0?c:"",disabled:l,className:p(cr({disabled:l}),u)}),i.createElement("datalist",{id:h},g.map(v=>i.createElement("option",{key:v.id,value:v.label})))),o&&i.createElement("div",{className:"ml-2 flex shrink-0 items-center text-light-400"},o)),a&&i.createElement("p",{className:dr({error:n})},a))}const mr=f("flex w-[320px] flex-col gap-1"),gr=f("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}}}),pr=f("flex items-stretch rounded-lg border bg-white transition-colors",{variants:{error:{true:"",false:"border-light-200"},disabled:{true:"bg-light-100",false:""}}}),fr=f("flex items-center px-3 text-sm text-light-500 rounded-l-lg select-none",{variants:{size:{sm:"h-9",md:"h-11"},disabled:{true:"bg-light-100",false:"bg-white"}}}),br="w-px bg-light-200",hr=f(["flex flex-1 items-center gap-2 px-3 rounded-r-lg","transition-shadow","focus-within:ring-2 focus-within:ring-offset-0"],{variants:{size:{sm:"h-9",md:"h-11"},error:{true:"border border-error-200 focus-within:ring-error-500",false:"focus-within:ring-primary-500"},disabled:{true:"cursor-not-allowed",false:""}}}),xr=f("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),vr=f("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function yr({size:t="md",label:s,required:r,hint:a,error:n=!1,disabled:l=!1,placeholder:c="www.cekat.ai",value:o,rightIcon:u,onChange:d,className:g,wrapperClassName:m}){return i.createElement("div",{className:p(mr(),m)},s&&i.createElement("label",{className:gr({error:n})},s,r&&i.createElement("span",{className:"text-error-400"},"*")),i.createElement("div",{className:pr({error:n,disabled:l})},i.createElement("div",{className:fr({size:t})},"http://"),i.createElement("div",{className:br}),i.createElement("div",{className:hr({size:t,error:n,disabled:l})},i.createElement("input",{value:o,onChange:d,placeholder:c,disabled:l,className:p(xr({disabled:l}),g)}),u&&i.createElement("div",{className:"flex items-center text-light-400"},u))),a&&i.createElement("p",{className:vr({error:n})},a))}const wr=f("flex w-[320px] flex-col gap-1"),Er=f("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),Nr=f("flex items-stretch rounded-lg border border-light-200 bg-white transition-colors",{variants:{disabled:{true:"bg-light-100",false:""}}}),kr=f(["flex flex-1 items-center gap-2 px-3 rounded-l-lg","transition-shadow","focus-within:ring-2 focus-within:ring-offset-0"],{variants:{size:{sm:"h-9",md:"h-11"},error:{true:"border border-error-200 focus-within:ring-error-500",false:"focus-within:ring-primary-500"},disabled:{true:"cursor-not-allowed",false:""}}}),Sr=f("w-px transition-colors",{variants:{error:{true:"focus:bg-error-200 group-focus-within:bg-error-500",false:"focus:bg-light-200 group-focus-within:bg-primary-500"}}}),Cr=f("flex items-center gap-1 px-3 text-sm text-light-700 rounded-r-lg select-none",{variants:{size:{sm:"h-9",md:"h-11"},disabled:{true:"bg-white",false:"bg-white"}}}),zr=f("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),Tr=f("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function Br({size:t="md",label:s,required:r,hint:a,error:n=!1,disabled:l=!1,placeholder:c="www.cekat.ai",value:o,rightIcon:u,suffix:d,onChange:g,className:m,wrapperClassName:b}){return i.createElement("div",{className:p(wr(),b)},s&&i.createElement("label",{className:Er({error:n})},s,r&&i.createElement("span",{className:"text-error-400"},"*")),i.createElement("div",{className:Nr({disabled:l})},i.createElement("div",{className:kr({size:t,error:n,disabled:l})},i.createElement("input",{value:o,onChange:g,placeholder:c,disabled:l,className:p(zr({disabled:l}),m)}),u&&i.createElement("div",{className:"text-light-400"},u)),i.createElement("div",{className:Sr({error:n})}),i.createElement("div",{className:Cr({size:t,disabled:l})},d)),a&&i.createElement("p",{className:Tr({error:n})},a))}const Lr=f("flex w-full flex-col gap-1"),Ir=f("flex items-center gap-1 text-sm font-bold text-light-800"),Se=f(["flex w-full items-center border bg-white text-left","transition-[border-color,border-width]"],{variants:{size:{xs:"h-7 gap-1 rounded px-2 text-caption-sm",sm:"h-9 gap-2 rounded-lg px-3 text-caption-lg",md:"h-11 gap-2 rounded-lg px-3 text-body-sm"},open:{true:"border-2 border-primary-500",false:"border-light-200 focus-within:border-2 focus-within:border-primary-500"},disabled:{true:"cursor-not-allowed bg-light-100",false:"cursor-pointer"}},defaultVariants:{size:"md",open:!1,disabled:!1}}),_r=f(["absolute left-0 top-full z-10 mt-2 w-full overflow-y-auto","rounded-lg border border-light-200 bg-white py-1","shadow-[0_12px_16px_-4px_rgba(16,24,40,0.08),0_4px_6px_-2px_rgba(16,24,40,0.03)]"],{variants:{size:{xs:"max-h-52",sm:"max-h-64",md:"max-h-80"}},defaultVariants:{size:"md"}}),Ce=f("flex w-full items-center rounded-md text-left",{variants:{size:{xs:"gap-1 px-2 py-1 text-caption-sm",sm:"gap-2 px-3 py-1.5 text-caption-lg",md:"gap-2 py-2.5 pl-4 pr-2.5 text-body-sm"},disabled:{true:"cursor-not-allowed text-light-400",false:"cursor-pointer hover:bg-light-50"}},defaultVariants:{size:"md",disabled:!1}}),Vr=f("text-caption-lg text-light-700"),Or=({className:t})=>e.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},e.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),jr=({className:t})=>e.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},e.createElement("path",{d:"M17.5 17.5L14.1 14.1M16 9.25C16 12.98 12.98 16 9.25 16C5.52 16 2.5 12.98 2.5 9.25C2.5 5.52 5.52 2.5 9.25 2.5C12.98 2.5 16 5.52 16 9.25Z",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Mr=({className:t})=>e.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},e.createElement("path",{d:"M16.67 5L7.5 14.17L3.33 10",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),q={xs:"size-4",sm:"size-5",md:"size-6"},ze={xs:"size-4",sm:"size-5",md:"size-5"},Ar={xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},Wr={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},Te=({size:t,open:s,disabled:r})=>p("flex w-full items-center gap-2 rounded-lg border bg-white px-2 text-left transition-[border-color,border-width]",Ar[t],Wr[t],s?"border-2 border-primary-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",r?"cursor-not-allowed bg-light-100":"cursor-pointer"),Pr=()=>"flex items-center gap-1 text-caption-sm font-semibold text-light-800",Dr="flex w-full max-w-[320px] flex-col";function Gr({size:t="md",type:s="default",label:r,required:a,helpIcon:n,hint:l,placeholder:c="Select option",disabled:o=!1,compact:u=!1,leadingIcon:d,options:g,value:m=null,onChange:b,values:h=[],onValuesChange:N,className:S,wrapperClassName:C}){const[w,v]=e.useState(!1),[y,E]=e.useState(""),L=e.useRef(null),z=e.useRef(null),T=s==="tags",B=s==="search"||T,I=g.find(x=>x.id===m)??null,O=g.filter(x=>h.includes(x.id)),M=y?g.filter(x=>`${x.label} ${x.supportingText??""}`.toLowerCase().includes(y.toLowerCase())):g,_=()=>{v(!1),E("")};e.useEffect(()=>{if(!w)return;const x=V=>{L.current?.contains(V.target)||_()};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[w]),e.useEffect(()=>{w&&B&&z.current?.focus()},[w,B]);const D=()=>{o||(w?_():v(!0))},U=x=>{x.disabled||(T?(N?.(h.includes(x.id)?h.filter(V=>V!==x.id):[...h,x.id]),E(""),z.current?.focus()):(b?.(x),_()))},ms=x=>{if(x.key==="Enter"){x.preventDefault();const V=M.find(fs=>!fs.disabled);w&&V&&U(V)}else x.key==="Backspace"&&T&&!y&&h.length?N?.(h.slice(0,-1)):w||v(!0)},_e=x=>x.avatar?e.createElement("img",{src:x.avatar,alt:"",className:p(q[t],"shrink-0 rounded-full object-cover")}):x.icon?e.createElement("span",{className:p(q[t],"flex shrink-0 items-center justify-center",o?"text-light-400":"text-light-500")},x.icon):x.dot?e.createElement("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:o?"#d0d5dd":x.dot}}):null,gs=I?_e(I):d?e.createElement("span",{className:p(q[t],"flex shrink-0 items-center justify-center",o?"text-light-400":"text-light-500")},d):null,Ve=I?e.createElement("span",{className:"flex min-w-0 items-center gap-2 whitespace-nowrap"},e.createElement("span",{className:p("truncate font-medium",o?"text-light-400":"text-light-800")},I.label),I.supportingText&&e.createElement("span",{className:o?"text-light-400":"text-light-700"},I.supportingText)):e.createElement("span",{className:o?"text-light-400":"text-light-500"},c),ps=w&&e.createElement("div",{role:"listbox",className:_r({size:t})},M.length===0&&e.createElement("div",{className:p(Ce({size:t}),"mx-1 w-auto text-light-500 hover:bg-transparent")},"No options found"),M.map(x=>{const V=T?h.includes(x.id):x.id===m;return e.createElement("div",{key:x.id,className:"px-1 py-0.5"},e.createElement("button",{type:"button",role:"option","aria-selected":V,disabled:x.disabled,onClick:()=>U(x),className:Ce({size:t,disabled:x.disabled})},_e(x),e.createElement("span",{className:"flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap"},e.createElement("span",{className:p("truncate font-medium",x.disabled?"text-light-400":"text-light-900")},x.label),x.supportingText&&e.createElement("span",{className:x.disabled?"text-light-400":"text-light-700"},x.supportingText)),V&&e.createElement(Mr,{className:"ml-auto size-5 shrink-0 text-primary-500"})))}));return e.createElement("div",{ref:L,className:p(u?Dr:Lr(),C)},r&&e.createElement("label",{className:u?Pr():Ir()},r,a&&e.createElement("span",{className:"text-error-400"},"*"),n),e.createElement("div",{className:"relative",onKeyDown:x=>{x.key==="Escape"&&_()}},s==="default"?e.createElement("button",{type:"button","aria-haspopup":"listbox","aria-expanded":w,disabled:o,onClick:D,className:p(u?Te({size:t,open:w,disabled:o}):Se({size:t,open:w,disabled:o}),S)},gs,e.createElement("span",{className:"flex min-w-0 flex-1 items-center"},Ve),e.createElement(Or,{className:p(ze[t],"shrink-0 text-light-500")})):e.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-expanded":w,onClick:D,className:p(u?Te({size:t,open:w,disabled:o}):Se({size:t,open:w,disabled:o}),S)},e.createElement(jr,{className:p(ze[t],"shrink-0",o?"text-light-400":"text-light-500")}),T&&O.length>0&&e.createElement("div",{className:"flex shrink items-center gap-1 overflow-x-auto whitespace-nowrap scrollbar-hide"},O.map(x=>e.createElement(F,{key:x.id,size:"sm",disabled:o,icon:x.avatar?e.createElement("img",{src:x.avatar,alt:"",className:"size-4 shrink-0 rounded-full object-cover"}):void 0,onClose:()=>U(x)},x.label))),!T&&!w&&I?e.createElement("span",{className:"flex min-w-0 flex-1 items-center"},Ve):e.createElement("input",{ref:z,value:y,disabled:o,placeholder:T&&O.length>0?"":c,onChange:x=>{E(x.target.value),w||v(!0)},onKeyDown:ms,className:"min-w-8 flex-1 bg-transparent text-light-900 outline-none placeholder:text-light-500 disabled:cursor-not-allowed disabled:placeholder:text-light-400"})),ps),l&&e.createElement("p",{className:Vr()},l))}const Hr=f(["inline-flex items-center justify-center gap-1 shrink-0","rounded-md border border-light-200 bg-white px-2 py-1","font-bold text-caption-sm text-light-900","transition-shadow"],{variants:{open:{true:"shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{open:!1,disabled:!1}}),Fr=f("flex size-5 shrink-0 items-center justify-center text-light-500",{variants:{disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer hover:text-light-700"}},defaultVariants:{disabled:!1}}),Kr=f("rounded-full transition-shadow",{variants:{open:{true:"shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{open:!1,disabled:!1}}),Xr=f(["absolute top-full z-10 mt-2 flex w-60 flex-col overflow-clip","rounded-lg border border-light-200 bg-white","shadow-[0px_12px_16px_-4px_rgba(16,24,40,0.08),0px_4px_6px_-2px_rgba(16,24,40,0.03)]"]),qr=f("flex w-full flex-col items-start border-b border-light-200 px-4 py-3"),Ur=f("flex w-full flex-col items-start overflow-y-auto py-1"),Zr=f(["mx-1 flex w-[calc(100%-8px)] items-center gap-3 rounded-md px-4 py-2.5","text-left font-bold text-caption-lg"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:"cursor-pointer text-light-800 hover:bg-light-50"}},defaultVariants:{disabled:!1}}),Qr=f("ml-auto shrink-0 font-normal text-caption-sm text-light-500"),Jr=f("my-1 h-px w-full bg-light-200"),Yr=({className:t})=>e.createElement("svg",{viewBox:"0 0 18 18",fill:"none",className:t},e.createElement("path",{d:"M4.5 6.75L9 11.25L13.5 6.75",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),$r=({className:t})=>e.createElement("svg",{viewBox:"0 0 18 18",fill:"none",className:t},e.createElement("path",{d:"M13.5 11.25L9 6.75L4.5 11.25",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Rr=({className:t})=>e.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},e.createElement("path",{d:"M10 10.83a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67ZM10 5a.83.83 0 1 0 0-1.67A.83.83 0 0 0 10 5ZM10 16.67a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67Z",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"}));function es({trigger:t="button",label:s="Account",icon:r,avatarSrc:a,avatarInitials:n,header:l,items:c,open:o,defaultOpen:u=!1,onOpenChange:d,disabled:g=!1,align:m="end",className:b,menuClassName:h}){const[N,S]=e.useState(u),C=o!==void 0,w=C?o:N,v=e.useRef(null),y=z=>{C||S(z),d?.(z)};e.useEffect(()=>{if(!w)return;const z=B=>{v.current?.contains(B.target)||y(!1)},T=B=>{B.key==="Escape"&&y(!1)};return document.addEventListener("mousedown",z),document.addEventListener("keydown",T),()=>{document.removeEventListener("mousedown",z),document.removeEventListener("keydown",T)}},[w]);const E=()=>{g||y(!w)},L=z=>{z.disabled||(z.onClick?.(),y(!1))};return e.createElement("div",{ref:v,className:p("relative inline-block",b)},t==="button"&&e.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":w,disabled:g,onClick:E,className:Hr({open:w,disabled:g})},e.createElement("span",null,s),w?e.createElement($r,{className:"size-[18px]"}):e.createElement(Yr,{className:"size-[18px]"})),t==="icon"&&e.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":w,"aria-label":s,disabled:g,onClick:E,className:Fr({disabled:g})},r??e.createElement(Rr,{className:"size-5"})),t==="avatar"&&e.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":w,"aria-label":s,disabled:g,onClick:E,className:Kr({open:w,disabled:g})},e.createElement(A,{src:a,initials:n,size:"md",status:"online"})),w&&e.createElement("div",{role:"menu",className:p(Xr(),m==="end"?"right-0":"left-0",h)},l&&e.createElement("div",{className:qr()},e.createElement("div",{className:"flex w-full items-center gap-3"},e.createElement(A,{src:l.avatarSrc,initials:l.avatarInitials,size:"md",status:l.status??"online"}),e.createElement("div",{className:"flex min-w-0 flex-1 flex-col items-start text-left"},e.createElement("span",{className:"w-full truncate text-sm font-bold text-light-800"},l.name),l.subtitle&&e.createElement("span",{className:"w-full truncate text-caption-lg font-normal text-light-700"},l.subtitle)))),e.createElement("div",{className:Ur()},c.map(z=>z.divider?e.createElement("div",{key:z.id,role:"separator",className:Jr()}):e.createElement("button",{key:z.id,type:"button",role:"menuitem",disabled:z.disabled,onClick:()=>L(z),className:Zr({disabled:z.disabled})},z.icon&&e.createElement("span",{className:"flex size-4 shrink-0 items-center justify-center"},z.icon),e.createElement("span",{className:"flex-1 truncate"},z.label),z.shortcut&&e.createElement("span",{className:Qr()},z.shortcut))))))}const Be=f("relative",{variants:{layout:{floating:["flex w-full flex-col gap-4 p-4","rounded-xl border shadow-xs","sm:flex-row sm:items-start"],"full-width":"w-full border-b"}},defaultVariants:{layout:"floating"}}),ts={default:{surface:"bg-light-50",border:"border-light-300",iconSurface:"border border-light-200 bg-white shadow-xs",iconSurfaceOnLight:"border border-light-200 bg-white shadow-xs",iconText:"text-light-800"},brand:{surface:"bg-primary-50",border:"border-primary-300",iconSurface:"bg-primary-100",iconSurfaceOnLight:"bg-white",iconText:"text-primary-500"},gray:{surface:"bg-light-50",border:"border-light-300",iconSurface:"bg-light-100",iconSurfaceOnLight:"bg-white",iconText:"text-light-800"},error:{surface:"bg-error-50",border:"border-error-300",iconSurface:"bg-error-50",iconSurfaceOnLight:"bg-white",iconText:"text-error-500"},warning:{surface:"bg-warning-50",border:"border-warning-300",iconSurface:"bg-warning-100",iconSurfaceOnLight:"bg-white",iconText:"text-warning-500"},success:{surface:"bg-success-50",border:"border-success-300",iconSurface:"bg-success-50",iconSurfaceOnLight:"bg-white",iconText:"text-success-500"}},rs="bg-white border-light-200",ss="relative mx-auto flex w-full max-w-[1280px] flex-col gap-4 px-4 py-4 sm:flex-row sm:items-center sm:gap-3 sm:px-8 sm:py-3",as=f("flex shrink-0 items-center justify-center",{variants:{layout:{floating:"","full-width":"hidden sm:flex"},shape:{square:"",circle:""},variant:{featured:"",plain:""}},compoundVariants:[{variant:"featured",layout:"floating",class:"size-8"},{variant:"featured",layout:"full-width",class:"size-10"},{variant:"featured",shape:"circle",class:"rounded-full"},{variant:"featured",shape:"square",layout:"floating",class:"rounded-md"},{variant:"featured",shape:"square",layout:"full-width",class:"rounded-lg"}],defaultVariants:{layout:"floating",shape:"square",variant:"featured"}}),Le=f("flex min-w-0 flex-1",{variants:{layout:{floating:"flex-col gap-3","full-width":"items-center gap-4"}},defaultVariants:{layout:"floating"}}),ls=f("flex min-w-0",{variants:{layout:{floating:"flex-col gap-1","full-width":"flex-col gap-0.5 sm:flex-row sm:flex-wrap sm:gap-x-1.5"},closable:{true:"",false:""}},compoundVariants:[{layout:"floating",closable:!0,class:"pr-8"},{layout:"full-width",closable:!0,class:"pr-8 sm:pr-0"}],defaultVariants:{layout:"floating",closable:!1}}),ns="text-caption-lg font-bold text-light-800",is="text-caption-lg text-light-600",os=f("flex gap-3",{variants:{layout:{floating:"flex-wrap items-center","full-width":""},actionVariant:{link:"flex-wrap items-center",button:""}},compoundVariants:[{layout:"full-width",actionVariant:"button",class:"flex-col-reverse sm:flex-row sm:items-center"}],defaultVariants:{layout:"floating",actionVariant:"link"}}),cs=f(["inline-flex items-center justify-center gap-1 bg-transparent p-0","text-caption-lg font-bold transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"],{variants:{emphasis:{primary:"text-primary-500 hover:text-primary-800",secondary:"text-light-800 hover:text-light-900"}},defaultVariants:{emphasis:"secondary"}}),ds=f(["flex size-9 shrink-0 items-center justify-center rounded-lg","bg-transparent text-light-500 transition-colors","hover:bg-light-50 hover:text-light-700","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"],{variants:{layout:{floating:"absolute right-[7px] top-[7px]","full-width":"absolute right-2 top-2 sm:static"}},defaultVariants:{layout:"floating"}}),us={default:K,brand:K,gray:K,error:Ee,warning:Ee,success:Ft},Ie=({title:t,description:s,color:r="default",layout:a="floating",background:n="white",icon:l,iconVariant:c="featured",showIcon:o=!0,primaryAction:u,secondaryAction:d,actionVariant:g,actions:m,onClose:b,closeLabel:h="Close",className:N,...S})=>{const C=us[r],w=a==="floating"?16:20,v=g??(a==="floating"?"link":"button"),y=ts[r],E=n==="light",L=E?p(y.surface,y.border):rs,z=(_,D)=>_?v==="link"?i.createElement("button",{type:"button",onClick:_.onClick,className:cs({emphasis:D})},_.label):i.createElement(G,{size:"sm",variant:D==="primary"?"solid":"outline",onClick:_.onClick,className:a==="full-width"?"w-full sm:w-auto":void 0},_.label):null,B=!!(m||u||d)?i.createElement("div",{className:os({layout:a,actionVariant:v})},m??i.createElement(i.Fragment,null,z(d,"secondary"),z(u,"primary"))):null,I=o&&(l||C)?i.createElement("div",{className:p(as({layout:a,variant:c,shape:r==="default"?"square":"circle"}),y.iconText,c==="featured"&&(E?y.iconSurfaceOnLight:y.iconSurface))},l??i.createElement(C,{size:w,stroke:2})):null,O=b?i.createElement("button",{type:"button","aria-label":h,onClick:b,className:ds({layout:a})},i.createElement(Kt,{size:16,stroke:2})):null,M=i.createElement("div",{className:ls({layout:a,closable:!!b})},i.createElement("p",{className:ns},t),s&&i.createElement("p",{className:is},s));return a==="full-width"?i.createElement("div",{role:"alert",className:p(Be({layout:a}),L,N),...S},i.createElement("div",{className:ss},i.createElement("div",{className:Le({layout:a})},I,M),(B||O)&&i.createElement("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-2"},B,O))):i.createElement("div",{role:"alert",className:p(Be({layout:a}),L,N),...S},I,i.createElement("div",{className:Le({layout:a})},M,B),O)};Ie.displayName="Alert",k.Alert=Ie,k.Avatar=A,k.AvatarGroup=ue,k.AvatarLabelGroup=me,k.AvatarProfilePhoto=ge,k.Badge=ne,k.BadgeGroup=ie,k.Button=G,k.CardNumberInput=Zt,k.Checkbox=$,k.Dropdown=es,k.Input=X,k.InputCounter=Ut,k.InputDropdown=Gr,k.Loading=oe,k.MultiSelectInput=ur,k.PhoneInput=Xt,k.RadioGroup=Ge,k.RadioGroupItem=ee,k.SaleAmountInput=qt,k.Tab=pe,k.TabBrowser=xe,k.TabBrowserBar=ve,k.TabList=fe,k.Tag=F,k.Textarea=ke,k.Toggle=te,k.Tooltip=re,k.WebsiteCopyInput=Br,k.WebsiteInput=yr,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
|