@orellabs/ui 0.1.2 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +124 -122
- package/dist/index.js.map +1 -1
- package/package.json +10 -3
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),t=require("react/jsx-runtime"),e={black:"#1A1A1A",blackHover:"#2A2A2A",red:"#D42B2B",white:"#FFFFFF",pageBg:"#F1F1F1",cardBg:"#FFFFFF",bgSubtle:"#FAFAFA",textPrimary:"#1A1A1A",textSecondary:"#6B7280",textTertiary:"#9CA3AF",textDark:"#374151",textDisabled:"#D1D5DB",textInverse:"#FFFFFF",border:"#E5E5E5",borderLight:"#D1D5DB",borderSubtle:"#F3F4F6",borderFocus:"#1A1A1A",success:"#22C55E",successBg:"#F0FDF4",successBorder:"#BBF7D0",warning:"#F59E0B",warningBg:"#FFFBEB",warningBorder:"#FDE68A",error:"#EF4444",errorHover:"#DC2626",errorBg:"#FEF2F2",errorBorder:"#FECACA",info:"#2563EB",infoBg:"#EFF6FF",infoBorder:"#BFDBFE",neutralBg:"#F3F4F6",neutralText:"#6B7280",skeletonBase:"#E5E5E5",skeletonPulse:"#F1F2F4"},a={0:"0px",1:"4px",2:"8px",3:"12px",4:"16px",5:"20px",6:"24px",8:"32px",10:"40px",12:"48px",16:"64px",20:"80px"},n={fontFamily:{base:"-apple-system, 'Helvetica Neue', sans-serif",mono:"'Menlo', 'Monaco', 'Courier New', monospace"},size:{xs:"10px",sm:"11px",base:"13px",md:"14px",lg:"16px",xl:"20px","2xl":"24px","3xl":"32px"},weight:{normal:400,medium:500,semibold:600,bold:700,extrabold:800},lineHeight:{tight:1.2,snug:1.4,normal:1.5,relaxed:1.55,loose:1.75},letterSpacing:{tight:"-0.02em",snug:"-0.01em",normal:"0em",wide:"0.02em"}},h={none:"0px",xs:"4px",sm:"6px",md:"8px",lg:"10px",xl:"12px","2xl":"16px",full:"9999px"},F={none:"none",sm:"0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04)",md:"0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04)",lg:"0 20px 60px rgba(0,0,0,0.18)",focus:"0 0 0 3px rgba(26, 26, 26, 0.12)"},O={sm:{padding:`${a[1]} ${a[3]}`,fontSize:n.size.base,height:"32px",gap:a[1]},md:{padding:`${a[2]} ${a[4]}`,fontSize:n.size.md,height:"40px",gap:a[2]},lg:{padding:`${a[3]} ${a[6]}`,fontSize:n.size.md,height:"48px",gap:a[2]}},G={primary:{background:e.black,color:e.textInverse,border:"none",hoverBg:e.blackHover},ghost:{background:"transparent",color:e.textPrimary,border:`1px solid ${e.border}`,hoverBg:e.bgSubtle},danger:{background:e.error,color:e.textInverse,border:"none",hoverBg:e.errorHover},text:{background:"transparent",color:e.textSecondary,border:"none",hoverBg:e.bgSubtle}};function $({variant:o,size:i,loading:r=!1,disabled:s=!1,fullWidth:l=!1,leftIcon:c,children:g,onClick:x}){const u=O[i],d=G[o],f=s||r,p={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:u.gap,padding:u.padding,fontSize:u.fontSize,height:u.height,fontFamily:n.fontFamily.base,fontWeight:n.weight.semibold,lineHeight:n.lineHeight.tight,letterSpacing:n.letterSpacing.snug,borderRadius:h.md,background:d.background,color:d.color,border:d.border,cursor:f?"not-allowed":"pointer",opacity:f?.5:1,transition:"background 150ms ease, opacity 150ms ease, box-shadow 150ms ease",width:l?"100%":void 0,boxSizing:"border-box",outline:"none"};return t.jsxs("button",{style:p,onClick:x,disabled:f,onMouseEnter:y=>{f||(y.currentTarget.style.background=d.hoverBg)},onMouseLeave:y=>{f||(y.currentTarget.style.background=d.background)},onFocus:y=>{y.currentTarget.style.boxShadow=F.focus},onBlur:y=>{y.currentTarget.style.boxShadow="none"},children:[r?t.jsx(X,{}):c,g]})}let M=!1;function N(){if(M||typeof document>"u")return;const o=document.createElement("style");o.textContent="@keyframes ol-spin { to { transform: rotate(360deg) } }",document.head.appendChild(o),M=!0}function X(){return N(),t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{animation:"ol-spin 0.6s linear infinite"},children:t.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"28",strokeDashoffset:"20",opacity:"0.8"})})}const q={none:"0px",sm:a[3],md:a[6],lg:a[8]};function K({padding:o="md",noBorder:i=!1,shadow:r=!1,children:s}){const l={background:e.cardBg,borderRadius:h.xl,padding:q[o],border:i?"none":`1px solid ${e.border}`,boxShadow:r?F.sm:F.none,boxSizing:"border-box"};return t.jsx("div",{style:l,children:s})}const Y={success:{bg:e.successBg,color:e.success,dot:e.success},warning:{bg:e.warningBg,color:e.warning,dot:e.warning},error:{bg:e.errorBg,color:e.error,dot:e.error},info:{bg:e.infoBg,color:e.info,dot:e.info},neutral:{bg:e.neutralBg,color:e.neutralText,dot:e.textTertiary}},D=m.memo(function({tone:i,dot:r=!1,children:s}){const l=Y[i],c={display:"inline-flex",alignItems:"center",gap:a[1],padding:`2px ${a[2]}`,fontSize:n.size.xs,fontWeight:n.weight.semibold,fontFamily:n.fontFamily.base,lineHeight:n.lineHeight.tight,borderRadius:h.xs,background:l.bg,color:l.color,whiteSpace:"nowrap"},g={width:"5px",height:"5px",borderRadius:h.full,background:l.dot,flexShrink:0};return t.jsxs("span",{style:c,children:[r&&t.jsx("span",{style:g}),s]})});function J({stats:o,cols:i=4}){const r={display:"flex",border:`1px solid ${e.border}`,borderRadius:h.lg,overflow:"hidden"};return t.jsx("div",{style:r,children:o.map((s,l)=>t.jsx(_,{stat:s,isLast:l===o.length-1},l))})}function _({stat:o,isLast:i}){const r=o.highlight,s={flex:1,padding:`${a[3]} ${a[4]}`,textAlign:"center",borderRight:i?void 0:`1px solid ${e.border}`,background:r?e.black:"transparent"},l={fontSize:n.size.xl,fontWeight:n.weight.bold,fontFamily:n.fontFamily.base,lineHeight:n.lineHeight.tight,color:o.color||(r?e.textInverse:e.textPrimary),display:"flex",alignItems:"baseline",justifyContent:"center",gap:a[1],margin:0},c={fontSize:n.size.sm,fontWeight:n.weight.medium,color:e.textTertiary},g={fontSize:n.size.sm,fontFamily:n.fontFamily.base,color:e.textTertiary,marginTop:"2px"},x={fontSize:n.size.xs,color:e.textTertiary,fontFamily:n.fontFamily.base,marginTop:"4px"};return t.jsxs("div",{style:s,children:[t.jsxs("p",{style:l,children:[o.value,o.unit&&t.jsx("span",{style:c,children:o.unit})]}),t.jsx("div",{style:g,children:o.label}),o.sub&&t.jsx("div",{style:x,children:o.sub})]})}const Q=m.memo(function({children:i,action:r}){const s={display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:a[2]},l={fontSize:n.size.sm,fontWeight:n.weight.medium,fontFamily:n.fontFamily.base,color:e.textSecondary,margin:0};return t.jsxs("div",{style:s,children:[t.jsx("p",{style:l,children:i}),r&&t.jsx("div",{children:r})]})});function Z({tabs:o,active:i,onChange:r,size:s="md"}){const l={display:"inline-flex",alignItems:"center",gap:a[1],fontFamily:n.fontFamily.base},c=s==="sm"?n.size.base:n.size.md,g=s==="sm"?a[1]:a[2],x=s==="sm"?a[3]:a[4];return t.jsx("div",{style:l,role:"tablist",children:o.map(u=>{const d=u.id===i,f={padding:`${g} ${x}`,fontSize:c,fontWeight:d?n.weight.semibold:n.weight.normal,fontFamily:n.fontFamily.base,color:d?e.textInverse:e.textSecondary,background:d?e.black:"transparent",border:"none",borderRadius:h.full,cursor:"pointer",display:"flex",alignItems:"center",gap:a[2],transition:"background 150ms ease, color 150ms ease",whiteSpace:"nowrap"},p={fontSize:n.size.xs,fontWeight:n.weight.semibold,background:d?"rgba(255,255,255,0.2)":e.neutralBg,color:d?e.textInverse:e.textSecondary,borderRadius:h.full,padding:`0 ${a[2]}`,minWidth:"20px",textAlign:"center",lineHeight:"20px"};return t.jsxs("button",{style:f,role:"tab","aria-selected":d,onClick:()=>!d&&r(u.id),onMouseEnter:y=>{d||(y.currentTarget.style.background=e.neutralBg,y.currentTarget.style.color=e.textPrimary)},onMouseLeave:y=>{d||(y.currentTarget.style.background="transparent",y.currentTarget.style.color=e.textSecondary)},children:[u.label,u.badge!==void 0&&t.jsx("span",{style:p,children:u.badge})]},u.id)})})}function ee({columns:o,rows:i,loading:r=!1,emptyState:s,onRowClick:l}){const c={width:"100%",borderCollapse:"collapse",fontFamily:n.fontFamily.base,fontSize:n.size.base},g=d=>({textAlign:d.align||"left",padding:`${a[3]} ${a[4]}`,fontSize:n.size.sm,fontWeight:n.weight.medium,color:e.textTertiary,borderBottom:`1px solid ${e.border}`,width:d.width,whiteSpace:"nowrap"}),x=d=>({textAlign:d.align||"left",padding:`${a[3]} ${a[4]}`,fontSize:n.size.base,color:e.textPrimary,borderBottom:`1px solid ${e.borderSubtle}`,verticalAlign:"middle",lineHeight:n.lineHeight.snug}),u={cursor:l?"pointer":"default",transition:"background 100ms ease"};return r?t.jsx("div",{style:{padding:a[8],textAlign:"center"},children:t.jsx("p",{style:{color:e.textTertiary,fontSize:n.size.base},children:"Loading..."})}):i.length===0?s?t.jsx(t.Fragment,{children:s}):t.jsx("div",{style:{padding:a[8],textAlign:"center"},children:t.jsx("p",{style:{color:e.textTertiary,fontSize:n.size.base},children:"No data"})}):t.jsx("div",{style:{overflowX:"auto",borderRadius:h.md},children:t.jsxs("table",{style:c,children:[t.jsx("thead",{children:t.jsx("tr",{children:o.map(d=>t.jsx("th",{style:g(d),children:d.header},String(d.key)))})}),t.jsx("tbody",{children:i.map((d,f)=>t.jsx("tr",{style:u,onClick:()=>l==null?void 0:l(d),onMouseEnter:p=>{p.currentTarget.style.background=e.bgSubtle},onMouseLeave:p=>{p.currentTarget.style.background="transparent"},children:o.map(p=>t.jsx("td",{style:x(p),children:p.render?p.render(d):String(d[p.key]??"")},String(p.key)))},f))})]})})}function te({label:o,hint:i,error:r,prefix:s,suffix:l,type:c="text",placeholder:g,disabled:x=!1,value:u,onChange:d}){const f=!!r,p={display:"flex",flexDirection:"column",gap:a[1],fontFamily:n.fontFamily.base},y={fontSize:n.size.base,fontWeight:n.weight.medium,color:e.textPrimary,margin:0},w={display:"flex",alignItems:"center",gap:a[2],padding:`${a[2]} ${a[3]}`,background:x?e.bgSubtle:e.cardBg,border:`1px solid ${f?e.error:e.border}`,borderRadius:h.md,transition:"border-color 150ms ease, box-shadow 150ms ease",cursor:x?"not-allowed":"text"},b={flex:1,border:"none",outline:"none",background:"transparent",fontSize:n.size.md,fontFamily:n.fontFamily.base,color:x?e.textDisabled:e.textPrimary,cursor:x?"not-allowed":"text",padding:0,width:"100%"},S={fontSize:n.size.sm,color:f?e.error:e.textTertiary,margin:0},v={fontSize:n.size.base,color:e.textTertiary,flexShrink:0};return t.jsxs("div",{style:p,children:[o&&t.jsx("p",{style:y,children:o}),t.jsxs("div",{style:w,onFocusCapture:k=>{const z=k.currentTarget;z.style.borderColor=f?e.error:e.borderFocus,z.style.boxShadow=F.focus},onBlurCapture:k=>{const z=k.currentTarget;z.style.borderColor=f?e.error:e.border,z.style.boxShadow="none"},children:[s&&t.jsx("span",{style:v,children:s}),t.jsx("input",{type:c,value:u,onChange:k=>d(k.target.value),placeholder:g,disabled:x,"aria-invalid":f,style:b}),l&&t.jsx("span",{style:v,children:l})]}),(r||i)&&t.jsx("p",{style:S,children:r||i})]})}function ne(o){return o>=75?e.success:o>=50?e.warning:e.error}function oe(o){return o>=75?e.successBg:o>=50?e.warningBg:e.errorBg}const re=m.memo(function({score:i,max:r=100,width:s="100%",showLabel:l=!0,size:c="md"}){const g=Math.min(Math.max(i/r*100,0),100),x=ne(g),u=oe(g),d=c==="sm"?"6px":"8px",f={display:"flex",alignItems:"center",gap:a[3],width:s,fontFamily:n.fontFamily.base},p={flex:1,height:d,background:u,borderRadius:h.full,overflow:"hidden"},y={height:"100%",width:`${g}%`,background:x,borderRadius:h.full,transition:"width 400ms ease"},w={fontSize:c==="sm"?n.size.xs:n.size.sm,fontWeight:n.weight.semibold,color:x,minWidth:"36px",textAlign:"right"};return t.jsxs("div",{style:f,children:[t.jsx("div",{style:p,children:t.jsx("div",{style:y})}),l&&t.jsxs("span",{style:w,children:[Math.round(g),"%"]})]})}),T='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function ie({open:o,onClose:i,children:r,maxWidth:s=400,title:l}){const[c,g]=m.useState(!1),x=m.useRef(null),u=m.useId();if(m.useEffect(()=>{if(!o){g(!1);return}const f=requestAnimationFrame(()=>g(!0));return()=>cancelAnimationFrame(f)},[o]),m.useEffect(()=>{if(!o)return;const f=p=>{p.key==="Escape"&&i()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[o,i]),m.useEffect(()=>{if(!o||!x.current)return;const f=x.current,p=document.activeElement,y=f.querySelector(T);y?y.focus():f.focus();const w=b=>{if(b.key!=="Tab")return;const S=f.querySelectorAll(T);if(S.length===0)return;const v=S[0],k=S[S.length-1];b.shiftKey?document.activeElement===v&&(b.preventDefault(),k.focus()):document.activeElement===k&&(b.preventDefault(),v.focus())};return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w),p==null||p.focus()}},[o]),!o)return null;const d=t.jsx("button",{onClick:i,onMouseEnter:f=>{f.currentTarget.style.background=e.pageBg},onMouseLeave:f=>{f.currentTarget.style.background="transparent"},style:{width:"28px",height:"28px",borderRadius:h.sm,border:"none",background:"transparent",color:e.textTertiary,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},"aria-label":"Close",children:t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:t.jsx("path",{d:"M1 1l10 10M11 1L1 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})});return t.jsx("div",{role:"presentation",onClick:i,style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.32)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100,padding:a[4]},children:t.jsx("div",{ref:x,role:"dialog","aria-modal":"true","aria-labelledby":l?u:void 0,tabIndex:-1,onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),style:{background:e.cardBg,borderRadius:h["2xl"],width:"100%",maxWidth:s,boxShadow:F.lg,opacity:c?1:0,transform:c?"none":"translateY(10px) scale(0.97)",transition:"opacity 0.18s ease, transform 0.18s ease",outline:"none",...l?{display:"flex",flexDirection:"column",maxHeight:"calc(100vh - 32px)",overflow:"hidden"}:{padding:"28px 24px 24px",position:"relative"}},children:l?t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:`${a[4]} ${a[5]}`,borderBottom:`1px solid ${e.border}`,flexShrink:0},children:[t.jsx("span",{id:u,style:{fontWeight:n.weight.bold,fontSize:n.size.base,fontFamily:n.fontFamily.base,color:e.textPrimary},children:l}),d]}),t.jsx("div",{style:{overflowY:"auto",flex:1},children:r})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{position:"absolute",top:"14px",right:"14px"},children:d}),r]})})})}function se({options:o,value:i,onChange:r,fullWidth:s=!1}){const l={display:"inline-flex",border:`1px solid ${e.border}`,borderRadius:h.md,overflow:"hidden",fontFamily:n.fontFamily.base,width:s?"100%":void 0};return t.jsx("div",{style:l,role:"radiogroup",children:o.map((c,g)=>{const x=c.value===i,u={flex:s?1:void 0,padding:`${a[2]} ${a[4]}`,fontSize:n.size.md,fontWeight:x?n.weight.semibold:n.weight.normal,fontFamily:n.fontFamily.base,color:x?e.textInverse:e.textPrimary,background:x?e.black:e.cardBg,border:"none",borderRight:g<o.length-1?`1px solid ${e.border}`:"none",cursor:"pointer",transition:"background 150ms ease, color 150ms ease",textAlign:"center",whiteSpace:"nowrap"};return t.jsx("button",{style:u,role:"radio","aria-checked":x,onClick:()=>r(c.value),onMouseEnter:d=>{x||(d.currentTarget.style.background=e.bgSubtle)},onMouseLeave:d=>{x||(d.currentTarget.style.background=e.cardBg)},children:c.label},c.value)})})}function j(o,i="0 0 24 24"){return function({size:s=20,filled:l,className:c,style:g,...x}){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:i,fill:l?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:c,style:{flexShrink:0,...g},...x,children:typeof o=="string"?t.jsx("path",{d:o}):o})}}const A=j(t.jsxs(t.Fragment,{children:[t.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),t.jsx("path",{d:"M7 11V7a5 5 0 0110 0v4"})]})),le=j(t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"11",cy:"11",r:"8"}),t.jsx("path",{d:"M21 21l-4.35-4.35"})]})),R=j("M20 6L9 17l-5-5"),E=j("M18 6L6 18M6 6l12 12"),ae=j("M3 12h18M3 6h18M3 18h18"),C=j(t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"12",cy:"12",r:"10"}),t.jsx("path",{d:"M12 16v-4M12 8h.01"})]})),W=j(t.jsxs(t.Fragment,{children:[t.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"}),t.jsx("path",{d:"M12 9v4M12 17h.01"})]})),ce=j("M5 3l14 9-14 9V3z"),de=j("M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"),ge=j(t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"12",cy:"12",r:"3"}),t.jsx("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})),xe=j("M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"),ue=j("M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M7 10l5 5 5-5M12 15V3"),fe=j("M5 12h14M12 5l7 7-7 7"),pe=j("M19 12H5M12 19l-7-7 7-7"),he=j("M12 19V5M5 12l7-7 7 7"),ye=j("M12 5v14M19 12l-7 7-7-7"),me=j("M9 18l6-6-6-6"),be=j("M15 18l-6-6 6-6"),Se=j("M18 15l-6-6-6 6"),we=j("M6 9l6 6 6-6");function je({checked:o,onChange:i,label:r,sublabel:s,disabled:l=!1,locked:c=!1,badge:g,right:x}){const u=!l&&!c,d={display:"flex",alignItems:"center",gap:a[3],padding:`${a[3]} ${a[4]}`,background:o?e.black:e.cardBg,border:`1px solid ${o?e.black:e.border}`,borderRadius:h.lg,cursor:u?"pointer":"default",opacity:l?.5:1,transition:"background 150ms ease, border-color 150ms ease",fontFamily:n.fontFamily.base},f={width:"8px",height:"8px",borderRadius:h.full,background:o?e.error:e.textTertiary,flexShrink:0},p={flex:1,display:"flex",flexDirection:"column",gap:"2px"},y={fontSize:n.size.md,fontWeight:n.weight.semibold,color:o?e.textInverse:e.textPrimary,lineHeight:n.lineHeight.tight},w={fontSize:n.size.sm,color:o?e.textTertiary:e.textSecondary,lineHeight:n.lineHeight.tight},b={width:"20px",height:"20px",borderRadius:h.xs,border:o?"none":`1.5px solid ${e.borderLight}`,background:o?e.error:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"background 150ms ease, border-color 150ms ease"};return t.jsxs("div",{style:d,role:"checkbox","aria-checked":o,tabIndex:u?0:-1,onClick:()=>u&&i(!o),onKeyDown:S=>{(S.key===" "||S.key==="Enter")&&(S.preventDefault(),u&&i(!o))},onMouseEnter:S=>{u&&!o&&(S.currentTarget.style.borderColor=e.borderLight)},onMouseLeave:S=>{u&&!o&&(S.currentTarget.style.borderColor=e.border)},children:[t.jsx("span",{style:f}),t.jsxs("div",{style:p,children:[t.jsx("span",{style:y,children:r}),s&&t.jsx("span",{style:w,children:s})]}),g&&t.jsx("div",{children:g}),x&&t.jsx("div",{children:x}),c?t.jsx(A,{size:16,style:{color:e.textTertiary}}):t.jsx("div",{style:b,children:o&&t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:t.jsx("path",{d:"M2.5 6l2.5 2.5 4.5-4.5",stroke:e.textInverse,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}const ve={success:e.success,warning:e.warning,error:e.error,info:e.info,neutral:e.textTertiary};let L=!1;function ke(){if(L||typeof document>"u")return;const o=document.createElement("style");o.textContent="@keyframes ol-pulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.4 } }",document.head.appendChild(o),L=!0}const Fe=m.memo(function({tone:i,size:r="md",pulse:s=!1}){s&&ke();const l=r==="sm"?"6px":"8px",c={width:l,height:l,borderRadius:h.full,backgroundColor:ve[i],display:"inline-block",flexShrink:0,animation:s?"ol-pulse 1.5s ease-in-out infinite":void 0};return t.jsx("span",{style:c})});function ze({title:o,sub:i,action:r}){const s={display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:a[4],marginBottom:a[5],fontFamily:n.fontFamily.base},l={display:"flex",flexDirection:"column",gap:"2px"},c={fontSize:n.size.xl,fontWeight:n.weight.bold,color:e.textPrimary,letterSpacing:n.letterSpacing.tight,lineHeight:n.lineHeight.tight,margin:0},g={fontSize:n.size.base,color:e.textSecondary,margin:0};return t.jsxs("div",{style:s,children:[t.jsxs("div",{style:l,children:[t.jsx("h2",{style:c,children:o}),i&&t.jsx("p",{style:g,children:i})]}),r&&t.jsx("div",{style:{flexShrink:0},children:r})]})}const Ie={error:e.error,warning:e.warning,info:e.info,neutral:e.textTertiary};function Ce({items:o}){const i={display:"flex",flexDirection:"column",gap:a[3],fontFamily:n.fontFamily.base};return t.jsx("div",{style:i,children:o.map((r,s)=>{const l=Ie[r.tone||"neutral"];return t.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:a[3]},children:[t.jsx("span",{style:{width:"8px",height:"8px",borderRadius:"50%",background:l,flexShrink:0,marginTop:"5px"}}),t.jsx("span",{style:{fontSize:n.size.base,color:e.textPrimary,lineHeight:n.lineHeight.relaxed},children:r.text})]},s)})})}const Be={success:{IconComponent:R,bg:e.cardBg,accent:e.success},error:{IconComponent:E,bg:e.cardBg,accent:e.error},warning:{IconComponent:W,bg:e.cardBg,accent:e.warning},info:{IconComponent:C,bg:e.cardBg,accent:e.info},neutral:{IconComponent:C,bg:e.cardBg,accent:e.textTertiary}};function Me({open:o,onClose:i,message:r,tone:s="neutral",duration:l=4e3,action:c}){const[g,x]=m.useState(!1);if(m.useEffect(()=>{if(!o){x(!1);return}const v=requestAnimationFrame(()=>x(!0));return()=>cancelAnimationFrame(v)},[o]),m.useEffect(()=>{if(!o||l<=0)return;const v=setTimeout(i,l);return()=>clearTimeout(v)},[o,l,i]),!o)return null;const u=Be[s],d={position:"fixed",bottom:"20px",left:"50%",transform:g?"translateX(-50%) translateY(0)":"translateX(-50%) translateY(16px)",opacity:g?1:0,transition:"opacity 0.18s ease, transform 0.18s ease",zIndex:200,pointerEvents:"auto"},f={display:"flex",alignItems:"center",gap:a[3],padding:`${a[3]} ${a[4]}`,background:u.bg,borderRadius:h.lg,boxShadow:F.lg,border:`1px solid ${e.border}`,fontFamily:n.fontFamily.base,maxWidth:"480px",minWidth:"280px"},p={width:"22px",height:"22px",borderRadius:h.full,background:u.accent,color:e.textInverse,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:n.weight.bold,flexShrink:0,lineHeight:1},y={flex:1,fontSize:n.size.base,color:e.textPrimary,lineHeight:n.lineHeight.snug},w={fontSize:n.size.base,fontWeight:n.weight.semibold,color:u.accent,background:"none",border:"none",cursor:"pointer",padding:0,whiteSpace:"nowrap",textDecoration:"underline",textUnderlineOffset:"2px",fontFamily:n.fontFamily.base},b={width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",background:"transparent",border:"none",borderRadius:h.xs,cursor:"pointer",color:e.textTertiary,flexShrink:0},S=u.IconComponent;return t.jsx("div",{style:d,children:t.jsxs("div",{style:f,children:[t.jsx("span",{style:p,children:t.jsx(S,{size:14})}),t.jsx("span",{style:y,children:r}),c&&t.jsx("button",{style:w,onClick:c.onClick,children:c.label}),t.jsx("button",{style:b,onClick:i,"aria-label":"Dismiss",onMouseEnter:v=>{v.currentTarget.style.background=e.pageBg},onMouseLeave:v=>{v.currentTarget.style.background="transparent"},children:t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",children:t.jsx("path",{d:"M1 1l10 10M11 1L1 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]})})}const B=m.memo(function({children:i}){const r={fontFamily:n.fontFamily.mono,fontSize:n.size.sm,backgroundColor:e.bgSubtle,color:e.textDark,padding:`2px ${a[2]}`,borderRadius:h.md,border:`1px solid ${e.border}`,display:"inline-flex",alignItems:"center"};return t.jsx("span",{style:r,children:i})}),I={added:e.success,modified:e.warning,destructive:e.error,safe:e.textTertiary},Te={added:e.successBg,modified:e.warningBg,destructive:e.errorBg,safe:e.bgSubtle};function Le({title:o,handle:i,field:r,csvVal:s,storeVal:l,type:c,note:g}){const x={display:"grid",gridTemplateColumns:"2fr 1fr 1.5fr 1.5fr 1fr",gap:a[4],padding:a[4],backgroundColor:Te[c],borderLeft:`4px solid ${I[c]}`,borderBottom:`1px solid ${e.border}`,fontFamily:n.fontFamily.base,alignItems:"start"},u={fontSize:n.size.md,color:e.textPrimary,margin:0},d={fontSize:n.size.sm,color:e.textSecondary,fontFamily:n.fontFamily.mono,marginTop:a[1],marginBottom:0};return t.jsxs("div",{style:x,children:[t.jsxs("div",{children:[t.jsx("p",{style:{...u,fontWeight:n.weight.bold},children:o}),t.jsx("p",{style:d,children:i})]}),t.jsx("div",{children:t.jsx(B,{children:r})}),t.jsx("div",{children:t.jsx("p",{style:{...u,color:s?e.textPrimary:e.error},children:s||"(blank)"})}),t.jsx("div",{children:t.jsx("p",{style:{...u,color:e.textTertiary},children:l||"—"})}),t.jsxs("div",{children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:a[2]},children:[t.jsx("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:I[c]}}),t.jsx("span",{style:{fontSize:n.size.sm,fontWeight:n.weight.semibold,color:I[c]},children:c==="added"?"New":c==="safe"?"Unchanged":c.charAt(0).toUpperCase()+c.slice(1)})]}),g&&t.jsxs("p",{style:{fontSize:n.size.xs,color:I[c],marginTop:a[1],marginBottom:0},children:["⚠ ",g]})]})]})}function H({severity:o,field:i,rowCount:r,message:s,fixable:l,onFix:c}){const[g,x]=m.useState(!1),d={error:{tone:"error",outline:e.error},warning:{tone:"warning",outline:e.warning},info:{tone:"info",outline:e.info}}[o],f={padding:a[4],borderBottom:`1px solid ${e.borderSubtle}`,fontFamily:n.fontFamily.base,display:"flex",flexDirection:"column",gap:a[3],backgroundColor:e.white},p={display:"flex",alignItems:"center",justifyContent:"space-between"},y={display:"flex",alignItems:"center",gap:a[3],flexWrap:"wrap"},w={border:`1px solid ${d.outline}`,color:d.outline,padding:`2px ${a[2]}`,borderRadius:h.full,fontSize:n.size.xs,fontWeight:n.weight.medium,backgroundColor:"transparent"};return t.jsxs("div",{style:f,children:[t.jsxs("div",{style:p,children:[t.jsxs("div",{style:y,children:[t.jsx(D,{tone:d.tone,dot:!0,children:o.charAt(0).toUpperCase()+o.slice(1)}),t.jsx(B,{children:i}),t.jsxs("span",{style:w,children:[r.toLocaleString()," rows affected"]})]}),t.jsx("div",{children:l?t.jsx($,{variant:"primary",size:"sm",onClick:c,children:"Auto-Fix"}):t.jsx("span",{style:{fontSize:n.size.sm,color:e.textTertiary},children:"Manual fix"})})]}),t.jsx("p",{style:{margin:0,fontSize:n.size.md,color:e.textDark},children:s}),t.jsx("div",{children:t.jsx("button",{onClick:()=>x(!g),style:{background:"none",border:"none",padding:0,color:e.textSecondary,fontSize:n.size.sm,cursor:"pointer",textDecoration:"underline",fontFamily:n.fontFamily.base},children:g?"Hide sample rows ▲":"View sample rows ▼"})}),g&&t.jsxs("div",{style:{display:"flex",gap:a[2],marginTop:a[1],flexWrap:"wrap"},children:[[1,2,3].map(b=>t.jsxs("span",{style:{fontSize:n.size.xs,border:`1px solid ${e.border}`,padding:`2px ${a[2]}`,borderRadius:h.full,color:e.textSecondary},children:["row ",b]},b)),r>3&&t.jsxs("span",{style:{fontSize:n.size.xs,color:e.textTertiary,alignSelf:"center"},children:["+ ",r-3," more"]})]})]})}function $e({category:o,issues:i,defaultOpen:r=!0}){const[s,l]=m.useState(r),c=i.some(b=>b.severity==="error"),g=i.some(b=>b.severity==="warning"),x=c?e.error:g?e.warning:e.info,u=i.reduce((b,S)=>b+S.rowCount,0),d={backgroundColor:e.cardBg,borderRadius:h.lg,border:`1px solid ${e.border}`,marginBottom:a[4],overflow:"hidden",fontFamily:n.fontFamily.base},f={padding:a[4],display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",backgroundColor:e.cardBg,borderBottom:s?`1px solid ${e.border}`:"none",userSelect:"none"},p={display:"flex",alignItems:"center",gap:a[3]},y={width:8,height:8,borderRadius:"50%",backgroundColor:x,flexShrink:0},w={backgroundColor:e.bgSubtle,border:`1px solid ${e.border}`,borderRadius:h.full,padding:`2px ${a[3]}`,fontSize:n.size.sm,color:e.textSecondary,fontWeight:n.weight.medium};return t.jsxs("div",{style:d,children:[t.jsxs("div",{style:f,onClick:()=>l(!s),children:[t.jsxs("div",{style:p,children:[t.jsx("span",{style:y}),t.jsx("span",{style:{fontSize:n.size.lg,fontWeight:n.weight.bold,color:e.textPrimary},children:o})]}),t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:a[3]},children:[t.jsxs("span",{style:w,children:[u.toLocaleString()," rows"]}),t.jsx("span",{style:{color:e.textTertiary,transform:s?"rotate(180deg)":"none",transition:"transform 200ms ease",fontSize:"12px"},children:"▼"})]})]}),s&&t.jsx("div",{style:{display:"flex",flexDirection:"column"},children:i.map((b,S)=>t.jsx("div",{style:{borderBottom:S===i.length-1?"none":`1px solid ${e.borderSubtle}`},children:t.jsx(H,{...b})},S))})]})}const De=m.memo(function({value:i,label:r,tone:s="neutral"}){const c={success:{border:e.successBorder,color:e.success},error:{border:e.errorBorder,color:e.error},info:{border:e.infoBorder,color:e.info},neutral:{border:e.border,color:e.textPrimary}}[s],g={display:"flex",flexDirection:"column",gap:a[1],padding:a[4],borderRadius:h.lg,border:`1px solid ${c.border}`,backgroundColor:e.white,fontFamily:n.fontFamily.base,minWidth:"120px",flex:1},x={fontSize:n.size["2xl"],fontWeight:n.weight.bold,color:c.color,margin:0,lineHeight:1},u={fontSize:n.size.sm,color:s==="neutral"?e.textSecondary:c.color,margin:0,marginTop:a[1]};return t.jsxs("div",{style:g,children:[t.jsx("div",{style:x,children:i}),t.jsx("div",{style:u,children:r})]})}),Ae=m.memo(function({name:i}){const r={display:"inline-flex",alignItems:"center",padding:`2px ${a[3]}`,backgroundColor:e.neutralBg,color:e.textDark,fontSize:n.size.xs,fontFamily:n.fontFamily.base,fontWeight:n.weight.medium,borderRadius:h.full,whiteSpace:"nowrap"};return t.jsx("span",{style:r,children:i})}),Re=m.memo(function({percent:i,height:r=8}){const s={width:"100%",backgroundColor:e.borderSubtle,borderRadius:h.full,height:`${r}px`,overflow:"hidden"},l={width:`${Math.max(0,Math.min(100,i))}%`,backgroundColor:e.black,height:"100%",transition:"width 300ms ease"};return t.jsx("div",{style:s,role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:t.jsx("div",{style:l})})});function Ee({steps:o}){const i={display:"flex",flexDirection:"column",gap:a[4],fontFamily:n.fontFamily.base};return t.jsx("div",{style:i,children:o.map(r=>{const s=r.status==="pending",l=r.status==="running",c=r.status==="done",g={display:"flex",alignItems:"center",justifyContent:"space-between",opacity:s?.4:1},x={display:"flex",alignItems:"center",gap:a[3]},u={width:"20px",height:"20px",borderRadius:h.full,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:c?e.success:l?e.black:e.borderLight,color:e.white,flexShrink:0};return t.jsxs("div",{style:g,children:[t.jsxs("div",{style:x,children:[t.jsxs("div",{style:u,children:[c&&t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M2.5 7.5L5.5 10.5L11.5 3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),l&&t.jsx("div",{style:{width:6,height:6,backgroundColor:e.white,borderRadius:"50%"}})]}),t.jsx("span",{style:{fontSize:n.size.md,color:e.textPrimary,fontWeight:l?n.weight.semibold:n.weight.normal},children:r.label})]}),r.value&&t.jsx("span",{style:{fontSize:n.size.sm,color:c?e.success:e.textTertiary},children:r.value})]},r.id)})})}function We({checked:o,onChange:i,value:r,name:s,disabled:l=!1,label:c,description:g,id:x}){const[u,d]=m.useState(!1),[f,p]=m.useState(!1),y=m.useId(),w=x||y,b={display:"flex",alignItems:"flex-start",gap:a[3],opacity:l?.5:1,cursor:l?"not-allowed":"pointer",fontFamily:n.fontFamily.base},S={position:"relative",width:"18px",height:"18px",borderRadius:h.full,border:`1px solid ${o?e.black:f&&!l?e.textTertiary:e.borderLight}`,backgroundColor:e.white,transition:"border-color 150ms ease, box-shadow 150ms ease",flexShrink:0,boxShadow:u?F.focus:"none",outline:"none",marginTop:"1px"},v={position:"absolute",top:"50%",left:"50%",transform:`translate(-50%, -50%) scale(${o?1:0})`,width:"10px",height:"10px",borderRadius:h.full,backgroundColor:e.black,transition:"transform 150ms ease"},k={display:"flex",flexDirection:"column",gap:a[1]},z={fontSize:n.size.md,fontWeight:n.weight.medium,color:e.textPrimary,margin:0,cursor:l?"not-allowed":"pointer"},P={fontSize:n.size.sm,color:e.textSecondary,margin:0},V={position:"absolute",opacity:0,width:0,height:0,margin:0};return t.jsxs("label",{style:b,htmlFor:w,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[t.jsxs("div",{style:{position:"relative"},children:[t.jsx("input",{id:w,type:"radio",name:s,value:r,checked:o,disabled:l,onChange:U=>{l||i(U.target.checked)},onFocus:()=>d(!0),onBlur:()=>d(!1),style:V}),t.jsx("div",{style:S,"aria-hidden":"true",children:t.jsx("div",{style:v})})]}),(c||g)&&t.jsxs("div",{style:k,children:[c&&t.jsx("span",{style:z,children:c}),g&&t.jsx("span",{style:P,children:g})]})]})}function He({steps:o,current:i}){const r={display:"flex",justifyContent:"space-between",width:"100%",fontFamily:n.fontFamily.base,position:"relative"},s=32,l={position:"absolute",top:s/2-1,left:s/2,right:s/2,height:2,backgroundColor:e.border,zIndex:1},c={height:"100%",width:`${(Math.min(i,o.length)-1)/(o.length-1)*100}%`,backgroundColor:e.black,transition:"width 300ms ease"};return t.jsxs("div",{style:r,children:[t.jsx("div",{style:l,children:t.jsx("div",{style:c})}),o.map((g,x)=>{const u=x+1,d=u<i,f=u===i,p={width:s,height:s,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:n.size.md,fontWeight:n.weight.semibold,backgroundColor:d||f?e.black:e.white,color:d||f?e.white:e.textTertiary,border:d||f?`2px solid ${e.black}`:`2px solid ${e.border}`,zIndex:2,position:"relative",transition:"all 300ms ease"},y={position:"absolute",top:s+8,left:"50%",transform:"translateX(-50%)",fontSize:n.size.sm,color:f||d?e.textPrimary:e.textTertiary,fontWeight:f?n.weight.semibold:n.weight.normal,whiteSpace:"nowrap"},w={position:"relative",display:"flex",flexDirection:"column",alignItems:"center"};return t.jsxs("div",{style:w,children:[t.jsx("div",{style:p,children:d?t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M2.5 7.5L5.5 10.5L11.5 3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):u}),t.jsx("span",{style:y,children:g})]},g)})]})}const Pe=m.memo(function({label:i,value:r,highlight:s=!1,color:l}){const c={backgroundColor:s?e.black:e.white,border:s?"none":`1px solid ${e.border}`,borderRadius:h.lg,padding:a[5],display:"flex",flexDirection:"column",gap:a[2],fontFamily:n.fontFamily.base,flex:1,minWidth:0},g={fontSize:n.size.sm,color:s?e.textDisabled:e.textSecondary,fontWeight:n.weight.semibold,textTransform:"uppercase",letterSpacing:"0.05em",margin:0},x={fontSize:n.size["3xl"],fontWeight:n.weight.bold,color:s?e.white:l||e.textPrimary,margin:0,lineHeight:1};return t.jsxs("div",{style:c,children:[t.jsx("p",{style:g,children:i}),t.jsx("p",{style:x,children:r})]})});function Ve({checked:o,onChange:i,disabled:r=!1,label:s,description:l,id:c}){const[g,x]=m.useState(!1),u=m.useId(),d=c||u,f={display:"flex",alignItems:"flex-start",gap:a[3],opacity:r?.5:1,cursor:r?"not-allowed":"pointer",fontFamily:n.fontFamily.base},p={position:"relative",width:"36px",height:"20px",backgroundColor:o?e.black:e.borderLight,borderRadius:h.full,transition:"background-color 200ms ease",flexShrink:0,boxShadow:g?F.focus:"none",outline:"none"},y={position:"absolute",top:"2px",left:o?"calc(100% - 18px)":"2px",width:"16px",height:"16px",backgroundColor:e.white,borderRadius:h.full,transition:"left 200ms ease, transform 200ms ease",boxShadow:F.sm},w={display:"flex",flexDirection:"column",gap:a[1],marginTop:"1px"},b={fontSize:n.size.md,fontWeight:n.weight.medium,color:e.textPrimary,margin:0,cursor:r?"not-allowed":"pointer"},S={fontSize:n.size.sm,color:e.textSecondary,margin:0},v=k=>{(k.key===" "||k.key==="Enter")&&(k.preventDefault(),r||i(!o))};return t.jsxs("label",{style:f,htmlFor:d,onMouseEnter:()=>{},children:[t.jsx("div",{id:d,role:"switch","aria-checked":o,"aria-disabled":r,tabIndex:r?-1:0,onKeyDown:v,onFocus:()=>x(!0),onBlur:()=>x(!1),onClick:k=>{k.preventDefault(),r||i(!o)},style:p,children:t.jsx("div",{style:y})}),(s||l)&&t.jsxs("div",{style:w,children:[s&&t.jsx("span",{style:b,children:s}),l&&t.jsx("span",{style:S,children:l})]})]})}const Ue=m.memo(function({value:i,label:r,suffix:s,inverse:l=!1}){const c=i>0,g=i===0;let x=e.textTertiary;g||(c?x=l?e.error:e.success:x=l?e.success:e.error);const u=c?"↑":g?"—":"↓",d=g?"":`${c?"+":""}${i}${s??""}`,f={display:"inline-flex",alignItems:"center",gap:a[1],color:x,fontSize:n.size.sm,fontWeight:n.weight.medium,fontFamily:n.fontFamily.base};return t.jsxs("span",{style:f,children:[t.jsxs("span",{children:[u," ",d]}),r&&t.jsx("span",{style:{color:e.textSecondary,fontWeight:n.weight.normal,marginLeft:a[1]},children:r})]})});function Oe(o=!1){const[i,r]=m.useState(o),s=m.useCallback(()=>r(!0),[]),l=m.useCallback(()=>r(!1),[]),c=m.useCallback(()=>r(g=>!g),[]);return{isOpen:i,open:s,close:l,toggle:c}}function Ge(o,i){const[r,s]=m.useState(()=>{if(typeof window>"u")return i;try{const c=window.localStorage.getItem(o);return c?JSON.parse(c):i}catch{return i}}),l=m.useCallback(c=>{s(g=>{const x=c instanceof Function?c(g):c;try{window.localStorage.setItem(o,JSON.stringify(x))}catch{}return x})},[o]);return[r,l]}function Ne(...o){return o.filter(Boolean).join(" ")}exports.ActionList=Ce;exports.AlertIcon=W;exports.ArrowDownIcon=ye;exports.ArrowLeftIcon=pe;exports.ArrowRightIcon=fe;exports.ArrowUpIcon=he;exports.Badge=D;exports.Button=$;exports.Card=K;exports.CheckIcon=R;exports.CheckRow=je;exports.ChevronDownIcon=we;exports.ChevronLeftIcon=be;exports.ChevronRightIcon=me;exports.ChevronUpIcon=Se;exports.CodeChip=B;exports.DataTable=ee;exports.DiffRow=Le;exports.DownloadIcon=ue;exports.InfoIcon=C;exports.Input=te;exports.IssueCard=H;exports.IssueGroup=$e;exports.LockIcon=A;exports.MenuIcon=ae;exports.MiniStat=De;exports.Modal=ie;exports.ModelTag=Ae;exports.PageHeader=ze;exports.PlayIcon=ce;exports.ProgressBar=Re;exports.ProgressList=Ee;exports.Radio=We;exports.ScoreBar=re;exports.SearchIcon=le;exports.SectionLabel=Q;exports.SettingsIcon=ge;exports.StarIcon=de;exports.StatGrid=J;exports.StatusDot=Fe;exports.StepBar=He;exports.SummaryCard=Pe;exports.Switch=Ve;exports.TabBar=Z;exports.Toast=Me;exports.ToggleGroup=se;exports.Trend=Ue;exports.UploadIcon=xe;exports.XIcon=E;exports.colors=e;exports.cx=Ne;exports.radii=h;exports.shadows=F;exports.spacing=a;exports.typography=n;exports.useLocalStorage=Ge;exports.useModal=Oe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),t=require("react/jsx-runtime"),e={black:"#1A1A1A",blackHover:"#2A2A2A",red:"#D42B2B",white:"#FFFFFF",pageBg:"#F1F1F1",cardBg:"#FFFFFF",bgSubtle:"#FAFAFA",textPrimary:"#1A1A1A",textSecondary:"#6B7280",textTertiary:"#9CA3AF",textDark:"#374151",textDisabled:"#D1D5DB",textInverse:"#FFFFFF",border:"#E5E5E5",borderLight:"#D1D5DB",borderSubtle:"#F3F4F6",borderFocus:"#1A1A1A",success:"#22C55E",successBg:"#F0FDF4",successBorder:"#BBF7D0",warning:"#F59E0B",warningBg:"#FFFBEB",warningBorder:"#FDE68A",error:"#EF4444",errorHover:"#DC2626",errorBg:"#FEF2F2",errorBorder:"#FECACA",info:"#2563EB",infoBg:"#EFF6FF",infoBorder:"#BFDBFE",neutralBg:"#F3F4F6",neutralText:"#6B7280",skeletonBase:"#E5E5E5",skeletonPulse:"#F1F2F4"},a={0:"0px",1:"4px",2:"8px",3:"12px",4:"16px",5:"20px",6:"24px",8:"32px",10:"40px",12:"48px",16:"64px",20:"80px"},n={fontFamily:{base:"-apple-system, 'Helvetica Neue', sans-serif",mono:"'Menlo', 'Monaco', 'Courier New', monospace"},size:{xs:"10px",sm:"11px",base:"13px",md:"14px",lg:"16px",xl:"20px","2xl":"24px","3xl":"32px"},weight:{normal:400,medium:500,semibold:600,bold:700,extrabold:800},lineHeight:{tight:1.2,snug:1.4,normal:1.5,relaxed:1.55,loose:1.75},letterSpacing:{tight:"-0.02em",snug:"-0.01em",normal:"0em",wide:"0.02em"}},h={none:"0px",xs:"4px",sm:"6px",md:"8px",lg:"10px",xl:"12px","2xl":"16px",full:"9999px"},F={none:"none",sm:"0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04)",md:"0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04)",lg:"0 20px 60px rgba(0,0,0,0.18)",focus:"0 0 0 3px rgba(26, 26, 26, 0.12)"},M={sm:{padding:`${a[1]} ${a[3]}`,fontSize:n.size.base,height:"32px",gap:a[1]},md:{padding:`${a[2]} ${a[4]}`,fontSize:n.size.md,height:"40px",gap:a[2]},lg:{padding:`${a[3]} ${a[6]}`,fontSize:n.size.md,height:"48px",gap:a[2]}},T={primary:{background:e.black,color:e.textInverse,border:"none",hoverBg:e.blackHover},ghost:{background:"transparent",color:e.textPrimary,border:`1px solid ${e.border}`,hoverBg:e.bgSubtle},danger:{background:e.error,color:e.textInverse,border:"none",hoverBg:e.errorHover},text:{background:"transparent",color:e.textSecondary,border:"none",hoverBg:e.bgSubtle}};function A({variant:r="primary",size:i="md",loading:o=!1,disabled:s=!1,fullWidth:l=!1,leftIcon:c,children:g,onClick:u}){const x=M[i]||M.md,d=T[r]||T.primary,f=s||o,p={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:x.gap,padding:x.padding,fontSize:x.fontSize,height:x.height,fontFamily:n.fontFamily.base,fontWeight:n.weight.semibold,lineHeight:n.lineHeight.tight,letterSpacing:n.letterSpacing.snug,borderRadius:h.md,background:d.background,color:d.color,border:d.border,cursor:f?"not-allowed":"pointer",opacity:f?.5:1,transition:"background 150ms ease, opacity 150ms ease, box-shadow 150ms ease",width:l?"100%":void 0,boxSizing:"border-box",outline:"none"};return t.jsxs("button",{style:p,onClick:u,disabled:f,onMouseEnter:y=>{f||(y.currentTarget.style.background=d.hoverBg)},onMouseLeave:y=>{f||(y.currentTarget.style.background=d.background)},onFocus:y=>{y.currentTarget.style.boxShadow=F.focus},onBlur:y=>{y.currentTarget.style.boxShadow="none"},children:[o?t.jsx(X,{}):c,g]})}let $=!1;function N(){if($||typeof document>"u")return;const r=document.createElement("style");r.textContent="@keyframes ol-spin { to { transform: rotate(360deg) } }",document.head.appendChild(r),$=!0}function X(){return N(),t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{animation:"ol-spin 0.6s linear infinite"},children:t.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"28",strokeDashoffset:"20",opacity:"0.8"})})}const q={none:"0px",sm:a[3],md:a[6],lg:a[8]};function K({padding:r="md",noBorder:i=!1,shadow:o=!1,children:s}){const l={background:e.cardBg,borderRadius:h.xl,padding:q[r],border:i?"none":`1px solid ${e.border}`,boxShadow:o?F.sm:F.none,boxSizing:"border-box"};return t.jsx("div",{style:l,children:s})}const Y={success:{bg:e.successBg,color:e.success,dot:e.success},warning:{bg:e.warningBg,color:e.warning,dot:e.warning},error:{bg:e.errorBg,color:e.error,dot:e.error},info:{bg:e.infoBg,color:e.info,dot:e.info},neutral:{bg:e.neutralBg,color:e.neutralText,dot:e.textTertiary}},R=m.memo(function({tone:i,dot:o=!1,children:s}){const l=Y[i],c={display:"inline-flex",alignItems:"center",gap:a[1],padding:`2px ${a[2]}`,fontSize:n.size.xs,fontWeight:n.weight.semibold,fontFamily:n.fontFamily.base,lineHeight:n.lineHeight.tight,borderRadius:h.xs,background:l.bg,color:l.color,whiteSpace:"nowrap"},g={width:"5px",height:"5px",borderRadius:h.full,background:l.dot,flexShrink:0};return t.jsxs("span",{style:c,children:[o&&t.jsx("span",{style:g}),s]})});function J({stats:r,cols:i=4}){const o={display:"flex",border:`1px solid ${e.border}`,borderRadius:h.lg,overflow:"hidden"};return t.jsx("div",{style:o,children:r.map((s,l)=>t.jsx(_,{stat:s,isLast:l===r.length-1},l))})}function _({stat:r,isLast:i}){const o=r.highlight,s={flex:1,padding:`${a[3]} ${a[4]}`,textAlign:"center",borderRight:i?void 0:`1px solid ${e.border}`,background:o?e.black:"transparent"},l={fontSize:n.size.xl,fontWeight:n.weight.bold,fontFamily:n.fontFamily.base,lineHeight:n.lineHeight.tight,color:r.color||(o?e.textInverse:e.textPrimary),display:"flex",alignItems:"baseline",justifyContent:"center",gap:a[1],margin:0},c={fontSize:n.size.sm,fontWeight:n.weight.medium,color:e.textTertiary},g={fontSize:n.size.sm,fontFamily:n.fontFamily.base,color:e.textTertiary,marginTop:"2px"},u={fontSize:n.size.xs,color:e.textTertiary,fontFamily:n.fontFamily.base,marginTop:"4px"};return t.jsxs("div",{style:s,children:[t.jsxs("p",{style:l,children:[r.value,r.unit&&t.jsx("span",{style:c,children:r.unit})]}),t.jsx("div",{style:g,children:r.label}),r.sub&&t.jsx("div",{style:u,children:r.sub})]})}const Q=m.memo(function({children:i,action:o}){const s={display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:a[2]},l={fontSize:n.size.sm,fontWeight:n.weight.medium,fontFamily:n.fontFamily.base,color:e.textSecondary,margin:0};return t.jsxs("div",{style:s,children:[t.jsx("p",{style:l,children:i}),o&&t.jsx("div",{children:o})]})});function Z({tabs:r,active:i,onChange:o,size:s="md"}){const l={display:"inline-flex",alignItems:"center",gap:a[1],fontFamily:n.fontFamily.base},c=s==="sm"?n.size.base:n.size.md,g=s==="sm"?a[1]:a[2],u=s==="sm"?a[3]:a[4];return t.jsx("div",{style:l,role:"tablist",children:r.map(x=>{const d=x.id===i,f={padding:`${g} ${u}`,fontSize:c,fontWeight:d?n.weight.semibold:n.weight.normal,fontFamily:n.fontFamily.base,color:d?e.textInverse:e.textSecondary,background:d?e.black:"transparent",border:"none",borderRadius:h.full,cursor:"pointer",display:"flex",alignItems:"center",gap:a[2],transition:"background 150ms ease, color 150ms ease",whiteSpace:"nowrap"},p={fontSize:n.size.xs,fontWeight:n.weight.semibold,background:d?"rgba(255,255,255,0.2)":e.neutralBg,color:d?e.textInverse:e.textSecondary,borderRadius:h.full,padding:`0 ${a[2]}`,minWidth:"20px",textAlign:"center",lineHeight:"20px"};return t.jsxs("button",{style:f,role:"tab","aria-selected":d,onClick:()=>!d&&o(x.id),onMouseEnter:y=>{d||(y.currentTarget.style.background=e.neutralBg,y.currentTarget.style.color=e.textPrimary)},onMouseLeave:y=>{d||(y.currentTarget.style.background="transparent",y.currentTarget.style.color=e.textSecondary)},children:[x.label,x.badge!==void 0&&t.jsx("span",{style:p,children:x.badge})]},x.id)})})}function ee({columns:r,rows:i,loading:o=!1,emptyState:s,onRowClick:l}){const c={width:"100%",borderCollapse:"collapse",fontFamily:n.fontFamily.base,fontSize:n.size.base},g=d=>({textAlign:d.align||"left",padding:`${a[3]} ${a[4]}`,fontSize:n.size.sm,fontWeight:n.weight.medium,color:e.textTertiary,borderBottom:`1px solid ${e.border}`,width:d.width,whiteSpace:"nowrap"}),u=d=>({textAlign:d.align||"left",padding:`${a[3]} ${a[4]}`,fontSize:n.size.base,color:e.textPrimary,borderBottom:`1px solid ${e.borderSubtle}`,verticalAlign:"middle",lineHeight:n.lineHeight.snug}),x={cursor:l?"pointer":"default",transition:"background 100ms ease"};return o?t.jsx("div",{style:{padding:a[8],textAlign:"center"},children:t.jsx("p",{style:{color:e.textTertiary,fontSize:n.size.base},children:"Loading..."})}):i.length===0?s?t.jsx(t.Fragment,{children:s}):t.jsx("div",{style:{padding:a[8],textAlign:"center"},children:t.jsx("p",{style:{color:e.textTertiary,fontSize:n.size.base},children:"No data"})}):t.jsx("div",{style:{overflowX:"auto",borderRadius:h.md},children:t.jsxs("table",{style:c,children:[t.jsx("thead",{children:t.jsx("tr",{children:r.map(d=>t.jsx("th",{style:g(d),children:d.header},String(d.key)))})}),t.jsx("tbody",{children:i.map((d,f)=>t.jsx("tr",{style:x,onClick:()=>l==null?void 0:l(d),onMouseEnter:p=>{p.currentTarget.style.background=e.bgSubtle},onMouseLeave:p=>{p.currentTarget.style.background="transparent"},children:r.map(p=>t.jsx("td",{style:u(p),children:p.render?p.render(d):String(d[p.key]??"")},String(p.key)))},f))})]})})}function te({label:r,hint:i,error:o,prefix:s,suffix:l,type:c="text",placeholder:g,disabled:u=!1,value:x,onChange:d}){const f=!!o,p={display:"flex",flexDirection:"column",gap:a[1],fontFamily:n.fontFamily.base},y={fontSize:n.size.base,fontWeight:n.weight.medium,color:e.textPrimary,margin:0},w={display:"flex",alignItems:"center",gap:a[2],padding:`${a[2]} ${a[3]}`,background:u?e.bgSubtle:e.cardBg,border:`1px solid ${f?e.error:e.border}`,borderRadius:h.md,transition:"border-color 150ms ease, box-shadow 150ms ease",cursor:u?"not-allowed":"text"},b={flex:1,border:"none",outline:"none",background:"transparent",fontSize:n.size.md,fontFamily:n.fontFamily.base,color:u?e.textDisabled:e.textPrimary,cursor:u?"not-allowed":"text",padding:0,width:"100%"},v={fontSize:n.size.sm,color:f?e.error:e.textTertiary,margin:0},S={fontSize:n.size.base,color:e.textTertiary,flexShrink:0};return t.jsxs("div",{style:p,children:[r&&t.jsx("p",{style:y,children:r}),t.jsxs("div",{style:w,onFocusCapture:k=>{const z=k.currentTarget;z.style.borderColor=f?e.error:e.borderFocus,z.style.boxShadow=F.focus},onBlurCapture:k=>{const z=k.currentTarget;z.style.borderColor=f?e.error:e.border,z.style.boxShadow="none"},children:[s&&t.jsx("span",{style:S,children:s}),t.jsx("input",{type:c,value:x,onChange:k=>d(k.target.value),placeholder:g,disabled:u,"aria-invalid":f,style:b}),l&&t.jsx("span",{style:S,children:l})]}),(o||i)&&t.jsx("p",{style:v,children:o||i})]})}function ne(r){return r>=75?e.success:r>=50?e.warning:e.error}function re(r){return r>=75?e.successBg:r>=50?e.warningBg:e.errorBg}const oe=m.memo(function({score:i,max:o=100,width:s="100%",showLabel:l=!0,size:c="md"}){const g=Math.min(Math.max(i/o*100,0),100),u=ne(g),x=re(g),d=c==="sm"?"6px":"8px",f={display:"flex",alignItems:"center",gap:a[3],width:s,fontFamily:n.fontFamily.base},p={flex:1,height:d,background:x,borderRadius:h.full,overflow:"hidden"},y={height:"100%",width:`${g}%`,background:u,borderRadius:h.full,transition:"width 400ms ease"},w={fontSize:c==="sm"?n.size.xs:n.size.sm,fontWeight:n.weight.semibold,color:u,minWidth:"36px",textAlign:"right"};return t.jsxs("div",{style:f,children:[t.jsx("div",{style:p,children:t.jsx("div",{style:y})}),l&&t.jsxs("span",{style:w,children:[Math.round(g),"%"]})]})}),L='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function ie({open:r,onClose:i,children:o,maxWidth:s=400,title:l}){const[c,g]=m.useState(!1),u=m.useRef(null),x=m.useId();if(m.useEffect(()=>{if(!r){g(!1);return}const f=requestAnimationFrame(()=>g(!0));return()=>cancelAnimationFrame(f)},[r]),m.useEffect(()=>{if(!r)return;const f=p=>{p.key==="Escape"&&i()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[r,i]),m.useEffect(()=>{if(!r||!u.current)return;const f=u.current,p=document.activeElement,y=f.querySelector(L);y?y.focus():f.focus();const w=b=>{if(b.key!=="Tab")return;const v=f.querySelectorAll(L);if(v.length===0)return;const S=v[0],k=v[v.length-1];b.shiftKey?document.activeElement===S&&(b.preventDefault(),k.focus()):document.activeElement===k&&(b.preventDefault(),S.focus())};return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w),p==null||p.focus()}},[r]),!r)return null;const d=t.jsx("button",{onClick:i,onMouseEnter:f=>{f.currentTarget.style.background=e.pageBg},onMouseLeave:f=>{f.currentTarget.style.background="transparent"},style:{width:"28px",height:"28px",borderRadius:h.sm,border:"none",background:"transparent",color:e.textTertiary,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},"aria-label":"Close",children:t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:t.jsx("path",{d:"M1 1l10 10M11 1L1 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})});return t.jsx("div",{role:"presentation",onClick:i,style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.32)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100,padding:a[4]},children:t.jsx("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":l?x:void 0,tabIndex:-1,onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),style:{background:e.cardBg,borderRadius:h["2xl"],width:"100%",maxWidth:s,boxShadow:F.lg,opacity:c?1:0,transform:c?"none":"translateY(10px) scale(0.97)",transition:"opacity 0.18s ease, transform 0.18s ease",outline:"none",...l?{display:"flex",flexDirection:"column",maxHeight:"calc(100vh - 32px)",overflow:"hidden"}:{padding:"28px 24px 24px",position:"relative"}},children:l?t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:`${a[4]} ${a[5]}`,borderBottom:`1px solid ${e.border}`,flexShrink:0},children:[t.jsx("span",{id:x,style:{fontWeight:n.weight.bold,fontSize:n.size.base,fontFamily:n.fontFamily.base,color:e.textPrimary},children:l}),d]}),t.jsx("div",{style:{overflowY:"auto",flex:1},children:o})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{position:"absolute",top:"14px",right:"14px"},children:d}),o]})})})}function se({options:r,value:i,onChange:o,fullWidth:s=!1}){const l={display:"inline-flex",border:`1px solid ${e.border}`,borderRadius:h.md,overflow:"hidden",fontFamily:n.fontFamily.base,width:s?"100%":void 0};return t.jsx("div",{style:l,role:"radiogroup",children:r.map((c,g)=>{const u=c.value===i,x={flex:s?1:void 0,padding:`${a[2]} ${a[4]}`,fontSize:n.size.md,fontWeight:u?n.weight.semibold:n.weight.normal,fontFamily:n.fontFamily.base,color:u?e.textInverse:e.textPrimary,background:u?e.black:e.cardBg,border:"none",borderRight:g<r.length-1?`1px solid ${e.border}`:"none",cursor:"pointer",transition:"background 150ms ease, color 150ms ease",textAlign:"center",whiteSpace:"nowrap"};return t.jsx("button",{style:x,role:"radio","aria-checked":u,onClick:()=>o(c.value),onMouseEnter:d=>{u||(d.currentTarget.style.background=e.bgSubtle)},onMouseLeave:d=>{u||(d.currentTarget.style.background=e.cardBg)},children:c.label},c.value)})})}function j(r,i="0 0 24 24"){return function({size:s=20,filled:l,className:c,style:g,...u}){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:i,fill:l?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:c,style:{flexShrink:0,...g},...u,children:typeof r=="string"?t.jsx("path",{d:r}):r})}}const E=j(t.jsxs(t.Fragment,{children:[t.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),t.jsx("path",{d:"M7 11V7a5 5 0 0110 0v4"})]})),le=j(t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"11",cy:"11",r:"8"}),t.jsx("path",{d:"M21 21l-4.35-4.35"})]})),W=j("M20 6L9 17l-5-5"),H=j("M18 6L6 18M6 6l12 12"),ae=j("M3 12h18M3 6h18M3 18h18"),C=j(t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"12",cy:"12",r:"10"}),t.jsx("path",{d:"M12 16v-4M12 8h.01"})]})),P=j(t.jsxs(t.Fragment,{children:[t.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"}),t.jsx("path",{d:"M12 9v4M12 17h.01"})]})),ce=j("M5 3l14 9-14 9V3z"),de=j("M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"),ge=j(t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"12",cy:"12",r:"3"}),t.jsx("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})),ue=j("M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"),xe=j("M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M7 10l5 5 5-5M12 15V3"),fe=j("M5 12h14M12 5l7 7-7 7"),pe=j("M19 12H5M12 19l-7-7 7-7"),he=j("M12 19V5M5 12l7-7 7 7"),ye=j("M12 5v14M19 12l-7 7-7-7"),me=j("M9 18l6-6-6-6"),be=j("M15 18l-6-6 6-6"),Se=j("M18 15l-6-6-6 6"),we=j("M6 9l6 6 6-6");function je({checked:r,onChange:i,label:o,sublabel:s,disabled:l=!1,locked:c=!1,badge:g,right:u}){const x=!l&&!c,d={display:"flex",alignItems:"center",gap:a[3],padding:`${a[3]} ${a[4]}`,background:r?e.black:e.cardBg,border:`1px solid ${r?e.black:e.border}`,borderRadius:h.lg,cursor:x?"pointer":"default",opacity:l?.5:1,transition:"background 150ms ease, border-color 150ms ease",fontFamily:n.fontFamily.base},f={width:"8px",height:"8px",borderRadius:h.full,background:r?e.error:e.textTertiary,flexShrink:0},p={flex:1,display:"flex",flexDirection:"column",gap:"2px"},y={fontSize:n.size.md,fontWeight:n.weight.semibold,color:r?e.textInverse:e.textPrimary,lineHeight:n.lineHeight.tight},w=m.useId(),b={fontSize:n.size.sm,color:r?e.textTertiary:e.textSecondary,lineHeight:n.lineHeight.tight},v={width:"20px",height:"20px",borderRadius:h.xs,border:r?"none":`1.5px solid ${e.borderLight}`,background:r?e.error:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"background 150ms ease, border-color 150ms ease"};return t.jsxs("div",{style:d,role:"checkbox","aria-checked":r,"aria-labelledby":w,tabIndex:x?0:-1,onClick:()=>x&&i(!r),onKeyDown:S=>{(S.key===" "||S.key==="Enter")&&(S.preventDefault(),x&&i(!r))},onMouseEnter:S=>{x&&!r&&(S.currentTarget.style.borderColor=e.borderLight)},onMouseLeave:S=>{x&&!r&&(S.currentTarget.style.borderColor=e.border)},children:[t.jsx("span",{style:f}),t.jsxs("div",{style:p,id:w,children:[t.jsx("span",{style:y,children:o}),s&&t.jsx("span",{style:b,children:s})]}),g&&t.jsx("div",{children:g}),u&&t.jsx("div",{children:u}),c?t.jsx(E,{size:16,style:{color:e.textTertiary}}):t.jsx("div",{style:v,children:r&&t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:t.jsx("path",{d:"M2.5 6l2.5 2.5 4.5-4.5",stroke:e.textInverse,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}const ve={success:e.success,warning:e.warning,error:e.error,info:e.info,neutral:e.textTertiary};let D=!1;function ke(){if(D||typeof document>"u")return;const r=document.createElement("style");r.textContent="@keyframes ol-pulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.4 } }",document.head.appendChild(r),D=!0}const Fe=m.memo(function({tone:i,size:o="md",pulse:s=!1}){s&&ke();const l=o==="sm"?"6px":"8px",c={width:l,height:l,borderRadius:h.full,backgroundColor:ve[i],display:"inline-block",flexShrink:0,animation:s?"ol-pulse 1.5s ease-in-out infinite":void 0};return t.jsx("span",{style:c})});function ze({title:r,sub:i,action:o}){const s={display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:a[4],marginBottom:a[5],fontFamily:n.fontFamily.base},l={display:"flex",flexDirection:"column",gap:"2px"},c={fontSize:n.size.xl,fontWeight:n.weight.bold,color:e.textPrimary,letterSpacing:n.letterSpacing.tight,lineHeight:n.lineHeight.tight,margin:0},g={fontSize:n.size.base,color:e.textSecondary,margin:0};return t.jsxs("div",{style:s,children:[t.jsxs("div",{style:l,children:[t.jsx("h2",{style:c,children:r}),i&&t.jsx("p",{style:g,children:i})]}),o&&t.jsx("div",{style:{flexShrink:0},children:o})]})}const Ie={error:e.error,warning:e.warning,info:e.info,neutral:e.textTertiary};function Ce({items:r}){const i={display:"flex",flexDirection:"column",gap:a[3],fontFamily:n.fontFamily.base};return t.jsx("div",{style:i,children:r.map((o,s)=>{const l=Ie[o.tone||"neutral"];return t.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:a[3]},children:[t.jsx("span",{style:{width:"8px",height:"8px",borderRadius:"50%",background:l,flexShrink:0,marginTop:"5px"}}),t.jsx("span",{style:{fontSize:n.size.base,color:e.textPrimary,lineHeight:n.lineHeight.relaxed},children:o.text})]},s)})})}const Be={success:{IconComponent:W,bg:e.cardBg,accent:e.success},error:{IconComponent:H,bg:e.cardBg,accent:e.error},warning:{IconComponent:P,bg:e.cardBg,accent:e.warning},info:{IconComponent:C,bg:e.cardBg,accent:e.info},neutral:{IconComponent:C,bg:e.cardBg,accent:e.textTertiary}};function Me({open:r,onClose:i,message:o,tone:s="neutral",duration:l=4e3,action:c}){const[g,u]=m.useState(!1);if(m.useEffect(()=>{if(!r){u(!1);return}const S=requestAnimationFrame(()=>u(!0));return()=>cancelAnimationFrame(S)},[r]),m.useEffect(()=>{if(!r||l<=0)return;const S=setTimeout(i,l);return()=>clearTimeout(S)},[r,l,i]),!r)return null;const x=Be[s],d={position:"fixed",bottom:"20px",left:"50%",transform:g?"translateX(-50%) translateY(0)":"translateX(-50%) translateY(16px)",opacity:g?1:0,transition:"opacity 0.18s ease, transform 0.18s ease",zIndex:200,pointerEvents:"auto"},f={display:"flex",alignItems:"center",gap:a[3],padding:`${a[3]} ${a[4]}`,background:x.bg,borderRadius:h.lg,boxShadow:F.lg,border:`1px solid ${e.border}`,fontFamily:n.fontFamily.base,maxWidth:"480px",minWidth:"280px"},p={width:"22px",height:"22px",borderRadius:h.full,background:x.accent,color:e.textInverse,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:n.weight.bold,flexShrink:0,lineHeight:1},y={flex:1,fontSize:n.size.base,color:e.textPrimary,lineHeight:n.lineHeight.snug},w={fontSize:n.size.base,fontWeight:n.weight.semibold,color:x.accent,background:"none",border:"none",cursor:"pointer",padding:0,whiteSpace:"nowrap",textDecoration:"underline",textUnderlineOffset:"2px",fontFamily:n.fontFamily.base},b={width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",background:"transparent",border:"none",borderRadius:h.xs,cursor:"pointer",color:e.textTertiary,flexShrink:0},v=x.IconComponent;return t.jsx("div",{style:d,children:t.jsxs("div",{style:f,children:[t.jsx("span",{style:p,children:t.jsx(v,{size:14})}),t.jsx("span",{style:y,children:o}),c&&t.jsx("button",{style:w,onClick:c.onClick,children:c.label}),t.jsx("button",{style:b,onClick:i,"aria-label":"Dismiss",onMouseEnter:S=>{S.currentTarget.style.background=e.pageBg},onMouseLeave:S=>{S.currentTarget.style.background="transparent"},children:t.jsx("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"none",children:t.jsx("path",{d:"M1 1l10 10M11 1L1 11",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]})})}const B=m.memo(function({children:i}){const o={fontFamily:n.fontFamily.mono,fontSize:n.size.sm,backgroundColor:e.bgSubtle,color:e.textDark,padding:`2px ${a[2]}`,borderRadius:h.md,border:`1px solid ${e.border}`,display:"inline-flex",alignItems:"center"};return t.jsx("span",{style:o,children:i})}),I={added:e.success,modified:e.warning,destructive:e.error,safe:e.textTertiary},Te={added:e.successBg,modified:e.warningBg,destructive:e.errorBg,safe:e.bgSubtle};function $e({title:r,handle:i,field:o,csvVal:s,storeVal:l,type:c,note:g}){const u={display:"grid",gridTemplateColumns:"2fr 1fr 1.5fr 1.5fr 1fr",gap:a[4],padding:a[4],backgroundColor:Te[c],borderLeft:`4px solid ${I[c]}`,borderBottom:`1px solid ${e.border}`,fontFamily:n.fontFamily.base,alignItems:"start"},x={fontSize:n.size.md,color:e.textPrimary,margin:0},d={fontSize:n.size.sm,color:e.textSecondary,fontFamily:n.fontFamily.mono,marginTop:a[1],marginBottom:0};return t.jsxs("div",{style:u,children:[t.jsxs("div",{children:[t.jsx("p",{style:{...x,fontWeight:n.weight.bold},children:r}),t.jsx("p",{style:d,children:i})]}),t.jsx("div",{children:t.jsx(B,{children:o})}),t.jsx("div",{children:t.jsx("p",{style:{...x,color:s?e.textPrimary:e.error},children:s||"(blank)"})}),t.jsx("div",{children:t.jsx("p",{style:{...x,color:e.textTertiary},children:l||"—"})}),t.jsxs("div",{children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:a[2]},children:[t.jsx("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:I[c]}}),t.jsx("span",{style:{fontSize:n.size.sm,fontWeight:n.weight.semibold,color:I[c]},children:c==="added"?"New":c==="safe"?"Unchanged":c.charAt(0).toUpperCase()+c.slice(1)})]}),g&&t.jsxs("p",{style:{fontSize:n.size.xs,color:I[c],marginTop:a[1],marginBottom:0},children:["⚠ ",g]})]})]})}function V({severity:r,field:i,rowCount:o,message:s,fixable:l,onFix:c}){const[g,u]=m.useState(!1),d={error:{tone:"error",outline:e.error},warning:{tone:"warning",outline:e.warning},info:{tone:"info",outline:e.info}}[r],f={padding:a[4],borderBottom:`1px solid ${e.borderSubtle}`,fontFamily:n.fontFamily.base,display:"flex",flexDirection:"column",gap:a[3],backgroundColor:e.white},p={display:"flex",alignItems:"center",justifyContent:"space-between"},y={display:"flex",alignItems:"center",gap:a[3],flexWrap:"wrap"},w={border:`1px solid ${d.outline}`,color:d.outline,padding:`2px ${a[2]}`,borderRadius:h.full,fontSize:n.size.xs,fontWeight:n.weight.medium,backgroundColor:"transparent"};return t.jsxs("div",{style:f,children:[t.jsxs("div",{style:p,children:[t.jsxs("div",{style:y,children:[t.jsx(R,{tone:d.tone,dot:!0,children:r.charAt(0).toUpperCase()+r.slice(1)}),t.jsx(B,{children:i}),t.jsxs("span",{style:w,children:[o.toLocaleString()," rows affected"]})]}),t.jsx("div",{children:l?t.jsx(A,{variant:"primary",size:"sm",onClick:c,children:"Auto-Fix"}):t.jsx("span",{style:{fontSize:n.size.sm,color:e.textTertiary},children:"Manual fix"})})]}),t.jsx("p",{style:{margin:0,fontSize:n.size.md,color:e.textDark},children:s}),t.jsx("div",{children:t.jsx("button",{onClick:()=>u(!g),style:{background:"none",border:"none",padding:0,color:e.textSecondary,fontSize:n.size.sm,cursor:"pointer",textDecoration:"underline",fontFamily:n.fontFamily.base},children:g?"Hide sample rows ▲":"View sample rows ▼"})}),g&&t.jsxs("div",{style:{display:"flex",gap:a[2],marginTop:a[1],flexWrap:"wrap"},children:[[1,2,3].map(b=>t.jsxs("span",{style:{fontSize:n.size.xs,border:`1px solid ${e.border}`,padding:`2px ${a[2]}`,borderRadius:h.full,color:e.textSecondary},children:["row ",b]},b)),o>3&&t.jsxs("span",{style:{fontSize:n.size.xs,color:e.textTertiary,alignSelf:"center"},children:["+ ",o-3," more"]})]})]})}function Le({category:r,issues:i,defaultOpen:o=!0}){const[s,l]=m.useState(o),c=i.some(b=>b.severity==="error"),g=i.some(b=>b.severity==="warning"),u=c?e.error:g?e.warning:e.info,x=i.reduce((b,v)=>b+v.rowCount,0),d={backgroundColor:e.cardBg,borderRadius:h.lg,border:`1px solid ${e.border}`,marginBottom:a[4],overflow:"hidden",fontFamily:n.fontFamily.base},f={padding:a[4],display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",backgroundColor:e.cardBg,borderBottom:s?`1px solid ${e.border}`:"none",userSelect:"none"},p={display:"flex",alignItems:"center",gap:a[3]},y={width:8,height:8,borderRadius:"50%",backgroundColor:u,flexShrink:0},w={backgroundColor:e.bgSubtle,border:`1px solid ${e.border}`,borderRadius:h.full,padding:`2px ${a[3]}`,fontSize:n.size.sm,color:e.textSecondary,fontWeight:n.weight.medium};return t.jsxs("div",{style:d,children:[t.jsxs("div",{style:f,onClick:()=>l(!s),children:[t.jsxs("div",{style:p,children:[t.jsx("span",{style:y}),t.jsx("span",{style:{fontSize:n.size.lg,fontWeight:n.weight.bold,color:e.textPrimary},children:r})]}),t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:a[3]},children:[t.jsxs("span",{style:w,children:[x.toLocaleString()," rows"]}),t.jsx("span",{style:{color:e.textTertiary,transform:s?"rotate(180deg)":"none",transition:"transform 200ms ease",fontSize:"12px"},children:"▼"})]})]}),s&&t.jsx("div",{style:{display:"flex",flexDirection:"column"},children:i.map((b,v)=>t.jsx("div",{style:{borderBottom:v===i.length-1?"none":`1px solid ${e.borderSubtle}`},children:t.jsx(V,{...b})},v))})]})}const De=m.memo(function({value:i,label:o,tone:s="neutral"}){const c={success:{border:e.successBorder,color:e.success},error:{border:e.errorBorder,color:e.error},info:{border:e.infoBorder,color:e.info},neutral:{border:e.border,color:e.textPrimary}}[s],g={display:"flex",flexDirection:"column",gap:a[1],padding:a[4],borderRadius:h.lg,border:`1px solid ${c.border}`,backgroundColor:e.white,fontFamily:n.fontFamily.base,minWidth:"120px",flex:1},u={fontSize:n.size["2xl"],fontWeight:n.weight.bold,color:c.color,margin:0,lineHeight:1},x={fontSize:n.size.sm,color:s==="neutral"?e.textSecondary:c.color,margin:0,marginTop:a[1]};return t.jsxs("div",{style:g,children:[t.jsx("div",{style:u,children:i}),t.jsx("div",{style:x,children:o})]})}),Ae=m.memo(function({name:i}){const o={display:"inline-flex",alignItems:"center",padding:`2px ${a[3]}`,backgroundColor:e.neutralBg,color:e.textDark,fontSize:n.size.xs,fontFamily:n.fontFamily.base,fontWeight:n.weight.medium,borderRadius:h.full,whiteSpace:"nowrap"};return t.jsx("span",{style:o,children:i})}),Re=m.memo(function({percent:i,height:o=8}){const s={width:"100%",backgroundColor:e.borderSubtle,borderRadius:h.full,height:`${o}px`,overflow:"hidden"},l={width:`${Math.max(0,Math.min(100,i))}%`,backgroundColor:e.black,height:"100%",transition:"width 300ms ease"};return t.jsx("div",{style:s,role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:t.jsx("div",{style:l})})});function Ee({steps:r}){const i={display:"flex",flexDirection:"column",gap:a[4],fontFamily:n.fontFamily.base};return t.jsx("div",{style:i,children:r.map(o=>{const s=o.status==="pending",l=o.status==="running",c=o.status==="done",g={display:"flex",alignItems:"center",justifyContent:"space-between",opacity:s?.4:1},u={display:"flex",alignItems:"center",gap:a[3]},x={width:"20px",height:"20px",borderRadius:h.full,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:c?e.success:l?e.black:e.borderLight,color:e.white,flexShrink:0};return t.jsxs("div",{style:g,children:[t.jsxs("div",{style:u,children:[t.jsxs("div",{style:x,children:[c&&t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M2.5 7.5L5.5 10.5L11.5 3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),l&&t.jsx("div",{style:{width:6,height:6,backgroundColor:e.white,borderRadius:"50%"}})]}),t.jsx("span",{style:{fontSize:n.size.md,color:e.textPrimary,fontWeight:l?n.weight.semibold:n.weight.normal},children:o.label})]}),o.value&&t.jsx("span",{style:{fontSize:n.size.sm,color:c?e.success:e.textTertiary},children:o.value})]},o.id)})})}function We({checked:r,onChange:i,value:o,name:s,disabled:l=!1,label:c,description:g,id:u}){const[x,d]=m.useState(!1),[f,p]=m.useState(!1),y=m.useId(),w=u||y,b={display:"flex",alignItems:"flex-start",gap:a[3],opacity:l?.5:1,cursor:l?"not-allowed":"pointer",fontFamily:n.fontFamily.base},v={position:"relative",width:"18px",height:"18px",borderRadius:h.full,border:`1px solid ${r?e.black:f&&!l?e.textTertiary:e.borderLight}`,backgroundColor:e.white,transition:"border-color 150ms ease, box-shadow 150ms ease",flexShrink:0,boxShadow:x?F.focus:"none",outline:"none",marginTop:"1px"},S={position:"absolute",top:"50%",left:"50%",transform:`translate(-50%, -50%) scale(${r?1:0})`,width:"10px",height:"10px",borderRadius:h.full,backgroundColor:e.black,transition:"transform 150ms ease"},k={display:"flex",flexDirection:"column",gap:a[1]},z={fontSize:n.size.md,fontWeight:n.weight.medium,color:e.textPrimary,margin:0,cursor:l?"not-allowed":"pointer"},U={fontSize:n.size.sm,color:e.textSecondary,margin:0},O={position:"absolute",opacity:0,width:0,height:0,margin:0};return t.jsxs("label",{style:b,htmlFor:w,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[t.jsxs("div",{style:{position:"relative"},children:[t.jsx("input",{id:w,type:"radio",name:s,value:o,checked:r,disabled:l,onChange:G=>{l||i(G.target.checked)},onFocus:()=>d(!0),onBlur:()=>d(!1),style:O}),t.jsx("div",{style:v,"aria-hidden":"true",children:t.jsx("div",{style:S})})]}),(c||g)&&t.jsxs("div",{style:k,children:[c&&t.jsx("span",{style:z,children:c}),g&&t.jsx("span",{style:U,children:g})]})]})}function He({steps:r,current:i}){const o={display:"flex",justifyContent:"space-between",width:"100%",fontFamily:n.fontFamily.base,position:"relative"},s=32,l={position:"absolute",top:s/2-1,left:s/2,right:s/2,height:2,backgroundColor:e.border,zIndex:1},c={height:"100%",width:`${(Math.min(i,r.length)-1)/(r.length-1)*100}%`,backgroundColor:e.black,transition:"width 300ms ease"};return t.jsxs("div",{style:o,children:[t.jsx("div",{style:l,children:t.jsx("div",{style:c})}),r.map((g,u)=>{const x=u+1,d=x<i,f=x===i,p={width:s,height:s,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:n.size.md,fontWeight:n.weight.semibold,backgroundColor:d||f?e.black:e.white,color:d||f?e.white:e.textTertiary,border:d||f?`2px solid ${e.black}`:`2px solid ${e.border}`,zIndex:2,position:"relative",transition:"all 300ms ease"},y={position:"absolute",top:s+8,left:"50%",transform:"translateX(-50%)",fontSize:n.size.sm,color:f||d?e.textPrimary:e.textTertiary,fontWeight:f?n.weight.semibold:n.weight.normal,whiteSpace:"nowrap"},w={position:"relative",display:"flex",flexDirection:"column",alignItems:"center"};return t.jsxs("div",{style:w,children:[t.jsx("div",{style:p,children:d?t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:t.jsx("path",{d:"M2.5 7.5L5.5 10.5L11.5 3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):x}),t.jsx("span",{style:y,children:g})]},g)})]})}const Pe=m.memo(function({label:i,value:o,highlight:s=!1,color:l}){const c={backgroundColor:s?e.black:e.white,border:s?"none":`1px solid ${e.border}`,borderRadius:h.lg,padding:a[5],display:"flex",flexDirection:"column",gap:a[2],fontFamily:n.fontFamily.base,flex:1,minWidth:0},g={fontSize:n.size.sm,color:s?e.textDisabled:e.textSecondary,fontWeight:n.weight.semibold,textTransform:"uppercase",letterSpacing:"0.05em",margin:0},u={fontSize:n.size["3xl"],fontWeight:n.weight.bold,color:s?e.white:l||e.textPrimary,margin:0,lineHeight:1};return t.jsxs("div",{style:c,children:[t.jsx("p",{style:g,children:i}),t.jsx("p",{style:u,children:o})]})});function Ve({checked:r,onChange:i,disabled:o=!1,label:s,description:l,id:c}){const[g,u]=m.useState(!1),x=m.useId(),d=c||x,f={display:"flex",alignItems:"flex-start",gap:a[3],opacity:o?.5:1,cursor:o?"not-allowed":"pointer",fontFamily:n.fontFamily.base},p={position:"relative",width:"36px",height:"20px",backgroundColor:r?e.black:e.borderLight,borderRadius:h.full,transition:"background-color 200ms ease",flexShrink:0,boxShadow:g?F.focus:"none",outline:"none"},y={position:"absolute",top:"2px",left:r?"calc(100% - 18px)":"2px",width:"16px",height:"16px",backgroundColor:e.white,borderRadius:h.full,transition:"left 200ms ease, transform 200ms ease",boxShadow:F.sm},w={display:"flex",flexDirection:"column",gap:a[1],marginTop:"1px"},b={fontSize:n.size.md,fontWeight:n.weight.medium,color:e.textPrimary,margin:0,cursor:o?"not-allowed":"pointer"},v={fontSize:n.size.sm,color:e.textSecondary,margin:0},S=k=>{(k.key===" "||k.key==="Enter")&&(k.preventDefault(),o||i(!r))};return t.jsxs("label",{style:f,htmlFor:d,onMouseEnter:()=>{},children:[t.jsx("div",{id:d,role:"switch","aria-checked":r,"aria-disabled":o,"aria-labelledby":s||l?`${d}-label`:void 0,tabIndex:o?-1:0,onKeyDown:S,onFocus:()=>u(!0),onBlur:()=>u(!1),onClick:k=>{k.preventDefault(),o||i(!r)},style:p,children:t.jsx("div",{style:y})}),(s||l)&&t.jsxs("div",{style:w,id:`${d}-label`,children:[s&&t.jsx("span",{style:b,children:s}),l&&t.jsx("span",{style:v,children:l})]})]})}const Ue=m.memo(function({value:i,label:o,suffix:s,inverse:l=!1}){const c=i>0,g=i===0;let u=e.textTertiary;g||(c?u=l?e.error:e.success:u=l?e.success:e.error);const x=c?"↑":g?"—":"↓",d=g?"":`${c?"+":""}${i}${s??""}`,f={display:"inline-flex",alignItems:"center",gap:a[1],color:u,fontSize:n.size.sm,fontWeight:n.weight.medium,fontFamily:n.fontFamily.base};return t.jsxs("span",{style:f,children:[t.jsxs("span",{children:[x," ",d]}),o&&t.jsx("span",{style:{color:e.textSecondary,fontWeight:n.weight.normal,marginLeft:a[1]},children:o})]})});function Oe(r=!1){const[i,o]=m.useState(r),s=m.useCallback(()=>o(!0),[]),l=m.useCallback(()=>o(!1),[]),c=m.useCallback(()=>o(g=>!g),[]);return{isOpen:i,open:s,close:l,toggle:c}}function Ge(r,i){const[o,s]=m.useState(()=>{if(typeof window>"u")return i;try{const c=window.localStorage.getItem(r);return c?JSON.parse(c):i}catch{return i}}),l=m.useCallback(c=>{s(g=>{const u=c instanceof Function?c(g):c;try{window.localStorage.setItem(r,JSON.stringify(u))}catch{}return u})},[r]);return[o,l]}function Ne(...r){return r.filter(Boolean).join(" ")}exports.ActionList=Ce;exports.AlertIcon=P;exports.ArrowDownIcon=ye;exports.ArrowLeftIcon=pe;exports.ArrowRightIcon=fe;exports.ArrowUpIcon=he;exports.Badge=R;exports.Button=A;exports.Card=K;exports.CheckIcon=W;exports.CheckRow=je;exports.ChevronDownIcon=we;exports.ChevronLeftIcon=be;exports.ChevronRightIcon=me;exports.ChevronUpIcon=Se;exports.CodeChip=B;exports.DataTable=ee;exports.DiffRow=$e;exports.DownloadIcon=xe;exports.InfoIcon=C;exports.Input=te;exports.IssueCard=V;exports.IssueGroup=Le;exports.LockIcon=E;exports.MenuIcon=ae;exports.MiniStat=De;exports.Modal=ie;exports.ModelTag=Ae;exports.PageHeader=ze;exports.PlayIcon=ce;exports.ProgressBar=Re;exports.ProgressList=Ee;exports.Radio=We;exports.ScoreBar=oe;exports.SearchIcon=le;exports.SectionLabel=Q;exports.SettingsIcon=ge;exports.StarIcon=de;exports.StatGrid=J;exports.StatusDot=Fe;exports.StepBar=He;exports.SummaryCard=Pe;exports.Switch=Ve;exports.TabBar=Z;exports.Toast=Me;exports.ToggleGroup=se;exports.Trend=Ue;exports.UploadIcon=ue;exports.XIcon=H;exports.colors=e;exports.cx=Ne;exports.radii=h;exports.shadows=F;exports.spacing=a;exports.typography=n;exports.useLocalStorage=Ge;exports.useModal=Oe;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|