Assist_Design/apps/portal/public/storybook/assets/AlertBanner-Bnlyj1xc.js
Temuulen Ankhbayar e704488eb9 chore: add Storybook static build output
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:25:18 +09:00

2 lines
2.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{F as g}from"./XCircleIcon-CiVBnngB.js";import{F as b}from"./ExclamationTriangleIcon-Di4DJZFg.js";import{F as w}from"./InformationCircleIcon-Clz7d-56.js";import{F as v}from"./CheckCircleIcon-Dva35lTP.js";const j={success:{bg:"bg-success-soft",border:"border-success/30",text:"text-success",icon:"text-success",Icon:v},info:{bg:"bg-info-soft",border:"border-info/30",text:"text-info",icon:"text-info",Icon:w},warning:{bg:"bg-warning-soft",border:"border-warning/35",text:"text-foreground",icon:"text-warning",Icon:b},error:{bg:"bg-danger-soft",border:"border-danger/30",text:"text-danger",icon:"text-danger",Icon:g}};function N({variant:s="info",title:a,children:t,icon:n,size:i="md",elevated:d=!1,onClose:o,className:l,...c}){const r=j[s],m=r.Icon,u=i==="sm"?"p-3":"p-4",f="rounded-xl",p=d?"shadow-sm":"",x=s==="error"||s==="warning"?"alert":"status";return e.jsx("div",{className:[f,u,"border",p,r.bg,r.border,l].filter(Boolean).join(" "),role:x,...c,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5 flex-shrink-0",children:n||e.jsx(m,{className:["h-5 w-5",r.icon].join(" ")})}),e.jsxs("div",{className:"flex-1",children:[a&&e.jsx("p",{className:["font-medium",r.text].join(" "),children:a}),t&&e.jsx("div",{className:["text-sm mt-1 text-foreground/80"].join(" "),children:t})]}),o&&e.jsx("button",{onClick:o,"aria-label":"Close alert",className:"text-muted-foreground hover:text-foreground transition-colors",children:"×"})]})})}N.__docgenInfo={description:"",methods:[],displayName:"AlertBanner",props:{variant:{required:!1,tsType:{name:"union",raw:'"success" | "info" | "warning" | "error"',elements:[{name:"literal",value:'"success"'},{name:"literal",value:'"info"'},{name:"literal",value:'"warning"'},{name:"literal",value:'"error"'}]},description:"",defaultValue:{value:'"info"',computed:!1}},title:{required:!1,tsType:{name:"string"},description:""},children:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},icon:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},size:{required:!1,tsType:{name:"union",raw:'"sm" | "md"',elements:[{name:"literal",value:'"sm"'},{name:"literal",value:'"md"'}]},description:"",defaultValue:{value:'"md"',computed:!1}},elevated:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onClose:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};export{N as A};