jett-visa-design-system 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("react");function C({variant:t="primary",size:r="md",children:a,isLoading:i=!1,disabled:l,className:s="",...n}){const o="rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed",d={sm:"px-3 py-1.5 text-sm",md:"px-4 py-2.5 text-body",lg:"px-6 py-3.5 text-base"},c={primary:"bg-black text-white hover:bg-gray-700 active:bg-gray-900 focus:ring-gray-900 disabled:bg-gray-300 disabled:text-gray-500",secondary:"border border-black text-black bg-white hover:bg-gray-100 active:bg-gray-200 focus:ring-gray-900 disabled:border-gray-300 disabled:text-gray-400 disabled:bg-white disabled:hover:bg-white",ghost:"text-gray-900 bg-transparent hover:bg-gray-100 active:bg-gray-200 focus:ring-gray-900 disabled:text-gray-400 disabled:bg-transparent disabled:hover:bg-transparent",outline:"border-2 border-primary text-primary bg-transparent hover:bg-primary/5 focus:ring-primary",danger:"bg-danger text-white hover:bg-danger/90 focus:ring-danger"};return e.jsx("button",{className:`${o} ${d[r]} ${c[t]} ${s}`,disabled:l||i,...n,children:i?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsxs("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:[e.jsx("circle",{cx:"4",cy:"12",r:"2",children:e.jsx("animate",{attributeName:"opacity",values:"0.3;1;0.3",dur:"1.4s",repeatCount:"indefinite",begin:"0s"})}),e.jsx("circle",{cx:"12",cy:"12",r:"2",children:e.jsx("animate",{attributeName:"opacity",values:"0.3;1;0.3",dur:"1.4s",repeatCount:"indefinite",begin:"0.2s"})}),e.jsx("circle",{cx:"20",cy:"12",r:"2",children:e.jsx("animate",{attributeName:"opacity",values:"0.3;1;0.3",dur:"1.4s",repeatCount:"indefinite",begin:"0.4s"})})]}),"Loading"]}):a})}function L({variant:t="primary",size:r="md",icon:a,className:i="",...l}){const s="rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed flex items-center justify-center",n={sm:"w-8 h-8",md:"w-10 h-10",lg:"w-12 h-12"},o={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},d={primary:"bg-black text-white hover:bg-gray-700 active:bg-gray-900 focus:ring-gray-900 disabled:bg-gray-300 disabled:text-gray-500",secondary:"border border-black text-black bg-white hover:bg-gray-100 active:bg-gray-200 focus:ring-gray-900 disabled:border-gray-300 disabled:text-gray-400 disabled:bg-white",ghost:"text-gray-900 bg-transparent hover:bg-gray-100 active:bg-gray-200 focus:ring-gray-900 disabled:text-gray-400",danger:"bg-gray-200 text-gray-700 hover:bg-gray-300 active:bg-gray-400 focus:ring-gray-900"};return e.jsx("button",{className:`${s} ${n[r]} ${d[t]} ${i}`,...l,children:e.jsx("span",{className:o[r],children:a})})}function B({children:t,className:r="",header:a,footer:i}){return e.jsxs("div",{className:`bg-white rounded-lg shadow-sm border border-gray-100 ${r}`,children:[a&&e.jsx("div",{className:"px-6 py-4 border-b border-gray-100",children:a}),e.jsx("div",{className:"px-6 py-4",children:t}),i&&e.jsx("div",{className:"px-6 py-4 border-t border-gray-100",children:i})]})}function D({icon:t,title:r,description:a,entryCount:i,onClick:l,className:s=""}){return e.jsxs("div",{className:`bg-white rounded-lg shadow-sm border border-gray-100 p-6 hover:shadow-md transition-shadow cursor-pointer ${s}`,onClick:l,children:[e.jsx("div",{className:"w-12 h-12 bg-black rounded-md flex items-center justify-center mb-4",children:t}),e.jsx("h4",{className:"text-h5 font-bold text-gray-900 mb-2",children:r}),e.jsx("p",{className:"text-body text-gray-600 mb-4",children:a}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-caption text-gray-500",children:i}),e.jsx("svg",{className:"w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]})}function E({title:t,icon:r,value:a,change:i,changeType:l="positive",className:s=""}){const n=l==="positive"?"text-success":"text-error";return e.jsxs("div",{className:`bg-white rounded-lg shadow-sm border border-gray-100 p-6 ${s}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h4",{className:"text-caption font-semibold text-gray-900 uppercase tracking-wider",children:t}),e.jsx("div",{className:"text-gray-400",children:r})]}),e.jsx("div",{className:"text-h1 font-bold text-gray-900 mb-2",children:a}),e.jsx("div",{className:`text-caption ${n}`,children:i})]})}function M({title:t,viewAllLabel:r="View all",onViewAll:a,items:i,className:l=""}){return e.jsxs("div",{className:`bg-white rounded-lg shadow-sm border border-gray-100 p-6 ${l}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h4",{className:"text-h5 font-semibold text-gray-900",children:t}),a&&e.jsx("button",{className:"text-body text-[#2563EB] hover:underline",onClick:a,children:r})]}),e.jsx("ul",{className:"space-y-3",children:i.map(s=>e.jsxs("li",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"text-gray-900 mt-1",children:"•"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-body text-gray-900",children:s.content}),s.timestamp&&e.jsx("p",{className:"text-caption text-gray-500 mt-1",children:s.timestamp}),s.subtitle&&e.jsx("p",{className:"text-caption text-gray-500 mt-1",children:s.subtitle})]})]},s.id))})]})}function $({children:t,variant:r="default",icon:a,className:i=""}){const l={default:"bg-gray-100 text-gray-800",success:"bg-[#D1F5D3] text-[#059669]",warning:"bg-yellow-100 text-yellow-700",danger:"bg-red-100 text-[#DC2626]",active:"bg-[#D1F5D3] text-[#059669]",inactive:"bg-red-100 text-[#DC2626]",pending:"bg-blue-100 text-blue-700",draft:"bg-gray-100 text-gray-700"};return e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-md text-xs font-medium ${l[r]} ${i}`,children:[a&&e.jsx("span",{className:"w-3 h-3",children:a}),t]})}function S({title:t,viewAllLabel:r="View all",onViewAll:a,countries:i,className:l=""}){return e.jsxs("div",{className:`bg-white rounded-lg shadow-sm border border-gray-100 p-6 ${l}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h4",{className:"text-h5 font-semibold text-gray-900",children:t}),a&&e.jsx("button",{className:"text-body text-[#2563EB] hover:underline",onClick:a,children:r})]}),e.jsx("ul",{className:"space-y-4",children:i.map(s=>e.jsxs("li",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gray-200 rounded-full shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-body font-medium text-gray-900",children:s.name}),s.status==="active"&&e.jsx($,{variant:"success",className:"bg-[#059669] text-white",children:"Active"})]}),e.jsxs("p",{className:"text-caption text-gray-500 mt-1",children:[s.applicationCount," applications"]})]})]},s.id))})]})}function F({count:t,variant:r="default",className:a=""}){const i={default:"bg-black text-white",danger:"bg-[#DC2626] text-white",info:"bg-[#2563EB] text-white"};return e.jsx("span",{className:`inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 rounded-full text-xs font-medium ${i[r]} ${a}`,children:t})}function z({children:t,onRemove:r,className:a=""}){return e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-md text-xs font-medium bg-gray-100 text-gray-700 ${a}`,children:[t,r&&e.jsx("button",{onClick:r,className:"ml-0.5 hover:text-gray-900 focus:outline-none","aria-label":"Remove tag",children:e.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}function W({isOpen:t,onClose:r,title:a,children:i,confirmText:l="Save",cancelText:s="Cancel",onConfirm:n,variant:o="default",maxWidth:d="md",showFooter:c=!0,className:g=""}){if(f.useEffect(()=>{const h=j=>{j.key==="Escape"&&t&&r()};return t&&(document.addEventListener("keydown",h),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",h),document.body.style.overflow="unset"}},[t,r]),!t)return null;const u={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl"};return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"modal-title",children:[e.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:r,"aria-hidden":"true"}),e.jsxs("div",{className:`relative bg-white rounded-lg shadow-xl ${u[d]} w-full mx-4 z-10 ${g}`,children:[e.jsxs("div",{className:"px-6 py-4 border-b border-gray-200 flex items-center justify-between",children:[e.jsx("h2",{id:"modal-title",className:"text-h4 font-semibold text-gray-900",children:a}),e.jsx("button",{onClick:r,className:"text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-900 rounded-md p-1","aria-label":"Close modal",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsx("div",{className:"px-6 py-4",children:i}),c&&e.jsxs("div",{className:"px-6 py-4 border-t border-gray-200 flex justify-end gap-3",children:[e.jsx("button",{onClick:r,className:"px-4 py-2 text-body border border-gray-300 bg-white text-gray-900 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2",children:s}),n&&e.jsx("button",{onClick:()=>{n(),r()},className:`px-4 py-2 text-body rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 ${o==="danger"?"bg-danger text-white hover:bg-danger/90 focus:ring-danger":"bg-black text-white hover:bg-gray-700 focus:ring-gray-900"}`,children:l})]})]})]})}function T({isOpen:t,onClose:r,title:a,message:i,confirmText:l="Delete",cancelText:s="Cancel",onConfirm:n,variant:o="danger"}){if(f.useEffect(()=>{const c=g=>{g.key==="Escape"&&t&&r()};return t&&(document.addEventListener("keydown",c),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",c),document.body.style.overflow="unset"}},[t,r]),!t)return null;const d=o==="danger"?"#DC2626":"#F59E0B";return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"confirmation-title",children:[e.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:r,"aria-hidden":"true"}),e.jsxs("div",{className:"relative bg-white rounded-lg shadow-xl max-w-sm w-full mx-4 z-10",children:[e.jsx("div",{className:"px-6 py-6",children:e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("div",{className:"mb-4",children:e.jsxs("svg",{className:"w-12 h-12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M12 2L2 22h20L12 2z",fill:d}),e.jsx("path",{d:"M12 8v4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("circle",{cx:"12",cy:"16",r:"1",fill:"white"})]})}),e.jsx("h2",{id:"confirmation-title",className:"text-h4 font-bold text-gray-900 mb-3",children:a}),e.jsx("p",{className:"text-body text-gray-900",children:i})]})}),e.jsxs("div",{className:"px-6 py-4 border-t border-gray-200 flex justify-end gap-3",children:[e.jsx("button",{onClick:r,className:"px-4 py-2 text-body border border-gray-300 bg-white text-gray-900 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2",children:s}),e.jsx("button",{onClick:()=>{n(),r()},className:`px-4 py-2 text-body rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 ${o==="danger"?"bg-[#DC2626] text-white hover:bg-[#B91C1C] focus:ring-[#DC2626]":"bg-[#F59E0B] text-white hover:bg-[#D97706] focus:ring-[#F59E0B]"}`,children:l})]})]})]})}function V({isOpen:t,onClose:r,title:a="Success!",message:i,buttonText:l="Continue",onButtonClick:s}){if(f.useEffect(()=>{const o=d=>{d.key==="Escape"&&t&&r()};return t&&(document.addEventListener("keydown",o),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",o),document.body.style.overflow="unset"}},[t,r]),!t)return null;const n=()=>{s&&s(),r()};return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"success-title",children:[e.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:r,"aria-hidden":"true"}),e.jsxs("div",{className:"relative bg-white rounded-lg shadow-xl max-w-sm w-full mx-4 z-10",children:[e.jsx("div",{className:"px-6 py-6",children:e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("div",{className:"mb-4",children:e.jsx("div",{className:"w-12 h-12 bg-[#D1F5D3] rounded-full flex items-center justify-center",children:e.jsx("svg",{className:"w-6 h-6 text-[#059669]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})})}),e.jsx("h2",{id:"success-title",className:"text-h4 font-bold text-gray-900 mb-3",children:a}),e.jsx("p",{className:"text-body text-gray-900",children:i})]})}),e.jsx("div",{className:"px-6 py-4 border-t border-gray-200 flex justify-center",children:e.jsx("button",{onClick:n,className:"px-4 py-2 text-body bg-black text-white rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2",children:l})})]})]})}function R({label:t,error:r,success:a,helperText:i,leftIcon:l,rightIcon:s,id:n,className:o="",disabled:d,...c}){const g=n||`input-${Math.random().toString(36).substring(2,11)}`,u=()=>r?"border-2 border-[#DC2626] focus:ring-[#DC2626]":a?"border-2 border-[#059669] focus:ring-[#059669]":"border border-gray-300 focus:ring-gray-900",h=()=>d?"bg-gray-100":"bg-white";return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:g,className:"text-sm font-medium text-gray-900",children:t}),e.jsxs("div",{className:"relative",children:[l&&e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none",children:l}),e.jsx("input",{id:g,disabled:d,className:`w-full rounded-md px-3 py-2 text-body focus:outline-none focus:ring-2 ${u()} ${h()} ${l?"pl-10":""} ${s?"pr-10":""} ${o}`,"aria-invalid":r?"true":"false","aria-describedby":r?`${g}-error`:a?`${g}-success`:i?`${g}-helper`:void 0,...c}),s&&e.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none",children:s})]}),r&&e.jsx("span",{id:`${g}-error`,className:"text-error text-xs",children:r}),a&&!r&&e.jsx("span",{id:`${g}-success`,className:"text-success text-xs",children:a}),i&&!r&&!a&&e.jsx("span",{id:`${g}-helper`,className:"text-gray-500 text-xs",children:i})]})}function A({label:t,error:r,id:a,className:i="",disabled:l,...s}){const n=a||`textarea-${Math.random().toString(36).substr(2,9)}`,o=()=>r?"border-2 border-[#DC2626] focus:ring-[#DC2626]":"border border-gray-300 focus:ring-gray-900",d=()=>l?"bg-gray-100":"bg-white";return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:n,className:"text-sm font-medium text-gray-900",children:t}),e.jsx("textarea",{id:n,disabled:l,className:`w-full rounded-md px-3 py-2 text-body focus:outline-none focus:ring-2 ${o()} ${d()} ${i}`,"aria-invalid":r?"true":"false","aria-describedby":r?`${n}-error`:void 0,...s}),r&&e.jsx("span",{id:`${n}-error`,className:"text-[#DC2626] text-xs",children:r})]})}function H({label:t,options:r,error:a,placeholder:i,id:l,className:s="",disabled:n,...o}){const d=l||`select-${Math.random().toString(36).substring(2,11)}`,c=()=>a?"border-2 border-[#DC2626] focus:ring-[#DC2626]":"border border-gray-300 focus:ring-gray-900",g=()=>n?"bg-gray-100":"bg-white",u=()=>n?"text-gray-500":"text-gray-900";return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:d,className:`text-sm font-medium ${u()}`,children:t}),e.jsxs("select",{id:d,disabled:n,className:`w-full rounded-md px-3 py-2 text-body focus:outline-none focus:ring-2 ${c()} ${g()} ${s}`,"aria-invalid":a?"true":"false","aria-describedby":a?`${d}-error`:void 0,...o,children:[i&&e.jsx("option",{value:"",disabled:!0,children:i}),r.map(h=>e.jsx("option",{value:h.value,children:h.label},h.value))]}),a&&e.jsx("span",{id:`${d}-error`,className:"text-[#DC2626] text-xs",children:a})]})}function I({label:t,error:r,id:a,className:i="",disabled:l,...s}){const n=a||`checkbox-${Math.random().toString(36).substr(2,9)}`,o=()=>l?"text-gray-400":"text-gray-900";return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("input",{id:n,type:"checkbox",disabled:l,className:`h-4 w-4 text-[#2563EB] border-gray-300 rounded focus:ring-[#2563EB] focus:ring-2 disabled:bg-gray-100 disabled:border-gray-300 disabled:cursor-not-allowed ${i}`,"aria-invalid":r?"true":"false","aria-describedby":r?`${n}-error`:void 0,...s}),e.jsx("label",{htmlFor:n,className:`ml-2 text-body ${o()} ${l?"cursor-not-allowed":"cursor-pointer"}`,children:t})]}),r&&e.jsx("span",{id:`${n}-error`,className:"text-[#DC2626] text-xs ml-6",children:r})]})}function q({label:t,error:r,id:a,className:i="",disabled:l,...s}){const n=a||`radio-${Math.random().toString(36).substr(2,9)}`,o=()=>l?"text-gray-400":"text-gray-900";return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("input",{id:n,type:"radio",disabled:l,className:`h-4 w-4 text-[#2563EB] border-gray-300 focus:ring-[#2563EB] focus:ring-2 disabled:bg-gray-100 disabled:border-gray-300 disabled:cursor-not-allowed ${i}`,"aria-invalid":r?"true":"false","aria-describedby":r?`${n}-error`:void 0,...s}),e.jsx("label",{htmlFor:n,className:`ml-2 text-body ${o()} ${l?"cursor-not-allowed":"cursor-pointer"}`,children:t})]}),r&&e.jsx("span",{id:`${n}-error`,className:"text-[#DC2626] text-xs ml-6",children:r})]})}function X({checked:t=!1,onChange:r,disabled:a=!1,label:i,description:l,className:s="",id:n}){const o=c=>{!a&&r&&r(c.target.checked)},d=n||`toggle-${Math.random().toString(36).substr(2,9)}`;return e.jsxs("div",{className:`flex items-center justify-between ${s}`,children:[e.jsxs("div",{className:"flex-1",children:[i&&e.jsx("label",{htmlFor:d,className:`text-sm font-medium ${a?"text-gray-400":"text-gray-900"} cursor-pointer`,children:i}),l&&e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:l})]}),e.jsxs("div",{className:"ml-4",children:[e.jsx("button",{type:"button",role:"switch","aria-checked":t,"aria-disabled":a,disabled:a,onClick:()=>!a&&r&&r(!t),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 ${t?"bg-black":a?"bg-gray-200":"bg-gray-300"} ${a?"cursor-not-allowed":"cursor-pointer"}`,children:e.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${t?"translate-x-6":"translate-x-1"}`})}),e.jsx("input",{type:"checkbox",id:d,checked:t,onChange:o,disabled:a,className:"sr-only","aria-hidden":"true"})]})]})}function Y({items:t,showIcons:r=!1,className:a=""}){return e.jsx("nav",{className:`flex items-center ${a}`,"aria-label":"Breadcrumb",children:e.jsx("ol",{className:"flex items-center space-x-2",children:t.map((i,l)=>{const s=l===t.length-1;return e.jsxs("li",{className:"flex items-center",children:[l>0&&e.jsx("span",{className:"mx-2 text-gray-400","aria-hidden":"true",children:">"}),e.jsxs("div",{className:"flex items-center gap-2",children:[r&&i.icon&&e.jsx("span",{className:"w-4 h-4 text-gray-700",children:i.icon}),i.href||i.onClick?e.jsx("a",{href:i.href,onClick:i.onClick,className:`text-body text-gray-700 hover:text-gray-900 ${s?"font-medium":""}`,children:i.label}):e.jsx("span",{className:`text-body text-gray-700 ${s?"font-medium":""}`,children:i.label})]})]},i.id)})})})}function G({currentPage:t,totalPages:r,onPageChange:a,variant:i="default",totalItems:l,itemsPerPage:s=10,showPageNumbers:n=5,itemsLabel:o="results",className:d=""}){const c=()=>{t>1&&a(t-1)},g=()=>{t<r&&a(t+1)},u=()=>{const x=[],m=Math.floor(n/2);let b=Math.max(1,t-m),p=Math.min(r,b+n-1);p-b<n-1&&(b=Math.max(1,p-n+1));for(let y=b;y<=p;y++)x.push(y);return x},h=l?(t-1)*s+1:void 0,j=l?Math.min(t*s,l):void 0,k=u(),v=t===1,w=t===r;return i==="with-info"?e.jsxs("div",{className:`flex items-center justify-between ${d}`,children:[l&&h&&j&&e.jsxs("div",{className:"text-body text-gray-900",children:["Showing"," ",e.jsxs("span",{className:"font-semibold",children:[h,"-",j]})," ","of ",e.jsx("span",{className:"font-semibold",children:l})," ",o]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:c,disabled:v,className:`px-4 py-2 text-body rounded-md border border-gray-300 transition-colors ${v?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-white text-gray-700 hover:bg-gray-50"}`,children:"Previous"}),k.map((x,m)=>{if(typeof x=="string")return null;const b=x===t;return e.jsx("button",{onClick:()=>a(x),className:`w-10 h-10 text-body rounded-md border border-gray-300 transition-colors ${b?"bg-black text-white border-black":"bg-white text-gray-700 hover:bg-gray-50"}`,children:x},m)}),e.jsx("button",{onClick:g,disabled:w,className:`px-4 py-2 text-body rounded-md border border-gray-300 transition-colors ${w?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-white text-gray-700 hover:bg-gray-50"}`,children:"Next"})]})]}):e.jsxs("div",{className:`flex items-center justify-center gap-2 ${d}`,children:[e.jsx("button",{onClick:c,disabled:v,className:`w-10 h-10 text-body rounded-md border border-gray-300 transition-colors flex items-center justify-center ${v?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-white text-gray-700 hover:bg-gray-50"}`,"aria-label":"Previous page",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),k.map((x,m)=>{if(typeof x=="string")return null;const b=x===t;return e.jsx("button",{onClick:()=>a(x),className:`w-10 h-10 text-body rounded-md border border-gray-300 transition-colors ${b?"bg-black text-white border-black":"bg-white text-gray-700 hover:bg-gray-50"}`,children:x},m)}),e.jsx("button",{onClick:g,disabled:w,className:`w-10 h-10 text-body rounded-md border border-gray-300 transition-colors flex items-center justify-center ${w?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-white text-gray-700 hover:bg-gray-50"}`,"aria-label":"Next page",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]})}function J({items:t,activeTab:r,onTabChange:a,variant:i="default",className:l=""}){return i==="pill"?e.jsx("div",{className:`flex gap-2 ${l}`,children:t.map(s=>{const n=r===s.id;return e.jsx("button",{onClick:()=>a(s.id),className:`px-4 py-2 rounded-full text-body font-medium transition-colors ${n?"bg-gray-900 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:s.label},s.id)})}):e.jsx("div",{className:`flex border-b border-gray-200 ${l}`,children:t.map(s=>{const n=r===s.id;return e.jsxs("button",{onClick:()=>a(s.id),className:`px-4 py-3 text-body font-medium transition-colors relative ${n?"text-gray-900":"text-gray-600 hover:text-gray-900"}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[i==="icon"&&s.icon&&e.jsx("span",{className:"w-4 h-4",children:s.icon}),e.jsx("span",{className:n?"font-bold":"",children:s.label})]}),n&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-gray-900"})]},s.id)})})}function K({title:t,searchAndFilters:r,children:a,className:i=""}){return e.jsx("div",{className:`bg-gray-50 border border-gray-200 rounded-lg p-4 ${i}`,children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-4 mb-4",children:t?e.jsx("h1",{className:"text-h2 font-bold text-gray-900",children:t}):e.jsx("p",{className:"text-sm text-gray-400",children:"Header / Page Title"})}),r?e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-4 mb-4",children:r}):e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-4 mb-4",children:e.jsx("p",{className:"text-sm text-gray-400",children:"Search & Filters Bar"})}),e.jsx("div",{className:"space-y-3",children:a})]})})}function Q({children:t,onClick:r,className:a=""}){return e.jsx("div",{className:`bg-white border border-gray-200 rounded-lg p-4 ${r?"cursor-pointer hover:border-gray-300 transition-colors":""} ${a}`,onClick:r,role:r?"button":void 0,tabIndex:r?0:void 0,children:t})}function U({header:t,leftColumn:r,rightColumn:a,className:i=""}){return e.jsx("div",{className:`bg-gray-50 border border-gray-200 rounded-lg p-4 ${i}`,children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-4 mb-4",children:t||e.jsx("p",{className:"text-sm text-gray-400",children:"Header with Back Button"})}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-[2] flex flex-col gap-4",children:r||e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-4 min-h-[200px]"}),e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-4 min-h-[200px]"})]})}),e.jsx("div",{className:"flex-1 flex flex-col gap-4",children:a||e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-4 min-h-[200px]"}),e.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-4 min-h-[200px]"})]})})]})]})})}function Z({children:t,className:r=""}){return e.jsx("div",{className:`bg-white border border-gray-200 rounded-lg p-4 ${r}`,children:t})}function _({value:t,label:r,variant:a="default",showPercentage:i=!0,className:l=""}){const s=Math.min(100,Math.max(0,t)),n=Math.round(s),d={default:"#000000",info:"#2563EB",success:"#059669"}[a];return e.jsxs("div",{className:`flex items-center gap-4 ${l}`,children:[r&&e.jsx("span",{className:"text-body text-gray-900 min-w-[120px]",children:r}),e.jsx("div",{className:"flex-1 bg-gray-200 rounded-full h-2 overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-300 ease-out",style:{width:`${n}%`,backgroundColor:d},role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r||`Progress: ${n}%`})}),i&&e.jsxs("span",{className:"text-body text-gray-500 min-w-[40px] text-right",children:[n,"%"]})]})}function P({variant:t="default",size:r="md",className:a=""}){const l={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"}[r];return t==="circle"?e.jsx("div",{className:`${l} ${a}`,role:"status","aria-label":"Loading",children:e.jsxs("svg",{className:"animate-spin text-gray-900",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):t==="sync"?e.jsx("div",{className:`${l} ${a}`,role:"status","aria-label":"Loading",children:e.jsx("svg",{className:"animate-spin text-gray-900",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:e.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}):e.jsx("div",{className:`${l} ${a} relative`,role:"status","aria-label":"Loading",children:e.jsxs("svg",{className:"animate-spin text-gray-900",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{cx:"12",cy:"4",r:"2",fill:"currentColor",opacity:"0.3"}),e.jsx("circle",{cx:"19",cy:"7",r:"2",fill:"currentColor",opacity:"0.4"}),e.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",opacity:"0.5"}),e.jsx("circle",{cx:"19",cy:"17",r:"2",fill:"currentColor",opacity:"0.6"}),e.jsx("circle",{cx:"12",cy:"20",r:"2",fill:"currentColor",opacity:"0.7"}),e.jsx("circle",{cx:"5",cy:"17",r:"2",fill:"currentColor",opacity:"0.8"}),e.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",opacity:"0.9"}),e.jsx("circle",{cx:"5",cy:"7",r:"2",fill:"currentColor",opacity:"1"})]})})}function O({children:t,variant:r="info",title:a,onClose:i,className:l=""}){const n={success:{bg:"bg-[#D1F5D3]",border:"border-[#059669]",text:"text-[#059669]",icon:e.jsx("div",{className:"w-5 h-5 rounded-full bg-[#059669] flex items-center justify-center",children:e.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})})},warning:{bg:"bg-orange-100",border:"border-orange-500",text:"text-orange-700",icon:e.jsx("div",{className:"w-5 h-5 rounded-full bg-orange-500 flex items-center justify-center",children:e.jsx("span",{className:"text-white text-xs font-bold",children:"i"})})},error:{bg:"bg-red-100",border:"border-[#DC2626]",text:"text-[#DC2626]",icon:e.jsx("div",{className:"w-5 h-5 rounded-full bg-[#DC2626] flex items-center justify-center",children:e.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})},info:{bg:"bg-blue-100",border:"border-[#2563EB]",text:"text-[#2563EB]",icon:e.jsx("div",{className:"w-5 h-5 rounded-full bg-[#2563EB] flex items-center justify-center",children:e.jsx("span",{className:"text-white text-xs font-bold",children:"i"})})}}[r];return e.jsx("div",{className:`${n.bg} ${n.border} border rounded-md p-4 ${l}`,role:"alert",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex-shrink-0",children:n.icon}),e.jsxs("div",{className:"ml-3 flex-1",children:[a&&e.jsx("h3",{className:`text-sm font-bold ${n.text} mb-1`,children:a}),e.jsx("div",{className:`text-sm ${n.text}`,children:t})]}),i&&e.jsx("button",{onClick:i,className:"ml-auto flex-shrink-0 text-gray-600 hover:text-gray-900 focus:outline-none rounded-md p-1","aria-label":"Close alert",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})})}function ee({columns:t,data:r,className:a="",selectable:i=!1,selectedRows:l=new Set,onRowSelect:s}){return e.jsx("div",{className:`overflow-x-auto ${a}`,children:e.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[e.jsx("thead",{className:"bg-gray-50",children:e.jsxs("tr",{children:[i&&e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"}),t.map(n=>e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:n.header},n.key))]})}),e.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.map((n,o)=>{const d=l.has(o);return e.jsxs("tr",{className:`hover:bg-gray-50 ${d?"bg-blue-50":""}`,children:[i&&e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("input",{type:"checkbox",checked:d,onChange:c=>s?.(o,c.target.checked),className:"h-4 w-4 text-[#2563EB] border-gray-300 rounded focus:ring-[#2563EB] focus:ring-2"})}),t.map(c=>e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:c.render?c.render(n[c.key],n):n[c.key]},c.key))]},o)})})]})})}function re({items:t,sections:r,className:a=""}){const i=(s,n)=>{const o=s.variant==="danger",d=o?"text-[#DC2626]":s.disabled?"text-gray-400":"text-gray-900";return e.jsxs("button",{onClick:s.onClick,disabled:s.disabled,className:`w-full flex items-center gap-3 px-4 py-2 text-sm font-medium ${d} hover:bg-gray-50 focus:outline-none focus:bg-gray-50 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors ${n>0?"mt-0":""}`,children:[s.icon&&e.jsx("span",{className:`w-4 h-4 ${o?"text-[#DC2626]":"text-gray-500"}`,children:s.icon}),e.jsx("span",{className:"flex-1 text-left",children:s.label})]},s.id)},l=s=>e.jsx("div",{className:"h-px bg-gray-200 my-1"},s);return e.jsx("div",{className:`bg-white rounded-lg shadow-md border border-gray-100 py-2 min-w-[200px] ${a}`,role:"menu",children:r?e.jsx(e.Fragment,{children:r.map((s,n)=>e.jsxs("div",{children:[n>0&&l(`section-sep-${s.id}`),e.jsx("div",{className:"px-4 py-2",children:e.jsx("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:s.title})}),s.items.map((o,d)=>e.jsxs(f.Fragment,{children:[d>0&&l(`item-sep-${o.id}`),i(o,d)]},o.id))]},s.id))}):t&&t.map((s,n)=>e.jsxs(f.Fragment,{children:[n>0&&l(`sep-${s.id}`),i(s,n)]},s.id))})}function te({content:t,position:r="top",children:a,className:i="",trigger:l="hover"}){const[s,n]=f.useState(!1),[o,d]=f.useState({top:0,left:0}),c=f.useRef(null),g=f.useRef(null),u=()=>{if(!c.current||!g.current)return;const x=c.current.getBoundingClientRect(),m=g.current.getBoundingClientRect(),b=window.pageYOffset||document.documentElement.scrollTop,p=window.pageXOffset||document.documentElement.scrollLeft;let y=0,N=0;switch(r){case"top":y=x.top+b-m.height-8,N=x.left+p+x.width/2-m.width/2;break;case"bottom":y=x.bottom+b+8,N=x.left+p+x.width/2-m.width/2;break;case"left":y=x.top+b+x.height/2-m.height/2,N=x.left+p-m.width-8;break;case"right":y=x.top+b+x.height/2-m.height/2,N=x.right+p+8;break}d({top:y,left:N})};f.useEffect(()=>{if(s)return u(),window.addEventListener("scroll",u),window.addEventListener("resize",u),()=>{window.removeEventListener("scroll",u),window.removeEventListener("resize",u)}},[s,r]);const h=()=>{l==="hover"&&n(!0)},j=()=>{l==="hover"&&n(!1)},k=()=>{l==="click"&&n(!s)},v={top:"bottom-0 left-1/2 transform -translate-x-1/2 translate-y-full",bottom:"top-0 left-1/2 transform -translate-x-1/2 -translate-y-full",left:"right-0 top-1/2 transform translate-x-full -translate-y-1/2",right:"left-0 top-1/2 transform -translate-x-full -translate-y-1/2"},w={top:"border-l-transparent border-r-transparent border-b-gray-900 border-t-0",bottom:"border-l-transparent border-r-transparent border-t-gray-900 border-b-0",left:"border-t-transparent border-b-transparent border-l-gray-900 border-r-0",right:"border-t-transparent border-b-transparent border-r-gray-900 border-l-0"};return e.jsxs("div",{ref:c,className:`inline-block ${i}`,onMouseEnter:h,onMouseLeave:j,onClick:k,children:[a,s&&e.jsx("div",{ref:g,className:"fixed z-50 pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`},children:e.jsxs("div",{className:"relative bg-gray-900 text-white text-sm font-medium px-3 py-2 rounded-md shadow-lg",children:[t,e.jsx("div",{className:`absolute w-0 h-0 ${v[r]} ${w[r]}`,style:{borderWidth:"6px"}})]})})]})}function se({sections:t,activeItemId:r,onItemClick:a}){return e.jsx("aside",{className:"w-64 bg-gray-50 h-screen fixed left-0 top-0 overflow-y-auto border-r border-gray-200",children:e.jsx("div",{className:"py-4 pb-8",children:e.jsx("nav",{className:"space-y-6",children:t.map((i,l)=>e.jsxs("div",{children:[e.jsx("h3",{className:"px-4 mb-2 text-xs font-medium text-gray-500 uppercase tracking-wider",children:i.title}),e.jsx("div",{className:"space-y-0.5",children:i.items.map(s=>{const n=r===s.id;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>a(s.id),className:`w-full flex items-center gap-3 px-4 py-2.5 rounded-md text-left transition-colors ${n?"bg-gray-200 text-gray-900 font-medium":"text-gray-600 hover:bg-gray-100"}`,children:[e.jsx("span",{className:`shrink-0 w-5 h-5 ${n?"text-gray-900":"text-gray-500"}`,children:s.icon}),e.jsx("span",{className:"text-sm",children:s.label})]}),s.children&&e.jsx("div",{className:"ml-4 mt-0.5 space-y-0.5",children:s.children.map(o=>{const d=r===o.id;return e.jsxs("button",{onClick:()=>a(o.id),className:`w-full flex items-center gap-3 px-4 py-2.5 rounded-md text-left transition-colors ${d?"bg-gray-200 text-gray-900 font-medium":"text-gray-600 hover:bg-gray-100"}`,children:[e.jsx("span",{className:`shrink-0 w-5 h-5 ${d?"text-gray-900":"text-gray-500"}`,children:o.icon}),e.jsx("span",{className:"text-sm",children:o.label})]},o.id)})})]},s.id)})})]},l))})})})}exports.Alert=O;exports.Badge=$;exports.BasicCard=D;exports.Breadcrumbs=Y;exports.Button=C;exports.Card=B;exports.Checkbox=I;exports.ConfirmationDialog=T;exports.CountBadge=F;exports.CountryListCard=S;exports.DetailViewLayout=U;exports.DetailViewSection=Z;exports.Dropdown=re;exports.IconButton=L;exports.Input=R;exports.ListCard=M;exports.ListViewItem=Q;exports.ListViewLayout=K;exports.LoadingSpinner=P;exports.Modal=W;exports.Pagination=G;exports.ProgressBar=_;exports.Radio=q;exports.Select=H;exports.Sidebar=se;exports.StatsCard=E;exports.SuccessDialog=V;exports.Table=ee;exports.Tabs=J;exports.Tag=z;exports.Textarea=A;exports.Toggle=X;exports.Tooltip=te;