anicca-ui 1.0.0

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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +371 -0
  3. package/dist/anicca-ui.css +1 -0
  4. package/dist/anicca-ui.es.js +927 -0
  5. package/dist/anicca-ui.umd.js +1 -0
  6. package/dist/dashboard/components/ActivityFeed/ActivityFeed.d.ts +27 -0
  7. package/dist/dashboard/components/ActivityFeed/index.d.ts +2 -0
  8. package/dist/dashboard/components/Breadcrumb/Breadcrumb.d.ts +25 -0
  9. package/dist/dashboard/components/Breadcrumb/index.d.ts +2 -0
  10. package/dist/dashboard/components/ChartWrapper/ChartWrapper.d.ts +34 -0
  11. package/dist/dashboard/components/ChartWrapper/index.d.ts +2 -0
  12. package/dist/dashboard/components/DataTable/DataTable.d.ts +38 -0
  13. package/dist/dashboard/components/DataTable/index.d.ts +2 -0
  14. package/dist/dashboard/components/Modal/Modal.d.ts +28 -0
  15. package/dist/dashboard/components/Modal/index.d.ts +2 -0
  16. package/dist/dashboard/components/Navbar/Navbar.d.ts +31 -0
  17. package/dist/dashboard/components/Navbar/index.d.ts +2 -0
  18. package/dist/dashboard/components/ProgressCard/ProgressCard.d.ts +39 -0
  19. package/dist/dashboard/components/ProgressCard/index.d.ts +2 -0
  20. package/dist/dashboard/components/Sidebar/Sidebar.d.ts +36 -0
  21. package/dist/dashboard/components/Sidebar/index.d.ts +2 -0
  22. package/dist/dashboard/components/StatCard/StatCard.d.ts +26 -0
  23. package/dist/dashboard/components/StatCard/index.d.ts +2 -0
  24. package/dist/dashboard/components/Tabs/Tabs.d.ts +28 -0
  25. package/dist/dashboard/components/Tabs/index.d.ts +2 -0
  26. package/dist/dashboard/index.d.ts +11 -0
  27. package/dist/date/hooks/useAniccaDate/index.d.ts +2 -0
  28. package/dist/date/hooks/useAniccaDate/useAniccaDate.d.ts +42 -0
  29. package/dist/date/index.d.ts +2 -0
  30. package/dist/date/utils/index.d.ts +82 -0
  31. package/dist/index.d.ts +6 -0
  32. package/dist/theme/AniccaThemeProvider.d.ts +27 -0
  33. package/dist/theme/index.d.ts +5 -0
  34. package/dist/theme/types.d.ts +39 -0
  35. package/dist/utils/functions/index.d.ts +109 -0
  36. package/dist/utils/hooks/useAniccaUtils/index.d.ts +2 -0
  37. package/dist/utils/hooks/useAniccaUtils/useAniccaUtils.d.ts +40 -0
  38. package/dist/utils/index.d.ts +2 -0
  39. package/dist/validation/hooks/useAniccaForm/index.d.ts +2 -0
  40. package/dist/validation/hooks/useAniccaForm/useAniccaForm.d.ts +60 -0
  41. package/dist/validation/index.d.ts +2 -0
  42. package/dist/validation/rules/index.d.ts +73 -0
  43. package/package.json +65 -0
@@ -0,0 +1 @@
1
+ (function(c,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],r):(c=typeof globalThis<"u"?globalThis:c||self,r(c.AniccaUI={},c.jsxRuntime,c.React))})(this,function(c,r,b){"use strict";const F={primary:"--anicca-primary",primaryFg:"--anicca-primary-fg",primarySoft:"--anicca-primary-soft",success:"--anicca-success",successBg:"--anicca-success-bg",danger:"--anicca-danger",dangerBg:"--anicca-danger-bg",warning:"--anicca-warning",warningBg:"--anicca-warning-bg",info:"--anicca-info",infoBg:"--anicca-info-bg",surface:"--anicca-surface",surfaceMuted:"--anicca-surface-muted",surfaceOverlay:"--anicca-surface-overlay",surfaceDark:"--anicca-surface-dark",surfaceDark2:"--anicca-surface-dark-2",surfaceDarkFg:"--anicca-surface-dark-fg",surfaceDarkFgMuted:"--anicca-surface-dark-fg-muted",border:"--anicca-border",borderStrong:"--anicca-border-strong",borderDark:"--anicca-border-dark",text:"--anicca-text",textMuted:"--anicca-text-muted",textSubtle:"--anicca-text-subtle",radius:"--anicca-radius",radiusSm:"--anicca-radius-sm",radiusLg:"--anicca-radius-lg",shadowSm:"--anicca-shadow-sm",shadowMd:"--anicca-shadow-md",shadowLg:"--anicca-shadow-lg"};function Z(a){if(!a)return{};const e={};for(const t of Object.keys(a)){const n=a[t];n!==void 0&&(e[F[t]]=n)}return e}function R({theme:a,as:e="div",className:t,children:n}){const s=b.useMemo(()=>Z(a),[a]),o=e;return r.jsx(o,{style:s,className:t,"data-anicca-theme":"",children:n})}function ee({title:a,value:e,icon:t,trend:n,trendLabel:s,color:o,className:i=""}){const p=n!==void 0?n>0?"up":n<0?"down":"neutral":null,l={up:"text-a-success bg-a-success-bg",down:"text-a-danger bg-a-danger-bg",neutral:"text-a-text-muted bg-a-surface-muted"};return r.jsxs("div",{className:`relative bg-gradient-to-br from-a-surface to-a-surface-muted rounded-a p-6 border-l-4 shadow-a-sm transition-all duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] overflow-hidden hover:shadow-a-md hover:-translate-y-1 group ${i}`,style:{borderLeftColor:o??"var(--anicca-primary)"},role:"group","aria-label":`${a}: ${e}`,children:[r.jsxs("div",{className:"flex justify-between items-start mb-3",children:[r.jsx("span",{className:"text-xs text-a-text-muted font-semibold uppercase tracking-[0.06em]",children:a}),t&&r.jsx("span",{className:"text-2xl text-a-text-subtle opacity-80 transition-transform duration-300 ease-in-out group-hover:scale-110",children:t})]}),r.jsx("div",{className:"text-[2rem] font-extrabold text-a-text mb-3 tracking-tight leading-[1.1]",children:e}),n!==void 0&&r.jsxs("div",{className:`inline-flex items-center gap-[0.35rem] text-[0.8rem] font-semibold py-1 px-[0.6rem] rounded-[20px] ${l[p||"neutral"]}`,children:[r.jsx("span",{className:"text-[0.7rem]",children:p==="up"?"↑":p==="down"?"↓":"→"}),r.jsxs("span",{className:"font-bold",children:[Math.abs(n),"%"]}),s&&r.jsx("span",{className:"text-a-text-subtle font-normal ml-2 text-xs",children:s})]})]})}const re={loading:"Loading chart"};function ae({title:a,subtitle:e,children:t,loading:n=!1,empty:s=!1,emptyMessage:o="No data available",height:i=300,labels:p,className:l=""}){const h=typeof i=="number"?`${i}px`:i,d={...re,...p};return r.jsxs("div",{className:`bg-gradient-to-br from-a-surface to-a-surface-muted rounded-a p-7 shadow-a-sm border border-a-border ${l}`,children:[r.jsxs("div",{className:"mb-5",children:[r.jsx("div",{className:"text-[1.05rem] font-bold text-a-text tracking-[-0.01em]",children:a}),e&&r.jsx("div",{className:"text-[0.8rem] text-a-text-muted mt-[0.3rem] font-normal",children:e})]}),r.jsx("div",{className:"relative w-full rounded-xl overflow-hidden",style:{height:h},children:n?r.jsx("div",{className:"w-full rounded-xl anicca-shimmer",style:{height:h},"aria-label":d.loading}):s?r.jsxs("div",{className:"flex flex-col items-center justify-center text-a-text-subtle gap-4 anicca-empty-bg rounded-xl border-2 border-dashed border-a-border",style:{height:h},children:[r.jsxs("svg",{className:"w-14 h-14 opacity-40 stroke-[1.2]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":"true",children:[r.jsx("path",{d:"M3 3v18h18",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M7 16l4-4 4 4 5-5",strokeLinecap:"round",strokeLinejoin:"round"})]}),r.jsx("span",{className:"text-[0.9rem] text-a-text-muted font-medium",children:o})]}):t})]})}const te={expand:"Expand sidebar",collapse:"Collapse sidebar",navigation:"Sidebar navigation"};function ne({items:a,collapsed:e=!1,onCollapse:t,logo:n,footer:s,activePath:o="",labels:i,className:p=""}){const[l,h]=b.useState({}),d={...te,...i},m=N=>{h(M=>({...M,[N]:!M[N]}))},g=()=>{t==null||t(!e)},u="flex items-center gap-3 py-[0.65rem] px-4 text-a-surface-dark-fg-muted no-underline text-sm font-medium cursor-pointer transition-all duration-200 ease-in-out border-none bg-transparent w-full text-left rounded-[10px] mb-[2px] hover:bg-a-surface-dark-2/60 hover:text-a-surface-dark-fg group/item",y="bg-a-primary-soft text-a-primary hover:bg-a-primary-soft hover:text-a-primary",$=N=>{const M=o===N.href,C=N.children&&N.children.length>0,x=l[N.href];return r.jsxs("div",{children:[C?r.jsxs("button",{className:`${u} ${M?y:""}`,onClick:()=>m(N.href),"aria-expanded":x,children:[N.icon&&r.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center text-[1.1rem] transition-transform duration-200 ease-in-out group-hover/item:scale-110",children:N.icon}),r.jsx("span",{className:`whitespace-nowrap overflow-hidden text-ellipsis transition-opacity duration-200 ease-in-out ${e?"hidden":""}`,children:N.label}),!e&&r.jsx("span",{className:`ml-auto transition-transform duration-[250ms] ease-[cubic-bezier(0.4,0,0.2,1)] text-[0.65rem] opacity-60 ${x?"rotate-90 opacity-100":""}`,children:"▶"})]}):r.jsxs("a",{href:N.href,className:`${u} ${M?y:""}`,"aria-current":M?"page":void 0,children:[N.icon&&r.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center text-[1.1rem] transition-transform duration-200 ease-in-out group-hover/item:scale-110",children:N.icon}),r.jsx("span",{className:`whitespace-nowrap overflow-hidden text-ellipsis transition-opacity duration-200 ease-in-out ${e?"hidden":""}`,children:N.label})]}),C&&!e&&r.jsx("div",{className:`pl-2 overflow-hidden transition-[max-height] duration-[350ms] ease-[cubic-bezier(0.4,0,0.2,1)] ${x?"max-h-[500px]":"max-h-0"}`,children:N.children.map(A=>r.jsxs("a",{href:A.href,className:`${u} pl-11 text-[0.82rem] ${o===A.href?y:""}`,"aria-current":o===A.href?"page":void 0,children:[A.icon&&r.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center text-[1.1rem]",children:A.icon}),r.jsx("span",{className:"whitespace-nowrap overflow-hidden text-ellipsis",children:A.label})]},A.href))})]},N.href)};return r.jsxs("aside",{className:`flex flex-col h-screen sticky top-0 bg-gradient-to-b from-a-surface-dark to-a-surface-dark-2 text-a-surface-dark-fg transition-[width] duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] overflow-hidden border-r border-a-border-dark shrink-0 ${e?"w-[72px]":"w-[260px]"} ${p}`,role:"navigation","aria-label":d.navigation,children:[n&&r.jsx("div",{className:"flex items-center justify-center py-6 px-5 border-b border-a-border-dark min-h-[72px]",children:n}),r.jsx("nav",{className:"flex-1 overflow-y-auto py-3 px-2 min-h-0",children:a.map($)}),r.jsxs("div",{className:"p-4 border-t border-a-border-dark",children:[s&&!e&&s,r.jsx("button",{className:"flex items-center justify-center w-full py-[0.6rem] bg-a-surface-dark-2/60 border border-a-border-dark rounded-lg text-a-surface-dark-fg-muted cursor-pointer text-[0.9rem] transition-all duration-200 ease-in-out hover:bg-a-surface-dark-2 hover:text-a-surface-dark-fg",onClick:g,"aria-label":e?d.expand:d.collapse,children:e?"→":"←"})]})]})}const se={toggleMenu:"Toggle menu"};function ce({title:a,logo:e,actions:t,user:n,onMenuToggle:s,labels:o,className:i=""}){const p={...se,...o},l=h=>h.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return r.jsxs("header",{className:`flex items-center justify-between px-7 h-[68px] bg-a-surface/90 backdrop-blur-[12px] border-b border-a-border shadow-a-sm sticky top-0 z-[100] ${i}`,role:"banner",children:[r.jsxs("div",{className:"flex items-center gap-[0.85rem]",children:[s&&r.jsx("button",{className:"flex items-center justify-center w-[38px] h-[38px] border border-a-border bg-a-surface-muted rounded-[10px] cursor-pointer text-a-text-muted text-[1.2rem] transition-all duration-200 ease-in-out hover:bg-a-border hover:text-a-text",onClick:s,"aria-label":p.toggleMenu,children:"☰"}),e&&r.jsx("div",{className:"flex items-center",children:e}),a&&r.jsx("span",{className:"text-[1.1rem] font-bold text-a-text tracking-[-0.01em]",children:a})]}),r.jsxs("div",{className:"flex items-center gap-5",children:[t&&r.jsx("div",{className:"flex items-center gap-2",children:t}),n&&r.jsxs("div",{className:"flex items-center gap-3 py-[0.4rem] pr-[0.6rem] pl-[0.4rem] rounded-xl transition-colors duration-200 ease-in-out hover:bg-a-surface-muted",children:[r.jsx("div",{className:"w-[38px] h-[38px] rounded-[10px] text-a-primary-fg flex items-center justify-center text-[0.8rem] font-bold overflow-hidden",style:{background:"var(--anicca-primary)"},children:n.avatar?r.jsx("img",{src:n.avatar,alt:n.name,className:"w-full h-full object-cover"}):l(n.name)}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-[0.85rem] font-semibold text-a-text",children:n.name}),n.role&&r.jsx("span",{className:"text-[0.7rem] text-a-text-muted font-normal",children:n.role})]})]})]})]})}function oe({items:a,separator:e="/",ariaLabel:t="Breadcrumb",className:n=""}){return r.jsx("nav",{className:`py-[0.6rem] ${n}`,"aria-label":t,children:r.jsx("ol",{className:"flex items-center list-none m-0 p-0 flex-wrap",children:a.map((s,o)=>{const i=o===a.length-1;return r.jsx("li",{className:"flex items-center",children:i?r.jsxs("span",{className:"inline-flex items-center gap-[0.35rem] text-a-text text-[0.82rem] font-bold py-[0.3rem] px-[0.7rem] bg-a-surface-muted rounded-md",children:[s.icon&&r.jsx("span",{className:"flex items-center text-[0.85rem]",children:s.icon}),s.label]}):r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:s.href||"#",className:"inline-flex items-center gap-[0.35rem] text-a-text-muted no-underline text-[0.82rem] font-medium py-[0.3rem] px-[0.6rem] rounded-md transition-all duration-200 ease-in-out hover:text-a-primary hover:bg-a-primary-soft",children:[s.icon&&r.jsx("span",{className:"flex items-center text-[0.85rem]",children:s.icon}),s.label]}),r.jsx("span",{className:"mx-1 text-a-text-subtle text-xs select-none","aria-hidden":"true",children:e})]})},`${s.label}-${o}`)})})})}const ie={searchPlaceholder:"Search...",results:"results",emptyMessage:"No data found",page:"Page",of:"of",previous:"← Prev",next:"Next →"};function le({data:a,columns:e,searchable:t=!0,pageSize:n=5,className:s="",labels:o}){const[i,p]=b.useState(""),[l,h]=b.useState(null),[d,m]=b.useState(!0),[g,u]=b.useState(0),y={...ie,...o},$=b.useMemo(()=>{let x=a;if(i){const A=i.toLowerCase();x=x.filter(f=>e.some(w=>String(f[w.key]??"").toLowerCase().includes(A)))}return l&&(x=[...x].sort((A,f)=>{const w=String(A[l]??""),v=String(f[l]??""),k=w.localeCompare(v,void 0,{numeric:!0});return d?k:-k})),x},[a,i,l,d,e]),N=n>0?Math.ceil($.length/n):1,M=n>0?$.slice(g*n,(g+1)*n):$,C=x=>{l===x?m(!d):(h(x),m(!0))};return r.jsxs("div",{className:`bg-a-surface rounded-a shadow-a-sm border border-a-border overflow-hidden ${s}`,children:[t&&r.jsxs("div",{className:"flex items-center justify-between py-5 px-6 border-b border-a-border",children:[r.jsxs("div",{className:"flex items-center gap-2 bg-a-surface-muted border-[1.5px] border-a-border rounded-[10px] py-2 px-[0.85rem] transition-colors focus-within:border-a-primary focus-within:shadow-[0_0_0_3px_var(--anicca-primary-soft)]",children:[r.jsx("span",{className:"text-[0.85rem] opacity-50",children:"🔍"}),r.jsx("input",{className:"border-none bg-transparent outline-none text-[0.85rem] font-[inherit] text-a-text w-[200px] placeholder:text-a-text-subtle",value:i,onChange:x=>{p(x.target.value),u(0)},placeholder:y.searchPlaceholder})]}),r.jsxs("span",{className:"text-xs text-a-text-subtle font-medium",children:[$.length," ",y.results]})]}),r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full border-collapse border-spacing-0",children:[r.jsx("thead",{children:r.jsx("tr",{children:e.map(x=>r.jsxs("th",{className:`text-left py-3 px-5 text-[0.7rem] font-semibold text-a-text-muted uppercase tracking-[0.05em] bg-a-surface-muted whitespace-nowrap ${x.sortable?"cursor-pointer select-none transition-colors duration-150 hover:text-a-text":""}`,style:x.width?{width:x.width}:void 0,onClick:x.sortable?()=>C(x.key):void 0,children:[x.label,x.sortable&&l===x.key&&r.jsx("span",{className:"text-[0.7rem]",children:d?" ↑":" ↓"})]},x.key))})}),r.jsx("tbody",{children:M.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:e.length,className:"py-12 px-6 text-center text-a-text-subtle text-[0.9rem]",children:y.emptyMessage})}):M.map((x,A)=>r.jsx("tr",{className:"transition-colors duration-150 hover:[&>td]:bg-a-surface-muted",children:e.map(f=>r.jsx("td",{className:"py-[0.85rem] px-5 text-[0.85rem] border-b border-a-border align-middle last:border-b-0 text-a-text",children:f.render?f.render(x[f.key],x):String(x[f.key]??"")},f.key))},A))})]})}),n>0&&N>1&&r.jsxs("div",{className:"flex items-center justify-center gap-4 py-4 px-6 border-t border-a-border",children:[r.jsx("button",{className:"py-[0.4rem] px-[0.85rem] border-[1.5px] border-a-border rounded-lg bg-a-surface text-[0.78rem] font-medium text-a-text-muted cursor-pointer transition-all duration-150 font-[inherit] hover:enabled:border-a-primary hover:enabled:text-a-primary disabled:opacity-40 disabled:cursor-not-allowed",disabled:g===0,onClick:()=>u(g-1),children:y.previous}),r.jsxs("span",{className:"text-[0.78rem] text-a-text-muted font-medium",children:[y.page," ",g+1," ",y.of," ",N]}),r.jsx("button",{className:"py-[0.4rem] px-[0.85rem] border-[1.5px] border-a-border rounded-lg bg-a-surface text-[0.78rem] font-medium text-a-text-muted cursor-pointer transition-all duration-150 font-[inherit] hover:enabled:border-a-primary hover:enabled:text-a-primary disabled:opacity-40 disabled:cursor-not-allowed",disabled:g>=N-1,onClick:()=>u(g+1),children:y.next})]})]})}function de({items:a,title:e,badge:t,className:n=""}){const s=e&&e.length>0||t;return r.jsxs("div",{className:`bg-a-surface rounded-a p-6 shadow-a-sm border border-a-border ${n}`,children:[s&&r.jsxs("div",{className:"flex justify-between items-center mb-5",children:[e?r.jsx("span",{className:"text-[0.95rem] font-bold text-a-text",children:e}):r.jsx("span",{}),t&&r.jsx("span",{children:t})]}),r.jsx("div",{className:"flex flex-col",children:a.map((o,i)=>r.jsxs("div",{className:"flex gap-[0.85rem] py-[0.85rem] relative",children:[i<a.length-1&&r.jsx("div",{className:"absolute left-[18px] top-[48px] bottom-0 w-[1.5px] bg-gradient-to-b from-a-border to-transparent"}),r.jsx("div",{className:"w-9 h-9 rounded-[10px] flex items-center justify-center text-[0.95rem] shrink-0 relative z-[1]",style:{background:o.iconBg||"var(--anicca-surface-muted)"},children:o.icon}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"text-[0.82rem] text-a-text leading-relaxed",children:o.message}),r.jsx("div",{className:"text-[0.7rem] text-a-text-subtle mt-[0.2rem]",children:o.time})]})]},i))})]})}const ue={unit:"projects"};function fe({items:a,title:e,showCount:t=!0,labels:n,className:s=""}){const o={...ue,...n};return r.jsxs("div",{className:`bg-a-surface rounded-a p-6 shadow-a-sm border border-a-border ${s}`,children:[e&&r.jsxs("div",{className:"flex justify-between items-center mb-5",children:[r.jsx("span",{className:"text-[0.95rem] font-bold text-a-text",children:e}),t&&r.jsxs("span",{className:"text-[0.68rem] py-[0.2rem] px-[0.55rem] rounded-[20px] font-semibold bg-a-info-bg text-a-info",children:[a.length," ",o.unit]})]}),a.map((i,p)=>{const l=i.color||"var(--anicca-primary)";return r.jsxs("div",{className:`py-[0.85rem] border-b border-a-border last:border-b-0 last:pb-0 ${p===0&&!e?"pt-0":""}`,children:[r.jsxs("div",{className:"flex justify-between items-center mb-2",children:[r.jsx("span",{className:"text-[0.85rem] font-semibold text-a-text",children:i.name}),r.jsxs("span",{className:"text-xs font-bold",style:{color:l},children:[i.progress,"%"]})]}),r.jsx("div",{className:"h-[7px] bg-a-surface-muted rounded overflow-hidden",children:r.jsx("div",{className:"h-full rounded transition-[width] duration-500 ease-in-out",style:{width:`${i.progress}%`,background:l}})}),(i.status||i.team)&&r.jsxs("div",{className:"flex justify-between items-center mt-[0.4rem]",children:[i.status&&r.jsx("span",{className:"text-[0.7rem] text-a-text-subtle",children:i.status}),i.team&&r.jsx("div",{className:"flex",children:i.team.map((h,d)=>{const m=typeof h=="string"?h:h.color,g=typeof h=="string"?String.fromCharCode(65+d):h.label??String.fromCharCode(65+d);return r.jsx("div",{className:"w-[22px] h-[22px] rounded-full border-2 border-a-surface -ml-[6px] first:ml-0 flex items-center justify-center text-[0.55rem] font-bold text-a-primary-fg",style:{background:m},children:g},d)})})]})]},i.name)})]})}const be={close:"Close"};function me({open:a,onClose:e,title:t,children:n,footer:s,disableEscapeKey:o=!1,disableBackdropClick:i=!1,labels:p,className:l=""}){const h={...be,...p};return b.useEffect(()=>{if(!a||o)return;const d=m=>{m.key==="Escape"&&e()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[a,e,o]),b.useEffect(()=>{if(a)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[a]),a?r.jsx("div",{className:"fixed inset-0 backdrop-blur-[4px] flex items-center justify-center z-[1000] anicca-fade-in p-4",style:{background:"var(--anicca-surface-overlay)"},onClick:i?void 0:e,role:"dialog","aria-modal":"true","aria-label":t,children:r.jsxs("div",{className:`bg-a-surface rounded-a shadow-a-lg w-full max-w-[480px] max-h-[90vh] overflow-y-auto anicca-slide-up ${l}`,onClick:d=>d.stopPropagation(),children:[t&&r.jsxs("div",{className:"flex items-center justify-between py-5 px-6 border-b border-a-border",children:[r.jsx("span",{className:"text-base font-bold text-a-text",children:t}),r.jsx("button",{className:"w-8 h-8 rounded-lg border-none bg-a-surface-muted text-a-text-muted text-[1.1rem] cursor-pointer flex items-center justify-center transition-all duration-150 hover:bg-a-border hover:text-a-text",onClick:e,"aria-label":h.close,children:"×"})]}),r.jsx("div",{className:"p-6 text-a-text",children:n}),s&&r.jsx("div",{className:"flex justify-end gap-3 py-4 px-6 border-t border-a-border",children:s})]})}):null}function he({tabs:a,defaultTab:e,activeKey:t,onChange:n,className:s=""}){var d;const[o,i]=b.useState(e||((d=a[0])==null?void 0:d.key)||""),p=t??o,l=a.find(m=>m.key===p),h=m=>{t===void 0&&i(m),n==null||n(m)};return r.jsxs("div",{className:`bg-a-surface rounded-a shadow-a-sm border border-a-border overflow-hidden ${s}`,children:[r.jsx("div",{className:"flex pt-2 px-6 border-b border-a-border",role:"tablist",children:a.map(m=>r.jsxs("button",{className:`py-[0.7rem] px-[1.1rem] text-[0.82rem] font-medium cursor-pointer border-none bg-transparent border-b-2 transition-all duration-200 flex items-center gap-[0.4rem] font-[inherit] -mb-px ${p===m.key?"text-a-primary border-b-a-primary font-semibold":"text-a-text-muted border-b-transparent hover:text-a-text"}`,onClick:()=>h(m.key),role:"tab","aria-selected":p===m.key,children:[m.icon&&r.jsx("span",{className:"text-[0.9rem]",children:m.icon}),m.label]},m.key))}),r.jsx("div",{className:"p-6 text-a-text",role:"tabpanel",children:l==null?void 0:l.content})]})}function pe(a="This field is required"){return{validate:e=>e==null?!1:typeof e=="string"?e.trim().length>0:Array.isArray(e)?e.length>0:!0,message:a}}function xe(a="Invalid email address"){return{validate:e=>typeof e!="string"?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),message:a}}function ge(a,e){return{validate:t=>typeof t!="string"?!1:t.length>=a,message:e||`Must be at least ${a} characters`}}function ye(a,e){return{validate:t=>typeof t!="string"?!1:t.length<=a,message:e||`Must be at most ${a} characters`}}function ve(a,e="Invalid format"){return{validate:t=>typeof t!="string"?!1:a.test(t),message:e}}function Ne(a,e){return{validate:t=>typeof t!="number"?!1:t>=a,message:e||`Must be at least ${a}`}}function we(a,e){return{validate:t=>typeof t!="number"?!1:t<=a,message:e||`Must be at most ${a}`}}function ke(a,e){return{validate:a,message:e}}function Ae(a){const{initialValues:e,validationSchema:t,onSubmit:n}=a,[s,o]=b.useState(e),[i,p]=b.useState({}),[l,h]=b.useState({}),[d,m]=b.useState(!1),g=b.useCallback((f,w)=>{const v=t==null?void 0:t[f];if(v){for(const k of v)if(!k.validate(w))return k.message}},[t]),u=b.useCallback(()=>{const f={};for(const w of Object.keys(e)){const v=g(w,s[w]);v&&(f[w]=v)}return f},[e,g,s]),y=Object.keys(i).length===0,$=b.useCallback(f=>w=>{const v=w.target.value;if(o(k=>({...k,[f]:v})),l[f]){const k=g(f,v);p(T=>{const L={...T};return k?L[f]=k:delete L[f],L})}},[l,g]),N=b.useCallback(f=>()=>{h(v=>({...v,[f]:!0}));const w=g(f,s[f]);p(v=>{const k={...v};return w?k[f]=w:delete k[f],k})},[g,s]),M=b.useCallback(async f=>{f&&f.preventDefault();const w={};for(const k of Object.keys(e))w[k]=!0;h(w);const v=u();if(p(v),Object.keys(v).length===0&&n){m(!0);try{await n(s)}finally{m(!1)}}},[e,n,u,s]),C=b.useCallback(()=>{o(e),p({}),h({}),m(!1)},[e]),x=b.useCallback((f,w)=>{if(o(v=>({...v,[f]:w})),l[f]){const v=g(f,w);p(k=>{const T={...k};return v?T[f]=v:delete T[f],T})}},[l,g]),A=b.useCallback((f,w)=>{p(v=>({...v,[f]:w}))},[]);return{values:s,errors:i,touched:l,isValid:y,isSubmitting:d,handleChange:$,handleBlur:N,handleSubmit:M,reset:C,setFieldValue:x,setFieldError:A}}const Se=["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],Me=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],$e=["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],Ce=["January","February","March","April","May","June","July","August","September","October","November","December"];function S(a){return typeof a=="string"?new Date(a):new Date(a.getTime())}function D(a){return a.toString().padStart(2,"0")}function E(a,e,t="en"){const n=S(a),s=t==="id"?Se:Me,o=t==="id"?$e:Ce;return e.replace("YYYY",n.getFullYear().toString()).replace("MM",D(n.getMonth()+1)).replace("DD",D(n.getDate())).replace("HH",D(n.getHours())).replace("mm",D(n.getMinutes())).replace("ss",D(n.getSeconds())).replace("dddd",s[n.getDay()]).replace("MMMM",o[n.getMonth()])}function B(a,e,t){const n=S(a),s=S(e);if(t==="years")return Math.abs(n.getFullYear()-s.getFullYear());if(t==="months")return Math.abs((n.getFullYear()-s.getFullYear())*12+(n.getMonth()-s.getMonth()));const o=Math.abs(n.getTime()-s.getTime());return Math.floor(o/{seconds:1e3,minutes:6e4,hours:36e5,days:864e5}[t])}function O(a,e="en"){const t=S(a),s=new Date().getTime()-t.getTime(),o=s<0,i=Math.abs(s),p=Math.floor(i/1e3),l=Math.floor(i/6e4),h=Math.floor(i/36e5),d=Math.floor(i/864e5),m=Math.floor(d/7),g=Math.floor(d/30),u=Math.floor(d/365);if(e==="id"){const y=o?"lagi":"lalu";return p<60?"baru saja":l<60?`${l} menit ${y}`:h<24?`${h} jam ${y}`:d<7?`${d} hari ${y}`:m<4?`${m} minggu ${y}`:g<12?`${g} bulan ${y}`:`${u} tahun ${y}`}return p<60?"just now":o?l<60?`in ${l} minutes`:h<24?`in ${h} hours`:d<7?`in ${d} days`:m<4?`in ${m} weeks`:g<12?`in ${g} months`:`in ${u} years`:l<60?`${l} minutes ago`:h<24?`${h} hours ago`:d<7?`${d} days ago`:m<4?`${m} weeks ago`:g<12?`${g} months ago`:`${u} years ago`}function _(a,e){const t=S(a);switch(e){case"day":return t.setHours(0,0,0,0),t;case"week":{const n=t.getDay();return t.setDate(t.getDate()-n),t.setHours(0,0,0,0),t}case"month":return t.setDate(1),t.setHours(0,0,0,0),t;case"year":return t.setMonth(0,1),t.setHours(0,0,0,0),t}}function H(a,e){const t=S(a);switch(e){case"day":return t.setHours(23,59,59,999),t;case"week":{const n=t.getDay();return t.setDate(t.getDate()+(6-n)),t.setHours(23,59,59,999),t}case"month":return t.setMonth(t.getMonth()+1,0),t.setHours(23,59,59,999),t;case"year":return t.setMonth(11,31),t.setHours(23,59,59,999),t}}function I(a,e,t){const n=S(a);switch(t){case"minutes":return n.setMinutes(n.getMinutes()+e),n;case"hours":return n.setHours(n.getHours()+e),n;case"days":return n.setDate(n.getDate()+e),n;case"months":return n.setMonth(n.getMonth()+e),n;case"years":return n.setFullYear(n.getFullYear()+e),n}}function U(a){return a instanceof Date?!isNaN(a.getTime()):typeof a=="string"?!isNaN(new Date(a).getTime()):!1}function Y(a,e){return S(a).getTime()<S(e).getTime()}function P(a,e){return S(a).getTime()>S(e).getTime()}function De(a){const[e,t]=b.useState(()=>{if(a==null)return null;const u=typeof a=="string"?new Date(a):a;return isNaN(u.getTime())?null:u}),n=b.useCallback(u=>{if(u===null){t(null);return}const y=typeof u=="string"?new Date(u):u;t(isNaN(y.getTime())?null:y)},[]),s=b.useCallback((u,y="en")=>e?E(e,u,y):"",[e]),o=b.useCallback((u,y)=>e?B(e,u,y):0,[e]),i=b.useCallback((u="en")=>e?O(e,u):"",[e]),p=b.useCallback((u,y)=>e?I(e,u,y):new Date,[e]),l=b.useCallback(u=>e?_(e,u):new Date,[e]),h=b.useCallback(u=>e?H(e,u):new Date,[e]),d=b.useCallback(()=>U(e),[e]),m=b.useCallback(u=>e?Y(e,u):!1,[e]),g=b.useCallback(u=>e?P(e,u):!1,[e]);return{date:e,setDate:n,format:s,diff:o,relative:i,add:p,startOf:l,endOf:h,isValid:d,isBefore:m,isAfter:g}}function V(a,e){let t=null;return(...n)=>{t&&clearTimeout(t),t=setTimeout(()=>a(...n),e)}}function q(a,e){let t=0;return(...n)=>{const s=Date.now();s-t>=e&&(t=s,a(...n))}}function J(a,e,t="..."){return a.length<=e?a:a.slice(0,e)+t}async function z(a){try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(a),!0;const e=document.createElement("textarea");e.value=a,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();const t=document.execCommand("copy");return document.body.removeChild(e),t}catch{return!1}}function K(a){return a.toLowerCase().replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function W(a){return a&&a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()}function G(a){return typeof structuredClone=="function"?structuredClone(a):JSON.parse(JSON.stringify(a))}function j(a,e=""){const t={};for(const n of Object.keys(a)){const s=e?`${e}.${n}`:n,o=a[n];o!==null&&typeof o=="object"&&!Array.isArray(o)?Object.assign(t,j(o,s)):t[s]=o}return t}function Q(a,e){const t={};for(const n of a){const s=String(n[e]);t[s]||(t[s]=[]),t[s].push(n)}return t}function X(a,e){const t=new Set;return a.filter(n=>{const s=n[e];return t.has(s)?!1:(t.add(s),!0)})}function Te(){return b.useMemo(()=>({debounce:V,throttle:q,truncate:J,copyToClipboard:z,slugify:K,capitalize:W,deepClone:G,flattenObject:j,groupBy:Q,uniqueBy:X}),[])}c.ANICCA_THEME_CSS_VAR_MAP=F,c.AniccaActivityFeed=de,c.AniccaBreadcrumb=oe,c.AniccaChartWrapper=ae,c.AniccaDataTable=le,c.AniccaModal=me,c.AniccaNavbar=ce,c.AniccaProgressCard=fe,c.AniccaSidebar=ne,c.AniccaStatCard=ee,c.AniccaTabs=he,c.AniccaThemeProvider=R,c.aniccaAdd=I,c.aniccaCapitalize=W,c.aniccaCopyToClipboard=z,c.aniccaDebounce=V,c.aniccaDeepClone=G,c.aniccaDiff=B,c.aniccaEndOf=H,c.aniccaFlattenObject=j,c.aniccaFormat=E,c.aniccaGroupBy=Q,c.aniccaIsAfter=P,c.aniccaIsBefore=Y,c.aniccaIsValid=U,c.aniccaRelative=O,c.aniccaSlugify=K,c.aniccaStartOf=_,c.aniccaThrottle=q,c.aniccaTruncate=J,c.aniccaUniqueBy=X,c.custom=ke,c.email=xe,c.max=we,c.maxLength=ye,c.min=Ne,c.minLength=ge,c.pattern=ve,c.required=pe,c.useAniccaDate=De,c.useAniccaForm=Ae,c.useAniccaUtils=Te,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ * A single activity item.
5
+ */
6
+ export interface AniccaActivityItem {
7
+ icon: React.ReactNode;
8
+ iconBg?: string;
9
+ message: React.ReactNode;
10
+ time: string;
11
+ }
12
+ /**
13
+ * Props for AniccaActivityFeed.
14
+ */
15
+ export interface AniccaActivityFeedProps {
16
+ items: AniccaActivityItem[];
17
+ /** Header title. Omit or pass empty string to hide the header entirely. */
18
+ title?: string;
19
+ /** Optional badge displayed on the right side of the header (e.g. live indicator). */
20
+ badge?: React.ReactNode;
21
+ className?: string;
22
+ }
23
+ /**
24
+ * AniccaActivityFeed — A timeline-style activity feed with
25
+ * connector lines, icons, and timestamps.
26
+ */
27
+ export declare function AniccaActivityFeed({ items, title, badge, className, }: AniccaActivityFeedProps): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ export { AniccaActivityFeed } from './ActivityFeed';
2
+ export type { AniccaActivityFeedProps, AniccaActivityItem } from './ActivityFeed';
@@ -0,0 +1,25 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ * A single breadcrumb item.
5
+ */
6
+ export interface AniccaBreadcrumbItem {
7
+ label: string;
8
+ href?: string;
9
+ icon?: React.ReactNode;
10
+ }
11
+ /**
12
+ * Props for the AniccaBreadcrumb component.
13
+ */
14
+ export interface AniccaBreadcrumbProps {
15
+ items: AniccaBreadcrumbItem[];
16
+ separator?: React.ReactNode;
17
+ /** Aria label override for the nav element. Default "Breadcrumb". */
18
+ ariaLabel?: string;
19
+ className?: string;
20
+ }
21
+ /**
22
+ * AniccaBreadcrumb — A breadcrumb navigation component showing
23
+ * the current page location within a hierarchy.
24
+ */
25
+ export declare function AniccaBreadcrumb({ items, separator, ariaLabel, className, }: AniccaBreadcrumbProps): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ export { AniccaBreadcrumb } from './Breadcrumb';
2
+ export type { AniccaBreadcrumbProps, AniccaBreadcrumbItem } from './Breadcrumb';
@@ -0,0 +1,34 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface AniccaChartWrapperLabels {
4
+ /** Aria label for the loading skeleton. Default "Loading chart". */
5
+ loading?: string;
6
+ }
7
+ /**
8
+ * Props for the AniccaChartWrapper component.
9
+ */
10
+ export interface AniccaChartWrapperProps {
11
+ /** Chart title */
12
+ title: string;
13
+ /** Optional subtitle */
14
+ subtitle?: string;
15
+ /** Chart content (any chart library or custom SVG) */
16
+ children: React.ReactNode;
17
+ /** Show loading skeleton */
18
+ loading?: boolean;
19
+ /** Show empty state */
20
+ empty?: boolean;
21
+ /** Message to display when empty. Default "No data available". */
22
+ emptyMessage?: string;
23
+ /** Height of the chart area */
24
+ height?: string | number;
25
+ /** i18n label overrides */
26
+ labels?: AniccaChartWrapperLabels;
27
+ /** Additional CSS class */
28
+ className?: string;
29
+ }
30
+ /**
31
+ * AniccaChartWrapper — A container for chart content with loading
32
+ * skeleton and empty state support.
33
+ */
34
+ export declare function AniccaChartWrapper({ title, subtitle, children, loading, empty, emptyMessage, height, labels, className, }: AniccaChartWrapperProps): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ export { AniccaChartWrapper } from './ChartWrapper';
2
+ export type { AniccaChartWrapperProps } from './ChartWrapper';
@@ -0,0 +1,38 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ * Column definition for AniccaDataTable.
5
+ */
6
+ export interface AniccaColumn<T> {
7
+ key: keyof T & string;
8
+ label: string;
9
+ sortable?: boolean;
10
+ render?: (value: T[keyof T], row: T) => React.ReactNode;
11
+ width?: string;
12
+ }
13
+ export interface AniccaDataTableLabels {
14
+ searchPlaceholder?: string;
15
+ results?: string;
16
+ emptyMessage?: string;
17
+ page?: string;
18
+ of?: string;
19
+ previous?: string;
20
+ next?: string;
21
+ }
22
+ /**
23
+ * Props for AniccaDataTable.
24
+ */
25
+ export interface AniccaDataTableProps<T extends object> {
26
+ data: T[];
27
+ columns: AniccaColumn<T>[];
28
+ searchable?: boolean;
29
+ pageSize?: number;
30
+ className?: string;
31
+ /** i18n label overrides */
32
+ labels?: AniccaDataTableLabels;
33
+ }
34
+ /**
35
+ * AniccaDataTable — A full-featured data table with search filtering,
36
+ * column sorting, pagination, and custom cell rendering.
37
+ */
38
+ export declare function AniccaDataTable<T extends object>({ data, columns, searchable, pageSize, className, labels, }: AniccaDataTableProps<T>): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ export { AniccaDataTable } from './DataTable';
2
+ export type { AniccaDataTableProps, AniccaColumn } from './DataTable';
@@ -0,0 +1,28 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface AniccaModalLabels {
4
+ /** Aria label for the close (×) button. Default "Close". */
5
+ close?: string;
6
+ }
7
+ /**
8
+ * Props for AniccaModal.
9
+ */
10
+ export interface AniccaModalProps {
11
+ open: boolean;
12
+ onClose: () => void;
13
+ title?: string;
14
+ children: React.ReactNode;
15
+ footer?: React.ReactNode;
16
+ /** Disable escape key dismissal. Default false. */
17
+ disableEscapeKey?: boolean;
18
+ /** Disable backdrop click dismissal. Default false. */
19
+ disableBackdropClick?: boolean;
20
+ /** i18n label overrides */
21
+ labels?: AniccaModalLabels;
22
+ className?: string;
23
+ }
24
+ /**
25
+ * AniccaModal — An accessible overlay dialog with backdrop blur,
26
+ * slide-up animation, and keyboard dismiss support.
27
+ */
28
+ export declare function AniccaModal({ open, onClose, title, children, footer, disableEscapeKey, disableBackdropClick, labels, className, }: AniccaModalProps): React.ReactElement | null;
@@ -0,0 +1,2 @@
1
+ export { AniccaModal } from './Modal';
2
+ export type { AniccaModalProps } from './Modal';
@@ -0,0 +1,31 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ * User information for the navbar.
5
+ */
6
+ export interface AniccaNavbarUser {
7
+ name: string;
8
+ avatar?: string;
9
+ role?: string;
10
+ }
11
+ export interface AniccaNavbarLabels {
12
+ toggleMenu?: string;
13
+ }
14
+ /**
15
+ * Props for the AniccaNavbar component.
16
+ */
17
+ export interface AniccaNavbarProps {
18
+ title?: string;
19
+ logo?: React.ReactNode;
20
+ actions?: React.ReactNode;
21
+ user?: AniccaNavbarUser;
22
+ onMenuToggle?: () => void;
23
+ /** i18n label overrides */
24
+ labels?: AniccaNavbarLabels;
25
+ className?: string;
26
+ }
27
+ /**
28
+ * AniccaNavbar — A sticky top navigation bar with hamburger menu,
29
+ * logo, title, action buttons, and user avatar display.
30
+ */
31
+ export declare function AniccaNavbar({ title, logo, actions, user, onMenuToggle, labels, className, }: AniccaNavbarProps): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ export { AniccaNavbar } from './Navbar';
2
+ export type { AniccaNavbarProps, AniccaNavbarUser } from './Navbar';
@@ -0,0 +1,39 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ * A single project/task item.
5
+ */
6
+ export interface AniccaProgressItem {
7
+ name: string;
8
+ progress: number;
9
+ /** Optional accent color. Defaults to theme primary token. */
10
+ color?: string;
11
+ status?: string;
12
+ /** Team member colors OR objects with color + label. */
13
+ team?: Array<string | {
14
+ color: string;
15
+ label?: string;
16
+ }>;
17
+ }
18
+ export interface AniccaProgressCardLabels {
19
+ /** Singular/plural unit label shown next to item count. Default "projects". */
20
+ unit?: string;
21
+ }
22
+ /**
23
+ * Props for AniccaProgressCard.
24
+ */
25
+ export interface AniccaProgressCardProps {
26
+ items: AniccaProgressItem[];
27
+ /** Card title. Omit to hide the header. */
28
+ title?: string;
29
+ /** Show the count badge in the header (only when title is set). Default true. */
30
+ showCount?: boolean;
31
+ /** i18n label overrides */
32
+ labels?: AniccaProgressCardLabels;
33
+ className?: string;
34
+ }
35
+ /**
36
+ * AniccaProgressCard — A card displaying a list of projects/tasks
37
+ * with progress bars, status labels, and team avatars.
38
+ */
39
+ export declare function AniccaProgressCard({ items, title, showCount, labels, className, }: AniccaProgressCardProps): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ export { AniccaProgressCard } from './ProgressCard';
2
+ export type { AniccaProgressCardProps, AniccaProgressItem } from './ProgressCard';
@@ -0,0 +1,36 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ * Sidebar navigation item.
5
+ */
6
+ export interface AniccaSidebarItem {
7
+ label: string;
8
+ icon?: React.ReactNode;
9
+ href: string;
10
+ children?: AniccaSidebarItem[];
11
+ }
12
+ export interface AniccaSidebarLabels {
13
+ expand?: string;
14
+ collapse?: string;
15
+ navigation?: string;
16
+ }
17
+ /**
18
+ * Props for the AniccaSidebar component.
19
+ */
20
+ export interface AniccaSidebarProps {
21
+ items: AniccaSidebarItem[];
22
+ collapsed?: boolean;
23
+ onCollapse?: (collapsed: boolean) => void;
24
+ logo?: React.ReactNode;
25
+ footer?: React.ReactNode;
26
+ activePath?: string;
27
+ /** i18n label overrides */
28
+ labels?: AniccaSidebarLabels;
29
+ className?: string;
30
+ }
31
+ /**
32
+ * AniccaSidebar — A collapsible sidebar navigation component
33
+ * with support for nested submenus, active state highlighting,
34
+ * and icon-only collapsed mode.
35
+ */
36
+ export declare function AniccaSidebar({ items, collapsed, onCollapse, logo, footer, activePath, labels, className, }: AniccaSidebarProps): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ export { AniccaSidebar } from './Sidebar';
2
+ export type { AniccaSidebarProps, AniccaSidebarItem } from './Sidebar';
@@ -0,0 +1,26 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ * Props for the AniccaStatCard component.
5
+ */
6
+ export interface AniccaStatCardProps {
7
+ /** Title label for the stat */
8
+ title: string;
9
+ /** The stat value to display prominently */
10
+ value: string | number;
11
+ /** Optional icon displayed at the top right */
12
+ icon?: React.ReactNode;
13
+ /** Trend percentage (positive = up, negative = down) */
14
+ trend?: number;
15
+ /** Label for the trend (e.g. "vs last month") */
16
+ trendLabel?: string;
17
+ /** Accent color for the left border. Defaults to theme primary token. */
18
+ color?: string;
19
+ /** Additional CSS class */
20
+ className?: string;
21
+ }
22
+ /**
23
+ * AniccaStatCard — A dashboard stat card displaying a key metric
24
+ * with optional trend indicator and icon.
25
+ */
26
+ export declare function AniccaStatCard({ title, value, icon, trend, trendLabel, color, className, }: AniccaStatCardProps): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ export { AniccaStatCard } from './StatCard';
2
+ export type { AniccaStatCardProps } from './StatCard';
@@ -0,0 +1,28 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ * A single tab definition.
5
+ */
6
+ export interface AniccaTabItem {
7
+ key: string;
8
+ label: string;
9
+ content: React.ReactNode;
10
+ icon?: React.ReactNode;
11
+ }
12
+ /**
13
+ * Props for AniccaTabs.
14
+ */
15
+ export interface AniccaTabsProps {
16
+ tabs: AniccaTabItem[];
17
+ defaultTab?: string;
18
+ /** Controlled active key. When provided, component becomes controlled. */
19
+ activeKey?: string;
20
+ /** Callback when tab changes (works in both controlled and uncontrolled mode). */
21
+ onChange?: (key: string) => void;
22
+ className?: string;
23
+ }
24
+ /**
25
+ * AniccaTabs — A tab navigation component with animated indicator
26
+ * and content switching. Supports controlled and uncontrolled modes.
27
+ */
28
+ export declare function AniccaTabs({ tabs, defaultTab, activeKey, onChange, className, }: AniccaTabsProps): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ export { AniccaTabs } from './Tabs';
2
+ export type { AniccaTabsProps, AniccaTabItem } from './Tabs';
@@ -0,0 +1,11 @@
1
+
2
+ export * from './components/StatCard';
3
+ export * from './components/ChartWrapper';
4
+ export * from './components/Sidebar';
5
+ export * from './components/Navbar';
6
+ export * from './components/Breadcrumb';
7
+ export * from './components/DataTable';
8
+ export * from './components/ActivityFeed';
9
+ export * from './components/ProgressCard';
10
+ export * from './components/Modal';
11
+ export * from './components/Tabs';
@@ -0,0 +1,2 @@
1
+ export { useAniccaDate } from './useAniccaDate';
2
+ export type { UseAniccaDateReturn } from './useAniccaDate';
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Return type for useAniccaDate hook.
3
+ */
4
+ export interface UseAniccaDateReturn {
5
+ /** Current date state */
6
+ date: Date | null;
7
+ /** Set the date state */
8
+ setDate: (date: Date | string | null) => void;
9
+ /** Format the current date */
10
+ format: (format: string, locale?: 'id' | 'en') => string;
11
+ /** Get difference between current date and another date */
12
+ diff: (date2: Date | string, unit: 'days' | 'hours' | 'minutes' | 'seconds' | 'months' | 'years') => number;
13
+ /** Get relative time string */
14
+ relative: (locale?: 'id' | 'en') => string;
15
+ /** Add time to current date (returns new Date, does not mutate state) */
16
+ add: (amount: number, unit: 'days' | 'hours' | 'minutes' | 'months' | 'years') => Date;
17
+ /** Get start of unit for current date */
18
+ startOf: (unit: 'day' | 'week' | 'month' | 'year') => Date;
19
+ /** Get end of unit for current date */
20
+ endOf: (unit: 'day' | 'week' | 'month' | 'year') => Date;
21
+ /** Check if current date is valid */
22
+ isValid: () => boolean;
23
+ /** Check if current date is before another date */
24
+ isBefore: (date2: Date | string) => boolean;
25
+ /** Check if current date is after another date */
26
+ isAfter: (date2: Date | string) => boolean;
27
+ }
28
+ /**
29
+ * useAniccaDate — A hook for date manipulation providing format,
30
+ * diff, relative time, arithmetic, and comparison operations.
31
+ *
32
+ * @param initialDate - Initial date value (default: null)
33
+ * @returns Date state and manipulation methods
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * const { date, setDate, format, relative } = useAniccaDate(new Date())
38
+ * const formatted = format('dddd, DD MMMM YYYY', 'id')
39
+ * const rel = relative('id') // "baru saja"
40
+ * ```
41
+ */
42
+ export declare function useAniccaDate(initialDate?: Date | string | null): UseAniccaDateReturn;
@@ -0,0 +1,2 @@
1
+ export * from './utils';
2
+ export * from './hooks/useAniccaDate';
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Formats a date using token-based format string.
3
+ *
4
+ * Supported tokens: YYYY, MM, DD, HH, mm, ss, dddd, MMMM
5
+ *
6
+ * @param date - Date to format
7
+ * @param format - Format string with tokens
8
+ * @param locale - Locale ('id' or 'en', default 'en')
9
+ * @returns Formatted date string
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * aniccaFormat(new Date(), 'dddd, DD MMMM YYYY', 'id')
14
+ * // "Senin, 15 Januari 2024"
15
+ * ```
16
+ */
17
+ export declare function aniccaFormat(date: Date | string, format: string, locale?: 'id' | 'en'): string;
18
+ /**
19
+ * Calculates the absolute difference between two dates in the specified unit.
20
+ *
21
+ * @param date1 - First date
22
+ * @param date2 - Second date
23
+ * @param unit - Unit of measurement
24
+ * @returns Absolute difference as a number
25
+ */
26
+ export declare function aniccaDiff(date1: Date | string, date2: Date | string, unit: 'days' | 'hours' | 'minutes' | 'seconds' | 'months' | 'years'): number;
27
+ /**
28
+ * Returns a human-readable relative time string.
29
+ *
30
+ * @param date - Date to compare with now
31
+ * @param locale - Locale ('id' or 'en', default 'en')
32
+ * @returns Relative time string (e.g. "2 hours ago" or "2 jam lalu")
33
+ */
34
+ export declare function aniccaRelative(date: Date | string, locale?: 'id' | 'en'): string;
35
+ /**
36
+ * Returns the start of a time unit for the given date.
37
+ *
38
+ * @param date - Input date
39
+ * @param unit - Unit to get start of
40
+ * @returns New Date set to the start of the unit
41
+ */
42
+ export declare function aniccaStartOf(date: Date | string, unit: 'day' | 'week' | 'month' | 'year'): Date;
43
+ /**
44
+ * Returns the end of a time unit for the given date.
45
+ *
46
+ * @param date - Input date
47
+ * @param unit - Unit to get end of
48
+ * @returns New Date set to the end of the unit
49
+ */
50
+ export declare function aniccaEndOf(date: Date | string, unit: 'day' | 'week' | 'month' | 'year'): Date;
51
+ /**
52
+ * Adds (or subtracts) an amount of time to a date.
53
+ *
54
+ * @param date - Base date
55
+ * @param amount - Amount to add (negative to subtract)
56
+ * @param unit - Unit of the amount
57
+ * @returns New Date with the amount added
58
+ */
59
+ export declare function aniccaAdd(date: Date | string, amount: number, unit: 'days' | 'hours' | 'minutes' | 'months' | 'years'): Date;
60
+ /**
61
+ * Checks if a value is a valid Date or parseable date string.
62
+ *
63
+ * @param date - Value to check
64
+ * @returns true if valid date
65
+ */
66
+ export declare function aniccaIsValid(date: unknown): boolean;
67
+ /**
68
+ * Checks if date1 is before date2.
69
+ *
70
+ * @param date1 - First date
71
+ * @param date2 - Second date
72
+ * @returns true if date1 is before date2
73
+ */
74
+ export declare function aniccaIsBefore(date1: Date | string, date2: Date | string): boolean;
75
+ /**
76
+ * Checks if date1 is after date2.
77
+ *
78
+ * @param date1 - First date
79
+ * @param date2 - Second date
80
+ * @returns true if date1 is after date2
81
+ */
82
+ export declare function aniccaIsAfter(date1: Date | string, date2: Date | string): boolean;
@@ -0,0 +1,6 @@
1
+
2
+ export * from './theme';
3
+ export * from './dashboard';
4
+ export * from './validation';
5
+ export * from './date';
6
+ export * from './utils';
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ import { AniccaTheme } from './types';
3
+
4
+ /**
5
+ * Props for AniccaThemeProvider.
6
+ */
7
+ export interface AniccaThemeProviderProps {
8
+ /** Partial theme overrides; any token omitted falls back to library default. */
9
+ theme?: AniccaTheme;
10
+ /** Wrapper element tag (default "div"). Use "span" if mounting inline. */
11
+ as?: keyof React.JSX.IntrinsicElements;
12
+ /** Additional CSS class on the wrapper element. */
13
+ className?: string;
14
+ children: React.ReactNode;
15
+ }
16
+ /**
17
+ * AniccaThemeProvider — Wrap children to override AniccaUI design tokens
18
+ * via CSS custom properties. Multiple providers can be nested for scoped overrides.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * <AniccaThemeProvider theme={{ primary: '#ff00ff' }}>
23
+ * <AniccaStatCard title="Sales" value={42} />
24
+ * </AniccaThemeProvider>
25
+ * ```
26
+ */
27
+ export declare function AniccaThemeProvider({ theme, as, className, children, }: AniccaThemeProviderProps): React.ReactElement;
@@ -0,0 +1,5 @@
1
+
2
+ export { AniccaThemeProvider } from './AniccaThemeProvider';
3
+ export type { AniccaThemeProviderProps } from './AniccaThemeProvider';
4
+ export type { AniccaTheme } from './types';
5
+ export { ANICCA_THEME_CSS_VAR_MAP } from './types';