PageSourceSearch

https://andreas-apotheke-hh.de/ia/lib/Alert.vue_vue_type_script_setup_true_lang.Bpdqk322.js

js andreas-apotheke-hh.de collected 2026-10-06 16:33:15 UTC 3,288 bytes, 1 lines download raw bytes

1import{I as S}from"./Button.C_oze0Jn.js";import{_ as k}from"./Paragraph.vue_vue_type_script_setup_true_lang.BMUsrxnn.js";import{k as x,M as r,N as i,Z as s,O as a,U as A,S as d,x as j,R as y,Q as g,V as B,W,Y as l,c as n,j as T}from"./vue-vendor.BqpWRvtD.js";import{s as $}from"./define-custom-element.9QNbOX-B.js";const N=x({__name:"AlertCloseButton",props:{color:{type:String}},setup:e=>(t,n)=>(r(),i("div",{p:"0.75 sm:1.25",flex:"center",cursor:"pointer",class:s(["transition-default",e.color])},[...n[0]||(n[0]=[a("i",{"i-fas:xmark":"",h:"2.5 sm:4"},null,-1)])],2))}),O=["p"],V=["innerHTML"],H=x({__name:"Alert",props:{type:{type:String},closable:{type:Boolean},icon:{type:String},actionText:{type:String},label:{type:String},fullWidth:{type:Boolean},textAlign:{type:String},containerClass:{type:[String,Object,Array]},contentClass:{type:[String,Object,Array]},innerContentClass:{type:[String,Object,Array]},textClass:{type:[String,Object,Array]},stretched:{type:Boolean},preventClose:{type:Boolean}},emits:["action","close"],setup(e,{emit:t}){const o=e,c=t,u=n((()=>"failure"===o.type?"error":o.type)),p=n((()=>{switch(o.type){case"success":return"bg-success-50 text-success-500";case"error":case"failure":return"bg-primaryRed-50 text-primaryRed-700";case"warning":return"bg-warning-100 text-warning-800";case"info":return"bg-info-50 text-info-800";default:return""}})),m=n((()=>{switch(o.type){case"success":return"text-success-300";case"error":case"failure":return"text-primaryRed-600";case"warning":return"text-warning-600";case"info":return"text-info-800";default:return""}})),f=n((()=>{switch(o.textAlign){case"start":return"justify-start";case"center":return"justify-center";case"end":return"justify-end";default:return""}})),x=n((()=>o.fullWidth?"w-full":"w-full sm:max-w-277.5 sm:mx-auto")),v=T(!0),h=()=>{o.preventClose||$(v,!1),c("close")};return(t,n)=>v.value?(r(),i("div",A({key:0},t.$attrs,{pos:"relative",p:"x-4 y-2 sm:x-6 sm:y-3",font:"medium",justify:"between","overflow-hidden":"",class:["leading-4.5 ia-block rounded-lg",[x.value,p.value,e.containerClass]]}),[a("div",{flex:"~ sm:gap-6",mx:"auto","max-w":"1110px",class:s([{"justify-center":e.fullWidth},{"pr-10 sm:pr-0":e.closable}])},[a("div",{"w-full":"",flex:"vcenter row gap-2 sm:gap-4",p:e.fullWidth&&e.stretched?"r-10":"",class:s([f.value,e.contentClass])},[d(t.$slots,"icon",{},(()=>[e.icon?(r(),i("i",{key:0,class:s(["w-4 h-4 sm:w-6 sm:h-6",[e.icon]]),"shrink-0":""},null,2)):l("",!0)])),a("div",{flex:"vcenter col gap-2 sm:row sm:gap-6",class:s(e.innerContentClass)},[j(k,{color:"inherit",class:s(["font-500",e.textClass]),"responsive-size":{smDown:"sm"}},{default:y((()=>[d(t.$slots,"default",{},(()=>[a("p",{innerHTML:e.label},null,8,V)]))])),_:3},8,["class"]),e.actionText?(r(),g(S,{key:0,variant:u.value,size:"sm","min-w":"fit",class:s({"translate-x-3.6 sm:translate-x-0":e.closable}),onClick:n[0]||(n[0]=e=>c("action"))},{default:y((()=>[B(W(e.actionText),1)])),_:1},8,["variant","class"])):l("",!0)],2)],10,O),e.closable?(r(),g(N,{key:0,pos:e.fullWidth&&e.stretched?"absolute right-6 top-2 sm:top-50%":"absolute right-4 top-2 sm:unset",color:m.value,class:s(e.fullWidth&&e.stretched?"sm:-translate-y-50%":""),onClick:h},null,8,["pos","color","class"])):l("",!0)],2)],16)):l("",!0)}});export{H as _};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.