{"version":3,"file":"index.cjs","names":["React"],"sources":["../../../src/components/Callout/Callout.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\n\ntype CalloutVariant = \"info\" | \"danger\" | \"warning\" | \"success\" | \"neutral\";\n\nexport interface CalloutProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n  variant?: CalloutVariant;\n  title?: React.ReactNode;\n  description?: React.ReactNode;\n  /** Auto-dismiss after N milliseconds. CSS-only fade + collapse. */\n  duration?: number;\n}\n\nconst variantMap: Record<CalloutVariant, string> = {\n  info: \"openui-callout-info\",\n  danger: \"openui-callout-danger\",\n  warning: \"openui-callout-warning\",\n  success: \"openui-callout-success\",\n  neutral: \"openui-callout-neutral\",\n};\n\nexport const Callout = React.forwardRef<HTMLDivElement, CalloutProps>((props, ref) => {\n  const { className, variant = \"neutral\", title, description, duration, style, ...rest } = props;\n\n  const dismissStyle = duration\n    ? ({ ...style, \"--callout-duration\": `${duration}ms` } as React.CSSProperties)\n    : style;\n\n  return (\n    <div\n      ref={ref}\n      className={clsx(\n        \"openui-callout\",\n        variantMap[variant],\n        duration && \"openui-callout-autodismiss\",\n        className,\n      )}\n      style={dismissStyle}\n      {...rest}\n    >\n      {title && <span className=\"openui-callout-title\">{title}</span>}\n      {description && <span className=\"openui-callout-description\">{description}</span>}\n    </div>\n  );\n});\n"],"mappings":";;;;;;;;AAaA,MAAM,aAA6C;CACjD,MAAM;CACN,QAAQ;CACR,SAAS;CACT,SAAS;CACT,SAAS;CACV;AAED,MAAa,UAAUA,MAAAA,QAAM,YAA0C,OAAO,QAAQ;CACpF,MAAM,EAAE,WAAW,UAAU,WAAW,OAAO,aAAa,UAAU,OAAO,GAAG,SAAS;CAEzF,MAAM,eAAe,WAChB;EAAE,GAAG;EAAO,sBAAsB,GAAG,SAAS;EAAK,GACpD;AAEJ,QACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACO;EACL,YAAA,GAAA,KAAA,SACE,kBACA,WAAW,UACX,YAAY,8BACZ,UACD;EACD,OAAO;EACP,GAAI;YATN,CAWG,SAAS,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;aAAwB;GAAa,CAAA,EAC9D,eAAe,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;aAA8B;GAAmB,CAAA,CAC7E;;EAER"}