cekat-ui 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- export declare const textareaWrapperStyles = "flex flex-col gap-1 w-full max-w-[320px]";
1
+ export declare const textareaWrapperStyles = "flex flex-col gap-1 w-full";
2
2
  export declare const textareaLabelStyles: (props?: {
3
3
  error?: boolean;
4
4
  } & import('class-variance-authority/types').ClassProp) => string;
package/dist/index.es.js CHANGED
@@ -1910,7 +1910,7 @@ const pt = ({
1910
1910
  );
1911
1911
  };
1912
1912
  pt.displayName = "TabList";
1913
- const gt = b("flex flex-col gap-1 w-full max-w-[320px]", {
1913
+ const gt = b("flex flex-col gap-1 w-full", {
1914
1914
  variants: {
1915
1915
  size: {
1916
1916
  xs: "text-caption-sm",
@@ -2384,7 +2384,7 @@ function Ar({
2384
2384
  const oe = j;
2385
2385
  oe.Prefix = zt;
2386
2386
  oe.Suffix = Lt;
2387
- const jt = "flex flex-col gap-1 w-full max-w-[320px]", It = b("flex items-center gap-1 font-bold text-sm", {
2387
+ const jt = "flex flex-col gap-1 w-full", It = b("flex items-center gap-1 font-bold text-sm", {
2388
2388
  variants: {
2389
2389
  error: {
2390
2390
  true: "",
@@ -2750,7 +2750,7 @@ function Gr({
2750
2750
  }
2751
2751
  ), u && /* @__PURE__ */ d.createElement("div", { className: "text-light-400" }, u)), /* @__PURE__ */ d.createElement("div", { className: nr({ error: i }) }), /* @__PURE__ */ d.createElement("div", { className: or({ size: t, disabled: a }) }, o)), l && /* @__PURE__ */ d.createElement("p", { className: dr({ error: i }) }, l));
2752
2752
  }
2753
- const ur = b("flex w-full max-w-[320px] flex-col gap-1"), mr = b(
2753
+ const ur = b("flex w-full flex-col gap-1"), mr = b(
2754
2754
  "flex items-center gap-1 text-sm font-bold text-light-800"
2755
2755
  ), U = b(
2756
2756
  [
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(w,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):(w=typeof globalThis<"u"?globalThis:w||self,i(w.CekatUI={},w.React$1,w.reactDom))})(this,(function(w,i,Ee){"use strict";function Ne(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(s,r,l.get?l:{enumerable:!0,get:()=>t[r]})}}return s.default=t,Object.freeze(s)}const e=Ne(i);function K(t){var s,r,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(s=0;s<n;s++)t[s]&&(r=K(t[s]))&&(l&&(l+=" "),l+=r)}else for(r in t)t[r]&&(l&&(l+=" "),l+=r);return l}function g(){for(var t,s,r=0,l="",n=arguments.length;r<n;r++)(t=arguments[r])&&(s=K(t))&&(l&&(l+=" "),l+=s);return l}const U=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Z=g,b=(t,s)=>r=>{var l;if(s?.variants==null)return Z(t,r?.class,r?.className);const{variants:n,defaultVariants:a}=s,d=Object.keys(n).map(c=>{const m=r?.[c],p=a?.[c];if(m===null)return null;const f=U(m)||U(p);return n[c][f]}),o=r&&Object.entries(r).reduce((c,m)=>{let[p,f]=m;return f===void 0||(c[p]=f),c},{}),u=s==null||(l=s.compoundVariants)===null||l===void 0?void 0:l.reduce((c,m)=>{let{class:p,className:f,...h}=m;return Object.entries(h).every(N=>{let[E,S]=N;return Array.isArray(S)?S.includes({...a,...o}[E]):{...a,...o}[E]===S})?[...c,p,f]:c},[]);return Z(t,d,u,r?.class,r?.className)},ke=b(["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}}),Se=({children:t,className:s,tone:r,variant:l,size:n,iconOnly:a,...d})=>i.createElement("button",{className:g(ke({tone:r,variant:l,size:n,iconOnly:a}),s),...d},t),Ce=({children:t})=>i.createElement("span",{className:"flex items-center"},t),ze=({children:t})=>i.createElement("span",{className:"whitespace-nowrap"},t),M=Se;M.Icon=Ce,M.Text=ze;const Le=b(["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}}),Te={sm:{width:12,height:9},md:{width:14,height:10},lg:{width:14,height:10}},q=e.forwardRef(({id:t,checked:s,indeterminate:r=!1,disabled:l,size:n="md",onCheckedChange:a,className:d},o)=>{const u=()=>{l||a?.(!s)},c=Te[n],m=l?"text-white/80":"text-current";return e.createElement("button",{id:t,ref:o,type:"button",role:"checkbox","aria-checked":r?"mixed":s,disabled:l,onClick:u,className:g(Le({size:n,checked:s,disabled:l}),d)},s&&!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:g(m,"bg-current rounded-sm",n==="sm"&&"h-0.5 w-3",(n==="md"||n==="lg")&&"h-0.5 w-4")}))});q.displayName="Checkbox";const Q=e.createContext(null),Be=({value:t,defaultValue:s,onValueChange:r,children:l,className:n})=>{const[a,d]=e.useState(s),o=t??a,u=c=>{d(c),r?.(c)};return e.createElement(Q.Provider,{value:{value:o,onValueChange:u}},e.createElement("div",{role:"radiogroup",className:n},l))},Ie=()=>{const t=e.useContext(Q);if(!t)throw new Error("RadioGroupItem must be used within RadioGroup");return t},je=b(["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}}),Oe=b(["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}}),X=e.forwardRef(({id:t,value:s,disabled:r,size:l="md",className:n},a)=>{const{value:d,onValueChange:o}=Ie(),u=d===s;return e.createElement("button",{ref:a,id:t,type:"button",role:"radio","aria-checked":u,disabled:r,onClick:()=>{r||o?.(s)},className:g(je({size:l,checked:u,disabled:r}),n)},e.createElement("span",{className:Oe({size:l,checked:u})}))});X.displayName="RadioGroupItem";const Ve=b(["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"}}),_e=b("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}}),J=e.forwardRef(({checked:t=!1,size:s="md",variant:r="default",disabled:l,onCheckedChange:n,className:a},d)=>e.createElement("button",{ref:d,type:"button",role:"switch","aria-checked":t,disabled:l,onClick:()=>{l||n?.(!t)},className:g(Ve({size:s,checked:t,disabled:l,variant:r}),a)},e.createElement("span",{className:_e({size:s,disabled:l})})));J.displayName="Toggle";const We=b(["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}}),Me="mt-1 font-medium text-light-100",Ae=b(["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"}}),_=12,Y=({content:t,supportingText:s,side:r="top",open:l,defaultOpen:n=!1,disabled:a=!1,delay:d=0,className:o,children:u})=>{const[c,m]=e.useState(n),[p,f]=e.useState(null),h=e.useRef(null),N=e.useRef(null),E=()=>{if(a||!h.current)return;const x=h.current.getBoundingClientRect();let k=0,z=0;switch(r){case"top":k=x.top-_,z=x.left+x.width/2;break;case"bottom":k=x.bottom+_,z=x.left+x.width/2;break;case"left":k=x.top+x.height/2,z=x.left-_;break;case"right":k=x.top+x.height/2,z=x.right+_;break}const T=()=>{f({top:k,left:z}),m(!0)};d>0?N.current=window.setTimeout(T,d):T()},S=()=>{N.current&&(clearTimeout(N.current),N.current=null),m(!1)},y=l??c;return e.createElement(e.Fragment,null,e.createElement("span",{ref:h,className:"inline-flex",onMouseEnter:E,onMouseLeave:S,onFocus:E,onBlur:S,tabIndex:0},u),y&&p&&Ee.createPortal(e.createElement("div",{role:"tooltip",className:"fixed z-[9999] pointer-events-none",style:{top:p.top,left:p.left,transform:r==="top"?"translate(-50%, -100%)":r==="bottom"?"translate(-50%, 0)":r==="left"?"translate(-100%, -50%)":"translate(0, -50%)"}},e.createElement("div",{className:g(We({side:r,hasSupportingText:!!s}),o)},t,s&&e.createElement("p",{className:Me},s),e.createElement("span",{className:Ae({side:r})}))),document.body))};Y.displayName="Tooltip";const Pe={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"}},De=b(["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}}),Ge=b(["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}}),He="shrink-0 rounded-[3px] bg-light-100 px-1 text-light-800",Fe="shrink-0 rounded-[3px] p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",$=/^#([0-9a-f]{6})$/i,R=t=>$.test(t.trim()),ee=(t,s)=>{const r=$.exec(t.trim());if(!r)return;const l=parseInt(r[1],16),n=l>>16&255,a=l>>8&255,d=l&255;return`rgba(${n}, ${a}, ${d}, ${s})`},A=({children:t,size:s="sm",shape:r="rounded",icon:l,checked:n,onCheckedChange:a,onClose:d,count:o,disabled:u=!1,className:c,color:m="gray",customColor:p})=>{const f=a!==void 0,h=n!==void 0||!!l,N=!!d||o!==void 0,E=Pe[m],S=!!(p&&R(p)),y=S?{borderColor:p,backgroundColor:ee(p,.12),color:p}:void 0,x=()=>{u||a?.(!n)},k=z=>{!f||u||(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),x())};return e.createElement("div",{role:f?"checkbox":void 0,"aria-checked":f?!!n:void 0,"aria-disabled":u||void 0,tabIndex:f&&!u?0:void 0,onClick:f?x:void 0,onKeyDown:k,style:y,className:g(De({size:s,shape:r,hasLeading:h,hasTrailing:N,interactive:f,disabled:u}),!S&&E.bg,!S&&E.border,!S&&E.text,c)},n!==void 0&&e.createElement("span",{className:g(Ge({checked:n}),!n&&!S&&E.border),style:!n&&S?{borderColor:p}: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"}))),l,e.createElement("span",{className:"whitespace-nowrap"},t),o!==void 0&&e.createElement("span",{className:He},o),d&&e.createElement("button",{type:"button","aria-label":"Remove",disabled:u,onClick:z=>{z.stopPropagation(),d()},className:Fe},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"}))))};A.displayName="Tag";const Ke={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"}},Ue=b(["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}}),Ze="size-4 shrink-0 rounded border bg-white",qe="shrink-0 rounded p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",te=({children:t,size:s="sm",shape:r="pill",variant:l="solid",color:n="brand",customColor:a,modern:d=!1,icon:o,trailingIcon:u,checked:c,onCheckedChange:m,onClose:p,iconOnly:f=!1,disabled:h=!1,className:N})=>{const E=m!==void 0,S=c!==void 0||!!o,y=!!p||!!u,x=Ke[n],k=!!(a&&R(a)),z=k?{borderColor:a,color:a,backgroundColor:l==="outline"?"transparent":ee(a,.1)}:void 0,T=()=>{h||m?.(!c)},C=L=>{!E||h||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),T())};return e.createElement("div",{role:E?"checkbox":void 0,"aria-checked":E?!!c:void 0,"aria-disabled":h||void 0,tabIndex:E&&!h?0:void 0,onClick:E?T:void 0,onKeyDown:C,style:z,className:g(Ue({size:s,shape:r,modern:d,hasLeading:S,hasTrailing:y,iconOnly:f,interactive:E,disabled:h}),!k&&(l==="outline"?g("bg-transparent",x.outlineBorder,x.outlineText):g(x.solidBg,x.solidBorder,x.solidText)),N)},c!==void 0&&e.createElement("span",{className:g(Ze,c?"bg-primary-500 border-primary-500":!k&&x.solidBorder),style:!c&&k?{borderColor:a}: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,!f&&e.createElement("span",{className:"whitespace-nowrap"},t),u,p&&e.createElement("button",{type:"button","aria-label":"Remove",disabled:h,onClick:L=>{L.stopPropagation(),p()},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"}))))};te.displayName="Badge";const Qe={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"}},Xe={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"}},re=({badgeLabel:t,children:s,size:r="md",theme:l="light",color:n="brand",badgePosition:a="leading",icon:d,onClick:o,className:u})=>{const c=Qe[n],m=Xe[r],p=l==="modern",f=l==="outline",h=g("inline-flex items-center border transition-colors duration-150",m.gap,m.outerPad[a],p?"rounded-lg bg-light-50 border-light-200 shadow-xs":f?g("rounded-full bg-white border-[1.5px]",c.border500):g("rounded-full",c.bg50,c.border200,c.hoverBg100),o&&"cursor-pointer",u),N=g("inline-flex shrink-0 items-center gap-1 border font-medium whitespace-nowrap",m.chipPad,m.text,p?"rounded-md bg-white border-light-200 text-light-800":f?g("rounded-full bg-white border-[1.5px]",c.border500,c.text500):g("rounded-full bg-white",c.border200,c.text500)),E=g("inline-flex items-center gap-1 font-medium",m.text,p?"text-light-800":c.text500),S=e.createElement("span",{className:N},p&&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},a==="leading"&&S,e.createElement("span",{className:E},s,d),a==="trailing"&&S)};re.displayName="BadgeGroup";const Je=({size:t})=>{const s=t*.09,r=(t-s)/2,l=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:`${l*.25} ${l}`,className:"stroke-primary-600"}))},Ye=({size:t})=>{const s=e.useId(),r=t*.125,l=(t-r)/2,n=2*Math.PI*l;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:l,strokeWidth:r,className:"stroke-light-100"}),e.createElement("circle",{cx:t/2,cy:t/2,r:l,strokeWidth:r,strokeLinecap:"round",stroke:`url(#${s})`,strokeDasharray:`${n*.75} ${n}`}))},$e=({size:t})=>{const r=Math.max(t*.1,3),l=(t-r)/2;return e.createElement("div",{className:"relative animate-spin",style:{width:t,height:t}},Array.from({length:12}).map((n,a)=>{const d=30*a,o=.15+.85*a/11;return e.createElement("span",{key:a,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(${l}px) rotate(${-d}deg)`}})}))},Re={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"}},se=({size:t="sm",style:s="line-simple",supportingText:r=!0,label:l="Loading...",className:n})=>{const{box:a,gapClass:d,textClass:o}=Re[t];return e.createElement("div",{role:"status","aria-label":typeof l=="string"?l:"Loading",className:g("inline-flex flex-col items-center",d,n)},s==="line-simple"&&e.createElement(Je,{size:a}),s==="line-spinner"&&e.createElement(Ye,{size:a}),s==="dot-circle"&&e.createElement($e,{size:a}),r&&e.createElement("p",{className:g("font-medium text-light-700 whitespace-nowrap",o)},l))};se.displayName="Loading";const ae=({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"})),le=({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"})),et={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"}},tt="#17B26A",O=({src:t,alt:s,initials:r,size:l="md",status:n="none",statusIcon:a,contrastBorder:d=!0,className:o})=>{const{box:u,borderWidth:c,statusSize:m,badgeSize:p,textClass:f}=et[l],h=t?"image":r!==void 0?"initials":"placeholder";return e.createElement("div",{className:g("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(ae,{className:"text-light-300",style:{width:u*.55,height:u*.55}})),h==="initials"&&e.createElement("div",{className:g("absolute inset-0 flex items-center justify-center rounded-full bg-light-50 font-semibold text-light-500",f)},r),d&&e.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:c,borderStyle:"solid"}}),n==="online"&&e.createElement("span",{className:"absolute bottom-0 right-0 rounded-full border-[1.5px] border-white",style:{width:m,height:m,backgroundColor:tt}}),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:p,height:p}},a),n==="verified"&&e.createElement("div",{className:"absolute bottom-0 right-0",style:{width:p,height:p}},e.createElement(le,{className:"size-full"})))};O.displayName="Avatar";const rt={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"}},ne=({avatars:t,max:s,size:r="xs",onAdd:l,className:n})=>{const{box:a,overlap:d,contrastBorderWidth:o,textClass:u}=rt[r],c=s?t.slice(0,s):t,m=s&&t.length>s?t.length-s:0;return e.createElement("div",{className:g("inline-flex items-start gap-2",n)},e.createElement("div",{className:"flex items-start"},c.map((p,f)=>e.createElement("div",{key:f,className:"relative shrink-0 overflow-hidden rounded-full border-[1.5px] border-white",style:{width:a,height:a,marginRight:d}},p.src?e.createElement("img",{src:p.src,alt:p.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"},p.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:a,height:a}},e.createElement("span",{className:g("font-semibold text-light-600",u)},"+",m))),l&&e.createElement("button",{type:"button",onClick:l,"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:a,height:a}},e.createElement("svg",{width:a*.4,height:a*.4,viewBox:"0 0 20 20",fill:"none"},e.createElement("path",{d:"M10 4v12M4 10h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}))))};ne.displayName="AvatarGroup";const st={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"}},ie=({name:t,subtitle:s,src:r,initials:l,size:n="xs",status:a="none",statusIcon:d,className:o})=>{const{nameClass:u,subtitleClass:c}=st[n];return e.createElement("div",{className:g("inline-flex items-center gap-2",o)},e.createElement(O,{src:r,initials:l,size:n,status:a,statusIcon:d}),e.createElement("div",{className:"flex flex-col items-start whitespace-nowrap"},e.createElement("span",{className:g("font-bold text-light-800",u)},t),s&&e.createElement("span",{className:g("font-normal text-light-700",c)},s)))};ie.displayName="AvatarLabelGroup";const at={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}},oe=({src:t,alt:s,initials:r,size:l="sm",verified:n=!0,contrastBorder:a=!0,className:d})=>{const{box:o,ringWidth:u,shadowClass:c,iconSize:m,textClass:p,verifiedSize:f,verifiedOffset:h}=at[l],N=t?"image":r!==void 0?"initials":"placeholder";return e.createElement("div",{className:g("relative rounded-full",d),style:{width:o,height:o}},e.createElement("div",{className:g("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:s??"",className:"absolute inset-0 size-full rounded-full object-cover"}),a&&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(ae,{className:"text-light-300",style:{width:m,height:m}})),N==="initials"&&e.createElement("div",{className:g("absolute inset-0 flex items-center justify-center font-semibold text-light-500",p)},r)),n&&e.createElement("div",{className:"absolute",style:{width:f,height:f,bottom:h,right:h}},e.createElement(le,{className:"size-full"})))};oe.displayName="AvatarProfilePhoto";const lt={"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"}},nt={"button-gray":"rounded-md","button-white":"rounded-md","button-primary":"rounded-md",underline:"rounded-none","underline-filled":"rounded-none",line:"rounded-none"},it={"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}},ot="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",ct={"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}},ce=({children:t,variant:s="button-primary",size:r="sm",active:l=!1,fullWidth:n=!1,count:a,disabled:d=!1,onClick:o,className:u})=>{const c=it[s];return e.createElement("button",{type:"button",role:"tab","aria-selected":l,disabled:d,onClick:o,className:g("inline-flex items-center justify-center font-semibold transition-colors duration-150",lt[s][r],nt[s],l?c.active:c.inactive,!l&&!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",n&&"w-full",d?"cursor-not-allowed opacity-60":"cursor-pointer",u)},e.createElement("span",{className:"whitespace-nowrap"},t),a!==void 0&&e.createElement("span",{className:ot},a))};ce.displayName="Tab";const de=({children:t,variant:s="button-primary",orientation:r="horizontal",boxed:l=!1,className:n})=>{const{gapClass:a,hasHairline:d}=ct[s];return e.createElement("div",{role:"tablist","aria-orientation":r,className:g("inline-flex",r==="vertical"?"flex-col items-stretch":"flex-row items-center",a,l&&"rounded-lg border border-light-200 bg-light-50 p-1",d&&r==="horizontal"&&!l&&"border-b border-light-200",n)},t)};de.displayName="TabList";const dt=b("flex flex-col gap-1 w-full max-w-[320px]",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-sm"}},defaultVariants:{size:"md"}}),ut=b("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),mt=b(["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}}),pt=b(["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}}),gt=b("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}}}),bt=b("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}}),ft=b("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}}),ht=b("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"}}),ue=b(["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"}}),xt=b("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"}}),me=({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"})),vt={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},yt=({size:t,error:s,disabled:r})=>g("flex items-center w-full gap-2 rounded-lg border bg-white px-2 transition-[border-color,border-width]",vt[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})=>g("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),Et="flex flex-col w-full max-w-[320px]";function V({label:t,required:s,hint:r,rightIcon:l,size:n="md",error:a=!1,disabled:d=!1,compact:o=!1,hideCalendarIcon:u=!1,type:c,prefix:m,suffix:p,leadingAddon:f,leadingDropdown:h,trailingDropdown:N,trailingButton:E,maxLength:S,value:y,className:x,wrapperClassName:k,...z}){const T=!!(f||E),C=i.createElement(i.Fragment,null,h&&i.createElement("button",{type:"button",onClick:h.onClick,disabled:h.disabled||d,className:ue({size:n})},i.createElement("span",null,h.value),i.createElement(me,{className:"size-5 text-light-500"})),m&&i.createElement("div",{className:"flex items-center"},m),i.createElement("input",{...z,type:c,disabled:d,maxLength:S,value:y,className:g(pt({size:n,error:a}),"h-full",u&&"[&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-clear-button]:hidden",c==="date"&&"[&::-webkit-datetime-edit]:p-0 [&::-webkit-datetime-edit-fields-wrapper]:p-0",x)}),(l||p)&&i.createElement("div",{className:"flex h-full items-center gap-2"},l&&i.createElement("div",{className:"flex h-full items-center pb-0.5 text-light-400 hover:text-light-600"},l),p&&i.createElement("div",{className:"flex h-full items-center gap-1 leading-none text-light-700"},p)),N&&i.createElement("button",{type:"button",onClick:N.onClick,disabled:N.disabled||d,className:ue({size:n})},i.createElement("span",null,N.value),i.createElement(me,{className:"size-5 text-light-500"})));return i.createElement("div",{className:g(o?Et:dt({size:n}),k)},t&&i.createElement("label",{className:o?wt({error:a}):ut({error:a})},t,s&&i.createElement("span",{className:"text-error-400"},"*")),T?i.createElement("div",{className:bt({size:n,error:a,disabled:d})},f&&i.createElement("div",{className:ht({size:n})},f),i.createElement("div",{className:ft({size:n,disabled:d})},C),E&&i.createElement("button",{type:"button",onClick:E.onClick,disabled:E.disabled||d,className:xt({size:n})},E.icon,i.createElement("span",null,E.label))):i.createElement("div",{className:o?yt({size:n,error:a,disabled:d}):mt({size:n,error:a,disabled:d})},C),S&&typeof y=="string"&&i.createElement("div",{className:"text-right text-xs text-light-400"},y.length,"/",S),r&&i.createElement("p",{className:gt({error:a})},r))}function Nt({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}function kt({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}var St={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 Ct=(t,s,r,l)=>{const n=i.forwardRef(({color:a="currentColor",size:d=24,stroke:o=2,title:u,className:c,children:m,...p},f)=>i.createElement("svg",{ref:f,...St[t],width:d,height:d,className:["tabler-icon",`tabler-icon-${s}`,c].join(" "),strokeWidth:o,stroke:a,...p},[u&&i.createElement("title",{key:"svg-title"},u),...l.map(([h,N])=>i.createElement(h,N)),...Array.isArray(m)?m:[m]]));return n.displayName=`${r}`,n};const pe=Ct("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);function zt({size:t="md",label:s,required:r,hint:l,error:n,disabled:a,placeholder:d="+1 (555) 000-0000",rightIcon:o,value:u,onChange:c,className:m,wrapperClassName:p}){return i.createElement(V,{size:t,label:s,required:r,hint:l,error:n,disabled:a,placeholder:d,rightIcon:o,value:u,onChange:c,className:m,wrapperClassName:p,prefix:i.createElement("div",{className:"flex items-center gap-1 pr-2 text-sm text-light-700"},i.createElement("span",null,"US"),i.createElement(pe,{size:14}))})}function Lt({size:t="md",label:s,required:r,hint:l,error:n,disabled:a,value:d,placeholder:o="1,000.00",currency:u="USD",onCurrencyChange:c,rightIcon:m,onChange:p,className:f,wrapperClassName:h}){return i.createElement(V,{size:t,label:s,required:r,hint:l,error:n,disabled:a,value:d,placeholder:o,rightIcon:m,onChange:p,className:f,wrapperClassName:h,prefix:i.createElement("span",{className:"select-none text-sm text-light-700"},"$"),suffix:i.createElement("button",{type:"button",disabled:a,onClick:c,className:"flex items-center gap-1 text-sm text-light-700 hover:text-light-900 disabled:cursor-not-allowed"},u,i.createElement(pe,{size:14}))})}function Tt({size:t="md",label:s,required:r,hint:l,disabled:n,error:a,className:d,wrapperClassName:o,value:u,maxLength:c,placeholder:m,onChange:p}){const f=u.length>c,h=a||f;return i.createElement(V,{size:t,label:s,required:r,disabled:n,error:h,value:u,placeholder:m,onChange:p,className:d,wrapperClassName:o,hint:l,suffix:i.createElement("span",{className:g("text-caption-lg",f?"text-error-600":"text-light-400")},u.length,"/",c)})}function Bt({size:t="md",label:s="Card number",required:r,hint:l,error:n,disabled:a,placeholder:d="Card number",value:o,onChange:u,rightIcon:c,prefix:m,className:p,wrapperClassName:f}){return i.createElement(V,{size:t,label:s,required:r,hint:l,error:n,disabled:a,placeholder:d,value:o,onChange:u,rightIcon:c,className:p,wrapperClassName:f,prefix:m??i.createElement("img",{src:"/stories/assets/mastercard.png",alt:"mastercard",className:"h-4 w-6 object-contain"}),inputMode:"numeric",autoComplete:"cc-number"})}const P=V;P.Prefix=Nt,P.Suffix=kt;const It="flex flex-col gap-1 w-full max-w-[320px]",jt=b("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),Ot=b(["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}}),Vt=b(["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}}),_t=b("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}},defaultVariants:{error:!1}}),Wt=({error:t,disabled:s})=>g("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"),Mt=({error:t})=>g("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),At=t=>g("flex-1 min-h-[64px] bg-transparent outline-none text-sm text-light-900","placeholder:text-light-500",t?"resize-y":"resize-none"),Pt="flex flex-col w-full max-w-[320px]",ge=e.forwardRef(({label:t,required:s,hint:r,helpIcon:l,error:n=!1,disabled:a=!1,resizable:d=!0,compact:o=!1,rows:u,style:c,className:m,wrapperClassName:p,...f},h)=>{const N=u?{minHeight:`${u*20}px`}:void 0;return e.createElement("div",{className:g(o?Pt:It,p)},t&&e.createElement("label",{className:o?Mt({error:n}):jt({error:n})},t,s&&e.createElement("span",{className:"text-error-400"},"*"),l),e.createElement("div",{className:o?Wt({error:n,disabled:a}):Ot({error:n,disabled:a})},e.createElement("textarea",{ref:h,disabled:a,rows:u,style:{...N,...c},className:g(o?At(d&&!a):Vt({resizable:d&&!a}),m),...f})),r&&e.createElement("p",{className:_t({error:n})},r))});ge.displayName="Textarea";const Dt=b("flex w-[320px] flex-col gap-1"),Gt=b("flex items-center gap-1 text-sm font-bold",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),Ht=b(["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}}),Ft=b(["flex items-center gap-1","overflow-x-auto overflow-y-hidden","whitespace-nowrap","scrollbar-hide","flex-1"]),Kt=b("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"),Ut=b(["min-w-[120px]","bg-transparent outline-none","text-light-900 placeholder:text-light-500"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:""}}}),Zt=b("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function qt({size:t="md",label:s,required:r,hint:l,error:n=!1,disabled:a=!1,placeholder:d="Add items",rightIcon:o,className:u,wrapperClassName:c,options:m,value:p=[],onChange:f}){const h=i.useId(),[N,E]=i.useState(""),S=x=>{const k=m.find(z=>z.label===x);k&&(p.some(z=>z.id===k.id)||(f?.([...p,k]),E("")))},y=x=>{f?.(p.filter(k=>k.id!==x))};return i.createElement("div",{className:g(Dt(),c)},s&&i.createElement("label",{className:Gt({error:n})},s,r&&i.createElement("span",{className:"text-error-400"},"*")),i.createElement("div",{className:Ht({size:t,error:n,disabled:a})},i.createElement("div",{className:Ft()},p.map(x=>i.createElement("span",{key:x.id,className:Kt()},x.avatar&&i.createElement("img",{src:x.avatar,alt:x.label,className:"h-4 w-4 rounded-full"}),x.label,!a&&i.createElement("button",{type:"button",onClick:()=>y(x.id),className:"ml-1 text-light-500 hover:text-light-700"},"×"))),i.createElement("input",{list:h,value:N,onChange:x=>{E(x.target.value),S(x.target.value)},placeholder:p.length===0?d:"",disabled:a,className:g(Ut({disabled:a}),u)}),i.createElement("datalist",{id:h},m.map(x=>i.createElement("option",{key:x.id,value:x.label})))),o&&i.createElement("div",{className:"ml-2 flex shrink-0 items-center text-light-400"},o)),l&&i.createElement("p",{className:Zt({error:n})},l))}const Qt=b("flex w-[320px] flex-col gap-1"),Xt=b("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}}}),Jt=b("flex items-stretch rounded-lg border bg-white transition-colors",{variants:{error:{true:"",false:"border-light-200"},disabled:{true:"bg-light-100",false:""}}}),Yt=b("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"}}}),$t="w-px bg-light-200",Rt=b(["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:""}}}),er=b("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),tr=b("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function rr({size:t="md",label:s,required:r,hint:l,error:n=!1,disabled:a=!1,placeholder:d="www.cekat.ai",value:o,rightIcon:u,onChange:c,className:m,wrapperClassName:p}){return i.createElement("div",{className:g(Qt(),p)},s&&i.createElement("label",{className:Xt({error:n})},s,r&&i.createElement("span",{className:"text-error-400"},"*")),i.createElement("div",{className:Jt({error:n,disabled:a})},i.createElement("div",{className:Yt({size:t})},"http://"),i.createElement("div",{className:$t}),i.createElement("div",{className:Rt({size:t,error:n,disabled:a})},i.createElement("input",{value:o,onChange:c,placeholder:d,disabled:a,className:g(er({disabled:a}),m)}),u&&i.createElement("div",{className:"flex items-center text-light-400"},u))),l&&i.createElement("p",{className:tr({error:n})},l))}const sr=b("flex w-[320px] flex-col gap-1"),ar=b("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),lr=b("flex items-stretch rounded-lg border border-light-200 bg-white transition-colors",{variants:{disabled:{true:"bg-light-100",false:""}}}),nr=b(["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:""}}}),ir=b("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"}}}),or=b("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"}}}),cr=b("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),dr=b("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function ur({size:t="md",label:s,required:r,hint:l,error:n=!1,disabled:a=!1,placeholder:d="www.cekat.ai",value:o,rightIcon:u,suffix:c,onChange:m,className:p,wrapperClassName:f}){return i.createElement("div",{className:g(sr(),f)},s&&i.createElement("label",{className:ar({error:n})},s,r&&i.createElement("span",{className:"text-error-400"},"*")),i.createElement("div",{className:lr({disabled:a})},i.createElement("div",{className:nr({size:t,error:n,disabled:a})},i.createElement("input",{value:o,onChange:m,placeholder:d,disabled:a,className:g(cr({disabled:a}),p)}),u&&i.createElement("div",{className:"text-light-400"},u)),i.createElement("div",{className:ir({error:n})}),i.createElement("div",{className:or({size:t,disabled:a})},c)),l&&i.createElement("p",{className:dr({error:n})},l))}const mr=b("flex w-full max-w-[320px] flex-col gap-1"),pr=b("flex items-center gap-1 text-sm font-bold text-light-800"),be=b(["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}}),gr=b(["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"}}),fe=b("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}}),br=b("text-caption-lg text-light-700"),fr=({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"})),hr=({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"})),xr=({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"})),D={xs:"size-4",sm:"size-5",md:"size-6"},he={xs:"size-4",sm:"size-5",md:"size-5"},vr={xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},yr={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},xe=({size:t,open:s,disabled:r})=>g("flex w-full items-center gap-2 rounded-lg border bg-white px-2 text-left transition-[border-color,border-width]",vr[t],yr[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"),wr=()=>"flex items-center gap-1 text-caption-sm font-semibold text-light-800",Er="flex w-full max-w-[320px] flex-col";function Nr({size:t="md",type:s="default",label:r,required:l,helpIcon:n,hint:a,placeholder:d="Select option",disabled:o=!1,compact:u=!1,leadingIcon:c,options:m,value:p=null,onChange:f,values:h=[],onValuesChange:N,className:E,wrapperClassName:S}){const[y,x]=e.useState(!1),[k,z]=e.useState(""),T=e.useRef(null),C=e.useRef(null),L=s==="tags",j=s==="search"||L,I=m.find(v=>v.id===p)??null,G=m.filter(v=>h.includes(v.id)),H=k?m.filter(v=>`${v.label} ${v.supportingText??""}`.toLowerCase().includes(k.toLowerCase())):m,W=()=>{x(!1),z("")};e.useEffect(()=>{if(!y)return;const v=B=>{T.current?.contains(B.target)||W()};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[y]),e.useEffect(()=>{y&&j&&C.current?.focus()},[y,j]);const ve=()=>{o||(y?W():x(!0))},F=v=>{v.disabled||(L?(N?.(h.includes(v.id)?h.filter(B=>B!==v.id):[...h,v.id]),z(""),C.current?.focus()):(f?.(v),W()))},Mr=v=>{if(v.key==="Enter"){v.preventDefault();const B=H.find(Dr=>!Dr.disabled);y&&B&&F(B)}else v.key==="Backspace"&&L&&!k&&h.length?N?.(h.slice(0,-1)):y||x(!0)},ye=v=>v.avatar?e.createElement("img",{src:v.avatar,alt:"",className:g(D[t],"shrink-0 rounded-full object-cover")}):v.icon?e.createElement("span",{className:g(D[t],"flex shrink-0 items-center justify-center",o?"text-light-400":"text-light-500")},v.icon):v.dot?e.createElement("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:o?"#d0d5dd":v.dot}}):null,Ar=I?ye(I):c?e.createElement("span",{className:g(D[t],"flex shrink-0 items-center justify-center",o?"text-light-400":"text-light-500")},c):null,we=I?e.createElement("span",{className:"flex min-w-0 items-center gap-2 whitespace-nowrap"},e.createElement("span",{className:g("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),Pr=y&&e.createElement("div",{role:"listbox",className:gr({size:t})},H.length===0&&e.createElement("div",{className:g(fe({size:t}),"mx-1 w-auto text-light-500 hover:bg-transparent")},"No options found"),H.map(v=>{const B=L?h.includes(v.id):v.id===p;return e.createElement("div",{key:v.id,className:"px-1 py-0.5"},e.createElement("button",{type:"button",role:"option","aria-selected":B,disabled:v.disabled,onClick:()=>F(v),className:fe({size:t,disabled:v.disabled})},ye(v),e.createElement("span",{className:"flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap"},e.createElement("span",{className:g("truncate font-medium",v.disabled?"text-light-400":"text-light-900")},v.label),v.supportingText&&e.createElement("span",{className:v.disabled?"text-light-400":"text-light-700"},v.supportingText)),B&&e.createElement(xr,{className:"ml-auto size-5 shrink-0 text-primary-500"})))}));return e.createElement("div",{ref:T,className:g(u?Er:mr(),S)},r&&e.createElement("label",{className:u?wr():pr()},r,l&&e.createElement("span",{className:"text-error-400"},"*"),n),e.createElement("div",{className:"relative",onKeyDown:v=>{v.key==="Escape"&&W()}},s==="default"?e.createElement("button",{type:"button","aria-haspopup":"listbox","aria-expanded":y,disabled:o,onClick:ve,className:g(u?xe({size:t,open:y,disabled:o}):be({size:t,open:y,disabled:o}),E)},Ar,e.createElement("span",{className:"flex min-w-0 flex-1 items-center"},we),e.createElement(fr,{className:g(he[t],"shrink-0 text-light-500")})):e.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-expanded":y,onClick:ve,className:g(u?xe({size:t,open:y,disabled:o}):be({size:t,open:y,disabled:o}),E)},e.createElement(hr,{className:g(he[t],"shrink-0",o?"text-light-400":"text-light-500")}),L&&G.length>0&&e.createElement("div",{className:"flex shrink items-center gap-1 overflow-x-auto whitespace-nowrap scrollbar-hide"},G.map(v=>e.createElement(A,{key:v.id,size:"sm",disabled:o,icon:v.avatar?e.createElement("img",{src:v.avatar,alt:"",className:"size-4 shrink-0 rounded-full object-cover"}):void 0,onClose:()=>F(v)},v.label))),!L&&!y&&I?e.createElement("span",{className:"flex min-w-0 flex-1 items-center"},we):e.createElement("input",{ref:C,value:k,disabled:o,placeholder:L&&G.length>0?"":d,onChange:v=>{z(v.target.value),y||x(!0)},onKeyDown:Mr,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"})),Pr),a&&e.createElement("p",{className:br()},a))}const kr=b(["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}}),Sr=b("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}}),Cr=b("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}}),zr=b(["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)]"]),Lr=b("flex w-full flex-col items-start border-b border-light-200 px-4 py-3"),Tr=b("flex w-full flex-col items-start overflow-y-auto py-1"),Br=b(["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}}),Ir=b("ml-auto shrink-0 font-normal text-caption-sm text-light-500"),jr=b("my-1 h-px w-full bg-light-200"),Or=({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"})),Vr=({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"})),_r=({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 Wr({trigger:t="button",label:s="Account",icon:r,avatarSrc:l,avatarInitials:n,header:a,items:d,open:o,defaultOpen:u=!1,onOpenChange:c,disabled:m=!1,align:p="end",className:f,menuClassName:h}){const[N,E]=e.useState(u),S=o!==void 0,y=S?o:N,x=e.useRef(null),k=C=>{S||E(C),c?.(C)};e.useEffect(()=>{if(!y)return;const C=j=>{x.current?.contains(j.target)||k(!1)},L=j=>{j.key==="Escape"&&k(!1)};return document.addEventListener("mousedown",C),document.addEventListener("keydown",L),()=>{document.removeEventListener("mousedown",C),document.removeEventListener("keydown",L)}},[y]);const z=()=>{m||k(!y)},T=C=>{C.disabled||(C.onClick?.(),k(!1))};return e.createElement("div",{ref:x,className:g("relative inline-block",f)},t==="button"&&e.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":y,disabled:m,onClick:z,className:kr({open:y,disabled:m})},e.createElement("span",null,s),y?e.createElement(Vr,{className:"size-[18px]"}):e.createElement(Or,{className:"size-[18px]"})),t==="icon"&&e.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":y,"aria-label":s,disabled:m,onClick:z,className:Sr({disabled:m})},r??e.createElement(_r,{className:"size-5"})),t==="avatar"&&e.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":y,"aria-label":s,disabled:m,onClick:z,className:Cr({open:y,disabled:m})},e.createElement(O,{src:l,initials:n,size:"md",status:"online"})),y&&e.createElement("div",{role:"menu",className:g(zr(),p==="end"?"right-0":"left-0",h)},a&&e.createElement("div",{className:Lr()},e.createElement("div",{className:"flex w-full items-center gap-3"},e.createElement(O,{src:a.avatarSrc,initials:a.avatarInitials,size:"md",status:a.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"},a.name),a.subtitle&&e.createElement("span",{className:"w-full truncate text-caption-lg font-normal text-light-700"},a.subtitle)))),e.createElement("div",{className:Tr()},d.map(C=>C.divider?e.createElement("div",{key:C.id,role:"separator",className:jr()}):e.createElement("button",{key:C.id,type:"button",role:"menuitem",disabled:C.disabled,onClick:()=>T(C),className:Br({disabled:C.disabled})},C.icon&&e.createElement("span",{className:"flex size-4 shrink-0 items-center justify-center"},C.icon),e.createElement("span",{className:"flex-1 truncate"},C.label),C.shortcut&&e.createElement("span",{className:Ir()},C.shortcut))))))}w.Avatar=O,w.AvatarGroup=ne,w.AvatarLabelGroup=ie,w.AvatarProfilePhoto=oe,w.Badge=te,w.BadgeGroup=re,w.Button=M,w.CardNumberInput=Bt,w.Checkbox=q,w.Dropdown=Wr,w.Input=P,w.InputCounter=Tt,w.InputDropdown=Nr,w.Loading=se,w.MultiSelectInput=qt,w.PhoneInput=zt,w.RadioGroup=Be,w.RadioGroupItem=X,w.SaleAmountInput=Lt,w.Tab=ce,w.TabList=de,w.Tag=A,w.Textarea=ge,w.Toggle=J,w.Tooltip=Y,w.WebsiteCopyInput=ur,w.WebsiteInput=rr,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(w,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):(w=typeof globalThis<"u"?globalThis:w||self,i(w.CekatUI={},w.React$1,w.reactDom))})(this,(function(w,i,Ee){"use strict";function Ne(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(s,r,l.get?l:{enumerable:!0,get:()=>t[r]})}}return s.default=t,Object.freeze(s)}const e=Ne(i);function K(t){var s,r,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(s=0;s<n;s++)t[s]&&(r=K(t[s]))&&(l&&(l+=" "),l+=r)}else for(r in t)t[r]&&(l&&(l+=" "),l+=r);return l}function g(){for(var t,s,r=0,l="",n=arguments.length;r<n;r++)(t=arguments[r])&&(s=K(t))&&(l&&(l+=" "),l+=s);return l}const U=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Z=g,b=(t,s)=>r=>{var l;if(s?.variants==null)return Z(t,r?.class,r?.className);const{variants:n,defaultVariants:a}=s,d=Object.keys(n).map(c=>{const m=r?.[c],p=a?.[c];if(m===null)return null;const f=U(m)||U(p);return n[c][f]}),o=r&&Object.entries(r).reduce((c,m)=>{let[p,f]=m;return f===void 0||(c[p]=f),c},{}),u=s==null||(l=s.compoundVariants)===null||l===void 0?void 0:l.reduce((c,m)=>{let{class:p,className:f,...h}=m;return Object.entries(h).every(N=>{let[E,S]=N;return Array.isArray(S)?S.includes({...a,...o}[E]):{...a,...o}[E]===S})?[...c,p,f]:c},[]);return Z(t,d,u,r?.class,r?.className)},ke=b(["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}}),Se=({children:t,className:s,tone:r,variant:l,size:n,iconOnly:a,...d})=>i.createElement("button",{className:g(ke({tone:r,variant:l,size:n,iconOnly:a}),s),...d},t),Ce=({children:t})=>i.createElement("span",{className:"flex items-center"},t),ze=({children:t})=>i.createElement("span",{className:"whitespace-nowrap"},t),M=Se;M.Icon=Ce,M.Text=ze;const Le=b(["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}}),Te={sm:{width:12,height:9},md:{width:14,height:10},lg:{width:14,height:10}},q=e.forwardRef(({id:t,checked:s,indeterminate:r=!1,disabled:l,size:n="md",onCheckedChange:a,className:d},o)=>{const u=()=>{l||a?.(!s)},c=Te[n],m=l?"text-white/80":"text-current";return e.createElement("button",{id:t,ref:o,type:"button",role:"checkbox","aria-checked":r?"mixed":s,disabled:l,onClick:u,className:g(Le({size:n,checked:s,disabled:l}),d)},s&&!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:g(m,"bg-current rounded-sm",n==="sm"&&"h-0.5 w-3",(n==="md"||n==="lg")&&"h-0.5 w-4")}))});q.displayName="Checkbox";const Q=e.createContext(null),Be=({value:t,defaultValue:s,onValueChange:r,children:l,className:n})=>{const[a,d]=e.useState(s),o=t??a,u=c=>{d(c),r?.(c)};return e.createElement(Q.Provider,{value:{value:o,onValueChange:u}},e.createElement("div",{role:"radiogroup",className:n},l))},Ie=()=>{const t=e.useContext(Q);if(!t)throw new Error("RadioGroupItem must be used within RadioGroup");return t},je=b(["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}}),Oe=b(["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}}),X=e.forwardRef(({id:t,value:s,disabled:r,size:l="md",className:n},a)=>{const{value:d,onValueChange:o}=Ie(),u=d===s;return e.createElement("button",{ref:a,id:t,type:"button",role:"radio","aria-checked":u,disabled:r,onClick:()=>{r||o?.(s)},className:g(je({size:l,checked:u,disabled:r}),n)},e.createElement("span",{className:Oe({size:l,checked:u})}))});X.displayName="RadioGroupItem";const Ve=b(["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"}}),_e=b("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}}),J=e.forwardRef(({checked:t=!1,size:s="md",variant:r="default",disabled:l,onCheckedChange:n,className:a},d)=>e.createElement("button",{ref:d,type:"button",role:"switch","aria-checked":t,disabled:l,onClick:()=>{l||n?.(!t)},className:g(Ve({size:s,checked:t,disabled:l,variant:r}),a)},e.createElement("span",{className:_e({size:s,disabled:l})})));J.displayName="Toggle";const We=b(["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}}),Me="mt-1 font-medium text-light-100",Ae=b(["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"}}),_=12,Y=({content:t,supportingText:s,side:r="top",open:l,defaultOpen:n=!1,disabled:a=!1,delay:d=0,className:o,children:u})=>{const[c,m]=e.useState(n),[p,f]=e.useState(null),h=e.useRef(null),N=e.useRef(null),E=()=>{if(a||!h.current)return;const x=h.current.getBoundingClientRect();let k=0,z=0;switch(r){case"top":k=x.top-_,z=x.left+x.width/2;break;case"bottom":k=x.bottom+_,z=x.left+x.width/2;break;case"left":k=x.top+x.height/2,z=x.left-_;break;case"right":k=x.top+x.height/2,z=x.right+_;break}const T=()=>{f({top:k,left:z}),m(!0)};d>0?N.current=window.setTimeout(T,d):T()},S=()=>{N.current&&(clearTimeout(N.current),N.current=null),m(!1)},y=l??c;return e.createElement(e.Fragment,null,e.createElement("span",{ref:h,className:"inline-flex",onMouseEnter:E,onMouseLeave:S,onFocus:E,onBlur:S,tabIndex:0},u),y&&p&&Ee.createPortal(e.createElement("div",{role:"tooltip",className:"fixed z-[9999] pointer-events-none",style:{top:p.top,left:p.left,transform:r==="top"?"translate(-50%, -100%)":r==="bottom"?"translate(-50%, 0)":r==="left"?"translate(-100%, -50%)":"translate(0, -50%)"}},e.createElement("div",{className:g(We({side:r,hasSupportingText:!!s}),o)},t,s&&e.createElement("p",{className:Me},s),e.createElement("span",{className:Ae({side:r})}))),document.body))};Y.displayName="Tooltip";const Pe={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"}},De=b(["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}}),Ge=b(["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}}),He="shrink-0 rounded-[3px] bg-light-100 px-1 text-light-800",Fe="shrink-0 rounded-[3px] p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",$=/^#([0-9a-f]{6})$/i,R=t=>$.test(t.trim()),ee=(t,s)=>{const r=$.exec(t.trim());if(!r)return;const l=parseInt(r[1],16),n=l>>16&255,a=l>>8&255,d=l&255;return`rgba(${n}, ${a}, ${d}, ${s})`},A=({children:t,size:s="sm",shape:r="rounded",icon:l,checked:n,onCheckedChange:a,onClose:d,count:o,disabled:u=!1,className:c,color:m="gray",customColor:p})=>{const f=a!==void 0,h=n!==void 0||!!l,N=!!d||o!==void 0,E=Pe[m],S=!!(p&&R(p)),y=S?{borderColor:p,backgroundColor:ee(p,.12),color:p}:void 0,x=()=>{u||a?.(!n)},k=z=>{!f||u||(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),x())};return e.createElement("div",{role:f?"checkbox":void 0,"aria-checked":f?!!n:void 0,"aria-disabled":u||void 0,tabIndex:f&&!u?0:void 0,onClick:f?x:void 0,onKeyDown:k,style:y,className:g(De({size:s,shape:r,hasLeading:h,hasTrailing:N,interactive:f,disabled:u}),!S&&E.bg,!S&&E.border,!S&&E.text,c)},n!==void 0&&e.createElement("span",{className:g(Ge({checked:n}),!n&&!S&&E.border),style:!n&&S?{borderColor:p}: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"}))),l,e.createElement("span",{className:"whitespace-nowrap"},t),o!==void 0&&e.createElement("span",{className:He},o),d&&e.createElement("button",{type:"button","aria-label":"Remove",disabled:u,onClick:z=>{z.stopPropagation(),d()},className:Fe},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"}))))};A.displayName="Tag";const Ke={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"}},Ue=b(["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}}),Ze="size-4 shrink-0 rounded border bg-white",qe="shrink-0 rounded p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",te=({children:t,size:s="sm",shape:r="pill",variant:l="solid",color:n="brand",customColor:a,modern:d=!1,icon:o,trailingIcon:u,checked:c,onCheckedChange:m,onClose:p,iconOnly:f=!1,disabled:h=!1,className:N})=>{const E=m!==void 0,S=c!==void 0||!!o,y=!!p||!!u,x=Ke[n],k=!!(a&&R(a)),z=k?{borderColor:a,color:a,backgroundColor:l==="outline"?"transparent":ee(a,.1)}:void 0,T=()=>{h||m?.(!c)},C=L=>{!E||h||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),T())};return e.createElement("div",{role:E?"checkbox":void 0,"aria-checked":E?!!c:void 0,"aria-disabled":h||void 0,tabIndex:E&&!h?0:void 0,onClick:E?T:void 0,onKeyDown:C,style:z,className:g(Ue({size:s,shape:r,modern:d,hasLeading:S,hasTrailing:y,iconOnly:f,interactive:E,disabled:h}),!k&&(l==="outline"?g("bg-transparent",x.outlineBorder,x.outlineText):g(x.solidBg,x.solidBorder,x.solidText)),N)},c!==void 0&&e.createElement("span",{className:g(Ze,c?"bg-primary-500 border-primary-500":!k&&x.solidBorder),style:!c&&k?{borderColor:a}: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,!f&&e.createElement("span",{className:"whitespace-nowrap"},t),u,p&&e.createElement("button",{type:"button","aria-label":"Remove",disabled:h,onClick:L=>{L.stopPropagation(),p()},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"}))))};te.displayName="Badge";const Qe={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"}},Xe={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"}},re=({badgeLabel:t,children:s,size:r="md",theme:l="light",color:n="brand",badgePosition:a="leading",icon:d,onClick:o,className:u})=>{const c=Qe[n],m=Xe[r],p=l==="modern",f=l==="outline",h=g("inline-flex items-center border transition-colors duration-150",m.gap,m.outerPad[a],p?"rounded-lg bg-light-50 border-light-200 shadow-xs":f?g("rounded-full bg-white border-[1.5px]",c.border500):g("rounded-full",c.bg50,c.border200,c.hoverBg100),o&&"cursor-pointer",u),N=g("inline-flex shrink-0 items-center gap-1 border font-medium whitespace-nowrap",m.chipPad,m.text,p?"rounded-md bg-white border-light-200 text-light-800":f?g("rounded-full bg-white border-[1.5px]",c.border500,c.text500):g("rounded-full bg-white",c.border200,c.text500)),E=g("inline-flex items-center gap-1 font-medium",m.text,p?"text-light-800":c.text500),S=e.createElement("span",{className:N},p&&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},a==="leading"&&S,e.createElement("span",{className:E},s,d),a==="trailing"&&S)};re.displayName="BadgeGroup";const Je=({size:t})=>{const s=t*.09,r=(t-s)/2,l=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:`${l*.25} ${l}`,className:"stroke-primary-600"}))},Ye=({size:t})=>{const s=e.useId(),r=t*.125,l=(t-r)/2,n=2*Math.PI*l;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:l,strokeWidth:r,className:"stroke-light-100"}),e.createElement("circle",{cx:t/2,cy:t/2,r:l,strokeWidth:r,strokeLinecap:"round",stroke:`url(#${s})`,strokeDasharray:`${n*.75} ${n}`}))},$e=({size:t})=>{const r=Math.max(t*.1,3),l=(t-r)/2;return e.createElement("div",{className:"relative animate-spin",style:{width:t,height:t}},Array.from({length:12}).map((n,a)=>{const d=30*a,o=.15+.85*a/11;return e.createElement("span",{key:a,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(${l}px) rotate(${-d}deg)`}})}))},Re={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"}},se=({size:t="sm",style:s="line-simple",supportingText:r=!0,label:l="Loading...",className:n})=>{const{box:a,gapClass:d,textClass:o}=Re[t];return e.createElement("div",{role:"status","aria-label":typeof l=="string"?l:"Loading",className:g("inline-flex flex-col items-center",d,n)},s==="line-simple"&&e.createElement(Je,{size:a}),s==="line-spinner"&&e.createElement(Ye,{size:a}),s==="dot-circle"&&e.createElement($e,{size:a}),r&&e.createElement("p",{className:g("font-medium text-light-700 whitespace-nowrap",o)},l))};se.displayName="Loading";const ae=({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"})),le=({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"})),et={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"}},tt="#17B26A",O=({src:t,alt:s,initials:r,size:l="md",status:n="none",statusIcon:a,contrastBorder:d=!0,className:o})=>{const{box:u,borderWidth:c,statusSize:m,badgeSize:p,textClass:f}=et[l],h=t?"image":r!==void 0?"initials":"placeholder";return e.createElement("div",{className:g("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(ae,{className:"text-light-300",style:{width:u*.55,height:u*.55}})),h==="initials"&&e.createElement("div",{className:g("absolute inset-0 flex items-center justify-center rounded-full bg-light-50 font-semibold text-light-500",f)},r),d&&e.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:c,borderStyle:"solid"}}),n==="online"&&e.createElement("span",{className:"absolute bottom-0 right-0 rounded-full border-[1.5px] border-white",style:{width:m,height:m,backgroundColor:tt}}),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:p,height:p}},a),n==="verified"&&e.createElement("div",{className:"absolute bottom-0 right-0",style:{width:p,height:p}},e.createElement(le,{className:"size-full"})))};O.displayName="Avatar";const rt={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"}},ne=({avatars:t,max:s,size:r="xs",onAdd:l,className:n})=>{const{box:a,overlap:d,contrastBorderWidth:o,textClass:u}=rt[r],c=s?t.slice(0,s):t,m=s&&t.length>s?t.length-s:0;return e.createElement("div",{className:g("inline-flex items-start gap-2",n)},e.createElement("div",{className:"flex items-start"},c.map((p,f)=>e.createElement("div",{key:f,className:"relative shrink-0 overflow-hidden rounded-full border-[1.5px] border-white",style:{width:a,height:a,marginRight:d}},p.src?e.createElement("img",{src:p.src,alt:p.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"},p.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:a,height:a}},e.createElement("span",{className:g("font-semibold text-light-600",u)},"+",m))),l&&e.createElement("button",{type:"button",onClick:l,"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:a,height:a}},e.createElement("svg",{width:a*.4,height:a*.4,viewBox:"0 0 20 20",fill:"none"},e.createElement("path",{d:"M10 4v12M4 10h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}))))};ne.displayName="AvatarGroup";const st={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"}},ie=({name:t,subtitle:s,src:r,initials:l,size:n="xs",status:a="none",statusIcon:d,className:o})=>{const{nameClass:u,subtitleClass:c}=st[n];return e.createElement("div",{className:g("inline-flex items-center gap-2",o)},e.createElement(O,{src:r,initials:l,size:n,status:a,statusIcon:d}),e.createElement("div",{className:"flex flex-col items-start whitespace-nowrap"},e.createElement("span",{className:g("font-bold text-light-800",u)},t),s&&e.createElement("span",{className:g("font-normal text-light-700",c)},s)))};ie.displayName="AvatarLabelGroup";const at={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}},oe=({src:t,alt:s,initials:r,size:l="sm",verified:n=!0,contrastBorder:a=!0,className:d})=>{const{box:o,ringWidth:u,shadowClass:c,iconSize:m,textClass:p,verifiedSize:f,verifiedOffset:h}=at[l],N=t?"image":r!==void 0?"initials":"placeholder";return e.createElement("div",{className:g("relative rounded-full",d),style:{width:o,height:o}},e.createElement("div",{className:g("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:s??"",className:"absolute inset-0 size-full rounded-full object-cover"}),a&&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(ae,{className:"text-light-300",style:{width:m,height:m}})),N==="initials"&&e.createElement("div",{className:g("absolute inset-0 flex items-center justify-center font-semibold text-light-500",p)},r)),n&&e.createElement("div",{className:"absolute",style:{width:f,height:f,bottom:h,right:h}},e.createElement(le,{className:"size-full"})))};oe.displayName="AvatarProfilePhoto";const lt={"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"}},nt={"button-gray":"rounded-md","button-white":"rounded-md","button-primary":"rounded-md",underline:"rounded-none","underline-filled":"rounded-none",line:"rounded-none"},it={"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}},ot="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",ct={"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}},ce=({children:t,variant:s="button-primary",size:r="sm",active:l=!1,fullWidth:n=!1,count:a,disabled:d=!1,onClick:o,className:u})=>{const c=it[s];return e.createElement("button",{type:"button",role:"tab","aria-selected":l,disabled:d,onClick:o,className:g("inline-flex items-center justify-center font-semibold transition-colors duration-150",lt[s][r],nt[s],l?c.active:c.inactive,!l&&!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",n&&"w-full",d?"cursor-not-allowed opacity-60":"cursor-pointer",u)},e.createElement("span",{className:"whitespace-nowrap"},t),a!==void 0&&e.createElement("span",{className:ot},a))};ce.displayName="Tab";const de=({children:t,variant:s="button-primary",orientation:r="horizontal",boxed:l=!1,className:n})=>{const{gapClass:a,hasHairline:d}=ct[s];return e.createElement("div",{role:"tablist","aria-orientation":r,className:g("inline-flex",r==="vertical"?"flex-col items-stretch":"flex-row items-center",a,l&&"rounded-lg border border-light-200 bg-light-50 p-1",d&&r==="horizontal"&&!l&&"border-b border-light-200",n)},t)};de.displayName="TabList";const dt=b("flex flex-col gap-1 w-full",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-sm"}},defaultVariants:{size:"md"}}),ut=b("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),mt=b(["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}}),pt=b(["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}}),gt=b("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}}}),bt=b("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}}),ft=b("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}}),ht=b("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"}}),ue=b(["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"}}),xt=b("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"}}),me=({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"})),vt={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},yt=({size:t,error:s,disabled:r})=>g("flex items-center w-full gap-2 rounded-lg border bg-white px-2 transition-[border-color,border-width]",vt[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})=>g("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),Et="flex flex-col w-full max-w-[320px]";function V({label:t,required:s,hint:r,rightIcon:l,size:n="md",error:a=!1,disabled:d=!1,compact:o=!1,hideCalendarIcon:u=!1,type:c,prefix:m,suffix:p,leadingAddon:f,leadingDropdown:h,trailingDropdown:N,trailingButton:E,maxLength:S,value:y,className:x,wrapperClassName:k,...z}){const T=!!(f||E),C=i.createElement(i.Fragment,null,h&&i.createElement("button",{type:"button",onClick:h.onClick,disabled:h.disabled||d,className:ue({size:n})},i.createElement("span",null,h.value),i.createElement(me,{className:"size-5 text-light-500"})),m&&i.createElement("div",{className:"flex items-center"},m),i.createElement("input",{...z,type:c,disabled:d,maxLength:S,value:y,className:g(pt({size:n,error:a}),"h-full",u&&"[&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-clear-button]:hidden",c==="date"&&"[&::-webkit-datetime-edit]:p-0 [&::-webkit-datetime-edit-fields-wrapper]:p-0",x)}),(l||p)&&i.createElement("div",{className:"flex h-full items-center gap-2"},l&&i.createElement("div",{className:"flex h-full items-center pb-0.5 text-light-400 hover:text-light-600"},l),p&&i.createElement("div",{className:"flex h-full items-center gap-1 leading-none text-light-700"},p)),N&&i.createElement("button",{type:"button",onClick:N.onClick,disabled:N.disabled||d,className:ue({size:n})},i.createElement("span",null,N.value),i.createElement(me,{className:"size-5 text-light-500"})));return i.createElement("div",{className:g(o?Et:dt({size:n}),k)},t&&i.createElement("label",{className:o?wt({error:a}):ut({error:a})},t,s&&i.createElement("span",{className:"text-error-400"},"*")),T?i.createElement("div",{className:bt({size:n,error:a,disabled:d})},f&&i.createElement("div",{className:ht({size:n})},f),i.createElement("div",{className:ft({size:n,disabled:d})},C),E&&i.createElement("button",{type:"button",onClick:E.onClick,disabled:E.disabled||d,className:xt({size:n})},E.icon,i.createElement("span",null,E.label))):i.createElement("div",{className:o?yt({size:n,error:a,disabled:d}):mt({size:n,error:a,disabled:d})},C),S&&typeof y=="string"&&i.createElement("div",{className:"text-right text-xs text-light-400"},y.length,"/",S),r&&i.createElement("p",{className:gt({error:a})},r))}function Nt({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}function kt({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}var St={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 Ct=(t,s,r,l)=>{const n=i.forwardRef(({color:a="currentColor",size:d=24,stroke:o=2,title:u,className:c,children:m,...p},f)=>i.createElement("svg",{ref:f,...St[t],width:d,height:d,className:["tabler-icon",`tabler-icon-${s}`,c].join(" "),strokeWidth:o,stroke:a,...p},[u&&i.createElement("title",{key:"svg-title"},u),...l.map(([h,N])=>i.createElement(h,N)),...Array.isArray(m)?m:[m]]));return n.displayName=`${r}`,n};const pe=Ct("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);function zt({size:t="md",label:s,required:r,hint:l,error:n,disabled:a,placeholder:d="+1 (555) 000-0000",rightIcon:o,value:u,onChange:c,className:m,wrapperClassName:p}){return i.createElement(V,{size:t,label:s,required:r,hint:l,error:n,disabled:a,placeholder:d,rightIcon:o,value:u,onChange:c,className:m,wrapperClassName:p,prefix:i.createElement("div",{className:"flex items-center gap-1 pr-2 text-sm text-light-700"},i.createElement("span",null,"US"),i.createElement(pe,{size:14}))})}function Lt({size:t="md",label:s,required:r,hint:l,error:n,disabled:a,value:d,placeholder:o="1,000.00",currency:u="USD",onCurrencyChange:c,rightIcon:m,onChange:p,className:f,wrapperClassName:h}){return i.createElement(V,{size:t,label:s,required:r,hint:l,error:n,disabled:a,value:d,placeholder:o,rightIcon:m,onChange:p,className:f,wrapperClassName:h,prefix:i.createElement("span",{className:"select-none text-sm text-light-700"},"$"),suffix:i.createElement("button",{type:"button",disabled:a,onClick:c,className:"flex items-center gap-1 text-sm text-light-700 hover:text-light-900 disabled:cursor-not-allowed"},u,i.createElement(pe,{size:14}))})}function Tt({size:t="md",label:s,required:r,hint:l,disabled:n,error:a,className:d,wrapperClassName:o,value:u,maxLength:c,placeholder:m,onChange:p}){const f=u.length>c,h=a||f;return i.createElement(V,{size:t,label:s,required:r,disabled:n,error:h,value:u,placeholder:m,onChange:p,className:d,wrapperClassName:o,hint:l,suffix:i.createElement("span",{className:g("text-caption-lg",f?"text-error-600":"text-light-400")},u.length,"/",c)})}function Bt({size:t="md",label:s="Card number",required:r,hint:l,error:n,disabled:a,placeholder:d="Card number",value:o,onChange:u,rightIcon:c,prefix:m,className:p,wrapperClassName:f}){return i.createElement(V,{size:t,label:s,required:r,hint:l,error:n,disabled:a,placeholder:d,value:o,onChange:u,rightIcon:c,className:p,wrapperClassName:f,prefix:m??i.createElement("img",{src:"/stories/assets/mastercard.png",alt:"mastercard",className:"h-4 w-6 object-contain"}),inputMode:"numeric",autoComplete:"cc-number"})}const P=V;P.Prefix=Nt,P.Suffix=kt;const It="flex flex-col gap-1 w-full",jt=b("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),Ot=b(["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}}),Vt=b(["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}}),_t=b("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}},defaultVariants:{error:!1}}),Wt=({error:t,disabled:s})=>g("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"),Mt=({error:t})=>g("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),At=t=>g("flex-1 min-h-[64px] bg-transparent outline-none text-sm text-light-900","placeholder:text-light-500",t?"resize-y":"resize-none"),Pt="flex flex-col w-full max-w-[320px]",ge=e.forwardRef(({label:t,required:s,hint:r,helpIcon:l,error:n=!1,disabled:a=!1,resizable:d=!0,compact:o=!1,rows:u,style:c,className:m,wrapperClassName:p,...f},h)=>{const N=u?{minHeight:`${u*20}px`}:void 0;return e.createElement("div",{className:g(o?Pt:It,p)},t&&e.createElement("label",{className:o?Mt({error:n}):jt({error:n})},t,s&&e.createElement("span",{className:"text-error-400"},"*"),l),e.createElement("div",{className:o?Wt({error:n,disabled:a}):Ot({error:n,disabled:a})},e.createElement("textarea",{ref:h,disabled:a,rows:u,style:{...N,...c},className:g(o?At(d&&!a):Vt({resizable:d&&!a}),m),...f})),r&&e.createElement("p",{className:_t({error:n})},r))});ge.displayName="Textarea";const Dt=b("flex w-[320px] flex-col gap-1"),Gt=b("flex items-center gap-1 text-sm font-bold",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),Ht=b(["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}}),Ft=b(["flex items-center gap-1","overflow-x-auto overflow-y-hidden","whitespace-nowrap","scrollbar-hide","flex-1"]),Kt=b("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"),Ut=b(["min-w-[120px]","bg-transparent outline-none","text-light-900 placeholder:text-light-500"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:""}}}),Zt=b("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function qt({size:t="md",label:s,required:r,hint:l,error:n=!1,disabled:a=!1,placeholder:d="Add items",rightIcon:o,className:u,wrapperClassName:c,options:m,value:p=[],onChange:f}){const h=i.useId(),[N,E]=i.useState(""),S=x=>{const k=m.find(z=>z.label===x);k&&(p.some(z=>z.id===k.id)||(f?.([...p,k]),E("")))},y=x=>{f?.(p.filter(k=>k.id!==x))};return i.createElement("div",{className:g(Dt(),c)},s&&i.createElement("label",{className:Gt({error:n})},s,r&&i.createElement("span",{className:"text-error-400"},"*")),i.createElement("div",{className:Ht({size:t,error:n,disabled:a})},i.createElement("div",{className:Ft()},p.map(x=>i.createElement("span",{key:x.id,className:Kt()},x.avatar&&i.createElement("img",{src:x.avatar,alt:x.label,className:"h-4 w-4 rounded-full"}),x.label,!a&&i.createElement("button",{type:"button",onClick:()=>y(x.id),className:"ml-1 text-light-500 hover:text-light-700"},"×"))),i.createElement("input",{list:h,value:N,onChange:x=>{E(x.target.value),S(x.target.value)},placeholder:p.length===0?d:"",disabled:a,className:g(Ut({disabled:a}),u)}),i.createElement("datalist",{id:h},m.map(x=>i.createElement("option",{key:x.id,value:x.label})))),o&&i.createElement("div",{className:"ml-2 flex shrink-0 items-center text-light-400"},o)),l&&i.createElement("p",{className:Zt({error:n})},l))}const Qt=b("flex w-[320px] flex-col gap-1"),Xt=b("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}}}),Jt=b("flex items-stretch rounded-lg border bg-white transition-colors",{variants:{error:{true:"",false:"border-light-200"},disabled:{true:"bg-light-100",false:""}}}),Yt=b("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"}}}),$t="w-px bg-light-200",Rt=b(["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:""}}}),er=b("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),tr=b("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function rr({size:t="md",label:s,required:r,hint:l,error:n=!1,disabled:a=!1,placeholder:d="www.cekat.ai",value:o,rightIcon:u,onChange:c,className:m,wrapperClassName:p}){return i.createElement("div",{className:g(Qt(),p)},s&&i.createElement("label",{className:Xt({error:n})},s,r&&i.createElement("span",{className:"text-error-400"},"*")),i.createElement("div",{className:Jt({error:n,disabled:a})},i.createElement("div",{className:Yt({size:t})},"http://"),i.createElement("div",{className:$t}),i.createElement("div",{className:Rt({size:t,error:n,disabled:a})},i.createElement("input",{value:o,onChange:c,placeholder:d,disabled:a,className:g(er({disabled:a}),m)}),u&&i.createElement("div",{className:"flex items-center text-light-400"},u))),l&&i.createElement("p",{className:tr({error:n})},l))}const sr=b("flex w-[320px] flex-col gap-1"),ar=b("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),lr=b("flex items-stretch rounded-lg border border-light-200 bg-white transition-colors",{variants:{disabled:{true:"bg-light-100",false:""}}}),nr=b(["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:""}}}),ir=b("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"}}}),or=b("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"}}}),cr=b("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),dr=b("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function ur({size:t="md",label:s,required:r,hint:l,error:n=!1,disabled:a=!1,placeholder:d="www.cekat.ai",value:o,rightIcon:u,suffix:c,onChange:m,className:p,wrapperClassName:f}){return i.createElement("div",{className:g(sr(),f)},s&&i.createElement("label",{className:ar({error:n})},s,r&&i.createElement("span",{className:"text-error-400"},"*")),i.createElement("div",{className:lr({disabled:a})},i.createElement("div",{className:nr({size:t,error:n,disabled:a})},i.createElement("input",{value:o,onChange:m,placeholder:d,disabled:a,className:g(cr({disabled:a}),p)}),u&&i.createElement("div",{className:"text-light-400"},u)),i.createElement("div",{className:ir({error:n})}),i.createElement("div",{className:or({size:t,disabled:a})},c)),l&&i.createElement("p",{className:dr({error:n})},l))}const mr=b("flex w-full flex-col gap-1"),pr=b("flex items-center gap-1 text-sm font-bold text-light-800"),be=b(["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}}),gr=b(["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"}}),fe=b("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}}),br=b("text-caption-lg text-light-700"),fr=({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"})),hr=({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"})),xr=({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"})),D={xs:"size-4",sm:"size-5",md:"size-6"},he={xs:"size-4",sm:"size-5",md:"size-5"},vr={xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},yr={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},xe=({size:t,open:s,disabled:r})=>g("flex w-full items-center gap-2 rounded-lg border bg-white px-2 text-left transition-[border-color,border-width]",vr[t],yr[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"),wr=()=>"flex items-center gap-1 text-caption-sm font-semibold text-light-800",Er="flex w-full max-w-[320px] flex-col";function Nr({size:t="md",type:s="default",label:r,required:l,helpIcon:n,hint:a,placeholder:d="Select option",disabled:o=!1,compact:u=!1,leadingIcon:c,options:m,value:p=null,onChange:f,values:h=[],onValuesChange:N,className:E,wrapperClassName:S}){const[y,x]=e.useState(!1),[k,z]=e.useState(""),T=e.useRef(null),C=e.useRef(null),L=s==="tags",j=s==="search"||L,I=m.find(v=>v.id===p)??null,G=m.filter(v=>h.includes(v.id)),H=k?m.filter(v=>`${v.label} ${v.supportingText??""}`.toLowerCase().includes(k.toLowerCase())):m,W=()=>{x(!1),z("")};e.useEffect(()=>{if(!y)return;const v=B=>{T.current?.contains(B.target)||W()};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[y]),e.useEffect(()=>{y&&j&&C.current?.focus()},[y,j]);const ve=()=>{o||(y?W():x(!0))},F=v=>{v.disabled||(L?(N?.(h.includes(v.id)?h.filter(B=>B!==v.id):[...h,v.id]),z(""),C.current?.focus()):(f?.(v),W()))},Mr=v=>{if(v.key==="Enter"){v.preventDefault();const B=H.find(Dr=>!Dr.disabled);y&&B&&F(B)}else v.key==="Backspace"&&L&&!k&&h.length?N?.(h.slice(0,-1)):y||x(!0)},ye=v=>v.avatar?e.createElement("img",{src:v.avatar,alt:"",className:g(D[t],"shrink-0 rounded-full object-cover")}):v.icon?e.createElement("span",{className:g(D[t],"flex shrink-0 items-center justify-center",o?"text-light-400":"text-light-500")},v.icon):v.dot?e.createElement("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:o?"#d0d5dd":v.dot}}):null,Ar=I?ye(I):c?e.createElement("span",{className:g(D[t],"flex shrink-0 items-center justify-center",o?"text-light-400":"text-light-500")},c):null,we=I?e.createElement("span",{className:"flex min-w-0 items-center gap-2 whitespace-nowrap"},e.createElement("span",{className:g("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),Pr=y&&e.createElement("div",{role:"listbox",className:gr({size:t})},H.length===0&&e.createElement("div",{className:g(fe({size:t}),"mx-1 w-auto text-light-500 hover:bg-transparent")},"No options found"),H.map(v=>{const B=L?h.includes(v.id):v.id===p;return e.createElement("div",{key:v.id,className:"px-1 py-0.5"},e.createElement("button",{type:"button",role:"option","aria-selected":B,disabled:v.disabled,onClick:()=>F(v),className:fe({size:t,disabled:v.disabled})},ye(v),e.createElement("span",{className:"flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap"},e.createElement("span",{className:g("truncate font-medium",v.disabled?"text-light-400":"text-light-900")},v.label),v.supportingText&&e.createElement("span",{className:v.disabled?"text-light-400":"text-light-700"},v.supportingText)),B&&e.createElement(xr,{className:"ml-auto size-5 shrink-0 text-primary-500"})))}));return e.createElement("div",{ref:T,className:g(u?Er:mr(),S)},r&&e.createElement("label",{className:u?wr():pr()},r,l&&e.createElement("span",{className:"text-error-400"},"*"),n),e.createElement("div",{className:"relative",onKeyDown:v=>{v.key==="Escape"&&W()}},s==="default"?e.createElement("button",{type:"button","aria-haspopup":"listbox","aria-expanded":y,disabled:o,onClick:ve,className:g(u?xe({size:t,open:y,disabled:o}):be({size:t,open:y,disabled:o}),E)},Ar,e.createElement("span",{className:"flex min-w-0 flex-1 items-center"},we),e.createElement(fr,{className:g(he[t],"shrink-0 text-light-500")})):e.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-expanded":y,onClick:ve,className:g(u?xe({size:t,open:y,disabled:o}):be({size:t,open:y,disabled:o}),E)},e.createElement(hr,{className:g(he[t],"shrink-0",o?"text-light-400":"text-light-500")}),L&&G.length>0&&e.createElement("div",{className:"flex shrink items-center gap-1 overflow-x-auto whitespace-nowrap scrollbar-hide"},G.map(v=>e.createElement(A,{key:v.id,size:"sm",disabled:o,icon:v.avatar?e.createElement("img",{src:v.avatar,alt:"",className:"size-4 shrink-0 rounded-full object-cover"}):void 0,onClose:()=>F(v)},v.label))),!L&&!y&&I?e.createElement("span",{className:"flex min-w-0 flex-1 items-center"},we):e.createElement("input",{ref:C,value:k,disabled:o,placeholder:L&&G.length>0?"":d,onChange:v=>{z(v.target.value),y||x(!0)},onKeyDown:Mr,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"})),Pr),a&&e.createElement("p",{className:br()},a))}const kr=b(["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}}),Sr=b("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}}),Cr=b("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}}),zr=b(["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)]"]),Lr=b("flex w-full flex-col items-start border-b border-light-200 px-4 py-3"),Tr=b("flex w-full flex-col items-start overflow-y-auto py-1"),Br=b(["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}}),Ir=b("ml-auto shrink-0 font-normal text-caption-sm text-light-500"),jr=b("my-1 h-px w-full bg-light-200"),Or=({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"})),Vr=({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"})),_r=({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 Wr({trigger:t="button",label:s="Account",icon:r,avatarSrc:l,avatarInitials:n,header:a,items:d,open:o,defaultOpen:u=!1,onOpenChange:c,disabled:m=!1,align:p="end",className:f,menuClassName:h}){const[N,E]=e.useState(u),S=o!==void 0,y=S?o:N,x=e.useRef(null),k=C=>{S||E(C),c?.(C)};e.useEffect(()=>{if(!y)return;const C=j=>{x.current?.contains(j.target)||k(!1)},L=j=>{j.key==="Escape"&&k(!1)};return document.addEventListener("mousedown",C),document.addEventListener("keydown",L),()=>{document.removeEventListener("mousedown",C),document.removeEventListener("keydown",L)}},[y]);const z=()=>{m||k(!y)},T=C=>{C.disabled||(C.onClick?.(),k(!1))};return e.createElement("div",{ref:x,className:g("relative inline-block",f)},t==="button"&&e.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":y,disabled:m,onClick:z,className:kr({open:y,disabled:m})},e.createElement("span",null,s),y?e.createElement(Vr,{className:"size-[18px]"}):e.createElement(Or,{className:"size-[18px]"})),t==="icon"&&e.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":y,"aria-label":s,disabled:m,onClick:z,className:Sr({disabled:m})},r??e.createElement(_r,{className:"size-5"})),t==="avatar"&&e.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":y,"aria-label":s,disabled:m,onClick:z,className:Cr({open:y,disabled:m})},e.createElement(O,{src:l,initials:n,size:"md",status:"online"})),y&&e.createElement("div",{role:"menu",className:g(zr(),p==="end"?"right-0":"left-0",h)},a&&e.createElement("div",{className:Lr()},e.createElement("div",{className:"flex w-full items-center gap-3"},e.createElement(O,{src:a.avatarSrc,initials:a.avatarInitials,size:"md",status:a.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"},a.name),a.subtitle&&e.createElement("span",{className:"w-full truncate text-caption-lg font-normal text-light-700"},a.subtitle)))),e.createElement("div",{className:Tr()},d.map(C=>C.divider?e.createElement("div",{key:C.id,role:"separator",className:jr()}):e.createElement("button",{key:C.id,type:"button",role:"menuitem",disabled:C.disabled,onClick:()=>T(C),className:Br({disabled:C.disabled})},C.icon&&e.createElement("span",{className:"flex size-4 shrink-0 items-center justify-center"},C.icon),e.createElement("span",{className:"flex-1 truncate"},C.label),C.shortcut&&e.createElement("span",{className:Ir()},C.shortcut))))))}w.Avatar=O,w.AvatarGroup=ne,w.AvatarLabelGroup=ie,w.AvatarProfilePhoto=oe,w.Badge=te,w.BadgeGroup=re,w.Button=M,w.CardNumberInput=Bt,w.Checkbox=q,w.Dropdown=Wr,w.Input=P,w.InputCounter=Tt,w.InputDropdown=Nr,w.Loading=se,w.MultiSelectInput=qt,w.PhoneInput=zt,w.RadioGroup=Be,w.RadioGroupItem=X,w.SaleAmountInput=Lt,w.Tab=ce,w.TabList=de,w.Tag=A,w.Textarea=ge,w.Toggle=J,w.Tooltip=Y,w.WebsiteCopyInput=ur,w.WebsiteInput=rr,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cekat-ui",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Cekat UI Component Library",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": "dist/index.es.js",