@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
1 lines • 2.3 kB
JavaScript
import{Rn as e,V as t,dn as n,en as r,st as i,wt as a}from"./ErrorBlock-CuwX01Wv.js";import{D as o,M as s,S as c,a as l,j as u,m as d,s as f,w as p,x as m,y as h}from"./web-BWdORzMO.js";var g=e(n(),1),_=d(`<div>`),v=d(`<div><span></span><p class="text-sm text-current">`),y=e=>{let n=u(()=>e.alerts.some(e=>e.show));return o(c,{get when(){return n()},get children(){var n=_();return f(n,o(h,{get each(){return e.alerts},children:({type:n,message:u,show:d})=>o(c,{when:d,get children(){var c=v(),d=c.firstChild,h=d.nextSibling;return f(d,o(p,{get children(){return[o(m,{when:n===`success`,get children(){return o(t,{size:8})}}),o(m,{when:n===`error`,get children(){return o(i,{size:8})}}),o(m,{when:n===`warning`,get children(){return o(r,{size:8})}}),o(m,{when:n===`info`,get children(){return o(a,{size:8})}})]}})),f(h,u),s(t=>{var r=(0,g.default)(`flex items-center border-border`,{"mb-2 last:mb-0 bg-background-base border rounded-md p-4":e.style===`block`,"border-b md:px-6 px-4 py-4":e.style===`layout`,"rounded-full px-4 py-2 shadow-lg pointer-events-auto":e.style===`pill`,"bg-warning-base text-warning-contrast":n===`warning`&&(e.style===`layout`||e.style===`pill`),"bg-error-base text-error-contrast":n===`error`&&(e.style===`layout`||e.style===`pill`),"bg-primary-base text-primary-contrast":(n===`success`||n===`info`)&&(e.style===`layout`||e.style===`pill`),"rounded-b-md":e.roundedBottom}),i=(0,g.default)(`size-5 flex items-center justify-center rounded-full min-w-5 mr-2`,{"bg-primary-base text-primary-contrast":(n===`success`||n===`info`)&&e.style===`block`,"bg-error-base text-error-contrast":n===`error`&&e.style===`block`,"bg-warning-base text-primary-contrast":n===`warning`&&e.style===`block`,"bg-primary-contrast text-primary-base":(n===`success`||n===`info`)&&(e.style===`layout`||e.style===`pill`),"bg-error-contrast text-error-base":n===`error`&&(e.style===`layout`||e.style===`pill`),"bg-warning-contrast text-warning-base":n===`warning`&&(e.style===`layout`||e.style===`pill`)});return r!==t.e&&l(c,t.e=r),i!==t.t&&l(d,t.t=i),t},{e:void 0,t:void 0}),c}})})),s(()=>l(n,(0,g.default)({"w-full mb-4 last:mb-0":e.style===`block`,"fixed bottom-6 left-0 md:left-55 right-0 z-30 flex justify-center gap-4 pointer-events-none px-4":e.style===`pill`},e.class))),n}})};export{y as t};