@umituz/atomic-next 1.8.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,3 +1,2609 @@
1
- "use client";
2
- var m={primary:"#9333EA",primaryLight:"#A855F7",primaryDark:"#7C3AED",secondary:"#EC4899",secondaryLight:"#F472B6",secondaryDark:"#DB2777",accent:"#F59E0B",accentLight:"#FBBF24",accentDark:"#D97706",gray50:"#FAFAFA",gray100:"#F4F4F5",gray200:"#E4E4E7",gray300:"#D4D4D8",gray400:"#A1A1AA",gray500:"#71717A",gray600:"#52525B",gray700:"#3F3F46",gray800:"#27272A",gray900:"#18181B",success:"#10B981",successLight:"#34D399",successDark:"#059669",warning:"#F59E0B",warningLight:"#FBBF24",warningDark:"#D97706",error:"#EF4444",errorLight:"#F87171",errorDark:"#DC2626",info:"#3B82F6",infoLight:"#60A5FA",infoDark:"#2563EB",background:"#FFFFFF",backgroundSecondary:"#F9FAFB",surface:"#FFFFFF",surfaceSecondary:"#F3F4F6",textPrimary:"#18181B",textSecondary:"#52525B",textTertiary:"#A1A1AA",textDisabled:"#D4D4D8",textInverse:"#FFFFFF"},se={"--atomic-primary":m.primary,"--atomic-primary-light":m.primaryLight,"--atomic-primary-dark":m.primaryDark,"--atomic-secondary":m.secondary,"--atomic-secondary-light":m.secondaryLight,"--atomic-secondary-dark":m.secondaryDark,"--atomic-accent":m.accent,"--atomic-accent-light":m.accentLight,"--atomic-accent-dark":m.accentDark,"--atomic-gray-50":m.gray50,"--atomic-gray-100":m.gray100,"--atomic-gray-200":m.gray200,"--atomic-gray-300":m.gray300,"--atomic-gray-400":m.gray400,"--atomic-gray-500":m.gray500,"--atomic-gray-600":m.gray600,"--atomic-gray-700":m.gray700,"--atomic-gray-800":m.gray800,"--atomic-gray-900":m.gray900,"--atomic-success":m.success,"--atomic-success-light":m.successLight,"--atomic-success-dark":m.successDark,"--atomic-warning":m.warning,"--atomic-warning-light":m.warningLight,"--atomic-warning-dark":m.warningDark,"--atomic-error":m.error,"--atomic-error-light":m.errorLight,"--atomic-error-dark":m.errorDark,"--atomic-info":m.info,"--atomic-info-light":m.infoLight,"--atomic-info-dark":m.infoDark,"--atomic-background":m.background,"--atomic-background-secondary":m.backgroundSecondary,"--atomic-surface":m.surface,"--atomic-surface-secondary":m.surfaceSecondary,"--atomic-text-primary":m.textPrimary,"--atomic-text-secondary":m.textSecondary,"--atomic-text-tertiary":m.textTertiary,"--atomic-text-disabled":m.textDisabled,"--atomic-text-inverse":m.textInverse};var k={unit:8,xxs:4,xs:8,sm:12,md:16,lg:24,xl:32,xxl:40,xxxl:48,huge:64,buttonPaddingX:16,buttonPaddingY:12,cardPadding:24,cardMargin:16,listItemPadding:16,listItemSpacing:8,inputPaddingX:16,inputPaddingY:12,modalPadding:24,sectionPadding:32},le={"--atomic-spacing-unit":`${k.unit}px`,"--atomic-spacing-xxs":`${k.xxs}px`,"--atomic-spacing-xs":`${k.xs}px`,"--atomic-spacing-sm":`${k.sm}px`,"--atomic-spacing-md":`${k.md}px`,"--atomic-spacing-lg":`${k.lg}px`,"--atomic-spacing-xl":`${k.xl}px`,"--atomic-spacing-xxl":`${k.xxl}px`,"--atomic-spacing-xxxl":`${k.xxxl}px`,"--atomic-spacing-huge":`${k.huge}px`,"--atomic-button-padding-x":`${k.buttonPaddingX}px`,"--atomic-button-padding-y":`${k.buttonPaddingY}px`,"--atomic-card-padding":`${k.cardPadding}px`,"--atomic-card-margin":`${k.cardMargin}px`,"--atomic-list-item-padding":`${k.listItemPadding}px`,"--atomic-list-item-spacing":`${k.listItemSpacing}px`,"--atomic-input-padding-x":`${k.inputPaddingX}px`,"--atomic-input-padding-y":`${k.inputPaddingY}px`,"--atomic-modal-padding":`${k.modalPadding}px`,"--atomic-section-padding":`${k.sectionPadding}px`};var p={fontFamily:{sans:["Inter","system-ui","-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","sans-serif"],serif:["Charter","Georgia","Cambria","Times New Roman","Times","serif"],mono:["JetBrains Mono","Fira Code","Consolas","Monaco","Courier New","monospace"]},fontWeight:{thin:100,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fontSize:{displayLarge:57,displayMedium:45,displaySmall:36,headlineLarge:32,headlineMedium:28,headlineSmall:24,titleLarge:22,titleMedium:16,titleSmall:14,bodyLarge:16,bodyMedium:14,bodySmall:12,labelLarge:14,labelMedium:12,labelSmall:11},lineHeight:{none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"}},ce={"--atomic-font-sans":p.fontFamily.sans.join(", "),"--atomic-font-serif":p.fontFamily.serif.join(", "),"--atomic-font-mono":p.fontFamily.mono.join(", "),"--atomic-font-thin":p.fontWeight.thin.toString(),"--atomic-font-light":p.fontWeight.light.toString(),"--atomic-font-regular":p.fontWeight.regular.toString(),"--atomic-font-medium":p.fontWeight.medium.toString(),"--atomic-font-semibold":p.fontWeight.semibold.toString(),"--atomic-font-bold":p.fontWeight.bold.toString(),"--atomic-font-extrabold":p.fontWeight.extrabold.toString(),"--atomic-font-black":p.fontWeight.black.toString(),"--atomic-text-display-large":`${p.fontSize.displayLarge}px`,"--atomic-text-display-medium":`${p.fontSize.displayMedium}px`,"--atomic-text-display-small":`${p.fontSize.displaySmall}px`,"--atomic-text-headline-large":`${p.fontSize.headlineLarge}px`,"--atomic-text-headline-medium":`${p.fontSize.headlineMedium}px`,"--atomic-text-headline-small":`${p.fontSize.headlineSmall}px`,"--atomic-text-title-large":`${p.fontSize.titleLarge}px`,"--atomic-text-title-medium":`${p.fontSize.titleMedium}px`,"--atomic-text-title-small":`${p.fontSize.titleSmall}px`,"--atomic-text-body-large":`${p.fontSize.bodyLarge}px`,"--atomic-text-body-medium":`${p.fontSize.bodyMedium}px`,"--atomic-text-body-small":`${p.fontSize.bodySmall}px`,"--atomic-text-label-large":`${p.fontSize.labelLarge}px`,"--atomic-text-label-medium":`${p.fontSize.labelMedium}px`,"--atomic-text-label-small":`${p.fontSize.labelSmall}px`,"--atomic-leading-none":p.lineHeight.none.toString(),"--atomic-leading-tight":p.lineHeight.tight.toString(),"--atomic-leading-snug":p.lineHeight.snug.toString(),"--atomic-leading-normal":p.lineHeight.normal.toString(),"--atomic-leading-relaxed":p.lineHeight.relaxed.toString(),"--atomic-leading-loose":p.lineHeight.loose.toString(),"--atomic-tracking-tighter":p.letterSpacing.tighter,"--atomic-tracking-tight":p.letterSpacing.tight,"--atomic-tracking-normal":p.letterSpacing.normal,"--atomic-tracking-wide":p.letterSpacing.wide,"--atomic-tracking-wider":p.letterSpacing.wider,"--atomic-tracking-widest":p.letterSpacing.widest};var w={none:"none",xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",xxl:"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",focusPrimary:"0 0 0 3px rgb(139 92 246 / 0.2)",focusSecondary:"0 0 0 3px rgb(236 72 153 / 0.2)",focusSuccess:"0 0 0 3px rgb(16 185 129 / 0.2)",focusWarning:"0 0 0 3px rgb(245 158 11 / 0.2)",focusError:"0 0 0 3px rgb(239 68 68 / 0.2)",focusInfo:"0 0 0 3px rgb(59 130 246 / 0.2)",glowPrimary:"0 0 20px rgb(139 92 246 / 0.3)",glowSecondary:"0 0 20px rgb(236 72 153 / 0.3)",glowSuccess:"0 0 20px rgb(16 185 129 / 0.3)",glowWarning:"0 0 20px rgb(245 158 11 / 0.3)",glowError:"0 0 20px rgb(239 68 68 / 0.3)",card:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",cardHover:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",button:"0 1px 2px 0 rgb(0 0 0 / 0.05)",buttonHover:"0 2px 4px 0 rgb(0 0 0 / 0.1)",modal:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",dropdown:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",tooltip:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"},Ft={get:e=>w[e],custom:(e,r,t,a=0,o="0 0 0",n=.1)=>`${e}px ${r}px ${t}px ${a}px rgb(${o} / ${n})`,combine:(...e)=>e.map(r=>w[r]).join(", "),focus:(e="139 92 246",r=.2)=>`0 0 0 3px rgb(${e} / ${r})`,glow:(e=20,r="139 92 246",t=.3)=>`0 0 ${e}px rgb(${r} / ${t})`},de={"--atomic-shadow-none":w.none,"--atomic-shadow-xs":w.xs,"--atomic-shadow-sm":w.sm,"--atomic-shadow-md":w.md,"--atomic-shadow-lg":w.lg,"--atomic-shadow-xl":w.xl,"--atomic-shadow-xxl":w.xxl,"--atomic-shadow-inner":w.inner,"--atomic-shadow-focus-primary":w.focusPrimary,"--atomic-shadow-focus-secondary":w.focusSecondary,"--atomic-shadow-focus-success":w.focusSuccess,"--atomic-shadow-focus-warning":w.focusWarning,"--atomic-shadow-focus-error":w.focusError,"--atomic-shadow-focus-info":w.focusInfo,"--atomic-shadow-glow-primary":w.glowPrimary,"--atomic-shadow-glow-secondary":w.glowSecondary,"--atomic-shadow-glow-success":w.glowSuccess,"--atomic-shadow-glow-warning":w.glowWarning,"--atomic-shadow-glow-error":w.glowError,"--atomic-shadow-card":w.card,"--atomic-shadow-card-hover":w.cardHover,"--atomic-shadow-button":w.button,"--atomic-shadow-button-hover":w.buttonHover,"--atomic-shadow-modal":w.modal,"--atomic-shadow-dropdown":w.dropdown,"--atomic-shadow-tooltip":w.tooltip};var f={radius:{none:"0px",xs:"2px",sm:"4px",md:"6px",lg:"8px",xl:"12px",xxl:"16px",xxxl:"24px",full:"9999px"},width:{none:"0px",thin:"1px",medium:"2px",thick:"4px",thicker:"8px"},style:{solid:"solid",dashed:"dashed",dotted:"dotted",double:"double",none:"none"}},j={radius:e=>f.radius[e],width:e=>f.width[e],style:e=>f.style[e],border:e=>{let r=e.width?f.width[e.width]:f.width.thin,t=e.style?f.style[e.style]:f.style.solid,a=e.color||"currentColor";return`${r} ${t} ${a}`},radiusCorners:{all:e=>({borderRadius:f.radius[e]}),top:e=>({borderTopLeftRadius:f.radius[e],borderTopRightRadius:f.radius[e]}),right:e=>({borderTopRightRadius:f.radius[e],borderBottomRightRadius:f.radius[e]}),bottom:e=>({borderBottomLeftRadius:f.radius[e],borderBottomRightRadius:f.radius[e]}),left:e=>({borderTopLeftRadius:f.radius[e],borderBottomLeftRadius:f.radius[e]}),topLeft:e=>({borderTopLeftRadius:f.radius[e]}),topRight:e=>({borderTopRightRadius:f.radius[e]}),bottomRight:e=>({borderBottomRightRadius:f.radius[e]}),bottomLeft:e=>({borderBottomLeftRadius:f.radius[e]})},borderSides:{all:e=>({border:j.border(e)}),top:e=>({borderTop:j.border(e)}),right:e=>({borderRight:j.border(e)}),bottom:e=>({borderBottom:j.border(e)}),left:e=>({borderLeft:j.border(e)})}},me={"--atomic-radius-none":f.radius.none,"--atomic-radius-xs":f.radius.xs,"--atomic-radius-sm":f.radius.sm,"--atomic-radius-md":f.radius.md,"--atomic-radius-lg":f.radius.lg,"--atomic-radius-xl":f.radius.xl,"--atomic-radius-xxl":f.radius.xxl,"--atomic-radius-xxxl":f.radius.xxxl,"--atomic-radius-full":f.radius.full,"--atomic-border-none":f.width.none,"--atomic-border-thin":f.width.thin,"--atomic-border-medium":f.width.medium,"--atomic-border-thick":f.width.thick,"--atomic-border-thicker":f.width.thicker};var x={duration:{instant:"0ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"500ms",slowest:"700ms"},easing:{linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",smooth:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",snappy:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",bounce:"cubic-bezier(0.68, -0.6, 0.32, 1.6)",elastic:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",standard:"cubic-bezier(0.4, 0, 0.2, 1)",decelerate:"cubic-bezier(0, 0, 0.2, 1)",accelerate:"cubic-bezier(0.4, 0, 1, 1)"},scale:{none:"1",xs:"1.025",sm:"1.05",md:"1.1",lg:"1.15",xl:"1.25"},rotate:{none:"0deg",quarter:"90deg",half:"180deg",threeQuarter:"270deg",full:"360deg"}},N={transition:e=>{let r=Array.isArray(e.property)?e.property.join(", "):e.property||"all",t=e.duration?x.duration[e.duration]:x.duration.normal,a=e.easing?x.easing[e.easing]:x.easing.easeInOut,o=e.delay?x.duration[e.delay]:"0ms";return{transition:`${r} ${t} ${a} ${o}`}},transform:e=>{let r=[];return e.scale&&r.push(`scale(${x.scale[e.scale]})`),e.rotate&&r.push(`rotate(${x.rotate[e.rotate]})`),e.translateX&&r.push(`translateX(${e.translateX})`),e.translateY&&r.push(`translateY(${e.translateY})`),e.translateZ&&r.push(`translateZ(${e.translateZ})`),{transform:r.join(" ")||"none"}},duration:e=>x.duration[e],easing:e=>x.easing[e],keyframes:(e,r)=>{let t=Object.entries(r).map(([a,o])=>{let n=Object.entries(o).map(([s,d])=>`${s}: ${d};`).join(" ");return`${a} { ${n} }`}).join(" ");return`@keyframes ${e} { ${t} }`}},Ht={fadeIn:N.transition({property:"opacity",duration:"normal",easing:"easeOut"}),fadeOut:N.transition({property:"opacity",duration:"fast",easing:"easeIn"}),scaleIn:{...N.transition({property:"transform",duration:"normal",easing:"smooth"}),transform:"scale(1)"},scaleOut:{...N.transition({property:"transform",duration:"fast",easing:"easeIn"}),transform:"scale(0.95)"},slideInUp:{...N.transition({property:"transform",duration:"normal",easing:"smooth"}),transform:"translateY(0)"},slideInDown:{...N.transition({property:"transform",duration:"normal",easing:"smooth"}),transform:"translateY(0)"},buttonHover:{...N.transition({property:["background-color","border-color","color","box-shadow","transform"],duration:"fast",easing:"easeOut"}),transform:"translateY(-1px)"},buttonPress:{...N.transition({property:"transform",duration:"fast",easing:"easeIn"}),transform:"translateY(0)"},spin:{animation:"spin 1s linear infinite"},pulse:{animation:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"},bounce:{animation:"bounce 1s infinite"}},pe={"--atomic-duration-instant":x.duration.instant,"--atomic-duration-fast":x.duration.fast,"--atomic-duration-normal":x.duration.normal,"--atomic-duration-slow":x.duration.slow,"--atomic-duration-slower":x.duration.slower,"--atomic-duration-slowest":x.duration.slowest,"--atomic-ease-linear":x.easing.linear,"--atomic-ease":x.easing.ease,"--atomic-ease-in":x.easing.easeIn,"--atomic-ease-out":x.easing.easeOut,"--atomic-ease-in-out":x.easing.easeInOut,"--atomic-ease-smooth":x.easing.smooth,"--atomic-ease-snappy":x.easing.snappy,"--atomic-ease-bounce":x.easing.bounce,"--atomic-ease-elastic":x.easing.elastic,"--atomic-ease-standard":x.easing.standard,"--atomic-ease-decelerate":x.easing.decelerate,"--atomic-ease-accelerate":x.easing.accelerate,"--atomic-scale-none":x.scale.none,"--atomic-scale-xs":x.scale.xs,"--atomic-scale-sm":x.scale.sm,"--atomic-scale-md":x.scale.md,"--atomic-scale-lg":x.scale.lg,"--atomic-scale-xl":x.scale.xl};var ke=(n=>(n.XS="xs",n.SM="sm",n.MD="md",n.LG="lg",n.XL="xl",n))(ke||{}),Se=(d=>(d.PRIMARY="primary",d.SECONDARY="secondary",d.SUCCESS="success",d.WARNING="warning",d.ERROR="error",d.INFO="info",d.GRAY="gray",d))(Se||{}),Te=(s=>(s.PRIMARY="primary",s.SECONDARY="secondary",s.OUTLINE="outline",s.GHOST="ghost",s.LINK="link",s.DESTRUCTIVE="destructive",s))(Te||{}),Ce=(o=>(o.DEFAULT="default",o.FILLED="filled",o.OUTLINE="outline",o.UNDERLINED="underlined",o))(Ce||{}),Re=(o=>(o.DEFAULT="default",o.ELEVATED="elevated",o.OUTLINED="outlined",o.FILLED="filled",o))(Re||{}),Le=(o=>(o.IDLE="idle",o.LOADING="loading",o.SUCCESS="success",o.ERROR="error",o))(Le||{}),$e=(n=>(n.ACTIVE="active",n.INACTIVE="inactive",n.PENDING="pending",n.DISABLED="disabled",n.ARCHIVED="archived",n))($e||{}),Pe=(o=>(o.INFO="info",o.SUCCESS="success",o.WARNING="warning",o.ERROR="error",o))(Pe||{}),Ee=(n=>(n.SM="sm",n.MD="md",n.LG="lg",n.XL="xl",n.FULL="full",n))(Ee||{}),Ne=(c=>(c.DISPLAY_LARGE="displayLarge",c.DISPLAY_MEDIUM="displayMedium",c.DISPLAY_SMALL="displaySmall",c.HEADLINE_LARGE="headlineLarge",c.HEADLINE_MEDIUM="headlineMedium",c.HEADLINE_SMALL="headlineSmall",c.TITLE_LARGE="titleLarge",c.TITLE_MEDIUM="titleMedium",c.TITLE_SMALL="titleSmall",c.BODY_LARGE="bodyLarge",c.BODY_MEDIUM="bodyMedium",c.BODY_SMALL="bodySmall",c.LABEL_LARGE="labelLarge",c.LABEL_MEDIUM="labelMedium",c.LABEL_SMALL="labelSmall",c))(Ne||{}),Ie=(l=>(l.TOP="top",l.TOP_LEFT="top-left",l.TOP_RIGHT="top-right",l.BOTTOM="bottom",l.BOTTOM_LEFT="bottom-left",l.BOTTOM_RIGHT="bottom-right",l.LEFT="left",l.RIGHT="right",l.CENTER="center",l))(Ie||{}),Me=(o=>(o.LEFT="left",o.CENTER="center",o.RIGHT="right",o.JUSTIFY="justify",o))(Me||{}),Be=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))(Be||{}),Ve=(o=>(o.UP="up",o.DOWN="down",o.LEFT="left",o.RIGHT="right",o))(Ve||{}),De=(a=>(a.ENTER="enter",a.EXIT="exit",a.IDLE="idle",a))(De||{}),ze=(n=>(n.DEFAULT="default",n.FOCUS="focus",n.ERROR="error",n.SUCCESS="success",n.DISABLED="disabled",n))(ze||{}),Fe=(s=>(s.XS="xs",s.SM="sm",s.MD="md",s.LG="lg",s.XL="xl",s.XXL="xxl",s))(Fe||{}),He=(a=>(a.LIGHT="light",a.DARK="dark",a.SYSTEM="system",a))(He||{}),Ot={getValues:e=>Object.values(e),getKeys:e=>Object.keys(e),hasValue:(e,r)=>Object.values(e).includes(r),hasKey:(e,r)=>Object.keys(e).includes(r),getEntries:e=>Object.entries(e)};var Xr={...se,...le,...ce,...de,...me,...pe};import{clsx as jt}from"clsx";import{twMerge as Gt}from"tailwind-merge";function i(...e){return Gt(jt(e))}import Ut from"react";import{Slot as Wt}from"@radix-ui/react-slot";import{cva as Yt}from"class-variance-authority";import{Loader2 as _t}from"lucide-react";import{jsx as ue,jsxs as Xt}from"react/jsx-runtime";var Oe=Yt("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-gray-900 text-white hover:bg-gray-800 dark:bg-white dark:text-gray-900 dark:hover:bg-gray-100",primary:"bg-[--atomic-primary] text-white hover:bg-[--atomic-primary-dark] transition-all duration-200",brand:"text-white hover:shadow-xl transition-all duration-200",destructive:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600",outline:"border border-gray-300 bg-transparent hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800",secondary:"bg-gray-100 text-gray-900 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-100 dark:hover:bg-gray-700",ghost:"bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800",link:"bg-transparent text-blue-600 underline-offset-4 hover:underline dark:text-blue-400"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),je=Ut.forwardRef(({className:e,variant:r,size:t,asChild:a=!1,loading:o=!1,leftIcon:n,rightIcon:s,fullWidth:d=!1,disabled:u,children:l,...y},b)=>{let A=a?Wt:"button",g=u||o;return Xt(A,{className:i(Oe({variant:r,size:t}),d&&"w-full",e),style:{...r==="brand"&&{background:"linear-gradient(to right, var(--atomic-primary), var(--atomic-secondary))"},...y.style},ref:b,disabled:g,...y,children:[o&&ue(_t,{className:i("animate-spin",t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",(n||l)&&"mr-2")}),!o&&n&&ue("span",{className:i("inline-flex items-center",t==="sm"?"mr-1":"mr-2",t==="sm"?"[&>*]:h-3 [&>*]:w-3":t==="lg"?"[&>*]:h-5 [&>*]:w-5":"[&>*]:h-4 [&>*]:w-4"),children:n}),l,!o&&s&&ue("span",{className:i("inline-flex items-center",t==="sm"?"ml-1":"ml-2",t==="sm"?"[&>*]:h-3 [&>*]:w-3":t==="lg"?"[&>*]:h-5 [&>*]:w-5":"[&>*]:h-4 [&>*]:w-4"),children:s})]})});je.displayName="AtomicButton";import qt from"react";import{Slot as Kt}from"@radix-ui/react-slot";import{cva as Jt}from"class-variance-authority";import{jsx as Zt}from"react/jsx-runtime";var Ge=Jt("",{variants:{variant:{h1:"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-semibold tracking-tight lg:text-4xl",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold tracking-tight",h5:"scroll-m-20 text-lg font-semibold tracking-tight",h6:"scroll-m-20 text-base font-semibold tracking-tight",body:"text-base leading-7",large:"text-lg leading-7",small:"text-sm leading-6",xs:"text-xs leading-5",lead:"text-xl leading-7 text-muted-foreground",muted:"text-sm text-muted-foreground",caption:"text-xs text-muted-foreground",label:"text-sm font-medium leading-none"},color:{default:"text-foreground",primary:"text-primary",secondary:"text-secondary-foreground",muted:"text-muted-foreground",success:"text-green-600 dark:text-green-400",warning:"text-amber-600 dark:text-amber-400",error:"text-red-600 dark:text-red-400",info:"text-blue-600 dark:text-blue-400"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},weight:{thin:"font-thin",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"}},defaultVariants:{variant:"body",color:"default",align:"left"}}),Ue=qt.forwardRef(({className:e,variant:r,color:t,align:a,weight:o,as:n="p",asChild:s=!1,truncate:d=!1,selectable:u=!0,...l},y)=>{let b=s?Kt:n,A=n;return!s&&n==="p"&&(r==="h1"||r==="h2"||r==="h3"||r==="h4"||r==="h5"||r==="h6"?A=r:r==="label"&&(A="label")),Zt(s?b:A,{className:i(Ge({variant:r,color:t||"default",align:a,weight:o}),d&&"truncate",!u&&"select-none",e),ref:y,...l})});Ue.displayName="AtomicText";import ge from"react";import*as M from"@radix-ui/react-avatar";import{cva as fe}from"class-variance-authority";import{jsx as q,jsxs as We}from"react/jsx-runtime";var Ye=fe("relative flex shrink-0 overflow-hidden rounded-full",{variants:{size:{xs:"h-6 w-6",sm:"h-8 w-8",default:"h-10 w-10",lg:"h-12 w-12",xl:"h-16 w-16",xxl:"h-20 w-20",xxxl:"h-24 w-24"}},defaultVariants:{size:"default"}}),xe=fe("aspect-square h-full w-full object-cover"),ye=fe("flex h-full w-full items-center justify-center rounded-full bg-muted font-medium text-muted-foreground",{variants:{size:{xs:"text-xs",sm:"text-xs",default:"text-sm",lg:"text-base",xl:"text-lg",xxl:"text-xl",xxxl:"text-2xl"}},defaultVariants:{size:"default"}}),_e=ge.forwardRef(({className:e,size:r,src:t,alt:a,fallback:o,fallbackElement:n,showStatus:s=!1,isOnline:d=!1,statusColor:u,...l},y)=>{let A=o||(h=>h?h.split(" ").map(c=>c.charAt(0)).join("").slice(0,2).toUpperCase():"?")(a),g={xs:"h-1.5 w-1.5",sm:"h-2 w-2",default:"h-2.5 w-2.5",lg:"h-3 w-3",xl:"h-4 w-4",xxl:"h-4 w-4",xxxl:"h-5 w-5"}[r||"default"];return We("div",{className:"relative",children:[We(M.Root,{ref:y,className:i(Ye({size:r}),e),...l,children:[q(M.Image,{className:xe(),src:t,alt:a}),q(M.Fallback,{className:ye({size:r}),children:n||A})]}),s&&q("div",{className:i("absolute bottom-0 right-0 rounded-full border-2 border-background",g,u?"":d?"bg-green-500":"bg-gray-400"),style:u?{backgroundColor:u}:void 0})]})});_e.displayName="AtomicAvatar";var Xe=ge.forwardRef(({className:e,...r},t)=>q(M.Image,{ref:t,className:i(xe(),e),...r}));Xe.displayName="AtomicAvatarImage";var qe=ge.forwardRef(({className:e,size:r,...t},a)=>q(M.Fallback,{ref:a,className:i(ye({size:r}),e),...t}));qe.displayName="AtomicAvatarFallback";import Qt from"next/image";import{cva as er}from"class-variance-authority";import tr from"react";import{jsx as Ke}from"react/jsx-runtime";var be=er("transition-all duration-200",{variants:{rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"},aspectRatio:{square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]",landscape:"aspect-[4/3]",auto:""},objectFit:{cover:"object-cover",contain:"object-contain",fill:"object-fill","scale-down":"object-scale-down",none:"object-none"},objectPosition:{center:"object-center",top:"object-top",bottom:"object-bottom",left:"object-left",right:"object-right","top-left":"object-left-top","top-right":"object-right-top","bottom-left":"object-left-bottom","bottom-right":"object-right-bottom"}},defaultVariants:{rounded:"none",aspectRatio:"auto",objectFit:"cover",objectPosition:"center"}}),Je=tr.forwardRef(({className:e,containerClassName:r,rounded:t,aspectRatio:a,objectFit:o,objectPosition:n,enableBlur:s=!1,placeholderSrc:d,...u},l)=>Ke("div",{className:i("relative overflow-hidden",a&&be({aspectRatio:a}),r),children:Ke(Qt,{ref:l,className:i(be({rounded:t,objectFit:o,objectPosition:n,aspectRatio:void 0}),e),placeholder:s||d?"blur":"empty",blurDataURL:d,...u})}));Je.displayName="AtomicImage";import he from"react";import{cva as rr}from"class-variance-authority";import{Eye as or,EyeOff as ar,X as nr}from"lucide-react";import{jsx as $,jsxs as we}from"react/jsx-runtime";var Ze=rr("flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"",filled:"bg-secondary border-transparent",outline:"bg-transparent border-2",underlined:"rounded-none border-0 border-b-2 px-0"},size:{sm:"h-8 px-2 text-xs",default:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"},state:{default:"",error:"border-destructive focus-visible:ring-destructive",success:"border-green-500 focus-visible:ring-green-500",warning:"border-amber-500 focus-visible:ring-amber-500"}},defaultVariants:{variant:"default",size:"default",state:"default"}}),Qe=he.forwardRef(({className:e,variant:r,size:t,state:a,type:o="text",leftIcon:n,rightIcon:s,label:d,helperText:u,error:l,success:y,warning:b,clearable:A=!1,onClear:g,showPasswordToggle:h=!1,containerClassName:c,labelClassName:v,helperClassName:C,value:R,onChange:L,disabled:S,...T},P)=>{let[E,B]=he.useState(!1),[F,X]=he.useState(R||""),V=a;l?V="error":y?V="success":b&&(V="warning");let Z=o;o==="password"&&h&&(Z=E?"text":"password");let oe=(R||F)&&String(R||F).length>0,H=A&&oe&&!S,O=h&&o==="password"&&!S,ae=ie=>{X(ie.target.value),L?.(ie)},ne=()=>{X(""),g?.(),L?.({target:{value:""},currentTarget:{value:""}})},ve=l||y||b||u,zt=l?"text-destructive":y?"text-green-600 dark:text-green-400":b?"text-amber-600 dark:text-amber-400":"text-muted-foreground";return we("div",{className:i("space-y-2",c),children:[d&&$("label",{className:i("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",S&&"opacity-50",v),children:d}),we("div",{className:"relative",children:[n&&$("div",{className:i("absolute left-0 top-0 h-full flex items-center justify-center",t==="sm"?"w-8 pl-2":t==="lg"?"w-12 pl-4":"w-10 pl-3","text-muted-foreground pointer-events-none","[&>*]:h-4 [&>*]:w-4"),children:n}),$("input",{type:Z,className:i(Ze({variant:r,size:t,state:V}),n&&(t==="sm"?"pl-8":t==="lg"?"pl-12":"pl-10"),(s||H||O)&&(t==="sm"?"pr-8":t==="lg"?"pr-12":"pr-10"),e),ref:P,value:R!==void 0?R:F,onChange:ae,disabled:S,...T}),(s||H||O)&&we("div",{className:i("absolute right-0 top-0 h-full flex items-center justify-center gap-1",t==="sm"?"w-8 pr-2":t==="lg"?"w-12 pr-4":"w-10 pr-3"),children:[s&&!H&&!O&&$("div",{className:"text-muted-foreground [&>*]:h-4 [&>*]:w-4",children:s}),H&&$("button",{type:"button",onClick:ne,className:"text-muted-foreground hover:text-foreground transition-colors [&>*]:h-4 [&>*]:w-4",tabIndex:-1,children:$(nr,{})}),O&&$("button",{type:"button",onClick:()=>B(!E),className:"text-muted-foreground hover:text-foreground transition-colors [&>*]:h-4 [&>*]:w-4",tabIndex:-1,children:E?$(ar,{}):$(or,{})})]})]}),ve&&$("p",{className:i("text-xs",zt,C),children:ve})]})});Qe.displayName="AtomicInput";import Q from"react";import{cva as ir}from"class-variance-authority";import{Loader2 as sr}from"lucide-react";import{jsx as G,jsxs as lr}from"react/jsx-runtime";var et=ir("animate-spin",{variants:{size:{xs:"h-3 w-3",sm:"h-4 w-4",default:"h-5 w-5",lg:"h-6 w-6",xl:"h-8 w-8",xxl:"h-12 w-12"},color:{default:"text-foreground",primary:"text-primary",secondary:"text-secondary-foreground",muted:"text-muted-foreground",white:"text-white",success:"text-green-600",warning:"text-amber-600",error:"text-red-600"}},defaultVariants:{size:"default",color:"default"}}),K=Q.forwardRef(({className:e,size:r,color:t,label:a,inline:o=!1,icon:n=sr,...s},d)=>{let u=G(n,{ref:d,className:i(et({size:r,color:t}),e),...s});return a?lr("div",{className:i("flex items-center gap-2",o?"inline-flex":"flex"),children:[u,G("span",{className:i("text-sm",t==="muted"?"text-muted-foreground":t==="white"?"text-white":t==="primary"?"text-primary":"text-foreground"),children:a})]}):u});K.displayName="AtomicSpinner";var tt=Q.forwardRef(({className:e,...r},t)=>G(K,{ref:t,size:"sm",color:"white",className:i("mr-2",e),...r}));tt.displayName="AtomicButtonSpinner";var rt=Q.forwardRef(({className:e,...r},t)=>G("div",{className:"flex items-center justify-center p-8",children:G(K,{ref:t,size:"lg",className:e,...r})}));rt.displayName="AtomicPageSpinner";var ot=Q.forwardRef(({className:e,...r},t)=>G(K,{ref:t,inline:!0,size:"sm",color:"muted",className:e,...r}));ot.displayName="AtomicInlineSpinner";import Ae from"react";import{cva as cr}from"class-variance-authority";import{jsx as I,jsxs as at}from"react/jsx-runtime";var nt=cr("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border-current",success:"border-transparent bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-400",warning:"border-transparent bg-amber-100 text-amber-800 dark:bg-amber-900/20 dark:text-amber-400",info:"border-transparent bg-blue-100 text-blue-800 dark:bg-blue-900/20 dark:text-blue-400",gray:"border-transparent bg-gray-100 text-gray-800 dark:bg-gray-900/20 dark:text-gray-400"},size:{sm:"px-2 py-0.5 text-xs",default:"px-2.5 py-0.5 text-xs",lg:"px-3 py-1 text-sm"},shape:{default:"rounded-full",rounded:"rounded-md",square:"rounded-none"}},defaultVariants:{variant:"default",size:"default",shape:"default"}}),ee=Ae.forwardRef(({className:e,variant:r,size:t,shape:a,leftIcon:o,rightIcon:n,dot:s=!1,dotColor:d,removable:u=!1,onRemove:l,removeIcon:y,children:b,...A},g)=>{let h=t==="sm"?"h-3 w-3":t==="lg"?"h-4 w-4":"h-3.5 w-3.5",c=t==="sm"?"h-1.5 w-1.5":t==="lg"?"h-2.5 w-2.5":"h-2 w-2";return at("div",{ref:g,className:i(nt({variant:r,size:t,shape:a}),e),...A,children:[s&&I("span",{className:i("mr-1.5 rounded-full",c,!d&&(r==="success"?"bg-green-600":r==="warning"?"bg-amber-600":r==="info"?"bg-blue-600":r==="destructive"?"bg-red-600":r==="gray"?"bg-gray-600":"bg-current")),style:d?{backgroundColor:d}:void 0}),o&&I("span",{className:i("mr-1 flex items-center",`[&>*]:${h}`),children:o}),b,n&&!u&&I("span",{className:i("ml-1 flex items-center",`[&>*]:${h}`),children:n}),u&&I("button",{type:"button",onClick:l,className:i("ml-1 flex items-center rounded-full hover:bg-black/10 dark:hover:bg-white/10","transition-colors focus:outline-none focus:ring-1 focus:ring-current",t==="sm"?"p-0.5":"p-1"),children:y?I("span",{className:i("flex items-center",`[&>*]:${h}`),children:y}):at("svg",{className:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[I("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})});ee.displayName="AtomicBadge";var it=Ae.forwardRef(({status:e,variant:r,...t},a)=>{let n={online:{variant:"success",dot:!0,children:"Online"},offline:{variant:"gray",dot:!0,children:"Offline"},busy:{variant:"destructive",dot:!0,children:"Busy"},away:{variant:"warning",dot:!0,children:"Away"}}[e];return I(ee,{ref:a,variant:r||n.variant,dot:n.dot,...t,children:t.children||n.children})});it.displayName="AtomicStatusBadge";var st=Ae.forwardRef(({count:e,max:r=99,...t},a)=>{let o=e>r?`${r}+`:e.toString();return e<=0?null:I(ee,{ref:a,variant:"destructive",size:"sm",...t,children:o})});st.displayName="AtomicCountBadge";import dr from"next/link";import{cva as mr}from"class-variance-authority";import pr from"react";import{Fragment as ur,jsx as J,jsxs as gr}from"react/jsx-runtime";var lt=mr("transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{default:"text-foreground hover:text-foreground/80",primary:"text-primary hover:text-primary/80",secondary:"text-secondary-foreground hover:text-secondary-foreground/80",muted:"text-muted-foreground hover:text-foreground",destructive:"text-destructive hover:text-destructive/80",ghost:"text-foreground hover:bg-accent hover:text-accent-foreground",underline:"text-primary underline underline-offset-4 hover:text-primary/80",button:"inline-flex items-center justify-center rounded-md text-sm font-medium h-10 px-4 py-2 bg-primary text-primary-foreground hover:bg-primary/90"},size:{default:"",sm:"text-sm",lg:"text-lg",xl:"text-xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"default",size:"default",weight:"normal"}}),ct=pr.forwardRef(({className:e,variant:r,size:t,weight:a,external:o=!1,showExternalIcon:n=!1,prefetch:s=!0,externalIcon:d,children:u,href:l,...y},b)=>{let A=typeof l=="string"&&(l.startsWith("http")||l.startsWith("//")),g=o||A,h={className:i(lt({variant:r,size:t,weight:a}),e),ref:b,...y},c=gr(ur,{children:[u,g&&n&&J("span",{className:"ml-1 inline-block",children:d||J("svg",{className:"h-3 w-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:J("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})})]});return g?J("a",{href:l,target:"_blank",rel:"noopener noreferrer",...h,children:c}):J(dr,{href:l,prefetch:s,...h,children:c})});ct.displayName="AtomicLink";import dt from"react";var mt=(e,r)=>{if(!e)return"";if(typeof e=="string")return`${r}-${e}`;let t=[];return e.x!==void 0&&t.push(`${r}x-${e.x}`),e.y!==void 0&&t.push(`${r}y-${e.y}`),e.t!==void 0&&t.push(`${r}t-${e.t}`),e.r!==void 0&&t.push(`${r}r-${e.r}`),e.b!==void 0&&t.push(`${r}b-${e.b}`),e.l!==void 0&&t.push(`${r}l-${e.l}`),t.join(" ")},pt=dt.forwardRef(({d:e,align:r,justify:t,flexDir:a,flexWrap:o,flexGrow:n,flexShrink:s,order:d,p:u,m:l,w:y,h:b,minW:A,minH:g,maxW:h,maxH:c,bg:v,bgGradient:C,border:R,borderColor:L,rounded:S,shadow:T,position:P,top:E,right:B,bottom:F,left:X,cursor:V,as:Z="div",className:oe,children:H,...O},ae)=>{let ne=i(e&&`${e==="flex"?"flex":e==="inline-flex"?"inline-flex":e==="grid"?"grid":e==="hidden"?"hidden":e==="inline"?"inline":e==="inline-block"?"inline-block":"block"}`,r&&`items-${r==="start"?"start":r==="end"?"end":r==="center"?"center":r==="baseline"?"baseline":"stretch"}`,t&&`justify-${t==="start"?"start":t==="end"?"end":t==="center"?"center":t==="between"?"between":t==="around"?"around":"evenly"}`,a&&`flex-${a==="col"?"col":a==="col-reverse"?"col-reverse":a==="row-reverse"?"row-reverse":"row"}`,o&&`flex-${o}`,n!==void 0&&`flex-grow-${n}`,s!==void 0&&`flex-shrink-${s}`,d!==void 0&&`order-${d}`,mt(u,"p"),mt(l,"m"),y&&`w-${y}`,b&&`h-${b}`,A&&`min-w-${A}`,g&&`min-h-${g}`,h&&`max-w-${h}`,c&&`max-h-${c}`,v&&`bg-${v}`,C,R===!0&&"border",typeof R=="string"&&R,L&&`border-${L}`,S&&`rounded${S==="none"?"-none":S==="full"?"-full":S==="sm"?"-sm":S==="md"?"":`-${S}`}`,T&&`shadow${T==="none"?"-none":T==="sm"?"-sm":T==="md"?"":T==="inner"?"-inner":`-${T}`}`,P&&`${P}`,E!==void 0&&`top-${E}`,B!==void 0&&`right-${B}`,F!==void 0&&`bottom-${F}`,X!==void 0&&`left-${X}`,V&&`cursor-${V}`,oe);return dt.createElement(Z,{ref:ae,className:ne,...O},H)});pt.displayName="AtomicDiv";import fr from"react";import{jsx as yr}from"react/jsx-runtime";var ut=(e,r)=>{if(!e)return"";if(typeof e=="string")return`${r}-${e}`;let t=[];return e.x!==void 0&&t.push(`${r}x-${e.x}`),e.y!==void 0&&t.push(`${r}y-${e.y}`),e.t!==void 0&&t.push(`${r}t-${e.t}`),e.r!==void 0&&t.push(`${r}r-${e.r}`),e.b!==void 0&&t.push(`${r}b-${e.b}`),e.l!==void 0&&t.push(`${r}l-${e.l}`),t.join(" ")},xr=e=>{if(typeof e=="number")return e;if(typeof e=="string"&&!isNaN(Number(e)))return Number(e);switch(e){case"xs":return 12;case"sm":return 16;case"md":return 20;case"lg":return 24;case"xl":return 28;case"2xl":return 32;default:return 20}},gt=fr.forwardRef(({icon:e,size:r="md",color:t,hoverColor:a,p:o,m:n,cursor:s,spin:d=!1,pulse:u=!1,bounce:l=!1,rotate:y,className:b,"aria-label":A,"aria-hidden":g=!1,...h},c)=>{let v=xr(r),C=i("inline-block flex-shrink-0",t&&`text-${t}`,a&&`hover:text-${a}`,ut(o,"p"),ut(n,"m"),s&&`cursor-${s}`,d&&"animate-spin",u&&"animate-pulse",l&&"animate-bounce",y&&`rotate-${y}`,(a||s==="pointer")&&"transition-colors duration-200",b);return yr(e,{ref:c,size:v,className:C,"aria-label":A,"aria-hidden":g,...h})});gt.displayName="AtomicIcon";import br from"react";import{Fragment as vr,jsx as D,jsxs as kr}from"react/jsx-runtime";var ft=(e,r)=>{if(!e)return"";if(typeof e=="string")return`${r}-${e}`;let t=[];return e.x!==void 0&&t.push(`${r}x-${e.x}`),e.y!==void 0&&t.push(`${r}y-${e.y}`),e.t!==void 0&&t.push(`${r}t-${e.t}`),e.r!==void 0&&t.push(`${r}r-${e.r}`),e.b!==void 0&&t.push(`${r}b-${e.b}`),e.l!==void 0&&t.push(`${r}l-${e.l}`),t.join(" ")},hr=(e,r)=>{let t=r||"gray";switch(e){case"primary":return"bg-blue-500 text-white border-blue-500";case"secondary":return"bg-gray-500 text-white border-gray-500";case"success":return"bg-green-500 text-white border-green-500";case"warning":return"bg-yellow-500 text-white border-yellow-500";case"danger":return"bg-red-500 text-white border-red-500";case"info":return"bg-blue-500 text-white border-blue-500";case"outline":return`bg-transparent text-${t}-700 border-${t}-300 border`;case"ghost":return`bg-${t}-100 text-${t}-700 border-transparent`;case"solid":return`bg-${t}-500 text-white border-${t}-500`;default:return"bg-gray-100 text-gray-800 border-gray-200 border"}},wr=e=>{switch(e){case"xs":return"px-1.5 py-0.5 text-xs";case"sm":return"px-2 py-1 text-xs";case"md":return"px-2.5 py-1.5 text-sm";case"lg":return"px-3 py-2 text-base";default:return"px-2.5 py-1.5 text-sm"}},Ar=e=>{switch(e){case"xs":return 10;case"sm":return 12;case"md":return 14;case"lg":return 16;default:return 14}},xt=br.forwardRef(({children:e,variant:r="default",size:t="md",color:a,leftIcon:o,rightIcon:n,p:s,m:d,clickable:u=!1,removable:l=!1,onRemove:y,disabled:b=!1,as:A="span",className:g,onClick:h,...c},v)=>{let C=Ar(t),R=i("inline-flex items-center justify-center font-medium rounded-md transition-colors duration-200",hr(r,a),wr(t),ft(s,"p"),ft(d,"m"),u&&!b&&["cursor-pointer","hover:opacity-80","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"],l&&!b&&"pr-1",b&&"opacity-50 cursor-not-allowed",g),L=kr(vr,{children:[o&&D(o,{size:C,className:i("flex-shrink-0",e?"mr-1.5":"")}),e&&D("span",{className:"truncate",children:e}),n&&D(n,{size:C,className:i("flex-shrink-0",e?"ml-1.5":"")}),l&&D("button",{type:"button",className:i("flex-shrink-0 ml-1.5 rounded-full p-0.5","hover:bg-black hover:bg-opacity-20","focus:outline-none focus:bg-black focus:bg-opacity-20",b&&"cursor-not-allowed"),onClick:T=>{T.stopPropagation(),b||y?.()},disabled:b,"aria-label":"Remove",children:D("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]});return D(A,{ref:v,className:R,onClick:u?T=>{b||h?.(T)}:void 0,...c,children:L})});xt.displayName="AtomicTag";import yt from"react";import{Check as Sr,Minus as Tr}from"lucide-react";import{jsx as z,jsxs as te}from"react/jsx-runtime";var bt=(e,r)=>{if(!e)return"";if(typeof e=="string")return`${r}-${e}`;let t=[];return e.x!==void 0&&t.push(`${r}x-${e.x}`),e.y!==void 0&&t.push(`${r}y-${e.y}`),e.t!==void 0&&t.push(`${r}t-${e.t}`),e.r!==void 0&&t.push(`${r}r-${e.r}`),e.b!==void 0&&t.push(`${r}b-${e.b}`),e.l!==void 0&&t.push(`${r}l-${e.l}`),t.join(" ")},Cr=e=>{switch(e){case"sm":return{container:"text-sm",checkbox:"w-4 h-4",icon:12};case"md":return{container:"text-base",checkbox:"w-5 h-5",icon:14};case"lg":return{container:"text-lg",checkbox:"w-6 h-6",icon:16};default:return{container:"text-base",checkbox:"w-5 h-5",icon:14}}},Rr=(e,r)=>{if(r)return"border-red-300 text-red-600 focus:border-red-500 focus:ring-red-500";let t={slate:"border-slate-300 text-slate-600 focus:border-slate-500 focus:ring-slate-500",gray:"border-gray-300 text-gray-600 focus:border-gray-500 focus:ring-gray-500",zinc:"border-zinc-300 text-zinc-600 focus:border-zinc-500 focus:ring-zinc-500",red:"border-red-300 text-red-600 focus:border-red-500 focus:ring-red-500",orange:"border-orange-300 text-orange-600 focus:border-orange-500 focus:ring-orange-500",yellow:"border-yellow-300 text-yellow-600 focus:border-yellow-500 focus:ring-yellow-500",green:"border-green-300 text-green-600 focus:border-green-500 focus:ring-green-500",blue:"border-blue-300 text-blue-600 focus:border-blue-500 focus:ring-blue-500",indigo:"border-indigo-300 text-indigo-600 focus:border-indigo-500 focus:ring-indigo-500",purple:"border-purple-300 text-purple-600 focus:border-purple-500 focus:ring-purple-500",pink:"border-pink-300 text-pink-600 focus:border-pink-500 focus:ring-pink-500"};return t[e]||t.blue},ht=yt.forwardRef(({checked:e=!1,indeterminate:r=!1,disabled:t=!1,size:a="md",color:o="blue",p:n,m:s,label:d,description:u,error:l=!1,errorMessage:y,className:b,onChange:A,id:g,...h},c)=>{let v=g||`checkbox-${yt.useId()}`,C=Cr(a),R=Rr(o,l),L=P=>{t||A?.(P.target.checked,P)},S=i("relative flex items-start",C.container,bt(n,"p"),bt(s,"m"),t&&"opacity-50 cursor-not-allowed",b),T=i("flex-shrink-0 rounded border-2 bg-white transition-colors duration-200",C.checkbox,R,"focus:outline-none focus:ring-2 focus:ring-offset-2",t?"cursor-not-allowed":"cursor-pointer",(e||r)&&!t&&`bg-${o}-600 border-${o}-600`);return te("div",{className:S,children:[z("div",{className:"flex items-center h-5",children:te("div",{className:"relative",children:[z("input",{ref:c,type:"checkbox",id:v,checked:e,disabled:t,onChange:L,className:"sr-only",...h}),te("div",{className:T,onClick:()=>{!t&&c&&"current"in c&&c.current&&c.current.click()},children:[e&&!r&&z(Sr,{size:C.icon,className:"text-white absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"}),r&&z(Tr,{size:C.icon,className:"text-white absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"})]})]})}),(d||u)&&te("div",{className:"ml-3 flex-1",children:[d&&z("label",{htmlFor:v,className:i("block font-medium leading-5",l?"text-red-700":"text-gray-700",t?"cursor-not-allowed":"cursor-pointer"),children:d}),u&&z("p",{className:i("text-sm leading-5",l?"text-red-600":"text-gray-500"),children:u}),l&&y&&z("p",{className:"mt-1 text-sm text-red-600",children:y})]})]})});ht.displayName="AtomicCheckbox";import wt from"react";import{jsx as U,jsxs as re}from"react/jsx-runtime";var At=(e,r)=>{if(!e)return"";if(typeof e=="string")return`${r}-${e}`;let t=[];return e.x!==void 0&&t.push(`${r}x-${e.x}`),e.y!==void 0&&t.push(`${r}y-${e.y}`),e.t!==void 0&&t.push(`${r}t-${e.t}`),e.r!==void 0&&t.push(`${r}r-${e.r}`),e.b!==void 0&&t.push(`${r}b-${e.b}`),e.l!==void 0&&t.push(`${r}l-${e.l}`),t.join(" ")},Lr=e=>{switch(e){case"sm":return{track:"w-9 h-5",thumb:"w-4 h-4",thumbTranslate:"translate-x-4",container:"text-sm"};case"md":return{track:"w-11 h-6",thumb:"w-5 h-5",thumbTranslate:"translate-x-5",container:"text-base"};case"lg":return{track:"w-14 h-7",thumb:"w-6 h-6",thumbTranslate:"translate-x-7",container:"text-lg"};default:return{track:"w-11 h-6",thumb:"w-5 h-5",thumbTranslate:"translate-x-5",container:"text-base"}}},$r=(e,r)=>{if(!r)return"bg-gray-200";let t={slate:"bg-slate-500",gray:"bg-gray-500",zinc:"bg-zinc-500",red:"bg-red-500",orange:"bg-orange-500",yellow:"bg-yellow-500",green:"bg-green-500",blue:"bg-blue-500",indigo:"bg-indigo-500",purple:"bg-purple-500",pink:"bg-pink-500"};return t[e]||t.blue},vt=wt.forwardRef(({checked:e=!1,disabled:r=!1,size:t="md",color:a="blue",p:o,m:n,label:s,description:d,labelPosition:u="right",loading:l=!1,className:y,onChange:b,id:A,...g},h)=>{let c=A||`switch-${wt.useId()}`,v=Lr(t),C=$r(a,e),R=B=>{!r&&!l&&b?.(B.target.checked,B)},L=i("relative flex items-center",v.container,At(o,"p"),At(n,"m"),r&&"opacity-50 cursor-not-allowed",y),S=i("relative inline-flex flex-shrink-0 rounded-full border-2 border-transparent transition-colors ease-in-out duration-200",v.track,C,"focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2",`focus-within:ring-${a}-500`,r||l?"cursor-not-allowed":"cursor-pointer"),T=i("pointer-events-none inline-block rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200",v.thumb,e?v.thumbTranslate:"translate-x-0"),P=re("div",{className:S,children:[U("input",{ref:h,type:"checkbox",id:c,checked:e,disabled:r||l,onChange:R,className:"sr-only",...g}),U("span",{className:T,children:l&&re("svg",{className:"animate-spin -ml-1 -mt-1 h-3 w-3 text-gray-400",fill:"none",viewBox:"0 0 24 24",children:[U("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),U("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"})]})})]}),E=(s||d)&&re("div",{className:i("flex-1",u==="left"?"mr-3":"ml-3"),children:[s&&U("label",{htmlFor:c,className:i("block font-medium leading-5 text-gray-700",r||l?"cursor-not-allowed":"cursor-pointer"),children:s}),d&&U("p",{className:"text-sm leading-5 text-gray-500",children:d})]});return re("div",{className:L,children:[u==="left"&&E,P,u==="right"&&E]})});vt.displayName="AtomicSwitch";import W from"react";import{cva as Y}from"class-variance-authority";import{jsx as _}from"react/jsx-runtime";var kt=Y("rounded-lg border text-card-foreground",{variants:{variant:{default:"border-border bg-card shadow-sm",elevated:"border-0 bg-card shadow-lg",outlined:"border-2 border-border bg-card shadow-none",filled:"border-0 bg-muted shadow-none"},size:{sm:"p-4",md:"p-6",lg:"p-8",xl:"p-10"}},defaultVariants:{variant:"default",size:"md"}}),St=Y("flex flex-col space-y-1.5",{variants:{size:{sm:"pb-3",md:"pb-4",lg:"pb-6",xl:"pb-8"}},defaultVariants:{size:"md"}}),Tt=Y("font-semibold leading-none tracking-tight",{variants:{size:{sm:"text-lg",md:"text-xl",lg:"text-2xl",xl:"text-3xl"}},defaultVariants:{size:"md"}}),Ct=Y("text-muted-foreground",{variants:{size:{sm:"text-sm",md:"text-sm",lg:"text-base",xl:"text-lg"}},defaultVariants:{size:"md"}}),Rt=Y("",{variants:{size:{sm:"pt-0",md:"pt-0",lg:"pt-0",xl:"pt-0"}},defaultVariants:{size:"md"}}),Lt=Y("flex items-center",{variants:{size:{sm:"pt-3",md:"pt-4",lg:"pt-6",xl:"pt-8"}},defaultVariants:{size:"md"}}),$t=W.forwardRef(({className:e,variant:r,size:t,interactive:a=!1,fullWidth:o=!1,...n},s)=>_("div",{ref:s,className:i(kt({variant:r,size:t}),a&&"cursor-pointer transition-shadow hover:shadow-md",o&&"w-full",e),...n}));$t.displayName="AtomicCard";var Pt=W.forwardRef(({className:e,size:r,...t},a)=>_("div",{ref:a,className:i(St({size:r}),e),...t}));Pt.displayName="AtomicCardHeader";var Et=W.forwardRef(({className:e,size:r,as:t="h3",...a},o)=>_(t,{ref:o,className:i(Tt({size:r}),e),...a}));Et.displayName="AtomicCardTitle";var Nt=W.forwardRef(({className:e,size:r,...t},a)=>_("p",{ref:a,className:i(Ct({size:r}),e),...t}));Nt.displayName="AtomicCardDescription";var It=W.forwardRef(({className:e,size:r,...t},a)=>_("div",{ref:a,className:i(Rt({size:r}),e),...t}));It.displayName="AtomicCardContent";var Mt=W.forwardRef(({className:e,size:r,...t},a)=>_("div",{ref:a,className:i(Lt({size:r}),e),...t}));Mt.displayName="AtomicCardFooter";import{createContext as Pr,useContext as Er,useEffect as Bt,useState as Vt}from"react";import{jsx as Mr}from"react/jsx-runtime";var Dt=Pr(void 0),Nr=({children:e,defaultTheme:r="system",storageKey:t="atomic-theme",attribute:a="data-theme",enableSystem:o=!0,disableTransitionOnChange:n=!1})=>{let[s,d]=Vt(()=>{if(typeof window>"u")return r;try{let g=localStorage.getItem(t);if(g&&["light","dark","system"].includes(g))return g}catch{}return r}),[u,l]=Vt("light"),y=()=>typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",b=g=>{try{localStorage.setItem(t,g)}catch{}d(g)};Bt(()=>{let g=window.document.documentElement,h=s==="system"&&o?y():s;if(l(h),n){let c=document.createElement("style");c.appendChild(document.createTextNode("* { transition: none !important; transform: none !important; animation: none !important; }")),document.head.appendChild(c),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(c)})})}g.setAttribute(a,h),g.classList.remove("light","dark"),g.classList.add(h)},[s,a,o,n]),Bt(()=>{if(!o||s!=="system")return;let g=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{let c=y();l(c);let v=window.document.documentElement;v.setAttribute(a,c),v.classList.remove("light","dark"),v.classList.add(c)};return g.addEventListener("change",h),()=>g.removeEventListener("change",h)},[s,a,o]);let A={theme:s,setTheme:b,actualTheme:u};return Mr(Dt.Provider,{value:A,children:e})},Ir=()=>{let e=Er(Dt);if(e===void 0)throw new Error("useAtomicTheme must be used within an AtomicThemeProvider");return e};var _a="1.1.0";export{N as AnimationUtils,Pe as AtomicAlertType,Me as AtomicAlignment,Ht as AtomicAnimationPresets,De as AtomicAnimationState,x as AtomicAnimations,pe as AtomicAnimationsCss,_e as AtomicAvatar,qe as AtomicAvatarFallback,Xe as AtomicAvatarImage,ee as AtomicBadge,f as AtomicBorders,me as AtomicBordersCss,Fe as AtomicBreakpoint,je as AtomicButton,tt as AtomicButtonSpinner,Te as AtomicButtonVariant,$t as AtomicCard,It as AtomicCardContent,Nt as AtomicCardDescription,Mt as AtomicCardFooter,Pt as AtomicCardHeader,Et as AtomicCardTitle,Re as AtomicCardVariant,ht as AtomicCheckbox,Se as AtomicColorVariant,se as AtomicColorsCss,st as AtomicCountBadge,Xr as AtomicDesignTokensCss,Ve as AtomicDirection,pt as AtomicDiv,Ot as AtomicEnumUtils,ze as AtomicFormFieldState,gt as AtomicIcon,Je as AtomicImage,ot as AtomicInlineSpinner,Qe as AtomicInput,Ce as AtomicInputVariant,ct as AtomicLink,Le as AtomicLoadingState,Ee as AtomicModalSize,Be as AtomicOrientation,rt as AtomicPageSpinner,Ie as AtomicPosition,w as AtomicShadows,de as AtomicShadowsCss,ke as AtomicSize,le as AtomicSpacingCss,K as AtomicSpinner,$e as AtomicStatus,it as AtomicStatusBadge,vt as AtomicSwitch,xt as AtomicTag,Ue as AtomicText,Ne as AtomicTextVariant,He as AtomicThemeMode,Nr as AtomicThemeProvider,ce as AtomicTypographyCss,j as BorderUtils,Ft as ShadowUtils,_a as VERSION,ye as avatarFallbackVariants,xe as avatarImageVariants,Ye as avatarVariants,nt as badgeVariants,Oe as buttonVariants,Rt as cardContentVariants,Ct as cardDescriptionVariants,Lt as cardFooterVariants,St as cardHeaderVariants,Tt as cardTitleVariants,kt as cardVariants,i as cn,be as imageVariants,Ze as inputVariants,lt as linkVariants,et as spinnerVariants,Ge as textVariants,Ir as useAtomicTheme};
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ import React5, { createContext, useState, useEffect, useContext } from 'react';
4
+ import { Slot } from '@radix-ui/react-slot';
5
+ import { cva } from 'class-variance-authority';
6
+ import { Loader2, X, EyeOff, Eye, Check, Minus } from 'lucide-react';
7
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
8
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
9
+ import Image2 from 'next/image';
10
+ import Link from 'next/link';
11
+
12
+ /**
13
+ * @umituz/atomic-next v2.0.0
14
+ * Atomic design system for Next.js
15
+ * https://umituz.com/opensource/atomic-next
16
+ */
17
+
18
+ // src/tokens/colors/atomic-colors.ts
19
+ var colors = {
20
+ primary: "#9333EA",
21
+ primaryLight: "#A855F7",
22
+ primaryDark: "#7C3AED",
23
+ secondary: "#EC4899",
24
+ secondaryLight: "#F472B6",
25
+ secondaryDark: "#DB2777",
26
+ accent: "#F59E0B",
27
+ accentLight: "#FBBF24",
28
+ accentDark: "#D97706",
29
+ gray50: "#FAFAFA",
30
+ gray100: "#F4F4F5",
31
+ gray200: "#E4E4E7",
32
+ gray300: "#D4D4D8",
33
+ gray400: "#A1A1AA",
34
+ gray500: "#71717A",
35
+ gray600: "#52525B",
36
+ gray700: "#3F3F46",
37
+ gray800: "#27272A",
38
+ gray900: "#18181B",
39
+ success: "#10B981",
40
+ successLight: "#34D399",
41
+ successDark: "#059669",
42
+ warning: "#F59E0B",
43
+ warningLight: "#FBBF24",
44
+ warningDark: "#D97706",
45
+ error: "#EF4444",
46
+ errorLight: "#F87171",
47
+ errorDark: "#DC2626",
48
+ info: "#3B82F6",
49
+ infoLight: "#60A5FA",
50
+ infoDark: "#2563EB",
51
+ background: "#FFFFFF",
52
+ backgroundSecondary: "#F9FAFB",
53
+ surface: "#FFFFFF",
54
+ surfaceSecondary: "#F3F4F6",
55
+ textPrimary: "#18181B",
56
+ textSecondary: "#52525B",
57
+ textTertiary: "#A1A1AA",
58
+ textDisabled: "#D4D4D8",
59
+ textInverse: "#FFFFFF"
60
+ };
61
+ var AtomicColorsCss = {
62
+ "--atomic-primary": colors.primary,
63
+ "--atomic-primary-light": colors.primaryLight,
64
+ "--atomic-primary-dark": colors.primaryDark,
65
+ "--atomic-secondary": colors.secondary,
66
+ "--atomic-secondary-light": colors.secondaryLight,
67
+ "--atomic-secondary-dark": colors.secondaryDark,
68
+ "--atomic-accent": colors.accent,
69
+ "--atomic-accent-light": colors.accentLight,
70
+ "--atomic-accent-dark": colors.accentDark,
71
+ "--atomic-gray-50": colors.gray50,
72
+ "--atomic-gray-100": colors.gray100,
73
+ "--atomic-gray-200": colors.gray200,
74
+ "--atomic-gray-300": colors.gray300,
75
+ "--atomic-gray-400": colors.gray400,
76
+ "--atomic-gray-500": colors.gray500,
77
+ "--atomic-gray-600": colors.gray600,
78
+ "--atomic-gray-700": colors.gray700,
79
+ "--atomic-gray-800": colors.gray800,
80
+ "--atomic-gray-900": colors.gray900,
81
+ "--atomic-success": colors.success,
82
+ "--atomic-success-light": colors.successLight,
83
+ "--atomic-success-dark": colors.successDark,
84
+ "--atomic-warning": colors.warning,
85
+ "--atomic-warning-light": colors.warningLight,
86
+ "--atomic-warning-dark": colors.warningDark,
87
+ "--atomic-error": colors.error,
88
+ "--atomic-error-light": colors.errorLight,
89
+ "--atomic-error-dark": colors.errorDark,
90
+ "--atomic-info": colors.info,
91
+ "--atomic-info-light": colors.infoLight,
92
+ "--atomic-info-dark": colors.infoDark,
93
+ "--atomic-background": colors.background,
94
+ "--atomic-background-secondary": colors.backgroundSecondary,
95
+ "--atomic-surface": colors.surface,
96
+ "--atomic-surface-secondary": colors.surfaceSecondary,
97
+ "--atomic-text-primary": colors.textPrimary,
98
+ "--atomic-text-secondary": colors.textSecondary,
99
+ "--atomic-text-tertiary": colors.textTertiary,
100
+ "--atomic-text-disabled": colors.textDisabled,
101
+ "--atomic-text-inverse": colors.textInverse
102
+ };
103
+
104
+ // src/tokens/spacing/atomic-spacing.ts
105
+ var spacing = {
106
+ unit: 8,
107
+ xxs: 4,
108
+ xs: 8,
109
+ sm: 12,
110
+ md: 16,
111
+ lg: 24,
112
+ xl: 32,
113
+ xxl: 40,
114
+ xxxl: 48,
115
+ huge: 64,
116
+ buttonPaddingX: 16,
117
+ buttonPaddingY: 12,
118
+ cardPadding: 24,
119
+ cardMargin: 16,
120
+ listItemPadding: 16,
121
+ listItemSpacing: 8,
122
+ inputPaddingX: 16,
123
+ inputPaddingY: 12,
124
+ modalPadding: 24,
125
+ sectionPadding: 32
126
+ };
127
+ var AtomicSpacingCss = {
128
+ "--atomic-spacing-unit": `${spacing.unit}px`,
129
+ "--atomic-spacing-xxs": `${spacing.xxs}px`,
130
+ "--atomic-spacing-xs": `${spacing.xs}px`,
131
+ "--atomic-spacing-sm": `${spacing.sm}px`,
132
+ "--atomic-spacing-md": `${spacing.md}px`,
133
+ "--atomic-spacing-lg": `${spacing.lg}px`,
134
+ "--atomic-spacing-xl": `${spacing.xl}px`,
135
+ "--atomic-spacing-xxl": `${spacing.xxl}px`,
136
+ "--atomic-spacing-xxxl": `${spacing.xxxl}px`,
137
+ "--atomic-spacing-huge": `${spacing.huge}px`,
138
+ "--atomic-button-padding-x": `${spacing.buttonPaddingX}px`,
139
+ "--atomic-button-padding-y": `${spacing.buttonPaddingY}px`,
140
+ "--atomic-card-padding": `${spacing.cardPadding}px`,
141
+ "--atomic-card-margin": `${spacing.cardMargin}px`,
142
+ "--atomic-list-item-padding": `${spacing.listItemPadding}px`,
143
+ "--atomic-list-item-spacing": `${spacing.listItemSpacing}px`,
144
+ "--atomic-input-padding-x": `${spacing.inputPaddingX}px`,
145
+ "--atomic-input-padding-y": `${spacing.inputPaddingY}px`,
146
+ "--atomic-modal-padding": `${spacing.modalPadding}px`,
147
+ "--atomic-section-padding": `${spacing.sectionPadding}px`
148
+ };
149
+
150
+ // src/tokens/typography/atomic-typography.ts
151
+ var typography = {
152
+ fontFamily: {
153
+ sans: ["Inter", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "sans-serif"],
154
+ serif: ["Charter", "Georgia", "Cambria", "Times New Roman", "Times", "serif"],
155
+ mono: ["JetBrains Mono", "Fira Code", "Consolas", "Monaco", "Courier New", "monospace"]
156
+ },
157
+ fontWeight: {
158
+ thin: 100,
159
+ light: 300,
160
+ regular: 400,
161
+ medium: 500,
162
+ semibold: 600,
163
+ bold: 700,
164
+ extrabold: 800,
165
+ black: 900
166
+ },
167
+ fontSize: {
168
+ displayLarge: 57,
169
+ displayMedium: 45,
170
+ displaySmall: 36,
171
+ headlineLarge: 32,
172
+ headlineMedium: 28,
173
+ headlineSmall: 24,
174
+ titleLarge: 22,
175
+ titleMedium: 16,
176
+ titleSmall: 14,
177
+ bodyLarge: 16,
178
+ bodyMedium: 14,
179
+ bodySmall: 12,
180
+ labelLarge: 14,
181
+ labelMedium: 12,
182
+ labelSmall: 11
183
+ },
184
+ lineHeight: {
185
+ none: 1,
186
+ tight: 1.25,
187
+ snug: 1.375,
188
+ normal: 1.5,
189
+ relaxed: 1.625,
190
+ loose: 2
191
+ },
192
+ letterSpacing: {
193
+ tighter: "-0.05em",
194
+ tight: "-0.025em",
195
+ normal: "0em",
196
+ wide: "0.025em",
197
+ wider: "0.05em",
198
+ widest: "0.1em"
199
+ }
200
+ };
201
+ var AtomicTypographyCss = {
202
+ "--atomic-font-sans": typography.fontFamily.sans.join(", "),
203
+ "--atomic-font-serif": typography.fontFamily.serif.join(", "),
204
+ "--atomic-font-mono": typography.fontFamily.mono.join(", "),
205
+ "--atomic-font-thin": typography.fontWeight.thin.toString(),
206
+ "--atomic-font-light": typography.fontWeight.light.toString(),
207
+ "--atomic-font-regular": typography.fontWeight.regular.toString(),
208
+ "--atomic-font-medium": typography.fontWeight.medium.toString(),
209
+ "--atomic-font-semibold": typography.fontWeight.semibold.toString(),
210
+ "--atomic-font-bold": typography.fontWeight.bold.toString(),
211
+ "--atomic-font-extrabold": typography.fontWeight.extrabold.toString(),
212
+ "--atomic-font-black": typography.fontWeight.black.toString(),
213
+ "--atomic-text-display-large": `${typography.fontSize.displayLarge}px`,
214
+ "--atomic-text-display-medium": `${typography.fontSize.displayMedium}px`,
215
+ "--atomic-text-display-small": `${typography.fontSize.displaySmall}px`,
216
+ "--atomic-text-headline-large": `${typography.fontSize.headlineLarge}px`,
217
+ "--atomic-text-headline-medium": `${typography.fontSize.headlineMedium}px`,
218
+ "--atomic-text-headline-small": `${typography.fontSize.headlineSmall}px`,
219
+ "--atomic-text-title-large": `${typography.fontSize.titleLarge}px`,
220
+ "--atomic-text-title-medium": `${typography.fontSize.titleMedium}px`,
221
+ "--atomic-text-title-small": `${typography.fontSize.titleSmall}px`,
222
+ "--atomic-text-body-large": `${typography.fontSize.bodyLarge}px`,
223
+ "--atomic-text-body-medium": `${typography.fontSize.bodyMedium}px`,
224
+ "--atomic-text-body-small": `${typography.fontSize.bodySmall}px`,
225
+ "--atomic-text-label-large": `${typography.fontSize.labelLarge}px`,
226
+ "--atomic-text-label-medium": `${typography.fontSize.labelMedium}px`,
227
+ "--atomic-text-label-small": `${typography.fontSize.labelSmall}px`,
228
+ "--atomic-leading-none": typography.lineHeight.none.toString(),
229
+ "--atomic-leading-tight": typography.lineHeight.tight.toString(),
230
+ "--atomic-leading-snug": typography.lineHeight.snug.toString(),
231
+ "--atomic-leading-normal": typography.lineHeight.normal.toString(),
232
+ "--atomic-leading-relaxed": typography.lineHeight.relaxed.toString(),
233
+ "--atomic-leading-loose": typography.lineHeight.loose.toString(),
234
+ "--atomic-tracking-tighter": typography.letterSpacing.tighter,
235
+ "--atomic-tracking-tight": typography.letterSpacing.tight,
236
+ "--atomic-tracking-normal": typography.letterSpacing.normal,
237
+ "--atomic-tracking-wide": typography.letterSpacing.wide,
238
+ "--atomic-tracking-wider": typography.letterSpacing.wider,
239
+ "--atomic-tracking-widest": typography.letterSpacing.widest
240
+ };
241
+
242
+ // src/tokens/shadows/atomic-shadows.ts
243
+ var AtomicShadows = {
244
+ none: "none",
245
+ xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
246
+ sm: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
247
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
248
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
249
+ xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
250
+ xxl: "0 25px 50px -12px rgb(0 0 0 / 0.25)",
251
+ inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
252
+ focusPrimary: "0 0 0 3px rgb(139 92 246 / 0.2)",
253
+ focusSecondary: "0 0 0 3px rgb(236 72 153 / 0.2)",
254
+ focusSuccess: "0 0 0 3px rgb(16 185 129 / 0.2)",
255
+ focusWarning: "0 0 0 3px rgb(245 158 11 / 0.2)",
256
+ focusError: "0 0 0 3px rgb(239 68 68 / 0.2)",
257
+ focusInfo: "0 0 0 3px rgb(59 130 246 / 0.2)",
258
+ glowPrimary: "0 0 20px rgb(139 92 246 / 0.3)",
259
+ glowSecondary: "0 0 20px rgb(236 72 153 / 0.3)",
260
+ glowSuccess: "0 0 20px rgb(16 185 129 / 0.3)",
261
+ glowWarning: "0 0 20px rgb(245 158 11 / 0.3)",
262
+ glowError: "0 0 20px rgb(239 68 68 / 0.3)",
263
+ card: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
264
+ cardHover: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
265
+ button: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
266
+ buttonHover: "0 2px 4px 0 rgb(0 0 0 / 0.1)",
267
+ modal: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
268
+ dropdown: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
269
+ tooltip: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"
270
+ };
271
+ var ShadowUtils = {
272
+ get: (name) => {
273
+ return AtomicShadows[name];
274
+ },
275
+ custom: (x, y, blur, spread = 0, color = "0 0 0", opacity = 0.1) => {
276
+ return `${x}px ${y}px ${blur}px ${spread}px rgb(${color} / ${opacity})`;
277
+ },
278
+ combine: (...shadows) => {
279
+ return shadows.map((shadow) => AtomicShadows[shadow]).join(", ");
280
+ },
281
+ focus: (color = "139 92 246", opacity = 0.2) => {
282
+ return `0 0 0 3px rgb(${color} / ${opacity})`;
283
+ },
284
+ glow: (size = 20, color = "139 92 246", opacity = 0.3) => {
285
+ return `0 0 ${size}px rgb(${color} / ${opacity})`;
286
+ }
287
+ };
288
+ var AtomicShadowsCss = {
289
+ "--atomic-shadow-none": AtomicShadows.none,
290
+ "--atomic-shadow-xs": AtomicShadows.xs,
291
+ "--atomic-shadow-sm": AtomicShadows.sm,
292
+ "--atomic-shadow-md": AtomicShadows.md,
293
+ "--atomic-shadow-lg": AtomicShadows.lg,
294
+ "--atomic-shadow-xl": AtomicShadows.xl,
295
+ "--atomic-shadow-xxl": AtomicShadows.xxl,
296
+ "--atomic-shadow-inner": AtomicShadows.inner,
297
+ "--atomic-shadow-focus-primary": AtomicShadows.focusPrimary,
298
+ "--atomic-shadow-focus-secondary": AtomicShadows.focusSecondary,
299
+ "--atomic-shadow-focus-success": AtomicShadows.focusSuccess,
300
+ "--atomic-shadow-focus-warning": AtomicShadows.focusWarning,
301
+ "--atomic-shadow-focus-error": AtomicShadows.focusError,
302
+ "--atomic-shadow-focus-info": AtomicShadows.focusInfo,
303
+ "--atomic-shadow-glow-primary": AtomicShadows.glowPrimary,
304
+ "--atomic-shadow-glow-secondary": AtomicShadows.glowSecondary,
305
+ "--atomic-shadow-glow-success": AtomicShadows.glowSuccess,
306
+ "--atomic-shadow-glow-warning": AtomicShadows.glowWarning,
307
+ "--atomic-shadow-glow-error": AtomicShadows.glowError,
308
+ "--atomic-shadow-card": AtomicShadows.card,
309
+ "--atomic-shadow-card-hover": AtomicShadows.cardHover,
310
+ "--atomic-shadow-button": AtomicShadows.button,
311
+ "--atomic-shadow-button-hover": AtomicShadows.buttonHover,
312
+ "--atomic-shadow-modal": AtomicShadows.modal,
313
+ "--atomic-shadow-dropdown": AtomicShadows.dropdown,
314
+ "--atomic-shadow-tooltip": AtomicShadows.tooltip
315
+ };
316
+
317
+ // src/tokens/borders/atomic-borders.ts
318
+ var AtomicBorders = {
319
+ radius: {
320
+ none: "0px",
321
+ xs: "2px",
322
+ sm: "4px",
323
+ md: "6px",
324
+ lg: "8px",
325
+ xl: "12px",
326
+ xxl: "16px",
327
+ xxxl: "24px",
328
+ full: "9999px"
329
+ },
330
+ width: {
331
+ none: "0px",
332
+ thin: "1px",
333
+ medium: "2px",
334
+ thick: "4px",
335
+ thicker: "8px"
336
+ },
337
+ style: {
338
+ solid: "solid",
339
+ dashed: "dashed",
340
+ dotted: "dotted",
341
+ double: "double",
342
+ none: "none"
343
+ }
344
+ };
345
+ var BorderUtils = {
346
+ radius: (name) => {
347
+ return AtomicBorders.radius[name];
348
+ },
349
+ width: (name) => {
350
+ return AtomicBorders.width[name];
351
+ },
352
+ style: (name) => {
353
+ return AtomicBorders.style[name];
354
+ },
355
+ border: (config) => {
356
+ const width = config.width ? AtomicBorders.width[config.width] : AtomicBorders.width.thin;
357
+ const style = config.style ? AtomicBorders.style[config.style] : AtomicBorders.style.solid;
358
+ const color = config.color || "currentColor";
359
+ return `${width} ${style} ${color}`;
360
+ },
361
+ radiusCorners: {
362
+ all: (radius) => ({
363
+ borderRadius: AtomicBorders.radius[radius]
364
+ }),
365
+ top: (radius) => ({
366
+ borderTopLeftRadius: AtomicBorders.radius[radius],
367
+ borderTopRightRadius: AtomicBorders.radius[radius]
368
+ }),
369
+ right: (radius) => ({
370
+ borderTopRightRadius: AtomicBorders.radius[radius],
371
+ borderBottomRightRadius: AtomicBorders.radius[radius]
372
+ }),
373
+ bottom: (radius) => ({
374
+ borderBottomLeftRadius: AtomicBorders.radius[radius],
375
+ borderBottomRightRadius: AtomicBorders.radius[radius]
376
+ }),
377
+ left: (radius) => ({
378
+ borderTopLeftRadius: AtomicBorders.radius[radius],
379
+ borderBottomLeftRadius: AtomicBorders.radius[radius]
380
+ }),
381
+ topLeft: (radius) => ({
382
+ borderTopLeftRadius: AtomicBorders.radius[radius]
383
+ }),
384
+ topRight: (radius) => ({
385
+ borderTopRightRadius: AtomicBorders.radius[radius]
386
+ }),
387
+ bottomRight: (radius) => ({
388
+ borderBottomRightRadius: AtomicBorders.radius[radius]
389
+ }),
390
+ bottomLeft: (radius) => ({
391
+ borderBottomLeftRadius: AtomicBorders.radius[radius]
392
+ })
393
+ },
394
+ borderSides: {
395
+ all: (config) => ({
396
+ border: BorderUtils.border(config)
397
+ }),
398
+ top: (config) => ({
399
+ borderTop: BorderUtils.border(config)
400
+ }),
401
+ right: (config) => ({
402
+ borderRight: BorderUtils.border(config)
403
+ }),
404
+ bottom: (config) => ({
405
+ borderBottom: BorderUtils.border(config)
406
+ }),
407
+ left: (config) => ({
408
+ borderLeft: BorderUtils.border(config)
409
+ })
410
+ }
411
+ };
412
+ var AtomicBordersCss = {
413
+ "--atomic-radius-none": AtomicBorders.radius.none,
414
+ "--atomic-radius-xs": AtomicBorders.radius.xs,
415
+ "--atomic-radius-sm": AtomicBorders.radius.sm,
416
+ "--atomic-radius-md": AtomicBorders.radius.md,
417
+ "--atomic-radius-lg": AtomicBorders.radius.lg,
418
+ "--atomic-radius-xl": AtomicBorders.radius.xl,
419
+ "--atomic-radius-xxl": AtomicBorders.radius.xxl,
420
+ "--atomic-radius-xxxl": AtomicBorders.radius.xxxl,
421
+ "--atomic-radius-full": AtomicBorders.radius.full,
422
+ "--atomic-border-none": AtomicBorders.width.none,
423
+ "--atomic-border-thin": AtomicBorders.width.thin,
424
+ "--atomic-border-medium": AtomicBorders.width.medium,
425
+ "--atomic-border-thick": AtomicBorders.width.thick,
426
+ "--atomic-border-thicker": AtomicBorders.width.thicker
427
+ };
428
+
429
+ // src/tokens/animations/atomic-animations.ts
430
+ var AtomicAnimations = {
431
+ duration: {
432
+ instant: "0ms",
433
+ fast: "150ms",
434
+ normal: "200ms",
435
+ slow: "300ms",
436
+ slower: "500ms",
437
+ slowest: "700ms"
438
+ },
439
+ easing: {
440
+ linear: "linear",
441
+ ease: "ease",
442
+ easeIn: "ease-in",
443
+ easeOut: "ease-out",
444
+ easeInOut: "ease-in-out",
445
+ smooth: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
446
+ snappy: "cubic-bezier(0.68, -0.55, 0.265, 1.55)",
447
+ bounce: "cubic-bezier(0.68, -0.6, 0.32, 1.6)",
448
+ elastic: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
449
+ standard: "cubic-bezier(0.4, 0, 0.2, 1)",
450
+ decelerate: "cubic-bezier(0, 0, 0.2, 1)",
451
+ accelerate: "cubic-bezier(0.4, 0, 1, 1)"
452
+ },
453
+ scale: {
454
+ none: "1",
455
+ xs: "1.025",
456
+ sm: "1.05",
457
+ md: "1.1",
458
+ lg: "1.15",
459
+ xl: "1.25"
460
+ },
461
+ rotate: {
462
+ none: "0deg",
463
+ quarter: "90deg",
464
+ half: "180deg",
465
+ threeQuarter: "270deg",
466
+ full: "360deg"
467
+ }
468
+ };
469
+ var AnimationUtils = {
470
+ transition: (config) => {
471
+ const property = Array.isArray(config.property) ? config.property.join(", ") : config.property || "all";
472
+ const duration = config.duration ? AtomicAnimations.duration[config.duration] : AtomicAnimations.duration.normal;
473
+ const easing = config.easing ? AtomicAnimations.easing[config.easing] : AtomicAnimations.easing.easeInOut;
474
+ const delay = config.delay ? AtomicAnimations.duration[config.delay] : "0ms";
475
+ return {
476
+ transition: `${property} ${duration} ${easing} ${delay}`
477
+ };
478
+ },
479
+ transform: (config) => {
480
+ const transforms = [];
481
+ if (config.scale) {
482
+ transforms.push(`scale(${AtomicAnimations.scale[config.scale]})`);
483
+ }
484
+ if (config.rotate) {
485
+ transforms.push(`rotate(${AtomicAnimations.rotate[config.rotate]})`);
486
+ }
487
+ if (config.translateX) {
488
+ transforms.push(`translateX(${config.translateX})`);
489
+ }
490
+ if (config.translateY) {
491
+ transforms.push(`translateY(${config.translateY})`);
492
+ }
493
+ if (config.translateZ) {
494
+ transforms.push(`translateZ(${config.translateZ})`);
495
+ }
496
+ return {
497
+ transform: transforms.join(" ") || "none"
498
+ };
499
+ },
500
+ duration: (name) => {
501
+ return AtomicAnimations.duration[name];
502
+ },
503
+ easing: (name) => {
504
+ return AtomicAnimations.easing[name];
505
+ },
506
+ keyframes: (name, frames) => {
507
+ const keyframeString = Object.entries(frames).map(([key, styles]) => {
508
+ const styleString = Object.entries(styles).map(([prop, value]) => `${prop}: ${value};`).join(" ");
509
+ return `${key} { ${styleString} }`;
510
+ }).join(" ");
511
+ return `@keyframes ${name} { ${keyframeString} }`;
512
+ }
513
+ };
514
+ var AtomicAnimationPresets = {
515
+ fadeIn: AnimationUtils.transition({
516
+ property: "opacity",
517
+ duration: "normal",
518
+ easing: "easeOut"
519
+ }),
520
+ fadeOut: AnimationUtils.transition({
521
+ property: "opacity",
522
+ duration: "fast",
523
+ easing: "easeIn"
524
+ }),
525
+ scaleIn: {
526
+ ...AnimationUtils.transition({
527
+ property: "transform",
528
+ duration: "normal",
529
+ easing: "smooth"
530
+ }),
531
+ transform: "scale(1)"
532
+ },
533
+ scaleOut: {
534
+ ...AnimationUtils.transition({
535
+ property: "transform",
536
+ duration: "fast",
537
+ easing: "easeIn"
538
+ }),
539
+ transform: "scale(0.95)"
540
+ },
541
+ slideInUp: {
542
+ ...AnimationUtils.transition({
543
+ property: "transform",
544
+ duration: "normal",
545
+ easing: "smooth"
546
+ }),
547
+ transform: "translateY(0)"
548
+ },
549
+ slideInDown: {
550
+ ...AnimationUtils.transition({
551
+ property: "transform",
552
+ duration: "normal",
553
+ easing: "smooth"
554
+ }),
555
+ transform: "translateY(0)"
556
+ },
557
+ buttonHover: {
558
+ ...AnimationUtils.transition({
559
+ property: ["background-color", "border-color", "color", "box-shadow", "transform"],
560
+ duration: "fast",
561
+ easing: "easeOut"
562
+ }),
563
+ transform: "translateY(-1px)"
564
+ },
565
+ buttonPress: {
566
+ ...AnimationUtils.transition({
567
+ property: "transform",
568
+ duration: "fast",
569
+ easing: "easeIn"
570
+ }),
571
+ transform: "translateY(0)"
572
+ },
573
+ spin: {
574
+ animation: "spin 1s linear infinite"
575
+ },
576
+ pulse: {
577
+ animation: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"
578
+ },
579
+ bounce: {
580
+ animation: "bounce 1s infinite"
581
+ }
582
+ };
583
+ var AtomicAnimationsCss = {
584
+ "--atomic-duration-instant": AtomicAnimations.duration.instant,
585
+ "--atomic-duration-fast": AtomicAnimations.duration.fast,
586
+ "--atomic-duration-normal": AtomicAnimations.duration.normal,
587
+ "--atomic-duration-slow": AtomicAnimations.duration.slow,
588
+ "--atomic-duration-slower": AtomicAnimations.duration.slower,
589
+ "--atomic-duration-slowest": AtomicAnimations.duration.slowest,
590
+ "--atomic-ease-linear": AtomicAnimations.easing.linear,
591
+ "--atomic-ease": AtomicAnimations.easing.ease,
592
+ "--atomic-ease-in": AtomicAnimations.easing.easeIn,
593
+ "--atomic-ease-out": AtomicAnimations.easing.easeOut,
594
+ "--atomic-ease-in-out": AtomicAnimations.easing.easeInOut,
595
+ "--atomic-ease-smooth": AtomicAnimations.easing.smooth,
596
+ "--atomic-ease-snappy": AtomicAnimations.easing.snappy,
597
+ "--atomic-ease-bounce": AtomicAnimations.easing.bounce,
598
+ "--atomic-ease-elastic": AtomicAnimations.easing.elastic,
599
+ "--atomic-ease-standard": AtomicAnimations.easing.standard,
600
+ "--atomic-ease-decelerate": AtomicAnimations.easing.decelerate,
601
+ "--atomic-ease-accelerate": AtomicAnimations.easing.accelerate,
602
+ "--atomic-scale-none": AtomicAnimations.scale.none,
603
+ "--atomic-scale-xs": AtomicAnimations.scale.xs,
604
+ "--atomic-scale-sm": AtomicAnimations.scale.sm,
605
+ "--atomic-scale-md": AtomicAnimations.scale.md,
606
+ "--atomic-scale-lg": AtomicAnimations.scale.lg,
607
+ "--atomic-scale-xl": AtomicAnimations.scale.xl
608
+ };
609
+
610
+ // src/tokens/enums/atomic-enums.ts
611
+ var AtomicSize = /* @__PURE__ */ ((AtomicSize2) => {
612
+ AtomicSize2["XS"] = "xs";
613
+ AtomicSize2["SM"] = "sm";
614
+ AtomicSize2["MD"] = "md";
615
+ AtomicSize2["LG"] = "lg";
616
+ AtomicSize2["XL"] = "xl";
617
+ return AtomicSize2;
618
+ })(AtomicSize || {});
619
+ var AtomicColorVariant = /* @__PURE__ */ ((AtomicColorVariant2) => {
620
+ AtomicColorVariant2["PRIMARY"] = "primary";
621
+ AtomicColorVariant2["SECONDARY"] = "secondary";
622
+ AtomicColorVariant2["SUCCESS"] = "success";
623
+ AtomicColorVariant2["WARNING"] = "warning";
624
+ AtomicColorVariant2["ERROR"] = "error";
625
+ AtomicColorVariant2["INFO"] = "info";
626
+ AtomicColorVariant2["GRAY"] = "gray";
627
+ return AtomicColorVariant2;
628
+ })(AtomicColorVariant || {});
629
+ var AtomicButtonVariant = /* @__PURE__ */ ((AtomicButtonVariant2) => {
630
+ AtomicButtonVariant2["PRIMARY"] = "primary";
631
+ AtomicButtonVariant2["SECONDARY"] = "secondary";
632
+ AtomicButtonVariant2["OUTLINE"] = "outline";
633
+ AtomicButtonVariant2["GHOST"] = "ghost";
634
+ AtomicButtonVariant2["LINK"] = "link";
635
+ AtomicButtonVariant2["DESTRUCTIVE"] = "destructive";
636
+ return AtomicButtonVariant2;
637
+ })(AtomicButtonVariant || {});
638
+ var AtomicInputVariant = /* @__PURE__ */ ((AtomicInputVariant2) => {
639
+ AtomicInputVariant2["DEFAULT"] = "default";
640
+ AtomicInputVariant2["FILLED"] = "filled";
641
+ AtomicInputVariant2["OUTLINE"] = "outline";
642
+ AtomicInputVariant2["UNDERLINED"] = "underlined";
643
+ return AtomicInputVariant2;
644
+ })(AtomicInputVariant || {});
645
+ var AtomicCardVariant = /* @__PURE__ */ ((AtomicCardVariant2) => {
646
+ AtomicCardVariant2["DEFAULT"] = "default";
647
+ AtomicCardVariant2["ELEVATED"] = "elevated";
648
+ AtomicCardVariant2["OUTLINED"] = "outlined";
649
+ AtomicCardVariant2["FILLED"] = "filled";
650
+ return AtomicCardVariant2;
651
+ })(AtomicCardVariant || {});
652
+ var AtomicLoadingState = /* @__PURE__ */ ((AtomicLoadingState2) => {
653
+ AtomicLoadingState2["IDLE"] = "idle";
654
+ AtomicLoadingState2["LOADING"] = "loading";
655
+ AtomicLoadingState2["SUCCESS"] = "success";
656
+ AtomicLoadingState2["ERROR"] = "error";
657
+ return AtomicLoadingState2;
658
+ })(AtomicLoadingState || {});
659
+ var AtomicStatus = /* @__PURE__ */ ((AtomicStatus2) => {
660
+ AtomicStatus2["ACTIVE"] = "active";
661
+ AtomicStatus2["INACTIVE"] = "inactive";
662
+ AtomicStatus2["PENDING"] = "pending";
663
+ AtomicStatus2["DISABLED"] = "disabled";
664
+ AtomicStatus2["ARCHIVED"] = "archived";
665
+ return AtomicStatus2;
666
+ })(AtomicStatus || {});
667
+ var AtomicAlertType = /* @__PURE__ */ ((AtomicAlertType2) => {
668
+ AtomicAlertType2["INFO"] = "info";
669
+ AtomicAlertType2["SUCCESS"] = "success";
670
+ AtomicAlertType2["WARNING"] = "warning";
671
+ AtomicAlertType2["ERROR"] = "error";
672
+ return AtomicAlertType2;
673
+ })(AtomicAlertType || {});
674
+ var AtomicModalSize = /* @__PURE__ */ ((AtomicModalSize2) => {
675
+ AtomicModalSize2["SM"] = "sm";
676
+ AtomicModalSize2["MD"] = "md";
677
+ AtomicModalSize2["LG"] = "lg";
678
+ AtomicModalSize2["XL"] = "xl";
679
+ AtomicModalSize2["FULL"] = "full";
680
+ return AtomicModalSize2;
681
+ })(AtomicModalSize || {});
682
+ var AtomicTextVariant = /* @__PURE__ */ ((AtomicTextVariant2) => {
683
+ AtomicTextVariant2["DISPLAY_LARGE"] = "displayLarge";
684
+ AtomicTextVariant2["DISPLAY_MEDIUM"] = "displayMedium";
685
+ AtomicTextVariant2["DISPLAY_SMALL"] = "displaySmall";
686
+ AtomicTextVariant2["HEADLINE_LARGE"] = "headlineLarge";
687
+ AtomicTextVariant2["HEADLINE_MEDIUM"] = "headlineMedium";
688
+ AtomicTextVariant2["HEADLINE_SMALL"] = "headlineSmall";
689
+ AtomicTextVariant2["TITLE_LARGE"] = "titleLarge";
690
+ AtomicTextVariant2["TITLE_MEDIUM"] = "titleMedium";
691
+ AtomicTextVariant2["TITLE_SMALL"] = "titleSmall";
692
+ AtomicTextVariant2["BODY_LARGE"] = "bodyLarge";
693
+ AtomicTextVariant2["BODY_MEDIUM"] = "bodyMedium";
694
+ AtomicTextVariant2["BODY_SMALL"] = "bodySmall";
695
+ AtomicTextVariant2["LABEL_LARGE"] = "labelLarge";
696
+ AtomicTextVariant2["LABEL_MEDIUM"] = "labelMedium";
697
+ AtomicTextVariant2["LABEL_SMALL"] = "labelSmall";
698
+ return AtomicTextVariant2;
699
+ })(AtomicTextVariant || {});
700
+ var AtomicPosition = /* @__PURE__ */ ((AtomicPosition2) => {
701
+ AtomicPosition2["TOP"] = "top";
702
+ AtomicPosition2["TOP_LEFT"] = "top-left";
703
+ AtomicPosition2["TOP_RIGHT"] = "top-right";
704
+ AtomicPosition2["BOTTOM"] = "bottom";
705
+ AtomicPosition2["BOTTOM_LEFT"] = "bottom-left";
706
+ AtomicPosition2["BOTTOM_RIGHT"] = "bottom-right";
707
+ AtomicPosition2["LEFT"] = "left";
708
+ AtomicPosition2["RIGHT"] = "right";
709
+ AtomicPosition2["CENTER"] = "center";
710
+ return AtomicPosition2;
711
+ })(AtomicPosition || {});
712
+ var AtomicAlignment = /* @__PURE__ */ ((AtomicAlignment2) => {
713
+ AtomicAlignment2["LEFT"] = "left";
714
+ AtomicAlignment2["CENTER"] = "center";
715
+ AtomicAlignment2["RIGHT"] = "right";
716
+ AtomicAlignment2["JUSTIFY"] = "justify";
717
+ return AtomicAlignment2;
718
+ })(AtomicAlignment || {});
719
+ var AtomicOrientation = /* @__PURE__ */ ((AtomicOrientation2) => {
720
+ AtomicOrientation2["HORIZONTAL"] = "horizontal";
721
+ AtomicOrientation2["VERTICAL"] = "vertical";
722
+ return AtomicOrientation2;
723
+ })(AtomicOrientation || {});
724
+ var AtomicDirection = /* @__PURE__ */ ((AtomicDirection2) => {
725
+ AtomicDirection2["UP"] = "up";
726
+ AtomicDirection2["DOWN"] = "down";
727
+ AtomicDirection2["LEFT"] = "left";
728
+ AtomicDirection2["RIGHT"] = "right";
729
+ return AtomicDirection2;
730
+ })(AtomicDirection || {});
731
+ var AtomicAnimationState = /* @__PURE__ */ ((AtomicAnimationState2) => {
732
+ AtomicAnimationState2["ENTER"] = "enter";
733
+ AtomicAnimationState2["EXIT"] = "exit";
734
+ AtomicAnimationState2["IDLE"] = "idle";
735
+ return AtomicAnimationState2;
736
+ })(AtomicAnimationState || {});
737
+ var AtomicFormFieldState = /* @__PURE__ */ ((AtomicFormFieldState2) => {
738
+ AtomicFormFieldState2["DEFAULT"] = "default";
739
+ AtomicFormFieldState2["FOCUS"] = "focus";
740
+ AtomicFormFieldState2["ERROR"] = "error";
741
+ AtomicFormFieldState2["SUCCESS"] = "success";
742
+ AtomicFormFieldState2["DISABLED"] = "disabled";
743
+ return AtomicFormFieldState2;
744
+ })(AtomicFormFieldState || {});
745
+ var AtomicBreakpoint = /* @__PURE__ */ ((AtomicBreakpoint2) => {
746
+ AtomicBreakpoint2["XS"] = "xs";
747
+ AtomicBreakpoint2["SM"] = "sm";
748
+ AtomicBreakpoint2["MD"] = "md";
749
+ AtomicBreakpoint2["LG"] = "lg";
750
+ AtomicBreakpoint2["XL"] = "xl";
751
+ AtomicBreakpoint2["XXL"] = "xxl";
752
+ return AtomicBreakpoint2;
753
+ })(AtomicBreakpoint || {});
754
+ var AtomicThemeMode = /* @__PURE__ */ ((AtomicThemeMode2) => {
755
+ AtomicThemeMode2["LIGHT"] = "light";
756
+ AtomicThemeMode2["DARK"] = "dark";
757
+ AtomicThemeMode2["SYSTEM"] = "system";
758
+ return AtomicThemeMode2;
759
+ })(AtomicThemeMode || {});
760
+ var AtomicEnumUtils = {
761
+ getValues: (enumObj) => {
762
+ return Object.values(enumObj);
763
+ },
764
+ getKeys: (enumObj) => {
765
+ return Object.keys(enumObj);
766
+ },
767
+ hasValue: (enumObj, value) => {
768
+ return Object.values(enumObj).includes(value);
769
+ },
770
+ hasKey: (enumObj, key) => {
771
+ return Object.keys(enumObj).includes(key);
772
+ },
773
+ getEntries: (enumObj) => {
774
+ return Object.entries(enumObj);
775
+ }
776
+ };
777
+
778
+ // src/tokens/index.ts
779
+ var AtomicDesignTokensCss = {
780
+ ...AtomicColorsCss,
781
+ ...AtomicSpacingCss,
782
+ ...AtomicTypographyCss,
783
+ ...AtomicShadowsCss,
784
+ ...AtomicBordersCss,
785
+ ...AtomicAnimationsCss
786
+ };
787
+ function cn(...inputs) {
788
+ return twMerge(clsx(inputs));
789
+ }
790
+ var buttonVariants = cva(
791
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
792
+ {
793
+ variants: {
794
+ variant: {
795
+ default: "bg-gray-900 text-white hover:bg-gray-800 dark:bg-white dark:text-gray-900 dark:hover:bg-gray-100",
796
+ primary: "bg-[--atomic-primary] text-white hover:bg-[--atomic-primary-dark] transition-all duration-200",
797
+ brand: "text-white hover:shadow-xl transition-all duration-200",
798
+ destructive: "bg-red-600 text-white hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600",
799
+ outline: "border border-gray-300 bg-transparent hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800",
800
+ secondary: "bg-gray-100 text-gray-900 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-100 dark:hover:bg-gray-700",
801
+ ghost: "bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800",
802
+ link: "bg-transparent text-blue-600 underline-offset-4 hover:underline dark:text-blue-400"
803
+ },
804
+ size: {
805
+ default: "h-10 px-4 py-2",
806
+ sm: "h-9 rounded-md px-3",
807
+ lg: "h-11 rounded-md px-8",
808
+ icon: "h-10 w-10"
809
+ }
810
+ },
811
+ defaultVariants: {
812
+ variant: "default",
813
+ size: "default"
814
+ }
815
+ }
816
+ );
817
+ var AtomicButton = React5.forwardRef(
818
+ ({
819
+ className,
820
+ variant,
821
+ size,
822
+ asChild = false,
823
+ loading = false,
824
+ leftIcon,
825
+ rightIcon,
826
+ fullWidth = false,
827
+ disabled,
828
+ children,
829
+ ...props
830
+ }, ref) => {
831
+ const Comp = asChild ? Slot : "button";
832
+ const isDisabled = disabled || loading;
833
+ return /* @__PURE__ */ jsxs(
834
+ Comp,
835
+ {
836
+ className: cn(
837
+ buttonVariants({ variant, size }),
838
+ fullWidth && "w-full",
839
+ className
840
+ ),
841
+ style: {
842
+ ...variant === "brand" && {
843
+ background: "linear-gradient(to right, var(--atomic-primary), var(--atomic-secondary))"
844
+ },
845
+ ...props.style
846
+ },
847
+ ref,
848
+ disabled: isDisabled,
849
+ ...props,
850
+ children: [
851
+ loading && /* @__PURE__ */ jsx(
852
+ Loader2,
853
+ {
854
+ className: cn(
855
+ "animate-spin",
856
+ size === "sm" ? "h-3 w-3" : size === "lg" ? "h-5 w-5" : "h-4 w-4",
857
+ (leftIcon || children) && "mr-2"
858
+ )
859
+ }
860
+ ),
861
+ !loading && leftIcon && /* @__PURE__ */ jsx("span", { className: cn(
862
+ "inline-flex items-center",
863
+ size === "sm" ? "mr-1" : "mr-2",
864
+ size === "sm" ? "[&>*]:h-3 [&>*]:w-3" : size === "lg" ? "[&>*]:h-5 [&>*]:w-5" : "[&>*]:h-4 [&>*]:w-4"
865
+ ), children: leftIcon }),
866
+ children,
867
+ !loading && rightIcon && /* @__PURE__ */ jsx("span", { className: cn(
868
+ "inline-flex items-center",
869
+ size === "sm" ? "ml-1" : "ml-2",
870
+ size === "sm" ? "[&>*]:h-3 [&>*]:w-3" : size === "lg" ? "[&>*]:h-5 [&>*]:w-5" : "[&>*]:h-4 [&>*]:w-4"
871
+ ), children: rightIcon })
872
+ ]
873
+ }
874
+ );
875
+ }
876
+ );
877
+ AtomicButton.displayName = "AtomicButton";
878
+ var textVariants = cva("", {
879
+ variants: {
880
+ variant: {
881
+ h1: "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",
882
+ h2: "scroll-m-20 text-3xl font-semibold tracking-tight lg:text-4xl",
883
+ h3: "scroll-m-20 text-2xl font-semibold tracking-tight",
884
+ h4: "scroll-m-20 text-xl font-semibold tracking-tight",
885
+ h5: "scroll-m-20 text-lg font-semibold tracking-tight",
886
+ h6: "scroll-m-20 text-base font-semibold tracking-tight",
887
+ body: "text-base leading-7",
888
+ large: "text-lg leading-7",
889
+ small: "text-sm leading-6",
890
+ xs: "text-xs leading-5",
891
+ lead: "text-xl leading-7 text-muted-foreground",
892
+ muted: "text-sm text-muted-foreground",
893
+ caption: "text-xs text-muted-foreground",
894
+ label: "text-sm font-medium leading-none"
895
+ },
896
+ color: {
897
+ default: "text-foreground",
898
+ primary: "text-primary",
899
+ secondary: "text-secondary-foreground",
900
+ muted: "text-muted-foreground",
901
+ success: "text-green-600 dark:text-green-400",
902
+ warning: "text-amber-600 dark:text-amber-400",
903
+ error: "text-red-600 dark:text-red-400",
904
+ info: "text-blue-600 dark:text-blue-400"
905
+ },
906
+ align: {
907
+ left: "text-left",
908
+ center: "text-center",
909
+ right: "text-right",
910
+ justify: "text-justify"
911
+ },
912
+ weight: {
913
+ thin: "font-thin",
914
+ light: "font-light",
915
+ normal: "font-normal",
916
+ medium: "font-medium",
917
+ semibold: "font-semibold",
918
+ bold: "font-bold",
919
+ extrabold: "font-extrabold",
920
+ black: "font-black"
921
+ }
922
+ },
923
+ defaultVariants: {
924
+ variant: "body",
925
+ color: "default",
926
+ align: "left"
927
+ }
928
+ });
929
+ var AtomicText = React5.forwardRef(
930
+ ({
931
+ className,
932
+ variant,
933
+ color,
934
+ align,
935
+ weight,
936
+ as = "p",
937
+ asChild = false,
938
+ truncate = false,
939
+ selectable = true,
940
+ ...props
941
+ }, ref) => {
942
+ const Comp = asChild ? Slot : as;
943
+ let semanticElement = as;
944
+ if (!asChild && as === "p") {
945
+ if (variant === "h1" || variant === "h2" || variant === "h3" || variant === "h4" || variant === "h5" || variant === "h6") {
946
+ semanticElement = variant;
947
+ } else if (variant === "label") {
948
+ semanticElement = "label";
949
+ }
950
+ }
951
+ const FinalComp = asChild ? Comp : semanticElement;
952
+ return /* @__PURE__ */ jsx(
953
+ FinalComp,
954
+ {
955
+ className: cn(
956
+ textVariants({ variant, color: color || "default", align, weight }),
957
+ truncate && "truncate",
958
+ !selectable && "select-none",
959
+ className
960
+ ),
961
+ ref,
962
+ ...props
963
+ }
964
+ );
965
+ }
966
+ );
967
+ AtomicText.displayName = "AtomicText";
968
+ var avatarVariants = cva(
969
+ "relative flex shrink-0 overflow-hidden rounded-full",
970
+ {
971
+ variants: {
972
+ size: {
973
+ xs: "h-6 w-6",
974
+ sm: "h-8 w-8",
975
+ default: "h-10 w-10",
976
+ lg: "h-12 w-12",
977
+ xl: "h-16 w-16",
978
+ xxl: "h-20 w-20",
979
+ xxxl: "h-24 w-24"
980
+ }
981
+ },
982
+ defaultVariants: {
983
+ size: "default"
984
+ }
985
+ }
986
+ );
987
+ var avatarImageVariants = cva("aspect-square h-full w-full object-cover");
988
+ var avatarFallbackVariants = cva(
989
+ "flex h-full w-full items-center justify-center rounded-full bg-muted font-medium text-muted-foreground",
990
+ {
991
+ variants: {
992
+ size: {
993
+ xs: "text-xs",
994
+ sm: "text-xs",
995
+ default: "text-sm",
996
+ lg: "text-base",
997
+ xl: "text-lg",
998
+ xxl: "text-xl",
999
+ xxxl: "text-2xl"
1000
+ }
1001
+ },
1002
+ defaultVariants: {
1003
+ size: "default"
1004
+ }
1005
+ }
1006
+ );
1007
+ var AtomicAvatar = React5.forwardRef(
1008
+ ({
1009
+ className,
1010
+ size,
1011
+ src,
1012
+ alt,
1013
+ fallback,
1014
+ fallbackElement,
1015
+ showStatus = false,
1016
+ isOnline = false,
1017
+ statusColor,
1018
+ ...props
1019
+ }, ref) => {
1020
+ const generateInitials = (name) => {
1021
+ if (!name) return "?";
1022
+ return name.split(" ").map((part) => part.charAt(0)).join("").slice(0, 2).toUpperCase();
1023
+ };
1024
+ const initials = fallback || generateInitials(alt);
1025
+ const statusSize = {
1026
+ xs: "h-1.5 w-1.5",
1027
+ sm: "h-2 w-2",
1028
+ default: "h-2.5 w-2.5",
1029
+ lg: "h-3 w-3",
1030
+ xl: "h-4 w-4",
1031
+ xxl: "h-4 w-4",
1032
+ xxxl: "h-5 w-5"
1033
+ }[size || "default"];
1034
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1035
+ /* @__PURE__ */ jsxs(
1036
+ AvatarPrimitive.Root,
1037
+ {
1038
+ ref,
1039
+ className: cn(avatarVariants({ size }), className),
1040
+ ...props,
1041
+ children: [
1042
+ /* @__PURE__ */ jsx(
1043
+ AvatarPrimitive.Image,
1044
+ {
1045
+ className: avatarImageVariants(),
1046
+ src,
1047
+ alt
1048
+ }
1049
+ ),
1050
+ /* @__PURE__ */ jsx(
1051
+ AvatarPrimitive.Fallback,
1052
+ {
1053
+ className: avatarFallbackVariants({ size }),
1054
+ children: fallbackElement || initials
1055
+ }
1056
+ )
1057
+ ]
1058
+ }
1059
+ ),
1060
+ showStatus && /* @__PURE__ */ jsx(
1061
+ "div",
1062
+ {
1063
+ className: cn(
1064
+ "absolute bottom-0 right-0 rounded-full border-2 border-background",
1065
+ statusSize,
1066
+ statusColor ? "" : isOnline ? "bg-green-500" : "bg-gray-400"
1067
+ ),
1068
+ style: statusColor ? { backgroundColor: statusColor } : void 0
1069
+ }
1070
+ )
1071
+ ] });
1072
+ }
1073
+ );
1074
+ AtomicAvatar.displayName = "AtomicAvatar";
1075
+ var AtomicAvatarImage = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1076
+ AvatarPrimitive.Image,
1077
+ {
1078
+ ref,
1079
+ className: cn(avatarImageVariants(), className),
1080
+ ...props
1081
+ }
1082
+ ));
1083
+ AtomicAvatarImage.displayName = "AtomicAvatarImage";
1084
+ var AtomicAvatarFallback = React5.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
1085
+ AvatarPrimitive.Fallback,
1086
+ {
1087
+ ref,
1088
+ className: cn(avatarFallbackVariants({ size }), className),
1089
+ ...props
1090
+ }
1091
+ ));
1092
+ AtomicAvatarFallback.displayName = "AtomicAvatarFallback";
1093
+ var imageVariants = cva("transition-all duration-200", {
1094
+ variants: {
1095
+ rounded: {
1096
+ none: "rounded-none",
1097
+ sm: "rounded-sm",
1098
+ md: "rounded-md",
1099
+ lg: "rounded-lg",
1100
+ xl: "rounded-xl",
1101
+ full: "rounded-full"
1102
+ },
1103
+ aspectRatio: {
1104
+ square: "aspect-square",
1105
+ video: "aspect-video",
1106
+ portrait: "aspect-[3/4]",
1107
+ landscape: "aspect-[4/3]",
1108
+ auto: ""
1109
+ },
1110
+ objectFit: {
1111
+ cover: "object-cover",
1112
+ contain: "object-contain",
1113
+ fill: "object-fill",
1114
+ "scale-down": "object-scale-down",
1115
+ none: "object-none"
1116
+ },
1117
+ objectPosition: {
1118
+ center: "object-center",
1119
+ top: "object-top",
1120
+ bottom: "object-bottom",
1121
+ left: "object-left",
1122
+ right: "object-right",
1123
+ "top-left": "object-left-top",
1124
+ "top-right": "object-right-top",
1125
+ "bottom-left": "object-left-bottom",
1126
+ "bottom-right": "object-right-bottom"
1127
+ }
1128
+ },
1129
+ defaultVariants: {
1130
+ rounded: "none",
1131
+ aspectRatio: "auto",
1132
+ objectFit: "cover",
1133
+ objectPosition: "center"
1134
+ }
1135
+ });
1136
+ var AtomicImage = React5.forwardRef(({
1137
+ className,
1138
+ containerClassName,
1139
+ rounded,
1140
+ aspectRatio,
1141
+ objectFit,
1142
+ objectPosition,
1143
+ enableBlur = false,
1144
+ placeholderSrc,
1145
+ ...props
1146
+ }, ref) => {
1147
+ return /* @__PURE__ */ jsx("div", { className: cn(
1148
+ "relative overflow-hidden",
1149
+ aspectRatio && imageVariants({ aspectRatio }),
1150
+ containerClassName
1151
+ ), children: /* @__PURE__ */ jsx(
1152
+ Image2,
1153
+ {
1154
+ ref,
1155
+ className: cn(
1156
+ imageVariants({
1157
+ rounded,
1158
+ objectFit,
1159
+ objectPosition,
1160
+ aspectRatio: void 0
1161
+ }),
1162
+ className
1163
+ ),
1164
+ placeholder: enableBlur || placeholderSrc ? "blur" : "empty",
1165
+ blurDataURL: placeholderSrc,
1166
+ ...props
1167
+ }
1168
+ ) });
1169
+ });
1170
+ AtomicImage.displayName = "AtomicImage";
1171
+ var cardVariants = cva(
1172
+ "rounded-lg border text-card-foreground",
1173
+ {
1174
+ variants: {
1175
+ variant: {
1176
+ default: "border-border bg-card shadow-sm",
1177
+ elevated: "border-0 bg-card shadow-lg",
1178
+ outlined: "border-2 border-border bg-card shadow-none",
1179
+ filled: "border-0 bg-muted shadow-none"
1180
+ },
1181
+ size: {
1182
+ sm: "p-4",
1183
+ md: "p-6",
1184
+ lg: "p-8",
1185
+ xl: "p-10"
1186
+ }
1187
+ },
1188
+ defaultVariants: {
1189
+ variant: "default",
1190
+ size: "md"
1191
+ }
1192
+ }
1193
+ );
1194
+ var cardHeaderVariants = cva(
1195
+ "flex flex-col space-y-1.5",
1196
+ {
1197
+ variants: {
1198
+ size: {
1199
+ sm: "pb-3",
1200
+ md: "pb-4",
1201
+ lg: "pb-6",
1202
+ xl: "pb-8"
1203
+ }
1204
+ },
1205
+ defaultVariants: {
1206
+ size: "md"
1207
+ }
1208
+ }
1209
+ );
1210
+ var cardTitleVariants = cva(
1211
+ "font-semibold leading-none tracking-tight",
1212
+ {
1213
+ variants: {
1214
+ size: {
1215
+ sm: "text-lg",
1216
+ md: "text-xl",
1217
+ lg: "text-2xl",
1218
+ xl: "text-3xl"
1219
+ }
1220
+ },
1221
+ defaultVariants: {
1222
+ size: "md"
1223
+ }
1224
+ }
1225
+ );
1226
+ var cardDescriptionVariants = cva(
1227
+ "text-muted-foreground",
1228
+ {
1229
+ variants: {
1230
+ size: {
1231
+ sm: "text-sm",
1232
+ md: "text-sm",
1233
+ lg: "text-base",
1234
+ xl: "text-lg"
1235
+ }
1236
+ },
1237
+ defaultVariants: {
1238
+ size: "md"
1239
+ }
1240
+ }
1241
+ );
1242
+ var cardContentVariants = cva("", {
1243
+ variants: {
1244
+ size: {
1245
+ sm: "pt-0",
1246
+ md: "pt-0",
1247
+ lg: "pt-0",
1248
+ xl: "pt-0"
1249
+ }
1250
+ },
1251
+ defaultVariants: {
1252
+ size: "md"
1253
+ }
1254
+ });
1255
+ var cardFooterVariants = cva(
1256
+ "flex items-center",
1257
+ {
1258
+ variants: {
1259
+ size: {
1260
+ sm: "pt-3",
1261
+ md: "pt-4",
1262
+ lg: "pt-6",
1263
+ xl: "pt-8"
1264
+ }
1265
+ },
1266
+ defaultVariants: {
1267
+ size: "md"
1268
+ }
1269
+ }
1270
+ );
1271
+ var AtomicCard = React5.forwardRef(
1272
+ ({ className, variant, size, interactive = false, fullWidth = false, ...props }, ref) => /* @__PURE__ */ jsx(
1273
+ "div",
1274
+ {
1275
+ ref,
1276
+ className: cn(
1277
+ cardVariants({ variant, size }),
1278
+ interactive && "cursor-pointer transition-shadow hover:shadow-md",
1279
+ fullWidth && "w-full",
1280
+ className
1281
+ ),
1282
+ ...props
1283
+ }
1284
+ )
1285
+ );
1286
+ AtomicCard.displayName = "AtomicCard";
1287
+ var AtomicCardHeader = React5.forwardRef(
1288
+ ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
1289
+ "div",
1290
+ {
1291
+ ref,
1292
+ className: cn(cardHeaderVariants({ size }), className),
1293
+ ...props
1294
+ }
1295
+ )
1296
+ );
1297
+ AtomicCardHeader.displayName = "AtomicCardHeader";
1298
+ var AtomicCardTitle = React5.forwardRef(
1299
+ ({ className, size, as: Component = "h3", ...props }, ref) => /* @__PURE__ */ jsx(
1300
+ Component,
1301
+ {
1302
+ ref,
1303
+ className: cn(cardTitleVariants({ size }), className),
1304
+ ...props
1305
+ }
1306
+ )
1307
+ );
1308
+ AtomicCardTitle.displayName = "AtomicCardTitle";
1309
+ var AtomicCardDescription = React5.forwardRef(
1310
+ ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
1311
+ "p",
1312
+ {
1313
+ ref,
1314
+ className: cn(cardDescriptionVariants({ size }), className),
1315
+ ...props
1316
+ }
1317
+ )
1318
+ );
1319
+ AtomicCardDescription.displayName = "AtomicCardDescription";
1320
+ var AtomicCardContent = React5.forwardRef(
1321
+ ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
1322
+ "div",
1323
+ {
1324
+ ref,
1325
+ className: cn(cardContentVariants({ size }), className),
1326
+ ...props
1327
+ }
1328
+ )
1329
+ );
1330
+ AtomicCardContent.displayName = "AtomicCardContent";
1331
+ var AtomicCardFooter = React5.forwardRef(
1332
+ ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
1333
+ "div",
1334
+ {
1335
+ ref,
1336
+ className: cn(cardFooterVariants({ size }), className),
1337
+ ...props
1338
+ }
1339
+ )
1340
+ );
1341
+ AtomicCardFooter.displayName = "AtomicCardFooter";
1342
+ var getSpacingClass = (spacing2, prefix) => {
1343
+ if (!spacing2) return "";
1344
+ if (typeof spacing2 === "string") {
1345
+ return `${prefix}-${spacing2}`;
1346
+ }
1347
+ const classes = [];
1348
+ if (spacing2.x !== void 0) classes.push(`${prefix}x-${spacing2.x}`);
1349
+ if (spacing2.y !== void 0) classes.push(`${prefix}y-${spacing2.y}`);
1350
+ if (spacing2.t !== void 0) classes.push(`${prefix}t-${spacing2.t}`);
1351
+ if (spacing2.r !== void 0) classes.push(`${prefix}r-${spacing2.r}`);
1352
+ if (spacing2.b !== void 0) classes.push(`${prefix}b-${spacing2.b}`);
1353
+ if (spacing2.l !== void 0) classes.push(`${prefix}l-${spacing2.l}`);
1354
+ return classes.join(" ");
1355
+ };
1356
+ var getSizeValue = (size) => {
1357
+ if (typeof size === "number") return size;
1358
+ if (typeof size === "string" && !isNaN(Number(size))) return Number(size);
1359
+ switch (size) {
1360
+ case "xs":
1361
+ return 12;
1362
+ case "sm":
1363
+ return 16;
1364
+ case "md":
1365
+ return 20;
1366
+ case "lg":
1367
+ return 24;
1368
+ case "xl":
1369
+ return 28;
1370
+ case "2xl":
1371
+ return 32;
1372
+ default:
1373
+ return 20;
1374
+ }
1375
+ };
1376
+ var AtomicIcon = React5.forwardRef(
1377
+ ({
1378
+ icon: Icon,
1379
+ size = "md",
1380
+ color,
1381
+ hoverColor,
1382
+ p,
1383
+ m,
1384
+ cursor,
1385
+ spin = false,
1386
+ pulse = false,
1387
+ bounce = false,
1388
+ rotate,
1389
+ className,
1390
+ "aria-label": ariaLabel,
1391
+ "aria-hidden": ariaHidden = false,
1392
+ ...rest
1393
+ }, ref) => {
1394
+ const sizeValue = getSizeValue(size);
1395
+ const classes = cn(
1396
+ "inline-block flex-shrink-0",
1397
+ color && `text-${color}`,
1398
+ hoverColor && `hover:text-${hoverColor}`,
1399
+ getSpacingClass(p, "p"),
1400
+ getSpacingClass(m, "m"),
1401
+ cursor && `cursor-${cursor}`,
1402
+ spin && "animate-spin",
1403
+ pulse && "animate-pulse",
1404
+ bounce && "animate-bounce",
1405
+ rotate && `rotate-${rotate}`,
1406
+ (hoverColor || cursor === "pointer") && "transition-colors duration-200",
1407
+ className
1408
+ );
1409
+ return /* @__PURE__ */ jsx(
1410
+ Icon,
1411
+ {
1412
+ ref,
1413
+ size: sizeValue,
1414
+ className: classes,
1415
+ "aria-label": ariaLabel,
1416
+ "aria-hidden": ariaHidden,
1417
+ ...rest
1418
+ }
1419
+ );
1420
+ }
1421
+ );
1422
+ AtomicIcon.displayName = "AtomicIcon";
1423
+ var inputVariants = cva(
1424
+ "flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
1425
+ {
1426
+ variants: {
1427
+ variant: {
1428
+ default: "",
1429
+ filled: "bg-secondary border-transparent",
1430
+ outline: "bg-transparent border-2",
1431
+ underlined: "rounded-none border-0 border-b-2 px-0"
1432
+ },
1433
+ size: {
1434
+ sm: "h-8 px-2 text-xs",
1435
+ default: "h-10 px-3 text-sm",
1436
+ lg: "h-12 px-4 text-base"
1437
+ },
1438
+ state: {
1439
+ default: "",
1440
+ error: "border-destructive focus-visible:ring-destructive",
1441
+ success: "border-green-500 focus-visible:ring-green-500",
1442
+ warning: "border-amber-500 focus-visible:ring-amber-500"
1443
+ }
1444
+ },
1445
+ defaultVariants: {
1446
+ variant: "default",
1447
+ size: "default",
1448
+ state: "default"
1449
+ }
1450
+ }
1451
+ );
1452
+ var AtomicInput = React5.forwardRef(
1453
+ ({
1454
+ className,
1455
+ variant,
1456
+ size,
1457
+ state,
1458
+ type = "text",
1459
+ leftIcon,
1460
+ rightIcon,
1461
+ label,
1462
+ helperText,
1463
+ error,
1464
+ success,
1465
+ warning,
1466
+ clearable = false,
1467
+ onClear,
1468
+ showPasswordToggle = false,
1469
+ containerClassName,
1470
+ labelClassName,
1471
+ helperClassName,
1472
+ value,
1473
+ onChange,
1474
+ disabled,
1475
+ ...props
1476
+ }, ref) => {
1477
+ const [showPassword, setShowPassword] = React5.useState(false);
1478
+ const [internalValue, setInternalValue] = React5.useState(value || "");
1479
+ let currentState = state;
1480
+ if (error) currentState = "error";
1481
+ else if (success) currentState = "success";
1482
+ else if (warning) currentState = "warning";
1483
+ let inputType = type;
1484
+ if (type === "password" && showPasswordToggle) {
1485
+ inputType = showPassword ? "text" : "password";
1486
+ }
1487
+ const hasValue = (value || internalValue) && String(value || internalValue).length > 0;
1488
+ const showClearButton = clearable && hasValue && !disabled;
1489
+ const showPasswordToggleButton = showPasswordToggle && type === "password" && !disabled;
1490
+ const handleChange = (e) => {
1491
+ setInternalValue(e.target.value);
1492
+ onChange?.(e);
1493
+ };
1494
+ const handleClear = () => {
1495
+ setInternalValue("");
1496
+ onClear?.();
1497
+ const syntheticEvent = {
1498
+ target: { value: "" },
1499
+ currentTarget: { value: "" }
1500
+ };
1501
+ onChange?.(syntheticEvent);
1502
+ };
1503
+ const messageText = error || success || warning || helperText;
1504
+ const messageColor = error ? "text-destructive" : success ? "text-green-600 dark:text-green-400" : warning ? "text-amber-600 dark:text-amber-400" : "text-muted-foreground";
1505
+ return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", containerClassName), children: [
1506
+ label && /* @__PURE__ */ jsx("label", { className: cn(
1507
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
1508
+ disabled && "opacity-50",
1509
+ labelClassName
1510
+ ), children: label }),
1511
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1512
+ leftIcon && /* @__PURE__ */ jsx("div", { className: cn(
1513
+ "absolute left-0 top-0 h-full flex items-center justify-center",
1514
+ size === "sm" ? "w-8 pl-2" : size === "lg" ? "w-12 pl-4" : "w-10 pl-3",
1515
+ "text-muted-foreground pointer-events-none",
1516
+ "[&>*]:h-4 [&>*]:w-4"
1517
+ ), children: leftIcon }),
1518
+ /* @__PURE__ */ jsx(
1519
+ "input",
1520
+ {
1521
+ type: inputType,
1522
+ className: cn(
1523
+ inputVariants({ variant, size, state: currentState }),
1524
+ leftIcon && (size === "sm" ? "pl-8" : size === "lg" ? "pl-12" : "pl-10"),
1525
+ (rightIcon || showClearButton || showPasswordToggleButton) && (size === "sm" ? "pr-8" : size === "lg" ? "pr-12" : "pr-10"),
1526
+ className
1527
+ ),
1528
+ ref,
1529
+ value: value !== void 0 ? value : internalValue,
1530
+ onChange: handleChange,
1531
+ disabled,
1532
+ ...props
1533
+ }
1534
+ ),
1535
+ (rightIcon || showClearButton || showPasswordToggleButton) && /* @__PURE__ */ jsxs("div", { className: cn(
1536
+ "absolute right-0 top-0 h-full flex items-center justify-center gap-1",
1537
+ size === "sm" ? "w-8 pr-2" : size === "lg" ? "w-12 pr-4" : "w-10 pr-3"
1538
+ ), children: [
1539
+ rightIcon && !showClearButton && !showPasswordToggleButton && /* @__PURE__ */ jsx("div", { className: "text-muted-foreground [&>*]:h-4 [&>*]:w-4", children: rightIcon }),
1540
+ showClearButton && /* @__PURE__ */ jsx(
1541
+ "button",
1542
+ {
1543
+ type: "button",
1544
+ onClick: handleClear,
1545
+ className: "text-muted-foreground hover:text-foreground transition-colors [&>*]:h-4 [&>*]:w-4",
1546
+ tabIndex: -1,
1547
+ children: /* @__PURE__ */ jsx(X, {})
1548
+ }
1549
+ ),
1550
+ showPasswordToggleButton && /* @__PURE__ */ jsx(
1551
+ "button",
1552
+ {
1553
+ type: "button",
1554
+ onClick: () => setShowPassword(!showPassword),
1555
+ className: "text-muted-foreground hover:text-foreground transition-colors [&>*]:h-4 [&>*]:w-4",
1556
+ tabIndex: -1,
1557
+ children: showPassword ? /* @__PURE__ */ jsx(EyeOff, {}) : /* @__PURE__ */ jsx(Eye, {})
1558
+ }
1559
+ )
1560
+ ] })
1561
+ ] }),
1562
+ messageText && /* @__PURE__ */ jsx("p", { className: cn(
1563
+ "text-xs",
1564
+ messageColor,
1565
+ helperClassName
1566
+ ), children: messageText })
1567
+ ] });
1568
+ }
1569
+ );
1570
+ AtomicInput.displayName = "AtomicInput";
1571
+ var getSpacingClass2 = (spacing2, prefix) => {
1572
+ if (!spacing2) return "";
1573
+ if (typeof spacing2 === "string") {
1574
+ return `${prefix}-${spacing2}`;
1575
+ }
1576
+ const classes = [];
1577
+ if (spacing2.x !== void 0) classes.push(`${prefix}x-${spacing2.x}`);
1578
+ if (spacing2.y !== void 0) classes.push(`${prefix}y-${spacing2.y}`);
1579
+ if (spacing2.t !== void 0) classes.push(`${prefix}t-${spacing2.t}`);
1580
+ if (spacing2.r !== void 0) classes.push(`${prefix}r-${spacing2.r}`);
1581
+ if (spacing2.b !== void 0) classes.push(`${prefix}b-${spacing2.b}`);
1582
+ if (spacing2.l !== void 0) classes.push(`${prefix}l-${spacing2.l}`);
1583
+ return classes.join(" ");
1584
+ };
1585
+ var getSizeClasses = (size) => {
1586
+ switch (size) {
1587
+ case "sm":
1588
+ return {
1589
+ container: "text-sm",
1590
+ checkbox: "w-4 h-4",
1591
+ icon: 12
1592
+ };
1593
+ case "md":
1594
+ return {
1595
+ container: "text-base",
1596
+ checkbox: "w-5 h-5",
1597
+ icon: 14
1598
+ };
1599
+ case "lg":
1600
+ return {
1601
+ container: "text-lg",
1602
+ checkbox: "w-6 h-6",
1603
+ icon: 16
1604
+ };
1605
+ default:
1606
+ return {
1607
+ container: "text-base",
1608
+ checkbox: "w-5 h-5",
1609
+ icon: 14
1610
+ };
1611
+ }
1612
+ };
1613
+ var getColorClasses = (color, error) => {
1614
+ if (error) {
1615
+ return "border-red-300 text-red-600 focus:border-red-500 focus:ring-red-500";
1616
+ }
1617
+ const colorMap = {
1618
+ slate: "border-slate-300 text-slate-600 focus:border-slate-500 focus:ring-slate-500",
1619
+ gray: "border-gray-300 text-gray-600 focus:border-gray-500 focus:ring-gray-500",
1620
+ zinc: "border-zinc-300 text-zinc-600 focus:border-zinc-500 focus:ring-zinc-500",
1621
+ red: "border-red-300 text-red-600 focus:border-red-500 focus:ring-red-500",
1622
+ orange: "border-orange-300 text-orange-600 focus:border-orange-500 focus:ring-orange-500",
1623
+ yellow: "border-yellow-300 text-yellow-600 focus:border-yellow-500 focus:ring-yellow-500",
1624
+ green: "border-green-300 text-green-600 focus:border-green-500 focus:ring-green-500",
1625
+ blue: "border-blue-300 text-blue-600 focus:border-blue-500 focus:ring-blue-500",
1626
+ indigo: "border-indigo-300 text-indigo-600 focus:border-indigo-500 focus:ring-indigo-500",
1627
+ purple: "border-purple-300 text-purple-600 focus:border-purple-500 focus:ring-purple-500",
1628
+ pink: "border-pink-300 text-pink-600 focus:border-pink-500 focus:ring-pink-500"
1629
+ };
1630
+ return colorMap[color] || colorMap.blue;
1631
+ };
1632
+ var AtomicCheckbox = React5.forwardRef(
1633
+ ({
1634
+ checked = false,
1635
+ indeterminate = false,
1636
+ disabled = false,
1637
+ size = "md",
1638
+ color = "blue",
1639
+ p,
1640
+ m,
1641
+ label,
1642
+ description,
1643
+ error = false,
1644
+ errorMessage,
1645
+ className,
1646
+ onChange,
1647
+ id,
1648
+ ...rest
1649
+ }, ref) => {
1650
+ const checkboxId = id || `checkbox-${React5.useId()}`;
1651
+ const sizeClasses = getSizeClasses(size);
1652
+ const colorClasses = getColorClasses(color, error);
1653
+ const handleChange = (event) => {
1654
+ if (!disabled) {
1655
+ onChange?.(event.target.checked, event);
1656
+ }
1657
+ };
1658
+ const containerClasses = cn(
1659
+ "relative flex items-start",
1660
+ sizeClasses.container,
1661
+ getSpacingClass2(p, "p"),
1662
+ getSpacingClass2(m, "m"),
1663
+ disabled && "opacity-50 cursor-not-allowed",
1664
+ className
1665
+ );
1666
+ const checkboxClasses = cn(
1667
+ "flex-shrink-0 rounded border-2 bg-white transition-colors duration-200",
1668
+ sizeClasses.checkbox,
1669
+ colorClasses,
1670
+ "focus:outline-none focus:ring-2 focus:ring-offset-2",
1671
+ disabled ? "cursor-not-allowed" : "cursor-pointer",
1672
+ (checked || indeterminate) && !disabled && `bg-${color}-600 border-${color}-600`
1673
+ );
1674
+ return /* @__PURE__ */ jsxs("div", { className: containerClasses, children: [
1675
+ /* @__PURE__ */ jsx("div", { className: "flex items-center h-5", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1676
+ /* @__PURE__ */ jsx(
1677
+ "input",
1678
+ {
1679
+ ref,
1680
+ type: "checkbox",
1681
+ id: checkboxId,
1682
+ checked,
1683
+ disabled,
1684
+ onChange: handleChange,
1685
+ className: "sr-only",
1686
+ ...rest
1687
+ }
1688
+ ),
1689
+ /* @__PURE__ */ jsxs(
1690
+ "div",
1691
+ {
1692
+ className: checkboxClasses,
1693
+ onClick: () => {
1694
+ if (!disabled && ref && "current" in ref && ref.current) {
1695
+ ref.current.click();
1696
+ }
1697
+ },
1698
+ children: [
1699
+ checked && !indeterminate && /* @__PURE__ */ jsx(
1700
+ Check,
1701
+ {
1702
+ size: sizeClasses.icon,
1703
+ className: "text-white absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
1704
+ }
1705
+ ),
1706
+ indeterminate && /* @__PURE__ */ jsx(
1707
+ Minus,
1708
+ {
1709
+ size: sizeClasses.icon,
1710
+ className: "text-white absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
1711
+ }
1712
+ )
1713
+ ]
1714
+ }
1715
+ )
1716
+ ] }) }),
1717
+ (label || description) && /* @__PURE__ */ jsxs("div", { className: "ml-3 flex-1", children: [
1718
+ label && /* @__PURE__ */ jsx(
1719
+ "label",
1720
+ {
1721
+ htmlFor: checkboxId,
1722
+ className: cn(
1723
+ "block font-medium leading-5",
1724
+ error ? "text-red-700" : "text-gray-700",
1725
+ disabled ? "cursor-not-allowed" : "cursor-pointer"
1726
+ ),
1727
+ children: label
1728
+ }
1729
+ ),
1730
+ description && /* @__PURE__ */ jsx("p", { className: cn(
1731
+ "text-sm leading-5",
1732
+ error ? "text-red-600" : "text-gray-500"
1733
+ ), children: description }),
1734
+ error && errorMessage && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-red-600", children: errorMessage })
1735
+ ] })
1736
+ ] });
1737
+ }
1738
+ );
1739
+ AtomicCheckbox.displayName = "AtomicCheckbox";
1740
+ var getSpacingClass3 = (spacing2, prefix) => {
1741
+ if (!spacing2) return "";
1742
+ if (typeof spacing2 === "string") {
1743
+ return `${prefix}-${spacing2}`;
1744
+ }
1745
+ const classes = [];
1746
+ if (spacing2.x !== void 0) classes.push(`${prefix}x-${spacing2.x}`);
1747
+ if (spacing2.y !== void 0) classes.push(`${prefix}y-${spacing2.y}`);
1748
+ if (spacing2.t !== void 0) classes.push(`${prefix}t-${spacing2.t}`);
1749
+ if (spacing2.r !== void 0) classes.push(`${prefix}r-${spacing2.r}`);
1750
+ if (spacing2.b !== void 0) classes.push(`${prefix}b-${spacing2.b}`);
1751
+ if (spacing2.l !== void 0) classes.push(`${prefix}l-${spacing2.l}`);
1752
+ return classes.join(" ");
1753
+ };
1754
+ var getSizeClasses2 = (size) => {
1755
+ switch (size) {
1756
+ case "sm":
1757
+ return {
1758
+ track: "w-9 h-5",
1759
+ thumb: "w-4 h-4",
1760
+ thumbTranslate: "translate-x-4",
1761
+ container: "text-sm"
1762
+ };
1763
+ case "md":
1764
+ return {
1765
+ track: "w-11 h-6",
1766
+ thumb: "w-5 h-5",
1767
+ thumbTranslate: "translate-x-5",
1768
+ container: "text-base"
1769
+ };
1770
+ case "lg":
1771
+ return {
1772
+ track: "w-14 h-7",
1773
+ thumb: "w-6 h-6",
1774
+ thumbTranslate: "translate-x-7",
1775
+ container: "text-lg"
1776
+ };
1777
+ default:
1778
+ return {
1779
+ track: "w-11 h-6",
1780
+ thumb: "w-5 h-5",
1781
+ thumbTranslate: "translate-x-5",
1782
+ container: "text-base"
1783
+ };
1784
+ }
1785
+ };
1786
+ var getColorClasses2 = (color, checked) => {
1787
+ if (!checked) {
1788
+ return "bg-gray-200";
1789
+ }
1790
+ const colorMap = {
1791
+ slate: "bg-slate-500",
1792
+ gray: "bg-gray-500",
1793
+ zinc: "bg-zinc-500",
1794
+ red: "bg-red-500",
1795
+ orange: "bg-orange-500",
1796
+ yellow: "bg-yellow-500",
1797
+ green: "bg-green-500",
1798
+ blue: "bg-blue-500",
1799
+ indigo: "bg-indigo-500",
1800
+ purple: "bg-purple-500",
1801
+ pink: "bg-pink-500"
1802
+ };
1803
+ return colorMap[color] || colorMap.blue;
1804
+ };
1805
+ var AtomicSwitch = React5.forwardRef(
1806
+ ({
1807
+ checked = false,
1808
+ disabled = false,
1809
+ size = "md",
1810
+ color = "blue",
1811
+ p,
1812
+ m,
1813
+ label,
1814
+ description,
1815
+ labelPosition = "right",
1816
+ loading = false,
1817
+ className,
1818
+ onChange,
1819
+ id,
1820
+ ...rest
1821
+ }, ref) => {
1822
+ const switchId = id || `switch-${React5.useId()}`;
1823
+ const sizeClasses = getSizeClasses2(size);
1824
+ const colorClasses = getColorClasses2(color, checked);
1825
+ const handleChange = (event) => {
1826
+ if (!disabled && !loading) {
1827
+ onChange?.(event.target.checked, event);
1828
+ }
1829
+ };
1830
+ const containerClasses = cn(
1831
+ "relative flex items-center",
1832
+ sizeClasses.container,
1833
+ getSpacingClass3(p, "p"),
1834
+ getSpacingClass3(m, "m"),
1835
+ disabled && "opacity-50 cursor-not-allowed",
1836
+ className
1837
+ );
1838
+ const trackClasses = cn(
1839
+ "relative inline-flex flex-shrink-0 rounded-full border-2 border-transparent transition-colors ease-in-out duration-200",
1840
+ sizeClasses.track,
1841
+ colorClasses,
1842
+ "focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2",
1843
+ `focus-within:ring-${color}-500`,
1844
+ disabled || loading ? "cursor-not-allowed" : "cursor-pointer"
1845
+ );
1846
+ const thumbClasses = cn(
1847
+ "pointer-events-none inline-block rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200",
1848
+ sizeClasses.thumb,
1849
+ checked ? sizeClasses.thumbTranslate : "translate-x-0"
1850
+ );
1851
+ const switchElement = /* @__PURE__ */ jsxs("div", { className: trackClasses, children: [
1852
+ /* @__PURE__ */ jsx(
1853
+ "input",
1854
+ {
1855
+ ref,
1856
+ type: "checkbox",
1857
+ id: switchId,
1858
+ checked,
1859
+ disabled: disabled || loading,
1860
+ onChange: handleChange,
1861
+ className: "sr-only",
1862
+ ...rest
1863
+ }
1864
+ ),
1865
+ /* @__PURE__ */ jsx("span", { className: thumbClasses, children: loading && /* @__PURE__ */ jsxs(
1866
+ "svg",
1867
+ {
1868
+ className: "animate-spin -ml-1 -mt-1 h-3 w-3 text-gray-400",
1869
+ fill: "none",
1870
+ viewBox: "0 0 24 24",
1871
+ children: [
1872
+ /* @__PURE__ */ jsx(
1873
+ "circle",
1874
+ {
1875
+ className: "opacity-25",
1876
+ cx: "12",
1877
+ cy: "12",
1878
+ r: "10",
1879
+ stroke: "currentColor",
1880
+ strokeWidth: "4"
1881
+ }
1882
+ ),
1883
+ /* @__PURE__ */ jsx(
1884
+ "path",
1885
+ {
1886
+ className: "opacity-75",
1887
+ fill: "currentColor",
1888
+ 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"
1889
+ }
1890
+ )
1891
+ ]
1892
+ }
1893
+ ) })
1894
+ ] });
1895
+ const labelElement = (label || description) && /* @__PURE__ */ jsxs("div", { className: cn(
1896
+ "flex-1",
1897
+ labelPosition === "left" ? "mr-3" : "ml-3"
1898
+ ), children: [
1899
+ label && /* @__PURE__ */ jsx(
1900
+ "label",
1901
+ {
1902
+ htmlFor: switchId,
1903
+ className: cn(
1904
+ "block font-medium leading-5 text-gray-700",
1905
+ disabled || loading ? "cursor-not-allowed" : "cursor-pointer"
1906
+ ),
1907
+ children: label
1908
+ }
1909
+ ),
1910
+ description && /* @__PURE__ */ jsx("p", { className: "text-sm leading-5 text-gray-500", children: description })
1911
+ ] });
1912
+ return /* @__PURE__ */ jsxs("div", { className: containerClasses, children: [
1913
+ labelPosition === "left" && labelElement,
1914
+ switchElement,
1915
+ labelPosition === "right" && labelElement
1916
+ ] });
1917
+ }
1918
+ );
1919
+ AtomicSwitch.displayName = "AtomicSwitch";
1920
+ var spinnerVariants = cva("animate-spin", {
1921
+ variants: {
1922
+ size: {
1923
+ xs: "h-3 w-3",
1924
+ sm: "h-4 w-4",
1925
+ default: "h-5 w-5",
1926
+ lg: "h-6 w-6",
1927
+ xl: "h-8 w-8",
1928
+ xxl: "h-12 w-12"
1929
+ },
1930
+ color: {
1931
+ default: "text-foreground",
1932
+ primary: "text-primary",
1933
+ secondary: "text-secondary-foreground",
1934
+ muted: "text-muted-foreground",
1935
+ white: "text-white",
1936
+ success: "text-green-600",
1937
+ warning: "text-amber-600",
1938
+ error: "text-red-600"
1939
+ }
1940
+ },
1941
+ defaultVariants: {
1942
+ size: "default",
1943
+ color: "default"
1944
+ }
1945
+ });
1946
+ var AtomicSpinner = React5.forwardRef(
1947
+ ({
1948
+ className,
1949
+ size,
1950
+ color,
1951
+ label,
1952
+ inline = false,
1953
+ icon: Icon = Loader2,
1954
+ ...props
1955
+ }, ref) => {
1956
+ const spinner = /* @__PURE__ */ jsx(
1957
+ Icon,
1958
+ {
1959
+ ref,
1960
+ className: cn(spinnerVariants({ size, color }), className),
1961
+ ...props
1962
+ }
1963
+ );
1964
+ if (!label) {
1965
+ return spinner;
1966
+ }
1967
+ return /* @__PURE__ */ jsxs("div", { className: cn(
1968
+ "flex items-center gap-2",
1969
+ inline ? "inline-flex" : "flex"
1970
+ ), children: [
1971
+ spinner,
1972
+ /* @__PURE__ */ jsx("span", { className: cn(
1973
+ "text-sm",
1974
+ color === "muted" ? "text-muted-foreground" : color === "white" ? "text-white" : color === "primary" ? "text-primary" : "text-foreground"
1975
+ ), children: label })
1976
+ ] });
1977
+ }
1978
+ );
1979
+ AtomicSpinner.displayName = "AtomicSpinner";
1980
+ var AtomicButtonSpinner = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1981
+ AtomicSpinner,
1982
+ {
1983
+ ref,
1984
+ size: "sm",
1985
+ color: "white",
1986
+ className: cn("mr-2", className),
1987
+ ...props
1988
+ }
1989
+ ));
1990
+ AtomicButtonSpinner.displayName = "AtomicButtonSpinner";
1991
+ var AtomicPageSpinner = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsx(
1992
+ AtomicSpinner,
1993
+ {
1994
+ ref,
1995
+ size: "lg",
1996
+ className,
1997
+ ...props
1998
+ }
1999
+ ) }));
2000
+ AtomicPageSpinner.displayName = "AtomicPageSpinner";
2001
+ var AtomicInlineSpinner = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2002
+ AtomicSpinner,
2003
+ {
2004
+ ref,
2005
+ inline: true,
2006
+ size: "sm",
2007
+ color: "muted",
2008
+ className,
2009
+ ...props
2010
+ }
2011
+ ));
2012
+ AtomicInlineSpinner.displayName = "AtomicInlineSpinner";
2013
+ var badgeVariants = cva(
2014
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
2015
+ {
2016
+ variants: {
2017
+ variant: {
2018
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
2019
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
2020
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
2021
+ outline: "text-foreground border-current",
2022
+ success: "border-transparent bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-400",
2023
+ warning: "border-transparent bg-amber-100 text-amber-800 dark:bg-amber-900/20 dark:text-amber-400",
2024
+ info: "border-transparent bg-blue-100 text-blue-800 dark:bg-blue-900/20 dark:text-blue-400",
2025
+ gray: "border-transparent bg-gray-100 text-gray-800 dark:bg-gray-900/20 dark:text-gray-400"
2026
+ },
2027
+ size: {
2028
+ sm: "px-2 py-0.5 text-xs",
2029
+ default: "px-2.5 py-0.5 text-xs",
2030
+ lg: "px-3 py-1 text-sm"
2031
+ },
2032
+ shape: {
2033
+ default: "rounded-full",
2034
+ rounded: "rounded-md",
2035
+ square: "rounded-none"
2036
+ }
2037
+ },
2038
+ defaultVariants: {
2039
+ variant: "default",
2040
+ size: "default",
2041
+ shape: "default"
2042
+ }
2043
+ }
2044
+ );
2045
+ var AtomicBadge = React5.forwardRef(
2046
+ ({
2047
+ className,
2048
+ variant,
2049
+ size,
2050
+ shape,
2051
+ leftIcon,
2052
+ rightIcon,
2053
+ dot = false,
2054
+ dotColor,
2055
+ removable = false,
2056
+ onRemove,
2057
+ removeIcon,
2058
+ children,
2059
+ ...props
2060
+ }, ref) => {
2061
+ const iconSize = size === "sm" ? "h-3 w-3" : size === "lg" ? "h-4 w-4" : "h-3.5 w-3.5";
2062
+ const dotSize = size === "sm" ? "h-1.5 w-1.5" : size === "lg" ? "h-2.5 w-2.5" : "h-2 w-2";
2063
+ return /* @__PURE__ */ jsxs(
2064
+ "div",
2065
+ {
2066
+ ref,
2067
+ className: cn(badgeVariants({ variant, size, shape }), className),
2068
+ ...props,
2069
+ children: [
2070
+ dot && /* @__PURE__ */ jsx(
2071
+ "span",
2072
+ {
2073
+ className: cn(
2074
+ "mr-1.5 rounded-full",
2075
+ dotSize,
2076
+ !dotColor && (variant === "success" ? "bg-green-600" : variant === "warning" ? "bg-amber-600" : variant === "info" ? "bg-blue-600" : variant === "destructive" ? "bg-red-600" : variant === "gray" ? "bg-gray-600" : "bg-current")
2077
+ ),
2078
+ style: dotColor ? { backgroundColor: dotColor } : void 0
2079
+ }
2080
+ ),
2081
+ leftIcon && /* @__PURE__ */ jsx("span", { className: cn("mr-1 flex items-center", `[&>*]:${iconSize}`), children: leftIcon }),
2082
+ children,
2083
+ rightIcon && !removable && /* @__PURE__ */ jsx("span", { className: cn("ml-1 flex items-center", `[&>*]:${iconSize}`), children: rightIcon }),
2084
+ removable && /* @__PURE__ */ jsx(
2085
+ "button",
2086
+ {
2087
+ type: "button",
2088
+ onClick: onRemove,
2089
+ className: cn(
2090
+ "ml-1 flex items-center rounded-full hover:bg-black/10 dark:hover:bg-white/10",
2091
+ "transition-colors focus:outline-none focus:ring-1 focus:ring-current",
2092
+ size === "sm" ? "p-0.5" : "p-1"
2093
+ ),
2094
+ children: removeIcon ? /* @__PURE__ */ jsx("span", { className: cn("flex items-center", `[&>*]:${iconSize}`), children: removeIcon }) : /* @__PURE__ */ jsxs(
2095
+ "svg",
2096
+ {
2097
+ className: iconSize,
2098
+ viewBox: "0 0 24 24",
2099
+ fill: "none",
2100
+ stroke: "currentColor",
2101
+ strokeWidth: "2",
2102
+ strokeLinecap: "round",
2103
+ strokeLinejoin: "round",
2104
+ children: [
2105
+ /* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
2106
+ /* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
2107
+ ]
2108
+ }
2109
+ )
2110
+ }
2111
+ )
2112
+ ]
2113
+ }
2114
+ );
2115
+ }
2116
+ );
2117
+ AtomicBadge.displayName = "AtomicBadge";
2118
+ var AtomicStatusBadge = React5.forwardRef(({ status, variant, ...props }, ref) => {
2119
+ const statusConfig = {
2120
+ online: { variant: "success", dot: true, children: "Online" },
2121
+ offline: { variant: "gray", dot: true, children: "Offline" },
2122
+ busy: { variant: "destructive", dot: true, children: "Busy" },
2123
+ away: { variant: "warning", dot: true, children: "Away" }
2124
+ };
2125
+ const config = statusConfig[status];
2126
+ return /* @__PURE__ */ jsx(
2127
+ AtomicBadge,
2128
+ {
2129
+ ref,
2130
+ variant: variant || config.variant,
2131
+ dot: config.dot,
2132
+ ...props,
2133
+ children: props.children || config.children
2134
+ }
2135
+ );
2136
+ });
2137
+ AtomicStatusBadge.displayName = "AtomicStatusBadge";
2138
+ var AtomicCountBadge = React5.forwardRef(({ count, max = 99, ...props }, ref) => {
2139
+ const displayCount = count > max ? `${max}+` : count.toString();
2140
+ if (count <= 0) return null;
2141
+ return /* @__PURE__ */ jsx(
2142
+ AtomicBadge,
2143
+ {
2144
+ ref,
2145
+ variant: "destructive",
2146
+ size: "sm",
2147
+ ...props,
2148
+ children: displayCount
2149
+ }
2150
+ );
2151
+ });
2152
+ AtomicCountBadge.displayName = "AtomicCountBadge";
2153
+ var getSpacingClass4 = (spacing2, prefix) => {
2154
+ if (!spacing2) return "";
2155
+ if (typeof spacing2 === "string") {
2156
+ return `${prefix}-${spacing2}`;
2157
+ }
2158
+ const classes = [];
2159
+ if (spacing2.x !== void 0) classes.push(`${prefix}x-${spacing2.x}`);
2160
+ if (spacing2.y !== void 0) classes.push(`${prefix}y-${spacing2.y}`);
2161
+ if (spacing2.t !== void 0) classes.push(`${prefix}t-${spacing2.t}`);
2162
+ if (spacing2.r !== void 0) classes.push(`${prefix}r-${spacing2.r}`);
2163
+ if (spacing2.b !== void 0) classes.push(`${prefix}b-${spacing2.b}`);
2164
+ if (spacing2.l !== void 0) classes.push(`${prefix}l-${spacing2.l}`);
2165
+ return classes.join(" ");
2166
+ };
2167
+ var getVariantClasses = (variant, color) => {
2168
+ const baseColor = color || "gray";
2169
+ switch (variant) {
2170
+ case "primary":
2171
+ return `bg-blue-500 text-white border-blue-500`;
2172
+ case "secondary":
2173
+ return `bg-gray-500 text-white border-gray-500`;
2174
+ case "success":
2175
+ return `bg-green-500 text-white border-green-500`;
2176
+ case "warning":
2177
+ return `bg-yellow-500 text-white border-yellow-500`;
2178
+ case "danger":
2179
+ return `bg-red-500 text-white border-red-500`;
2180
+ case "info":
2181
+ return `bg-blue-500 text-white border-blue-500`;
2182
+ case "outline":
2183
+ return `bg-transparent text-${baseColor}-700 border-${baseColor}-300 border`;
2184
+ case "ghost":
2185
+ return `bg-${baseColor}-100 text-${baseColor}-700 border-transparent`;
2186
+ case "solid":
2187
+ return `bg-${baseColor}-500 text-white border-${baseColor}-500`;
2188
+ default:
2189
+ return `bg-gray-100 text-gray-800 border-gray-200 border`;
2190
+ }
2191
+ };
2192
+ var getSizeClasses3 = (size) => {
2193
+ switch (size) {
2194
+ case "xs":
2195
+ return "px-1.5 py-0.5 text-xs";
2196
+ case "sm":
2197
+ return "px-2 py-1 text-xs";
2198
+ case "md":
2199
+ return "px-2.5 py-1.5 text-sm";
2200
+ case "lg":
2201
+ return "px-3 py-2 text-base";
2202
+ default:
2203
+ return "px-2.5 py-1.5 text-sm";
2204
+ }
2205
+ };
2206
+ var getIconSize = (size) => {
2207
+ switch (size) {
2208
+ case "xs":
2209
+ return 10;
2210
+ case "sm":
2211
+ return 12;
2212
+ case "md":
2213
+ return 14;
2214
+ case "lg":
2215
+ return 16;
2216
+ default:
2217
+ return 14;
2218
+ }
2219
+ };
2220
+ var AtomicTag = React5.forwardRef(
2221
+ ({
2222
+ children,
2223
+ variant = "default",
2224
+ size = "md",
2225
+ color,
2226
+ leftIcon: LeftIcon,
2227
+ rightIcon: RightIcon,
2228
+ p,
2229
+ m,
2230
+ clickable = false,
2231
+ removable = false,
2232
+ onRemove,
2233
+ disabled = false,
2234
+ as: Component = "span",
2235
+ className,
2236
+ onClick,
2237
+ ...rest
2238
+ }, ref) => {
2239
+ const iconSize = getIconSize(size);
2240
+ const classes = cn(
2241
+ "inline-flex items-center justify-center font-medium rounded-md transition-colors duration-200",
2242
+ getVariantClasses(variant, color),
2243
+ getSizeClasses3(size),
2244
+ getSpacingClass4(p, "p"),
2245
+ getSpacingClass4(m, "m"),
2246
+ clickable && !disabled && [
2247
+ "cursor-pointer",
2248
+ "hover:opacity-80",
2249
+ "focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
2250
+ ],
2251
+ removable && !disabled && "pr-1",
2252
+ disabled && "opacity-50 cursor-not-allowed",
2253
+ className
2254
+ );
2255
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
2256
+ LeftIcon && /* @__PURE__ */ jsx(
2257
+ LeftIcon,
2258
+ {
2259
+ size: iconSize,
2260
+ className: cn(
2261
+ "flex-shrink-0",
2262
+ children ? "mr-1.5" : ""
2263
+ )
2264
+ }
2265
+ ),
2266
+ children && /* @__PURE__ */ jsx("span", { className: "truncate", children }),
2267
+ RightIcon && /* @__PURE__ */ jsx(
2268
+ RightIcon,
2269
+ {
2270
+ size: iconSize,
2271
+ className: cn(
2272
+ "flex-shrink-0",
2273
+ children ? "ml-1.5" : ""
2274
+ )
2275
+ }
2276
+ ),
2277
+ removable && /* @__PURE__ */ jsx(
2278
+ "button",
2279
+ {
2280
+ type: "button",
2281
+ className: cn(
2282
+ "flex-shrink-0 ml-1.5 rounded-full p-0.5",
2283
+ "hover:bg-black hover:bg-opacity-20",
2284
+ "focus:outline-none focus:bg-black focus:bg-opacity-20",
2285
+ disabled && "cursor-not-allowed"
2286
+ ),
2287
+ onClick: (e) => {
2288
+ e.stopPropagation();
2289
+ if (!disabled) onRemove?.();
2290
+ },
2291
+ disabled,
2292
+ "aria-label": "Remove",
2293
+ children: /* @__PURE__ */ jsx(
2294
+ "svg",
2295
+ {
2296
+ className: "w-3 h-3",
2297
+ fill: "none",
2298
+ stroke: "currentColor",
2299
+ viewBox: "0 0 24 24",
2300
+ children: /* @__PURE__ */ jsx(
2301
+ "path",
2302
+ {
2303
+ strokeLinecap: "round",
2304
+ strokeLinejoin: "round",
2305
+ strokeWidth: 2,
2306
+ d: "M6 18L18 6M6 6l12 12"
2307
+ }
2308
+ )
2309
+ }
2310
+ )
2311
+ }
2312
+ )
2313
+ ] });
2314
+ const handleClick = (e) => {
2315
+ if (!disabled) {
2316
+ onClick?.(e);
2317
+ }
2318
+ };
2319
+ return /* @__PURE__ */ jsx(
2320
+ Component,
2321
+ {
2322
+ ref,
2323
+ className: classes,
2324
+ onClick: clickable ? handleClick : void 0,
2325
+ ...rest,
2326
+ children: content
2327
+ }
2328
+ );
2329
+ }
2330
+ );
2331
+ AtomicTag.displayName = "AtomicTag";
2332
+ var linkVariants = cva("transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", {
2333
+ variants: {
2334
+ variant: {
2335
+ default: "text-foreground hover:text-foreground/80",
2336
+ primary: "text-primary hover:text-primary/80",
2337
+ secondary: "text-secondary-foreground hover:text-secondary-foreground/80",
2338
+ muted: "text-muted-foreground hover:text-foreground",
2339
+ destructive: "text-destructive hover:text-destructive/80",
2340
+ ghost: "text-foreground hover:bg-accent hover:text-accent-foreground",
2341
+ underline: "text-primary underline underline-offset-4 hover:text-primary/80",
2342
+ button: "inline-flex items-center justify-center rounded-md text-sm font-medium h-10 px-4 py-2 bg-primary text-primary-foreground hover:bg-primary/90"
2343
+ },
2344
+ size: {
2345
+ default: "",
2346
+ sm: "text-sm",
2347
+ lg: "text-lg",
2348
+ xl: "text-xl"
2349
+ },
2350
+ weight: {
2351
+ normal: "font-normal",
2352
+ medium: "font-medium",
2353
+ semibold: "font-semibold",
2354
+ bold: "font-bold"
2355
+ }
2356
+ },
2357
+ defaultVariants: {
2358
+ variant: "default",
2359
+ size: "default",
2360
+ weight: "normal"
2361
+ }
2362
+ });
2363
+ var AtomicLink = React5.forwardRef(({
2364
+ className,
2365
+ variant,
2366
+ size,
2367
+ weight,
2368
+ external = false,
2369
+ showExternalIcon = false,
2370
+ prefetch = true,
2371
+ externalIcon,
2372
+ children,
2373
+ href,
2374
+ ...props
2375
+ }, ref) => {
2376
+ const isExternalUrl = typeof href === "string" && (href.startsWith("http") || href.startsWith("//"));
2377
+ const shouldBeExternal = external || isExternalUrl;
2378
+ const linkProps = {
2379
+ className: cn(linkVariants({ variant, size, weight }), className),
2380
+ ref,
2381
+ ...props
2382
+ };
2383
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
2384
+ children,
2385
+ shouldBeExternal && showExternalIcon && /* @__PURE__ */ jsx("span", { className: "ml-1 inline-block", children: externalIcon || /* @__PURE__ */ jsx(
2386
+ "svg",
2387
+ {
2388
+ className: "h-3 w-3",
2389
+ fill: "none",
2390
+ stroke: "currentColor",
2391
+ viewBox: "0 0 24 24",
2392
+ xmlns: "http://www.w3.org/2000/svg",
2393
+ children: /* @__PURE__ */ jsx(
2394
+ "path",
2395
+ {
2396
+ strokeLinecap: "round",
2397
+ strokeLinejoin: "round",
2398
+ strokeWidth: 2,
2399
+ d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
2400
+ }
2401
+ )
2402
+ }
2403
+ ) })
2404
+ ] });
2405
+ if (shouldBeExternal) {
2406
+ return /* @__PURE__ */ jsx(
2407
+ "a",
2408
+ {
2409
+ href,
2410
+ target: "_blank",
2411
+ rel: "noopener noreferrer",
2412
+ ...linkProps,
2413
+ children: content
2414
+ }
2415
+ );
2416
+ }
2417
+ return /* @__PURE__ */ jsx(
2418
+ Link,
2419
+ {
2420
+ href,
2421
+ prefetch,
2422
+ ...linkProps,
2423
+ children: content
2424
+ }
2425
+ );
2426
+ });
2427
+ AtomicLink.displayName = "AtomicLink";
2428
+ var getSpacingClass5 = (spacing2, prefix) => {
2429
+ if (!spacing2) return "";
2430
+ if (typeof spacing2 === "string") {
2431
+ return `${prefix}-${spacing2}`;
2432
+ }
2433
+ const classes = [];
2434
+ if (spacing2.x !== void 0) classes.push(`${prefix}x-${spacing2.x}`);
2435
+ if (spacing2.y !== void 0) classes.push(`${prefix}y-${spacing2.y}`);
2436
+ if (spacing2.t !== void 0) classes.push(`${prefix}t-${spacing2.t}`);
2437
+ if (spacing2.r !== void 0) classes.push(`${prefix}r-${spacing2.r}`);
2438
+ if (spacing2.b !== void 0) classes.push(`${prefix}b-${spacing2.b}`);
2439
+ if (spacing2.l !== void 0) classes.push(`${prefix}l-${spacing2.l}`);
2440
+ return classes.join(" ");
2441
+ };
2442
+ var AtomicDiv = React5.forwardRef(
2443
+ ({
2444
+ d,
2445
+ align,
2446
+ justify,
2447
+ flexDir,
2448
+ flexWrap,
2449
+ flexGrow,
2450
+ flexShrink,
2451
+ order,
2452
+ p,
2453
+ m,
2454
+ w,
2455
+ h,
2456
+ minW,
2457
+ minH,
2458
+ maxW,
2459
+ maxH,
2460
+ bg,
2461
+ bgGradient,
2462
+ border,
2463
+ borderColor,
2464
+ rounded,
2465
+ shadow,
2466
+ position,
2467
+ top,
2468
+ right,
2469
+ bottom,
2470
+ left,
2471
+ cursor,
2472
+ as: Component = "div",
2473
+ className,
2474
+ children,
2475
+ ...rest
2476
+ }, ref) => {
2477
+ const classes = cn(
2478
+ d && `${d === "flex" ? "flex" : d === "inline-flex" ? "inline-flex" : d === "grid" ? "grid" : d === "hidden" ? "hidden" : d === "inline" ? "inline" : d === "inline-block" ? "inline-block" : "block"}`,
2479
+ align && `items-${align === "start" ? "start" : align === "end" ? "end" : align === "center" ? "center" : align === "baseline" ? "baseline" : "stretch"}`,
2480
+ justify && `justify-${justify === "start" ? "start" : justify === "end" ? "end" : justify === "center" ? "center" : justify === "between" ? "between" : justify === "around" ? "around" : "evenly"}`,
2481
+ flexDir && `flex-${flexDir === "col" ? "col" : flexDir === "col-reverse" ? "col-reverse" : flexDir === "row-reverse" ? "row-reverse" : "row"}`,
2482
+ flexWrap && `flex-${flexWrap}`,
2483
+ flexGrow !== void 0 && `flex-grow-${flexGrow}`,
2484
+ flexShrink !== void 0 && `flex-shrink-${flexShrink}`,
2485
+ order !== void 0 && `order-${order}`,
2486
+ getSpacingClass5(p, "p"),
2487
+ getSpacingClass5(m, "m"),
2488
+ w && `w-${w}`,
2489
+ h && `h-${h}`,
2490
+ minW && `min-w-${minW}`,
2491
+ minH && `min-h-${minH}`,
2492
+ maxW && `max-w-${maxW}`,
2493
+ maxH && `max-h-${maxH}`,
2494
+ bg && `bg-${bg}`,
2495
+ bgGradient,
2496
+ border === true && "border",
2497
+ typeof border === "string" && border,
2498
+ borderColor && `border-${borderColor}`,
2499
+ rounded && `rounded${rounded === "none" ? "-none" : rounded === "full" ? "-full" : rounded === "sm" ? "-sm" : rounded === "md" ? "" : `-${rounded}`}`,
2500
+ shadow && `shadow${shadow === "none" ? "-none" : shadow === "sm" ? "-sm" : shadow === "md" ? "" : shadow === "inner" ? "-inner" : `-${shadow}`}`,
2501
+ position && `${position}`,
2502
+ top !== void 0 && `top-${top}`,
2503
+ right !== void 0 && `right-${right}`,
2504
+ bottom !== void 0 && `bottom-${bottom}`,
2505
+ left !== void 0 && `left-${left}`,
2506
+ cursor && `cursor-${cursor}`,
2507
+ className
2508
+ );
2509
+ return React5.createElement(
2510
+ Component,
2511
+ {
2512
+ ref,
2513
+ className: classes,
2514
+ ...rest
2515
+ },
2516
+ children
2517
+ );
2518
+ }
2519
+ );
2520
+ AtomicDiv.displayName = "AtomicDiv";
2521
+ var AtomicThemeProviderContext = createContext(void 0);
2522
+ var AtomicThemeProvider = ({
2523
+ children,
2524
+ defaultTheme = "system",
2525
+ storageKey = "atomic-theme",
2526
+ attribute = "data-theme",
2527
+ enableSystem = true,
2528
+ disableTransitionOnChange = false
2529
+ }) => {
2530
+ const [theme, setThemeState] = useState(() => {
2531
+ if (typeof window === "undefined") return defaultTheme;
2532
+ try {
2533
+ const stored = localStorage.getItem(storageKey);
2534
+ if (stored && ["light", "dark", "system"].includes(stored)) {
2535
+ return stored;
2536
+ }
2537
+ } catch {
2538
+ }
2539
+ return defaultTheme;
2540
+ });
2541
+ const [actualTheme, setActualTheme] = useState("light");
2542
+ const getSystemTheme = () => {
2543
+ if (typeof window === "undefined") return "light";
2544
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
2545
+ };
2546
+ const setTheme = (newTheme) => {
2547
+ try {
2548
+ localStorage.setItem(storageKey, newTheme);
2549
+ } catch {
2550
+ }
2551
+ setThemeState(newTheme);
2552
+ };
2553
+ useEffect(() => {
2554
+ const root = window.document.documentElement;
2555
+ const resolvedTheme = theme === "system" && enableSystem ? getSystemTheme() : theme;
2556
+ setActualTheme(resolvedTheme);
2557
+ if (disableTransitionOnChange) {
2558
+ const css = document.createElement("style");
2559
+ css.appendChild(
2560
+ document.createTextNode(
2561
+ "* { transition: none !important; transform: none !important; animation: none !important; }"
2562
+ )
2563
+ );
2564
+ document.head.appendChild(css);
2565
+ requestAnimationFrame(() => {
2566
+ requestAnimationFrame(() => {
2567
+ document.head.removeChild(css);
2568
+ });
2569
+ });
2570
+ }
2571
+ root.setAttribute(attribute, resolvedTheme);
2572
+ root.classList.remove("light", "dark");
2573
+ root.classList.add(resolvedTheme);
2574
+ }, [theme, attribute, enableSystem, disableTransitionOnChange]);
2575
+ useEffect(() => {
2576
+ if (!enableSystem || theme !== "system") return;
2577
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
2578
+ const handleChange = () => {
2579
+ const systemTheme = getSystemTheme();
2580
+ setActualTheme(systemTheme);
2581
+ const root = window.document.documentElement;
2582
+ root.setAttribute(attribute, systemTheme);
2583
+ root.classList.remove("light", "dark");
2584
+ root.classList.add(systemTheme);
2585
+ };
2586
+ mediaQuery.addEventListener("change", handleChange);
2587
+ return () => mediaQuery.removeEventListener("change", handleChange);
2588
+ }, [theme, attribute, enableSystem]);
2589
+ const value = {
2590
+ theme,
2591
+ setTheme,
2592
+ actualTheme
2593
+ };
2594
+ return /* @__PURE__ */ jsx(AtomicThemeProviderContext.Provider, { value, children });
2595
+ };
2596
+ var useAtomicTheme = () => {
2597
+ const context = useContext(AtomicThemeProviderContext);
2598
+ if (context === void 0) {
2599
+ throw new Error("useAtomicTheme must be used within an AtomicThemeProvider");
2600
+ }
2601
+ return context;
2602
+ };
2603
+
2604
+ // src/index.ts
2605
+ var VERSION = "2.0.0";
2606
+
2607
+ export { AnimationUtils, AtomicAlertType, AtomicAlignment, AtomicAnimationPresets, AtomicAnimationState, AtomicAnimations, AtomicAnimationsCss, AtomicAvatar, AtomicAvatarFallback, AtomicAvatarImage, AtomicBadge, AtomicBorders, AtomicBordersCss, AtomicBreakpoint, AtomicButton, AtomicButtonSpinner, AtomicButtonVariant, AtomicCard, AtomicCardContent, AtomicCardDescription, AtomicCardFooter, AtomicCardHeader, AtomicCardTitle, AtomicCardVariant, AtomicCheckbox, AtomicColorVariant, AtomicColorsCss, AtomicCountBadge, AtomicDesignTokensCss, AtomicDirection, AtomicDiv, AtomicEnumUtils, AtomicFormFieldState, AtomicIcon, AtomicImage, AtomicInlineSpinner, AtomicInput, AtomicInputVariant, AtomicLink, AtomicLoadingState, AtomicModalSize, AtomicOrientation, AtomicPageSpinner, AtomicPosition, AtomicShadows, AtomicShadowsCss, AtomicSize, AtomicSpacingCss, AtomicSpinner, AtomicStatus, AtomicStatusBadge, AtomicSwitch, AtomicTag, AtomicText, AtomicTextVariant, AtomicThemeMode, AtomicThemeProvider, AtomicTypographyCss, BorderUtils, ShadowUtils, VERSION, avatarImageVariants, avatarVariants, badgeVariants, buttonVariants, cardDescriptionVariants, cardHeaderVariants, cardTitleVariants, cardVariants, cn, inputVariants, linkVariants, spinnerVariants, textVariants, useAtomicTheme };
2608
+ //# sourceMappingURL=index.mjs.map
3
2609
  //# sourceMappingURL=index.mjs.map