Skip to content

BillionMail gives you open-source MailServer, NewsLetter, Email Marketing — fully self-hosted, dev-friendly, and free from monthly fees. Join the discord: https://discord.gg/asfXzBUhZr

13.1 KB
Raw Blame
"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([["1799"],{93953:function(t,e,r){r.d(e,{Z:()=>p});var o=r(65083),i=r(58786),a=r(56946),n=r(54470),l=r(51048),d=r(71309),c=r(60951),s=r(6445),u=r(73238);let h={name:"Flex",self:function(){return u.Z}},b=Object.assign(Object.assign({},a.Z.props),{align:String,justify:{type:String,default:"start"},inline:Boolean,vertical:Boolean,reverse:Boolean,size:{type:[String,Number,Array],default:"medium"},wrap:{type:Boolean,default:!0}}),p=(0,i.aZ)({name:"Flex",props:b,setup(t){let{mergedClsPrefixRef:e,mergedRtlRef:r}=(0,n.ZP)(t),c=(0,a.Z)("Flex","-flex",void 0,h,t,e);return{rtlEnabled:(0,l.V)("Flex",r,e),mergedClsPrefix:e,margin:(0,i.Fl)(()=>{let{size:e}=t;if(Array.isArray(e))return{horizontal:e[0],vertical:e[1]};if("number"==typeof e)return{horizontal:e,vertical:e};let{self:{[(0,d.Tl)("gap",e)]:r}}=c.value,{row:i,col:a}=(0,o.yU)(r);return{horizontal:(0,o.fQ)(a),vertical:(0,o.fQ)(i)}})}},render(){let{vertical:t,reverse:e,align:r,inline:o,justify:a,margin:n,wrap:l,mergedClsPrefix:d,rtlEnabled:u}=this,h=(0,c.x)((0,s.z)(this),!1);return h.length?(0,i.h)("div",{role:"none",class:[`${d}-flex`,u&&`${d}-flex--rtl`],style:{display:o?"inline-flex":"flex",flexDirection:t&&!e?"column":t&&e?"column-reverse":!t&&e?"row-reverse":"row",justifyContent:a,flexWrap:!l||t?"nowrap":"wrap",alignItems:r,gap:`${n.vertical}px ${n.horizontal}px`}},h):null}})},79537:function(t,e,r){r.d(e,{Z:()=>d});var o=r(58786),i=r(54470),a=r(27046),n=r(71309);let l=(0,n.cB)("input-group",`
 display: inline-flex;
 width: 100%;
 flex-wrap: nowrap;
 vertical-align: bottom;
`,[(0,n.c)(">",[(0,n.cB)("input",[(0,n.c)("&:not(:last-child)",`
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `),(0,n.c)("&:not(:first-child)",`
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 margin-left: -1px!important;
 `)]),(0,n.cB)("button",[(0,n.c)("&:not(:last-child)",`
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `,[(0,n.cE)("state-border, border",`
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `)]),(0,n.c)("&:not(:first-child)",`
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `,[(0,n.cE)("state-border, border",`
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `)])]),(0,n.c)("*",[(0,n.c)("&:not(:last-child)",`
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `,[(0,n.c)(">",[(0,n.cB)("input",`
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `),(0,n.cB)("base-selection",[(0,n.cB)("base-selection-label",`
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `),(0,n.cB)("base-selection-tags",`
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `),(0,n.cE)("box-shadow, border, state-border",`
 border-top-right-radius: 0!important;
 border-bottom-right-radius: 0!important;
 `)])])]),(0,n.c)("&:not(:first-child)",`
 margin-left: -1px!important;
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `,[(0,n.c)(">",[(0,n.cB)("input",`
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `),(0,n.cB)("base-selection",[(0,n.cB)("base-selection-label",`
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `),(0,n.cB)("base-selection-tags",`
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `),(0,n.cE)("box-shadow, border, state-border",`
 border-top-left-radius: 0!important;
 border-bottom-left-radius: 0!important;
 `)])])])])])]),d=(0,o.aZ)({name:"InputGroup",props:{},setup(t){let{mergedClsPrefixRef:e}=(0,i.ZP)(t);return(0,a.Z)("-input-group",l,e),{mergedClsPrefix:e}},render(){let{mergedClsPrefix:t}=this;return(0,o.h)("div",{class:`${t}-input-group`},this.$slots)}})},29875:function(t,e,r){let o;r.d(e,{Z:()=>B});var i=r(65083),a=r(20013),n=r(58786),l=r(76128),d=r(62594),c=r(56946),s=r(54470),u=r(32196),h=r(53198),b=r(44267),p=r(71309),f=r(93950),v=r(19595),g=r(9798),m=r(30951);let w={name:"Switch",common:g.Z,self:function(t){let{primaryColor:e,opacityDisabled:r,borderRadius:o,textColor3:i}=t;return Object.assign(Object.assign({},m.Z),{iconColor:i,textColor:"white",loadingColor:e,opacityDisabled:r,railColor:"rgba(0, 0, 0, .14)",railColorActive:e,buttonBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",buttonColor:"#FFF",railBorderRadiusSmall:o,railBorderRadiusMedium:o,railBorderRadiusLarge:o,buttonBorderRadiusSmall:o,buttonBorderRadiusMedium:o,buttonBorderRadiusLarge:o,boxShadowFocus:`0 0 0 2px ${(0,v.zX)(e,{alpha:.2})}`})}};var x=r(28632);let y=(0,p.cB)("switch",`
 height: var(--n-height);
 min-width: var(--n-width);
 vertical-align: middle;
 user-select: none;
 -webkit-user-select: none;
 display: inline-flex;
 outline: none;
 justify-content: center;
 align-items: center;
`,[(0,p.cE)("children-placeholder",`
 height: var(--n-rail-height);
 display: flex;
 flex-direction: column;
 overflow: hidden;
 pointer-events: none;
 visibility: hidden;
 `),(0,p.cE)("rail-placeholder",`
 display: flex;
 flex-wrap: none;
 `),(0,p.cE)("button-placeholder",`
 width: calc(1.75 * var(--n-rail-height));
 height: var(--n-rail-height);
 `),(0,p.cB)("base-loading",`
 position: absolute;
 top: 50%;
 left: 50%;
 transform: translateX(-50%) translateY(-50%);
 font-size: calc(var(--n-button-width) - 4px);
 color: var(--n-loading-color);
 transition: color .3s var(--n-bezier);
 `,[(0,x.c)({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})]),(0,p.cE)("checked, unchecked",`
 transition: color .3s var(--n-bezier);
 color: var(--n-text-color);
 box-sizing: border-box;
 position: absolute;
 white-space: nowrap;
 top: 0;
 bottom: 0;
 display: flex;
 align-items: center;
 line-height: 1;
 `),(0,p.cE)("checked",`
 right: 0;
 padding-right: calc(1.25 * var(--n-rail-height) - var(--n-offset));
 `),(0,p.cE)("unchecked",`
 left: 0;
 justify-content: flex-end;
 padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));
 `),(0,p.c)("&:focus",[(0,p.cE)("rail",`
 box-shadow: var(--n-box-shadow-focus);
 `)]),(0,p.cM)("round",[(0,p.cE)("rail","border-radius: calc(var(--n-rail-height) / 2);",[(0,p.cE)("button","border-radius: calc(var(--n-button-height) / 2);")])]),(0,p.u4)("disabled",[(0,p.u4)("icon",[(0,p.cM)("rubber-band",[(0,p.cM)("pressed",[(0,p.cE)("rail",[(0,p.cE)("button","max-width: var(--n-button-width-pressed);")])]),(0,p.cE)("rail",[(0,p.c)("&:active",[(0,p.cE)("button","max-width: var(--n-button-width-pressed);")])]),(0,p.cM)("active",[(0,p.cM)("pressed",[(0,p.cE)("rail",[(0,p.cE)("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])]),(0,p.cE)("rail",[(0,p.c)("&:active",[(0,p.cE)("button","left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));")])])])])])]),(0,p.cM)("active",[(0,p.cE)("rail",[(0,p.cE)("button","left: calc(100% - var(--n-button-width) - var(--n-offset))")])]),(0,p.cE)("rail",`
 overflow: hidden;
 height: var(--n-rail-height);
 min-width: var(--n-rail-width);
 border-radius: var(--n-rail-border-radius);
 cursor: pointer;
 position: relative;
 transition:
 opacity .3s var(--n-bezier),
 background .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier);
 background-color: var(--n-rail-color);
 `,[(0,p.cE)("button-icon",`
 color: var(--n-icon-color);
 transition: color .3s var(--n-bezier);
 font-size: calc(var(--n-button-height) - 4px);
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 display: flex;
 justify-content: center;
 align-items: center;
 line-height: 1;
 `,[(0,x.c)()]),(0,p.cE)("button",`
 align-items: center; 
 top: var(--n-offset);
 left: var(--n-offset);
 height: var(--n-button-height);
 width: var(--n-button-width-pressed);
 max-width: var(--n-button-width);
 border-radius: var(--n-button-border-radius);
 background-color: var(--n-button-color);
 box-shadow: var(--n-button-box-shadow);
 box-sizing: border-box;
 cursor: inherit;
 content: "";
 position: absolute;
 transition:
 background-color .3s var(--n-bezier),
 left .3s var(--n-bezier),
 opacity .3s var(--n-bezier),
 max-width .3s var(--n-bezier),
 box-shadow .3s var(--n-bezier);
 `)]),(0,p.cM)("active",[(0,p.cE)("rail","background-color: var(--n-rail-color-active);")]),(0,p.cM)("loading",[(0,p.cE)("rail",`
 cursor: wait;
 `)]),(0,p.cM)("disabled",[(0,p.cE)("rail",`
 cursor: not-allowed;
 opacity: .5;
 `)])]),k=Object.assign(Object.assign({},c.Z.props),{size:{type:String,default:"medium"},value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},onChange:[Function,Array]}),B=(0,n.aZ)({name:"Switch",props:k,slots:Object,setup(t){void 0===o&&(o="undefined"==typeof CSS||void 0!==CSS.supports&&CSS.supports("width","max(1px)"));let{mergedClsPrefixRef:e,inlineThemeDisabled:r}=(0,s.ZP)(t),l=(0,c.Z)("Switch","-switch",y,w,t,e),d=(0,u.Z)(t),{mergedSizeRef:f,mergedDisabledRef:v}=d,g=(0,n.iH)(t.defaultValue),m=(0,n.Vh)(t,"value"),x=(0,a.Z)(m,g),k=(0,n.Fl)(()=>x.value===t.checkedValue),B=(0,n.iH)(!1),$=(0,n.iH)(!1),E=(0,n.Fl)(()=>{let{railStyle:e}=t;if(e)return e({focused:$.value,checked:k.value})});function z(e){let{"onUpdate:value":r,onChange:o,onUpdateValue:i}=t,{nTriggerFormInput:a,nTriggerFormChange:n}=d;r&&(0,b.R)(r,e),i&&(0,b.R)(i,e),o&&(0,b.R)(o,e),g.value=e,a(),n()}let S=(0,n.Fl)(()=>{let t,e,r,{value:a}=f,{self:{opacityDisabled:n,railColor:d,railColorActive:c,buttonBoxShadow:s,buttonColor:u,boxShadowFocus:h,loadingColor:b,textColor:v,iconColor:g,[(0,p.Tl)("buttonHeight",a)]:m,[(0,p.Tl)("buttonWidth",a)]:w,[(0,p.Tl)("buttonWidthPressed",a)]:x,[(0,p.Tl)("railHeight",a)]:y,[(0,p.Tl)("railWidth",a)]:k,[(0,p.Tl)("railBorderRadius",a)]:B,[(0,p.Tl)("buttonBorderRadius",a)]:$},common:{cubicBezierEaseInOut:E}}=l.value;return o?(t=`calc((${y} - ${m}) / 2)`,e=`max(${y}, ${m})`,r=`max(${k}, calc(${k} + ${m} - ${y}))`):(t=(0,i.BL)(((0,i.fQ)(y)-(0,i.fQ)(m))/2),e=(0,i.BL)(Math.max((0,i.fQ)(y),(0,i.fQ)(m))),r=(0,i.fQ)(y)>(0,i.fQ)(m)?k:(0,i.BL)((0,i.fQ)(k)+(0,i.fQ)(m)-(0,i.fQ)(y))),{"--n-bezier":E,"--n-button-border-radius":$,"--n-button-box-shadow":s,"--n-button-color":u,"--n-button-width":w,"--n-button-width-pressed":x,"--n-button-height":m,"--n-height":e,"--n-offset":t,"--n-opacity-disabled":n,"--n-rail-border-radius":B,"--n-rail-color":d,"--n-rail-color-active":c,"--n-rail-height":y,"--n-rail-width":k,"--n-width":r,"--n-box-shadow-focus":h,"--n-loading-color":b,"--n-text-color":v,"--n-icon-color":g}}),C=r?(0,h.F)("switch",(0,n.Fl)(()=>f.value[0]),S,t):void 0;return{handleClick:function(){t.loading||v.value||(x.value!==t.checkedValue?z(t.checkedValue):z(t.uncheckedValue))},handleBlur:function(){$.value=!1;let{nTriggerFormBlur:t}=d;t(),B.value=!1},handleFocus:function(){$.value=!0;let{nTriggerFormFocus:t}=d;t()},handleKeyup:function(e){t.loading||v.value||" "===e.key&&(x.value!==t.checkedValue?z(t.checkedValue):z(t.uncheckedValue),B.value=!1)},handleKeydown:function(e){t.loading||v.value||" "===e.key&&(e.preventDefault(),B.value=!0)},mergedRailStyle:E,pressed:B,mergedClsPrefix:e,mergedValue:x,checked:k,mergedDisabled:v,cssVars:r?void 0:S,themeClass:null==C?void 0:C.themeClass,onRender:null==C?void 0:C.onRender}},render(){let{mergedClsPrefix:t,mergedDisabled:e,checked:r,mergedRailStyle:o,onRender:i,$slots:a}=this;null==i||i();let{checked:c,unchecked:s,icon:u,"checked-icon":h,"unchecked-icon":b}=a,p=!((0,f.aD)(u)&&(0,f.aD)(h)&&(0,f.aD)(b));return(0,n.h)("div",{role:"switch","aria-checked":r,class:[`${t}-switch`,this.themeClass,p&&`${t}-switch--icon`,r&&`${t}-switch--active`,e&&`${t}-switch--disabled`,this.round&&`${t}-switch--round`,this.loading&&`${t}-switch--loading`,this.pressed&&`${t}-switch--pressed`,this.rubberBand&&`${t}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},(0,n.h)("div",{class:`${t}-switch__rail`,"aria-hidden":"true",style:o},(0,f.K9)(c,e=>(0,f.K9)(s,r=>e||r?(0,n.h)("div",{"aria-hidden":!0,class:`${t}-switch__children-placeholder`},(0,n.h)("div",{class:`${t}-switch__rail-placeholder`},(0,n.h)("div",{class:`${t}-switch__button-placeholder`}),e),(0,n.h)("div",{class:`${t}-switch__rail-placeholder`},(0,n.h)("div",{class:`${t}-switch__button-placeholder`}),r)):null)),(0,n.h)("div",{class:`${t}-switch__button`},(0,f.K9)(u,e=>(0,f.K9)(h,r=>(0,f.K9)(b,o=>(0,n.h)(l.Z,null,{default:()=>this.loading?(0,n.h)(d.Z,{key:"loading",clsPrefix:t,strokeWidth:20}):this.checked&&(r||e)?(0,n.h)("div",{class:`${t}-switch__button-icon`,key:r?"checked-icon":"icon"},r||e):!this.checked&&(o||e)?(0,n.h)("div",{class:`${t}-switch__button-icon`,key:o?"unchecked-icon":"icon"},o||e):null})))),(0,f.K9)(c,e=>e&&(0,n.h)("div",{key:"checked",class:`${t}-switch__checked`},e)),(0,f.K9)(s,e=>e&&(0,n.h)("div",{key:"unchecked",class:`${t}-switch__unchecked`},e)))))}})}}]);