@openway/ui 1.0.1 → 1.0.2

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.
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{rankItem as me,compareItems as xe}from"@tanstack/match-sorter-utils";function p(e,r,o){return e!=null&&Object.prototype.hasOwnProperty.call(r,e)?r[e]:r[o]}function ze(e,r,o){let t=r.trim();if(!t||!e.length)return e;let c=o?Array.isArray(o)?o:[o]:[],l=[];if(c.length>0)for(let n of c)typeof n=="function"?l.push(i=>{let a=n(i);return a!=null?String(a):""}):l.push(i=>{let a=i,u=a[n];if(u!=null)return String(u);if(a.data&&typeof a.data=="object"){let d=a.data[n];if(d!=null)return String(d)}return""});else l.push(n=>{if(n&&typeof n=="object"){let i=n;return i.label!=null?String(i.label):i.value!=null?String(i.value):""}return n!=null?String(n):""});let s=[];for(let n of e){let i=me(n,t,{accessors:l});i.passed&&s.push({item:n,info:i})}return s.sort((n,i)=>xe(n.info,i.info)),s.map(n=>n.item)}import{jsx as F,jsxs as ye}from"react/jsx-runtime";function P({width:e=16,height:r=16,className:o="",...t}){return ye("svg",{width:e,height:r,className:`animate-[spin_1s_steps(8)_infinite] ${o}`,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[F("path",{d:"M0 0h25v24H0z",fill:"none"}),F("path",{fill:"currentColor",d:"M4.818 6.664h-.001a1.847 1.847 0 1 1 1.306-.541a1.77 1.77 0 0 1-1.277.541h-.029zm-2.97 7.182h-.001a1.847 1.847 0 1 1 1.306-.541a1.77 1.77 0 0 1-1.278.541h-.031h.002zM12 3.692a1.847 1.847 0 1 1 1.306-.541a1.77 1.77 0 0 1-1.277.541zM4.818 21.029h-.001a1.847 1.847 0 1 1 1.306-.541a1.77 1.77 0 0 1-1.276.541h-.031zM19.182 7.125a2.308 2.308 0 1 1 0-4.615a2.308 2.308 0 0 1 0 4.615M12 24a1.847 1.847 0 1 1 1.306-.541a1.77 1.77 0 0 1-1.277.541zm10.154-9.231h-.048c-.75 0-1.428-.309-1.913-.807l-.001-.001c-.499-.503-.808-1.196-.808-1.961s.308-1.458.808-1.962a2.66 2.66 0 0 1 1.914-.808h.05h-.003h.048c.75 0 1.427.309 1.913.807l.001.001c.499.503.808 1.196.808 1.961s-.308 1.458-.808 1.962a2.66 2.66 0 0 1-1.915.809h-.049zm-2.971 7.643h-.05a3.1 3.1 0 0 1-2.236-.951l-.001-.001c-.584-.584-.945-1.391-.945-2.283s.361-1.698.945-2.283a3.1 3.1 0 0 1 2.234-.945h.054h-.003h.042c.877 0 1.67.362 2.237.944l.001.001c.588.582.952 1.39.952 2.283s-.364 1.7-.952 2.282a3.1 3.1 0 0 1-2.24.953h-.04z"})]})}import{jsx as U}from"react/jsx-runtime";function z({width:e=14,height:r=14,className:o="",...t}){return U("svg",{width:e,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:o,...t,children:U("path",{d:"M18 6 6 18M6 6l12 12"})})}import{jsx as V,jsxs as he}from"react/jsx-runtime";function R({width:e=20,height:r=20,className:o="",...t}){return he("svg",{width:e,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,...t,children:[V("circle",{cx:"12",cy:"12",r:"10"}),V("path",{d:"M12 16v-4"}),V("path",{d:"M12 8h.01"})]})}import{jsx as K,jsxs as we}from"react/jsx-runtime";function E({width:e=20,height:r=20,className:o="",...t}){return we("svg",{width:e,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,...t,children:[K("circle",{cx:"12",cy:"12",r:"10"}),K("path",{d:"m9 12 2 2 4-4"})]})}import{jsx as j,jsxs as Te}from"react/jsx-runtime";function G({width:e=20,height:r=20,className:o="",...t}){return Te("svg",{width:e,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,...t,children:[j("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),j("path",{d:"M12 9v4"}),j("path",{d:"M12 17h.01"})]})}import{jsx as L,jsxs as ve}from"react/jsx-runtime";function M({width:e=20,height:r=20,className:o="",...t}){return ve("svg",{width:e,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:o,...t,children:[L("circle",{cx:"12",cy:"12",r:"10"}),L("path",{d:"M12 8v4"}),L("path",{d:"M12 16h.01"})]})}var H={xs:{container:"p-2 gap-2 text-xs",title:"text-xs font-semibold leading-tight",description:"text-[11px] leading-tight",icon:"size-3.5 mt-0.5",closeButton:"size-4 p-0.5 -mr-0.5",closeIcon:"size-3",action:"gap-1.5 text-xs"},sm:{container:"p-2.5 gap-2.5 text-xs",title:"text-sm font-semibold leading-tight",description:"text-xs leading-normal",icon:"size-4 mt-0.5",closeButton:"size-5 p-0.5 -mr-0.5",closeIcon:"size-3.5",action:"gap-1.5 text-xs"},md:{container:"p-3.5 gap-3 text-sm",title:"text-sm font-semibold leading-tight",description:"text-sm leading-normal",icon:"size-5 mt-0.5",closeButton:"size-6 p-1 -mr-1",closeIcon:"size-4",action:"gap-2 text-sm"},lg:{container:"p-4 gap-3.5 text-base",title:"text-base font-semibold leading-snug",description:"text-sm leading-normal",icon:"size-6 mt-0.5",closeButton:"size-7 p-1.5 -mr-1.5",closeIcon:"size-4.5",action:"gap-2.5 text-sm"},xl:{container:"p-5 gap-4 text-lg",title:"text-lg font-semibold leading-snug",description:"text-base leading-normal",icon:"size-7 mt-0.5",closeButton:"size-8 p-1.5 -mr-1.5",closeIcon:"size-5",action:"gap-3 text-base"}},W={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-2xl"},Z={soft:{primary:"bg-primary-50 text-primary-900 border-2 border-primary-200",secondary:"bg-secondary-50 text-secondary-900 border-2 border-secondary-200",neutral:"bg-neutral-100 text-neutral-900 border-2 border-neutral-200",error:"bg-error-50 text-error-900 border-2 border-error-200",success:"bg-success-50 text-success-900 border-2 border-success-200",warning:"bg-warning-50 text-warning-900 border-2 border-warning-200",info:"bg-info-50 text-info-900 border-2 border-info-200"},filled:{primary:"bg-primary-600 text-white border-2 border-primary-600",secondary:"bg-secondary-600 text-white border-2 border-secondary-600",neutral:"bg-neutral-700 text-white border-2 border-neutral-700",error:"bg-error-600 text-white border-2 border-error-600",success:"bg-success-600 text-white border-2 border-success-600",warning:"bg-warning-500 text-neutral-950 border-2 border-warning-500",info:"bg-info-600 text-white border-2 border-info-600"},outline:{primary:"bg-neutral-white text-primary-700 border-2 border-primary-400",secondary:"bg-neutral-white text-secondary-700 border-2 border-secondary-400",neutral:"bg-neutral-white text-neutral-700 border-2 border-neutral-300",error:"bg-neutral-white text-error-700 border-2 border-error-500",success:"bg-neutral-white text-success-700 border-2 border-success-400",warning:"bg-neutral-white text-warning-800 border-2 border-warning-400",info:"bg-neutral-white text-info-700 border-2 border-info-400"},"accent-left":{primary:"bg-primary-50/70 text-primary-900 border-2 border-primary-200 border-l-4 border-l-primary-500",secondary:"bg-secondary-50/70 text-secondary-900 border-2 border-secondary-200 border-l-4 border-l-secondary-500",neutral:"bg-neutral-50/70 text-neutral-900 border-2 border-neutral-200 border-l-4 border-l-neutral-500",error:"bg-error-50/70 text-error-900 border-2 border-error-200 border-l-4 border-l-error-500",success:"bg-success-50/70 text-success-900 border-2 border-success-200 border-l-4 border-l-success-500",warning:"bg-warning-50/70 text-warning-900 border-2 border-warning-200 border-l-4 border-l-warning-500",info:"bg-info-50/70 text-info-900 border-2 border-info-200 border-l-4 border-l-info-500"},ghost:{primary:"bg-transparent text-primary-800 border-2 border-transparent",secondary:"bg-transparent text-secondary-800 border-2 border-transparent",neutral:"bg-transparent text-neutral-800 border-2 border-transparent",error:"bg-transparent text-error-700 border-2 border-transparent",success:"bg-transparent text-success-700 border-2 border-transparent",warning:"bg-transparent text-warning-800 border-2 border-transparent",info:"bg-transparent text-info-800 border-2 border-transparent"}},q={soft:{primary:"text-primary-600",secondary:"text-secondary-600",neutral:"text-neutral-600",error:"text-error-600",success:"text-success-600",warning:"text-warning-600",info:"text-info-600"},filled:{primary:"text-white",secondary:"text-white",neutral:"text-white",error:"text-white",success:"text-white",warning:"text-neutral-950",info:"text-white"},outline:{primary:"text-primary-600",secondary:"text-secondary-600",neutral:"text-neutral-600",error:"text-error-600",success:"text-success-600",warning:"text-warning-600",info:"text-info-600"},"accent-left":{primary:"text-primary-600",secondary:"text-secondary-600",neutral:"text-neutral-600",error:"text-error-600",success:"text-success-600",warning:"text-warning-600",info:"text-info-600"},ghost:{primary:"text-primary-600",secondary:"text-secondary-600",neutral:"text-neutral-600",error:"text-error-600",success:"text-success-600",warning:"text-warning-600",info:"text-info-600"}},J={primary:R,secondary:R,neutral:R,info:R,success:E,warning:G,error:M};import{jsx as h,jsxs as Q}from"react/jsx-runtime";function I({size:e,variant:r,color:o,radius:t,title:c,description:l,icon:s=!0,action:n,closable:i=!0,onClose:a,closeAriaLabel:u="\u0110\xF3ng c\u1EA3nh b\xE1o",banner:d=!1,titleClassName:m="",descriptionClassName:x="",actionClassName:v="",iconClassName:f="",closeButtonClassName:T="",className:A="",children:N,role:k,ref:ne,...se}){let y=p(e,H,"md"),ie=d?"rounded-none border-x-0 w-full":p(t,W,"lg"),ae=r==="other"?"":p(o,p(r,Z,"soft"),"info"),le=r==="other"?"":p(o,p(r,q,"soft"),"info"),ce=i||!!a,de=O=>{O.stopPropagation(),a?.()},ue=k||(o==="error"||o==="warning"?"alert":"status"),fe=o==="error"||o==="warning"?"assertive":"polite",_=l??N,pe=!!_,ge=()=>{if(s===!1)return null;if(s!==!0&&s!==void 0)return h("span",{className:`inline-flex items-center justify-center shrink-0 leading-none ${y.icon} ${f}`,"aria-hidden":"true",children:s});let O=p(o,J,"info");return h("span",{className:`inline-flex items-center justify-center shrink-0 leading-none ${y.icon} ${le} ${f}`,"aria-hidden":"true",children:h(O,{className:"size-full"})})},be=["relative flex w-full",y.container,ie,ae,A].filter(Boolean).join(" ");return Q("div",{ref:ne,role:ue,"aria-live":fe,className:be,...se,children:[ge(),Q("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[c&&h("div",{className:`${y.title} ${m}`,children:c}),pe&&h("div",{className:`${y.description} ${c?"mt-0.5":""} ${x}`,children:_})]}),n&&h("div",{className:`inline-flex items-center shrink-0 ${y.action} ${v}`,children:n}),ce&&h("button",{type:"button",onClick:de,"aria-label":u,className:`inline-flex items-center justify-center shrink-0 rounded-md transition-colors cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-current opacity-70 hover:opacity-100 ${r==="filled"?"hover:bg-white/20 active:bg-white/30":"hover:bg-black/5 active:bg-black/10"} ${y.closeButton} ${T}`,children:h(z,{className:y.closeIcon})})]})}var b=4e3;import{Toaster as Re}from"sonner";import{jsx as Se}from"react/jsx-runtime";function X({position:e="top-right",visibleToasts:r=3,expand:o=!1,duration:t=4e3,closeButton:c=!1,className:l="",toastOptions:s,...n}){return Se(Re,{position:e,visibleToasts:r,expand:o,duration:t,closeButton:c,className:`toaster group ${l}`,toastOptions:{unstyled:!0,className:"w-full max-w-md pointer-events-auto",...s},...n})}import{isValidElement as Ce}from"react";import{toast as S}from"sonner";import{jsx as $}from"react/jsx-runtime";function w(e,r="info",o="soft",t,c={},l){let{duration:s,position:n,onDismiss:i,onAutoClose:a,...u}=c;return S.custom(d=>$(I,{color:r,variant:o,title:e,description:t,closable:u.closable??!0,onClose:()=>{u.onClose?.(),S.dismiss(d)},...u}),{id:l,duration:s??4e3,position:n,onDismiss:i,onAutoClose:a})}function Ae(e){return typeof e=="object"&&e!==null&&!Ce(e)&&!Array.isArray(e)&&("title"in e||"description"in e||"color"in e||"variant"in e)}function B(e,r,o){return Ae(e)?{title:e.title??"",description:e.description,color:e.color??r,variant:e.variant??o}:{title:e,description:void 0,color:r,variant:o}}var g=((e,r,o)=>{let t=o||{};return w(e,t.color||"info",t.variant||"soft",r,t)});g.custom=(e,r={})=>{if(typeof e=="function")return S.custom(n=>e(n),{duration:r.duration??4e3,position:r.position,onDismiss:r.onDismiss,onAutoClose:r.onAutoClose});let{duration:o,position:t,onDismiss:c,onAutoClose:l,...s}=e;return S.custom(n=>$(I,{closable:s.closable??!0,onClose:()=>{s.onClose?.(),S.dismiss(n)},...s}),{duration:o??4e3,position:t,onDismiss:c,onAutoClose:l})};g.success=(e,r,o)=>{let t=o||{};return w(e,t.color||"success",t.variant||"soft",r,t)};g.error=(e,r,o)=>{let t=o||{};return w(e,t.color||"error",t.variant||"soft",r,t)};g.warning=(e,r,o)=>{let t=o||{};return w(e,t.color||"warning",t.variant||"soft",r,t)};g.info=(e,r,o)=>{let t=o||{};return w(e,t.color||"info",t.variant||"soft",r,t)};g.loading=(e,r,o)=>{let t=o||{};return w(e,t.color||"info",t.variant||"soft",r,{...t,icon:t.icon??$(P,{className:"size-full animate-spin"}),duration:t.duration??1/0,closable:t.closable??!1})};g.promise=async(e,r)=>{let o=typeof e=="function"?e():e,{title:t,description:c}=B(r.loading,"info",r.variant||"soft"),l=g.loading(t,c,{size:r.size,variant:r.variant,radius:r.radius});try{let s=await o,n=typeof r.success=="function"?r.success(s):r.success,{title:i,description:a,color:u,variant:d}=B(n,"success",r.variant||"soft");return w(i,u,d,a,{duration:r.duration??4e3,size:r.size,radius:r.radius},l),s}catch(s){let n=typeof r.error=="function"?r.error(s):r.error,{title:i,description:a,color:u,variant:d}=B(n,"error",r.variant||"soft");throw w(i,u,d,a,{duration:r.duration??4e3,size:r.size,radius:r.radius},l),s}finally{r.finally&&await r.finally()}};g.dismiss=e=>S.dismiss(e);var Ne=g;import{useCallback as Y,useEffect as ee,useRef as ke,useState as re}from"react";function Tr({onLoadMore:e,hasMore:r=!0,isLoading:o=!1,disabled:t=!1,rootMargin:c="100px",threshold:l=0,root:s=null}){let[n,i]=re(!1),[a,u]=re(null),d=ke(!1),m=r&&!o&&!t,x=Y(()=>{if(!(!m||d.current)){d.current=!0;try{let f=e();f&&typeof f.then=="function"?f.finally(()=>{d.current=!1}):d.current=!1}catch{d.current=!1}}},[m,e]),v=Y(f=>{u(f)},[]);return ee(()=>{if(!a||t||!r||typeof window>"u"||!("IntersectionObserver"in window))return;let f=s&&typeof s=="object"&&"current"in s?s.current:s,T=new IntersectionObserver(A=>{let[N]=A;if(!N)return;let k=N.isIntersecting;i(k),k&&x()},{root:f,rootMargin:c,threshold:l});return T.observe(a),()=>{T.disconnect(),i(!1)}},[a,s,c,l,t,r,x]),ee(()=>{m&&n&&x()},[m,n,x]),{sentinelRef:v,isIntersecting:n}}var te={pulse:"animate-pulse",wave:"skeleton-wave",none:""},oe={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"},Rr={cover:"object-cover",contain:"object-contain",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"};var C=e=>e,Cr=e=>e?typeof e=="string"?e:typeof File<"u"&&e instanceof File?`${e.name}-${e.size}-${e.lastModified}`:typeof Blob<"u"&&e instanceof Blob?`${e.size}-${e.type}`:typeof e=="object"&&"src"in e&&typeof e.src=="string"?e.src:e:"";import{jsx as D}from"react/jsx-runtime";function Ie({ref:e,variant:r="pulse",shape:o="rectangle",radius:t="md",width:c,height:l="1rem",lines:s=1,gap:n="0.5rem",className:i="",style:a,...u}){let d=p(r,te,"pulse"),m=o==="circle"?"rounded-full":p(t,oe,"md"),x={width:C(c),height:C(l),...a},v=["bg-neutral-200",d,m].filter(Boolean).join(" ");return s>1?D("div",{ref:e,role:"status","aria-label":"Loading...",className:["flex flex-col",i].filter(Boolean).join(" "),style:{gap:C(n),...a},...u,children:Array.from({length:s}).map((f,T)=>{let A=T===s-1;return D("div",{className:v,style:{width:A?"60%":C(c)??"100%",height:C(l)}},T)})}):D("div",{ref:e,role:"status","aria-label":"Loading...",className:[v,i].filter(Boolean).join(" "),style:x,...u})}var zr={sm:{head:"px-3 py-2 text-xs font-semibold",cell:"px-3 py-2 text-xs",text:"text-xs",icon:"w-3.5 h-3.5"},md:{head:"px-4 py-3 text-sm font-semibold",cell:"px-4 py-3 text-sm",text:"text-sm",icon:"w-4 h-4"},lg:{head:"px-5 py-4 text-base font-semibold",cell:"px-5 py-4 text-base",text:"text-base",icon:"w-5 h-5"}},Vr={default:{container:"border border-neutral-200 shadow-xs",table:"border-collapse",head:"bg-neutral-50/80 border-b border-neutral-200 text-neutral-600",row:"border-b border-neutral-200/80 hover:bg-neutral-50/50 transition-colors",cell:"text-neutral-700"},striped:{container:"border border-neutral-200 shadow-xs",table:"border-collapse",head:"bg-neutral-100/80 border-b border-neutral-200 text-neutral-700",row:"border-b border-neutral-200/80 even:bg-neutral-50/60 hover:bg-neutral-100/40 transition-colors",cell:"text-neutral-700"},bordered:{container:"border border-neutral-200 shadow-xs",table:"border-collapse border border-neutral-200",head:"bg-neutral-50 border border-neutral-200 text-neutral-700",row:"border-b border-neutral-200 hover:bg-neutral-50/50 transition-colors",cell:"border border-neutral-200 text-neutral-700"}},Er={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"},jr=[10,20,50,100],Gr=10;export{p as a,ze as b,P as c,z as d,R as e,E as f,G as g,M as h,I as i,b as j,X as k,Ne as l,Tr as m,oe as n,Rr as o,Cr as p,Ie as q,zr as r,Vr as s,Er as t,jr as u,Gr as v};
3
+ //# sourceMappingURL=chunk-X4LIYOS5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/function.ts","../src/components/icons/Spinner.tsx","../src/components/icons/CloseIcon.tsx","../src/components/icons/InfoCircleIcon.tsx","../src/components/icons/CheckCircleIcon.tsx","../src/components/icons/AlertTriangleIcon.tsx","../src/components/icons/AlertCircleIcon.tsx","../src/components/alert/constants.ts","../src/components/alert/Alert.tsx","../src/components/toast/constants.ts","../src/components/toast/Toaster.tsx","../src/components/toast/toast.tsx","../src/hooks/useInfiniteScroll.ts","../src/components/skeleton/constants.ts","../src/components/skeleton/utils.ts","../src/components/skeleton/Skeleton.tsx","../src/components/table/constants.ts"],"sourcesContent":["import { rankItem, compareItems } from \"@tanstack/match-sorter-utils\";\n\n/**\n * Lấy cấu hình tương ứng theo `key` từ đối tượng `configMap` (sizeConfig, radiusConfig, variantConfig, colorConfig...),\n * nếu `key` không hợp lệ hoặc không tồn tại trong `configMap`, sẽ trả về giá trị an toàn của `fallbackKey`.\n *\n * @param key - Khóa được truyền vào (size, radius, variant... có thể undefined, null hoặc chuỗi bất kỳ)\n * @param configMap - Đối tượng ánh xạ cấu hình\n * @param fallbackKey - Khóa dự phòng khi không tìm thấy (fallback an toàn)\n * @returns Cấu hình tương ứng của khóa đó\n */\nexport function getSafeConfig<TConfig, TKey extends PropertyKey = string>(\n key: TKey | undefined | null,\n configMap: Record<TKey, TConfig>,\n fallbackKey: TKey\n): TConfig {\n if (key != null && Object.prototype.hasOwnProperty.call(configMap, key)) {\n return configMap[key];\n }\n return configMap[fallbackKey];\n}\n\n/**\n * Lọc và xếp hạng danh sách phần tử theo từ khóa tìm kiếm (Fuzzy Search qua @tanstack/match-sorter-utils).\n *\n * @param items - Danh sách các phần tử cần lọc\n * @param query - Từ khóa tìm kiếm\n * @param fields - Một trường hoặc danh sách các trường (hoặc hàm accessor) để so khớp\n * @returns Danh sách phần tử khớp, đã được sắp xếp theo độ tương quan cao nhất\n */\nexport function rankAndFilterItems<T>(\n items: T[],\n query: string,\n fields?: (keyof T | string | ((item: T) => string | undefined | null))[] | (keyof T | string)\n): T[] {\n const keyword = query.trim();\n if (!keyword || !items.length) {\n return items;\n }\n\n const fieldsArray = fields ? (Array.isArray(fields) ? fields : [fields]) : [];\n const accessors: ((item: T) => string)[] = [];\n\n if (fieldsArray.length > 0) {\n for (const field of fieldsArray) {\n if (typeof field === \"function\") {\n accessors.push((item: T) => {\n const res = field(item);\n return res != null ? String(res) : \"\";\n });\n } else {\n accessors.push((item: T) => {\n const record = item as Record<string, unknown>;\n const val = record[field as string];\n if (val != null) return String(val);\n if (record.data && typeof record.data === \"object\") {\n const dataVal = (record.data as Record<string, unknown>)[field as string];\n if (dataVal != null) return String(dataVal);\n }\n return \"\";\n });\n }\n }\n } else {\n // Mặc định: kiểm tra trường 'label', 'value' nếu là object, hoặc ép kiểu string\n accessors.push((item: T) => {\n if (item && typeof item === \"object\") {\n const record = item as Record<string, unknown>;\n return record.label != null\n ? String(record.label)\n : record.value != null\n ? String(record.value)\n : \"\";\n }\n return item != null ? String(item) : \"\";\n });\n }\n\n const ranked: { item: T; info: ReturnType<typeof rankItem> }[] = [];\n for (const item of items) {\n const info = rankItem(item, keyword, { accessors });\n if (info.passed) {\n ranked.push({ item, info });\n }\n }\n\n ranked.sort((a, b) => compareItems(a.info, b.info));\n return ranked.map((r) => r.item);\n}\n","import type { SVGProps } from \"react\";\n\nexport default function Spinner({ width = 16, height = 16, className = \"\", ...props }: SVGProps<SVGSVGElement>) {\n return (\n <svg\n width={width}\n height={height}\n className={`animate-[spin_1s_steps(8)_infinite] ${className}`}\n viewBox=\"0 0 25 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path d=\"M0 0h25v24H0z\" fill=\"none\" />\n <path\n fill=\"currentColor\"\n d=\"M4.818 6.664h-.001a1.847 1.847 0 1 1 1.306-.541a1.77 1.77 0 0 1-1.277.541h-.029zm-2.97 7.182h-.001a1.847 1.847 0 1 1 1.306-.541a1.77 1.77 0 0 1-1.278.541h-.031h.002zM12 3.692a1.847 1.847 0 1 1 1.306-.541a1.77 1.77 0 0 1-1.277.541zM4.818 21.029h-.001a1.847 1.847 0 1 1 1.306-.541a1.77 1.77 0 0 1-1.276.541h-.031zM19.182 7.125a2.308 2.308 0 1 1 0-4.615a2.308 2.308 0 0 1 0 4.615M12 24a1.847 1.847 0 1 1 1.306-.541a1.77 1.77 0 0 1-1.277.541zm10.154-9.231h-.048c-.75 0-1.428-.309-1.913-.807l-.001-.001c-.499-.503-.808-1.196-.808-1.961s.308-1.458.808-1.962a2.66 2.66 0 0 1 1.914-.808h.05h-.003h.048c.75 0 1.427.309 1.913.807l.001.001c.499.503.808 1.196.808 1.961s-.308 1.458-.808 1.962a2.66 2.66 0 0 1-1.915.809h-.049zm-2.971 7.643h-.05a3.1 3.1 0 0 1-2.236-.951l-.001-.001c-.584-.584-.945-1.391-.945-2.283s.361-1.698.945-2.283a3.1 3.1 0 0 1 2.234-.945h.054h-.003h.042c.877 0 1.67.362 2.237.944l.001.001c.588.582.952 1.39.952 2.283s-.364 1.7-.952 2.282a3.1 3.1 0 0 1-2.24.953h-.04z\"\n />\n </svg>\n );\n}\n","import type { SVGProps } from \"react\";\n\nexport default function CloseIcon({ width = 14, height = 14, className = \"\", ...props }: SVGProps<SVGSVGElement>) {\n return (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n {...props}\n >\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n );\n}\n","import type { SVGProps } from \"react\";\n\nexport default function InfoCircleIcon({ width = 20, height = 20, className = \"\", ...props }: SVGProps<SVGSVGElement>) {\n return (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n {...props}\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d=\"M12 8h.01\" />\n </svg>\n );\n}\n","import type { SVGProps } from \"react\";\n\nexport default function CheckCircleIcon({\n width = 20,\n height = 20,\n className = \"\",\n ...props\n}: SVGProps<SVGSVGElement>) {\n return (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n {...props}\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n );\n}\n","import type { SVGProps } from \"react\";\n\nexport default function AlertTriangleIcon({\n width = 20,\n height = 20,\n className = \"\",\n ...props\n}: SVGProps<SVGSVGElement>) {\n return (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n {...props}\n >\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n </svg>\n );\n}\n","import type { SVGProps } from \"react\";\n\nexport default function AlertCircleIcon({\n width = 20,\n height = 20,\n className = \"\",\n ...props\n}: SVGProps<SVGSVGElement>) {\n return (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={className}\n {...props}\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 8v4\" />\n <path d=\"M12 16h.01\" />\n </svg>\n );\n}\n","import React from \"react\";\nimport { AlertColor, AlertRadius, AlertSize, AlertVariant } from \"./types\";\nimport InfoCircleIcon from \"../icons/InfoCircleIcon\";\nimport CheckCircleIcon from \"../icons/CheckCircleIcon\";\nimport AlertTriangleIcon from \"../icons/AlertTriangleIcon\";\nimport AlertCircleIcon from \"../icons/AlertCircleIcon\";\n\n\nexport const sizeConfig: Record<\n AlertSize,\n {\n container: string;\n title: string;\n description: string;\n icon: string;\n closeButton: string;\n closeIcon: string;\n action: string;\n }\n> = {\n xs: {\n container: \"p-2 gap-2 text-xs\",\n title: \"text-xs font-semibold leading-tight\",\n description: \"text-[11px] leading-tight\",\n icon: \"size-3.5 mt-0.5\",\n closeButton: \"size-4 p-0.5 -mr-0.5\",\n closeIcon: \"size-3\",\n action: \"gap-1.5 text-xs\",\n },\n sm: {\n container: \"p-2.5 gap-2.5 text-xs\",\n title: \"text-sm font-semibold leading-tight\",\n description: \"text-xs leading-normal\",\n icon: \"size-4 mt-0.5\",\n closeButton: \"size-5 p-0.5 -mr-0.5\",\n closeIcon: \"size-3.5\",\n action: \"gap-1.5 text-xs\",\n },\n md: {\n container: \"p-3.5 gap-3 text-sm\",\n title: \"text-sm font-semibold leading-tight\",\n description: \"text-sm leading-normal\",\n icon: \"size-5 mt-0.5\",\n closeButton: \"size-6 p-1 -mr-1\",\n closeIcon: \"size-4\",\n action: \"gap-2 text-sm\",\n },\n lg: {\n container: \"p-4 gap-3.5 text-base\",\n title: \"text-base font-semibold leading-snug\",\n description: \"text-sm leading-normal\",\n icon: \"size-6 mt-0.5\",\n closeButton: \"size-7 p-1.5 -mr-1.5\",\n closeIcon: \"size-4.5\",\n action: \"gap-2.5 text-sm\",\n },\n xl: {\n container: \"p-5 gap-4 text-lg\",\n title: \"text-lg font-semibold leading-snug\",\n description: \"text-base leading-normal\",\n icon: \"size-7 mt-0.5\",\n closeButton: \"size-8 p-1.5 -mr-1.5\",\n closeIcon: \"size-5\",\n action: \"gap-3 text-base\",\n },\n};\n\nexport const radiusConfig: Record<AlertRadius, string> = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n xl: \"rounded-xl\",\n full: \"rounded-2xl\",\n};\n\nexport const variantColorConfig: Record<Exclude<AlertVariant, \"other\">, Record<AlertColor, string>> = {\n soft: {\n primary: \"bg-primary-50 text-primary-900 border-2 border-primary-200\",\n secondary: \"bg-secondary-50 text-secondary-900 border-2 border-secondary-200\",\n neutral: \"bg-neutral-100 text-neutral-900 border-2 border-neutral-200\",\n error: \"bg-error-50 text-error-900 border-2 border-error-200\",\n success: \"bg-success-50 text-success-900 border-2 border-success-200\",\n warning: \"bg-warning-50 text-warning-900 border-2 border-warning-200\",\n info: \"bg-info-50 text-info-900 border-2 border-info-200\",\n },\n filled: {\n primary: \"bg-primary-600 text-white border-2 border-primary-600\",\n secondary: \"bg-secondary-600 text-white border-2 border-secondary-600\",\n neutral: \"bg-neutral-700 text-white border-2 border-neutral-700\",\n error: \"bg-error-600 text-white border-2 border-error-600\",\n success: \"bg-success-600 text-white border-2 border-success-600\",\n warning: \"bg-warning-500 text-neutral-950 border-2 border-warning-500\",\n info: \"bg-info-600 text-white border-2 border-info-600\",\n },\n outline: {\n primary: \"bg-neutral-white text-primary-700 border-2 border-primary-400\",\n secondary: \"bg-neutral-white text-secondary-700 border-2 border-secondary-400\",\n neutral: \"bg-neutral-white text-neutral-700 border-2 border-neutral-300\",\n error: \"bg-neutral-white text-error-700 border-2 border-error-500\",\n success: \"bg-neutral-white text-success-700 border-2 border-success-400\",\n warning: \"bg-neutral-white text-warning-800 border-2 border-warning-400\",\n info: \"bg-neutral-white text-info-700 border-2 border-info-400\",\n },\n \"accent-left\": {\n primary: \"bg-primary-50/70 text-primary-900 border-2 border-primary-200 border-l-4 border-l-primary-500\",\n secondary: \"bg-secondary-50/70 text-secondary-900 border-2 border-secondary-200 border-l-4 border-l-secondary-500\",\n neutral: \"bg-neutral-50/70 text-neutral-900 border-2 border-neutral-200 border-l-4 border-l-neutral-500\",\n error: \"bg-error-50/70 text-error-900 border-2 border-error-200 border-l-4 border-l-error-500\",\n success: \"bg-success-50/70 text-success-900 border-2 border-success-200 border-l-4 border-l-success-500\",\n warning: \"bg-warning-50/70 text-warning-900 border-2 border-warning-200 border-l-4 border-l-warning-500\",\n info: \"bg-info-50/70 text-info-900 border-2 border-info-200 border-l-4 border-l-info-500\",\n },\n ghost: {\n primary: \"bg-transparent text-primary-800 border-2 border-transparent\",\n secondary: \"bg-transparent text-secondary-800 border-2 border-transparent\",\n neutral: \"bg-transparent text-neutral-800 border-2 border-transparent\",\n error: \"bg-transparent text-error-700 border-2 border-transparent\",\n success: \"bg-transparent text-success-700 border-2 border-transparent\",\n warning: \"bg-transparent text-warning-800 border-2 border-transparent\",\n info: \"bg-transparent text-info-800 border-2 border-transparent\",\n },\n};\n\nexport const iconColorConfig: Record<Exclude<AlertVariant, \"other\">, Record<AlertColor, string>> = {\n soft: {\n primary: \"text-primary-600\",\n secondary: \"text-secondary-600\",\n neutral: \"text-neutral-600\",\n error: \"text-error-600\",\n success: \"text-success-600\",\n warning: \"text-warning-600\",\n info: \"text-info-600\",\n },\n filled: {\n primary: \"text-white\",\n secondary: \"text-white\",\n neutral: \"text-white\",\n error: \"text-white\",\n success: \"text-white\",\n warning: \"text-neutral-950\",\n info: \"text-white\",\n },\n outline: {\n primary: \"text-primary-600\",\n secondary: \"text-secondary-600\",\n neutral: \"text-neutral-600\",\n error: \"text-error-600\",\n success: \"text-success-600\",\n warning: \"text-warning-600\",\n info: \"text-info-600\",\n },\n \"accent-left\": {\n primary: \"text-primary-600\",\n secondary: \"text-secondary-600\",\n neutral: \"text-neutral-600\",\n error: \"text-error-600\",\n success: \"text-success-600\",\n warning: \"text-warning-600\",\n info: \"text-info-600\",\n },\n ghost: {\n primary: \"text-primary-600\",\n secondary: \"text-secondary-600\",\n neutral: \"text-neutral-600\",\n error: \"text-error-600\",\n success: \"text-success-600\",\n warning: \"text-warning-600\",\n info: \"text-info-600\",\n },\n};\n\nexport const defaultIcons: Record<AlertColor, React.ComponentType<{ className?: string }>> = {\n primary: InfoCircleIcon,\n secondary: InfoCircleIcon,\n neutral: InfoCircleIcon,\n info: InfoCircleIcon,\n success: CheckCircleIcon,\n warning: AlertTriangleIcon,\n error: AlertCircleIcon,\n};","import { MouseEvent } from \"react\";\nimport { AlertProps } from \"./types\";\nimport { sizeConfig, radiusConfig, variantColorConfig, iconColorConfig, defaultIcons } from \"./constants\";\nimport CloseIcon from \"../icons/CloseIcon\";\nimport { getSafeConfig } from \"@/utils/function\";\n\nexport default function Alert({\n size,\n variant,\n color,\n radius,\n title,\n description,\n icon = true,\n action,\n closable = true,\n onClose,\n closeAriaLabel = \"Đóng cảnh báo\",\n banner = false,\n titleClassName = \"\",\n descriptionClassName = \"\",\n actionClassName = \"\",\n iconClassName = \"\",\n closeButtonClassName = \"\",\n className = \"\",\n children,\n role,\n ref,\n ...props\n}: AlertProps) {\n\n const currentSize = getSafeConfig(size, sizeConfig, \"md\");\n\n const roundedClass = banner ? \"rounded-none border-x-0 w-full\" : getSafeConfig(radius, radiusConfig, \"lg\");\n\n const variantStyles = variant === \"other\" ? \"\" : getSafeConfig(color, getSafeConfig(variant, variantColorConfig, \"soft\"), \"info\");\n\n const iconColorStyle = variant === \"other\" ? \"\" : getSafeConfig(color, getSafeConfig(variant, iconColorConfig, \"soft\"), \"info\");\n\n const isClosable = closable || Boolean(onClose);\n\n const handleClose = (e: MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n onClose?.();\n };\n\n const defaultRole = color === \"error\" || color === \"warning\" ? \"alert\" : \"status\";\n const activeRole = role || defaultRole;\n const ariaLive = color === \"error\" || color === \"warning\" ? \"assertive\" : \"polite\";\n\n const bodyContent = description ?? children;\n const hasBody = Boolean(bodyContent);\n\n const renderIcon = () => {\n if (icon === false) return null;\n\n if (icon !== true && icon !== undefined) {\n return (\n <span\n className={`inline-flex items-center justify-center shrink-0 leading-none ${currentSize.icon} ${iconClassName}`}\n aria-hidden=\"true\"\n >\n {icon}\n </span>\n );\n }\n\n const IconComponent = getSafeConfig(color, defaultIcons, \"info\");\n return (\n <span\n className={`inline-flex items-center justify-center shrink-0 leading-none ${currentSize.icon} ${iconColorStyle} ${iconClassName}`}\n aria-hidden=\"true\"\n >\n <IconComponent className=\"size-full\" />\n </span>\n );\n };\n\n const containerClasses = [\n \"relative flex w-full\",\n currentSize.container,\n roundedClass,\n variantStyles,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div ref={ref} role={activeRole} aria-live={ariaLive} className={containerClasses} {...props}>\n {renderIcon()}\n\n <div className=\"flex-1 min-w-0 flex flex-col justify-center\">\n {title && <div className={`${currentSize.title} ${titleClassName}`}>{title}</div>}\n {hasBody && (\n <div className={`${currentSize.description} ${title ? \"mt-0.5\" : \"\"} ${descriptionClassName}`}>\n {bodyContent}\n </div>\n )}\n </div>\n\n {action && (\n <div className={`inline-flex items-center shrink-0 ${currentSize.action} ${actionClassName}`}>{action}</div>\n )}\n\n {isClosable && (\n <button\n type=\"button\"\n onClick={handleClose}\n aria-label={closeAriaLabel}\n className={`inline-flex items-center justify-center shrink-0 rounded-md transition-colors cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-current opacity-70 hover:opacity-100 ${\n variant === \"filled\" ? \"hover:bg-white/20 active:bg-white/30\" : \"hover:bg-black/5 active:bg-black/10\"\n } ${currentSize.closeButton} ${closeButtonClassName}`}\n >\n <CloseIcon className={currentSize.closeIcon} />\n </button>\n )}\n </div>\n );\n}\n","/**\n * Thời gian hiển thị mặc định của thông báo Toast trước khi tự động đóng (miliseconds).\n */\nexport const DEFAULT_TOAST_DURATION = 4000;\n","import { Toaster as SonnerToaster } from \"sonner\";\nimport { ToasterProps } from \"./types\";\nimport { DEFAULT_TOAST_DURATION } from \"./constants\";\n\nexport default function Toaster({\n position = \"top-right\",\n visibleToasts = 3,\n expand = false,\n duration = DEFAULT_TOAST_DURATION,\n closeButton = false,\n className = \"\",\n toastOptions,\n ...props\n}: ToasterProps) {\n return (\n <SonnerToaster\n position={position}\n visibleToasts={visibleToasts}\n expand={expand}\n duration={duration}\n closeButton={closeButton}\n className={`toaster group ${className}`}\n toastOptions={{\n unstyled: true,\n className: \"w-full max-w-md pointer-events-auto\",\n ...toastOptions,\n }}\n {...props}\n />\n );\n}\n","import { isValidElement, ReactElement, ReactNode } from \"react\";\nimport { toast as sonnerToast } from \"sonner\";\nimport Alert from \"../alert/Alert\";\nimport { AlertColor, AlertProps, AlertVariant } from \"../alert/types\";\nimport { ToastMessageObject, ToastMessageResult, ToastOptions, ToastPromiseOptions } from \"./types\";\nimport { DEFAULT_TOAST_DURATION } from \"./constants\";\nimport Spinner from \"../icons/Spinner\";\n\nfunction showToast(\n title: ReactNode,\n color: AlertColor = \"info\",\n variant: AlertVariant = \"soft\",\n description?: ReactNode,\n options: ToastOptions = {},\n customId?: string | number\n): string | number {\n const { duration, position, onDismiss, onAutoClose, ...alertProps } = options;\n\n return sonnerToast.custom(\n (id) => (\n <Alert\n color={color}\n variant={variant}\n title={title}\n description={description}\n closable={alertProps.closable ?? true}\n onClose={() => {\n alertProps.onClose?.();\n sonnerToast.dismiss(id);\n }}\n {...alertProps}\n />\n ),\n {\n id: customId,\n duration: duration ?? DEFAULT_TOAST_DURATION,\n position,\n onDismiss,\n onAutoClose,\n }\n );\n}\n\nfunction isToastMessageObject(value: unknown): value is ToastMessageObject {\n return (\n typeof value === \"object\" &&\n value !== null &&\n !isValidElement(value) &&\n !Array.isArray(value) &&\n (\"title\" in value || \"description\" in value || \"color\" in value || \"variant\" in value)\n );\n}\n\nfunction extractMessageDetails(\n result: ToastMessageResult,\n fallbackColor: AlertColor,\n fallbackVariant: AlertVariant\n): { title: ReactNode; description?: ReactNode; color: AlertColor; variant: AlertVariant } {\n if (isToastMessageObject(result)) {\n return {\n title: result.title ?? \"\",\n description: result.description,\n color: result.color ?? fallbackColor,\n variant: result.variant ?? fallbackVariant,\n };\n }\n\n return {\n title: result,\n description: undefined,\n color: fallbackColor,\n variant: fallbackVariant,\n };\n}\n\n/**\n * Interface cho hàm và các phương thức của đối tượng `toast`.\n * Cú pháp chuẩn: `toast.success(title, description?, options?)`\n */\nexport interface ToastFunction {\n /**\n * Kích hoạt một thông báo Toast mặc định (màu info).\n * @param title Tiêu đề của thông báo\n * @param description Nội dung mô tả chi tiết (tùy chọn)\n * @param options Cấu hình phụ như variant, size, duration,... (tùy chọn)\n */\n (title: ReactNode, description?: ReactNode, options?: ToastOptions): string | number;\n\n /**\n * Kích hoạt thông báo tùy biến hoàn toàn (dùng hàm render JSX hoặc truyền AlertProps).\n */\n custom: {\n (jsxFn: (id: string | number) => ReactNode, options?: ToastOptions): string | number;\n (alertProps: AlertProps & ToastOptions): string | number;\n };\n\n /**\n * Kích hoạt thông báo thành công (màu success).\n */\n success: (title: ReactNode, description?: ReactNode, options?: ToastOptions) => string | number;\n\n /**\n * Kích hoạt thông báo lỗi (màu error).\n */\n error: (title: ReactNode, description?: ReactNode, options?: ToastOptions) => string | number;\n\n /**\n * Kích hoạt thông báo cảnh báo (màu warning).\n */\n warning: (title: ReactNode, description?: ReactNode, options?: ToastOptions) => string | number;\n\n /**\n * Kích hoạt thông báo thông tin (màu info).\n */\n info: (title: ReactNode, description?: ReactNode, options?: ToastOptions) => string | number;\n\n /**\n * Kích hoạt thông báo đang tải dữ liệu (Loading spinner, không tự đóng).\n */\n loading: (title: ReactNode, description?: ReactNode, options?: ToastOptions) => string | number;\n\n /**\n * Tự động theo dõi Promise và chuyển trạng thái Toast từ Loading sang Success hoặc Error.\n */\n promise: <T>(\n promise: Promise<T> | (() => Promise<T>),\n options: ToastPromiseOptions<T>\n ) => Promise<T>;\n\n /**\n * Đóng một Toast cụ thể bằng ID hoặc đóng tất cả Toasts nếu không truyền ID.\n */\n dismiss: (id?: string | number) => string | number | undefined;\n}\n\nconst baseToast = ((\n title: ReactNode,\n description?: ReactNode,\n options?: ToastOptions\n): string | number => {\n const opts = options || {};\n return showToast(title, opts.color || \"info\", opts.variant || \"soft\", description, opts);\n}) as ToastFunction;\n\nbaseToast.custom = (\n arg: ((id: string | number) => ReactNode) | (AlertProps & ToastOptions),\n options: ToastOptions = {}\n): string | number => {\n if (typeof arg === \"function\") {\n return sonnerToast.custom(\n (id) => arg(id) as ReactElement,\n {\n duration: options.duration ?? DEFAULT_TOAST_DURATION,\n position: options.position,\n onDismiss: options.onDismiss,\n onAutoClose: options.onAutoClose,\n }\n );\n }\n\n const { duration, position, onDismiss, onAutoClose, ...alertProps } = arg;\n return sonnerToast.custom(\n (id) => (\n <Alert\n closable={alertProps.closable ?? true}\n onClose={() => {\n alertProps.onClose?.();\n sonnerToast.dismiss(id);\n }}\n {...alertProps}\n />\n ),\n {\n duration: duration ?? DEFAULT_TOAST_DURATION,\n position,\n onDismiss,\n onAutoClose,\n }\n );\n};\n\nbaseToast.success = (\n title: ReactNode,\n description?: ReactNode,\n options?: ToastOptions\n): string | number => {\n const opts = options || {};\n return showToast(title, opts.color || \"success\", opts.variant || \"soft\", description, opts);\n};\n\nbaseToast.error = (\n title: ReactNode,\n description?: ReactNode,\n options?: ToastOptions\n): string | number => {\n const opts = options || {};\n return showToast(title, opts.color || \"error\", opts.variant || \"soft\", description, opts);\n};\n\nbaseToast.warning = (\n title: ReactNode,\n description?: ReactNode,\n options?: ToastOptions\n): string | number => {\n const opts = options || {};\n return showToast(title, opts.color || \"warning\", opts.variant || \"soft\", description, opts);\n};\n\nbaseToast.info = (\n title: ReactNode,\n description?: ReactNode,\n options?: ToastOptions\n): string | number => {\n const opts = options || {};\n return showToast(title, opts.color || \"info\", opts.variant || \"soft\", description, opts);\n};\n\nbaseToast.loading = (\n title: ReactNode,\n description?: ReactNode,\n options?: ToastOptions\n): string | number => {\n const opts = options || {};\n return showToast(title, opts.color || \"info\", opts.variant || \"soft\", description, {\n ...opts,\n icon: opts.icon ?? <Spinner className=\"size-full animate-spin\" />,\n duration: opts.duration ?? Infinity,\n closable: opts.closable ?? false,\n });\n};\n\nbaseToast.promise = async <T,>(\n promiseInput: Promise<T> | (() => Promise<T>),\n options: ToastPromiseOptions<T>\n): Promise<T> => {\n const promise = typeof promiseInput === \"function\" ? promiseInput() : promiseInput;\n\n const { title: loadingTitle, description: loadingDesc } = extractMessageDetails(\n options.loading,\n \"info\",\n options.variant || \"soft\"\n );\n\n const toastId = baseToast.loading(loadingTitle, loadingDesc, {\n size: options.size,\n variant: options.variant,\n radius: options.radius,\n });\n\n try {\n const data = await promise;\n\n const rawSuccess = typeof options.success === \"function\" ? options.success(data) : options.success;\n const { title: successTitle, description: successDesc, color: successColor, variant: successVariant } =\n extractMessageDetails(rawSuccess, \"success\", options.variant || \"soft\");\n\n showToast(\n successTitle,\n successColor,\n successVariant,\n successDesc,\n {\n duration: options.duration ?? DEFAULT_TOAST_DURATION,\n size: options.size,\n radius: options.radius,\n },\n toastId\n );\n\n return data;\n } catch (err: unknown) {\n const rawError = typeof options.error === \"function\" ? options.error(err) : options.error;\n const { title: errorTitle, description: errorDesc, color: errorColor, variant: errorVariant } =\n extractMessageDetails(rawError, \"error\", options.variant || \"soft\");\n\n showToast(\n errorTitle,\n errorColor,\n errorVariant,\n errorDesc,\n {\n duration: options.duration ?? DEFAULT_TOAST_DURATION,\n size: options.size,\n radius: options.radius,\n },\n toastId\n );\n\n throw err;\n } finally {\n if (options.finally) {\n await options.finally();\n }\n }\n};\n\nbaseToast.dismiss = (id?: string | number): string | number | undefined => {\n return sonnerToast.dismiss(id);\n};\n\nexport const toast: ToastFunction = baseToast;\n","import { useCallback, useEffect, useRef, useState, type RefObject } from \"react\";\r\n\r\n/**\r\n * Các tùy chọn cấu hình cho hook `useInfiniteScroll`.\r\n */\r\nexport interface UseInfiniteScrollOptions {\r\n /**\r\n * Callback được gọi khi người dùng cuộn đến cuối hoặc phần tử sentinel xuất hiện trong tầm nhìn.\r\n */\r\n onLoadMore: () => void | Promise<void>;\r\n\r\n /**\r\n * Cho biết còn dữ liệu để tải tiếp hay không.\r\n * Nếu là `false`, `onLoadMore` sẽ không được kích hoạt.\r\n * @default true\r\n */\r\n hasMore?: boolean;\r\n\r\n /**\r\n * Trạng thái đang tải dữ liệu của trang hiện tại / tiếp theo.\r\n * Nếu là `true`, `onLoadMore` sẽ tạm hoãn cho đến khi lượt tải trước hoàn tất.\r\n * @default false\r\n */\r\n isLoading?: boolean;\r\n\r\n /**\r\n * Vô hiệu hóa toàn bộ cơ chế theo dõi cuộn vô hạn.\r\n * @default false\r\n */\r\n disabled?: boolean;\r\n\r\n /**\r\n * Khoảng cách biên rootMargin của IntersectionObserver (vd: \"100px\", \"0px 0px 100px 0px\").\r\n * Giúp kích hoạt tải trước khi người dùng chạm tới đáy danh sách để trải nghiệm mượt mà hơn.\r\n * @default \"100px\"\r\n */\r\n rootMargin?: string;\r\n\r\n /**\r\n * Ngưỡng hiển thị threshold của IntersectionObserver (từ 0.0 đến 1.0).\r\n * @default 0\r\n */\r\n threshold?: number | number[];\r\n\r\n /**\r\n * Phần tử gốc hoặc RefObject làm khung cuộn cho IntersectionObserver.\r\n * Nếu là `null` hoặc `undefined`, sẽ dùng viewport của trình duyệt hoặc khung cuộn cha gần nhất.\r\n * @default null\r\n */\r\n root?: Element | null | RefObject<Element | null>;\r\n}\r\n\r\n/**\r\n * Kết quả trả về từ hook `useInfiniteScroll`.\r\n */\r\nexport interface UseInfiniteScrollReturn {\r\n /**\r\n * Ref callback gắn vào phần tử sentinel ở cuối danh sách để theo dõi bằng IntersectionObserver.\r\n */\r\n sentinelRef: (node: HTMLElement | null) => void;\r\n\r\n /**\r\n * Trạng thái phần tử sentinel có đang nằm trong tầm quan sát hay không.\r\n */\r\n isIntersecting: boolean;\r\n}\r\n\r\n/**\r\n * Hook `useInfiniteScroll` độc lập hỗ trợ tải dữ liệu vô tận qua IntersectionObserver.\r\n */\r\nexport function useInfiniteScroll({\r\n onLoadMore,\r\n hasMore = true,\r\n isLoading = false,\r\n disabled = false,\r\n rootMargin = \"100px\",\r\n threshold = 0,\r\n root = null,\r\n}: UseInfiniteScrollOptions): UseInfiniteScrollReturn {\r\n const [isIntersecting, setIsIntersecting] = useState(false);\r\n const [sentinelNode, setSentinelNode] = useState<HTMLElement | null>(null);\r\n\r\n // Chỉ cần 1 ref duy nhất làm mutex lock để tránh kích hoạt 2 lần cùng lúc trong 1 frame\r\n const isTriggeringRef = useRef(false);\r\n\r\n const canTrigger = hasMore && !isLoading && !disabled;\r\n\r\n const triggerLoadMore = useCallback(() => {\r\n if (!canTrigger || isTriggeringRef.current) return;\r\n\r\n isTriggeringRef.current = true;\r\n try {\r\n const result = onLoadMore();\r\n if (result && typeof (result as Promise<void>).then === \"function\") {\r\n (result as Promise<void>).finally(() => {\r\n isTriggeringRef.current = false;\r\n });\r\n } else {\r\n isTriggeringRef.current = false;\r\n }\r\n } catch {\r\n isTriggeringRef.current = false;\r\n }\r\n }, [canTrigger, onLoadMore]);\r\n\r\n // Sentinel ref callback\r\n const sentinelRef = useCallback((node: HTMLElement | null) => {\r\n setSentinelNode(node);\r\n }, []);\r\n\r\n // IntersectionObserver setup\r\n useEffect(() => {\r\n if (!sentinelNode || disabled || !hasMore) {\r\n return;\r\n }\r\n\r\n if (typeof window === \"undefined\" || !(\"IntersectionObserver\" in window)) {\r\n return;\r\n }\r\n\r\n const resolvedRoot =\r\n root && typeof root === \"object\" && \"current\" in root\r\n ? (root as RefObject<Element | null>).current\r\n : (root as Element | null);\r\n\r\n const observer = new IntersectionObserver(\r\n (entries) => {\r\n const [entry] = entries;\r\n if (!entry) return;\r\n\r\n const intersecting = entry.isIntersecting;\r\n setIsIntersecting(intersecting);\r\n\r\n if (intersecting) {\r\n triggerLoadMore();\r\n }\r\n },\r\n {\r\n root: resolvedRoot,\r\n rootMargin,\r\n threshold,\r\n }\r\n );\r\n\r\n observer.observe(sentinelNode);\r\n\r\n return () => {\r\n observer.disconnect();\r\n setIsIntersecting(false);\r\n };\r\n }, [sentinelNode, root, rootMargin, threshold, disabled, hasMore, triggerLoadMore]);\r\n\r\n // Khi tải xong (isLoading = false), nếu sentinel vẫn đang nằm trong tầm nhìn thì kích hoạt tải tiếp\r\n useEffect(() => {\r\n if (canTrigger && isIntersecting) {\r\n triggerLoadMore();\r\n }\r\n }, [canTrigger, isIntersecting, triggerLoadMore]);\r\n\r\n return {\r\n sentinelRef,\r\n isIntersecting,\r\n };\r\n}\r\n\r\nexport default useInfiniteScroll;\r\n","import { SkeletonObjectFit, SkeletonRadius, SkeletonVariant } from \"./types\";\n\n/**\n * Animation class theo variant.\n * Variant 'wave' dùng class CSS tùy chỉnh `.skeleton-wave` được định nghĩa trong styles.css.\n */\nexport const variantConfig: Record<SkeletonVariant, string> = {\n pulse: \"animate-pulse\",\n wave: \"skeleton-wave\",\n none: \"\",\n};\n\n/**\n * Bo góc theo radius.\n * Chỉ áp dụng khi shape === 'rectangle'.\n */\nexport const radiusConfig: Record<SkeletonRadius, string> = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n xl: \"rounded-xl\",\n full: \"rounded-full\",\n};\n\n/**\n * Kiểu căn chỉnh ảnh (object-fit) cho LoadingImage.\n */\nexport const objectFitConfig: Record<SkeletonObjectFit, string> = {\n cover: \"object-cover\",\n contain: \"object-contain\",\n fill: \"object-fill\",\n none: \"object-none\",\n \"scale-down\": \"object-scale-down\",\n};\n","export const toStyle = (val: string | number | undefined): string | number | undefined =>\r\n typeof val === \"number\" ? val : val;\r\n\r\nexport const getSourceKey = (s: unknown): string | unknown => {\r\n if (!s) return \"\";\r\n if (typeof s === \"string\") return s;\r\n if (typeof File !== \"undefined\" && s instanceof File) {\r\n return `${s.name}-${s.size}-${s.lastModified}`;\r\n }\r\n if (typeof Blob !== \"undefined\" && s instanceof Blob) {\r\n return `${s.size}-${s.type}`;\r\n }\r\n if (typeof s === \"object\" && \"src\" in s && typeof (s as { src: unknown }).src === \"string\") {\r\n return (s as { src: string }).src;\r\n }\r\n return s;\r\n};","import { CSSProperties } from \"react\";\nimport { SkeletonProps } from \"./types\";\nimport { variantConfig, radiusConfig } from \"./constants\";\nimport { getSafeConfig } from \"@/utils/function\";\nimport { toStyle } from \"./utils\";\n\nexport default function Skeleton({\n ref,\n variant = \"pulse\",\n shape = \"rectangle\",\n radius = \"md\",\n width,\n height = \"1rem\",\n lines = 1,\n gap = \"0.5rem\",\n className = \"\",\n style,\n ...props\n}: SkeletonProps) {\n const animationClass = getSafeConfig(variant, variantConfig, \"pulse\");\n\n // Circle: bỏ qua radius prop, luôn full-round\n const roundedClass = shape === \"circle\" ? \"rounded-full\" : getSafeConfig(radius, radiusConfig, \"md\");\n\n const baseStyle: CSSProperties = {\n width: toStyle(width),\n height: toStyle(height),\n ...style,\n };\n\n const itemClass = [\"bg-neutral-200\", animationClass, roundedClass].filter(Boolean).join(\" \");\n\n if (lines > 1) {\n return (\n <div\n ref={ref}\n role=\"status\"\n aria-label=\"Loading...\"\n className={[\"flex flex-col\", className].filter(Boolean).join(\" \")}\n style={{ gap: toStyle(gap), ...style }}\n {...props}\n >\n {Array.from({ length: lines }).map((_, i) => {\n const isLast = i === lines - 1;\n return (\n <div\n key={i}\n className={itemClass}\n style={{\n width: isLast ? \"60%\" : (toStyle(width) ?? \"100%\"),\n height: toStyle(height),\n }}\n />\n );\n })}\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n role=\"status\"\n aria-label=\"Loading...\"\n className={[itemClass, className].filter(Boolean).join(\" \")}\n style={baseStyle}\n {...props}\n />\n );\n}\n","import type { TableAlign, TableSize, TableVariant } from \"./types\";\r\n\r\nexport const tableSizeConfig: Record<\r\n TableSize,\r\n {\r\n head: string;\r\n cell: string;\r\n text: string;\r\n icon: string;\r\n }\r\n> = {\r\n sm: {\r\n head: \"px-3 py-2 text-xs font-semibold\",\r\n cell: \"px-3 py-2 text-xs\",\r\n text: \"text-xs\",\r\n icon: \"w-3.5 h-3.5\",\r\n },\r\n md: {\r\n head: \"px-4 py-3 text-sm font-semibold\",\r\n cell: \"px-4 py-3 text-sm\",\r\n text: \"text-sm\",\r\n icon: \"w-4 h-4\",\r\n },\r\n lg: {\r\n head: \"px-5 py-4 text-base font-semibold\",\r\n cell: \"px-5 py-4 text-base\",\r\n text: \"text-base\",\r\n icon: \"w-5 h-5\",\r\n },\r\n};\r\n\r\nexport const tableVariantConfig: Record<\r\n TableVariant,\r\n {\r\n container: string;\r\n table: string;\r\n head: string;\r\n row: string;\r\n cell: string;\r\n }\r\n> = {\r\n default: {\r\n container: \"border border-neutral-200 shadow-xs\",\r\n table: \"border-collapse\",\r\n head: \"bg-neutral-50/80 border-b border-neutral-200 text-neutral-600\",\r\n row: \"border-b border-neutral-200/80 hover:bg-neutral-50/50 transition-colors\",\r\n cell: \"text-neutral-700\",\r\n },\r\n striped: {\r\n container: \"border border-neutral-200 shadow-xs\",\r\n table: \"border-collapse\",\r\n head: \"bg-neutral-100/80 border-b border-neutral-200 text-neutral-700\",\r\n row: \"border-b border-neutral-200/80 even:bg-neutral-50/60 hover:bg-neutral-100/40 transition-colors\",\r\n cell: \"text-neutral-700\",\r\n },\r\n bordered: {\r\n container: \"border border-neutral-200 shadow-xs\",\r\n table: \"border-collapse border border-neutral-200\",\r\n head: \"bg-neutral-50 border border-neutral-200 text-neutral-700\",\r\n row: \"border-b border-neutral-200 hover:bg-neutral-50/50 transition-colors\",\r\n cell: \"border border-neutral-200 text-neutral-700\",\r\n },\r\n};\r\n\r\nexport const tableAlignConfig: Record<TableAlign, string> = {\r\n left: \"text-left justify-start\",\r\n center: \"text-center justify-center\",\r\n right: \"text-right justify-end\",\r\n};\r\n\r\nexport const DEFAULT_PAGE_SIZE_OPTIONS = [10, 20, 50, 100];\r\nexport const DEFAULT_PAGE_SIZE = 10;\r\n"],"mappings":";AAAA,OAAS,YAAAA,GAAU,gBAAAC,OAAoB,+BAWhC,SAASC,EACdC,EACAC,EACAC,EACS,CACT,OAAIF,GAAO,MAAQ,OAAO,UAAU,eAAe,KAAKC,EAAWD,CAAG,EAC7DC,EAAUD,CAAG,EAEfC,EAAUC,CAAW,CAC9B,CAUO,SAASC,GACdC,EACAC,EACAC,EACK,CACL,IAAMC,EAAUF,EAAM,KAAK,EAC3B,GAAI,CAACE,GAAW,CAACH,EAAM,OACrB,OAAOA,EAGT,IAAMI,EAAcF,EAAU,MAAM,QAAQA,CAAM,EAAIA,EAAS,CAACA,CAAM,EAAK,CAAC,EACtEG,EAAqC,CAAC,EAE5C,GAAID,EAAY,OAA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ACN,KAAM,sBACN,KAAM,YACN,KAAM,SACR,CACF,EAEaC,GAST,CACF,QAAS,CACP,UAAW,sCACX,MAAO,kBACP,KAAM,gEACN,IAAK,0EACL,KAAM,kBACR,EACA,QAAS,CACP,UAAW,sCACX,MAAO,kBACP,KAAM,iEACN,IAAK,iGACL,KAAM,kBACR,EACA,SAAU,CACR,UAAW,sCACX,MAAO,4CACP,KAAM,2DACN,IAAK,uEACL,KAAM,4CACR,CACF,EAEaC,GAA+C,CAC1D,KAAM,0BACN,OAAQ,6BACR,MAAO,wBACT,EAEaC,GAA4B,CAAC,GAAI,GAAI,GAAI,GAAG,EAC5CC,GAAoB","names":["rankItem","compareItems","getSafeConfig","key","configMap","fallbackKey","rankAndFilterItems","items","query","fields","keyword","fieldsArray","accessors","field","item","res","record","val","dataVal","ranked","info","a","b","r","jsx","jsxs","Spinner","width","height","className","props","jsx","CloseIcon","width","height","className","props","jsx","jsxs","InfoCircleIcon","width","height","className","props","jsx","jsxs","CheckCircleIcon","width","height","className","props","jsx","jsxs","AlertTriangleIcon","width","height","className","props","jsx","jsxs","AlertCircleIcon","width","height","className","props","sizeConfig","radiusConfig","variantColorConfig","iconColorConfig","defaultIcons","InfoCircleIcon","CheckCircleIcon","AlertTriangleIcon","AlertCircleIcon","jsx","jsxs","Alert","size","variant","color","radius","title","description","icon","action","closable","onClose","closeAriaLabel","banner","titleClassName","descriptionClassName","actionClassName","iconClassName","closeButtonClassName","className","children","role","ref","props","currentSize","getSafeConfig","sizeConfig","roundedClass","radiusConfig","variantStyles","variantColorConfig","iconColorStyle","iconColorConfig","isClosable","handleClose","e","activeRole","ariaLive","bodyContent","hasBody","renderIcon","IconComponent","defaultIcons","containerClasses","CloseIcon","DEFAULT_TOAST_DURATION","SonnerToaster","jsx","Toaster","position","visibleToasts","expand","duration","closeButton","className","toastOptions","props","SonnerToaster","isValidElement","sonnerToast","jsx","showToast","title","color","variant","description","options","customId","duration","position","onDismiss","onAutoClose","alertProps","sonnerToast","id","Alert","isToastMessageObject","value","isValidElement","extractMessageDetails","result","fallbackColor","fallbackVariant","baseToast","opts","arg","Spinner","promiseInput","promise","loadingTitle","loadingDesc","toastId","data","rawSuccess","successTitle","successDesc","successColor","successVariant","err","rawError","errorTitle","errorDesc","errorColor","errorVariant","toast","useCallback","useEffect","useRef","useState","useInfiniteScroll","onLoadMore","hasMore","isLoading","disabled","rootMargin","threshold","root","isIntersecting","setIsIntersecting","sentinelNode","setSentinelNode","isTriggeringRef","canTrigger","triggerLoadMore","result","sentinelRef","node","resolvedRoot","observer","entries","entry","intersecting","variantConfig","radiusConfig","objectFitConfig","toStyle","val","getSourceKey","s","jsx","Skeleton","ref","variant","shape","radius","width","height","lines","gap","className","style","props","animationClass","getSafeConfig","variantConfig","roundedClass","radiusConfig","baseStyle","toStyle","itemClass","_","i","isLast","tableSizeConfig","tableVariantConfig","tableAlignConfig","DEFAULT_PAGE_SIZE_OPTIONS","DEFAULT_PAGE_SIZE"]}
package/dist/index.d.cts CHANGED
@@ -1,10 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import react, { ButtonHTMLAttributes, Ref, ReactNode, HTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, SVGProps, ReactElement, CSSProperties, HTMLProps, RefObject, MouseEvent, TdHTMLAttributes, ThHTMLAttributes } from 'react';
3
3
  import { TextareaAutosizeProps } from 'react-textarea-autosize';
4
- import { ToastT, ToasterProps as ToasterProps$1 } from 'sonner';
4
+ import { A as AlertProps, T as ToasterProps, a as ToastOptions, b as ToastPromiseOptions, E as EmptyProps, c as EmptyPresetImage, S as SelectProps, M as MultiSelectProps, d as SelectOptionItem, e as SelectSize, f as SelectVariant, g as SelectColor, h as SelectRadius, i as SelectSearchPlacement, j as SelectFilterField, k as SelectFilterLayout } from './useInfiniteScroll-D9AW6cQV.cjs';
5
+ export { l as AlertColor, m as AlertRadius, n as AlertSize, o as AlertVariant, B as BaseSelectProps, p as EmptyLayout, q as EmptySize, r as SelectFilterType, s as SelectSearchMode, t as SingleSelectProps, u as ToastMessageObject, v as ToastMessageResult, w as ToastPosition, x as ToastPromiseFunction, U as UseInfiniteScrollOptions, y as UseInfiniteScrollReturn, z as useInfiniteScroll } from './useInfiniteScroll-D9AW6cQV.cjs';
5
6
  import { Placement, ExtendedRefs, ReferenceType, FloatingContext } from '@floating-ui/react';
6
- import { E as EmptyProps, a as EmptyPresetImage, S as SelectProps, M as MultiSelectProps, b as SelectOptionItem, c as SelectSize, d as SelectVariant, e as SelectColor, f as SelectRadius, g as SelectSearchPlacement, h as SelectFilterField, i as SelectFilterLayout } from './useInfiniteScroll-DAlgjUN4.cjs';
7
- export { B as BaseSelectProps, j as EmptyLayout, k as EmptySize, l as SelectFilterType, m as SelectSearchMode, n as SingleSelectProps, U as UseInfiniteScrollOptions, o as UseInfiniteScrollReturn, u as useInfiniteScroll } from './useInfiniteScroll-DAlgjUN4.cjs';
8
7
  import { Accept, DropzoneRootProps } from 'react-dropzone';
9
8
  import { ImageProps } from 'next/image';
10
9
  import * as _tanstack_react_table from '@tanstack/react-table';
@@ -12,6 +11,7 @@ import { TableFeatures, FilterFn, RowData, TableOptions, ColumnHelper, ReactTabl
12
11
  export { Column, ColumnDef, ColumnFiltersState, ColumnHelper, ColumnVisibilityState, Header, OnChangeFn, PaginationState, ReactTable, Row, RowData, RowSelectionState, SortingState } from '@tanstack/react-table';
13
12
  import { RankingInfo } from '@tanstack/match-sorter-utils';
14
13
  export { RankingInfo } from '@tanstack/match-sorter-utils';
14
+ import 'sonner';
15
15
 
16
16
  type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
17
17
  type ButtonVariant = "filled" | "soft" | "ghost" | "text" | "outline" | "other";
@@ -1962,280 +1962,8 @@ declare function ArrowDownIcon({ width, height, className, ...props }: SVGProps<
1962
1962
 
1963
1963
  declare function SlidersHorizontalIcon({ width, height, className, ...props }: SVGProps<SVGSVGElement>): react_jsx_runtime.JSX.Element;
1964
1964
 
1965
- /**
1966
- * Các kích cỡ tiêu chuẩn của Alert:
1967
- * - 'xs': Siêu nhỏ (text-xs, padding p-2)
1968
- * - 'sm': Nhỏ (text-xs, title text-sm, padding p-2.5)
1969
- * - 'md': Vừa - mặc định (text-sm, padding p-3.5)
1970
- * - 'lg': Lớn (text-base, padding p-4)
1971
- * - 'xl': Rất lớn (text-lg, padding p-5)
1972
- */
1973
- type AlertSize = "xs" | "sm" | "md" | "lg" | "xl";
1974
- /**
1975
- * Các biến thể giao diện và phong cách hiển thị màu sắc của Alert:
1976
- * - 'soft': Nền nhạt pastel, viền mờ 2px, chữ đậm (mặc định)
1977
- * - 'filled': Nền màu đậm, chữ trắng tương phản cao
1978
- * - 'outline': Nền trắng, viền rõ nét theo màu chủ đề
1979
- * - 'accent-left': Nền pastel kèm viền nhấn dày 4px bên trái
1980
- * - 'ghost': Nền và viền trong suốt
1981
- * - 'other': Bỏ qua màu mặc định, tự do styling qua className
1982
- */
1983
- type AlertVariant = "soft" | "filled" | "outline" | "accent-left" | "ghost" | "other";
1984
- /**
1985
- * 7 chủ đề màu sắc theo Design System:
1986
- * - 'primary': Màu chủ đạo
1987
- * - 'secondary': Màu phụ
1988
- * - 'neutral': Màu trung tính
1989
- * - 'error': Màu đỏ cảnh báo lỗi nguy cấp
1990
- * - 'success': Màu xanh lá thông báo thành công
1991
- * - 'warning': Màu vàng/cam cảnh báo
1992
- * - 'info': Màu xanh dương thông tin (mặc định)
1993
- */
1994
- type AlertColor = "primary" | "secondary" | "neutral" | "error" | "success" | "warning" | "info";
1995
- /**
1996
- * Độ bo góc của khung thông báo Alert:
1997
- * - 'none': Góc vuông phẳng (rounded-none)
1998
- * - 'sm': Bo góc nhỏ (rounded-sm)
1999
- * - 'md': Bo góc vừa (rounded-md)
2000
- * - 'lg': Bo góc lớn (rounded-lg - mặc định)
2001
- * - 'xl': Bo góc rất lớn (rounded-xl)
2002
- * - 'full': Bo tròn hoàn toàn (rounded-2xl)
2003
- */
2004
- type AlertRadius = "none" | "sm" | "md" | "lg" | "xl" | "full";
2005
- /**
2006
- * Props cho component `Alert`.
2007
- */
2008
- interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
2009
- /**
2010
- * Ref chuyển tiếp đến phần tử HTML div của Alert
2011
- */
2012
- ref?: Ref<HTMLDivElement>;
2013
- /**
2014
- * Kích cỡ của Alert (5 sizes: xs, sm, md, lg, xl)
2015
- * @default 'md'
2016
- */
2017
- size?: AlertSize;
2018
- /**
2019
- * Biến thể giao diện của Alert:
2020
- * - 'soft': nền nhạt pastel, viền mờ, chữ đậm tương ứng (mặc định)
2021
- * - 'filled': nền màu đậm, chữ tương phản cao
2022
- * - 'outline': nền trắng, viền rõ nét theo màu chủ đề
2023
- * - 'accent-left': viền nhấn dày bên trái, nền pastel
2024
- * - 'ghost': nền và viền trong suốt
2025
- * - 'other': không áp dụng style màu mặc định, tự do tùy biến qua className
2026
- * @default 'soft'
2027
- */
2028
- variant?: AlertVariant;
2029
- /**
2030
- * Chủ đề màu sắc (primary, secondary, neutral, error, success, warning, info)
2031
- * @default 'info'
2032
- */
2033
- color?: AlertColor;
2034
- /**
2035
- * Tùy chỉnh độ bo góc:
2036
- * - 'none': góc vuông 0px
2037
- * - 'sm': bo góc nhỏ
2038
- * - 'md': bo góc vừa
2039
- * - 'lg': bo góc lớn (mặc định)
2040
- * - 'xl': bo góc rất lớn
2041
- * - 'full': bo tròn hoàn toàn
2042
- * @default 'lg'
2043
- */
2044
- radius?: AlertRadius;
2045
- /**
2046
- * Tiêu đề của Alert
2047
- */
2048
- title?: ReactNode;
2049
- /**
2050
- * Nội dung mô tả chi tiết của Alert (có thể truyền qua prop description hoặc children)
2051
- */
2052
- description?: ReactNode;
2053
- /**
2054
- * Icon hiển thị ở đầu thông báo:
2055
- * - `true` (hoặc không truyền): tự động hiển thị icon theo `color`
2056
- * - `false`: ẩn icon
2057
- * - `ReactNode`: icon tùy chỉnh
2058
- * @default true
2059
- */
2060
- icon?: ReactNode | boolean;
2061
- /**
2062
- * Phần tử hành động phụ (Action slot, ví dụ: Nút bấm, liên kết thao tác)
2063
- */
2064
- action?: ReactNode;
2065
- /**
2066
- * Hiển thị nút đóng (Close button x) để người dùng có thể tắt thông báo. Tự động ẩn Alert khi click.
2067
- * @default true
2068
- */
2069
- closable?: boolean;
2070
- /**
2071
- * Callback khi người dùng bấm nút đóng
2072
- */
2073
- onClose?: () => void;
2074
- /**
2075
- * Nhãn accessibility cho nút đóng
2076
- * @default 'Close alert'
2077
- */
2078
- closeAriaLabel?: string;
2079
- /**
2080
- * Chế độ Banner: Full width, không bo góc (`rounded-none`), không viền 2 bên (`border-x-0`), thích hợp gắn cố định trên cùng màn hình
2081
- * @default false
2082
- */
2083
- banner?: boolean;
2084
- /**
2085
- * Class tùy biến cho phần tiêu đề (title)
2086
- */
2087
- titleClassName?: string;
2088
- /**
2089
- * Class tùy biến cho phần nội dung mô tả (description / children)
2090
- */
2091
- descriptionClassName?: string;
2092
- /**
2093
- * Class tùy biến cho vùng action slot
2094
- */
2095
- actionClassName?: string;
2096
- /**
2097
- * Class tùy biến cho icon wrapper
2098
- */
2099
- iconClassName?: string;
2100
- /**
2101
- * Class tùy biến cho nút đóng
2102
- */
2103
- closeButtonClassName?: string;
2104
- /**
2105
- * Class tùy biến cho container bao ngoài
2106
- */
2107
- className?: string;
2108
- /**
2109
- * Nội dung tùy biến bên trong Alert
2110
- */
2111
- children?: ReactNode;
2112
- }
2113
-
2114
1965
  declare function Alert({ size, variant, color, radius, title, description, icon, action, closable, onClose, closeAriaLabel, banner, titleClassName, descriptionClassName, actionClassName, iconClassName, closeButtonClassName, className, children, role, ref, ...props }: AlertProps): react_jsx_runtime.JSX.Element;
2115
1966
 
2116
- /**
2117
- * Vị trí hiển thị của danh sách thông báo Toast trên màn hình.
2118
- */
2119
- type ToastPosition = "top-left" | "top-right" | "top-center" | "bottom-left" | "bottom-right" | "bottom-center";
2120
- /**
2121
- * Cấu hình tùy chọn cho từng thông báo Toast đơn lẻ:
2122
- * - Dạng gọi hàm chuẩn: `toast.success(title, description?, options?)`
2123
- */
2124
- interface ToastOptions extends Omit<AlertProps, "title" | "description"> {
2125
- /**
2126
- * Thời gian hiển thị thông báo trước khi tự động đóng (miliseconds). Mặc định 4000ms.
2127
- * @default 4000
2128
- */
2129
- duration?: number;
2130
- /**
2131
- * Vị trí hiển thị riêng cho thông báo này trên màn hình.
2132
- */
2133
- position?: ToastPosition;
2134
- /**
2135
- * Callback được gọi khi thông báo bị đóng/gỡ bỏ khỏi màn hình.
2136
- */
2137
- onDismiss?: (toast: ToastT) => void;
2138
- /**
2139
- * Callback được gọi khi thông báo tự động đóng do hết thời gian duration.
2140
- */
2141
- onAutoClose?: (toast: ToastT) => void;
2142
- }
2143
- /**
2144
- * Cấu trúc thông báo dạng Object chi tiết cho `toast.promise`.
2145
- */
2146
- interface ToastMessageObject {
2147
- title?: ReactNode;
2148
- description?: ReactNode;
2149
- color?: AlertColor;
2150
- variant?: AlertVariant;
2151
- }
2152
- /**
2153
- * Kiểu dữ liệu linh hoạt cho nội dung thông báo trả về trong `toast.promise`:
2154
- * - `ReactNode`: Chuỗi text hoặc phần tử JSX thông thường.
2155
- * - `ToastMessageObject`: Object chi tiết gồm `{ title, description, color, variant }`.
2156
- */
2157
- type ToastMessageResult = ReactNode | ToastMessageObject;
2158
- /**
2159
- * Hàm tạo nội dung thông báo thành công động dựa theo dữ liệu `data: T` trả về từ Promise.
2160
- */
2161
- type ToastPromiseFunction<T> = (data: T) => ToastMessageResult;
2162
- /**
2163
- * Cấu hình các trạng thái cho `toast.promise(promise, options)`.
2164
- */
2165
- interface ToastPromiseOptions<T = unknown> {
2166
- /**
2167
- * Nội dung hiển thị trong lúc Promise đang thực thi (Loading state).
2168
- */
2169
- loading: ToastMessageResult;
2170
- /**
2171
- * Nội dung hiển thị khi Promise thực thi thành công (Resolve state).
2172
- * Có thể truyền trực tiếp nội dung hoặc một hàm nhận `data: T`.
2173
- */
2174
- success: ToastMessageResult | ToastPromiseFunction<T>;
2175
- /**
2176
- * Nội dung hiển thị khi Promise gặp lỗi (Reject state).
2177
- * Có thể truyền trực tiếp nội dung hoặc một hàm nhận `error: unknown`.
2178
- */
2179
- error: ToastMessageResult | ((error: unknown) => ToastMessageResult);
2180
- /**
2181
- * Callback chạy sau khi Promise hoàn tất (cả khi resolve hoặc reject).
2182
- */
2183
- finally?: () => void | Promise<void>;
2184
- /**
2185
- * Thời gian hiển thị thông báo kết quả (ms). Mặc định 4000ms.
2186
- * @default 4000
2187
- */
2188
- duration?: number;
2189
- /**
2190
- * Kích cỡ của Alert hiển thị trong Toast.
2191
- */
2192
- size?: AlertSize;
2193
- /**
2194
- * Biến thể giao diện của Alert hiển thị trong Toast.
2195
- */
2196
- variant?: AlertVariant;
2197
- /**
2198
- * Tùy chỉnh độ bo góc của Alert hiển thị trong Toast.
2199
- */
2200
- radius?: AlertRadius;
2201
- }
2202
- /**
2203
- * Props cho component `<Toaster />` được mount tại root layout của ứng dụng.
2204
- */
2205
- interface ToasterProps extends ToasterProps$1 {
2206
- /**
2207
- * Vị trí mặc định của toàn bộ danh sách toasts trên màn hình.
2208
- * @default 'top-right'
2209
- */
2210
- position?: ToastPosition;
2211
- /**
2212
- * Số lượng toast tối đa hiển thị cùng lúc trước khi tự động xếp chồng 3D (stack).
2213
- * @default 3
2214
- */
2215
- visibleToasts?: number;
2216
- /**
2217
- * Mở rộng toàn bộ danh sách toasts thay vì gộp lại thành 1 stack 3D.
2218
- * - `false` (mặc định): Tự động gộp thẻ 3D, chỉ bung ra khi hover chuột.
2219
- * - `true`: Luôn luôn mở rộng trải dài toàn bộ danh sách.
2220
- * @default false
2221
- */
2222
- expand?: boolean;
2223
- /**
2224
- * Thời gian hiển thị mặc định của các toasts (miliseconds).
2225
- * @default 4000
2226
- */
2227
- duration?: number;
2228
- /**
2229
- * Cho phép hiển thị nút đóng `(X)` trên các toasts.
2230
- * @default true
2231
- */
2232
- closeButton?: boolean;
2233
- /**
2234
- * Tùy biến className bao ngoài container của Toaster.
2235
- */
2236
- className?: string;
2237
- }
2238
-
2239
1967
  declare function Toaster({ position, visibleToasts, expand, duration, closeButton, className, toastOptions, ...props }: ToasterProps): react_jsx_runtime.JSX.Element;
2240
1968
 
2241
1969
  /**
@@ -9506,4 +9234,4 @@ declare function TableToolbar<TData extends RowData = RowData>({ table, searchPl
9506
9234
 
9507
9235
  declare function DataTable<TData extends RowData = RowData>({ columns, data, variant, size, isLoading, isRefresh, onRefresh, loadingRowsCount, emptyText, emptyIllustration, enableSorting, enableFiltering, enablePagination, enableRowSelection, enableColumnVisibility, enableColumnOrdering, filters, searchPlaceholder, toolbarActions, renderBulkActions, pageSizeOptions, initialPageSize, manualPagination, manualSorting, manualFiltering, pageCount, rowCount, pagination: controlledPagination, onPaginationChange, sorting: controlledSorting, onSortingChange, rowSelection: controlledRowSelection, onRowSelectionChange, columnVisibility: controlledColumnVisibility, onColumnVisibilityChange, columnOrder: controlledColumnOrder, onColumnOrderChange, globalFilter: controlledGlobalFilter, onGlobalFilterChange, globalFilterFn: controlledGlobalFilterFn, columnFilters: controlledColumnFilters, onColumnFiltersChange, onRowClick, className, containerClassName, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
9508
9236
 
9509
- export { AUDIO_EXTENSIONS, Alert, AlertCircleIcon, type AlertColor, type AlertProps, type AlertRadius, type AlertSize, AlertTriangleIcon, type AlertVariant, ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon, AvatarIcon, type AvatarIconProps, Badge, type BadgeColor, type BadgeProps, type BadgeRadius, type BadgeSize, type BadgeVariant, Button, type ButtonColor, type ButtonProps, type ButtonRadius, type ButtonSize, type ButtonVariant, Calendar, type CalendarDay, CalendarHeader, type CalendarHeaderProps, CalendarIcon, type CalendarProps, type CalendarView, Carousel, type CarouselArrowPosition, CarouselContent, type CarouselContentProps, type CarouselContextValue, type CarouselNavigationProps, type CarouselNavigationVariant, CarouselNext, CarouselPagination, type CarouselPaginationProps, type CarouselPaginationType, CarouselPrevious, type CarouselProps, type CarouselRadius, type CarouselSize, CarouselSlide, type CarouselSlideProps, CheckCircleIcon, CheckIcon, Checkbox, type CheckboxColor, type CheckboxConfig, CheckboxGroup, type CheckboxGroupConfig, type CheckboxGroupOrientation, type CheckboxGroupProps, type CheckboxLabelPlacement, type CheckboxOptionItem, type CheckboxProps, type CheckboxRadius, type CheckboxSearchMode, type CheckboxSize, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ClockIcon, CloseIcon, Collapse, type CollapseActiveKey, type CollapseColor, CollapseContent, type CollapseContentProps, type CollapseContextValue$1 as CollapseContextValue, type CollapseExpandIconPosition, CollapseHeader, type CollapseHeaderProps, CollapsePanel, type CollapsePanelContextValue$1 as CollapsePanelContextValue, type CollapsePanelProps, type CollapseProps, type CollapseRadius, type CollapseSize, type CollapseVariant, Collapsible, type CollapsibleProps, type ColumnOrderState, Confirm, ConfirmBody, type ConfirmBodyProps, ConfirmClose, type ConfirmCloseProps, type ConfirmColor, ConfirmContainer, type ConfirmContainerProps, ConfirmFooter, type ConfirmFooterProps, ConfirmHeader, type ConfirmHeaderProps, type ConfirmProps, type ConfirmRadius, type ConfirmSize, CropIcon, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_TOAST_DURATION, DOCUMENT_EXTENSIONS, DataTable, type DataTableProps, DatePicker, type DatePickerColor, type DatePickerConfig, type DatePickerProps, type DatePickerRadius, type DatePickerSize, type DatePickerVariant, type DateRange, DateRangeCalendar, type DateRangeCalendarDay, type DateRangeCalendarProps, DateRangeDayGrid, type DateRangeDayGridProps, DateRangeHeader, type DateRangeHeaderProps, DateRangeMonthGrid, type DateRangeMonthGridProps, DateRangePicker, type DateRangePickerColor, type DateRangePickerConfig, type DateRangePickerProps, type DateRangePickerRadius, type DateRangePickerSize, type DateRangePickerVariant, type DateRangeValue, DateRangeYearGrid, type DateRangeYearGridProps, DateTimePicker, type DateTimePickerColor, type DateTimePickerConfig, type DateTimePickerLayout, type DateTimePickerProps, type DateTimePickerRadius, type DateTimePickerSize, type DateTimePickerVariant, type DateTimeRange, DateTimeRangePicker, type DateTimeRangePickerColor, type DateTimeRangePickerConfig, type DateTimeRangePickerLayout, type DateTimeRangePickerProps, type DateTimeRangePickerRadius, type DateTimeRangePickerSize, type DateTimeRangePickerVariant, type DateTimeRangeValue, type DateTimeValue, type DateValue, DayGrid, type DayGridProps, type DefaultTableFeatures, DoubleChevronLeftIcon, DoubleChevronRightIcon, DownloadIcon, type DraggableTableHeadProps, Dropdown, type DropdownColor, type DropdownContextValue, DropdownGroup, type DropdownGroupProps, DropdownHeader, type DropdownHeaderProps, DropdownItem, type DropdownItemProps, DropdownMenu, type DropdownMenuProps, type DropdownPlacement, type DropdownProps, type DropdownRadius, DropdownSeparator, type DropdownSeparatorProps, type DropdownSize, DropdownTrigger, type DropdownTriggerProps, type DropdownTriggerType, Empty, EmptyDefaultIcon, EmptyErrorIcon, EmptyFolderIcon, EmptyIllustration, EmptyPresetImage, EmptyProps, EmptySearchIcon, EmptySimpleIcon, EyeIcon, type FileCategory, FileContainer, type FileContainerProps, FileIcon, type FileIconProps, FilePreview, type FilePreviewProps, type FileType, FlipHorizontalIcon, IMAGE_EXTENSIONS, IconButton, type IconButtonProps, ImageIcon, type ImageItem, ImagePreview, type ImagePreviewProps, ImagePreviewToolbar, type ImagePreviewToolbarProps, InfoCircleIcon, Input, type InputColor, type InputConfig, type InputProps, type InputRadius, type InputSize, type InputVariant, type LabelPlacement, LoadingImage, type LoadingImageProps, type LocaleConfig, MinusIcon, Modal, ModalBody, type ModalBodyProps, ModalClose, type ModalCloseProps, ModalContainer, type ModalContainerProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, type ModalRadius, type ModalSize, MonthGrid, type MonthGridProps, MultiInput, type MultiInputConfig, type MultiInputProps, MultiSelect, MultiSelectProps, MultiSelectTrigger, NumberInput, type NumberInputProps, OtpInput, type OtpInputConfig, type OtpInputProps, type OtpInputRef, type OtpInputType, PDF_EXTENSIONS, PasswordInput, type PasswordInputProps, PlusIcon, Popover, PopoverBody, type PopoverBodyProps, PopoverClose, type PopoverCloseProps, type PopoverColor, PopoverContent, type PopoverContentProps, type PopoverContextValue, PopoverFooter, type PopoverFooterProps, PopoverHeader, type PopoverHeaderProps, type PopoverPlacement, type PopoverProps, type PopoverRadius, type PopoverSize, PopoverTrigger, type PopoverTriggerProps, type PopoverTriggerType, type PreviewFile, Radio, type RadioColor, type RadioConfig, RadioDotIcon, RadioGroup, type RadioGroupConfig, type RadioGroupOrientation, type RadioGroupProps, type RadioLabelPlacement, type RadioOptionItem, type RadioProps, type RadioSearchMode, type RadioSize, type RadioVariant, ResetIcon, RotateCcwIcon, RotateCwIcon, SearchIcon, Select, SelectColor, Select as SelectComponent, SelectFilterField, SelectFilterLayout, SelectMenu, SelectMenuFilter, SelectOption, SelectOptionItem, SelectProps, SelectRadius, SelectSearchPlacement, SelectSize, SingleSelectTrigger as SelectTrigger, SelectVariant, type ServerFile, SingleSelectTrigger, Skeleton, type SkeletonObjectFit, type SkeletonProps, type SkeletonRadius, type SkeletonShape, type SkeletonVariant, Slider, type SliderColor, type SliderConfig, type SliderLabelPlacement, type SliderMark, SliderMarks, type SliderOrientation, type SliderProps, type SliderRadius, type SliderSize, SliderStepDots, SliderThumb, type SliderTooltipMode, type SliderTooltipPlacement, type SliderValue, type SliderVariant, SlidersHorizontalIcon, Spinner, Tab, type TabColor, TabList, type TabListProps, type TabOrientation, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabPlacement, type TabProps, type TabRadius, type TabSize, type TabVariant, Table, type TableAlign, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableColumnHeader, type TableColumnHeaderProps, type TableFilterDef, type TableFilterOption, type TableFilterType, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, type TableSize, TableToolbar, type TableToolbarProps, type TableVariant, Tabs, type TabsProps, type TagRenderProps, TextArea, type TextAreaColor, type TextAreaConfig, type TextAreaLabelPlacement, type TextAreaProps, type TextAreaRadius, type TextAreaResize, type TextAreaSize, type TextAreaVariant, TimeColumn, type TimeColumnItem, type TimeColumnProps, type TimeObject, type TimePeriod, TimePicker, type TimePickerColor, type TimePickerConfig, type TimePickerProps, type TimePickerRadius, type TimePickerSize, type TimePickerVariant, type TimeRange, TimeRangePicker, type TimeRangePickerColor, type TimeRangePickerConfig, type TimeRangePickerProps, type TimeRangePickerRadius, type TimeRangePickerSize, type TimeRangePickerVariant, type TimeRangeValue, type TimeValue, TimeView, type TimeViewProps, type ToastMessageObject, type ToastMessageResult, type ToastOptions, type ToastPosition, type ToastPromiseFunction, type ToastPromiseOptions, Toaster, type ToasterProps, Toggle, type ToggleColor, type ToggleConfig, type ToggleLabelPlacement, type ToggleProps, type ToggleRadius, type ToggleSize, type ToggleVariant, type ToolbarToolsConfig, Tooltip, type TooltipColor, type TooltipPlacement, type TooltipProps, type TooltipRadius, type TooltipSize, type TooltipVariant, TrashIcon, UploadAvatar, type UploadAvatarColor, type UploadAvatarConfig, UploadAvatarCropContent, UploadAvatarCropModal, type UploadAvatarCropOptions, type UploadAvatarLabelPlacement, type UploadAvatarProps, type UploadAvatarRadius, type UploadAvatarShape, type UploadAvatarSize, type UploadAvatarVariant, UploadFile, type UploadFileColor, type UploadFileConfig, type UploadFileDragStatus, UploadFileDropzone, type UploadFileDropzoneProps, UploadFileItemRow, type UploadFileItemRowProps, UploadFileList, type UploadFileListProps, type UploadFileListType, type UploadFileProps, type UploadFileRadius, type UploadFileShape, type UploadFileSize, type UploadFileVariant, type UploadFileViewMode, UploadIcon, UploadImage, type UploadImageColor, type UploadImageDragStatus, UploadImageDropzone, type UploadImageDropzoneProps, UploadImageList, type UploadImageListProps, type UploadImageObjectFit, type UploadImageProps, type UploadImageRadius, type UploadImageShape, type UploadImageSize, type UploadImageVariant, type UploadImageViewMode, type UseDataTableOptions, type UseFloatingTransitionOptions, VIDEO_EXTENSIONS, YearGrid, type YearGridProps, ZoomInIcon, ZoomOutIcon, checkIsDisabled, clamp, combineDateTime, createDateWithTime, createTableColumnHelper, defaultTableFeatures, downloadFile, formatBytes, formatDate, formatDateTime, formatNumberString, formatTime, fuzzyFilter, generateCalendarGrid, generateRangeCalendarGrid, getDefaultDateTimeFormat, getDefaultFormat, getFileCategory, getFileExtension, getFileName, getFileType, getISOWeekNumber, getPercentage, getSafeConfig, isDateAfter, isDateBefore, isSameDay, isSameMonth, isSameTime, isTimeAfter, isTimeBefore, isTimeInRange, isValidOtpChar, normalizePreviewFile, padZero, parseDate, parseDateTime, parseNumber, parseRawNumberString, parseTimeToDate, rankAndFilterItems, resolveLocale, sanitizeOtpString, splitTagsFromText, toDate, toDateTime, toTimeObject, toast, useAnimatedError, useCarousel, useCarouselContext, useCollapseContext, useCollapsePanelContext, useConfirmContext, useDataTable, useDebounce, useDebouncedCallback, useDropdownContext, useFileContext, useFloatingTransition, useModalContext, usePopoverContext, useTableStyles, useTabsContext };
9237
+ export { AUDIO_EXTENSIONS, Alert, AlertCircleIcon, AlertProps, AlertTriangleIcon, ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon, AvatarIcon, type AvatarIconProps, Badge, type BadgeColor, type BadgeProps, type BadgeRadius, type BadgeSize, type BadgeVariant, Button, type ButtonColor, type ButtonProps, type ButtonRadius, type ButtonSize, type ButtonVariant, Calendar, type CalendarDay, CalendarHeader, type CalendarHeaderProps, CalendarIcon, type CalendarProps, type CalendarView, Carousel, type CarouselArrowPosition, CarouselContent, type CarouselContentProps, type CarouselContextValue, type CarouselNavigationProps, type CarouselNavigationVariant, CarouselNext, CarouselPagination, type CarouselPaginationProps, type CarouselPaginationType, CarouselPrevious, type CarouselProps, type CarouselRadius, type CarouselSize, CarouselSlide, type CarouselSlideProps, CheckCircleIcon, CheckIcon, Checkbox, type CheckboxColor, type CheckboxConfig, CheckboxGroup, type CheckboxGroupConfig, type CheckboxGroupOrientation, type CheckboxGroupProps, type CheckboxLabelPlacement, type CheckboxOptionItem, type CheckboxProps, type CheckboxRadius, type CheckboxSearchMode, type CheckboxSize, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ClockIcon, CloseIcon, Collapse, type CollapseActiveKey, type CollapseColor, CollapseContent, type CollapseContentProps, type CollapseContextValue$1 as CollapseContextValue, type CollapseExpandIconPosition, CollapseHeader, type CollapseHeaderProps, CollapsePanel, type CollapsePanelContextValue$1 as CollapsePanelContextValue, type CollapsePanelProps, type CollapseProps, type CollapseRadius, type CollapseSize, type CollapseVariant, Collapsible, type CollapsibleProps, type ColumnOrderState, Confirm, ConfirmBody, type ConfirmBodyProps, ConfirmClose, type ConfirmCloseProps, type ConfirmColor, ConfirmContainer, type ConfirmContainerProps, ConfirmFooter, type ConfirmFooterProps, ConfirmHeader, type ConfirmHeaderProps, type ConfirmProps, type ConfirmRadius, type ConfirmSize, CropIcon, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_TOAST_DURATION, DOCUMENT_EXTENSIONS, DataTable, type DataTableProps, DatePicker, type DatePickerColor, type DatePickerConfig, type DatePickerProps, type DatePickerRadius, type DatePickerSize, type DatePickerVariant, type DateRange, DateRangeCalendar, type DateRangeCalendarDay, type DateRangeCalendarProps, DateRangeDayGrid, type DateRangeDayGridProps, DateRangeHeader, type DateRangeHeaderProps, DateRangeMonthGrid, type DateRangeMonthGridProps, DateRangePicker, type DateRangePickerColor, type DateRangePickerConfig, type DateRangePickerProps, type DateRangePickerRadius, type DateRangePickerSize, type DateRangePickerVariant, type DateRangeValue, DateRangeYearGrid, type DateRangeYearGridProps, DateTimePicker, type DateTimePickerColor, type DateTimePickerConfig, type DateTimePickerLayout, type DateTimePickerProps, type DateTimePickerRadius, type DateTimePickerSize, type DateTimePickerVariant, type DateTimeRange, DateTimeRangePicker, type DateTimeRangePickerColor, type DateTimeRangePickerConfig, type DateTimeRangePickerLayout, type DateTimeRangePickerProps, type DateTimeRangePickerRadius, type DateTimeRangePickerSize, type DateTimeRangePickerVariant, type DateTimeRangeValue, type DateTimeValue, type DateValue, DayGrid, type DayGridProps, type DefaultTableFeatures, DoubleChevronLeftIcon, DoubleChevronRightIcon, DownloadIcon, type DraggableTableHeadProps, Dropdown, type DropdownColor, type DropdownContextValue, DropdownGroup, type DropdownGroupProps, DropdownHeader, type DropdownHeaderProps, DropdownItem, type DropdownItemProps, DropdownMenu, type DropdownMenuProps, type DropdownPlacement, type DropdownProps, type DropdownRadius, DropdownSeparator, type DropdownSeparatorProps, type DropdownSize, DropdownTrigger, type DropdownTriggerProps, type DropdownTriggerType, Empty, EmptyDefaultIcon, EmptyErrorIcon, EmptyFolderIcon, EmptyIllustration, EmptyPresetImage, EmptyProps, EmptySearchIcon, EmptySimpleIcon, EyeIcon, type FileCategory, FileContainer, type FileContainerProps, FileIcon, type FileIconProps, FilePreview, type FilePreviewProps, type FileType, FlipHorizontalIcon, IMAGE_EXTENSIONS, IconButton, type IconButtonProps, ImageIcon, type ImageItem, ImagePreview, type ImagePreviewProps, ImagePreviewToolbar, type ImagePreviewToolbarProps, InfoCircleIcon, Input, type InputColor, type InputConfig, type InputProps, type InputRadius, type InputSize, type InputVariant, type LabelPlacement, LoadingImage, type LoadingImageProps, type LocaleConfig, MinusIcon, Modal, ModalBody, type ModalBodyProps, ModalClose, type ModalCloseProps, ModalContainer, type ModalContainerProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalProps, type ModalRadius, type ModalSize, MonthGrid, type MonthGridProps, MultiInput, type MultiInputConfig, type MultiInputProps, MultiSelect, MultiSelectProps, MultiSelectTrigger, NumberInput, type NumberInputProps, OtpInput, type OtpInputConfig, type OtpInputProps, type OtpInputRef, type OtpInputType, PDF_EXTENSIONS, PasswordInput, type PasswordInputProps, PlusIcon, Popover, PopoverBody, type PopoverBodyProps, PopoverClose, type PopoverCloseProps, type PopoverColor, PopoverContent, type PopoverContentProps, type PopoverContextValue, PopoverFooter, type PopoverFooterProps, PopoverHeader, type PopoverHeaderProps, type PopoverPlacement, type PopoverProps, type PopoverRadius, type PopoverSize, PopoverTrigger, type PopoverTriggerProps, type PopoverTriggerType, type PreviewFile, Radio, type RadioColor, type RadioConfig, RadioDotIcon, RadioGroup, type RadioGroupConfig, type RadioGroupOrientation, type RadioGroupProps, type RadioLabelPlacement, type RadioOptionItem, type RadioProps, type RadioSearchMode, type RadioSize, type RadioVariant, ResetIcon, RotateCcwIcon, RotateCwIcon, SearchIcon, Select, SelectColor, Select as SelectComponent, SelectFilterField, SelectFilterLayout, SelectMenu, SelectMenuFilter, SelectOption, SelectOptionItem, SelectProps, SelectRadius, SelectSearchPlacement, SelectSize, SingleSelectTrigger as SelectTrigger, SelectVariant, type ServerFile, SingleSelectTrigger, Skeleton, type SkeletonObjectFit, type SkeletonProps, type SkeletonRadius, type SkeletonShape, type SkeletonVariant, Slider, type SliderColor, type SliderConfig, type SliderLabelPlacement, type SliderMark, SliderMarks, type SliderOrientation, type SliderProps, type SliderRadius, type SliderSize, SliderStepDots, SliderThumb, type SliderTooltipMode, type SliderTooltipPlacement, type SliderValue, type SliderVariant, SlidersHorizontalIcon, Spinner, Tab, type TabColor, TabList, type TabListProps, type TabOrientation, TabPanel, type TabPanelProps, TabPanels, type TabPanelsProps, type TabPlacement, type TabProps, type TabRadius, type TabSize, type TabVariant, Table, type TableAlign, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableColumnHeader, type TableColumnHeaderProps, type TableFilterDef, type TableFilterOption, type TableFilterType, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, type TableSize, TableToolbar, type TableToolbarProps, type TableVariant, Tabs, type TabsProps, type TagRenderProps, TextArea, type TextAreaColor, type TextAreaConfig, type TextAreaLabelPlacement, type TextAreaProps, type TextAreaRadius, type TextAreaResize, type TextAreaSize, type TextAreaVariant, TimeColumn, type TimeColumnItem, type TimeColumnProps, type TimeObject, type TimePeriod, TimePicker, type TimePickerColor, type TimePickerConfig, type TimePickerProps, type TimePickerRadius, type TimePickerSize, type TimePickerVariant, type TimeRange, TimeRangePicker, type TimeRangePickerColor, type TimeRangePickerConfig, type TimeRangePickerProps, type TimeRangePickerRadius, type TimeRangePickerSize, type TimeRangePickerVariant, type TimeRangeValue, type TimeValue, TimeView, type TimeViewProps, ToastOptions, ToastPromiseOptions, Toaster, ToasterProps, Toggle, type ToggleColor, type ToggleConfig, type ToggleLabelPlacement, type ToggleProps, type ToggleRadius, type ToggleSize, type ToggleVariant, type ToolbarToolsConfig, Tooltip, type TooltipColor, type TooltipPlacement, type TooltipProps, type TooltipRadius, type TooltipSize, type TooltipVariant, TrashIcon, UploadAvatar, type UploadAvatarColor, type UploadAvatarConfig, UploadAvatarCropContent, UploadAvatarCropModal, type UploadAvatarCropOptions, type UploadAvatarLabelPlacement, type UploadAvatarProps, type UploadAvatarRadius, type UploadAvatarShape, type UploadAvatarSize, type UploadAvatarVariant, UploadFile, type UploadFileColor, type UploadFileConfig, type UploadFileDragStatus, UploadFileDropzone, type UploadFileDropzoneProps, UploadFileItemRow, type UploadFileItemRowProps, UploadFileList, type UploadFileListProps, type UploadFileListType, type UploadFileProps, type UploadFileRadius, type UploadFileShape, type UploadFileSize, type UploadFileVariant, type UploadFileViewMode, UploadIcon, UploadImage, type UploadImageColor, type UploadImageDragStatus, UploadImageDropzone, type UploadImageDropzoneProps, UploadImageList, type UploadImageListProps, type UploadImageObjectFit, type UploadImageProps, type UploadImageRadius, type UploadImageShape, type UploadImageSize, type UploadImageVariant, type UploadImageViewMode, type UseDataTableOptions, type UseFloatingTransitionOptions, VIDEO_EXTENSIONS, YearGrid, type YearGridProps, ZoomInIcon, ZoomOutIcon, checkIsDisabled, clamp, combineDateTime, createDateWithTime, createTableColumnHelper, defaultTableFeatures, downloadFile, formatBytes, formatDate, formatDateTime, formatNumberString, formatTime, fuzzyFilter, generateCalendarGrid, generateRangeCalendarGrid, getDefaultDateTimeFormat, getDefaultFormat, getFileCategory, getFileExtension, getFileName, getFileType, getISOWeekNumber, getPercentage, getSafeConfig, isDateAfter, isDateBefore, isSameDay, isSameMonth, isSameTime, isTimeAfter, isTimeBefore, isTimeInRange, isValidOtpChar, normalizePreviewFile, padZero, parseDate, parseDateTime, parseNumber, parseRawNumberString, parseTimeToDate, rankAndFilterItems, resolveLocale, sanitizeOtpString, splitTagsFromText, toDate, toDateTime, toTimeObject, toast, useAnimatedError, useCarousel, useCarouselContext, useCollapseContext, useCollapsePanelContext, useConfirmContext, useDataTable, useDebounce, useDebouncedCallback, useDropdownContext, useFileContext, useFloatingTransition, useModalContext, usePopoverContext, useTableStyles, useTabsContext };